impact-nova 2.2.3 → 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 (51) 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/nested-list/components/NestedListContent.js +158 -96
  19. package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -0
  20. package/dist/components/data/nested-list/nested-list-constants.js +6 -0
  21. package/dist/components/data/nested-list/nested-list-tree-utils.d.ts +3 -0
  22. package/dist/components/data/nested-list/nested-list-tree-utils.js +24 -0
  23. package/dist/components/data/nested-list/nested-list.js +214 -215
  24. package/dist/components/data-display/card/card.js +6 -5
  25. package/dist/components/feedback/dialog/dialog.js +7 -5
  26. package/dist/components/feedback/sheet/sheet.js +28 -27
  27. package/dist/components/flows/filter-panel/filter-panel.js +36 -35
  28. package/dist/components/flows/filter-strip/filter-tag-list.js +33 -33
  29. package/dist/components/forms/combobox/combobox.js +110 -100
  30. package/dist/components/forms/date-picker/date-input-behavior.d.ts +9 -0
  31. package/dist/components/forms/date-picker/date-input-behavior.js +32 -19
  32. package/dist/components/forms/date-picker/date-picker.js +96 -90
  33. package/dist/components/forms/date-picker/date-range-picker.js +160 -152
  34. package/dist/components/forms/date-picker/month-picker.js +71 -65
  35. package/dist/components/forms/date-picker/month-range-picker.js +153 -145
  36. package/dist/components/forms/date-picker/multi-date-picker.js +127 -99
  37. package/dist/components/forms/date-picker/multi-month-picker.js +109 -97
  38. package/dist/components/forms/date-picker/multi-week-picker.js +98 -86
  39. package/dist/components/forms/date-picker/week-picker.js +82 -76
  40. package/dist/components/forms/date-picker/week-range-picker.js +127 -119
  41. package/dist/impact-nova-base.scss +10 -5
  42. package/dist/impact-nova-components.css +9 -5
  43. package/dist/impact-nova.css +1 -1
  44. package/dist/index.js +189 -188
  45. package/dist/lib/overlay/overlay-portal-context.d.ts +11 -2
  46. package/dist/lib/overlay/overlay-portal-context.js +39 -28
  47. package/dist/lib/primitives/create-compound.d.ts +5 -0
  48. package/dist/lib/primitives/create-compound.js +17 -16
  49. package/dist/llms/rules/installation.js +1 -1
  50. package/dist/llms/rules/requirements.js +1 -1
  51. package/package.json +1 -1
@@ -2,86 +2,86 @@ import { jsxs as k, jsx as s } from "react/jsx-runtime";
2
2
  import * as o from "react";
3
3
  import { Cross as _, CalendarMonth as ee } from "impact-nova-icons";
4
4
  import { cn as te } from "../../../lib/utils.js";
5
- import { usePickerDismissActionsRef as ne, usePickerFooterDismissNudge as re, isDateInputInvalid as oe, resolveSingleValueDismissFlash as se, compareMonthSelection as ie, resolveDateInputOnBlur as ae, maskDateInput as ce, parseDateInput as le, resolveDateInputOnEnter as pe } from "./date-input-behavior.js";
6
- import { Input as fe } from "../input/input.js";
7
- import { Popover as de, PopoverAnchor as me, PopoverContent as ue } from "../../feedback/popover/popover.js";
8
- import { Calendar as he } from "../../data-display/calendar/calendar.js";
9
- import { Tooltip as E, TooltipTrigger as V, TooltipContent as b } from "../../feedback/tooltip/tooltip.js";
10
- import { useImpactNovaI18n as ye } from "../../../i18n/use-impact-nova-i18n.js";
11
- import { coerceSingleMonthApply as Me, coerceSingleMonth as ge } from "./calendar-selection-adapters.js";
12
- import { buildDateBoundsMatcher as De } from "../../../lib/date-bounds-matcher.js";
13
- const u = (t) => `${(t.month + 1).toString().padStart(2, "0")}/${t.year}`, ke = o.forwardRef(
5
+ import { usePickerDismissActionsRef as ne, usePickerFooterDismissNudge as re, isDateInputInvalid as oe, resolveSingleValueDismissFlash as se, compareMonthSelection as ie, handlePickerSurfacePointerDown as ae, resolveDateInputOnBlur as ce, maskDateInput as le, parseDateInput as pe, resolveDateInputOnEnter as fe } from "./date-input-behavior.js";
6
+ import { Input as de } from "../input/input.js";
7
+ import { Popover as ue, PopoverAnchor as me, PopoverContent as he } from "../../feedback/popover/popover.js";
8
+ import { Calendar as ye } from "../../data-display/calendar/calendar.js";
9
+ import { Tooltip as w, TooltipTrigger as E, TooltipContent as V } from "../../feedback/tooltip/tooltip.js";
10
+ import { useImpactNovaI18n as Me } from "../../../i18n/use-impact-nova-i18n.js";
11
+ import { coerceSingleMonthApply as De, coerceSingleMonth as ge } from "./calendar-selection-adapters.js";
12
+ import { buildDateBoundsMatcher as ke } from "../../../lib/date-bounds-matcher.js";
13
+ const m = (t) => `${(t.month + 1).toString().padStart(2, "0")}/${t.year}`, Ie = o.forwardRef(
14
14
  ({
15
15
  value: t,
16
16
  onChange: p,
17
17
  placeholder: v,
18
- minDate: w,
19
- maxDate: B,
20
- startMonth: O,
21
- endMonth: Y,
18
+ minDate: b,
19
+ maxDate: O,
20
+ startMonth: B,
21
+ endMonth: F,
22
22
  showFooter: i = !0,
23
23
  disabled: f,
24
- className: j,
25
- ...F
24
+ className: Y,
25
+ ...j
26
26
  }, K) => {
27
- const { t: d } = ye(), z = v ?? d("datePicker.selectMonth"), C = o.useRef(null), P = o.useRef(null);
28
- o.useImperativeHandle(K, () => C.current);
29
- const [r, c] = o.useState(!1), R = ne(), { footerFlashKey: H, footerFlashTarget: $, popoverHandlers: L } = re(i, r, R, P), [y, a] = o.useState(t), [m, l] = o.useState(t ? u(t) : ""), [q, I] = o.useState(t ? new Date(t.year, t.month) : /* @__PURE__ */ new Date());
27
+ const { t: d } = Me(), z = v ?? d("datePicker.selectMonth"), I = o.useRef(null), C = o.useRef(null);
28
+ o.useImperativeHandle(K, () => I.current);
29
+ const [r, a] = o.useState(!1), R = ne(), { footerFlashKey: H, footerFlashTarget: $, popoverHandlers: L } = re(i, r, R, C), [y, c] = o.useState(t), [u, l] = o.useState(t ? m(t) : ""), [q, P] = o.useState(t ? new Date(t.year, t.month) : /* @__PURE__ */ new Date());
30
30
  o.useEffect(() => {
31
- r || (l(t ? u(t) : ""), a(t));
31
+ r || (l(t ? m(t) : ""), c(t));
32
32
  }, [r, t]), o.useEffect(() => {
33
- r && (a(t), I(t ? new Date(t.year, t.month) : /* @__PURE__ */ new Date()), l(t ? u(t) : ""));
33
+ r && (c(t), P(t ? new Date(t.year, t.month) : /* @__PURE__ */ new Date()), l(t ? m(t) : ""));
34
34
  }, [r, t]);
35
35
  const G = (e) => {
36
36
  const n = ge(e);
37
- a(n), n && l(u(n)), i || (p?.(n), c(!1));
37
+ c(n), n && l(m(n)), i || (p?.(n), a(!1));
38
38
  }, x = (e) => {
39
- const n = Me(e, y);
40
- p?.(n), c(!1);
39
+ const n = De(e, y);
40
+ p?.(n), a(!1);
41
41
  }, S = () => {
42
- a(t), l(t ? u(t) : ""), c(!1);
42
+ c(t), l(t ? m(t) : ""), a(!1);
43
43
  }, A = () => {
44
- a(void 0), l(""), p?.(void 0), i || c(!1);
45
- }, h = "MM/yyyy", M = t ? u(t) : "", g = o.useRef(!1), J = (e) => {
46
- const n = ce(e.target.value, h, m);
44
+ c(void 0), l(""), p?.(void 0), i || a(!1);
45
+ }, h = "MM/yyyy", M = t ? m(t) : "", D = o.useRef(!1), J = (e) => {
46
+ const n = le(e.target.value, h, u);
47
47
  if (l(n), n === "") {
48
- a(void 0), i || p?.(void 0);
48
+ c(void 0), i || p?.(void 0);
49
49
  return;
50
50
  }
51
- const { parsed: D, isValid: Z } = le(n, h);
52
- if (Z && D) {
53
- const T = { month: D.getMonth(), year: D.getFullYear() };
54
- a(T), I(D), i || p?.(T);
51
+ const { parsed: g, isValid: Z } = pe(n, h);
52
+ if (Z && g) {
53
+ const T = { month: g.getMonth(), year: g.getFullYear() };
54
+ c(T), P(g), i || p?.(T);
55
55
  }
56
56
  }, Q = () => {
57
57
  if (r) return;
58
- const e = ae(m, h, M);
58
+ const e = ce(u, h, M);
59
59
  if (e.resetToCommitted) {
60
- l(M), a(t);
60
+ l(M), c(t);
61
61
  return;
62
62
  }
63
63
  if (e.parsed) {
64
64
  const n = { month: e.parsed.getMonth(), year: e.parsed.getFullYear() };
65
- l(e.display), a(n), i || p?.(n);
65
+ l(e.display), c(n), i || p?.(n);
66
66
  return;
67
67
  }
68
- l(M), a(t);
68
+ l(M), c(t);
69
69
  }, U = () => {
70
70
  if (r && i) {
71
71
  x();
72
72
  return;
73
73
  }
74
- const e = pe(m, h);
74
+ const e = fe(u, h);
75
75
  if (e.parsed) {
76
76
  const n = {
77
77
  month: e.parsed.getMonth(),
78
78
  year: e.parsed.getFullYear()
79
79
  };
80
- i && (p?.(n), c(!1));
80
+ i && (p?.(n), a(!1));
81
81
  return;
82
82
  }
83
- r || (g.current = !0, c(!0));
84
- }, N = M !== m, W = oe(m, h), X = o.useCallback(
83
+ r || (D.current = !0, a(!0));
84
+ }, N = M !== u, W = oe(u, h), X = o.useCallback(
85
85
  () => se(
86
86
  y,
87
87
  t,
@@ -94,26 +94,32 @@ const u = (t) => `${(t.month + 1).toString().padStart(2, "0")}/${t.year}`, ke =
94
94
  onDismiss: S,
95
95
  resolveFlash: X
96
96
  };
97
- }), /* @__PURE__ */ k(de, { open: f ? !1 : r, onOpenChange: (e) => {
98
- f || !e && i || c(e);
97
+ }), /* @__PURE__ */ k(ue, { open: f ? !1 : r, onOpenChange: (e) => {
98
+ f || !e && i || a(e);
99
99
  }, children: [
100
100
  /* @__PURE__ */ s(me, { asChild: !0, children: /* @__PURE__ */ s(
101
101
  "div",
102
102
  {
103
- ref: P,
103
+ ref: C,
104
104
  "data-component": "month-picker",
105
105
  "data-state": r ? "open" : "closed",
106
106
  "data-pending": N || void 0,
107
+ onPointerDown: (e) => ae({
108
+ disabled: f,
109
+ event: e,
110
+ onOpen: () => a(!0),
111
+ focusField: () => I.current?.focus()
112
+ }),
107
113
  children: /* @__PURE__ */ s(
108
- fe,
114
+ de,
109
115
  {
110
- ref: C,
111
- value: m,
116
+ ref: I,
117
+ value: u,
112
118
  onChange: J,
113
119
  onBlur: Q,
114
- onClick: () => !f && c(!0),
120
+ onClick: () => !f && a(!0),
115
121
  onKeyDown: (e) => {
116
- e.key === "Enter" && !f && (e.preventDefault(), U()), e.key === "ArrowDown" && !r && !f && (e.preventDefault(), g.current = !0, c(!0)), e.key === "Escape" && r && (e.preventDefault(), S());
122
+ e.key === "Enter" && !f && (e.preventDefault(), U()), e.key === "ArrowDown" && !r && !f && (e.preventDefault(), D.current = !0, a(!0)), e.key === "Escape" && r && (e.preventDefault(), S());
117
123
  },
118
124
  placeholder: r ? d("datePicker.monthYearFormat") : z,
119
125
  disabled: f,
@@ -121,11 +127,11 @@ const u = (t) => `${(t.month + 1).toString().padStart(2, "0")}/${t.year}`, ke =
121
127
  className: te(
122
128
  "cursor-pointer",
123
129
  W ? "text-destructive" : N ? "text-content-placeholder" : "",
124
- j
130
+ Y
125
131
  ),
126
132
  suffix: /* @__PURE__ */ k("div", { className: "flex items-center gap-1", children: [
127
- t && !f && /* @__PURE__ */ k(E, { children: [
128
- /* @__PURE__ */ s(V, { asChild: !0, children: /* @__PURE__ */ s(
133
+ t && !f && /* @__PURE__ */ k(w, { children: [
134
+ /* @__PURE__ */ s(E, { asChild: !0, children: /* @__PURE__ */ s(
129
135
  "button",
130
136
  {
131
137
  type: "button",
@@ -138,30 +144,30 @@ const u = (t) => `${(t.month + 1).toString().padStart(2, "0")}/${t.year}`, ke =
138
144
  children: /* @__PURE__ */ s(_, { className: "size-3 hover:text-content" })
139
145
  }
140
146
  ) }),
141
- /* @__PURE__ */ s(b, { variant: "tertiary", side: "top", children: d("calendar.clear") })
147
+ /* @__PURE__ */ s(V, { variant: "tertiary", side: "top", children: d("calendar.clear") })
142
148
  ] }),
143
- /* @__PURE__ */ k(E, { children: [
144
- /* @__PURE__ */ s(V, { asChild: !0, children: /* @__PURE__ */ s(ee, { className: "h-4 w-4 text-secondary-foreground" }) }),
145
- /* @__PURE__ */ s(b, { variant: "tertiary", side: "top", children: d("datePicker.selectMonth") })
149
+ /* @__PURE__ */ k(w, { children: [
150
+ /* @__PURE__ */ s(E, { asChild: !0, children: /* @__PURE__ */ s(ee, { className: "h-4 w-4 text-secondary-foreground" }) }),
151
+ /* @__PURE__ */ s(V, { variant: "tertiary", side: "top", children: d("datePicker.selectMonth") })
146
152
  ] })
147
153
  ] }),
148
- ...F
154
+ ...j
149
155
  }
150
156
  )
151
157
  }
152
158
  ) }),
153
159
  /* @__PURE__ */ s(
154
- ue,
160
+ he,
155
161
  {
156
162
  className: "w-auto p-0",
157
163
  align: "start",
158
164
  "aria-label": d("datePicker.selectMonth"),
159
165
  onOpenAutoFocus: (e) => {
160
- g.current || e.preventDefault(), g.current = !1;
166
+ D.current || e.preventDefault(), D.current = !1;
161
167
  },
162
168
  ...L,
163
169
  children: /* @__PURE__ */ s(
164
- he,
170
+ ye,
165
171
  {
166
172
  pickerType: "month",
167
173
  monthMode: "single",
@@ -170,10 +176,10 @@ const u = (t) => `${(t.month + 1).toString().padStart(2, "0")}/${t.year}`, ke =
170
176
  footerFlashTarget: $,
171
177
  onMonthSelect: G,
172
178
  month: q,
173
- onMonthChange: I,
174
- disabled: De(w, B),
175
- startMonth: O,
176
- endMonth: Y,
179
+ onMonthChange: P,
180
+ disabled: ke(b, O),
181
+ startMonth: B,
182
+ endMonth: F,
177
183
  showFooter: i,
178
184
  onApply: x,
179
185
  onCancel: S,
@@ -185,7 +191,7 @@ const u = (t) => `${(t.month + 1).toString().padStart(2, "0")}/${t.year}`, ke =
185
191
  ] });
186
192
  }
187
193
  );
188
- ke.displayName = "MonthPicker";
194
+ Ie.displayName = "MonthPicker";
189
195
  export {
190
- ke as MonthPicker
196
+ Ie as MonthPicker
191
197
  };