@codefast/ui 0.4.0-canary.4 → 0.4.0-canary.6
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/CHANGELOG.md +65 -0
- package/dist/components/accordion.mjs +1 -1
- package/dist/components/alert-dialog.mjs +2 -2
- package/dist/components/alert.mjs +1 -1
- package/dist/components/avatar.mjs +1 -1
- package/dist/components/calendar.mjs +5 -5
- package/dist/components/carousel.mjs +4 -4
- package/dist/components/checkbox-cards.mjs +6 -6
- package/dist/components/checkbox-group.mjs +6 -6
- package/dist/components/checkbox.mjs +6 -6
- package/dist/components/command.mjs +3 -3
- package/dist/components/context-menu.mjs +9 -9
- package/dist/components/dialog.mjs +2 -2
- package/dist/components/drawer.mjs +2 -2
- package/dist/components/dropdown-menu.mjs +9 -9
- package/dist/components/field.mjs +2 -2
- package/dist/components/input-otp.mjs +1 -1
- package/dist/components/item.mjs +1 -1
- package/dist/components/menubar.mjs +9 -9
- package/dist/components/native-select.mjs +2 -2
- package/dist/components/navigation-menu.mjs +4 -4
- package/dist/components/pagination.mjs +2 -2
- package/dist/components/radio-cards.mjs +1 -1
- package/dist/components/radio-group.mjs +2 -2
- package/dist/components/radio.mjs +1 -1
- package/dist/components/resizable.mjs +1 -1
- package/dist/components/select.mjs +4 -4
- package/dist/components/sheet.mjs +1 -1
- package/dist/components/sidebar.mjs +7 -7
- package/dist/components/switch.mjs +2 -2
- package/dist/components/table.mjs +2 -2
- package/dist/components/tabs.mjs +1 -1
- package/dist/components/toggle-group.mjs +1 -1
- package/dist/components/tooltip.mjs +1 -1
- package/dist/variants/alert.mjs +1 -1
- package/dist/variants/badge.mjs +1 -1
- package/dist/variants/button-group.mjs +2 -2
- package/dist/variants/button.mjs +4 -4
- package/dist/variants/input-group.mjs +3 -3
- package/dist/variants/input-number.mjs +3 -3
- package/dist/variants/scroll-area.mjs +1 -1
- package/dist/variants/sheet.mjs +2 -2
- package/dist/variants/sidebar.mjs +1 -1
- package/dist/variants/toggle.mjs +3 -3
- package/package.json +12 -12
- package/src/components/accordion.tsx +1 -1
- package/src/components/alert-dialog.tsx +2 -2
- package/src/components/alert.tsx +1 -1
- package/src/components/avatar.tsx +1 -1
- package/src/components/calendar.tsx +7 -7
- package/src/components/carousel.tsx +6 -6
- package/src/components/checkbox-cards.tsx +6 -5
- package/src/components/checkbox-group.tsx +5 -4
- package/src/components/checkbox.tsx +5 -4
- package/src/components/command.tsx +3 -3
- package/src/components/context-menu.tsx +9 -9
- package/src/components/dialog.tsx +2 -2
- package/src/components/drawer.tsx +2 -2
- package/src/components/dropdown-menu.tsx +9 -9
- package/src/components/field.tsx +2 -2
- package/src/components/input-otp.tsx +1 -1
- package/src/components/item.tsx +1 -1
- package/src/components/menubar.tsx +9 -9
- package/src/components/native-select.tsx +2 -2
- package/src/components/navigation-menu.tsx +4 -4
- package/src/components/pagination.tsx +2 -2
- package/src/components/radio-cards.tsx +1 -1
- package/src/components/radio-group.tsx +4 -2
- package/src/components/radio.tsx +1 -1
- package/src/components/resizable.tsx +1 -1
- package/src/components/select.tsx +4 -4
- package/src/components/sheet.tsx +1 -1
- package/src/components/sidebar.tsx +7 -7
- package/src/components/switch.tsx +2 -2
- package/src/components/table.tsx +2 -2
- package/src/components/tabs.tsx +2 -2
- package/src/components/toggle-group.tsx +1 -1
- package/src/components/tooltip.tsx +1 -1
- package/src/css/foundation/base.css +24 -0
- package/src/css/foundation/motion.css +48 -15
- package/src/css/foundation/source.css +7 -0
- package/src/css/foundation/tokens.css +36 -0
- package/src/css/foundation/variants.css +13 -5
- package/src/css/preset.css +8 -0
- package/src/css/style.css +8 -0
- package/src/css/themes/amber.css +29 -0
- package/src/css/themes/blue.css +29 -0
- package/src/css/themes/cyan.css +29 -0
- package/src/css/themes/emerald.css +29 -0
- package/src/css/themes/fuchsia.css +29 -0
- package/src/css/themes/gray.css +29 -0
- package/src/css/themes/green.css +29 -0
- package/src/css/themes/indigo.css +29 -0
- package/src/css/themes/lime.css +29 -0
- package/src/css/themes/neutral.css +29 -0
- package/src/css/themes/orange.css +29 -0
- package/src/css/themes/pink.css +29 -0
- package/src/css/themes/purple.css +29 -0
- package/src/css/themes/red.css +29 -0
- package/src/css/themes/rose.css +29 -0
- package/src/css/themes/sky.css +29 -0
- package/src/css/themes/slate.css +29 -0
- package/src/css/themes/stone.css +29 -0
- package/src/css/themes/teal.css +29 -0
- package/src/css/themes/violet.css +29 -0
- package/src/css/themes/yellow.css +29 -0
- package/src/css/themes/zinc.css +29 -0
- package/src/variants/alert.ts +1 -1
- package/src/variants/badge.ts +1 -1
- package/src/variants/button-group.ts +2 -2
- package/src/variants/button.ts +4 -4
- package/src/variants/input-group.ts +3 -3
- package/src/variants/input-number.ts +3 -3
- package/src/variants/scroll-area.ts +1 -1
- package/src/variants/sheet.ts +2 -2
- package/src/variants/sidebar.ts +1 -1
- package/src/variants/toggle.ts +3 -3
package/src/css/themes/teal.css
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
+
/* -------------------------------------------------------------------------
|
|
2
|
+
* Teal theme
|
|
3
|
+
*
|
|
4
|
+
* Color tokens for the teal palette across the light (`:root`),
|
|
5
|
+
* `.dark`, and system-preference variants. Trailing comments note the source
|
|
6
|
+
* palette swatch for each value.
|
|
7
|
+
* ------------------------------------------------------------------------- */
|
|
8
|
+
|
|
1
9
|
:root {
|
|
10
|
+
/* ----------------------------------------------------------------------
|
|
11
|
+
* Surfaces & semantic colors
|
|
12
|
+
* ---------------------------------------------------------------------- */
|
|
13
|
+
|
|
2
14
|
--background: oklch(1 0 0); /* --color-zinc-50 */
|
|
3
15
|
--foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
4
16
|
|
|
@@ -22,10 +34,18 @@
|
|
|
22
34
|
--card: oklch(1 0 0); /* --color-zinc-50 */
|
|
23
35
|
--card-foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
24
36
|
|
|
37
|
+
/* ----------------------------------------------------------------------
|
|
38
|
+
* Form & focus
|
|
39
|
+
* ---------------------------------------------------------------------- */
|
|
40
|
+
|
|
25
41
|
--border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
26
42
|
--input: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
27
43
|
--ring: oklch(0.78 0.13 182); /* --color-teal-400 */
|
|
28
44
|
|
|
45
|
+
/* ----------------------------------------------------------------------
|
|
46
|
+
* Sidebar
|
|
47
|
+
* ---------------------------------------------------------------------- */
|
|
48
|
+
|
|
29
49
|
--sidebar: oklch(0.985 0 0); /* --color-zinc-50 */
|
|
30
50
|
--sidebar-foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
31
51
|
--sidebar-primary: oklch(0.6 0.1 185); /* --color-teal-600 */
|
|
@@ -35,6 +55,10 @@
|
|
|
35
55
|
--sidebar-border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
36
56
|
--sidebar-ring: oklch(0.78 0.13 182); /* --color-teal-400 */
|
|
37
57
|
|
|
58
|
+
/* ----------------------------------------------------------------------
|
|
59
|
+
* Charts
|
|
60
|
+
* ---------------------------------------------------------------------- */
|
|
61
|
+
|
|
38
62
|
--chart-1: oklch(0.85 0.13 181); /* --color-teal-300 */
|
|
39
63
|
--chart-2: oklch(0.78 0.13 182); /* --color-teal-400 */
|
|
40
64
|
--chart-3: oklch(0.7 0.12 183); /* --color-teal-500 */
|
|
@@ -43,6 +67,8 @@
|
|
|
43
67
|
}
|
|
44
68
|
|
|
45
69
|
.dark {
|
|
70
|
+
/* Dark variant — overrides the light tokens above. */
|
|
71
|
+
|
|
46
72
|
--background: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
47
73
|
--foreground: oklch(0.985 0 0); /* --color-zinc-50 */
|
|
48
74
|
|
|
@@ -85,8 +111,11 @@
|
|
|
85
111
|
--chart-4: oklch(0.6 0.1 185); /* --color-teal-600 */
|
|
86
112
|
--chart-5: oklch(0.51 0.09 186); /* --color-teal-700 */
|
|
87
113
|
}
|
|
114
|
+
|
|
88
115
|
@media (prefers-color-scheme: dark) {
|
|
89
116
|
:root:not(.light) {
|
|
117
|
+
/* System-preference dark — applied when no explicit .light is set. */
|
|
118
|
+
|
|
90
119
|
--background: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
91
120
|
--foreground: oklch(0.985 0 0); /* --color-zinc-50 */
|
|
92
121
|
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
+
/* -------------------------------------------------------------------------
|
|
2
|
+
* Violet theme
|
|
3
|
+
*
|
|
4
|
+
* Color tokens for the violet palette across the light (`:root`),
|
|
5
|
+
* `.dark`, and system-preference variants. Trailing comments note the source
|
|
6
|
+
* palette swatch for each value.
|
|
7
|
+
* ------------------------------------------------------------------------- */
|
|
8
|
+
|
|
1
9
|
:root {
|
|
10
|
+
/* ----------------------------------------------------------------------
|
|
11
|
+
* Surfaces & semantic colors
|
|
12
|
+
* ---------------------------------------------------------------------- */
|
|
13
|
+
|
|
2
14
|
--background: oklch(1 0 0); /* --color-zinc-50 */
|
|
3
15
|
--foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
4
16
|
|
|
@@ -22,10 +34,18 @@
|
|
|
22
34
|
--card: oklch(1 0 0); /* --color-zinc-50 */
|
|
23
35
|
--card-foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
24
36
|
|
|
37
|
+
/* ----------------------------------------------------------------------
|
|
38
|
+
* Form & focus
|
|
39
|
+
* ---------------------------------------------------------------------- */
|
|
40
|
+
|
|
25
41
|
--border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
26
42
|
--input: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
27
43
|
--ring: oklch(0.702 0.183 293.541); /* --color-violet-400 */
|
|
28
44
|
|
|
45
|
+
/* ----------------------------------------------------------------------
|
|
46
|
+
* Sidebar
|
|
47
|
+
* ---------------------------------------------------------------------- */
|
|
48
|
+
|
|
29
49
|
--sidebar: oklch(0.985 0 0); /* --color-zinc-50 */
|
|
30
50
|
--sidebar-foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
31
51
|
--sidebar-primary: oklch(0.541 0.281 293.009); /* --color-violet-600 */
|
|
@@ -35,6 +55,10 @@
|
|
|
35
55
|
--sidebar-border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
36
56
|
--sidebar-ring: oklch(0.702 0.183 293.541); /* --color-violet-400 */
|
|
37
57
|
|
|
58
|
+
/* ----------------------------------------------------------------------
|
|
59
|
+
* Charts
|
|
60
|
+
* ---------------------------------------------------------------------- */
|
|
61
|
+
|
|
38
62
|
--chart-1: oklch(0.811 0.111 293.571); /* --color-violet-300 */
|
|
39
63
|
--chart-2: oklch(0.606 0.25 292.717); /* --color-violet-500 */
|
|
40
64
|
--chart-3: oklch(0.541 0.281 293.009); /* --color-violet-600 */
|
|
@@ -43,6 +67,8 @@
|
|
|
43
67
|
}
|
|
44
68
|
|
|
45
69
|
.dark {
|
|
70
|
+
/* Dark variant — overrides the light tokens above. */
|
|
71
|
+
|
|
46
72
|
--background: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
47
73
|
--foreground: oklch(0.985 0 0); /* --color-zinc-50 */
|
|
48
74
|
|
|
@@ -85,8 +111,11 @@
|
|
|
85
111
|
--chart-4: oklch(0.491 0.27 292.581); /* --color-violet-700 */
|
|
86
112
|
--chart-5: oklch(0.432 0.232 292.759); /* --color-violet-800 */
|
|
87
113
|
}
|
|
114
|
+
|
|
88
115
|
@media (prefers-color-scheme: dark) {
|
|
89
116
|
:root:not(.light) {
|
|
117
|
+
/* System-preference dark — applied when no explicit .light is set. */
|
|
118
|
+
|
|
90
119
|
--background: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
91
120
|
--foreground: oklch(0.985 0 0); /* --color-zinc-50 */
|
|
92
121
|
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
+
/* -------------------------------------------------------------------------
|
|
2
|
+
* Yellow theme
|
|
3
|
+
*
|
|
4
|
+
* Color tokens for the yellow palette across the light (`:root`),
|
|
5
|
+
* `.dark`, and system-preference variants. Trailing comments note the source
|
|
6
|
+
* palette swatch for each value.
|
|
7
|
+
* ------------------------------------------------------------------------- */
|
|
8
|
+
|
|
1
9
|
:root {
|
|
10
|
+
/* ----------------------------------------------------------------------
|
|
11
|
+
* Surfaces & semantic colors
|
|
12
|
+
* ---------------------------------------------------------------------- */
|
|
13
|
+
|
|
2
14
|
--background: oklch(1 0 0); /* --color-zinc-50 */
|
|
3
15
|
--foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
4
16
|
|
|
@@ -22,10 +34,18 @@
|
|
|
22
34
|
--card: oklch(1 0 0); /* --color-zinc-50 */
|
|
23
35
|
--card-foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
24
36
|
|
|
37
|
+
/* ----------------------------------------------------------------------
|
|
38
|
+
* Form & focus
|
|
39
|
+
* ---------------------------------------------------------------------- */
|
|
40
|
+
|
|
25
41
|
--border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
26
42
|
--input: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
27
43
|
--ring: oklch(0.852 0.199 91.936); /* --color-yellow-400 */
|
|
28
44
|
|
|
45
|
+
/* ----------------------------------------------------------------------
|
|
46
|
+
* Sidebar
|
|
47
|
+
* ---------------------------------------------------------------------- */
|
|
48
|
+
|
|
29
49
|
--sidebar: oklch(0.985 0 0); /* --color-zinc-50 */
|
|
30
50
|
--sidebar-foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
31
51
|
--sidebar-primary: oklch(0.681 0.162 75.834); /* --color-yellow-600 */
|
|
@@ -35,6 +55,10 @@
|
|
|
35
55
|
--sidebar-border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
36
56
|
--sidebar-ring: oklch(0.852 0.199 91.936); /* --color-yellow-400 */
|
|
37
57
|
|
|
58
|
+
/* ----------------------------------------------------------------------
|
|
59
|
+
* Charts
|
|
60
|
+
* ---------------------------------------------------------------------- */
|
|
61
|
+
|
|
38
62
|
--chart-1: oklch(0.905 0.182 98.111); /* --color-yellow-300 */
|
|
39
63
|
--chart-2: oklch(0.795 0.184 86.047); /* --color-yellow-500 */
|
|
40
64
|
--chart-3: oklch(0.681 0.162 75.834); /* --color-yellow-600 */
|
|
@@ -43,6 +67,8 @@
|
|
|
43
67
|
}
|
|
44
68
|
|
|
45
69
|
.dark {
|
|
70
|
+
/* Dark variant — overrides the light tokens above. */
|
|
71
|
+
|
|
46
72
|
--background: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
47
73
|
--foreground: oklch(0.985 0 0); /* --color-zinc-50 */
|
|
48
74
|
|
|
@@ -85,8 +111,11 @@
|
|
|
85
111
|
--chart-4: oklch(0.554 0.135 66.442); /* --color-yellow-700 */
|
|
86
112
|
--chart-5: oklch(0.476 0.114 61.907); /* --color-yellow-800 */
|
|
87
113
|
}
|
|
114
|
+
|
|
88
115
|
@media (prefers-color-scheme: dark) {
|
|
89
116
|
:root:not(.light) {
|
|
117
|
+
/* System-preference dark — applied when no explicit .light is set. */
|
|
118
|
+
|
|
90
119
|
--background: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
91
120
|
--foreground: oklch(0.985 0 0); /* --color-zinc-50 */
|
|
92
121
|
|
package/src/css/themes/zinc.css
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
+
/* -------------------------------------------------------------------------
|
|
2
|
+
* Zinc theme
|
|
3
|
+
*
|
|
4
|
+
* Color tokens for the zinc palette across the light (`:root`),
|
|
5
|
+
* `.dark`, and system-preference variants. Trailing comments note the source
|
|
6
|
+
* palette swatch for each value.
|
|
7
|
+
* ------------------------------------------------------------------------- */
|
|
8
|
+
|
|
1
9
|
:root {
|
|
10
|
+
/* ----------------------------------------------------------------------
|
|
11
|
+
* Surfaces & semantic colors
|
|
12
|
+
* ---------------------------------------------------------------------- */
|
|
13
|
+
|
|
2
14
|
--background: oklch(1 0 0); /* --color-zinc-50 */
|
|
3
15
|
--foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
4
16
|
|
|
@@ -22,10 +34,18 @@
|
|
|
22
34
|
--card: oklch(1 0 0); /* --color-zinc-50 */
|
|
23
35
|
--card-foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
24
36
|
|
|
37
|
+
/* ----------------------------------------------------------------------
|
|
38
|
+
* Form & focus
|
|
39
|
+
* ---------------------------------------------------------------------- */
|
|
40
|
+
|
|
25
41
|
--border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
26
42
|
--input: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
27
43
|
--ring: oklch(0.705 0.015 286.067); /* --color-zinc-400 */
|
|
28
44
|
|
|
45
|
+
/* ----------------------------------------------------------------------
|
|
46
|
+
* Sidebar
|
|
47
|
+
* ---------------------------------------------------------------------- */
|
|
48
|
+
|
|
29
49
|
--sidebar: oklch(0.985 0 0); /* --color-zinc-50 */
|
|
30
50
|
--sidebar-foreground: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
31
51
|
--sidebar-primary: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
|
|
@@ -35,6 +55,10 @@
|
|
|
35
55
|
--sidebar-border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
|
|
36
56
|
--sidebar-ring: oklch(0.705 0.015 286.067); /* --color-zinc-400 */
|
|
37
57
|
|
|
58
|
+
/* ----------------------------------------------------------------------
|
|
59
|
+
* Charts
|
|
60
|
+
* ---------------------------------------------------------------------- */
|
|
61
|
+
|
|
38
62
|
--chart-1: oklch(0.646 0.222 41.116); /* --color-orange-600 */
|
|
39
63
|
--chart-2: oklch(0.6 0.118 184.704); /* --color-teal-600 */
|
|
40
64
|
--chart-3: oklch(0.398 0.07 227.392); /* --color-cyan-900 */
|
|
@@ -43,6 +67,8 @@
|
|
|
43
67
|
}
|
|
44
68
|
|
|
45
69
|
.dark {
|
|
70
|
+
/* Dark variant — overrides the light tokens above. */
|
|
71
|
+
|
|
46
72
|
--background: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
47
73
|
--foreground: oklch(0.985 0 0); /* --color-zinc-50 */
|
|
48
74
|
|
|
@@ -85,8 +111,11 @@
|
|
|
85
111
|
--chart-4: oklch(0.627 0.265 303.9); /* --color-purple-500 */
|
|
86
112
|
--chart-5: oklch(0.645 0.246 16.439); /* --color-rose-500 */
|
|
87
113
|
}
|
|
114
|
+
|
|
88
115
|
@media (prefers-color-scheme: dark) {
|
|
89
116
|
:root:not(.light) {
|
|
117
|
+
/* System-preference dark — applied when no explicit .light is set. */
|
|
118
|
+
|
|
90
119
|
--background: oklch(0.141 0.005 285.823); /* --color-zinc-950 */
|
|
91
120
|
--foreground: oklch(0.985 0 0); /* --color-zinc-50 */
|
|
92
121
|
|
package/src/variants/alert.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { tv } from "#/lib/utils";
|
|
|
9
9
|
* @since 0.3.16-canary.0
|
|
10
10
|
*/
|
|
11
11
|
const alertVariants = tv({
|
|
12
|
-
base: "group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-
|
|
12
|
+
base: "group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-start text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pe-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
|
|
13
13
|
defaultVariants: {
|
|
14
14
|
variant: "default",
|
|
15
15
|
},
|
package/src/variants/badge.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { tv } from "#/lib/utils";
|
|
|
9
9
|
* @since 0.3.16-canary.0
|
|
10
10
|
*/
|
|
11
11
|
const badgeVariants = tv({
|
|
12
|
-
base: "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 has-data-[icon=inline-end]:
|
|
12
|
+
base: "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
|
|
13
13
|
defaultVariants: {
|
|
14
14
|
variant: "default",
|
|
15
15
|
},
|
|
@@ -9,14 +9,14 @@ import { tv } from "#/lib/utils";
|
|
|
9
9
|
* @since 0.3.16-canary.0
|
|
10
10
|
*/
|
|
11
11
|
const buttonGroupVariants = tv({
|
|
12
|
-
base: "group/button-group flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-
|
|
12
|
+
base: "group/button-group flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-e-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
13
13
|
defaultVariants: {
|
|
14
14
|
orientation: "horizontal",
|
|
15
15
|
},
|
|
16
16
|
variants: {
|
|
17
17
|
orientation: {
|
|
18
18
|
horizontal:
|
|
19
|
-
"[&>*:not(:first-child)]:rounded-
|
|
19
|
+
"[&>*:not(:first-child)]:rounded-s-none [&>*:not(:first-child)]:border-s-0 [&>*:not(:last-child)]:rounded-e-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-e-md!",
|
|
20
20
|
vertical:
|
|
21
21
|
"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-md!",
|
|
22
22
|
},
|
package/src/variants/button.ts
CHANGED
|
@@ -17,10 +17,10 @@ const buttonVariants = tv({
|
|
|
17
17
|
variants: {
|
|
18
18
|
size: {
|
|
19
19
|
default:
|
|
20
|
-
"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:
|
|
21
|
-
xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:
|
|
22
|
-
sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:
|
|
23
|
-
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:
|
|
20
|
+
"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2", // 36px
|
|
21
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3", // 24px
|
|
22
|
+
sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5", // 32px
|
|
23
|
+
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2", // 40px
|
|
24
24
|
|
|
25
25
|
icon: "size-9", // 36px
|
|
26
26
|
"icon-xs":
|
|
@@ -9,7 +9,7 @@ import { tv } from "#/lib/utils";
|
|
|
9
9
|
* @since 0.3.16-canary.0
|
|
10
10
|
*/
|
|
11
11
|
const inputGroupVariants = tv({
|
|
12
|
-
base: "group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:
|
|
12
|
+
base: "group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pe-1.5 has-[>[data-align=inline-start]]:[&>input]:ps-1.5",
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
/* -----------------------------------------------------------------------------
|
|
@@ -29,8 +29,8 @@ const inputGroupAddonVariants = tv({
|
|
|
29
29
|
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2",
|
|
30
30
|
"block-start":
|
|
31
31
|
"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
32
|
-
"inline-end": "order-last
|
|
33
|
-
"inline-start": "order-first
|
|
32
|
+
"inline-end": "order-last pe-2 has-[>button]:-me-1 has-[>kbd]:me-[-0.15rem]",
|
|
33
|
+
"inline-start": "order-first ps-2 has-[>button]:-ms-1 has-[>kbd]:ms-[-0.15rem]",
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
36
|
});
|
|
@@ -17,12 +17,12 @@ const inputNumberVariants = tv({
|
|
|
17
17
|
* Split layout: trailing increment button (always on the inline end).
|
|
18
18
|
*/
|
|
19
19
|
incrementButton:
|
|
20
|
-
"order-last h-full w-9 shrink-0 rounded-none rounded-
|
|
20
|
+
"order-last h-full w-9 shrink-0 rounded-none rounded-e-[calc(var(--radius-md)-1px)] border-s border-s-input text-muted-foreground group-focus-within/input-number:border-s-ring group-has-aria-invalid/input-number:border-s-destructive focus-visible:bg-ring/50 focus-visible:ring-0 group-has-aria-invalid/input-number:focus-visible:bg-destructive/20 dark:group-has-aria-invalid/input-number:focus-visible:bg-destructive/40",
|
|
21
21
|
/**
|
|
22
22
|
* Split layout: leading decrement button (always on the inline start).
|
|
23
23
|
*/
|
|
24
24
|
decrementButton:
|
|
25
|
-
"order-first h-full w-9 shrink-0 rounded-none rounded-
|
|
25
|
+
"order-first h-full w-9 shrink-0 rounded-none rounded-s-[calc(var(--radius-md)-1px)] border-e border-e-input text-muted-foreground group-focus-within/input-number:border-e-ring group-has-aria-invalid/input-number:border-e-destructive focus-visible:bg-ring/50 focus-visible:ring-0 group-has-aria-invalid/input-number:focus-visible:bg-destructive/20 dark:group-has-aria-invalid/input-number:focus-visible:bg-destructive/40",
|
|
26
26
|
/**
|
|
27
27
|
* Editable numeric input.
|
|
28
28
|
*/
|
|
@@ -36,7 +36,7 @@ const inputNumberVariants = tv({
|
|
|
36
36
|
* Stepper layout: stacked chevron column on the trailing edge.
|
|
37
37
|
*/
|
|
38
38
|
stepper:
|
|
39
|
-
"order-last grid h-full w-8 shrink-0 divide-y divide-input border-
|
|
39
|
+
"order-last grid h-full w-8 shrink-0 divide-y divide-input border-s border-s-input transition-colors group-focus-within/input-number:divide-ring group-focus-within/input-number:border-s-ring group-has-aria-invalid/input-number:divide-destructive group-has-aria-invalid/input-number:border-s-destructive motion-reduce:transition-none *:[button]:focus-visible:bg-ring/50 *:[button]:focus-visible:ring-0 group-has-aria-invalid/input-number:*:[button]:focus-visible:bg-destructive/20 dark:group-has-aria-invalid/input-number:*:[button]:focus-visible:bg-destructive/40",
|
|
40
40
|
/**
|
|
41
41
|
* Stepper layout: individual chevron button (shared by increment/decrement).
|
|
42
42
|
*/
|
|
@@ -9,7 +9,7 @@ import { tv } from "#/lib/utils";
|
|
|
9
9
|
* @since 0.3.16-canary.0
|
|
10
10
|
*/
|
|
11
11
|
const scrollAreaScrollbarVariants = tv({
|
|
12
|
-
base: "flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-
|
|
12
|
+
base: "flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-s data-vertical:border-s-transparent",
|
|
13
13
|
compoundVariants: [
|
|
14
14
|
{
|
|
15
15
|
className: "w-1.5",
|
package/src/variants/sheet.ts
CHANGED
|
@@ -16,9 +16,9 @@ const sheetContentVariants = tv({
|
|
|
16
16
|
variants: {
|
|
17
17
|
side: {
|
|
18
18
|
bottom: "inset-x-0 bottom-0 h-auto border-t data-open:slide-in-from-bottom-10 data-closed:slide-out-to-bottom-10",
|
|
19
|
-
left: "inset-y-0
|
|
19
|
+
left: "inset-y-0 start-0 h-full w-3/4 border-e sm:max-w-sm data-open:slide-in-from-left-10 data-closed:slide-out-to-left-10",
|
|
20
20
|
right:
|
|
21
|
-
"inset-y-0
|
|
21
|
+
"inset-y-0 end-0 h-full w-3/4 border-s sm:max-w-sm data-open:slide-in-from-right-10 data-closed:slide-out-to-right-10",
|
|
22
22
|
top: "inset-x-0 top-0 h-auto border-b data-open:slide-in-from-top-10 data-closed:slide-out-to-top-10",
|
|
23
23
|
},
|
|
24
24
|
},
|
package/src/variants/sidebar.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { tv } from "#/lib/utils";
|
|
|
9
9
|
* @since 0.3.16-canary.0
|
|
10
10
|
*/
|
|
11
11
|
const sidebarMenuButtonVariants = tv({
|
|
12
|
-
base: "peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-
|
|
12
|
+
base: "peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-start text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",
|
|
13
13
|
defaultVariants: {
|
|
14
14
|
size: "default",
|
|
15
15
|
variant: "default",
|
package/src/variants/toggle.ts
CHANGED
|
@@ -16,9 +16,9 @@ const toggleVariants = tv({
|
|
|
16
16
|
},
|
|
17
17
|
variants: {
|
|
18
18
|
size: {
|
|
19
|
-
default: "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:
|
|
20
|
-
sm: "h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:
|
|
21
|
-
lg: "h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:
|
|
19
|
+
default: "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
|
|
20
|
+
sm: "h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5",
|
|
21
|
+
lg: "h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
|
|
22
22
|
},
|
|
23
23
|
variant: {
|
|
24
24
|
default: "bg-transparent",
|