Skip to content

Commit

Permalink
refactor: update design tokens structure
Browse files Browse the repository at this point in the history
  • Loading branch information
PKulkoRaccoonGang committed Aug 1, 2024
1 parent 96036c8 commit 69c2200
Show file tree
Hide file tree
Showing 33 changed files with 1,631 additions and 1,536 deletions.
10 changes: 5 additions & 5 deletions scss/core/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -461,12 +461,12 @@ $max-width-xl: var(--pgn-container-max-width-xl) !default;
$line-height-lg: var(--pgn-line-height-lg) !default;
$line-height-sm: var(--pgn-line-height-sm) !default;

$border-width: var(--pgn-border-width) !default;
$border-color: var(--pgn-border-color) !default;
$border-width: var(--pgn-size-border-width) !default;
$border-color: var(--pgn-color-border) !default;

$border-radius: var(--pgn-border-radius-base) !default;
$border-radius-lg: var(--pgn-border-radius-lg) !default;
$border-radius-sm: var(--pgn-border-radius-sm) !default;
$border-radius: var(--pgn-size-border-radius-base) !default;
$border-radius-lg: var(--pgn-size-border-radius-lg) !default;
$border-radius-sm: var(--pgn-size-border-radius-sm) !default;

$rounded-pill: 50rem !default;

Expand Down
442 changes: 221 additions & 221 deletions scss/core/css/variables.css

Large diffs are not rendered by default.

414 changes: 208 additions & 206 deletions src/Form/_variables.scss

Large diffs are not rendered by default.

442 changes: 221 additions & 221 deletions tokens/build/_variables.scss

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tokens/build/css-to-scss.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tokens/build/scss-to-css.json

Large diffs are not rendered by default.

442 changes: 221 additions & 221 deletions tokens/build/variables.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tokens/src/alias/color.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"input": {
"focus": { "value": "{color.primary.500.value}" }
},
"border": { "value": "{color.gray.200.value}", "source": "$border-color" },
"theme": {
"background": {
"primary": { "value": "{color.primary.100.value}" },
Expand Down
12 changes: 12 additions & 0 deletions tokens/src/alias/size.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"size": {
"border": {
"width": { "value": "0.063rem", "source": "$border-width" },
"radius": {
"base": { "value": ".375rem", "source": "$border-radius" },
"lg": { "value": ".425rem", "source": "$border-radius-lg" },
"sm": { "value": ".25rem", "source": "$border-radius-sm" }
}
}
}
}
2 changes: 1 addition & 1 deletion tokens/src/components/Alert.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"bottom": { "value": "1rem", "source": "$alert-margin-bottom" }
},
"border": {
"radius": { "value": "{border.radius.base}", "source": "$alert-border-radius" },
"radius": { "value": "{size.border.radius.base}", "source": "$alert-border-radius" },
"width": { "value": "0", "source": "$alert-border-width" }
},
"font": {
Expand Down
2 changes: 1 addition & 1 deletion tokens/src/components/Breadcrumb.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"width": { "value": ".0625rem", "source": "$breadcrumb-border-focus-width" }
},
"radius": {
"base": { "value": "{border.radius.base.value}", "source": "$breadcrumb-border-radius" },
"base": { "value": "{size.border.radius.base.value}", "source": "$breadcrumb-border-radius" },
"focus": { "value": ".125rem", "source": "$breadcrumb-focus-border-radius" }
}
},
Expand Down
6 changes: 3 additions & 3 deletions tokens/src/components/Button/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
"border": {
"width": { "value": "{input.btn.border.width.value}", "source": "$btn-border-width" },
"radius": {
"base": { "value": "{border.radius.base.value}", "source": "$btn-border-radius" },
"lg": { "value": "{border.radius.lg.value}", "source": "$btn-border-radius-lg" },
"sm": { "value": "{border.radius.sm.value}", "source": "$btn-border-radius-sm" }
"base": { "value": "{size.border.radius.base.value}", "source": "$btn-border-radius" },
"lg": { "value": "{size.border.radius.lg.value}", "source": "$btn-border-radius-lg" },
"sm": { "value": "{size.border.radius.sm.value}", "source": "$btn-border-radius-sm" }
}
},
"box-shadow": {
Expand Down
4 changes: 2 additions & 2 deletions tokens/src/components/Card.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"y": { "value": ".75rem", "source": "$card-spacer-y" }
},
"border": {
"width": { "value": "{border.width.value}", "source": "$card-border-width" },
"width": { "value": "{size.border.width.value}", "source": "$card-border-width" },
"radius": {
"base": { "value": "{border.radius.base.value}", "source": "$card-border-radius" },
"base": { "value": "{size.border.radius.base.value}", "source": "$card-border-radius" },
"image": { "value": ".3125rem", "source": "$card-image-border-radius" },
"logo": { "value": ".25rem", "source": "$card-logo-border-radius" }
},
Expand Down
4 changes: 2 additions & 2 deletions tokens/src/components/Dropdown.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
"amount": 0.15
}]
},
"width": { "value": "{border.width.value}", "source": "$dropdown-border-width" },
"width": { "value": "{size.border.width.value}", "source": "$dropdown-border-width" },
"radius": {
"base": { "value": "{border.radius.base.value}", "source": "$dropdown-border-radius" },
"base": { "value": "{size.border.radius.base.value}", "source": "$dropdown-border-radius" },
"inner": {
"value": "calc({dropdown.border.radius.base.value} - {dropdown.border.width.value})",
"source": "$dropdown-inner-border-radius"
Expand Down
Loading

0 comments on commit 69c2200

Please sign in to comment.