laif-ds 0.2.79 → 0.2.83
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 +28 -0
- package/dist/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +5 -5
- package/dist/_virtual/index5.js +4 -4
- package/dist/agent-docs/adoption-report.json +9 -9
- package/dist/agent-docs/components/AppSelect.md +46 -0
- package/dist/agent-docs/components/Chat.md +1 -0
- package/dist/agent-docs/components/FileUploader.md +8 -3
- package/dist/agent-docs/manifest.json +11 -9
- package/dist/components/ui/app-select.js +232 -143
- package/dist/components/ui/chat.js +35 -33
- package/dist/components/ui/date-picker.js +184 -153
- package/dist/components/ui/file-previewer.js +66 -61
- package/dist/components/ui/file-uploader.js +116 -112
- package/dist/index.d.ts +5 -1
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as b, Fragment as y, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as A, useRef as
|
|
3
|
+
import { forwardRef as A, useRef as O, useCallback as k, useState as q } from "react";
|
|
4
4
|
import { Button as v } from "./button.js";
|
|
5
5
|
import { CopyButton as S } from "./copy-button.js";
|
|
6
|
-
import { MessageInput as
|
|
7
|
-
import { MessageList as
|
|
8
|
-
import { PromptSuggestions as
|
|
9
|
-
import { useAutoScroll as
|
|
10
|
-
import { cn as
|
|
6
|
+
import { MessageInput as H } from "./message-input.js";
|
|
7
|
+
import { MessageList as J } from "./message-list.js";
|
|
8
|
+
import { PromptSuggestions as K } from "./prompt-suggestions.js";
|
|
9
|
+
import { useAutoScroll as Q } from "../../hooks/use-auto-scroll.js";
|
|
10
|
+
import { cn as V } from "../../lib/utils.js";
|
|
11
11
|
import { Typo as z } from "./typo.js";
|
|
12
12
|
import j from "../../node_modules/lucide-react/dist/esm/icons/save.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
function
|
|
13
|
+
import W from "../../node_modules/lucide-react/dist/esm/icons/thumbs-up.js";
|
|
14
|
+
import X from "../../node_modules/lucide-react/dist/esm/icons/thumbs-down.js";
|
|
15
|
+
import Y from "../../node_modules/lucide-react/dist/esm/icons/arrow-down.js";
|
|
16
|
+
function Z({
|
|
17
17
|
messages: o,
|
|
18
18
|
welcomeTitle: n = "Da dove iniziamo?",
|
|
19
19
|
handleSubmit: i,
|
|
@@ -29,11 +29,12 @@ function Y({
|
|
|
29
29
|
transcribeAudio: D,
|
|
30
30
|
allowAttachments: L = !1,
|
|
31
31
|
onEdit: B,
|
|
32
|
-
onMessageSave: d
|
|
32
|
+
onMessageSave: d,
|
|
33
|
+
placeholder: P
|
|
33
34
|
}) {
|
|
34
|
-
const
|
|
35
|
+
const U = o.at(-1), T = o.length === 0, I = U?.role === "user", C = O(o);
|
|
35
36
|
C.current = o;
|
|
36
|
-
const
|
|
37
|
+
const E = k(() => {
|
|
37
38
|
if (s?.(), !x) return;
|
|
38
39
|
const e = [...C.current], l = e.findLast(
|
|
39
40
|
(a) => a.role === "assistant"
|
|
@@ -81,7 +82,7 @@ function Y({
|
|
|
81
82
|
);
|
|
82
83
|
a !== -1 && (e[a] = p, x(e));
|
|
83
84
|
}
|
|
84
|
-
}, [s, x, C]),
|
|
85
|
+
}, [s, x, C]), M = k(
|
|
85
86
|
(e) => ({
|
|
86
87
|
actions: N ? /* @__PURE__ */ b(y, { children: [
|
|
87
88
|
/* @__PURE__ */ t("div", { className: "border-d-border border-r pr-1", children: /* @__PURE__ */ t(
|
|
@@ -109,7 +110,7 @@ function Y({
|
|
|
109
110
|
variant: "ghost",
|
|
110
111
|
className: "h-6 w-6",
|
|
111
112
|
onClick: () => N(e.id, "thumbs-up"),
|
|
112
|
-
children: /* @__PURE__ */ t(
|
|
113
|
+
children: /* @__PURE__ */ t(W, { className: "h-4 w-4" })
|
|
113
114
|
}
|
|
114
115
|
),
|
|
115
116
|
/* @__PURE__ */ t(
|
|
@@ -119,7 +120,7 @@ function Y({
|
|
|
119
120
|
variant: "ghost",
|
|
120
121
|
className: "h-6 w-6",
|
|
121
122
|
onClick: () => N(e.id, "thumbs-down"),
|
|
122
|
-
children: /* @__PURE__ */ t(
|
|
123
|
+
children: /* @__PURE__ */ t(X, { className: "h-4 w-4" })
|
|
123
124
|
}
|
|
124
125
|
)
|
|
125
126
|
] }) : /* @__PURE__ */ b(y, { children: [
|
|
@@ -150,7 +151,7 @@ function Y({
|
|
|
150
151
|
T && /* @__PURE__ */ t("div", { className: "flex flex-1 flex-col items-center justify-center p-8", children: m && u && /* @__PURE__ */ b(y, { children: [
|
|
151
152
|
/* @__PURE__ */ t(z, { variant: "h3", className: "mb-8 text-center", children: n }),
|
|
152
153
|
/* @__PURE__ */ t(
|
|
153
|
-
|
|
154
|
+
K,
|
|
154
155
|
{
|
|
155
156
|
label: "",
|
|
156
157
|
append: m,
|
|
@@ -158,12 +159,12 @@ function Y({
|
|
|
158
159
|
}
|
|
159
160
|
)
|
|
160
161
|
] }) }),
|
|
161
|
-
o.length > 0 ? /* @__PURE__ */ t(
|
|
162
|
-
|
|
162
|
+
o.length > 0 ? /* @__PURE__ */ t($, { children: /* @__PURE__ */ t(
|
|
163
|
+
J,
|
|
163
164
|
{
|
|
164
165
|
messages: o,
|
|
165
166
|
isTyping: I,
|
|
166
|
-
messageOptions:
|
|
167
|
+
messageOptions: M,
|
|
167
168
|
onEdit: B,
|
|
168
169
|
onMessageSave: d
|
|
169
170
|
}
|
|
@@ -176,31 +177,32 @@ function Y({
|
|
|
176
177
|
isPending: w || I,
|
|
177
178
|
handleSubmit: i,
|
|
178
179
|
children: ({ files: e, setFiles: l }) => /* @__PURE__ */ t(
|
|
179
|
-
|
|
180
|
+
H,
|
|
180
181
|
{
|
|
181
182
|
value: f,
|
|
182
183
|
onChange: c,
|
|
183
184
|
allowAttachments: L,
|
|
184
185
|
files: e,
|
|
185
186
|
setFiles: l,
|
|
186
|
-
stop:
|
|
187
|
+
stop: E,
|
|
187
188
|
isGenerating: w,
|
|
188
|
-
transcribeAudio: D
|
|
189
|
+
transcribeAudio: D,
|
|
190
|
+
placeholder: P
|
|
189
191
|
}
|
|
190
192
|
)
|
|
191
193
|
}
|
|
192
194
|
)
|
|
193
195
|
] });
|
|
194
196
|
}
|
|
195
|
-
|
|
196
|
-
function
|
|
197
|
+
Z.displayName = "Chat";
|
|
198
|
+
function $({ children: o }) {
|
|
197
199
|
const {
|
|
198
200
|
containerRef: n,
|
|
199
201
|
scrollToBottom: i,
|
|
200
202
|
handleScroll: f,
|
|
201
203
|
shouldAutoScroll: c,
|
|
202
204
|
handleTouchStart: s
|
|
203
|
-
} =
|
|
205
|
+
} = Q();
|
|
204
206
|
return /* @__PURE__ */ b(
|
|
205
207
|
"div",
|
|
206
208
|
{
|
|
@@ -217,7 +219,7 @@ function Z({ children: o }) {
|
|
|
217
219
|
className: "animate-in fade-in-0 slide-in-from-bottom-1 pointer-events-auto h-8 w-8 rounded-full ease-in-out",
|
|
218
220
|
size: "icon",
|
|
219
221
|
variant: "ghost",
|
|
220
|
-
children: /* @__PURE__ */ t(
|
|
222
|
+
children: /* @__PURE__ */ t(Y, { className: "h-4 w-4" })
|
|
221
223
|
}
|
|
222
224
|
) }) })
|
|
223
225
|
]
|
|
@@ -228,26 +230,26 @@ const F = A(({ className: o, ...n }, i) => /* @__PURE__ */ t(
|
|
|
228
230
|
"div",
|
|
229
231
|
{
|
|
230
232
|
ref: i,
|
|
231
|
-
className:
|
|
233
|
+
className: V("flex h-full max-h-full w-full flex-col", o),
|
|
232
234
|
...n
|
|
233
235
|
}
|
|
234
236
|
));
|
|
235
237
|
F.displayName = "ChatContainer";
|
|
236
238
|
const _ = A(
|
|
237
239
|
({ children: o, handleSubmit: n, className: i }, f) => {
|
|
238
|
-
const [c, s] =
|
|
240
|
+
const [c, s] = q(null);
|
|
239
241
|
return /* @__PURE__ */ t("form", { ref: f, onSubmit: (m) => {
|
|
240
242
|
if (!c) {
|
|
241
243
|
n(m);
|
|
242
244
|
return;
|
|
243
245
|
}
|
|
244
|
-
const u =
|
|
246
|
+
const u = G(c);
|
|
245
247
|
n(m, { experimental_attachments: u }), s(null);
|
|
246
248
|
}, className: i, children: o({ files: c, setFiles: s }) });
|
|
247
249
|
}
|
|
248
250
|
);
|
|
249
251
|
_.displayName = "ChatForm";
|
|
250
|
-
function
|
|
252
|
+
function G(o) {
|
|
251
253
|
if (typeof window > "u")
|
|
252
254
|
return {};
|
|
253
255
|
const n = new DataTransfer();
|
|
@@ -256,8 +258,8 @@ function $(o) {
|
|
|
256
258
|
return n.files;
|
|
257
259
|
}
|
|
258
260
|
export {
|
|
259
|
-
|
|
261
|
+
Z as Chat,
|
|
260
262
|
F as ChatContainer,
|
|
261
263
|
_ as ChatForm,
|
|
262
|
-
|
|
264
|
+
$ as ChatMessages
|
|
263
265
|
};
|
|
@@ -1,127 +1,143 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { designTokens as
|
|
6
|
-
import { Calendar as
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { Label as
|
|
9
|
-
import { Popover as
|
|
10
|
-
import { cn as
|
|
11
|
-
import { TimePickerColumn as
|
|
12
|
-
import { it as
|
|
13
|
-
import { formatDate as
|
|
14
|
-
import { isSameDay as
|
|
15
|
-
const
|
|
16
|
-
if (!Number.isFinite(
|
|
17
|
-
const
|
|
18
|
-
return Math.min(59, Math.max(1,
|
|
2
|
+
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import * as c from "react";
|
|
4
|
+
import { useCallback as X, useMemo as H, useEffect as G } from "react";
|
|
5
|
+
import { designTokens as l } from "../design-tokens.js";
|
|
6
|
+
import { Calendar as J, CalendarDayButton as Ce } from "./calendar.js";
|
|
7
|
+
import { Icon as K } from "./icon.js";
|
|
8
|
+
import { Label as xe } from "./label.js";
|
|
9
|
+
import { Popover as be, PopoverTrigger as De, PopoverContent as Me } from "./popover.js";
|
|
10
|
+
import { cn as Q } from "../../lib/utils.js";
|
|
11
|
+
import { TimePickerColumn as R } from "./app-time-picker.js";
|
|
12
|
+
import { it as Se } from "../../node_modules/date-fns/locale/it.js";
|
|
13
|
+
import { formatDate as z } from "../../node_modules/date-fns/format.js";
|
|
14
|
+
import { isSameDay as O } from "../../node_modules/date-fns/isSameDay.js";
|
|
15
|
+
const W = (o) => {
|
|
16
|
+
if (!Number.isFinite(o)) return 1;
|
|
17
|
+
const M = Math.trunc(o);
|
|
18
|
+
return Math.min(59, Math.max(1, M));
|
|
19
19
|
};
|
|
20
|
-
function
|
|
20
|
+
function Te(o) {
|
|
21
21
|
const {
|
|
22
|
-
placeholder:
|
|
23
|
-
dateFormat:
|
|
24
|
-
className:
|
|
22
|
+
placeholder: M = "Seleziona data",
|
|
23
|
+
dateFormat: Y,
|
|
24
|
+
className: Z,
|
|
25
25
|
disabled: d = !1,
|
|
26
|
-
size:
|
|
27
|
-
firstDate:
|
|
28
|
-
lastDate:
|
|
29
|
-
availableDates:
|
|
30
|
-
locale: u =
|
|
31
|
-
initialCalendarMonth:
|
|
32
|
-
customCalendarProps:
|
|
33
|
-
label:
|
|
34
|
-
labelClassName:
|
|
35
|
-
wrpClassName:
|
|
36
|
-
id:
|
|
37
|
-
"data-testid":
|
|
38
|
-
minDate:
|
|
39
|
-
maxDate:
|
|
40
|
-
numberOfMonths:
|
|
41
|
-
clearable:
|
|
42
|
-
onClear:
|
|
43
|
-
} =
|
|
44
|
-
|
|
45
|
-
), [
|
|
46
|
-
|
|
47
|
-
), [
|
|
48
|
-
|
|
49
|
-
), [
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
),
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
}, [
|
|
59
|
-
() => Array.from({ length: 24 }, (e,
|
|
26
|
+
size: v = "default",
|
|
27
|
+
firstDate: E,
|
|
28
|
+
lastDate: F,
|
|
29
|
+
availableDates: I,
|
|
30
|
+
locale: u = Se,
|
|
31
|
+
initialCalendarMonth: w,
|
|
32
|
+
customCalendarProps: S,
|
|
33
|
+
label: T,
|
|
34
|
+
labelClassName: $,
|
|
35
|
+
wrpClassName: ee,
|
|
36
|
+
id: te,
|
|
37
|
+
"data-testid": ne,
|
|
38
|
+
minDate: A,
|
|
39
|
+
maxDate: _,
|
|
40
|
+
numberOfMonths: oe,
|
|
41
|
+
clearable: ae = !1,
|
|
42
|
+
onClear: j
|
|
43
|
+
} = o, a = o.mode === "range", C = !a && o.showTime === !0, N = !a && o.withSeconds === !0, p = a ? 1 : W(o.minuteStep), k = a ? 1 : W(o.secondStep), P = Y ?? (C ? N ? "dd/MM/yyyy HH:mm:ss" : "dd/MM/yyyy HH:mm" : "dd/MM/yyyy"), [i, x] = c.useState(
|
|
44
|
+
a ? void 0 : o.value
|
|
45
|
+
), [n, b] = c.useState(
|
|
46
|
+
a ? o.value : void 0
|
|
47
|
+
), [L, D] = c.useState(
|
|
48
|
+
w
|
|
49
|
+
), [B, V] = c.useState(!1), re = (e) => {
|
|
50
|
+
const t = e ? new Date(e) : void 0;
|
|
51
|
+
C && t && i && t.setHours(
|
|
52
|
+
i.getHours(),
|
|
53
|
+
i.getMinutes(),
|
|
54
|
+
i.getSeconds()
|
|
55
|
+
), x(t), t && D(t), !a && o.onChange && o.onChange(t), !C && t && V(!1);
|
|
56
|
+
}, ie = X(() => {
|
|
57
|
+
a ? (b(void 0), o.onChange && o.onChange(void 0)) : (x(void 0), o.onChange && o.onChange(void 0)), j?.();
|
|
58
|
+
}, [a, o.onChange, j]), se = i?.getHours(), le = i?.getMinutes(), fe = i?.getSeconds(), de = H(
|
|
59
|
+
() => Array.from({ length: 24 }, (e, t) => t),
|
|
60
60
|
[]
|
|
61
|
-
),
|
|
61
|
+
), me = H(
|
|
62
62
|
() => Array.from(
|
|
63
|
-
{ length: Math.floor(59 /
|
|
64
|
-
(e,
|
|
63
|
+
{ length: Math.floor(59 / p) + 1 },
|
|
64
|
+
(e, t) => t * p
|
|
65
65
|
),
|
|
66
|
-
[
|
|
67
|
-
),
|
|
66
|
+
[p]
|
|
67
|
+
), ce = H(
|
|
68
68
|
() => Array.from(
|
|
69
|
-
{ length: Math.floor(59 /
|
|
70
|
-
(e,
|
|
69
|
+
{ length: Math.floor(59 / k) + 1 },
|
|
70
|
+
(e, t) => t * k
|
|
71
71
|
),
|
|
72
|
-
[
|
|
73
|
-
),
|
|
74
|
-
(e,
|
|
75
|
-
const
|
|
76
|
-
|
|
72
|
+
[k]
|
|
73
|
+
), y = X(
|
|
74
|
+
(e, t) => {
|
|
75
|
+
const s = i ? new Date(i) : /* @__PURE__ */ new Date();
|
|
76
|
+
i || s.setHours(0, 0, 0, 0), e === "hour" ? s.setHours(t) : e === "minute" ? s.setMinutes(t) : e === "second" && s.setSeconds(t), x(s), !a && o.onChange && o.onChange(s);
|
|
77
77
|
},
|
|
78
|
-
[
|
|
79
|
-
),
|
|
80
|
-
|
|
78
|
+
[i, a, o.onChange]
|
|
79
|
+
), ue = (e, t) => {
|
|
80
|
+
let s;
|
|
81
|
+
!n || !n.from ? s = { from: t, to: void 0 } : n.from && !n.to ? t < n.from ? s = { from: t, to: void 0 } : s = { from: n.from, to: t } : n.from && n.to && (s = { from: t, to: void 0 }), b(s), s?.from && D(s.from), a && o.onChange && o.onChange(s);
|
|
81
82
|
};
|
|
82
|
-
let
|
|
83
|
-
|
|
84
|
-
(e) => !
|
|
85
|
-
(
|
|
83
|
+
let m = [];
|
|
84
|
+
E && m.push({ before: E }), F && m.push({ after: F }), I?.length && m.push(
|
|
85
|
+
(e) => !I.some(
|
|
86
|
+
(t) => O(t, e)
|
|
86
87
|
)
|
|
87
|
-
), d && (
|
|
88
|
-
if (
|
|
89
|
-
|
|
90
|
-
const e =
|
|
91
|
-
|
|
88
|
+
), d && (m = [!0]), G(() => {
|
|
89
|
+
if (a) {
|
|
90
|
+
b(o.value);
|
|
91
|
+
const e = o.value?.from;
|
|
92
|
+
D(e ?? w);
|
|
92
93
|
} else
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
x(o.value), D(
|
|
95
|
+
o.value ?? w
|
|
95
96
|
);
|
|
96
|
-
}, [
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
97
|
+
}, [o.value, a, w]);
|
|
98
|
+
const [h, g] = c.useState(
|
|
99
|
+
null
|
|
100
|
+
);
|
|
101
|
+
G(() => {
|
|
102
|
+
const e = () => {
|
|
103
|
+
h && (g(null), a && o.onChange && o.onChange(n));
|
|
104
|
+
};
|
|
105
|
+
return window.addEventListener("pointerup", e), () => window.removeEventListener("pointerup", e);
|
|
106
|
+
}, [h, a, o.onChange, n]);
|
|
107
|
+
const he = (e, t) => {
|
|
108
|
+
!a || !n || !n.from || !n.to || (O(e, n.from) ? (g("from"), t.preventDefault()) : O(e, n.to) && (g("to"), t.preventDefault()));
|
|
109
|
+
}, ge = (e) => {
|
|
110
|
+
if (!h || !n || !n.from || !n.to) return;
|
|
111
|
+
let t = { ...n };
|
|
112
|
+
h === "from" ? e <= n.to ? t.from = e : (t.from = n.to, t.to = e, g("to")) : h === "to" && (e >= n.from ? t.to = e : (t.to = n.from, t.from = e, g("from"))), b(t);
|
|
113
|
+
}, ve = c.useId(), q = te ?? ve, U = a ? !!n?.from : !!i, we = () => a && n ? /* @__PURE__ */ f("span", { children: [
|
|
114
|
+
n.from && z(n.from, P, { locale: u }),
|
|
115
|
+
n.from && n.to && " - ",
|
|
116
|
+
n.to && z(n.to, P, { locale: u })
|
|
117
|
+
] }) : !a && i ? /* @__PURE__ */ r("span", { children: z(i, P, { locale: u }) }) : /* @__PURE__ */ r("span", { className: "text-d-muted-foreground", children: M });
|
|
118
|
+
return /* @__PURE__ */ f("div", { className: Q("flex flex-col gap-1.5", ee), children: [
|
|
119
|
+
T && /* @__PURE__ */ r(xe, { htmlFor: q, className: $, children: T }),
|
|
120
|
+
/* @__PURE__ */ f(be, { open: d ? !1 : B, onOpenChange: V, modal: !0, children: [
|
|
121
|
+
/* @__PURE__ */ r(De, { asChild: !0, children: /* @__PURE__ */ f(
|
|
106
122
|
"div",
|
|
107
123
|
{
|
|
108
124
|
id: q,
|
|
109
|
-
"data-testid":
|
|
110
|
-
className:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
125
|
+
"data-testid": ne,
|
|
126
|
+
className: Q(
|
|
127
|
+
l.input.base,
|
|
128
|
+
l.radius.default,
|
|
129
|
+
l.text.base,
|
|
130
|
+
l.interaction.disabled,
|
|
115
131
|
"flex items-center gap-2 font-normal whitespace-nowrap [&>span]:line-clamp-1",
|
|
116
|
-
|
|
117
|
-
|
|
132
|
+
l.focusRing,
|
|
133
|
+
B && l.activeRing,
|
|
118
134
|
"hover:border-d-ring cursor-pointer transition-colors",
|
|
119
|
-
!
|
|
135
|
+
!U && "text-d-muted-foreground",
|
|
120
136
|
d && "cursor-not-allowed opacity-50",
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
137
|
+
v === "default" && l.sizes.default,
|
|
138
|
+
v === "sm" && l.sizes.sm,
|
|
139
|
+
v === "lg" && l.sizes.lg,
|
|
140
|
+
Z
|
|
125
141
|
),
|
|
126
142
|
"aria-disabled": d,
|
|
127
143
|
role: "button",
|
|
@@ -129,20 +145,20 @@ function Oe(t) {
|
|
|
129
145
|
onClick: d ? void 0 : () => {
|
|
130
146
|
},
|
|
131
147
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
|
|
148
|
+
/* @__PURE__ */ r(K, { name: "Calendar", size: v === "lg" ? "sm" : "xs" }),
|
|
149
|
+
/* @__PURE__ */ r("div", { className: "min-w-0 flex-1", children: we() }),
|
|
150
|
+
ae && U && /* @__PURE__ */ r(
|
|
135
151
|
"div",
|
|
136
152
|
{
|
|
137
153
|
role: "button",
|
|
138
154
|
className: "bg-d-accent hover:bg-d-accent/80 border-d-border flex shrink-0 cursor-pointer items-center justify-center rounded-full border p-1 transition-colors",
|
|
139
155
|
onClick: (e) => {
|
|
140
|
-
e.stopPropagation(), e.preventDefault(),
|
|
156
|
+
e.stopPropagation(), e.preventDefault(), ie();
|
|
141
157
|
},
|
|
142
158
|
onMouseDown: (e) => e.preventDefault(),
|
|
143
159
|
"aria-label": "Clear selection",
|
|
144
|
-
children: /* @__PURE__ */
|
|
145
|
-
|
|
160
|
+
children: /* @__PURE__ */ r(
|
|
161
|
+
K,
|
|
146
162
|
{
|
|
147
163
|
name: "X",
|
|
148
164
|
size: "xs",
|
|
@@ -155,83 +171,98 @@ function Oe(t) {
|
|
|
155
171
|
}
|
|
156
172
|
) }),
|
|
157
173
|
" ",
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
|
|
174
|
+
/* @__PURE__ */ f(
|
|
175
|
+
Me,
|
|
160
176
|
{
|
|
161
177
|
className: "flex max-h-[500px] min-h-0 w-auto flex-row p-0 shadow",
|
|
162
178
|
align: "start",
|
|
163
179
|
children: [
|
|
164
|
-
|
|
165
|
-
|
|
180
|
+
a ? /* @__PURE__ */ r(
|
|
181
|
+
J,
|
|
166
182
|
{
|
|
167
|
-
...
|
|
183
|
+
...S || {},
|
|
168
184
|
mode: "range",
|
|
169
|
-
selected:
|
|
170
|
-
onSelect:
|
|
185
|
+
selected: n,
|
|
186
|
+
onSelect: ue,
|
|
171
187
|
autoFocus: !0,
|
|
172
|
-
disabled:
|
|
188
|
+
disabled: m,
|
|
173
189
|
locale: u,
|
|
174
|
-
defaultMonth:
|
|
175
|
-
numberOfMonths:
|
|
176
|
-
minDate:
|
|
177
|
-
maxDate:
|
|
190
|
+
defaultMonth: L,
|
|
191
|
+
numberOfMonths: oe ?? 1,
|
|
192
|
+
minDate: A,
|
|
193
|
+
maxDate: _,
|
|
194
|
+
components: {
|
|
195
|
+
...S?.components,
|
|
196
|
+
DayButton: (e) => /* @__PURE__ */ r(
|
|
197
|
+
Ce,
|
|
198
|
+
{
|
|
199
|
+
...e,
|
|
200
|
+
onPointerDown: (t) => {
|
|
201
|
+
e.onPointerDown && e.onPointerDown(t), he(e.day.date, t);
|
|
202
|
+
},
|
|
203
|
+
onPointerEnter: (t) => {
|
|
204
|
+
e.onPointerEnter && e.onPointerEnter(t), ge(e.day.date);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
)
|
|
208
|
+
}
|
|
178
209
|
}
|
|
179
|
-
) : /* @__PURE__ */
|
|
180
|
-
|
|
210
|
+
) : /* @__PURE__ */ r(
|
|
211
|
+
J,
|
|
181
212
|
{
|
|
182
|
-
...
|
|
213
|
+
...S || {},
|
|
183
214
|
mode: "single",
|
|
184
|
-
selected:
|
|
185
|
-
onSelect:
|
|
215
|
+
selected: i,
|
|
216
|
+
onSelect: re,
|
|
186
217
|
autoFocus: !0,
|
|
187
|
-
disabled:
|
|
218
|
+
disabled: m,
|
|
188
219
|
locale: u,
|
|
189
|
-
defaultMonth:
|
|
190
|
-
minDate:
|
|
191
|
-
maxDate:
|
|
220
|
+
defaultMonth: L,
|
|
221
|
+
minDate: A,
|
|
222
|
+
maxDate: _
|
|
192
223
|
}
|
|
193
224
|
),
|
|
194
|
-
|
|
195
|
-
/* @__PURE__ */
|
|
225
|
+
C && /* @__PURE__ */ f("div", { className: "border-d-border/50 relative flex shrink-0 flex-row overflow-hidden border-l", children: [
|
|
226
|
+
/* @__PURE__ */ f(
|
|
196
227
|
"div",
|
|
197
228
|
{
|
|
198
229
|
className: "invisible flex h-0 flex-row overflow-hidden opacity-0 select-none",
|
|
199
230
|
"aria-hidden": "true",
|
|
200
231
|
children: [
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
-
|
|
232
|
+
/* @__PURE__ */ r("div", { className: "w-12 shrink-0 sm:w-14" }),
|
|
233
|
+
/* @__PURE__ */ r("div", { className: "w-12 shrink-0 sm:w-14" }),
|
|
234
|
+
N && /* @__PURE__ */ r("div", { className: "w-12 shrink-0 sm:w-14" })
|
|
204
235
|
]
|
|
205
236
|
}
|
|
206
237
|
),
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
|
|
238
|
+
/* @__PURE__ */ f("div", { className: "absolute inset-0 flex h-full w-full flex-row overflow-y-auto", children: [
|
|
239
|
+
/* @__PURE__ */ r(
|
|
240
|
+
R,
|
|
210
241
|
{
|
|
211
242
|
type: "hour",
|
|
212
|
-
value:
|
|
213
|
-
options:
|
|
214
|
-
onChange: (e) =>
|
|
243
|
+
value: se,
|
|
244
|
+
options: de,
|
|
245
|
+
onChange: (e) => y("hour", e),
|
|
215
246
|
className: "flex flex-1"
|
|
216
247
|
}
|
|
217
248
|
),
|
|
218
|
-
/* @__PURE__ */
|
|
219
|
-
|
|
249
|
+
/* @__PURE__ */ r(
|
|
250
|
+
R,
|
|
220
251
|
{
|
|
221
252
|
type: "minute",
|
|
222
|
-
value:
|
|
223
|
-
options:
|
|
224
|
-
onChange: (e) =>
|
|
253
|
+
value: le,
|
|
254
|
+
options: me,
|
|
255
|
+
onChange: (e) => y("minute", e),
|
|
225
256
|
className: "flex flex-1"
|
|
226
257
|
}
|
|
227
258
|
),
|
|
228
|
-
|
|
229
|
-
|
|
259
|
+
N && /* @__PURE__ */ r(
|
|
260
|
+
R,
|
|
230
261
|
{
|
|
231
262
|
type: "second",
|
|
232
|
-
value:
|
|
233
|
-
options:
|
|
234
|
-
onChange: (e) =>
|
|
263
|
+
value: fe,
|
|
264
|
+
options: ce,
|
|
265
|
+
onChange: (e) => y("second", e),
|
|
235
266
|
className: "flex flex-1"
|
|
236
267
|
}
|
|
237
268
|
)
|
|
@@ -244,5 +275,5 @@ function Oe(t) {
|
|
|
244
275
|
] });
|
|
245
276
|
}
|
|
246
277
|
export {
|
|
247
|
-
|
|
278
|
+
Te as DatePicker
|
|
248
279
|
};
|