impact-nova 1.7.5 → 1.7.7

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 (45) hide show
  1. package/dist/components/ui/ag-grid-react/headers/components/truncated-text.d.ts +15 -0
  2. package/dist/components/ui/ag-grid-react/headers/components/truncated-text.js +27 -0
  3. package/dist/components/ui/ag-grid-react/headers/custom-header-group.js +22 -15
  4. package/dist/components/ui/ag-grid-react/headers/custom-header.js +47 -43
  5. package/dist/components/ui/breadcrumb.js +1 -1
  6. package/dist/components/ui/button-group.d.ts +3 -0
  7. package/dist/components/ui/button-group.js +129 -78
  8. package/dist/components/ui/checkbox.d.ts +3 -0
  9. package/dist/components/ui/checkbox.js +64 -53
  10. package/dist/components/ui/command-palette/index.d.ts +3 -0
  11. package/dist/components/ui/command-palette/index.js +18 -13
  12. package/dist/components/ui/command-palette/shortcut-overlay-context.d.ts +23 -0
  13. package/dist/components/ui/command-palette/shortcut-overlay-context.js +28 -0
  14. package/dist/components/ui/command-palette/shortcut-overlay.d.ts +19 -0
  15. package/dist/components/ui/command-palette/shortcut-overlay.js +151 -0
  16. package/dist/components/ui/date-picker/date-range-picker.js +239 -196
  17. package/dist/components/ui/date-picker/month-range-picker.js +226 -183
  18. package/dist/components/ui/date-picker/week-range-picker.js +265 -222
  19. package/dist/components/ui/dialog.js +6 -6
  20. package/dist/components/ui/filter-panel/filter-panel.js +16 -8
  21. package/dist/components/ui/filter-strip/filter-strip.d.ts +1 -1
  22. package/dist/components/ui/filter-strip/filter-strip.js +27 -26
  23. package/dist/components/ui/input.d.ts +3 -0
  24. package/dist/components/ui/input.js +107 -43
  25. package/dist/components/ui/notification-panel/notification-panel.d.ts +4 -4
  26. package/dist/components/ui/notification-panel/notification-panel.js +78 -16
  27. package/dist/components/ui/radio-group.d.ts +3 -0
  28. package/dist/components/ui/radio-group.js +101 -52
  29. package/dist/components/ui/select/select.js +579 -554
  30. package/dist/components/ui/textarea.d.ts +3 -0
  31. package/dist/components/ui/textarea.js +104 -58
  32. package/dist/components/ui/types/filter-panel.types.d.ts +2 -0
  33. package/dist/components/ui/types/filter-strip.types.d.ts +5 -0
  34. package/dist/components/ui/types/helper-text.types.d.ts +5 -0
  35. package/dist/components/ui/types/select.types.d.ts +6 -0
  36. package/dist/icons/assets/createNewDocument.svg.js +2 -2
  37. package/dist/icons/assets/drawBrush.svg.js +5 -0
  38. package/dist/icons/assets/info-badge.svg.js +5 -0
  39. package/dist/icons/assets/priority-alert.svg.js +5 -0
  40. package/dist/icons/assets/webp/sales.webp.js +4 -0
  41. package/dist/icons/index.d.ts +4 -0
  42. package/dist/icons/index.js +253 -245
  43. package/dist/impact-nova.css +1 -1
  44. package/dist/index.js +194 -189
  45. package/package.json +1 -1
@@ -1,233 +1,276 @@
1
- import { jsxs as m, jsx as s } from "react/jsx-runtime";
1
+ import { jsxs as f, jsx as r } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
- import { X as ue } from "lucide-react";
4
- import { CalendarMonth as he, Info as ge } from "../../../icons/index.js";
3
+ import { X as he } from "lucide-react";
4
+ import { CalendarMonth as ge, Info as H } from "../../../icons/index.js";
5
5
  import { format as c, isValid as P, parse as R } from "date-fns";
6
- import { cn as N, padValidDateString as z, maskDate as H } from "../../../lib/utils.js";
7
- import { Popover as xe, PopoverTrigger as be, PopoverContent as ye } from "../popover.js";
8
- import { Calendar as we } from "../calendar.js";
9
- import { Tooltip as X, TooltipTrigger as q, TooltipContent as G } from "../tooltip.js";
10
- import { getDateFnsLocale as ke } from "../../../i18n/getDateFnsLocale.js";
11
- import { useImpactNovaI18n as De } from "../../../i18n/ImpactNovaI18nContext.js";
12
- const Pe = i.forwardRef(
6
+ import { cn as m, padValidDateString as X, maskDate as q } from "../../../lib/utils.js";
7
+ import { Popover as be, PopoverTrigger as we, PopoverContent as ye } from "../popover.js";
8
+ import { Calendar as ke } from "../calendar.js";
9
+ import { Tooltip as G, TooltipTrigger as J, TooltipContent as Q } from "../tooltip.js";
10
+ import { getDateFnsLocale as De } from "../../../i18n/getDateFnsLocale.js";
11
+ import { useImpactNovaI18n as ve } from "../../../i18n/ImpactNovaI18nContext.js";
12
+ const Ne = i.forwardRef(
13
13
  ({
14
14
  value: t,
15
15
  onChange: h,
16
16
  format: n = "MM/dd/yyyy",
17
- startPlaceholder: J,
18
- endPlaceholder: Q,
19
- minDate: U,
20
- maxDate: W,
21
- startMonth: Y,
22
- endMonth: Z,
17
+ startPlaceholder: U,
18
+ endPlaceholder: W,
19
+ minDate: Y,
20
+ maxDate: Z,
21
+ startMonth: $,
22
+ endMonth: _,
23
23
  showFooter: g = !0,
24
- disabled: y,
25
- label: V,
26
- helperText: M,
27
- prefix: Re,
28
- prefixClick: Ne,
29
- isError: v,
30
- size: T,
31
- required: $,
32
- className: _,
33
- ...F
34
- }, ee) => {
35
- const { locale: A, t: C } = De(), o = i.useMemo(() => ke(A), [A]), j = J ?? C("datePicker.startDate"), K = Q ?? C("datePicker.endDate"), L = i.useRef(null), te = i.useRef(null);
36
- i.useRef(null), i.useRef(null), i.useImperativeHandle(ee, () => L.current);
37
- const [r, u] = i.useState(!1), I = i.useRef(!1), [w, p] = i.useState(t), [k, x] = i.useState(t?.from ? c(t.from, n, { locale: o }) : ""), [D, b] = i.useState(t?.to ? c(t.to, n, { locale: o }) : ""), [ne, S] = i.useState(t?.from || /* @__PURE__ */ new Date());
24
+ disabled: k,
25
+ label: A,
26
+ helperText: C,
27
+ helperTextPosition: E = "absolute",
28
+ prefix: Pe,
29
+ prefixClick: Re,
30
+ isError: b,
31
+ size: j,
32
+ required: F,
33
+ className: ee,
34
+ ...te
35
+ }, ne) => {
36
+ const { locale: K, t: I } = ve(), o = i.useMemo(() => De(K), [K]), L = U ?? I("datePicker.startDate"), z = W ?? I("datePicker.endDate"), B = i.useRef(null), oe = i.useRef(null);
37
+ i.useRef(null), i.useRef(null), i.useImperativeHandle(ne, () => B.current);
38
+ const [l, x] = i.useState(!1), S = i.useRef(!1), [D, u] = i.useState(t), [v, w] = i.useState(t?.from ? c(t.from, n, { locale: o }) : ""), [N, y] = i.useState(t?.to ? c(t.to, n, { locale: o }) : ""), [le, V] = i.useState(t?.from || /* @__PURE__ */ new Date());
38
39
  i.useEffect(() => {
39
- r || (x(t?.from ? c(t.from, n, { locale: o }) : ""), b(t?.to ? c(t.to, n, { locale: o }) : ""), p(t));
40
- }, [t, n, r, o]), i.useEffect(() => {
41
- r && (p(t), x(t?.from ? c(t.from, n, { locale: o }) : ""), b(t?.to ? c(t.to, n, { locale: o }) : ""), S(t?.from || /* @__PURE__ */ new Date()));
42
- }, [r, t, n, o]);
43
- const oe = (e) => {
44
- p(e), e?.from && x(c(e.from, n, { locale: o })), e?.to && b(c(e.to, n, { locale: o })), g || e?.from && e?.to && e.from.getTime() !== e.to.getTime() && (h?.(e), u(!1));
45
- }, re = (e) => {
46
- let l = e !== void 0 ? e : w;
47
- l?.from && !l.to && (l = { from: l.from, to: l.from }), h?.(l), u(!1);
48
- }, E = () => {
49
- p(t), x(t?.from ? c(t.from, n, { locale: o }) : ""), b(t?.to ? c(t.to, n, { locale: o }) : ""), u(!1);
50
- }, B = () => {
51
- p(void 0), x(""), b(""), h?.(void 0), g || u(!1);
52
- }, le = (e) => {
53
- const l = e.target.value, d = H(l, n, k);
54
- if (x(d), d === "") {
55
- const a = { from: void 0, to: w?.to };
56
- p(a), g || h?.(a);
40
+ l || (w(t?.from ? c(t.from, n, { locale: o }) : ""), y(t?.to ? c(t.to, n, { locale: o }) : ""), u(t));
41
+ }, [t, n, l, o]), i.useEffect(() => {
42
+ l && (u(t), w(t?.from ? c(t.from, n, { locale: o }) : ""), y(t?.to ? c(t.to, n, { locale: o }) : ""), V(t?.from || /* @__PURE__ */ new Date()));
43
+ }, [l, t, n, o]);
44
+ const re = (e) => {
45
+ u(e), e?.from && w(c(e.from, n, { locale: o })), e?.to && y(c(e.to, n, { locale: o })), g || e?.from && e?.to && e.from.getTime() !== e.to.getTime() && (h?.(e), x(!1));
46
+ }, se = (e) => {
47
+ let s = e !== void 0 ? e : D;
48
+ s?.from && !s.to && (s = { from: s.from, to: s.from }), h?.(s), x(!1);
49
+ }, M = () => {
50
+ u(t), w(t?.from ? c(t.from, n, { locale: o }) : ""), y(t?.to ? c(t.to, n, { locale: o }) : ""), x(!1);
51
+ }, O = () => {
52
+ u(void 0), w(""), y(""), h?.(void 0), g || x(!1);
53
+ }, ie = (e) => {
54
+ const s = e.target.value, d = q(s, n, v);
55
+ if (w(d), d === "") {
56
+ const a = { from: void 0, to: D?.to };
57
+ u(a), g || h?.(a);
57
58
  return;
58
59
  }
59
- const f = R(d, n, /* @__PURE__ */ new Date(), { locale: o });
60
- if (P(f) && d.length === n.length) {
61
- const a = { from: f, to: w?.to };
62
- p(a), S(f), g || h?.(a);
60
+ const p = R(d, n, /* @__PURE__ */ new Date(), { locale: o });
61
+ if (P(p) && d.length === n.length) {
62
+ const a = { from: p, to: D?.to };
63
+ u(a), V(p), g || h?.(a);
63
64
  }
64
- }, se = (e) => {
65
- const l = e.target.value, d = H(l, n, D);
66
- if (b(d), d === "") {
67
- const a = { from: w?.from, to: void 0 };
68
- p(a), g || h?.(a);
65
+ }, ce = (e) => {
66
+ const s = e.target.value, d = q(s, n, N);
67
+ if (y(d), d === "") {
68
+ const a = { from: D?.from, to: void 0 };
69
+ u(a), g || h?.(a);
69
70
  return;
70
71
  }
71
- const f = R(d, n, /* @__PURE__ */ new Date(), { locale: o });
72
- if (P(f) && d.length === n.length) {
73
- const a = { from: w?.from, to: f };
74
- p(a), f && S(f), g || h?.(a);
72
+ const p = R(d, n, /* @__PURE__ */ new Date(), { locale: o });
73
+ if (P(p) && d.length === n.length) {
74
+ const a = { from: D?.from, to: p };
75
+ u(a), p && V(p), g || h?.(a);
75
76
  }
76
- }, O = () => {
77
- if (r) return;
78
- const e = z(k, n), l = z(D, n), d = R(e, n, /* @__PURE__ */ new Date(), { locale: o }), f = R(l, n, /* @__PURE__ */ new Date(), { locale: o }), a = P(d) && e.length === n.length, me = P(f) && l.length === n.length;
79
- !a || !me ? (x(t?.from ? c(t.from, n, { locale: o }) : ""), b(t?.to ? c(t.to, n, { locale: o }) : ""), p(t)) : (x(e), b(l), g || h?.({ from: d, to: f }));
80
- }, ie = t?.from ? c(t.from, n, { locale: o }) : "", ce = t?.to ? c(t.to, n, { locale: o }) : "", ae = k !== ie, de = D !== ce, fe = k.length === n.length && !P(R(k, n, /* @__PURE__ */ new Date(), { locale: o })), pe = D.length === n.length && !P(R(D, n, /* @__PURE__ */ new Date(), { locale: o }));
81
- return /* @__PURE__ */ m("div", { className: "flex w-full min-w-[240px] flex-col gap-[6px]", "data-component": "date-range-picker", "data-disabled": y || void 0, children: [
82
- /* @__PURE__ */ m("div", { className: "flex flex-col gap-[6px]", children: [
83
- V && /* @__PURE__ */ m(
77
+ }, T = () => {
78
+ if (l) return;
79
+ const e = X(v, n), s = X(N, n), d = R(e, n, /* @__PURE__ */ new Date(), { locale: o }), p = R(s, n, /* @__PURE__ */ new Date(), { locale: o }), a = P(d) && e.length === n.length, xe = P(p) && s.length === n.length;
80
+ !a || !xe ? (w(t?.from ? c(t.from, n, { locale: o }) : ""), y(t?.to ? c(t.to, n, { locale: o }) : ""), u(t)) : (w(e), y(s), g || h?.({ from: d, to: p }));
81
+ }, ae = t?.from ? c(t.from, n, { locale: o }) : "", de = t?.to ? c(t.to, n, { locale: o }) : "", fe = v !== ae, pe = N !== de, me = v.length === n.length && !P(R(v, n, /* @__PURE__ */ new Date(), { locale: o })), ue = N.length === n.length && !P(R(N, n, /* @__PURE__ */ new Date(), { locale: o }));
82
+ return /* @__PURE__ */ f("div", { className: "flex w-full min-w-[240px] flex-col gap-[6px]", "data-component": "date-range-picker", "data-disabled": k || void 0, children: [
83
+ /* @__PURE__ */ f("div", { className: "flex flex-col gap-[6px]", children: [
84
+ A && /* @__PURE__ */ f(
84
85
  "label",
85
86
  {
86
- className: N(
87
+ className: m(
87
88
  "text-xs font-medium leading-[18px] text-content-tertiary",
88
- y && "opacity-70",
89
- v && "text-destructive"
89
+ k && "opacity-70",
90
+ b && "text-destructive"
90
91
  ),
91
92
  children: [
92
- V,
93
+ A,
93
94
  " ",
94
- $ && /* @__PURE__ */ s("span", { className: "text-destructive", children: "*" })
95
+ F && /* @__PURE__ */ r("span", { className: "text-destructive", children: "*" })
95
96
  ]
96
97
  }
97
98
  ),
98
- /* @__PURE__ */ m(xe, { open: r, onOpenChange: u, children: [
99
- /* @__PURE__ */ s(be, { asChild: !0, children: /* @__PURE__ */ m(
100
- "div",
101
- {
102
- "data-state": r ? "open" : "closed",
103
- className: N(
104
- "flex w-full items-center justify-between gap-2 rounded-md border bg-canvas-elevated px-3 text-sm shadow-sm transition-colors hover:border-brand disabled:cursor-not-allowed disabled:bg-disabled-surface disabled:text-disabled-foreground disabled:border-stroke",
105
- v ? "border-destructive hover:border-destructive" : "border-field",
106
- T === "sm" ? "h-6" : T === "md" ? "h-[28px]" : "h-8",
107
- y && "pointer-events-none opacity-100 bg-disabled-surface border-stroke text-disabled-foreground hover:border-stroke",
108
- "cursor-pointer",
109
- _
110
- ),
111
- children: [
112
- /* @__PURE__ */ m("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
113
- /* @__PURE__ */ s(
114
- "input",
115
- {
116
- ref: L,
117
- type: "text",
118
- value: k,
119
- onChange: le,
120
- onBlur: O,
121
- onClick: (e) => r && e.stopPropagation(),
122
- onKeyDown: (e) => {
123
- (e.key === "Enter" || e.key === "ArrowDown") && !r && (e.preventDefault(), I.current = !0, u(!0)), e.key === "Escape" && r && (e.preventDefault(), E());
124
- },
125
- placeholder: r ? n : j,
126
- disabled: !!y,
127
- "aria-label": j,
128
- "data-field": "start",
129
- className: N(
130
- "flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-content-empty disabled:cursor-not-allowed disabled:opacity-50",
131
- fe ? "text-destructive" : ae ? "text-content-muted" : ""
132
- ),
133
- ...F
134
- }
135
- ),
136
- /* @__PURE__ */ s(
137
- "input",
138
- {
139
- ref: te,
140
- type: "text",
141
- value: D,
142
- onChange: se,
143
- onBlur: O,
144
- onClick: (e) => r && e.stopPropagation(),
145
- onKeyDown: (e) => {
146
- (e.key === "Enter" || e.key === "ArrowDown") && !r && (e.preventDefault(), I.current = !0, u(!0)), e.key === "Escape" && r && (e.preventDefault(), E());
147
- },
148
- placeholder: r ? n : K,
149
- disabled: !!y,
150
- "aria-label": K,
151
- "data-field": "end",
152
- className: N(
153
- "flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-content-empty disabled:cursor-not-allowed disabled:opacity-50",
154
- pe ? "text-destructive" : de ? "text-content-muted" : ""
155
- )
156
- }
157
- )
158
- ] }),
159
- /* @__PURE__ */ m("div", { className: "flex items-center gap-1 shrink-0", children: [
160
- t?.from && !y && /* @__PURE__ */ m(X, { children: [
161
- /* @__PURE__ */ s(q, { asChild: !0, children: /* @__PURE__ */ s(
162
- ue,
99
+ /* @__PURE__ */ f(
100
+ "div",
101
+ {
102
+ className: m(
103
+ "w-full",
104
+ C && E === "absolute" && "relative"
105
+ ),
106
+ children: [
107
+ /* @__PURE__ */ f(be, { open: l, onOpenChange: x, children: [
108
+ /* @__PURE__ */ r(we, { asChild: !0, children: /* @__PURE__ */ f(
109
+ "div",
110
+ {
111
+ "data-state": l ? "open" : "closed",
112
+ className: m(
113
+ "flex w-full items-center justify-between gap-2 rounded-md border bg-canvas-elevated px-3 text-sm shadow-sm transition-colors hover:border-brand disabled:cursor-not-allowed disabled:bg-disabled-surface disabled:text-disabled-foreground disabled:border-stroke",
114
+ b ? "border-destructive hover:border-destructive" : "border-field",
115
+ j === "sm" ? "h-6" : j === "md" ? "h-[28px]" : "h-8",
116
+ k && "pointer-events-none opacity-100 bg-disabled-surface border-stroke text-disabled-foreground hover:border-stroke",
117
+ "cursor-pointer",
118
+ ee
119
+ ),
120
+ children: [
121
+ /* @__PURE__ */ f("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
122
+ /* @__PURE__ */ r(
123
+ "input",
124
+ {
125
+ ref: B,
126
+ type: "text",
127
+ value: v,
128
+ onChange: ie,
129
+ onBlur: T,
130
+ onClick: (e) => l && e.stopPropagation(),
131
+ onKeyDown: (e) => {
132
+ (e.key === "Enter" || e.key === "ArrowDown") && !l && (e.preventDefault(), S.current = !0, x(!0)), e.key === "Escape" && l && (e.preventDefault(), M());
133
+ },
134
+ placeholder: l ? n : L,
135
+ disabled: !!k,
136
+ "aria-label": L,
137
+ "data-field": "start",
138
+ className: m(
139
+ "flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-content-empty disabled:cursor-not-allowed disabled:opacity-50",
140
+ me ? "text-destructive" : fe ? "text-content-muted" : ""
141
+ ),
142
+ ...te
143
+ }
144
+ ),
145
+ /* @__PURE__ */ r(
146
+ "input",
147
+ {
148
+ ref: oe,
149
+ type: "text",
150
+ value: N,
151
+ onChange: ce,
152
+ onBlur: T,
153
+ onClick: (e) => l && e.stopPropagation(),
154
+ onKeyDown: (e) => {
155
+ (e.key === "Enter" || e.key === "ArrowDown") && !l && (e.preventDefault(), S.current = !0, x(!0)), e.key === "Escape" && l && (e.preventDefault(), M());
156
+ },
157
+ placeholder: l ? n : z,
158
+ disabled: !!k,
159
+ "aria-label": z,
160
+ "data-field": "end",
161
+ className: m(
162
+ "flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-content-empty disabled:cursor-not-allowed disabled:opacity-50",
163
+ ue ? "text-destructive" : pe ? "text-content-muted" : ""
164
+ )
165
+ }
166
+ )
167
+ ] }),
168
+ /* @__PURE__ */ f("div", { className: "flex items-center gap-1 shrink-0", children: [
169
+ t?.from && !k && /* @__PURE__ */ f(G, { children: [
170
+ /* @__PURE__ */ r(J, { asChild: !0, children: /* @__PURE__ */ r(
171
+ he,
172
+ {
173
+ className: "h-4 w-4 cursor-pointer hover:text-content text-content-muted",
174
+ onClick: (e) => {
175
+ e.stopPropagation(), O();
176
+ }
177
+ }
178
+ ) }),
179
+ /* @__PURE__ */ r(Q, { variant: "tertiary", side: "top", children: I("calendar.clear") })
180
+ ] }),
181
+ /* @__PURE__ */ f(G, { children: [
182
+ /* @__PURE__ */ r(J, { asChild: !0, children: /* @__PURE__ */ r("button", { type: "button", tabIndex: 0, "aria-label": I("datePicker.selectMonthRange"), onClick: (e) => {
183
+ e.stopPropagation(), x(!l);
184
+ }, onKeyDown: (e) => {
185
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), S.current = !0, x(!l));
186
+ }, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ r(ge, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
187
+ /* @__PURE__ */ r(Q, { variant: "tertiary", side: "top", children: I("datePicker.selectMonthRange") })
188
+ ] })
189
+ ] })
190
+ ]
191
+ }
192
+ ) }),
193
+ /* @__PURE__ */ r(
194
+ ye,
195
+ {
196
+ className: "w-auto p-0",
197
+ align: "start",
198
+ onOpenAutoFocus: (e) => {
199
+ S.current || e.preventDefault(), S.current = !1;
200
+ },
201
+ children: /* @__PURE__ */ r(
202
+ ke,
163
203
  {
164
- className: "h-4 w-4 cursor-pointer hover:text-content text-content-muted",
165
- onClick: (e) => {
166
- e.stopPropagation(), B();
167
- }
204
+ mode: "range",
205
+ selected: D,
206
+ onSelect: re,
207
+ month: le,
208
+ onMonthChange: V,
209
+ disabled: { before: Y, after: Z },
210
+ startMonth: $,
211
+ endMonth: _,
212
+ showFooter: g,
213
+ onApply: se,
214
+ onCancel: M,
215
+ onClear: O,
216
+ captionLayout: "dropdown"
168
217
  }
169
- ) }),
170
- /* @__PURE__ */ s(G, { variant: "tertiary", side: "top", children: C("calendar.clear") })
171
- ] }),
172
- /* @__PURE__ */ m(X, { children: [
173
- /* @__PURE__ */ s(q, { asChild: !0, children: /* @__PURE__ */ s("button", { type: "button", tabIndex: 0, "aria-label": C("datePicker.selectMonthRange"), onClick: (e) => {
174
- e.stopPropagation(), u(!r);
175
- }, onKeyDown: (e) => {
176
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), I.current = !0, u(!r));
177
- }, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ s(he, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
178
- /* @__PURE__ */ s(G, { variant: "tertiary", side: "top", children: C("datePicker.selectMonthRange") })
179
- ] })
180
- ] })
181
- ]
182
- }
183
- ) }),
184
- /* @__PURE__ */ s(
185
- ye,
186
- {
187
- className: "w-auto p-0",
188
- align: "start",
189
- onOpenAutoFocus: (e) => {
190
- I.current || e.preventDefault(), I.current = !1;
191
- },
192
- children: /* @__PURE__ */ s(
193
- we,
194
- {
195
- mode: "range",
196
- selected: w,
197
- onSelect: oe,
198
- month: ne,
199
- onMonthChange: S,
200
- disabled: { before: U, after: W },
201
- startMonth: Y,
202
- endMonth: Z,
203
- showFooter: g,
204
- onApply: re,
205
- onCancel: E,
206
- onClear: B,
207
- captionLayout: "dropdown"
208
- }
209
- )
210
- }
211
- )
212
- ] })
218
+ )
219
+ }
220
+ )
221
+ ] }),
222
+ C && E === "absolute" && /* @__PURE__ */ f("div", { className: m("absolute left-0 top-full z-10 mt-1 flex min-w-0 max-w-full items-center gap-[6px]", b && "text-destructive"), children: [
223
+ /* @__PURE__ */ r(
224
+ H,
225
+ {
226
+ size: "xs",
227
+ className: m(
228
+ "shrink-0",
229
+ b ? "text-destructive" : "text-content-muted"
230
+ )
231
+ }
232
+ ),
233
+ /* @__PURE__ */ r(
234
+ "p",
235
+ {
236
+ className: m(
237
+ "min-w-0 text-[12px] font-medium leading-[18px] text-navigation-muted",
238
+ b && "text-destructive"
239
+ ),
240
+ children: C
241
+ }
242
+ )
243
+ ] })
244
+ ]
245
+ }
246
+ )
213
247
  ] }),
214
- M && /* @__PURE__ */ m("div", { className: N("flex items-center gap-[6px]", v && "text-destructive"), children: [
215
- !v && /* @__PURE__ */ s(ge, { size: 10, className: "shrink-0 text-content-muted" }),
216
- /* @__PURE__ */ s(
248
+ C && E === "flow" && /* @__PURE__ */ f("div", { className: m("flex items-center gap-[6px]", b && "text-destructive"), children: [
249
+ /* @__PURE__ */ r(
250
+ H,
251
+ {
252
+ size: "xs",
253
+ className: m(
254
+ "shrink-0",
255
+ b ? "text-destructive" : "text-content-muted"
256
+ )
257
+ }
258
+ ),
259
+ /* @__PURE__ */ r(
217
260
  "p",
218
261
  {
219
- className: N(
220
- "text-[10px] leading-4 text-navigation-muted",
221
- v && "text-destructive"
262
+ className: m(
263
+ "text-[12px] font-medium leading-[18px] text-navigation-muted",
264
+ b && "text-destructive"
222
265
  ),
223
- children: M
266
+ children: C
224
267
  }
225
268
  )
226
269
  ] })
227
270
  ] });
228
271
  }
229
272
  );
230
- Pe.displayName = "DateRangePicker";
273
+ Ne.displayName = "DateRangePicker";
231
274
  export {
232
- Pe as DateRangePicker
275
+ Ne as DateRangePicker
233
276
  };