@workday/canvas-kit-preview-react 9.0.0-alpha.338-next.5 → 9.0.0-alpha.348-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/form-field/lib/FormField.d.ts +2 -2
- package/dist/commonjs/form-field/lib/FormFieldHint.d.ts +1 -1
- package/dist/commonjs/form-field/lib/FormFieldInput.d.ts +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts +2 -12
- package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.js +1 -3
- package/dist/commonjs/menu/lib/Menu.d.ts +12 -5
- package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/Menu.js +14 -5
- package/dist/commonjs/menu/lib/MenuItem.d.ts +15 -5
- package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuItem.js +18 -6
- package/dist/commonjs/pill/lib/Pill.d.ts +103 -5
- package/dist/commonjs/pill/lib/Pill.d.ts.map +1 -1
- package/dist/commonjs/pill/lib/Pill.js +101 -2
- package/dist/commonjs/segmented-control/index.d.ts +2 -0
- package/dist/commonjs/segmented-control/index.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/index.js +4 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +74 -38
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControl.js +36 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts +1 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts +64 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.js +3 -3
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +2 -2
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +39 -39
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.js +2 -1
- package/dist/commonjs/select/lib/Select.js +2 -0
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts +13 -26
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/commonjs/side-panel/lib/SidePanel.js +73 -96
- package/dist/commonjs/side-panel/lib/SidePanelToggleButton.d.ts +17 -0
- package/dist/commonjs/side-panel/lib/SidePanelToggleButton.d.ts.map +1 -0
- package/dist/commonjs/side-panel/lib/SidePanelToggleButton.js +88 -0
- package/dist/commonjs/side-panel/lib/hooks.d.ts +20 -0
- package/dist/commonjs/side-panel/lib/hooks.d.ts.map +1 -1
- package/dist/commonjs/side-panel/lib/hooks.js +20 -1
- package/dist/commonjs/status-indicator/index.d.ts +2 -0
- package/dist/commonjs/status-indicator/index.d.ts.map +1 -1
- package/dist/commonjs/status-indicator/index.js +4 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts +28 -2
- package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts.map +1 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicator.js +27 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts +13 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.js +3 -3
- package/dist/commonjs/text-area/lib/TextArea.d.ts +1 -1
- package/dist/commonjs/text-area/lib/TextArea.d.ts.map +1 -1
- package/dist/commonjs/text-area/lib/TextArea.js +1 -2
- package/dist/commonjs/text-input/lib/TextInput.d.ts +2 -2
- package/dist/commonjs/text-input/lib/TextInput.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/TextInput.js +1 -2
- package/dist/commonjs/text-input/lib/TextInputField.js +1 -1
- package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +1 -1
- package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +1 -0
- package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/hooks/useTextInputModel.js +1 -0
- package/dist/es6/form-field/lib/FormField.d.ts +2 -2
- package/dist/es6/form-field/lib/FormFieldHint.d.ts +1 -1
- package/dist/es6/form-field/lib/FormFieldInput.d.ts +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts +2 -12
- package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldModel.js +1 -3
- package/dist/es6/menu/lib/Menu.d.ts +12 -5
- package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
- package/dist/es6/menu/lib/Menu.js +14 -5
- package/dist/es6/menu/lib/MenuItem.d.ts +15 -5
- package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuItem.js +18 -6
- package/dist/es6/pill/lib/Pill.d.ts +103 -5
- package/dist/es6/pill/lib/Pill.d.ts.map +1 -1
- package/dist/es6/pill/lib/Pill.js +101 -2
- package/dist/es6/segmented-control/index.d.ts +2 -0
- package/dist/es6/segmented-control/index.d.ts.map +1 -1
- package/dist/es6/segmented-control/index.js +2 -0
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts +74 -38
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
- package/dist/es6/segmented-control/lib/SegmentedControl.js +36 -0
- package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts +1 -1
- package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts +64 -1
- package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts.map +1 -1
- package/dist/es6/segmented-control/lib/SegmentedControlList.js +1 -1
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +2 -2
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +39 -39
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.js +2 -1
- package/dist/es6/select/lib/Select.js +2 -0
- package/dist/es6/side-panel/lib/SidePanel.d.ts +13 -26
- package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/es6/side-panel/lib/SidePanel.js +75 -97
- package/dist/es6/side-panel/lib/SidePanelToggleButton.d.ts +17 -0
- package/dist/es6/side-panel/lib/SidePanelToggleButton.d.ts.map +1 -0
- package/dist/es6/side-panel/lib/SidePanelToggleButton.js +66 -0
- package/dist/es6/side-panel/lib/hooks.d.ts +20 -0
- package/dist/es6/side-panel/lib/hooks.d.ts.map +1 -1
- package/dist/es6/side-panel/lib/hooks.js +19 -0
- package/dist/es6/status-indicator/index.d.ts +2 -0
- package/dist/es6/status-indicator/index.d.ts.map +1 -1
- package/dist/es6/status-indicator/index.js +2 -0
- package/dist/es6/status-indicator/lib/StatusIndicator.d.ts +28 -2
- package/dist/es6/status-indicator/lib/StatusIndicator.d.ts.map +1 -1
- package/dist/es6/status-indicator/lib/StatusIndicator.js +27 -1
- package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts +13 -0
- package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -1
- package/dist/es6/status-indicator/lib/StatusIndicatorIcon.js +1 -1
- package/dist/es6/text-area/lib/TextArea.d.ts +1 -1
- package/dist/es6/text-area/lib/TextArea.d.ts.map +1 -1
- package/dist/es6/text-area/lib/TextArea.js +2 -3
- package/dist/es6/text-input/lib/TextInput.d.ts +2 -2
- package/dist/es6/text-input/lib/TextInput.d.ts.map +1 -1
- package/dist/es6/text-input/lib/TextInput.js +2 -3
- package/dist/es6/text-input/lib/TextInputField.js +3 -3
- package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +1 -1
- package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +1 -0
- package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -1
- package/dist/es6/text-input/lib/hooks/useTextInputModel.js +1 -0
- package/form-field/lib/hooks/useFormFieldModel.tsx +1 -3
- package/menu/lib/Menu.tsx +12 -5
- package/menu/lib/MenuItem.tsx +15 -5
- package/package.json +4 -4
- package/pill/lib/Pill.tsx +101 -2
- package/segmented-control/index.ts +2 -0
- package/segmented-control/lib/SegmentedControl.tsx +36 -0
- package/segmented-control/lib/SegmentedControlList.tsx +1 -1
- package/side-panel/lib/SidePanel.tsx +119 -169
- package/side-panel/lib/SidePanelToggleButton.tsx +78 -0
- package/side-panel/lib/hooks.ts +20 -0
- package/status-indicator/index.ts +2 -0
- package/status-indicator/lib/StatusIndicator.tsx +27 -1
- package/status-indicator/lib/StatusIndicatorIcon.tsx +1 -1
- package/text-area/lib/TextArea.tsx +6 -3
- package/text-input/lib/TextInput.tsx +6 -3
- package/text-input/lib/TextInputField.tsx +3 -3
- package/text-input/lib/hooks/useTextInputModel.ts +1 -0
- package/dist/commonjs/text-area/lib/hooks/index.d.ts +0 -2
- package/dist/commonjs/text-area/lib/hooks/index.d.ts.map +0 -1
- package/dist/commonjs/text-area/lib/hooks/index.js +0 -13
- package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts +0 -28
- package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts.map +0 -1
- package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.js +0 -5
- package/dist/es6/text-area/lib/hooks/index.d.ts +0 -2
- package/dist/es6/text-area/lib/hooks/index.d.ts.map +0 -1
- package/dist/es6/text-area/lib/hooks/index.js +0 -1
- package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts +0 -28
- package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts.map +0 -1
- package/dist/es6/text-area/lib/hooks/useTextAreaModel.js +0 -2
- package/text-area/lib/hooks/index.ts +0 -1
- package/text-area/lib/hooks/useTextAreaModel.ts +0 -3
|
@@ -2,12 +2,32 @@ import React from 'react';
|
|
|
2
2
|
export interface SegmentedControlProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* `SegmentedControl` is a container component that is responsible for creating a
|
|
7
|
+
* {@link SegmentedControlModel} and sharing it with its subcomponents using React context. It does
|
|
8
|
+
* not represent a real element.
|
|
9
|
+
*
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <SegmentedControl items={[]}>{Child components}</SegmentedControl>
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* Alternatively, you may pass in a model using the [hoisted model
|
|
15
|
+
* pattern](/getting-started/for-developers/resources/compound-components/#configuring-a-model).
|
|
16
|
+
*
|
|
17
|
+
* ```tsx
|
|
18
|
+
* const model = useSegmentedControlModel({
|
|
19
|
+
* items: [],
|
|
20
|
+
* });
|
|
21
|
+
*
|
|
22
|
+
* <SegmentedControl model={model}>{Child components}</SegmentedControl>;
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
5
25
|
export declare const SegmentedControl: import("@workday/canvas-kit-react/common").ComponentM<SegmentedControlProps & Partial<{
|
|
6
26
|
id: string;
|
|
7
27
|
initialValue: string;
|
|
8
28
|
disabled: boolean;
|
|
9
29
|
size: "small" | "medium" | "large";
|
|
10
|
-
orientation: "
|
|
30
|
+
orientation: import("@workday/canvas-kit-react/collection/lib/useBaseListModel").Orientation;
|
|
11
31
|
initialSelectedIds: import("@workday/canvas-kit-react/collection/lib/useSelectionListModel").SelectedIds;
|
|
12
32
|
initialUnselectedIds: string[];
|
|
13
33
|
selection: import("@workday/canvas-kit-react/collection/lib/useSelectionListModel").SelectionManager;
|
|
@@ -26,7 +46,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
26
46
|
}, prevState: {
|
|
27
47
|
disabled: boolean;
|
|
28
48
|
size: "small" | "medium" | "large";
|
|
29
|
-
selectedIds:
|
|
49
|
+
selectedIds: string[] | "all";
|
|
30
50
|
unselectedIds: string[];
|
|
31
51
|
cursorId: string;
|
|
32
52
|
columnCount: number;
|
|
@@ -49,7 +69,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
49
69
|
onSelectAll?: ((data: undefined, prevState: {
|
|
50
70
|
disabled: boolean;
|
|
51
71
|
size: "small" | "medium" | "large";
|
|
52
|
-
selectedIds:
|
|
72
|
+
selectedIds: string[] | "all";
|
|
53
73
|
unselectedIds: string[];
|
|
54
74
|
cursorId: string;
|
|
55
75
|
columnCount: number;
|
|
@@ -72,7 +92,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
72
92
|
onUnselectAll?: ((data: undefined, prevState: {
|
|
73
93
|
disabled: boolean;
|
|
74
94
|
size: "small" | "medium" | "large";
|
|
75
|
-
selectedIds:
|
|
95
|
+
selectedIds: string[] | "all";
|
|
76
96
|
unselectedIds: string[];
|
|
77
97
|
cursorId: string;
|
|
78
98
|
columnCount: number;
|
|
@@ -98,7 +118,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
98
118
|
}, prevState: {
|
|
99
119
|
disabled: boolean;
|
|
100
120
|
size: "small" | "medium" | "large";
|
|
101
|
-
selectedIds:
|
|
121
|
+
selectedIds: string[] | "all";
|
|
102
122
|
unselectedIds: string[];
|
|
103
123
|
cursorId: string;
|
|
104
124
|
columnCount: number;
|
|
@@ -123,7 +143,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
123
143
|
}, prevState: {
|
|
124
144
|
disabled: boolean;
|
|
125
145
|
size: "small" | "medium" | "large";
|
|
126
|
-
selectedIds:
|
|
146
|
+
selectedIds: string[] | "all";
|
|
127
147
|
unselectedIds: string[];
|
|
128
148
|
cursorId: string;
|
|
129
149
|
columnCount: number;
|
|
@@ -146,7 +166,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
146
166
|
onGoToNext?: ((data: undefined, prevState: {
|
|
147
167
|
disabled: boolean;
|
|
148
168
|
size: "small" | "medium" | "large";
|
|
149
|
-
selectedIds:
|
|
169
|
+
selectedIds: string[] | "all";
|
|
150
170
|
unselectedIds: string[];
|
|
151
171
|
cursorId: string;
|
|
152
172
|
columnCount: number;
|
|
@@ -169,7 +189,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
169
189
|
onGoToPrevious?: ((data: undefined, prevState: {
|
|
170
190
|
disabled: boolean;
|
|
171
191
|
size: "small" | "medium" | "large";
|
|
172
|
-
selectedIds:
|
|
192
|
+
selectedIds: string[] | "all";
|
|
173
193
|
unselectedIds: string[];
|
|
174
194
|
cursorId: string;
|
|
175
195
|
columnCount: number;
|
|
@@ -192,7 +212,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
192
212
|
onGoToPreviousRow?: ((data: undefined, prevState: {
|
|
193
213
|
disabled: boolean;
|
|
194
214
|
size: "small" | "medium" | "large";
|
|
195
|
-
selectedIds:
|
|
215
|
+
selectedIds: string[] | "all";
|
|
196
216
|
unselectedIds: string[];
|
|
197
217
|
cursorId: string;
|
|
198
218
|
columnCount: number;
|
|
@@ -215,7 +235,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
215
235
|
onGoToNextRow?: ((data: undefined, prevState: {
|
|
216
236
|
disabled: boolean;
|
|
217
237
|
size: "small" | "medium" | "large";
|
|
218
|
-
selectedIds:
|
|
238
|
+
selectedIds: string[] | "all";
|
|
219
239
|
unselectedIds: string[];
|
|
220
240
|
cursorId: string;
|
|
221
241
|
columnCount: number;
|
|
@@ -238,7 +258,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
238
258
|
onGoToFirst?: ((data: undefined, prevState: {
|
|
239
259
|
disabled: boolean;
|
|
240
260
|
size: "small" | "medium" | "large";
|
|
241
|
-
selectedIds:
|
|
261
|
+
selectedIds: string[] | "all";
|
|
242
262
|
unselectedIds: string[];
|
|
243
263
|
cursorId: string;
|
|
244
264
|
columnCount: number;
|
|
@@ -261,7 +281,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
261
281
|
onGoToLast?: ((data: undefined, prevState: {
|
|
262
282
|
disabled: boolean;
|
|
263
283
|
size: "small" | "medium" | "large";
|
|
264
|
-
selectedIds:
|
|
284
|
+
selectedIds: string[] | "all";
|
|
265
285
|
unselectedIds: string[];
|
|
266
286
|
cursorId: string;
|
|
267
287
|
columnCount: number;
|
|
@@ -284,7 +304,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
284
304
|
onGoToFirstOfRow?: ((data: undefined, prevState: {
|
|
285
305
|
disabled: boolean;
|
|
286
306
|
size: "small" | "medium" | "large";
|
|
287
|
-
selectedIds:
|
|
307
|
+
selectedIds: string[] | "all";
|
|
288
308
|
unselectedIds: string[];
|
|
289
309
|
cursorId: string;
|
|
290
310
|
columnCount: number;
|
|
@@ -307,7 +327,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
307
327
|
onGoToLastOfRow?: ((data: undefined, prevState: {
|
|
308
328
|
disabled: boolean;
|
|
309
329
|
size: "small" | "medium" | "large";
|
|
310
|
-
selectedIds:
|
|
330
|
+
selectedIds: string[] | "all";
|
|
311
331
|
unselectedIds: string[];
|
|
312
332
|
cursorId: string;
|
|
313
333
|
columnCount: number;
|
|
@@ -330,7 +350,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
330
350
|
onGoToNextPage?: ((data: undefined, prevState: {
|
|
331
351
|
disabled: boolean;
|
|
332
352
|
size: "small" | "medium" | "large";
|
|
333
|
-
selectedIds:
|
|
353
|
+
selectedIds: string[] | "all";
|
|
334
354
|
unselectedIds: string[];
|
|
335
355
|
cursorId: string;
|
|
336
356
|
columnCount: number;
|
|
@@ -353,7 +373,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
353
373
|
onGoToPreviousPage?: ((data: undefined, prevState: {
|
|
354
374
|
disabled: boolean;
|
|
355
375
|
size: "small" | "medium" | "large";
|
|
356
|
-
selectedIds:
|
|
376
|
+
selectedIds: string[] | "all";
|
|
357
377
|
unselectedIds: string[];
|
|
358
378
|
cursorId: string;
|
|
359
379
|
columnCount: number;
|
|
@@ -378,7 +398,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
378
398
|
}, prevState: {
|
|
379
399
|
disabled: boolean;
|
|
380
400
|
size: "small" | "medium" | "large";
|
|
381
|
-
selectedIds:
|
|
401
|
+
selectedIds: string[] | "all";
|
|
382
402
|
unselectedIds: string[];
|
|
383
403
|
cursorId: string;
|
|
384
404
|
columnCount: number;
|
|
@@ -403,7 +423,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
403
423
|
}, prevState: {
|
|
404
424
|
disabled: boolean;
|
|
405
425
|
size: "small" | "medium" | "large";
|
|
406
|
-
selectedIds:
|
|
426
|
+
selectedIds: string[] | "all";
|
|
407
427
|
unselectedIds: string[];
|
|
408
428
|
cursorId: string;
|
|
409
429
|
columnCount: number;
|
|
@@ -429,7 +449,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
429
449
|
}, state: {
|
|
430
450
|
disabled: boolean;
|
|
431
451
|
size: "small" | "medium" | "large";
|
|
432
|
-
selectedIds:
|
|
452
|
+
selectedIds: string[] | "all";
|
|
433
453
|
unselectedIds: string[];
|
|
434
454
|
cursorId: string;
|
|
435
455
|
columnCount: number;
|
|
@@ -452,7 +472,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
452
472
|
shouldSelectAll?: ((data: undefined, state: {
|
|
453
473
|
disabled: boolean;
|
|
454
474
|
size: "small" | "medium" | "large";
|
|
455
|
-
selectedIds:
|
|
475
|
+
selectedIds: string[] | "all";
|
|
456
476
|
unselectedIds: string[];
|
|
457
477
|
cursorId: string;
|
|
458
478
|
columnCount: number;
|
|
@@ -475,7 +495,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
475
495
|
shouldUnselectAll?: ((data: undefined, state: {
|
|
476
496
|
disabled: boolean;
|
|
477
497
|
size: "small" | "medium" | "large";
|
|
478
|
-
selectedIds:
|
|
498
|
+
selectedIds: string[] | "all";
|
|
479
499
|
unselectedIds: string[];
|
|
480
500
|
cursorId: string;
|
|
481
501
|
columnCount: number;
|
|
@@ -501,7 +521,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
501
521
|
}, state: {
|
|
502
522
|
disabled: boolean;
|
|
503
523
|
size: "small" | "medium" | "large";
|
|
504
|
-
selectedIds:
|
|
524
|
+
selectedIds: string[] | "all";
|
|
505
525
|
unselectedIds: string[];
|
|
506
526
|
cursorId: string;
|
|
507
527
|
columnCount: number;
|
|
@@ -526,7 +546,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
526
546
|
}, state: {
|
|
527
547
|
disabled: boolean;
|
|
528
548
|
size: "small" | "medium" | "large";
|
|
529
|
-
selectedIds:
|
|
549
|
+
selectedIds: string[] | "all";
|
|
530
550
|
unselectedIds: string[];
|
|
531
551
|
cursorId: string;
|
|
532
552
|
columnCount: number;
|
|
@@ -549,7 +569,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
549
569
|
shouldGoToNext?: ((data: undefined, state: {
|
|
550
570
|
disabled: boolean;
|
|
551
571
|
size: "small" | "medium" | "large";
|
|
552
|
-
selectedIds:
|
|
572
|
+
selectedIds: string[] | "all";
|
|
553
573
|
unselectedIds: string[];
|
|
554
574
|
cursorId: string;
|
|
555
575
|
columnCount: number;
|
|
@@ -572,7 +592,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
572
592
|
shouldGoToPrevious?: ((data: undefined, state: {
|
|
573
593
|
disabled: boolean;
|
|
574
594
|
size: "small" | "medium" | "large";
|
|
575
|
-
selectedIds:
|
|
595
|
+
selectedIds: string[] | "all";
|
|
576
596
|
unselectedIds: string[];
|
|
577
597
|
cursorId: string;
|
|
578
598
|
columnCount: number;
|
|
@@ -595,7 +615,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
595
615
|
shouldGoToPreviousRow?: ((data: undefined, state: {
|
|
596
616
|
disabled: boolean;
|
|
597
617
|
size: "small" | "medium" | "large";
|
|
598
|
-
selectedIds:
|
|
618
|
+
selectedIds: string[] | "all";
|
|
599
619
|
unselectedIds: string[];
|
|
600
620
|
cursorId: string;
|
|
601
621
|
columnCount: number;
|
|
@@ -618,7 +638,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
618
638
|
shouldGoToNextRow?: ((data: undefined, state: {
|
|
619
639
|
disabled: boolean;
|
|
620
640
|
size: "small" | "medium" | "large";
|
|
621
|
-
selectedIds:
|
|
641
|
+
selectedIds: string[] | "all";
|
|
622
642
|
unselectedIds: string[];
|
|
623
643
|
cursorId: string;
|
|
624
644
|
columnCount: number;
|
|
@@ -641,7 +661,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
641
661
|
shouldGoToFirst?: ((data: undefined, state: {
|
|
642
662
|
disabled: boolean;
|
|
643
663
|
size: "small" | "medium" | "large";
|
|
644
|
-
selectedIds:
|
|
664
|
+
selectedIds: string[] | "all";
|
|
645
665
|
unselectedIds: string[];
|
|
646
666
|
cursorId: string;
|
|
647
667
|
columnCount: number;
|
|
@@ -664,7 +684,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
664
684
|
shouldGoToLast?: ((data: undefined, state: {
|
|
665
685
|
disabled: boolean;
|
|
666
686
|
size: "small" | "medium" | "large";
|
|
667
|
-
selectedIds:
|
|
687
|
+
selectedIds: string[] | "all";
|
|
668
688
|
unselectedIds: string[];
|
|
669
689
|
cursorId: string;
|
|
670
690
|
columnCount: number;
|
|
@@ -687,7 +707,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
687
707
|
shouldGoToFirstOfRow?: ((data: undefined, state: {
|
|
688
708
|
disabled: boolean;
|
|
689
709
|
size: "small" | "medium" | "large";
|
|
690
|
-
selectedIds:
|
|
710
|
+
selectedIds: string[] | "all";
|
|
691
711
|
unselectedIds: string[];
|
|
692
712
|
cursorId: string;
|
|
693
713
|
columnCount: number;
|
|
@@ -710,7 +730,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
710
730
|
shouldGoToLastOfRow?: ((data: undefined, state: {
|
|
711
731
|
disabled: boolean;
|
|
712
732
|
size: "small" | "medium" | "large";
|
|
713
|
-
selectedIds:
|
|
733
|
+
selectedIds: string[] | "all";
|
|
714
734
|
unselectedIds: string[];
|
|
715
735
|
cursorId: string;
|
|
716
736
|
columnCount: number;
|
|
@@ -733,7 +753,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
733
753
|
shouldGoToNextPage?: ((data: undefined, state: {
|
|
734
754
|
disabled: boolean;
|
|
735
755
|
size: "small" | "medium" | "large";
|
|
736
|
-
selectedIds:
|
|
756
|
+
selectedIds: string[] | "all";
|
|
737
757
|
unselectedIds: string[];
|
|
738
758
|
cursorId: string;
|
|
739
759
|
columnCount: number;
|
|
@@ -756,7 +776,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
756
776
|
shouldGoToPreviousPage?: ((data: undefined, state: {
|
|
757
777
|
disabled: boolean;
|
|
758
778
|
size: "small" | "medium" | "large";
|
|
759
|
-
selectedIds:
|
|
779
|
+
selectedIds: string[] | "all";
|
|
760
780
|
unselectedIds: string[];
|
|
761
781
|
cursorId: string;
|
|
762
782
|
columnCount: number;
|
|
@@ -781,7 +801,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
781
801
|
}, state: {
|
|
782
802
|
disabled: boolean;
|
|
783
803
|
size: "small" | "medium" | "large";
|
|
784
|
-
selectedIds:
|
|
804
|
+
selectedIds: string[] | "all";
|
|
785
805
|
unselectedIds: string[];
|
|
786
806
|
cursorId: string;
|
|
787
807
|
columnCount: number;
|
|
@@ -806,7 +826,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
806
826
|
}, state: {
|
|
807
827
|
disabled: boolean;
|
|
808
828
|
size: "small" | "medium" | "large";
|
|
809
|
-
selectedIds:
|
|
829
|
+
selectedIds: string[] | "all";
|
|
810
830
|
unselectedIds: string[];
|
|
811
831
|
cursorId: string;
|
|
812
832
|
columnCount: number;
|
|
@@ -830,7 +850,7 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
830
850
|
state: {
|
|
831
851
|
disabled: boolean;
|
|
832
852
|
size: "small" | "medium" | "large";
|
|
833
|
-
selectedIds:
|
|
853
|
+
selectedIds: string[] | "all";
|
|
834
854
|
unselectedIds: string[];
|
|
835
855
|
cursorId: string;
|
|
836
856
|
columnCount: number;
|
|
@@ -884,11 +904,19 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
884
904
|
navigation: import("@workday/canvas-kit-react/collection/lib/useCursorListModel").NavigationManager;
|
|
885
905
|
getId: (item: any) => string;
|
|
886
906
|
}> & {
|
|
907
|
+
/**
|
|
908
|
+
* `SegmentedControl.List` renders {@link Grid} under the hood. It is a container for
|
|
909
|
+
* {@link SegmentedControlItem SegmentedControl.Item} subcomponents.
|
|
910
|
+
*
|
|
911
|
+
* ```tsx
|
|
912
|
+
* <SegmentedControl.List>{SegmentedControl.Items}</SegmentedControl.List>
|
|
913
|
+
* ```
|
|
914
|
+
*/
|
|
887
915
|
List: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("./SegmentedControlList").SegmentedControlListProps<any>, {
|
|
888
916
|
state: {
|
|
889
917
|
disabled: boolean;
|
|
890
918
|
size: "small" | "medium" | "large";
|
|
891
|
-
selectedIds:
|
|
919
|
+
selectedIds: string[] | "all";
|
|
892
920
|
unselectedIds: string[];
|
|
893
921
|
cursorId: string;
|
|
894
922
|
columnCount: number;
|
|
@@ -942,11 +970,19 @@ export declare const SegmentedControl: import("@workday/canvas-kit-react/common"
|
|
|
942
970
|
navigation: import("@workday/canvas-kit-react/collection/lib/useCursorListModel").NavigationManager;
|
|
943
971
|
getId: (item: any) => string;
|
|
944
972
|
}>;
|
|
973
|
+
/**
|
|
974
|
+
* `SegmentedControl.Item` is a `button` element built on `BaseButton`. `SegmentedControl.Item`
|
|
975
|
+
* has a `data-id` prop to handle `onSelect` properly.
|
|
976
|
+
*
|
|
977
|
+
* ```tsx
|
|
978
|
+
* <SegmentedControl.Item data-id="table">Table</SegmentedControl.Item>
|
|
979
|
+
* ```
|
|
980
|
+
*/
|
|
945
981
|
Item: import("@workday/canvas-kit-react/common").ElementComponentM<"button", import("./SegmentedControlItem").ItemProps, {
|
|
946
982
|
state: {
|
|
947
983
|
disabled: boolean;
|
|
948
984
|
size: "small" | "medium" | "large";
|
|
949
|
-
selectedIds:
|
|
985
|
+
selectedIds: string[] | "all";
|
|
950
986
|
unselectedIds: string[];
|
|
951
987
|
cursorId: string;
|
|
952
988
|
columnCount: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../../segmented-control/lib/SegmentedControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../../segmented-control/lib/SegmentedControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIzB;;;;;;;OAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
@@ -3,11 +3,47 @@ import { createContainer } from '@workday/canvas-kit-react/common';
|
|
|
3
3
|
import { useSegmentedControlModel } from './hooks/useSegmentedControlModel';
|
|
4
4
|
import { SegmentedControlList } from './SegmentedControlList';
|
|
5
5
|
import { SegmentedControlItem } from './SegmentedControlItem';
|
|
6
|
+
/**
|
|
7
|
+
* `SegmentedControl` is a container component that is responsible for creating a
|
|
8
|
+
* {@link SegmentedControlModel} and sharing it with its subcomponents using React context. It does
|
|
9
|
+
* not represent a real element.
|
|
10
|
+
*
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <SegmentedControl items={[]}>{Child components}</SegmentedControl>
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* Alternatively, you may pass in a model using the [hoisted model
|
|
16
|
+
* pattern](/getting-started/for-developers/resources/compound-components/#configuring-a-model).
|
|
17
|
+
*
|
|
18
|
+
* ```tsx
|
|
19
|
+
* const model = useSegmentedControlModel({
|
|
20
|
+
* items: [],
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* <SegmentedControl model={model}>{Child components}</SegmentedControl>;
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
6
26
|
export var SegmentedControl = createContainer()({
|
|
7
27
|
displayName: 'SegmentedControl',
|
|
8
28
|
modelHook: useSegmentedControlModel,
|
|
9
29
|
subComponents: {
|
|
30
|
+
/**
|
|
31
|
+
* `SegmentedControl.List` renders {@link Grid} under the hood. It is a container for
|
|
32
|
+
* {@link SegmentedControlItem SegmentedControl.Item} subcomponents.
|
|
33
|
+
*
|
|
34
|
+
* ```tsx
|
|
35
|
+
* <SegmentedControl.List>{SegmentedControl.Items}</SegmentedControl.List>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
10
38
|
List: SegmentedControlList,
|
|
39
|
+
/**
|
|
40
|
+
* `SegmentedControl.Item` is a `button` element built on `BaseButton`. `SegmentedControl.Item`
|
|
41
|
+
* has a `data-id` prop to handle `onSelect` properly.
|
|
42
|
+
*
|
|
43
|
+
* ```tsx
|
|
44
|
+
* <SegmentedControl.Item data-id="table">Table</SegmentedControl.Item>
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
11
47
|
Item: SegmentedControlItem,
|
|
12
48
|
},
|
|
13
49
|
})(function (_a) {
|
|
@@ -43,7 +43,7 @@ export declare const SegmentedControlItem: import("@workday/canvas-kit-react/com
|
|
|
43
43
|
state: {
|
|
44
44
|
disabled: boolean;
|
|
45
45
|
size: "small" | "medium" | "large";
|
|
46
|
-
selectedIds:
|
|
46
|
+
selectedIds: string[] | "all";
|
|
47
47
|
unselectedIds: string[];
|
|
48
48
|
cursorId: string;
|
|
49
49
|
columnCount: number;
|
|
@@ -5,11 +5,74 @@ export interface SegmentedControlListProps<T = any> extends Omit<Partial<Extract
|
|
|
5
5
|
'aria-label': string;
|
|
6
6
|
children: ((item: T) => React.ReactNode) | React.ReactNode;
|
|
7
7
|
}
|
|
8
|
+
export declare const useSegmentedControlList: <P extends {}, R>(model: {
|
|
9
|
+
state: {
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
size: "small" | "medium" | "large";
|
|
12
|
+
selectedIds: string[] | "all";
|
|
13
|
+
unselectedIds: string[];
|
|
14
|
+
cursorId: string;
|
|
15
|
+
columnCount: number;
|
|
16
|
+
UNSTABLE_virtual: {
|
|
17
|
+
virtualItems: import("@workday/canvas-kit-react/collection/lib/react-virtual").VirtualItem[];
|
|
18
|
+
totalSize: number;
|
|
19
|
+
scrollToOffset: (index: number, options?: import("@workday/canvas-kit-react/collection/lib/react-virtual").ScrollToOffsetOptions | undefined) => void;
|
|
20
|
+
scrollToIndex: (index: number, options?: import("@workday/canvas-kit-react/collection/lib/react-virtual").ScrollToIndexOptions | undefined) => void;
|
|
21
|
+
measure: () => void;
|
|
22
|
+
};
|
|
23
|
+
UNSTABLE_defaultItemHeight: number;
|
|
24
|
+
containerRef: React.RefObject<HTMLDivElement>;
|
|
25
|
+
id: string;
|
|
26
|
+
orientation: "horizontal" | "vertical";
|
|
27
|
+
indexRef: React.MutableRefObject<number>;
|
|
28
|
+
nonInteractiveIds: string[];
|
|
29
|
+
isVirtualized: boolean;
|
|
30
|
+
items: import("@workday/canvas-kit-react/collection").Item<any>[];
|
|
31
|
+
};
|
|
32
|
+
events: {
|
|
33
|
+
select(data: {
|
|
34
|
+
id: string;
|
|
35
|
+
}): void;
|
|
36
|
+
selectAll(): void;
|
|
37
|
+
unselectAll(): void;
|
|
38
|
+
registerItem(data: {
|
|
39
|
+
item: any;
|
|
40
|
+
textValue: string;
|
|
41
|
+
}): void;
|
|
42
|
+
goTo(data: {
|
|
43
|
+
id: string;
|
|
44
|
+
}): void;
|
|
45
|
+
goToNext(): void;
|
|
46
|
+
goToPrevious(): void;
|
|
47
|
+
goToPreviousRow(): void;
|
|
48
|
+
goToNextRow(): void;
|
|
49
|
+
goToFirst(): void;
|
|
50
|
+
goToLast(): void;
|
|
51
|
+
goToFirstOfRow(): void;
|
|
52
|
+
goToLastOfRow(): void;
|
|
53
|
+
goToNextPage(): void;
|
|
54
|
+
goToPreviousPage(): void;
|
|
55
|
+
unregisterItem(data: {
|
|
56
|
+
id: string;
|
|
57
|
+
}): void;
|
|
58
|
+
updateItemHeight(data: {
|
|
59
|
+
value: number;
|
|
60
|
+
}): void;
|
|
61
|
+
};
|
|
62
|
+
selection: import("@workday/canvas-kit-react/collection/lib/useSelectionListModel").SelectionManager;
|
|
63
|
+
navigation: import("@workday/canvas-kit-react/collection/lib/useCursorListModel").NavigationManager;
|
|
64
|
+
getId: (item: any) => string;
|
|
65
|
+
}, elemProps?: P | undefined, ref?: React.Ref<R> | undefined) => {
|
|
66
|
+
[x: string]: string | number | undefined;
|
|
67
|
+
opacity: number | undefined;
|
|
68
|
+
} & P & (R extends HTMLOrSVGElement ? {
|
|
69
|
+
ref: React.Ref<R>;
|
|
70
|
+
} : {});
|
|
8
71
|
export declare const SegmentedControlList: import("@workday/canvas-kit-react/common").ElementComponentM<"div", SegmentedControlListProps<any>, {
|
|
9
72
|
state: {
|
|
10
73
|
disabled: boolean;
|
|
11
74
|
size: "small" | "medium" | "large";
|
|
12
|
-
selectedIds:
|
|
75
|
+
selectedIds: string[] | "all";
|
|
13
76
|
unselectedIds: string[];
|
|
14
77
|
cursorId: string;
|
|
15
78
|
columnCount: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControlList.d.ts","sourceRoot":"","sources":["../../../../segmented-control/lib/SegmentedControlList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,YAAY,EAEb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAItD,MAAM,WAAW,yBAAyB,CAAC,CAAC,GAAG,GAAG,CAChD,SAAQ,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC;IACnE,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;CAC5D;
|
|
1
|
+
{"version":3,"file":"SegmentedControlList.d.ts","sourceRoot":"","sources":["../../../../segmented-control/lib/SegmentedControlList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,YAAY,EAEb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAItD,MAAM,WAAW,yBAAyB,CAAC,CAAC,GAAG,GAAG,CAChD,SAAQ,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC;IACnE,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;CAC5D;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAQnC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqB/B,CAAC"}
|
|
@@ -25,7 +25,7 @@ import { createSubcomponent, createElemPropsHook, } from '@workday/canvas-kit-re
|
|
|
25
25
|
import { Grid } from '@workday/canvas-kit-react/layout';
|
|
26
26
|
import { useListRenderItems } from '@workday/canvas-kit-react/collection';
|
|
27
27
|
import { useSegmentedControlModel } from './hooks/useSegmentedControlModel';
|
|
28
|
-
var useSegmentedControlList = createElemPropsHook(useSegmentedControlModel)(function (_a) {
|
|
28
|
+
export var useSegmentedControlList = createElemPropsHook(useSegmentedControlModel)(function (_a) {
|
|
29
29
|
var _b;
|
|
30
30
|
var _c = _a.state, orientation = _c.orientation, disabled = _c.disabled, items = _c.items;
|
|
31
31
|
var directionName = orientation === 'vertical' ? 'Row' : 'Column';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export declare const useSegmentedControlItem: <P extends {}, R>(model: {
|
|
3
3
|
state: {
|
|
4
|
-
selectedIds:
|
|
4
|
+
selectedIds: string[] | "all";
|
|
5
5
|
unselectedIds: string[];
|
|
6
6
|
cursorId: string;
|
|
7
7
|
columnCount: number;
|
|
@@ -54,7 +54,7 @@ export declare const useSegmentedControlItem: <P extends {}, R>(model: {
|
|
|
54
54
|
selection: import("@workday/canvas-kit-react/collection/lib/useSelectionListModel").SelectionManager;
|
|
55
55
|
navigation: import("@workday/canvas-kit-react/collection/lib/useCursorListModel").NavigationManager;
|
|
56
56
|
getId: (item: any) => string;
|
|
57
|
-
}, elemProps?: P | undefined, ref?:
|
|
57
|
+
}, elemProps?: P | undefined, ref?: React.Ref<R> | undefined) => {} & P & (R extends HTMLOrSVGElement ? {
|
|
58
58
|
ref: React.Ref<R>;
|
|
59
59
|
} : {});
|
|
60
60
|
//# sourceMappingURL=useSegmentedControlItem.d.ts.map
|