Skip to content

Commit

Permalink
Tyk ui v2 updates (#150)
Browse files Browse the repository at this point in the history
* tyk ui v2 fixes

* tyk ui 2.0.2
  • Loading branch information
lghiur authored Aug 11, 2020
1 parent 0c610e6 commit 39c0b56
Show file tree
Hide file tree
Showing 28 changed files with 79 additions and 47 deletions.
2 changes: 1 addition & 1 deletion lib/index.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/index.js.map

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions lib/sass/common/sass/form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,15 @@
color: $form-control-placeholder-color;
}

&:focus {
&:focus,
&:active {
outline: none;
border: $form-control-border-focus;
border: $form-control-border-focus !important;

+ .tyk-input-group__addon {
border: $form-control-border-focus !important;
border-left: none !important;
}
}

&__help-block {
Expand Down Expand Up @@ -233,7 +239,7 @@ select {

> button {
margin-left: 10px;
margin-bottom: map-get($spacing, 'md');
margin-bottom: map-get($spacing, 'base');
}
}

Expand Down Expand Up @@ -278,6 +284,6 @@ select {

> .tyk-button {
margin-left: map-get($spacing, 'md');
margin-bottom: map-get($spacing, 'md');
margin-bottom: map-get($spacing, 'base');
}
}
10 changes: 9 additions & 1 deletion lib/sass/common/sass/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ strong {
font-family: $font-family-bold;
}

a {
a:not(.tyk-button) {
cursor: pointer;
color: $text-color;
font-family: $font-family-regular;
Expand All @@ -60,6 +60,10 @@ a {
+ a {
margin-left: 5px;
}

i {
font-size: 9px
}
}

p,
Expand Down Expand Up @@ -113,13 +117,17 @@ label {
overflow: hidden;
text-overflow: ellipsis;
}
&--underline {
text-decoration: underline;
}
}

td.text-ellipsis {
max-width: 250px;
}

.section-title {
font-family: $headings-font-family-bold;
margin-bottom: 5px;

.tyk-icon {
Expand Down
2 changes: 1 addition & 1 deletion lib/sass/common/sass/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ $form-control-disabled-border: $general-border-width solid theme-color('default'
$form-control-placeholder-color: #A2A2CC !default;
$form-control-disabled-background-color: theme-color('default', 'light') !default;
$form-control-disabled-color: $text-color !default;
$form-control-border-focus: 2px solid theme-color('default', 'base') !default;
$form-control-border-focus: 2px solid theme-color('success', 'base') !default;
$form-control-placeholder-font-family: $font-family-medium !default;
$form-control-error-colour: theme-color('danger', 'dark') !default;
$form-default-color: theme-color('default', 'light') !default;
Expand Down
2 changes: 1 addition & 1 deletion lib/sass/components/NavBar/sass/variables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$nav-bar-background-color: white !default;
$nav-bar-text-color: $text-color !default;
$nav-bar-text-color: theme-color('default', 'base') !default;
$nav-bar-padding-left: 265px !default;
$nav-bar-animate-left: 245px !default;
$nav-bar-top-padding: map-get($spacing, 'sm') !default;
Expand Down
2 changes: 1 addition & 1 deletion lib/sass/components/Panel/sass/Panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
padding: $padding-y-blank-panel-header $padding-x-panel-header;
@include panel-variant(
white,
$text-color
theme-color('default', 'base')
);
}
}
Expand Down
1 change: 1 addition & 0 deletions lib/sass/components/Pill/sass/Pill.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
border-radius: $general-border-radius;
display: inline-flex;
font-size: text-scale('xs');
line-height: 19px;
margin: $pill-margin;
padding: 6px map-get($spacing, 'base');
font-family: $font-family-medium;
Expand Down
4 changes: 2 additions & 2 deletions lib/sass/components/Table/sass/Table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}

> tbody tr:hover {
background: theme-color('background', 'light');
background: rgba(theme-color('background', 'light'), 0.4);
}

> tbody td {
Expand Down Expand Up @@ -141,7 +141,7 @@
}

.header-sort {
padding-left: map-get($spacing, 'sm');
padding-left: 3px;
padding-top: map-get($spacing, 'xs');
vertical-align: middle;
}
Expand Down
8 changes: 4 additions & 4 deletions lib/sass/components/Table/sass/variables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$table-th-padding: map-get($spacing, 'sm') !default;
$table-td-padding-y: map-get($spacing, 'sm') !default;
$table-td-padding-x: map-get($spacing, 'xs') !default;
$table-first-last-padding: 25px !default;
$table-th-padding: map-get($spacing, 'base') map-get($spacing, 'sm') !default;
$table-td-padding-y: map-get($spacing, 'xs') !default;
$table-td-padding-x: map-get($spacing, 'sm') !default;
$table-first-last-padding: 20px !default;
$table-pagination-padding: map-get($spacing, 'md') 25px !default;
4 changes: 2 additions & 2 deletions lib/sass/components/Toggle/sass/Toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@
@include button-size(
calc(#{$padding-y-button-sm} + 2px),
calc(#{$padding-x-button-sm} + 2px),
text-scale('sm'),
$line-height-button-sm,
text-scale('xs'),
line-height('xs'),
$button-border-radius
)
}
Expand Down
2 changes: 1 addition & 1 deletion lib/tyk-ui.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/tyk-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/tyk-ui.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tyk-technologies/tyk-ui",
"version": "2.0.1",
"version": "2.0.2",
"description": "Tyk UI - ui reusable components",
"main": "lib/index.js",
"scripts": {
Expand Down
14 changes: 10 additions & 4 deletions src/common/sass/form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,15 @@
color: $form-control-placeholder-color;
}

&:focus {
&:focus,
&:active {
outline: none;
border: $form-control-border-focus;
border: $form-control-border-focus !important;

+ .tyk-input-group__addon {
border: $form-control-border-focus !important;
border-left: none !important;
}
}

&__help-block {
Expand Down Expand Up @@ -233,7 +239,7 @@ select {

> button {
margin-left: 10px;
margin-bottom: map-get($spacing, 'md');
margin-bottom: map-get($spacing, 'base');
}
}

Expand Down Expand Up @@ -278,6 +284,6 @@ select {

> .tyk-button {
margin-left: map-get($spacing, 'md');
margin-bottom: map-get($spacing, 'md');
margin-bottom: map-get($spacing, 'base');
}
}
10 changes: 9 additions & 1 deletion src/common/sass/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ strong {
font-family: $font-family-bold;
}

a {
a:not(.tyk-button) {
cursor: pointer;
color: $text-color;
font-family: $font-family-regular;
Expand All @@ -60,6 +60,10 @@ a {
+ a {
margin-left: 5px;
}

i {
font-size: 9px
}
}

p,
Expand Down Expand Up @@ -113,13 +117,17 @@ label {
overflow: hidden;
text-overflow: ellipsis;
}
&--underline {
text-decoration: underline;
}
}

td.text-ellipsis {
max-width: 250px;
}

.section-title {
font-family: $headings-font-family-bold;
margin-bottom: 5px;

.tyk-icon {
Expand Down
2 changes: 1 addition & 1 deletion src/common/sass/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ $form-control-disabled-border: $general-border-width solid theme-color('default'
$form-control-placeholder-color: #A2A2CC !default;
$form-control-disabled-background-color: theme-color('default', 'light') !default;
$form-control-disabled-color: $text-color !default;
$form-control-border-focus: 2px solid theme-color('default', 'base') !default;
$form-control-border-focus: 2px solid theme-color('success', 'base') !default;
$form-control-placeholder-font-family: $font-family-medium !default;
$form-control-error-colour: theme-color('danger', 'dark') !default;
$form-default-color: theme-color('default', 'light') !default;
Expand Down
4 changes: 3 additions & 1 deletion src/components/Button/js/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const Button = React.forwardRef((props, ref) => {
customButton,
children,
iconType,
iconFamily,
iconPosition,
iconOnly,
id,
Expand Down Expand Up @@ -54,7 +55,7 @@ const Button = React.forwardRef((props, ref) => {

return (
(iconType && iPos === position)
? <Icon type={iconType} />
? <Icon family={iconFamily} type={iconType} />
: null
);
};
Expand Down Expand Up @@ -148,6 +149,7 @@ Button.propTypes = {
id: PropTypes.string,
href: PropTypes.string,
iconPosition: PropTypes.string, // left or right
iconFamily: PropTypes.string,
iconOnly: PropTypes.bool,
iconType: PropTypes.string,
noStyle: PropTypes.bool,
Expand Down
4 changes: 2 additions & 2 deletions src/components/NavBar/js/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ export default class NavBar extends PureComponent {
<h1>{ title }</h1>
{
subtitle
? <p className="font-family-regular">{subtitle}</p>
? <p className="font-family-medium">{subtitle}</p>
: null
}
</div>
)
: null
: subtitle && <p className="font-family-medium">{subtitle}</p>
}
<div className="tyk-nav-bar__container">
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/NavBar/sass/variables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$nav-bar-background-color: white !default;
$nav-bar-text-color: $text-color !default;
$nav-bar-text-color: theme-color('default', 'base') !default;
$nav-bar-padding-left: 265px !default;
$nav-bar-animate-left: 245px !default;
$nav-bar-top-padding: map-get($spacing, 'sm') !default;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Panel/sass/Panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
padding: $padding-y-blank-panel-header $padding-x-panel-header;
@include panel-variant(
white,
$text-color
theme-color('default', 'base')
);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/components/Pill/sass/Pill.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
border-radius: $general-border-radius;
display: inline-flex;
font-size: text-scale('xs');
line-height: 19px;
margin: $pill-margin;
padding: 6px map-get($spacing, 'base');
font-family: $font-family-medium;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Table/sass/Table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}

> tbody tr:hover {
background: theme-color('background', 'light');
background: rgba(theme-color('background', 'light'), 0.4);
}

> tbody td {
Expand Down Expand Up @@ -141,7 +141,7 @@
}

.header-sort {
padding-left: map-get($spacing, 'sm');
padding-left: 3px;
padding-top: map-get($spacing, 'xs');
vertical-align: middle;
}
Expand Down
8 changes: 4 additions & 4 deletions src/components/Table/sass/variables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$table-th-padding: map-get($spacing, 'sm') !default;
$table-td-padding-y: map-get($spacing, 'sm') !default;
$table-td-padding-x: map-get($spacing, 'xs') !default;
$table-first-last-padding: 25px !default;
$table-th-padding: map-get($spacing, 'base') map-get($spacing, 'sm') !default;
$table-td-padding-y: map-get($spacing, 'xs') !default;
$table-td-padding-x: map-get($spacing, 'sm') !default;
$table-first-last-padding: 20px !default;
$table-pagination-padding: map-get($spacing, 'md') 25px !default;
10 changes: 5 additions & 5 deletions src/components/Toggle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,17 +328,17 @@ export default class TestToggle extends Component {
<Toggle.Item
label="short"
name="option"
value="option1"
value="FE team 1"
/>
<Toggle.Item
label="medium name"
name="option"
value="option2"
name="FE team "
value="FE team 2"
/>
<Toggle.Item
label="very long long name"
name="option"
value="option3"
name="FE team "
value="FE team 3s"
/>
</Toggle>
<br />
Expand Down
4 changes: 2 additions & 2 deletions src/components/Toggle/sass/Toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@
@include button-size(
calc(#{$padding-y-button-sm} + 2px),
calc(#{$padding-x-button-sm} + 2px),
text-scale('sm'),
$line-height-button-sm,
text-scale('xs'),
line-height('xs'),
$button-border-radius
)
}
Expand Down

0 comments on commit 39c0b56

Please sign in to comment.