laif-ds 0.1.31 → 0.1.33
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/components/ui/accordion.js +2 -7
- package/dist/components/ui/alert-dialog.js +10 -37
- package/dist/components/ui/alert.js +1 -5
- package/dist/components/ui/app-multiple-select-dropdown.js +120 -116
- package/dist/components/ui/app-select.js +9 -1
- package/dist/components/ui/app-sidebar.js +9 -23
- package/dist/components/ui/aspect-ratio.js +1 -3
- package/dist/components/ui/async-select.js +80 -64
- package/dist/components/ui/audio-visualizer.js +3 -2
- package/dist/components/ui/button.js +45 -5
- package/dist/components/ui/card.js +7 -2
- package/dist/components/ui/charts/circular.js +1 -1
- package/dist/components/ui/chat-message.js +34 -16
- package/dist/components/ui/chat.js +4 -4
- package/dist/components/ui/command.js +1 -1
- package/dist/components/ui/data-cross-table.js +32 -8
- package/dist/components/ui/data-table.js +45 -44
- package/dist/components/ui/date-picker.js +2 -2
- package/dist/components/ui/dropdown-menu.js +7 -7
- package/dist/components/ui/file-preview.js +9 -9
- package/dist/components/ui/gantt/components/Chart/Bars/Bars.js +25 -3
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarItem/BarItem.js +32 -13
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsItems/BarItems.js +7 -1
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsRow.js +6 -1
- package/dist/components/ui/gantt/components/Chart/Chart.js +19 -3
- package/dist/components/ui/gantt/components/Chart/Scale/Scale.js +80 -71
- package/dist/components/ui/gantt/components/Chart/Tree/Tree.js +72 -54
- package/dist/components/ui/gantt/components/Controls/Controls.js +4 -2
- package/dist/components/ui/gantt/hooks/useGanttCalculate.js +11 -1
- package/dist/components/ui/gantt/utils/getWholeWidth.js +4 -1
- package/dist/components/ui/gantt/utils/transformData.js +7 -4
- package/dist/components/ui/input-selector.js +5 -2
- package/dist/components/ui/input.js +41 -46
- package/dist/components/ui/interrupt-prompt.js +2 -2
- package/dist/components/ui/markdown-renderer.js +2 -2
- package/dist/components/ui/message-input.js +12 -10
- package/dist/components/ui/multiple-selector.js +44 -31
- package/dist/components/ui/prompt-suggestions.js +2 -2
- package/dist/components/ui/resizable.js +1 -1
- package/dist/components/ui/select.js +6 -10
- package/dist/components/ui/sidebar.js +27 -19
- package/dist/components/ui/slider.js +103 -89
- package/dist/components/ui/table-skeleton.js +29 -11
- package/dist/components/ui/table.js +4 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/theme-switcher.js +2 -7
- package/dist/components/ui/typing-indicator.js +4 -4
- package/dist/components/ui/typo.js +1 -8
- package/dist/hooks/use-mobile.js +3 -1
- package/dist/index.d.ts +7 -7
- package/dist/styles.css +1 -1
- package/package.json +3 -1
|
@@ -33,7 +33,9 @@ function z(i, l) {
|
|
|
33
33
|
function ge(i, l) {
|
|
34
34
|
const u = JSON.parse(JSON.stringify(i));
|
|
35
35
|
for (const [b, o] of Object.entries(u))
|
|
36
|
-
u[b] = o.filter(
|
|
36
|
+
u[b] = o.filter(
|
|
37
|
+
(C) => !l.find((v) => v.value === C.value)
|
|
38
|
+
);
|
|
37
39
|
return u;
|
|
38
40
|
}
|
|
39
41
|
function we(i, l) {
|
|
@@ -189,7 +191,10 @@ const xe = a.forwardRef(
|
|
|
189
191
|
var t;
|
|
190
192
|
re(e), (t = n == null ? void 0 : n.onKeyDown) == null || t.call(n, e);
|
|
191
193
|
},
|
|
192
|
-
className: g(
|
|
194
|
+
className: g(
|
|
195
|
+
"h-auto overflow-visible bg-transparent shadow-sm",
|
|
196
|
+
n == null ? void 0 : n.className
|
|
197
|
+
),
|
|
193
198
|
shouldFilter: (n == null ? void 0 : n.shouldFilter) !== void 0 ? n.shouldFilter : !v,
|
|
194
199
|
filter: ie(),
|
|
195
200
|
children: [
|
|
@@ -197,7 +202,7 @@ const xe = a.forwardRef(
|
|
|
197
202
|
"div",
|
|
198
203
|
{
|
|
199
204
|
className: g(
|
|
200
|
-
"
|
|
205
|
+
"border-d-input ring-offset-d-background focus-within:ring-d-ring min-h-10 rounded-md border text-base focus-within:ring-1 md:text-sm",
|
|
201
206
|
{
|
|
202
207
|
"px-3 py-2": r.length !== 0,
|
|
203
208
|
"cursor-text": !w && r.length !== 0,
|
|
@@ -227,7 +232,7 @@ const xe = a.forwardRef(
|
|
|
227
232
|
{
|
|
228
233
|
type: "button",
|
|
229
234
|
className: g(
|
|
230
|
-
"
|
|
235
|
+
"text-d-secondary-foreground ring-offset-d-background focus:ring-d-ring ml-1 rounded-full outline-none focus:ring-1 focus:ring-offset-2",
|
|
231
236
|
(w || e.fixed) && "hidden"
|
|
232
237
|
),
|
|
233
238
|
onKeyDown: (t) => {
|
|
@@ -237,7 +242,7 @@ const xe = a.forwardRef(
|
|
|
237
242
|
t.preventDefault(), t.stopPropagation();
|
|
238
243
|
},
|
|
239
244
|
onClick: () => J(e),
|
|
240
|
-
children: /* @__PURE__ */ d(Y, { className: "
|
|
245
|
+
children: /* @__PURE__ */ d(Y, { className: "text-d-secondary-foreground hover:text-d-foreground h-3 w-3" })
|
|
241
246
|
}
|
|
242
247
|
)
|
|
243
248
|
]
|
|
@@ -265,7 +270,7 @@ const xe = a.forwardRef(
|
|
|
265
270
|
},
|
|
266
271
|
placeholder: H && r.length !== 0 ? "" : u,
|
|
267
272
|
className: g(
|
|
268
|
-
"flex-1 bg-transparent outline-none
|
|
273
|
+
"placeholder:text-d-muted-foreground flex-1 bg-transparent outline-none",
|
|
269
274
|
{
|
|
270
275
|
"w-full": H,
|
|
271
276
|
"px-3 py-2": r.length === 0,
|
|
@@ -279,7 +284,7 @@ const xe = a.forwardRef(
|
|
|
279
284
|
"div",
|
|
280
285
|
{
|
|
281
286
|
className: g(
|
|
282
|
-
"
|
|
287
|
+
"bg-d-secondary/20 hover:bg-d-secondary/30 absolute top-0 right-0 z-20 flex cursor-pointer items-center justify-center rounded-full border p-1",
|
|
283
288
|
(P || w || r.length < 1 || r.filter((e) => e.fixed).length === r.length) && "hidden"
|
|
284
289
|
),
|
|
285
290
|
onClick: () => {
|
|
@@ -295,7 +300,7 @@ const xe = a.forwardRef(
|
|
|
295
300
|
/* @__PURE__ */ d("div", { className: "relative", children: h && /* @__PURE__ */ d(
|
|
296
301
|
ce,
|
|
297
302
|
{
|
|
298
|
-
className: "absolute top-1 z-10 w-full rounded-md border
|
|
303
|
+
className: "bg-d-popover text-d-popover-foreground animate-in absolute top-1 z-10 w-full rounded-md border shadow-md outline-none",
|
|
299
304
|
onMouseLeave: () => {
|
|
300
305
|
$(!1);
|
|
301
306
|
},
|
|
@@ -310,31 +315,39 @@ const xe = a.forwardRef(
|
|
|
310
315
|
ne(),
|
|
311
316
|
le(),
|
|
312
317
|
!p && /* @__PURE__ */ d(K, { value: "-", className: "hidden" }),
|
|
313
|
-
Object.entries(se).map(([e, t]) => /* @__PURE__ */ d(
|
|
314
|
-
|
|
318
|
+
Object.entries(se).map(([e, t]) => /* @__PURE__ */ d(
|
|
319
|
+
ve,
|
|
315
320
|
{
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
321
|
+
heading: e,
|
|
322
|
+
className: "h-full overflow-auto",
|
|
323
|
+
children: /* @__PURE__ */ d(U, { children: t.map((f) => /* @__PURE__ */ d(
|
|
324
|
+
K,
|
|
325
|
+
{
|
|
326
|
+
value: f.label,
|
|
327
|
+
disabled: f.disable,
|
|
328
|
+
onMouseDown: (j) => {
|
|
329
|
+
j.preventDefault(), j.stopPropagation();
|
|
330
|
+
},
|
|
331
|
+
onSelect: () => {
|
|
332
|
+
if (r.length >= X) {
|
|
333
|
+
E == null || E(r.length);
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
R("");
|
|
337
|
+
const j = [...r, f];
|
|
338
|
+
O(j), l == null || l(j);
|
|
339
|
+
},
|
|
340
|
+
className: g(
|
|
341
|
+
"cursor-pointer",
|
|
342
|
+
f.disable && "text-d-secondary-foreground cursor-default"
|
|
343
|
+
),
|
|
344
|
+
children: f.label
|
|
345
|
+
},
|
|
346
|
+
f.value
|
|
347
|
+
)) })
|
|
335
348
|
},
|
|
336
|
-
|
|
337
|
-
))
|
|
349
|
+
e
|
|
350
|
+
))
|
|
338
351
|
] })
|
|
339
352
|
}
|
|
340
353
|
) })
|
|
@@ -5,13 +5,13 @@ function d({
|
|
|
5
5
|
append: l,
|
|
6
6
|
suggestions: n
|
|
7
7
|
}) {
|
|
8
|
-
return /* @__PURE__ */ t("div", { className: "space-y-6
|
|
8
|
+
return /* @__PURE__ */ t("div", { className: "grow space-y-6", children: [
|
|
9
9
|
/* @__PURE__ */ e("h2", { className: "text-center text-2xl font-bold", children: c }),
|
|
10
10
|
/* @__PURE__ */ e("div", { className: "flex gap-6 text-sm", children: n.map((r) => /* @__PURE__ */ e(
|
|
11
11
|
"button",
|
|
12
12
|
{
|
|
13
13
|
onClick: () => l({ role: "user", content: r }),
|
|
14
|
-
className: "h-max flex-1 rounded-xl border
|
|
14
|
+
className: "bg-d-background hover:bg-d-secondary h-max flex-1 rounded-xl border p-4",
|
|
15
15
|
children: /* @__PURE__ */ e("p", { children: r })
|
|
16
16
|
},
|
|
17
17
|
r
|
|
@@ -34,7 +34,7 @@ function g({
|
|
|
34
34
|
{
|
|
35
35
|
"data-slot": "resizable-handle",
|
|
36
36
|
className: t(
|
|
37
|
-
"bg-d-border focus-visible:ring-d-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after
|
|
37
|
+
"bg-d-border focus-visible:ring-d-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
38
38
|
r
|
|
39
39
|
),
|
|
40
40
|
...l,
|
|
@@ -15,14 +15,7 @@ function q({
|
|
|
15
15
|
}) {
|
|
16
16
|
const n = d.useId();
|
|
17
17
|
return /* @__PURE__ */ i("div", { className: "space-y-1.5", children: [
|
|
18
|
-
a && /* @__PURE__ */ e(
|
|
19
|
-
j,
|
|
20
|
-
{
|
|
21
|
-
htmlFor: n,
|
|
22
|
-
className: s,
|
|
23
|
-
children: a
|
|
24
|
-
}
|
|
25
|
-
),
|
|
18
|
+
a && /* @__PURE__ */ e(j, { htmlFor: n, className: s, children: a }),
|
|
26
19
|
/* @__PURE__ */ e(u.Provider, { value: { size: t, id: n }, children: /* @__PURE__ */ e(p, { "data-slot": "select", ...r }) })
|
|
27
20
|
] });
|
|
28
21
|
}
|
|
@@ -51,7 +44,7 @@ function H({
|
|
|
51
44
|
"data-slot": "select-trigger",
|
|
52
45
|
"data-size": l,
|
|
53
46
|
className: o(
|
|
54
|
-
"flex items-center justify-between
|
|
47
|
+
"border-d-input ring-offset-background data-[placeholder]:text-d-muted-foreground focus:ring-ring flex items-center justify-between rounded-md border bg-transparent px-3 py-2 whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
55
48
|
"aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive",
|
|
56
49
|
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
57
50
|
"*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2",
|
|
@@ -110,7 +103,10 @@ function K({
|
|
|
110
103
|
S,
|
|
111
104
|
{
|
|
112
105
|
"data-slot": "select-label",
|
|
113
|
-
className: o(
|
|
106
|
+
className: o(
|
|
107
|
+
"text-d-secondary-foreground px-2 py-1.5 text-xs",
|
|
108
|
+
t
|
|
109
|
+
),
|
|
114
110
|
...a
|
|
115
111
|
}
|
|
116
112
|
);
|
|
@@ -52,7 +52,15 @@ const X = d.forwardRef(
|
|
|
52
52
|
setOpenMobile: u,
|
|
53
53
|
toggleSidebar: S
|
|
54
54
|
}),
|
|
55
|
-
[
|
|
55
|
+
[
|
|
56
|
+
y,
|
|
57
|
+
h,
|
|
58
|
+
w,
|
|
59
|
+
c,
|
|
60
|
+
p,
|
|
61
|
+
u,
|
|
62
|
+
S
|
|
63
|
+
]
|
|
56
64
|
);
|
|
57
65
|
return /* @__PURE__ */ r(M.Provider, { value: C, children: /* @__PURE__ */ r(L, { delayDuration: 0, children: /* @__PURE__ */ r(
|
|
58
66
|
"div",
|
|
@@ -63,7 +71,7 @@ const X = d.forwardRef(
|
|
|
63
71
|
...n
|
|
64
72
|
},
|
|
65
73
|
className: i(
|
|
66
|
-
"group/sidebar-wrapper
|
|
74
|
+
"group/sidebar-wrapper has-[[data-variant=inset]]:bg-d-sidebar flex min-h-svh w-full",
|
|
67
75
|
o
|
|
68
76
|
),
|
|
69
77
|
ref: g,
|
|
@@ -88,7 +96,7 @@ const Y = d.forwardRef(
|
|
|
88
96
|
"div",
|
|
89
97
|
{
|
|
90
98
|
className: i(
|
|
91
|
-
"flex h-full w-[--sidebar-width] flex-col
|
|
99
|
+
"bg-d-sidebar text-d-sidebar-foreground flex h-full w-[--sidebar-width] flex-col",
|
|
92
100
|
o
|
|
93
101
|
),
|
|
94
102
|
ref: f,
|
|
@@ -100,7 +108,7 @@ const Y = d.forwardRef(
|
|
|
100
108
|
{
|
|
101
109
|
"data-sidebar": "sidebar",
|
|
102
110
|
"data-mobile": "true",
|
|
103
|
-
className: "
|
|
111
|
+
className: "bg-d-sidebar text-d-sidebar-foreground w-[--sidebar-width] p-0 [&>button]:hidden",
|
|
104
112
|
style: {
|
|
105
113
|
"--sidebar-width": q
|
|
106
114
|
},
|
|
@@ -117,7 +125,7 @@ const Y = d.forwardRef(
|
|
|
117
125
|
"div",
|
|
118
126
|
{
|
|
119
127
|
ref: f,
|
|
120
|
-
className: "group peer
|
|
128
|
+
className: "group peer text-d-sidebar-foreground hidden md:block",
|
|
121
129
|
"data-state": c,
|
|
122
130
|
"data-collapsible": c === "collapsed" ? t : "",
|
|
123
131
|
"data-variant": e,
|
|
@@ -149,7 +157,7 @@ const Y = d.forwardRef(
|
|
|
149
157
|
"div",
|
|
150
158
|
{
|
|
151
159
|
"data-sidebar": "sidebar",
|
|
152
|
-
className: "
|
|
160
|
+
className: "bg-d-sidebar group-data-[variant=floating]:border-d-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow",
|
|
153
161
|
children: n
|
|
154
162
|
}
|
|
155
163
|
)
|
|
@@ -195,10 +203,10 @@ const Q = d.forwardRef(({ className: a, ...e }, t) => {
|
|
|
195
203
|
onClick: o,
|
|
196
204
|
title: "Toggle Sidebar",
|
|
197
205
|
className: i(
|
|
198
|
-
"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px]
|
|
206
|
+
"hover:after:bg-d-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
|
|
199
207
|
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
200
208
|
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
201
|
-
"group-data-[collapsible=offcanvas]:
|
|
209
|
+
"group-data-[collapsible=offcanvas]:hover:bg-d-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
|
|
202
210
|
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
203
211
|
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
204
212
|
a
|
|
@@ -213,8 +221,8 @@ const Z = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
213
221
|
{
|
|
214
222
|
ref: t,
|
|
215
223
|
className: i(
|
|
216
|
-
"relative flex w-full flex-1 flex-col
|
|
217
|
-
"md:peer-data-[variant=inset]:m-2 md:peer-data-[
|
|
224
|
+
"bg-d-background relative flex w-full flex-1 flex-col",
|
|
225
|
+
"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 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2",
|
|
218
226
|
a
|
|
219
227
|
),
|
|
220
228
|
...e
|
|
@@ -227,7 +235,7 @@ const ee = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
227
235
|
ref: t,
|
|
228
236
|
"data-sidebar": "input",
|
|
229
237
|
className: i(
|
|
230
|
-
"h-8 w-full
|
|
238
|
+
"bg-d-background focus-visible:ring-d-sidebar-ring h-8 w-full shadow-none focus-visible:ring-2",
|
|
231
239
|
a
|
|
232
240
|
),
|
|
233
241
|
...e
|
|
@@ -259,7 +267,7 @@ const re = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
259
267
|
{
|
|
260
268
|
ref: t,
|
|
261
269
|
"data-sidebar": "separator",
|
|
262
|
-
className: i("mx-2 w-auto
|
|
270
|
+
className: i("bg-d-sidebar-border mx-2 w-auto", a),
|
|
263
271
|
...e
|
|
264
272
|
}
|
|
265
273
|
));
|
|
@@ -293,7 +301,7 @@ const oe = d.forwardRef(({ className: a, asChild: e = !1, ...t }, o) => /* @__PU
|
|
|
293
301
|
ref: o,
|
|
294
302
|
"data-sidebar": "group-label",
|
|
295
303
|
className: i(
|
|
296
|
-
"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium
|
|
304
|
+
"text-d-sidebar-foreground/70 ring-d-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear outline-none focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
297
305
|
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
298
306
|
a
|
|
299
307
|
),
|
|
@@ -307,7 +315,7 @@ const ne = d.forwardRef(({ className: a, asChild: e = !1, ...t }, o) => /* @__PU
|
|
|
307
315
|
ref: o,
|
|
308
316
|
"data-sidebar": "group-action",
|
|
309
317
|
className: i(
|
|
310
|
-
"
|
|
318
|
+
"text-d-sidebar-foreground ring-d-sidebar-ring hover:bg-d-sidebar-accent hover:text-d-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
311
319
|
// Increases the hit area of the button on mobile.
|
|
312
320
|
"after:absolute after:-inset-2 after:md:hidden",
|
|
313
321
|
"group-data-[collapsible=icon]:hidden",
|
|
@@ -410,14 +418,14 @@ const fe = d.forwardRef(({ className: a, asChild: e = !1, showOnHover: t = !1, .
|
|
|
410
418
|
ref: n,
|
|
411
419
|
"data-sidebar": "menu-action",
|
|
412
420
|
className: i(
|
|
413
|
-
"
|
|
421
|
+
"text-d-sidebar-foreground ring-d-sidebar-ring hover:bg-d-sidebar-accent hover:text-d-sidebar-accent-foreground peer-hover/menu-button:text-d-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
414
422
|
// Increases the hit area of the button on mobile.
|
|
415
423
|
"after:absolute after:-inset-2 after:md:hidden",
|
|
416
424
|
"peer-data-[size=sm]/menu-button:top-1",
|
|
417
425
|
"peer-data-[size=default]/menu-button:top-1.5",
|
|
418
426
|
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
419
427
|
"group-data-[collapsible=icon]:hidden",
|
|
420
|
-
t && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100
|
|
428
|
+
t && "peer-data-[active=true]/menu-button:text-d-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
|
|
421
429
|
a
|
|
422
430
|
),
|
|
423
431
|
...o
|
|
@@ -430,7 +438,7 @@ const pe = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
430
438
|
ref: t,
|
|
431
439
|
"data-sidebar": "menu-badge",
|
|
432
440
|
className: i(
|
|
433
|
-
"pointer-events-none absolute right-1 flex h-5 min-w-5
|
|
441
|
+
"text-d-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
|
|
434
442
|
"peer-hover/menu-button:text-d-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-d-sidebar-accent-foreground",
|
|
435
443
|
"peer-data-[size=sm]/menu-button:top-1",
|
|
436
444
|
"peer-data-[size=default]/menu-button:top-1.5",
|
|
@@ -480,7 +488,7 @@ const ge = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
480
488
|
ref: t,
|
|
481
489
|
"data-sidebar": "menu-sub",
|
|
482
490
|
className: i(
|
|
483
|
-
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l
|
|
491
|
+
"border-d-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
|
|
484
492
|
"group-data-[collapsible=icon]:hidden",
|
|
485
493
|
a
|
|
486
494
|
),
|
|
@@ -498,7 +506,7 @@ const ve = d.forwardRef(({ asChild: a = !1, size: e = "md", isActive: t, classNa
|
|
|
498
506
|
"data-size": e,
|
|
499
507
|
"data-active": t,
|
|
500
508
|
className: i(
|
|
501
|
-
"
|
|
509
|
+
"text-d-sidebar-foreground ring-d-sidebar-ring hover:bg-d-sidebar-accent hover:text-d-sidebar-accent-foreground active:bg-d-sidebar-accent active:text-d-sidebar-accent-foreground [&>svg]:text-d-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
502
510
|
"data-[active=true]:bg-d-sidebar-accent data-[active=true]:text-d-sidebar-accent-foreground data-[active=true]:font-bold",
|
|
503
511
|
e === "sm" && "text-xs",
|
|
504
512
|
e === "md" && "text-sm",
|
|
@@ -33,99 +33,113 @@ const S = w(
|
|
|
33
33
|
size: "base"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
), B = F.forwardRef(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
/* @__PURE__ */ u(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"div",
|
|
80
|
-
{
|
|
81
|
-
className: "absolute w-1 h-4 -mt-1.5 bg-d-muted-foreground/50 rounded-full",
|
|
82
|
-
style: {
|
|
83
|
-
left: `calc(${j(a)}% - 2px)`,
|
|
84
|
-
top: "50%",
|
|
85
|
-
transform: "translateY(-50%)"
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
n
|
|
89
|
-
)) }),
|
|
90
|
-
o && e.value ? /* @__PURE__ */ u(k, { children: [
|
|
91
|
-
/* @__PURE__ */ l("div", { className: "absolute h-full w-full bg-d-muted/30" }),
|
|
92
|
-
/* @__PURE__ */ l(
|
|
36
|
+
), B = F.forwardRef(
|
|
37
|
+
({
|
|
38
|
+
className: C,
|
|
39
|
+
size: m,
|
|
40
|
+
formatValue: i,
|
|
41
|
+
showValues: $ = !1,
|
|
42
|
+
showStickyLabel: r = !1,
|
|
43
|
+
stickyLabelSuffix: h = "",
|
|
44
|
+
fillOffset: o = !1,
|
|
45
|
+
offsetValue: v,
|
|
46
|
+
steps: d,
|
|
47
|
+
showStepMarkers: z = !1,
|
|
48
|
+
...e
|
|
49
|
+
}, R) => {
|
|
50
|
+
const s = v !== void 0 ? v : e.min !== void 0 && e.max !== void 0 ? (e.min + e.max) / 2 : 50, f = () => {
|
|
51
|
+
if (!o) return 0;
|
|
52
|
+
const a = e.min || 0, t = (e.max || 100) - a;
|
|
53
|
+
return (s - a) / t * 100;
|
|
54
|
+
}, g = (a) => d ? d.reduce((n, t) => Math.abs(t - a) < Math.abs(n - a) ? t : n) : a, T = (a) => {
|
|
55
|
+
if (!d || !e.onValueChange) {
|
|
56
|
+
e.onValueChange && e.onValueChange(a);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const n = g(a[0]), t = a.length > 1 ? [n, g(a[1])] : [n];
|
|
60
|
+
e.onValueChange(t);
|
|
61
|
+
}, j = (a) => {
|
|
62
|
+
const n = e.min || 0, t = e.max || 100;
|
|
63
|
+
return (a - n) / (t - n) * 100;
|
|
64
|
+
};
|
|
65
|
+
return /* @__PURE__ */ u("div", { className: "flex w-full flex-col gap-1", children: [
|
|
66
|
+
/* @__PURE__ */ u(
|
|
67
|
+
y,
|
|
68
|
+
{
|
|
69
|
+
ref: R,
|
|
70
|
+
className: c(
|
|
71
|
+
"relative flex w-full touch-none items-center select-none",
|
|
72
|
+
C
|
|
73
|
+
),
|
|
74
|
+
...e,
|
|
75
|
+
onValueChange: void 0,
|
|
76
|
+
onValueChange: d ? T : e.onValueChange,
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ u(M, { className: c(S({ size: m })), children: [
|
|
79
|
+
d && z && /* @__PURE__ */ l("div", { className: "absolute h-full w-full", children: d.map((a, n) => /* @__PURE__ */ l(
|
|
93
80
|
"div",
|
|
94
81
|
{
|
|
95
|
-
className: "absolute h-
|
|
82
|
+
className: "bg-d-muted-foreground/50 absolute -mt-1.5 h-4 w-1 rounded-full",
|
|
96
83
|
style: {
|
|
97
|
-
left:
|
|
98
|
-
|
|
84
|
+
left: `calc(${j(a)}% - 2px)`,
|
|
85
|
+
top: "50%",
|
|
86
|
+
transform: "translateY(-50%)"
|
|
99
87
|
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
88
|
+
},
|
|
89
|
+
n
|
|
90
|
+
)) }),
|
|
91
|
+
o && e.value ? /* @__PURE__ */ u(k, { children: [
|
|
92
|
+
/* @__PURE__ */ l("div", { className: "bg-d-muted/30 absolute h-full w-full" }),
|
|
93
|
+
/* @__PURE__ */ l(
|
|
94
|
+
"div",
|
|
95
|
+
{
|
|
96
|
+
className: "bg-d-primary absolute h-full",
|
|
97
|
+
style: {
|
|
98
|
+
left: e.value[0] < s ? `${(e.value[0] - (e.min || 0)) / ((e.max || 100) - (e.min || 0)) * 100}%` : `${f()}%`,
|
|
99
|
+
right: e.value[0] > s ? `${100 - (e.value[0] - (e.min || 0)) / ((e.max || 100) - (e.min || 0)) * 100}%` : `${100 - f()}%`
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
] }) : /* @__PURE__ */ l(P, { className: "bg-d-primary absolute h-full" })
|
|
104
|
+
] }),
|
|
105
|
+
/* @__PURE__ */ l(
|
|
106
|
+
b,
|
|
107
|
+
{
|
|
108
|
+
className: c(N({ size: m }), "relative"),
|
|
109
|
+
children: r && e.value && /* @__PURE__ */ l(
|
|
110
|
+
x,
|
|
111
|
+
{
|
|
112
|
+
variant: "default",
|
|
113
|
+
className: "absolute -top-5 left-1/2 z-10 -translate-x-1/2 -translate-y-1/2",
|
|
114
|
+
children: i ? i(e.value[0]) : `${e.value[0]}${h}`
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
e.value && e.value.length > 1 && /* @__PURE__ */ l(
|
|
120
|
+
b,
|
|
121
|
+
{
|
|
122
|
+
className: c(N({ size: m }), "relative"),
|
|
123
|
+
children: r && /* @__PURE__ */ l(
|
|
124
|
+
x,
|
|
125
|
+
{
|
|
126
|
+
variant: "default",
|
|
127
|
+
className: "absolute -top-5 left-1/2 z-10 -translate-x-1/2 -translate-y-1/2",
|
|
128
|
+
children: i ? i(e.value[1]) : `${e.value[1]}${h}`
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
}
|
|
132
|
+
)
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
$ && e.value && /* @__PURE__ */ u("div", { className: "text-d-muted-foreground flex justify-between text-xs font-medium", children: [
|
|
137
|
+
/* @__PURE__ */ l("span", { children: i ? i(e.value[0]) : e.value[0] }),
|
|
138
|
+
e.value.length > 1 ? /* @__PURE__ */ l("span", { children: i ? i(e.value[1]) : e.value[1] }) : e.max !== void 0 ? /* @__PURE__ */ l("span", { children: i ? i(e.max) : e.max }) : null
|
|
139
|
+
] })
|
|
140
|
+
] });
|
|
141
|
+
}
|
|
142
|
+
);
|
|
129
143
|
B.displayName = y.displayName;
|
|
130
144
|
export {
|
|
131
145
|
B as Slider
|
|
@@ -17,20 +17,38 @@ function S({
|
|
|
17
17
|
/* @__PURE__ */ l(g, { children: /* @__PURE__ */ a(c, { children: [
|
|
18
18
|
/* @__PURE__ */ l(n, { className: "relative min-h-[50px] min-w-[50px] border-r", children: o && s && /* @__PURE__ */ a(p, { children: [
|
|
19
19
|
/* @__PURE__ */ l("div", { className: "absolute top-2 left-2 text-xs", children: o }),
|
|
20
|
-
/* @__PURE__ */ l("div", { className: "absolute
|
|
20
|
+
/* @__PURE__ */ l("div", { className: "absolute right-2 bottom-2 text-xs", children: s })
|
|
21
21
|
] }) }),
|
|
22
|
-
r.length > 0 ? r.map((t, e) => /* @__PURE__ */ l(
|
|
23
|
-
|
|
24
|
-
/* @__PURE__ */ l(v, { children: Array.from({ length: h }).map((t, e) => /* @__PURE__ */ a(c, { children: [
|
|
25
|
-
/* @__PURE__ */ l(d, { className: "min-w-[100px] w-auto", children: /* @__PURE__ */ l(m, { className: "h-6 w-full" }) }),
|
|
26
|
-
Array.from({ length: i }).map((T, b) => /* @__PURE__ */ l(
|
|
27
|
-
d,
|
|
22
|
+
r.length > 0 ? r.map((t, e) => /* @__PURE__ */ l(
|
|
23
|
+
n,
|
|
28
24
|
{
|
|
29
|
-
className: "
|
|
30
|
-
children:
|
|
25
|
+
className: "w-auto min-w-[100px] border-r",
|
|
26
|
+
children: t
|
|
31
27
|
},
|
|
32
|
-
`
|
|
33
|
-
))
|
|
28
|
+
`header-col-${e}`
|
|
29
|
+
)) : Array.from({ length: i }).map(
|
|
30
|
+
(t, e) => /* @__PURE__ */ l(
|
|
31
|
+
n,
|
|
32
|
+
{
|
|
33
|
+
className: "w-auto min-w-[100px] border-r",
|
|
34
|
+
children: /* @__PURE__ */ l(m, { className: "mx-auto h-6 w-full" })
|
|
35
|
+
},
|
|
36
|
+
`skeleton-header-${e}`
|
|
37
|
+
)
|
|
38
|
+
)
|
|
39
|
+
] }) }),
|
|
40
|
+
/* @__PURE__ */ l(v, { children: Array.from({ length: h }).map((t, e) => /* @__PURE__ */ a(c, { children: [
|
|
41
|
+
/* @__PURE__ */ l(d, { className: "w-auto min-w-[100px]", children: /* @__PURE__ */ l(m, { className: "h-6 w-full" }) }),
|
|
42
|
+
Array.from({ length: i }).map(
|
|
43
|
+
(T, b) => /* @__PURE__ */ l(
|
|
44
|
+
d,
|
|
45
|
+
{
|
|
46
|
+
className: "w-auto min-w-[100px] border-l text-center",
|
|
47
|
+
children: /* @__PURE__ */ l(m, { className: "mx-auto h-6 w-full" })
|
|
48
|
+
},
|
|
49
|
+
`skeleton-cell-${e}-${b}`
|
|
50
|
+
)
|
|
51
|
+
)
|
|
34
52
|
] }, `skeleton-row-${e}`)) })
|
|
35
53
|
] }),
|
|
36
54
|
/* @__PURE__ */ l(N, { orientation: "horizontal" })
|
|
@@ -6,7 +6,10 @@ function n({ className: t, ...e }) {
|
|
|
6
6
|
"table",
|
|
7
7
|
{
|
|
8
8
|
"data-slot": "table-container",
|
|
9
|
-
className: o(
|
|
9
|
+
className: o(
|
|
10
|
+
"relative w-full caption-bottom overflow-x-auto text-sm",
|
|
11
|
+
t
|
|
12
|
+
),
|
|
10
13
|
...e
|
|
11
14
|
}
|
|
12
15
|
);
|