react-magma-dom 3.9.0 → 3.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.stories.d.ts +3 -3
- package/dist/components/Alert/Alert.stories.d.ts +3 -3
- package/dist/components/AlertBase/index.d.ts +1 -1
- package/dist/components/Announce/Announce.stories.d.ts +2 -2
- package/dist/components/Badge/Badge.stories.d.ts +3 -3
- package/dist/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/dist/components/BreakpointsContainer/BreakpointsContainer.stories.d.ts +2 -2
- package/dist/components/Button/Button.stories.d.ts +3 -2
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +57 -52
- package/dist/components/Card/Card.stories.d.ts +2 -2
- package/dist/components/CharacterCounter/CharacterCounter.stories.d.ts +111 -101
- package/dist/components/Checkbox/Checkbox.stories.d.ts +3 -3
- package/dist/components/Checkbox/index.d.ts +2 -2
- package/dist/components/Combobox/Combobox.d.ts +2 -2
- package/dist/components/Combobox/Combobox.stories.d.ts +4 -4
- package/dist/components/Combobox/ComboboxInput.d.ts +1 -1
- package/dist/components/Combobox/MultiCombobox.d.ts +2 -2
- package/dist/components/Combobox/index.d.ts +1 -1
- package/dist/components/Datagrid/Datagrid.stories.d.ts +8 -8
- package/dist/components/Datagrid/components.d.ts +2 -2
- package/dist/components/DatePicker/DatePicker.stories.d.ts +6 -6
- package/dist/components/Drawer/Drawer.stories.d.ts +2 -2
- package/dist/components/Dropdown/Dropdown.stories.d.ts +5 -5
- package/dist/components/FormGroup/FormGroup.stories.d.ts +2 -2
- package/dist/components/Heading/Heading.stories.d.ts +3 -3
- package/dist/components/Heading/index.d.ts +1 -1
- package/dist/components/HideAtBreakpoint/HideAtBreakpoint.stories.d.ts +2 -2
- package/dist/components/Hyperlink/Hyperlink.stories.d.ts +5 -5
- package/dist/components/IndeterminateCheckbox/IndeterminateCheckbox.stories.d.ts +4 -4
- package/dist/components/Input/Input.stories.d.ts +166 -157
- package/dist/components/InputBase/InputBase.stories.d.ts +3 -3
- package/dist/components/List/List.d.ts +0 -6
- package/dist/components/List/List.stories.d.ts +63 -2
- package/dist/components/List/ListItem.d.ts +8 -0
- package/dist/components/LoadingIndicator/LoadingIndicator.stories.d.ts +2 -2
- package/dist/components/Modal/Modal.d.ts +4 -0
- package/dist/components/Modal/Modal.stories.d.ts +10 -8
- package/dist/components/NavTabs/NavTab.d.ts +1 -4
- package/dist/components/NavTabs/NavTabs.stories.d.ts +6 -4
- package/dist/components/Pagination/Pagination.stories.d.ts +2 -2
- package/dist/components/Paragraph/Paragraph.stories.d.ts +2 -2
- package/dist/components/ProgressBar/ProgressBar.stories.d.ts +2 -2
- package/dist/components/Radio/Radio.stories.d.ts +3 -3
- package/dist/components/Select/ItemsList.d.ts +1 -1
- package/dist/components/Select/MultiSelect.d.ts +2 -2
- package/dist/components/Select/Select.d.ts +2 -2
- package/dist/components/Select/Select.stories.d.ts +2 -2
- package/dist/components/Select/SelectContainer.d.ts +1 -1
- package/dist/components/Select/SelectTriggerButton.d.ts +1 -1
- package/dist/components/Select/components.d.ts +7 -7
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/shared.d.ts +4 -4
- package/dist/components/SkipLink/SkipLink.stories.d.ts +2 -2
- package/dist/components/Spinner/index.d.ts +5 -0
- package/dist/components/Stepper/Step.d.ts +1 -1
- package/dist/components/Table/Table.stories.d.ts +335 -305
- package/dist/components/Table/TableRow.d.ts +4 -0
- package/dist/components/Tag/Tag.stories.d.ts +110 -100
- package/dist/components/Textarea/Textarea.stories.d.ts +55 -51
- package/dist/components/TimePicker/TimePicker.stories.d.ts +2 -2
- package/dist/components/Toast/Toast.stories.d.ts +3 -3
- package/dist/components/Toggle/Toggle.stories.d.ts +3 -3
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +216 -200
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts +110 -100
- package/dist/components/Tooltip/Tooltip.stories.d.ts +2 -2
- package/dist/components/Transition/Transition.stories.d.ts +1 -1
- package/dist/components/TreeView/TreeView.stories.d.ts +24 -9
- package/dist/components/TreeView/TreeViewContext.d.ts +2 -0
- package/dist/components/TreeView/useTreeView.d.ts +17 -2
- package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts +2 -2
- package/dist/esm/index.js +1068 -635
- package/dist/esm/index.js.map +1 -1
- package/dist/i18n/interface.d.ts +7 -0
- package/dist/index.d.ts +1 -1
- package/dist/properties.json +177 -138
- package/dist/react-magma-dom.cjs.development.js +944 -536
- package/dist/react-magma-dom.cjs.development.js.map +1 -1
- package/dist/react-magma-dom.cjs.production.min.js +1 -1
- package/dist/react-magma-dom.cjs.production.min.js.map +1 -1
- package/dist/theme/components/reducedMotionTransition.d.ts +10 -0
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@s
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, ToggleButtonGroupProps>;
|
|
7
7
|
export declare const AlignmentExample: {
|
|
8
|
-
(args: any): JSX.Element;
|
|
8
|
+
(args: any): React.JSX.Element;
|
|
9
9
|
args: {
|
|
10
10
|
descriptionId?: string;
|
|
11
11
|
enforced: boolean;
|
|
@@ -27,6 +27,7 @@ export declare const AlignmentExample: {
|
|
|
27
27
|
suppressContentEditableWarning?: boolean;
|
|
28
28
|
suppressHydrationWarning?: boolean;
|
|
29
29
|
accessKey?: string;
|
|
30
|
+
autoFocus?: boolean;
|
|
30
31
|
className?: string;
|
|
31
32
|
contentEditable?: boolean | "true" | "false" | "inherit";
|
|
32
33
|
contextMenu?: string;
|
|
@@ -35,6 +36,7 @@ export declare const AlignmentExample: {
|
|
|
35
36
|
hidden?: boolean;
|
|
36
37
|
id?: string;
|
|
37
38
|
lang?: string;
|
|
39
|
+
nonce?: string;
|
|
38
40
|
placeholder?: string;
|
|
39
41
|
slot?: string;
|
|
40
42
|
spellCheck?: boolean | "true" | "false";
|
|
@@ -45,11 +47,14 @@ export declare const AlignmentExample: {
|
|
|
45
47
|
radioGroup?: string;
|
|
46
48
|
role?: React.AriaRole;
|
|
47
49
|
about?: string;
|
|
50
|
+
content?: string;
|
|
48
51
|
datatype?: string;
|
|
49
52
|
inlist?: any;
|
|
50
53
|
prefix?: string;
|
|
51
54
|
property?: string;
|
|
55
|
+
rel?: string;
|
|
52
56
|
resource?: string;
|
|
57
|
+
rev?: string;
|
|
53
58
|
typeof?: string;
|
|
54
59
|
vocab?: string;
|
|
55
60
|
autoCapitalize?: string;
|
|
@@ -65,57 +70,57 @@ export declare const AlignmentExample: {
|
|
|
65
70
|
unselectable?: "on" | "off";
|
|
66
71
|
inputMode?: "text" | "none" | "search" | "tel" | "url" | "email" | "numeric" | "decimal";
|
|
67
72
|
is?: string;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
73
|
+
"aria-activedescendant"?: string;
|
|
74
|
+
"aria-atomic"?: boolean | "true" | "false";
|
|
75
|
+
"aria-autocomplete"?: "list" | "none" | "inline" | "both";
|
|
76
|
+
"aria-busy"?: boolean | "true" | "false";
|
|
77
|
+
"aria-checked"?: boolean | "true" | "false" | "mixed";
|
|
78
|
+
"aria-colcount"?: number;
|
|
79
|
+
"aria-colindex"?: number;
|
|
80
|
+
"aria-colspan"?: number;
|
|
81
|
+
"aria-controls"?: string;
|
|
82
|
+
"aria-current"?: boolean | "time" | "true" | "false" | "step" | "page" | "location" | "date";
|
|
83
|
+
"aria-describedby"?: string;
|
|
84
|
+
"aria-details"?: string;
|
|
85
|
+
"aria-disabled"?: boolean | "true" | "false";
|
|
86
|
+
"aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup";
|
|
87
|
+
"aria-errormessage"?: string;
|
|
88
|
+
"aria-expanded"?: boolean | "true" | "false";
|
|
89
|
+
"aria-flowto"?: string;
|
|
90
|
+
"aria-grabbed"?: boolean | "true" | "false";
|
|
91
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree";
|
|
92
|
+
"aria-hidden"?: boolean | "true" | "false";
|
|
93
|
+
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling";
|
|
94
|
+
"aria-keyshortcuts"?: string;
|
|
95
|
+
"aria-label"?: string;
|
|
96
|
+
"aria-labelledby"?: string;
|
|
97
|
+
"aria-level"?: number;
|
|
98
|
+
"aria-live"?: "off" | "assertive" | "polite";
|
|
99
|
+
"aria-modal"?: boolean | "true" | "false";
|
|
100
|
+
"aria-multiline"?: boolean | "true" | "false";
|
|
101
|
+
"aria-multiselectable"?: boolean | "true" | "false";
|
|
102
|
+
"aria-orientation"?: "horizontal" | "vertical";
|
|
103
|
+
"aria-owns"?: string;
|
|
104
|
+
"aria-placeholder"?: string;
|
|
105
|
+
"aria-posinset"?: number;
|
|
106
|
+
"aria-pressed"?: boolean | "true" | "false" | "mixed";
|
|
107
|
+
"aria-readonly"?: boolean | "true" | "false";
|
|
108
|
+
"aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
|
|
109
|
+
"aria-required"?: boolean | "true" | "false";
|
|
110
|
+
"aria-roledescription"?: string;
|
|
111
|
+
"aria-rowcount"?: number;
|
|
112
|
+
"aria-rowindex"?: number;
|
|
113
|
+
"aria-rowspan"?: number;
|
|
114
|
+
"aria-selected"?: boolean | "true" | "false";
|
|
115
|
+
"aria-setsize"?: number;
|
|
116
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other";
|
|
117
|
+
"aria-valuemax"?: number;
|
|
118
|
+
"aria-valuemin"?: number;
|
|
119
|
+
"aria-valuenow"?: number;
|
|
120
|
+
"aria-valuetext"?: string;
|
|
116
121
|
children?: React.ReactNode;
|
|
117
122
|
dangerouslySetInnerHTML?: {
|
|
118
|
-
__html: string;
|
|
123
|
+
__html: string | TrustedHTML;
|
|
119
124
|
};
|
|
120
125
|
onCopy?: (event: React.ClipboardEvent<HTMLDivElement>) => void;
|
|
121
126
|
onCopyCapture?: (event: React.ClipboardEvent<HTMLDivElement>) => void;
|
|
@@ -280,7 +285,7 @@ export declare const AlignmentExample: {
|
|
|
280
285
|
};
|
|
281
286
|
};
|
|
282
287
|
export declare const DifferentToggleButtons: {
|
|
283
|
-
(args: any): JSX.Element;
|
|
288
|
+
(args: any): React.JSX.Element;
|
|
284
289
|
args: {
|
|
285
290
|
descriptionId?: string;
|
|
286
291
|
enforced?: boolean;
|
|
@@ -302,6 +307,7 @@ export declare const DifferentToggleButtons: {
|
|
|
302
307
|
suppressContentEditableWarning?: boolean;
|
|
303
308
|
suppressHydrationWarning?: boolean;
|
|
304
309
|
accessKey?: string;
|
|
310
|
+
autoFocus?: boolean;
|
|
305
311
|
className?: string;
|
|
306
312
|
contentEditable?: boolean | "true" | "false" | "inherit";
|
|
307
313
|
contextMenu?: string;
|
|
@@ -310,6 +316,7 @@ export declare const DifferentToggleButtons: {
|
|
|
310
316
|
hidden?: boolean;
|
|
311
317
|
id?: string;
|
|
312
318
|
lang?: string;
|
|
319
|
+
nonce?: string;
|
|
313
320
|
placeholder?: string;
|
|
314
321
|
slot?: string;
|
|
315
322
|
spellCheck?: boolean | "true" | "false";
|
|
@@ -320,11 +327,14 @@ export declare const DifferentToggleButtons: {
|
|
|
320
327
|
radioGroup?: string;
|
|
321
328
|
role?: React.AriaRole;
|
|
322
329
|
about?: string;
|
|
330
|
+
content?: string;
|
|
323
331
|
datatype?: string;
|
|
324
332
|
inlist?: any;
|
|
325
333
|
prefix?: string;
|
|
326
334
|
property?: string;
|
|
335
|
+
rel?: string;
|
|
327
336
|
resource?: string;
|
|
337
|
+
rev?: string;
|
|
328
338
|
typeof?: string;
|
|
329
339
|
vocab?: string;
|
|
330
340
|
autoCapitalize?: string;
|
|
@@ -340,57 +350,57 @@ export declare const DifferentToggleButtons: {
|
|
|
340
350
|
unselectable?: "on" | "off";
|
|
341
351
|
inputMode?: "text" | "none" | "search" | "tel" | "url" | "email" | "numeric" | "decimal";
|
|
342
352
|
is?: string;
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
353
|
+
"aria-activedescendant"?: string;
|
|
354
|
+
"aria-atomic"?: boolean | "true" | "false";
|
|
355
|
+
"aria-autocomplete"?: "list" | "none" | "inline" | "both";
|
|
356
|
+
"aria-busy"?: boolean | "true" | "false";
|
|
357
|
+
"aria-checked"?: boolean | "true" | "false" | "mixed";
|
|
358
|
+
"aria-colcount"?: number;
|
|
359
|
+
"aria-colindex"?: number;
|
|
360
|
+
"aria-colspan"?: number;
|
|
361
|
+
"aria-controls"?: string;
|
|
362
|
+
"aria-current"?: boolean | "time" | "true" | "false" | "step" | "page" | "location" | "date";
|
|
363
|
+
"aria-describedby"?: string;
|
|
364
|
+
"aria-details"?: string;
|
|
365
|
+
"aria-disabled"?: boolean | "true" | "false";
|
|
366
|
+
"aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup";
|
|
367
|
+
"aria-errormessage"?: string;
|
|
368
|
+
"aria-expanded"?: boolean | "true" | "false";
|
|
369
|
+
"aria-flowto"?: string;
|
|
370
|
+
"aria-grabbed"?: boolean | "true" | "false";
|
|
371
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree";
|
|
372
|
+
"aria-hidden"?: boolean | "true" | "false";
|
|
373
|
+
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling";
|
|
374
|
+
"aria-keyshortcuts"?: string;
|
|
375
|
+
"aria-label"?: string;
|
|
376
|
+
"aria-labelledby"?: string;
|
|
377
|
+
"aria-level"?: number;
|
|
378
|
+
"aria-live"?: "off" | "assertive" | "polite";
|
|
379
|
+
"aria-modal"?: boolean | "true" | "false";
|
|
380
|
+
"aria-multiline"?: boolean | "true" | "false";
|
|
381
|
+
"aria-multiselectable"?: boolean | "true" | "false";
|
|
382
|
+
"aria-orientation"?: "horizontal" | "vertical";
|
|
383
|
+
"aria-owns"?: string;
|
|
384
|
+
"aria-placeholder"?: string;
|
|
385
|
+
"aria-posinset"?: number;
|
|
386
|
+
"aria-pressed"?: boolean | "true" | "false" | "mixed";
|
|
387
|
+
"aria-readonly"?: boolean | "true" | "false";
|
|
388
|
+
"aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
|
|
389
|
+
"aria-required"?: boolean | "true" | "false";
|
|
390
|
+
"aria-roledescription"?: string;
|
|
391
|
+
"aria-rowcount"?: number;
|
|
392
|
+
"aria-rowindex"?: number;
|
|
393
|
+
"aria-rowspan"?: number;
|
|
394
|
+
"aria-selected"?: boolean | "true" | "false";
|
|
395
|
+
"aria-setsize"?: number;
|
|
396
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other";
|
|
397
|
+
"aria-valuemax"?: number;
|
|
398
|
+
"aria-valuemin"?: number;
|
|
399
|
+
"aria-valuenow"?: number;
|
|
400
|
+
"aria-valuetext"?: string;
|
|
391
401
|
children?: React.ReactNode;
|
|
392
402
|
dangerouslySetInnerHTML?: {
|
|
393
|
-
__html: string;
|
|
403
|
+
__html: string | TrustedHTML;
|
|
394
404
|
};
|
|
395
405
|
onCopy?: (event: React.ClipboardEvent<HTMLDivElement>) => void;
|
|
396
406
|
onCopyCapture?: (event: React.ClipboardEvent<HTMLDivElement>) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { TooltipProps } from './index';
|
|
3
3
|
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
4
4
|
export default _default;
|
|
@@ -8,4 +8,4 @@ export declare const Left: import("@storybook/csf").AnnotatedStoryFn<import("@st
|
|
|
8
8
|
export declare const Right: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, TooltipProps>;
|
|
9
9
|
export declare const Inverse: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, TooltipProps>;
|
|
10
10
|
export declare const Open: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, TooltipProps>;
|
|
11
|
-
export declare const Complex: () => JSX.Element;
|
|
11
|
+
export declare const Complex: () => React.JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { TreeViewSelectable } from '.';
|
|
3
3
|
import { IndeterminateCheckboxStatus } from '../..';
|
|
4
4
|
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const Simple: {
|
|
7
|
-
(args: any): JSX.Element;
|
|
7
|
+
(args: any): React.JSX.Element;
|
|
8
8
|
parameters: {
|
|
9
9
|
controls: {
|
|
10
10
|
exclude: string[];
|
|
@@ -12,7 +12,7 @@ export declare const Simple: {
|
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
export declare const Complex: {
|
|
15
|
-
(args: any): JSX.Element;
|
|
15
|
+
(args: any): React.JSX.Element;
|
|
16
16
|
args: {
|
|
17
17
|
selectable: TreeViewSelectable;
|
|
18
18
|
ariaLabel: string;
|
|
@@ -25,7 +25,7 @@ export declare const Complex: {
|
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
export declare const NoIcons: {
|
|
28
|
-
(args: any): JSX.Element;
|
|
28
|
+
(args: any): React.JSX.Element;
|
|
29
29
|
args: {
|
|
30
30
|
initialExpandedItems: string[];
|
|
31
31
|
preselectedItems: {
|
|
@@ -35,13 +35,13 @@ export declare const NoIcons: {
|
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
37
|
export declare const Textbook: {
|
|
38
|
-
(args: any): JSX.Element;
|
|
38
|
+
(args: any): React.JSX.Element;
|
|
39
39
|
args: {
|
|
40
40
|
ariaLabelledBy: string;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
export declare const DefaultIcon: {
|
|
44
|
-
(args: any): JSX.Element;
|
|
44
|
+
(args: any): React.JSX.Element;
|
|
45
45
|
parameters: {
|
|
46
46
|
controls: {
|
|
47
47
|
exclude: string[];
|
|
@@ -49,7 +49,7 @@ export declare const DefaultIcon: {
|
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
export declare const FirstItemLeaf: {
|
|
52
|
-
(args: any): JSX.Element;
|
|
52
|
+
(args: any): React.JSX.Element;
|
|
53
53
|
args: {
|
|
54
54
|
initialExpandedItems: string[];
|
|
55
55
|
preselectedItems: {
|
|
@@ -64,7 +64,7 @@ export declare const FirstItemLeaf: {
|
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
export declare const FirstItemBranch: {
|
|
67
|
-
(args: any): JSX.Element;
|
|
67
|
+
(args: any): React.JSX.Element;
|
|
68
68
|
args: {
|
|
69
69
|
ariaLabel: string;
|
|
70
70
|
selectable: TreeViewSelectable;
|
|
@@ -76,7 +76,7 @@ export declare const FirstItemBranch: {
|
|
|
76
76
|
};
|
|
77
77
|
};
|
|
78
78
|
export declare const FlatTree: {
|
|
79
|
-
(args: any): JSX.Element;
|
|
79
|
+
(args: any): React.JSX.Element;
|
|
80
80
|
args: {
|
|
81
81
|
selectable: TreeViewSelectable;
|
|
82
82
|
};
|
|
@@ -86,3 +86,18 @@ export declare const FlatTree: {
|
|
|
86
86
|
};
|
|
87
87
|
};
|
|
88
88
|
};
|
|
89
|
+
export declare const ParentsAndChildrenNotAutoChecked: {
|
|
90
|
+
(args: any): React.JSX.Element;
|
|
91
|
+
args: {
|
|
92
|
+
checkParents: boolean;
|
|
93
|
+
checkChildren: boolean;
|
|
94
|
+
ariaLabel: string;
|
|
95
|
+
selectable: TreeViewSelectable;
|
|
96
|
+
testId: string;
|
|
97
|
+
};
|
|
98
|
+
parameters: {
|
|
99
|
+
controls: {
|
|
100
|
+
exclude: string[];
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
@@ -24,5 +24,7 @@ export interface TreeViewContextInterface {
|
|
|
24
24
|
setSelectedItemsChanged: React.Dispatch<React.SetStateAction<any>>;
|
|
25
25
|
treeItemRefArray?: React.MutableRefObject<React.MutableRefObject<Element>[]>;
|
|
26
26
|
itemToFocus?: string;
|
|
27
|
+
checkParents: boolean;
|
|
28
|
+
checkChildren: boolean;
|
|
27
29
|
}
|
|
28
30
|
export declare const TreeViewContext: React.Context<TreeViewContextInterface>;
|
|
@@ -48,14 +48,27 @@ export interface UseTreeViewProps {
|
|
|
48
48
|
* Return an array of objects.
|
|
49
49
|
* Example: [ {itemId: 'item0', checkedStatus: IndeterminateCheckboxStatus.indeterminate}, {itemId: 'item0-child', checkedStatus: IndeterminateCheckboxStatus.checked} ]
|
|
50
50
|
*/
|
|
51
|
-
onSelectedItemChange?: (selectedItems: Array<
|
|
51
|
+
onSelectedItemChange?: (selectedItems: Array<TreeItemSelectedInterface>) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Only affects if selectable mode is TreeViewSelectable.multi.
|
|
54
|
+
* Determines if the parent checkbox will get selected when the user selects all its children checkboxes.
|
|
55
|
+
* When checkParents is enabled, the TreeView displays the indeterminate state of the parent checkboxes too.
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
checkParents?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Only affects if selectable mode is TreeViewSelectable.multi.
|
|
61
|
+
* Determines if the child checkboxes get selected when the user selects parent checkbox.
|
|
62
|
+
* @default true
|
|
63
|
+
*/
|
|
64
|
+
checkChildren?: boolean;
|
|
52
65
|
children?: React.ReactNode[];
|
|
53
66
|
}
|
|
54
67
|
export declare function useTreeView(props: UseTreeViewProps): {
|
|
55
68
|
contextValue: {
|
|
56
69
|
hasIcons: boolean;
|
|
57
70
|
itemToFocus: any;
|
|
58
|
-
onSelectedItemChange: (selectedItems:
|
|
71
|
+
onSelectedItemChange: (selectedItems: TreeItemSelectedInterface[]) => void;
|
|
59
72
|
onExpandedChange: (event: React.SyntheticEvent<Element, Event>) => void;
|
|
60
73
|
selectable: TreeViewSelectable;
|
|
61
74
|
setHasIcons: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -70,6 +83,8 @@ export declare function useTreeView(props: UseTreeViewProps): {
|
|
|
70
83
|
setInitialExpandedItemsNeedUpdate: React.Dispatch<React.SetStateAction<boolean>>;
|
|
71
84
|
selectedItemsChanged: boolean;
|
|
72
85
|
setSelectedItemsChanged: React.Dispatch<React.SetStateAction<boolean>>;
|
|
86
|
+
checkChildren: boolean;
|
|
87
|
+
checkParents: boolean;
|
|
73
88
|
};
|
|
74
89
|
};
|
|
75
90
|
export declare type UseTreeViewReturn = ReturnType<typeof useTreeView>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const Default: () => JSX.Element;
|
|
4
|
+
export declare const Default: () => React.JSX.Element;
|