@refineui/tokens 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1049 @@
1
+ /**
2
+ * Theme / context keys supported today and reserved for future extension.
3
+ * CSS currently emits `light` + `dark`; additional keys map to attribute selectors when adopted.
4
+ */
5
+ type ThemeContextKey = "light" | "dark" | "highContrast" | "forcedColors" | "brand";
6
+ /** Foundation Alias/Color — per-theme CSS values (`var(--refineui-color-*)`, etc.) */
7
+ type SemanticColorModePair = Readonly<{
8
+ light: string;
9
+ dark: string;
10
+ }>;
11
+ /**
12
+ * Extensible theme map — `light`/`dark` required; other contexts optional until CSS adopts them.
13
+ *
14
+ * @example
15
+ * { light: "primaryBlack", dark: "primaryGray", highContrast: "primaryWhite" }
16
+ */
17
+ type SemanticThemeMap<TValue extends string = string> = Readonly<Partial<Record<ThemeContextKey, TValue>> & Pick<Record<ThemeContextKey, TValue>, "light" | "dark">>;
18
+ /** Token lifecycle for spec / MCP / Doctor metadata. */
19
+ type TokenStatus = "experimental" | "stable" | "deprecated" | "internal";
20
+ /** Minimal token metadata for generated spec and AI tooling. */
21
+ type TokenMeta = Readonly<{
22
+ description?: string;
23
+ category: string;
24
+ status?: TokenStatus;
25
+ deprecated?: boolean;
26
+ references?: readonly string[];
27
+ }>;
28
+ /**
29
+ * Design tokens for Palettet Color
30
+ */
31
+ type PaletteColors = {
32
+ primaryLightGray: string;
33
+ primaryGray: string;
34
+ primaryDarkGray: string;
35
+ primaryBlack: string;
36
+ neutralWhite: string;
37
+ neutral100: string;
38
+ neutral150: string;
39
+ neutral200: string;
40
+ neutral250: string;
41
+ neutral300: string;
42
+ neutral350: string;
43
+ neutral400: string;
44
+ neutral450: string;
45
+ neutral500: string;
46
+ neutral550: string;
47
+ neutral600: string;
48
+ neutral650: string;
49
+ neutral700: string;
50
+ neutral750: string;
51
+ neutral800: string;
52
+ neutral850: string;
53
+ neutral900: string;
54
+ neutral950: string;
55
+ neutralBlack: string;
56
+ red100: string;
57
+ red200: string;
58
+ red300: string;
59
+ red400: string;
60
+ red500: string;
61
+ red600: string;
62
+ red700: string;
63
+ red800: string;
64
+ red900: string;
65
+ red1000: string;
66
+ orange100: string;
67
+ orange200: string;
68
+ orange300: string;
69
+ orange400: string;
70
+ orange500: string;
71
+ orange600: string;
72
+ orange700: string;
73
+ orange800: string;
74
+ orange900: string;
75
+ orange1000: string;
76
+ yellow100: string;
77
+ yellow200: string;
78
+ yellow300: string;
79
+ yellow400: string;
80
+ yellow500: string;
81
+ yellow600: string;
82
+ yellow700: string;
83
+ yellow800: string;
84
+ yellow900: string;
85
+ yellow1000: string;
86
+ lime100: string;
87
+ lime200: string;
88
+ lime300: string;
89
+ lime400: string;
90
+ lime500: string;
91
+ lime600: string;
92
+ lime700: string;
93
+ lime800: string;
94
+ lime900: string;
95
+ lime1000: string;
96
+ green100: string;
97
+ green200: string;
98
+ green300: string;
99
+ green400: string;
100
+ green500: string;
101
+ green600: string;
102
+ green700: string;
103
+ green800: string;
104
+ green900: string;
105
+ green1000: string;
106
+ teal100: string;
107
+ teal200: string;
108
+ teal300: string;
109
+ teal400: string;
110
+ teal500: string;
111
+ teal600: string;
112
+ teal700: string;
113
+ teal800: string;
114
+ teal900: string;
115
+ teal1000: string;
116
+ blue100: string;
117
+ blue200: string;
118
+ blue300: string;
119
+ blue400: string;
120
+ blue500: string;
121
+ blue600: string;
122
+ blue700: string;
123
+ blue800: string;
124
+ blue900: string;
125
+ blue1000: string;
126
+ purple100: string;
127
+ purple200: string;
128
+ purple300: string;
129
+ purple400: string;
130
+ purple500: string;
131
+ purple600: string;
132
+ purple700: string;
133
+ purple800: string;
134
+ purple900: string;
135
+ purple1000: string;
136
+ magenta100: string;
137
+ magenta200: string;
138
+ magenta300: string;
139
+ magenta400: string;
140
+ magenta500: string;
141
+ magenta600: string;
142
+ magenta700: string;
143
+ magenta800: string;
144
+ magenta900: string;
145
+ magenta1000: string;
146
+ };
147
+ /**
148
+ * Foundation Alias/Color — palette token names for Light and Dark.
149
+ * @typeParam P — palette map type (defaults align with `PaletteColors` / `global/colors`)
150
+ */
151
+ type SemanticPalettePairFor<P extends Record<string, string>> = {
152
+ light: keyof P;
153
+ dark: keyof P;
154
+ };
155
+ /** Alias name → full map of Light/Dark pairs */
156
+ type SemanticPalettePairsOf<P extends Record<string, string>> = Readonly<Record<string, SemanticPalettePairFor<P>>>;
157
+ /** Single alias pair for `PaletteColors` (most common in implementations) */
158
+ type SemanticPalettePair = SemanticPalettePairFor<PaletteColors>;
159
+ /**
160
+ * Shadow color (Figma Variables — Lighter ~ Darker, per Key/Ambient)
161
+ * Foundation: ambient lighter, ambient light, ambient, ambient dark, ambient darker
162
+ */
163
+ type ShadowColorTokens = {
164
+ shadowColorKeyLighter: string;
165
+ shadowColorKeyLight: string;
166
+ shadowColorKey: string;
167
+ shadowColorKeyDark: string;
168
+ shadowColorKeyDarker: string;
169
+ shadowColorAmbientLighter: string;
170
+ shadowColorAmbientLight: string;
171
+ shadowColorAmbient: string;
172
+ shadowColorAmbientDark: string;
173
+ shadowColorAmbientDarker: string;
174
+ };
175
+ /**
176
+ * Key + Ambient shadow pair (Material Design 3 / Figma Variables shape)
177
+ * - key: directional shadow (y offset, smaller blur)
178
+ * - ambient: soft diffuse shadow (larger blur)
179
+ */
180
+ type ShadowLevel = {
181
+ key: string;
182
+ ambient: string;
183
+ };
184
+ /**
185
+ * Elevation shadows — 1:1 with Figma `Elevation/Light/Shadow N` · `Elevation/Dark/Shadow N`.
186
+ * Two tokens per step only (`*Light` / `*Dark`); no intermediate `shadow2` / Lighter / Darker expansion.
187
+ * Color ramps live in `shadowColors` (`Global/Shadows/Key *`, `Ambient *`).
188
+ * Usage: box-shadow: ${toBoxShadow(level)}
189
+ */
190
+ type ShadowTokens = {
191
+ shadow2Light: ShadowLevel;
192
+ shadow2Dark: ShadowLevel;
193
+ shadow4Light: ShadowLevel;
194
+ shadow4Dark: ShadowLevel;
195
+ shadow8Light: ShadowLevel;
196
+ shadow8Dark: ShadowLevel;
197
+ shadow16Light: ShadowLevel;
198
+ shadow16Dark: ShadowLevel;
199
+ shadow24Light: ShadowLevel;
200
+ shadow24Dark: ShadowLevel;
201
+ shadow32Light: ShadowLevel;
202
+ shadow32Dark: ShadowLevel;
203
+ shadow64Light: ShadowLevel;
204
+ shadow64Dark: ShadowLevel;
205
+ };
206
+ /**
207
+ * Semantic elevation shadows — `ShadowLevel` per UI theme (Light/Dark).
208
+ * Foundation: Elevation/Light and Elevation/Dark map to `shadowNLight` / `shadowNDark` globals.
209
+ */
210
+ type SemanticShadowElevationPair = {
211
+ light: ShadowLevel;
212
+ dark: ShadowLevel;
213
+ };
214
+ /** Semantic elevation steps (Figma Shadow 2 / 4 / … / 64) */
215
+ type SemanticShadowElevationName = "shadow2" | "shadow4" | "shadow8" | "shadow16" | "shadow24" | "shadow32" | "shadow64";
216
+ /** Semantic elevation name → per-theme ShadowLevel (`semanticShadows`) */
217
+ type SemanticShadowElevationTokens = Record<SemanticShadowElevationName, SemanticShadowElevationPair>;
218
+ /**
219
+ * Design tokens for stroke width
220
+ */
221
+ type StrokeWidthTokens = {
222
+ strokeWidthNone: string;
223
+ strokeWidthHairline: string;
224
+ strokeWidthThin: string;
225
+ strokeWidthThick: string;
226
+ strokeWidthThicker: string;
227
+ strokeWidthThickest: string;
228
+ };
229
+ /**
230
+ * Design tokens for border radius
231
+ */
232
+ type BorderRadiusTokens = {
233
+ roundedNone: string;
234
+ roundedXSmall: string;
235
+ roundedSmall: string;
236
+ roundedMedium: string;
237
+ roundedLarge: string;
238
+ roundedXLarge: string;
239
+ roundedXXLarge: string;
240
+ roundedCircle: string;
241
+ };
242
+ /**
243
+ * Design tokens for spacing size
244
+ */
245
+ type SpacingTokens = {
246
+ sizeNone: string;
247
+ sizeXXXSmall: string;
248
+ sizeXXSmall: string;
249
+ sizeXSmall: string;
250
+ sizeSmall: string;
251
+ sizeMedium: string;
252
+ sizeLarge: string;
253
+ sizeXLarge: string;
254
+ sizeXXLarge: string;
255
+ sizeXXXLarge: string;
256
+ };
257
+ /**
258
+ * Foundation motion primitives (`global/motion.ts`).
259
+ * Value-based steps only — no UI role names.
260
+ */
261
+ type FoundationMotionTokens = {
262
+ duration: {
263
+ duration0: string;
264
+ duration150: string;
265
+ duration180: string;
266
+ duration200: string;
267
+ duration240: string;
268
+ duration260: string;
269
+ duration280: string;
270
+ duration320: string;
271
+ duration380: string;
272
+ duration800: string;
273
+ duration1500: string;
274
+ };
275
+ easing: {
276
+ easingStandard: string;
277
+ easingEmphasized: string;
278
+ easingPanel: string;
279
+ easingContent: string;
280
+ easingLinear: string;
281
+ easingEaseOut: string;
282
+ easingEaseInOut: string;
283
+ };
284
+ scale: {
285
+ scale96: string;
286
+ scale98: string;
287
+ scale115: string;
288
+ };
289
+ distance: {
290
+ distance4: string;
291
+ };
292
+ };
293
+ /**
294
+ * Semantic motion roles (`semantic/interaction.ts`) — resolved Foundation strings.
295
+ * Prefer role keys (`press`, `fast`, `panel`) in new code; component scale aliases
296
+ * (`buttonActive`, …) mirror the same Foundation steps for existing CSS vars.
297
+ */
298
+ type SemanticInteractionTokens = {
299
+ duration: {
300
+ instant: string;
301
+ fast: string;
302
+ normal: string;
303
+ medium: string;
304
+ slow: string;
305
+ overlay: string;
306
+ panel: string;
307
+ accordionPanel: string;
308
+ accordionContent: string;
309
+ toastEnter: string;
310
+ toastLeave: string;
311
+ skeleton: string;
312
+ spinner: string;
313
+ };
314
+ easing: {
315
+ standard: string;
316
+ emphasized: string;
317
+ panel: string;
318
+ content: string;
319
+ linear: string;
320
+ easeOut: string;
321
+ easeInOut: string;
322
+ };
323
+ scale: {
324
+ enter: string;
325
+ press: string;
326
+ hoverGrow: string;
327
+ dialogEnter: string;
328
+ buttonActive: string;
329
+ sliderThumbHover: string;
330
+ };
331
+ distance: {
332
+ float: string;
333
+ };
334
+ };
335
+ /** @deprecated Use `FoundationMotionTokens` — kept for older imports. */
336
+ type MotionTokens = FoundationMotionTokens;
337
+ /**
338
+ * Design tokens for font
339
+ */
340
+ type FontSizeTokens = {
341
+ fontSize100: string;
342
+ fontSize200: string;
343
+ fontSize300: string;
344
+ fontSize400: string;
345
+ fontSize500: string;
346
+ fontSize600: string;
347
+ fontSize700: string;
348
+ fontSize800: string;
349
+ fontSize900: string;
350
+ fontSize1000: string;
351
+ };
352
+ type LineHeightTokens = {
353
+ lineHeight100: string;
354
+ lineHeight200: string;
355
+ lineHeight300: string;
356
+ lineHeight400: string;
357
+ lineHeight500: string;
358
+ lineHeight600: string;
359
+ lineHeight700: string;
360
+ lineHeight800: string;
361
+ lineHeight900: string;
362
+ lineHeight1000: string;
363
+ };
364
+ type FontWeightTokens = {
365
+ fontWeightRegular: string;
366
+ fontWeightMedium: string;
367
+ fontWeightSemibold: string;
368
+ fontWeightBold: string;
369
+ fontWeightHeavy: string;
370
+ };
371
+ type TextAlignment = 'inherit' | 'initial' | 'revert' | 'unset' | 'center' | 'end' | 'start' | 'justify' | 'left' | 'match-parent' | 'right';
372
+ type TextAlignments = {
373
+ start: TextAlignment;
374
+ center: TextAlignment;
375
+ end: TextAlignment;
376
+ justify: TextAlignment;
377
+ };
378
+ type FontFamilyTokens = {
379
+ fontFamily: string;
380
+ };
381
+ type TypographyStyle = {
382
+ fontFamily: string;
383
+ fontSize: string;
384
+ fontWeight: string;
385
+ lineHeight: string;
386
+ };
387
+ /**
388
+ * Design tokens for typography
389
+ */
390
+ type TypographyStyles = {
391
+ heading1: TypographyStyle;
392
+ heading2: TypographyStyle;
393
+ heading3: TypographyStyle;
394
+ heading4: TypographyStyle;
395
+ title1: TypographyStyle;
396
+ title2: TypographyStyle;
397
+ title3: TypographyStyle;
398
+ subTitle1: TypographyStyle;
399
+ subTitle2: TypographyStyle;
400
+ body1: TypographyStyle;
401
+ body2: TypographyStyle;
402
+ body3: TypographyStyle;
403
+ body4: TypographyStyle;
404
+ caption1: TypographyStyle;
405
+ caption2: TypographyStyle;
406
+ caption3: TypographyStyle;
407
+ };
408
+ /**
409
+ * Design tokens for z-index groups and levels
410
+ */
411
+ type ZIndexTokens = {
412
+ zIndexBackground?: string;
413
+ zIndexContent?: string;
414
+ zIndexOverlay?: string;
415
+ zIndexPopup?: string;
416
+ zIndexMessages?: string;
417
+ zIndexFloating?: string;
418
+ zIndexPriority?: string;
419
+ zIndexDebug?: string;
420
+ };
421
+ type Theme = FontSizeTokens & FontFamilyTokens & FontWeightTokens & LineHeightTokens & PaletteColors & ShadowColorTokens & ShadowTokens & StrokeWidthTokens & BorderRadiusTokens & SpacingTokens & TypographyStyles & ZIndexTokens;
422
+
423
+ declare const colors: PaletteColors;
424
+
425
+ declare const SEMANTIC_PALETTE_PAIRS: {
426
+ readonly backgroundBrandActive: {
427
+ readonly light: "neutralBlack";
428
+ readonly dark: "primaryLightGray";
429
+ };
430
+ readonly backgroundBrandDisabled: {
431
+ readonly light: "neutral150";
432
+ readonly dark: "neutral650";
433
+ };
434
+ readonly backgroundBrandHover: {
435
+ readonly light: "primaryDarkGray";
436
+ readonly dark: "primaryLightGray";
437
+ };
438
+ readonly backgroundBrandStrong: {
439
+ readonly light: "primaryDarkGray";
440
+ readonly dark: "primaryGray";
441
+ };
442
+ readonly backgroundBrandSubtle: {
443
+ readonly light: "primaryLightGray";
444
+ readonly dark: "neutral800";
445
+ };
446
+ readonly backgroundBrand: {
447
+ readonly light: "primaryBlack";
448
+ readonly dark: "primaryGray";
449
+ };
450
+ readonly backgroundDiscoveryHover: {
451
+ readonly light: "purple700";
452
+ readonly dark: "purple300";
453
+ };
454
+ readonly backgroundDiscoverySubtle: {
455
+ readonly light: "purple100";
456
+ readonly dark: "purple900";
457
+ };
458
+ readonly backgroundDiscovery: {
459
+ readonly light: "purple500";
460
+ readonly dark: "purple500";
461
+ };
462
+ readonly backgroundErrorHover: {
463
+ readonly light: "red700";
464
+ readonly dark: "red300";
465
+ };
466
+ readonly backgroundErrorSubtle: {
467
+ readonly light: "red100";
468
+ readonly dark: "red900";
469
+ };
470
+ readonly backgroundError: {
471
+ readonly light: "red500";
472
+ readonly dark: "red500";
473
+ };
474
+ readonly backgroundInfoHover: {
475
+ readonly light: "blue700";
476
+ readonly dark: "blue300";
477
+ };
478
+ readonly backgroundInfoSubtle: {
479
+ readonly light: "blue100";
480
+ readonly dark: "blue900";
481
+ };
482
+ readonly backgroundInfo: {
483
+ readonly light: "blue500";
484
+ readonly dark: "blue500";
485
+ };
486
+ readonly backgroundPrimaryActive: {
487
+ readonly light: "neutral150";
488
+ readonly dark: "neutral800";
489
+ };
490
+ readonly backgroundPrimaryHover: {
491
+ readonly light: "neutral100";
492
+ readonly dark: "neutral850";
493
+ };
494
+ readonly backgroundPrimary: {
495
+ readonly light: "neutralWhite";
496
+ readonly dark: "neutral900";
497
+ };
498
+ readonly backgroundSuccessHover: {
499
+ readonly light: "green700";
500
+ readonly dark: "green300";
501
+ };
502
+ readonly backgroundSuccessSubtle: {
503
+ readonly light: "green100";
504
+ readonly dark: "green900";
505
+ };
506
+ readonly backgroundSuccess: {
507
+ readonly light: "green500";
508
+ readonly dark: "green500";
509
+ };
510
+ readonly backgroundSurfaceActive: {
511
+ readonly light: "neutral150";
512
+ readonly dark: "neutral700";
513
+ };
514
+ readonly backgroundSurfaceDisabled: {
515
+ readonly light: "neutral150";
516
+ readonly dark: "neutral850";
517
+ };
518
+ readonly backgroundSurfaceHover: {
519
+ readonly light: "neutral100";
520
+ readonly dark: "neutral750";
521
+ };
522
+ readonly backgroundSurfaceSelected: {
523
+ readonly light: "neutral200";
524
+ readonly dark: "neutral650";
525
+ };
526
+ readonly backgroundSurface: {
527
+ readonly light: "neutralWhite";
528
+ readonly dark: "neutral800";
529
+ };
530
+ readonly backgroundWarningHover: {
531
+ readonly light: "yellow500";
532
+ readonly dark: "yellow200";
533
+ };
534
+ readonly backgroundWarningSubtle: {
535
+ readonly light: "yellow100";
536
+ readonly dark: "yellow900";
537
+ };
538
+ readonly backgroundWarning: {
539
+ readonly light: "yellow300";
540
+ readonly dark: "yellow300";
541
+ };
542
+ readonly borderDefault: {
543
+ readonly light: "neutral300";
544
+ readonly dark: "neutral650";
545
+ };
546
+ readonly borderDisabled: {
547
+ readonly light: "neutral250";
548
+ readonly dark: "neutral700";
549
+ };
550
+ readonly borderDiscovery: {
551
+ readonly light: "purple500";
552
+ readonly dark: "purple500";
553
+ };
554
+ readonly borderError: {
555
+ readonly light: "red500";
556
+ readonly dark: "red500";
557
+ };
558
+ readonly borderFocus: {
559
+ readonly light: "neutral750";
560
+ readonly dark: "neutral350";
561
+ };
562
+ readonly borderHover: {
563
+ readonly light: "neutral500";
564
+ readonly dark: "neutral500";
565
+ };
566
+ readonly borderInfo: {
567
+ readonly light: "blue500";
568
+ readonly dark: "blue500";
569
+ };
570
+ readonly borderStrong: {
571
+ readonly light: "neutral450";
572
+ readonly dark: "neutral550";
573
+ };
574
+ readonly borderSubtle: {
575
+ readonly light: "neutral200";
576
+ readonly dark: "neutral750";
577
+ };
578
+ readonly borderSuccess: {
579
+ readonly light: "green500";
580
+ readonly dark: "green500";
581
+ };
582
+ readonly borderWarning: {
583
+ readonly light: "yellow300";
584
+ readonly dark: "yellow300";
585
+ };
586
+ readonly foregroundBrandStrong: {
587
+ readonly light: "neutralBlack";
588
+ readonly dark: "primaryLightGray";
589
+ };
590
+ readonly foregroundBrand: {
591
+ readonly light: "primaryBlack";
592
+ readonly dark: "primaryGray";
593
+ };
594
+ readonly foregroundDisabled: {
595
+ readonly light: "neutral400";
596
+ readonly dark: "neutral600";
597
+ };
598
+ readonly foregroundDiscovery: {
599
+ readonly light: "purple700";
600
+ readonly dark: "purple200";
601
+ };
602
+ readonly foregroundError: {
603
+ readonly light: "red700";
604
+ readonly dark: "red200";
605
+ };
606
+ readonly foregroundInfo: {
607
+ readonly light: "blue700";
608
+ readonly dark: "blue200";
609
+ };
610
+ readonly foregroundInversed: {
611
+ readonly light: "neutralWhite";
612
+ readonly dark: "primaryBlack";
613
+ };
614
+ readonly foregroundLinkActive: {
615
+ readonly light: "blue900";
616
+ readonly dark: "blue200";
617
+ };
618
+ readonly foregroundLinkHover: {
619
+ readonly light: "blue800";
620
+ readonly dark: "blue300";
621
+ };
622
+ readonly foregroundLinkVisited: {
623
+ readonly light: "blue500";
624
+ readonly dark: "blue100";
625
+ };
626
+ readonly foregroundLink: {
627
+ readonly light: "blue700";
628
+ readonly dark: "blue400";
629
+ };
630
+ readonly foregroundOnBrand: {
631
+ readonly light: "neutralWhite";
632
+ readonly dark: "neutralBlack";
633
+ };
634
+ readonly foregroundOnDiscovery: {
635
+ readonly light: "neutralWhite";
636
+ readonly dark: "neutralBlack";
637
+ };
638
+ readonly foregroundOnError: {
639
+ readonly light: "neutralWhite";
640
+ readonly dark: "neutralBlack";
641
+ };
642
+ readonly foregroundOnInfo: {
643
+ readonly light: "neutralWhite";
644
+ readonly dark: "neutralBlack";
645
+ };
646
+ readonly foregroundOnSuccess: {
647
+ readonly light: "neutralWhite";
648
+ readonly dark: "neutralBlack";
649
+ };
650
+ readonly foregroundOnWarning: {
651
+ readonly light: "neutralWhite";
652
+ readonly dark: "neutralBlack";
653
+ };
654
+ readonly foregroundPlaceholder: {
655
+ readonly light: "neutral450";
656
+ readonly dark: "neutral500";
657
+ };
658
+ readonly foregroundPrimaryHover: {
659
+ readonly light: "neutralBlack";
660
+ readonly dark: "neutral100";
661
+ };
662
+ readonly foregroundPrimary: {
663
+ readonly light: "primaryBlack";
664
+ readonly dark: "neutralWhite";
665
+ };
666
+ readonly foregroundSecondary: {
667
+ readonly light: "neutral600";
668
+ readonly dark: "neutral350";
669
+ };
670
+ readonly foregroundSuccess: {
671
+ readonly light: "green700";
672
+ readonly dark: "green200";
673
+ };
674
+ readonly foregroundTertiary: {
675
+ readonly light: "neutral500";
676
+ readonly dark: "neutral450";
677
+ };
678
+ readonly foregroundWarning: {
679
+ readonly light: "yellow700";
680
+ readonly dark: "yellow200";
681
+ };
682
+ readonly surfaceElevated: {
683
+ readonly light: "neutralWhite";
684
+ readonly dark: "neutral700";
685
+ };
686
+ readonly surfaceInverse: {
687
+ readonly light: "neutralBlack";
688
+ readonly dark: "neutralWhite";
689
+ };
690
+ readonly surfacePopover: {
691
+ readonly light: "neutralWhite";
692
+ readonly dark: "neutral750";
693
+ };
694
+ readonly surfaceSunken: {
695
+ readonly light: "neutral150";
696
+ readonly dark: "neutral800";
697
+ };
698
+ readonly surfaceTooltip: {
699
+ readonly light: "neutral750";
700
+ readonly dark: "neutral300";
701
+ };
702
+ };
703
+ type SemanticPaletteName = keyof typeof SEMANTIC_PALETTE_PAIRS;
704
+ /** Legacy row shape: [aliasTail, lightKey, darkKey | "__RGBA__"] (surfaceOverlay only) */
705
+ declare const SEMANTIC_COLOR_ROWS: readonly [...(readonly ["backgroundBrandActive" | "backgroundBrandDisabled" | "backgroundBrandHover" | "backgroundBrandStrong" | "backgroundBrandSubtle" | "backgroundBrand" | "backgroundDiscoveryHover" | "backgroundDiscoverySubtle" | "backgroundDiscovery" | "backgroundErrorHover" | "backgroundErrorSubtle" | "backgroundError" | "backgroundInfoHover" | "backgroundInfoSubtle" | "backgroundInfo" | "backgroundPrimaryActive" | "backgroundPrimaryHover" | "backgroundPrimary" | "backgroundSuccessHover" | "backgroundSuccessSubtle" | "backgroundSuccess" | "backgroundSurfaceActive" | "backgroundSurfaceDisabled" | "backgroundSurfaceHover" | "backgroundSurfaceSelected" | "backgroundSurface" | "backgroundWarningHover" | "backgroundWarningSubtle" | "backgroundWarning" | "borderDefault" | "borderDisabled" | "borderDiscovery" | "borderError" | "borderFocus" | "borderHover" | "borderInfo" | "borderStrong" | "borderSubtle" | "borderSuccess" | "borderWarning" | "foregroundBrandStrong" | "foregroundBrand" | "foregroundDisabled" | "foregroundDiscovery" | "foregroundError" | "foregroundInfo" | "foregroundInversed" | "foregroundLinkActive" | "foregroundLinkHover" | "foregroundLinkVisited" | "foregroundLink" | "foregroundOnBrand" | "foregroundOnDiscovery" | "foregroundOnError" | "foregroundOnInfo" | "foregroundOnSuccess" | "foregroundOnWarning" | "foregroundPlaceholder" | "foregroundPrimaryHover" | "foregroundPrimary" | "foregroundSecondary" | "foregroundSuccess" | "foregroundTertiary" | "foregroundWarning" | "surfaceElevated" | "surfaceInverse" | "surfacePopover" | "surfaceSunken" | "surfaceTooltip", keyof PaletteColors, keyof PaletteColors])[], readonly ["surfaceOverlay", "__RGBA__", "__RGBA__"]];
706
+ type SemanticColorName = SemanticPaletteName | "surfaceOverlay";
707
+ /** Foundation surfaceOverlay (Overlay and Modal) — raw RGBA */
708
+ declare const surfaceOverlayRgba: {
709
+ readonly light: "rgba(0, 0, 0, 0.2)";
710
+ readonly dark: "rgba(0, 0, 0, 0.6)";
711
+ };
712
+ /** Semantic colors — values are CSS var(--refineui-color-*) or rgba(...) */
713
+ declare const semanticColors: Record<SemanticColorName, SemanticColorModePair>;
714
+
715
+ /**
716
+ * Semantic motion roles — meaning layer over Foundation `motion`.
717
+ *
718
+ * UI, `@refineui/utilities` CSS helpers, and `refineui.css` should prefer these
719
+ * role names (fast / press / panel…), not raw Foundation steps.
720
+ *
721
+ * Flow: Foundation `motion` → `semanticInteraction` → CSS `--refineui-motion-*`
722
+ * (and component JS that reads resolved ms strings).
723
+ */
724
+ declare const semanticInteraction: SemanticInteractionTokens;
725
+
726
+ /** Focus ring palette pairs — `:focus-visible` contract (not `:focus`). */
727
+ declare const SEMANTIC_FOCUS_PAIRS: {
728
+ readonly ringColor: {
729
+ readonly light: "neutral750";
730
+ readonly dark: "neutral350";
731
+ };
732
+ };
733
+ type SemanticFocusName = keyof typeof SEMANTIC_FOCUS_PAIRS;
734
+ declare const semanticFocus: {
735
+ readonly ring: {
736
+ readonly color: {
737
+ readonly light: string;
738
+ readonly dark: string;
739
+ };
740
+ readonly width: string;
741
+ readonly offset: string;
742
+ readonly style: "solid";
743
+ };
744
+ };
745
+
746
+ /** `semanticShadows.shadow2.light` / `.dark` — pick global `shadows` per theme */
747
+ declare const semanticShadows: SemanticShadowElevationTokens;
748
+
749
+ /**
750
+ * Semantic text roles — M3/Polaris-style meaning layer over Foundation `typographys`.
751
+ * UI and component tokens reference these names, not raw Foundation keys.
752
+ */
753
+ declare const SEMANTIC_TEXT: {
754
+ /** Display / marketing hero */
755
+ readonly displayLg: "heading1";
756
+ readonly displayMd: "heading2";
757
+ readonly displaySm: "heading3";
758
+ /** Page & section headings */
759
+ readonly headingLg: "heading2";
760
+ readonly headingMd: "heading3";
761
+ readonly headingSm: "heading4";
762
+ /** Component titles (Card, Dialog header) */
763
+ readonly titleLg: "title1";
764
+ readonly titleMd: "title2";
765
+ readonly titleSm: "title3";
766
+ /** Emphasized subtitles */
767
+ readonly subtitleLg: "subTitle1";
768
+ readonly subtitleMd: "subTitle2";
769
+ /** Primary reading text */
770
+ readonly bodyLg: "body1";
771
+ readonly bodyMd: "body2";
772
+ readonly bodySm: "body3";
773
+ readonly bodyXs: "body4";
774
+ /** Form labels, menu row labels */
775
+ readonly labelLg: "body1";
776
+ readonly labelMd: "body2";
777
+ readonly labelSm: "caption1";
778
+ /** Metadata, helpers, shortcuts */
779
+ readonly captionLg: "caption1";
780
+ readonly captionMd: "caption2";
781
+ readonly captionSm: "caption3";
782
+ };
783
+ type SemanticTextName = keyof typeof SEMANTIC_TEXT;
784
+ type FoundationTypographyName = keyof TypographyStyles;
785
+
786
+ declare const fontFamilies: FontFamilyTokens;
787
+ declare const fontSizes: FontSizeTokens;
788
+ declare const fontWeights: FontWeightTokens;
789
+ declare const lineHeights: LineHeightTokens;
790
+
791
+ /**
792
+ * Spacing scale — T-shirt sizes.
793
+ * Values: 0 · 2 · 4 · 6 · 8 · 10 · 16 · 20 · 24 · 32
794
+ */
795
+ declare const spacings: SpacingTokens;
796
+
797
+ /**
798
+ * Icon glyph sizes (px) — **not tied to font/typography tokens** (explicit values only).
799
+ */
800
+ declare const iconSizes: {
801
+ readonly xxsmall: 12;
802
+ readonly xsmall: 16;
803
+ readonly small: 20;
804
+ readonly medium: 24;
805
+ readonly large: 28;
806
+ readonly xlarge: 32;
807
+ readonly xxlarge: 48;
808
+ };
809
+
810
+ /**
811
+ * Foundation layout size steps — digits ×0.1 → px (e.g. `320` → 32px, `3250` → 325px).
812
+ * Emitted as `--refineui-size-foundation-size-*` and Tailwind `size-refineui-foundation-size-*`.
813
+ *
814
+ * Includes Web Kit component steps that must stay linked here (not invented in `componentSizes`).
815
+ */
816
+ declare const foundationSizes: {
817
+ readonly foundationSize10: "1px";
818
+ readonly foundationSize20: "2px";
819
+ readonly foundationSize30: "3px";
820
+ readonly foundationSize40: "4px";
821
+ readonly foundationSize60: "6px";
822
+ readonly foundationSize80: "8px";
823
+ readonly foundationSize100: "10px";
824
+ readonly foundationSize120: "12px";
825
+ /** Divider icon inner circle — Web Kit ≈ 40/3 */
826
+ readonly foundationSize133: "13.33px";
827
+ readonly foundationSize140: "14px";
828
+ readonly foundationSize160: "16px";
829
+ readonly foundationSize200: "20px";
830
+ readonly foundationSize240: "24px";
831
+ readonly foundationSize280: "28px";
832
+ readonly foundationSize300: "30px";
833
+ readonly foundationSize320: "32px";
834
+ readonly foundationSize340: "34px";
835
+ readonly foundationSize360: "36px";
836
+ readonly foundationSize400: "40px";
837
+ readonly foundationSize440: "44px";
838
+ readonly foundationSize480: "48px";
839
+ readonly foundationSize520: "52px";
840
+ readonly foundationSize540: "54px";
841
+ readonly foundationSize600: "60px";
842
+ readonly foundationSize800: "80px";
843
+ readonly foundationSize2000: "200px";
844
+ readonly foundationSize2440: "244px";
845
+ readonly foundationSize2560: "256px";
846
+ readonly foundationSize3000: "300px";
847
+ readonly foundationSize3200: "320px";
848
+ readonly foundationSize3250: "325px";
849
+ readonly foundationSize4500: "450px";
850
+ readonly foundationSize5750: "575px";
851
+ readonly foundationSize6000: "600px";
852
+ readonly foundationSize8500: "850px";
853
+ };
854
+ type FoundationSizeName = keyof typeof foundationSizes;
855
+
856
+ /**
857
+ * Maps each component size key → Foundation size key for CSS
858
+ * `--refineui-size-*` → `var(--refineui-size-foundation-size-*)`.
859
+ */
860
+ declare const componentSizeFoundationKeys: {
861
+ readonly avatarStatusXxxlarge: "foundationSize140";
862
+ readonly buttonMinHeightSm: "foundationSize280";
863
+ readonly buttonMinHeightMd: "foundationSize360";
864
+ readonly buttonMinHeightLg: "foundationSize480";
865
+ readonly chipMinHeightSm: "foundationSize200";
866
+ readonly chipMinHeightMd: "foundationSize240";
867
+ readonly chipMinHeightLg: "foundationSize320";
868
+ readonly controlHeightSm: "foundationSize360";
869
+ readonly controlHeightMd: "foundationSize440";
870
+ readonly controlHeightLg: "foundationSize520";
871
+ readonly controlTouchMin: "foundationSize440";
872
+ readonly controlCheckbox: "foundationSize200";
873
+ readonly controlCheckboxRadio: "foundationSize200";
874
+ readonly controlTextareaMin: "foundationSize800";
875
+ readonly popoverPanelWidth: "foundationSize3250";
876
+ readonly popoverBeakInsetFromStartEdge: "foundationSize340";
877
+ readonly popoverBeakInsetFromEndEdge: "foundationSize300";
878
+ readonly menuPanelWidth: "foundationSize2440";
879
+ readonly dropdownMenuWidth: "foundationSize2440";
880
+ readonly sidebarWidth: "foundationSize2560";
881
+ readonly toastMinWidth: "foundationSize3250";
882
+ readonly toastMaxWidth: "foundationSize3250";
883
+ readonly dialogMaxWidth: "foundationSize6000";
884
+ readonly dialogWidthSm: "foundationSize3000";
885
+ readonly drawerWidthSm: "foundationSize3200";
886
+ readonly drawerWidthMd: "foundationSize5750";
887
+ readonly drawerWidthLg: "foundationSize8500";
888
+ readonly calendarMinWidth: "foundationSize2560";
889
+ readonly calendarDaySize: "foundationSize320";
890
+ readonly tooltipMaxWidth: "foundationSize2000";
891
+ readonly spinStepperWidth: "foundationSize320";
892
+ readonly spinFieldPaddingInlineStart: "foundationSize120";
893
+ readonly switchWidth: "foundationSize440";
894
+ readonly switchHeight: "foundationSize240";
895
+ readonly switchThumb: "foundationSize200";
896
+ readonly switchPadding: "foundationSize20";
897
+ readonly progressTrackHeightSm: "foundationSize20";
898
+ readonly progressTrackHeightLg: "foundationSize40";
899
+ readonly sliderTrackHeightSm: "foundationSize20";
900
+ readonly sliderTrackHeightMd: "foundationSize40";
901
+ readonly sliderInteractionHeight: "foundationSize280";
902
+ readonly paginationButtonMinWidth: "foundationSize400";
903
+ readonly skeletonDefaultHeight: "foundationSize200";
904
+ readonly dividerShortEnd: "foundationSize80";
905
+ readonly dividerIconSlot: "foundationSize200";
906
+ readonly dividerIconCircleDiameter: "foundationSize133";
907
+ readonly dividerIconCircleInset: "foundationSize30";
908
+ readonly accessibleClip: "foundationSize10";
909
+ readonly spinnerSizeXSmall: "foundationSize160";
910
+ readonly spinnerSizeSmall: "foundationSize200";
911
+ readonly spinnerSizeMedium: "foundationSize240";
912
+ readonly spinnerSizeLarge: "foundationSize280";
913
+ readonly spinnerSizeXLarge: "foundationSize320";
914
+ readonly spinnerSizeXXLarge: "foundationSize480";
915
+ readonly spinnerRingWidthXSmall: "foundationSize20";
916
+ readonly spinnerRingWidthSmall: "foundationSize20";
917
+ readonly spinnerRingWidthMedium: "foundationSize20";
918
+ readonly spinnerRingWidthLarge: "foundationSize30";
919
+ readonly spinnerRingWidthXLarge: "foundationSize30";
920
+ readonly spinnerRingWidthXXLarge: "foundationSize40";
921
+ };
922
+ type ComponentSizeName = keyof typeof componentSizeFoundationKeys;
923
+ /**
924
+ * Resolved px strings for JS layout math (`parseFloat`, inline styles).
925
+ * Source of truth is Foundation via `componentSizeFoundationKeys`.
926
+ */
927
+ declare const componentSizes: {
928
+ readonly avatarStatusXxxlarge: "14px";
929
+ readonly buttonMinHeightSm: "28px";
930
+ readonly buttonMinHeightMd: "36px";
931
+ readonly buttonMinHeightLg: "48px";
932
+ readonly chipMinHeightSm: "20px";
933
+ readonly chipMinHeightMd: "24px";
934
+ readonly chipMinHeightLg: "32px";
935
+ readonly controlHeightSm: "36px";
936
+ readonly controlHeightMd: "44px";
937
+ readonly controlHeightLg: "52px";
938
+ readonly controlTouchMin: "44px";
939
+ readonly controlCheckbox: "20px";
940
+ readonly controlCheckboxRadio: "20px";
941
+ readonly controlTextareaMin: "80px";
942
+ readonly popoverPanelWidth: "325px";
943
+ readonly popoverBeakInsetFromStartEdge: "34px";
944
+ readonly popoverBeakInsetFromEndEdge: "30px";
945
+ readonly menuPanelWidth: "244px";
946
+ /** @deprecated Same as `menuPanelWidth` */
947
+ readonly dropdownMenuWidth: "244px";
948
+ readonly sidebarWidth: "256px";
949
+ readonly toastMinWidth: "325px";
950
+ readonly toastMaxWidth: "325px";
951
+ readonly dialogMaxWidth: "600px";
952
+ /** Viewport-relative — not a Foundation px step */
953
+ readonly dialogMaxHeightViewport: "90vh";
954
+ readonly dialogWidthSm: "300px";
955
+ readonly drawerWidthSm: "320px";
956
+ readonly drawerWidthMd: "575px";
957
+ readonly drawerWidthLg: "850px";
958
+ readonly calendarMinWidth: "256px";
959
+ readonly calendarDaySize: "32px";
960
+ readonly tooltipMaxWidth: "200px";
961
+ readonly spinStepperWidth: "32px";
962
+ readonly spinFieldPaddingInlineStart: "12px";
963
+ readonly switchWidth: "44px";
964
+ readonly switchHeight: "24px";
965
+ readonly switchThumb: "20px";
966
+ readonly switchPadding: "2px";
967
+ readonly progressTrackHeightSm: "2px";
968
+ readonly progressTrackHeightLg: "4px";
969
+ readonly sliderTrackHeightSm: "2px";
970
+ readonly sliderTrackHeightMd: "4px";
971
+ readonly sliderInteractionHeight: "28px";
972
+ readonly paginationButtonMinWidth: "40px";
973
+ readonly skeletonDefaultHeight: "20px";
974
+ readonly dividerShortEnd: "8px";
975
+ readonly dividerIconSlot: "20px";
976
+ readonly dividerIconCircleDiameter: "13.33px";
977
+ readonly dividerIconCircleInset: "3px";
978
+ readonly accessibleClip: "1px";
979
+ readonly spinnerSizeXSmall: "16px";
980
+ readonly spinnerSizeSmall: "20px";
981
+ readonly spinnerSizeMedium: "24px";
982
+ readonly spinnerSizeLarge: "28px";
983
+ readonly spinnerSizeXLarge: "32px";
984
+ readonly spinnerSizeXXLarge: "48px";
985
+ readonly spinnerRingWidthXSmall: "2px";
986
+ readonly spinnerRingWidthSmall: "2px";
987
+ readonly spinnerRingWidthMedium: "2px";
988
+ readonly spinnerRingWidthLarge: "3px";
989
+ readonly spinnerRingWidthXLarge: "3px";
990
+ readonly spinnerRingWidthXXLarge: "4px";
991
+ };
992
+
993
+ /**
994
+ * Shared opacity scale — keys follow `strokeWidth*` / `size*` prefix style.
995
+ */
996
+ declare const opacities: {
997
+ readonly opacityFull: "1";
998
+ readonly opacityDisabled: "0.5";
999
+ /** Ghost button hover wash (dark) — same alpha as `overlays.ghostButtonHoverDark` */
1000
+ readonly opacityGhostHover: "0.08";
1001
+ };
1002
+
1003
+ /**
1004
+ * Overlay helpers (static snapshots for JS).
1005
+ * In CSS, `--refineui-overlay-backdrop` tracks `var(--refineui-color-alias-surface-overlay)`.
1006
+ */
1007
+ declare const overlays: {
1008
+ /** Light-mode scrim snapshot — keep in sync with `surfaceOverlayRgba.light` */
1009
+ readonly backdrop: "rgba(0, 0, 0, 0.2)";
1010
+ /** Dark Ghost button hover */
1011
+ readonly ghostButtonHoverDark: "rgba(255, 255, 255, 0.08)";
1012
+ };
1013
+
1014
+ /**
1015
+ * Foundation motion primitives — raw duration / easing / scale / distance steps.
1016
+ * Semantic roles live in `semantic/interaction.ts` and must reference these values
1017
+ * (do not invent ms, curves, or scales at the semantic or component layer).
1018
+ *
1019
+ * Naming: value-based keys (`duration150`, `scale98`), same idea as `foundationSize160`.
1020
+ */
1021
+ declare const motion: FoundationMotionTokens;
1022
+
1023
+ declare const strokeWidths: StrokeWidthTokens;
1024
+
1025
+ declare const borderRadii: BorderRadiusTokens;
1026
+
1027
+ /**
1028
+ * Shadow color — Figma `Global/Shadows/Key *` · `Ambient *` (lighter → darker ramp).
1029
+ * Elevation usually pairs Key light + Ambient light (light theme) / Key dark + Ambient dark (dark theme).
1030
+ */
1031
+ declare const shadowColors: ShadowColorTokens;
1032
+ /** Concatenate key + ambient into one box-shadow string */
1033
+ declare function toBoxShadow(level: ShadowLevel): string;
1034
+ /**
1035
+ * Elevation shadows — Figma `Elevation/Light` → `shadowNLight`, `Elevation/Dark` → `shadowNDark`
1036
+ * Foundation: https://www.figma.com/design/GOLyxZSkzbRIuMNBvxeqr3/Pelagornis-RefineUI-Foundation?node-id=1-5785
1037
+ */
1038
+ declare const shadows: ShadowTokens;
1039
+ /** Softest elevation-2 (slider thumb halo) — Key/Ambient lighter ramp */
1040
+ declare const shadow2Lighter: ShadowLevel;
1041
+
1042
+ /** Foundation Typography — https://www.figma.com/design/GOLyxZSkzbRIuMNBvxeqr3/Pelagornis-RefineUI-Foundation?node-id=1-650 */
1043
+ declare const typographys: TypographyStyles;
1044
+
1045
+ declare const zIndex: ZIndexTokens;
1046
+
1047
+ declare const textAlignments: TextAlignments;
1048
+
1049
+ export { type BorderRadiusTokens, type ComponentSizeName, type FontFamilyTokens, type FontSizeTokens, type FontWeightTokens, type FoundationMotionTokens, type FoundationSizeName, type FoundationTypographyName, type LineHeightTokens, type MotionTokens, type PaletteColors, SEMANTIC_COLOR_ROWS, SEMANTIC_FOCUS_PAIRS, SEMANTIC_PALETTE_PAIRS, SEMANTIC_TEXT, type SemanticColorModePair, type SemanticColorName, type SemanticFocusName, type SemanticInteractionTokens, type SemanticPaletteName, type SemanticPalettePair, type SemanticPalettePairFor, type SemanticPalettePairsOf, type SemanticShadowElevationName, type SemanticShadowElevationPair, type SemanticShadowElevationTokens, type SemanticTextName, type SemanticThemeMap, type ShadowColorTokens, type ShadowLevel, type ShadowTokens, type SpacingTokens, type StrokeWidthTokens, type TextAlignment, type TextAlignments, type Theme, type ThemeContextKey, type TokenMeta, type TokenStatus, type TypographyStyle, type TypographyStyles, type ZIndexTokens, borderRadii, colors, componentSizeFoundationKeys, componentSizes, fontFamilies, fontSizes, fontWeights, foundationSizes, iconSizes, lineHeights, motion, opacities, overlays, semanticColors, semanticFocus, semanticInteraction, semanticShadows, shadow2Lighter, shadowColors, shadows, spacings, strokeWidths, surfaceOverlayRgba, textAlignments, toBoxShadow, typographys, zIndex };