@almanaclabs/blaze-ui 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/dist/components/accordion/accordion.js +53 -0
- package/dist/components/alert/alert.js +43 -0
- package/dist/components/alert-dialog/alert-dialog.js +94 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +13 -0
- package/dist/components/attachment/attachment.js +104 -0
- package/dist/components/avatar/avatar.js +50 -0
- package/dist/components/badge/badge.js +29 -0
- package/dist/components/breadcrumb/breadcrumb.js +72 -0
- package/dist/components/bubble/bubble.js +73 -0
- package/dist/components/button/button.js +46 -0
- package/dist/components/button-group/button-group.js +41 -0
- package/dist/components/calendar/calendar.js +92 -0
- package/dist/components/card/card.js +56 -0
- package/dist/components/carousel/carousel.js +110 -0
- package/dist/components/chart/chart.js +131 -0
- package/dist/components/checkbox/checkbox.js +20 -0
- package/dist/components/collapsible/collapsible.js +23 -0
- package/dist/components/combobox/combobox.js +165 -0
- package/dist/components/data-table/data-table.js +30 -0
- package/dist/components/date-picker/date-picker.js +39 -0
- package/dist/components/dialog/dialog.js +92 -0
- package/dist/components/drawer/drawer.js +121 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +136 -0
- package/dist/components/empty/empty.js +59 -0
- package/dist/components/field/field.js +107 -0
- package/dist/components/hover-card/hover-card.js +36 -0
- package/dist/components/input/input.js +15 -0
- package/dist/components/input-group/input-group.js +77 -0
- package/dist/components/item/item.js +121 -0
- package/dist/components/label/label.js +13 -0
- package/dist/components/marker/marker.js +43 -0
- package/dist/components/message/message.js +49 -0
- package/dist/components/native-select/native-select.js +39 -0
- package/dist/components/pagination/pagination.js +80 -0
- package/dist/components/popover/popover.js +54 -0
- package/dist/components/progress/progress.js +45 -0
- package/dist/components/questionnaire/questionnaire-primitive.js +353 -0
- package/dist/components/questionnaire/questionnaire.js +169 -0
- package/dist/components/radio-group/radio-group.js +26 -0
- package/dist/components/scroll-area/scroll-area.js +37 -0
- package/dist/components/select/select.js +98 -0
- package/dist/components/separator/separator.js +15 -0
- package/dist/components/sheet/sheet.js +89 -0
- package/dist/components/sidebar/sidebar.js +358 -0
- package/dist/components/skeleton/skeleton.js +12 -0
- package/dist/components/slider/slider.js +37 -0
- package/dist/components/spinner/spinner.js +15 -0
- package/dist/components/switch/switch.js +19 -0
- package/dist/components/table/table.js +66 -0
- package/dist/components/tabs/tabs.js +46 -0
- package/dist/components/textarea/textarea.js +13 -0
- package/dist/components/toast/toast.js +116 -0
- package/dist/components/toggle/toggle.js +35 -0
- package/dist/components/toggle-group/toggle-group.js +52 -0
- package/dist/components/tooltip/tooltip.js +41 -0
- package/dist/hooks/use-mobile.js +14 -0
- package/dist/index.js +56 -3699
- package/dist/lib/utils.js +8 -0
- package/dist/recipes/recipe-runtime.d.ts +6 -0
- package/dist/recipes/recipe-runtime.d.ts.map +1 -0
- package/package.json +2 -1
- package/recipes/README.md +22 -0
- package/recipes/manifest.json +12 -0
- package/recipes/workspace-shell/README.md +41 -0
- package/recipes/workspace-shell/workspace-shell.tsx +386 -0
- package/src/styles/globals.css +5 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { Button as t } from "../button/button.js";
|
|
3
|
+
import { Calendar as n } from "../calendar/calendar.js";
|
|
4
|
+
import { Popover as r, PopoverContent as i, PopoverTrigger as a } from "../popover/popover.js";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import * as c from "react";
|
|
7
|
+
import { IconCalendar as l } from "@tabler/icons-react";
|
|
8
|
+
import { format as u } from "date-fns";
|
|
9
|
+
//#region src/components/date-picker/date-picker.tsx
|
|
10
|
+
function d(d) {
|
|
11
|
+
let { value: f, defaultValue: p, onValueChange: m, placeholder: h = "Pick a date", disabled: g, className: _, calendarProps: v, triggerProps: y, formatValue: b = (e) => u(e, "PPP") } = d, [x, S] = c.useState(p), [C, w] = c.useState(!1), T = Object.prototype.hasOwnProperty.call(d, "value"), E = T ? f : x, D = (e) => {
|
|
12
|
+
T || S(e), m?.(e), e && w(!1);
|
|
13
|
+
};
|
|
14
|
+
return /* @__PURE__ */ s(r, {
|
|
15
|
+
open: C,
|
|
16
|
+
onOpenChange: w,
|
|
17
|
+
children: [/* @__PURE__ */ s(a, {
|
|
18
|
+
disabled: g,
|
|
19
|
+
render: /* @__PURE__ */ o(t, {
|
|
20
|
+
...y,
|
|
21
|
+
variant: y?.variant ?? "outline",
|
|
22
|
+
className: e("justify-start text-left font-normal data-[empty=true]:text-muted-foreground", _, y?.className)
|
|
23
|
+
}),
|
|
24
|
+
children: [/* @__PURE__ */ o(l, { "data-icon": "inline-start" }), E ? b(E) : /* @__PURE__ */ o("span", { children: h })]
|
|
25
|
+
}), /* @__PURE__ */ o(i, {
|
|
26
|
+
align: "start",
|
|
27
|
+
"aria-label": "Choose date",
|
|
28
|
+
className: "w-auto p-0",
|
|
29
|
+
children: /* @__PURE__ */ o(n, {
|
|
30
|
+
...v,
|
|
31
|
+
mode: "single",
|
|
32
|
+
selected: E,
|
|
33
|
+
onSelect: D
|
|
34
|
+
})
|
|
35
|
+
})]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { d as DatePicker };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { Button as t } from "../button/button.js";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import "react";
|
|
6
|
+
import { IconX as i } from "@tabler/icons-react";
|
|
7
|
+
import { Dialog as a } from "@base-ui/react/dialog";
|
|
8
|
+
//#region src/components/dialog/dialog.tsx
|
|
9
|
+
function o({ ...e }) {
|
|
10
|
+
return /* @__PURE__ */ n(a.Root, {
|
|
11
|
+
"data-slot": "dialog",
|
|
12
|
+
...e
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function s({ ...e }) {
|
|
16
|
+
return /* @__PURE__ */ n(a.Trigger, {
|
|
17
|
+
"data-slot": "dialog-trigger",
|
|
18
|
+
...e
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function c({ ...e }) {
|
|
22
|
+
return /* @__PURE__ */ n(a.Portal, {
|
|
23
|
+
"data-slot": "dialog-portal",
|
|
24
|
+
...e
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function l({ ...e }) {
|
|
28
|
+
return /* @__PURE__ */ n(a.Close, {
|
|
29
|
+
"data-slot": "dialog-close",
|
|
30
|
+
...e
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function u({ className: t, ...r }) {
|
|
34
|
+
return /* @__PURE__ */ n(a.Backdrop, {
|
|
35
|
+
"data-slot": "dialog-overlay",
|
|
36
|
+
className: e("fixed inset-0 isolate z-50 bg-foreground/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", t),
|
|
37
|
+
...r
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function d({ className: o, children: s, showCloseButton: l = !0, ...d }) {
|
|
41
|
+
return /* @__PURE__ */ r(c, { children: [/* @__PURE__ */ n(u, {}), /* @__PURE__ */ r(a.Popup, {
|
|
42
|
+
"data-slot": "dialog-content",
|
|
43
|
+
className: e("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", o),
|
|
44
|
+
...d,
|
|
45
|
+
children: [s, l && /* @__PURE__ */ r(a.Close, {
|
|
46
|
+
"data-slot": "dialog-close",
|
|
47
|
+
render: /* @__PURE__ */ n(t, {
|
|
48
|
+
variant: "ghost",
|
|
49
|
+
className: "absolute top-2 right-2",
|
|
50
|
+
size: "icon-sm"
|
|
51
|
+
}),
|
|
52
|
+
children: [/* @__PURE__ */ n(i, {}), /* @__PURE__ */ n("span", {
|
|
53
|
+
className: "sr-only",
|
|
54
|
+
children: "Close"
|
|
55
|
+
})]
|
|
56
|
+
})]
|
|
57
|
+
})] });
|
|
58
|
+
}
|
|
59
|
+
function f({ className: t, ...r }) {
|
|
60
|
+
return /* @__PURE__ */ n("div", {
|
|
61
|
+
"data-slot": "dialog-header",
|
|
62
|
+
className: e("flex flex-col gap-2", t),
|
|
63
|
+
...r
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function p({ className: i, showCloseButton: o = !1, children: s, ...c }) {
|
|
67
|
+
return /* @__PURE__ */ r("div", {
|
|
68
|
+
"data-slot": "dialog-footer",
|
|
69
|
+
className: e("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end", i),
|
|
70
|
+
...c,
|
|
71
|
+
children: [s, o && /* @__PURE__ */ n(a.Close, {
|
|
72
|
+
render: /* @__PURE__ */ n(t, { variant: "outline" }),
|
|
73
|
+
children: "Close"
|
|
74
|
+
})]
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function m({ className: t, ...r }) {
|
|
78
|
+
return /* @__PURE__ */ n(a.Title, {
|
|
79
|
+
"data-slot": "dialog-title",
|
|
80
|
+
className: e("font-heading text-base leading-none font-medium", t),
|
|
81
|
+
...r
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function h({ className: t, ...r }) {
|
|
85
|
+
return /* @__PURE__ */ n(a.Description, {
|
|
86
|
+
"data-slot": "dialog-description",
|
|
87
|
+
className: e("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", t),
|
|
88
|
+
...r
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
export { o as Dialog, l as DialogClose, d as DialogContent, h as DialogDescription, p as DialogFooter, f as DialogHeader, u as DialogOverlay, c as DialogPortal, m as DialogTitle, s as DialogTrigger };
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
import * as r from "react";
|
|
5
|
+
import { Drawer as i } from "@base-ui/react/drawer";
|
|
6
|
+
//#region src/components/drawer/drawer.tsx
|
|
7
|
+
var a = r.createContext(null);
|
|
8
|
+
function o() {
|
|
9
|
+
let e = r.useContext(a);
|
|
10
|
+
if (!e) throw Error("useDrawer must be used within a Drawer.");
|
|
11
|
+
return e;
|
|
12
|
+
}
|
|
13
|
+
function s({ modal: e = !0, showSwipeHandle: n = !1, snapPoints: o, swipeDirection: s = "down", ...c }) {
|
|
14
|
+
let l = o != null && o.length > 0, u = r.useMemo(() => ({
|
|
15
|
+
hasSnapPoints: l,
|
|
16
|
+
modal: e,
|
|
17
|
+
showSwipeHandle: n,
|
|
18
|
+
swipeDirection: s
|
|
19
|
+
}), [
|
|
20
|
+
l,
|
|
21
|
+
e,
|
|
22
|
+
n,
|
|
23
|
+
s
|
|
24
|
+
]);
|
|
25
|
+
return /* @__PURE__ */ t(a.Provider, {
|
|
26
|
+
value: u,
|
|
27
|
+
children: /* @__PURE__ */ t(i.Root, {
|
|
28
|
+
"data-slot": "drawer",
|
|
29
|
+
modal: e,
|
|
30
|
+
snapPoints: o,
|
|
31
|
+
swipeDirection: s,
|
|
32
|
+
...c
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function c({ ...e }) {
|
|
37
|
+
return /* @__PURE__ */ t(i.Trigger, {
|
|
38
|
+
"data-slot": "drawer-trigger",
|
|
39
|
+
...e
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function l({ ...e }) {
|
|
43
|
+
return /* @__PURE__ */ t(i.Portal, {
|
|
44
|
+
"data-slot": "drawer-portal",
|
|
45
|
+
...e
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function u({ ...e }) {
|
|
49
|
+
return /* @__PURE__ */ t(i.Close, {
|
|
50
|
+
"data-slot": "drawer-close",
|
|
51
|
+
...e
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function d({ className: n, ...r }) {
|
|
55
|
+
return /* @__PURE__ */ t(i.Backdrop, {
|
|
56
|
+
"data-slot": "drawer-overlay",
|
|
57
|
+
className: e("fixed inset-0 z-50 min-h-dvh bg-foreground/10 opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-backdrop-filter:backdrop-blur-xs supports-[-webkit-touch-callout:none]:absolute", n),
|
|
58
|
+
...r
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function f({ className: n, ...r }) {
|
|
62
|
+
return /* @__PURE__ */ t("div", {
|
|
63
|
+
"data-slot": "drawer-swipe-handle",
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
className: e("relative z-10 flex shrink-0 cursor-grab transition-opacity duration-200 group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-[swipe-axis=x]/drawer-popup:h-full group-data-[swipe-axis=x]/drawer-popup:w-3 group-data-[swipe-axis=x]/drawer-popup:items-center group-data-[swipe-axis=y]/drawer-popup:h-3 group-data-[swipe-axis=y]/drawer-popup:w-full group-data-[swipe-axis=y]/drawer-popup:justify-center group-data-[swipe-direction=down]/drawer-popup:items-end group-data-[swipe-direction=left]/drawer-popup:order-last group-data-[swipe-direction=left]/drawer-popup:justify-start group-data-[swipe-direction=right]/drawer-popup:justify-end group-data-[swipe-direction=up]/drawer-popup:order-last group-data-[swipe-direction=up]/drawer-popup:items-start after:block after:shrink-0 after:rounded-full after:bg-muted group-data-[swipe-axis=x]/drawer-popup:after:h-24 group-data-[swipe-axis=x]/drawer-popup:after:w-1 group-data-[swipe-axis=y]/drawer-popup:after:h-1 group-data-[swipe-axis=y]/drawer-popup:after:w-24 active:cursor-grabbing", n),
|
|
66
|
+
...r
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function p({ className: r, children: a, ...s }) {
|
|
70
|
+
let { hasSnapPoints: c, modal: u, showSwipeHandle: p, swipeDirection: m } = o(), h = m === "down" || m === "up" ? "y" : "x";
|
|
71
|
+
return /* @__PURE__ */ n(l, {
|
|
72
|
+
"data-slot": "drawer-portal",
|
|
73
|
+
children: [u === !0 && /* @__PURE__ */ t(d, { "data-snap-points": c ? "" : void 0 }), /* @__PURE__ */ t(i.Viewport, {
|
|
74
|
+
"data-slot": "drawer-viewport",
|
|
75
|
+
"data-modal": u,
|
|
76
|
+
className: "pointer-events-none fixed inset-0 z-50 select-none data-[modal=true]:pointer-events-auto",
|
|
77
|
+
children: /* @__PURE__ */ n(i.Popup, {
|
|
78
|
+
"data-slot": "drawer-popup",
|
|
79
|
+
"data-swipe-axis": h,
|
|
80
|
+
"data-snap-points": c ? "" : void 0,
|
|
81
|
+
className: e("group/drawer-popup pointer-events-auto fixed z-50 m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col bg-popover text-sm text-popover-foreground transition-[transform,height,opacity,filter] duration-450 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [interpolate-size:allow-keywords] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b", "data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95", "after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover)) data-[swipe-axis=x]:after:inset-y-0 data-[swipe-axis=x]:after:w-(--bleed) data-[swipe-axis=y]:after:inset-x-0 data-[swipe-axis=y]:after:h-(--bleed) data-[swipe-direction=down]:after:top-full data-[swipe-direction=left]:after:right-full data-[swipe-direction=right]:after:left-full data-[swipe-direction=up]:after:bottom-full", "[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:75%] data-[swipe-axis=y]:[--drawer-content-max-height:calc(100dvh-6rem)] data-[swipe-axis=y]:data-snap-points:[--drawer-content-height:100dvh] data-[swipe-axis=x]:sm:[--drawer-content-width:24rem]", "[--bleed:3rem] [--peek:1rem] [--stack-height:var(--drawer-frontmost-height,var(--drawer-height,0px))] [--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))] [--stack-progress:clamp(0,var(--drawer-swipe-progress),1)] [--stack-scale-base:max(0,calc(1-(var(--nested-drawers)*var(--stack-step))))] [--stack-scale:clamp(0,calc(var(--stack-scale-base)+(var(--stack-step)*var(--stack-progress))),1)] [--stack-shrink:calc(1-var(--stack-scale))] [--stack-step:0.05]", "data-ending-style:transform-(--closed-transform) data-ending-style:opacity-[0.9999] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-nested-drawer-swiping:duration-0 data-ending-style:data-nested-drawer-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-starting-style:transform-(--closed-transform) data-swiping:duration-0 data-ending-style:data-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)]", "data-[swipe-axis=y]:inset-x-0 data-[swipe-axis=y]:data-nested-drawer-open:h-(--stack-height)", "data-[swipe-axis=x]:inset-y-0 data-[swipe-axis=x]:flex-row", "data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:origin-bottom data-[swipe-direction=down]:[--closed-transform:translate3d(0,calc(100%+var(--drawer-inset,0px)+2px),0)] data-[swipe-direction=down]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)-var(--stack-peek-offset)-(var(--stack-shrink)*var(--stack-height)))]", "data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:origin-top data-[swipe-direction=up]:[--closed-transform:translate3d(0,calc(-100%-var(--drawer-inset,0px)-2px),0)] data-[swipe-direction=up]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)+var(--stack-peek-offset)+(var(--stack-shrink)*var(--stack-height)))]", "data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:origin-left data-[swipe-direction=left]:[--closed-transform:translate3d(calc(-100%-var(--drawer-inset,0px)-2px),0,0)] data-[swipe-direction=left]:[--translate-x:calc(var(--drawer-swipe-movement-x)+var(--stack-peek-offset)+(var(--stack-shrink)*100%))]", "data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:origin-right data-[swipe-direction=right]:[--closed-transform:translate3d(calc(100%+var(--drawer-inset,0px)+2px),0,0)] data-[swipe-direction=right]:[--translate-x:calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)-(var(--stack-shrink)*100%))]", r),
|
|
82
|
+
...s,
|
|
83
|
+
children: [p && /* @__PURE__ */ t(f, {}), /* @__PURE__ */ t(i.Content, {
|
|
84
|
+
"data-slot": "drawer-content",
|
|
85
|
+
className: e("flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-300 ease-[cubic-bezier(0.45,1.005,0,1.005)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none"),
|
|
86
|
+
children: a
|
|
87
|
+
})]
|
|
88
|
+
})
|
|
89
|
+
})]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function m({ className: n, ...r }) {
|
|
93
|
+
return /* @__PURE__ */ t("div", {
|
|
94
|
+
"data-slot": "drawer-header",
|
|
95
|
+
className: e("flex shrink-0 flex-col gap-0.5 p-4 pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-0.5 md:text-left", n),
|
|
96
|
+
...r
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function h({ className: n, ...r }) {
|
|
100
|
+
return /* @__PURE__ */ t("div", {
|
|
101
|
+
"data-slot": "drawer-footer",
|
|
102
|
+
className: e("mt-auto flex shrink-0 flex-col gap-2 p-4 pt-0", n),
|
|
103
|
+
...r
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function g({ className: n, ...r }) {
|
|
107
|
+
return /* @__PURE__ */ t(i.Title, {
|
|
108
|
+
"data-slot": "drawer-title",
|
|
109
|
+
className: e("font-heading text-base font-medium text-foreground", n),
|
|
110
|
+
...r
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function _({ className: n, ...r }) {
|
|
114
|
+
return /* @__PURE__ */ t(i.Description, {
|
|
115
|
+
"data-slot": "drawer-description",
|
|
116
|
+
className: e("text-sm text-balance text-muted-foreground", n),
|
|
117
|
+
...r
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
export { s as Drawer, u as DrawerClose, p as DrawerContent, _ as DrawerDescription, h as DrawerFooter, m as DrawerHeader, d as DrawerOverlay, l as DrawerPortal, f as DrawerSwipeHandle, g as DrawerTitle, c as DrawerTrigger };
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
import { IconCheck as r, IconChevronRight as i } from "@tabler/icons-react";
|
|
5
|
+
import { Menu as a } from "@base-ui/react/menu";
|
|
6
|
+
//#region src/components/dropdown-menu/dropdown-menu.tsx
|
|
7
|
+
function o({ ...e }) {
|
|
8
|
+
return /* @__PURE__ */ t(a.Root, {
|
|
9
|
+
"data-slot": "dropdown-menu",
|
|
10
|
+
...e
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function s({ ...e }) {
|
|
14
|
+
return /* @__PURE__ */ t(a.Portal, {
|
|
15
|
+
"data-slot": "dropdown-menu-portal",
|
|
16
|
+
...e
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function c({ ...e }) {
|
|
20
|
+
return /* @__PURE__ */ t(a.Trigger, {
|
|
21
|
+
"data-slot": "dropdown-menu-trigger",
|
|
22
|
+
...e
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function l({ align: n = "start", alignOffset: r = 0, side: i = "bottom", sideOffset: o = 4, className: s, ...c }) {
|
|
26
|
+
return /* @__PURE__ */ t(a.Portal, { children: /* @__PURE__ */ t(a.Positioner, {
|
|
27
|
+
className: "isolate z-50 outline-none",
|
|
28
|
+
align: n,
|
|
29
|
+
alignOffset: r,
|
|
30
|
+
side: i,
|
|
31
|
+
sideOffset: o,
|
|
32
|
+
children: /* @__PURE__ */ t(a.Popup, {
|
|
33
|
+
"data-slot": "dropdown-menu-content",
|
|
34
|
+
className: e("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", s),
|
|
35
|
+
...c
|
|
36
|
+
})
|
|
37
|
+
}) });
|
|
38
|
+
}
|
|
39
|
+
function u({ ...e }) {
|
|
40
|
+
return /* @__PURE__ */ t(a.Group, {
|
|
41
|
+
"data-slot": "dropdown-menu-group",
|
|
42
|
+
...e
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function d({ className: n, inset: r, ...i }) {
|
|
46
|
+
return /* @__PURE__ */ t(a.GroupLabel, {
|
|
47
|
+
"data-slot": "dropdown-menu-label",
|
|
48
|
+
"data-inset": r,
|
|
49
|
+
className: e("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", n),
|
|
50
|
+
...i
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function f({ className: n, inset: r, variant: i = "default", ...o }) {
|
|
54
|
+
return /* @__PURE__ */ t(a.Item, {
|
|
55
|
+
"data-slot": "dropdown-menu-item",
|
|
56
|
+
"data-inset": r,
|
|
57
|
+
"data-variant": i,
|
|
58
|
+
className: e("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", n),
|
|
59
|
+
...o
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function p({ ...e }) {
|
|
63
|
+
return /* @__PURE__ */ t(a.SubmenuRoot, {
|
|
64
|
+
"data-slot": "dropdown-menu-sub",
|
|
65
|
+
...e
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function m({ className: r, inset: o, children: s, ...c }) {
|
|
69
|
+
return /* @__PURE__ */ n(a.SubmenuTrigger, {
|
|
70
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
71
|
+
"data-inset": o,
|
|
72
|
+
className: e("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", r),
|
|
73
|
+
...c,
|
|
74
|
+
children: [s, /* @__PURE__ */ t(i, { className: "ml-auto" })]
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function h({ align: n = "start", alignOffset: r = -3, side: i = "right", sideOffset: a = 0, className: o, ...s }) {
|
|
78
|
+
return /* @__PURE__ */ t(l, {
|
|
79
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
80
|
+
className: e("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", o),
|
|
81
|
+
align: n,
|
|
82
|
+
alignOffset: r,
|
|
83
|
+
side: i,
|
|
84
|
+
sideOffset: a,
|
|
85
|
+
...s
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function g({ className: i, children: o, checked: s, inset: c, ...l }) {
|
|
89
|
+
return /* @__PURE__ */ n(a.CheckboxItem, {
|
|
90
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
91
|
+
"data-inset": c,
|
|
92
|
+
className: e("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", i),
|
|
93
|
+
checked: s,
|
|
94
|
+
...l,
|
|
95
|
+
children: [/* @__PURE__ */ t("span", {
|
|
96
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
97
|
+
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
98
|
+
children: /* @__PURE__ */ t(a.CheckboxItemIndicator, { children: /* @__PURE__ */ t(r, {}) })
|
|
99
|
+
}), o]
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function _({ ...e }) {
|
|
103
|
+
return /* @__PURE__ */ t(a.RadioGroup, {
|
|
104
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
105
|
+
...e
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function v({ className: i, children: o, inset: s, ...c }) {
|
|
109
|
+
return /* @__PURE__ */ n(a.RadioItem, {
|
|
110
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
111
|
+
"data-inset": s,
|
|
112
|
+
className: e("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", i),
|
|
113
|
+
...c,
|
|
114
|
+
children: [/* @__PURE__ */ t("span", {
|
|
115
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
116
|
+
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
117
|
+
children: /* @__PURE__ */ t(a.RadioItemIndicator, { children: /* @__PURE__ */ t(r, {}) })
|
|
118
|
+
}), o]
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function y({ className: n, ...r }) {
|
|
122
|
+
return /* @__PURE__ */ t(a.Separator, {
|
|
123
|
+
"data-slot": "dropdown-menu-separator",
|
|
124
|
+
className: e("-mx-1 my-1 h-px bg-border", n),
|
|
125
|
+
...r
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function b({ className: n, ...r }) {
|
|
129
|
+
return /* @__PURE__ */ t("span", {
|
|
130
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
131
|
+
className: e("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", n),
|
|
132
|
+
...r
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
136
|
+
export { o as DropdownMenu, g as DropdownMenuCheckboxItem, l as DropdownMenuContent, u as DropdownMenuGroup, f as DropdownMenuItem, d as DropdownMenuLabel, s as DropdownMenuPortal, _ as DropdownMenuRadioGroup, v as DropdownMenuRadioItem, y as DropdownMenuSeparator, b as DropdownMenuShortcut, p as DropdownMenuSub, h as DropdownMenuSubContent, m as DropdownMenuSubTrigger, c as DropdownMenuTrigger };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { cva as t } from "class-variance-authority";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/empty/empty.tsx
|
|
5
|
+
function r({ className: t, ...r }) {
|
|
6
|
+
return /* @__PURE__ */ n("div", {
|
|
7
|
+
"data-slot": "empty",
|
|
8
|
+
className: e("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance", t),
|
|
9
|
+
...r
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function i({ className: t, ...r }) {
|
|
13
|
+
return /* @__PURE__ */ n("div", {
|
|
14
|
+
"data-slot": "empty-header",
|
|
15
|
+
className: e("flex max-w-sm flex-col items-center gap-2", t),
|
|
16
|
+
...r
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
var a = t("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
20
|
+
variants: { variant: {
|
|
21
|
+
default: "bg-transparent",
|
|
22
|
+
icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
|
|
23
|
+
} },
|
|
24
|
+
defaultVariants: { variant: "default" }
|
|
25
|
+
});
|
|
26
|
+
function o({ className: t, variant: r = "default", ...i }) {
|
|
27
|
+
return /* @__PURE__ */ n("div", {
|
|
28
|
+
"data-slot": "empty-icon",
|
|
29
|
+
"data-variant": r,
|
|
30
|
+
className: e(a({
|
|
31
|
+
variant: r,
|
|
32
|
+
className: t
|
|
33
|
+
})),
|
|
34
|
+
...i
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function s({ className: t, ...r }) {
|
|
38
|
+
return /* @__PURE__ */ n("div", {
|
|
39
|
+
"data-slot": "empty-title",
|
|
40
|
+
className: e("font-heading text-sm font-medium tracking-tight", t),
|
|
41
|
+
...r
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function c({ className: t, ...r }) {
|
|
45
|
+
return /* @__PURE__ */ n("div", {
|
|
46
|
+
"data-slot": "empty-description",
|
|
47
|
+
className: e("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", t),
|
|
48
|
+
...r
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function l({ className: t, ...r }) {
|
|
52
|
+
return /* @__PURE__ */ n("div", {
|
|
53
|
+
"data-slot": "empty-content",
|
|
54
|
+
className: e("flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance", t),
|
|
55
|
+
...r
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { r as Empty, l as EmptyContent, c as EmptyDescription, i as EmptyHeader, o as EmptyMedia, s as EmptyTitle };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { Label as t } from "../label/label.js";
|
|
3
|
+
import { Separator as n } from "../separator/separator.js";
|
|
4
|
+
import { cva as r } from "class-variance-authority";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import { useMemo as o } from "react";
|
|
7
|
+
//#region src/components/field/field.tsx
|
|
8
|
+
function s({ className: t, ...n }) {
|
|
9
|
+
return /* @__PURE__ */ i("fieldset", {
|
|
10
|
+
"data-slot": "field-set",
|
|
11
|
+
className: e("flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", t),
|
|
12
|
+
...n
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function c({ className: t, variant: n = "legend", ...r }) {
|
|
16
|
+
return /* @__PURE__ */ i("legend", {
|
|
17
|
+
"data-slot": "field-legend",
|
|
18
|
+
"data-variant": n,
|
|
19
|
+
className: e("mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base", t),
|
|
20
|
+
...r
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function l({ className: t, ...n }) {
|
|
24
|
+
return /* @__PURE__ */ i("div", {
|
|
25
|
+
"data-slot": "field-group",
|
|
26
|
+
className: e("group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4", t),
|
|
27
|
+
...n
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
var u = r("group/field flex w-full gap-2 data-[invalid=true]:text-destructive", {
|
|
31
|
+
variants: { orientation: {
|
|
32
|
+
vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
|
|
33
|
+
horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
34
|
+
responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
35
|
+
} },
|
|
36
|
+
defaultVariants: { orientation: "vertical" }
|
|
37
|
+
});
|
|
38
|
+
function d({ className: t, orientation: n = "vertical", ...r }) {
|
|
39
|
+
return /* @__PURE__ */ i("div", {
|
|
40
|
+
role: "group",
|
|
41
|
+
"data-slot": "field",
|
|
42
|
+
"data-orientation": n,
|
|
43
|
+
className: e(u({ orientation: n }), t),
|
|
44
|
+
...r
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function f({ className: t, ...n }) {
|
|
48
|
+
return /* @__PURE__ */ i("div", {
|
|
49
|
+
"data-slot": "field-content",
|
|
50
|
+
className: e("group/field-content flex flex-1 flex-col gap-0.5 leading-snug", t),
|
|
51
|
+
...n
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function p({ className: n, ...r }) {
|
|
55
|
+
return /* @__PURE__ */ i(t, {
|
|
56
|
+
"data-slot": "field-label",
|
|
57
|
+
className: e("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", n),
|
|
58
|
+
...r
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function m({ className: t, ...n }) {
|
|
62
|
+
return /* @__PURE__ */ i("div", {
|
|
63
|
+
"data-slot": "field-label",
|
|
64
|
+
className: e("flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50", t),
|
|
65
|
+
...n
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function h({ className: t, ...n }) {
|
|
69
|
+
return /* @__PURE__ */ i("p", {
|
|
70
|
+
"data-slot": "field-description",
|
|
71
|
+
className: e("text-left text-sm leading-normal font-normal text-muted-foreground group-data-[orientation=horizontal]/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", t),
|
|
72
|
+
...n
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function g({ children: t, className: r, ...o }) {
|
|
76
|
+
return /* @__PURE__ */ a("div", {
|
|
77
|
+
"data-slot": "field-separator",
|
|
78
|
+
"data-content": !!t,
|
|
79
|
+
className: e("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", r),
|
|
80
|
+
...o,
|
|
81
|
+
children: [/* @__PURE__ */ i(n, { className: "absolute inset-0 top-1/2" }), t && /* @__PURE__ */ i("span", {
|
|
82
|
+
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
83
|
+
"data-slot": "field-separator-content",
|
|
84
|
+
children: t
|
|
85
|
+
})]
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function _({ className: t, children: n, errors: r, ...a }) {
|
|
89
|
+
let s = o(() => {
|
|
90
|
+
if (n) return n;
|
|
91
|
+
if (!r?.length) return null;
|
|
92
|
+
let e = [...new Map(r.map((e) => [e?.message, e])).values()];
|
|
93
|
+
return e.length === 1 ? e[0]?.message : /* @__PURE__ */ i("ul", {
|
|
94
|
+
className: "ml-4 flex list-disc flex-col gap-1",
|
|
95
|
+
children: e.map((e, t) => e?.message && /* @__PURE__ */ i("li", { children: e.message }, t))
|
|
96
|
+
});
|
|
97
|
+
}, [n, r]);
|
|
98
|
+
return s ? /* @__PURE__ */ i("div", {
|
|
99
|
+
role: "alert",
|
|
100
|
+
"data-slot": "field-error",
|
|
101
|
+
className: e("text-sm font-normal text-destructive", t),
|
|
102
|
+
...a,
|
|
103
|
+
children: s
|
|
104
|
+
}) : null;
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
export { d as Field, f as FieldContent, h as FieldDescription, _ as FieldError, l as FieldGroup, p as FieldLabel, c as FieldLegend, g as FieldSeparator, s as FieldSet, m as FieldTitle };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { PreviewCard as n } from "@base-ui/react/preview-card";
|
|
5
|
+
//#region src/components/hover-card/hover-card.tsx
|
|
6
|
+
function r({ ...e }) {
|
|
7
|
+
return /* @__PURE__ */ t(n.Root, {
|
|
8
|
+
"data-slot": "hover-card",
|
|
9
|
+
...e
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function i({ ...e }) {
|
|
13
|
+
return /* @__PURE__ */ t(n.Trigger, {
|
|
14
|
+
"data-slot": "hover-card-trigger",
|
|
15
|
+
...e
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function a({ className: r, side: i = "bottom", sideOffset: a = 4, align: o = "center", alignOffset: s = 4, ...c }) {
|
|
19
|
+
return /* @__PURE__ */ t(n.Portal, {
|
|
20
|
+
"data-slot": "hover-card-portal",
|
|
21
|
+
children: /* @__PURE__ */ t(n.Positioner, {
|
|
22
|
+
align: o,
|
|
23
|
+
alignOffset: s,
|
|
24
|
+
side: i,
|
|
25
|
+
sideOffset: a,
|
|
26
|
+
className: "isolate z-50",
|
|
27
|
+
children: /* @__PURE__ */ t(n.Popup, {
|
|
28
|
+
"data-slot": "hover-card-content",
|
|
29
|
+
className: e("z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", r),
|
|
30
|
+
...c
|
|
31
|
+
})
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { r as HoverCard, a as HoverCardContent, i as HoverCardTrigger };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { Input as n } from "@base-ui/react/input";
|
|
4
|
+
//#region src/components/input/input.tsx
|
|
5
|
+
var r = "h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40";
|
|
6
|
+
function i({ className: i, type: a, ...o }) {
|
|
7
|
+
return /* @__PURE__ */ t(n, {
|
|
8
|
+
type: a,
|
|
9
|
+
"data-slot": "input",
|
|
10
|
+
className: typeof i == "function" ? (t) => e(r, i(t)) : e(r, i),
|
|
11
|
+
...o
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { i as Input };
|