Skip to content

Commit

Permalink
Feat(web): Switch TextField component to v3 design tokens #DS-1447
Browse files Browse the repository at this point in the history
  • Loading branch information
crishpeen committed Sep 11, 2024
1 parent 5b135e3 commit fba5449
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion packages/web/src/scss/components/TextField/_TextField.scss
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ $_field-name: 'TextField';
.TextField .TextField__input:disabled,
:is(.TextField--disabled, .TextField.is-disabled) .TextField__input {
@include form-fields-tools.box-field-disabled-input();

border-color: transparent;
}

// stylelint-disable no-descending-specificity, selector-max-specificity, selector-max-class, selector-max-compound-selectors
Expand All @@ -165,7 +167,7 @@ $_field-name: 'TextField';
:is(.TextField--disabled, .TextField.is-disabled)
.TextField__passwordToggle
.TextField__passwordToggle__button::before {
border-color: theme.$input-border-color-disabled;
border-color: form-fields-theme.$input-border-color-disabled;
}

.TextField .TextField__input:disabled ~ .TextField__passwordToggle__button,
Expand Down
8 changes: 4 additions & 4 deletions packages/web/src/scss/components/TextField/_theme.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@use '@tokens' as tokens;
@use '@global' as global-tokens;
@use '../../settings/globals';

$input-border-color-disabled: tokens.$border-primary-disabled;
$input-number-arrows-width: 1.25rem;
$input-password-toggle-padding: tokens.$space-400;
$input-password-toggle-icon-size: tokens.$space-700;
$input-password-toggle-padding: global-tokens.$space-500;
$input-password-toggle-icon-size: global-tokens.$space-900;
$input-size-characters: (2, 3, 4);
3 changes: 2 additions & 1 deletion packages/web/src/scss/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
@forward 'Tag';

// @forward 'TextArea';
// @forward 'TextField';
@forward 'TextField';

// @forward 'Toast';
// @forward 'Tooltip';
@forward 'UNSTABLE_ActionLayout';
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/demo-components-compare.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const IGNORED_TESTS: string[] = [
'Stack',
'Text',
'TextArea',
'TextField',
'Toast',
'Tooltip',
'UNSTABLE_Slider',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fba5449

Please sign in to comment.