@almanaclabs/blaze-ui 0.3.2 → 0.5.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.d.ts +1 -1
- package/dist/components/alert/alert.js +43 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts.map +1 -1
- 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.d.ts +2 -2
- package/dist/components/attachment/attachment.js +104 -0
- package/dist/components/avatar/avatar.d.ts +6 -4
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.js +51 -0
- package/dist/components/badge/badge.d.ts +3 -2
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +45 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +72 -0
- package/dist/components/bubble/bubble.d.ts +1 -1
- package/dist/components/bubble/bubble.js +73 -0
- package/dist/components/button/button.d.ts +5 -3
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +65 -0
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/button-group/button-group.js +41 -0
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/calendar.js +92 -0
- package/dist/components/card/card.js +56 -0
- package/dist/components/carousel/carousel.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/components/empty/empty.js +59 -0
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/field.js +107 -0
- package/dist/components/hover-card/hover-card.js +36 -0
- package/dist/components/identity-mark/identity-mark.d.ts +5 -0
- package/dist/components/identity-mark/identity-mark.d.ts.map +1 -0
- package/dist/components/identity-mark/identity-mark.js +20 -0
- package/dist/components/identity-mark/index.d.ts +2 -0
- package/dist/components/identity-mark/index.d.ts.map +1 -0
- package/dist/components/input/input.d.ts +9 -2
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/input.js +28 -0
- package/dist/components/input-group/input-group.d.ts +11 -3
- package/dist/components/input-group/input-group.d.ts.map +1 -1
- package/dist/components/input-group/input-group.js +95 -0
- package/dist/components/item/item.d.ts +2 -2
- package/dist/components/item/item.js +121 -0
- package/dist/components/label/label.js +13 -0
- package/dist/components/marker/marker.d.ts +1 -1
- package/dist/components/marker/marker.js +43 -0
- package/dist/components/message/message.js +49 -0
- package/dist/components/metric-overview/index.d.ts +2 -0
- package/dist/components/metric-overview/index.d.ts.map +1 -0
- package/dist/components/metric-overview/metric-overview.d.ts +12 -0
- package/dist/components/metric-overview/metric-overview.d.ts.map +1 -0
- package/dist/components/metric-overview/metric-overview.js +42 -0
- package/dist/components/native-select/native-select.d.ts +2 -1
- package/dist/components/native-select/native-select.d.ts.map +1 -1
- package/dist/components/native-select/native-select.js +40 -0
- package/dist/components/navigation-action/index.d.ts +2 -0
- package/dist/components/navigation-action/index.d.ts.map +1 -0
- package/dist/components/navigation-action/navigation-action.d.ts +6 -0
- package/dist/components/navigation-action/navigation-action.d.ts.map +1 -0
- package/dist/components/navigation-action/navigation-action.js +18 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts +2 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +99 -0
- package/dist/components/separator/separator.js +15 -0
- package/dist/components/sheet/sheet.js +89 -0
- package/dist/components/sidebar/sidebar.d.ts +13 -2
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar.js +419 -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.d.ts +4 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +68 -0
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/tabs/tabs.js +46 -0
- package/dist/components/textarea/textarea.js +13 -0
- package/dist/components/toast/toast.d.ts.map +1 -1
- package/dist/components/toast/toast.js +116 -0
- package/dist/components/toggle/toggle.d.ts +1 -1
- 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.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +59 -3699
- package/dist/lib/control-size.d.ts +9 -0
- package/dist/lib/control-size.d.ts.map +1 -0
- package/dist/lib/control-size.js +10 -0
- package/dist/lib/utils.js +8 -0
- package/dist/recipes/recipe-runtime.d.ts +18 -0
- package/dist/recipes/recipe-runtime.d.ts.map +1 -0
- package/package.json +2 -1
- package/recipes/README.md +24 -0
- package/recipes/guided-workflow/README.md +51 -0
- package/recipes/guided-workflow/guided-workflow.tsx +495 -0
- package/recipes/manifest.json +19 -0
- package/recipes/workspace-shell/README.md +95 -0
- package/recipes/workspace-shell/assets/google-search-ads.svg +6 -0
- package/recipes/workspace-shell/assets/home.svg +5 -0
- package/recipes/workspace-shell/assets/radiant-health.png +0 -0
- package/recipes/workspace-shell/workspace-shell.css +55 -0
- package/recipes/workspace-shell/workspace-shell.tsx +636 -0
- package/src/styles/fonts/Sohne-Book.woff2 +0 -0
- package/src/styles/fonts/Sohne-Medium.woff2 +0 -0
- package/src/styles/fonts/Sohne-Semi.woff2 +0 -0
- package/src/styles/globals.css +233 -54
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { Button as t } from "../button/button.js";
|
|
4
|
+
import { Separator as n } from "../separator/separator.js";
|
|
5
|
+
import { Input as r } from "../input/input.js";
|
|
6
|
+
import { Sheet as i, SheetContent as a, SheetDescription as o, SheetHeader as s, SheetTitle as c } from "../sheet/sheet.js";
|
|
7
|
+
import { useIsMobile as l } from "../../hooks/use-mobile.js";
|
|
8
|
+
import { Skeleton as u } from "../skeleton/skeleton.js";
|
|
9
|
+
import { Tooltip as d, TooltipContent as f, TooltipTrigger as p } from "../tooltip/tooltip.js";
|
|
10
|
+
import * as m from "react";
|
|
11
|
+
import { cva as h } from "class-variance-authority";
|
|
12
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
13
|
+
import { IconLayoutSidebar as v } from "@tabler/icons-react";
|
|
14
|
+
import { mergeProps as y } from "@base-ui/react/merge-props";
|
|
15
|
+
import { useRender as b } from "@base-ui/react/use-render";
|
|
16
|
+
//#region src/components/sidebar/sidebar.tsx
|
|
17
|
+
var x = "sidebar_state", S = 604800, C = "16rem", w = "18rem", T = "3rem", E = "b", D = m.createContext(null);
|
|
18
|
+
function O() {
|
|
19
|
+
let e = m.useContext(D);
|
|
20
|
+
if (!e) throw Error("useSidebar must be used within a SidebarProvider.");
|
|
21
|
+
return e;
|
|
22
|
+
}
|
|
23
|
+
function k({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style: a, children: o, ...s }) {
|
|
24
|
+
let c = l(), [u, d] = m.useState(!1), [f, p] = m.useState(t), h = n ?? f, _ = m.useCallback((e) => {
|
|
25
|
+
let t = typeof e == "function" ? e(h) : e;
|
|
26
|
+
r ? r(t) : p(t), document.cookie = `${x}=${t}; path=/; max-age=${S}`;
|
|
27
|
+
}, [r, h]), v = m.useCallback(() => c ? d((e) => !e) : _((e) => !e), [
|
|
28
|
+
c,
|
|
29
|
+
_,
|
|
30
|
+
d
|
|
31
|
+
]);
|
|
32
|
+
m.useEffect(() => {
|
|
33
|
+
let e = (e) => {
|
|
34
|
+
e.key === E && (e.metaKey || e.ctrlKey) && (e.preventDefault(), v());
|
|
35
|
+
};
|
|
36
|
+
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
37
|
+
}, [v]);
|
|
38
|
+
let y = h ? "expanded" : "collapsed", b = m.useMemo(() => ({
|
|
39
|
+
state: y,
|
|
40
|
+
open: h,
|
|
41
|
+
setOpen: _,
|
|
42
|
+
isMobile: c,
|
|
43
|
+
openMobile: u,
|
|
44
|
+
setOpenMobile: d,
|
|
45
|
+
toggleSidebar: v
|
|
46
|
+
}), [
|
|
47
|
+
y,
|
|
48
|
+
h,
|
|
49
|
+
_,
|
|
50
|
+
c,
|
|
51
|
+
u,
|
|
52
|
+
d,
|
|
53
|
+
v
|
|
54
|
+
]);
|
|
55
|
+
return /* @__PURE__ */ g(D.Provider, {
|
|
56
|
+
value: b,
|
|
57
|
+
children: /* @__PURE__ */ g("div", {
|
|
58
|
+
"data-slot": "sidebar-wrapper",
|
|
59
|
+
style: {
|
|
60
|
+
"--sidebar-width": C,
|
|
61
|
+
"--sidebar-width-icon": T,
|
|
62
|
+
...a
|
|
63
|
+
},
|
|
64
|
+
className: e("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", i),
|
|
65
|
+
...s,
|
|
66
|
+
children: o
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function A({ side: t = "left", variant: n = "sidebar", collapsible: r = "offcanvas", className: l, children: u, dir: d, ...f }) {
|
|
71
|
+
let { isMobile: p, state: m, openMobile: h, setOpenMobile: v } = O();
|
|
72
|
+
return r === "none" ? /* @__PURE__ */ g("div", {
|
|
73
|
+
"data-slot": "sidebar",
|
|
74
|
+
className: e("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", l),
|
|
75
|
+
...f,
|
|
76
|
+
children: u
|
|
77
|
+
}) : p ? /* @__PURE__ */ g(i, {
|
|
78
|
+
open: h,
|
|
79
|
+
onOpenChange: v,
|
|
80
|
+
...f,
|
|
81
|
+
children: /* @__PURE__ */ _(a, {
|
|
82
|
+
dir: d,
|
|
83
|
+
"data-sidebar": "sidebar",
|
|
84
|
+
"data-slot": "sidebar",
|
|
85
|
+
"data-mobile": "true",
|
|
86
|
+
className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
87
|
+
style: { "--sidebar-width": w },
|
|
88
|
+
side: t,
|
|
89
|
+
children: [/* @__PURE__ */ _(s, {
|
|
90
|
+
className: "sr-only",
|
|
91
|
+
children: [/* @__PURE__ */ g(c, { children: "Sidebar" }), /* @__PURE__ */ g(o, { children: "Displays the mobile sidebar." })]
|
|
92
|
+
}), /* @__PURE__ */ g("div", {
|
|
93
|
+
className: "flex h-full w-full flex-col",
|
|
94
|
+
children: u
|
|
95
|
+
})]
|
|
96
|
+
})
|
|
97
|
+
}) : /* @__PURE__ */ _("div", {
|
|
98
|
+
className: "group peer hidden text-sidebar-foreground md:block",
|
|
99
|
+
"data-state": m,
|
|
100
|
+
"data-collapsible": m === "collapsed" ? r : "",
|
|
101
|
+
"data-variant": n,
|
|
102
|
+
"data-side": t,
|
|
103
|
+
"data-slot": "sidebar",
|
|
104
|
+
children: [/* @__PURE__ */ g("div", {
|
|
105
|
+
"data-slot": "sidebar-gap",
|
|
106
|
+
className: e("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", n === "floating" || n === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
|
|
107
|
+
}), /* @__PURE__ */ g("div", {
|
|
108
|
+
"data-slot": "sidebar-container",
|
|
109
|
+
"data-side": t,
|
|
110
|
+
className: e("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex", n === "floating" || n === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", l),
|
|
111
|
+
...f,
|
|
112
|
+
children: /* @__PURE__ */ g("div", {
|
|
113
|
+
"data-sidebar": "sidebar",
|
|
114
|
+
"data-slot": "sidebar-inner",
|
|
115
|
+
className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",
|
|
116
|
+
children: u
|
|
117
|
+
})
|
|
118
|
+
})]
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function j({ className: n, onClick: r, ...i }) {
|
|
122
|
+
let { toggleSidebar: a } = O();
|
|
123
|
+
return /* @__PURE__ */ _(t, {
|
|
124
|
+
"data-sidebar": "trigger",
|
|
125
|
+
"data-slot": "sidebar-trigger",
|
|
126
|
+
variant: "tertiary",
|
|
127
|
+
size: "icon-sm",
|
|
128
|
+
className: e(n),
|
|
129
|
+
onClick: (e) => {
|
|
130
|
+
r?.(e), a();
|
|
131
|
+
},
|
|
132
|
+
...i,
|
|
133
|
+
children: [/* @__PURE__ */ g(v, {}), /* @__PURE__ */ g("span", {
|
|
134
|
+
className: "sr-only",
|
|
135
|
+
children: "Toggle Sidebar"
|
|
136
|
+
})]
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
function M(e, t, n) {
|
|
140
|
+
return Math.min(Math.max(e, t), n);
|
|
141
|
+
}
|
|
142
|
+
function N({ className: t, mode: n = "toggle", value: r = 0, min: i = 0, max: a = 2 ** 53 - 1, step: o = 8, resizeSide: s = "left", onValueChange: c, onResizeStart: l, onResizeEnd: u, onClick: d, onKeyDown: f, onPointerDown: p, onPointerMove: h, onPointerUp: _, onPointerCancel: v, onLostPointerCapture: y, ...b }) {
|
|
143
|
+
let { isMobile: x, state: S, toggleSidebar: C } = O(), [w, T] = m.useState(!1), E = m.useRef(null), D = m.useRef(null), k = n === "resize", A = Math.min(i, a), j = Math.max(i, a), N = M(r, A, j), P = m.useCallback(() => {
|
|
144
|
+
!D.current || typeof document > "u" || (document.body.style.cursor = D.current.cursor, document.body.style.userSelect = D.current.userSelect, D.current = null);
|
|
145
|
+
}, []);
|
|
146
|
+
m.useEffect(() => P, [P]);
|
|
147
|
+
let F = (e, t) => {
|
|
148
|
+
let n = E.current;
|
|
149
|
+
if (!(!n || n.pointerId !== t)) {
|
|
150
|
+
E.current = null;
|
|
151
|
+
try {
|
|
152
|
+
e.hasPointerCapture?.(t) && e.releasePointerCapture(t);
|
|
153
|
+
} catch {}
|
|
154
|
+
T(!1), P(), u?.();
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
return /* @__PURE__ */ g("button", {
|
|
158
|
+
"data-sidebar": "rail",
|
|
159
|
+
"data-slot": "sidebar-rail",
|
|
160
|
+
"data-mode": n,
|
|
161
|
+
"data-resizing": w || void 0,
|
|
162
|
+
"aria-label": k ? "Resize Sidebar" : "Toggle Sidebar",
|
|
163
|
+
"aria-orientation": k ? "vertical" : void 0,
|
|
164
|
+
"aria-valuemin": k ? A : void 0,
|
|
165
|
+
"aria-valuemax": k ? j : void 0,
|
|
166
|
+
"aria-valuenow": k ? N : void 0,
|
|
167
|
+
role: k ? "separator" : void 0,
|
|
168
|
+
tabIndex: k && !x && S !== "collapsed" ? 0 : -1,
|
|
169
|
+
onClick: (e) => {
|
|
170
|
+
d?.(e), !e.defaultPrevented && !k && C();
|
|
171
|
+
},
|
|
172
|
+
onKeyDown: (e) => {
|
|
173
|
+
if (f?.(e), e.defaultPrevented || !k) return;
|
|
174
|
+
let t, n = s === "left" ? o : -o;
|
|
175
|
+
e.key === "ArrowRight" ? t = N + n : e.key === "ArrowLeft" ? t = N - n : e.key === "Home" ? t = A : e.key === "End" && (t = j), t !== void 0 && (e.preventDefault(), c?.(M(t, A, j)));
|
|
176
|
+
},
|
|
177
|
+
onPointerDown: (e) => {
|
|
178
|
+
if (p?.(e), !(e.defaultPrevented || !k || x || S === "collapsed" || e.button !== 0)) {
|
|
179
|
+
e.preventDefault(), E.current = {
|
|
180
|
+
pointerId: e.pointerId,
|
|
181
|
+
startX: e.clientX,
|
|
182
|
+
startValue: N
|
|
183
|
+
}, T(!0), l?.(), typeof document < "u" && (D.current = {
|
|
184
|
+
cursor: document.body.style.cursor,
|
|
185
|
+
userSelect: document.body.style.userSelect
|
|
186
|
+
}, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none");
|
|
187
|
+
try {
|
|
188
|
+
e.currentTarget.setPointerCapture?.(e.pointerId);
|
|
189
|
+
} catch {}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
onPointerMove: (e) => {
|
|
193
|
+
h?.(e);
|
|
194
|
+
let t = E.current;
|
|
195
|
+
if (e.defaultPrevented || !t || t.pointerId !== e.pointerId) return;
|
|
196
|
+
let n = s === "left" ? 1 : -1;
|
|
197
|
+
c?.(M(t.startValue + (e.clientX - t.startX) * n, A, j));
|
|
198
|
+
},
|
|
199
|
+
onPointerUp: (e) => {
|
|
200
|
+
_?.(e), F(e.currentTarget, e.pointerId);
|
|
201
|
+
},
|
|
202
|
+
onPointerCancel: (e) => {
|
|
203
|
+
v?.(e), F(e.currentTarget, e.pointerId);
|
|
204
|
+
},
|
|
205
|
+
onLostPointerCapture: (e) => {
|
|
206
|
+
y?.(e), F(e.currentTarget, e.pointerId);
|
|
207
|
+
},
|
|
208
|
+
title: k ? "Resize Sidebar" : "Toggle Sidebar",
|
|
209
|
+
className: e("absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", k && "touch-none cursor-col-resize! select-none after:w-[2px] after:-translate-x-1/2 after:bg-transparent after:transition-colors after:duration-100 hover:after:bg-foreground/60 focus-visible:after:bg-ring data-[resizing=true]:after:bg-foreground group-data-[collapsible=icon]:hidden", t),
|
|
210
|
+
...b
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
function P({ className: t, ...n }) {
|
|
214
|
+
return /* @__PURE__ */ g("main", {
|
|
215
|
+
"data-slot": "sidebar-inset",
|
|
216
|
+
className: e("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", t),
|
|
217
|
+
...n
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
function F({ className: t, ...n }) {
|
|
221
|
+
return /* @__PURE__ */ g(r, {
|
|
222
|
+
"data-slot": "sidebar-input",
|
|
223
|
+
"data-sidebar": "input",
|
|
224
|
+
className: e("h-8 w-full bg-background shadow-none", t),
|
|
225
|
+
...n
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
function I({ className: t, ...n }) {
|
|
229
|
+
return /* @__PURE__ */ g("div", {
|
|
230
|
+
"data-slot": "sidebar-header",
|
|
231
|
+
"data-sidebar": "header",
|
|
232
|
+
className: e("flex flex-col gap-2 p-2", t),
|
|
233
|
+
...n
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
function L({ className: t, ...n }) {
|
|
237
|
+
return /* @__PURE__ */ g("div", {
|
|
238
|
+
"data-slot": "sidebar-footer",
|
|
239
|
+
"data-sidebar": "footer",
|
|
240
|
+
className: e("flex flex-col gap-2 p-2", t),
|
|
241
|
+
...n
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
function R({ className: t, ...r }) {
|
|
245
|
+
return /* @__PURE__ */ g(n, {
|
|
246
|
+
"data-slot": "sidebar-separator",
|
|
247
|
+
"data-sidebar": "separator",
|
|
248
|
+
className: e("mx-2 w-auto bg-sidebar-border", t),
|
|
249
|
+
...r
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
function z({ className: t, ...n }) {
|
|
253
|
+
return /* @__PURE__ */ g("div", {
|
|
254
|
+
"data-slot": "sidebar-content",
|
|
255
|
+
"data-sidebar": "content",
|
|
256
|
+
className: e("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden", t),
|
|
257
|
+
...n
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
function B({ className: t, ...n }) {
|
|
261
|
+
return /* @__PURE__ */ g("div", {
|
|
262
|
+
"data-slot": "sidebar-group",
|
|
263
|
+
"data-sidebar": "group",
|
|
264
|
+
className: e("relative flex w-full min-w-0 flex-col p-2", t),
|
|
265
|
+
...n
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
function V({ className: t, render: n, ...r }) {
|
|
269
|
+
return b({
|
|
270
|
+
defaultTagName: "div",
|
|
271
|
+
props: y({ className: e("type-meta flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear [--icon-stroke-width:var(--icon-stroke-16)] group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", t) }, r),
|
|
272
|
+
render: n,
|
|
273
|
+
state: {
|
|
274
|
+
slot: "sidebar-group-label",
|
|
275
|
+
sidebar: "group-label"
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
function H({ className: t, render: n, ...r }) {
|
|
280
|
+
return b({
|
|
281
|
+
defaultTagName: "button",
|
|
282
|
+
props: y({ className: e("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform [--icon-stroke-width:var(--icon-stroke-16)] group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", t) }, r),
|
|
283
|
+
render: n,
|
|
284
|
+
state: {
|
|
285
|
+
slot: "sidebar-group-action",
|
|
286
|
+
sidebar: "group-action"
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
function U({ className: t, ...n }) {
|
|
291
|
+
return /* @__PURE__ */ g("div", {
|
|
292
|
+
"data-slot": "sidebar-group-content",
|
|
293
|
+
"data-sidebar": "group-content",
|
|
294
|
+
className: e("type-body w-full", t),
|
|
295
|
+
...n
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
function W({ className: t, ...n }) {
|
|
299
|
+
return /* @__PURE__ */ g("ul", {
|
|
300
|
+
"data-slot": "sidebar-menu",
|
|
301
|
+
"data-sidebar": "menu",
|
|
302
|
+
className: e("flex w-full min-w-0 flex-col gap-0", t),
|
|
303
|
+
...n
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
function G({ className: t, ...n }) {
|
|
307
|
+
return /* @__PURE__ */ g("li", {
|
|
308
|
+
"data-slot": "sidebar-menu-item",
|
|
309
|
+
"data-sidebar": "menu-item",
|
|
310
|
+
className: e("group/menu-item relative", t),
|
|
311
|
+
...n
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
var K = h("type-body peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left ring-sidebar-ring outline-hidden transition-[width,height,padding] [--icon-stroke-width:var(--icon-stroke-16)] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate", {
|
|
315
|
+
variants: {
|
|
316
|
+
variant: {
|
|
317
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
318
|
+
outline: "bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"
|
|
319
|
+
},
|
|
320
|
+
size: {
|
|
321
|
+
default: "h-8",
|
|
322
|
+
sm: "type-meta h-7",
|
|
323
|
+
lg: "h-12 group-data-[collapsible=icon]:p-0!"
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
defaultVariants: {
|
|
327
|
+
variant: "default",
|
|
328
|
+
size: "default"
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
function q({ render: t, isActive: n = !1, variant: r = "default", size: i = "default", tooltip: a, className: o, ...s }) {
|
|
332
|
+
let { isMobile: c, state: l } = O(), u = b({
|
|
333
|
+
defaultTagName: "button",
|
|
334
|
+
props: y({ className: e(K({
|
|
335
|
+
variant: r,
|
|
336
|
+
size: i
|
|
337
|
+
}), o) }, s),
|
|
338
|
+
render: a ? /* @__PURE__ */ g(p, { render: t }) : t,
|
|
339
|
+
state: {
|
|
340
|
+
slot: "sidebar-menu-button",
|
|
341
|
+
sidebar: "menu-button",
|
|
342
|
+
size: i,
|
|
343
|
+
active: n
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
return a ? (typeof a == "string" && (a = { children: a }), /* @__PURE__ */ _(d, { children: [u, /* @__PURE__ */ g(f, {
|
|
347
|
+
side: "right",
|
|
348
|
+
align: "center",
|
|
349
|
+
hidden: l !== "collapsed" || c,
|
|
350
|
+
...a
|
|
351
|
+
})] })) : u;
|
|
352
|
+
}
|
|
353
|
+
function J({ className: t, render: n, showOnHover: r = !1, ...i }) {
|
|
354
|
+
return b({
|
|
355
|
+
defaultTagName: "button",
|
|
356
|
+
props: y({ className: e("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform [--icon-stroke-width:var(--icon-stroke-16)] group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", r && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0", t) }, i),
|
|
357
|
+
render: n,
|
|
358
|
+
state: {
|
|
359
|
+
slot: "sidebar-menu-action",
|
|
360
|
+
sidebar: "menu-action"
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
function Y({ className: t, ...n }) {
|
|
365
|
+
return /* @__PURE__ */ g("div", {
|
|
366
|
+
"data-slot": "sidebar-menu-badge",
|
|
367
|
+
"data-sidebar": "menu-badge",
|
|
368
|
+
className: e("type-meta pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground", t),
|
|
369
|
+
...n
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
function X({ className: t, showIcon: n = !1, ...r }) {
|
|
373
|
+
let [i] = m.useState(() => `${Math.floor(Math.random() * 40) + 50}%`);
|
|
374
|
+
return /* @__PURE__ */ _("div", {
|
|
375
|
+
"data-slot": "sidebar-menu-skeleton",
|
|
376
|
+
"data-sidebar": "menu-skeleton",
|
|
377
|
+
className: e("flex h-8 items-center gap-2 rounded-md px-2", t),
|
|
378
|
+
...r,
|
|
379
|
+
children: [n && /* @__PURE__ */ g(u, {
|
|
380
|
+
className: "size-4 rounded-md",
|
|
381
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
382
|
+
}), /* @__PURE__ */ g(u, {
|
|
383
|
+
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
384
|
+
"data-sidebar": "menu-skeleton-text",
|
|
385
|
+
style: { "--skeleton-width": i }
|
|
386
|
+
})]
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
function Z({ className: t, ...n }) {
|
|
390
|
+
return /* @__PURE__ */ g("ul", {
|
|
391
|
+
"data-slot": "sidebar-menu-sub",
|
|
392
|
+
"data-sidebar": "menu-sub",
|
|
393
|
+
className: e("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden", t),
|
|
394
|
+
...n
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
function Q({ className: t, ...n }) {
|
|
398
|
+
return /* @__PURE__ */ g("li", {
|
|
399
|
+
"data-slot": "sidebar-menu-sub-item",
|
|
400
|
+
"data-sidebar": "menu-sub-item",
|
|
401
|
+
className: e("group/menu-sub-item relative", t),
|
|
402
|
+
...n
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
function $({ render: t, size: n = "md", isActive: r = !1, className: i, ...a }) {
|
|
406
|
+
return b({
|
|
407
|
+
defaultTagName: "a",
|
|
408
|
+
props: y({ className: e("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden [--icon-stroke-width:var(--icon-stroke-16)] group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", i) }, a),
|
|
409
|
+
render: t,
|
|
410
|
+
state: {
|
|
411
|
+
slot: "sidebar-menu-sub-button",
|
|
412
|
+
sidebar: "menu-sub-button",
|
|
413
|
+
size: n,
|
|
414
|
+
active: r
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
//#endregion
|
|
419
|
+
export { A as Sidebar, z as SidebarContent, L as SidebarFooter, B as SidebarGroup, H as SidebarGroupAction, U as SidebarGroupContent, V as SidebarGroupLabel, I as SidebarHeader, F as SidebarInput, P as SidebarInset, W as SidebarMenu, J as SidebarMenuAction, Y as SidebarMenuBadge, q as SidebarMenuButton, G as SidebarMenuItem, X as SidebarMenuSkeleton, Z as SidebarMenuSub, $ as SidebarMenuSubButton, Q as SidebarMenuSubItem, k as SidebarProvider, N as SidebarRail, R as SidebarSeparator, j as SidebarTrigger, O as useSidebar };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/skeleton/skeleton.tsx
|
|
4
|
+
function n({ className: n, ...r }) {
|
|
5
|
+
return /* @__PURE__ */ t("div", {
|
|
6
|
+
"data-slot": "skeleton",
|
|
7
|
+
className: e("animate-pulse rounded-md bg-muted", n),
|
|
8
|
+
...r
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as Skeleton };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { Slider as r } from "@base-ui/react/slider";
|
|
4
|
+
//#region src/components/slider/slider.tsx
|
|
5
|
+
function i({ className: i, defaultValue: a, value: o, min: s = 0, max: c = 100, "aria-label": l = "Slider", "aria-labelledby": u, ...d }) {
|
|
6
|
+
let f = Array.isArray(o) ? o : Array.isArray(a) ? a : [s, c];
|
|
7
|
+
return /* @__PURE__ */ t(r.Root, {
|
|
8
|
+
className: e("data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full", i),
|
|
9
|
+
"data-slot": "slider",
|
|
10
|
+
defaultValue: a,
|
|
11
|
+
value: o,
|
|
12
|
+
min: s,
|
|
13
|
+
max: c,
|
|
14
|
+
thumbAlignment: "edge",
|
|
15
|
+
"aria-label": l,
|
|
16
|
+
"aria-labelledby": u,
|
|
17
|
+
...d,
|
|
18
|
+
children: /* @__PURE__ */ n(r.Control, {
|
|
19
|
+
className: "relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
20
|
+
children: [/* @__PURE__ */ t(r.Track, {
|
|
21
|
+
"data-slot": "slider-track",
|
|
22
|
+
className: "relative grow overflow-hidden rounded-full bg-muted select-none data-[orientation=horizontal]:h-1 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1",
|
|
23
|
+
children: /* @__PURE__ */ t(r.Indicator, {
|
|
24
|
+
"data-slot": "slider-range",
|
|
25
|
+
className: "bg-primary select-none data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
26
|
+
})
|
|
27
|
+
}), Array.from({ length: f.length }, (e, n) => /* @__PURE__ */ t(r.Thumb, {
|
|
28
|
+
"data-slot": "slider-thumb",
|
|
29
|
+
"aria-label": l && f.length > 1 ? `${l} ${n + 1}` : l,
|
|
30
|
+
"aria-labelledby": u,
|
|
31
|
+
className: "relative block size-3 shrink-0 rounded-full border border-ring bg-background ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 disabled:pointer-events-none disabled:opacity-50"
|
|
32
|
+
}, n))]
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { i as Slider };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { IconLoader2 as n } from "@tabler/icons-react";
|
|
4
|
+
//#region src/components/spinner/spinner.tsx
|
|
5
|
+
function r({ className: r, ...i }) {
|
|
6
|
+
return /* @__PURE__ */ t(n, {
|
|
7
|
+
"data-slot": "spinner",
|
|
8
|
+
role: "status",
|
|
9
|
+
"aria-label": "Loading",
|
|
10
|
+
className: e("icon-optical-16 animate-spin", r),
|
|
11
|
+
...i
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { r as Spinner };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { Switch as n } from "@base-ui/react/switch";
|
|
5
|
+
//#region src/components/switch/switch.tsx
|
|
6
|
+
function r({ className: r, size: i = "default", ...a }) {
|
|
7
|
+
return /* @__PURE__ */ t(n.Root, {
|
|
8
|
+
"data-slot": "switch",
|
|
9
|
+
"data-size": i,
|
|
10
|
+
className: e("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", r),
|
|
11
|
+
...a,
|
|
12
|
+
children: /* @__PURE__ */ t(n.Thumb, {
|
|
13
|
+
"data-slot": "switch-thumb",
|
|
14
|
+
className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { r as Switch };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
type TableProps = React.ComponentProps<'table'> & {
|
|
3
|
+
density?: 'default' | 'compact';
|
|
4
|
+
};
|
|
5
|
+
declare function Table({ className, density, ...props }: TableProps): React.JSX.Element;
|
|
3
6
|
declare function TableHeader({ className, ...props }: React.ComponentProps<'thead'>): React.JSX.Element;
|
|
4
7
|
declare function TableBody({ className, ...props }: React.ComponentProps<'tbody'>): React.JSX.Element;
|
|
5
8
|
declare function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,KAAK,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG;IAChD,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CAChC,CAAA;AAED,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAmB,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,qBAkBtE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAW1E;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAQxE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAW1E;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAWpE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAWrE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAWrE;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,qBAQjC;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,GACb,CAAA"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/table/table.tsx
|
|
5
|
+
function n({ className: n, density: r = "default", ...i }) {
|
|
6
|
+
return /* @__PURE__ */ t("div", {
|
|
7
|
+
"data-slot": "table-container",
|
|
8
|
+
tabIndex: 0,
|
|
9
|
+
className: "relative w-full overflow-x-auto",
|
|
10
|
+
children: /* @__PURE__ */ t("table", {
|
|
11
|
+
"data-slot": "table",
|
|
12
|
+
"data-density": r,
|
|
13
|
+
className: e("type-content group/table w-full border-collapse caption-bottom text-foreground data-[density=compact]:text-sm", n),
|
|
14
|
+
...i
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function r({ className: n, ...r }) {
|
|
19
|
+
return /* @__PURE__ */ t("thead", {
|
|
20
|
+
"data-slot": "table-header",
|
|
21
|
+
className: e("[&_tr]:border-b [&_tr]:border-border [&_tr]:bg-transparent [&_tr]:hover:bg-transparent", n),
|
|
22
|
+
...r
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function i({ className: n, ...r }) {
|
|
26
|
+
return /* @__PURE__ */ t("tbody", {
|
|
27
|
+
"data-slot": "table-body",
|
|
28
|
+
className: e("[&_tr:last-child]:border-0", n),
|
|
29
|
+
...r
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function a({ className: n, ...r }) {
|
|
33
|
+
return /* @__PURE__ */ t("tfoot", {
|
|
34
|
+
"data-slot": "table-footer",
|
|
35
|
+
className: e("border-t border-border bg-surface-subtle font-medium [&>tr]:last:border-b-0", n),
|
|
36
|
+
...r
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function o({ className: n, ...r }) {
|
|
40
|
+
return /* @__PURE__ */ t("tr", {
|
|
41
|
+
"data-slot": "table-row",
|
|
42
|
+
className: e("border-b border-border-subtle transition-colors hover:bg-surface-subtle has-aria-expanded:bg-surface-muted data-[state=selected]:bg-surface-muted", n),
|
|
43
|
+
...r
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function s({ className: n, ...r }) {
|
|
47
|
+
return /* @__PURE__ */ t("th", {
|
|
48
|
+
"data-slot": "table-head",
|
|
49
|
+
className: e("type-label h-12 bg-transparent px-4 text-left align-middle font-medium whitespace-nowrap text-foreground group-data-[density=compact]/table:h-10 group-data-[density=compact]/table:px-2 [&:has([role=checkbox])]:pr-0", n),
|
|
50
|
+
...r
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function c({ className: n, ...r }) {
|
|
54
|
+
return /* @__PURE__ */ t("td", {
|
|
55
|
+
"data-slot": "table-cell",
|
|
56
|
+
className: e("h-14 px-4 py-3 align-middle whitespace-nowrap group-data-[density=compact]/table:h-10 group-data-[density=compact]/table:px-2 group-data-[density=compact]/table:py-2 [&:has([role=checkbox])]:pr-0", n),
|
|
57
|
+
...r
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function l({ className: n, ...r }) {
|
|
61
|
+
return /* @__PURE__ */ t("caption", {
|
|
62
|
+
"data-slot": "table-caption",
|
|
63
|
+
className: e("mt-4 text-sm text-muted-foreground", n),
|
|
64
|
+
...r
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { n as Table, i as TableBody, l as TableCaption, c as TableCell, a as TableFooter, s as TableHead, r as TableHeader, o as TableRow };
|
|
@@ -2,7 +2,7 @@ import { Tabs as TabsPrimitive } from '@base-ui/react/tabs';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare function Tabs({ className, orientation, ...props }: TabsPrimitive.Root.Props): import("react").JSX.Element;
|
|
4
4
|
declare const tabsListVariants: (props?: ({
|
|
5
|
-
variant?: "
|
|
5
|
+
variant?: "line" | "default" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
declare function TabsList({ className, variant, ...props }: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>): import("react").JSX.Element;
|
|
8
8
|
declare function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { cva as t } from "class-variance-authority";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { Tabs as r } from "@base-ui/react/tabs";
|
|
6
|
+
//#region src/components/tabs/tabs.tsx
|
|
7
|
+
function i({ className: t, orientation: i = "horizontal", ...a }) {
|
|
8
|
+
return /* @__PURE__ */ n(r.Root, {
|
|
9
|
+
"data-slot": "tabs",
|
|
10
|
+
"data-orientation": i,
|
|
11
|
+
orientation: i,
|
|
12
|
+
className: e("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col", t),
|
|
13
|
+
...a
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
var a = t("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-8 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none", {
|
|
17
|
+
variants: { variant: {
|
|
18
|
+
default: "bg-muted",
|
|
19
|
+
line: "gap-1 bg-transparent"
|
|
20
|
+
} },
|
|
21
|
+
defaultVariants: { variant: "default" }
|
|
22
|
+
});
|
|
23
|
+
function o({ className: t, variant: i = "default", ...o }) {
|
|
24
|
+
return /* @__PURE__ */ n(r.List, {
|
|
25
|
+
"data-slot": "tabs-list",
|
|
26
|
+
"data-variant": i,
|
|
27
|
+
className: e(a({ variant: i }), t),
|
|
28
|
+
...o
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function s({ className: t, ...i }) {
|
|
32
|
+
return /* @__PURE__ */ n(r.Tab, {
|
|
33
|
+
"data-slot": "tabs-trigger",
|
|
34
|
+
className: e("type-body relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 font-normal whitespace-nowrap text-foreground-secondary transition-all [--icon-stroke-width:var(--icon-stroke-16)] group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:font-medium data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", t),
|
|
35
|
+
...i
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function c({ className: t, ...i }) {
|
|
39
|
+
return /* @__PURE__ */ n(r.Panel, {
|
|
40
|
+
"data-slot": "tabs-content",
|
|
41
|
+
className: e("type-body flex-1 outline-none", t),
|
|
42
|
+
...i
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { i as Tabs, c as TabsContent, o as TabsList, s as TabsTrigger, a as tabsListVariants };
|