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.
- package/README.md +49 -0
- package/dist/components/layout/dashboard-layout.d.ts +15 -1
- package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +65 -64
- package/dist/components/ui/accordion.js +38 -34
- package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +1 -1
- package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.d.ts +58 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.js +104 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +62 -54
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +4 -6
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +54 -68
- package/dist/components/ui/ag-grid-react/cell-renderers/index.d.ts +3 -1
- package/dist/components/ui/ag-grid-react/cell-renderers/index.js +33 -27
- package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +3 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +28 -12
- package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.d.ts +2 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +45 -44
- package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.d.ts +4 -6
- package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +23 -37
- package/dist/components/ui/ag-grid-react/cell-renderers/types.d.ts +33 -17
- package/dist/components/ui/ag-grid-react/editable-utils.d.ts +27 -0
- package/dist/components/ui/ag-grid-react/editable-utils.js +62 -0
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +99 -98
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +110 -143
- package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +72 -69
- package/dist/components/ui/ag-grid-react/headers/components/header-info.js +36 -35
- package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +14 -12
- package/dist/components/ui/ag-grid-react/headers/custom-header.js +111 -110
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +204 -203
- package/dist/components/ui/alert.js +62 -58
- package/dist/components/ui/breadcrumb.js +81 -74
- package/dist/components/ui/calendar.js +354 -354
- package/dist/components/ui/chart/chart.js +63 -62
- package/dist/components/ui/chips.js +42 -38
- package/dist/components/ui/command-palette/command-palette-context.d.ts +52 -0
- package/dist/components/ui/command-palette/command-palette-context.js +110 -0
- package/dist/components/ui/command-palette/command-palette.d.ts +67 -0
- package/dist/components/ui/command-palette/command-palette.js +402 -0
- package/dist/components/ui/command-palette/index.d.ts +23 -0
- package/dist/components/ui/command-palette/index.js +44 -0
- package/dist/components/ui/command-palette/kbd.d.ts +28 -0
- package/dist/components/ui/command-palette/kbd.js +52 -0
- package/dist/components/ui/command-palette/shortcut-registry.d.ts +68 -0
- package/dist/components/ui/command-palette/shortcut-registry.js +183 -0
- package/dist/components/ui/command-palette/shortcut-scope-provider.d.ts +55 -0
- package/dist/components/ui/command-palette/shortcut-scope-provider.js +55 -0
- package/dist/components/ui/command-palette/shortcut-settings.d.ts +27 -0
- package/dist/components/ui/command-palette/shortcut-settings.js +266 -0
- package/dist/components/ui/command-palette/use-browser-shortcuts.d.ts +32 -0
- package/dist/components/ui/command-palette/use-browser-shortcuts.js +48 -0
- package/dist/components/ui/command-palette/use-global-shortcut.d.ts +3 -0
- package/dist/components/ui/command-palette/use-global-shortcut.js +7 -0
- package/dist/components/ui/command-palette/use-shortcut.d.ts +47 -0
- package/dist/components/ui/command-palette/use-shortcut.js +49 -0
- package/dist/components/ui/command-palette/utils.d.ts +119 -0
- package/dist/components/ui/command-palette/utils.js +248 -0
- package/dist/components/ui/data-table/data-table-column-list.js +87 -86
- package/dist/components/ui/data-table/data-table-format-options.js +45 -44
- package/dist/components/ui/data-table/data-table-view-options.js +39 -38
- package/dist/components/ui/date-picker/date-picker.js +89 -87
- package/dist/components/ui/date-picker/date-range-picker.js +140 -138
- package/dist/components/ui/date-picker/month-picker.js +82 -81
- package/dist/components/ui/date-picker/month-range-picker.js +108 -105
- package/dist/components/ui/date-picker/multi-date-picker.js +68 -66
- package/dist/components/ui/date-picker/multi-month-picker.js +59 -58
- package/dist/components/ui/date-picker/multi-week-picker.js +80 -78
- package/dist/components/ui/date-picker/week-picker.js +117 -115
- package/dist/components/ui/date-picker/week-range-picker.js +166 -164
- package/dist/components/ui/dialog.js +78 -73
- package/dist/components/ui/drawer.js +71 -66
- package/dist/components/ui/file-upload.js +131 -127
- package/dist/components/ui/filter-panel/filter-panel.js +98 -94
- package/dist/components/ui/filter-strip/filter-strip.js +95 -91
- package/dist/components/ui/filter-strip/filter-summary.js +91 -90
- package/dist/components/ui/header.js +57 -53
- package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +78 -76
- package/dist/components/ui/loader.js +17 -16
- package/dist/components/ui/nested-list/components/NestedListHeader.d.ts +1 -0
- package/dist/components/ui/nested-list/components/NestedListHeader.js +51 -48
- package/dist/components/ui/nested-list/components/SortableItem.js +60 -59
- package/dist/components/ui/nested-list/nested-list.js +184 -182
- package/dist/components/ui/notification-panel/notification-panel.js +60 -53
- package/dist/components/ui/popover.js +45 -40
- package/dist/components/ui/prompt.js +90 -86
- package/dist/components/ui/select/select.js +206 -209
- package/dist/components/ui/sheet.d.ts +1 -0
- package/dist/components/ui/sheet.js +50 -48
- package/dist/components/ui/sidebar.js +273 -267
- package/dist/components/ui/stepper.js +75 -63
- package/dist/components/ui/tag.js +48 -44
- package/dist/components/ui/toast.js +46 -41
- package/dist/i18n/ImpactNovaI18nContext.d.ts +21 -0
- package/dist/i18n/ImpactNovaI18nContext.js +76 -0
- package/dist/i18n/defaultMessages.d.ts +231 -0
- package/dist/i18n/defaultMessages.js +206 -0
- package/dist/i18n/getDateFnsLocale.d.ts +11 -0
- package/dist/i18n/getDateFnsLocale.js +21 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/locales/de.d.ts +2 -0
- package/dist/i18n/locales/de.js +206 -0
- package/dist/i18n/locales/es.d.ts +2 -0
- package/dist/i18n/locales/es.js +206 -0
- package/dist/i18n/locales/hi.d.ts +2 -0
- package/dist/i18n/locales/hi.js +206 -0
- package/dist/i18n/locales/index.d.ts +4 -0
- package/dist/i18n/locales/kn.d.ts +2 -0
- package/dist/i18n/locales/kn.js +206 -0
- package/dist/icons/assets/boxAdd.svg.js +5 -0
- package/dist/icons/assets/boxed.svg.js +5 -0
- package/dist/icons/assets/trolley.svg.js +5 -0
- package/dist/icons/assets/unlocked.svg.js +5 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +179 -171
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +232 -172
- package/package.json +36 -4
- package/dist/components/ui/ag-grid-react/cell-renderers/types.js +0 -74
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { useSortable as
|
|
4
|
-
import { useDroppable as
|
|
5
|
-
import { CSS as
|
|
6
|
-
import { Checkbox as
|
|
7
|
-
import { ChevronRight as H, Drag as
|
|
8
|
-
import { cn as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
} =
|
|
17
|
+
} = $({
|
|
17
18
|
id: `droppable-${e.id}`,
|
|
18
19
|
data: { sectionId: e.id },
|
|
19
20
|
disabled: !r
|
|
20
21
|
});
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ p("div", { ref: r ? l : void 0, children: [
|
|
23
|
+
/* @__PURE__ */ p(
|
|
23
24
|
"div",
|
|
24
25
|
{
|
|
25
|
-
className:
|
|
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:
|
|
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
|
-
},
|
|
48
|
+
}, B = ({
|
|
48
49
|
item: e,
|
|
49
50
|
level: o,
|
|
50
51
|
isCollapsed: r,
|
|
51
52
|
onToggle: l,
|
|
52
53
|
onToggleCollapse: a,
|
|
53
|
-
isAnyDragging:
|
|
54
|
-
isOver:
|
|
55
|
-
isValidDrop:
|
|
56
|
-
enableDragDrop:
|
|
54
|
+
isAnyDragging: s = !1,
|
|
55
|
+
isOver: h = !1,
|
|
56
|
+
isValidDrop: x = !1,
|
|
57
|
+
enableDragDrop: g = !0,
|
|
57
58
|
enableCollapse: u = !0,
|
|
58
|
-
shouldBlink:
|
|
59
|
+
shouldBlink: v = !1
|
|
59
60
|
}) => {
|
|
60
|
-
const m = e.category === "structure", c = e.children && e.children.length > 0,
|
|
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:
|
|
63
|
-
setNodeRef:
|
|
64
|
-
transform:
|
|
65
|
-
transition:
|
|
63
|
+
listeners: k,
|
|
64
|
+
setNodeRef: N,
|
|
65
|
+
transform: I,
|
|
66
|
+
transition: S,
|
|
66
67
|
isDragging: i,
|
|
67
|
-
isOver:
|
|
68
|
-
} =
|
|
68
|
+
isOver: w
|
|
69
|
+
} = O({
|
|
69
70
|
id: e.id,
|
|
70
|
-
animateLayoutChanges:
|
|
71
|
+
animateLayoutChanges: T,
|
|
71
72
|
data: {
|
|
72
73
|
level: o,
|
|
73
74
|
hasChildren: c,
|
|
74
75
|
isExpanded: !r
|
|
75
76
|
},
|
|
76
|
-
disabled:
|
|
77
|
+
disabled: f || e.disabled
|
|
77
78
|
});
|
|
78
|
-
if (
|
|
79
|
-
return /* @__PURE__ */ t(
|
|
80
|
-
const
|
|
81
|
-
transform:
|
|
82
|
-
transition:
|
|
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:
|
|
91
|
-
style:
|
|
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__ */
|
|
99
|
+
children: /* @__PURE__ */ p(
|
|
99
100
|
"div",
|
|
100
101
|
{
|
|
101
|
-
className:
|
|
102
|
+
className: _(
|
|
102
103
|
i,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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: (
|
|
117
|
-
|
|
117
|
+
onClick: (n) => {
|
|
118
|
+
n.stopPropagation(), a(e.id);
|
|
118
119
|
},
|
|
119
|
-
onMouseDown: (
|
|
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 ? "
|
|
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:
|
|
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
|
-
|
|
134
|
+
E,
|
|
134
135
|
{
|
|
135
136
|
id: `checkbox-${e.id}`,
|
|
136
|
-
checked:
|
|
137
|
+
checked: y ? "indeterminate" : e.checked,
|
|
137
138
|
onCheckedChange: () => l(e.id),
|
|
138
139
|
disabled: e.disabled
|
|
139
140
|
}
|
|
140
141
|
),
|
|
141
|
-
|
|
142
|
+
g && /* @__PURE__ */ t(
|
|
142
143
|
"div",
|
|
143
144
|
{
|
|
144
145
|
...C,
|
|
145
|
-
...
|
|
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: (
|
|
154
|
-
|
|
154
|
+
onPointerDown: (n) => {
|
|
155
|
+
n.stopPropagation();
|
|
155
156
|
},
|
|
156
|
-
children: /* @__PURE__ */ t(
|
|
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
|
-
},
|
|
173
|
+
}, A = z.memo(B);
|
|
173
174
|
export {
|
|
174
|
-
|
|
175
|
+
A as SortableItem
|
|
175
176
|
};
|