@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
|
@@ -64,11 +64,11 @@ function MenubarTrigger({ className, ...props }) {
|
|
|
64
64
|
*/
|
|
65
65
|
function MenubarSubTrigger({ children, className, inset, ...props }) {
|
|
66
66
|
return /* @__PURE__ */ jsxs(Menubar$1.SubTrigger, {
|
|
67
|
-
className: cn("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-inset:
|
|
67
|
+
className: cn("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-8 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4", className),
|
|
68
68
|
"data-inset": inset,
|
|
69
69
|
"data-slot": "menubar-sub-trigger",
|
|
70
70
|
...props,
|
|
71
|
-
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "
|
|
71
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ms-auto size-4 rtl:rotate-180" })]
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
@@ -105,7 +105,7 @@ function MenubarContent({ align = "start", alignOffset = -4, className, sideOffs
|
|
|
105
105
|
*/
|
|
106
106
|
function MenubarItem({ className, inset, variant = "default", ...props }) {
|
|
107
107
|
return /* @__PURE__ */ jsx(Menubar$1.Item, {
|
|
108
|
-
className: cn("group/menubar-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:
|
|
108
|
+
className: cn("group/menubar-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:ps-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!", className),
|
|
109
109
|
"data-inset": inset,
|
|
110
110
|
"data-slot": "menubar-item",
|
|
111
111
|
"data-variant": variant,
|
|
@@ -118,12 +118,12 @@ function MenubarItem({ className, inset, variant = "default", ...props }) {
|
|
|
118
118
|
function MenubarCheckboxItem({ checked, children, className, inset, ...props }) {
|
|
119
119
|
return /* @__PURE__ */ jsxs(Menubar$1.CheckboxItem, {
|
|
120
120
|
checked,
|
|
121
|
-
className: cn("relative flex cursor-default items-center gap-2 rounded-md py-1.5
|
|
121
|
+
className: cn("relative flex cursor-default items-center gap-2 rounded-md py-1.5 ps-8 pe-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:ps-8 data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
122
122
|
"data-inset": inset,
|
|
123
123
|
"data-slot": "menubar-checkbox-item",
|
|
124
124
|
...props,
|
|
125
125
|
children: [/* @__PURE__ */ jsx("span", {
|
|
126
|
-
className: "pointer-events-none absolute
|
|
126
|
+
className: "pointer-events-none absolute start-2 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
127
127
|
children: /* @__PURE__ */ jsx(Menubar$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
128
128
|
}), children]
|
|
129
129
|
});
|
|
@@ -133,12 +133,12 @@ function MenubarCheckboxItem({ checked, children, className, inset, ...props })
|
|
|
133
133
|
*/
|
|
134
134
|
function MenubarRadioItem({ children, className, inset, ...props }) {
|
|
135
135
|
return /* @__PURE__ */ jsxs(Menubar$1.RadioItem, {
|
|
136
|
-
className: cn("relative flex cursor-default items-center gap-2 rounded-md py-1.5
|
|
136
|
+
className: cn("relative flex cursor-default items-center gap-2 rounded-md py-1.5 ps-8 pe-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:ps-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
137
137
|
"data-inset": inset,
|
|
138
138
|
"data-slot": "menubar-radio-item",
|
|
139
139
|
...props,
|
|
140
140
|
children: [/* @__PURE__ */ jsx("span", {
|
|
141
|
-
className: "pointer-events-none absolute
|
|
141
|
+
className: "pointer-events-none absolute start-2 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
142
142
|
children: /* @__PURE__ */ jsx(Menubar$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
143
143
|
}), children]
|
|
144
144
|
});
|
|
@@ -148,7 +148,7 @@ function MenubarRadioItem({ children, className, inset, ...props }) {
|
|
|
148
148
|
*/
|
|
149
149
|
function MenubarLabel({ className, inset, ...props }) {
|
|
150
150
|
return /* @__PURE__ */ jsx(Menubar$1.Label, {
|
|
151
|
-
className: cn("px-2 py-1.5 text-
|
|
151
|
+
className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:ps-8", className),
|
|
152
152
|
"data-inset": inset,
|
|
153
153
|
"data-slot": "menubar-label",
|
|
154
154
|
...props
|
|
@@ -169,7 +169,7 @@ function MenubarSeparator({ className, ...props }) {
|
|
|
169
169
|
*/
|
|
170
170
|
function MenubarShortcut({ className, ...props }) {
|
|
171
171
|
return /* @__PURE__ */ jsx("span", {
|
|
172
|
-
className: cn("
|
|
172
|
+
className: cn("ms-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground", className),
|
|
173
173
|
"data-slot": "menubar-shortcut",
|
|
174
174
|
...props
|
|
175
175
|
});
|
|
@@ -11,13 +11,13 @@ function NativeSelect({ className, size = "default", ...props }) {
|
|
|
11
11
|
"data-size": size,
|
|
12
12
|
"data-slot": "native-select-wrapper",
|
|
13
13
|
children: [/* @__PURE__ */ jsx("select", {
|
|
14
|
-
className: "h-9 w-full min-w-0 appearance-none rounded-md border border-input bg-transparent py-1
|
|
14
|
+
className: "h-9 w-full min-w-0 appearance-none rounded-md border border-input bg-transparent py-1 ps-2.5 pe-8 text-sm shadow-xs transition-[color,box-shadow] outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-8 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
15
15
|
"data-size": size,
|
|
16
16
|
"data-slot": "native-select",
|
|
17
17
|
...props
|
|
18
18
|
}), /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
19
19
|
"aria-hidden": "true",
|
|
20
|
-
className: "pointer-events-none absolute top-1/2
|
|
20
|
+
className: "pointer-events-none absolute end-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground select-none",
|
|
21
21
|
"data-slot": "native-select-icon"
|
|
22
22
|
})]
|
|
23
23
|
});
|
|
@@ -50,7 +50,7 @@ function NavigationMenuTrigger({ children, className, ...props }) {
|
|
|
50
50
|
" ",
|
|
51
51
|
/* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
52
52
|
"aria-hidden": "true",
|
|
53
|
-
className: "relative top-px
|
|
53
|
+
className: "relative top-px ms-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180"
|
|
54
54
|
})
|
|
55
55
|
]
|
|
56
56
|
});
|
|
@@ -60,7 +60,7 @@ function NavigationMenuTrigger({ children, className, ...props }) {
|
|
|
60
60
|
*/
|
|
61
61
|
function NavigationMenuContent({ className, ...props }) {
|
|
62
62
|
return /* @__PURE__ */ jsx(NavigationMenu$1.Content, {
|
|
63
|
-
className: cn("
|
|
63
|
+
className: cn("start-0 top-0 w-full p-2 pe-2.5 ease-snappy group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:animation-duration-300 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:ease-exit data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none md:absolute md:w-auto group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 data-closed:ease-exit group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95", className),
|
|
64
64
|
"data-slot": "navigation-menu-content",
|
|
65
65
|
...props
|
|
66
66
|
});
|
|
@@ -80,7 +80,7 @@ function NavigationMenuLink({ className, ...props }) {
|
|
|
80
80
|
*/
|
|
81
81
|
function NavigationMenuViewport({ className, ...props }) {
|
|
82
82
|
return /* @__PURE__ */ jsx("div", {
|
|
83
|
-
className: "absolute top-full
|
|
83
|
+
className: "absolute start-0 top-full isolate z-50 flex justify-center",
|
|
84
84
|
children: /* @__PURE__ */ jsx(NavigationMenu$1.Viewport, {
|
|
85
85
|
className: cn("relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full origin-[top_center] overflow-hidden rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 transition-[width,height] duration-100 ease-snappy md:w-(--radix-navigation-menu-viewport-width) data-open:animate-in data-open:animation-duration-100 data-open:zoom-in-90 data-closed:animate-out data-closed:ease-exit data-closed:animation-duration-100 data-closed:zoom-out-90", className),
|
|
86
86
|
"data-slot": "navigation-menu-viewport",
|
|
@@ -96,7 +96,7 @@ function NavigationMenuIndicator({ className, ...props }) {
|
|
|
96
96
|
className: cn("top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-hidden:animate-out data-hidden:fade-out data-visible:animate-in data-visible:fade-in", className),
|
|
97
97
|
"data-slot": "navigation-menu-indicator",
|
|
98
98
|
...props,
|
|
99
|
-
children: /* @__PURE__ */ jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-
|
|
99
|
+
children: /* @__PURE__ */ jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-ss-sm bg-border shadow-md" })
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
//#endregion
|
|
@@ -56,7 +56,7 @@ function PaginationLink({ children, className, isActive, size = "icon", ...props
|
|
|
56
56
|
function PaginationPrevious({ className, text = "Previous", ...props }) {
|
|
57
57
|
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
58
58
|
"aria-label": "Go to previous page",
|
|
59
|
-
className: cn("
|
|
59
|
+
className: cn("ps-2!", className),
|
|
60
60
|
"data-slot": "pagination-previous",
|
|
61
61
|
size: "default",
|
|
62
62
|
...props,
|
|
@@ -75,7 +75,7 @@ function PaginationPrevious({ className, text = "Previous", ...props }) {
|
|
|
75
75
|
function PaginationNext({ className, text = "Next", ...props }) {
|
|
76
76
|
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
77
77
|
"aria-label": "Go to next page",
|
|
78
|
-
className: cn("
|
|
78
|
+
className: cn("pe-2!", className),
|
|
79
79
|
"data-slot": "pagination-next",
|
|
80
80
|
size: "default",
|
|
81
81
|
...props,
|
|
@@ -26,7 +26,7 @@ function RadioCardsItem({ children, className, ...props }) {
|
|
|
26
26
|
children: /* @__PURE__ */ jsx(RadioGroup.Indicator, {
|
|
27
27
|
className: "flex size-4 items-center justify-center",
|
|
28
28
|
"data-slot": "radio-card-indicator",
|
|
29
|
-
children: /* @__PURE__ */ jsx("span", { className: "absolute
|
|
29
|
+
children: /* @__PURE__ */ jsx("span", { className: "absolute start-1/2 top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 animate-in rounded-full bg-primary-foreground duration-control-indicator ease-spring zoom-in-50 rtl:translate-x-1/2" })
|
|
30
30
|
})
|
|
31
31
|
}), children]
|
|
32
32
|
});
|
|
@@ -7,7 +7,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
7
7
|
*/
|
|
8
8
|
function RadioGroup({ className, ...props }) {
|
|
9
9
|
return /* @__PURE__ */ jsx(RadioGroup$1.Root, {
|
|
10
|
-
className: cn("
|
|
10
|
+
className: cn("flex flex-col gap-3", className),
|
|
11
11
|
"data-slot": "radio-group",
|
|
12
12
|
...props
|
|
13
13
|
});
|
|
@@ -23,7 +23,7 @@ function RadioGroupItem({ className, ...props }) {
|
|
|
23
23
|
children: /* @__PURE__ */ jsx(RadioGroup$1.Indicator, {
|
|
24
24
|
className: "flex size-4 items-center justify-center",
|
|
25
25
|
"data-slot": "radio-group-indicator",
|
|
26
|
-
children: /* @__PURE__ */ jsx("span", { className: "absolute
|
|
26
|
+
children: /* @__PURE__ */ jsx("span", { className: "absolute start-1/2 top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 animate-in rounded-full bg-primary-foreground duration-control-indicator ease-spring zoom-in-50 rtl:translate-x-1/2" })
|
|
27
27
|
})
|
|
28
28
|
});
|
|
29
29
|
}
|
|
@@ -7,7 +7,7 @@ import { composeEventHandlers } from "radix-ui/internal";
|
|
|
7
7
|
*/
|
|
8
8
|
function Radio({ className, onChange, onValueChange, ...props }) {
|
|
9
9
|
return /* @__PURE__ */ jsx("input", {
|
|
10
|
-
className: cn("peer relative flex size-4 shrink-0 appearance-none items-center justify-center rounded-full border border-input shadow-xs outline-none before:size-
|
|
10
|
+
className: cn("peer relative flex size-4 shrink-0 appearance-none items-center justify-center rounded-full border border-input bg-background shadow-xs outline-none before:size-2 before:scale-0 before:rounded-full before:bg-primary-foreground before:transition-transform before:duration-control-indicator before:ease-spring after:absolute after:-inset-x-3 after:-inset-y-2 checked:border-primary checked:bg-primary checked:before:scale-100 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:not-checked:border-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 checked:aria-invalid:bg-destructive dark:not-checked:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
11
11
|
"data-slot": "radio",
|
|
12
12
|
type: "radio",
|
|
13
13
|
onChange: composeEventHandlers(onChange, (event) => onValueChange?.(event.currentTarget.value)),
|
|
@@ -26,7 +26,7 @@ function ResizablePanel({ ...props }) {
|
|
|
26
26
|
*/
|
|
27
27
|
function ResizableSeparator({ className, withHandle, ...props }) {
|
|
28
28
|
return /* @__PURE__ */ jsx(ResizablePrimitive.Separator, {
|
|
29
|
-
className: cn("relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:
|
|
29
|
+
className: cn("relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:start-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:start-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 rtl:after:translate-x-1/2 rtl:aria-[orientation=horizontal]:after:-translate-x-0 [&[aria-orientation=horizontal]>div]:rotate-90", className),
|
|
30
30
|
"data-slot": "resizable-separator",
|
|
31
31
|
...props,
|
|
32
32
|
children: withHandle ? /* @__PURE__ */ jsx("div", { className: "z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" }) : null
|
|
@@ -36,7 +36,7 @@ function SelectValue({ ...props }) {
|
|
|
36
36
|
*/
|
|
37
37
|
function SelectTrigger({ children, className, size = "default", ...props }) {
|
|
38
38
|
return /* @__PURE__ */ jsxs(Select$1.Trigger, {
|
|
39
|
-
className: cn("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2
|
|
39
|
+
className: cn("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 ps-2.5 pe-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
40
40
|
"data-size": size,
|
|
41
41
|
"data-slot": "select-trigger",
|
|
42
42
|
...props,
|
|
@@ -76,7 +76,7 @@ function SelectContent({ align = "center", children, className, position = "item
|
|
|
76
76
|
"data-slot": "select-portal",
|
|
77
77
|
children: /* @__PURE__ */ jsxs(Select$1.Content, {
|
|
78
78
|
align,
|
|
79
|
-
className: cn("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 ease-snappy data-[align-trigger=true]:animate-none data-open:animate-in data-open:animation-duration-menu-in data-open:fade-in-0 data-open:zoom-in-95 data-open:data-side-top:slide-in-from-bottom-2 data-open:data-side-right:slide-in-from-left-2 data-open:data-side-bottom:slide-in-from-top-2 data-open:data-side-left:slide-in-from-right-2 data-closed:animate-out data-closed:ease-exit data-closed:animation-duration-menu-out data-closed:fade-out-0 data-closed:zoom-out-95 data-closed:data-side-top:slide-out-to-bottom-2 data-closed:data-side-right:slide-out-to-left-2 data-closed:data-side-bottom:slide-out-to-top-2 data-closed:data-side-left:slide-out-to-right-2", position === "popper" && "data-side-top:-translate-y-1 data-side-right:translate-x-1 data-side-bottom:translate-y-1 data-side-left:-translate-x-1", className),
|
|
79
|
+
className: cn("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 ease-snappy data-[align-trigger=true]:animate-none data-open:animate-in data-open:animation-duration-menu-in data-open:fade-in-0 data-open:zoom-in-95 data-open:data-side-top:slide-in-from-bottom-2 data-open:data-side-right:slide-in-from-left-2 data-open:data-side-bottom:slide-in-from-top-2 data-open:data-side-left:slide-in-from-right-2 data-closed:animate-out data-closed:ease-exit data-closed:animation-duration-menu-out data-closed:fade-out-0 data-closed:zoom-out-95 data-closed:data-side-top:slide-out-to-bottom-2 data-closed:data-side-right:slide-out-to-left-2 data-closed:data-side-bottom:slide-out-to-top-2 data-closed:data-side-left:slide-out-to-right-2", position === "popper" && "data-side-top:-translate-y-1 data-side-right:translate-x-1 rtl:data-side-right:-translate-x-1 data-side-bottom:translate-y-1 data-side-left:-translate-x-1 rtl:data-side-left:translate-x-1", className),
|
|
80
80
|
"data-align-trigger": position === "item-aligned",
|
|
81
81
|
"data-slot": "select-content",
|
|
82
82
|
position,
|
|
@@ -108,11 +108,11 @@ function SelectLabel({ className, ...props }) {
|
|
|
108
108
|
*/
|
|
109
109
|
function SelectItem({ children, className, ...props }) {
|
|
110
110
|
return /* @__PURE__ */ jsxs(Select$1.Item, {
|
|
111
|
-
className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5
|
|
111
|
+
className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
112
112
|
"data-slot": "select-item",
|
|
113
113
|
...props,
|
|
114
114
|
children: [/* @__PURE__ */ jsx("span", {
|
|
115
|
-
className: "pointer-events-none absolute
|
|
115
|
+
className: "pointer-events-none absolute end-2 flex size-4 items-center justify-center",
|
|
116
116
|
children: /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none" }) })
|
|
117
117
|
}), /* @__PURE__ */ jsx(Select$1.ItemText, { children })]
|
|
118
118
|
});
|
|
@@ -42,7 +42,7 @@ function SheetContent({ children, className, showCloseButton = true, side = "rig
|
|
|
42
42
|
...props,
|
|
43
43
|
children: [children, showCloseButton ? /* @__PURE__ */ jsxs(Dialog.Close, {
|
|
44
44
|
className: buttonVariants({
|
|
45
|
-
className: "absolute top-4
|
|
45
|
+
className: "absolute top-4 end-4",
|
|
46
46
|
size: "icon-sm",
|
|
47
47
|
variant: "ghost"
|
|
48
48
|
}),
|
|
@@ -159,7 +159,7 @@ const SIDEBAR_RAIL_NAME = "SidebarRail";
|
|
|
159
159
|
function SidebarRail({ className, ...props }) {
|
|
160
160
|
const { toggleSidebar } = useSidebar(SIDEBAR_RAIL_NAME);
|
|
161
161
|
return /* @__PURE__ */ jsx("button", {
|
|
162
|
-
className: cn("absolute inset-y-0 z-20 hidden w-4 transition-all ease-gentle group-data-[collapsible=offcanvas]:translate-x-0 group-data-side-right:left-0 group-data-side-left:-right-4 after:absolute after:inset-y-0 after:inset-s-1/2 after:w-0.5 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar hover:after:bg-sidebar-border in-data-side-right:cursor-e-resize in-data-side-left:cursor-w-resize sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2 [[data-side=left][data-collapsible=offcanvas]_&]:-right-2 [[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-collapsible=offcanvas]_&]:-left-2 [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", className),
|
|
162
|
+
className: cn("absolute inset-y-0 z-20 hidden w-4 transition-all ease-gentle group-data-[collapsible=offcanvas]:translate-x-0 group-data-side-right:left-0 group-data-side-left:-right-4 after:absolute after:inset-y-0 after:inset-s-1/2 after:w-0.5 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar hover:after:bg-sidebar-border in-data-side-right:cursor-e-resize in-data-side-left:cursor-w-resize sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2 rtl:group-data-[collapsible=offcanvas]:-translate-x-0 rtl:in-data-side-right:cursor-w-resize rtl:in-data-side-left:cursor-e-resize [[data-side=left][data-collapsible=offcanvas]_&]:-right-2 [[data-side=left][data-state=collapsed]_&]:cursor-e-resize rtl:[[data-side=left][data-state=collapsed]_&]:cursor-w-resize [[data-side=right][data-collapsible=offcanvas]_&]:-left-2 [[data-side=right][data-state=collapsed]_&]:cursor-w-resize rtl:[[data-side=right][data-state=collapsed]_&]:cursor-e-resize", className),
|
|
163
163
|
"data-sidebar": "rail",
|
|
164
164
|
"data-slot": "sidebar-rail",
|
|
165
165
|
title: "Toggle Sidebar",
|
|
@@ -173,7 +173,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
173
173
|
*/
|
|
174
174
|
function SidebarInset({ className, ...props }) {
|
|
175
175
|
return /* @__PURE__ */ jsx("main", {
|
|
176
|
-
className: cn("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:
|
|
176
|
+
className: cn("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-collapsed:ms-2", className),
|
|
177
177
|
"data-slot": "sidebar-inset",
|
|
178
178
|
...props
|
|
179
179
|
});
|
|
@@ -260,7 +260,7 @@ function SidebarGroupLabel({ asChild = false, className, ...props }) {
|
|
|
260
260
|
*/
|
|
261
261
|
function SidebarGroupAction({ asChild = false, className, ...props }) {
|
|
262
262
|
return /* @__PURE__ */ jsx(asChild ? Slot.Root : "button", {
|
|
263
|
-
className: cn("absolute top-3.5
|
|
263
|
+
className: cn("absolute end-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", className),
|
|
264
264
|
"data-sidebar": "group-action",
|
|
265
265
|
"data-slot": "sidebar-group-action",
|
|
266
266
|
...props
|
|
@@ -335,7 +335,7 @@ function SidebarMenuButton({ asChild = false, className, isActive = false, size
|
|
|
335
335
|
*/
|
|
336
336
|
function SidebarMenuAction({ asChild = false, className, showOnHover = false, ...props }) {
|
|
337
337
|
return /* @__PURE__ */ jsx(asChild ? Slot.Root : "button", {
|
|
338
|
-
className: cn("absolute top-1.5
|
|
338
|
+
className: cn("absolute end-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0", className),
|
|
339
339
|
"data-sidebar": "menu-action",
|
|
340
340
|
"data-slot": "sidebar-menu-action",
|
|
341
341
|
...props
|
|
@@ -346,7 +346,7 @@ function SidebarMenuAction({ asChild = false, className, showOnHover = false, ..
|
|
|
346
346
|
*/
|
|
347
347
|
function SidebarMenuBadge({ className, ...props }) {
|
|
348
348
|
return /* @__PURE__ */ jsx("div", {
|
|
349
|
-
className: cn("pointer-events-none absolute
|
|
349
|
+
className: cn("pointer-events-none absolute end-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground", className),
|
|
350
350
|
"data-sidebar": "menu-badge",
|
|
351
351
|
"data-slot": "sidebar-menu-badge",
|
|
352
352
|
...props
|
|
@@ -377,7 +377,7 @@ function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
|
377
377
|
*/
|
|
378
378
|
function SidebarMenuSub({ className, ...props }) {
|
|
379
379
|
return /* @__PURE__ */ jsx("ul", {
|
|
380
|
-
className: cn("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-
|
|
380
|
+
className: cn("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-s border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden rtl:-translate-x-px", className),
|
|
381
381
|
"data-sidebar": "menu-sub",
|
|
382
382
|
"data-slot": "sidebar-menu-sub",
|
|
383
383
|
...props
|
|
@@ -399,7 +399,7 @@ function SidebarMenuSubItem({ className, ...props }) {
|
|
|
399
399
|
*/
|
|
400
400
|
function SidebarMenuSubButton({ asChild = false, className, isActive = false, size = "md", ...props }) {
|
|
401
401
|
return /* @__PURE__ */ jsx(asChild ? Slot.Root : "a", {
|
|
402
|
-
className: cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden 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-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", className),
|
|
402
|
+
className: cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden 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-[size=md]:text-sm data-[size=sm]:text-xs rtl:translate-x-px data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", className),
|
|
403
403
|
"data-active": isActive,
|
|
404
404
|
"data-sidebar": "menu-sub-button",
|
|
405
405
|
"data-size": size,
|
|
@@ -7,12 +7,12 @@ import { jsx } from "react/jsx-runtime";
|
|
|
7
7
|
*/
|
|
8
8
|
function Switch({ className, size = "default", ...props }) {
|
|
9
9
|
return /* @__PURE__ */ jsx(Switch$1.Root, {
|
|
10
|
-
className: cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-
|
|
10
|
+
className: cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all duration-control ease-snappy outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-4.5 data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
11
11
|
"data-size": size,
|
|
12
12
|
"data-slot": "switch",
|
|
13
13
|
...props,
|
|
14
14
|
children: /* @__PURE__ */ jsx(Switch$1.Thumb, {
|
|
15
|
-
className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-
|
|
15
|
+
className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform duration-control-indicator ease-spring group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-3.5 group-data-[size=sm]/switch:data-checked:translate-x-2.5 rtl:group-data-[size=default]/switch:data-checked:-translate-x-3.5 rtl:group-data-[size=sm]/switch:data-checked:-translate-x-2.5 dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 rtl:group-data-[size=default]/switch:data-unchecked:-translate-x-0 rtl:group-data-[size=sm]/switch:data-unchecked:-translate-x-0 dark:data-unchecked:bg-foreground",
|
|
16
16
|
"data-slot": "switch-thumb"
|
|
17
17
|
})
|
|
18
18
|
});
|
|
@@ -60,7 +60,7 @@ function TableRow({ className, ...props }) {
|
|
|
60
60
|
*/
|
|
61
61
|
function TableHead({ className, ...props }) {
|
|
62
62
|
return /* @__PURE__ */ jsx("th", {
|
|
63
|
-
className: cn("h-10 px-2 text-
|
|
63
|
+
className: cn("h-10 px-2 text-start align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pe-0", className),
|
|
64
64
|
"data-slot": "table-head",
|
|
65
65
|
...props
|
|
66
66
|
});
|
|
@@ -70,7 +70,7 @@ function TableHead({ className, ...props }) {
|
|
|
70
70
|
*/
|
|
71
71
|
function TableCell({ className, ...props }) {
|
|
72
72
|
return /* @__PURE__ */ jsx("td", {
|
|
73
|
-
className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:
|
|
73
|
+
className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0", className),
|
|
74
74
|
"data-slot": "table-cell",
|
|
75
75
|
...props
|
|
76
76
|
});
|
package/dist/components/tabs.mjs
CHANGED
|
@@ -34,7 +34,7 @@ function TabsList({ className, variant = "default", ...props }) {
|
|
|
34
34
|
*/
|
|
35
35
|
function TabsTrigger({ className, ...props }) {
|
|
36
36
|
return /* @__PURE__ */ jsx(Tabs$1.Trigger, {
|
|
37
|
-
className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:
|
|
37
|
+
className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:-bottom-1.25 group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-end-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className),
|
|
38
38
|
"data-slot": "tabs-trigger",
|
|
39
39
|
...props
|
|
40
40
|
});
|
|
@@ -41,7 +41,7 @@ function ToggleGroupItem({ __scopeToggleGroup, className, size = "default", vari
|
|
|
41
41
|
const context = useToggleGroupContext(TOGGLE_GROUP_ITEM_NAME, __scopeToggleGroup);
|
|
42
42
|
const toggleGroupScope = useToggleGroupScope(__scopeToggleGroup);
|
|
43
43
|
return /* @__PURE__ */ jsx(ToggleGroup$1.Item, {
|
|
44
|
-
className: cn("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-[spacing=0]/toggle-group:shadow-none focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:
|
|
44
|
+
className: cn("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-[spacing=0]/toggle-group:shadow-none focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pe-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:ps-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-s-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-e-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-s-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-s group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t data-on:bg-muted", toggleVariants({
|
|
45
45
|
className,
|
|
46
46
|
size: context.size ?? size,
|
|
47
47
|
variant: context.variant ?? variant
|
|
@@ -37,7 +37,7 @@ function TooltipContent({ children, className, sideOffset = 0, ...props }) {
|
|
|
37
37
|
return /* @__PURE__ */ jsx(Tooltip$1.Portal, {
|
|
38
38
|
"data-slot": "tooltip-portal",
|
|
39
39
|
children: /* @__PURE__ */ jsxs(Tooltip$1.Content, {
|
|
40
|
-
className: cn("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background ease-snappy has-data-[slot=kbd]:
|
|
40
|
+
className: cn("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background ease-snappy has-data-[slot=kbd]:pe-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-open:animate-in data-open:animation-duration-menu-in data-open:fade-in-0 data-open:zoom-in-95 data-open:data-side-top:slide-in-from-bottom-2 data-open:data-side-right:slide-in-from-left-2 data-open:data-side-bottom:slide-in-from-top-2 data-open:data-side-left:slide-in-from-right-2 data-closed:animate-out data-closed:ease-exit data-closed:animation-duration-menu-out data-closed:fade-out-0 data-closed:zoom-out-95 data-closed:data-side-top:slide-out-to-bottom-2 data-closed:data-side-right:slide-out-to-left-2 data-closed:data-side-bottom:slide-out-to-top-2 data-closed:data-side-left:slide-out-to-right-2 data-delayed-open:animate-in data-delayed-open:animation-duration-menu-in data-delayed-open:fade-in-0 data-delayed-open:zoom-in-95 data-delayed-open:data-side-top:slide-in-from-bottom-2 data-delayed-open:data-side-right:slide-in-from-left-2 data-delayed-open:data-side-bottom:slide-in-from-top-2 data-delayed-open:data-side-left:slide-in-from-right-2", className),
|
|
41
41
|
"data-slot": "tooltip-content",
|
|
42
42
|
sideOffset,
|
|
43
43
|
...props,
|
package/dist/variants/alert.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { tv } from "../lib/utils.mjs";
|
|
|
4
4
|
* @since 0.3.16-canary.0
|
|
5
5
|
*/
|
|
6
6
|
const alertVariants = tv({
|
|
7
|
-
base: "group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-
|
|
7
|
+
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",
|
|
8
8
|
defaultVariants: { variant: "default" },
|
|
9
9
|
variants: { variant: {
|
|
10
10
|
default: "bg-card text-card-foreground",
|
package/dist/variants/badge.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { tv } from "../lib/utils.mjs";
|
|
|
4
4
|
* @since 0.3.16-canary.0
|
|
5
5
|
*/
|
|
6
6
|
const badgeVariants = tv({
|
|
7
|
-
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]:
|
|
7
|
+
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!",
|
|
8
8
|
defaultVariants: { variant: "default" },
|
|
9
9
|
variants: { variant: {
|
|
10
10
|
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
@@ -4,10 +4,10 @@ import { tv } from "../lib/utils.mjs";
|
|
|
4
4
|
* @since 0.3.16-canary.0
|
|
5
5
|
*/
|
|
6
6
|
const buttonGroupVariants = tv({
|
|
7
|
-
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-
|
|
7
|
+
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",
|
|
8
8
|
defaultVariants: { orientation: "horizontal" },
|
|
9
9
|
variants: { orientation: {
|
|
10
|
-
horizontal: "[&>*:not(:first-child)]:rounded-
|
|
10
|
+
horizontal: "[&>*: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!",
|
|
11
11
|
vertical: "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!"
|
|
12
12
|
} }
|
|
13
13
|
});
|
package/dist/variants/button.mjs
CHANGED
|
@@ -11,10 +11,10 @@ const buttonVariants = tv({
|
|
|
11
11
|
},
|
|
12
12
|
variants: {
|
|
13
13
|
size: {
|
|
14
|
-
default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:
|
|
15
|
-
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]:
|
|
16
|
-
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]:
|
|
17
|
-
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:
|
|
14
|
+
default: "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",
|
|
15
|
+
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",
|
|
16
|
+
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",
|
|
17
|
+
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
|
|
18
18
|
icon: "size-9",
|
|
19
19
|
"icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
20
20
|
"icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
|
|
@@ -3,7 +3,7 @@ import { tv } from "../lib/utils.mjs";
|
|
|
3
3
|
/**
|
|
4
4
|
* @since 0.3.16-canary.0
|
|
5
5
|
*/
|
|
6
|
-
const inputGroupVariants = tv({ 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]:
|
|
6
|
+
const inputGroupVariants = tv({ 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" });
|
|
7
7
|
/**
|
|
8
8
|
* @since 0.3.16-canary.0
|
|
9
9
|
*/
|
|
@@ -13,8 +13,8 @@ const inputGroupAddonVariants = tv({
|
|
|
13
13
|
variants: { align: {
|
|
14
14
|
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2",
|
|
15
15
|
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
16
|
-
"inline-end": "order-last
|
|
17
|
-
"inline-start": "order-first
|
|
16
|
+
"inline-end": "order-last pe-2 has-[>button]:-me-1 has-[>kbd]:me-[-0.15rem]",
|
|
17
|
+
"inline-start": "order-first ps-2 has-[>button]:-ms-1 has-[>kbd]:ms-[-0.15rem]"
|
|
18
18
|
} }
|
|
19
19
|
});
|
|
20
20
|
/**
|
|
@@ -9,11 +9,11 @@ const inputNumberVariants = tv({
|
|
|
9
9
|
/**
|
|
10
10
|
* Split layout: trailing increment button (always on the inline end).
|
|
11
11
|
*/
|
|
12
|
-
incrementButton: "order-last h-full w-9 shrink-0 rounded-none rounded-
|
|
12
|
+
incrementButton: "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",
|
|
13
13
|
/**
|
|
14
14
|
* Split layout: leading decrement button (always on the inline start).
|
|
15
15
|
*/
|
|
16
|
-
decrementButton: "order-first h-full w-9 shrink-0 rounded-none rounded-
|
|
16
|
+
decrementButton: "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",
|
|
17
17
|
/**
|
|
18
18
|
* Editable numeric input.
|
|
19
19
|
*/
|
|
@@ -25,7 +25,7 @@ const inputNumberVariants = tv({
|
|
|
25
25
|
/**
|
|
26
26
|
* Stepper layout: stacked chevron column on the trailing edge.
|
|
27
27
|
*/
|
|
28
|
-
stepper: "order-last grid h-full w-8 shrink-0 divide-y divide-input border-
|
|
28
|
+
stepper: "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",
|
|
29
29
|
/**
|
|
30
30
|
* Stepper layout: individual chevron button (shared by increment/decrement).
|
|
31
31
|
*/
|
|
@@ -4,7 +4,7 @@ import { tv } from "../lib/utils.mjs";
|
|
|
4
4
|
* @since 0.3.16-canary.0
|
|
5
5
|
*/
|
|
6
6
|
const scrollAreaScrollbarVariants = tv({
|
|
7
|
-
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-
|
|
7
|
+
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",
|
|
8
8
|
compoundVariants: [
|
|
9
9
|
{
|
|
10
10
|
className: "w-1.5",
|
package/dist/variants/sheet.mjs
CHANGED
|
@@ -8,8 +8,8 @@ const sheetContentVariants = tv({
|
|
|
8
8
|
defaultVariants: { side: "right" },
|
|
9
9
|
variants: { side: {
|
|
10
10
|
bottom: "inset-x-0 bottom-0 h-auto border-t data-open:slide-in-from-bottom-10 data-closed:slide-out-to-bottom-10",
|
|
11
|
-
left: "inset-y-0
|
|
12
|
-
right: "inset-y-0
|
|
11
|
+
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",
|
|
12
|
+
right: "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",
|
|
13
13
|
top: "inset-x-0 top-0 h-auto border-b data-open:slide-in-from-top-10 data-closed:slide-out-to-top-10"
|
|
14
14
|
} }
|
|
15
15
|
});
|
|
@@ -4,7 +4,7 @@ import { tv } from "../lib/utils.mjs";
|
|
|
4
4
|
* @since 0.3.16-canary.0
|
|
5
5
|
*/
|
|
6
6
|
const sidebarMenuButtonVariants = tv({
|
|
7
|
-
base: "peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-
|
|
7
|
+
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",
|
|
8
8
|
defaultVariants: {
|
|
9
9
|
size: "default",
|
|
10
10
|
variant: "default"
|
package/dist/variants/toggle.mjs
CHANGED
|
@@ -11,9 +11,9 @@ const toggleVariants = tv({
|
|
|
11
11
|
},
|
|
12
12
|
variants: {
|
|
13
13
|
size: {
|
|
14
|
-
default: "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:
|
|
15
|
-
sm: "h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:
|
|
16
|
-
lg: "h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:
|
|
14
|
+
default: "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
|
|
15
|
+
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",
|
|
16
|
+
lg: "h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2"
|
|
17
17
|
},
|
|
18
18
|
variant: {
|
|
19
19
|
default: "bg-transparent",
|