@happyvertical/smrt-ui 0.40.67 → 0.40.69
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/components/data/DataTable.svelte +1 -1
- package/dist/components/feedback/LoadingOverlay.svelte +1 -1
- package/dist/components/forms/Combobox.svelte +1 -1
- package/dist/components/forms/FilePicker.svelte +1 -1
- package/dist/components/forms/Input.svelte +1 -1
- package/dist/components/forms/InputGroup.svelte +1 -1
- package/dist/components/forms/Listbox.svelte +1 -1
- package/dist/components/forms/MultiSelect.svelte +1 -1
- package/dist/components/forms/RangeSlider.svelte +1 -1
- package/dist/components/forms/Select.svelte +1 -1
- package/dist/components/forms/Slider.svelte +1 -1
- package/dist/components/forms/TagsInput.svelte +1 -1
- package/dist/components/forms/Textarea.svelte +1 -1
- package/dist/components/roles/RoleSelector.svelte +10 -3
- package/dist/components/ui/Dropdown.svelte +11 -3
- package/dist/components/ui/Popover.svelte +1 -1
- package/dist/themes/ThemeProvider.svelte +40 -42
- package/dist/themes/ThemeProvider.svelte.d.ts +10 -0
- package/dist/themes/ThemeProvider.svelte.d.ts.map +1 -1
- package/dist/themes/__tests__/control-boundary-contrast.test.js +112 -0
- package/dist/themes/__tests__/css-generator.test.js +42 -0
- package/dist/themes/__tests__/styles-lockstep.test.js +32 -0
- package/dist/themes/__tests__/theme-provider.test.js +46 -8
- package/dist/themes/__tests__/theme-script.test.js +16 -11
- package/dist/themes/css-generator.d.ts +5 -0
- package/dist/themes/css-generator.d.ts.map +1 -1
- package/dist/themes/css-generator.js +5 -0
- package/dist/themes/glass/index.d.ts.map +1 -1
- package/dist/themes/glass/index.js +12 -4
- package/dist/themes/smrt/index.d.ts.map +1 -1
- package/dist/themes/smrt/index.js +8 -2
- package/dist/themes/studio/index.d.ts.map +1 -1
- package/dist/themes/studio/index.js +6 -2
- package/dist/themes/styles/glass.css +316 -84
- package/dist/themes/styles/material.css +355 -53
- package/dist/themes/styles/smrt.css +4 -4
- package/dist/themes/styles/studio.css +308 -72
- package/dist/themes/theme-script.d.ts +12 -4
- package/dist/themes/theme-script.d.ts.map +1 -1
- package/dist/themes/theme-script.js +14 -19
- package/package.json +3 -2
|
@@ -8,43 +8,34 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
[data-theme="studio"][data-color-scheme="light"] {
|
|
11
|
-
|
|
11
|
+
--smrt-theme-id: studio;
|
|
12
|
+
--smrt-theme-name: Studio;
|
|
13
|
+
--smrt-color-scheme: light;
|
|
14
|
+
--smrt-font-family: "Google Sans Text", "Roboto", "Segoe UI", system-ui, sans-serif;
|
|
12
15
|
--smrt-color-primary: #1a73e8;
|
|
13
16
|
--smrt-color-on-primary: #ffffff;
|
|
14
17
|
--smrt-color-primary-container: #e8f0fe;
|
|
15
18
|
--smrt-color-on-primary-container: #174ea6;
|
|
16
|
-
|
|
17
|
-
/* Secondary - Neutral gray */
|
|
18
19
|
--smrt-color-secondary: #5f6368;
|
|
19
20
|
--smrt-color-on-secondary: #ffffff;
|
|
20
21
|
--smrt-color-secondary-container: #f1f3f4;
|
|
21
22
|
--smrt-color-on-secondary-container: #3c4043;
|
|
22
|
-
|
|
23
|
-
/* Tertiary - Purple accent */
|
|
24
23
|
--smrt-color-tertiary: #9334e6;
|
|
25
24
|
--smrt-color-on-tertiary: #ffffff;
|
|
26
25
|
--smrt-color-tertiary-container: #f3e8fd;
|
|
27
26
|
--smrt-color-on-tertiary-container: #6b12b8;
|
|
28
|
-
|
|
29
|
-
/* Error - Google red */
|
|
30
27
|
--smrt-color-error: #d93025;
|
|
31
28
|
--smrt-color-on-error: #ffffff;
|
|
32
29
|
--smrt-color-error-container: #fce8e6;
|
|
33
30
|
--smrt-color-on-error-container: #a50e0e;
|
|
34
|
-
|
|
35
|
-
/* Warning - Amber */
|
|
36
31
|
--smrt-color-warning: #f9ab00;
|
|
37
32
|
--smrt-color-on-warning: #000000;
|
|
38
33
|
--smrt-color-warning-container: #fef3c7;
|
|
39
34
|
--smrt-color-on-warning-container: #92400e;
|
|
40
|
-
|
|
41
|
-
/* Success - Teal/green */
|
|
42
35
|
--smrt-color-success: #188038;
|
|
43
36
|
--smrt-color-on-success: #ffffff;
|
|
44
37
|
--smrt-color-success-container: #e6f4ea;
|
|
45
38
|
--smrt-color-on-success-container: #137333;
|
|
46
|
-
|
|
47
|
-
/* Surface - Pure white, flat */
|
|
48
39
|
--smrt-color-surface: #ffffff;
|
|
49
40
|
--smrt-color-on-surface: #202124;
|
|
50
41
|
--smrt-color-surface-variant: #f8f9fa;
|
|
@@ -56,31 +47,133 @@
|
|
|
56
47
|
--smrt-color-surface-container-lowest: #ffffff;
|
|
57
48
|
--smrt-color-surface-dim: #e8eaed;
|
|
58
49
|
--smrt-color-surface-bright: #ffffff;
|
|
59
|
-
|
|
60
|
-
/* Background */
|
|
61
50
|
--smrt-color-background: #ffffff;
|
|
62
51
|
--smrt-color-on-background: #202124;
|
|
63
|
-
|
|
64
|
-
/* Outline - Light gray borders */
|
|
65
|
-
--smrt-color-outline: #dadce0;
|
|
52
|
+
--smrt-color-outline: #78797b;
|
|
66
53
|
--smrt-color-outline-variant: #e8eaed;
|
|
67
|
-
|
|
68
|
-
/* Inverse */
|
|
69
54
|
--smrt-color-inverse-surface: #3c4043;
|
|
70
55
|
--smrt-color-inverse-on-surface: #f1f3f4;
|
|
71
56
|
--smrt-color-inverse-primary: #8ab4f8;
|
|
72
|
-
|
|
73
|
-
/* Effects - Minimal shadows */
|
|
74
57
|
--smrt-color-shadow: rgba(60, 64, 67, 0.1);
|
|
75
58
|
--smrt-color-scrim: rgba(0, 0, 0, 0.5);
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
--smrt-
|
|
79
|
-
--smrt-
|
|
80
|
-
--smrt-
|
|
81
|
-
--smrt-font
|
|
82
|
-
|
|
83
|
-
|
|
59
|
+
--smrt-typography-display-large-size: 3rem;
|
|
60
|
+
--smrt-typography-display-large-line-height: 1.1;
|
|
61
|
+
--smrt-typography-display-large-weight: 400;
|
|
62
|
+
--smrt-typography-display-large-tracking: -0.01em;
|
|
63
|
+
--smrt-typography-display-large-font-family: var(--smrt-font-family);
|
|
64
|
+
--smrt-typography-display-large-font: 400 3rem/1.1 var(--smrt-font-family);
|
|
65
|
+
--smrt-typography-display-medium-size: 2.5rem;
|
|
66
|
+
--smrt-typography-display-medium-line-height: 1.15;
|
|
67
|
+
--smrt-typography-display-medium-weight: 400;
|
|
68
|
+
--smrt-typography-display-medium-tracking: -0.008em;
|
|
69
|
+
--smrt-typography-display-medium-font-family: var(--smrt-font-family);
|
|
70
|
+
--smrt-typography-display-medium-font: 400 2.5rem/1.15 var(--smrt-font-family);
|
|
71
|
+
--smrt-typography-display-small-size: 2rem;
|
|
72
|
+
--smrt-typography-display-small-line-height: 1.2;
|
|
73
|
+
--smrt-typography-display-small-weight: 400;
|
|
74
|
+
--smrt-typography-display-small-tracking: -0.005em;
|
|
75
|
+
--smrt-typography-display-small-font-family: var(--smrt-font-family);
|
|
76
|
+
--smrt-typography-display-small-font: 400 2rem/1.2 var(--smrt-font-family);
|
|
77
|
+
--smrt-typography-headline-large-size: 1.75rem;
|
|
78
|
+
--smrt-typography-headline-large-line-height: 1.25;
|
|
79
|
+
--smrt-typography-headline-large-weight: 400;
|
|
80
|
+
--smrt-typography-headline-large-tracking: 0;
|
|
81
|
+
--smrt-typography-headline-large-font-family: var(--smrt-font-family);
|
|
82
|
+
--smrt-typography-headline-large-font: 400 1.75rem/1.25 var(--smrt-font-family);
|
|
83
|
+
--smrt-typography-headline-medium-size: 1.5rem;
|
|
84
|
+
--smrt-typography-headline-medium-line-height: 1.3;
|
|
85
|
+
--smrt-typography-headline-medium-weight: 400;
|
|
86
|
+
--smrt-typography-headline-medium-tracking: 0;
|
|
87
|
+
--smrt-typography-headline-medium-font-family: var(--smrt-font-family);
|
|
88
|
+
--smrt-typography-headline-medium-font: 400 1.5rem/1.3 var(--smrt-font-family);
|
|
89
|
+
--smrt-typography-headline-small-size: 1.25rem;
|
|
90
|
+
--smrt-typography-headline-small-line-height: 1.35;
|
|
91
|
+
--smrt-typography-headline-small-weight: 500;
|
|
92
|
+
--smrt-typography-headline-small-tracking: 0;
|
|
93
|
+
--smrt-typography-headline-small-font-family: var(--smrt-font-family);
|
|
94
|
+
--smrt-typography-headline-small-font: 500 1.25rem/1.35 var(--smrt-font-family);
|
|
95
|
+
--smrt-typography-title-large-size: 1.125rem;
|
|
96
|
+
--smrt-typography-title-large-line-height: 1.4;
|
|
97
|
+
--smrt-typography-title-large-weight: 500;
|
|
98
|
+
--smrt-typography-title-large-tracking: 0;
|
|
99
|
+
--smrt-typography-title-large-font-family: var(--smrt-font-family);
|
|
100
|
+
--smrt-typography-title-large-font: 500 1.125rem/1.4 var(--smrt-font-family);
|
|
101
|
+
--smrt-typography-title-medium-size: 1rem;
|
|
102
|
+
--smrt-typography-title-medium-line-height: 1.5;
|
|
103
|
+
--smrt-typography-title-medium-weight: 500;
|
|
104
|
+
--smrt-typography-title-medium-tracking: 0.01em;
|
|
105
|
+
--smrt-typography-title-medium-font-family: var(--smrt-font-family);
|
|
106
|
+
--smrt-typography-title-medium-font: 500 1rem/1.5 var(--smrt-font-family);
|
|
107
|
+
--smrt-typography-title-small-size: 0.875rem;
|
|
108
|
+
--smrt-typography-title-small-line-height: 1.5;
|
|
109
|
+
--smrt-typography-title-small-weight: 500;
|
|
110
|
+
--smrt-typography-title-small-tracking: 0.01em;
|
|
111
|
+
--smrt-typography-title-small-font-family: var(--smrt-font-family);
|
|
112
|
+
--smrt-typography-title-small-font: 500 0.875rem/1.5 var(--smrt-font-family);
|
|
113
|
+
--smrt-typography-body-large-size: 1rem;
|
|
114
|
+
--smrt-typography-body-large-line-height: 1.6;
|
|
115
|
+
--smrt-typography-body-large-weight: 400;
|
|
116
|
+
--smrt-typography-body-large-tracking: 0;
|
|
117
|
+
--smrt-typography-body-large-font-family: var(--smrt-font-family);
|
|
118
|
+
--smrt-typography-body-large-font: 400 1rem/1.6 var(--smrt-font-family);
|
|
119
|
+
--smrt-typography-body-medium-size: 0.875rem;
|
|
120
|
+
--smrt-typography-body-medium-line-height: 1.6;
|
|
121
|
+
--smrt-typography-body-medium-weight: 400;
|
|
122
|
+
--smrt-typography-body-medium-tracking: 0;
|
|
123
|
+
--smrt-typography-body-medium-font-family: var(--smrt-font-family);
|
|
124
|
+
--smrt-typography-body-medium-font: 400 0.875rem/1.6 var(--smrt-font-family);
|
|
125
|
+
--smrt-typography-body-small-size: 0.75rem;
|
|
126
|
+
--smrt-typography-body-small-line-height: 1.5;
|
|
127
|
+
--smrt-typography-body-small-weight: 400;
|
|
128
|
+
--smrt-typography-body-small-tracking: 0.01em;
|
|
129
|
+
--smrt-typography-body-small-font-family: var(--smrt-font-family);
|
|
130
|
+
--smrt-typography-body-small-font: 400 0.75rem/1.5 var(--smrt-font-family);
|
|
131
|
+
--smrt-typography-label-large-size: 0.875rem;
|
|
132
|
+
--smrt-typography-label-large-line-height: 1.5;
|
|
133
|
+
--smrt-typography-label-large-weight: 500;
|
|
134
|
+
--smrt-typography-label-large-tracking: 0.02em;
|
|
135
|
+
--smrt-typography-label-large-font-family: var(--smrt-font-family);
|
|
136
|
+
--smrt-typography-label-large-font: 500 0.875rem/1.5 var(--smrt-font-family);
|
|
137
|
+
--smrt-typography-label-medium-size: 0.75rem;
|
|
138
|
+
--smrt-typography-label-medium-line-height: 1.5;
|
|
139
|
+
--smrt-typography-label-medium-weight: 500;
|
|
140
|
+
--smrt-typography-label-medium-tracking: 0.025em;
|
|
141
|
+
--smrt-typography-label-medium-font-family: var(--smrt-font-family);
|
|
142
|
+
--smrt-typography-label-medium-font: 500 0.75rem/1.5 var(--smrt-font-family);
|
|
143
|
+
--smrt-typography-label-small-size: 0.6875rem;
|
|
144
|
+
--smrt-typography-label-small-line-height: 1.4;
|
|
145
|
+
--smrt-typography-label-small-weight: 500;
|
|
146
|
+
--smrt-typography-label-small-tracking: 0.03em;
|
|
147
|
+
--smrt-typography-label-small-font-family: var(--smrt-font-family);
|
|
148
|
+
--smrt-typography-label-small-font: 500 0.6875rem/1.4 var(--smrt-font-family);
|
|
149
|
+
--smrt-spacing-0: 0;
|
|
150
|
+
--smrt-spacing-1: 0.25rem;
|
|
151
|
+
--smrt-spacing-2: 0.5rem;
|
|
152
|
+
--smrt-spacing-3: 0.75rem;
|
|
153
|
+
--smrt-spacing-4: 1rem;
|
|
154
|
+
--smrt-spacing-5: 1.25rem;
|
|
155
|
+
--smrt-spacing-6: 1.5rem;
|
|
156
|
+
--smrt-spacing-7: 1.75rem;
|
|
157
|
+
--smrt-spacing-8: 2rem;
|
|
158
|
+
--smrt-spacing-9: 2.25rem;
|
|
159
|
+
--smrt-spacing-10: 2.5rem;
|
|
160
|
+
--smrt-spacing-11: 2.75rem;
|
|
161
|
+
--smrt-spacing-12: 3rem;
|
|
162
|
+
--smrt-spacing-14: 3.5rem;
|
|
163
|
+
--smrt-spacing-16: 4rem;
|
|
164
|
+
--smrt-spacing-20: 5rem;
|
|
165
|
+
--smrt-spacing-24: 6rem;
|
|
166
|
+
--smrt-spacing-0_5: 0.125rem;
|
|
167
|
+
--smrt-spacing-1_5: 0.375rem;
|
|
168
|
+
--smrt-spacing-2_5: 0.625rem;
|
|
169
|
+
--smrt-spacing-3_5: 0.875rem;
|
|
170
|
+
--smrt-spacing-xs: 0.25rem;
|
|
171
|
+
--smrt-spacing-sm: 0.5rem;
|
|
172
|
+
--smrt-spacing-md: 1rem;
|
|
173
|
+
--smrt-spacing-lg: 1.5rem;
|
|
174
|
+
--smrt-spacing-xl: 2rem;
|
|
175
|
+
--smrt-spacing-2xl: 3rem;
|
|
176
|
+
--smrt-spacing-3xl: 4rem;
|
|
84
177
|
--smrt-radius-none: 0;
|
|
85
178
|
--smrt-radius-sm: 0.25rem;
|
|
86
179
|
--smrt-radius-md: 0.5rem;
|
|
@@ -89,69 +182,85 @@
|
|
|
89
182
|
--smrt-radius-2xl: 1.5rem;
|
|
90
183
|
--smrt-radius-3xl: 2rem;
|
|
91
184
|
--smrt-radius-full: 9999px;
|
|
92
|
-
|
|
93
|
-
|
|
185
|
+
--smrt-radius-extra-small: 0.25rem;
|
|
186
|
+
--smrt-radius-small: 0.25rem;
|
|
187
|
+
--smrt-radius-medium: 0.5rem;
|
|
188
|
+
--smrt-radius-large: 0.75rem;
|
|
189
|
+
--smrt-radius-extra-large: 1rem;
|
|
94
190
|
--smrt-elevation-0: none;
|
|
95
191
|
--smrt-elevation-1: inset 0 0 0 1px rgba(60, 64, 67, 0.08);
|
|
96
192
|
--smrt-elevation-2: 0 1px 2px 0 rgba(60, 64, 67, 0.08), 0 1px 3px 0 rgba(60, 64, 67, 0.04);
|
|
97
193
|
--smrt-elevation-3: 0 2px 4px 0 rgba(60, 64, 67, 0.1), 0 1px 2px 0 rgba(60, 64, 67, 0.06);
|
|
98
194
|
--smrt-elevation-4: 0 4px 8px 0 rgba(60, 64, 67, 0.1), 0 2px 4px 0 rgba(60, 64, 67, 0.06);
|
|
99
195
|
--smrt-elevation-5: 0 8px 16px 0 rgba(60, 64, 67, 0.12), 0 4px 8px 0 rgba(60, 64, 67, 0.06);
|
|
100
|
-
|
|
101
|
-
/* Duration */
|
|
102
196
|
--smrt-duration-instant: 0ms;
|
|
103
197
|
--smrt-duration-fast: 100ms;
|
|
104
198
|
--smrt-duration-normal: 200ms;
|
|
105
199
|
--smrt-duration-slow: 300ms;
|
|
106
200
|
--smrt-duration-slower: 500ms;
|
|
107
|
-
|
|
108
|
-
|
|
201
|
+
--smrt-duration-short1: 50ms;
|
|
202
|
+
--smrt-duration-short2: 100ms;
|
|
203
|
+
--smrt-duration-short3: 150ms;
|
|
204
|
+
--smrt-duration-short4: 200ms;
|
|
205
|
+
--smrt-duration-medium1: 250ms;
|
|
206
|
+
--smrt-duration-medium2: 300ms;
|
|
207
|
+
--smrt-duration-medium3: 350ms;
|
|
208
|
+
--smrt-duration-medium4: 400ms;
|
|
209
|
+
--smrt-duration-long1: 450ms;
|
|
210
|
+
--smrt-duration-long2: 500ms;
|
|
211
|
+
--smrt-duration-long3: 550ms;
|
|
212
|
+
--smrt-duration-long4: 600ms;
|
|
109
213
|
--smrt-easing-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
110
214
|
--smrt-easing-standard-decelerate: cubic-bezier(0, 0, 0.2, 1);
|
|
111
215
|
--smrt-easing-standard-accelerate: cubic-bezier(0.4, 0, 1, 1);
|
|
112
216
|
--smrt-easing-emphasized: cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
113
217
|
--smrt-easing-emphasized-decelerate: cubic-bezier(0.0, 0, 0.2, 1);
|
|
114
218
|
--smrt-easing-emphasized-accelerate: cubic-bezier(0.4, 0, 1, 1);
|
|
219
|
+
--smrt-font-family-mono: ui-monospace, "SF Mono", "Monaco", "Cascadia Code", "Consolas", monospace;
|
|
220
|
+
--smrt-typography-weight-normal: 400;
|
|
221
|
+
--smrt-typography-weight-medium: 500;
|
|
222
|
+
--smrt-typography-weight-semibold: 600;
|
|
223
|
+
--smrt-typography-weight-bold: 700;
|
|
224
|
+
--smrt-z-index-dropdown: 1000;
|
|
225
|
+
--smrt-z-index-sticky: 1100;
|
|
226
|
+
--smrt-z-index-overlay: 1200;
|
|
227
|
+
--smrt-z-index-modal: 1300;
|
|
228
|
+
--smrt-z-index-dialog: 1300;
|
|
229
|
+
--smrt-z-index-popover: 1400;
|
|
230
|
+
--smrt-z-index-toast: 1500;
|
|
231
|
+
--smrt-z-index-tooltip: 1600;
|
|
232
|
+
--smrt-z-index-loading: 1700;
|
|
115
233
|
}
|
|
116
234
|
|
|
117
235
|
[data-theme="studio"][data-color-scheme="dark"] {
|
|
118
|
-
|
|
236
|
+
--smrt-theme-id: studio;
|
|
237
|
+
--smrt-theme-name: Studio;
|
|
238
|
+
--smrt-color-scheme: dark;
|
|
239
|
+
--smrt-font-family: "Google Sans Text", "Roboto", "Segoe UI", system-ui, sans-serif;
|
|
119
240
|
--smrt-color-primary: #8ab4f8;
|
|
120
241
|
--smrt-color-on-primary: #062e6f;
|
|
121
242
|
--smrt-color-primary-container: #174ea6;
|
|
122
243
|
--smrt-color-on-primary-container: #d2e3fc;
|
|
123
|
-
|
|
124
|
-
/* Secondary */
|
|
125
244
|
--smrt-color-secondary: #9aa0a6;
|
|
126
245
|
--smrt-color-on-secondary: #202124;
|
|
127
246
|
--smrt-color-secondary-container: #3c4043;
|
|
128
247
|
--smrt-color-on-secondary-container: #e8eaed;
|
|
129
|
-
|
|
130
|
-
/* Tertiary */
|
|
131
248
|
--smrt-color-tertiary: #c58af9;
|
|
132
249
|
--smrt-color-on-tertiary: #3e1385;
|
|
133
250
|
--smrt-color-tertiary-container: #6b12b8;
|
|
134
251
|
--smrt-color-on-tertiary-container: #f3e8fd;
|
|
135
|
-
|
|
136
|
-
/* Error */
|
|
137
252
|
--smrt-color-error: #f28b82;
|
|
138
253
|
--smrt-color-on-error: #5c150c;
|
|
139
254
|
--smrt-color-error-container: #a50e0e;
|
|
140
255
|
--smrt-color-on-error-container: #fce8e6;
|
|
141
|
-
|
|
142
|
-
/* Warning */
|
|
143
256
|
--smrt-color-warning: #fdd663;
|
|
144
257
|
--smrt-color-on-warning: #5c3d00;
|
|
145
258
|
--smrt-color-warning-container: #92400e;
|
|
146
259
|
--smrt-color-on-warning-container: #fef3c7;
|
|
147
|
-
|
|
148
|
-
/* Success */
|
|
149
260
|
--smrt-color-success: #81c995;
|
|
150
261
|
--smrt-color-on-success: #0d3b1f;
|
|
151
262
|
--smrt-color-success-container: #137333;
|
|
152
263
|
--smrt-color-on-success-container: #e6f4ea;
|
|
153
|
-
|
|
154
|
-
/* Surface - Near black */
|
|
155
264
|
--smrt-color-surface: #0e0e0e;
|
|
156
265
|
--smrt-color-on-surface: #e8eaed;
|
|
157
266
|
--smrt-color-surface-variant: #1f1f1f;
|
|
@@ -163,31 +272,133 @@
|
|
|
163
272
|
--smrt-color-surface-container-lowest: #0a0a0a;
|
|
164
273
|
--smrt-color-surface-dim: #141414;
|
|
165
274
|
--smrt-color-surface-bright: #2d2d2d;
|
|
166
|
-
|
|
167
|
-
/* Background */
|
|
168
275
|
--smrt-color-background: #0e0e0e;
|
|
169
276
|
--smrt-color-on-background: #e8eaed;
|
|
170
|
-
|
|
171
|
-
/* Outline */
|
|
172
|
-
--smrt-color-outline: #5f6368;
|
|
277
|
+
--smrt-color-outline: #8c8e92;
|
|
173
278
|
--smrt-color-outline-variant: #3c4043;
|
|
174
|
-
|
|
175
|
-
/* Inverse */
|
|
176
279
|
--smrt-color-inverse-surface: #e8eaed;
|
|
177
280
|
--smrt-color-inverse-on-surface: #202124;
|
|
178
281
|
--smrt-color-inverse-primary: #1a73e8;
|
|
179
|
-
|
|
180
|
-
/* Effects */
|
|
181
282
|
--smrt-color-shadow: rgba(0, 0, 0, 0.3);
|
|
182
283
|
--smrt-color-scrim: rgba(0, 0, 0, 0.7);
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
--smrt-
|
|
186
|
-
--smrt-
|
|
187
|
-
--smrt-
|
|
188
|
-
--smrt-font
|
|
189
|
-
|
|
190
|
-
|
|
284
|
+
--smrt-typography-display-large-size: 3rem;
|
|
285
|
+
--smrt-typography-display-large-line-height: 1.1;
|
|
286
|
+
--smrt-typography-display-large-weight: 400;
|
|
287
|
+
--smrt-typography-display-large-tracking: -0.01em;
|
|
288
|
+
--smrt-typography-display-large-font-family: var(--smrt-font-family);
|
|
289
|
+
--smrt-typography-display-large-font: 400 3rem/1.1 var(--smrt-font-family);
|
|
290
|
+
--smrt-typography-display-medium-size: 2.5rem;
|
|
291
|
+
--smrt-typography-display-medium-line-height: 1.15;
|
|
292
|
+
--smrt-typography-display-medium-weight: 400;
|
|
293
|
+
--smrt-typography-display-medium-tracking: -0.008em;
|
|
294
|
+
--smrt-typography-display-medium-font-family: var(--smrt-font-family);
|
|
295
|
+
--smrt-typography-display-medium-font: 400 2.5rem/1.15 var(--smrt-font-family);
|
|
296
|
+
--smrt-typography-display-small-size: 2rem;
|
|
297
|
+
--smrt-typography-display-small-line-height: 1.2;
|
|
298
|
+
--smrt-typography-display-small-weight: 400;
|
|
299
|
+
--smrt-typography-display-small-tracking: -0.005em;
|
|
300
|
+
--smrt-typography-display-small-font-family: var(--smrt-font-family);
|
|
301
|
+
--smrt-typography-display-small-font: 400 2rem/1.2 var(--smrt-font-family);
|
|
302
|
+
--smrt-typography-headline-large-size: 1.75rem;
|
|
303
|
+
--smrt-typography-headline-large-line-height: 1.25;
|
|
304
|
+
--smrt-typography-headline-large-weight: 400;
|
|
305
|
+
--smrt-typography-headline-large-tracking: 0;
|
|
306
|
+
--smrt-typography-headline-large-font-family: var(--smrt-font-family);
|
|
307
|
+
--smrt-typography-headline-large-font: 400 1.75rem/1.25 var(--smrt-font-family);
|
|
308
|
+
--smrt-typography-headline-medium-size: 1.5rem;
|
|
309
|
+
--smrt-typography-headline-medium-line-height: 1.3;
|
|
310
|
+
--smrt-typography-headline-medium-weight: 400;
|
|
311
|
+
--smrt-typography-headline-medium-tracking: 0;
|
|
312
|
+
--smrt-typography-headline-medium-font-family: var(--smrt-font-family);
|
|
313
|
+
--smrt-typography-headline-medium-font: 400 1.5rem/1.3 var(--smrt-font-family);
|
|
314
|
+
--smrt-typography-headline-small-size: 1.25rem;
|
|
315
|
+
--smrt-typography-headline-small-line-height: 1.35;
|
|
316
|
+
--smrt-typography-headline-small-weight: 500;
|
|
317
|
+
--smrt-typography-headline-small-tracking: 0;
|
|
318
|
+
--smrt-typography-headline-small-font-family: var(--smrt-font-family);
|
|
319
|
+
--smrt-typography-headline-small-font: 500 1.25rem/1.35 var(--smrt-font-family);
|
|
320
|
+
--smrt-typography-title-large-size: 1.125rem;
|
|
321
|
+
--smrt-typography-title-large-line-height: 1.4;
|
|
322
|
+
--smrt-typography-title-large-weight: 500;
|
|
323
|
+
--smrt-typography-title-large-tracking: 0;
|
|
324
|
+
--smrt-typography-title-large-font-family: var(--smrt-font-family);
|
|
325
|
+
--smrt-typography-title-large-font: 500 1.125rem/1.4 var(--smrt-font-family);
|
|
326
|
+
--smrt-typography-title-medium-size: 1rem;
|
|
327
|
+
--smrt-typography-title-medium-line-height: 1.5;
|
|
328
|
+
--smrt-typography-title-medium-weight: 500;
|
|
329
|
+
--smrt-typography-title-medium-tracking: 0.01em;
|
|
330
|
+
--smrt-typography-title-medium-font-family: var(--smrt-font-family);
|
|
331
|
+
--smrt-typography-title-medium-font: 500 1rem/1.5 var(--smrt-font-family);
|
|
332
|
+
--smrt-typography-title-small-size: 0.875rem;
|
|
333
|
+
--smrt-typography-title-small-line-height: 1.5;
|
|
334
|
+
--smrt-typography-title-small-weight: 500;
|
|
335
|
+
--smrt-typography-title-small-tracking: 0.01em;
|
|
336
|
+
--smrt-typography-title-small-font-family: var(--smrt-font-family);
|
|
337
|
+
--smrt-typography-title-small-font: 500 0.875rem/1.5 var(--smrt-font-family);
|
|
338
|
+
--smrt-typography-body-large-size: 1rem;
|
|
339
|
+
--smrt-typography-body-large-line-height: 1.6;
|
|
340
|
+
--smrt-typography-body-large-weight: 400;
|
|
341
|
+
--smrt-typography-body-large-tracking: 0;
|
|
342
|
+
--smrt-typography-body-large-font-family: var(--smrt-font-family);
|
|
343
|
+
--smrt-typography-body-large-font: 400 1rem/1.6 var(--smrt-font-family);
|
|
344
|
+
--smrt-typography-body-medium-size: 0.875rem;
|
|
345
|
+
--smrt-typography-body-medium-line-height: 1.6;
|
|
346
|
+
--smrt-typography-body-medium-weight: 400;
|
|
347
|
+
--smrt-typography-body-medium-tracking: 0;
|
|
348
|
+
--smrt-typography-body-medium-font-family: var(--smrt-font-family);
|
|
349
|
+
--smrt-typography-body-medium-font: 400 0.875rem/1.6 var(--smrt-font-family);
|
|
350
|
+
--smrt-typography-body-small-size: 0.75rem;
|
|
351
|
+
--smrt-typography-body-small-line-height: 1.5;
|
|
352
|
+
--smrt-typography-body-small-weight: 400;
|
|
353
|
+
--smrt-typography-body-small-tracking: 0.01em;
|
|
354
|
+
--smrt-typography-body-small-font-family: var(--smrt-font-family);
|
|
355
|
+
--smrt-typography-body-small-font: 400 0.75rem/1.5 var(--smrt-font-family);
|
|
356
|
+
--smrt-typography-label-large-size: 0.875rem;
|
|
357
|
+
--smrt-typography-label-large-line-height: 1.5;
|
|
358
|
+
--smrt-typography-label-large-weight: 500;
|
|
359
|
+
--smrt-typography-label-large-tracking: 0.02em;
|
|
360
|
+
--smrt-typography-label-large-font-family: var(--smrt-font-family);
|
|
361
|
+
--smrt-typography-label-large-font: 500 0.875rem/1.5 var(--smrt-font-family);
|
|
362
|
+
--smrt-typography-label-medium-size: 0.75rem;
|
|
363
|
+
--smrt-typography-label-medium-line-height: 1.5;
|
|
364
|
+
--smrt-typography-label-medium-weight: 500;
|
|
365
|
+
--smrt-typography-label-medium-tracking: 0.025em;
|
|
366
|
+
--smrt-typography-label-medium-font-family: var(--smrt-font-family);
|
|
367
|
+
--smrt-typography-label-medium-font: 500 0.75rem/1.5 var(--smrt-font-family);
|
|
368
|
+
--smrt-typography-label-small-size: 0.6875rem;
|
|
369
|
+
--smrt-typography-label-small-line-height: 1.4;
|
|
370
|
+
--smrt-typography-label-small-weight: 500;
|
|
371
|
+
--smrt-typography-label-small-tracking: 0.03em;
|
|
372
|
+
--smrt-typography-label-small-font-family: var(--smrt-font-family);
|
|
373
|
+
--smrt-typography-label-small-font: 500 0.6875rem/1.4 var(--smrt-font-family);
|
|
374
|
+
--smrt-spacing-0: 0;
|
|
375
|
+
--smrt-spacing-1: 0.25rem;
|
|
376
|
+
--smrt-spacing-2: 0.5rem;
|
|
377
|
+
--smrt-spacing-3: 0.75rem;
|
|
378
|
+
--smrt-spacing-4: 1rem;
|
|
379
|
+
--smrt-spacing-5: 1.25rem;
|
|
380
|
+
--smrt-spacing-6: 1.5rem;
|
|
381
|
+
--smrt-spacing-7: 1.75rem;
|
|
382
|
+
--smrt-spacing-8: 2rem;
|
|
383
|
+
--smrt-spacing-9: 2.25rem;
|
|
384
|
+
--smrt-spacing-10: 2.5rem;
|
|
385
|
+
--smrt-spacing-11: 2.75rem;
|
|
386
|
+
--smrt-spacing-12: 3rem;
|
|
387
|
+
--smrt-spacing-14: 3.5rem;
|
|
388
|
+
--smrt-spacing-16: 4rem;
|
|
389
|
+
--smrt-spacing-20: 5rem;
|
|
390
|
+
--smrt-spacing-24: 6rem;
|
|
391
|
+
--smrt-spacing-0_5: 0.125rem;
|
|
392
|
+
--smrt-spacing-1_5: 0.375rem;
|
|
393
|
+
--smrt-spacing-2_5: 0.625rem;
|
|
394
|
+
--smrt-spacing-3_5: 0.875rem;
|
|
395
|
+
--smrt-spacing-xs: 0.25rem;
|
|
396
|
+
--smrt-spacing-sm: 0.5rem;
|
|
397
|
+
--smrt-spacing-md: 1rem;
|
|
398
|
+
--smrt-spacing-lg: 1.5rem;
|
|
399
|
+
--smrt-spacing-xl: 2rem;
|
|
400
|
+
--smrt-spacing-2xl: 3rem;
|
|
401
|
+
--smrt-spacing-3xl: 4rem;
|
|
191
402
|
--smrt-radius-none: 0;
|
|
192
403
|
--smrt-radius-sm: 0.25rem;
|
|
193
404
|
--smrt-radius-md: 0.5rem;
|
|
@@ -196,29 +407,54 @@
|
|
|
196
407
|
--smrt-radius-2xl: 1.5rem;
|
|
197
408
|
--smrt-radius-3xl: 2rem;
|
|
198
409
|
--smrt-radius-full: 9999px;
|
|
199
|
-
|
|
200
|
-
|
|
410
|
+
--smrt-radius-extra-small: 0.25rem;
|
|
411
|
+
--smrt-radius-small: 0.25rem;
|
|
412
|
+
--smrt-radius-medium: 0.5rem;
|
|
413
|
+
--smrt-radius-large: 0.75rem;
|
|
414
|
+
--smrt-radius-extra-large: 1rem;
|
|
201
415
|
--smrt-elevation-0: none;
|
|
202
416
|
--smrt-elevation-1: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
|
|
203
417
|
--smrt-elevation-2: 0 1px 2px 0 rgba(0, 0, 0, 0.2), 0 1px 3px 0 rgba(0, 0, 0, 0.1);
|
|
204
418
|
--smrt-elevation-3: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 1px 2px 0 rgba(0, 0, 0, 0.1);
|
|
205
419
|
--smrt-elevation-4: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
|
206
420
|
--smrt-elevation-5: 0 8px 16px 0 rgba(0, 0, 0, 0.25), 0 4px 8px 0 rgba(0, 0, 0, 0.1);
|
|
207
|
-
|
|
208
|
-
/* Duration (same as light) */
|
|
209
421
|
--smrt-duration-instant: 0ms;
|
|
210
422
|
--smrt-duration-fast: 100ms;
|
|
211
423
|
--smrt-duration-normal: 200ms;
|
|
212
424
|
--smrt-duration-slow: 300ms;
|
|
213
425
|
--smrt-duration-slower: 500ms;
|
|
214
|
-
|
|
215
|
-
|
|
426
|
+
--smrt-duration-short1: 50ms;
|
|
427
|
+
--smrt-duration-short2: 100ms;
|
|
428
|
+
--smrt-duration-short3: 150ms;
|
|
429
|
+
--smrt-duration-short4: 200ms;
|
|
430
|
+
--smrt-duration-medium1: 250ms;
|
|
431
|
+
--smrt-duration-medium2: 300ms;
|
|
432
|
+
--smrt-duration-medium3: 350ms;
|
|
433
|
+
--smrt-duration-medium4: 400ms;
|
|
434
|
+
--smrt-duration-long1: 450ms;
|
|
435
|
+
--smrt-duration-long2: 500ms;
|
|
436
|
+
--smrt-duration-long3: 550ms;
|
|
437
|
+
--smrt-duration-long4: 600ms;
|
|
216
438
|
--smrt-easing-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
217
439
|
--smrt-easing-standard-decelerate: cubic-bezier(0, 0, 0.2, 1);
|
|
218
440
|
--smrt-easing-standard-accelerate: cubic-bezier(0.4, 0, 1, 1);
|
|
219
441
|
--smrt-easing-emphasized: cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
220
442
|
--smrt-easing-emphasized-decelerate: cubic-bezier(0.0, 0, 0.2, 1);
|
|
221
443
|
--smrt-easing-emphasized-accelerate: cubic-bezier(0.4, 0, 1, 1);
|
|
444
|
+
--smrt-font-family-mono: ui-monospace, "SF Mono", "Monaco", "Cascadia Code", "Consolas", monospace;
|
|
445
|
+
--smrt-typography-weight-normal: 400;
|
|
446
|
+
--smrt-typography-weight-medium: 500;
|
|
447
|
+
--smrt-typography-weight-semibold: 600;
|
|
448
|
+
--smrt-typography-weight-bold: 700;
|
|
449
|
+
--smrt-z-index-dropdown: 1000;
|
|
450
|
+
--smrt-z-index-sticky: 1100;
|
|
451
|
+
--smrt-z-index-overlay: 1200;
|
|
452
|
+
--smrt-z-index-modal: 1300;
|
|
453
|
+
--smrt-z-index-dialog: 1300;
|
|
454
|
+
--smrt-z-index-popover: 1400;
|
|
455
|
+
--smrt-z-index-toast: 1500;
|
|
456
|
+
--smrt-z-index-tooltip: 1600;
|
|
457
|
+
--smrt-z-index-loading: 1700;
|
|
222
458
|
}
|
|
223
459
|
|
|
224
460
|
/* Studio utility classes for flat design */
|
|
@@ -6,12 +6,20 @@
|
|
|
6
6
|
* to hand-duplicate the provider's storage logic in `app.html`; this helper
|
|
7
7
|
* generates that script from the same config so the two never drift.
|
|
8
8
|
*
|
|
9
|
+
* The script only stamps attributes (`data-theme`, `data-color-scheme`, the
|
|
10
|
+
* `dark` class, `color-scheme` style) — the actual variable values come from
|
|
11
|
+
* the static per-preset stylesheets (`themes/styles/<preset>.css`), which are
|
|
12
|
+
* keyed on exactly those attributes and apply before first paint. This keeps
|
|
13
|
+
* the inline bootstrap ~400 bytes instead of shipping a full preset×scheme
|
|
14
|
+
* variable matrix in every HTML response.
|
|
15
|
+
*
|
|
9
16
|
* Usage (root layout — SSR renders `svelte:head` into the initial HTML, so the
|
|
10
17
|
* script runs before first paint):
|
|
11
18
|
*
|
|
12
19
|
* ```svelte
|
|
13
20
|
* <script lang="ts">
|
|
14
21
|
* import { themeScript } from '@happyvertical/smrt-ui/themes';
|
|
22
|
+
* import '@happyvertical/smrt-ui/themes/styles/all.css';
|
|
15
23
|
* </script>
|
|
16
24
|
*
|
|
17
25
|
* <svelte:head>
|
|
@@ -34,10 +42,10 @@ export interface ThemeScriptOptions {
|
|
|
34
42
|
* Returns the JS body (no `<script>` tags) of a pre-paint bootstrap that
|
|
35
43
|
* mirrors ThemeProvider's persistence: reads the stored config, resolves
|
|
36
44
|
* 'system' via matchMedia, then stamps `data-theme`, `data-color-scheme`,
|
|
37
|
-
* the `dark` class, and `color-scheme` style on <html>.
|
|
38
|
-
*
|
|
39
|
-
* persisted preset/scheme
|
|
40
|
-
*
|
|
45
|
+
* the `dark` class, and `color-scheme` style on <html>. Variable values are
|
|
46
|
+
* delivered by the static stylesheets selected by those attributes, so the
|
|
47
|
+
* persisted preset/scheme paints correctly before hydration with no inline
|
|
48
|
+
* variable payload.
|
|
41
49
|
*/
|
|
42
50
|
export declare function themeScript(options?: ThemeScriptOptions): string;
|
|
43
51
|
//# sourceMappingURL=theme-script.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-script.d.ts","sourceRoot":"","sources":["../../src/themes/theme-script.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"theme-script.d.ts","sourceRoot":"","sources":["../../src/themes/theme-script.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG3D,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sEAAsE;IACtE,kBAAkB,CAAC,EAAE,WAAW,CAAC;CAClC;AASD;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,OAAO,GAAE,kBAAuB,GAAG,MAAM,CAoBpE"}
|
|
@@ -6,12 +6,20 @@
|
|
|
6
6
|
* to hand-duplicate the provider's storage logic in `app.html`; this helper
|
|
7
7
|
* generates that script from the same config so the two never drift.
|
|
8
8
|
*
|
|
9
|
+
* The script only stamps attributes (`data-theme`, `data-color-scheme`, the
|
|
10
|
+
* `dark` class, `color-scheme` style) — the actual variable values come from
|
|
11
|
+
* the static per-preset stylesheets (`themes/styles/<preset>.css`), which are
|
|
12
|
+
* keyed on exactly those attributes and apply before first paint. This keeps
|
|
13
|
+
* the inline bootstrap ~400 bytes instead of shipping a full preset×scheme
|
|
14
|
+
* variable matrix in every HTML response.
|
|
15
|
+
*
|
|
9
16
|
* Usage (root layout — SSR renders `svelte:head` into the initial HTML, so the
|
|
10
17
|
* script runs before first paint):
|
|
11
18
|
*
|
|
12
19
|
* ```svelte
|
|
13
20
|
* <script lang="ts">
|
|
14
21
|
* import { themeScript } from '@happyvertical/smrt-ui/themes';
|
|
22
|
+
* import '@happyvertical/smrt-ui/themes/styles/all.css';
|
|
15
23
|
* </script>
|
|
16
24
|
*
|
|
17
25
|
* <svelte:head>
|
|
@@ -19,8 +27,7 @@
|
|
|
19
27
|
* </svelte:head>
|
|
20
28
|
* ```
|
|
21
29
|
*/
|
|
22
|
-
import {
|
|
23
|
-
import { getTheme, getThemeOptions } from './registry.js';
|
|
30
|
+
import { getThemeOptions } from './registry.js';
|
|
24
31
|
import { defaultThemeConfig } from './types.js';
|
|
25
32
|
function inlineJSON(value) {
|
|
26
33
|
return JSON.stringify(value)
|
|
@@ -28,17 +35,14 @@ function inlineJSON(value) {
|
|
|
28
35
|
.replace(/\u2028/g, '\\u2028')
|
|
29
36
|
.replace(/\u2029/g, '\\u2029');
|
|
30
37
|
}
|
|
31
|
-
function bootstrapVariableName(variable) {
|
|
32
|
-
return variable.replace(/^--smrt-/, '--smrt-bootstrap-');
|
|
33
|
-
}
|
|
34
38
|
/**
|
|
35
39
|
* Returns the JS body (no `<script>` tags) of a pre-paint bootstrap that
|
|
36
40
|
* mirrors ThemeProvider's persistence: reads the stored config, resolves
|
|
37
41
|
* 'system' via matchMedia, then stamps `data-theme`, `data-color-scheme`,
|
|
38
|
-
* the `dark` class, and `color-scheme` style on <html>.
|
|
39
|
-
*
|
|
40
|
-
* persisted preset/scheme
|
|
41
|
-
*
|
|
42
|
+
* the `dark` class, and `color-scheme` style on <html>. Variable values are
|
|
43
|
+
* delivered by the static stylesheets selected by those attributes, so the
|
|
44
|
+
* persisted preset/scheme paints correctly before hydration with no inline
|
|
45
|
+
* variable payload.
|
|
42
46
|
*/
|
|
43
47
|
export function themeScript(options = {}) {
|
|
44
48
|
const presetNames = getThemeOptions().map(({ value }) => value);
|
|
@@ -52,17 +56,8 @@ export function themeScript(options = {}) {
|
|
|
52
56
|
const fallback = ['light', 'dark', 'system'].includes(requestedFallback)
|
|
53
57
|
? requestedFallback
|
|
54
58
|
: defaultThemeConfig.colorScheme;
|
|
55
|
-
const variableNames = Array.from(new Set(presetNames.flatMap((name) => [
|
|
56
|
-
...Object.keys(generateThemeVariables(getTheme(name), false)),
|
|
57
|
-
...Object.keys(generateThemeVariables(getTheme(name), true)),
|
|
58
|
-
])));
|
|
59
|
-
const bootstrapNames = variableNames.map(bootstrapVariableName);
|
|
60
|
-
const variableRows = presetNames.flatMap((name) => [false, true].map((dark) => {
|
|
61
|
-
const variables = generateThemeVariables(getTheme(name), dark);
|
|
62
|
-
return variableNames.map((variable) => variables[variable] ?? '');
|
|
63
|
-
}));
|
|
64
59
|
// Keep this dependency-free and ES5-ish: it runs inline in every browser
|
|
65
60
|
// before any framework code. Must stay in sync with
|
|
66
61
|
// ThemeProvider.svelte's loadPersistedConfig()/resolvedScheme.
|
|
67
|
-
return `(function(){try{var presets=${inlineJSON(presetNames)};var
|
|
62
|
+
return `(function(){try{var presets=${inlineJSON(presetNames)};var scheme=${inlineJSON(fallback)};var preset=${inlineJSON(preset)};${persist ? `try{var raw=localStorage.getItem(${inlineJSON(storageKey)});if(raw){var data=JSON.parse(raw);if(data&&typeof data==='object'){if(data.colorScheme==='light'||data.colorScheme==='dark'||data.colorScheme==='system')scheme=data.colorScheme;if(typeof data.preset==='string'&&presets.indexOf(data.preset)!==-1)preset=data.preset;}}}catch(_){}` : ''}if(scheme==='system'){scheme=window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light';}var el=document.documentElement;el.setAttribute('data-theme',preset);el.setAttribute('data-color-scheme',scheme);el.classList.toggle('dark',scheme==='dark');el.style.colorScheme=scheme;}catch(_){}})();`;
|
|
68
63
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-ui",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.69",
|
|
4
4
|
"description": "Domain-agnostic Svelte 5 UI runtime for SMRT: primitives, i18n client, theme system, and module UI registry",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
},
|
|
125
125
|
"dependencies": {
|
|
126
126
|
"esm-env": "^1.2.2",
|
|
127
|
-
"@happyvertical/smrt-types": "0.40.
|
|
127
|
+
"@happyvertical/smrt-types": "0.40.69"
|
|
128
128
|
},
|
|
129
129
|
"peerDependencies": {
|
|
130
130
|
"svelte": "^5.56.4"
|
|
@@ -152,6 +152,7 @@
|
|
|
152
152
|
"build": "svelte-package -i src --tsconfig tsconfig.svelte.json",
|
|
153
153
|
"dev": "svelte-package -i src --watch",
|
|
154
154
|
"check": "pnpm exec svelte-check --tsconfig ./tsconfig.svelte.json",
|
|
155
|
+
"generate:themes": "tsx scripts/generate-theme-styles.ts",
|
|
155
156
|
"test": "vitest run",
|
|
156
157
|
"typecheck": "tsc --noEmit && node ../../scripts/svelte-check-a11y.mjs --tsconfig ./tsconfig.svelte.json",
|
|
157
158
|
"verify:pack": "node ../../scripts/verify-package-types-exports.js ."
|