@accelint/design-toolkit 9.13.0 → 10.0.0
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/catalog-info.yaml +1 -1
- package/dist/components/accordion/context.d.ts +2 -2
- package/dist/components/accordion/group.d.ts +2 -2
- package/dist/components/accordion/header.d.ts +2 -2
- package/dist/components/accordion/index.d.ts +2 -2
- package/dist/components/accordion/panel.d.ts +2 -2
- package/dist/components/accordion/trigger.d.ts +2 -2
- package/dist/components/action-bar/index.d.ts +2 -2
- package/dist/components/audio/index.d.ts +2 -2
- package/dist/components/avatar/context.d.ts +4 -4
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/badge/context.d.ts +4 -4
- package/dist/components/badge/index.d.ts +2 -2
- package/dist/components/breadcrumbs/index.d.ts +2 -2
- package/dist/components/breadcrumbs/item.d.ts +2 -2
- package/dist/components/button/context.d.ts +8 -8
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/link.d.ts +2 -2
- package/dist/components/button/toggle.d.ts +2 -2
- package/dist/components/carousel/context.d.ts +4 -4
- package/dist/components/carousel/gallery.d.ts +2 -2
- package/dist/components/carousel/index.d.ts +2 -2
- package/dist/components/carousel/navigation.d.ts +3 -3
- package/dist/components/carousel/position.d.ts +2 -2
- package/dist/components/carousel/select.d.ts +2 -2
- package/dist/components/carousel/viewer.d.ts +2 -2
- package/dist/components/checkbox/context.d.ts +3 -3
- package/dist/components/checkbox/group.d.ts +2 -2
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/chip/context.d.ts +4 -4
- package/dist/components/chip/deletable.d.ts +2 -2
- package/dist/components/chip/index.d.ts +2 -2
- package/dist/components/chip/list.d.ts +4 -4
- package/dist/components/chip/selectable.d.ts +2 -2
- package/dist/components/classification-badge/context.d.ts +4 -4
- package/dist/components/classification-badge/index.d.ts +2 -2
- package/dist/components/classification-banner/context.d.ts +4 -4
- package/dist/components/classification-banner/index.d.ts +2 -2
- package/dist/components/clock/index.d.ts +2 -2
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/combobox-field/context.d.ts +4 -4
- package/dist/components/combobox-field/index.d.ts +2 -2
- package/dist/components/coordinate-field/context.d.ts +6 -6
- package/dist/components/coordinate-field/index.d.ts +2 -2
- package/dist/components/coordinate-field/segment.d.ts +2 -2
- package/dist/components/date-field/index.d.ts +2 -2
- package/dist/components/deferred-collection/index.d.ts +2 -2
- package/dist/components/details-list/context.d.ts +4 -4
- package/dist/components/details-list/index.d.ts +2 -2
- package/dist/components/details-list/label.d.ts +2 -2
- package/dist/components/details-list/value.d.ts +2 -2
- package/dist/components/dialog/content.d.ts +2 -2
- package/dist/components/dialog/context.d.ts +2 -2
- package/dist/components/dialog/footer.d.ts +2 -2
- package/dist/components/dialog/index.d.ts +2 -2
- package/dist/components/dialog/title.d.ts +2 -2
- package/dist/components/divider/context.d.ts +4 -4
- package/dist/components/divider/index.d.ts +2 -2
- package/dist/components/drawer/back.d.ts +2 -2
- package/dist/components/drawer/close.d.ts +2 -2
- package/dist/components/drawer/content.d.ts +2 -2
- package/dist/components/drawer/context.d.ts +2 -2
- package/dist/components/drawer/footer.d.ts +2 -2
- package/dist/components/drawer/header-title.d.ts +2 -2
- package/dist/components/drawer/index.d.ts +2 -2
- package/dist/components/drawer/layout-main.d.ts +2 -2
- package/dist/components/drawer/layout.d.ts +2 -2
- package/dist/components/drawer/menu-item.d.ts +2 -2
- package/dist/components/drawer/menu.d.ts +2 -2
- package/dist/components/drawer/panel.d.ts +2 -2
- package/dist/components/drawer/trigger.d.ts +2 -2
- package/dist/components/drawer/view.d.ts +2 -2
- package/dist/components/flashcard/index.d.ts +9 -9
- package/dist/components/floating-card/constants.d.ts +26 -0
- package/dist/components/floating-card/constants.js +40 -0
- package/dist/components/floating-card/constants.js.map +1 -0
- package/dist/components/floating-card/context.d.ts +38 -6
- package/dist/components/floating-card/context.js +24 -3
- package/dist/components/floating-card/context.js.map +1 -1
- package/dist/components/floating-card/hooks/use-card-layout.d.ts +36 -0
- package/dist/components/floating-card/hooks/use-card-layout.js +106 -0
- package/dist/components/floating-card/hooks/use-card-layout.js.map +1 -0
- package/dist/components/floating-card/hooks/use-drag.d.ts +62 -0
- package/dist/components/floating-card/hooks/use-drag.js +100 -0
- package/dist/components/floating-card/hooks/use-drag.js.map +1 -0
- package/dist/components/floating-card/hooks/use-mouse-interaction.d.ts +58 -0
- package/dist/components/floating-card/hooks/use-mouse-interaction.js +91 -0
- package/dist/components/floating-card/hooks/use-mouse-interaction.js.map +1 -0
- package/dist/components/floating-card/hooks/use-resize.d.ts +56 -0
- package/dist/components/floating-card/hooks/use-resize.js +98 -0
- package/dist/components/floating-card/hooks/use-resize.js.map +1 -0
- package/dist/components/floating-card/index.d.ts +6 -2
- package/dist/components/floating-card/index.js +24 -32
- package/dist/components/floating-card/index.js.map +1 -1
- package/dist/components/floating-card/panel.d.ts +69 -0
- package/dist/components/floating-card/panel.js +111 -0
- package/dist/components/floating-card/panel.js.map +1 -0
- package/dist/components/floating-card/provider.d.ts +10 -6
- package/dist/components/floating-card/provider.js +159 -153
- package/dist/components/floating-card/provider.js.map +1 -1
- package/dist/components/floating-card/styles.module.css +93 -39
- package/dist/components/floating-card/types.d.ts +51 -10
- package/dist/components/floating-card/utils.d.ts +8 -85
- package/dist/components/floating-card/utils.js +12 -38
- package/dist/components/floating-card/utils.js.map +1 -1
- package/dist/components/gantt/components/base-elements/point.d.ts +2 -2
- package/dist/components/gantt/components/base-elements/range.d.ts +2 -2
- package/dist/components/gantt/components/containers/external/gantt-content-container/index.d.ts +2 -2
- package/dist/components/gantt/components/containers/external/gantt-panel-container/index.d.ts +2 -2
- package/dist/components/gantt/components/containers/internal/index.d.ts +2 -2
- package/dist/components/gantt/components/containers/internal/layout-container/index.d.ts +2 -2
- package/dist/components/gantt/components/containers/internal/virtualized-content-height-container/index.d.ts +2 -2
- package/dist/components/gantt/components/content-row/block.d.ts +2 -2
- package/dist/components/gantt/components/content-row/bracket.d.ts +3 -3
- package/dist/components/gantt/components/content-row/icon-marker.d.ts +2 -2
- package/dist/components/gantt/components/content-row/index.d.ts +2 -2
- package/dist/components/gantt/components/content-row/marker.d.ts +2 -2
- package/dist/components/gantt/components/content-row/spacer.d.ts +2 -2
- package/dist/components/gantt/components/current-time/index.d.ts +2 -2
- package/dist/components/gantt/components/header/index.d.ts +3 -3
- package/dist/components/gantt/components/panel-row/index.d.ts +2 -2
- package/dist/components/gantt/components/rows-virtualizer/index.d.ts +3 -3
- package/dist/components/gantt/components/timeline/index.d.ts +2 -2
- package/dist/components/gantt/components/timeline-chunk/index.d.ts +3 -3
- package/dist/components/gantt/context/index.d.ts +4 -4
- package/dist/components/gantt/context/store/index.d.ts +4 -4
- package/dist/components/gantt/context/temporal-data/index.d.ts +4 -4
- package/dist/components/gantt/hooks/use-layout-subscription/index.js +8 -8
- package/dist/components/gantt/hooks/use-layout-subscription/index.js.map +1 -1
- package/dist/components/hero/context.d.ts +2 -2
- package/dist/components/hero/index.d.ts +2 -2
- package/dist/components/hero/subtitle.d.ts +3 -3
- package/dist/components/hero/title.d.ts +2 -2
- package/dist/components/hotkey/context.d.ts +4 -4
- package/dist/components/hotkey/index.d.ts +2 -2
- package/dist/components/hotkey/set.d.ts +2 -2
- package/dist/components/icon/context.d.ts +4 -4
- package/dist/components/icon/index.d.ts +2 -2
- package/dist/components/input/context.d.ts +2 -2
- package/dist/components/input/index.d.ts +2 -2
- package/dist/components/kanban/card-body.d.ts +2 -2
- package/dist/components/kanban/card-header-actions.d.ts +2 -2
- package/dist/components/kanban/card-header-title.d.ts +2 -2
- package/dist/components/kanban/card-header.d.ts +2 -2
- package/dist/components/kanban/card.d.ts +2 -2
- package/dist/components/kanban/column-actions.d.ts +2 -2
- package/dist/components/kanban/column-container.d.ts +2 -2
- package/dist/components/kanban/column-content.d.ts +2 -2
- package/dist/components/kanban/column-header-actions.d.ts +2 -2
- package/dist/components/kanban/column-header-drag-handle.d.ts +2 -2
- package/dist/components/kanban/column-header-title.d.ts +2 -2
- package/dist/components/kanban/column-header.d.ts +2 -2
- package/dist/components/kanban/column.d.ts +2 -2
- package/dist/components/kanban/context.d.ts +2 -2
- package/dist/components/kanban/header-actions.d.ts +2 -2
- package/dist/components/kanban/header-search.d.ts +2 -2
- package/dist/components/kanban/header-title.d.ts +2 -2
- package/dist/components/kanban/header.d.ts +2 -2
- package/dist/components/kanban/kanban.d.ts +4 -4
- package/dist/components/label/context.d.ts +4 -4
- package/dist/components/label/index.d.ts +2 -2
- package/dist/components/lines/index.d.ts +2 -2
- package/dist/components/link/context.d.ts +2 -2
- package/dist/components/link/index.d.ts +2 -2
- package/dist/components/list/context.d.ts +2 -2
- package/dist/components/list/index.d.ts +2 -2
- package/dist/components/list/item-content.d.ts +2 -2
- package/dist/components/list/item-description.d.ts +2 -2
- package/dist/components/list/item-title.d.ts +2 -2
- package/dist/components/list/item.d.ts +2 -2
- package/dist/components/media-controls/context.d.ts +4 -4
- package/dist/components/media-controls/fullscreen-button.d.ts +2 -2
- package/dist/components/media-controls/index.d.ts +2 -2
- package/dist/components/media-controls/mute-button.d.ts +2 -2
- package/dist/components/media-controls/play-button.d.ts +2 -2
- package/dist/components/media-controls/playback-rate.d.ts +2 -2
- package/dist/components/media-controls/seek-button.d.ts +2 -2
- package/dist/components/media-controls/time-display.d.ts +2 -2
- package/dist/components/media-controls/time-range.d.ts +2 -2
- package/dist/components/media-controls/volume-slider.d.ts +2 -2
- package/dist/components/menu/context.d.ts +2 -2
- package/dist/components/menu/index.d.ts +2 -2
- package/dist/components/menu/item-description.d.ts +2 -2
- package/dist/components/menu/item-label.d.ts +2 -2
- package/dist/components/menu/item.d.ts +2 -2
- package/dist/components/menu/section.d.ts +2 -2
- package/dist/components/menu/separator.d.ts +2 -2
- package/dist/components/menu/submenu.d.ts +2 -2
- package/dist/components/notice/index.d.ts +2 -2
- package/dist/components/notice/list.d.ts +2 -2
- package/dist/components/notice/notice-icon.d.ts +2 -2
- package/dist/components/options/context.d.ts +2 -2
- package/dist/components/options/index.d.ts +2 -2
- package/dist/components/options/item-content.d.ts +2 -2
- package/dist/components/options/item-description.d.ts +2 -2
- package/dist/components/options/item-label.d.ts +2 -2
- package/dist/components/options/item.d.ts +2 -2
- package/dist/components/options/section.d.ts +2 -2
- package/dist/components/pagination/context.d.ts +2 -2
- package/dist/components/pagination/index.d.ts +2 -2
- package/dist/components/pagination/next.d.ts +2 -2
- package/dist/components/pagination/pages.d.ts +2 -2
- package/dist/components/pagination/prev.d.ts +2 -2
- package/dist/components/popover/content.d.ts +2 -2
- package/dist/components/popover/footer.d.ts +2 -2
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/title.d.ts +2 -2
- package/dist/components/popover/trigger.d.ts +2 -2
- package/dist/components/query-builder/action-element.d.ts +2 -2
- package/dist/components/query-builder/actions.d.ts +4 -4
- package/dist/components/query-builder/combinator-selector.d.ts +2 -2
- package/dist/components/query-builder/index.d.ts +2 -2
- package/dist/components/query-builder/rule-group.d.ts +4 -4
- package/dist/components/query-builder/rule.d.ts +2 -2
- package/dist/components/query-builder/value-editor.d.ts +2 -2
- package/dist/components/query-builder/value-selector.d.ts +2 -2
- package/dist/components/radio/context.d.ts +3 -3
- package/dist/components/radio/group.d.ts +2 -2
- package/dist/components/radio/index.d.ts +2 -2
- package/dist/components/search-field/context.d.ts +4 -4
- package/dist/components/search-field/index.d.ts +2 -2
- package/dist/components/select-field/context.d.ts +4 -4
- package/dist/components/select-field/index.d.ts +2 -2
- package/dist/components/sidenav/avatar.d.ts +2 -2
- package/dist/components/sidenav/content.d.ts +2 -2
- package/dist/components/sidenav/context.d.ts +2 -2
- package/dist/components/sidenav/footer.d.ts +2 -2
- package/dist/components/sidenav/header.d.ts +2 -2
- package/dist/components/sidenav/index.d.ts +2 -2
- package/dist/components/sidenav/item.d.ts +2 -2
- package/dist/components/sidenav/link.d.ts +2 -2
- package/dist/components/sidenav/menu-item.d.ts +2 -2
- package/dist/components/sidenav/menu.d.ts +2 -2
- package/dist/components/sidenav/trigger.d.ts +2 -2
- package/dist/components/skeleton/index.d.ts +2 -2
- package/dist/components/slider/index.d.ts +2 -2
- package/dist/components/status-indicator/index.d.ts +2 -2
- package/dist/components/switch/context.d.ts +4 -4
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/table/body.d.ts +4 -3
- package/dist/components/table/body.js.map +1 -1
- package/dist/components/table/cell.d.ts +4 -3
- package/dist/components/table/cell.js.map +1 -1
- package/dist/components/table/context.d.ts +2 -2
- package/dist/components/table/features.d.ts +80 -0
- package/dist/components/table/features.js +61 -0
- package/dist/components/table/features.js.map +1 -0
- package/dist/components/table/header-cell.d.ts +4 -3
- package/dist/components/table/header-cell.js.map +1 -1
- package/dist/components/table/header.d.ts +4 -3
- package/dist/components/table/header.js.map +1 -1
- package/dist/components/table/index.d.ts +2 -2
- package/dist/components/table/index.js +40 -49
- package/dist/components/table/index.js.map +1 -1
- package/dist/components/table/row-ordering-feature.d.ts +88 -0
- package/dist/components/table/row-ordering-feature.js +115 -0
- package/dist/components/table/row-ordering-feature.js.map +1 -0
- package/dist/components/table/row.d.ts +4 -3
- package/dist/components/table/row.js.map +1 -1
- package/dist/components/table/types.d.ts +15 -13
- package/dist/components/tabs/context.d.ts +3 -3
- package/dist/components/tabs/index.d.ts +2 -2
- package/dist/components/tabs/list.d.ts +2 -2
- package/dist/components/tabs/panel.d.ts +2 -2
- package/dist/components/tabs/tab.d.ts +2 -2
- package/dist/components/text-area-field/context.d.ts +4 -4
- package/dist/components/text-area-field/index.d.ts +2 -2
- package/dist/components/text-field/context.d.ts +4 -4
- package/dist/components/text-field/index.d.ts +2 -2
- package/dist/components/time-field/index.d.ts +2 -2
- package/dist/components/tooltip/context.d.ts +2 -2
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/components/tooltip/trigger.d.ts +2 -2
- package/dist/components/tree/context.d.ts +3 -3
- package/dist/components/tree/index.d.ts +2 -2
- package/dist/components/tree/item-actions.d.ts +2 -2
- package/dist/components/tree/item-content.d.ts +2 -2
- package/dist/components/tree/item-description.d.ts +2 -2
- package/dist/components/tree/item-label.d.ts +2 -2
- package/dist/components/tree/item-prefix-icon.d.ts +2 -2
- package/dist/components/tree/item.d.ts +2 -2
- package/dist/components/tree/lines.d.ts +2 -2
- package/dist/components/video/index.d.ts +2 -2
- package/dist/components/view-stack/context.d.ts +2 -2
- package/dist/components/view-stack/index.d.ts +2 -2
- package/dist/components/view-stack/trigger.d.ts +2 -2
- package/dist/components/view-stack/view.d.ts +2 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +3 -1
- package/dist/providers/portal.d.ts +2 -2
- package/dist/providers/theme-provider.d.ts +2 -2
- package/package.json +20 -14
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { OnChangeFn, RowData, TableFeature, TableFeatures, Updater } from "@tanstack/react-table";
|
|
14
|
+
|
|
15
|
+
//#region src/components/table/row-ordering-feature.d.ts
|
|
16
|
+
/**
|
|
17
|
+
* Manual row order as row ids in display order. Empty means natural
|
|
18
|
+
* (data-prop) order. Consumers own applying the order to their data; the
|
|
19
|
+
* feature owns the state and the move semantics.
|
|
20
|
+
*/
|
|
21
|
+
type RowOrderingState = string[];
|
|
22
|
+
interface RowOrderingTableState {
|
|
23
|
+
rowOrdering: RowOrderingState;
|
|
24
|
+
}
|
|
25
|
+
interface RowOrderingTableOptions {
|
|
26
|
+
/**
|
|
27
|
+
* Callback fired when the manual row order changes.
|
|
28
|
+
*/
|
|
29
|
+
onRowOrderingChange?: OnChangeFn<RowOrderingState>;
|
|
30
|
+
}
|
|
31
|
+
interface RowOrderingTableApis {
|
|
32
|
+
/**
|
|
33
|
+
* Updates the manual row order state. The absolute write door: resets
|
|
34
|
+
* (`setRowOrdering([])`) and bulk reorders (drag and drop) go through here.
|
|
35
|
+
*/
|
|
36
|
+
setRowOrdering: (updater: Updater<RowOrderingState>) => void;
|
|
37
|
+
}
|
|
38
|
+
interface RowOrderingRowApis {
|
|
39
|
+
/**
|
|
40
|
+
* Moves this row — or every selected row when this row is selected — up one
|
|
41
|
+
* place in display order, past the nearest unpinned row.
|
|
42
|
+
*/
|
|
43
|
+
moveUp: () => void;
|
|
44
|
+
/**
|
|
45
|
+
* Moves this row — or every selected row when this row is selected — down
|
|
46
|
+
* one place in display order, past the nearest unpinned row.
|
|
47
|
+
*/
|
|
48
|
+
moveDown: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* Whether an unpinned row exists above to move past. False when this row is
|
|
51
|
+
* pinned.
|
|
52
|
+
*/
|
|
53
|
+
getCanMoveUp: () => boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Whether an unpinned row exists below to move past. False when this row is
|
|
56
|
+
* pinned.
|
|
57
|
+
*/
|
|
58
|
+
getCanMoveDown: () => boolean;
|
|
59
|
+
}
|
|
60
|
+
declare module '@tanstack/react-table' {
|
|
61
|
+
interface Plugins {
|
|
62
|
+
rowOrderingFeature?: TableFeature;
|
|
63
|
+
}
|
|
64
|
+
interface TableState_FeatureMap {
|
|
65
|
+
rowOrderingFeature: RowOrderingTableState;
|
|
66
|
+
}
|
|
67
|
+
interface TableOptions_FeatureMap<TFeatures extends TableFeatures, TData extends RowData> {
|
|
68
|
+
rowOrderingFeature: RowOrderingTableOptions;
|
|
69
|
+
}
|
|
70
|
+
interface Table_FeatureMap<TFeatures extends TableFeatures, TData extends RowData> {
|
|
71
|
+
rowOrderingFeature: RowOrderingTableApis;
|
|
72
|
+
}
|
|
73
|
+
interface Row_FeatureMap<TFeatures extends TableFeatures, TData extends RowData> {
|
|
74
|
+
rowOrderingFeature: RowOrderingRowApis;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* TanStack Table custom feature adding manual row ordering: a `rowOrdering`
|
|
79
|
+
* state slice (row ids in display order), a `table.setRowOrdering` state
|
|
80
|
+
* setter, and `row.moveUp()` / `row.moveDown()` row APIs.
|
|
81
|
+
*
|
|
82
|
+
* Feature APIs have stable identities, so column defs can call them without
|
|
83
|
+
* capturing component-scope callbacks.
|
|
84
|
+
*/
|
|
85
|
+
declare const rowOrderingFeature: TableFeature;
|
|
86
|
+
//#endregion
|
|
87
|
+
export { RowOrderingRowApis, RowOrderingState, RowOrderingTableApis, RowOrderingTableOptions, RowOrderingTableState, rowOrderingFeature };
|
|
88
|
+
//# sourceMappingURL=row-ordering-feature.d.ts.map
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import { assignPrototypeAPIs, assignTableAPIs, makeStateUpdater } from "@tanstack/react-table";
|
|
15
|
+
|
|
16
|
+
//#region src/components/table/row-ordering-feature.ts
|
|
17
|
+
function tableSetRowOrdering(table, updater) {
|
|
18
|
+
table.options.onRowOrderingChange?.(updater);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Captures the current base order by id, extracts the moving rows, and
|
|
22
|
+
* reinserts them next to the target row.
|
|
23
|
+
*/
|
|
24
|
+
function tableMoveRows(table, ids, targetId, position) {
|
|
25
|
+
const moving = new Set(ids);
|
|
26
|
+
const remaining = table.getCoreRowModel().rows.reduce((acc, row) => {
|
|
27
|
+
if (!moving.has(row.id)) acc.push(row.id);
|
|
28
|
+
return acc;
|
|
29
|
+
}, []);
|
|
30
|
+
const targetIndex = remaining.indexOf(targetId);
|
|
31
|
+
if (targetIndex === -1) return;
|
|
32
|
+
const insertAt = position === "before" ? targetIndex : targetIndex + 1;
|
|
33
|
+
remaining.splice(insertAt, 0, ...ids);
|
|
34
|
+
tableSetRowOrdering(table, remaining);
|
|
35
|
+
}
|
|
36
|
+
function isPinnedRow(row) {
|
|
37
|
+
return Boolean(row.getIsPinned?.());
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Nearest unpinned row scanning outward from fromIndex. Pinned rows render in
|
|
41
|
+
* their own regions, so they are not part of the orderable sequence — moving
|
|
42
|
+
* relative to one has no visible effect.
|
|
43
|
+
*/
|
|
44
|
+
function findUnpinnedNeighbor(rows, fromIndex, direction) {
|
|
45
|
+
for (let index = fromIndex + direction; index >= 0 && index < rows.length; index += direction) {
|
|
46
|
+
const candidate = rows[index];
|
|
47
|
+
if (candidate && !isPinnedRow(candidate)) return candidate;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function rowGetCanMoveUp(table, row) {
|
|
51
|
+
return !isPinnedRow(row) && findUnpinnedNeighbor(table.getRowModel().rows, row.index, -1) !== void 0;
|
|
52
|
+
}
|
|
53
|
+
function rowGetCanMoveDown(table, row) {
|
|
54
|
+
return !isPinnedRow(row) && findUnpinnedNeighbor(table.getRowModel().rows, row.index, 1) !== void 0;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Gathers the rows a move applies to: every selected row when the acted-on
|
|
58
|
+
* row is selected, otherwise just the acted-on row.
|
|
59
|
+
*/
|
|
60
|
+
function getRowsToMove(table, row) {
|
|
61
|
+
const rows = table.getRowModel().rows;
|
|
62
|
+
const selection = table.atoms.rowSelection?.get() ?? {};
|
|
63
|
+
return {
|
|
64
|
+
rows,
|
|
65
|
+
rowsToMove: selection[row.id] ? rows.filter(({ id }) => selection[id]) : [row]
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function tableMoveRowsUp(table, row) {
|
|
69
|
+
if (isPinnedRow(row)) return;
|
|
70
|
+
const { rows, rowsToMove } = getRowsToMove(table, row);
|
|
71
|
+
const firstRowToMove = rowsToMove[0];
|
|
72
|
+
if (!firstRowToMove) return;
|
|
73
|
+
const target = findUnpinnedNeighbor(rows, firstRowToMove.index, -1);
|
|
74
|
+
if (!target) return;
|
|
75
|
+
tableMoveRows(table, rowsToMove.map(({ id }) => id), target.id, "before");
|
|
76
|
+
}
|
|
77
|
+
function tableMoveRowsDown(table, row) {
|
|
78
|
+
if (isPinnedRow(row)) return;
|
|
79
|
+
const { rows, rowsToMove } = getRowsToMove(table, row);
|
|
80
|
+
const lastRowToMove = rowsToMove[rowsToMove.length - 1];
|
|
81
|
+
if (!lastRowToMove) return;
|
|
82
|
+
const target = findUnpinnedNeighbor(rows, lastRowToMove.index, 1);
|
|
83
|
+
if (!target) return;
|
|
84
|
+
tableMoveRows(table, rowsToMove.map(({ id }) => id), target.id, "after");
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* TanStack Table custom feature adding manual row ordering: a `rowOrdering`
|
|
88
|
+
* state slice (row ids in display order), a `table.setRowOrdering` state
|
|
89
|
+
* setter, and `row.moveUp()` / `row.moveDown()` row APIs.
|
|
90
|
+
*
|
|
91
|
+
* Feature APIs have stable identities, so column defs can call them without
|
|
92
|
+
* capturing component-scope callbacks.
|
|
93
|
+
*/
|
|
94
|
+
const rowOrderingFeature = {
|
|
95
|
+
getInitialState: (initialState) => ({
|
|
96
|
+
...initialState,
|
|
97
|
+
rowOrdering: initialState.rowOrdering ?? []
|
|
98
|
+
}),
|
|
99
|
+
getDefaultTableOptions: (table) => ({ onRowOrderingChange: makeStateUpdater("rowOrdering", table) }),
|
|
100
|
+
constructTableAPIs: (table) => {
|
|
101
|
+
assignTableAPIs("rowOrderingFeature", table, { table_setRowOrdering: { fn: (updater) => tableSetRowOrdering(table, updater) } });
|
|
102
|
+
},
|
|
103
|
+
assignRowPrototype: (prototype, table) => {
|
|
104
|
+
assignPrototypeAPIs("rowOrderingFeature", prototype, table, {
|
|
105
|
+
row_moveUp: { fn: (row) => tableMoveRowsUp(table, row) },
|
|
106
|
+
row_moveDown: { fn: (row) => tableMoveRowsDown(table, row) },
|
|
107
|
+
row_getCanMoveUp: { fn: (row) => rowGetCanMoveUp(table, row) },
|
|
108
|
+
row_getCanMoveDown: { fn: (row) => rowGetCanMoveDown(table, row) }
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
//#endregion
|
|
114
|
+
export { rowOrderingFeature };
|
|
115
|
+
//# sourceMappingURL=row-ordering-feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-ordering-feature.js","names":["rowOrderingFeature: TableFeature"],"sources":["../../../src/components/table/row-ordering-feature.ts"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n assignPrototypeAPIs,\n assignTableAPIs,\n makeStateUpdater,\n} from '@tanstack/react-table';\nimport type {\n OnChangeFn,\n Row,\n RowData,\n RowSelectionState,\n Table,\n TableFeature,\n TableFeatures,\n Updater,\n} from '@tanstack/react-table';\n\n/**\n * Manual row order as row ids in display order. Empty means natural\n * (data-prop) order. Consumers own applying the order to their data; the\n * feature owns the state and the move semantics.\n */\nexport type RowOrderingState = string[];\n\nexport interface RowOrderingTableState {\n rowOrdering: RowOrderingState;\n}\n\nexport interface RowOrderingTableOptions {\n /**\n * Callback fired when the manual row order changes.\n */\n onRowOrderingChange?: OnChangeFn<RowOrderingState>;\n}\n\nexport interface RowOrderingTableApis {\n /**\n * Updates the manual row order state. The absolute write door: resets\n * (`setRowOrdering([])`) and bulk reorders (drag and drop) go through here.\n */\n setRowOrdering: (updater: Updater<RowOrderingState>) => void;\n}\n\nexport interface RowOrderingRowApis {\n /**\n * Moves this row — or every selected row when this row is selected — up one\n * place in display order, past the nearest unpinned row.\n */\n moveUp: () => void;\n /**\n * Moves this row — or every selected row when this row is selected — down\n * one place in display order, past the nearest unpinned row.\n */\n moveDown: () => void;\n /**\n * Whether an unpinned row exists above to move past. False when this row is\n * pinned.\n */\n getCanMoveUp: () => boolean;\n /**\n * Whether an unpinned row exists below to move past. False when this row is\n * pinned.\n */\n getCanMoveDown: () => boolean;\n}\n\ndeclare module '@tanstack/react-table' {\n interface Plugins {\n rowOrderingFeature?: TableFeature;\n }\n\n interface TableState_FeatureMap {\n rowOrderingFeature: RowOrderingTableState;\n }\n\n interface TableOptions_FeatureMap<\n // biome-ignore lint/correctness/noUnusedVariables: merged declarations must repeat the original type parameters\n TFeatures extends TableFeatures,\n // biome-ignore lint/correctness/noUnusedVariables: merged declarations must repeat the original type parameters\n TData extends RowData,\n > {\n rowOrderingFeature: RowOrderingTableOptions;\n }\n\n interface Table_FeatureMap<\n // biome-ignore lint/correctness/noUnusedVariables: merged declarations must repeat the original type parameters\n TFeatures extends TableFeatures,\n // biome-ignore lint/correctness/noUnusedVariables: merged declarations must repeat the original type parameters\n TData extends RowData,\n > {\n rowOrderingFeature: RowOrderingTableApis;\n }\n\n interface Row_FeatureMap<\n // biome-ignore lint/correctness/noUnusedVariables: merged declarations must repeat the original type parameters\n TFeatures extends TableFeatures,\n // biome-ignore lint/correctness/noUnusedVariables: merged declarations must repeat the original type parameters\n TData extends RowData,\n > {\n rowOrderingFeature: RowOrderingRowApis;\n }\n}\n\nfunction tableSetRowOrdering<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table<TFeatures, TData>, updater: Updater<RowOrderingState>) {\n (table.options as RowOrderingTableOptions).onRowOrderingChange?.(updater);\n}\n\n/**\n * Captures the current base order by id, extracts the moving rows, and\n * reinserts them next to the target row.\n */\nfunction tableMoveRows<TFeatures extends TableFeatures, TData extends RowData>(\n table: Table<TFeatures, TData>,\n ids: string[],\n targetId: string,\n position: 'before' | 'after',\n) {\n const moving = new Set(ids);\n const remaining = table\n .getCoreRowModel()\n .rows.reduce<string[]>((acc, row) => {\n if (!moving.has(row.id)) {\n acc.push(row.id);\n }\n\n return acc;\n }, []);\n const targetIndex = remaining.indexOf(targetId);\n\n if (targetIndex === -1) {\n return;\n }\n\n const insertAt = position === 'before' ? targetIndex : targetIndex + 1;\n\n remaining.splice(insertAt, 0, ...ids);\n tableSetRowOrdering(table, remaining);\n}\n\n// structural read: getIsPinned only exists when rowPinningFeature is on\nfunction isPinnedRow<TFeatures extends TableFeatures, TData extends RowData>(\n row: Row<TFeatures, TData>,\n) {\n return Boolean(\n (row as { getIsPinned?: () => false | 'top' | 'bottom' }).getIsPinned?.(),\n );\n}\n\n/**\n * Nearest unpinned row scanning outward from fromIndex. Pinned rows render in\n * their own regions, so they are not part of the orderable sequence — moving\n * relative to one has no visible effect.\n */\nfunction findUnpinnedNeighbor<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(rows: Row<TFeatures, TData>[], fromIndex: number, direction: -1 | 1) {\n for (\n let index = fromIndex + direction;\n index >= 0 && index < rows.length;\n index += direction\n ) {\n const candidate = rows[index];\n\n if (candidate && !isPinnedRow(candidate)) {\n return candidate;\n }\n }\n\n return undefined;\n}\n\nfunction rowGetCanMoveUp<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table<TFeatures, TData>, row: Row<TFeatures, TData>) {\n return (\n !isPinnedRow(row) &&\n findUnpinnedNeighbor(table.getRowModel().rows, row.index, -1) !== undefined\n );\n}\n\nfunction rowGetCanMoveDown<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table<TFeatures, TData>, row: Row<TFeatures, TData>) {\n return (\n !isPinnedRow(row) &&\n findUnpinnedNeighbor(table.getRowModel().rows, row.index, 1) !== undefined\n );\n}\n\n/**\n * Gathers the rows a move applies to: every selected row when the acted-on\n * row is selected, otherwise just the acted-on row.\n */\nfunction getRowsToMove<TFeatures extends TableFeatures, TData extends RowData>(\n table: Table<TFeatures, TData>,\n row: Row<TFeatures, TData>,\n) {\n const rows = table.getRowModel().rows;\n // structural read: rowSelection only exists when rowSelectionFeature is on\n const selection =\n (\n table.atoms as { rowSelection?: { get: () => RowSelectionState } }\n ).rowSelection?.get() ?? {};\n const rowsToMove = selection[row.id]\n ? rows.filter(({ id }) => selection[id])\n : [row];\n\n return { rows, rowsToMove };\n}\n\nfunction tableMoveRowsUp<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table<TFeatures, TData>, row: Row<TFeatures, TData>) {\n // pinned rows render in their own region; moving one is visually inert\n if (isPinnedRow(row)) {\n return;\n }\n\n const { rows, rowsToMove } = getRowsToMove(table, row);\n const firstRowToMove = rowsToMove[0];\n\n if (!firstRowToMove) {\n return;\n }\n\n const target = findUnpinnedNeighbor(rows, firstRowToMove.index, -1);\n\n if (!target) {\n return;\n }\n\n tableMoveRows(\n table,\n rowsToMove.map(({ id }) => id),\n target.id,\n 'before',\n );\n}\n\nfunction tableMoveRowsDown<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table<TFeatures, TData>, row: Row<TFeatures, TData>) {\n // pinned rows render in their own region; moving one is visually inert\n if (isPinnedRow(row)) {\n return;\n }\n\n const { rows, rowsToMove } = getRowsToMove(table, row);\n const lastRowToMove = rowsToMove[rowsToMove.length - 1];\n\n if (!lastRowToMove) {\n return;\n }\n\n const target = findUnpinnedNeighbor(rows, lastRowToMove.index, 1);\n\n if (!target) {\n return;\n }\n\n tableMoveRows(\n table,\n rowsToMove.map(({ id }) => id),\n target.id,\n 'after',\n );\n}\n\n/**\n * TanStack Table custom feature adding manual row ordering: a `rowOrdering`\n * state slice (row ids in display order), a `table.setRowOrdering` state\n * setter, and `row.moveUp()` / `row.moveDown()` row APIs.\n *\n * Feature APIs have stable identities, so column defs can call them without\n * capturing component-scope callbacks.\n */\nexport const rowOrderingFeature: TableFeature = {\n getInitialState: (initialState) => ({\n ...initialState,\n rowOrdering:\n (initialState as Partial<RowOrderingTableState>).rowOrdering ?? [],\n }),\n getDefaultTableOptions: (table) => ({\n onRowOrderingChange: makeStateUpdater('rowOrdering', table),\n }),\n constructTableAPIs: <TFeatures extends TableFeatures, TData extends RowData>(\n table: Table<TFeatures, TData>,\n ) => {\n assignTableAPIs('rowOrderingFeature', table, {\n // biome-ignore lint/style/useNamingConvention: assignTableAPIs derives the instance method name from the table_ prefix\n table_setRowOrdering: {\n fn: (updater: Updater<RowOrderingState>) =>\n tableSetRowOrdering(table, updater),\n },\n });\n },\n assignRowPrototype: <TFeatures extends TableFeatures, TData extends RowData>(\n prototype: Record<string, unknown>,\n table: Table<TFeatures, TData>,\n ) => {\n assignPrototypeAPIs('rowOrderingFeature', prototype, table, {\n // biome-ignore lint/style/useNamingConvention: assignPrototypeAPIs derives the method name from the row_ prefix\n row_moveUp: {\n fn: (row: Row<TFeatures, TData>) => tableMoveRowsUp(table, row),\n },\n // biome-ignore lint/style/useNamingConvention: assignPrototypeAPIs derives the method name from the row_ prefix\n row_moveDown: {\n fn: (row: Row<TFeatures, TData>) => tableMoveRowsDown(table, row),\n },\n // biome-ignore lint/style/useNamingConvention: assignPrototypeAPIs derives the method name from the row_ prefix\n row_getCanMoveUp: {\n fn: (row: Row<TFeatures, TData>) => rowGetCanMoveUp(table, row),\n },\n // biome-ignore lint/style/useNamingConvention: assignPrototypeAPIs derives the method name from the row_ prefix\n row_getCanMoveDown: {\n fn: (row: Row<TFeatures, TData>) => rowGetCanMoveDown(table, row),\n },\n });\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAkHA,SAAS,oBAGP,OAAgC,SAAoC;AACpE,CAAC,MAAM,QAAoC,sBAAsB,QAAQ;;;;;;AAO3E,SAAS,cACP,OACA,KACA,UACA,UACA;CACA,MAAM,SAAS,IAAI,IAAI,IAAI;CAC3B,MAAM,YAAY,MACf,iBAAiB,CACjB,KAAK,QAAkB,KAAK,QAAQ;AACnC,MAAI,CAAC,OAAO,IAAI,IAAI,GAAG,CACrB,KAAI,KAAK,IAAI,GAAG;AAGlB,SAAO;IACN,EAAE,CAAC;CACR,MAAM,cAAc,UAAU,QAAQ,SAAS;AAE/C,KAAI,gBAAgB,GAClB;CAGF,MAAM,WAAW,aAAa,WAAW,cAAc,cAAc;AAErE,WAAU,OAAO,UAAU,GAAG,GAAG,IAAI;AACrC,qBAAoB,OAAO,UAAU;;AAIvC,SAAS,YACP,KACA;AACA,QAAO,QACJ,IAAyD,eAAe,CAC1E;;;;;;;AAQH,SAAS,qBAGP,MAA+B,WAAmB,WAAmB;AACrE,MACE,IAAI,QAAQ,YAAY,WACxB,SAAS,KAAK,QAAQ,KAAK,QAC3B,SAAS,WACT;EACA,MAAM,YAAY,KAAK;AAEvB,MAAI,aAAa,CAAC,YAAY,UAAU,CACtC,QAAO;;;AAOb,SAAS,gBAGP,OAAgC,KAA4B;AAC5D,QACE,CAAC,YAAY,IAAI,IACjB,qBAAqB,MAAM,aAAa,CAAC,MAAM,IAAI,OAAO,GAAG,KAAK;;AAItE,SAAS,kBAGP,OAAgC,KAA4B;AAC5D,QACE,CAAC,YAAY,IAAI,IACjB,qBAAqB,MAAM,aAAa,CAAC,MAAM,IAAI,OAAO,EAAE,KAAK;;;;;;AAQrE,SAAS,cACP,OACA,KACA;CACA,MAAM,OAAO,MAAM,aAAa,CAAC;CAEjC,MAAM,YAEF,MAAM,MACN,cAAc,KAAK,IAAI,EAAE;AAK7B,QAAO;EAAE;EAAM,YAJI,UAAU,IAAI,MAC7B,KAAK,QAAQ,EAAE,SAAS,UAAU,IAAI,GACtC,CAAC,IAAI;EAEkB;;AAG7B,SAAS,gBAGP,OAAgC,KAA4B;AAE5D,KAAI,YAAY,IAAI,CAClB;CAGF,MAAM,EAAE,MAAM,eAAe,cAAc,OAAO,IAAI;CACtD,MAAM,iBAAiB,WAAW;AAElC,KAAI,CAAC,eACH;CAGF,MAAM,SAAS,qBAAqB,MAAM,eAAe,OAAO,GAAG;AAEnE,KAAI,CAAC,OACH;AAGF,eACE,OACA,WAAW,KAAK,EAAE,SAAS,GAAG,EAC9B,OAAO,IACP,SACD;;AAGH,SAAS,kBAGP,OAAgC,KAA4B;AAE5D,KAAI,YAAY,IAAI,CAClB;CAGF,MAAM,EAAE,MAAM,eAAe,cAAc,OAAO,IAAI;CACtD,MAAM,gBAAgB,WAAW,WAAW,SAAS;AAErD,KAAI,CAAC,cACH;CAGF,MAAM,SAAS,qBAAqB,MAAM,cAAc,OAAO,EAAE;AAEjE,KAAI,CAAC,OACH;AAGF,eACE,OACA,WAAW,KAAK,EAAE,SAAS,GAAG,EAC9B,OAAO,IACP,QACD;;;;;;;;;;AAWH,MAAaA,qBAAmC;CAC9C,kBAAkB,kBAAkB;EAClC,GAAG;EACH,aACG,aAAgD,eAAe,EAAE;EACrE;CACD,yBAAyB,WAAW,EAClC,qBAAqB,iBAAiB,eAAe,MAAM,EAC5D;CACD,qBACE,UACG;AACH,kBAAgB,sBAAsB,OAAO,EAE3C,sBAAsB,EACpB,KAAK,YACH,oBAAoB,OAAO,QAAQ,EACtC,EACF,CAAC;;CAEJ,qBACE,WACA,UACG;AACH,sBAAoB,sBAAsB,WAAW,OAAO;GAE1D,YAAY,EACV,KAAK,QAA+B,gBAAgB,OAAO,IAAI,EAChE;GAED,cAAc,EACZ,KAAK,QAA+B,kBAAkB,OAAO,IAAI,EAClE;GAED,kBAAkB,EAChB,KAAK,QAA+B,gBAAgB,OAAO,IAAI,EAChE;GAED,oBAAoB,EAClB,KAAK,QAA+B,kBAAkB,OAAO,IAAI,EAClE;GACF,CAAC;;CAEL"}
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { TableRowProps } from "./types.js";
|
|
14
|
-
import * as
|
|
14
|
+
import * as react_jsx_runtime171 from "react/jsx-runtime";
|
|
15
|
+
import { RowData } from "@tanstack/react-table";
|
|
15
16
|
|
|
16
17
|
//#region src/components/table/row.d.ts
|
|
17
18
|
|
|
@@ -38,13 +39,13 @@ import * as react_jsx_runtime107 from "react/jsx-runtime";
|
|
|
38
39
|
* @param props.row - TanStack table row object.
|
|
39
40
|
* @returns The rendered TableRow component.
|
|
40
41
|
*/
|
|
41
|
-
declare function TableRow<T>({
|
|
42
|
+
declare function TableRow<T extends RowData>({
|
|
42
43
|
ref,
|
|
43
44
|
children,
|
|
44
45
|
className,
|
|
45
46
|
row,
|
|
46
47
|
...rest
|
|
47
|
-
}: TableRowProps<T>):
|
|
48
|
+
}: TableRowProps<T>): react_jsx_runtime171.JSX.Element;
|
|
48
49
|
//#endregion
|
|
49
50
|
export { TableRow };
|
|
50
51
|
//# sourceMappingURL=row.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row.js","names":[],"sources":["../../../src/components/table/row.tsx"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport { TableCell } from './cell';\nimport styles from './styles.module.css';\nimport type { TableRowProps } from './types';\n\n/**\n * TableRow - Table row (`<tr>`) with selection and pinning state.\n *\n * @example\n * ```tsx\n * <TableBody rows={rows}>\n * {rows.map(row => (\n * <TableRow key={row.id} row={row}>\n * {row.getAllCells().map(cell => (\n * <TableCell key={cell.id} cell={cell} />\n * ))}\n * </TableRow>\n * ))}\n * </TableBody>\n * ```\n *\n * @param props - {@link TableRowProps}\n * @param props.ref - Ref to the tr element.\n * @param props.children - Custom children content.\n * @param props.className - CSS class for the tr element.\n * @param props.row - TanStack table row object.\n * @returns The rendered TableRow component.\n */\nexport function TableRow<T>({\n ref,\n children,\n className,\n row,\n ...rest\n}: TableRowProps<T>) {\n const cells = row?.getAllCells();\n\n return (\n <tr\n {...rest}\n ref={ref}\n className={clsx('group/row', styles.row, className)}\n data-pinned={row?.getIsPinned() || null}\n data-selected={row?.getIsSelected() || null}\n >\n {children ||\n cells?.map((cell) => <TableCell key={cell.id} cell={cell} />)}\n </tr>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"row.js","names":[],"sources":["../../../src/components/table/row.tsx"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport { TableCell } from './cell';\nimport styles from './styles.module.css';\nimport type { RowData } from '@tanstack/react-table';\nimport type { TableRowProps } from './types';\n\n/**\n * TableRow - Table row (`<tr>`) with selection and pinning state.\n *\n * @example\n * ```tsx\n * <TableBody rows={rows}>\n * {rows.map(row => (\n * <TableRow key={row.id} row={row}>\n * {row.getAllCells().map(cell => (\n * <TableCell key={cell.id} cell={cell} />\n * ))}\n * </TableRow>\n * ))}\n * </TableBody>\n * ```\n *\n * @param props - {@link TableRowProps}\n * @param props.ref - Ref to the tr element.\n * @param props.children - Custom children content.\n * @param props.className - CSS class for the tr element.\n * @param props.row - TanStack table row object.\n * @returns The rendered TableRow component.\n */\nexport function TableRow<T extends RowData>({\n ref,\n children,\n className,\n row,\n ...rest\n}: TableRowProps<T>) {\n const cells = row?.getAllCells();\n\n return (\n <tr\n {...rest}\n ref={ref}\n className={clsx('group/row', styles.row, className)}\n data-pinned={row?.getIsPinned() || null}\n data-selected={row?.getIsSelected() || null}\n >\n {children ||\n cells?.map((cell) => <TableCell key={cell.id} cell={cell} />)}\n </tr>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,SAAgB,SAA4B,EAC1C,KACA,UACA,WACA,KACA,GAAG,QACgB;CACnB,MAAM,QAAQ,KAAK,aAAa;AAEhC,QACE,oBAAC;EACC,GAAI;EACC;EACL,WAAW,KAAK,aAAa,OAAO,KAAK,UAAU;EACnD,eAAa,KAAK,aAAa,IAAI;EACnC,iBAAe,KAAK,eAAe,IAAI;YAEtC,YACC,OAAO,KAAK,SAAS,oBAAC,aAA8B,QAAf,KAAK,GAAkB,CAAC;GAC5D"}
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import { TableFeatures as TableFeatures$1 } from "./features.js";
|
|
13
14
|
import { ComponentPropsWithRef, Dispatch, PropsWithChildren, SetStateAction } from "react";
|
|
14
|
-
import { Cell, ColumnDef, Header, HeaderGroup, Row, RowSelectionState } from "@tanstack/react-table";
|
|
15
|
+
import { Cell, ColumnDef, Header, HeaderGroup, Row, RowData, RowSelectionState } from "@tanstack/react-table";
|
|
15
16
|
import { Key } from "@react-types/shared";
|
|
16
17
|
|
|
17
18
|
//#region src/components/table/types.d.ts
|
|
@@ -20,9 +21,10 @@ type ExtendedTableProps<T extends {
|
|
|
20
21
|
id: Key;
|
|
21
22
|
}> = {
|
|
22
23
|
/**
|
|
23
|
-
* An array of column definitions
|
|
24
|
+
* An array of column definitions. Build them with
|
|
25
|
+
* `createTableColumnHelper<T>()`.
|
|
24
26
|
*/
|
|
25
|
-
columns:
|
|
27
|
+
columns: ColumnDef<TableFeatures$1, T, any>[];
|
|
26
28
|
/**
|
|
27
29
|
* An array of data objects of type `T`.
|
|
28
30
|
* Each object must have a unique `id` property.
|
|
@@ -177,8 +179,8 @@ type TableProps<T extends {
|
|
|
177
179
|
* @see {@link HTMLAttributes}
|
|
178
180
|
* @see {@link RefAttributes}
|
|
179
181
|
*/
|
|
180
|
-
type TableBodyProps<T> = ComponentPropsWithRef<'tbody'> & {
|
|
181
|
-
rows?: Row<T>[];
|
|
182
|
+
type TableBodyProps<T extends RowData> = ComponentPropsWithRef<'tbody'> & {
|
|
183
|
+
rows?: Row<TableFeatures$1, T>[];
|
|
182
184
|
};
|
|
183
185
|
/**
|
|
184
186
|
* Props for a table row (`<tr>`) component.
|
|
@@ -189,8 +191,8 @@ type TableBodyProps<T> = ComponentPropsWithRef<'tbody'> & {
|
|
|
189
191
|
* @see {@link HTMLAttributes}
|
|
190
192
|
* @see {@link RefAttributes}
|
|
191
193
|
*/
|
|
192
|
-
type TableRowProps<T> = ComponentPropsWithRef<'tr'> & {
|
|
193
|
-
row?: Row<T>;
|
|
194
|
+
type TableRowProps<T extends RowData> = ComponentPropsWithRef<'tr'> & {
|
|
195
|
+
row?: Row<TableFeatures$1, T>;
|
|
194
196
|
};
|
|
195
197
|
/**
|
|
196
198
|
* Props for a table cell component.
|
|
@@ -204,8 +206,8 @@ type TableRowProps<T> = ComponentPropsWithRef<'tr'> & {
|
|
|
204
206
|
* @property ref - Optional React ref for the table cell element.
|
|
205
207
|
* @property className - Optional class name for custom styling.
|
|
206
208
|
*/
|
|
207
|
-
type TableCellProps<T> = ComponentPropsWithRef<'td'> & {
|
|
208
|
-
cell?: Cell<T, unknown>;
|
|
209
|
+
type TableCellProps<T extends RowData> = ComponentPropsWithRef<'td'> & {
|
|
210
|
+
cell?: Cell<TableFeatures$1, T, unknown>;
|
|
209
211
|
};
|
|
210
212
|
/**
|
|
211
213
|
* Props for a table header cell component.
|
|
@@ -215,8 +217,8 @@ type TableCellProps<T> = ComponentPropsWithRef<'td'> & {
|
|
|
215
217
|
*
|
|
216
218
|
* @see {@link RefAttributes}
|
|
217
219
|
*/
|
|
218
|
-
type TableHeaderCellProps<T> = ComponentPropsWithRef<'th'> & {
|
|
219
|
-
header?: Header<T, unknown>;
|
|
220
|
+
type TableHeaderCellProps<T extends RowData> = ComponentPropsWithRef<'th'> & {
|
|
221
|
+
header?: Header<TableFeatures$1, T, unknown>;
|
|
220
222
|
};
|
|
221
223
|
/**
|
|
222
224
|
* Props for the table header (`<thead>`) component.
|
|
@@ -226,11 +228,11 @@ type TableHeaderCellProps<T> = ComponentPropsWithRef<'th'> & {
|
|
|
226
228
|
* @see {@link HTMLAttributes}
|
|
227
229
|
* @see {@link RefAttributes}
|
|
228
230
|
*/
|
|
229
|
-
type TableHeaderProps<T> = ComponentPropsWithRef<'thead'> & {
|
|
231
|
+
type TableHeaderProps<T extends RowData> = ComponentPropsWithRef<'thead'> & {
|
|
230
232
|
/**
|
|
231
233
|
* Array of header groups of the table
|
|
232
234
|
*/
|
|
233
|
-
headerGroups?: HeaderGroup<T>[];
|
|
235
|
+
headerGroups?: HeaderGroup<TableFeatures$1, T>[];
|
|
234
236
|
/**
|
|
235
237
|
* The currently selected column ID
|
|
236
238
|
*/
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
import { ProviderProps } from "../../lib/types.js";
|
|
14
14
|
import { TabProps, TabsProps } from "./types.js";
|
|
15
15
|
import "client-only";
|
|
16
|
-
import * as
|
|
16
|
+
import * as react40 from "react";
|
|
17
17
|
import * as react_jsx_runtime175 from "react/jsx-runtime";
|
|
18
18
|
import { ContextValue } from "react-aria-components/slots";
|
|
19
19
|
|
|
20
20
|
//#region src/components/tabs/context.d.ts
|
|
21
21
|
/** Context for sharing props across Tabs components */
|
|
22
|
-
declare const TabsContext:
|
|
22
|
+
declare const TabsContext: react40.Context<ContextValue<TabsProps, HTMLDivElement>>;
|
|
23
23
|
/**
|
|
24
24
|
* Sets default props for all Tabs components within.
|
|
25
25
|
*
|
|
@@ -43,7 +43,7 @@ declare function TabsProvider({
|
|
|
43
43
|
children,
|
|
44
44
|
...props
|
|
45
45
|
}: ProviderProps<TabsProps>): react_jsx_runtime175.JSX.Element;
|
|
46
|
-
declare const TabContext:
|
|
46
|
+
declare const TabContext: react40.Context<ContextValue<TabProps, Element>>;
|
|
47
47
|
declare function TabProvider({
|
|
48
48
|
children,
|
|
49
49
|
...props
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { TabsProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime178 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/tabs/index.d.ts
|
|
18
18
|
|
|
@@ -44,7 +44,7 @@ import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
|
44
44
|
declare function Tabs({
|
|
45
45
|
ref,
|
|
46
46
|
...props
|
|
47
|
-
}: TabsProps):
|
|
47
|
+
}: TabsProps): react_jsx_runtime178.JSX.Element;
|
|
48
48
|
//#endregion
|
|
49
49
|
export { Tabs };
|
|
50
50
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import "client-only";
|
|
14
|
-
import * as
|
|
14
|
+
import * as react_jsx_runtime177 from "react/jsx-runtime";
|
|
15
15
|
import { TabListProps } from "react-aria-components/Tabs";
|
|
16
16
|
|
|
17
17
|
//#region src/components/tabs/list.d.ts
|
|
@@ -40,7 +40,7 @@ declare function TabList<T extends object>({
|
|
|
40
40
|
children,
|
|
41
41
|
className,
|
|
42
42
|
...rest
|
|
43
|
-
}: TabListProps<T>):
|
|
43
|
+
}: TabListProps<T>): react_jsx_runtime177.JSX.Element;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { TabList };
|
|
46
46
|
//# sourceMappingURL=list.d.ts.map
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import "client-only";
|
|
14
|
-
import * as
|
|
14
|
+
import * as react_jsx_runtime179 from "react/jsx-runtime";
|
|
15
15
|
import { TabPanelProps } from "react-aria-components/Tabs";
|
|
16
16
|
|
|
17
17
|
//#region src/components/tabs/panel.d.ts
|
|
@@ -41,7 +41,7 @@ declare function TabPanel({
|
|
|
41
41
|
children,
|
|
42
42
|
className,
|
|
43
43
|
...rest
|
|
44
|
-
}: TabPanelProps):
|
|
44
|
+
}: TabPanelProps): react_jsx_runtime179.JSX.Element;
|
|
45
45
|
//#endregion
|
|
46
46
|
export { TabPanel };
|
|
47
47
|
//# sourceMappingURL=panel.d.ts.map
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { TabProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime180 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/tabs/tab.d.ts
|
|
18
18
|
|
|
@@ -38,7 +38,7 @@ import * as react_jsx_runtime118 from "react/jsx-runtime";
|
|
|
38
38
|
declare function Tab({
|
|
39
39
|
ref,
|
|
40
40
|
...props
|
|
41
|
-
}: TabProps):
|
|
41
|
+
}: TabProps): react_jsx_runtime180.JSX.Element;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { Tab };
|
|
44
44
|
//# sourceMappingURL=tab.d.ts.map
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
import { ProviderProps } from "../../lib/types.js";
|
|
14
14
|
import { TextAreaFieldProps } from "./types.js";
|
|
15
15
|
import "client-only";
|
|
16
|
-
import * as
|
|
17
|
-
import * as
|
|
16
|
+
import * as react42 from "react";
|
|
17
|
+
import * as react_jsx_runtime181 from "react/jsx-runtime";
|
|
18
18
|
import { ContextValue } from "react-aria-components/slots";
|
|
19
19
|
|
|
20
20
|
//#region src/components/text-area-field/context.d.ts
|
|
21
21
|
/** Context for sharing props across TextAreaField components */
|
|
22
|
-
declare const TextAreaFieldContext:
|
|
22
|
+
declare const TextAreaFieldContext: react42.Context<ContextValue<TextAreaFieldProps, HTMLDivElement>>;
|
|
23
23
|
/**
|
|
24
24
|
* Sets default props for all TextAreaField components within.
|
|
25
25
|
*
|
|
@@ -42,7 +42,7 @@ declare const TextAreaFieldContext: react34.Context<ContextValue<TextAreaFieldPr
|
|
|
42
42
|
declare function TextAreaFieldProvider({
|
|
43
43
|
children,
|
|
44
44
|
...props
|
|
45
|
-
}: ProviderProps<TextAreaFieldProps>):
|
|
45
|
+
}: ProviderProps<TextAreaFieldProps>): react_jsx_runtime181.JSX.Element;
|
|
46
46
|
//#endregion
|
|
47
47
|
export { TextAreaFieldContext, TextAreaFieldProvider };
|
|
48
48
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { TextAreaFieldProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime182 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/text-area-field/index.d.ts
|
|
18
18
|
|
|
@@ -44,7 +44,7 @@ import * as react_jsx_runtime120 from "react/jsx-runtime";
|
|
|
44
44
|
declare function TextAreaField({
|
|
45
45
|
ref,
|
|
46
46
|
...props
|
|
47
|
-
}: TextAreaFieldProps):
|
|
47
|
+
}: TextAreaFieldProps): react_jsx_runtime182.JSX.Element;
|
|
48
48
|
//#endregion
|
|
49
49
|
export { TextAreaField };
|
|
50
50
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
import { ProviderProps } from "../../lib/types.js";
|
|
14
14
|
import { TextFieldProps } from "./types.js";
|
|
15
15
|
import "client-only";
|
|
16
|
-
import * as
|
|
17
|
-
import * as
|
|
16
|
+
import * as react43 from "react";
|
|
17
|
+
import * as react_jsx_runtime183 from "react/jsx-runtime";
|
|
18
18
|
import { ContextValue } from "react-aria-components/slots";
|
|
19
19
|
|
|
20
20
|
//#region src/components/text-field/context.d.ts
|
|
21
21
|
/** Context for sharing props across TextField components */
|
|
22
|
-
declare const TextFieldContext:
|
|
22
|
+
declare const TextFieldContext: react43.Context<ContextValue<TextFieldProps, HTMLDivElement>>;
|
|
23
23
|
/**
|
|
24
24
|
* Sets default props for all TextField components within.
|
|
25
25
|
*
|
|
@@ -42,7 +42,7 @@ declare const TextFieldContext: react33.Context<ContextValue<TextFieldProps, HTM
|
|
|
42
42
|
declare function TextFieldProvider({
|
|
43
43
|
children,
|
|
44
44
|
...props
|
|
45
|
-
}: ProviderProps<TextFieldProps>):
|
|
45
|
+
}: ProviderProps<TextFieldProps>): react_jsx_runtime183.JSX.Element;
|
|
46
46
|
//#endregion
|
|
47
47
|
export { TextFieldContext, TextFieldProvider };
|
|
48
48
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { TextFieldProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime185 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/text-field/index.d.ts
|
|
18
18
|
|
|
@@ -40,7 +40,7 @@ import * as react_jsx_runtime128 from "react/jsx-runtime";
|
|
|
40
40
|
declare function TextField({
|
|
41
41
|
ref,
|
|
42
42
|
...props
|
|
43
|
-
}: TextFieldProps):
|
|
43
|
+
}: TextFieldProps): react_jsx_runtime185.JSX.Element;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { TextField };
|
|
46
46
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { TimeFieldProps as TimeFieldProps$1 } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime184 from "react/jsx-runtime";
|
|
16
16
|
import { TimeValue } from "react-aria-components/TimeField";
|
|
17
17
|
|
|
18
18
|
//#region src/components/time-field/index.d.ts
|
|
@@ -58,7 +58,7 @@ declare function TimeField<T extends TimeValue>({
|
|
|
58
58
|
isRequired,
|
|
59
59
|
isReadOnly,
|
|
60
60
|
...rest
|
|
61
|
-
}: TimeFieldProps$1<T>):
|
|
61
|
+
}: TimeFieldProps$1<T>): react_jsx_runtime184.JSX.Element;
|
|
62
62
|
//#endregion
|
|
63
63
|
export { TimeField };
|
|
64
64
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
|
|
13
13
|
import { TooltipTriggerProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react44 from "react";
|
|
16
16
|
import { ContextValue } from "react-aria-components/slots";
|
|
17
17
|
|
|
18
18
|
//#region src/components/tooltip/context.d.ts
|
|
19
19
|
/** Context for sharing props across TooltipTrigger components */
|
|
20
|
-
declare const TooltipContext:
|
|
20
|
+
declare const TooltipContext: react44.Context<ContextValue<TooltipTriggerProps, HTMLDivElement>>;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { TooltipContext };
|
|
23
23
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { TooltipProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime186 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/tooltip/index.d.ts
|
|
18
18
|
|
|
@@ -44,7 +44,7 @@ declare function Tooltip({
|
|
|
44
44
|
offset,
|
|
45
45
|
placement,
|
|
46
46
|
...props
|
|
47
|
-
}: TooltipProps):
|
|
47
|
+
}: TooltipProps): react_jsx_runtime186.JSX.Element;
|
|
48
48
|
//#endregion
|
|
49
49
|
export { Tooltip };
|
|
50
50
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { TooltipTriggerProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime187 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/tooltip/trigger.d.ts
|
|
18
18
|
|
|
@@ -38,7 +38,7 @@ import * as react_jsx_runtime178 from "react/jsx-runtime";
|
|
|
38
38
|
declare function TooltipTrigger({
|
|
39
39
|
ref,
|
|
40
40
|
...props
|
|
41
|
-
}: TooltipTriggerProps):
|
|
41
|
+
}: TooltipTriggerProps): react_jsx_runtime187.JSX.Element;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { TooltipTrigger };
|
|
44
44
|
//# sourceMappingURL=trigger.d.ts.map
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
|
|
13
13
|
import { TreeContextValue, TreeItemContextValue } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react45 from "react";
|
|
16
16
|
|
|
17
17
|
//#region src/components/tree/context.d.ts
|
|
18
18
|
/** Context for sharing state across Tree components */
|
|
19
|
-
declare const TreeContext:
|
|
19
|
+
declare const TreeContext: react45.Context<TreeContextValue>;
|
|
20
20
|
/** Context for sharing state within a TreeItem */
|
|
21
|
-
declare const TreeItemContext:
|
|
21
|
+
declare const TreeItemContext: react45.Context<TreeItemContextValue>;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { TreeContext, TreeItemContext };
|
|
24
24
|
//# sourceMappingURL=context.d.ts.map
|