impact-nova 2.1.0-alpha.4 → 2.1.0-alpha.5
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/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.d.ts +3 -0
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +6 -0
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +15 -21
- package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.js +1 -1
- package/dist/components/data/ag-grid-react/cell-renderers/default-text-cell-renderer.d.ts +1 -2
- package/dist/components/data/ag-grid-react/cell-renderers/default-text-cell-renderer.js +12 -6
- package/dist/components/data/ag-grid-react/cell-renderers/editors/textarea-cell-editor.js +19 -19
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +1 -1
- package/dist/components/data/ag-grid-react/cell-renderers/switch-display-renderer.js +15 -15
- package/dist/components/data/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +1 -1
- package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.js +33 -33
- package/dist/components/data/ag-grid-react/headers/components/header-info.js +66 -62
- package/dist/components/data/ag-grid-react/headers/components/info-modal.js +6 -6
- package/dist/components/data/ag-grid-react/headers/components/section-renderers.js +18 -18
- package/dist/components/data/ag-grid-react/headers/custom-header-group.js +40 -29
- package/dist/components/data/ag-grid-react/headers/custom-header.js +102 -98
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +156 -148
- package/dist/components/data/ag-grid-react/theme.js +3 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.d.ts +5 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.js +13 -0
- package/dist/components/data/ag-grid-react/useGridAutoSizeStrategyOnResize.js +8 -5
- package/dist/components/data/data-table/data-table-column-apply.d.ts +16 -0
- package/dist/components/data/data-table/data-table-column-apply.js +18 -0
- package/dist/components/data/data-table/data-table-column-list.d.ts +13 -3
- package/dist/components/data/data-table/data-table-column-list.js +198 -191
- package/dist/components/data/data-table/data-table-constants.d.ts +3 -4
- package/dist/components/data/data-table/data-table-context.d.ts +3 -6
- package/dist/components/data/data-table/data-table-context.js +21 -10
- package/dist/components/data/data-table/data-table-saved-views.js +26 -26
- package/dist/components/data/data-table/data-table-sheet-portal-store.d.ts +13 -0
- package/dist/components/data/data-table/data-table-sheet-portal-store.js +36 -0
- package/dist/components/data/data-table/data-table-sheet.d.ts +3 -6
- package/dist/components/data/data-table/data-table-sheet.js +1 -1
- package/dist/components/data/data-table/data-table-view-menu.js +40 -40
- package/dist/components/data/data-table/data-table.d.ts +8 -10
- package/dist/components/data/data-table/data-table.js +131 -113
- package/dist/components/data/data-table/data-table.types.d.ts +35 -0
- package/dist/components/data/data-table/index.js +28 -27
- package/dist/components/data/data-table/indicator-legend.js +6 -6
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.d.ts +8 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +72 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-context.d.ts +13 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-context.js +25 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.d.ts +6 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +41 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.d.ts +31 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.js +233 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-preset.d.ts +18 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-preset.js +133 -0
- package/dist/components/data/expandable-list-item/expandable-list-item.d.ts +5 -0
- package/dist/components/data/{expandable-sku/expandable-sku.types.d.ts → expandable-list-item/expandable-list-item.types.d.ts} +7 -7
- package/dist/components/data/expandable-list-item/index.d.ts +5 -0
- package/dist/components/data/expandable-list-item/index.js +19 -0
- package/dist/components/data/nested-list/components/NestedListHeader.js +11 -11
- package/dist/components/data/nested-list/components/SortableItem.js +2 -2
- package/dist/components/data-display/avatar/avatar.types.d.ts +2 -0
- package/dist/components/data-display/badge/badge.types.d.ts +2 -0
- package/dist/components/data-display/calendar/calendar-day-picker-classnames.js +11 -11
- package/dist/components/data-display/calendar/calendar-month-picker-panel.js +7 -7
- package/dist/components/data-display/calendar/calendar-week-number-cell.js +31 -31
- package/dist/components/data-display/card/card.js +8 -8
- package/dist/components/data-display/chart/chart.types.d.ts +9 -0
- package/dist/components/data-display/skeleton/skeleton.js +6 -6
- package/dist/components/data-display/statistics-card/statistics-card.js +14 -14
- package/dist/components/feedback/alert-dialog/alert-dialog.js +19 -19
- package/dist/components/feedback/dialog/dialog.js +1 -1
- package/dist/components/feedback/drawer/drawer.js +18 -18
- package/dist/components/feedback/dropdown-menu/dropdown-menu.js +70 -57
- package/dist/components/feedback/popover/popover.js +1 -1
- package/dist/components/feedback/sheet/sheet.js +1 -1
- package/dist/components/feedback/tooltip/tooltip.js +22 -22
- package/dist/components/feedback/tooltip/tooltip.variants.js +1 -1
- package/dist/components/flows/command-palette/command-palette.js +104 -104
- package/dist/components/flows/command-palette/shortcut-settings.js +34 -34
- package/dist/components/flows/filter-strip/filter-tag-list.js +4 -4
- package/dist/components/flows/notification-panel/notification-list.js +17 -17
- package/dist/components/flows/notification-panel/notification-panel.js +4 -4
- package/dist/components/flows/notification-panel/notification-panel.types.d.ts +3 -0
- package/dist/components/flows/wizard/wizard.js +8 -8
- package/dist/components/forms/combobox/combobox.js +20 -20
- package/dist/components/forms/date-picker/date-picker.js +17 -17
- package/dist/components/forms/date-picker/date-range-picker.js +3 -3
- package/dist/components/forms/date-picker/month-picker.js +1 -1
- package/dist/components/forms/date-picker/month-range-picker.js +42 -42
- package/dist/components/forms/date-picker/week-picker.js +15 -15
- package/dist/components/forms/date-picker/week-range-picker.js +3 -3
- package/dist/components/forms/file-upload/file-upload.js +33 -33
- package/dist/components/forms/input/input.js +8 -8
- package/dist/components/forms/input/input.variants.js +3 -3
- package/dist/components/forms/select/components/SelectMenuPanel.d.ts +1 -2
- package/dist/components/forms/select/components/SelectMenuPanel.js +18 -20
- package/dist/components/forms/select/components/SelectTrigger.d.ts +9 -6
- package/dist/components/forms/select/components/SelectTrigger.js +120 -122
- package/dist/components/forms/select/components/Submenu.js +8 -8
- package/dist/components/forms/select/hooks/useSelectKeyboardHandlers.d.ts +1 -1
- package/dist/components/forms/select/select.js +86 -86
- package/dist/components/forms/select/select.variants.js +4 -4
- package/dist/components/layout/sidebar/sidebar.d.ts +7 -50
- package/dist/components/layout/sidebar/sidebar.js +12 -11
- package/dist/components/layout/sidebar/sidebar.types.d.ts +35 -1
- package/dist/components/primitives/button-group/button-group.js +32 -32
- package/dist/components/primitives/chips/chips.variants.js +5 -5
- package/dist/components/primitives/empty-container/empty-container.types.d.ts +3 -0
- package/dist/components/primitives/kbd/kbd.variants.js +3 -3
- package/dist/components/primitives/stepper/stepper.js +6 -6
- package/dist/impact-nova-components.css +97 -0
- package/dist/impact-nova-tokens.scss +2 -4
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +446 -413
- package/dist/lib/compose-refs.d.ts +8 -0
- package/dist/lib/compose-refs.js +14 -0
- package/dist/lib/primitives/field.types.d.ts +8 -2
- package/dist/lib/virtualized/index.d.ts +3 -0
- package/dist/lib/virtualized/index.js +33 -16
- package/dist/lib/virtualized/useVirtualizedList.d.ts +2 -0
- package/dist/lib/virtualized/useVirtualizedList.js +115 -109
- package/dist/lib/virtualized/virtualized-list-context.d.ts +12 -0
- package/dist/lib/virtualized/virtualized-list-context.js +21 -0
- package/dist/lib/virtualized/virtualized-list-parts.d.ts +51 -0
- package/dist/lib/virtualized/virtualized-list-parts.js +175 -0
- package/dist/lib/virtualized/virtualized-list-utils.d.ts +5 -0
- package/dist/lib/virtualized/virtualized-list-utils.js +6 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/migration.js +1 -1
- package/dist/llms/rules/real-world-patterns.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +24 -15
- package/tailwind.config.js +1 -0
- package/dist/components/data/ag-grid-react/headers/components/truncated-text.d.ts +0 -15
- package/dist/components/data/ag-grid-react/headers/components/truncated-text.js +0 -27
- package/dist/components/data/expandable-sku/expandable-sku.d.ts +0 -38
- package/dist/components/data/expandable-sku/expandable-sku.js +0 -245
- package/dist/components/data/expandable-sku/index.d.ts +0 -2
- package/dist/components/data/expandable-sku/index.js +0 -4
|
@@ -26,8 +26,8 @@ const Ae = ["default", "active", "system"], Ye = ({
|
|
|
26
26
|
isLoadingViews: L = !1,
|
|
27
27
|
customListContent: _,
|
|
28
28
|
disableApply: ie = !1,
|
|
29
|
-
className:
|
|
30
|
-
onSaveViewClick:
|
|
29
|
+
className: re,
|
|
30
|
+
onSaveViewClick: le,
|
|
31
31
|
onApply: se,
|
|
32
32
|
onCancel: oe,
|
|
33
33
|
onEditView: de,
|
|
@@ -55,26 +55,26 @@ const Ae = ["default", "active", "system"], Ye = ({
|
|
|
55
55
|
n.useEffect(() => {
|
|
56
56
|
const e = u && !K.current;
|
|
57
57
|
if (K.current = u, e) {
|
|
58
|
-
const
|
|
59
|
-
M(
|
|
58
|
+
const r = o.find((c) => c.isActive);
|
|
59
|
+
M(r?.id ?? null), S("All"), z(""), D("");
|
|
60
60
|
}
|
|
61
61
|
}, [u, o]);
|
|
62
62
|
const g = n.useMemo(() => v === "All" ? o : o.filter((e) => e.viewType === v), [o, v]), f = w.trim().toLowerCase(), T = n.useCallback(
|
|
63
|
-
(e,
|
|
63
|
+
(e, r) => r ? (e.viewName ?? "").trim().toLowerCase().includes(r) : !0,
|
|
64
64
|
[]
|
|
65
65
|
), A = n.useMemo(() => {
|
|
66
66
|
let e = g;
|
|
67
|
-
return f && (e = e.filter((
|
|
67
|
+
return f && (e = e.filter((r) => T(r, f))), e;
|
|
68
68
|
}, [g, f, T]), h = n.useMemo(() => {
|
|
69
69
|
if (g.length === 0) return [];
|
|
70
70
|
const e = Object.groupBy(g, Me);
|
|
71
|
-
return Ae.flatMap((
|
|
72
|
-
const c = e[
|
|
71
|
+
return Ae.flatMap((r) => {
|
|
72
|
+
const c = e[r]?.[0];
|
|
73
73
|
return c ? f && !T(c, f) ? [] : [c] : [];
|
|
74
74
|
});
|
|
75
75
|
}, [g, f, T]), P = n.useMemo(() => {
|
|
76
|
-
const e = new Set(h.map((
|
|
77
|
-
return A.filter((
|
|
76
|
+
const e = new Set(h.map((r) => r.id));
|
|
77
|
+
return A.filter((r) => !e.has(r.id));
|
|
78
78
|
}, [A, h]), G = N === null ? null : o.find((e) => e.id === N) ?? null, fe = () => {
|
|
79
79
|
se?.(G, { activeView: d }), p(!1);
|
|
80
80
|
}, he = () => {
|
|
@@ -84,23 +84,23 @@ const Ae = ["default", "active", "system"], Ye = ({
|
|
|
84
84
|
};
|
|
85
85
|
if (!b)
|
|
86
86
|
return null;
|
|
87
|
-
const ve = o.length > 0, H = (e,
|
|
88
|
-
const O = N === e.id, s = me === e.id, J =
|
|
87
|
+
const ve = o.length > 0, H = (e, r, c) => {
|
|
88
|
+
const O = N === e.id, s = me === e.id, J = r === "priority" && !!e.isActive, xe = r === "list" && !!e.isActive;
|
|
89
89
|
return /* @__PURE__ */ i(
|
|
90
90
|
"div",
|
|
91
91
|
{
|
|
92
92
|
tabIndex: 0,
|
|
93
93
|
className: k(
|
|
94
94
|
"mb-1 flex cursor-pointer items-center justify-between rounded-lg px-3 py-2 text-left text-sm font-medium font-['Manrope'] transition-all duration-300 relative overflow-hidden",
|
|
95
|
-
!s && "hover:bg-muted",
|
|
95
|
+
!s && "hover:bg-canvas-muted",
|
|
96
96
|
!s && J && !O && "bg-primary/10 dark:bg-primary/15",
|
|
97
97
|
!s && O && "bg-badge-info-muted text-badge-info-foreground",
|
|
98
98
|
!s && !O && !J && "text-foreground",
|
|
99
99
|
s && "pointer-events-none"
|
|
100
100
|
),
|
|
101
101
|
onClick: () => !s && M(e.id),
|
|
102
|
-
onKeyDown: (
|
|
103
|
-
(
|
|
102
|
+
onKeyDown: (l) => {
|
|
103
|
+
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), s || M(e.id));
|
|
104
104
|
},
|
|
105
105
|
children: [
|
|
106
106
|
s && /* @__PURE__ */ t(
|
|
@@ -135,8 +135,8 @@ const Ae = ["default", "active", "system"], Ye = ({
|
|
|
135
135
|
size: "iconSm",
|
|
136
136
|
className: "text-foreground hover:text-content-charcoal",
|
|
137
137
|
"aria-label": a("dataTable.savedViewsEdit"),
|
|
138
|
-
onClick: (
|
|
139
|
-
|
|
138
|
+
onClick: (l) => {
|
|
139
|
+
l.stopPropagation(), l.preventDefault(), p(!1), de?.(e, { activeView: d });
|
|
140
140
|
},
|
|
141
141
|
children: /* @__PURE__ */ t(Ne, { className: "size-3.5" })
|
|
142
142
|
}
|
|
@@ -149,8 +149,8 @@ const Ae = ["default", "active", "system"], Ye = ({
|
|
|
149
149
|
size: "iconSm",
|
|
150
150
|
className: "text-foreground hover:text-destructive",
|
|
151
151
|
"aria-label": a("dataTable.savedViewsDelete"),
|
|
152
|
-
onClick: (
|
|
153
|
-
|
|
152
|
+
onClick: (l) => {
|
|
153
|
+
l.stopPropagation(), l.preventDefault(), p(!1), $(e);
|
|
154
154
|
},
|
|
155
155
|
children: /* @__PURE__ */ t(Te, { className: "size-3.5" })
|
|
156
156
|
}
|
|
@@ -164,8 +164,8 @@ const Ae = ["default", "active", "system"], Ye = ({
|
|
|
164
164
|
className: "text-yellow-500 hover:text-yellow-600 disabled:opacity-50",
|
|
165
165
|
"aria-label": a("dataTable.savedViewsDefaultAction"),
|
|
166
166
|
disabled: s,
|
|
167
|
-
onClick: (
|
|
168
|
-
|
|
167
|
+
onClick: (l) => {
|
|
168
|
+
l.stopPropagation(), l.preventDefault(), s || (y(e.id), setTimeout(() => y(null), 1200), U?.(e, { activeView: d }));
|
|
169
169
|
},
|
|
170
170
|
children: s ? /* @__PURE__ */ t("div", { className: "size-3.5 animate-spin motion-reduce:animate-none rounded-full border-2 border-yellow-500 border-t-transparent" }) : /* @__PURE__ */ t(I, { className: "size-3.5 fill-current text-yellow-500" })
|
|
171
171
|
}
|
|
@@ -178,8 +178,8 @@ const Ae = ["default", "active", "system"], Ye = ({
|
|
|
178
178
|
className: "text-yellow-500 hover:text-yellow-600 disabled:opacity-50",
|
|
179
179
|
"aria-label": a("dataTable.savedViewsSetDefault"),
|
|
180
180
|
disabled: s,
|
|
181
|
-
onClick: (
|
|
182
|
-
|
|
181
|
+
onClick: (l) => {
|
|
182
|
+
l.stopPropagation(), l.preventDefault(), s || (y(e.id), setTimeout(() => y(null), 1200), U?.(e, { activeView: d }));
|
|
183
183
|
},
|
|
184
184
|
children: s ? /* @__PURE__ */ t("div", { className: "size-3.5 animate-spin motion-reduce:animate-none rounded-full border-2 border-yellow-500 border-t-transparent" }) : /* @__PURE__ */ t(I, { className: "size-3.5 text-yellow-500" })
|
|
185
185
|
}
|
|
@@ -197,7 +197,7 @@ const Ae = ["default", "active", "system"], Ye = ({
|
|
|
197
197
|
"data-component": "data-table-saved-views",
|
|
198
198
|
className: k(
|
|
199
199
|
"mb-2 mx-4 flex min-w-0 flex-nowrap items-center justify-between gap-2 rounded-lg bg-feedback-success-surface px-2 py-3",
|
|
200
|
-
|
|
200
|
+
re
|
|
201
201
|
),
|
|
202
202
|
children: [
|
|
203
203
|
L ? /* @__PURE__ */ i("div", { className: "flex min-w-0 flex-1 items-center gap-1 overflow-hidden", children: [
|
|
@@ -302,7 +302,7 @@ const Ae = ["default", "active", "system"], Ye = ({
|
|
|
302
302
|
prefix: /* @__PURE__ */ t(
|
|
303
303
|
ye,
|
|
304
304
|
{
|
|
305
|
-
className: "size-4 shrink-0 text-
|
|
305
|
+
className: "size-4 shrink-0 text-secondary-foreground",
|
|
306
306
|
"aria-hidden": !0
|
|
307
307
|
}
|
|
308
308
|
),
|
|
@@ -369,7 +369,7 @@ const Ae = ["default", "active", "system"], Ye = ({
|
|
|
369
369
|
size: "sm",
|
|
370
370
|
className: "shrink-0 font-['Manrope']",
|
|
371
371
|
onClick: () => {
|
|
372
|
-
p(!1),
|
|
372
|
+
p(!1), le?.({ activeView: d });
|
|
373
373
|
},
|
|
374
374
|
children: a("dataTable.savedViewsSave")
|
|
375
375
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface DataTableSheetPortalSnapshot {
|
|
2
|
+
sheetTarget: HTMLDivElement | null;
|
|
3
|
+
scopedSheetOpen: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface DataTableSheetPortalStore {
|
|
6
|
+
getSnapshot: () => DataTableSheetPortalSnapshot;
|
|
7
|
+
subscribe: (listener: () => void) => () => void;
|
|
8
|
+
setSheetTarget: (sheetTarget: HTMLDivElement | null) => void;
|
|
9
|
+
registerScopedSheetDepth: (delta: 1 | -1) => void;
|
|
10
|
+
reset: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function createDataTableSheetPortalStore(): DataTableSheetPortalStore;
|
|
13
|
+
export declare function useDataTableSheetPortalSnapshot(store: DataTableSheetPortalStore): DataTableSheetPortalSnapshot;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useSyncExternalStore as o } from "react";
|
|
2
|
+
function p() {
|
|
3
|
+
let t = 0, n = {
|
|
4
|
+
sheetTarget: null,
|
|
5
|
+
scopedSheetOpen: !1
|
|
6
|
+
};
|
|
7
|
+
const r = /* @__PURE__ */ new Set(), a = () => {
|
|
8
|
+
r.forEach((e) => e());
|
|
9
|
+
};
|
|
10
|
+
return {
|
|
11
|
+
getSnapshot: () => n,
|
|
12
|
+
subscribe: (e) => (r.add(e), () => r.delete(e)),
|
|
13
|
+
setSheetTarget: (e) => {
|
|
14
|
+
n.sheetTarget !== e && (n = { ...n, sheetTarget: e }, a());
|
|
15
|
+
},
|
|
16
|
+
registerScopedSheetDepth: (e) => {
|
|
17
|
+
t = Math.max(0, t + e);
|
|
18
|
+
const s = t > 0;
|
|
19
|
+
n.scopedSheetOpen !== s && (n = { ...n, scopedSheetOpen: s }, a());
|
|
20
|
+
},
|
|
21
|
+
reset: () => {
|
|
22
|
+
t = 0, n = { sheetTarget: null, scopedSheetOpen: !1 }, a();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function S(t) {
|
|
27
|
+
return o(
|
|
28
|
+
t.subscribe,
|
|
29
|
+
t.getSnapshot,
|
|
30
|
+
t.getSnapshot
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
p as createDataTableSheetPortalStore,
|
|
35
|
+
S as useDataTableSheetPortalSnapshot
|
|
36
|
+
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
open?: boolean;
|
|
6
|
-
onOpenChange?: (open: boolean) => void;
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
import { DataTableSheetProps } from './data-table.types';
|
|
3
|
+
export type { DataTableSheetProps } from './data-table.types';
|
|
4
|
+
export declare const DataTableSheet: ({ children, defaultOpen, open: controlledOpen, onOpenChange, }: DataTableSheetProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
5
|
export declare const DataTableSheetTrigger: ({ children, asChild, }: {
|
|
9
6
|
children: React.ReactNode;
|
|
10
7
|
asChild?: boolean;
|
|
@@ -67,7 +67,7 @@ const I = ({
|
|
|
67
67
|
className: "close_icon h-6 w-6 rounded-full hover:bg-muted/50",
|
|
68
68
|
"aria-label": "Close",
|
|
69
69
|
onClick: () => o(!1),
|
|
70
|
-
children: /* @__PURE__ */ t(C, { className: "!h-3 !w-3 text-content-
|
|
70
|
+
children: /* @__PURE__ */ t(C, { className: "!h-3 !w-3 text-content-icon" })
|
|
71
71
|
}
|
|
72
72
|
)
|
|
73
73
|
] })
|
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import { DropdownMenuContent as
|
|
3
|
+
import { DropdownMenuContent as p, DropdownMenuSub as m, DropdownMenuSubTrigger as d, DropdownMenuSubContent as u, DropdownMenuRadioGroup as g, DropdownMenuRadioItem as r, DropdownMenuItem as l, DropdownMenuTrigger as f } from "../../feedback/dropdown-menu/dropdown-menu.js";
|
|
4
4
|
import { Button as h } from "../../primitives/button/button.js";
|
|
5
5
|
import { cn as b } from "../../../lib/utils.js";
|
|
6
6
|
import { Density as x, Stack as T, StackCompact as w, StackComfort as D, Settings as N, ThreeDots as C, Collapse as M, Expand as S } from "impact-nova-icons";
|
|
7
|
-
import { useImpactNovaI18n as
|
|
7
|
+
import { useImpactNovaI18n as i } from "../../../i18n/use-impact-nova-i18n.js";
|
|
8
8
|
import { useDataTable as v } from "./data-table-context.js";
|
|
9
9
|
import { DataTableSheetTrigger as P } from "./data-table-sheet.js";
|
|
10
10
|
const y = ({
|
|
11
|
-
children:
|
|
11
|
+
children: t,
|
|
12
12
|
...n
|
|
13
13
|
}) => {
|
|
14
|
-
const { t: o } =
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
14
|
+
const { t: o } = i();
|
|
15
|
+
return /* @__PURE__ */ a(f, { asChild: !0, ...n, children: t ?? /* @__PURE__ */ s(h, { variant: "secondary", size: "icon", "aria-label": o("dataTable.more"), children: [
|
|
16
|
+
/* @__PURE__ */ a(C, { size: "sm" }),
|
|
17
|
+
/* @__PURE__ */ a("span", { className: "sr-only", children: o("dataTable.openMenu") })
|
|
18
18
|
] }) });
|
|
19
19
|
};
|
|
20
20
|
y.displayName = "DataTableViewMenuTrigger";
|
|
21
|
-
const k = c.forwardRef(({ className:
|
|
22
|
-
|
|
21
|
+
const k = c.forwardRef(({ className: t, align: n = "end", ...o }, e) => /* @__PURE__ */ a(
|
|
22
|
+
p,
|
|
23
23
|
{
|
|
24
24
|
ref: e,
|
|
25
25
|
align: n,
|
|
26
26
|
"data-component": "data-table-view-menu",
|
|
27
|
-
className: b("w-[240px] flex flex-col gap-[2px]",
|
|
27
|
+
className: b("w-[240px] flex flex-col gap-[2px]", t),
|
|
28
28
|
...o
|
|
29
29
|
}
|
|
30
30
|
));
|
|
31
31
|
k.displayName = "DataTableViewMenuContent";
|
|
32
32
|
const G = () => {
|
|
33
|
-
const { t
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
|
|
33
|
+
const { t } = i();
|
|
34
|
+
return /* @__PURE__ */ a(P, { asChild: !0, children: /* @__PURE__ */ a(
|
|
35
|
+
l,
|
|
36
36
|
{
|
|
37
37
|
className: "flex cursor-pointer gap-2",
|
|
38
38
|
onClick: (n) => n.stopPropagation(),
|
|
39
39
|
onSelect: (n) => n.stopPropagation(),
|
|
40
40
|
children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ a(N, { size: "sm", className: "text-content-icon" }),
|
|
42
|
+
/* @__PURE__ */ a("span", { children: t("dataTable.tableSettings") })
|
|
43
43
|
] })
|
|
44
44
|
}
|
|
45
45
|
) });
|
|
46
46
|
}, q = () => {
|
|
47
|
-
const { t
|
|
48
|
-
return /* @__PURE__ */ s(
|
|
47
|
+
const { t } = i(), { rowHeight: n, setRowHeight: o } = v();
|
|
48
|
+
return /* @__PURE__ */ s(m, { children: [
|
|
49
49
|
/* @__PURE__ */ s(
|
|
50
50
|
d,
|
|
51
51
|
{
|
|
52
52
|
className: "flex items-center gap-2 cursor-pointer",
|
|
53
53
|
onClick: (e) => e.stopPropagation(),
|
|
54
54
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ a(x, { size: "sm", className: "text-content-icon" }),
|
|
56
|
+
/* @__PURE__ */ a("span", { children: t("dataTable.contentDensity") })
|
|
57
57
|
]
|
|
58
58
|
}
|
|
59
59
|
),
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ a(u, { className: "w-[190px]", children: /* @__PURE__ */ s(
|
|
61
61
|
g,
|
|
62
62
|
{
|
|
63
63
|
value: n,
|
|
64
64
|
onValueChange: (e) => o(e),
|
|
65
65
|
className: "flex flex-col gap-0.5",
|
|
66
66
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
|
|
67
|
+
/* @__PURE__ */ a(
|
|
68
|
+
r,
|
|
69
69
|
{
|
|
70
70
|
value: "default",
|
|
71
71
|
onClick: (e) => e.stopPropagation(),
|
|
72
72
|
onSelect: (e) => e.stopPropagation(),
|
|
73
73
|
children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
|
|
74
|
+
/* @__PURE__ */ a(T, { size: "sm", className: "text-content-icon" }),
|
|
75
|
+
t("dataTable.densityDefault")
|
|
76
76
|
] })
|
|
77
77
|
}
|
|
78
78
|
),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
|
|
79
|
+
/* @__PURE__ */ a(
|
|
80
|
+
r,
|
|
81
81
|
{
|
|
82
82
|
value: "compact",
|
|
83
83
|
onClick: (e) => e.stopPropagation(),
|
|
84
84
|
onSelect: (e) => e.stopPropagation(),
|
|
85
85
|
children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
|
|
86
|
+
/* @__PURE__ */ a(w, { size: "sm", className: "text-content-icon" }),
|
|
87
|
+
t("dataTable.densityCompact")
|
|
88
88
|
] })
|
|
89
89
|
}
|
|
90
90
|
),
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
91
|
+
/* @__PURE__ */ a(
|
|
92
|
+
r,
|
|
93
93
|
{
|
|
94
94
|
value: "comfort",
|
|
95
95
|
onClick: (e) => e.stopPropagation(),
|
|
96
96
|
onSelect: (e) => e.stopPropagation(),
|
|
97
97
|
children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
|
|
98
|
+
/* @__PURE__ */ a(D, { size: "sm", className: "text-content-icon" }),
|
|
99
|
+
t("dataTable.densityComfort")
|
|
100
100
|
] })
|
|
101
101
|
}
|
|
102
102
|
)
|
|
@@ -105,21 +105,21 @@ const G = () => {
|
|
|
105
105
|
) })
|
|
106
106
|
] });
|
|
107
107
|
}, A = ({
|
|
108
|
-
expanded:
|
|
108
|
+
expanded: t,
|
|
109
109
|
onExpandedChange: n
|
|
110
110
|
}) => {
|
|
111
|
-
const { t: o } =
|
|
112
|
-
return /* @__PURE__ */
|
|
113
|
-
|
|
111
|
+
const { t: o } = i();
|
|
112
|
+
return /* @__PURE__ */ a(
|
|
113
|
+
l,
|
|
114
114
|
{
|
|
115
115
|
className: "flex cursor-pointer gap-2",
|
|
116
116
|
onClick: (e) => e.stopPropagation(),
|
|
117
117
|
onSelect: (e) => {
|
|
118
|
-
e.stopPropagation(), n(!
|
|
118
|
+
e.stopPropagation(), n(!t);
|
|
119
119
|
},
|
|
120
120
|
children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
121
|
-
|
|
122
|
-
/* @__PURE__ */
|
|
121
|
+
t ? /* @__PURE__ */ a(M, { size: "sm", className: "text-content-icon" }) : /* @__PURE__ */ a(S, { size: "sm", className: "text-content-icon" }),
|
|
122
|
+
/* @__PURE__ */ a("span", { children: o(t ? "dataTable.tableCollapse" : "dataTable.tableExpand") })
|
|
123
123
|
] })
|
|
124
124
|
}
|
|
125
125
|
);
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export type { DataTableProps, DataTableContentProps } from './data-table.types';
|
|
1
|
+
import { DataTableProps, DataTableContentProps, DataTableToolbarProps } from './data-table.types';
|
|
2
|
+
export type { DataTableProps, DataTableContentProps, DataTableToolbarProps, } from './data-table.types';
|
|
4
3
|
/**
|
|
5
4
|
* DataTable Root
|
|
6
5
|
* Provides context and structural container.
|
|
7
6
|
*/
|
|
8
7
|
export declare const DataTable: ({ children, className, }: DataTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* DataTable Content — does not subscribe to sheet open/close; only the frame
|
|
10
|
+
* and sheet UI re-render when the scoped settings panel toggles.
|
|
11
|
+
*/
|
|
9
12
|
export declare function DataTableContent<TData>(props: DataTableContentProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
10
13
|
/**
|
|
11
|
-
*
|
|
12
|
-
* Generic container for top-bar actions.
|
|
13
|
-
* Users can conditionally render this component to remove it from DOM.
|
|
14
|
+
* Top bar above the grid. Optional — omit to remove the toolbar from the DOM.
|
|
14
15
|
*/
|
|
15
|
-
export declare const DataTableToolbar: ({ children, className, }:
|
|
16
|
-
children: React.ReactNode;
|
|
17
|
-
className?: string;
|
|
18
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const DataTableToolbar: ({ children, className, }: DataTableToolbarProps) => import("react/jsx-runtime").JSX.Element;
|