@galaui/react 0.1.0 → 0.1.2
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.d.ts +1 -1
- package/dist/components/ui/tooltip.js +32 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +46 -1692
- package/dist/lib/utils.js +3 -0
- package/dist/style.css +1 -1
- package/dist/tokens/index.cjs +1 -0
- package/dist/tokens/index.js +135 -0
- package/package.json +19 -3
|
@@ -0,0 +1,53 @@
|
|
|
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 { Dialog as i } from "@base-ui/react";
|
|
6
|
+
import { X as a } from "lucide-react";
|
|
7
|
+
//#region src/components/ui/dialog.tsx
|
|
8
|
+
var o = i.Root, s = i.Trigger, c = i.Portal, l = i.Close, u = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Backdrop, {
|
|
9
|
+
ref: a,
|
|
10
|
+
className: e("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm transition-opacity duration-200 ease-out data-starting-style:opacity-0 data-ending-style:opacity-0", t),
|
|
11
|
+
...r
|
|
12
|
+
}));
|
|
13
|
+
u.displayName = "DialogBackdrop";
|
|
14
|
+
var d = t.forwardRef(({ className: t, children: o, ...s }, l) => /* @__PURE__ */ r(c, { children: [/* @__PURE__ */ n(u, {}), /* @__PURE__ */ n("div", {
|
|
15
|
+
className: "fixed inset-0 z-50 flex items-center justify-center p-4",
|
|
16
|
+
children: /* @__PURE__ */ r(i.Popup, {
|
|
17
|
+
ref: l,
|
|
18
|
+
className: e("relative w-full max-w-lg rounded-2xl border border-border bg-card p-6 shadow-2xl transition-all duration-200 ease-out data-starting-style:opacity-0 data-starting-style:scale-95 data-starting-style:translate-y-2 data-ending-style:opacity-0 data-ending-style:scale-95 data-ending-style:translate-y-2", t),
|
|
19
|
+
...s,
|
|
20
|
+
children: [o, /* @__PURE__ */ r(i.Close, {
|
|
21
|
+
className: "absolute right-4 top-4 rounded-lg p-1 text-muted-foreground opacity-70 hover:opacity-100 hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring transition-all duration-150 active:scale-90 cursor-pointer",
|
|
22
|
+
children: [/* @__PURE__ */ n(a, { className: "h-4 w-4" }), /* @__PURE__ */ n("span", {
|
|
23
|
+
className: "sr-only",
|
|
24
|
+
children: "Close"
|
|
25
|
+
})]
|
|
26
|
+
})]
|
|
27
|
+
})
|
|
28
|
+
})] }));
|
|
29
|
+
d.displayName = "DialogPopup";
|
|
30
|
+
var f = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
31
|
+
className: e("flex flex-col space-y-1.5 text-center sm:text-left", t),
|
|
32
|
+
...r
|
|
33
|
+
});
|
|
34
|
+
f.displayName = "DialogHeader";
|
|
35
|
+
var p = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
36
|
+
className: e("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 pt-4", t),
|
|
37
|
+
...r
|
|
38
|
+
});
|
|
39
|
+
p.displayName = "DialogFooter";
|
|
40
|
+
var m = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Title, {
|
|
41
|
+
ref: a,
|
|
42
|
+
className: e("text-lg font-semibold leading-none tracking-tight text-foreground", t),
|
|
43
|
+
...r
|
|
44
|
+
}));
|
|
45
|
+
m.displayName = "DialogTitle";
|
|
46
|
+
var h = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Description, {
|
|
47
|
+
ref: a,
|
|
48
|
+
className: e("text-sm text-muted-foreground mt-1.5", t),
|
|
49
|
+
...r
|
|
50
|
+
}));
|
|
51
|
+
h.displayName = "DialogDescription";
|
|
52
|
+
//#endregion
|
|
53
|
+
export { o as Dialog, u as DialogBackdrop, l as DialogClose, h as DialogDescription, p as DialogFooter, f as DialogHeader, d as DialogPopup, c as DialogPortal, m as DialogTitle, s as DialogTrigger };
|
|
@@ -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("lucide-react"),a=require("cn");var o=r.Drawer.Root,s=r.Drawer.Trigger,c=r.Drawer.Portal,l=r.Drawer.Close,u=r.Drawer.Handle,d=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(r.Drawer.Backdrop,{ref:i,className:(0,a.cn)(`fixed inset-0 z-50 bg-black/50 backdrop-blur-xs transition-opacity duration-300 ease-out data-starting-style:opacity-0 data-ending-style:opacity-0`,e),...t}));d.displayName=`DrawerBackdrop`;var f=t.forwardRef(({className:e,children:t,side:o=`bottom`,...s},l)=>(0,n.jsxs)(c,{children:[(0,n.jsx)(d,{}),(0,n.jsxs)(r.Drawer.Popup,{ref:l,className:(0,a.cn)({bottom:`fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85vh] flex-col rounded-t-2xl border-t border-border bg-card p-6 shadow-2xl transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] data-starting-style:translate-y-full data-ending-style:translate-y-full`,right:`fixed inset-y-0 right-0 z-50 flex h-full w-full max-w-sm flex-col rounded-l-2xl border-l border-border bg-card p-6 shadow-2xl transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] data-starting-style:translate-x-full data-ending-style:translate-x-full`,left:`fixed inset-y-0 left-0 z-50 flex h-full w-full max-w-sm flex-col rounded-r-2xl border-r border-border bg-card p-6 shadow-2xl transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] data-starting-style:-translate-x-full data-ending-style:-translate-x-full`,top:`fixed inset-x-0 top-0 z-50 flex max-h-[85vh] flex-col rounded-b-2xl border-b border-border bg-card p-6 shadow-2xl transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] data-starting-style:-translate-y-full data-ending-style:-translate-y-full`}[o],e),...s,children:[o===`bottom`&&(0,n.jsx)(`div`,{className:`mx-auto -mt-2 mb-4 h-1.5 w-12 rounded-full bg-muted-foreground/30`}),t,(0,n.jsxs)(r.Drawer.Close,{className:`absolute right-4 top-4 rounded-lg p-1 text-muted-foreground opacity-70 hover:opacity-100 hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring transition-all duration-150 cursor-pointer`,children:[(0,n.jsx)(i.X,{className:`h-4 w-4`}),(0,n.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));f.displayName=`DrawerPopup`;var p=({className:e,...t})=>(0,n.jsx)(`div`,{className:(0,a.cn)(`flex flex-col space-y-1 text-left mb-4`,e),...t});p.displayName=`DrawerHeader`;var m=({className:e,...t})=>(0,n.jsx)(`div`,{className:(0,a.cn)(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-4`,e),...t});m.displayName=`DrawerFooter`;var h=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(r.Drawer.Title,{ref:i,className:(0,a.cn)(`text-base font-semibold leading-none tracking-tight text-foreground`,e),...t}));h.displayName=`DrawerTitle`;var g=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(r.Drawer.Description,{ref:i,className:(0,a.cn)(`text-xs text-muted-foreground`,e),...t}));g.displayName=`DrawerDescription`,exports.Drawer=o,exports.DrawerBackdrop=d,exports.DrawerClose=l,exports.DrawerDescription=g,exports.DrawerFooter=m,exports.DrawerHandle=u,exports.DrawerHeader=p,exports.DrawerPopup=f,exports.DrawerPortal=c,exports.DrawerTitle=h,exports.DrawerTrigger=s;
|
|
@@ -0,0 +1,59 @@
|
|
|
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 { Drawer as i } from "@base-ui/react";
|
|
6
|
+
import { X as a } from "lucide-react";
|
|
7
|
+
//#region src/components/ui/drawer.tsx
|
|
8
|
+
var o = i.Root, s = i.Trigger, c = i.Portal, l = i.Close, u = i.Handle, d = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Backdrop, {
|
|
9
|
+
ref: a,
|
|
10
|
+
className: e("fixed inset-0 z-50 bg-black/50 backdrop-blur-xs transition-opacity duration-300 ease-out data-starting-style:opacity-0 data-ending-style:opacity-0", t),
|
|
11
|
+
...r
|
|
12
|
+
}));
|
|
13
|
+
d.displayName = "DrawerBackdrop";
|
|
14
|
+
var f = t.forwardRef(({ className: t, children: o, side: s = "bottom", ...l }, u) => /* @__PURE__ */ r(c, { children: [/* @__PURE__ */ n(d, {}), /* @__PURE__ */ r(i.Popup, {
|
|
15
|
+
ref: u,
|
|
16
|
+
className: e({
|
|
17
|
+
bottom: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85vh] flex-col rounded-t-2xl border-t border-border bg-card p-6 shadow-2xl transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] data-starting-style:translate-y-full data-ending-style:translate-y-full",
|
|
18
|
+
right: "fixed inset-y-0 right-0 z-50 flex h-full w-full max-w-sm flex-col rounded-l-2xl border-l border-border bg-card p-6 shadow-2xl transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] data-starting-style:translate-x-full data-ending-style:translate-x-full",
|
|
19
|
+
left: "fixed inset-y-0 left-0 z-50 flex h-full w-full max-w-sm flex-col rounded-r-2xl border-r border-border bg-card p-6 shadow-2xl transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] data-starting-style:-translate-x-full data-ending-style:-translate-x-full",
|
|
20
|
+
top: "fixed inset-x-0 top-0 z-50 flex max-h-[85vh] flex-col rounded-b-2xl border-b border-border bg-card p-6 shadow-2xl transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] data-starting-style:-translate-y-full data-ending-style:-translate-y-full"
|
|
21
|
+
}[s], t),
|
|
22
|
+
...l,
|
|
23
|
+
children: [
|
|
24
|
+
s === "bottom" && /* @__PURE__ */ n("div", { className: "mx-auto -mt-2 mb-4 h-1.5 w-12 rounded-full bg-muted-foreground/30" }),
|
|
25
|
+
o,
|
|
26
|
+
/* @__PURE__ */ r(i.Close, {
|
|
27
|
+
className: "absolute right-4 top-4 rounded-lg p-1 text-muted-foreground opacity-70 hover:opacity-100 hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring transition-all duration-150 cursor-pointer",
|
|
28
|
+
children: [/* @__PURE__ */ n(a, { className: "h-4 w-4" }), /* @__PURE__ */ n("span", {
|
|
29
|
+
className: "sr-only",
|
|
30
|
+
children: "Close"
|
|
31
|
+
})]
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
})] }));
|
|
35
|
+
f.displayName = "DrawerPopup";
|
|
36
|
+
var p = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
37
|
+
className: e("flex flex-col space-y-1 text-left mb-4", t),
|
|
38
|
+
...r
|
|
39
|
+
});
|
|
40
|
+
p.displayName = "DrawerHeader";
|
|
41
|
+
var m = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
42
|
+
className: e("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-4", t),
|
|
43
|
+
...r
|
|
44
|
+
});
|
|
45
|
+
m.displayName = "DrawerFooter";
|
|
46
|
+
var h = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Title, {
|
|
47
|
+
ref: a,
|
|
48
|
+
className: e("text-base font-semibold leading-none tracking-tight text-foreground", t),
|
|
49
|
+
...r
|
|
50
|
+
}));
|
|
51
|
+
h.displayName = "DrawerTitle";
|
|
52
|
+
var g = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Description, {
|
|
53
|
+
ref: a,
|
|
54
|
+
className: e("text-xs text-muted-foreground", t),
|
|
55
|
+
...r
|
|
56
|
+
}));
|
|
57
|
+
g.displayName = "DrawerDescription";
|
|
58
|
+
//#endregion
|
|
59
|
+
export { o as Drawer, d as DrawerBackdrop, l as DrawerClose, g as DrawerDescription, m as DrawerFooter, u as DrawerHandle, p as DrawerHeader, f as DrawerPopup, c as DrawerPortal, h as DrawerTitle, s as DrawerTrigger };
|
|
@@ -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("lucide-react"),a=require("cn");var o=r.Menu.Root,s=r.Menu.Group,c=r.Menu.Portal,l=r.Menu.Trigger,u=r.Menu.RadioGroup,d=r.Menu.SubmenuRoot,f=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(r.Menu.Positioner,{ref:i,className:(0,a.cn)(`z-50 outline-none`,e),...t}));f.displayName=`DropdownMenuPositioner`;var p=t.forwardRef(({className:e,sideOffset:t=4,align:i=`start`,...o},s)=>(0,n.jsx)(r.Menu.Portal,{children:(0,n.jsx)(r.Menu.Positioner,{sideOffset:t,align:i,children:(0,n.jsx)(r.Menu.Popup,{ref:s,className:(0,a.cn)(`z-50 min-w-[8rem] origin-[var(--transform-origin)] overflow-hidden rounded-xl border border-border bg-popover p-1 text-popover-foreground shadow-lg 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),...o})})}));p.displayName=`DropdownMenuPopup`;var m=t.forwardRef(({className:e,inset:t,...i},o)=>(0,n.jsx)(r.Menu.Item,{ref:o,className:(0,a.cn)(`relative flex cursor-pointer select-none items-center gap-2 rounded-lg px-2.5 py-1.5 text-xs font-medium outline-none transition-all duration-100 ease-out focus:bg-muted focus:text-foreground active:scale-[0.98] data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,t&&`pl-8`,e),...i}));m.displayName=`DropdownMenuItem`;var h=t.forwardRef(({className:e,children:t,...o},s)=>(0,n.jsxs)(r.Menu.CheckboxItem,{ref:s,className:(0,a.cn)(`relative flex cursor-pointer select-none items-center rounded-lg py-1.5 pl-8 pr-2.5 text-xs outline-none transition-colors hover:bg-muted focus:bg-muted data-highlighted:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50`,e),...o,children:[(0,n.jsx)(`span`,{className:`absolute left-2.5 flex h-3.5 w-3.5 items-center justify-center`,children:(0,n.jsx)(r.Menu.CheckboxItemIndicator,{children:(0,n.jsx)(i.Check,{className:`h-3 w-3`})})}),t]}));h.displayName=`DropdownMenuCheckboxItem`;var g=t.forwardRef(({className:e,children:t,...i},o)=>(0,n.jsxs)(r.Menu.RadioItem,{ref:o,className:(0,a.cn)(`relative flex cursor-pointer select-none items-center rounded-lg py-1.5 pl-8 pr-2.5 text-xs outline-none transition-colors hover:bg-muted focus:bg-muted data-highlighted:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50`,e),...i,children:[(0,n.jsx)(`span`,{className:`absolute left-2.5 flex h-3.5 w-3.5 items-center justify-center`,children:(0,n.jsx)(r.Menu.RadioItemIndicator,{children:(0,n.jsx)(`div`,{className:`h-1.5 w-1.5 rounded-full bg-foreground`})})}),t]}));g.displayName=`DropdownMenuRadioItem`;var _=t.forwardRef(({className:e,inset:t,children:r,...i},o)=>(0,n.jsx)(`div`,{ref:o,role:`presentation`,className:(0,a.cn)(`px-2.5 py-1 text-[11px] font-semibold text-muted-foreground select-none`,t&&`pl-8`,e),...i,children:r}));_.displayName=`DropdownMenuGroupLabel`;var v=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(r.Menu.Separator,{ref:i,className:(0,a.cn)(`-mx-1 my-1 h-px bg-border`,e),...t}));v.displayName=`DropdownMenuSeparator`;var y=t.forwardRef(({className:e,inset:t,children:o,...s},c)=>(0,n.jsxs)(r.Menu.SubmenuTrigger,{ref:c,className:(0,a.cn)(`flex cursor-pointer select-none items-center justify-between rounded-lg px-2.5 py-1.5 text-xs outline-none transition-colors hover:bg-muted focus:bg-muted data-highlighted:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50`,t&&`pl-8`,e),...s,children:[o,(0,n.jsx)(i.ChevronRight,{className:`ml-auto h-3.5 w-3.5`})]}));y.displayName=`DropdownMenuSubmenuTrigger`,exports.DropdownMenu=o,exports.DropdownMenuCheckboxItem=h,exports.DropdownMenuGroup=s,exports.DropdownMenuGroupLabel=_,exports.DropdownMenuItem=m,exports.DropdownMenuPopup=p,exports.DropdownMenuPortal=c,exports.DropdownMenuPositioner=f,exports.DropdownMenuRadioGroup=u,exports.DropdownMenuRadioItem=g,exports.DropdownMenuSeparator=v,exports.DropdownMenuSubmenu=d,exports.DropdownMenuSubmenuTrigger=y,exports.DropdownMenuTrigger=l;
|
|
@@ -0,0 +1,72 @@
|
|
|
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 { Menu as i } from "@base-ui/react";
|
|
6
|
+
import { Check as a, ChevronRight as o } from "lucide-react";
|
|
7
|
+
//#region src/components/ui/dropdown-menu.tsx
|
|
8
|
+
var s = i.Root, c = i.Group, l = i.Portal, u = i.Trigger, d = i.RadioGroup, f = i.SubmenuRoot, p = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Positioner, {
|
|
9
|
+
ref: a,
|
|
10
|
+
className: e("z-50 outline-none", t),
|
|
11
|
+
...r
|
|
12
|
+
}));
|
|
13
|
+
p.displayName = "DropdownMenuPositioner";
|
|
14
|
+
var m = t.forwardRef(({ className: t, sideOffset: r = 4, align: a = "start", ...o }, s) => /* @__PURE__ */ n(i.Portal, { children: /* @__PURE__ */ n(i.Positioner, {
|
|
15
|
+
sideOffset: r,
|
|
16
|
+
align: a,
|
|
17
|
+
children: /* @__PURE__ */ n(i.Popup, {
|
|
18
|
+
ref: s,
|
|
19
|
+
className: e("z-50 min-w-[8rem] origin-[var(--transform-origin)] overflow-hidden rounded-xl border border-border bg-popover p-1 text-popover-foreground shadow-lg 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),
|
|
20
|
+
...o
|
|
21
|
+
})
|
|
22
|
+
}) }));
|
|
23
|
+
m.displayName = "DropdownMenuPopup";
|
|
24
|
+
var h = t.forwardRef(({ className: t, inset: r, ...a }, o) => /* @__PURE__ */ n(i.Item, {
|
|
25
|
+
ref: o,
|
|
26
|
+
className: e("relative flex cursor-pointer select-none items-center gap-2 rounded-lg px-2.5 py-1.5 text-xs font-medium outline-none transition-all duration-100 ease-out focus:bg-muted focus:text-foreground active:scale-[0.98] data-[disabled]:pointer-events-none data-[disabled]:opacity-50", r && "pl-8", t),
|
|
27
|
+
...a
|
|
28
|
+
}));
|
|
29
|
+
h.displayName = "DropdownMenuItem";
|
|
30
|
+
var g = t.forwardRef(({ className: t, children: o, ...s }, c) => /* @__PURE__ */ r(i.CheckboxItem, {
|
|
31
|
+
ref: c,
|
|
32
|
+
className: e("relative flex cursor-pointer select-none items-center rounded-lg py-1.5 pl-8 pr-2.5 text-xs outline-none transition-colors hover:bg-muted focus:bg-muted data-highlighted:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", t),
|
|
33
|
+
...s,
|
|
34
|
+
children: [/* @__PURE__ */ n("span", {
|
|
35
|
+
className: "absolute left-2.5 flex h-3.5 w-3.5 items-center justify-center",
|
|
36
|
+
children: /* @__PURE__ */ n(i.CheckboxItemIndicator, { children: /* @__PURE__ */ n(a, { className: "h-3 w-3" }) })
|
|
37
|
+
}), o]
|
|
38
|
+
}));
|
|
39
|
+
g.displayName = "DropdownMenuCheckboxItem";
|
|
40
|
+
var _ = t.forwardRef(({ className: t, children: a, ...o }, s) => /* @__PURE__ */ r(i.RadioItem, {
|
|
41
|
+
ref: s,
|
|
42
|
+
className: e("relative flex cursor-pointer select-none items-center rounded-lg py-1.5 pl-8 pr-2.5 text-xs outline-none transition-colors hover:bg-muted focus:bg-muted data-highlighted:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", t),
|
|
43
|
+
...o,
|
|
44
|
+
children: [/* @__PURE__ */ n("span", {
|
|
45
|
+
className: "absolute left-2.5 flex h-3.5 w-3.5 items-center justify-center",
|
|
46
|
+
children: /* @__PURE__ */ n(i.RadioItemIndicator, { children: /* @__PURE__ */ n("div", { className: "h-1.5 w-1.5 rounded-full bg-foreground" }) })
|
|
47
|
+
}), a]
|
|
48
|
+
}));
|
|
49
|
+
_.displayName = "DropdownMenuRadioItem";
|
|
50
|
+
var v = t.forwardRef(({ className: t, inset: r, children: i, ...a }, o) => /* @__PURE__ */ n("div", {
|
|
51
|
+
ref: o,
|
|
52
|
+
role: "presentation",
|
|
53
|
+
className: e("px-2.5 py-1 text-[11px] font-semibold text-muted-foreground select-none", r && "pl-8", t),
|
|
54
|
+
...a,
|
|
55
|
+
children: i
|
|
56
|
+
}));
|
|
57
|
+
v.displayName = "DropdownMenuGroupLabel";
|
|
58
|
+
var y = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Separator, {
|
|
59
|
+
ref: a,
|
|
60
|
+
className: e("-mx-1 my-1 h-px bg-border", t),
|
|
61
|
+
...r
|
|
62
|
+
}));
|
|
63
|
+
y.displayName = "DropdownMenuSeparator";
|
|
64
|
+
var b = t.forwardRef(({ className: t, inset: a, children: s, ...c }, l) => /* @__PURE__ */ r(i.SubmenuTrigger, {
|
|
65
|
+
ref: l,
|
|
66
|
+
className: e("flex cursor-pointer select-none items-center justify-between rounded-lg px-2.5 py-1.5 text-xs outline-none transition-colors hover:bg-muted focus:bg-muted data-highlighted:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", a && "pl-8", t),
|
|
67
|
+
...c,
|
|
68
|
+
children: [s, /* @__PURE__ */ n(o, { className: "ml-auto h-3.5 w-3.5" })]
|
|
69
|
+
}));
|
|
70
|
+
b.displayName = "DropdownMenuSubmenuTrigger";
|
|
71
|
+
//#endregion
|
|
72
|
+
export { s as DropdownMenu, g as DropdownMenuCheckboxItem, c as DropdownMenuGroup, v as DropdownMenuGroupLabel, h as DropdownMenuItem, m as DropdownMenuPopup, l as DropdownMenuPortal, p as DropdownMenuPositioner, d as DropdownMenuRadioGroup, _ as DropdownMenuRadioItem, y as DropdownMenuSeparator, f as DropdownMenuSubmenu, b as DropdownMenuSubmenuTrigger, u as DropdownMenuTrigger };
|
|
@@ -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`,{ref:i,className:(0,r.cn)(`flex min-h-[16rem] flex-col items-center justify-center rounded-2xl border border-dashed border-border bg-muted/20 p-8 text-center animate-in fade-in-50`,e),...t}));i.displayName=`EmptyState`;var a=({className:e,...t})=>(0,n.jsx)(`div`,{className:(0,r.cn)(`mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-muted text-muted-foreground mb-3 [&>svg]:h-6 [&>svg]:w-6`,e),...t});a.displayName=`EmptyStateIcon`;var o=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(`h4`,{ref:i,className:(0,r.cn)(`text-sm font-semibold tracking-tight text-foreground mb-1`,e),...t}));o.displayName=`EmptyStateTitle`;var s=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(`p`,{ref:i,className:(0,r.cn)(`text-xs text-muted-foreground max-w-sm mb-4 leading-relaxed`,e),...t}));s.displayName=`EmptyStateDescription`;var c=({className:e,...t})=>(0,n.jsx)(`div`,{className:(0,r.cn)(`flex items-center gap-2`,e),...t});c.displayName=`EmptyStateActions`,exports.EmptyState=i,exports.EmptyStateActions=c,exports.EmptyStateDescription=s,exports.EmptyStateIcon=a,exports.EmptyStateTitle=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 { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/ui/empty-state.tsx
|
|
6
|
+
var r = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("div", {
|
|
7
|
+
ref: i,
|
|
8
|
+
className: e("flex min-h-[16rem] flex-col items-center justify-center rounded-2xl border border-dashed border-border bg-muted/20 p-8 text-center animate-in fade-in-50", t),
|
|
9
|
+
...r
|
|
10
|
+
}));
|
|
11
|
+
r.displayName = "EmptyState";
|
|
12
|
+
var i = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
13
|
+
className: e("mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-muted text-muted-foreground mb-3 [&>svg]:h-6 [&>svg]:w-6", t),
|
|
14
|
+
...r
|
|
15
|
+
});
|
|
16
|
+
i.displayName = "EmptyStateIcon";
|
|
17
|
+
var a = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("h4", {
|
|
18
|
+
ref: i,
|
|
19
|
+
className: e("text-sm font-semibold tracking-tight text-foreground mb-1", t),
|
|
20
|
+
...r
|
|
21
|
+
}));
|
|
22
|
+
a.displayName = "EmptyStateTitle";
|
|
23
|
+
var o = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("p", {
|
|
24
|
+
ref: i,
|
|
25
|
+
className: e("text-xs text-muted-foreground max-w-sm mb-4 leading-relaxed", t),
|
|
26
|
+
...r
|
|
27
|
+
}));
|
|
28
|
+
o.displayName = "EmptyStateDescription";
|
|
29
|
+
var s = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
30
|
+
className: e("flex items-center gap-2", t),
|
|
31
|
+
...r
|
|
32
|
+
});
|
|
33
|
+
s.displayName = "EmptyStateActions";
|
|
34
|
+
//#endregion
|
|
35
|
+
export { r as EmptyState, s as EmptyStateActions, o as EmptyStateDescription, i as EmptyStateIcon, a as EmptyStateTitle };
|
|
@@ -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.Field.Root,o=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Field.Label,{ref:a,className:(0,i.cn)(`text-xs font-medium leading-none text-foreground select-none cursor-pointer data-disabled:cursor-not-allowed data-disabled:opacity-50`,e),...t}));o.displayName=`FieldLabel`;var s=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Field.Control,{ref:a,className:(0,i.cn)(`flex h-8 w-full rounded-lg border border-border bg-background px-3 py-1 text-xs text-foreground placeholder:text-muted-foreground transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-invalid:border-destructive data-invalid:ring-destructive`,e),...t}));s.displayName=`FieldControl`;var c=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Field.Description,{ref:a,className:(0,i.cn)(`text-[11px] text-muted-foreground`,e),...t}));c.displayName=`FieldDescription`;var l=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Field.Error,{ref:a,className:(0,i.cn)(`text-[11px] font-medium text-destructive`,e),...t}));l.displayName=`FieldError`;var u=r.Field.Validity,d=r.Fieldset.Root,f=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Fieldset.Legend,{ref:a,className:(0,i.cn)(`text-sm font-semibold tracking-tight text-foreground border-b border-border pb-1.5 mb-3 w-full`,e),...t}));f.displayName=`FieldsetLegend`,exports.Field=a,exports.FieldControl=s,exports.FieldDescription=c,exports.FieldError=l,exports.FieldLabel=o,exports.FieldValidity=u,exports.Fieldset=d,exports.FieldsetLegend=f;
|
|
@@ -0,0 +1,38 @@
|
|
|
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 { Field as r, Fieldset as i } from "@base-ui/react";
|
|
6
|
+
//#region src/components/ui/field.tsx
|
|
7
|
+
var a = r.Root, o = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Label, {
|
|
8
|
+
ref: a,
|
|
9
|
+
className: e("text-xs font-medium leading-none text-foreground select-none cursor-pointer data-disabled:cursor-not-allowed data-disabled:opacity-50", t),
|
|
10
|
+
...i
|
|
11
|
+
}));
|
|
12
|
+
o.displayName = "FieldLabel";
|
|
13
|
+
var s = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Control, {
|
|
14
|
+
ref: a,
|
|
15
|
+
className: e("flex h-8 w-full rounded-lg border border-border bg-background px-3 py-1 text-xs text-foreground placeholder:text-muted-foreground transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-invalid:border-destructive data-invalid:ring-destructive", t),
|
|
16
|
+
...i
|
|
17
|
+
}));
|
|
18
|
+
s.displayName = "FieldControl";
|
|
19
|
+
var c = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Description, {
|
|
20
|
+
ref: a,
|
|
21
|
+
className: e("text-[11px] text-muted-foreground", t),
|
|
22
|
+
...i
|
|
23
|
+
}));
|
|
24
|
+
c.displayName = "FieldDescription";
|
|
25
|
+
var l = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Error, {
|
|
26
|
+
ref: a,
|
|
27
|
+
className: e("text-[11px] font-medium text-destructive", t),
|
|
28
|
+
...i
|
|
29
|
+
}));
|
|
30
|
+
l.displayName = "FieldError";
|
|
31
|
+
var u = r.Validity, d = i.Root, f = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Legend, {
|
|
32
|
+
ref: a,
|
|
33
|
+
className: e("text-sm font-semibold tracking-tight text-foreground border-b border-border pb-1.5 mb-3 w-full", t),
|
|
34
|
+
...r
|
|
35
|
+
}));
|
|
36
|
+
f.displayName = "FieldsetLegend";
|
|
37
|
+
//#endregion
|
|
38
|
+
export { a as Field, s as FieldControl, c as FieldDescription, l as FieldError, o as FieldLabel, u as FieldValidity, d as Fieldset, f as FieldsetLegend };
|
|
@@ -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("lucide-react"),a=require("cn");var o=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(r.OTPField.Root,{ref:i,className:(0,a.cn)(`flex items-center gap-2 select-none`,e),...t}));o.displayName=`InputOTP`;var s=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(r.OTPField.Input,{ref:i,className:(0,a.cn)(`relative flex h-10 w-9 items-center justify-center rounded-lg border border-border bg-background text-center text-sm font-semibold text-foreground shadow-2xs transition-all duration-150 focus:z-10 focus:border-ring focus:ring-2 focus:ring-ring focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-focused:ring-2 data-focused:ring-ring data-focused:border-ring`,e),...t}));s.displayName=`InputOTPSlot`;var c=t.forwardRef(({className:e,...t},r)=>(0,n.jsx)(`div`,{ref:r,role:`separator`,className:(0,a.cn)(`text-muted-foreground flex items-center justify-center`,e),...t,children:(0,n.jsx)(i.Minus,{className:`h-4 w-4`})}));c.displayName=`InputOTPSeparator`,exports.InputOTP=o,exports.InputOTPSeparator=c,exports.InputOTPSlot=s;
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { OTPField as r } from "@base-ui/react";
|
|
6
|
+
import { Minus as i } from "lucide-react";
|
|
7
|
+
//#region src/components/ui/input-otp.tsx
|
|
8
|
+
var a = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Root, {
|
|
9
|
+
ref: a,
|
|
10
|
+
className: e("flex items-center gap-2 select-none", t),
|
|
11
|
+
...i
|
|
12
|
+
}));
|
|
13
|
+
a.displayName = "InputOTP";
|
|
14
|
+
var o = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Input, {
|
|
15
|
+
ref: a,
|
|
16
|
+
className: e("relative flex h-10 w-9 items-center justify-center rounded-lg border border-border bg-background text-center text-sm font-semibold text-foreground shadow-2xs transition-all duration-150 focus:z-10 focus:border-ring focus:ring-2 focus:ring-ring focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-focused:ring-2 data-focused:ring-ring data-focused:border-ring", t),
|
|
17
|
+
...i
|
|
18
|
+
}));
|
|
19
|
+
o.displayName = "InputOTPSlot";
|
|
20
|
+
var s = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n("div", {
|
|
21
|
+
ref: a,
|
|
22
|
+
role: "separator",
|
|
23
|
+
className: e("text-muted-foreground flex items-center justify-center", t),
|
|
24
|
+
...r,
|
|
25
|
+
children: /* @__PURE__ */ n(i, { className: "h-4 w-4" })
|
|
26
|
+
}));
|
|
27
|
+
s.displayName = "InputOTPSeparator";
|
|
28
|
+
//#endregion
|
|
29
|
+
export { a as InputOTP, s as InputOTPSeparator, o as InputOTPSlot };
|
|
@@ -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("cn");var a=(0,n.cva)(`flex w-full border border-border bg-background ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-150 ease-out`,{variants:{size:{default:`h-8 px-3 text-xs rounded-lg`,xs:`h-6 px-2 text-xs rounded-md`,sm:`h-7 px-2.5 text-xs rounded-md`,md:`h-8 px-3 text-xs rounded-lg`,lg:`h-9 px-3.5 text-sm rounded-lg`}},defaultVariants:{size:`default`}}),o=t.forwardRef(({className:e,type:t,size:n=`default`,...o},s)=>(0,r.jsx)(`input`,{type:t,className:(0,i.cn)(a({size:n}),e),ref:s,...o}));o.displayName=`Input`;var s=t.forwardRef(({className:e,...t},n)=>(0,r.jsx)(`textarea`,{className:(0,i.cn)(`flex min-h-[80px] w-full rounded-lg border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-150 ease-out`,e),ref:n,...t}));s.displayName=`Textarea`,exports.Input=o,exports.Textarea=s,exports.inputVariants=a;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
//#region src/components/ui/input.tsx
|
|
7
|
+
var i = n("flex w-full border border-border bg-background ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-150 ease-out", {
|
|
8
|
+
variants: { size: {
|
|
9
|
+
default: "h-8 px-3 text-xs rounded-lg",
|
|
10
|
+
xs: "h-6 px-2 text-xs rounded-md",
|
|
11
|
+
sm: "h-7 px-2.5 text-xs rounded-md",
|
|
12
|
+
md: "h-8 px-3 text-xs rounded-lg",
|
|
13
|
+
lg: "h-9 px-3.5 text-sm rounded-lg"
|
|
14
|
+
} },
|
|
15
|
+
defaultVariants: { size: "default" }
|
|
16
|
+
}), a = t.forwardRef(({ className: t, type: n, size: a = "default", ...o }, s) => /* @__PURE__ */ r("input", {
|
|
17
|
+
type: n,
|
|
18
|
+
className: e(i({ size: a }), t),
|
|
19
|
+
ref: s,
|
|
20
|
+
...o
|
|
21
|
+
}));
|
|
22
|
+
a.displayName = "Input";
|
|
23
|
+
var o = t.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r("textarea", {
|
|
24
|
+
className: e("flex min-h-[80px] w-full rounded-lg border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-150 ease-out", t),
|
|
25
|
+
ref: i,
|
|
26
|
+
...n
|
|
27
|
+
}));
|
|
28
|
+
o.displayName = "Textarea";
|
|
29
|
+
//#endregion
|
|
30
|
+
export { a as Input, o as Textarea, i as inputVariants };
|
|
@@ -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)(`kbd`,{ref:i,className:(0,r.cn)(`pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border border-border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground shadow-2xs`,e),...t}));i.displayName=`Kbd`,exports.Kbd=i;
|
|
@@ -0,0 +1,13 @@
|
|
|
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/kbd.tsx
|
|
6
|
+
var r = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("kbd", {
|
|
7
|
+
ref: i,
|
|
8
|
+
className: e("pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border border-border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground shadow-2xs", t),
|
|
9
|
+
...r
|
|
10
|
+
}));
|
|
11
|
+
r.displayName = "Kbd";
|
|
12
|
+
//#endregion
|
|
13
|
+
export { r as Kbd };
|
|
@@ -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.Menubar,{ref:a,className:(0,i.cn)(`flex h-9 items-center space-x-1 rounded-xl border border-border bg-card p-1 shadow-2xs`,e),...t}));a.displayName=`Menubar`;var o=r.Menu.Root,s=r.Menu.Group,c=r.Menu.Portal,l=r.Menu.SubmenuRoot,u=r.Menu.RadioGroup,d=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Menu.Trigger,{ref:a,className:(0,i.cn)(`flex cursor-pointer select-none items-center rounded-lg px-2.5 py-1 text-xs font-medium text-foreground outline-none hover:bg-muted focus:bg-muted data-pressed:bg-muted`,e),...t}));d.displayName=`MenubarTrigger`;var f=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Menu.Positioner,{ref:a,sideOffset:4,className:(0,i.cn)(`z-50 outline-none`,e),...t}));f.displayName=`MenubarPositioner`;var p=t.forwardRef(({className:e,sideOffset:t=4,align:a=`start`,children:o,...s},c)=>(0,n.jsx)(r.Menu.Portal,{children:(0,n.jsx)(r.Menu.Positioner,{sideOffset:t,align:a,className:`z-50 outline-none`,children:(0,n.jsx)(r.Menu.Popup,{ref:c,className:(0,i.cn)(`z-50 min-w-[9rem] overflow-hidden rounded-xl border border-border bg-card p-1 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})})}));p.displayName=`MenubarPopup`;var m=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Menu.Item,{ref:a,className:(0,i.cn)(`relative flex cursor-pointer select-none items-center rounded-lg px-2.5 py-1.5 text-xs outline-none transition-colors hover:bg-muted focus:bg-muted data-highlighted:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50`,e),...t}));m.displayName=`MenubarItem`;var h=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Menu.Separator,{ref:a,className:(0,i.cn)(`-mx-1 my-1 h-px bg-border`,e),...t}));h.displayName=`MenubarSeparator`,exports.Menubar=a,exports.MenubarGroup=s,exports.MenubarItem=m,exports.MenubarMenu=o,exports.MenubarPopup=p,exports.MenubarPortal=c,exports.MenubarPositioner=f,exports.MenubarRadioGroup=u,exports.MenubarSeparator=h,exports.MenubarSubmenu=l,exports.MenubarTrigger=d;
|
|
@@ -0,0 +1,51 @@
|
|
|
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 { Menu as r, Menubar as i } from "@base-ui/react";
|
|
6
|
+
//#region src/components/ui/menubar.tsx
|
|
7
|
+
var a = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i, {
|
|
8
|
+
ref: a,
|
|
9
|
+
className: e("flex h-9 items-center space-x-1 rounded-xl border border-border bg-card p-1 shadow-2xs", t),
|
|
10
|
+
...r
|
|
11
|
+
}));
|
|
12
|
+
a.displayName = "Menubar";
|
|
13
|
+
var o = r.Root, s = r.Group, c = r.Portal, l = r.SubmenuRoot, u = r.RadioGroup, d = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Trigger, {
|
|
14
|
+
ref: a,
|
|
15
|
+
className: e("flex cursor-pointer select-none items-center rounded-lg px-2.5 py-1 text-xs font-medium text-foreground outline-none hover:bg-muted focus:bg-muted data-pressed:bg-muted", t),
|
|
16
|
+
...i
|
|
17
|
+
}));
|
|
18
|
+
d.displayName = "MenubarTrigger";
|
|
19
|
+
var f = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Positioner, {
|
|
20
|
+
ref: a,
|
|
21
|
+
sideOffset: 4,
|
|
22
|
+
className: e("z-50 outline-none", t),
|
|
23
|
+
...i
|
|
24
|
+
}));
|
|
25
|
+
f.displayName = "MenubarPositioner";
|
|
26
|
+
var p = t.forwardRef(({ className: t, sideOffset: i = 4, align: a = "start", children: o, ...s }, c) => /* @__PURE__ */ n(r.Portal, { children: /* @__PURE__ */ n(r.Positioner, {
|
|
27
|
+
sideOffset: i,
|
|
28
|
+
align: a,
|
|
29
|
+
className: "z-50 outline-none",
|
|
30
|
+
children: /* @__PURE__ */ n(r.Popup, {
|
|
31
|
+
ref: c,
|
|
32
|
+
className: e("z-50 min-w-[9rem] overflow-hidden rounded-xl border border-border bg-card p-1 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),
|
|
33
|
+
...s,
|
|
34
|
+
children: o
|
|
35
|
+
})
|
|
36
|
+
}) }));
|
|
37
|
+
p.displayName = "MenubarPopup";
|
|
38
|
+
var m = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Item, {
|
|
39
|
+
ref: a,
|
|
40
|
+
className: e("relative flex cursor-pointer select-none items-center rounded-lg px-2.5 py-1.5 text-xs outline-none transition-colors hover:bg-muted focus:bg-muted data-highlighted:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", t),
|
|
41
|
+
...i
|
|
42
|
+
}));
|
|
43
|
+
m.displayName = "MenubarItem";
|
|
44
|
+
var h = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Separator, {
|
|
45
|
+
ref: a,
|
|
46
|
+
className: e("-mx-1 my-1 h-px bg-border", t),
|
|
47
|
+
...i
|
|
48
|
+
}));
|
|
49
|
+
h.displayName = "MenubarSeparator";
|
|
50
|
+
//#endregion
|
|
51
|
+
export { a as Menubar, s as MenubarGroup, m as MenubarItem, o as MenubarMenu, p as MenubarPopup, c as MenubarPortal, f as MenubarPositioner, u as MenubarRadioGroup, h as MenubarSeparator, l as MenubarSubmenu, d as MenubarTrigger };
|
|
@@ -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.Meter.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=`Meter`;var o=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Meter.Track,{ref:a,className:(0,i.cn)(`relative h-2 w-full overflow-hidden rounded-full bg-muted/80`,e),...t}));o.displayName=`MeterTrack`;var s=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Meter.Indicator,{ref:a,className:(0,i.cn)(`h-full bg-primary transition-all duration-300 ease-out`,e),...t}));s.displayName=`MeterIndicator`;var c=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Meter.Label,{ref:a,className:(0,i.cn)(`text-xs font-medium text-foreground`,e),...t}));c.displayName=`MeterLabel`;var l=t.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Meter.Value,{ref:a,className:(0,i.cn)(`text-xs text-muted-foreground font-mono`,e),...t}));l.displayName=`MeterValue`,exports.Meter=a,exports.MeterIndicator=s,exports.MeterLabel=c,exports.MeterTrack=o,exports.MeterValue=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 { Meter as r } from "@base-ui/react";
|
|
6
|
+
//#region src/components/ui/meter.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 = "Meter";
|
|
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 = "MeterTrack";
|
|
20
|
+
var o = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Indicator, {
|
|
21
|
+
ref: a,
|
|
22
|
+
className: e("h-full bg-primary transition-all duration-300 ease-out", t),
|
|
23
|
+
...i
|
|
24
|
+
}));
|
|
25
|
+
o.displayName = "MeterIndicator";
|
|
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 = "MeterLabel";
|
|
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 = "MeterValue";
|
|
38
|
+
//#endregion
|
|
39
|
+
export { i as Meter, o as MeterIndicator, s as MeterLabel, a as MeterTrack, c as MeterValue };
|
|
@@ -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("lucide-react"),a=require("cn");var o=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(r.NavigationMenu.Root,{ref:i,className:(0,a.cn)(`relative z-10 flex max-w-max flex-1 items-center justify-center`,e),...t}));o.displayName=`NavigationMenu`;var s=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(r.NavigationMenu.List,{ref:i,className:(0,a.cn)(`group flex flex-1 list-none items-center justify-center gap-1`,e),...t}));s.displayName=`NavigationMenuList`;var c=r.NavigationMenu.Item,l=t.forwardRef(({className:e,children:t,...o},s)=>(0,n.jsxs)(r.NavigationMenu.Trigger,{ref:s,className:(0,a.cn)(`group inline-flex h-8 w-max items-center justify-center rounded-lg bg-background px-3 py-1 text-xs font-medium transition-colors hover:bg-muted hover:text-foreground focus:bg-muted focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted cursor-pointer select-none`,e),...o,children:[t,(0,n.jsx)(i.ChevronDown,{className:`relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-popup-open:rotate-180`,"aria-hidden":`true`})]}));l.displayName=`NavigationMenuTrigger`;var u=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(r.NavigationMenu.Positioner,{ref:i,sideOffset:8,className:(0,a.cn)(`z-50 outline-none`,e),...t}));u.displayName=`NavigationMenuPositioner`;var d=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(r.NavigationMenu.Popup,{ref:i,className:(0,a.cn)(`rounded-2xl border border-border bg-card p-4 text-foreground shadow-2xl transition-all duration-200 ease-out data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95`,e),...t}));d.displayName=`NavigationMenuPopup`;var f=r.NavigationMenu.Link,p=r.NavigationMenu.Portal,m=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(r.NavigationMenu.Content,{ref:i,className:(0,a.cn)(`w-full md:w-auto p-4`,e),...t}));m.displayName=`NavigationMenuContent`;var h=t.forwardRef(({className:e,sideOffset:t=8,...i},o)=>(0,n.jsx)(r.NavigationMenu.Portal,{children:(0,n.jsx)(r.NavigationMenu.Positioner,{sideOffset:t,className:`z-50 outline-none`,children:(0,n.jsx)(r.NavigationMenu.Popup,{className:`rounded-2xl border border-border bg-card p-4 text-foreground shadow-2xl transition-all duration-200 ease-out data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95`,children:(0,n.jsx)(r.NavigationMenu.Viewport,{ref:o,className:(0,a.cn)(`relative w-full overflow-hidden`,e),...i})})})}));h.displayName=`NavigationMenuViewport`,exports.NavigationMenu=o,exports.NavigationMenuContent=m,exports.NavigationMenuItem=c,exports.NavigationMenuLink=f,exports.NavigationMenuList=s,exports.NavigationMenuPopup=d,exports.NavigationMenuPortal=p,exports.NavigationMenuPositioner=u,exports.NavigationMenuTrigger=l,exports.NavigationMenuViewport=h;
|
|
@@ -0,0 +1,63 @@
|
|
|
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 { NavigationMenu as i } from "@base-ui/react";
|
|
6
|
+
import { ChevronDown as a } from "lucide-react";
|
|
7
|
+
//#region src/components/ui/navigation-menu.tsx
|
|
8
|
+
var o = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Root, {
|
|
9
|
+
ref: a,
|
|
10
|
+
className: e("relative z-10 flex max-w-max flex-1 items-center justify-center", t),
|
|
11
|
+
...r
|
|
12
|
+
}));
|
|
13
|
+
o.displayName = "NavigationMenu";
|
|
14
|
+
var s = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.List, {
|
|
15
|
+
ref: a,
|
|
16
|
+
className: e("group flex flex-1 list-none items-center justify-center gap-1", t),
|
|
17
|
+
...r
|
|
18
|
+
}));
|
|
19
|
+
s.displayName = "NavigationMenuList";
|
|
20
|
+
var c = i.Item, l = t.forwardRef(({ className: t, children: o, ...s }, c) => /* @__PURE__ */ r(i.Trigger, {
|
|
21
|
+
ref: c,
|
|
22
|
+
className: e("group inline-flex h-8 w-max items-center justify-center rounded-lg bg-background px-3 py-1 text-xs font-medium transition-colors hover:bg-muted hover:text-foreground focus:bg-muted focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted cursor-pointer select-none", t),
|
|
23
|
+
...s,
|
|
24
|
+
children: [o, /* @__PURE__ */ n(a, {
|
|
25
|
+
className: "relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-popup-open:rotate-180",
|
|
26
|
+
"aria-hidden": "true"
|
|
27
|
+
})]
|
|
28
|
+
}));
|
|
29
|
+
l.displayName = "NavigationMenuTrigger";
|
|
30
|
+
var u = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Positioner, {
|
|
31
|
+
ref: a,
|
|
32
|
+
sideOffset: 8,
|
|
33
|
+
className: e("z-50 outline-none", t),
|
|
34
|
+
...r
|
|
35
|
+
}));
|
|
36
|
+
u.displayName = "NavigationMenuPositioner";
|
|
37
|
+
var d = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Popup, {
|
|
38
|
+
ref: a,
|
|
39
|
+
className: e("rounded-2xl border border-border bg-card p-4 text-foreground shadow-2xl transition-all duration-200 ease-out data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95", t),
|
|
40
|
+
...r
|
|
41
|
+
}));
|
|
42
|
+
d.displayName = "NavigationMenuPopup";
|
|
43
|
+
var f = i.Link, p = i.Portal, m = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Content, {
|
|
44
|
+
ref: a,
|
|
45
|
+
className: e("w-full md:w-auto p-4", t),
|
|
46
|
+
...r
|
|
47
|
+
}));
|
|
48
|
+
m.displayName = "NavigationMenuContent";
|
|
49
|
+
var h = t.forwardRef(({ className: t, sideOffset: r = 8, ...a }, o) => /* @__PURE__ */ n(i.Portal, { children: /* @__PURE__ */ n(i.Positioner, {
|
|
50
|
+
sideOffset: r,
|
|
51
|
+
className: "z-50 outline-none",
|
|
52
|
+
children: /* @__PURE__ */ n(i.Popup, {
|
|
53
|
+
className: "rounded-2xl border border-border bg-card p-4 text-foreground shadow-2xl transition-all duration-200 ease-out data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95",
|
|
54
|
+
children: /* @__PURE__ */ n(i.Viewport, {
|
|
55
|
+
ref: o,
|
|
56
|
+
className: e("relative w-full overflow-hidden", t),
|
|
57
|
+
...a
|
|
58
|
+
})
|
|
59
|
+
})
|
|
60
|
+
}) }));
|
|
61
|
+
h.displayName = "NavigationMenuViewport";
|
|
62
|
+
//#endregion
|
|
63
|
+
export { o as NavigationMenu, m as NavigationMenuContent, c as NavigationMenuItem, f as NavigationMenuLink, s as NavigationMenuList, d as NavigationMenuPopup, p as NavigationMenuPortal, u as NavigationMenuPositioner, l as NavigationMenuTrigger, h as NavigationMenuViewport };
|
|
@@ -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("lucide-react"),a=require("cn");var o=r.NumberField.Root,s=r.NumberField.ScrubArea,c=r.NumberField.ScrubAreaCursor,l=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(r.NumberField.Group,{ref:i,className:(0,a.cn)(`relative flex h-8 w-full items-center rounded-lg border border-border bg-background shadow-2xs transition-all duration-150 focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2`,e),...t}));l.displayName=`NumberFieldGroup`;var u=t.forwardRef(({className:e,...t},i)=>(0,n.jsx)(r.NumberField.Input,{ref:i,className:(0,a.cn)(`w-full bg-transparent px-3 py-1 text-xs text-foreground placeholder:text-muted-foreground outline-none disabled:cursor-not-allowed disabled:opacity-50`,e),...t}));u.displayName=`NumberFieldInput`;var d=({className:e,children:t,...r})=>(0,n.jsx)(`div`,{className:(0,a.cn)(`flex flex-col border-l border-border divide-y divide-border h-full`,e),...r,children:t});d.displayName=`NumberFieldStepper`;var f=t.forwardRef(({className:e,...t},o)=>(0,n.jsx)(r.NumberField.Increment,{ref:o,className:(0,a.cn)(`flex flex-1 items-center justify-center px-1.5 text-muted-foreground hover:bg-muted hover:text-foreground active:bg-muted/80 disabled:opacity-30 disabled:pointer-events-none transition-colors cursor-pointer select-none`,e),...t,children:(0,n.jsx)(i.ChevronUp,{className:`h-2.5 w-2.5`})}));f.displayName=`NumberFieldIncrement`;var p=t.forwardRef(({className:e,...t},o)=>(0,n.jsx)(r.NumberField.Decrement,{ref:o,className:(0,a.cn)(`flex flex-1 items-center justify-center px-1.5 text-muted-foreground hover:bg-muted hover:text-foreground active:bg-muted/80 disabled:opacity-30 disabled:pointer-events-none transition-colors cursor-pointer select-none`,e),...t,children:(0,n.jsx)(i.ChevronDown,{className:`h-2.5 w-2.5`})}));p.displayName=`NumberFieldDecrement`,exports.NumberField=o,exports.NumberFieldDecrement=p,exports.NumberFieldGroup=l,exports.NumberFieldIncrement=f,exports.NumberFieldInput=u,exports.NumberFieldScrubArea=s,exports.NumberFieldScrubAreaCursor=c,exports.NumberFieldStepper=d;
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { NumberField as r } from "@base-ui/react";
|
|
6
|
+
import { ChevronDown as i, ChevronUp as a } from "lucide-react";
|
|
7
|
+
//#region src/components/ui/number-field.tsx
|
|
8
|
+
var o = r.Root, s = r.ScrubArea, c = r.ScrubAreaCursor, l = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Group, {
|
|
9
|
+
ref: a,
|
|
10
|
+
className: e("relative flex h-8 w-full items-center rounded-lg border border-border bg-background shadow-2xs transition-all duration-150 focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2", t),
|
|
11
|
+
...i
|
|
12
|
+
}));
|
|
13
|
+
l.displayName = "NumberFieldGroup";
|
|
14
|
+
var u = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Input, {
|
|
15
|
+
ref: a,
|
|
16
|
+
className: e("w-full bg-transparent px-3 py-1 text-xs text-foreground placeholder:text-muted-foreground outline-none disabled:cursor-not-allowed disabled:opacity-50", t),
|
|
17
|
+
...i
|
|
18
|
+
}));
|
|
19
|
+
u.displayName = "NumberFieldInput";
|
|
20
|
+
var d = ({ className: t, children: r, ...i }) => /* @__PURE__ */ n("div", {
|
|
21
|
+
className: e("flex flex-col border-l border-border divide-y divide-border h-full", t),
|
|
22
|
+
...i,
|
|
23
|
+
children: r
|
|
24
|
+
});
|
|
25
|
+
d.displayName = "NumberFieldStepper";
|
|
26
|
+
var f = t.forwardRef(({ className: t, ...i }, o) => /* @__PURE__ */ n(r.Increment, {
|
|
27
|
+
ref: o,
|
|
28
|
+
className: e("flex flex-1 items-center justify-center px-1.5 text-muted-foreground hover:bg-muted hover:text-foreground active:bg-muted/80 disabled:opacity-30 disabled:pointer-events-none transition-colors cursor-pointer select-none", t),
|
|
29
|
+
...i,
|
|
30
|
+
children: /* @__PURE__ */ n(a, { className: "h-2.5 w-2.5" })
|
|
31
|
+
}));
|
|
32
|
+
f.displayName = "NumberFieldIncrement";
|
|
33
|
+
var p = t.forwardRef(({ className: t, ...a }, o) => /* @__PURE__ */ n(r.Decrement, {
|
|
34
|
+
ref: o,
|
|
35
|
+
className: e("flex flex-1 items-center justify-center px-1.5 text-muted-foreground hover:bg-muted hover:text-foreground active:bg-muted/80 disabled:opacity-30 disabled:pointer-events-none transition-colors cursor-pointer select-none", t),
|
|
36
|
+
...a,
|
|
37
|
+
children: /* @__PURE__ */ n(i, { className: "h-2.5 w-2.5" })
|
|
38
|
+
}));
|
|
39
|
+
p.displayName = "NumberFieldDecrement";
|
|
40
|
+
//#endregion
|
|
41
|
+
export { o as NumberField, p as NumberFieldDecrement, l as NumberFieldGroup, f as NumberFieldIncrement, u as NumberFieldInput, s as NumberFieldScrubArea, c as NumberFieldScrubAreaCursor, d as NumberFieldStepper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("./button.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime"),i=require("lucide-react"),a=require("cn");var o=({className:e,...t})=>(0,r.jsx)(`nav`,{role:`navigation`,"aria-label":`pagination`,className:(0,a.cn)(`mx-auto flex w-full justify-center`,e),...t});o.displayName=`Pagination`;var s=n.forwardRef(({className:e,...t},n)=>(0,r.jsx)(`ul`,{ref:n,className:(0,a.cn)(`flex flex-row items-center gap-1`,e),...t}));s.displayName=`PaginationContent`;var c=n.forwardRef(({className:e,...t},n)=>(0,r.jsx)(`li`,{ref:n,className:(0,a.cn)(``,e),...t}));c.displayName=`PaginationItem`;var l=({className:e,isActive:n,...i})=>(0,r.jsx)(`a`,{"aria-current":n?`page`:void 0,className:(0,a.cn)(t.buttonVariants({variant:n?`outline`:`ghost`,size:`sm`}),`h-8 w-8 p-0 cursor-pointer`,n&&`bg-muted font-semibold text-foreground border-border`,e),...i});l.displayName=`PaginationLink`;var u=({className:e,...t})=>(0,r.jsxs)(l,{"aria-label":`Go to previous page`,className:(0,a.cn)(`gap-1 pl-2.5 w-auto px-3`,e),...t,children:[(0,r.jsx)(i.ChevronLeft,{className:`h-3.5 w-3.5`}),(0,r.jsx)(`span`,{className:`hidden sm:inline text-xs`,children:`Previous`})]});u.displayName=`PaginationPrevious`;var d=({className:e,...t})=>(0,r.jsxs)(l,{"aria-label":`Go to next page`,className:(0,a.cn)(`gap-1 pr-2.5 w-auto px-3`,e),...t,children:[(0,r.jsx)(`span`,{className:`hidden sm:inline text-xs`,children:`Next`}),(0,r.jsx)(i.ChevronRight,{className:`h-3.5 w-3.5`})]});d.displayName=`PaginationNext`;var f=({className:e,...t})=>(0,r.jsxs)(`span`,{"aria-hidden":!0,className:(0,a.cn)(`flex h-8 w-8 items-center justify-center`,e),...t,children:[(0,r.jsx)(i.MoreHorizontal,{className:`h-4 w-4 text-muted-foreground`}),(0,r.jsx)(`span`,{className:`sr-only`,children:`More pages`})]});f.displayName=`PaginationEllipsis`,exports.Pagination=o,exports.PaginationContent=s,exports.PaginationEllipsis=f,exports.PaginationItem=c,exports.PaginationLink=l,exports.PaginationNext=d,exports.PaginationPrevious=u;
|