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,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as r, jsxs as L, Fragment as
|
|
2
|
+
import { jsx as r, jsxs as L, Fragment as X } from "react/jsx-runtime";
|
|
3
3
|
import { Command as ue, useCommandState as ce } from "../../node_modules/cmdk/dist/index.js";
|
|
4
4
|
import * as o from "react";
|
|
5
5
|
import { useEffect as C, forwardRef as fe } from "react";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { Label as
|
|
11
|
-
import {
|
|
6
|
+
import { Badge as me } from "./badge.js";
|
|
7
|
+
import { CommandItem as I, Command as q, CommandList as ge, CommandGroup as he } from "./command.js";
|
|
8
|
+
import { cn as v } from "../../lib/utils.js";
|
|
9
|
+
import { Icon as pe } from "./icon.js";
|
|
10
|
+
import { Label as ve } from "./label.js";
|
|
11
|
+
import { Popover as be, PopoverTrigger as we, PopoverContent as xe } from "./popover.js";
|
|
12
12
|
import Ne from "../../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
13
13
|
function ye(s, l) {
|
|
14
14
|
const [i, u] = o.useState(s);
|
|
@@ -40,7 +40,7 @@ function Ce(s, l) {
|
|
|
40
40
|
);
|
|
41
41
|
return i;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ke(s, l) {
|
|
44
44
|
for (const [, i] of Object.entries(s))
|
|
45
45
|
if (i.some((u) => l.find((a) => a.value === u.value)))
|
|
46
46
|
return !0;
|
|
@@ -50,14 +50,14 @@ const Q = fe(({ className: s, ...l }, i) => ce((a) => a.filtered.count === 0) ?
|
|
|
50
50
|
"div",
|
|
51
51
|
{
|
|
52
52
|
ref: i,
|
|
53
|
-
className:
|
|
53
|
+
className: v("py-6 text-center text-sm", s),
|
|
54
54
|
"cmdk-empty": "",
|
|
55
55
|
role: "presentation",
|
|
56
56
|
...l
|
|
57
57
|
}
|
|
58
58
|
) : null);
|
|
59
59
|
Q.displayName = "CommandEmpty";
|
|
60
|
-
const
|
|
60
|
+
const Ee = o.forwardRef(
|
|
61
61
|
({
|
|
62
62
|
value: s,
|
|
63
63
|
onChange: l,
|
|
@@ -66,29 +66,29 @@ const Oe = o.forwardRef(
|
|
|
66
66
|
options: a,
|
|
67
67
|
delay: V,
|
|
68
68
|
onSearch: c,
|
|
69
|
-
onSearchSync:
|
|
69
|
+
onSearchSync: j,
|
|
70
70
|
loadingIndicator: Y,
|
|
71
71
|
emptyIndicator: D,
|
|
72
72
|
maxSelected: _ = Number.MAX_SAFE_INTEGER,
|
|
73
73
|
onMaxSelected: A,
|
|
74
74
|
hidePlaceholderWhenSelected: U = !0,
|
|
75
75
|
disabled: N,
|
|
76
|
-
groupBy:
|
|
76
|
+
groupBy: b,
|
|
77
77
|
className: Z,
|
|
78
78
|
badgeClassName: B,
|
|
79
79
|
selectFirstItem: P = !0,
|
|
80
|
-
creatable:
|
|
80
|
+
creatable: k = !1,
|
|
81
81
|
triggerSearchOnFocus: R = !1,
|
|
82
82
|
commandProps: m,
|
|
83
|
-
inputProps:
|
|
83
|
+
inputProps: E,
|
|
84
84
|
hideClearAllButton: ee = !1,
|
|
85
85
|
label: W
|
|
86
86
|
}, te) => {
|
|
87
|
-
const g = o.useRef(null), [f,
|
|
87
|
+
const g = o.useRef(null), [f, M] = o.useState(!1), [ne, z] = o.useState(!1), [H, $] = o.useState(!1), [re, oe] = o.useState(
|
|
88
88
|
void 0
|
|
89
|
-
),
|
|
90
|
-
T(u,
|
|
91
|
-
), [h,
|
|
89
|
+
), F = o.useRef(null), J = o.useRef(null), [t, y] = o.useState(s || []), [w, K] = o.useState(
|
|
90
|
+
T(u, b)
|
|
91
|
+
), [h, G] = o.useState(""), x = ye(h, V || 500);
|
|
92
92
|
o.useImperativeHandle(
|
|
93
93
|
te,
|
|
94
94
|
() => ({
|
|
@@ -99,9 +99,12 @@ const Oe = o.forwardRef(
|
|
|
99
99
|
}),
|
|
100
100
|
[t]
|
|
101
101
|
);
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
const p = o.useCallback(
|
|
103
|
+
(e) => {
|
|
104
|
+
F.current && !F.current.contains(e.target) && g.current && !g.current.contains(e.target) && (M(!1), g.current.blur());
|
|
105
|
+
},
|
|
106
|
+
[]
|
|
107
|
+
), S = o.useCallback(
|
|
105
108
|
(e) => {
|
|
106
109
|
const n = t.filter((d) => d.value !== e.value);
|
|
107
110
|
y(n), l?.(n);
|
|
@@ -110,47 +113,53 @@ const Oe = o.forwardRef(
|
|
|
110
113
|
), se = o.useCallback(
|
|
111
114
|
(e) => {
|
|
112
115
|
const n = g.current;
|
|
113
|
-
n && ((e.key === "Delete" || e.key === "Backspace") && n.value === "" && t.length > 0 && (t[t.length - 1].fixed ||
|
|
116
|
+
n && ((e.key === "Delete" || e.key === "Backspace") && n.value === "" && t.length > 0 && (t[t.length - 1].fixed || S(t[t.length - 1])), e.key === "Escape" && n.blur());
|
|
114
117
|
},
|
|
115
|
-
[
|
|
118
|
+
[S, t]
|
|
116
119
|
);
|
|
117
120
|
C(() => {
|
|
118
121
|
if (typeof document < "u")
|
|
119
|
-
return f ? (document.addEventListener("mousedown",
|
|
120
|
-
document.removeEventListener("mousedown",
|
|
122
|
+
return f ? (document.addEventListener("mousedown", p), document.addEventListener("touchend", p)) : (document.removeEventListener("mousedown", p), document.removeEventListener("touchend", p)), () => {
|
|
123
|
+
document.removeEventListener("mousedown", p), document.removeEventListener("touchend", p);
|
|
121
124
|
};
|
|
122
|
-
}, [f,
|
|
125
|
+
}, [f, p]), C(() => {
|
|
123
126
|
s && y(s);
|
|
124
127
|
}, [s]), C(() => {
|
|
125
128
|
if (!a || c)
|
|
126
129
|
return;
|
|
127
|
-
const e = T(a || [],
|
|
128
|
-
JSON.stringify(e) !== JSON.stringify(
|
|
129
|
-
}, [u, a,
|
|
130
|
+
const e = T(a || [], b);
|
|
131
|
+
JSON.stringify(e) !== JSON.stringify(w) && K(e);
|
|
132
|
+
}, [u, a, b, c, w]), C(() => {
|
|
130
133
|
const e = () => {
|
|
131
|
-
const d =
|
|
132
|
-
|
|
134
|
+
const d = j?.(x);
|
|
135
|
+
K(T(d || [], b));
|
|
133
136
|
};
|
|
134
137
|
(async () => {
|
|
135
|
-
!
|
|
138
|
+
!j || !f || (R && e(), x && e());
|
|
136
139
|
})();
|
|
137
|
-
}, [
|
|
140
|
+
}, [
|
|
141
|
+
x,
|
|
142
|
+
b,
|
|
143
|
+
f,
|
|
144
|
+
R,
|
|
145
|
+
j
|
|
146
|
+
]), C(() => {
|
|
138
147
|
const e = async () => {
|
|
139
148
|
$(!0);
|
|
140
|
-
const d = await c?.(
|
|
141
|
-
|
|
149
|
+
const d = await c?.(x);
|
|
150
|
+
K(T(d || [], b)), $(!1);
|
|
142
151
|
};
|
|
143
152
|
(async () => {
|
|
144
|
-
!c || !f || (R && await e(),
|
|
153
|
+
!c || !f || (R && await e(), x && await e());
|
|
145
154
|
})();
|
|
146
|
-
}, [
|
|
147
|
-
if (f &&
|
|
148
|
-
const e =
|
|
155
|
+
}, [x, b, f, R, c]), o.useEffect(() => {
|
|
156
|
+
if (f && J.current) {
|
|
157
|
+
const e = J.current.getBoundingClientRect();
|
|
149
158
|
oe(e.width);
|
|
150
159
|
}
|
|
151
|
-
}, [f]);
|
|
160
|
+
}, [f, p]);
|
|
152
161
|
const le = () => {
|
|
153
|
-
if (!
|
|
162
|
+
if (!k || ke(w, [{ value: h, label: h }]) || t.find((n) => n.value === h))
|
|
154
163
|
return;
|
|
155
164
|
const e = /* @__PURE__ */ r(
|
|
156
165
|
I,
|
|
@@ -165,49 +174,49 @@ const Oe = o.forwardRef(
|
|
|
165
174
|
A?.(t.length);
|
|
166
175
|
return;
|
|
167
176
|
}
|
|
168
|
-
|
|
177
|
+
G("");
|
|
169
178
|
const d = [...t, { value: n, label: n }];
|
|
170
179
|
y(d), l?.(d);
|
|
171
180
|
},
|
|
172
181
|
children: `Create "${h}"`
|
|
173
182
|
}
|
|
174
183
|
);
|
|
175
|
-
if (!c && h.length > 0 || c &&
|
|
184
|
+
if (!c && h.length > 0 || c && x.length > 0 && !H)
|
|
176
185
|
return e;
|
|
177
186
|
}, ie = o.useCallback(() => {
|
|
178
187
|
if (D)
|
|
179
|
-
return c && !
|
|
180
|
-
}, [
|
|
181
|
-
() => Ce(
|
|
182
|
-
[
|
|
188
|
+
return c && !k && Object.keys(w).length === 0 ? /* @__PURE__ */ r(I, { value: "-", disabled: !0, children: D }) : /* @__PURE__ */ r(Q, { children: D });
|
|
189
|
+
}, [k, D, c, w]), de = o.useMemo(
|
|
190
|
+
() => Ce(w, t),
|
|
191
|
+
[w, t]
|
|
183
192
|
), ae = o.useCallback(() => {
|
|
184
193
|
if (m?.filter)
|
|
185
194
|
return m.filter;
|
|
186
|
-
if (
|
|
195
|
+
if (k)
|
|
187
196
|
return (e, n) => e.toLowerCase().includes(n.toLowerCase()) ? 1 : -1;
|
|
188
|
-
}, [
|
|
197
|
+
}, [k, m?.filter]);
|
|
189
198
|
return /* @__PURE__ */ L("div", { className: "flex flex-col space-y-1.5", children: [
|
|
190
|
-
W && /* @__PURE__ */ r(
|
|
199
|
+
W && /* @__PURE__ */ r(ve, { className: "w-fit", children: W }),
|
|
191
200
|
/* @__PURE__ */ r(
|
|
192
201
|
q,
|
|
193
202
|
{
|
|
194
|
-
ref:
|
|
203
|
+
ref: F,
|
|
195
204
|
...m,
|
|
196
205
|
onKeyDown: (e) => {
|
|
197
206
|
se(e), m?.onKeyDown?.(e);
|
|
198
207
|
},
|
|
199
|
-
className:
|
|
208
|
+
className: v(
|
|
200
209
|
"bg-d-input border-d-border h-auto overflow-visible",
|
|
201
210
|
m?.className
|
|
202
211
|
),
|
|
203
212
|
shouldFilter: m?.shouldFilter !== void 0 ? m.shouldFilter : !c,
|
|
204
213
|
filter: ae(),
|
|
205
|
-
children: /* @__PURE__ */ L(
|
|
206
|
-
/* @__PURE__ */ r(
|
|
214
|
+
children: /* @__PURE__ */ L(be, { open: f, onOpenChange: M, children: [
|
|
215
|
+
/* @__PURE__ */ r(we, { asChild: !0, children: /* @__PURE__ */ r(
|
|
207
216
|
"div",
|
|
208
217
|
{
|
|
209
|
-
ref:
|
|
210
|
-
className:
|
|
218
|
+
ref: J,
|
|
219
|
+
className: v(
|
|
211
220
|
"border-d-border/50 ring-offset-d-background min-h-10 rounded-md border text-base md:text-sm",
|
|
212
221
|
"focus-within:outline-none",
|
|
213
222
|
"focus-visible-within:ring-d-ring focus-visible-within:ring-1",
|
|
@@ -221,9 +230,9 @@ const Oe = o.forwardRef(
|
|
|
221
230
|
),
|
|
222
231
|
children: /* @__PURE__ */ L("div", { className: "relative flex flex-wrap gap-1", children: [
|
|
223
232
|
t.map((e) => /* @__PURE__ */ L(
|
|
224
|
-
|
|
233
|
+
me,
|
|
225
234
|
{
|
|
226
|
-
className:
|
|
235
|
+
className: v(
|
|
227
236
|
"data-[disabled]:bg-d-secondary-foreground data-[disabled]:text-d-secondary data-[disabled]:hover:bg-d-secondary-foreground",
|
|
228
237
|
"data-[fixed]:bg-d-secondary-foreground data-[fixed]:text-d-secondary data-[fixed]:hover:bg-d-secondary-foreground",
|
|
229
238
|
B
|
|
@@ -236,17 +245,17 @@ const Oe = o.forwardRef(
|
|
|
236
245
|
"button",
|
|
237
246
|
{
|
|
238
247
|
type: "button",
|
|
239
|
-
className:
|
|
248
|
+
className: v(
|
|
240
249
|
"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",
|
|
241
250
|
(N || e.fixed) && "hidden"
|
|
242
251
|
),
|
|
243
252
|
onKeyDown: (n) => {
|
|
244
|
-
n.key === "Enter" &&
|
|
253
|
+
n.key === "Enter" && S(e);
|
|
245
254
|
},
|
|
246
255
|
onMouseDown: (n) => {
|
|
247
256
|
n.preventDefault(), n.stopPropagation();
|
|
248
257
|
},
|
|
249
|
-
onClick: () =>
|
|
258
|
+
onClick: () => S(e),
|
|
250
259
|
children: /* @__PURE__ */ r(Ne, { className: "text-d-secondary-foreground hover:text-d-foreground h-3 w-3 cursor-pointer" })
|
|
251
260
|
}
|
|
252
261
|
)
|
|
@@ -257,35 +266,35 @@ const Oe = o.forwardRef(
|
|
|
257
266
|
/* @__PURE__ */ r(
|
|
258
267
|
ue.Input,
|
|
259
268
|
{
|
|
260
|
-
...
|
|
269
|
+
...E,
|
|
261
270
|
ref: g,
|
|
262
271
|
value: h,
|
|
263
272
|
disabled: N,
|
|
264
273
|
onValueChange: (e) => {
|
|
265
|
-
|
|
274
|
+
G(e), E?.onValueChange?.(e);
|
|
266
275
|
},
|
|
267
276
|
onBlur: (e) => {
|
|
268
|
-
ne ||
|
|
277
|
+
ne || M(!1), E?.onBlur?.(e);
|
|
269
278
|
},
|
|
270
279
|
onFocus: (e) => {
|
|
271
|
-
|
|
280
|
+
M(!0), E?.onFocus?.(e);
|
|
272
281
|
},
|
|
273
282
|
placeholder: U && t.length !== 0 ? "" : i,
|
|
274
|
-
className:
|
|
283
|
+
className: v(
|
|
275
284
|
"placeholder:text-d-muted-foreground flex-1 bg-transparent outline-none",
|
|
276
285
|
{
|
|
277
286
|
"w-full": U,
|
|
278
287
|
"px-3 py-2": t.length === 0,
|
|
279
288
|
"ml-1": t.length !== 0
|
|
280
289
|
},
|
|
281
|
-
|
|
290
|
+
E?.className
|
|
282
291
|
)
|
|
283
292
|
}
|
|
284
293
|
),
|
|
285
294
|
/* @__PURE__ */ r(
|
|
286
295
|
"div",
|
|
287
296
|
{
|
|
288
|
-
className:
|
|
297
|
+
className: v(
|
|
289
298
|
"border-d-input bg-d-accent cursor-pointer rounded-full p-1",
|
|
290
299
|
(ee || N || t.length < 1 || t.filter((e) => e.fixed).length === t.length) && "hidden"
|
|
291
300
|
),
|
|
@@ -294,7 +303,7 @@ const Oe = o.forwardRef(
|
|
|
294
303
|
},
|
|
295
304
|
"aria-label": "Clear selection",
|
|
296
305
|
children: /* @__PURE__ */ r(
|
|
297
|
-
|
|
306
|
+
pe,
|
|
298
307
|
{
|
|
299
308
|
name: "X",
|
|
300
309
|
size: "xs",
|
|
@@ -307,13 +316,13 @@ const Oe = o.forwardRef(
|
|
|
307
316
|
}
|
|
308
317
|
) }),
|
|
309
318
|
/* @__PURE__ */ r(
|
|
310
|
-
|
|
319
|
+
xe,
|
|
311
320
|
{
|
|
312
321
|
className: "border-none p-0 shadow-sm",
|
|
313
322
|
style: { width: re },
|
|
314
323
|
onWheel: (e) => e.stopPropagation(),
|
|
315
324
|
children: /* @__PURE__ */ r(q, { shouldFilter: !1, className: "w-full", children: /* @__PURE__ */ r(
|
|
316
|
-
|
|
325
|
+
ge,
|
|
317
326
|
{
|
|
318
327
|
className: "bg-d-popover text-d-popover-foreground animate-in border-d-border w-full rounded-md border shadow-md outline-none",
|
|
319
328
|
onMouseLeave: () => {
|
|
@@ -325,33 +334,33 @@ const Oe = o.forwardRef(
|
|
|
325
334
|
onMouseUp: () => {
|
|
326
335
|
g?.current?.focus();
|
|
327
336
|
},
|
|
328
|
-
children: H ? /* @__PURE__ */ r(
|
|
337
|
+
children: H ? /* @__PURE__ */ r(X, { children: Y }) : /* @__PURE__ */ L(X, { children: [
|
|
329
338
|
ie(),
|
|
330
339
|
le(),
|
|
331
340
|
!P && /* @__PURE__ */ r(I, { value: "-", className: "hidden" }),
|
|
332
341
|
Object.entries(de).map(([e, n]) => /* @__PURE__ */ r(
|
|
333
|
-
|
|
342
|
+
he,
|
|
334
343
|
{
|
|
335
344
|
heading: e,
|
|
336
345
|
className: "h-full overflow-auto",
|
|
337
|
-
children: /* @__PURE__ */ r(
|
|
346
|
+
children: /* @__PURE__ */ r(X, { children: n.map((d) => /* @__PURE__ */ r(
|
|
338
347
|
I,
|
|
339
348
|
{
|
|
340
349
|
value: d.label,
|
|
341
350
|
disabled: d.disable,
|
|
342
|
-
onMouseDown: (
|
|
343
|
-
|
|
351
|
+
onMouseDown: (O) => {
|
|
352
|
+
O.preventDefault(), O.stopPropagation();
|
|
344
353
|
},
|
|
345
354
|
onSelect: () => {
|
|
346
355
|
if (t.length >= _) {
|
|
347
356
|
A?.(t.length);
|
|
348
357
|
return;
|
|
349
358
|
}
|
|
350
|
-
|
|
351
|
-
const
|
|
352
|
-
y(
|
|
359
|
+
G("");
|
|
360
|
+
const O = [...t, d];
|
|
361
|
+
y(O), l?.(O);
|
|
353
362
|
},
|
|
354
|
-
className:
|
|
363
|
+
className: v(
|
|
355
364
|
"cursor-pointer",
|
|
356
365
|
d.disable && "text-d-secondary-foreground cursor-default"
|
|
357
366
|
),
|
|
@@ -373,8 +382,8 @@ const Oe = o.forwardRef(
|
|
|
373
382
|
] });
|
|
374
383
|
}
|
|
375
384
|
);
|
|
376
|
-
|
|
385
|
+
Ee.displayName = "MultipleSelector";
|
|
377
386
|
export {
|
|
378
|
-
|
|
387
|
+
Ee as MultipleSelector,
|
|
379
388
|
ye as useDebounce
|
|
380
389
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { Button as v } from "./button.js";
|
|
4
|
-
import { Icon as s } from "./icon.js";
|
|
5
|
-
import { useState as l, useRef as W, useMemo as N, useEffect as d } from "react";
|
|
6
3
|
import "react-pdf/dist/Page/AnnotationLayer.css";
|
|
7
4
|
import "react-pdf/dist/Page/TextLayer.css";
|
|
5
|
+
import { useState as l, useRef as W, useMemo as v, useEffect as d } from "react";
|
|
6
|
+
import { Button as N } from "./button.js";
|
|
7
|
+
import { Icon as s } from "./icon.js";
|
|
8
8
|
function R({
|
|
9
9
|
url: m,
|
|
10
10
|
initialPage: g = 1,
|
|
11
11
|
className: u = ""
|
|
12
12
|
}) {
|
|
13
|
-
const [o, j] = l(null), [a, P] = l(), [t, f] = l(g), [p, h] = l(null), n = W(null), [b, x] = l(950), E =
|
|
13
|
+
const [o, j] = l(null), [a, P] = l(), [t, f] = l(g), [p, h] = l(null), n = W(null), [b, x] = l(950), E = v(() => ({ url: m }), [m]), w = v(() => o ? {
|
|
14
14
|
cMapUrl: `https://unpkg.com/pdfjs-dist@${o.pdfjs.version}/cmaps/`,
|
|
15
15
|
cMapPacked: !0
|
|
16
16
|
} : null, [o]);
|
|
@@ -50,7 +50,19 @@ function R({
|
|
|
50
50
|
/* @__PURE__ */ e("p", { className: "text-d-muted-foreground text-sm", children: p })
|
|
51
51
|
] });
|
|
52
52
|
if (!o || !w)
|
|
53
|
-
return /* @__PURE__ */ e(
|
|
53
|
+
return /* @__PURE__ */ e(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
className: `flex min-h-[600px] w-full flex-col items-center ${u}`,
|
|
57
|
+
children: /* @__PURE__ */ e("div", { className: "flex min-h-[600px] w-full items-center justify-center", children: /* @__PURE__ */ e(
|
|
58
|
+
s,
|
|
59
|
+
{
|
|
60
|
+
name: "Loader2",
|
|
61
|
+
className: "text-d-primary h-8 w-8 animate-spin"
|
|
62
|
+
}
|
|
63
|
+
) })
|
|
64
|
+
}
|
|
65
|
+
);
|
|
54
66
|
const { Document: C, Page: k } = o;
|
|
55
67
|
return /* @__PURE__ */ c(
|
|
56
68
|
"div",
|
|
@@ -88,7 +100,7 @@ function R({
|
|
|
88
100
|
),
|
|
89
101
|
/* @__PURE__ */ c("div", { className: "my-8 flex h-full w-full items-center justify-center gap-4", children: [
|
|
90
102
|
/* @__PURE__ */ e(
|
|
91
|
-
|
|
103
|
+
N,
|
|
92
104
|
{
|
|
93
105
|
onClick: () => f(Math.max(1, t - 1)),
|
|
94
106
|
disabled: t <= 1,
|
|
@@ -103,7 +115,7 @@ function R({
|
|
|
103
115
|
a
|
|
104
116
|
] }),
|
|
105
117
|
/* @__PURE__ */ e(
|
|
106
|
-
|
|
118
|
+
N,
|
|
107
119
|
{
|
|
108
120
|
onClick: () => f(Math.min(a || 1, t + 1)),
|
|
109
121
|
disabled: t >= (a || 1),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
3
|
-
import * as d from "react";
|
|
4
3
|
import { Root as v } from "../../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
5
4
|
import { cva as k } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
|
+
import * as d from "react";
|
|
6
6
|
import { Button as I } from "./button.js";
|
|
7
7
|
import { Input as z } from "./input.js";
|
|
8
8
|
import { Separator as B } from "./separator.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as u, jsx as l, Fragment as k } from "react/jsx-runtime";
|
|
3
|
-
import { cn as c } from "../../lib/utils.js";
|
|
4
3
|
import { Root as y, Track as F, Range as M, Thumb as b } from "../../node_modules/@radix-ui/react-slider/dist/index.js";
|
|
5
4
|
import { cva as w } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
6
5
|
import * as P from "react";
|
|
6
|
+
import { cn as c } from "../../lib/utils.js";
|
|
7
7
|
import { Badge as x } from "./badge.js";
|
|
8
8
|
const S = w(
|
|
9
9
|
"relative w-full grow overflow-hidden rounded-full bg-d-primary/20",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { cva as i } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
4
|
+
import { cn as c } from "../../lib/utils.js";
|
|
5
5
|
const l = {
|
|
6
6
|
xxs: 12,
|
|
7
7
|
xs: 14,
|
|
@@ -10,7 +10,7 @@ const l = {
|
|
|
10
10
|
lg: 24,
|
|
11
11
|
xl: 28,
|
|
12
12
|
xxl: 36
|
|
13
|
-
}, d =
|
|
13
|
+
}, d = i("animate-spin", {
|
|
14
14
|
variants: {
|
|
15
15
|
variant: {
|
|
16
16
|
default: "text-d-foreground",
|
|
@@ -31,7 +31,7 @@ function u({
|
|
|
31
31
|
"svg",
|
|
32
32
|
{
|
|
33
33
|
"data-slot": "spinner",
|
|
34
|
-
className:
|
|
34
|
+
className: c(d({ variant: s, className: n })),
|
|
35
35
|
xmlns: "http://www.w3.org/2000/svg",
|
|
36
36
|
fill: "none",
|
|
37
37
|
viewBox: "0 0 24 24",
|