@react-md/core 1.0.0-next.0 → 1.0.0-next.10

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 (1594) hide show
  1. package/.stylelintrc.json +14 -0
  2. package/.turbo/turbo-build.log +11 -7
  3. package/.turbo/turbo-lint.log +12 -0
  4. package/.turbo/turbo-test.log +5512 -0
  5. package/.turbo/turbo-typecheck.log +4 -0
  6. package/CHANGELOG.md +234 -0
  7. package/README.md +39 -24
  8. package/coverage/clover.xml +3 -1118
  9. package/coverage/coverage-final.json +1 -7
  10. package/coverage/lcov-report/AutoComplete.tsx.html +283 -0
  11. package/coverage/lcov-report/Avatar.tsx.html +472 -0
  12. package/coverage/lcov-report/CircularProgress.tsx.html +799 -0
  13. package/coverage/lcov-report/DefaultToastRenderer.tsx.html +166 -112
  14. package/coverage/lcov-report/Dialog.tsx.html +1309 -0
  15. package/coverage/lcov-report/DialogContent.tsx.html +178 -0
  16. package/coverage/lcov-report/DialogFooter.tsx.html +169 -0
  17. package/coverage/lcov-report/IconRotator.tsx.html +322 -0
  18. package/coverage/lcov-report/LinearProgress.tsx.html +658 -0
  19. package/coverage/lcov-report/ListItem.tsx.html +892 -0
  20. package/coverage/lcov-report/ListItemLink.tsx.html +616 -0
  21. package/coverage/lcov-report/MaterialIcon.tsx.html +36 -42
  22. package/coverage/lcov-report/MaterialSymbol.tsx.html +240 -222
  23. package/coverage/lcov-report/MenuItemCheckbox.tsx.html +223 -0
  24. package/coverage/lcov-report/MenuItemInputToggle.tsx.html +925 -0
  25. package/coverage/lcov-report/MenuItemRadio.tsx.html +436 -0
  26. package/coverage/lcov-report/MenuItemSeparator.tsx.html +223 -0
  27. package/coverage/lcov-report/MenuItemTextField.tsx.html +289 -0
  28. package/coverage/lcov-report/Portal.tsx.html +223 -0
  29. package/coverage/lcov-report/PortalContainerProvider.tsx.html +367 -0
  30. package/coverage/lcov-report/RootHtml.tsx.html +370 -0
  31. package/coverage/lcov-report/Select.tsx.html +1411 -0
  32. package/coverage/lcov-report/SkeletonPlaceholder.tsx.html +613 -0
  33. package/coverage/lcov-report/Snackbar.tsx.html +360 -402
  34. package/coverage/lcov-report/SrOnly.tsx.html +328 -0
  35. package/coverage/lcov-report/Switch.tsx.html +535 -0
  36. package/coverage/lcov-report/SwitchTrack.tsx.html +262 -0
  37. package/coverage/lcov-report/Tab.tsx.html +261 -147
  38. package/coverage/lcov-report/Table.tsx.html +457 -0
  39. package/coverage/lcov-report/TableCell.tsx.html +982 -0
  40. package/coverage/lcov-report/TableCheckbox.tsx.html +709 -0
  41. package/coverage/lcov-report/TableContainer.tsx.html +220 -0
  42. package/coverage/lcov-report/TableFooter.tsx.html +502 -0
  43. package/coverage/lcov-report/TableHeader.tsx.html +541 -0
  44. package/coverage/lcov-report/TableRadio.tsx.html +670 -0
  45. package/coverage/lcov-report/TableRow.tsx.html +289 -0
  46. package/coverage/lcov-report/Toast.tsx.html +868 -0
  47. package/coverage/lcov-report/ToastManager.tsx.html +1783 -0
  48. package/coverage/lcov-report/ToastManagerProvider.tsx.html +216 -216
  49. package/coverage/lcov-report/Tooltip.tsx.html +98 -155
  50. package/coverage/lcov-report/TreeGroup.tsx.html +313 -0
  51. package/coverage/lcov-report/Typography.tsx.html +1027 -0
  52. package/coverage/lcov-report/app-bar/AppBar.tsx.html +178 -28
  53. package/coverage/lcov-report/app-bar/index.html +7 -7
  54. package/coverage/lcov-report/autocomplete/AutoComplete.tsx.html +283 -0
  55. package/coverage/lcov-report/autocomplete/Autocomplete.tsx.html +475 -0
  56. package/coverage/lcov-report/autocomplete/AutocompleteGeneric.tsx.html +304 -0
  57. package/coverage/lcov-report/autocomplete/index.html +221 -0
  58. package/coverage/lcov-report/autocomplete/useAutoComplete.ts.html +775 -0
  59. package/coverage/lcov-report/autocomplete/useAutocomplete.ts.html +1273 -0
  60. package/coverage/lcov-report/autocomplete/useAutocompleteAgain.ts.html +829 -0
  61. package/coverage/lcov-report/autocomplete/useAutocompletev2.ts.html +715 -0
  62. package/coverage/lcov-report/autocomplete/useInlineAutoComplete.ts.html +340 -0
  63. package/coverage/lcov-report/autocomplete/useInlineAutocomplete.ts.html +430 -0
  64. package/coverage/lcov-report/autocomplete/useInlineSelection.ts.html +310 -0
  65. package/coverage/lcov-report/autocomplete/utils.ts.html +196 -0
  66. package/coverage/lcov-report/avatar/Avatar.tsx.html +175 -106
  67. package/coverage/lcov-report/avatar/index.html +19 -19
  68. package/coverage/lcov-report/avatar/styles.ts.html +268 -0
  69. package/coverage/lcov-report/button/AsyncButton.tsx.html +217 -10
  70. package/coverage/lcov-report/button/Button.tsx.html +97 -85
  71. package/coverage/lcov-report/button/TooltippedButton.tsx.html +445 -0
  72. package/coverage/lcov-report/button/index.html +10 -10
  73. package/coverage/lcov-report/card/Card.tsx.html +349 -0
  74. package/coverage/lcov-report/card/CardContent.tsx.html +223 -0
  75. package/coverage/lcov-report/card/ClickableCard.tsx.html +400 -0
  76. package/coverage/lcov-report/card/index.html +21 -21
  77. package/coverage/lcov-report/card/styles.ts.html +428 -392
  78. package/coverage/lcov-report/config.ts.html +33 -18
  79. package/coverage/lcov-report/cssUtils.ts.html +171 -66
  80. package/coverage/lcov-report/dialog/Dialog.tsx.html +170 -167
  81. package/coverage/lcov-report/dialog/DialogContent.tsx.html +178 -0
  82. package/coverage/lcov-report/dialog/DialogFooter.tsx.html +169 -0
  83. package/coverage/lcov-report/dialog/DialogHeader.tsx.html +148 -0
  84. package/coverage/lcov-report/dialog/DialogTitle.tsx.html +256 -0
  85. package/coverage/lcov-report/dialog/index.html +28 -28
  86. package/coverage/lcov-report/dialog/styles.ts.html +439 -0
  87. package/coverage/lcov-report/draggable/index.html +21 -36
  88. package/coverage/lcov-report/draggable/useDraggable.ts.html +377 -368
  89. package/coverage/lcov-report/draggable/utils.ts.html +96 -195
  90. package/coverage/lcov-report/expansion-panel/ExpansionList.tsx.html +211 -0
  91. package/coverage/lcov-report/expansion-panel/ExpansionPanel.tsx.html +12 -15
  92. package/coverage/lcov-report/expansion-panel/index.html +34 -19
  93. package/coverage/lcov-report/expansion-panel/useExpansionPanels.ts.html +928 -0
  94. package/coverage/lcov-report/form/AutoComplete.tsx.html +283 -0
  95. package/coverage/lcov-report/form/Form.tsx.html +22 -22
  96. package/coverage/lcov-report/form/Label.tsx.html +442 -0
  97. package/coverage/lcov-report/form/MenuItemInputToggle.tsx.html +37 -25
  98. package/coverage/lcov-report/form/MenuItemTextField.tsx.html +12 -9
  99. package/coverage/lcov-report/form/OptGroup.tsx.html +169 -166
  100. package/coverage/lcov-report/form/Option.tsx.html +727 -0
  101. package/coverage/lcov-report/form/ResizingTextArea.tsx.html +442 -0
  102. package/coverage/lcov-report/form/ResizingTextAreaWrapper.tsx.html +310 -0
  103. package/coverage/lcov-report/form/Select.tsx.html +1456 -0
  104. package/coverage/lcov-report/form/SelectOriginal.tsx.html +1630 -0
  105. package/coverage/lcov-report/form/SelectV2.tsx.html +1024 -0
  106. package/coverage/lcov-report/form/SelectedOption.tsx.html +250 -0
  107. package/coverage/lcov-report/form/SimpleTextArea.tsx.html +727 -0
  108. package/coverage/lcov-report/form/Slider.tsx.html +163 -40
  109. package/coverage/lcov-report/form/SliderValueTooltip.tsx.html +319 -0
  110. package/coverage/lcov-report/form/Switch.tsx.html +310 -385
  111. package/coverage/lcov-report/form/SwitchTrack.tsx.html +98 -71
  112. package/coverage/lcov-report/form/TextArea.tsx.html +596 -740
  113. package/coverage/lcov-report/form/TextArea2.tsx.html +985 -0
  114. package/coverage/lcov-report/form/TextAreaBackup.tsx.html +1006 -0
  115. package/coverage/lcov-report/form/TextField.tsx.html +156 -234
  116. package/coverage/lcov-report/form/index.html +34 -169
  117. package/coverage/lcov-report/form/selectUtils.ts.html +188 -221
  118. package/coverage/lcov-report/form/switchStyles.ts.html +172 -0
  119. package/coverage/lcov-report/form/textAreaStyles.ts.html +8 -11
  120. package/coverage/lcov-report/form/useAutoComplete.ts.html +787 -0
  121. package/coverage/lcov-report/form/useCombobox.ts.html +454 -460
  122. package/coverage/lcov-report/form/useComboboxList.ts.html +108 -93
  123. package/coverage/lcov-report/form/useFormReset.ts.html +229 -0
  124. package/coverage/lcov-report/form/useInlineAutoComplete.ts.html +379 -0
  125. package/coverage/lcov-report/form/useRadioGroup.ts.html +79 -79
  126. package/coverage/lcov-report/form/useResizingTextArea.ts.html +631 -0
  127. package/coverage/lcov-report/form/useResizingTextArea2.ts.html +631 -0
  128. package/coverage/lcov-report/form/useSelectCombobox.ts.html +499 -0
  129. package/coverage/lcov-report/form/utils.ts.html +209 -170
  130. package/coverage/lcov-report/getListItemHeight.ts.html +298 -0
  131. package/coverage/lcov-report/hoverMode/index.html +116 -0
  132. package/coverage/lcov-report/hoverMode/useHoverMode.ts.html +676 -0
  133. package/coverage/lcov-report/icon/FontIcon.tsx.html +69 -78
  134. package/coverage/lcov-report/icon/MaterialIcon.tsx.html +235 -0
  135. package/coverage/lcov-report/icon/index.html +20 -20
  136. package/coverage/lcov-report/icon/styles.ts.html +41 -104
  137. package/coverage/lcov-report/iconConfig.tsx.html +973 -0
  138. package/coverage/lcov-report/index.html +11 -101
  139. package/coverage/lcov-report/interaction/UserInteractionModeProvider.tsx.html +679 -0
  140. package/coverage/lcov-report/interaction/config.ts.html +181 -0
  141. package/coverage/lcov-report/interaction/index.html +33 -18
  142. package/coverage/lcov-report/link/Link.tsx.html +358 -0
  143. package/coverage/lcov-report/link/index.html +20 -20
  144. package/coverage/lcov-report/list/List.tsx.html +490 -0
  145. package/coverage/lcov-report/list/ListItem.tsx.html +886 -0
  146. package/coverage/lcov-report/list/ListItemAddon.tsx.html +286 -0
  147. package/coverage/lcov-report/list/ListItemChildren.tsx.html +445 -0
  148. package/coverage/lcov-report/list/ListItemLink.tsx.html +32 -38
  149. package/coverage/lcov-report/list/index.html +64 -19
  150. package/coverage/lcov-report/list/listItemStyles.ts.html +703 -0
  151. package/coverage/lcov-report/materialConfig.ts.html +703 -0
  152. package/coverage/lcov-report/media-queries/appSize.ts.html +1 -1
  153. package/coverage/lcov-report/media-queries/index.html +10 -10
  154. package/coverage/lcov-report/menu/DropdownMenu.tsx.html +976 -0
  155. package/coverage/lcov-report/menu/Menu.tsx.html +357 -282
  156. package/coverage/lcov-report/menu/MenuConfigurationProvider.tsx.html +637 -0
  157. package/coverage/lcov-report/menu/MenuItem.tsx.html +292 -0
  158. package/coverage/lcov-report/menu/MenuItemCircularProgress.tsx.html +433 -0
  159. package/coverage/lcov-report/menu/MenuSheet.tsx.html +37 -13
  160. package/coverage/lcov-report/menu/MenuVisibilityProvider.tsx.html +48 -33
  161. package/coverage/lcov-report/menu/index.html +14 -74
  162. package/coverage/lcov-report/menu/menuConfig.ts.html +118 -0
  163. package/coverage/lcov-report/menu/useContextMenu.ts.html +490 -0
  164. package/coverage/lcov-report/menuItemInputToggleStyles.ts.html +319 -0
  165. package/coverage/lcov-report/movement/index.html +19 -19
  166. package/coverage/lcov-report/movement/useKeyboardMovementProvider.ts.html +422 -383
  167. package/coverage/lcov-report/positioning/constants.ts.html +463 -0
  168. package/coverage/lcov-report/positioning/index.html +30 -30
  169. package/coverage/lcov-report/positioning/useFixedPositioning.ts.html +1321 -0
  170. package/coverage/lcov-report/progress/CircularProgress.tsx.html +799 -0
  171. package/coverage/lcov-report/progress/LinearProgress.tsx.html +100 -94
  172. package/coverage/lcov-report/progress/index.html +19 -19
  173. package/coverage/lcov-report/searching/caseInsensitive.ts.html +685 -0
  174. package/coverage/lcov-report/searching/fuzzy.ts.html +610 -0
  175. package/coverage/lcov-report/searching/index.html +146 -0
  176. package/coverage/lcov-report/searching/toSearchQuery.ts.html +145 -0
  177. package/coverage/lcov-report/searching/useFuzzyMatch.ts.html +211 -0
  178. package/coverage/lcov-report/searching/utils.ts.html +244 -0
  179. package/coverage/lcov-report/sheet/index.html +8 -8
  180. package/coverage/lcov-report/sheet/styles.ts.html +376 -0
  181. package/coverage/lcov-report/skeletonPlaceholderUtils.ts.html +400 -0
  182. package/coverage/lcov-report/snackbar/Snackbar.tsx.html +55 -97
  183. package/coverage/lcov-report/snackbar/Toast.tsx.html +546 -501
  184. package/coverage/lcov-report/snackbar/ToastManager.tsx.html +269 -269
  185. package/coverage/lcov-report/snackbar/ToastManagerProvider.tsx.html +23 -23
  186. package/coverage/lcov-report/snackbar/index.html +59 -14
  187. package/coverage/lcov-report/snackbar/snackbarStyles.ts.html +12 -87
  188. package/coverage/lcov-report/snackbar/toastStyles.ts.html +206 -146
  189. package/coverage/lcov-report/snackbar/useCurrentToastActions.ts.html +226 -0
  190. package/coverage/lcov-report/snackbarStyles.ts.html +46 -121
  191. package/coverage/lcov-report/src/CoreProviders.tsx.html +20 -20
  192. package/coverage/lcov-report/src/NoSsr.tsx.html +1 -1
  193. package/coverage/lcov-report/src/RootHtml.tsx.html +370 -0
  194. package/coverage/lcov-report/src/SsrProvider.tsx.html +10 -10
  195. package/coverage/lcov-report/src/app-bar/AppBar.tsx.html +207 -87
  196. package/coverage/lcov-report/src/app-bar/AppBarTitle.tsx.html +1 -1
  197. package/coverage/lcov-report/src/app-bar/index.html +20 -5
  198. package/coverage/lcov-report/src/autocomplete/Autocomplete.tsx.html +364 -0
  199. package/coverage/lcov-report/src/autocomplete/AutocompleteGeneric.tsx.html +304 -0
  200. package/coverage/lcov-report/src/autocomplete/index.html +221 -0
  201. package/coverage/lcov-report/src/autocomplete/useAutocomplete.ts.html +637 -0
  202. package/coverage/lcov-report/src/autocomplete/useAutocompleteAgain.ts.html +829 -0
  203. package/coverage/lcov-report/src/autocomplete/useAutocompletev2.ts.html +715 -0
  204. package/coverage/lcov-report/src/autocomplete/useInlineAutocomplete.ts.html +430 -0
  205. package/coverage/lcov-report/src/autocomplete/useInlineSelection.ts.html +241 -0
  206. package/coverage/lcov-report/src/autocomplete/utils.ts.html +196 -0
  207. package/coverage/lcov-report/src/avatar/Avatar.tsx.html +36 -27
  208. package/coverage/lcov-report/src/avatar/index.html +22 -7
  209. package/coverage/lcov-report/src/avatar/styles.ts.html +77 -8
  210. package/coverage/lcov-report/src/badge/Badge.tsx.html +1 -1
  211. package/coverage/lcov-report/src/badge/index.html +1 -1
  212. package/coverage/lcov-report/src/box/Box.tsx.html +1 -1
  213. package/coverage/lcov-report/src/box/index.html +9 -9
  214. package/coverage/lcov-report/src/box/styles.ts.html +105 -51
  215. package/coverage/lcov-report/src/button/AsyncButton.tsx.html +833 -284
  216. package/coverage/lcov-report/src/button/Button.tsx.html +81 -81
  217. package/coverage/lcov-report/src/button/ButtonUnstyled.tsx.html +1 -1
  218. package/coverage/lcov-report/src/button/FloatingActionButton.tsx.html +39 -39
  219. package/coverage/lcov-report/src/button/TooltippedButton.tsx.html +445 -0
  220. package/coverage/lcov-report/src/button/buttonStyles.ts.html +59 -59
  221. package/coverage/lcov-report/src/button/buttonUnstyledStyles.ts.html +1 -1
  222. package/coverage/lcov-report/src/button/index.html +1 -1
  223. package/coverage/lcov-report/src/card/Card.tsx.html +37 -31
  224. package/coverage/lcov-report/src/card/CardContent.tsx.html +4 -4
  225. package/coverage/lcov-report/src/card/CardFooter.tsx.html +1 -1
  226. package/coverage/lcov-report/src/card/CardHeader.tsx.html +1 -1
  227. package/coverage/lcov-report/src/card/CardSubtitle.tsx.html +1 -1
  228. package/coverage/lcov-report/src/card/CardTitle.tsx.html +1 -1
  229. package/coverage/lcov-report/src/card/ClickableCard.tsx.html +400 -0
  230. package/coverage/lcov-report/src/card/index.html +112 -7
  231. package/coverage/lcov-report/src/card/styles.ts.html +58 -31
  232. package/coverage/lcov-report/src/chip/Chip.tsx.html +1 -1
  233. package/coverage/lcov-report/src/chip/index.html +7 -7
  234. package/coverage/lcov-report/src/chip/styles.ts.html +9 -12
  235. package/coverage/lcov-report/src/cssUtils.ts.html +68 -59
  236. package/coverage/lcov-report/src/delegateEvent.ts.html +110 -110
  237. package/coverage/lcov-report/src/dialog/Dialog.tsx.html +158 -155
  238. package/coverage/lcov-report/src/dialog/DialogContainer.tsx.html +27 -27
  239. package/coverage/lcov-report/src/dialog/DialogContent.tsx.html +72 -72
  240. package/coverage/lcov-report/src/dialog/DialogFooter.tsx.html +14 -14
  241. package/coverage/lcov-report/src/dialog/DialogHeader.tsx.html +9 -9
  242. package/coverage/lcov-report/src/dialog/DialogTitle.tsx.html +124 -124
  243. package/coverage/lcov-report/src/dialog/FixedDialog.tsx.html +1 -1
  244. package/coverage/lcov-report/src/dialog/NestedDialogProvider.ts.html +3 -3
  245. package/coverage/lcov-report/src/dialog/index.html +133 -13
  246. package/coverage/lcov-report/src/dialog/styles.ts.html +61 -61
  247. package/coverage/lcov-report/src/divider/Divider.tsx.html +27 -30
  248. package/coverage/lcov-report/src/divider/index.html +23 -8
  249. package/coverage/lcov-report/src/divider/styles.ts.html +11 -11
  250. package/coverage/lcov-report/src/draggable/index.html +27 -27
  251. package/coverage/lcov-report/src/draggable/useDraggable.ts.html +365 -362
  252. package/coverage/lcov-report/src/draggable/utils.ts.html +94 -196
  253. package/coverage/lcov-report/src/expansion-panel/ExpansionList.tsx.html +1 -1
  254. package/coverage/lcov-report/src/expansion-panel/ExpansionPanel.tsx.html +1 -1
  255. package/coverage/lcov-report/src/expansion-panel/ExpansionPanelHeader.tsx.html +11 -20
  256. package/coverage/lcov-report/src/expansion-panel/index.html +30 -15
  257. package/coverage/lcov-report/src/expansion-panel/useExpansionList.ts.html +1 -1
  258. package/coverage/lcov-report/src/expansion-panel/useExpansionPanels.ts.html +36 -24
  259. package/coverage/lcov-report/src/focus/index.html +23 -23
  260. package/coverage/lcov-report/src/focus/useFocusContainer.ts.html +142 -121
  261. package/coverage/lcov-report/src/focus/utils.ts.html +37 -37
  262. package/coverage/lcov-report/src/form/AutoComplete.tsx.html +283 -0
  263. package/coverage/lcov-report/src/form/Checkbox.tsx.html +1 -1
  264. package/coverage/lcov-report/src/form/Fieldset.tsx.html +1 -1
  265. package/coverage/lcov-report/src/form/FileInput.tsx.html +133 -139
  266. package/coverage/lcov-report/src/form/Form.tsx.html +11 -8
  267. package/coverage/lcov-report/src/form/FormMessage.tsx.html +126 -264
  268. package/coverage/lcov-report/src/form/FormMessageContainer.tsx.html +42 -45
  269. package/coverage/lcov-report/src/form/FormMessageCounter.tsx.html +1 -1
  270. package/coverage/lcov-report/src/form/InputToggle.tsx.html +116 -125
  271. package/coverage/lcov-report/src/form/InputToggleIcon.tsx.html +63 -63
  272. package/coverage/lcov-report/src/form/Label.tsx.html +107 -107
  273. package/coverage/lcov-report/src/form/Legend.tsx.html +1 -1
  274. package/coverage/lcov-report/src/form/MenuItemCheckbox.tsx.html +13 -7
  275. package/coverage/lcov-report/src/form/MenuItemFileInput.tsx.html +3 -3
  276. package/coverage/lcov-report/src/form/MenuItemInputToggle.tsx.html +179 -221
  277. package/coverage/lcov-report/src/form/MenuItemRadio.tsx.html +13 -7
  278. package/coverage/lcov-report/src/form/MenuItemSwitch.tsx.html +1 -1
  279. package/coverage/lcov-report/src/form/MenuItemTextField.tsx.html +13 -4
  280. package/coverage/lcov-report/src/form/NativeSelect.tsx.html +20 -5
  281. package/coverage/lcov-report/src/form/OptGroup.tsx.html +1 -1
  282. package/coverage/lcov-report/src/form/Option.tsx.html +4 -4
  283. package/coverage/lcov-report/src/form/Password.tsx.html +3 -3
  284. package/coverage/lcov-report/src/form/Radio.tsx.html +3 -3
  285. package/coverage/lcov-report/src/form/ResizingTextArea.tsx.html +988 -0
  286. package/coverage/lcov-report/src/form/ResizingTextAreaWrapper.tsx.html +310 -0
  287. package/coverage/lcov-report/src/form/Select.tsx.html +894 -1122
  288. package/coverage/lcov-report/src/form/SelectValue.tsx.html +1 -1
  289. package/coverage/lcov-report/src/form/SimpleTextArea.tsx.html +694 -0
  290. package/coverage/lcov-report/src/form/Slider.tsx.html +129 -9
  291. package/coverage/lcov-report/src/form/SliderContainer.tsx.html +1 -1
  292. package/coverage/lcov-report/src/form/SliderMark.tsx.html +1 -1
  293. package/coverage/lcov-report/src/form/SliderMarkLabel.tsx.html +1 -1
  294. package/coverage/lcov-report/src/form/SliderThumb.tsx.html +43 -7
  295. package/coverage/lcov-report/src/form/SliderTrack.tsx.html +1 -1
  296. package/coverage/lcov-report/src/form/SliderValueMarks.tsx.html +11 -5
  297. package/coverage/lcov-report/src/form/SliderValueTooltip.tsx.html +2 -2
  298. package/coverage/lcov-report/src/form/Switch.tsx.html +310 -373
  299. package/coverage/lcov-report/src/form/SwitchTrack.tsx.html +99 -69
  300. package/coverage/lcov-report/src/form/TextArea.tsx.html +650 -572
  301. package/coverage/lcov-report/src/form/TextArea2.tsx.html +985 -0
  302. package/coverage/lcov-report/src/form/TextAreaBackup.tsx.html +985 -0
  303. package/coverage/lcov-report/src/form/TextField.tsx.html +18 -12
  304. package/coverage/lcov-report/src/form/TextFieldAddon.tsx.html +14 -26
  305. package/coverage/lcov-report/src/form/TextFieldContainer.tsx.html +28 -10
  306. package/coverage/lcov-report/src/form/TextFieldContainerStyles.ts.html +24 -15
  307. package/coverage/lcov-report/src/form/fileUtils.ts.html +3 -3
  308. package/coverage/lcov-report/src/form/formConfig.ts.html +18 -18
  309. package/coverage/lcov-report/src/form/formMessageStyles.ts.html +40 -40
  310. package/coverage/lcov-report/src/form/index.html +37 -127
  311. package/coverage/lcov-report/src/form/inputToggleStyles.ts.html +30 -30
  312. package/coverage/lcov-report/src/form/menuItemInputToggleStyles.ts.html +319 -0
  313. package/coverage/lcov-report/src/form/nativeSelectStyles.ts.html +34 -7
  314. package/coverage/lcov-report/src/form/optionStyles.ts.html +1 -1
  315. package/coverage/lcov-report/src/form/passwordStyles.ts.html +1 -1
  316. package/coverage/lcov-report/src/form/selectStyles.ts.html +1 -1
  317. package/coverage/lcov-report/src/form/selectUtils.ts.html +6 -9
  318. package/coverage/lcov-report/src/form/sliderUtils.ts.html +20 -14
  319. package/coverage/lcov-report/src/form/switchStyles.ts.html +68 -68
  320. package/coverage/lcov-report/src/form/textAreaStyles.ts.html +5 -5
  321. package/coverage/lcov-report/src/form/textFieldStyles.ts.html +1 -1
  322. package/coverage/lcov-report/src/form/useAutoComplete.ts.html +787 -0
  323. package/coverage/lcov-report/src/form/useCheckboxGroup.ts.html +2 -2
  324. package/coverage/lcov-report/src/form/useCombobox.ts.html +943 -457
  325. package/coverage/lcov-report/src/form/useEditableCombobox.ts.html +502 -0
  326. package/coverage/lcov-report/src/form/useFileUpload.ts.html +28 -19
  327. package/coverage/lcov-report/src/form/useInlineAutoComplete.ts.html +109 -0
  328. package/coverage/lcov-report/src/form/useListboxProvider.ts.html +5 -8
  329. package/coverage/lcov-report/src/form/useNumberField.ts.html +10 -10
  330. package/coverage/lcov-report/src/form/useRadioGroup.ts.html +68 -53
  331. package/coverage/lcov-report/src/form/useRangeSlider.ts.html +3 -3
  332. package/coverage/lcov-report/src/form/useResizingTextArea.ts.html +634 -0
  333. package/coverage/lcov-report/src/form/useSelectCombobox.ts.html +295 -0
  334. package/coverage/lcov-report/src/form/useSlider.ts.html +2 -2
  335. package/coverage/lcov-report/src/form/useTextField.ts.html +32 -26
  336. package/coverage/lcov-report/src/form/utils.ts.html +200 -170
  337. package/coverage/lcov-report/src/form/validation.ts.html +2 -2
  338. package/coverage/lcov-report/src/hoverMode/index.html +1 -1
  339. package/coverage/lcov-report/src/hoverMode/useHoverMode.ts.html +104 -104
  340. package/coverage/lcov-report/src/hoverMode/useHoverModeProvider.ts.html +19 -19
  341. package/coverage/lcov-report/src/icon/FontIcon.tsx.html +34 -43
  342. package/coverage/lcov-report/src/icon/IconRotator.tsx.html +5 -8
  343. package/coverage/lcov-report/src/icon/MaterialIcon.tsx.html +36 -42
  344. package/coverage/lcov-report/src/icon/MaterialSymbol.tsx.html +240 -222
  345. package/coverage/lcov-report/src/icon/SVGIcon.tsx.html +1 -1
  346. package/coverage/lcov-report/src/icon/TextIconSpacing.tsx.html +51 -51
  347. package/coverage/lcov-report/src/icon/iconConfig.tsx.html +973 -0
  348. package/coverage/lcov-report/src/icon/index.html +12 -12
  349. package/coverage/lcov-report/src/icon/material.ts.html +748 -58
  350. package/coverage/lcov-report/src/icon/materialConfig.ts.html +703 -0
  351. package/coverage/lcov-report/src/icon/styles.ts.html +47 -110
  352. package/coverage/lcov-report/src/index.html +10 -10
  353. package/coverage/lcov-report/src/interaction/Ripple.tsx.html +60 -60
  354. package/coverage/lcov-report/src/interaction/RippleContainer.tsx.html +41 -47
  355. package/coverage/lcov-report/src/interaction/UserInteractionModeProvider.tsx.html +240 -240
  356. package/coverage/lcov-report/src/interaction/config.ts.html +7 -7
  357. package/coverage/lcov-report/src/interaction/index.html +100 -10
  358. package/coverage/lcov-report/src/interaction/useElementInteraction.tsx.html +146 -146
  359. package/coverage/lcov-report/src/interaction/useHigherContrastChildren.tsx.html +19 -19
  360. package/coverage/lcov-report/src/interaction/utils.ts.html +171 -171
  361. package/coverage/lcov-report/src/layout/LayoutAppBar.tsx.html +1 -1
  362. package/coverage/lcov-report/src/layout/LayoutNav.tsx.html +1 -1
  363. package/coverage/lcov-report/src/layout/LayoutWindowSplitter.tsx.html +1 -1
  364. package/coverage/lcov-report/src/layout/Main.tsx.html +1 -1
  365. package/coverage/lcov-report/src/layout/index.html +203 -8
  366. package/coverage/lcov-report/src/layout/layoutNavStyles.ts.html +1 -1
  367. package/coverage/lcov-report/src/layout/layoutWindowSplitterStyles.ts.html +1 -1
  368. package/coverage/lcov-report/src/layout/mainStyles.ts.html +1 -1
  369. package/coverage/lcov-report/src/layout/useExpandableLayout.ts.html +1 -1
  370. package/coverage/lcov-report/src/layout/useHorizontalLayoutTransition.ts.html +1 -1
  371. package/coverage/lcov-report/src/layout/useLayoutAppBarHeight.ts.html +20 -32
  372. package/coverage/lcov-report/src/layout/useLayoutTree.ts.html +1 -1
  373. package/coverage/lcov-report/src/layout/useLayoutWindowSplitter.ts.html +1 -1
  374. package/coverage/lcov-report/src/layout/useMainTabIndex.ts.html +1 -1
  375. package/coverage/lcov-report/src/layout/useResizableLayout.ts.html +1 -1
  376. package/coverage/lcov-report/src/layout/useTemporaryLayout.ts.html +3 -3
  377. package/coverage/lcov-report/src/link/Link.tsx.html +39 -9
  378. package/coverage/lcov-report/src/link/SkipToMainContent.tsx.html +1 -1
  379. package/coverage/lcov-report/src/link/index.html +16 -16
  380. package/coverage/lcov-report/src/link/styles.ts.html +1 -1
  381. package/coverage/lcov-report/src/list/List.tsx.html +33 -33
  382. package/coverage/lcov-report/src/list/ListItem.tsx.html +555 -534
  383. package/coverage/lcov-report/src/list/ListItemAddon.tsx.html +45 -39
  384. package/coverage/lcov-report/src/list/ListItemChildren.tsx.html +88 -82
  385. package/coverage/lcov-report/src/list/ListItemLink.tsx.html +6 -6
  386. package/coverage/lcov-report/src/list/ListItemText.tsx.html +35 -35
  387. package/coverage/lcov-report/src/list/ListSubheader.tsx.html +1 -1
  388. package/coverage/lcov-report/src/list/getListItemHeight.ts.html +43 -46
  389. package/coverage/lcov-report/src/list/index.html +128 -8
  390. package/coverage/lcov-report/src/list/listItemStyles.ts.html +102 -72
  391. package/coverage/lcov-report/src/media-queries/AppSizeProvider.tsx.html +59 -59
  392. package/coverage/lcov-report/src/media-queries/appSize.ts.html +1 -1
  393. package/coverage/lcov-report/src/media-queries/index.html +20 -5
  394. package/coverage/lcov-report/src/media-queries/useMediaQuery.ts.html +28 -28
  395. package/coverage/lcov-report/src/menu/DropdownMenu.tsx.html +73 -16
  396. package/coverage/lcov-report/src/menu/Menu.tsx.html +66 -33
  397. package/coverage/lcov-report/src/menu/MenuBar.tsx.html +1 -1
  398. package/coverage/lcov-report/src/menu/MenuButton.tsx.html +3 -3
  399. package/coverage/lcov-report/src/menu/MenuConfigurationProvider.tsx.html +1 -1
  400. package/coverage/lcov-report/src/menu/MenuItem.tsx.html +1 -1
  401. package/coverage/lcov-report/src/menu/MenuItemButton.tsx.html +3 -3
  402. package/coverage/lcov-report/src/menu/MenuItemCircularProgress.tsx.html +433 -0
  403. package/coverage/lcov-report/src/menu/MenuItemGroup.tsx.html +1 -1
  404. package/coverage/lcov-report/src/menu/MenuItemSeparator.tsx.html +6 -36
  405. package/coverage/lcov-report/src/menu/MenuSheet.tsx.html +34 -7
  406. package/coverage/lcov-report/src/menu/MenuVisibilityProvider.tsx.html +1 -1
  407. package/coverage/lcov-report/src/menu/MenuWidget.tsx.html +1 -1
  408. package/coverage/lcov-report/src/menu/MenuWidgetKeyboardProvider.tsx.html +1 -1
  409. package/coverage/lcov-report/src/menu/index.html +13 -193
  410. package/coverage/lcov-report/src/menu/useContextMenu.ts.html +1 -1
  411. package/coverage/lcov-report/src/menu/useMenuBarProvider.ts.html +1 -1
  412. package/coverage/lcov-report/src/menu/utils.ts.html +10 -10
  413. package/coverage/lcov-report/src/movement/constants.ts.html +1 -1
  414. package/coverage/lcov-report/src/movement/findMatchIndex.ts.html +1 -1
  415. package/coverage/lcov-report/src/movement/index.html +20 -20
  416. package/coverage/lcov-report/src/movement/useKeyboardMovementProvider.ts.html +92 -92
  417. package/coverage/lcov-report/src/movement/utils.ts.html +143 -119
  418. package/coverage/lcov-report/src/overlay/Overlay.tsx.html +64 -64
  419. package/coverage/lcov-report/src/overlay/index.html +1 -1
  420. package/coverage/lcov-report/src/overlay/overlayStyles.ts.html +28 -28
  421. package/coverage/lcov-report/src/portal/Portal.tsx.html +9 -9
  422. package/coverage/lcov-report/src/portal/PortalContainerProvider.tsx.html +59 -35
  423. package/coverage/lcov-report/src/portal/index.html +23 -8
  424. package/coverage/lcov-report/src/positioning/constants.ts.html +1 -1
  425. package/coverage/lcov-report/src/positioning/createHorizontalPosition.ts.html +63 -63
  426. package/coverage/lcov-report/src/positioning/createVerticalPosition.ts.html +65 -65
  427. package/coverage/lcov-report/src/positioning/getFixedPosition.ts.html +94 -94
  428. package/coverage/lcov-report/src/positioning/index.html +70 -10
  429. package/coverage/lcov-report/src/positioning/useFixedPositioning.ts.html +200 -200
  430. package/coverage/lcov-report/src/positioning/utils.ts.html +111 -111
  431. package/coverage/lcov-report/src/progress/CircularProgress.tsx.html +501 -456
  432. package/coverage/lcov-report/src/progress/LinearProgress.tsx.html +419 -338
  433. package/coverage/lcov-report/src/progress/getProgressA11y.ts.html +1 -1
  434. package/coverage/lcov-report/src/progress/index.html +47 -32
  435. package/coverage/lcov-report/src/responsive-item/ResponsiveItemContainer.tsx.html +1 -1
  436. package/coverage/lcov-report/src/responsive-item/ResponsiveItemOverlay.tsx.html +1 -1
  437. package/coverage/lcov-report/src/responsive-item/index.html +20 -5
  438. package/coverage/lcov-report/src/responsive-item/styles.ts.html +1 -1
  439. package/coverage/lcov-report/src/scroll/ScrollLock.tsx.html +1 -1
  440. package/coverage/lcov-report/src/scroll/getScrollbarWidth.ts.html +25 -25
  441. package/coverage/lcov-report/src/scroll/index.html +5 -5
  442. package/coverage/lcov-report/src/scroll/useScrollLock.ts.html +27 -27
  443. package/coverage/lcov-report/src/segmented-button/SegmentedButton.tsx.html +4 -4
  444. package/coverage/lcov-report/src/segmented-button/SegmentedButtonContainer.tsx.html +29 -8
  445. package/coverage/lcov-report/src/segmented-button/index.html +50 -5
  446. package/coverage/lcov-report/src/segmented-button/segmentedButtonContainerStyles.ts.html +15 -6
  447. package/coverage/lcov-report/src/segmented-button/segmentedButtonStyles.ts.html +1 -1
  448. package/coverage/lcov-report/src/sheet/Sheet.tsx.html +1 -1
  449. package/coverage/lcov-report/src/sheet/index.html +20 -5
  450. package/coverage/lcov-report/src/sheet/styles.ts.html +18 -21
  451. package/coverage/lcov-report/src/snackbar/DefaultToastRenderer.tsx.html +87 -84
  452. package/coverage/lcov-report/src/snackbar/Snackbar.tsx.html +24 -174
  453. package/coverage/lcov-report/src/snackbar/Toast.tsx.html +109 -94
  454. package/coverage/lcov-report/src/snackbar/ToastActionButton.tsx.html +1 -1
  455. package/coverage/lcov-report/src/snackbar/ToastCloseButton.tsx.html +3 -3
  456. package/coverage/lcov-report/src/snackbar/ToastContent.tsx.html +54 -162
  457. package/coverage/lcov-report/src/snackbar/ToastManager.tsx.html +1786 -0
  458. package/coverage/lcov-report/src/snackbar/ToastManagerProvider.tsx.html +21 -1701
  459. package/coverage/lcov-report/src/snackbar/index.html +163 -13
  460. package/coverage/lcov-report/src/snackbar/snackbarStyles.ts.html +214 -0
  461. package/coverage/lcov-report/src/snackbar/toastContentStyles.ts.html +196 -0
  462. package/coverage/lcov-report/src/snackbar/toastStyles.ts.html +27 -27
  463. package/coverage/lcov-report/src/snackbar/useCurrentToastActions.ts.html +1 -1
  464. package/coverage/lcov-report/src/suspense/CircularProgressSuspense.tsx.html +159 -108
  465. package/coverage/lcov-report/src/suspense/NullSuspense.tsx.html +88 -88
  466. package/coverage/lcov-report/src/suspense/index.html +32 -32
  467. package/coverage/lcov-report/src/table/Table.tsx.html +45 -114
  468. package/coverage/lcov-report/src/table/TableBody.tsx.html +43 -43
  469. package/coverage/lcov-report/src/table/TableCell.tsx.html +115 -319
  470. package/coverage/lcov-report/src/table/TableCellContent.tsx.html +82 -28
  471. package/coverage/lcov-report/src/table/TableCheckbox.tsx.html +16 -10
  472. package/coverage/lcov-report/src/table/TableConfigurationProvider.tsx.html +25 -31
  473. package/coverage/lcov-report/src/table/TableContainer.tsx.html +7 -28
  474. package/coverage/lcov-report/src/table/TableContainerProvider.tsx.html +1 -1
  475. package/coverage/lcov-report/src/table/TableFooter.tsx.html +64 -43
  476. package/coverage/lcov-report/src/table/TableHeader.tsx.html +41 -92
  477. package/coverage/lcov-report/src/table/TableRadio.tsx.html +676 -0
  478. package/coverage/lcov-report/src/table/TableRow.tsx.html +38 -119
  479. package/coverage/lcov-report/src/table/index.html +226 -16
  480. package/coverage/lcov-report/src/table/tableCellStyles.ts.html +334 -0
  481. package/coverage/lcov-report/src/table/tableContainerStyles.ts.html +142 -0
  482. package/coverage/lcov-report/src/table/tableFooterStyles.ts.html +166 -0
  483. package/coverage/lcov-report/src/table/tableHeaderStyles.ts.html +172 -0
  484. package/coverage/lcov-report/src/table/tableRowStyles.ts.html +169 -0
  485. package/coverage/lcov-report/src/table/tableStyles.ts.html +157 -0
  486. package/coverage/lcov-report/src/tabs/Tab.tsx.html +263 -143
  487. package/coverage/lcov-report/src/tabs/TabList.tsx.html +92 -92
  488. package/coverage/lcov-report/src/tabs/TabListScrollButton.tsx.html +61 -61
  489. package/coverage/lcov-report/src/tabs/index.html +148 -13
  490. package/coverage/lcov-report/src/tabs/tabIndicatorStyles.ts.html +187 -0
  491. package/coverage/lcov-report/src/tabs/tabListScrollButtonStyles.ts.html +226 -0
  492. package/coverage/lcov-report/src/tabs/tabListStyles.ts.html +241 -0
  493. package/coverage/lcov-report/src/tabs/tabStyles.ts.html +64 -28
  494. package/coverage/lcov-report/src/tabs/useTabList.ts.html +115 -109
  495. package/coverage/lcov-report/src/tabs/useTabs.ts.html +54 -54
  496. package/coverage/lcov-report/src/tabs/utils.ts.html +3 -3
  497. package/coverage/lcov-report/src/test-utils/IntersectionObserver.ts.html +1 -1
  498. package/coverage/lcov-report/src/test-utils/ResizeObserver.ts.html +402 -261
  499. package/coverage/lcov-report/src/test-utils/data-testid.ts.html +112 -0
  500. package/coverage/lcov-report/src/test-utils/drag.ts.html +1 -1
  501. package/coverage/lcov-report/src/test-utils/index.html +7 -7
  502. package/coverage/lcov-report/src/test-utils/jest-setup.ts.html +21 -9
  503. package/coverage/lcov-report/src/test-utils/matchMedia.ts.html +55 -55
  504. package/coverage/lcov-report/src/test-utils/polyfills/IntersectionObserver.ts.html +4 -4
  505. package/coverage/lcov-report/src/test-utils/polyfills/ResizeObserver.ts.html +3 -3
  506. package/coverage/lcov-report/src/test-utils/polyfills/TextDecoder.ts.html +106 -0
  507. package/coverage/lcov-report/src/test-utils/polyfills/TextEncoder.ts.html +100 -0
  508. package/coverage/lcov-report/src/test-utils/polyfills/index.html +1 -1
  509. package/coverage/lcov-report/src/test-utils/polyfills/matchMedia.ts.html +6 -6
  510. package/coverage/lcov-report/src/test-utils/polyfills/offsetParent.ts.html +14 -14
  511. package/coverage/lcov-report/src/test-utils/polyfills/scrollIntoView.ts.html +5 -5
  512. package/coverage/lcov-report/src/test-utils/render.tsx.html +21 -21
  513. package/coverage/lcov-report/src/test-utils/root-html-environment.ts.html +85 -0
  514. package/coverage/lcov-report/src/test-utils/timers.ts.html +1 -1
  515. package/coverage/lcov-report/src/theme/LocalStorageColorSchemeProvider.tsx.html +1 -1
  516. package/coverage/lcov-report/src/theme/ThemeProvider.tsx.html +22 -4
  517. package/coverage/lcov-report/src/theme/colors.ts.html +1 -1
  518. package/coverage/lcov-report/src/theme/cssVars.ts.html +1 -1
  519. package/coverage/lcov-report/src/theme/index.html +71 -11
  520. package/coverage/lcov-report/src/theme/useCSSVariables.ts.html +25 -25
  521. package/coverage/lcov-report/src/theme/useColorScheme.ts.html +1 -1
  522. package/coverage/lcov-report/src/theme/useColorSchemeMetaTag.ts.html +1 -1
  523. package/coverage/lcov-report/src/theme/useColorSchemeProvider.ts.html +1 -1
  524. package/coverage/lcov-report/src/theme/usePrefersColorScheme.ts.html +1 -1
  525. package/coverage/lcov-report/src/theme/utils.ts.html +58 -58
  526. package/coverage/lcov-report/src/tooltip/Tooltip.tsx.html +98 -74
  527. package/coverage/lcov-report/src/tooltip/TooltipHoverModeProvider.tsx.html +60 -6
  528. package/coverage/lcov-report/src/tooltip/constants.ts.html +1 -1
  529. package/coverage/lcov-report/src/tooltip/index.html +72 -27
  530. package/coverage/lcov-report/src/tooltip/tooltipStyles.ts.html +18 -18
  531. package/coverage/lcov-report/src/tooltip/useOverflowTooltip.ts.html +196 -196
  532. package/coverage/lcov-report/src/tooltip/useTooltip.ts.html +555 -234
  533. package/coverage/lcov-report/src/tooltip/useTooltipPosition.ts.html +29 -29
  534. package/coverage/lcov-report/src/tooltip/utils.ts.html +24 -24
  535. package/coverage/lcov-report/src/transition/CSSTransition.tsx.html +1 -1
  536. package/coverage/lcov-report/src/transition/Collapse.tsx.html +1 -1
  537. package/coverage/lcov-report/src/transition/CrossFade.tsx.html +1 -1
  538. package/coverage/lcov-report/src/transition/ScaleTransition.tsx.html +1 -1
  539. package/coverage/lcov-report/src/transition/SkeletonPlaceholder.tsx.html +374 -338
  540. package/coverage/lcov-report/src/transition/Slide.tsx.html +46 -46
  541. package/coverage/lcov-report/src/transition/SlideContainer.tsx.html +1 -1
  542. package/coverage/lcov-report/src/transition/collapseStyles.ts.html +13 -13
  543. package/coverage/lcov-report/src/transition/config.ts.html +187 -0
  544. package/coverage/lcov-report/src/transition/index.html +311 -11
  545. package/coverage/lcov-report/src/transition/maxWidthTransition.ts.html +1 -1
  546. package/coverage/lcov-report/src/transition/skeletonPlaceholderUtils.ts.html +400 -0
  547. package/coverage/lcov-report/src/transition/useCSSTransition.ts.html +69 -69
  548. package/coverage/lcov-report/src/transition/useCarousel.ts.html +1 -1
  549. package/coverage/lcov-report/src/transition/useCollapseTransition.ts.html +108 -162
  550. package/coverage/lcov-report/src/transition/useCrossFadeTransition.ts.html +1 -1
  551. package/coverage/lcov-report/src/transition/useMaxWidthTransition.ts.html +1 -1
  552. package/coverage/lcov-report/src/transition/useScaleTransition.ts.html +18 -18
  553. package/coverage/lcov-report/src/transition/useSkeletonPlaceholder.ts.html +607 -562
  554. package/coverage/lcov-report/src/transition/useSlideTransition.ts.html +20 -20
  555. package/coverage/lcov-report/src/transition/useTransition.ts.html +277 -250
  556. package/coverage/lcov-report/src/transition/utils.ts.html +70 -70
  557. package/coverage/lcov-report/src/tree/DefaultTreeItemRenderer.tsx.html +19 -7
  558. package/coverage/lcov-report/src/tree/Tree.tsx.html +30 -30
  559. package/coverage/lcov-report/src/tree/TreeGroup.tsx.html +45 -45
  560. package/coverage/lcov-report/src/tree/TreeItem.tsx.html +215 -221
  561. package/coverage/lcov-report/src/tree/TreeItemExpander.tsx.html +3 -3
  562. package/coverage/lcov-report/src/tree/TreeProvider.tsx.html +29 -11
  563. package/coverage/lcov-report/src/tree/index.html +19 -94
  564. package/coverage/lcov-report/src/tree/styles.ts.html +4 -31
  565. package/coverage/lcov-report/src/tree/useTree.ts.html +1 -1
  566. package/coverage/lcov-report/src/tree/useTreeExpansion.ts.html +1 -1
  567. package/coverage/lcov-report/src/tree/useTreeItems.ts.html +10 -13
  568. package/coverage/lcov-report/src/tree/useTreeMovement.ts.html +87 -87
  569. package/coverage/lcov-report/src/tree/useTreeSelection.ts.html +1 -1
  570. package/coverage/lcov-report/src/tree/utils.ts.html +1 -1
  571. package/coverage/lcov-report/src/typography/SrOnly.tsx.html +38 -38
  572. package/coverage/lcov-report/src/typography/TextContainer.tsx.html +1 -1
  573. package/coverage/lcov-report/src/typography/Typography.tsx.html +94 -94
  574. package/coverage/lcov-report/src/typography/WritingDirectionProvider.tsx.html +75 -75
  575. package/coverage/lcov-report/src/typography/index.html +64 -19
  576. package/coverage/lcov-report/src/useAsyncAction.ts.html +25 -25
  577. package/coverage/lcov-report/src/useDebouncedFunction.ts.html +246 -240
  578. package/coverage/lcov-report/src/useDropzone.ts.html +1 -1
  579. package/coverage/lcov-report/src/useElementSize.ts.html +334 -0
  580. package/coverage/lcov-report/src/useEnsuredId.ts.html +8 -8
  581. package/coverage/lcov-report/src/useEnsuredRef.ts.html +22 -19
  582. package/coverage/lcov-report/src/useEnsuredState.ts.html +19 -19
  583. package/coverage/lcov-report/src/useHtmlClassName.ts.html +1 -1
  584. package/coverage/lcov-report/src/useIntersectionObserver.ts.html +32 -32
  585. package/coverage/lcov-report/src/useIsomorphicLayoutEffect.ts.html +1 -1
  586. package/coverage/lcov-report/src/useLocalStorage.ts.html +225 -225
  587. package/coverage/lcov-report/src/useOrientation.ts.html +32 -32
  588. package/coverage/lcov-report/src/usePageInactive.ts.html +30 -30
  589. package/coverage/lcov-report/src/useResizeListener.ts.html +38 -32
  590. package/coverage/lcov-report/src/useResizeObserver.ts.html +133 -244
  591. package/coverage/lcov-report/src/useThrottledFunction.ts.html +57 -51
  592. package/coverage/lcov-report/src/useToggle.ts.html +18 -18
  593. package/coverage/lcov-report/src/useUnmounted.ts.html +11 -11
  594. package/coverage/lcov-report/src/useWindowSize.ts.html +124 -94
  595. package/coverage/lcov-report/src/utils/RenderRecursively.tsx.html +1 -1
  596. package/coverage/lcov-report/src/utils/alphaNumericSort.ts.html +1 -1
  597. package/coverage/lcov-report/src/utils/applyRef.ts.html +11 -11
  598. package/coverage/lcov-report/src/utils/bem.ts.html +50 -50
  599. package/coverage/lcov-report/src/utils/filters.ts.html +357 -84
  600. package/coverage/lcov-report/src/utils/getClientPosition.ts.html +1 -1
  601. package/coverage/lcov-report/src/utils/getMiddleOfRange.ts.html +163 -0
  602. package/coverage/lcov-report/src/utils/getPercentage.ts.html +36 -36
  603. package/coverage/lcov-report/src/utils/getRangeDefaultValue.ts.html +66 -87
  604. package/coverage/lcov-report/src/utils/getRangeSteps.ts.html +7 -7
  605. package/coverage/lcov-report/src/utils/identity.ts.html +1 -1
  606. package/coverage/lcov-report/src/utils/index.html +14 -59
  607. package/coverage/lcov-report/src/utils/isElementVisible.ts.html +14 -14
  608. package/coverage/lcov-report/src/utils/isValidNumber.ts.html +118 -0
  609. package/coverage/lcov-report/src/utils/loop.ts.html +1 -1
  610. package/coverage/lcov-report/src/utils/nearest.ts.html +21 -21
  611. package/coverage/lcov-report/src/utils/parseCssLengthUnit.ts.html +41 -41
  612. package/coverage/lcov-report/src/utils/randomInt.ts.html +52 -52
  613. package/coverage/lcov-report/src/utils/wait.ts.html +1 -1
  614. package/coverage/lcov-report/src/utils/withinRange.ts.html +1 -1
  615. package/coverage/lcov-report/src/window-splitter/WindowSplitter.tsx.html +1 -1
  616. package/coverage/lcov-report/src/window-splitter/index.html +14 -14
  617. package/coverage/lcov-report/src/window-splitter/useWindowSplitter.ts.html +19 -67
  618. package/coverage/lcov-report/src/window-splitter/useWindowSplitterMaxValue.ts.html +256 -0
  619. package/coverage/lcov-report/styles.ts.html +134 -320
  620. package/coverage/lcov-report/suspense/CircularProgressSuspense.tsx.html +283 -0
  621. package/coverage/lcov-report/suspense/NullSuspense.tsx.html +202 -0
  622. package/coverage/lcov-report/suspense/index.html +131 -0
  623. package/coverage/lcov-report/switchStyles.ts.html +172 -0
  624. package/coverage/lcov-report/tabIndicatorStyles.ts.html +43 -13
  625. package/coverage/lcov-report/tabListStyles.ts.html +35 -26
  626. package/coverage/lcov-report/tabStyles.ts.html +68 -26
  627. package/coverage/lcov-report/table/Table.tsx.html +526 -0
  628. package/coverage/lcov-report/table/TableBody.tsx.html +280 -0
  629. package/coverage/lcov-report/table/TableCell.tsx.html +159 -168
  630. package/coverage/lcov-report/table/TableCheckbox.tsx.html +10 -13
  631. package/coverage/lcov-report/table/TableRadio.tsx.html +670 -0
  632. package/coverage/lcov-report/table/TableRow.tsx.html +370 -0
  633. package/coverage/lcov-report/table/index.html +62 -32
  634. package/coverage/lcov-report/tableCellStyles.ts.html +334 -0
  635. package/coverage/lcov-report/tableContainerStyles.ts.html +142 -0
  636. package/coverage/lcov-report/tableFooterStyles.ts.html +157 -0
  637. package/coverage/lcov-report/tableHeaderStyles.ts.html +163 -0
  638. package/coverage/lcov-report/tableRowStyles.ts.html +169 -0
  639. package/coverage/lcov-report/tableStyles.ts.html +157 -0
  640. package/coverage/lcov-report/tabs/Tab.tsx.html +592 -0
  641. package/coverage/lcov-report/tabs/TabList.tsx.html +796 -0
  642. package/coverage/lcov-report/tabs/index.html +107 -17
  643. package/coverage/lcov-report/tabs/tabIndicatorStyles.ts.html +187 -0
  644. package/coverage/lcov-report/tabs/tabListStyles.ts.html +241 -0
  645. package/coverage/lcov-report/tabs/tabStyles.ts.html +253 -0
  646. package/coverage/lcov-report/tabs/useTabList.ts.html +736 -0
  647. package/coverage/lcov-report/tabs/useTabs.ts.html +1567 -0
  648. package/coverage/lcov-report/tabs/utils.ts.html +337 -0
  649. package/coverage/lcov-report/test-utils/index.html +21 -21
  650. package/coverage/lcov-report/test-utils/jest-setup.ts.html +124 -0
  651. package/coverage/lcov-report/test-utils/use.ts.html +187 -0
  652. package/coverage/lcov-report/tooltip/Tooltip.tsx.html +98 -74
  653. package/coverage/lcov-report/tooltip/TooltipHoverModeProvider.tsx.html +167 -11
  654. package/coverage/lcov-report/tooltip/constants.ts.html +1 -1
  655. package/coverage/lcov-report/tooltip/index.html +11 -56
  656. package/coverage/lcov-report/tooltip/tooltipStyles.ts.html +181 -0
  657. package/coverage/lcov-report/tooltip/useTooltip.ts.html +555 -234
  658. package/coverage/lcov-report/tooltipStyles.ts.html +181 -0
  659. package/coverage/lcov-report/transition/SkeletonPlaceholder.tsx.html +595 -0
  660. package/coverage/lcov-report/transition/config.ts.html +187 -0
  661. package/coverage/lcov-report/transition/index.html +9 -24
  662. package/coverage/lcov-report/transition/skeletonPlaceholderUtils.ts.html +400 -0
  663. package/coverage/lcov-report/transition/useScaleTransition.ts.html +535 -0
  664. package/coverage/lcov-report/transition/useSkeletonPlaceholder.ts.html +952 -0
  665. package/coverage/lcov-report/transition/useTransition.ts.html +943 -0
  666. package/coverage/lcov-report/tree/Tree.tsx.html +24 -36
  667. package/coverage/lcov-report/tree/TreeItem.tsx.html +215 -221
  668. package/coverage/lcov-report/tree/TreeProvider.tsx.html +55 -10
  669. package/coverage/lcov-report/tree/index.html +19 -94
  670. package/coverage/lcov-report/tree/styles.ts.html +538 -0
  671. package/coverage/lcov-report/tree/useTreeMovement.ts.html +140 -143
  672. package/coverage/lcov-report/typography/Typography.tsx.html +138 -432
  673. package/coverage/lcov-report/typography/WritingDirectionProvider.tsx.html +781 -0
  674. package/coverage/lcov-report/typography/index.html +18 -18
  675. package/coverage/lcov-report/useAutoComplete.ts.html +787 -0
  676. package/coverage/lcov-report/useCollapseTransition.ts.html +166 -211
  677. package/coverage/lcov-report/useCombobox.ts.html +1513 -0
  678. package/coverage/lcov-report/useInlineAutoComplete.ts.html +379 -0
  679. package/coverage/lcov-report/useSelectCombobox.ts.html +295 -0
  680. package/coverage/lcov-report/useSkeletonPlaceholder.ts.html +952 -0
  681. package/coverage/lcov-report/useTabList.ts.html +142 -136
  682. package/coverage/lcov-report/useTooltip.ts.html +651 -375
  683. package/coverage/lcov-report/useTransition.ts.html +934 -0
  684. package/coverage/lcov-report/useWindowSplitter.ts.html +640 -0
  685. package/coverage/lcov-report/useWindowSplitterMaxValue.ts.html +256 -0
  686. package/coverage/lcov-report/utils/alphaNumericSort.ts.html +11 -50
  687. package/coverage/lcov-report/utils/filters.ts.html +1056 -201
  688. package/coverage/lcov-report/utils/index.html +13 -43
  689. package/coverage/lcov-report/utils/isElementVisible.ts.html +12 -12
  690. package/coverage/lcov-report/utils/parseCssLengthUnit.ts.html +19 -19
  691. package/coverage/lcov-report/utils/randomInt.ts.html +148 -0
  692. package/coverage/lcov-report/utils/searching.ts.html +85 -0
  693. package/coverage/lcov-report/utils/wait.ts.html +1 -1
  694. package/coverage/lcov-report/utils.ts.html +109 -277
  695. package/coverage/lcov-report/window-splitter/index.html +21 -36
  696. package/coverage/lcov-report/window-splitter/useWindowSplitter.ts.html +406 -328
  697. package/coverage/lcov.info +0 -1176
  698. package/dist/RootHtml.d.ts +62 -0
  699. package/dist/RootHtml.js +49 -0
  700. package/dist/RootHtml.js.map +1 -0
  701. package/dist/_box-shadows.scss +12 -2
  702. package/dist/_core.scss +208 -250
  703. package/dist/_utils.scss +89 -0
  704. package/dist/app-bar/AppBar.d.ts +4 -9
  705. package/dist/app-bar/AppBar.js +29 -7
  706. package/dist/app-bar/AppBar.js.map +1 -1
  707. package/dist/app-bar/_app-bar.scss +114 -122
  708. package/dist/avatar/Avatar.d.ts +16 -15
  709. package/dist/avatar/Avatar.js +7 -3
  710. package/dist/avatar/Avatar.js.map +1 -1
  711. package/dist/avatar/_avatar.scss +79 -84
  712. package/dist/avatar/styles.d.ts +20 -2
  713. package/dist/avatar/styles.js +4 -1
  714. package/dist/avatar/styles.js.map +1 -1
  715. package/dist/badge/_badge.scss +97 -59
  716. package/dist/box/_box.scss +72 -81
  717. package/dist/button/AsyncButton.d.ts +29 -0
  718. package/dist/button/AsyncButton.js +14 -1
  719. package/dist/button/AsyncButton.js.map +1 -1
  720. package/dist/button/TooltippedButton.d.ts +62 -0
  721. package/dist/button/TooltippedButton.js +62 -0
  722. package/dist/button/TooltippedButton.js.map +1 -0
  723. package/dist/button/_button.scss +170 -180
  724. package/dist/card/Card.js +3 -2
  725. package/dist/card/Card.js.map +1 -1
  726. package/dist/card/CardContent.js +1 -1
  727. package/dist/card/CardContent.js.map +1 -1
  728. package/dist/card/ClickableCard.d.ts +42 -0
  729. package/dist/card/ClickableCard.js +73 -0
  730. package/dist/card/ClickableCard.js.map +1 -0
  731. package/dist/card/_card.scss +81 -82
  732. package/dist/card/styles.d.ts +8 -0
  733. package/dist/card/styles.js +6 -3
  734. package/dist/card/styles.js.map +1 -1
  735. package/dist/chip/_chip.scss +136 -163
  736. package/dist/chip/styles.d.ts +1 -1
  737. package/dist/chip/styles.js +3 -4
  738. package/dist/chip/styles.js.map +1 -1
  739. package/dist/cssUtils.d.ts +1 -0
  740. package/dist/cssUtils.js +1 -1
  741. package/dist/cssUtils.js.map +1 -1
  742. package/dist/dialog/Dialog.d.ts +1 -1
  743. package/dist/dialog/Dialog.js +2 -1
  744. package/dist/dialog/Dialog.js.map +1 -1
  745. package/dist/dialog/FixedDialog.d.ts +5 -4
  746. package/dist/dialog/FixedDialog.js +5 -4
  747. package/dist/dialog/FixedDialog.js.map +1 -1
  748. package/dist/dialog/_dialog.scss +179 -162
  749. package/dist/divider/Divider.d.ts +0 -1
  750. package/dist/divider/Divider.js.map +1 -1
  751. package/dist/divider/_divider.scss +61 -70
  752. package/dist/draggable/_draggable.scss +16 -12
  753. package/dist/draggable/useDraggable.d.ts +12 -23
  754. package/dist/draggable/useDraggable.js +15 -6
  755. package/dist/draggable/useDraggable.js.map +1 -1
  756. package/dist/draggable/utils.d.ts +4 -17
  757. package/dist/draggable/utils.js +9 -25
  758. package/dist/draggable/utils.js.map +1 -1
  759. package/dist/expansion-panel/_expansion-panel.scss +76 -50
  760. package/dist/expansion-panel/useExpansionPanels.d.ts +5 -3
  761. package/dist/expansion-panel/useExpansionPanels.js +16 -9
  762. package/dist/expansion-panel/useExpansionPanels.js.map +1 -1
  763. package/dist/focus/useFocusContainer.d.ts +8 -8
  764. package/dist/focus/useFocusContainer.js +11 -10
  765. package/dist/focus/useFocusContainer.js.map +1 -1
  766. package/dist/form/Form.d.ts +1 -1
  767. package/dist/form/Form.js +2 -1
  768. package/dist/form/Form.js.map +1 -1
  769. package/dist/form/Label.d.ts +5 -5
  770. package/dist/form/Label.js.map +1 -1
  771. package/dist/form/MenuItemInputToggle.d.ts +2 -15
  772. package/dist/form/MenuItemInputToggle.js +27 -38
  773. package/dist/form/MenuItemInputToggle.js.map +1 -1
  774. package/dist/form/MenuItemTextField.d.ts +2 -0
  775. package/dist/form/MenuItemTextField.js.map +1 -1
  776. package/dist/form/NativeSelect.d.ts +5 -2
  777. package/dist/form/NativeSelect.js.map +1 -1
  778. package/dist/form/Option.js +3 -2
  779. package/dist/form/Option.js.map +1 -1
  780. package/dist/form/ResizingTextAreaWrapper.d.ts +19 -0
  781. package/dist/form/ResizingTextAreaWrapper.js +35 -0
  782. package/dist/form/ResizingTextAreaWrapper.js.map +1 -0
  783. package/dist/form/Select.d.ts +105 -15
  784. package/dist/form/Select.js +160 -244
  785. package/dist/form/Select.js.map +1 -1
  786. package/dist/form/SelectedOption.d.ts +21 -0
  787. package/dist/form/SelectedOption.js +37 -0
  788. package/dist/form/SelectedOption.js.map +1 -0
  789. package/dist/form/Slider.d.ts +41 -5
  790. package/dist/form/Slider.js +2 -1
  791. package/dist/form/Slider.js.map +1 -1
  792. package/dist/form/SliderThumb.d.ts +7 -2
  793. package/dist/form/SliderThumb.js +4 -2
  794. package/dist/form/SliderThumb.js.map +1 -1
  795. package/dist/form/SliderValueMarks.js +1 -1
  796. package/dist/form/SliderValueMarks.js.map +1 -1
  797. package/dist/form/SliderValueTooltip.js +1 -1
  798. package/dist/form/SliderValueTooltip.js.map +1 -1
  799. package/dist/form/Switch.d.ts +3 -2
  800. package/dist/form/Switch.js +7 -26
  801. package/dist/form/Switch.js.map +1 -1
  802. package/dist/form/SwitchTrack.d.ts +2 -1
  803. package/dist/form/SwitchTrack.js +8 -4
  804. package/dist/form/SwitchTrack.js.map +1 -1
  805. package/dist/form/TextArea.d.ts +11 -0
  806. package/dist/form/TextArea.js +19 -29
  807. package/dist/form/TextArea.js.map +1 -1
  808. package/dist/form/TextField.d.ts +2 -2
  809. package/dist/form/TextField.js +7 -6
  810. package/dist/form/TextField.js.map +1 -1
  811. package/dist/form/TextFieldContainerStyles.d.ts +7 -7
  812. package/dist/form/TextFieldContainerStyles.js.map +1 -1
  813. package/dist/form/_form.scss +1339 -1256
  814. package/dist/form/menuItemInputToggleStyles.d.ts +39 -0
  815. package/dist/form/menuItemInputToggleStyles.js +31 -0
  816. package/dist/form/menuItemInputToggleStyles.js.map +1 -0
  817. package/dist/form/selectUtils.d.ts +1 -3
  818. package/dist/form/selectUtils.js +2 -10
  819. package/dist/form/selectUtils.js.map +1 -1
  820. package/dist/form/switchStyles.d.ts +1 -0
  821. package/dist/form/switchStyles.js +2 -1
  822. package/dist/form/switchStyles.js.map +1 -1
  823. package/dist/form/textAreaStyles.d.ts +2 -2
  824. package/dist/form/textAreaStyles.js.map +1 -1
  825. package/dist/form/types.d.ts +6 -8
  826. package/dist/form/types.js.map +1 -1
  827. package/dist/form/useCombobox.d.ts +157 -0
  828. package/dist/form/useCombobox.js +206 -0
  829. package/dist/form/useCombobox.js.map +1 -0
  830. package/dist/form/useEditableCombobox.d.ts +15 -0
  831. package/dist/form/useEditableCombobox.js +101 -0
  832. package/dist/form/useEditableCombobox.js.map +1 -0
  833. package/dist/form/useFormReset.d.ts +16 -0
  834. package/dist/form/useFormReset.js +32 -0
  835. package/dist/form/useFormReset.js.map +1 -0
  836. package/dist/form/useListboxProvider.d.ts +4 -2
  837. package/dist/form/useListboxProvider.js +6 -8
  838. package/dist/form/useListboxProvider.js.map +1 -1
  839. package/dist/form/useResizingTextArea.d.ts +5 -2
  840. package/dist/form/useResizingTextArea.js +52 -21
  841. package/dist/form/useResizingTextArea.js.map +1 -1
  842. package/dist/form/useSelectCombobox.d.ts +17 -0
  843. package/dist/form/useSelectCombobox.js +36 -0
  844. package/dist/form/useSelectCombobox.js.map +1 -0
  845. package/dist/form/utils.d.ts +11 -1
  846. package/dist/form/utils.js +6 -0
  847. package/dist/form/utils.js.map +1 -1
  848. package/dist/hoverMode/useHoverMode.d.ts +2 -2
  849. package/dist/hoverMode/useHoverMode.js +1 -1
  850. package/dist/hoverMode/useHoverMode.js.map +1 -1
  851. package/dist/icon/FontIcon.d.ts +2 -1
  852. package/dist/icon/FontIcon.js +4 -5
  853. package/dist/icon/FontIcon.js.map +1 -1
  854. package/dist/icon/IconRotator.js +2 -3
  855. package/dist/icon/IconRotator.js.map +1 -1
  856. package/dist/icon/MaterialIcon.d.ts +2 -2
  857. package/dist/icon/MaterialIcon.js +3 -6
  858. package/dist/icon/MaterialIcon.js.map +1 -1
  859. package/dist/icon/MaterialSymbol.d.ts +15 -8
  860. package/dist/icon/MaterialSymbol.js +15 -11
  861. package/dist/icon/MaterialSymbol.js.map +1 -1
  862. package/dist/icon/_icon.scss +105 -112
  863. package/dist/icon/iconConfig.js.map +1 -1
  864. package/dist/icon/material.d.ts +1 -1
  865. package/dist/icon/material.js.map +1 -1
  866. package/dist/icon/{MaterialSymbolsProvider.d.ts → materialConfig.d.ts} +25 -14
  867. package/dist/icon/materialConfig.js +29 -0
  868. package/dist/icon/materialConfig.js.map +1 -0
  869. package/dist/icon/styles.d.ts +0 -15
  870. package/dist/icon/styles.js +2 -4
  871. package/dist/icon/styles.js.map +1 -1
  872. package/dist/index.d.ts +30 -7
  873. package/dist/index.js +30 -7
  874. package/dist/index.js.map +1 -1
  875. package/dist/interaction/_interaction.scss +144 -135
  876. package/dist/layout/_layout.scss +82 -86
  877. package/dist/layout/useLayoutAppBarHeight.js +5 -9
  878. package/dist/layout/useLayoutAppBarHeight.js.map +1 -1
  879. package/dist/link/Link.d.ts +12 -6
  880. package/dist/link/Link.js +1 -2
  881. package/dist/link/Link.js.map +1 -1
  882. package/dist/link/_link.scss +74 -66
  883. package/dist/list/ListItem.d.ts +8 -3
  884. package/dist/list/ListItem.js +4 -3
  885. package/dist/list/ListItem.js.map +1 -1
  886. package/dist/list/ListItemAddon.js +2 -1
  887. package/dist/list/ListItemAddon.js.map +1 -1
  888. package/dist/list/ListItemChildren.js +3 -2
  889. package/dist/list/ListItemChildren.js.map +1 -1
  890. package/dist/list/ListItemLink.d.ts +1 -1
  891. package/dist/list/ListItemLink.js +3 -3
  892. package/dist/list/ListItemLink.js.map +1 -1
  893. package/dist/list/_list.scss +187 -184
  894. package/dist/list/getListItemHeight.d.ts +0 -1
  895. package/dist/list/getListItemHeight.js +2 -2
  896. package/dist/list/getListItemHeight.js.map +1 -1
  897. package/dist/list/listItemStyles.d.ts +9 -1
  898. package/dist/list/listItemStyles.js +5 -5
  899. package/dist/list/listItemStyles.js.map +1 -1
  900. package/dist/list/types.d.ts +25 -6
  901. package/dist/list/types.js.map +1 -1
  902. package/dist/menu/DropdownMenu.d.ts +12 -1
  903. package/dist/menu/DropdownMenu.js +13 -4
  904. package/dist/menu/DropdownMenu.js.map +1 -1
  905. package/dist/menu/Menu.d.ts +8 -0
  906. package/dist/menu/Menu.js +14 -2
  907. package/dist/menu/Menu.js.map +1 -1
  908. package/dist/menu/MenuItemCircularProgress.d.ts +60 -0
  909. package/dist/menu/MenuItemCircularProgress.js +74 -0
  910. package/dist/menu/MenuItemCircularProgress.js.map +1 -0
  911. package/dist/menu/MenuItemSeparator.d.ts +1 -2
  912. package/dist/menu/MenuItemSeparator.js +2 -8
  913. package/dist/menu/MenuItemSeparator.js.map +1 -1
  914. package/dist/menu/MenuSheet.d.ts +6 -1
  915. package/dist/menu/MenuSheet.js.map +1 -1
  916. package/dist/menu/_menu.scss +29 -50
  917. package/dist/menu/useContextMenu.d.ts +3 -3
  918. package/dist/menu/useContextMenu.js +3 -3
  919. package/dist/menu/useContextMenu.js.map +1 -1
  920. package/dist/movement/types.d.ts +40 -21
  921. package/dist/movement/types.js.map +1 -1
  922. package/dist/movement/useKeyboardMovementProvider.js +15 -4
  923. package/dist/movement/useKeyboardMovementProvider.js.map +1 -1
  924. package/dist/movement/utils.d.ts +7 -2
  925. package/dist/movement/utils.js +10 -0
  926. package/dist/movement/utils.js.map +1 -1
  927. package/dist/overlay/_overlay.scss +39 -42
  928. package/dist/portal/PortalContainerProvider.d.ts +2 -2
  929. package/dist/portal/PortalContainerProvider.js +6 -1
  930. package/dist/portal/PortalContainerProvider.js.map +1 -1
  931. package/dist/positioning/useFixedPositioning.js +0 -8
  932. package/dist/positioning/useFixedPositioning.js.map +1 -1
  933. package/dist/progress/CircularProgress.d.ts +5 -4
  934. package/dist/progress/CircularProgress.js +3 -3
  935. package/dist/progress/CircularProgress.js.map +1 -1
  936. package/dist/progress/LinearProgress.d.ts +7 -5
  937. package/dist/progress/LinearProgress.js +4 -3
  938. package/dist/progress/LinearProgress.js.map +1 -1
  939. package/dist/progress/_progress.scss +33 -33
  940. package/dist/responsive-item/_responsive-item.scss +91 -89
  941. package/dist/searching/caseInsensitive.d.ts +150 -0
  942. package/dist/searching/caseInsensitive.js +30 -0
  943. package/dist/searching/caseInsensitive.js.map +1 -0
  944. package/dist/searching/fuzzy.d.ts +128 -0
  945. package/dist/searching/fuzzy.js +54 -0
  946. package/dist/searching/fuzzy.js.map +1 -0
  947. package/dist/searching/toSearchQuery.d.ts +7 -0
  948. package/dist/searching/toSearchQuery.js +15 -0
  949. package/dist/searching/toSearchQuery.js.map +1 -0
  950. package/dist/searching/types.d.ts +28 -0
  951. package/dist/searching/types.js +5 -0
  952. package/dist/searching/types.js.map +1 -0
  953. package/dist/searching/useFuzzyMatch.d.ts +19 -0
  954. package/dist/searching/useFuzzyMatch.js +26 -0
  955. package/dist/searching/useFuzzyMatch.js.map +1 -0
  956. package/dist/searching/utils.d.ts +21 -0
  957. package/dist/searching/utils.js +28 -0
  958. package/dist/searching/utils.js.map +1 -0
  959. package/dist/segmented-button/_segmented-button.scss +89 -90
  960. package/dist/sheet/_sheet.scss +107 -123
  961. package/dist/sheet/styles.d.ts +14 -15
  962. package/dist/sheet/styles.js.map +1 -1
  963. package/dist/snackbar/DefaultToastRenderer.js +1 -1
  964. package/dist/snackbar/DefaultToastRenderer.js.map +1 -1
  965. package/dist/snackbar/Snackbar.d.ts +10 -10
  966. package/dist/snackbar/Snackbar.js +3 -3
  967. package/dist/snackbar/Snackbar.js.map +1 -1
  968. package/dist/snackbar/Toast.d.ts +1 -1
  969. package/dist/snackbar/Toast.js +5 -1
  970. package/dist/snackbar/Toast.js.map +1 -1
  971. package/dist/snackbar/ToastManager.d.ts +2 -1
  972. package/dist/snackbar/ToastManager.js +1 -1
  973. package/dist/snackbar/ToastManager.js.map +1 -1
  974. package/dist/snackbar/_snackbar.scss +148 -144
  975. package/dist/snackbar/snackbarStyles.d.ts +1 -0
  976. package/dist/snackbar/snackbarStyles.js +2 -1
  977. package/dist/snackbar/snackbarStyles.js.map +1 -1
  978. package/dist/suspense/CircularProgressSuspense.d.ts +4 -0
  979. package/dist/suspense/CircularProgressSuspense.js +3 -1
  980. package/dist/suspense/CircularProgressSuspense.js.map +1 -1
  981. package/dist/table/Table.d.ts +0 -12
  982. package/dist/table/Table.js +1 -12
  983. package/dist/table/Table.js.map +1 -1
  984. package/dist/table/TableCell.d.ts +13 -38
  985. package/dist/table/TableCell.js +7 -15
  986. package/dist/table/TableCell.js.map +1 -1
  987. package/dist/table/TableCellContent.d.ts +9 -0
  988. package/dist/table/TableCellContent.js +2 -1
  989. package/dist/table/TableCellContent.js.map +1 -1
  990. package/dist/table/TableCheckbox.d.ts +5 -4
  991. package/dist/table/TableCheckbox.js +7 -5
  992. package/dist/table/TableCheckbox.js.map +1 -1
  993. package/dist/table/TableContainer.d.ts +0 -6
  994. package/dist/table/TableContainer.js +1 -6
  995. package/dist/table/TableContainer.js.map +1 -1
  996. package/dist/table/TableFooter.d.ts +7 -1
  997. package/dist/table/TableFooter.js +17 -16
  998. package/dist/table/TableFooter.js.map +1 -1
  999. package/dist/table/TableHeader.d.ts +7 -14
  1000. package/dist/table/TableHeader.js +6 -14
  1001. package/dist/table/TableHeader.js.map +1 -1
  1002. package/dist/table/TableRadio.d.ts +107 -0
  1003. package/dist/table/TableRadio.js +108 -0
  1004. package/dist/table/TableRadio.js.map +1 -0
  1005. package/dist/table/TableRow.d.ts +0 -10
  1006. package/dist/table/TableRow.js +1 -12
  1007. package/dist/table/TableRow.js.map +1 -1
  1008. package/dist/table/_table.scss +217 -232
  1009. package/dist/table/tableCellStyles.d.ts +33 -0
  1010. package/dist/table/tableCellStyles.js +15 -0
  1011. package/dist/table/tableCellStyles.js.map +1 -0
  1012. package/dist/table/tableContainerStyles.d.ts +10 -0
  1013. package/dist/table/tableContainerStyles.js +9 -0
  1014. package/dist/table/tableContainerStyles.js.map +1 -0
  1015. package/dist/table/tableFooterStyles.d.ts +10 -0
  1016. package/dist/table/tableFooterStyles.js +12 -0
  1017. package/dist/table/tableFooterStyles.js.map +1 -0
  1018. package/dist/table/tableHeaderStyles.d.ts +10 -0
  1019. package/dist/table/tableHeaderStyles.js +13 -0
  1020. package/dist/table/tableHeaderStyles.js.map +1 -0
  1021. package/dist/table/tableRowStyles.d.ts +10 -0
  1022. package/dist/table/tableRowStyles.js +14 -0
  1023. package/dist/table/tableRowStyles.js.map +1 -0
  1024. package/dist/table/tableStyles.d.ts +12 -0
  1025. package/dist/table/tableStyles.js +14 -0
  1026. package/dist/table/tableStyles.js.map +1 -0
  1027. package/dist/table/types.d.ts +28 -15
  1028. package/dist/table/types.js.map +1 -1
  1029. package/dist/tabs/Tab.d.ts +24 -3
  1030. package/dist/tabs/Tab.js +15 -8
  1031. package/dist/tabs/Tab.js.map +1 -1
  1032. package/dist/tabs/_tabs.scss +64 -53
  1033. package/dist/tabs/tabIndicatorStyles.d.ts +2 -1
  1034. package/dist/tabs/tabIndicatorStyles.js +6 -3
  1035. package/dist/tabs/tabIndicatorStyles.js.map +1 -1
  1036. package/dist/tabs/tabListStyles.js +2 -1
  1037. package/dist/tabs/tabListStyles.js.map +1 -1
  1038. package/dist/tabs/tabStyles.d.ts +2 -0
  1039. package/dist/tabs/tabStyles.js +6 -3
  1040. package/dist/tabs/tabStyles.js.map +1 -1
  1041. package/dist/tabs/useTabList.d.ts +3 -3
  1042. package/dist/tabs/useTabList.js +9 -6
  1043. package/dist/tabs/useTabList.js.map +1 -1
  1044. package/dist/test-utils/IntersectionObserver.d.ts +12 -0
  1045. package/dist/test-utils/ResizeObserver.d.ts +214 -0
  1046. package/dist/test-utils/ResizeObserver.js +69 -49
  1047. package/dist/test-utils/ResizeObserver.js.map +1 -1
  1048. package/dist/test-utils/data-testid.d.ts +7 -0
  1049. package/dist/test-utils/data-testid.js +3 -0
  1050. package/dist/test-utils/data-testid.js.map +1 -0
  1051. package/dist/test-utils/drag.d.ts +26 -0
  1052. package/dist/test-utils/index.d.ts +7 -0
  1053. package/dist/test-utils/jest-setup.d.ts +1 -0
  1054. package/dist/test-utils/jest-setup.js +3 -0
  1055. package/dist/test-utils/jest-setup.js.map +1 -1
  1056. package/dist/test-utils/matchMedia.d.ts +101 -0
  1057. package/dist/test-utils/matchMedia.js +2 -2
  1058. package/dist/test-utils/matchMedia.js.map +1 -1
  1059. package/dist/test-utils/polyfills/IntersectionObserver.d.ts +1 -0
  1060. package/dist/test-utils/polyfills/ResizeObserver.d.ts +1 -0
  1061. package/dist/test-utils/polyfills/TextDecoder.d.ts +1 -0
  1062. package/dist/test-utils/polyfills/TextDecoder.js +8 -0
  1063. package/dist/test-utils/polyfills/TextDecoder.js.map +1 -0
  1064. package/dist/test-utils/polyfills/TextEncoder.d.ts +1 -0
  1065. package/dist/test-utils/polyfills/TextEncoder.js +6 -0
  1066. package/dist/test-utils/polyfills/TextEncoder.js.map +1 -0
  1067. package/dist/test-utils/polyfills/index.d.ts +7 -0
  1068. package/dist/test-utils/polyfills/index.js +2 -0
  1069. package/dist/test-utils/polyfills/index.js.map +1 -1
  1070. package/dist/test-utils/polyfills/matchMedia.d.ts +1 -0
  1071. package/dist/test-utils/polyfills/offsetParent.d.ts +1 -0
  1072. package/dist/test-utils/polyfills/scrollIntoView.d.ts +1 -0
  1073. package/dist/test-utils/render.d.ts +13 -0
  1074. package/dist/test-utils/timers.d.ts +39 -0
  1075. package/dist/theme/ThemeProvider.d.ts +5 -0
  1076. package/dist/theme/ThemeProvider.js.map +1 -1
  1077. package/dist/theme/_theme.scss +243 -133
  1078. package/dist/tooltip/Tooltip.d.ts +13 -6
  1079. package/dist/tooltip/Tooltip.js +2 -2
  1080. package/dist/tooltip/Tooltip.js.map +1 -1
  1081. package/dist/tooltip/TooltipHoverModeProvider.d.ts +15 -0
  1082. package/dist/tooltip/TooltipHoverModeProvider.js.map +1 -1
  1083. package/dist/tooltip/_tooltip.scss +76 -82
  1084. package/dist/tooltip/tooltipStyles.d.ts +2 -1
  1085. package/dist/tooltip/tooltipStyles.js +2 -2
  1086. package/dist/tooltip/tooltipStyles.js.map +1 -1
  1087. package/dist/tooltip/useTooltip.d.ts +83 -20
  1088. package/dist/tooltip/useTooltip.js +68 -7
  1089. package/dist/tooltip/useTooltip.js.map +1 -1
  1090. package/dist/transition/SkeletonPlaceholder.d.ts +2 -2
  1091. package/dist/transition/SkeletonPlaceholder.js +8 -3
  1092. package/dist/transition/SkeletonPlaceholder.js.map +1 -1
  1093. package/dist/transition/_transition.scss +89 -78
  1094. package/dist/transition/config.d.ts +22 -0
  1095. package/dist/transition/config.js +16 -0
  1096. package/dist/transition/config.js.map +1 -0
  1097. package/dist/transition/skeletonPlaceholderUtils.d.ts +77 -0
  1098. package/dist/transition/skeletonPlaceholderUtils.js +38 -0
  1099. package/dist/transition/skeletonPlaceholderUtils.js.map +1 -0
  1100. package/dist/transition/useCollapseTransition.d.ts +3 -18
  1101. package/dist/transition/useCollapseTransition.js +1 -10
  1102. package/dist/transition/useCollapseTransition.js.map +1 -1
  1103. package/dist/transition/useSkeletonPlaceholder.d.ts +12 -7
  1104. package/dist/transition/useSkeletonPlaceholder.js +38 -37
  1105. package/dist/transition/useSkeletonPlaceholder.js.map +1 -1
  1106. package/dist/transition/useTransition.js +15 -6
  1107. package/dist/transition/useTransition.js.map +1 -1
  1108. package/dist/transition/utils.js +7 -2
  1109. package/dist/transition/utils.js.map +1 -1
  1110. package/dist/tree/DefaultTreeItemRenderer.d.ts +3 -3
  1111. package/dist/tree/DefaultTreeItemRenderer.js.map +1 -1
  1112. package/dist/tree/Tree.d.ts +9 -5
  1113. package/dist/tree/Tree.js +18 -21
  1114. package/dist/tree/Tree.js.map +1 -1
  1115. package/dist/tree/TreeItem.js +4 -7
  1116. package/dist/tree/TreeItem.js.map +1 -1
  1117. package/dist/tree/TreeProvider.d.ts +2 -0
  1118. package/dist/tree/TreeProvider.js +3 -1
  1119. package/dist/tree/TreeProvider.js.map +1 -1
  1120. package/dist/tree/_tree.scss +111 -109
  1121. package/dist/tree/styles.d.ts +0 -6
  1122. package/dist/tree/styles.js +1 -2
  1123. package/dist/tree/styles.js.map +1 -1
  1124. package/dist/tree/useTreeMovement.js +1 -1
  1125. package/dist/tree/useTreeMovement.js.map +1 -1
  1126. package/dist/types.d.ts +13 -0
  1127. package/dist/types.js +1 -2
  1128. package/dist/types.js.map +1 -1
  1129. package/dist/typography/SrOnly.d.ts +3 -3
  1130. package/dist/typography/SrOnly.js +4 -4
  1131. package/dist/typography/SrOnly.js.map +1 -1
  1132. package/dist/typography/Typography.d.ts +19 -19
  1133. package/dist/typography/Typography.js +19 -19
  1134. package/dist/typography/Typography.js.map +1 -1
  1135. package/dist/typography/WritingDirectionProvider.d.ts +2 -2
  1136. package/dist/typography/WritingDirectionProvider.js +2 -2
  1137. package/dist/typography/WritingDirectionProvider.js.map +1 -1
  1138. package/dist/typography/_typography.scss +141 -87
  1139. package/dist/useDebouncedFunction.d.ts +2 -2
  1140. package/dist/useDebouncedFunction.js +10 -6
  1141. package/dist/useDebouncedFunction.js.map +1 -1
  1142. package/dist/useElementSize.d.ts +40 -0
  1143. package/dist/useElementSize.js +53 -0
  1144. package/dist/useElementSize.js.map +1 -0
  1145. package/dist/useEnsuredState.d.ts +1 -1
  1146. package/dist/useEnsuredState.js.map +1 -1
  1147. package/dist/useResizeListener.d.ts +1 -1
  1148. package/dist/useResizeListener.js +1 -0
  1149. package/dist/useResizeListener.js.map +1 -1
  1150. package/dist/useResizeObserver.d.ts +4 -43
  1151. package/dist/useResizeObserver.js +4 -43
  1152. package/dist/useResizeObserver.js.map +1 -1
  1153. package/dist/useThrottledFunction.d.ts +2 -2
  1154. package/dist/useThrottledFunction.js +20 -16
  1155. package/dist/useThrottledFunction.js.map +1 -1
  1156. package/dist/useWindowSize.d.ts +14 -11
  1157. package/dist/useWindowSize.js +12 -7
  1158. package/dist/useWindowSize.js.map +1 -1
  1159. package/dist/utils/alphaNumericSort.d.ts +1 -1
  1160. package/dist/utils/alphaNumericSort.js +2 -10
  1161. package/dist/utils/alphaNumericSort.js.map +1 -1
  1162. package/dist/utils/getMiddleOfRange.d.ts +13 -0
  1163. package/dist/utils/getMiddleOfRange.js +20 -0
  1164. package/dist/utils/getMiddleOfRange.js.map +1 -0
  1165. package/dist/utils/getRangeDefaultValue.d.ts +3 -5
  1166. package/dist/utils/getRangeDefaultValue.js +3 -13
  1167. package/dist/utils/getRangeDefaultValue.js.map +1 -1
  1168. package/dist/utils/getRangeSteps.d.ts +1 -1
  1169. package/dist/utils/getRangeSteps.js +2 -2
  1170. package/dist/utils/getRangeSteps.js.map +1 -1
  1171. package/dist/utils/nearest.js +1 -1
  1172. package/dist/utils/nearest.js.map +1 -1
  1173. package/dist/window-splitter/_window-splitter.scss +83 -112
  1174. package/dist/window-splitter/useWindowSplitter.d.ts +3 -5
  1175. package/dist/window-splitter/useWindowSplitter.js +3 -11
  1176. package/dist/window-splitter/useWindowSplitter.js.map +1 -1
  1177. package/jest.config.ts +4 -0
  1178. package/package.json +38 -40
  1179. package/scripts/{copySassFiles.js → copySassFiles.ts} +5 -5
  1180. package/scripts/tsconfig.json +18 -0
  1181. package/src/RootHtml.tsx +95 -0
  1182. package/src/__tests__/NoSsr.tsx +5 -5
  1183. package/src/__tests__/RootHtml.node.tsx +46 -0
  1184. package/src/__tests__/__snapshots__/RootHtml.node.tsx.snap +19 -0
  1185. package/src/__tests__/useAsyncAction.tsx +14 -6
  1186. package/src/__tests__/useDebouncedFunction.tsx +68 -24
  1187. package/src/__tests__/useDropzone.tsx +10 -10
  1188. package/src/__tests__/useElementSize.tsx +181 -0
  1189. package/src/__tests__/useEnsuredId.tsx +5 -5
  1190. package/src/__tests__/useEnsuredState.tsx +1 -2
  1191. package/src/__tests__/useLocalStorage.tsx +21 -21
  1192. package/src/__tests__/useResizeObserver.tsx +2 -0
  1193. package/src/__tests__/useThrottledFunction.tsx +63 -8
  1194. package/src/__tests__/useToggle.tsx +10 -10
  1195. package/src/__tests__/useWindowSize.node.tsx +56 -0
  1196. package/src/__tests__/useWindowSize.tsx +156 -0
  1197. package/src/_box-shadows.scss +12 -2
  1198. package/src/_core.scss +208 -250
  1199. package/src/_utils.scss +89 -0
  1200. package/src/app-bar/AppBar.tsx +59 -19
  1201. package/src/app-bar/__tests__/AppBar.tsx +15 -15
  1202. package/src/app-bar/__tests__/AppBarTitle.tsx +3 -5
  1203. package/src/app-bar/__tests__/__snapshots__/AppBar.tsx.snap +21 -21
  1204. package/src/app-bar/_app-bar.scss +114 -122
  1205. package/src/avatar/Avatar.tsx +36 -23
  1206. package/src/avatar/__tests__/Avatar.tsx +6 -6
  1207. package/src/avatar/__tests__/__snapshots__/Avatar.tsx.snap +6 -6
  1208. package/src/avatar/_avatar.scss +79 -84
  1209. package/src/avatar/styles.ts +27 -4
  1210. package/src/badge/__tests__/Badge.tsx +3 -3
  1211. package/src/badge/_badge.scss +97 -59
  1212. package/src/box/_box.scss +72 -81
  1213. package/src/button/AsyncButton.tsx +71 -4
  1214. package/src/button/TooltippedButton.tsx +120 -0
  1215. package/src/button/__tests__/AsyncButton.tsx +2 -0
  1216. package/src/button/__tests__/Button.tsx +12 -12
  1217. package/src/button/__tests__/ButtonUnstyled.tsx +3 -3
  1218. package/src/button/__tests__/TooltippedButton.tsx +60 -0
  1219. package/src/button/__tests__/__snapshots__/AsyncButton.tsx.snap +31 -8
  1220. package/src/button/__tests__/__snapshots__/Button.tsx.snap +1 -1
  1221. package/src/button/__tests__/__snapshots__/TooltippedButton.tsx.snap +26 -0
  1222. package/src/button/_button.scss +170 -180
  1223. package/src/card/Card.tsx +5 -3
  1224. package/src/card/CardContent.tsx +3 -3
  1225. package/src/card/ClickableCard.tsx +105 -0
  1226. package/src/card/__tests__/Card.tsx +3 -3
  1227. package/src/card/__tests__/CardContent.tsx +3 -3
  1228. package/src/card/__tests__/CardFooter.tsx +3 -3
  1229. package/src/card/__tests__/CardHeader.tsx +5 -5
  1230. package/src/card/__tests__/CardSubtitle.tsx +3 -3
  1231. package/src/card/__tests__/CardTitle.tsx +3 -3
  1232. package/src/card/__tests__/ClickableCard.tsx +66 -0
  1233. package/src/card/__tests__/__snapshots__/CardHeader.tsx.snap +1 -1
  1234. package/src/card/__tests__/__snapshots__/CardSubtitle.tsx.snap +2 -2
  1235. package/src/card/__tests__/__snapshots__/ClickableCard.tsx.snap +20 -0
  1236. package/src/card/__tests__/__snapshots__/styles.ts.snap +1 -1
  1237. package/src/card/_card.scss +81 -82
  1238. package/src/card/styles.ts +19 -10
  1239. package/src/chip/__tests__/Chip.tsx +20 -22
  1240. package/src/chip/__tests__/__snapshots__/Chip.tsx.snap +3 -3
  1241. package/src/chip/__tests__/__snapshots__/styles.ts.snap +1 -1
  1242. package/src/chip/_chip.scss +136 -163
  1243. package/src/chip/styles.ts +4 -5
  1244. package/src/cssUtils.ts +4 -1
  1245. package/src/dialog/Dialog.tsx +5 -4
  1246. package/src/dialog/FixedDialog.tsx +5 -4
  1247. package/src/dialog/__tests__/Dialog.tsx +316 -0
  1248. package/src/dialog/__tests__/DialogContent.tsx +53 -0
  1249. package/src/dialog/__tests__/DialogFooter.tsx +70 -0
  1250. package/src/dialog/__tests__/DialogHeader.tsx +37 -0
  1251. package/src/dialog/__tests__/DialogTitle.tsx +41 -0
  1252. package/src/dialog/__tests__/__snapshots__/Dialog.tsx.snap +84 -0
  1253. package/src/dialog/__tests__/__snapshots__/DialogContent.tsx.snap +36 -0
  1254. package/src/dialog/__tests__/__snapshots__/DialogFooter.tsx.snap +186 -0
  1255. package/src/dialog/__tests__/__snapshots__/DialogHeader.tsx.snap +18 -0
  1256. package/src/dialog/__tests__/__snapshots__/DialogTitle.tsx.snap +26 -0
  1257. package/src/dialog/_dialog.scss +179 -162
  1258. package/src/divider/Divider.tsx +0 -1
  1259. package/src/divider/__tests__/Divider.tsx +3 -3
  1260. package/src/divider/_divider.scss +61 -70
  1261. package/src/draggable/__tests__/useDraggable.tsx +35 -39
  1262. package/src/draggable/_draggable.scss +16 -12
  1263. package/src/draggable/useDraggable.ts +26 -25
  1264. package/src/draggable/utils.ts +16 -50
  1265. package/src/expansion-panel/__tests__/ExpansionPanel.tsx +30 -25
  1266. package/src/expansion-panel/_expansion-panel.scss +76 -50
  1267. package/src/expansion-panel/useExpansionPanels.ts +20 -16
  1268. package/src/focus/__tests__/useFocusContainer.tsx +280 -0
  1269. package/src/focus/useFocusContainer.ts +17 -10
  1270. package/src/form/Form.tsx +2 -1
  1271. package/src/form/Label.tsx +5 -5
  1272. package/src/form/MenuItemInputToggle.tsx +47 -61
  1273. package/src/form/MenuItemTextField.tsx +3 -0
  1274. package/src/form/NativeSelect.tsx +6 -3
  1275. package/src/form/Option.tsx +8 -2
  1276. package/src/form/ResizingTextAreaWrapper.tsx +75 -0
  1277. package/src/form/Select.tsx +251 -327
  1278. package/src/form/SelectedOption.tsx +55 -0
  1279. package/src/form/Slider.tsx +45 -5
  1280. package/src/form/SliderThumb.tsx +15 -3
  1281. package/src/form/SliderValueMarks.tsx +3 -1
  1282. package/src/form/SliderValueTooltip.tsx +1 -1
  1283. package/src/form/Switch.tsx +6 -27
  1284. package/src/form/SwitchTrack.tsx +12 -2
  1285. package/src/form/TextArea.tsx +40 -32
  1286. package/src/form/TextField.tsx +19 -19
  1287. package/src/form/TextFieldContainerStyles.ts +7 -7
  1288. package/src/form/__tests__/Checkbox.tsx +5 -5
  1289. package/src/form/__tests__/Fieldset.tsx +3 -3
  1290. package/src/form/__tests__/FileInput.tsx +2 -2
  1291. package/src/form/__tests__/Label.tsx +3 -3
  1292. package/src/form/__tests__/Legend.tsx +3 -3
  1293. package/src/form/__tests__/MenuItemCheckbox.tsx +53 -0
  1294. package/src/form/__tests__/MenuItemRadio.tsx +53 -0
  1295. package/src/form/__tests__/Radio.tsx +3 -3
  1296. package/src/form/__tests__/Select.tsx +439 -0
  1297. package/src/form/__tests__/Switch.tsx +152 -0
  1298. package/src/form/__tests__/TextArea.tsx +433 -0
  1299. package/src/form/__tests__/TextField.tsx +195 -0
  1300. package/src/form/__tests__/__snapshots__/FileInput.tsx.snap +23 -23
  1301. package/src/form/__tests__/__snapshots__/MenuItemCheckbox.tsx.snap +96 -0
  1302. package/src/form/__tests__/__snapshots__/MenuItemRadio.tsx.snap +96 -0
  1303. package/src/form/__tests__/__snapshots__/Select.tsx.snap +492 -0
  1304. package/src/form/__tests__/__snapshots__/Switch.tsx.snap +428 -0
  1305. package/src/form/__tests__/__snapshots__/TextArea.tsx.snap +548 -0
  1306. package/src/form/__tests__/__snapshots__/TextField.tsx.snap +279 -0
  1307. package/src/form/__tests__/__snapshots__/useCheckboxGroup.tsx.snap +1 -1
  1308. package/src/form/__tests__/__snapshots__/useRadioGroup.tsx.snap +1 -1
  1309. package/src/form/__tests__/useCheckboxGroup.tsx +33 -33
  1310. package/src/form/__tests__/useFileUpload.tsx +41 -33
  1311. package/src/form/__tests__/useFormReset.tsx +195 -0
  1312. package/src/form/__tests__/useRadioGroup.tsx +25 -25
  1313. package/src/form/_form.scss +1339 -1256
  1314. package/src/form/menuItemInputToggleStyles.ts +78 -0
  1315. package/src/form/selectUtils.ts +3 -14
  1316. package/src/form/switchStyles.ts +3 -3
  1317. package/src/form/textAreaStyles.ts +2 -2
  1318. package/src/form/types.ts +6 -8
  1319. package/src/form/useCombobox.ts +523 -0
  1320. package/src/form/useEditableCombobox.ts +139 -0
  1321. package/src/form/useFormReset.ts +48 -0
  1322. package/src/form/useListboxProvider.ts +9 -7
  1323. package/src/form/useResizingTextArea.ts +66 -25
  1324. package/src/form/useSelectCombobox.ts +70 -0
  1325. package/src/form/utils.ts +17 -4
  1326. package/src/hoverMode/useHoverMode.ts +4 -4
  1327. package/src/icon/FontIcon.tsx +2 -5
  1328. package/src/icon/IconRotator.tsx +1 -2
  1329. package/src/icon/MaterialIcon.tsx +4 -6
  1330. package/src/icon/MaterialSymbol.tsx +18 -12
  1331. package/src/icon/__tests__/FontIcon.tsx +7 -11
  1332. package/src/icon/__tests__/IconRotator.tsx +4 -4
  1333. package/src/icon/__tests__/MaterialIcon.tsx +79 -0
  1334. package/src/icon/__tests__/MaterialSymbol.tsx +100 -0
  1335. package/src/icon/__tests__/SVGIcon.tsx +6 -5
  1336. package/src/icon/__tests__/TextIconSpacing.tsx +15 -17
  1337. package/src/icon/__tests__/__snapshots__/IconRotator.tsx.snap +6 -6
  1338. package/src/icon/__tests__/__snapshots__/MaterialIcon.tsx.snap +82 -0
  1339. package/src/icon/__tests__/__snapshots__/MaterialSymbol.tsx.snap +42 -0
  1340. package/src/icon/_icon.scss +105 -112
  1341. package/src/icon/iconConfig.tsx +1 -0
  1342. package/src/icon/material.ts +284 -54
  1343. package/src/icon/{MaterialSymbolsProvider.tsx → materialConfig.ts} +49 -67
  1344. package/src/icon/styles.ts +0 -21
  1345. package/src/index.ts +30 -7
  1346. package/src/interaction/__tests__/UserInteractionModeProvider.tsx +3 -3
  1347. package/src/interaction/_interaction.scss +144 -135
  1348. package/src/layout/__tests__/__snapshots__/LayoutAppBar.tsx.snap +4 -4
  1349. package/src/layout/__tests__/__snapshots__/useExpandableLayout.tsx.snap +1 -1
  1350. package/src/layout/__tests__/__snapshots__/useLayoutTree.tsx.snap +18 -18
  1351. package/src/layout/__tests__/__snapshots__/useResizableLayout.tsx.snap +1 -1
  1352. package/src/layout/__tests__/__snapshots__/useTemporaryLayout.tsx.snap +1 -1
  1353. package/src/layout/__tests__/useExpandableLayout.tsx +12 -1
  1354. package/src/layout/__tests__/useLayoutTree.tsx +6 -1
  1355. package/src/layout/__tests__/useResizableLayout.tsx +13 -1
  1356. package/src/layout/__tests__/useTemporaryLayout.tsx +6 -1
  1357. package/src/layout/_layout.scss +82 -86
  1358. package/src/layout/useLayoutAppBarHeight.ts +5 -9
  1359. package/src/link/Link.tsx +15 -5
  1360. package/src/link/__tests__/Link.tsx +3 -3
  1361. package/src/link/__tests__/SkipToMainContent.tsx +11 -14
  1362. package/src/link/_link.scss +74 -66
  1363. package/src/list/ListItem.tsx +20 -13
  1364. package/src/list/ListItemAddon.tsx +5 -3
  1365. package/src/list/ListItemChildren.tsx +4 -2
  1366. package/src/list/ListItemLink.tsx +5 -5
  1367. package/src/list/__tests__/List.tsx +7 -7
  1368. package/src/list/__tests__/ListItem.tsx +18 -17
  1369. package/src/list/__tests__/ListItemLink.tsx +7 -7
  1370. package/src/list/__tests__/ListSubheader.tsx +5 -5
  1371. package/src/list/__tests__/__snapshots__/ListItem.tsx.snap +1 -1
  1372. package/src/list/__tests__/getListItemHeight.ts +2 -2
  1373. package/src/list/_list.scss +187 -184
  1374. package/src/list/getListItemHeight.ts +2 -3
  1375. package/src/list/listItemStyles.ts +15 -5
  1376. package/src/list/types.ts +28 -6
  1377. package/src/menu/DropdownMenu.tsx +23 -4
  1378. package/src/menu/Menu.tsx +20 -1
  1379. package/src/menu/MenuItemCircularProgress.tsx +116 -0
  1380. package/src/menu/MenuItemSeparator.tsx +2 -12
  1381. package/src/menu/MenuSheet.tsx +10 -1
  1382. package/src/menu/__tests__/DropdownMenu.tsx +74 -65
  1383. package/src/menu/__tests__/MenuBar.tsx +57 -48
  1384. package/src/menu/__tests__/MenuItemCircularProgress.tsx +39 -0
  1385. package/src/menu/__tests__/MenuVisibilityProvider.tsx +3 -3
  1386. package/src/menu/__tests__/__snapshots__/MenuItemCircularProgress.tsx.snap +68 -0
  1387. package/src/menu/__tests__/__snapshots__/useContextMenu.tsx.snap +54 -0
  1388. package/src/menu/__tests__/useContextMenu.tsx +41 -0
  1389. package/src/menu/_menu.scss +29 -50
  1390. package/src/menu/useContextMenu.ts +3 -3
  1391. package/src/movement/types.ts +50 -25
  1392. package/src/movement/useKeyboardMovementProvider.ts +21 -8
  1393. package/src/movement/utils.ts +12 -2
  1394. package/src/overlay/__tests__/Overlay.tsx +37 -35
  1395. package/src/overlay/_overlay.scss +39 -42
  1396. package/src/portal/PortalContainerProvider.tsx +10 -2
  1397. package/src/portal/__tests__/PortalContainerProvider.node.tsx +1 -0
  1398. package/src/portal/__tests__/PortalContainerProvider.tsx +32 -9
  1399. package/src/positioning/__tests__/__snapshots__/useFixedPositioning.tsx.snap +0 -32
  1400. package/src/positioning/__tests__/useFixedPositioning.tsx +18 -26
  1401. package/src/positioning/useFixedPositioning.ts +0 -6
  1402. package/src/progress/CircularProgress.tsx +5 -4
  1403. package/src/progress/LinearProgress.tsx +88 -86
  1404. package/src/progress/__tests__/CircularProgress.tsx +49 -27
  1405. package/src/progress/__tests__/LinearProgress.tsx +40 -25
  1406. package/src/progress/__tests__/__snapshots__/CircularProgress.tsx.snap +21 -0
  1407. package/src/progress/__tests__/__snapshots__/LinearProgress.tsx.snap +20 -0
  1408. package/src/progress/_progress.scss +33 -33
  1409. package/src/responsive-item/_responsive-item.scss +91 -89
  1410. package/src/searching/__tests__/caseInsensitive.ts +165 -0
  1411. package/src/searching/__tests__/fuzzy.ts +169 -0
  1412. package/src/searching/__tests__/toSearchQuery.ts +21 -0
  1413. package/src/searching/__tests__/useFuzzyMatch.tsx +200 -0
  1414. package/src/searching/caseInsensitive.ts +200 -0
  1415. package/src/searching/fuzzy.ts +175 -0
  1416. package/src/searching/toSearchQuery.ts +20 -0
  1417. package/src/searching/types.ts +34 -0
  1418. package/src/searching/useFuzzyMatch.ts +42 -0
  1419. package/src/searching/utils.ts +53 -0
  1420. package/src/segmented-button/_segmented-button.scss +89 -90
  1421. package/src/sheet/_sheet.scss +107 -123
  1422. package/src/sheet/styles.ts +14 -15
  1423. package/src/snackbar/DefaultToastRenderer.tsx +1 -1
  1424. package/src/snackbar/Snackbar.tsx +28 -32
  1425. package/src/snackbar/Toast.tsx +7 -2
  1426. package/src/snackbar/ToastManager.tsx +3 -2
  1427. package/src/snackbar/__tests__/Snackbar.tsx +13 -12
  1428. package/src/snackbar/__tests__/Toast.tsx +8 -3
  1429. package/src/snackbar/__tests__/ToastActionButton.tsx +2 -2
  1430. package/src/snackbar/__tests__/ToastCloseButton.tsx +2 -2
  1431. package/src/snackbar/__tests__/ToastManagerProvider.tsx +28 -42
  1432. package/src/snackbar/__tests__/__snapshots__/Snackbar.tsx.snap +127 -27
  1433. package/src/snackbar/__tests__/__snapshots__/ToastManagerProvider.tsx.snap +23 -8
  1434. package/src/snackbar/_snackbar.scss +148 -144
  1435. package/src/snackbar/snackbarStyles.ts +3 -1
  1436. package/src/suspense/CircularProgressSuspense.tsx +19 -2
  1437. package/src/suspense/__tests__/CircularProgressSuspense.tsx +90 -0
  1438. package/src/suspense/__tests__/NullSuspense.tsx +46 -0
  1439. package/src/suspense/__tests__/__snapshots__/CircularProgressSuspense.tsx.snap +24 -0
  1440. package/src/table/Table.tsx +1 -24
  1441. package/src/table/TableCell.tsx +22 -85
  1442. package/src/table/TableCellContent.tsx +20 -2
  1443. package/src/table/TableCheckbox.tsx +7 -5
  1444. package/src/table/TableContainer.tsx +1 -8
  1445. package/src/table/TableFooter.tsx +30 -23
  1446. package/src/table/TableHeader.tsx +23 -40
  1447. package/src/table/TableRadio.tsx +197 -0
  1448. package/src/table/TableRow.tsx +1 -28
  1449. package/src/table/__tests__/Table.tsx +4 -10
  1450. package/src/table/__tests__/TableBody.tsx +3 -3
  1451. package/src/table/__tests__/TableCheckbox.tsx +10 -11
  1452. package/src/table/__tests__/TableContainer.tsx +3 -3
  1453. package/src/table/__tests__/TableRadio.tsx +112 -0
  1454. package/src/table/__tests__/TableRow.tsx +4 -10
  1455. package/src/table/__tests__/__snapshots__/Table.tsx.snap +249 -251
  1456. package/src/table/__tests__/__snapshots__/TableBody.tsx.snap +3 -3
  1457. package/src/table/__tests__/__snapshots__/TableCheckbox.tsx.snap +4 -4
  1458. package/src/table/__tests__/__snapshots__/TableRadio.tsx.snap +138 -0
  1459. package/src/table/__tests__/__snapshots__/TableRow.tsx.snap +4 -6
  1460. package/src/table/__tests__/__snapshots__/tableContainerStyles.ts.snap +3 -0
  1461. package/src/table/__tests__/__snapshots__/tableRowStyles.ts.snap +3 -0
  1462. package/src/table/__tests__/__snapshots__/tableStyles.ts.snap +3 -0
  1463. package/src/table/__tests__/tableContainerStyles.ts +8 -0
  1464. package/src/table/__tests__/tableRowStyles.ts +8 -0
  1465. package/src/table/__tests__/tableStyles.ts +8 -0
  1466. package/src/table/_table.scss +217 -232
  1467. package/src/table/tableCellStyles.ts +83 -0
  1468. package/src/table/tableContainerStyles.ts +19 -0
  1469. package/src/table/tableFooterStyles.ts +27 -0
  1470. package/src/table/tableHeaderStyles.ts +29 -0
  1471. package/src/table/tableRowStyles.ts +28 -0
  1472. package/src/table/tableStyles.ts +24 -0
  1473. package/src/table/types.ts +33 -15
  1474. package/src/tabs/Tab.tsx +110 -70
  1475. package/src/tabs/__tests__/Tab.tsx +27 -4
  1476. package/src/tabs/__tests__/TabList.tsx +54 -44
  1477. package/src/tabs/__tests__/__snapshots__/TabList.tsx.snap +2 -2
  1478. package/src/tabs/__tests__/useTabs.tsx +27 -24
  1479. package/src/tabs/_tabs.scss +64 -53
  1480. package/src/tabs/tabIndicatorStyles.ts +13 -3
  1481. package/src/tabs/tabListStyles.ts +1 -1
  1482. package/src/tabs/tabStyles.ts +16 -4
  1483. package/src/tabs/useTabList.ts +10 -8
  1484. package/src/test-utils/ResizeObserver.ts +100 -53
  1485. package/src/test-utils/__tests__/ResizeObserver.ts +1 -1
  1486. package/src/test-utils/data-testid.ts +9 -0
  1487. package/src/test-utils/jest-setup.ts +4 -0
  1488. package/src/test-utils/matchMedia.ts +2 -2
  1489. package/src/test-utils/polyfills/TextDecoder.ts +7 -0
  1490. package/src/test-utils/polyfills/TextEncoder.ts +5 -0
  1491. package/src/test-utils/polyfills/index.ts +2 -0
  1492. package/src/theme/ThemeProvider.tsx +6 -0
  1493. package/src/theme/__tests__/LocalStorageColorSchemeProvider.tsx +4 -4
  1494. package/src/theme/__tests__/useCSSVariables.tsx +4 -4
  1495. package/src/theme/_theme.scss +243 -133
  1496. package/src/tooltip/Tooltip.tsx +17 -9
  1497. package/src/tooltip/TooltipHoverModeProvider.tsx +18 -0
  1498. package/src/tooltip/__tests__/Tooltip.tsx +147 -104
  1499. package/src/tooltip/__tests__/TooltipHoverModeProvider.tsx +8 -3
  1500. package/src/tooltip/__tests__/__snapshots__/Tooltip.tsx.snap +0 -33
  1501. package/src/tooltip/_tooltip.scss +76 -82
  1502. package/src/tooltip/tooltipStyles.ts +4 -4
  1503. package/src/tooltip/useTooltip.ts +141 -34
  1504. package/src/transition/SkeletonPlaceholder.tsx +18 -6
  1505. package/src/transition/__tests__/CSSTransition.tsx +12 -6
  1506. package/src/transition/__tests__/Collapse.tsx +19 -17
  1507. package/src/transition/__tests__/CrossFade.tsx +20 -17
  1508. package/src/transition/__tests__/ScaleTransition.tsx +18 -14
  1509. package/src/transition/__tests__/SkeletonPlaceholder.tsx +72 -0
  1510. package/src/transition/__tests__/__snapshots__/SkeletonPlaceholder.tsx.snap +24 -0
  1511. package/src/transition/__tests__/useCSSTransition.tsx +18 -14
  1512. package/src/transition/__tests__/useCollapseTransition.tsx +25 -21
  1513. package/src/transition/__tests__/useCrossFadeTransition.tsx +20 -16
  1514. package/src/transition/__tests__/useScaleTransition.tsx +18 -12
  1515. package/src/transition/__tests__/useTransition.tsx +165 -68
  1516. package/src/transition/__tests__/utils.ts +25 -0
  1517. package/src/transition/_transition.scss +89 -78
  1518. package/src/transition/config.ts +34 -0
  1519. package/src/transition/skeletonPlaceholderUtils.ts +105 -0
  1520. package/src/transition/useCollapseTransition.ts +6 -24
  1521. package/src/transition/useSkeletonPlaceholder.ts +62 -47
  1522. package/src/transition/useTransition.ts +15 -6
  1523. package/src/transition/utils.ts +10 -5
  1524. package/src/tree/DefaultTreeItemRenderer.tsx +7 -3
  1525. package/src/tree/Tree.tsx +28 -28
  1526. package/src/tree/TreeItem.tsx +5 -7
  1527. package/src/tree/TreeProvider.tsx +6 -0
  1528. package/src/tree/__tests__/Tree.tsx +8 -3
  1529. package/src/tree/__tests__/TreeGroup.tsx +1 -0
  1530. package/src/tree/__tests__/TreeItemExpander.tsx +1 -0
  1531. package/src/tree/__tests__/__snapshots__/Tree.tsx.snap +124 -124
  1532. package/src/tree/_tree.scss +111 -109
  1533. package/src/tree/styles.ts +0 -9
  1534. package/src/tree/useTreeMovement.ts +1 -1
  1535. package/src/types.ts +13 -0
  1536. package/src/typography/SrOnly.tsx +9 -9
  1537. package/src/typography/Typography.tsx +19 -19
  1538. package/src/typography/WritingDirectionProvider.tsx +4 -2
  1539. package/src/typography/__tests__/TextContainer.tsx +3 -3
  1540. package/src/typography/__tests__/Typography.tsx +10 -12
  1541. package/src/typography/__tests__/WritingDirectionProvider.tsx +7 -7
  1542. package/src/typography/__tests__/__snapshots__/SrOnly.tsx.snap +5 -5
  1543. package/src/typography/_typography.scss +141 -87
  1544. package/src/useDebouncedFunction.ts +12 -10
  1545. package/src/useElementSize.ts +83 -0
  1546. package/src/useEnsuredState.ts +1 -1
  1547. package/src/useResizeListener.ts +3 -1
  1548. package/src/useResizeObserver.ts +8 -45
  1549. package/src/useThrottledFunction.ts +12 -10
  1550. package/src/useWindowSize.ts +29 -19
  1551. package/src/utils/__tests__/getMiddleOfRange.ts +12 -0
  1552. package/src/utils/__tests__/getRangeDefaultValue.ts +47 -0
  1553. package/src/utils/alphaNumericSort.ts +3 -16
  1554. package/src/utils/getMiddleOfRange.ts +26 -0
  1555. package/src/utils/getRangeDefaultValue.ts +8 -15
  1556. package/src/utils/getRangeSteps.ts +2 -2
  1557. package/src/utils/nearest.ts +1 -1
  1558. package/src/window-splitter/_window-splitter.scss +83 -112
  1559. package/src/window-splitter/useWindowSplitter.ts +12 -28
  1560. package/tsconfig.types.json +1 -1
  1561. package/dist/divider/VerticalDivider.d.ts +0 -32
  1562. package/dist/divider/VerticalDivider.js +0 -40
  1563. package/dist/divider/VerticalDivider.js.map +0 -1
  1564. package/dist/divider/useVerticalDividerHeight.d.ts +0 -37
  1565. package/dist/divider/useVerticalDividerHeight.js +0 -40
  1566. package/dist/divider/useVerticalDividerHeight.js.map +0 -1
  1567. package/dist/form/SelectValue.d.ts +0 -17
  1568. package/dist/form/SelectValue.js +0 -32
  1569. package/dist/form/SelectValue.js.map +0 -1
  1570. package/dist/icon/MaterialIconsProvider.d.ts +0 -12
  1571. package/dist/icon/MaterialIconsProvider.js +0 -17
  1572. package/dist/icon/MaterialIconsProvider.js.map +0 -1
  1573. package/dist/icon/MaterialSymbolsProvider.js +0 -60
  1574. package/dist/icon/MaterialSymbolsProvider.js.map +0 -1
  1575. package/dist/link/LinkProvider.d.ts +0 -29
  1576. package/dist/link/LinkProvider.js +0 -26
  1577. package/dist/link/LinkProvider.js.map +0 -1
  1578. package/dist/tooltip/useOverflowTooltip.d.ts +0 -61
  1579. package/dist/tooltip/useOverflowTooltip.js +0 -71
  1580. package/dist/tooltip/useOverflowTooltip.js.map +0 -1
  1581. package/dist/utils/filters.d.ts +0 -196
  1582. package/dist/utils/filters.js +0 -67
  1583. package/dist/utils/filters.js.map +0 -1
  1584. package/src/divider/VerticalDivider.tsx +0 -50
  1585. package/src/divider/__tests__/VerticalDivider.tsx +0 -35
  1586. package/src/divider/__tests__/__snapshots__/VerticalDivider.tsx.snap +0 -41
  1587. package/src/divider/useVerticalDividerHeight.ts +0 -72
  1588. package/src/form/SelectValue.tsx +0 -39
  1589. package/src/icon/MaterialIconsProvider.ts +0 -23
  1590. package/src/link/LinkProvider.tsx +0 -51
  1591. package/src/tooltip/__tests__/useOverflowTooltip.tsx +0 -77
  1592. package/src/tooltip/useOverflowTooltip.ts +0 -93
  1593. package/src/utils/__tests__/filters.ts +0 -279
  1594. package/src/utils/filters.ts +0 -320
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/expansion-panel/useExpansionPanels.ts"],"sourcesContent":["\"use client\";\nimport { useState } from \"react\";\nimport type { UseStateInitializer, UseStateSetter } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport type { ExpansionPanelProps } from \"./ExpansionPanel.js\";\n\n/** @remarks \\@since 6.0.0 */\nexport interface ExpansionPanelHookOptions {\n /**\n * An optional id to prefix each panel with.\n *\n * @defaultValue `\"expansion-panel-\" + useId()`\n */\n baseId?: string;\n\n /**\n * Set this to `true` if multiple panels can be open at the same time.\n *\n * @defaultValue `false`\n */\n multiple?: boolean;\n\n /**\n * Set this to `true` to enforce that at least one panel must always be\n * expanded.\n *\n * @defaultValue `false`\n */\n preventAllClosed?: boolean;\n\n /**\n * This is a convenience option to disable the expansion transition for all\n * panels.\n *\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n\n /**\n * @defaultValue `preventAllClosed ? [\"expansion-panel-\" + useId() + \"-1\"] : []`\n */\n defaultExpandedIds?: UseStateInitializer<string[]>;\n\n /**\n * This can only be used if the {@link defaultExpandedIds} was not provided\n * and using index based panels.\n *\n * @example\n * ```tsx\n * const { getPanelProps } = useExpansionPanels({\n * defaultExpandedIndex: 2,\n * });\n *\n * return (\n * <ExpansionPanel {...getPanelProps(0)} />\n * <ExpansionPanel {...getPanelProps(1)} />\n * // expanded on first render\n * <ExpansionPanel {...getPanelProps(2)} />\n * <ExpansionPanel {...getPanelProps(3)} />\n * );\n * ```\n */\n defaultExpandedIndex?: number;\n\n /**\n * @defaultValue `false`\n */\n disableContentPadding?: boolean;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport type ProvidedExpansionPanelProps = Pick<\n Required<ExpansionPanelProps>,\n | \"id\"\n | \"disabled\"\n | \"expanded\"\n | \"onExpandClick\"\n | \"disableTransition\"\n | \"disableContentPadding\"\n>;\n\n/**\n * @param indexOrPanelId - This should either be a DOM id to use for the panel\n * or the panel's index.\n * @returns Props to pass to an `ExpansionPanel` for it to work correctly.\n * @remarks \\@since 6.0.0\n */\nexport type GetExpansionPanelProps = (\n indexOrPanelId: string | number\n) => ProvidedExpansionPanelProps;\n\n/** @remarks \\@since 6.0.0 */\nexport interface ExpansionPanelImplementation {\n /**\n * The current set of expanded panel ids if you need this for some reason.\n */\n expandedIds: ReadonlySet<string>;\n\n /**\n * This can be used to manually control which panels are expanded if the\n * default behavior does not work for your use case.\n */\n setExpandedIds: UseStateSetter<ReadonlySet<string>>;\n\n /**\n * @example\n * Index Based Panels\n * ```tsx\n * <ExpansionPanel {...getPanelProps(0)} />\n * <ExpansionPanel {...getPanelProps(1)} />\n * <ExpansionPanel {...getPanelProps(2)} />\n * ```\n *\n * @example\n * Custom Panel Ids\n * ```tsx\n * <ExpansionPanel {...getPanelProps(\"address-panel\")} />\n * <ExpansionPanel {...getPanelProps(\"billing-panel\")} />\n * <ExpansionPanel {...getPanelProps(\"confirmation-panel\")} />\n * ```\n */\n getPanelProps: GetExpansionPanelProps;\n}\n\n/**\n * Use this hook to control the expanded state for a group of `ExpansionPanel`.\n *\n * @example\n * Index Based Panels\n * ```tsx\n * import {\n * ExpansionList,\n * ExpansionPanel,\n * useExpansionPanels,\n * } from \"@react-md/core\";\n * import { type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { getPanelProps } = useExpansionPanels();\n *\n * return (\n * <ExpansionList>\n * <ExpansionPanel {...getPanelProps(0)} headerChildren=\"Panel 1\">\n * Panel 1 Contents\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(1)} headerChildren=\"Panel 2\">\n * Panel 2 Contents\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(2)} headerChildren=\"Panel 3\">\n * Panel 3 Contents\n * </ExpansionPanel>\n * </ExpansionList>\n * );\n * }\n * ```\n *\n * @example\n * Custom Panel Ids and Expand All Panels by Default\n * ```tsx\n * import {\n * ExpansionList,\n * ExpansionPanel,\n * useExpansionPanels,\n * } from \"@react-md/core\";\n * import { type ReactElement } from \"react\";\n *\n * import { BillingAddress } from \"./BillingAddress\";\n * import { BillingInformation } from \"./BillingInformation\";\n * import { PersonalInformation } from \"./PersonalInformation\";\n *\n * const panel1Id = \"personal-information-panel\";\n * const panel2Id = \"billing-information-panel\";\n * const panel3Id = \"billing-address-panel\";\n *\n * function Example(): ReactElement {\n * const { getPanelProps } = useExpansionPanels({\n * multiple: true,\n * defaultExpandedIds: () => [panel1Id, panel2Id, panel3Id],\n * });\n *\n * return (\n * <ExpansionList>\n * <ExpansionPanel {...getPanelProps(panel1Id)} headerChildren=\"Personal Information\">\n * <PersonalInformation />\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(panel2Id)} headerChildren=\"Billing Information\">\n * <BillingInformation />\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(panel3Id)} headerChildren=\"Billing Address\">\n * <BillingAddress />\n * </ExpansionPanel>\n * </ExpansionList>\n * );\n * }\n * ```\n *\n *\n * @remarks\n * \\@since 6.0.0 The hook was renamed from `usePanels` to `useExpansionPanels`,\n * the API changed to return `getPanelProps` instead of a generated list of\n * panel props based on the provided `count`, and the hook no longer supports\n * having all panels expanded by default.\n */\nexport function useExpansionPanels(\n options: ExpansionPanelHookOptions = {}\n): ExpansionPanelImplementation {\n const {\n baseId: propBaseId,\n multiple = false,\n preventAllClosed = false,\n disableTransition = false,\n defaultExpandedIds,\n defaultExpandedIndex,\n disableContentPadding = false,\n } = options;\n\n const baseId = useEnsuredId(propBaseId, \"expansion-panel\");\n const createId = (index: number): string => `${baseId}-${index + 1}`;\n const [expandedIds, setExpandedIds] = useState<ReadonlySet<string>>(() => {\n if (typeof defaultExpandedIds === \"undefined\") {\n const initialList: string[] = [];\n if (typeof defaultExpandedIndex === \"number\" || preventAllClosed) {\n initialList.push(createId(defaultExpandedIndex ?? 0));\n }\n\n return new Set(initialList);\n }\n\n const ids =\n typeof defaultExpandedIds === \"function\"\n ? defaultExpandedIds()\n : defaultExpandedIds;\n return new Set(ids);\n });\n\n return {\n expandedIds,\n setExpandedIds,\n getPanelProps(indexOrPanelId) {\n const id =\n typeof indexOrPanelId === \"string\"\n ? indexOrPanelId\n : createId(indexOrPanelId);\n\n const expanded = expandedIds.has(id);\n const disabled = expanded && preventAllClosed && expandedIds.size === 1;\n return {\n id,\n disabled,\n expanded,\n onExpandClick() {\n if (disabled) {\n return;\n }\n\n setExpandedIds((prevIds) => {\n const expanded = prevIds.has(id);\n if (!multiple) {\n return new Set(expanded ? [] : [id]);\n }\n\n const nextIds = new Set(prevIds);\n if (expanded) {\n nextIds.delete(id);\n } else {\n nextIds.add(id);\n }\n\n return nextIds;\n });\n },\n disableTransition,\n disableContentPadding,\n };\n },\n };\n}\n"],"names":["useState","useEnsuredId","useExpansionPanels","options","baseId","propBaseId","multiple","preventAllClosed","disableTransition","defaultExpandedIds","defaultExpandedIndex","disableContentPadding","createId","index","expandedIds","setExpandedIds","initialList","push","Set","ids","getPanelProps","indexOrPanelId","id","expanded","has","disabled","size","onExpandClick","prevIds","nextIds","delete","add"],"mappings":"AAAA;AACA,SAASA,QAAQ,QAAQ,QAAQ;AAEjC,SAASC,YAAY,QAAQ,qBAAqB;AAyHlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8EC,GACD,OAAO,SAASC,mBACdC,UAAqC,CAAC,CAAC;IAEvC,MAAM,EACJC,QAAQC,UAAU,EAClBC,WAAW,KAAK,EAChBC,mBAAmB,KAAK,EACxBC,oBAAoB,KAAK,EACzBC,kBAAkB,EAClBC,oBAAoB,EACpBC,wBAAwB,KAAK,EAC9B,GAAGR;IAEJ,MAAMC,SAASH,aAAaI,YAAY;IACxC,MAAMO,WAAW,CAACC,QAA0B,CAAC,EAAET,OAAO,CAAC,EAAES,QAAQ,EAAE,CAAC;IACpE,MAAM,CAACC,aAAaC,eAAe,GAAGf,SAA8B;QAClE,IAAI,OAAOS,uBAAuB,aAAa;YAC7C,MAAMO,cAAwB,EAAE;YAChC,IAAI,OAAON,yBAAyB,YAAYH,kBAAkB;gBAChES,YAAYC,IAAI,CAACL,SAASF,wBAAwB;YACpD;YAEA,OAAO,IAAIQ,IAAIF;QACjB;QAEA,MAAMG,MACJ,OAAOV,uBAAuB,aAC1BA,uBACAA;QACN,OAAO,IAAIS,IAAIC;IACjB;IAEA,OAAO;QACLL;QACAC;QACAK,eAAcC,cAAc;YAC1B,MAAMC,KACJ,OAAOD,mBAAmB,WACtBA,iBACAT,SAASS;YAEf,MAAME,WAAWT,YAAYU,GAAG,CAACF;YACjC,MAAMG,WAAWF,YAAYhB,oBAAoBO,YAAYY,IAAI,KAAK;YACtE,OAAO;gBACLJ;gBACAG;gBACAF;gBACAI;oBACE,IAAIF,UAAU;wBACZ;oBACF;oBAEAV,eAAe,CAACa;wBACd,MAAML,WAAWK,QAAQJ,GAAG,CAACF;wBAC7B,IAAI,CAAChB,UAAU;4BACb,OAAO,IAAIY,IAAIK,WAAW,EAAE,GAAG;gCAACD;6BAAG;wBACrC;wBAEA,MAAMO,UAAU,IAAIX,IAAIU;wBACxB,IAAIL,UAAU;4BACZM,QAAQC,MAAM,CAACR;wBACjB,OAAO;4BACLO,QAAQE,GAAG,CAACT;wBACd;wBAEA,OAAOO;oBACT;gBACF;gBACArB;gBACAG;YACF;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/expansion-panel/useExpansionPanels.ts"],"sourcesContent":["\"use client\";\nimport { useState } from \"react\";\nimport type { UseStateInitializer, UseStateSetter } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport type { ExpansionPanelProps } from \"./ExpansionPanel.js\";\n\n/** @remarks \\@since 6.0.0 */\nexport interface ExpansionPanelHookOptions {\n /**\n * An optional id to prefix each panel with.\n *\n * @defaultValue `\"expansion-panel-\" + useId()`\n */\n baseId?: string;\n\n /**\n * Set this to `true` if multiple panels can be open at the same time.\n *\n * @defaultValue `false`\n */\n multiple?: boolean;\n\n /**\n * Set this to `true` to enforce that at least one panel must always be\n * expanded.\n *\n * @defaultValue `false`\n */\n preventAllCollapsed?: boolean;\n\n /**\n * This is a convenience option to disable the expansion transition for all\n * panels.\n *\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n\n /**\n * @defaultValue `preventAllCollapsed ? [\"expansion-panel-\" + useId() + \"-1\"] : []`\n */\n defaultExpandedIds?: UseStateInitializer<string[]>;\n\n /**\n * This can only be used if the {@link defaultExpandedIds} was not provided\n * and using index based panels.\n *\n * @example\n * ```tsx\n * const { getPanelProps } = useExpansionPanels({\n * defaultExpandedIndex: 2,\n * });\n *\n * return (\n * <ExpansionPanel {...getPanelProps(0)} />\n * <ExpansionPanel {...getPanelProps(1)} />\n * // expanded on first render\n * <ExpansionPanel {...getPanelProps(2)} />\n * <ExpansionPanel {...getPanelProps(3)} />\n * );\n * ```\n */\n defaultExpandedIndex?: number;\n\n /**\n * @defaultValue `false`\n */\n disableContentPadding?: boolean;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport type ProvidedExpansionPanelProps = Pick<\n Required<ExpansionPanelProps>,\n | \"disabled\"\n | \"expanded\"\n | \"onExpandClick\"\n | \"disableTransition\"\n | \"disableContentPadding\"\n> & { id?: string };\n\n/**\n * @param indexOrPanelId - This should either be a DOM id to use for the panel\n * or the panel's index.\n * @returns Props to pass to an `ExpansionPanel` for it to work correctly.\n * @remarks \\@since 6.0.0\n */\nexport type GetExpansionPanelProps = (\n indexOrPanelId: string | number\n) => ProvidedExpansionPanelProps;\n\n/** @remarks \\@since 6.0.0 */\nexport interface ExpansionPanelImplementation {\n /**\n * The current set of expanded panel ids if you need this for some reason.\n */\n expandedIds: ReadonlySet<string>;\n\n /**\n * This can be used to manually control which panels are expanded if the\n * default behavior does not work for your use case.\n */\n setExpandedIds: UseStateSetter<ReadonlySet<string>>;\n\n /**\n * @example\n * Index Based Panels\n * ```tsx\n * <ExpansionPanel {...getPanelProps(0)} />\n * <ExpansionPanel {...getPanelProps(1)} />\n * <ExpansionPanel {...getPanelProps(2)} />\n * ```\n *\n * @example\n * Custom Panel Ids\n * ```tsx\n * <ExpansionPanel {...getPanelProps(\"address-panel\")} />\n * <ExpansionPanel {...getPanelProps(\"billing-panel\")} />\n * <ExpansionPanel {...getPanelProps(\"confirmation-panel\")} />\n * ```\n */\n getPanelProps: GetExpansionPanelProps;\n}\n\n/**\n * Use this hook to control the expanded state for a group of `ExpansionPanel`.\n *\n * @example\n * Index Based Panels\n * ```tsx\n * import {\n * ExpansionList,\n * ExpansionPanel,\n * useExpansionPanels,\n * } from \"@react-md/core\";\n * import { type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { getPanelProps } = useExpansionPanels();\n *\n * return (\n * <ExpansionList>\n * <ExpansionPanel {...getPanelProps(0)} headerChildren=\"Panel 1\">\n * Panel 1 Contents\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(1)} headerChildren=\"Panel 2\">\n * Panel 2 Contents\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(2)} headerChildren=\"Panel 3\">\n * Panel 3 Contents\n * </ExpansionPanel>\n * </ExpansionList>\n * );\n * }\n * ```\n *\n * @example\n * Custom Panel Ids and Expand All Panels by Default\n * ```tsx\n * import {\n * ExpansionList,\n * ExpansionPanel,\n * useExpansionPanels,\n * } from \"@react-md/core\";\n * import { type ReactElement } from \"react\";\n *\n * import { BillingAddress } from \"./BillingAddress\";\n * import { BillingInformation } from \"./BillingInformation\";\n * import { PersonalInformation } from \"./PersonalInformation\";\n *\n * const panel1Id = \"personal-information-panel\";\n * const panel2Id = \"billing-information-panel\";\n * const panel3Id = \"billing-address-panel\";\n *\n * function Example(): ReactElement {\n * const { getPanelProps } = useExpansionPanels({\n * multiple: true,\n * defaultExpandedIds: () => [panel1Id, panel2Id, panel3Id],\n * });\n *\n * return (\n * <ExpansionList>\n * <ExpansionPanel {...getPanelProps(panel1Id)} headerChildren=\"Personal Information\">\n * <PersonalInformation />\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(panel2Id)} headerChildren=\"Billing Information\">\n * <BillingInformation />\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(panel3Id)} headerChildren=\"Billing Address\">\n * <BillingAddress />\n * </ExpansionPanel>\n * </ExpansionList>\n * );\n * }\n * ```\n *\n *\n * @remarks\n * \\@since 6.0.0 The hook was renamed from `usePanels` to `useExpansionPanels`,\n * the API changed to return `getPanelProps` instead of a generated list of\n * panel props based on the provided `count`, and the hook no longer supports\n * having all panels expanded by default.\n */\nexport function useExpansionPanels(\n options: ExpansionPanelHookOptions = {}\n): ExpansionPanelImplementation {\n const {\n baseId: propBaseId,\n multiple = false,\n preventAllCollapsed = false,\n disableTransition = false,\n defaultExpandedIds,\n defaultExpandedIndex,\n disableContentPadding = false,\n } = options;\n\n const baseId = useEnsuredId(propBaseId, \"expansion-panel\");\n const createId = (index: number): string => `${baseId}-${index + 1}`;\n const [expandedIds, setExpandedIds] = useState<ReadonlySet<string>>(() => {\n if (typeof defaultExpandedIds === \"undefined\") {\n const initialList: string[] = [];\n if (typeof defaultExpandedIndex === \"number\" || preventAllCollapsed) {\n initialList.push(createId(defaultExpandedIndex ?? 0));\n }\n\n return new Set(initialList);\n }\n\n const ids =\n typeof defaultExpandedIds === \"function\"\n ? defaultExpandedIds()\n : defaultExpandedIds;\n return new Set(ids);\n });\n\n return {\n expandedIds,\n setExpandedIds,\n getPanelProps(indexOrPanelId) {\n let id: string | undefined;\n let panelId: string;\n if (typeof indexOrPanelId === \"number\") {\n id = createId(indexOrPanelId);\n panelId = id;\n } else {\n panelId = indexOrPanelId;\n }\n\n const expanded = expandedIds.has(panelId);\n const disabled =\n expanded && preventAllCollapsed && expandedIds.size === 1;\n return {\n id,\n disabled,\n expanded,\n onExpandClick() {\n if (disabled) {\n return;\n }\n\n setExpandedIds((prevIds) => {\n const expanded = prevIds.has(panelId);\n if (!multiple) {\n return new Set(expanded ? [] : [panelId]);\n }\n\n const nextIds = new Set(prevIds);\n if (expanded) {\n nextIds.delete(panelId);\n } else {\n nextIds.add(panelId);\n }\n\n return nextIds;\n });\n },\n disableTransition,\n disableContentPadding,\n };\n },\n };\n}\n"],"names":["useState","useEnsuredId","useExpansionPanels","options","baseId","propBaseId","multiple","preventAllCollapsed","disableTransition","defaultExpandedIds","defaultExpandedIndex","disableContentPadding","createId","index","expandedIds","setExpandedIds","initialList","push","Set","ids","getPanelProps","indexOrPanelId","id","panelId","expanded","has","disabled","size","onExpandClick","prevIds","nextIds","delete","add"],"mappings":"AAAA;AACA,SAASA,QAAQ,QAAQ,QAAQ;AAEjC,SAASC,YAAY,QAAQ,qBAAqB;AAwHlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8EC,GACD,OAAO,SAASC,mBACdC,UAAqC,CAAC,CAAC;IAEvC,MAAM,EACJC,QAAQC,UAAU,EAClBC,WAAW,KAAK,EAChBC,sBAAsB,KAAK,EAC3BC,oBAAoB,KAAK,EACzBC,kBAAkB,EAClBC,oBAAoB,EACpBC,wBAAwB,KAAK,EAC9B,GAAGR;IAEJ,MAAMC,SAASH,aAAaI,YAAY;IACxC,MAAMO,WAAW,CAACC,QAA0B,CAAC,EAAET,OAAO,CAAC,EAAES,QAAQ,EAAE,CAAC;IACpE,MAAM,CAACC,aAAaC,eAAe,GAAGf,SAA8B;QAClE,IAAI,OAAOS,uBAAuB,aAAa;YAC7C,MAAMO,cAAwB,EAAE;YAChC,IAAI,OAAON,yBAAyB,YAAYH,qBAAqB;gBACnES,YAAYC,IAAI,CAACL,SAASF,wBAAwB;YACpD;YAEA,OAAO,IAAIQ,IAAIF;QACjB;QAEA,MAAMG,MACJ,OAAOV,uBAAuB,aAC1BA,uBACAA;QACN,OAAO,IAAIS,IAAIC;IACjB;IAEA,OAAO;QACLL;QACAC;QACAK,eAAcC,cAAc;YAC1B,IAAIC;YACJ,IAAIC;YACJ,IAAI,OAAOF,mBAAmB,UAAU;gBACtCC,KAAKV,SAASS;gBACdE,UAAUD;YACZ,OAAO;gBACLC,UAAUF;YACZ;YAEA,MAAMG,WAAWV,YAAYW,GAAG,CAACF;YACjC,MAAMG,WACJF,YAAYjB,uBAAuBO,YAAYa,IAAI,KAAK;YAC1D,OAAO;gBACLL;gBACAI;gBACAF;gBACAI;oBACE,IAAIF,UAAU;wBACZ;oBACF;oBAEAX,eAAe,CAACc;wBACd,MAAML,WAAWK,QAAQJ,GAAG,CAACF;wBAC7B,IAAI,CAACjB,UAAU;4BACb,OAAO,IAAIY,IAAIM,WAAW,EAAE,GAAG;gCAACD;6BAAQ;wBAC1C;wBAEA,MAAMO,UAAU,IAAIZ,IAAIW;wBACxB,IAAIL,UAAU;4BACZM,QAAQC,MAAM,CAACR;wBACjB,OAAO;4BACLO,QAAQE,GAAG,CAACT;wBACd;wBAEA,OAAOO;oBACT;gBACF;gBACAtB;gBACAG;YACF;QACF;IACF;AACF"}
@@ -86,26 +86,26 @@ export interface FocusContainerImplementation<E extends HTMLElement> {
86
86
  * import type { ReactElement } from "react";
87
87
  *
88
88
  * function Example(): ReactElement {
89
- * const { toggled, toggle } = useToggle(false);
89
+ * const { toggled, enable, disable } = useToggle(false);
90
90
  *
91
91
  * const { eventHandlers, transitionOptions } = useFocusContainer({
92
- * activate: visible,
92
+ * activate: toggled,
93
93
  * });
94
94
  * const { elementProps, rendered } = useScaleTransition({
95
- * transitionIn: visible,
95
+ * transitionIn: toggled,
96
96
  * temporary: true,
97
97
  * ...transitionOptions,
98
98
  * });
99
99
  *
100
100
  * return (
101
101
  * <>
102
- * <Button onClick={toggle}>Toggle</Button>
102
+ * <Button onClick={enable}>Toggle</Button>
103
103
  * {rendered && (
104
104
  * <div {...eventHandlers} {...elementProps}>
105
- * <Button>Button 1</Button>
106
- * <Button>Button 2</Button>
107
- * <Button>Button 3</Button>
108
- * <Button>Button 4</Button>
105
+ * <Button onClick={disable}>Button 1</Button>
106
+ * <Button onClick={disable}>Button 2</Button>
107
+ * <Button onClick={disable}>Button 3</Button>
108
+ * <Button onClick={disable}>Button 4</Button>
109
109
  * </div>
110
110
  * )}
111
111
  * </>
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { useEffect, useRef } from "react";
3
+ import { TRANSITION_CONFIG } from "../transition/config.js";
3
4
  import { useEnsuredRef } from "../useEnsuredRef.js";
4
5
  import { focusElementWithin, getFocusableElements } from "./utils.js";
5
6
  const noop = ()=>{
@@ -23,26 +24,26 @@ const noop = ()=>{
23
24
  * import type { ReactElement } from "react";
24
25
  *
25
26
  * function Example(): ReactElement {
26
- * const { toggled, toggle } = useToggle(false);
27
+ * const { toggled, enable, disable } = useToggle(false);
27
28
  *
28
29
  * const { eventHandlers, transitionOptions } = useFocusContainer({
29
- * activate: visible,
30
+ * activate: toggled,
30
31
  * });
31
32
  * const { elementProps, rendered } = useScaleTransition({
32
- * transitionIn: visible,
33
+ * transitionIn: toggled,
33
34
  * temporary: true,
34
35
  * ...transitionOptions,
35
36
  * });
36
37
  *
37
38
  * return (
38
39
  * <>
39
- * <Button onClick={toggle}>Toggle</Button>
40
+ * <Button onClick={enable}>Toggle</Button>
40
41
  * {rendered && (
41
42
  * <div {...eventHandlers} {...elementProps}>
42
- * <Button>Button 1</Button>
43
- * <Button>Button 2</Button>
44
- * <Button>Button 3</Button>
45
- * <Button>Button 4</Button>
43
+ * <Button onClick={disable}>Button 1</Button>
44
+ * <Button onClick={disable}>Button 2</Button>
45
+ * <Button onClick={disable}>Button 3</Button>
46
+ * <Button onClick={disable}>Button 4</Button>
46
47
  * </div>
47
48
  * )}
48
49
  * </>
@@ -86,9 +87,9 @@ const noop = ()=>{
86
87
  transitionOptions: {
87
88
  nodeRef: refCallback,
88
89
  onEntering: handleMountFocus(onEntering, false),
89
- onEntered: handleMountFocus(onEntered, !disableTransition),
90
+ onEntered: handleMountFocus(onEntered, !disableTransition && !TRANSITION_CONFIG.disabled),
90
91
  onExiting: handleUnmountFocus(onExiting, false),
91
- onExited: handleUnmountFocus(onExited, !disableTransition)
92
+ onExited: handleUnmountFocus(onExited, !disableTransition && !TRANSITION_CONFIG.disabled)
92
93
  },
93
94
  eventHandlers: {
94
95
  onKeyDown (event) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/focus/useFocusContainer.ts"],"sourcesContent":["\"use client\";\nimport type { KeyboardEventHandler, Ref, RefObject } from \"react\";\nimport { useEffect, useRef } from \"react\";\nimport type {\n TransitionCallbacks,\n TransitionEnterHandler,\n TransitionExitHandler,\n} from \"../transition/types.js\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport type { FocusElementWithinType } from \"./utils.js\";\nimport { focusElementWithin, getFocusableElements } from \"./utils.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * `\"mount\"` - this will attempt to focus the container element if:\n * - there is no `document.activeElement`\n * - the container element does not contain the `document.activeElement`\n *\n * `\"unmount\"` - attempts to re-focus the element that was focused before the\n * focus container became active. The previous focus element is captured\n * whenever the `activate` option on the `useFocusContainer` hook is set to\n * `true`. This is normally when an element becomes `visible`.\n *\n * `\"keyboard\"` - refocuses the first focusable element if pressing `Tab` would\n * move the focus outside of the container element. If `Shift + Tab` was used,\n * the last focusable element will be used instead.\n *\n * @remarks \\@since 6.0.0\n */\nexport type FocusType = \"mount\" | \"unmount\" | \"keyboard\";\n\n/** @remarks \\@since 6.0.0 */\nexport type FocusContainerTransitionCallbacks = Pick<\n TransitionCallbacks,\n \"onEntering\" | \"onEntered\" | \"onExiting\" | \"onExited\"\n>;\n\n/** @remarks \\@since 6.0.0 */\nexport interface FocusContainerTransitionOptions<E extends HTMLElement>\n extends FocusContainerTransitionCallbacks {\n /**\n * An optional ref that will be merged with the\n * {@link FocusContainerImplementation.nodeRef}\n */\n nodeRef?: Ref<E>;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface FocusContainerEventHandlers<E extends HTMLElement> {\n onKeyDown?: KeyboardEventHandler<E>;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type IsFocusTypeDisabled = (type: FocusType) => boolean;\n\nexport interface FocusContainerComponentProps {\n /**\n * @defaultValue `() => false`\n */\n isFocusTypeDisabled?: IsFocusTypeDisabled;\n\n /**\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface FocusContainerOptions<E extends HTMLElement>\n extends FocusContainerTransitionOptions<E>,\n FocusContainerComponentProps {\n onKeyDown?: KeyboardEventHandler<E>;\n /**\n * This to `true` will capture the current focused element as a focus target\n * once the `onExited` hook is fired. This should usually be set to the\n * `transitionIn` prop for `useTransition`.\n */\n activate: boolean;\n\n /**\n * Set this to true if elements that can be programmatically focused should be\n * included. These would be elements with a `tabIndex={-1}`.\n *\n * @defaultValue `false`\n */\n programmatic?: boolean;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface FocusContainerImplementation<E extends HTMLElement> {\n nodeRef: RefObject<E>;\n eventHandlers: Required<FocusContainerEventHandlers<E>>;\n transitionOptions: Required<FocusContainerTransitionOptions<E>>;\n}\n\n/**\n * This hook is mostly for internal use only for dialog accessibility behavior\n * to prevent the focus from moving outside of the dialog while it is visible.\n * This API was developed to be used with the `useCSSTransition`/`useTransition`\n * hooks as well.\n *\n * @example\n * Main Usage\n * ```tsx\n * import {\n * Button,\n * useFocusContainer,\n * useScaleTransition,\n * useToggle,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { toggled, toggle } = useToggle(false);\n *\n * const { eventHandlers, transitionOptions } = useFocusContainer({\n * activate: visible,\n * });\n * const { elementProps, rendered } = useScaleTransition({\n * transitionIn: visible,\n * temporary: true,\n * ...transitionOptions,\n * });\n *\n * return (\n * <>\n * <Button onClick={toggle}>Toggle</Button>\n * {rendered && (\n * <div {...eventHandlers} {...elementProps}>\n * <Button>Button 1</Button>\n * <Button>Button 2</Button>\n * <Button>Button 3</Button>\n * <Button>Button 4</Button>\n * </div>\n * )}\n * </>\n * );\n * }\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport function useFocusContainer<E extends HTMLElement>(\n options: FocusContainerOptions<E>\n): FocusContainerImplementation<E> {\n const {\n nodeRef,\n activate,\n onEntering = noop,\n onEntered = noop,\n onExiting = noop,\n onExited = noop,\n onKeyDown = noop,\n programmatic = false,\n disableTransition = false,\n isFocusTypeDisabled = noop,\n } = options;\n\n const [ref, refCallback] = useEnsuredRef(nodeRef);\n const prevFocus = useRef<HTMLElement | null>(null);\n\n useEffect(() => {\n if (!activate || !(document.activeElement instanceof HTMLElement)) {\n return;\n }\n\n prevFocus.current = document.activeElement;\n }, [activate]);\n\n const handleMountFocus =\n (callback: TransitionEnterHandler, skipped: boolean) =>\n (appearing: boolean) => {\n callback(appearing);\n const instance = ref.current;\n if (\n instance &&\n !skipped &&\n !isFocusTypeDisabled(\"mount\") &&\n (!document.activeElement || !instance.contains(document.activeElement))\n ) {\n instance.focus();\n }\n };\n\n const handleUnmountFocus =\n (callback: TransitionExitHandler, skipped: boolean) => (): void => {\n callback();\n if (skipped || isFocusTypeDisabled(\"unmount\")) {\n return;\n }\n\n // For some reason, the `\"Enter\"` keydown event fires at a different timing\n // than the Space keydown event.\n window.requestAnimationFrame(() => {\n prevFocus.current?.focus();\n });\n };\n\n return {\n nodeRef: ref,\n transitionOptions: {\n nodeRef: refCallback,\n onEntering: handleMountFocus(onEntering, false),\n onEntered: handleMountFocus(onEntered, !disableTransition),\n onExiting: handleUnmountFocus(onExiting, false),\n onExited: handleUnmountFocus(onExited, !disableTransition),\n },\n eventHandlers: {\n onKeyDown(event) {\n onKeyDown(event);\n if (\n event.isPropagationStopped() ||\n event.key !== \"Tab\" ||\n isFocusTypeDisabled(\"keyboard\")\n ) {\n return;\n }\n\n const { target, shiftKey, currentTarget } = event;\n const elements = getFocusableElements(currentTarget, programmatic);\n const count = elements.length;\n if (count === 0) {\n event.preventDefault();\n return;\n }\n\n // if the container element is the current focus, need to either focus\n // the first or last element so focus doesn't escape\n let type: FocusElementWithinType | undefined;\n if (\n count === 1 ||\n (!shiftKey &&\n (target === currentTarget || target === elements[count - 1]))\n ) {\n type = \"first\";\n } else if (\n shiftKey &&\n (target === currentTarget || target === elements[0])\n ) {\n type = \"last\";\n }\n\n if (type) {\n event.preventDefault();\n focusElementWithin({\n type,\n elements,\n container: currentTarget,\n });\n }\n },\n },\n };\n}\n"],"names":["useEffect","useRef","useEnsuredRef","focusElementWithin","getFocusableElements","noop","useFocusContainer","options","nodeRef","activate","onEntering","onEntered","onExiting","onExited","onKeyDown","programmatic","disableTransition","isFocusTypeDisabled","ref","refCallback","prevFocus","document","activeElement","HTMLElement","current","handleMountFocus","callback","skipped","appearing","instance","contains","focus","handleUnmountFocus","window","requestAnimationFrame","transitionOptions","eventHandlers","event","isPropagationStopped","key","target","shiftKey","currentTarget","elements","count","length","preventDefault","type","container"],"mappings":"AAAA;AAEA,SAASA,SAAS,EAAEC,MAAM,QAAQ,QAAQ;AAM1C,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,kBAAkB,EAAEC,oBAAoB,QAAQ,aAAa;AAEtE,MAAMC,OAAO;AACX,aAAa;AACf;AAsFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CC,GACD,OAAO,SAASC,kBACdC,OAAiC;IAEjC,MAAM,EACJC,OAAO,EACPC,QAAQ,EACRC,aAAaL,IAAI,EACjBM,YAAYN,IAAI,EAChBO,YAAYP,IAAI,EAChBQ,WAAWR,IAAI,EACfS,YAAYT,IAAI,EAChBU,eAAe,KAAK,EACpBC,oBAAoB,KAAK,EACzBC,sBAAsBZ,IAAI,EAC3B,GAAGE;IAEJ,MAAM,CAACW,KAAKC,YAAY,GAAGjB,cAAcM;IACzC,MAAMY,YAAYnB,OAA2B;IAE7CD,UAAU;QACR,IAAI,CAACS,YAAY,CAAEY,CAAAA,SAASC,aAAa,YAAYC,WAAU,GAAI;YACjE;QACF;QAEAH,UAAUI,OAAO,GAAGH,SAASC,aAAa;IAC5C,GAAG;QAACb;KAAS;IAEb,MAAMgB,mBACJ,CAACC,UAAkCC,UACnC,CAACC;YACCF,SAASE;YACT,MAAMC,WAAWX,IAAIM,OAAO;YAC5B,IACEK,YACA,CAACF,WACD,CAACV,oBAAoB,YACpB,CAAA,CAACI,SAASC,aAAa,IAAI,CAACO,SAASC,QAAQ,CAACT,SAASC,aAAa,CAAA,GACrE;gBACAO,SAASE,KAAK;YAChB;QACF;IAEF,MAAMC,qBACJ,CAACN,UAAiCC,UAAqB;YACrDD;YACA,IAAIC,WAAWV,oBAAoB,YAAY;gBAC7C;YACF;YAEA,2EAA2E;YAC3E,iCAAiC;YACjCgB,OAAOC,qBAAqB,CAAC;gBAC3Bd,UAAUI,OAAO,EAAEO;YACrB;QACF;IAEF,OAAO;QACLvB,SAASU;QACTiB,mBAAmB;YACjB3B,SAASW;YACTT,YAAYe,iBAAiBf,YAAY;YACzCC,WAAWc,iBAAiBd,WAAW,CAACK;YACxCJ,WAAWoB,mBAAmBpB,WAAW;YACzCC,UAAUmB,mBAAmBnB,UAAU,CAACG;QAC1C;QACAoB,eAAe;YACbtB,WAAUuB,KAAK;gBACbvB,UAAUuB;gBACV,IACEA,MAAMC,oBAAoB,MAC1BD,MAAME,GAAG,KAAK,SACdtB,oBAAoB,aACpB;oBACA;gBACF;gBAEA,MAAM,EAAEuB,MAAM,EAAEC,QAAQ,EAAEC,aAAa,EAAE,GAAGL;gBAC5C,MAAMM,WAAWvC,qBAAqBsC,eAAe3B;gBACrD,MAAM6B,QAAQD,SAASE,MAAM;gBAC7B,IAAID,UAAU,GAAG;oBACfP,MAAMS,cAAc;oBACpB;gBACF;gBAEA,sEAAsE;gBACtE,oDAAoD;gBACpD,IAAIC;gBACJ,IACEH,UAAU,KACT,CAACH,YACCD,CAAAA,WAAWE,iBAAiBF,WAAWG,QAAQ,CAACC,QAAQ,EAAE,AAAD,GAC5D;oBACAG,OAAO;gBACT,OAAO,IACLN,YACCD,CAAAA,WAAWE,iBAAiBF,WAAWG,QAAQ,CAAC,EAAE,AAAD,GAClD;oBACAI,OAAO;gBACT;gBAEA,IAAIA,MAAM;oBACRV,MAAMS,cAAc;oBACpB3C,mBAAmB;wBACjB4C;wBACAJ;wBACAK,WAAWN;oBACb;gBACF;YACF;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/focus/useFocusContainer.ts"],"sourcesContent":["\"use client\";\nimport type { KeyboardEventHandler, Ref, RefObject } from \"react\";\nimport { useEffect, useRef } from \"react\";\nimport { TRANSITION_CONFIG } from \"../transition/config.js\";\nimport type {\n TransitionCallbacks,\n TransitionEnterHandler,\n TransitionExitHandler,\n} from \"../transition/types.js\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport type { FocusElementWithinType } from \"./utils.js\";\nimport { focusElementWithin, getFocusableElements } from \"./utils.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * `\"mount\"` - this will attempt to focus the container element if:\n * - there is no `document.activeElement`\n * - the container element does not contain the `document.activeElement`\n *\n * `\"unmount\"` - attempts to re-focus the element that was focused before the\n * focus container became active. The previous focus element is captured\n * whenever the `activate` option on the `useFocusContainer` hook is set to\n * `true`. This is normally when an element becomes `visible`.\n *\n * `\"keyboard\"` - refocuses the first focusable element if pressing `Tab` would\n * move the focus outside of the container element. If `Shift + Tab` was used,\n * the last focusable element will be used instead.\n *\n * @remarks \\@since 6.0.0\n */\nexport type FocusType = \"mount\" | \"unmount\" | \"keyboard\";\n\n/** @remarks \\@since 6.0.0 */\nexport type FocusContainerTransitionCallbacks = Pick<\n TransitionCallbacks,\n \"onEntering\" | \"onEntered\" | \"onExiting\" | \"onExited\"\n>;\n\n/** @remarks \\@since 6.0.0 */\nexport interface FocusContainerTransitionOptions<E extends HTMLElement>\n extends FocusContainerTransitionCallbacks {\n /**\n * An optional ref that will be merged with the\n * {@link FocusContainerImplementation.nodeRef}\n */\n nodeRef?: Ref<E>;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface FocusContainerEventHandlers<E extends HTMLElement> {\n onKeyDown?: KeyboardEventHandler<E>;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type IsFocusTypeDisabled = (type: FocusType) => boolean;\n\nexport interface FocusContainerComponentProps {\n /**\n * @defaultValue `() => false`\n */\n isFocusTypeDisabled?: IsFocusTypeDisabled;\n\n /**\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface FocusContainerOptions<E extends HTMLElement>\n extends FocusContainerTransitionOptions<E>,\n FocusContainerComponentProps {\n onKeyDown?: KeyboardEventHandler<E>;\n /**\n * This to `true` will capture the current focused element as a focus target\n * once the `onExited` hook is fired. This should usually be set to the\n * `transitionIn` prop for `useTransition`.\n */\n activate: boolean;\n\n /**\n * Set this to true if elements that can be programmatically focused should be\n * included. These would be elements with a `tabIndex={-1}`.\n *\n * @defaultValue `false`\n */\n programmatic?: boolean;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface FocusContainerImplementation<E extends HTMLElement> {\n nodeRef: RefObject<E>;\n eventHandlers: Required<FocusContainerEventHandlers<E>>;\n transitionOptions: Required<FocusContainerTransitionOptions<E>>;\n}\n\n/**\n * This hook is mostly for internal use only for dialog accessibility behavior\n * to prevent the focus from moving outside of the dialog while it is visible.\n * This API was developed to be used with the `useCSSTransition`/`useTransition`\n * hooks as well.\n *\n * @example\n * Main Usage\n * ```tsx\n * import {\n * Button,\n * useFocusContainer,\n * useScaleTransition,\n * useToggle,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { toggled, enable, disable } = useToggle(false);\n *\n * const { eventHandlers, transitionOptions } = useFocusContainer({\n * activate: toggled,\n * });\n * const { elementProps, rendered } = useScaleTransition({\n * transitionIn: toggled,\n * temporary: true,\n * ...transitionOptions,\n * });\n *\n * return (\n * <>\n * <Button onClick={enable}>Toggle</Button>\n * {rendered && (\n * <div {...eventHandlers} {...elementProps}>\n * <Button onClick={disable}>Button 1</Button>\n * <Button onClick={disable}>Button 2</Button>\n * <Button onClick={disable}>Button 3</Button>\n * <Button onClick={disable}>Button 4</Button>\n * </div>\n * )}\n * </>\n * );\n * }\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport function useFocusContainer<E extends HTMLElement>(\n options: FocusContainerOptions<E>\n): FocusContainerImplementation<E> {\n const {\n nodeRef,\n activate,\n onEntering = noop,\n onEntered = noop,\n onExiting = noop,\n onExited = noop,\n onKeyDown = noop,\n programmatic = false,\n disableTransition = false,\n isFocusTypeDisabled = noop,\n } = options;\n\n const [ref, refCallback] = useEnsuredRef(nodeRef);\n const prevFocus = useRef<HTMLElement | null>(null);\n\n useEffect(() => {\n if (!activate || !(document.activeElement instanceof HTMLElement)) {\n return;\n }\n\n prevFocus.current = document.activeElement;\n }, [activate]);\n\n const handleMountFocus =\n (callback: TransitionEnterHandler, skipped: boolean) =>\n (appearing: boolean) => {\n callback(appearing);\n const instance = ref.current;\n if (\n instance &&\n !skipped &&\n !isFocusTypeDisabled(\"mount\") &&\n (!document.activeElement || !instance.contains(document.activeElement))\n ) {\n instance.focus();\n }\n };\n\n const handleUnmountFocus =\n (callback: TransitionExitHandler, skipped: boolean) => (): void => {\n callback();\n if (skipped || isFocusTypeDisabled(\"unmount\")) {\n return;\n }\n\n // For some reason, the `\"Enter\"` keydown event fires at a different timing\n // than the Space keydown event.\n window.requestAnimationFrame(() => {\n prevFocus.current?.focus();\n });\n };\n\n return {\n nodeRef: ref,\n transitionOptions: {\n nodeRef: refCallback,\n onEntering: handleMountFocus(onEntering, false),\n onEntered: handleMountFocus(\n onEntered,\n !disableTransition && !TRANSITION_CONFIG.disabled\n ),\n onExiting: handleUnmountFocus(onExiting, false),\n onExited: handleUnmountFocus(\n onExited,\n !disableTransition && !TRANSITION_CONFIG.disabled\n ),\n },\n eventHandlers: {\n onKeyDown(event) {\n onKeyDown(event);\n if (\n event.isPropagationStopped() ||\n event.key !== \"Tab\" ||\n isFocusTypeDisabled(\"keyboard\")\n ) {\n return;\n }\n\n const { target, shiftKey, currentTarget } = event;\n const elements = getFocusableElements(currentTarget, programmatic);\n const count = elements.length;\n if (count === 0) {\n event.preventDefault();\n return;\n }\n\n // if the container element is the current focus, need to either focus\n // the first or last element so focus doesn't escape\n let type: FocusElementWithinType | undefined;\n if (\n count === 1 ||\n (!shiftKey &&\n (target === currentTarget || target === elements[count - 1]))\n ) {\n type = \"first\";\n } else if (\n shiftKey &&\n (target === currentTarget || target === elements[0])\n ) {\n type = \"last\";\n }\n\n if (type) {\n event.preventDefault();\n focusElementWithin({\n type,\n elements,\n container: currentTarget,\n });\n }\n },\n },\n };\n}\n"],"names":["useEffect","useRef","TRANSITION_CONFIG","useEnsuredRef","focusElementWithin","getFocusableElements","noop","useFocusContainer","options","nodeRef","activate","onEntering","onEntered","onExiting","onExited","onKeyDown","programmatic","disableTransition","isFocusTypeDisabled","ref","refCallback","prevFocus","document","activeElement","HTMLElement","current","handleMountFocus","callback","skipped","appearing","instance","contains","focus","handleUnmountFocus","window","requestAnimationFrame","transitionOptions","disabled","eventHandlers","event","isPropagationStopped","key","target","shiftKey","currentTarget","elements","count","length","preventDefault","type","container"],"mappings":"AAAA;AAEA,SAASA,SAAS,EAAEC,MAAM,QAAQ,QAAQ;AAC1C,SAASC,iBAAiB,QAAQ,0BAA0B;AAM5D,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,kBAAkB,EAAEC,oBAAoB,QAAQ,aAAa;AAEtE,MAAMC,OAAO;AACX,aAAa;AACf;AAsFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CC,GACD,OAAO,SAASC,kBACdC,OAAiC;IAEjC,MAAM,EACJC,OAAO,EACPC,QAAQ,EACRC,aAAaL,IAAI,EACjBM,YAAYN,IAAI,EAChBO,YAAYP,IAAI,EAChBQ,WAAWR,IAAI,EACfS,YAAYT,IAAI,EAChBU,eAAe,KAAK,EACpBC,oBAAoB,KAAK,EACzBC,sBAAsBZ,IAAI,EAC3B,GAAGE;IAEJ,MAAM,CAACW,KAAKC,YAAY,GAAGjB,cAAcM;IACzC,MAAMY,YAAYpB,OAA2B;IAE7CD,UAAU;QACR,IAAI,CAACU,YAAY,CAAEY,CAAAA,SAASC,aAAa,YAAYC,WAAU,GAAI;YACjE;QACF;QAEAH,UAAUI,OAAO,GAAGH,SAASC,aAAa;IAC5C,GAAG;QAACb;KAAS;IAEb,MAAMgB,mBACJ,CAACC,UAAkCC,UACnC,CAACC;YACCF,SAASE;YACT,MAAMC,WAAWX,IAAIM,OAAO;YAC5B,IACEK,YACA,CAACF,WACD,CAACV,oBAAoB,YACpB,CAAA,CAACI,SAASC,aAAa,IAAI,CAACO,SAASC,QAAQ,CAACT,SAASC,aAAa,CAAA,GACrE;gBACAO,SAASE,KAAK;YAChB;QACF;IAEF,MAAMC,qBACJ,CAACN,UAAiCC,UAAqB;YACrDD;YACA,IAAIC,WAAWV,oBAAoB,YAAY;gBAC7C;YACF;YAEA,2EAA2E;YAC3E,iCAAiC;YACjCgB,OAAOC,qBAAqB,CAAC;gBAC3Bd,UAAUI,OAAO,EAAEO;YACrB;QACF;IAEF,OAAO;QACLvB,SAASU;QACTiB,mBAAmB;YACjB3B,SAASW;YACTT,YAAYe,iBAAiBf,YAAY;YACzCC,WAAWc,iBACTd,WACA,CAACK,qBAAqB,CAACf,kBAAkBmC,QAAQ;YAEnDxB,WAAWoB,mBAAmBpB,WAAW;YACzCC,UAAUmB,mBACRnB,UACA,CAACG,qBAAqB,CAACf,kBAAkBmC,QAAQ;QAErD;QACAC,eAAe;YACbvB,WAAUwB,KAAK;gBACbxB,UAAUwB;gBACV,IACEA,MAAMC,oBAAoB,MAC1BD,MAAME,GAAG,KAAK,SACdvB,oBAAoB,aACpB;oBACA;gBACF;gBAEA,MAAM,EAAEwB,MAAM,EAAEC,QAAQ,EAAEC,aAAa,EAAE,GAAGL;gBAC5C,MAAMM,WAAWxC,qBAAqBuC,eAAe5B;gBACrD,MAAM8B,QAAQD,SAASE,MAAM;gBAC7B,IAAID,UAAU,GAAG;oBACfP,MAAMS,cAAc;oBACpB;gBACF;gBAEA,sEAAsE;gBACtE,oDAAoD;gBACpD,IAAIC;gBACJ,IACEH,UAAU,KACT,CAACH,YACCD,CAAAA,WAAWE,iBAAiBF,WAAWG,QAAQ,CAACC,QAAQ,EAAE,AAAD,GAC5D;oBACAG,OAAO;gBACT,OAAO,IACLN,YACCD,CAAAA,WAAWE,iBAAiBF,WAAWG,QAAQ,CAAC,EAAE,AAAD,GAClD;oBACAI,OAAO;gBACT;gBAEA,IAAIA,MAAM;oBACRV,MAAMS,cAAc;oBACpB5C,mBAAmB;wBACjB6C;wBACAJ;wBACAK,WAAWN;oBACb;gBACF;YACF;QACF;IACF;AACF"}
@@ -10,7 +10,7 @@ export interface FormProps extends FormHTMLAttributes<HTMLFormElement> {
10
10
  disablePreventDefault?: boolean;
11
11
  }
12
12
  /**
13
- * **Server Component**
13
+ * **Client Component**
14
14
  *
15
15
  * This is probably one of the least useful components available as it doesn't
16
16
  * do much styling or logic. All this form component will do is add basic flex
package/dist/form/Form.js CHANGED
@@ -1,10 +1,11 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import { forwardRef } from "react";
3
4
  const noop = ()=>{
4
5
  // do nothing
5
6
  };
6
7
  /**
7
- * **Server Component**
8
+ * **Client Component**
8
9
  *
9
10
  * This is probably one of the least useful components available as it doesn't
10
11
  * do much styling or logic. All this form component will do is add basic flex
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/Form.tsx"],"sourcesContent":["import { forwardRef, type FormHTMLAttributes } from \"react\";\n\nconst noop = (): void => {\n // do nothing\n};\n\nexport interface FormProps extends FormHTMLAttributes<HTMLFormElement> {\n /**\n * Boolean if the form should no longer prevent default submit behavior. If\n * you enable this prop you should honestly just use a `<form>` element\n * instead\n *\n * @defaultValue `false`\n */\n disablePreventDefault?: boolean;\n}\n\n/**\n * **Server Component**\n *\n * This is probably one of the least useful components available as it doesn't\n * do much styling or logic. All this form component will do is add basic flex\n * behavior and prevent the default form submit behavior.\n */\nexport const Form = forwardRef<HTMLFormElement, FormProps>(\n function Form(props, ref) {\n const {\n children,\n onSubmit = noop,\n disablePreventDefault = false,\n ...remaining\n } = props;\n\n return (\n <form\n {...remaining}\n onSubmit={(event) => {\n if (!disablePreventDefault) {\n event.preventDefault();\n }\n\n onSubmit(event);\n }}\n ref={ref}\n >\n {children}\n </form>\n );\n }\n);\n"],"names":["forwardRef","noop","Form","props","ref","children","onSubmit","disablePreventDefault","remaining","form","event","preventDefault"],"mappings":";AAAA,SAASA,UAAU,QAAiC,QAAQ;AAE5D,MAAMC,OAAO;AACX,aAAa;AACf;AAaA;;;;;;CAMC,GACD,OAAO,MAAMC,qBAAOF,WAClB,SAASE,KAAKC,KAAK,EAAEC,GAAG;IACtB,MAAM,EACJC,QAAQ,EACRC,WAAWL,IAAI,EACfM,wBAAwB,KAAK,EAC7B,GAAGC,WACJ,GAAGL;IAEJ,qBACE,KAACM;QACE,GAAGD,SAAS;QACbF,UAAU,CAACI;YACT,IAAI,CAACH,uBAAuB;gBAC1BG,MAAMC,cAAc;YACtB;YAEAL,SAASI;QACX;QACAN,KAAKA;kBAEJC;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/form/Form.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type FormHTMLAttributes } from \"react\";\n\nconst noop = (): void => {\n // do nothing\n};\n\nexport interface FormProps extends FormHTMLAttributes<HTMLFormElement> {\n /**\n * Boolean if the form should no longer prevent default submit behavior. If\n * you enable this prop you should honestly just use a `<form>` element\n * instead\n *\n * @defaultValue `false`\n */\n disablePreventDefault?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * This is probably one of the least useful components available as it doesn't\n * do much styling or logic. All this form component will do is add basic flex\n * behavior and prevent the default form submit behavior.\n */\nexport const Form = forwardRef<HTMLFormElement, FormProps>(\n function Form(props, ref) {\n const {\n children,\n onSubmit = noop,\n disablePreventDefault = false,\n ...remaining\n } = props;\n\n return (\n <form\n {...remaining}\n onSubmit={(event) => {\n if (!disablePreventDefault) {\n event.preventDefault();\n }\n\n onSubmit(event);\n }}\n ref={ref}\n >\n {children}\n </form>\n );\n }\n);\n"],"names":["forwardRef","noop","Form","props","ref","children","onSubmit","disablePreventDefault","remaining","form","event","preventDefault"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAAiC,QAAQ;AAE5D,MAAMC,OAAO;AACX,aAAa;AACf;AAaA;;;;;;CAMC,GACD,OAAO,MAAMC,qBAAOF,WAClB,SAASE,KAAKC,KAAK,EAAEC,GAAG;IACtB,MAAM,EACJC,QAAQ,EACRC,WAAWL,IAAI,EACfM,wBAAwB,KAAK,EAC7B,GAAGC,WACJ,GAAGL;IAEJ,qBACE,KAACM;QACE,GAAGD,SAAS;QACbF,UAAU,CAACI;YACT,IAAI,CAACH,uBAAuB;gBAC1BG,MAAMC,cAAc;YACtB;YAEAL,SAASI;QACX;QACAN,KAAKA;kBAEJC;;AAGP,GACA"}
@@ -2,11 +2,11 @@
2
2
  import { type LabelClassNameOptions, type LabelProps } from "./types.js";
3
3
  declare module "react" {
4
4
  interface CSSProperties {
5
- "--rmd-form-label-floating-top"?: string | number;
6
- "--rmd-form-label-left-offset"?: string | number;
7
- "--rmd-form-label-top-offset"?: string | number;
8
- "--rmd-form-label-active-padding"?: string | number;
9
- "--rmd-form-label-active-background-color"?: string;
5
+ "--rmd-label-floating-top"?: string | number;
6
+ "--rmd-label-left-offset"?: string | number;
7
+ "--rmd-label-top-offset"?: string | number;
8
+ "--rmd-label-active-padding"?: string | number;
9
+ "--rmd-label-active-background-color"?: string;
10
10
  }
11
11
  }
12
12
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/Label.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef } from \"react\";\nimport { type TextColor, type ThemeColor, cssUtils } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { type LabelClassNameOptions, type LabelProps } from \"./types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-form-label-floating-top\"?: string | number;\n \"--rmd-form-label-left-offset\"?: string | number;\n \"--rmd-form-label-top-offset\"?: string | number;\n \"--rmd-form-label-active-padding\"?: string | number;\n \"--rmd-form-label-active-background-color\"?: string;\n }\n}\n\nconst labelStyles = bem(\"rmd-label\");\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function label(options: LabelClassNameOptions): string {\n const {\n className,\n gap = false,\n error = false,\n dense = false,\n active = false,\n stacked = false,\n reversed = false,\n disabled = false,\n floating = false,\n inactive = false,\n floatingActive = active,\n } = options;\n\n let textColor: TextColor | ThemeColor | undefined;\n if (disabled) {\n textColor = \"text-disabled\";\n } else if (error) {\n textColor = \"error\";\n } else if (floating && inactive) {\n textColor = \"text-secondary\";\n }\n\n return cnb(\n labelStyles({\n gap,\n error,\n dense,\n active,\n disabled,\n floating,\n stacked: stacked && !reversed,\n reversed: !stacked && reversed,\n \"stacked-reversed\": stacked && reversed,\n \"floating-dense\": floating && dense,\n \"floating-active\": floating && floatingActive,\n }),\n cssUtils({\n textColor,\n }),\n className\n );\n}\n\n/**\n * **Server Component**\n *\n * Most of the form components already use this `Label` internally when a\n * `label` prop has been provided. You should generally use this component if\n * you need to separate the label from an existing form component or you need to\n * create a custom implementation of a form component.\n *\n * @remarks \\@since 6.0.0 Updated to be usable externally and combines the\n * floating label styles instead of having separate components.\n */\nexport const Label = forwardRef<HTMLLabelElement, LabelProps>(\n function Label(props, ref) {\n const {\n gap = false,\n error = false,\n dense = false,\n active = false,\n stacked = false,\n reversed = false,\n disabled = false,\n floating = false,\n inactive = false,\n floatingActive = active,\n className,\n children,\n ...remaining\n } = props;\n\n return (\n <label\n ref={ref}\n {...remaining}\n className={label({\n gap,\n error,\n dense,\n active,\n stacked,\n reversed,\n disabled,\n floating,\n floatingActive,\n inactive,\n className,\n })}\n >\n {children}\n </label>\n );\n }\n);\n"],"names":["cnb","forwardRef","cssUtils","bem","labelStyles","label","options","className","gap","error","dense","active","stacked","reversed","disabled","floating","inactive","floatingActive","textColor","Label","props","ref","children","remaining"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAQ,QAAQ;AACnC,SAA0CC,QAAQ,QAAQ,iBAAiB;AAC3E,SAASC,GAAG,QAAQ,kBAAkB;AAatC,MAAMC,cAAcD,IAAI;AAExB;;CAEC,GACD,OAAO,SAASE,MAAMC,OAA8B;IAClD,MAAM,EACJC,SAAS,EACTC,MAAM,KAAK,EACXC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,iBAAiBN,MAAM,EACxB,GAAGL;IAEJ,IAAIY;IACJ,IAAIJ,UAAU;QACZI,YAAY;IACd,OAAO,IAAIT,OAAO;QAChBS,YAAY;IACd,OAAO,IAAIH,YAAYC,UAAU;QAC/BE,YAAY;IACd;IAEA,OAAOlB,IACLI,YAAY;QACVI;QACAC;QACAC;QACAC;QACAG;QACAC;QACAH,SAASA,WAAW,CAACC;QACrBA,UAAU,CAACD,WAAWC;QACtB,oBAAoBD,WAAWC;QAC/B,kBAAkBE,YAAYL;QAC9B,mBAAmBK,YAAYE;IACjC,IACAf,SAAS;QACPgB;IACF,IACAX;AAEJ;AAEA;;;;;;;;;;CAUC,GACD,OAAO,MAAMY,sBAAQlB,WACnB,SAASkB,MAAMC,KAAK,EAAEC,GAAG;IACvB,MAAM,EACJb,MAAM,KAAK,EACXC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,iBAAiBN,MAAM,EACvBJ,SAAS,EACTe,QAAQ,EACR,GAAGC,WACJ,GAAGH;IAEJ,qBACE,KAACf;QACCgB,KAAKA;QACJ,GAAGE,SAAS;QACbhB,WAAWF,MAAM;YACfG;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAE;YACAD;YACAT;QACF;kBAECe;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/form/Label.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef } from \"react\";\nimport { type TextColor, type ThemeColor, cssUtils } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { type LabelClassNameOptions, type LabelProps } from \"./types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-label-floating-top\"?: string | number;\n \"--rmd-label-left-offset\"?: string | number;\n \"--rmd-label-top-offset\"?: string | number;\n \"--rmd-label-active-padding\"?: string | number;\n \"--rmd-label-active-background-color\"?: string;\n }\n}\n\nconst labelStyles = bem(\"rmd-label\");\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function label(options: LabelClassNameOptions): string {\n const {\n className,\n gap = false,\n error = false,\n dense = false,\n active = false,\n stacked = false,\n reversed = false,\n disabled = false,\n floating = false,\n inactive = false,\n floatingActive = active,\n } = options;\n\n let textColor: TextColor | ThemeColor | undefined;\n if (disabled) {\n textColor = \"text-disabled\";\n } else if (error) {\n textColor = \"error\";\n } else if (floating && inactive) {\n textColor = \"text-secondary\";\n }\n\n return cnb(\n labelStyles({\n gap,\n error,\n dense,\n active,\n disabled,\n floating,\n stacked: stacked && !reversed,\n reversed: !stacked && reversed,\n \"stacked-reversed\": stacked && reversed,\n \"floating-dense\": floating && dense,\n \"floating-active\": floating && floatingActive,\n }),\n cssUtils({\n textColor,\n }),\n className\n );\n}\n\n/**\n * **Server Component**\n *\n * Most of the form components already use this `Label` internally when a\n * `label` prop has been provided. You should generally use this component if\n * you need to separate the label from an existing form component or you need to\n * create a custom implementation of a form component.\n *\n * @remarks \\@since 6.0.0 Updated to be usable externally and combines the\n * floating label styles instead of having separate components.\n */\nexport const Label = forwardRef<HTMLLabelElement, LabelProps>(\n function Label(props, ref) {\n const {\n gap = false,\n error = false,\n dense = false,\n active = false,\n stacked = false,\n reversed = false,\n disabled = false,\n floating = false,\n inactive = false,\n floatingActive = active,\n className,\n children,\n ...remaining\n } = props;\n\n return (\n <label\n ref={ref}\n {...remaining}\n className={label({\n gap,\n error,\n dense,\n active,\n stacked,\n reversed,\n disabled,\n floating,\n floatingActive,\n inactive,\n className,\n })}\n >\n {children}\n </label>\n );\n }\n);\n"],"names":["cnb","forwardRef","cssUtils","bem","labelStyles","label","options","className","gap","error","dense","active","stacked","reversed","disabled","floating","inactive","floatingActive","textColor","Label","props","ref","children","remaining"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAQ,QAAQ;AACnC,SAA0CC,QAAQ,QAAQ,iBAAiB;AAC3E,SAASC,GAAG,QAAQ,kBAAkB;AAatC,MAAMC,cAAcD,IAAI;AAExB;;CAEC,GACD,OAAO,SAASE,MAAMC,OAA8B;IAClD,MAAM,EACJC,SAAS,EACTC,MAAM,KAAK,EACXC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,iBAAiBN,MAAM,EACxB,GAAGL;IAEJ,IAAIY;IACJ,IAAIJ,UAAU;QACZI,YAAY;IACd,OAAO,IAAIT,OAAO;QAChBS,YAAY;IACd,OAAO,IAAIH,YAAYC,UAAU;QAC/BE,YAAY;IACd;IAEA,OAAOlB,IACLI,YAAY;QACVI;QACAC;QACAC;QACAC;QACAG;QACAC;QACAH,SAASA,WAAW,CAACC;QACrBA,UAAU,CAACD,WAAWC;QACtB,oBAAoBD,WAAWC;QAC/B,kBAAkBE,YAAYL;QAC9B,mBAAmBK,YAAYE;IACjC,IACAf,SAAS;QACPgB;IACF,IACAX;AAEJ;AAEA;;;;;;;;;;CAUC,GACD,OAAO,MAAMY,sBAAQlB,WACnB,SAASkB,MAAMC,KAAK,EAAEC,GAAG;IACvB,MAAM,EACJb,MAAM,KAAK,EACXC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,iBAAiBN,MAAM,EACvBJ,SAAS,EACTe,QAAQ,EACR,GAAGC,WACJ,GAAGH;IAEJ,qBACE,KAACf;QACCgB,KAAKA;QACJ,GAAGE,SAAS;QACbhB,WAAWF,MAAM;YACfG;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAE;YACAD;YACAT;QACF;kBAECe;;AAGP,GACA"}
@@ -1,23 +1,14 @@
1
1
  import { type CSSProperties, type HTMLAttributes, type MouseEvent, type ReactNode } from "react";
2
- import { type ListItemAddonPosition, type ListItemAddonType, type ListItemHeight } from "../list/types.js";
2
+ import { type ListItemAddonPosition, type ListItemAddonType, type ListItemChildrenTextProps, type ListItemHeight } from "../list/types.js";
3
3
  import { type PropsWithRef } from "../types.js";
4
4
  import { type IndeterminateCheckboxProps, type InputToggleIconProps } from "./InputToggle.js";
5
5
  import { type InputToggleSize } from "./inputToggleStyles.js";
6
- /** @remarks \@since 6.0.0 */
7
- export interface MenuItemInputToggleClassNameOptions {
8
- className?: string;
9
- type: "radio" | "checkbox" | "switch";
10
- }
11
- /**
12
- * @remarks \@since 6.0.0
13
- */
14
- export declare function menuItemInputToggle(options: MenuItemInputToggleClassNameOptions): string;
15
6
  /**
16
7
  * @remarks \@since 6.0.0
17
8
  */
18
9
  export type MenuItemInputToggleCheckedCallback = (checked: boolean, event: MouseEvent<HTMLLIElement>) => void;
19
10
  /** @remarks \@since 2.8.0 */
20
- export interface BaseMenuItemInputToggleProps extends HTMLAttributes<HTMLLIElement>, InputToggleIconProps {
11
+ export interface BaseMenuItemInputToggleProps extends HTMLAttributes<HTMLLIElement>, InputToggleIconProps, ListItemChildrenTextProps {
21
12
  checked: boolean;
22
13
  onCheckedChange: MenuItemInputToggleCheckedCallback;
23
14
  /**
@@ -47,10 +38,6 @@ export interface BaseMenuItemInputToggleProps extends HTMLAttributes<HTMLLIEleme
47
38
  /** @defaultValue `"auto"` */
48
39
  height?: ListItemHeight;
49
40
  /** @defaultValue `false` */
50
- threeLines?: boolean;
51
- /** @defaultValue `false` */
52
- disableTextChildren?: boolean;
53
- /** @defaultValue `false` */
54
41
  iconAfter?: boolean;
55
42
  addon?: ReactNode;
56
43
  addonType?: ListItemAddonType;
@@ -4,21 +4,12 @@ import { cnb } from "cnbuilder";
4
4
  import { forwardRef } from "react";
5
5
  import { ListItem } from "../list/ListItem.js";
6
6
  import { useEnsuredId } from "../useEnsuredId.js";
7
- import { bem } from "../utils/bem.js";
8
7
  import { InputToggleIcon } from "./InputToggleIcon.js";
9
8
  import { SwitchTrack } from "./SwitchTrack.js";
9
+ import { menuItemInputToggle, menuItemInputToggleBall, menuItemInputToggleIcon, menuItemInputToggleTrack } from "./menuItemInputToggleStyles.js";
10
10
  const noop = ()=>{
11
11
  // do nothing
12
12
  };
13
- const styles = bem("rmd-menu-item-input-toggle");
14
- /**
15
- * @remarks \@since 6.0.0
16
- */ export function menuItemInputToggle(options) {
17
- const { className, type } = options;
18
- return cnb(`rmd-${type}-menu-item`, styles({
19
- switch: type === "switch"
20
- }), className);
21
- }
22
13
  /**
23
14
  * **Client Component**
24
15
  *
@@ -34,33 +25,31 @@ const styles = bem("rmd-menu-item-input-toggle");
34
25
  const { id: propId, type, disabled = false, checked, onCheckedChange, preventMenuHideOnClick = false, onClick = noop, className, tabIndex = -1, children, size = "auto", icon: propIcon, iconAfter = false, iconProps, iconStyle, iconClassName, checkedIcon, indeterminate, indeterminateIcon, addon, addonType, addonPosition, addonForceWrap, disableAddonCenteredMedia, ballProps, ballStyle, ballClassName, trackProps, trackStyle, trackClassName, ...remaining } = props;
35
26
  const id = useEnsuredId(propId, "menu-item");
36
27
  let icon = propIcon;
37
- if (typeof propIcon === "undefined") {
38
- if (type === "switch") {
39
- icon = /*#__PURE__*/ _jsx(SwitchTrack, {
40
- style: trackStyle,
41
- className: trackClassName,
42
- ...trackProps,
43
- active: checked,
44
- ballProps: ballProps,
45
- ballStyle: ballStyle,
46
- ballClassName: cnb(styles("ball"), ballClassName)
47
- });
48
- } else {
49
- icon = /*#__PURE__*/ _jsx(InputToggleIcon, {
50
- style: iconStyle,
51
- disableEm: true,
52
- ...iconProps,
53
- className: cnb(styles("icon"), iconClassName, iconProps?.className),
54
- size: size,
55
- type: type,
56
- checked: checked,
57
- disabled: disabled,
58
- icon: propIcon,
59
- checkedIcon: checkedIcon,
60
- indeterminate: indeterminate,
61
- indeterminateIcon: indeterminateIcon
62
- });
63
- }
28
+ if (type === "switch") {
29
+ icon = /*#__PURE__*/ _jsx(SwitchTrack, {
30
+ style: trackStyle,
31
+ ...trackProps,
32
+ className: cnb(menuItemInputToggleTrack(), trackClassName, trackProps?.className),
33
+ active: checked,
34
+ ballProps: ballProps,
35
+ ballStyle: ballStyle,
36
+ ballClassName: cnb(menuItemInputToggleBall(), ballClassName)
37
+ });
38
+ } else {
39
+ icon = /*#__PURE__*/ _jsx(InputToggleIcon, {
40
+ style: iconStyle,
41
+ disableEm: true,
42
+ ...iconProps,
43
+ className: cnb(menuItemInputToggleIcon(), iconClassName, iconProps?.className),
44
+ size: size,
45
+ type: type,
46
+ checked: checked,
47
+ disabled: disabled,
48
+ icon: propIcon,
49
+ checkedIcon: checkedIcon,
50
+ indeterminate: indeterminate,
51
+ indeterminateIcon: indeterminateIcon
52
+ });
64
53
  }
65
54
  let leftAddon;
66
55
  let leftAddonType;
@@ -89,7 +78,6 @@ const styles = bem("rmd-menu-item-input-toggle");
89
78
  }
90
79
  return /*#__PURE__*/ _jsx(ListItem, {
91
80
  ...remaining,
92
- "aria-disabled": disabled || undefined,
93
81
  // I'm not actually sure if this is correct
94
82
  "aria-checked": indeterminate && checked ? "mixed" : checked,
95
83
  id: id,
@@ -106,6 +94,7 @@ const styles = bem("rmd-menu-item-input-toggle");
106
94
  type,
107
95
  className
108
96
  }),
97
+ disabled: disabled,
109
98
  tabIndex: tabIndex,
110
99
  leftAddon: leftAddon,
111
100
  leftAddonType: leftAddonType,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/MenuItemInputToggle.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type MouseEvent,\n type ReactNode,\n} from \"react\";\nimport { ListItem } from \"../list/ListItem.js\";\nimport {\n type ListItemAddonPosition,\n type ListItemAddonType,\n type ListItemHeight,\n} from \"../list/types.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { bem } from \"../utils/bem.js\";\nimport {\n type IndeterminateCheckboxProps,\n type InputToggleIconProps,\n} from \"./InputToggle.js\";\nimport { InputToggleIcon } from \"./InputToggleIcon.js\";\nimport { SwitchTrack } from \"./SwitchTrack.js\";\nimport { type InputToggleSize } from \"./inputToggleStyles.js\";\n\nconst noop = (): void => {\n // do nothing\n};\nconst styles = bem(\"rmd-menu-item-input-toggle\");\n\n/** @remarks \\@since 6.0.0 */\nexport interface MenuItemInputToggleClassNameOptions {\n className?: string;\n type: \"radio\" | \"checkbox\" | \"switch\";\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function menuItemInputToggle(\n options: MenuItemInputToggleClassNameOptions\n): string {\n const { className, type } = options;\n return cnb(\n `rmd-${type}-menu-item`,\n styles({ switch: type === \"switch\" }),\n className\n );\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type MenuItemInputToggleCheckedCallback = (\n checked: boolean,\n event: MouseEvent<HTMLLIElement>\n) => void;\n\n/** @remarks \\@since 2.8.0 */\nexport interface BaseMenuItemInputToggleProps\n extends HTMLAttributes<HTMLLIElement>,\n InputToggleIconProps {\n checked: boolean;\n onCheckedChange: MenuItemInputToggleCheckedCallback;\n\n /**\n * @defaultValue `\"menu-item-\" + useId()`\n */\n id?: string;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /**\n * Set this to `true` if the `Menu` should not close when the input toggle is\n * clicked. This can be useful when interacting with a checkbox group within a\n * menu or allowing the user to select multiple options before closing the\n * menu.\n *\n * @defaultValue `false`\n */\n preventMenuHideOnClick?: boolean;\n\n /**\n * This is set to `\"auto\"` by default so the icon shrinks back down to the\n * default icon size instead of relative to the current font size. You\n * probably don't want to change this since it'll also modify the height of\n * the menu item\n *\n * @defaultValue `\"auto\"`\n */\n size?: InputToggleSize;\n\n /** @defaultValue `\"auto\"` */\n height?: ListItemHeight;\n\n /** @defaultValue `false` */\n threeLines?: boolean;\n\n /** @defaultValue `false` */\n disableTextChildren?: boolean;\n\n /** @defaultValue `false` */\n iconAfter?: boolean;\n\n addon?: ReactNode;\n addonType?: ListItemAddonType;\n addonPosition?: ListItemAddonPosition;\n\n /** @defaultValue `false` */\n addonForceWrap?: boolean;\n\n /** @defaultValue `false` */\n disableAddonCenteredMedia?: boolean;\n}\n\nexport interface MenuItemCheckboxProps\n extends BaseMenuItemInputToggleProps,\n IndeterminateCheckboxProps {}\n\nexport type MenuItemRadioProps = BaseMenuItemInputToggleProps;\n\n/**\n * @remarks\n * \\@since 2.8.0\n * \\@since 6.0.0 Added additional props for styling the track and ball.\n */\nexport interface MenuItemSwitchProps extends BaseMenuItemInputToggleProps {\n trackProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n trackStyle?: CSSProperties;\n trackClassName?: string;\n ballProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n ballStyle?: CSSProperties;\n ballClassName?: string;\n}\n\n/**\n * @remarks\n * \\@since 2.8.0\n * \\@since 6.0.0 Updated to be a union of the different props to enforce the\n * correct props based on `type`\n */\nexport type MenuItemInputToggleProps =\n | (MenuItemCheckboxProps & { type: \"checkbox\" })\n | (MenuItemRadioProps & { type: \"radio\" })\n | (MenuItemSwitchProps & { type: \"switch\" });\n\n/**\n * **Client Component**\n *\n * This is a low-level component that should probably not be used externally and\n * instead the `MenuItemCheckbox`, `MenuItemRadio`, or `MenuItemSwitch` should\n * be used instead.\n *\n * @see {@link MenuItemCheckbox} for checkbox examples\n * @see {@link MenuItemRadio} for radio examples\n * @see {@link MenuItemSwitch} for switch examples\n * @remarks \\@since 2.8.0\n */\nexport const MenuItemInputToggle = forwardRef<\n HTMLLIElement,\n MenuItemInputToggleProps\n>(function MenuItemInputToggle(props, ref) {\n const {\n id: propId,\n type,\n disabled = false,\n checked,\n onCheckedChange,\n preventMenuHideOnClick = false,\n onClick = noop,\n className,\n tabIndex = -1,\n children,\n size = \"auto\",\n icon: propIcon,\n iconAfter = false,\n iconProps,\n iconStyle,\n iconClassName,\n checkedIcon,\n indeterminate,\n indeterminateIcon,\n addon,\n addonType,\n addonPosition,\n addonForceWrap,\n disableAddonCenteredMedia,\n ballProps,\n ballStyle,\n ballClassName,\n trackProps,\n trackStyle,\n trackClassName,\n ...remaining\n } = props as MenuItemSwitchProps &\n MenuItemCheckboxProps & { type: \"checkbox\" | \"radio\" | \"switch\" };\n const id = useEnsuredId(propId, \"menu-item\");\n\n let icon = propIcon;\n if (typeof propIcon === \"undefined\") {\n if (type === \"switch\") {\n icon = (\n <SwitchTrack\n style={trackStyle}\n className={trackClassName}\n {...trackProps}\n active={checked}\n ballProps={ballProps}\n ballStyle={ballStyle}\n ballClassName={cnb(styles(\"ball\"), ballClassName)}\n />\n );\n } else {\n icon = (\n <InputToggleIcon\n style={iconStyle}\n disableEm\n {...iconProps}\n className={cnb(styles(\"icon\"), iconClassName, iconProps?.className)}\n size={size}\n type={type}\n checked={checked}\n disabled={disabled}\n icon={propIcon}\n checkedIcon={checkedIcon}\n indeterminate={indeterminate}\n indeterminateIcon={indeterminateIcon}\n />\n );\n }\n }\n\n let leftAddon: ReactNode;\n let leftAddonType: ListItemAddonType | undefined;\n let leftAddonPosition: ListItemAddonPosition | undefined;\n let leftAddonForceWrap: boolean | undefined;\n let disableLeftAddonCenteredMedia: boolean | undefined;\n let rightAddon: ReactNode;\n let rightAddonType: ListItemAddonType | undefined;\n let rightAddonPosition: ListItemAddonPosition | undefined;\n let rightAddonForceWrap: boolean | undefined;\n let disableRightAddonCenteredMedia: boolean | undefined;\n if (iconAfter) {\n leftAddon = addon;\n leftAddonType = addonType;\n leftAddonPosition = addonPosition;\n leftAddonForceWrap = addonForceWrap;\n disableLeftAddonCenteredMedia = disableAddonCenteredMedia;\n rightAddon = icon;\n } else {\n leftAddon = icon;\n rightAddon = addon;\n rightAddonType = addonType;\n rightAddonPosition = addonPosition;\n rightAddonForceWrap = addonForceWrap;\n disableRightAddonCenteredMedia = disableAddonCenteredMedia;\n }\n\n return (\n <ListItem\n {...remaining}\n aria-disabled={disabled || undefined}\n // I'm not actually sure if this is correct\n aria-checked={indeterminate && checked ? \"mixed\" : checked}\n id={id}\n role={type === \"radio\" ? \"menuitemradio\" : \"menuitemcheckbox\"}\n onClick={(event) => {\n onClick(event);\n onCheckedChange(!checked, event);\n\n if (preventMenuHideOnClick) {\n event.stopPropagation();\n }\n }}\n ref={ref}\n className={menuItemInputToggle({ type, className })}\n tabIndex={tabIndex}\n leftAddon={leftAddon}\n leftAddonType={leftAddonType}\n leftAddonPosition={leftAddonPosition}\n leftAddonForceWrap={leftAddonForceWrap}\n disableLeftAddonCenteredMedia={disableLeftAddonCenteredMedia}\n rightAddon={rightAddon}\n rightAddonType={rightAddonType}\n rightAddonPosition={rightAddonPosition}\n rightAddonForceWrap={rightAddonForceWrap}\n disableRightAddonCenteredMedia={disableRightAddonCenteredMedia}\n >\n {children}\n </ListItem>\n );\n});\n"],"names":["cnb","forwardRef","ListItem","useEnsuredId","bem","InputToggleIcon","SwitchTrack","noop","styles","menuItemInputToggle","options","className","type","switch","MenuItemInputToggle","props","ref","id","propId","disabled","checked","onCheckedChange","preventMenuHideOnClick","onClick","tabIndex","children","size","icon","propIcon","iconAfter","iconProps","iconStyle","iconClassName","checkedIcon","indeterminate","indeterminateIcon","addon","addonType","addonPosition","addonForceWrap","disableAddonCenteredMedia","ballProps","ballStyle","ballClassName","trackProps","trackStyle","trackClassName","remaining","style","active","disableEm","leftAddon","leftAddonType","leftAddonPosition","leftAddonForceWrap","disableLeftAddonCenteredMedia","rightAddon","rightAddonType","rightAddonPosition","rightAddonForceWrap","disableRightAddonCenteredMedia","aria-disabled","undefined","aria-checked","role","event","stopPropagation"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAKL,QAAQ;AACf,SAASC,QAAQ,QAAQ,sBAAsB;AAO/C,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,GAAG,QAAQ,kBAAkB;AAKtC,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,WAAW,QAAQ,mBAAmB;AAG/C,MAAMC,OAAO;AACX,aAAa;AACf;AACA,MAAMC,SAASJ,IAAI;AAQnB;;CAEC,GACD,OAAO,SAASK,oBACdC,OAA4C;IAE5C,MAAM,EAAEC,SAAS,EAAEC,IAAI,EAAE,GAAGF;IAC5B,OAAOV,IACL,CAAC,IAAI,EAAEY,KAAK,UAAU,CAAC,EACvBJ,OAAO;QAAEK,QAAQD,SAAS;IAAS,IACnCD;AAEJ;AAmGA;;;;;;;;;;;CAWC,GACD,OAAO,MAAMG,oCAAsBb,WAGjC,SAASa,oBAAoBC,KAAK,EAAEC,GAAG;IACvC,MAAM,EACJC,IAAIC,MAAM,EACVN,IAAI,EACJO,WAAW,KAAK,EAChBC,OAAO,EACPC,eAAe,EACfC,yBAAyB,KAAK,EAC9BC,UAAUhB,IAAI,EACdI,SAAS,EACTa,WAAW,CAAC,CAAC,EACbC,QAAQ,EACRC,OAAO,MAAM,EACbC,MAAMC,QAAQ,EACdC,YAAY,KAAK,EACjBC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,WAAW,EACXC,aAAa,EACbC,iBAAiB,EACjBC,KAAK,EACLC,SAAS,EACTC,aAAa,EACbC,cAAc,EACdC,yBAAyB,EACzBC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,UAAU,EACVC,UAAU,EACVC,cAAc,EACd,GAAGC,WACJ,GAAGhC;IAEJ,MAAME,KAAKd,aAAae,QAAQ;IAEhC,IAAIS,OAAOC;IACX,IAAI,OAAOA,aAAa,aAAa;QACnC,IAAIhB,SAAS,UAAU;YACrBe,qBACE,KAACrB;gBACC0C,OAAOH;gBACPlC,WAAWmC;gBACV,GAAGF,UAAU;gBACdK,QAAQ7B;gBACRqB,WAAWA;gBACXC,WAAWA;gBACXC,eAAe3C,IAAIQ,OAAO,SAASmC;;QAGzC,OAAO;YACLhB,qBACE,KAACtB;gBACC2C,OAAOjB;gBACPmB,SAAS;gBACR,GAAGpB,SAAS;gBACbnB,WAAWX,IAAIQ,OAAO,SAASwB,eAAeF,WAAWnB;gBACzDe,MAAMA;gBACNd,MAAMA;gBACNQ,SAASA;gBACTD,UAAUA;gBACVQ,MAAMC;gBACNK,aAAaA;gBACbC,eAAeA;gBACfC,mBAAmBA;;QAGzB;IACF;IAEA,IAAIgB;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAI/B,WAAW;QACbsB,YAAYf;QACZgB,gBAAgBf;QAChBgB,oBAAoBf;QACpBgB,qBAAqBf;QACrBgB,gCAAgCf;QAChCgB,aAAa7B;IACf,OAAO;QACLwB,YAAYxB;QACZ6B,aAAapB;QACbqB,iBAAiBpB;QACjBqB,qBAAqBpB;QACrBqB,sBAAsBpB;QACtBqB,iCAAiCpB;IACnC;IAEA,qBACE,KAACtC;QACE,GAAG6C,SAAS;QACbc,iBAAe1C,YAAY2C;QAC3B,2CAA2C;QAC3CC,gBAAc7B,iBAAiBd,UAAU,UAAUA;QACnDH,IAAIA;QACJ+C,MAAMpD,SAAS,UAAU,kBAAkB;QAC3CW,SAAS,CAAC0C;YACR1C,QAAQ0C;YACR5C,gBAAgB,CAACD,SAAS6C;YAE1B,IAAI3C,wBAAwB;gBAC1B2C,MAAMC,eAAe;YACvB;QACF;QACAlD,KAAKA;QACLL,WAAWF,oBAAoB;YAAEG;YAAMD;QAAU;QACjDa,UAAUA;QACV2B,WAAWA;QACXC,eAAeA;QACfC,mBAAmBA;QACnBC,oBAAoBA;QACpBC,+BAA+BA;QAC/BC,YAAYA;QACZC,gBAAgBA;QAChBC,oBAAoBA;QACpBC,qBAAqBA;QACrBC,gCAAgCA;kBAE/BnC;;AAGP,GAAG"}
1
+ {"version":3,"sources":["../../src/form/MenuItemInputToggle.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type MouseEvent,\n type ReactNode,\n} from \"react\";\nimport { ListItem } from \"../list/ListItem.js\";\nimport {\n type ListItemAddonPosition,\n type ListItemAddonType,\n type ListItemChildrenTextProps,\n type ListItemHeight,\n} from \"../list/types.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport {\n type IndeterminateCheckboxProps,\n type InputToggleIconProps,\n} from \"./InputToggle.js\";\nimport { InputToggleIcon } from \"./InputToggleIcon.js\";\nimport { SwitchTrack } from \"./SwitchTrack.js\";\nimport { type InputToggleSize } from \"./inputToggleStyles.js\";\nimport {\n menuItemInputToggle,\n menuItemInputToggleBall,\n menuItemInputToggleIcon,\n menuItemInputToggleTrack,\n} from \"./menuItemInputToggleStyles.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type MenuItemInputToggleCheckedCallback = (\n checked: boolean,\n event: MouseEvent<HTMLLIElement>\n) => void;\n\n/** @remarks \\@since 2.8.0 */\nexport interface BaseMenuItemInputToggleProps\n extends HTMLAttributes<HTMLLIElement>,\n InputToggleIconProps,\n ListItemChildrenTextProps {\n checked: boolean;\n onCheckedChange: MenuItemInputToggleCheckedCallback;\n\n /**\n * @defaultValue `\"menu-item-\" + useId()`\n */\n id?: string;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /**\n * Set this to `true` if the `Menu` should not close when the input toggle is\n * clicked. This can be useful when interacting with a checkbox group within a\n * menu or allowing the user to select multiple options before closing the\n * menu.\n *\n * @defaultValue `false`\n */\n preventMenuHideOnClick?: boolean;\n\n /**\n * This is set to `\"auto\"` by default so the icon shrinks back down to the\n * default icon size instead of relative to the current font size. You\n * probably don't want to change this since it'll also modify the height of\n * the menu item\n *\n * @defaultValue `\"auto\"`\n */\n size?: InputToggleSize;\n\n /** @defaultValue `\"auto\"` */\n height?: ListItemHeight;\n\n /** @defaultValue `false` */\n iconAfter?: boolean;\n\n addon?: ReactNode;\n addonType?: ListItemAddonType;\n addonPosition?: ListItemAddonPosition;\n\n /** @defaultValue `false` */\n addonForceWrap?: boolean;\n\n /** @defaultValue `false` */\n disableAddonCenteredMedia?: boolean;\n}\n\nexport interface MenuItemCheckboxProps\n extends BaseMenuItemInputToggleProps,\n IndeterminateCheckboxProps {}\n\nexport type MenuItemRadioProps = BaseMenuItemInputToggleProps;\n\n/**\n * @remarks\n * \\@since 2.8.0\n * \\@since 6.0.0 Added additional props for styling the track and ball.\n */\nexport interface MenuItemSwitchProps extends BaseMenuItemInputToggleProps {\n trackProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n trackStyle?: CSSProperties;\n trackClassName?: string;\n ballProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n ballStyle?: CSSProperties;\n ballClassName?: string;\n}\n\n/**\n * @remarks\n * \\@since 2.8.0\n * \\@since 6.0.0 Updated to be a union of the different props to enforce the\n * correct props based on `type`\n */\nexport type MenuItemInputToggleProps =\n | (MenuItemCheckboxProps & { type: \"checkbox\" })\n | (MenuItemRadioProps & { type: \"radio\" })\n | (MenuItemSwitchProps & { type: \"switch\" });\n\n/**\n * **Client Component**\n *\n * This is a low-level component that should probably not be used externally and\n * instead the `MenuItemCheckbox`, `MenuItemRadio`, or `MenuItemSwitch` should\n * be used instead.\n *\n * @see {@link MenuItemCheckbox} for checkbox examples\n * @see {@link MenuItemRadio} for radio examples\n * @see {@link MenuItemSwitch} for switch examples\n * @remarks \\@since 2.8.0\n */\nexport const MenuItemInputToggle = forwardRef<\n HTMLLIElement,\n MenuItemInputToggleProps\n>(function MenuItemInputToggle(props, ref) {\n const {\n id: propId,\n type,\n disabled = false,\n checked,\n onCheckedChange,\n preventMenuHideOnClick = false,\n onClick = noop,\n className,\n tabIndex = -1,\n children,\n size = \"auto\",\n icon: propIcon,\n iconAfter = false,\n iconProps,\n iconStyle,\n iconClassName,\n checkedIcon,\n indeterminate,\n indeterminateIcon,\n addon,\n addonType,\n addonPosition,\n addonForceWrap,\n disableAddonCenteredMedia,\n ballProps,\n ballStyle,\n ballClassName,\n trackProps,\n trackStyle,\n trackClassName,\n ...remaining\n } = props as MenuItemSwitchProps &\n MenuItemCheckboxProps & { type: \"checkbox\" | \"radio\" | \"switch\" };\n const id = useEnsuredId(propId, \"menu-item\");\n\n let icon = propIcon;\n if (type === \"switch\") {\n icon = (\n <SwitchTrack\n style={trackStyle}\n {...trackProps}\n className={cnb(\n menuItemInputToggleTrack(),\n trackClassName,\n trackProps?.className\n )}\n active={checked}\n ballProps={ballProps}\n ballStyle={ballStyle}\n ballClassName={cnb(menuItemInputToggleBall(), ballClassName)}\n />\n );\n } else {\n icon = (\n <InputToggleIcon\n style={iconStyle}\n disableEm\n {...iconProps}\n className={cnb(\n menuItemInputToggleIcon(),\n iconClassName,\n iconProps?.className\n )}\n size={size}\n type={type}\n checked={checked}\n disabled={disabled}\n icon={propIcon}\n checkedIcon={checkedIcon}\n indeterminate={indeterminate}\n indeterminateIcon={indeterminateIcon}\n />\n );\n }\n\n let leftAddon: ReactNode;\n let leftAddonType: ListItemAddonType | undefined;\n let leftAddonPosition: ListItemAddonPosition | undefined;\n let leftAddonForceWrap: boolean | undefined;\n let disableLeftAddonCenteredMedia: boolean | undefined;\n let rightAddon: ReactNode;\n let rightAddonType: ListItemAddonType | undefined;\n let rightAddonPosition: ListItemAddonPosition | undefined;\n let rightAddonForceWrap: boolean | undefined;\n let disableRightAddonCenteredMedia: boolean | undefined;\n if (iconAfter) {\n leftAddon = addon;\n leftAddonType = addonType;\n leftAddonPosition = addonPosition;\n leftAddonForceWrap = addonForceWrap;\n disableLeftAddonCenteredMedia = disableAddonCenteredMedia;\n rightAddon = icon;\n } else {\n leftAddon = icon;\n rightAddon = addon;\n rightAddonType = addonType;\n rightAddonPosition = addonPosition;\n rightAddonForceWrap = addonForceWrap;\n disableRightAddonCenteredMedia = disableAddonCenteredMedia;\n }\n\n return (\n <ListItem\n {...remaining}\n // I'm not actually sure if this is correct\n aria-checked={indeterminate && checked ? \"mixed\" : checked}\n id={id}\n role={type === \"radio\" ? \"menuitemradio\" : \"menuitemcheckbox\"}\n onClick={(event) => {\n onClick(event);\n onCheckedChange(!checked, event);\n\n if (preventMenuHideOnClick) {\n event.stopPropagation();\n }\n }}\n ref={ref}\n className={menuItemInputToggle({ type, className })}\n disabled={disabled}\n tabIndex={tabIndex}\n leftAddon={leftAddon}\n leftAddonType={leftAddonType}\n leftAddonPosition={leftAddonPosition}\n leftAddonForceWrap={leftAddonForceWrap}\n disableLeftAddonCenteredMedia={disableLeftAddonCenteredMedia}\n rightAddon={rightAddon}\n rightAddonType={rightAddonType}\n rightAddonPosition={rightAddonPosition}\n rightAddonForceWrap={rightAddonForceWrap}\n disableRightAddonCenteredMedia={disableRightAddonCenteredMedia}\n >\n {children}\n </ListItem>\n );\n});\n"],"names":["cnb","forwardRef","ListItem","useEnsuredId","InputToggleIcon","SwitchTrack","menuItemInputToggle","menuItemInputToggleBall","menuItemInputToggleIcon","menuItemInputToggleTrack","noop","MenuItemInputToggle","props","ref","id","propId","type","disabled","checked","onCheckedChange","preventMenuHideOnClick","onClick","className","tabIndex","children","size","icon","propIcon","iconAfter","iconProps","iconStyle","iconClassName","checkedIcon","indeterminate","indeterminateIcon","addon","addonType","addonPosition","addonForceWrap","disableAddonCenteredMedia","ballProps","ballStyle","ballClassName","trackProps","trackStyle","trackClassName","remaining","style","active","disableEm","leftAddon","leftAddonType","leftAddonPosition","leftAddonForceWrap","disableLeftAddonCenteredMedia","rightAddon","rightAddonType","rightAddonPosition","rightAddonForceWrap","disableRightAddonCenteredMedia","aria-checked","role","event","stopPropagation"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAKL,QAAQ;AACf,SAASC,QAAQ,QAAQ,sBAAsB;AAQ/C,SAASC,YAAY,QAAQ,qBAAqB;AAKlD,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,WAAW,QAAQ,mBAAmB;AAE/C,SACEC,mBAAmB,EACnBC,uBAAuB,EACvBC,uBAAuB,EACvBC,wBAAwB,QACnB,iCAAiC;AAExC,MAAMC,OAAO;AACX,aAAa;AACf;AA8FA;;;;;;;;;;;CAWC,GACD,OAAO,MAAMC,oCAAsBV,WAGjC,SAASU,oBAAoBC,KAAK,EAAEC,GAAG;IACvC,MAAM,EACJC,IAAIC,MAAM,EACVC,IAAI,EACJC,WAAW,KAAK,EAChBC,OAAO,EACPC,eAAe,EACfC,yBAAyB,KAAK,EAC9BC,UAAUX,IAAI,EACdY,SAAS,EACTC,WAAW,CAAC,CAAC,EACbC,QAAQ,EACRC,OAAO,MAAM,EACbC,MAAMC,QAAQ,EACdC,YAAY,KAAK,EACjBC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,WAAW,EACXC,aAAa,EACbC,iBAAiB,EACjBC,KAAK,EACLC,SAAS,EACTC,aAAa,EACbC,cAAc,EACdC,yBAAyB,EACzBC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,UAAU,EACVC,UAAU,EACVC,cAAc,EACd,GAAGC,WACJ,GAAGlC;IAEJ,MAAME,KAAKX,aAAaY,QAAQ;IAEhC,IAAIW,OAAOC;IACX,IAAIX,SAAS,UAAU;QACrBU,qBACE,KAACrB;YACC0C,OAAOH;YACN,GAAGD,UAAU;YACdrB,WAAWtB,IACTS,4BACAoC,gBACAF,YAAYrB;YAEd0B,QAAQ9B;YACRsB,WAAWA;YACXC,WAAWA;YACXC,eAAe1C,IAAIO,2BAA2BmC;;IAGpD,OAAO;QACLhB,qBACE,KAACtB;YACC2C,OAAOjB;YACPmB,SAAS;YACR,GAAGpB,SAAS;YACbP,WAAWtB,IACTQ,2BACAuB,eACAF,WAAWP;YAEbG,MAAMA;YACNT,MAAMA;YACNE,SAASA;YACTD,UAAUA;YACVS,MAAMC;YACNK,aAAaA;YACbC,eAAeA;YACfC,mBAAmBA;;IAGzB;IAEA,IAAIgB;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAI/B,WAAW;QACbsB,YAAYf;QACZgB,gBAAgBf;QAChBgB,oBAAoBf;QACpBgB,qBAAqBf;QACrBgB,gCAAgCf;QAChCgB,aAAa7B;IACf,OAAO;QACLwB,YAAYxB;QACZ6B,aAAapB;QACbqB,iBAAiBpB;QACjBqB,qBAAqBpB;QACrBqB,sBAAsBpB;QACtBqB,iCAAiCpB;IACnC;IAEA,qBACE,KAACrC;QACE,GAAG4C,SAAS;QACb,2CAA2C;QAC3Cc,gBAAc3B,iBAAiBf,UAAU,UAAUA;QACnDJ,IAAIA;QACJ+C,MAAM7C,SAAS,UAAU,kBAAkB;QAC3CK,SAAS,CAACyC;YACRzC,QAAQyC;YACR3C,gBAAgB,CAACD,SAAS4C;YAE1B,IAAI1C,wBAAwB;gBAC1B0C,MAAMC,eAAe;YACvB;QACF;QACAlD,KAAKA;QACLS,WAAWhB,oBAAoB;YAAEU;YAAMM;QAAU;QACjDL,UAAUA;QACVM,UAAUA;QACV2B,WAAWA;QACXC,eAAeA;QACfC,mBAAmBA;QACnBC,oBAAoBA;QACpBC,+BAA+BA;QAC/BC,YAAYA;QACZC,gBAAgBA;QAChBC,oBAAoBA;QACpBC,qBAAqBA;QACrBC,gCAAgCA;kBAE/BnC;;AAGP,GAAG"}
@@ -9,6 +9,8 @@ export interface MenuItemTextFieldProps extends TextFieldProps {
9
9
  * Any additional props or a `ref` to apply to the surrounding `<li>` element.
10
10
  */
11
11
  liProps?: PropsWithRef<HTMLAttributes<HTMLLIElement>, HTMLLIElement>;
12
+ /** @defaultValue `true` */
13
+ stretch?: boolean;
12
14
  }
13
15
  /**
14
16
  * **Client Component**
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/MenuItemTextField.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { TextField, type TextFieldProps } from \"./TextField.js\";\n\n/**\n * @remarks \\@since 5.0.0\n */\nexport interface MenuItemTextFieldProps extends TextFieldProps {\n /**\n * Any additional props or a `ref` to apply to the surrounding `<li>` element.\n */\n liProps?: PropsWithRef<HTMLAttributes<HTMLLIElement>, HTMLLIElement>;\n}\n\n/**\n * **Client Component**\n *\n * This is a wrapper for the `TextField` component that can be used within\n * `Menu`s by updating the `onKeyDown` and `onClick` behavior.\n *\n * Note: This is **not** the `TextFieldWithMessage` since the message part is\n * hard to style nicely within menus. You'd most likely want to use another menu\n * for displaying errors.\n *\n * @remarks \\@since 5.0.0\n */\nexport const MenuItemTextField = forwardRef<\n HTMLInputElement,\n MenuItemTextFieldProps\n>(function MenuItemTextField(props, ref) {\n const { liProps, onKeyDown, stretch = true, ...remaining } = props;\n return (\n <li\n role=\"none\"\n {...liProps}\n onClick={(event) => {\n liProps?.onClick?.(event);\n event.stopPropagation();\n }}\n className={cnb(\"rmd-list-item rmd-menu-item\", liProps?.className)}\n >\n <TextField\n {...remaining}\n ref={ref}\n stretch={stretch}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n switch (event.key) {\n case \"Tab\":\n case \"Escape\":\n case \" \":\n // do default behavior\n break;\n default:\n if (event.key.length === 1 || event.currentTarget.value) {\n event.stopPropagation();\n }\n }\n }}\n />\n </li>\n );\n});\n"],"names":["cnb","forwardRef","TextField","MenuItemTextField","props","ref","liProps","onKeyDown","stretch","remaining","li","role","onClick","event","stopPropagation","className","key","length","currentTarget","value"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6B,QAAQ;AAExD,SAASC,SAAS,QAA6B,iBAAiB;AAYhE;;;;;;;;;;;CAWC,GACD,OAAO,MAAMC,kCAAoBF,WAG/B,SAASE,kBAAkBC,KAAK,EAAEC,GAAG;IACrC,MAAM,EAAEC,OAAO,EAAEC,SAAS,EAAEC,UAAU,IAAI,EAAE,GAAGC,WAAW,GAAGL;IAC7D,qBACE,KAACM;QACCC,MAAK;QACJ,GAAGL,OAAO;QACXM,SAAS,CAACC;YACRP,SAASM,UAAUC;YACnBA,MAAMC,eAAe;QACvB;QACAC,WAAWf,IAAI,+BAA+BM,SAASS;kBAEvD,cAAA,KAACb;YACE,GAAGO,SAAS;YACbJ,KAAKA;YACLG,SAASA;YACTD,WAAW,CAACM;gBACVN,YAAYM;gBACZ,OAAQA,MAAMG,GAAG;oBACf,KAAK;oBACL,KAAK;oBACL,KAAK;wBAEH;oBACF;wBACE,IAAIH,MAAMG,GAAG,CAACC,MAAM,KAAK,KAAKJ,MAAMK,aAAa,CAACC,KAAK,EAAE;4BACvDN,MAAMC,eAAe;wBACvB;gBACJ;YACF;;;AAIR,GAAG"}
1
+ {"version":3,"sources":["../../src/form/MenuItemTextField.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { TextField, type TextFieldProps } from \"./TextField.js\";\n\n/**\n * @remarks \\@since 5.0.0\n */\nexport interface MenuItemTextFieldProps extends TextFieldProps {\n /**\n * Any additional props or a `ref` to apply to the surrounding `<li>` element.\n */\n liProps?: PropsWithRef<HTMLAttributes<HTMLLIElement>, HTMLLIElement>;\n\n /** @defaultValue `true` */\n stretch?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * This is a wrapper for the `TextField` component that can be used within\n * `Menu`s by updating the `onKeyDown` and `onClick` behavior.\n *\n * Note: This is **not** the `TextFieldWithMessage` since the message part is\n * hard to style nicely within menus. You'd most likely want to use another menu\n * for displaying errors.\n *\n * @remarks \\@since 5.0.0\n */\nexport const MenuItemTextField = forwardRef<\n HTMLInputElement,\n MenuItemTextFieldProps\n>(function MenuItemTextField(props, ref) {\n const { liProps, onKeyDown, stretch = true, ...remaining } = props;\n return (\n <li\n role=\"none\"\n {...liProps}\n onClick={(event) => {\n liProps?.onClick?.(event);\n event.stopPropagation();\n }}\n className={cnb(\"rmd-list-item rmd-menu-item\", liProps?.className)}\n >\n <TextField\n {...remaining}\n ref={ref}\n stretch={stretch}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n switch (event.key) {\n case \"Tab\":\n case \"Escape\":\n case \" \":\n // do default behavior\n break;\n default:\n if (event.key.length === 1 || event.currentTarget.value) {\n event.stopPropagation();\n }\n }\n }}\n />\n </li>\n );\n});\n"],"names":["cnb","forwardRef","TextField","MenuItemTextField","props","ref","liProps","onKeyDown","stretch","remaining","li","role","onClick","event","stopPropagation","className","key","length","currentTarget","value"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6B,QAAQ;AAExD,SAASC,SAAS,QAA6B,iBAAiB;AAehE;;;;;;;;;;;CAWC,GACD,OAAO,MAAMC,kCAAoBF,WAG/B,SAASE,kBAAkBC,KAAK,EAAEC,GAAG;IACrC,MAAM,EAAEC,OAAO,EAAEC,SAAS,EAAEC,UAAU,IAAI,EAAE,GAAGC,WAAW,GAAGL;IAC7D,qBACE,KAACM;QACCC,MAAK;QACJ,GAAGL,OAAO;QACXM,SAAS,CAACC;YACRP,SAASM,UAAUC;YACnBA,MAAMC,eAAe;QACvB;QACAC,WAAWf,IAAI,+BAA+BM,SAASS;kBAEvD,cAAA,KAACb;YACE,GAAGO,SAAS;YACbJ,KAAKA;YACLG,SAASA;YACTD,WAAW,CAACM;gBACVN,YAAYM;gBACZ,OAAQA,MAAMG,GAAG;oBACf,KAAK;oBACL,KAAK;oBACL,KAAK;wBAEH;oBACF;wBACE,IAAIH,MAAMG,GAAG,CAACC,MAAM,KAAK,KAAKJ,MAAMK,aAAa,CAACC,KAAK,EAAE;4BACvDN,MAAMC,eAAe;wBACvB;gBACJ;YACF;;;AAIR,GAAG"}
@@ -1,7 +1,10 @@
1
1
  import { type CSSProperties, type HTMLAttributes, type ReactNode, type SelectHTMLAttributes } from "react";
2
2
  import { type PropsWithRef } from "../types.js";
3
- import { type FormFieldOptions, type UserAgentAutoCompleteProps } from "./types.js";
4
- export interface NativeSelectProps extends SelectHTMLAttributes<HTMLSelectElement>, UserAgentAutoCompleteProps, FormFieldOptions {
3
+ import { type FormFieldOptions, type UserAgentAutocompleteProps } from "./types.js";
4
+ /**
5
+ * @remarks \@since 6.0.0 Added support for {@link UserAgentAutocompleteProps}
6
+ */
7
+ export interface NativeSelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "autoComplete">, UserAgentAutocompleteProps, FormFieldOptions {
5
8
  /**
6
9
  * A custom dropdown icon to use instead of the browser's default select
7
10
  * dropdown icon.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/NativeSelect.tsx"],"sourcesContent":["import {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n type SelectHTMLAttributes,\n} from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { FormMessageContainer } from \"./FormMessageContainer.js\";\nimport { Label } from \"./Label.js\";\nimport { TextFieldContainer } from \"./TextFieldContainer.js\";\nimport { getFormConfig } from \"./formConfig.js\";\nimport { nativeSelect, nativeSelectContainer } from \"./nativeSelectStyles.js\";\nimport {\n type FormFieldOptions,\n type UserAgentAutoCompleteProps,\n} from \"./types.js\";\n\nexport interface NativeSelectProps\n extends SelectHTMLAttributes<HTMLSelectElement>,\n UserAgentAutoCompleteProps,\n FormFieldOptions {\n /**\n * A custom dropdown icon to use instead of the browser's default select\n * dropdown icon.\n *\n * Set this to `null` if the browser's default icon should be used instead.\n *\n * @defaultValue `getIcon(\"dropdown\")`\n */\n icon?: ReactNode;\n\n /**\n * This applies custom inline styles to the `<select>` element since the\n * `style` prop is applied to the container element instead.\n */\n selectStyle?: CSSProperties;\n\n /**\n * This applies custom className to the `<select>` element since the\n * `className` prop is applied to the container element instead.\n */\n selectClassName?: string;\n\n /**\n * This should be a list of `<option>` elements for specific values within the\n * `<select>`.\n *\n * Check out the {@link NativeSelect} for examples around using \"placeholder\"\n * text and requiring a value to be selected.\n */\n children: ReactNode;\n\n /**\n * Optional props to provide to the {@link TextFieldContainer} component.\n * There probably isn't any real use for this prop other than if you need to\n * add a `ref` for some DOM behavior.\n */\n containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n}\n\n/**\n * **Server Component**\n *\n * This component is a wrapper for the native `<select>` field that applies the\n * same theming as `TextField` and `TextArea` components. This component might\n * not be used much since the `Select` offers more styling options.\n *\n * @example\n * Simple Example\n * ```tsx\n * <NativeSelect label=\"Label\">\n * <option value=\"a\">Value 1</option>\n * <option value=\"b\">Value 2</option>\n * <option value=\"c\">Value 3</option>\n * <option value=\"d\">Value 4</option>\n * </NativeSelect>\n * ```\n *\n * @example\n * Required Value Example\n * ```tsx\n * function Example(): ReactElement {\n * // using `defaultValue=\"\"` makes it so the first option selected by default\n * // and considered an \"invalid\" value since it is `disabled`\n * //\n * // a `name` must be set with `required` so that the form validation will\n * // fire if the value is still the empty string when the form is submitted\n * //\n * // the first `<option>` is kind of like placeholder text since it doesn't\n * // have a value and is disabled by default\n *\n * return (\n * <NativeSelect\n * label=\"State\"\n * name=\"state\"\n * required\n * defaultValue=\"\"\n * >\n * <option value=\"\" disabled>Choose a state</option>\n * {states.map(({ name, code }) => (\n * <option key={code} value={code}>{name}</option>\n * ))}\n * </NativeSelect>\n * );\n * }\n * ```\n */\nexport const NativeSelect = forwardRef<HTMLSelectElement, NativeSelectProps>(\n function NativeSelect(props, ref) {\n const {\n id: propId,\n style,\n className,\n icon: propIcon,\n label,\n labelProps,\n labelStyle,\n labelClassName,\n selectStyle,\n selectClassName,\n autoCompleteValue,\n autoComplete = autoCompleteValue,\n name = autoCompleteValue,\n dense = false,\n error = false,\n active = false,\n inline = false,\n stretch = false,\n leftAddon,\n rightAddon: propRightAddon,\n leftAddonProps,\n rightAddonProps,\n disableLeftAddonStyles = false,\n disableRightAddonStyles = false,\n theme: propTheme,\n underlineDirection: propUnderlineDirection,\n messageProps,\n messageContainerProps,\n containerProps,\n children,\n ...remaining\n } = props;\n const { disabled = false, readOnly = false, multiple = false } = props;\n const id = useEnsuredId(propId, \"select\");\n const theme = getFormConfig(\"theme\", propTheme);\n const underlineDirection = getFormConfig(\n \"underlineDirection\",\n propUnderlineDirection\n );\n const icon = getIcon(\"dropdown\", propIcon);\n const underlined = theme === \"underline\" || theme === \"filled\";\n\n let rightAddon = propRightAddon;\n if (typeof propRightAddon === \"undefined\" && !multiple) {\n rightAddon = icon;\n }\n\n return (\n <FormMessageContainer\n {...messageContainerProps}\n messageProps={messageProps}\n >\n <TextFieldContainer\n {...containerProps}\n style={style}\n className={nativeSelectContainer({\n label: !!label,\n multiple,\n underlined,\n className,\n })}\n theme={theme}\n label={!!label}\n error={error}\n dense={dense}\n inline={inline}\n active={active}\n stretch={stretch}\n readOnly={readOnly}\n disabled={disabled}\n leftAddon={leftAddon}\n leftAddonProps={leftAddonProps}\n rightAddon={rightAddon}\n rightAddonProps={rightAddonProps}\n underlineDirection={underlineDirection}\n disableLeftAddonStyles={disableLeftAddonStyles}\n disableRightAddonStyles={disableRightAddonStyles}\n >\n <select\n {...remaining}\n id={id}\n ref={ref}\n autoComplete={autoComplete}\n name={name}\n disabled={disabled}\n style={selectStyle}\n className={nativeSelect({\n icon: !!icon,\n className: selectClassName,\n })}\n >\n {children}\n </select>\n {label && (\n <Label\n {...labelProps}\n htmlFor={id}\n style={labelProps?.style ?? labelStyle}\n className={labelProps?.className ?? labelClassName}\n floating\n dense={dense}\n error={error}\n active={active}\n disabled={disabled}\n >\n {label}\n </Label>\n )}\n </TextFieldContainer>\n </FormMessageContainer>\n );\n }\n);\n"],"names":["forwardRef","getIcon","useEnsuredId","FormMessageContainer","Label","TextFieldContainer","getFormConfig","nativeSelect","nativeSelectContainer","NativeSelect","props","ref","id","propId","style","className","icon","propIcon","label","labelProps","labelStyle","labelClassName","selectStyle","selectClassName","autoCompleteValue","autoComplete","name","dense","error","active","inline","stretch","leftAddon","rightAddon","propRightAddon","leftAddonProps","rightAddonProps","disableLeftAddonStyles","disableRightAddonStyles","theme","propTheme","underlineDirection","propUnderlineDirection","messageProps","messageContainerProps","containerProps","children","remaining","disabled","readOnly","multiple","underlined","select","htmlFor","floating"],"mappings":";AAAA,SACEA,UAAU,QAKL,QAAQ;AACf,SAASC,OAAO,QAAQ,wBAAwB;AAEhD,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,oBAAoB,QAAQ,4BAA4B;AACjE,SAASC,KAAK,QAAQ,aAAa;AACnC,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,YAAY,EAAEC,qBAAqB,QAAQ,0BAA0B;AAiD9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CC,GACD,OAAO,MAAMC,6BAAeT,WAC1B,SAASS,aAAaC,KAAK,EAAEC,GAAG;IAC9B,MAAM,EACJC,IAAIC,MAAM,EACVC,KAAK,EACLC,SAAS,EACTC,MAAMC,QAAQ,EACdC,KAAK,EACLC,UAAU,EACVC,UAAU,EACVC,cAAc,EACdC,WAAW,EACXC,eAAe,EACfC,iBAAiB,EACjBC,eAAeD,iBAAiB,EAChCE,OAAOF,iBAAiB,EACxBG,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,SAAS,EACTC,YAAYC,cAAc,EAC1BC,cAAc,EACdC,eAAe,EACfC,yBAAyB,KAAK,EAC9BC,0BAA0B,KAAK,EAC/BC,OAAOC,SAAS,EAChBC,oBAAoBC,sBAAsB,EAC1CC,YAAY,EACZC,qBAAqB,EACrBC,cAAc,EACdC,QAAQ,EACR,GAAGC,WACJ,GAAGrC;IACJ,MAAM,EAAEsC,WAAW,KAAK,EAAEC,WAAW,KAAK,EAAEC,WAAW,KAAK,EAAE,GAAGxC;IACjE,MAAME,KAAKV,aAAaW,QAAQ;IAChC,MAAM0B,QAAQjC,cAAc,SAASkC;IACrC,MAAMC,qBAAqBnC,cACzB,sBACAoC;IAEF,MAAM1B,OAAOf,QAAQ,YAAYgB;IACjC,MAAMkC,aAAaZ,UAAU,eAAeA,UAAU;IAEtD,IAAIN,aAAaC;IACjB,IAAI,OAAOA,mBAAmB,eAAe,CAACgB,UAAU;QACtDjB,aAAajB;IACf;IAEA,qBACE,KAACb;QACE,GAAGyC,qBAAqB;QACzBD,cAAcA;kBAEd,cAAA,MAACtC;YACE,GAAGwC,cAAc;YAClB/B,OAAOA;YACPC,WAAWP,sBAAsB;gBAC/BU,OAAO,CAAC,CAACA;gBACTgC;gBACAC;gBACApC;YACF;YACAwB,OAAOA;YACPrB,OAAO,CAAC,CAACA;YACTU,OAAOA;YACPD,OAAOA;YACPG,QAAQA;YACRD,QAAQA;YACRE,SAASA;YACTkB,UAAUA;YACVD,UAAUA;YACVhB,WAAWA;YACXG,gBAAgBA;YAChBF,YAAYA;YACZG,iBAAiBA;YACjBK,oBAAoBA;YACpBJ,wBAAwBA;YACxBC,yBAAyBA;;8BAEzB,KAACc;oBACE,GAAGL,SAAS;oBACbnC,IAAIA;oBACJD,KAAKA;oBACLc,cAAcA;oBACdC,MAAMA;oBACNsB,UAAUA;oBACVlC,OAAOQ;oBACPP,WAAWR,aAAa;wBACtBS,MAAM,CAAC,CAACA;wBACRD,WAAWQ;oBACb;8BAECuB;;gBAEF5B,uBACC,KAACd;oBACE,GAAGe,UAAU;oBACdkC,SAASzC;oBACTE,OAAOK,YAAYL,SAASM;oBAC5BL,WAAWI,YAAYJ,aAAaM;oBACpCiC,QAAQ;oBACR3B,OAAOA;oBACPC,OAAOA;oBACPC,QAAQA;oBACRmB,UAAUA;8BAET9B;;;;;AAMb,GACA"}
1
+ {"version":3,"sources":["../../src/form/NativeSelect.tsx"],"sourcesContent":["import {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n type SelectHTMLAttributes,\n} from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { FormMessageContainer } from \"./FormMessageContainer.js\";\nimport { Label } from \"./Label.js\";\nimport { TextFieldContainer } from \"./TextFieldContainer.js\";\nimport { getFormConfig } from \"./formConfig.js\";\nimport { nativeSelect, nativeSelectContainer } from \"./nativeSelectStyles.js\";\nimport {\n type FormFieldOptions,\n type UserAgentAutocompleteProps,\n} from \"./types.js\";\n\n/**\n * @remarks \\@since 6.0.0 Added support for {@link UserAgentAutocompleteProps}\n */\nexport interface NativeSelectProps\n extends Omit<SelectHTMLAttributes<HTMLSelectElement>, \"autoComplete\">,\n UserAgentAutocompleteProps,\n FormFieldOptions {\n /**\n * A custom dropdown icon to use instead of the browser's default select\n * dropdown icon.\n *\n * Set this to `null` if the browser's default icon should be used instead.\n *\n * @defaultValue `getIcon(\"dropdown\")`\n */\n icon?: ReactNode;\n\n /**\n * This applies custom inline styles to the `<select>` element since the\n * `style` prop is applied to the container element instead.\n */\n selectStyle?: CSSProperties;\n\n /**\n * This applies custom className to the `<select>` element since the\n * `className` prop is applied to the container element instead.\n */\n selectClassName?: string;\n\n /**\n * This should be a list of `<option>` elements for specific values within the\n * `<select>`.\n *\n * Check out the {@link NativeSelect} for examples around using \"placeholder\"\n * text and requiring a value to be selected.\n */\n children: ReactNode;\n\n /**\n * Optional props to provide to the {@link TextFieldContainer} component.\n * There probably isn't any real use for this prop other than if you need to\n * add a `ref` for some DOM behavior.\n */\n containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n}\n\n/**\n * **Server Component**\n *\n * This component is a wrapper for the native `<select>` field that applies the\n * same theming as `TextField` and `TextArea` components. This component might\n * not be used much since the `Select` offers more styling options.\n *\n * @example\n * Simple Example\n * ```tsx\n * <NativeSelect label=\"Label\">\n * <option value=\"a\">Value 1</option>\n * <option value=\"b\">Value 2</option>\n * <option value=\"c\">Value 3</option>\n * <option value=\"d\">Value 4</option>\n * </NativeSelect>\n * ```\n *\n * @example\n * Required Value Example\n * ```tsx\n * function Example(): ReactElement {\n * // using `defaultValue=\"\"` makes it so the first option selected by default\n * // and considered an \"invalid\" value since it is `disabled`\n * //\n * // a `name` must be set with `required` so that the form validation will\n * // fire if the value is still the empty string when the form is submitted\n * //\n * // the first `<option>` is kind of like placeholder text since it doesn't\n * // have a value and is disabled by default\n *\n * return (\n * <NativeSelect\n * label=\"State\"\n * name=\"state\"\n * required\n * defaultValue=\"\"\n * >\n * <option value=\"\" disabled>Choose a state</option>\n * {states.map(({ name, code }) => (\n * <option key={code} value={code}>{name}</option>\n * ))}\n * </NativeSelect>\n * );\n * }\n * ```\n */\nexport const NativeSelect = forwardRef<HTMLSelectElement, NativeSelectProps>(\n function NativeSelect(props, ref) {\n const {\n id: propId,\n style,\n className,\n icon: propIcon,\n label,\n labelProps,\n labelStyle,\n labelClassName,\n selectStyle,\n selectClassName,\n autoCompleteValue,\n autoComplete = autoCompleteValue,\n name = autoCompleteValue,\n dense = false,\n error = false,\n active = false,\n inline = false,\n stretch = false,\n leftAddon,\n rightAddon: propRightAddon,\n leftAddonProps,\n rightAddonProps,\n disableLeftAddonStyles = false,\n disableRightAddonStyles = false,\n theme: propTheme,\n underlineDirection: propUnderlineDirection,\n messageProps,\n messageContainerProps,\n containerProps,\n children,\n ...remaining\n } = props;\n const { disabled = false, readOnly = false, multiple = false } = props;\n const id = useEnsuredId(propId, \"select\");\n const theme = getFormConfig(\"theme\", propTheme);\n const underlineDirection = getFormConfig(\n \"underlineDirection\",\n propUnderlineDirection\n );\n const icon = getIcon(\"dropdown\", propIcon);\n const underlined = theme === \"underline\" || theme === \"filled\";\n\n let rightAddon = propRightAddon;\n if (typeof propRightAddon === \"undefined\" && !multiple) {\n rightAddon = icon;\n }\n\n return (\n <FormMessageContainer\n {...messageContainerProps}\n messageProps={messageProps}\n >\n <TextFieldContainer\n {...containerProps}\n style={style}\n className={nativeSelectContainer({\n label: !!label,\n multiple,\n underlined,\n className,\n })}\n theme={theme}\n label={!!label}\n error={error}\n dense={dense}\n inline={inline}\n active={active}\n stretch={stretch}\n readOnly={readOnly}\n disabled={disabled}\n leftAddon={leftAddon}\n leftAddonProps={leftAddonProps}\n rightAddon={rightAddon}\n rightAddonProps={rightAddonProps}\n underlineDirection={underlineDirection}\n disableLeftAddonStyles={disableLeftAddonStyles}\n disableRightAddonStyles={disableRightAddonStyles}\n >\n <select\n {...remaining}\n id={id}\n ref={ref}\n autoComplete={autoComplete}\n name={name}\n disabled={disabled}\n style={selectStyle}\n className={nativeSelect({\n icon: !!icon,\n className: selectClassName,\n })}\n >\n {children}\n </select>\n {label && (\n <Label\n {...labelProps}\n htmlFor={id}\n style={labelProps?.style ?? labelStyle}\n className={labelProps?.className ?? labelClassName}\n floating\n dense={dense}\n error={error}\n active={active}\n disabled={disabled}\n >\n {label}\n </Label>\n )}\n </TextFieldContainer>\n </FormMessageContainer>\n );\n }\n);\n"],"names":["forwardRef","getIcon","useEnsuredId","FormMessageContainer","Label","TextFieldContainer","getFormConfig","nativeSelect","nativeSelectContainer","NativeSelect","props","ref","id","propId","style","className","icon","propIcon","label","labelProps","labelStyle","labelClassName","selectStyle","selectClassName","autoCompleteValue","autoComplete","name","dense","error","active","inline","stretch","leftAddon","rightAddon","propRightAddon","leftAddonProps","rightAddonProps","disableLeftAddonStyles","disableRightAddonStyles","theme","propTheme","underlineDirection","propUnderlineDirection","messageProps","messageContainerProps","containerProps","children","remaining","disabled","readOnly","multiple","underlined","select","htmlFor","floating"],"mappings":";AAAA,SACEA,UAAU,QAKL,QAAQ;AACf,SAASC,OAAO,QAAQ,wBAAwB;AAEhD,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,oBAAoB,QAAQ,4BAA4B;AACjE,SAASC,KAAK,QAAQ,aAAa;AACnC,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,YAAY,EAAEC,qBAAqB,QAAQ,0BAA0B;AAoD9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CC,GACD,OAAO,MAAMC,6BAAeT,WAC1B,SAASS,aAAaC,KAAK,EAAEC,GAAG;IAC9B,MAAM,EACJC,IAAIC,MAAM,EACVC,KAAK,EACLC,SAAS,EACTC,MAAMC,QAAQ,EACdC,KAAK,EACLC,UAAU,EACVC,UAAU,EACVC,cAAc,EACdC,WAAW,EACXC,eAAe,EACfC,iBAAiB,EACjBC,eAAeD,iBAAiB,EAChCE,OAAOF,iBAAiB,EACxBG,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,SAAS,EACTC,YAAYC,cAAc,EAC1BC,cAAc,EACdC,eAAe,EACfC,yBAAyB,KAAK,EAC9BC,0BAA0B,KAAK,EAC/BC,OAAOC,SAAS,EAChBC,oBAAoBC,sBAAsB,EAC1CC,YAAY,EACZC,qBAAqB,EACrBC,cAAc,EACdC,QAAQ,EACR,GAAGC,WACJ,GAAGrC;IACJ,MAAM,EAAEsC,WAAW,KAAK,EAAEC,WAAW,KAAK,EAAEC,WAAW,KAAK,EAAE,GAAGxC;IACjE,MAAME,KAAKV,aAAaW,QAAQ;IAChC,MAAM0B,QAAQjC,cAAc,SAASkC;IACrC,MAAMC,qBAAqBnC,cACzB,sBACAoC;IAEF,MAAM1B,OAAOf,QAAQ,YAAYgB;IACjC,MAAMkC,aAAaZ,UAAU,eAAeA,UAAU;IAEtD,IAAIN,aAAaC;IACjB,IAAI,OAAOA,mBAAmB,eAAe,CAACgB,UAAU;QACtDjB,aAAajB;IACf;IAEA,qBACE,KAACb;QACE,GAAGyC,qBAAqB;QACzBD,cAAcA;kBAEd,cAAA,MAACtC;YACE,GAAGwC,cAAc;YAClB/B,OAAOA;YACPC,WAAWP,sBAAsB;gBAC/BU,OAAO,CAAC,CAACA;gBACTgC;gBACAC;gBACApC;YACF;YACAwB,OAAOA;YACPrB,OAAO,CAAC,CAACA;YACTU,OAAOA;YACPD,OAAOA;YACPG,QAAQA;YACRD,QAAQA;YACRE,SAASA;YACTkB,UAAUA;YACVD,UAAUA;YACVhB,WAAWA;YACXG,gBAAgBA;YAChBF,YAAYA;YACZG,iBAAiBA;YACjBK,oBAAoBA;YACpBJ,wBAAwBA;YACxBC,yBAAyBA;;8BAEzB,KAACc;oBACE,GAAGL,SAAS;oBACbnC,IAAIA;oBACJD,KAAKA;oBACLc,cAAcA;oBACdC,MAAMA;oBACNsB,UAAUA;oBACVlC,OAAOQ;oBACPP,WAAWR,aAAa;wBACtBS,MAAM,CAAC,CAACA;wBACRD,WAAWQ;oBACb;8BAECuB;;gBAEF5B,uBACC,KAACd;oBACE,GAAGe,UAAU;oBACdkC,SAASzC;oBACTE,OAAOK,YAAYL,SAASM;oBAC5BL,WAAWI,YAAYJ,aAAaM;oBACpCiC,QAAQ;oBACR3B,OAAOA;oBACPC,OAAOA;oBACPC,QAAQA;oBACRmB,UAAUA;8BAET9B;;;;;AAMb,GACA"}
@@ -36,9 +36,10 @@ const noop = ()=>{
36
36
  * \@since 6.0.0 Added the `value`, `selectedIcon`, `unselectedIcon`,
37
37
  * `selectedIconAfter`, and `iconSpacingProps` props.
38
38
  */ export const Option = /*#__PURE__*/ forwardRef(function Option(props, ref) {
39
- const { id: propId, role = "option", value, children: propChildren, onClick = noop, className, selectedIcon: propSelectedIcon, unselectedIcon: propUnselectedIcon, selectedIconAfter = false, textIconSpacingProps, leftAddon: propLeftAddon, leftAddonType, leftAddonClassName, rightAddon: propRightAddon, rightAddonType, rightAddonClassName, secondaryText, height: propHeight, disableTextChildren: propDisableTextChildren, ...remaining } = props;
39
+ const { id: propId, role = "option", value, children: propChildren, onClick = noop, className, selectedIcon: propSelectedIcon, unselectedIcon: propUnselectedIcon, selectedIconAfter: propSelectedIconAfter, textIconSpacingProps, leftAddon: propLeftAddon, leftAddonType, leftAddonClassName, rightAddon: propRightAddon, rightAddonType, rightAddonClassName, secondaryText, height: propHeight, disableTextChildren: propDisableTextChildren, ...remaining } = props;
40
40
  const id = useEnsuredId(propId, "option");
41
- const { inputRef, currentValue, disableSelectedIcon } = useListboxContext();
41
+ const { inputRef, currentValue, disableSelectedIcon, selectedIconAfter: contextSelectedIconAfter } = useListboxContext();
42
+ const selectedIconAfter = propSelectedIconAfter ?? contextSelectedIconAfter;
42
43
  const selected = value === currentValue;
43
44
  const selectedIcon = getIcon("selected", disableSelectedIcon ? null : propSelectedIcon);
44
45
  const unselectedIcon = disableSelectedIcon ? null : propUnselectedIcon ?? DEFAULT_OPTION_UNSELECTED_ICON;