impact-nova 1.3.0 → 1.5.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 (117) hide show
  1. package/README.md +49 -0
  2. package/dist/components/layout/dashboard-layout.d.ts +15 -1
  3. package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +65 -64
  4. package/dist/components/ui/accordion.js +38 -34
  5. package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +1 -1
  6. package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.d.ts +58 -0
  7. package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.js +104 -0
  8. package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +62 -54
  9. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +4 -6
  10. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +54 -68
  11. package/dist/components/ui/ag-grid-react/cell-renderers/index.d.ts +3 -1
  12. package/dist/components/ui/ag-grid-react/cell-renderers/index.js +33 -27
  13. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +3 -0
  14. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +28 -12
  15. package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.d.ts +2 -0
  16. package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +45 -44
  17. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.d.ts +4 -6
  18. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +23 -37
  19. package/dist/components/ui/ag-grid-react/cell-renderers/types.d.ts +33 -17
  20. package/dist/components/ui/ag-grid-react/editable-utils.d.ts +27 -0
  21. package/dist/components/ui/ag-grid-react/editable-utils.js +62 -0
  22. package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +99 -98
  23. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +110 -143
  24. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +72 -69
  25. package/dist/components/ui/ag-grid-react/headers/components/header-info.js +36 -35
  26. package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +14 -12
  27. package/dist/components/ui/ag-grid-react/headers/custom-header.js +111 -110
  28. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +204 -203
  29. package/dist/components/ui/alert.js +62 -58
  30. package/dist/components/ui/breadcrumb.js +81 -74
  31. package/dist/components/ui/calendar.js +354 -354
  32. package/dist/components/ui/chart/chart.js +63 -62
  33. package/dist/components/ui/chips.js +42 -38
  34. package/dist/components/ui/command-palette/command-palette-context.d.ts +52 -0
  35. package/dist/components/ui/command-palette/command-palette-context.js +110 -0
  36. package/dist/components/ui/command-palette/command-palette.d.ts +67 -0
  37. package/dist/components/ui/command-palette/command-palette.js +402 -0
  38. package/dist/components/ui/command-palette/index.d.ts +23 -0
  39. package/dist/components/ui/command-palette/index.js +44 -0
  40. package/dist/components/ui/command-palette/kbd.d.ts +28 -0
  41. package/dist/components/ui/command-palette/kbd.js +52 -0
  42. package/dist/components/ui/command-palette/shortcut-registry.d.ts +68 -0
  43. package/dist/components/ui/command-palette/shortcut-registry.js +183 -0
  44. package/dist/components/ui/command-palette/shortcut-scope-provider.d.ts +55 -0
  45. package/dist/components/ui/command-palette/shortcut-scope-provider.js +55 -0
  46. package/dist/components/ui/command-palette/shortcut-settings.d.ts +27 -0
  47. package/dist/components/ui/command-palette/shortcut-settings.js +266 -0
  48. package/dist/components/ui/command-palette/use-browser-shortcuts.d.ts +32 -0
  49. package/dist/components/ui/command-palette/use-browser-shortcuts.js +48 -0
  50. package/dist/components/ui/command-palette/use-global-shortcut.d.ts +3 -0
  51. package/dist/components/ui/command-palette/use-global-shortcut.js +7 -0
  52. package/dist/components/ui/command-palette/use-shortcut.d.ts +47 -0
  53. package/dist/components/ui/command-palette/use-shortcut.js +49 -0
  54. package/dist/components/ui/command-palette/utils.d.ts +119 -0
  55. package/dist/components/ui/command-palette/utils.js +248 -0
  56. package/dist/components/ui/data-table/data-table-column-list.js +87 -86
  57. package/dist/components/ui/data-table/data-table-format-options.js +45 -44
  58. package/dist/components/ui/data-table/data-table-view-options.js +39 -38
  59. package/dist/components/ui/date-picker/date-picker.js +89 -87
  60. package/dist/components/ui/date-picker/date-range-picker.js +140 -138
  61. package/dist/components/ui/date-picker/month-picker.js +82 -81
  62. package/dist/components/ui/date-picker/month-range-picker.js +108 -105
  63. package/dist/components/ui/date-picker/multi-date-picker.js +68 -66
  64. package/dist/components/ui/date-picker/multi-month-picker.js +59 -58
  65. package/dist/components/ui/date-picker/multi-week-picker.js +80 -78
  66. package/dist/components/ui/date-picker/week-picker.js +117 -115
  67. package/dist/components/ui/date-picker/week-range-picker.js +166 -164
  68. package/dist/components/ui/dialog.js +78 -73
  69. package/dist/components/ui/drawer.js +71 -66
  70. package/dist/components/ui/file-upload.js +131 -127
  71. package/dist/components/ui/filter-panel/filter-panel.js +98 -94
  72. package/dist/components/ui/filter-strip/filter-strip.js +95 -91
  73. package/dist/components/ui/filter-strip/filter-summary.js +91 -90
  74. package/dist/components/ui/header.js +57 -53
  75. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +78 -76
  76. package/dist/components/ui/loader.js +17 -16
  77. package/dist/components/ui/nested-list/components/NestedListHeader.d.ts +1 -0
  78. package/dist/components/ui/nested-list/components/NestedListHeader.js +51 -48
  79. package/dist/components/ui/nested-list/components/SortableItem.js +60 -59
  80. package/dist/components/ui/nested-list/nested-list.js +184 -182
  81. package/dist/components/ui/notification-panel/notification-panel.js +60 -53
  82. package/dist/components/ui/popover.js +45 -40
  83. package/dist/components/ui/prompt.js +90 -86
  84. package/dist/components/ui/select/select.js +206 -209
  85. package/dist/components/ui/sheet.d.ts +1 -0
  86. package/dist/components/ui/sheet.js +50 -48
  87. package/dist/components/ui/sidebar.js +273 -267
  88. package/dist/components/ui/stepper.js +75 -63
  89. package/dist/components/ui/tag.js +48 -44
  90. package/dist/components/ui/toast.js +46 -41
  91. package/dist/i18n/ImpactNovaI18nContext.d.ts +21 -0
  92. package/dist/i18n/ImpactNovaI18nContext.js +76 -0
  93. package/dist/i18n/defaultMessages.d.ts +231 -0
  94. package/dist/i18n/defaultMessages.js +206 -0
  95. package/dist/i18n/getDateFnsLocale.d.ts +11 -0
  96. package/dist/i18n/getDateFnsLocale.js +21 -0
  97. package/dist/i18n/index.d.ts +5 -0
  98. package/dist/i18n/locales/de.d.ts +2 -0
  99. package/dist/i18n/locales/de.js +206 -0
  100. package/dist/i18n/locales/es.d.ts +2 -0
  101. package/dist/i18n/locales/es.js +206 -0
  102. package/dist/i18n/locales/hi.d.ts +2 -0
  103. package/dist/i18n/locales/hi.js +206 -0
  104. package/dist/i18n/locales/index.d.ts +4 -0
  105. package/dist/i18n/locales/kn.d.ts +2 -0
  106. package/dist/i18n/locales/kn.js +206 -0
  107. package/dist/icons/assets/boxAdd.svg.js +5 -0
  108. package/dist/icons/assets/boxed.svg.js +5 -0
  109. package/dist/icons/assets/trolley.svg.js +5 -0
  110. package/dist/icons/assets/unlocked.svg.js +5 -0
  111. package/dist/icons/index.d.ts +4 -0
  112. package/dist/icons/index.js +179 -171
  113. package/dist/impact-nova.css +1 -1
  114. package/dist/index.d.ts +4 -0
  115. package/dist/index.js +232 -172
  116. package/package.json +36 -4
  117. package/dist/components/ui/ag-grid-react/cell-renderers/types.js +0 -74
@@ -1,28 +1,29 @@
1
- import { jsx as t, jsxs as h } from "react/jsx-runtime";
2
- import D, { useMemo as z } from "react";
3
- import { useSortable as E, defaultAnimateLayoutChanges as O } from "@dnd-kit/sortable";
4
- import { useDroppable as P } from "@dnd-kit/core";
5
- import { CSS as $ } from "@dnd-kit/utilities";
6
- import { Checkbox as j } from "../../checkbox.js";
7
- import { ChevronRight as H, Drag as L } from "../../../../icons/index.js";
8
- import { cn as n } from "../../../../lib/utils.js";
9
- const F = (e, o, r, l, a) => {
10
- const d = "flex items-center gap-1 py-[3px] px-2 rounded transition-all duration-200";
11
- return e ? n(d, "bg-transparent") : a ? n(d, "bg-red-100 border border-red-300 animate-pulse") : o && r ? l ? n(d, "bg-blue-50 border-2 border-blue-300 shadow-sm") : n(d, "bg-red-50 border-2 border-red-300 shadow-sm") : n(d, "hover:bg-gray-50");
12
- }, M = (e) => O({ ...e, wasDragging: !0 }), _ = ({ item: e, isAnyDragging: o }) => {
1
+ import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
+ import z, { useMemo as L } from "react";
3
+ import { useSortable as O, defaultAnimateLayoutChanges as P } from "@dnd-kit/sortable";
4
+ import { useDroppable as $ } from "@dnd-kit/core";
5
+ import { CSS as j } from "@dnd-kit/utilities";
6
+ import { Checkbox as E } from "../../checkbox.js";
7
+ import { ChevronRight as H, Drag as F } from "../../../../icons/index.js";
8
+ import { cn as d } from "../../../../lib/utils.js";
9
+ import { useImpactNovaI18n as M } from "../../../../i18n/ImpactNovaI18nContext.js";
10
+ const _ = (e, o, r, l, a) => {
11
+ const s = "flex items-center gap-1 py-[3px] px-2 rounded transition-all duration-200";
12
+ return e ? d(s, "bg-transparent") : a ? d(s, "bg-red-100 border border-red-300 animate-pulse") : o && r ? l ? d(s, "bg-blue-50 border-2 border-blue-300 shadow-sm") : d(s, "bg-red-50 border-2 border-red-300 shadow-sm") : d(s, "hover:bg-gray-50");
13
+ }, T = (e) => P({ ...e, wasDragging: !0 }), q = ({ item: e, isAnyDragging: o }) => {
13
14
  const r = !e.children || e.children.length === 0, {
14
15
  setNodeRef: l,
15
16
  isOver: a
16
- } = P({
17
+ } = $({
17
18
  id: `droppable-${e.id}`,
18
19
  data: { sectionId: e.id },
19
20
  disabled: !r
20
21
  });
21
- return /* @__PURE__ */ h("div", { ref: r ? l : void 0, children: [
22
- /* @__PURE__ */ h(
22
+ return /* @__PURE__ */ p("div", { ref: r ? l : void 0, children: [
23
+ /* @__PURE__ */ p(
23
24
  "div",
24
25
  {
25
- className: n(
26
+ className: d(
26
27
  "flex items-center px-2 py-0 text-xs font-[500] leading-4 text-[#7a8294] select-none",
27
28
  e.id === "root-scrollable" ? "mt-2 pt-2 pb-1 border-t border-solid border-gray-100" : "mt-1 pb-1",
28
29
  a && o && r && "bg-blue-50 rounded"
@@ -36,7 +37,7 @@ const F = (e, o, r, l, a) => {
36
37
  r && /* @__PURE__ */ t(
37
38
  "div",
38
39
  {
39
- className: n(
40
+ className: d(
40
41
  "mx-2 my-1 rounded border-2 border-dashed min-h-[36px] flex items-center justify-center text-[11px] transition-colors",
41
42
  a && o ? "border-blue-400 bg-blue-50 text-blue-400" : "border-gray-200 text-gray-300"
42
43
  ),
@@ -44,42 +45,42 @@ const F = (e, o, r, l, a) => {
44
45
  }
45
46
  )
46
47
  ] });
47
- }, T = ({
48
+ }, B = ({
48
49
  item: e,
49
50
  level: o,
50
51
  isCollapsed: r,
51
52
  onToggle: l,
52
53
  onToggleCollapse: a,
53
- isAnyDragging: d = !1,
54
- isOver: p = !1,
55
- isValidDrop: f = !1,
56
- enableDragDrop: x = !0,
54
+ isAnyDragging: s = !1,
55
+ isOver: h = !1,
56
+ isValidDrop: x = !1,
57
+ enableDragDrop: g = !0,
57
58
  enableCollapse: u = !0,
58
- shouldBlink: g = !1
59
+ shouldBlink: v = !1
59
60
  }) => {
60
- const m = e.category === "structure", c = e.children && e.children.length > 0, v = z(() => !e.children || e.children.length === 0 || e.children.every((b) => b.checked) ? !1 : e.children.some((b) => b.checked), [e.children]), {
61
+ const { t: m } = M(), f = e.category === "structure", c = e.children && e.children.length > 0, y = L(() => !e.children || e.children.length === 0 || e.children.every((b) => b.checked) ? !1 : e.children.some((b) => b.checked), [e.children]), {
61
62
  attributes: C,
62
- listeners: y,
63
- setNodeRef: k,
64
- transform: N,
65
- transition: I,
63
+ listeners: k,
64
+ setNodeRef: N,
65
+ transform: I,
66
+ transition: S,
66
67
  isDragging: i,
67
- isOver: S
68
- } = E({
68
+ isOver: w
69
+ } = O({
69
70
  id: e.id,
70
- animateLayoutChanges: M,
71
+ animateLayoutChanges: T,
71
72
  data: {
72
73
  level: o,
73
74
  hasChildren: c,
74
75
  isExpanded: !r
75
76
  },
76
- disabled: m || e.disabled
77
+ disabled: f || e.disabled
77
78
  });
78
- if (m)
79
- return /* @__PURE__ */ t(_, { item: e, isAnyDragging: d });
80
- const w = p !== void 0 ? p : S, R = {
81
- transform: $.Transform.toString(N),
82
- transition: I,
79
+ if (f)
80
+ return /* @__PURE__ */ t(q, { item: e, isAnyDragging: s });
81
+ const R = h !== void 0 ? h : w, D = {
82
+ transform: j.Transform.toString(I),
83
+ transition: S,
83
84
  opacity: i ? 0.5 : 1,
84
85
  zIndex: i ? 100 : "auto",
85
86
  height: "auto"
@@ -87,23 +88,23 @@ const F = (e, o, r, l, a) => {
87
88
  return /* @__PURE__ */ t(
88
89
  "div",
89
90
  {
90
- ref: k,
91
- style: R,
91
+ ref: N,
92
+ style: D,
92
93
  className: "relative",
93
94
  "data-item-id": e.id,
94
95
  "data-level": o,
95
96
  "data-checked": e.checked,
96
97
  "data-disabled": e.disabled,
97
98
  "data-collapsed": r,
98
- children: /* @__PURE__ */ h(
99
+ children: /* @__PURE__ */ p(
99
100
  "div",
100
101
  {
101
- className: F(
102
+ className: _(
102
103
  i,
103
- w,
104
- d,
105
- f,
106
- g
104
+ R,
105
+ s,
106
+ x,
107
+ v
107
108
  ),
108
109
  style: {
109
110
  paddingLeft: `${8 + o * 20}px`
@@ -113,36 +114,36 @@ const F = (e, o, r, l, a) => {
113
114
  "button",
114
115
  {
115
116
  type: "button",
116
- onClick: (s) => {
117
- s.stopPropagation(), a(e.id);
117
+ onClick: (n) => {
118
+ n.stopPropagation(), a(e.id);
118
119
  },
119
- onMouseDown: (s) => s.stopPropagation(),
120
+ onMouseDown: (n) => n.stopPropagation(),
120
121
  className: "p-1 hover:bg-gray-200 rounded-full transition-colors flex items-center text-[#8C8C8C] hover:text-primary",
121
- "aria-label": r ? "Expand" : "Collapse",
122
+ "aria-label": m(r ? "nestedList.expand" : "nestedList.collapse"),
122
123
  children: /* @__PURE__ */ t(
123
124
  H,
124
125
  {
125
126
  size: "16px",
126
- className: n("transition-transform", !r && "rotate-90")
127
+ className: d("transition-transform", !r && "rotate-90")
127
128
  }
128
129
  )
129
130
  }
130
131
  ),
131
132
  (!u || !c) && /* @__PURE__ */ t("div", { className: "w-4" }),
132
133
  /* @__PURE__ */ t(
133
- j,
134
+ E,
134
135
  {
135
136
  id: `checkbox-${e.id}`,
136
- checked: v ? "indeterminate" : e.checked,
137
+ checked: y ? "indeterminate" : e.checked,
137
138
  onCheckedChange: () => l(e.id),
138
139
  disabled: e.disabled
139
140
  }
140
141
  ),
141
- x && /* @__PURE__ */ t(
142
+ g && /* @__PURE__ */ t(
142
143
  "div",
143
144
  {
144
145
  ...C,
145
- ...y,
146
+ ...k,
146
147
  className: "cursor-grab active:cursor-grabbing p-0 hover:bg-gray-200 rounded flex items-center",
147
148
  style: {
148
149
  pointerEvents: "auto",
@@ -150,10 +151,10 @@ const F = (e, o, r, l, a) => {
150
151
  zIndex: 30,
151
152
  touchAction: "none"
152
153
  },
153
- onPointerDown: (s) => {
154
- s.stopPropagation();
154
+ onPointerDown: (n) => {
155
+ n.stopPropagation();
155
156
  },
156
- children: /* @__PURE__ */ t(L, { size: "14px", color: "#8C8C8C" })
157
+ children: /* @__PURE__ */ t(F, { size: "14px", color: "#8C8C8C" })
157
158
  }
158
159
  ),
159
160
  /* @__PURE__ */ t(
@@ -169,7 +170,7 @@ const F = (e, o, r, l, a) => {
169
170
  )
170
171
  }
171
172
  );
172
- }, X = D.memo(T);
173
+ }, A = z.memo(B);
173
174
  export {
174
- X as SortableItem
175
+ A as SortableItem
175
176
  };