Skip to content

Commit

Permalink
chore(button): deprecate selected state padding variables
Browse files Browse the repository at this point in the history
  • Loading branch information
gcornut committed Dec 10, 2024
1 parent e2baa1e commit 15d2126
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `DatePicker`: update day buttons to use standard button styles
- `Chip`: add border and background color CSS variable theming on selected state.
- `SideNavigationItem`: add border CSS variable theming on selected state.
- `Button`: deprecated variables `--lumx-button-emphasis-selected-state-default-padding-horizontal`,
`--lumx-button-emphasis-selected-hover-hover-padding-horizontal` and
`--lumx-button-emphasis-selected-hover-active-padding-horizontal` (use the base `low` or `medium` emphasis padding)

### Fixed

Expand Down
8 changes: 4 additions & 4 deletions packages/lumx-core/src/css/design-tokens.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Do not edit directly
* Generated on Wed, 04 Dec 2024 10:53:03 GMT
* Generated on Fri, 06 Dec 2024 13:46:59 GMT
*/

:root {
Expand Down Expand Up @@ -80,23 +80,23 @@
--lumx-button-emphasis-low-state-active-theme-dark-background-color: var(--lumx-color-light-L4);
--lumx-button-emphasis-low-state-active-theme-dark-color: var(--lumx-color-light-L1);
--lumx-button-emphasis-low-state-active-theme-dark-border-color: transparent;
--lumx-button-emphasis-selected-state-default-padding-horizontal: var(--lumx-spacing-unit-big);
--lumx-button-emphasis-selected-state-default-padding-horizontal: 16px; /* deprecated (use base emphasis padding) */
--lumx-button-emphasis-selected-state-default-border-width: 0;
--lumx-button-emphasis-selected-state-default-theme-light-background-color: var(--lumx-color-primary-L5);
--lumx-button-emphasis-selected-state-default-theme-light-color: var(--lumx-color-primary-D2);
--lumx-button-emphasis-selected-state-default-theme-light-border-color: transparent;
--lumx-button-emphasis-selected-state-default-theme-dark-background-color: var(--lumx-color-light-L3);
--lumx-button-emphasis-selected-state-default-theme-dark-color: var(--lumx-color-light-N);
--lumx-button-emphasis-selected-state-default-theme-dark-border-color: transparent;
--lumx-button-emphasis-selected-state-hover-padding-horizontal: var(--lumx-spacing-unit-big);
--lumx-button-emphasis-selected-state-hover-padding-horizontal: 16px; /* deprecated (use base emphasis padding) */
--lumx-button-emphasis-selected-state-hover-border-width: 0;
--lumx-button-emphasis-selected-state-hover-theme-light-background-color: var(--lumx-color-primary-L4);
--lumx-button-emphasis-selected-state-hover-theme-light-color: var(--lumx-color-primary-D2);
--lumx-button-emphasis-selected-state-hover-theme-light-border-color: transparent;
--lumx-button-emphasis-selected-state-hover-theme-dark-background-color: var(--lumx-color-light-L4);
--lumx-button-emphasis-selected-state-hover-theme-dark-color: var(--lumx-color-light-N);
--lumx-button-emphasis-selected-state-hover-theme-dark-border-color: transparent;
--lumx-button-emphasis-selected-state-active-padding-horizontal: var(--lumx-spacing-unit-big);
--lumx-button-emphasis-selected-state-active-padding-horizontal: 16px; /* deprecated (use base emphasis padding) */
--lumx-button-emphasis-selected-state-active-border-width: 0;
--lumx-button-emphasis-selected-state-active-theme-light-background-color: var(--lumx-color-primary-L3);
--lumx-button-emphasis-selected-state-active-theme-light-color: var(--lumx-color-primary-D2);
Expand Down
8 changes: 4 additions & 4 deletions packages/lumx-core/src/js/constants/design-tokens.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Do not edit directly
* Generated on Wed, 04 Dec 2024 10:53:03 GMT
* Generated on Fri, 06 Dec 2024 13:46:59 GMT
*/

export const DESIGN_TOKENS = {
Expand Down Expand Up @@ -283,7 +283,7 @@ export const DESIGN_TOKENS = {
},
'emphasis-selected': {
'state-default': {
padding: { horizontal: { value: 'var(--lumx-spacing-unit-big)', $aliasedFrom: 'spacing.unit.big' } },
padding: { horizontal: { comment: 'deprecated (use base emphasis padding)', value: '16px' } },
'border-width': { value: '0' },
'theme-light': {
'background-color': {
Expand Down Expand Up @@ -313,7 +313,7 @@ export const DESIGN_TOKENS = {
},
},
'state-hover': {
padding: { horizontal: { value: 'var(--lumx-spacing-unit-big)', $aliasedFrom: 'spacing.unit.big' } },
padding: { horizontal: { comment: 'deprecated (use base emphasis padding)', value: '16px' } },
'border-width': { value: '0' },
'theme-light': {
'background-color': {
Expand Down Expand Up @@ -343,7 +343,7 @@ export const DESIGN_TOKENS = {
},
},
'state-active': {
padding: { horizontal: { value: 'var(--lumx-spacing-unit-big)', $aliasedFrom: 'spacing.unit.big' } },
padding: { horizontal: { comment: 'deprecated (use base emphasis padding)', value: '16px' } },
'border-width': { value: '0' },
'theme-light': {
'background-color': {
Expand Down
8 changes: 4 additions & 4 deletions packages/lumx-core/src/scss/_design-tokens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Do not edit directly
* Generated on Wed, 04 Dec 2024 10:53:03 GMT
* Generated on Fri, 06 Dec 2024 13:46:59 GMT
*/

$lumx-button-height: 36px !default;
Expand Down Expand Up @@ -79,23 +79,23 @@ $lumx-button-emphasis-low-state-active-theme-light-border-color: transparent !de
$lumx-button-emphasis-low-state-active-theme-dark-background-color: var(--lumx-color-light-L4) !default;
$lumx-button-emphasis-low-state-active-theme-dark-color: var(--lumx-color-light-L1) !default;
$lumx-button-emphasis-low-state-active-theme-dark-border-color: transparent !default;
$lumx-button-emphasis-selected-state-default-padding-horizontal: var(--lumx-spacing-unit-big) !default;
$lumx-button-emphasis-selected-state-default-padding-horizontal: 16px !default; // deprecated (use base emphasis padding)
$lumx-button-emphasis-selected-state-default-border-width: 0 !default;
$lumx-button-emphasis-selected-state-default-theme-light-background-color: var(--lumx-color-primary-L5) !default;
$lumx-button-emphasis-selected-state-default-theme-light-color: var(--lumx-color-primary-D2) !default;
$lumx-button-emphasis-selected-state-default-theme-light-border-color: transparent !default;
$lumx-button-emphasis-selected-state-default-theme-dark-background-color: var(--lumx-color-light-L3) !default;
$lumx-button-emphasis-selected-state-default-theme-dark-color: var(--lumx-color-light-N) !default;
$lumx-button-emphasis-selected-state-default-theme-dark-border-color: transparent !default;
$lumx-button-emphasis-selected-state-hover-padding-horizontal: var(--lumx-spacing-unit-big) !default;
$lumx-button-emphasis-selected-state-hover-padding-horizontal: 16px !default; // deprecated (use base emphasis padding)
$lumx-button-emphasis-selected-state-hover-border-width: 0 !default;
$lumx-button-emphasis-selected-state-hover-theme-light-background-color: var(--lumx-color-primary-L4) !default;
$lumx-button-emphasis-selected-state-hover-theme-light-color: var(--lumx-color-primary-D2) !default;
$lumx-button-emphasis-selected-state-hover-theme-light-border-color: transparent !default;
$lumx-button-emphasis-selected-state-hover-theme-dark-background-color: var(--lumx-color-light-L4) !default;
$lumx-button-emphasis-selected-state-hover-theme-dark-color: var(--lumx-color-light-N) !default;
$lumx-button-emphasis-selected-state-hover-theme-dark-border-color: transparent !default;
$lumx-button-emphasis-selected-state-active-padding-horizontal: var(--lumx-spacing-unit-big) !default;
$lumx-button-emphasis-selected-state-active-padding-horizontal: 16px !default; // deprecated (use base emphasis padding)
$lumx-button-emphasis-selected-state-active-border-width: 0 !default;
$lumx-button-emphasis-selected-state-active-theme-light-background-color: var(--lumx-color-primary-L3) !default;
$lumx-button-emphasis-selected-state-active-theme-light-color: var(--lumx-color-primary-D2) !default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"emphasis-selected": {
"state-default": {
"padding": {
"horizontal": "{spacing.unit.big}"
"horizontal": { "value": "{spacing.unit.big.value}", "comment": "deprecated (use base emphasis padding)" }
},
"border-width": { "value": "0" },
"theme-light": {
Expand All @@ -171,7 +171,7 @@
},
"state-hover": {
"padding": {
"horizontal": "{spacing.unit.big}"
"horizontal": { "value": "{spacing.unit.big.value}", "comment": "deprecated (use base emphasis padding)" }
},
"border-width": { "value": "0" },
"theme-light": {
Expand All @@ -187,7 +187,7 @@
},
"state-active": {
"padding": {
"horizontal": "{spacing.unit.big}"
"horizontal": { "value": "{spacing.unit.big.value}", "comment": "deprecated (use base emphasis padding)" }
},
"border-width": { "value": "0" },
"theme-light": {
Expand Down

0 comments on commit 15d2126

Please sign in to comment.