@ebtgames/theme 0.1.2 → 0.1.4
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/index.d.ts +294 -1
- package/dist/index.js +1362 -107
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -6,69 +6,67 @@ import { defineTokens } from "@chakra-ui/react";
|
|
|
6
6
|
var colors = defineTokens.colors({
|
|
7
7
|
// Surface Colors (deep purple monochrome)
|
|
8
8
|
surface: {
|
|
9
|
-
0: { value: "
|
|
9
|
+
0: { value: "var(--color-surface-0)" },
|
|
10
10
|
// Base background - darkest
|
|
11
|
-
1: { value: "
|
|
11
|
+
1: { value: "var(--color-surface-1)" },
|
|
12
12
|
// Elevated surfaces
|
|
13
|
-
2: { value: "
|
|
13
|
+
2: { value: "var(--color-surface-2)" },
|
|
14
14
|
// Cards/panels
|
|
15
|
-
3: { value: "
|
|
15
|
+
3: { value: "var(--color-surface-3)" }
|
|
16
16
|
// Raised/hover states
|
|
17
17
|
},
|
|
18
18
|
// Text Colors (WCAG AA verified)
|
|
19
19
|
text: {
|
|
20
|
-
primary: { value: "
|
|
20
|
+
primary: { value: "var(--color-text-primary)" },
|
|
21
21
|
// 16.49:1 contrast
|
|
22
|
-
secondary: { value: "
|
|
22
|
+
secondary: { value: "var(--color-text-secondary)" },
|
|
23
23
|
// 12.29:1 contrast
|
|
24
|
-
muted: { value: "
|
|
24
|
+
muted: { value: "var(--color-text-muted)" },
|
|
25
25
|
// 8.72:1 contrast
|
|
26
|
-
disabled: { value: "
|
|
26
|
+
disabled: { value: "var(--color-text-disabled)" }
|
|
27
27
|
// 6.32:1 contrast
|
|
28
28
|
},
|
|
29
29
|
// Primary (Purple - interactive)
|
|
30
30
|
primary: {
|
|
31
|
-
DEFAULT: { value: "
|
|
32
|
-
hover: { value: "
|
|
31
|
+
DEFAULT: { value: "var(--color-interactive-primary)" },
|
|
32
|
+
hover: { value: "var(--color-interactive-primary-hover)" }
|
|
33
33
|
},
|
|
34
34
|
// Utility (Teal - complementary)
|
|
35
35
|
utility: {
|
|
36
|
-
DEFAULT: { value: "
|
|
37
|
-
hover: { value: "
|
|
36
|
+
DEFAULT: { value: "var(--color-interactive-secondary)" },
|
|
37
|
+
hover: { value: "var(--color-interactive-secondary-hover)" }
|
|
38
38
|
},
|
|
39
39
|
// Emphasis (Rose - sparingly)
|
|
40
40
|
emphasis: {
|
|
41
|
-
DEFAULT: { value: "
|
|
41
|
+
DEFAULT: { value: "var(--color-interactive-accent)" }
|
|
42
42
|
},
|
|
43
43
|
// Border Colors (neutral gray)
|
|
44
44
|
border: {
|
|
45
|
-
subtle: { value: "
|
|
46
|
-
strong: { value: "
|
|
45
|
+
subtle: { value: "var(--color-border-subtle)" },
|
|
46
|
+
strong: { value: "var(--color-border-strong)" }
|
|
47
47
|
},
|
|
48
48
|
// Status Colors
|
|
49
49
|
status: {
|
|
50
|
-
success: { value: "
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
error: { value: "#D8524D" }
|
|
55
|
-
// Red
|
|
50
|
+
success: { value: "var(--color-status-success)" },
|
|
51
|
+
warning: { value: "var(--color-status-warning)" },
|
|
52
|
+
error: { value: "var(--color-status-error)" },
|
|
53
|
+
info: { value: "var(--color-status-info)" }
|
|
56
54
|
},
|
|
57
55
|
// Overlays (purple-based transparency)
|
|
58
56
|
overlay: {
|
|
59
|
-
subtle: { value: "
|
|
60
|
-
//
|
|
61
|
-
light: { value: "
|
|
62
|
-
//
|
|
63
|
-
medium: { value: "
|
|
64
|
-
//
|
|
65
|
-
heavy: { value: "
|
|
66
|
-
//
|
|
67
|
-
error: { value: "
|
|
57
|
+
subtle: { value: "var(--color-overlay-subtle)" },
|
|
58
|
+
// Hover tint
|
|
59
|
+
light: { value: "var(--color-overlay-light)" },
|
|
60
|
+
// Selected
|
|
61
|
+
medium: { value: "var(--color-overlay-medium)" },
|
|
62
|
+
// Active
|
|
63
|
+
heavy: { value: "var(--color-overlay-heavy)" },
|
|
64
|
+
// Emphasis
|
|
65
|
+
error: { value: "var(--color-overlay-error)" },
|
|
68
66
|
// Error tint
|
|
69
67
|
backdrop: {
|
|
70
|
-
light: { value: "
|
|
71
|
-
heavy: { value: "
|
|
68
|
+
light: { value: "var(--color-overlay-backdrop-light)" },
|
|
69
|
+
heavy: { value: "var(--color-overlay-backdrop-heavy)" }
|
|
72
70
|
}
|
|
73
71
|
}
|
|
74
72
|
});
|
|
@@ -76,117 +74,122 @@ var colors = defineTokens.colors({
|
|
|
76
74
|
// src/tokens/typography.ts
|
|
77
75
|
import { defineTokens as defineTokens2 } from "@chakra-ui/react";
|
|
78
76
|
var fonts = defineTokens2.fonts({
|
|
79
|
-
display: { value: "
|
|
80
|
-
heading: { value: "
|
|
81
|
-
body: { value: "
|
|
77
|
+
display: { value: "var(--font-display)" },
|
|
78
|
+
heading: { value: "var(--font-heading)" },
|
|
79
|
+
body: { value: "var(--font-body)" }
|
|
82
80
|
});
|
|
83
81
|
var fontSizes = defineTokens2.fontSizes({
|
|
84
|
-
xs: { value: "
|
|
82
|
+
xs: { value: "var(--font-size-xs)" },
|
|
85
83
|
// 12px - helper text
|
|
86
|
-
sm: { value: "
|
|
84
|
+
sm: { value: "var(--font-size-sm)" },
|
|
87
85
|
// 14px - secondary labels
|
|
88
|
-
base: { value: "
|
|
86
|
+
base: { value: "var(--font-size-base)" },
|
|
89
87
|
// 16px - body text
|
|
90
|
-
md: { value: "
|
|
88
|
+
md: { value: "var(--font-size-md)" },
|
|
91
89
|
// 18px - emphasized body
|
|
92
|
-
lg: { value: "
|
|
90
|
+
lg: { value: "var(--font-size-lg)" },
|
|
93
91
|
// 20px - section headings
|
|
94
|
-
xl: { value: "
|
|
92
|
+
xl: { value: "var(--font-size-xl)" },
|
|
95
93
|
// 24px - modal titles
|
|
96
|
-
"2xl": { value: "
|
|
94
|
+
"2xl": { value: "var(--font-size-2xl)" },
|
|
97
95
|
// 32px - page titles
|
|
98
|
-
"3xl": { value: "
|
|
96
|
+
"3xl": { value: "var(--font-size-3xl)" },
|
|
99
97
|
// 48px - hero text
|
|
100
|
-
"4xl": { value: "
|
|
98
|
+
"4xl": { value: "var(--font-size-4xl)" },
|
|
101
99
|
// 64px - display text
|
|
102
100
|
// Responsive sizes
|
|
103
|
-
cell: { value: "
|
|
104
|
-
hero: { value: "
|
|
105
|
-
subtitle: { value: "
|
|
101
|
+
cell: { value: "var(--font-size-cell)" },
|
|
102
|
+
hero: { value: "var(--font-size-hero)" },
|
|
103
|
+
subtitle: { value: "var(--font-size-subtitle)" }
|
|
106
104
|
});
|
|
107
105
|
var fontWeights = defineTokens2.fontWeights({
|
|
108
|
-
normal: { value:
|
|
109
|
-
medium: { value:
|
|
110
|
-
bold: { value:
|
|
106
|
+
normal: { value: "var(--font-weight-normal)" },
|
|
107
|
+
medium: { value: "var(--font-weight-medium)" },
|
|
108
|
+
bold: { value: "var(--font-weight-bold)" }
|
|
111
109
|
});
|
|
112
110
|
var letterSpacings = defineTokens2.letterSpacings({
|
|
113
|
-
tight: { value: "
|
|
114
|
-
normal: { value: "
|
|
115
|
-
wide: { value: "
|
|
111
|
+
tight: { value: "var(--letter-spacing-tight)" },
|
|
112
|
+
normal: { value: "var(--letter-spacing-normal)" },
|
|
113
|
+
wide: { value: "var(--letter-spacing-wide)" }
|
|
116
114
|
});
|
|
117
115
|
|
|
118
116
|
// src/tokens/spacing.ts
|
|
119
117
|
import { defineTokens as defineTokens3 } from "@chakra-ui/react";
|
|
120
118
|
var spacing = defineTokens3.spacing({
|
|
121
|
-
"2xs": { value: "
|
|
119
|
+
"2xs": { value: "var(--spacing-2xs)" },
|
|
122
120
|
// 2px - micro gaps
|
|
123
|
-
xs: { value: "
|
|
121
|
+
xs: { value: "var(--spacing-xs)" },
|
|
124
122
|
// 4px
|
|
125
|
-
sm: { value: "
|
|
123
|
+
sm: { value: "var(--spacing-sm)" },
|
|
126
124
|
// 8px
|
|
127
|
-
md: { value: "
|
|
125
|
+
md: { value: "var(--spacing-md)" },
|
|
128
126
|
// 16px
|
|
129
|
-
lg: { value: "
|
|
127
|
+
lg: { value: "var(--spacing-lg)" },
|
|
130
128
|
// 24px
|
|
131
|
-
xl: { value: "
|
|
129
|
+
xl: { value: "var(--spacing-xl)" },
|
|
132
130
|
// 32px
|
|
133
|
-
"2xl": { value: "
|
|
131
|
+
"2xl": { value: "var(--spacing-2xl)" }
|
|
134
132
|
// 48px
|
|
135
133
|
});
|
|
136
134
|
|
|
137
135
|
// src/tokens/borders.ts
|
|
138
136
|
import { defineTokens as defineTokens4 } from "@chakra-ui/react";
|
|
139
137
|
var borderWidths = defineTokens4.borderWidths({
|
|
140
|
-
thin: { value: "
|
|
141
|
-
base: { value: "
|
|
142
|
-
thick: { value: "
|
|
138
|
+
thin: { value: "var(--border-width-thin)" },
|
|
139
|
+
base: { value: "var(--border-width-base)" },
|
|
140
|
+
thick: { value: "var(--border-width-thick)" }
|
|
143
141
|
});
|
|
144
142
|
var radii = defineTokens4.radii({
|
|
145
|
-
sm: { value: "
|
|
146
|
-
md: { value: "
|
|
147
|
-
lg: { value: "
|
|
143
|
+
sm: { value: "var(--radius-sm)" },
|
|
144
|
+
md: { value: "var(--radius-md)" },
|
|
145
|
+
lg: { value: "var(--radius-lg)" }
|
|
148
146
|
});
|
|
149
147
|
|
|
150
148
|
// src/tokens/shadows.ts
|
|
151
149
|
import { defineTokens as defineTokens5 } from "@chakra-ui/react";
|
|
152
150
|
var shadows = defineTokens5.shadows({
|
|
153
151
|
// Depth shadows (layered)
|
|
154
|
-
xs: { value: "
|
|
155
|
-
sm: { value: "
|
|
156
|
-
md: { value: "
|
|
157
|
-
lg: { value: "
|
|
158
|
-
xl: { value: "
|
|
152
|
+
xs: { value: "var(--shadow-xs)" },
|
|
153
|
+
sm: { value: "var(--shadow-sm)" },
|
|
154
|
+
md: { value: "var(--shadow-md)" },
|
|
155
|
+
lg: { value: "var(--shadow-lg)" },
|
|
156
|
+
xl: { value: "var(--shadow-xl)" },
|
|
159
157
|
// Glow shadows (primary - purple)
|
|
160
158
|
glow: {
|
|
161
|
-
primary: { value: "
|
|
162
|
-
"primary-lg": { value: "
|
|
163
|
-
"primary-xl": { value: "
|
|
164
|
-
//
|
|
165
|
-
|
|
166
|
-
"
|
|
167
|
-
//
|
|
168
|
-
|
|
169
|
-
"
|
|
159
|
+
primary: { value: "var(--shadow-glow-primary)" },
|
|
160
|
+
"primary-lg": { value: "var(--shadow-glow-primary-lg)" },
|
|
161
|
+
"primary-xl": { value: "var(--shadow-glow-primary-xl)" },
|
|
162
|
+
// Secondary (teal)
|
|
163
|
+
secondary: { value: "var(--shadow-glow-secondary)" },
|
|
164
|
+
"secondary-lg": { value: "var(--shadow-glow-secondary-lg)" },
|
|
165
|
+
// Accent (rose)
|
|
166
|
+
accent: { value: "var(--shadow-glow-accent)" },
|
|
167
|
+
"accent-lg": { value: "var(--shadow-glow-accent-lg)" },
|
|
168
|
+
// Legacy aliases for backward compatibility
|
|
169
|
+
utility: { value: "var(--shadow-glow-secondary)" },
|
|
170
|
+
"utility-lg": { value: "var(--shadow-glow-secondary-lg)" },
|
|
171
|
+
emphasis: { value: "var(--shadow-glow-accent)" },
|
|
172
|
+
"emphasis-lg": { value: "var(--shadow-glow-accent-lg)" },
|
|
170
173
|
// Error (red)
|
|
171
|
-
error: { value: "
|
|
174
|
+
error: { value: "var(--shadow-glow-error)" }
|
|
172
175
|
},
|
|
173
176
|
// Inset shadows
|
|
174
177
|
inset: {
|
|
175
|
-
primary: { value: "inset
|
|
176
|
-
subtle: { value: "inset
|
|
177
|
-
deep: { value: "inset
|
|
178
|
+
primary: { value: "var(--shadow-inset-primary)" },
|
|
179
|
+
subtle: { value: "var(--shadow-inset-subtle)" },
|
|
180
|
+
deep: { value: "var(--shadow-inset-deep)" }
|
|
178
181
|
}
|
|
179
182
|
});
|
|
180
183
|
|
|
181
184
|
// src/tokens/zIndex.ts
|
|
182
185
|
import { defineTokens as defineTokens6 } from "@chakra-ui/react";
|
|
183
186
|
var zIndex = defineTokens6.zIndex({
|
|
184
|
-
base: { value:
|
|
185
|
-
dropdown: { value:
|
|
186
|
-
overlay: { value:
|
|
187
|
-
modal: { value:
|
|
188
|
-
toast: { value:
|
|
189
|
-
fullscreen: { value:
|
|
187
|
+
base: { value: "var(--z-index-base)" },
|
|
188
|
+
dropdown: { value: "var(--z-index-dropdown)" },
|
|
189
|
+
overlay: { value: "var(--z-index-overlay)" },
|
|
190
|
+
modal: { value: "var(--z-index-modal)" },
|
|
191
|
+
toast: { value: "var(--z-index-toast)" },
|
|
192
|
+
fullscreen: { value: "var(--z-index-fullscreen)" }
|
|
190
193
|
});
|
|
191
194
|
|
|
192
195
|
// src/semanticTokens/colors.ts
|
|
@@ -259,18 +262,35 @@ var keyframes = defineKeyframes({
|
|
|
259
262
|
},
|
|
260
263
|
glow: {
|
|
261
264
|
"0%, 100%": {
|
|
262
|
-
boxShadow: "
|
|
265
|
+
boxShadow: "var(--shadow-glow-primary)"
|
|
263
266
|
},
|
|
264
267
|
"50%": {
|
|
265
|
-
boxShadow: "
|
|
268
|
+
boxShadow: "var(--shadow-glow-primary-lg)"
|
|
266
269
|
}
|
|
267
270
|
},
|
|
271
|
+
glowSecondary: {
|
|
272
|
+
"0%, 100%": {
|
|
273
|
+
boxShadow: "var(--shadow-glow-secondary)"
|
|
274
|
+
},
|
|
275
|
+
"50%": {
|
|
276
|
+
boxShadow: "var(--shadow-glow-secondary-lg)"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
glowAccent: {
|
|
280
|
+
"0%, 100%": {
|
|
281
|
+
boxShadow: "var(--shadow-glow-accent)"
|
|
282
|
+
},
|
|
283
|
+
"50%": {
|
|
284
|
+
boxShadow: "var(--shadow-glow-accent-lg)"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
// Legacy alias for backward compatibility
|
|
268
288
|
glowHighlight: {
|
|
269
289
|
"0%, 100%": {
|
|
270
|
-
boxShadow: "
|
|
290
|
+
boxShadow: "var(--shadow-glow-accent)"
|
|
271
291
|
},
|
|
272
292
|
"50%": {
|
|
273
|
-
boxShadow: "
|
|
293
|
+
boxShadow: "var(--shadow-glow-accent-lg)"
|
|
274
294
|
}
|
|
275
295
|
},
|
|
276
296
|
blink: {
|
|
@@ -296,16 +316,277 @@ var keyframes = defineKeyframes({
|
|
|
296
316
|
transform: "scale(1)",
|
|
297
317
|
opacity: "1"
|
|
298
318
|
}
|
|
319
|
+
},
|
|
320
|
+
scaleOut: {
|
|
321
|
+
from: {
|
|
322
|
+
transform: "scale(1)",
|
|
323
|
+
opacity: "1"
|
|
324
|
+
},
|
|
325
|
+
to: {
|
|
326
|
+
transform: "scale(0.8)",
|
|
327
|
+
opacity: "0"
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
slideInUp: {
|
|
331
|
+
from: {
|
|
332
|
+
transform: "translateY(10px)",
|
|
333
|
+
opacity: "0"
|
|
334
|
+
},
|
|
335
|
+
to: {
|
|
336
|
+
transform: "translateY(0)",
|
|
337
|
+
opacity: "1"
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
slideInDown: {
|
|
341
|
+
from: {
|
|
342
|
+
transform: "translateY(-10px)",
|
|
343
|
+
opacity: "0"
|
|
344
|
+
},
|
|
345
|
+
to: {
|
|
346
|
+
transform: "translateY(0)",
|
|
347
|
+
opacity: "1"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
spin: {
|
|
351
|
+
from: {
|
|
352
|
+
transform: "rotate(0deg)"
|
|
353
|
+
},
|
|
354
|
+
to: {
|
|
355
|
+
transform: "rotate(360deg)"
|
|
356
|
+
}
|
|
299
357
|
}
|
|
300
358
|
});
|
|
301
359
|
|
|
302
360
|
// src/globalStyles.ts
|
|
303
361
|
import { defineGlobalStyles } from "@chakra-ui/react";
|
|
362
|
+
|
|
363
|
+
// src/cssVariables.ts
|
|
364
|
+
var colorVariables = {
|
|
365
|
+
// Surface Colors (deep purple monochrome)
|
|
366
|
+
"--color-surface-0": "#1B0F26",
|
|
367
|
+
// Base background - darkest
|
|
368
|
+
"--color-surface-1": "#24122F",
|
|
369
|
+
// Elevated surfaces
|
|
370
|
+
"--color-surface-2": "#2B173A",
|
|
371
|
+
// Cards/panels
|
|
372
|
+
"--color-surface-3": "#342046",
|
|
373
|
+
// Raised/hover states
|
|
374
|
+
// Text Colors (WCAG AA verified against surface-0)
|
|
375
|
+
"--color-text-primary": "#F5F1FA",
|
|
376
|
+
// 16.49:1 contrast
|
|
377
|
+
"--color-text-secondary": "#D8D0E3",
|
|
378
|
+
// 12.29:1 contrast
|
|
379
|
+
"--color-text-muted": "#B9AEC9",
|
|
380
|
+
// 8.72:1 contrast
|
|
381
|
+
"--color-text-disabled": "#9E92B4",
|
|
382
|
+
// 6.32:1 contrast
|
|
383
|
+
// Interactive - Primary (Purple)
|
|
384
|
+
"--color-interactive-primary": "#7C5BD6",
|
|
385
|
+
"--color-interactive-primary-hover": "#6F4FCB",
|
|
386
|
+
// Interactive - Secondary (Teal)
|
|
387
|
+
"--color-interactive-secondary": "#2AB9B0",
|
|
388
|
+
"--color-interactive-secondary-hover": "#52D6CC",
|
|
389
|
+
// Interactive - Accent (Rose)
|
|
390
|
+
"--color-interactive-accent": "#D86B9A",
|
|
391
|
+
// Border Colors
|
|
392
|
+
"--color-border-subtle": "#3A3341",
|
|
393
|
+
"--color-border-strong": "#4A4354",
|
|
394
|
+
// Status Colors
|
|
395
|
+
"--color-status-success": "#2AB9B0",
|
|
396
|
+
// Teal
|
|
397
|
+
"--color-status-warning": "#D9A24F",
|
|
398
|
+
// Amber
|
|
399
|
+
"--color-status-error": "#D8524D",
|
|
400
|
+
// Red
|
|
401
|
+
"--color-status-info": "#7C5BD6",
|
|
402
|
+
// Purple
|
|
403
|
+
// Overlay Colors (purple-based transparency)
|
|
404
|
+
"--color-overlay-subtle": "rgba(124, 91, 214, 0.05)",
|
|
405
|
+
// Hover tint
|
|
406
|
+
"--color-overlay-light": "rgba(124, 91, 214, 0.1)",
|
|
407
|
+
// Selected
|
|
408
|
+
"--color-overlay-medium": "rgba(124, 91, 214, 0.15)",
|
|
409
|
+
// Active
|
|
410
|
+
"--color-overlay-heavy": "rgba(124, 91, 214, 0.25)",
|
|
411
|
+
// Emphasis
|
|
412
|
+
"--color-overlay-error": "rgba(216, 82, 77, 0.12)",
|
|
413
|
+
// Error tint
|
|
414
|
+
"--color-overlay-backdrop-light": "rgba(27, 15, 38, 0.8)",
|
|
415
|
+
"--color-overlay-backdrop-heavy": "rgba(27, 15, 38, 0.95)"
|
|
416
|
+
};
|
|
417
|
+
var typographyVariables = {
|
|
418
|
+
// Font Families
|
|
419
|
+
"--font-display": "'Courier New', 'Courier', monospace",
|
|
420
|
+
"--font-heading": "'Courier New', 'Courier', monospace",
|
|
421
|
+
"--font-body": "'Courier New', 'Courier', monospace",
|
|
422
|
+
// Font Sizes (static scale)
|
|
423
|
+
"--font-size-xs": "0.75rem",
|
|
424
|
+
// 12px
|
|
425
|
+
"--font-size-sm": "0.875rem",
|
|
426
|
+
// 14px
|
|
427
|
+
"--font-size-base": "1rem",
|
|
428
|
+
// 16px
|
|
429
|
+
"--font-size-md": "1.125rem",
|
|
430
|
+
// 18px
|
|
431
|
+
"--font-size-lg": "1.25rem",
|
|
432
|
+
// 20px
|
|
433
|
+
"--font-size-xl": "1.5rem",
|
|
434
|
+
// 24px
|
|
435
|
+
"--font-size-2xl": "2rem",
|
|
436
|
+
// 32px
|
|
437
|
+
"--font-size-3xl": "3rem",
|
|
438
|
+
// 48px
|
|
439
|
+
"--font-size-4xl": "4rem",
|
|
440
|
+
// 64px
|
|
441
|
+
// Font Sizes (responsive)
|
|
442
|
+
"--font-size-cell": "clamp(1rem, 3vw, 1.5rem)",
|
|
443
|
+
"--font-size-hero": "clamp(2.5rem, 8vw, 4rem)",
|
|
444
|
+
"--font-size-subtitle": "clamp(1rem, 3vw, 1.25rem)",
|
|
445
|
+
// Font Weights
|
|
446
|
+
"--font-weight-normal": "400",
|
|
447
|
+
"--font-weight-medium": "600",
|
|
448
|
+
"--font-weight-bold": "700",
|
|
449
|
+
// Letter Spacing
|
|
450
|
+
"--letter-spacing-tight": "0.05em",
|
|
451
|
+
"--letter-spacing-normal": "0.1em",
|
|
452
|
+
"--letter-spacing-wide": "0.2em"
|
|
453
|
+
};
|
|
454
|
+
var spacingVariables = {
|
|
455
|
+
"--spacing-2xs": "0.125rem",
|
|
456
|
+
// 2px
|
|
457
|
+
"--spacing-xs": "0.25rem",
|
|
458
|
+
// 4px
|
|
459
|
+
"--spacing-sm": "0.5rem",
|
|
460
|
+
// 8px
|
|
461
|
+
"--spacing-md": "1rem",
|
|
462
|
+
// 16px
|
|
463
|
+
"--spacing-lg": "1.5rem",
|
|
464
|
+
// 24px
|
|
465
|
+
"--spacing-xl": "2rem",
|
|
466
|
+
// 32px
|
|
467
|
+
"--spacing-2xl": "3rem"
|
|
468
|
+
// 48px
|
|
469
|
+
};
|
|
470
|
+
var borderVariables = {
|
|
471
|
+
// Border Widths
|
|
472
|
+
"--border-width-thin": "1px",
|
|
473
|
+
"--border-width-base": "2px",
|
|
474
|
+
"--border-width-thick": "3px",
|
|
475
|
+
// Border Radii
|
|
476
|
+
"--radius-sm": "2px",
|
|
477
|
+
"--radius-md": "4px",
|
|
478
|
+
"--radius-lg": "6px"
|
|
479
|
+
};
|
|
480
|
+
var shadowVariables = {
|
|
481
|
+
// Depth shadows (layered)
|
|
482
|
+
"--shadow-xs": "0 1px 2px rgba(0, 0, 0, 0.4)",
|
|
483
|
+
"--shadow-sm": "0 2px 8px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3)",
|
|
484
|
+
"--shadow-md": "0 4px 16px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4)",
|
|
485
|
+
"--shadow-lg": "0 8px 24px rgba(0, 0, 0, 0.7), 0 4px 12px rgba(0, 0, 0, 0.5)",
|
|
486
|
+
"--shadow-xl": "0 16px 48px rgba(0, 0, 0, 0.8), 0 8px 24px rgba(0, 0, 0, 0.6)",
|
|
487
|
+
// Glow shadows - Primary (Purple)
|
|
488
|
+
"--shadow-glow-primary": "0 0 10px rgba(124, 91, 214, 0.4)",
|
|
489
|
+
"--shadow-glow-primary-lg": "0 0 20px rgba(124, 91, 214, 0.5), 0 0 40px rgba(124, 91, 214, 0.3)",
|
|
490
|
+
"--shadow-glow-primary-xl": "0 0 30px rgba(124, 91, 214, 0.6), 0 0 60px rgba(124, 91, 214, 0.4)",
|
|
491
|
+
// Glow shadows - Secondary (Teal)
|
|
492
|
+
"--shadow-glow-secondary": "0 0 10px rgba(42, 185, 176, 0.3)",
|
|
493
|
+
"--shadow-glow-secondary-lg": "0 0 20px rgba(42, 185, 176, 0.4), 0 0 40px rgba(42, 185, 176, 0.2)",
|
|
494
|
+
// Glow shadows - Accent (Rose)
|
|
495
|
+
"--shadow-glow-accent": "0 0 10px rgba(216, 107, 154, 0.3)",
|
|
496
|
+
"--shadow-glow-accent-lg": "0 0 20px rgba(216, 107, 154, 0.4), 0 0 40px rgba(216, 107, 154, 0.2)",
|
|
497
|
+
// Glow shadows - Error
|
|
498
|
+
"--shadow-glow-error": "0 0 10px rgba(216, 82, 77, 0.4)",
|
|
499
|
+
// Inset shadows
|
|
500
|
+
"--shadow-inset-primary": "inset 0 0 10px rgba(124, 91, 214, 0.3)",
|
|
501
|
+
"--shadow-inset-subtle": "inset 0 1px 3px rgba(0, 0, 0, 0.3)",
|
|
502
|
+
"--shadow-inset-deep": "inset 0 2px 8px rgba(0, 0, 0, 0.5)"
|
|
503
|
+
};
|
|
504
|
+
var zIndexVariables = {
|
|
505
|
+
"--z-index-base": "1",
|
|
506
|
+
"--z-index-dropdown": "100",
|
|
507
|
+
"--z-index-overlay": "500",
|
|
508
|
+
"--z-index-modal": "1000",
|
|
509
|
+
"--z-index-toast": "1500",
|
|
510
|
+
"--z-index-fullscreen": "2000"
|
|
511
|
+
};
|
|
512
|
+
var timingVariables = {
|
|
513
|
+
// Durations
|
|
514
|
+
"--timing-fast": "150ms",
|
|
515
|
+
"--timing-base": "200ms",
|
|
516
|
+
"--timing-slow": "300ms",
|
|
517
|
+
// Easing functions
|
|
518
|
+
"--easing-default": "ease",
|
|
519
|
+
"--easing-out": "ease-out",
|
|
520
|
+
"--easing-in-out": "ease-in-out"
|
|
521
|
+
};
|
|
522
|
+
var breakpointVariables = {
|
|
523
|
+
"--breakpoint-mobile": "767px",
|
|
524
|
+
"--breakpoint-tablet": "768px",
|
|
525
|
+
"--breakpoint-desktop": "1024px"
|
|
526
|
+
};
|
|
527
|
+
var legacyAliases = {
|
|
528
|
+
// Color aliases
|
|
529
|
+
"--color-primary": "var(--color-interactive-primary)",
|
|
530
|
+
"--color-primary-hover": "var(--color-interactive-primary-hover)",
|
|
531
|
+
"--color-utility": "var(--color-interactive-secondary)",
|
|
532
|
+
"--color-utility-hover": "var(--color-interactive-secondary-hover)",
|
|
533
|
+
"--color-emphasis": "var(--color-interactive-accent)",
|
|
534
|
+
"--color-success": "var(--color-status-success)",
|
|
535
|
+
"--color-warning": "var(--color-status-warning)",
|
|
536
|
+
"--color-error": "var(--color-status-error)",
|
|
537
|
+
// Shadow glow aliases
|
|
538
|
+
"--shadow-glow-utility": "var(--shadow-glow-secondary)",
|
|
539
|
+
"--shadow-glow-utility-lg": "var(--shadow-glow-secondary-lg)",
|
|
540
|
+
"--shadow-glow-emphasis": "var(--shadow-glow-accent)",
|
|
541
|
+
"--shadow-glow-emphasis-lg": "var(--shadow-glow-accent-lg)",
|
|
542
|
+
// Border radius aliases
|
|
543
|
+
"--border-radius-sm": "var(--radius-sm)",
|
|
544
|
+
"--border-radius-md": "var(--radius-md)",
|
|
545
|
+
"--border-radius-lg": "var(--radius-lg)",
|
|
546
|
+
// Timing aliases
|
|
547
|
+
"--transition-fast": "var(--timing-fast)",
|
|
548
|
+
"--transition-base": "var(--timing-base)",
|
|
549
|
+
"--transition-slow": "var(--timing-slow)",
|
|
550
|
+
"--ease-default": "var(--easing-default)",
|
|
551
|
+
"--ease-out": "var(--easing-out)"
|
|
552
|
+
};
|
|
553
|
+
var allCssVariables = {
|
|
554
|
+
...colorVariables,
|
|
555
|
+
...typographyVariables,
|
|
556
|
+
...spacingVariables,
|
|
557
|
+
...borderVariables,
|
|
558
|
+
...shadowVariables,
|
|
559
|
+
...zIndexVariables,
|
|
560
|
+
...timingVariables,
|
|
561
|
+
...breakpointVariables,
|
|
562
|
+
...legacyAliases
|
|
563
|
+
};
|
|
564
|
+
function getCssVariable(name) {
|
|
565
|
+
return allCssVariables[name];
|
|
566
|
+
}
|
|
567
|
+
function cssVar(name) {
|
|
568
|
+
return `var(${name})`;
|
|
569
|
+
}
|
|
570
|
+
function generateCssVariablesString() {
|
|
571
|
+
return Object.entries(allCssVariables).map(([key, value]) => `${key}: ${value};`).join("\n ");
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
// src/globalStyles.ts
|
|
304
575
|
var globalCss = defineGlobalStyles({
|
|
576
|
+
// Inject CSS variables into :root
|
|
577
|
+
":root": allCssVariables,
|
|
305
578
|
// Universal reset
|
|
306
579
|
"*, *::before, *::after": {
|
|
307
580
|
boxSizing: "border-box"
|
|
308
581
|
},
|
|
582
|
+
// Body base styles
|
|
583
|
+
body: {
|
|
584
|
+
backgroundColor: "var(--color-surface-0)",
|
|
585
|
+
color: "var(--color-text-primary)",
|
|
586
|
+
fontFamily: "var(--font-body)",
|
|
587
|
+
fontSize: "var(--font-size-base)",
|
|
588
|
+
lineHeight: "1.5"
|
|
589
|
+
},
|
|
309
590
|
// Body pseudo-elements for background effects
|
|
310
591
|
"body::before": {
|
|
311
592
|
content: '""',
|
|
@@ -333,28 +614,28 @@ var globalCss = defineGlobalStyles({
|
|
|
333
614
|
height: "8px"
|
|
334
615
|
},
|
|
335
616
|
"::-webkit-scrollbar-track": {
|
|
336
|
-
background: "
|
|
617
|
+
background: "var(--color-surface-1)"
|
|
337
618
|
},
|
|
338
619
|
"::-webkit-scrollbar-thumb": {
|
|
339
|
-
background: "
|
|
340
|
-
borderRadius: "
|
|
620
|
+
background: "var(--color-interactive-secondary)",
|
|
621
|
+
borderRadius: "var(--radius-sm)"
|
|
341
622
|
},
|
|
342
623
|
"::-webkit-scrollbar-thumb:hover": {
|
|
343
|
-
background: "
|
|
624
|
+
background: "var(--color-interactive-secondary-hover)"
|
|
344
625
|
},
|
|
345
626
|
// Firefox scrollbar
|
|
346
627
|
"*": {
|
|
347
628
|
scrollbarWidth: "thin",
|
|
348
|
-
scrollbarColor: "
|
|
629
|
+
scrollbarColor: "var(--color-interactive-secondary) var(--color-surface-1)"
|
|
349
630
|
},
|
|
350
631
|
// Selection styling
|
|
351
632
|
"::selection": {
|
|
352
|
-
background: "
|
|
353
|
-
color: "
|
|
633
|
+
background: "var(--color-interactive-primary)",
|
|
634
|
+
color: "var(--color-text-primary)"
|
|
354
635
|
},
|
|
355
636
|
// Focus visible outline
|
|
356
637
|
":focus-visible": {
|
|
357
|
-
outline: "2px solid
|
|
638
|
+
outline: "2px solid var(--color-interactive-primary)",
|
|
358
639
|
outlineOffset: "2px"
|
|
359
640
|
}
|
|
360
641
|
});
|
|
@@ -541,15 +822,489 @@ var timerRecipe = defineRecipe3({
|
|
|
541
822
|
borderStyle: "solid",
|
|
542
823
|
borderColor: "border.strong",
|
|
543
824
|
background: "surface.1",
|
|
825
|
+
borderRadius: "md",
|
|
826
|
+
boxShadow: "var(--chakra-shadows-sm), inset 0 1px 0 rgba(255, 255, 255, 0.05)",
|
|
544
827
|
justifyContent: "center"
|
|
545
828
|
}
|
|
546
829
|
});
|
|
547
830
|
|
|
831
|
+
// src/recipes/loading.ts
|
|
832
|
+
import { defineRecipe as defineRecipe4 } from "@chakra-ui/react";
|
|
833
|
+
var loadingRecipe = defineRecipe4({
|
|
834
|
+
className: "loading",
|
|
835
|
+
base: {
|
|
836
|
+
display: "inline-block",
|
|
837
|
+
width: "12px",
|
|
838
|
+
height: "12px",
|
|
839
|
+
backgroundColor: "primary.DEFAULT",
|
|
840
|
+
borderRadius: "50%",
|
|
841
|
+
animation: "bounce 1.4s infinite ease-in-out both"
|
|
842
|
+
},
|
|
843
|
+
variants: {
|
|
844
|
+
size: {
|
|
845
|
+
sm: {
|
|
846
|
+
width: "8px",
|
|
847
|
+
height: "8px"
|
|
848
|
+
},
|
|
849
|
+
md: {
|
|
850
|
+
width: "12px",
|
|
851
|
+
height: "12px"
|
|
852
|
+
},
|
|
853
|
+
lg: {
|
|
854
|
+
width: "16px",
|
|
855
|
+
height: "16px"
|
|
856
|
+
}
|
|
857
|
+
},
|
|
858
|
+
color: {
|
|
859
|
+
primary: {
|
|
860
|
+
backgroundColor: "primary.DEFAULT"
|
|
861
|
+
},
|
|
862
|
+
secondary: {
|
|
863
|
+
backgroundColor: "utility.DEFAULT"
|
|
864
|
+
},
|
|
865
|
+
accent: {
|
|
866
|
+
backgroundColor: "emphasis.DEFAULT"
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
defaultVariants: {
|
|
871
|
+
size: "md",
|
|
872
|
+
color: "primary"
|
|
873
|
+
}
|
|
874
|
+
});
|
|
875
|
+
|
|
876
|
+
// src/recipes/input.ts
|
|
877
|
+
import { defineRecipe as defineRecipe5 } from "@chakra-ui/react";
|
|
878
|
+
var inputRecipe = defineRecipe5({
|
|
879
|
+
className: "input",
|
|
880
|
+
base: {
|
|
881
|
+
fontFamily: "body",
|
|
882
|
+
fontSize: "base",
|
|
883
|
+
color: "text.primary",
|
|
884
|
+
backgroundColor: "surface.0",
|
|
885
|
+
borderWidth: "thin",
|
|
886
|
+
borderStyle: "solid",
|
|
887
|
+
borderColor: "border.subtle",
|
|
888
|
+
borderRadius: "md",
|
|
889
|
+
padding: "sm",
|
|
890
|
+
width: "100%",
|
|
891
|
+
transition: "all var(--timing-base) var(--easing-default)",
|
|
892
|
+
_placeholder: {
|
|
893
|
+
color: "text.muted"
|
|
894
|
+
},
|
|
895
|
+
_hover: {
|
|
896
|
+
borderColor: "border.strong"
|
|
897
|
+
},
|
|
898
|
+
_focus: {
|
|
899
|
+
borderColor: "primary.DEFAULT",
|
|
900
|
+
boxShadow: "var(--shadow-glow-primary)",
|
|
901
|
+
outline: "none"
|
|
902
|
+
},
|
|
903
|
+
_disabled: {
|
|
904
|
+
opacity: 0.5,
|
|
905
|
+
cursor: "not-allowed",
|
|
906
|
+
backgroundColor: "surface.1"
|
|
907
|
+
},
|
|
908
|
+
_invalid: {
|
|
909
|
+
borderColor: "status.error",
|
|
910
|
+
boxShadow: "var(--shadow-glow-error)"
|
|
911
|
+
}
|
|
912
|
+
},
|
|
913
|
+
variants: {
|
|
914
|
+
size: {
|
|
915
|
+
sm: {
|
|
916
|
+
fontSize: "sm",
|
|
917
|
+
padding: "xs",
|
|
918
|
+
borderRadius: "sm"
|
|
919
|
+
},
|
|
920
|
+
md: {
|
|
921
|
+
fontSize: "base",
|
|
922
|
+
padding: "sm",
|
|
923
|
+
borderRadius: "md"
|
|
924
|
+
},
|
|
925
|
+
lg: {
|
|
926
|
+
fontSize: "md",
|
|
927
|
+
padding: "md",
|
|
928
|
+
borderRadius: "md"
|
|
929
|
+
}
|
|
930
|
+
},
|
|
931
|
+
variant: {
|
|
932
|
+
outline: {
|
|
933
|
+
backgroundColor: "transparent",
|
|
934
|
+
borderColor: "border.subtle"
|
|
935
|
+
},
|
|
936
|
+
filled: {
|
|
937
|
+
backgroundColor: "surface.1",
|
|
938
|
+
borderColor: "transparent",
|
|
939
|
+
_hover: {
|
|
940
|
+
backgroundColor: "surface.2"
|
|
941
|
+
},
|
|
942
|
+
_focus: {
|
|
943
|
+
backgroundColor: "surface.0",
|
|
944
|
+
borderColor: "primary.DEFAULT"
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
},
|
|
949
|
+
defaultVariants: {
|
|
950
|
+
size: "md",
|
|
951
|
+
variant: "outline"
|
|
952
|
+
}
|
|
953
|
+
});
|
|
954
|
+
|
|
955
|
+
// src/recipes/link.ts
|
|
956
|
+
import { defineRecipe as defineRecipe6 } from "@chakra-ui/react";
|
|
957
|
+
var linkRecipe = defineRecipe6({
|
|
958
|
+
className: "link",
|
|
959
|
+
base: {
|
|
960
|
+
color: "primary.DEFAULT",
|
|
961
|
+
textDecoration: "none",
|
|
962
|
+
cursor: "pointer",
|
|
963
|
+
transition: "all var(--timing-fast) var(--easing-default)",
|
|
964
|
+
_hover: {
|
|
965
|
+
color: "primary.hover",
|
|
966
|
+
textDecoration: "underline"
|
|
967
|
+
},
|
|
968
|
+
_active: {
|
|
969
|
+
color: "primary.hover"
|
|
970
|
+
},
|
|
971
|
+
_focusVisible: {
|
|
972
|
+
outline: "2px solid var(--color-interactive-primary)",
|
|
973
|
+
outlineOffset: "2px",
|
|
974
|
+
borderRadius: "sm"
|
|
975
|
+
}
|
|
976
|
+
},
|
|
977
|
+
variants: {
|
|
978
|
+
variant: {
|
|
979
|
+
primary: {
|
|
980
|
+
color: "primary.DEFAULT",
|
|
981
|
+
_hover: {
|
|
982
|
+
color: "primary.hover"
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
secondary: {
|
|
986
|
+
color: "utility.DEFAULT",
|
|
987
|
+
_hover: {
|
|
988
|
+
color: "utility.hover"
|
|
989
|
+
}
|
|
990
|
+
},
|
|
991
|
+
muted: {
|
|
992
|
+
color: "text.muted",
|
|
993
|
+
_hover: {
|
|
994
|
+
color: "text.primary"
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
},
|
|
998
|
+
underline: {
|
|
999
|
+
always: {
|
|
1000
|
+
textDecoration: "underline"
|
|
1001
|
+
},
|
|
1002
|
+
hover: {
|
|
1003
|
+
textDecoration: "none",
|
|
1004
|
+
_hover: {
|
|
1005
|
+
textDecoration: "underline"
|
|
1006
|
+
}
|
|
1007
|
+
},
|
|
1008
|
+
none: {
|
|
1009
|
+
textDecoration: "none",
|
|
1010
|
+
_hover: {
|
|
1011
|
+
textDecoration: "none"
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
},
|
|
1016
|
+
defaultVariants: {
|
|
1017
|
+
variant: "primary",
|
|
1018
|
+
underline: "hover"
|
|
1019
|
+
}
|
|
1020
|
+
});
|
|
1021
|
+
|
|
1022
|
+
// src/recipes/card.ts
|
|
1023
|
+
import { defineRecipe as defineRecipe7 } from "@chakra-ui/react";
|
|
1024
|
+
var cardRecipe = defineRecipe7({
|
|
1025
|
+
className: "card",
|
|
1026
|
+
base: {
|
|
1027
|
+
background: "linear-gradient(145deg, var(--color-surface-2), var(--color-surface-1))",
|
|
1028
|
+
borderWidth: "thin",
|
|
1029
|
+
borderStyle: "solid",
|
|
1030
|
+
borderColor: "border.subtle",
|
|
1031
|
+
borderRadius: "md",
|
|
1032
|
+
padding: "lg",
|
|
1033
|
+
boxShadow: "var(--shadow-sm)"
|
|
1034
|
+
},
|
|
1035
|
+
variants: {
|
|
1036
|
+
variant: {
|
|
1037
|
+
subtle: {
|
|
1038
|
+
background: "surface.1",
|
|
1039
|
+
borderColor: "border.subtle",
|
|
1040
|
+
boxShadow: "none"
|
|
1041
|
+
},
|
|
1042
|
+
elevated: {
|
|
1043
|
+
background: "linear-gradient(145deg, var(--color-surface-2), var(--color-surface-1))",
|
|
1044
|
+
borderColor: "border.strong",
|
|
1045
|
+
boxShadow: "var(--shadow-md)"
|
|
1046
|
+
},
|
|
1047
|
+
outline: {
|
|
1048
|
+
background: "transparent",
|
|
1049
|
+
borderColor: "border.strong",
|
|
1050
|
+
boxShadow: "none"
|
|
1051
|
+
},
|
|
1052
|
+
glow: {
|
|
1053
|
+
background: "linear-gradient(145deg, var(--color-surface-2), var(--color-surface-1))",
|
|
1054
|
+
borderColor: "primary.DEFAULT",
|
|
1055
|
+
boxShadow: "var(--shadow-md), var(--shadow-glow-primary)"
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
size: {
|
|
1059
|
+
sm: {
|
|
1060
|
+
padding: "sm",
|
|
1061
|
+
borderRadius: "sm"
|
|
1062
|
+
},
|
|
1063
|
+
md: {
|
|
1064
|
+
padding: "md",
|
|
1065
|
+
borderRadius: "md"
|
|
1066
|
+
},
|
|
1067
|
+
lg: {
|
|
1068
|
+
padding: "lg",
|
|
1069
|
+
borderRadius: "lg"
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
},
|
|
1073
|
+
defaultVariants: {
|
|
1074
|
+
variant: "elevated",
|
|
1075
|
+
size: "md"
|
|
1076
|
+
}
|
|
1077
|
+
});
|
|
1078
|
+
|
|
1079
|
+
// src/recipes/badge.ts
|
|
1080
|
+
import { defineRecipe as defineRecipe8 } from "@chakra-ui/react";
|
|
1081
|
+
var badgeRecipe = defineRecipe8({
|
|
1082
|
+
className: "badge",
|
|
1083
|
+
base: {
|
|
1084
|
+
display: "inline-flex",
|
|
1085
|
+
alignItems: "center",
|
|
1086
|
+
justifyContent: "center",
|
|
1087
|
+
fontFamily: "body",
|
|
1088
|
+
fontSize: "xs",
|
|
1089
|
+
fontWeight: "medium",
|
|
1090
|
+
textTransform: "uppercase",
|
|
1091
|
+
letterSpacing: "tight",
|
|
1092
|
+
borderRadius: "sm",
|
|
1093
|
+
whiteSpace: "nowrap"
|
|
1094
|
+
},
|
|
1095
|
+
variants: {
|
|
1096
|
+
variant: {
|
|
1097
|
+
solid: {
|
|
1098
|
+
color: "surface.0"
|
|
1099
|
+
},
|
|
1100
|
+
subtle: {
|
|
1101
|
+
borderWidth: "thin",
|
|
1102
|
+
borderStyle: "solid"
|
|
1103
|
+
},
|
|
1104
|
+
outline: {
|
|
1105
|
+
backgroundColor: "transparent",
|
|
1106
|
+
borderWidth: "thin",
|
|
1107
|
+
borderStyle: "solid"
|
|
1108
|
+
}
|
|
1109
|
+
},
|
|
1110
|
+
colorScheme: {
|
|
1111
|
+
primary: {},
|
|
1112
|
+
secondary: {},
|
|
1113
|
+
accent: {},
|
|
1114
|
+
success: {},
|
|
1115
|
+
warning: {},
|
|
1116
|
+
error: {}
|
|
1117
|
+
},
|
|
1118
|
+
size: {
|
|
1119
|
+
sm: {
|
|
1120
|
+
fontSize: "xs",
|
|
1121
|
+
paddingX: "xs",
|
|
1122
|
+
paddingY: "2xs"
|
|
1123
|
+
},
|
|
1124
|
+
md: {
|
|
1125
|
+
fontSize: "xs",
|
|
1126
|
+
paddingX: "sm",
|
|
1127
|
+
paddingY: "xs"
|
|
1128
|
+
},
|
|
1129
|
+
lg: {
|
|
1130
|
+
fontSize: "sm",
|
|
1131
|
+
paddingX: "md",
|
|
1132
|
+
paddingY: "xs"
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
},
|
|
1136
|
+
compoundVariants: [
|
|
1137
|
+
// Solid variants
|
|
1138
|
+
{
|
|
1139
|
+
variant: "solid",
|
|
1140
|
+
colorScheme: "primary",
|
|
1141
|
+
css: {
|
|
1142
|
+
backgroundColor: "primary.DEFAULT",
|
|
1143
|
+
color: "surface.0"
|
|
1144
|
+
}
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
variant: "solid",
|
|
1148
|
+
colorScheme: "secondary",
|
|
1149
|
+
css: {
|
|
1150
|
+
backgroundColor: "utility.DEFAULT",
|
|
1151
|
+
color: "surface.0"
|
|
1152
|
+
}
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
variant: "solid",
|
|
1156
|
+
colorScheme: "accent",
|
|
1157
|
+
css: {
|
|
1158
|
+
backgroundColor: "emphasis.DEFAULT",
|
|
1159
|
+
color: "surface.0"
|
|
1160
|
+
}
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
variant: "solid",
|
|
1164
|
+
colorScheme: "success",
|
|
1165
|
+
css: {
|
|
1166
|
+
backgroundColor: "status.success",
|
|
1167
|
+
color: "surface.0"
|
|
1168
|
+
}
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
variant: "solid",
|
|
1172
|
+
colorScheme: "warning",
|
|
1173
|
+
css: {
|
|
1174
|
+
backgroundColor: "status.warning",
|
|
1175
|
+
color: "surface.0"
|
|
1176
|
+
}
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
variant: "solid",
|
|
1180
|
+
colorScheme: "error",
|
|
1181
|
+
css: {
|
|
1182
|
+
backgroundColor: "status.error",
|
|
1183
|
+
color: "surface.0"
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
// Subtle variants
|
|
1187
|
+
{
|
|
1188
|
+
variant: "subtle",
|
|
1189
|
+
colorScheme: "primary",
|
|
1190
|
+
css: {
|
|
1191
|
+
backgroundColor: "overlay.light",
|
|
1192
|
+
color: "primary.DEFAULT",
|
|
1193
|
+
borderColor: "primary.DEFAULT"
|
|
1194
|
+
}
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
variant: "subtle",
|
|
1198
|
+
colorScheme: "secondary",
|
|
1199
|
+
css: {
|
|
1200
|
+
backgroundColor: "rgba(42, 185, 176, 0.1)",
|
|
1201
|
+
color: "utility.DEFAULT",
|
|
1202
|
+
borderColor: "utility.DEFAULT"
|
|
1203
|
+
}
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
variant: "subtle",
|
|
1207
|
+
colorScheme: "accent",
|
|
1208
|
+
css: {
|
|
1209
|
+
backgroundColor: "rgba(216, 107, 154, 0.1)",
|
|
1210
|
+
color: "emphasis.DEFAULT",
|
|
1211
|
+
borderColor: "emphasis.DEFAULT"
|
|
1212
|
+
}
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
variant: "subtle",
|
|
1216
|
+
colorScheme: "success",
|
|
1217
|
+
css: {
|
|
1218
|
+
backgroundColor: "rgba(42, 185, 176, 0.1)",
|
|
1219
|
+
color: "status.success",
|
|
1220
|
+
borderColor: "status.success"
|
|
1221
|
+
}
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
variant: "subtle",
|
|
1225
|
+
colorScheme: "warning",
|
|
1226
|
+
css: {
|
|
1227
|
+
backgroundColor: "rgba(217, 162, 79, 0.1)",
|
|
1228
|
+
color: "status.warning",
|
|
1229
|
+
borderColor: "status.warning"
|
|
1230
|
+
}
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
variant: "subtle",
|
|
1234
|
+
colorScheme: "error",
|
|
1235
|
+
css: {
|
|
1236
|
+
backgroundColor: "overlay.error",
|
|
1237
|
+
color: "status.error",
|
|
1238
|
+
borderColor: "status.error"
|
|
1239
|
+
}
|
|
1240
|
+
},
|
|
1241
|
+
// Outline variants
|
|
1242
|
+
{
|
|
1243
|
+
variant: "outline",
|
|
1244
|
+
colorScheme: "primary",
|
|
1245
|
+
css: {
|
|
1246
|
+
color: "primary.DEFAULT",
|
|
1247
|
+
borderColor: "primary.DEFAULT"
|
|
1248
|
+
}
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
variant: "outline",
|
|
1252
|
+
colorScheme: "secondary",
|
|
1253
|
+
css: {
|
|
1254
|
+
color: "utility.DEFAULT",
|
|
1255
|
+
borderColor: "utility.DEFAULT"
|
|
1256
|
+
}
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
variant: "outline",
|
|
1260
|
+
colorScheme: "accent",
|
|
1261
|
+
css: {
|
|
1262
|
+
color: "emphasis.DEFAULT",
|
|
1263
|
+
borderColor: "emphasis.DEFAULT"
|
|
1264
|
+
}
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
variant: "outline",
|
|
1268
|
+
colorScheme: "success",
|
|
1269
|
+
css: {
|
|
1270
|
+
color: "status.success",
|
|
1271
|
+
borderColor: "status.success"
|
|
1272
|
+
}
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
variant: "outline",
|
|
1276
|
+
colorScheme: "warning",
|
|
1277
|
+
css: {
|
|
1278
|
+
color: "status.warning",
|
|
1279
|
+
borderColor: "status.warning"
|
|
1280
|
+
}
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
variant: "outline",
|
|
1284
|
+
colorScheme: "error",
|
|
1285
|
+
css: {
|
|
1286
|
+
color: "status.error",
|
|
1287
|
+
borderColor: "status.error"
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
],
|
|
1291
|
+
defaultVariants: {
|
|
1292
|
+
variant: "subtle",
|
|
1293
|
+
colorScheme: "primary",
|
|
1294
|
+
size: "md"
|
|
1295
|
+
}
|
|
1296
|
+
});
|
|
1297
|
+
|
|
548
1298
|
// src/recipes/index.ts
|
|
549
1299
|
var recipes = {
|
|
550
1300
|
button: buttonRecipe,
|
|
551
1301
|
cell: cellRecipe,
|
|
552
|
-
timer: timerRecipe
|
|
1302
|
+
timer: timerRecipe,
|
|
1303
|
+
loading: loadingRecipe,
|
|
1304
|
+
input: inputRecipe,
|
|
1305
|
+
link: linkRecipe,
|
|
1306
|
+
card: cardRecipe,
|
|
1307
|
+
badge: badgeRecipe
|
|
553
1308
|
};
|
|
554
1309
|
|
|
555
1310
|
// src/slotRecipes/modal.ts
|
|
@@ -603,9 +1358,72 @@ var modalSlotRecipe = defineSlotRecipe({
|
|
|
603
1358
|
}
|
|
604
1359
|
});
|
|
605
1360
|
|
|
606
|
-
// src/slotRecipes/
|
|
1361
|
+
// src/slotRecipes/switch.ts
|
|
607
1362
|
import { defineSlotRecipe as defineSlotRecipe2 } from "@chakra-ui/react";
|
|
608
|
-
var
|
|
1363
|
+
var switchSlotRecipe = defineSlotRecipe2({
|
|
1364
|
+
className: "switch",
|
|
1365
|
+
slots: ["root", "label", "control", "thumb", "indicator"],
|
|
1366
|
+
base: {
|
|
1367
|
+
root: {
|
|
1368
|
+
display: "inline-flex",
|
|
1369
|
+
alignItems: "center",
|
|
1370
|
+
gap: "sm",
|
|
1371
|
+
position: "relative",
|
|
1372
|
+
"--switch-width": "sizes.10",
|
|
1373
|
+
"--switch-height": "sizes.5",
|
|
1374
|
+
"--switch-diff": "calc(var(--switch-width) - var(--switch-height))",
|
|
1375
|
+
"--switch-x": {
|
|
1376
|
+
base: "var(--switch-diff)",
|
|
1377
|
+
_rtl: "calc(var(--switch-diff) * -1)"
|
|
1378
|
+
}
|
|
1379
|
+
},
|
|
1380
|
+
label: {
|
|
1381
|
+
fontFamily: "body",
|
|
1382
|
+
fontSize: "xs",
|
|
1383
|
+
color: "text.primary",
|
|
1384
|
+
textTransform: "uppercase",
|
|
1385
|
+
letterSpacing: "wide",
|
|
1386
|
+
textShadow: "0 1px 2px rgba(0, 0, 0, 0.4)",
|
|
1387
|
+
userSelect: "none"
|
|
1388
|
+
},
|
|
1389
|
+
control: {
|
|
1390
|
+
display: "inline-flex",
|
|
1391
|
+
alignItems: "center",
|
|
1392
|
+
position: "relative",
|
|
1393
|
+
width: "var(--switch-width)",
|
|
1394
|
+
height: "var(--switch-height)",
|
|
1395
|
+
borderRadius: "full",
|
|
1396
|
+
borderWidth: "base",
|
|
1397
|
+
borderStyle: "solid",
|
|
1398
|
+
borderColor: "border.strong",
|
|
1399
|
+
background: "linear-gradient(140deg, {colors.surface.2}, {colors.surface.1} 50%, {colors.surface.0})",
|
|
1400
|
+
boxShadow: "{shadows.sm}, inset 0 1px 0 rgba(255, 255, 255, 0.06)",
|
|
1401
|
+
transition: "all 200ms ease",
|
|
1402
|
+
_checked: {
|
|
1403
|
+
borderColor: "primary.DEFAULT",
|
|
1404
|
+
background: "linear-gradient(140deg, {colors.primary.hover}, {colors.primary.DEFAULT})",
|
|
1405
|
+
boxShadow: "{shadows.md}, {shadows.glow.primary}, inset 0 1px 0 rgba(255, 255, 255, 0.1)"
|
|
1406
|
+
}
|
|
1407
|
+
},
|
|
1408
|
+
thumb: {
|
|
1409
|
+
width: "var(--switch-height)",
|
|
1410
|
+
height: "var(--switch-height)",
|
|
1411
|
+
borderRadius: "full",
|
|
1412
|
+
background: "surface.0",
|
|
1413
|
+
boxShadow: "{shadows.sm}",
|
|
1414
|
+
transitionProperty: "translate",
|
|
1415
|
+
transitionDuration: "fast",
|
|
1416
|
+
_checked: {
|
|
1417
|
+
translate: "var(--switch-x) 0",
|
|
1418
|
+
background: "surface.0"
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
});
|
|
1423
|
+
|
|
1424
|
+
// src/slotRecipes/victoryScreen.ts
|
|
1425
|
+
import { defineSlotRecipe as defineSlotRecipe3 } from "@chakra-ui/react";
|
|
1426
|
+
var victoryScreenSlotRecipe = defineSlotRecipe3({
|
|
609
1427
|
slots: ["overlay", "content", "title", "stats", "badge", "actions"],
|
|
610
1428
|
base: {
|
|
611
1429
|
overlay: {
|
|
@@ -665,12 +1483,429 @@ var victoryScreenSlotRecipe = defineSlotRecipe2({
|
|
|
665
1483
|
}
|
|
666
1484
|
});
|
|
667
1485
|
|
|
1486
|
+
// src/slotRecipes/accordion.ts
|
|
1487
|
+
import { defineSlotRecipe as defineSlotRecipe4 } from "@chakra-ui/react";
|
|
1488
|
+
var accordionSlotRecipe = defineSlotRecipe4({
|
|
1489
|
+
className: "accordion",
|
|
1490
|
+
slots: ["root", "item", "trigger", "icon", "content"],
|
|
1491
|
+
base: {
|
|
1492
|
+
root: {
|
|
1493
|
+
width: "100%"
|
|
1494
|
+
},
|
|
1495
|
+
item: {
|
|
1496
|
+
borderWidth: "thin",
|
|
1497
|
+
borderStyle: "solid",
|
|
1498
|
+
borderColor: "border.subtle",
|
|
1499
|
+
borderRadius: "md",
|
|
1500
|
+
overflow: "hidden",
|
|
1501
|
+
marginBottom: "sm",
|
|
1502
|
+
_last: {
|
|
1503
|
+
marginBottom: 0
|
|
1504
|
+
}
|
|
1505
|
+
},
|
|
1506
|
+
trigger: {
|
|
1507
|
+
display: "flex",
|
|
1508
|
+
alignItems: "center",
|
|
1509
|
+
justifyContent: "space-between",
|
|
1510
|
+
width: "100%",
|
|
1511
|
+
padding: "sm",
|
|
1512
|
+
backgroundColor: "surface.0",
|
|
1513
|
+
borderWidth: 0,
|
|
1514
|
+
borderBottomWidth: "thin",
|
|
1515
|
+
borderStyle: "solid",
|
|
1516
|
+
borderColor: "transparent",
|
|
1517
|
+
cursor: "pointer",
|
|
1518
|
+
fontFamily: "body",
|
|
1519
|
+
fontSize: "sm",
|
|
1520
|
+
fontWeight: "medium",
|
|
1521
|
+
color: "primary.DEFAULT",
|
|
1522
|
+
textTransform: "uppercase",
|
|
1523
|
+
letterSpacing: "wide",
|
|
1524
|
+
transition: "all var(--timing-base) var(--easing-default)",
|
|
1525
|
+
boxShadow: "inset 0 1px 0 rgba(255, 255, 255, 0.06)",
|
|
1526
|
+
_hover: {
|
|
1527
|
+
backgroundColor: "surface.1"
|
|
1528
|
+
},
|
|
1529
|
+
_expanded: {
|
|
1530
|
+
borderBottomColor: "border.subtle",
|
|
1531
|
+
backgroundColor: "surface.1"
|
|
1532
|
+
}
|
|
1533
|
+
},
|
|
1534
|
+
icon: {
|
|
1535
|
+
transition: "transform var(--timing-base) var(--easing-default)",
|
|
1536
|
+
color: "text.muted",
|
|
1537
|
+
_expanded: {
|
|
1538
|
+
transform: "rotate(180deg)"
|
|
1539
|
+
}
|
|
1540
|
+
},
|
|
1541
|
+
content: {
|
|
1542
|
+
padding: "md",
|
|
1543
|
+
backgroundColor: "surface.1"
|
|
1544
|
+
}
|
|
1545
|
+
},
|
|
1546
|
+
variants: {
|
|
1547
|
+
variant: {
|
|
1548
|
+
subtle: {
|
|
1549
|
+
item: {
|
|
1550
|
+
borderColor: "border.subtle"
|
|
1551
|
+
},
|
|
1552
|
+
trigger: {
|
|
1553
|
+
backgroundColor: "surface.0"
|
|
1554
|
+
},
|
|
1555
|
+
content: {
|
|
1556
|
+
backgroundColor: "surface.1"
|
|
1557
|
+
}
|
|
1558
|
+
},
|
|
1559
|
+
outline: {
|
|
1560
|
+
item: {
|
|
1561
|
+
borderColor: "border.strong"
|
|
1562
|
+
},
|
|
1563
|
+
trigger: {
|
|
1564
|
+
backgroundColor: "transparent",
|
|
1565
|
+
_hover: {
|
|
1566
|
+
backgroundColor: "overlay.subtle"
|
|
1567
|
+
}
|
|
1568
|
+
},
|
|
1569
|
+
content: {
|
|
1570
|
+
backgroundColor: "transparent"
|
|
1571
|
+
}
|
|
1572
|
+
},
|
|
1573
|
+
solid: {
|
|
1574
|
+
item: {
|
|
1575
|
+
borderColor: "primary.DEFAULT",
|
|
1576
|
+
boxShadow: "var(--shadow-glow-primary)"
|
|
1577
|
+
},
|
|
1578
|
+
trigger: {
|
|
1579
|
+
backgroundColor: "surface.1",
|
|
1580
|
+
borderBottomColor: "primary.DEFAULT"
|
|
1581
|
+
},
|
|
1582
|
+
content: {
|
|
1583
|
+
backgroundColor: "surface.0"
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
},
|
|
1587
|
+
size: {
|
|
1588
|
+
sm: {
|
|
1589
|
+
trigger: {
|
|
1590
|
+
padding: "xs",
|
|
1591
|
+
fontSize: "xs"
|
|
1592
|
+
},
|
|
1593
|
+
content: {
|
|
1594
|
+
padding: "sm"
|
|
1595
|
+
}
|
|
1596
|
+
},
|
|
1597
|
+
md: {
|
|
1598
|
+
trigger: {
|
|
1599
|
+
padding: "sm",
|
|
1600
|
+
fontSize: "sm"
|
|
1601
|
+
},
|
|
1602
|
+
content: {
|
|
1603
|
+
padding: "md"
|
|
1604
|
+
}
|
|
1605
|
+
},
|
|
1606
|
+
lg: {
|
|
1607
|
+
trigger: {
|
|
1608
|
+
padding: "md",
|
|
1609
|
+
fontSize: "base"
|
|
1610
|
+
},
|
|
1611
|
+
content: {
|
|
1612
|
+
padding: "lg"
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
},
|
|
1617
|
+
defaultVariants: {
|
|
1618
|
+
variant: "subtle",
|
|
1619
|
+
size: "md"
|
|
1620
|
+
}
|
|
1621
|
+
});
|
|
1622
|
+
|
|
1623
|
+
// src/slotRecipes/radioGroup.ts
|
|
1624
|
+
import { defineSlotRecipe as defineSlotRecipe5 } from "@chakra-ui/react";
|
|
1625
|
+
var radioGroupSlotRecipe = defineSlotRecipe5({
|
|
1626
|
+
className: "radioGroup",
|
|
1627
|
+
slots: ["root", "label", "group", "item", "indicator", "text", "description"],
|
|
1628
|
+
base: {
|
|
1629
|
+
root: {
|
|
1630
|
+
width: "100%"
|
|
1631
|
+
},
|
|
1632
|
+
label: {
|
|
1633
|
+
fontFamily: "body",
|
|
1634
|
+
fontSize: "base",
|
|
1635
|
+
fontWeight: "medium",
|
|
1636
|
+
color: "primary.DEFAULT",
|
|
1637
|
+
textTransform: "uppercase",
|
|
1638
|
+
letterSpacing: "tight",
|
|
1639
|
+
marginBottom: "md"
|
|
1640
|
+
},
|
|
1641
|
+
group: {
|
|
1642
|
+
display: "flex",
|
|
1643
|
+
flexDirection: "column",
|
|
1644
|
+
gap: "sm"
|
|
1645
|
+
},
|
|
1646
|
+
item: {
|
|
1647
|
+
display: "flex",
|
|
1648
|
+
alignItems: "flex-start",
|
|
1649
|
+
gap: "sm",
|
|
1650
|
+
padding: "sm",
|
|
1651
|
+
borderWidth: "thin",
|
|
1652
|
+
borderStyle: "solid",
|
|
1653
|
+
borderColor: "border.subtle",
|
|
1654
|
+
borderRadius: "md",
|
|
1655
|
+
backgroundColor: "transparent",
|
|
1656
|
+
cursor: "pointer",
|
|
1657
|
+
transition: "all var(--timing-base) var(--easing-default)",
|
|
1658
|
+
_hover: {
|
|
1659
|
+
borderColor: "primary.DEFAULT",
|
|
1660
|
+
backgroundColor: "overlay.subtle"
|
|
1661
|
+
},
|
|
1662
|
+
_checked: {
|
|
1663
|
+
borderColor: "primary.DEFAULT",
|
|
1664
|
+
backgroundColor: "overlay.light"
|
|
1665
|
+
},
|
|
1666
|
+
_disabled: {
|
|
1667
|
+
opacity: 0.5,
|
|
1668
|
+
cursor: "not-allowed",
|
|
1669
|
+
_hover: {
|
|
1670
|
+
borderColor: "border.subtle",
|
|
1671
|
+
backgroundColor: "transparent"
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
},
|
|
1675
|
+
indicator: {
|
|
1676
|
+
display: "flex",
|
|
1677
|
+
alignItems: "center",
|
|
1678
|
+
justifyContent: "center",
|
|
1679
|
+
width: "18px",
|
|
1680
|
+
height: "18px",
|
|
1681
|
+
borderWidth: "base",
|
|
1682
|
+
borderStyle: "solid",
|
|
1683
|
+
borderColor: "border.strong",
|
|
1684
|
+
borderRadius: "50%",
|
|
1685
|
+
backgroundColor: "surface.0",
|
|
1686
|
+
flexShrink: 0,
|
|
1687
|
+
marginTop: "2px",
|
|
1688
|
+
transition: "all var(--timing-fast) var(--easing-default)",
|
|
1689
|
+
_checked: {
|
|
1690
|
+
borderColor: "primary.DEFAULT",
|
|
1691
|
+
backgroundColor: "primary.DEFAULT",
|
|
1692
|
+
_after: {
|
|
1693
|
+
content: '""',
|
|
1694
|
+
display: "block",
|
|
1695
|
+
width: "8px",
|
|
1696
|
+
height: "8px",
|
|
1697
|
+
borderRadius: "50%",
|
|
1698
|
+
backgroundColor: "surface.0"
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
},
|
|
1702
|
+
text: {
|
|
1703
|
+
fontSize: "base",
|
|
1704
|
+
fontWeight: "medium",
|
|
1705
|
+
color: "text.primary"
|
|
1706
|
+
},
|
|
1707
|
+
description: {
|
|
1708
|
+
fontSize: "sm",
|
|
1709
|
+
color: "text.muted",
|
|
1710
|
+
marginTop: "2xs"
|
|
1711
|
+
}
|
|
1712
|
+
},
|
|
1713
|
+
variants: {
|
|
1714
|
+
variant: {
|
|
1715
|
+
outline: {
|
|
1716
|
+
item: {
|
|
1717
|
+
backgroundColor: "transparent"
|
|
1718
|
+
}
|
|
1719
|
+
},
|
|
1720
|
+
subtle: {
|
|
1721
|
+
item: {
|
|
1722
|
+
backgroundColor: "surface.1",
|
|
1723
|
+
_hover: {
|
|
1724
|
+
backgroundColor: "surface.2"
|
|
1725
|
+
},
|
|
1726
|
+
_checked: {
|
|
1727
|
+
backgroundColor: "overlay.light"
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
},
|
|
1731
|
+
cards: {
|
|
1732
|
+
item: {
|
|
1733
|
+
padding: "md",
|
|
1734
|
+
borderRadius: "md",
|
|
1735
|
+
boxShadow: "var(--shadow-xs)",
|
|
1736
|
+
_checked: {
|
|
1737
|
+
boxShadow: "var(--shadow-sm), var(--shadow-glow-primary)"
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
},
|
|
1742
|
+
orientation: {
|
|
1743
|
+
vertical: {
|
|
1744
|
+
group: {
|
|
1745
|
+
flexDirection: "column"
|
|
1746
|
+
}
|
|
1747
|
+
},
|
|
1748
|
+
horizontal: {
|
|
1749
|
+
group: {
|
|
1750
|
+
flexDirection: "row",
|
|
1751
|
+
flexWrap: "wrap"
|
|
1752
|
+
},
|
|
1753
|
+
item: {
|
|
1754
|
+
flex: "1 1 auto"
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
},
|
|
1758
|
+
size: {
|
|
1759
|
+
sm: {
|
|
1760
|
+
item: {
|
|
1761
|
+
padding: "xs"
|
|
1762
|
+
},
|
|
1763
|
+
indicator: {
|
|
1764
|
+
width: "14px",
|
|
1765
|
+
height: "14px",
|
|
1766
|
+
_checked: {
|
|
1767
|
+
_after: {
|
|
1768
|
+
width: "6px",
|
|
1769
|
+
height: "6px"
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
},
|
|
1773
|
+
text: {
|
|
1774
|
+
fontSize: "sm"
|
|
1775
|
+
},
|
|
1776
|
+
description: {
|
|
1777
|
+
fontSize: "xs"
|
|
1778
|
+
}
|
|
1779
|
+
},
|
|
1780
|
+
md: {
|
|
1781
|
+
item: {
|
|
1782
|
+
padding: "sm"
|
|
1783
|
+
},
|
|
1784
|
+
indicator: {
|
|
1785
|
+
width: "18px",
|
|
1786
|
+
height: "18px"
|
|
1787
|
+
},
|
|
1788
|
+
text: {
|
|
1789
|
+
fontSize: "base"
|
|
1790
|
+
},
|
|
1791
|
+
description: {
|
|
1792
|
+
fontSize: "sm"
|
|
1793
|
+
}
|
|
1794
|
+
},
|
|
1795
|
+
lg: {
|
|
1796
|
+
item: {
|
|
1797
|
+
padding: "md"
|
|
1798
|
+
},
|
|
1799
|
+
indicator: {
|
|
1800
|
+
width: "22px",
|
|
1801
|
+
height: "22px",
|
|
1802
|
+
_checked: {
|
|
1803
|
+
_after: {
|
|
1804
|
+
width: "10px",
|
|
1805
|
+
height: "10px"
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
},
|
|
1809
|
+
text: {
|
|
1810
|
+
fontSize: "md"
|
|
1811
|
+
},
|
|
1812
|
+
description: {
|
|
1813
|
+
fontSize: "base"
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
},
|
|
1818
|
+
defaultVariants: {
|
|
1819
|
+
variant: "outline",
|
|
1820
|
+
orientation: "vertical",
|
|
1821
|
+
size: "md"
|
|
1822
|
+
}
|
|
1823
|
+
});
|
|
1824
|
+
|
|
668
1825
|
// src/slotRecipes/index.ts
|
|
669
1826
|
var slotRecipes = {
|
|
670
1827
|
modal: modalSlotRecipe,
|
|
671
|
-
|
|
1828
|
+
switch: switchSlotRecipe,
|
|
1829
|
+
victoryScreen: victoryScreenSlotRecipe,
|
|
1830
|
+
accordion: accordionSlotRecipe,
|
|
1831
|
+
radioGroup: radioGroupSlotRecipe
|
|
672
1832
|
};
|
|
673
1833
|
|
|
1834
|
+
// src/utils/contrast.ts
|
|
1835
|
+
function hexToRgb(hex) {
|
|
1836
|
+
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
1837
|
+
if (!result) {
|
|
1838
|
+
throw new Error(`Invalid hex color: ${hex}`);
|
|
1839
|
+
}
|
|
1840
|
+
return {
|
|
1841
|
+
r: parseInt(result[1], 16),
|
|
1842
|
+
g: parseInt(result[2], 16),
|
|
1843
|
+
b: parseInt(result[3], 16)
|
|
1844
|
+
};
|
|
1845
|
+
}
|
|
1846
|
+
function relativeLuminance(r, g, b) {
|
|
1847
|
+
const [rs, gs, bs] = [r, g, b].map((c) => {
|
|
1848
|
+
const sRGB = c / 255;
|
|
1849
|
+
return sRGB <= 0.03928 ? sRGB / 12.92 : Math.pow((sRGB + 0.055) / 1.055, 2.4);
|
|
1850
|
+
});
|
|
1851
|
+
return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;
|
|
1852
|
+
}
|
|
1853
|
+
function contrastRatio(color1, color2) {
|
|
1854
|
+
const rgb1 = hexToRgb(color1);
|
|
1855
|
+
const rgb2 = hexToRgb(color2);
|
|
1856
|
+
const l1 = relativeLuminance(rgb1.r, rgb1.g, rgb1.b);
|
|
1857
|
+
const l2 = relativeLuminance(rgb2.r, rgb2.g, rgb2.b);
|
|
1858
|
+
const lighter = Math.max(l1, l2);
|
|
1859
|
+
const darker = Math.min(l1, l2);
|
|
1860
|
+
return (lighter + 0.05) / (darker + 0.05);
|
|
1861
|
+
}
|
|
1862
|
+
function formatContrastRatio(ratio) {
|
|
1863
|
+
return `${ratio.toFixed(2)}:1`;
|
|
1864
|
+
}
|
|
1865
|
+
function getWcagLevel(ratio, isLargeText = false) {
|
|
1866
|
+
if (isLargeText) {
|
|
1867
|
+
if (ratio >= 4.5) return "AAA";
|
|
1868
|
+
if (ratio >= 3) return "AA";
|
|
1869
|
+
return "fail";
|
|
1870
|
+
} else {
|
|
1871
|
+
if (ratio >= 7) return "AAA";
|
|
1872
|
+
if (ratio >= 4.5) return "AA";
|
|
1873
|
+
if (ratio >= 3) return "AA-large";
|
|
1874
|
+
return "fail";
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
function getWcagDescription(level) {
|
|
1878
|
+
switch (level) {
|
|
1879
|
+
case "AAA":
|
|
1880
|
+
return "Enhanced accessibility (AAA)";
|
|
1881
|
+
case "AA":
|
|
1882
|
+
return "Minimum accessibility (AA)";
|
|
1883
|
+
case "AA-large":
|
|
1884
|
+
return "Large text only (AA)";
|
|
1885
|
+
case "fail":
|
|
1886
|
+
return "Does not meet WCAG standards";
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
function meetsWcagAA(ratio, isLargeText = false) {
|
|
1890
|
+
const level = getWcagLevel(ratio, isLargeText);
|
|
1891
|
+
return level === "AAA" || level === "AA";
|
|
1892
|
+
}
|
|
1893
|
+
function getContrastPairs(foregrounds, backgrounds) {
|
|
1894
|
+
const pairs = [];
|
|
1895
|
+
for (const [fgName, fgColor] of Object.entries(foregrounds)) {
|
|
1896
|
+
for (const [bgName, bgColor] of Object.entries(backgrounds)) {
|
|
1897
|
+
const ratio = contrastRatio(fgColor, bgColor);
|
|
1898
|
+
pairs.push({
|
|
1899
|
+
foreground: fgName,
|
|
1900
|
+
background: bgName,
|
|
1901
|
+
ratio,
|
|
1902
|
+
level: getWcagLevel(ratio)
|
|
1903
|
+
});
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
return pairs;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
674
1909
|
// src/index.ts
|
|
675
1910
|
var system = createSystem(defaultConfig, {
|
|
676
1911
|
theme: {
|
|
@@ -695,6 +1930,26 @@ var system = createSystem(defaultConfig, {
|
|
|
695
1930
|
globalCss
|
|
696
1931
|
});
|
|
697
1932
|
export {
|
|
698
|
-
|
|
1933
|
+
allCssVariables,
|
|
1934
|
+
borderVariables,
|
|
1935
|
+
breakpointVariables,
|
|
1936
|
+
colorVariables,
|
|
1937
|
+
contrastRatio,
|
|
1938
|
+
cssVar,
|
|
1939
|
+
formatContrastRatio,
|
|
1940
|
+
generateCssVariablesString,
|
|
1941
|
+
getContrastPairs,
|
|
1942
|
+
getCssVariable,
|
|
1943
|
+
getWcagDescription,
|
|
1944
|
+
getWcagLevel,
|
|
1945
|
+
hexToRgb,
|
|
1946
|
+
meetsWcagAA,
|
|
1947
|
+
relativeLuminance,
|
|
1948
|
+
shadowVariables,
|
|
1949
|
+
spacingVariables,
|
|
1950
|
+
system,
|
|
1951
|
+
timingVariables,
|
|
1952
|
+
typographyVariables,
|
|
1953
|
+
zIndexVariables
|
|
699
1954
|
};
|
|
700
1955
|
//# sourceMappingURL=index.js.map
|