@navikt/ds-react 8.10.3 → 8.10.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/cjs/action-menu/ActionMenu.js +1 -1
- package/cjs/action-menu/ActionMenu.js.map +1 -1
- package/cjs/data/drag-and-drop/drag-handler/DragAndDropDragHandler.js +11 -12
- package/cjs/data/drag-and-drop/drag-handler/DragAndDropDragHandler.js.map +1 -1
- package/cjs/data/drag-and-drop/root/DragAndDrop.context.d.ts +4 -2
- package/cjs/data/drag-and-drop/root/DragAndDrop.context.js.map +1 -1
- package/cjs/data/drag-and-drop/root/DragAndDropRoot.d.ts +5 -5
- package/cjs/data/drag-and-drop/root/DragAndDropRoot.js +49 -28
- package/cjs/data/drag-and-drop/root/DragAndDropRoot.js.map +1 -1
- package/cjs/data/drag-and-drop/types.d.ts +0 -4
- package/cjs/data/{drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.d.ts → drag-and-drop-legacy/drag-handler/DragAndDropDragHandlerLegacy.d.ts} +3 -3
- package/cjs/data/{drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.js → drag-and-drop-legacy/drag-handler/DragAndDropDragHandlerLegacy.js} +5 -5
- package/cjs/data/drag-and-drop-legacy/drag-handler/DragAndDropDragHandlerLegacy.js.map +1 -0
- package/cjs/data/drag-and-drop-legacy/item/DragAndDropItemLegacy.d.ts +27 -0
- package/cjs/data/{drag-and-drop-old/item/DataDragAndDropItem.js → drag-and-drop-legacy/item/DragAndDropItemLegacy.js} +12 -12
- package/cjs/data/drag-and-drop-legacy/item/DragAndDropItemLegacy.js.map +1 -0
- package/cjs/data/drag-and-drop-legacy/root/DragAndDropLegacy.context.d.ts +5 -0
- package/cjs/data/drag-and-drop-legacy/root/DragAndDropLegacy.context.js +6 -0
- package/cjs/data/drag-and-drop-legacy/root/DragAndDropLegacy.context.js.map +1 -0
- package/cjs/data/drag-and-drop-legacy/root/DragAndDropLegacyRoot.d.ts +24 -0
- package/cjs/data/{drag-and-drop-old/root/DataDragAndDropRoot.js → drag-and-drop-legacy/root/DragAndDropLegacyRoot.js} +10 -10
- package/cjs/data/drag-and-drop-legacy/root/DragAndDropLegacyRoot.js.map +1 -0
- package/cjs/data/stories/Data.test-data.d.ts +24 -0
- package/cjs/data/stories/Data.test-data.js +1615 -0
- package/cjs/data/stories/Data.test-data.js.map +1 -0
- package/cjs/data/table/column-header/DataTableColumnHeader.d.ts +4 -1
- package/cjs/data/table/column-header/DataTableColumnHeader.js +4 -4
- package/cjs/data/table/column-header/DataTableColumnHeader.js.map +1 -1
- package/cjs/data/table/column-header/useTableColumnResize.d.ts +21 -18
- package/cjs/data/table/column-header/useTableColumnResize.js +7 -25
- package/cjs/data/table/column-header/useTableColumnResize.js.map +1 -1
- package/cjs/data/table/details-panel-row/DataTableDetailsPanelRow.d.ts +6 -0
- package/cjs/data/table/details-panel-row/DataTableDetailsPanelRow.js +32 -0
- package/cjs/data/table/details-panel-row/DataTableDetailsPanelRow.js.map +1 -0
- package/cjs/data/table/helpers/collectTableRowEntries.d.ts +9 -7
- package/cjs/data/table/helpers/collectTableRowEntries.js +21 -14
- package/cjs/data/table/helpers/collectTableRowEntries.js.map +1 -1
- package/cjs/data/table/helpers/table-focus.d.ts +0 -3
- package/cjs/data/table/helpers/table-focus.js +38 -8
- package/cjs/data/table/helpers/table-focus.js.map +1 -1
- package/cjs/data/table/hooks/useColumnOptions.js +18 -5
- package/cjs/data/table/hooks/useColumnOptions.js.map +1 -1
- package/cjs/data/table/hooks/useGridCache.js +2 -2
- package/cjs/data/table/hooks/useGridCache.js.map +1 -1
- package/cjs/data/table/hooks/useTableDetailsPanel.d.ts +62 -0
- package/cjs/data/table/hooks/{useTableExpansion.js → useTableDetailsPanel.js} +21 -20
- package/cjs/data/table/hooks/useTableDetailsPanel.js.map +1 -0
- package/cjs/data/table/hooks/useTableItems.d.ts +14 -17
- package/cjs/data/table/hooks/useTableItems.js +17 -16
- package/cjs/data/table/hooks/useTableItems.js.map +1 -1
- package/cjs/data/table/hooks/useTableKeyboardNav.js +5 -1
- package/cjs/data/table/hooks/useTableKeyboardNav.js.map +1 -1
- package/cjs/data/table/hooks/useTableSelection.d.ts +4 -2
- package/cjs/data/table/hooks/useTableSelection.js +6 -1
- package/cjs/data/table/hooks/useTableSelection.js.map +1 -1
- package/cjs/data/table/index.d.ts +1 -2
- package/cjs/data/table/index.js +22 -12
- package/cjs/data/table/index.js.map +1 -1
- package/cjs/data/table/root/DataTable.types.d.ts +7 -9
- package/cjs/data/table/root/DataTableRoot.context.d.ts +5 -1
- package/cjs/data/table/root/DataTableRoot.context.js.map +1 -1
- package/cjs/data/table/root/DataTableRoot.d.ts +79 -115
- package/cjs/data/table/root/DataTableRoot.js +163 -38
- package/cjs/data/table/root/DataTableRoot.js.map +1 -1
- package/cjs/data/table/root/DataTableRoot.legacy.d.ts +177 -0
- package/cjs/data/table/root/DataTableRoot.legacy.js +104 -0
- package/cjs/data/table/root/DataTableRoot.legacy.js.map +1 -0
- package/cjs/data/table/sub-row-toggle/DataTableSubRowToggle.d.ts +6 -0
- package/cjs/data/table/sub-row-toggle/DataTableSubRowToggle.js +21 -0
- package/cjs/data/table/sub-row-toggle/DataTableSubRowToggle.js.map +1 -0
- package/cjs/data/table/tr/DataTableTr.js +11 -11
- package/cjs/data/table/tr/DataTableTr.js.map +1 -1
- package/cjs/utils/components/dismissablelayer/DismissableLayer.js +1 -1
- package/cjs/utils/components/dismissablelayer/DismissableLayer.js.map +1 -1
- package/cjs/utils/components/floating/Floating.d.ts +16 -1
- package/cjs/utils/components/floating/Floating.js +50 -13
- package/cjs/utils/components/floating/Floating.js.map +1 -1
- package/cjs/utils/components/floating-menu/Menu.js +1 -1
- package/cjs/utils/components/floating-menu/Menu.js.map +1 -1
- package/cjs/utils/helpers/create-strict-context.js +1 -1
- package/cjs/utils/helpers/create-strict-context.js.map +1 -1
- package/cjs/utils/hooks/useControllableState.d.ts +5 -5
- package/cjs/utils/hooks/useControllableState.js.map +1 -1
- package/cjs/utils/hooks/useValueAsRef.js +1 -1
- package/cjs/utils/hooks/useValueAsRef.js.map +1 -1
- package/cjs/utils-external/hooks/useId.js +1 -1
- package/cjs/utils-external/hooks/useId.js.map +1 -1
- package/esm/action-menu/ActionMenu.js +1 -1
- package/esm/action-menu/ActionMenu.js.map +1 -1
- package/esm/data/drag-and-drop/drag-handler/DragAndDropDragHandler.js +11 -12
- package/esm/data/drag-and-drop/drag-handler/DragAndDropDragHandler.js.map +1 -1
- package/esm/data/drag-and-drop/root/DragAndDrop.context.d.ts +4 -2
- package/esm/data/drag-and-drop/root/DragAndDrop.context.js.map +1 -1
- package/esm/data/drag-and-drop/root/DragAndDropRoot.d.ts +5 -5
- package/esm/data/drag-and-drop/root/DragAndDropRoot.js +49 -28
- package/esm/data/drag-and-drop/root/DragAndDropRoot.js.map +1 -1
- package/esm/data/drag-and-drop/types.d.ts +0 -4
- package/esm/data/{drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.d.ts → drag-and-drop-legacy/drag-handler/DragAndDropDragHandlerLegacy.d.ts} +3 -3
- package/esm/data/{drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.js → drag-and-drop-legacy/drag-handler/DragAndDropDragHandlerLegacy.js} +4 -4
- package/esm/data/drag-and-drop-legacy/drag-handler/DragAndDropDragHandlerLegacy.js.map +1 -0
- package/esm/data/drag-and-drop-legacy/item/DragAndDropItemLegacy.d.ts +27 -0
- package/esm/data/{drag-and-drop-old/item/DataDragAndDropItem.js → drag-and-drop-legacy/item/DragAndDropItemLegacy.js} +11 -11
- package/esm/data/drag-and-drop-legacy/item/DragAndDropItemLegacy.js.map +1 -0
- package/esm/data/drag-and-drop-legacy/root/DragAndDropLegacy.context.d.ts +5 -0
- package/esm/data/drag-and-drop-legacy/root/DragAndDropLegacy.context.js +3 -0
- package/esm/data/drag-and-drop-legacy/root/DragAndDropLegacy.context.js.map +1 -0
- package/esm/data/drag-and-drop-legacy/root/DragAndDropLegacyRoot.d.ts +24 -0
- package/esm/data/{drag-and-drop-old/root/DataDragAndDropRoot.js → drag-and-drop-legacy/root/DragAndDropLegacyRoot.js} +8 -8
- package/esm/data/drag-and-drop-legacy/root/DragAndDropLegacyRoot.js.map +1 -0
- package/esm/data/stories/Data.test-data.d.ts +24 -0
- package/esm/data/stories/Data.test-data.js +1606 -0
- package/esm/data/stories/Data.test-data.js.map +1 -0
- package/esm/data/table/column-header/DataTableColumnHeader.d.ts +4 -1
- package/esm/data/table/column-header/DataTableColumnHeader.js +4 -4
- package/esm/data/table/column-header/DataTableColumnHeader.js.map +1 -1
- package/esm/data/table/column-header/useTableColumnResize.d.ts +21 -18
- package/esm/data/table/column-header/useTableColumnResize.js +7 -25
- package/esm/data/table/column-header/useTableColumnResize.js.map +1 -1
- package/esm/data/table/details-panel-row/DataTableDetailsPanelRow.d.ts +6 -0
- package/esm/data/table/details-panel-row/DataTableDetailsPanelRow.js +27 -0
- package/esm/data/table/details-panel-row/DataTableDetailsPanelRow.js.map +1 -0
- package/esm/data/table/helpers/collectTableRowEntries.d.ts +9 -7
- package/esm/data/table/helpers/collectTableRowEntries.js +21 -14
- package/esm/data/table/helpers/collectTableRowEntries.js.map +1 -1
- package/esm/data/table/helpers/table-focus.d.ts +0 -3
- package/esm/data/table/helpers/table-focus.js +38 -8
- package/esm/data/table/helpers/table-focus.js.map +1 -1
- package/esm/data/table/hooks/useColumnOptions.js +18 -5
- package/esm/data/table/hooks/useColumnOptions.js.map +1 -1
- package/esm/data/table/hooks/useGridCache.js +2 -2
- package/esm/data/table/hooks/useGridCache.js.map +1 -1
- package/esm/data/table/hooks/useTableDetailsPanel.d.ts +62 -0
- package/esm/data/table/hooks/{useTableExpansion.js → useTableDetailsPanel.js} +18 -17
- package/esm/data/table/hooks/useTableDetailsPanel.js.map +1 -0
- package/esm/data/table/hooks/useTableItems.d.ts +14 -17
- package/esm/data/table/hooks/useTableItems.js +17 -16
- package/esm/data/table/hooks/useTableItems.js.map +1 -1
- package/esm/data/table/hooks/useTableKeyboardNav.js +6 -2
- package/esm/data/table/hooks/useTableKeyboardNav.js.map +1 -1
- package/esm/data/table/hooks/useTableSelection.d.ts +4 -2
- package/esm/data/table/hooks/useTableSelection.js +6 -1
- package/esm/data/table/hooks/useTableSelection.js.map +1 -1
- package/esm/data/table/index.d.ts +1 -2
- package/esm/data/table/index.js +21 -1
- package/esm/data/table/index.js.map +1 -1
- package/esm/data/table/root/DataTable.types.d.ts +7 -9
- package/esm/data/table/root/DataTableRoot.context.d.ts +5 -1
- package/esm/data/table/root/DataTableRoot.context.js.map +1 -1
- package/esm/data/table/root/DataTableRoot.d.ts +79 -115
- package/esm/data/table/root/DataTableRoot.js +170 -36
- package/esm/data/table/root/DataTableRoot.js.map +1 -1
- package/esm/data/table/root/DataTableRoot.legacy.d.ts +177 -0
- package/esm/data/table/root/DataTableRoot.legacy.js +59 -0
- package/esm/data/table/root/DataTableRoot.legacy.js.map +1 -0
- package/esm/data/table/sub-row-toggle/DataTableSubRowToggle.d.ts +6 -0
- package/esm/data/table/sub-row-toggle/DataTableSubRowToggle.js +16 -0
- package/esm/data/table/sub-row-toggle/DataTableSubRowToggle.js.map +1 -0
- package/esm/data/table/tr/DataTableTr.js +11 -11
- package/esm/data/table/tr/DataTableTr.js.map +1 -1
- package/esm/utils/components/dismissablelayer/DismissableLayer.js +1 -1
- package/esm/utils/components/dismissablelayer/DismissableLayer.js.map +1 -1
- package/esm/utils/components/floating/Floating.d.ts +16 -1
- package/esm/utils/components/floating/Floating.js +48 -13
- package/esm/utils/components/floating/Floating.js.map +1 -1
- package/esm/utils/components/floating-menu/Menu.js +2 -2
- package/esm/utils/components/floating-menu/Menu.js.map +1 -1
- package/esm/utils/helpers/create-strict-context.js +1 -1
- package/esm/utils/helpers/create-strict-context.js.map +1 -1
- package/esm/utils/hooks/useControllableState.d.ts +5 -5
- package/esm/utils/hooks/useControllableState.js.map +1 -1
- package/esm/utils/hooks/useValueAsRef.js +1 -1
- package/esm/utils/hooks/useValueAsRef.js.map +1 -1
- package/esm/utils-external/hooks/useId.js +1 -1
- package/esm/utils-external/hooks/useId.js.map +1 -1
- package/package.json +8 -7
- package/src/action-menu/ActionMenu.tsx +1 -1
- package/src/data/drag-and-drop/drag-handler/DragAndDropDragHandler.tsx +11 -16
- package/src/data/drag-and-drop/root/DragAndDrop.context.tsx +4 -2
- package/src/data/drag-and-drop/root/DragAndDropRoot.tsx +85 -40
- package/src/data/drag-and-drop/types.ts +0 -5
- package/src/data/{drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.tsx → drag-and-drop-legacy/drag-handler/DragAndDropDragHandlerLegacy.tsx} +5 -5
- package/src/data/{drag-and-drop-old/item/DataDragAndDropItem.tsx → drag-and-drop-legacy/item/DragAndDropItemLegacy.tsx} +13 -13
- package/src/data/{drag-and-drop-old/root/DataDragAndDrop.context.tsx → drag-and-drop-legacy/root/DragAndDropLegacy.context.tsx} +3 -3
- package/src/data/{drag-and-drop-old/root/DataDragAndDropRoot.tsx → drag-and-drop-legacy/root/DragAndDropLegacyRoot.tsx} +19 -21
- package/src/data/stories/Data.test-data.tsx +1702 -0
- package/src/data/table/column-header/DataTableColumnHeader.tsx +8 -6
- package/src/data/table/column-header/useTableColumnResize.ts +29 -44
- package/src/data/table/details-panel-row/DataTableDetailsPanelRow.tsx +57 -0
- package/src/data/table/helpers/collectTableRowEntries.ts +36 -30
- package/src/data/table/helpers/table-focus.ts +63 -9
- package/src/data/table/hooks/__tests__/useTableItems.test.ts +58 -12
- package/src/data/table/hooks/__tests__/useTableSelection.test.ts +57 -44
- package/src/data/table/hooks/useColumnOptions.ts +19 -5
- package/src/data/table/hooks/useGridCache.ts +3 -2
- package/src/data/table/hooks/useTableDetailsPanel.tsx +185 -0
- package/src/data/table/hooks/useTableItems.ts +44 -52
- package/src/data/table/hooks/useTableKeyboardNav.ts +6 -2
- package/src/data/table/hooks/useTableSelection.ts +17 -6
- package/src/data/table/index.tsx +5 -3
- package/src/data/table/root/DataTable.types.ts +20 -9
- package/src/data/table/root/DataTableRoot.context.ts +5 -1
- package/src/data/table/root/DataTableRoot.legacy.tsx +297 -0
- package/src/data/table/root/DataTableRoot.tsx +484 -219
- package/src/data/table/root/agent-feature-gap.md +96 -0
- package/src/data/table/sub-row-toggle/DataTableSubRowToggle.tsx +39 -0
- package/src/data/table/tr/DataTableTr.tsx +14 -13
- package/src/utils/components/dismissablelayer/DismissableLayer.tsx +1 -1
- package/src/utils/components/floating/Floating.tsx +56 -13
- package/src/utils/components/floating-menu/Menu.tsx +4 -1
- package/src/utils/helpers/create-strict-context.tsx +1 -1
- package/src/utils/hooks/useControllableState.ts +11 -8
- package/src/utils/hooks/useValueAsRef.ts +1 -1
- package/src/utils-external/hooks/useId.ts +1 -1
- package/cjs/data/drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.js.map +0 -1
- package/cjs/data/drag-and-drop-old/item/DataDragAndDropItem.d.ts +0 -27
- package/cjs/data/drag-and-drop-old/item/DataDragAndDropItem.js.map +0 -1
- package/cjs/data/drag-and-drop-old/root/DataDragAndDrop.context.d.ts +0 -5
- package/cjs/data/drag-and-drop-old/root/DataDragAndDrop.context.js +0 -6
- package/cjs/data/drag-and-drop-old/root/DataDragAndDrop.context.js.map +0 -1
- package/cjs/data/drag-and-drop-old/root/DataDragAndDropRoot.d.ts +0 -24
- package/cjs/data/drag-and-drop-old/root/DataDragAndDropRoot.js.map +0 -1
- package/cjs/data/table/hooks/useTableExpansion.d.ts +0 -27
- package/cjs/data/table/hooks/useTableExpansion.js.map +0 -1
- package/cjs/data/table/root/DataTableAuto.d.ts +0 -182
- package/cjs/data/table/root/DataTableAuto.js +0 -206
- package/cjs/data/table/root/DataTableAuto.js.map +0 -1
- package/esm/data/drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.js.map +0 -1
- package/esm/data/drag-and-drop-old/item/DataDragAndDropItem.d.ts +0 -27
- package/esm/data/drag-and-drop-old/item/DataDragAndDropItem.js.map +0 -1
- package/esm/data/drag-and-drop-old/root/DataDragAndDrop.context.d.ts +0 -5
- package/esm/data/drag-and-drop-old/root/DataDragAndDrop.context.js +0 -3
- package/esm/data/drag-and-drop-old/root/DataDragAndDrop.context.js.map +0 -1
- package/esm/data/drag-and-drop-old/root/DataDragAndDropRoot.d.ts +0 -24
- package/esm/data/drag-and-drop-old/root/DataDragAndDropRoot.js.map +0 -1
- package/esm/data/table/hooks/useTableExpansion.d.ts +0 -27
- package/esm/data/table/hooks/useTableExpansion.js.map +0 -1
- package/esm/data/table/root/DataTableAuto.d.ts +0 -182
- package/esm/data/table/root/DataTableAuto.js +0 -170
- package/esm/data/table/root/DataTableAuto.js.map +0 -1
- package/src/data/table/hooks/useTableExpansion.tsx +0 -146
- package/src/data/table/root/DataTableAuto.test.tsx +0 -244
- package/src/data/table/root/DataTableAuto.tsx +0 -612
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
### Component: DataTable
|
|
2
|
+
|
|
3
|
+
**Primitive type:** Data table with optional selection, sorting, nested rows, details panels, sticky columns, column resizing, and keyboard cell navigation.
|
|
4
|
+
**Reference libraries:** React Aria Table / Adobe Spectrum TableView, MUI Data Grid, Base UI table patterns. Cloudscape Table is a useful secondary reference for resize/details behavior.
|
|
5
|
+
|
|
6
|
+
### Launch Review Findings
|
|
7
|
+
|
|
8
|
+
1. **The auto API has no visible caption slot or caption prop.**
|
|
9
|
+
Consumers can still pass `aria-label`/`aria-labelledby` through native table props, but `children?: never` means the preview API cannot render a native `caption` or a built-in visible summary/title. Mature table APIs usually provide at least one clear accessible naming path.
|
|
10
|
+
|
|
11
|
+
2. **Column resizing is present, but the preview API still reads as unfinished.**
|
|
12
|
+
Resizing is effectively opt-out in fixed layout because `DataTableColumnHeader` defaults `resizable` to `true`. The interaction also still has unfinished accessibility and i18n details, and `onWidthChange` currently fires for every width step while dragging.
|
|
13
|
+
|
|
14
|
+
3. **Critical behaviors are under-tested for a preview launch.**
|
|
15
|
+
Existing tests cover selection trees, item expansion state, and low-level keyboard helpers, but not the end-to-end behaviors users will notice first: sorting, details panels, loading states, row click behavior, column resizing, and selection accessibility.
|
|
16
|
+
|
|
17
|
+
### Feature Gap Table
|
|
18
|
+
|
|
19
|
+
| # | Feature | Status | Priority | Reference | Notes |
|
|
20
|
+
| --- | --------------------------------------------------- | ---------- | --------------- | ---------------------------- | ----------------------------------------------------------------------- |
|
|
21
|
+
| 1 | Arrow/Home/End keyboard cell navigation | ✅ Present | — | React Aria, MUI | Good base coverage in helper tests. |
|
|
22
|
+
| 2 | Controlled/uncontrolled sorting | ✅ Present | — | React Aria, MUI | Supports controlled and uncontrolled sort arrays. |
|
|
23
|
+
| 3 | Multi-column sorting | ✅ Present | — | MUI, Spectrum | Shift-click is supported. |
|
|
24
|
+
| 4 | Controlled/uncontrolled row selection | ✅ Present | — | React Aria, MUI | Single and multiple selection both exist. |
|
|
25
|
+
| 5 | Controlled/uncontrolled nested row expansion | ✅ Present | — | MUI, Spectrum | `subRows` API is already solid for preview. |
|
|
26
|
+
| 6 | Controlled/uncontrolled details panel expansion | ✅ Present | — | MUI | Good baseline, limited to top-level rows by design. |
|
|
27
|
+
| 7 | Loading overlay / loading rows / empty state | ✅ Present | — | MUI, Spectrum | Baseline states exist. |
|
|
28
|
+
| 9 | Visible caption / built-in accessible naming path | ❌ Missing | 🔴 Expected | React Aria, Spectrum | Auto API cannot render `caption`; users only get raw HTML attrs. |
|
|
29
|
+
| 13 | Opt-in / polished column resize API | ⚠️ Partial | 🟡 Valuable | MUI, Cloudscape | Feature exists, but defaults and a11y polish are not preview-ready yet. |
|
|
30
|
+
| 14 | Per-row disabled selection callback | ❌ Missing | 🟡 Valuable | React Aria, MUI | Current API only accepts disabled keys, not row-driven logic. |
|
|
31
|
+
| 15 | Row-level prop/className callback | ❌ Missing | 🟡 Valuable | MUI | No way to attach row-specific attrs/classes without custom rendering. |
|
|
32
|
+
| 16 | Header-group / multi-row header support in auto API | ❌ Missing | 🟢 Nice-to-have | React Aria, MUI | Current auto API is intentionally flat. |
|
|
33
|
+
| 17 | Accessor shorthand for simple columns | ❌ Missing | 🟢 Nice-to-have | MUI, TanStack-style patterns | Would reduce boilerplate for simple data tables. |
|
|
34
|
+
| 18 | Typeahead row navigation | ❌ Missing | 🟢 Nice-to-have | React Aria | Useful on large data sets, not necessary for first preview. |
|
|
35
|
+
| 19 | RTL-aware sticky/nesting layout | ❌ Missing | 🟢 Nice-to-have | React Aria, MUI | Current sticky/nesting CSS is mostly physical, not logical. |
|
|
36
|
+
|
|
37
|
+
### Implementation Notes
|
|
38
|
+
|
|
39
|
+
#### 9. Visible caption / built-in accessible naming path
|
|
40
|
+
|
|
41
|
+
- **What it does:** Lets consumers provide a native table caption or a clearly supported naming API without dropping to raw HTML attributes.
|
|
42
|
+
- **Reference behavior:** React Aria tables require an accessible label; Spectrum and MUI also expose a clear naming path.
|
|
43
|
+
- **Approach here:** Keep `children` forbidden, but add a `caption?: React.ReactNode` prop that renders a native `caption`. Optionally add `captionProps` for styling hooks.
|
|
44
|
+
- **Props/API additions needed:** `caption?: React.ReactNode`, optionally `captionProps?: React.HTMLAttributes<HTMLTableCaptionElement>`.
|
|
45
|
+
|
|
46
|
+
#### 13. Opt-in / polished column resize API
|
|
47
|
+
|
|
48
|
+
- **What it does:** Makes resize behavior predictable and avoids surprising every preview consumer with advanced header affordances.
|
|
49
|
+
- **Reference behavior:** MUI and Cloudscape treat column resize as an explicit feature and spend a lot of API surface on labels, limits, and commit behavior.
|
|
50
|
+
- **Approach here:** Default `resizable` to `false`, add missing slider aria metadata, and only call `onWidthChange` on commit or with a small debounce. Also move hard-coded Norwegian labels into the same i18n pattern as the rest of the component.
|
|
51
|
+
- **Props/API additions needed:** No new public props required for a first pass. The main change is default behavior and polish.
|
|
52
|
+
|
|
53
|
+
#### 14. Per-row disabled selection callback
|
|
54
|
+
|
|
55
|
+
- **What it does:** Lets consumers disable selection from row data instead of precomputing key arrays.
|
|
56
|
+
- **Reference behavior:** Many mature table APIs allow row-driven selection rules.
|
|
57
|
+
- **Approach here:** Resolve disabled state during row collection so selection helpers can still work with ids internally.
|
|
58
|
+
- **Props/API additions needed:** `isRowSelectionDisabled?: (rowData: T) => boolean`.
|
|
59
|
+
|
|
60
|
+
#### 15. Row-level prop/className callback
|
|
61
|
+
|
|
62
|
+
- **What it does:** Lets consumers add row-specific classes, test hooks, aria hooks, and state styling without replacing the table implementation.
|
|
63
|
+
- **Reference behavior:** MUI exposes row-class callbacks and row metadata hooks.
|
|
64
|
+
- **Approach here:** Apply callbacks when rendering `DataTableTr` so the row id and row data are both available.
|
|
65
|
+
- **Props/API additions needed:** `getRowProps?: (rowData: T, rowId: string | number) => React.HTMLAttributes<HTMLTableRowElement>` or a narrower `getRowClassName` if you want to keep the API tighter.
|
|
66
|
+
|
|
67
|
+
### Internal Refactors
|
|
68
|
+
|
|
69
|
+
1. Split the current root into a small orchestration hook plus presentational sub-components. `DataTableRoot.tsx` currently owns state setup, context assembly, loading/empty rendering, row rendering, and sticky-wrapper logic in one file.
|
|
70
|
+
|
|
71
|
+
2. Replace object-keyed `itemDetails` lookups with id-keyed row entries. This fixes the duplicate-object bug and simplifies details-panel and selection wiring.
|
|
72
|
+
|
|
73
|
+
3. Unify loading-state presence checks. `DataTableTBodyContent` uses nullish checks for `loadingState`, while `showLoadingOverlay` in the root uses truthiness checks; those should match.
|
|
74
|
+
|
|
75
|
+
4. Make localization an explicit seam. The component currently hard-codes visible and aria labels such as sort-resize instructions, expand/collapse labels, and selection labels directly in render code.
|
|
76
|
+
|
|
77
|
+
5. Revisit the resize default and commit path before large-table performance work. Continuous `onWidthChange` callbacks can easily push rerenders through the whole table if consumers control widths externally.
|
|
78
|
+
|
|
79
|
+
6. Decide whether the preview API is a plain table or the start of a data-grid abstraction. A few current seams, especially keyboard navigation and selection, are already grid-like, while captioning and row-header semantics still assume a plain table model.
|
|
80
|
+
|
|
81
|
+
### Test Gaps Before Preview
|
|
82
|
+
|
|
83
|
+
1. Sorting interaction story/test covering click, keyboard activation, and multi-sort.
|
|
84
|
+
2. Details-panel story/test covering expand, collapse, `aria-controls`, and controlled mode.
|
|
85
|
+
3. Loading/empty-state tests covering overlay vs skeleton vs custom loading content.
|
|
86
|
+
4. Row-click tests covering selection interaction, text-selection guard, and interactive-content guard.
|
|
87
|
+
5. Resize tests covering keyboard resize, pointer resize, and form embedding.
|
|
88
|
+
6. Accessibility test coverage for selection labels and row-header semantics once those are implemented.
|
|
89
|
+
|
|
90
|
+
### Suggested Order For Follow-up Work
|
|
91
|
+
|
|
92
|
+
1. Fix selection labeling and row-header semantics together.
|
|
93
|
+
2. Add a built-in caption/naming API.
|
|
94
|
+
3. Harden resize defaults and button semantics.
|
|
95
|
+
4. Refactor row metadata to be id-based.
|
|
96
|
+
5. Fill the missing user-facing stories/tests around sort, details, loading, and row click.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ChevronDownIcon, ChevronRightIcon } from "@navikt/aksel-icons";
|
|
3
|
+
import { Button } from "../../../button";
|
|
4
|
+
import { type ItemDetail, useTableItemsContext } from "../hooks/useTableItems";
|
|
5
|
+
|
|
6
|
+
function DataTableSubRowToggle({ details }: { details: ItemDetail<any> }) {
|
|
7
|
+
const { isSubRowExpanded, onExpandedRowIdsChange } = useTableItemsContext();
|
|
8
|
+
|
|
9
|
+
const subRows = details.children;
|
|
10
|
+
const hasSubRows = subRows && subRows.length > 0;
|
|
11
|
+
const isRowExpanded = isSubRowExpanded(details.id);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div className="aksel-data-table__nested-toggle">
|
|
15
|
+
{hasSubRows && (
|
|
16
|
+
<Button
|
|
17
|
+
variant="tertiary"
|
|
18
|
+
data-color="neutral"
|
|
19
|
+
size="small"
|
|
20
|
+
onClick={(e) => {
|
|
21
|
+
e.stopPropagation();
|
|
22
|
+
onExpandedRowIdsChange(details.id);
|
|
23
|
+
}}
|
|
24
|
+
aria-expanded={isRowExpanded}
|
|
25
|
+
aria-label={isRowExpanded ? "Skjul under-rader" : "Vis under-rader"}
|
|
26
|
+
icon={
|
|
27
|
+
isRowExpanded ? (
|
|
28
|
+
<ChevronDownIcon aria-hidden />
|
|
29
|
+
) : (
|
|
30
|
+
<ChevronRightIcon aria-hidden />
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
/>
|
|
34
|
+
)}
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { DataTableSubRowToggle };
|
|
@@ -15,9 +15,9 @@ import { cl, composeEventHandlers } from "../../../utils/helpers";
|
|
|
15
15
|
import { DataTableBaseCell } from "../base-cell/DataTableBaseCell";
|
|
16
16
|
import { DataTableColumnHeader } from "../column-header/DataTableColumnHeader";
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} from "../hooks/
|
|
18
|
+
getDataTableDetailsPanelId,
|
|
19
|
+
useDataTableDetailsPanel,
|
|
20
|
+
} from "../hooks/useTableDetailsPanel";
|
|
21
21
|
import {
|
|
22
22
|
useDataTableContext,
|
|
23
23
|
useDataTableLocation,
|
|
@@ -46,13 +46,8 @@ const DataTableTr = forwardRef<HTMLTableRowElement, DataTableTrProps>(
|
|
|
46
46
|
},
|
|
47
47
|
forwardedRef,
|
|
48
48
|
) => {
|
|
49
|
-
const {
|
|
50
|
-
|
|
51
|
-
stickyHeader,
|
|
52
|
-
selectionState,
|
|
53
|
-
onRowClick,
|
|
54
|
-
disableRowSelectionOnClick,
|
|
55
|
-
} = useDataTableContext();
|
|
49
|
+
const { layout, stickyHeader, selectionState, onRowClick } =
|
|
50
|
+
useDataTableContext();
|
|
56
51
|
const { location } = useDataTableLocation();
|
|
57
52
|
|
|
58
53
|
const renderFillerCell = layout === "fixed" && children;
|
|
@@ -81,7 +76,7 @@ const DataTableTr = forwardRef<HTMLTableRowElement, DataTableTrProps>(
|
|
|
81
76
|
}
|
|
82
77
|
|
|
83
78
|
if (
|
|
84
|
-
!disableRowSelectionOnClick &&
|
|
79
|
+
!selectionState.disableRowSelectionOnClick &&
|
|
85
80
|
selectionState.selection.selectionMode !== "none"
|
|
86
81
|
) {
|
|
87
82
|
selectionState.selection.toggleSelection(rowId);
|
|
@@ -130,7 +125,7 @@ function RowExpansionCell({ rowId }: { rowId?: string | number }) {
|
|
|
130
125
|
isAllExpanded,
|
|
131
126
|
toggleAll,
|
|
132
127
|
showExpandAll,
|
|
133
|
-
} =
|
|
128
|
+
} = useDataTableDetailsPanel();
|
|
134
129
|
|
|
135
130
|
if (!enableDetailsPanel) {
|
|
136
131
|
return null;
|
|
@@ -143,6 +138,7 @@ function RowExpansionCell({ rowId }: { rowId?: string | number }) {
|
|
|
143
138
|
width={SELECTION_CELL_WIDTH}
|
|
144
139
|
UNSAFE_isSelection
|
|
145
140
|
data-block-keyboard-nav
|
|
141
|
+
label=""
|
|
146
142
|
/* isSticky={stickySelection && "start"} */
|
|
147
143
|
/>
|
|
148
144
|
);
|
|
@@ -160,6 +156,7 @@ function RowExpansionCell({ rowId }: { rowId?: string | number }) {
|
|
|
160
156
|
width={SELECTION_CELL_WIDTH}
|
|
161
157
|
UNSAFE_isSelection
|
|
162
158
|
data-block-keyboard-nav
|
|
159
|
+
label=""
|
|
163
160
|
/* isSticky={stickySelection && "start"} */
|
|
164
161
|
/>
|
|
165
162
|
);
|
|
@@ -171,6 +168,7 @@ function RowExpansionCell({ rowId }: { rowId?: string | number }) {
|
|
|
171
168
|
textAlign="center"
|
|
172
169
|
width={SELECTION_CELL_WIDTH}
|
|
173
170
|
UNSAFE_isSelection
|
|
171
|
+
label=""
|
|
174
172
|
/* isSticky={stickySelection && "start"} */
|
|
175
173
|
>
|
|
176
174
|
<Button
|
|
@@ -198,7 +196,7 @@ function RowExpansionCell({ rowId }: { rowId?: string | number }) {
|
|
|
198
196
|
|
|
199
197
|
const isRowExpanded = isExpanded(rowId);
|
|
200
198
|
const canExpandRow = isDetailsPanelExpandable(rowId);
|
|
201
|
-
const expansionId =
|
|
199
|
+
const expansionId = getDataTableDetailsPanelId(tableId, rowId);
|
|
202
200
|
|
|
203
201
|
if (!canExpandRow) {
|
|
204
202
|
return <DataTableTd UNSAFE_isSelection preventRowClick />;
|
|
@@ -247,6 +245,7 @@ function RowSelectionCell({ rowId }: { rowId?: string | number }) {
|
|
|
247
245
|
<DataTableColumnHeader
|
|
248
246
|
width={SELECTION_CELL_WIDTH}
|
|
249
247
|
UNSAFE_isSelection
|
|
248
|
+
label=""
|
|
250
249
|
data-block-keyboard-nav
|
|
251
250
|
isSticky={stickySelection && "start"}
|
|
252
251
|
/>
|
|
@@ -274,6 +273,7 @@ function RowSelectionCell({ rowId }: { rowId?: string | number }) {
|
|
|
274
273
|
textAlign="center"
|
|
275
274
|
width={SELECTION_CELL_WIDTH}
|
|
276
275
|
UNSAFE_isSelection
|
|
276
|
+
label=""
|
|
277
277
|
isSticky={stickySelection && "start"}
|
|
278
278
|
>
|
|
279
279
|
<Label htmlFor={inputId} visuallyHidden>
|
|
@@ -289,6 +289,7 @@ function RowSelectionCell({ rowId }: { rowId?: string | number }) {
|
|
|
289
289
|
<DataTableColumnHeader
|
|
290
290
|
width={SELECTION_CELL_WIDTH}
|
|
291
291
|
UNSAFE_isSelection
|
|
292
|
+
label=""
|
|
292
293
|
data-block-keyboard-nav
|
|
293
294
|
isSticky={stickySelection && "start"}
|
|
294
295
|
/>
|
|
@@ -342,7 +342,7 @@ const DismissableLayer = forwardRef<HTMLDivElement, DismissableLayerProps>(
|
|
|
342
342
|
if (disableOutsidePointerEvents) {
|
|
343
343
|
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
344
344
|
originalBodyPointerEvents = ownerDoc.body.style.pointerEvents;
|
|
345
|
-
ownerDoc.body.style.pointerEvents = "none";
|
|
345
|
+
ownerDoc.body.style.pointerEvents = "none";
|
|
346
346
|
}
|
|
347
347
|
context.layersWithOutsidePointerEventsDisabled.add(node);
|
|
348
348
|
}
|
|
@@ -36,6 +36,22 @@ import {
|
|
|
36
36
|
transformOrigin,
|
|
37
37
|
} from "./Floating.utils";
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Used for menus that prefer top/bottom placements and
|
|
41
|
+
* use height-var to limit their height.
|
|
42
|
+
*/
|
|
43
|
+
const MENU_COLLISION_AVOIDANCE = {
|
|
44
|
+
fallbackAxisSide: "none",
|
|
45
|
+
} as const;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Used by regular popovers that usually aren't scrollable and are allowed to
|
|
49
|
+
* freely flip to any axis of placement.
|
|
50
|
+
*/
|
|
51
|
+
const POPOVER_COLLISION_AVOIDANCE = {
|
|
52
|
+
fallbackAxisSide: "end",
|
|
53
|
+
} as const;
|
|
54
|
+
|
|
39
55
|
/**
|
|
40
56
|
* Floating Root
|
|
41
57
|
*/
|
|
@@ -189,6 +205,7 @@ interface FloatingContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
189
205
|
hideWhenDetached?: boolean;
|
|
190
206
|
updatePositionStrategy?: "optimized" | "always";
|
|
191
207
|
fallbackPlacements?: FlipOptions["fallbackPlacements"];
|
|
208
|
+
fallbackAxisSideDirection?: FlipOptions["fallbackAxisSideDirection"];
|
|
192
209
|
onPlaced?: () => void;
|
|
193
210
|
/**
|
|
194
211
|
* @default true
|
|
@@ -225,6 +242,7 @@ const FloatingContent = forwardRef<HTMLDivElement, FloatingContentProps>(
|
|
|
225
242
|
fallbackPlacements,
|
|
226
243
|
enabled = true,
|
|
227
244
|
autoUpdateWhileMounted = true,
|
|
245
|
+
fallbackAxisSideDirection = POPOVER_COLLISION_AVOIDANCE.fallbackAxisSide,
|
|
228
246
|
...contentProps
|
|
229
247
|
}: FloatingContentProps,
|
|
230
248
|
forwardedRef,
|
|
@@ -245,10 +263,31 @@ const FloatingContent = forwardRef<HTMLDivElement, FloatingContentProps>(
|
|
|
245
263
|
const desiredPlacement = (side +
|
|
246
264
|
(align !== "center" ? "-" + align : "")) as Placement;
|
|
247
265
|
|
|
266
|
+
/**
|
|
267
|
+
* Create a bias to the preferred side.
|
|
268
|
+
* On iOS, when the mobile software keyboard opens, the input is exactly centered
|
|
269
|
+
* in the viewport, but this can cause it to flip to the top undesirably.
|
|
270
|
+
*/
|
|
271
|
+
const bias = 1;
|
|
272
|
+
const biasTop = side === "bottom" ? bias : 0;
|
|
273
|
+
const biasBottom = side === "top" ? bias : 0;
|
|
274
|
+
const biasLeft = side === "right" ? bias : 0;
|
|
275
|
+
const biasRight = side === "left" ? bias : 0;
|
|
276
|
+
|
|
248
277
|
const collisionPadding =
|
|
249
278
|
typeof collisionPaddingProp === "number"
|
|
250
|
-
?
|
|
251
|
-
|
|
279
|
+
? {
|
|
280
|
+
top: collisionPaddingProp + biasTop,
|
|
281
|
+
right: collisionPaddingProp + biasRight,
|
|
282
|
+
bottom: collisionPaddingProp + biasBottom,
|
|
283
|
+
left: collisionPaddingProp + biasLeft,
|
|
284
|
+
}
|
|
285
|
+
: {
|
|
286
|
+
top: (collisionPaddingProp.top || 0) + biasTop,
|
|
287
|
+
right: (collisionPaddingProp.right || 0) + biasRight,
|
|
288
|
+
bottom: (collisionPaddingProp.bottom || 0) + biasBottom,
|
|
289
|
+
left: (collisionPaddingProp.left || 0) + biasLeft,
|
|
290
|
+
};
|
|
252
291
|
|
|
253
292
|
const boundary = Array.isArray(collisionBoundary)
|
|
254
293
|
? collisionBoundary
|
|
@@ -256,20 +295,13 @@ const FloatingContent = forwardRef<HTMLDivElement, FloatingContentProps>(
|
|
|
256
295
|
|
|
257
296
|
const hasExplicitBoundaries = boundary.length > 0;
|
|
258
297
|
|
|
259
|
-
|
|
260
|
-
* .filter(x => x !== null) does not narrow the type of the array enough.
|
|
261
|
-
*/
|
|
262
|
-
function isNotNull<T>(value: T | null): value is T {
|
|
263
|
-
return value !== null;
|
|
264
|
-
}
|
|
265
|
-
|
|
298
|
+
/* https://floating-ui.com/docs/detectOverflow#boundary */
|
|
266
299
|
const detectOverflowOptions: FlipOptions = {
|
|
267
300
|
padding: collisionPadding,
|
|
268
301
|
boundary: boundary.filter(isNotNull),
|
|
269
302
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
270
303
|
altBoundary: hasExplicitBoundaries,
|
|
271
|
-
|
|
272
|
-
fallbackAxisSideDirection: "end",
|
|
304
|
+
fallbackAxisSideDirection,
|
|
273
305
|
fallbackPlacements,
|
|
274
306
|
};
|
|
275
307
|
|
|
@@ -308,7 +340,11 @@ const FloatingContent = forwardRef<HTMLDivElement, FloatingContentProps>(
|
|
|
308
340
|
crossAxis: false,
|
|
309
341
|
limiter: limitShift(),
|
|
310
342
|
}),
|
|
311
|
-
avoidCollisions &&
|
|
343
|
+
avoidCollisions &&
|
|
344
|
+
flip({
|
|
345
|
+
...detectOverflowOptions,
|
|
346
|
+
padding: collisionPadding,
|
|
347
|
+
}),
|
|
312
348
|
size({
|
|
313
349
|
...detectOverflowOptions,
|
|
314
350
|
apply: ({ elements, rects, availableWidth, availableHeight }) => {
|
|
@@ -437,7 +473,14 @@ const FloatingContent = forwardRef<HTMLDivElement, FloatingContentProps>(
|
|
|
437
473
|
},
|
|
438
474
|
);
|
|
439
475
|
|
|
476
|
+
/**
|
|
477
|
+
* .filter(x => x !== null) does not narrow the type of the array enough.
|
|
478
|
+
*/
|
|
479
|
+
function isNotNull<T>(value: T | null): value is T {
|
|
480
|
+
return value !== null;
|
|
481
|
+
}
|
|
482
|
+
|
|
440
483
|
Floating.Anchor = FloatingAnchor;
|
|
441
484
|
Floating.Content = FloatingContent;
|
|
442
485
|
|
|
443
|
-
export { Floating };
|
|
486
|
+
export { Floating, MENU_COLLISION_AVOIDANCE, POPOVER_COLLISION_AVOIDANCE };
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
useMergeRefs,
|
|
10
10
|
} from "../../hooks";
|
|
11
11
|
import { DismissableLayer } from "../dismissablelayer/DismissableLayer";
|
|
12
|
-
import { Floating } from "../floating/Floating";
|
|
12
|
+
import { Floating, MENU_COLLISION_AVOIDANCE } from "../floating/Floating";
|
|
13
13
|
import { FocusBoundary } from "../focus-boundary/FocusBoundary";
|
|
14
14
|
import { RovingFocus, RovingFocusProps } from "./parts/RovingFocus";
|
|
15
15
|
import {
|
|
@@ -328,6 +328,9 @@ const MenuContentInternal = forwardRef<
|
|
|
328
328
|
data-state={getOpenState(context.open)}
|
|
329
329
|
data-aksel-menu-content=""
|
|
330
330
|
dir="ltr"
|
|
331
|
+
fallbackAxisSideDirection={
|
|
332
|
+
MENU_COLLISION_AVOIDANCE.fallbackAxisSide
|
|
333
|
+
}
|
|
331
334
|
{...rest}
|
|
332
335
|
ref={composedRefs}
|
|
333
336
|
style={{ outline: "none", ...rest.style }}
|
|
@@ -65,7 +65,7 @@ function createStrictContext<T>(options: {
|
|
|
65
65
|
|
|
66
66
|
function Provider({ children, ...context }: ProviderProps<T>) {
|
|
67
67
|
// biome-ignore lint/correctness/useExhaustiveDependencies: Object.values(context) includes all dependencies.
|
|
68
|
-
const value = React.useMemo(() => context, Object.values(context)) as T; // eslint-disable-line react-hooks/exhaustive-deps
|
|
68
|
+
const value = React.useMemo(() => context, Object.values(context)) as T; // eslint-disable-line react-hooks/exhaustive-deps
|
|
69
69
|
|
|
70
70
|
return <Context.Provider value={value}>{children}</Context.Provider>;
|
|
71
71
|
}
|
|
@@ -2,28 +2,31 @@
|
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { useEventCallback } from "./useEventCallback";
|
|
4
4
|
|
|
5
|
-
export interface UseControllableStateProps<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
export interface UseControllableStateProps<
|
|
6
|
+
StateT,
|
|
7
|
+
ChangeT extends StateT = StateT,
|
|
8
|
+
> {
|
|
9
|
+
value?: StateT;
|
|
10
|
+
defaultValue: StateT | (() => StateT);
|
|
11
|
+
onChange?: (value: ChangeT) => void;
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
/**
|
|
12
15
|
* `useControllableState` returns the state and function that updates the state, just like React.useState does.
|
|
13
16
|
*/
|
|
14
|
-
export function useControllableState<
|
|
17
|
+
export function useControllableState<StateT, ChangeT extends StateT = StateT>({
|
|
15
18
|
value: valueProp,
|
|
16
19
|
defaultValue,
|
|
17
20
|
onChange,
|
|
18
|
-
}: UseControllableStateProps<
|
|
21
|
+
}: UseControllableStateProps<StateT, ChangeT>) {
|
|
19
22
|
const onChangeProp = useEventCallback(onChange);
|
|
20
23
|
|
|
21
24
|
const [uncontrolledState, setUncontrolledState] = useState(defaultValue);
|
|
22
25
|
const controlled = valueProp !== undefined;
|
|
23
26
|
const value = controlled ? valueProp : uncontrolledState;
|
|
24
27
|
|
|
25
|
-
const setValue = useEventCallback((next: React.SetStateAction<
|
|
26
|
-
const setter = next as (prevState?:
|
|
28
|
+
const setValue = useEventCallback((next: React.SetStateAction<ChangeT>) => {
|
|
29
|
+
const setter = next as (prevState?: StateT) => ChangeT;
|
|
27
30
|
const nextValue = typeof next === "function" ? setter(value) : next;
|
|
28
31
|
|
|
29
32
|
if (!controlled) {
|
|
@@ -6,7 +6,7 @@ import { useRefWithInit } from "./useRefWithInit";
|
|
|
6
6
|
function useValueAsRef<T>(value: T) {
|
|
7
7
|
const latest = useRefWithInit(createLatestRef, value).current!;
|
|
8
8
|
|
|
9
|
-
latest.next = value;
|
|
9
|
+
latest.next = value; // eslint-disable-line react-hooks/immutability
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
12
12
|
useClientLayoutEffect(latest.effect);
|
|
@@ -19,7 +19,7 @@ function useGlobalId(idOverride?: string): string | undefined {
|
|
|
19
19
|
// We can't use it server-side.
|
|
20
20
|
// If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem
|
|
21
21
|
globalId += 1;
|
|
22
|
-
setDefaultId(`aksel-id-${globalId}`);
|
|
22
|
+
setDefaultId(`aksel-id-${globalId}`); // eslint-disable-line react-hooks/set-state-in-effect
|
|
23
23
|
}
|
|
24
24
|
}, [defaultId]);
|
|
25
25
|
return id;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataDragAndDropDragHandler.js","sourceRoot":"","sources":["../../../../src/data/drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,qDAI6B;AAC7B,0EAAuE;AAmBvE;;;;;GAKG;AACU,QAAA,0BAA0B,GAAG,eAAK,CAAC,UAAU,CAGxD,CAAC,EAAE,gBAAgB,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,EAAE;IACzC,IAAI,GAAG,EAAE,CAAC;QACR,OAAO,CACL,uCAAK,SAAS,EAAC,6CAA6C;YACzD,gBAAgB,IAAI,CACnB,wCACE,SAAS,EAAC,+CAA+C,oBAC1C,IAAI;gBAEnB,8BAAC,mCAAqB,yBAAa,QAAQ,EAAC,QAAQ,GAAG,CAClD,CACR;YACD,uCACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAC,gDAAgD;gBAE1D,8BAAC,8BAAgB,yBAEf,KAAK,EAAC,uBAAkB,EACxB,QAAQ,EAAC,QAAQ,GACjB,CACE;YACL,gBAAgB,IAAI,CACnB,wCACE,SAAS,EAAC,+CAA+C,oBAC1C,MAAM;gBAErB,8BAAC,qCAAuB,yBAAa,QAAQ,EAAC,QAAQ,GAAG,CACpD,CACR,CACG,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,8BAAC,mBAAQ;QACN,gBAAgB,IAAI,CACnB,8BAAC,mBAAQ,CAAC,OAAO,IACf,IAAI,EAAC,KAAK,EACV,eAAe,EAAE,KAAK,EACtB,sBAAsB,EAAC,QAAQ,EAC/B,SAAS,EAAC,+CAA+C;YAEzD,8BAAC,mCAAqB,yBAAa,QAAQ,EAAC,QAAQ,GAAG,CACtC,CACpB;QACD,8BAAC,mBAAQ,CAAC,MAAM,IAAC,OAAO;YACtB,uCACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAC,gDAAgD;gBAE1D,8BAAC,8BAAgB,yBAEf,KAAK,EAAC,uBAAkB,EACxB,QAAQ,EAAC,QAAQ,GACjB,CACE,CACU;QACjB,gBAAgB,IAAI,CACnB,8BAAC,mBAAQ,CAAC,OAAO,IACf,eAAe,EAAE,KAAK,EACtB,sBAAsB,EAAC,QAAQ,EAC/B,SAAS,EAAC,+CAA+C;YAEzD,8BAAC,qCAAuB,yBAAa,QAAQ,EAAC,QAAQ,GAAG,CACxC,CACpB,CACQ,CACZ,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface DataDragAndDropItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
/**
|
|
5
|
-
* Unique id
|
|
6
|
-
*/
|
|
7
|
-
id: string;
|
|
8
|
-
/**
|
|
9
|
-
* Index of the item being dragged
|
|
10
|
-
*/
|
|
11
|
-
index: number;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* TODO
|
|
15
|
-
*
|
|
16
|
-
* @see 🏷️ {@link DataDragAndDropItemProps}
|
|
17
|
-
* @example
|
|
18
|
-
* ```tsx
|
|
19
|
-
* <DragAndDrop.Item numOfSelectedRows={selectedRows.length} onClear={handleClear}>
|
|
20
|
-
* TODO
|
|
21
|
-
* </DragAndDrop.Item>
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
declare const DataDragAndDropItem: React.ForwardRefExoticComponent<DataDragAndDropItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
-
export default DataDragAndDropItem;
|
|
26
|
-
export { DataDragAndDropItem };
|
|
27
|
-
export type { DataDragAndDropItemProps };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataDragAndDropItem.js","sourceRoot":"","sources":["../../../../src/data/drag-and-drop-old/item/DataDragAndDropItem.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ACV,gBAAgB,sBACtB,eAAe,EACjC,QAAQ,EAAE,CAAC,CAAC;YAEZ,8BAAC,uDAA0B,IACzB,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,GAAG,SACH;YACF,2CAAM,QAAQ,CAAO,CACjB,CACC,CACV,CAAC;AACJ,CAAC,CAAC,CAAC;AAGM,kDAAmB;AAD5B,kBAAe,mBAAmB,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DataDragAndDropContext = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
exports.DataDragAndDropContext = (0, react_1.createContext)(undefined);
|
|
6
|
-
//# sourceMappingURL=DataDragAndDrop.context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataDragAndDrop.context.js","sourceRoot":"","sources":["../../../../src/data/drag-and-drop-old/root/DataDragAndDrop.context.tsx"],"names":[],"mappings":";;;AAAA,iCAAsC;AAQzB,QAAA,sBAAsB,GAAG,IAAA,qBAAa,EAEjD,SAAS,CAAC,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import DataDragAndDropItem, { DataDragAndDropItemProps } from "../item/DataDragAndDropItem";
|
|
3
|
-
interface DataDragAndDropProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
children: any[];
|
|
5
|
-
setItems: React.Dispatch<React.SetStateAction<any[]>>;
|
|
6
|
-
}
|
|
7
|
-
interface DataDragAndDropRootComponent extends React.ForwardRefExoticComponent<DataDragAndDropProps & React.RefAttributes<HTMLDivElement>> {
|
|
8
|
-
/**
|
|
9
|
-
* @see 🏷️ {@link DataDragAndDropItemProps}
|
|
10
|
-
* * @example
|
|
11
|
-
* ```jsx
|
|
12
|
-
* <DragAndDrop>
|
|
13
|
-
* <DragAndDrop.Item id="1" index={0}>
|
|
14
|
-
* ...
|
|
15
|
-
* </DragAndDrop.Item>
|
|
16
|
-
* </DragAndDrop>
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
Item: typeof DataDragAndDropItem;
|
|
20
|
-
}
|
|
21
|
-
declare const DataDragAndDrop: DataDragAndDropRootComponent;
|
|
22
|
-
export { DataDragAndDrop, DataDragAndDropItem };
|
|
23
|
-
export default DataDragAndDrop;
|
|
24
|
-
export type { DataDragAndDropItemProps, DataDragAndDropProps };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataDragAndDropRoot.js","sourceRoot":"","sources":["../../../../src/data/drag-and-drop-old/root/DataDragAndDropRoot.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA+D;AAC/D,sDAAqD;AACrD,+CAA0D;AAC1D,qDAAmD;AACnD,sFAEqC;AAuFX,8BAzFnB,6BAAmB,CAyFmB;AAtF7C,uEAAmE;AAwBnE,MAAM,eAAe,GAAG,IAAA,kBAAU,EAChC,CAAC,EAA+B,EAAE,YAAY,EAAE,EAAE;QAAjD,EAAE,QAAQ,EAAE,QAAQ,OAAW,EAAN,IAAI,cAA7B,wBAA+B,CAAF;IAC5B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,eAAK,CAAC,QAAQ,CAElD,IAAI,CAAC,CAAC;IAER,MAAM,YAAY,GAAG,CAAC,WAAmB,EAAE,WAAmB,EAAE,EAAE;QAChE,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE;YACjB,MAAM,QAAQ,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;YAC5B,MAAM,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;YACpD,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;YAC3C,OAAO,QAAQ,CAAC;QA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OAAO,IAAI,CAAC;gBACrC,IAAI,IAAA,sBAAc,EAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC;oBAClD,OAAO,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;gBACvC,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC,CACW,CACG,CACa,CACnC,CAAC;AACJ,CAAC,CAC8B,CAAC;AAIzB,0CAAe;AAFxB,eAAe,CAAC,IAAI,GAAG,6BAAmB,CAAC;AAG3C,kBAAe,eAAe,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
type DataTableExpansionContextT = {
|
|
3
|
-
isExpanded: (id: string | number) => boolean;
|
|
4
|
-
isDetailsPanelExpandable: (id: string | number) => boolean;
|
|
5
|
-
toggleExpansion: (id: string | number) => void;
|
|
6
|
-
toggleAll: () => void;
|
|
7
|
-
isAllExpanded: boolean;
|
|
8
|
-
getDetailsPanelContent?: (row: unknown) => React.ReactNode;
|
|
9
|
-
getDetailsPanelHeight?: (row: unknown) => number | "auto";
|
|
10
|
-
showExpandAll: boolean;
|
|
11
|
-
enableDetailsPanel: boolean;
|
|
12
|
-
};
|
|
13
|
-
declare const useDataTableExpansion: <S extends boolean = true>(strict?: S | undefined) => S extends true ? DataTableExpansionContextT : DataTableExpansionContextT | undefined;
|
|
14
|
-
type TableExpansionOptions<T> = {
|
|
15
|
-
detailsPanelRowIds?: (string | number)[];
|
|
16
|
-
defaultDetailsPanelRowIds?: (string | number)[];
|
|
17
|
-
onDetailsPanelChange?: (ids: (string | number)[]) => void;
|
|
18
|
-
getDetailsPanelContent?: (row: T) => React.ReactNode;
|
|
19
|
-
isDetailsPanelExpandable?: (rowData: T) => boolean;
|
|
20
|
-
getDetailsPanelHeight?: (row: T) => number | "auto";
|
|
21
|
-
showExpandAll?: boolean;
|
|
22
|
-
};
|
|
23
|
-
declare function getDataTableExpansionId(tableId: string, rowId: string | number): string;
|
|
24
|
-
declare function DataTableExpansionProvider<T>({ children, detailsPanelRowIds, defaultDetailsPanelRowIds, onDetailsPanelChange, getDetailsPanelContent, isDetailsPanelExpandable, getDetailsPanelHeight, showExpandAll, }: TableExpansionOptions<T> & {
|
|
25
|
-
children: React.ReactNode;
|
|
26
|
-
}): React.JSX.Element;
|
|
27
|
-
export { DataTableExpansionProvider, getDataTableExpansionId, useDataTableExpansion, };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTableExpansion.js","sourceRoot":"","sources":["../../../../src/data/table/hooks/useTableExpansion.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8IE,gEAA0B;AAC1B,0DAAuB;AA/IzB,+CAA2C;AAC3C,oDAA6D;AAC7D,gDAA4D;AAC5D,mDAAuD;AAcvD,MAAM,EACJ,QAAQ,EAAE,iCAAiC,EAC3C,UAAU,EAAE,qBAAqB,GAClC,GAAG,IAAA,6BAAmB,EAA6B;IAClD,IAAI,EAAE,2BAA2B;IACjC,YAAY,EACV,yEAAyE;CAC5E,CAAC,CAAC;AAwHD,sDAAqB;AA5GvB,SAAS,uBAAuB,CAAC,OAAe,EAAE,KAAsB;IACtE,OAAO,GAAG,OAAO,cAAc,KAAK,EAAE,CAAC;AACzC,CAAC;AAED,SAAS,0BAA0B,CAAI,EACrC,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,GAAG,EAAE,EAC9B,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,aAAa,GAAG,KAAK,GACoC;IACzD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,4BAAoB,EAAC;QACzD,KAAK,EAAE,kBAAkB;QACzB,YAAY,EAAE,yBAAyB;QACvC,QAAQ,EAAE,oBAAoB;KAC/B,CAAC,CAAC;IAEH,gEAAgE;IAChE,MAAM,iBAAiB,GAAG,IAAA,oCAAoB,EAAC,KAAK,CAAC,CAAC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