laif-ds 0.2.74 → 0.2.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/CHANGELOG.md +446 -0
- package/dist/agent-docs/adoption-report.json +615 -0
- package/dist/agent-docs/components/Accordion.md +46 -16
- package/dist/agent-docs/components/Alert.md +90 -95
- package/dist/agent-docs/components/AlertDialog.md +132 -126
- package/dist/agent-docs/components/AppEditor.md +90 -90
- package/dist/agent-docs/components/AppRadioGroup.md +18 -18
- package/dist/agent-docs/components/AppSidebar.md +129 -122
- package/dist/agent-docs/components/AppStepper.md +81 -77
- package/dist/agent-docs/components/AspectRatio.md +70 -62
- package/dist/agent-docs/components/AudioVisualizer.md +5 -5
- package/dist/agent-docs/components/Avatar.md +112 -113
- package/dist/agent-docs/components/Badge.md +123 -118
- package/dist/agent-docs/components/Breadcrumb.md +8 -1
- package/dist/agent-docs/components/Button.md +131 -129
- package/dist/agent-docs/components/Card.md +172 -147
- package/dist/agent-docs/components/Carousel.md +148 -129
- package/dist/agent-docs/components/Chat.md +121 -109
- package/dist/agent-docs/components/ChatMessage.md +72 -61
- package/dist/agent-docs/components/Checkbox.md +150 -135
- package/dist/agent-docs/components/CircularProgress.md +53 -49
- package/dist/agent-docs/components/CodeHighlighter.md +4 -4
- package/dist/agent-docs/components/Collapsible.md +114 -95
- package/dist/agent-docs/components/Command.md +141 -142
- package/dist/agent-docs/components/Confirmer.md +182 -175
- package/dist/agent-docs/components/ContextMenu.md +196 -191
- package/dist/agent-docs/components/DataCrossTable.md +114 -94
- package/dist/agent-docs/components/DataTable.md +32 -24
- package/dist/agent-docs/components/Dialog.md +130 -125
- package/dist/agent-docs/components/Drawer.md +141 -127
- package/dist/agent-docs/components/FilePreviewer.md +138 -139
- package/dist/agent-docs/components/FileUploader.md +149 -129
- package/dist/agent-docs/components/Form.md +3 -1
- package/dist/agent-docs/components/FormComposer.md +163 -137
- package/dist/agent-docs/components/GanttChart.md +125 -122
- package/dist/agent-docs/components/HoverCard.md +1 -1
- package/dist/agent-docs/components/Icon.md +98 -99
- package/dist/agent-docs/components/Input.md +173 -138
- package/dist/agent-docs/components/InputOtp.md +6 -1
- package/dist/agent-docs/components/InputSelector.md +94 -97
- package/dist/agent-docs/components/InterruptPrompt.md +4 -4
- package/dist/agent-docs/components/MarkdownRenderer.md +5 -2
- package/dist/agent-docs/components/Menubar.md +60 -57
- package/dist/agent-docs/components/MessageInput.md +134 -131
- package/dist/agent-docs/components/MessageList.md +110 -96
- package/dist/agent-docs/components/MultipleSelector.md +147 -146
- package/dist/agent-docs/components/NavigationMenu.md +6 -2
- package/dist/agent-docs/components/Popover.md +112 -103
- package/dist/agent-docs/components/PromptSuggestions.md +5 -5
- package/dist/agent-docs/components/RadioGroup.md +97 -90
- package/dist/agent-docs/components/Resizable.md +4 -1
- package/dist/agent-docs/components/ResizePrompt.md +12 -13
- package/dist/agent-docs/components/ScrollArea.md +6 -2
- package/dist/agent-docs/components/SecurePdfViewer.md +10 -6
- package/dist/agent-docs/components/Select.md +131 -132
- package/dist/agent-docs/components/Sheet.md +8 -1
- package/dist/agent-docs/components/ShikiHighlighter.md +5 -5
- package/dist/agent-docs/components/Sidebar.md +94 -85
- package/dist/agent-docs/components/Slider.md +62 -58
- package/dist/agent-docs/components/Sonner.md +1 -0
- package/dist/agent-docs/components/Spinner.md +14 -14
- package/dist/agent-docs/components/Stepper.md +93 -67
- package/dist/agent-docs/components/Switch.md +41 -42
- package/dist/agent-docs/components/TableSkeleton.md +8 -8
- package/dist/agent-docs/components/Tabs.md +106 -86
- package/dist/agent-docs/components/TextArea.md +51 -52
- package/dist/agent-docs/components/ThemeSwitcher.md +72 -69
- package/dist/agent-docs/components/Toaster.md +1 -0
- package/dist/agent-docs/components/Tooltip.md +102 -91
- package/dist/agent-docs/components/Typo.md +68 -65
- package/dist/agent-docs/components/WeeklyCalendar.md +63 -64
- package/dist/agent-docs/components-list.md +1 -0
- package/dist/agent-docs/manifest.json +5981 -0
- package/dist/agent-docs/truncated-cell.md +342 -0
- package/dist/components/editor/editor-hooks/use-update-toolbar.js +6 -6
- package/dist/components/editor/plugins/actions/counter-character-plugin.js +6 -6
- package/dist/components/editor/plugins/toolbar/font-format-toolbar-plugin.js +18 -18
- package/dist/components/editor/plugins/toolbar/history-toolbar-plugin.js +10 -10
- package/dist/components/editor/plugins/toolbar/toolbar-plugin.js +9 -9
- package/dist/components/ui/app-checkbox.js +1 -1
- package/dist/components/ui/app-dialog.js +70 -64
- package/dist/components/ui/app-editor.js +51 -51
- package/dist/components/ui/app-form.js +81 -81
- package/dist/components/ui/app-multiple-select-dropdown.js +36 -36
- package/dist/components/ui/app-select.js +109 -104
- package/dist/components/ui/app-sidebar.js +41 -41
- package/dist/components/ui/app-stepper.js +1 -1
- package/dist/components/ui/app-time-picker.js +18 -18
- package/dist/components/ui/app-tooltip.js +1 -1
- package/dist/components/ui/async-select.js +5 -5
- package/dist/components/ui/audio-visualizer.js +61 -58
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/carousel.js +2 -2
- package/dist/components/ui/chart.js +1 -1
- package/dist/components/ui/chat-message.js +8 -8
- package/dist/components/ui/chat.js +86 -88
- package/dist/components/ui/command.js +2 -2
- package/dist/components/ui/copy-button.js +4 -4
- package/dist/components/ui/date-picker.js +20 -20
- package/dist/components/ui/file-preview/index.js +13 -13
- package/dist/components/ui/file-previewer.js +12 -11
- package/dist/components/ui/file-uploader.js +86 -78
- package/dist/components/ui/form.js +2 -2
- package/dist/components/ui/gantt/components/Chart/Bars/Bars.js +56 -56
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarItem/BarItem.js +12 -12
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsItems/BarItems.js +1 -1
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsRow.js +4 -4
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/RepeteadBars/RepeteadBars.js +2 -2
- package/dist/components/ui/gantt/components/Chart/Chart.js +23 -23
- package/dist/components/ui/gantt/components/Chart/Scale/Scale.js +1 -1
- package/dist/components/ui/gantt/components/Chart/Tree/Tree.js +34 -34
- package/dist/components/ui/gantt/components/Controls/Controls.js +5 -5
- package/dist/components/ui/gantt/components/Gantt/Gantt.js +4 -4
- package/dist/components/ui/gantt/hooks/useGanttCalculate.js +25 -18
- package/dist/components/ui/input-selector.js +1 -1
- package/dist/components/ui/input.js +23 -23
- package/dist/components/ui/kanban.js +8 -9
- package/dist/components/ui/markdown-renderer.js +41 -35
- package/dist/components/ui/message-input.js +45 -44
- package/dist/components/ui/multiple-selector.js +91 -82
- package/dist/components/ui/secure-pdf-viewer.js +19 -7
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/slider.js +1 -1
- package/dist/components/ui/spinner.js +4 -4
- package/dist/components/ui/stepper.js +157 -138
- package/dist/components/ui/tables/data-cross-table/data-cross-table-buttons.js +29 -29
- package/dist/components/ui/tables/data-cross-table/data-cross-table.js +258 -246
- package/dist/components/ui/tables/data-table/components/data-table-advanced-filter.js +4 -1
- package/dist/components/ui/tables/data-table/components/data-table-body.js +211 -367
- package/dist/components/ui/tables/data-table/components/data-table-filter-inputs.js +114 -112
- package/dist/components/ui/tables/data-table/components/data-table-filters.js +116 -96
- package/dist/components/ui/tables/data-table/components/data-table-header.js +211 -0
- package/dist/components/ui/tables/data-table/components/data-table-searchbar.js +8 -8
- package/dist/components/ui/tables/data-table/components/data-table-skeleton-rows.js +33 -0
- package/dist/components/ui/tables/data-table/data-table.js +258 -250
- package/dist/components/ui/tables/data-table/data-table.service.js +112 -97
- package/dist/components/ui/tables/data-table/data-table.utils.js +25 -15
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/theme-switcher.js +1 -1
- package/dist/components/ui/toggle-group.js +2 -2
- package/dist/components/ui/truncated-cell.js +100 -0
- package/dist/components/ui/weekly-calendar/appointment-card.js +16 -16
- package/dist/components/ui/weekly-calendar/calendar-context.js +6 -6
- package/dist/components/ui/weekly-calendar/calendar-header.js +12 -12
- package/dist/components/ui/weekly-calendar/day-column.js +16 -16
- package/dist/components/ui/weekly-calendar/time-column.js +4 -4
- package/dist/components/ui/weekly-calendar/weekly-calendar.js +4 -4
- package/dist/hooks/use-audio-recording.js +1 -1
- package/dist/hooks/use-auto-scroll.js +18 -18
- package/dist/hooks/use-autosize-textarea.js +12 -13
- package/dist/index.d.ts +100 -45
- package/dist/index.js +362 -360
- package/dist/lib/utils.js +6 -6
- package/dist/styles.v3.css +1 -1
- package/package.json +14 -4
|
@@ -1,145 +1,150 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as o, jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { useState as v, useRef as T, useCallback as B, useMemo as S, useEffect as de, useLayoutEffect as ce } from "react";
|
|
3
4
|
import { designTokens as i } from "../design-tokens.js";
|
|
4
|
-
import { Badge as
|
|
5
|
-
import { Command as
|
|
6
|
-
import { Label as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { useState as v, useRef as T, useMemo as P, useCallback as pe, useEffect as he, useLayoutEffect as ge } from "react";
|
|
5
|
+
import { Badge as ue } from "./badge.js";
|
|
6
|
+
import { Command as me, CommandInput as fe, CommandList as pe, CommandEmpty as he, CommandGroup as E, CommandItem as F } from "./command.js";
|
|
7
|
+
import { Label as ge } from "./label.js";
|
|
8
|
+
import { cn as z } from "../../lib/utils.js";
|
|
9
9
|
import { Checkbox as ve } from "./checkbox.js";
|
|
10
|
-
import { Icon as
|
|
10
|
+
import { Icon as A } from "./icon.js";
|
|
11
11
|
import { Popover as be, PopoverTrigger as Ce, PopoverContent as xe } from "./popover.js";
|
|
12
|
-
import
|
|
12
|
+
import ye from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
13
13
|
const Ne = {
|
|
14
14
|
sm: i.sizes.sm,
|
|
15
15
|
default: i.sizes.default,
|
|
16
16
|
lg: i.sizes.lg
|
|
17
17
|
};
|
|
18
|
-
function
|
|
18
|
+
function Ve(O) {
|
|
19
19
|
const {
|
|
20
|
-
multiple:
|
|
20
|
+
multiple: t = !1,
|
|
21
21
|
options: m,
|
|
22
|
-
value:
|
|
23
|
-
defaultValue:
|
|
22
|
+
value: G,
|
|
23
|
+
defaultValue: W,
|
|
24
24
|
renderValue: g,
|
|
25
|
-
onValueChange:
|
|
26
|
-
onClear:
|
|
27
|
-
placeholder:
|
|
28
|
-
emptyPlaceholder:
|
|
29
|
-
searchPlaceholder:
|
|
30
|
-
addItemPlaceholder:
|
|
31
|
-
itemCountMessage:
|
|
32
|
-
maxSelectedMessage:
|
|
33
|
-
label:
|
|
34
|
-
className:
|
|
35
|
-
labelClassName:
|
|
36
|
-
wrpClassName:
|
|
37
|
-
searchable:
|
|
38
|
-
creatable:
|
|
39
|
-
noGroupLabel:
|
|
25
|
+
onValueChange: b,
|
|
26
|
+
onClear: C,
|
|
27
|
+
placeholder: X = "Seleziona...",
|
|
28
|
+
emptyPlaceholder: $ = "Nessun risultato",
|
|
29
|
+
searchPlaceholder: q = "Cerca...",
|
|
30
|
+
addItemPlaceholder: H = "Aggiungi",
|
|
31
|
+
itemCountMessage: J = (e) => `${e} elementi selezionati`,
|
|
32
|
+
maxSelectedMessage: K = (e) => `Puoi selezionare fino a ${e} elementi`,
|
|
33
|
+
label: k,
|
|
34
|
+
className: Q = "",
|
|
35
|
+
labelClassName: U = "",
|
|
36
|
+
wrpClassName: Y = "",
|
|
37
|
+
searchable: D = !1,
|
|
38
|
+
creatable: Z = !1,
|
|
39
|
+
noGroupLabel: L = "Nessun gruppo",
|
|
40
40
|
maxSelected: c,
|
|
41
|
-
showChipsInsteadOfCount:
|
|
42
|
-
disabled:
|
|
43
|
-
size:
|
|
44
|
-
isSingleSelectClearable:
|
|
45
|
-
id:
|
|
46
|
-
"data-testid":
|
|
47
|
-
} =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
41
|
+
showChipsInsteadOfCount: _ = !1,
|
|
42
|
+
disabled: x,
|
|
43
|
+
size: ee = "default",
|
|
44
|
+
isSingleSelectClearable: le = !1,
|
|
45
|
+
id: re,
|
|
46
|
+
"data-testid": ae
|
|
47
|
+
} = O, [h, y] = v(!1), [f, N] = v(""), w = T(null), I = T(null), [j, te] = v(0), P = Object.prototype.hasOwnProperty.call(O, "value"), [ne, se] = v(W), d = P ? G : ne, p = B(
|
|
48
|
+
(e) => {
|
|
49
|
+
P || se(e), b?.(
|
|
50
|
+
t ? Array.isArray(e) ? e : [] : Array.isArray(e) ? e[0] : e
|
|
51
|
+
);
|
|
52
|
+
},
|
|
53
|
+
[P, t, b]
|
|
54
|
+
), n = S(() => t ? Array.isArray(d) ? d : [] : d != null ? [d] : [], [d, t]), u = S(() => {
|
|
55
|
+
const e = m.filter((a) => n.includes(a.value));
|
|
56
|
+
if (t) {
|
|
57
|
+
const a = n.filter((r) => !e.find((s) => s.value === r)).map((r) => ({ value: r, label: r }));
|
|
53
58
|
return [...e, ...a];
|
|
54
|
-
} else if (
|
|
55
|
-
return [{ value:
|
|
59
|
+
} else if (n.length && !e.length)
|
|
60
|
+
return [{ value: n[0], label: n[0] }];
|
|
56
61
|
return e;
|
|
57
|
-
}, [m,
|
|
62
|
+
}, [m, n, t]), V = (e) => {
|
|
58
63
|
if (!e.disabled)
|
|
59
|
-
if (
|
|
60
|
-
const a =
|
|
61
|
-
if (!a && c !== void 0 &&
|
|
64
|
+
if (t) {
|
|
65
|
+
const a = n.includes(e.value);
|
|
66
|
+
if (!a && c !== void 0 && n.length >= c)
|
|
62
67
|
return;
|
|
63
68
|
p(
|
|
64
|
-
a ?
|
|
69
|
+
a ? n.filter((r) => r !== e.value) : [...n, e.value]
|
|
65
70
|
);
|
|
66
71
|
} else
|
|
67
|
-
p(e.value),
|
|
68
|
-
},
|
|
69
|
-
p(
|
|
70
|
-
}, [p,
|
|
72
|
+
p(e.value), y(!1);
|
|
73
|
+
}, M = B(() => {
|
|
74
|
+
p(t ? [] : void 0), N(""), C && C();
|
|
75
|
+
}, [p, C, t]), oe = S(() => {
|
|
71
76
|
const e = m.some((a) => a.group);
|
|
72
77
|
return m.reduce((a, r) => {
|
|
73
|
-
const s = e ? r.group ||
|
|
78
|
+
const s = e ? r.group || L : "";
|
|
74
79
|
return a[s] = a[s] || [], a[s].push(r), a;
|
|
75
80
|
}, {});
|
|
76
|
-
}, [m]);
|
|
77
|
-
return
|
|
78
|
-
|
|
79
|
-
}, [h,
|
|
81
|
+
}, [m, L]);
|
|
82
|
+
return de(() => {
|
|
83
|
+
w.current && te(w.current.getBoundingClientRect().width);
|
|
84
|
+
}, [h, n, m]), ce(() => {
|
|
80
85
|
if (!h) return;
|
|
81
86
|
const e = requestAnimationFrame(() => {
|
|
82
|
-
|
|
87
|
+
I.current && I.current?.scrollIntoView({
|
|
83
88
|
behavior: "instant",
|
|
84
89
|
block: "center"
|
|
85
90
|
});
|
|
86
91
|
});
|
|
87
92
|
return () => cancelAnimationFrame(e);
|
|
88
|
-
}, [h]), /* @__PURE__ */ o("div", { className:
|
|
89
|
-
|
|
93
|
+
}, [h]), /* @__PURE__ */ o("div", { className: z("flex flex-col gap-1.5", Y), children: [
|
|
94
|
+
k && /* @__PURE__ */ l(ge, { className: U, children: k }),
|
|
90
95
|
/* @__PURE__ */ o(
|
|
91
96
|
be,
|
|
92
97
|
{
|
|
93
|
-
open:
|
|
94
|
-
onOpenChange: (e) => !
|
|
98
|
+
open: x ? !1 : h,
|
|
99
|
+
onOpenChange: (e) => !x && y(e),
|
|
95
100
|
modal: !0,
|
|
96
101
|
children: [
|
|
97
102
|
/* @__PURE__ */ l(Ce, { asChild: !0, children: /* @__PURE__ */ o(
|
|
98
103
|
"div",
|
|
99
104
|
{
|
|
100
|
-
ref:
|
|
101
|
-
id:
|
|
102
|
-
"data-testid":
|
|
103
|
-
className:
|
|
105
|
+
ref: w,
|
|
106
|
+
id: re,
|
|
107
|
+
"data-testid": ae,
|
|
108
|
+
className: z(
|
|
104
109
|
i.input.base,
|
|
105
110
|
i.radius.default,
|
|
106
111
|
i.focusRingWithin,
|
|
107
112
|
"flex w-full min-w-[100px] cursor-pointer items-center justify-between gap-2",
|
|
108
113
|
h && i.activeRing,
|
|
109
|
-
Ne[
|
|
110
|
-
|
|
111
|
-
|
|
114
|
+
Ne[ee],
|
|
115
|
+
x && "cursor-not-allowed opacity-50",
|
|
116
|
+
Q
|
|
112
117
|
),
|
|
113
118
|
children: [
|
|
114
|
-
u.length === 0 ? /* @__PURE__ */ l("span", { className: "text-d-muted-foreground", children:
|
|
115
|
-
/* @__PURE__ */ l("div", { className: "flex min-w-0 flex-nowrap gap-1 overflow-auto", children:
|
|
119
|
+
u.length === 0 ? /* @__PURE__ */ l("span", { className: "text-d-muted-foreground", children: X }) : t ? /* @__PURE__ */ o("div", { className: "flex h-full w-full min-w-0 items-center justify-between gap-2", children: [
|
|
120
|
+
/* @__PURE__ */ l("div", { className: "flex min-w-0 flex-nowrap gap-1 overflow-auto", children: _ ? u.map(
|
|
116
121
|
(e) => g ? g(e) : /* @__PURE__ */ o(
|
|
117
|
-
|
|
122
|
+
ue,
|
|
118
123
|
{
|
|
119
124
|
variant: "secondary",
|
|
120
125
|
className: "hover:bg-d-secondary/100 bg-d-secondary/50 border-d-border flex cursor-pointer items-center gap-1 border",
|
|
121
126
|
onClick: (a) => {
|
|
122
|
-
a.stopPropagation(),
|
|
127
|
+
a.stopPropagation(), V(e);
|
|
123
128
|
},
|
|
124
129
|
children: [
|
|
125
130
|
e.label,
|
|
126
|
-
!e.fixed && /* @__PURE__ */ l(
|
|
131
|
+
!e.fixed && /* @__PURE__ */ l(A, { name: "X", size: "xs" })
|
|
127
132
|
]
|
|
128
133
|
},
|
|
129
134
|
e.value
|
|
130
135
|
)
|
|
131
|
-
) : /* @__PURE__ */ l("div", { children:
|
|
132
|
-
|
|
136
|
+
) : /* @__PURE__ */ l("div", { children: J(u.length) }) }),
|
|
137
|
+
t && /* @__PURE__ */ l(
|
|
133
138
|
"div",
|
|
134
139
|
{
|
|
135
140
|
className: "border-d-input bg-d-accent cursor-pointer rounded-full p-1",
|
|
136
141
|
onClick: (e) => {
|
|
137
|
-
e.stopPropagation(), e.preventDefault(),
|
|
142
|
+
e.stopPropagation(), e.preventDefault(), M();
|
|
138
143
|
},
|
|
139
144
|
onMouseDown: (e) => e.preventDefault(),
|
|
140
145
|
"aria-label": "Clear selection",
|
|
141
146
|
children: /* @__PURE__ */ l(
|
|
142
|
-
|
|
147
|
+
A,
|
|
143
148
|
{
|
|
144
149
|
name: "X",
|
|
145
150
|
size: "xs",
|
|
@@ -150,18 +155,18 @@ function Ae(z) {
|
|
|
150
155
|
)
|
|
151
156
|
] }) : /* @__PURE__ */ o("div", { className: "flex h-full w-full min-w-0 items-center justify-between gap-2", children: [
|
|
152
157
|
/* @__PURE__ */ l("div", { className: "min-w-0 flex-1 truncate", children: g ? g(u[0]) : typeof u[0]?.label == "string" ? /* @__PURE__ */ l("span", { children: u[0]?.label }) : u[0]?.label }),
|
|
153
|
-
|
|
158
|
+
le && d !== void 0 && d !== null && /* @__PURE__ */ l(
|
|
154
159
|
"div",
|
|
155
160
|
{
|
|
156
161
|
role: "button",
|
|
157
162
|
className: "border-d-input bg-d-accent cursor-pointer rounded-full p-1",
|
|
158
163
|
onClick: (e) => {
|
|
159
|
-
e.stopPropagation(), e.preventDefault(),
|
|
164
|
+
e.stopPropagation(), e.preventDefault(), M();
|
|
160
165
|
},
|
|
161
166
|
onMouseDown: (e) => e.preventDefault(),
|
|
162
167
|
"aria-label": "Clear selection",
|
|
163
168
|
children: /* @__PURE__ */ l(
|
|
164
|
-
|
|
169
|
+
A,
|
|
165
170
|
{
|
|
166
171
|
name: "X",
|
|
167
172
|
size: "xs",
|
|
@@ -171,7 +176,7 @@ function Ae(z) {
|
|
|
171
176
|
}
|
|
172
177
|
)
|
|
173
178
|
] }),
|
|
174
|
-
/* @__PURE__ */ l(
|
|
179
|
+
/* @__PURE__ */ l(ye, { className: "h-4 w-4 opacity-50" })
|
|
175
180
|
]
|
|
176
181
|
}
|
|
177
182
|
) }),
|
|
@@ -179,60 +184,60 @@ function Ae(z) {
|
|
|
179
184
|
xe,
|
|
180
185
|
{
|
|
181
186
|
className: "p-0",
|
|
182
|
-
style: { width:
|
|
187
|
+
style: { width: j > 0 ? j : "auto" },
|
|
183
188
|
align: "start",
|
|
184
189
|
sideOffset: 4,
|
|
185
190
|
avoidCollisions: !0,
|
|
186
191
|
collisionPadding: 8,
|
|
187
192
|
children: /* @__PURE__ */ o(
|
|
188
|
-
|
|
193
|
+
me,
|
|
189
194
|
{
|
|
190
|
-
shouldFilter:
|
|
191
|
-
filter: (e, a
|
|
195
|
+
shouldFilter: D,
|
|
196
|
+
filter: (e, a) => e.toLocaleLowerCase().includes(a.toLocaleLowerCase()) ? 1 : 0,
|
|
192
197
|
className: "w-full",
|
|
193
198
|
children: [
|
|
194
|
-
|
|
195
|
-
|
|
199
|
+
D && /* @__PURE__ */ l(
|
|
200
|
+
fe,
|
|
196
201
|
{
|
|
197
|
-
placeholder:
|
|
202
|
+
placeholder: q,
|
|
198
203
|
className: "placeholder:text-d-muted-foreground",
|
|
199
204
|
value: f,
|
|
200
|
-
onValueChange:
|
|
205
|
+
onValueChange: N
|
|
201
206
|
}
|
|
202
207
|
),
|
|
203
|
-
/* @__PURE__ */ o(
|
|
204
|
-
/* @__PURE__ */ l(
|
|
205
|
-
|
|
206
|
-
|
|
208
|
+
/* @__PURE__ */ o(pe, { className: "max-h-60 overflow-auto overscroll-contain", children: [
|
|
209
|
+
/* @__PURE__ */ l(he, { children: $ }),
|
|
210
|
+
Z && f && /* @__PURE__ */ l(E, { children: /* @__PURE__ */ l(
|
|
211
|
+
F,
|
|
207
212
|
{
|
|
208
213
|
className: "cursor-pointer",
|
|
209
214
|
onSelect: () => {
|
|
210
|
-
f && (p(
|
|
215
|
+
f && (p(t ? [...n, f] : f), N(""), t || y(!1));
|
|
211
216
|
},
|
|
212
217
|
children: /* @__PURE__ */ o("div", { className: "text-d-foreground text-xs", children: [
|
|
213
|
-
|
|
218
|
+
H,
|
|
214
219
|
" “",
|
|
215
220
|
f,
|
|
216
221
|
"”"
|
|
217
222
|
] })
|
|
218
223
|
}
|
|
219
224
|
) }),
|
|
220
|
-
Object.entries(
|
|
221
|
-
const s =
|
|
225
|
+
Object.entries(oe).map(([e, a]) => /* @__PURE__ */ l(E, { heading: e || void 0, children: a.map((r) => {
|
|
226
|
+
const s = n.includes(r.value), ie = t && c !== void 0 && !s && n.length >= c, R = r.disabled || ie;
|
|
222
227
|
return /* @__PURE__ */ o(
|
|
223
|
-
|
|
228
|
+
F,
|
|
224
229
|
{
|
|
225
|
-
ref: s ?
|
|
230
|
+
ref: s ? I : null,
|
|
226
231
|
value: typeof r.label == "string" ? r.label : String(r.value),
|
|
227
|
-
onSelect: () => !
|
|
228
|
-
className:
|
|
232
|
+
onSelect: () => !R && V(r),
|
|
233
|
+
className: z(
|
|
229
234
|
"cursor-pointer",
|
|
230
235
|
i.dropdownItem.hover,
|
|
231
|
-
|
|
232
|
-
!
|
|
236
|
+
R && "cursor-not-allowed opacity-50",
|
|
237
|
+
!t && s && i.dropdownItem.selected
|
|
233
238
|
),
|
|
234
239
|
children: [
|
|
235
|
-
|
|
240
|
+
t && /* @__PURE__ */ l(ve, { checked: s, className: "mr-1" }),
|
|
236
241
|
typeof r.label == "string" ? /* @__PURE__ */ l("span", { children: r.label }) : r.label
|
|
237
242
|
]
|
|
238
243
|
},
|
|
@@ -240,7 +245,7 @@ function Ae(z) {
|
|
|
240
245
|
);
|
|
241
246
|
}) }, e))
|
|
242
247
|
] }),
|
|
243
|
-
|
|
248
|
+
t && c !== void 0 && n.length >= c && /* @__PURE__ */ l("div", { className: "border-d-border text-d-muted-foreground border-t px-2 py-1 text-xs", children: K(c) })
|
|
244
249
|
]
|
|
245
250
|
}
|
|
246
251
|
)
|
|
@@ -252,5 +257,5 @@ function Ae(z) {
|
|
|
252
257
|
] });
|
|
253
258
|
}
|
|
254
259
|
export {
|
|
255
|
-
|
|
260
|
+
Ve as AppSelect
|
|
256
261
|
};
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as c, jsx as t, Fragment as I } from "react/jsx-runtime";
|
|
3
3
|
import * as v from "react";
|
|
4
|
-
import { Sidebar as y, SidebarHeader as z, SidebarContent as B, SidebarGroup as x, SidebarGroupLabel as A, SidebarGroupContent as N, SidebarMenu as w, SidebarMenuItem as C, SidebarMenuSub as E, SidebarMenuSubItem as M, SidebarRail as F, SidebarMenuButton as j, SidebarMenuSubButton as D } from "./sidebar.js";
|
|
5
4
|
import { Icon as h } from "./icon.js";
|
|
6
|
-
|
|
5
|
+
import { Sidebar as y, SidebarHeader as z, SidebarContent as B, SidebarGroup as x, SidebarGroupLabel as A, SidebarGroupContent as N, SidebarMenu as C, SidebarMenuItem as w, SidebarMenuSub as M, SidebarMenuSubItem as E, SidebarRail as F, SidebarMenuButton as j, SidebarMenuSubButton as D } from "./sidebar.js";
|
|
6
|
+
function K({
|
|
7
7
|
navigation: u,
|
|
8
8
|
navigationFooter: G,
|
|
9
|
-
|
|
10
|
-
defaultVersion: V,
|
|
11
|
-
headerContent: m,
|
|
9
|
+
headerContent: f,
|
|
12
10
|
footerContent: R,
|
|
13
11
|
showRail: g = !0,
|
|
14
12
|
linkComponent: d,
|
|
15
|
-
linkProps:
|
|
13
|
+
linkProps: m = {},
|
|
16
14
|
...k
|
|
17
15
|
}) {
|
|
18
|
-
const [
|
|
16
|
+
const [b, o] = v.useState({});
|
|
19
17
|
v.useEffect(() => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
o((e) => {
|
|
19
|
+
const n = { ...e };
|
|
20
|
+
return u.forEach((l) => {
|
|
21
|
+
l.items.some(
|
|
22
|
+
(r) => r.isActive || r.subItems && r.subItems.some((s) => s.isActive)
|
|
23
|
+
) && (n[l.title] = !0);
|
|
24
|
+
}), n;
|
|
25
|
+
});
|
|
26
26
|
}, [u]);
|
|
27
|
-
const S = (e, n,
|
|
28
|
-
const i = e.subItems && e.subItems.length > 0,
|
|
29
|
-
/* @__PURE__ */
|
|
27
|
+
const S = (e, n, l) => {
|
|
28
|
+
const i = e.subItems && e.subItems.length > 0, r = /* @__PURE__ */ c(I, { children: [
|
|
29
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
30
30
|
e.iconName && /* @__PURE__ */ t(h, { name: e.iconName, size: "sm" }),
|
|
31
31
|
/* @__PURE__ */ t("span", { children: e.title })
|
|
32
32
|
] }),
|
|
@@ -37,21 +37,21 @@ function O({
|
|
|
37
37
|
{
|
|
38
38
|
href: i ? "#" : e.url,
|
|
39
39
|
className: "flex w-full items-center justify-between gap-2",
|
|
40
|
-
onClick: i ?
|
|
41
|
-
...
|
|
42
|
-
children:
|
|
40
|
+
onClick: i ? l : void 0,
|
|
41
|
+
...m,
|
|
42
|
+
children: r
|
|
43
43
|
}
|
|
44
44
|
) }) : /* @__PURE__ */ t(j, { isActive: e.isActive, children: /* @__PURE__ */ t(
|
|
45
45
|
"a",
|
|
46
46
|
{
|
|
47
47
|
href: i ? "#" : e.url,
|
|
48
48
|
className: "flex w-full items-center justify-between gap-2",
|
|
49
|
-
onClick: i ?
|
|
50
|
-
children:
|
|
49
|
+
onClick: i ? l : void 0,
|
|
50
|
+
children: r
|
|
51
51
|
}
|
|
52
52
|
) });
|
|
53
53
|
}, p = (e) => {
|
|
54
|
-
const n = /* @__PURE__ */
|
|
54
|
+
const n = /* @__PURE__ */ c(I, { children: [
|
|
55
55
|
e.iconName && /* @__PURE__ */ t(h, { name: e.iconName, size: "xs" }),
|
|
56
56
|
/* @__PURE__ */ t("span", { children: e.title })
|
|
57
57
|
] });
|
|
@@ -60,40 +60,40 @@ function O({
|
|
|
60
60
|
{
|
|
61
61
|
href: e.url,
|
|
62
62
|
className: "flex w-full items-center gap-2",
|
|
63
|
-
...
|
|
63
|
+
...m,
|
|
64
64
|
children: n
|
|
65
65
|
}
|
|
66
66
|
) }) : /* @__PURE__ */ t(D, { isActive: e.isActive, asChild: !0, children: /* @__PURE__ */ t("a", { href: e.url, className: "flex w-full items-center gap-2", children: n }) });
|
|
67
67
|
};
|
|
68
|
-
return /* @__PURE__ */
|
|
69
|
-
|
|
70
|
-
/* @__PURE__ */ t(B, { children: u.map((e) => /* @__PURE__ */
|
|
68
|
+
return /* @__PURE__ */ c(y, { ...k, children: [
|
|
69
|
+
f && /* @__PURE__ */ t(z, { children: f }),
|
|
70
|
+
/* @__PURE__ */ t(B, { children: u.map((e) => /* @__PURE__ */ c(x, { children: [
|
|
71
71
|
e.title && /* @__PURE__ */ t(A, { children: e.title }),
|
|
72
|
-
/* @__PURE__ */ t(N, { children: /* @__PURE__ */ t(
|
|
73
|
-
const
|
|
74
|
-
return /* @__PURE__ */
|
|
75
|
-
S(n, i, (
|
|
76
|
-
|
|
72
|
+
/* @__PURE__ */ t(N, { children: /* @__PURE__ */ t(C, { children: e.items.map((n) => {
|
|
73
|
+
const l = n.subItems && n.subItems.length > 0, i = b[n.title] || !1;
|
|
74
|
+
return /* @__PURE__ */ c(w, { children: [
|
|
75
|
+
S(n, i, (s) => {
|
|
76
|
+
l && (s.preventDefault(), o((a) => ({
|
|
77
77
|
...a,
|
|
78
78
|
[n.title]: !a[n.title]
|
|
79
79
|
})));
|
|
80
80
|
}),
|
|
81
|
-
|
|
81
|
+
l && i && /* @__PURE__ */ t(M, { children: n.subItems.map((s) => /* @__PURE__ */ t(E, { children: p(s) }, s.title)) })
|
|
82
82
|
] }, n.title);
|
|
83
83
|
}) }) })
|
|
84
84
|
] }, e.title)) }),
|
|
85
|
-
G?.map((e) => /* @__PURE__ */
|
|
85
|
+
G?.map((e) => /* @__PURE__ */ c(x, { children: [
|
|
86
86
|
e.title && /* @__PURE__ */ t(A, { children: e.title }),
|
|
87
|
-
/* @__PURE__ */ t(N, { children: /* @__PURE__ */ t(
|
|
88
|
-
const
|
|
89
|
-
return /* @__PURE__ */
|
|
90
|
-
S(n, i, (
|
|
91
|
-
|
|
87
|
+
/* @__PURE__ */ t(N, { children: /* @__PURE__ */ t(C, { children: e.items.map((n) => {
|
|
88
|
+
const l = n.subItems && n.subItems.length > 0, i = b[n.title] || !1;
|
|
89
|
+
return /* @__PURE__ */ c(w, { children: [
|
|
90
|
+
S(n, i, (s) => {
|
|
91
|
+
l && (s.preventDefault(), o((a) => ({
|
|
92
92
|
...a,
|
|
93
93
|
[n.title]: !a[n.title]
|
|
94
94
|
})));
|
|
95
95
|
}),
|
|
96
|
-
|
|
96
|
+
l && i && /* @__PURE__ */ t(M, { children: n.subItems.map((s) => /* @__PURE__ */ t(E, { children: p(s) }, s.title)) })
|
|
97
97
|
] }, n.title);
|
|
98
98
|
}) }) })
|
|
99
99
|
] }, e.title)),
|
|
@@ -102,5 +102,5 @@ function O({
|
|
|
102
102
|
] });
|
|
103
103
|
}
|
|
104
104
|
export {
|
|
105
|
-
|
|
105
|
+
K as AppSidebar
|
|
106
106
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as l, jsxs as s } from "react/jsx-runtime";
|
|
3
|
-
import { Stepper as V, StepperNav as S, StepperItem as b, StepperTrigger as N, StepperIndicator as w, StepperTitle as C, StepperSeparator as I, StepperPanel as T, StepperContent as j } from "./stepper.js";
|
|
4
3
|
import { cva as t } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
4
|
+
import { Stepper as V, StepperNav as S, StepperItem as b, StepperTrigger as N, StepperIndicator as w, StepperTitle as C, StepperSeparator as I, StepperPanel as T, StepperContent as j } from "./stepper.js";
|
|
5
5
|
const k = t("", {
|
|
6
6
|
variants: {
|
|
7
7
|
align: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as u, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { useState as B, useRef as W, useCallback as k, useMemo as b, useLayoutEffect as de } from "react";
|
|
3
4
|
import { designTokens as f } from "../design-tokens.js";
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { Label as
|
|
6
|
-
import { Popover as
|
|
5
|
+
import { Icon as E } from "./icon.js";
|
|
6
|
+
import { Label as le } from "./label.js";
|
|
7
|
+
import { Popover as ce, PopoverTrigger as ue, PopoverContent as me } from "./popover.js";
|
|
7
8
|
import { cn as V } from "../../lib/utils.js";
|
|
8
|
-
import { useState as E, useRef as W, useCallback as k, useMemo as b, useLayoutEffect as me } from "react";
|
|
9
9
|
import { Button as X } from "./button.js";
|
|
10
10
|
const fe = {
|
|
11
11
|
sm: f.sizes.sm,
|
|
@@ -32,7 +32,7 @@ function D({
|
|
|
32
32
|
disabledValues: w
|
|
33
33
|
}) {
|
|
34
34
|
const m = W(null);
|
|
35
|
-
return
|
|
35
|
+
return de(() => {
|
|
36
36
|
m.current && l !== void 0 && m.current.scrollIntoView({
|
|
37
37
|
behavior: "instant",
|
|
38
38
|
block: "center"
|
|
@@ -81,13 +81,13 @@ function Ne(r) {
|
|
|
81
81
|
variant: K = "default",
|
|
82
82
|
useUtc: d = !1,
|
|
83
83
|
withSeconds: M = !1,
|
|
84
|
-
minuteStep:
|
|
85
|
-
secondStep:
|
|
84
|
+
minuteStep: O = 1,
|
|
85
|
+
secondStep: P = 1,
|
|
86
86
|
id: Q,
|
|
87
87
|
"data-testid": Y
|
|
88
|
-
} = r, [Z, j] =
|
|
88
|
+
} = r, [Z, j] = B(
|
|
89
89
|
void 0
|
|
90
|
-
), [R, $] =
|
|
90
|
+
), [R, $] = B(!1), ee = W(null), v = Object.prototype.hasOwnProperty.call(r, "value"), s = v ? l : Z, A = k(() => {
|
|
91
91
|
v || j(void 0), g?.(void 0), p?.();
|
|
92
92
|
}, [v, g, p]), I = k(() => {
|
|
93
93
|
if (!s) return "";
|
|
@@ -105,11 +105,11 @@ function Ne(r) {
|
|
|
105
105
|
},
|
|
106
106
|
[s, g, d, v]
|
|
107
107
|
), h = d ? s?.getUTCHours() : s?.getHours(), x = d ? s?.getUTCMinutes() : s?.getMinutes(), te = d ? s?.getUTCSeconds() : s?.getSeconds(), y = b(
|
|
108
|
-
() => F(P),
|
|
109
|
-
[P]
|
|
110
|
-
), U = b(
|
|
111
108
|
() => F(O),
|
|
112
109
|
[O]
|
|
110
|
+
), U = b(
|
|
111
|
+
() => F(P),
|
|
112
|
+
[P]
|
|
113
113
|
), se = b(
|
|
114
114
|
() => Array.from({ length: 24 }, (e, n) => n),
|
|
115
115
|
[]
|
|
@@ -148,15 +148,15 @@ function Ne(r) {
|
|
|
148
148
|
return { disabledHours: e, disabledMinutes: n, disabledSeconds: o };
|
|
149
149
|
}, [r.minTime, r.maxTime, h, x, d]);
|
|
150
150
|
return /* @__PURE__ */ u("div", { className: V("flex flex-col gap-1.5", G), children: [
|
|
151
|
-
T && /* @__PURE__ */ a(
|
|
151
|
+
T && /* @__PURE__ */ a(le, { className: q, children: T }),
|
|
152
152
|
/* @__PURE__ */ u(
|
|
153
|
-
|
|
153
|
+
ce,
|
|
154
154
|
{
|
|
155
155
|
open: m ? !1 : R,
|
|
156
156
|
onOpenChange: (e) => !m && $(e),
|
|
157
157
|
modal: !0,
|
|
158
158
|
children: [
|
|
159
|
-
/* @__PURE__ */ a(
|
|
159
|
+
/* @__PURE__ */ a(ue, { asChild: !0, children: /* @__PURE__ */ u(
|
|
160
160
|
"div",
|
|
161
161
|
{
|
|
162
162
|
ref: ee,
|
|
@@ -175,7 +175,7 @@ function Ne(r) {
|
|
|
175
175
|
),
|
|
176
176
|
children: [
|
|
177
177
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-2 overflow-hidden", children: [
|
|
178
|
-
/* @__PURE__ */ a(
|
|
178
|
+
/* @__PURE__ */ a(E, { name: "Clock", size: "xs", className: "opacity-50" }),
|
|
179
179
|
I ? /* @__PURE__ */ a("span", { className: "text-d-foreground truncate font-medium tabular-nums", children: I }) : /* @__PURE__ */ a("span", { className: "text-d-muted-foreground whitespace-nowrap", children: w })
|
|
180
180
|
] }),
|
|
181
181
|
/* @__PURE__ */ u("div", { className: "text-d-muted-foreground/30 flex items-center gap-1.5", children: [
|
|
@@ -190,7 +190,7 @@ function Ne(r) {
|
|
|
190
190
|
onMouseDown: (e) => e.preventDefault(),
|
|
191
191
|
"aria-label": "Clear selection",
|
|
192
192
|
children: /* @__PURE__ */ a(
|
|
193
|
-
|
|
193
|
+
E,
|
|
194
194
|
{
|
|
195
195
|
name: "X",
|
|
196
196
|
size: "xs",
|
|
@@ -204,7 +204,7 @@ function Ne(r) {
|
|
|
204
204
|
]
|
|
205
205
|
}
|
|
206
206
|
) }),
|
|
207
|
-
/* @__PURE__ */ u(
|
|
207
|
+
/* @__PURE__ */ u(me, { className: "flex w-auto flex-col p-0", align: "start", children: [
|
|
208
208
|
/* @__PURE__ */ u("div", { className: "divide-d-border flex min-h-0 flex-1 items-start divide-x", children: [
|
|
209
209
|
/* @__PURE__ */ a(
|
|
210
210
|
D,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { cn as t } from "../../lib/utils.js";
|
|
4
3
|
import { cva as A } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
4
|
import * as d from "react";
|
|
5
|
+
import { cn as t } from "../../lib/utils.js";
|
|
6
6
|
import { Label as g } from "./label.js";
|
|
7
7
|
import { Tooltip as B, TooltipTrigger as E, TooltipContent as L } from "./tooltip.js";
|
|
8
8
|
const v = A(
|