@workday/canvas-kit-react 9.0.0-alpha.411-next.13 → 9.0.0-alpha.413-next.15
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/useBaseListModel.tsx +24 -12
- package/collection/lib/useCursorListModel.tsx +102 -78
- package/dialog/lib/Dialog.tsx +66 -0
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts +104 -0
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts +3 -0
- package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarList.d.ts +3 -0
- package/dist/commonjs/action-bar/lib/ActionBarList.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.d.ts +4 -0
- package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts +55 -0
- package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs.d.ts +107 -0
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts +4 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.d.ts +3 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.d.ts +2 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.d.ts +49 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts +4 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts +55 -0
- package/dist/commonjs/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/ListBox.d.ts +39 -0
- package/dist/commonjs/collection/lib/ListBox.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useBaseListModel.d.ts +20 -10
- package/dist/commonjs/collection/lib/useBaseListModel.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useBaseListModel.js +21 -10
- package/dist/commonjs/collection/lib/useCursorListModel.d.ts +171 -10
- package/dist/commonjs/collection/lib/useCursorListModel.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useCursorListModel.js +97 -64
- package/dist/commonjs/collection/lib/useGridModel.d.ts +39 -0
- package/dist/commonjs/collection/lib/useGridModel.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListItemRegister.d.ts +1 -0
- package/dist/commonjs/collection/lib/useListItemRegister.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListItemRovingFocus.d.ts +1 -0
- package/dist/commonjs/collection/lib/useListItemRovingFocus.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListItemSelect.d.ts +1 -0
- package/dist/commonjs/collection/lib/useListItemSelect.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListModel.d.ts +39 -0
- package/dist/commonjs/collection/lib/useListModel.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListResetCursorOnBlur.d.ts +1 -0
- package/dist/commonjs/collection/lib/useListResetCursorOnBlur.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useOverflowListItemMeasure.d.ts +1 -0
- package/dist/commonjs/collection/lib/useOverflowListItemMeasure.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useOverflowListMeasure.d.ts +1 -0
- package/dist/commonjs/collection/lib/useOverflowListMeasure.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useOverflowListModel.d.ts +51 -0
- package/dist/commonjs/collection/lib/useOverflowListModel.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useOverflowListTarget.d.ts +1 -0
- package/dist/commonjs/collection/lib/useOverflowListTarget.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useSelectionListModel.d.ts +39 -0
- package/dist/commonjs/collection/lib/useSelectionListModel.d.ts.map +1 -1
- package/dist/commonjs/dialog/lib/Dialog.d.ts +65 -0
- package/dist/commonjs/dialog/lib/Dialog.d.ts.map +1 -1
- package/dist/commonjs/dialog/lib/Dialog.js +65 -0
- package/dist/commonjs/menu/lib/Menu.d.ts +48 -0
- package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuCard.d.ts +2 -0
- package/dist/commonjs/menu/lib/MenuCard.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuContextTarget.d.ts +3 -0
- package/dist/commonjs/menu/lib/MenuContextTarget.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuItem.d.ts +2 -0
- package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuList.d.ts +2 -0
- package/dist/commonjs/menu/lib/MenuList.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuPopper.d.ts +1 -0
- package/dist/commonjs/menu/lib/MenuPopper.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuTarget.d.ts +5 -0
- package/dist/commonjs/menu/lib/MenuTarget.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/useMenuModel.d.ts +45 -0
- package/dist/commonjs/menu/lib/useMenuModel.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/Popup.d.ts +1 -81
- package/dist/commonjs/popup/lib/Popup.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/Popup.js +1 -1
- package/dist/commonjs/tabs/lib/Tabs.d.ts +158 -7
- package/dist/commonjs/tabs/lib/Tabs.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsItem.d.ts +4 -0
- package/dist/commonjs/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsList.d.ts +4 -0
- package/dist/commonjs/tabs/lib/TabsList.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsMenuPopper.d.ts +1 -0
- package/dist/commonjs/tabs/lib/TabsMenuPopper.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsOverflowButton.d.ts +4 -0
- package/dist/commonjs/tabs/lib/TabsOverflowButton.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsPanel.d.ts +4 -0
- package/dist/commonjs/tabs/lib/TabsPanel.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsPanels.d.ts +2 -0
- package/dist/commonjs/tabs/lib/TabsPanels.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/useTabsModel.d.ts +143 -12
- package/dist/commonjs/tabs/lib/useTabsModel.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBar.d.ts +104 -0
- package/dist/es6/action-bar/lib/ActionBar.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBarItem.d.ts +3 -0
- package/dist/es6/action-bar/lib/ActionBarItem.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBarList.d.ts +3 -0
- package/dist/es6/action-bar/lib/ActionBarList.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBarOverflowButton.d.ts +4 -0
- package/dist/es6/action-bar/lib/ActionBarOverflowButton.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/useActionBarModel.d.ts +55 -0
- package/dist/es6/action-bar/lib/useActionBarModel.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs.d.ts +107 -0
- package/dist/es6/breadcrumbs/lib/Breadcrumbs.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts +4 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.d.ts +3 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsList.d.ts +2 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsList.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.d.ts +49 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts +4 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts +55 -0
- package/dist/es6/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts.map +1 -1
- package/dist/es6/collection/lib/ListBox.d.ts +39 -0
- package/dist/es6/collection/lib/ListBox.d.ts.map +1 -1
- package/dist/es6/collection/lib/useBaseListModel.d.ts +20 -10
- package/dist/es6/collection/lib/useBaseListModel.d.ts.map +1 -1
- package/dist/es6/collection/lib/useBaseListModel.js +22 -11
- package/dist/es6/collection/lib/useCursorListModel.d.ts +171 -10
- package/dist/es6/collection/lib/useCursorListModel.d.ts.map +1 -1
- package/dist/es6/collection/lib/useCursorListModel.js +97 -64
- package/dist/es6/collection/lib/useGridModel.d.ts +39 -0
- package/dist/es6/collection/lib/useGridModel.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListItemRegister.d.ts +1 -0
- package/dist/es6/collection/lib/useListItemRegister.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListItemRovingFocus.d.ts +1 -0
- package/dist/es6/collection/lib/useListItemRovingFocus.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListItemSelect.d.ts +1 -0
- package/dist/es6/collection/lib/useListItemSelect.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListModel.d.ts +39 -0
- package/dist/es6/collection/lib/useListModel.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListResetCursorOnBlur.d.ts +1 -0
- package/dist/es6/collection/lib/useListResetCursorOnBlur.d.ts.map +1 -1
- package/dist/es6/collection/lib/useOverflowListItemMeasure.d.ts +1 -0
- package/dist/es6/collection/lib/useOverflowListItemMeasure.d.ts.map +1 -1
- package/dist/es6/collection/lib/useOverflowListMeasure.d.ts +1 -0
- package/dist/es6/collection/lib/useOverflowListMeasure.d.ts.map +1 -1
- package/dist/es6/collection/lib/useOverflowListModel.d.ts +51 -0
- package/dist/es6/collection/lib/useOverflowListModel.d.ts.map +1 -1
- package/dist/es6/collection/lib/useOverflowListTarget.d.ts +1 -0
- package/dist/es6/collection/lib/useOverflowListTarget.d.ts.map +1 -1
- package/dist/es6/collection/lib/useSelectionListModel.d.ts +39 -0
- package/dist/es6/collection/lib/useSelectionListModel.d.ts.map +1 -1
- package/dist/es6/dialog/lib/Dialog.d.ts +65 -0
- package/dist/es6/dialog/lib/Dialog.d.ts.map +1 -1
- package/dist/es6/dialog/lib/Dialog.js +65 -0
- package/dist/es6/menu/lib/Menu.d.ts +48 -0
- package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuCard.d.ts +2 -0
- package/dist/es6/menu/lib/MenuCard.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuContextTarget.d.ts +3 -0
- package/dist/es6/menu/lib/MenuContextTarget.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuItem.d.ts +2 -0
- package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuList.d.ts +2 -0
- package/dist/es6/menu/lib/MenuList.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuPopper.d.ts +1 -0
- package/dist/es6/menu/lib/MenuPopper.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuTarget.d.ts +5 -0
- package/dist/es6/menu/lib/MenuTarget.d.ts.map +1 -1
- package/dist/es6/menu/lib/useMenuModel.d.ts +45 -0
- package/dist/es6/menu/lib/useMenuModel.d.ts.map +1 -1
- package/dist/es6/popup/lib/Popup.d.ts +1 -81
- package/dist/es6/popup/lib/Popup.d.ts.map +1 -1
- package/dist/es6/popup/lib/Popup.js +1 -1
- package/dist/es6/tabs/lib/Tabs.d.ts +158 -7
- package/dist/es6/tabs/lib/Tabs.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsItem.d.ts +4 -0
- package/dist/es6/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsList.d.ts +4 -0
- package/dist/es6/tabs/lib/TabsList.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsMenuPopper.d.ts +1 -0
- package/dist/es6/tabs/lib/TabsMenuPopper.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsOverflowButton.d.ts +4 -0
- package/dist/es6/tabs/lib/TabsOverflowButton.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsPanel.d.ts +4 -0
- package/dist/es6/tabs/lib/TabsPanel.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsPanels.d.ts +2 -0
- package/dist/es6/tabs/lib/TabsPanels.d.ts.map +1 -1
- package/dist/es6/tabs/lib/useTabsModel.d.ts +143 -12
- package/dist/es6/tabs/lib/useTabsModel.d.ts.map +1 -1
- package/package.json +3 -3
- package/popup/lib/Popup.tsx +1 -1
|
@@ -32,6 +32,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
32
32
|
initialCursorId: string;
|
|
33
33
|
columnCount: number;
|
|
34
34
|
navigation: import("./useCursorListModel").NavigationManager;
|
|
35
|
+
pageSize: number;
|
|
35
36
|
id: string;
|
|
36
37
|
getId: (item: any) => string;
|
|
37
38
|
getTextValue: (item: any) => string;
|
|
@@ -48,6 +49,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
48
49
|
unselectedIds: string[];
|
|
49
50
|
cursorId: string;
|
|
50
51
|
columnCount: number;
|
|
52
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
51
53
|
UNSTABLE_virtual: {
|
|
52
54
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
53
55
|
totalSize: number;
|
|
@@ -69,6 +71,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
69
71
|
unselectedIds: string[];
|
|
70
72
|
cursorId: string;
|
|
71
73
|
columnCount: number;
|
|
74
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
72
75
|
UNSTABLE_virtual: {
|
|
73
76
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
74
77
|
totalSize: number;
|
|
@@ -90,6 +93,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
90
93
|
unselectedIds: string[];
|
|
91
94
|
cursorId: string;
|
|
92
95
|
columnCount: number;
|
|
96
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
93
97
|
UNSTABLE_virtual: {
|
|
94
98
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
95
99
|
totalSize: number;
|
|
@@ -114,6 +118,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
114
118
|
unselectedIds: string[];
|
|
115
119
|
cursorId: string;
|
|
116
120
|
columnCount: number;
|
|
121
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
117
122
|
UNSTABLE_virtual: {
|
|
118
123
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
119
124
|
totalSize: number;
|
|
@@ -137,6 +142,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
137
142
|
unselectedIds: string[];
|
|
138
143
|
cursorId: string;
|
|
139
144
|
columnCount: number;
|
|
145
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
140
146
|
UNSTABLE_virtual: {
|
|
141
147
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
142
148
|
totalSize: number;
|
|
@@ -158,6 +164,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
158
164
|
unselectedIds: string[];
|
|
159
165
|
cursorId: string;
|
|
160
166
|
columnCount: number;
|
|
167
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
161
168
|
UNSTABLE_virtual: {
|
|
162
169
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
163
170
|
totalSize: number;
|
|
@@ -179,6 +186,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
179
186
|
unselectedIds: string[];
|
|
180
187
|
cursorId: string;
|
|
181
188
|
columnCount: number;
|
|
189
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
182
190
|
UNSTABLE_virtual: {
|
|
183
191
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
184
192
|
totalSize: number;
|
|
@@ -200,6 +208,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
200
208
|
unselectedIds: string[];
|
|
201
209
|
cursorId: string;
|
|
202
210
|
columnCount: number;
|
|
211
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
203
212
|
UNSTABLE_virtual: {
|
|
204
213
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
205
214
|
totalSize: number;
|
|
@@ -221,6 +230,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
221
230
|
unselectedIds: string[];
|
|
222
231
|
cursorId: string;
|
|
223
232
|
columnCount: number;
|
|
233
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
224
234
|
UNSTABLE_virtual: {
|
|
225
235
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
226
236
|
totalSize: number;
|
|
@@ -242,6 +252,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
242
252
|
unselectedIds: string[];
|
|
243
253
|
cursorId: string;
|
|
244
254
|
columnCount: number;
|
|
255
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
245
256
|
UNSTABLE_virtual: {
|
|
246
257
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
247
258
|
totalSize: number;
|
|
@@ -263,6 +274,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
263
274
|
unselectedIds: string[];
|
|
264
275
|
cursorId: string;
|
|
265
276
|
columnCount: number;
|
|
277
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
266
278
|
UNSTABLE_virtual: {
|
|
267
279
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
268
280
|
totalSize: number;
|
|
@@ -284,6 +296,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
284
296
|
unselectedIds: string[];
|
|
285
297
|
cursorId: string;
|
|
286
298
|
columnCount: number;
|
|
299
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
287
300
|
UNSTABLE_virtual: {
|
|
288
301
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
289
302
|
totalSize: number;
|
|
@@ -305,6 +318,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
305
318
|
unselectedIds: string[];
|
|
306
319
|
cursorId: string;
|
|
307
320
|
columnCount: number;
|
|
321
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
308
322
|
UNSTABLE_virtual: {
|
|
309
323
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
310
324
|
totalSize: number;
|
|
@@ -326,6 +340,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
326
340
|
unselectedIds: string[];
|
|
327
341
|
cursorId: string;
|
|
328
342
|
columnCount: number;
|
|
343
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
329
344
|
UNSTABLE_virtual: {
|
|
330
345
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
331
346
|
totalSize: number;
|
|
@@ -347,6 +362,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
347
362
|
unselectedIds: string[];
|
|
348
363
|
cursorId: string;
|
|
349
364
|
columnCount: number;
|
|
365
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
350
366
|
UNSTABLE_virtual: {
|
|
351
367
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
352
368
|
totalSize: number;
|
|
@@ -370,6 +386,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
370
386
|
unselectedIds: string[];
|
|
371
387
|
cursorId: string;
|
|
372
388
|
columnCount: number;
|
|
389
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
373
390
|
UNSTABLE_virtual: {
|
|
374
391
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
375
392
|
totalSize: number;
|
|
@@ -393,6 +410,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
393
410
|
unselectedIds: string[];
|
|
394
411
|
cursorId: string;
|
|
395
412
|
columnCount: number;
|
|
413
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
396
414
|
UNSTABLE_virtual: {
|
|
397
415
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
398
416
|
totalSize: number;
|
|
@@ -417,6 +435,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
417
435
|
unselectedIds: string[];
|
|
418
436
|
cursorId: string;
|
|
419
437
|
columnCount: number;
|
|
438
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
420
439
|
UNSTABLE_virtual: {
|
|
421
440
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
422
441
|
totalSize: number;
|
|
@@ -438,6 +457,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
438
457
|
unselectedIds: string[];
|
|
439
458
|
cursorId: string;
|
|
440
459
|
columnCount: number;
|
|
460
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
441
461
|
UNSTABLE_virtual: {
|
|
442
462
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
443
463
|
totalSize: number;
|
|
@@ -459,6 +479,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
459
479
|
unselectedIds: string[];
|
|
460
480
|
cursorId: string;
|
|
461
481
|
columnCount: number;
|
|
482
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
462
483
|
UNSTABLE_virtual: {
|
|
463
484
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
464
485
|
totalSize: number;
|
|
@@ -483,6 +504,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
483
504
|
unselectedIds: string[];
|
|
484
505
|
cursorId: string;
|
|
485
506
|
columnCount: number;
|
|
507
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
486
508
|
UNSTABLE_virtual: {
|
|
487
509
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
488
510
|
totalSize: number;
|
|
@@ -506,6 +528,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
506
528
|
unselectedIds: string[];
|
|
507
529
|
cursorId: string;
|
|
508
530
|
columnCount: number;
|
|
531
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
509
532
|
UNSTABLE_virtual: {
|
|
510
533
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
511
534
|
totalSize: number;
|
|
@@ -527,6 +550,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
527
550
|
unselectedIds: string[];
|
|
528
551
|
cursorId: string;
|
|
529
552
|
columnCount: number;
|
|
553
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
530
554
|
UNSTABLE_virtual: {
|
|
531
555
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
532
556
|
totalSize: number;
|
|
@@ -548,6 +572,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
548
572
|
unselectedIds: string[];
|
|
549
573
|
cursorId: string;
|
|
550
574
|
columnCount: number;
|
|
575
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
551
576
|
UNSTABLE_virtual: {
|
|
552
577
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
553
578
|
totalSize: number;
|
|
@@ -569,6 +594,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
569
594
|
unselectedIds: string[];
|
|
570
595
|
cursorId: string;
|
|
571
596
|
columnCount: number;
|
|
597
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
572
598
|
UNSTABLE_virtual: {
|
|
573
599
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
574
600
|
totalSize: number;
|
|
@@ -590,6 +616,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
590
616
|
unselectedIds: string[];
|
|
591
617
|
cursorId: string;
|
|
592
618
|
columnCount: number;
|
|
619
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
593
620
|
UNSTABLE_virtual: {
|
|
594
621
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
595
622
|
totalSize: number;
|
|
@@ -611,6 +638,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
611
638
|
unselectedIds: string[];
|
|
612
639
|
cursorId: string;
|
|
613
640
|
columnCount: number;
|
|
641
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
614
642
|
UNSTABLE_virtual: {
|
|
615
643
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
616
644
|
totalSize: number;
|
|
@@ -632,6 +660,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
632
660
|
unselectedIds: string[];
|
|
633
661
|
cursorId: string;
|
|
634
662
|
columnCount: number;
|
|
663
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
635
664
|
UNSTABLE_virtual: {
|
|
636
665
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
637
666
|
totalSize: number;
|
|
@@ -653,6 +682,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
653
682
|
unselectedIds: string[];
|
|
654
683
|
cursorId: string;
|
|
655
684
|
columnCount: number;
|
|
685
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
656
686
|
UNSTABLE_virtual: {
|
|
657
687
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
658
688
|
totalSize: number;
|
|
@@ -674,6 +704,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
674
704
|
unselectedIds: string[];
|
|
675
705
|
cursorId: string;
|
|
676
706
|
columnCount: number;
|
|
707
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
677
708
|
UNSTABLE_virtual: {
|
|
678
709
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
679
710
|
totalSize: number;
|
|
@@ -695,6 +726,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
695
726
|
unselectedIds: string[];
|
|
696
727
|
cursorId: string;
|
|
697
728
|
columnCount: number;
|
|
729
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
698
730
|
UNSTABLE_virtual: {
|
|
699
731
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
700
732
|
totalSize: number;
|
|
@@ -716,6 +748,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
716
748
|
unselectedIds: string[];
|
|
717
749
|
cursorId: string;
|
|
718
750
|
columnCount: number;
|
|
751
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
719
752
|
UNSTABLE_virtual: {
|
|
720
753
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
721
754
|
totalSize: number;
|
|
@@ -739,6 +772,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
739
772
|
unselectedIds: string[];
|
|
740
773
|
cursorId: string;
|
|
741
774
|
columnCount: number;
|
|
775
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
742
776
|
UNSTABLE_virtual: {
|
|
743
777
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
744
778
|
totalSize: number;
|
|
@@ -762,6 +796,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
762
796
|
unselectedIds: string[];
|
|
763
797
|
cursorId: string;
|
|
764
798
|
columnCount: number;
|
|
799
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
765
800
|
UNSTABLE_virtual: {
|
|
766
801
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
767
802
|
totalSize: number;
|
|
@@ -784,6 +819,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
784
819
|
unselectedIds: string[];
|
|
785
820
|
cursorId: string;
|
|
786
821
|
columnCount: number;
|
|
822
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
787
823
|
UNSTABLE_virtual: {
|
|
788
824
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
789
825
|
totalSize: number;
|
|
@@ -848,6 +884,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
848
884
|
initialCursorId: string;
|
|
849
885
|
columnCount: number;
|
|
850
886
|
navigation: import("./useCursorListModel").NavigationManager;
|
|
887
|
+
pageSize: number;
|
|
851
888
|
id: string;
|
|
852
889
|
getId: (item: any) => string;
|
|
853
890
|
getTextValue: (item: any) => string;
|
|
@@ -861,6 +898,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
861
898
|
unselectedIds: string[];
|
|
862
899
|
cursorId: string;
|
|
863
900
|
columnCount: number;
|
|
901
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
864
902
|
UNSTABLE_virtual: {
|
|
865
903
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
866
904
|
totalSize: number;
|
|
@@ -919,6 +957,7 @@ export declare const useSelectionListModel: (<TT_Special_Generic>(config?: (Part
|
|
|
919
957
|
unselectedIds: string[];
|
|
920
958
|
cursorId: string;
|
|
921
959
|
columnCount: number;
|
|
960
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
922
961
|
UNSTABLE_virtual: {
|
|
923
962
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
924
963
|
totalSize: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSelectionListModel.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useSelectionListModel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,oBAAY,WAAW,GAAG,KAAK,GAAG,MAAM,EAAE,CAAC;AAE3C,oBAAY,SAAS,GAAG;IACtB,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;CACrD;AAED,eAAO,MAAM,UAAU,OAAQ,MAAM,kCAAgC,SAAS,YAK7E,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,gBAIpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,gBAmBnC,CAAC;AAEF,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"useSelectionListModel.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useSelectionListModel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,oBAAY,WAAW,GAAG,KAAK,GAAG,MAAM,EAAE,CAAC;AAE3C,oBAAY,SAAS,GAAG;IACtB,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;CACrD;AAED,eAAO,MAAM,UAAU,OAAQ,MAAM,kCAAgC,SAAS,YAK7E,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,gBAIpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,gBAmBnC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;YAoBZ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QADxB,gDAAgD;qBACnC;YAAC,EAAE,EAAE,MAAM,CAAA;SAAC;QAKzB;;;WAGG;;QAIH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAfH,gDAAgD;iBACnC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAC;IAKzB;;;OAGG;;IAIH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAfH,gDAAgD;qBACnC;YAAC,EAAE,EAAE,MAAM,CAAA;SAAC;QAKzB;;;WAGG;;QAIH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOL,CAAC"}
|
|
@@ -5,6 +5,13 @@ export interface DialogProps {
|
|
|
5
5
|
*/
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* This component is the container component and does not render any semantic elements. It provides
|
|
10
|
+
* a React Context model for the `Dialog` subcomponents. If you manually pass a `model` to all
|
|
11
|
+
* subcomponents, this container component isn't needed. If you do not pass a `model`, the `Dialog`
|
|
12
|
+
* container component will build a default one using `useDialogModel`. `Dialog` is a composition of a
|
|
13
|
+
* {@link Popup} component and has a similar structure to `Popup`.
|
|
14
|
+
*/
|
|
8
15
|
export declare const Dialog: import("@workday/canvas-kit-react/common").ComponentM<DialogProps & Partial<{
|
|
9
16
|
returnFocusRef: React.RefObject<any> | undefined;
|
|
10
17
|
initialFocusRef: React.RefObject<any> | undefined;
|
|
@@ -88,6 +95,10 @@ export declare const Dialog: import("@workday/canvas-kit-react/common").Componen
|
|
|
88
95
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
89
96
|
};
|
|
90
97
|
}> & {
|
|
98
|
+
/**
|
|
99
|
+
* A `Dialog.Body` is a thin wrapper around {@link CardBody Card.Body} and doesn't actually take
|
|
100
|
+
* a model. It adds `body` styling and nothing else.
|
|
101
|
+
*/
|
|
91
102
|
Body: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("../..").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("../..").ColorStyleProps & import("../..").DepthStyleProps & import("../..").FlexItemStyleProps & import("../..").GridItemStyleProps & import("../..").LayoutStyleProps & import("../..").OtherStyleProps & import("../..").PositionStyleProps & import("../..").SpaceStyleProps & import("../..").TextStyleProps & React.HTMLAttributes<HTMLDivElement>, {
|
|
92
103
|
state: {
|
|
93
104
|
stackRef: React.RefObject<HTMLDivElement>;
|
|
@@ -106,6 +117,11 @@ export declare const Dialog: import("@workday/canvas-kit-react/common").Componen
|
|
|
106
117
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
107
118
|
};
|
|
108
119
|
}>;
|
|
120
|
+
/**
|
|
121
|
+
* A `Dialog.Card` is a wrapper around the {@link Card} component, but hooked up to a
|
|
122
|
+
* {@link DialogModel}. By default, this element has a `role=dialog`, `aria-labelledby` and an `id`.
|
|
123
|
+
* The behavior hook used is called {@link useDialogCard}.
|
|
124
|
+
*/
|
|
109
125
|
Card: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("../../popup/lib/PopupCard").PopupCardProps & import("@workday/canvas-kit-react/common").PropsWithModel<{
|
|
110
126
|
state: {
|
|
111
127
|
stackRef: React.RefObject<HTMLDivElement>;
|
|
@@ -141,6 +157,10 @@ export declare const Dialog: import("@workday/canvas-kit-react/common").Componen
|
|
|
141
157
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
142
158
|
};
|
|
143
159
|
}>;
|
|
160
|
+
/**
|
|
161
|
+
* A `Dialog.CloseIcon` is an icon button that is the `X` at the top of a dialog. It will hide a
|
|
162
|
+
* dialog when clicked. The behavior hook used is called {@link usePopupCloseButton}.
|
|
163
|
+
*/
|
|
144
164
|
CloseIcon: import("@workday/canvas-kit-react/common").ElementComponentM<"button", import("../../popup/lib/PopupCloseIcon").PopupCloseIconProps, {
|
|
145
165
|
state: {
|
|
146
166
|
stackRef: React.RefObject<HTMLDivElement>;
|
|
@@ -159,6 +179,35 @@ export declare const Dialog: import("@workday/canvas-kit-react/common").Componen
|
|
|
159
179
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
160
180
|
};
|
|
161
181
|
}>;
|
|
182
|
+
/**
|
|
183
|
+
* A `Dialog.Target` is any element that is meant to show the Dialog. The default component
|
|
184
|
+
* rendered by this component is a {@link SecondaryButton} element. You can override this by
|
|
185
|
+
* passing the desired component via `as`. Many examples above use `as={DeleteButton}`. If you
|
|
186
|
+
* want to render a {@link TertiaryButton} instead, use `as={TertiaryButton}`. The behavior hook
|
|
187
|
+
* used is called {@link usePopupTarget}.
|
|
188
|
+
*
|
|
189
|
+
* ```tsx
|
|
190
|
+
* const model = useDialogModel();
|
|
191
|
+
*
|
|
192
|
+
* // using this component
|
|
193
|
+
* <Dialog.Target>Show Dialog</Dialog.Target>
|
|
194
|
+
*
|
|
195
|
+
* // using props instead
|
|
196
|
+
* const dialogTargetButtonProps = useDialogTarget(model);
|
|
197
|
+
* <SecondaryButton {...dialogTargetButtonProps}>Show Dialog</SecondaryButton>
|
|
198
|
+
* ```
|
|
199
|
+
*
|
|
200
|
+
* `Dialog.Target` doesn't provide any styling by default. All styling comes from the default
|
|
201
|
+
* component used, which is {@link SecondaryButton}. If you don't want any styling, you can do
|
|
202
|
+
* the following:
|
|
203
|
+
*
|
|
204
|
+
* ```tsx
|
|
205
|
+
* <Dialog.Target as="button">Open</Dialog.Target>
|
|
206
|
+
* ```
|
|
207
|
+
*
|
|
208
|
+
* To add your own styling, you could either add a `css` prop, or make a styled button and pass
|
|
209
|
+
* that styled component via the `as` prop.
|
|
210
|
+
*/
|
|
162
211
|
Target: import("@workday/canvas-kit-react/common").ElementComponentM<import("@workday/canvas-kit-react/common").ElementComponent<"button", import("../..").SecondaryButtonProps>, {}, {
|
|
163
212
|
state: {
|
|
164
213
|
stackRef: React.RefObject<HTMLDivElement>;
|
|
@@ -177,6 +226,12 @@ export declare const Dialog: import("@workday/canvas-kit-react/common").Componen
|
|
|
177
226
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
178
227
|
};
|
|
179
228
|
}>;
|
|
229
|
+
/**
|
|
230
|
+
* A `Dialog.Heading` is a wrapper around {@link CardHeading Card.Heading} that connect the
|
|
231
|
+
* heading to a {@link DialogModel}. It will add an `id` to the element that match the
|
|
232
|
+
* `aria-labelledby` that is applied to the `Dialog.Card` element for accessibility. The behavior
|
|
233
|
+
* hook used is called {@link usePopupHeading}.
|
|
234
|
+
*/
|
|
180
235
|
Heading: import("@workday/canvas-kit-react/common").ElementComponentM<"h2", import("../../popup/lib/PopupHeading").PopupHeadingProps, {
|
|
181
236
|
state: {
|
|
182
237
|
stackRef: React.RefObject<HTMLDivElement>;
|
|
@@ -195,6 +250,10 @@ export declare const Dialog: import("@workday/canvas-kit-react/common").Componen
|
|
|
195
250
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
196
251
|
};
|
|
197
252
|
}>;
|
|
253
|
+
/**
|
|
254
|
+
* A `Dialog.Popper` is a wrapper around {@link PopupPopper Popup.Popper}. The behavior
|
|
255
|
+
* hook used is called {@link useDialogPopper}.
|
|
256
|
+
*/
|
|
198
257
|
Popper: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("../../popup/lib/PopupPopper").PopupPopperProps & import("@workday/canvas-kit-react/common").PropsWithModel<{
|
|
199
258
|
state: {
|
|
200
259
|
stackRef: React.RefObject<HTMLDivElement>;
|
|
@@ -230,6 +289,12 @@ export declare const Dialog: import("@workday/canvas-kit-react/common").Componen
|
|
|
230
289
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
231
290
|
};
|
|
232
291
|
}>;
|
|
292
|
+
/**
|
|
293
|
+
* A `Dialog.CloseButton` is a button that will hide a dialog. By default, this is a
|
|
294
|
+
* {@link SecondaryButton} component, but `as` can be used to render any button element (i.e
|
|
295
|
+
* {@link DeleteButton} or {@link PrimaryButton}). The behavior hook used is called
|
|
296
|
+
* {@link usePopupCloseButton}.
|
|
297
|
+
*/
|
|
233
298
|
CloseButton: import("@workday/canvas-kit-react/common").ElementComponentM<import("@workday/canvas-kit-react/common").ElementComponent<"button", import("../..").SecondaryButtonProps>, import("../../popup/lib/PopupCloseButton").PopupCloseButtonProps, {
|
|
234
299
|
state: {
|
|
235
300
|
stackRef: React.RefObject<HTMLDivElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../dialog/lib/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../dialog/lib/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIf;;;OAGG;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;;;;;;;;;;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGH;;;;;OAKG;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
@@ -4,16 +4,81 @@ import { Popup } from '@workday/canvas-kit-react/popup';
|
|
|
4
4
|
import { DialogPopper } from './DialogPopper';
|
|
5
5
|
import { DialogCard } from './DialogCard';
|
|
6
6
|
import { useDialogModel } from './hooks';
|
|
7
|
+
/**
|
|
8
|
+
* This component is the container component and does not render any semantic elements. It provides
|
|
9
|
+
* a React Context model for the `Dialog` subcomponents. If you manually pass a `model` to all
|
|
10
|
+
* subcomponents, this container component isn't needed. If you do not pass a `model`, the `Dialog`
|
|
11
|
+
* container component will build a default one using `useDialogModel`. `Dialog` is a composition of a
|
|
12
|
+
* {@link Popup} component and has a similar structure to `Popup`.
|
|
13
|
+
*/
|
|
7
14
|
export const Dialog = createContainer()({
|
|
8
15
|
displayName: 'Dialog',
|
|
9
16
|
modelHook: useDialogModel,
|
|
10
17
|
subComponents: {
|
|
18
|
+
/**
|
|
19
|
+
* A `Dialog.Body` is a thin wrapper around {@link CardBody Card.Body} and doesn't actually take
|
|
20
|
+
* a model. It adds `body` styling and nothing else.
|
|
21
|
+
*/
|
|
11
22
|
Body: Popup.Body,
|
|
23
|
+
/**
|
|
24
|
+
* A `Dialog.Card` is a wrapper around the {@link Card} component, but hooked up to a
|
|
25
|
+
* {@link DialogModel}. By default, this element has a `role=dialog`, `aria-labelledby` and an `id`.
|
|
26
|
+
* The behavior hook used is called {@link useDialogCard}.
|
|
27
|
+
*/
|
|
12
28
|
Card: DialogCard,
|
|
29
|
+
/**
|
|
30
|
+
* A `Dialog.CloseIcon` is an icon button that is the `X` at the top of a dialog. It will hide a
|
|
31
|
+
* dialog when clicked. The behavior hook used is called {@link usePopupCloseButton}.
|
|
32
|
+
*/
|
|
13
33
|
CloseIcon: Popup.CloseIcon,
|
|
34
|
+
/**
|
|
35
|
+
* A `Dialog.Target` is any element that is meant to show the Dialog. The default component
|
|
36
|
+
* rendered by this component is a {@link SecondaryButton} element. You can override this by
|
|
37
|
+
* passing the desired component via `as`. Many examples above use `as={DeleteButton}`. If you
|
|
38
|
+
* want to render a {@link TertiaryButton} instead, use `as={TertiaryButton}`. The behavior hook
|
|
39
|
+
* used is called {@link usePopupTarget}.
|
|
40
|
+
*
|
|
41
|
+
* ```tsx
|
|
42
|
+
* const model = useDialogModel();
|
|
43
|
+
*
|
|
44
|
+
* // using this component
|
|
45
|
+
* <Dialog.Target>Show Dialog</Dialog.Target>
|
|
46
|
+
*
|
|
47
|
+
* // using props instead
|
|
48
|
+
* const dialogTargetButtonProps = useDialogTarget(model);
|
|
49
|
+
* <SecondaryButton {...dialogTargetButtonProps}>Show Dialog</SecondaryButton>
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* `Dialog.Target` doesn't provide any styling by default. All styling comes from the default
|
|
53
|
+
* component used, which is {@link SecondaryButton}. If you don't want any styling, you can do
|
|
54
|
+
* the following:
|
|
55
|
+
*
|
|
56
|
+
* ```tsx
|
|
57
|
+
* <Dialog.Target as="button">Open</Dialog.Target>
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* To add your own styling, you could either add a `css` prop, or make a styled button and pass
|
|
61
|
+
* that styled component via the `as` prop.
|
|
62
|
+
*/
|
|
14
63
|
Target: Popup.Target,
|
|
64
|
+
/**
|
|
65
|
+
* A `Dialog.Heading` is a wrapper around {@link CardHeading Card.Heading} that connect the
|
|
66
|
+
* heading to a {@link DialogModel}. It will add an `id` to the element that match the
|
|
67
|
+
* `aria-labelledby` that is applied to the `Dialog.Card` element for accessibility. The behavior
|
|
68
|
+
* hook used is called {@link usePopupHeading}.
|
|
69
|
+
*/
|
|
15
70
|
Heading: Popup.Heading,
|
|
71
|
+
/**
|
|
72
|
+
* A `Dialog.Popper` is a wrapper around {@link PopupPopper Popup.Popper}. The behavior
|
|
73
|
+
* hook used is called {@link useDialogPopper}.
|
|
74
|
+
*/
|
|
16
75
|
Popper: DialogPopper,
|
|
76
|
+
/**
|
|
77
|
+
* A `Dialog.CloseButton` is a button that will hide a dialog. By default, this is a
|
|
78
|
+
* {@link SecondaryButton} component, but `as` can be used to render any button element (i.e
|
|
79
|
+
* {@link DeleteButton} or {@link PrimaryButton}). The behavior hook used is called
|
|
80
|
+
* {@link usePopupCloseButton}.
|
|
81
|
+
*/
|
|
17
82
|
CloseButton: Popup.CloseButton,
|
|
18
83
|
},
|
|
19
84
|
})(({ children }) => {
|