@scattered-light/base-ui-theme 0.1.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.
Files changed (105) hide show
  1. package/README.md +19 -0
  2. package/dist/index.d.ts +103 -0
  3. package/dist/index.js +313 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/styles/base/borders.css +26 -0
  6. package/dist/styles/base/breakpoints.css +26 -0
  7. package/dist/styles/base/colors.css +150 -0
  8. package/dist/styles/base/global.css +108 -0
  9. package/dist/styles/base/reset-accessibility.css +119 -0
  10. package/dist/styles/base/reset.css +451 -0
  11. package/dist/styles/base/shadows.css +42 -0
  12. package/dist/styles/base/spacing.css +62 -0
  13. package/dist/styles/base/transitions.css +29 -0
  14. package/dist/styles/base/typography.css +63 -0
  15. package/dist/styles/base/z-index.css +22 -0
  16. package/dist/styles/components/AGGrid.css +6 -0
  17. package/dist/styles/components/Accordion.css +184 -0
  18. package/dist/styles/components/AlertDialog.css +172 -0
  19. package/dist/styles/components/Autocomplete.css +261 -0
  20. package/dist/styles/components/Avatar.css +154 -0
  21. package/dist/styles/components/Button.css +164 -0
  22. package/dist/styles/components/Checkbox.css +199 -0
  23. package/dist/styles/components/CheckboxGroup.css +21 -0
  24. package/dist/styles/components/Collapsible.css +115 -0
  25. package/dist/styles/components/Combobox.css +514 -0
  26. package/dist/styles/components/ContextMenu.css +209 -0
  27. package/dist/styles/components/Dialog.css +159 -0
  28. package/dist/styles/components/Field.css +138 -0
  29. package/dist/styles/components/Fieldset.css +48 -0
  30. package/dist/styles/components/Form.css +22 -0
  31. package/dist/styles/components/Input.css +106 -0
  32. package/dist/styles/components/Menu.css +158 -0
  33. package/dist/styles/components/Menubar.css +201 -0
  34. package/dist/styles/components/Meter.css +104 -0
  35. package/dist/styles/components/NavigationMenu.css +469 -0
  36. package/dist/styles/components/NumberField.css +182 -0
  37. package/dist/styles/components/Popover.css +167 -0
  38. package/dist/styles/components/PreviewCard.css +148 -0
  39. package/dist/styles/components/Progress.css +130 -0
  40. package/dist/styles/components/Radio.css +178 -0
  41. package/dist/styles/components/ScrollArea.css +103 -0
  42. package/dist/styles/components/Select.css +297 -0
  43. package/dist/styles/components/Separator.css +34 -0
  44. package/dist/styles/components/Slider.css +163 -0
  45. package/dist/styles/components/Switch.css +197 -0
  46. package/dist/styles/components/Tabs.css +163 -0
  47. package/dist/styles/components/Toast.css +261 -0
  48. package/dist/styles/components/Toggle.css +103 -0
  49. package/dist/styles/components/ToggleGroup.css +19 -0
  50. package/dist/styles/components/Toolbar.css +78 -0
  51. package/dist/styles/components/Tooltip.css +87 -0
  52. package/dist/styles/index.css +103 -0
  53. package/dist/styles/semantic/accessibility.css +77 -0
  54. package/dist/styles/semantic/accordion.css +102 -0
  55. package/dist/styles/semantic/ag-grid.css +114 -0
  56. package/dist/styles/semantic/alert-dialog.css +78 -0
  57. package/dist/styles/semantic/autocomplete.css +162 -0
  58. package/dist/styles/semantic/avatar.css +96 -0
  59. package/dist/styles/semantic/badge.css +16 -0
  60. package/dist/styles/semantic/button.css +145 -0
  61. package/dist/styles/semantic/card.css +14 -0
  62. package/dist/styles/semantic/checkbox-group.css +18 -0
  63. package/dist/styles/semantic/checkbox.css +117 -0
  64. package/dist/styles/semantic/collapsible.css +123 -0
  65. package/dist/styles/semantic/combobox.css +325 -0
  66. package/dist/styles/semantic/context-menu.css +131 -0
  67. package/dist/styles/semantic/dialog.css +91 -0
  68. package/dist/styles/semantic/dropdown.css +16 -0
  69. package/dist/styles/semantic/field.css +73 -0
  70. package/dist/styles/semantic/fieldset.css +45 -0
  71. package/dist/styles/semantic/form.css +20 -0
  72. package/dist/styles/semantic/input.css +83 -0
  73. package/dist/styles/semantic/menu.css +104 -0
  74. package/dist/styles/semantic/menubar.css +70 -0
  75. package/dist/styles/semantic/meter.css +88 -0
  76. package/dist/styles/semantic/modal.css +14 -0
  77. package/dist/styles/semantic/navigation-menu.css +171 -0
  78. package/dist/styles/semantic/number-field.css +142 -0
  79. package/dist/styles/semantic/popover.css +113 -0
  80. package/dist/styles/semantic/preview-card.css +108 -0
  81. package/dist/styles/semantic/progress.css +85 -0
  82. package/dist/styles/semantic/radio.css +103 -0
  83. package/dist/styles/semantic/scroll-area.css +64 -0
  84. package/dist/styles/semantic/select.css +197 -0
  85. package/dist/styles/semantic/separator.css +37 -0
  86. package/dist/styles/semantic/slider.css +120 -0
  87. package/dist/styles/semantic/switch.css +158 -0
  88. package/dist/styles/semantic/tabs.css +150 -0
  89. package/dist/styles/semantic/toast.css +171 -0
  90. package/dist/styles/semantic/toggle-group.css +29 -0
  91. package/dist/styles/semantic/toggle.css +94 -0
  92. package/dist/styles/semantic/toolbar.css +47 -0
  93. package/dist/styles/semantic/tooltip.css +56 -0
  94. package/dist/styles/theme/README.md +179 -0
  95. package/dist/styles/theme/theme-accessibility.css +13 -0
  96. package/dist/styles/theme/theme-primitives.css +7 -0
  97. package/dist/styles/theme/theme-radius.css +12 -0
  98. package/dist/styles/theme/theme-roles.css +66 -0
  99. package/dist/styles/theme/theme-spacing.css +28 -0
  100. package/dist/styles/theme/theme-stroke.css +7 -0
  101. package/dist/styles/theme/theme-typography.css +218 -0
  102. package/dist/styles/utilities/color-styles.css +34 -0
  103. package/dist/styles/utilities/layout-styles.css +19 -0
  104. package/dist/styles/utilities/text-styles.css +102 -0
  105. package/package.json +75 -0
@@ -0,0 +1,171 @@
1
+ /* Toast Component Tokens - Mojave Theme */
2
+
3
+ :root {
4
+ /* ============================================
5
+ VIEWPORT
6
+ ============================================ */
7
+
8
+ --toast-viewport-position: fixed;
9
+ --toast-viewport-z-index: 9999;
10
+ --toast-viewport-width: 250px;
11
+ --toast-viewport-width-md: 300px;
12
+ --toast-viewport-margin: 1rem;
13
+ --toast-viewport-margin-md: 2rem;
14
+
15
+ /* ============================================
16
+ TOAST ROOT
17
+ ============================================ */
18
+
19
+ --toast-background: var(--surface-base);
20
+ --toast-color: var(--text-primary);
21
+ --toast-border: var(--theme-stroke-default) solid var(--border-default);
22
+ --toast-border-radius: 0.5rem;
23
+ --toast-padding: 1rem;
24
+ --toast-box-shadow: var(--shadow-md);
25
+ --toast-transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s, height 0.15s;
26
+
27
+ /* Stacking */
28
+ --toast-gap: 0.75rem;
29
+ --toast-peek: 0.75rem;
30
+
31
+ /* ============================================
32
+ CONTENT
33
+ ============================================ */
34
+
35
+ --toast-content-transition: opacity 0.25s;
36
+
37
+ /* ============================================
38
+ TITLE
39
+ ============================================ */
40
+
41
+ --toast-title-font-family: var(--theme-maximize-md-font-family);
42
+ --toast-title-font-size: var(--theme-maximize-md-font-size);
43
+ --toast-title-font-weight: var(--theme-maximize-md-font-weight);
44
+ --toast-title-line-height: var(--theme-maximize-md-line-height);
45
+ --toast-title-letter-spacing: var(--theme-maximize-md-letter-spacing);
46
+
47
+ /* ============================================
48
+ DESCRIPTION
49
+ ============================================ */
50
+
51
+ --toast-description-font-family: var(--theme-font-base-font-family);
52
+ --toast-description-font-size: var(--theme-font-base-font-size);
53
+ --toast-description-font-weight: var(--theme-font-base-font-weight);
54
+ --toast-description-line-height: var(--theme-font-base-line-height);
55
+ --toast-description-letter-spacing: var(--theme-font-base-letter-spacing);
56
+ --toast-description-margin-top: 0.25rem;
57
+
58
+ /* ============================================
59
+ CLOSE BUTTON
60
+ ============================================ */
61
+
62
+ --toast-close-top: 0.5rem;
63
+ --toast-close-right: 0.5rem;
64
+ --toast-close-width: 1.25rem;
65
+ --toast-close-height: 1.25rem;
66
+ --toast-close-border-radius: 0.25rem;
67
+ --toast-close-background-hover: var(--surface-raised);
68
+
69
+ /* ============================================
70
+ ICON
71
+ ============================================ */
72
+
73
+ --toast-icon-width: 1.25rem;
74
+ --toast-icon-height: 1.25rem;
75
+
76
+ /* ============================================
77
+ VARIANTS
78
+ ============================================ */
79
+
80
+ /* Success */
81
+ --toast-success-background: var(--theme-status-success-light);
82
+ --toast-success-border-color: var(--theme-status-success);
83
+ --toast-success-color: var(--theme-status-success-dark);
84
+ --toast-success-close-hover: color-mix(in srgb, var(--theme-status-success) 10%, white);
85
+
86
+ /* Error */
87
+ --toast-error-background: var(--theme-status-error-light);
88
+ --toast-error-border-color: var(--theme-status-error);
89
+ --toast-error-color: var(--theme-status-error-dark);
90
+ --toast-error-close-hover: color-mix(in srgb, var(--theme-status-error) 10%, white);
91
+
92
+ /* Warning */
93
+ --toast-warning-background: var(--theme-status-warning-light);
94
+ --toast-warning-border-color: var(--theme-status-warning);
95
+ --toast-warning-color: var(--theme-status-warning-dark);
96
+ --toast-warning-close-hover: color-mix(in srgb, var(--theme-status-warning) 10%, white);
97
+
98
+ /* Info */
99
+ --toast-info-background: var(--theme-status-info-light);
100
+ --toast-info-border-color: var(--theme-status-info);
101
+ --toast-info-color: var(--theme-status-info-dark);
102
+ --toast-info-close-hover: color-mix(in srgb, var(--theme-status-info) 10%, white);
103
+ }
104
+
105
+ /* ============================================
106
+ DARK MODE OVERRIDES
107
+ ============================================ */
108
+
109
+ @media (prefers-color-scheme: dark) {
110
+ :root {
111
+ --toast-background: var(--theme-neutral-100);
112
+ --toast-color: var(--text-primary);
113
+ --toast-border: var(--theme-stroke-default) solid var(--border-default);
114
+ --toast-close-background-hover: var(--theme-neutral-200);
115
+
116
+ /* Success */
117
+ --toast-success-background: color-mix(in srgb, var(--theme-status-success) 20%, var(--theme-neutral-100));
118
+ --toast-success-border-color: var(--theme-status-success);
119
+ --toast-success-color: var(--theme-status-success-light);
120
+ --toast-success-close-hover: color-mix(in srgb, var(--theme-status-success) 30%, var(--theme-neutral-100));
121
+
122
+ /* Error */
123
+ --toast-error-background: color-mix(in srgb, var(--theme-status-error) 20%, var(--theme-neutral-100));
124
+ --toast-error-border-color: var(--theme-status-error);
125
+ --toast-error-color: var(--theme-status-error-light);
126
+ --toast-error-close-hover: color-mix(in srgb, var(--theme-status-error) 30%, var(--theme-neutral-100));
127
+
128
+ /* Warning */
129
+ --toast-warning-background: color-mix(in srgb, var(--theme-status-warning) 20%, var(--theme-neutral-100));
130
+ --toast-warning-border-color: var(--theme-status-warning);
131
+ --toast-warning-color: var(--theme-status-warning-light);
132
+ --toast-warning-close-hover: color-mix(in srgb, var(--theme-status-warning) 30%, var(--theme-neutral-100));
133
+
134
+ /* Info */
135
+ --toast-info-background: color-mix(in srgb, var(--theme-status-info) 20%, var(--theme-neutral-100));
136
+ --toast-info-border-color: var(--theme-status-info);
137
+ --toast-info-color: var(--theme-status-info-light);
138
+ --toast-info-close-hover: color-mix(in srgb, var(--theme-status-info) 30%, var(--theme-neutral-100));
139
+ }
140
+ }
141
+
142
+ [data-theme='dark'] {
143
+ --toast-background: var(--theme-neutral-100);
144
+ --toast-color: var(--text-primary);
145
+ --toast-border: var(--theme-stroke-default) solid var(--border-default);
146
+ --toast-close-background-hover: var(--theme-neutral-200);
147
+
148
+ /* Success */
149
+ --toast-success-background: color-mix(in srgb, var(--theme-status-success) 20%, var(--theme-neutral-100));
150
+ --toast-success-border-color: var(--theme-status-success);
151
+ --toast-success-color: var(--theme-status-success-light);
152
+ --toast-success-close-hover: color-mix(in srgb, var(--theme-status-success) 30%, var(--theme-neutral-100));
153
+
154
+ /* Error */
155
+ --toast-error-background: color-mix(in srgb, var(--theme-status-error) 20%, var(--theme-neutral-100));
156
+ --toast-error-border-color: var(--theme-status-error);
157
+ --toast-error-color: var(--theme-status-error-light);
158
+ --toast-error-close-hover: color-mix(in srgb, var(--theme-status-error) 30%, var(--theme-neutral-100));
159
+
160
+ /* Warning */
161
+ --toast-warning-background: color-mix(in srgb, var(--theme-status-warning) 20%, var(--theme-neutral-100));
162
+ --toast-warning-border-color: var(--theme-status-warning);
163
+ --toast-warning-color: var(--theme-status-warning-light);
164
+ --toast-warning-close-hover: color-mix(in srgb, var(--theme-status-warning) 30%, var(--theme-neutral-100));
165
+
166
+ /* Info */
167
+ --toast-info-background: color-mix(in srgb, var(--theme-status-info) 20%, var(--theme-neutral-100));
168
+ --toast-info-border-color: var(--theme-status-info);
169
+ --toast-info-color: var(--theme-status-info-light);
170
+ --toast-info-close-hover: color-mix(in srgb, var(--theme-status-info) 30%, var(--theme-neutral-100));
171
+ }
@@ -0,0 +1,29 @@
1
+ /* Toggle Group Component Tokens - Mojave Theme */
2
+
3
+ :root {
4
+ /* ============================================
5
+ TOGGLE GROUP ROOT
6
+ ============================================ */
7
+
8
+ --toggle-group-display: inline-flex;
9
+ --toggle-group-gap: var(--space-1);
10
+ --toggle-group-padding: var(--space-1);
11
+ --toggle-group-background: var(--surface-raised);
12
+ --toggle-group-border-radius: var(--theme-radius-surface);
13
+ --toggle-group-border-width: var(--theme-stroke-default);
14
+ --toggle-group-border-color: var(--border-default);
15
+ }
16
+
17
+ /* ============================================
18
+ DARK MODE OVERRIDES
19
+ ============================================ */
20
+
21
+ @media (prefers-color-scheme: dark) {
22
+ :root {
23
+ --toggle-group-background: var(--theme-neutral-200);
24
+ }
25
+ }
26
+
27
+ [data-theme='dark'] {
28
+ --toggle-group-background: var(--theme-neutral-200);
29
+ }
@@ -0,0 +1,94 @@
1
+ /* Toggle Component Tokens - Mojave Theme */
2
+
3
+ :root {
4
+ /* ============================================
5
+ TOGGLE ROOT
6
+ ============================================ */
7
+
8
+ --toggle-display: inline-flex;
9
+ --toggle-align-items: center;
10
+ --toggle-justify-content: center;
11
+ --toggle-gap: var(--space-2);
12
+ --toggle-padding-block: var(--space-2-5);
13
+ --toggle-padding-inline: var(--space-4);
14
+ --toggle-font-family: var(--theme-font-base-label-font-family);
15
+ --toggle-font-size: var(--theme-font-base-label-font-size);
16
+ --toggle-font-weight: var(--theme-font-base-label-font-weight);
17
+ --toggle-line-height: var(--theme-font-base-label-line-height);
18
+ --toggle-letter-spacing: var(--theme-font-base-label-letter-spacing);
19
+ --toggle-border-radius: var(--theme-radius-chrome);
20
+ --toggle-border-width: var(--theme-stroke-default);
21
+ --toggle-cursor: pointer;
22
+ --toggle-transition: all 0.2s ease;
23
+ --toggle-user-select: none;
24
+
25
+ /* Default state */
26
+ --toggle-background: var(--surface-base);
27
+ --toggle-color: var(--text-primary);
28
+ --toggle-border-color: var(--border-default);
29
+
30
+ /* Hover state */
31
+ --toggle-background-hover: var(--surface-raised);
32
+ --toggle-border-color-hover: var(--border-strong);
33
+
34
+ /* Pressed/Active state */
35
+ --toggle-background-pressed: var(--theme-primary-100);
36
+ --toggle-color-pressed: var(--theme-primary-600);
37
+ --toggle-border-color-pressed: var(--theme-primary-600);
38
+
39
+ /* Pressed hover state */
40
+ --toggle-background-pressed-hover: var(--theme-primary-300);
41
+ --toggle-border-color-pressed-hover: var(--theme-primary-700);
42
+
43
+ /* Focus state */
44
+ --toggle-outline-focus: var(--theme-a11y-focus-outline-width) solid var(--focus-ring);
45
+ --toggle-outline-offset-focus: var(--theme-a11y-focus-outline-offset);
46
+
47
+ /* Disabled state */
48
+ --toggle-opacity-disabled: 0.5;
49
+ --toggle-cursor-disabled: not-allowed;
50
+
51
+ /* ============================================
52
+ SIZE VARIANTS
53
+ ============================================ */
54
+
55
+ /* Small */
56
+ --toggle-padding-block-sm: var(--space-1-5);
57
+ --toggle-padding-inline-sm: var(--space-3);
58
+ --toggle-font-family-sm: var(--theme-font-minimize-font-family);
59
+ --toggle-font-size-sm: var(--theme-font-minimize-font-size);
60
+ --toggle-font-weight-sm: var(--theme-font-minimize-font-weight);
61
+ --toggle-line-height-sm: var(--theme-font-minimize-line-height);
62
+ --toggle-letter-spacing-sm: var(--theme-font-minimize-letter-spacing);
63
+ --toggle-border-radius-sm: var(--theme-radius-item);
64
+
65
+ /* Large */
66
+ --toggle-padding-block-lg: var(--space-3);
67
+ --toggle-padding-inline-lg: var(--space-5);
68
+ --toggle-font-family-lg: var(--theme-font-base-font-family);
69
+ --toggle-font-size-lg: var(--theme-font-base-font-size);
70
+ --toggle-font-weight-lg: var(--theme-font-base-font-weight);
71
+ --toggle-line-height-lg: var(--theme-font-base-line-height);
72
+ --toggle-letter-spacing-lg: var(--theme-font-base-letter-spacing);
73
+ --toggle-border-radius-lg: var(--theme-radius-surface);
74
+ }
75
+
76
+ /* ============================================
77
+ DARK MODE OVERRIDES
78
+ ============================================ */
79
+
80
+ @media (prefers-color-scheme: dark) {
81
+ :root {
82
+ --toggle-background: var(--theme-neutral-100);
83
+ --toggle-background-hover: var(--theme-neutral-200);
84
+ --toggle-background-pressed: var(--theme-primary-600);
85
+ --toggle-background-pressed-hover: var(--theme-primary-500);
86
+ }
87
+ }
88
+
89
+ [data-theme='dark'] {
90
+ --toggle-background: var(--theme-neutral-100);
91
+ --toggle-background-hover: var(--theme-neutral-200);
92
+ --toggle-background-pressed: var(--theme-primary-600);
93
+ --toggle-background-pressed-hover: var(--theme-primary-500);
94
+ }
@@ -0,0 +1,47 @@
1
+ /* Toolbar Component Tokens - Mojave Theme */
2
+
3
+ :root {
4
+ /* ============================================
5
+ TOOLBAR ROOT
6
+ ============================================ */
7
+
8
+ --toolbar-display: flex;
9
+ --toolbar-align-items: center;
10
+ --toolbar-gap: var(--space-2);
11
+ --toolbar-padding: var(--space-2);
12
+ --toolbar-background: var(--surface-raised);
13
+ --toolbar-border-radius: var(--theme-radius-surface);
14
+ --toolbar-border-width: var(--theme-stroke-default);
15
+ --toolbar-border-color: var(--border-default);
16
+
17
+ /* ============================================
18
+ TOOLBAR GROUP
19
+ ============================================ */
20
+
21
+ --toolbar-group-display: flex;
22
+ --toolbar-group-align-items: center;
23
+ --toolbar-group-gap: var(--space-1);
24
+
25
+ /* ============================================
26
+ TOOLBAR SEPARATOR
27
+ ============================================ */
28
+
29
+ --toolbar-separator-width: var(--theme-stroke-default);
30
+ --toolbar-separator-height: 1.5rem;
31
+ --toolbar-separator-background: var(--border-default);
32
+ --toolbar-separator-margin-inline: var(--space-1);
33
+ }
34
+
35
+ /* ============================================
36
+ DARK MODE OVERRIDES
37
+ ============================================ */
38
+
39
+ @media (prefers-color-scheme: dark) {
40
+ :root {
41
+ --toolbar-background: var(--theme-neutral-200);
42
+ }
43
+ }
44
+
45
+ [data-theme='dark'] {
46
+ --toolbar-background: var(--theme-neutral-200);
47
+ }
@@ -0,0 +1,56 @@
1
+ /* Tooltip Component Tokens - Mojave Theme */
2
+
3
+ :root {
4
+ /* ============================================
5
+ TOOLTIP POSITIONER
6
+ ============================================ */
7
+
8
+ --tooltip-positioner-z-index: 9999;
9
+
10
+ /* ============================================
11
+ TOOLTIP POPUP
12
+ ============================================ */
13
+
14
+ --tooltip-popup-background: var(--theme-neutral-1100);
15
+ --tooltip-popup-color: var(--theme-text-on-primary);
16
+ --tooltip-popup-padding-block: var(--space-1-5);
17
+ --tooltip-popup-padding-inline: var(--space-2-5);
18
+ --tooltip-popup-border-radius: var(--theme-radius-chrome);
19
+ --tooltip-popup-font-family: var(--theme-font-condense-font-family);
20
+ --tooltip-popup-font-size: var(--theme-font-condense-font-size);
21
+ --tooltip-popup-font-weight: var(--theme-font-condense-font-weight);
22
+ --tooltip-popup-line-height: var(--theme-font-condense-line-height);
23
+ --tooltip-popup-letter-spacing: var(--theme-font-condense-letter-spacing);
24
+ --tooltip-popup-max-width: 300px;
25
+ --tooltip-popup-box-shadow: var(--shadow-lg);
26
+
27
+ /* Animation */
28
+ --tooltip-popup-animation-duration: 0.15s;
29
+ --tooltip-popup-animation-easing: ease-out;
30
+
31
+ /* ============================================
32
+ TOOLTIP ARROW
33
+ ============================================ */
34
+
35
+ --tooltip-arrow-width: 12px;
36
+ --tooltip-arrow-height: 6px;
37
+ --tooltip-arrow-fill: var(--theme-neutral-1100);
38
+ }
39
+
40
+ /* ============================================
41
+ DARK MODE OVERRIDES
42
+ ============================================ */
43
+
44
+ @media (prefers-color-scheme: dark) {
45
+ :root {
46
+ --tooltip-popup-background: var(--theme-neutral-200);
47
+ --tooltip-popup-color: var(--theme-text-on-primary);
48
+ --tooltip-arrow-fill: var(--theme-neutral-200);
49
+ }
50
+ }
51
+
52
+ [data-theme='dark'] {
53
+ --tooltip-popup-background: var(--theme-neutral-200);
54
+ --tooltip-popup-color: var(--theme-text-on-primary);
55
+ --tooltip-arrow-fill: var(--theme-neutral-200);
56
+ }
@@ -0,0 +1,179 @@
1
+ # Theme layer (`--theme-*`)
2
+
3
+ This folder sits **between** base scales ([`src/styles/base/`](../base/)) and component semantics ([`src/styles/semantic/`](../semantic/)). Edit these files to change brand mapping, density, typography, corner style, strokes, and accessibility defaults in one place.
4
+
5
+ ## Layers
6
+
7
+ ```mermaid
8
+ flowchart TB
9
+ subgraph base [Base]
10
+ colors[colors palettes]
11
+ global[global surfaces text]
12
+ spacing[space scale]
13
+ borders[radii widths]
14
+ typo[type scale]
15
+ reset[reset + reset-accessibility]
16
+ end
17
+ subgraph theme [Theme]
18
+ roles[theme-roles.css]
19
+ primitives[theme-primitives.css]
20
+ tspace[theme-spacing.css]
21
+ ttypo[theme-typography.css]
22
+ trad[theme-radius.css]
23
+ tstroke[theme-stroke.css]
24
+ ta11y[theme-accessibility.css]
25
+ end
26
+ subgraph downstream [Downstream]
27
+ semantic[semantic/*.css]
28
+ utilities[utilities/*.css]
29
+ comp[components/*.css]
30
+ end
31
+ base --> theme
32
+ roles --> primitives
33
+ spacing --> tspace
34
+ typo --> ttypo
35
+ borders --> trad
36
+ borders --> tstroke
37
+ theme --> semantic
38
+ semantic --> comp
39
+ theme --> utilities
40
+ utilities --> comp
41
+ ```
42
+
43
+ 1. **Base** — Numeric library: palettes, `--space-*`, `--border-radius-*`, `--border-width-*`, `--font-size-*` / `--line-height-*`, global surface/text tokens, reset.
44
+ 2. **Theme** — Named roles that alias base (and each other). This is the main “master” surface for product theming.
45
+ 3. **Semantic** — Per-component tokens (`--input-height`, `--button-solid-bg`, …) that should reference `--theme-*` rather than raw palette steps or ad hoc values.
46
+ 4. **Utilities** — Optional classes (e.g. [`text-styles.css`](../utilities/text-styles.css)) that apply full presets for docs or prototypes.
47
+ 5. **Components** — Class rules map to semantic tokens.
48
+
49
+ ### Import order
50
+
51
+ Order in [`src/styles/index.css`](../index.css) (abbreviated):
52
+
53
+ 1. Material Symbols font
54
+ 2. **Base:** `colors` → `global` → `spacing` → `borders` → `shadows` → `breakpoints` → `z-index` → `transitions` → `typography` → `reset` → `reset-accessibility`
55
+ 3. **Theme:** `theme-roles` → `theme-primitives` → `theme-spacing` → `theme-typography` → `theme-radius` → `theme-stroke` → `theme-accessibility`
56
+ 4. **Semantic** — all `semantic/*.css` component token files
57
+ 5. **Utilities** — `color-styles`, `text-styles`, `layout-styles`
58
+ 6. **Components** — `components/*.css`
59
+
60
+ ---
61
+
62
+ ## Color roles — [`theme-roles.css`](theme-roles.css)
63
+
64
+ | Token family | Typical use |
65
+ |--------------|-------------|
66
+ | `--theme-neutral-*` | Chrome, borders, text hierarchy (maps to stone by default). |
67
+ | `--theme-primary-*` | Accent, solid buttons, focus-adjacent UI (mirage by default). |
68
+ | `--theme-secondary-*` | Secondary accent scale (ember); wire in semantics when needed. |
69
+ | `--theme-surface-canvas`, `--theme-text-on-primary`, `--theme-overlay-base` | Glare/midnight-level surfaces. |
70
+ | `--theme-status-*` | Success, error, warning, info (+ light/dark variants). |
71
+
72
+ **Swap primary brand:** e.g. `--theme-primary-600: var(--color-dune-500);` — keep `var(--color-*)` so dark mode palette overrides in `colors.css` still apply.
73
+
74
+ ---
75
+
76
+ ## Spacing / density — [`theme-spacing.css`](theme-spacing.css)
77
+
78
+ Aliases to the base `--space-*` scale. Changing these retunes default control size and padding together (input/button already use them).
79
+
80
+ | Token | Role |
81
+ |-------|------|
82
+ | `--theme-control-height-xs` … `--theme-control-height-lg` | Default heights for size tiers. |
83
+ | `--theme-control-padding-block*` / `*-inline*` | Vertical and horizontal padding inside controls. |
84
+ | `--theme-gap-control*` | Internal gap (e.g. icon + label). |
85
+ | `--theme-gap-stack-sm/md/lg` | Stacked layout spacing between blocks. |
86
+ | `--theme-inset-popup` | Popup inner inset (extend usage as needed). |
87
+
88
+ ---
89
+
90
+ ## Typography — [`theme-typography.css`](theme-typography.css)
91
+
92
+ Full presets are expressed as **longhand** axes (`-font-family`, `-font-size`, `-font-weight`, `-line-height`, `-letter-spacing`) plus, where useful, a **`font` shorthand** (`--theme-*-font`) that matches the longhand. **`letter-spacing` is always separate** — it is not part of the CSS `font` shorthand.
93
+
94
+ ### Tier vocabulary
95
+
96
+ | Tier | Scale | Token prefix | Notes |
97
+ |------|--------|----------------|-------|
98
+ | **minimize** | xs | `--theme-font-minimize-*` | Default, subtitle, link; **subtitle-label** = semibold + wide tracking + uppercase (group labels). |
99
+ | **condense** | sm | `--theme-font-condense-*` | Same shape; **subtitle-label** for capped group headings. |
100
+ | **base** | md | `--theme-font-base-*` | Default copy, **base-subtitle**, **base-link**. |
101
+ | **magnify** | lg body | `--theme-font-magnify-*` | Large inputs / lead copy. |
102
+ | **maximize** | display | `--theme-maximize-xs` … `--theme-maximize-4xl` | `--font-family-display`; stepped sizes for headlines and dialog titles. |
103
+
104
+ ### Roles on top of tiers
105
+
106
+ | Token | Role |
107
+ |-------|------|
108
+ | `--theme-font-base-label-*` | Form and chrome labels (sm + medium). `--theme-font-base-label-active-font-weight` for e.g. selected tabs. |
109
+ | `--theme-font-base-trigger-*` | Primary interactive control typography (md + medium, tall line-height). |
110
+ | `--theme-font-base-switch-*` / `--theme-font-condense-switch-*` / `--theme-font-magnify-switch-*` | Switch track / label sizing where the tier alone is not enough. |
111
+ | `--theme-font-code-*` | Monospace blocks. |
112
+
113
+ Use **semantic** tokens (`src/styles/semantic/*.css`) to point at these. It is common to set **longhand** in semantics when you mix a theme tier with a **local size** (e.g. `9px` in a switch track) or override a single axis — utilities can use `font` + `letter-spacing` for a full preset in one place.
114
+
115
+ **Utility classes** for quick application live in [`src/styles/utilities/text-styles.css`](../utilities/text-styles.css) — e.g. `.text-style-maximize-*`, `.text-style-base` / `.text-style-base-subtitle` / `.text-style-base-link`, `.text-style-condense*` (including `.text-style-condense-subtitle-label`), `.text-style-minimize*` (including `.text-style-minimize-subtitle-label`).
116
+
117
+ ---
118
+
119
+ ## Radius (shape) — [`theme-radius.css`](theme-radius.css)
120
+
121
+ | Token | Default mapping | Typical use |
122
+ |-------|-----------------|-------------|
123
+ | `--theme-radius-minimal` | none | Tags, square UI. |
124
+ | `--theme-radius-box` | base | Checkbox corners. |
125
+ | `--theme-radius-control` | sm | Inputs, triggers. |
126
+ | `--theme-radius-item` | sm | Menu rows, small controls. |
127
+ | `--theme-radius-chrome` | md | Navigation chrome, toggles, chips. |
128
+ | `--theme-radius-surface` | lg | Cards, dialogs, popovers. |
129
+ | `--theme-radius-modal` | xl | Modal shell. |
130
+ | `--theme-radius-pill` | full | Pill buttons, switches, sliders. |
131
+
132
+ ---
133
+
134
+ ## Stroke — [`theme-stroke.css`](theme-stroke.css)
135
+
136
+ | Token | Maps to |
137
+ |-------|---------|
138
+ | `--theme-stroke-default` | `--border-width-thin` (hairlines, popup borders). |
139
+ | `--theme-stroke-emphasis` | `--border-width-medium` |
140
+ | `--theme-stroke-strong` | `--border-width-thick` |
141
+
142
+ ---
143
+
144
+ ## Accessibility — [`theme-accessibility.css`](theme-accessibility.css)
145
+
146
+ | Token | Role |
147
+ |-------|------|
148
+ | `--theme-a11y-focus-outline-width` | Keyboard focus outline thickness. |
149
+ | `--theme-a11y-focus-outline-offset` | Outline offset. |
150
+ | `--theme-a11y-focus-ring-radius` | Radius on generic `:focus-visible`. |
151
+ | `--theme-a11y-link-focus-*` | Link-specific offset/radius. |
152
+ | `--theme-a11y-min-touch-target` | Minimum tap target (coarse pointer). |
153
+ | `--focus-ring` | Outline color (defaults to `--theme-primary-600`). |
154
+ | `--focus-ring-width` | Same as outline width (compatibility). |
155
+
156
+ ---
157
+
158
+ ## Primitives — [`theme-primitives.css`](theme-primitives.css)
159
+
160
+ Shared **box-shadow** focus recipes built from color roles (e.g. `--theme-focus-shadow-3px-primary`).
161
+
162
+ ---
163
+
164
+ ## Future: visual theme UI + export
165
+
166
+ A config or JSON schema can describe overrides for **master** `--theme-*` keys only, for example:
167
+
168
+ ```json
169
+ {
170
+ "theme-primary-600": { "palette": "dune", "step": 500 },
171
+ "theme-control-height-md": "space-12",
172
+ "theme-font-base-font-size": "font-size-lg",
173
+ "theme-maximize-xl-font-size": "font-size-2xl",
174
+ "theme-radius-surface": "border-radius-md",
175
+ "theme-stroke-default": "border-width-thin"
176
+ }
177
+ ```
178
+
179
+ A small codegen step would emit the same `--theme-*` custom properties; the runtime contract for consumers stays **CSS custom properties** on `:root` (or a scoped wrapper class).
@@ -0,0 +1,13 @@
1
+ /* Accessibility token defaults (used by accessibility-theme.css and components). */
2
+
3
+ :root {
4
+ --theme-a11y-focus-outline-width: 2px;
5
+ --theme-a11y-focus-outline-offset: 2px;
6
+ --theme-a11y-focus-ring-radius: var(--border-radius-sm);
7
+ --theme-a11y-link-focus-outline-offset: 0.25em;
8
+ --theme-a11y-link-focus-ring-radius: 0.125em;
9
+ --theme-a11y-min-touch-target: 44px;
10
+
11
+ --focus-ring: var(--theme-primary-600);
12
+ --focus-ring-width: var(--theme-a11y-focus-outline-width);
13
+ }
@@ -0,0 +1,7 @@
1
+ /* Shared non-color patterns built from theme roles (optional convenience layer). */
2
+
3
+ :root {
4
+ --theme-focus-shadow-3px-primary: 0 0 0 3px var(--theme-primary-100);
5
+ --theme-focus-shadow-3px-primary-soft: 0 0 0 3px var(--theme-primary-200);
6
+ --theme-focus-shadow-3px-error: 0 0 0 3px var(--theme-status-error);
7
+ }
@@ -0,0 +1,12 @@
1
+ /* Theme radius roles — map semantic “shape” to the base radius scale. */
2
+
3
+ :root {
4
+ --theme-radius-minimal: var(--border-radius-none);
5
+ --theme-radius-box: var(--border-radius-base);
6
+ --theme-radius-control: var(--border-radius-sm);
7
+ --theme-radius-item: var(--border-radius-sm);
8
+ --theme-radius-chrome: var(--border-radius-md);
9
+ --theme-radius-surface: var(--border-radius-lg);
10
+ --theme-radius-modal: var(--border-radius-xl);
11
+ --theme-radius-pill: var(--border-radius-full);
12
+ }
@@ -0,0 +1,66 @@
1
+ /* Theme roles — map brand palettes to semantic steps. Edit here to swap primary/neutral/secondary. */
2
+
3
+ :root {
4
+ /* Surfaces & contrast (from base glare / midnight) */
5
+ --theme-surface-canvas: var(--color-glare);
6
+ --theme-text-on-primary: var(--color-glare);
7
+ --theme-overlay-base: var(--color-midnight);
8
+
9
+ /* Neutral (Mojave: stone) */
10
+ --theme-neutral-50: var(--color-stone-50);
11
+ --theme-neutral-100: var(--color-stone-100);
12
+ --theme-neutral-200: var(--color-stone-200);
13
+ --theme-neutral-300: var(--color-stone-300);
14
+ --theme-neutral-400: var(--color-stone-400);
15
+ --theme-neutral-500: var(--color-stone-500);
16
+ --theme-neutral-600: var(--color-stone-600);
17
+ --theme-neutral-700: var(--color-stone-700);
18
+ --theme-neutral-800: var(--color-stone-800);
19
+ --theme-neutral-900: var(--color-stone-900);
20
+ --theme-neutral-1000: var(--color-stone-1000);
21
+ --theme-neutral-1100: var(--color-stone-1100);
22
+ --theme-neutral-1200: var(--color-stone-1200);
23
+
24
+ /* Primary accent (Mojave: mirage) */
25
+ --theme-primary-50: var(--color-mirage-50);
26
+ --theme-primary-100: var(--color-mirage-100);
27
+ --theme-primary-200: var(--color-mirage-200);
28
+ --theme-primary-300: var(--color-mirage-300);
29
+ --theme-primary-400: var(--color-mirage-400);
30
+ --theme-primary-500: var(--color-mirage-500);
31
+ --theme-primary-600: var(--color-mirage-600);
32
+ --theme-primary-700: var(--color-mirage-700);
33
+ --theme-primary-800: var(--color-mirage-800);
34
+ --theme-primary-900: var(--color-mirage-900);
35
+ --theme-primary-1000: var(--color-mirage-1000);
36
+
37
+ /*
38
+ * Secondary accent (Mojave: ember). No ember-50 in palette; scale starts at 100.
39
+ * Reserved for future semantic tokens — default theme matches ember steps 100–1000.
40
+ */
41
+ --theme-secondary-50: var(--color-ember-100);
42
+ --theme-secondary-100: var(--color-ember-100);
43
+ --theme-secondary-200: var(--color-ember-200);
44
+ --theme-secondary-300: var(--color-ember-300);
45
+ --theme-secondary-400: var(--color-ember-400);
46
+ --theme-secondary-500: var(--color-ember-500);
47
+ --theme-secondary-600: var(--color-ember-600);
48
+ --theme-secondary-700: var(--color-ember-700);
49
+ --theme-secondary-800: var(--color-ember-800);
50
+ --theme-secondary-900: var(--color-ember-900);
51
+ --theme-secondary-1000: var(--color-ember-1000);
52
+
53
+ /* Status — aliases to global semantic colors (defined in base/global.css) */
54
+ --theme-status-success: var(--color-success);
55
+ --theme-status-success-light: var(--color-success-light);
56
+ --theme-status-success-dark: var(--color-success-dark);
57
+ --theme-status-error: var(--color-error);
58
+ --theme-status-error-light: var(--color-error-light);
59
+ --theme-status-error-dark: var(--color-error-dark);
60
+ --theme-status-warning: var(--color-warning);
61
+ --theme-status-warning-light: var(--color-warning-light);
62
+ --theme-status-warning-dark: var(--color-warning-dark);
63
+ --theme-status-info: var(--color-info);
64
+ --theme-status-info-light: var(--color-info-light);
65
+ --theme-status-info-dark: var(--color-info-dark);
66
+ }