Skip to content

Commit

Permalink
some_tokens_deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
Kron1749 committed Jul 24, 2024
1 parent 83945a0 commit 490a243
Show file tree
Hide file tree
Showing 37 changed files with 153 additions and 177 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('Exports', () => {
`
@use 'v_lib' as l
body
color: #{l.token-as-var('ref.color.button.color-theme-accent')}
color: #{l.token-as-var('ref.color.common.color-theme-accent')}
`,
'indented',
),
Expand Down Expand Up @@ -336,12 +336,12 @@ describe('Utils', () => {
@use 'v_util' as util;
$src: (
'ref.color.button.color-theme-accent': '--scp',
'ref.color.common.color-theme-accent': '--scp',
'sys.color.secondary': '--scs',
);
$values: (
'ref.color.button.color-theme-accent': red,
'ref.color.common.color-theme-accent': red,
'sys.color.secondary': blue
);
Expand All @@ -363,12 +363,12 @@ describe('Utils', () => {
@use 'v_util' as util;
$src: (
'ref.color.button.color-theme-accent': '--scp',
'ref.color.common.color-theme-accent': '--scp',
'sys.color.secondary': '--scs',
);
$values: (
'ref.color.button.color-theme-accent': red,
'ref.color.common.color-theme-accent': red,
'sys.color.secondary': blue,
'sys.color.tertiary': green
);
Expand All @@ -386,7 +386,7 @@ describe('Utils', () => {
@use 'v_util' as util;
$src: (
'ref.color.button.color-theme-accent': '--scp',
'ref.color.common.color-theme-accent': '--scp',
'sys.color.secondary': '--scs',
);
Expand All @@ -411,7 +411,7 @@ describe('Utils', () => {
@use 'v_util' as util;
$src: (
'ref.color.button.color-theme-accent': '--scp',
'ref.color.common.color-theme-accent': '--scp',
'sys.color.secondary': '--scs',
);
Expand Down
34 changes: 13 additions & 21 deletions packages/ theme_neumorphism/src/sass/lib.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $tokens-compiled: util.give-names-to-tokens($tokens-compiled, $vars-prefix);
(
ref: (
'color': (
'button': (
'common': (
'color-utility-surface': #FDF7FB,
'color-base-on-accent': #FFFFFF,
'color-base-content-tertiary': #D5CDD0,
Expand Down Expand Up @@ -64,15 +64,11 @@ $tokens-compiled: util.give-names-to-tokens($tokens-compiled, $vars-prefix);
),
sys: (
'color': (
'background': '',
'content-tertiary': '',
'content-secondary': '',
'content-primary': '',
'content-quaternary': '',
'on-disabled': '',
'primary': '',
'content-on-background-inverted': '',
'background-hover': '',
'primary-pressed': '',
'primary-hover': '',
'button': (
Expand All @@ -85,24 +81,24 @@ $tokens-compiled: util.give-names-to-tokens($tokens-compiled, $vars-prefix);
'border-color': #EDE4E7,
),
'secondary': (
'text-color': token-as-var('ref.color.button.color-base-on-accent'),
'text-color-active': token-as-var('ref.color.button.color-base-on-accent'),
'text-color': token-as-var('ref.color.common.color-base-on-accent'),
'text-color-active': token-as-var('ref.color.common.color-base-on-accent'),

'border-color': token-as-var('ref.color.button.border-color'),
'border-color-active': token-as-var('ref.color.button.border-color'),
'border-color': token-as-var('ref.color.common.border-color'),
'border-color-active': token-as-var('ref.color.common.border-color'),
),
'tertiary': (
'text-color': token-as-var('ref.color.button.color-base-content-tertiary'),
'text-color-active': token-as-var('ref.color.button.color-base-content-secondary'),
'text-color': token-as-var('ref.color.common.color-base-content-tertiary'),
'text-color-active': token-as-var('ref.color.common.color-base-content-secondary'),
),
'action': (
'background-color': token-as-var('ref.color.button.color-utility-body'),
'background-color': token-as-var('ref.color.common.color-utility-body'),
'background-color-hover': token-as-var('sys.color.button.action.background-color'),
'background-color-pressed': token-as-var('sys.color.button.action.background-color'),

'text-color': token-as-var('ref.color.button.color-base-content-tertiary'),
'text-color-hover': token-as-var('ref.color.button.color-base-content-secondary'),
'text-color-active': token-as-var('ref.color.button.color-theme-accent'),
'text-color': token-as-var('ref.color.common.color-base-content-tertiary'),
'text-color-hover': token-as-var('ref.color.common.color-base-content-secondary'),
'text-color-active': token-as-var('ref.color.common.color-theme-accent'),
)
),
'util': (
Expand All @@ -125,10 +121,6 @@ $tokens-compiled: util.give-names-to-tokens($tokens-compiled, $vars-prefix);
'debug-background': '',
'debug-background-hover': '',
),
'border': (
'primary': '',
'secondary': ''
)
),
'border': (
'button': (
Expand All @@ -137,8 +129,8 @@ $tokens-compiled: util.give-names-to-tokens($tokens-compiled, $vars-prefix);
),
'disabled': (
'button': (
'background-color': token-as-var('ref.color.button.color-utility-surface'),
'border-color': token-as-var('ref.color.button.color-utility-body'),
'background-color': token-as-var('ref.color.common.color-utility-surface'),
'border-color': token-as-var('ref.color.common.color-utility-body'),
),
),
'transition': (
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Quick setup with Sass:
}
.your-button {
color: theme.token-as-var('sys.color.primary');
color: theme.token-as-var('ref.color.common.color-theme-accent');
}
```
Expand Down
14 changes: 7 additions & 7 deletions packages/theme/src/sass/__tests__/sass-interface.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('Exports', () => {
`
@use 'v_lib' as l
body
color: #{l.token-as-var('ref.color.button.color-theme-accent')}
color: #{l.token-as-var('ref.color.common.color-theme-accent')}
`,
'indented',
),
Expand Down Expand Up @@ -336,12 +336,12 @@ describe('Utils', () => {
@use 'v_util' as util;
$src: (
'ref.color.button.color-theme-accent': '--scp',
'ref.color.common.color-theme-accent': '--scp',
'sys.color.secondary': '--scs',
);
$values: (
'ref.color.button.color-theme-accent': red,
'ref.color.common.color-theme-accent': red,
'sys.color.secondary': blue
);
Expand All @@ -363,12 +363,12 @@ describe('Utils', () => {
@use 'v_util' as util;
$src: (
'ref.color.button.color-theme-accent': '--scp',
'ref.color.common.color-theme-accent': '--scp',
'sys.color.secondary': '--scs',
);
$values: (
'ref.color.button.color-theme-accent': red,
'ref.color.common.color-theme-accent': red,
'sys.color.secondary': blue,
'sys.color.tertiary': green
);
Expand All @@ -386,7 +386,7 @@ describe('Utils', () => {
@use 'v_util' as util;
$src: (
'ref.color.button.color-theme-accent': '--scp',
'ref.color.common.color-theme-accent': '--scp',
'sys.color.secondary': '--scs',
);
Expand All @@ -411,7 +411,7 @@ describe('Utils', () => {
@use 'v_util' as util;
$src: (
'ref.color.button.color-theme-accent': '--scp',
'ref.color.common.color-theme-accent': '--scp',
'sys.color.secondary': '--scs',
);
Expand Down
12 changes: 2 additions & 10 deletions packages/theme/src/sass/lib.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $tokens-compiled: util.give-names-to-tokens($tokens-compiled, $vars-prefix);
(
ref: (
'color': (
'button': (
'common': (
'color-utility-surface': #dde0e1,
'color-base-on-accent': #ffffff,
'color-base-content-tertiary': #f5f7f8,
Expand All @@ -58,15 +58,11 @@ $tokens-compiled: util.give-names-to-tokens($tokens-compiled, $vars-prefix);
),
sys: (
'color': (
'background': #f5f7f8,
'content-tertiary': #75787b,
'content-secondary': #53565a,
'content-primary': #2d2926,
'content-quaternary': #a3a4a8,
'on-disabled': #a3a4a8,
'primary': #d0021b,
'content-on-background-inverted': #ffffff,
'background-hover': #eceff0,
'primary-pressed': #bb0218,
'primary-hover': #c6021a,
'button': (
Expand All @@ -90,7 +86,7 @@ $tokens-compiled: util.give-names-to-tokens($tokens-compiled, $vars-prefix);
'action': (
'background-color': #f5f7f8,
'background-color-hover': #eceff0,
'background-color-pressed': token-as-var('ref.color.button.color-utility-surface'),
'background-color-pressed': token-as-var('ref.color.common.color-utility-surface'),

'text-color': #2d2926,
'text-color-hover': '',
Expand All @@ -117,10 +113,6 @@ $tokens-compiled: util.give-names-to-tokens($tokens-compiled, $vars-prefix);
'debug-background': #ffeef4,
'debug-background-hover': #f3d3de,
),
'border': (
'primary': #dde0e1,
'secondary': #eceff0,
)
),
'border': (
'button': (
Expand Down
10 changes: 1 addition & 9 deletions packages/theme/src/sass/tokens.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$tokens: (
'ref': (
'color': (
'button': (
'common': (
'color-utility-surface': null,
'color-base-on-accent': null,
'color-base-content-tertiary': null,
Expand All @@ -25,15 +25,11 @@ $tokens: (
),
'sys': (
'color': (
'background': null,
'content-tertiary': null,
'content-secondary': null,
'content-primary': null,
'content-quaternary': null,
'on-disabled': null,
'primary': null,
'content-on-background-inverted': null,
'background-hover': null,
'primary-pressed': null,
'primary-hover': null,
'button': (
Expand Down Expand Up @@ -83,10 +79,6 @@ $tokens: (
'debug-background': null,
'debug-background-hover': null,
),
'border': (
'primary': null,
'secondary': null,
)
),
'border': (
'button': (
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/components/Accordion/SAccordionItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ if (groupApi) {
.s-accordion-item {
@apply flex flex-col;
border: 1px solid theme.token-as-var('sys.color.border.secondary');
border: 1px solid theme.token-as-var('ref.color.common.color-base-content-secondary');
$component: &;
&_expanded {
Expand All @@ -134,7 +134,7 @@ if (groupApi) {
}
#{$component}__trigger {
background-color: theme.token-as-var('sys.color.background');
background-color: theme.token-as-var('ref.color.common.color-base-on-accent');
}
#{$component}__body-wrapper {
Expand Down
Loading

0 comments on commit 490a243

Please sign in to comment.