@mui/x-tree-view 8.17.0 → 8.18.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 (44) hide show
  1. package/CHANGELOG.md +100 -0
  2. package/RichTreeView/RichTreeView.js +11 -11
  3. package/SimpleTreeView/SimpleTreeView.js +10 -10
  4. package/TreeItem/TreeItem.d.ts +1 -1
  5. package/esm/RichTreeView/RichTreeView.js +11 -11
  6. package/esm/SimpleTreeView/SimpleTreeView.js +10 -10
  7. package/esm/TreeItem/TreeItem.d.ts +1 -1
  8. package/esm/index.js +1 -1
  9. package/esm/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.types.d.ts +11 -11
  10. package/esm/internals/plugins/useTreeViewFocus/useTreeViewFocus.types.d.ts +5 -4
  11. package/esm/internals/plugins/useTreeViewItems/useTreeViewItems.types.d.ts +7 -7
  12. package/esm/internals/plugins/useTreeViewJSXItems/itemPlugin.d.ts +2 -0
  13. package/esm/internals/plugins/useTreeViewJSXItems/itemPlugin.js +74 -0
  14. package/esm/internals/plugins/useTreeViewJSXItems/useTreeViewJSXItems.js +2 -71
  15. package/esm/internals/plugins/useTreeViewLabel/itemPlugin.d.ts +11 -0
  16. package/esm/internals/plugins/useTreeViewLabel/useTreeViewLabel.js +1 -1
  17. package/esm/internals/plugins/useTreeViewLabel/useTreeViewLabel.types.d.ts +2 -11
  18. package/esm/internals/plugins/useTreeViewSelection/itemPlugin.d.ts +20 -0
  19. package/esm/internals/plugins/useTreeViewSelection/useTreeViewSelection.js +1 -1
  20. package/esm/internals/plugins/useTreeViewSelection/useTreeViewSelection.types.d.ts +20 -35
  21. package/esm/models/items.d.ts +1 -0
  22. package/index.js +1 -1
  23. package/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.types.d.ts +11 -11
  24. package/internals/plugins/useTreeViewFocus/useTreeViewFocus.types.d.ts +5 -4
  25. package/internals/plugins/useTreeViewItems/useTreeViewItems.types.d.ts +7 -7
  26. package/internals/plugins/useTreeViewJSXItems/itemPlugin.d.ts +2 -0
  27. package/internals/plugins/useTreeViewJSXItems/itemPlugin.js +81 -0
  28. package/internals/plugins/useTreeViewJSXItems/useTreeViewJSXItems.js +2 -71
  29. package/internals/plugins/useTreeViewLabel/itemPlugin.d.ts +11 -0
  30. package/internals/plugins/useTreeViewLabel/useTreeViewLabel.js +4 -4
  31. package/internals/plugins/useTreeViewLabel/useTreeViewLabel.types.d.ts +2 -11
  32. package/internals/plugins/useTreeViewSelection/itemPlugin.d.ts +20 -0
  33. package/internals/plugins/useTreeViewSelection/useTreeViewSelection.js +2 -2
  34. package/internals/plugins/useTreeViewSelection/useTreeViewSelection.types.d.ts +20 -35
  35. package/models/items.d.ts +1 -0
  36. package/package.json +3 -3
  37. package/esm/internals/plugins/useTreeViewLabel/useTreeViewLabel.itemPlugin.d.ts +0 -2
  38. package/esm/internals/plugins/useTreeViewSelection/useTreeViewSelection.itemPlugin.d.ts +0 -2
  39. package/internals/plugins/useTreeViewLabel/useTreeViewLabel.itemPlugin.d.ts +0 -2
  40. package/internals/plugins/useTreeViewSelection/useTreeViewSelection.itemPlugin.d.ts +0 -2
  41. /package/esm/internals/plugins/useTreeViewLabel/{useTreeViewLabel.itemPlugin.js → itemPlugin.js} +0 -0
  42. /package/esm/internals/plugins/useTreeViewSelection/{useTreeViewSelection.itemPlugin.js → itemPlugin.js} +0 -0
  43. /package/internals/plugins/useTreeViewLabel/{useTreeViewLabel.itemPlugin.js → itemPlugin.js} +0 -0
  44. /package/internals/plugins/useTreeViewSelection/{useTreeViewSelection.itemPlugin.js → itemPlugin.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,106 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.18.0
9
+
10
+ <!-- generated comparing v8.17.0..master -->
11
+
12
+ _Nov 13, 2025_
13
+
14
+ We'd like to extend a big thank you to the 14 contributors who made this release possible. Here are some highlights ✨:
15
+
16
+ - Add `barLabelPlacement` property to customize the bar label position in bar charts, enabling labels to be placed above bars.
17
+
18
+ ![image](https://github.com/user-attachments/assets/4bc3a75b-74b8-4c6d-896b-5f5bf837bcda)
19
+
20
+ - Add `source` property to the date/time picker lifecycle and event handler context, enabling clearer differentiation between changes initiated by the picker UI and those from direct field input.
21
+ - 🐞 Bugfixes
22
+ - 📚 Documentation improvements
23
+
24
+ Special thanks go out to these community members for their valuable contributions:
25
+ @htollefsen, @sai6855, @Sigdriv
26
+
27
+ The following team members contributed to this release:
28
+ @arminmeh, @bernardobelchior, @brijeshb42, @cherniavskii, @flaviendelangle, @JCQuintas, @michelengelen, @noraleonte, @prakhargupta1, @rita-codes, @siriwatknp
29
+
30
+ ### Data Grid
31
+
32
+ #### `@mui/x-data-grid@8.18.0`
33
+
34
+ - [DataGrid] Allow default event in the column action cell item click event handler (#20272) @arminmeh
35
+ - [DataGrid] Remove unnecessary generic from `useGridApiRef` (#20277) @cherniavskii
36
+
37
+ #### `@mui/x-data-grid-pro@8.18.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
38
+
39
+ Same changes as in `@mui/x-data-grid@8.18.0`.
40
+
41
+ #### `@mui/x-data-grid-premium@8.18.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
42
+
43
+ Same changes as in `@mui/x-data-grid-pro@8.18.0`, plus:
44
+
45
+ - [DataGridPremium] Return the correct `cellParams` value from the aggregation cells (#20224) @arminmeh
46
+
47
+ ### Date and Time Pickers
48
+
49
+ #### `@mui/x-date-pickers@8.18.0`
50
+
51
+ - [pickers] Keep invalid date state consistent (#20040) @michelengelen
52
+ - [pickers] Adds new `source` property to `onChange` and `onAccept` context object (#20234) @michelengelen
53
+
54
+ #### `@mui/x-date-pickers-pro@8.18.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
55
+
56
+ Same changes as in `@mui/x-date-pickers@8.18.0`.
57
+
58
+ ### Charts
59
+
60
+ #### `@mui/x-charts@8.18.0`
61
+
62
+ - [charts] Add prop for positioning a bar label (#20194) @Sigdriv
63
+ - [charts] Fix applying dark mode styles in `ChartAxisZoomSliderThumb` (#20232) @sai6855
64
+
65
+ #### `@mui/x-charts-pro@8.18.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
66
+
67
+ Same changes as in `@mui/x-charts@8.18.0`, plus:
68
+
69
+ - [charts-pro] Allow specifying Content Security Policy nonce on export (#20053) @bernardobelchior
70
+ - [charts-pro] Fix applying dark mode styles to slider (#20220) @sai6855
71
+ - [charts-pro] Sankey should respect node order (#20065) @JCQuintas
72
+
73
+ #### `@mui/x-charts-premium@8.18.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
74
+
75
+ Same changes as in `@mui/x-charts-pro@8.18.0`.
76
+
77
+ ### Tree View
78
+
79
+ #### `@mui/x-tree-view@8.18.0`
80
+
81
+ - [tree view] Prepare tests for the new store structure (#20225) @flaviendelangle
82
+ - [tree view] Prepare the item plugin files for the store migration (#20240) @flaviendelangle
83
+ - [tree view] Use `TreeItemId` type instead of raw string (#20233) @flaviendelangle
84
+
85
+ #### `@mui/x-tree-view-pro@8.18.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
86
+
87
+ Same changes as in `@mui/x-tree-view@8.18.0`.
88
+
89
+ ### Codemod
90
+
91
+ #### `@mui/x-codemod@8.18.0`
92
+
93
+ Internal changes.
94
+
95
+ ### Docs
96
+
97
+ - [charts] Add a demo for a custom tick label (#20073) @prakhargupta1
98
+ - [charts] Create `useAxes()` hook documentation page (#20229) @JCQuintas
99
+ - [charts] Fix logo alignment (#20228) @JCQuintas
100
+ - [charts] Fixes typo in import example (#20236) @htollefsen
101
+ - [Data Grid] Add recipe for cursor pagination with data source (#19700) @siriwatknp
102
+ - [Data Grid] Add a demo for pinned rows aggregation (#20198) @cherniavskii
103
+
104
+ ### Core
105
+
106
+ - [docs-infra] Use deployment config from docs-infra package (#20243) @brijeshb42
107
+
8
108
  ## 8.17.0
9
109
 
10
110
  _Nov 5, 2025_
@@ -151,7 +151,7 @@ process.env.NODE_ENV !== "production" ? RichTreeView.propTypes = {
151
151
  })
152
152
  }),
153
153
  /**
154
- * If `true`, the Tree View renders a checkbox at the left of its label that allows selecting it.
154
+ * Whether the Tree View renders a checkbox at the left of its label that allows selecting it.
155
155
  * @default false
156
156
  */
157
157
  checkboxSelection: _propTypes.default.bool,
@@ -173,12 +173,12 @@ process.env.NODE_ENV !== "production" ? RichTreeView.propTypes = {
173
173
  */
174
174
  defaultSelectedItems: _propTypes.default.any,
175
175
  /**
176
- * If `true`, will allow focus on disabled items.
176
+ * Whether the items should be focusable when disabled.
177
177
  * @default false
178
178
  */
179
179
  disabledItemsFocusable: _propTypes.default.bool,
180
180
  /**
181
- * If `true` selection is disabled.
181
+ * Whether selection is disabled.
182
182
  * @default false
183
183
  */
184
184
  disableSelection: _propTypes.default.bool,
@@ -206,7 +206,7 @@ process.env.NODE_ENV !== "production" ? RichTreeView.propTypes = {
206
206
  *
207
207
  * @template R
208
208
  * @param {R} item The item to check.
209
- * @returns {string} The id of the item.
209
+ * @returns {TreeViewItemId} The id of the item.
210
210
  * @default (item) => item.id
211
211
  */
212
212
  getItemId: _propTypes.default.func,
@@ -247,33 +247,33 @@ process.env.NODE_ENV !== "production" ? RichTreeView.propTypes = {
247
247
  itemChildrenIndentation: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
248
248
  items: _propTypes.default.array.isRequired,
249
249
  /**
250
- * If `true`, `ctrl` and `shift` will trigger multiselect.
250
+ * Whether multiple items can be selected.
251
251
  * @default false
252
252
  */
253
253
  multiSelect: _propTypes.default.bool,
254
254
  /**
255
255
  * Callback fired when Tree Items are expanded/collapsed.
256
256
  * @param {React.SyntheticEvent} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemExpansion()` method.
257
- * @param {array} itemIds The ids of the expanded items.
257
+ * @param {TreeViewItemId[]} itemIds The ids of the expanded items.
258
258
  */
259
259
  onExpandedItemsChange: _propTypes.default.func,
260
260
  /**
261
261
  * Callback fired when the `content` slot of a given Tree Item is clicked.
262
262
  * @param {React.MouseEvent} event The DOM event that triggered the change.
263
- * @param {string} itemId The id of the focused item.
263
+ * @param {TreeViewItemId} itemId The id of the focused item.
264
264
  */
265
265
  onItemClick: _propTypes.default.func,
266
266
  /**
267
267
  * Callback fired when a Tree Item is expanded or collapsed.
268
268
  * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemExpansion()` method.
269
- * @param {array} itemId The itemId of the modified item.
269
+ * @param {TreeViewItemId} itemId The itemId of the modified item.
270
270
  * @param {boolean} isExpanded `true` if the item has just been expanded, `false` if it has just been collapsed.
271
271
  */
272
272
  onItemExpansionToggle: _propTypes.default.func,
273
273
  /**
274
274
  * Callback fired when a given Tree Item is focused.
275
275
  * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event.
276
- * @param {string} itemId The id of the focused item.
276
+ * @param {TreeViewItemId} itemId The id of the focused item.
277
277
  */
278
278
  onItemFocus: _propTypes.default.func,
279
279
  /**
@@ -285,14 +285,14 @@ process.env.NODE_ENV !== "production" ? RichTreeView.propTypes = {
285
285
  /**
286
286
  * Callback fired when a Tree Item is selected or deselected.
287
287
  * @param {React.SyntheticEvent} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemSelection()` method.
288
- * @param {array} itemId The itemId of the modified item.
288
+ * @param {TreeViewItemId} itemId The itemId of the modified item.
289
289
  * @param {boolean} isSelected `true` if the item has just been selected, `false` if it has just been deselected.
290
290
  */
291
291
  onItemSelectionToggle: _propTypes.default.func,
292
292
  /**
293
293
  * Callback fired when Tree Items are selected/deselected.
294
294
  * @param {React.SyntheticEvent} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemSelection()` method.
295
- * @param {string[] | string} itemIds The ids of the selected items.
295
+ * @param {TreeViewItemId[] | TreeViewItemId} itemIds The ids of the selected items.
296
296
  * When `multiSelect` is `true`, this is an array of strings; when false (default) a string.
297
297
  */
298
298
  onSelectedItemsChange: _propTypes.default.func,
@@ -130,7 +130,7 @@ process.env.NODE_ENV !== "production" ? SimpleTreeView.propTypes = {
130
130
  })
131
131
  }),
132
132
  /**
133
- * If `true`, the Tree View renders a checkbox at the left of its label that allows selecting it.
133
+ * Whether the Tree View renders a checkbox at the left of its label that allows selecting it.
134
134
  * @default false
135
135
  */
136
136
  checkboxSelection: _propTypes.default.bool,
@@ -156,12 +156,12 @@ process.env.NODE_ENV !== "production" ? SimpleTreeView.propTypes = {
156
156
  */
157
157
  defaultSelectedItems: _propTypes.default.any,
158
158
  /**
159
- * If `true`, will allow focus on disabled items.
159
+ * Whether the items should be focusable when disabled.
160
160
  * @default false
161
161
  */
162
162
  disabledItemsFocusable: _propTypes.default.bool,
163
163
  /**
164
- * If `true` selection is disabled.
164
+ * Whether selection is disabled.
165
165
  * @default false
166
166
  */
167
167
  disableSelection: _propTypes.default.bool,
@@ -187,46 +187,46 @@ process.env.NODE_ENV !== "production" ? SimpleTreeView.propTypes = {
187
187
  */
188
188
  itemChildrenIndentation: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
189
189
  /**
190
- * If `true`, `ctrl` and `shift` will trigger multiselect.
190
+ * Whether multiple items can be selected.
191
191
  * @default false
192
192
  */
193
193
  multiSelect: _propTypes.default.bool,
194
194
  /**
195
195
  * Callback fired when Tree Items are expanded/collapsed.
196
196
  * @param {React.SyntheticEvent} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemExpansion()` method.
197
- * @param {array} itemIds The ids of the expanded items.
197
+ * @param {TreeViewItemId[]} itemIds The ids of the expanded items.
198
198
  */
199
199
  onExpandedItemsChange: _propTypes.default.func,
200
200
  /**
201
201
  * Callback fired when the `content` slot of a given Tree Item is clicked.
202
202
  * @param {React.MouseEvent} event The DOM event that triggered the change.
203
- * @param {string} itemId The id of the focused item.
203
+ * @param {TreeViewItemId} itemId The id of the focused item.
204
204
  */
205
205
  onItemClick: _propTypes.default.func,
206
206
  /**
207
207
  * Callback fired when a Tree Item is expanded or collapsed.
208
208
  * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemExpansion()` method.
209
- * @param {array} itemId The itemId of the modified item.
209
+ * @param {TreeViewItemId} itemId The itemId of the modified item.
210
210
  * @param {boolean} isExpanded `true` if the item has just been expanded, `false` if it has just been collapsed.
211
211
  */
212
212
  onItemExpansionToggle: _propTypes.default.func,
213
213
  /**
214
214
  * Callback fired when a given Tree Item is focused.
215
215
  * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event.
216
- * @param {string} itemId The id of the focused item.
216
+ * @param {TreeViewItemId} itemId The id of the focused item.
217
217
  */
218
218
  onItemFocus: _propTypes.default.func,
219
219
  /**
220
220
  * Callback fired when a Tree Item is selected or deselected.
221
221
  * @param {React.SyntheticEvent} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemSelection()` method.
222
- * @param {array} itemId The itemId of the modified item.
222
+ * @param {TreeViewItemId} itemId The itemId of the modified item.
223
223
  * @param {boolean} isSelected `true` if the item has just been selected, `false` if it has just been deselected.
224
224
  */
225
225
  onItemSelectionToggle: _propTypes.default.func,
226
226
  /**
227
227
  * Callback fired when Tree Items are selected/deselected.
228
228
  * @param {React.SyntheticEvent} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemSelection()` method.
229
- * @param {string[] | string} itemIds The ids of the selected items.
229
+ * @param {TreeViewItemId[] | TreeViewItemId} itemIds The ids of the selected items.
230
230
  * When `multiSelect` is `true`, this is an array of strings; when false (default) a string.
231
231
  */
232
232
  onSelectedItemsChange: _propTypes.default.func,
@@ -15,7 +15,7 @@ export declare const TreeItemErrorContainer: import("@emotion/styled").StyledCom
15
15
  export declare const TreeItemLoadingContainer: import("@emotion/styled").StyledComponent<Pick<import("@mui/material/CircularProgress").CircularProgressProps, keyof import("@mui/material/CircularProgress").CircularProgressProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
16
16
  export declare const TreeItemCheckbox: import("@emotion/styled").StyledComponent<Pick<Omit<CheckboxProps & {
17
17
  visible?: boolean;
18
- }, "ref"> & React.RefAttributes<HTMLButtonElement>, "form" | "slot" | "style" | "title" | "id" | "value" | "name" | "checked" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "readOnly" | "required" | "size" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "action" | "visible" | "icon" | "slots" | "slotProps" | "classes" | "sx" | "indeterminate" | "component" | "checkedIcon" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "inputProps" | "inputRef" | "indeterminateIcon" | keyof React.RefAttributes<HTMLButtonElement>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
18
+ }, "ref"> & React.RefAttributes<HTMLButtonElement>, "form" | "slot" | "style" | "title" | "id" | "value" | "content" | "disabled" | "slots" | "slotProps" | "className" | "classes" | "color" | "sx" | "suppressHydrationWarning" | "lang" | "name" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "icon" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "action" | "checked" | "visible" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "readOnly" | "required" | "size" | "indeterminate" | "component" | "checkedIcon" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "inputProps" | "inputRef" | "indeterminateIcon" | keyof React.RefAttributes<HTMLButtonElement>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
19
19
  type TreeItemComponent = ((props: TreeItemProps & React.RefAttributes<HTMLLIElement>) => React.JSX.Element) & {
20
20
  propTypes?: any;
21
21
  };
@@ -144,7 +144,7 @@ process.env.NODE_ENV !== "production" ? RichTreeView.propTypes = {
144
144
  })
145
145
  }),
146
146
  /**
147
- * If `true`, the Tree View renders a checkbox at the left of its label that allows selecting it.
147
+ * Whether the Tree View renders a checkbox at the left of its label that allows selecting it.
148
148
  * @default false
149
149
  */
150
150
  checkboxSelection: PropTypes.bool,
@@ -166,12 +166,12 @@ process.env.NODE_ENV !== "production" ? RichTreeView.propTypes = {
166
166
  */
167
167
  defaultSelectedItems: PropTypes.any,
168
168
  /**
169
- * If `true`, will allow focus on disabled items.
169
+ * Whether the items should be focusable when disabled.
170
170
  * @default false
171
171
  */
172
172
  disabledItemsFocusable: PropTypes.bool,
173
173
  /**
174
- * If `true` selection is disabled.
174
+ * Whether selection is disabled.
175
175
  * @default false
176
176
  */
177
177
  disableSelection: PropTypes.bool,
@@ -199,7 +199,7 @@ process.env.NODE_ENV !== "production" ? RichTreeView.propTypes = {
199
199
  *
200
200
  * @template R
201
201
  * @param {R} item The item to check.
202
- * @returns {string} The id of the item.
202
+ * @returns {TreeViewItemId} The id of the item.
203
203
  * @default (item) => item.id
204
204
  */
205
205
  getItemId: PropTypes.func,
@@ -240,33 +240,33 @@ process.env.NODE_ENV !== "production" ? RichTreeView.propTypes = {
240
240
  itemChildrenIndentation: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
241
241
  items: PropTypes.array.isRequired,
242
242
  /**
243
- * If `true`, `ctrl` and `shift` will trigger multiselect.
243
+ * Whether multiple items can be selected.
244
244
  * @default false
245
245
  */
246
246
  multiSelect: PropTypes.bool,
247
247
  /**
248
248
  * Callback fired when Tree Items are expanded/collapsed.
249
249
  * @param {React.SyntheticEvent} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemExpansion()` method.
250
- * @param {array} itemIds The ids of the expanded items.
250
+ * @param {TreeViewItemId[]} itemIds The ids of the expanded items.
251
251
  */
252
252
  onExpandedItemsChange: PropTypes.func,
253
253
  /**
254
254
  * Callback fired when the `content` slot of a given Tree Item is clicked.
255
255
  * @param {React.MouseEvent} event The DOM event that triggered the change.
256
- * @param {string} itemId The id of the focused item.
256
+ * @param {TreeViewItemId} itemId The id of the focused item.
257
257
  */
258
258
  onItemClick: PropTypes.func,
259
259
  /**
260
260
  * Callback fired when a Tree Item is expanded or collapsed.
261
261
  * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemExpansion()` method.
262
- * @param {array} itemId The itemId of the modified item.
262
+ * @param {TreeViewItemId} itemId The itemId of the modified item.
263
263
  * @param {boolean} isExpanded `true` if the item has just been expanded, `false` if it has just been collapsed.
264
264
  */
265
265
  onItemExpansionToggle: PropTypes.func,
266
266
  /**
267
267
  * Callback fired when a given Tree Item is focused.
268
268
  * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event.
269
- * @param {string} itemId The id of the focused item.
269
+ * @param {TreeViewItemId} itemId The id of the focused item.
270
270
  */
271
271
  onItemFocus: PropTypes.func,
272
272
  /**
@@ -278,14 +278,14 @@ process.env.NODE_ENV !== "production" ? RichTreeView.propTypes = {
278
278
  /**
279
279
  * Callback fired when a Tree Item is selected or deselected.
280
280
  * @param {React.SyntheticEvent} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemSelection()` method.
281
- * @param {array} itemId The itemId of the modified item.
281
+ * @param {TreeViewItemId} itemId The itemId of the modified item.
282
282
  * @param {boolean} isSelected `true` if the item has just been selected, `false` if it has just been deselected.
283
283
  */
284
284
  onItemSelectionToggle: PropTypes.func,
285
285
  /**
286
286
  * Callback fired when Tree Items are selected/deselected.
287
287
  * @param {React.SyntheticEvent} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemSelection()` method.
288
- * @param {string[] | string} itemIds The ids of the selected items.
288
+ * @param {TreeViewItemId[] | TreeViewItemId} itemIds The ids of the selected items.
289
289
  * When `multiSelect` is `true`, this is an array of strings; when false (default) a string.
290
290
  */
291
291
  onSelectedItemsChange: PropTypes.func,
@@ -123,7 +123,7 @@ process.env.NODE_ENV !== "production" ? SimpleTreeView.propTypes = {
123
123
  })
124
124
  }),
125
125
  /**
126
- * If `true`, the Tree View renders a checkbox at the left of its label that allows selecting it.
126
+ * Whether the Tree View renders a checkbox at the left of its label that allows selecting it.
127
127
  * @default false
128
128
  */
129
129
  checkboxSelection: PropTypes.bool,
@@ -149,12 +149,12 @@ process.env.NODE_ENV !== "production" ? SimpleTreeView.propTypes = {
149
149
  */
150
150
  defaultSelectedItems: PropTypes.any,
151
151
  /**
152
- * If `true`, will allow focus on disabled items.
152
+ * Whether the items should be focusable when disabled.
153
153
  * @default false
154
154
  */
155
155
  disabledItemsFocusable: PropTypes.bool,
156
156
  /**
157
- * If `true` selection is disabled.
157
+ * Whether selection is disabled.
158
158
  * @default false
159
159
  */
160
160
  disableSelection: PropTypes.bool,
@@ -180,46 +180,46 @@ process.env.NODE_ENV !== "production" ? SimpleTreeView.propTypes = {
180
180
  */
181
181
  itemChildrenIndentation: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
182
182
  /**
183
- * If `true`, `ctrl` and `shift` will trigger multiselect.
183
+ * Whether multiple items can be selected.
184
184
  * @default false
185
185
  */
186
186
  multiSelect: PropTypes.bool,
187
187
  /**
188
188
  * Callback fired when Tree Items are expanded/collapsed.
189
189
  * @param {React.SyntheticEvent} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemExpansion()` method.
190
- * @param {array} itemIds The ids of the expanded items.
190
+ * @param {TreeViewItemId[]} itemIds The ids of the expanded items.
191
191
  */
192
192
  onExpandedItemsChange: PropTypes.func,
193
193
  /**
194
194
  * Callback fired when the `content` slot of a given Tree Item is clicked.
195
195
  * @param {React.MouseEvent} event The DOM event that triggered the change.
196
- * @param {string} itemId The id of the focused item.
196
+ * @param {TreeViewItemId} itemId The id of the focused item.
197
197
  */
198
198
  onItemClick: PropTypes.func,
199
199
  /**
200
200
  * Callback fired when a Tree Item is expanded or collapsed.
201
201
  * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemExpansion()` method.
202
- * @param {array} itemId The itemId of the modified item.
202
+ * @param {TreeViewItemId} itemId The itemId of the modified item.
203
203
  * @param {boolean} isExpanded `true` if the item has just been expanded, `false` if it has just been collapsed.
204
204
  */
205
205
  onItemExpansionToggle: PropTypes.func,
206
206
  /**
207
207
  * Callback fired when a given Tree Item is focused.
208
208
  * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event.
209
- * @param {string} itemId The id of the focused item.
209
+ * @param {TreeViewItemId} itemId The id of the focused item.
210
210
  */
211
211
  onItemFocus: PropTypes.func,
212
212
  /**
213
213
  * Callback fired when a Tree Item is selected or deselected.
214
214
  * @param {React.SyntheticEvent} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemSelection()` method.
215
- * @param {array} itemId The itemId of the modified item.
215
+ * @param {TreeViewItemId} itemId The itemId of the modified item.
216
216
  * @param {boolean} isSelected `true` if the item has just been selected, `false` if it has just been deselected.
217
217
  */
218
218
  onItemSelectionToggle: PropTypes.func,
219
219
  /**
220
220
  * Callback fired when Tree Items are selected/deselected.
221
221
  * @param {React.SyntheticEvent} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemSelection()` method.
222
- * @param {string[] | string} itemIds The ids of the selected items.
222
+ * @param {TreeViewItemId[] | TreeViewItemId} itemIds The ids of the selected items.
223
223
  * When `multiSelect` is `true`, this is an array of strings; when false (default) a string.
224
224
  */
225
225
  onSelectedItemsChange: PropTypes.func,
@@ -15,7 +15,7 @@ export declare const TreeItemErrorContainer: import("@emotion/styled").StyledCom
15
15
  export declare const TreeItemLoadingContainer: import("@emotion/styled").StyledComponent<Pick<import("@mui/material/CircularProgress").CircularProgressProps, keyof import("@mui/material/CircularProgress").CircularProgressProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
16
16
  export declare const TreeItemCheckbox: import("@emotion/styled").StyledComponent<Pick<Omit<CheckboxProps & {
17
17
  visible?: boolean;
18
- }, "ref"> & React.RefAttributes<HTMLButtonElement>, "form" | "slot" | "style" | "title" | "id" | "value" | "name" | "checked" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "readOnly" | "required" | "size" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "action" | "visible" | "icon" | "slots" | "slotProps" | "classes" | "sx" | "indeterminate" | "component" | "checkedIcon" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "inputProps" | "inputRef" | "indeterminateIcon" | keyof React.RefAttributes<HTMLButtonElement>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
18
+ }, "ref"> & React.RefAttributes<HTMLButtonElement>, "form" | "slot" | "style" | "title" | "id" | "value" | "content" | "disabled" | "slots" | "slotProps" | "className" | "classes" | "color" | "sx" | "suppressHydrationWarning" | "lang" | "name" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "icon" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "action" | "checked" | "visible" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "readOnly" | "required" | "size" | "indeterminate" | "component" | "checkedIcon" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "inputProps" | "inputRef" | "indeterminateIcon" | keyof React.RefAttributes<HTMLButtonElement>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
19
19
  type TreeItemComponent = ((props: TreeItemProps & React.RefAttributes<HTMLLIElement>) => React.JSX.Element) & {
20
20
  propTypes?: any;
21
21
  };
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view v8.17.0
2
+ * @mui/x-tree-view v8.18.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -8,12 +8,12 @@ export interface UseTreeViewExpansionPublicAPI {
8
8
  /**
9
9
  * Change the expansion status of a given item.
10
10
  * @param {object} parameters The parameters of the method.
11
- * @param {string} parameters.itemId The id of the item to expand of collapse.
11
+ * @param {TreeViewItemId} parameters.itemId The id of the item to expand of collapse.
12
12
  * @param {React.SyntheticEvent} parameters.event The DOM event that triggered the change.
13
13
  * @param {boolean} parameters.shouldBeExpanded If `true` the item will be expanded. If `false` the item will be collapsed. If not defined, the item's expansion status will be the toggled.
14
14
  */
15
15
  setItemExpansion: (parameters: {
16
- itemId: string;
16
+ itemId: TreeViewItemId;
17
17
  event?: React.SyntheticEvent;
18
18
  shouldBeExpanded?: boolean;
19
19
  }) => void;
@@ -36,12 +36,12 @@ export interface UseTreeViewExpansionInstance extends Omit<UseTreeViewExpansionP
36
36
  * Is used by the `setItemExpansion` method and by the `useTreeViewLazyLoading` plugin.
37
37
  * Unlike `setItemExpansion`, this method does not trigger the lazy loading.
38
38
  * @param {object} parameters The parameters of the method.
39
- * @param {string} parameters.itemId The id of the item to expand of collapse.
39
+ * @param {TreeViewItemId} parameters.itemId The id of the item to expand of collapse.
40
40
  * @param {React.SyntheticEvent | null} parameters.event The DOM event that triggered the change.
41
41
  * @param {boolean} parameters.shouldBeExpanded If `true` the item will be expanded. If `false` the item will be collapsed.
42
42
  */
43
43
  applyItemExpansion: (parameters: {
44
- itemId: string;
44
+ itemId: TreeViewItemId;
45
45
  event: React.SyntheticEvent | null;
46
46
  shouldBeExpanded: boolean;
47
47
  }) => void;
@@ -55,26 +55,26 @@ export interface UseTreeViewExpansionParameters {
55
55
  * Expanded item ids.
56
56
  * Used when the item's expansion is controlled.
57
57
  */
58
- expandedItems?: readonly string[];
58
+ expandedItems?: readonly TreeViewItemId[];
59
59
  /**
60
60
  * Expanded item ids.
61
61
  * Used when the item's expansion is not controlled.
62
62
  * @default []
63
63
  */
64
- defaultExpandedItems?: readonly string[];
64
+ defaultExpandedItems?: readonly TreeViewItemId[];
65
65
  /**
66
66
  * Callback fired when Tree Items are expanded/collapsed.
67
67
  * @param {React.SyntheticEvent} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemExpansion()` method.
68
- * @param {array} itemIds The ids of the expanded items.
68
+ * @param {TreeViewItemId[]} itemIds The ids of the expanded items.
69
69
  */
70
- onExpandedItemsChange?: (event: React.SyntheticEvent | null, itemIds: string[]) => void;
70
+ onExpandedItemsChange?: (event: React.SyntheticEvent | null, itemIds: TreeViewItemId[]) => void;
71
71
  /**
72
72
  * Callback fired when a Tree Item is expanded or collapsed.
73
73
  * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemExpansion()` method.
74
- * @param {array} itemId The itemId of the modified item.
74
+ * @param {TreeViewItemId} itemId The itemId of the modified item.
75
75
  * @param {boolean} isExpanded `true` if the item has just been expanded, `false` if it has just been collapsed.
76
76
  */
77
- onItemExpansionToggle?: (event: React.SyntheticEvent | null, itemId: string, isExpanded: boolean) => void;
77
+ onItemExpansionToggle?: (event: React.SyntheticEvent | null, itemId: TreeViewItemId, isExpanded: boolean) => void;
78
78
  /**
79
79
  * The slot that triggers the item's expansion when clicked.
80
80
  * @default 'content'
@@ -84,7 +84,7 @@ export interface UseTreeViewExpansionParameters {
84
84
  export type UseTreeViewExpansionParametersWithDefaults = DefaultizedProps<UseTreeViewExpansionParameters, 'defaultExpandedItems'>;
85
85
  export interface UseTreeViewExpansionState {
86
86
  expansion: {
87
- expandedItems: readonly string[];
87
+ expandedItems: readonly TreeViewItemId[];
88
88
  expansionTrigger: 'content' | 'iconContainer';
89
89
  };
90
90
  }