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