@tenerife.music/ui 1.0.15 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{colors-BZtZJBBm.d.cts → colors-BrFmCQv-.d.cts} +5 -0
- package/dist/{colors-BZtZJBBm.d.ts → colors-BrFmCQv-.d.ts} +5 -0
- package/dist/{index-CP_dmFn4.d.cts → index-DPWxsWs3.d.cts} +426 -53
- package/dist/{index-CP_dmFn4.d.ts → index-DPWxsWs3.d.ts} +426 -53
- package/dist/index.cjs +820 -508
- package/dist/index.d.cts +336 -86
- package/dist/index.d.ts +336 -86
- package/dist/index.mjs +820 -508
- package/dist/preset.cjs +28 -57
- package/dist/preset.mjs +28 -57
- package/dist/styles.css +3637 -57
- package/dist/theme/index.cjs +1305 -127
- package/dist/theme/index.d.cts +2 -2
- package/dist/theme/index.d.ts +2 -2
- package/dist/theme/index.mjs +1304 -126
- package/dist/tokens/index.cjs +434 -221
- package/dist/tokens/index.d.cts +2 -2
- package/dist/tokens/index.d.ts +2 -2
- package/dist/tokens/index.mjs +434 -221
- package/package.json +55 -56
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var reactSlot = require('@radix-ui/react-slot');
|
|
4
|
-
var classVarianceAuthority = require('class-variance-authority');
|
|
5
4
|
var React49 = require('react');
|
|
5
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
6
6
|
var clsx = require('clsx');
|
|
7
7
|
var tailwindMerge = require('tailwind-merge');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -49,13 +49,18 @@ var primaryColors = {
|
|
|
49
49
|
100: "210 40% 96%",
|
|
50
50
|
200: "217 32.6% 17.5%",
|
|
51
51
|
300: "216 28% 26%",
|
|
52
|
-
400: "215 25%
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
400: "215 25% 30%",
|
|
53
|
+
// Adjusted for better progression
|
|
54
|
+
500: "215 20% 38%",
|
|
55
|
+
// Adjusted for better progression
|
|
56
|
+
600: "215 16% 45%",
|
|
57
|
+
// Adjusted for better progression
|
|
58
|
+
700: "216 12% 35%",
|
|
59
|
+
// Rebalanced for semantic strength (L* ~35)
|
|
60
|
+
800: "217 10% 28%",
|
|
61
|
+
// Adjusted for proper progression
|
|
62
|
+
900: "222 47.4% 18%",
|
|
63
|
+
// Adjusted for better progression
|
|
59
64
|
950: "222 84% 4.9%"
|
|
60
65
|
// Darkest blue
|
|
61
66
|
};
|
|
@@ -65,12 +70,15 @@ var accentColors = {
|
|
|
65
70
|
200: "280 60% 85%",
|
|
66
71
|
300: "280 55% 75%",
|
|
67
72
|
400: "280 50% 65%",
|
|
68
|
-
500: "280
|
|
69
|
-
//
|
|
70
|
-
600: "259 65%
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
500: "280 65% 72%",
|
|
74
|
+
// Adjusted for WCAG AA contrast (4.5:1) with dark text in night mode
|
|
75
|
+
600: "259 65% 59%",
|
|
76
|
+
// Default accent - lightened for better contrast vs secondary (L* ~59, was 52, 15 delta from secondary-600)
|
|
77
|
+
700: "259 60% 44%",
|
|
78
|
+
// Active state - rebalanced for semantic strength (L* ~44, 12 delta from secondary-700)
|
|
79
|
+
800: "259 55% 38%",
|
|
80
|
+
// Adjusted for proper progression
|
|
81
|
+
900: "259 50% 32%",
|
|
74
82
|
950: "259 45% 30%"
|
|
75
83
|
};
|
|
76
84
|
var secondaryColors = {
|
|
@@ -79,12 +87,15 @@ var secondaryColors = {
|
|
|
79
87
|
200: "173 100% 85%",
|
|
80
88
|
300: "173 100% 70%",
|
|
81
89
|
400: "173 100% 55%",
|
|
82
|
-
500: "173 100%
|
|
83
|
-
//
|
|
84
|
-
600: "173 100%
|
|
85
|
-
|
|
90
|
+
500: "173 100% 45%",
|
|
91
|
+
// Adjusted for better scale progression
|
|
92
|
+
600: "173 100% 44%",
|
|
93
|
+
// Default secondary - rebalanced for better contrast vs primary (L* ~44, was 38)
|
|
94
|
+
700: "173 95% 32%",
|
|
95
|
+
// Active state - rebalanced for semantic strength (L* ~32)
|
|
86
96
|
800: "173 90% 22%",
|
|
87
|
-
|
|
97
|
+
// Primary variant - darkened for dominance (L* ~22, was 26)
|
|
98
|
+
900: "173 85% 20%",
|
|
88
99
|
950: "173 80% 12%"
|
|
89
100
|
};
|
|
90
101
|
var surfaceColors = {
|
|
@@ -177,13 +188,13 @@ var chartColors = {
|
|
|
177
188
|
var textColors = {
|
|
178
189
|
day: {
|
|
179
190
|
primary: "0 0% 9%",
|
|
180
|
-
// Almost black
|
|
191
|
+
// Almost black (neutral-900 equivalent)
|
|
181
192
|
secondary: "0 0% 45%",
|
|
182
193
|
// Medium gray
|
|
183
194
|
tertiary: "0 0% 65%",
|
|
184
195
|
// Light gray
|
|
185
|
-
muted: "0 0%
|
|
186
|
-
// Muted gray
|
|
196
|
+
muted: "0 0% 42%",
|
|
197
|
+
// Muted gray - adjusted for WCAG AA contrast (4.5:1) on surface.elevated2
|
|
187
198
|
inverse: "0 0% 100%"
|
|
188
199
|
// White (for dark backgrounds)
|
|
189
200
|
},
|
|
@@ -495,6 +506,139 @@ var ALERT_TOKENS = {
|
|
|
495
506
|
}
|
|
496
507
|
};
|
|
497
508
|
|
|
509
|
+
// src/tokens/components/motion.ts
|
|
510
|
+
var MOTION_TOKENS = {
|
|
511
|
+
/**
|
|
512
|
+
* Transition property tokens
|
|
513
|
+
* Maps to Tailwind transition utilities
|
|
514
|
+
*/
|
|
515
|
+
transition: {
|
|
516
|
+
all: "transition-all",
|
|
517
|
+
// All properties
|
|
518
|
+
colors: "transition-colors",
|
|
519
|
+
// Color properties only
|
|
520
|
+
opacity: "transition-opacity",
|
|
521
|
+
// Opacity only
|
|
522
|
+
transform: "transition-transform",
|
|
523
|
+
// Transform only
|
|
524
|
+
shadow: "transition-shadow",
|
|
525
|
+
// Box shadow only
|
|
526
|
+
none: "transition-none"
|
|
527
|
+
// No transition
|
|
528
|
+
},
|
|
529
|
+
/**
|
|
530
|
+
* Duration tokens
|
|
531
|
+
* Maps to foundation motion duration tokens via Tailwind
|
|
532
|
+
*/
|
|
533
|
+
duration: {
|
|
534
|
+
instant: "duration-0",
|
|
535
|
+
// 0ms
|
|
536
|
+
fast: "duration-fast",
|
|
537
|
+
// 150ms - maps to motion.durations.fast
|
|
538
|
+
normal: "duration-normal",
|
|
539
|
+
// 300ms - maps to motion.durations.normal
|
|
540
|
+
slow: "duration-slow",
|
|
541
|
+
// 500ms - maps to motion.durations.slow
|
|
542
|
+
slower: "duration-slower",
|
|
543
|
+
// 700ms - maps to motion.durations.slower
|
|
544
|
+
slowest: "duration-slowest",
|
|
545
|
+
// 1000ms - maps to motion.durations.slowest
|
|
546
|
+
// Granular durations
|
|
547
|
+
"75": "duration-75",
|
|
548
|
+
// 75ms
|
|
549
|
+
"100": "duration-100",
|
|
550
|
+
// 100ms
|
|
551
|
+
"200": "duration-200",
|
|
552
|
+
// 200ms
|
|
553
|
+
"250": "duration-250",
|
|
554
|
+
// 250ms
|
|
555
|
+
"300": "duration-300",
|
|
556
|
+
// 300ms
|
|
557
|
+
"400": "duration-400",
|
|
558
|
+
// 400ms
|
|
559
|
+
"500": "duration-500",
|
|
560
|
+
// 500ms
|
|
561
|
+
"600": "duration-600",
|
|
562
|
+
// 600ms
|
|
563
|
+
"700": "duration-700",
|
|
564
|
+
// 700ms
|
|
565
|
+
"800": "duration-800",
|
|
566
|
+
// 800ms
|
|
567
|
+
"1000": "duration-1000"
|
|
568
|
+
// 1000ms
|
|
569
|
+
},
|
|
570
|
+
/**
|
|
571
|
+
* Easing tokens
|
|
572
|
+
* Maps to foundation motion easing tokens via Tailwind
|
|
573
|
+
*/
|
|
574
|
+
easing: {
|
|
575
|
+
linear: "ease-linear",
|
|
576
|
+
// Linear easing
|
|
577
|
+
in: "ease-in",
|
|
578
|
+
// Ease in
|
|
579
|
+
out: "ease-out",
|
|
580
|
+
// Ease out (recommended for most UI)
|
|
581
|
+
"in-out": "ease-in-out",
|
|
582
|
+
// Ease in-out
|
|
583
|
+
bounce: "ease-bounce",
|
|
584
|
+
// Bounce easing
|
|
585
|
+
elastic: "ease-elastic"
|
|
586
|
+
// Elastic easing
|
|
587
|
+
},
|
|
588
|
+
/**
|
|
589
|
+
* Pre-configured transition tokens
|
|
590
|
+
* Combines duration and easing for common use cases
|
|
591
|
+
*/
|
|
592
|
+
transitionPreset: {
|
|
593
|
+
fast: "transition-all duration-fast ease-out",
|
|
594
|
+
// Fast transition
|
|
595
|
+
normal: "transition-all duration-normal ease-in-out",
|
|
596
|
+
// Normal transition (default)
|
|
597
|
+
slow: "transition-all duration-slow ease-in-out",
|
|
598
|
+
// Slow transition
|
|
599
|
+
colors: "transition-colors duration-normal ease-out",
|
|
600
|
+
// Color transitions (common)
|
|
601
|
+
transform: "transition-transform duration-normal ease-out",
|
|
602
|
+
// Transform transitions
|
|
603
|
+
opacity: "transition-opacity duration-fast ease-out"
|
|
604
|
+
// Opacity transitions
|
|
605
|
+
},
|
|
606
|
+
/**
|
|
607
|
+
* Animation tokens
|
|
608
|
+
* Maps to foundation motion animation tokens via Tailwind
|
|
609
|
+
*/
|
|
610
|
+
animation: {
|
|
611
|
+
none: "animate-none",
|
|
612
|
+
// No animation
|
|
613
|
+
spin: "animate-spin",
|
|
614
|
+
// Spin animation
|
|
615
|
+
pulse: "animate-pulse",
|
|
616
|
+
// Pulse animation
|
|
617
|
+
bounce: "animate-bounce",
|
|
618
|
+
// Bounce animation
|
|
619
|
+
ping: "animate-ping",
|
|
620
|
+
// Ping animation
|
|
621
|
+
shake: "animate-shake",
|
|
622
|
+
// Shake animation
|
|
623
|
+
fadeIn: "animate-fadeIn",
|
|
624
|
+
// Fade in
|
|
625
|
+
fadeOut: "animate-fadeOut",
|
|
626
|
+
// Fade out
|
|
627
|
+
slideInUp: "animate-slideInUp",
|
|
628
|
+
// Slide in from bottom
|
|
629
|
+
slideInDown: "animate-slideInDown",
|
|
630
|
+
// Slide in from top
|
|
631
|
+
slideInLeft: "animate-slideInLeft",
|
|
632
|
+
// Slide in from right
|
|
633
|
+
slideInRight: "animate-slideInRight",
|
|
634
|
+
// Slide in from left
|
|
635
|
+
scaleIn: "animate-scaleIn",
|
|
636
|
+
// Scale in
|
|
637
|
+
scaleOut: "animate-scaleOut"
|
|
638
|
+
// Scale out
|
|
639
|
+
}
|
|
640
|
+
};
|
|
641
|
+
|
|
498
642
|
// src/tokens/components/button.ts
|
|
499
643
|
var BUTTON_TOKENS = {
|
|
500
644
|
/**
|
|
@@ -527,25 +671,48 @@ var BUTTON_TOKENS = {
|
|
|
527
671
|
vertical: {
|
|
528
672
|
sm: "py-xs",
|
|
529
673
|
// 4px (0.25rem) - maps to semanticSpacing.xs
|
|
530
|
-
md: "py-sm"
|
|
674
|
+
md: "py-sm",
|
|
531
675
|
// 8px (0.5rem) - maps to semanticSpacing.sm
|
|
676
|
+
lg: "py-md"
|
|
677
|
+
// 16px (1rem) - maps to semanticSpacing.md - standardized for visual distinction
|
|
532
678
|
}
|
|
533
679
|
},
|
|
534
680
|
/**
|
|
535
|
-
* Gap between icon and text
|
|
681
|
+
* Gap between icon and text by size
|
|
682
|
+
* Scales with button size for visual consistency
|
|
536
683
|
*/
|
|
537
|
-
gap:
|
|
538
|
-
|
|
684
|
+
gap: {
|
|
685
|
+
sm: "gap-xs",
|
|
686
|
+
// 4px (0.25rem) - smaller gap for small buttons
|
|
687
|
+
md: "gap-sm",
|
|
688
|
+
// 8px (0.5rem) - medium gap for medium buttons
|
|
689
|
+
lg: "gap-md"
|
|
690
|
+
// 16px (1rem) - larger gap for large buttons
|
|
691
|
+
},
|
|
539
692
|
/**
|
|
540
693
|
* Border radius for all button sizes
|
|
694
|
+
* Consistent radius across sizes for visual harmony
|
|
695
|
+
*
|
|
696
|
+
* @enforcement TUNG_TOKEN_AUTHORITY_EXPANSION_PLAN
|
|
697
|
+
* @rule References componentRadius.button.md (6px / 0.375rem) from Radius Authority
|
|
698
|
+
* @see docs/architecture/RADIUS_AUTHORITY_CONTRACT.md
|
|
541
699
|
*/
|
|
542
700
|
radius: "rounded-md",
|
|
543
|
-
// 6px
|
|
701
|
+
// References componentRadius.button.md (6px / 0.375rem) - Radius Authority compliant
|
|
544
702
|
/**
|
|
545
|
-
* Icon size within buttons
|
|
703
|
+
* Icon size within buttons by button size
|
|
704
|
+
* Scales proportionally with button size for visual balance
|
|
546
705
|
*/
|
|
547
|
-
iconSize:
|
|
548
|
-
|
|
706
|
+
iconSize: {
|
|
707
|
+
sm: "size-3.5",
|
|
708
|
+
// 14px (0.875rem) - smaller icon for small buttons
|
|
709
|
+
md: "size-4",
|
|
710
|
+
// 16px (1rem) - medium icon for medium buttons
|
|
711
|
+
lg: "size-5",
|
|
712
|
+
// 20px (1.25rem) - larger icon for large buttons
|
|
713
|
+
icon: "size-4"
|
|
714
|
+
// 16px (1rem) - medium icon for icon-only buttons
|
|
715
|
+
},
|
|
549
716
|
/**
|
|
550
717
|
* Width tokens
|
|
551
718
|
*/
|
|
@@ -555,15 +722,19 @@ var BUTTON_TOKENS = {
|
|
|
555
722
|
},
|
|
556
723
|
/**
|
|
557
724
|
* Font sizes by button size
|
|
558
|
-
*
|
|
725
|
+
* References foundation typography fontSize tokens from Typography Authority
|
|
726
|
+
*
|
|
727
|
+
* @enforcement TUNG_TOKEN_AUTHORITY_EXPANSION_PLAN
|
|
728
|
+
* @rule All fontSize values reference Typography Authority tokens
|
|
729
|
+
* @see docs/architecture/TYPOGRAPHY_AUTHORITY_CONTRACT.md
|
|
559
730
|
*/
|
|
560
731
|
fontSize: {
|
|
561
732
|
sm: "text-xs",
|
|
562
|
-
//
|
|
733
|
+
// References fontSize.xs[0] from Typography Authority (~12px)
|
|
563
734
|
md: "text-sm",
|
|
564
|
-
//
|
|
565
|
-
lg: "text-
|
|
566
|
-
//
|
|
735
|
+
// References fontSize.sm[0] from Typography Authority (~14px)
|
|
736
|
+
lg: "text-base"
|
|
737
|
+
// References fontSize.base[0] from Typography Authority (~16px)
|
|
567
738
|
},
|
|
568
739
|
/**
|
|
569
740
|
* Shadow tokens by variant
|
|
@@ -578,50 +749,137 @@ var BUTTON_TOKENS = {
|
|
|
578
749
|
/**
|
|
579
750
|
* Color tokens for button variants
|
|
580
751
|
* Uses semantic color tokens that map to CSS variables
|
|
752
|
+
*
|
|
753
|
+
* State tokens (hover, active, disabled) use CSS variables from State Matrix.
|
|
754
|
+
* All states are injected via updateStateMatrixFromTokens() and consumed via arbitrary values.
|
|
755
|
+
* States react to Color Authority changes automatically through State Matrix.
|
|
756
|
+
*
|
|
757
|
+
* Interaction Authority Rules:
|
|
758
|
+
* - Hover (Priority 4): hover: prefix - ONLY when !disabled && !loading && pointer-events:auto
|
|
759
|
+
* - Active (Priority 3): active: prefix - ONLY when !disabled && !loading && mousedown
|
|
760
|
+
* - Focus (Priority 5): focus-visible: prefix - ONLY when !disabled && keyboard navigation
|
|
761
|
+
* - Disabled (Priority 1): disabled: prefix - Blocks ALL interactions
|
|
762
|
+
* - Loading (Priority 2): loading: prefix - Blocks hover/active (when implemented)
|
|
763
|
+
* - Base (Priority 6): No prefix - Default state, pointer-events: auto
|
|
764
|
+
*
|
|
765
|
+
* @enforcement TUNG_STATE_AUTHORITY_FOUNDATION_LOCK
|
|
766
|
+
* @enforcement TUNG_INTERACTION_AUTHORITY_FOUNDATION
|
|
767
|
+
* @rule States use CSS variables, not Tailwind variants
|
|
768
|
+
* @rule All state variables follow pattern: --{component}-{variant}-{state}-{property}
|
|
769
|
+
* @rule Visual states (colors) are SEPARATE from interaction states (pointer-events)
|
|
770
|
+
* @rule Hover MUST work with real mouse cursor, NOT just DevTools force state
|
|
771
|
+
* @rule Active MUST activate only on mousedown, NOT on hover
|
|
772
|
+
* @rule Focus MUST activate only on keyboard navigation, NOT on mouse click
|
|
773
|
+
*
|
|
774
|
+
* @see docs/architecture/INTERACTION_AUTHORITY_CONTRACT.md
|
|
581
775
|
*/
|
|
582
776
|
variant: {
|
|
583
777
|
primary: {
|
|
584
|
-
background: "bg-primary",
|
|
585
|
-
// Primary background
|
|
778
|
+
background: "bg-[hsl(var(--button-primary-base-bg))]",
|
|
779
|
+
// Primary base background - CSS variable from State Matrix
|
|
586
780
|
text: "text-primary-foreground",
|
|
587
781
|
// Primary text using CSS var
|
|
588
|
-
hover: "hover:bg-primary
|
|
589
|
-
// Primary hover
|
|
782
|
+
hover: "hover:bg-[hsl(var(--button-primary-hover-bg))]",
|
|
783
|
+
// Primary hover - CSS variable from State Matrix (Priority 4: blocked by disabled/loading)
|
|
784
|
+
active: "active:bg-[hsl(var(--button-primary-active-bg))]",
|
|
785
|
+
// Primary active - CSS variable from State Matrix (Priority 3: blocked by disabled/loading, priority over hover)
|
|
786
|
+
focus: "focus-visible:bg-[hsl(var(--button-primary-focus-bg))]",
|
|
787
|
+
// Primary focus - CSS variable from State Matrix (Priority 5: keyboard navigation only)
|
|
788
|
+
disabled: {
|
|
789
|
+
background: "disabled:bg-[hsl(var(--button-primary-disabled-bg))]",
|
|
790
|
+
// Disabled background - CSS variable from State Matrix (Priority 1: blocks all)
|
|
791
|
+
text: "disabled:text-[hsl(var(--button-primary-disabled-text))]"
|
|
792
|
+
// Disabled text - CSS variable from State Matrix
|
|
793
|
+
},
|
|
794
|
+
loading: "bg-[hsl(var(--button-primary-loading-bg))]"
|
|
795
|
+
// Primary loading - CSS variable from State Matrix (Priority 2: blocks hover/active, used with aria-busy/data-loading when implemented)
|
|
590
796
|
},
|
|
591
797
|
secondary: {
|
|
592
798
|
background: "bg-secondary",
|
|
593
799
|
// Secondary background using CSS var
|
|
594
800
|
text: "text-secondary-foreground",
|
|
595
801
|
// Secondary text using CSS var
|
|
596
|
-
hover: "hover:bg-secondary
|
|
597
|
-
// Secondary hover
|
|
802
|
+
hover: "hover:bg-[hsl(var(--button-secondary-hover-bg))]",
|
|
803
|
+
// Secondary hover - CSS variable from State Matrix
|
|
804
|
+
active: "active:bg-[hsl(var(--button-secondary-active-bg))]",
|
|
805
|
+
// Secondary active - CSS variable from State Matrix
|
|
806
|
+
disabled: {
|
|
807
|
+
background: "disabled:bg-[hsl(var(--button-secondary-disabled-bg))]",
|
|
808
|
+
// Disabled background - CSS variable from State Matrix
|
|
809
|
+
text: "disabled:text-[hsl(var(--button-secondary-disabled-text))]"
|
|
810
|
+
// Disabled text - CSS variable from State Matrix
|
|
811
|
+
}
|
|
598
812
|
},
|
|
599
813
|
accent: {
|
|
600
814
|
background: "bg-accent",
|
|
601
815
|
// Accent background using CSS var
|
|
602
816
|
text: "text-accent-foreground",
|
|
603
817
|
// Accent text using CSS var
|
|
604
|
-
hover: "hover:bg-accent
|
|
605
|
-
// Accent hover
|
|
818
|
+
hover: "hover:bg-[hsl(var(--button-accent-hover-bg))]",
|
|
819
|
+
// Accent hover - CSS variable from State Matrix
|
|
820
|
+
active: "active:bg-[hsl(var(--button-accent-active-bg))]",
|
|
821
|
+
// Accent active - CSS variable from State Matrix
|
|
822
|
+
disabled: {
|
|
823
|
+
background: "disabled:bg-[hsl(var(--button-accent-disabled-bg))]",
|
|
824
|
+
// Disabled background - CSS variable from State Matrix
|
|
825
|
+
text: "disabled:text-[hsl(var(--button-accent-disabled-text))]"
|
|
826
|
+
// Disabled text - CSS variable from State Matrix
|
|
827
|
+
}
|
|
606
828
|
},
|
|
607
829
|
outline: {
|
|
608
830
|
border: "border border-input",
|
|
609
831
|
// Input border using CSS var
|
|
610
832
|
background: "bg-background",
|
|
611
833
|
// Background using CSS var
|
|
834
|
+
text: "text-foreground",
|
|
835
|
+
// Foreground text using CSS var
|
|
612
836
|
hover: {
|
|
613
|
-
background: "hover:bg-
|
|
614
|
-
//
|
|
615
|
-
text: "hover:text-
|
|
616
|
-
//
|
|
837
|
+
background: "hover:bg-[hsl(var(--button-outline-hover-bg))]",
|
|
838
|
+
// Outline hover background - CSS variable from State Matrix
|
|
839
|
+
text: "hover:text-[hsl(var(--button-outline-hover-text))]",
|
|
840
|
+
// Outline hover text - CSS variable from State Matrix
|
|
841
|
+
border: "hover:border-[hsl(var(--button-outline-hover-border))]"
|
|
842
|
+
// Outline hover border - CSS variable from State Matrix
|
|
843
|
+
},
|
|
844
|
+
active: {
|
|
845
|
+
background: "active:bg-[hsl(var(--button-outline-active-bg))]",
|
|
846
|
+
// Outline active background - CSS variable from State Matrix
|
|
847
|
+
text: "active:text-[hsl(var(--button-outline-active-text))]",
|
|
848
|
+
// Outline active text - CSS variable from State Matrix
|
|
849
|
+
border: "active:border-[hsl(var(--button-outline-active-border))]"
|
|
850
|
+
// Outline active border - CSS variable from State Matrix
|
|
851
|
+
},
|
|
852
|
+
disabled: {
|
|
853
|
+
background: "disabled:bg-[hsl(var(--button-outline-disabled-bg))]",
|
|
854
|
+
// Disabled background - CSS variable from State Matrix
|
|
855
|
+
text: "disabled:text-[hsl(var(--button-outline-disabled-text))]",
|
|
856
|
+
// Disabled text - CSS variable from State Matrix
|
|
857
|
+
border: "disabled:border-[hsl(var(--button-outline-disabled-border))]"
|
|
858
|
+
// Disabled border - CSS variable from State Matrix
|
|
617
859
|
}
|
|
618
860
|
},
|
|
619
861
|
ghost: {
|
|
862
|
+
background: "bg-transparent",
|
|
863
|
+
// Transparent background
|
|
864
|
+
text: "text-foreground",
|
|
865
|
+
// Foreground text using CSS var
|
|
620
866
|
hover: {
|
|
621
|
-
background: "hover:bg-
|
|
622
|
-
//
|
|
623
|
-
text: "hover:text-
|
|
624
|
-
//
|
|
867
|
+
background: "hover:bg-[hsl(var(--button-ghost-hover-bg))]",
|
|
868
|
+
// Ghost hover background - CSS variable from State Matrix
|
|
869
|
+
text: "hover:text-[hsl(var(--button-ghost-hover-text))]"
|
|
870
|
+
// Ghost hover text - CSS variable from State Matrix
|
|
871
|
+
},
|
|
872
|
+
active: {
|
|
873
|
+
background: "active:bg-[hsl(var(--button-ghost-active-bg))]",
|
|
874
|
+
// Ghost active background - CSS variable from State Matrix
|
|
875
|
+
text: "active:text-[hsl(var(--button-ghost-active-text))]"
|
|
876
|
+
// Ghost active text - CSS variable from State Matrix
|
|
877
|
+
},
|
|
878
|
+
disabled: {
|
|
879
|
+
background: "disabled:bg-[hsl(var(--button-ghost-disabled-bg))]",
|
|
880
|
+
// Disabled background - CSS variable from State Matrix
|
|
881
|
+
text: "disabled:text-[hsl(var(--button-ghost-disabled-text))]"
|
|
882
|
+
// Disabled text - CSS variable from State Matrix
|
|
625
883
|
}
|
|
626
884
|
},
|
|
627
885
|
destructive: {
|
|
@@ -629,16 +887,94 @@ var BUTTON_TOKENS = {
|
|
|
629
887
|
// Destructive background using CSS var
|
|
630
888
|
text: "text-destructive-foreground",
|
|
631
889
|
// Destructive text using CSS var
|
|
632
|
-
hover: "hover:bg-destructive
|
|
633
|
-
// Destructive hover
|
|
890
|
+
hover: "hover:bg-[hsl(var(--button-destructive-hover-bg))]",
|
|
891
|
+
// Destructive hover - CSS variable from State Matrix
|
|
892
|
+
active: "active:bg-[hsl(var(--button-destructive-active-bg))]",
|
|
893
|
+
// Destructive active - CSS variable from State Matrix
|
|
894
|
+
disabled: {
|
|
895
|
+
background: "disabled:bg-[hsl(var(--button-destructive-disabled-bg))]",
|
|
896
|
+
// Disabled background - CSS variable from State Matrix
|
|
897
|
+
text: "disabled:text-[hsl(var(--button-destructive-disabled-text))]"
|
|
898
|
+
// Disabled text - CSS variable from State Matrix
|
|
899
|
+
}
|
|
634
900
|
}
|
|
635
901
|
},
|
|
636
902
|
/**
|
|
637
903
|
* Transition tokens
|
|
904
|
+
* References Motion Authority tokens for consistent motion behavior
|
|
905
|
+
*
|
|
906
|
+
* @enforcement TUNG_TOKEN_AUTHORITY_EXPANSION_PLAN
|
|
907
|
+
* @rule Uses MOTION_TOKENS.transitionPreset.colors from Motion Authority
|
|
908
|
+
* @rule Motion transitions MUST use canonical motion tokens only
|
|
909
|
+
* @see docs/architecture/MOTION_AUTHORITY_CONTRACT.md
|
|
638
910
|
*/
|
|
639
911
|
transition: {
|
|
640
|
-
colors:
|
|
641
|
-
//
|
|
912
|
+
colors: MOTION_TOKENS.transitionPreset.colors
|
|
913
|
+
// "transition-colors duration-normal ease-out" - Motion Authority compliant
|
|
914
|
+
},
|
|
915
|
+
/**
|
|
916
|
+
* Global state tokens
|
|
917
|
+
* Shared state tokens that apply across all variants
|
|
918
|
+
* Variant-specific states are defined in variant.*.active and variant.*.disabled
|
|
919
|
+
*
|
|
920
|
+
* @enforcement TUNG_INTERACTION_AUTHORITY_FOUNDATION
|
|
921
|
+
* @rule All interaction states MUST follow Interaction Authority Contract
|
|
922
|
+
* @rule State priority: disabled > loading > active > hover > focus-visible > base
|
|
923
|
+
* @rule Visual states (colors) are SEPARATE from interaction states (pointer-events, cursor)
|
|
924
|
+
* @rule All states MUST be browser-native (CSS pseudo-classes), NOT JavaScript-managed
|
|
925
|
+
*/
|
|
926
|
+
state: {
|
|
927
|
+
/**
|
|
928
|
+
* Disabled state tokens
|
|
929
|
+
* Global disabled state tokens (variant-specific overrides in variant.*.disabled)
|
|
930
|
+
*
|
|
931
|
+
* Interaction Authority Rules:
|
|
932
|
+
* - Priority: 1 (Highest) - Blocks ALL interactions
|
|
933
|
+
* - MUST block hover, active, and focus states
|
|
934
|
+
* - MUST use disabled: prefix (never in base state)
|
|
935
|
+
* - Base state MUST have pointer-events: auto (default) for hover to work
|
|
936
|
+
*
|
|
937
|
+
* @enforcement TUNG_INTERACTION_AUTHORITY_FOUNDATION
|
|
938
|
+
* @enforcement TUNG_BUTTON_INTERACTION_FIX
|
|
939
|
+
* @rule Interaction Authority: pointer-events is NOT a visual token
|
|
940
|
+
* @rule pointer-events-none MUST use disabled: prefix (never in base state)
|
|
941
|
+
* @rule Base state MUST have pointer-events: auto (default) for hover to work
|
|
942
|
+
* @rule These tokens are applied in base but only activate when element is disabled
|
|
943
|
+
* @rule Hover is FORBIDDEN when disabled={true}
|
|
944
|
+
* @rule Active is FORBIDDEN when disabled={true}
|
|
945
|
+
* @rule Focus is FORBIDDEN when disabled={true} (for interactions)
|
|
946
|
+
*
|
|
947
|
+
* @see docs/architecture/INTERACTION_AUTHORITY_CONTRACT.md
|
|
948
|
+
*/
|
|
949
|
+
disabled: {
|
|
950
|
+
cursor: "disabled:cursor-not-allowed",
|
|
951
|
+
// Disabled cursor style (only applies when disabled)
|
|
952
|
+
pointerEvents: "disabled:pointer-events-none"
|
|
953
|
+
// Disable pointer events (only applies when disabled)
|
|
954
|
+
},
|
|
955
|
+
/**
|
|
956
|
+
* Focus state tokens
|
|
957
|
+
* Focus ring for keyboard navigation
|
|
958
|
+
*
|
|
959
|
+
* Interaction Authority Rules:
|
|
960
|
+
* - Priority: 5 - Lower than active and hover
|
|
961
|
+
* - MUST activate only on keyboard navigation (focus-visible: prefix)
|
|
962
|
+
* - MUST NOT activate on mouse click (use :focus-visible, not :focus)
|
|
963
|
+
* - MUST be blocked by disabled state
|
|
964
|
+
*
|
|
965
|
+
* @enforcement TUNG_INTERACTION_AUTHORITY_FOUNDATION
|
|
966
|
+
* @rule Focus MUST use focus-visible: prefix (keyboard navigation only)
|
|
967
|
+
* @rule Focus MUST be blocked when disabled={true}
|
|
968
|
+
* @rule Focus MUST NOT activate on mouse click
|
|
969
|
+
*
|
|
970
|
+
* @see docs/architecture/INTERACTION_AUTHORITY_CONTRACT.md
|
|
971
|
+
*/
|
|
972
|
+
focus: {
|
|
973
|
+
ring: "focus-visible:ring-1 focus-visible:ring-ring",
|
|
974
|
+
// Focus ring using semantic ring color
|
|
975
|
+
outline: "focus-visible:outline-none"
|
|
976
|
+
// Remove default outline (replaced by ring)
|
|
977
|
+
}
|
|
642
978
|
}
|
|
643
979
|
};
|
|
644
980
|
|
|
@@ -1174,139 +1510,6 @@ var ICON_TOKENS = {
|
|
|
1174
1510
|
}
|
|
1175
1511
|
};
|
|
1176
1512
|
|
|
1177
|
-
// src/tokens/components/motion.ts
|
|
1178
|
-
var MOTION_TOKENS = {
|
|
1179
|
-
/**
|
|
1180
|
-
* Transition property tokens
|
|
1181
|
-
* Maps to Tailwind transition utilities
|
|
1182
|
-
*/
|
|
1183
|
-
transition: {
|
|
1184
|
-
all: "transition-all",
|
|
1185
|
-
// All properties
|
|
1186
|
-
colors: "transition-colors",
|
|
1187
|
-
// Color properties only
|
|
1188
|
-
opacity: "transition-opacity",
|
|
1189
|
-
// Opacity only
|
|
1190
|
-
transform: "transition-transform",
|
|
1191
|
-
// Transform only
|
|
1192
|
-
shadow: "transition-shadow",
|
|
1193
|
-
// Box shadow only
|
|
1194
|
-
none: "transition-none"
|
|
1195
|
-
// No transition
|
|
1196
|
-
},
|
|
1197
|
-
/**
|
|
1198
|
-
* Duration tokens
|
|
1199
|
-
* Maps to foundation motion duration tokens via Tailwind
|
|
1200
|
-
*/
|
|
1201
|
-
duration: {
|
|
1202
|
-
instant: "duration-0",
|
|
1203
|
-
// 0ms
|
|
1204
|
-
fast: "duration-fast",
|
|
1205
|
-
// 150ms - maps to motion.durations.fast
|
|
1206
|
-
normal: "duration-normal",
|
|
1207
|
-
// 300ms - maps to motion.durations.normal
|
|
1208
|
-
slow: "duration-slow",
|
|
1209
|
-
// 500ms - maps to motion.durations.slow
|
|
1210
|
-
slower: "duration-slower",
|
|
1211
|
-
// 700ms - maps to motion.durations.slower
|
|
1212
|
-
slowest: "duration-slowest",
|
|
1213
|
-
// 1000ms - maps to motion.durations.slowest
|
|
1214
|
-
// Granular durations
|
|
1215
|
-
"75": "duration-75",
|
|
1216
|
-
// 75ms
|
|
1217
|
-
"100": "duration-100",
|
|
1218
|
-
// 100ms
|
|
1219
|
-
"200": "duration-200",
|
|
1220
|
-
// 200ms
|
|
1221
|
-
"250": "duration-250",
|
|
1222
|
-
// 250ms
|
|
1223
|
-
"300": "duration-300",
|
|
1224
|
-
// 300ms
|
|
1225
|
-
"400": "duration-400",
|
|
1226
|
-
// 400ms
|
|
1227
|
-
"500": "duration-500",
|
|
1228
|
-
// 500ms
|
|
1229
|
-
"600": "duration-600",
|
|
1230
|
-
// 600ms
|
|
1231
|
-
"700": "duration-700",
|
|
1232
|
-
// 700ms
|
|
1233
|
-
"800": "duration-800",
|
|
1234
|
-
// 800ms
|
|
1235
|
-
"1000": "duration-1000"
|
|
1236
|
-
// 1000ms
|
|
1237
|
-
},
|
|
1238
|
-
/**
|
|
1239
|
-
* Easing tokens
|
|
1240
|
-
* Maps to foundation motion easing tokens via Tailwind
|
|
1241
|
-
*/
|
|
1242
|
-
easing: {
|
|
1243
|
-
linear: "ease-linear",
|
|
1244
|
-
// Linear easing
|
|
1245
|
-
in: "ease-in",
|
|
1246
|
-
// Ease in
|
|
1247
|
-
out: "ease-out",
|
|
1248
|
-
// Ease out (recommended for most UI)
|
|
1249
|
-
"in-out": "ease-in-out",
|
|
1250
|
-
// Ease in-out
|
|
1251
|
-
bounce: "ease-bounce",
|
|
1252
|
-
// Bounce easing
|
|
1253
|
-
elastic: "ease-elastic"
|
|
1254
|
-
// Elastic easing
|
|
1255
|
-
},
|
|
1256
|
-
/**
|
|
1257
|
-
* Pre-configured transition tokens
|
|
1258
|
-
* Combines duration and easing for common use cases
|
|
1259
|
-
*/
|
|
1260
|
-
transitionPreset: {
|
|
1261
|
-
fast: "transition-all duration-fast ease-out",
|
|
1262
|
-
// Fast transition
|
|
1263
|
-
normal: "transition-all duration-normal ease-in-out",
|
|
1264
|
-
// Normal transition (default)
|
|
1265
|
-
slow: "transition-all duration-slow ease-in-out",
|
|
1266
|
-
// Slow transition
|
|
1267
|
-
colors: "transition-colors duration-normal ease-out",
|
|
1268
|
-
// Color transitions (common)
|
|
1269
|
-
transform: "transition-transform duration-normal ease-out",
|
|
1270
|
-
// Transform transitions
|
|
1271
|
-
opacity: "transition-opacity duration-fast ease-out"
|
|
1272
|
-
// Opacity transitions
|
|
1273
|
-
},
|
|
1274
|
-
/**
|
|
1275
|
-
* Animation tokens
|
|
1276
|
-
* Maps to foundation motion animation tokens via Tailwind
|
|
1277
|
-
*/
|
|
1278
|
-
animation: {
|
|
1279
|
-
none: "animate-none",
|
|
1280
|
-
// No animation
|
|
1281
|
-
spin: "animate-spin",
|
|
1282
|
-
// Spin animation
|
|
1283
|
-
pulse: "animate-pulse",
|
|
1284
|
-
// Pulse animation
|
|
1285
|
-
bounce: "animate-bounce",
|
|
1286
|
-
// Bounce animation
|
|
1287
|
-
ping: "animate-ping",
|
|
1288
|
-
// Ping animation
|
|
1289
|
-
shake: "animate-shake",
|
|
1290
|
-
// Shake animation
|
|
1291
|
-
fadeIn: "animate-fadeIn",
|
|
1292
|
-
// Fade in
|
|
1293
|
-
fadeOut: "animate-fadeOut",
|
|
1294
|
-
// Fade out
|
|
1295
|
-
slideInUp: "animate-slideInUp",
|
|
1296
|
-
// Slide in from bottom
|
|
1297
|
-
slideInDown: "animate-slideInDown",
|
|
1298
|
-
// Slide in from top
|
|
1299
|
-
slideInLeft: "animate-slideInLeft",
|
|
1300
|
-
// Slide in from right
|
|
1301
|
-
slideInRight: "animate-slideInRight",
|
|
1302
|
-
// Slide in from left
|
|
1303
|
-
scaleIn: "animate-scaleIn",
|
|
1304
|
-
// Scale in
|
|
1305
|
-
scaleOut: "animate-scaleOut"
|
|
1306
|
-
// Scale out
|
|
1307
|
-
}
|
|
1308
|
-
};
|
|
1309
|
-
|
|
1310
1513
|
// src/tokens/components/domain.ts
|
|
1311
1514
|
var DOMAIN_TOKENS = {
|
|
1312
1515
|
/**
|
|
@@ -3098,8 +3301,16 @@ var TEXT_TOKENS = {
|
|
|
3098
3301
|
// Maps to fontSize.base[0]
|
|
3099
3302
|
lg: "text-lg",
|
|
3100
3303
|
// Maps to fontSize.lg[0]
|
|
3101
|
-
xl: "text-xl"
|
|
3304
|
+
xl: "text-xl",
|
|
3102
3305
|
// Maps to fontSize.xl[0]
|
|
3306
|
+
"2xl": "text-2xl",
|
|
3307
|
+
// Maps to fontSize.2xl[0]
|
|
3308
|
+
"3xl": "text-3xl",
|
|
3309
|
+
// Maps to fontSize.3xl[0]
|
|
3310
|
+
"4xl": "text-4xl",
|
|
3311
|
+
// Maps to fontSize.4xl[0]
|
|
3312
|
+
"5xl": "text-5xl"
|
|
3313
|
+
// Maps to fontSize.5xl[0]
|
|
3103
3314
|
},
|
|
3104
3315
|
/**
|
|
3105
3316
|
* Font weights by weight variant
|
|
@@ -3124,6 +3335,8 @@ var TEXT_TOKENS = {
|
|
|
3124
3335
|
// Maps to lineHeight.none
|
|
3125
3336
|
tight: "leading-tight",
|
|
3126
3337
|
// Maps to lineHeight.tight
|
|
3338
|
+
snug: "leading-snug",
|
|
3339
|
+
// Maps to lineHeight.snug
|
|
3127
3340
|
normal: "leading-normal",
|
|
3128
3341
|
// Maps to lineHeight.normal
|
|
3129
3342
|
relaxed: "leading-relaxed",
|
|
@@ -3647,9 +3860,9 @@ var TOAST_TOKENS = {
|
|
|
3647
3860
|
// Default opacity (hidden)
|
|
3648
3861
|
groupHover: "group-hover:opacity-100",
|
|
3649
3862
|
// Visible on group hover
|
|
3650
|
-
focus: "focus:opacity-100",
|
|
3863
|
+
focus: "focus-visible:opacity-100",
|
|
3651
3864
|
// Visible on focus
|
|
3652
|
-
focusRing: "focus:outline-none focus:ring-1"
|
|
3865
|
+
focusRing: "focus-visible:outline-none focus-visible:ring-1"
|
|
3653
3866
|
// Focus ring styling
|
|
3654
3867
|
}
|
|
3655
3868
|
}
|
|
@@ -4405,13 +4618,13 @@ var DROPDOWN_TOKENS = {
|
|
|
4405
4618
|
*/
|
|
4406
4619
|
item: {
|
|
4407
4620
|
background: {
|
|
4408
|
-
focus: "focus:bg-[hsl(var(--accent))]",
|
|
4621
|
+
focus: "focus-visible:bg-[hsl(var(--accent))]",
|
|
4409
4622
|
// Focus background using CSS var
|
|
4410
4623
|
selected: "bg-[hsl(var(--accent))]"
|
|
4411
4624
|
// Selected background using CSS var
|
|
4412
4625
|
},
|
|
4413
4626
|
text: {
|
|
4414
|
-
focus: "focus:text-[hsl(var(--accent-foreground))]",
|
|
4627
|
+
focus: "focus-visible:text-[hsl(var(--accent-foreground))]",
|
|
4415
4628
|
// Focus text using CSS var
|
|
4416
4629
|
selected: "text-[hsl(var(--accent-foreground))]"
|
|
4417
4630
|
// Selected text using CSS var
|
|
@@ -4663,9 +4876,9 @@ var SELECT_TOKENS = {
|
|
|
4663
4876
|
indicator: {
|
|
4664
4877
|
size: "size-4"},
|
|
4665
4878
|
focus: {
|
|
4666
|
-
background: "focus:bg-[hsl(var(--accent))]",
|
|
4879
|
+
background: "focus-visible:bg-[hsl(var(--accent))]",
|
|
4667
4880
|
// Focus background using CSS var
|
|
4668
|
-
text: "focus:text-[hsl(var(--accent-foreground))]"
|
|
4881
|
+
text: "focus-visible:text-[hsl(var(--accent-foreground))]"
|
|
4669
4882
|
// Focus text using CSS var
|
|
4670
4883
|
},
|
|
4671
4884
|
disabled: {
|
|
@@ -5763,54 +5976,54 @@ var transitions = {
|
|
|
5763
5976
|
var keyframes = {
|
|
5764
5977
|
// Fade animations
|
|
5765
5978
|
fadeIn: {
|
|
5766
|
-
from: { opacity: 0 },
|
|
5767
|
-
to: { opacity: 1 }
|
|
5979
|
+
from: { opacity: "0" },
|
|
5980
|
+
to: { opacity: "1" }
|
|
5768
5981
|
},
|
|
5769
5982
|
fadeOut: {
|
|
5770
|
-
from: { opacity: 1 },
|
|
5771
|
-
to: { opacity: 0 }
|
|
5983
|
+
from: { opacity: "1" },
|
|
5984
|
+
to: { opacity: "0" }
|
|
5772
5985
|
},
|
|
5773
5986
|
// Slide animations
|
|
5774
5987
|
slideInUp: {
|
|
5775
|
-
from: { transform: "translateY(100%)", opacity: 0 },
|
|
5776
|
-
to: { transform: "translateY(0)", opacity: 1 }
|
|
5988
|
+
from: { transform: "translateY(100%)", opacity: "0" },
|
|
5989
|
+
to: { transform: "translateY(0)", opacity: "1" }
|
|
5777
5990
|
},
|
|
5778
5991
|
slideInDown: {
|
|
5779
|
-
from: { transform: "translateY(-100%)", opacity: 0 },
|
|
5780
|
-
to: { transform: "translateY(0)", opacity: 1 }
|
|
5992
|
+
from: { transform: "translateY(-100%)", opacity: "0" },
|
|
5993
|
+
to: { transform: "translateY(0)", opacity: "1" }
|
|
5781
5994
|
},
|
|
5782
5995
|
slideInLeft: {
|
|
5783
|
-
from: { transform: "translateX(-100%)", opacity: 0 },
|
|
5784
|
-
to: { transform: "translateX(0)", opacity: 1 }
|
|
5996
|
+
from: { transform: "translateX(-100%)", opacity: "0" },
|
|
5997
|
+
to: { transform: "translateX(0)", opacity: "1" }
|
|
5785
5998
|
},
|
|
5786
5999
|
slideInRight: {
|
|
5787
|
-
from: { transform: "translateX(100%)", opacity: 0 },
|
|
5788
|
-
to: { transform: "translateX(0)", opacity: 1 }
|
|
6000
|
+
from: { transform: "translateX(100%)", opacity: "0" },
|
|
6001
|
+
to: { transform: "translateX(0)", opacity: "1" }
|
|
5789
6002
|
},
|
|
5790
6003
|
slideOutUp: {
|
|
5791
|
-
from: { transform: "translateY(0)", opacity: 1 },
|
|
5792
|
-
to: { transform: "translateY(-100%)", opacity: 0 }
|
|
6004
|
+
from: { transform: "translateY(0)", opacity: "1" },
|
|
6005
|
+
to: { transform: "translateY(-100%)", opacity: "0" }
|
|
5793
6006
|
},
|
|
5794
6007
|
slideOutDown: {
|
|
5795
|
-
from: { transform: "translateY(0)", opacity: 1 },
|
|
5796
|
-
to: { transform: "translateY(100%)", opacity: 0 }
|
|
6008
|
+
from: { transform: "translateY(0)", opacity: "1" },
|
|
6009
|
+
to: { transform: "translateY(100%)", opacity: "0" }
|
|
5797
6010
|
},
|
|
5798
6011
|
slideOutLeft: {
|
|
5799
|
-
from: { transform: "translateX(0)", opacity: 1 },
|
|
5800
|
-
to: { transform: "translateX(-100%)", opacity: 0 }
|
|
6012
|
+
from: { transform: "translateX(0)", opacity: "1" },
|
|
6013
|
+
to: { transform: "translateX(-100%)", opacity: "0" }
|
|
5801
6014
|
},
|
|
5802
6015
|
slideOutRight: {
|
|
5803
|
-
from: { transform: "translateX(0)", opacity: 1 },
|
|
5804
|
-
to: { transform: "translateX(100%)", opacity: 0 }
|
|
6016
|
+
from: { transform: "translateX(0)", opacity: "1" },
|
|
6017
|
+
to: { transform: "translateX(100%)", opacity: "0" }
|
|
5805
6018
|
},
|
|
5806
6019
|
// Scale animations
|
|
5807
6020
|
scaleIn: {
|
|
5808
|
-
from: { transform: "scale(0.95)", opacity: 0 },
|
|
5809
|
-
to: { transform: "scale(1)", opacity: 1 }
|
|
6021
|
+
from: { transform: "scale(0.95)", opacity: "0" },
|
|
6022
|
+
to: { transform: "scale(1)", opacity: "1" }
|
|
5810
6023
|
},
|
|
5811
6024
|
scaleOut: {
|
|
5812
|
-
from: { transform: "scale(1)", opacity: 1 },
|
|
5813
|
-
to: { transform: "scale(0.95)", opacity: 0 }
|
|
6025
|
+
from: { transform: "scale(1)", opacity: "1" },
|
|
6026
|
+
to: { transform: "scale(0.95)", opacity: "0" }
|
|
5814
6027
|
},
|
|
5815
6028
|
scaleUp: {
|
|
5816
6029
|
from: { transform: "scale(1)" },
|
|
@@ -5831,8 +6044,8 @@ var keyframes = {
|
|
|
5831
6044
|
},
|
|
5832
6045
|
// Pulse and bounce
|
|
5833
6046
|
pulse: {
|
|
5834
|
-
"0%, 100%": { opacity: 1 },
|
|
5835
|
-
"50%": { opacity: 0.5 }
|
|
6047
|
+
"0%, 100%": { opacity: "1" },
|
|
6048
|
+
"50%": { opacity: "0.5" }
|
|
5836
6049
|
},
|
|
5837
6050
|
bounce: {
|
|
5838
6051
|
"0%, 100%": {
|
|
@@ -5854,7 +6067,7 @@ var keyframes = {
|
|
|
5854
6067
|
ping: {
|
|
5855
6068
|
"75%, 100%": {
|
|
5856
6069
|
transform: "scale(2)",
|
|
5857
|
-
opacity: 0
|
|
6070
|
+
opacity: "0"
|
|
5858
6071
|
}
|
|
5859
6072
|
},
|
|
5860
6073
|
// Accordion animations (for Radix UI)
|
|
@@ -6813,6 +7026,83 @@ var tokenSystemSummary = {
|
|
|
6813
7026
|
|
|
6814
7027
|
// src/tokens/theme.ts
|
|
6815
7028
|
var UI_COLORS = tailwindThemeColors;
|
|
7029
|
+
var FORBIDDEN_PATTERNS = [
|
|
7030
|
+
// Raw color utilities (bg-red-500, text-blue-600, etc.)
|
|
7031
|
+
// These are always forbidden as they bypass the color token system
|
|
7032
|
+
/\b(bg|text|border|ring|outline)-(red|blue|green|yellow|purple|pink|indigo|gray|slate|zinc|neutral|stone|orange|amber|emerald|teal|cyan|sky|violet|fuchsia|rose)-\d+/,
|
|
7033
|
+
// Raw spacing utilities with arbitrary numbers (p-4, m-2, gap-3, etc.)
|
|
7034
|
+
// Allow semantic spacing tokens (px-sm, py-md, etc.) which use token names
|
|
7035
|
+
/\b(p|m|px|py|pt|pb|pl|pr|mx|my|mt|mb|ml|mr|gap|space-[xy])-(\d+|\[)/,
|
|
7036
|
+
// Raw size utilities with arbitrary numbers (w-4, h-6, etc.)
|
|
7037
|
+
// Allow semantic size tokens (h-8, w-9, etc.) which are standard design system values
|
|
7038
|
+
// Only flag arbitrary values like w-[123px] or h-[calc(...)]
|
|
7039
|
+
/\b(w|h|min-w|min-h|max-w|max-h)-\[/
|
|
7040
|
+
];
|
|
7041
|
+
function validateTokenUsage(classes, context) {
|
|
7042
|
+
if (process.env.NODE_ENV === "production") {
|
|
7043
|
+
return;
|
|
7044
|
+
}
|
|
7045
|
+
for (const pattern of FORBIDDEN_PATTERNS) {
|
|
7046
|
+
if (pattern.test(classes)) {
|
|
7047
|
+
console.warn(
|
|
7048
|
+
`[tokenCVA] Potential hardcoded Tailwind utility detected in ${context}:
|
|
7049
|
+
"${classes}"
|
|
7050
|
+
Pattern: ${pattern}
|
|
7051
|
+
Please use token-based utilities instead (e.g., from component tokens).`
|
|
7052
|
+
);
|
|
7053
|
+
}
|
|
7054
|
+
}
|
|
7055
|
+
}
|
|
7056
|
+
function validateVariantConfig(value, path, visited = /* @__PURE__ */ new Set()) {
|
|
7057
|
+
if (value === void 0 || value === null) {
|
|
7058
|
+
return;
|
|
7059
|
+
}
|
|
7060
|
+
const key = `${path}-${String(value)}`;
|
|
7061
|
+
if (visited.has(key)) {
|
|
7062
|
+
return;
|
|
7063
|
+
}
|
|
7064
|
+
visited.add(key);
|
|
7065
|
+
if (typeof value === "string") {
|
|
7066
|
+
validateTokenUsage(value, path);
|
|
7067
|
+
} else if (Array.isArray(value)) {
|
|
7068
|
+
value.forEach((item, index2) => {
|
|
7069
|
+
validateVariantConfig(item, `${path}[${index2}]`, visited);
|
|
7070
|
+
});
|
|
7071
|
+
} else if (typeof value === "object") {
|
|
7072
|
+
Object.entries(value).forEach(([key2, val]) => {
|
|
7073
|
+
validateVariantConfig(val, `${path}.${key2}`, visited);
|
|
7074
|
+
});
|
|
7075
|
+
}
|
|
7076
|
+
}
|
|
7077
|
+
function tokenCVA(config) {
|
|
7078
|
+
if (process.env.NODE_ENV !== "production") {
|
|
7079
|
+
if (config.base) {
|
|
7080
|
+
validateVariantConfig(config.base, "base");
|
|
7081
|
+
}
|
|
7082
|
+
if (config.variants) {
|
|
7083
|
+
Object.entries(config.variants).forEach(([variantKey, variantValues]) => {
|
|
7084
|
+
Object.entries(variantValues).forEach(([valueKey, value]) => {
|
|
7085
|
+
validateVariantConfig(value, `variants.${variantKey}.${valueKey}`);
|
|
7086
|
+
});
|
|
7087
|
+
});
|
|
7088
|
+
}
|
|
7089
|
+
if (config.compoundVariants) {
|
|
7090
|
+
config.compoundVariants.forEach((compound, index2) => {
|
|
7091
|
+
if (compound.class) {
|
|
7092
|
+
validateVariantConfig(compound.class, `compoundVariants[${index2}].class`);
|
|
7093
|
+
}
|
|
7094
|
+
if (compound.className) {
|
|
7095
|
+
validateVariantConfig(compound.className, `compoundVariants[${index2}].className`);
|
|
7096
|
+
}
|
|
7097
|
+
});
|
|
7098
|
+
}
|
|
7099
|
+
}
|
|
7100
|
+
return classVarianceAuthority.cva(config.base, {
|
|
7101
|
+
variants: config.variants,
|
|
7102
|
+
compoundVariants: config.compoundVariants,
|
|
7103
|
+
defaultVariants: config.defaultVariants
|
|
7104
|
+
});
|
|
7105
|
+
}
|
|
6816
7106
|
function cn(...inputs) {
|
|
6817
7107
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
6818
7108
|
}
|
|
@@ -6823,38 +7113,92 @@ function formatDate(date) {
|
|
|
6823
7113
|
year: "numeric"
|
|
6824
7114
|
}).format(new Date(date));
|
|
6825
7115
|
}
|
|
6826
|
-
var buttonVariants =
|
|
6827
|
-
`inline-flex items-center justify-center
|
|
6828
|
-
{
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
destructive: `${BUTTON_TOKENS.variant.destructive.background} ${BUTTON_TOKENS.variant.destructive.text} ${BUTTON_TOKENS.shadow.default} ${BUTTON_TOKENS.variant.destructive.hover}`
|
|
6837
|
-
},
|
|
6838
|
-
size: {
|
|
6839
|
-
sm: `${BUTTON_TOKENS.height.sm} ${BUTTON_TOKENS.radius} ${BUTTON_TOKENS.padding.horizontal.sm} ${BUTTON_TOKENS.padding.vertical.sm} ${BUTTON_TOKENS.fontSize.sm}`,
|
|
6840
|
-
md: `${BUTTON_TOKENS.height.md} ${BUTTON_TOKENS.radius} ${BUTTON_TOKENS.padding.horizontal.md} ${BUTTON_TOKENS.padding.vertical.md} ${BUTTON_TOKENS.fontSize.md}`,
|
|
6841
|
-
lg: `${BUTTON_TOKENS.height.lg} ${BUTTON_TOKENS.radius} ${BUTTON_TOKENS.padding.horizontal.lg} ${BUTTON_TOKENS.padding.vertical.md} ${BUTTON_TOKENS.fontSize.lg}`,
|
|
6842
|
-
icon: `${BUTTON_TOKENS.height.icon} ${BUTTON_TOKENS.width.icon}`
|
|
6843
|
-
}
|
|
7116
|
+
var buttonVariants = tokenCVA({
|
|
7117
|
+
base: `inline-flex items-center justify-center whitespace-nowrap ${BUTTON_TOKENS.radius} font-medium ${BUTTON_TOKENS.transition.colors} ${BUTTON_TOKENS.state.focus.outline} ${BUTTON_TOKENS.state.focus.ring} ${BUTTON_TOKENS.state.disabled.cursor} ${BUTTON_TOKENS.state.disabled.pointerEvents} [&_svg]:pointer-events-none [&_svg]:shrink-0`,
|
|
7118
|
+
variants: {
|
|
7119
|
+
variant: {
|
|
7120
|
+
primary: `${BUTTON_TOKENS.variant.primary.background} ${BUTTON_TOKENS.variant.primary.text} ${BUTTON_TOKENS.shadow.primary} ${BUTTON_TOKENS.variant.primary.hover} ${BUTTON_TOKENS.variant.primary.active} ${BUTTON_TOKENS.variant.primary.focus} ${BUTTON_TOKENS.variant.primary.disabled.background} ${BUTTON_TOKENS.variant.primary.disabled.text}`,
|
|
7121
|
+
secondary: `${BUTTON_TOKENS.variant.secondary.background} ${BUTTON_TOKENS.variant.secondary.text} ${BUTTON_TOKENS.shadow.default} ${BUTTON_TOKENS.variant.secondary.hover} ${BUTTON_TOKENS.variant.secondary.active} ${BUTTON_TOKENS.variant.secondary.disabled.background} ${BUTTON_TOKENS.variant.secondary.disabled.text}`,
|
|
7122
|
+
accent: `${BUTTON_TOKENS.variant.accent.background} ${BUTTON_TOKENS.variant.accent.text} ${BUTTON_TOKENS.shadow.default} ${BUTTON_TOKENS.variant.accent.hover} ${BUTTON_TOKENS.variant.accent.active} ${BUTTON_TOKENS.variant.accent.disabled.background} ${BUTTON_TOKENS.variant.accent.disabled.text}`,
|
|
7123
|
+
outline: `${BUTTON_TOKENS.variant.outline.border} ${BUTTON_TOKENS.variant.outline.background} ${BUTTON_TOKENS.variant.outline.text} ${BUTTON_TOKENS.shadow.default} ${BUTTON_TOKENS.variant.outline.hover.background} ${BUTTON_TOKENS.variant.outline.hover.text} ${BUTTON_TOKENS.variant.outline.hover.border} ${BUTTON_TOKENS.variant.outline.active.background} ${BUTTON_TOKENS.variant.outline.active.text} ${BUTTON_TOKENS.variant.outline.active.border} ${BUTTON_TOKENS.variant.outline.disabled.background} ${BUTTON_TOKENS.variant.outline.disabled.text} ${BUTTON_TOKENS.variant.outline.disabled.border}`,
|
|
7124
|
+
ghost: `${BUTTON_TOKENS.variant.ghost.background} ${BUTTON_TOKENS.variant.ghost.text} ${BUTTON_TOKENS.variant.ghost.hover.background} ${BUTTON_TOKENS.variant.ghost.hover.text} ${BUTTON_TOKENS.variant.ghost.active.background} ${BUTTON_TOKENS.variant.ghost.active.text} ${BUTTON_TOKENS.variant.ghost.disabled.background} ${BUTTON_TOKENS.variant.ghost.disabled.text}`,
|
|
7125
|
+
destructive: `${BUTTON_TOKENS.variant.destructive.background} ${BUTTON_TOKENS.variant.destructive.text} ${BUTTON_TOKENS.shadow.default} ${BUTTON_TOKENS.variant.destructive.hover} ${BUTTON_TOKENS.variant.destructive.active} ${BUTTON_TOKENS.variant.destructive.disabled.background} ${BUTTON_TOKENS.variant.destructive.disabled.text}`
|
|
6844
7126
|
},
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
7127
|
+
size: {
|
|
7128
|
+
sm: `${BUTTON_TOKENS.height.sm} ${BUTTON_TOKENS.radius} ${BUTTON_TOKENS.padding.horizontal.sm} ${BUTTON_TOKENS.padding.vertical.sm} ${BUTTON_TOKENS.fontSize.sm} ${BUTTON_TOKENS.gap.sm} [&_svg]:${BUTTON_TOKENS.iconSize.sm}`,
|
|
7129
|
+
md: `${BUTTON_TOKENS.height.md} ${BUTTON_TOKENS.radius} ${BUTTON_TOKENS.padding.horizontal.md} ${BUTTON_TOKENS.padding.vertical.md} ${BUTTON_TOKENS.fontSize.md} ${BUTTON_TOKENS.gap.md} [&_svg]:${BUTTON_TOKENS.iconSize.md}`,
|
|
7130
|
+
lg: `${BUTTON_TOKENS.height.lg} ${BUTTON_TOKENS.radius} ${BUTTON_TOKENS.padding.horizontal.lg} ${BUTTON_TOKENS.padding.vertical.md} ${BUTTON_TOKENS.fontSize.lg} ${BUTTON_TOKENS.gap.lg} [&_svg]:${BUTTON_TOKENS.iconSize.lg}`,
|
|
7131
|
+
icon: `${BUTTON_TOKENS.height.icon} ${BUTTON_TOKENS.width.icon} [&_svg]:${BUTTON_TOKENS.iconSize.icon}`
|
|
6848
7132
|
}
|
|
7133
|
+
},
|
|
7134
|
+
defaultVariants: {
|
|
7135
|
+
variant: "primary",
|
|
7136
|
+
size: "md"
|
|
6849
7137
|
}
|
|
6850
|
-
);
|
|
7138
|
+
});
|
|
6851
7139
|
var Button = React49__namespace.forwardRef(
|
|
6852
7140
|
({ className, variant, size: size3, asChild = false, leftIcon, rightIcon, children, ...props }, ref) => {
|
|
6853
7141
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
6854
|
-
|
|
6855
|
-
|
|
7142
|
+
const finalClassName = cn(buttonVariants({ variant, size: size3, className }));
|
|
7143
|
+
const iconSizeMap = {
|
|
7144
|
+
"size-3.5": "[&_svg]:w-3.5 [&_svg]:h-3.5",
|
|
7145
|
+
"size-4": "[&_svg]:w-4 [&_svg]:h-4",
|
|
7146
|
+
"size-5": "[&_svg]:w-5 [&_svg]:h-5"
|
|
7147
|
+
};
|
|
7148
|
+
const iconSizeToken = size3 ? BUTTON_TOKENS.iconSize[size3] : BUTTON_TOKENS.iconSize.md;
|
|
7149
|
+
const iconSizeClass = iconSizeMap[iconSizeToken] || "[&_svg]:w-4 [&_svg]:h-4";
|
|
7150
|
+
if (typeof window !== "undefined" && variant === "primary") {
|
|
7151
|
+
const hasHoverClass = finalClassName.includes(
|
|
7152
|
+
"hover:bg-[hsl(var(--button-primary-hover-bg))]"
|
|
7153
|
+
);
|
|
7154
|
+
const hasActiveClass = finalClassName.includes(
|
|
7155
|
+
"active:bg-[hsl(var(--button-primary-active-bg))]"
|
|
7156
|
+
);
|
|
7157
|
+
fetch("http://127.0.0.1:7243/ingest/ff5d1e20-0815-4ca0-af82-fcbd3cfa35b1", {
|
|
7158
|
+
method: "POST",
|
|
7159
|
+
headers: { "Content-Type": "application/json" },
|
|
7160
|
+
body: JSON.stringify({
|
|
7161
|
+
location: "button.tsx:137",
|
|
7162
|
+
message: "Button className check (State Authority Contract)",
|
|
7163
|
+
data: {
|
|
7164
|
+
variant,
|
|
7165
|
+
size: size3,
|
|
7166
|
+
className: finalClassName,
|
|
7167
|
+
hasHoverClass,
|
|
7168
|
+
hasActiveClass,
|
|
7169
|
+
hoverClassInString: finalClassName.includes("hover"),
|
|
7170
|
+
allClasses: finalClassName.split(" ").filter((c) => c.includes("hover") || c.includes("active") || c.includes("disabled"))
|
|
7171
|
+
},
|
|
7172
|
+
timestamp: Date.now(),
|
|
7173
|
+
sessionId: "debug-session",
|
|
7174
|
+
runId: "state-authority-contract",
|
|
7175
|
+
hypothesisId: "A"
|
|
7176
|
+
})
|
|
7177
|
+
}).catch(() => {
|
|
7178
|
+
});
|
|
7179
|
+
}
|
|
7180
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Comp, { className: finalClassName, ref, ...props, children: [
|
|
7181
|
+
leftIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7182
|
+
"span",
|
|
7183
|
+
{
|
|
7184
|
+
className: cn(
|
|
7185
|
+
"pointer-events-none relative z-10 inline-flex items-center [&_svg]:text-current",
|
|
7186
|
+
iconSizeClass
|
|
7187
|
+
),
|
|
7188
|
+
children: leftIcon
|
|
7189
|
+
}
|
|
7190
|
+
),
|
|
6856
7191
|
children,
|
|
6857
|
-
rightIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7192
|
+
rightIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7193
|
+
"span",
|
|
7194
|
+
{
|
|
7195
|
+
className: cn(
|
|
7196
|
+
"pointer-events-none relative z-10 inline-flex items-center [&_svg]:text-current",
|
|
7197
|
+
iconSizeClass
|
|
7198
|
+
),
|
|
7199
|
+
children: rightIcon
|
|
7200
|
+
}
|
|
7201
|
+
)
|
|
6858
7202
|
] });
|
|
6859
7203
|
}
|
|
6860
7204
|
);
|
|
@@ -6949,14 +7293,14 @@ Alert.displayName = "Alert";
|
|
|
6949
7293
|
var bodyVariants = classVarianceAuthority.cva("font-sans text-foreground", {
|
|
6950
7294
|
variants: {
|
|
6951
7295
|
size: {
|
|
6952
|
-
md:
|
|
6953
|
-
lg:
|
|
7296
|
+
md: `${TEXT_TOKENS.fontSize.md} ${TEXT_TOKENS.lineHeight.relaxed} ${TEXT_TOKENS.letterSpacing.normal}`,
|
|
7297
|
+
lg: `${TEXT_TOKENS.fontSize.lg} ${TEXT_TOKENS.lineHeight.relaxed} ${TEXT_TOKENS.letterSpacing.normal}`
|
|
6954
7298
|
},
|
|
6955
7299
|
weight: {
|
|
6956
|
-
normal:
|
|
6957
|
-
medium:
|
|
6958
|
-
semibold:
|
|
6959
|
-
bold:
|
|
7300
|
+
normal: TEXT_TOKENS.fontWeight.normal,
|
|
7301
|
+
medium: TEXT_TOKENS.fontWeight.medium,
|
|
7302
|
+
semibold: TEXT_TOKENS.fontWeight.semibold,
|
|
7303
|
+
bold: TEXT_TOKENS.fontWeight.bold
|
|
6960
7304
|
},
|
|
6961
7305
|
muted: {
|
|
6962
7306
|
true: "text-muted-foreground",
|
|
@@ -6984,22 +7328,31 @@ var Body = React49__namespace.forwardRef(
|
|
|
6984
7328
|
}
|
|
6985
7329
|
);
|
|
6986
7330
|
Body.displayName = "Body";
|
|
6987
|
-
var captionVariants = classVarianceAuthority.cva(
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
7331
|
+
var captionVariants = classVarianceAuthority.cva(
|
|
7332
|
+
[
|
|
7333
|
+
"font-sans",
|
|
7334
|
+
"text-foreground",
|
|
7335
|
+
TEXT_TOKENS.fontSize.xs,
|
|
7336
|
+
TEXT_TOKENS.lineHeight.tight,
|
|
7337
|
+
TEXT_TOKENS.letterSpacing.wide
|
|
7338
|
+
].filter(Boolean).join(" "),
|
|
7339
|
+
{
|
|
7340
|
+
variants: {
|
|
7341
|
+
weight: {
|
|
7342
|
+
normal: TEXT_TOKENS.fontWeight.normal,
|
|
7343
|
+
medium: TEXT_TOKENS.fontWeight.medium
|
|
7344
|
+
},
|
|
7345
|
+
muted: {
|
|
7346
|
+
true: "text-muted-foreground",
|
|
7347
|
+
false: ""
|
|
7348
|
+
}
|
|
6992
7349
|
},
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
7350
|
+
defaultVariants: {
|
|
7351
|
+
weight: "normal",
|
|
7352
|
+
muted: true
|
|
6996
7353
|
}
|
|
6997
|
-
},
|
|
6998
|
-
defaultVariants: {
|
|
6999
|
-
weight: "normal",
|
|
7000
|
-
muted: true
|
|
7001
7354
|
}
|
|
7002
|
-
|
|
7355
|
+
);
|
|
7003
7356
|
var Caption = React49__namespace.forwardRef(
|
|
7004
7357
|
({ className, weight, muted, as = "span", children, ...props }, ref) => {
|
|
7005
7358
|
const Component = as;
|
|
@@ -7007,11 +7360,7 @@ var Caption = React49__namespace.forwardRef(
|
|
|
7007
7360
|
Component,
|
|
7008
7361
|
{
|
|
7009
7362
|
ref,
|
|
7010
|
-
className: cn(
|
|
7011
|
-
"text-xs leading-tight tracking-wide",
|
|
7012
|
-
captionVariants({ weight, muted }),
|
|
7013
|
-
className
|
|
7014
|
-
),
|
|
7363
|
+
className: cn(captionVariants({ weight, muted }), className),
|
|
7015
7364
|
...props,
|
|
7016
7365
|
children
|
|
7017
7366
|
}
|
|
@@ -7019,11 +7368,43 @@ var Caption = React49__namespace.forwardRef(
|
|
|
7019
7368
|
}
|
|
7020
7369
|
);
|
|
7021
7370
|
Caption.displayName = "Caption";
|
|
7371
|
+
|
|
7372
|
+
// src/tokens/components/code.ts
|
|
7373
|
+
var CODE_TOKENS = {
|
|
7374
|
+
/**
|
|
7375
|
+
* Background color tokens
|
|
7376
|
+
* Uses semantic color tokens
|
|
7377
|
+
*/
|
|
7378
|
+
background: {
|
|
7379
|
+
muted: "bg-muted"
|
|
7380
|
+
// Muted background for code blocks
|
|
7381
|
+
},
|
|
7382
|
+
/**
|
|
7383
|
+
* Border radius tokens
|
|
7384
|
+
* Maps to foundation borderRadius tokens
|
|
7385
|
+
*/
|
|
7386
|
+
radius: {
|
|
7387
|
+
inline: "rounded",
|
|
7388
|
+
// Small radius for inline code
|
|
7389
|
+
block: "rounded-md"
|
|
7390
|
+
// Medium radius for code blocks
|
|
7391
|
+
},
|
|
7392
|
+
/**
|
|
7393
|
+
* Padding tokens
|
|
7394
|
+
* Maps to foundation spacing tokens
|
|
7395
|
+
*/
|
|
7396
|
+
padding: {
|
|
7397
|
+
inline: "px-xs py-0.5",
|
|
7398
|
+
// 4px horizontal, 4px vertical for inline code
|
|
7399
|
+
block: "p-md"
|
|
7400
|
+
// 16px padding for code blocks
|
|
7401
|
+
}
|
|
7402
|
+
};
|
|
7022
7403
|
var codeVariants = classVarianceAuthority.cva("font-mono text-foreground", {
|
|
7023
7404
|
variants: {
|
|
7024
7405
|
variant: {
|
|
7025
|
-
inline:
|
|
7026
|
-
block:
|
|
7406
|
+
inline: `${CODE_TOKENS.radius.inline} ${CODE_TOKENS.background.muted} ${CODE_TOKENS.padding.inline} ${TEXT_TOKENS.fontSize.sm} ${TEXT_TOKENS.fontWeight.semibold}`,
|
|
7407
|
+
block: `block ${CODE_TOKENS.radius.block} ${CODE_TOKENS.background.muted} ${CODE_TOKENS.padding.block} ${TEXT_TOKENS.fontSize.sm} ${TEXT_TOKENS.fontWeight.semibold}`
|
|
7027
7408
|
},
|
|
7028
7409
|
muted: {
|
|
7029
7410
|
true: "text-muted-foreground",
|
|
@@ -7053,16 +7434,16 @@ Code.displayName = "Code";
|
|
|
7053
7434
|
var displayVariants = classVarianceAuthority.cva("font-display text-foreground", {
|
|
7054
7435
|
variants: {
|
|
7055
7436
|
size: {
|
|
7056
|
-
xl:
|
|
7057
|
-
"2xl": "
|
|
7058
|
-
"3xl": "
|
|
7059
|
-
"4xl": "
|
|
7437
|
+
xl: `${TEXT_TOKENS.fontSize.xl} ${TEXT_TOKENS.lineHeight.normal} ${TEXT_TOKENS.letterSpacing.normal}`,
|
|
7438
|
+
"2xl": `${TEXT_TOKENS.fontSize["2xl"]} ${TEXT_TOKENS.lineHeight.tight} ${TEXT_TOKENS.letterSpacing.tight}`,
|
|
7439
|
+
"3xl": `${TEXT_TOKENS.fontSize["3xl"]} ${TEXT_TOKENS.lineHeight.tight} ${TEXT_TOKENS.letterSpacing.tight}`,
|
|
7440
|
+
"4xl": `${TEXT_TOKENS.fontSize["4xl"]} ${TEXT_TOKENS.lineHeight.none} ${TEXT_TOKENS.letterSpacing.tight}`
|
|
7060
7441
|
},
|
|
7061
7442
|
weight: {
|
|
7062
|
-
normal:
|
|
7063
|
-
medium:
|
|
7064
|
-
semibold:
|
|
7065
|
-
bold:
|
|
7443
|
+
normal: TEXT_TOKENS.fontWeight.normal,
|
|
7444
|
+
medium: TEXT_TOKENS.fontWeight.medium,
|
|
7445
|
+
semibold: TEXT_TOKENS.fontWeight.semibold,
|
|
7446
|
+
bold: TEXT_TOKENS.fontWeight.bold
|
|
7066
7447
|
},
|
|
7067
7448
|
muted: {
|
|
7068
7449
|
true: "text-muted-foreground",
|
|
@@ -7094,149 +7475,87 @@ var Display = React49__namespace.forwardRef(
|
|
|
7094
7475
|
}
|
|
7095
7476
|
);
|
|
7096
7477
|
Display.displayName = "Display";
|
|
7478
|
+
var levelConfig = {
|
|
7479
|
+
1: [
|
|
7480
|
+
TEXT_TOKENS.fontSize["5xl"],
|
|
7481
|
+
TEXT_TOKENS.fontWeight.bold,
|
|
7482
|
+
TEXT_TOKENS.lineHeight.tight,
|
|
7483
|
+
TEXT_TOKENS.letterSpacing.tight
|
|
7484
|
+
],
|
|
7485
|
+
2: [
|
|
7486
|
+
TEXT_TOKENS.fontSize["4xl"],
|
|
7487
|
+
TEXT_TOKENS.fontWeight.bold,
|
|
7488
|
+
TEXT_TOKENS.lineHeight.tight,
|
|
7489
|
+
TEXT_TOKENS.letterSpacing.tight
|
|
7490
|
+
],
|
|
7491
|
+
3: [
|
|
7492
|
+
TEXT_TOKENS.fontSize["3xl"],
|
|
7493
|
+
TEXT_TOKENS.fontWeight.semibold,
|
|
7494
|
+
TEXT_TOKENS.lineHeight.snug,
|
|
7495
|
+
TEXT_TOKENS.letterSpacing.normal
|
|
7496
|
+
],
|
|
7497
|
+
4: [
|
|
7498
|
+
TEXT_TOKENS.fontSize["2xl"],
|
|
7499
|
+
TEXT_TOKENS.fontWeight.semibold,
|
|
7500
|
+
TEXT_TOKENS.lineHeight.snug,
|
|
7501
|
+
TEXT_TOKENS.letterSpacing.normal
|
|
7502
|
+
],
|
|
7503
|
+
5: [
|
|
7504
|
+
TEXT_TOKENS.fontSize.xl,
|
|
7505
|
+
TEXT_TOKENS.fontWeight.medium,
|
|
7506
|
+
TEXT_TOKENS.lineHeight.normal,
|
|
7507
|
+
TEXT_TOKENS.letterSpacing.normal
|
|
7508
|
+
],
|
|
7509
|
+
6: [
|
|
7510
|
+
TEXT_TOKENS.fontSize.lg,
|
|
7511
|
+
TEXT_TOKENS.fontWeight.medium,
|
|
7512
|
+
TEXT_TOKENS.lineHeight.normal,
|
|
7513
|
+
TEXT_TOKENS.letterSpacing.normal
|
|
7514
|
+
]
|
|
7515
|
+
};
|
|
7516
|
+
var levelVariants = Object.entries(levelConfig).reduce(
|
|
7517
|
+
(acc, [level, [fontSize2, defaultWeight, lineHeight2, letterSpacing2]]) => {
|
|
7518
|
+
acc[Number(level)] = `${fontSize2} ${defaultWeight} ${lineHeight2} ${letterSpacing2}`;
|
|
7519
|
+
return acc;
|
|
7520
|
+
},
|
|
7521
|
+
{}
|
|
7522
|
+
);
|
|
7523
|
+
var generateWeightVariants = () => {
|
|
7524
|
+
const weights = [
|
|
7525
|
+
"normal",
|
|
7526
|
+
"medium",
|
|
7527
|
+
"semibold",
|
|
7528
|
+
"bold"
|
|
7529
|
+
];
|
|
7530
|
+
const levels = [1, 2, 3, 4, 5, 6];
|
|
7531
|
+
const variants = [];
|
|
7532
|
+
for (const level of levels) {
|
|
7533
|
+
const [fontSize2, , lineHeight2, letterSpacing2] = levelConfig[level];
|
|
7534
|
+
for (const weight of weights) {
|
|
7535
|
+
variants.push({
|
|
7536
|
+
level,
|
|
7537
|
+
weight,
|
|
7538
|
+
class: `${fontSize2} ${TEXT_TOKENS.fontWeight[weight]} ${lineHeight2} ${letterSpacing2}`
|
|
7539
|
+
});
|
|
7540
|
+
}
|
|
7541
|
+
}
|
|
7542
|
+
return variants;
|
|
7543
|
+
};
|
|
7097
7544
|
var headingVariants = classVarianceAuthority.cva("font-display text-foreground", {
|
|
7098
7545
|
variants: {
|
|
7099
|
-
level:
|
|
7100
|
-
1: "text-5xl font-bold leading-tight tracking-tight",
|
|
7101
|
-
2: "text-4xl font-bold leading-tight tracking-tight",
|
|
7102
|
-
3: "text-3xl font-semibold leading-snug tracking-normal",
|
|
7103
|
-
4: "text-2xl font-semibold leading-snug tracking-normal",
|
|
7104
|
-
5: "text-xl font-medium leading-normal tracking-normal",
|
|
7105
|
-
6: "text-lg font-medium leading-normal tracking-normal"
|
|
7106
|
-
},
|
|
7546
|
+
level: levelVariants,
|
|
7107
7547
|
weight: {
|
|
7108
|
-
normal:
|
|
7109
|
-
medium:
|
|
7110
|
-
semibold:
|
|
7111
|
-
bold:
|
|
7548
|
+
normal: TEXT_TOKENS.fontWeight.normal,
|
|
7549
|
+
medium: TEXT_TOKENS.fontWeight.medium,
|
|
7550
|
+
semibold: TEXT_TOKENS.fontWeight.semibold,
|
|
7551
|
+
bold: TEXT_TOKENS.fontWeight.bold
|
|
7112
7552
|
},
|
|
7113
7553
|
muted: {
|
|
7114
7554
|
true: "text-muted-foreground",
|
|
7115
7555
|
false: ""
|
|
7116
7556
|
}
|
|
7117
7557
|
},
|
|
7118
|
-
compoundVariants:
|
|
7119
|
-
{
|
|
7120
|
-
level: 1,
|
|
7121
|
-
weight: "normal",
|
|
7122
|
-
class: "text-5xl font-normal"
|
|
7123
|
-
},
|
|
7124
|
-
{
|
|
7125
|
-
level: 1,
|
|
7126
|
-
weight: "medium",
|
|
7127
|
-
class: "text-5xl font-medium"
|
|
7128
|
-
},
|
|
7129
|
-
{
|
|
7130
|
-
level: 1,
|
|
7131
|
-
weight: "semibold",
|
|
7132
|
-
class: "text-5xl font-semibold"
|
|
7133
|
-
},
|
|
7134
|
-
{
|
|
7135
|
-
level: 1,
|
|
7136
|
-
weight: "bold",
|
|
7137
|
-
class: "text-5xl font-bold"
|
|
7138
|
-
},
|
|
7139
|
-
{
|
|
7140
|
-
level: 2,
|
|
7141
|
-
weight: "normal",
|
|
7142
|
-
class: "text-4xl font-normal"
|
|
7143
|
-
},
|
|
7144
|
-
{
|
|
7145
|
-
level: 2,
|
|
7146
|
-
weight: "medium",
|
|
7147
|
-
class: "text-4xl font-medium"
|
|
7148
|
-
},
|
|
7149
|
-
{
|
|
7150
|
-
level: 2,
|
|
7151
|
-
weight: "semibold",
|
|
7152
|
-
class: "text-4xl font-semibold"
|
|
7153
|
-
},
|
|
7154
|
-
{
|
|
7155
|
-
level: 2,
|
|
7156
|
-
weight: "bold",
|
|
7157
|
-
class: "text-4xl font-bold"
|
|
7158
|
-
},
|
|
7159
|
-
{
|
|
7160
|
-
level: 3,
|
|
7161
|
-
weight: "normal",
|
|
7162
|
-
class: "text-3xl font-normal"
|
|
7163
|
-
},
|
|
7164
|
-
{
|
|
7165
|
-
level: 3,
|
|
7166
|
-
weight: "medium",
|
|
7167
|
-
class: "text-3xl font-medium"
|
|
7168
|
-
},
|
|
7169
|
-
{
|
|
7170
|
-
level: 3,
|
|
7171
|
-
weight: "semibold",
|
|
7172
|
-
class: "text-3xl font-semibold"
|
|
7173
|
-
},
|
|
7174
|
-
{
|
|
7175
|
-
level: 3,
|
|
7176
|
-
weight: "bold",
|
|
7177
|
-
class: "text-3xl font-bold"
|
|
7178
|
-
},
|
|
7179
|
-
{
|
|
7180
|
-
level: 4,
|
|
7181
|
-
weight: "normal",
|
|
7182
|
-
class: "text-2xl font-normal"
|
|
7183
|
-
},
|
|
7184
|
-
{
|
|
7185
|
-
level: 4,
|
|
7186
|
-
weight: "medium",
|
|
7187
|
-
class: "text-2xl font-medium"
|
|
7188
|
-
},
|
|
7189
|
-
{
|
|
7190
|
-
level: 4,
|
|
7191
|
-
weight: "semibold",
|
|
7192
|
-
class: "text-2xl font-semibold"
|
|
7193
|
-
},
|
|
7194
|
-
{
|
|
7195
|
-
level: 4,
|
|
7196
|
-
weight: "bold",
|
|
7197
|
-
class: "text-2xl font-bold"
|
|
7198
|
-
},
|
|
7199
|
-
{
|
|
7200
|
-
level: 5,
|
|
7201
|
-
weight: "normal",
|
|
7202
|
-
class: "text-xl font-normal"
|
|
7203
|
-
},
|
|
7204
|
-
{
|
|
7205
|
-
level: 5,
|
|
7206
|
-
weight: "medium",
|
|
7207
|
-
class: "text-xl font-medium"
|
|
7208
|
-
},
|
|
7209
|
-
{
|
|
7210
|
-
level: 5,
|
|
7211
|
-
weight: "semibold",
|
|
7212
|
-
class: "text-xl font-semibold"
|
|
7213
|
-
},
|
|
7214
|
-
{
|
|
7215
|
-
level: 5,
|
|
7216
|
-
weight: "bold",
|
|
7217
|
-
class: "text-xl font-bold"
|
|
7218
|
-
},
|
|
7219
|
-
{
|
|
7220
|
-
level: 6,
|
|
7221
|
-
weight: "normal",
|
|
7222
|
-
class: "text-lg font-normal"
|
|
7223
|
-
},
|
|
7224
|
-
{
|
|
7225
|
-
level: 6,
|
|
7226
|
-
weight: "medium",
|
|
7227
|
-
class: "text-lg font-medium"
|
|
7228
|
-
},
|
|
7229
|
-
{
|
|
7230
|
-
level: 6,
|
|
7231
|
-
weight: "semibold",
|
|
7232
|
-
class: "text-lg font-semibold"
|
|
7233
|
-
},
|
|
7234
|
-
{
|
|
7235
|
-
level: 6,
|
|
7236
|
-
weight: "bold",
|
|
7237
|
-
class: "text-lg font-bold"
|
|
7238
|
-
}
|
|
7239
|
-
],
|
|
7558
|
+
compoundVariants: generateWeightVariants(),
|
|
7240
7559
|
defaultVariants: {
|
|
7241
7560
|
level: 1,
|
|
7242
7561
|
muted: false
|
|
@@ -7260,8 +7579,8 @@ Heading.displayName = "Heading";
|
|
|
7260
7579
|
var leadVariants = classVarianceAuthority.cva("font-sans text-foreground", {
|
|
7261
7580
|
variants: {
|
|
7262
7581
|
size: {
|
|
7263
|
-
lg:
|
|
7264
|
-
xl:
|
|
7582
|
+
lg: `${TEXT_TOKENS.fontSize.lg} ${TEXT_TOKENS.lineHeight.normal} ${TEXT_TOKENS.letterSpacing.normal}`,
|
|
7583
|
+
xl: `${TEXT_TOKENS.fontSize.xl} ${TEXT_TOKENS.lineHeight.normal} ${TEXT_TOKENS.letterSpacing.normal}`
|
|
7265
7584
|
},
|
|
7266
7585
|
muted: {
|
|
7267
7586
|
true: "text-muted-foreground",
|
|
@@ -7398,7 +7717,7 @@ function getSpacingPx(token) {
|
|
|
7398
7717
|
return 4;
|
|
7399
7718
|
}
|
|
7400
7719
|
var selectTriggerVariants = classVarianceAuthority.cva(
|
|
7401
|
-
`flex items-center justify-between outline-none ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed [&>span]:line-clamp-1`,
|
|
7720
|
+
`flex items-center justify-between outline-none ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed [&>span]:line-clamp-1`,
|
|
7402
7721
|
{
|
|
7403
7722
|
variants: {
|
|
7404
7723
|
size: {
|
|
@@ -7857,7 +8176,7 @@ var ModalClose = React49__namespace.forwardRef(
|
|
|
7857
8176
|
MODAL_TOKENS.close.radius,
|
|
7858
8177
|
MODAL_TOKENS.close.opacity.default,
|
|
7859
8178
|
MODAL_TOKENS.close.opacity.hover,
|
|
7860
|
-
"ring-offset-background transition-opacity focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
8179
|
+
"ring-offset-background transition-opacity focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
7861
8180
|
className
|
|
7862
8181
|
),
|
|
7863
8182
|
...props,
|
|
@@ -8449,8 +8768,10 @@ var Input = React49__namespace.forwardRef(
|
|
|
8449
8768
|
}
|
|
8450
8769
|
return void 0;
|
|
8451
8770
|
});
|
|
8771
|
+
const baseVariant = getBaseValue(variant);
|
|
8772
|
+
const baseSize = getBaseValue(size3);
|
|
8452
8773
|
const inputClasses = cn(
|
|
8453
|
-
inputVariants({ variant, size:
|
|
8774
|
+
inputVariants({ variant: baseVariant, size: baseSize, state, fullWidth }),
|
|
8454
8775
|
// Add padding for icons if present
|
|
8455
8776
|
iconLeft && INPUT_TOKENS.icon.paddingLeft,
|
|
8456
8777
|
iconRight && INPUT_TOKENS.icon.paddingRight,
|
|
@@ -8915,45 +9236,6 @@ function shadowToClass(value) {
|
|
|
8915
9236
|
if (!value || value === "none") return void 0;
|
|
8916
9237
|
return `shadow-${value}`;
|
|
8917
9238
|
}
|
|
8918
|
-
function displayToClass(value) {
|
|
8919
|
-
if (!value) return void 0;
|
|
8920
|
-
if (value === "inline") return "inline";
|
|
8921
|
-
if (value === "inline-block") return "inline-block";
|
|
8922
|
-
if (value === "flex") return "flex";
|
|
8923
|
-
if (value === "inline-flex") return "inline-flex";
|
|
8924
|
-
if (value === "grid") return "grid";
|
|
8925
|
-
if (value === "inline-grid") return "inline-grid";
|
|
8926
|
-
if (value === "block") return "block";
|
|
8927
|
-
if (value === "none") return "hidden";
|
|
8928
|
-
return void 0;
|
|
8929
|
-
}
|
|
8930
|
-
function flexDirectionToClass(value) {
|
|
8931
|
-
if (!value) return void 0;
|
|
8932
|
-
if (value === "row") return "flex-row";
|
|
8933
|
-
if (value === "column") return "flex-col";
|
|
8934
|
-
if (value === "row-reverse") return "flex-row-reverse";
|
|
8935
|
-
if (value === "column-reverse") return "flex-col-reverse";
|
|
8936
|
-
return void 0;
|
|
8937
|
-
}
|
|
8938
|
-
function alignToClass(value) {
|
|
8939
|
-
if (!value) return void 0;
|
|
8940
|
-
if (value === "start") return "items-start";
|
|
8941
|
-
if (value === "end") return "items-end";
|
|
8942
|
-
if (value === "center") return "items-center";
|
|
8943
|
-
if (value === "baseline") return "items-baseline";
|
|
8944
|
-
if (value === "stretch") return "items-stretch";
|
|
8945
|
-
return void 0;
|
|
8946
|
-
}
|
|
8947
|
-
function justifyToClass(value) {
|
|
8948
|
-
if (!value) return void 0;
|
|
8949
|
-
if (value === "start") return "justify-start";
|
|
8950
|
-
if (value === "end") return "justify-end";
|
|
8951
|
-
if (value === "center") return "justify-center";
|
|
8952
|
-
if (value === "between") return "justify-between";
|
|
8953
|
-
if (value === "around") return "justify-around";
|
|
8954
|
-
if (value === "evenly") return "justify-evenly";
|
|
8955
|
-
return void 0;
|
|
8956
|
-
}
|
|
8957
9239
|
var Box = React49__namespace.forwardRef(
|
|
8958
9240
|
({
|
|
8959
9241
|
as: Component = "div",
|
|
@@ -8971,14 +9253,9 @@ var Box = React49__namespace.forwardRef(
|
|
|
8971
9253
|
mr,
|
|
8972
9254
|
mb,
|
|
8973
9255
|
ml,
|
|
8974
|
-
display,
|
|
8975
|
-
flexDirection,
|
|
8976
9256
|
radius,
|
|
8977
9257
|
shadow,
|
|
8978
9258
|
bg,
|
|
8979
|
-
gap,
|
|
8980
|
-
align,
|
|
8981
|
-
justify,
|
|
8982
9259
|
className,
|
|
8983
9260
|
style,
|
|
8984
9261
|
...props
|
|
@@ -8999,7 +9276,6 @@ var Box = React49__namespace.forwardRef(
|
|
|
8999
9276
|
const mlValue = getBaseValue2(ml);
|
|
9000
9277
|
const radiusValue = getBaseValue2(radius);
|
|
9001
9278
|
const bgValue = getBaseValue2(bg);
|
|
9002
|
-
const gapValue = getBaseValue2(gap);
|
|
9003
9279
|
const inlineStyles = {
|
|
9004
9280
|
...pValue !== void 0 && { padding: getSpacingCSSVar(String(pValue)) },
|
|
9005
9281
|
...!p && pxValue !== void 0 && {
|
|
@@ -9029,18 +9305,9 @@ var Box = React49__namespace.forwardRef(
|
|
|
9029
9305
|
...!m && !mx && mlValue !== void 0 && { marginLeft: getSpacingCSSVar(String(mlValue)) },
|
|
9030
9306
|
...radiusValue !== void 0 && { borderRadius: getRadiusCSSVar(radiusValue) },
|
|
9031
9307
|
...bgValue !== void 0 && { backgroundColor: getColorCSSVar(bgValue) },
|
|
9032
|
-
...gapValue !== void 0 && { gap: getSpacingCSSVar(String(gapValue)) },
|
|
9033
9308
|
...style
|
|
9034
9309
|
};
|
|
9035
9310
|
const classes = cn(
|
|
9036
|
-
// Display
|
|
9037
|
-
displayToClass(display),
|
|
9038
|
-
// Flex direction
|
|
9039
|
-
flexDirectionToClass(flexDirection),
|
|
9040
|
-
// Align
|
|
9041
|
-
alignToClass(align),
|
|
9042
|
-
// Justify
|
|
9043
|
-
justifyToClass(justify),
|
|
9044
9311
|
// Shadow
|
|
9045
9312
|
shadowToClass(shadow),
|
|
9046
9313
|
className
|
|
@@ -9051,18 +9318,46 @@ var Box = React49__namespace.forwardRef(
|
|
|
9051
9318
|
}
|
|
9052
9319
|
);
|
|
9053
9320
|
Box.displayName = "Box";
|
|
9321
|
+
function alignToClass(value) {
|
|
9322
|
+
if (!value) return void 0;
|
|
9323
|
+
if (value === "start") return "items-start";
|
|
9324
|
+
if (value === "end") return "items-end";
|
|
9325
|
+
if (value === "center") return "items-center";
|
|
9326
|
+
if (value === "baseline") return "items-baseline";
|
|
9327
|
+
if (value === "stretch") return "items-stretch";
|
|
9328
|
+
return void 0;
|
|
9329
|
+
}
|
|
9330
|
+
function justifyToClass(value) {
|
|
9331
|
+
if (!value) return void 0;
|
|
9332
|
+
if (value === "start") return "justify-start";
|
|
9333
|
+
if (value === "end") return "justify-end";
|
|
9334
|
+
if (value === "center") return "justify-center";
|
|
9335
|
+
if (value === "between") return "justify-between";
|
|
9336
|
+
if (value === "around") return "justify-around";
|
|
9337
|
+
if (value === "evenly") return "justify-evenly";
|
|
9338
|
+
return void 0;
|
|
9339
|
+
}
|
|
9054
9340
|
var Stack = React49__namespace.forwardRef(
|
|
9055
|
-
({ direction = "vertical", spacing: spacing2, gap, align, justify, ...props }, ref) => {
|
|
9341
|
+
({ direction = "vertical", spacing: spacing2, gap, align, justify, className, style, ...props }, ref) => {
|
|
9056
9342
|
const gapValue = spacing2 ?? gap;
|
|
9343
|
+
const gapBaseValue = getBaseValue(gapValue);
|
|
9344
|
+
const flexClasses = cn(
|
|
9345
|
+
"flex",
|
|
9346
|
+
direction === "horizontal" ? "flex-row" : "flex-col",
|
|
9347
|
+
alignToClass(align),
|
|
9348
|
+
justifyToClass(justify),
|
|
9349
|
+
className
|
|
9350
|
+
);
|
|
9351
|
+
const inlineStyles = {
|
|
9352
|
+
...gapBaseValue !== void 0 && { gap: getSpacingCSSVar(String(gapBaseValue)) },
|
|
9353
|
+
...style
|
|
9354
|
+
};
|
|
9057
9355
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9058
9356
|
Box,
|
|
9059
9357
|
{
|
|
9060
9358
|
ref,
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
gap: gapValue,
|
|
9064
|
-
align,
|
|
9065
|
-
justify,
|
|
9359
|
+
className: flexClasses,
|
|
9360
|
+
style: Object.keys(inlineStyles).length > 0 ? inlineStyles : void 0,
|
|
9066
9361
|
...props
|
|
9067
9362
|
}
|
|
9068
9363
|
);
|
|
@@ -9173,7 +9468,7 @@ function getFlexBaseValue(value) {
|
|
|
9173
9468
|
}
|
|
9174
9469
|
return value;
|
|
9175
9470
|
}
|
|
9176
|
-
function
|
|
9471
|
+
function flexDirectionToClass(value) {
|
|
9177
9472
|
if (!value) return void 0;
|
|
9178
9473
|
if (value === "row") return "flex-row";
|
|
9179
9474
|
if (value === "column") return "flex-col";
|
|
@@ -9226,8 +9521,10 @@ var Flex = React49__namespace.forwardRef(
|
|
|
9226
9521
|
const alignValue = getFlexBaseValue(align);
|
|
9227
9522
|
const justifyValue = getFlexBaseValue(justify);
|
|
9228
9523
|
const basisValue = getFlexBaseValue(basis);
|
|
9524
|
+
const gapBaseValue = getBaseValue(gap);
|
|
9229
9525
|
const flexClasses = cn(
|
|
9230
|
-
|
|
9526
|
+
"flex",
|
|
9527
|
+
flexDirectionToClass(directionValue),
|
|
9231
9528
|
flexWrapToClass(wrapValue),
|
|
9232
9529
|
growToClass(grow),
|
|
9233
9530
|
shrinkToClass(shrink),
|
|
@@ -9246,15 +9543,13 @@ var Flex = React49__namespace.forwardRef(
|
|
|
9246
9543
|
})();
|
|
9247
9544
|
const flexStyle = {
|
|
9248
9545
|
...flexBasisCSS ? { flexBasis: flexBasisCSS } : {},
|
|
9546
|
+
...gapBaseValue !== void 0 && { gap: getSpacingCSSVar(String(gapBaseValue)) },
|
|
9249
9547
|
...style
|
|
9250
9548
|
};
|
|
9251
9549
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9252
9550
|
Box,
|
|
9253
9551
|
{
|
|
9254
9552
|
ref,
|
|
9255
|
-
display: "flex",
|
|
9256
|
-
flexDirection: directionValue,
|
|
9257
|
-
gap,
|
|
9258
9553
|
className: flexClasses,
|
|
9259
9554
|
style: Object.keys(flexStyle).length > 0 ? flexStyle : void 0,
|
|
9260
9555
|
...props
|
|
@@ -9321,7 +9616,22 @@ function justifyToClass3(value) {
|
|
|
9321
9616
|
return void 0;
|
|
9322
9617
|
}
|
|
9323
9618
|
var Grid = React49__namespace.forwardRef(
|
|
9324
|
-
({
|
|
9619
|
+
({
|
|
9620
|
+
cols,
|
|
9621
|
+
sm,
|
|
9622
|
+
md,
|
|
9623
|
+
lg,
|
|
9624
|
+
xl,
|
|
9625
|
+
"2xl": xl2,
|
|
9626
|
+
rows,
|
|
9627
|
+
gap,
|
|
9628
|
+
flow,
|
|
9629
|
+
align,
|
|
9630
|
+
justify,
|
|
9631
|
+
className,
|
|
9632
|
+
style,
|
|
9633
|
+
...props
|
|
9634
|
+
}, ref) => {
|
|
9325
9635
|
let colsValue = cols;
|
|
9326
9636
|
if (sm || md || lg || xl || xl2) {
|
|
9327
9637
|
if (cols !== void 0 && typeof cols !== "object") {
|
|
@@ -9390,23 +9700,25 @@ var Grid = React49__namespace.forwardRef(
|
|
|
9390
9700
|
justifyToClass3(justifyValue),
|
|
9391
9701
|
className
|
|
9392
9702
|
);
|
|
9393
|
-
|
|
9703
|
+
const gapBaseValue = gap ? getBaseValue(gap) : void 0;
|
|
9704
|
+
const gridStyle = {
|
|
9705
|
+
...gapBaseValue !== void 0 && { gap: getSpacingCSSVar(String(gapBaseValue)) },
|
|
9706
|
+
...style
|
|
9707
|
+
};
|
|
9708
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9709
|
+
Box,
|
|
9710
|
+
{
|
|
9711
|
+
ref,
|
|
9712
|
+
className: cn("grid", gridClasses),
|
|
9713
|
+
style: Object.keys(gridStyle).length > 0 ? gridStyle : void 0,
|
|
9714
|
+
...props
|
|
9715
|
+
}
|
|
9716
|
+
);
|
|
9394
9717
|
}
|
|
9395
9718
|
);
|
|
9396
9719
|
Grid.displayName = "Grid";
|
|
9397
|
-
var Row = React49__namespace.forwardRef((
|
|
9398
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9399
|
-
Box,
|
|
9400
|
-
{
|
|
9401
|
-
ref,
|
|
9402
|
-
display: "flex",
|
|
9403
|
-
flexDirection: "row",
|
|
9404
|
-
gap,
|
|
9405
|
-
align,
|
|
9406
|
-
justify,
|
|
9407
|
-
...props
|
|
9408
|
-
}
|
|
9409
|
-
);
|
|
9720
|
+
var Row = React49__namespace.forwardRef((props, ref) => {
|
|
9721
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Stack, { ref, direction: "horizontal", ...props });
|
|
9410
9722
|
});
|
|
9411
9723
|
Row.displayName = "Row";
|
|
9412
9724
|
var surfaceVariants = classVarianceAuthority.cva("", {
|
|
@@ -9788,7 +10100,7 @@ var ToastRoot = React49__namespace.forwardRef(
|
|
|
9788
10100
|
altText: toast.action.label,
|
|
9789
10101
|
onClick: toast.action.onClick,
|
|
9790
10102
|
className: cn(
|
|
9791
|
-
"inline-flex shrink-0 items-center justify-center rounded-md border bg-transparent font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
10103
|
+
"inline-flex shrink-0 items-center justify-center rounded-md border bg-transparent font-medium transition-colors hover:bg-secondary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
9792
10104
|
TOAST_TOKENS.action.height,
|
|
9793
10105
|
TOAST_TOKENS.action.padding,
|
|
9794
10106
|
TOAST_TOKENS.action.fontSize
|
|
@@ -9846,7 +10158,7 @@ var ToastAction = React49__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
9846
10158
|
{
|
|
9847
10159
|
ref,
|
|
9848
10160
|
className: cn(
|
|
9849
|
-
"inline-flex shrink-0 items-center justify-center rounded-md border bg-transparent font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
10161
|
+
"inline-flex shrink-0 items-center justify-center rounded-md border bg-transparent font-medium transition-colors hover:bg-secondary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
9850
10162
|
TOAST_TOKENS.action.height,
|
|
9851
10163
|
TOAST_TOKENS.action.padding,
|
|
9852
10164
|
TOAST_TOKENS.action.fontSize,
|
|
@@ -10286,7 +10598,7 @@ var NotificationCenterItem = React49__namespace.forwardRef(
|
|
|
10286
10598
|
size: "icon",
|
|
10287
10599
|
onClick: handleDismiss,
|
|
10288
10600
|
"aria-label": "Dismiss notification",
|
|
10289
|
-
className: "absolute right-xs top-xs h-6 w-6 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100",
|
|
10601
|
+
className: "absolute right-xs top-xs h-6 w-6 opacity-0 transition-opacity hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 group-hover:opacity-100",
|
|
10290
10602
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
|
|
10291
10603
|
}
|
|
10292
10604
|
)
|
|
@@ -12430,7 +12742,7 @@ function usePositioning({
|
|
|
12430
12742
|
return offsetValue;
|
|
12431
12743
|
}
|
|
12432
12744
|
const baseOffset = getBaseValue(offsetValue);
|
|
12433
|
-
return baseOffset ? getSpacingPx(baseOffset) :
|
|
12745
|
+
return baseOffset ? getSpacingPx(baseOffset) : getSpacingPx(1);
|
|
12434
12746
|
}, [offsetValue]);
|
|
12435
12747
|
React49__namespace.useEffect(() => {
|
|
12436
12748
|
setMounted(true);
|
|
@@ -12441,7 +12753,7 @@ function usePositioning({
|
|
|
12441
12753
|
middlewareArray.push(flip3());
|
|
12442
12754
|
}
|
|
12443
12755
|
if (enableShift) {
|
|
12444
|
-
middlewareArray.push(shift3({ padding:
|
|
12756
|
+
middlewareArray.push(shift3({ padding: getSpacingPx(2) }));
|
|
12445
12757
|
}
|
|
12446
12758
|
return middlewareArray;
|
|
12447
12759
|
}, [offsetPx, enableFlip, enableShift]);
|
|
@@ -12800,7 +13112,7 @@ var DropdownMenuItem = React49__namespace.forwardRef(
|
|
|
12800
13112
|
MENU_TOKENS.item.padding.md,
|
|
12801
13113
|
MENU_TOKENS.item.radius.md,
|
|
12802
13114
|
inset && "pl-8",
|
|
12803
|
-
!disabled && "focus:bg-accent focus:text-accent-foreground",
|
|
13115
|
+
!disabled && "focus-visible:bg-accent focus-visible:text-accent-foreground",
|
|
12804
13116
|
selected && "bg-accent/50",
|
|
12805
13117
|
disabled && "pointer-events-none opacity-50",
|
|
12806
13118
|
className
|
|
@@ -13283,9 +13595,9 @@ var CONTEXT_MENU_TOKENS = {
|
|
|
13283
13595
|
radius: "rounded-sm",
|
|
13284
13596
|
// 4px (0.25rem)
|
|
13285
13597
|
focus: {
|
|
13286
|
-
background: "focus:bg-[hsl(var(--accent))]",
|
|
13598
|
+
background: "focus-visible:bg-[hsl(var(--accent))]",
|
|
13287
13599
|
// Focus background using CSS var
|
|
13288
|
-
text: "focus:text-[hsl(var(--accent-foreground))]"
|
|
13600
|
+
text: "focus-visible:text-[hsl(var(--accent-foreground))]"
|
|
13289
13601
|
// Focus text using CSS var
|
|
13290
13602
|
},
|
|
13291
13603
|
disabled: {
|