laif-ds 0.2.52 → 0.2.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/app-select.js +102 -99
- package/dist/components/ui/app-tooltip.js +123 -0
- package/dist/components/ui/async-select.js +54 -53
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/date-picker.js +96 -86
- package/dist/components/ui/file-preview.js +233 -286
- package/dist/components/ui/input.js +28 -29
- package/dist/index.d.ts +56 -1
- package/dist/index.js +41 -39
- package/dist/lib/design-tokens.js +3 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import { useDebounce as de } from "../../hooks/use-debounce.js";
|
|
4
4
|
import { cva as ie } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
|
-
import * as
|
|
6
|
-
import { useState as p, useEffect as
|
|
7
|
-
import { designTokens as
|
|
8
|
-
import { cn as
|
|
5
|
+
import * as R from "react";
|
|
6
|
+
import { useState as p, useEffect as b, useCallback as j } from "react";
|
|
7
|
+
import { designTokens as x } from "../../lib/design-tokens.js";
|
|
8
|
+
import { cn as M } from "../../lib/utils.js";
|
|
9
9
|
import { Checkbox as fe } from "./checkbox.js";
|
|
10
10
|
import { Command as me, CommandInput as ue, CommandList as he, CommandEmpty as ge, CommandGroup as O, CommandItem as V } from "./command.js";
|
|
11
11
|
import { Icon as _ } from "./icon.js";
|
|
@@ -14,10 +14,10 @@ import { Popover as xe, PopoverTrigger as we, PopoverContent as ye } from "./pop
|
|
|
14
14
|
import Ne from "../../node_modules/lucide-react/dist/esm/icons/loader-circle.js";
|
|
15
15
|
import be from "../../node_modules/lucide-react/dist/esm/icons/check.js";
|
|
16
16
|
const Ce = ie(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
M(
|
|
18
|
+
x.input.base,
|
|
19
|
+
x.radius.default,
|
|
20
|
+
x.interaction.disabled,
|
|
21
21
|
"flex items-center justify-between whitespace-nowrap transition-all [&>span]:line-clamp-1",
|
|
22
22
|
"data-[placeholder]:text-d-muted-foreground",
|
|
23
23
|
"focus:outline-none"
|
|
@@ -25,9 +25,9 @@ const Ce = ie(
|
|
|
25
25
|
{
|
|
26
26
|
variants: {
|
|
27
27
|
size: {
|
|
28
|
-
default:
|
|
29
|
-
sm:
|
|
30
|
-
lg:
|
|
28
|
+
default: x.sizes.default,
|
|
29
|
+
sm: x.sizes.sm,
|
|
30
|
+
lg: x.sizes.lg
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
defaultVariants: {
|
|
@@ -38,27 +38,27 @@ const Ce = ie(
|
|
|
38
38
|
function Be({
|
|
39
39
|
fetcher: i,
|
|
40
40
|
initialOptions: t,
|
|
41
|
-
debounce:
|
|
41
|
+
debounce: w = 300,
|
|
42
42
|
renderOptionItem: C,
|
|
43
43
|
resolveOptionValue: a,
|
|
44
44
|
renderSelectedValue: s,
|
|
45
45
|
notFound: h,
|
|
46
|
-
label:
|
|
46
|
+
label: N,
|
|
47
47
|
placeholder: f = "Select...",
|
|
48
48
|
value: n,
|
|
49
49
|
onChange: g,
|
|
50
50
|
disabled: A = !1,
|
|
51
|
-
className:
|
|
52
|
-
wrpClassName:
|
|
51
|
+
className: D,
|
|
52
|
+
wrpClassName: v,
|
|
53
53
|
noResultsMessage: E,
|
|
54
54
|
clearable: S = !0,
|
|
55
55
|
multiple: l = !1,
|
|
56
56
|
size: ee
|
|
57
57
|
}) {
|
|
58
|
-
const [m, L] = p(!1), P =
|
|
58
|
+
const [m, L] = p(!1), P = R.useRef(null), F = R.useRef(null), re = R.useRef(null), [ne, I] = p({ loading: !1, error: null }), [X, te] = p(""), W = de(X, w), [B, q] = p(/* @__PURE__ */ new Map()), [$, G] = p([]), [H, se] = p(0), [J, Q] = p(() => t?.length ? new Map(
|
|
59
59
|
t.map((e) => [a(e), e])
|
|
60
60
|
) : /* @__PURE__ */ new Map());
|
|
61
|
-
|
|
61
|
+
b(() => {
|
|
62
62
|
t?.length && (q((e) => {
|
|
63
63
|
const o = new Map(e);
|
|
64
64
|
return o.has("") || o.set("", t), o;
|
|
@@ -67,15 +67,15 @@ function Be({
|
|
|
67
67
|
return t.forEach((c) => o.set(a(c), c)), o;
|
|
68
68
|
}));
|
|
69
69
|
}, [t, a]);
|
|
70
|
-
const [
|
|
70
|
+
const [k, Y] = p([]), z = j(
|
|
71
71
|
(e) => {
|
|
72
72
|
if (!e) {
|
|
73
73
|
Y([]);
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
76
|
const c = (Array.isArray(e) ? e : [e]).map((d) => {
|
|
77
|
-
const
|
|
78
|
-
if (
|
|
77
|
+
const y = J.get(d);
|
|
78
|
+
if (y) return y;
|
|
79
79
|
if (t?.length) {
|
|
80
80
|
const T = t.find(
|
|
81
81
|
(le) => a(le) === d
|
|
@@ -90,11 +90,11 @@ function Be({
|
|
|
90
90
|
},
|
|
91
91
|
[J, a, t, $]
|
|
92
92
|
);
|
|
93
|
-
|
|
93
|
+
b(() => {
|
|
94
94
|
z(n);
|
|
95
95
|
}, [n, z]);
|
|
96
|
-
const K =
|
|
97
|
-
|
|
96
|
+
const K = R.useMemo(() => l ? null : k[0] ?? null, [l, k]);
|
|
97
|
+
b(() => {
|
|
98
98
|
if (!m) return;
|
|
99
99
|
const e = W || "";
|
|
100
100
|
if (B.has(e)) {
|
|
@@ -106,8 +106,8 @@ function Be({
|
|
|
106
106
|
I({ loading: !0, error: null });
|
|
107
107
|
const c = await i(W);
|
|
108
108
|
q((d) => new Map(d).set(e, c)), G(c), Q((d) => {
|
|
109
|
-
const
|
|
110
|
-
return c.forEach((U) =>
|
|
109
|
+
const y = new Map(d);
|
|
110
|
+
return c.forEach((U) => y.set(a(U), U)), y;
|
|
111
111
|
});
|
|
112
112
|
} catch (c) {
|
|
113
113
|
I({
|
|
@@ -118,11 +118,11 @@ function Be({
|
|
|
118
118
|
I((c) => ({ ...c, loading: !1 }));
|
|
119
119
|
}
|
|
120
120
|
})();
|
|
121
|
-
}, [m, W, B, i, a]),
|
|
121
|
+
}, [m, W, B, i, a]), b(() => {
|
|
122
122
|
m && z(n);
|
|
123
|
-
}, [m, z, n]),
|
|
123
|
+
}, [m, z, n]), b(() => {
|
|
124
124
|
m && P.current && P.current.focus();
|
|
125
|
-
}, [m]),
|
|
125
|
+
}, [m]), b(() => {
|
|
126
126
|
if (!m || !F.current) return;
|
|
127
127
|
const e = F.current.getBoundingClientRect();
|
|
128
128
|
se(e.width);
|
|
@@ -137,7 +137,7 @@ function Be({
|
|
|
137
137
|
if (!l) return;
|
|
138
138
|
const o = Array.isArray(n) ? n : [], c = o.includes(e);
|
|
139
139
|
let d;
|
|
140
|
-
c ? d = o.filter((
|
|
140
|
+
c ? d = o.filter((y) => y !== e) : d = [...o, e], g?.(d);
|
|
141
141
|
},
|
|
142
142
|
[n, g, l]
|
|
143
143
|
), oe = j(
|
|
@@ -145,9 +145,9 @@ function Be({
|
|
|
145
145
|
e.stopPropagation(), e.preventDefault(), g?.(l ? [] : ""), L(!1);
|
|
146
146
|
},
|
|
147
147
|
[g]
|
|
148
|
-
), Z =
|
|
149
|
-
return /* @__PURE__ */ u("div", { className:
|
|
150
|
-
|
|
148
|
+
), Z = R.useId();
|
|
149
|
+
return /* @__PURE__ */ u("div", { className: M("flex flex-col gap-1.5", v), children: [
|
|
150
|
+
N && /* @__PURE__ */ r(pe, { htmlFor: Z, children: N }),
|
|
151
151
|
/* @__PURE__ */ u(xe, { open: m, onOpenChange: L, children: [
|
|
152
152
|
/* @__PURE__ */ r(we, { asChild: !0, children: /* @__PURE__ */ r(
|
|
153
153
|
"button",
|
|
@@ -156,18 +156,19 @@ function Be({
|
|
|
156
156
|
ref: F,
|
|
157
157
|
type: "button",
|
|
158
158
|
disabled: A,
|
|
159
|
-
className:
|
|
159
|
+
className: M(
|
|
160
160
|
Ce({ size: ee }),
|
|
161
161
|
"!border-d-border/50 border !shadow-none",
|
|
162
162
|
A && "cursor-not-allowed opacity-50",
|
|
163
163
|
"font-normal",
|
|
164
164
|
"w-full",
|
|
165
|
-
"
|
|
166
|
-
|
|
167
|
-
|
|
165
|
+
"w-full",
|
|
166
|
+
x.focusRing,
|
|
167
|
+
m && x.activeRing,
|
|
168
|
+
D
|
|
168
169
|
),
|
|
169
170
|
children: /* @__PURE__ */ u("div", { className: "flex w-full flex-1 items-center justify-between overflow-hidden", children: [
|
|
170
|
-
l ? Array.isArray(n) && n.length > 0 ? /* @__PURE__ */ r("div", { className: "min-w-0 flex-1 truncate text-left", children: n.length === 1 ?
|
|
171
|
+
l ? Array.isArray(n) && n.length > 0 ? /* @__PURE__ */ r("div", { className: "min-w-0 flex-1 truncate text-left", children: n.length === 1 ? k[0] && s(k[0]) : `${n.length} elementi selezionati` }) : /* @__PURE__ */ r("span", { className: "text-d-muted-foreground truncate text-left", children: f }) : K ? /* @__PURE__ */ r("div", { className: "min-w-0 flex-1 truncate text-left", children: s(K) }) : /* @__PURE__ */ r("span", { className: "text-d-muted-foreground truncate text-left", children: f }),
|
|
171
172
|
/* @__PURE__ */ u("div", { className: "flex flex-shrink-0 items-center justify-end gap-1", children: [
|
|
172
173
|
S && (l && Array.isArray(n) && n.length > 0 || !l && K) && /* @__PURE__ */ r(
|
|
173
174
|
"div",
|
|
@@ -201,7 +202,7 @@ function Be({
|
|
|
201
202
|
/* @__PURE__ */ r(
|
|
202
203
|
ye,
|
|
203
204
|
{
|
|
204
|
-
className:
|
|
205
|
+
className: M("p-0"),
|
|
205
206
|
style: { width: H ? `${H}px` : void 0 },
|
|
206
207
|
align: "start",
|
|
207
208
|
side: "bottom",
|
|
@@ -237,20 +238,20 @@ function Be({
|
|
|
237
238
|
function Ae({
|
|
238
239
|
option: i,
|
|
239
240
|
multiple: t,
|
|
240
|
-
value:
|
|
241
|
+
value: w,
|
|
241
242
|
resolveOptionValue: C,
|
|
242
243
|
renderSelectedValue: a,
|
|
243
244
|
renderOptionItem: s,
|
|
244
245
|
onSelect: h,
|
|
245
|
-
onSelectMultiple:
|
|
246
|
+
onSelectMultiple: N
|
|
246
247
|
}) {
|
|
247
248
|
const f = C(i);
|
|
248
249
|
let n = !1;
|
|
249
|
-
return t ? n = Array.isArray(
|
|
250
|
+
return t ? n = Array.isArray(w) && w.includes(f) : n = w === f, /* @__PURE__ */ r(
|
|
250
251
|
V,
|
|
251
252
|
{
|
|
252
253
|
value: f,
|
|
253
|
-
onSelect: t ?
|
|
254
|
+
onSelect: t ? N : h,
|
|
254
255
|
className: "cursor-pointer",
|
|
255
256
|
children: /* @__PURE__ */ u("div", { className: "flex w-full items-center justify-between overflow-hidden", children: [
|
|
256
257
|
/* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
@@ -260,7 +261,7 @@ function Ae({
|
|
|
260
261
|
/* @__PURE__ */ r(
|
|
261
262
|
be,
|
|
262
263
|
{
|
|
263
|
-
className:
|
|
264
|
+
className: M(
|
|
264
265
|
"ml-2 h-4 w-4 flex-shrink-0",
|
|
265
266
|
n ? "opacity-100" : "opacity-0"
|
|
266
267
|
)
|
|
@@ -274,18 +275,18 @@ function Ae({
|
|
|
274
275
|
function Se({
|
|
275
276
|
inputRef: i,
|
|
276
277
|
commandListRef: t,
|
|
277
|
-
placeholder:
|
|
278
|
+
placeholder: w,
|
|
278
279
|
searchTerm: C,
|
|
279
280
|
onSearchTermChange: a,
|
|
280
281
|
fetchState: s,
|
|
281
282
|
options: h,
|
|
282
|
-
notFound:
|
|
283
|
+
notFound: N,
|
|
283
284
|
noResultsMessage: f,
|
|
284
285
|
multiple: n,
|
|
285
286
|
value: g,
|
|
286
287
|
resolveOptionValue: A,
|
|
287
|
-
renderSelectedValue:
|
|
288
|
-
renderOptionItem:
|
|
288
|
+
renderSelectedValue: D,
|
|
289
|
+
renderOptionItem: v,
|
|
289
290
|
onSelect: E,
|
|
290
291
|
onSelectMultiple: S
|
|
291
292
|
}) {
|
|
@@ -294,7 +295,7 @@ function Se({
|
|
|
294
295
|
ue,
|
|
295
296
|
{
|
|
296
297
|
ref: i,
|
|
297
|
-
placeholder:
|
|
298
|
+
placeholder: w,
|
|
298
299
|
className: "placeholder:text-d-muted-foreground",
|
|
299
300
|
value: C,
|
|
300
301
|
onValueChange: a
|
|
@@ -303,8 +304,8 @@ function Se({
|
|
|
303
304
|
s.loading && h.length > 0 && /* @__PURE__ */ r("div", { className: "flex items-center justify-center p-2", children: /* @__PURE__ */ r(Ne, { className: "h-4 w-4 animate-spin" }) }),
|
|
304
305
|
/* @__PURE__ */ u(he, { ref: t, children: [
|
|
305
306
|
s.error && /* @__PURE__ */ r("div", { className: "text-d-destructive p-3 text-center", children: s.error }),
|
|
306
|
-
s.loading && h.length === 0 && /* @__PURE__ */ r(
|
|
307
|
-
!s.loading && !s.error && h.length === 0 && (
|
|
307
|
+
s.loading && h.length === 0 && /* @__PURE__ */ r(Re, {}),
|
|
308
|
+
!s.loading && !s.error && h.length === 0 && (N || /* @__PURE__ */ r(ge, { children: f || "No results found." })),
|
|
308
309
|
!s.loading && !s.error && h.length > 0 && /* @__PURE__ */ r(O, { children: h.map((l) => /* @__PURE__ */ r(
|
|
309
310
|
Ae,
|
|
310
311
|
{
|
|
@@ -312,8 +313,8 @@ function Se({
|
|
|
312
313
|
multiple: n,
|
|
313
314
|
value: g,
|
|
314
315
|
resolveOptionValue: A,
|
|
315
|
-
renderSelectedValue:
|
|
316
|
-
renderOptionItem:
|
|
316
|
+
renderSelectedValue: D,
|
|
317
|
+
renderOptionItem: v,
|
|
317
318
|
onSelect: E,
|
|
318
319
|
onSelectMultiple: S
|
|
319
320
|
},
|
|
@@ -322,7 +323,7 @@ function Se({
|
|
|
322
323
|
] })
|
|
323
324
|
] });
|
|
324
325
|
}
|
|
325
|
-
function
|
|
326
|
+
function Re() {
|
|
326
327
|
return /* @__PURE__ */ r(O, { children: [1, 2, 3].map((i) => /* @__PURE__ */ r(V, { disabled: !0, children: /* @__PURE__ */ u("div", { className: "flex w-full items-center gap-2", children: [
|
|
327
328
|
/* @__PURE__ */ r("div", { className: "bg-d-secondary h-6 w-6 animate-pulse rounded-full" }),
|
|
328
329
|
/* @__PURE__ */ u("div", { className: "flex flex-1 flex-col gap-1", children: [
|
|
@@ -64,7 +64,7 @@ function N({
|
|
|
64
64
|
u,
|
|
65
65
|
{
|
|
66
66
|
"data-slot": "button",
|
|
67
|
-
className: s(m({ variant: a, size: e, className: d })
|
|
67
|
+
className: s("relative", m({ variant: a, size: e, className: d })),
|
|
68
68
|
...o,
|
|
69
69
|
children: [
|
|
70
70
|
/* @__PURE__ */ t("span", { className: "absolute inset-0 overflow-hidden rounded-[inherit] pointer-events-none", children: /* @__PURE__ */ t("span", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent -translate-x-full group-hover:translate-x-full transition-transform duration-700 ease-out" }) }),
|
|
@@ -1,98 +1,108 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { Calendar as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
2
|
+
import { jsxs as f, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { Calendar as w } from "./calendar.js";
|
|
4
|
+
import { Icon as E } from "./icon.js";
|
|
5
|
+
import { Label as L } from "./label.js";
|
|
6
|
+
import { Popover as q, PopoverTrigger as A, PopoverContent as B } from "./popover.js";
|
|
7
|
+
import { designTokens as o } from "../../lib/design-tokens.js";
|
|
8
|
+
import { cn as P } from "../../lib/utils.js";
|
|
9
|
+
import * as c from "react";
|
|
10
|
+
import { useEffect as F } from "react";
|
|
11
|
+
import { it as G } from "../../node_modules/date-fns/locale/it.js";
|
|
11
12
|
import { formatDate as d } from "../../node_modules/date-fns/format.js";
|
|
12
|
-
import { isSameDay as
|
|
13
|
-
function
|
|
13
|
+
import { isSameDay as H } from "../../node_modules/date-fns/isSameDay.js";
|
|
14
|
+
function v({
|
|
14
15
|
value: e,
|
|
15
16
|
onChange: p,
|
|
16
|
-
placeholder:
|
|
17
|
-
dateFormat:
|
|
18
|
-
className:
|
|
19
|
-
disabled:
|
|
20
|
-
size:
|
|
21
|
-
firstDate:
|
|
22
|
-
lastDate:
|
|
23
|
-
availableDates:
|
|
24
|
-
locale:
|
|
25
|
-
initialCalendarMonth:
|
|
26
|
-
customCalendarProps:
|
|
17
|
+
placeholder: I = "Seleziona data",
|
|
18
|
+
dateFormat: a = "dd/MM/yyyy",
|
|
19
|
+
className: M,
|
|
20
|
+
disabled: n = !1,
|
|
21
|
+
size: m = "default",
|
|
22
|
+
firstDate: l,
|
|
23
|
+
lastDate: u,
|
|
24
|
+
availableDates: h,
|
|
25
|
+
locale: N = G,
|
|
26
|
+
initialCalendarMonth: g,
|
|
27
|
+
customCalendarProps: j,
|
|
28
|
+
label: x,
|
|
29
|
+
wrpClassName: k
|
|
27
30
|
}) {
|
|
28
|
-
const [
|
|
29
|
-
|
|
30
|
-
),
|
|
31
|
-
|
|
31
|
+
const [r, y] = c.useState(e), [O, C] = c.useState(
|
|
32
|
+
g
|
|
33
|
+
), [S, R] = c.useState(!1), z = (s) => {
|
|
34
|
+
y(s), s && C(s), p && p(s);
|
|
32
35
|
};
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
(s) => !
|
|
36
|
-
(
|
|
36
|
+
let i = [];
|
|
37
|
+
l && i.push({ before: l }), u && i.push({ after: u }), h?.length && i.push(
|
|
38
|
+
(s) => !h.some(
|
|
39
|
+
(T) => H(T, s)
|
|
37
40
|
)
|
|
38
|
-
),
|
|
39
|
-
|
|
40
|
-
}, [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
children: /* @__PURE__ */ c("div", { className: "flex w-full items-center justify-between gap-2", children: [
|
|
65
|
-
/* @__PURE__ */ r(
|
|
66
|
-
k,
|
|
67
|
-
{
|
|
68
|
-
name: "Calendar",
|
|
69
|
-
size: n === "default" ? "md" : n === "sm" ? "xs" : "sm"
|
|
70
|
-
}
|
|
41
|
+
), n && (i = [!0]), F(() => {
|
|
42
|
+
y(r), C(r || g);
|
|
43
|
+
}, [r]);
|
|
44
|
+
const b = c.useId();
|
|
45
|
+
return /* @__PURE__ */ f("div", { className: P("flex flex-col gap-1.5", k), children: [
|
|
46
|
+
x && /* @__PURE__ */ t(L, { htmlFor: b, children: x }),
|
|
47
|
+
/* @__PURE__ */ f(q, { open: n ? !1 : S, onOpenChange: R, children: [
|
|
48
|
+
/* @__PURE__ */ t(A, { asChild: !0, children: /* @__PURE__ */ f(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
id: b,
|
|
52
|
+
className: P(
|
|
53
|
+
o.input.base,
|
|
54
|
+
o.radius.default,
|
|
55
|
+
o.text.base,
|
|
56
|
+
o.interaction.disabled,
|
|
57
|
+
"flex items-center gap-2 font-normal whitespace-nowrap [&>span]:line-clamp-1",
|
|
58
|
+
o.focusRing,
|
|
59
|
+
S && o.activeRing,
|
|
60
|
+
"hover:border-d-ring cursor-pointer transition-colors",
|
|
61
|
+
!r && "text-d-muted-foreground",
|
|
62
|
+
n && "cursor-not-allowed opacity-50",
|
|
63
|
+
m === "default" && o.sizes.default,
|
|
64
|
+
m === "sm" && o.sizes.sm,
|
|
65
|
+
m === "lg" && o.sizes.lg,
|
|
66
|
+
M
|
|
71
67
|
),
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
68
|
+
"aria-disabled": n,
|
|
69
|
+
role: "button",
|
|
70
|
+
tabIndex: n ? -1 : 0,
|
|
71
|
+
onClick: n ? void 0 : () => {
|
|
72
|
+
},
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ t(
|
|
75
|
+
E,
|
|
76
|
+
{
|
|
77
|
+
name: "Calendar",
|
|
78
|
+
size: m === "lg" ? "sm" : "xs"
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ t("div", { children: e && typeof e == "object" && "from" in e ? /* @__PURE__ */ f("span", { children: [
|
|
82
|
+
e.from && d(e.from, a),
|
|
83
|
+
e.from && e.to && " - ",
|
|
84
|
+
e.to && d(e.to, a)
|
|
85
|
+
] }) : r ? /* @__PURE__ */ t("span", { children: d(r, a) }) : /* @__PURE__ */ t("span", { className: "text-d-muted-foreground", children: I }) })
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
) }),
|
|
89
|
+
/* @__PURE__ */ t(B, { className: "w-auto p-0", children: /* @__PURE__ */ t(
|
|
90
|
+
w,
|
|
91
|
+
{
|
|
92
|
+
...j || {
|
|
93
|
+
mode: "single",
|
|
94
|
+
selected: r,
|
|
95
|
+
onSelect: z
|
|
96
|
+
},
|
|
97
|
+
autoFocus: !0,
|
|
98
|
+
disabled: i,
|
|
99
|
+
locale: N,
|
|
100
|
+
defaultMonth: O
|
|
101
|
+
}
|
|
102
|
+
) })
|
|
103
|
+
] })
|
|
94
104
|
] });
|
|
95
105
|
}
|
|
96
106
|
export {
|
|
97
|
-
|
|
107
|
+
v as DatePicker
|
|
98
108
|
};
|