impact-nova 2.1.0-alpha.9 → 2.2.1

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 (75) hide show
  1. package/README.md +6 -0
  2. package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-editor.js +73 -94
  3. package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-focus.d.ts +53 -0
  4. package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-focus.js +98 -0
  5. package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +15 -13
  6. package/dist/components/data/ag-grid-react/headers/custom-header.js +56 -58
  7. package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.d.ts +12 -0
  8. package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.js +31 -0
  9. package/dist/components/data/ag-grid-react/headers/header-search-active-state.d.ts +10 -0
  10. package/dist/components/data/ag-grid-react/headers/header-search-active-state.js +38 -0
  11. package/dist/components/data/ag-grid-react/index.js +166 -163
  12. package/dist/components/data/ag-grid-react/notify-column-indicator-sync.d.ts +3 -4
  13. package/dist/components/data/ag-grid-react/theme.js +0 -2
  14. package/dist/components/data/data-table/data-table-column-list.js +1 -1
  15. package/dist/components/data/data-table/data-table-saved-views.js +1 -1
  16. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +7 -6
  17. package/dist/components/data/nested-list/components/SortableItem.d.ts +3 -1
  18. package/dist/components/data/nested-list/components/SortableItem.js +111 -109
  19. package/dist/components/data-display/calendar/calendar-footer-emphasis.d.ts +28 -0
  20. package/dist/components/data-display/calendar/calendar-footer-emphasis.js +8 -0
  21. package/dist/components/data-display/calendar/calendar-footer.d.ts +4 -1
  22. package/dist/components/data-display/calendar/calendar-footer.js +60 -38
  23. package/dist/components/data-display/calendar/calendar.js +86 -82
  24. package/dist/components/data-display/calendar/calendar.types.d.ts +2 -0
  25. package/dist/components/data-display/calendar/use-calendar-state.d.ts +3 -0
  26. package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
  27. package/dist/components/flows/filter-strip/filter-strip.js +36 -29
  28. package/dist/components/flows/filter-strip/filter-summary.js +2 -2
  29. package/dist/components/forms/date-picker/date-input-behavior.d.ts +118 -0
  30. package/dist/components/forms/date-picker/date-input-behavior.js +164 -0
  31. package/dist/components/forms/date-picker/date-picker.js +202 -138
  32. package/dist/components/forms/date-picker/date-range-picker.js +302 -215
  33. package/dist/components/forms/date-picker/month-picker.js +160 -119
  34. package/dist/components/forms/date-picker/month-range-picker.js +302 -245
  35. package/dist/components/forms/date-picker/multi-date-picker.js +94 -80
  36. package/dist/components/forms/date-picker/multi-month-picker.js +97 -83
  37. package/dist/components/forms/date-picker/multi-week-picker.js +107 -93
  38. package/dist/components/forms/date-picker/week-picker.js +230 -140
  39. package/dist/components/forms/date-picker/week-range-picker.js +332 -226
  40. package/dist/components/forms/file-upload/file-upload.js +312 -174
  41. package/dist/components/forms/file-upload/file-upload.types.d.ts +17 -2
  42. package/dist/components/layout/dynamic-layout/dynamic-layout.variants.d.ts +1 -1
  43. package/dist/components/layout/header/header.js +45 -38
  44. package/dist/components/layout/horizontal-scroller/index.d.ts +1 -0
  45. package/dist/components/layout/horizontal-scroller/index.js +3 -2
  46. package/dist/components/ui/local-raster-icons/assets/excel-error-icon.webp.js +4 -0
  47. package/dist/components/ui/local-raster-icons/assets/file-upload-error.webp.js +4 -0
  48. package/dist/components/ui/local-raster-icons/rasterIcons.d.ts +2 -0
  49. package/dist/components/ui/local-raster-icons/rasterIcons.js +32 -22
  50. package/dist/components/ui/show.d.ts +10 -0
  51. package/dist/components/ui/show.js +7 -0
  52. package/dist/components/ui/show.types.d.ts +5 -0
  53. package/dist/i18n/defaultMessages.d.ts +17 -0
  54. package/dist/i18n/defaultMessages.js +29 -17
  55. package/dist/i18n/index.d.ts +1 -1
  56. package/dist/i18n/locales/de.js +12 -0
  57. package/dist/i18n/locales/es.js +12 -0
  58. package/dist/i18n/locales/hi.js +12 -0
  59. package/dist/i18n/locales/kn.js +12 -0
  60. package/dist/impact-nova-base.scss +6 -2
  61. package/dist/impact-nova-components.css +141 -16
  62. package/dist/impact-nova-tokens.scss +12 -0
  63. package/dist/impact-nova.css +1 -1
  64. package/dist/index.d.ts +2 -0
  65. package/dist/index.js +273 -271
  66. package/dist/lib/utils.js +40 -24
  67. package/dist/llms/rules/ag-grid.js +1 -1
  68. package/dist/llms/rules/installation.js +1 -1
  69. package/dist/llms/rules/requirements.js +1 -1
  70. package/dist/tailwind.config.js +36 -4
  71. package/dist/theme/tailwind-colors.js +3 -1
  72. package/package.json +15 -6
  73. package/tailwind.config.d.ts +3 -0
  74. package/dist/components/data/ag-grid-react/headers/custom-header-group.d.ts +0 -10
  75. package/dist/components/data/ag-grid-react/headers/custom-header-group.js +0 -58
@@ -1,140 +1,154 @@
1
- import { jsxs as f, jsx as r } from "react/jsx-runtime";
2
- import * as i from "react";
3
- import { Cross as B, CalendarMonth as q } from "impact-nova-icons";
4
- import { format as P } from "date-fns";
5
- import { cn as F } from "../../../lib/utils.js";
6
- import { Input as G } from "../input/input.js";
7
- import { Popover as H, PopoverAnchor as J, PopoverContent as Q } from "../../feedback/popover/popover.js";
8
- import { Calendar as U } from "../../data-display/calendar/calendar.js";
9
- import { Tooltip as W, TooltipTrigger as b, TooltipContent as x } from "../../feedback/tooltip/tooltip.js";
10
- import { useImpactNovaI18n as X } from "../../../i18n/use-impact-nova-i18n.js";
11
- import { getDateFnsLocale as Y } from "../../../i18n/getDateFnsLocale.js";
12
- import { coerceWeekArrayApply as Z, coerceWeekArray as _ } from "./calendar-selection-adapters.js";
13
- import { buildDateBoundsMatcher as ee } from "../../../lib/date-bounds-matcher.js";
14
- const te = (t, a = "MM/dd/yyyy", c) => {
15
- const m = P(t.startDate, a, c ? { locale: c } : {}), u = P(t.endDate, a, c ? { locale: c } : {});
16
- return `${m} - ${u}`;
17
- }, re = i.forwardRef(
1
+ import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
+ import * as n from "react";
3
+ import { Cross as Z, CalendarMonth as _ } from "impact-nova-icons";
4
+ import { format as b } from "date-fns";
5
+ import { cn as ee } from "../../../lib/utils.js";
6
+ import { Input as te } from "../input/input.js";
7
+ import { Popover as re, PopoverAnchor as ne, PopoverContent as oe } from "../../feedback/popover/popover.js";
8
+ import { Calendar as se } from "../../data-display/calendar/calendar.js";
9
+ import { Tooltip as x, TooltipTrigger as A, TooltipContent as M } from "../../feedback/tooltip/tooltip.js";
10
+ import { useImpactNovaI18n as ae } from "../../../i18n/use-impact-nova-i18n.js";
11
+ import { getDateFnsLocale as ce } from "../../../i18n/getDateFnsLocale.js";
12
+ import { coerceWeekArrayApply as ie, coerceWeekArray as le } from "./calendar-selection-adapters.js";
13
+ import { usePickerDismissActionsRef as pe, usePickerFooterDismissNudge as de } from "./date-input-behavior.js";
14
+ import { buildDateBoundsMatcher as fe } from "../../../lib/date-bounds-matcher.js";
15
+ const me = (t, a = "MM/dd/yyyy", c) => {
16
+ const h = b(t.startDate, a, c ? { locale: c } : {}), y = b(t.endDate, a, c ? { locale: c } : {});
17
+ return `${h} - ${y}`;
18
+ }, ue = n.forwardRef(
18
19
  ({
19
20
  value: t,
20
21
  onChange: a,
21
22
  format: c = "MM/dd/yyyy",
22
- placeholder: m,
23
- minDate: u,
24
- maxDate: M,
25
- startMonth: D,
26
- endMonth: N,
27
- showFooter: h = !0,
28
- calendarType: w = "calendar",
29
- fiscalMode: A = "basic",
30
- selectionMode: O = "week",
31
- fiscalMonthPattern: S,
32
- fiscalYearStartMonth: T = 1,
33
- weekStartsOn: v = 1,
34
- disabled: n,
35
- className: I,
36
- ...j
37
- }, L) => {
38
- const { locale: k, t: s } = X(), R = i.useMemo(() => Y(k), [k]), $ = m ?? s("datePicker.selectWeeks"), [l, o] = i.useState(!1), y = i.useRef(!1), [g, p] = i.useState(t);
39
- i.useEffect(() => {
40
- p(t);
23
+ placeholder: h,
24
+ minDate: y,
25
+ maxDate: N,
26
+ startMonth: T,
27
+ endMonth: R,
28
+ showFooter: d = !0,
29
+ calendarType: v = "calendar",
30
+ fiscalMode: S = "basic",
31
+ selectionMode: w = "week",
32
+ fiscalMonthPattern: I,
33
+ fiscalYearStartMonth: L = 1,
34
+ weekStartsOn: j = 1,
35
+ disabled: o,
36
+ className: O,
37
+ ...E
38
+ }, F) => {
39
+ const { locale: g, t: i } = ae(), K = n.useMemo(() => ce(g), [g]), $ = h ?? i("datePicker.selectWeeks"), [l, s] = n.useState(!1), k = n.useRef(!1), C = n.useRef(null), P = pe(), { footerFlashKey: z, footerFlashTarget: V, popoverHandlers: B } = de(d, l, P, C), [f, m] = n.useState(t);
40
+ n.useEffect(() => {
41
+ m(t);
41
42
  }, [l, t]);
42
- const z = (e) => {
43
- const d = _(e);
44
- p(d), h || a?.(d);
45
- }, E = (e) => {
46
- const d = Z(e, g);
47
- a?.(d), o(!1);
48
- }, K = () => {
49
- p(t), o(!1);
50
- }, C = () => {
51
- p(void 0), a?.(void 0), h || o(!1);
52
- }, V = t && t.length > 0 ? t.length === 1 ? te(t[0], c, R) : `${t.length} weeks selected` : "";
53
- return /* @__PURE__ */ f(H, { open: n ? !1 : l, onOpenChange: (e) => {
54
- n || o(e);
55
- }, children: [
56
- /* @__PURE__ */ r(J, { asChild: !0, children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
57
- G,
43
+ const H = (e) => {
44
+ const p = le(e);
45
+ m(p), d || a?.(p);
46
+ }, q = (e) => {
47
+ const p = ie(e, f);
48
+ a?.(p), s(!1);
49
+ }, D = () => {
50
+ m(t), s(!1);
51
+ }, W = () => {
52
+ m(void 0), a?.(void 0), d || s(!1);
53
+ }, G = t && t.length > 0 ? t.length === 1 ? me(t[0], c, K) : `${t.length} weeks selected` : "", J = (e) => {
54
+ o || !e && d || s(e);
55
+ }, Q = n.useCallback(() => {
56
+ const e = f?.length ?? 0, p = t?.length ?? 0, U = e === p && (f ?? []).every(
57
+ (X, Y) => X.startDate.getTime() === t?.[Y]?.startDate.getTime()
58
+ );
59
+ return e > 0 && !U ? "apply" : "cancel";
60
+ }, [f, t]);
61
+ return n.useLayoutEffect(() => {
62
+ P.current = {
63
+ onDismiss: D,
64
+ resolveFlash: Q
65
+ };
66
+ }), /* @__PURE__ */ u(re, { open: o ? !1 : l, onOpenChange: J, children: [
67
+ /* @__PURE__ */ r(ne, { asChild: !0, children: /* @__PURE__ */ r("div", { ref: C, children: /* @__PURE__ */ r(
68
+ te,
58
69
  {
59
- ref: L,
60
- value: V,
70
+ ref: F,
71
+ value: G,
61
72
  placeholder: $,
62
73
  readOnly: !0,
63
- disabled: n,
74
+ disabled: o,
64
75
  onClick: () => {
65
- !n && !l && o(!0);
76
+ !o && !l && s(!0);
66
77
  },
67
- className: F("cursor-pointer", I),
68
- suffix: /* @__PURE__ */ f("div", { className: "flex items-center gap-1", children: [
69
- t && t.length > 0 && !n && /* @__PURE__ */ f(W, { children: [
70
- /* @__PURE__ */ r(b, { asChild: !0, children: /* @__PURE__ */ r(
78
+ className: ee("cursor-pointer", O),
79
+ suffix: /* @__PURE__ */ u("div", { className: "flex items-center gap-1", children: [
80
+ t && t.length > 0 && !o && /* @__PURE__ */ u(x, { children: [
81
+ /* @__PURE__ */ r(A, { asChild: !0, children: /* @__PURE__ */ r(
71
82
  "button",
72
83
  {
73
84
  type: "button",
74
85
  tabIndex: 0,
75
- "aria-label": s("calendar.clear"),
86
+ "aria-label": i("calendar.clear"),
76
87
  onClick: (e) => {
77
- e.stopPropagation(), C();
88
+ e.stopPropagation(), W();
78
89
  },
79
90
  className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
80
- children: /* @__PURE__ */ r(B, { className: "size-3 hover:text-content" })
91
+ children: /* @__PURE__ */ r(Z, { className: "size-3 hover:text-content" })
81
92
  }
82
93
  ) }),
83
- /* @__PURE__ */ r(x, { variant: "tertiary", side: "top", children: s("calendar.clear") })
94
+ /* @__PURE__ */ r(M, { variant: "tertiary", side: "top", children: i("calendar.clear") })
84
95
  ] }),
85
- /* @__PURE__ */ f(W, { children: [
86
- /* @__PURE__ */ r(b, { asChild: !0, children: /* @__PURE__ */ r(
96
+ /* @__PURE__ */ u(x, { children: [
97
+ /* @__PURE__ */ r(A, { asChild: !0, children: /* @__PURE__ */ r(
87
98
  "button",
88
99
  {
89
100
  type: "button",
90
101
  tabIndex: 0,
91
102
  "data-component": "calendar-trigger",
92
- "aria-label": s("datePicker.selectWeeks"),
103
+ "aria-label": i("datePicker.selectWeeks"),
93
104
  onPointerDown: (e) => {
94
- e.preventDefault(), e.stopPropagation(), n || o(!l);
105
+ e.preventDefault(), e.stopPropagation(), o || s(!l);
95
106
  },
96
107
  onKeyDown: (e) => {
97
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), n || (y.current = !0, o(!l)));
108
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), o || (k.current = !0, s(!l)));
98
109
  },
99
110
  className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer",
100
- children: /* @__PURE__ */ r(q, { className: "h-4 w-4 text-secondary-foreground" })
111
+ children: /* @__PURE__ */ r(_, { className: "h-4 w-4 text-secondary-foreground" })
101
112
  }
102
113
  ) }),
103
- /* @__PURE__ */ r(x, { variant: "tertiary", side: "top", children: s("datePicker.selectWeeks") })
114
+ /* @__PURE__ */ r(M, { variant: "tertiary", side: "top", children: i("datePicker.selectWeeks") })
104
115
  ] })
105
116
  ] }),
106
- ...j
117
+ ...E
107
118
  }
108
119
  ) }) }),
109
120
  /* @__PURE__ */ r(
110
- Q,
121
+ oe,
111
122
  {
112
123
  className: "w-auto p-0",
113
124
  align: "start",
114
- "aria-label": s("datePicker.selectWeeks"),
125
+ "aria-label": i("datePicker.selectWeeks"),
115
126
  onOpenAutoFocus: (e) => {
116
- y.current || e.preventDefault(), y.current = !1;
127
+ k.current || e.preventDefault(), k.current = !1;
117
128
  },
129
+ ...B,
118
130
  children: /* @__PURE__ */ r(
119
- U,
131
+ se,
120
132
  {
121
133
  pickerType: "week",
122
134
  weekMode: "multiple",
123
- selectedWeeks: g,
124
- onWeekSelect: z,
125
- disabled: ee(u, M),
126
- startMonth: D,
127
- endMonth: N,
128
- showFooter: h,
129
- calendarType: w,
130
- fiscalMode: A,
131
- selectionMode: O,
132
- fiscalMonthPattern: S,
133
- fiscalYearStartMonth: T,
134
- weekStartsOn: v,
135
- onApply: E,
136
- onCancel: K,
137
- onClear: C,
135
+ selectedWeeks: f,
136
+ footerFlashKey: z,
137
+ footerFlashTarget: V,
138
+ onWeekSelect: H,
139
+ disabled: fe(y, N),
140
+ startMonth: T,
141
+ endMonth: R,
142
+ showFooter: d,
143
+ calendarType: v,
144
+ fiscalMode: S,
145
+ selectionMode: w,
146
+ fiscalMonthPattern: I,
147
+ fiscalYearStartMonth: L,
148
+ weekStartsOn: j,
149
+ onApply: q,
150
+ onCancel: D,
151
+ onClear: W,
138
152
  captionLayout: "dropdown"
139
153
  }
140
154
  )
@@ -143,7 +157,7 @@ const te = (t, a = "MM/dd/yyyy", c) => {
143
157
  ] });
144
158
  }
145
159
  );
146
- re.displayName = "MultiWeekPicker";
160
+ ue.displayName = "MultiWeekPicker";
147
161
  export {
148
- re as MultiWeekPicker
162
+ ue as MultiWeekPicker
149
163
  };