impact-nova 1.1.1 → 1.1.2
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/accordion.js +37 -33
- package/dist/components/ui/alert.d.ts +2 -0
- package/dist/components/ui/alert.js +46 -31
- package/dist/components/ui/breadcrumb.d.ts +7 -2
- package/dist/components/ui/breadcrumb.js +98 -77
- package/dist/components/ui/calendar.js +198 -178
- package/dist/components/ui/date-picker/date-picker.js +94 -87
- package/dist/components/ui/date-picker/date-range-picker.js +124 -117
- package/dist/components/ui/date-picker/month-picker.js +98 -91
- package/dist/components/ui/date-picker/month-range-picker.js +118 -111
- package/dist/components/ui/date-picker/multi-date-picker.js +76 -69
- package/dist/components/ui/date-picker/multi-month-picker.js +72 -65
- package/dist/components/ui/date-picker/multi-week-picker.js +88 -81
- package/dist/components/ui/date-picker/week-picker.js +107 -100
- package/dist/components/ui/date-picker/week-range-picker.js +144 -137
- package/dist/components/ui/dialog.js +65 -61
- package/dist/components/ui/drawer.d.ts +3 -1
- package/dist/components/ui/drawer.js +44 -29
- package/dist/components/ui/file-upload.d.ts +2 -1
- package/dist/components/ui/file-upload.js +159 -135
- package/dist/components/ui/filter-panel/filter-panel.js +89 -70
- package/dist/components/ui/filter-strip/filter-summary.js +117 -104
- package/dist/components/ui/filter-strip/filter-tag-list.js +81 -65
- package/dist/components/ui/popover.js +52 -48
- package/dist/components/ui/prompt.d.ts +2 -1
- package/dist/components/ui/prompt.js +81 -64
- package/dist/components/ui/sheet.js +91 -84
- package/dist/components/ui/sidebar.js +9 -8
- package/dist/components/ui/tabs.d.ts +2 -0
- package/dist/components/ui/tabs.js +58 -55
- package/dist/components/ui/tag.js +21 -20
- package/dist/components/ui/toast.js +41 -37
- package/dist/components/ui/tooltip.js +1 -1
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +250 -248
- package/package.json +1 -1
|
@@ -1,111 +1,118 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { X as
|
|
4
|
-
import { CalendarMonth as
|
|
5
|
-
import { format as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { Input as
|
|
8
|
-
import { Popover as
|
|
9
|
-
import { Calendar as
|
|
10
|
-
|
|
1
|
+
import { jsxs as y, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { X as J } from "lucide-react";
|
|
4
|
+
import { CalendarMonth as K } from "../../../icons/index.js";
|
|
5
|
+
import { format as f, isValid as P, parse as x } from "date-fns";
|
|
6
|
+
import { cn as Q, padValidDateString as U, maskDate as W } from "../../../lib/utils.js";
|
|
7
|
+
import { Input as Y } from "../input.js";
|
|
8
|
+
import { Popover as Z, PopoverTrigger as _, PopoverContent as $ } from "../popover.js";
|
|
9
|
+
import { Calendar as F } from "../calendar.js";
|
|
10
|
+
import { Tooltip as T, TooltipTrigger as V, TooltipContent as I } from "../tooltip.js";
|
|
11
|
+
const ee = i.forwardRef(
|
|
11
12
|
({
|
|
12
13
|
value: e,
|
|
13
14
|
onChange: p,
|
|
14
15
|
format: t = "MM/dd/yyyy",
|
|
15
|
-
placeholder:
|
|
16
|
-
minDate:
|
|
17
|
-
maxDate:
|
|
18
|
-
startMonth:
|
|
19
|
-
endMonth:
|
|
20
|
-
showFooter:
|
|
21
|
-
disabled:
|
|
22
|
-
className:
|
|
23
|
-
...
|
|
24
|
-
},
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
const [o, d] =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}, [
|
|
31
|
-
!o && e && (
|
|
32
|
-
}, [e, t, o]),
|
|
33
|
-
o && (s(e),
|
|
16
|
+
placeholder: M = "Select Date",
|
|
17
|
+
minDate: N,
|
|
18
|
+
maxDate: A,
|
|
19
|
+
startMonth: v,
|
|
20
|
+
endMonth: E,
|
|
21
|
+
showFooter: a = !0,
|
|
22
|
+
disabled: S,
|
|
23
|
+
className: O,
|
|
24
|
+
...j
|
|
25
|
+
}, B) => {
|
|
26
|
+
const h = i.useRef(null), g = i.useRef(null);
|
|
27
|
+
i.useImperativeHandle(B, () => h.current);
|
|
28
|
+
const [o, d] = i.useState(!1), [w, s] = i.useState(e), [c, l] = i.useState(e ? f(e, t) : ""), [b, C] = i.useState(e || /* @__PURE__ */ new Date());
|
|
29
|
+
i.useEffect(() => {
|
|
30
|
+
h.current && g.current !== null && (h.current.setSelectionRange(g.current, g.current), g.current = null);
|
|
31
|
+
}, [c]), i.useEffect(() => {
|
|
32
|
+
!o && e && (l(f(e, t)), s(e));
|
|
33
|
+
}, [e, t, o]), i.useEffect(() => {
|
|
34
|
+
o && (s(e), C(e || /* @__PURE__ */ new Date()));
|
|
34
35
|
}, [o, e]);
|
|
35
|
-
const
|
|
36
|
-
s(n), n &&
|
|
37
|
-
},
|
|
38
|
-
p?.(n !== void 0 ? n :
|
|
39
|
-
},
|
|
40
|
-
s(e),
|
|
41
|
-
},
|
|
42
|
-
s(void 0),
|
|
43
|
-
},
|
|
44
|
-
const u = n.target.value, m =
|
|
45
|
-
if (
|
|
46
|
-
s(void 0),
|
|
36
|
+
const H = (n) => {
|
|
37
|
+
s(n), n && l(f(n, t)), a || (p?.(n), d(!1));
|
|
38
|
+
}, L = (n) => {
|
|
39
|
+
p?.(n !== void 0 ? n : w), d(!1);
|
|
40
|
+
}, X = () => {
|
|
41
|
+
s(e), l(e ? f(e, t) : ""), d(!1);
|
|
42
|
+
}, k = () => {
|
|
43
|
+
s(void 0), l(""), p?.(void 0), a || d(!1);
|
|
44
|
+
}, q = (n) => {
|
|
45
|
+
const u = n.target.value, m = W(u, t, c);
|
|
46
|
+
if (l(m), m === "") {
|
|
47
|
+
s(void 0), a || p?.(void 0);
|
|
47
48
|
return;
|
|
48
49
|
}
|
|
49
|
-
const D =
|
|
50
|
-
|
|
51
|
-
},
|
|
50
|
+
const D = x(m, t, /* @__PURE__ */ new Date());
|
|
51
|
+
P(D) && m.length === t.length && (s(D), C(D), a || p?.(D));
|
|
52
|
+
}, z = () => {
|
|
52
53
|
if (o) return;
|
|
53
|
-
const n =
|
|
54
|
-
!
|
|
55
|
-
}, R = (e ?
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
54
|
+
const n = U(c, t), u = x(n, t, /* @__PURE__ */ new Date());
|
|
55
|
+
!P(u) || n.length !== t.length ? (l(e ? f(e, t) : ""), s(e)) : (l(n), a || p?.(u));
|
|
56
|
+
}, R = (e ? f(e, t) : "") !== c, G = c.length === t.length && !P(x(c, t, /* @__PURE__ */ new Date()));
|
|
57
|
+
return /* @__PURE__ */ y(Z, { open: o, onOpenChange: d, children: [
|
|
58
|
+
/* @__PURE__ */ r(_, { asChild: !0, children: /* @__PURE__ */ r("div", { "data-component": "date-picker", "data-state": o ? "open" : "closed", "data-pending": R || void 0, children: /* @__PURE__ */ r(
|
|
59
|
+
Y,
|
|
59
60
|
{
|
|
60
|
-
ref:
|
|
61
|
-
value:
|
|
62
|
-
onChange:
|
|
63
|
-
onBlur:
|
|
61
|
+
ref: h,
|
|
62
|
+
value: c,
|
|
63
|
+
onChange: q,
|
|
64
|
+
onBlur: z,
|
|
64
65
|
onClick: (n) => o && n.stopPropagation(),
|
|
65
|
-
placeholder: o ? t :
|
|
66
|
-
disabled:
|
|
66
|
+
placeholder: o ? t : M,
|
|
67
|
+
disabled: S,
|
|
67
68
|
"data-form-control": "input",
|
|
68
|
-
className:
|
|
69
|
+
className: Q(
|
|
69
70
|
"cursor-pointer",
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
G ? "text-destructive" : R ? "text-muted-foreground" : "",
|
|
72
|
+
O
|
|
72
73
|
),
|
|
73
|
-
suffix: /* @__PURE__ */
|
|
74
|
-
e && !
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
n
|
|
74
|
+
suffix: /* @__PURE__ */ y("div", { className: "flex items-center gap-1", children: [
|
|
75
|
+
e && !S && /* @__PURE__ */ y(T, { children: [
|
|
76
|
+
/* @__PURE__ */ r(V, { asChild: !0, children: /* @__PURE__ */ r(
|
|
77
|
+
J,
|
|
78
|
+
{
|
|
79
|
+
className: "h-4 w-4 cursor-pointer hover:text-foreground",
|
|
80
|
+
onClick: (n) => {
|
|
81
|
+
n.stopPropagation(), k();
|
|
82
|
+
}
|
|
80
83
|
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
+
) }),
|
|
85
|
+
/* @__PURE__ */ r(I, { variant: "tertiary", side: "top", children: "Clear" })
|
|
86
|
+
] }),
|
|
87
|
+
/* @__PURE__ */ y(T, { children: [
|
|
88
|
+
/* @__PURE__ */ r(V, { asChild: !0, children: /* @__PURE__ */ r(K, { className: "h-4 w-4 text-secondary-foreground" }) }),
|
|
89
|
+
/* @__PURE__ */ r(I, { variant: "tertiary", side: "top", children: "Pick a date" })
|
|
90
|
+
] })
|
|
84
91
|
] }),
|
|
85
|
-
...
|
|
92
|
+
...j
|
|
86
93
|
}
|
|
87
94
|
) }) }),
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
|
|
95
|
+
/* @__PURE__ */ r(
|
|
96
|
+
$,
|
|
90
97
|
{
|
|
91
98
|
className: "w-auto p-0",
|
|
92
99
|
align: "start",
|
|
93
100
|
onOpenAutoFocus: (n) => n.preventDefault(),
|
|
94
|
-
children: /* @__PURE__ */
|
|
95
|
-
|
|
101
|
+
children: /* @__PURE__ */ r(
|
|
102
|
+
F,
|
|
96
103
|
{
|
|
97
104
|
mode: "single",
|
|
98
|
-
selected:
|
|
99
|
-
onSelect:
|
|
100
|
-
month:
|
|
101
|
-
onMonthChange:
|
|
102
|
-
disabled: { before:
|
|
103
|
-
startMonth:
|
|
104
|
-
endMonth:
|
|
105
|
-
showFooter:
|
|
106
|
-
onApply:
|
|
107
|
-
onCancel:
|
|
108
|
-
onClear:
|
|
105
|
+
selected: w,
|
|
106
|
+
onSelect: H,
|
|
107
|
+
month: b,
|
|
108
|
+
onMonthChange: C,
|
|
109
|
+
disabled: { before: N, after: A },
|
|
110
|
+
startMonth: v,
|
|
111
|
+
endMonth: E,
|
|
112
|
+
showFooter: a,
|
|
113
|
+
onApply: L,
|
|
114
|
+
onCancel: X,
|
|
115
|
+
onClear: k,
|
|
109
116
|
captionLayout: "dropdown"
|
|
110
117
|
}
|
|
111
118
|
)
|
|
@@ -114,7 +121,7 @@ const _ = r.forwardRef(
|
|
|
114
121
|
] });
|
|
115
122
|
}
|
|
116
123
|
);
|
|
117
|
-
|
|
124
|
+
ee.displayName = "DatePicker";
|
|
118
125
|
export {
|
|
119
|
-
|
|
126
|
+
ee as DatePicker
|
|
120
127
|
};
|
|
@@ -1,208 +1,215 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { X as
|
|
4
|
-
import { CalendarMonth as
|
|
5
|
-
import { format as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { Popover as
|
|
8
|
-
import { Calendar as
|
|
9
|
-
|
|
1
|
+
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { X as le } from "lucide-react";
|
|
4
|
+
import { CalendarMonth as ce, Info as fe } from "../../../icons/index.js";
|
|
5
|
+
import { format as i, isValid as C, parse as S } from "date-fns";
|
|
6
|
+
import { cn as D, padValidDateString as M, maskDate as A } from "../../../lib/utils.js";
|
|
7
|
+
import { Popover as ae, PopoverTrigger as pe, PopoverContent as me } from "../popover.js";
|
|
8
|
+
import { Calendar as he } from "../calendar.js";
|
|
9
|
+
import { Tooltip as j, TooltipTrigger as B, TooltipContent as O } from "../tooltip.js";
|
|
10
|
+
const ue = d.forwardRef(
|
|
10
11
|
({
|
|
11
12
|
value: e,
|
|
12
|
-
onChange:
|
|
13
|
+
onChange: m,
|
|
13
14
|
format: t = "MM/dd/yyyy",
|
|
14
|
-
startPlaceholder:
|
|
15
|
-
endPlaceholder:
|
|
16
|
-
minDate:
|
|
17
|
-
maxDate:
|
|
18
|
-
startMonth:
|
|
19
|
-
endMonth:
|
|
20
|
-
showFooter:
|
|
15
|
+
startPlaceholder: z = "Start Date",
|
|
16
|
+
endPlaceholder: H = "End Date",
|
|
17
|
+
minDate: L,
|
|
18
|
+
maxDate: X,
|
|
19
|
+
startMonth: q,
|
|
20
|
+
endMonth: G,
|
|
21
|
+
showFooter: h = !0,
|
|
21
22
|
disabled: x,
|
|
22
23
|
label: P,
|
|
23
|
-
helperText:
|
|
24
|
-
prefix:
|
|
25
|
-
prefixClick:
|
|
26
|
-
isError:
|
|
27
|
-
size:
|
|
28
|
-
required:
|
|
29
|
-
className:
|
|
30
|
-
...
|
|
31
|
-
},
|
|
32
|
-
const E =
|
|
33
|
-
|
|
34
|
-
const [c,
|
|
35
|
-
|
|
36
|
-
!c && e && (u(e?.from ?
|
|
37
|
-
}, [e, t, c]),
|
|
38
|
-
c && (
|
|
24
|
+
helperText: k,
|
|
25
|
+
prefix: ge,
|
|
26
|
+
prefixClick: xe,
|
|
27
|
+
isError: N,
|
|
28
|
+
size: V,
|
|
29
|
+
required: J,
|
|
30
|
+
className: K,
|
|
31
|
+
...Q
|
|
32
|
+
}, U) => {
|
|
33
|
+
const E = d.useRef(null), W = d.useRef(null);
|
|
34
|
+
d.useRef(null), d.useRef(null), d.useImperativeHandle(U, () => E.current);
|
|
35
|
+
const [c, R] = d.useState(!1), [b, a] = d.useState(e), [w, u] = d.useState(e?.from ? i(e.from, t) : ""), [y, g] = d.useState(e?.to ? i(e.to, t) : ""), [Y, I] = d.useState(e?.from || /* @__PURE__ */ new Date());
|
|
36
|
+
d.useEffect(() => {
|
|
37
|
+
!c && e && (u(e?.from ? i(e.from, t) : ""), g(e?.to ? i(e.to, t) : ""), a(e));
|
|
38
|
+
}, [e, t, c]), d.useEffect(() => {
|
|
39
|
+
c && (a(e), u(e?.from ? i(e.from, t) : ""), g(e?.to ? i(e.to, t) : ""), I(e?.from || /* @__PURE__ */ new Date()));
|
|
39
40
|
}, [c, e]);
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
},
|
|
41
|
+
const Z = (n) => {
|
|
42
|
+
a(n), n?.from && u(i(n.from, t)), n?.to && g(i(n.to, t)), h || n?.from && n?.to && n.from.getTime() !== n.to.getTime() && (m?.(n), R(!1));
|
|
43
|
+
}, $ = (n) => {
|
|
43
44
|
let o = n !== void 0 ? n : b;
|
|
44
|
-
o?.from && !o.to && (o = { from: o.from, to: o.from }),
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
const o = n.target.value,
|
|
51
|
-
if (u(
|
|
52
|
-
const
|
|
53
|
-
|
|
45
|
+
o?.from && !o.to && (o = { from: o.from, to: o.from }), m?.(o), R(!1);
|
|
46
|
+
}, _ = () => {
|
|
47
|
+
a(e), u(e?.from ? i(e.from, t) : ""), g(e?.to ? i(e.to, t) : ""), R(!1);
|
|
48
|
+
}, T = () => {
|
|
49
|
+
a(void 0), u(""), g(""), m?.(void 0), h || R(!1);
|
|
50
|
+
}, F = (n) => {
|
|
51
|
+
const o = n.target.value, l = A(o, t, w);
|
|
52
|
+
if (u(l), l === "") {
|
|
53
|
+
const s = { from: void 0, to: b?.to };
|
|
54
|
+
a(s), h || m?.(s);
|
|
54
55
|
return;
|
|
55
56
|
}
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
58
|
-
const
|
|
59
|
-
|
|
57
|
+
const f = S(l, t, /* @__PURE__ */ new Date());
|
|
58
|
+
if (C(f) && l.length === t.length) {
|
|
59
|
+
const s = { from: f, to: b?.to };
|
|
60
|
+
a(s), I(f), h || m?.(s);
|
|
60
61
|
}
|
|
61
|
-
},
|
|
62
|
-
const o = n.target.value,
|
|
63
|
-
if (
|
|
64
|
-
const
|
|
65
|
-
|
|
62
|
+
}, ee = (n) => {
|
|
63
|
+
const o = n.target.value, l = A(o, t, y);
|
|
64
|
+
if (g(l), l === "") {
|
|
65
|
+
const s = { from: b?.from, to: void 0 };
|
|
66
|
+
a(s), h || m?.(s);
|
|
66
67
|
return;
|
|
67
68
|
}
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
70
|
-
const
|
|
71
|
-
|
|
69
|
+
const f = S(l, t, /* @__PURE__ */ new Date());
|
|
70
|
+
if (C(f) && l.length === t.length) {
|
|
71
|
+
const s = { from: b?.from, to: f };
|
|
72
|
+
a(s), f && I(f), h || m?.(s);
|
|
72
73
|
}
|
|
73
74
|
}, v = () => {
|
|
74
75
|
if (c) return;
|
|
75
|
-
const n =
|
|
76
|
-
!
|
|
77
|
-
},
|
|
78
|
-
return /* @__PURE__ */
|
|
79
|
-
P && /* @__PURE__ */
|
|
76
|
+
const n = M(w, t), o = M(y, t), l = S(n, t, /* @__PURE__ */ new Date()), f = S(o, t, /* @__PURE__ */ new Date()), s = C(l) && n.length === t.length, de = C(f) && o.length === t.length;
|
|
77
|
+
!s || !de ? (u(e?.from ? i(e.from, t) : ""), g(e?.to ? i(e.to, t) : ""), a(e)) : (u(n), g(o), h || m?.({ from: l, to: f }));
|
|
78
|
+
}, te = e?.from ? i(e.from, t) : "", ne = e?.to ? i(e.to, t) : "", oe = w !== te, re = y !== ne, ie = w.length === t.length && !C(S(w, t, /* @__PURE__ */ new Date())), se = y.length === t.length && !C(S(y, t, /* @__PURE__ */ new Date()));
|
|
79
|
+
return /* @__PURE__ */ p("div", { className: "w-full space-y-1.5 min-w-[240px]", "data-component": "date-range-picker", "data-disabled": x || void 0, children: [
|
|
80
|
+
P && /* @__PURE__ */ p(
|
|
80
81
|
"label",
|
|
81
82
|
{
|
|
82
|
-
className:
|
|
83
|
+
className: D(
|
|
83
84
|
"text-xs font-medium leading-[18px] text-[#60697d]",
|
|
84
85
|
x && "opacity-70",
|
|
85
|
-
|
|
86
|
+
N && "text-destructive"
|
|
86
87
|
),
|
|
87
88
|
children: [
|
|
88
89
|
P,
|
|
89
90
|
" ",
|
|
90
|
-
|
|
91
|
+
J && /* @__PURE__ */ r("span", { className: "text-destructive", children: "*" })
|
|
91
92
|
]
|
|
92
93
|
}
|
|
93
94
|
),
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ p(ae, { open: c, onOpenChange: R, children: [
|
|
96
|
+
/* @__PURE__ */ r(pe, { asChild: !0, children: /* @__PURE__ */ p(
|
|
96
97
|
"div",
|
|
97
98
|
{
|
|
98
99
|
"data-state": c ? "open" : "closed",
|
|
99
|
-
className:
|
|
100
|
+
className: D(
|
|
100
101
|
"flex w-full items-center justify-between gap-2 rounded-md border bg-white px-3 text-sm shadow-sm transition-colors hover:border-primary disabled:cursor-not-allowed disabled:bg-disabled-secondary-bg disabled:text-disabled-text disabled:border-border",
|
|
101
|
-
|
|
102
|
-
|
|
102
|
+
N ? "border-destructive hover:border-destructive" : "border-input",
|
|
103
|
+
V === "sm" ? "h-6" : V === "md" ? "h-[28px]" : "h-8",
|
|
103
104
|
x && "pointer-events-none opacity-100 bg-disabled-secondary-bg border-border text-disabled-text hover:border-border",
|
|
104
105
|
"cursor-pointer",
|
|
105
|
-
|
|
106
|
+
K
|
|
106
107
|
),
|
|
107
108
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ p("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
|
|
110
|
+
/* @__PURE__ */ r(
|
|
110
111
|
"input",
|
|
111
112
|
{
|
|
112
113
|
ref: E,
|
|
113
114
|
type: "text",
|
|
114
115
|
value: w,
|
|
115
|
-
onChange:
|
|
116
|
+
onChange: F,
|
|
116
117
|
onBlur: v,
|
|
117
118
|
onClick: (n) => c && n.stopPropagation(),
|
|
118
|
-
placeholder: c ? t :
|
|
119
|
+
placeholder: c ? t : z,
|
|
119
120
|
disabled: !!x,
|
|
120
121
|
"data-field": "start",
|
|
121
|
-
className:
|
|
122
|
+
className: D(
|
|
122
123
|
"flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-[#dfe2e7] disabled:cursor-not-allowed disabled:opacity-50",
|
|
123
|
-
|
|
124
|
+
ie ? "text-destructive" : oe ? "text-muted-foreground" : ""
|
|
124
125
|
),
|
|
125
|
-
...
|
|
126
|
+
...Q
|
|
126
127
|
}
|
|
127
128
|
),
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ r(
|
|
129
130
|
"input",
|
|
130
131
|
{
|
|
131
|
-
ref:
|
|
132
|
+
ref: W,
|
|
132
133
|
type: "text",
|
|
133
134
|
value: y,
|
|
134
|
-
onChange:
|
|
135
|
+
onChange: ee,
|
|
135
136
|
onBlur: v,
|
|
136
137
|
onClick: (n) => c && n.stopPropagation(),
|
|
137
|
-
placeholder: c ? t :
|
|
138
|
+
placeholder: c ? t : H,
|
|
138
139
|
disabled: !!x,
|
|
139
140
|
"data-field": "end",
|
|
140
|
-
className:
|
|
141
|
+
className: D(
|
|
141
142
|
"flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-[#dfe2e7] disabled:cursor-not-allowed disabled:opacity-50",
|
|
142
|
-
|
|
143
|
+
se ? "text-destructive" : re ? "text-muted-foreground" : ""
|
|
143
144
|
)
|
|
144
145
|
}
|
|
145
146
|
)
|
|
146
147
|
] }),
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
e?.from && !x && /* @__PURE__ */ p(
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
n
|
|
148
|
+
/* @__PURE__ */ p("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
149
|
+
e?.from && !x && /* @__PURE__ */ p(j, { children: [
|
|
150
|
+
/* @__PURE__ */ r(B, { asChild: !0, children: /* @__PURE__ */ r(
|
|
151
|
+
le,
|
|
152
|
+
{
|
|
153
|
+
className: "h-4 w-4 cursor-pointer hover:text-foreground text-muted-foreground",
|
|
154
|
+
onClick: (n) => {
|
|
155
|
+
n.stopPropagation(), T();
|
|
156
|
+
}
|
|
154
157
|
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
+
) }),
|
|
159
|
+
/* @__PURE__ */ r(O, { variant: "tertiary", side: "top", children: "Clear" })
|
|
160
|
+
] }),
|
|
161
|
+
/* @__PURE__ */ p(j, { children: [
|
|
162
|
+
/* @__PURE__ */ r(B, { asChild: !0, children: /* @__PURE__ */ r(ce, { className: "h-4 w-4 text-secondary-foreground" }) }),
|
|
163
|
+
/* @__PURE__ */ r(O, { variant: "tertiary", side: "top", children: "Pick a range" })
|
|
164
|
+
] })
|
|
158
165
|
] })
|
|
159
166
|
]
|
|
160
167
|
}
|
|
161
168
|
) }),
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
|
|
169
|
+
/* @__PURE__ */ r(
|
|
170
|
+
me,
|
|
164
171
|
{
|
|
165
172
|
className: "w-auto p-0",
|
|
166
173
|
align: "start",
|
|
167
174
|
onOpenAutoFocus: (n) => n.preventDefault(),
|
|
168
|
-
children: /* @__PURE__ */
|
|
169
|
-
|
|
175
|
+
children: /* @__PURE__ */ r(
|
|
176
|
+
he,
|
|
170
177
|
{
|
|
171
178
|
mode: "range",
|
|
172
179
|
selected: b,
|
|
173
|
-
onSelect:
|
|
174
|
-
month:
|
|
180
|
+
onSelect: Z,
|
|
181
|
+
month: Y,
|
|
175
182
|
onMonthChange: I,
|
|
176
|
-
disabled: { before:
|
|
177
|
-
startMonth:
|
|
178
|
-
endMonth:
|
|
179
|
-
showFooter:
|
|
180
|
-
onApply:
|
|
181
|
-
onCancel:
|
|
182
|
-
onClear:
|
|
183
|
+
disabled: { before: L, after: X },
|
|
184
|
+
startMonth: q,
|
|
185
|
+
endMonth: G,
|
|
186
|
+
showFooter: h,
|
|
187
|
+
onApply: $,
|
|
188
|
+
onCancel: _,
|
|
189
|
+
onClear: T,
|
|
183
190
|
captionLayout: "dropdown"
|
|
184
191
|
}
|
|
185
192
|
)
|
|
186
193
|
}
|
|
187
194
|
)
|
|
188
195
|
] }),
|
|
189
|
-
|
|
190
|
-
!
|
|
191
|
-
/* @__PURE__ */
|
|
196
|
+
k && /* @__PURE__ */ p("div", { className: D("flex items-center gap-1", N && "text-destructive"), children: [
|
|
197
|
+
!N && /* @__PURE__ */ r(fe, { size: 10, className: "shrink-0 text-muted-foreground" }),
|
|
198
|
+
/* @__PURE__ */ r(
|
|
192
199
|
"p",
|
|
193
200
|
{
|
|
194
|
-
className:
|
|
201
|
+
className: D(
|
|
195
202
|
"text-[10px] text-[#7a8294]",
|
|
196
|
-
|
|
203
|
+
N && "text-destructive"
|
|
197
204
|
),
|
|
198
|
-
children:
|
|
205
|
+
children: k
|
|
199
206
|
}
|
|
200
207
|
)
|
|
201
208
|
] })
|
|
202
209
|
] });
|
|
203
210
|
}
|
|
204
211
|
);
|
|
205
|
-
|
|
212
|
+
ue.displayName = "DateRangePicker";
|
|
206
213
|
export {
|
|
207
|
-
|
|
214
|
+
ue as DateRangePicker
|
|
208
215
|
};
|