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.
@@ -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 M, useCallback as k, useState as O } from "react";
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 q } from "./message-input.js";
7
- import { MessageList as H } from "./message-list.js";
8
- import { PromptSuggestions as J } from "./prompt-suggestions.js";
9
- import { useAutoScroll as K } from "../../hooks/use-auto-scroll.js";
10
- import { cn as Q } from "../../lib/utils.js";
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 V from "../../node_modules/lucide-react/dist/esm/icons/thumbs-up.js";
14
- import W from "../../node_modules/lucide-react/dist/esm/icons/thumbs-down.js";
15
- import X from "../../node_modules/lucide-react/dist/esm/icons/arrow-down.js";
16
- function Y({
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 P = o.at(-1), T = o.length === 0, I = P?.role === "user", C = M(o);
35
+ const U = o.at(-1), T = o.length === 0, I = U?.role === "user", C = O(o);
35
36
  C.current = o;
36
- const U = k(() => {
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]), E = k(
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(V, { className: "h-4 w-4" })
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(W, { className: "h-4 w-4" })
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
- J,
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(Z, { children: /* @__PURE__ */ t(
162
- H,
162
+ o.length > 0 ? /* @__PURE__ */ t($, { children: /* @__PURE__ */ t(
163
+ J,
163
164
  {
164
165
  messages: o,
165
166
  isTyping: I,
166
- messageOptions: E,
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
- q,
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: U,
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
- Y.displayName = "Chat";
196
- function Z({ children: o }) {
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
- } = K();
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(X, { className: "h-4 w-4" })
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: Q("flex h-full max-h-full w-full flex-col", o),
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] = O(null);
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 = $(c);
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 $(o) {
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
- Y as Chat,
261
+ Z as Chat,
260
262
  F as ChatContainer,
261
263
  _ as ChatForm,
262
- Z as ChatMessages
264
+ $ as ChatMessages
263
265
  };
@@ -1,127 +1,143 @@
1
1
  "use client";
2
- import { jsxs as l, jsx as o } from "react/jsx-runtime";
3
- import * as f from "react";
4
- import { useCallback as L, useMemo as p, useEffect as ue } from "react";
5
- import { designTokens as r } from "../design-tokens.js";
6
- import { Calendar as X } from "./calendar.js";
7
- import { Icon as B } from "./icon.js";
8
- import { Label as fe } from "./label.js";
9
- import { Popover as he, PopoverTrigger as ge, PopoverContent as ve } from "./popover.js";
10
- import { cn as G } from "../../lib/utils.js";
11
- import { TimePickerColumn as k } from "./app-time-picker.js";
12
- import { it as be } from "../../node_modules/date-fns/locale/it.js";
13
- import { formatDate as H } from "../../node_modules/date-fns/format.js";
14
- import { isSameDay as Ce } from "../../node_modules/date-fns/isSameDay.js";
15
- const J = (t) => {
16
- if (!Number.isFinite(t)) return 1;
17
- const x = Math.trunc(t);
18
- return Math.min(59, Math.max(1, x));
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 Oe(t) {
20
+ function Te(o) {
21
21
  const {
22
- placeholder: x = "Seleziona data",
23
- dateFormat: K,
24
- className: Q,
22
+ placeholder: M = "Seleziona data",
23
+ dateFormat: Y,
24
+ className: Z,
25
25
  disabled: d = !1,
26
- size: h = "default",
27
- firstDate: P,
28
- lastDate: z,
29
- availableDates: O,
30
- locale: u = be,
31
- initialCalendarMonth: g,
32
- customCalendarProps: F,
33
- label: I,
34
- labelClassName: U,
35
- wrpClassName: W,
36
- id: Y,
37
- "data-testid": Z,
38
- minDate: T,
39
- maxDate: j,
40
- numberOfMonths: $,
41
- clearable: ee = !1,
42
- onClear: A
43
- } = t, n = t.mode === "range", v = !n && t.showTime === !0, w = !n && t.withSeconds === !0, M = n ? 1 : J(t.minuteStep), y = n ? 1 : J(t.secondStep), D = K ?? (v ? w ? "dd/MM/yyyy HH:mm:ss" : "dd/MM/yyyy HH:mm" : "dd/MM/yyyy"), [s, b] = f.useState(
44
- n ? void 0 : t.value
45
- ), [i, N] = f.useState(
46
- n ? t.value : void 0
47
- ), [R, C] = f.useState(
48
- g
49
- ), [_, V] = f.useState(!1), te = (e) => {
50
- const a = e ? new Date(e) : void 0;
51
- v && a && s && a.setHours(
52
- s.getHours(),
53
- s.getMinutes(),
54
- s.getSeconds()
55
- ), b(a), a && C(a), !n && t.onChange && t.onChange(a), !v && a && V(!1);
56
- }, ae = L(() => {
57
- n ? (N(void 0), t.onChange && t.onChange(void 0)) : (b(void 0), t.onChange && t.onChange(void 0)), A?.();
58
- }, [n, t.onChange, A]), ne = s?.getHours(), oe = s?.getMinutes(), se = s?.getSeconds(), ie = p(
59
- () => Array.from({ length: 24 }, (e, a) => a),
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
- ), re = p(
61
+ ), me = H(
62
62
  () => Array.from(
63
- { length: Math.floor(59 / M) + 1 },
64
- (e, a) => a * M
63
+ { length: Math.floor(59 / p) + 1 },
64
+ (e, t) => t * p
65
65
  ),
66
- [M]
67
- ), le = p(
66
+ [p]
67
+ ), ce = H(
68
68
  () => Array.from(
69
- { length: Math.floor(59 / y) + 1 },
70
- (e, a) => a * y
69
+ { length: Math.floor(59 / k) + 1 },
70
+ (e, t) => t * k
71
71
  ),
72
- [y]
73
- ), S = L(
74
- (e, a) => {
75
- const m = s ? new Date(s) : /* @__PURE__ */ new Date();
76
- s || m.setHours(0, 0, 0, 0), e === "hour" ? m.setHours(a) : e === "minute" ? m.setMinutes(a) : e === "second" && m.setSeconds(a), b(m), !n && t.onChange && t.onChange(m);
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
- [s, n, t.onChange]
79
- ), de = (e) => {
80
- N(e), e?.from && C(e.from), n && t.onChange && t.onChange(e);
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 c = [];
83
- P && c.push({ before: P }), z && c.push({ after: z }), O?.length && c.push(
84
- (e) => !O.some(
85
- (a) => Ce(a, e)
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 && (c = [!0]), ue(() => {
88
- if (n) {
89
- N(t.value);
90
- const e = t.value?.from;
91
- C(e ?? g);
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
- b(t.value), C(
94
- t.value ?? g
94
+ x(o.value), D(
95
+ o.value ?? w
95
96
  );
96
- }, [t.value, n, g]);
97
- const ce = f.useId(), q = Y ?? ce, E = n ? !!i?.from : !!s, me = () => n && i ? /* @__PURE__ */ l("span", { children: [
98
- i.from && H(i.from, D, { locale: u }),
99
- i.from && i.to && " - ",
100
- i.to && H(i.to, D, { locale: u })
101
- ] }) : !n && s ? /* @__PURE__ */ o("span", { children: H(s, D, { locale: u }) }) : /* @__PURE__ */ o("span", { className: "text-d-muted-foreground", children: x });
102
- return /* @__PURE__ */ l("div", { className: G("flex flex-col gap-1.5", W), children: [
103
- I && /* @__PURE__ */ o(fe, { htmlFor: q, className: U, children: I }),
104
- /* @__PURE__ */ l(he, { open: d ? !1 : _, onOpenChange: V, modal: !0, children: [
105
- /* @__PURE__ */ o(ge, { asChild: !0, children: /* @__PURE__ */ l(
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": Z,
110
- className: G(
111
- r.input.base,
112
- r.radius.default,
113
- r.text.base,
114
- r.interaction.disabled,
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
- r.focusRing,
117
- _ && r.activeRing,
132
+ l.focusRing,
133
+ B && l.activeRing,
118
134
  "hover:border-d-ring cursor-pointer transition-colors",
119
- !E && "text-d-muted-foreground",
135
+ !U && "text-d-muted-foreground",
120
136
  d && "cursor-not-allowed opacity-50",
121
- h === "default" && r.sizes.default,
122
- h === "sm" && r.sizes.sm,
123
- h === "lg" && r.sizes.lg,
124
- Q
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__ */ o(B, { name: "Calendar", size: h === "lg" ? "sm" : "xs" }),
133
- /* @__PURE__ */ o("div", { className: "min-w-0 flex-1", children: me() }),
134
- ee && E && /* @__PURE__ */ o(
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(), ae();
156
+ e.stopPropagation(), e.preventDefault(), ie();
141
157
  },
142
158
  onMouseDown: (e) => e.preventDefault(),
143
159
  "aria-label": "Clear selection",
144
- children: /* @__PURE__ */ o(
145
- B,
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__ */ l(
159
- ve,
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
- n ? /* @__PURE__ */ o(
165
- X,
180
+ a ? /* @__PURE__ */ r(
181
+ J,
166
182
  {
167
- ...F || {},
183
+ ...S || {},
168
184
  mode: "range",
169
- selected: i,
170
- onSelect: de,
185
+ selected: n,
186
+ onSelect: ue,
171
187
  autoFocus: !0,
172
- disabled: c,
188
+ disabled: m,
173
189
  locale: u,
174
- defaultMonth: R,
175
- numberOfMonths: $ ?? 1,
176
- minDate: T,
177
- maxDate: j
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__ */ o(
180
- X,
210
+ ) : /* @__PURE__ */ r(
211
+ J,
181
212
  {
182
- ...F || {},
213
+ ...S || {},
183
214
  mode: "single",
184
- selected: s,
185
- onSelect: te,
215
+ selected: i,
216
+ onSelect: re,
186
217
  autoFocus: !0,
187
- disabled: c,
218
+ disabled: m,
188
219
  locale: u,
189
- defaultMonth: R,
190
- minDate: T,
191
- maxDate: j
220
+ defaultMonth: L,
221
+ minDate: A,
222
+ maxDate: _
192
223
  }
193
224
  ),
194
- v && /* @__PURE__ */ l("div", { className: "border-d-border/50 relative flex shrink-0 flex-row overflow-hidden border-l", children: [
195
- /* @__PURE__ */ l(
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__ */ o("div", { className: "w-12 shrink-0 sm:w-14" }),
202
- /* @__PURE__ */ o("div", { className: "w-12 shrink-0 sm:w-14" }),
203
- w && /* @__PURE__ */ o("div", { className: "w-12 shrink-0 sm:w-14" })
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__ */ l("div", { className: "absolute inset-0 flex h-full w-full flex-row overflow-y-auto", children: [
208
- /* @__PURE__ */ o(
209
- k,
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: ne,
213
- options: ie,
214
- onChange: (e) => S("hour", 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__ */ o(
219
- k,
249
+ /* @__PURE__ */ r(
250
+ R,
220
251
  {
221
252
  type: "minute",
222
- value: oe,
223
- options: re,
224
- onChange: (e) => S("minute", e),
253
+ value: le,
254
+ options: me,
255
+ onChange: (e) => y("minute", e),
225
256
  className: "flex flex-1"
226
257
  }
227
258
  ),
228
- w && /* @__PURE__ */ o(
229
- k,
259
+ N && /* @__PURE__ */ r(
260
+ R,
230
261
  {
231
262
  type: "second",
232
- value: se,
233
- options: le,
234
- onChange: (e) => S("second", 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
- Oe as DatePicker
278
+ Te as DatePicker
248
279
  };