@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
@@ -2,7 +2,7 @@ import type { CSSProperties, Ref, RefCallback, RefObject } from "react";
2
2
  import type { TransitionCallbacks } from "../transition/types.js";
3
3
  import type { CalculateFixedPositionOptions } from "./types.js";
4
4
  /**
5
- * @remarks \@since 4.0.0
5
+ * @since 4.0.0
6
6
  */
7
7
  export type FixedPositioningTransitionCallbacks = Pick<TransitionCallbacks, "onEnter" | "onEntering" | "onEntered" | "onExited">;
8
8
  /**
@@ -11,7 +11,7 @@ export type FixedPositioningTransitionCallbacks = Pick<TransitionCallbacks, "onE
11
11
  *
12
12
  * @typeParam E - An HTMLElement type used for the ref required for the
13
13
  * transition.
14
- * @remarks \@since 4.0.0
14
+ * @since 4.0.0
15
15
  */
16
16
  export interface FixedPositioningTransitionOptions<E extends HTMLElement> extends FixedPositioningTransitionCallbacks {
17
17
  /** {@inheritDoc TransitionOptions.nodeRef} */
@@ -20,7 +20,7 @@ export interface FixedPositioningTransitionOptions<E extends HTMLElement> extend
20
20
  /**
21
21
  * @typeParam FixedToElement - An HTMLElement type for the static element.
22
22
  * @typeParam FixedElement - An HTMLElement type for the fixed element.
23
- * @remarks \@since 4.0.0
23
+ * @since 4.0.0
24
24
  */
25
25
  export interface FixedPositioningScrollData<FixedToElement extends HTMLElement, FixedElement extends HTMLElement> {
26
26
  fixedElement: FixedElement;
@@ -40,13 +40,13 @@ export interface FixedPositioningScrollData<FixedToElement extends HTMLElement,
40
40
  * @param event - The scroll event
41
41
  * @param data - The {@link FixedPositioningScrollData} that can be used for
42
42
  * custom scroll behavior.
43
- * @remarks \@since 4.0.0
43
+ * @since 4.0.0
44
44
  */
45
45
  export type TransitionScrollCallback<FixedToElement extends HTMLElement, FixedElement extends HTMLElement> = (event: Event, data: Readonly<FixedPositioningScrollData<FixedToElement, FixedElement>>) => void;
46
46
  /**
47
47
  * @typeParam FixedToElement - An HTMLElement type for the static element.
48
48
  * @typeParam FixedElement - An HTMLElement type for the fixed element.
49
- * @remarks \@since 4.0.0
49
+ * @since 4.0.0
50
50
  */
51
51
  export interface FixedPositioningOptions<FixedToElement extends HTMLElement, FixedElement extends HTMLElement> extends FixedPositioningTransitionOptions<FixedElement>, CalculateFixedPositionOptions {
52
52
  /**
@@ -77,7 +77,7 @@ export interface FixedPositioningOptions<FixedToElement extends HTMLElement, Fix
77
77
  }
78
78
  /**
79
79
  * @typeParam E - An HTMLElement type for the fixed element.
80
- * @remarks \@since 4.0.0
80
+ * @since 4.0.0
81
81
  */
82
82
  export interface FixedPositioningHookReturnValue<E extends HTMLElement> {
83
83
  /**
@@ -110,8 +110,7 @@ export interface FixedPositioningHookReturnValue<E extends HTMLElement> {
110
110
  * `position: fixed` as if it were `position: absolute` to a parent element that
111
111
  * had `position: relative`.
112
112
  *
113
- * @example
114
- * Simple Example
113
+ * @example Simple Example
115
114
  * ```tsx
116
115
  * import { ReactElement, useRef, useState } from "react";
117
116
  * import { Button, useCSSTransition, useFixedPositioning } from "@react-md/core";
@@ -158,6 +157,6 @@ export interface FixedPositioningHookReturnValue<E extends HTMLElement> {
158
157
  *
159
158
  * @typeParam FixedToElement - An HTMLElement type for the static element.
160
159
  * @typeParam FixedElement - An HTMLElement type for the fixed element.
161
- * @remarks \@since 4.0.0
160
+ * @since 4.0.0
162
161
  */
163
162
  export declare function useFixedPositioning<FixedToElement extends HTMLElement, FixedElement extends HTMLElement>(options: FixedPositioningOptions<FixedToElement, FixedElement>): FixedPositioningHookReturnValue<FixedElement>;
@@ -13,8 +13,7 @@ const noop = ()=>undefined;
13
13
  * `position: fixed` as if it were `position: absolute` to a parent element that
14
14
  * had `position: relative`.
15
15
  *
16
- * @example
17
- * Simple Example
16
+ * @example Simple Example
18
17
  * ```tsx
19
18
  * import { ReactElement, useRef, useState } from "react";
20
19
  * import { Button, useCSSTransition, useFixedPositioning } from "@react-md/core";
@@ -61,7 +60,7 @@ const noop = ()=>undefined;
61
60
  *
62
61
  * @typeParam FixedToElement - An HTMLElement type for the static element.
63
62
  * @typeParam FixedElement - An HTMLElement type for the fixed element.
64
- * @remarks \@since 4.0.0
63
+ * @since 4.0.0
65
64
  */ export function useFixedPositioning(options) {
66
65
  const { style: propStyle, nodeRef, fixedTo, onEnter = noop, onEntering = noop, onEntered = noop, onExited = noop, anchor = BELOW_CENTER_ANCHOR, disableSwapping, disableVHBounds, initialX, initialY, preventOverlap, transformOrigin, vhMargin, vwMargin, width, xMargin, yMargin, getFixedPositionOptions = noop, onScroll, onResize = noop } = options;
67
66
  const [active, setActive] = useState(false);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/positioning/useFixedPositioning.ts"],"sourcesContent":["\"use client\";\nimport type { CSSProperties, Ref, RefCallback, RefObject } from \"react\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { delegateEvent } from \"../delegateEvent.js\";\nimport type { TransitionCallbacks } from \"../transition/types.js\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport { useIsomorphicLayoutEffect } from \"../useIsomorphicLayoutEffect.js\";\nimport { BELOW_CENTER_ANCHOR } from \"./constants.js\";\nimport { getFixedPosition } from \"./getFixedPosition.js\";\nimport type { CalculateFixedPositionOptions } from \"./types.js\";\nimport { isWithinViewport } from \"./utils.js\";\n\nconst noop = (): undefined => undefined;\n\n/**\n * @remarks \\@since 4.0.0\n */\nexport type FixedPositioningTransitionCallbacks = Pick<\n TransitionCallbacks,\n \"onEnter\" | \"onEntering\" | \"onEntered\" | \"onExited\"\n>;\n\n/**\n * This options should be passed to the {@link useCSSTransition} for the styling\n * and positioning to work correctly.\n *\n * @typeParam E - An HTMLElement type used for the ref required for the\n * transition.\n * @remarks \\@since 4.0.0\n */\nexport interface FixedPositioningTransitionOptions<E extends HTMLElement>\n extends FixedPositioningTransitionCallbacks {\n /** {@inheritDoc TransitionOptions.nodeRef} */\n nodeRef?: Ref<E>;\n}\n\n/**\n * @typeParam FixedToElement - An HTMLElement type for the static element.\n * @typeParam FixedElement - An HTMLElement type for the fixed element.\n * @remarks \\@since 4.0.0\n */\nexport interface FixedPositioningScrollData<\n FixedToElement extends HTMLElement,\n FixedElement extends HTMLElement,\n> {\n fixedElement: FixedElement;\n fixedToElement: FixedToElement;\n\n /**\n * Boolean if the {@link fixedToElement} is visible within the viewport.\n */\n visible: boolean;\n}\n\n/**\n * This function is called when the page is scrolled while the fixed element is\n * visible. This is generally used to reposition the fixed element or hide it if\n * it is no longer visible within the viewport.\n *\n * @typeParam FixedToElement - An HTMLElement type for the static element.\n * @typeParam FixedElement - An HTMLElement type for the fixed element.\n * @param event - The scroll event\n * @param data - The {@link FixedPositioningScrollData} that can be used for\n * custom scroll behavior.\n * @remarks \\@since 4.0.0\n */\nexport type TransitionScrollCallback<\n FixedToElement extends HTMLElement,\n FixedElement extends HTMLElement,\n> = (\n event: Event,\n data: Readonly<FixedPositioningScrollData<FixedToElement, FixedElement>>\n) => void;\n\n/**\n * @typeParam FixedToElement - An HTMLElement type for the static element.\n * @typeParam FixedElement - An HTMLElement type for the fixed element.\n * @remarks \\@since 4.0.0\n */\nexport interface FixedPositioningOptions<\n FixedToElement extends HTMLElement,\n FixedElement extends HTMLElement,\n> extends FixedPositioningTransitionOptions<FixedElement>,\n CalculateFixedPositionOptions {\n /**\n * An optional style that will be merged with the fixed positioning required\n * styles.\n *\n * @see {@link FixedPositionStyle}\n */\n style?: CSSProperties;\n\n /**\n * A ref pointing to an element that another element should be fixed to. This\n * **must** be provided for the positioning to work.\n */\n fixedTo: RefObject<FixedToElement>;\n\n /**\n * An optional function that can be used to override positioning options if\n * some options require the element to be in the DOM for specific\n * calculations.\n */\n getFixedPositionOptions?(): CalculateFixedPositionOptions;\n\n /**\n * An optional function to call if the page resizes while the `FixedElement`\n * is visible.\n */\n onResize?: EventListener;\n /** @see {@link TransitionScrollCallback} */\n onScroll?: TransitionScrollCallback<FixedToElement, FixedElement>;\n}\n\n/**\n * @typeParam E - An HTMLElement type for the fixed element.\n * @remarks \\@since 4.0.0\n */\nexport interface FixedPositioningHookReturnValue<E extends HTMLElement> {\n /**\n * A ref that should be passed to a component for the fixed positioning\n * behavior to work correctly.\n *\n * This should really only be used if the {@link TransitionOptions} is not\n * being used.\n */\n ref: RefCallback<E>;\n\n /**\n * @see {@link FixedPositionStyle}\n */\n style: CSSProperties;\n\n /**\n * This should really only be used if the {@link transitionOptions} is not\n * being used.\n */\n callbacks: Readonly<Required<FixedPositioningTransitionCallbacks>>;\n\n /**\n * A function that can be called to update the style for the fixed element.\n */\n updateStyle(): void;\n\n /** {@inheritDoc FixedPositioningTransitionOptions} */\n transitionOptions: Readonly<Required<FixedPositioningTransitionOptions<E>>>;\n}\n\n/**\n * This hook is used to attach a temporary (fixed) element to another element\n * within the page. In other words, this is a way to have an element with\n * `position: fixed` as if it were `position: absolute` to a parent element that\n * had `position: relative`.\n *\n * @example\n * Simple Example\n * ```tsx\n * import { ReactElement, useRef, useState } from \"react\";\n * import { Button, useCSSTransition, useFixedPositioning } from \"@react-md/core\";\n *\n * function Example(): ReactElement {\n * const fixedTo = useRef<HTMLButtonElement>(null);\n * const [transitionIn, setTransitionIn] = useState(false);\n * const { style, transitionOptions } = useFixedPositioning({\n * fixedTo,\n * });\n * const { elementProps, rendered } = useCSSTransition({\n * ...transitionOptions,\n * transitionIn,\n * temporary: true,\n * timeout: {\n * enter: 200,\n * exit: 150,\n * },\n * classNames: {\n * enter: \"enter\",\n * enterActive: \"enter--active\",\n * exit: \"exit\",\n * exitActive: \"exit--active\",\n * },\n * });\n *\n * return (\n * <>\n * <Button\n * ref={fixedTo}\n * onClick={() => setTransitionIn(!transitionIn)}\n * >\n * Toggle\n * </Button>\n * {rendered && (\n * <div {...elementProps} style={style}>\n * Fixed Temporary Element\n * </div>\n * )}\n * </>\n * );\n * }\n * ```\n *\n * @typeParam FixedToElement - An HTMLElement type for the static element.\n * @typeParam FixedElement - An HTMLElement type for the fixed element.\n * @remarks \\@since 4.0.0\n */\nexport function useFixedPositioning<\n FixedToElement extends HTMLElement,\n FixedElement extends HTMLElement,\n>(\n options: FixedPositioningOptions<FixedToElement, FixedElement>\n): FixedPositioningHookReturnValue<FixedElement> {\n const {\n style: propStyle,\n nodeRef,\n fixedTo,\n onEnter = noop,\n onEntering = noop,\n onEntered = noop,\n onExited = noop,\n anchor = BELOW_CENTER_ANCHOR,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n getFixedPositionOptions = noop,\n onScroll,\n onResize = noop,\n } = options;\n\n const [active, setActive] = useState(false);\n const [ref, refHandler] = useEnsuredRef(nodeRef);\n const optionsRef = useRef({\n ref,\n fixedTo,\n anchor,\n disableSwapping,\n disableVHBounds,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n getFixedPositionOptions,\n } as const);\n useIsomorphicLayoutEffect(() => {\n optionsRef.current = {\n ref,\n fixedTo,\n anchor,\n disableSwapping,\n disableVHBounds,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n getFixedPositionOptions,\n };\n }, [\n ref,\n fixedTo,\n anchor,\n disableSwapping,\n disableVHBounds,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n getFixedPositionOptions,\n ]);\n const [style, setStyle] = useState<CSSProperties | undefined>(\n () =>\n getFixedPosition({\n container: ref.current,\n element: fixedTo.current,\n anchor,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n ...getFixedPositionOptions(),\n }).style\n );\n\n const updateStyle = useCallback(() => {\n const {\n ref,\n fixedTo,\n anchor,\n disableSwapping,\n disableVHBounds,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n getFixedPositionOptions,\n } = optionsRef.current;\n const element = ref.current;\n const container = fixedTo.current;\n const { style } = getFixedPosition({\n container,\n element,\n anchor,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n ...getFixedPositionOptions(),\n });\n\n setStyle(style);\n setActive(!!element && !element.hidden);\n\n // Only changing the initialX and initialY should cause the useEffect below\n // to trigger, which is why everything else is set in a ref.\n }, [initialX, initialY]);\n\n useEffect(() => {\n if (!active) {\n return;\n }\n\n const resizeCallback = (event: Event): void => {\n onResize(event);\n updateStyle();\n };\n const scrollCallback = (event: Event): void => {\n const fixedElement = ref.current;\n const fixedToElement = fixedTo.current;\n if (onScroll && fixedElement && fixedToElement) {\n onScroll(event, {\n visible: isWithinViewport({ fixedElement, fixedToElement }),\n fixedElement,\n fixedToElement,\n });\n }\n\n updateStyle();\n };\n\n const resizeHandler = delegateEvent(\"resize\", window, true);\n const scrollHandler = delegateEvent(\"scroll\", window, true, {\n passive: true,\n });\n resizeHandler.add(resizeCallback);\n scrollHandler.add(scrollCallback);\n return () => {\n resizeHandler.remove(resizeCallback);\n scrollHandler.remove(scrollCallback);\n };\n }, [active, fixedTo, onResize, onScroll, ref, updateStyle]);\n\n const callbacks: Required<FixedPositioningTransitionCallbacks> = {\n onEnter(appearing) {\n onEnter(appearing);\n updateStyle();\n },\n onEntering(appearing) {\n onEntering(appearing);\n updateStyle();\n },\n onEntered(appearing) {\n onEntered(appearing);\n updateStyle();\n },\n onExited() {\n onExited();\n setActive(false);\n },\n };\n\n return {\n ref: refHandler,\n style: { ...style, ...propStyle },\n callbacks,\n updateStyle,\n transitionOptions: {\n ...callbacks,\n nodeRef: refHandler,\n },\n };\n}\n"],"names":["useCallback","useEffect","useRef","useState","delegateEvent","useEnsuredRef","useIsomorphicLayoutEffect","BELOW_CENTER_ANCHOR","getFixedPosition","isWithinViewport","noop","undefined","useFixedPositioning","options","style","propStyle","nodeRef","fixedTo","onEnter","onEntering","onEntered","onExited","anchor","disableSwapping","disableVHBounds","initialX","initialY","preventOverlap","transformOrigin","vhMargin","vwMargin","width","xMargin","yMargin","getFixedPositionOptions","onScroll","onResize","active","setActive","ref","refHandler","optionsRef","current","setStyle","container","element","updateStyle","hidden","resizeCallback","event","scrollCallback","fixedElement","fixedToElement","visible","resizeHandler","window","scrollHandler","passive","add","remove","callbacks","appearing","transitionOptions"],"mappings":"AAAA;AAEA,SAASA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AACjE,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,yBAAyB,QAAQ,kCAAkC;AAC5E,SAASC,mBAAmB,QAAQ,iBAAiB;AACrD,SAASC,gBAAgB,QAAQ,wBAAwB;AAEzD,S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E1D,MAAMc,YAA2D;QAC/D1C,SAAQ2C,SAAS;YACf3C,QAAQ2C;YACRf;QACF;QACA3B,YAAW0C,SAAS;YAClB1C,WAAW0C;YACXf;QACF;QACA1B,WAAUyC,SAAS;YACjBzC,UAAUyC;YACVf;QACF;QACAzB;YACEA;YACAiB,UAAU;QACZ;IACF;IAEA,OAAO;QACLC,KAAKC;QACL1B,OAAO;YAAE,GAAGA,KAAK;YAAE,GAAGC,SAAS;QAAC;QAChC6C;QACAd;QACAgB,mBAAmB;YACjB,GAAGF,SAAS;YACZ5C,SAASwB;QACX;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/positioning/useFixedPositioning.ts"],"sourcesContent":["\"use client\";\nimport type { CSSProperties, Ref, RefCallback, RefObject } from \"react\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { delegateEvent } from \"../delegateEvent.js\";\nimport type { TransitionCallbacks } from \"../transition/types.js\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport { useIsomorphicLayoutEffect } from \"../useIsomorphicLayoutEffect.js\";\nimport { BELOW_CENTER_ANCHOR } from \"./constants.js\";\nimport { getFixedPosition } from \"./getFixedPosition.js\";\nimport type { CalculateFixedPositionOptions } from \"./types.js\";\nimport { isWithinViewport } from \"./utils.js\";\n\nconst noop = (): undefined => undefined;\n\n/**\n * @since 4.0.0\n */\nexport type FixedPositioningTransitionCallbacks = Pick<\n TransitionCallbacks,\n \"onEnter\" | \"onEntering\" | \"onEntered\" | \"onExited\"\n>;\n\n/**\n * This options should be passed to the {@link useCSSTransition} for the styling\n * and positioning to work correctly.\n *\n * @typeParam E - An HTMLElement type used for the ref required for the\n * transition.\n * @since 4.0.0\n */\nexport interface FixedPositioningTransitionOptions<E extends HTMLElement>\n extends FixedPositioningTransitionCallbacks {\n /** {@inheritDoc TransitionOptions.nodeRef} */\n nodeRef?: Ref<E>;\n}\n\n/**\n * @typeParam FixedToElement - An HTMLElement type for the static element.\n * @typeParam FixedElement - An HTMLElement type for the fixed element.\n * @since 4.0.0\n */\nexport interface FixedPositioningScrollData<\n FixedToElement extends HTMLElement,\n FixedElement extends HTMLElement,\n> {\n fixedElement: FixedElement;\n fixedToElement: FixedToElement;\n\n /**\n * Boolean if the {@link fixedToElement} is visible within the viewport.\n */\n visible: boolean;\n}\n\n/**\n * This function is called when the page is scrolled while the fixed element is\n * visible. This is generally used to reposition the fixed element or hide it if\n * it is no longer visible within the viewport.\n *\n * @typeParam FixedToElement - An HTMLElement type for the static element.\n * @typeParam FixedElement - An HTMLElement type for the fixed element.\n * @param event - The scroll event\n * @param data - The {@link FixedPositioningScrollData} that can be used for\n * custom scroll behavior.\n * @since 4.0.0\n */\nexport type TransitionScrollCallback<\n FixedToElement extends HTMLElement,\n FixedElement extends HTMLElement,\n> = (\n event: Event,\n data: Readonly<FixedPositioningScrollData<FixedToElement, FixedElement>>\n) => void;\n\n/**\n * @typeParam FixedToElement - An HTMLElement type for the static element.\n * @typeParam FixedElement - An HTMLElement type for the fixed element.\n * @since 4.0.0\n */\nexport interface FixedPositioningOptions<\n FixedToElement extends HTMLElement,\n FixedElement extends HTMLElement,\n> extends FixedPositioningTransitionOptions<FixedElement>,\n CalculateFixedPositionOptions {\n /**\n * An optional style that will be merged with the fixed positioning required\n * styles.\n *\n * @see {@link FixedPositionStyle}\n */\n style?: CSSProperties;\n\n /**\n * A ref pointing to an element that another element should be fixed to. This\n * **must** be provided for the positioning to work.\n */\n fixedTo: RefObject<FixedToElement>;\n\n /**\n * An optional function that can be used to override positioning options if\n * some options require the element to be in the DOM for specific\n * calculations.\n */\n getFixedPositionOptions?(): CalculateFixedPositionOptions;\n\n /**\n * An optional function to call if the page resizes while the `FixedElement`\n * is visible.\n */\n onResize?: EventListener;\n /** @see {@link TransitionScrollCallback} */\n onScroll?: TransitionScrollCallback<FixedToElement, FixedElement>;\n}\n\n/**\n * @typeParam E - An HTMLElement type for the fixed element.\n * @since 4.0.0\n */\nexport interface FixedPositioningHookReturnValue<E extends HTMLElement> {\n /**\n * A ref that should be passed to a component for the fixed positioning\n * behavior to work correctly.\n *\n * This should really only be used if the {@link TransitionOptions} is not\n * being used.\n */\n ref: RefCallback<E>;\n\n /**\n * @see {@link FixedPositionStyle}\n */\n style: CSSProperties;\n\n /**\n * This should really only be used if the {@link transitionOptions} is not\n * being used.\n */\n callbacks: Readonly<Required<FixedPositioningTransitionCallbacks>>;\n\n /**\n * A function that can be called to update the style for the fixed element.\n */\n updateStyle(): void;\n\n /** {@inheritDoc FixedPositioningTransitionOptions} */\n transitionOptions: Readonly<Required<FixedPositioningTransitionOptions<E>>>;\n}\n\n/**\n * This hook is used to attach a temporary (fixed) element to another element\n * within the page. In other words, this is a way to have an element with\n * `position: fixed` as if it were `position: absolute` to a parent element that\n * had `position: relative`.\n *\n * @example Simple Example\n * ```tsx\n * import { ReactElement, useRef, useState } from \"react\";\n * import { Button, useCSSTransition, useFixedPositioning } from \"@react-md/core\";\n *\n * function Example(): ReactElement {\n * const fixedTo = useRef<HTMLButtonElement>(null);\n * const [transitionIn, setTransitionIn] = useState(false);\n * const { style, transitionOptions } = useFixedPositioning({\n * fixedTo,\n * });\n * const { elementProps, rendered } = useCSSTransition({\n * ...transitionOptions,\n * transitionIn,\n * temporary: true,\n * timeout: {\n * enter: 200,\n * exit: 150,\n * },\n * classNames: {\n * enter: \"enter\",\n * enterActive: \"enter--active\",\n * exit: \"exit\",\n * exitActive: \"exit--active\",\n * },\n * });\n *\n * return (\n * <>\n * <Button\n * ref={fixedTo}\n * onClick={() => setTransitionIn(!transitionIn)}\n * >\n * Toggle\n * </Button>\n * {rendered && (\n * <div {...elementProps} style={style}>\n * Fixed Temporary Element\n * </div>\n * )}\n * </>\n * );\n * }\n * ```\n *\n * @typeParam FixedToElement - An HTMLElement type for the static element.\n * @typeParam FixedElement - An HTMLElement type for the fixed element.\n * @since 4.0.0\n */\nexport function useFixedPositioning<\n FixedToElement extends HTMLElement,\n FixedElement extends HTMLElement,\n>(\n options: FixedPositioningOptions<FixedToElement, FixedElement>\n): FixedPositioningHookReturnValue<FixedElement> {\n const {\n style: propStyle,\n nodeRef,\n fixedTo,\n onEnter = noop,\n onEntering = noop,\n onEntered = noop,\n onExited = noop,\n anchor = BELOW_CENTER_ANCHOR,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n getFixedPositionOptions = noop,\n onScroll,\n onResize = noop,\n } = options;\n\n const [active, setActive] = useState(false);\n const [ref, refHandler] = useEnsuredRef(nodeRef);\n const optionsRef = useRef({\n ref,\n fixedTo,\n anchor,\n disableSwapping,\n disableVHBounds,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n getFixedPositionOptions,\n } as const);\n useIsomorphicLayoutEffect(() => {\n optionsRef.current = {\n ref,\n fixedTo,\n anchor,\n disableSwapping,\n disableVHBounds,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n getFixedPositionOptions,\n };\n }, [\n ref,\n fixedTo,\n anchor,\n disableSwapping,\n disableVHBounds,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n getFixedPositionOptions,\n ]);\n const [style, setStyle] = useState<CSSProperties | undefined>(\n () =>\n getFixedPosition({\n container: ref.current,\n element: fixedTo.current,\n anchor,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n ...getFixedPositionOptions(),\n }).style\n );\n\n const updateStyle = useCallback(() => {\n const {\n ref,\n fixedTo,\n anchor,\n disableSwapping,\n disableVHBounds,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n getFixedPositionOptions,\n } = optionsRef.current;\n const element = ref.current;\n const container = fixedTo.current;\n const { style } = getFixedPosition({\n container,\n element,\n anchor,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n ...getFixedPositionOptions(),\n });\n\n setStyle(style);\n setActive(!!element && !element.hidden);\n\n // Only changing the initialX and initialY should cause the useEffect below\n // to trigger, which is why everything else is set in a ref.\n }, [initialX, initialY]);\n\n useEffect(() => {\n if (!active) {\n return;\n }\n\n const resizeCallback = (event: Event): void => {\n onResize(event);\n updateStyle();\n };\n const scrollCallback = (event: Event): void => {\n const fixedElement = ref.current;\n const fixedToElement = fixedTo.current;\n if (onScroll && fixedElement && fixedToElement) {\n onScroll(event, {\n visible: isWithinViewport({ fixedElement, fixedToElement }),\n fixedElement,\n fixedToElement,\n });\n }\n\n updateStyle();\n };\n\n const resizeHandler = delegateEvent(\"resize\", window, true);\n const scrollHandler = delegateEvent(\"scroll\", window, true, {\n passive: true,\n });\n resizeHandler.add(resizeCallback);\n scrollHandler.add(scrollCallback);\n return () => {\n resizeHandler.remove(resizeCallback);\n scrollHandler.remove(scrollCallback);\n };\n }, [active, fixedTo, onResize, onScroll, ref, updateStyle]);\n\n const callbacks: Required<FixedPositioningTransitionCallbacks> = {\n onEnter(appearing) {\n onEnter(appearing);\n updateStyle();\n },\n onEntering(appearing) {\n onEntering(appearing);\n updateStyle();\n },\n onEntered(appearing) {\n onEntered(appearing);\n updateStyle();\n },\n onExited() {\n onExited();\n setActive(false);\n },\n };\n\n return {\n ref: refHandler,\n style: { ...style, ...propStyle },\n callbacks,\n updateStyle,\n transitionOptions: {\n ...callbacks,\n nodeRef: refHandler,\n },\n };\n}\n"],"names":["useCallback","useEffect","useRef","useState","delegateEvent","useEnsuredRef","useIsomorphicLayoutEffect","BELOW_CENTER_ANCHOR","getFixedPosition","isWithinViewport","noop","undefined","useFixedPositioning","options","style","propStyle","nodeRef","fixedTo","onEnter","onEntering","onEntered","onExited","anchor","disableSwapping","disableVHBounds","initialX","initialY","preventOverlap","transformOrigin","vhMargin","vwMargin","width","xMargin","yMargin","getFixedPositionOptions","onScroll","onResize","active","setActive","ref","refHandler","optionsRef","current","setStyle","container","element","updateStyle","hidden","resizeCallback","event","scrollCallback","fixedElement","fixedToElement","visible","resizeHandler","window","scrollHandler","passive","add","remove","callbacks","appearing","transitionOptions"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AACjE,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,yBAAyB,QAAQ,kCAAkC;AAC5E,SAASC,mBAAmB,QAAQ,iBAAiB;AACrD,SAASC,gBAAgB,QAAQ,wBAAwB;AAEzD,SAASC,gBAAgB,QAAQ,aAAa;AAE9C,MAAMC,OAAO,IAAiBC;AAwI9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsDC,GACD,OAAO,SAASC,oBAIdC,OAA8D;IAE9D,MAAM,EACJC,OAAOC,SAAS,EAChBC,OAAO,EACPC,OAAO,EACPC,UAAUR,IAAI,EACdS,aAAaT,IAAI,EACjBU,YAAYV,IAAI,EAChBW,WAAWX,IAAI,EACfY,SAASf,mBAAmB,EAC5BgB,eAAe,EACfC,eAAe,EACfC,QAAQ,EACRC,QAAQ,EACRC,cAAc,EACdC,eAAe,EACfC,QAAQ,EACRC,QAAQ,EACRC,KAAK,EACLC,OAAO,EACPC,OAAO,EACP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AU,CAAC,CAACO,WAAW,CAACA,QAAQE,MAAM;IAEtC,2EAA2E;IAC3E,4DAA4D;IAC9D,GAAG;QAACtB;QAAUC;KAAS;IAEvBzB,UAAU;QACR,IAAI,CAACoC,QAAQ;YACX;QACF;QAEA,MAAMW,iBAAiB,CAACC;YACtBb,SAASa;YACTH;QACF;QACA,MAAMI,iBAAiB,CAACD;YACtB,MAAME,eAAeZ,IAAIG,OAAO;YAChC,MAAMU,iBAAiBnC,QAAQyB,OAAO;YACtC,IAAIP,YAAYgB,gBAAgBC,gBAAgB;gBAC9CjB,SAASc,OAAO;oBACdI,SAAS5C,iBAAiB;wBAAE0C;wBAAcC;oBAAe;oBACzDD;oBACAC;gBACF;YACF;YAEAN;QACF;QAEA,MAAMQ,gBAAgBlD,cAAc,UAAUmD,QAAQ;QACtD,MAAMC,gBAAgBpD,cAAc,UAAUmD,QAAQ,MAAM;YAC1DE,SAAS;QACX;QACAH,cAAcI,GAAG,CAACV;QAClBQ,cAAcE,GAAG,CAACR;QAClB,OAAO;YACLI,cAAcK,MAAM,CAACX;YACrBQ,cAAcG,MAAM,CAACT;QACvB;IACF,GAAG;QAACb;QAAQpB;QAASmB;QAAUD;QAAUI;QAAKO;KAAY;IAE1D,MAAMc,YAA2D;QAC/D1C,SAAQ2C,SAAS;YACf3C,QAAQ2C;YACRf;QACF;QACA3B,YAAW0C,SAAS;YAClB1C,WAAW0C;YACXf;QACF;QACA1B,WAAUyC,SAAS;YACjBzC,UAAUyC;YACVf;QACF;QACAzB;YACEA;YACAiB,UAAU;QACZ;IACF;IAEA,OAAO;QACLC,KAAKC;QACL1B,OAAO;YAAE,GAAGA,KAAK;YAAE,GAAGC,SAAS;QAAC;QAChC6C;QACAd;QACAgB,mBAAmB;YACjB,GAAGF,SAAS;YACZ5C,SAASwB;QACX;IACF;AACF"}
@@ -106,7 +106,7 @@ export declare function getBottomCoord({ yMargin, initialY, elHeight, containerR
106
106
  */
107
107
  export declare function getBelowCoord({ yMargin, initialY, containerRect, }: YCoordConfig): Top;
108
108
  /**
109
- * @remarks \@since 6.0.0
109
+ * @since 6.0.0
110
110
  * @internal
111
111
  */
112
112
  export interface TransformOriginOptions extends PositionAnchor {
@@ -152,7 +152,7 @@ export declare function findSizingContainer(el: HTMLElement | null): HTMLElement
152
152
  */
153
153
  export declare function getElementRect(element: HTMLElement): DOMRect;
154
154
  /**
155
- * @remarks \@since 4.0.0
155
+ * @since 4.0.0
156
156
  * @internal
157
157
  */
158
158
  interface IsWithinViewportOptions {
@@ -160,7 +160,7 @@ interface IsWithinViewportOptions {
160
160
  fixedToElement: HTMLElement;
161
161
  }
162
162
  /**
163
- * @remarks \@since 4.0.0
163
+ * @since 4.0.0
164
164
  * @internal
165
165
  */
166
166
  export declare function isWithinViewport(options: IsWithinViewportOptions): boolean;
@@ -227,7 +227,7 @@
227
227
  return rect;
228
228
  }
229
229
  /**
230
- * @remarks \@since 4.0.0
230
+ * @since 4.0.0
231
231
  * @internal
232
232
  */ export function isWithinViewport(options) {
233
233
  const { fixedElement, fixedToElement } = options;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/positioning/utils.ts"],"sourcesContent":["import type { PositionAnchor } from \"./types.js\";\n\n/** @internal */\nexport interface XCoordConfig {\n xMargin: number;\n elWidth: number;\n initialX?: number;\n containerRect: DOMRect;\n}\n\n/** @internal */\nexport interface YCoordConfig {\n yMargin: number;\n elHeight: number;\n initialY?: number;\n containerRect: DOMRect;\n}\n\ntype Left = number;\ntype Top = number;\n\n/**\n * Creates the `left` style value for an element that should be fixed to the\n * (outer) left of the container element. So the right bounds of the fixed\n * element will be equal to the left bounds of the container element (before the\n * xMargin is applied).\n *\n * @internal\n */\nexport function getLeftCoord({\n xMargin,\n elWidth,\n initialX,\n containerRect,\n}: XCoordConfig): Left {\n return (initialX ?? containerRect.left) - elWidth - xMargin;\n}\n\n/**\n * Creates the `left` style value for an element that should be fixed to the\n * inner-left of the container element. So the left bounds of both the container\n * and fixed elements will overlap (before the xMargin is applied)\n *\n * @internal\n */\nexport function getInnerLeftCoord({\n xMargin,\n initialX,\n containerRect,\n}: XCoordConfig): Left {\n return (initialX ?? containerRect.left) + xMargin;\n}\n\n/**\n * Creates the `left` style value for an element that should be fixed to the\n * center of the container element. So the center point of the fixed element\n * should be the center point of the container element.\n *\n * Note: Unlike all the other horizontal positioning logic, the center position\n * does not use the xMargin.\n *\n * @internal\n */\nexport function getCenterXCoord({\n elWidth,\n initialX,\n containerRect,\n}: XCoordConfig): Left {\n const containerCenter = containerRect.width / 2;\n const elementCenter = elWidth / 2;\n return (initialX ?? containerRect.left + containerCenter) - elementCenter;\n}\n\n/**\n * Creates the `left` style value for an element that should be fixed to the\n * inner-right of the container element. So the right bounds for both the\n * container and fixed elements will overlap (before the xMargin is applied).\n *\n * @internal\n */\nexport function getInnerRightCoord({\n xMargin,\n elWidth,\n initialX,\n containerRect,\n}: XCoordConfig): Left {\n return (\n (initialX ?? containerRect.left + containerRect.width) - elWidth - xMargin\n );\n}\n\n/**\n * Creates the `left` style value for an element that should be fixed to the\n * (outer) right of the container element. So the left bounds of the fixed\n * element will overlap with the right bounds of the container element (before\n * the xMargin is applied).\n *\n * @internal\n */\nexport function getRightCoord({\n xMargin,\n initialX,\n containerRect,\n}: XCoordConfig): Left {\n return (initialX ?? containerRect.left + containerRect.width) + xMargin;\n}\n\n/**\n * Creates the `top` style value for an element that should be fixed above the\n * container element. So the bottom bounds of the fixed element will overlap\n * with the top bounds of the container element (before the yMargin is applied).\n *\n * @internal\n */\nexport function getAboveCoord({\n yMargin,\n initialY,\n elHeight,\n containerRect,\n}: YCoordConfig): Top {\n return (initialY ?? containerRect.top) - elHeight - yMargin;\n}\n\n/**\n * Creates the `top` style value for an element that should be fixed to the top\n * of the container element. So the top bounds for both the container and fixed\n * elements will overlap (before the yMargin is applied).\n *\n * @internal\n */\nexport function getTopCoord({\n yMargin,\n initialY,\n containerRect,\n}: YCoordConfig): Top {\n return (initialY ?? containerRect.top) + yMargin;\n}\n\n/**\n * Creates the `top` style value for an element that should be fixed vertically\n * centered relative to the container element. So the vertical center point for\n * the fixed element should overlap the vertical center point of the container\n * element.\n *\n * Note: Unlike all the other vertical positioning logic, the center position\n * does not use the yMargin.\n *\n * @internal\n */\nexport function getCenterYCoord({\n yMargin,\n elHeight,\n initialY,\n containerRect,\n}: YCoordConfig): Top {\n const containerCenter = containerRect.height / 2;\n const elementCenter = elHeight / 2;\n return (\n (initialY ?? containerRect.top + containerCenter + yMargin) - elementCenter\n );\n}\n\n/**\n * Creates the `top` style value for an element that should be fixed to the\n * bottom of the container element. So the top bounds of the fixed element\n * should overlap the bottom bounds of the container element (before the yMargin\n * is applied).\n *\n * @internal\n */\nexport function getBottomCoord({\n yMargin,\n initialY,\n elHeight,\n containerRect,\n}: YCoordConfig): Top {\n return (\n (initialY ?? containerRect.top + containerRect.height) - elHeight - yMargin\n );\n}\n\n/**\n * Creates the `top` style value for an element that should be fixed to the\n * bottom of the container element. So the bottom bounds of both the container\n * and fixed elements should overlap (before the yMargin is applied).\n *\n * @internal\n */\nexport function getBelowCoord({\n yMargin,\n initialY,\n containerRect,\n}: YCoordConfig): Top {\n return (initialY ?? containerRect.top + containerRect.height) + yMargin;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\nexport interface TransformOriginOptions extends PositionAnchor {\n transformOriginY?: number;\n}\n\n/**\n * This is a simple util that'll generate a css `transform-origin` string so\n * that the fixed element can animate from the correct point based on the\n * provided anchor.\n *\n * @param options - The anchor that should be used to create the transform origin\n * for.\n * @returns the transform origin string\n * @internal\n */\nexport function getTransformOrigin(options: TransformOriginOptions): string {\n const { transformOriginY: yPosition } = options;\n\n let x = \"0\";\n switch (options.x) {\n case \"right\":\n case \"inner-left\":\n x = \"0\";\n break;\n case \"center\":\n x = \"50%\";\n break;\n case \"left\":\n case \"inner-right\":\n x = \"100%\";\n break;\n default:\n x = \"0\";\n }\n\n let y = \"0\";\n if (typeof yPosition === \"number\") {\n y = `${yPosition}px`;\n } else {\n switch (options.y) {\n case \"above\":\n case \"bottom\":\n y = \"100%\";\n break;\n case \"center\":\n y = \"50%\";\n break;\n case \"below\":\n case \"top\":\n y = \"0\";\n break;\n default:\n y = \"0\";\n }\n }\n\n return `${x} ${y}`;\n}\n\n/**\n * Attempts to find a sizing container based on the provided HTMLElement. By\n * default, the sizing element will just be the provided element unless:\n * - the item has a known role within react-md that can target known classes\n * - the item has a `data-sizing-selector` attribute that is a valid query\n * selector for the nested item.\n *\n * NOTE: The `data-sizing-selector` will be run from the current element instead\n * of the `document`.\n *\n * @param el - The element to find a sizing container for.\n * @returns the sizing container relative to the provided element, or `null` if\n * none could be found.\n * @throws This error will be thrown if using the `data-query-selector` and the\n * query selector does not return an element on the page.\n * @internal\n */\nexport function findSizingContainer(\n el: HTMLElement | null\n): HTMLElement | null {\n if (!el) {\n return null;\n }\n\n if (/(tree|list)item/.test(el.getAttribute(\"role\") || \"\")) {\n const content = el.querySelector(\n \".rmd-tree-item__content, .rmd-item-text\"\n ) as HTMLElement;\n if (content) {\n return content;\n }\n } else if (el.getAttribute(\"type\") === \"file\") {\n const label = document.querySelector<HTMLLabelElement>(`[for=\"${el.id}\"]`);\n if (label) {\n return label;\n }\n }\n\n const data = el.getAttribute(\"data-sizing-selector\");\n if (data) {\n const content = el.querySelector(data) as HTMLElement;\n if (content) {\n return content;\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n throw new Error(\n \"Unable to find a child element using the `data-sizing-selector`\"\n );\n }\n }\n\n return el;\n}\n\n/**\n * This util is used to get the \"true\" `element.getBoundingClientRect()` that\n * ensures that transitions using transforms don't mess up the sizing so that\n * position calculations are easier to do.\n *\n * @param element - The element to get a rect for.\n * @returns either a DOMRect for the element\n * @internal\n */\nexport function getElementRect(element: HTMLElement): DOMRect {\n const cloned = element.cloneNode(true) as HTMLElement;\n // remove the id so there won't be two elements with the same id on the page\n cloned.removeAttribute(\"id\");\n\n // remove the role just in case the role would alert screen readers once added\n // to the dom\n cloned.removeAttribute(\"role\");\n\n // ensure the cloned node won't shift the page or be visible\n cloned.style.position = \"fixed\";\n cloned.style.visibility = \"hidden\";\n\n // reset positioning to get a \"pure\" calculation. otherwise this will mess up\n // the height and width if the element is able to line wrap.\n cloned.style.left = \"\";\n cloned.style.top = \"\";\n cloned.style.right = \"\";\n cloned.style.bottom = \"\";\n\n // reset transforms so that custom animations don't mess with the sizing\n cloned.style.transform = \"none\";\n\n const parent = element.parentElement || document.body;\n parent.appendChild(cloned);\n\n const rect = cloned.getBoundingClientRect();\n parent.removeChild(cloned);\n\n return rect;\n}\n\n/**\n * @remarks \\@since 4.0.0\n * @internal\n */\ninterface IsWithinViewportOptions {\n fixedElement: HTMLElement;\n fixedToElement: HTMLElement;\n}\n\n/**\n * @remarks \\@since 4.0.0\n * @internal\n */\nexport function isWithinViewport(options: IsWithinViewportOptions): boolean {\n const { fixedElement, fixedToElement } = options;\n const fixedElementRect = fixedElement.getBoundingClientRect();\n const fixedToElementRect = fixedToElement.getBoundingClientRect();\n const vh = window.innerHeight;\n const vw = window.innerWidth;\n const top = Math.min(fixedElementRect.top, fixedToElementRect.top);\n const right = Math.max(fixedElementRect.right, fixedToElementRect.right);\n const bottom = Math.max(fixedElementRect.bottom, fixedToElementRect.bottom);\n const left = Math.min(fixedElementRect.left, fixedToElementRect.left);\n\n return bottom >= 0 && top <= vh && right >= 0 && left <= vw;\n}\n"],"names":["getLeftCoord","xMargin","elWidth","initialX","containerRect","left","getInnerLeftCoord","getCenterXCoord","containerCenter","width","elementCenter","getInnerRightCoord","getRightCoord","getAboveCoord","yMargin","initialY","elHeight","top","getTopCoord","getCenterYCoord","height","getBottomCoord","getBelowCoord","getTransformOrigin","options","transformOriginY","yPosition","x","y","findSizingContainer","el","test","getAttribute","content","querySelector","label","document","id","data","process","env","NODE_ENV","Error","getElementRect","element","cloned","cloneNode","removeAttribute","style","position","visibility","right","bottom","transform","parent","parentElement","body","appendChild","rect","getBoundingClientRect","removeChild","isWithinViewport","fixedElement","fixedToElement","fixedElementRect","fixedToElementRect","vh","window","innerHeight","vw","innerWidth","Math","min","max"],"mappings":"AAqBA;;;;;;;CAOC,GACD,OAAO,SAASA,aAAa,EAC3BC,OAAO,EACPC,OAAO,EACPC,QAAQ,EACRC,aAAa,EACA;IACb,OAAO,AAACD,CAAAA,YAAYC,cAAcC,IAAI,AAAD,IAAKH,UAAUD;AACtD;AAEA;;;;;;CAMC,GACD,OAAO,SAASK,kBAAkB,EAChCL,OAAO,EACPE,QAAQ,EACRC,aAAa,EACA;IACb,OAAO,AAACD,CAAAA,YAAYC,cAAcC,IAAI,AAAD,IAAKJ;AAC5C;AAEA;;;;;;;;;CASC,GACD,OAAO,SAASM,gBAAgB,EAC9BL,OAAO,EACPC,QAAQ,EACRC,aAAa,EACA;IACb,MAAMI,kBAAkBJ,cAAcK,KAAK,GAAG;IAC9C,MAAMC,gBAAgBR,UAAU;IAChC,OAAO,AAACC,CAAAA,YAAYC,cAAcC,IAAI,GAAGG,eAAc,IAAKE;AAC9D;AAEA;;;;;;CAMC,GACD,OAAO,SAASC,mBAAmB,EACjCV,OAAO,EACPC,OAAO,EACPC,QAAQ,EACRC,aAAa,EACA;IACb,OACE,AAACD,CAAAA,YAAYC,cAAcC,IAAI,GAAGD,cAAcK,KAAK,AAAD,IAAKP,UAAUD;AAEvE;AAEA;;;;;;;CAOC,GACD,OAAO,SAASW,cAAc,EAC5BX,OAAO,EACPE,QAAQ,EACRC,aAAa,EACA;IACb,OAAO,AAACD,CAAAA,YAAYC,cAAcC,IAAI,GAAGD,cAAcK,KAAK,AAAD,IAAKR;AAClE;AAEA;;;;;;CAMC,GACD,OAAO,SAASY,cAAc,EAC5BC,OAAO,EACPC,QAAQ,EACRC,QAAQ,EACRZ,aAAa,EACA;IACb,OAAO,AAACW,CAAAA,YAAYX,cAAca,GAAG,AAAD,IAAKD,WAAWF;AACtD;AAEA;;;;;;CAMC,GACD,OAAO,SAASI,YAAY,EAC1BJ,OAAO,EACPC,QAAQ,EACRX,aA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AwE;IACxEP,OAAOG,KAAK,CAACK,SAAS,GAAG;IAEzB,MAAMC,SAASV,QAAQW,aAAa,IAAInB,SAASoB,IAAI;IACrDF,OAAOG,WAAW,CAACZ;IAEnB,MAAMa,OAAOb,OAAOc,qBAAqB;IACzCL,OAAOM,WAAW,CAACf;IAEnB,OAAOa;AACT;AAWA;;;CAGC,GACD,OAAO,SAASG,iBAAiBrC,OAAgC;IAC/D,MAAM,EAAEsC,YAAY,EAAEC,cAAc,EAAE,GAAGvC;IACzC,MAAMwC,mBAAmBF,aAAaH,qBAAqB;IAC3D,MAAMM,qBAAqBF,eAAeJ,qBAAqB;IAC/D,MAAMO,KAAKC,OAAOC,WAAW;IAC7B,MAAMC,KAAKF,OAAOG,UAAU;IAC5B,MAAMrD,MAAMsD,KAAKC,GAAG,CAACR,iBAAiB/C,GAAG,EAAEgD,mBAAmBhD,GAAG;IACjE,MAAMkC,QAAQoB,KAAKE,GAAG,CAACT,iBAAiBb,KAAK,EAAEc,mBAAmBd,KAAK;IACvE,MAAMC,SAASmB,KAAKE,GAAG,CAACT,iBAAiBZ,MAAM,EAAEa,mBAAmBb,MAAM;IAC1E,MAAM/C,OAAOkE,KAAKC,GAAG,CAACR,iBAAiB3D,IAAI,EAAE4D,mBAAmB5D,IAAI;IAEpE,OAAO+C,UAAU,KAAKnC,OAAOiD,MAAMf,SAAS,KAAK9C,QAAQgE;AAC3D"}
1
+ {"version":3,"sources":["../../src/positioning/utils.ts"],"sourcesContent":["import type { PositionAnchor } from \"./types.js\";\n\n/** @internal */\nexport interface XCoordConfig {\n xMargin: number;\n elWidth: number;\n initialX?: number;\n containerRect: DOMRect;\n}\n\n/** @internal */\nexport interface YCoordConfig {\n yMargin: number;\n elHeight: number;\n initialY?: number;\n containerRect: DOMRect;\n}\n\ntype Left = number;\ntype Top = number;\n\n/**\n * Creates the `left` style value for an element that should be fixed to the\n * (outer) left of the container element. So the right bounds of the fixed\n * element will be equal to the left bounds of the container element (before the\n * xMargin is applied).\n *\n * @internal\n */\nexport function getLeftCoord({\n xMargin,\n elWidth,\n initialX,\n containerRect,\n}: XCoordConfig): Left {\n return (initialX ?? containerRect.left) - elWidth - xMargin;\n}\n\n/**\n * Creates the `left` style value for an element that should be fixed to the\n * inner-left of the container element. So the left bounds of both the container\n * and fixed elements will overlap (before the xMargin is applied)\n *\n * @internal\n */\nexport function getInnerLeftCoord({\n xMargin,\n initialX,\n containerRect,\n}: XCoordConfig): Left {\n return (initialX ?? containerRect.left) + xMargin;\n}\n\n/**\n * Creates the `left` style value for an element that should be fixed to the\n * center of the container element. So the center point of the fixed element\n * should be the center point of the container element.\n *\n * Note: Unlike all the other horizontal positioning logic, the center position\n * does not use the xMargin.\n *\n * @internal\n */\nexport function getCenterXCoord({\n elWidth,\n initialX,\n containerRect,\n}: XCoordConfig): Left {\n const containerCenter = containerRect.width / 2;\n const elementCenter = elWidth / 2;\n return (initialX ?? containerRect.left + containerCenter) - elementCenter;\n}\n\n/**\n * Creates the `left` style value for an element that should be fixed to the\n * inner-right of the container element. So the right bounds for both the\n * container and fixed elements will overlap (before the xMargin is applied).\n *\n * @internal\n */\nexport function getInnerRightCoord({\n xMargin,\n elWidth,\n initialX,\n containerRect,\n}: XCoordConfig): Left {\n return (\n (initialX ?? containerRect.left + containerRect.width) - elWidth - xMargin\n );\n}\n\n/**\n * Creates the `left` style value for an element that should be fixed to the\n * (outer) right of the container element. So the left bounds of the fixed\n * element will overlap with the right bounds of the container element (before\n * the xMargin is applied).\n *\n * @internal\n */\nexport function getRightCoord({\n xMargin,\n initialX,\n containerRect,\n}: XCoordConfig): Left {\n return (initialX ?? containerRect.left + containerRect.width) + xMargin;\n}\n\n/**\n * Creates the `top` style value for an element that should be fixed above the\n * container element. So the bottom bounds of the fixed element will overlap\n * with the top bounds of the container element (before the yMargin is applied).\n *\n * @internal\n */\nexport function getAboveCoord({\n yMargin,\n initialY,\n elHeight,\n containerRect,\n}: YCoordConfig): Top {\n return (initialY ?? containerRect.top) - elHeight - yMargin;\n}\n\n/**\n * Creates the `top` style value for an element that should be fixed to the top\n * of the container element. So the top bounds for both the container and fixed\n * elements will overlap (before the yMargin is applied).\n *\n * @internal\n */\nexport function getTopCoord({\n yMargin,\n initialY,\n containerRect,\n}: YCoordConfig): Top {\n return (initialY ?? containerRect.top) + yMargin;\n}\n\n/**\n * Creates the `top` style value for an element that should be fixed vertically\n * centered relative to the container element. So the vertical center point for\n * the fixed element should overlap the vertical center point of the container\n * element.\n *\n * Note: Unlike all the other vertical positioning logic, the center position\n * does not use the yMargin.\n *\n * @internal\n */\nexport function getCenterYCoord({\n yMargin,\n elHeight,\n initialY,\n containerRect,\n}: YCoordConfig): Top {\n const containerCenter = containerRect.height / 2;\n const elementCenter = elHeight / 2;\n return (\n (initialY ?? containerRect.top + containerCenter + yMargin) - elementCenter\n );\n}\n\n/**\n * Creates the `top` style value for an element that should be fixed to the\n * bottom of the container element. So the top bounds of the fixed element\n * should overlap the bottom bounds of the container element (before the yMargin\n * is applied).\n *\n * @internal\n */\nexport function getBottomCoord({\n yMargin,\n initialY,\n elHeight,\n containerRect,\n}: YCoordConfig): Top {\n return (\n (initialY ?? containerRect.top + containerRect.height) - elHeight - yMargin\n );\n}\n\n/**\n * Creates the `top` style value for an element that should be fixed to the\n * bottom of the container element. So the bottom bounds of both the container\n * and fixed elements should overlap (before the yMargin is applied).\n *\n * @internal\n */\nexport function getBelowCoord({\n yMargin,\n initialY,\n containerRect,\n}: YCoordConfig): Top {\n return (initialY ?? containerRect.top + containerRect.height) + yMargin;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport interface TransformOriginOptions extends PositionAnchor {\n transformOriginY?: number;\n}\n\n/**\n * This is a simple util that'll generate a css `transform-origin` string so\n * that the fixed element can animate from the correct point based on the\n * provided anchor.\n *\n * @param options - The anchor that should be used to create the transform origin\n * for.\n * @returns the transform origin string\n * @internal\n */\nexport function getTransformOrigin(options: TransformOriginOptions): string {\n const { transformOriginY: yPosition } = options;\n\n let x = \"0\";\n switch (options.x) {\n case \"right\":\n case \"inner-left\":\n x = \"0\";\n break;\n case \"center\":\n x = \"50%\";\n break;\n case \"left\":\n case \"inner-right\":\n x = \"100%\";\n break;\n default:\n x = \"0\";\n }\n\n let y = \"0\";\n if (typeof yPosition === \"number\") {\n y = `${yPosition}px`;\n } else {\n switch (options.y) {\n case \"above\":\n case \"bottom\":\n y = \"100%\";\n break;\n case \"center\":\n y = \"50%\";\n break;\n case \"below\":\n case \"top\":\n y = \"0\";\n break;\n default:\n y = \"0\";\n }\n }\n\n return `${x} ${y}`;\n}\n\n/**\n * Attempts to find a sizing container based on the provided HTMLElement. By\n * default, the sizing element will just be the provided element unless:\n * - the item has a known role within react-md that can target known classes\n * - the item has a `data-sizing-selector` attribute that is a valid query\n * selector for the nested item.\n *\n * NOTE: The `data-sizing-selector` will be run from the current element instead\n * of the `document`.\n *\n * @param el - The element to find a sizing container for.\n * @returns the sizing container relative to the provided element, or `null` if\n * none could be found.\n * @throws This error will be thrown if using the `data-query-selector` and the\n * query selector does not return an element on the page.\n * @internal\n */\nexport function findSizingContainer(\n el: HTMLElement | null\n): HTMLElement | null {\n if (!el) {\n return null;\n }\n\n if (/(tree|list)item/.test(el.getAttribute(\"role\") || \"\")) {\n const content = el.querySelector(\n \".rmd-tree-item__content, .rmd-item-text\"\n ) as HTMLElement;\n if (content) {\n return content;\n }\n } else if (el.getAttribute(\"type\") === \"file\") {\n const label = document.querySelector<HTMLLabelElement>(`[for=\"${el.id}\"]`);\n if (label) {\n return label;\n }\n }\n\n const data = el.getAttribute(\"data-sizing-selector\");\n if (data) {\n const content = el.querySelector(data) as HTMLElement;\n if (content) {\n return content;\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n throw new Error(\n \"Unable to find a child element using the `data-sizing-selector`\"\n );\n }\n }\n\n return el;\n}\n\n/**\n * This util is used to get the \"true\" `element.getBoundingClientRect()` that\n * ensures that transitions using transforms don't mess up the sizing so that\n * position calculations are easier to do.\n *\n * @param element - The element to get a rect for.\n * @returns either a DOMRect for the element\n * @internal\n */\nexport function getElementRect(element: HTMLElement): DOMRect {\n const cloned = element.cloneNode(true) as HTMLElement;\n // remove the id so there won't be two elements with the same id on the page\n cloned.removeAttribute(\"id\");\n\n // remove the role just in case the role would alert screen readers once added\n // to the dom\n cloned.removeAttribute(\"role\");\n\n // ensure the cloned node won't shift the page or be visible\n cloned.style.position = \"fixed\";\n cloned.style.visibility = \"hidden\";\n\n // reset positioning to get a \"pure\" calculation. otherwise this will mess up\n // the height and width if the element is able to line wrap.\n cloned.style.left = \"\";\n cloned.style.top = \"\";\n cloned.style.right = \"\";\n cloned.style.bottom = \"\";\n\n // reset transforms so that custom animations don't mess with the sizing\n cloned.style.transform = \"none\";\n\n const parent = element.parentElement || document.body;\n parent.appendChild(cloned);\n\n const rect = cloned.getBoundingClientRect();\n parent.removeChild(cloned);\n\n return rect;\n}\n\n/**\n * @since 4.0.0\n * @internal\n */\ninterface IsWithinViewportOptions {\n fixedElement: HTMLElement;\n fixedToElement: HTMLElement;\n}\n\n/**\n * @since 4.0.0\n * @internal\n */\nexport function isWithinViewport(options: IsWithinViewportOptions): boolean {\n const { fixedElement, fixedToElement } = options;\n const fixedElementRect = fixedElement.getBoundingClientRect();\n const fixedToElementRect = fixedToElement.getBoundingClientRect();\n const vh = window.innerHeight;\n const vw = window.innerWidth;\n const top = Math.min(fixedElementRect.top, fixedToElementRect.top);\n const right = Math.max(fixedElementRect.right, fixedToElementRect.right);\n const bottom = Math.max(fixedElementRect.bottom, fixedToElementRect.bottom);\n const left = Math.min(fixedElementRect.left, fixedToElementRect.left);\n\n return bottom >= 0 && top <= vh && right >= 0 && left <= vw;\n}\n"],"names":["getLeftCoord","xMargin","elWidth","initialX","containerRect","left","getInnerLeftCoord","getCenterXCoord","containerCenter","width","elementCenter","getInnerRightCoord","getRightCoord","getAboveCoord","yMargin","initialY","elHeight","top","getTopCoord","getCenterYCoord","height","getBottomCoord","getBelowCoord","getTransformOrigin","options","transformOriginY","yPosition","x","y","findSizingContainer","el","test","getAttribute","content","querySelector","label","document","id","data","process","env","NODE_ENV","Error","getElementRect","element","cloned","cloneNode","removeAttribute","style","position","visibility","right","bottom","transform","parent","parentElement","body","appendChild","rect","getBoundingClientRect","removeChild","isWithinViewport","fixedElement","fixedToElement","fixedElementRect","fixedToElementRect","vh","window","innerHeight","vw","innerWidth","Math","min","max"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAqBA;;;;;;;CAOC,GACD,OAAO,SAASA,aAAa,EAC3BC,OAAO,EACPC,OAAO,EACPC,QAAQ,EACRC,aAAa,EACA;IACb,OAAO,AAACD,CAAAA,YAAYC,cAAcC,IAAI,AAAD,IAAKH,UAAUD;AACtD;AAEA;;;;;;CAMC,GACD,OAAO,SAASK,kBAAkB,EAChCL,OAAO,EACPE,QAAQ,EACRC,aAAa,EACA;IACb,OAAO,AAACD,CAAAA,YAAYC,cAAcC,IAAI,AAAD,IAAKJ;AAC5C;AAEA;;;;;;;;;CASC,GACD,OAAO,SAASM,gBAAgB,EAC9BL,OAAO,EACPC,QAAQ,EACRC,aAAa,EACA;IACb,MAAMI,kBAAkBJ,cAAcK,KAAK,GAAG;IAC9C,MAAMC,gBAAgBR,UAAU;IAChC,OAAO,AAACC,CAAAA,YAAYC,cAAcC,IAAI,GAAGG,eAAc,IAAKE;AAC9D;AAEA;;;;;;CAMC,GACD,OAAO,SAASC,mBAAmB,EACjCV,OAAO,EACPC,OAAO,EACPC,QAAQ,EACRC,aAAa,EACA;IACb,OACE,AAACD,CAAAA,YAA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ACR,iBAAiB3D,IAAI,EAAE4D,mBAAmB5D,IAAI;IAEpE,OAAO+C,UAAU,KAAKnC,OAAOiD,MAAMf,SAAS,KAAK9C,QAAQgE;AAC3D"}
@@ -2,7 +2,7 @@ import { type CSSProperties, type HTMLAttributes } from "react";
2
2
  import { type LabelRequiredForA11y } from "../types.js";
3
3
  import { type ProgressProps } from "./types.js";
4
4
  /**
5
- * @remarks \@since 6.0.0
5
+ * @since 6.0.0
6
6
  * Removed the `determinateRotateDegrees` prop since the determinate state no
7
7
  * longer rotates while increasing value.
8
8
  * Added the `disableShrink` prop.
@@ -73,9 +73,8 @@ export interface CircularProgressProps extends Omit<HTMLAttributes<HTMLSpanEleme
73
73
  * Set to `true` to render as a smaller size.
74
74
  *
75
75
  * @defaultValue `false`
76
- * @remarks
77
- * \@since 2.3.0
78
- * \@since 6.0.0 Renamed from `small`
76
+ * @since 2.3.0
77
+ * @since 6.0.0 Renamed from `small`
79
78
  */
80
79
  dense?: boolean;
81
80
  /**
@@ -84,15 +83,14 @@ export interface CircularProgressProps extends Omit<HTMLAttributes<HTMLSpanEleme
84
83
  * loading spinners are displayed at once on the page.
85
84
  *
86
85
  * @defaultValue `false`
87
- * @remarks \@since 6.0.0
86
+ * @since 6.0.0
88
87
  */
89
88
  disableShrink?: boolean;
90
89
  }
91
90
  /**
92
91
  * **Server Component**
93
92
  *
94
- * @example
95
- * Indeterminate Example
93
+ * @example Indeterminate Example
96
94
  * ```tsx
97
95
  * import { CircularProgress } from "@react-md/core":
98
96
  * import { type ReactElement } from "react";
@@ -102,8 +100,7 @@ export interface CircularProgressProps extends Omit<HTMLAttributes<HTMLSpanEleme
102
100
  * }
103
101
  * ```
104
102
  *
105
- * @example
106
- * Determinate Example
103
+ * @example Determinate Example
107
104
  * ```tsx
108
105
  * import { CircularProgress } from "@react-md/core":
109
106
  * import { useState, type ReactElement } from "react";
@@ -116,7 +113,7 @@ export interface CircularProgressProps extends Omit<HTMLAttributes<HTMLSpanEleme
116
113
  * }
117
114
  * ```
118
115
  *
119
- * @remarks \@since 6.0.0 Updated the determinate circular progress to no longer
116
+ * @since 6.0.0 Updated the determinate circular progress to no longer
120
117
  * rotate while increasing the value and require a label for accessibility.
121
118
  */
122
119
  export declare const CircularProgress: import("react").ForwardRefExoticComponent<LabelRequiredForA11y<CircularProgressProps> & import("react").RefAttributes<HTMLSpanElement>>;
@@ -9,8 +9,7 @@ const styles = bem("rmd-circular-progress");
9
9
  /**
10
10
  * **Server Component**
11
11
  *
12
- * @example
13
- * Indeterminate Example
12
+ * @example Indeterminate Example
14
13
  * ```tsx
15
14
  * import { CircularProgress } from "@react-md/core":
16
15
  * import { type ReactElement } from "react";
@@ -20,8 +19,7 @@ const styles = bem("rmd-circular-progress");
20
19
  * }
21
20
  * ```
22
21
  *
23
- * @example
24
- * Determinate Example
22
+ * @example Determinate Example
25
23
  * ```tsx
26
24
  * import { CircularProgress } from "@react-md/core":
27
25
  * import { useState, type ReactElement } from "react";
@@ -34,7 +32,7 @@ const styles = bem("rmd-circular-progress");
34
32
  * }
35
33
  * ```
36
34
  *
37
- * @remarks \@since 6.0.0 Updated the determinate circular progress to no longer
35
+ * @since 6.0.0 Updated the determinate circular progress to no longer
38
36
  * rotate while increasing the value and require a label for accessibility.
39
37
  */ export const CircularProgress = /*#__PURE__*/ forwardRef(function CircularProgress(props, ref) {
40
38
  const { id: propId, className, svgStyle, svgClassName, circleStyle: propCircleStyle, circleClassName, value, min = 0, max = 100, radius = 30, center = 33, viewBox = "0 0 66 66", theme = "primary", dense = false, dashoffset = 187, disableShrink = false, disableCentered = false, disableTransition = false, ...remaining } = props;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/progress/CircularProgress.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n useMemo,\n type CSSProperties,\n type HTMLAttributes,\n} from \"react\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { getPercentage } from \"../utils/getPercentage.js\";\nimport { type ProgressProps } from \"./types.js\";\n\n/**\n * @remarks \\@since 6.0.0\n * Removed the `determinateRotateDegrees` prop since the determinate state no\n * longer rotates while increasing value.\n * Added the `disableShrink` prop.\n * Renamed the `small` prop to `dense` to match other components.\n */\nexport interface CircularProgressProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, \"id\">,\n ProgressProps {\n /**\n * An optional style to apply to the svg within the circular progress. The\n * values of this style object will be merged with the current determinate\n * style (if it exists).\n */\n svgStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the svg within the circular progress.\n */\n svgClassName?: string;\n\n /**\n * An optional style to apply to the circle within the circular progress. The\n * values of this style object will be merged with the current determinate\n * style (if it exists).\n */\n circleStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the circle within the circular progress.\n */\n circleClassName?: string;\n\n /**\n * The radius for the circle. It is generally recommended to have the radius\n * be 1/2 of the viewbox and minus a few more pixels so that there is some\n * surrounding padding. You probably shouldn't really be changing this prop\n * though.\n *\n * @defaultValue `30`\n */\n radius?: number;\n\n /**\n * The center point for the circle. This should be half of the `viewBox` prop\n * 99% of the time and probably won't be changed.\n *\n * @defaultValue `33`\n */\n center?: number;\n\n /**\n * The viewbox for the child svg. I wouldn't recommend changing this value as\n * you will also need to update the `dashoffset` in both Sass and this prop to\n * get the animation to look nice again.\n *\n * @defaultValue `0 0 66 66`\n */\n viewBox?: string;\n\n /**\n * The `stroke-dashoffset` for the circle within the SVG. You probably won't\n * be changing this value that much as it should match the\n * `$rmd-progress-circle-dashoffset` Sass variable. This is really just used\n * to help to create the determinate progress animation.\n *\n * @defaultValue `187`\n */\n dashoffset?: number;\n\n /**\n * Boolean if the circular progress should be centered using left and right\n * margins.\n *\n * @defaultValue `false`\n */\n disableCentered?: boolean;\n\n /**\n * Set to `true` to render as a smaller size.\n *\n * @defaultValue `false`\n * @remarks\n * \\@since 2.3.0\n * \\@since 6.0.0 Renamed from `small`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to update the indeterminate behavior to only rotate\n * which will increase performance during CPU-intensive tasks or when many\n * loading spinners are displayed at once on the page.\n *\n * @defaultValue `false`\n * @remarks \\@since 6.0.0\n */\n disableShrink?: boolean;\n}\n\nconst styles = bem(\"rmd-circular-progress\");\n\n/**\n * **Server Component**\n *\n * @example\n * Indeterminate Example\n * ```tsx\n * import { CircularProgress } from \"@react-md/core\":\n * import { type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <CircularProgress aria-label=\"Loading\" />;\n * }\n * ```\n *\n * @example\n * Determinate Example\n * ```tsx\n * import { CircularProgress } from \"@react-md/core\":\n * import { useState, type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * // a number from 0 - 100\n * const [progress, setProgress] = useState(0);\n *\n * return <CircularProgress aria-label=\"File upload\" value={progress} />;\n * }\n * ```\n *\n * @remarks \\@since 6.0.0 Updated the determinate circular progress to no longer\n * rotate while increasing the value and require a label for accessibility.\n */\nexport const CircularProgress = forwardRef<\n HTMLSpanElement,\n LabelRequiredForA11y<CircularProgressProps>\n>(function CircularProgress(props, ref) {\n const {\n id: propId,\n className,\n svgStyle,\n svgClassName,\n circleStyle: propCircleStyle,\n circleClassName,\n value,\n min = 0,\n max = 100,\n radius = 30,\n center = 33,\n viewBox = \"0 0 66 66\",\n theme = \"primary\",\n dense = false,\n dashoffset = 187,\n disableShrink = false,\n disableCentered = false,\n disableTransition = false,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"circular-progress\");\n let progress: number | undefined;\n if (typeof value === \"number\") {\n progress = getPercentage({ min, max, value, validate: true });\n }\n\n const circleStyle = useMemo(() => {\n if (typeof progress !== \"number\") {\n return propCircleStyle;\n }\n\n return {\n ...propCircleStyle,\n strokeDashoffset: dashoffset - dashoffset * progress,\n };\n }, [progress, propCircleStyle, dashoffset]);\n\n const determinate = typeof progress === \"number\";\n const indeterminate = !determinate;\n return (\n <span\n {...remaining}\n id={id}\n ref={ref}\n role=\"progressbar\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={value}\n className={cnb(\n styles({ dense, centered: !disableCentered }),\n theme !== \"current-color\" && cssUtils({ textColor: theme }),\n className\n )}\n >\n <svg\n style={svgStyle}\n className={cnb(\n styles(\"svg\", {\n determinate,\n indeterminate: indeterminate && !disableShrink,\n \"rotate-only\": indeterminate && disableShrink,\n }),\n svgClassName\n )}\n viewBox={viewBox}\n >\n <circle\n style={circleStyle}\n className={cnb(\n styles(\"circle\", {\n animate: !disableTransition && determinate,\n determinate,\n indeterminate: indeterminate && !disableShrink,\n \"rotate-only\": indeterminate && disableShrink,\n }),\n circleClassName\n )}\n r={radius}\n cx={center}\n cy={center}\n />\n </svg>\n </span>\n );\n});\n"],"names":["cnb","forwardRef","useMemo","cssUtils","useEnsuredId","bem","getPercentage","styles","CircularProgress","props","ref","id","propId","className","svgStyle","svgClassName","circleStyle","propCircleStyle","circleClassName","value","min","max","radius","center","viewBox","theme","dense","dashoffset","disableShrink","disableCentered","disableTransition","remaining","progress","validate","strokeDashoffset","determinate","indeterminate","span","role","aria-valuemin","aria-valuemax","aria-valuenow","centered","textColor","svg","style","circle","animate","r","cx","cy"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,EACVC,OAAO,QAGF,QAAQ;AACf,SAASC,QAAQ,QAAQ,iBAAiB;AAE1C,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SAASC,aAAa,QAAQ,4BAA4B;AAuG1D,MAAMC,SAASF,IAAI;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BC,GACD,OAAO,MAAMG,iCAAmBP,WAG9B,SAASO,iBAAiBC,KAAK,EAAEC,GAAG;IACpC,MAAM,EACJC,IAAIC,MAAM,EACVC,SAAS,EACTC,QAAQ,EACRC,YAAY,EACZC,aAAaC,eAAe,EAC5B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R;gBAClC,IACAV;gBAEF8B,GAAG1B;gBACH2B,IAAI1B;gBACJ2B,IAAI3B;;;;AAKd,GAAG"}
1
+ {"version":3,"sources":["../../src/progress/CircularProgress.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n useMemo,\n type CSSProperties,\n type HTMLAttributes,\n} from \"react\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { getPercentage } from \"../utils/getPercentage.js\";\nimport { type ProgressProps } from \"./types.js\";\n\n/**\n * @since 6.0.0\n * Removed the `determinateRotateDegrees` prop since the determinate state no\n * longer rotates while increasing value.\n * Added the `disableShrink` prop.\n * Renamed the `small` prop to `dense` to match other components.\n */\nexport interface CircularProgressProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, \"id\">,\n ProgressProps {\n /**\n * An optional style to apply to the svg within the circular progress. The\n * values of this style object will be merged with the current determinate\n * style (if it exists).\n */\n svgStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the svg within the circular progress.\n */\n svgClassName?: string;\n\n /**\n * An optional style to apply to the circle within the circular progress. The\n * values of this style object will be merged with the current determinate\n * style (if it exists).\n */\n circleStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the circle within the circular progress.\n */\n circleClassName?: string;\n\n /**\n * The radius for the circle. It is generally recommended to have the radius\n * be 1/2 of the viewbox and minus a few more pixels so that there is some\n * surrounding padding. You probably shouldn't really be changing this prop\n * though.\n *\n * @defaultValue `30`\n */\n radius?: number;\n\n /**\n * The center point for the circle. This should be half of the `viewBox` prop\n * 99% of the time and probably won't be changed.\n *\n * @defaultValue `33`\n */\n center?: number;\n\n /**\n * The viewbox for the child svg. I wouldn't recommend changing this value as\n * you will also need to update the `dashoffset` in both Sass and this prop to\n * get the animation to look nice again.\n *\n * @defaultValue `0 0 66 66`\n */\n viewBox?: string;\n\n /**\n * The `stroke-dashoffset` for the circle within the SVG. You probably won't\n * be changing this value that much as it should match the\n * `$rmd-progress-circle-dashoffset` Sass variable. This is really just used\n * to help to create the determinate progress animation.\n *\n * @defaultValue `187`\n */\n dashoffset?: number;\n\n /**\n * Boolean if the circular progress should be centered using left and right\n * margins.\n *\n * @defaultValue `false`\n */\n disableCentered?: boolean;\n\n /**\n * Set to `true` to render as a smaller size.\n *\n * @defaultValue `false`\n * @since 2.3.0\n * @since 6.0.0 Renamed from `small`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to update the indeterminate behavior to only rotate\n * which will increase performance during CPU-intensive tasks or when many\n * loading spinners are displayed at once on the page.\n *\n * @defaultValue `false`\n * @since 6.0.0\n */\n disableShrink?: boolean;\n}\n\nconst styles = bem(\"rmd-circular-progress\");\n\n/**\n * **Server Component**\n *\n * @example Indeterminate Example\n * ```tsx\n * import { CircularProgress } from \"@react-md/core\":\n * import { type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <CircularProgress aria-label=\"Loading\" />;\n * }\n * ```\n *\n * @example Determinate Example\n * ```tsx\n * import { CircularProgress } from \"@react-md/core\":\n * import { useState, type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * // a number from 0 - 100\n * const [progress, setProgress] = useState(0);\n *\n * return <CircularProgress aria-label=\"File upload\" value={progress} />;\n * }\n * ```\n *\n * @since 6.0.0 Updated the determinate circular progress to no longer\n * rotate while increasing the value and require a label for accessibility.\n */\nexport const CircularProgress = forwardRef<\n HTMLSpanElement,\n LabelRequiredForA11y<CircularProgressProps>\n>(function CircularProgress(props, ref) {\n const {\n id: propId,\n className,\n svgStyle,\n svgClassName,\n circleStyle: propCircleStyle,\n circleClassName,\n value,\n min = 0,\n max = 100,\n radius = 30,\n center = 33,\n viewBox = \"0 0 66 66\",\n theme = \"primary\",\n dense = false,\n dashoffset = 187,\n disableShrink = false,\n disableCentered = false,\n disableTransition = false,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"circular-progress\");\n let progress: number | undefined;\n if (typeof value === \"number\") {\n progress = getPercentage({ min, max, value, validate: true });\n }\n\n const circleStyle = useMemo(() => {\n if (typeof progress !== \"number\") {\n return propCircleStyle;\n }\n\n return {\n ...propCircleStyle,\n strokeDashoffset: dashoffset - dashoffset * progress,\n };\n }, [progress, propCircleStyle, dashoffset]);\n\n const determinate = typeof progress === \"number\";\n const indeterminate = !determinate;\n return (\n <span\n {...remaining}\n id={id}\n ref={ref}\n role=\"progressbar\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={value}\n className={cnb(\n styles({ dense, centered: !disableCentered }),\n theme !== \"current-color\" && cssUtils({ textColor: theme }),\n className\n )}\n >\n <svg\n style={svgStyle}\n className={cnb(\n styles(\"svg\", {\n determinate,\n indeterminate: indeterminate && !disableShrink,\n \"rotate-only\": indeterminate && disableShrink,\n }),\n svgClassName\n )}\n viewBox={viewBox}\n >\n <circle\n style={circleStyle}\n className={cnb(\n styles(\"circle\", {\n animate: !disableTransition && determinate,\n determinate,\n indeterminate: indeterminate && !disableShrink,\n \"rotate-only\": indeterminate && disableShrink,\n }),\n circleClassName\n )}\n r={radius}\n cx={center}\n cy={center}\n />\n </svg>\n </span>\n );\n});\n"],"names":["cnb","forwardRef","useMemo","cssUtils","useEnsuredId","bem","getPercentage","styles","CircularProgress","props","ref","id","propId","className","svgStyle","svgClassName","circleStyle","propCircleStyle","circleClassName","value","min","max","radius","center","viewBox","theme","dense","dashoffset","disableShrink","disableCentered","disableTransition","remaining","progress","validate","strokeDashoffset","determinate","indeterminate","span","role","aria-valuemin","aria-valuemax","aria-valuenow","centered","textColor","svg","style","circle","animate","r","cx","cy"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,EACVC,OAAO,Q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AAgB,IAC3CJ,UAAU,mBAAmBtB,SAAS;YAAEwC,WAAWlB;QAAM,IACzDZ;kBAGF,cAAA,KAAC+B;YACCC,OAAO/B;YACPD,WAAWb,IACTO,OAAO,OAAO;gBACZ4B;gBACAC,eAAeA,iBAAiB,CAACR;gBACjC,eAAeQ,iBAAiBR;YAClC,IACAb;YAEFS,SAASA;sBAET,cAAA,KAACsB;gBACCD,OAAO7B;gBACPH,WAAWb,IACTO,OAAO,UAAU;oBACfwC,SAAS,CAACjB,qBAAqBK;oBAC/BA;oBACAC,eAAeA,iBAAiB,CAACR;oBACjC,eAAeQ,iBAAiBR;gBAClC,IACAV;gBAEF8B,GAAG1B;gBACH2B,IAAI1B;gBACJ2B,IAAI3B;;;;AAKd,GAAG"}
@@ -2,7 +2,7 @@ import { type CSSProperties, type HTMLAttributes } from "react";
2
2
  import { type LabelRequiredForA11y } from "../types.js";
3
3
  import { type ProgressProps } from "./types.js";
4
4
  /**
5
- * @remarks \@since 6.0.0 Added the `theme` prop
5
+ * @since 6.0.0 Added the `theme` prop
6
6
  */
7
7
  export interface LinearProgressProps extends Omit<HTMLAttributes<HTMLSpanElement>, "id" | "children">, ProgressProps {
8
8
  /**
@@ -45,8 +45,7 @@ export interface LinearProgressProps extends Omit<HTMLAttributes<HTMLSpanElement
45
45
  /**
46
46
  * **Server Component**
47
47
  *
48
- * @example
49
- * Indeterminate Example
48
+ * @example Indeterminate Example
50
49
  * ```tsx
51
50
  * import { LinearProgress } from "@react-md/core";
52
51
  * import { type ReactElement } from "react";
@@ -56,8 +55,7 @@ export interface LinearProgressProps extends Omit<HTMLAttributes<HTMLSpanElement
56
55
  * }
57
56
  * ```
58
57
  *
59
- * @example
60
- * Determinate Example
58
+ * @example Determinate Example
61
59
  * ```tsx
62
60
  * import { LinearProgress } from "@react-md/core";
63
61
  * import { useState, type ReactElement } from "react";
@@ -70,7 +68,7 @@ export interface LinearProgressProps extends Omit<HTMLAttributes<HTMLSpanElement
70
68
  * }
71
69
  * ```
72
70
  *
73
- * @remarks \@since 6.0.0 Supports rendering as any of the theme colors and
71
+ * @since 6.0.0 Supports rendering as any of the theme colors and
74
72
  * requires a label for accessibility.
75
73
  */
76
74
  export declare const LinearProgress: import("react").ForwardRefExoticComponent<LabelRequiredForA11y<LinearProgressProps> & import("react").RefAttributes<HTMLSpanElement>>;
@@ -9,8 +9,7 @@ const styles = bem("rmd-linear-progress");
9
9
  /**
10
10
  * **Server Component**
11
11
  *
12
- * @example
13
- * Indeterminate Example
12
+ * @example Indeterminate Example
14
13
  * ```tsx
15
14
  * import { LinearProgress } from "@react-md/core";
16
15
  * import { type ReactElement } from "react";
@@ -20,8 +19,7 @@ const styles = bem("rmd-linear-progress");
20
19
  * }
21
20
  * ```
22
21
  *
23
- * @example
24
- * Determinate Example
22
+ * @example Determinate Example
25
23
  * ```tsx
26
24
  * import { LinearProgress } from "@react-md/core";
27
25
  * import { useState, type ReactElement } from "react";
@@ -34,7 +32,7 @@ const styles = bem("rmd-linear-progress");
34
32
  * }
35
33
  * ```
36
34
  *
37
- * @remarks \@since 6.0.0 Supports rendering as any of the theme colors and
35
+ * @since 6.0.0 Supports rendering as any of the theme colors and
38
36
  * requires a label for accessibility.
39
37
  */ export const LinearProgress = /*#__PURE__*/ forwardRef(function LinearProgress(props, ref) {
40
38
  const { id: propId, style: propStyle, className, barStyle: propBarStyle, barClassName, min = 0, max = 100, value, reverse = false, theme = "primary", disableTransition = false, vertical = false, verticalHeight = 240, ...remaining } = props;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/progress/LinearProgress.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n useMemo,\n type CSSProperties,\n type HTMLAttributes,\n} from \"react\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { getPercentage } from \"../utils/getPercentage.js\";\nimport { type ProgressProps } from \"./types.js\";\n\n/**\n * @remarks \\@since 6.0.0 Added the `theme` prop\n */\nexport interface LinearProgressProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, \"id\" | \"children\">,\n ProgressProps {\n /**\n * An optional style to apply to the progress bar. This will be merged with\n * the current width or height tracking the progress when a `value` is also\n * provided.\n */\n barStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the progress bar.\n */\n barClassName?: string;\n\n /**\n * Boolean if the progress should be reversed. This will change the progress\n * direction from `left-to-right` to be `right-to-left`. If the current\n * language is a rtl language and this prop is enabled, the direction will\n * still be `left-to-right`.\n *\n * @defaultValue `false`\n */\n reverse?: boolean;\n\n /**\n * Boolean if the progress should be vertical instead of horizontal. When\n * this prop is set, you should also set the `verticalHeight` prop to a height\n * value you want for your progress bar.\n *\n * @defaultValue `false`\n */\n vertical?: boolean;\n\n /**\n * Since there isn't really a good way to have \"auto height\", you'll need to\n * manually set the progress bar's height with this prop to some pixel value.\n * If you'd prefer to set the height in Sass/css, set this value to `null`\n * instead since this value would be passed down as a `height` inline style.\n *\n * @defaultValue `240`\n */\n verticalHeight?: number | null;\n}\n\nconst styles = bem(\"rmd-linear-progress\");\n\n/**\n * **Server Component**\n *\n * @example\n * Indeterminate Example\n * ```tsx\n * import { LinearProgress } from \"@react-md/core\";\n * import { type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <LinearProgress aria-label=\"Loading\" />;\n * }\n * ```\n *\n * @example\n * Determinate Example\n * ```tsx\n * import { LinearProgress } from \"@react-md/core\";\n * import { useState, type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * // a number from 0 - 100\n * const [progress, setProgress] = useState(0);\n *\n * return <LinearProgress aria-label=\"File upload\" value={progress} />;\n * }\n * ```\n *\n * @remarks \\@since 6.0.0 Supports rendering as any of the theme colors and\n * requires a label for accessibility.\n */\nexport const LinearProgress = forwardRef<\n HTMLSpanElement,\n LabelRequiredForA11y<LinearProgressProps>\n>(function LinearProgress(props, ref) {\n const {\n id: propId,\n style: propStyle,\n className,\n barStyle: propBarStyle,\n barClassName,\n min = 0,\n max = 100,\n value,\n reverse = false,\n theme = \"primary\",\n disableTransition = false,\n vertical = false,\n verticalHeight = 240,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"linear-progress\");\n const style = useMemo(() => {\n if (!vertical || verticalHeight === null) {\n return propStyle;\n }\n\n return {\n ...propStyle,\n height: verticalHeight,\n };\n }, [propStyle, vertical, verticalHeight]);\n\n let progress: number | undefined;\n if (typeof value === \"number\") {\n progress = getPercentage({ min, max, value, validate: true });\n }\n const barStyle = useMemo(() => {\n if (typeof progress !== \"number\") {\n return propBarStyle;\n }\n\n const key = vertical ? \"height\" : \"width\";\n return {\n ...propBarStyle,\n [key]: `${progress * 100}%`,\n };\n }, [progress, propBarStyle, vertical]);\n\n const determinate = typeof progress === \"number\";\n const indeterminate = !determinate;\n return (\n <span\n {...remaining}\n id={id}\n ref={ref}\n style={style}\n role=\"progressbar\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={value}\n className={cnb(\n styles({\n vertical,\n horizontal: !vertical,\n determinate,\n indeterminate,\n }),\n theme !== \"current-color\" && cssUtils({ textColor: theme }),\n className\n )}\n >\n <span\n style={barStyle}\n className={cnb(\n styles(\"bar\", {\n vertical,\n \"vertical-reverse\": vertical && reverse,\n horizontal: !vertical,\n \"horizontal-reverse\": !vertical && reverse,\n animate: !disableTransition && determinate,\n determinate,\n indeterminate,\n \"determinate-reverse\": determinate && reverse && !vertical,\n \"determinate-vertical-reverse\": determinate && reverse && vertical,\n \"indeterminate-reverse\": indeterminate && reverse && !vertical,\n \"indeterminate-vertical\": indeterminate && vertical,\n \"indeterminate-vertical-reverse\":\n indeterminate && reverse && vertical,\n }),\n barClassName\n )}\n />\n </span>\n );\n});\n"],"names":["cnb","forwardRef","useMemo","cssUtils","useEnsuredId","bem","getPercentage","styles","LinearProgress","props","ref","id","propId","style","propStyle","className","barStyle","propBarStyle","barClassName","min","max","value","reverse","theme","disableTransition","vertical","verticalHeight","remaining","height","progress","validate","key","determinate","indeterminate","span","role","aria-valuemin","aria-valuemax","aria-valuenow","horizontal","textColor","animate"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,EACVC,OAAO,QAGF,QAAQ;AACf,SAASC,QAAQ,QAAQ,iBAAiB;AAE1C,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SAASC,aAAa,QAAQ,4BAA4B;AAmD1D,MAAMC,SAASF,IAAI;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BC,GACD,OAAO,MAAMG,+BAAiBP,WAG5B,SAASO,eAAeC,KAAK,EAAEC,GAAG;IAClC,MAAM,EACJC,IAAIC,MAAM,EACVC,OAAOC,SAAS,EAChBC,SAAS,EACTC,UAAUC,YAAY,EACtBC,YAAY,EACZC,MAAM,CAAC,EACPC,MAAM,GAAG,EACTC,KAAK,EACLC,UAAU,KAAK,EACfC,QAAQ,SAAS,EACjBC,oBAAoB,KAAK,EACzBC,WAAW,KAAK,EAChBC,iBAAiB,GAAG,EACpB,GAAGC,WACJ,GAAGlB;IAEJ,MAAME,KAAKP,aAAaQ,QAAQ;IAChC,MAAMC,QAAQX,QAAQ;QACpB,IAAI,CAACuB,YAAYC,mBAAmB,MAAM;YACxC,OAAOZ;QACT;QAEA,OAAO;YACL,GAAGA,SAAS;YACZc,QAAQF;QACV;IACF,GAAG;QAACZ;QAAWW;QAAUC;KAAe;IAExC,IAAIG;IACJ,IAAI,OAAOR,UAAU,UAAU;QAC7BQ,WAAWvB,cAAc;YAAEa;YAAKC;YAAKC;YAAOS,UAAU;QAAK;IAC7D;IACA,MAAMd,WAAWd,QAAQ;QACvB,IAAI,OAAO2B,aAAa,UAAU;YAChC,OAAOZ;QACT;QAEA,MAAMc,MAAMN,WAAW,WAAW;QAClC,OAAO;YACL,GAAGR,YAAY;YACf,CAACc,IAAI,EAAE,CAAC,EAAEF,WAAW,IAAI,CAAC,CAAC;QAC7B;IACF,GAAG;QAACA;QAAUZ;QAAcQ;KAAS;IAErC,MAAMO,cAAc,OAAOH,aAAa;IACxC,MAAMI,gBAAgB,CAACD;IACvB,qBACE,KAACE;QACE,GAAGP,SAAS;QACbhB,IAAIA;QACJD,KAAKA;QACLG,OAAOA;QACPsB,MAAK;QACLC,iBAAejB;QACfkB,iBAAejB;QACfkB,iBAAejB;QACfN,WAAWf,IACTO,OAAO;YACLkB;YACAc,YAAY,CAACd;YACbO;YACAC;QACF,IACAV,UAAU,mBAAmBpB,SAAS;YAAEqC,WAAWjB;QAAM,IACzDR;kBAGF,cAAA,KAACmB;YACCrB,OAAOG;YACPD,WAAWf,IACTO,OAAO,OAAO;gBACZkB;gBACA,oBAAoBA,YAAYH;gBAChCiB,YAAY,CAACd;gBACb,sBAAsB,CAACA,YAAYH;gBACnCmB,SAAS,CAACjB,qBAAqBQ;gBAC/BA;gBACAC;gBACA,uBAAuBD,eAAeV,WAAW,CAACG;gBAClD,gCAAgCO,eAAeV,WAAWG;gBAC1D,yBAAyBQ,iBAAiBX,WAAW,CAACG;gBACtD,0BAA0BQ,iBAAiBR;gBAC3C,kCACEQ,iBAAiBX,WAAWG;YAChC,IACAP;;;AAKV,GAAG"}
1
+ {"version":3,"sources":["../../src/progress/LinearProgress.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n useMemo,\n type CSSProperties,\n type HTMLAttributes,\n} from \"react\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { getPercentage } from \"../utils/getPercentage.js\";\nimport { type ProgressProps } from \"./types.js\";\n\n/**\n * @since 6.0.0 Added the `theme` prop\n */\nexport interface LinearProgressProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, \"id\" | \"children\">,\n ProgressProps {\n /**\n * An optional style to apply to the progress bar. This will be merged with\n * the current width or height tracking the progress when a `value` is also\n * provided.\n */\n barStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the progress bar.\n */\n barClassName?: string;\n\n /**\n * Boolean if the progress should be reversed. This will change the progress\n * direction from `left-to-right` to be `right-to-left`. If the current\n * language is a rtl language and this prop is enabled, the direction will\n * still be `left-to-right`.\n *\n * @defaultValue `false`\n */\n reverse?: boolean;\n\n /**\n * Boolean if the progress should be vertical instead of horizontal. When\n * this prop is set, you should also set the `verticalHeight` prop to a height\n * value you want for your progress bar.\n *\n * @defaultValue `false`\n */\n vertical?: boolean;\n\n /**\n * Since there isn't really a good way to have \"auto height\", you'll need to\n * manually set the progress bar's height with this prop to some pixel value.\n * If you'd prefer to set the height in Sass/css, set this value to `null`\n * instead since this value would be passed down as a `height` inline style.\n *\n * @defaultValue `240`\n */\n verticalHeight?: number | null;\n}\n\nconst styles = bem(\"rmd-linear-progress\");\n\n/**\n * **Server Component**\n *\n * @example Indeterminate Example\n * ```tsx\n * import { LinearProgress } from \"@react-md/core\";\n * import { type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <LinearProgress aria-label=\"Loading\" />;\n * }\n * ```\n *\n * @example Determinate Example\n * ```tsx\n * import { LinearProgress } from \"@react-md/core\";\n * import { useState, type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * // a number from 0 - 100\n * const [progress, setProgress] = useState(0);\n *\n * return <LinearProgress aria-label=\"File upload\" value={progress} />;\n * }\n * ```\n *\n * @since 6.0.0 Supports rendering as any of the theme colors and\n * requires a label for accessibility.\n */\nexport const LinearProgress = forwardRef<\n HTMLSpanElement,\n LabelRequiredForA11y<LinearProgressProps>\n>(function LinearProgress(props, ref) {\n const {\n id: propId,\n style: propStyle,\n className,\n barStyle: propBarStyle,\n barClassName,\n min = 0,\n max = 100,\n value,\n reverse = false,\n theme = \"primary\",\n disableTransition = false,\n vertical = false,\n verticalHeight = 240,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"linear-progress\");\n const style = useMemo(() => {\n if (!vertical || verticalHeight === null) {\n return propStyle;\n }\n\n return {\n ...propStyle,\n height: verticalHeight,\n };\n }, [propStyle, vertical, verticalHeight]);\n\n let progress: number | undefined;\n if (typeof value === \"number\") {\n progress = getPercentage({ min, max, value, validate: true });\n }\n const barStyle = useMemo(() => {\n if (typeof progress !== \"number\") {\n return propBarStyle;\n }\n\n const key = vertical ? \"height\" : \"width\";\n return {\n ...propBarStyle,\n [key]: `${progress * 100}%`,\n };\n }, [progress, propBarStyle, vertical]);\n\n const determinate = typeof progress === \"number\";\n const indeterminate = !determinate;\n return (\n <span\n {...remaining}\n id={id}\n ref={ref}\n style={style}\n role=\"progressbar\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={value}\n className={cnb(\n styles({\n vertical,\n horizontal: !vertical,\n determinate,\n indeterminate,\n }),\n theme !== \"current-color\" && cssUtils({ textColor: theme }),\n className\n )}\n >\n <span\n style={barStyle}\n className={cnb(\n styles(\"bar\", {\n vertical,\n \"vertical-reverse\": vertical && reverse,\n horizontal: !vertical,\n \"horizontal-reverse\": !vertical && reverse,\n animate: !disableTransition && determinate,\n determinate,\n indeterminate,\n \"determinate-reverse\": determinate && reverse && !vertical,\n \"determinate-vertical-reverse\": determinate && reverse && vertical,\n \"indeterminate-reverse\": indeterminate && reverse && !vertical,\n \"indeterminate-vertical\": indeterminate && vertical,\n \"indeterminate-vertical-reverse\":\n indeterminate && reverse && vertical,\n }),\n barClassName\n )}\n />\n </span>\n );\n});\n"],"names":["cnb","forwardRef","useMemo","cssUtils","useEnsuredId","bem","getPercentage","styles","LinearProgress","props","ref","id","propId","style","propStyle","className","barStyle","propBarStyle","barClassName","min","max","value","reverse","theme","disableTransition","vertical","verticalHeight","remaining","height","progress","validate","key","determinate","indeterminate","span","role","aria-valuemin","aria-valuemax","aria-valuenow","horizontal","textColor","animate"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;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,EAAEF,WAAW,IAAI,CAAC,CAAC;QAC7B;IACF,GAAG;QAACA;QAAUZ;QAAcQ;KAAS;IAErC,MAAMO,cAAc,OAAOH,aAAa;IACxC,MAAMI,gBAAgB,CAACD;IACvB,qBACE,KAACE;QACE,GAAGP,SAAS;QACbhB,IAAIA;QACJD,KAAKA;QACLG,OAAOA;QACPsB,MAAK;QACLC,iBAAejB;QACfkB,iBAAejB;QACfkB,iBAAejB;QACfN,WAAWf,IACTO,OAAO;YACLkB;YACAc,YAAY,CAACd;YACbO;YACAC;QACF,IACAV,UAAU,mBAAmBpB,SAAS;YAAEqC,WAAWjB;QAAM,IACzDR;kBAGF,cAAA,KAACmB;YACCrB,OAAOG;YACPD,WAAWf,IACTO,OAAO,OAAO;gBACZkB;gBACA,oBAAoBA,YAAYH;gBAChCiB,YAAY,CAACd;gBACb,sBAAsB,CAACA,YAAYH;gBACnCmB,SAAS,CAACjB,qBAAqBQ;gBAC/BA;gBACAC;gBACA,uBAAuBD,eAAeV,WAAW,CAACG;gBAClD,gCAAgCO,eAAeV,WAAWG;gBAC1D,yBAAyBQ,iBAAiBX,WAAW,CAACG;gBACtD,0BAA0BQ,iBAAiBR;gBAC3C,kCACEQ,iBAAiBX,WAAWG;YAChC,IACAP;;;AAKV,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/progress/getProgressA11y.ts"],"sourcesContent":["export interface ProgressA11y {\n \"aria-busy\": true;\n \"aria-describedby\": string;\n}\n\n/**\n * An extremely simple util that can be used to get the required a11y props for\n * another component that relies on a progress component.\n *\n * @param progressId - The id for the progress bar\n * @param progressing - Boolean if the progress bar is visible and progressing\n */\nexport function getProgressA11y(\n progressId: string,\n progressing: boolean\n): ProgressA11y | undefined {\n if (!progressing) {\n return undefined;\n }\n\n return {\n \"aria-busy\": true,\n \"aria-describedby\": progressId,\n };\n}\n"],"names":["getProgressA11y","progressId","progressing","undefined"],"mappings":"AAKA;;;;;;CAMC,GACD,OAAO,SAASA,gBACdC,UAAkB,EAClBC,WAAoB;IAEpB,IAAI,CAACA,aAAa;QAChB,OAAOC;IACT;IAEA,OAAO;QACL,aAAa;QACb,oBAAoBF;IACtB;AACF"}
1
+ {"version":3,"sources":["../../src/progress/getProgressA11y.ts"],"sourcesContent":["export interface ProgressA11y {\n \"aria-busy\": true;\n \"aria-describedby\": string;\n}\n\n/**\n * An extremely simple util that can be used to get the required a11y props for\n * another component that relies on a progress component.\n *\n * @param progressId - The id for the progress bar\n * @param progressing - Boolean if the progress bar is visible and progressing\n */\nexport function getProgressA11y(\n progressId: string,\n progressing: boolean\n): ProgressA11y | undefined {\n if (!progressing) {\n return undefined;\n }\n\n return {\n \"aria-busy\": true,\n \"aria-describedby\": progressId,\n };\n}\n"],"names":["getProgressA11y","progressId","progressing","undefined"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAKA;;;;;;CAMC,GACD,OAAO,SAASA,gBACdC,UAAkB,EAClBC,WAAoB;IAEpB,IAAI,CAACA,aAAa;QAChB,OAAOC;IACT;IAEA,OAAO;QACL,aAAa;QACb,oBAAoBF;IACtB;AACF"}
@@ -9,13 +9,13 @@ declare module "react" {
9
9
  }
10
10
  }
11
11
  /**
12
- * @remarks \@since 6.0.0
12
+ * @since 6.0.0
13
13
  */
14
14
  export type ProgressTheme = ThemeColor | "current-color";
15
15
  /**
16
16
  * The base progress props for both the linear and circular progress components.
17
17
  *
18
- * @remarks \@since 6.0.0 Added the `theme` prop.
18
+ * @since 6.0.0 Added the `theme` prop.
19
19
  */
20
20
  export interface ProgressProps {
21
21
  /**
@@ -26,7 +26,7 @@ export interface ProgressProps {
26
26
  * `aria-describedby="THIS_ID"`.
27
27
  *
28
28
  * @defaultValue `"circular-progress-" useId() || "linear-progress-" + useId()`
29
- * @remarks \@since 6.0.0 This prop is now optional.
29
+ * @since 6.0.0 This prop is now optional.
30
30
  */
31
31
  id?: string;
32
32
  /**
@@ -58,13 +58,13 @@ export interface ProgressProps {
58
58
  * progress updates or the updates happen in chunks.
59
59
  *
60
60
  * @defaultValue `false`
61
- * @remarks \@since 6.0.0 This was renamed from `animate` to
61
+ * @since 6.0.0 This was renamed from `animate` to
62
62
  * `disableTransition`.
63
63
  */
64
64
  disableTransition?: boolean;
65
65
  /**
66
66
  * @defaultValue `"primary"`
67
- * @remarks \@since 6.0.0
67
+ * @since 6.0.0
68
68
  */
69
69
  theme?: ProgressTheme;
70
70
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The base progress props for both the linear and circular progress components.
3
3
  *
4
- * @remarks \@since 6.0.0 Added the `theme` prop.
4
+ * @since 6.0.0 Added the `theme` prop.
5
5
  */ export { };
6
6
 
7
7
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/progress/types.ts"],"sourcesContent":["import { type ThemeColor } from \"../cssUtils.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-progress-background-color\"?: string;\n \"--rmd-progress-color\"?: string;\n \"--rmd-progress-circular-size\"?: string | number;\n \"--rmd-progress-circular-stroke-width\"?: number;\n \"--rmd-progress-linear-size\"?: string | number;\n }\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type ProgressTheme = ThemeColor | \"current-color\";\n\n/**\n * The base progress props for both the linear and circular progress components.\n *\n * @remarks \\@since 6.0.0 Added the `theme` prop.\n */\nexport interface ProgressProps {\n /**\n * The id for the progress component. This is required for accessibility since\n * the progress will 99% of the time be describing the progress of something\n * else within the page. The element that is loading or tracking progress\n * should also be updated to have `aria-busy=\"true\"` and\n * `aria-describedby=\"THIS_ID\"`.\n *\n * @defaultValue `\"circular-progress-\" useId() || \"linear-progress-\" + useId()`\n * @remarks \\@since 6.0.0 This prop is now optional.\n */\n id?: string;\n\n /**\n * The min value for the progress component. This is used to determine the\n * current progress percentage for screen readers and styles.\n *\n * @defaultValue `0`\n */\n min?: number;\n\n /**\n * The max value for the progress component. This is used to determine the\n * current progress percentage for screen readers and styles.\n *\n * @defaultValue `100`\n */\n max?: number;\n\n /**\n * The current value for the progress component. If this prop is omitted, the\n * progress component will be put in an \"indeterminate\" state which will just\n * infinitely loop an animation until it is unmounted.\n *\n * This value will be passed down as a percentage based on the `min` and `max`\n * props so that screen readers can be notified of changes.\n */\n value?: number;\n\n /**\n * Boolean if the determinate progress versions should animate when the value\n * changes. This should really only be enabled if you aren't getting quick\n * progress updates or the updates happen in chunks.\n *\n * @defaultValue `false`\n * @remarks \\@since 6.0.0 This was renamed from `animate` to\n * `disableTransition`.\n */\n disableTransition?: boolean;\n\n /**\n * @defaultValue `\"primary\"`\n * @remarks \\@since 6.0.0\n */\n theme?: ProgressTheme;\n}\n"],"names":[],"mappings":"AAiBA;;;;CAIC,GACD,WAuDC"}
1
+ {"version":3,"sources":["../../src/progress/types.ts"],"sourcesContent":["import { type ThemeColor } from \"../cssUtils.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-progress-background-color\"?: string;\n \"--rmd-progress-color\"?: string;\n \"--rmd-progress-circular-size\"?: string | number;\n \"--rmd-progress-circular-stroke-width\"?: number;\n \"--rmd-progress-linear-size\"?: string | number;\n }\n}\n\n/**\n * @since 6.0.0\n */\nexport type ProgressTheme = ThemeColor | \"current-color\";\n\n/**\n * The base progress props for both the linear and circular progress components.\n *\n * @since 6.0.0 Added the `theme` prop.\n */\nexport interface ProgressProps {\n /**\n * The id for the progress component. This is required for accessibility since\n * the progress will 99% of the time be describing the progress of something\n * else within the page. The element that is loading or tracking progress\n * should also be updated to have `aria-busy=\"true\"` and\n * `aria-describedby=\"THIS_ID\"`.\n *\n * @defaultValue `\"circular-progress-\" useId() || \"linear-progress-\" + useId()`\n * @since 6.0.0 This prop is now optional.\n */\n id?: string;\n\n /**\n * The min value for the progress component. This is used to determine the\n * current progress percentage for screen readers and styles.\n *\n * @defaultValue `0`\n */\n min?: number;\n\n /**\n * The max value for the progress component. This is used to determine the\n * current progress percentage for screen readers and styles.\n *\n * @defaultValue `100`\n */\n max?: number;\n\n /**\n * The current value for the progress component. If this prop is omitted, the\n * progress component will be put in an \"indeterminate\" state which will just\n * infinitely loop an animation until it is unmounted.\n *\n * This value will be passed down as a percentage based on the `min` and `max`\n * props so that screen readers can be notified of changes.\n */\n value?: number;\n\n /**\n * Boolean if the determinate progress versions should animate when the value\n * changes. This should really only be enabled if you aren't getting quick\n * progress updates or the updates happen in chunks.\n *\n * @defaultValue `false`\n * @since 6.0.0 This was renamed from `animate` to\n * `disableTransition`.\n */\n disableTransition?: boolean;\n\n /**\n * @defaultValue `\"primary\"`\n * @since 6.0.0\n */\n theme?: ProgressTheme;\n}\n"],"names":[],"rangeMappings":";;;;","mappings":"AAiBA;;;;CAIC,GACD,WAuDC"}