impact-nova 2.2.2 → 2.2.4

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 (58) hide show
  1. package/dist/components/data/ag-grid-react/headers/custom-header.js +133 -110
  2. package/dist/components/data/ag-grid-react/headers/header-search-input.js +23 -23
  3. package/dist/components/data/ag-grid-react/index.js +202 -206
  4. package/dist/components/data/data-table/build-column-tree-from-grid.js +65 -67
  5. package/dist/components/data/data-table/data-table-column-list-sync.js +5 -10
  6. package/dist/components/data/data-table/data-table-column-list.js +64 -61
  7. package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +29 -0
  8. package/dist/components/data/data-table/data-table-column-tree-cache.js +117 -0
  9. package/dist/components/data/data-table/data-table-constants.d.ts +2 -0
  10. package/dist/components/data/data-table/data-table-constants.js +3 -2
  11. package/dist/components/data/data-table/data-table-sheet.js +46 -49
  12. package/dist/components/data/data-table/data-table.js +137 -119
  13. package/dist/components/data/data-table/index.js +24 -23
  14. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +3 -0
  15. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +24 -0
  16. package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +2 -1
  17. package/dist/components/data/data-table/use-data-table-column-list-sync.js +249 -150
  18. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +6 -7
  19. package/dist/components/data/nested-list/components/NestedListContent.js +158 -96
  20. package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -0
  21. package/dist/components/data/nested-list/nested-list-constants.js +6 -0
  22. package/dist/components/data/nested-list/nested-list-tree-utils.d.ts +3 -0
  23. package/dist/components/data/nested-list/nested-list-tree-utils.js +24 -0
  24. package/dist/components/data/nested-list/nested-list.js +214 -215
  25. package/dist/components/data-display/calendar/calendar-day-picker-view.d.ts +3 -2
  26. package/dist/components/data-display/calendar/calendar-day-picker-view.js +70 -68
  27. package/dist/components/data-display/calendar/calendar-week-number-cell.js +29 -29
  28. package/dist/components/data-display/calendar/calendar.js +96 -94
  29. package/dist/components/data-display/calendar/calendar.types.d.ts +2 -0
  30. package/dist/components/data-display/card/card.js +6 -5
  31. package/dist/components/feedback/dialog/dialog.js +7 -5
  32. package/dist/components/feedback/sheet/sheet.js +28 -27
  33. package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
  34. package/dist/components/flows/filter-panel/filter-panel.js +61 -57
  35. package/dist/components/flows/filter-strip/filter-tag-list.js +33 -33
  36. package/dist/components/forms/combobox/combobox.js +110 -100
  37. package/dist/components/forms/date-picker/date-input-behavior.d.ts +9 -0
  38. package/dist/components/forms/date-picker/date-input-behavior.js +32 -19
  39. package/dist/components/forms/date-picker/date-picker.js +96 -90
  40. package/dist/components/forms/date-picker/date-range-picker.js +160 -152
  41. package/dist/components/forms/date-picker/month-picker.js +71 -65
  42. package/dist/components/forms/date-picker/month-range-picker.js +153 -145
  43. package/dist/components/forms/date-picker/multi-date-picker.js +127 -99
  44. package/dist/components/forms/date-picker/multi-month-picker.js +109 -97
  45. package/dist/components/forms/date-picker/multi-week-picker.js +98 -86
  46. package/dist/components/forms/date-picker/week-picker.js +82 -76
  47. package/dist/components/forms/date-picker/week-range-picker.js +127 -119
  48. package/dist/impact-nova-base.scss +10 -5
  49. package/dist/impact-nova-components.css +9 -5
  50. package/dist/impact-nova.css +1 -1
  51. package/dist/index.js +189 -188
  52. package/dist/lib/overlay/overlay-portal-context.d.ts +11 -2
  53. package/dist/lib/overlay/overlay-portal-context.js +39 -28
  54. package/dist/lib/primitives/create-compound.d.ts +5 -0
  55. package/dist/lib/primitives/create-compound.js +17 -16
  56. package/dist/llms/rules/installation.js +1 -1
  57. package/dist/llms/rules/requirements.js +1 -1
  58. package/package.json +2 -1
@@ -1,142 +1,142 @@
1
- import { jsx as u, jsxs as E } from "react/jsx-runtime";
2
- import * as a from "react";
1
+ import { jsx as m, jsxs as E } from "react/jsx-runtime";
2
+ import * as c from "react";
3
3
  import { Cross as Ve, CalendarMonth as Oe } from "impact-nova-icons";
4
- import { format as x } from "date-fns";
5
- import { cn as O } from "../../../lib/utils.js";
6
- import { usePickerDismissActionsRef as Ke, usePickerFooterDismissNudge as je, createRangePickerOpenChangeHandler as Le, parseDateInput as K, normalizeOrderedRange as qe, flashRangeReorder as ze, isDateInputInvalid as $, resolveRangeFieldBlur as N, resolveRangePickerDismissFlash as He, compareDates as j, deferRangeInputBlur as Ge, maskDateInput as F, resolveDateInputOnBlur as S } from "./date-input-behavior.js";
7
- import { useFieldChrome as Je } from "../../../lib/primitives/use-field-chrome.js";
8
- import { Popover as Qe, PopoverAnchor as Ue, PopoverContent as We } from "../../feedback/popover/popover.js";
9
- import { Calendar as Xe } from "../../data-display/calendar/calendar.js";
10
- import { Tooltip as ee, TooltipTrigger as te, TooltipContent as re } from "../../feedback/tooltip/tooltip.js";
11
- import { useImpactNovaI18n as Ye } from "../../../i18n/use-impact-nova-i18n.js";
12
- import { getDateFnsLocale as Ze } from "../../../i18n/getDateFnsLocale.js";
13
- import { coerceDateRangeApply as _e, coerceDateRange as $e } from "./calendar-selection-adapters.js";
14
- import { buildDateBoundsMatcher as Fe } from "../../../lib/date-bounds-matcher.js";
15
- function et(r, c) {
16
- if (!r && !c) return !0;
17
- if (!r || !c) return !1;
18
- const n = !r.from && !c.from || r.from && c.from && j(r.from, c.from) === 0, A = !r.to && !c.to || r.to && c.to && j(r.to, c.to) === 0;
4
+ import { format as D } from "date-fns";
5
+ import { cn as K } from "../../../lib/utils.js";
6
+ import { usePickerDismissActionsRef as Ke, usePickerFooterDismissNudge as je, createRangePickerOpenChangeHandler as Le, parseDateInput as j, normalizeOrderedRange as qe, flashRangeReorder as ze, isDateInputInvalid as F, resolveRangeFieldBlur as N, resolveRangePickerDismissFlash as He, handlePickerSurfacePointerDown as Ge, compareDates as L, deferRangeInputBlur as Je, maskDateInput as ee, resolveDateInputOnBlur as S } from "./date-input-behavior.js";
7
+ import { useFieldChrome as Qe } from "../../../lib/primitives/use-field-chrome.js";
8
+ import { Popover as Ue, PopoverAnchor as We, PopoverContent as Xe } from "../../feedback/popover/popover.js";
9
+ import { Calendar as Ye } from "../../data-display/calendar/calendar.js";
10
+ import { Tooltip as te, TooltipTrigger as re, TooltipContent as oe } from "../../feedback/tooltip/tooltip.js";
11
+ import { useImpactNovaI18n as Ze } from "../../../i18n/use-impact-nova-i18n.js";
12
+ import { getDateFnsLocale as _e } from "../../../i18n/getDateFnsLocale.js";
13
+ import { coerceDateRangeApply as $e, coerceDateRange as Fe } from "./calendar-selection-adapters.js";
14
+ import { buildDateBoundsMatcher as et } from "../../../lib/date-bounds-matcher.js";
15
+ function tt(r, a) {
16
+ if (!r && !a) return !0;
17
+ if (!r || !a) return !1;
18
+ const n = !r.from && !a.from || r.from && a.from && L(r.from, a.from) === 0, A = !r.to && !a.to || r.to && a.to && L(r.to, a.to) === 0;
19
19
  return !!(n && A);
20
20
  }
21
- const tt = a.forwardRef(
21
+ const rt = c.forwardRef(
22
22
  ({
23
23
  value: r,
24
- onChange: c,
24
+ onChange: a,
25
25
  format: n = "MM/dd/yyyy",
26
26
  startPlaceholder: A,
27
- endPlaceholder: oe,
28
- minDate: ne,
29
- maxDate: se,
30
- startMonth: ie,
31
- endMonth: le,
27
+ endPlaceholder: ne,
28
+ minDate: se,
29
+ maxDate: ie,
30
+ startMonth: le,
31
+ endMonth: ce,
32
32
  showFooter: g = !0,
33
- weekStartsOn: L,
33
+ weekStartsOn: q,
34
34
  disabled: f,
35
35
  label: ae,
36
- helperText: ce,
37
- helperTextPosition: fe = "absolute",
38
- prefix: rt,
39
- prefixClick: ot,
40
- isError: de,
41
- error: pe,
42
- size: q,
36
+ helperText: fe,
37
+ helperTextPosition: de = "absolute",
38
+ prefix: ot,
39
+ prefixClick: nt,
40
+ isError: pe,
41
+ error: ue,
42
+ size: z,
43
43
  required: me,
44
- className: ue,
45
- ...ge
46
- }, he) => {
47
- const { locale: z, t: b } = Ye(), s = a.useMemo(() => Ze(z), [z]), H = A ?? b("datePicker.startDate"), G = oe ?? b("datePicker.endDate"), J = pe ?? de, ye = Je({
44
+ className: ge,
45
+ ...he
46
+ }, ye) => {
47
+ const { locale: H, t: b } = Ze(), s = c.useMemo(() => _e(H), [H]), G = A ?? b("datePicker.startDate"), J = ne ?? b("datePicker.endDate"), Q = ue ?? pe, Re = Qe({
48
48
  label: ae,
49
- helperText: ce,
50
- helperTextPosition: fe,
51
- error: J,
49
+ helperText: fe,
50
+ helperTextPosition: de,
51
+ error: Q,
52
52
  required: me,
53
53
  disabled: f ?? void 0,
54
54
  rootClassName: "w-full min-w-[240px]"
55
- }), Q = a.useRef(null), Re = a.useRef(null), U = a.useRef(null), T = a.useRef(null), M = a.useRef(null);
56
- a.useImperativeHandle(he, () => Q.current);
57
- const [p, h] = a.useState(!1), W = Ke(), { footerFlashKey: xe, footerFlashTarget: De, popoverHandlers: ke } = je(g, p, W, U), I = a.useRef(!1), [d, y] = a.useState(r), [m, D] = a.useState(r?.from ? x(r.from, n, { locale: s }) : ""), [R, k] = a.useState(r?.to ? x(r.to, n, { locale: s }) : ""), [ve, P] = a.useState(r?.from || /* @__PURE__ */ new Date()), v = r?.from ? x(r.from, n, { locale: s }) : "", C = r?.to ? x(r.to, n, { locale: s }) : "";
58
- a.useEffect(() => {
59
- D(r?.from ? x(r.from, n, { locale: s }) : ""), k(r?.to ? x(r.to, n, { locale: s }) : ""), y(r);
55
+ }), M = c.useRef(null), U = c.useRef(null), W = c.useRef(null), T = c.useRef(null), V = c.useRef(null);
56
+ c.useImperativeHandle(ye, () => M.current);
57
+ const [p, h] = c.useState(!1), X = Ke(), { footerFlashKey: De, footerFlashTarget: ke, popoverHandlers: xe } = je(g, p, X, W), P = c.useRef(!1), [d, y] = c.useState(r), [u, k] = c.useState(r?.from ? D(r.from, n, { locale: s }) : ""), [R, x] = c.useState(r?.to ? D(r.to, n, { locale: s }) : ""), [ve, I] = c.useState(r?.from || /* @__PURE__ */ new Date()), v = r?.from ? D(r.from, n, { locale: s }) : "", C = r?.to ? D(r.to, n, { locale: s }) : "";
58
+ c.useEffect(() => {
59
+ k(r?.from ? D(r.from, n, { locale: s }) : ""), x(r?.to ? D(r.to, n, { locale: s }) : ""), y(r);
60
60
  }, [r, n, s]);
61
- const Ce = a.useCallback(
61
+ const Ce = c.useCallback(
62
62
  (e) => Le({
63
63
  disabled: f ?? void 0,
64
64
  showFooter: g,
65
65
  containerRef: T,
66
- popoverContentRef: M,
66
+ popoverContentRef: V,
67
67
  setOpen: h
68
68
  })(e),
69
69
  [f, g]
70
- ), X = a.useRef(!1);
71
- a.useEffect(() => {
72
- if (p && !X.current) {
73
- const e = K(m, n, s);
74
- e.parsed ? P(e.parsed) : d?.from ? P(d.from) : r?.from && P(r.from);
70
+ ), Y = c.useRef(!1);
71
+ c.useEffect(() => {
72
+ if (p && !Y.current) {
73
+ const e = j(u, n, s);
74
+ e.parsed ? I(e.parsed) : d?.from ? I(d.from) : r?.from && I(r.from);
75
75
  }
76
- X.current = p;
77
- }, [p, m, n, s, d?.from, r?.from]);
76
+ Y.current = p;
77
+ }, [p, u, n, s, d?.from, r?.from]);
78
78
  const be = (e) => {
79
- const t = $e(e);
80
- y(t), t?.from && D(x(t.from, n, { locale: s })), t?.to && k(x(t.to, n, { locale: s })), g || t?.from && t?.to && t.from.getTime() !== t.to.getTime() && (c?.(t), h(!1));
81
- }, w = a.useCallback((e, t) => {
82
- const o = qe(e, t, j);
83
- return o.swapped && (o.from && D(x(o.from, n, { locale: s })), o.to && k(x(o.to, n, { locale: s })), ze(T.current)), { from: o.from, to: o.to };
84
- }, [n, s]), Y = (e) => {
85
- let t = _e(e, d);
79
+ const t = Fe(e);
80
+ y(t), t?.from && k(D(t.from, n, { locale: s })), t?.to && x(D(t.to, n, { locale: s })), g || t?.from && t?.to && t.from.getTime() !== t.to.getTime() && (a?.(t), h(!1));
81
+ }, w = c.useCallback((e, t) => {
82
+ const o = qe(e, t, L);
83
+ return o.swapped && (o.from && k(D(o.from, n, { locale: s })), o.to && x(D(o.to, n, { locale: s })), ze(T.current)), { from: o.from, to: o.to };
84
+ }, [n, s]), Z = (e) => {
85
+ let t = $e(e, d);
86
86
  t?.from && !t.to && (t = { from: t.from, to: t.from });
87
87
  const o = w(t?.from, t?.to);
88
- y({ from: o.from, to: o.to }), c?.({ from: o.from, to: o.to }), h(!1);
88
+ y({ from: o.from, to: o.to }), a?.({ from: o.from, to: o.to }), h(!1);
89
89
  }, B = () => {
90
- y(r), D(r?.from ? x(r.from, n, { locale: s }) : ""), k(r?.to ? x(r.to, n, { locale: s }) : ""), h(!1);
91
- }, V = () => {
92
- y(void 0), D(""), k(""), c?.(void 0), g || h(!1);
93
- }, Ie = (e) => {
94
- const t = F(e.target.value, n, m);
95
- if (D(t), t === "") {
90
+ y(r), k(r?.from ? D(r.from, n, { locale: s }) : ""), x(r?.to ? D(r.to, n, { locale: s }) : ""), h(!1);
91
+ }, O = () => {
92
+ y(void 0), k(""), x(""), a?.(void 0), g || h(!1);
93
+ }, Pe = (e) => {
94
+ const t = ee(e.target.value, n, u);
95
+ if (k(t), t === "") {
96
96
  const l = { from: void 0, to: d?.to };
97
- y(l), g || c?.(l);
97
+ y(l), g || a?.(l);
98
98
  return;
99
99
  }
100
- const { parsed: o, isValid: i } = K(t, n, s);
100
+ const { parsed: o, isValid: i } = j(t, n, s);
101
101
  if (i && o) {
102
102
  const l = { from: o, to: d?.to };
103
- y(l), P(o), g || c?.(l);
103
+ y(l), I(o), g || a?.(l);
104
104
  }
105
- }, Pe = (e) => {
106
- const t = F(e.target.value, n, R);
107
- if (k(t), t === "") {
105
+ }, Ie = (e) => {
106
+ const t = ee(e.target.value, n, R);
107
+ if (x(t), t === "") {
108
108
  const l = { from: d?.from, to: void 0 };
109
- y(l), g || c?.(l);
109
+ y(l), g || a?.(l);
110
110
  return;
111
111
  }
112
- const { parsed: o, isValid: i } = K(t, n, s);
112
+ const { parsed: o, isValid: i } = j(t, n, s);
113
113
  if (i && o) {
114
114
  const l = { from: d?.from, to: o };
115
- y(l), P(o), g || c?.(l);
115
+ y(l), I(o), g || a?.(l);
116
116
  }
117
- }, Z = () => {
118
- Ge(
117
+ }, _ = () => {
118
+ Je(
119
119
  T,
120
- M,
120
+ V,
121
121
  () => {
122
- const e = N(m, n, v, s), t = N(R, n, C, s);
123
- e.resetToCommitted ? D(v) : e.parsed && D(e.display), t.resetToCommitted ? k(C) : t.parsed && k(t.display);
122
+ const e = N(u, n, v, s), t = N(R, n, C, s);
123
+ e.resetToCommitted ? k(v) : e.parsed && k(e.display), t.resetToCommitted ? x(C) : t.parsed && x(t.display);
124
124
  let o = e.parsed ? e.parsed : e.resetToCommitted ? r?.from : d?.from, i = t.parsed ? t.parsed : t.resetToCommitted ? r?.to : d?.to;
125
125
  o && i && ({ from: o, to: i } = w(o, i));
126
126
  const l = o || i ? { from: o, to: i } : void 0;
127
- y(l), g || (l ? c?.(l) : !m && !R && c?.(void 0));
127
+ y(l), g || (l ? a?.(l) : !u && !R && a?.(void 0));
128
128
  }
129
129
  );
130
130
  }, Ee = () => {
131
- const e = S(m, n, v, s), t = S(R, n, C, s);
132
- e.resetToCommitted ? D(v) : e.parsed && D(e.display), t.resetToCommitted ? k(C) : t.parsed && k(t.display);
131
+ const e = S(u, n, v, s), t = S(R, n, C, s);
132
+ e.resetToCommitted ? k(v) : e.parsed && k(e.display), t.resetToCommitted ? x(C) : t.parsed && x(t.display);
133
133
  let o = e.parsed ?? d?.from ?? r?.from, i = t.parsed ?? d?.to ?? r?.to;
134
134
  o && i && ({ from: o, to: i } = w(o, i));
135
135
  const l = o || i ? { from: o, to: i } : void 0;
136
- l ? (y(l), c?.(l)) : !m && !R && (y(void 0), c?.(void 0));
137
- }, _ = () => {
136
+ l ? (y(l), a?.(l)) : !u && !R && (y(void 0), a?.(void 0));
137
+ }, $ = () => {
138
138
  if (p && g) {
139
- Y();
139
+ Z();
140
140
  return;
141
141
  }
142
142
  if (!p) {
@@ -144,27 +144,27 @@ const tt = a.forwardRef(
144
144
  Ee();
145
145
  return;
146
146
  }
147
- const e = S(m, n, v, s), t = S(R, n, C, s);
147
+ const e = S(u, n, v, s), t = S(R, n, C, s);
148
148
  if (e.parsed || t.parsed) return;
149
- I.current = !0, h(!0);
149
+ P.current = !0, h(!0);
150
150
  }
151
- }, we = m !== v, Te = R !== C, Be = $(m, n, s), Ne = $(R, n, s), Se = a.useCallback(() => {
152
- const e = N(m, n, v, s), t = N(R, n, C, s);
151
+ }, we = u !== v, Te = R !== C, Be = F(u, n, s), Ne = F(R, n, s), Se = c.useCallback(() => {
152
+ const e = N(u, n, v, s), t = N(R, n, C, s);
153
153
  let o = e.parsed ? e.parsed : e.resetToCommitted ? r?.from : d?.from, i = t.parsed ? t.parsed : t.resetToCommitted ? r?.to : d?.to;
154
154
  o && i && ({ from: o, to: i } = w(o, i));
155
155
  const l = o || i ? { from: o, to: i } : void 0;
156
156
  return He({
157
- startInput: m,
157
+ startInput: u,
158
158
  endInput: R,
159
159
  committedStart: v,
160
160
  committedEnd: C,
161
161
  committedRange: r,
162
162
  pendingRange: d,
163
163
  computeEffectiveRange: () => l,
164
- rangesEqual: (Ae, Me) => et(Ae, Me)
164
+ rangesEqual: (Ae, Me) => tt(Ae, Me)
165
165
  });
166
166
  }, [
167
- m,
167
+ u,
168
168
  R,
169
169
  v,
170
170
  C,
@@ -174,74 +174,82 @@ const tt = a.forwardRef(
174
174
  s,
175
175
  w
176
176
  ]);
177
- return a.useLayoutEffect(() => {
178
- W.current = {
177
+ return c.useLayoutEffect(() => {
178
+ X.current = {
179
179
  onDismiss: B,
180
180
  resolveFlash: Se
181
181
  };
182
- }), /* @__PURE__ */ u(
182
+ }), /* @__PURE__ */ m(
183
183
  "div",
184
184
  {
185
- ref: U,
185
+ ref: W,
186
186
  "data-component": "date-range-picker",
187
187
  "data-disabled": f || void 0,
188
- children: ye.wrapControl(
189
- /* @__PURE__ */ E(Qe, { open: f ? !1 : p, onOpenChange: Ce, children: [
190
- /* @__PURE__ */ u(Ue, { asChild: !0, children: /* @__PURE__ */ E(
188
+ children: Re.wrapControl(
189
+ /* @__PURE__ */ E(Ue, { open: f ? !1 : p, onOpenChange: Ce, children: [
190
+ /* @__PURE__ */ m(We, { asChild: !0, children: /* @__PURE__ */ E(
191
191
  "div",
192
192
  {
193
193
  ref: T,
194
194
  "data-state": p ? "open" : "closed",
195
- className: O(
195
+ onPointerDown: (e) => Ge({
196
+ disabled: f,
197
+ event: e,
198
+ onOpen: () => h(!0),
199
+ focusField: (t) => {
200
+ t === "end" ? U.current?.focus() : M.current?.focus();
201
+ }
202
+ }),
203
+ className: K(
196
204
  "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",
197
- J ? "border-destructive hover:border-destructive" : "border-field",
198
- q === "sm" ? "h-6" : q === "md" ? "h-[28px]" : "h-8",
205
+ Q ? "border-destructive hover:border-destructive" : "border-field",
206
+ z === "sm" ? "h-6" : z === "md" ? "h-[28px]" : "h-8",
199
207
  f && "pointer-events-none opacity-100 bg-disabled-surface border-stroke text-disabled-foreground hover:border-stroke",
200
208
  "cursor-pointer",
201
- ue
209
+ ge
202
210
  ),
203
211
  children: [
204
212
  /* @__PURE__ */ E("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
205
- /* @__PURE__ */ u(
213
+ /* @__PURE__ */ m(
206
214
  "input",
207
215
  {
208
- ref: Q,
216
+ ref: M,
209
217
  type: "text",
210
- value: m,
211
- onChange: Ie,
212
- onBlur: Z,
218
+ value: u,
219
+ onChange: Pe,
220
+ onBlur: _,
213
221
  onClick: () => !f && h(!0),
214
222
  onKeyDown: (e) => {
215
- e.key === "Enter" && !f && (e.preventDefault(), _()), e.key === "ArrowDown" && !p && !f && (e.preventDefault(), I.current = !0, h(!0)), e.key === "Escape" && p && (e.preventDefault(), B());
223
+ e.key === "Enter" && !f && (e.preventDefault(), $()), e.key === "ArrowDown" && !p && !f && (e.preventDefault(), P.current = !0, h(!0)), e.key === "Escape" && p && (e.preventDefault(), B());
216
224
  },
217
- placeholder: p ? n : H,
225
+ placeholder: p ? n : G,
218
226
  disabled: !!f,
219
- "aria-label": H,
227
+ "aria-label": G,
220
228
  "data-field": "start",
221
- className: O(
229
+ className: K(
222
230
  "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",
223
231
  Be ? "text-destructive" : we ? "text-content-placeholder" : ""
224
232
  ),
225
- ...ge
233
+ ...he
226
234
  }
227
235
  ),
228
- /* @__PURE__ */ u(
236
+ /* @__PURE__ */ m(
229
237
  "input",
230
238
  {
231
- ref: Re,
239
+ ref: U,
232
240
  type: "text",
233
241
  value: R,
234
- onChange: Pe,
235
- onBlur: Z,
242
+ onChange: Ie,
243
+ onBlur: _,
236
244
  onClick: () => !f && h(!0),
237
245
  onKeyDown: (e) => {
238
- e.key === "Enter" && !f && (e.preventDefault(), _()), e.key === "ArrowDown" && !p && !f && (e.preventDefault(), I.current = !0, h(!0)), e.key === "Escape" && p && (e.preventDefault(), B());
246
+ e.key === "Enter" && !f && (e.preventDefault(), $()), e.key === "ArrowDown" && !p && !f && (e.preventDefault(), P.current = !0, h(!0)), e.key === "Escape" && p && (e.preventDefault(), B());
239
247
  },
240
- placeholder: p ? n : G,
248
+ placeholder: p ? n : J,
241
249
  disabled: !!f,
242
- "aria-label": G,
250
+ "aria-label": J,
243
251
  "data-field": "end",
244
- className: O(
252
+ className: K(
245
253
  "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",
246
254
  Ne ? "text-destructive" : Te ? "text-content-placeholder" : ""
247
255
  )
@@ -249,67 +257,67 @@ const tt = a.forwardRef(
249
257
  )
250
258
  ] }),
251
259
  /* @__PURE__ */ E("div", { className: "flex items-center gap-1 shrink-0", children: [
252
- r?.from && !f && /* @__PURE__ */ E(ee, { children: [
253
- /* @__PURE__ */ u(te, { asChild: !0, children: /* @__PURE__ */ u(
260
+ r?.from && !f && /* @__PURE__ */ E(te, { children: [
261
+ /* @__PURE__ */ m(re, { asChild: !0, children: /* @__PURE__ */ m(
254
262
  "button",
255
263
  {
256
264
  type: "button",
257
265
  tabIndex: 0,
258
266
  "aria-label": b("calendar.clear"),
259
267
  onClick: (e) => {
260
- e.stopPropagation(), V();
268
+ e.stopPropagation(), O();
261
269
  },
262
270
  onKeyDown: (e) => {
263
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), V());
271
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), O());
264
272
  },
265
273
  className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
266
- children: /* @__PURE__ */ u(Ve, { className: "size-3 hover:text-content text-content-icon" })
274
+ children: /* @__PURE__ */ m(Ve, { className: "size-3 hover:text-content text-content-icon" })
267
275
  }
268
276
  ) }),
269
- /* @__PURE__ */ u(re, { variant: "tertiary", side: "top", children: b("calendar.clear") })
277
+ /* @__PURE__ */ m(oe, { variant: "tertiary", side: "top", children: b("calendar.clear") })
270
278
  ] }),
271
- /* @__PURE__ */ E(ee, { children: [
272
- /* @__PURE__ */ u(te, { asChild: !0, children: /* @__PURE__ */ u("button", { type: "button", tabIndex: 0, "aria-label": b("datePicker.selectMonthRange"), onClick: (e) => {
279
+ /* @__PURE__ */ E(te, { children: [
280
+ /* @__PURE__ */ m(re, { asChild: !0, children: /* @__PURE__ */ m("button", { type: "button", tabIndex: 0, "aria-label": b("datePicker.selectMonthRange"), onClick: (e) => {
273
281
  e.stopPropagation(), f || h(!p);
274
282
  }, onKeyDown: (e) => {
275
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), f || (I.current = !0, h(!p)));
276
- }, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ u(Oe, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
277
- /* @__PURE__ */ u(re, { variant: "tertiary", side: "top", children: b("datePicker.selectMonthRange") })
283
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), f || (P.current = !0, h(!p)));
284
+ }, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ m(Oe, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
285
+ /* @__PURE__ */ m(oe, { variant: "tertiary", side: "top", children: b("datePicker.selectMonthRange") })
278
286
  ] })
279
287
  ] })
280
288
  ]
281
289
  }
282
290
  ) }),
283
- /* @__PURE__ */ u(
284
- We,
291
+ /* @__PURE__ */ m(
292
+ Xe,
285
293
  {
286
- ref: M,
294
+ ref: V,
287
295
  className: "w-auto p-0",
288
296
  align: "start",
289
297
  "aria-label": b("datePicker.selectDateRange"),
290
298
  onOpenAutoFocus: (e) => {
291
- I.current || e.preventDefault(), I.current = !1;
299
+ P.current || e.preventDefault(), P.current = !1;
292
300
  },
293
- ...ke,
294
- children: /* @__PURE__ */ u(
295
- Xe,
301
+ ...xe,
302
+ children: /* @__PURE__ */ m(
303
+ Ye,
296
304
  {
297
305
  mode: "range",
298
306
  selected: d,
299
- footerFlashKey: xe,
300
- footerFlashTarget: De,
307
+ footerFlashKey: De,
308
+ footerFlashTarget: ke,
301
309
  onSelect: be,
302
310
  month: ve,
303
- onMonthChange: P,
304
- disabled: Fe(ne, se),
305
- startMonth: ie,
306
- endMonth: le,
311
+ onMonthChange: I,
312
+ disabled: et(se, ie),
313
+ startMonth: le,
314
+ endMonth: ce,
307
315
  showFooter: g,
308
- onApply: Y,
316
+ onApply: Z,
309
317
  onCancel: B,
310
- onClear: V,
318
+ onClear: O,
311
319
  captionLayout: "dropdown",
312
- ...L !== void 0 ? { weekStartsOn: L } : {}
320
+ ...q !== void 0 ? { weekStartsOn: q } : {}
313
321
  }
314
322
  )
315
323
  }
@@ -320,7 +328,7 @@ const tt = a.forwardRef(
320
328
  );
321
329
  }
322
330
  );
323
- tt.displayName = "DateRangePicker";
331
+ rt.displayName = "DateRangePicker";
324
332
  export {
325
- tt as DateRangePicker
333
+ rt as DateRangePicker
326
334
  };