@galaui/react 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/components/ui/accordion.cjs +1 -0
- package/dist/components/ui/accordion.js +38 -0
- package/dist/components/ui/alert-dialog.cjs +1 -0
- package/dist/components/ui/alert-dialog.js +65 -0
- package/dist/components/ui/alert.cjs +1 -0
- package/dist/components/ui/alert.js +36 -0
- package/dist/components/ui/aspect-ratio.cjs +1 -0
- package/dist/components/ui/aspect-ratio.js +18 -0
- package/dist/components/ui/avatar.cjs +1 -0
- package/dist/components/ui/avatar.js +37 -0
- package/dist/components/ui/badge.cjs +1 -0
- package/dist/components/ui/badge.js +41 -0
- package/dist/components/ui/breadcrumb.cjs +1 -0
- package/dist/components/ui/breadcrumb.js +60 -0
- package/dist/components/ui/button.cjs +1 -0
- package/dist/components/ui/button.js +46 -0
- package/dist/components/ui/card.cjs +1 -0
- package/dist/components/ui/card.js +43 -0
- package/dist/components/ui/checkbox-group.cjs +1 -0
- package/dist/components/ui/checkbox-group.js +14 -0
- package/dist/components/ui/checkbox.cjs +1 -0
- package/dist/components/ui/checkbox.js +22 -0
- package/dist/components/ui/collapsible.cjs +1 -0
- package/dist/components/ui/collapsible.js +20 -0
- package/dist/components/ui/context-menu.cjs +1 -0
- package/dist/components/ui/context-menu.js +68 -0
- package/dist/components/ui/dialog.cjs +1 -0
- package/dist/components/ui/dialog.js +53 -0
- package/dist/components/ui/drawer.cjs +1 -0
- package/dist/components/ui/drawer.js +59 -0
- package/dist/components/ui/dropdown-menu.cjs +1 -0
- package/dist/components/ui/dropdown-menu.js +72 -0
- package/dist/components/ui/empty-state.cjs +1 -0
- package/dist/components/ui/empty-state.js +35 -0
- package/dist/components/ui/field.cjs +1 -0
- package/dist/components/ui/field.js +38 -0
- package/dist/components/ui/input-otp.cjs +1 -0
- package/dist/components/ui/input-otp.js +29 -0
- package/dist/components/ui/input.cjs +1 -0
- package/dist/components/ui/input.js +30 -0
- package/dist/components/ui/kbd.cjs +1 -0
- package/dist/components/ui/kbd.js +13 -0
- package/dist/components/ui/menubar.cjs +1 -0
- package/dist/components/ui/menubar.js +51 -0
- package/dist/components/ui/meter.cjs +1 -0
- package/dist/components/ui/meter.js +39 -0
- package/dist/components/ui/navigation-menu.cjs +1 -0
- package/dist/components/ui/navigation-menu.js +63 -0
- package/dist/components/ui/number-field.cjs +1 -0
- package/dist/components/ui/number-field.js +41 -0
- package/dist/components/ui/pagination.cjs +1 -0
- package/dist/components/ui/pagination.js +67 -0
- package/dist/components/ui/popover.cjs +1 -0
- package/dist/components/ui/popover.js +25 -0
- package/dist/components/ui/preview-card.cjs +1 -0
- package/dist/components/ui/preview-card.js +28 -0
- package/dist/components/ui/progress.cjs +1 -0
- package/dist/components/ui/progress.js +39 -0
- package/dist/components/ui/radio-group.cjs +1 -0
- package/dist/components/ui/radio-group.js +24 -0
- package/dist/components/ui/scroll-area.cjs +1 -0
- package/dist/components/ui/scroll-area.js +42 -0
- package/dist/components/ui/select.cjs +1 -0
- package/dist/components/ui/select.js +97 -0
- package/dist/components/ui/separator.cjs +1 -0
- package/dist/components/ui/separator.js +15 -0
- package/dist/components/ui/skeleton.cjs +1 -0
- package/dist/components/ui/skeleton.js +13 -0
- package/dist/components/ui/slider.cjs +1 -0
- package/dist/components/ui/slider.js +93 -0
- package/dist/components/ui/switch.cjs +1 -0
- package/dist/components/ui/switch.js +35 -0
- package/dist/components/ui/table.cjs +1 -0
- package/dist/components/ui/table.js +58 -0
- package/dist/components/ui/tabs.cjs +1 -0
- package/dist/components/ui/tabs.js +49 -0
- package/dist/components/ui/toast.cjs +1 -0
- package/dist/components/ui/toast.js +131 -0
- package/dist/components/ui/toggle-group.cjs +1 -0
- package/dist/components/ui/toggle-group.js +35 -0
- package/dist/components/ui/toggle.cjs +1 -0
- package/dist/components/ui/toggle.js +35 -0
- package/dist/components/ui/tooltip.cjs +1 -0
- package/dist/components/ui/tooltip.js +18 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +46 -1692
- package/dist/lib/utils.js +3 -0
- package/dist/tokens/index.cjs +1 -0
- package/dist/tokens/index.js +135 -0
- package/package.json +9 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { buttonVariants as t } from "./button.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
import { ChevronLeft as a, ChevronRight as o, MoreHorizontal as s } from "lucide-react";
|
|
7
|
+
//#region src/components/ui/pagination.tsx
|
|
8
|
+
var c = ({ className: t, ...n }) => /* @__PURE__ */ r("nav", {
|
|
9
|
+
role: "navigation",
|
|
10
|
+
"aria-label": "pagination",
|
|
11
|
+
className: e("mx-auto flex w-full justify-center", t),
|
|
12
|
+
...n
|
|
13
|
+
});
|
|
14
|
+
c.displayName = "Pagination";
|
|
15
|
+
var l = n.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r("ul", {
|
|
16
|
+
ref: i,
|
|
17
|
+
className: e("flex flex-row items-center gap-1", t),
|
|
18
|
+
...n
|
|
19
|
+
}));
|
|
20
|
+
l.displayName = "PaginationContent";
|
|
21
|
+
var u = n.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r("li", {
|
|
22
|
+
ref: i,
|
|
23
|
+
className: e("", t),
|
|
24
|
+
...n
|
|
25
|
+
}));
|
|
26
|
+
u.displayName = "PaginationItem";
|
|
27
|
+
var d = ({ className: n, isActive: i, ...a }) => /* @__PURE__ */ r("a", {
|
|
28
|
+
"aria-current": i ? "page" : void 0,
|
|
29
|
+
className: e(t({
|
|
30
|
+
variant: i ? "outline" : "ghost",
|
|
31
|
+
size: "sm"
|
|
32
|
+
}), "h-8 w-8 p-0 cursor-pointer", i && "bg-muted font-semibold text-foreground border-border", n),
|
|
33
|
+
...a
|
|
34
|
+
});
|
|
35
|
+
d.displayName = "PaginationLink";
|
|
36
|
+
var f = ({ className: t, ...n }) => /* @__PURE__ */ i(d, {
|
|
37
|
+
"aria-label": "Go to previous page",
|
|
38
|
+
className: e("gap-1 pl-2.5 w-auto px-3", t),
|
|
39
|
+
...n,
|
|
40
|
+
children: [/* @__PURE__ */ r(a, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ r("span", {
|
|
41
|
+
className: "hidden sm:inline text-xs",
|
|
42
|
+
children: "Previous"
|
|
43
|
+
})]
|
|
44
|
+
});
|
|
45
|
+
f.displayName = "PaginationPrevious";
|
|
46
|
+
var p = ({ className: t, ...n }) => /* @__PURE__ */ i(d, {
|
|
47
|
+
"aria-label": "Go to next page",
|
|
48
|
+
className: e("gap-1 pr-2.5 w-auto px-3", t),
|
|
49
|
+
...n,
|
|
50
|
+
children: [/* @__PURE__ */ r("span", {
|
|
51
|
+
className: "hidden sm:inline text-xs",
|
|
52
|
+
children: "Next"
|
|
53
|
+
}), /* @__PURE__ */ r(o, { className: "h-3.5 w-3.5" })]
|
|
54
|
+
});
|
|
55
|
+
p.displayName = "PaginationNext";
|
|
56
|
+
var m = ({ className: t, ...n }) => /* @__PURE__ */ i("span", {
|
|
57
|
+
"aria-hidden": !0,
|
|
58
|
+
className: e("flex h-8 w-8 items-center justify-center", t),
|
|
59
|
+
...n,
|
|
60
|
+
children: [/* @__PURE__ */ r(s, { className: "h-4 w-4 text-muted-foreground" }), /* @__PURE__ */ r("span", {
|
|
61
|
+
className: "sr-only",
|
|
62
|
+
children: "More pages"
|
|
63
|
+
})]
|
|
64
|
+
});
|
|
65
|
+
m.displayName = "PaginationEllipsis";
|
|
66
|
+
//#endregion
|
|
67
|
+
export { c as Pagination, l as PaginationContent, m as PaginationEllipsis, u as PaginationItem, d as PaginationLink, p as PaginationNext, f as PaginationPrevious };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);let n=require("react/jsx-runtime"),r=require("@base-ui/react"),i=require("cn");var a=r.Popover.Root,o=r.Popover.Portal,s=r.Popover.Trigger,c=r.Popover.Close,l=r.Popover.Title,u=r.Popover.Description,d=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Popover.Positioner,{ref:a,className:(0,i.cn)(`z-50 outline-none`,e),...t}));d.displayName=`PopoverPositioner`;var f=t.forwardRef(({className:e,align:t=`center`,sideOffset:a=4,children:o,...s},c)=>(0,n.jsx)(r.Popover.Portal,{children:(0,n.jsx)(r.Popover.Positioner,{sideOffset:a,align:t,children:(0,n.jsx)(r.Popover.Popup,{ref:c,className:(0,i.cn)(`z-50 w-72 origin-[var(--transform-origin)] rounded-xl border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none transition-all duration-150 ease-out data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95`,e),...s,children:o})})}));f.displayName=`PopoverPopup`,exports.Popover=a,exports.PopoverClose=c,exports.PopoverDescription=u,exports.PopoverPopup=f,exports.PopoverPortal=o,exports.PopoverPositioner=d,exports.PopoverTitle=l,exports.PopoverTrigger=s;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { Popover as r } from "@base-ui/react";
|
|
6
|
+
//#region src/components/ui/popover.tsx
|
|
7
|
+
var i = r.Root, a = r.Portal, o = r.Trigger, s = r.Close, c = r.Title, l = r.Description, u = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Positioner, {
|
|
8
|
+
ref: a,
|
|
9
|
+
className: e("z-50 outline-none", t),
|
|
10
|
+
...i
|
|
11
|
+
}));
|
|
12
|
+
u.displayName = "PopoverPositioner";
|
|
13
|
+
var d = t.forwardRef(({ className: t, align: i = "center", sideOffset: a = 4, children: o, ...s }, c) => /* @__PURE__ */ n(r.Portal, { children: /* @__PURE__ */ n(r.Positioner, {
|
|
14
|
+
sideOffset: a,
|
|
15
|
+
align: i,
|
|
16
|
+
children: /* @__PURE__ */ n(r.Popup, {
|
|
17
|
+
ref: c,
|
|
18
|
+
className: e("z-50 w-72 origin-[var(--transform-origin)] rounded-xl border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none transition-all duration-150 ease-out data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95", t),
|
|
19
|
+
...s,
|
|
20
|
+
children: o
|
|
21
|
+
})
|
|
22
|
+
}) }));
|
|
23
|
+
d.displayName = "PopoverPopup";
|
|
24
|
+
//#endregion
|
|
25
|
+
export { i as Popover, s as PopoverClose, l as PopoverDescription, d as PopoverPopup, a as PopoverPortal, u as PopoverPositioner, c as PopoverTitle, o as PopoverTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);let n=require("react/jsx-runtime"),r=require("@base-ui/react"),i=require("cn");var a=r.PreviewCard.Root,o=r.PreviewCard.Trigger,s=r.PreviewCard.Portal,c=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.PreviewCard.Positioner,{ref:a,sideOffset:8,className:(0,i.cn)(`z-50 outline-none`,e),...t}));c.displayName=`PreviewCardPositioner`;var l=t.forwardRef(({className:e,sideOffset:t=8,align:a=`center`,children:o,...s},c)=>(0,n.jsx)(r.PreviewCard.Portal,{children:(0,n.jsx)(r.PreviewCard.Positioner,{sideOffset:t,align:a,className:`z-50 outline-none`,children:(0,n.jsx)(r.PreviewCard.Popup,{ref:c,className:(0,i.cn)(`z-50 w-72 rounded-2xl border border-border bg-card p-4 text-foreground shadow-xl transition-all duration-150 ease-out data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95`,e),...s,children:o})})}));l.displayName=`PreviewCardPopup`;var u=r.PreviewCard.Arrow;exports.PreviewCard=a,exports.PreviewCardArrow=u,exports.PreviewCardPopup=l,exports.PreviewCardPortal=s,exports.PreviewCardPositioner=c,exports.PreviewCardTrigger=o;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { PreviewCard as r } from "@base-ui/react";
|
|
6
|
+
//#region src/components/ui/preview-card.tsx
|
|
7
|
+
var i = r.Root, a = r.Trigger, o = r.Portal, s = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Positioner, {
|
|
8
|
+
ref: a,
|
|
9
|
+
sideOffset: 8,
|
|
10
|
+
className: e("z-50 outline-none", t),
|
|
11
|
+
...i
|
|
12
|
+
}));
|
|
13
|
+
s.displayName = "PreviewCardPositioner";
|
|
14
|
+
var c = t.forwardRef(({ className: t, sideOffset: i = 8, align: a = "center", children: o, ...s }, c) => /* @__PURE__ */ n(r.Portal, { children: /* @__PURE__ */ n(r.Positioner, {
|
|
15
|
+
sideOffset: i,
|
|
16
|
+
align: a,
|
|
17
|
+
className: "z-50 outline-none",
|
|
18
|
+
children: /* @__PURE__ */ n(r.Popup, {
|
|
19
|
+
ref: c,
|
|
20
|
+
className: e("z-50 w-72 rounded-2xl border border-border bg-card p-4 text-foreground shadow-xl transition-all duration-150 ease-out data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95", t),
|
|
21
|
+
...s,
|
|
22
|
+
children: o
|
|
23
|
+
})
|
|
24
|
+
}) }));
|
|
25
|
+
c.displayName = "PreviewCardPopup";
|
|
26
|
+
var l = r.Arrow;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { i as PreviewCard, l as PreviewCardArrow, c as PreviewCardPopup, o as PreviewCardPortal, s as PreviewCardPositioner, a as PreviewCardTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);let n=require("react/jsx-runtime"),r=require("@base-ui/react"),i=require("cn");var a=t.forwardRef(({className:e,children:t,...a},c)=>(0,n.jsx)(r.Progress.Root,{ref:c,className:(0,i.cn)(`flex w-full flex-col gap-1.5`,e),...a,children:t||(0,n.jsx)(o,{children:(0,n.jsx)(s,{})})}));a.displayName=`Progress`;var o=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Progress.Track,{ref:a,className:(0,i.cn)(`relative h-2 w-full overflow-hidden rounded-full bg-muted/80`,e),...t}));o.displayName=`ProgressTrack`;var s=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Progress.Indicator,{ref:a,className:(0,i.cn)(`h-full w-full flex-1 bg-primary transition-all duration-300 ease-out data-indeterminate:animate-pulse`,e),...t}));s.displayName=`ProgressIndicator`;var c=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Progress.Label,{ref:a,className:(0,i.cn)(`text-xs font-medium text-foreground`,e),...t}));c.displayName=`ProgressLabel`;var l=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Progress.Value,{ref:a,className:(0,i.cn)(`text-xs text-muted-foreground font-mono`,e),...t}));l.displayName=`ProgressValue`,exports.Progress=a,exports.ProgressIndicator=s,exports.ProgressLabel=c,exports.ProgressTrack=o,exports.ProgressValue=l;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { Progress as r } from "@base-ui/react";
|
|
6
|
+
//#region src/components/ui/progress.tsx
|
|
7
|
+
var i = t.forwardRef(({ className: t, children: i, ...s }, c) => /* @__PURE__ */ n(r.Root, {
|
|
8
|
+
ref: c,
|
|
9
|
+
className: e("flex w-full flex-col gap-1.5", t),
|
|
10
|
+
...s,
|
|
11
|
+
children: i || /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n(o, {}) })
|
|
12
|
+
}));
|
|
13
|
+
i.displayName = "Progress";
|
|
14
|
+
var a = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Track, {
|
|
15
|
+
ref: a,
|
|
16
|
+
className: e("relative h-2 w-full overflow-hidden rounded-full bg-muted/80", t),
|
|
17
|
+
...i
|
|
18
|
+
}));
|
|
19
|
+
a.displayName = "ProgressTrack";
|
|
20
|
+
var o = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Indicator, {
|
|
21
|
+
ref: a,
|
|
22
|
+
className: e("h-full w-full flex-1 bg-primary transition-all duration-300 ease-out data-indeterminate:animate-pulse", t),
|
|
23
|
+
...i
|
|
24
|
+
}));
|
|
25
|
+
o.displayName = "ProgressIndicator";
|
|
26
|
+
var s = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Label, {
|
|
27
|
+
ref: a,
|
|
28
|
+
className: e("text-xs font-medium text-foreground", t),
|
|
29
|
+
...i
|
|
30
|
+
}));
|
|
31
|
+
s.displayName = "ProgressLabel";
|
|
32
|
+
var c = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Value, {
|
|
33
|
+
ref: a,
|
|
34
|
+
className: e("text-xs text-muted-foreground font-mono", t),
|
|
35
|
+
...i
|
|
36
|
+
}));
|
|
37
|
+
c.displayName = "ProgressValue";
|
|
38
|
+
//#endregion
|
|
39
|
+
export { i as Progress, o as ProgressIndicator, s as ProgressLabel, a as ProgressTrack, c as ProgressValue };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);let n=require("react/jsx-runtime"),r=require("@base-ui/react"),i=require("cn");var a=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.RadioGroup,{className:(0,i.cn)(`grid gap-2.5`,e),...t,ref:a}));a.displayName=`RadioGroup`;var o=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Radio.Root,{ref:a,className:(0,i.cn)(`aspect-square h-4 w-4 rounded-full border border-zinc-300 dark:border-zinc-700 bg-background text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-checked:border-primary flex items-center justify-center cursor-pointer transition-all duration-150 ease-out active:scale-90`,e),...t,children:(0,n.jsx)(r.Radio.Indicator,{className:`flex items-center justify-center transition-all duration-150 ease-out data-unchecked:scale-0 data-unchecked:opacity-0 data-checked:scale-100 data-checked:opacity-100`,children:(0,n.jsx)(`div`,{className:`h-2 w-2 rounded-full bg-primary`})})}));o.displayName=`RadioGroupItem`,exports.RadioGroup=a,exports.RadioGroupItem=o;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { Radio as r, RadioGroup as i } from "@base-ui/react";
|
|
6
|
+
//#region src/components/ui/radio-group.tsx
|
|
7
|
+
var a = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i, {
|
|
8
|
+
className: e("grid gap-2.5", t),
|
|
9
|
+
...r,
|
|
10
|
+
ref: a
|
|
11
|
+
}));
|
|
12
|
+
a.displayName = "RadioGroup";
|
|
13
|
+
var o = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Root, {
|
|
14
|
+
ref: a,
|
|
15
|
+
className: e("aspect-square h-4 w-4 rounded-full border border-zinc-300 dark:border-zinc-700 bg-background text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-checked:border-primary flex items-center justify-center cursor-pointer transition-all duration-150 ease-out active:scale-90", t),
|
|
16
|
+
...i,
|
|
17
|
+
children: /* @__PURE__ */ n(r.Indicator, {
|
|
18
|
+
className: "flex items-center justify-center transition-all duration-150 ease-out data-unchecked:scale-0 data-unchecked:opacity-0 data-checked:scale-100 data-checked:opacity-100",
|
|
19
|
+
children: /* @__PURE__ */ n("div", { className: "h-2 w-2 rounded-full bg-primary" })
|
|
20
|
+
})
|
|
21
|
+
}));
|
|
22
|
+
o.displayName = "RadioGroupItem";
|
|
23
|
+
//#endregion
|
|
24
|
+
export { a as RadioGroup, o as RadioGroupItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);let n=require("react/jsx-runtime"),r=require("@base-ui/react"),i=require("cn");var a=t.forwardRef(({className:e,children:t,...a},u)=>(0,n.jsxs)(r.ScrollArea.Root,{ref:u,className:(0,i.cn)(`relative overflow-hidden`,e),...a,children:[(0,n.jsx)(o,{children:t}),(0,n.jsx)(s,{orientation:`vertical`,children:(0,n.jsx)(c,{})}),(0,n.jsx)(l,{})]}));a.displayName=`ScrollArea`;var o=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.ScrollArea.Viewport,{ref:a,className:(0,i.cn)(`h-full w-full rounded-[inherit] outline-none`,e),...t}));o.displayName=`ScrollAreaViewport`;var s=t.forwardRef(({className:e,orientation:t=`vertical`,...a},o)=>(0,n.jsx)(r.ScrollArea.Scrollbar,{ref:o,orientation:t,className:(0,i.cn)(`flex touch-none select-none transition-colors p-0.5`,t===`vertical`&&`h-full w-2.5 border-l border-l-transparent`,t===`horizontal`&&`h-2.5 flex-col border-t border-t-transparent`,e),...a}));s.displayName=`ScrollAreaScrollbar`;var c=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.ScrollArea.Thumb,{ref:a,className:(0,i.cn)(`relative flex-1 rounded-full bg-muted-foreground/30 hover:bg-muted-foreground/50 transition-colors`,e),...t}));c.displayName=`ScrollAreaThumb`;var l=r.ScrollArea.Corner;exports.ScrollArea=a,exports.ScrollAreaCorner=l,exports.ScrollAreaScrollbar=s,exports.ScrollAreaThumb=c,exports.ScrollAreaViewport=o;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import { ScrollArea as i } from "@base-ui/react";
|
|
6
|
+
//#region src/components/ui/scroll-area.tsx
|
|
7
|
+
var a = t.forwardRef(({ className: t, children: a, ...u }, d) => /* @__PURE__ */ r(i.Root, {
|
|
8
|
+
ref: d,
|
|
9
|
+
className: e("relative overflow-hidden", t),
|
|
10
|
+
...u,
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ n(o, { children: a }),
|
|
13
|
+
/* @__PURE__ */ n(s, {
|
|
14
|
+
orientation: "vertical",
|
|
15
|
+
children: /* @__PURE__ */ n(c, {})
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ n(l, {})
|
|
18
|
+
]
|
|
19
|
+
}));
|
|
20
|
+
a.displayName = "ScrollArea";
|
|
21
|
+
var o = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Viewport, {
|
|
22
|
+
ref: a,
|
|
23
|
+
className: e("h-full w-full rounded-[inherit] outline-none", t),
|
|
24
|
+
...r
|
|
25
|
+
}));
|
|
26
|
+
o.displayName = "ScrollAreaViewport";
|
|
27
|
+
var s = t.forwardRef(({ className: t, orientation: r = "vertical", ...a }, o) => /* @__PURE__ */ n(i.Scrollbar, {
|
|
28
|
+
ref: o,
|
|
29
|
+
orientation: r,
|
|
30
|
+
className: e("flex touch-none select-none transition-colors p-0.5", r === "vertical" && "h-full w-2.5 border-l border-l-transparent", r === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", t),
|
|
31
|
+
...a
|
|
32
|
+
}));
|
|
33
|
+
s.displayName = "ScrollAreaScrollbar";
|
|
34
|
+
var c = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Thumb, {
|
|
35
|
+
ref: a,
|
|
36
|
+
className: e("relative flex-1 rounded-full bg-muted-foreground/30 hover:bg-muted-foreground/50 transition-colors", t),
|
|
37
|
+
...r
|
|
38
|
+
}));
|
|
39
|
+
c.displayName = "ScrollAreaThumb";
|
|
40
|
+
var l = i.Corner;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { a as ScrollArea, l as ScrollAreaCorner, s as ScrollAreaScrollbar, c as ScrollAreaThumb, o as ScrollAreaViewport };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);let n=require("class-variance-authority"),r=require("react/jsx-runtime"),i=require("@base-ui/react"),a=require("lucide-react"),o=require("cn");function s(e){let n={};function r(e){if(e){if(Array.isArray(e)){e.forEach(r);return}if(t.isValidElement(e)){let t=e.props;t&&t.value!==void 0&&t.children!==void 0&&(n[String(t.value)]=t.children),t&&t.children&&r(t.children)}}}return r(e),n}function c({items:e,children:n,...a}){let o=t.useMemo(()=>e||s(n),[e,n]);return(0,r.jsx)(i.Select.Root,{items:o,...a,children:n})}var l=(0,n.cva)(`flex w-full items-center justify-between rounded-lg border border-border bg-background text-foreground ring-offset-background transition-all duration-150 ease-out active:scale-[0.99] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 cursor-pointer select-none text-left font-normal`,{variants:{size:{default:`h-8 px-3 text-xs gap-2 rounded-lg`,xs:`h-6 px-2 text-xs gap-1.5 rounded-md`,sm:`h-7 px-2.5 text-xs gap-1.5 rounded-md`,md:`h-8 px-3 text-xs gap-2 rounded-lg`,lg:`h-9 px-3.5 text-sm gap-2.5 rounded-lg`}},defaultVariants:{size:`default`}}),u=t.forwardRef(({className:e,size:t=`default`,children:n,...s},c)=>(0,r.jsxs)(i.Select.Trigger,{ref:c,className:(0,o.cn)(l({size:t}),e),...s,children:[n,(0,r.jsx)(i.Select.Icon,{className:`shrink-0 text-muted-foreground transition-transform duration-200 data-[popup-open]:rotate-180`,children:(0,r.jsx)(a.ChevronDown,{className:(0,o.cn)(t===`xs`?`h-3 w-3`:`h-3.5 w-3.5`,`opacity-70`)})})]}));u.displayName=`SelectTrigger`;var d=t.forwardRef(({className:e,...t},n)=>(0,r.jsx)(i.Select.Value,{ref:n,className:(0,o.cn)(`block truncate text-foreground data-[placeholder]:text-muted-foreground`,e),...t}));d.displayName=`SelectValue`;var f=t.forwardRef(({className:e,positionerClassName:t,sideOffset:n=4,alignItemWithTrigger:a=!1,children:s,...c},l)=>(0,r.jsx)(i.Select.Portal,{children:(0,r.jsx)(i.Select.Positioner,{sideOffset:n,alignItemWithTrigger:a,className:(0,o.cn)(`z-50 outline-none select-none`,t),children:(0,r.jsx)(i.Select.Popup,{ref:l,className:(0,o.cn)(`relative z-50 max-h-96 min-w-[var(--anchor-width)] origin-[var(--transform-origin)] overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-lg outline-none transition-all duration-150 ease-out data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95`,e),...c,children:(0,r.jsx)(i.Select.List,{className:`outline-none p-1 overflow-y-auto max-h-[var(--available-height)]`,children:s})})})}));f.displayName=`SelectPopup`;var p=t.forwardRef(({className:e,children:t,...n},s)=>(0,r.jsxs)(i.Select.Item,{ref:s,className:(0,o.cn)(`relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pl-8 pr-2.5 text-xs outline-none transition-all duration-100 ease-out active:scale-[0.99] data-[highlighted]:bg-muted data-[highlighted]:text-foreground data-[selected]:font-semibold data-[selected]:text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,r.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center text-primary`,children:(0,r.jsx)(i.Select.ItemIndicator,{children:(0,r.jsx)(a.Check,{className:`h-3.5 w-3.5`})})}),(0,r.jsx)(i.Select.ItemText,{children:t})]}));p.displayName=`SelectItem`;var m=i.Select.Group,h=t.forwardRef(({className:e,...t},n)=>(0,r.jsx)(i.Select.GroupLabel,{ref:n,className:(0,o.cn)(`px-2 py-1 text-[11px] font-semibold text-muted-foreground`,e),...t}));h.displayName=`SelectGroupLabel`;var g=t.forwardRef(({className:e,...t},n)=>(0,r.jsx)(i.Select.Separator,{ref:n,className:(0,o.cn)(`-mx-1 my-1 h-px bg-border`,e),...t}));g.displayName=`SelectSeparator`;var _=i.Select.Portal,v=i.Select.Positioner,y=i.Select.List,b=i.Select.Icon,x=i.Select.ScrollUpArrow,S=i.Select.ScrollDownArrow;exports.Select=c,exports.SelectGroup=m,exports.SelectGroupLabel=h,exports.SelectIcon=b,exports.SelectItem=p,exports.SelectList=y,exports.SelectPopup=f,exports.SelectPortal=_,exports.SelectPositioner=v,exports.SelectScrollDownArrow=S,exports.SelectScrollUpArrow=x,exports.SelectSeparator=g,exports.SelectTrigger=u,exports.SelectValue=d,exports.selectTriggerVariants=l;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { cva as n } from "class-variance-authority";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
import { Select as a } from "@base-ui/react";
|
|
7
|
+
import { Check as o, ChevronDown as s } from "lucide-react";
|
|
8
|
+
//#region src/components/ui/select.tsx
|
|
9
|
+
function c(e) {
|
|
10
|
+
let n = {};
|
|
11
|
+
function r(e) {
|
|
12
|
+
if (e) {
|
|
13
|
+
if (Array.isArray(e)) {
|
|
14
|
+
e.forEach(r);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (t.isValidElement(e)) {
|
|
18
|
+
let t = e.props;
|
|
19
|
+
t && t.value !== void 0 && t.children !== void 0 && (n[String(t.value)] = t.children), t && t.children && r(t.children);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return r(e), n;
|
|
24
|
+
}
|
|
25
|
+
function l({ items: e, children: n, ...i }) {
|
|
26
|
+
let o = t.useMemo(() => e || c(n), [e, n]);
|
|
27
|
+
return /* @__PURE__ */ r(a.Root, {
|
|
28
|
+
items: o,
|
|
29
|
+
...i,
|
|
30
|
+
children: n
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
var u = n("flex w-full items-center justify-between rounded-lg border border-border bg-background text-foreground ring-offset-background transition-all duration-150 ease-out active:scale-[0.99] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 cursor-pointer select-none text-left font-normal", {
|
|
34
|
+
variants: { size: {
|
|
35
|
+
default: "h-8 px-3 text-xs gap-2 rounded-lg",
|
|
36
|
+
xs: "h-6 px-2 text-xs gap-1.5 rounded-md",
|
|
37
|
+
sm: "h-7 px-2.5 text-xs gap-1.5 rounded-md",
|
|
38
|
+
md: "h-8 px-3 text-xs gap-2 rounded-lg",
|
|
39
|
+
lg: "h-9 px-3.5 text-sm gap-2.5 rounded-lg"
|
|
40
|
+
} },
|
|
41
|
+
defaultVariants: { size: "default" }
|
|
42
|
+
}), d = t.forwardRef(({ className: t, size: n = "default", children: o, ...c }, l) => /* @__PURE__ */ i(a.Trigger, {
|
|
43
|
+
ref: l,
|
|
44
|
+
className: e(u({ size: n }), t),
|
|
45
|
+
...c,
|
|
46
|
+
children: [o, /* @__PURE__ */ r(a.Icon, {
|
|
47
|
+
className: "shrink-0 text-muted-foreground transition-transform duration-200 data-[popup-open]:rotate-180",
|
|
48
|
+
children: /* @__PURE__ */ r(s, { className: e(n === "xs" ? "h-3 w-3" : "h-3.5 w-3.5", "opacity-70") })
|
|
49
|
+
})]
|
|
50
|
+
}));
|
|
51
|
+
d.displayName = "SelectTrigger";
|
|
52
|
+
var f = t.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r(a.Value, {
|
|
53
|
+
ref: i,
|
|
54
|
+
className: e("block truncate text-foreground data-[placeholder]:text-muted-foreground", t),
|
|
55
|
+
...n
|
|
56
|
+
}));
|
|
57
|
+
f.displayName = "SelectValue";
|
|
58
|
+
var p = t.forwardRef(({ className: t, positionerClassName: n, sideOffset: i = 4, alignItemWithTrigger: o = !1, children: s, ...c }, l) => /* @__PURE__ */ r(a.Portal, { children: /* @__PURE__ */ r(a.Positioner, {
|
|
59
|
+
sideOffset: i,
|
|
60
|
+
alignItemWithTrigger: o,
|
|
61
|
+
className: e("z-50 outline-none select-none", n),
|
|
62
|
+
children: /* @__PURE__ */ r(a.Popup, {
|
|
63
|
+
ref: l,
|
|
64
|
+
className: e("relative z-50 max-h-96 min-w-[var(--anchor-width)] origin-[var(--transform-origin)] overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-lg outline-none transition-all duration-150 ease-out data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95", t),
|
|
65
|
+
...c,
|
|
66
|
+
children: /* @__PURE__ */ r(a.List, {
|
|
67
|
+
className: "outline-none p-1 overflow-y-auto max-h-[var(--available-height)]",
|
|
68
|
+
children: s
|
|
69
|
+
})
|
|
70
|
+
})
|
|
71
|
+
}) }));
|
|
72
|
+
p.displayName = "SelectPopup";
|
|
73
|
+
var m = t.forwardRef(({ className: t, children: n, ...s }, c) => /* @__PURE__ */ i(a.Item, {
|
|
74
|
+
ref: c,
|
|
75
|
+
className: e("relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pl-8 pr-2.5 text-xs outline-none transition-all duration-100 ease-out active:scale-[0.99] data-[highlighted]:bg-muted data-[highlighted]:text-foreground data-[selected]:font-semibold data-[selected]:text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50", t),
|
|
76
|
+
...s,
|
|
77
|
+
children: [/* @__PURE__ */ r("span", {
|
|
78
|
+
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center text-primary",
|
|
79
|
+
children: /* @__PURE__ */ r(a.ItemIndicator, { children: /* @__PURE__ */ r(o, { className: "h-3.5 w-3.5" }) })
|
|
80
|
+
}), /* @__PURE__ */ r(a.ItemText, { children: n })]
|
|
81
|
+
}));
|
|
82
|
+
m.displayName = "SelectItem";
|
|
83
|
+
var h = a.Group, g = t.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r(a.GroupLabel, {
|
|
84
|
+
ref: i,
|
|
85
|
+
className: e("px-2 py-1 text-[11px] font-semibold text-muted-foreground", t),
|
|
86
|
+
...n
|
|
87
|
+
}));
|
|
88
|
+
g.displayName = "SelectGroupLabel";
|
|
89
|
+
var _ = t.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r(a.Separator, {
|
|
90
|
+
ref: i,
|
|
91
|
+
className: e("-mx-1 my-1 h-px bg-border", t),
|
|
92
|
+
...n
|
|
93
|
+
}));
|
|
94
|
+
_.displayName = "SelectSeparator";
|
|
95
|
+
var v = a.Portal, y = a.Positioner, b = a.List, x = a.Icon, S = a.ScrollUpArrow, C = a.ScrollDownArrow;
|
|
96
|
+
//#endregion
|
|
97
|
+
export { l as Select, h as SelectGroup, g as SelectGroupLabel, x as SelectIcon, m as SelectItem, b as SelectList, p as SelectPopup, v as SelectPortal, y as SelectPositioner, C as SelectScrollDownArrow, S as SelectScrollUpArrow, _ as SelectSeparator, d as SelectTrigger, f as SelectValue, u as selectTriggerVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);let n=require("react/jsx-runtime"),r=require("@base-ui/react"),i=require("cn");var a=t.forwardRef(({className:e,orientation:t=`horizontal`,...a},o)=>(0,n.jsx)(r.Separator,{ref:o,orientation:t,className:(0,i.cn)(`shrink-0 bg-border`,t===`horizontal`?`h-[1px] w-full`:`h-full w-[1px]`,e),...a}));a.displayName=`Separator`,exports.Separator=a;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { Separator as r } from "@base-ui/react";
|
|
6
|
+
//#region src/components/ui/separator.tsx
|
|
7
|
+
var i = t.forwardRef(({ className: t, orientation: i = "horizontal", ...a }, o) => /* @__PURE__ */ n(r, {
|
|
8
|
+
ref: o,
|
|
9
|
+
orientation: i,
|
|
10
|
+
className: e("shrink-0 bg-border", i === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", t),
|
|
11
|
+
...a
|
|
12
|
+
}));
|
|
13
|
+
i.displayName = "Separator";
|
|
14
|
+
//#endregion
|
|
15
|
+
export { i as Separator };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);let n=require("react/jsx-runtime"),r=require("cn");function i({className:e,...t}){return(0,n.jsx)(`div`,{className:(0,r.cn)(`animate-pulse rounded-md bg-muted/70`,e),...t})}exports.Skeleton=i;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/ui/skeleton.tsx
|
|
6
|
+
function n({ className: n, ...r }) {
|
|
7
|
+
return /* @__PURE__ */ t("div", {
|
|
8
|
+
className: e("animate-pulse rounded-md bg-muted/70", n),
|
|
9
|
+
...r
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { n as Skeleton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);let n=require("class-variance-authority"),r=require("react/jsx-runtime"),i=require("@base-ui/react"),a=require("cn");var o=(0,n.cva)(`relative flex touch-none select-none items-center`,{variants:{orientation:{horizontal:`w-full data-[orientation=horizontal]:flex-row`,vertical:`h-full data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-center`},disabled:{true:`opacity-50 pointer-events-none cursor-not-allowed`}},defaultVariants:{orientation:`horizontal`}}),s=(0,n.cva)(`relative flex grow items-center cursor-pointer touch-none select-none`,{variants:{orientation:{horizontal:`w-full py-3`,vertical:`h-full px-3 flex-col`}},defaultVariants:{orientation:`horizontal`}}),c=(0,n.cva)(`relative rounded-full bg-zinc-200 dark:bg-zinc-800 transition-colors`,{variants:{size:{default:`data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1.5 data-[orientation=vertical]:h-full`,xs:`data-[orientation=horizontal]:h-1 data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1 data-[orientation=vertical]:h-full`,sm:`data-[orientation=horizontal]:h-1 data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1 data-[orientation=vertical]:h-full`,md:`data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1.5 data-[orientation=vertical]:h-full`,lg:`data-[orientation=horizontal]:h-2 data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-2 data-[orientation=vertical]:h-full`}},defaultVariants:{size:`default`}}),l=(0,n.cva)(`rounded-full transition-colors`,{variants:{variant:{default:`bg-primary`,primary:`bg-primary`,secondary:`bg-zinc-700 dark:bg-zinc-300`,success:`bg-emerald-600 dark:bg-emerald-500`,destructive:`bg-destructive`}},defaultVariants:{variant:`default`}}),u=(0,n.cva)(`block rounded-full bg-background border-2 shadow-xs transition-[transform,box-shadow,border-color] duration-150 ease-out hover:scale-110 active:scale-95 data-[dragging]:scale-110 cursor-grab active:cursor-grabbing focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-ring has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-background data-[focused]:ring-2 data-[focused]:ring-ring data-[focused]:ring-offset-2 data-[focused]:ring-offset-background disabled:pointer-events-none disabled:opacity-50 data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,{variants:{variant:{default:`border-primary hover:border-primary-hover`,primary:`border-primary hover:border-primary-hover`,secondary:`border-zinc-700 hover:border-zinc-600 dark:border-zinc-300 dark:hover:border-zinc-200`,success:`border-emerald-600 hover:border-emerald-500 dark:border-emerald-500`,destructive:`border-destructive hover:border-destructive/90`},size:{default:`h-4.5 w-4.5`,xs:`h-3.5 w-3.5`,sm:`h-3.5 w-3.5`,md:`h-4.5 w-4.5`,lg:`h-5.5 w-5.5`}},defaultVariants:{variant:`default`,size:`default`}}),d=t.forwardRef(({className:e,controlClassName:n,trackClassName:d,indicatorClassName:f,thumbClassName:p,variant:m=`default`,size:h=`default`,thumbCount:g,..._},v)=>{let y=t.useMemo(()=>typeof g==`number`?g:Array.isArray(_.value)?_.value.length:Array.isArray(_.defaultValue)?_.defaultValue.length:1,[g,_.value,_.defaultValue]);return(0,r.jsx)(i.Slider.Root,{ref:v,className:(0,a.cn)(o({orientation:_.orientation,disabled:_.disabled}),e),..._,children:(0,r.jsx)(i.Slider.Control,{className:(0,a.cn)(s({orientation:_.orientation}),n),children:(0,r.jsxs)(i.Slider.Track,{className:(0,a.cn)(c({size:h}),d),children:[(0,r.jsx)(i.Slider.Indicator,{className:(0,a.cn)(l({variant:m}),f)}),Array.from({length:y}).map((e,t)=>(0,r.jsx)(i.Slider.Thumb,{index:t,className:(0,a.cn)(u({variant:m,size:h}),p)},t))]})})})});d.displayName=`Slider`;var f=i.Slider.Root,p=i.Slider.Control,m=i.Slider.Track,h=i.Slider.Indicator,g=i.Slider.Thumb,_=i.Slider.Value,v=i.Slider.Label;exports.Slider=d,exports.SliderControl=p,exports.SliderIndicator=h,exports.SliderLabel=v,exports.SliderRoot=f,exports.SliderThumb=g,exports.SliderTrack=m,exports.SliderValue=_,exports.sliderControlVariants=s,exports.sliderIndicatorVariants=l,exports.sliderThumbVariants=u,exports.sliderTrackVariants=c,exports.sliderVariants=o;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { cva as n } from "class-variance-authority";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
import { Slider as a } from "@base-ui/react";
|
|
7
|
+
//#region src/components/ui/slider.tsx
|
|
8
|
+
var o = n("relative flex touch-none select-none items-center", {
|
|
9
|
+
variants: {
|
|
10
|
+
orientation: {
|
|
11
|
+
horizontal: "w-full data-[orientation=horizontal]:flex-row",
|
|
12
|
+
vertical: "h-full data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-center"
|
|
13
|
+
},
|
|
14
|
+
disabled: { true: "opacity-50 pointer-events-none cursor-not-allowed" }
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: { orientation: "horizontal" }
|
|
17
|
+
}), s = n("relative flex grow items-center cursor-pointer touch-none select-none", {
|
|
18
|
+
variants: { orientation: {
|
|
19
|
+
horizontal: "w-full py-3",
|
|
20
|
+
vertical: "h-full px-3 flex-col"
|
|
21
|
+
} },
|
|
22
|
+
defaultVariants: { orientation: "horizontal" }
|
|
23
|
+
}), c = n("relative rounded-full bg-zinc-200 dark:bg-zinc-800 transition-colors", {
|
|
24
|
+
variants: { size: {
|
|
25
|
+
default: "data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1.5 data-[orientation=vertical]:h-full",
|
|
26
|
+
xs: "data-[orientation=horizontal]:h-1 data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1 data-[orientation=vertical]:h-full",
|
|
27
|
+
sm: "data-[orientation=horizontal]:h-1 data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1 data-[orientation=vertical]:h-full",
|
|
28
|
+
md: "data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1.5 data-[orientation=vertical]:h-full",
|
|
29
|
+
lg: "data-[orientation=horizontal]:h-2 data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-2 data-[orientation=vertical]:h-full"
|
|
30
|
+
} },
|
|
31
|
+
defaultVariants: { size: "default" }
|
|
32
|
+
}), l = n("rounded-full transition-colors", {
|
|
33
|
+
variants: { variant: {
|
|
34
|
+
default: "bg-primary",
|
|
35
|
+
primary: "bg-primary",
|
|
36
|
+
secondary: "bg-zinc-700 dark:bg-zinc-300",
|
|
37
|
+
success: "bg-emerald-600 dark:bg-emerald-500",
|
|
38
|
+
destructive: "bg-destructive"
|
|
39
|
+
} },
|
|
40
|
+
defaultVariants: { variant: "default" }
|
|
41
|
+
}), u = n("block rounded-full bg-background border-2 shadow-xs transition-[transform,box-shadow,border-color] duration-150 ease-out hover:scale-110 active:scale-95 data-[dragging]:scale-110 cursor-grab active:cursor-grabbing focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-ring has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-background data-[focused]:ring-2 data-[focused]:ring-ring data-[focused]:ring-offset-2 data-[focused]:ring-offset-background disabled:pointer-events-none disabled:opacity-50 data-[disabled]:pointer-events-none data-[disabled]:opacity-50", {
|
|
42
|
+
variants: {
|
|
43
|
+
variant: {
|
|
44
|
+
default: "border-primary hover:border-primary-hover",
|
|
45
|
+
primary: "border-primary hover:border-primary-hover",
|
|
46
|
+
secondary: "border-zinc-700 hover:border-zinc-600 dark:border-zinc-300 dark:hover:border-zinc-200",
|
|
47
|
+
success: "border-emerald-600 hover:border-emerald-500 dark:border-emerald-500",
|
|
48
|
+
destructive: "border-destructive hover:border-destructive/90"
|
|
49
|
+
},
|
|
50
|
+
size: {
|
|
51
|
+
default: "h-4.5 w-4.5",
|
|
52
|
+
xs: "h-3.5 w-3.5",
|
|
53
|
+
sm: "h-3.5 w-3.5",
|
|
54
|
+
md: "h-4.5 w-4.5",
|
|
55
|
+
lg: "h-5.5 w-5.5"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
defaultVariants: {
|
|
59
|
+
variant: "default",
|
|
60
|
+
size: "default"
|
|
61
|
+
}
|
|
62
|
+
}), d = t.forwardRef(({ className: n, controlClassName: d, trackClassName: f, indicatorClassName: p, thumbClassName: m, variant: h = "default", size: g = "default", thumbCount: _, ...v }, y) => {
|
|
63
|
+
let b = t.useMemo(() => typeof _ == "number" ? _ : Array.isArray(v.value) ? v.value.length : Array.isArray(v.defaultValue) ? v.defaultValue.length : 1, [
|
|
64
|
+
_,
|
|
65
|
+
v.value,
|
|
66
|
+
v.defaultValue
|
|
67
|
+
]);
|
|
68
|
+
return /* @__PURE__ */ r(a.Root, {
|
|
69
|
+
ref: y,
|
|
70
|
+
className: e(o({
|
|
71
|
+
orientation: v.orientation,
|
|
72
|
+
disabled: v.disabled
|
|
73
|
+
}), n),
|
|
74
|
+
...v,
|
|
75
|
+
children: /* @__PURE__ */ r(a.Control, {
|
|
76
|
+
className: e(s({ orientation: v.orientation }), d),
|
|
77
|
+
children: /* @__PURE__ */ i(a.Track, {
|
|
78
|
+
className: e(c({ size: g }), f),
|
|
79
|
+
children: [/* @__PURE__ */ r(a.Indicator, { className: e(l({ variant: h }), p) }), Array.from({ length: b }).map((t, n) => /* @__PURE__ */ r(a.Thumb, {
|
|
80
|
+
index: n,
|
|
81
|
+
className: e(u({
|
|
82
|
+
variant: h,
|
|
83
|
+
size: g
|
|
84
|
+
}), m)
|
|
85
|
+
}, n))]
|
|
86
|
+
})
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
d.displayName = "Slider";
|
|
91
|
+
var f = a.Root, p = a.Control, m = a.Track, h = a.Indicator, g = a.Thumb, _ = a.Value, v = a.Label;
|
|
92
|
+
//#endregion
|
|
93
|
+
export { d as Slider, p as SliderControl, h as SliderIndicator, v as SliderLabel, f as SliderRoot, g as SliderThumb, m as SliderTrack, _ as SliderValue, s as sliderControlVariants, l as sliderIndicatorVariants, u as sliderThumbVariants, c as sliderTrackVariants, o as sliderVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);let n=require("class-variance-authority"),r=require("react/jsx-runtime"),i=require("@base-ui/react"),a=require("cn");var o=(0,n.cva)(`peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-all duration-200 ease-out active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-checked:bg-primary data-unchecked:bg-zinc-200 dark:data-unchecked:bg-zinc-800`,{variants:{size:{xs:`h-4 w-7`,sm:`h-5 w-9`,default:`h-6 w-11`,md:`h-6 w-11`,lg:`h-7 w-[52px]`}},defaultVariants:{size:`default`}}),s=(0,n.cva)(`pointer-events-none block rounded-full bg-white shadow-md ring-0 transition-all duration-200 ease-out data-unchecked:translate-x-0`,{variants:{size:{xs:`h-3 w-3 data-checked:translate-x-3`,sm:`h-4 w-4 data-checked:translate-x-4`,default:`h-5 w-5 data-checked:translate-x-5`,md:`h-5 w-5 data-checked:translate-x-5`,lg:`h-6 w-6 data-checked:translate-x-6`}},defaultVariants:{size:`default`}}),c=t.forwardRef(({className:e,thumbClassName:t,size:n=`default`,...c},l)=>(0,r.jsx)(i.Switch.Root,{className:(0,a.cn)(o({size:n}),e),...c,ref:l,children:(0,r.jsx)(i.Switch.Thumb,{className:(0,a.cn)(s({size:n}),t)})}));c.displayName=`Switch`;var l=i.Switch.Root,u=i.Switch.Thumb;exports.Switch=c,exports.SwitchRoot=l,exports.SwitchThumb=u,exports.switchThumbVariants=s,exports.switchVariants=o;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { cva as n } from "class-variance-authority";
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
+
import { Switch as i } from "@base-ui/react";
|
|
7
|
+
//#region src/components/ui/switch.tsx
|
|
8
|
+
var a = n("peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-all duration-200 ease-out active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-checked:bg-primary data-unchecked:bg-zinc-200 dark:data-unchecked:bg-zinc-800", {
|
|
9
|
+
variants: { size: {
|
|
10
|
+
xs: "h-4 w-7",
|
|
11
|
+
sm: "h-5 w-9",
|
|
12
|
+
default: "h-6 w-11",
|
|
13
|
+
md: "h-6 w-11",
|
|
14
|
+
lg: "h-7 w-[52px]"
|
|
15
|
+
} },
|
|
16
|
+
defaultVariants: { size: "default" }
|
|
17
|
+
}), o = n("pointer-events-none block rounded-full bg-white shadow-md ring-0 transition-all duration-200 ease-out data-unchecked:translate-x-0", {
|
|
18
|
+
variants: { size: {
|
|
19
|
+
xs: "h-3 w-3 data-checked:translate-x-3",
|
|
20
|
+
sm: "h-4 w-4 data-checked:translate-x-4",
|
|
21
|
+
default: "h-5 w-5 data-checked:translate-x-5",
|
|
22
|
+
md: "h-5 w-5 data-checked:translate-x-5",
|
|
23
|
+
lg: "h-6 w-6 data-checked:translate-x-6"
|
|
24
|
+
} },
|
|
25
|
+
defaultVariants: { size: "default" }
|
|
26
|
+
}), s = t.forwardRef(({ className: t, thumbClassName: n, size: s = "default", ...c }, l) => /* @__PURE__ */ r(i.Root, {
|
|
27
|
+
className: e(a({ size: s }), t),
|
|
28
|
+
...c,
|
|
29
|
+
ref: l,
|
|
30
|
+
children: /* @__PURE__ */ r(i.Thumb, { className: e(o({ size: s }), n) })
|
|
31
|
+
}));
|
|
32
|
+
s.displayName = "Switch";
|
|
33
|
+
var c = i.Root, l = i.Thumb;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { s as Switch, c as SwitchRoot, l as SwitchThumb, o as switchThumbVariants, a as switchVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);let n=require("react/jsx-runtime"),r=require("cn");var i=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(`div`,{className:`relative w-full overflow-auto rounded-xl border border-border bg-card`,children:(0,n.jsx)(`table`,{ref:i,className:(0,r.cn)(`w-full caption-bottom text-xs text-foreground`,e),...t})}));i.displayName=`Table`;var a=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(`thead`,{ref:i,className:(0,r.cn)(`border-b border-border bg-muted/40 [&_tr]:border-b`,e),...t}));a.displayName=`TableHeader`;var o=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(`tbody`,{ref:i,className:(0,r.cn)(`[&_tr:last-child]:border-0 divide-y divide-border`,e),...t}));o.displayName=`TableBody`;var s=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(`tfoot`,{ref:i,className:(0,r.cn)(`border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0`,e),...t}));s.displayName=`TableFooter`;var c=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(`tr`,{ref:i,className:(0,r.cn)(`border-b border-border transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted`,e),...t}));c.displayName=`TableRow`;var l=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(`th`,{ref:i,className:(0,r.cn)(`h-9 px-3.5 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0`,e),...t}));l.displayName=`TableHead`;var u=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(`td`,{ref:i,className:(0,r.cn)(`p-3.5 align-middle [&:has([role=checkbox])]:pr-0`,e),...t}));u.displayName=`TableCell`;var d=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(`caption`,{ref:i,className:(0,r.cn)(`mt-3 text-[11px] text-muted-foreground`,e),...t}));d.displayName=`TableCaption`,exports.Table=i,exports.TableBody=o,exports.TableCaption=d,exports.TableCell=u,exports.TableFooter=s,exports.TableHead=l,exports.TableHeader=a,exports.TableRow=c;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/ui/table.tsx
|
|
6
|
+
var r = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("div", {
|
|
7
|
+
className: "relative w-full overflow-auto rounded-xl border border-border bg-card",
|
|
8
|
+
children: /* @__PURE__ */ n("table", {
|
|
9
|
+
ref: i,
|
|
10
|
+
className: e("w-full caption-bottom text-xs text-foreground", t),
|
|
11
|
+
...r
|
|
12
|
+
})
|
|
13
|
+
}));
|
|
14
|
+
r.displayName = "Table";
|
|
15
|
+
var i = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("thead", {
|
|
16
|
+
ref: i,
|
|
17
|
+
className: e("border-b border-border bg-muted/40 [&_tr]:border-b", t),
|
|
18
|
+
...r
|
|
19
|
+
}));
|
|
20
|
+
i.displayName = "TableHeader";
|
|
21
|
+
var a = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("tbody", {
|
|
22
|
+
ref: i,
|
|
23
|
+
className: e("[&_tr:last-child]:border-0 divide-y divide-border", t),
|
|
24
|
+
...r
|
|
25
|
+
}));
|
|
26
|
+
a.displayName = "TableBody";
|
|
27
|
+
var o = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("tfoot", {
|
|
28
|
+
ref: i,
|
|
29
|
+
className: e("border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0", t),
|
|
30
|
+
...r
|
|
31
|
+
}));
|
|
32
|
+
o.displayName = "TableFooter";
|
|
33
|
+
var s = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("tr", {
|
|
34
|
+
ref: i,
|
|
35
|
+
className: e("border-b border-border transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", t),
|
|
36
|
+
...r
|
|
37
|
+
}));
|
|
38
|
+
s.displayName = "TableRow";
|
|
39
|
+
var c = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("th", {
|
|
40
|
+
ref: i,
|
|
41
|
+
className: e("h-9 px-3.5 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", t),
|
|
42
|
+
...r
|
|
43
|
+
}));
|
|
44
|
+
c.displayName = "TableHead";
|
|
45
|
+
var l = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("td", {
|
|
46
|
+
ref: i,
|
|
47
|
+
className: e("p-3.5 align-middle [&:has([role=checkbox])]:pr-0", t),
|
|
48
|
+
...r
|
|
49
|
+
}));
|
|
50
|
+
l.displayName = "TableCell";
|
|
51
|
+
var u = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("caption", {
|
|
52
|
+
ref: i,
|
|
53
|
+
className: e("mt-3 text-[11px] text-muted-foreground", t),
|
|
54
|
+
...r
|
|
55
|
+
}));
|
|
56
|
+
u.displayName = "TableCaption";
|
|
57
|
+
//#endregion
|
|
58
|
+
export { r as Table, a as TableBody, u as TableCaption, l as TableCell, o as TableFooter, c as TableHead, i as TableHeader, s as TableRow };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);let n=require("class-variance-authority"),r=require("react/jsx-runtime"),i=require("@base-ui/react"),a=require("cn");var o=i.Tabs.Root,s=(0,n.cva)(`inline-flex items-center justify-center rounded-lg bg-muted text-muted-foreground`,{variants:{size:{default:`h-8 p-1 text-xs`,xs:`h-6 p-0.5 text-xs rounded-md`,sm:`h-7 p-0.5 text-xs rounded-md`,md:`h-8 p-1 text-xs`,lg:`h-9 p-1 text-xs`}},defaultVariants:{size:`default`}}),c=t.forwardRef(({className:e,size:t=`default`,children:n,...o},c)=>(0,r.jsxs)(i.Tabs.List,{ref:c,className:(0,a.cn)(`relative isolate`,s({size:t}),e),...o,children:[(0,r.jsx)(d,{}),n]}));c.displayName=`TabsList`;var l=t.forwardRef(({className:e,...t},n)=>(0,r.jsx)(i.Tabs.Tab,{ref:n,className:(0,a.cn)(`relative z-10 inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-xs font-medium ring-offset-background transition-colors duration-200 ease-out hover:text-foreground active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 text-muted-foreground data-active:text-foreground cursor-pointer select-none`,e),...t}));l.displayName=`TabsTab`;var u=t.forwardRef(({className:e,...t},n)=>(0,r.jsx)(i.Tabs.Panel,{ref:n,className:(0,a.cn)(`mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));u.displayName=`TabsPanel`;var d=t.forwardRef(({className:e,style:t,...n},o)=>(0,r.jsx)(i.Tabs.Indicator,{ref:o,className:(0,a.cn)(`absolute left-0 top-0 -z-10 rounded-md bg-background shadow-xs transition-[translate,width,height] duration-250 ease-[cubic-bezier(0.16,1,0.3,1)]`,e),style:{translate:`var(--active-tab-left) var(--active-tab-top)`,width:`var(--active-tab-width)`,height:`var(--active-tab-height)`,...t},...n}));d.displayName=`TabsIndicator`,exports.Tabs=o,exports.TabsIndicator=d,exports.TabsList=c,exports.TabsPanel=u,exports.TabsTab=l,exports.tabsListVariants=s;
|