laif-ds 0.1.74 → 0.1.76
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 +1 -1
- package/dist/components/ui/alert-dialog.js +3 -3
- package/dist/components/ui/alert.js +3 -3
- package/dist/components/ui/app-multiple-select-dropdown.js +12 -12
- package/dist/components/ui/async-select.js +53 -53
- package/dist/components/ui/card.js +26 -26
- package/dist/components/ui/chat-message.js +6 -6
- package/dist/components/ui/chat.js +44 -44
- package/dist/components/ui/context-menu.js +2 -2
- package/dist/components/ui/date-picker.js +10 -10
- package/dist/components/ui/dialog.js +7 -7
- package/dist/components/ui/drawer.js +33 -33
- package/dist/components/ui/dropdown-menu.js +20 -20
- package/dist/components/ui/file-preview.js +51 -51
- package/dist/components/ui/gantt/components/Controls/Controls.js +60 -51
- package/dist/components/ui/hover-card.js +5 -5
- package/dist/components/ui/input-selector.js +19 -19
- package/dist/components/ui/input.js +6 -6
- package/dist/components/ui/interrupt-prompt.js +6 -6
- package/dist/components/ui/markdown-renderer.js +16 -16
- package/dist/components/ui/menubar.js +26 -26
- package/dist/components/ui/message-input.js +9 -9
- package/dist/components/ui/multiple-selector.js +20 -20
- package/dist/components/ui/navigation-menu.js +5 -5
- package/dist/components/ui/popover.js +4 -4
- package/dist/components/ui/prompt-suggestions.js +11 -11
- package/dist/components/ui/resizable.js +2 -2
- package/dist/components/ui/select.js +5 -2
- package/dist/components/ui/sheet.js +16 -16
- package/dist/components/ui/sidebar.js +23 -24
- package/dist/components/ui/switch.js +2 -2
- package/dist/components/ui/table-skeleton.js +36 -36
- package/dist/components/ui/table.js +25 -25
- package/dist/components/ui/toggle-group.js +15 -15
- package/dist/components/ui/weekly-calendar/appointment-card.js +24 -24
- package/dist/styles.css +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
|
@@ -29,16 +29,16 @@ const X = d.forwardRef(
|
|
|
29
29
|
children: s,
|
|
30
30
|
...f
|
|
31
31
|
}, g) => {
|
|
32
|
-
const c = j(), [p,
|
|
32
|
+
const c = j(), [p, b] = d.useState(!1), [x, _] = d.useState(a), h = e ?? x, w = d.useCallback(
|
|
33
33
|
(l) => {
|
|
34
|
-
const
|
|
35
|
-
t ? t(
|
|
34
|
+
const u = typeof l == "function" ? l(h) : l;
|
|
35
|
+
t ? t(u) : _(u), document.cookie = `${$}=${u}; path=/; max-age=${V}`;
|
|
36
36
|
},
|
|
37
37
|
[t, h]
|
|
38
|
-
), S = d.useCallback(() => c ?
|
|
38
|
+
), S = d.useCallback(() => c ? b((l) => !l) : w((l) => !l), [c, w, b]);
|
|
39
39
|
d.useEffect(() => {
|
|
40
|
-
const l = (
|
|
41
|
-
|
|
40
|
+
const l = (u) => {
|
|
41
|
+
u.key === U && (u.metaKey || u.ctrlKey) && (u.preventDefault(), S());
|
|
42
42
|
};
|
|
43
43
|
return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
|
|
44
44
|
}, [S]);
|
|
@@ -49,7 +49,7 @@ const X = d.forwardRef(
|
|
|
49
49
|
setOpen: w,
|
|
50
50
|
isMobile: c,
|
|
51
51
|
openMobile: p,
|
|
52
|
-
setOpenMobile:
|
|
52
|
+
setOpenMobile: b,
|
|
53
53
|
toggleSidebar: S
|
|
54
54
|
}),
|
|
55
55
|
[
|
|
@@ -58,7 +58,7 @@ const X = d.forwardRef(
|
|
|
58
58
|
w,
|
|
59
59
|
c,
|
|
60
60
|
p,
|
|
61
|
-
|
|
61
|
+
b,
|
|
62
62
|
S
|
|
63
63
|
]
|
|
64
64
|
);
|
|
@@ -91,24 +91,24 @@ const Y = d.forwardRef(
|
|
|
91
91
|
children: n,
|
|
92
92
|
...s
|
|
93
93
|
}, f) => {
|
|
94
|
-
const { isMobile: g, state: c, openMobile: p, setOpenMobile:
|
|
94
|
+
const { isMobile: g, state: c, openMobile: p, setOpenMobile: b } = N();
|
|
95
95
|
return t === "none" ? /* @__PURE__ */ r(
|
|
96
96
|
"div",
|
|
97
97
|
{
|
|
98
98
|
className: i(
|
|
99
|
-
"bg-d-sidebar text-d-sidebar-foreground flex h-full w-[--sidebar-width] flex-col",
|
|
99
|
+
"bg-d-sidebar text-d-sidebar-foreground flex h-full w-[var(--sidebar-width)] flex-col",
|
|
100
100
|
o
|
|
101
101
|
),
|
|
102
102
|
ref: f,
|
|
103
103
|
...s,
|
|
104
104
|
children: n
|
|
105
105
|
}
|
|
106
|
-
) : g ? /* @__PURE__ */ r(E, { open: p, onOpenChange:
|
|
106
|
+
) : g ? /* @__PURE__ */ r(E, { open: p, onOpenChange: b, ...s, children: /* @__PURE__ */ m(
|
|
107
107
|
T,
|
|
108
108
|
{
|
|
109
109
|
"data-sidebar": "sidebar",
|
|
110
110
|
"data-mobile": "true",
|
|
111
|
-
className: "bg-d-sidebar text-d-sidebar-foreground w-[--sidebar-width] p-0 [&>button]:hidden",
|
|
111
|
+
className: "bg-d-sidebar text-d-sidebar-foreground w-[var(--sidebar-width)] p-0 [&>button]:hidden",
|
|
112
112
|
style: {
|
|
113
113
|
"--sidebar-width": q
|
|
114
114
|
},
|
|
@@ -135,10 +135,10 @@ const Y = d.forwardRef(
|
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
className: i(
|
|
138
|
-
"relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear",
|
|
138
|
+
"relative w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear",
|
|
139
139
|
"group-data-[collapsible=offcanvas]:w-0",
|
|
140
140
|
"group-data-[side=right]:rotate-180",
|
|
141
|
-
e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
|
|
141
|
+
e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]"
|
|
142
142
|
)
|
|
143
143
|
}
|
|
144
144
|
),
|
|
@@ -146,10 +146,9 @@ const Y = d.forwardRef(
|
|
|
146
146
|
"div",
|
|
147
147
|
{
|
|
148
148
|
className: i(
|
|
149
|
-
"fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
149
|
+
"fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
150
150
|
a === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
151
|
-
|
|
152
|
-
e === "floating" || e === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
151
|
+
e === "floating" || e === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "border-d-border group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
153
152
|
o
|
|
154
153
|
),
|
|
155
154
|
...s,
|
|
@@ -355,7 +354,7 @@ const ce = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
355
354
|
}
|
|
356
355
|
));
|
|
357
356
|
ce.displayName = "SidebarMenuItem";
|
|
358
|
-
const
|
|
357
|
+
const be = k(
|
|
359
358
|
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-d-sidebar-ring transition-[width,height,padding] hover:bg-d-sidebar-accent hover:text-d-sidebar-accent-foreground focus-visible:ring-2 active:bg-d-sidebar-accent active:text-d-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-d-sidebar-accent data-[active=true]:font-bold data-[active=true]:text-d-sidebar-accent-foreground data-[state=open]:hover:bg-d-sidebar-accent data-[state=open]:hover:text-d-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
360
359
|
{
|
|
361
360
|
variants: {
|
|
@@ -374,7 +373,7 @@ const ue = k(
|
|
|
374
373
|
size: "default"
|
|
375
374
|
}
|
|
376
375
|
}
|
|
377
|
-
),
|
|
376
|
+
), ue = d.forwardRef(
|
|
378
377
|
({
|
|
379
378
|
asChild: a = !1,
|
|
380
379
|
isActive: e = !1,
|
|
@@ -384,14 +383,14 @@ const ue = k(
|
|
|
384
383
|
className: s,
|
|
385
384
|
...f
|
|
386
385
|
}, g) => {
|
|
387
|
-
const c = a ? v : "button", { isMobile: p, state:
|
|
386
|
+
const c = a ? v : "button", { isMobile: p, state: b } = N(), x = /* @__PURE__ */ r(
|
|
388
387
|
c,
|
|
389
388
|
{
|
|
390
389
|
ref: g,
|
|
391
390
|
"data-sidebar": "menu-button",
|
|
392
391
|
"data-size": o,
|
|
393
392
|
"data-active": e,
|
|
394
|
-
className: i(
|
|
393
|
+
className: i(be({ variant: t, size: o }), s),
|
|
395
394
|
...f
|
|
396
395
|
}
|
|
397
396
|
);
|
|
@@ -404,14 +403,14 @@ const ue = k(
|
|
|
404
403
|
{
|
|
405
404
|
side: "right",
|
|
406
405
|
align: "center",
|
|
407
|
-
hidden:
|
|
406
|
+
hidden: b !== "collapsed" || p,
|
|
408
407
|
...n
|
|
409
408
|
}
|
|
410
409
|
)
|
|
411
410
|
] })) : x;
|
|
412
411
|
}
|
|
413
412
|
);
|
|
414
|
-
|
|
413
|
+
ue.displayName = "SidebarMenuButton";
|
|
415
414
|
const fe = d.forwardRef(({ className: a, asChild: e = !1, showOnHover: t = !1, ...o }, n) => /* @__PURE__ */ r(
|
|
416
415
|
e ? v : "button",
|
|
417
416
|
{
|
|
@@ -531,7 +530,7 @@ export {
|
|
|
531
530
|
le as SidebarMenu,
|
|
532
531
|
fe as SidebarMenuAction,
|
|
533
532
|
pe as SidebarMenuBadge,
|
|
534
|
-
|
|
533
|
+
ue as SidebarMenuButton,
|
|
535
534
|
ce as SidebarMenuItem,
|
|
536
535
|
me as SidebarMenuSkeleton,
|
|
537
536
|
ge as SidebarMenuSub,
|
|
@@ -11,7 +11,7 @@ function c({
|
|
|
11
11
|
{
|
|
12
12
|
"data-slot": "switch",
|
|
13
13
|
className: t(
|
|
14
|
-
"peer data-[state=checked]:bg-d-primary data-[state=unchecked]:bg-d-input focus-visible:border-d-ring focus-visible:ring-d-ring/50 dark:data-[state=unchecked]:bg-d-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow
|
|
14
|
+
"peer data-[state=checked]:bg-d-primary data-[state=unchecked]:bg-d-input focus-visible:border-d-ring focus-visible:ring-d-ring/50 dark:data-[state=unchecked]:bg-d-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
15
|
a
|
|
16
16
|
),
|
|
17
17
|
...r,
|
|
@@ -20,7 +20,7 @@ function c({
|
|
|
20
20
|
{
|
|
21
21
|
"data-slot": "switch-thumb",
|
|
22
22
|
className: t(
|
|
23
|
-
"bg-d-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-d-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
23
|
+
"bg-d-background dark:data-[state=unchecked]:bg-d-foreground dark:data-[state=checked]:bg-d-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
24
24
|
)
|
|
25
25
|
}
|
|
26
26
|
)
|
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as e, jsxs as r, Fragment as p } from "react/jsx-runtime";
|
|
3
3
|
import { ScrollArea as x, ScrollBar as N } from "./scroll-area.js";
|
|
4
|
-
import { Table as w, TableHeader as g, TableRow as
|
|
5
|
-
import { Skeleton as
|
|
4
|
+
import { Table as w, TableHeader as g, TableRow as i, TableHead as t, TableBody as v, TableCell as c } from "./table.js";
|
|
5
|
+
import { Skeleton as d } from "./skeleton.js";
|
|
6
6
|
function S({
|
|
7
|
-
headerRow:
|
|
7
|
+
headerRow: a = [],
|
|
8
8
|
rowCount: h = 5,
|
|
9
|
-
columnCount:
|
|
10
|
-
className:
|
|
11
|
-
cornerHeaderFrom:
|
|
12
|
-
cornerHeaderTo:
|
|
9
|
+
columnCount: b = 5,
|
|
10
|
+
className: u,
|
|
11
|
+
cornerHeaderFrom: n,
|
|
12
|
+
cornerHeaderTo: m
|
|
13
13
|
}) {
|
|
14
|
-
const
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
14
|
+
const s = a.length > 0 ? a.length : b;
|
|
15
|
+
return /* @__PURE__ */ e("div", { className: `w-full ${u || ""}`, children: /* @__PURE__ */ e("div", { className: "border-d-border rounded-md border", children: /* @__PURE__ */ r(x, { className: "h-full w-full", children: [
|
|
16
|
+
/* @__PURE__ */ r(w, { className: "w-full table-fixed", children: [
|
|
17
|
+
/* @__PURE__ */ e(g, { children: /* @__PURE__ */ r(i, { children: [
|
|
18
|
+
/* @__PURE__ */ e(t, { className: "border-d-border relative min-h-[50px] min-w-[50px] border-r", children: n && m && /* @__PURE__ */ r(p, { children: [
|
|
19
|
+
/* @__PURE__ */ e("div", { className: "absolute top-2 left-2 text-xs", children: n }),
|
|
20
|
+
/* @__PURE__ */ e("div", { className: "absolute right-2 bottom-2 text-xs", children: m })
|
|
21
21
|
] }) }),
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
a.length > 0 ? a.map((o, l) => /* @__PURE__ */ e(
|
|
23
|
+
t,
|
|
24
24
|
{
|
|
25
|
-
className: "w-auto min-w-[100px] border-r",
|
|
26
|
-
children:
|
|
25
|
+
className: "border-d-border w-auto min-w-[100px] border-r",
|
|
26
|
+
children: o
|
|
27
27
|
},
|
|
28
|
-
`header-col-${
|
|
29
|
-
)) : Array.from({ length:
|
|
30
|
-
(
|
|
31
|
-
|
|
28
|
+
`header-col-${l}`
|
|
29
|
+
)) : Array.from({ length: s }).map(
|
|
30
|
+
(o, l) => /* @__PURE__ */ e(
|
|
31
|
+
t,
|
|
32
32
|
{
|
|
33
|
-
className: "w-auto min-w-[100px] border-r",
|
|
34
|
-
children: /* @__PURE__ */
|
|
33
|
+
className: "border-d-border w-auto min-w-[100px] border-r",
|
|
34
|
+
children: /* @__PURE__ */ e(d, { className: "mx-auto h-6 w-full" })
|
|
35
35
|
},
|
|
36
|
-
`skeleton-header-${
|
|
36
|
+
`skeleton-header-${l}`
|
|
37
37
|
)
|
|
38
38
|
)
|
|
39
39
|
] }) }),
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
Array.from({ length:
|
|
43
|
-
(T,
|
|
44
|
-
|
|
40
|
+
/* @__PURE__ */ e(v, { children: Array.from({ length: h }).map((o, l) => /* @__PURE__ */ r(i, { children: [
|
|
41
|
+
/* @__PURE__ */ e(c, { className: "w-auto min-w-[100px]", children: /* @__PURE__ */ e(d, { className: "h-6 w-full" }) }),
|
|
42
|
+
Array.from({ length: s }).map(
|
|
43
|
+
(T, f) => /* @__PURE__ */ e(
|
|
44
|
+
c,
|
|
45
45
|
{
|
|
46
|
-
className: "w-auto min-w-[100px] border-l text-center",
|
|
47
|
-
children: /* @__PURE__ */
|
|
46
|
+
className: "border-d-border w-auto min-w-[100px] border-l text-center",
|
|
47
|
+
children: /* @__PURE__ */ e(d, { className: "mx-auto h-6 w-full" })
|
|
48
48
|
},
|
|
49
|
-
`skeleton-cell-${
|
|
49
|
+
`skeleton-cell-${l}-${f}`
|
|
50
50
|
)
|
|
51
51
|
)
|
|
52
|
-
] }, `skeleton-row-${
|
|
52
|
+
] }, `skeleton-row-${l}`)) })
|
|
53
53
|
] }),
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ e(N, { orientation: "horizontal" })
|
|
55
55
|
] }) }) });
|
|
56
56
|
}
|
|
57
57
|
export {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { cn as
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { cn as a } from "../../lib/utils.js";
|
|
4
4
|
function d({ className: e, ...t }) {
|
|
5
|
-
return /* @__PURE__ */
|
|
5
|
+
return /* @__PURE__ */ r(
|
|
6
6
|
"table",
|
|
7
7
|
{
|
|
8
8
|
"data-slot": "table-container",
|
|
9
|
-
className:
|
|
9
|
+
className: a(
|
|
10
10
|
"relative w-full caption-bottom overflow-x-auto text-sm",
|
|
11
11
|
e
|
|
12
12
|
),
|
|
@@ -15,44 +15,44 @@ function d({ className: e, ...t }) {
|
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
17
|
function n({ className: e, ...t }) {
|
|
18
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ r(
|
|
19
19
|
"thead",
|
|
20
20
|
{
|
|
21
21
|
"data-slot": "table-header",
|
|
22
|
-
className:
|
|
22
|
+
className: a("border-d-border [&_tr]:border-b", e),
|
|
23
23
|
...t
|
|
24
24
|
}
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return /* @__PURE__ */
|
|
27
|
+
function b({ className: e, ...t }) {
|
|
28
|
+
return /* @__PURE__ */ r(
|
|
29
29
|
"tbody",
|
|
30
30
|
{
|
|
31
31
|
"data-slot": "table-body",
|
|
32
|
-
className:
|
|
32
|
+
className: a("border-d-border [&_tr:last-child]:border-0", e),
|
|
33
33
|
...t
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
return /* @__PURE__ */
|
|
37
|
+
function s({ className: e, ...t }) {
|
|
38
|
+
return /* @__PURE__ */ r(
|
|
39
39
|
"tfoot",
|
|
40
40
|
{
|
|
41
41
|
"data-slot": "table-footer",
|
|
42
|
-
className:
|
|
43
|
-
"bg-d-secondary/50 border-t font-medium [&>tr]:last:border-b-0",
|
|
42
|
+
className: a(
|
|
43
|
+
"bg-d-secondary/50 border-d-border border-t font-medium [&>tr]:last:border-b-0",
|
|
44
44
|
e
|
|
45
45
|
),
|
|
46
46
|
...t
|
|
47
47
|
}
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
return /* @__PURE__ */
|
|
50
|
+
function c({ className: e, ...t }) {
|
|
51
|
+
return /* @__PURE__ */ r(
|
|
52
52
|
"tr",
|
|
53
53
|
{
|
|
54
54
|
"data-slot": "table-row",
|
|
55
|
-
className:
|
|
55
|
+
className: a(
|
|
56
56
|
"hover:bg-d-secondary/50 data-[state=selected]:bg-d-secondary border-d-border border-b transition-colors",
|
|
57
57
|
e
|
|
58
58
|
),
|
|
@@ -61,11 +61,11 @@ function b({ className: e, ...t }) {
|
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
63
|
function i({ className: e, ...t }) {
|
|
64
|
-
return /* @__PURE__ */
|
|
64
|
+
return /* @__PURE__ */ r(
|
|
65
65
|
"th",
|
|
66
66
|
{
|
|
67
67
|
"data-slot": "table-head",
|
|
68
|
-
className:
|
|
68
|
+
className: a(
|
|
69
69
|
"text-d-foreground border-d-border h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
70
70
|
e
|
|
71
71
|
),
|
|
@@ -74,11 +74,11 @@ function i({ className: e, ...t }) {
|
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
76
|
function u({ className: e, ...t }) {
|
|
77
|
-
return /* @__PURE__ */
|
|
77
|
+
return /* @__PURE__ */ r(
|
|
78
78
|
"td",
|
|
79
79
|
{
|
|
80
80
|
"data-slot": "table-cell",
|
|
81
|
-
className:
|
|
81
|
+
className: a(
|
|
82
82
|
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
83
83
|
e
|
|
84
84
|
),
|
|
@@ -90,22 +90,22 @@ function m({
|
|
|
90
90
|
className: e,
|
|
91
91
|
...t
|
|
92
92
|
}) {
|
|
93
|
-
return /* @__PURE__ */
|
|
93
|
+
return /* @__PURE__ */ r(
|
|
94
94
|
"caption",
|
|
95
95
|
{
|
|
96
96
|
"data-slot": "table-caption",
|
|
97
|
-
className:
|
|
97
|
+
className: a("text-d-secondary-foreground mt-4 text-sm", e),
|
|
98
98
|
...t
|
|
99
99
|
}
|
|
100
100
|
);
|
|
101
101
|
}
|
|
102
102
|
export {
|
|
103
103
|
d as Table,
|
|
104
|
-
|
|
104
|
+
b as TableBody,
|
|
105
105
|
m as TableCaption,
|
|
106
106
|
u as TableCell,
|
|
107
|
-
|
|
107
|
+
s as TableFooter,
|
|
108
108
|
i as TableHead,
|
|
109
109
|
n as TableHeader,
|
|
110
|
-
|
|
110
|
+
c as TableRow
|
|
111
111
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
3
|
+
import * as d from "react";
|
|
4
4
|
import { Root as u, Item as m } from "../../node_modules/@radix-ui/react-toggle-group/dist/index.js";
|
|
5
|
-
import { cn as
|
|
5
|
+
import { cn as s } from "../../lib/utils.js";
|
|
6
6
|
import { toggleVariants as g } from "./toggle.js";
|
|
7
|
-
const l =
|
|
7
|
+
const l = d.createContext({
|
|
8
8
|
size: "default",
|
|
9
9
|
variant: "default"
|
|
10
10
|
});
|
|
11
11
|
function x({
|
|
12
|
-
className:
|
|
12
|
+
className: a,
|
|
13
13
|
variant: o,
|
|
14
14
|
size: t,
|
|
15
15
|
children: e,
|
|
@@ -21,9 +21,9 @@ function x({
|
|
|
21
21
|
"data-slot": "toggle-group",
|
|
22
22
|
"data-variant": o,
|
|
23
23
|
"data-size": t,
|
|
24
|
-
className:
|
|
24
|
+
className: s(
|
|
25
25
|
"group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
|
|
26
|
-
|
|
26
|
+
a
|
|
27
27
|
),
|
|
28
28
|
...n,
|
|
29
29
|
children: /* @__PURE__ */ i(l.Provider, { value: { variant: o, size: t }, children: e })
|
|
@@ -31,26 +31,26 @@ function x({
|
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
33
|
function z({
|
|
34
|
-
className:
|
|
34
|
+
className: a,
|
|
35
35
|
children: o,
|
|
36
36
|
variant: t,
|
|
37
37
|
size: e,
|
|
38
38
|
...n
|
|
39
39
|
}) {
|
|
40
|
-
const
|
|
40
|
+
const r = d.useContext(l);
|
|
41
41
|
return /* @__PURE__ */ i(
|
|
42
42
|
m,
|
|
43
43
|
{
|
|
44
44
|
"data-slot": "toggle-group-item",
|
|
45
|
-
"data-variant":
|
|
46
|
-
"data-size":
|
|
47
|
-
className:
|
|
45
|
+
"data-variant": r.variant || t,
|
|
46
|
+
"data-size": r.size || e,
|
|
47
|
+
className: s(
|
|
48
48
|
g({
|
|
49
|
-
variant:
|
|
50
|
-
size:
|
|
49
|
+
variant: r.variant || t,
|
|
50
|
+
size: r.size || e
|
|
51
51
|
}),
|
|
52
|
-
"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
|
|
53
|
-
|
|
52
|
+
"border-d-border min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
|
|
53
|
+
a
|
|
54
54
|
),
|
|
55
55
|
...n,
|
|
56
56
|
children: o
|
|
@@ -7,47 +7,47 @@ import { l as m } from "../../../_virtual/lodash.js";
|
|
|
7
7
|
import { hexContrast as v, hexToRgba as u, cn as g } from "../../../lib/utils.js";
|
|
8
8
|
import { TooltipProvider as N, Tooltip as T, TooltipTrigger as y, TooltipContent as C } from "../tooltip.js";
|
|
9
9
|
import { Typo as k } from "../typo.js";
|
|
10
|
-
const S = ({ appointment:
|
|
10
|
+
const S = ({ appointment: r }) => {
|
|
11
11
|
const { setSelectedAppointmentId: h } = b(), f = n(() => {
|
|
12
|
-
if (
|
|
12
|
+
if (r.color)
|
|
13
13
|
return {
|
|
14
|
-
backgroundColor: u(
|
|
15
|
-
borderColor: u(
|
|
16
|
-
color: v(
|
|
14
|
+
backgroundColor: u(r.color, 0.75),
|
|
15
|
+
borderColor: u(r.color, 1),
|
|
16
|
+
color: v(r.color),
|
|
17
17
|
backdropFilter: "blur(5px)"
|
|
18
18
|
};
|
|
19
|
-
}, [
|
|
20
|
-
const
|
|
19
|
+
}, [r.color]), t = r.endTime || c(`2000-01-01 ${r.startTime}`).add(1, "hour").format("HH:mm"), x = n(() => {
|
|
20
|
+
const e = c(`2000-01-01 ${r.startTime}`), a = c(`2000-01-01 ${t}`).diff(e, "minute"), i = Math.floor(a / 60), d = a % 60;
|
|
21
21
|
return i === 0 ? `${d}m` : d === 0 ? `${i}h` : `${i}h ${d}m`;
|
|
22
|
-
}, [
|
|
22
|
+
}, [r.startTime, t]);
|
|
23
23
|
return /* @__PURE__ */ s(N, { delayDuration: 300, children: /* @__PURE__ */ l(T, { children: [
|
|
24
24
|
/* @__PURE__ */ s(y, { asChild: !0, children: /* @__PURE__ */ l(
|
|
25
25
|
"div",
|
|
26
26
|
{
|
|
27
|
-
onClick: (
|
|
28
|
-
|
|
27
|
+
onClick: (e) => {
|
|
28
|
+
e.preventDefault(), e.stopPropagation(), h(r.id);
|
|
29
29
|
},
|
|
30
30
|
style: f,
|
|
31
31
|
className: g(
|
|
32
|
-
"flex h-full cursor-pointer flex-col justify-start rounded-r-md border border-l-4 p-2 shadow-md transition-all duration-200 ease-in-out hover:scale-105",
|
|
33
|
-
|
|
32
|
+
"border-d-border flex h-full cursor-pointer flex-col justify-start rounded-r-md border border-l-4 p-2 shadow-md transition-all duration-200 ease-in-out hover:scale-105",
|
|
33
|
+
r.className
|
|
34
34
|
),
|
|
35
35
|
children: [
|
|
36
|
-
/* @__PURE__ */ s("div", { className: "text-sm font-semibold", children:
|
|
36
|
+
/* @__PURE__ */ s("div", { className: "text-sm font-semibold", children: r?.title?.length > 15 ? r?.title?.slice(0, 15) + "..." : r?.title }),
|
|
37
37
|
/* @__PURE__ */ l("div", { className: "text-xs", children: [
|
|
38
|
-
|
|
38
|
+
r?.startTime,
|
|
39
39
|
" - ",
|
|
40
40
|
t
|
|
41
41
|
] }),
|
|
42
|
-
|
|
42
|
+
r?.attributes?.filter((e) => e.showPreview).map((e, o) => /* @__PURE__ */ l(
|
|
43
43
|
"div",
|
|
44
44
|
{
|
|
45
45
|
className: "bg-d-background/30 mt-1 rounded p-1 text-xs",
|
|
46
46
|
children: [
|
|
47
|
-
/* @__PURE__ */ s("span", { className: "font-semibold", children:
|
|
47
|
+
/* @__PURE__ */ s("span", { className: "font-semibold", children: e.key }),
|
|
48
48
|
":",
|
|
49
49
|
" ",
|
|
50
|
-
/* @__PURE__ */ s("span", { className: "font-medium", children:
|
|
50
|
+
/* @__PURE__ */ s("span", { className: "font-medium", children: e.value })
|
|
51
51
|
]
|
|
52
52
|
},
|
|
53
53
|
o
|
|
@@ -56,31 +56,31 @@ const S = ({ appointment: e }) => {
|
|
|
56
56
|
}
|
|
57
57
|
) }),
|
|
58
58
|
/* @__PURE__ */ l(C, { side: "right", variant: "card", children: [
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
r?.title && /* @__PURE__ */ l(k, { children: [
|
|
60
|
+
r?.title,
|
|
61
61
|
" (",
|
|
62
62
|
x,
|
|
63
63
|
")"
|
|
64
64
|
] }),
|
|
65
65
|
/* @__PURE__ */ l("div", { className: "text-d-accent-foreground", children: [
|
|
66
|
-
|
|
66
|
+
r?.startTime,
|
|
67
67
|
" - ",
|
|
68
68
|
t
|
|
69
69
|
] }),
|
|
70
70
|
/* @__PURE__ */ l("div", { className: "mt-2 mb-3.5 flex flex-col", children: [
|
|
71
71
|
/* @__PURE__ */ s("span", { className: "font-medium", children: "Descrizione:" }),
|
|
72
|
-
/* @__PURE__ */ s("span", { className: "text-d-accent-foreground text-xs", children:
|
|
72
|
+
/* @__PURE__ */ s("span", { className: "text-d-accent-foreground text-xs", children: r?.description || "-" })
|
|
73
73
|
] }),
|
|
74
|
-
|
|
74
|
+
r?.attributes && r.attributes.length > 0 && /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("div", { className: "space-y-1", children: r.attributes.map((e, o) => /* @__PURE__ */ l(
|
|
75
75
|
"div",
|
|
76
76
|
{
|
|
77
77
|
className: "flex items-start justify-between gap-4 py-1 text-right",
|
|
78
78
|
children: [
|
|
79
79
|
/* @__PURE__ */ l("span", { className: "font-medium", children: [
|
|
80
|
-
m.upperFirst(
|
|
80
|
+
m.upperFirst(e.key),
|
|
81
81
|
":"
|
|
82
82
|
] }),
|
|
83
|
-
/* @__PURE__ */ s("span", { className: "text-d-accent-foreground max-w-[200px]", children: m.upperFirst(
|
|
83
|
+
/* @__PURE__ */ s("span", { className: "text-d-accent-foreground max-w-[200px]", children: m.upperFirst(e.value?.toString() || "") })
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
o
|
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "tailwindcss";@import "tw-animate-css";:root{--d-radius:6px;--d-background:#fafafa;--d-foreground:#2e2e2e;--d-card:#fafafa;--d-card-foreground:#2e2e2e;--d-popover:#
|
|
1
|
+
@import "tailwindcss";@import "tw-animate-css";:root{--d-radius:6px;--d-background:#fafafa;--d-foreground:#2e2e2e;--d-card:#fafafa;--d-card-foreground:#2e2e2e;--d-popover:#fff;--d-popover-foreground:#2e2e2e;--d-primary:#64c2d1;--d-primary-foreground:#1f1f1f;--d-secondary:#f5f5f5;--d-secondary-foreground:#2e2e2e;--d-muted:#e0e0e0;--d-muted-foreground:#7a7a7a;--d-accent:#e0e0e0;--d-accent-foreground:#2e2e2e;--d-destructive:#ec2842;--d-destructive-foreground:#85202d;--d-border:#e0e0e0;--d-input:#fff;--d-ring:#64c2d1;--d-chart-1:#64c2d1;--d-chart-2:#39f283;--d-chart-3:orange;--d-chart-4:orange;--d-chart-5:#eb576a;--d-sidebar:#f5f5f5;--d-sidebar-foreground:#2e2e2e;--d-sidebar-primary:#64c2d1;--d-sidebar-primary-foreground:#1f1f1f;--d-sidebar-accent:#e0e0e066;--d-sidebar-accent-foreground:#2e2e2e;--d-sidebar-border:#e0e0e0;--d-sidebar-ring:#64c2d1}.dark{--d-radius:6px;--d-background:#1f1f1f;--d-foreground:#e0e0e0;--d-card:#1f1f1f;--d-card-foreground:#e0e0e0;--d-popover:#1f1f1f;--d-popover-foreground:#e0e0e0;--d-primary:#64c2d1;--d-primary-foreground:#1f1f1f;--d-secondary:#2e2e2e;--d-secondary-foreground:#e0e0e0;--d-muted:#474747;--d-muted-foreground:#7a7a7a;--d-accent:#474747;--d-accent-foreground:#e0e0e0;--d-destructive:#85202d;--d-destructive-foreground:#e0e0e0;--d-border:#2e2e2e;--d-input:#2e2e2e;--d-ring:#64c2d1;--d-chart-1:#64c2d1;--d-chart-2:#39f283;--d-chart-3:orange;--d-chart-4:orange;--d-chart-5:#eb576a;--d-sidebar:#141414;--d-sidebar-foreground:#e0e0e0;--d-sidebar-primary:#64c2d1;--d-sidebar-primary-foreground:#1f1f1f;--d-sidebar-accent:#47474766;--d-sidebar-accent-foreground:#e0e0e0;--d-sidebar-border:#2e2e2e;--d-sidebar-ring:#64c2d1}.tangerine{--d-background:oklch(0.26 0.03 262.67);--d-foreground:oklch(0.92 0 0);--d-card:oklch(0.31 0.03 268.64);--d-card-foreground:oklch(0.92 0 0);--d-popover:oklch(0.29 0.02 268.4);--d-popover-foreground:oklch(0.92 0 0);--d-primary:oklch(0.64 0.17 36.44);--d-primary-foreground:oklch(1 0 0);--d-secondary:oklch(0.31 0.03 266.71);--d-secondary-foreground:oklch(0.92 0 0);--d-muted:oklch(0.31 0.03 266.71);--d-muted-foreground:oklch(0.72 0 0);--d-accent:oklch(0.34 0.06 267.59);--d-accent-foreground:oklch(0.88 0.06 254.13);--d-destructive:oklch(0.64 0.21 25.33);--d-destructive-foreground:oklch(1 0 0);--d-border:oklch(0.38 0.03 269.73);--d-input:oklch(0.38 0.03 269.73);--d-ring:oklch(0.64 0.17 36.44);--d-chart-1:oklch(0.72 0.06 248.68);--d-chart-2:oklch(0.77 0.09 34.19);--d-chart-3:oklch(0.58 0.08 254.16);--d-chart-4:oklch(0.5 0.08 259.49);--d-chart-5:oklch(0.42 0.1 264.03);--d-sidebar:oklch(0.31 0.03 267.74);--d-sidebar-foreground:oklch(0.92 0 0);--d-sidebar-primary:oklch(0.64 0.17 36.44);--d-sidebar-primary-foreground:oklch(1 0 0);--d-sidebar-accent:oklch(0.34 0.06 267.59);--d-sidebar-accent-foreground:oklch(0.88 0.06 254.13);--d-sidebar-border:oklch(0.38 0.03 269.73);--d-sidebar-ring:oklch(0.64 0.17 36.44);--d-font-sans:Inter,sans-serif;--d-font-serif:Source Serif 4,serif;--d-font-mono:JetBrains Mono,monospace;--d-radius:0.75rem;--d-shadow-2xs:0px 1px 3px 0px #0000000d;--d-shadow-xs:0px 1px 3px 0px #0000000d;--d-shadow-sm:0px 1px 3px 0px #0000001a,0px 1px 2px -1px #0000001a;--d-shadow:0px 1px 3px 0px #0000001a,0px 1px 2px -1px #0000001a;--d-shadow-md:0px 1px 3px 0px #0000001a,0px 2px 4px -1px #0000001a;--d-shadow-lg:0px 1px 3px 0px #0000001a,0px 4px 6px -1px #0000001a;--d-shadow-xl:0px 1px 3px 0px #0000001a,0px 8px 10px -1px #0000001a;--d-shadow-2xl:0px 1px 3px 0px #00000040}.claymorphism{--d-background:#1e1b18;--d-foreground:#e2e8f0;--d-card:#2c2825;--d-card-foreground:#e2e8f0;--d-popover:#2c2825;--d-popover-foreground:#e2e8f0;--d-primary:#818cf8;--d-primary-foreground:#1e1b18;--d-secondary:#3a3633;--d-secondary-foreground:#d1d5db;--d-muted:#2c2825;--d-muted-foreground:#9ca3af;--d-accent:#484441;--d-accent-foreground:#d1d5db;--d-destructive:#ef4444;--d-destructive-foreground:#1e1b18;--d-border:#3a3633;--d-input:#3a3633;--d-ring:#818cf8;--d-chart-1:#818cf8;--d-chart-2:#6366f1;--d-chart-3:#4f46e5;--d-chart-4:#4338ca;--d-chart-5:#3730a3;--d-sidebar:#3a3633;--d-sidebar-foreground:#e2e8f0;--d-sidebar-primary:#818cf8;--d-sidebar-primary-foreground:#1e1b18;--d-sidebar-accent:#484441;--d-sidebar-accent-foreground:#d1d5db;--d-sidebar-border:#3a3633;--d-sidebar-ring:#818cf8;--d-font-sans:Plus Jakarta Sans,sans-serif;--d-font-serif:Lora,serif;--d-font-mono:Roboto Mono,monospace;--d-radius:1.25rem;--d-shadow-2xs:2px 2px 10px 4px #00000017;--d-shadow-xs:2px 2px 10px 4px #00000017;--d-shadow-sm:2px 2px 10px 4px #0000002e,2px 1px 2px 3px #0000002e;--d-shadow:2px 2px 10px 4px #0000002e,2px 1px 2px 3px #0000002e;--d-shadow-md:2px 2px 10px 4px #0000002e,2px 2px 4px 3px #0000002e;--d-shadow-lg:2px 2px 10px 4px #0000002e,2px 4px 6px 3px #0000002e;--d-shadow-xl:2px 2px 10px 4px #0000002e,2px 8px 10px 3px #0000002e;--d-shadow-2xl:2px 2px 10px 4px #00000073}@theme inline{--radius-d-sm:calc(var(--d-radius) - 4px);--radius-d-md:calc(var(--d-radius) - 2px);--radius-d-lg:var(--d-radius);--radius-d-xl:calc(var(--d-radius) + 4px);--color-d-background:var(--d-background);--color-d-foreground:var(--d-foreground);--color-d-card:var(--d-card);--color-d-card-foreground:var(--d-card-foreground);--color-d-popover:var(--d-popover);--color-d-popover-foreground:var(--d-popover-foreground);--color-d-primary:var(--d-primary);--color-d-primary-foreground:var(--d-primary-foreground);--color-d-secondary:var(--d-secondary);--color-d-secondary-foreground:var(--d-secondary-foreground);--color-d-muted:var(--d-muted);--color-d-muted-foreground:var(--d-muted-foreground);--color-d-accent:var(--d-accent);--color-d-accent-foreground:var(--d-accent-foreground);--color-d-destructive:var(--d-destructive);--color-d-border:var(--d-border);--color-d-input:var(--d-input);--color-d-ring:var(--d-ring);--color-d-chart-1:var(--d-chart-1);--color-d-chart-2:var(--d-chart-2);--color-d-chart-3:var(--d-chart-3);--color-d-chart-4:var(--d-chart-4);--color-d-chart-5:var(--d-chart-5);--color-d-sidebar:var(--d-sidebar);--color-d-sidebar-foreground:var(--d-sidebar-foreground);--color-d-sidebar-primary:var(--d-sidebar-primary);--color-d-sidebar-primary-foreground:var(--d-sidebar-primary-foreground);--color-d-sidebar-accent:var(--d-sidebar-accent);--color-d-sidebar-accent-foreground:var(--d-sidebar-accent-foreground);--color-d-sidebar-border:var(--d-sidebar-border);--color-d-sidebar-ring:var(--d-sidebar-ring)}*{outline-color:color-mix(in oklab,var(--d-ring) 50%,#0000)}body{background-color:var(--d-background);color:var(--d-foreground)}
|