@tectra-ng/themes 0.0.0-stage → 0.1.1

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.
@@ -0,0 +1,2054 @@
1
+ import { ACCENT_PALETTES, INK_SURFACE, SEVERITY_PALETTES, layers, motion, radius, shadows, spacing, typography } from "@tectra-ng/tokens";
2
+ function lightSeverity(scale, base, surface) {
3
+ return {
4
+ base: scale[base],
5
+ hover: scale[base + 100],
6
+ active: scale[base + 200],
7
+ contrast: surface[0],
8
+ soft: scale[50]
9
+ };
10
+ }
11
+ function createLightSemantic({ accent, surface }) {
12
+ return {
13
+ primary: {
14
+ ...lightSeverity(accent, 600, surface),
15
+ softText: accent[700]
16
+ },
17
+ secondary: {
18
+ base: surface[100],
19
+ hover: surface[200],
20
+ active: surface[300],
21
+ border: surface[200],
22
+ contrast: surface[800]
23
+ },
24
+ success: lightSeverity(SEVERITY_PALETTES.green, 700, surface),
25
+ info: lightSeverity(SEVERITY_PALETTES.sky, 700, surface),
26
+ warn: lightSeverity(SEVERITY_PALETTES.orange, 700, surface),
27
+ danger: lightSeverity(SEVERITY_PALETTES.red, 600, surface),
28
+ help: lightSeverity(SEVERITY_PALETTES.purple, 600, surface),
29
+ contrast: {
30
+ base: surface[950],
31
+ hover: surface[900],
32
+ active: surface[800],
33
+ contrast: surface[0],
34
+ soft: surface[100]
35
+ },
36
+ surface: {
37
+ ground: surface[100],
38
+ card: surface[0],
39
+ hover: surface[50],
40
+ border: surface[200],
41
+ overlay: surface[0],
42
+ overlayBorder: surface[200]
43
+ },
44
+ text: {
45
+ primary: surface[900],
46
+ hover: surface[950],
47
+ muted: surface[600],
48
+ mutedHover: surface[700]
49
+ },
50
+ field: {
51
+ background: surface[0],
52
+ disabledBackground: surface[100],
53
+ border: surface[300],
54
+ hoverBorder: surface[400],
55
+ color: surface[900],
56
+ placeholder: surface[500],
57
+ icon: surface[500]
58
+ },
59
+ highlight: {
60
+ background: accent[50],
61
+ focusBackground: accent[100],
62
+ color: accent[700],
63
+ focusColor: accent[800]
64
+ },
65
+ list: { focusBackground: surface[100] },
66
+ mask: { background: "rgba(12, 16, 21, 0.45)" },
67
+ focusRing: { color: accent[600] },
68
+ shadow: { ...shadows }
69
+ };
70
+ }
71
+ function darkSeverity(scale, surface) {
72
+ return {
73
+ base: scale[400],
74
+ hover: scale[300],
75
+ active: scale[200],
76
+ contrast: surface[950],
77
+ soft: `color-mix(in srgb, ${scale[400]} 8%, ${surface[900]})`
78
+ };
79
+ }
80
+ function createDarkSemantic({ accent, surface }) {
81
+ return {
82
+ primary: {
83
+ ...darkSeverity(accent, surface),
84
+ soft: `color-mix(in srgb, ${accent[400]}, transparent 82%)`,
85
+ softText: accent[200]
86
+ },
87
+ secondary: {
88
+ base: surface[800],
89
+ hover: surface[700],
90
+ active: surface[600],
91
+ border: surface[700],
92
+ contrast: surface[100]
93
+ },
94
+ success: darkSeverity(SEVERITY_PALETTES.green, surface),
95
+ info: darkSeverity(SEVERITY_PALETTES.sky, surface),
96
+ warn: darkSeverity(SEVERITY_PALETTES.orange, surface),
97
+ danger: darkSeverity(SEVERITY_PALETTES.red, surface),
98
+ help: darkSeverity(SEVERITY_PALETTES.purple, surface),
99
+ contrast: {
100
+ base: surface[0],
101
+ hover: surface[100],
102
+ active: surface[200],
103
+ contrast: surface[950],
104
+ soft: surface[800]
105
+ },
106
+ surface: {
107
+ ground: surface[950],
108
+ card: surface[900],
109
+ hover: surface[800],
110
+ border: surface[800],
111
+ overlay: surface[900],
112
+ overlayBorder: surface[700]
113
+ },
114
+ text: {
115
+ primary: surface[50],
116
+ hover: surface[0],
117
+ muted: surface[400],
118
+ mutedHover: surface[300]
119
+ },
120
+ field: {
121
+ background: surface[950],
122
+ disabledBackground: surface[800],
123
+ border: surface[700],
124
+ hoverBorder: surface[600],
125
+ color: surface[50],
126
+ placeholder: surface[400],
127
+ icon: surface[400]
128
+ },
129
+ highlight: {
130
+ background: `color-mix(in srgb, ${accent[400]}, transparent 82%)`,
131
+ focusBackground: `color-mix(in srgb, ${accent[400]}, transparent 72%)`,
132
+ color: accent[200],
133
+ focusColor: accent[100]
134
+ },
135
+ list: { focusBackground: surface[800] },
136
+ mask: { background: "rgba(0, 0, 0, 0.6)" },
137
+ focusRing: { color: accent[400] },
138
+ shadow: { ...shadows }
139
+ };
140
+ }
141
+ function tokenRef(name) {
142
+ return `var(--tx-${name})`;
143
+ }
144
+ function lightDark(light, dark) {
145
+ return `light-dark(${light}, ${dark})`;
146
+ }
147
+ function mix(color, amount, base) {
148
+ return `color-mix(in srgb, ${color} ${amount}, ${base})`;
149
+ }
150
+ function fade(color, transparency) {
151
+ return `color-mix(in srgb, ${color}, transparent ${transparency})`;
152
+ }
153
+ function solid(group) {
154
+ return {
155
+ background: tokenRef(`${group}-base`),
156
+ hoverBackground: tokenRef(`${group}-hover`),
157
+ activeBackground: tokenRef(`${group}-active`),
158
+ borderColor: tokenRef(`${group}-base`),
159
+ hoverBorderColor: tokenRef(`${group}-hover`),
160
+ activeBorderColor: tokenRef(`${group}-active`),
161
+ color: tokenRef(`${group}-contrast`),
162
+ hoverColor: tokenRef(`${group}-contrast`),
163
+ activeColor: tokenRef(`${group}-contrast`),
164
+ focusRing: {
165
+ color: tokenRef(`${group}-base`),
166
+ shadow: "none"
167
+ }
168
+ };
169
+ }
170
+ function outlined(palette, color) {
171
+ return {
172
+ hoverBackground: lightDark(tokenRef(`${palette}-50`), mix(tokenRef(`${palette}-400`), "8%", tokenRef("surface-900"))),
173
+ activeBackground: lightDark(tokenRef(`${palette}-100`), mix(tokenRef(`${palette}-400`), "18%", tokenRef("surface-900"))),
174
+ borderColor: lightDark(tokenRef(`${palette}-200`), tokenRef(`${palette}-700`)),
175
+ color
176
+ };
177
+ }
178
+ function text(palette, color) {
179
+ return {
180
+ hoverBackground: lightDark(tokenRef(`${palette}-50`), fade(tokenRef(`${palette}-400`), "96%")),
181
+ activeBackground: lightDark(tokenRef(`${palette}-100`), fade(tokenRef(`${palette}-400`), "84%")),
182
+ color
183
+ };
184
+ }
185
+ const severityColor = (palette) => lightDark(tokenRef(`${palette}-600`), tokenRef(`${palette}-400`));
186
+ const buttonTokens = {
187
+ root: {
188
+ borderRadius: tokenRef("radius-md"),
189
+ roundedBorderRadius: "2rem",
190
+ gap: "8px",
191
+ paddingX: "12px",
192
+ paddingY: "9px",
193
+ iconOnlyWidth: "37px",
194
+ fontSize: tokenRef("font-size-md"),
195
+ lineHeight: "17px",
196
+ sm: {
197
+ fontSize: tokenRef("font-size-sm"),
198
+ lineHeight: "16px",
199
+ paddingX: "10px",
200
+ paddingY: "6px",
201
+ iconOnlyWidth: "30px"
202
+ },
203
+ lg: {
204
+ fontSize: tokenRef("font-size-lg"),
205
+ lineHeight: "20px",
206
+ paddingX: "14px",
207
+ paddingY: "11px",
208
+ iconOnlyWidth: "44px"
209
+ },
210
+ label: { fontWeight: tokenRef("font-weight-semibold") },
211
+ raisedShadow: "0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)",
212
+ focusRing: {
213
+ width: "2px",
214
+ style: "solid",
215
+ offset: "2px"
216
+ },
217
+ badgeSize: "18px",
218
+ transitionDuration: tokenRef("motion-duration"),
219
+ primary: solid("primary"),
220
+ secondary: {
221
+ background: tokenRef("secondary-base"),
222
+ hoverBackground: tokenRef("secondary-hover"),
223
+ activeBackground: tokenRef("secondary-active"),
224
+ borderColor: tokenRef("secondary-border"),
225
+ hoverBorderColor: lightDark(tokenRef("surface-300"), tokenRef("surface-600")),
226
+ activeBorderColor: lightDark(tokenRef("surface-400"), tokenRef("surface-500")),
227
+ color: tokenRef("secondary-contrast"),
228
+ hoverColor: lightDark(tokenRef("surface-900"), tokenRef("surface-0")),
229
+ activeColor: lightDark(tokenRef("surface-950"), tokenRef("surface-0")),
230
+ focusRing: {
231
+ color: lightDark(tokenRef("surface-600"), tokenRef("surface-300")),
232
+ shadow: "none"
233
+ }
234
+ },
235
+ info: solid("info"),
236
+ success: solid("success"),
237
+ warn: solid("warn"),
238
+ help: solid("help"),
239
+ danger: solid("danger"),
240
+ contrast: solid("contrast")
241
+ },
242
+ outlined: {
243
+ primary: outlined("primary", tokenRef("primary-base")),
244
+ secondary: {
245
+ hoverBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
246
+ activeBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
247
+ borderColor: lightDark(tokenRef("surface-300"), tokenRef("surface-600")),
248
+ color: lightDark(tokenRef("surface-800"), tokenRef("surface-100"))
249
+ },
250
+ success: outlined("green", severityColor("green")),
251
+ info: outlined("sky", lightDark(tokenRef("sky-700"), tokenRef("sky-400"))),
252
+ warn: outlined("orange", lightDark(tokenRef("orange-700"), tokenRef("orange-400"))),
253
+ help: outlined("purple", severityColor("purple")),
254
+ danger: outlined("red", severityColor("red")),
255
+ contrast: {
256
+ hoverBackground: lightDark(tokenRef("surface-50"), tokenRef("surface-800")),
257
+ activeBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-700")),
258
+ borderColor: lightDark(tokenRef("surface-700"), tokenRef("surface-500")),
259
+ color: lightDark(tokenRef("surface-950"), tokenRef("surface-0"))
260
+ },
261
+ plain: {
262
+ hoverBackground: lightDark(tokenRef("surface-50"), tokenRef("surface-800")),
263
+ activeBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-700")),
264
+ borderColor: lightDark(tokenRef("surface-200"), tokenRef("surface-600")),
265
+ color: lightDark(tokenRef("surface-700"), tokenRef("surface-0"))
266
+ }
267
+ },
268
+ text: {
269
+ primary: text("primary", tokenRef("primary-base")),
270
+ secondary: {
271
+ hoverBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
272
+ activeBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
273
+ color: lightDark(tokenRef("surface-700"), tokenRef("surface-200"))
274
+ },
275
+ success: text("green", severityColor("green")),
276
+ info: text("sky", lightDark(tokenRef("sky-700"), tokenRef("sky-400"))),
277
+ warn: text("orange", lightDark(tokenRef("orange-700"), tokenRef("orange-400"))),
278
+ help: text("purple", severityColor("purple")),
279
+ danger: text("red", severityColor("red")),
280
+ contrast: {
281
+ hoverBackground: lightDark(tokenRef("surface-50"), tokenRef("surface-800")),
282
+ activeBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-700")),
283
+ color: lightDark(tokenRef("surface-950"), tokenRef("surface-0"))
284
+ },
285
+ plain: {
286
+ hoverBackground: lightDark(tokenRef("surface-50"), tokenRef("surface-800")),
287
+ activeBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-700")),
288
+ color: lightDark(tokenRef("surface-700"), tokenRef("surface-0"))
289
+ }
290
+ },
291
+ link: {
292
+ color: tokenRef("primary-base"),
293
+ hoverColor: tokenRef("primary-hover"),
294
+ activeColor: tokenRef("primary-active")
295
+ }
296
+ };
297
+ const formFieldTokens = { root: {
298
+ background: tokenRef("field-background"),
299
+ filledBackground: lightDark(tokenRef("surface-50"), tokenRef("surface-800")),
300
+ filledHoverBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-700")),
301
+ filledFocusBackground: lightDark(tokenRef("surface-0"), tokenRef("surface-900")),
302
+ disabledBackground: tokenRef("field-disabled-background"),
303
+ readonlyBackground: lightDark(tokenRef("surface-50"), tokenRef("surface-900")),
304
+ borderColor: tokenRef("field-border"),
305
+ hoverBorderColor: tokenRef("field-hover-border"),
306
+ focusBorderColor: tokenRef("primary-base"),
307
+ invalidBorderColor: tokenRef("danger-base"),
308
+ color: tokenRef("field-color"),
309
+ disabledColor: tokenRef("text-muted"),
310
+ placeholderColor: lightDark(tokenRef("surface-500"), tokenRef("surface-400")),
311
+ filledPlaceholderColor: lightDark(tokenRef("surface-600"), tokenRef("surface-300")),
312
+ invalidPlaceholderColor: lightDark(tokenRef("red-600"), tokenRef("red-400")),
313
+ iconColor: lightDark(tokenRef("surface-500"), tokenRef("surface-400")),
314
+ shadow: tokenRef("shadow-field"),
315
+ borderRadius: tokenRef("radius-md"),
316
+ paddingX: "10.5px",
317
+ paddingY: "7px",
318
+ fontSize: tokenRef("font-size-md"),
319
+ lineHeight: "21px",
320
+ sm: {
321
+ paddingX: "8.75px",
322
+ paddingY: "5.25px",
323
+ fontSize: "12.25px",
324
+ lineHeight: "18.375px"
325
+ },
326
+ lg: {
327
+ paddingX: "12.25px",
328
+ paddingY: "8.75px",
329
+ fontSize: "15.75px",
330
+ lineHeight: "23.625px"
331
+ },
332
+ focusRing: { shadow: "none" },
333
+ invalidFocusRing: { shadow: "none" },
334
+ transitionDuration: tokenRef("motion-duration")
335
+ } };
336
+ const inputGroupTokens = { addon: {
337
+ background: tokenRef("form-field-filled-background"),
338
+ borderColor: tokenRef("form-field-border-color"),
339
+ color: tokenRef("text-muted"),
340
+ borderRadius: tokenRef("form-field-border-radius"),
341
+ paddingX: "12px",
342
+ minWidth: "37px"
343
+ } };
344
+ const labelTokens = {
345
+ root: {
346
+ color: tokenRef("text-primary"),
347
+ fontSize: tokenRef("font-size-md"),
348
+ fontWeight: tokenRef("font-weight-semibold"),
349
+ gap: "4px",
350
+ marginBottom: "6px",
351
+ requiredColor: tokenRef("danger-base"),
352
+ hintColor: tokenRef("text-muted")
353
+ },
354
+ subtle: {
355
+ color: tokenRef("text-muted"),
356
+ fontSize: tokenRef("font-size-sm"),
357
+ fontWeight: tokenRef("font-weight-semibold")
358
+ }
359
+ };
360
+ const floatLabelTokens = {
361
+ root: {
362
+ color: tokenRef("form-field-placeholder-color"),
363
+ focusColor: tokenRef("primary-base"),
364
+ activeColor: tokenRef("text-muted"),
365
+ invalidColor: tokenRef("danger-base"),
366
+ transitionDuration: "0.2s",
367
+ positionX: tokenRef("form-field-padding-x"),
368
+ positionY: tokenRef("form-field-padding-y"),
369
+ fontWeight: tokenRef("font-weight-regular"),
370
+ fontSize: tokenRef("form-field-font-size"),
371
+ active: {
372
+ fontSize: "11px",
373
+ fontWeight: tokenRef("font-weight-medium")
374
+ }
375
+ },
376
+ over: { active: { top: "-18px" } },
377
+ in: {
378
+ input: {
379
+ paddingTop: "22px",
380
+ paddingBottom: "6px"
381
+ },
382
+ active: { top: "6px" }
383
+ },
384
+ on: {
385
+ borderRadius: tokenRef("radius-xs"),
386
+ active: {
387
+ background: tokenRef("form-field-background"),
388
+ padding: "0 4px"
389
+ }
390
+ }
391
+ };
392
+ const iftaLabelTokens = {
393
+ root: {
394
+ color: tokenRef("text-muted"),
395
+ focusColor: tokenRef("primary-base"),
396
+ invalidColor: tokenRef("danger-base"),
397
+ transitionDuration: "0.2s",
398
+ positionX: tokenRef("form-field-padding-x"),
399
+ top: "6px",
400
+ fontWeight: tokenRef("font-weight-medium"),
401
+ fontSize: "11px"
402
+ },
403
+ input: {
404
+ paddingTop: "22px",
405
+ paddingBottom: "6px"
406
+ }
407
+ };
408
+ const selectTokens = {
409
+ root: {
410
+ dropdownColor: tokenRef("form-field-icon-color"),
411
+ dropdownWidth: "31.5px",
412
+ clearSize: "14px",
413
+ gap: "0px"
414
+ },
415
+ overlay: {
416
+ background: tokenRef("surface-overlay"),
417
+ borderColor: tokenRef("surface-overlay-border"),
418
+ borderRadius: tokenRef("radius-lg"),
419
+ shadow: tokenRef("shadow-overlay")
420
+ },
421
+ list: {
422
+ padding: "3.5px",
423
+ gap: "2px",
424
+ maxHeight: "200px"
425
+ },
426
+ option: {
427
+ padding: "7px 10.5px",
428
+ gap: "7px",
429
+ borderRadius: tokenRef("radius-sm"),
430
+ color: tokenRef("text-primary"),
431
+ focusBackground: tokenRef("list-focus-background"),
432
+ selectedBackground: tokenRef("highlight-background"),
433
+ selectedColor: tokenRef("highlight-color"),
434
+ selectedFocusBackground: tokenRef("highlight-focus-background"),
435
+ selectedFocusColor: tokenRef("highlight-focus-color"),
436
+ selectedFontWeight: tokenRef("font-weight-regular"),
437
+ disabledColor: tokenRef("form-field-disabled-color"),
438
+ checkColor: tokenRef("primary-base")
439
+ },
440
+ checkbox: {
441
+ size: "15.75px",
442
+ borderRadius: tokenRef("radius-sm"),
443
+ borderColor: tokenRef("form-field-border-color"),
444
+ background: tokenRef("form-field-background"),
445
+ checkedBackground: tokenRef("primary-base"),
446
+ checkedColor: tokenRef("primary-contrast"),
447
+ iconSize: "10.5px",
448
+ shadow: tokenRef("shadow-field")
449
+ },
450
+ chip: {
451
+ gap: "5.25px",
452
+ paddingY: "3.5px",
453
+ paddingStart: "8.75px",
454
+ paddingEnd: "5.25px",
455
+ borderRadius: tokenRef("radius-sm"),
456
+ background: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
457
+ color: lightDark(tokenRef("surface-800"), tokenRef("surface-0")),
458
+ fontSize: "10.5px",
459
+ removeSize: "12.25px",
460
+ removeColor: lightDark(tokenRef("surface-800"), tokenRef("surface-0")),
461
+ removeHoverColor: tokenRef("text-primary")
462
+ },
463
+ optionGroup: {
464
+ padding: "3.5px 8.75px",
465
+ color: lightDark(tokenRef("surface-500"), tokenRef("surface-400")),
466
+ fontSize: tokenRef("font-size-md"),
467
+ fontWeight: tokenRef("font-weight-semibold")
468
+ },
469
+ filter: {
470
+ padding: "7px 12.25px 1.75px",
471
+ gap: "7px",
472
+ iconInset: "10.5px",
473
+ minHeight: "37px"
474
+ },
475
+ dropdownButton: {
476
+ background: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
477
+ hoverBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
478
+ color: lightDark(tokenRef("surface-600"), tokenRef("surface-300")),
479
+ hoverColor: lightDark(tokenRef("surface-700"), tokenRef("surface-200"))
480
+ },
481
+ header: { padding: "7px 12.25px 1.75px" },
482
+ footer: { padding: "1.75px 12.25px 7px" },
483
+ empty: {
484
+ padding: "7px 10.5px",
485
+ color: tokenRef("text-primary")
486
+ }
487
+ };
488
+ const listboxTokens = { root: {
489
+ background: tokenRef("form-field-background"),
490
+ borderColor: tokenRef("form-field-border-color"),
491
+ borderRadius: tokenRef("form-field-border-radius"),
492
+ shadow: tokenRef("form-field-shadow"),
493
+ focusBorderColor: tokenRef("form-field-focus-border-color"),
494
+ focusRingShadow: tokenRef("form-field-focus-ring-shadow"),
495
+ invalidBorderColor: tokenRef("form-field-invalid-border-color"),
496
+ disabledBackground: tokenRef("form-field-disabled-background"),
497
+ disabledColor: tokenRef("form-field-disabled-color")
498
+ } };
499
+ const chipsInputTokens = { root: {
500
+ gap: "4px",
501
+ chipHeight: "24px",
502
+ chipFontSize: tokenRef("font-size-sm"),
503
+ chipPaddingX: "8px",
504
+ chipBorderRadius: tokenRef("radius-sm"),
505
+ inputMinWidth: "80px"
506
+ } };
507
+ const countryTokens = { root: {
508
+ gap: "8px",
509
+ smallSize: "16px",
510
+ mediumSize: "20px",
511
+ largeSize: "24px",
512
+ borderRadius: "2px",
513
+ ring: `0 0 0 1px ${tokenRef("surface-border")}`,
514
+ nameColor: "inherit",
515
+ hintColor: tokenRef("text-muted"),
516
+ countColor: tokenRef("text-muted"),
517
+ countFontSize: tokenRef("font-size-sm")
518
+ } };
519
+ const colorPickerTokens = {
520
+ root: {
521
+ gap: "8px",
522
+ swatchSize: "20px",
523
+ swatchBorderRadius: tokenRef("radius-sm"),
524
+ swatchRing: `inset 0 0 0 1px ${tokenRef("surface-border")}`
525
+ },
526
+ panel: {
527
+ width: "240px",
528
+ padding: "12px",
529
+ gap: "12px",
530
+ background: tokenRef("surface-overlay"),
531
+ borderColor: tokenRef("surface-overlay-border"),
532
+ borderRadius: tokenRef("radius-lg"),
533
+ shadow: tokenRef("shadow-overlay")
534
+ },
535
+ area: {
536
+ height: "160px",
537
+ borderRadius: tokenRef("radius-md"),
538
+ saturationGradient: "linear-gradient(to right, rgb(255 255 255), rgb(255 255 255 / 0))",
539
+ brightnessGradient: "linear-gradient(to top, rgb(0 0 0), rgb(0 0 0 / 0))"
540
+ },
541
+ hue: {
542
+ height: "12px",
543
+ borderRadius: tokenRef("radius-full"),
544
+ gradient: "linear-gradient(to right, rgb(255 0 0), rgb(255 255 0), rgb(0 255 0), rgb(0 255 255), rgb(0 0 255), rgb(255 0 255), rgb(255 0 0))"
545
+ },
546
+ handle: {
547
+ size: "16px",
548
+ borderColor: tokenRef("surface-0"),
549
+ ring: `0 0 0 1px ${tokenRef("surface-900")}, ${tokenRef("shadow-overlay")}`,
550
+ focusRing: `0 0 0 2px ${tokenRef("surface-0")}, 0 0 0 4px ${tokenRef("focus-ring-color")}`
551
+ },
552
+ preset: {
553
+ size: "22px",
554
+ gap: "6px",
555
+ borderRadius: tokenRef("radius-sm"),
556
+ selectedRing: `0 0 0 2px ${tokenRef("surface-overlay")}, 0 0 0 4px ${tokenRef("primary-base")}`
557
+ }
558
+ };
559
+ const mentionTokens = { root: {
560
+ panelWidth: "280px",
561
+ optionGap: "8px",
562
+ descriptionColor: tokenRef("text-muted"),
563
+ descriptionFontSize: tokenRef("font-size-sm")
564
+ } };
565
+ const treeTokens = { root: {
566
+ indent: "18px",
567
+ gap: "6px",
568
+ togglerSize: "20px",
569
+ togglerColor: tokenRef("text-muted"),
570
+ togglerHoverBackground: tokenRef("surface-hover"),
571
+ iconColor: tokenRef("text-muted")
572
+ } };
573
+ const cascadeSelectTokens = { root: {
574
+ columnWidth: "200px",
575
+ columnBorderColor: tokenRef("surface-overlay-border"),
576
+ groupIconColor: tokenRef("text-muted")
577
+ } };
578
+ const emailSuggestionTokens = { root: {
579
+ offset: "6px",
580
+ enterDistance: "6px",
581
+ enterDuration: "320ms"
582
+ } };
583
+ function severity(group) {
584
+ return {
585
+ background: tokenRef(`${group}-base`),
586
+ color: tokenRef(`${group}-contrast`)
587
+ };
588
+ }
589
+ const badgeTokens = {
590
+ root: {
591
+ borderRadius: tokenRef("radius-full"),
592
+ padding: "0 6px",
593
+ fontSize: "11px",
594
+ fontWeight: tokenRef("font-weight-bold"),
595
+ minWidth: "18px",
596
+ height: "18px"
597
+ },
598
+ dot: { size: "8px" },
599
+ sm: {
600
+ fontSize: "10px",
601
+ minWidth: "16px",
602
+ height: "16px"
603
+ },
604
+ lg: {
605
+ fontSize: "12px",
606
+ minWidth: "22px",
607
+ height: "22px"
608
+ },
609
+ xl: {
610
+ fontSize: "14px",
611
+ minWidth: "26px",
612
+ height: "26px"
613
+ },
614
+ primary: severity("primary"),
615
+ secondary: {
616
+ background: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
617
+ color: lightDark(tokenRef("surface-700"), tokenRef("surface-200"))
618
+ },
619
+ success: severity("success"),
620
+ info: severity("info"),
621
+ warn: severity("warn"),
622
+ danger: severity("danger"),
623
+ help: severity("help"),
624
+ contrast: severity("contrast")
625
+ };
626
+ function tone$4(palette) {
627
+ return {
628
+ tone: lightDark(tokenRef(`${palette}-600`), tokenRef(`${palette}-400`)),
629
+ text: lightDark(tokenRef(`${palette}-700`), tokenRef(`${palette}-400`))
630
+ };
631
+ }
632
+ const messageTokens = {
633
+ root: {
634
+ borderRadius: tokenRef("radius-lg"),
635
+ borderColor: tokenRef("surface-border"),
636
+ borderTint: "30%",
637
+ background: tokenRef("surface-card"),
638
+ backgroundTint: "7%",
639
+ color: tokenRef("text-primary"),
640
+ gap: "12px",
641
+ paddingY: "10px",
642
+ paddingStart: "16px",
643
+ paddingEnd: "12px",
644
+ fontSize: "13px",
645
+ fontWeight: tokenRef("font-weight-regular"),
646
+ lineHeight: "1.5",
647
+ accentWidth: "4px",
648
+ transitionDuration: "0.2s"
649
+ },
650
+ icon: {
651
+ size: "28px",
652
+ fontSize: "14px",
653
+ tint: "15%"
654
+ },
655
+ closeButton: {
656
+ size: "26px",
657
+ borderRadius: tokenRef("radius-md"),
658
+ color: tokenRef("text-muted"),
659
+ hoverColor: tokenRef("text-primary"),
660
+ hoverBackground: fade(tokenRef("text-primary"), "92%"),
661
+ fontSize: "14px"
662
+ },
663
+ sm: {
664
+ gap: "10px",
665
+ paddingY: "8px",
666
+ paddingStart: "14px",
667
+ paddingEnd: "10px",
668
+ fontSize: "12px",
669
+ iconSize: "24px",
670
+ iconFontSize: "12px"
671
+ },
672
+ lg: {
673
+ gap: "14px",
674
+ paddingY: "14px",
675
+ paddingStart: "20px",
676
+ paddingEnd: "16px",
677
+ fontSize: "14px",
678
+ iconSize: "36px",
679
+ iconFontSize: "17px"
680
+ },
681
+ primary: tone$4("primary"),
682
+ info: tone$4("sky"),
683
+ success: tone$4("green"),
684
+ warn: tone$4("orange"),
685
+ danger: tone$4("red"),
686
+ help: tone$4("purple"),
687
+ secondary: {
688
+ tone: tokenRef("text-muted"),
689
+ text: tokenRef("text-muted")
690
+ },
691
+ contrast: {
692
+ tone: tokenRef("text-primary"),
693
+ text: tokenRef("text-primary")
694
+ }
695
+ };
696
+ const fieldMessageTokens = {
697
+ root: {
698
+ fontSize: tokenRef("font-size-sm"),
699
+ lineHeight: "1.4",
700
+ gap: "6px",
701
+ marginTop: "6px",
702
+ iconSize: "12px",
703
+ transitionDuration: "0.2s"
704
+ },
705
+ hint: { color: tokenRef("text-muted") },
706
+ success: { color: lightDark(tokenRef("green-700"), tokenRef("green-400")) },
707
+ error: { color: lightDark(tokenRef("red-700"), tokenRef("red-400")) }
708
+ };
709
+ const fieldTokens = {
710
+ root: { gap: "0px" },
711
+ horizontal: {
712
+ columnGap: "16px",
713
+ labelWidth: "180px",
714
+ labelPaddingTop: `calc(${tokenRef("form-field-padding-y")} + 1px)`
715
+ }
716
+ };
717
+ const textareaTokens = {
718
+ root: { minHeight: "80px" },
719
+ borderless: {
720
+ background: "transparent",
721
+ focusBackground: "transparent"
722
+ },
723
+ counter: {
724
+ color: tokenRef("text-muted"),
725
+ limitColor: lightDark(tokenRef("red-700"), tokenRef("red-400")),
726
+ fontSize: tokenRef("font-size-sm"),
727
+ marginTop: "6px"
728
+ }
729
+ };
730
+ const checkboxTokens = {
731
+ root: {
732
+ size: "18px",
733
+ borderRadius: tokenRef("radius-sm"),
734
+ borderWidth: "1.5px",
735
+ borderColor: tokenRef("form-field-border-color"),
736
+ hoverBorderColor: tokenRef("form-field-hover-border-color"),
737
+ background: tokenRef("form-field-background"),
738
+ filledBackground: tokenRef("form-field-filled-background"),
739
+ checkedBackground: tokenRef("primary-base"),
740
+ checkedBorderColor: tokenRef("primary-base"),
741
+ checkedHoverBackground: tokenRef("primary-hover"),
742
+ checkedHoverBorderColor: tokenRef("primary-hover"),
743
+ iconColor: tokenRef("primary-contrast"),
744
+ iconSize: "12px",
745
+ invalidBorderColor: tokenRef("form-field-invalid-border-color"),
746
+ disabledBackground: tokenRef("form-field-disabled-background"),
747
+ disabledBorderColor: tokenRef("form-field-border-color"),
748
+ disabledCheckedBackground: lightDark(tokenRef("surface-300"), tokenRef("surface-600")),
749
+ disabledIconColor: lightDark(tokenRef("surface-0"), tokenRef("surface-900")),
750
+ focusRingColor: tokenRef("focus-ring-color"),
751
+ focusRingWidth: "2px",
752
+ focusRingOffset: "2px",
753
+ gap: "8px",
754
+ labelColor: tokenRef("text-primary"),
755
+ labelFontSize: tokenRef("font-size-md"),
756
+ labelFontWeight: tokenRef("font-weight-regular"),
757
+ disabledLabelColor: tokenRef("text-muted"),
758
+ descriptionColor: tokenRef("text-muted"),
759
+ descriptionFontSize: tokenRef("font-size-sm"),
760
+ transitionDuration: tokenRef("motion-duration")
761
+ },
762
+ sm: {
763
+ size: "16px",
764
+ iconSize: "10px",
765
+ labelFontSize: tokenRef("font-size-sm")
766
+ },
767
+ lg: {
768
+ size: "22px",
769
+ iconSize: "14px",
770
+ labelFontSize: tokenRef("font-size-lg")
771
+ },
772
+ tile: {
773
+ padding: "12px 14px",
774
+ gap: "12px",
775
+ borderRadius: tokenRef("radius-lg"),
776
+ borderColor: tokenRef("surface-border"),
777
+ hoverBorderColor: tokenRef("form-field-hover-border-color"),
778
+ background: tokenRef("surface-card"),
779
+ checkedBorderColor: tokenRef("primary-base"),
780
+ checkedBackground: tokenRef("highlight-background"),
781
+ labelFontWeight: tokenRef("font-weight-medium")
782
+ },
783
+ group: {
784
+ gap: "10px",
785
+ horizontalGap: "20px",
786
+ selectAllGap: "12px"
787
+ }
788
+ };
789
+ const radioButtonTokens = {
790
+ root: {
791
+ size: "18px",
792
+ borderWidth: "1.5px",
793
+ borderColor: tokenRef("form-field-border-color"),
794
+ hoverBorderColor: tokenRef("form-field-hover-border-color"),
795
+ background: tokenRef("form-field-background"),
796
+ filledBackground: tokenRef("form-field-filled-background"),
797
+ checkedBorderColor: tokenRef("primary-base"),
798
+ checkedBackground: tokenRef("primary-base"),
799
+ checkedHoverBorderColor: tokenRef("primary-hover"),
800
+ checkedHoverBackground: tokenRef("primary-hover"),
801
+ dotSize: "8px",
802
+ dotColor: tokenRef("primary-contrast"),
803
+ invalidBorderColor: tokenRef("form-field-invalid-border-color"),
804
+ disabledBackground: tokenRef("form-field-disabled-background"),
805
+ disabledBorderColor: tokenRef("form-field-border-color"),
806
+ disabledCheckedBackground: lightDark(tokenRef("surface-300"), tokenRef("surface-600")),
807
+ disabledDotColor: lightDark(tokenRef("surface-0"), tokenRef("surface-900")),
808
+ focusRingColor: tokenRef("focus-ring-color"),
809
+ focusRingWidth: "2px",
810
+ focusRingOffset: "2px",
811
+ gap: "8px",
812
+ labelColor: tokenRef("text-primary"),
813
+ labelFontSize: tokenRef("font-size-md"),
814
+ labelFontWeight: tokenRef("font-weight-regular"),
815
+ disabledLabelColor: tokenRef("text-muted"),
816
+ descriptionColor: tokenRef("text-muted"),
817
+ descriptionFontSize: tokenRef("font-size-sm"),
818
+ transitionDuration: tokenRef("motion-duration")
819
+ },
820
+ sm: {
821
+ size: "16px",
822
+ dotSize: "6px",
823
+ labelFontSize: tokenRef("font-size-sm")
824
+ },
825
+ lg: {
826
+ size: "22px",
827
+ dotSize: "10px",
828
+ labelFontSize: tokenRef("font-size-lg")
829
+ },
830
+ tile: {
831
+ padding: "12px 14px",
832
+ gap: "12px",
833
+ borderRadius: tokenRef("radius-lg"),
834
+ borderColor: tokenRef("surface-border"),
835
+ hoverBorderColor: tokenRef("form-field-hover-border-color"),
836
+ background: tokenRef("surface-card"),
837
+ checkedBorderColor: tokenRef("primary-base"),
838
+ checkedBackground: tokenRef("highlight-background"),
839
+ labelFontWeight: tokenRef("font-weight-medium")
840
+ },
841
+ group: {
842
+ gap: "10px",
843
+ horizontalGap: "20px"
844
+ }
845
+ };
846
+ const toggleSwitchTokens = {
847
+ root: {
848
+ width: "40px",
849
+ height: "22px",
850
+ gutter: "2px",
851
+ borderRadius: tokenRef("radius-full"),
852
+ background: lightDark(tokenRef("surface-300"), tokenRef("surface-600")),
853
+ hoverBackground: lightDark(tokenRef("surface-400"), tokenRef("surface-500")),
854
+ checkedBackground: tokenRef("primary-base"),
855
+ checkedHoverBackground: tokenRef("primary-hover"),
856
+ invalidRingColor: tokenRef("form-field-invalid-border-color"),
857
+ disabledBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
858
+ disabledCheckedBackground: lightDark(tokenRef("surface-300"), tokenRef("surface-600")),
859
+ focusRingColor: tokenRef("focus-ring-color"),
860
+ focusRingWidth: "2px",
861
+ focusRingOffset: "2px",
862
+ gap: "10px",
863
+ labelColor: tokenRef("text-primary"),
864
+ labelFontSize: tokenRef("font-size-md"),
865
+ disabledLabelColor: tokenRef("text-muted"),
866
+ descriptionColor: tokenRef("text-muted"),
867
+ descriptionFontSize: tokenRef("font-size-sm"),
868
+ transitionDuration: "0.2s"
869
+ },
870
+ handle: {
871
+ size: "18px",
872
+ background: tokenRef("surface-0"),
873
+ checkedBackground: tokenRef("surface-0"),
874
+ disabledBackground: lightDark(tokenRef("surface-0"), tokenRef("surface-400")),
875
+ shadow: `0 1px 2px ${fade(tokenRef("surface-950"), "75%")}`,
876
+ iconColor: tokenRef("text-muted"),
877
+ checkedIconColor: tokenRef("primary-base"),
878
+ iconSize: "11px"
879
+ },
880
+ sm: {
881
+ width: "32px",
882
+ height: "18px",
883
+ handleSize: "14px",
884
+ iconSize: "9px",
885
+ labelFontSize: tokenRef("font-size-sm")
886
+ },
887
+ lg: {
888
+ width: "50px",
889
+ height: "28px",
890
+ handleSize: "24px",
891
+ iconSize: "14px",
892
+ labelFontSize: tokenRef("font-size-lg")
893
+ }
894
+ };
895
+ const passwordTokens = {
896
+ root: {
897
+ actionGap: "2px",
898
+ actionInset: "8px"
899
+ },
900
+ panel: {
901
+ padding: "12px 14px",
902
+ gap: "8px",
903
+ background: tokenRef("surface-overlay"),
904
+ borderColor: tokenRef("surface-overlay-border"),
905
+ borderRadius: tokenRef("radius-lg"),
906
+ shadow: tokenRef("shadow-overlay"),
907
+ color: tokenRef("text-primary"),
908
+ fontSize: tokenRef("font-size-sm")
909
+ },
910
+ meter: {
911
+ height: "6px",
912
+ borderRadius: tokenRef("radius-full"),
913
+ background: tokenRef("surface-border"),
914
+ weakBackground: tokenRef("danger-base"),
915
+ mediumBackground: tokenRef("warn-base"),
916
+ strongBackground: tokenRef("success-base"),
917
+ transitionDuration: "0.25s"
918
+ }
919
+ };
920
+ const inputOtpTokens = {
921
+ root: {
922
+ gap: "8px",
923
+ cellWidth: "42px",
924
+ cellFontSize: tokenRef("font-size-lg"),
925
+ cellFontWeight: tokenRef("font-weight-semibold"),
926
+ separatorColor: tokenRef("text-muted"),
927
+ separatorWidth: "12px"
928
+ },
929
+ sm: {
930
+ cellWidth: "34px",
931
+ cellFontSize: tokenRef("font-size-md"),
932
+ gap: "6px"
933
+ },
934
+ lg: {
935
+ cellWidth: "52px",
936
+ cellFontSize: "20px",
937
+ gap: "10px"
938
+ }
939
+ };
940
+ const inputNumberTokens = { button: {
941
+ width: "34px",
942
+ stackedWidth: "28px",
943
+ background: lightDark(tokenRef("surface-50"), tokenRef("surface-800")),
944
+ hoverBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-700")),
945
+ activeBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-600")),
946
+ color: tokenRef("text-muted"),
947
+ hoverColor: tokenRef("text-primary"),
948
+ borderColor: tokenRef("form-field-border-color"),
949
+ iconSize: "12px"
950
+ } };
951
+ const ratingTokens = {
952
+ root: {
953
+ gap: "2px",
954
+ iconSize: "22px",
955
+ color: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
956
+ activeColor: tokenRef("orange-400"),
957
+ hoverColor: tokenRef("orange-300"),
958
+ hoverScale: "1.15",
959
+ disabledOpacity: "0.5",
960
+ focusRingColor: tokenRef("focus-ring-color"),
961
+ focusRingWidth: "2px",
962
+ focusRingOffset: "3px",
963
+ borderRadius: tokenRef("radius-sm"),
964
+ clearGap: "10px",
965
+ clearColor: tokenRef("text-muted"),
966
+ clearHoverColor: tokenRef("text-primary"),
967
+ clearFontSize: tokenRef("font-size-sm"),
968
+ transitionDuration: tokenRef("motion-duration")
969
+ },
970
+ sm: {
971
+ iconSize: "16px",
972
+ gap: "1px"
973
+ },
974
+ lg: {
975
+ iconSize: "30px",
976
+ gap: "4px"
977
+ }
978
+ };
979
+ const knobTokens = { root: {
980
+ valueColor: tokenRef("primary-base"),
981
+ rangeColor: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
982
+ limitColor: lightDark(tokenRef("red-200"), tokenRef("red-900")),
983
+ textColor: tokenRef("text-primary"),
984
+ textFontSize: "20cqw",
985
+ textFontWeight: tokenRef("font-weight-semibold"),
986
+ handleColor: tokenRef("surface-0"),
987
+ handleBorderColor: tokenRef("primary-base"),
988
+ disabledOpacity: "0.55",
989
+ focusRingColor: tokenRef("focus-ring-color"),
990
+ focusRingWidth: "2px",
991
+ focusRingOffset: "4px",
992
+ transitionDuration: tokenRef("motion-duration")
993
+ } };
994
+ const sliderTokens = {
995
+ root: {
996
+ trackSize: "4px",
997
+ trackBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
998
+ trackBorderRadius: tokenRef("radius-full"),
999
+ rangeBackground: tokenRef("primary-base"),
1000
+ verticalHeight: "180px",
1001
+ disabledOpacity: "0.55",
1002
+ invalidRangeBackground: tokenRef("form-field-invalid-border-color"),
1003
+ transitionDuration: "0.2s"
1004
+ },
1005
+ handle: {
1006
+ size: "18px",
1007
+ background: tokenRef("surface-0"),
1008
+ borderColor: tokenRef("primary-base"),
1009
+ borderWidth: "2px",
1010
+ shadow: `0 1px 2px ${fade(tokenRef("surface-950"), "80%")}`,
1011
+ hoverRing: `0 0 0 6px ${fade(tokenRef("primary-base"), "85%")}`,
1012
+ focusRingColor: tokenRef("focus-ring-color"),
1013
+ focusRingWidth: "2px",
1014
+ focusRingOffset: "2px"
1015
+ },
1016
+ mark: {
1017
+ size: "4px",
1018
+ background: lightDark(tokenRef("surface-400"), tokenRef("surface-500")),
1019
+ activeBackground: tokenRef("primary-contrast"),
1020
+ labelColor: tokenRef("text-muted"),
1021
+ labelFontSize: tokenRef("font-size-sm"),
1022
+ labelGap: "10px"
1023
+ }
1024
+ };
1025
+ const overlayBadgeTokens = { root: {
1026
+ ringColor: tokenRef("surface-card"),
1027
+ ringWidth: "2px",
1028
+ offset: "0px",
1029
+ circleOffset: "14%"
1030
+ } };
1031
+ function tone$3(palette) {
1032
+ return {
1033
+ color: lightDark(tokenRef(`${palette}-800`), tokenRef(`${palette}-300`)),
1034
+ solidBackground: lightDark(tokenRef(`${palette}-700`), tokenRef(`${palette}-400`)),
1035
+ solidColor: lightDark(tokenRef("surface-0"), tokenRef("surface-950"))
1036
+ };
1037
+ }
1038
+ const pillTokens = {
1039
+ root: {
1040
+ gap: "4px",
1041
+ paddingX: "8px",
1042
+ paddingY: "2px",
1043
+ borderRadius: tokenRef("radius-full"),
1044
+ fontSize: "12px",
1045
+ fontWeight: tokenRef("font-weight-semibold"),
1046
+ lineHeight: "1.4",
1047
+ tint: "12%",
1048
+ outlineBorderColor: tokenRef("surface-border"),
1049
+ outlineColor: tokenRef("text-primary"),
1050
+ iconSize: "0.9em",
1051
+ dotSize: "6px",
1052
+ removeSize: "16px",
1053
+ focusRingColor: tokenRef("focus-ring-color")
1054
+ },
1055
+ sm: {
1056
+ fontSize: "11px",
1057
+ paddingX: "6px",
1058
+ paddingY: "1px"
1059
+ },
1060
+ lg: {
1061
+ fontSize: "13px",
1062
+ paddingX: "10px",
1063
+ paddingY: "3px",
1064
+ gap: "6px"
1065
+ },
1066
+ neutral: {
1067
+ color: tokenRef("text-muted"),
1068
+ solidBackground: lightDark(tokenRef("surface-600"), tokenRef("surface-400")),
1069
+ solidColor: lightDark(tokenRef("surface-0"), tokenRef("surface-950"))
1070
+ },
1071
+ primary: tone$3("primary"),
1072
+ success: tone$3("green"),
1073
+ info: tone$3("sky"),
1074
+ warn: tone$3("orange"),
1075
+ danger: tone$3("red"),
1076
+ help: tone$3("purple"),
1077
+ contrast: {
1078
+ color: tokenRef("text-primary"),
1079
+ solidBackground: tokenRef("text-primary"),
1080
+ solidColor: tokenRef("surface-card")
1081
+ }
1082
+ };
1083
+ function tone$2(palette) {
1084
+ return { color: lightDark(tokenRef(`${palette}-800`), tokenRef(`${palette}-300`)) };
1085
+ }
1086
+ const tagTokens = {
1087
+ root: {
1088
+ gap: "4px",
1089
+ paddingX: "7px",
1090
+ paddingY: "2px",
1091
+ borderRadius: tokenRef("radius-sm"),
1092
+ roundedBorderRadius: tokenRef("radius-full"),
1093
+ fontSize: "12px",
1094
+ fontWeight: tokenRef("font-weight-semibold"),
1095
+ lineHeight: "1.4",
1096
+ tint: "14%",
1097
+ iconSize: "0.95em",
1098
+ actionSize: "16px",
1099
+ focusRingColor: tokenRef("focus-ring-color")
1100
+ },
1101
+ sm: {
1102
+ fontSize: "11px",
1103
+ paddingX: "5px",
1104
+ paddingY: "1px"
1105
+ },
1106
+ lg: {
1107
+ fontSize: "14px",
1108
+ paddingX: "9px",
1109
+ paddingY: "3px",
1110
+ gap: "6px"
1111
+ },
1112
+ primary: tone$2("primary"),
1113
+ secondary: { color: tokenRef("text-muted") },
1114
+ success: tone$2("green"),
1115
+ info: tone$2("sky"),
1116
+ warn: tone$2("orange"),
1117
+ danger: tone$2("red"),
1118
+ help: tone$2("purple"),
1119
+ contrast: { color: tokenRef("text-primary") }
1120
+ };
1121
+ const chipTokens = { root: {
1122
+ gap: "6px",
1123
+ height: "30px",
1124
+ paddingX: "12px",
1125
+ borderRadius: tokenRef("radius-full"),
1126
+ background: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
1127
+ color: tokenRef("text-primary"),
1128
+ fontSize: tokenRef("font-size-md"),
1129
+ iconColor: tokenRef("text-muted"),
1130
+ imageSize: "24px",
1131
+ removeSize: "18px",
1132
+ removeColor: tokenRef("text-muted"),
1133
+ removeHoverColor: tokenRef("text-primary"),
1134
+ removeHoverBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
1135
+ focusRingColor: tokenRef("focus-ring-color")
1136
+ } };
1137
+ function fill(palette) {
1138
+ return lightDark(tokenRef(`${palette}-600`), tokenRef(`${palette}-400`));
1139
+ }
1140
+ const progressBarTokens = {
1141
+ root: {
1142
+ height: "6px",
1143
+ borderRadius: tokenRef("radius-full"),
1144
+ trackBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
1145
+ gap: "10px",
1146
+ labelColor: tokenRef("text-muted"),
1147
+ labelFontSize: tokenRef("font-size-sm"),
1148
+ labelFontWeight: tokenRef("font-weight-medium"),
1149
+ transitionDuration: "0.4s",
1150
+ indeterminateDuration: "1.4s"
1151
+ },
1152
+ sm: { height: "4px" },
1153
+ lg: { height: "10px" },
1154
+ primary: tokenRef("primary-base"),
1155
+ secondary: lightDark(tokenRef("surface-500"), tokenRef("surface-400")),
1156
+ success: fill("green"),
1157
+ info: fill("sky"),
1158
+ warn: fill("orange"),
1159
+ danger: fill("red"),
1160
+ help: fill("purple"),
1161
+ contrast: tokenRef("text-primary")
1162
+ };
1163
+ const progressSpinnerTokens = {
1164
+ root: {
1165
+ color: tokenRef("primary-base"),
1166
+ trackColor: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
1167
+ size: "32px",
1168
+ duration: "0.8s",
1169
+ reducedDuration: "2.4s"
1170
+ },
1171
+ sm: { size: "20px" },
1172
+ lg: { size: "48px" }
1173
+ };
1174
+ const skeletonTokens = {
1175
+ root: {
1176
+ background: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
1177
+ waveColor: lightDark(fade(tokenRef("surface-0"), "45%"), fade(tokenRef("surface-500"), "75%")),
1178
+ borderRadius: tokenRef("radius-md"),
1179
+ lineHeight: "12px",
1180
+ lineGap: "10px",
1181
+ lastLineWidth: "60%",
1182
+ circleSize: "40px",
1183
+ duration: "1.6s"
1184
+ },
1185
+ table: {
1186
+ rowHeight: "44px",
1187
+ cellGap: "16px",
1188
+ borderColor: tokenRef("surface-border"),
1189
+ headerBackground: lightDark(tokenRef("surface-50"), tokenRef("surface-900"))
1190
+ }
1191
+ };
1192
+ function tone$1(palette) {
1193
+ return {
1194
+ background: lightDark(tokenRef(`${palette}-100`), `color-mix(in srgb, ${tokenRef(`${palette}-400`)} 22%, ${tokenRef("surface-900")})`),
1195
+ color: lightDark(tokenRef(`${palette}-700`), tokenRef(`${palette}-200`))
1196
+ };
1197
+ }
1198
+ const avatarTokens = {
1199
+ root: {
1200
+ size: "36px",
1201
+ fontWeight: tokenRef("font-weight-semibold"),
1202
+ fontScale: "0.4",
1203
+ iconScale: "0.5",
1204
+ squareBorderRadius: tokenRef("radius-lg"),
1205
+ background: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
1206
+ color: tokenRef("text-muted")
1207
+ },
1208
+ sm: { size: "28px" },
1209
+ lg: { size: "44px" },
1210
+ xl: { size: "64px" },
1211
+ tones: {
1212
+ blue: tone$1("primary"),
1213
+ green: tone$1("green"),
1214
+ sky: tone$1("sky"),
1215
+ orange: tone$1("orange"),
1216
+ purple: tone$1("purple"),
1217
+ red: tone$1("red")
1218
+ },
1219
+ group: {
1220
+ overlap: "0.18",
1221
+ ringWidth: "2px",
1222
+ ringColor: tokenRef("surface-card"),
1223
+ moreBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
1224
+ moreColor: tokenRef("text-muted")
1225
+ }
1226
+ };
1227
+ const dividerTokens = { root: {
1228
+ color: tokenRef("surface-border"),
1229
+ width: "1px",
1230
+ margin: "16px",
1231
+ contentGap: "12px",
1232
+ contentColor: tokenRef("text-muted"),
1233
+ contentFontSize: tokenRef("font-size-sm"),
1234
+ contentFontWeight: tokenRef("font-weight-medium")
1235
+ } };
1236
+ const cardTokens = { root: {
1237
+ background: tokenRef("surface-card"),
1238
+ borderColor: tokenRef("surface-border"),
1239
+ borderRadius: "16px",
1240
+ shadow: `0 1px 2px ${fade(tokenRef("surface-950"), "95%")}`,
1241
+ padding: "20px",
1242
+ gap: "12px",
1243
+ color: tokenRef("text-primary"),
1244
+ titleFontSize: tokenRef("font-size-xl"),
1245
+ titleFontWeight: tokenRef("font-weight-semibold"),
1246
+ subtitleColor: tokenRef("text-muted"),
1247
+ subtitleFontSize: tokenRef("font-size-md")
1248
+ } };
1249
+ const panelTokens = {
1250
+ root: {
1251
+ background: tokenRef("surface-card"),
1252
+ borderColor: tokenRef("surface-border"),
1253
+ borderRadius: "16px",
1254
+ padding: "24px",
1255
+ gap: "20px",
1256
+ color: tokenRef("text-primary"),
1257
+ titleFontSize: tokenRef("font-size-lg"),
1258
+ titleFontWeight: tokenRef("font-weight-semibold"),
1259
+ subtitleColor: tokenRef("text-muted"),
1260
+ subtitleFontSize: tokenRef("font-size-sm"),
1261
+ iconSize: "40px",
1262
+ iconBorderRadius: tokenRef("radius-lg"),
1263
+ iconColor: tokenRef("primary-base"),
1264
+ iconBackground: fade(tokenRef("primary-base"), "88%"),
1265
+ transitionDuration: "0.25s"
1266
+ },
1267
+ inset: {
1268
+ background: lightDark(tokenRef("surface-50"), tokenRef("surface-950")),
1269
+ padding: "20px",
1270
+ gap: "16px"
1271
+ },
1272
+ plain: {
1273
+ gap: "12px",
1274
+ titleFontSize: "15px",
1275
+ iconSize: "28px"
1276
+ }
1277
+ };
1278
+ const fieldsetTokens = { root: {
1279
+ borderColor: tokenRef("surface-border"),
1280
+ borderRadius: "12px",
1281
+ padding: "16px 20px 20px",
1282
+ background: tokenRef("surface-card"),
1283
+ legendPadding: "0 8px",
1284
+ legendColor: tokenRef("text-primary"),
1285
+ legendFontSize: tokenRef("font-size-md"),
1286
+ legendFontWeight: tokenRef("font-weight-semibold"),
1287
+ legendHoverBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
1288
+ transitionDuration: "0.25s"
1289
+ } };
1290
+ const highlightTextTokens = { mark: {
1291
+ background: lightDark(tokenRef("yellow-200"), fade(tokenRef("yellow-400"), "72%")),
1292
+ color: lightDark(tokenRef("surface-950"), tokenRef("yellow-50")),
1293
+ borderRadius: "3px",
1294
+ paddingX: "1px",
1295
+ fontWeight: "inherit"
1296
+ } };
1297
+ const amountTokens = {
1298
+ root: {
1299
+ color: tokenRef("text-primary"),
1300
+ fontWeight: tokenRef("font-weight-semibold"),
1301
+ strongFontWeight: tokenRef("font-weight-bold"),
1302
+ mutedColor: tokenRef("text-muted"),
1303
+ mutedFontWeight: tokenRef("font-weight-normal"),
1304
+ positiveColor: lightDark(tokenRef("green-700"), tokenRef("green-400")),
1305
+ negativeColor: lightDark(tokenRef("red-700"), tokenRef("red-400"))
1306
+ },
1307
+ currency: {
1308
+ color: tokenRef("text-muted"),
1309
+ fontSize: "0.85em",
1310
+ fontWeight: tokenRef("font-weight-medium")
1311
+ }
1312
+ };
1313
+ const statusIconTokens = {
1314
+ root: {
1315
+ size: "16px",
1316
+ smSize: "14px",
1317
+ lgSize: "20px"
1318
+ },
1319
+ success: { color: lightDark(tokenRef("green-600"), tokenRef("green-400")) },
1320
+ info: { color: lightDark(tokenRef("sky-600"), tokenRef("sky-400")) },
1321
+ warn: { color: lightDark(tokenRef("orange-600"), tokenRef("orange-400")) },
1322
+ danger: { color: lightDark(tokenRef("red-600"), tokenRef("red-400")) },
1323
+ secondary: { color: tokenRef("text-muted") }
1324
+ };
1325
+ const linkTokens = { root: {
1326
+ color: tokenRef("primary-soft-text"),
1327
+ hoverColor: tokenRef("primary-active"),
1328
+ gap: "6px",
1329
+ underlineOffset: "2px",
1330
+ externalIconSize: "0.8em",
1331
+ copyColor: tokenRef("text-muted"),
1332
+ copyHoverColor: tokenRef("primary-soft-text"),
1333
+ copyHoverBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
1334
+ copySize: "22px",
1335
+ copyIconSize: "12px",
1336
+ copiedColor: lightDark(tokenRef("green-700"), tokenRef("green-400")),
1337
+ focusRingColor: tokenRef("focus-ring-color")
1338
+ } };
1339
+ const iconLinkTokens = { root: {
1340
+ color: tokenRef("text-muted"),
1341
+ hoverColor: tokenRef("text-primary"),
1342
+ activeColor: tokenRef("primary-soft-text"),
1343
+ gap: "8px",
1344
+ paddingX: "8px",
1345
+ paddingY: "6px",
1346
+ borderRadius: tokenRef("radius-md"),
1347
+ hoverBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
1348
+ activeBackground: tokenRef("highlight-background"),
1349
+ fontSize: tokenRef("font-size-md"),
1350
+ fontWeight: tokenRef("font-weight-medium"),
1351
+ iconSize: "1em",
1352
+ focusRingColor: tokenRef("focus-ring-color")
1353
+ } };
1354
+ const tooltipTokens = {
1355
+ root: {
1356
+ background: lightDark(tokenRef("surface-900"), tokenRef("surface-50")),
1357
+ color: lightDark(tokenRef("surface-0"), tokenRef("surface-950")),
1358
+ maxWidth: "252px",
1359
+ padding: "5.25px 8.75px",
1360
+ borderRadius: tokenRef("radius-lg"),
1361
+ fontSize: "12.25px",
1362
+ fontWeight: tokenRef("font-weight-regular"),
1363
+ lineHeight: "1.45",
1364
+ shadow: tokenRef("shadow-overlay")
1365
+ },
1366
+ multiline: {
1367
+ maxWidth: "360px",
1368
+ lineHeight: "1.5"
1369
+ },
1370
+ arrow: {
1371
+ size: "5px",
1372
+ inset: "10px"
1373
+ }
1374
+ };
1375
+ const popoverTokens = {
1376
+ root: {
1377
+ background: tokenRef("surface-overlay"),
1378
+ borderColor: tokenRef("surface-overlay-border"),
1379
+ borderWidth: "1px",
1380
+ borderRadius: tokenRef("radius-lg"),
1381
+ color: tokenRef("text-primary"),
1382
+ shadow: tokenRef("shadow-overlay"),
1383
+ minWidth: "0",
1384
+ maxWidth: "calc(100vw - 16px)",
1385
+ padding: "0",
1386
+ gap: "0",
1387
+ fontSize: tokenRef("font-size-md")
1388
+ },
1389
+ header: {
1390
+ padding: "10.5px 10.5px 0",
1391
+ gap: "7px"
1392
+ },
1393
+ title: {
1394
+ fontSize: tokenRef("font-size-md"),
1395
+ fontWeight: tokenRef("font-weight-semibold")
1396
+ },
1397
+ content: { padding: "10.5px" },
1398
+ footer: {
1399
+ padding: "0 10.5px 10.5px",
1400
+ gap: "5.25px"
1401
+ },
1402
+ closeButton: {
1403
+ size: "30px",
1404
+ color: tokenRef("text-muted"),
1405
+ hoverColor: tokenRef("text-primary"),
1406
+ hoverBackground: fade(tokenRef("text-primary"), "92%"),
1407
+ borderRadius: tokenRef("radius-md")
1408
+ },
1409
+ arrow: {
1410
+ size: "14px",
1411
+ inset: "15.75px"
1412
+ },
1413
+ focusRing: {
1414
+ width: "2px",
1415
+ color: tokenRef("focus-ring-color")
1416
+ }
1417
+ };
1418
+ function tone(palette) {
1419
+ return { tone: lightDark(tokenRef(`${palette}-600`), tokenRef(`${palette}-400`)) };
1420
+ }
1421
+ const toastTokens = {
1422
+ root: {
1423
+ width: "min(448px, calc(100vw - 28px))",
1424
+ insetX: "28px",
1425
+ insetTop: "70px",
1426
+ insetBottom: "28px",
1427
+ gap: "8px",
1428
+ duration: "0.3s"
1429
+ },
1430
+ item: {
1431
+ background: `color-mix(in srgb, ${tokenRef("surface-card")} 88%, transparent)`,
1432
+ blur: "24px",
1433
+ ringColor: tokenRef("surface-border"),
1434
+ shadow: tokenRef("shadow-overlay"),
1435
+ color: tokenRef("text-primary"),
1436
+ borderRadius: "24.5px",
1437
+ gap: "10.5px",
1438
+ paddingY: "8.75px",
1439
+ paddingStart: "8.75px",
1440
+ paddingEnd: "17.5px",
1441
+ loadingPaddingEnd: "8.75px",
1442
+ fontSize: "13.125px",
1443
+ fontWeight: tokenRef("font-weight-medium")
1444
+ },
1445
+ icon: {
1446
+ size: "31.5px",
1447
+ fontSize: "12.25px",
1448
+ strokeWidth: "2.5",
1449
+ tint: "14%"
1450
+ },
1451
+ text: {
1452
+ paddingY: "5.25px",
1453
+ lineHeight: "21px",
1454
+ lines: "3"
1455
+ },
1456
+ closeButton: {
1457
+ size: "21px",
1458
+ offset: "-5.25px",
1459
+ fontSize: "8.75px",
1460
+ background: tokenRef("surface-card"),
1461
+ color: tokenRef("text-muted"),
1462
+ hoverColor: tokenRef("text-primary"),
1463
+ ringColor: tokenRef("surface-border"),
1464
+ shadow: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"
1465
+ },
1466
+ action: {
1467
+ padding: "5.25px 12.25px",
1468
+ fontSize: "12.25px",
1469
+ fontWeight: tokenRef("font-weight-semibold"),
1470
+ tint: "14%",
1471
+ hoverTint: "22%"
1472
+ },
1473
+ focusRing: { shadow: `0 0 0 2px ${tokenRef("surface-card")}, 0 0 0 4px ${tokenRef("primary-base")}` },
1474
+ progress: { height: "2px" },
1475
+ info: tone("sky"),
1476
+ success: tone("green"),
1477
+ warn: tone("amber"),
1478
+ danger: tone("red"),
1479
+ secondary: { tone: tokenRef("text-muted") },
1480
+ contrast: { tone: tokenRef("text-primary") }
1481
+ };
1482
+ const dialogTokens = {
1483
+ root: {
1484
+ background: tokenRef("surface-overlay"),
1485
+ borderColor: lightDark(tokenRef("surface-200"), tokenRef("surface-800")),
1486
+ borderWidth: "1px",
1487
+ borderRadius: tokenRef("radius-xl"),
1488
+ color: tokenRef("text-primary"),
1489
+ shadow: tokenRef("shadow-modal"),
1490
+ maxHeight: "90%",
1491
+ positionMargin: "10.5px",
1492
+ fontSize: tokenRef("font-size-md"),
1493
+ lineHeight: "1.45",
1494
+ enterDuration: "0.15s",
1495
+ leaveDuration: "0.15s"
1496
+ },
1497
+ mask: { background: tokenRef("mask-background") },
1498
+ header: {
1499
+ padding: "17.5px 21px",
1500
+ gap: "7px"
1501
+ },
1502
+ title: {
1503
+ fontSize: "15.75px",
1504
+ fontWeight: tokenRef("font-weight-semibold")
1505
+ },
1506
+ subtitle: {
1507
+ color: tokenRef("text-muted"),
1508
+ fontSize: "12.25px"
1509
+ },
1510
+ content: {
1511
+ padding: "0 21px",
1512
+ lastPaddingBottom: "21px"
1513
+ },
1514
+ footer: {
1515
+ padding: "21px",
1516
+ gap: "7px"
1517
+ },
1518
+ focusRing: {
1519
+ width: "2px",
1520
+ color: tokenRef("focus-ring-color")
1521
+ },
1522
+ sm: { width: "500px" },
1523
+ md: { width: "700px" },
1524
+ lg: { width: "900px" },
1525
+ xl: { width: "1100px" },
1526
+ drawer: {
1527
+ sm: "320px",
1528
+ md: "440px",
1529
+ lg: "640px",
1530
+ background: tokenRef("surface-card"),
1531
+ dividerColor: tokenRef("surface-border"),
1532
+ headerPadding: "10.5px 17.5px",
1533
+ titleFontSize: tokenRef("font-size-md"),
1534
+ contentPadding: "14px 17.5px",
1535
+ footerPadding: "10.5px 17.5px"
1536
+ }
1537
+ };
1538
+ function badge(color, base, tint = "14%") {
1539
+ return {
1540
+ color,
1541
+ background: `color-mix(in srgb, ${tokenRef(`${base}-500`)} ${tint}, transparent)`
1542
+ };
1543
+ }
1544
+ const confirmTokens = {
1545
+ root: {
1546
+ gap: "14px",
1547
+ padding: "14px",
1548
+ borderRadius: tokenRef("radius-lg"),
1549
+ background: tokenRef("surface-ground")
1550
+ },
1551
+ icon: {
1552
+ size: "38.5px",
1553
+ fontSize: tokenRef("font-size-md")
1554
+ },
1555
+ message: {
1556
+ color: tokenRef("text-muted"),
1557
+ fontSize: "12.25px",
1558
+ lineHeight: "1.625"
1559
+ },
1560
+ popup: {
1561
+ background: tokenRef("surface-overlay"),
1562
+ borderColor: tokenRef("surface-overlay-border"),
1563
+ borderRadius: tokenRef("radius-lg"),
1564
+ shadow: tokenRef("shadow-overlay"),
1565
+ color: tokenRef("text-primary"),
1566
+ padding: "10.5px",
1567
+ gap: "7px",
1568
+ footerGap: "5.25px",
1569
+ maxWidth: "min(340px, calc(100vw - 16px))",
1570
+ fontSize: tokenRef("font-size-md"),
1571
+ iconSize: "17.5px",
1572
+ arrowSize: "14px",
1573
+ arrowInset: "15.75px"
1574
+ },
1575
+ primary: {
1576
+ color: tokenRef("primary-base"),
1577
+ background: `color-mix(in srgb, ${tokenRef("primary-base")} 14%, transparent)`
1578
+ },
1579
+ info: badge(lightDark(tokenRef("blue-600"), tokenRef("blue-400")), "blue"),
1580
+ success: badge(lightDark(tokenRef("green-700"), tokenRef("green-400")), "green"),
1581
+ warn: badge(lightDark(tokenRef("amber-700"), tokenRef("amber-400")), "amber", "16%"),
1582
+ danger: badge(lightDark(tokenRef("red-600"), tokenRef("red-400")), "red")
1583
+ };
1584
+ const menuTokens = {
1585
+ root: {
1586
+ background: tokenRef("surface-card"),
1587
+ borderColor: tokenRef("surface-border"),
1588
+ borderRadius: tokenRef("radius-lg"),
1589
+ color: tokenRef("text-primary"),
1590
+ shadow: tokenRef("shadow-overlay"),
1591
+ padding: "3.5px",
1592
+ gap: "2px",
1593
+ minWidth: "200px",
1594
+ maxHeight: "min(420px, calc(100vh - 32px))",
1595
+ fontSize: tokenRef("font-size-md"),
1596
+ lineHeight: "1.45"
1597
+ },
1598
+ item: {
1599
+ padding: "7px 10.5px",
1600
+ gap: "7px",
1601
+ borderRadius: tokenRef("radius-sm"),
1602
+ color: tokenRef("text-primary"),
1603
+ fontWeight: tokenRef("font-weight-regular"),
1604
+ focusBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
1605
+ focusColor: tokenRef("text-hover"),
1606
+ disabledOpacity: "0.6",
1607
+ dangerColor: lightDark(tokenRef("red-600"), tokenRef("red-400")),
1608
+ dangerFocusBackground: lightDark(tokenRef("red-50"), `color-mix(in srgb, ${tokenRef("red-400")}, transparent 96%)`)
1609
+ },
1610
+ icon: {
1611
+ color: lightDark(tokenRef("surface-400"), tokenRef("surface-500")),
1612
+ focusColor: lightDark(tokenRef("surface-500"), tokenRef("surface-400")),
1613
+ size: tokenRef("font-size-md")
1614
+ },
1615
+ shortcut: {
1616
+ color: tokenRef("text-muted"),
1617
+ fontSize: tokenRef("font-size-xs")
1618
+ },
1619
+ groupLabel: {
1620
+ padding: "3.5px 8.75px",
1621
+ color: tokenRef("text-muted"),
1622
+ fontSize: tokenRef("font-size-md"),
1623
+ fontWeight: tokenRef("font-weight-semibold")
1624
+ },
1625
+ submenuIcon: { size: "10.5px" },
1626
+ separator: {
1627
+ color: tokenRef("surface-border"),
1628
+ margin: "2px 0"
1629
+ },
1630
+ popup: {
1631
+ background: tokenRef("surface-overlay"),
1632
+ borderColor: tokenRef("surface-overlay-border"),
1633
+ padding: "5.25px",
1634
+ gap: "1.75px",
1635
+ minWidth: "168px",
1636
+ itemPadding: "7px 10.5px",
1637
+ itemGap: "8.75px",
1638
+ itemBorderRadius: tokenRef("radius-md"),
1639
+ fontSize: "12.25px",
1640
+ fontWeight: tokenRef("font-weight-medium"),
1641
+ itemBorderWidth: "1px"
1642
+ },
1643
+ context: {
1644
+ background: `color-mix(in srgb, ${tokenRef("surface-card")} 92%, transparent)`,
1645
+ borderColor: tokenRef("surface-border"),
1646
+ blur: "24px",
1647
+ padding: "3.5px",
1648
+ minWidth: "196px",
1649
+ maxWidth: "280px",
1650
+ maxHeight: "min(70vh, 448px)",
1651
+ itemPadding: "5.25px 7px",
1652
+ itemGap: "8.75px",
1653
+ iconButtonSize: "21px",
1654
+ iconButtonFontSize: "10.5px",
1655
+ iconButtonBorderRadius: tokenRef("radius-md"),
1656
+ disabledOpacity: "0.5",
1657
+ itemBorderRadius: tokenRef("radius-md"),
1658
+ fontSize: "12.25px"
1659
+ }
1660
+ };
1661
+ const splitButtonTokens = { root: {
1662
+ dividerColor: "color-mix(in srgb, currentColor 32%, transparent)",
1663
+ dividerWidth: "0px"
1664
+ } };
1665
+ const speedDialTokens = {
1666
+ root: {
1667
+ gap: "7px",
1668
+ duration: "0.15s",
1669
+ stagger: "30ms"
1670
+ },
1671
+ mask: { background: tokenRef("mask-background") }
1672
+ };
1673
+ const paginatorTokens = {
1674
+ root: {
1675
+ padding: "7px",
1676
+ gap: "3.5px",
1677
+ borderRadius: tokenRef("radius-lg"),
1678
+ background: tokenRef("surface-card"),
1679
+ color: tokenRef("text-primary"),
1680
+ transitionDuration: tokenRef("motion-duration")
1681
+ },
1682
+ navButton: {
1683
+ background: "transparent",
1684
+ hoverBackground: tokenRef("surface-hover"),
1685
+ selectedBackground: tokenRef("primary-base"),
1686
+ color: tokenRef("text-muted"),
1687
+ hoverColor: tokenRef("text-muted-hover"),
1688
+ selectedColor: tokenRef("primary-contrast"),
1689
+ width: "31.5px",
1690
+ height: "31.5px",
1691
+ borderRadius: tokenRef("radius-md"),
1692
+ fontWeight: tokenRef("font-weight-regular"),
1693
+ fontSize: tokenRef("font-size-md"),
1694
+ iconSize: "14px",
1695
+ disabledOpacity: "0.6",
1696
+ focusRing: {
1697
+ width: "2px",
1698
+ style: "solid",
1699
+ color: tokenRef("focus-ring-color"),
1700
+ offset: "2px"
1701
+ }
1702
+ },
1703
+ currentPageReport: {
1704
+ color: tokenRef("text-muted"),
1705
+ fontWeight: tokenRef("font-weight-regular"),
1706
+ fontSize: tokenRef("font-size-md")
1707
+ },
1708
+ jumpToPageInput: { maxWidth: "31.5px" },
1709
+ total: {
1710
+ color: tokenRef("text-primary"),
1711
+ fontWeight: tokenRef("font-weight-bold"),
1712
+ fontSize: tokenRef("font-size-md"),
1713
+ margin: "10.5px 0"
1714
+ }
1715
+ };
1716
+ const borderColor = tokenRef("surface-border");
1717
+ const tableTokens = {
1718
+ root: {
1719
+ borderColor,
1720
+ transitionDuration: tokenRef("motion-duration"),
1721
+ color: tokenRef("text-primary"),
1722
+ fontSize: tokenRef("font-size-md"),
1723
+ lineHeight: "1.45"
1724
+ },
1725
+ toolbar: {
1726
+ gap: "10.5px",
1727
+ marginBottom: "10.5px"
1728
+ },
1729
+ scroller: {
1730
+ paddingBottom: "10px",
1731
+ scrollbarSize: "10px",
1732
+ scrollbarThumb: tokenRef("surface-300"),
1733
+ scrollbarThumbHover: tokenRef("surface-400")
1734
+ },
1735
+ headerCell: {
1736
+ background: lightDark(tokenRef("surface-50"), tokenRef("surface-950")),
1737
+ color: tokenRef("text-primary"),
1738
+ padding: "8.75px 12.25px",
1739
+ fontSize: "11.375px",
1740
+ fontWeight: tokenRef("font-weight-semibold"),
1741
+ gap: "7px",
1742
+ sm: { padding: "1.75px 5.25px" },
1743
+ lg: { padding: "10.5px 15.75px" }
1744
+ },
1745
+ sortIcon: {
1746
+ size: "11.375px",
1747
+ color: "currentColor",
1748
+ badgeSize: "15.75px",
1749
+ badgeFontSize: "10.5px",
1750
+ badgeBackground: tokenRef("highlight-background"),
1751
+ badgeColor: tokenRef("highlight-color")
1752
+ },
1753
+ row: {
1754
+ background: tokenRef("surface-card"),
1755
+ hoverBackground: tokenRef("surface-hover"),
1756
+ color: tokenRef("text-primary"),
1757
+ stripedBackground: lightDark(tokenRef("surface-50"), tokenRef("surface-950")),
1758
+ selectedBackground: tokenRef("highlight-background"),
1759
+ selectedColor: tokenRef("highlight-color"),
1760
+ menuBackground: mix(tokenRef("primary-base"), "8%", tokenRef("surface-card")),
1761
+ focusRing: {
1762
+ width: "2px",
1763
+ style: "solid",
1764
+ color: tokenRef("focus-ring-color"),
1765
+ offset: "-2px"
1766
+ }
1767
+ },
1768
+ bodyCell: {
1769
+ padding: "8.75px 12.25px",
1770
+ height: "50px",
1771
+ selectedBorderColor: lightDark(tokenRef("primary-100"), tokenRef("primary-900")),
1772
+ sm: {
1773
+ padding: "1.75px 5.25px",
1774
+ height: "auto"
1775
+ },
1776
+ lg: {
1777
+ padding: "10.5px 15.75px",
1778
+ height: "50px"
1779
+ }
1780
+ },
1781
+ footerCell: {
1782
+ background: tokenRef("surface-card"),
1783
+ color: tokenRef("text-primary"),
1784
+ padding: "8.75px 12.25px",
1785
+ fontWeight: tokenRef("font-weight-semibold")
1786
+ },
1787
+ frozenColumn: { shadow: "none" },
1788
+ columnResizer: {
1789
+ width: "8px",
1790
+ lineWidth: "2px",
1791
+ color: tokenRef("primary-base")
1792
+ },
1793
+ dropPoint: {
1794
+ color: tokenRef("primary-base"),
1795
+ background: mix(tokenRef("primary-base"), "5%", "transparent"),
1796
+ hoverBackground: mix(tokenRef("primary-base"), "10%", "transparent")
1797
+ },
1798
+ dragPreview: {
1799
+ background: tokenRef("surface-card"),
1800
+ borderColor,
1801
+ borderRadius: tokenRef("radius-md"),
1802
+ shadow: tokenRef("shadow-overlay")
1803
+ },
1804
+ loading: {
1805
+ blur: "8px",
1806
+ background: "transparent"
1807
+ },
1808
+ empty: {
1809
+ padding: "10.5px",
1810
+ color: tokenRef("text-primary")
1811
+ },
1812
+ filter: {
1813
+ gap: "7px",
1814
+ minWidth: "175px",
1815
+ buttonInset: "7px",
1816
+ cellPadding: "7px 12.25px"
1817
+ },
1818
+ group: {
1819
+ background: lightDark(tokenRef("surface-50"), tokenRef("surface-950")),
1820
+ fontWeight: tokenRef("font-weight-semibold")
1821
+ },
1822
+ editor: { paddingBlock: "0" },
1823
+ expansion: {
1824
+ duration: `calc(${tokenRef("motion-duration")} * 1.6)`,
1825
+ easing: "cubic-bezier(0.2, 0, 0, 1)"
1826
+ },
1827
+ grip: {
1828
+ size: "10.5px",
1829
+ color: tokenRef("text-muted")
1830
+ },
1831
+ rowToggleButton: {
1832
+ size: "21px",
1833
+ borderRadius: "50%",
1834
+ color: tokenRef("text-muted"),
1835
+ hoverColor: tokenRef("text-primary"),
1836
+ hoverBackground: tokenRef("surface-hover")
1837
+ },
1838
+ paginator: { marginTop: "14px" },
1839
+ settings: {
1840
+ width: "224px",
1841
+ padding: "10.5px",
1842
+ gap: "7px",
1843
+ maxHeight: "252px",
1844
+ titleGap: "7px",
1845
+ titleFontWeight: tokenRef("font-weight-semibold"),
1846
+ itemPadding: "3.5px",
1847
+ itemRadius: tokenRef("radius-xs"),
1848
+ itemHoverBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
1849
+ handleColor: tokenRef("surface-400"),
1850
+ handleSize: "10.5px"
1851
+ },
1852
+ actions: {
1853
+ gap: "7px",
1854
+ overflowPadding: "10.5px"
1855
+ },
1856
+ card: {
1857
+ minWidth: "280px",
1858
+ gap: "10.5px",
1859
+ borderRadius: "10.5px",
1860
+ background: tokenRef("surface-card"),
1861
+ borderColor,
1862
+ fieldPadding: "7px 14px",
1863
+ fieldGap: "10.5px",
1864
+ fieldFontSize: "12.25px",
1865
+ labelFontSize: "10.5px",
1866
+ labelColor: tokenRef("text-muted"),
1867
+ titlePadding: "10.5px 14px 8.75px",
1868
+ titleFontSize: "13.125px",
1869
+ titleFontWeight: tokenRef("font-weight-semibold"),
1870
+ selectInset: "10.5px",
1871
+ actionsPadding: "8.75px 10.5px"
1872
+ }
1873
+ };
1874
+ const iconTokens = { root: {
1875
+ size: "1em",
1876
+ strokeWidth: "1.75"
1877
+ } };
1878
+ const rippleTokens = { root: {
1879
+ color: "currentColor",
1880
+ opacity: "0.2",
1881
+ enterDuration: "450ms",
1882
+ exitDuration: "350ms",
1883
+ easing: "cubic-bezier(0.2, 0, 0, 1)"
1884
+ } };
1885
+ const toggleButtonTokens = {
1886
+ root: {
1887
+ padding: "4px",
1888
+ borderRadius: tokenRef("radius-md"),
1889
+ gap: "8px",
1890
+ fontWeight: tokenRef("font-weight-medium"),
1891
+ fontSize: tokenRef("font-size-md"),
1892
+ background: lightDark(tokenRef("surface-100"), tokenRef("surface-950")),
1893
+ checkedBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-950")),
1894
+ hoverBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-950")),
1895
+ borderColor: lightDark(tokenRef("surface-200"), tokenRef("surface-800")),
1896
+ checkedBorderColor: lightDark(tokenRef("surface-200"), tokenRef("surface-800")),
1897
+ color: lightDark(tokenRef("surface-600"), tokenRef("surface-400")),
1898
+ hoverColor: lightDark(tokenRef("surface-800"), tokenRef("surface-300")),
1899
+ checkedColor: lightDark(tokenRef("surface-900"), tokenRef("surface-0")),
1900
+ disabledBackground: tokenRef("field-disabled-background"),
1901
+ disabledBorderColor: tokenRef("field-disabled-background"),
1902
+ disabledColor: tokenRef("text-muted"),
1903
+ invalidBorderColor: tokenRef("danger-base"),
1904
+ focusRing: {
1905
+ width: "2px",
1906
+ style: "solid",
1907
+ color: tokenRef("focus-ring-color"),
1908
+ offset: "2px"
1909
+ },
1910
+ transitionDuration: tokenRef("motion-duration"),
1911
+ sm: {
1912
+ fontSize: tokenRef("font-size-sm"),
1913
+ padding: "3px"
1914
+ },
1915
+ lg: {
1916
+ fontSize: tokenRef("font-size-lg"),
1917
+ padding: "5px"
1918
+ }
1919
+ },
1920
+ icon: {
1921
+ color: lightDark(tokenRef("surface-600"), tokenRef("surface-400")),
1922
+ hoverColor: lightDark(tokenRef("surface-700"), tokenRef("surface-300")),
1923
+ checkedColor: lightDark(tokenRef("surface-900"), tokenRef("surface-0")),
1924
+ disabledColor: tokenRef("text-muted")
1925
+ },
1926
+ content: {
1927
+ padding: "4px 10px",
1928
+ borderRadius: tokenRef("radius-sm"),
1929
+ checkedBackground: lightDark(tokenRef("surface-0"), tokenRef("surface-800")),
1930
+ checkedShadow: "0px 1px 2px 0px rgba(0, 0, 0, 0.02), 0px 1px 2px 0px rgba(0, 0, 0, 0.04)",
1931
+ sm: { padding: "3px 8px" },
1932
+ lg: { padding: "5px 12px" }
1933
+ }
1934
+ };
1935
+ const COMPONENT_TOKENS = {
1936
+ icon: iconTokens,
1937
+ ripple: rippleTokens,
1938
+ formField: formFieldTokens,
1939
+ inputGroup: inputGroupTokens,
1940
+ label: labelTokens,
1941
+ floatLabel: floatLabelTokens,
1942
+ iftaLabel: iftaLabelTokens,
1943
+ button: buttonTokens,
1944
+ select: selectTokens,
1945
+ listbox: listboxTokens,
1946
+ chipsInput: chipsInputTokens,
1947
+ country: countryTokens,
1948
+ colorPicker: colorPickerTokens,
1949
+ mention: mentionTokens,
1950
+ tree: treeTokens,
1951
+ cascadeSelect: cascadeSelectTokens,
1952
+ emailSuggestion: emailSuggestionTokens,
1953
+ badge: badgeTokens,
1954
+ toggleButton: toggleButtonTokens,
1955
+ message: messageTokens,
1956
+ fieldMessage: fieldMessageTokens,
1957
+ field: fieldTokens,
1958
+ textarea: textareaTokens,
1959
+ checkbox: checkboxTokens,
1960
+ radioButton: radioButtonTokens,
1961
+ toggleSwitch: toggleSwitchTokens,
1962
+ password: passwordTokens,
1963
+ inputOtp: inputOtpTokens,
1964
+ inputNumber: inputNumberTokens,
1965
+ rating: ratingTokens,
1966
+ knob: knobTokens,
1967
+ slider: sliderTokens,
1968
+ overlayBadge: overlayBadgeTokens,
1969
+ pill: pillTokens,
1970
+ tag: tagTokens,
1971
+ chip: chipTokens,
1972
+ progressBar: progressBarTokens,
1973
+ progressSpinner: progressSpinnerTokens,
1974
+ skeleton: skeletonTokens,
1975
+ avatar: avatarTokens,
1976
+ divider: dividerTokens,
1977
+ card: cardTokens,
1978
+ panel: panelTokens,
1979
+ fieldset: fieldsetTokens,
1980
+ highlightText: highlightTextTokens,
1981
+ amount: amountTokens,
1982
+ statusIcon: statusIconTokens,
1983
+ link: linkTokens,
1984
+ iconLink: iconLinkTokens,
1985
+ tooltip: tooltipTokens,
1986
+ popover: popoverTokens,
1987
+ toast: toastTokens,
1988
+ dialog: dialogTokens,
1989
+ confirm: confirmTokens,
1990
+ menu: menuTokens,
1991
+ splitButton: splitButtonTokens,
1992
+ speedDial: speedDialTokens,
1993
+ paginator: paginatorTokens,
1994
+ table: tableTokens
1995
+ };
1996
+ function createInkPreset(accent = "blue") {
1997
+ const palettes = {
1998
+ accent: ACCENT_PALETTES[accent],
1999
+ surface: INK_SURFACE
2000
+ };
2001
+ return {
2002
+ name: `ink-${accent}`,
2003
+ palettes,
2004
+ light: createLightSemantic(palettes),
2005
+ dark: createDarkSemantic(palettes),
2006
+ components: COMPONENT_TOKENS
2007
+ };
2008
+ }
2009
+ const InkPreset = createInkPreset();
2010
+ function isPlainObject(value) {
2011
+ return typeof value === "object" && value !== null && !Array.isArray(value);
2012
+ }
2013
+ function deepMerge(base, overrides) {
2014
+ if (!overrides) return base;
2015
+ const result = { ...base };
2016
+ for (const [key, value] of Object.entries(overrides)) result[key] = isPlainObject(value) && isPlainObject(result[key]) ? deepMerge(result[key], value) : value;
2017
+ return result;
2018
+ }
2019
+ function definePreset(base, overrides) {
2020
+ return deepMerge(base, overrides);
2021
+ }
2022
+ function kebab(key) {
2023
+ return key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
2024
+ }
2025
+ function toCssVariables(tokens, prefix = "--tx") {
2026
+ return Object.entries(tokens).flatMap(([key, value]) => {
2027
+ const name = key === "root" ? prefix : `${prefix}-${kebab(key)}`;
2028
+ return typeof value === "object" && value !== null ? toCssVariables(value, name) : [{
2029
+ name,
2030
+ value: String(value)
2031
+ }];
2032
+ });
2033
+ }
2034
+ function toStyleObject(tokens, prefix) {
2035
+ return tokens ? Object.fromEntries(toCssVariables(tokens, prefix).map(({ name, value }) => [name, value])) : {};
2036
+ }
2037
+ function presetToCss(preset) {
2038
+ const block = (variables) => variables.map(({ name, value }) => `${name}: ${value};`).join(" ");
2039
+ const shared = toCssVariables({
2040
+ radius,
2041
+ space: spacing,
2042
+ font: typography,
2043
+ motion,
2044
+ layer: layers,
2045
+ primary: preset.palettes.accent,
2046
+ surface: preset.palettes.surface,
2047
+ ...SEVERITY_PALETTES
2048
+ });
2049
+ const components = Object.entries(preset.components).flatMap(([name, tokens]) => toCssVariables(tokens, `--tx-${kebab(name)}`));
2050
+ return [`:root { ${block(shared)} ${block(toCssVariables(preset.light))} ${block(components)} color-scheme: light; }`, `:root[data-tx-theme="dark"] { ${block(toCssVariables(preset.dark))} color-scheme: dark; }`].join("\n");
2051
+ }
2052
+ export { COMPONENT_TOKENS, InkPreset, amountTokens, avatarTokens, badgeTokens, buttonTokens, cardTokens, cascadeSelectTokens, checkboxTokens, chipTokens, chipsInputTokens, colorPickerTokens, confirmTokens, countryTokens, createDarkSemantic, createInkPreset, createLightSemantic, deepMerge, definePreset, dialogTokens, dividerTokens, emailSuggestionTokens, fade, fieldMessageTokens, fieldTokens, fieldsetTokens, floatLabelTokens, formFieldTokens, highlightTextTokens, iconLinkTokens, iconTokens, iftaLabelTokens, inputGroupTokens, inputNumberTokens, inputOtpTokens, knobTokens, labelTokens, lightDark, linkTokens, listboxTokens, mentionTokens, menuTokens, messageTokens, mix, overlayBadgeTokens, paginatorTokens, panelTokens, passwordTokens, pillTokens, popoverTokens, presetToCss, progressBarTokens, progressSpinnerTokens, radioButtonTokens, ratingTokens, rippleTokens, selectTokens, skeletonTokens, sliderTokens, speedDialTokens, splitButtonTokens, statusIconTokens, tableTokens, tagTokens, textareaTokens, toCssVariables, toStyleObject, toastTokens, toggleButtonTokens, toggleSwitchTokens, tokenRef, tooltipTokens, treeTokens };
2053
+
2054
+ //# sourceMappingURL=tectra-ng-themes.mjs.map