@workday/canvas-kit-react 12.0.6 → 12.0.7
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/collection/lib/useOverflowListModel.tsx +34 -6
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts +128 -0
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts +8 -0
- package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarList.d.ts +8 -0
- package/dist/commonjs/action-bar/lib/ActionBarList.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.d.ts +8 -0
- package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts +124 -0
- package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts.map +1 -1
- package/dist/commonjs/avatar/lib/Avatar.js +21 -21
- package/dist/commonjs/badge/lib/CountBadge.js +3 -3
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs.d.ts +515 -53
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts +8 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.d.ts +8 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.d.ts +4 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts +8 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts +124 -0
- package/dist/commonjs/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts.map +1 -1
- package/dist/commonjs/button/lib/BaseButton.js +21 -21
- package/dist/commonjs/button/lib/DeleteButton.js +1 -1
- package/dist/commonjs/button/lib/PrimaryButton.js +2 -2
- package/dist/commonjs/button/lib/SecondaryButton.js +2 -2
- package/dist/commonjs/button/lib/TertiaryButton.js +18 -18
- package/dist/commonjs/card/lib/Card.js +1 -1
- package/dist/commonjs/card/lib/CardBody.js +1 -1
- package/dist/commonjs/card/lib/CardHeading.js +1 -1
- package/dist/commonjs/checkbox/lib/CheckBackground.js +3 -3
- package/dist/commonjs/checkbox/lib/CheckboxCheck.js +5 -5
- package/dist/commonjs/checkbox/lib/CheckboxContainer.js +1 -1
- package/dist/commonjs/checkbox/lib/CheckboxInput.js +5 -5
- package/dist/commonjs/checkbox/lib/CheckboxRipple.js +1 -1
- package/dist/commonjs/collection/lib/ListBox.js +3 -3
- package/dist/commonjs/collection/lib/useOverflowListItemMeasure.d.ts +4 -0
- package/dist/commonjs/collection/lib/useOverflowListItemMeasure.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useOverflowListMeasure.d.ts +4 -0
- package/dist/commonjs/collection/lib/useOverflowListMeasure.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useOverflowListModel.d.ts +125 -1
- package/dist/commonjs/collection/lib/useOverflowListModel.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useOverflowListModel.js +20 -11
- package/dist/commonjs/collection/lib/useOverflowListTarget.d.ts +4 -0
- package/dist/commonjs/collection/lib/useOverflowListTarget.d.ts.map +1 -1
- package/dist/commonjs/combobox/lib/ComboboxMenuList.js +1 -1
- package/dist/commonjs/common/lib/AccessibleHide.js +1 -1
- package/dist/commonjs/common/lib/CanvasProvider.js +1 -1
- package/dist/commonjs/form-field/lib/FormFieldContainer.js +1 -1
- package/dist/commonjs/form-field/lib/FormFieldField.js +1 -1
- package/dist/commonjs/form-field/lib/FormFieldGroupLabel.js +5 -5
- package/dist/commonjs/form-field/lib/FormFieldGroupList.js +3 -3
- package/dist/commonjs/form-field/lib/FormFieldHint.js +3 -3
- package/dist/commonjs/form-field/lib/FormFieldLabel.js +6 -6
- package/dist/commonjs/form-field/lib/formFieldStencil.js +8 -8
- package/dist/commonjs/icon/lib/AccentIcon.js +2 -2
- package/dist/commonjs/icon/lib/AppletIcon.js +1 -1
- package/dist/commonjs/icon/lib/Graphic.js +2 -2
- package/dist/commonjs/icon/lib/Svg.js +2 -2
- package/dist/commonjs/icon/lib/SystemIcon.js +1 -1
- package/dist/commonjs/icon/lib/SystemIconCircle.js +1 -1
- package/dist/commonjs/loading-dots/lib/LoadingDots.js +3 -3
- package/dist/commonjs/menu/lib/MenuCard.js +1 -1
- package/dist/commonjs/menu/lib/MenuItem.js +1 -1
- package/dist/commonjs/menu/lib/MenuList.js +3 -3
- package/dist/commonjs/menu/lib/MenuOption.js +1 -1
- package/dist/commonjs/modal/lib/ModalBody.js +1 -1
- package/dist/commonjs/modal/lib/ModalCard.js +1 -1
- package/dist/commonjs/modal/lib/ModalHeading.js +1 -1
- package/dist/commonjs/modal/lib/ModalOverflowOverlay.js +1 -1
- package/dist/commonjs/modal/lib/ModalOverlay.js +2 -2
- package/dist/commonjs/popup/lib/PopupBody.js +1 -1
- package/dist/commonjs/popup/lib/PopupCard.js +2 -2
- package/dist/commonjs/popup/lib/PopupCloseIcon.js +1 -1
- package/dist/commonjs/popup/lib/PopupHeading.js +1 -1
- package/dist/commonjs/select/lib/SelectCard.js +1 -1
- package/dist/commonjs/select/lib/SelectInput.js +3 -3
- package/dist/commonjs/switch/lib/Switch.js +7 -7
- package/dist/commonjs/table/lib/Table.js +1 -1
- package/dist/commonjs/table/lib/TableBody.js +1 -1
- package/dist/commonjs/table/lib/TableCaption.js +1 -1
- package/dist/commonjs/table/lib/TableCell.js +1 -1
- package/dist/commonjs/table/lib/TableFooter.js +1 -1
- package/dist/commonjs/table/lib/TableHead.js +1 -1
- package/dist/commonjs/table/lib/TableHeader.js +1 -1
- package/dist/commonjs/table/lib/TableRow.js +1 -1
- package/dist/commonjs/tabs/lib/Tabs.d.ts +146 -0
- package/dist/commonjs/tabs/lib/Tabs.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsItem.d.ts +8 -0
- package/dist/commonjs/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsList.d.ts +8 -0
- package/dist/commonjs/tabs/lib/TabsList.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsOverflowButton.d.ts +8 -0
- package/dist/commonjs/tabs/lib/TabsOverflowButton.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsPanel.d.ts +8 -0
- package/dist/commonjs/tabs/lib/TabsPanel.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsPanels.d.ts +4 -0
- package/dist/commonjs/tabs/lib/TabsPanels.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/useTabsModel.d.ts +150 -0
- package/dist/commonjs/tabs/lib/useTabsModel.d.ts.map +1 -1
- package/dist/commonjs/text/lib/LabelText.js +6 -6
- package/dist/commonjs/text/lib/Text.js +16 -16
- package/dist/commonjs/text/lib/TypeLevelComponents.js +4 -4
- package/dist/commonjs/text-area/lib/TextArea.js +5 -5
- package/dist/commonjs/text-input/lib/InputGroup.js +6 -6
- package/dist/commonjs/text-input/lib/TextInput.js +5 -5
- package/dist/commonjs/toast/lib/Toast.js +1 -1
- package/dist/commonjs/toast/lib/ToastBody.js +1 -1
- package/dist/commonjs/toast/lib/ToastCloseIcon.js +1 -1
- package/dist/commonjs/toast/lib/ToastIcon.js +1 -1
- package/dist/commonjs/toast/lib/ToastMessage.js +1 -1
- package/dist/es6/action-bar/lib/ActionBar.d.ts +128 -0
- package/dist/es6/action-bar/lib/ActionBar.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBarItem.d.ts +8 -0
- package/dist/es6/action-bar/lib/ActionBarItem.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBarList.d.ts +8 -0
- package/dist/es6/action-bar/lib/ActionBarList.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBarOverflowButton.d.ts +8 -0
- package/dist/es6/action-bar/lib/ActionBarOverflowButton.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/useActionBarModel.d.ts +124 -0
- package/dist/es6/action-bar/lib/useActionBarModel.d.ts.map +1 -1
- package/dist/es6/avatar/lib/Avatar.js +21 -21
- package/dist/es6/badge/lib/CountBadge.js +3 -3
- package/dist/es6/breadcrumbs/lib/Breadcrumbs.d.ts +515 -53
- package/dist/es6/breadcrumbs/lib/Breadcrumbs.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts +8 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.d.ts +8 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsList.d.ts +4 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsList.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts +8 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts +124 -0
- package/dist/es6/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts.map +1 -1
- package/dist/es6/button/lib/BaseButton.js +21 -21
- package/dist/es6/button/lib/DeleteButton.js +1 -1
- package/dist/es6/button/lib/PrimaryButton.js +2 -2
- package/dist/es6/button/lib/SecondaryButton.js +2 -2
- package/dist/es6/button/lib/TertiaryButton.js +18 -18
- package/dist/es6/card/lib/Card.js +1 -1
- package/dist/es6/card/lib/CardBody.js +1 -1
- package/dist/es6/card/lib/CardHeading.js +1 -1
- package/dist/es6/checkbox/lib/CheckBackground.js +3 -3
- package/dist/es6/checkbox/lib/CheckboxCheck.js +5 -5
- package/dist/es6/checkbox/lib/CheckboxContainer.js +1 -1
- package/dist/es6/checkbox/lib/CheckboxInput.js +5 -5
- package/dist/es6/checkbox/lib/CheckboxRipple.js +1 -1
- package/dist/es6/collection/lib/ListBox.js +3 -3
- package/dist/es6/collection/lib/useOverflowListItemMeasure.d.ts +4 -0
- package/dist/es6/collection/lib/useOverflowListItemMeasure.d.ts.map +1 -1
- package/dist/es6/collection/lib/useOverflowListMeasure.d.ts +4 -0
- package/dist/es6/collection/lib/useOverflowListMeasure.d.ts.map +1 -1
- package/dist/es6/collection/lib/useOverflowListModel.d.ts +125 -1
- package/dist/es6/collection/lib/useOverflowListModel.d.ts.map +1 -1
- package/dist/es6/collection/lib/useOverflowListModel.js +20 -11
- package/dist/es6/collection/lib/useOverflowListTarget.d.ts +4 -0
- package/dist/es6/collection/lib/useOverflowListTarget.d.ts.map +1 -1
- package/dist/es6/combobox/lib/ComboboxMenuList.js +1 -1
- package/dist/es6/common/lib/AccessibleHide.js +1 -1
- package/dist/es6/common/lib/CanvasProvider.js +1 -1
- package/dist/es6/form-field/lib/FormFieldContainer.js +1 -1
- package/dist/es6/form-field/lib/FormFieldField.js +1 -1
- package/dist/es6/form-field/lib/FormFieldGroupLabel.js +5 -5
- package/dist/es6/form-field/lib/FormFieldGroupList.js +3 -3
- package/dist/es6/form-field/lib/FormFieldHint.js +3 -3
- package/dist/es6/form-field/lib/FormFieldLabel.js +6 -6
- package/dist/es6/form-field/lib/formFieldStencil.js +8 -8
- package/dist/es6/icon/lib/AccentIcon.js +2 -2
- package/dist/es6/icon/lib/AppletIcon.js +1 -1
- package/dist/es6/icon/lib/Graphic.js +2 -2
- package/dist/es6/icon/lib/Svg.js +2 -2
- package/dist/es6/icon/lib/SystemIcon.js +1 -1
- package/dist/es6/icon/lib/SystemIconCircle.js +1 -1
- package/dist/es6/loading-dots/lib/LoadingDots.js +3 -3
- package/dist/es6/menu/lib/MenuCard.js +1 -1
- package/dist/es6/menu/lib/MenuItem.js +1 -1
- package/dist/es6/menu/lib/MenuList.js +3 -3
- package/dist/es6/menu/lib/MenuOption.js +1 -1
- package/dist/es6/modal/lib/ModalBody.js +1 -1
- package/dist/es6/modal/lib/ModalCard.js +1 -1
- package/dist/es6/modal/lib/ModalHeading.js +1 -1
- package/dist/es6/modal/lib/ModalOverflowOverlay.js +1 -1
- package/dist/es6/modal/lib/ModalOverlay.js +2 -2
- package/dist/es6/popup/lib/PopupBody.js +1 -1
- package/dist/es6/popup/lib/PopupCard.js +2 -2
- package/dist/es6/popup/lib/PopupCloseIcon.js +1 -1
- package/dist/es6/popup/lib/PopupHeading.js +1 -1
- package/dist/es6/select/lib/SelectCard.js +1 -1
- package/dist/es6/select/lib/SelectInput.js +3 -3
- package/dist/es6/switch/lib/Switch.js +7 -7
- package/dist/es6/table/lib/Table.js +1 -1
- package/dist/es6/table/lib/TableBody.js +1 -1
- package/dist/es6/table/lib/TableCaption.js +1 -1
- package/dist/es6/table/lib/TableCell.js +1 -1
- package/dist/es6/table/lib/TableFooter.js +1 -1
- package/dist/es6/table/lib/TableHead.js +1 -1
- package/dist/es6/table/lib/TableHeader.js +1 -1
- package/dist/es6/table/lib/TableRow.js +1 -1
- package/dist/es6/tabs/lib/Tabs.d.ts +146 -0
- package/dist/es6/tabs/lib/Tabs.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsItem.d.ts +8 -0
- package/dist/es6/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsList.d.ts +8 -0
- package/dist/es6/tabs/lib/TabsList.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsOverflowButton.d.ts +8 -0
- package/dist/es6/tabs/lib/TabsOverflowButton.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsPanel.d.ts +8 -0
- package/dist/es6/tabs/lib/TabsPanel.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsPanels.d.ts +4 -0
- package/dist/es6/tabs/lib/TabsPanels.d.ts.map +1 -1
- package/dist/es6/tabs/lib/useTabsModel.d.ts +150 -0
- package/dist/es6/tabs/lib/useTabsModel.d.ts.map +1 -1
- package/dist/es6/text/lib/LabelText.js +6 -6
- package/dist/es6/text/lib/Text.js +16 -16
- package/dist/es6/text/lib/TypeLevelComponents.js +4 -4
- package/dist/es6/text-area/lib/TextArea.js +5 -5
- package/dist/es6/text-input/lib/InputGroup.js +6 -6
- package/dist/es6/text-input/lib/TextInput.js +5 -5
- package/dist/es6/toast/lib/Toast.js +1 -1
- package/dist/es6/toast/lib/ToastBody.js +1 -1
- package/dist/es6/toast/lib/ToastCloseIcon.js +1 -1
- package/dist/es6/toast/lib/ToastIcon.js +1 -1
- package/dist/es6/toast/lib/ToastMessage.js +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Item } from './useBaseListModel';
|
|
3
|
-
export declare function getHiddenIds(containerWidth: number, overflowTargetWidth: number, itemWidthCache: Record<string, number>, selectedIds: string[] | 'all', items
|
|
3
|
+
export declare function getHiddenIds(containerWidth: number, containerGap: number, overflowTargetWidth: number, itemWidthCache: Record<string, number>, selectedIds: string[] | 'all', items: Item<any>[]): string[];
|
|
4
4
|
export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Partial<{
|
|
5
5
|
initialHiddenIds: string[];
|
|
6
6
|
containerWidth: number;
|
|
@@ -31,6 +31,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
31
31
|
hiddenIds: string[];
|
|
32
32
|
itemWidthCache: Record<string, number>;
|
|
33
33
|
containerWidth: number;
|
|
34
|
+
containerGap: number;
|
|
34
35
|
overflowTargetWidth: number;
|
|
35
36
|
selectedIds: string[] | "all";
|
|
36
37
|
unselectedIds: string[];
|
|
@@ -62,6 +63,39 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
62
63
|
hiddenIds: string[];
|
|
63
64
|
itemWidthCache: Record<string, number>;
|
|
64
65
|
containerWidth: number;
|
|
66
|
+
containerGap: number;
|
|
67
|
+
overflowTargetWidth: number;
|
|
68
|
+
selectedIds: string[] | "all";
|
|
69
|
+
unselectedIds: string[];
|
|
70
|
+
cursorId: string;
|
|
71
|
+
columnCount: number;
|
|
72
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
73
|
+
cursorIndexRef: {
|
|
74
|
+
readonly current: number;
|
|
75
|
+
};
|
|
76
|
+
UNSTABLE_virtual: {
|
|
77
|
+
virtualItems: import("./react-virtual").VirtualItem[];
|
|
78
|
+
totalSize: number;
|
|
79
|
+
scrollToOffset: (index: number, options?: import("./react-virtual").ScrollToOffsetOptions | undefined) => void;
|
|
80
|
+
scrollToIndex: (index: number, options?: import("./react-virtual").ScrollToIndexOptions | undefined) => void;
|
|
81
|
+
measure: () => void;
|
|
82
|
+
};
|
|
83
|
+
UNSTABLE_defaultItemHeight: number;
|
|
84
|
+
containerRef: React.RefObject<HTMLDivElement>;
|
|
85
|
+
id: string;
|
|
86
|
+
orientation: "horizontal" | "vertical";
|
|
87
|
+
indexRef: React.MutableRefObject<number>;
|
|
88
|
+
nonInteractiveIds: string[];
|
|
89
|
+
isVirtualized: boolean;
|
|
90
|
+
items: Item<any>[];
|
|
91
|
+
}) => void) | undefined;
|
|
92
|
+
onSetContainerGap?: ((data: {
|
|
93
|
+
size: number;
|
|
94
|
+
}, prevState: {
|
|
95
|
+
hiddenIds: string[];
|
|
96
|
+
itemWidthCache: Record<string, number>;
|
|
97
|
+
containerWidth: number;
|
|
98
|
+
containerGap: number;
|
|
65
99
|
overflowTargetWidth: number;
|
|
66
100
|
selectedIds: string[] | "all";
|
|
67
101
|
unselectedIds: string[];
|
|
@@ -93,6 +127,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
93
127
|
hiddenIds: string[];
|
|
94
128
|
itemWidthCache: Record<string, number>;
|
|
95
129
|
containerWidth: number;
|
|
130
|
+
containerGap: number;
|
|
96
131
|
overflowTargetWidth: number;
|
|
97
132
|
selectedIds: string[] | "all";
|
|
98
133
|
unselectedIds: string[];
|
|
@@ -125,6 +160,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
125
160
|
hiddenIds: string[];
|
|
126
161
|
itemWidthCache: Record<string, number>;
|
|
127
162
|
containerWidth: number;
|
|
163
|
+
containerGap: number;
|
|
128
164
|
overflowTargetWidth: number;
|
|
129
165
|
selectedIds: string[] | "all";
|
|
130
166
|
unselectedIds: string[];
|
|
@@ -156,6 +192,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
156
192
|
hiddenIds: string[];
|
|
157
193
|
itemWidthCache: Record<string, number>;
|
|
158
194
|
containerWidth: number;
|
|
195
|
+
containerGap: number;
|
|
159
196
|
overflowTargetWidth: number;
|
|
160
197
|
selectedIds: string[] | "all";
|
|
161
198
|
unselectedIds: string[];
|
|
@@ -187,6 +224,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
187
224
|
hiddenIds: string[];
|
|
188
225
|
itemWidthCache: Record<string, number>;
|
|
189
226
|
containerWidth: number;
|
|
227
|
+
containerGap: number;
|
|
190
228
|
overflowTargetWidth: number;
|
|
191
229
|
selectedIds: string[] | "all";
|
|
192
230
|
unselectedIds: string[];
|
|
@@ -218,6 +256,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
218
256
|
hiddenIds: string[];
|
|
219
257
|
itemWidthCache: Record<string, number>;
|
|
220
258
|
containerWidth: number;
|
|
259
|
+
containerGap: number;
|
|
221
260
|
overflowTargetWidth: number;
|
|
222
261
|
selectedIds: string[] | "all";
|
|
223
262
|
unselectedIds: string[];
|
|
@@ -247,6 +286,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
247
286
|
hiddenIds: string[];
|
|
248
287
|
itemWidthCache: Record<string, number>;
|
|
249
288
|
containerWidth: number;
|
|
289
|
+
containerGap: number;
|
|
250
290
|
overflowTargetWidth: number;
|
|
251
291
|
selectedIds: string[] | "all";
|
|
252
292
|
unselectedIds: string[];
|
|
@@ -276,6 +316,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
276
316
|
hiddenIds: string[];
|
|
277
317
|
itemWidthCache: Record<string, number>;
|
|
278
318
|
containerWidth: number;
|
|
319
|
+
containerGap: number;
|
|
279
320
|
overflowTargetWidth: number;
|
|
280
321
|
selectedIds: string[] | "all";
|
|
281
322
|
unselectedIds: string[];
|
|
@@ -305,6 +346,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
305
346
|
hiddenIds: string[];
|
|
306
347
|
itemWidthCache: Record<string, number>;
|
|
307
348
|
containerWidth: number;
|
|
349
|
+
containerGap: number;
|
|
308
350
|
overflowTargetWidth: number;
|
|
309
351
|
selectedIds: string[] | "all";
|
|
310
352
|
unselectedIds: string[];
|
|
@@ -336,6 +378,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
336
378
|
hiddenIds: string[];
|
|
337
379
|
itemWidthCache: Record<string, number>;
|
|
338
380
|
containerWidth: number;
|
|
381
|
+
containerGap: number;
|
|
339
382
|
overflowTargetWidth: number;
|
|
340
383
|
selectedIds: string[] | "all";
|
|
341
384
|
unselectedIds: string[];
|
|
@@ -365,6 +408,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
365
408
|
hiddenIds: string[];
|
|
366
409
|
itemWidthCache: Record<string, number>;
|
|
367
410
|
containerWidth: number;
|
|
411
|
+
containerGap: number;
|
|
368
412
|
overflowTargetWidth: number;
|
|
369
413
|
selectedIds: string[] | "all";
|
|
370
414
|
unselectedIds: string[];
|
|
@@ -394,6 +438,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
394
438
|
hiddenIds: string[];
|
|
395
439
|
itemWidthCache: Record<string, number>;
|
|
396
440
|
containerWidth: number;
|
|
441
|
+
containerGap: number;
|
|
397
442
|
overflowTargetWidth: number;
|
|
398
443
|
selectedIds: string[] | "all";
|
|
399
444
|
unselectedIds: string[];
|
|
@@ -423,6 +468,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
423
468
|
hiddenIds: string[];
|
|
424
469
|
itemWidthCache: Record<string, number>;
|
|
425
470
|
containerWidth: number;
|
|
471
|
+
containerGap: number;
|
|
426
472
|
overflowTargetWidth: number;
|
|
427
473
|
selectedIds: string[] | "all";
|
|
428
474
|
unselectedIds: string[];
|
|
@@ -452,6 +498,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
452
498
|
hiddenIds: string[];
|
|
453
499
|
itemWidthCache: Record<string, number>;
|
|
454
500
|
containerWidth: number;
|
|
501
|
+
containerGap: number;
|
|
455
502
|
overflowTargetWidth: number;
|
|
456
503
|
selectedIds: string[] | "all";
|
|
457
504
|
unselectedIds: string[];
|
|
@@ -481,6 +528,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
481
528
|
hiddenIds: string[];
|
|
482
529
|
itemWidthCache: Record<string, number>;
|
|
483
530
|
containerWidth: number;
|
|
531
|
+
containerGap: number;
|
|
484
532
|
overflowTargetWidth: number;
|
|
485
533
|
selectedIds: string[] | "all";
|
|
486
534
|
unselectedIds: string[];
|
|
@@ -510,6 +558,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
510
558
|
hiddenIds: string[];
|
|
511
559
|
itemWidthCache: Record<string, number>;
|
|
512
560
|
containerWidth: number;
|
|
561
|
+
containerGap: number;
|
|
513
562
|
overflowTargetWidth: number;
|
|
514
563
|
selectedIds: string[] | "all";
|
|
515
564
|
unselectedIds: string[];
|
|
@@ -539,6 +588,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
539
588
|
hiddenIds: string[];
|
|
540
589
|
itemWidthCache: Record<string, number>;
|
|
541
590
|
containerWidth: number;
|
|
591
|
+
containerGap: number;
|
|
542
592
|
overflowTargetWidth: number;
|
|
543
593
|
selectedIds: string[] | "all";
|
|
544
594
|
unselectedIds: string[];
|
|
@@ -568,6 +618,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
568
618
|
hiddenIds: string[];
|
|
569
619
|
itemWidthCache: Record<string, number>;
|
|
570
620
|
containerWidth: number;
|
|
621
|
+
containerGap: number;
|
|
571
622
|
overflowTargetWidth: number;
|
|
572
623
|
selectedIds: string[] | "all";
|
|
573
624
|
unselectedIds: string[];
|
|
@@ -597,6 +648,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
597
648
|
hiddenIds: string[];
|
|
598
649
|
itemWidthCache: Record<string, number>;
|
|
599
650
|
containerWidth: number;
|
|
651
|
+
containerGap: number;
|
|
600
652
|
overflowTargetWidth: number;
|
|
601
653
|
selectedIds: string[] | "all";
|
|
602
654
|
unselectedIds: string[];
|
|
@@ -626,6 +678,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
626
678
|
hiddenIds: string[];
|
|
627
679
|
itemWidthCache: Record<string, number>;
|
|
628
680
|
containerWidth: number;
|
|
681
|
+
containerGap: number;
|
|
629
682
|
overflowTargetWidth: number;
|
|
630
683
|
selectedIds: string[] | "all";
|
|
631
684
|
unselectedIds: string[];
|
|
@@ -658,6 +711,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
658
711
|
hiddenIds: string[];
|
|
659
712
|
itemWidthCache: Record<string, number>;
|
|
660
713
|
containerWidth: number;
|
|
714
|
+
containerGap: number;
|
|
661
715
|
overflowTargetWidth: number;
|
|
662
716
|
selectedIds: string[] | "all";
|
|
663
717
|
unselectedIds: string[];
|
|
@@ -689,6 +743,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
689
743
|
hiddenIds: string[];
|
|
690
744
|
itemWidthCache: Record<string, number>;
|
|
691
745
|
containerWidth: number;
|
|
746
|
+
containerGap: number;
|
|
692
747
|
overflowTargetWidth: number;
|
|
693
748
|
selectedIds: string[] | "all";
|
|
694
749
|
unselectedIds: string[];
|
|
@@ -720,6 +775,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
720
775
|
hiddenIds: string[];
|
|
721
776
|
itemWidthCache: Record<string, number>;
|
|
722
777
|
containerWidth: number;
|
|
778
|
+
containerGap: number;
|
|
723
779
|
overflowTargetWidth: number;
|
|
724
780
|
selectedIds: string[] | "all";
|
|
725
781
|
unselectedIds: string[];
|
|
@@ -752,6 +808,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
752
808
|
hiddenIds: string[];
|
|
753
809
|
itemWidthCache: Record<string, number>;
|
|
754
810
|
containerWidth: number;
|
|
811
|
+
containerGap: number;
|
|
755
812
|
overflowTargetWidth: number;
|
|
756
813
|
selectedIds: string[] | "all";
|
|
757
814
|
unselectedIds: string[];
|
|
@@ -783,6 +840,39 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
783
840
|
hiddenIds: string[];
|
|
784
841
|
itemWidthCache: Record<string, number>;
|
|
785
842
|
containerWidth: number;
|
|
843
|
+
containerGap: number;
|
|
844
|
+
overflowTargetWidth: number;
|
|
845
|
+
selectedIds: string[] | "all";
|
|
846
|
+
unselectedIds: string[];
|
|
847
|
+
cursorId: string;
|
|
848
|
+
columnCount: number;
|
|
849
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
850
|
+
cursorIndexRef: {
|
|
851
|
+
readonly current: number;
|
|
852
|
+
};
|
|
853
|
+
UNSTABLE_virtual: {
|
|
854
|
+
virtualItems: import("./react-virtual").VirtualItem[];
|
|
855
|
+
totalSize: number;
|
|
856
|
+
scrollToOffset: (index: number, options?: import("./react-virtual").ScrollToOffsetOptions | undefined) => void;
|
|
857
|
+
scrollToIndex: (index: number, options?: import("./react-virtual").ScrollToIndexOptions | undefined) => void;
|
|
858
|
+
measure: () => void;
|
|
859
|
+
};
|
|
860
|
+
UNSTABLE_defaultItemHeight: number;
|
|
861
|
+
containerRef: React.RefObject<HTMLDivElement>;
|
|
862
|
+
id: string;
|
|
863
|
+
orientation: "horizontal" | "vertical";
|
|
864
|
+
indexRef: React.MutableRefObject<number>;
|
|
865
|
+
nonInteractiveIds: string[];
|
|
866
|
+
isVirtualized: boolean;
|
|
867
|
+
items: Item<any>[];
|
|
868
|
+
}) => boolean) | undefined;
|
|
869
|
+
shouldSetContainerGap?: ((data: {
|
|
870
|
+
size: number;
|
|
871
|
+
}, state: {
|
|
872
|
+
hiddenIds: string[];
|
|
873
|
+
itemWidthCache: Record<string, number>;
|
|
874
|
+
containerWidth: number;
|
|
875
|
+
containerGap: number;
|
|
786
876
|
overflowTargetWidth: number;
|
|
787
877
|
selectedIds: string[] | "all";
|
|
788
878
|
unselectedIds: string[];
|
|
@@ -814,6 +904,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
814
904
|
hiddenIds: string[];
|
|
815
905
|
itemWidthCache: Record<string, number>;
|
|
816
906
|
containerWidth: number;
|
|
907
|
+
containerGap: number;
|
|
817
908
|
overflowTargetWidth: number;
|
|
818
909
|
selectedIds: string[] | "all";
|
|
819
910
|
unselectedIds: string[];
|
|
@@ -846,6 +937,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
846
937
|
hiddenIds: string[];
|
|
847
938
|
itemWidthCache: Record<string, number>;
|
|
848
939
|
containerWidth: number;
|
|
940
|
+
containerGap: number;
|
|
849
941
|
overflowTargetWidth: number;
|
|
850
942
|
selectedIds: string[] | "all";
|
|
851
943
|
unselectedIds: string[];
|
|
@@ -877,6 +969,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
877
969
|
hiddenIds: string[];
|
|
878
970
|
itemWidthCache: Record<string, number>;
|
|
879
971
|
containerWidth: number;
|
|
972
|
+
containerGap: number;
|
|
880
973
|
overflowTargetWidth: number;
|
|
881
974
|
selectedIds: string[] | "all";
|
|
882
975
|
unselectedIds: string[];
|
|
@@ -908,6 +1001,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
908
1001
|
hiddenIds: string[];
|
|
909
1002
|
itemWidthCache: Record<string, number>;
|
|
910
1003
|
containerWidth: number;
|
|
1004
|
+
containerGap: number;
|
|
911
1005
|
overflowTargetWidth: number;
|
|
912
1006
|
selectedIds: string[] | "all";
|
|
913
1007
|
unselectedIds: string[];
|
|
@@ -939,6 +1033,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
939
1033
|
hiddenIds: string[];
|
|
940
1034
|
itemWidthCache: Record<string, number>;
|
|
941
1035
|
containerWidth: number;
|
|
1036
|
+
containerGap: number;
|
|
942
1037
|
overflowTargetWidth: number;
|
|
943
1038
|
selectedIds: string[] | "all";
|
|
944
1039
|
unselectedIds: string[];
|
|
@@ -968,6 +1063,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
968
1063
|
hiddenIds: string[];
|
|
969
1064
|
itemWidthCache: Record<string, number>;
|
|
970
1065
|
containerWidth: number;
|
|
1066
|
+
containerGap: number;
|
|
971
1067
|
overflowTargetWidth: number;
|
|
972
1068
|
selectedIds: string[] | "all";
|
|
973
1069
|
unselectedIds: string[];
|
|
@@ -997,6 +1093,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
997
1093
|
hiddenIds: string[];
|
|
998
1094
|
itemWidthCache: Record<string, number>;
|
|
999
1095
|
containerWidth: number;
|
|
1096
|
+
containerGap: number;
|
|
1000
1097
|
overflowTargetWidth: number;
|
|
1001
1098
|
selectedIds: string[] | "all";
|
|
1002
1099
|
unselectedIds: string[];
|
|
@@ -1026,6 +1123,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1026
1123
|
hiddenIds: string[];
|
|
1027
1124
|
itemWidthCache: Record<string, number>;
|
|
1028
1125
|
containerWidth: number;
|
|
1126
|
+
containerGap: number;
|
|
1029
1127
|
overflowTargetWidth: number;
|
|
1030
1128
|
selectedIds: string[] | "all";
|
|
1031
1129
|
unselectedIds: string[];
|
|
@@ -1057,6 +1155,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1057
1155
|
hiddenIds: string[];
|
|
1058
1156
|
itemWidthCache: Record<string, number>;
|
|
1059
1157
|
containerWidth: number;
|
|
1158
|
+
containerGap: number;
|
|
1060
1159
|
overflowTargetWidth: number;
|
|
1061
1160
|
selectedIds: string[] | "all";
|
|
1062
1161
|
unselectedIds: string[];
|
|
@@ -1086,6 +1185,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1086
1185
|
hiddenIds: string[];
|
|
1087
1186
|
itemWidthCache: Record<string, number>;
|
|
1088
1187
|
containerWidth: number;
|
|
1188
|
+
containerGap: number;
|
|
1089
1189
|
overflowTargetWidth: number;
|
|
1090
1190
|
selectedIds: string[] | "all";
|
|
1091
1191
|
unselectedIds: string[];
|
|
@@ -1115,6 +1215,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1115
1215
|
hiddenIds: string[];
|
|
1116
1216
|
itemWidthCache: Record<string, number>;
|
|
1117
1217
|
containerWidth: number;
|
|
1218
|
+
containerGap: number;
|
|
1118
1219
|
overflowTargetWidth: number;
|
|
1119
1220
|
selectedIds: string[] | "all";
|
|
1120
1221
|
unselectedIds: string[];
|
|
@@ -1144,6 +1245,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1144
1245
|
hiddenIds: string[];
|
|
1145
1246
|
itemWidthCache: Record<string, number>;
|
|
1146
1247
|
containerWidth: number;
|
|
1248
|
+
containerGap: number;
|
|
1147
1249
|
overflowTargetWidth: number;
|
|
1148
1250
|
selectedIds: string[] | "all";
|
|
1149
1251
|
unselectedIds: string[];
|
|
@@ -1173,6 +1275,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1173
1275
|
hiddenIds: string[];
|
|
1174
1276
|
itemWidthCache: Record<string, number>;
|
|
1175
1277
|
containerWidth: number;
|
|
1278
|
+
containerGap: number;
|
|
1176
1279
|
overflowTargetWidth: number;
|
|
1177
1280
|
selectedIds: string[] | "all";
|
|
1178
1281
|
unselectedIds: string[];
|
|
@@ -1202,6 +1305,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1202
1305
|
hiddenIds: string[];
|
|
1203
1306
|
itemWidthCache: Record<string, number>;
|
|
1204
1307
|
containerWidth: number;
|
|
1308
|
+
containerGap: number;
|
|
1205
1309
|
overflowTargetWidth: number;
|
|
1206
1310
|
selectedIds: string[] | "all";
|
|
1207
1311
|
unselectedIds: string[];
|
|
@@ -1231,6 +1335,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1231
1335
|
hiddenIds: string[];
|
|
1232
1336
|
itemWidthCache: Record<string, number>;
|
|
1233
1337
|
containerWidth: number;
|
|
1338
|
+
containerGap: number;
|
|
1234
1339
|
overflowTargetWidth: number;
|
|
1235
1340
|
selectedIds: string[] | "all";
|
|
1236
1341
|
unselectedIds: string[];
|
|
@@ -1260,6 +1365,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1260
1365
|
hiddenIds: string[];
|
|
1261
1366
|
itemWidthCache: Record<string, number>;
|
|
1262
1367
|
containerWidth: number;
|
|
1368
|
+
containerGap: number;
|
|
1263
1369
|
overflowTargetWidth: number;
|
|
1264
1370
|
selectedIds: string[] | "all";
|
|
1265
1371
|
unselectedIds: string[];
|
|
@@ -1289,6 +1395,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1289
1395
|
hiddenIds: string[];
|
|
1290
1396
|
itemWidthCache: Record<string, number>;
|
|
1291
1397
|
containerWidth: number;
|
|
1398
|
+
containerGap: number;
|
|
1292
1399
|
overflowTargetWidth: number;
|
|
1293
1400
|
selectedIds: string[] | "all";
|
|
1294
1401
|
unselectedIds: string[];
|
|
@@ -1318,6 +1425,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1318
1425
|
hiddenIds: string[];
|
|
1319
1426
|
itemWidthCache: Record<string, number>;
|
|
1320
1427
|
containerWidth: number;
|
|
1428
|
+
containerGap: number;
|
|
1321
1429
|
overflowTargetWidth: number;
|
|
1322
1430
|
selectedIds: string[] | "all";
|
|
1323
1431
|
unselectedIds: string[];
|
|
@@ -1347,6 +1455,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1347
1455
|
hiddenIds: string[];
|
|
1348
1456
|
itemWidthCache: Record<string, number>;
|
|
1349
1457
|
containerWidth: number;
|
|
1458
|
+
containerGap: number;
|
|
1350
1459
|
overflowTargetWidth: number;
|
|
1351
1460
|
selectedIds: string[] | "all";
|
|
1352
1461
|
unselectedIds: string[];
|
|
@@ -1379,6 +1488,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1379
1488
|
hiddenIds: string[];
|
|
1380
1489
|
itemWidthCache: Record<string, number>;
|
|
1381
1490
|
containerWidth: number;
|
|
1491
|
+
containerGap: number;
|
|
1382
1492
|
overflowTargetWidth: number;
|
|
1383
1493
|
selectedIds: string[] | "all";
|
|
1384
1494
|
unselectedIds: string[];
|
|
@@ -1410,6 +1520,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1410
1520
|
hiddenIds: string[];
|
|
1411
1521
|
itemWidthCache: Record<string, number>;
|
|
1412
1522
|
containerWidth: number;
|
|
1523
|
+
containerGap: number;
|
|
1413
1524
|
overflowTargetWidth: number;
|
|
1414
1525
|
selectedIds: string[] | "all";
|
|
1415
1526
|
unselectedIds: string[];
|
|
@@ -1441,6 +1552,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1441
1552
|
hiddenIds: string[];
|
|
1442
1553
|
itemWidthCache: Record<string, number>;
|
|
1443
1554
|
containerWidth: number;
|
|
1555
|
+
containerGap: number;
|
|
1444
1556
|
overflowTargetWidth: number;
|
|
1445
1557
|
selectedIds: string[] | "all";
|
|
1446
1558
|
unselectedIds: string[];
|
|
@@ -1471,6 +1583,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1471
1583
|
hiddenIds: string[];
|
|
1472
1584
|
itemWidthCache: Record<string, number>;
|
|
1473
1585
|
containerWidth: number;
|
|
1586
|
+
containerGap: number;
|
|
1474
1587
|
overflowTargetWidth: number;
|
|
1475
1588
|
selectedIds: string[] | "all";
|
|
1476
1589
|
unselectedIds: string[];
|
|
@@ -1503,6 +1616,9 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1503
1616
|
setContainerWidth(data: {
|
|
1504
1617
|
width?: number;
|
|
1505
1618
|
}): void;
|
|
1619
|
+
setContainerGap(data: {
|
|
1620
|
+
size: number;
|
|
1621
|
+
}): void;
|
|
1506
1622
|
setOverflowTargetWidth(data: {
|
|
1507
1623
|
width: number;
|
|
1508
1624
|
}): void;
|
|
@@ -1576,6 +1692,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1576
1692
|
hiddenIds: string[];
|
|
1577
1693
|
itemWidthCache: Record<string, number>;
|
|
1578
1694
|
containerWidth: number;
|
|
1695
|
+
containerGap: number;
|
|
1579
1696
|
overflowTargetWidth: number;
|
|
1580
1697
|
selectedIds: string[] | "all";
|
|
1581
1698
|
unselectedIds: string[];
|
|
@@ -1607,6 +1724,9 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1607
1724
|
setContainerWidth(data: {
|
|
1608
1725
|
width?: number;
|
|
1609
1726
|
}): void;
|
|
1727
|
+
setContainerGap(data: {
|
|
1728
|
+
size: number;
|
|
1729
|
+
}): void;
|
|
1610
1730
|
setOverflowTargetWidth(data: {
|
|
1611
1731
|
width: number;
|
|
1612
1732
|
}): void;
|
|
@@ -1654,6 +1774,7 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1654
1774
|
hiddenIds: string[];
|
|
1655
1775
|
itemWidthCache: Record<string, number>;
|
|
1656
1776
|
containerWidth: number;
|
|
1777
|
+
containerGap: number;
|
|
1657
1778
|
overflowTargetWidth: number;
|
|
1658
1779
|
selectedIds: string[] | "all";
|
|
1659
1780
|
unselectedIds: string[];
|
|
@@ -1686,6 +1807,9 @@ export declare const useOverflowListModel: (<TT_Special_Generic>(config?: (Parti
|
|
|
1686
1807
|
setContainerWidth(data: {
|
|
1687
1808
|
width?: number;
|
|
1688
1809
|
}): void;
|
|
1810
|
+
setContainerGap(data: {
|
|
1811
|
+
size: number;
|
|
1812
|
+
}): void;
|
|
1689
1813
|
setOverflowTargetWidth(data: {
|
|
1690
1814
|
width: number;
|
|
1691
1815
|
}): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOverflowListModel.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useOverflowListModel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAC,IAAI,EAAC,MAAM,oBAAoB,CAAC;AAExC,wBAAgB,YAAY,CAC1B,cAAc,EAAE,MAAM,EACtB,mBAAmB,EAAE,MAAM,EAC3B,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACtC,WAAW,EAAE,MAAM,EAAE,GAAG,KAAK,EAC7B,KAAK,
|
|
1
|
+
{"version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,MAAM,CAAA;SAAC;2BAmBf;YAAC,EAAE,EAAE,MAAM,CAAA;SAAC;8BAGT;YAAC,EAAE,EAAE,MAAM,CAAA;SAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMpC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { createModelHook } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { useSelectionListModel } from './useSelectionListModel';
|
|
4
|
-
export function getHiddenIds(containerWidth, overflowTargetWidth, itemWidthCache, selectedIds, items) {
|
|
4
|
+
export function getHiddenIds(containerWidth, containerGap, overflowTargetWidth, itemWidthCache, selectedIds, items) {
|
|
5
5
|
/** Allows us to prioritize showing the selected item */
|
|
6
6
|
let selectedKey;
|
|
7
7
|
/** Tally of combined item widths. We'll add items that fit until the container is full */
|
|
@@ -9,16 +9,16 @@ export function getHiddenIds(containerWidth, overflowTargetWidth, itemWidthCache
|
|
|
9
9
|
/** Tally ids that won't fit inside the container. These will be used by components to hide
|
|
10
10
|
* elements that won't fit in the container */
|
|
11
11
|
const hiddenIds = [];
|
|
12
|
+
/** Track if gap should be calculated since gap doesn't apply to the width of the first item, only
|
|
13
|
+
* consecutive items */
|
|
14
|
+
let shouldAddGap = false;
|
|
12
15
|
if (selectedIds !== 'all' && selectedIds.length) {
|
|
13
|
-
if (items
|
|
16
|
+
if (items.length) {
|
|
14
17
|
// If selectedIds[0] is not in items, use the first id from items
|
|
15
18
|
selectedKey = items.find(item => item.id === selectedIds[0]) ? selectedIds[0] : items[0].id;
|
|
16
19
|
}
|
|
17
|
-
else {
|
|
18
|
-
selectedKey = selectedIds[0];
|
|
19
|
-
}
|
|
20
20
|
}
|
|
21
|
-
if (Object.keys(itemWidthCache).reduce((sum, key) => sum + itemWidthCache[key], 0) <= containerWidth) {
|
|
21
|
+
if (Object.keys(itemWidthCache).reduce((sum, key, index) => sum + itemWidthCache[key] + (index > 0 ? containerGap : 0), 0) <= containerWidth) {
|
|
22
22
|
// All items fit, return empty array
|
|
23
23
|
return [];
|
|
24
24
|
}
|
|
@@ -30,6 +30,7 @@ export function getHiddenIds(containerWidth, overflowTargetWidth, itemWidthCache
|
|
|
30
30
|
else {
|
|
31
31
|
// at least the selected item and overflow target fit. Update our itemWidth with the sum
|
|
32
32
|
itemWidth += itemWidthCache[selectedKey] + overflowTargetWidth;
|
|
33
|
+
shouldAddGap = true;
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
else {
|
|
@@ -37,7 +38,8 @@ export function getHiddenIds(containerWidth, overflowTargetWidth, itemWidthCache
|
|
|
37
38
|
}
|
|
38
39
|
for (const key in itemWidthCache) {
|
|
39
40
|
if (key !== selectedKey) {
|
|
40
|
-
itemWidth += itemWidthCache[key];
|
|
41
|
+
itemWidth += itemWidthCache[key] + (shouldAddGap ? containerGap : 0);
|
|
42
|
+
shouldAddGap = true;
|
|
41
43
|
if (itemWidth > containerWidth) {
|
|
42
44
|
hiddenIds.push(key);
|
|
43
45
|
}
|
|
@@ -63,6 +65,7 @@ export const useOverflowListModel = createModelHook({
|
|
|
63
65
|
const [hiddenIds, setHiddenIds] = React.useState(config.initialHiddenIds);
|
|
64
66
|
const [itemWidthCache, setItemWidthCache] = React.useState({});
|
|
65
67
|
const [containerWidth, setContainerWidth] = React.useState(0);
|
|
68
|
+
const [containerGap, setContainerGap] = React.useState(0);
|
|
66
69
|
const containerWidthRef = React.useRef(0);
|
|
67
70
|
const itemWidthCacheRef = React.useRef(itemWidthCache);
|
|
68
71
|
const [overflowTargetWidth, setOverflowTargetWidth] = React.useState(0);
|
|
@@ -80,20 +83,26 @@ export const useOverflowListModel = createModelHook({
|
|
|
80
83
|
hiddenIds: internalHiddenIds,
|
|
81
84
|
itemWidthCache,
|
|
82
85
|
containerWidth,
|
|
86
|
+
containerGap,
|
|
83
87
|
overflowTargetWidth,
|
|
84
88
|
};
|
|
85
89
|
const events = {
|
|
86
90
|
...model.events,
|
|
87
91
|
select(data) {
|
|
88
92
|
const { selectedIds } = model.selection.select(data.id, state);
|
|
89
|
-
const ids = getHiddenIds(containerWidthRef.current, overflowTargetWidthRef.current, itemWidthCacheRef.current, selectedIds, config.items);
|
|
93
|
+
const ids = getHiddenIds(containerWidthRef.current, containerGap, overflowTargetWidthRef.current, itemWidthCacheRef.current, selectedIds, config.items);
|
|
90
94
|
model.events.select(data);
|
|
91
95
|
setHiddenIds(ids);
|
|
92
96
|
},
|
|
93
97
|
setContainerWidth(data) {
|
|
94
98
|
containerWidthRef.current = data.width || 0;
|
|
95
99
|
setContainerWidth(data.width || 0);
|
|
96
|
-
const ids = getHiddenIds(containerWidthRef.current, overflowTargetWidthRef.current, itemWidthCacheRef.current, state.selectedIds, config.items);
|
|
100
|
+
const ids = getHiddenIds(containerWidthRef.current, containerGap, overflowTargetWidthRef.current, itemWidthCacheRef.current, state.selectedIds, config.items);
|
|
101
|
+
setHiddenIds(ids);
|
|
102
|
+
},
|
|
103
|
+
setContainerGap(data) {
|
|
104
|
+
setContainerGap(data.size);
|
|
105
|
+
const ids = getHiddenIds(containerWidthRef.current, data.size, overflowTargetWidthRef.current, itemWidthCacheRef.current, state.selectedIds, config.items);
|
|
97
106
|
setHiddenIds(ids);
|
|
98
107
|
},
|
|
99
108
|
setOverflowTargetWidth(data) {
|
|
@@ -106,7 +115,7 @@ export const useOverflowListModel = createModelHook({
|
|
|
106
115
|
[data.id]: data.width,
|
|
107
116
|
};
|
|
108
117
|
setItemWidthCache(itemWidthCacheRef.current);
|
|
109
|
-
const ids = getHiddenIds(containerWidthRef.current, overflowTargetWidthRef.current, itemWidthCacheRef.current, state.selectedIds, config.items);
|
|
118
|
+
const ids = getHiddenIds(containerWidthRef.current, containerGap, overflowTargetWidthRef.current, itemWidthCacheRef.current, state.selectedIds, config.items);
|
|
110
119
|
setHiddenIds(ids);
|
|
111
120
|
},
|
|
112
121
|
removeItemWidth(data) {
|
|
@@ -114,7 +123,7 @@ export const useOverflowListModel = createModelHook({
|
|
|
114
123
|
delete newCache[data.id];
|
|
115
124
|
itemWidthCacheRef.current = newCache;
|
|
116
125
|
setItemWidthCache(itemWidthCacheRef.current);
|
|
117
|
-
const ids = getHiddenIds(containerWidthRef.current, overflowTargetWidthRef.current, itemWidthCacheRef.current, state.selectedIds !== 'all'
|
|
126
|
+
const ids = getHiddenIds(containerWidthRef.current, containerGap, overflowTargetWidthRef.current, itemWidthCacheRef.current, state.selectedIds !== 'all'
|
|
118
127
|
? state.selectedIds.filter(sId => data.id !== sId)
|
|
119
128
|
: state.selectedIds, config.items);
|
|
120
129
|
setHiddenIds(ids);
|
|
@@ -8,6 +8,7 @@ export declare const useOverflowListTarget: import("@workday/canvas-kit-react/co
|
|
|
8
8
|
hiddenIds: string[];
|
|
9
9
|
itemWidthCache: Record<string, number>;
|
|
10
10
|
containerWidth: number;
|
|
11
|
+
containerGap: number;
|
|
11
12
|
overflowTargetWidth: number;
|
|
12
13
|
selectedIds: string[] | "all";
|
|
13
14
|
unselectedIds: string[];
|
|
@@ -40,6 +41,9 @@ export declare const useOverflowListTarget: import("@workday/canvas-kit-react/co
|
|
|
40
41
|
setContainerWidth(data: {
|
|
41
42
|
width?: number | undefined;
|
|
42
43
|
}): void;
|
|
44
|
+
setContainerGap(data: {
|
|
45
|
+
size: number;
|
|
46
|
+
}): void;
|
|
43
47
|
setOverflowTargetWidth(data: {
|
|
44
48
|
width: number;
|
|
45
49
|
}): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOverflowListTarget.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useOverflowListTarget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B;;;GAGG;AACH,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"useOverflowListTarget.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useOverflowListTarget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BhC,CAAC"}
|
|
@@ -18,7 +18,7 @@ export const useComboboxMenuList = createElemPropsHook(useMenuModel)(model => {
|
|
|
18
18
|
};
|
|
19
19
|
});
|
|
20
20
|
const comboboxMenuListStencil = createStencil({
|
|
21
|
-
base: { name: "
|
|
21
|
+
base: { name: "a0j546", styles: "box-sizing:border-box;" },
|
|
22
22
|
extends: menuListStencil
|
|
23
23
|
}, "combobox-menu-list-04543a");
|
|
24
24
|
export const ComboboxMenuList = createSubcomponent('ul')({
|
|
@@ -17,7 +17,7 @@ export const accessibleHide = {
|
|
|
17
17
|
padding: 0,
|
|
18
18
|
border: 0,
|
|
19
19
|
};
|
|
20
|
-
export const accessibleHideStyles = createStyles({ name: "
|
|
20
|
+
export const accessibleHideStyles = createStyles({ name: "a0j52", styles: "clip:rect(1px, 1px, 1px, 1px);clip-path:polygon(0px 0px, 0px 0px, 0px 0px, 0px 0px);position:absolute;overflow:hidden;white-space:nowrap;height:1px;width:1px;margin:-1px;padding:0;border:0;" });
|
|
21
21
|
/**
|
|
22
22
|
* A convenient component wrapper to visually hide content, while still making it accessible to screen readers
|
|
23
23
|
*/
|