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.
Files changed (81) hide show
  1. package/dist/components/Accordion/Accordion.stories.d.ts +3 -3
  2. package/dist/components/Alert/Alert.stories.d.ts +3 -3
  3. package/dist/components/AlertBase/index.d.ts +1 -1
  4. package/dist/components/Announce/Announce.stories.d.ts +2 -2
  5. package/dist/components/Badge/Badge.stories.d.ts +3 -3
  6. package/dist/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  7. package/dist/components/BreakpointsContainer/BreakpointsContainer.stories.d.ts +2 -2
  8. package/dist/components/Button/Button.stories.d.ts +3 -2
  9. package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +57 -52
  10. package/dist/components/Card/Card.stories.d.ts +2 -2
  11. package/dist/components/CharacterCounter/CharacterCounter.stories.d.ts +111 -101
  12. package/dist/components/Checkbox/Checkbox.stories.d.ts +3 -3
  13. package/dist/components/Checkbox/index.d.ts +2 -2
  14. package/dist/components/Combobox/Combobox.d.ts +2 -2
  15. package/dist/components/Combobox/Combobox.stories.d.ts +4 -4
  16. package/dist/components/Combobox/ComboboxInput.d.ts +1 -1
  17. package/dist/components/Combobox/MultiCombobox.d.ts +2 -2
  18. package/dist/components/Combobox/index.d.ts +1 -1
  19. package/dist/components/Datagrid/Datagrid.stories.d.ts +8 -8
  20. package/dist/components/Datagrid/components.d.ts +2 -2
  21. package/dist/components/DatePicker/DatePicker.stories.d.ts +6 -6
  22. package/dist/components/Drawer/Drawer.stories.d.ts +2 -2
  23. package/dist/components/Dropdown/Dropdown.stories.d.ts +5 -5
  24. package/dist/components/FormGroup/FormGroup.stories.d.ts +2 -2
  25. package/dist/components/Heading/Heading.stories.d.ts +3 -3
  26. package/dist/components/Heading/index.d.ts +1 -1
  27. package/dist/components/HideAtBreakpoint/HideAtBreakpoint.stories.d.ts +2 -2
  28. package/dist/components/Hyperlink/Hyperlink.stories.d.ts +5 -5
  29. package/dist/components/IndeterminateCheckbox/IndeterminateCheckbox.stories.d.ts +4 -4
  30. package/dist/components/Input/Input.stories.d.ts +166 -157
  31. package/dist/components/InputBase/InputBase.stories.d.ts +3 -3
  32. package/dist/components/List/List.d.ts +0 -6
  33. package/dist/components/List/List.stories.d.ts +63 -2
  34. package/dist/components/List/ListItem.d.ts +8 -0
  35. package/dist/components/LoadingIndicator/LoadingIndicator.stories.d.ts +2 -2
  36. package/dist/components/Modal/Modal.d.ts +4 -0
  37. package/dist/components/Modal/Modal.stories.d.ts +10 -8
  38. package/dist/components/NavTabs/NavTab.d.ts +1 -4
  39. package/dist/components/NavTabs/NavTabs.stories.d.ts +6 -4
  40. package/dist/components/Pagination/Pagination.stories.d.ts +2 -2
  41. package/dist/components/Paragraph/Paragraph.stories.d.ts +2 -2
  42. package/dist/components/ProgressBar/ProgressBar.stories.d.ts +2 -2
  43. package/dist/components/Radio/Radio.stories.d.ts +3 -3
  44. package/dist/components/Select/ItemsList.d.ts +1 -1
  45. package/dist/components/Select/MultiSelect.d.ts +2 -2
  46. package/dist/components/Select/Select.d.ts +2 -2
  47. package/dist/components/Select/Select.stories.d.ts +2 -2
  48. package/dist/components/Select/SelectContainer.d.ts +1 -1
  49. package/dist/components/Select/SelectTriggerButton.d.ts +1 -1
  50. package/dist/components/Select/components.d.ts +7 -7
  51. package/dist/components/Select/index.d.ts +1 -1
  52. package/dist/components/Select/shared.d.ts +4 -4
  53. package/dist/components/SkipLink/SkipLink.stories.d.ts +2 -2
  54. package/dist/components/Spinner/index.d.ts +5 -0
  55. package/dist/components/Stepper/Step.d.ts +1 -1
  56. package/dist/components/Table/Table.stories.d.ts +335 -305
  57. package/dist/components/Table/TableRow.d.ts +4 -0
  58. package/dist/components/Tag/Tag.stories.d.ts +110 -100
  59. package/dist/components/Textarea/Textarea.stories.d.ts +55 -51
  60. package/dist/components/TimePicker/TimePicker.stories.d.ts +2 -2
  61. package/dist/components/Toast/Toast.stories.d.ts +3 -3
  62. package/dist/components/Toggle/Toggle.stories.d.ts +3 -3
  63. package/dist/components/ToggleButton/ToggleButton.stories.d.ts +216 -200
  64. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts +110 -100
  65. package/dist/components/Tooltip/Tooltip.stories.d.ts +2 -2
  66. package/dist/components/Transition/Transition.stories.d.ts +1 -1
  67. package/dist/components/TreeView/TreeView.stories.d.ts +24 -9
  68. package/dist/components/TreeView/TreeViewContext.d.ts +2 -0
  69. package/dist/components/TreeView/useTreeView.d.ts +17 -2
  70. package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts +2 -2
  71. package/dist/esm/index.js +1068 -635
  72. package/dist/esm/index.js.map +1 -1
  73. package/dist/i18n/interface.d.ts +7 -0
  74. package/dist/index.d.ts +1 -1
  75. package/dist/properties.json +177 -138
  76. package/dist/react-magma-dom.cjs.development.js +944 -536
  77. package/dist/react-magma-dom.cjs.development.js.map +1 -1
  78. package/dist/react-magma-dom.cjs.production.min.js +1 -1
  79. package/dist/react-magma-dom.cjs.production.min.js.map +1 -1
  80. package/dist/theme/components/reducedMotionTransition.d.ts +10 -0
  81. 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
- 'aria-activedescendant'?: string;
69
- 'aria-atomic'?: boolean | "true" | "false";
70
- 'aria-autocomplete'?: "list" | "none" | "inline" | "both";
71
- 'aria-busy'?: boolean | "true" | "false";
72
- 'aria-checked'?: boolean | "true" | "false" | "mixed";
73
- 'aria-colcount'?: number;
74
- 'aria-colindex'?: number;
75
- 'aria-colspan'?: number;
76
- 'aria-controls'?: string;
77
- 'aria-current'?: boolean | "time" | "true" | "false" | "step" | "page" | "location" | "date";
78
- 'aria-describedby'?: string;
79
- 'aria-details'?: string;
80
- 'aria-disabled'?: boolean | "true" | "false";
81
- 'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup";
82
- 'aria-errormessage'?: string;
83
- 'aria-expanded'?: boolean | "true" | "false";
84
- 'aria-flowto'?: string;
85
- 'aria-grabbed'?: boolean | "true" | "false";
86
- 'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree";
87
- 'aria-hidden'?: boolean | "true" | "false";
88
- 'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling";
89
- 'aria-keyshortcuts'?: string;
90
- 'aria-label'?: string;
91
- 'aria-labelledby'?: string;
92
- 'aria-level'?: number;
93
- 'aria-live'?: "off" | "assertive" | "polite";
94
- 'aria-modal'?: boolean | "true" | "false";
95
- 'aria-multiline'?: boolean | "true" | "false";
96
- 'aria-multiselectable'?: boolean | "true" | "false";
97
- 'aria-orientation'?: "horizontal" | "vertical";
98
- 'aria-owns'?: string;
99
- 'aria-placeholder'?: string;
100
- 'aria-posinset'?: number;
101
- 'aria-pressed'?: boolean | "true" | "false" | "mixed";
102
- 'aria-readonly'?: boolean | "true" | "false";
103
- 'aria-relevant'?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
104
- 'aria-required'?: boolean | "true" | "false";
105
- 'aria-roledescription'?: string;
106
- 'aria-rowcount'?: number;
107
- 'aria-rowindex'?: number;
108
- 'aria-rowspan'?: number;
109
- 'aria-selected'?: boolean | "true" | "false";
110
- 'aria-setsize'?: number;
111
- 'aria-sort'?: "none" | "ascending" | "descending" | "other";
112
- 'aria-valuemax'?: number;
113
- 'aria-valuemin'?: number;
114
- 'aria-valuenow'?: number;
115
- 'aria-valuetext'?: string;
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
- 'aria-activedescendant'?: string;
344
- 'aria-atomic'?: boolean | "true" | "false";
345
- 'aria-autocomplete'?: "list" | "none" | "inline" | "both";
346
- 'aria-busy'?: boolean | "true" | "false";
347
- 'aria-checked'?: boolean | "true" | "false" | "mixed";
348
- 'aria-colcount'?: number;
349
- 'aria-colindex'?: number;
350
- 'aria-colspan'?: number;
351
- 'aria-controls'?: string;
352
- 'aria-current'?: boolean | "time" | "true" | "false" | "step" | "page" | "location" | "date";
353
- 'aria-describedby'?: string;
354
- 'aria-details'?: string;
355
- 'aria-disabled'?: boolean | "true" | "false";
356
- 'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup";
357
- 'aria-errormessage'?: string;
358
- 'aria-expanded'?: boolean | "true" | "false";
359
- 'aria-flowto'?: string;
360
- 'aria-grabbed'?: boolean | "true" | "false";
361
- 'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree";
362
- 'aria-hidden'?: boolean | "true" | "false";
363
- 'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling";
364
- 'aria-keyshortcuts'?: string;
365
- 'aria-label'?: string;
366
- 'aria-labelledby'?: string;
367
- 'aria-level'?: number;
368
- 'aria-live'?: "off" | "assertive" | "polite";
369
- 'aria-modal'?: boolean | "true" | "false";
370
- 'aria-multiline'?: boolean | "true" | "false";
371
- 'aria-multiselectable'?: boolean | "true" | "false";
372
- 'aria-orientation'?: "horizontal" | "vertical";
373
- 'aria-owns'?: string;
374
- 'aria-placeholder'?: string;
375
- 'aria-posinset'?: number;
376
- 'aria-pressed'?: boolean | "true" | "false" | "mixed";
377
- 'aria-readonly'?: boolean | "true" | "false";
378
- 'aria-relevant'?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
379
- 'aria-required'?: boolean | "true" | "false";
380
- 'aria-roledescription'?: string;
381
- 'aria-rowcount'?: number;
382
- 'aria-rowindex'?: number;
383
- 'aria-rowspan'?: number;
384
- 'aria-selected'?: boolean | "true" | "false";
385
- 'aria-setsize'?: number;
386
- 'aria-sort'?: "none" | "ascending" | "descending" | "other";
387
- 'aria-valuemax'?: number;
388
- 'aria-valuemin'?: number;
389
- 'aria-valuenow'?: number;
390
- 'aria-valuetext'?: string;
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
- /// <reference types="react" />
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;
@@ -76,4 +76,4 @@ declare const info: {
76
76
  };
77
77
  };
78
78
  export default info;
79
- export declare const Default: (args: any) => JSX.Element;
79
+ export declare const Default: (args: any) => React.JSX.Element;
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
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<Object>) => void;
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: Object[]) => void;
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
- /// <reference types="react" />
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;