@react-md/core 1.0.0-next.11 → 1.0.0-next.13

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 (1558) hide show
  1. package/.turbo/turbo-build.log +7 -7
  2. package/CHANGELOG.md +36 -0
  3. package/coverage/clover.xml +255 -3
  4. package/coverage/coverage-final.json +5 -1
  5. package/coverage/lcov-report/DefaultNavigationRenderer.tsx.html +298 -0
  6. package/coverage/lcov-report/Navigation.tsx.html +358 -0
  7. package/coverage/lcov-report/app-bar/AppBar.tsx.html +125 -134
  8. package/coverage/lcov-report/app-bar/AppBarTitle.tsx.html +54 -75
  9. package/coverage/lcov-report/app-bar/index.html +24 -9
  10. package/coverage/lcov-report/autocomplete/Autocomplete.tsx.html +34 -181
  11. package/coverage/lcov-report/autocomplete/AutocompleteGeneric.tsx.html +1 -1
  12. package/coverage/lcov-report/autocomplete/index.html +11 -11
  13. package/coverage/lcov-report/autocomplete/useAutocomplete.ts.html +102 -336
  14. package/coverage/lcov-report/autocomplete/useAutocompleteAgain.ts.html +1 -1
  15. package/coverage/lcov-report/autocomplete/useAutocompletev2.ts.html +1 -1
  16. package/coverage/lcov-report/autocomplete/useInlineAutocomplete.ts.html +31 -7
  17. package/coverage/lcov-report/autocomplete/useInlineSelection.ts.html +67 -4
  18. package/coverage/lcov-report/autocomplete/utils.ts.html +1 -1
  19. package/coverage/lcov-report/box/Box.tsx.html +115 -103
  20. package/coverage/lcov-report/box/index.html +22 -7
  21. package/coverage/lcov-report/box/styles.ts.html +622 -0
  22. package/coverage/lcov-report/button/Button.tsx.html +93 -105
  23. package/coverage/lcov-report/button/TooltippedButton.tsx.html +55 -67
  24. package/coverage/lcov-report/button/index.html +10 -10
  25. package/coverage/lcov-report/form/Form.tsx.html +18 -18
  26. package/coverage/lcov-report/form/Radio.tsx.html +8 -14
  27. package/coverage/lcov-report/form/index.html +35 -95
  28. package/coverage/lcov-report/form/useRadioGroup.ts.html +68 -80
  29. package/coverage/lcov-report/getHrefFromParents.ts.html +133 -0
  30. package/coverage/lcov-report/icon/FontIcon.tsx.html +65 -65
  31. package/coverage/lcov-report/icon/index.html +19 -19
  32. package/coverage/lcov-report/index.html +41 -11
  33. package/coverage/lcov-report/layout/LayoutNav.tsx.html +74 -86
  34. package/coverage/lcov-report/layout/Main.tsx.html +47 -38
  35. package/coverage/lcov-report/layout/index.html +54 -9
  36. package/coverage/lcov-report/layout/useExpandableLayout.ts.html +275 -89
  37. package/coverage/lcov-report/layout/useHorizontalLayoutTransition.ts.html +18 -18
  38. package/coverage/lcov-report/media-queries/AppSizeProvider.tsx.html +79 -64
  39. package/coverage/lcov-report/media-queries/index.html +18 -18
  40. package/coverage/lcov-report/navigation/CollapsibleNavGroup.tsx.html +334 -0
  41. package/coverage/lcov-report/navigation/DefaultNavigationRenderer.tsx.html +298 -0
  42. package/coverage/lcov-report/navigation/NavGroup.tsx.html +193 -0
  43. package/coverage/lcov-report/navigation/NavItem.tsx.html +160 -0
  44. package/coverage/lcov-report/navigation/NavItemButton.tsx.html +397 -0
  45. package/coverage/lcov-report/navigation/NavItemLink.tsx.html +574 -0
  46. package/coverage/lcov-report/navigation/NavSubheader.tsx.html +184 -0
  47. package/coverage/lcov-report/navigation/Navigation.tsx.html +358 -0
  48. package/coverage/lcov-report/navigation/getHrefFromParents.ts.html +130 -0
  49. package/coverage/lcov-report/navigation/index.html +146 -0
  50. package/coverage/lcov-report/navigation/navGroupStyles.ts.html +148 -0
  51. package/coverage/lcov-report/navigation/navItemStyles.ts.html +298 -0
  52. package/coverage/lcov-report/sheet/Sheet.tsx.html +50 -56
  53. package/coverage/lcov-report/sheet/index.html +8 -8
  54. package/coverage/lcov-report/snackbar/DefaultToastRenderer.tsx.html +307 -304
  55. package/coverage/lcov-report/snackbar/ToastManager.tsx.html +377 -356
  56. package/coverage/lcov-report/snackbar/index.html +16 -106
  57. package/coverage/lcov-report/src/autocomplete/Autocomplete.tsx.html +56 -92
  58. package/coverage/lcov-report/src/autocomplete/AutocompleteGeneric.tsx.html +1 -1
  59. package/coverage/lcov-report/src/autocomplete/index.html +11 -11
  60. package/coverage/lcov-report/src/autocomplete/useAutocomplete.ts.html +513 -111
  61. package/coverage/lcov-report/src/autocomplete/useAutocompleteAgain.ts.html +7 -7
  62. package/coverage/lcov-report/src/autocomplete/useAutocompletev2.ts.html +1 -1
  63. package/coverage/lcov-report/src/autocomplete/useInlineAutocomplete.ts.html +32 -8
  64. package/coverage/lcov-report/src/autocomplete/useInlineSelection.ts.html +146 -14
  65. package/coverage/lcov-report/src/autocomplete/utils.ts.html +1 -1
  66. package/coverage/lcov-report/src/divider/Divider.tsx.html +6 -9
  67. package/coverage/lcov-report/src/divider/index.html +8 -23
  68. package/coverage/lcov-report/src/icon/FontIcon.tsx.html +29 -29
  69. package/coverage/lcov-report/src/icon/index.html +1 -1
  70. package/coverage/lcov-report/src/index.html +21 -21
  71. package/coverage/lcov-report/src/layout/LayoutAppBar.tsx.html +33 -42
  72. package/coverage/lcov-report/src/layout/Main.tsx.html +33 -36
  73. package/coverage/lcov-report/src/layout/index.html +15 -195
  74. package/coverage/lcov-report/src/layout/useLayoutAppBarHeight.ts.html +37 -46
  75. package/coverage/lcov-report/src/list/List.tsx.html +39 -42
  76. package/coverage/lcov-report/src/list/index.html +10 -130
  77. package/coverage/lcov-report/src/navigation/CollapsibleNavGroup.tsx.html +367 -0
  78. package/coverage/lcov-report/src/navigation/DefaultNavigationRenderer.tsx.html +325 -0
  79. package/coverage/lcov-report/src/navigation/NavGroup.tsx.html +202 -0
  80. package/coverage/lcov-report/src/navigation/NavItem.tsx.html +172 -0
  81. package/coverage/lcov-report/src/navigation/NavSubheader.tsx.html +193 -0
  82. package/coverage/lcov-report/src/navigation/Navigation.tsx.html +358 -0
  83. package/coverage/lcov-report/src/navigation/index.html +191 -0
  84. package/coverage/lcov-report/src/tree/Tree.tsx.html +12 -24
  85. package/coverage/lcov-report/src/tree/index.html +18 -18
  86. package/coverage/lcov-report/src/useElementSize.ts.html +115 -40
  87. package/coverage/lcov-report/src/useMutationObserver.ts.html +310 -0
  88. package/coverage/lcov-report/src/utils/RenderRecursively.tsx.html +151 -52
  89. package/coverage/lcov-report/src/utils/index.html +10 -10
  90. package/coverage/lcov-report/test-utils/index.html +21 -21
  91. package/coverage/lcov-report/test-utils/matchMedia.ts.html +98 -95
  92. package/coverage/lcov-report/transition/config.ts.html +7 -7
  93. package/coverage/lcov-report/transition/index.html +1 -1
  94. package/coverage/lcov-report/useExpandableLayout.ts.html +171 -105
  95. package/coverage/lcov-report/useMutationObserver.ts.html +310 -0
  96. package/coverage/lcov-report/utils/index.html +16 -16
  97. package/coverage/lcov-report/utils/isElementVisible.ts.html +21 -24
  98. package/coverage/lcov.info +302 -0
  99. package/dist/CoreProviders.d.ts +3 -3
  100. package/dist/CoreProviders.js +1 -1
  101. package/dist/CoreProviders.js.map +1 -1
  102. package/dist/NoSsr.d.ts +3 -4
  103. package/dist/NoSsr.js +2 -3
  104. package/dist/NoSsr.js.map +1 -1
  105. package/dist/RootHtml.d.ts +3 -4
  106. package/dist/RootHtml.js +2 -3
  107. package/dist/RootHtml.js.map +1 -1
  108. package/dist/SsrProvider.d.ts +3 -3
  109. package/dist/SsrProvider.js +2 -2
  110. package/dist/SsrProvider.js.map +1 -1
  111. package/dist/_core.scss +5 -0
  112. package/dist/app-bar/AppBar.d.ts +11 -14
  113. package/dist/app-bar/AppBar.js +3 -5
  114. package/dist/app-bar/AppBar.js.map +1 -1
  115. package/dist/app-bar/AppBarTitle.d.ts +9 -10
  116. package/dist/app-bar/AppBarTitle.js +4 -6
  117. package/dist/app-bar/AppBarTitle.js.map +1 -1
  118. package/dist/avatar/Avatar.d.ts +5 -6
  119. package/dist/avatar/Avatar.js +2 -3
  120. package/dist/avatar/Avatar.js.map +1 -1
  121. package/dist/avatar/styles.d.ts +4 -4
  122. package/dist/avatar/styles.js +2 -2
  123. package/dist/avatar/styles.js.map +1 -1
  124. package/dist/badge/Badge.d.ts +4 -6
  125. package/dist/badge/Badge.js +3 -5
  126. package/dist/badge/Badge.js.map +1 -1
  127. package/dist/box/Box.d.ts +6 -9
  128. package/dist/box/Box.js +14 -9
  129. package/dist/box/Box.js.map +1 -1
  130. package/dist/box/_box.scss +1 -1
  131. package/dist/box/styles.d.ts +9 -9
  132. package/dist/box/styles.js +1 -1
  133. package/dist/box/styles.js.map +1 -1
  134. package/dist/button/AsyncButton.d.ts +5 -7
  135. package/dist/button/AsyncButton.js +3 -5
  136. package/dist/button/AsyncButton.js.map +1 -1
  137. package/dist/button/Button.d.ts +4 -8
  138. package/dist/button/Button.js +4 -8
  139. package/dist/button/Button.js.map +1 -1
  140. package/dist/button/ButtonUnstyled.d.ts +2 -2
  141. package/dist/button/ButtonUnstyled.js +1 -1
  142. package/dist/button/ButtonUnstyled.js.map +1 -1
  143. package/dist/button/FloatingActionButton.d.ts +5 -5
  144. package/dist/button/FloatingActionButton.js +2 -2
  145. package/dist/button/FloatingActionButton.js.map +1 -1
  146. package/dist/button/TooltippedButton.d.ts +2 -2
  147. package/dist/button/TooltippedButton.js +2 -5
  148. package/dist/button/TooltippedButton.js.map +1 -1
  149. package/dist/button/buttonStyles.d.ts +3 -3
  150. package/dist/button/buttonStyles.js +1 -1
  151. package/dist/button/buttonStyles.js.map +1 -1
  152. package/dist/button/buttonUnstyledStyles.d.ts +2 -2
  153. package/dist/button/buttonUnstyledStyles.js +1 -1
  154. package/dist/button/buttonUnstyledStyles.js.map +1 -1
  155. package/dist/card/Card.d.ts +3 -4
  156. package/dist/card/Card.js +2 -3
  157. package/dist/card/Card.js.map +1 -1
  158. package/dist/card/CardContent.d.ts +2 -4
  159. package/dist/card/CardContent.js +1 -2
  160. package/dist/card/CardContent.js.map +1 -1
  161. package/dist/card/CardFooter.d.ts +2 -2
  162. package/dist/card/CardFooter.js +1 -1
  163. package/dist/card/CardFooter.js.map +1 -1
  164. package/dist/card/CardHeader.d.ts +10 -12
  165. package/dist/card/CardHeader.js +6 -7
  166. package/dist/card/CardHeader.js.map +1 -1
  167. package/dist/card/CardSubtitle.d.ts +2 -2
  168. package/dist/card/CardSubtitle.js +1 -1
  169. package/dist/card/CardSubtitle.js.map +1 -1
  170. package/dist/card/CardTitle.d.ts +2 -2
  171. package/dist/card/CardTitle.js +1 -1
  172. package/dist/card/CardTitle.js.map +1 -1
  173. package/dist/card/ClickableCard.d.ts +3 -4
  174. package/dist/card/ClickableCard.js +2 -3
  175. package/dist/card/ClickableCard.js.map +1 -1
  176. package/dist/card/styles.d.ts +15 -15
  177. package/dist/card/styles.js +7 -7
  178. package/dist/card/styles.js.map +1 -1
  179. package/dist/chip/Chip.d.ts +10 -14
  180. package/dist/chip/Chip.js +4 -7
  181. package/dist/chip/Chip.js.map +1 -1
  182. package/dist/chip/styles.d.ts +4 -4
  183. package/dist/chip/styles.js +2 -2
  184. package/dist/chip/styles.js.map +1 -1
  185. package/dist/cssUtils.d.ts +10 -10
  186. package/dist/cssUtils.js +1 -1
  187. package/dist/cssUtils.js.map +1 -1
  188. package/dist/delegateEvent.js.map +1 -1
  189. package/dist/dialog/Dialog.d.ts +5 -6
  190. package/dist/dialog/Dialog.js +4 -5
  191. package/dist/dialog/Dialog.js.map +1 -1
  192. package/dist/dialog/DialogContainer.d.ts +2 -2
  193. package/dist/dialog/DialogContainer.js +1 -1
  194. package/dist/dialog/DialogContainer.js.map +1 -1
  195. package/dist/dialog/DialogContent.js.map +1 -1
  196. package/dist/dialog/DialogFooter.js.map +1 -1
  197. package/dist/dialog/DialogHeader.js.map +1 -1
  198. package/dist/dialog/DialogTitle.d.ts +3 -2
  199. package/dist/dialog/DialogTitle.js.map +1 -1
  200. package/dist/dialog/FixedDialog.d.ts +1 -2
  201. package/dist/dialog/FixedDialog.js +1 -2
  202. package/dist/dialog/FixedDialog.js.map +1 -1
  203. package/dist/dialog/NestedDialogProvider.js.map +1 -1
  204. package/dist/dialog/styles.d.ts +9 -9
  205. package/dist/dialog/styles.js +4 -4
  206. package/dist/dialog/styles.js.map +1 -1
  207. package/dist/divider/Divider.d.ts +2 -3
  208. package/dist/divider/Divider.js +1 -2
  209. package/dist/divider/Divider.js.map +1 -1
  210. package/dist/divider/styles.d.ts +2 -2
  211. package/dist/divider/styles.js +1 -1
  212. package/dist/divider/styles.js.map +1 -1
  213. package/dist/draggable/useDraggable.d.ts +17 -18
  214. package/dist/draggable/useDraggable.js +2 -2
  215. package/dist/draggable/useDraggable.js.map +1 -1
  216. package/dist/draggable/utils.d.ts +2 -2
  217. package/dist/draggable/utils.js +1 -1
  218. package/dist/draggable/utils.js.map +1 -1
  219. package/dist/expansion-panel/ExpansionList.d.ts +2 -2
  220. package/dist/expansion-panel/ExpansionList.js +1 -1
  221. package/dist/expansion-panel/ExpansionList.js.map +1 -1
  222. package/dist/expansion-panel/ExpansionPanel.d.ts +8 -9
  223. package/dist/expansion-panel/ExpansionPanel.js +2 -3
  224. package/dist/expansion-panel/ExpansionPanel.js.map +1 -1
  225. package/dist/expansion-panel/ExpansionPanelHeader.d.ts +5 -5
  226. package/dist/expansion-panel/ExpansionPanelHeader.js +3 -4
  227. package/dist/expansion-panel/ExpansionPanelHeader.js.map +1 -1
  228. package/dist/expansion-panel/useExpansionList.d.ts +5 -6
  229. package/dist/expansion-panel/useExpansionList.js +4 -5
  230. package/dist/expansion-panel/useExpansionList.js.map +1 -1
  231. package/dist/expansion-panel/useExpansionPanels.d.ts +9 -14
  232. package/dist/expansion-panel/useExpansionPanels.js +3 -6
  233. package/dist/expansion-panel/useExpansionPanels.js.map +1 -1
  234. package/dist/focus/useFocusContainer.d.ts +9 -10
  235. package/dist/focus/useFocusContainer.js +2 -3
  236. package/dist/focus/useFocusContainer.js.map +1 -1
  237. package/dist/focus/utils.d.ts +4 -5
  238. package/dist/focus/utils.js +3 -4
  239. package/dist/focus/utils.js.map +1 -1
  240. package/dist/form/Checkbox.d.ts +1 -2
  241. package/dist/form/Checkbox.js +1 -2
  242. package/dist/form/Checkbox.js.map +1 -1
  243. package/dist/form/Fieldset.d.ts +5 -6
  244. package/dist/form/Fieldset.js +2 -3
  245. package/dist/form/Fieldset.js.map +1 -1
  246. package/dist/form/FileInput.d.ts +6 -7
  247. package/dist/form/FileInput.js +3 -4
  248. package/dist/form/FileInput.js.map +1 -1
  249. package/dist/form/Form.js.map +1 -1
  250. package/dist/form/FormMessage.js.map +1 -1
  251. package/dist/form/FormMessageContainer.d.ts +2 -2
  252. package/dist/form/FormMessageContainer.js +1 -1
  253. package/dist/form/FormMessageContainer.js.map +1 -1
  254. package/dist/form/FormMessageCounter.d.ts +4 -6
  255. package/dist/form/FormMessageCounter.js +2 -3
  256. package/dist/form/FormMessageCounter.js.map +1 -1
  257. package/dist/form/InputToggle.d.ts +11 -12
  258. package/dist/form/InputToggle.js +1 -1
  259. package/dist/form/InputToggle.js.map +1 -1
  260. package/dist/form/InputToggleIcon.d.ts +4 -6
  261. package/dist/form/InputToggleIcon.js +2 -3
  262. package/dist/form/InputToggleIcon.js.map +1 -1
  263. package/dist/form/Label.d.ts +2 -2
  264. package/dist/form/Label.js +2 -2
  265. package/dist/form/Label.js.map +1 -1
  266. package/dist/form/Legend.d.ts +2 -2
  267. package/dist/form/Legend.js +1 -1
  268. package/dist/form/Legend.js.map +1 -1
  269. package/dist/form/MenuItemCheckbox.d.ts +2 -3
  270. package/dist/form/MenuItemCheckbox.js +2 -3
  271. package/dist/form/MenuItemCheckbox.js.map +1 -1
  272. package/dist/form/MenuItemFileInput.d.ts +3 -5
  273. package/dist/form/MenuItemFileInput.js +2 -3
  274. package/dist/form/MenuItemFileInput.js.map +1 -1
  275. package/dist/form/MenuItemInputToggle.d.ts +7 -9
  276. package/dist/form/MenuItemInputToggle.js +1 -1
  277. package/dist/form/MenuItemInputToggle.js.map +1 -1
  278. package/dist/form/MenuItemRadio.d.ts +3 -5
  279. package/dist/form/MenuItemRadio.js +3 -5
  280. package/dist/form/MenuItemRadio.js.map +1 -1
  281. package/dist/form/MenuItemSwitch.d.ts +2 -3
  282. package/dist/form/MenuItemSwitch.js +2 -3
  283. package/dist/form/MenuItemSwitch.js.map +1 -1
  284. package/dist/form/MenuItemTextField.d.ts +2 -2
  285. package/dist/form/MenuItemTextField.js +1 -1
  286. package/dist/form/MenuItemTextField.js.map +1 -1
  287. package/dist/form/NativeSelect.d.ts +3 -5
  288. package/dist/form/NativeSelect.js +2 -4
  289. package/dist/form/NativeSelect.js.map +1 -1
  290. package/dist/form/OptGroup.d.ts +3 -4
  291. package/dist/form/OptGroup.js +2 -3
  292. package/dist/form/OptGroup.js.map +1 -1
  293. package/dist/form/Option.d.ts +5 -7
  294. package/dist/form/Option.js +3 -4
  295. package/dist/form/Option.js.map +1 -1
  296. package/dist/form/Password.d.ts +7 -13
  297. package/dist/form/Password.js +1 -2
  298. package/dist/form/Password.js.map +1 -1
  299. package/dist/form/Radio.d.ts +1 -2
  300. package/dist/form/Radio.js +1 -2
  301. package/dist/form/Radio.js.map +1 -1
  302. package/dist/form/ResizingTextAreaWrapper.d.ts +2 -2
  303. package/dist/form/ResizingTextAreaWrapper.js +1 -1
  304. package/dist/form/ResizingTextAreaWrapper.js.map +1 -1
  305. package/dist/form/Select.d.ts +6 -9
  306. package/dist/form/Select.js +3 -5
  307. package/dist/form/Select.js.map +1 -1
  308. package/dist/form/SelectedOption.d.ts +2 -2
  309. package/dist/form/SelectedOption.js +1 -1
  310. package/dist/form/SelectedOption.js.map +1 -1
  311. package/dist/form/Slider.d.ts +16 -25
  312. package/dist/form/Slider.js.map +1 -1
  313. package/dist/form/SliderContainer.d.ts +6 -9
  314. package/dist/form/SliderContainer.js +2 -3
  315. package/dist/form/SliderContainer.js.map +1 -1
  316. package/dist/form/SliderMark.d.ts +2 -2
  317. package/dist/form/SliderMark.js +1 -1
  318. package/dist/form/SliderMark.js.map +1 -1
  319. package/dist/form/SliderMarkLabel.d.ts +5 -4
  320. package/dist/form/SliderMarkLabel.js +1 -1
  321. package/dist/form/SliderMarkLabel.js.map +1 -1
  322. package/dist/form/SliderThumb.d.ts +6 -8
  323. package/dist/form/SliderThumb.js +3 -4
  324. package/dist/form/SliderThumb.js.map +1 -1
  325. package/dist/form/SliderTrack.d.ts +4 -6
  326. package/dist/form/SliderTrack.js +2 -3
  327. package/dist/form/SliderTrack.js.map +1 -1
  328. package/dist/form/SliderValueMarks.d.ts +7 -9
  329. package/dist/form/SliderValueMarks.js +1 -1
  330. package/dist/form/SliderValueMarks.js.map +1 -1
  331. package/dist/form/SliderValueTooltip.d.ts +4 -6
  332. package/dist/form/SliderValueTooltip.js +2 -3
  333. package/dist/form/SliderValueTooltip.js.map +1 -1
  334. package/dist/form/Switch.d.ts +3 -4
  335. package/dist/form/Switch.js +2 -3
  336. package/dist/form/Switch.js.map +1 -1
  337. package/dist/form/SwitchTrack.js.map +1 -1
  338. package/dist/form/TextArea.d.ts +2 -3
  339. package/dist/form/TextArea.js +1 -2
  340. package/dist/form/TextArea.js.map +1 -1
  341. package/dist/form/TextField.d.ts +7 -10
  342. package/dist/form/TextField.js +2 -4
  343. package/dist/form/TextField.js.map +1 -1
  344. package/dist/form/TextFieldAddon.d.ts +3 -3
  345. package/dist/form/TextFieldAddon.js +1 -1
  346. package/dist/form/TextFieldAddon.js.map +1 -1
  347. package/dist/form/TextFieldContainer.js.map +1 -1
  348. package/dist/form/fileUtils.d.ts +33 -36
  349. package/dist/form/fileUtils.js +14 -14
  350. package/dist/form/fileUtils.js.map +1 -1
  351. package/dist/form/formConfig.d.ts +2 -2
  352. package/dist/form/formConfig.js +2 -2
  353. package/dist/form/formConfig.js.map +1 -1
  354. package/dist/form/formMessageStyles.d.ts +5 -5
  355. package/dist/form/formMessageStyles.js +3 -3
  356. package/dist/form/formMessageStyles.js.map +1 -1
  357. package/dist/form/inputToggleStyles.d.ts +3 -3
  358. package/dist/form/inputToggleStyles.js +1 -1
  359. package/dist/form/inputToggleStyles.js.map +1 -1
  360. package/dist/form/menuItemInputToggleStyles.d.ts +8 -8
  361. package/dist/form/menuItemInputToggleStyles.js +4 -4
  362. package/dist/form/menuItemInputToggleStyles.js.map +1 -1
  363. package/dist/form/nativeSelectStyles.d.ts +4 -4
  364. package/dist/form/nativeSelectStyles.js +2 -2
  365. package/dist/form/nativeSelectStyles.js.map +1 -1
  366. package/dist/form/optionStyles.d.ts +2 -2
  367. package/dist/form/optionStyles.js +1 -1
  368. package/dist/form/optionStyles.js.map +1 -1
  369. package/dist/form/passwordStyles.d.ts +4 -4
  370. package/dist/form/passwordStyles.js +1 -1
  371. package/dist/form/passwordStyles.js.map +1 -1
  372. package/dist/form/selectStyles.d.ts +2 -2
  373. package/dist/form/selectStyles.js +1 -1
  374. package/dist/form/selectStyles.js.map +1 -1
  375. package/dist/form/selectUtils.d.ts +3 -3
  376. package/dist/form/selectUtils.js +2 -2
  377. package/dist/form/selectUtils.js.map +1 -1
  378. package/dist/form/sliderUtils.d.ts +9 -9
  379. package/dist/form/sliderUtils.js +4 -4
  380. package/dist/form/sliderUtils.js.map +1 -1
  381. package/dist/form/switchStyles.d.ts +2 -2
  382. package/dist/form/switchStyles.js +1 -1
  383. package/dist/form/switchStyles.js.map +1 -1
  384. package/dist/form/textAreaStyles.d.ts +4 -4
  385. package/dist/form/textAreaStyles.js +2 -2
  386. package/dist/form/textAreaStyles.js.map +1 -1
  387. package/dist/form/textFieldContainerStyles.d.ts +2 -2
  388. package/dist/form/textFieldContainerStyles.js +1 -1
  389. package/dist/form/textFieldContainerStyles.js.map +1 -1
  390. package/dist/form/textFieldStyles.d.ts +2 -2
  391. package/dist/form/textFieldStyles.js +1 -1
  392. package/dist/form/textFieldStyles.js.map +1 -1
  393. package/dist/form/types.d.ts +10 -10
  394. package/dist/form/types.js.map +1 -1
  395. package/dist/form/useCheckboxGroup.d.ts +15 -20
  396. package/dist/form/useCheckboxGroup.js.map +1 -1
  397. package/dist/form/useCombobox.d.ts +16 -16
  398. package/dist/form/useCombobox.js +2 -2
  399. package/dist/form/useCombobox.js.map +1 -1
  400. package/dist/form/useEditableCombobox.d.ts +3 -3
  401. package/dist/form/useEditableCombobox.js +1 -1
  402. package/dist/form/useEditableCombobox.js.map +1 -1
  403. package/dist/form/useFileUpload.d.ts +7 -8
  404. package/dist/form/useFileUpload.js +1 -1
  405. package/dist/form/useFileUpload.js.map +1 -1
  406. package/dist/form/useFormReset.d.ts +2 -2
  407. package/dist/form/useFormReset.js +1 -1
  408. package/dist/form/useFormReset.js.map +1 -1
  409. package/dist/form/useListboxProvider.d.ts +3 -3
  410. package/dist/form/useListboxProvider.js +2 -2
  411. package/dist/form/useListboxProvider.js.map +1 -1
  412. package/dist/form/useNumberField.d.ts +17 -25
  413. package/dist/form/useNumberField.js.map +1 -1
  414. package/dist/form/useRadioGroup.d.ts +12 -15
  415. package/dist/form/useRadioGroup.js +2 -3
  416. package/dist/form/useRadioGroup.js.map +1 -1
  417. package/dist/form/useRangeSlider.d.ts +8 -11
  418. package/dist/form/useRangeSlider.js +3 -5
  419. package/dist/form/useRangeSlider.js.map +1 -1
  420. package/dist/form/useResizingTextArea.js.map +1 -1
  421. package/dist/form/useSelectCombobox.d.ts +3 -3
  422. package/dist/form/useSelectCombobox.js +1 -1
  423. package/dist/form/useSelectCombobox.js.map +1 -1
  424. package/dist/form/useSlider.d.ts +7 -9
  425. package/dist/form/useSlider.js +3 -5
  426. package/dist/form/useSlider.js.map +1 -1
  427. package/dist/form/useTextField.d.ts +22 -31
  428. package/dist/form/useTextField.js.map +1 -1
  429. package/dist/form/utils.d.ts +7 -8
  430. package/dist/form/utils.js +5 -6
  431. package/dist/form/utils.js.map +1 -1
  432. package/dist/form/validation.d.ts +16 -16
  433. package/dist/form/validation.js +7 -7
  434. package/dist/form/validation.js.map +1 -1
  435. package/dist/hoverMode/useHoverMode.d.ts +9 -10
  436. package/dist/hoverMode/useHoverMode.js.map +1 -1
  437. package/dist/hoverMode/useHoverModeProvider.d.ts +11 -15
  438. package/dist/hoverMode/useHoverModeProvider.js +3 -4
  439. package/dist/hoverMode/useHoverModeProvider.js.map +1 -1
  440. package/dist/icon/FontIcon.d.ts +1 -1
  441. package/dist/icon/FontIcon.js +1 -1
  442. package/dist/icon/FontIcon.js.map +1 -1
  443. package/dist/icon/IconRotator.d.ts +1 -1
  444. package/dist/icon/IconRotator.js.map +1 -1
  445. package/dist/icon/MaterialIcon.d.ts +2 -2
  446. package/dist/icon/MaterialIcon.js +1 -1
  447. package/dist/icon/MaterialIcon.js.map +1 -1
  448. package/dist/icon/MaterialSymbol.d.ts +3 -4
  449. package/dist/icon/MaterialSymbol.js +2 -3
  450. package/dist/icon/MaterialSymbol.js.map +1 -1
  451. package/dist/icon/SVGIcon.d.ts +0 -1
  452. package/dist/icon/SVGIcon.js.map +1 -1
  453. package/dist/icon/TextIconSpacing.d.ts +3 -5
  454. package/dist/icon/TextIconSpacing.js +2 -4
  455. package/dist/icon/TextIconSpacing.js.map +1 -1
  456. package/dist/icon/iconConfig.d.ts +14 -16
  457. package/dist/icon/iconConfig.js +5 -7
  458. package/dist/icon/iconConfig.js.map +1 -1
  459. package/dist/icon/material.d.ts +4 -4
  460. package/dist/icon/material.js +1 -1
  461. package/dist/icon/material.js.map +1 -1
  462. package/dist/icon/materialConfig.d.ts +12 -12
  463. package/dist/icon/materialConfig.js +2 -2
  464. package/dist/icon/materialConfig.js.map +1 -1
  465. package/dist/icon/styles.d.ts +8 -8
  466. package/dist/icon/styles.js +2 -2
  467. package/dist/icon/styles.js.map +1 -1
  468. package/dist/interaction/Ripple.js.map +1 -1
  469. package/dist/interaction/RippleContainer.js.map +1 -1
  470. package/dist/interaction/UserInteractionModeProvider.d.ts +1 -2
  471. package/dist/interaction/UserInteractionModeProvider.js +1 -2
  472. package/dist/interaction/UserInteractionModeProvider.js.map +1 -1
  473. package/dist/interaction/config.d.ts +2 -2
  474. package/dist/interaction/config.js +1 -1
  475. package/dist/interaction/config.js.map +1 -1
  476. package/dist/interaction/types.d.ts +8 -8
  477. package/dist/interaction/types.js +1 -1
  478. package/dist/interaction/types.js.map +1 -1
  479. package/dist/interaction/useElementInteraction.d.ts +6 -7
  480. package/dist/interaction/useElementInteraction.js +3 -4
  481. package/dist/interaction/useElementInteraction.js.map +1 -1
  482. package/dist/interaction/useHigherContrastChildren.d.ts +2 -3
  483. package/dist/interaction/useHigherContrastChildren.js +2 -3
  484. package/dist/interaction/useHigherContrastChildren.js.map +1 -1
  485. package/dist/interaction/utils.js.map +1 -1
  486. package/dist/layout/LayoutAppBar.d.ts +4 -7
  487. package/dist/layout/LayoutAppBar.js +3 -6
  488. package/dist/layout/LayoutAppBar.js.map +1 -1
  489. package/dist/layout/LayoutNav.d.ts +4 -6
  490. package/dist/layout/LayoutNav.js +3 -5
  491. package/dist/layout/LayoutNav.js.map +1 -1
  492. package/dist/layout/LayoutWindowSplitter.d.ts +3 -4
  493. package/dist/layout/LayoutWindowSplitter.js +2 -3
  494. package/dist/layout/LayoutWindowSplitter.js.map +1 -1
  495. package/dist/layout/Main.d.ts +4 -5
  496. package/dist/layout/Main.js +2 -3
  497. package/dist/layout/Main.js.map +1 -1
  498. package/dist/layout/_layout.scss +12 -1
  499. package/dist/layout/layoutNavStyles.d.ts +2 -2
  500. package/dist/layout/layoutNavStyles.js +1 -1
  501. package/dist/layout/layoutNavStyles.js.map +1 -1
  502. package/dist/layout/layoutWindowSplitterStyles.d.ts +2 -2
  503. package/dist/layout/layoutWindowSplitterStyles.js +1 -1
  504. package/dist/layout/layoutWindowSplitterStyles.js.map +1 -1
  505. package/dist/layout/mainStyles.d.ts +2 -2
  506. package/dist/layout/mainStyles.js +1 -1
  507. package/dist/layout/mainStyles.js.map +1 -1
  508. package/dist/layout/useExpandableLayout.d.ts +66 -14
  509. package/dist/layout/useExpandableLayout.js +50 -5
  510. package/dist/layout/useExpandableLayout.js.map +1 -1
  511. package/dist/layout/useHorizontalLayoutTransition.d.ts +4 -4
  512. package/dist/layout/useHorizontalLayoutTransition.js +2 -2
  513. package/dist/layout/useHorizontalLayoutTransition.js.map +1 -1
  514. package/dist/layout/useLayoutAppBarHeight.d.ts +7 -9
  515. package/dist/layout/useLayoutAppBarHeight.js +7 -8
  516. package/dist/layout/useLayoutAppBarHeight.js.map +1 -1
  517. package/dist/layout/useLayoutTree.d.ts +6 -6
  518. package/dist/layout/useLayoutTree.js +1 -1
  519. package/dist/layout/useLayoutTree.js.map +1 -1
  520. package/dist/layout/useLayoutWindowSplitter.d.ts +5 -6
  521. package/dist/layout/useLayoutWindowSplitter.js +2 -3
  522. package/dist/layout/useLayoutWindowSplitter.js.map +1 -1
  523. package/dist/layout/useMainTabIndex.d.ts +1 -1
  524. package/dist/layout/useMainTabIndex.js +1 -1
  525. package/dist/layout/useMainTabIndex.js.map +1 -1
  526. package/dist/layout/useResizableLayout.d.ts +54 -8
  527. package/dist/layout/useResizableLayout.js +51 -5
  528. package/dist/layout/useResizableLayout.js.map +1 -1
  529. package/dist/layout/useTemporaryLayout.d.ts +12 -12
  530. package/dist/layout/useTemporaryLayout.js +1 -1
  531. package/dist/layout/useTemporaryLayout.js.map +1 -1
  532. package/dist/link/Link.d.ts +10 -13
  533. package/dist/link/Link.js +5 -7
  534. package/dist/link/Link.js.map +1 -1
  535. package/dist/link/SkipToMainContent.d.ts +2 -4
  536. package/dist/link/SkipToMainContent.js +1 -2
  537. package/dist/link/SkipToMainContent.js.map +1 -1
  538. package/dist/link/styles.d.ts +4 -4
  539. package/dist/link/styles.js +2 -2
  540. package/dist/link/styles.js.map +1 -1
  541. package/dist/list/List.d.ts +3 -4
  542. package/dist/list/List.js +2 -3
  543. package/dist/list/List.js.map +1 -1
  544. package/dist/list/ListItem.d.ts +4 -6
  545. package/dist/list/ListItem.js +2 -4
  546. package/dist/list/ListItem.js.map +1 -1
  547. package/dist/list/ListItemAddon.js.map +1 -1
  548. package/dist/list/ListItemChildren.d.ts +1 -2
  549. package/dist/list/ListItemChildren.js +1 -2
  550. package/dist/list/ListItemChildren.js.map +1 -1
  551. package/dist/list/ListItemLink.js.map +1 -1
  552. package/dist/list/ListItemText.js.map +1 -1
  553. package/dist/list/ListSubheader.d.ts +3 -3
  554. package/dist/list/ListSubheader.js +1 -1
  555. package/dist/list/ListSubheader.js.map +1 -1
  556. package/dist/list/getListItemHeight.d.ts +1 -1
  557. package/dist/list/getListItemHeight.js.map +1 -1
  558. package/dist/list/listItemStyles.d.ts +9 -9
  559. package/dist/list/listItemStyles.js +3 -3
  560. package/dist/list/listItemStyles.js.map +1 -1
  561. package/dist/list/types.d.ts +11 -11
  562. package/dist/list/types.js.map +1 -1
  563. package/dist/media-queries/AppSizeProvider.d.ts +1 -2
  564. package/dist/media-queries/AppSizeProvider.js +1 -2
  565. package/dist/media-queries/AppSizeProvider.js.map +1 -1
  566. package/dist/media-queries/appSize.js.map +1 -1
  567. package/dist/media-queries/useMediaQuery.d.ts +2 -3
  568. package/dist/media-queries/useMediaQuery.js +2 -3
  569. package/dist/media-queries/useMediaQuery.js.map +1 -1
  570. package/dist/menu/DropdownMenu.d.ts +7 -11
  571. package/dist/menu/DropdownMenu.js +4 -7
  572. package/dist/menu/DropdownMenu.js.map +1 -1
  573. package/dist/menu/Menu.d.ts +10 -13
  574. package/dist/menu/Menu.js +2 -3
  575. package/dist/menu/Menu.js.map +1 -1
  576. package/dist/menu/MenuBar.d.ts +3 -4
  577. package/dist/menu/MenuBar.js +3 -4
  578. package/dist/menu/MenuBar.js.map +1 -1
  579. package/dist/menu/MenuButton.d.ts +8 -8
  580. package/dist/menu/MenuButton.js +2 -2
  581. package/dist/menu/MenuButton.js.map +1 -1
  582. package/dist/menu/MenuConfigurationProvider.d.ts +8 -8
  583. package/dist/menu/MenuConfigurationProvider.js +5 -5
  584. package/dist/menu/MenuConfigurationProvider.js.map +1 -1
  585. package/dist/menu/MenuItem.d.ts +2 -2
  586. package/dist/menu/MenuItem.js +1 -1
  587. package/dist/menu/MenuItem.js.map +1 -1
  588. package/dist/menu/MenuItemButton.d.ts +2 -2
  589. package/dist/menu/MenuItemButton.js +1 -1
  590. package/dist/menu/MenuItemButton.js.map +1 -1
  591. package/dist/menu/MenuItemCircularProgress.d.ts +3 -4
  592. package/dist/menu/MenuItemCircularProgress.js +2 -3
  593. package/dist/menu/MenuItemCircularProgress.js.map +1 -1
  594. package/dist/menu/MenuItemGroup.d.ts +3 -4
  595. package/dist/menu/MenuItemGroup.js +2 -3
  596. package/dist/menu/MenuItemGroup.js.map +1 -1
  597. package/dist/menu/MenuItemSeparator.d.ts +2 -2
  598. package/dist/menu/MenuItemSeparator.js +1 -1
  599. package/dist/menu/MenuItemSeparator.js.map +1 -1
  600. package/dist/menu/MenuSheet.d.ts +7 -9
  601. package/dist/menu/MenuSheet.js +2 -3
  602. package/dist/menu/MenuSheet.js.map +1 -1
  603. package/dist/menu/MenuVisibilityProvider.d.ts +6 -8
  604. package/dist/menu/MenuVisibilityProvider.js +5 -6
  605. package/dist/menu/MenuVisibilityProvider.js.map +1 -1
  606. package/dist/menu/MenuWidget.d.ts +2 -2
  607. package/dist/menu/MenuWidget.js +1 -1
  608. package/dist/menu/MenuWidget.js.map +1 -1
  609. package/dist/menu/MenuWidgetKeyboardProvider.d.ts +2 -2
  610. package/dist/menu/MenuWidgetKeyboardProvider.js +1 -1
  611. package/dist/menu/MenuWidgetKeyboardProvider.js.map +1 -1
  612. package/dist/menu/useContextMenu.d.ts +8 -12
  613. package/dist/menu/useContextMenu.js +3 -5
  614. package/dist/menu/useContextMenu.js.map +1 -1
  615. package/dist/menu/useMenuBarProvider.d.ts +6 -6
  616. package/dist/menu/useMenuBarProvider.js +3 -3
  617. package/dist/menu/useMenuBarProvider.js.map +1 -1
  618. package/dist/menu/utils.d.ts +2 -2
  619. package/dist/menu/utils.js +1 -1
  620. package/dist/menu/utils.js.map +1 -1
  621. package/dist/movement/constants.d.ts +3 -3
  622. package/dist/movement/constants.js +3 -3
  623. package/dist/movement/constants.js.map +1 -1
  624. package/dist/movement/findMatchIndex.js.map +1 -1
  625. package/dist/movement/types.d.ts +16 -17
  626. package/dist/movement/types.js +1 -1
  627. package/dist/movement/types.js.map +1 -1
  628. package/dist/movement/useKeyboardMovementProvider.d.ts +5 -8
  629. package/dist/movement/useKeyboardMovementProvider.js +6 -9
  630. package/dist/movement/useKeyboardMovementProvider.js.map +1 -1
  631. package/dist/movement/utils.d.ts +13 -13
  632. package/dist/movement/utils.js +10 -10
  633. package/dist/movement/utils.js.map +1 -1
  634. package/dist/navigation/CollapsibleNavGroup.d.ts +29 -0
  635. package/dist/navigation/CollapsibleNavGroup.js +49 -0
  636. package/dist/navigation/CollapsibleNavGroup.js.map +1 -0
  637. package/dist/navigation/DefaultNavigationRenderer.d.ts +22 -0
  638. package/dist/navigation/DefaultNavigationRenderer.js +58 -0
  639. package/dist/navigation/DefaultNavigationRenderer.js.map +1 -0
  640. package/dist/navigation/NavGroup.d.ts +18 -0
  641. package/dist/navigation/NavGroup.js +29 -0
  642. package/dist/navigation/NavGroup.js.map +1 -0
  643. package/dist/navigation/NavItem.d.ts +17 -0
  644. package/dist/navigation/NavItem.js +24 -0
  645. package/dist/navigation/NavItem.js.map +1 -0
  646. package/dist/navigation/NavItemButton.d.ts +26 -0
  647. package/dist/navigation/NavItemButton.js +65 -0
  648. package/dist/navigation/NavItemButton.js.map +1 -0
  649. package/dist/navigation/NavItemLink.d.ts +40 -0
  650. package/dist/navigation/NavItemLink.js +88 -0
  651. package/dist/navigation/NavItemLink.js.map +1 -0
  652. package/dist/navigation/NavSubheader.d.ts +16 -0
  653. package/dist/navigation/NavSubheader.js +26 -0
  654. package/dist/navigation/NavSubheader.js.map +1 -0
  655. package/dist/navigation/Navigation.d.ts +31 -0
  656. package/dist/navigation/Navigation.js +46 -0
  657. package/dist/navigation/Navigation.js.map +1 -0
  658. package/dist/navigation/_navigation.scss +99 -0
  659. package/dist/navigation/getHrefFromParents.d.ts +5 -0
  660. package/dist/navigation/getHrefFromParents.js +13 -0
  661. package/dist/navigation/getHrefFromParents.js.map +1 -0
  662. package/dist/navigation/navGroupStyles.d.ts +11 -0
  663. package/dist/navigation/navGroupStyles.js +13 -0
  664. package/dist/navigation/navGroupStyles.js.map +1 -0
  665. package/dist/navigation/navItemStyles.d.ts +33 -0
  666. package/dist/navigation/navItemStyles.js +31 -0
  667. package/dist/navigation/navItemStyles.js.map +1 -0
  668. package/dist/navigation/types.d.ts +137 -0
  669. package/dist/navigation/types.js +5 -0
  670. package/dist/navigation/types.js.map +1 -0
  671. package/dist/navigation/useActiveHeadingId.d.ts +54 -0
  672. package/dist/navigation/useActiveHeadingId.js +117 -0
  673. package/dist/navigation/useActiveHeadingId.js.map +1 -0
  674. package/dist/overlay/Overlay.d.ts +5 -6
  675. package/dist/overlay/Overlay.js +2 -3
  676. package/dist/overlay/Overlay.js.map +1 -1
  677. package/dist/overlay/overlayStyles.d.ts +4 -4
  678. package/dist/overlay/overlayStyles.js +3 -3
  679. package/dist/overlay/overlayStyles.js.map +1 -1
  680. package/dist/portal/Portal.d.ts +1 -2
  681. package/dist/portal/Portal.js +1 -2
  682. package/dist/portal/Portal.js.map +1 -1
  683. package/dist/portal/PortalContainerProvider.d.ts +4 -4
  684. package/dist/portal/PortalContainerProvider.js +2 -2
  685. package/dist/portal/PortalContainerProvider.js.map +1 -1
  686. package/dist/positioning/constants.js.map +1 -1
  687. package/dist/positioning/createHorizontalPosition.js.map +1 -1
  688. package/dist/positioning/createVerticalPosition.d.ts +1 -1
  689. package/dist/positioning/createVerticalPosition.js.map +1 -1
  690. package/dist/positioning/getFixedPosition.js +1 -1
  691. package/dist/positioning/getFixedPosition.js.map +1 -1
  692. package/dist/positioning/types.d.ts +4 -4
  693. package/dist/positioning/types.js.map +1 -1
  694. package/dist/positioning/useFixedPositioning.d.ts +8 -9
  695. package/dist/positioning/useFixedPositioning.js +2 -3
  696. package/dist/positioning/useFixedPositioning.js.map +1 -1
  697. package/dist/positioning/utils.d.ts +3 -3
  698. package/dist/positioning/utils.js +1 -1
  699. package/dist/positioning/utils.js.map +1 -1
  700. package/dist/progress/CircularProgress.d.ts +7 -10
  701. package/dist/progress/CircularProgress.js +3 -5
  702. package/dist/progress/CircularProgress.js.map +1 -1
  703. package/dist/progress/LinearProgress.d.ts +4 -6
  704. package/dist/progress/LinearProgress.js +3 -5
  705. package/dist/progress/LinearProgress.js.map +1 -1
  706. package/dist/progress/getProgressA11y.js.map +1 -1
  707. package/dist/progress/types.d.ts +5 -5
  708. package/dist/progress/types.js +1 -1
  709. package/dist/progress/types.js.map +1 -1
  710. package/dist/responsive-item/ResponsiveItemContainer.d.ts +10 -15
  711. package/dist/responsive-item/ResponsiveItemContainer.js +5 -8
  712. package/dist/responsive-item/ResponsiveItemContainer.js.map +1 -1
  713. package/dist/responsive-item/ResponsiveItemOverlay.d.ts +6 -7
  714. package/dist/responsive-item/ResponsiveItemOverlay.js +3 -4
  715. package/dist/responsive-item/ResponsiveItemOverlay.js.map +1 -1
  716. package/dist/responsive-item/styles.d.ts +2 -2
  717. package/dist/responsive-item/styles.js +1 -1
  718. package/dist/responsive-item/styles.js.map +1 -1
  719. package/dist/scroll/ScrollLock.d.ts +1 -1
  720. package/dist/scroll/ScrollLock.js +1 -1
  721. package/dist/scroll/ScrollLock.js.map +1 -1
  722. package/dist/scroll/getScrollbarWidth.js.map +1 -1
  723. package/dist/scroll/useScrollLock.d.ts +2 -3
  724. package/dist/scroll/useScrollLock.js +2 -3
  725. package/dist/scroll/useScrollLock.js.map +1 -1
  726. package/dist/searching/caseInsensitive.d.ts +9 -13
  727. package/dist/searching/caseInsensitive.js +1 -1
  728. package/dist/searching/caseInsensitive.js.map +1 -1
  729. package/dist/searching/fuzzy.d.ts +4 -5
  730. package/dist/searching/fuzzy.js +1 -1
  731. package/dist/searching/fuzzy.js.map +1 -1
  732. package/dist/searching/toSearchQuery.d.ts +1 -1
  733. package/dist/searching/toSearchQuery.js +1 -1
  734. package/dist/searching/toSearchQuery.js.map +1 -1
  735. package/dist/searching/types.d.ts +2 -2
  736. package/dist/searching/types.js +1 -1
  737. package/dist/searching/types.js.map +1 -1
  738. package/dist/searching/useFuzzyMatch.d.ts +3 -3
  739. package/dist/searching/useFuzzyMatch.js +1 -1
  740. package/dist/searching/useFuzzyMatch.js.map +1 -1
  741. package/dist/searching/utils.d.ts +3 -3
  742. package/dist/searching/utils.js +2 -2
  743. package/dist/searching/utils.js.map +1 -1
  744. package/dist/segmented-button/SegmentedButton.d.ts +3 -4
  745. package/dist/segmented-button/SegmentedButton.js +2 -3
  746. package/dist/segmented-button/SegmentedButton.js.map +1 -1
  747. package/dist/segmented-button/SegmentedButtonContainer.d.ts +3 -4
  748. package/dist/segmented-button/SegmentedButtonContainer.js +2 -3
  749. package/dist/segmented-button/SegmentedButtonContainer.js.map +1 -1
  750. package/dist/segmented-button/segmentedButtonContainerStyles.d.ts +2 -2
  751. package/dist/segmented-button/segmentedButtonContainerStyles.js +1 -1
  752. package/dist/segmented-button/segmentedButtonContainerStyles.js.map +1 -1
  753. package/dist/segmented-button/segmentedButtonStyles.d.ts +2 -2
  754. package/dist/segmented-button/segmentedButtonStyles.js +1 -1
  755. package/dist/segmented-button/segmentedButtonStyles.js.map +1 -1
  756. package/dist/sheet/Sheet.d.ts +1 -1
  757. package/dist/sheet/Sheet.js.map +1 -1
  758. package/dist/sheet/styles.d.ts +3 -3
  759. package/dist/sheet/styles.js +1 -1
  760. package/dist/sheet/styles.js.map +1 -1
  761. package/dist/snackbar/DefaultToastRenderer.d.ts +2 -2
  762. package/dist/snackbar/DefaultToastRenderer.js +1 -1
  763. package/dist/snackbar/DefaultToastRenderer.js.map +1 -1
  764. package/dist/snackbar/Snackbar.d.ts +3 -4
  765. package/dist/snackbar/Snackbar.js +2 -3
  766. package/dist/snackbar/Snackbar.js.map +1 -1
  767. package/dist/snackbar/Toast.d.ts +3 -3
  768. package/dist/snackbar/Toast.js +1 -1
  769. package/dist/snackbar/Toast.js.map +1 -1
  770. package/dist/snackbar/ToastActionButton.d.ts +2 -2
  771. package/dist/snackbar/ToastActionButton.js +1 -1
  772. package/dist/snackbar/ToastActionButton.js.map +1 -1
  773. package/dist/snackbar/ToastCloseButton.d.ts +2 -2
  774. package/dist/snackbar/ToastCloseButton.js +1 -1
  775. package/dist/snackbar/ToastCloseButton.js.map +1 -1
  776. package/dist/snackbar/ToastContent.d.ts +2 -2
  777. package/dist/snackbar/ToastContent.js +1 -1
  778. package/dist/snackbar/ToastContent.js.map +1 -1
  779. package/dist/snackbar/ToastManager.d.ts +17 -18
  780. package/dist/snackbar/ToastManager.js +21 -19
  781. package/dist/snackbar/ToastManager.js.map +1 -1
  782. package/dist/snackbar/ToastManagerProvider.d.ts +6 -6
  783. package/dist/snackbar/ToastManagerProvider.js +5 -5
  784. package/dist/snackbar/ToastManagerProvider.js.map +1 -1
  785. package/dist/snackbar/snackbarStyles.d.ts +4 -5
  786. package/dist/snackbar/snackbarStyles.js +1 -1
  787. package/dist/snackbar/snackbarStyles.js.map +1 -1
  788. package/dist/snackbar/toastContentStyles.d.ts +2 -2
  789. package/dist/snackbar/toastContentStyles.js +1 -1
  790. package/dist/snackbar/toastContentStyles.js.map +1 -1
  791. package/dist/snackbar/toastStyles.d.ts +2 -2
  792. package/dist/snackbar/toastStyles.js +1 -1
  793. package/dist/snackbar/toastStyles.js.map +1 -1
  794. package/dist/snackbar/useCurrentToastActions.d.ts +3 -3
  795. package/dist/snackbar/useCurrentToastActions.js +2 -2
  796. package/dist/snackbar/useCurrentToastActions.js.map +1 -1
  797. package/dist/suspense/CircularProgressSuspense.d.ts +3 -4
  798. package/dist/suspense/CircularProgressSuspense.js +2 -3
  799. package/dist/suspense/CircularProgressSuspense.js.map +1 -1
  800. package/dist/suspense/NullSuspense.d.ts +3 -4
  801. package/dist/suspense/NullSuspense.js +2 -3
  802. package/dist/suspense/NullSuspense.js.map +1 -1
  803. package/dist/table/Table.d.ts +1 -2
  804. package/dist/table/Table.js +1 -2
  805. package/dist/table/Table.js.map +1 -1
  806. package/dist/table/TableBody.js.map +1 -1
  807. package/dist/table/TableCell.d.ts +7 -7
  808. package/dist/table/TableCell.js.map +1 -1
  809. package/dist/table/TableCellContent.d.ts +3 -3
  810. package/dist/table/TableCellContent.js.map +1 -1
  811. package/dist/table/TableCheckbox.d.ts +11 -15
  812. package/dist/table/TableCheckbox.js +4 -6
  813. package/dist/table/TableCheckbox.js.map +1 -1
  814. package/dist/table/TableConfigurationProvider.js.map +1 -1
  815. package/dist/table/TableContainer.js.map +1 -1
  816. package/dist/table/TableContainerProvider.d.ts +3 -3
  817. package/dist/table/TableContainerProvider.js +2 -2
  818. package/dist/table/TableContainerProvider.js.map +1 -1
  819. package/dist/table/TableFooter.d.ts +2 -2
  820. package/dist/table/TableFooter.js +1 -1
  821. package/dist/table/TableFooter.js.map +1 -1
  822. package/dist/table/TableHeader.d.ts +2 -2
  823. package/dist/table/TableHeader.js +1 -1
  824. package/dist/table/TableHeader.js.map +1 -1
  825. package/dist/table/TableRadio.d.ts +7 -9
  826. package/dist/table/TableRadio.js +2 -3
  827. package/dist/table/TableRadio.js.map +1 -1
  828. package/dist/table/TableRow.js.map +1 -1
  829. package/dist/table/tableCellStyles.d.ts +2 -2
  830. package/dist/table/tableCellStyles.js +1 -1
  831. package/dist/table/tableCellStyles.js.map +1 -1
  832. package/dist/table/tableContainerStyles.d.ts +2 -2
  833. package/dist/table/tableContainerStyles.js +1 -1
  834. package/dist/table/tableContainerStyles.js.map +1 -1
  835. package/dist/table/tableFooterStyles.d.ts +1 -1
  836. package/dist/table/tableFooterStyles.js.map +1 -1
  837. package/dist/table/tableHeaderStyles.d.ts +2 -2
  838. package/dist/table/tableHeaderStyles.js +1 -1
  839. package/dist/table/tableHeaderStyles.js.map +1 -1
  840. package/dist/table/tableRowStyles.d.ts +2 -2
  841. package/dist/table/tableRowStyles.js +1 -1
  842. package/dist/table/tableRowStyles.js.map +1 -1
  843. package/dist/table/tableStyles.d.ts +2 -2
  844. package/dist/table/tableStyles.js +1 -1
  845. package/dist/table/tableStyles.js.map +1 -1
  846. package/dist/table/types.d.ts +7 -9
  847. package/dist/table/types.js +1 -1
  848. package/dist/table/types.js.map +1 -1
  849. package/dist/tabs/Tab.d.ts +4 -4
  850. package/dist/tabs/Tab.js +1 -1
  851. package/dist/tabs/Tab.js.map +1 -1
  852. package/dist/tabs/TabList.d.ts +2 -2
  853. package/dist/tabs/TabList.js +1 -1
  854. package/dist/tabs/TabList.js.map +1 -1
  855. package/dist/tabs/TabListScrollButton.d.ts +3 -3
  856. package/dist/tabs/TabListScrollButton.js +1 -1
  857. package/dist/tabs/TabListScrollButton.js.map +1 -1
  858. package/dist/tabs/tabIndicatorStyles.d.ts +2 -2
  859. package/dist/tabs/tabIndicatorStyles.js +1 -1
  860. package/dist/tabs/tabIndicatorStyles.js.map +1 -1
  861. package/dist/tabs/tabListScrollButtonStyles.d.ts +4 -4
  862. package/dist/tabs/tabListScrollButtonStyles.js +2 -2
  863. package/dist/tabs/tabListScrollButtonStyles.js.map +1 -1
  864. package/dist/tabs/tabListStyles.d.ts +2 -2
  865. package/dist/tabs/tabListStyles.js +1 -1
  866. package/dist/tabs/tabListStyles.js.map +1 -1
  867. package/dist/tabs/tabStyles.d.ts +2 -2
  868. package/dist/tabs/tabStyles.js +1 -1
  869. package/dist/tabs/tabStyles.js.map +1 -1
  870. package/dist/tabs/useTabList.js.map +1 -1
  871. package/dist/tabs/useTabs.d.ts +15 -20
  872. package/dist/tabs/useTabs.js +1 -1
  873. package/dist/tabs/useTabs.js.map +1 -1
  874. package/dist/tabs/utils.d.ts +3 -3
  875. package/dist/tabs/utils.js +1 -1
  876. package/dist/tabs/utils.js.map +1 -1
  877. package/dist/test-utils/IntersectionObserver.js.map +1 -1
  878. package/dist/test-utils/ResizeObserver.d.ts +9 -11
  879. package/dist/test-utils/ResizeObserver.js +6 -8
  880. package/dist/test-utils/ResizeObserver.js.map +1 -1
  881. package/dist/test-utils/data-testid.js.map +1 -1
  882. package/dist/test-utils/index.js.map +1 -1
  883. package/dist/test-utils/jest-setup.js.map +1 -1
  884. package/dist/test-utils/matchMedia.d.ts +13 -17
  885. package/dist/test-utils/matchMedia.js +9 -11
  886. package/dist/test-utils/matchMedia.js.map +1 -1
  887. package/dist/test-utils/polyfills/IntersectionObserver.js.map +1 -1
  888. package/dist/test-utils/polyfills/ResizeObserver.js.map +1 -1
  889. package/dist/test-utils/polyfills/TextDecoder.js.map +1 -1
  890. package/dist/test-utils/polyfills/TextEncoder.js.map +1 -1
  891. package/dist/test-utils/polyfills/index.js.map +1 -1
  892. package/dist/test-utils/polyfills/matchMedia.js.map +1 -1
  893. package/dist/test-utils/polyfills/offsetParent.js.map +1 -1
  894. package/dist/test-utils/polyfills/scrollIntoView.js.map +1 -1
  895. package/dist/test-utils/render.d.ts +2 -2
  896. package/dist/test-utils/render.js +1 -1
  897. package/dist/test-utils/render.js.map +1 -1
  898. package/dist/test-utils/timers.d.ts +2 -3
  899. package/dist/test-utils/timers.js +2 -3
  900. package/dist/test-utils/timers.js.map +1 -1
  901. package/dist/theme/LocalStorageColorSchemeProvider.d.ts +2 -2
  902. package/dist/theme/LocalStorageColorSchemeProvider.js +1 -1
  903. package/dist/theme/LocalStorageColorSchemeProvider.js.map +1 -1
  904. package/dist/theme/ThemeProvider.d.ts +17 -20
  905. package/dist/theme/ThemeProvider.js +7 -8
  906. package/dist/theme/ThemeProvider.js.map +1 -1
  907. package/dist/theme/colors.js.map +1 -1
  908. package/dist/theme/cssVars.js.map +1 -1
  909. package/dist/theme/types.d.ts +3 -3
  910. package/dist/theme/types.js +1 -1
  911. package/dist/theme/types.js.map +1 -1
  912. package/dist/theme/useCSSVariables.d.ts +7 -9
  913. package/dist/theme/useCSSVariables.js +1 -1
  914. package/dist/theme/useCSSVariables.js.map +1 -1
  915. package/dist/theme/useColorScheme.d.ts +6 -7
  916. package/dist/theme/useColorScheme.js +2 -3
  917. package/dist/theme/useColorScheme.js.map +1 -1
  918. package/dist/theme/useColorSchemeMetaTag.d.ts +2 -2
  919. package/dist/theme/useColorSchemeMetaTag.js +1 -1
  920. package/dist/theme/useColorSchemeMetaTag.js.map +1 -1
  921. package/dist/theme/useColorSchemeProvider.d.ts +2 -2
  922. package/dist/theme/useColorSchemeProvider.js.map +1 -1
  923. package/dist/theme/usePrefersColorScheme.d.ts +1 -1
  924. package/dist/theme/usePrefersColorScheme.js +1 -1
  925. package/dist/theme/usePrefersColorScheme.js.map +1 -1
  926. package/dist/theme/utils.d.ts +1 -1
  927. package/dist/theme/utils.js +1 -1
  928. package/dist/theme/utils.js.map +1 -1
  929. package/dist/tooltip/Tooltip.d.ts +3 -5
  930. package/dist/tooltip/Tooltip.js +1 -2
  931. package/dist/tooltip/Tooltip.js.map +1 -1
  932. package/dist/tooltip/TooltipHoverModeProvider.d.ts +5 -6
  933. package/dist/tooltip/TooltipHoverModeProvider.js +3 -4
  934. package/dist/tooltip/TooltipHoverModeProvider.js.map +1 -1
  935. package/dist/tooltip/constants.d.ts +9 -9
  936. package/dist/tooltip/constants.js +9 -9
  937. package/dist/tooltip/constants.js.map +1 -1
  938. package/dist/tooltip/tooltipStyles.d.ts +2 -2
  939. package/dist/tooltip/tooltipStyles.js +1 -1
  940. package/dist/tooltip/tooltipStyles.js.map +1 -1
  941. package/dist/tooltip/useTooltip.d.ts +18 -26
  942. package/dist/tooltip/useTooltip.js +4 -7
  943. package/dist/tooltip/useTooltip.js.map +1 -1
  944. package/dist/tooltip/useTooltipPosition.d.ts +4 -4
  945. package/dist/tooltip/useTooltipPosition.js +1 -1
  946. package/dist/tooltip/useTooltipPosition.js.map +1 -1
  947. package/dist/tooltip/utils.js.map +1 -1
  948. package/dist/transition/CSSTransition.d.ts +3 -4
  949. package/dist/transition/CSSTransition.js +2 -3
  950. package/dist/transition/CSSTransition.js.map +1 -1
  951. package/dist/transition/Collapse.d.ts +5 -8
  952. package/dist/transition/Collapse.js +3 -5
  953. package/dist/transition/Collapse.js.map +1 -1
  954. package/dist/transition/CrossFade.d.ts +5 -8
  955. package/dist/transition/CrossFade.js +3 -5
  956. package/dist/transition/CrossFade.js.map +1 -1
  957. package/dist/transition/ScaleTransition.d.ts +7 -10
  958. package/dist/transition/ScaleTransition.js +4 -6
  959. package/dist/transition/ScaleTransition.js.map +1 -1
  960. package/dist/transition/SkeletonPlaceholder.d.ts +4 -6
  961. package/dist/transition/SkeletonPlaceholder.js +3 -5
  962. package/dist/transition/SkeletonPlaceholder.js.map +1 -1
  963. package/dist/transition/Slide.d.ts +2 -2
  964. package/dist/transition/Slide.js +1 -1
  965. package/dist/transition/Slide.js.map +1 -1
  966. package/dist/transition/SlideContainer.d.ts +9 -13
  967. package/dist/transition/SlideContainer.js +4 -6
  968. package/dist/transition/SlideContainer.js.map +1 -1
  969. package/dist/transition/collapseStyles.d.ts +2 -2
  970. package/dist/transition/collapseStyles.js +1 -1
  971. package/dist/transition/collapseStyles.js.map +1 -1
  972. package/dist/transition/config.d.ts +2 -2
  973. package/dist/transition/config.js +2 -2
  974. package/dist/transition/config.js.map +1 -1
  975. package/dist/transition/maxWidthTransition.js.map +1 -1
  976. package/dist/transition/skeletonPlaceholderUtils.d.ts +3 -3
  977. package/dist/transition/skeletonPlaceholderUtils.js +2 -2
  978. package/dist/transition/skeletonPlaceholderUtils.js.map +1 -1
  979. package/dist/transition/types.d.ts +34 -37
  980. package/dist/transition/types.js +1 -1
  981. package/dist/transition/types.js.map +1 -1
  982. package/dist/transition/useCSSTransition.d.ts +4 -7
  983. package/dist/transition/useCSSTransition.js +4 -7
  984. package/dist/transition/useCSSTransition.js.map +1 -1
  985. package/dist/transition/useCarousel.d.ts +6 -7
  986. package/dist/transition/useCarousel.js +2 -3
  987. package/dist/transition/useCarousel.js.map +1 -1
  988. package/dist/transition/useCollapseTransition.d.ts +10 -13
  989. package/dist/transition/useCollapseTransition.js +4 -6
  990. package/dist/transition/useCollapseTransition.js.map +1 -1
  991. package/dist/transition/useCrossFadeTransition.d.ts +5 -6
  992. package/dist/transition/useCrossFadeTransition.js +4 -5
  993. package/dist/transition/useCrossFadeTransition.js.map +1 -1
  994. package/dist/transition/useMaxWidthTransition.d.ts +2 -2
  995. package/dist/transition/useMaxWidthTransition.js +1 -1
  996. package/dist/transition/useMaxWidthTransition.js.map +1 -1
  997. package/dist/transition/useScaleTransition.d.ts +8 -11
  998. package/dist/transition/useScaleTransition.js +7 -10
  999. package/dist/transition/useScaleTransition.js.map +1 -1
  1000. package/dist/transition/useSkeletonPlaceholder.d.ts +6 -10
  1001. package/dist/transition/useSkeletonPlaceholder.js.map +1 -1
  1002. package/dist/transition/useSlideTransition.d.ts +5 -6
  1003. package/dist/transition/useSlideTransition.js +4 -5
  1004. package/dist/transition/useSlideTransition.js.map +1 -1
  1005. package/dist/transition/useTransition.d.ts +1 -1
  1006. package/dist/transition/useTransition.js +1 -1
  1007. package/dist/transition/useTransition.js.map +1 -1
  1008. package/dist/transition/utils.d.ts +6 -6
  1009. package/dist/transition/utils.js +3 -3
  1010. package/dist/transition/utils.js.map +1 -1
  1011. package/dist/tree/DefaultTreeItemRenderer.d.ts +1 -1
  1012. package/dist/tree/DefaultTreeItemRenderer.js +1 -1
  1013. package/dist/tree/DefaultTreeItemRenderer.js.map +1 -1
  1014. package/dist/tree/Tree.d.ts +7 -11
  1015. package/dist/tree/Tree.js +4 -6
  1016. package/dist/tree/Tree.js.map +1 -1
  1017. package/dist/tree/TreeGroup.d.ts +3 -3
  1018. package/dist/tree/TreeGroup.js +1 -1
  1019. package/dist/tree/TreeGroup.js.map +1 -1
  1020. package/dist/tree/TreeItem.d.ts +3 -4
  1021. package/dist/tree/TreeItem.js +2 -3
  1022. package/dist/tree/TreeItem.js.map +1 -1
  1023. package/dist/tree/TreeItemExpander.d.ts +2 -2
  1024. package/dist/tree/TreeItemExpander.js +1 -1
  1025. package/dist/tree/TreeItemExpander.js.map +1 -1
  1026. package/dist/tree/TreeProvider.d.ts +6 -6
  1027. package/dist/tree/TreeProvider.js +2 -2
  1028. package/dist/tree/TreeProvider.js.map +1 -1
  1029. package/dist/tree/styles.d.ts +10 -10
  1030. package/dist/tree/styles.js +5 -5
  1031. package/dist/tree/styles.js.map +1 -1
  1032. package/dist/tree/types.d.ts +6 -7
  1033. package/dist/tree/types.js.map +1 -1
  1034. package/dist/tree/useTree.d.ts +4 -5
  1035. package/dist/tree/useTree.js +2 -3
  1036. package/dist/tree/useTree.js.map +1 -1
  1037. package/dist/tree/useTreeExpansion.d.ts +2 -2
  1038. package/dist/tree/useTreeExpansion.js +1 -1
  1039. package/dist/tree/useTreeExpansion.js.map +1 -1
  1040. package/dist/tree/useTreeItems.d.ts +7 -7
  1041. package/dist/tree/useTreeItems.js +2 -2
  1042. package/dist/tree/useTreeItems.js.map +1 -1
  1043. package/dist/tree/useTreeMovement.d.ts +3 -3
  1044. package/dist/tree/useTreeMovement.js +3 -3
  1045. package/dist/tree/useTreeMovement.js.map +1 -1
  1046. package/dist/tree/useTreeSelection.d.ts +2 -2
  1047. package/dist/tree/useTreeSelection.js +1 -1
  1048. package/dist/tree/useTreeSelection.js.map +1 -1
  1049. package/dist/tree/utils.d.ts +2 -2
  1050. package/dist/tree/utils.js +2 -2
  1051. package/dist/tree/utils.js.map +1 -1
  1052. package/dist/types.d.ts +14 -16
  1053. package/dist/types.js +1 -1
  1054. package/dist/types.js.map +1 -1
  1055. package/dist/typography/SrOnly.d.ts +1 -2
  1056. package/dist/typography/SrOnly.js +1 -2
  1057. package/dist/typography/SrOnly.js.map +1 -1
  1058. package/dist/typography/TextContainer.d.ts +4 -44
  1059. package/dist/typography/TextContainer.js +3 -33
  1060. package/dist/typography/TextContainer.js.map +1 -1
  1061. package/dist/typography/Typography.d.ts +4 -116
  1062. package/dist/typography/Typography.js +2 -91
  1063. package/dist/typography/Typography.js.map +1 -1
  1064. package/dist/typography/WritingDirectionProvider.d.ts +10 -13
  1065. package/dist/typography/WritingDirectionProvider.js +6 -9
  1066. package/dist/typography/WritingDirectionProvider.js.map +1 -1
  1067. package/dist/typography/textContainerStyles.d.ts +39 -0
  1068. package/dist/typography/textContainerStyles.js +31 -0
  1069. package/dist/typography/textContainerStyles.js.map +1 -0
  1070. package/dist/typography/typographyStyles.d.ts +110 -0
  1071. package/dist/typography/typographyStyles.js +89 -0
  1072. package/dist/typography/typographyStyles.js.map +1 -0
  1073. package/dist/useAsyncAction.d.ts +7 -9
  1074. package/dist/useAsyncAction.js +3 -5
  1075. package/dist/useAsyncAction.js.map +1 -1
  1076. package/dist/useDebouncedFunction.d.ts +3 -4
  1077. package/dist/useDebouncedFunction.js +2 -3
  1078. package/dist/useDebouncedFunction.js.map +1 -1
  1079. package/dist/useDropzone.d.ts +9 -14
  1080. package/dist/useDropzone.js +4 -7
  1081. package/dist/useDropzone.js.map +1 -1
  1082. package/dist/useElementSize.d.ts +26 -5
  1083. package/dist/useElementSize.js +7 -5
  1084. package/dist/useElementSize.js.map +1 -1
  1085. package/dist/useEnsuredId.d.ts +2 -3
  1086. package/dist/useEnsuredId.js +2 -3
  1087. package/dist/useEnsuredId.js.map +1 -1
  1088. package/dist/useEnsuredRef.d.ts +3 -4
  1089. package/dist/useEnsuredRef.js +2 -3
  1090. package/dist/useEnsuredRef.js.map +1 -1
  1091. package/dist/useEnsuredState.d.ts +2 -2
  1092. package/dist/useEnsuredState.js +1 -1
  1093. package/dist/useEnsuredState.js.map +1 -1
  1094. package/dist/useHtmlClassName.d.ts +1 -1
  1095. package/dist/useHtmlClassName.js +1 -1
  1096. package/dist/useHtmlClassName.js.map +1 -1
  1097. package/dist/useIntersectionObserver.d.ts +13 -20
  1098. package/dist/useIntersectionObserver.js +2 -3
  1099. package/dist/useIntersectionObserver.js.map +1 -1
  1100. package/dist/useIsomorphicLayoutEffect.js.map +1 -1
  1101. package/dist/useLocalStorage.d.ts +17 -22
  1102. package/dist/useLocalStorage.js +9 -13
  1103. package/dist/useLocalStorage.js.map +1 -1
  1104. package/dist/useOrientation.js.map +1 -1
  1105. package/dist/usePageInactive.d.ts +3 -3
  1106. package/dist/usePageInactive.js +1 -1
  1107. package/dist/usePageInactive.js.map +1 -1
  1108. package/dist/useResizeListener.d.ts +3 -4
  1109. package/dist/useResizeListener.js +2 -3
  1110. package/dist/useResizeListener.js.map +1 -1
  1111. package/dist/useResizeObserver.d.ts +8 -10
  1112. package/dist/useResizeObserver.js +4 -5
  1113. package/dist/useResizeObserver.js.map +1 -1
  1114. package/dist/useThrottledFunction.d.ts +3 -4
  1115. package/dist/useThrottledFunction.js +2 -3
  1116. package/dist/useThrottledFunction.js.map +1 -1
  1117. package/dist/useToggle.d.ts +2 -3
  1118. package/dist/useToggle.js +1 -2
  1119. package/dist/useToggle.js.map +1 -1
  1120. package/dist/useUnmounted.d.ts +2 -3
  1121. package/dist/useUnmounted.js +2 -3
  1122. package/dist/useUnmounted.js.map +1 -1
  1123. package/dist/useWindowSize.d.ts +3 -4
  1124. package/dist/useWindowSize.js +2 -3
  1125. package/dist/useWindowSize.js.map +1 -1
  1126. package/dist/utils/RenderRecursively.d.ts +26 -7
  1127. package/dist/utils/RenderRecursively.js +19 -3
  1128. package/dist/utils/RenderRecursively.js.map +1 -1
  1129. package/dist/utils/alphaNumericSort.d.ts +6 -11
  1130. package/dist/utils/alphaNumericSort.js +1 -1
  1131. package/dist/utils/alphaNumericSort.js.map +1 -1
  1132. package/dist/utils/applyRef.d.ts +1 -2
  1133. package/dist/utils/applyRef.js +1 -2
  1134. package/dist/utils/applyRef.js.map +1 -1
  1135. package/dist/utils/bem.d.ts +2 -3
  1136. package/dist/utils/bem.js +2 -3
  1137. package/dist/utils/bem.js.map +1 -1
  1138. package/dist/utils/getClientPosition.d.ts +4 -4
  1139. package/dist/utils/getClientPosition.js +2 -2
  1140. package/dist/utils/getClientPosition.js.map +1 -1
  1141. package/dist/utils/getMiddleOfRange.d.ts +2 -2
  1142. package/dist/utils/getMiddleOfRange.js +1 -1
  1143. package/dist/utils/getMiddleOfRange.js.map +1 -1
  1144. package/dist/utils/getPercentage.d.ts +3 -4
  1145. package/dist/utils/getPercentage.js +3 -4
  1146. package/dist/utils/getPercentage.js.map +1 -1
  1147. package/dist/utils/getRangeDefaultValue.d.ts +2 -2
  1148. package/dist/utils/getRangeDefaultValue.js +1 -1
  1149. package/dist/utils/getRangeDefaultValue.js.map +1 -1
  1150. package/dist/utils/getRangeSteps.d.ts +3 -4
  1151. package/dist/utils/getRangeSteps.js +3 -4
  1152. package/dist/utils/getRangeSteps.js.map +1 -1
  1153. package/dist/utils/identity.d.ts +1 -1
  1154. package/dist/utils/identity.js +1 -1
  1155. package/dist/utils/identity.js.map +1 -1
  1156. package/dist/utils/isElementVisible.d.ts +3 -4
  1157. package/dist/utils/isElementVisible.js +3 -4
  1158. package/dist/utils/isElementVisible.js.map +1 -1
  1159. package/dist/utils/loop.d.ts +2 -2
  1160. package/dist/utils/loop.js +2 -2
  1161. package/dist/utils/loop.js.map +1 -1
  1162. package/dist/utils/nearest.d.ts +3 -4
  1163. package/dist/utils/nearest.js +3 -4
  1164. package/dist/utils/nearest.js.map +1 -1
  1165. package/dist/utils/parseCssLengthUnit.d.ts +2 -4
  1166. package/dist/utils/parseCssLengthUnit.js +2 -4
  1167. package/dist/utils/parseCssLengthUnit.js.map +1 -1
  1168. package/dist/utils/randomInt.d.ts +2 -2
  1169. package/dist/utils/randomInt.js +2 -2
  1170. package/dist/utils/randomInt.js.map +1 -1
  1171. package/dist/utils/wait.d.ts +2 -3
  1172. package/dist/utils/wait.js +2 -3
  1173. package/dist/utils/wait.js.map +1 -1
  1174. package/dist/utils/withinRange.d.ts +3 -4
  1175. package/dist/utils/withinRange.js +3 -4
  1176. package/dist/utils/withinRange.js.map +1 -1
  1177. package/dist/window-splitter/WindowSplitter.d.ts +5 -5
  1178. package/dist/window-splitter/WindowSplitter.js +2 -2
  1179. package/dist/window-splitter/WindowSplitter.js.map +1 -1
  1180. package/dist/window-splitter/useWindowSplitter.d.ts +6 -7
  1181. package/dist/window-splitter/useWindowSplitter.js +2 -3
  1182. package/dist/window-splitter/useWindowSplitter.js.map +1 -1
  1183. package/package.json +24 -357
  1184. package/src/CoreProviders.tsx +3 -3
  1185. package/src/NoSsr.tsx +3 -4
  1186. package/src/RootHtml.tsx +3 -4
  1187. package/src/SsrProvider.tsx +3 -3
  1188. package/src/_core.scss +5 -0
  1189. package/src/app-bar/AppBar.tsx +11 -14
  1190. package/src/app-bar/AppBarTitle.tsx +9 -14
  1191. package/src/avatar/Avatar.tsx +5 -6
  1192. package/src/avatar/__tests__/Avatar.tsx +1 -1
  1193. package/src/avatar/styles.ts +4 -4
  1194. package/src/badge/Badge.tsx +4 -6
  1195. package/src/box/Box.tsx +16 -9
  1196. package/src/box/__tests__/Box.tsx +158 -0
  1197. package/src/box/__tests__/__snapshots__/Box.tsx.snap +544 -0
  1198. package/src/box/_box.scss +1 -1
  1199. package/src/box/styles.ts +9 -9
  1200. package/src/button/AsyncButton.tsx +5 -7
  1201. package/src/button/Button.tsx +4 -8
  1202. package/src/button/ButtonUnstyled.tsx +2 -2
  1203. package/src/button/FloatingActionButton.tsx +5 -5
  1204. package/src/button/TooltippedButton.tsx +9 -13
  1205. package/src/button/buttonStyles.ts +3 -3
  1206. package/src/button/buttonUnstyledStyles.ts +2 -2
  1207. package/src/card/Card.tsx +3 -4
  1208. package/src/card/CardContent.tsx +2 -4
  1209. package/src/card/CardFooter.tsx +2 -2
  1210. package/src/card/CardHeader.tsx +10 -12
  1211. package/src/card/CardSubtitle.tsx +2 -2
  1212. package/src/card/CardTitle.tsx +2 -2
  1213. package/src/card/ClickableCard.tsx +3 -4
  1214. package/src/card/styles.ts +15 -15
  1215. package/src/chip/Chip.tsx +10 -14
  1216. package/src/chip/styles.ts +4 -4
  1217. package/src/cssUtils.ts +10 -10
  1218. package/src/dialog/Dialog.tsx +5 -6
  1219. package/src/dialog/DialogContainer.tsx +2 -2
  1220. package/src/dialog/DialogTitle.tsx +2 -2
  1221. package/src/dialog/FixedDialog.tsx +1 -2
  1222. package/src/dialog/styles.ts +9 -9
  1223. package/src/divider/Divider.tsx +2 -3
  1224. package/src/divider/styles.ts +2 -2
  1225. package/src/draggable/useDraggable.ts +18 -19
  1226. package/src/draggable/utils.ts +2 -2
  1227. package/src/expansion-panel/ExpansionList.tsx +2 -2
  1228. package/src/expansion-panel/ExpansionPanel.tsx +8 -9
  1229. package/src/expansion-panel/ExpansionPanelHeader.tsx +6 -10
  1230. package/src/expansion-panel/useExpansionList.ts +6 -7
  1231. package/src/expansion-panel/useExpansionPanels.ts +9 -14
  1232. package/src/focus/useFocusContainer.ts +9 -10
  1233. package/src/focus/utils.ts +4 -5
  1234. package/src/form/Checkbox.tsx +1 -2
  1235. package/src/form/Fieldset.tsx +5 -6
  1236. package/src/form/FileInput.tsx +6 -7
  1237. package/src/form/FormMessageContainer.tsx +2 -2
  1238. package/src/form/FormMessageCounter.tsx +4 -6
  1239. package/src/form/InputToggle.tsx +11 -12
  1240. package/src/form/InputToggleIcon.tsx +4 -6
  1241. package/src/form/Label.tsx +2 -2
  1242. package/src/form/Legend.tsx +2 -2
  1243. package/src/form/MenuItemCheckbox.tsx +2 -3
  1244. package/src/form/MenuItemFileInput.tsx +3 -5
  1245. package/src/form/MenuItemInputToggle.tsx +7 -9
  1246. package/src/form/MenuItemRadio.tsx +3 -5
  1247. package/src/form/MenuItemSwitch.tsx +2 -3
  1248. package/src/form/MenuItemTextField.tsx +2 -2
  1249. package/src/form/NativeSelect.tsx +3 -5
  1250. package/src/form/OptGroup.tsx +3 -4
  1251. package/src/form/Option.tsx +5 -7
  1252. package/src/form/Password.tsx +7 -13
  1253. package/src/form/Radio.tsx +1 -2
  1254. package/src/form/ResizingTextAreaWrapper.tsx +2 -2
  1255. package/src/form/Select.tsx +6 -9
  1256. package/src/form/SelectedOption.tsx +2 -2
  1257. package/src/form/Slider.tsx +16 -25
  1258. package/src/form/SliderContainer.tsx +6 -9
  1259. package/src/form/SliderMark.tsx +2 -2
  1260. package/src/form/SliderMarkLabel.tsx +4 -4
  1261. package/src/form/SliderThumb.tsx +8 -10
  1262. package/src/form/SliderTrack.tsx +4 -6
  1263. package/src/form/SliderValueMarks.tsx +7 -9
  1264. package/src/form/SliderValueTooltip.tsx +4 -6
  1265. package/src/form/Switch.tsx +3 -4
  1266. package/src/form/TextArea.tsx +2 -3
  1267. package/src/form/TextField.tsx +7 -10
  1268. package/src/form/TextFieldAddon.tsx +3 -3
  1269. package/src/form/fileUtils.ts +33 -36
  1270. package/src/form/formConfig.ts +2 -2
  1271. package/src/form/formMessageStyles.ts +5 -5
  1272. package/src/form/inputToggleStyles.ts +3 -3
  1273. package/src/form/menuItemInputToggleStyles.ts +8 -8
  1274. package/src/form/nativeSelectStyles.ts +4 -4
  1275. package/src/form/optionStyles.ts +2 -2
  1276. package/src/form/passwordStyles.ts +4 -4
  1277. package/src/form/selectStyles.ts +2 -2
  1278. package/src/form/selectUtils.ts +4 -4
  1279. package/src/form/sliderUtils.ts +9 -9
  1280. package/src/form/switchStyles.ts +2 -2
  1281. package/src/form/textAreaStyles.ts +4 -4
  1282. package/src/form/textFieldContainerStyles.ts +2 -2
  1283. package/src/form/textFieldStyles.ts +2 -2
  1284. package/src/form/types.ts +10 -10
  1285. package/src/form/useCheckboxGroup.ts +15 -20
  1286. package/src/form/useCombobox.ts +18 -16
  1287. package/src/form/useEditableCombobox.ts +3 -3
  1288. package/src/form/useFileUpload.ts +7 -8
  1289. package/src/form/useFormReset.ts +2 -2
  1290. package/src/form/useListboxProvider.ts +3 -3
  1291. package/src/form/useNumberField.ts +17 -25
  1292. package/src/form/useRadioGroup.ts +14 -18
  1293. package/src/form/useRangeSlider.ts +8 -11
  1294. package/src/form/useSelectCombobox.ts +3 -3
  1295. package/src/form/useSlider.ts +7 -9
  1296. package/src/form/useTextField.ts +22 -31
  1297. package/src/form/utils.ts +7 -8
  1298. package/src/form/validation.ts +18 -18
  1299. package/src/hoverMode/useHoverMode.ts +9 -10
  1300. package/src/hoverMode/useHoverModeProvider.ts +11 -15
  1301. package/src/icon/FontIcon.tsx +1 -1
  1302. package/src/icon/IconRotator.tsx +1 -1
  1303. package/src/icon/MaterialIcon.tsx +2 -2
  1304. package/src/icon/MaterialSymbol.tsx +3 -4
  1305. package/src/icon/SVGIcon.tsx +0 -1
  1306. package/src/icon/TextIconSpacing.tsx +3 -5
  1307. package/src/icon/iconConfig.tsx +14 -16
  1308. package/src/icon/material.ts +4 -4
  1309. package/src/icon/materialConfig.ts +12 -12
  1310. package/src/icon/styles.ts +8 -8
  1311. package/src/interaction/UserInteractionModeProvider.tsx +1 -2
  1312. package/src/interaction/config.ts +2 -2
  1313. package/src/interaction/types.ts +8 -8
  1314. package/src/interaction/useElementInteraction.tsx +6 -7
  1315. package/src/interaction/useHigherContrastChildren.tsx +2 -3
  1316. package/src/layout/LayoutAppBar.tsx +4 -7
  1317. package/src/layout/LayoutNav.tsx +4 -6
  1318. package/src/layout/LayoutWindowSplitter.tsx +3 -4
  1319. package/src/layout/Main.tsx +4 -5
  1320. package/src/layout/__tests__/LayoutAppBar.tsx +23 -0
  1321. package/src/layout/__tests__/useExpandableLayout.tsx +8 -0
  1322. package/src/layout/_layout.scss +12 -1
  1323. package/src/layout/layoutNavStyles.ts +2 -2
  1324. package/src/layout/layoutWindowSplitterStyles.ts +2 -2
  1325. package/src/layout/mainStyles.ts +2 -2
  1326. package/src/layout/useExpandableLayout.ts +85 -23
  1327. package/src/layout/useHorizontalLayoutTransition.ts +8 -8
  1328. package/src/layout/useLayoutAppBarHeight.ts +10 -13
  1329. package/src/layout/useLayoutTree.ts +10 -10
  1330. package/src/layout/useLayoutWindowSplitter.ts +5 -6
  1331. package/src/layout/useMainTabIndex.ts +1 -1
  1332. package/src/layout/useResizableLayout.ts +54 -8
  1333. package/src/layout/useTemporaryLayout.ts +12 -13
  1334. package/src/link/Link.tsx +10 -13
  1335. package/src/link/SkipToMainContent.tsx +2 -4
  1336. package/src/link/styles.ts +4 -4
  1337. package/src/list/List.tsx +3 -4
  1338. package/src/list/ListItem.tsx +4 -6
  1339. package/src/list/ListItemChildren.tsx +1 -2
  1340. package/src/list/ListSubheader.tsx +3 -3
  1341. package/src/list/getListItemHeight.ts +1 -1
  1342. package/src/list/listItemStyles.ts +9 -9
  1343. package/src/list/types.ts +11 -11
  1344. package/src/media-queries/AppSizeProvider.tsx +1 -2
  1345. package/src/media-queries/useMediaQuery.ts +2 -3
  1346. package/src/menu/DropdownMenu.tsx +7 -11
  1347. package/src/menu/Menu.tsx +10 -13
  1348. package/src/menu/MenuBar.tsx +3 -4
  1349. package/src/menu/MenuButton.tsx +8 -8
  1350. package/src/menu/MenuConfigurationProvider.tsx +10 -10
  1351. package/src/menu/MenuItem.tsx +2 -2
  1352. package/src/menu/MenuItemButton.tsx +2 -2
  1353. package/src/menu/MenuItemCircularProgress.tsx +3 -4
  1354. package/src/menu/MenuItemGroup.tsx +3 -4
  1355. package/src/menu/MenuItemSeparator.tsx +2 -2
  1356. package/src/menu/MenuSheet.tsx +7 -9
  1357. package/src/menu/MenuVisibilityProvider.tsx +8 -10
  1358. package/src/menu/MenuWidget.tsx +2 -2
  1359. package/src/menu/MenuWidgetKeyboardProvider.tsx +2 -2
  1360. package/src/menu/useContextMenu.ts +8 -12
  1361. package/src/menu/useMenuBarProvider.ts +6 -6
  1362. package/src/menu/utils.ts +2 -2
  1363. package/src/movement/constants.ts +3 -3
  1364. package/src/movement/types.ts +16 -17
  1365. package/src/movement/useKeyboardMovementProvider.ts +6 -9
  1366. package/src/movement/utils.ts +13 -13
  1367. package/src/navigation/CollapsibleNavGroup.tsx +94 -0
  1368. package/src/navigation/DefaultNavigationRenderer.tsx +71 -0
  1369. package/src/navigation/NavGroup.tsx +39 -0
  1370. package/src/navigation/NavItem.tsx +29 -0
  1371. package/src/navigation/NavItemButton.tsx +104 -0
  1372. package/src/navigation/NavItemLink.tsx +163 -0
  1373. package/src/navigation/NavSubheader.tsx +36 -0
  1374. package/src/navigation/Navigation.tsx +91 -0
  1375. package/src/navigation/__tests__/Navigation.tsx +97 -0
  1376. package/src/navigation/__tests__/__snapshots__/Navigation.tsx.snap +165 -0
  1377. package/src/navigation/_navigation.scss +99 -0
  1378. package/src/navigation/getHrefFromParents.ts +15 -0
  1379. package/src/navigation/navGroupStyles.ts +21 -0
  1380. package/src/navigation/navItemStyles.ts +71 -0
  1381. package/src/navigation/types.ts +166 -0
  1382. package/src/navigation/useActiveHeadingId.ts +190 -0
  1383. package/src/overlay/Overlay.tsx +5 -6
  1384. package/src/overlay/overlayStyles.ts +4 -4
  1385. package/src/portal/Portal.tsx +1 -2
  1386. package/src/portal/PortalContainerProvider.tsx +4 -4
  1387. package/src/positioning/createVerticalPosition.ts +1 -1
  1388. package/src/positioning/getFixedPosition.ts +1 -1
  1389. package/src/positioning/types.ts +4 -4
  1390. package/src/positioning/useFixedPositioning.ts +8 -9
  1391. package/src/positioning/utils.ts +3 -3
  1392. package/src/progress/CircularProgress.tsx +7 -10
  1393. package/src/progress/LinearProgress.tsx +4 -6
  1394. package/src/progress/types.ts +5 -5
  1395. package/src/responsive-item/ResponsiveItemContainer.tsx +10 -15
  1396. package/src/responsive-item/ResponsiveItemOverlay.tsx +6 -7
  1397. package/src/responsive-item/styles.ts +2 -2
  1398. package/src/scroll/ScrollLock.tsx +1 -1
  1399. package/src/scroll/useScrollLock.ts +2 -3
  1400. package/src/searching/caseInsensitive.ts +9 -13
  1401. package/src/searching/fuzzy.ts +4 -5
  1402. package/src/searching/toSearchQuery.ts +1 -1
  1403. package/src/searching/types.ts +2 -2
  1404. package/src/searching/useFuzzyMatch.ts +3 -3
  1405. package/src/searching/utils.ts +3 -3
  1406. package/src/segmented-button/SegmentedButton.tsx +3 -4
  1407. package/src/segmented-button/SegmentedButtonContainer.tsx +3 -4
  1408. package/src/segmented-button/segmentedButtonContainerStyles.ts +2 -2
  1409. package/src/segmented-button/segmentedButtonStyles.ts +2 -2
  1410. package/src/sheet/Sheet.tsx +1 -1
  1411. package/src/sheet/styles.ts +3 -3
  1412. package/src/snackbar/DefaultToastRenderer.tsx +2 -2
  1413. package/src/snackbar/Snackbar.tsx +3 -4
  1414. package/src/snackbar/Toast.tsx +3 -3
  1415. package/src/snackbar/ToastActionButton.tsx +2 -2
  1416. package/src/snackbar/ToastCloseButton.tsx +2 -2
  1417. package/src/snackbar/ToastContent.tsx +2 -2
  1418. package/src/snackbar/ToastManager.tsx +30 -24
  1419. package/src/snackbar/ToastManagerProvider.tsx +6 -6
  1420. package/src/snackbar/__tests__/ToastManagerProvider.tsx +34 -0
  1421. package/src/snackbar/__tests__/__snapshots__/ToastManagerProvider.tsx.snap +21 -21
  1422. package/src/snackbar/snackbarStyles.ts +4 -5
  1423. package/src/snackbar/toastContentStyles.ts +2 -2
  1424. package/src/snackbar/toastStyles.ts +2 -2
  1425. package/src/snackbar/useCurrentToastActions.ts +3 -3
  1426. package/src/suspense/CircularProgressSuspense.tsx +3 -4
  1427. package/src/suspense/NullSuspense.tsx +3 -4
  1428. package/src/table/Table.tsx +1 -2
  1429. package/src/table/TableCell.tsx +7 -7
  1430. package/src/table/TableCellContent.tsx +3 -3
  1431. package/src/table/TableCheckbox.tsx +11 -15
  1432. package/src/table/TableContainerProvider.tsx +3 -3
  1433. package/src/table/TableFooter.tsx +2 -2
  1434. package/src/table/TableHeader.tsx +2 -2
  1435. package/src/table/TableRadio.tsx +7 -9
  1436. package/src/table/tableCellStyles.ts +2 -2
  1437. package/src/table/tableContainerStyles.ts +2 -2
  1438. package/src/table/tableFooterStyles.ts +1 -1
  1439. package/src/table/tableHeaderStyles.ts +2 -2
  1440. package/src/table/tableRowStyles.ts +2 -2
  1441. package/src/table/tableStyles.ts +2 -2
  1442. package/src/table/types.ts +7 -9
  1443. package/src/tabs/Tab.tsx +4 -4
  1444. package/src/tabs/TabList.tsx +2 -2
  1445. package/src/tabs/TabListScrollButton.tsx +3 -3
  1446. package/src/tabs/tabIndicatorStyles.ts +2 -2
  1447. package/src/tabs/tabListScrollButtonStyles.ts +4 -4
  1448. package/src/tabs/tabListStyles.ts +2 -2
  1449. package/src/tabs/tabStyles.ts +2 -2
  1450. package/src/tabs/useTabs.ts +16 -21
  1451. package/src/tabs/utils.ts +3 -3
  1452. package/src/test-utils/ResizeObserver.ts +9 -11
  1453. package/src/test-utils/matchMedia.ts +13 -17
  1454. package/src/test-utils/render.tsx +2 -2
  1455. package/src/test-utils/timers.ts +2 -3
  1456. package/src/theme/LocalStorageColorSchemeProvider.tsx +2 -2
  1457. package/src/theme/ThemeProvider.tsx +18 -21
  1458. package/src/theme/types.ts +3 -3
  1459. package/src/theme/useCSSVariables.ts +8 -10
  1460. package/src/theme/useColorScheme.ts +6 -7
  1461. package/src/theme/useColorSchemeMetaTag.ts +2 -2
  1462. package/src/theme/useColorSchemeProvider.ts +2 -2
  1463. package/src/theme/usePrefersColorScheme.ts +1 -1
  1464. package/src/theme/utils.ts +1 -1
  1465. package/src/tooltip/Tooltip.tsx +3 -5
  1466. package/src/tooltip/TooltipHoverModeProvider.tsx +5 -6
  1467. package/src/tooltip/constants.ts +9 -9
  1468. package/src/tooltip/tooltipStyles.ts +2 -2
  1469. package/src/tooltip/useTooltip.ts +18 -26
  1470. package/src/tooltip/useTooltipPosition.ts +4 -4
  1471. package/src/transition/CSSTransition.tsx +3 -4
  1472. package/src/transition/Collapse.tsx +5 -8
  1473. package/src/transition/CrossFade.tsx +5 -8
  1474. package/src/transition/ScaleTransition.tsx +7 -10
  1475. package/src/transition/SkeletonPlaceholder.tsx +4 -6
  1476. package/src/transition/Slide.tsx +2 -2
  1477. package/src/transition/SlideContainer.tsx +9 -13
  1478. package/src/transition/collapseStyles.ts +2 -2
  1479. package/src/transition/config.ts +2 -2
  1480. package/src/transition/skeletonPlaceholderUtils.ts +3 -3
  1481. package/src/transition/types.ts +34 -37
  1482. package/src/transition/useCSSTransition.ts +4 -7
  1483. package/src/transition/useCarousel.ts +6 -7
  1484. package/src/transition/useCollapseTransition.ts +10 -13
  1485. package/src/transition/useCrossFadeTransition.ts +5 -6
  1486. package/src/transition/useMaxWidthTransition.ts +2 -2
  1487. package/src/transition/useScaleTransition.ts +8 -11
  1488. package/src/transition/useSkeletonPlaceholder.ts +6 -10
  1489. package/src/transition/useSlideTransition.ts +5 -6
  1490. package/src/transition/useTransition.ts +1 -1
  1491. package/src/transition/utils.ts +6 -6
  1492. package/src/tree/DefaultTreeItemRenderer.tsx +1 -1
  1493. package/src/tree/Tree.tsx +8 -12
  1494. package/src/tree/TreeGroup.tsx +3 -3
  1495. package/src/tree/TreeItem.tsx +3 -4
  1496. package/src/tree/TreeItemExpander.tsx +2 -2
  1497. package/src/tree/TreeProvider.tsx +6 -6
  1498. package/src/tree/styles.ts +10 -10
  1499. package/src/tree/types.ts +6 -7
  1500. package/src/tree/useTree.ts +4 -5
  1501. package/src/tree/useTreeExpansion.ts +2 -2
  1502. package/src/tree/useTreeItems.ts +7 -7
  1503. package/src/tree/useTreeMovement.ts +5 -5
  1504. package/src/tree/useTreeSelection.ts +2 -2
  1505. package/src/tree/utils.ts +2 -2
  1506. package/src/types.ts +14 -16
  1507. package/src/typography/SrOnly.tsx +1 -2
  1508. package/src/typography/TextContainer.tsx +7 -57
  1509. package/src/typography/Typography.tsx +8 -149
  1510. package/src/typography/WritingDirectionProvider.tsx +10 -13
  1511. package/src/typography/__tests__/TextContainer.tsx +2 -1
  1512. package/src/typography/__tests__/Typography.tsx +2 -1
  1513. package/src/typography/textContainerStyles.ts +52 -0
  1514. package/src/typography/typographyStyles.ts +143 -0
  1515. package/src/useAsyncAction.ts +7 -9
  1516. package/src/useDebouncedFunction.ts +3 -4
  1517. package/src/useDropzone.ts +9 -14
  1518. package/src/useElementSize.ts +31 -6
  1519. package/src/useEnsuredId.ts +2 -3
  1520. package/src/useEnsuredRef.ts +3 -4
  1521. package/src/useEnsuredState.ts +2 -2
  1522. package/src/useHtmlClassName.ts +1 -1
  1523. package/src/useIntersectionObserver.ts +13 -20
  1524. package/src/useLocalStorage.ts +17 -22
  1525. package/src/usePageInactive.ts +3 -3
  1526. package/src/useResizeListener.ts +3 -4
  1527. package/src/useResizeObserver.ts +8 -10
  1528. package/src/useThrottledFunction.ts +3 -4
  1529. package/src/useToggle.ts +2 -3
  1530. package/src/useUnmounted.ts +2 -3
  1531. package/src/useWindowSize.ts +3 -4
  1532. package/src/utils/RenderRecursively.tsx +42 -9
  1533. package/src/utils/__tests__/RenderRecursively.tsx +1 -1
  1534. package/src/utils/alphaNumericSort.ts +6 -11
  1535. package/src/utils/applyRef.ts +1 -2
  1536. package/src/utils/bem.ts +2 -3
  1537. package/src/utils/getClientPosition.ts +4 -4
  1538. package/src/utils/getMiddleOfRange.ts +2 -2
  1539. package/src/utils/getPercentage.ts +3 -4
  1540. package/src/utils/getRangeDefaultValue.ts +2 -2
  1541. package/src/utils/getRangeSteps.ts +3 -4
  1542. package/src/utils/identity.ts +1 -1
  1543. package/src/utils/isElementVisible.ts +3 -4
  1544. package/src/utils/loop.ts +2 -2
  1545. package/src/utils/nearest.ts +3 -4
  1546. package/src/utils/parseCssLengthUnit.ts +2 -4
  1547. package/src/utils/randomInt.ts +2 -2
  1548. package/src/utils/wait.ts +2 -3
  1549. package/src/utils/withinRange.ts +3 -4
  1550. package/src/window-splitter/WindowSplitter.tsx +5 -5
  1551. package/src/window-splitter/useWindowSplitter.ts +6 -7
  1552. package/tsconfig.types.json +1 -1
  1553. package/tsdoc.json +14 -0
  1554. package/.turbo/turbo-typecheck.log +0 -4
  1555. package/dist/index.d.ts +0 -344
  1556. package/dist/index.js +0 -345
  1557. package/dist/index.js.map +0 -1
  1558. package/src/index.ts +0 -347
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/sliderUtils.ts"],"sourcesContent":["import { type RefObject } from \"react\";\nimport {\n type DraggableEventHandlers,\n type DraggableImplementation,\n type DraggableMouseEventHandlers,\n type DraggableTouchEventHandlers,\n} from \"../draggable/useDraggable.js\";\nimport { type RenameKeysWithPrefix } from \"../types.js\";\nimport {\n getClientPosition,\n type ClientPositionEvent,\n} from \"../utils/getClientPosition.js\";\nimport { getPercentage } from \"../utils/getPercentage.js\";\nimport { getRangeSteps } from \"../utils/getRangeSteps.js\";\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\ninterface JumpOptions {\n min: number;\n max: number;\n step: number;\n jump: number | undefined;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\nexport const getJumpValue = (options: JumpOptions): number => {\n const { min, max, step, jump } = options;\n\n const steps = getRangeSteps({ min, max, step });\n const value = jump ?? (steps / 10) * step;\n if (Number.isInteger(step)) {\n return Math.ceil(value);\n }\n\n return value;\n};\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\ntype RequiredThumbProps = Pick<\n DraggableImplementation<HTMLElement>,\n | \"dragging\"\n | keyof DraggableMouseEventHandlers<HTMLElement>\n | keyof DraggableTouchEventHandlers<HTMLElement>\n> & { ref: RefObject<HTMLSpanElement> };\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\nexport type ClosestThumbEventHandlersOptions = RenameKeysWithPrefix<\n RequiredThumbProps,\n \"thumb1\"\n> &\n RenameKeysWithPrefix<RequiredThumbProps, \"thumb2\"> & {\n vertical: boolean;\n isRangeSlider: boolean;\n };\n\n/**\n * NOTE: I do not need the mousemove events for this one to work.\n *\n * @remarks \\@since 6.0.0\n * @internal\n */\nexport const getClosestThumbEventHandlers = (\n options: ClosestThumbEventHandlersOptions\n): DraggableEventHandlers<HTMLElement> => {\n const {\n thumb1Ref,\n thumb1Dragging,\n thumb1OnMouseUp,\n thumb1OnMouseDown,\n thumb1OnTouchStart,\n thumb1OnTouchMove,\n thumb2Ref,\n thumb2Dragging,\n thumb2OnMouseUp,\n thumb2OnMouseDown,\n thumb2OnTouchStart,\n thumb2OnTouchMove,\n isRangeSlider,\n vertical,\n } = options;\n\n if (!isRangeSlider) {\n return {\n onMouseDown: thumb1OnMouseDown,\n onMouseUp: thumb1OnMouseUp,\n onTouchStart: thumb1OnTouchStart,\n onTouchMove: thumb1OnTouchMove,\n };\n }\n\n const isThumbOneClosest = (event: ClientPositionEvent): boolean => {\n if (thumb2Dragging) {\n return false;\n }\n\n const thumb1 = thumb1Ref.current;\n const thumb2 = thumb2Ref.current;\n if (!thumb1Dragging && thumb1 && thumb2) {\n const clientPosition = getClientPosition({ event, vertical });\n const thumb1Rect = thumb1.getBoundingClientRect();\n const thumb2Rect = thumb2.getBoundingClientRect();\n const thumb1Position = vertical ? thumb1Rect.y : thumb1Rect.x;\n const thumb2Position = vertical ? thumb2Rect.y : thumb2Rect.x;\n\n return (\n Math.abs(clientPosition - thumb1Position) <\n Math.abs(clientPosition - thumb2Position)\n );\n }\n\n return true;\n };\n\n return {\n onMouseDown(event) {\n if (isThumbOneClosest(event)) {\n thumb1OnMouseDown(event);\n } else {\n thumb2OnMouseDown(event);\n }\n },\n onMouseUp(event) {\n if (isThumbOneClosest(event)) {\n thumb1OnMouseUp(event);\n } else {\n thumb2OnMouseUp(event);\n }\n },\n onTouchStart(event) {\n if (isThumbOneClosest(event)) {\n thumb1OnTouchStart(event);\n } else {\n thumb2OnTouchStart(event);\n }\n },\n onTouchMove(event) {\n if (isThumbOneClosest(event)) {\n thumb1OnTouchMove(event);\n } else {\n thumb2OnTouchMove(event);\n }\n },\n };\n};\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport function getThumbOffset(\n offset: number | undefined,\n fallback: number\n): string | undefined {\n if (typeof offset !== \"number\") {\n return;\n }\n\n // the `offset` will be NaN when there are no possible steps to take because\n // the first thumb is at the maximum value or the second thumb is at the\n // minimum value\n const value = Number.isNaN(offset) ? fallback : offset;\n return `${value * 100}%`;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\nexport interface ThumbOffsetsOptions {\n min: number;\n max: number;\n thumb1Value: number;\n thumb1Dragging: boolean;\n thumb1DragPercentage: number;\n thumb2Value: number;\n thumb2Dragging: boolean;\n thumb2DragPercentage: number;\n isRangeSlider: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\ninterface ThumbOffsets {\n \"--rmd-slider-offset-1\"?: string;\n \"--rmd-slider-offset-2\"?: string;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\nexport const getThumbOffsets = (options: ThumbOffsetsOptions): ThumbOffsets => {\n const {\n min,\n max,\n thumb1Value,\n thumb1Dragging,\n thumb1DragPercentage,\n thumb2Value,\n thumb2Dragging,\n thumb2DragPercentage,\n isRangeSlider,\n } = options;\n let thumb1Percentage = thumb1Dragging\n ? thumb1DragPercentage\n : getPercentage({ min, max, value: thumb1Value });\n\n let thumb2Percentage: number | undefined;\n if (isRangeSlider) {\n const percentage = getPercentage({ min, max, value: thumb2Value });\n\n thumb1Percentage = Math.min(thumb1Percentage, percentage);\n thumb2Percentage = thumb2Dragging\n ? Math.max(thumb1Percentage, thumb2DragPercentage)\n : percentage;\n }\n\n return {\n \"--rmd-slider-offset-1\": getThumbOffset(thumb1Percentage, 0),\n \"--rmd-slider-offset-2\": getThumbOffset(thumb2Percentage, 1),\n };\n};\n"],"names":["getClientPosition","getPercentage","getRangeSteps","getJumpValue","options","min","max","step","jump","steps","value","Number","isInteger","Math","ceil","getClosestThumbEventHandlers","thumb1Ref","thumb1Dragging","thumb1OnMouseUp","thumb1OnMouseDown","thumb1OnTouchStart","thumb1OnTouchMove","thumb2Ref","thumb2Dragging","thumb2OnMouseUp","thumb2OnMouseDown","thumb2OnTouchStart","thumb2OnTouchMove","isRangeSlider","vertical","onMouseDown","onMouseUp","onTouchStart","onTouchMove","isThumbOneClosest","event","thumb1","current","thumb2","clientPosition","thumb1Rect","getBoundingClientRect","thumb2Rect","thumb1Position","y","x","thumb2Position","abs","getThumbOffset","offset","fallback","isNaN","getThumbOffsets","thumb1Value","thumb1DragPercentage","thumb2Value","thumb2DragPercentage","thumb1Percentage","thumb2Percentage","percentage"],"mappings":"AAQA,SACEA,iBAAiB,QAEZ,gCAAgC;AACvC,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,aAAa,QAAQ,4BAA4B;AAa1D;;;CAGC,GACD,OAAO,MAAMC,eAAe,CAACC;IAC3B,MAAM,EAAEC,GAAG,EAAEC,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAE,GAAGJ;IAEjC,MAAMK,QAAQP,cAAc;QAAEG;QAAKC;QAAKC;IAAK;IAC7C,MAAMG,QAAQF,QAAQ,AAACC,QAAQ,KAAMF;IACrC,IAAII,OAAOC,SAAS,CAACL,OAAO;QAC1B,OAAOM,KAAKC,IAAI,CAACJ;IACnB;IAEA,OAAOA;AACT,EAAE;AA0BF;;;;;CAKC,GACD,OAAO,MAAMK,+BAA+B,CAC1CX;IAEA,MAAM,EACJY,SAAS,EACTC,cAAc,EACdC,eAAe,EACfC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,SAAS,EACTC,cAAc,EACdC,eAAe,EACfC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,aAAa,EACbC,QAAQ,EACT,GAAGzB;IAEJ,IAAI,CAACwB,eAAe;QAClB,OAAO;YACLE,aAAaX;YACbY,WAAWb;YACXc,cAAcZ;YACda,aAAaZ;QACf;IACF;IAEA,MAAMa,oBAAoB,CAACC;QACzB,IAAIZ,gBAAgB;YAClB,OAAO;QACT;QAEA,MAAMa,SAASpB,UAAUqB,OAAO;QAChC,MAAMC,SAAShB,UAAUe,OAAO;QAChC,IAAI,CAACpB,kBAAkBmB,UAAUE,QAAQ;YACvC,MAAMC,iBAAiBvC,kBAAkB;gBAAEmC;gBAAON;YAAS;YAC3D,MAAMW,aAAaJ,OAAOK,qBAAqB;YAC/C,MAAMC,aAAaJ,OAAOG,qBAAqB;YAC/C,MAAME,iBAAiBd,WAAWW,WAAWI,CAAC,GAAGJ,WAAWK,CAAC;YAC7D,MAAMC,iBAAiBjB,WAAWa,WAAWE,CAAC,GAAGF,WAAWG,CAAC;YAE7D,OACEhC,KAAKkC,GAAG,CAACR,iBAAiBI,kBAC1B9B,KAAKkC,GAAG,CAACR,iBAAiBO;QAE9B;QAEA,OAAO;IACT;IAEA,OAAO;QACLhB,aAAYK,KAAK;YACf,IAAID,kBAAkBC,QAAQ;gBAC5BhB,kBAAkBgB;YACpB,OAAO;gBACLV,kBAAkBU;YACpB;QACF;QACAJ,WAAUI,KAAK;YACb,IAAID,kBAAkBC,QAAQ;gBAC5BjB,gBAAgBiB;YAClB,OAAO;gBACLX,gBAAgBW;YAClB;QACF;QACAH,cAAaG,KAAK;YAChB,IAAID,kBAAkBC,QAAQ;gBAC5Bf,mBAAmBe;YACrB,OAAO;gBACLT,mBAAmBS;YACrB;QACF;QACAF,aAAYE,KAAK;YACf,IAAID,kBAAkBC,QAAQ;gBAC5Bd,kBAAkBc;YACpB,OAAO;gBACLR,kBAAkBQ;YACpB;QACF;IACF;AACF,EAAE;AAEF;;;CAGC,GACD,OAAO,SAASa,eACdC,MAA0B,EAC1BC,QAAgB;IAEhB,IAAI,OAAOD,WAAW,UAAU;QAC9B;IACF;IAEA,4EAA4E;IAC5E,wEAAwE;IACxE,gBAAgB;IAChB,MAAMvC,QAAQC,OAAOwC,KAAK,CAACF,UAAUC,WAAWD;IAChD,OAAO,CAAC,EAAEvC,QAAQ,IAAI,CAAC,CAAC;AAC1B;AA2BA;;;CAGC,GACD,OAAO,MAAM0C,kBAAkB,CAAChD;IAC9B,MAAM,EACJC,GAAG,EACHC,GAAG,EACH+C,WAAW,EACXpC,cAAc,EACdqC,oBAAoB,EACpBC,WAAW,EACXhC,cAAc,EACdiC,oBAAoB,EACpB5B,aAAa,EACd,GAAGxB;IACJ,IAAIqD,mBAAmBxC,iBACnBqC,uBACArD,cAAc;QAAEI;QAAKC;QAAKI,OAAO2C;IAAY;IAEjD,IAAIK;IACJ,IAAI9B,eAAe;QACjB,MAAM+B,aAAa1D,cAAc;YAAEI;YAAKC;YAAKI,OAAO6C;QAAY;QAEhEE,mBAAmB5C,KAAKR,GAAG,CAACoD,kBAAkBE;QAC9CD,mBAAmBnC,iBACfV,KAAKP,GAAG,CAACmD,kBAAkBD,wBAC3BG;IACN;IAEA,OAAO;QACL,yBAAyBX,eAAeS,kBAAkB;QAC1D,yBAAyBT,eAAeU,kBAAkB;IAC5D;AACF,EAAE"}
1
+ {"version":3,"sources":["../../src/form/sliderUtils.ts"],"sourcesContent":["import { type RefObject } from \"react\";\nimport {\n type DraggableEventHandlers,\n type DraggableImplementation,\n type DraggableMouseEventHandlers,\n type DraggableTouchEventHandlers,\n} from \"../draggable/useDraggable.js\";\nimport { type RenameKeysWithPrefix } from \"../types.js\";\nimport {\n getClientPosition,\n type ClientPositionEvent,\n} from \"../utils/getClientPosition.js\";\nimport { getPercentage } from \"../utils/getPercentage.js\";\nimport { getRangeSteps } from \"../utils/getRangeSteps.js\";\n\n/**\n * @since 6.0.0\n * @internal\n */\ninterface JumpOptions {\n min: number;\n max: number;\n step: number;\n jump: number | undefined;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport const getJumpValue = (options: JumpOptions): number => {\n const { min, max, step, jump } = options;\n\n const steps = getRangeSteps({ min, max, step });\n const value = jump ?? (steps / 10) * step;\n if (Number.isInteger(step)) {\n return Math.ceil(value);\n }\n\n return value;\n};\n\n/**\n * @since 6.0.0\n * @internal\n */\ntype RequiredThumbProps = Pick<\n DraggableImplementation<HTMLElement>,\n | \"dragging\"\n | keyof DraggableMouseEventHandlers<HTMLElement>\n | keyof DraggableTouchEventHandlers<HTMLElement>\n> & { ref: RefObject<HTMLSpanElement> };\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport type ClosestThumbEventHandlersOptions = RenameKeysWithPrefix<\n RequiredThumbProps,\n \"thumb1\"\n> &\n RenameKeysWithPrefix<RequiredThumbProps, \"thumb2\"> & {\n vertical: boolean;\n isRangeSlider: boolean;\n };\n\n/**\n * NOTE: I do not need the mousemove events for this one to work.\n *\n * @since 6.0.0\n * @internal\n */\nexport const getClosestThumbEventHandlers = (\n options: ClosestThumbEventHandlersOptions\n): DraggableEventHandlers<HTMLElement> => {\n const {\n thumb1Ref,\n thumb1Dragging,\n thumb1OnMouseUp,\n thumb1OnMouseDown,\n thumb1OnTouchStart,\n thumb1OnTouchMove,\n thumb2Ref,\n thumb2Dragging,\n thumb2OnMouseUp,\n thumb2OnMouseDown,\n thumb2OnTouchStart,\n thumb2OnTouchMove,\n isRangeSlider,\n vertical,\n } = options;\n\n if (!isRangeSlider) {\n return {\n onMouseDown: thumb1OnMouseDown,\n onMouseUp: thumb1OnMouseUp,\n onTouchStart: thumb1OnTouchStart,\n onTouchMove: thumb1OnTouchMove,\n };\n }\n\n const isThumbOneClosest = (event: ClientPositionEvent): boolean => {\n if (thumb2Dragging) {\n return false;\n }\n\n const thumb1 = thumb1Ref.current;\n const thumb2 = thumb2Ref.current;\n if (!thumb1Dragging && thumb1 && thumb2) {\n const clientPosition = getClientPosition({ event, vertical });\n const thumb1Rect = thumb1.getBoundingClientRect();\n const thumb2Rect = thumb2.getBoundingClientRect();\n const thumb1Position = vertical ? thumb1Rect.y : thumb1Rect.x;\n const thumb2Position = vertical ? thumb2Rect.y : thumb2Rect.x;\n\n return (\n Math.abs(clientPosition - thumb1Position) <\n Math.abs(clientPosition - thumb2Position)\n );\n }\n\n return true;\n };\n\n return {\n onMouseDown(event) {\n if (isThumbOneClosest(event)) {\n thumb1OnMouseDown(event);\n } else {\n thumb2OnMouseDown(event);\n }\n },\n onMouseUp(event) {\n if (isThumbOneClosest(event)) {\n thumb1OnMouseUp(event);\n } else {\n thumb2OnMouseUp(event);\n }\n },\n onTouchStart(event) {\n if (isThumbOneClosest(event)) {\n thumb1OnTouchStart(event);\n } else {\n thumb2OnTouchStart(event);\n }\n },\n onTouchMove(event) {\n if (isThumbOneClosest(event)) {\n thumb1OnTouchMove(event);\n } else {\n thumb2OnTouchMove(event);\n }\n },\n };\n};\n\n/**\n * @internal\n * @since 6.0.0\n */\nexport function getThumbOffset(\n offset: number | undefined,\n fallback: number\n): string | undefined {\n if (typeof offset !== \"number\") {\n return;\n }\n\n // the `offset` will be NaN when there are no possible steps to take because\n // the first thumb is at the maximum value or the second thumb is at the\n // minimum value\n const value = Number.isNaN(offset) ? fallback : offset;\n return `${value * 100}%`;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport interface ThumbOffsetsOptions {\n min: number;\n max: number;\n thumb1Value: number;\n thumb1Dragging: boolean;\n thumb1DragPercentage: number;\n thumb2Value: number;\n thumb2Dragging: boolean;\n thumb2DragPercentage: number;\n isRangeSlider: boolean;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\ninterface ThumbOffsets {\n \"--rmd-slider-offset-1\"?: string;\n \"--rmd-slider-offset-2\"?: string;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport const getThumbOffsets = (options: ThumbOffsetsOptions): ThumbOffsets => {\n const {\n min,\n max,\n thumb1Value,\n thumb1Dragging,\n thumb1DragPercentage,\n thumb2Value,\n thumb2Dragging,\n thumb2DragPercentage,\n isRangeSlider,\n } = options;\n let thumb1Percentage = thumb1Dragging\n ? thumb1DragPercentage\n : getPercentage({ min, max, value: thumb1Value });\n\n let thumb2Percentage: number | undefined;\n if (isRangeSlider) {\n const percentage = getPercentage({ min, max, value: thumb2Value });\n\n thumb1Percentage = Math.min(thumb1Percentage, percentage);\n thumb2Percentage = thumb2Dragging\n ? Math.max(thumb1Percentage, thumb2DragPercentage)\n : percentage;\n }\n\n return {\n \"--rmd-slider-offset-1\": getThumbOffset(thumb1Percentage, 0),\n \"--rmd-slider-offset-2\": getThumbOffset(thumb2Percentage, 1),\n };\n};\n"],"names":["getClientPosition","getPercentage","getRangeSteps","getJumpValue","options","min","max","step","jump","steps","value","Number","isInteger","Math","ceil","getClosestThumbEventHandlers","thumb1Ref","thumb1Dragging","thumb1OnMouseUp","thumb1OnMouseDown","thumb1OnTouchStart","thumb1OnTouchMove","thumb2Ref","thumb2Dragging","thumb2OnMouseUp","thumb2OnMouseDown","thumb2OnTouchStart","thumb2OnTouchMove","isRangeSlider","vertical","onMouseDown","onMouseUp","onTouchStart","onTouchMove","isThumbOneClosest","event","thumb1","current","thumb2","clientPosition","thumb1Rect","getBoundingClientRect","thumb2Rect","thumb1Position","y","x","thumb2Position","abs","getThumbOffset","offset","fallback","isNaN","getThumbOffsets","thumb1Value","thumb1DragPercentage","thumb2Value","thumb2DragPercentage","thumb1Percentage","thumb2Percentage","percentage"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAQA,SACEA,iBAAiB,QAEZ,gCAAgC;AACvC,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,aAAa,QAAQ,4BAA4B;AAa1D;;;CAGC,GACD,OAAO,MAAMC,eAAe,CAACC;IAC3B,MAAM,EAAEC,GAAG,EAAEC,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAE,GAAGJ;IAEjC,MAAMK,QAAQP,cAAc;QAAEG;QAAKC;QAAKC;IAAK;IAC7C,MAAMG,QAAQF,QAAQ,AAACC,QAAQ,KAAMF;IACrC,IAAII,OAAOC,SAAS,CAACL,OAAO;QAC1B,OAAOM,KAAKC,IAAI,CAACJ;IACnB;IAEA,OAAOA;AACT,EAAE;AA0BF;;;;;CAKC,GACD,OAAO,MAAMK,+BAA+B,CAC1CX;IAEA,MAAM,EACJY,SAAS,EACTC,cAAc,EACdC,eAAe,EACfC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,SAAS,EACTC,cAAc,EACdC,eAAe,EACfC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,aAAa,EACbC,QAAQ,EACT,GAAGzB;IAEJ,IAAI,CAACwB,eAAe;QAClB,OAAO;YACLE,aAAaX;YACbY,WAAWb;YACXc,cAAcZ;YACda,aAAaZ;QACf;IACF;IAEA,MAAMa,oBAAoB,CAACC;QACzB,IAAIZ,gBAAgB;YAClB,OAAO;QACT;QAEA,MAAMa,SAASpB,UAAUqB,OAAO;QAChC,MAAMC,SAAShB,UAAUe,OAAO;QAChC,IAAI,CAACpB,kBAAkBmB,UAAUE,QAAQ;YACvC,MAAMC,iBAAiBvC,kBAAkB;gBAAEmC;gBAAON;YAAS;YAC3D,MAAMW,aAAaJ,OAAOK,qBAAqB;YAC/C,MAAMC,aAAaJ,OAAOG,qBAAqB;YAC/C,MAAME,iBAAiBd,WAAWW,WAAWI,CAAC,GAAGJ,WAAWK,CAAC;YAC7D,MAAMC,iBAAiBjB,WAAWa,WAAWE,CAAC,GAAGF,WAAWG,CAAC;YAE7D,OACEhC,KAAKkC,GAAG,CAACR,iBAAiBI,kBAC1B9B,KAAKkC,GAAG,CAACR,iBAAiBO;QAE9B;QAEA,OAAO;IACT;IAEA,OAAO;QACLhB,aAAYK,KAAK;YACf,IAAID,kBAAkBC,QAAQ;gBAC5BhB,kBAAkBgB;YACpB,OAAO;gBACLV,kBAAkBU;YACpB;QACF;QACAJ,WAAUI,KAAK;YACb,IAAID,kBAAkBC,QAAQ;gBAC5BjB,gBAAgBiB;YAClB,OAAO;gBACLX,gBAAgBW;YAClB;QACF;QACAH,cAAaG,KAAK;YAChB,IAAID,kBAAkBC,QAAQ;gBAC5Bf,mBAAmBe;YACrB,OAAO;gBACLT,mBAAmBS;YACrB;QACF;QACAF,aAAYE,KAAK;YACf,IAAID,kBAAkBC,QAAQ;gBAC5Bd,kBAAkBc;YACpB,OAAO;gBACLR,kBAAkBQ;YACpB;QACF;IACF;AACF,EAAE;AAEF;;;CAGC,GACD,OAAO,SAASa,eACdC,MAA0B,EAC1BC,QAAgB;IAEhB,IAAI,OAAOD,WAAW,UAAU;QAC9B;IACF;IAEA,4EAA4E;IAC5E,wEAAwE;IACxE,gBAAgB;IAChB,MAAMvC,QAAQC,OAAOwC,KAAK,CAACF,UAAUC,WAAWD;IAChD,OAAO,CAAC,EAAEvC,QAAQ,IAAI,CAAC,CAAC;AAC1B;AA2BA;;;CAGC,GACD,OAAO,MAAM0C,kBAAkB,CAAChD;IAC9B,MAAM,EACJC,GAAG,EACHC,GAAG,EACH+C,WAAW,EACXpC,cAAc,EACdqC,oBAAoB,EACpBC,WAAW,EACXhC,cAAc,EACdiC,oBAAoB,EACpB5B,aAAa,EACd,GAAGxB;IACJ,IAAIqD,mBAAmBxC,iBACnBqC,uBACArD,cAAc;QAAEI;QAAKC;QAAKI,OAAO2C;IAAY;IAEjD,IAAIK;IACJ,IAAI9B,eAAe;QACjB,MAAM+B,aAAa1D,cAAc;YAAEI;YAAKC;YAAKI,OAAO6C;QAAY;QAEhEE,mBAAmB5C,KAAKR,GAAG,CAACoD,kBAAkBE;QAC9CD,mBAAmBnC,iBACfV,KAAKP,GAAG,CAACmD,kBAAkBD,wBAC3BG;IACN;IAEA,OAAO;QACL,yBAAyBX,eAAeS,kBAAkB;QAC1D,yBAAyBT,eAAeU,kBAAkB;IAC5D;AACF,EAAE"}
@@ -5,7 +5,7 @@ declare module "react" {
5
5
  }
6
6
  }
7
7
  /**
8
- * @remarks \@since 6.0.0
8
+ * @since 6.0.0
9
9
  */
10
10
  export interface SwitchClassNameOptions {
11
11
  className?: string;
@@ -13,6 +13,6 @@ export interface SwitchClassNameOptions {
13
13
  currentColor?: boolean;
14
14
  }
15
15
  /**
16
- * @remarks \@since 6.0.0
16
+ * @since 6.0.0
17
17
  */
18
18
  export declare function switchStyles(options?: SwitchClassNameOptions): string;
@@ -2,7 +2,7 @@ import { cnb } from "cnbuilder";
2
2
  import { bem } from "../utils/bem.js";
3
3
  const styles = bem("rmd-switch");
4
4
  /**
5
- * @remarks \@since 6.0.0
5
+ * @since 6.0.0
6
6
  */ export function switchStyles(options = {}) {
7
7
  const { className, clickable, currentColor } = options;
8
8
  return cnb(styles({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/switchStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-switch-track-background-color\"?: string;\n \"--rmd-switch-ball-background-color\"?: string;\n }\n}\n\nconst styles = bem(\"rmd-switch\");\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface SwitchClassNameOptions {\n className?: string;\n clickable?: boolean;\n currentColor?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function switchStyles(options: SwitchClassNameOptions = {}): string {\n const { className, clickable, currentColor } = options;\n\n return cnb(styles({ \"current-color\": currentColor, clickable }), className);\n}\n"],"names":["cnb","bem","styles","switchStyles","options","className","clickable","currentColor"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAStC,MAAMC,SAASD,IAAI;AAWnB;;CAEC,GACD,OAAO,SAASE,aAAaC,UAAkC,CAAC,CAAC;IAC/D,MAAM,EAAEC,SAAS,EAAEC,SAAS,EAAEC,YAAY,EAAE,GAAGH;IAE/C,OAAOJ,IAAIE,OAAO;QAAE,iBAAiBK;QAAcD;IAAU,IAAID;AACnE"}
1
+ {"version":3,"sources":["../../src/form/switchStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-switch-track-background-color\"?: string;\n \"--rmd-switch-ball-background-color\"?: string;\n }\n}\n\nconst styles = bem(\"rmd-switch\");\n\n/**\n * @since 6.0.0\n */\nexport interface SwitchClassNameOptions {\n className?: string;\n clickable?: boolean;\n currentColor?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function switchStyles(options: SwitchClassNameOptions = {}): string {\n const { className, clickable, currentColor } = options;\n\n return cnb(styles({ \"current-color\": currentColor, clickable }), className);\n}\n"],"names":["cnb","bem","styles","switchStyles","options","className","clickable","currentColor"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAStC,MAAMC,SAASD,IAAI;AAWnB;;CAEC,GACD,OAAO,SAASE,aAAaC,UAAkC,CAAC,CAAC;IAC/D,MAAM,EAAEC,SAAS,EAAEC,SAAS,EAAEC,YAAY,EAAE,GAAGH;IAE/C,OAAOJ,IAAIE,OAAO;QAAE,iBAAiBK;QAAcD;IAAU,IAAID;AACnE"}
@@ -7,7 +7,7 @@ declare module "react" {
7
7
  }
8
8
  }
9
9
  /**
10
- * @remarks \@since 6.0.0
10
+ * @since 6.0.0
11
11
  */
12
12
  export interface TextareaClassNameOptions extends TextFieldClassNameOptions {
13
13
  className?: string;
@@ -31,11 +31,11 @@ export interface TextareaClassNameOptions extends TextFieldClassNameOptions {
31
31
  scrollable?: boolean;
32
32
  }
33
33
  /**
34
- * @remarks \@since 6.0.0
34
+ * @since 6.0.0
35
35
  */
36
36
  export declare function textArea(options?: TextareaClassNameOptions): string;
37
37
  /**
38
- * @remarks \@since 6.0.0
38
+ * @since 6.0.0
39
39
  */
40
40
  export interface TextareaContainerClassNameOptions {
41
41
  className?: string;
@@ -45,6 +45,6 @@ export interface TextareaContainerClassNameOptions {
45
45
  underlineLabelled?: boolean;
46
46
  }
47
47
  /**
48
- * @remarks \@since 6.0.0
48
+ * @since 6.0.0
49
49
  */
50
50
  export declare function textAreaContainer(options?: TextareaContainerClassNameOptions): string;
@@ -4,7 +4,7 @@ import { textField } from "./textFieldStyles.js";
4
4
  const styles = bem("rmd-textarea");
5
5
  const containerStyles = bem("rmd-textarea-container");
6
6
  /**
7
- * @remarks \@since 6.0.0
7
+ * @since 6.0.0
8
8
  */ export function textArea(options = {}) {
9
9
  const { className, mask, resize = "auto", scrollable, placeholderHidden } = options;
10
10
  return cnb(textField({
@@ -18,7 +18,7 @@ const containerStyles = bem("rmd-textarea-container");
18
18
  }), className);
19
19
  }
20
20
  /**
21
- * @remarks \@since 6.0.0
21
+ * @since 6.0.0
22
22
  */ export function textAreaContainer(options = {}) {
23
23
  const { className, height, animate, disabled, underlineLabelled } = options;
24
24
  return cnb(containerStyles({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/textAreaStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\nimport {\n textField,\n type TextFieldClassNameOptions,\n} from \"./textFieldStyles.js\";\nimport { type TextAreaResize } from \"./useResizingTextArea.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-textarea-height\"?: string | number;\n \"--rmd-textarea-padding\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-textarea\");\nconst containerStyles = bem(\"rmd-textarea-container\");\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface TextareaClassNameOptions extends TextFieldClassNameOptions {\n className?: string;\n\n /**\n * This should not be used externally and is only used for creating the hidden\n * textarea mask for the auto resizing behavior.\n *\n * @defaultValue `false`\n */\n mask?: boolean;\n\n /**\n * @see {@link TextAreaResize}\n * @defaultValue `\"auto\"`\n */\n resize?: TextAreaResize;\n\n /**\n * Set this to `true` if the textarea should display a scrollbar.\n *\n * @defaultValue `false`\n */\n scrollable?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function textArea(options: TextareaClassNameOptions = {}): string {\n const {\n className,\n mask,\n resize = \"auto\",\n scrollable,\n placeholderHidden,\n } = options;\n\n return cnb(\n textField({ placeholderHidden }),\n styles({\n rh: resize === \"horizontal\",\n rv: resize === \"vertical\",\n rn: resize === \"auto\" || resize === \"none\",\n mask,\n scrollable: scrollable || resize === \"none\",\n }),\n className\n );\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface TextareaContainerClassNameOptions {\n className?: string;\n height?: boolean;\n disabled?: boolean;\n animate?: boolean;\n underlineLabelled?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function textAreaContainer(\n options: TextareaContainerClassNameOptions = {}\n): string {\n const { className, height, animate, disabled, underlineLabelled } = options;\n\n return cnb(\n containerStyles({\n height,\n animate,\n cursor: !disabled,\n \"underline-labelled\": underlineLabelled,\n }),\n className\n );\n}\n"],"names":["cnb","bem","textField","styles","containerStyles","textArea","options","className","mask","resize","scrollable","placeholderHidden","rh","rv","rn","textAreaContainer","height","animate","disabled","underlineLabelled","cursor"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SACEC,SAAS,QAEJ,uBAAuB;AAU9B,MAAMC,SAASF,IAAI;AACnB,MAAMG,kBAAkBH,IAAI;AA8B5B;;CAEC,GACD,OAAO,SAASI,SAASC,UAAoC,CAAC,CAAC;IAC7D,MAAM,EACJC,SAAS,EACTC,IAAI,EACJC,SAAS,MAAM,EACfC,UAAU,EACVC,iBAAiB,EAClB,GAAGL;IAEJ,OAAON,IACLE,UAAU;QAAES;IAAkB,IAC9BR,OAAO;QACLS,IAAIH,WAAW;QACfI,IAAIJ,WAAW;QACfK,IAAIL,WAAW,UAAUA,WAAW;QACpCD;QACAE,YAAYA,cAAcD,WAAW;IACvC,IACAF;AAEJ;AAaA;;CAEC,GACD,OAAO,SAASQ,kBACdT,UAA6C,CAAC,CAAC;IAE/C,MAAM,EAAEC,SAAS,EAAES,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,iBAAiB,EAAE,GAAGb;IAEpE,OAAON,IACLI,gBAAgB;QACdY;QACAC;QACAG,QAAQ,CAACF;QACT,sBAAsBC;IACxB,IACAZ;AAEJ"}
1
+ {"version":3,"sources":["../../src/form/textAreaStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\nimport {\n textField,\n type TextFieldClassNameOptions,\n} from \"./textFieldStyles.js\";\nimport { type TextAreaResize } from \"./useResizingTextArea.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-textarea-height\"?: string | number;\n \"--rmd-textarea-padding\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-textarea\");\nconst containerStyles = bem(\"rmd-textarea-container\");\n\n/**\n * @since 6.0.0\n */\nexport interface TextareaClassNameOptions extends TextFieldClassNameOptions {\n className?: string;\n\n /**\n * This should not be used externally and is only used for creating the hidden\n * textarea mask for the auto resizing behavior.\n *\n * @defaultValue `false`\n */\n mask?: boolean;\n\n /**\n * @see {@link TextAreaResize}\n * @defaultValue `\"auto\"`\n */\n resize?: TextAreaResize;\n\n /**\n * Set this to `true` if the textarea should display a scrollbar.\n *\n * @defaultValue `false`\n */\n scrollable?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function textArea(options: TextareaClassNameOptions = {}): string {\n const {\n className,\n mask,\n resize = \"auto\",\n scrollable,\n placeholderHidden,\n } = options;\n\n return cnb(\n textField({ placeholderHidden }),\n styles({\n rh: resize === \"horizontal\",\n rv: resize === \"vertical\",\n rn: resize === \"auto\" || resize === \"none\",\n mask,\n scrollable: scrollable || resize === \"none\",\n }),\n className\n );\n}\n\n/**\n * @since 6.0.0\n */\nexport interface TextareaContainerClassNameOptions {\n className?: string;\n height?: boolean;\n disabled?: boolean;\n animate?: boolean;\n underlineLabelled?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function textAreaContainer(\n options: TextareaContainerClassNameOptions = {}\n): string {\n const { className, height, animate, disabled, underlineLabelled } = options;\n\n return cnb(\n containerStyles({\n height,\n animate,\n cursor: !disabled,\n \"underline-labelled\": underlineLabelled,\n }),\n className\n );\n}\n"],"names":["cnb","bem","textField","styles","containerStyles","textArea","options","className","mask","resize","scrollable","placeholderHidden","rh","rv","rn","textAreaContainer","height","animate","disabled","underlineLabelled","cursor"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SACEC,SAAS,QAEJ,uBAAuB;AAU9B,MAAMC,SAASF,IAAI;AACnB,MAAMG,kBAAkBH,IAAI;AA8B5B;;CAEC,GACD,OAAO,SAASI,SAASC,UAAoC,CAAC,CAAC;IAC7D,MAAM,EACJC,SAAS,EACTC,IAAI,EACJC,SAAS,MAAM,EACfC,UAAU,EACVC,iBAAiB,EAClB,GAAGL;IAEJ,OAAON,IACLE,UAAU;QAAES;IAAkB,IAC9BR,OAAO;QACLS,IAAIH,WAAW;QACfI,IAAIJ,WAAW;QACfK,IAAIL,WAAW,UAAUA,WAAW;QACpCD;QACAE,YAAYA,cAAcD,WAAW;IACvC,IACAF;AAEJ;AAaA;;CAEC,GACD,OAAO,SAASQ,kBACdT,UAA6C,CAAC,CAAC;IAE/C,MAAM,EAAEC,SAAS,EAAES,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,iBAAiB,EAAE,GAAGb;IAEpE,OAAON,IACLI,gBAAgB;QACdY;QACAC;QACAG,QAAQ,CAACF;QACT,sBAAsBC;IACxB,IACAZ;AAEJ"}
@@ -12,7 +12,7 @@ declare module "react" {
12
12
  "--rmd-form-addon-margin-top"?: string | number;
13
13
  }
14
14
  }
15
- /** @remarks \@since 6.0.0 */
15
+ /** @since 6.0.0 */
16
16
  export interface TextFieldContainerClassNameOptions extends FormThemeOptions, FormComponentStates {
17
17
  className?: string;
18
18
  /** @defaultValue `false` */
@@ -29,6 +29,6 @@ export interface TextFieldContainerClassNameOptions extends FormThemeOptions, Fo
29
29
  rightAddon?: boolean;
30
30
  }
31
31
  /**
32
- * @remarks \@since 6.0.0
32
+ * @since 6.0.0
33
33
  */
34
34
  export declare function textFieldContainer(options?: TextFieldContainerClassNameOptions): string;
@@ -3,7 +3,7 @@ import { cssUtils } from "../cssUtils.js";
3
3
  import { bem } from "../utils/bem.js";
4
4
  const styles = bem("rmd-text-field-container");
5
5
  /**
6
- * @remarks \@since 6.0.0
6
+ * @since 6.0.0
7
7
  */ export function textFieldContainer(options = {}) {
8
8
  const { className, theme = "outline", dense = false, error = false, label = false, active = false, inline = false, stretch = false, readOnly = false, disabled = false, leftAddon = false, rightAddon = false, underlineDirection = "left" } = options;
9
9
  const underline = theme === "underline";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/textFieldContainerStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils, type TextColor, type ThemeColor } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { type FormComponentStates, type FormThemeOptions } from \"./types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-text-field-height\"?: string | number;\n \"--rmd-text-field-padding-left\"?: string | number;\n \"--rmd-text-field-padding-right\"?: string | number;\n \"--rmd-text-field-padding-top\"?: string | number;\n \"--rmd-text-field-border-color\"?: string;\n \"--rmd-text-field-hover-border-color\"?: string;\n \"--rmd-text-field-filled-color\"?: string;\n \"--rmd-form-addon-top\"?: string | number;\n \"--rmd-form-addon-margin-top\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-text-field-container\");\n\n/** @remarks \\@since 6.0.0 */\nexport interface TextFieldContainerClassNameOptions\n extends FormThemeOptions,\n FormComponentStates {\n className?: string;\n\n /** @defaultValue `false` */\n dense?: boolean;\n\n /** @defaultValue `false` */\n inline?: boolean;\n\n /** @defaultValue `false` */\n stretch?: boolean;\n\n /** @defaultValue `false` */\n label?: boolean;\n\n /** @defaultValue `false` */\n leftAddon?: boolean;\n\n /** @defaultValue `false` */\n rightAddon?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function textFieldContainer(\n options: TextFieldContainerClassNameOptions = {}\n): string {\n const {\n className,\n theme = \"outline\",\n dense = false,\n error = false,\n label = false,\n active = false,\n inline = false,\n stretch = false,\n readOnly = false,\n disabled = false,\n leftAddon = false,\n rightAddon = false,\n underlineDirection = \"left\",\n } = options;\n const underline = theme === \"underline\";\n const outline = theme === \"outline\";\n const filled = theme === \"filled\";\n const isUnderlined = underline || filled;\n const isOutlineActive = outline && active;\n\n let textColor: ThemeColor | TextColor | undefined;\n if (disabled) {\n textColor = \"text-disabled\";\n } else if (error) {\n textColor = \"error\";\n }\n\n return cnb(\n styles({\n error,\n inline,\n stretch,\n filled,\n outline,\n disabled: disabled || readOnly,\n hoverable: !disabled && !isOutlineActive,\n label: label && !dense,\n dense: !label && dense,\n \"dense-label\": label && dense,\n \"dense-placeholder\": !label && dense && isUnderlined,\n \"outline-active\": isOutlineActive,\n \"outline-error\": outline && error,\n \"outline-left\": outline && leftAddon,\n \"outline-right\": outline && rightAddon,\n underline: isUnderlined,\n \"underline-placeholder\": isUnderlined && !label,\n \"underline-placeholder-only\":\n isUnderlined && !label && !leftAddon && !rightAddon,\n \"underline-labelled\": isUnderlined && label,\n \"underline-active\": isUnderlined && active,\n [`underline-${underlineDirection}`]: isUnderlined,\n \"underline-left-addon\": isUnderlined && leftAddon,\n \"underline-right-addon\": isUnderlined && rightAddon,\n }),\n cssUtils({ textColor }),\n className\n );\n}\n"],"names":["cnb","cssUtils","bem","styles","textFieldContainer","options","className","theme","dense","error","label","active","inline","stretch","readOnly","disabled","leftAddon","rightAddon","underlineDirection","underline","outline","filled","isUnderlined","isOutlineActive","textColor","hoverable"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,QAAQ,QAAyC,iBAAiB;AAC3E,SAASC,GAAG,QAAQ,kBAAkB;AAiBtC,MAAMC,SAASD,IAAI;AA2BnB;;CAEC,GACD,OAAO,SAASE,mBACdC,UAA8C,CAAC,CAAC;IAEhD,MAAM,EACJC,SAAS,EACTC,QAAQ,SAAS,EACjBC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,YAAY,KAAK,EACjBC,aAAa,KAAK,EAClBC,qBAAqB,MAAM,EAC5B,GAAGb;IACJ,MAAMc,YAAYZ,UAAU;IAC5B,MAAMa,UAAUb,UAAU;IAC1B,MAAMc,SAASd,UAAU;IACzB,MAAMe,eAAeH,aAAaE;IAClC,MAAME,kBAAkBH,WAAWT;IAEnC,IAAIa;IACJ,IAAIT,UAAU;QACZS,YAAY;IACd,OAAO,IAAIf,OAAO;QAChBe,YAAY;IACd;IAEA,OAAOxB,IACLG,OAAO;QACLM;QACAG;QACAC;QACAQ;QACAD;QACAL,UAAUA,YAAYD;QACtBW,WAAW,CAACV,YAAY,CAACQ;QACzBb,OAAOA,SAAS,CAACF;QACjBA,OAAO,CAACE,SAASF;QACjB,eAAeE,SAASF;QACxB,qBAAqB,CAACE,SAASF,SAASc;QACxC,kBAAkBC;QAClB,iBAAiBH,WAAWX;QAC5B,gBAAgBW,WAAWJ;QAC3B,iBAAiBI,WAAWH;QAC5BE,WAAWG;QACX,yBAAyBA,gBAAgB,CAACZ;QAC1C,8BACEY,gBAAgB,CAACZ,SAAS,CAACM,aAAa,CAACC;QAC3C,sBAAsBK,gBAAgBZ;QACtC,oBAAoBY,gBAAgBX;QACpC,CAAC,CAAC,UAAU,EAAEO,mBAAmB,CAAC,CAAC,EAAEI;QACrC,wBAAwBA,gBAAgBN;QACxC,yBAAyBM,gBAAgBL;IAC3C,IACAhB,SAAS;QAAEuB;IAAU,IACrBlB;AAEJ"}
1
+ {"version":3,"sources":["../../src/form/textFieldContainerStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils, type TextColor, type ThemeColor } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { type FormComponentStates, type FormThemeOptions } from \"./types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-text-field-height\"?: string | number;\n \"--rmd-text-field-padding-left\"?: string | number;\n \"--rmd-text-field-padding-right\"?: string | number;\n \"--rmd-text-field-padding-top\"?: string | number;\n \"--rmd-text-field-border-color\"?: string;\n \"--rmd-text-field-hover-border-color\"?: string;\n \"--rmd-text-field-filled-color\"?: string;\n \"--rmd-form-addon-top\"?: string | number;\n \"--rmd-form-addon-margin-top\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-text-field-container\");\n\n/** @since 6.0.0 */\nexport interface TextFieldContainerClassNameOptions\n extends FormThemeOptions,\n FormComponentStates {\n className?: string;\n\n /** @defaultValue `false` */\n dense?: boolean;\n\n /** @defaultValue `false` */\n inline?: boolean;\n\n /** @defaultValue `false` */\n stretch?: boolean;\n\n /** @defaultValue `false` */\n label?: boolean;\n\n /** @defaultValue `false` */\n leftAddon?: boolean;\n\n /** @defaultValue `false` */\n rightAddon?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function textFieldContainer(\n options: TextFieldContainerClassNameOptions = {}\n): string {\n const {\n className,\n theme = \"outline\",\n dense = false,\n error = false,\n label = false,\n active = false,\n inline = false,\n stretch = false,\n readOnly = false,\n disabled = false,\n leftAddon = false,\n rightAddon = false,\n underlineDirection = \"left\",\n } = options;\n const underline = theme === \"underline\";\n const outline = theme === \"outline\";\n const filled = theme === \"filled\";\n const isUnderlined = underline || filled;\n const isOutlineActive = outline && active;\n\n let textColor: ThemeColor | TextColor | undefined;\n if (disabled) {\n textColor = \"text-disabled\";\n } else if (error) {\n textColor = \"error\";\n }\n\n return cnb(\n styles({\n error,\n inline,\n stretch,\n filled,\n outline,\n disabled: disabled || readOnly,\n hoverable: !disabled && !isOutlineActive,\n label: label && !dense,\n dense: !label && dense,\n \"dense-label\": label && dense,\n \"dense-placeholder\": !label && dense && isUnderlined,\n \"outline-active\": isOutlineActive,\n \"outline-error\": outline && error,\n \"outline-left\": outline && leftAddon,\n \"outline-right\": outline && rightAddon,\n underline: isUnderlined,\n \"underline-placeholder\": isUnderlined && !label,\n \"underline-placeholder-only\":\n isUnderlined && !label && !leftAddon && !rightAddon,\n \"underline-labelled\": isUnderlined && label,\n \"underline-active\": isUnderlined && active,\n [`underline-${underlineDirection}`]: isUnderlined,\n \"underline-left-addon\": isUnderlined && leftAddon,\n \"underline-right-addon\": isUnderlined && rightAddon,\n }),\n cssUtils({ textColor }),\n className\n );\n}\n"],"names":["cnb","cssUtils","bem","styles","textFieldContainer","options","className","theme","dense","error","label","active","inline","stretch","readOnly","disabled","leftAddon","rightAddon","underlineDirection","underline","outline","filled","isUnderlined","isOutlineActive","textColor","hoverable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,QAAQ,QAAyC,iBAAiB;AAC3E,SAASC,GAAG,QAAQ,kBAAkB;AAiBtC,MAAMC,SAASD,IAAI;AA2BnB;;CAEC,GACD,OAAO,SAASE,mBACdC,UAA8C,CAAC,CAAC;IAEhD,MAAM,EACJC,SAAS,EACTC,QAAQ,SAAS,EACjBC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,YAAY,KAAK,EACjBC,aAAa,KAAK,EAClBC,qBAAqB,MAAM,EAC5B,GAAGb;IACJ,MAAMc,YAAYZ,UAAU;IAC5B,MAAMa,UAAUb,UAAU;IAC1B,MAAMc,SAASd,UAAU;IACzB,MAAMe,eAAeH,aAAaE;IAClC,MAAME,kBAAkBH,WAAWT;IAEnC,IAAIa;IACJ,IAAIT,UAAU;QACZS,YAAY;IACd,OAAO,IAAIf,OAAO;QAChBe,YAAY;IACd;IAEA,OAAOxB,IACLG,OAAO;QACLM;QACAG;QACAC;QACAQ;QACAD;QACAL,UAAUA,YAAYD;QACtBW,WAAW,CAACV,YAAY,CAACQ;QACzBb,OAAOA,SAAS,CAACF;QACjBA,OAAO,CAACE,SAASF;QACjB,eAAeE,SAASF;QACxB,qBAAqB,CAACE,SAASF,SAASc;QACxC,kBAAkBC;QAClB,iBAAiBH,WAAWX;QAC5B,gBAAgBW,WAAWJ;QAC3B,iBAAiBI,WAAWH;QAC5BE,WAAWG;QACX,yBAAyBA,gBAAgB,CAACZ;QAC1C,8BACEY,gBAAgB,CAACZ,SAAS,CAACM,aAAa,CAACC;QAC3C,sBAAsBK,gBAAgBZ;QACtC,oBAAoBY,gBAAgBX;QACpC,CAAC,CAAC,UAAU,EAAEO,mBAAmB,CAAC,CAAC,EAAEI;QACrC,wBAAwBA,gBAAgBN;QACxC,yBAAyBM,gBAAgBL;IAC3C,IACAhB,SAAS;QAAEuB;IAAU,IACrBlB;AAEJ"}
@@ -1,4 +1,4 @@
1
- /** @remarks \@since 6.0.0 */
1
+ /** @since 6.0.0 */
2
2
  export interface TextFieldClassNameOptions {
3
3
  className?: string;
4
4
  /**
@@ -12,6 +12,6 @@ export interface TextFieldClassNameOptions {
12
12
  placeholderHidden?: boolean;
13
13
  }
14
14
  /**
15
- * @remarks \@since 6.0.0
15
+ * @since 6.0.0
16
16
  */
17
17
  export declare function textField(options?: TextFieldClassNameOptions): string;
@@ -2,7 +2,7 @@ import { cnb } from "cnbuilder";
2
2
  import { bem } from "../utils/bem.js";
3
3
  const styles = bem("rmd-text-field");
4
4
  /**
5
- * @remarks \@since 6.0.0
5
+ * @since 6.0.0
6
6
  */ export function textField(options = {}) {
7
7
  const { className, placeholderHidden = false } = options;
8
8
  return cnb(styles({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/textFieldStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-text-field\");\n\n/** @remarks \\@since 6.0.0 */\nexport interface TextFieldClassNameOptions {\n className?: string;\n\n /**\n * Set this value to `true` when a text field has a floating label the text\n * field is not focused or valued so that the placeholder is hidden by setting\n * the opacity to 0. This makes it so the placeholder and label to not cover\n * each other.\n *\n * @defaultValue `false`\n */\n placeholderHidden?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function textField(options: TextFieldClassNameOptions = {}): string {\n const { className, placeholderHidden = false } = options;\n\n return cnb(\n styles({\n \"placeholder-hidden\": placeholderHidden,\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","textField","options","className","placeholderHidden"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAiBnB;;CAEC,GACD,OAAO,SAASE,UAAUC,UAAqC,CAAC,CAAC;IAC/D,MAAM,EAAEC,SAAS,EAAEC,oBAAoB,KAAK,EAAE,GAAGF;IAEjD,OAAOJ,IACLE,OAAO;QACL,sBAAsBI;IACxB,IACAD;AAEJ"}
1
+ {"version":3,"sources":["../../src/form/textFieldStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-text-field\");\n\n/** @since 6.0.0 */\nexport interface TextFieldClassNameOptions {\n className?: string;\n\n /**\n * Set this value to `true` when a text field has a floating label the text\n * field is not focused or valued so that the placeholder is hidden by setting\n * the opacity to 0. This makes it so the placeholder and label to not cover\n * each other.\n *\n * @defaultValue `false`\n */\n placeholderHidden?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function textField(options: TextFieldClassNameOptions = {}): string {\n const { className, placeholderHidden = false } = options;\n\n return cnb(\n styles({\n \"placeholder-hidden\": placeholderHidden,\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","textField","options","className","placeholderHidden"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAiBnB;;CAEC,GACD,OAAO,SAASE,UAAUC,UAAqC,CAAC,CAAC;IAC/D,MAAM,EAAEC,SAAS,EAAEC,oBAAoB,KAAK,EAAE,GAAGF;IAEjD,OAAOJ,IACLE,OAAO;QACL,sBAAsBI;IACxB,IACAD;AAEJ"}
@@ -41,7 +41,7 @@ export interface FormThemeOptions {
41
41
  underlineDirection?: FormUnderlineDirection;
42
42
  }
43
43
  /**
44
- * @remarks \@since 6.0.0
44
+ * @since 6.0.0
45
45
  */
46
46
  export interface FormConfiguration extends Required<FormThemeOptions> {
47
47
  /**
@@ -69,13 +69,13 @@ export interface FormComponentStates {
69
69
  readOnly?: boolean;
70
70
  }
71
71
  /**
72
- * @remarks \@since 6.0.0
72
+ * @since 6.0.0
73
73
  * @see https://html.spec.whatwg.org/multipage/forms.html#autofill
74
74
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values
75
75
  */
76
76
  export type AutocompleteValue = "off" | "on" | "name" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "email" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level1" | "address-level2" | "address-level3" | "address-level4" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel" | "tel-country-code" | "tel-national" | "tek-area-code" | "tel-local" | "tel-extension" | "impp" | "url" | "photo";
77
77
  /**
78
- * @remarks \@since 6.0.0
78
+ * @since 6.0.0
79
79
  */
80
80
  export interface UserAgentAutocompleteProps {
81
81
  /**
@@ -200,7 +200,7 @@ export interface FormMessageProps extends Omit<HTMLAttributes<HTMLDivElement>, "
200
200
  *
201
201
  * Note: this should not be used alongside form-level messages.
202
202
  *
203
- * @remarks \@since 2.9.0 Renamed from `FormMessageCounterProps` to
203
+ * @since 2.9.0 Renamed from `FormMessageCounterProps` to
204
204
  * `FormMessageInputLengthCounterProps` since a `FormMessageCounter` component
205
205
  * was added
206
206
  */
@@ -225,7 +225,7 @@ export interface FormMessageInputLengthCounterProps {
225
225
  export interface FormMessageWithCounterProps extends FormMessageProps, FormMessageInputLengthCounterProps {
226
226
  }
227
227
  /**
228
- * @remarks \@since 6.0.0
228
+ * @since 6.0.0
229
229
  */
230
230
  export interface FormMessageWithoutCounterProps extends FormMessageProps {
231
231
  length?: never;
@@ -249,7 +249,7 @@ export interface FormMessageContainerExtension {
249
249
  */
250
250
  messageContainerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
251
251
  }
252
- /** @remarks \@since 6.0.0 */
252
+ /** @since 6.0.0 */
253
253
  export interface LabelClassNameOptions {
254
254
  className?: string;
255
255
  /**
@@ -325,7 +325,7 @@ export interface LabelClassNameOptions {
325
325
  export interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement>, LabelClassNameOptions {
326
326
  }
327
327
  /**
328
- * @remarks \@since 6.0.0
328
+ * @since 6.0.0
329
329
  */
330
330
  export interface ConfigurableTextFieldAddonProps extends HTMLAttributes<HTMLSpanElement> {
331
331
  /**
@@ -337,7 +337,7 @@ export interface ConfigurableTextFieldAddonProps extends HTMLAttributes<HTMLSpan
337
337
  pointerEvents?: boolean;
338
338
  }
339
339
  /**
340
- * @remarks \@since 6.0.0 Added support for `leftAddonProps` and
340
+ * @since 6.0.0 Added support for `leftAddonProps` and
341
341
  * `rightAddonProps`.
342
342
  */
343
343
  export interface TextFieldContainerOptions extends FormThemeOptions, FormComponentStates {
@@ -369,7 +369,7 @@ export interface TextFieldContainerOptions extends FormThemeOptions, FormCompone
369
369
  /**
370
370
  * Any additional props to pass to the `<span>` surrounding the {@link leftAddon}.
371
371
  *
372
- * @remarks \@since 6.0.0
372
+ * @since 6.0.0
373
373
  */
374
374
  leftAddonProps?: PropsWithRef<ConfigurableTextFieldAddonProps, HTMLSpanElement>;
375
375
  /**
@@ -386,7 +386,7 @@ export interface TextFieldContainerOptions extends FormThemeOptions, FormCompone
386
386
  /**
387
387
  * Any additional props to pass to the `<span>` surrounding the {@link rightAddon}.
388
388
  *
389
- * @remarks \@since 6.0.0
389
+ * @since 6.0.0
390
390
  */
391
391
  rightAddonProps?: PropsWithRef<ConfigurableTextFieldAddonProps, HTMLSpanElement>;
392
392
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/types.ts"],"sourcesContent":["import {\n type CSSProperties,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type LabelHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-form-active-color\"?: string;\n \"--rmd-form-focus-color\"?: string;\n }\n}\n\n/**\n * The supported themes for the `TextField`, `TextArea`, and `Select`\n * components.\n *\n * - \"none\" - display as an unstyled text field without any border or background\n * colors.\n * - \"underline\" - display with only an underline that gains the form active\n * color and animates from the left or right to the other side when the field\n * is focused.\n * - \"filled\" - an extension of the `\"underline\"` state that will also have a\n * slightly dark background applied.\n * - \"outline\" - outlines the entire text field in a border and applies the\n * active color as box shadow when the field is focused.\n */\nexport type FormTheme = \"none\" | \"underline\" | \"filled\" | \"outline\";\n\n/**\n * The direction that the underline should appear from when the theme is\n * `\"underline\"` or `\"filled\"`.\n */\nexport type FormUnderlineDirection = \"left\" | \"center\" | \"right\";\n\nexport interface FormThemeOptions {\n /**\n * The current theme type.\n *\n * @defaultValue `\"outline\"`\n */\n theme?: FormTheme;\n\n /**\n * The current underline direction.\n *\n * @defaultValue `\"left\"`\n */\n underlineDirection?: FormUnderlineDirection;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface FormConfiguration extends Required<FormThemeOptions> {\n /**\n * Set this to `false` if the `$disable-uncontrolled-input-toggles` variable\n * is set to `true` in the Sass configuration.\n *\n * Since the `checked` state only changes for the radio that has been clicked,\n * the previously checked radio would also be shown as checked with no way of\n * fixing it without controlling the radio component. When this flag is\n * enabled, the checked icons and state are handled through css instead of\n * `useState`.\n *\n * @defaultValue `true`\n */\n uncontrolledToggles: boolean;\n}\n\nexport interface FormComponentStates {\n /** @defaultValue `false` */\n error?: boolean;\n\n /** @defaultValue `false` */\n active?: boolean;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /** @defaultValue `false` */\n readOnly?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @see https://html.spec.whatwg.org/multipage/forms.html#autofill\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n */\nexport type AutocompleteValue =\n | \"off\"\n | \"on\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level1\"\n | \"address-level2\"\n | \"address-level3\"\n | \"address-level4\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tek-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface UserAgentAutocompleteProps {\n /**\n * Set this to enable additional autocompletion suggestions for a user for\n * different form fields. Using this prop will update the\n * {@link UserAgentAutocompleteProps.name} and {@link autoComplete} to default to\n * this value.\n *\n * @example\n * ```tsx\n * <Form>\n * <TextField\n * label=\"Enter your credit card number\"\n * autoCompleteValue=\"cc-number\"\n * {...creditCardProps}\n * inputMode=\"number\"\n * />\n * <TextField\n * label=\"Name on card\"\n * autoCompleteValue=\"cc-name\"\n * {...creditCardNameProps}\n * />\n * <TextField\n * label=\"Security code\"\n * autoCompleteValue=\"cc-csc\"\n * {...securityCodeProps}\n * inputMode=\"number\"\n * />\n * <Button type=\"submit\">Submit</Button>\n * </Form>\n * ```\n *\n * @see https://html.spec.whatwg.org/multipage/forms.html#autofill\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n * @see {@link AutocompleteValue}\n * @see {@link autoComplete}\n * @see {@link UserAgentAutocompleteProps.name}\n */\n autoCompleteValue?: AutocompleteValue;\n\n /**\n * @see {@link autoCompleteValue}\n * @defaultValue `autoCompleteValue`\n */\n autoComplete?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n\n /**\n * @see {@link autoCompleteValue}\n * @defaultValue `autoCompleteValue`\n */\n name?: string;\n}\n\nexport interface FormMessageClassNameOptions {\n className?: string;\n\n /**\n * Boolean if the message should gain the error state which changes the text\n * color to `red` by default.\n *\n * @defaultValue `false`\n */\n error?: boolean;\n\n /**\n * The current theme for the related text field. This is really only used to\n * match the current horizontal padding of the text field.\n *\n * @defaultValue `\"outline\"`\n */\n theme?: FormTheme;\n}\n\nexport interface FormMessageProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"minLength\" | \"maxLength\">,\n FormMessageClassNameOptions {\n /**\n * If this component is acting as a form-level error message handler, the role\n * should be updated to be `\"alert\"` for additional accessibility.\n *\n * Note: when creating a form-level error message handler, the messages should\n * no longer appear as the user types and instead once the user tries to\n * submit the form. Having an alert role disrupts normal screen reader\n * behavior by immediately reading changes in this element.\n *\n * @defaultValue `undefined`\n */\n role?: \"alert\";\n\n /**\n * Boolean if the children should no longer be wrapped in a `<p>` tag. This\n * should normally only be disabled if using a custom error message wrapper or\n * the counter behavior is not being used. To get correct alignments of the\n * message and counter, the `children` must be wrapped in some element and\n * cannot be plain test.\n *\n * Note: this will always be considered `true` if the `role` is set to\n * `\"alert\"`.\n *\n * @defaultValue `false`\n */\n disableWrap?: boolean;\n\n /**\n * An optional style to apply to the `<p>` tag that surrounds the `children`.\n * This will not be used if `role=\"alert\"` or `disableWrap={true}`.\n */\n messageStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the `<p>` tag that surrounds the\n * `children`. This will not be used if `role=\"alert\"` or\n * `disableWrap={true}`.\n */\n messageClassName?: string;\n}\n\n/**\n * Props that are used to automatically add a counter for the remaining letters\n * available for the text field. The counter will always be created to the right\n * of the optional message.\n *\n * The counter is really a simple string of: `${length} / ${maxLength}`.\n *\n * If you need additional customization, it is recommended to create your own\n * implementation such as:\n *\n * ```tsx\n * <FormMessage>\n * {errorMessage}\n * <MyCounter {...props} />\n * </FormMessage>\n * ```\n *\n * Note: this should not be used alongside form-level messages.\n *\n * @remarks \\@since 2.9.0 Renamed from `FormMessageCounterProps` to\n * `FormMessageInputLengthCounterProps` since a `FormMessageCounter` component\n * was added\n */\nexport interface FormMessageInputLengthCounterProps {\n /**\n * The current length of the value in the related text field.\n */\n length: number;\n\n /**\n * The max length allowed for the value in the related text field.\n */\n maxLength: number;\n\n /**\n * An optional style to apply to the counter wrapper element.\n */\n counterStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the counter wrapper element.\n */\n counterClassName?: string;\n}\n\nexport interface FormMessageWithCounterProps\n extends FormMessageProps,\n FormMessageInputLengthCounterProps {}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface FormMessageWithoutCounterProps extends FormMessageProps {\n length?: never;\n maxLength?: never;\n counterStyle?: never;\n counterClassName?: never;\n}\n\nexport interface FormMessageContainerExtension {\n /**\n * If the extension doesn't actually want to render the `FormMessage`\n * component, these props are optional. It kind of eliminates the whole\n * purpose of this component though.\n */\n messageProps?: PropsWithRef<\n FormMessageProps & Partial<FormMessageInputLengthCounterProps>,\n HTMLDivElement\n >;\n\n /**\n * Any props (and an optional ref) to provide to the `<div>` surrounding the\n * children and `FormMessage` component.\n *\n * Note: This will not be used if the `messageProps` are not provided since\n * only the `children` will be returned without the container.\n */\n messageContainerProps?: PropsWithRef<\n HTMLAttributes<HTMLDivElement>,\n HTMLDivElement\n >;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface LabelClassNameOptions {\n className?: string;\n\n /**\n * Set this to `true` to remove the `gap` style from the label.\n *\n * @see `$label-gap`\n * @defaultValue `false`\n */\n gap?: boolean;\n\n /**\n * Set this to `true` when the parent `TextFieldContainer` has the `dense`\n * spec enabled. This updates the floating styles to match the smaller height.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to update the label's color to the error color.\n *\n * @see `$error-color`\n * @defaultValue `false`\n */\n error?: boolean;\n\n /**\n * Set this to `true` to update the label's color to the active color.\n *\n * @see `$active-color`\n * @defaultValue `false`\n */\n active?: boolean;\n\n /**\n * Set this to `true` if the label should gain `flex-direction: column`\n * styling.\n *\n * @defaultValue `false`\n */\n stacked?: boolean;\n\n /**\n * Set this to `true` to update the label's color to be the disabled color.\n *\n * @see `$disabled-color`\n * @defaultValue `false`\n */\n disabled?: boolean;\n\n /**\n * Set this to true when label can floating above an input, textarea, or\n * select inside of a `TextFieldContainer`.\n *\n * @defaultValue `false`\n */\n floating?: boolean;\n\n /**\n * Set this to true when label is currently floating above an input,\n * textarea, or selected inside of a `TextFieldContainer`.\n *\n * @see {@link active}\n * @defaultValue `active`\n */\n floatingActive?: boolean;\n\n /**\n * Set this to `true` to gain `flex-direction: row-reversed` styling. If the\n * {@link stacked} prop is also `true`, `flex-direction: column-reversed` will\n * be applied.\n *\n * @defaultValue `false`\n */\n reversed?: boolean;\n\n /**\n * @defaultValue `false`\n */\n inactive?: boolean;\n}\n\nexport interface LabelProps\n extends LabelHTMLAttributes<HTMLLabelElement>,\n LabelClassNameOptions {}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface ConfigurableTextFieldAddonProps\n extends HTMLAttributes<HTMLSpanElement> {\n /**\n * Boolean if the addon should be presentational only and prevent pointer\n * events.\n *\n * @defaultValue `false`\n */\n pointerEvents?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0 Added support for `leftAddonProps` and\n * `rightAddonProps`.\n */\nexport interface TextFieldContainerOptions\n extends FormThemeOptions,\n FormComponentStates {\n /**\n * Set this to `true` to enable the dense spec which reduces the height.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to change the style from `display: flex` to\n * `display: inline-flex`.\n *\n * @defaultValue `false`\n */\n inline?: boolean;\n\n /**\n * Set this to `true` if this component should stretch to fill a flex or grid\n * container using `flex: 1 1 auto`.\n *\n * @defaultValue `false`\n */\n stretch?: boolean;\n\n /**\n * This should generally be an icon or a button that will be placed before the\n * `TextField` or `TextArea`.\n */\n leftAddon?: ReactNode;\n\n /**\n * Any additional props to pass to the `<span>` surrounding the {@link leftAddon}.\n *\n * @remarks \\@since 6.0.0\n */\n leftAddonProps?: PropsWithRef<\n ConfigurableTextFieldAddonProps,\n HTMLSpanElement\n >;\n\n /**\n * @see {@link TextFieldAddonProps.disabled}\n *\n * @defaultValue `false`\n */\n disableLeftAddonStyles?: boolean;\n\n /**\n * This should generally be an icon or a button that will be placed after the\n * `TextField` or `TextArea`.\n */\n rightAddon?: ReactNode;\n\n /**\n * Any additional props to pass to the `<span>` surrounding the {@link rightAddon}.\n *\n * @remarks \\@since 6.0.0\n */\n rightAddonProps?: PropsWithRef<\n ConfigurableTextFieldAddonProps,\n HTMLSpanElement\n >;\n\n /**\n * @see {@link TextFieldAddonProps.disabled}\n *\n * @defaultValue `false`\n */\n disableRightAddonStyles?: boolean;\n}\n\nexport interface FormFieldOptions\n extends TextFieldContainerOptions,\n FormMessageContainerExtension {\n /**\n * An optional floating label to use with the text field. A label is generally\n * recommended for accessibility, but can be omitted if an `aria-label` or\n * `aria-labelledby` is provided.\n */\n label?: ReactNode;\n\n /**\n * Any additional props and/or ref that should be passed to the `<label>`\n * element when a {@link label} is provided.\n *\n * @example\n * ```tsx\n * labelProps={{\n * ref: labelRef,\n * style: {},\n * className: \"some-custom-class-name\",\n * onClick: (event) => {\n * // do something\n * }\n * }}\n * ```\n */\n labelProps?: PropsWithRef<LabelProps, HTMLLabelElement>;\n\n /**\n * A convenience prop to apply a custom style to a label. This is equivalent\n * to:\n *\n * ```ts\n * labelProps={{\n * style: // some style here\n * }}\n * ```\n */\n labelStyle?: CSSProperties;\n\n /**\n * A convenience prop to apply a custom className to a label. This is\n * equivalent to:\n *\n * ```ts\n * labelProps={{\n * className: \"some-class-name\",\n * }}\n * ```\n */\n labelClassName?: string;\n}\n"],"names":[],"mappings":"AAihBA,WAmDC"}
1
+ {"version":3,"sources":["../../src/form/types.ts"],"sourcesContent":["import {\n type CSSProperties,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type LabelHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-form-active-color\"?: string;\n \"--rmd-form-focus-color\"?: string;\n }\n}\n\n/**\n * The supported themes for the `TextField`, `TextArea`, and `Select`\n * components.\n *\n * - \"none\" - display as an unstyled text field without any border or background\n * colors.\n * - \"underline\" - display with only an underline that gains the form active\n * color and animates from the left or right to the other side when the field\n * is focused.\n * - \"filled\" - an extension of the `\"underline\"` state that will also have a\n * slightly dark background applied.\n * - \"outline\" - outlines the entire text field in a border and applies the\n * active color as box shadow when the field is focused.\n */\nexport type FormTheme = \"none\" | \"underline\" | \"filled\" | \"outline\";\n\n/**\n * The direction that the underline should appear from when the theme is\n * `\"underline\"` or `\"filled\"`.\n */\nexport type FormUnderlineDirection = \"left\" | \"center\" | \"right\";\n\nexport interface FormThemeOptions {\n /**\n * The current theme type.\n *\n * @defaultValue `\"outline\"`\n */\n theme?: FormTheme;\n\n /**\n * The current underline direction.\n *\n * @defaultValue `\"left\"`\n */\n underlineDirection?: FormUnderlineDirection;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface FormConfiguration extends Required<FormThemeOptions> {\n /**\n * Set this to `false` if the `$disable-uncontrolled-input-toggles` variable\n * is set to `true` in the Sass configuration.\n *\n * Since the `checked` state only changes for the radio that has been clicked,\n * the previously checked radio would also be shown as checked with no way of\n * fixing it without controlling the radio component. When this flag is\n * enabled, the checked icons and state are handled through css instead of\n * `useState`.\n *\n * @defaultValue `true`\n */\n uncontrolledToggles: boolean;\n}\n\nexport interface FormComponentStates {\n /** @defaultValue `false` */\n error?: boolean;\n\n /** @defaultValue `false` */\n active?: boolean;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /** @defaultValue `false` */\n readOnly?: boolean;\n}\n\n/**\n * @since 6.0.0\n * @see https://html.spec.whatwg.org/multipage/forms.html#autofill\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n */\nexport type AutocompleteValue =\n | \"off\"\n | \"on\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level1\"\n | \"address-level2\"\n | \"address-level3\"\n | \"address-level4\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tek-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\n/**\n * @since 6.0.0\n */\nexport interface UserAgentAutocompleteProps {\n /**\n * Set this to enable additional autocompletion suggestions for a user for\n * different form fields. Using this prop will update the\n * {@link UserAgentAutocompleteProps.name} and {@link autoComplete} to default to\n * this value.\n *\n * @example\n * ```tsx\n * <Form>\n * <TextField\n * label=\"Enter your credit card number\"\n * autoCompleteValue=\"cc-number\"\n * {...creditCardProps}\n * inputMode=\"number\"\n * />\n * <TextField\n * label=\"Name on card\"\n * autoCompleteValue=\"cc-name\"\n * {...creditCardNameProps}\n * />\n * <TextField\n * label=\"Security code\"\n * autoCompleteValue=\"cc-csc\"\n * {...securityCodeProps}\n * inputMode=\"number\"\n * />\n * <Button type=\"submit\">Submit</Button>\n * </Form>\n * ```\n *\n * @see https://html.spec.whatwg.org/multipage/forms.html#autofill\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n * @see {@link AutocompleteValue}\n * @see {@link autoComplete}\n * @see {@link UserAgentAutocompleteProps.name}\n */\n autoCompleteValue?: AutocompleteValue;\n\n /**\n * @see {@link autoCompleteValue}\n * @defaultValue `autoCompleteValue`\n */\n autoComplete?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n\n /**\n * @see {@link autoCompleteValue}\n * @defaultValue `autoCompleteValue`\n */\n name?: string;\n}\n\nexport interface FormMessageClassNameOptions {\n className?: string;\n\n /**\n * Boolean if the message should gain the error state which changes the text\n * color to `red` by default.\n *\n * @defaultValue `false`\n */\n error?: boolean;\n\n /**\n * The current theme for the related text field. This is really only used to\n * match the current horizontal padding of the text field.\n *\n * @defaultValue `\"outline\"`\n */\n theme?: FormTheme;\n}\n\nexport interface FormMessageProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"minLength\" | \"maxLength\">,\n FormMessageClassNameOptions {\n /**\n * If this component is acting as a form-level error message handler, the role\n * should be updated to be `\"alert\"` for additional accessibility.\n *\n * Note: when creating a form-level error message handler, the messages should\n * no longer appear as the user types and instead once the user tries to\n * submit the form. Having an alert role disrupts normal screen reader\n * behavior by immediately reading changes in this element.\n *\n * @defaultValue `undefined`\n */\n role?: \"alert\";\n\n /**\n * Boolean if the children should no longer be wrapped in a `<p>` tag. This\n * should normally only be disabled if using a custom error message wrapper or\n * the counter behavior is not being used. To get correct alignments of the\n * message and counter, the `children` must be wrapped in some element and\n * cannot be plain test.\n *\n * Note: this will always be considered `true` if the `role` is set to\n * `\"alert\"`.\n *\n * @defaultValue `false`\n */\n disableWrap?: boolean;\n\n /**\n * An optional style to apply to the `<p>` tag that surrounds the `children`.\n * This will not be used if `role=\"alert\"` or `disableWrap={true}`.\n */\n messageStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the `<p>` tag that surrounds the\n * `children`. This will not be used if `role=\"alert\"` or\n * `disableWrap={true}`.\n */\n messageClassName?: string;\n}\n\n/**\n * Props that are used to automatically add a counter for the remaining letters\n * available for the text field. The counter will always be created to the right\n * of the optional message.\n *\n * The counter is really a simple string of: `${length} / ${maxLength}`.\n *\n * If you need additional customization, it is recommended to create your own\n * implementation such as:\n *\n * ```tsx\n * <FormMessage>\n * {errorMessage}\n * <MyCounter {...props} />\n * </FormMessage>\n * ```\n *\n * Note: this should not be used alongside form-level messages.\n *\n * @since 2.9.0 Renamed from `FormMessageCounterProps` to\n * `FormMessageInputLengthCounterProps` since a `FormMessageCounter` component\n * was added\n */\nexport interface FormMessageInputLengthCounterProps {\n /**\n * The current length of the value in the related text field.\n */\n length: number;\n\n /**\n * The max length allowed for the value in the related text field.\n */\n maxLength: number;\n\n /**\n * An optional style to apply to the counter wrapper element.\n */\n counterStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the counter wrapper element.\n */\n counterClassName?: string;\n}\n\nexport interface FormMessageWithCounterProps\n extends FormMessageProps,\n FormMessageInputLengthCounterProps {}\n\n/**\n * @since 6.0.0\n */\nexport interface FormMessageWithoutCounterProps extends FormMessageProps {\n length?: never;\n maxLength?: never;\n counterStyle?: never;\n counterClassName?: never;\n}\n\nexport interface FormMessageContainerExtension {\n /**\n * If the extension doesn't actually want to render the `FormMessage`\n * component, these props are optional. It kind of eliminates the whole\n * purpose of this component though.\n */\n messageProps?: PropsWithRef<\n FormMessageProps & Partial<FormMessageInputLengthCounterProps>,\n HTMLDivElement\n >;\n\n /**\n * Any props (and an optional ref) to provide to the `<div>` surrounding the\n * children and `FormMessage` component.\n *\n * Note: This will not be used if the `messageProps` are not provided since\n * only the `children` will be returned without the container.\n */\n messageContainerProps?: PropsWithRef<\n HTMLAttributes<HTMLDivElement>,\n HTMLDivElement\n >;\n}\n\n/** @since 6.0.0 */\nexport interface LabelClassNameOptions {\n className?: string;\n\n /**\n * Set this to `true` to remove the `gap` style from the label.\n *\n * @see `$label-gap`\n * @defaultValue `false`\n */\n gap?: boolean;\n\n /**\n * Set this to `true` when the parent `TextFieldContainer` has the `dense`\n * spec enabled. This updates the floating styles to match the smaller height.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to update the label's color to the error color.\n *\n * @see `$error-color`\n * @defaultValue `false`\n */\n error?: boolean;\n\n /**\n * Set this to `true` to update the label's color to the active color.\n *\n * @see `$active-color`\n * @defaultValue `false`\n */\n active?: boolean;\n\n /**\n * Set this to `true` if the label should gain `flex-direction: column`\n * styling.\n *\n * @defaultValue `false`\n */\n stacked?: boolean;\n\n /**\n * Set this to `true` to update the label's color to be the disabled color.\n *\n * @see `$disabled-color`\n * @defaultValue `false`\n */\n disabled?: boolean;\n\n /**\n * Set this to true when label can floating above an input, textarea, or\n * select inside of a `TextFieldContainer`.\n *\n * @defaultValue `false`\n */\n floating?: boolean;\n\n /**\n * Set this to true when label is currently floating above an input,\n * textarea, or selected inside of a `TextFieldContainer`.\n *\n * @see {@link active}\n * @defaultValue `active`\n */\n floatingActive?: boolean;\n\n /**\n * Set this to `true` to gain `flex-direction: row-reversed` styling. If the\n * {@link stacked} prop is also `true`, `flex-direction: column-reversed` will\n * be applied.\n *\n * @defaultValue `false`\n */\n reversed?: boolean;\n\n /**\n * @defaultValue `false`\n */\n inactive?: boolean;\n}\n\nexport interface LabelProps\n extends LabelHTMLAttributes<HTMLLabelElement>,\n LabelClassNameOptions {}\n\n/**\n * @since 6.0.0\n */\nexport interface ConfigurableTextFieldAddonProps\n extends HTMLAttributes<HTMLSpanElement> {\n /**\n * Boolean if the addon should be presentational only and prevent pointer\n * events.\n *\n * @defaultValue `false`\n */\n pointerEvents?: boolean;\n}\n\n/**\n * @since 6.0.0 Added support for `leftAddonProps` and\n * `rightAddonProps`.\n */\nexport interface TextFieldContainerOptions\n extends FormThemeOptions,\n FormComponentStates {\n /**\n * Set this to `true` to enable the dense spec which reduces the height.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to change the style from `display: flex` to\n * `display: inline-flex`.\n *\n * @defaultValue `false`\n */\n inline?: boolean;\n\n /**\n * Set this to `true` if this component should stretch to fill a flex or grid\n * container using `flex: 1 1 auto`.\n *\n * @defaultValue `false`\n */\n stretch?: boolean;\n\n /**\n * This should generally be an icon or a button that will be placed before the\n * `TextField` or `TextArea`.\n */\n leftAddon?: ReactNode;\n\n /**\n * Any additional props to pass to the `<span>` surrounding the {@link leftAddon}.\n *\n * @since 6.0.0\n */\n leftAddonProps?: PropsWithRef<\n ConfigurableTextFieldAddonProps,\n HTMLSpanElement\n >;\n\n /**\n * @see {@link TextFieldAddonProps.disabled}\n *\n * @defaultValue `false`\n */\n disableLeftAddonStyles?: boolean;\n\n /**\n * This should generally be an icon or a button that will be placed after the\n * `TextField` or `TextArea`.\n */\n rightAddon?: ReactNode;\n\n /**\n * Any additional props to pass to the `<span>` surrounding the {@link rightAddon}.\n *\n * @since 6.0.0\n */\n rightAddonProps?: PropsWithRef<\n ConfigurableTextFieldAddonProps,\n HTMLSpanElement\n >;\n\n /**\n * @see {@link TextFieldAddonProps.disabled}\n *\n * @defaultValue `false`\n */\n disableRightAddonStyles?: boolean;\n}\n\nexport interface FormFieldOptions\n extends TextFieldContainerOptions,\n FormMessageContainerExtension {\n /**\n * An optional floating label to use with the text field. A label is generally\n * recommended for accessibility, but can be omitted if an `aria-label` or\n * `aria-labelledby` is provided.\n */\n label?: ReactNode;\n\n /**\n * Any additional props and/or ref that should be passed to the `<label>`\n * element when a {@link label} is provided.\n *\n * @example\n * ```tsx\n * labelProps={{\n * ref: labelRef,\n * style: {},\n * className: \"some-custom-class-name\",\n * onClick: (event) => {\n * // do something\n * }\n * }}\n * ```\n */\n labelProps?: PropsWithRef<LabelProps, HTMLLabelElement>;\n\n /**\n * A convenience prop to apply a custom style to a label. This is equivalent\n * to:\n *\n * ```ts\n * labelProps={{\n * style: // some style here\n * }}\n * ```\n */\n labelStyle?: CSSProperties;\n\n /**\n * A convenience prop to apply a custom className to a label. This is\n * equivalent to:\n *\n * ```ts\n * labelProps={{\n * className: \"some-class-name\",\n * }}\n * ```\n */\n labelClassName?: string;\n}\n"],"names":[],"rangeMappings":"","mappings":"AAihBA,WAmDC"}
@@ -1,5 +1,5 @@
1
1
  import { type UseStateInitializer, type UseStateSetter } from "../types.js";
2
- /** @remarks \@since 6.0.0 */
2
+ /** @since 6.0.0 */
3
3
  export interface CheckboxGroupOptions<V> {
4
4
  /**
5
5
  * A `name` to apply to all the checkboxes within the group. This is required
@@ -20,8 +20,7 @@ export interface CheckboxGroupOptions<V> {
20
20
  * checkbox is checked and determine if all the checkboxes have manually be
21
21
  * selected.
22
22
  *
23
- * @example
24
- * Indeterminate Behavior
23
+ * @example Indeterminate Behavior
25
24
  * ```tsx
26
25
  * const OPTIONS = [
27
26
  * { label: "First", value: "a" },
@@ -45,7 +44,7 @@ export interface CheckboxGroupOptions<V> {
45
44
  */
46
45
  defaultCheckedValues?: UseStateInitializer<readonly V[]>;
47
46
  }
48
- /** @remarks \@since 6.0.0 */
47
+ /** @since 6.0.0 */
49
48
  export interface CheckboxGroupImplementation<V extends string> {
50
49
  reset(): void;
51
50
  checkedValues: ReadonlySet<V>;
@@ -57,7 +56,7 @@ export interface CheckboxGroupImplementation<V extends string> {
57
56
  onChange(): void;
58
57
  };
59
58
  }
60
- /** @remarks \@since 6.0.0 */
59
+ /** @since 6.0.0 */
61
60
  export interface IndeterminateCheckboxGroupImplementation<V extends string> extends CheckboxGroupImplementation<V> {
62
61
  getIndeterminateProps(): {
63
62
  "aria-checked": "mixed" | undefined;
@@ -67,7 +66,7 @@ export interface IndeterminateCheckboxGroupImplementation<V extends string> exte
67
66
  onChange(): void;
68
67
  };
69
68
  }
70
- /** @remarks \@since 6.0.0 */
69
+ /** @since 6.0.0 */
71
70
  export interface MenuItemCheckboxGroupImplementation<V extends string> {
72
71
  reset(): void;
73
72
  checkedValues: ReadonlySet<V>;
@@ -77,7 +76,7 @@ export interface MenuItemCheckboxGroupImplementation<V extends string> {
77
76
  onCheckedChange(): void;
78
77
  };
79
78
  }
80
- /** @remarks \@since 6.0.0 */
79
+ /** @since 6.0.0 */
81
80
  export interface IndeterminateMenuItemCheckboxGroupImplementation<V extends string> extends MenuItemCheckboxGroupImplementation<V> {
82
81
  getIndeterminateProps(): {
83
82
  "aria-checked": "mixed" | undefined;
@@ -86,7 +85,7 @@ export interface IndeterminateMenuItemCheckboxGroupImplementation<V extends stri
86
85
  onCheckedChange(): void;
87
86
  };
88
87
  }
89
- /** @remarks \@since 6.0.0 */
88
+ /** @since 6.0.0 */
90
89
  export interface CombinedCheckboxGroupReturnValue<V extends string> {
91
90
  reset(): void;
92
91
  checkedValues: ReadonlySet<V>;
@@ -108,8 +107,7 @@ export interface CombinedCheckboxGroupReturnValue<V extends string> {
108
107
  };
109
108
  }
110
109
  /**
111
- * @example
112
- * Checkbox Group
110
+ * @example Checkbox Group
113
111
  * ```tsx
114
112
  * const { getCheckboxProps, checkedValues } = useCheckboxGroup({ name: "example" });
115
113
  *
@@ -128,7 +126,7 @@ export interface CombinedCheckboxGroupReturnValue<V extends string> {
128
126
  * );
129
127
  * ```
130
128
  *
131
- * @remarks \@since 6.0.0
129
+ * @since 6.0.0
132
130
  */
133
131
  export declare function useCheckboxGroup<V extends string>(options: CheckboxGroupOptions<V> & {
134
132
  menu?: false;
@@ -136,8 +134,7 @@ export declare function useCheckboxGroup<V extends string>(options: CheckboxGrou
136
134
  values?: never;
137
135
  }): CheckboxGroupImplementation<V>;
138
136
  /**
139
- * @example
140
- * Indeterminate Checkbox Group
137
+ * @example Indeterminate Checkbox Group
141
138
  * ```tsx
142
139
  * const OPTIONS = [
143
140
  * { label: "First", value: "a" },
@@ -165,7 +162,7 @@ export declare function useCheckboxGroup<V extends string>(options: CheckboxGrou
165
162
  * );
166
163
  * ```
167
164
  *
168
- * @remarks \@since 6.0.0
165
+ * @since 6.0.0
169
166
  */
170
167
  export declare function useCheckboxGroup<V extends string>(options: CheckboxGroupOptions<V> & {
171
168
  menu?: false;
@@ -173,8 +170,7 @@ export declare function useCheckboxGroup<V extends string>(options: CheckboxGrou
173
170
  values: readonly V[];
174
171
  }): IndeterminateCheckboxGroupImplementation<V>;
175
172
  /**
176
- * @example
177
- * MenuItemCheckbox Group
173
+ * @example MenuItemCheckbox Group
178
174
  * ```tsx
179
175
  * const { getCheckboxProps, checkedValues } = useCheckboxGroup({ menu: true });
180
176
  *
@@ -193,7 +189,7 @@ export declare function useCheckboxGroup<V extends string>(options: CheckboxGrou
193
189
  * );
194
190
  * ```
195
191
  *
196
- * @remarks \@since 6.0.0
192
+ * @since 6.0.0
197
193
  */
198
194
  export declare function useCheckboxGroup<V extends string>(options: CheckboxGroupOptions<V> & {
199
195
  menu: true;
@@ -201,8 +197,7 @@ export declare function useCheckboxGroup<V extends string>(options: CheckboxGrou
201
197
  values?: never;
202
198
  }): MenuItemCheckboxGroupImplementation<V>;
203
199
  /**
204
- * @example
205
- * Indeterminate MenuItemCheckbox Group
200
+ * @example Indeterminate MenuItemCheckbox Group
206
201
  * ```tsx
207
202
  * const OPTIONS = [
208
203
  * { label: "First", value: "a" },
@@ -230,7 +225,7 @@ export declare function useCheckboxGroup<V extends string>(options: CheckboxGrou
230
225
  * );
231
226
  * ```
232
227
  *
233
- * @remarks \@since 6.0.0
228
+ * @since 6.0.0
234
229
  */
235
230
  export declare function useCheckboxGroup<V extends string>(options: CheckboxGroupOptions<V> & {
236
231
  menu: true;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/useCheckboxGroup.ts"],"sourcesContent":["\"use client\";\nimport { useCallback, useRef, useState } from \"react\";\nimport { type UseStateInitializer, type UseStateSetter } from \"../types.js\";\n\nconst EMPTY_LIST = [] as const;\n\n/** @remarks \\@since 6.0.0 */\nexport interface CheckboxGroupOptions<V> {\n /**\n * A `name` to apply to all the checkboxes within the group. This is required\n * if the {@link menu} option is set to `true`.\n */\n name?: string;\n\n /**\n * Set this to `true` if using the `MenuItemCheckbox` component instead of the\n * `Checkbox` so the correct props can be provided.\n *\n * @defaultValue `false`\n */\n menu?: boolean;\n\n /**\n * This prop **must** be defined to enable the indeterminate checkbox feature\n * from the hook. This should be a list of all the possible checkbox values in\n * the group. This will be used to select all values when the indeterminate\n * checkbox is checked and determine if all the checkboxes have manually be\n * selected.\n *\n * @example\n * Indeterminate Behavior\n * ```tsx\n * const OPTIONS = [\n * { label: \"First\", value: \"a\" },\n * { label: \"Second\", value: \"b\" },\n * { label: \"Third\", value: \"c\" },\n * ] as const:\n * const VALUES = OPTIONS.map(({ value }) => value) as const;\n *\n * const {\n * getCheckboxProps,\n * getIndeterminateProps,\n * checkedValues,\n * } = useCheckboxGroup({ name: \"group\", values: VALUES });\n * ```\n */\n values?: readonly V[];\n\n /**\n * Set this to a list of checkbox values that should be checked by default.\n *\n * @defaultValue `[]`\n */\n defaultCheckedValues?: UseStateInitializer<readonly V[]>;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface CheckboxGroupImplementation<V extends string> {\n reset(): void;\n checkedValues: ReadonlySet<V>;\n setCheckedValues: UseStateSetter<ReadonlySet<V>>;\n getCheckboxProps(value: V): {\n name: string;\n value: V;\n checked: boolean;\n onChange(): void;\n };\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface IndeterminateCheckboxGroupImplementation<V extends string>\n extends CheckboxGroupImplementation<V> {\n getIndeterminateProps(): {\n \"aria-checked\": \"mixed\" | undefined;\n name: string;\n checked: boolean;\n indeterminate: boolean;\n onChange(): void;\n };\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface MenuItemCheckboxGroupImplementation<V extends string> {\n reset(): void;\n checkedValues: ReadonlySet<V>;\n setCheckedValues: UseStateSetter<ReadonlySet<V>>;\n getCheckboxProps(value: V): {\n checked: boolean;\n onCheckedChange(): void;\n };\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface IndeterminateMenuItemCheckboxGroupImplementation<\n V extends string,\n> extends MenuItemCheckboxGroupImplementation<V> {\n getIndeterminateProps(): {\n \"aria-checked\": \"mixed\" | undefined;\n checked: boolean;\n indeterminate: boolean;\n onCheckedChange(): void;\n };\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface CombinedCheckboxGroupReturnValue<V extends string> {\n reset(): void;\n checkedValues: ReadonlySet<V>;\n setCheckedValues: UseStateSetter<ReadonlySet<V>>;\n getCheckboxProps(value: V): {\n name?: string;\n value?: V;\n checked: boolean;\n onChange?(): void;\n onCheckedChange?(): void;\n };\n getIndeterminateProps?(): {\n \"aria-checked\": \"mixed\" | undefined;\n name?: string;\n checked: boolean;\n indeterminate: boolean;\n onChange?(): void;\n onCheckedChange?(): void;\n };\n}\n\n/**\n * @example\n * Checkbox Group\n * ```tsx\n * const { getCheckboxProps, checkedValues } = useCheckboxGroup({ name: \"example\" });\n *\n * return (\n * <>\n * <Checkbox {...getCheckboxProps(\"a\")}>\n * First\n * </Checkbox>\n * <Checkbox {...getCheckboxProps(\"b\")}>\n * Second\n * </Checkbox>\n * <Checkbox {...getCheckboxProps(\"c\")}>\n * Third\n * </Checkbox>\n * </>\n * );\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu?: false;\n name: string;\n values?: never;\n }\n): CheckboxGroupImplementation<V>;\n/**\n * @example\n * Indeterminate Checkbox Group\n * ```tsx\n * const OPTIONS = [\n * { label: \"First\", value: \"a\" },\n * { label: \"Second\", value: \"b\" },\n * { label: \"Third\", value: \"c\" },\n * ] as const:\n * const VALUES = OPTIONS.map(({ value }) => value) as const;\n *\n * const {\n * getCheckboxProps,\n * getIndeterminateProps,\n * checkedValues\n * } = useCheckboxGroup({\n * name: \"example\",\n * values: VALUES,\n * });\n *\n * return (\n * <>\n * <Checkbox {...getIndeterminateProps()} label=\"Select all\" />\n * {VALUES.map(({ label, value }) => (\n * <Checkbox key={value} label={label} {...getCheckboxProps(value)} />\n * ))}\n * </>\n * );\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu?: false;\n name: string;\n values: readonly V[];\n }\n): IndeterminateCheckboxGroupImplementation<V>;\n/**\n * @example\n * MenuItemCheckbox Group\n * ```tsx\n * const { getCheckboxProps, checkedValues } = useCheckboxGroup({ menu: true });\n *\n * return (\n * <>\n * <MenuItemCheckbox {...getCheckboxProps(\"a\")}>\n * First\n * </MenuItemCheckbox>\n * <MenuItemCheckbox {...getCheckboxProps(\"b\")}>\n * Second\n * </MenuItemCheckbox>\n * <MenuItemCheckbox {...getCheckboxProps(\"c\")}>\n * Third\n * </MenuItemCheckbox>\n * </>\n * );\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu: true;\n name?: never;\n values?: never;\n }\n): MenuItemCheckboxGroupImplementation<V>;\n/**\n * @example\n * Indeterminate MenuItemCheckbox Group\n * ```tsx\n * const OPTIONS = [\n * { label: \"First\", value: \"a\" },\n * { label: \"Second\", value: \"b\" },\n * { label: \"Third\", value: \"c\" },\n * ] as const:\n * const VALUES = OPTIONS.map(({ value }) => value) as const;\n *\n * const { getCheckboxProps, getIndeterminateProps, checkedValues } = useCheckboxGroup({\n * menu: true,\n * values: VALUES,\n * });\n *\n * return (\n * <>\n * <MenuItemCheckbox {...getIndeterminateProps()}>\n * All\n * <MenuItemCheckbox>\n * {OPTIONS.map(({ label, value }) => (\n * <MenuItemCheckbox key={value} {...getCheckboxProps(value)}>\n * {label}\n * </MenuItemCheckbox>\n * ))}\n * </>\n * );\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu: true;\n name?: never;\n values: readonly V[];\n }\n): IndeterminateMenuItemCheckboxGroupImplementation<V>;\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V>\n): CombinedCheckboxGroupReturnValue<V> {\n const {\n name,\n menu = false,\n values,\n defaultCheckedValues = EMPTY_LIST,\n } = options;\n const [checkedValues, setCheckedValues] = useState<ReadonlySet<V>>(() => {\n if (typeof defaultCheckedValues === \"function\") {\n return new Set(defaultCheckedValues());\n }\n\n return new Set(defaultCheckedValues);\n });\n const initial = useRef(checkedValues);\n\n let getIndeterminateProps: CombinedCheckboxGroupReturnValue<V>[\"getIndeterminateProps\"];\n if (values) {\n getIndeterminateProps = () => {\n const checked = checkedValues.size > 0;\n const indeterminate = checked && checkedValues.size < values.length;\n\n return {\n \"aria-checked\": indeterminate ? \"mixed\" : undefined,\n name,\n checked,\n indeterminate,\n [menu ? \"onCheckedChange\" : \"onChange\"]() {\n setCheckedValues(() => {\n if (checkedValues.size === 0 || indeterminate) {\n return new Set(values);\n }\n\n return new Set();\n });\n },\n };\n };\n }\n\n return {\n reset: useCallback(() => {\n setCheckedValues(initial.current);\n }, []),\n checkedValues,\n setCheckedValues,\n getIndeterminateProps,\n getCheckboxProps(value) {\n return {\n name,\n value: menu ? undefined : value,\n checked: checkedValues.has(value),\n [menu ? \"onCheckedChange\" : \"onChange\"]() {\n setCheckedValues((prevValues) => {\n const nextValues = new Set(prevValues);\n if (prevValues.has(value)) {\n nextValues.delete(value);\n } else {\n nextValues.add(value);\n }\n\n return nextValues;\n });\n },\n };\n },\n };\n}\n"],"names":["useCallback","useRef","useState","EMPTY_LIST","useCheckboxGroup","options","name","menu","values","defaultCheckedValues","checkedValues","setCheckedValues","Set","initial","getIndeterminateProps","checked","size","indeterminate","length","undefined","reset","current","getCheckboxProps","value","has","prevValues","nextValues","delete","add"],"mappings":"AAAA;AACA,SAASA,WAAW,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAGtD,MAAMC,aAAa,EAAE;AAoQrB,OAAO,SAASC,iBACdC,OAAgC;IAEhC,MAAM,EACJC,IAAI,EACJC,OAAO,KAAK,EACZC,MAAM,EACNC,uBAAuBN,UAAU,EAClC,GAAGE;IACJ,MAAM,CAACK,eAAeC,iBAAiB,GAAGT,SAAyB;QACjE,IAAI,OAAOO,yBAAyB,YAAY;YAC9C,OAAO,IAAIG,IAAIH;QACjB;QAEA,OAAO,IAAIG,IAAIH;IACjB;IACA,MAAMI,UAAUZ,OAAOS;IAEvB,IAAII;IACJ,IAAIN,QAAQ;QACVM,wBAAwB;YACtB,MAAMC,UAAUL,cAAcM,IAAI,GAAG;YACrC,MAAMC,gBAAgBF,WAAWL,cAAcM,IAAI,GAAGR,OAAOU,MAAM;YAEnE,OAAO;gBACL,gBAAgBD,gBAAgB,UAAUE;gBAC1Cb;gBACAS;gBACAE;gBACA,CAACV,OAAO,oBAAoB,WAAW;oBACrCI,iBAAiB;wBACf,IAAID,cAAcM,IAAI,KAAK,KAAKC,eAAe;4BAC7C,OAAO,IAAIL,IAAIJ;wBACjB;wBAEA,OAAO,IAAII;oBACb;gBACF;YACF;QACF;IACF;IAEA,OAAO;QACLQ,OAAOpB,YAAY;YACjBW,iBAAiBE,QAAQQ,OAAO;QAClC,GAAG,EAAE;QACLX;QACAC;QACAG;QACAQ,kBAAiBC,KAAK;YACpB,OAAO;gBACLjB;gBACAiB,OAAOhB,OAAOY,YAAYI;gBAC1BR,SAASL,cAAcc,GAAG,CAACD;gBAC3B,CAAChB,OAAO,oBAAoB,WAAW;oBACrCI,iBAAiB,CAACc;wBAChB,MAAMC,aAAa,IAAId,IAAIa;wBAC3B,IAAIA,WAAWD,GAAG,CAACD,QAAQ;4BACzBG,WAAWC,MAAM,CAACJ;wBACpB,OAAO;4BACLG,WAAWE,GAAG,CAACL;wBACjB;wBAEA,OAAOG;oBACT;gBACF;YACF;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/form/useCheckboxGroup.ts"],"sourcesContent":["\"use client\";\nimport { useCallback, useRef, useState } from \"react\";\nimport { type UseStateInitializer, type UseStateSetter } from \"../types.js\";\n\nconst EMPTY_LIST = [] as const;\n\n/** @since 6.0.0 */\nexport interface CheckboxGroupOptions<V> {\n /**\n * A `name` to apply to all the checkboxes within the group. This is required\n * if the {@link menu} option is set to `true`.\n */\n name?: string;\n\n /**\n * Set this to `true` if using the `MenuItemCheckbox` component instead of the\n * `Checkbox` so the correct props can be provided.\n *\n * @defaultValue `false`\n */\n menu?: boolean;\n\n /**\n * This prop **must** be defined to enable the indeterminate checkbox feature\n * from the hook. This should be a list of all the possible checkbox values in\n * the group. This will be used to select all values when the indeterminate\n * checkbox is checked and determine if all the checkboxes have manually be\n * selected.\n *\n * @example Indeterminate Behavior\n * ```tsx\n * const OPTIONS = [\n * { label: \"First\", value: \"a\" },\n * { label: \"Second\", value: \"b\" },\n * { label: \"Third\", value: \"c\" },\n * ] as const:\n * const VALUES = OPTIONS.map(({ value }) => value) as const;\n *\n * const {\n * getCheckboxProps,\n * getIndeterminateProps,\n * checkedValues,\n * } = useCheckboxGroup({ name: \"group\", values: VALUES });\n * ```\n */\n values?: readonly V[];\n\n /**\n * Set this to a list of checkbox values that should be checked by default.\n *\n * @defaultValue `[]`\n */\n defaultCheckedValues?: UseStateInitializer<readonly V[]>;\n}\n\n/** @since 6.0.0 */\nexport interface CheckboxGroupImplementation<V extends string> {\n reset(): void;\n checkedValues: ReadonlySet<V>;\n setCheckedValues: UseStateSetter<ReadonlySet<V>>;\n getCheckboxProps(value: V): {\n name: string;\n value: V;\n checked: boolean;\n onChange(): void;\n };\n}\n\n/** @since 6.0.0 */\nexport interface IndeterminateCheckboxGroupImplementation<V extends string>\n extends CheckboxGroupImplementation<V> {\n getIndeterminateProps(): {\n \"aria-checked\": \"mixed\" | undefined;\n name: string;\n checked: boolean;\n indeterminate: boolean;\n onChange(): void;\n };\n}\n\n/** @since 6.0.0 */\nexport interface MenuItemCheckboxGroupImplementation<V extends string> {\n reset(): void;\n checkedValues: ReadonlySet<V>;\n setCheckedValues: UseStateSetter<ReadonlySet<V>>;\n getCheckboxProps(value: V): {\n checked: boolean;\n onCheckedChange(): void;\n };\n}\n\n/** @since 6.0.0 */\nexport interface IndeterminateMenuItemCheckboxGroupImplementation<\n V extends string,\n> extends MenuItemCheckboxGroupImplementation<V> {\n getIndeterminateProps(): {\n \"aria-checked\": \"mixed\" | undefined;\n checked: boolean;\n indeterminate: boolean;\n onCheckedChange(): void;\n };\n}\n\n/** @since 6.0.0 */\nexport interface CombinedCheckboxGroupReturnValue<V extends string> {\n reset(): void;\n checkedValues: ReadonlySet<V>;\n setCheckedValues: UseStateSetter<ReadonlySet<V>>;\n getCheckboxProps(value: V): {\n name?: string;\n value?: V;\n checked: boolean;\n onChange?(): void;\n onCheckedChange?(): void;\n };\n getIndeterminateProps?(): {\n \"aria-checked\": \"mixed\" | undefined;\n name?: string;\n checked: boolean;\n indeterminate: boolean;\n onChange?(): void;\n onCheckedChange?(): void;\n };\n}\n\n/**\n * @example Checkbox Group\n * ```tsx\n * const { getCheckboxProps, checkedValues } = useCheckboxGroup({ name: \"example\" });\n *\n * return (\n * <>\n * <Checkbox {...getCheckboxProps(\"a\")}>\n * First\n * </Checkbox>\n * <Checkbox {...getCheckboxProps(\"b\")}>\n * Second\n * </Checkbox>\n * <Checkbox {...getCheckboxProps(\"c\")}>\n * Third\n * </Checkbox>\n * </>\n * );\n * ```\n *\n * @since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu?: false;\n name: string;\n values?: never;\n }\n): CheckboxGroupImplementation<V>;\n/**\n * @example Indeterminate Checkbox Group\n * ```tsx\n * const OPTIONS = [\n * { label: \"First\", value: \"a\" },\n * { label: \"Second\", value: \"b\" },\n * { label: \"Third\", value: \"c\" },\n * ] as const:\n * const VALUES = OPTIONS.map(({ value }) => value) as const;\n *\n * const {\n * getCheckboxProps,\n * getIndeterminateProps,\n * checkedValues\n * } = useCheckboxGroup({\n * name: \"example\",\n * values: VALUES,\n * });\n *\n * return (\n * <>\n * <Checkbox {...getIndeterminateProps()} label=\"Select all\" />\n * {VALUES.map(({ label, value }) => (\n * <Checkbox key={value} label={label} {...getCheckboxProps(value)} />\n * ))}\n * </>\n * );\n * ```\n *\n * @since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu?: false;\n name: string;\n values: readonly V[];\n }\n): IndeterminateCheckboxGroupImplementation<V>;\n/**\n * @example MenuItemCheckbox Group\n * ```tsx\n * const { getCheckboxProps, checkedValues } = useCheckboxGroup({ menu: true });\n *\n * return (\n * <>\n * <MenuItemCheckbox {...getCheckboxProps(\"a\")}>\n * First\n * </MenuItemCheckbox>\n * <MenuItemCheckbox {...getCheckboxProps(\"b\")}>\n * Second\n * </MenuItemCheckbox>\n * <MenuItemCheckbox {...getCheckboxProps(\"c\")}>\n * Third\n * </MenuItemCheckbox>\n * </>\n * );\n * ```\n *\n * @since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu: true;\n name?: never;\n values?: never;\n }\n): MenuItemCheckboxGroupImplementation<V>;\n/**\n * @example Indeterminate MenuItemCheckbox Group\n * ```tsx\n * const OPTIONS = [\n * { label: \"First\", value: \"a\" },\n * { label: \"Second\", value: \"b\" },\n * { label: \"Third\", value: \"c\" },\n * ] as const:\n * const VALUES = OPTIONS.map(({ value }) => value) as const;\n *\n * const { getCheckboxProps, getIndeterminateProps, checkedValues } = useCheckboxGroup({\n * menu: true,\n * values: VALUES,\n * });\n *\n * return (\n * <>\n * <MenuItemCheckbox {...getIndeterminateProps()}>\n * All\n * <MenuItemCheckbox>\n * {OPTIONS.map(({ label, value }) => (\n * <MenuItemCheckbox key={value} {...getCheckboxProps(value)}>\n * {label}\n * </MenuItemCheckbox>\n * ))}\n * </>\n * );\n * ```\n *\n * @since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu: true;\n name?: never;\n values: readonly V[];\n }\n): IndeterminateMenuItemCheckboxGroupImplementation<V>;\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V>\n): CombinedCheckboxGroupReturnValue<V> {\n const {\n name,\n menu = false,\n values,\n defaultCheckedValues = EMPTY_LIST,\n } = options;\n const [checkedValues, setCheckedValues] = useState<ReadonlySet<V>>(() => {\n if (typeof defaultCheckedValues === \"function\") {\n return new Set(defaultCheckedValues());\n }\n\n return new Set(defaultCheckedValues);\n });\n const initial = useRef(checkedValues);\n\n let getIndeterminateProps: CombinedCheckboxGroupReturnValue<V>[\"getIndeterminateProps\"];\n if (values) {\n getIndeterminateProps = () => {\n const checked = checkedValues.size > 0;\n const indeterminate = checked && checkedValues.size < values.length;\n\n return {\n \"aria-checked\": indeterminate ? \"mixed\" : undefined,\n name,\n checked,\n indeterminate,\n [menu ? \"onCheckedChange\" : \"onChange\"]() {\n setCheckedValues(() => {\n if (checkedValues.size === 0 || indeterminate) {\n return new Set(values);\n }\n\n return new Set();\n });\n },\n };\n };\n }\n\n return {\n reset: useCallback(() => {\n setCheckedValues(initial.current);\n }, []),\n checkedValues,\n setCheckedValues,\n getIndeterminateProps,\n getCheckboxProps(value) {\n return {\n name,\n value: menu ? undefined : value,\n checked: checkedValues.has(value),\n [menu ? \"onCheckedChange\" : \"onChange\"]() {\n setCheckedValues((prevValues) => {\n const nextValues = new Set(prevValues);\n if (prevValues.has(value)) {\n nextValues.delete(value);\n } else {\n nextValues.add(value);\n }\n\n return nextValues;\n });\n },\n };\n },\n };\n}\n"],"names":["useCallback","useRef","useState","EMPTY_LIST","useCheckboxGroup","options","name","menu","values","defaultCheckedValues","checkedValues","setCheckedValues","Set","initial","getIndeterminateProps","checked","size","indeterminate","length","undefined","reset","current","getCheckboxProps","value","has","prevValues","nextValues","delete","add"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,SAASA,WAAW,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAGtD,MAAMC,aAAa,EAAE;AA+PrB,OAAO,SAASC,iBACdC,OAAgC;IAEhC,MAAM,EACJC,IAAI,EACJC,OAAO,KAAK,EACZC,MAAM,EACNC,uBAAuBN,UAAU,EAClC,GAAGE;IACJ,MAAM,CAACK,eAAeC,iBAAiB,GAAGT,SAAyB;QACjE,IAAI,OAAOO,yBAAyB,YAAY;YAC9C,OAAO,IAAIG,IAAIH;QACjB;QAEA,OAAO,IAAIG,IAAIH;IACjB;IACA,MAAMI,UAAUZ,OAAOS;IAEvB,IAAII;IACJ,IAAIN,QAAQ;QACVM,wBAAwB;YACtB,MAAMC,UAAUL,cAAcM,IAAI,GAAG;YACrC,MAAMC,gBAAgBF,WAAWL,cAAcM,IAAI,GAAGR,OAAOU,MAAM;YAEnE,OAAO;gBACL,gBAAgBD,gBAAgB,UAAUE;gBAC1Cb;gBACAS;gBACAE;gBACA,CAACV,OAAO,oBAAoB,WAAW;oBACrCI,iBAAiB;wBACf,IAAID,cAAcM,IAAI,KAAK,KAAKC,eAAe;4BAC7C,OAAO,IAAIL,IAAIJ;wBACjB;wBAEA,OAAO,IAAII;oBACb;gBACF;YACF;QACF;IACF;IAEA,OAAO;QACLQ,OAAOpB,YAAY;YACjBW,iBAAiBE,QAAQQ,OAAO;QAClC,GAAG,EAAE;QACLX;QACAC;QACAG;QACAQ,kBAAiBC,KAAK;YACpB,OAAO;gBACLjB;gBACAiB,OAAOhB,OAAOY,YAAYI;gBAC1BR,SAASL,cAAcc,GAAG,CAACD;gBAC3B,CAAChB,OAAO,oBAAoB,WAAW;oBACrCI,iBAAiB,CAACc;wBAChB,MAAMC,aAAa,IAAId,IAAIa;wBAC3B,IAAIA,WAAWD,GAAG,CAACD,QAAQ;4BACzBG,WAAWC,MAAM,CAACJ;wBACpB,OAAO;4BACLG,WAAWE,GAAG,CAACL;wBACjB;wBAEA,OAAOG;oBACT;gBACF;YACF;QACF;IACF;AACF"}