@teseor/css 1.15.7 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compiled.css +1 -1
- package/dist/index.css +51 -52
- package/package.json +1 -1
- package/src/base/docs.html +1 -1
- package/src/base/root.scss +1 -1
- package/src/base/typography/typography.scss +6 -6
- package/src/components/actions/button/api.json +1 -1
- package/src/components/actions/button/index.scss +1 -1
- package/src/components/content/divider/docs.html +1 -1
- package/src/components/content/scroll-area/docs.html +2 -2
- package/src/components/data-display/avatar/index.scss +1 -1
- package/src/components/data-display/badge/api.json +1 -1
- package/src/components/data-display/badge/index.scss +1 -1
- package/src/components/data-display/data-list/index.scss +1 -1
- package/src/components/data-display/stat/api.json +3 -3
- package/src/components/data-display/stat/index.scss +5 -5
- package/src/components/data-display/status/docs.html +2 -2
- package/src/components/data-display/table/index.scss +1 -1
- package/src/components/data-display/tag/index.scss +1 -1
- package/src/components/disclosure/disclosure/index.scss +1 -1
- package/src/components/feedback/alert/index.scss +1 -1
- package/src/components/feedback/skeleton/docs.html +2 -2
- package/src/components/feedback/toast/docs.html +12 -12
- package/src/components/feedback/toast/index.scss +2 -2
- package/src/components/forms/checkbox/docs.html +1 -1
- package/src/components/forms/checkbox-group/api.json +1 -1
- package/src/components/forms/checkbox-group/index.scss +2 -2
- package/src/components/forms/fieldset/api.json +1 -1
- package/src/components/forms/fieldset/index.scss +2 -2
- package/src/components/forms/form-error/index.scss +1 -1
- package/src/components/forms/form-helper/index.scss +1 -1
- package/src/components/forms/label/index.scss +3 -3
- package/src/components/forms/radio/docs.html +5 -5
- package/src/components/forms/radio-group/api.json +1 -1
- package/src/components/forms/radio-group/index.scss +2 -2
- package/src/components/forms/toggle/docs.html +3 -3
- package/src/components/navigation/dropdown-menu/api.json +1 -1
- package/src/components/navigation/dropdown-menu/docs.html +1 -1
- package/src/components/navigation/dropdown-menu/index.scss +1 -1
- package/src/components/navigation/menu/index.scss +2 -2
- package/src/components/navigation/nav/api.json +1 -1
- package/src/components/navigation/nav/index.scss +1 -1
- package/src/components/navigation/tabs/index.scss +1 -1
- package/src/components/overlays/dialog/docs.html +6 -6
- package/src/components/overlays/dialog/index.scss +1 -1
- package/src/components/overlays/drawer/docs.html +17 -17
- package/src/components/overlays/drawer/index.scss +2 -2
- package/src/components/overlays/modal/api.json +1 -1
- package/src/components/overlays/modal/docs.html +12 -12
- package/src/components/overlays/modal/index.scss +1 -1
- package/src/components/overlays/overlay/api.json +1 -1
- package/src/components/overlays/overlay/docs.html +8 -8
- package/src/components/overlays/overlay/index.scss +1 -1
- package/src/components/overlays/popover/api.json +1 -1
- package/src/components/overlays/popover/docs.html +6 -6
- package/src/components/overlays/popover/index.scss +2 -2
- package/src/components/overlays/tooltip/api.json +1 -1
- package/src/components/overlays/tooltip/docs.html +10 -10
- package/src/components/overlays/tooltip/index.scss +1 -1
- package/src/components/typography/blockquote/api.json +1 -1
- package/src/components/typography/blockquote/index.scss +2 -2
- package/src/components/typography/code/index.scss +1 -1
- package/src/components/typography/code-block/api.json +1 -1
- package/src/components/typography/code-block/index.scss +1 -1
- package/src/components/typography/heading/api.json +9 -9
- package/src/components/typography/heading/index.scss +9 -9
- package/src/components/typography/list/api.json +1 -1
- package/src/components/typography/list/index.scss +1 -1
- package/src/config/guides/accessibility.docs.html +1 -1
- package/src/config/guides/getting-started.docs.html +1 -1
- package/src/config/guides/theming.docs.html +53 -20
- package/src/config/guides/token-architecture.docs.html +87 -0
- package/src/config/tokens/_variables.scss +60 -53
- package/src/config/tokens/colors/index.scss +18 -0
- package/src/config/tokens/docs.html +10 -21
- package/src/config/tokens/index.scss +0 -1
- package/src/config/tokens/radius.scss +5 -4
- package/src/config/tokens/shadows.scss +4 -3
- package/src/config/tokens/typography.scss +47 -47
- package/src/config/tokens/zindex.scss +10 -10
- package/src/debug/docs.html +3 -3
- package/src/debug/index.scss +7 -8
- package/src/layout/aspect-ratio/docs.html +7 -7
- package/src/layout/center/docs.html +3 -3
- package/src/layout/footer/api.json +1 -1
- package/src/layout/footer/index.scss +3 -3
- package/src/layout/main/docs.html +3 -3
- package/src/layout/nav-rail/api.json +1 -1
- package/src/layout/nav-rail/docs.html +1 -1
- package/src/layout/nav-rail/index.scss +1 -1
- package/src/layout/page-header/index.scss +1 -1
- package/src/layout/sidebar/docs.html +3 -3
- package/src/layout/sidebar/index.scss +1 -1
- package/src/layout/sidebar-nav/api.json +2 -2
- package/src/layout/sidebar-nav/docs.html +6 -6
- package/src/layout/sidebar-nav/index.scss +4 -4
- package/src/layout/topbar/api.json +1 -1
- package/src/layout/topbar/index.scss +1 -1
- package/src/utilities/position/api.json +6 -0
- package/src/utilities/position/docs.html +29 -0
- package/src/utilities/position/position.scss +74 -0
- package/src/utilities/scroll-animation/docs.html +1 -1
- package/src/utilities/scroll-animation/index.scss +1 -1
- package/src/utilities/scroll-snap/docs.html +33 -33
- package/src/utilities/text/docs.html +5 -5
- package/src/utilities/text/text.scss +15 -15
- package/src/config/tokens/semantic-spacing.scss +0 -12
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
// @desc Font size
|
|
9
9
|
--_font-size: var(--ui-heading-font-size, var(--ui-font-size-xl, #{t.$font-size-xl}));
|
|
10
10
|
// @desc Line height
|
|
11
|
-
--_line-height: var(--ui-heading-line-height, var(--ui-
|
|
11
|
+
--_line-height: var(--ui-heading-line-height, var(--ui-line-height-xl, #{t.$line-height-xl}));
|
|
12
12
|
// @desc Weight
|
|
13
|
-
--_weight: var(--ui-heading-weight, var(--ui-weight-bold, #{t.$weight-bold}));
|
|
13
|
+
--_weight: var(--ui-heading-weight, var(--ui-font-weight-bold, #{t.$font-weight-bold}));
|
|
14
14
|
// @desc Text color
|
|
15
15
|
--_color: var(--ui-heading-color, var(--ui-color-text, #{t.$color-text}));
|
|
16
16
|
}
|
|
@@ -20,49 +20,49 @@
|
|
|
20
20
|
// @desc Font size 4xl
|
|
21
21
|
--_font-size: var(--ui-heading-font-size-4xl, var(--ui-font-size-4xl, #{t.$font-size-4xl}));
|
|
22
22
|
// @desc Line height 4xl
|
|
23
|
-
--_line-height: var(--ui-heading-line-height-4xl, var(--ui-
|
|
23
|
+
--_line-height: var(--ui-heading-line-height-4xl, var(--ui-line-height-4xl, #{t.$line-height-4xl}));
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.heading--3xl {
|
|
27
27
|
// @desc Font size 3xl
|
|
28
28
|
--_font-size: var(--ui-heading-font-size-3xl, var(--ui-font-size-3xl, #{t.$font-size-3xl}));
|
|
29
29
|
// @desc Line height 3xl
|
|
30
|
-
--_line-height: var(--ui-heading-line-height-3xl, var(--ui-
|
|
30
|
+
--_line-height: var(--ui-heading-line-height-3xl, var(--ui-line-height-3xl, #{t.$line-height-3xl}));
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.heading--2xl {
|
|
34
34
|
// @desc Font size 2xl
|
|
35
35
|
--_font-size: var(--ui-heading-font-size-2xl, var(--ui-font-size-2xl, #{t.$font-size-2xl}));
|
|
36
36
|
// @desc Line height 2xl
|
|
37
|
-
--_line-height: var(--ui-heading-line-height-2xl, var(--ui-
|
|
37
|
+
--_line-height: var(--ui-heading-line-height-2xl, var(--ui-line-height-2xl, #{t.$line-height-2xl}));
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.heading--xl {
|
|
41
41
|
// @desc Font size at extra-large size
|
|
42
42
|
--_font-size: var(--ui-heading-font-size-xl, var(--ui-font-size-xl, #{t.$font-size-xl}));
|
|
43
43
|
// @desc Line height at extra-large size
|
|
44
|
-
--_line-height: var(--ui-heading-line-height-xl, var(--ui-
|
|
44
|
+
--_line-height: var(--ui-heading-line-height-xl, var(--ui-line-height-xl, #{t.$line-height-xl}));
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.heading--lg {
|
|
48
48
|
// @desc Font size at large size
|
|
49
49
|
--_font-size: var(--ui-heading-font-size-lg, var(--ui-font-size-lg, #{t.$font-size-lg}));
|
|
50
50
|
// @desc Line height at large size
|
|
51
|
-
--_line-height: var(--ui-heading-line-height-lg, var(--ui-
|
|
51
|
+
--_line-height: var(--ui-heading-line-height-lg, var(--ui-line-height-lg, #{t.$line-height-lg}));
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.heading--md {
|
|
55
55
|
// @desc Font size at medium size
|
|
56
56
|
--_font-size: var(--ui-heading-font-size-md, var(--ui-font-size-md, #{t.$font-size-md}));
|
|
57
57
|
// @desc Line height at medium size
|
|
58
|
-
--_line-height: var(--ui-heading-line-height-md, var(--ui-
|
|
58
|
+
--_line-height: var(--ui-heading-line-height-md, var(--ui-line-height-tight-md, #{t.$line-height-tight-md}));
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.heading--sm {
|
|
62
62
|
// @desc Font size at small size
|
|
63
63
|
--_font-size: var(--ui-heading-font-size-sm, var(--ui-font-size-sm, #{t.$font-size-sm}));
|
|
64
64
|
// @desc Line height at small size
|
|
65
|
-
--_line-height: var(--ui-heading-line-height-sm, var(--ui-
|
|
65
|
+
--_line-height: var(--ui-heading-line-height-sm, var(--ui-line-height-tight-sm, #{t.$line-height-tight-sm}));
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
// @desc Indent
|
|
14
14
|
--_indent: var(--ui-list-indent, var(--ui-space-3, #{t.$space-3}));
|
|
15
15
|
// @desc Line height
|
|
16
|
-
--_line-height: var(--ui-list-line-height, var(--ui-
|
|
16
|
+
--_line-height: var(--ui-list-line-height, var(--ui-line-height-md, #{t.$line-height-md}));
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
// @modifier spacing
|
|
@@ -40,6 +40,6 @@ import '@teseor/css/dist/index.css';
|
|
|
40
40
|
|
|
41
41
|
<!-- @customize -->
|
|
42
42
|
<!-- Override design tokens with CSS custom properties. No build step required. -->
|
|
43
|
-
<div class="theme
|
|
43
|
+
<div class="demo-theme" style="--ui-color-primary: oklch(55% 0.22 290)">
|
|
44
44
|
<button class="ui-button">{{ t('purple_brand', 'Purple brand') }}</button>
|
|
45
45
|
</div>
|
|
@@ -6,64 +6,97 @@ weight: 2
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
<!-- @brand_colors -->
|
|
9
|
-
<!--
|
|
10
|
-
<div class="theme
|
|
9
|
+
<!-- Override --ui-color-primary to change the entire color palette. All shades (light, dark, subtle, hover) derive automatically via color-mix(). -->
|
|
10
|
+
<div class="demo-theme">
|
|
11
11
|
<button class="ui-button">{{ t('primary', 'Primary') }}</button>
|
|
12
12
|
<button class="ui-button ui-button--secondary">{{ t('secondary', 'Secondary') }}</button>
|
|
13
13
|
<button class="ui-button ui-button--danger">{{ t('danger', 'Danger') }}</button>
|
|
14
14
|
</div>
|
|
15
|
-
<div class="theme-
|
|
15
|
+
<div class="demo-theme demo-theme--purple">
|
|
16
16
|
<button class="ui-button">{{ t('primary', 'Primary') }}</button>
|
|
17
17
|
<button class="ui-button ui-button--secondary">{{ t('secondary', 'Secondary') }}</button>
|
|
18
18
|
<button class="ui-button ui-button--danger">{{ t('danger', 'Danger') }}</button>
|
|
19
19
|
</div>
|
|
20
|
-
<div class="theme-
|
|
20
|
+
<div class="demo-theme demo-theme--teal">
|
|
21
21
|
<button class="ui-button">{{ t('primary', 'Primary') }}</button>
|
|
22
22
|
<button class="ui-button ui-button--secondary">{{ t('secondary', 'Secondary') }}</button>
|
|
23
23
|
<button class="ui-button ui-button--danger">{{ t('danger', 'Danger') }}</button>
|
|
24
24
|
</div>
|
|
25
|
-
<div class="theme-
|
|
25
|
+
<div class="demo-theme demo-theme--orange">
|
|
26
26
|
<button class="ui-button">{{ t('primary', 'Primary') }}</button>
|
|
27
27
|
<button class="ui-button ui-button--secondary">{{ t('secondary', 'Secondary') }}</button>
|
|
28
28
|
<button class="ui-button ui-button--danger">{{ t('danger', 'Danger') }}</button>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
|
+
<!-- @radius_theming -->
|
|
32
|
+
<!-- Override --ui-radius-base to control all corner radii at once. Set to 0 for sharp corners or increase for a softer look. sm/md/lg derive automatically via calc(). -->
|
|
33
|
+
<div class="demo-theme demo-theme--sharp">
|
|
34
|
+
<button class="ui-button">{{ t('sharp_button', 'Sharp') }}</button>
|
|
35
|
+
<div class="ui-card">
|
|
36
|
+
<p>{{ t('sharp_radius', 'radius-base: 0') }}</p>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="demo-theme">
|
|
40
|
+
<button class="ui-button">{{ t('default_button', 'Default') }}</button>
|
|
41
|
+
<div class="ui-card">
|
|
42
|
+
<p>{{ t('default_radius', 'radius-base: 0.5rem') }}</p>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="demo-theme demo-theme--round">
|
|
46
|
+
<button class="ui-button">{{ t('round_button', 'Round') }}</button>
|
|
47
|
+
<div class="ui-card">
|
|
48
|
+
<p>{{ t('round_radius', 'radius-base: 1rem') }}</p>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
31
52
|
<!-- @dark_mode -->
|
|
32
53
|
<!-- Dark mode uses the CSS light-dark() function. Tokens resolve automatically based on color-scheme. Override with data-theme attribute. -->
|
|
33
|
-
<div class="theme
|
|
54
|
+
<div class="demo-theme">
|
|
34
55
|
<div class="ui-card">
|
|
35
56
|
<p>{{ t('follows_os_color_scheme', 'Follows OS color scheme') }}</p>
|
|
36
57
|
</div>
|
|
37
58
|
</div>
|
|
38
|
-
<div class="theme
|
|
59
|
+
<div class="demo-theme" data-theme="light">
|
|
39
60
|
<div class="ui-card">
|
|
40
61
|
<p>{{ t('always_light', 'Always light') }}</p>
|
|
41
62
|
</div>
|
|
42
63
|
</div>
|
|
43
|
-
<div class="theme
|
|
64
|
+
<div class="demo-theme" data-theme="dark">
|
|
44
65
|
<div class="ui-card">
|
|
45
66
|
<p>{{ t('always_dark', 'Always dark') }}</p>
|
|
46
67
|
</div>
|
|
47
68
|
</div>
|
|
48
69
|
|
|
70
|
+
<!-- @full_theme_examples -->
|
|
71
|
+
<!-- Complete theme customization using just 2-3 root tokens. -->
|
|
72
|
+
<div class="demo-theme demo-theme--corporate">
|
|
73
|
+
<button class="ui-button">{{ t('action', 'Action') }}</button>
|
|
74
|
+
<div class="ui-card">
|
|
75
|
+
<p>{{ t('corporate_theme', 'Corporate: teal, sharp corners, system font') }}</p>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="demo-theme demo-theme--playful">
|
|
79
|
+
<button class="ui-button">{{ t('action', 'Action') }}</button>
|
|
80
|
+
<div class="ui-card">
|
|
81
|
+
<p>{{ t('playful_theme', 'Playful: orange, round corners') }}</p>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="demo-theme demo-theme--minimal">
|
|
85
|
+
<button class="ui-button">{{ t('action', 'Action') }}</button>
|
|
86
|
+
<div class="ui-card">
|
|
87
|
+
<p>{{ t('minimal_theme', 'Minimal: neutral palette, no radius') }}</p>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
49
91
|
<!-- @component_overrides -->
|
|
50
|
-
<!-- Override specific component tokens -->
|
|
51
|
-
<div class="theme
|
|
92
|
+
<!-- Override specific component tokens for fine-grained control. -->
|
|
93
|
+
<div class="demo-theme demo-buttons">
|
|
52
94
|
<button class="ui-button ui-button--sm">{{ t('small', 'Small') }}</button>
|
|
53
95
|
<button class="ui-button">{{ t('default', 'Default') }}</button>
|
|
54
96
|
<button class="ui-button ui-button--lg">{{ t('large', 'Large') }}</button>
|
|
55
97
|
</div>
|
|
56
|
-
<div class="theme
|
|
98
|
+
<div class="demo-theme demo-cards">
|
|
57
99
|
<div class="ui-card">
|
|
58
100
|
<p>{{ t('card_with_custom_padding', 'Card with custom padding') }}</p>
|
|
59
101
|
</div>
|
|
60
102
|
</div>
|
|
61
|
-
|
|
62
|
-
<!-- @full_theme_example -->
|
|
63
|
-
<!-- Complete theme customization -->
|
|
64
|
-
<div class="theme-demo theme-corporate">
|
|
65
|
-
<button class="ui-button">{{ t('action', 'Action') }}</button>
|
|
66
|
-
<div class="ui-card">
|
|
67
|
-
<p>{{ t('corporate_theme_with_teal_accent_and_sharp_corners', 'Corporate theme with teal accent and sharp corners') }}</p>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Token Architecture
|
|
3
|
+
description: Design token taxonomy — tiers, naming dictionary, theme roots, and derivation patterns
|
|
4
|
+
skipValidation: true
|
|
5
|
+
weight: 3
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- @token_tiers -->
|
|
9
|
+
<!-- Tokens are organized into four tiers. Theme roots feed primitives, primitives feed semantic tokens, and semantic tokens feed component tokens. -->
|
|
10
|
+
<pre>
|
|
11
|
+
{{ t('tier_diagram',
|
|
12
|
+
'Theme Roots Primitives Semantic Component
|
|
13
|
+
--ui-color-primary --ui-color-* --ui-color-text --ui-button-bg
|
|
14
|
+
--ui-unit --ui-space-* --ui-color-bg --ui-input-height
|
|
15
|
+
--ui-radius-base --ui-row-* --ui-color-border --ui-card-radius
|
|
16
|
+
--ui-font-sans --ui-font-size-* --ui-opacity-* --ui-alert-bg
|
|
17
|
+
--ui-radius-* --ui-overlay-*') }}
|
|
18
|
+
</pre>
|
|
19
|
+
|
|
20
|
+
<!-- @naming_dictionary -->
|
|
21
|
+
<!-- Every --ui-* token must use a prefix from this dictionary. The lint enforces it. -->
|
|
22
|
+
<table class="ui-table">
|
|
23
|
+
<thead>
|
|
24
|
+
<tr>
|
|
25
|
+
<th>{{ t('col_prefix', 'Prefix') }}</th>
|
|
26
|
+
<th>{{ t('col_scales', 'Scales') }}</th>
|
|
27
|
+
<th>{{ t('col_example', 'Example') }}</th>
|
|
28
|
+
</tr>
|
|
29
|
+
</thead>
|
|
30
|
+
<tbody>
|
|
31
|
+
<tr><td>unit</td><td>{{ t('singleton', 'singleton') }}</td><td>--ui-unit</td></tr>
|
|
32
|
+
<tr><td>row</td><td>1–6</td><td>--ui-row-2</td></tr>
|
|
33
|
+
<tr><td>space</td><td>px, quarter, half, 0–8</td><td>--ui-space-2</td></tr>
|
|
34
|
+
<tr><td>color</td><td>{{ t('open_ended', 'open-ended') }}</td><td>--ui-color-primary</td></tr>
|
|
35
|
+
<tr><td>font</td><td>sans, mono</td><td>--ui-font-sans</td></tr>
|
|
36
|
+
<tr><td>font-size</td><td>xs–4xl</td><td>--ui-font-size-lg</td></tr>
|
|
37
|
+
<tr><td>font-weight</td><td>normal, medium, semibold, bold</td><td>--ui-font-weight-bold</td></tr>
|
|
38
|
+
<tr><td>line-height</td><td>{{ t('open_ended', 'open-ended') }}</td><td>--ui-line-height-md</td></tr>
|
|
39
|
+
<tr><td>letter-spacing</td><td>display, body, caps</td><td>--ui-letter-spacing-caps</td></tr>
|
|
40
|
+
<tr><td>radius</td><td>base, sm, md, lg, full</td><td>--ui-radius-md</td></tr>
|
|
41
|
+
<tr><td>border-width</td><td>sm, md, lg</td><td>--ui-border-width-sm</td></tr>
|
|
42
|
+
<tr><td>shadow</td><td>sm, md, lg</td><td>--ui-shadow-lg</td></tr>
|
|
43
|
+
<tr><td>z-index</td><td>base–debug (10 levels)</td><td>--ui-z-index-modal</td></tr>
|
|
44
|
+
<tr><td>duration</td><td>instant–slower</td><td>--ui-duration-fast</td></tr>
|
|
45
|
+
<tr><td>ease</td><td>default, in, out, in-out</td><td>--ui-ease-out</td></tr>
|
|
46
|
+
<tr><td>opacity</td><td>disabled, loading</td><td>--ui-opacity-disabled</td></tr>
|
|
47
|
+
<tr><td>overlay</td><td>bg, bg-light, bg-blur, bg-subtle</td><td>--ui-overlay-bg</td></tr>
|
|
48
|
+
<tr><td>heading</td><td>{{ t('open_ended', 'open-ended') }}</td><td>--ui-heading-1-size</td></tr>
|
|
49
|
+
<tr><td>body / body-sm</td><td>{{ t('open_ended', 'open-ended') }}</td><td>--ui-body-weight</td></tr>
|
|
50
|
+
<tr><td>caption / lead / eyebrow</td><td>{{ t('open_ended', 'open-ended') }}</td><td>--ui-caption-size</td></tr>
|
|
51
|
+
<tr><td>input</td><td>{{ t('open_ended', 'open-ended') }}</td><td>--ui-input-height</td></tr>
|
|
52
|
+
</tbody>
|
|
53
|
+
</table>
|
|
54
|
+
|
|
55
|
+
<!-- @theme_root_tokens -->
|
|
56
|
+
<!-- Theme roots are the small set of tokens you override to create a brand theme. Everything else derives from them. -->
|
|
57
|
+
<pre>
|
|
58
|
+
{{ t('theme_roots_code',
|
|
59
|
+
':root {
|
|
60
|
+
--ui-color-primary: oklch(0.6 0.2 260); /* brand hue */
|
|
61
|
+
--ui-color-neutral: oklch(0.5 0.01 260); /* neutral tint */
|
|
62
|
+
--ui-unit: 8px; /* grid base */
|
|
63
|
+
--ui-radius-base: 0.5rem; /* corner radius */
|
|
64
|
+
--ui-font-sans: system-ui, sans-serif; /* body typeface */
|
|
65
|
+
--ui-font-mono: monospace; /* code typeface */
|
|
66
|
+
}') }}
|
|
67
|
+
</pre>
|
|
68
|
+
|
|
69
|
+
<!-- @derivation -->
|
|
70
|
+
<!-- Tokens use color-mix() and calc() to derive values from roots. Change one root and dozens of tokens update automatically. -->
|
|
71
|
+
<pre>
|
|
72
|
+
{{ t('derivation_code',
|
|
73
|
+
'/* color-mix(): shade derivation from --ui-color-primary */
|
|
74
|
+
--ui-color-primary-light: color-mix(in oklch, var(--ui-color-primary), white 40%);
|
|
75
|
+
--ui-color-primary-dark: color-mix(in oklch, var(--ui-color-primary), black 30%);
|
|
76
|
+
--ui-color-primary-subtle: color-mix(in oklch, var(--ui-color-primary), transparent 85%);
|
|
77
|
+
|
|
78
|
+
/* calc(): radius derivation from --ui-radius-base */
|
|
79
|
+
--ui-radius-sm: calc(var(--ui-radius-base) * 0.5);
|
|
80
|
+
--ui-radius-md: var(--ui-radius-base);
|
|
81
|
+
--ui-radius-lg: calc(var(--ui-radius-base) * 1.5);
|
|
82
|
+
--ui-radius-full: 9999px;
|
|
83
|
+
|
|
84
|
+
/* calc(): spacing from --ui-unit */
|
|
85
|
+
--ui-space-1: var(--ui-unit); /* 8px */
|
|
86
|
+
--ui-space-2: calc(var(--ui-unit) * 2); /* 16px */') }}
|
|
87
|
+
</pre>
|
|
@@ -21,9 +21,6 @@ $row-6: $row * 6;
|
|
|
21
21
|
// 2. Colors — OKLCH for perceptual uniformity
|
|
22
22
|
// ==========================================================================
|
|
23
23
|
|
|
24
|
-
// Theming hue — used in HSL fallbacks for shadows, debug overlays
|
|
25
|
-
$hue-primary: 220;
|
|
26
|
-
|
|
27
24
|
// Base palette
|
|
28
25
|
$color-primary: oklch(55% 0.22 250);
|
|
29
26
|
$color-success: oklch(60% 0.18 145);
|
|
@@ -31,6 +28,30 @@ $color-warning: oklch(75% 0.18 70);
|
|
|
31
28
|
$color-danger: oklch(60% 0.22 25);
|
|
32
29
|
$color-neutral: oklch(50% 0.02 250);
|
|
33
30
|
|
|
31
|
+
// Primary shades (CSS uses color-mix)
|
|
32
|
+
$color-primary-light: oklch(75% 0.15 250);
|
|
33
|
+
$color-primary-dark: oklch(40% 0.18 250);
|
|
34
|
+
$color-primary-subtle: oklch(95% 0.03 250);
|
|
35
|
+
$color-primary-hover: oklch(48% 0.20 250);
|
|
36
|
+
|
|
37
|
+
// Success shades (CSS uses color-mix)
|
|
38
|
+
$color-success-light: oklch(80% 0.12 145);
|
|
39
|
+
$color-success-dark: oklch(45% 0.15 145);
|
|
40
|
+
$color-success-subtle: oklch(95% 0.03 145);
|
|
41
|
+
$color-success-hover: oklch(52% 0.16 145);
|
|
42
|
+
|
|
43
|
+
// Warning shades (CSS uses color-mix)
|
|
44
|
+
$color-warning-light: oklch(88% 0.12 70);
|
|
45
|
+
$color-warning-dark: oklch(58% 0.15 70);
|
|
46
|
+
$color-warning-subtle: oklch(96% 0.03 70);
|
|
47
|
+
$color-warning-hover: oklch(66% 0.16 70);
|
|
48
|
+
|
|
49
|
+
// Danger shades (CSS uses color-mix)
|
|
50
|
+
$color-danger-light: oklch(80% 0.14 25);
|
|
51
|
+
$color-danger-dark: oklch(45% 0.18 25);
|
|
52
|
+
$color-danger-subtle: oklch(95% 0.03 25);
|
|
53
|
+
$color-danger-hover: oklch(52% 0.20 25);
|
|
54
|
+
|
|
34
55
|
// Neutral scale — HSL approximation of color-mix(in oklch, ...) results.
|
|
35
56
|
// CSS tokens use oklch color-mix(); these HSL values are static SCSS
|
|
36
57
|
// fallbacks for when custom properties are unavailable.
|
|
@@ -45,10 +66,6 @@ $color-neutral-700: hsl(220 10% 25%);
|
|
|
45
66
|
$color-neutral-800: hsl(220 10% 15%);
|
|
46
67
|
$color-neutral-900: hsl(220 10% 10%);
|
|
47
68
|
|
|
48
|
-
// Primary shades (CSS uses color-mix)
|
|
49
|
-
$color-primary-light: oklch(75% 0.15 250);
|
|
50
|
-
$color-primary-dark: oklch(40% 0.18 250);
|
|
51
|
-
|
|
52
69
|
// ==========================================================================
|
|
53
70
|
// 3. Spacing — derived from $unit
|
|
54
71
|
// ==========================================================================
|
|
@@ -95,43 +112,44 @@ $font-size-3xl: 2rem; // 32px
|
|
|
95
112
|
$font-size-4xl: 2.5rem; // 40px
|
|
96
113
|
|
|
97
114
|
// Tight line heights (compact UI elements)
|
|
98
|
-
$
|
|
99
|
-
$
|
|
100
|
-
$
|
|
101
|
-
$
|
|
115
|
+
$line-height-tight-xs: $row;
|
|
116
|
+
$line-height-tight-sm: $row;
|
|
117
|
+
$line-height-tight-md: $unit * 3;
|
|
118
|
+
$line-height-tight-lg: $unit * 3;
|
|
102
119
|
|
|
103
120
|
// Normal line heights (body text)
|
|
104
|
-
$
|
|
105
|
-
$
|
|
106
|
-
$
|
|
107
|
-
$
|
|
108
|
-
$
|
|
109
|
-
$
|
|
110
|
-
$
|
|
111
|
-
$
|
|
121
|
+
$line-height-xs: $row;
|
|
122
|
+
$line-height-sm: $unit * 3;
|
|
123
|
+
$line-height-md: $unit * 3;
|
|
124
|
+
$line-height-lg: $row-2;
|
|
125
|
+
$line-height-xl: $row-2;
|
|
126
|
+
$line-height-2xl: $row-2;
|
|
127
|
+
$line-height-3xl: $unit * 5;
|
|
128
|
+
$line-height-4xl: $unit * 6;
|
|
112
129
|
|
|
113
130
|
// Font weights
|
|
114
|
-
$weight-normal: 400;
|
|
115
|
-
$weight-medium: 500;
|
|
116
|
-
$weight-semibold: 600;
|
|
117
|
-
$weight-bold: 700;
|
|
131
|
+
$font-weight-normal: 400;
|
|
132
|
+
$font-weight-medium: 500;
|
|
133
|
+
$font-weight-semibold: 600;
|
|
134
|
+
$font-weight-bold: 700;
|
|
118
135
|
|
|
119
136
|
// Letter spacing
|
|
120
|
-
$
|
|
121
|
-
$
|
|
122
|
-
$
|
|
123
|
-
$
|
|
137
|
+
$letter-spacing-display: -0.02em;
|
|
138
|
+
$letter-spacing-body: 0;
|
|
139
|
+
$letter-spacing-wide: 0.05em;
|
|
140
|
+
$letter-spacing-caps: 0.08em;
|
|
124
141
|
|
|
125
142
|
// Relative font sizes (for sub-elements sized relative to parent)
|
|
126
143
|
$font-size-relative-xs: 0.6em;
|
|
127
144
|
$font-size-relative-sm: 0.75em;
|
|
128
145
|
|
|
129
146
|
// ==========================================================================
|
|
130
|
-
// 5. Radius — derived from $unit
|
|
147
|
+
// 5. Radius — derived from $radius-base (which defaults to $unit)
|
|
131
148
|
// ==========================================================================
|
|
132
|
-
$radius-
|
|
133
|
-
$radius-
|
|
134
|
-
$radius-
|
|
149
|
+
$radius-base: $unit; // 8px — theme knob
|
|
150
|
+
$radius-sm: $radius-base * 0.5; // 4px
|
|
151
|
+
$radius-md: $radius-base; // 8px
|
|
152
|
+
$radius-lg: $radius-base * 2; // 16px
|
|
135
153
|
$radius-full: 9999px;
|
|
136
154
|
|
|
137
155
|
// ==========================================================================
|
|
@@ -143,7 +161,7 @@ $border-width-lg: $unit * 0.5; // 4px
|
|
|
143
161
|
$focus-ring-offset: -$border-width-md;
|
|
144
162
|
|
|
145
163
|
// ==========================================================================
|
|
146
|
-
// 7. Shadows —
|
|
164
|
+
// 7. Shadows — neutral-tinted
|
|
147
165
|
// ==========================================================================
|
|
148
166
|
$shadow-sm: 0 1px 2px hsl(220 10% 20% / 0.05);
|
|
149
167
|
$shadow-md: 0 4px 6px hsl(220 10% 20% / 0.1);
|
|
@@ -152,16 +170,16 @@ $shadow-lg: 0 10px 15px hsl(220 10% 20% / 0.15);
|
|
|
152
170
|
// ==========================================================================
|
|
153
171
|
// 8. Z-index scale
|
|
154
172
|
// ==========================================================================
|
|
155
|
-
$z-base: 0;
|
|
156
|
-
$z-sticky: 100;
|
|
157
|
-
$z-dropdown: 200;
|
|
158
|
-
$z-overlay: 300;
|
|
159
|
-
$z-modal: 400;
|
|
160
|
-
$z-popover: 500;
|
|
161
|
-
$z-tooltip: 600;
|
|
162
|
-
$z-toast: 700;
|
|
163
|
-
$z-drawer: 800;
|
|
164
|
-
$z-debug: 9999;
|
|
173
|
+
$z-index-base: 0;
|
|
174
|
+
$z-index-sticky: 100;
|
|
175
|
+
$z-index-dropdown: 200;
|
|
176
|
+
$z-index-overlay: 300;
|
|
177
|
+
$z-index-modal: 400;
|
|
178
|
+
$z-index-popover: 500;
|
|
179
|
+
$z-index-tooltip: 600;
|
|
180
|
+
$z-index-toast: 700;
|
|
181
|
+
$z-index-drawer: 800;
|
|
182
|
+
$z-index-debug: 9999;
|
|
165
183
|
|
|
166
184
|
// ==========================================================================
|
|
167
185
|
// 9. Motion
|
|
@@ -205,17 +223,6 @@ $overlay-bg-blur: rgb(0 0 0 / 0.3);
|
|
|
205
223
|
$overlay-bg-subtle: rgb(0 0 0 / 0.1);
|
|
206
224
|
$stripe-highlight: rgb(255 255 255 / 0.15);
|
|
207
225
|
|
|
208
|
-
// ==========================================================================
|
|
209
|
-
// 11. Semantic spacing
|
|
210
|
-
// ==========================================================================
|
|
211
|
-
$spacing-xs: $space-1;
|
|
212
|
-
$spacing-sm: $space-2;
|
|
213
|
-
$spacing-md: $space-4;
|
|
214
|
-
$spacing-lg: $space-6;
|
|
215
|
-
$spacing-xl: $space-8;
|
|
216
|
-
$spacing-gutter: $space-4;
|
|
217
|
-
$spacing-section: $space-8;
|
|
218
|
-
|
|
219
226
|
// ==========================================================================
|
|
220
227
|
// 12. Component defaults
|
|
221
228
|
// ==========================================================================
|
|
@@ -13,6 +13,24 @@
|
|
|
13
13
|
--ui-color-primary-subtle: color-mix(in oklch, var(--ui-color-primary) 12%, white);
|
|
14
14
|
--ui-color-primary-hover: color-mix(in oklch, var(--ui-color-primary) 85%, black);
|
|
15
15
|
|
|
16
|
+
// Success shades - auto-generated via color-mix
|
|
17
|
+
--ui-color-success-light: color-mix(in oklch, var(--ui-color-success) 50%, white);
|
|
18
|
+
--ui-color-success-dark: color-mix(in oklch, var(--ui-color-success) 75%, black);
|
|
19
|
+
--ui-color-success-subtle: color-mix(in oklch, var(--ui-color-success) 12%, white);
|
|
20
|
+
--ui-color-success-hover: color-mix(in oklch, var(--ui-color-success) 85%, black);
|
|
21
|
+
|
|
22
|
+
// Warning shades - auto-generated via color-mix
|
|
23
|
+
--ui-color-warning-light: color-mix(in oklch, var(--ui-color-warning) 50%, white);
|
|
24
|
+
--ui-color-warning-dark: color-mix(in oklch, var(--ui-color-warning) 75%, black);
|
|
25
|
+
--ui-color-warning-subtle: color-mix(in oklch, var(--ui-color-warning) 12%, white);
|
|
26
|
+
--ui-color-warning-hover: color-mix(in oklch, var(--ui-color-warning) 85%, black);
|
|
27
|
+
|
|
28
|
+
// Danger shades - auto-generated via color-mix
|
|
29
|
+
--ui-color-danger-light: color-mix(in oklch, var(--ui-color-danger) 50%, white);
|
|
30
|
+
--ui-color-danger-dark: color-mix(in oklch, var(--ui-color-danger) 75%, black);
|
|
31
|
+
--ui-color-danger-subtle: color-mix(in oklch, var(--ui-color-danger) 12%, white);
|
|
32
|
+
--ui-color-danger-hover: color-mix(in oklch, var(--ui-color-danger) 85%, black);
|
|
33
|
+
|
|
16
34
|
// Neutral scale - auto-generated via color-mix
|
|
17
35
|
--ui-color-neutral-50: color-mix(in oklch, var(--ui-color-neutral) 3%, white);
|
|
18
36
|
--ui-color-neutral-100: color-mix(in oklch, var(--ui-color-neutral) 6%, white);
|
|
@@ -73,16 +73,16 @@ skipValidation: true
|
|
|
73
73
|
<!-- @z_index -->
|
|
74
74
|
<!-- Layering scale with gaps to allow insertion without renumbering. -->
|
|
75
75
|
:root {
|
|
76
|
-
--ui-z-base: 0;
|
|
77
|
-
--ui-z-sticky: 100;
|
|
78
|
-
--ui-z-dropdown: 200;
|
|
79
|
-
--ui-z-overlay: 300;
|
|
80
|
-
--ui-z-modal: 400;
|
|
81
|
-
--ui-z-popover: 500;
|
|
82
|
-
--ui-z-tooltip: 600;
|
|
83
|
-
--ui-z-toast: 700;
|
|
84
|
-
--ui-z-drawer: 800;
|
|
85
|
-
--ui-z-debug: 9999;
|
|
76
|
+
--ui-z-index-base: 0;
|
|
77
|
+
--ui-z-index-sticky: 100;
|
|
78
|
+
--ui-z-index-dropdown: 200;
|
|
79
|
+
--ui-z-index-overlay: 300;
|
|
80
|
+
--ui-z-index-modal: 400;
|
|
81
|
+
--ui-z-index-popover: 500;
|
|
82
|
+
--ui-z-index-tooltip: 600;
|
|
83
|
+
--ui-z-index-toast: 700;
|
|
84
|
+
--ui-z-index-drawer: 800;
|
|
85
|
+
--ui-z-index-debug: 9999;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
<!-- @semantic_colors -->
|
|
@@ -102,14 +102,3 @@ skipValidation: true
|
|
|
102
102
|
--ui-color-focus: var(--ui-color-primary-light);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
<!-- @semantic_spacing -->
|
|
106
|
-
<!-- Named spacing aliases that map to the numeric spacing scale for consistent layout patterns. -->
|
|
107
|
-
:root {
|
|
108
|
-
--ui-spacing-xs: var(--ui-space-1); /* 8px */
|
|
109
|
-
--ui-spacing-sm: var(--ui-space-2); /* 16px */
|
|
110
|
-
--ui-spacing-md: var(--ui-space-4); /* 32px */
|
|
111
|
-
--ui-spacing-lg: var(--ui-space-6); /* 48px */
|
|
112
|
-
--ui-spacing-xl: var(--ui-space-8); /* 64px */
|
|
113
|
-
--ui-spacing-gutter: var(--ui-space-4); /* 32px */
|
|
114
|
-
--ui-spacing-section: var(--ui-space-8);/* 64px */
|
|
115
|
-
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
@layer tokens {
|
|
2
2
|
:root {
|
|
3
|
-
//
|
|
4
|
-
--ui-radius-
|
|
5
|
-
--ui-radius-
|
|
6
|
-
--ui-radius-
|
|
3
|
+
// Override --ui-radius-base to control all border radii at once
|
|
4
|
+
--ui-radius-base: var(--ui-unit); // 8px — the single theme knob
|
|
5
|
+
--ui-radius-sm: calc(var(--ui-radius-base) * 0.5); // 4px
|
|
6
|
+
--ui-radius-md: var(--ui-radius-base); // 8px
|
|
7
|
+
--ui-radius-lg: calc(var(--ui-radius-base) * 2); // 16px
|
|
7
8
|
--ui-radius-full: 9999px;
|
|
8
9
|
}
|
|
9
10
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
@layer tokens {
|
|
2
2
|
:root {
|
|
3
|
-
|
|
4
|
-
--ui-shadow-
|
|
5
|
-
--ui-shadow-
|
|
3
|
+
// Shadows tinted by neutral color — changing --ui-color-neutral shifts shadow tone
|
|
4
|
+
--ui-shadow-sm: 0 1px 2px color-mix(in oklch, var(--ui-color-neutral) 20%, transparent);
|
|
5
|
+
--ui-shadow-md: 0 4px 6px color-mix(in oklch, var(--ui-color-neutral) 15%, transparent);
|
|
6
|
+
--ui-shadow-lg: 0 10px 15px color-mix(in oklch, var(--ui-color-neutral) 12%, transparent);
|
|
6
7
|
}
|
|
7
8
|
}
|