@react-md/core 6.0.1 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (821) hide show
  1. package/dist/CoreProviders.d.ts +1 -1
  2. package/dist/CoreProviders.js +1 -1
  3. package/dist/CoreProviders.js.map +1 -1
  4. package/dist/SsrProvider.d.ts +1 -1
  5. package/dist/SsrProvider.js +1 -1
  6. package/dist/SsrProvider.js.map +1 -1
  7. package/dist/_base.scss +6 -2
  8. package/dist/_border-radius.scss +92 -0
  9. package/dist/_core.scss +2 -0
  10. package/dist/_spacing.scss +86 -0
  11. package/dist/app-bar/_app-bar.scss +9 -7
  12. package/dist/app-bar/styles.js +1 -1
  13. package/dist/app-bar/styles.js.map +1 -1
  14. package/dist/autocomplete/Autocomplete.d.ts +2 -2
  15. package/dist/autocomplete/Autocomplete.js +1 -1
  16. package/dist/autocomplete/Autocomplete.js.map +1 -1
  17. package/dist/autocomplete/AutocompleteChip.d.ts +1 -1
  18. package/dist/autocomplete/AutocompleteChip.js +1 -1
  19. package/dist/autocomplete/AutocompleteChip.js.map +1 -1
  20. package/dist/autocomplete/AutocompleteCircularProgress.d.ts +1 -1
  21. package/dist/autocomplete/AutocompleteCircularProgress.js +1 -1
  22. package/dist/autocomplete/AutocompleteCircularProgress.js.map +1 -1
  23. package/dist/autocomplete/AutocompleteClearButton.d.ts +1 -1
  24. package/dist/autocomplete/AutocompleteClearButton.js +1 -1
  25. package/dist/autocomplete/AutocompleteClearButton.js.map +1 -1
  26. package/dist/autocomplete/AutocompleteDropdownButton.d.ts +1 -1
  27. package/dist/autocomplete/AutocompleteDropdownButton.js +1 -1
  28. package/dist/autocomplete/AutocompleteDropdownButton.js.map +1 -1
  29. package/dist/autocomplete/_autocomplete.scss +8 -5
  30. package/dist/autocomplete/useAutocomplete.d.ts +3 -3
  31. package/dist/autocomplete/useAutocomplete.js +2 -1
  32. package/dist/autocomplete/useAutocomplete.js.map +1 -1
  33. package/dist/avatar/Avatar.d.ts +1 -1
  34. package/dist/avatar/Avatar.js +1 -1
  35. package/dist/avatar/Avatar.js.map +1 -1
  36. package/dist/avatar/_avatar.scss +3 -3
  37. package/dist/badge/Badge.d.ts +1 -1
  38. package/dist/badge/Badge.js +1 -1
  39. package/dist/badge/Badge.js.map +1 -1
  40. package/dist/badge/_badge.scss +10 -2
  41. package/dist/box/Box.d.ts +1 -1
  42. package/dist/box/Box.js +1 -1
  43. package/dist/box/Box.js.map +1 -1
  44. package/dist/box/_box.scss +78 -11
  45. package/dist/button/AsyncButton.d.ts +1 -1
  46. package/dist/button/AsyncButton.js +1 -1
  47. package/dist/button/AsyncButton.js.map +1 -1
  48. package/dist/button/Button.d.ts +1 -1
  49. package/dist/button/Button.js +1 -1
  50. package/dist/button/Button.js.map +1 -1
  51. package/dist/button/ButtonUnstyled.d.ts +1 -1
  52. package/dist/button/ButtonUnstyled.js +1 -1
  53. package/dist/button/ButtonUnstyled.js.map +1 -1
  54. package/dist/button/TooltippedButton.d.ts +1 -1
  55. package/dist/button/TooltippedButton.js +1 -1
  56. package/dist/button/TooltippedButton.js.map +1 -1
  57. package/dist/button/_button.scss +21 -11
  58. package/dist/card/Card.d.ts +1 -1
  59. package/dist/card/Card.js +1 -1
  60. package/dist/card/Card.js.map +1 -1
  61. package/dist/card/CardContent.d.ts +1 -1
  62. package/dist/card/CardContent.js +1 -1
  63. package/dist/card/CardContent.js.map +1 -1
  64. package/dist/card/CardFooter.d.ts +1 -1
  65. package/dist/card/CardFooter.js +1 -1
  66. package/dist/card/CardFooter.js.map +1 -1
  67. package/dist/card/CardHeader.d.ts +1 -1
  68. package/dist/card/CardHeader.js +1 -1
  69. package/dist/card/CardHeader.js.map +1 -1
  70. package/dist/card/CardSubtitle.d.ts +1 -1
  71. package/dist/card/CardSubtitle.js +1 -1
  72. package/dist/card/CardSubtitle.js.map +1 -1
  73. package/dist/card/CardTitle.d.ts +1 -1
  74. package/dist/card/CardTitle.js +1 -1
  75. package/dist/card/CardTitle.js.map +1 -1
  76. package/dist/card/ClickableCard.d.ts +1 -1
  77. package/dist/card/ClickableCard.js +1 -1
  78. package/dist/card/ClickableCard.js.map +1 -1
  79. package/dist/card/_card.scss +9 -7
  80. package/dist/chip/Chip.d.ts +1 -1
  81. package/dist/chip/Chip.js +1 -1
  82. package/dist/chip/Chip.js.map +1 -1
  83. package/dist/chip/_chip.scss +9 -7
  84. package/dist/dialog/Dialog.d.ts +1 -1
  85. package/dist/dialog/Dialog.js +1 -1
  86. package/dist/dialog/Dialog.js.map +1 -1
  87. package/dist/dialog/DialogContent.d.ts +1 -1
  88. package/dist/dialog/DialogContent.js +1 -1
  89. package/dist/dialog/DialogContent.js.map +1 -1
  90. package/dist/dialog/DialogFooter.d.ts +1 -1
  91. package/dist/dialog/DialogFooter.js +1 -1
  92. package/dist/dialog/DialogFooter.js.map +1 -1
  93. package/dist/dialog/DialogHeader.d.ts +1 -1
  94. package/dist/dialog/DialogHeader.js +1 -1
  95. package/dist/dialog/DialogHeader.js.map +1 -1
  96. package/dist/dialog/DialogTitle.d.ts +1 -1
  97. package/dist/dialog/DialogTitle.js +1 -1
  98. package/dist/dialog/DialogTitle.js.map +1 -1
  99. package/dist/dialog/FixedDialog.d.ts +1 -1
  100. package/dist/dialog/FixedDialog.js +1 -1
  101. package/dist/dialog/FixedDialog.js.map +1 -1
  102. package/dist/dialog/_dialog.scss +7 -6
  103. package/dist/divider/Divider.d.ts +1 -1
  104. package/dist/divider/Divider.js +1 -1
  105. package/dist/divider/Divider.js.map +1 -1
  106. package/dist/divider/_divider.scss +3 -2
  107. package/dist/draggable/useDraggable.d.ts +1 -1
  108. package/dist/draggable/useDraggable.js +1 -1
  109. package/dist/draggable/useDraggable.js.map +1 -1
  110. package/dist/expansion-panel/ExpansionList.d.ts +1 -1
  111. package/dist/expansion-panel/ExpansionList.js +1 -1
  112. package/dist/expansion-panel/ExpansionList.js.map +1 -1
  113. package/dist/expansion-panel/ExpansionPanel.d.ts +1 -1
  114. package/dist/expansion-panel/ExpansionPanel.js +1 -1
  115. package/dist/expansion-panel/ExpansionPanel.js.map +1 -1
  116. package/dist/expansion-panel/ExpansionPanelHeader.d.ts +1 -1
  117. package/dist/expansion-panel/ExpansionPanelHeader.js +1 -1
  118. package/dist/expansion-panel/ExpansionPanelHeader.js.map +1 -1
  119. package/dist/expansion-panel/_expansion-panel.scss +4 -3
  120. package/dist/expansion-panel/useExpansionList.d.ts +1 -1
  121. package/dist/expansion-panel/useExpansionList.js +1 -1
  122. package/dist/expansion-panel/useExpansionList.js.map +1 -1
  123. package/dist/expansion-panel/useExpansionPanels.d.ts +1 -1
  124. package/dist/expansion-panel/useExpansionPanels.js +1 -1
  125. package/dist/expansion-panel/useExpansionPanels.js.map +1 -1
  126. package/dist/files/FileInput.d.ts +1 -1
  127. package/dist/files/FileInput.js +1 -1
  128. package/dist/files/FileInput.js.map +1 -1
  129. package/dist/files/useFileUpload.d.ts +2 -2
  130. package/dist/files/useFileUpload.js +2 -2
  131. package/dist/files/useFileUpload.js.map +1 -1
  132. package/dist/form/Checkbox.d.ts +1 -1
  133. package/dist/form/Checkbox.js +1 -1
  134. package/dist/form/Checkbox.js.map +1 -1
  135. package/dist/form/Fieldset.d.ts +1 -1
  136. package/dist/form/Fieldset.js +1 -1
  137. package/dist/form/Fieldset.js.map +1 -1
  138. package/dist/form/Form.d.ts +1 -1
  139. package/dist/form/Form.js +1 -1
  140. package/dist/form/Form.js.map +1 -1
  141. package/dist/form/FormMessage.d.ts +1 -1
  142. package/dist/form/FormMessage.js +1 -1
  143. package/dist/form/FormMessage.js.map +1 -1
  144. package/dist/form/FormMessageContainer.d.ts +1 -1
  145. package/dist/form/FormMessageContainer.js +1 -1
  146. package/dist/form/FormMessageContainer.js.map +1 -1
  147. package/dist/form/FormMessageCounter.d.ts +2 -2
  148. package/dist/form/FormMessageCounter.js +2 -2
  149. package/dist/form/FormMessageCounter.js.map +1 -1
  150. package/dist/form/InputToggle.d.ts +2 -2
  151. package/dist/form/InputToggle.js +2 -2
  152. package/dist/form/InputToggle.js.map +1 -1
  153. package/dist/form/Label.d.ts +3 -3
  154. package/dist/form/Label.js +3 -3
  155. package/dist/form/Label.js.map +1 -1
  156. package/dist/form/Legend.d.ts +1 -1
  157. package/dist/form/Legend.js +1 -1
  158. package/dist/form/Legend.js.map +1 -1
  159. package/dist/form/NativeSelect.d.ts +1 -1
  160. package/dist/form/NativeSelect.js +1 -1
  161. package/dist/form/NativeSelect.js.map +1 -1
  162. package/dist/form/OptGroup.d.ts +1 -1
  163. package/dist/form/OptGroup.js +1 -1
  164. package/dist/form/OptGroup.js.map +1 -1
  165. package/dist/form/Option.d.ts +1 -1
  166. package/dist/form/Option.js +1 -1
  167. package/dist/form/Option.js.map +1 -1
  168. package/dist/form/Password.d.ts +1 -1
  169. package/dist/form/Password.js +1 -1
  170. package/dist/form/Password.js.map +1 -1
  171. package/dist/form/Radio.d.ts +1 -1
  172. package/dist/form/Radio.js +1 -1
  173. package/dist/form/Radio.js.map +1 -1
  174. package/dist/form/Select.d.ts +1 -1
  175. package/dist/form/Select.js +1 -1
  176. package/dist/form/Select.js.map +1 -1
  177. package/dist/form/Slider.d.ts +1 -1
  178. package/dist/form/Slider.js.map +1 -1
  179. package/dist/form/Switch.d.ts +1 -1
  180. package/dist/form/Switch.js +1 -1
  181. package/dist/form/Switch.js.map +1 -1
  182. package/dist/form/TextArea.d.ts +1 -1
  183. package/dist/form/TextArea.js +2 -2
  184. package/dist/form/TextArea.js.map +1 -1
  185. package/dist/form/TextField.d.ts +1 -1
  186. package/dist/form/TextField.js +1 -1
  187. package/dist/form/TextField.js.map +1 -1
  188. package/dist/form/_form-message.scss +4 -3
  189. package/dist/form/_input-toggle.scss +2 -1
  190. package/dist/form/_label.scss +3 -2
  191. package/dist/form/_password.scss +2 -1
  192. package/dist/form/_select.scss +4 -4
  193. package/dist/form/_slider.scss +4 -3
  194. package/dist/form/_switch.scss +2 -1
  195. package/dist/form/_text-area.scss +3 -2
  196. package/dist/form/_text-field.scss +20 -16
  197. package/dist/form/useCheckboxGroup.d.ts +8 -8
  198. package/dist/form/useCheckboxGroup.js +2 -2
  199. package/dist/form/useCheckboxGroup.js.map +1 -1
  200. package/dist/form/useCombobox.js +1 -0
  201. package/dist/form/useCombobox.js.map +1 -1
  202. package/dist/form/useNumberField.d.ts +2 -2
  203. package/dist/form/useNumberField.js +2 -2
  204. package/dist/form/useNumberField.js.map +1 -1
  205. package/dist/form/useRadioGroup.d.ts +4 -4
  206. package/dist/form/useRadioGroup.js +2 -2
  207. package/dist/form/useRadioGroup.js.map +1 -1
  208. package/dist/form/useRangeSlider.d.ts +1 -1
  209. package/dist/form/useRangeSlider.js +1 -1
  210. package/dist/form/useRangeSlider.js.map +1 -1
  211. package/dist/form/useSlider.d.ts +1 -1
  212. package/dist/form/useSlider.js +1 -1
  213. package/dist/form/useSlider.js.map +1 -1
  214. package/dist/form/useTextField.d.ts +4 -4
  215. package/dist/form/useTextField.js +2 -2
  216. package/dist/form/useTextField.js.map +1 -1
  217. package/dist/form/utils.js +1 -0
  218. package/dist/form/utils.js.map +1 -1
  219. package/dist/icon/FontIcon.d.ts +1 -1
  220. package/dist/icon/FontIcon.js +1 -1
  221. package/dist/icon/FontIcon.js.map +1 -1
  222. package/dist/icon/IconRotator.d.ts +1 -1
  223. package/dist/icon/IconRotator.js +1 -1
  224. package/dist/icon/IconRotator.js.map +1 -1
  225. package/dist/icon/MaterialIcon.d.ts +2 -2
  226. package/dist/icon/MaterialIcon.js +2 -2
  227. package/dist/icon/MaterialIcon.js.map +1 -1
  228. package/dist/icon/MaterialSymbol.d.ts +2 -2
  229. package/dist/icon/MaterialSymbol.js +2 -2
  230. package/dist/icon/MaterialSymbol.js.map +1 -1
  231. package/dist/icon/SVGIcon.d.ts +1 -1
  232. package/dist/icon/SVGIcon.js +1 -1
  233. package/dist/icon/SVGIcon.js.map +1 -1
  234. package/dist/icon/TextIconSpacing.d.ts +1 -1
  235. package/dist/icon/TextIconSpacing.js +1 -1
  236. package/dist/icon/TextIconSpacing.js.map +1 -1
  237. package/dist/icon/_icon.scss +2 -1
  238. package/dist/interaction/useElementInteraction.js +1 -1
  239. package/dist/interaction/useElementInteraction.js.map +1 -1
  240. package/dist/layout/LayoutAppBar.d.ts +1 -1
  241. package/dist/layout/LayoutAppBar.js +1 -1
  242. package/dist/layout/LayoutAppBar.js.map +1 -1
  243. package/dist/layout/LayoutNav.d.ts +1 -1
  244. package/dist/layout/LayoutNav.js +2 -2
  245. package/dist/layout/LayoutNav.js.map +1 -1
  246. package/dist/layout/LayoutWindowSplitter.d.ts +1 -1
  247. package/dist/layout/LayoutWindowSplitter.js +1 -1
  248. package/dist/layout/LayoutWindowSplitter.js.map +1 -1
  249. package/dist/layout/Main.d.ts +1 -1
  250. package/dist/layout/Main.js +1 -1
  251. package/dist/layout/Main.js.map +1 -1
  252. package/dist/layout/useExpandableLayout.d.ts +1 -1
  253. package/dist/layout/useExpandableLayout.js +1 -1
  254. package/dist/layout/useExpandableLayout.js.map +1 -1
  255. package/dist/layout/useHorizontalLayoutTransition.d.ts +1 -1
  256. package/dist/layout/useHorizontalLayoutTransition.js +1 -1
  257. package/dist/layout/useHorizontalLayoutTransition.js.map +1 -1
  258. package/dist/layout/useLayoutAppBarHeight.d.ts +1 -1
  259. package/dist/layout/useLayoutAppBarHeight.js +1 -1
  260. package/dist/layout/useLayoutAppBarHeight.js.map +1 -1
  261. package/dist/layout/useLayoutTree.d.ts +3 -3
  262. package/dist/layout/useLayoutTree.js +3 -3
  263. package/dist/layout/useLayoutTree.js.map +1 -1
  264. package/dist/layout/useLayoutWindowSplitter.d.ts +1 -1
  265. package/dist/layout/useLayoutWindowSplitter.js +1 -1
  266. package/dist/layout/useLayoutWindowSplitter.js.map +1 -1
  267. package/dist/layout/useMainTabIndex.js +1 -0
  268. package/dist/layout/useMainTabIndex.js.map +1 -1
  269. package/dist/layout/useResizableLayout.d.ts +1 -1
  270. package/dist/layout/useResizableLayout.js +1 -1
  271. package/dist/layout/useResizableLayout.js.map +1 -1
  272. package/dist/layout/useTemporaryLayout.d.ts +1 -1
  273. package/dist/layout/useTemporaryLayout.js +1 -1
  274. package/dist/layout/useTemporaryLayout.js.map +1 -1
  275. package/dist/link/Link.d.ts +1 -1
  276. package/dist/link/Link.js +1 -1
  277. package/dist/link/Link.js.map +1 -1
  278. package/dist/link/SkipToMainContent.d.ts +1 -1
  279. package/dist/link/SkipToMainContent.js +1 -1
  280. package/dist/link/SkipToMainContent.js.map +1 -1
  281. package/dist/link/_link.scss +3 -2
  282. package/dist/list/List.d.ts +1 -1
  283. package/dist/list/List.js +1 -1
  284. package/dist/list/List.js.map +1 -1
  285. package/dist/list/ListItem.d.ts +1 -1
  286. package/dist/list/ListItem.js +1 -1
  287. package/dist/list/ListItem.js.map +1 -1
  288. package/dist/list/ListItemChildren.d.ts +1 -1
  289. package/dist/list/ListItemChildren.js +1 -1
  290. package/dist/list/ListItemChildren.js.map +1 -1
  291. package/dist/list/ListItemLink.d.ts +1 -1
  292. package/dist/list/ListItemLink.js +1 -1
  293. package/dist/list/ListItemLink.js.map +1 -1
  294. package/dist/list/ListSubheader.d.ts +1 -1
  295. package/dist/list/ListSubheader.js +1 -1
  296. package/dist/list/ListSubheader.js.map +1 -1
  297. package/dist/list/_list.scss +7 -6
  298. package/dist/media-queries/AppSizeProvider.d.ts +2 -2
  299. package/dist/media-queries/AppSizeProvider.js +2 -2
  300. package/dist/media-queries/AppSizeProvider.js.map +1 -1
  301. package/dist/media-queries/useMediaQuery.d.ts +2 -2
  302. package/dist/media-queries/useMediaQuery.js +2 -2
  303. package/dist/media-queries/useMediaQuery.js.map +1 -1
  304. package/dist/menu/DropdownMenu.d.ts +1 -1
  305. package/dist/menu/DropdownMenu.js +2 -1
  306. package/dist/menu/DropdownMenu.js.map +1 -1
  307. package/dist/menu/Menu.d.ts +1 -1
  308. package/dist/menu/Menu.js +1 -1
  309. package/dist/menu/Menu.js.map +1 -1
  310. package/dist/menu/MenuBar.d.ts +1 -1
  311. package/dist/menu/MenuBar.js +1 -1
  312. package/dist/menu/MenuBar.js.map +1 -1
  313. package/dist/menu/MenuButton.d.ts +1 -1
  314. package/dist/menu/MenuButton.js +1 -1
  315. package/dist/menu/MenuButton.js.map +1 -1
  316. package/dist/menu/MenuItem.d.ts +1 -1
  317. package/dist/menu/MenuItem.js +1 -1
  318. package/dist/menu/MenuItem.js.map +1 -1
  319. package/dist/menu/MenuItemCheckbox.d.ts +1 -1
  320. package/dist/menu/MenuItemCheckbox.js +1 -1
  321. package/dist/menu/MenuItemCheckbox.js.map +1 -1
  322. package/dist/menu/MenuItemFileInput.d.ts +1 -1
  323. package/dist/menu/MenuItemFileInput.js +1 -1
  324. package/dist/menu/MenuItemFileInput.js.map +1 -1
  325. package/dist/menu/MenuItemGroup.d.ts +1 -1
  326. package/dist/menu/MenuItemGroup.js +1 -1
  327. package/dist/menu/MenuItemGroup.js.map +1 -1
  328. package/dist/menu/MenuItemInputToggle.d.ts +1 -1
  329. package/dist/menu/MenuItemInputToggle.js +1 -1
  330. package/dist/menu/MenuItemInputToggle.js.map +1 -1
  331. package/dist/menu/MenuItemRadio.d.ts +1 -1
  332. package/dist/menu/MenuItemRadio.js +1 -1
  333. package/dist/menu/MenuItemRadio.js.map +1 -1
  334. package/dist/menu/MenuItemSeparator.d.ts +1 -1
  335. package/dist/menu/MenuItemSeparator.js +1 -1
  336. package/dist/menu/MenuItemSeparator.js.map +1 -1
  337. package/dist/menu/MenuItemSwitch.d.ts +1 -1
  338. package/dist/menu/MenuItemSwitch.js +1 -1
  339. package/dist/menu/MenuItemSwitch.js.map +1 -1
  340. package/dist/menu/MenuItemTextField.d.ts +1 -1
  341. package/dist/menu/MenuItemTextField.js +1 -1
  342. package/dist/menu/MenuItemTextField.js.map +1 -1
  343. package/dist/menu/_menu.scss +2 -1
  344. package/dist/menu/useContextMenu.d.ts +1 -1
  345. package/dist/menu/useContextMenu.js +1 -1
  346. package/dist/menu/useContextMenu.js.map +1 -1
  347. package/dist/navigation/CollapsibleNavGroup.d.ts +1 -1
  348. package/dist/navigation/CollapsibleNavGroup.js +1 -1
  349. package/dist/navigation/CollapsibleNavGroup.js.map +1 -1
  350. package/dist/navigation/DefaultNavigationRenderer.d.ts +1 -1
  351. package/dist/navigation/DefaultNavigationRenderer.js +1 -1
  352. package/dist/navigation/DefaultNavigationRenderer.js.map +1 -1
  353. package/dist/navigation/NavGroup.d.ts +1 -1
  354. package/dist/navigation/NavGroup.js +1 -1
  355. package/dist/navigation/NavGroup.js.map +1 -1
  356. package/dist/navigation/NavItem.d.ts +1 -1
  357. package/dist/navigation/NavItem.js +1 -1
  358. package/dist/navigation/NavItem.js.map +1 -1
  359. package/dist/navigation/NavItemButton.d.ts +1 -1
  360. package/dist/navigation/NavItemButton.js +1 -1
  361. package/dist/navigation/NavItemButton.js.map +1 -1
  362. package/dist/navigation/NavItemLink.d.ts +1 -1
  363. package/dist/navigation/NavItemLink.js +1 -1
  364. package/dist/navigation/NavItemLink.js.map +1 -1
  365. package/dist/navigation/NavSubheader.d.ts +1 -1
  366. package/dist/navigation/NavSubheader.js +1 -1
  367. package/dist/navigation/NavSubheader.js.map +1 -1
  368. package/dist/navigation/Navigation.d.ts +1 -1
  369. package/dist/navigation/Navigation.js +1 -1
  370. package/dist/navigation/Navigation.js.map +1 -1
  371. package/dist/navigation/_navigation.scss +5 -3
  372. package/dist/navigation/useActiveHeadingId.d.ts +1 -1
  373. package/dist/navigation/useActiveHeadingId.js +1 -1
  374. package/dist/navigation/useActiveHeadingId.js.map +1 -1
  375. package/dist/navigation/useNavigationExpansion.d.ts +2 -2
  376. package/dist/navigation/useNavigationExpansion.js +2 -2
  377. package/dist/navigation/useNavigationExpansion.js.map +1 -1
  378. package/dist/navigation/useTableOfContentsHeadings.d.ts +1 -1
  379. package/dist/navigation/useTableOfContentsHeadings.js +1 -1
  380. package/dist/navigation/useTableOfContentsHeadings.js.map +1 -1
  381. package/dist/overlay/Overlay.d.ts +1 -1
  382. package/dist/overlay/Overlay.js +1 -1
  383. package/dist/overlay/Overlay.js.map +1 -1
  384. package/dist/portal/Portal.d.ts +1 -1
  385. package/dist/portal/Portal.js +1 -1
  386. package/dist/portal/Portal.js.map +1 -1
  387. package/dist/portal/PortalContainerProvider.d.ts +1 -1
  388. package/dist/portal/PortalContainerProvider.js +1 -1
  389. package/dist/portal/PortalContainerProvider.js.map +1 -1
  390. package/dist/positioning/useFixedPositioning.d.ts +1 -1
  391. package/dist/positioning/useFixedPositioning.js +1 -1
  392. package/dist/positioning/useFixedPositioning.js.map +1 -1
  393. package/dist/progress/CircularProgress.d.ts +1 -1
  394. package/dist/progress/CircularProgress.js +1 -1
  395. package/dist/progress/CircularProgress.js.map +1 -1
  396. package/dist/progress/LinearProgress.d.ts +1 -1
  397. package/dist/progress/LinearProgress.js +1 -1
  398. package/dist/progress/LinearProgress.js.map +1 -1
  399. package/dist/responsive-item/ResponsiveItem.d.ts +1 -1
  400. package/dist/responsive-item/ResponsiveItem.js +1 -1
  401. package/dist/responsive-item/ResponsiveItem.js.map +1 -1
  402. package/dist/responsive-item/ResponsiveItemOverlay.d.ts +1 -1
  403. package/dist/responsive-item/ResponsiveItemOverlay.js +1 -1
  404. package/dist/responsive-item/ResponsiveItemOverlay.js.map +1 -1
  405. package/dist/responsive-item/_responsive-item.scss +2 -1
  406. package/dist/scroll/useScrollLock.d.ts +1 -1
  407. package/dist/scroll/useScrollLock.js +1 -1
  408. package/dist/scroll/useScrollLock.js.map +1 -1
  409. package/dist/segmented-button/SegmentedButton.d.ts +1 -1
  410. package/dist/segmented-button/SegmentedButton.js +1 -1
  411. package/dist/segmented-button/SegmentedButton.js.map +1 -1
  412. package/dist/segmented-button/SegmentedButtonContainer.d.ts +1 -1
  413. package/dist/segmented-button/SegmentedButtonContainer.js +1 -1
  414. package/dist/segmented-button/SegmentedButtonContainer.js.map +1 -1
  415. package/dist/segmented-button/_segmented-button.scss +20 -13
  416. package/dist/sheet/Sheet.d.ts +1 -1
  417. package/dist/sheet/Sheet.js +1 -1
  418. package/dist/sheet/Sheet.js.map +1 -1
  419. package/dist/sheet/_sheet.scss +2 -1
  420. package/dist/snackbar/DefaultToastRenderer.d.ts +1 -1
  421. package/dist/snackbar/DefaultToastRenderer.js +1 -1
  422. package/dist/snackbar/DefaultToastRenderer.js.map +1 -1
  423. package/dist/snackbar/Snackbar.d.ts +1 -1
  424. package/dist/snackbar/Snackbar.js +1 -1
  425. package/dist/snackbar/Snackbar.js.map +1 -1
  426. package/dist/snackbar/Toast.d.ts +1 -1
  427. package/dist/snackbar/Toast.js +1 -1
  428. package/dist/snackbar/Toast.js.map +1 -1
  429. package/dist/snackbar/ToastActionButton.d.ts +1 -1
  430. package/dist/snackbar/ToastActionButton.js +1 -1
  431. package/dist/snackbar/ToastActionButton.js.map +1 -1
  432. package/dist/snackbar/ToastCloseButton.d.ts +1 -1
  433. package/dist/snackbar/ToastCloseButton.js +1 -1
  434. package/dist/snackbar/ToastCloseButton.js.map +1 -1
  435. package/dist/snackbar/ToastContent.d.ts +1 -1
  436. package/dist/snackbar/ToastContent.js +1 -1
  437. package/dist/snackbar/ToastContent.js.map +1 -1
  438. package/dist/snackbar/ToastManager.d.ts +1 -1
  439. package/dist/snackbar/ToastManager.js +1 -1
  440. package/dist/snackbar/ToastManager.js.map +1 -1
  441. package/dist/snackbar/ToastManagerProvider.d.ts +1 -1
  442. package/dist/snackbar/ToastManagerProvider.js +1 -1
  443. package/dist/snackbar/ToastManagerProvider.js.map +1 -1
  444. package/dist/snackbar/_snackbar.scss +12 -10
  445. package/dist/snackbar/useCurrentToastActions.d.ts +1 -1
  446. package/dist/snackbar/useCurrentToastActions.js +1 -1
  447. package/dist/snackbar/useCurrentToastActions.js.map +1 -1
  448. package/dist/storage/useStorage.d.ts +1 -1
  449. package/dist/storage/useStorage.js +1 -1
  450. package/dist/storage/useStorage.js.map +1 -1
  451. package/dist/suspense/CircularProgressSuspense.d.ts +1 -1
  452. package/dist/suspense/CircularProgressSuspense.js +1 -1
  453. package/dist/suspense/CircularProgressSuspense.js.map +1 -1
  454. package/dist/suspense/NullSuspense.d.ts +1 -1
  455. package/dist/suspense/NullSuspense.js +1 -1
  456. package/dist/suspense/NullSuspense.js.map +1 -1
  457. package/dist/table/StickyTableSection.d.ts +2 -2
  458. package/dist/table/StickyTableSection.js +2 -2
  459. package/dist/table/StickyTableSection.js.map +1 -1
  460. package/dist/table/Table.d.ts +1 -1
  461. package/dist/table/Table.js +1 -1
  462. package/dist/table/Table.js.map +1 -1
  463. package/dist/table/TableBody.d.ts +1 -1
  464. package/dist/table/TableBody.js +1 -1
  465. package/dist/table/TableBody.js.map +1 -1
  466. package/dist/table/TableCell.d.ts +1 -1
  467. package/dist/table/TableCell.js +1 -1
  468. package/dist/table/TableCell.js.map +1 -1
  469. package/dist/table/TableCheckbox.d.ts +1 -1
  470. package/dist/table/TableCheckbox.js +1 -1
  471. package/dist/table/TableCheckbox.js.map +1 -1
  472. package/dist/table/TableContainer.d.ts +1 -1
  473. package/dist/table/TableContainer.js +1 -1
  474. package/dist/table/TableContainer.js.map +1 -1
  475. package/dist/table/TableFooter.d.ts +1 -1
  476. package/dist/table/TableFooter.js +1 -1
  477. package/dist/table/TableFooter.js.map +1 -1
  478. package/dist/table/TableHeader.d.ts +1 -1
  479. package/dist/table/TableHeader.js +1 -1
  480. package/dist/table/TableHeader.js.map +1 -1
  481. package/dist/table/TableRadio.d.ts +1 -1
  482. package/dist/table/TableRadio.js +1 -1
  483. package/dist/table/TableRadio.js.map +1 -1
  484. package/dist/table/TableRow.d.ts +1 -1
  485. package/dist/table/TableRow.js +1 -1
  486. package/dist/table/TableRow.js.map +1 -1
  487. package/dist/table/_table.scss +5 -4
  488. package/dist/tabs/SimpleTabPanel.d.ts +2 -2
  489. package/dist/tabs/SimpleTabPanel.js +2 -2
  490. package/dist/tabs/SimpleTabPanel.js.map +1 -1
  491. package/dist/tabs/SimpleTabPanels.d.ts +2 -2
  492. package/dist/tabs/SimpleTabPanels.js +2 -2
  493. package/dist/tabs/SimpleTabPanels.js.map +1 -1
  494. package/dist/tabs/Tab.d.ts +1 -1
  495. package/dist/tabs/Tab.js +1 -1
  496. package/dist/tabs/Tab.js.map +1 -1
  497. package/dist/tabs/TabList.d.ts +1 -1
  498. package/dist/tabs/TabList.js +1 -1
  499. package/dist/tabs/TabList.js.map +1 -1
  500. package/dist/tabs/_tabs.scss +7 -4
  501. package/dist/tabs/useTabs.d.ts +4 -4
  502. package/dist/tabs/useTabs.js +2 -1
  503. package/dist/tabs/useTabs.js.map +1 -1
  504. package/dist/theme/LocalStorageColorSchemeProvider.d.ts +2 -2
  505. package/dist/theme/LocalStorageColorSchemeProvider.js +2 -2
  506. package/dist/theme/LocalStorageColorSchemeProvider.js.map +1 -1
  507. package/dist/theme/ThemeProvider.d.ts +1 -1
  508. package/dist/theme/ThemeProvider.js +1 -1
  509. package/dist/theme/ThemeProvider.js.map +1 -1
  510. package/dist/theme/useColorSchemeProvider.js +1 -0
  511. package/dist/theme/useColorSchemeProvider.js.map +1 -1
  512. package/dist/theme/utils.js +2 -2
  513. package/dist/theme/utils.js.map +1 -1
  514. package/dist/tooltip/Tooltip.d.ts +1 -1
  515. package/dist/tooltip/Tooltip.js +1 -1
  516. package/dist/tooltip/Tooltip.js.map +1 -1
  517. package/dist/tooltip/TooltipHoverModeProvider.d.ts +1 -1
  518. package/dist/tooltip/TooltipHoverModeProvider.js +1 -1
  519. package/dist/tooltip/TooltipHoverModeProvider.js.map +1 -1
  520. package/dist/tooltip/_tooltip.scss +52 -25
  521. package/dist/tooltip/useTooltip.d.ts +1 -1
  522. package/dist/tooltip/useTooltip.js +1 -1
  523. package/dist/tooltip/useTooltip.js.map +1 -1
  524. package/dist/transition/CSSTransition.d.ts +1 -1
  525. package/dist/transition/CSSTransition.js +1 -1
  526. package/dist/transition/CSSTransition.js.map +1 -1
  527. package/dist/transition/Collapse.d.ts +1 -1
  528. package/dist/transition/Collapse.js +1 -1
  529. package/dist/transition/Collapse.js.map +1 -1
  530. package/dist/transition/CrossFade.d.ts +1 -1
  531. package/dist/transition/CrossFade.js +1 -1
  532. package/dist/transition/CrossFade.js.map +1 -1
  533. package/dist/transition/ScaleTransition.d.ts +1 -1
  534. package/dist/transition/ScaleTransition.js +1 -1
  535. package/dist/transition/ScaleTransition.js.map +1 -1
  536. package/dist/transition/SkeletonPlaceholder.d.ts +1 -1
  537. package/dist/transition/SkeletonPlaceholder.js +1 -1
  538. package/dist/transition/SkeletonPlaceholder.js.map +1 -1
  539. package/dist/transition/Slide.d.ts +1 -1
  540. package/dist/transition/Slide.js +1 -1
  541. package/dist/transition/Slide.js.map +1 -1
  542. package/dist/transition/SlideContainer.d.ts +1 -1
  543. package/dist/transition/SlideContainer.js +1 -1
  544. package/dist/transition/SlideContainer.js.map +1 -1
  545. package/dist/transition/_transition.scss +2 -1
  546. package/dist/transition/useCSSTransition.d.ts +2 -2
  547. package/dist/transition/useCSSTransition.js +2 -2
  548. package/dist/transition/useCSSTransition.js.map +1 -1
  549. package/dist/transition/useCarousel.d.ts +1 -1
  550. package/dist/transition/useCarousel.js +1 -1
  551. package/dist/transition/useCarousel.js.map +1 -1
  552. package/dist/transition/useCollapseTransition.d.ts +2 -2
  553. package/dist/transition/useCollapseTransition.js +2 -2
  554. package/dist/transition/useCollapseTransition.js.map +1 -1
  555. package/dist/transition/useCrossFadeTransition.d.ts +2 -2
  556. package/dist/transition/useCrossFadeTransition.js +2 -2
  557. package/dist/transition/useCrossFadeTransition.js.map +1 -1
  558. package/dist/transition/useScaleTransition.d.ts +2 -2
  559. package/dist/transition/useScaleTransition.js +2 -2
  560. package/dist/transition/useScaleTransition.js.map +1 -1
  561. package/dist/transition/useSkeletonPlaceholder.d.ts +2 -2
  562. package/dist/transition/useSkeletonPlaceholder.js +2 -2
  563. package/dist/transition/useSkeletonPlaceholder.js.map +1 -1
  564. package/dist/transition/useSlideTransition.d.ts +1 -1
  565. package/dist/transition/useSlideTransition.js +1 -1
  566. package/dist/transition/useSlideTransition.js.map +1 -1
  567. package/dist/transition/useTransition.d.ts +1 -1
  568. package/dist/transition/useTransition.js +1 -1
  569. package/dist/transition/useTransition.js.map +1 -1
  570. package/dist/tree/DefaultTreeItemRenderer.d.ts +1 -1
  571. package/dist/tree/DefaultTreeItemRenderer.js +1 -1
  572. package/dist/tree/DefaultTreeItemRenderer.js.map +1 -1
  573. package/dist/tree/Tree.d.ts +1 -1
  574. package/dist/tree/Tree.js +1 -1
  575. package/dist/tree/Tree.js.map +1 -1
  576. package/dist/tree/TreeItem.d.ts +1 -1
  577. package/dist/tree/TreeItem.js +1 -1
  578. package/dist/tree/TreeItem.js.map +1 -1
  579. package/dist/tree/_tree.scss +1 -1
  580. package/dist/tree/useTree.d.ts +1 -1
  581. package/dist/tree/useTree.js +1 -1
  582. package/dist/tree/useTree.js.map +1 -1
  583. package/dist/tree/useTreeExpansion.d.ts +1 -1
  584. package/dist/tree/useTreeExpansion.js +1 -1
  585. package/dist/tree/useTreeExpansion.js.map +1 -1
  586. package/dist/tree/useTreeItems.d.ts +1 -1
  587. package/dist/tree/useTreeItems.js +1 -1
  588. package/dist/tree/useTreeItems.js.map +1 -1
  589. package/dist/tree/useTreeSelection.d.ts +1 -1
  590. package/dist/tree/useTreeSelection.js +1 -1
  591. package/dist/tree/useTreeSelection.js.map +1 -1
  592. package/dist/typography/HighlightText.d.ts +1 -1
  593. package/dist/typography/HighlightText.js +1 -1
  594. package/dist/typography/HighlightText.js.map +1 -1
  595. package/dist/typography/Mark.d.ts +1 -1
  596. package/dist/typography/Mark.js +1 -1
  597. package/dist/typography/Mark.js.map +1 -1
  598. package/dist/typography/SrOnly.d.ts +1 -1
  599. package/dist/typography/SrOnly.js +1 -1
  600. package/dist/typography/SrOnly.js.map +1 -1
  601. package/dist/typography/TextContainer.d.ts +1 -1
  602. package/dist/typography/TextContainer.js +1 -1
  603. package/dist/typography/TextContainer.js.map +1 -1
  604. package/dist/typography/Typography.d.ts +1 -1
  605. package/dist/typography/Typography.js +1 -1
  606. package/dist/typography/Typography.js.map +1 -1
  607. package/dist/typography/WritingDirectionProvider.d.ts +1 -1
  608. package/dist/typography/WritingDirectionProvider.js +1 -1
  609. package/dist/typography/WritingDirectionProvider.js.map +1 -1
  610. package/dist/useEnsuredState.d.ts +1 -0
  611. package/dist/useEnsuredState.js +5 -3
  612. package/dist/useEnsuredState.js.map +1 -1
  613. package/dist/utils/RenderRecursively.d.ts +1 -1
  614. package/dist/utils/RenderRecursively.js +1 -1
  615. package/dist/utils/RenderRecursively.js.map +1 -1
  616. package/dist/utils/bem.js +1 -1
  617. package/dist/utils/bem.js.map +1 -1
  618. package/dist/utils/parseCssLengthUnit.js +3 -0
  619. package/dist/utils/parseCssLengthUnit.js.map +1 -1
  620. package/dist/window-splitter/WindowSplitter.d.ts +1 -1
  621. package/dist/window-splitter/WindowSplitter.js +1 -1
  622. package/dist/window-splitter/WindowSplitter.js.map +1 -1
  623. package/package.json +10 -10
  624. package/src/CoreProviders.tsx +1 -1
  625. package/src/SsrProvider.tsx +1 -1
  626. package/src/app-bar/styles.ts +1 -1
  627. package/src/autocomplete/Autocomplete.tsx +3 -3
  628. package/src/autocomplete/AutocompleteChip.tsx +1 -1
  629. package/src/autocomplete/AutocompleteCircularProgress.tsx +1 -1
  630. package/src/autocomplete/AutocompleteClearButton.tsx +1 -1
  631. package/src/autocomplete/AutocompleteDropdownButton.tsx +1 -1
  632. package/src/autocomplete/useAutocomplete.ts +5 -4
  633. package/src/avatar/Avatar.tsx +1 -1
  634. package/src/badge/Badge.tsx +1 -1
  635. package/src/box/Box.tsx +1 -1
  636. package/src/button/AsyncButton.tsx +1 -1
  637. package/src/button/Button.tsx +1 -1
  638. package/src/button/ButtonUnstyled.tsx +1 -1
  639. package/src/button/TooltippedButton.tsx +1 -1
  640. package/src/card/Card.tsx +1 -1
  641. package/src/card/CardContent.tsx +1 -1
  642. package/src/card/CardFooter.tsx +1 -1
  643. package/src/card/CardHeader.tsx +1 -1
  644. package/src/card/CardSubtitle.tsx +1 -1
  645. package/src/card/CardTitle.tsx +1 -1
  646. package/src/card/ClickableCard.tsx +1 -1
  647. package/src/chip/Chip.tsx +1 -1
  648. package/src/dialog/Dialog.tsx +1 -1
  649. package/src/dialog/DialogContent.tsx +1 -1
  650. package/src/dialog/DialogFooter.tsx +1 -1
  651. package/src/dialog/DialogHeader.tsx +1 -1
  652. package/src/dialog/DialogTitle.tsx +1 -1
  653. package/src/dialog/FixedDialog.tsx +1 -1
  654. package/src/divider/Divider.tsx +1 -1
  655. package/src/draggable/useDraggable.ts +1 -1
  656. package/src/expansion-panel/ExpansionList.tsx +1 -1
  657. package/src/expansion-panel/ExpansionPanel.tsx +1 -1
  658. package/src/expansion-panel/ExpansionPanelHeader.tsx +1 -1
  659. package/src/expansion-panel/useExpansionList.ts +1 -1
  660. package/src/expansion-panel/useExpansionPanels.ts +1 -1
  661. package/src/files/FileInput.tsx +1 -1
  662. package/src/files/useFileUpload.ts +2 -2
  663. package/src/form/Checkbox.tsx +1 -1
  664. package/src/form/Fieldset.tsx +1 -1
  665. package/src/form/Form.tsx +1 -1
  666. package/src/form/FormMessage.tsx +1 -1
  667. package/src/form/FormMessageContainer.tsx +1 -1
  668. package/src/form/FormMessageCounter.tsx +2 -2
  669. package/src/form/InputToggle.tsx +2 -2
  670. package/src/form/Label.tsx +3 -3
  671. package/src/form/Legend.tsx +1 -1
  672. package/src/form/NativeSelect.tsx +1 -1
  673. package/src/form/OptGroup.tsx +1 -1
  674. package/src/form/Option.tsx +1 -1
  675. package/src/form/Password.tsx +1 -1
  676. package/src/form/Radio.tsx +1 -1
  677. package/src/form/Select.tsx +1 -1
  678. package/src/form/Slider.tsx +1 -1
  679. package/src/form/Switch.tsx +1 -1
  680. package/src/form/TextArea.tsx +2 -2
  681. package/src/form/TextField.tsx +1 -1
  682. package/src/form/useCheckboxGroup.ts +10 -10
  683. package/src/form/useCombobox.ts +1 -0
  684. package/src/form/useNumberField.ts +4 -4
  685. package/src/form/useRadioGroup.ts +6 -6
  686. package/src/form/useRangeSlider.ts +1 -1
  687. package/src/form/useSlider.ts +1 -1
  688. package/src/form/useTextField.ts +6 -6
  689. package/src/form/utils.ts +1 -0
  690. package/src/icon/FontIcon.tsx +1 -1
  691. package/src/icon/IconRotator.tsx +1 -1
  692. package/src/icon/MaterialIcon.tsx +2 -2
  693. package/src/icon/MaterialSymbol.tsx +2 -2
  694. package/src/icon/SVGIcon.tsx +1 -1
  695. package/src/icon/TextIconSpacing.tsx +1 -1
  696. package/src/interaction/useElementInteraction.tsx +1 -1
  697. package/src/layout/LayoutAppBar.tsx +1 -1
  698. package/src/layout/LayoutNav.tsx +2 -2
  699. package/src/layout/LayoutWindowSplitter.tsx +1 -1
  700. package/src/layout/Main.tsx +1 -1
  701. package/src/layout/useExpandableLayout.ts +1 -1
  702. package/src/layout/useHorizontalLayoutTransition.ts +1 -1
  703. package/src/layout/useLayoutAppBarHeight.ts +1 -1
  704. package/src/layout/useLayoutTree.ts +3 -3
  705. package/src/layout/useLayoutWindowSplitter.ts +1 -1
  706. package/src/layout/useMainTabIndex.ts +1 -0
  707. package/src/layout/useResizableLayout.ts +1 -1
  708. package/src/layout/useTemporaryLayout.ts +1 -1
  709. package/src/link/Link.tsx +1 -1
  710. package/src/link/SkipToMainContent.tsx +1 -1
  711. package/src/list/List.tsx +1 -1
  712. package/src/list/ListItem.tsx +1 -1
  713. package/src/list/ListItemChildren.tsx +1 -1
  714. package/src/list/ListItemLink.tsx +1 -1
  715. package/src/list/ListSubheader.tsx +1 -1
  716. package/src/media-queries/AppSizeProvider.tsx +2 -2
  717. package/src/media-queries/useMediaQuery.ts +2 -2
  718. package/src/menu/DropdownMenu.tsx +2 -1
  719. package/src/menu/Menu.tsx +1 -1
  720. package/src/menu/MenuBar.tsx +1 -1
  721. package/src/menu/MenuButton.tsx +1 -1
  722. package/src/menu/MenuItem.tsx +1 -1
  723. package/src/menu/MenuItemCheckbox.tsx +1 -1
  724. package/src/menu/MenuItemFileInput.tsx +1 -1
  725. package/src/menu/MenuItemGroup.tsx +1 -1
  726. package/src/menu/MenuItemInputToggle.tsx +1 -1
  727. package/src/menu/MenuItemRadio.tsx +1 -1
  728. package/src/menu/MenuItemSeparator.tsx +1 -1
  729. package/src/menu/MenuItemSwitch.tsx +1 -1
  730. package/src/menu/MenuItemTextField.tsx +1 -1
  731. package/src/menu/useContextMenu.ts +1 -1
  732. package/src/navigation/CollapsibleNavGroup.tsx +1 -1
  733. package/src/navigation/DefaultNavigationRenderer.tsx +1 -1
  734. package/src/navigation/NavGroup.tsx +1 -1
  735. package/src/navigation/NavItem.tsx +1 -1
  736. package/src/navigation/NavItemButton.tsx +1 -1
  737. package/src/navigation/NavItemLink.tsx +1 -1
  738. package/src/navigation/NavSubheader.tsx +1 -1
  739. package/src/navigation/Navigation.tsx +1 -1
  740. package/src/navigation/useActiveHeadingId.ts +1 -1
  741. package/src/navigation/useNavigationExpansion.ts +2 -2
  742. package/src/navigation/useTableOfContentsHeadings.ts +1 -1
  743. package/src/overlay/Overlay.tsx +1 -1
  744. package/src/portal/Portal.tsx +1 -1
  745. package/src/portal/PortalContainerProvider.tsx +1 -1
  746. package/src/positioning/useFixedPositioning.ts +1 -1
  747. package/src/progress/CircularProgress.tsx +1 -1
  748. package/src/progress/LinearProgress.tsx +1 -1
  749. package/src/responsive-item/ResponsiveItem.tsx +1 -1
  750. package/src/responsive-item/ResponsiveItemOverlay.tsx +1 -1
  751. package/src/scroll/useScrollLock.ts +1 -1
  752. package/src/segmented-button/SegmentedButton.tsx +1 -1
  753. package/src/segmented-button/SegmentedButtonContainer.tsx +1 -1
  754. package/src/sheet/Sheet.tsx +1 -1
  755. package/src/snackbar/DefaultToastRenderer.tsx +1 -1
  756. package/src/snackbar/Snackbar.tsx +1 -1
  757. package/src/snackbar/Toast.tsx +1 -1
  758. package/src/snackbar/ToastActionButton.tsx +1 -1
  759. package/src/snackbar/ToastCloseButton.tsx +1 -1
  760. package/src/snackbar/ToastContent.tsx +1 -1
  761. package/src/snackbar/ToastManager.ts +1 -1
  762. package/src/snackbar/ToastManagerProvider.tsx +1 -1
  763. package/src/snackbar/useCurrentToastActions.ts +1 -1
  764. package/src/storage/useStorage.ts +1 -1
  765. package/src/suspense/CircularProgressSuspense.tsx +1 -1
  766. package/src/suspense/NullSuspense.tsx +1 -1
  767. package/src/table/StickyTableSection.tsx +2 -2
  768. package/src/table/Table.tsx +1 -1
  769. package/src/table/TableBody.tsx +1 -1
  770. package/src/table/TableCell.tsx +1 -1
  771. package/src/table/TableCheckbox.tsx +1 -1
  772. package/src/table/TableContainer.tsx +1 -1
  773. package/src/table/TableFooter.tsx +1 -1
  774. package/src/table/TableHeader.tsx +1 -1
  775. package/src/table/TableRadio.tsx +1 -1
  776. package/src/table/TableRow.tsx +1 -1
  777. package/src/tabs/SimpleTabPanel.tsx +2 -2
  778. package/src/tabs/SimpleTabPanels.tsx +2 -2
  779. package/src/tabs/Tab.tsx +1 -1
  780. package/src/tabs/TabList.tsx +1 -1
  781. package/src/tabs/useTabs.ts +6 -5
  782. package/src/theme/LocalStorageColorSchemeProvider.tsx +2 -2
  783. package/src/theme/ThemeProvider.tsx +1 -1
  784. package/src/theme/useColorSchemeProvider.ts +1 -0
  785. package/src/theme/utils.ts +2 -1
  786. package/src/tooltip/Tooltip.tsx +1 -1
  787. package/src/tooltip/TooltipHoverModeProvider.tsx +1 -1
  788. package/src/tooltip/useTooltip.ts +1 -1
  789. package/src/transition/CSSTransition.tsx +1 -1
  790. package/src/transition/Collapse.tsx +1 -1
  791. package/src/transition/CrossFade.tsx +1 -1
  792. package/src/transition/ScaleTransition.tsx +1 -1
  793. package/src/transition/SkeletonPlaceholder.tsx +1 -1
  794. package/src/transition/Slide.tsx +1 -1
  795. package/src/transition/SlideContainer.tsx +1 -1
  796. package/src/transition/useCSSTransition.ts +2 -2
  797. package/src/transition/useCarousel.ts +1 -1
  798. package/src/transition/useCollapseTransition.ts +2 -2
  799. package/src/transition/useCrossFadeTransition.ts +2 -2
  800. package/src/transition/useScaleTransition.ts +2 -2
  801. package/src/transition/useSkeletonPlaceholder.ts +2 -2
  802. package/src/transition/useSlideTransition.ts +1 -1
  803. package/src/transition/useTransition.ts +1 -1
  804. package/src/tree/DefaultTreeItemRenderer.tsx +1 -1
  805. package/src/tree/Tree.tsx +1 -1
  806. package/src/tree/TreeItem.tsx +1 -1
  807. package/src/tree/useTree.ts +1 -1
  808. package/src/tree/useTreeExpansion.ts +1 -1
  809. package/src/tree/useTreeItems.ts +1 -1
  810. package/src/tree/useTreeSelection.ts +1 -1
  811. package/src/typography/HighlightText.tsx +1 -1
  812. package/src/typography/Mark.tsx +1 -1
  813. package/src/typography/SrOnly.tsx +1 -1
  814. package/src/typography/TextContainer.tsx +1 -1
  815. package/src/typography/Typography.tsx +1 -1
  816. package/src/typography/WritingDirectionProvider.tsx +1 -1
  817. package/src/useEnsuredState.ts +6 -3
  818. package/src/utils/RenderRecursively.tsx +1 -1
  819. package/src/utils/bem.ts +1 -1
  820. package/src/utils/parseCssLengthUnit.ts +4 -0
  821. package/src/window-splitter/WindowSplitter.tsx +1 -1
@@ -44,7 +44,7 @@ export interface MainProps extends HTMLAttributes<HTMLElement>, MainClassNameOpt
44
44
  * }
45
45
  * ```
46
46
  *
47
- * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}
47
+ * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
48
48
  * @since 6.0.0 Renamed from `LayoutMain` removed a lot of
49
49
  * functionality to keep this component simple.
50
50
  */
@@ -30,7 +30,7 @@ import { useMainTabIndex } from "./useMainTabIndex.js";
30
30
  * }
31
31
  * ```
32
32
  *
33
- * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}
33
+ * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
34
34
  * @since 6.0.0 Renamed from `LayoutMain` removed a lot of
35
35
  * functionality to keep this component simple.
36
36
  */ export const Main = /*#__PURE__*/ forwardRef(function Main(props, ref) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/layout/Main.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ElementType,\n type HTMLAttributes,\n type ReactNode,\n type Ref,\n forwardRef,\n} from \"react\";\n\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { type MainClassNameOptions, main } from \"./mainStyles.js\";\nimport { useMainTabIndex } from \"./useMainTabIndex.js\";\n\n/**\n * @since 6.0.0\n */\nexport type CustomMainElement = ElementType<\n HTMLAttributes<HTMLElement> & {\n ref: Ref<HTMLElement>;\n className?: string;\n tabIndex?: number;\n }\n>;\n\n/**\n * @since 6.0.0\n */\nexport interface MainProps\n extends HTMLAttributes<HTMLElement>,\n MainClassNameOptions {\n /**\n * @defaultValue `\"main\"`\n */\n as?: CustomMainElement;\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This component is really only used to dynamically set the `tabIndex` to `-1`\n * while using a keyboard for the `SkipToMainContent` component's focus behavior\n * to work correctly. If you don't need that functionality, use the {@link main}\n * style utility instead.\n *\n * @example Styles Only\n * ```tsx\n * import { main as mainStyles } from \"@react-md/core/layout/mainStyles\":\n *\n * function MyCustomMainElement({ children }) {\n * return (\n * <main\n * className={mainStyles({\n * navOffset: true,\n * appBarOffset: true,\n * })}\n * >\n * {children}\n * </main>\n * );\n * }\n * ```\n *\n * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}\n * @since 6.0.0 Renamed from `LayoutMain` removed a lot of\n * functionality to keep this component simple.\n */\nexport const Main = forwardRef<HTMLElement, MainProps>(\n function Main(props, ref) {\n const {\n as: Component = \"main\",\n id: propId,\n className,\n children,\n tabIndex: propTabIndex,\n navOffset,\n appBarOffset,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"main\");\n const tabIndex = useMainTabIndex(propTabIndex);\n\n return (\n <Component\n {...remaining}\n id={id}\n ref={ref}\n className={main({ navOffset, appBarOffset, className })}\n tabIndex={tabIndex}\n >\n {children}\n </Component>\n );\n }\n);\n"],"names":["forwardRef","useEnsuredId","main","useMainTabIndex","Main","props","ref","as","Component","id","propId","className","children","tabIndex","propTabIndex","navOffset","appBarOffset","remaining"],"mappings":"AAAA;;AAEA,SAKEA,UAAU,QACL,QAAQ;AAEf,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAAoCC,IAAI,QAAQ,kBAAkB;AAClE,SAASC,eAAe,QAAQ,uBAAuB;AA0BvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BC,GACD,OAAO,MAAMC,qBAAOJ,WAClB,SAASI,KAAKC,KAAK,EAAEC,GAAG;IACtB,MAAM,EACJC,IAAIC,YAAY,MAAM,EACtBC,IAAIC,MAAM,EACVC,SAAS,EACTC,QAAQ,EACRC,UAAUC,YAAY,EACtBC,SAAS,EACTC,YAAY,EACZ,GAAGC,WACJ,GAAGZ;IACJ,MAAMI,KAAKR,aAAaS,QAAQ;IAChC,MAAMG,WAAWV,gBAAgBW;IAEjC,qBACE,KAACN;QACE,GAAGS,SAAS;QACbR,IAAIA;QACJH,KAAKA;QACLK,WAAWT,KAAK;YAAEa;YAAWC;YAAcL;QAAU;QACrDE,UAAUA;kBAETD;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/layout/Main.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ElementType,\n type HTMLAttributes,\n type ReactNode,\n type Ref,\n forwardRef,\n} from \"react\";\n\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { type MainClassNameOptions, main } from \"./mainStyles.js\";\nimport { useMainTabIndex } from \"./useMainTabIndex.js\";\n\n/**\n * @since 6.0.0\n */\nexport type CustomMainElement = ElementType<\n HTMLAttributes<HTMLElement> & {\n ref: Ref<HTMLElement>;\n className?: string;\n tabIndex?: number;\n }\n>;\n\n/**\n * @since 6.0.0\n */\nexport interface MainProps\n extends HTMLAttributes<HTMLElement>,\n MainClassNameOptions {\n /**\n * @defaultValue `\"main\"`\n */\n as?: CustomMainElement;\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This component is really only used to dynamically set the `tabIndex` to `-1`\n * while using a keyboard for the `SkipToMainContent` component's focus behavior\n * to work correctly. If you don't need that functionality, use the {@link main}\n * style utility instead.\n *\n * @example Styles Only\n * ```tsx\n * import { main as mainStyles } from \"@react-md/core/layout/mainStyles\":\n *\n * function MyCustomMainElement({ children }) {\n * return (\n * <main\n * className={mainStyles({\n * navOffset: true,\n * appBarOffset: true,\n * })}\n * >\n * {children}\n * </main>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}\n * @since 6.0.0 Renamed from `LayoutMain` removed a lot of\n * functionality to keep this component simple.\n */\nexport const Main = forwardRef<HTMLElement, MainProps>(\n function Main(props, ref) {\n const {\n as: Component = \"main\",\n id: propId,\n className,\n children,\n tabIndex: propTabIndex,\n navOffset,\n appBarOffset,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"main\");\n const tabIndex = useMainTabIndex(propTabIndex);\n\n return (\n <Component\n {...remaining}\n id={id}\n ref={ref}\n className={main({ navOffset, appBarOffset, className })}\n tabIndex={tabIndex}\n >\n {children}\n </Component>\n );\n }\n);\n"],"names":["forwardRef","useEnsuredId","main","useMainTabIndex","Main","props","ref","as","Component","id","propId","className","children","tabIndex","propTabIndex","navOffset","appBarOffset","remaining"],"mappings":"AAAA;;AAEA,SAKEA,UAAU,QACL,QAAQ;AAEf,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAAoCC,IAAI,QAAQ,kBAAkB;AAClE,SAASC,eAAe,QAAQ,uBAAuB;AA0BvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BC,GACD,OAAO,MAAMC,qBAAOJ,WAClB,SAASI,KAAKC,KAAK,EAAEC,GAAG;IACtB,MAAM,EACJC,IAAIC,YAAY,MAAM,EACtBC,IAAIC,MAAM,EACVC,SAAS,EACTC,QAAQ,EACRC,UAAUC,YAAY,EACtBC,SAAS,EACTC,YAAY,EACZ,GAAGC,WACJ,GAAGZ;IACJ,MAAMI,KAAKR,aAAaS,QAAQ;IAChC,MAAMG,WAAWV,gBAAgBW;IAEjC,qBACE,KAACN;QACE,GAAGS,SAAS;QACbR,IAAIA;QACJH,KAAKA;QACLK,WAAWT,KAAK;YAAEa;YAAWC;YAAcL;QAAU;QACrDE,UAAUA;kBAETD;;AAGP,GACA"}
@@ -180,7 +180,7 @@ export interface ExpandableLayoutImplementation extends TemporaryLayoutImplement
180
180
  * );
181
181
  * ```
182
182
  *
183
- * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}
183
+ * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
184
184
  * @since 6.0.0
185
185
  * @see {@link useResizableLayout}
186
186
  */
@@ -106,7 +106,7 @@ import { useTemporaryLayout } from "./useTemporaryLayout.js";
106
106
  * );
107
107
  * ```
108
108
  *
109
- * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}
109
+ * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
110
110
  * @since 6.0.0
111
111
  * @see {@link useResizableLayout}
112
112
  */ export function useExpandableLayout(options) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/layout/useExpandableLayout.ts"],"sourcesContent":["\"use client\";\n\nimport { cnb } from \"cnbuilder\";\n\nimport { useSsr } from \"../SsrProvider.js\";\nimport { useAppSize } from \"../media-queries/AppSizeProvider.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { type AppSize } from \"../media-queries/appSize.js\";\nimport { useMediaQuery } from \"../media-queries/useMediaQuery.js\";\nimport { type CSSTransitionElementProps } from \"../transition/types.js\";\nimport { type CssPosition, type UseStateInitializer } from \"../types.js\";\nimport { useToggle } from \"../useToggle.js\";\nimport { type LayoutNavProps } from \"./LayoutNav.js\";\nimport {\n type HorizontalLayoutTransitionOptions,\n useHorizontalLayoutTransition,\n} from \"./useHorizontalLayoutTransition.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { type useResizableLayout } from \"./useResizableLayout.js\";\nimport {\n type ProvidedLayoutNavToggleProps,\n type ProvidedTemporaryLayoutAppBarProps,\n type ProvidedTemporaryLayoutMainProps,\n type TemporaryLayoutImplementation,\n type TemporaryLayoutOptions,\n useTemporaryLayout,\n} from \"./useTemporaryLayout.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface ExpandableLayoutOptions extends TemporaryLayoutOptions {\n /** @defaultValue `\"fixed\"` */\n appBarPosition?: CssPosition;\n\n /** @defaultValue `false` */\n defaultExpanded?: UseStateInitializer<boolean>;\n\n /**\n * Set this to `true` if the expandable navigation should be the full height\n * of the screen. This will also update the app bar so that it is not covered\n * by the navigation. The default behavior is to place the navigation below\n * the fixed header.\n *\n * Set this to `\"static\"` to make the navigation span the full height of the\n * screen and hide the button until the screen shrinks to the temporary\n * layout type.\n *\n * @defaultValue `false`\n */\n fullHeightNav?: boolean | \"static\";\n\n /** @see {@link HorizontalLayoutTransitionOptions} */\n transitionProps?: Omit<HorizontalLayoutTransitionOptions, \"transitionIn\">;\n\n /**\n * The default behavior is to use the temporary layout until the\n * {@link AppSize.isTablet} is `true`. Set this to `\"desktop\"` to use the\n * temporary layout until {@link AppSize.isDesktop} is `true`. Otherwise,\n * provide a media query string to use the temporary layout until the media\n * query matches\n *\n * @example Custom Media Query\n * ```tsx\n * useExpandableLayout({\n * ...options,\n * // display the expandable layout once the min-width is at least 1201px\n * temporaryUntil: \"screen and (min-width: 1201px)\",\n * });\n * ```\n *\n * @defaultValue `\"tablet\"`\n */\n temporaryUntil?: \"tablet\" | \"desktop\" | (string & {});\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ProvidedLayoutMainProps\n extends ProvidedTemporaryLayoutMainProps,\n CSSTransitionElementProps<HTMLElement> {}\n\n/**\n * @since 6.0.0\n */\nexport type ProvidedLayoutNavProps = Pick<\n LayoutNavProps,\n \"expanded\" | \"appBarOffset\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport type ProvidedLayoutAppBarProps = ProvidedTemporaryLayoutAppBarProps &\n Partial<CSSTransitionElementProps<HTMLElement>>;\n\n/**\n * @since 6.0.0\n */\nexport interface ProvidedExpandableLayoutNavToggleProps\n extends ProvidedLayoutNavToggleProps {\n className: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ExpandableLayoutImplementation\n extends TemporaryLayoutImplementation {\n temporary: boolean;\n persistent: boolean;\n expanded: boolean;\n expandNavigation: () => void;\n collapseNavigation: () => void;\n toggleNavigation: () => void;\n appBarProps: ProvidedLayoutAppBarProps;\n mainProps: ProvidedLayoutMainProps;\n navToggleProps: ProvidedExpandableLayoutNavToggleProps;\n expandableNavProps: ProvidedLayoutNavProps;\n}\n\n/**\n * @example Main Usage\n * ```tsx\n * import { AppBarTitle } from \"@react-md/core/app-bar/AppBarTitle\";\n * import { Button } from \"@react-md/core/button/Button\";\n * import { LayoutAppBar } from \"@react-md/core/layout/LayoutAppBar\";\n * import { LayoutNav } from \"@react-md/core/layout/LayoutNav\";\n * import { Main } from \"@react-md/core/layout/Main\";\n * import { useExpandableLayout } from \"@react-md/core/layout/useExpandableLayout\";\n * import { Sheet } from \"@react-md/core/sheet/Sheet\";\n * import { type ReactElement, type ReactNode } from \"react\";\n *\n * import { CustomNavigation } from \"./CustomNavigation\";\n *\n * export interface LayoutProps {\n * children: ReactNode;\n * }\n *\n * export function Layout(props: LayoutProps): ReactElement {\n * const { children } = props;\n *\n * // choose whichever one for your app\n * // nextjs app dir\n * const pathname = usePathname();\n * // nextjs pages\n * const { pathname } = useRouter();\n * // react router\n * const { pathname } = useHistory();\n *\n * const {\n * temporary,\n * appBarProps,\n * expandableNavProps,\n * mainProps,\n * navToggleProps,\n * temporaryNavProps,\n * windowSplitterProps,\n * } = useExpandableLayout({ pathname });\n *\n * return (\n * <>\n * <LayoutAppBar {...appBarProps}>\n * <Button {...navToggleProps} />\n * <AppBarTitle>Hello, world!</AppBarTitle>\n * </LayoutAppBar>\n * <LayoutNav {...expandableNavProps}>\n * <CustomNavigation />\n * </LayoutNav>\n * {temporary && (\n * <Sheet {...temporaryNavProps}>\n * <CustomNavigation />\n * </Sheet>\n * )}\n * <Main {...mainProps}>{children}</Main>\n * </>\n * );\n * }\n * ```\n *\n * If you have a large navigation panel, you can conditionally render the\n * `LayoutNav` with the `persistent` boolean returned by the hook which will\n * ensure that the DOM has rehydrated before unmounting to prevent SSR errors.\n *\n * @example Safely Conditionally Rendering\n * ```diff\n * const {\n * temporary,\n * + persistent,\n * appBarProps,\n * expandableNavProps,\n * mainProps,\n * navToggleProps,\n * temporaryNavProps,\n * windowSplitterProps,\n * } = useExpandableLayout({ pathname });\n *\n * return (\n * <>\n * <LayoutAppBar {...appBarProps}>\n * <Button {...navToggleProps} />\n * <AppBarTitle>Hello, world!</AppBarTitle>\n * </LayoutAppBar>\n * - <LayoutNav {...expandableNavProps}>\n * - <CustomNavigation />\n * - </LayoutNav>\n * + {persistent && (\n * + <LayoutNav {...expandableNavProps}>\n * + <CustomNavigation />\n * + </LayoutNav>\n * + )}\n * {temporary && (\n * <Sheet {...temporaryNavProps}>\n * <CustomNavigation />\n * </Sheet>\n * )}\n * <Main {...mainProps}>{children}</Main>\n * </>\n * );\n * ```\n *\n * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}\n * @since 6.0.0\n * @see {@link useResizableLayout}\n */\nexport function useExpandableLayout(\n options: ExpandableLayoutOptions\n): ExpandableLayoutImplementation {\n const {\n fullHeightNav = false,\n temporaryUntil = \"tablet\",\n transitionProps,\n defaultExpanded = fullHeightNav === \"static\",\n ...temporaryOptions\n } = options;\n\n const ssr = useSsr();\n const {\n appBarProps,\n mainProps,\n navToggleProps,\n temporaryNavProps,\n hideTemporaryNav,\n showTemporaryNav,\n visible,\n } = useTemporaryLayout(temporaryOptions);\n\n const {\n toggled: expanded,\n enable: expandNavigation,\n disable: collapseNavigation,\n toggle: toggleNavigation,\n } = useToggle(defaultExpanded);\n const { elementProps } = useHorizontalLayoutTransition({\n ...transitionProps,\n transitionIn: expanded,\n });\n const { isPhone, isDesktop } = useAppSize();\n const isAppSizeMatch =\n temporaryUntil === \"tablet\" || temporaryUntil === \"desktop\";\n const matches = useMediaQuery(temporaryUntil, isAppSizeMatch);\n const temporary = isAppSizeMatch\n ? isPhone || (temporaryUntil === \"desktop\" && !isDesktop)\n : !matches;\n\n return {\n visible,\n temporary,\n persistent: ssr || !temporary,\n hideTemporaryNav,\n showTemporaryNav,\n expanded,\n expandNavigation,\n collapseNavigation,\n toggleNavigation,\n appBarProps: {\n ...appBarProps,\n ...(fullHeightNav ? elementProps : {}),\n },\n mainProps: {\n ...mainProps,\n ...elementProps,\n },\n temporaryNavProps,\n expandableNavProps: {\n expanded,\n appBarOffset: !fullHeightNav,\n },\n navToggleProps: {\n ...navToggleProps,\n onClick() {\n if (temporary) {\n showTemporaryNav();\n } else {\n toggleNavigation();\n }\n },\n className: cnb(fullHeightNav === \"static\" && \"rmd-layout-nav-toggle\"),\n },\n };\n}\n"],"names":["cnb","useSsr","useAppSize","useMediaQuery","useToggle","useHorizontalLayoutTransition","useTemporaryLayout","useExpandableLayout","options","fullHeightNav","temporaryUntil","transitionProps","defaultExpanded","temporaryOptions","ssr","appBarProps","mainProps","navToggleProps","temporaryNavProps","hideTemporaryNav","showTemporaryNav","visible","toggled","expanded","enable","expandNavigation","disable","collapseNavigation","toggle","toggleNavigation","elementProps","transitionIn","isPhone","isDesktop","isAppSizeMatch","matches","temporary","persistent","expandableNavProps","appBarOffset","onClick","className"],"mappings":"AAAA;AAEA,SAASA,GAAG,QAAQ,YAAY;AAEhC,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,UAAU,QAAQ,sCAAsC;AAGjE,SAASC,aAAa,QAAQ,oCAAoC;AAGlE,SAASC,SAAS,QAAQ,kBAAkB;AAE5C,SAEEC,6BAA6B,QACxB,qCAAqC;AAG5C,SAMEC,kBAAkB,QACb,0BAA0B;AAgGjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuGC,GACD,OAAO,SAASC,oBACdC,OAAgC;IAEhC,MAAM,EACJC,gBAAgB,KAAK,EACrBC,iBAAiB,QAAQ,EACzBC,eAAe,EACfC,kBAAkBH,kBAAkB,QAAQ,EAC5C,GAAGI,kBACJ,GAAGL;IAEJ,MAAMM,MAAMb;IACZ,MAAM,EACJc,WAAW,EACXC,SAAS,EACTC,cAAc,EACdC,iBAAiB,EACjBC,gBAAgB,EAChBC,gBAAgB,EAChBC,OAAO,EACR,GAAGf,mBAAmBO;IAEvB,MAAM,EACJS,SAASC,QAAQ,EACjBC,QAAQC,gBAAgB,EACxBC,SAASC,kBAAkB,EAC3BC,QAAQC,gBAAgB,EACzB,GAAGzB,UAAUQ;IACd,MAAM,EAAEkB,YAAY,EAAE,GAAGzB,8BAA8B;QACrD,GAAGM,eAAe;QAClBoB,cAAcR;IAChB;IACA,MAAM,EAAES,OAAO,EAAEC,SAAS,EAAE,GAAG/B;IAC/B,MAAMgC,iBACJxB,mBAAmB,YAAYA,mBAAmB;IACpD,MAAMyB,UAAUhC,cAAcO,gBAAgBwB;IAC9C,MAAME,YAAYF,iBACdF,WAAYtB,mBAAmB,aAAa,CAACuB,YAC7C,CAACE;IAEL,OAAO;QACLd;QACAe;QACAC,YAAYvB,OAAO,CAACsB;QACpBjB;QACAC;QACAG;QACAE;QACAE;QACAE;QACAd,aAAa;YACX,GAAGA,WAAW;YACd,GAAIN,gBAAgBqB,eAAe,CAAC,CAAC;QACvC;QACAd,WAAW;YACT,GAAGA,SAAS;YACZ,GAAGc,YAAY;QACjB;QACAZ;QACAoB,oBAAoB;YAClBf;YACAgB,cAAc,CAAC9B;QACjB;QACAQ,gBAAgB;YACd,GAAGA,cAAc;YACjBuB;gBACE,IAAIJ,WAAW;oBACbhB;gBACF,OAAO;oBACLS;gBACF;YACF;YACAY,WAAWzC,IAAIS,kBAAkB,YAAY;QAC/C;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/layout/useExpandableLayout.ts"],"sourcesContent":["\"use client\";\n\nimport { cnb } from \"cnbuilder\";\n\nimport { useSsr } from \"../SsrProvider.js\";\nimport { useAppSize } from \"../media-queries/AppSizeProvider.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { type AppSize } from \"../media-queries/appSize.js\";\nimport { useMediaQuery } from \"../media-queries/useMediaQuery.js\";\nimport { type CSSTransitionElementProps } from \"../transition/types.js\";\nimport { type CssPosition, type UseStateInitializer } from \"../types.js\";\nimport { useToggle } from \"../useToggle.js\";\nimport { type LayoutNavProps } from \"./LayoutNav.js\";\nimport {\n type HorizontalLayoutTransitionOptions,\n useHorizontalLayoutTransition,\n} from \"./useHorizontalLayoutTransition.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { type useResizableLayout } from \"./useResizableLayout.js\";\nimport {\n type ProvidedLayoutNavToggleProps,\n type ProvidedTemporaryLayoutAppBarProps,\n type ProvidedTemporaryLayoutMainProps,\n type TemporaryLayoutImplementation,\n type TemporaryLayoutOptions,\n useTemporaryLayout,\n} from \"./useTemporaryLayout.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface ExpandableLayoutOptions extends TemporaryLayoutOptions {\n /** @defaultValue `\"fixed\"` */\n appBarPosition?: CssPosition;\n\n /** @defaultValue `false` */\n defaultExpanded?: UseStateInitializer<boolean>;\n\n /**\n * Set this to `true` if the expandable navigation should be the full height\n * of the screen. This will also update the app bar so that it is not covered\n * by the navigation. The default behavior is to place the navigation below\n * the fixed header.\n *\n * Set this to `\"static\"` to make the navigation span the full height of the\n * screen and hide the button until the screen shrinks to the temporary\n * layout type.\n *\n * @defaultValue `false`\n */\n fullHeightNav?: boolean | \"static\";\n\n /** @see {@link HorizontalLayoutTransitionOptions} */\n transitionProps?: Omit<HorizontalLayoutTransitionOptions, \"transitionIn\">;\n\n /**\n * The default behavior is to use the temporary layout until the\n * {@link AppSize.isTablet} is `true`. Set this to `\"desktop\"` to use the\n * temporary layout until {@link AppSize.isDesktop} is `true`. Otherwise,\n * provide a media query string to use the temporary layout until the media\n * query matches\n *\n * @example Custom Media Query\n * ```tsx\n * useExpandableLayout({\n * ...options,\n * // display the expandable layout once the min-width is at least 1201px\n * temporaryUntil: \"screen and (min-width: 1201px)\",\n * });\n * ```\n *\n * @defaultValue `\"tablet\"`\n */\n temporaryUntil?: \"tablet\" | \"desktop\" | (string & {});\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ProvidedLayoutMainProps\n extends ProvidedTemporaryLayoutMainProps,\n CSSTransitionElementProps<HTMLElement> {}\n\n/**\n * @since 6.0.0\n */\nexport type ProvidedLayoutNavProps = Pick<\n LayoutNavProps,\n \"expanded\" | \"appBarOffset\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport type ProvidedLayoutAppBarProps = ProvidedTemporaryLayoutAppBarProps &\n Partial<CSSTransitionElementProps<HTMLElement>>;\n\n/**\n * @since 6.0.0\n */\nexport interface ProvidedExpandableLayoutNavToggleProps\n extends ProvidedLayoutNavToggleProps {\n className: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ExpandableLayoutImplementation\n extends TemporaryLayoutImplementation {\n temporary: boolean;\n persistent: boolean;\n expanded: boolean;\n expandNavigation: () => void;\n collapseNavigation: () => void;\n toggleNavigation: () => void;\n appBarProps: ProvidedLayoutAppBarProps;\n mainProps: ProvidedLayoutMainProps;\n navToggleProps: ProvidedExpandableLayoutNavToggleProps;\n expandableNavProps: ProvidedLayoutNavProps;\n}\n\n/**\n * @example Main Usage\n * ```tsx\n * import { AppBarTitle } from \"@react-md/core/app-bar/AppBarTitle\";\n * import { Button } from \"@react-md/core/button/Button\";\n * import { LayoutAppBar } from \"@react-md/core/layout/LayoutAppBar\";\n * import { LayoutNav } from \"@react-md/core/layout/LayoutNav\";\n * import { Main } from \"@react-md/core/layout/Main\";\n * import { useExpandableLayout } from \"@react-md/core/layout/useExpandableLayout\";\n * import { Sheet } from \"@react-md/core/sheet/Sheet\";\n * import { type ReactElement, type ReactNode } from \"react\";\n *\n * import { CustomNavigation } from \"./CustomNavigation\";\n *\n * export interface LayoutProps {\n * children: ReactNode;\n * }\n *\n * export function Layout(props: LayoutProps): ReactElement {\n * const { children } = props;\n *\n * // choose whichever one for your app\n * // nextjs app dir\n * const pathname = usePathname();\n * // nextjs pages\n * const { pathname } = useRouter();\n * // react router\n * const { pathname } = useHistory();\n *\n * const {\n * temporary,\n * appBarProps,\n * expandableNavProps,\n * mainProps,\n * navToggleProps,\n * temporaryNavProps,\n * windowSplitterProps,\n * } = useExpandableLayout({ pathname });\n *\n * return (\n * <>\n * <LayoutAppBar {...appBarProps}>\n * <Button {...navToggleProps} />\n * <AppBarTitle>Hello, world!</AppBarTitle>\n * </LayoutAppBar>\n * <LayoutNav {...expandableNavProps}>\n * <CustomNavigation />\n * </LayoutNav>\n * {temporary && (\n * <Sheet {...temporaryNavProps}>\n * <CustomNavigation />\n * </Sheet>\n * )}\n * <Main {...mainProps}>{children}</Main>\n * </>\n * );\n * }\n * ```\n *\n * If you have a large navigation panel, you can conditionally render the\n * `LayoutNav` with the `persistent` boolean returned by the hook which will\n * ensure that the DOM has rehydrated before unmounting to prevent SSR errors.\n *\n * @example Safely Conditionally Rendering\n * ```diff\n * const {\n * temporary,\n * + persistent,\n * appBarProps,\n * expandableNavProps,\n * mainProps,\n * navToggleProps,\n * temporaryNavProps,\n * windowSplitterProps,\n * } = useExpandableLayout({ pathname });\n *\n * return (\n * <>\n * <LayoutAppBar {...appBarProps}>\n * <Button {...navToggleProps} />\n * <AppBarTitle>Hello, world!</AppBarTitle>\n * </LayoutAppBar>\n * - <LayoutNav {...expandableNavProps}>\n * - <CustomNavigation />\n * - </LayoutNav>\n * + {persistent && (\n * + <LayoutNav {...expandableNavProps}>\n * + <CustomNavigation />\n * + </LayoutNav>\n * + )}\n * {temporary && (\n * <Sheet {...temporaryNavProps}>\n * <CustomNavigation />\n * </Sheet>\n * )}\n * <Main {...mainProps}>{children}</Main>\n * </>\n * );\n * ```\n *\n * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}\n * @since 6.0.0\n * @see {@link useResizableLayout}\n */\nexport function useExpandableLayout(\n options: ExpandableLayoutOptions\n): ExpandableLayoutImplementation {\n const {\n fullHeightNav = false,\n temporaryUntil = \"tablet\",\n transitionProps,\n defaultExpanded = fullHeightNav === \"static\",\n ...temporaryOptions\n } = options;\n\n const ssr = useSsr();\n const {\n appBarProps,\n mainProps,\n navToggleProps,\n temporaryNavProps,\n hideTemporaryNav,\n showTemporaryNav,\n visible,\n } = useTemporaryLayout(temporaryOptions);\n\n const {\n toggled: expanded,\n enable: expandNavigation,\n disable: collapseNavigation,\n toggle: toggleNavigation,\n } = useToggle(defaultExpanded);\n const { elementProps } = useHorizontalLayoutTransition({\n ...transitionProps,\n transitionIn: expanded,\n });\n const { isPhone, isDesktop } = useAppSize();\n const isAppSizeMatch =\n temporaryUntil === \"tablet\" || temporaryUntil === \"desktop\";\n const matches = useMediaQuery(temporaryUntil, isAppSizeMatch);\n const temporary = isAppSizeMatch\n ? isPhone || (temporaryUntil === \"desktop\" && !isDesktop)\n : !matches;\n\n return {\n visible,\n temporary,\n persistent: ssr || !temporary,\n hideTemporaryNav,\n showTemporaryNav,\n expanded,\n expandNavigation,\n collapseNavigation,\n toggleNavigation,\n appBarProps: {\n ...appBarProps,\n ...(fullHeightNav ? elementProps : {}),\n },\n mainProps: {\n ...mainProps,\n ...elementProps,\n },\n temporaryNavProps,\n expandableNavProps: {\n expanded,\n appBarOffset: !fullHeightNav,\n },\n navToggleProps: {\n ...navToggleProps,\n onClick() {\n if (temporary) {\n showTemporaryNav();\n } else {\n toggleNavigation();\n }\n },\n className: cnb(fullHeightNav === \"static\" && \"rmd-layout-nav-toggle\"),\n },\n };\n}\n"],"names":["cnb","useSsr","useAppSize","useMediaQuery","useToggle","useHorizontalLayoutTransition","useTemporaryLayout","useExpandableLayout","options","fullHeightNav","temporaryUntil","transitionProps","defaultExpanded","temporaryOptions","ssr","appBarProps","mainProps","navToggleProps","temporaryNavProps","hideTemporaryNav","showTemporaryNav","visible","toggled","expanded","enable","expandNavigation","disable","collapseNavigation","toggle","toggleNavigation","elementProps","transitionIn","isPhone","isDesktop","isAppSizeMatch","matches","temporary","persistent","expandableNavProps","appBarOffset","onClick","className"],"mappings":"AAAA;AAEA,SAASA,GAAG,QAAQ,YAAY;AAEhC,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,UAAU,QAAQ,sCAAsC;AAGjE,SAASC,aAAa,QAAQ,oCAAoC;AAGlE,SAASC,SAAS,QAAQ,kBAAkB;AAE5C,SAEEC,6BAA6B,QACxB,qCAAqC;AAG5C,SAMEC,kBAAkB,QACb,0BAA0B;AAgGjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuGC,GACD,OAAO,SAASC,oBACdC,OAAgC;IAEhC,MAAM,EACJC,gBAAgB,KAAK,EACrBC,iBAAiB,QAAQ,EACzBC,eAAe,EACfC,kBAAkBH,kBAAkB,QAAQ,EAC5C,GAAGI,kBACJ,GAAGL;IAEJ,MAAMM,MAAMb;IACZ,MAAM,EACJc,WAAW,EACXC,SAAS,EACTC,cAAc,EACdC,iBAAiB,EACjBC,gBAAgB,EAChBC,gBAAgB,EAChBC,OAAO,EACR,GAAGf,mBAAmBO;IAEvB,MAAM,EACJS,SAASC,QAAQ,EACjBC,QAAQC,gBAAgB,EACxBC,SAASC,kBAAkB,EAC3BC,QAAQC,gBAAgB,EACzB,GAAGzB,UAAUQ;IACd,MAAM,EAAEkB,YAAY,EAAE,GAAGzB,8BAA8B;QACrD,GAAGM,eAAe;QAClBoB,cAAcR;IAChB;IACA,MAAM,EAAES,OAAO,EAAEC,SAAS,EAAE,GAAG/B;IAC/B,MAAMgC,iBACJxB,mBAAmB,YAAYA,mBAAmB;IACpD,MAAMyB,UAAUhC,cAAcO,gBAAgBwB;IAC9C,MAAME,YAAYF,iBACdF,WAAYtB,mBAAmB,aAAa,CAACuB,YAC7C,CAACE;IAEL,OAAO;QACLd;QACAe;QACAC,YAAYvB,OAAO,CAACsB;QACpBjB;QACAC;QACAG;QACAE;QACAE;QACAE;QACAd,aAAa;YACX,GAAGA,WAAW;YACd,GAAIN,gBAAgBqB,eAAe,CAAC,CAAC;QACvC;QACAd,WAAW;YACT,GAAGA,SAAS;YACZ,GAAGc,YAAY;QACjB;QACAZ;QACAoB,oBAAoB;YAClBf;YACAgB,cAAc,CAAC9B;QACjB;QACAQ,gBAAgB;YACd,GAAGA,cAAc;YACjBuB;gBACE,IAAIJ,WAAW;oBACbhB;gBACF,OAAO;oBACLS;gBACF;YACF;YACAY,WAAWzC,IAAIS,kBAAkB,YAAY;QAC/C;IACF;AACF"}
@@ -63,7 +63,7 @@ export interface HorizontalLayoutTransitionOptions extends PreconfiguredCSSTrans
63
63
  * }
64
64
  * ```
65
65
  *
66
- * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}
66
+ * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
67
67
  * @since 6.0.0
68
68
  */
69
69
  export declare function useHorizontalLayoutTransition<E extends HTMLElement = HTMLElement>(options: HorizontalLayoutTransitionOptions): CSSTransitionHookReturnValue<E>;
@@ -50,7 +50,7 @@ import { useCSSTransition } from "../transition/useCSSTransition.js";
50
50
  * }
51
51
  * ```
52
52
  *
53
- * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}
53
+ * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
54
54
  * @since 6.0.0
55
55
  */ export function useHorizontalLayoutTransition(options) {
56
56
  return useCSSTransition({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/layout/useHorizontalLayoutTransition.ts"],"sourcesContent":["\"use client\";\n\nimport { cnb } from \"cnbuilder\";\n\nimport { DEFAULT_SHEET_TIMEOUT } from \"../sheet/styles.js\";\nimport {\n type CSSTransitionClassNames,\n type CSSTransitionHookReturnValue,\n type PreconfiguredCSSTransitionOptions,\n type TransitionTimeout,\n} from \"../transition/types.js\";\nimport { useCSSTransition } from \"../transition/useCSSTransition.js\";\n\n/**\n * @since 6.0.0\n */\nexport const DEFAULT_HORIZONTAL_LAYOUT_TRANSITION_CLASSNAMES = {\n appearDone: \"rmd-layout-h--active\",\n enter: \"rmd-layout-h--enter\",\n enterActive: \"rmd-layout-h--active\",\n enterDone: \"rmd-layout-h--active\",\n exit: \"rmd-layout-h--exit\",\n} as const satisfies CSSTransitionClassNames;\n\n/**\n * @since 6.0.0\n */\nexport interface HorizontalLayoutTransitionOptions\n extends PreconfiguredCSSTransitionOptions<HTMLElement> {\n /**\n * @see {@link DEFAULT_SHEET_TIMEOUT}\n * @defaultValue `DEFAULT_SHEET_TIMEOUT`\n */\n timeout?: TransitionTimeout;\n /**\n * @see {@link DEFAULT_HORIZONTAL_LAYOUT_TRANSITION_CLASSNAMES}\n * @defaultValue `DEFAULT_HORIZONTAL_LAYOUT_TRANSITION_CLASSNAMES`\n */\n classNames?: CSSTransitionClassNames;\n}\n\n/**\n * @example\n * ```tsx\n * import { LayoutAppBar } from \"@react-md/core/layout/LayoutAppBar\";\n * import { Main } from \"@react-md/core/layout/Main\";\n * import { useHorizontalLayoutTransition } from \"@react-md/core/layout/useHorizontalLayoutTransition\";\n * import type { ReactElement, ReactNode } from \"react\";\n *\n * interface Props {\n * title: ReactNode;\n * children: ReactNode;\n * }\n *\n * export default function Example({ title, children }: Props): ReactElement {\n * const { toggled: staticNavExpanded, toggle: toggleStaticNav } = useToggle();\n * const { elementProps, className } = useHorizontalLayoutTransition({\n * transitionIn: staticNavExpanded,\n * });\n *\n * return (\n * <>\n * <LayoutAppBar className={className}>\n * <Button\n * aria-label=\"Navigation\"\n * buttonType=\"icon\"\n * onClick={toggleStaticNav}\n * >\n * <MenuOutlinedIcon />\n * '</Button>\n * {title}\n * </LayoutAppBar>\n * <Main {...elementProps}>\n * {children}\n * </Main>\n * </>\n * );\n * }\n * ```\n *\n * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}\n * @since 6.0.0\n */\nexport function useHorizontalLayoutTransition<\n E extends HTMLElement = HTMLElement,\n>(options: HorizontalLayoutTransitionOptions): CSSTransitionHookReturnValue<E> {\n return useCSSTransition({\n timeout: DEFAULT_SHEET_TIMEOUT,\n classNames: DEFAULT_HORIZONTAL_LAYOUT_TRANSITION_CLASSNAMES,\n ...options,\n className: cnb(\"rmd-layout-h\", options.className),\n });\n}\n"],"names":["cnb","DEFAULT_SHEET_TIMEOUT","useCSSTransition","DEFAULT_HORIZONTAL_LAYOUT_TRANSITION_CLASSNAMES","appearDone","enter","enterActive","enterDone","exit","useHorizontalLayoutTransition","options","timeout","classNames","className"],"mappings":"AAAA;AAEA,SAASA,GAAG,QAAQ,YAAY;AAEhC,SAASC,qBAAqB,QAAQ,qBAAqB;AAO3D,SAASC,gBAAgB,QAAQ,oCAAoC;AAErE;;CAEC,GACD,OAAO,MAAMC,kDAAkD;IAC7DC,YAAY;IACZC,OAAO;IACPC,aAAa;IACbC,WAAW;IACXC,MAAM;AACR,EAA6C;AAmB7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCC,GACD,OAAO,SAASC,8BAEdC,OAA0C;IAC1C,OAAOR,iBAAiB;QACtBS,SAASV;QACTW,YAAYT;QACZ,GAAGO,OAAO;QACVG,WAAWb,IAAI,gBAAgBU,QAAQG,SAAS;IAClD;AACF"}
1
+ {"version":3,"sources":["../../src/layout/useHorizontalLayoutTransition.ts"],"sourcesContent":["\"use client\";\n\nimport { cnb } from \"cnbuilder\";\n\nimport { DEFAULT_SHEET_TIMEOUT } from \"../sheet/styles.js\";\nimport {\n type CSSTransitionClassNames,\n type CSSTransitionHookReturnValue,\n type PreconfiguredCSSTransitionOptions,\n type TransitionTimeout,\n} from \"../transition/types.js\";\nimport { useCSSTransition } from \"../transition/useCSSTransition.js\";\n\n/**\n * @since 6.0.0\n */\nexport const DEFAULT_HORIZONTAL_LAYOUT_TRANSITION_CLASSNAMES = {\n appearDone: \"rmd-layout-h--active\",\n enter: \"rmd-layout-h--enter\",\n enterActive: \"rmd-layout-h--active\",\n enterDone: \"rmd-layout-h--active\",\n exit: \"rmd-layout-h--exit\",\n} as const satisfies CSSTransitionClassNames;\n\n/**\n * @since 6.0.0\n */\nexport interface HorizontalLayoutTransitionOptions\n extends PreconfiguredCSSTransitionOptions<HTMLElement> {\n /**\n * @see {@link DEFAULT_SHEET_TIMEOUT}\n * @defaultValue `DEFAULT_SHEET_TIMEOUT`\n */\n timeout?: TransitionTimeout;\n /**\n * @see {@link DEFAULT_HORIZONTAL_LAYOUT_TRANSITION_CLASSNAMES}\n * @defaultValue `DEFAULT_HORIZONTAL_LAYOUT_TRANSITION_CLASSNAMES`\n */\n classNames?: CSSTransitionClassNames;\n}\n\n/**\n * @example\n * ```tsx\n * import { LayoutAppBar } from \"@react-md/core/layout/LayoutAppBar\";\n * import { Main } from \"@react-md/core/layout/Main\";\n * import { useHorizontalLayoutTransition } from \"@react-md/core/layout/useHorizontalLayoutTransition\";\n * import type { ReactElement, ReactNode } from \"react\";\n *\n * interface Props {\n * title: ReactNode;\n * children: ReactNode;\n * }\n *\n * export default function Example({ title, children }: Props): ReactElement {\n * const { toggled: staticNavExpanded, toggle: toggleStaticNav } = useToggle();\n * const { elementProps, className } = useHorizontalLayoutTransition({\n * transitionIn: staticNavExpanded,\n * });\n *\n * return (\n * <>\n * <LayoutAppBar className={className}>\n * <Button\n * aria-label=\"Navigation\"\n * buttonType=\"icon\"\n * onClick={toggleStaticNav}\n * >\n * <MenuOutlinedIcon />\n * '</Button>\n * {title}\n * </LayoutAppBar>\n * <Main {...elementProps}>\n * {children}\n * </Main>\n * </>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}\n * @since 6.0.0\n */\nexport function useHorizontalLayoutTransition<\n E extends HTMLElement = HTMLElement,\n>(options: HorizontalLayoutTransitionOptions): CSSTransitionHookReturnValue<E> {\n return useCSSTransition({\n timeout: DEFAULT_SHEET_TIMEOUT,\n classNames: DEFAULT_HORIZONTAL_LAYOUT_TRANSITION_CLASSNAMES,\n ...options,\n className: cnb(\"rmd-layout-h\", options.className),\n });\n}\n"],"names":["cnb","DEFAULT_SHEET_TIMEOUT","useCSSTransition","DEFAULT_HORIZONTAL_LAYOUT_TRANSITION_CLASSNAMES","appearDone","enter","enterActive","enterDone","exit","useHorizontalLayoutTransition","options","timeout","classNames","className"],"mappings":"AAAA;AAEA,SAASA,GAAG,QAAQ,YAAY;AAEhC,SAASC,qBAAqB,QAAQ,qBAAqB;AAO3D,SAASC,gBAAgB,QAAQ,oCAAoC;AAErE;;CAEC,GACD,OAAO,MAAMC,kDAAkD;IAC7DC,YAAY;IACZC,OAAO;IACPC,aAAa;IACbC,WAAW;IACXC,MAAM;AACR,EAA6C;AAmB7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCC,GACD,OAAO,SAASC,8BAEdC,OAA0C;IAC1C,OAAOR,iBAAiB;QACtBS,SAASV;QACTW,YAAYT;QACZ,GAAGO,OAAO;QACVG,WAAWb,IAAI,gBAAgBU,QAAQG,SAAS;IAClD;AACF"}
@@ -56,7 +56,7 @@ export interface LayoutAppBarHeightResult {
56
56
  * };
57
57
  * ```
58
58
  *
59
- * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}
59
+ * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
60
60
  * @since 6.0.0
61
61
  */
62
62
  export declare function useLayoutAppBarHeight(ref?: Ref<HTMLDivElement>): LayoutAppBarHeightResult;
@@ -43,7 +43,7 @@ import { useElementSize } from "../useElementSize.js";
43
43
  * };
44
44
  * ```
45
45
  *
46
- * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}
46
+ * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
47
47
  * @since 6.0.0
48
48
  */ export function useLayoutAppBarHeight(ref) {
49
49
  const { height, elementRef, observedOnce } = useElementSize({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/layout/useLayoutAppBarHeight.ts"],"sourcesContent":["\"use client\";\n\nimport { type Ref, type RefCallback, useMemo } from \"react\";\n\nimport { type CSSVariable } from \"../theme/types.js\";\nimport { useElementSize } from \"../useElementSize.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-layout-size\"?: string;\n \"--rmd-layout-header-height\"?: string;\n }\n}\n\n/**\n * @since 6.0.0\n */\nexport interface LayoutAppBarHeightResult {\n height: number | undefined;\n variables: readonly CSSVariable[];\n appBarRef: RefCallback<HTMLDivElement>;\n}\n\n/**\n * @example Main Usage\n * ```tsx\n * import { AppBar } from \"@react-md/core/app-bar/AppBar\";\n * import { useLayoutAppBarHeight } from \"@react-md/core/layout/useLayoutAppBarHeight\";\n * import { useCSSVariables } from \"@react-md/core/theme/useCSSVariables\";\n * import type { PropsWithChildren, ReactElement } from \"react\";\n *\n * export function LayoutHeader({ children }: PropsWithChildren): ReactElement {\n * const { appBarRef, variables } = useLayoutAppBarHeight();\n * useCSSVariables(variables);\n *\n * return (\n * <AppBar ref={appBarRef} {...customProps}>\n * <CustomChildren />\n * </AppBar>\n * );\n * };\n * ```\n *\n * @example Inline Variables\n * ```tsx\n * import { AppBar } from \"@react-md/core/app-bar/AppBar\";\n * import { useLayoutAppBarHeight } from \"@react-md/core/layout/useLayoutAppBarHeight\";\n * import { useInlineCSSVariables } from \"@react-md/core/theme/useInlineCSSVariables\";\n * import type { PropsWithChildren, ReactElement } from \"react\";\n *\n * export function Layout({ children }: PropsWithChildren): ReactElement {\n * const { appBarRef, variables } = useLayoutAppBarHeight();\n * const inlineStyle = useCSSVariables(variables);\n *\n * return (\n * <div style={inlineStyle}>\n * <AppBar ref={appBarRef} {...customProps}>\n * <CustomChildren />\n * </AppBar>\n * {children}\n * </div>\n * );\n * };\n * ```\n *\n * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}\n * @since 6.0.0\n */\nexport function useLayoutAppBarHeight(\n ref?: Ref<HTMLDivElement>\n): LayoutAppBarHeightResult {\n const { height, elementRef, observedOnce } = useElementSize({\n ref,\n disableWidth: true,\n });\n const variables = useMemo<CSSVariable[]>(() => {\n if (Number.isNaN(height) || !observedOnce) {\n return [];\n }\n\n return [{ name: \"--rmd-layout-header-height\", value: `${height}px` }];\n }, [height, observedOnce]);\n\n return {\n height,\n variables,\n appBarRef: elementRef,\n };\n}\n"],"names":["useMemo","useElementSize","useLayoutAppBarHeight","ref","height","elementRef","observedOnce","disableWidth","variables","Number","isNaN","name","value","appBarRef"],"mappings":"AAAA;AAEA,SAAqCA,OAAO,QAAQ,QAAQ;AAG5D,SAASC,cAAc,QAAQ,uBAAuB;AAkBtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CC,GACD,OAAO,SAASC,sBACdC,GAAyB;IAEzB,MAAM,EAAEC,MAAM,EAAEC,UAAU,EAAEC,YAAY,EAAE,GAAGL,eAAe;QAC1DE;QACAI,cAAc;IAChB;IACA,MAAMC,YAAYR,QAAuB;QACvC,IAAIS,OAAOC,KAAK,CAACN,WAAW,CAACE,cAAc;YACzC,OAAO,EAAE;QACX;QAEA,OAAO;YAAC;gBAAEK,MAAM;gBAA8BC,OAAO,GAAGR,OAAO,EAAE,CAAC;YAAC;SAAE;IACvE,GAAG;QAACA;QAAQE;KAAa;IAEzB,OAAO;QACLF;QACAI;QACAK,WAAWR;IACb;AACF"}
1
+ {"version":3,"sources":["../../src/layout/useLayoutAppBarHeight.ts"],"sourcesContent":["\"use client\";\n\nimport { type Ref, type RefCallback, useMemo } from \"react\";\n\nimport { type CSSVariable } from \"../theme/types.js\";\nimport { useElementSize } from \"../useElementSize.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-layout-size\"?: string;\n \"--rmd-layout-header-height\"?: string;\n }\n}\n\n/**\n * @since 6.0.0\n */\nexport interface LayoutAppBarHeightResult {\n height: number | undefined;\n variables: readonly CSSVariable[];\n appBarRef: RefCallback<HTMLDivElement>;\n}\n\n/**\n * @example Main Usage\n * ```tsx\n * import { AppBar } from \"@react-md/core/app-bar/AppBar\";\n * import { useLayoutAppBarHeight } from \"@react-md/core/layout/useLayoutAppBarHeight\";\n * import { useCSSVariables } from \"@react-md/core/theme/useCSSVariables\";\n * import type { PropsWithChildren, ReactElement } from \"react\";\n *\n * export function LayoutHeader({ children }: PropsWithChildren): ReactElement {\n * const { appBarRef, variables } = useLayoutAppBarHeight();\n * useCSSVariables(variables);\n *\n * return (\n * <AppBar ref={appBarRef} {...customProps}>\n * <CustomChildren />\n * </AppBar>\n * );\n * };\n * ```\n *\n * @example Inline Variables\n * ```tsx\n * import { AppBar } from \"@react-md/core/app-bar/AppBar\";\n * import { useLayoutAppBarHeight } from \"@react-md/core/layout/useLayoutAppBarHeight\";\n * import { useInlineCSSVariables } from \"@react-md/core/theme/useInlineCSSVariables\";\n * import type { PropsWithChildren, ReactElement } from \"react\";\n *\n * export function Layout({ children }: PropsWithChildren): ReactElement {\n * const { appBarRef, variables } = useLayoutAppBarHeight();\n * const inlineStyle = useCSSVariables(variables);\n *\n * return (\n * <div style={inlineStyle}>\n * <AppBar ref={appBarRef} {...customProps}>\n * <CustomChildren />\n * </AppBar>\n * {children}\n * </div>\n * );\n * };\n * ```\n *\n * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}\n * @since 6.0.0\n */\nexport function useLayoutAppBarHeight(\n ref?: Ref<HTMLDivElement>\n): LayoutAppBarHeightResult {\n const { height, elementRef, observedOnce } = useElementSize({\n ref,\n disableWidth: true,\n });\n const variables = useMemo<CSSVariable[]>(() => {\n if (Number.isNaN(height) || !observedOnce) {\n return [];\n }\n\n return [{ name: \"--rmd-layout-header-height\", value: `${height}px` }];\n }, [height, observedOnce]);\n\n return {\n height,\n variables,\n appBarRef: elementRef,\n };\n}\n"],"names":["useMemo","useElementSize","useLayoutAppBarHeight","ref","height","elementRef","observedOnce","disableWidth","variables","Number","isNaN","name","value","appBarRef"],"mappings":"AAAA;AAEA,SAAqCA,OAAO,QAAQ,QAAQ;AAG5D,SAASC,cAAc,QAAQ,uBAAuB;AAkBtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CC,GACD,OAAO,SAASC,sBACdC,GAAyB;IAEzB,MAAM,EAAEC,MAAM,EAAEC,UAAU,EAAEC,YAAY,EAAE,GAAGL,eAAe;QAC1DE;QACAI,cAAc;IAChB;IACA,MAAMC,YAAYR,QAAuB;QACvC,IAAIS,OAAOC,KAAK,CAACN,WAAW,CAACE,cAAc;YACzC,OAAO,EAAE;QACX;QAEA,OAAO;YAAC;gBAAEK,MAAM;gBAA8BC,OAAO,GAAGR,OAAO,EAAE,CAAC;YAAC;SAAE;IACvE,GAAG;QAACA;QAAQE;KAAa;IAEzB,OAAO;QACLF;QACAI;QACAK,WAAWR;IACb;AACF"}
@@ -135,9 +135,9 @@ export interface LayoutTreeImplementation<T extends TreeItemNode = DefaultTreeIt
135
135
  * }
136
136
  * ```
137
137
  *
138
- * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}
139
- * @see {@link https://next.react-md.dev/components/tree | Tree Demos}
140
- * @see {@link https://next.react-md.dev/hooks/use-layout-tree | useLayoutTree Demos}
138
+ * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
139
+ * @see {@link https://react-md.dev/components/tree | Tree Demos}
140
+ * @see {@link https://react-md.dev/hooks/use-layout-tree | useLayoutTree Demos}
141
141
  * @since 6.0.0 Renamed from `useLayoutNavigation`.
142
142
  */
143
143
  export declare function useLayoutTree(options: LayoutTreeOptions): LayoutTreeImplementation;
@@ -86,9 +86,9 @@ const noop = ()=>{
86
86
  * }
87
87
  * ```
88
88
  *
89
- * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}
90
- * @see {@link https://next.react-md.dev/components/tree | Tree Demos}
91
- * @see {@link https://next.react-md.dev/hooks/use-layout-tree | useLayoutTree Demos}
89
+ * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
90
+ * @see {@link https://react-md.dev/components/tree | Tree Demos}
91
+ * @see {@link https://react-md.dev/hooks/use-layout-tree | useLayoutTree Demos}
92
92
  * @since 6.0.0 Renamed from `useLayoutNavigation`.
93
93
  */ export function useLayoutTree(options) {
94
94
  const { defaultExpandedIds, navItems, pathname } = options;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/layout/useLayoutTree.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useMemo } from \"react\";\n\nimport { type TreeProps } from \"../tree/Tree.js\";\nimport {\n type DefaultTreeItemNode,\n type TreeData,\n type TreeDefaultIds,\n type TreeItemNode,\n} from \"../tree/types.js\";\nimport { type TreeImplementation } from \"../tree/useTree.js\";\nimport { useTreeExpansion } from \"../tree/useTreeExpansion.js\";\nimport { getTreeItemsFrom } from \"../tree/utils.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @internal\n */\nconst getParentIds = (\n itemId: string,\n navItems: TreeData<TreeItemNode>\n): readonly string[] =>\n getTreeItemsFrom(navItems, itemId).map(({ itemId }) => itemId);\n\n/**\n * @since 6.0.0 Removed the `linkComponent` option.\n */\nexport interface LayoutTreeOptions<\n T extends TreeItemNode = DefaultTreeItemNode,\n> {\n /**\n * The current pathname which is used as the tree `itemId`.\n */\n pathname: string;\n\n /**\n * @example\n * ```tsx\n * const navItems = {\n * \"/\": {\n * itemId: \"/\",\n * parentId: null,\n * children: \"Home\",\n * leftAddon: <HomeIcon />,\n * to: \"/\",\n * },\n * \"/route-1\": {\n * itemId: \"/route-1\",\n * parentId: null,\n * children: \"Route 1\",\n * leftAddon: <TvIcon />,\n * to: \"/route-1\",\n * },\n * \"/route-2\": {\n * itemId: \"/route-2\",\n * parentId: null,\n * children: \"Route 2\",\n * leftAddon: <AppsIcon />,\n * to: \"/route-2\",\n * },\n * \"/route-3\": {\n * itemId: \"/route-3\",\n * parentId: null,\n * children: \"Route 3\",\n * leftAddon: <BookIcon />,\n * to: \"/route-3\",\n * },\n * } satisfies TreeData;\n * ```\n */\n navItems: TreeData<T>;\n\n /**\n * @defaultValue `getParentIds(pathname, navItems)`\n */\n defaultExpandedIds?: TreeDefaultIds;\n}\n\n/**\n * @since 6.0.0 Renamed from `LayoutNavigationState`, removed the\n * `linkComponent`, and remap `navItems` to `data` so it can be passed to the\n * `Tree` component.\n */\nexport interface LayoutTreeImplementation<\n T extends TreeItemNode = DefaultTreeItemNode,\n> extends Pick<TreeProps<T>, \"data\">,\n TreeImplementation {}\n\n/**\n * Before considering to use a `Tree` for site navigation, it is important to\n * understand:\n * - There is a lot of functionality required to implement the tree widget so\n * your bundle size will increase\n * - A pattern more suited for typical site navigation with expandable groups of\n * links is the disclosure pattern.\n * - @see https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/\n *\n * @see https://www.w3.org/WAI/ARIA/apg/patterns/treeview/examples/treeview-navigation/\n *\n * This is a pretty reasonable default implementation for having a navigation\n * tree within the Layout component. The way it'll work is that the current\n * route will be the only selected item within the tree. When the pathname\n * changes, the selectedIds will be updated to only be the current pathname once\n * again.\n *\n * This means that you can use whatever routing library or history provider that\n * ensures that your layout re-renders on a path change.\n *\n * @example\n * ```tsx\n * import { useLayoutTree } from \"@react-md/core/layout/useLayoutTree\"\n * import { Tree } from \"@react-md/core/tree/Tree\";\n * import { type TreeData } from \"@react-md/core/tree/types\";\n * import { type ReactElement } from \"react\";\n *\n * // choose your routing library...\n * import { Link, useLocation } from \"react-router\";\n *\n * const navItems = {\n * \"/\": {\n * itemId: \"/\",\n * parentId: null,\n * children: \"Home\",\n * leftAddon: <HomeIcon />,\n * to: \"/\",\n * },\n * \"/route-1\": {\n * itemId: \"/route-1\",\n * parentId: null,\n * children: \"Route 1\",\n * leftAddon: <TvIcon />,\n * to: \"/route-1\",\n * },\n * \"/route-2\": {\n * itemId: \"/route-2\",\n * parentId: null,\n * children: \"Route 2\",\n * leftAddon: <AppsIcon />,\n * to: \"/route-2\",\n * },\n * \"/route-3\": {\n * itemId: \"/route-3\",\n * parentId: null,\n * children: \"Route 3\",\n * leftAddon: <BookIcon />,\n * to: \"/route-3\",\n * },\n * } satisfies TreeData;\n *\n * function Example(): ReactElement {\n * const { pathname } = useLocation();\n * const tree = useLayoutTree({\n * navItems,\n * pathname,\n * });\n *\n * return (\n * <Tree\n * {...tree}\n * aria-label=\"Navigation\"\n * linkComponent={Link}\n * />\n * );\n * }\n * ```\n *\n * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}\n * @see {@link https://next.react-md.dev/components/tree | Tree Demos}\n * @see {@link https://next.react-md.dev/hooks/use-layout-tree | useLayoutTree Demos}\n * @since 6.0.0 Renamed from `useLayoutNavigation`.\n */\nexport function useLayoutTree(\n options: LayoutTreeOptions\n): LayoutTreeImplementation {\n const { defaultExpandedIds, navItems, pathname } = options;\n\n const selectedIds = useMemo(() => new Set([pathname]), [pathname]);\n const { expandedIds, expandMultipleTreeItems, toggleTreeItemExpansion } =\n useTreeExpansion(\n defaultExpandedIds ?? (() => getParentIds(pathname, navItems))\n );\n\n useEffect(() => {\n expandMultipleTreeItems((prevExpandedIds) => {\n const nextExpandedIds = new Set([\n ...prevExpandedIds,\n ...getParentIds(pathname, navItems),\n ]);\n\n return nextExpandedIds;\n });\n }, [expandMultipleTreeItems, pathname, navItems]);\n\n return {\n data: navItems,\n multiSelect: false,\n selectedIds,\n expandedIds,\n expandMultipleTreeItems,\n toggleTreeItemExpansion,\n toggleTreeItemSelection: noop,\n selectMultipleTreeItems: noop,\n };\n}\n"],"names":["useEffect","useMemo","useTreeExpansion","getTreeItemsFrom","noop","getParentIds","itemId","navItems","map","useLayoutTree","options","defaultExpandedIds","pathname","selectedIds","Set","expandedIds","expandMultipleTreeItems","toggleTreeItemExpansion","prevExpandedIds","nextExpandedIds","data","multiSelect","toggleTreeItemSelection","selectMultipleTreeItems"],"mappings":"AAAA;AAEA,SAASA,SAAS,EAAEC,OAAO,QAAQ,QAAQ;AAU3C,SAASC,gBAAgB,QAAQ,8BAA8B;AAC/D,SAASC,gBAAgB,QAAQ,mBAAmB;AAEpD,MAAMC,OAAO;AACX,aAAa;AACf;AAEA;;CAEC,GACD,MAAMC,eAAe,CACnBC,QACAC,WAEAJ,iBAAiBI,UAAUD,QAAQE,GAAG,CAAC,CAAC,EAAEF,MAAM,EAAE,GAAKA;AAkEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFC,GACD,OAAO,SAASG,cACdC,OAA0B;IAE1B,MAAM,EAAEC,kBAAkB,EAAEJ,QAAQ,EAAEK,QAAQ,EAAE,GAAGF;IAEnD,MAAMG,cAAcZ,QAAQ,IAAM,IAAIa,IAAI;YAACF;SAAS,GAAG;QAACA;KAAS;IACjE,MAAM,EAAEG,WAAW,EAAEC,uBAAuB,EAAEC,uBAAuB,EAAE,GACrEf,iBACES,sBAAuB,CAAA,IAAMN,aAAaO,UAAUL,SAAQ;IAGhEP,UAAU;QACRgB,wBAAwB,CAACE;YACvB,MAAMC,kBAAkB,IAAIL,IAAI;mBAC3BI;mBACAb,aAAaO,UAAUL;aAC3B;YAED,OAAOY;QACT;IACF,GAAG;QAACH;QAAyBJ;QAAUL;KAAS;IAEhD,OAAO;QACLa,MAAMb;QACNc,aAAa;QACbR;QACAE;QACAC;QACAC;QACAK,yBAAyBlB;QACzBmB,yBAAyBnB;IAC3B;AACF"}
1
+ {"version":3,"sources":["../../src/layout/useLayoutTree.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useMemo } from \"react\";\n\nimport { type TreeProps } from \"../tree/Tree.js\";\nimport {\n type DefaultTreeItemNode,\n type TreeData,\n type TreeDefaultIds,\n type TreeItemNode,\n} from \"../tree/types.js\";\nimport { type TreeImplementation } from \"../tree/useTree.js\";\nimport { useTreeExpansion } from \"../tree/useTreeExpansion.js\";\nimport { getTreeItemsFrom } from \"../tree/utils.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @internal\n */\nconst getParentIds = (\n itemId: string,\n navItems: TreeData<TreeItemNode>\n): readonly string[] =>\n getTreeItemsFrom(navItems, itemId).map(({ itemId }) => itemId);\n\n/**\n * @since 6.0.0 Removed the `linkComponent` option.\n */\nexport interface LayoutTreeOptions<\n T extends TreeItemNode = DefaultTreeItemNode,\n> {\n /**\n * The current pathname which is used as the tree `itemId`.\n */\n pathname: string;\n\n /**\n * @example\n * ```tsx\n * const navItems = {\n * \"/\": {\n * itemId: \"/\",\n * parentId: null,\n * children: \"Home\",\n * leftAddon: <HomeIcon />,\n * to: \"/\",\n * },\n * \"/route-1\": {\n * itemId: \"/route-1\",\n * parentId: null,\n * children: \"Route 1\",\n * leftAddon: <TvIcon />,\n * to: \"/route-1\",\n * },\n * \"/route-2\": {\n * itemId: \"/route-2\",\n * parentId: null,\n * children: \"Route 2\",\n * leftAddon: <AppsIcon />,\n * to: \"/route-2\",\n * },\n * \"/route-3\": {\n * itemId: \"/route-3\",\n * parentId: null,\n * children: \"Route 3\",\n * leftAddon: <BookIcon />,\n * to: \"/route-3\",\n * },\n * } satisfies TreeData;\n * ```\n */\n navItems: TreeData<T>;\n\n /**\n * @defaultValue `getParentIds(pathname, navItems)`\n */\n defaultExpandedIds?: TreeDefaultIds;\n}\n\n/**\n * @since 6.0.0 Renamed from `LayoutNavigationState`, removed the\n * `linkComponent`, and remap `navItems` to `data` so it can be passed to the\n * `Tree` component.\n */\nexport interface LayoutTreeImplementation<\n T extends TreeItemNode = DefaultTreeItemNode,\n> extends Pick<TreeProps<T>, \"data\">,\n TreeImplementation {}\n\n/**\n * Before considering to use a `Tree` for site navigation, it is important to\n * understand:\n * - There is a lot of functionality required to implement the tree widget so\n * your bundle size will increase\n * - A pattern more suited for typical site navigation with expandable groups of\n * links is the disclosure pattern.\n * - @see https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/\n *\n * @see https://www.w3.org/WAI/ARIA/apg/patterns/treeview/examples/treeview-navigation/\n *\n * This is a pretty reasonable default implementation for having a navigation\n * tree within the Layout component. The way it'll work is that the current\n * route will be the only selected item within the tree. When the pathname\n * changes, the selectedIds will be updated to only be the current pathname once\n * again.\n *\n * This means that you can use whatever routing library or history provider that\n * ensures that your layout re-renders on a path change.\n *\n * @example\n * ```tsx\n * import { useLayoutTree } from \"@react-md/core/layout/useLayoutTree\"\n * import { Tree } from \"@react-md/core/tree/Tree\";\n * import { type TreeData } from \"@react-md/core/tree/types\";\n * import { type ReactElement } from \"react\";\n *\n * // choose your routing library...\n * import { Link, useLocation } from \"react-router\";\n *\n * const navItems = {\n * \"/\": {\n * itemId: \"/\",\n * parentId: null,\n * children: \"Home\",\n * leftAddon: <HomeIcon />,\n * to: \"/\",\n * },\n * \"/route-1\": {\n * itemId: \"/route-1\",\n * parentId: null,\n * children: \"Route 1\",\n * leftAddon: <TvIcon />,\n * to: \"/route-1\",\n * },\n * \"/route-2\": {\n * itemId: \"/route-2\",\n * parentId: null,\n * children: \"Route 2\",\n * leftAddon: <AppsIcon />,\n * to: \"/route-2\",\n * },\n * \"/route-3\": {\n * itemId: \"/route-3\",\n * parentId: null,\n * children: \"Route 3\",\n * leftAddon: <BookIcon />,\n * to: \"/route-3\",\n * },\n * } satisfies TreeData;\n *\n * function Example(): ReactElement {\n * const { pathname } = useLocation();\n * const tree = useLayoutTree({\n * navItems,\n * pathname,\n * });\n *\n * return (\n * <Tree\n * {...tree}\n * aria-label=\"Navigation\"\n * linkComponent={Link}\n * />\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}\n * @see {@link https://react-md.dev/components/tree | Tree Demos}\n * @see {@link https://react-md.dev/hooks/use-layout-tree | useLayoutTree Demos}\n * @since 6.0.0 Renamed from `useLayoutNavigation`.\n */\nexport function useLayoutTree(\n options: LayoutTreeOptions\n): LayoutTreeImplementation {\n const { defaultExpandedIds, navItems, pathname } = options;\n\n const selectedIds = useMemo(() => new Set([pathname]), [pathname]);\n const { expandedIds, expandMultipleTreeItems, toggleTreeItemExpansion } =\n useTreeExpansion(\n defaultExpandedIds ?? (() => getParentIds(pathname, navItems))\n );\n\n useEffect(() => {\n expandMultipleTreeItems((prevExpandedIds) => {\n const nextExpandedIds = new Set([\n ...prevExpandedIds,\n ...getParentIds(pathname, navItems),\n ]);\n\n return nextExpandedIds;\n });\n }, [expandMultipleTreeItems, pathname, navItems]);\n\n return {\n data: navItems,\n multiSelect: false,\n selectedIds,\n expandedIds,\n expandMultipleTreeItems,\n toggleTreeItemExpansion,\n toggleTreeItemSelection: noop,\n selectMultipleTreeItems: noop,\n };\n}\n"],"names":["useEffect","useMemo","useTreeExpansion","getTreeItemsFrom","noop","getParentIds","itemId","navItems","map","useLayoutTree","options","defaultExpandedIds","pathname","selectedIds","Set","expandedIds","expandMultipleTreeItems","toggleTreeItemExpansion","prevExpandedIds","nextExpandedIds","data","multiSelect","toggleTreeItemSelection","selectMultipleTreeItems"],"mappings":"AAAA;AAEA,SAASA,SAAS,EAAEC,OAAO,QAAQ,QAAQ;AAU3C,SAASC,gBAAgB,QAAQ,8BAA8B;AAC/D,SAASC,gBAAgB,QAAQ,mBAAmB;AAEpD,MAAMC,OAAO;AACX,aAAa;AACf;AAEA;;CAEC,GACD,MAAMC,eAAe,CACnBC,QACAC,WAEAJ,iBAAiBI,UAAUD,QAAQE,GAAG,CAAC,CAAC,EAAEF,MAAM,EAAE,GAAKA;AAkEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFC,GACD,OAAO,SAASG,cACdC,OAA0B;IAE1B,MAAM,EAAEC,kBAAkB,EAAEJ,QAAQ,EAAEK,QAAQ,EAAE,GAAGF;IAEnD,MAAMG,cAAcZ,QAAQ,IAAM,IAAIa,IAAI;YAACF;SAAS,GAAG;QAACA;KAAS;IACjE,MAAM,EAAEG,WAAW,EAAEC,uBAAuB,EAAEC,uBAAuB,EAAE,GACrEf,iBACES,sBAAuB,CAAA,IAAMN,aAAaO,UAAUL,SAAQ;IAGhEP,UAAU;QACRgB,wBAAwB,CAACE;YACvB,MAAMC,kBAAkB,IAAIL,IAAI;mBAC3BI;mBACAb,aAAaO,UAAUL;aAC3B;YAED,OAAOY;QACT;IACF,GAAG;QAACH;QAAyBJ;QAAUL;KAAS;IAEhD,OAAO;QACLa,MAAMb;QACNc,aAAa;QACbR;QACAE;QACAC;QACAC;QACAK,yBAAyBlB;QACzBmB,yBAAyBnB;IAC3B;AACF"}
@@ -86,7 +86,7 @@ export interface LayoutWindowSplitterImplementation extends WindowSplitterImplem
86
86
  * }
87
87
  * ```
88
88
  *
89
- * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}
89
+ * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
90
90
  * @see {@link useResizableLayout} For a pre-built solution.
91
91
  * @since 6.0.0
92
92
  */
@@ -41,7 +41,7 @@ import { useWindowSplitter } from "../window-splitter/useWindowSplitter.js";
41
41
  * }
42
42
  * ```
43
43
  *
44
- * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}
44
+ * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
45
45
  * @see {@link useResizableLayout} For a pre-built solution.
46
46
  * @since 6.0.0
47
47
  */ export function useLayoutWindowSplitter(options = {}) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/layout/useLayoutWindowSplitter.ts"],"sourcesContent":["\"use client\";\n\nimport { type UncontrolledDraggableOptions } from \"../draggable/useDraggable.js\";\nimport { type UseStateInitializer } from \"../types.js\";\nimport { useWindowSize } from \"../useWindowSize.js\";\nimport {\n type WindowSplitterImplementation,\n type WindowSplitterOptions,\n type WindowSplitterWidgetProps,\n useWindowSplitter,\n} from \"../window-splitter/useWindowSplitter.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface LayoutWindowSplitterOptions\n extends Omit<WindowSplitterOptions, \"min\" | \"max\"> {\n /**\n * @see {@link WindowSplitterOptions.min}\n * @defaultValue `96`\n */\n min?: number;\n\n /**\n * This is the minimum max value that can be allowed while resizing the\n * browser. I don't know the best way to describe it, but the `max` value is\n * determined by:\n *\n * ```ts\n * const { width } = useWindowSize({ disableHeight: true });\n * const max = Math.max(maxMinimum, width * windowPercentage);\n * ```\n *\n * @defaultValue `600`\n */\n maxMinimum?: number;\n\n /**\n * This will be multiplied by the current window's width to determine the\n * dynamic max value for the window splitter.\n *\n * @see {@link maxMinimum}\n * @defaultValue `0.45`\n */\n windowPercentage?: number;\n\n /** @defaultValue `256` */\n defaultValue?: UseStateInitializer<number>;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ProvidedLayoutWindowSplitterProps\n extends WindowSplitterWidgetProps<HTMLButtonElement> {\n /** @defaultValue {@link WindowSplitterImplementation.value} */\n navWidth: number;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface LayoutWindowSplitterImplementation\n extends WindowSplitterImplementation {\n splitterProps: ProvidedLayoutWindowSplitterProps;\n}\n\n/**\n * A custom window splitter implementation to be used with the\n * `LayoutWindowSplitter` that will dynamically configure the max width to be a\n * percentage of the current window's width.\n *\n * Note: This will automatically save the width in local storage as\n * `\"navWidth\"`. See the example below if you do not want to use local storage.\n *\n * @example Without this hook\n * ```tsx\n * import { type ProvidedLayoutWindowSplitterProps } from \"@react-md/core/layout/useLayoutWindowSplitter\";\n * import { useWindowSplitter } from \"@react-md/core/window-splitter/useWindowSplitter\";\n * import { useWindowSize } from \"@react-md/core/useWindowSize.js\";\n *\n * export function useMyLayoutWindowSplitter(): ProvidedLayoutWindowSplitterProps {\n * const { width } = useWindowSize({ disableHeight: true });\n * const { splitterProps, value } = useWindowSplitter({\n * min: 96,\n * max: Math.max(maxMinimum, width * 0.45),\n * maxMinimum: 600,\n * });\n *\n * return {\n * ...splitterProps,\n * navWidth: value,\n * };\n * }\n *\n * function MyLayout() {\n * const splitterProps = useMyLayoutWindowSplitter();\n *\n * return (\n * <LayoutWindowSplitter\n * {...splitterProps}\n * aria-controls=\"layout-nav-id\"\n * />\n * );\n * }\n * ```\n *\n * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}\n * @see {@link useResizableLayout} For a pre-built solution.\n * @since 6.0.0\n */\nexport function useLayoutWindowSplitter(\n options: LayoutWindowSplitterOptions = {}\n): LayoutWindowSplitterImplementation {\n const {\n min = 96,\n maxMinimum = 600,\n windowPercentage = 0.45,\n defaultValue = 256,\n ...remaining\n } = options;\n const { width } = useWindowSize({ disableHeight: true });\n const implementation = useWindowSplitter({\n min,\n max: Math.max(maxMinimum, width * windowPercentage),\n defaultValue,\n // type cast so it doesn't complain about defaultValue being provided with\n // value. That's mostly for public api usage\n ...(remaining as UncontrolledDraggableOptions),\n });\n\n return {\n ...implementation,\n splitterProps: {\n ...implementation.splitterProps,\n navWidth: implementation.value,\n },\n };\n}\n"],"names":["useWindowSize","useWindowSplitter","useLayoutWindowSplitter","options","min","maxMinimum","windowPercentage","defaultValue","remaining","width","disableHeight","implementation","max","Math","splitterProps","navWidth","value"],"mappings":"AAAA;AAIA,SAASA,aAAa,QAAQ,sBAAsB;AACpD,SAIEC,iBAAiB,QACZ,0CAA0C;AAyDjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CC,GACD,OAAO,SAASC,wBACdC,UAAuC,CAAC,CAAC;IAEzC,MAAM,EACJC,MAAM,EAAE,EACRC,aAAa,GAAG,EAChBC,mBAAmB,IAAI,EACvBC,eAAe,GAAG,EAClB,GAAGC,WACJ,GAAGL;IACJ,MAAM,EAAEM,KAAK,EAAE,GAAGT,cAAc;QAAEU,eAAe;IAAK;IACtD,MAAMC,iBAAiBV,kBAAkB;QACvCG;QACAQ,KAAKC,KAAKD,GAAG,CAACP,YAAYI,QAAQH;QAClCC;QACA,0EAA0E;QAC1E,4CAA4C;QAC5C,GAAIC,SAAS;IACf;IAEA,OAAO;QACL,GAAGG,cAAc;QACjBG,eAAe;YACb,GAAGH,eAAeG,aAAa;YAC/BC,UAAUJ,eAAeK,KAAK;QAChC;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/layout/useLayoutWindowSplitter.ts"],"sourcesContent":["\"use client\";\n\nimport { type UncontrolledDraggableOptions } from \"../draggable/useDraggable.js\";\nimport { type UseStateInitializer } from \"../types.js\";\nimport { useWindowSize } from \"../useWindowSize.js\";\nimport {\n type WindowSplitterImplementation,\n type WindowSplitterOptions,\n type WindowSplitterWidgetProps,\n useWindowSplitter,\n} from \"../window-splitter/useWindowSplitter.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface LayoutWindowSplitterOptions\n extends Omit<WindowSplitterOptions, \"min\" | \"max\"> {\n /**\n * @see {@link WindowSplitterOptions.min}\n * @defaultValue `96`\n */\n min?: number;\n\n /**\n * This is the minimum max value that can be allowed while resizing the\n * browser. I don't know the best way to describe it, but the `max` value is\n * determined by:\n *\n * ```ts\n * const { width } = useWindowSize({ disableHeight: true });\n * const max = Math.max(maxMinimum, width * windowPercentage);\n * ```\n *\n * @defaultValue `600`\n */\n maxMinimum?: number;\n\n /**\n * This will be multiplied by the current window's width to determine the\n * dynamic max value for the window splitter.\n *\n * @see {@link maxMinimum}\n * @defaultValue `0.45`\n */\n windowPercentage?: number;\n\n /** @defaultValue `256` */\n defaultValue?: UseStateInitializer<number>;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ProvidedLayoutWindowSplitterProps\n extends WindowSplitterWidgetProps<HTMLButtonElement> {\n /** @defaultValue {@link WindowSplitterImplementation.value} */\n navWidth: number;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface LayoutWindowSplitterImplementation\n extends WindowSplitterImplementation {\n splitterProps: ProvidedLayoutWindowSplitterProps;\n}\n\n/**\n * A custom window splitter implementation to be used with the\n * `LayoutWindowSplitter` that will dynamically configure the max width to be a\n * percentage of the current window's width.\n *\n * Note: This will automatically save the width in local storage as\n * `\"navWidth\"`. See the example below if you do not want to use local storage.\n *\n * @example Without this hook\n * ```tsx\n * import { type ProvidedLayoutWindowSplitterProps } from \"@react-md/core/layout/useLayoutWindowSplitter\";\n * import { useWindowSplitter } from \"@react-md/core/window-splitter/useWindowSplitter\";\n * import { useWindowSize } from \"@react-md/core/useWindowSize.js\";\n *\n * export function useMyLayoutWindowSplitter(): ProvidedLayoutWindowSplitterProps {\n * const { width } = useWindowSize({ disableHeight: true });\n * const { splitterProps, value } = useWindowSplitter({\n * min: 96,\n * max: Math.max(maxMinimum, width * 0.45),\n * maxMinimum: 600,\n * });\n *\n * return {\n * ...splitterProps,\n * navWidth: value,\n * };\n * }\n *\n * function MyLayout() {\n * const splitterProps = useMyLayoutWindowSplitter();\n *\n * return (\n * <LayoutWindowSplitter\n * {...splitterProps}\n * aria-controls=\"layout-nav-id\"\n * />\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}\n * @see {@link useResizableLayout} For a pre-built solution.\n * @since 6.0.0\n */\nexport function useLayoutWindowSplitter(\n options: LayoutWindowSplitterOptions = {}\n): LayoutWindowSplitterImplementation {\n const {\n min = 96,\n maxMinimum = 600,\n windowPercentage = 0.45,\n defaultValue = 256,\n ...remaining\n } = options;\n const { width } = useWindowSize({ disableHeight: true });\n const implementation = useWindowSplitter({\n min,\n max: Math.max(maxMinimum, width * windowPercentage),\n defaultValue,\n // type cast so it doesn't complain about defaultValue being provided with\n // value. That's mostly for public api usage\n ...(remaining as UncontrolledDraggableOptions),\n });\n\n return {\n ...implementation,\n splitterProps: {\n ...implementation.splitterProps,\n navWidth: implementation.value,\n },\n };\n}\n"],"names":["useWindowSize","useWindowSplitter","useLayoutWindowSplitter","options","min","maxMinimum","windowPercentage","defaultValue","remaining","width","disableHeight","implementation","max","Math","splitterProps","navWidth","value"],"mappings":"AAAA;AAIA,SAASA,aAAa,QAAQ,sBAAsB;AACpD,SAIEC,iBAAiB,QACZ,0CAA0C;AAyDjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CC,GACD,OAAO,SAASC,wBACdC,UAAuC,CAAC,CAAC;IAEzC,MAAM,EACJC,MAAM,EAAE,EACRC,aAAa,GAAG,EAChBC,mBAAmB,IAAI,EACvBC,eAAe,GAAG,EAClB,GAAGC,WACJ,GAAGL;IACJ,MAAM,EAAEM,KAAK,EAAE,GAAGT,cAAc;QAAEU,eAAe;IAAK;IACtD,MAAMC,iBAAiBV,kBAAkB;QACvCG;QACAQ,KAAKC,KAAKD,GAAG,CAACP,YAAYI,QAAQH;QAClCC;QACA,0EAA0E;QAC1E,4CAA4C;QAC5C,GAAIC,SAAS;IACf;IAEA,OAAO;QACL,GAAGG,cAAc;QACjBG,eAAe;YACb,GAAGH,eAAeG,aAAa;YAC/BC,UAAUJ,eAAeK,KAAK;QAChC;IACF;AACF"}
@@ -8,6 +8,7 @@ import { useUserInteractionMode } from "../interaction/UserInteractionModeProvid
8
8
  */ export function useMainTabIndex(tabIndex) {
9
9
  const keyboard = useUserInteractionMode() === "keyboard";
10
10
  if (keyboard && typeof tabIndex === "undefined") {
11
+ // eslint-disable-next-line no-param-reassign
11
12
  tabIndex = -1;
12
13
  }
13
14
  return tabIndex;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/layout/useMainTabIndex.ts"],"sourcesContent":["\"use client\";\n\nimport { useUserInteractionMode } from \"../interaction/UserInteractionModeProvider.js\";\n\n/**\n * This hook is used to return a tab index of `-1` whenever the user is using a\n * keyboard for the `SkipToMainContent` to work correctly.\n *\n * @since 6.0.0\n */\nexport function useMainTabIndex(tabIndex?: number): number | undefined {\n const keyboard = useUserInteractionMode() === \"keyboard\";\n if (keyboard && typeof tabIndex === \"undefined\") {\n tabIndex = -1;\n }\n\n return tabIndex;\n}\n"],"names":["useUserInteractionMode","useMainTabIndex","tabIndex","keyboard"],"mappings":"AAAA;AAEA,SAASA,sBAAsB,QAAQ,gDAAgD;AAEvF;;;;;CAKC,GACD,OAAO,SAASC,gBAAgBC,QAAiB;IAC/C,MAAMC,WAAWH,6BAA6B;IAC9C,IAAIG,YAAY,OAAOD,aAAa,aAAa;QAC/CA,WAAW,CAAC;IACd;IAEA,OAAOA;AACT"}
1
+ {"version":3,"sources":["../../src/layout/useMainTabIndex.ts"],"sourcesContent":["\"use client\";\n\nimport { useUserInteractionMode } from \"../interaction/UserInteractionModeProvider.js\";\n\n/**\n * This hook is used to return a tab index of `-1` whenever the user is using a\n * keyboard for the `SkipToMainContent` to work correctly.\n *\n * @since 6.0.0\n */\nexport function useMainTabIndex(tabIndex?: number): number | undefined {\n const keyboard = useUserInteractionMode() === \"keyboard\";\n if (keyboard && typeof tabIndex === \"undefined\") {\n // eslint-disable-next-line no-param-reassign\n tabIndex = -1;\n }\n\n return tabIndex;\n}\n"],"names":["useUserInteractionMode","useMainTabIndex","tabIndex","keyboard"],"mappings":"AAAA;AAEA,SAASA,sBAAsB,QAAQ,gDAAgD;AAEvF;;;;;CAKC,GACD,OAAO,SAASC,gBAAgBC,QAAiB;IAC/C,MAAMC,WAAWH,6BAA6B;IAC9C,IAAIG,YAAY,OAAOD,aAAa,aAAa;QAC/C,6CAA6C;QAC7CA,WAAW,CAAC;IACd;IAEA,OAAOA;AACT"}
@@ -132,7 +132,7 @@ export interface ResizableLayoutImplementation extends ExpandableLayoutImplement
132
132
  * )
133
133
  * ```
134
134
  *
135
- * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}
135
+ * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
136
136
  * @since 6.0.0
137
137
  */
138
138
  export declare function useResizableLayout(options: ResizableLayoutOptions): ResizableLayoutImplementation;
@@ -108,7 +108,7 @@ import { useLayoutWindowSplitter } from "./useLayoutWindowSplitter.js";
108
108
  * )
109
109
  * ```
110
110
  *
111
- * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}
111
+ * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
112
112
  * @since 6.0.0
113
113
  */ export function useResizableLayout(options) {
114
114
  const { navId: propNavId, pathname, appBarPosition = "fixed", fullHeightNav = false, temporaryUntil, defaultVisible, defaultExpanded, ...splitterOptions } = options;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/layout/useResizableLayout.ts"],"sourcesContent":["import { useEnsuredId } from \"../useEnsuredId.js\";\nimport { DISPLAY_NONE_CLASS } from \"../utils/isElementVisible.js\";\nimport { type LayoutWindowSplitterProps } from \"./LayoutWindowSplitter.js\";\nimport {\n type ExpandableLayoutImplementation,\n type ExpandableLayoutOptions,\n type ProvidedLayoutNavProps,\n} from \"./useExpandableLayout.js\";\nimport { useExpandableLayout } from \"./useExpandableLayout.js\";\nimport {\n type LayoutWindowSplitterOptions,\n useLayoutWindowSplitter,\n} from \"./useLayoutWindowSplitter.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface ResizableLayoutOptions\n extends ExpandableLayoutOptions,\n LayoutWindowSplitterOptions {\n /**\n * This id will be used as the `aria-controls` prop for the\n * `LayoutWindowSplitter` and should be applied to the `LayoutNav` as an `id`.\n *\n * @defaultValue `\"layout-nav\" + useId()`\n */\n navId?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ProvidedResizableLayoutNavProps\n extends ProvidedLayoutNavProps {\n id: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ResizableLayoutImplementation\n extends ExpandableLayoutImplementation {\n expandableNavProps: ProvidedResizableLayoutNavProps;\n windowSplitterProps: LayoutWindowSplitterProps;\n}\n\n/**\n * @example Main Usage\n * ```tsx\n * import { AppBarTitle } from \"@react-md/core/app-bar/AppBarTitle\";\n * import { Button } from \"@react-md/core/button/Button\";\n * import { LayoutAppBar } from \"@react-md/core/layout/LayoutAppBar\";\n * import { LayoutNav } from \"@react-md/core/layout/LayoutNav\";\n * import { LayoutWindowSplitter } from \"@react-md/core/layout/LayoutWindowSplitter\";\n * import { Main } from \"@react-md/core/layout/Main\";\n * import { useResizableLayout } from \"@react-md/core/layout/useResizableLayout\";\n * import { Sheet } from \"@react-md/core/sheet/Sheet\";\n * import { type ReactElement, type ReactNode } from \"react\";\n *\n * import { CustomNavigation } from \"./CustomNavigation\";\n *\n * export interface LayoutProps {\n * children: ReactNode;\n * }\n *\n * export function Layout(props: LayoutProps): ReactElement {\n * const { children } = props;\n *\n * // choose whichever one for your app\n * // nextjs app dir\n * const pathname = usePathname();\n * // nextjs pages\n * const { pathname } = useRouter();\n * // react router\n * const { pathname } = useHistory();\n *\n * const {\n * temporary,\n * appBarProps,\n * expandableNavProps,\n * mainProps,\n * navToggleProps,\n * temporaryNavProps,\n * windowSplitterProps,\n * } = useResizableLayout({ pathname });\n *\n * return (\n * <>\n * <LayoutAppBar {...appBarProps}>\n * <Button {...navToggleProps} />\n * <AppBarTitle>Hello, world!</AppBarTitle>\n * </LayoutAppBar>\n * <LayoutNav {...expandableNavProps}>\n * <CustomNavigation />\n * </LayoutNav>\n * <LayoutWindowSplitter {...windowSplitterProps} />\n * {temporary && (\n * <Sheet {...temporaryNavProps}>\n * <CustomNavigation />\n * </Sheet>\n * )}\n * <Main {...mainProps}>{children}</Main>\n * </>\n * );\n * }\n * ```\n *\n * If you have a large navigation panel, you can conditionally render the\n * `LayoutNav` with the `persistent` boolean returned by the hook which will\n * ensure that the DOM has rehydrated before unmounting to prevent SSR errors.\n *\n * @example Conditionally Rendering\n * ```diff\n * const {\n * temporary,\n * + persistent,\n * appBarProps,\n * expandableNavProps,\n * mainProps,\n * navToggleProps,\n * temporaryNavProps,\n * windowSplitterProps,\n * } = useResizableLayout({ pathname });\n *\n * return (\n * <>\n * <LayoutAppBar {...appBarProps}>\n * <Button {...navToggleProps} />\n * <AppBarTitle>Hello, world!</AppBarTitle>\n * </LayoutAppBar>\n * - <LayoutNav {...expandableNavProps}>\n * - <CustomNavigation />\n * - </LayoutNav>\n * - <LayoutWindowSplitter {...windowSplitterProps} />\n * + {persistent && (\n * + <>\n * + <LayoutNav {...expandableNavProps}>\n * + <CustomNavigation />\n * + </LayoutNav>\n * + <LayoutWindowSplitter {...windowSplitterProps} />\n * + </>\n * + )}\n * {temporary && (\n * <Sheet {...temporaryNavProps}>\n * <CustomNavigation />\n * </Sheet>\n * )}\n * <Main {...mainProps}>{children}</Main>\n * </>\n * )\n * ```\n *\n * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}\n * @since 6.0.0\n */\nexport function useResizableLayout(\n options: ResizableLayoutOptions\n): ResizableLayoutImplementation {\n const {\n navId: propNavId,\n pathname,\n appBarPosition = \"fixed\",\n fullHeightNav = false,\n temporaryUntil,\n defaultVisible,\n defaultExpanded,\n ...splitterOptions\n } = options;\n const navId = useEnsuredId(propNavId, \"layout-nav\");\n const { splitterProps, ...windowSplitter } =\n useLayoutWindowSplitter(splitterOptions);\n const expandableLayout = useExpandableLayout({\n pathname,\n appBarPosition,\n temporaryUntil,\n fullHeightNav,\n defaultExpanded,\n defaultVisible,\n });\n const { expandableNavProps, expanded } = expandableLayout;\n\n return {\n ...expandableLayout,\n ...windowSplitter,\n expandableNavProps: {\n id: navId,\n ...expandableNavProps,\n },\n windowSplitterProps: {\n ...splitterProps,\n \"aria-controls\": navId,\n appBarOffset: !fullHeightNav,\n className: (!expanded && DISPLAY_NONE_CLASS) || undefined,\n },\n };\n}\n"],"names":["useEnsuredId","DISPLAY_NONE_CLASS","useExpandableLayout","useLayoutWindowSplitter","useResizableLayout","options","navId","propNavId","pathname","appBarPosition","fullHeightNav","temporaryUntil","defaultVisible","defaultExpanded","splitterOptions","splitterProps","windowSplitter","expandableLayout","expandableNavProps","expanded","id","windowSplitterProps","appBarOffset","className","undefined"],"mappings":"AAAA,SAASA,YAAY,QAAQ,qBAAqB;AAClD,SAASC,kBAAkB,QAAQ,+BAA+B;AAOlE,SAASC,mBAAmB,QAAQ,2BAA2B;AAC/D,SAEEC,uBAAuB,QAClB,+BAA+B;AAkCtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GC,GACD,OAAO,SAASC,mBACdC,OAA+B;IAE/B,MAAM,EACJC,OAAOC,SAAS,EAChBC,QAAQ,EACRC,iBAAiB,OAAO,EACxBC,gBAAgB,KAAK,EACrBC,cAAc,EACdC,cAAc,EACdC,eAAe,EACf,GAAGC,iBACJ,GAAGT;IACJ,MAAMC,QAAQN,aAAaO,WAAW;IACtC,MAAM,EAAEQ,aAAa,EAAE,GAAGC,gBAAgB,GACxCb,wBAAwBW;IAC1B,MAAMG,mBAAmBf,oBAAoB;QAC3CM;QACAC;QACAE;QACAD;QACAG;QACAD;IACF;IACA,MAAM,EAAEM,kBAAkB,EAAEC,QAAQ,EAAE,GAAGF;IAEzC,OAAO;QACL,GAAGA,gBAAgB;QACnB,GAAGD,cAAc;QACjBE,oBAAoB;YAClBE,IAAId;YACJ,GAAGY,kBAAkB;QACvB;QACAG,qBAAqB;YACnB,GAAGN,aAAa;YAChB,iBAAiBT;YACjBgB,cAAc,CAACZ;YACfa,WAAW,AAAC,CAACJ,YAAYlB,sBAAuBuB;QAClD;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/layout/useResizableLayout.ts"],"sourcesContent":["import { useEnsuredId } from \"../useEnsuredId.js\";\nimport { DISPLAY_NONE_CLASS } from \"../utils/isElementVisible.js\";\nimport { type LayoutWindowSplitterProps } from \"./LayoutWindowSplitter.js\";\nimport {\n type ExpandableLayoutImplementation,\n type ExpandableLayoutOptions,\n type ProvidedLayoutNavProps,\n} from \"./useExpandableLayout.js\";\nimport { useExpandableLayout } from \"./useExpandableLayout.js\";\nimport {\n type LayoutWindowSplitterOptions,\n useLayoutWindowSplitter,\n} from \"./useLayoutWindowSplitter.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface ResizableLayoutOptions\n extends ExpandableLayoutOptions,\n LayoutWindowSplitterOptions {\n /**\n * This id will be used as the `aria-controls` prop for the\n * `LayoutWindowSplitter` and should be applied to the `LayoutNav` as an `id`.\n *\n * @defaultValue `\"layout-nav\" + useId()`\n */\n navId?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ProvidedResizableLayoutNavProps\n extends ProvidedLayoutNavProps {\n id: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ResizableLayoutImplementation\n extends ExpandableLayoutImplementation {\n expandableNavProps: ProvidedResizableLayoutNavProps;\n windowSplitterProps: LayoutWindowSplitterProps;\n}\n\n/**\n * @example Main Usage\n * ```tsx\n * import { AppBarTitle } from \"@react-md/core/app-bar/AppBarTitle\";\n * import { Button } from \"@react-md/core/button/Button\";\n * import { LayoutAppBar } from \"@react-md/core/layout/LayoutAppBar\";\n * import { LayoutNav } from \"@react-md/core/layout/LayoutNav\";\n * import { LayoutWindowSplitter } from \"@react-md/core/layout/LayoutWindowSplitter\";\n * import { Main } from \"@react-md/core/layout/Main\";\n * import { useResizableLayout } from \"@react-md/core/layout/useResizableLayout\";\n * import { Sheet } from \"@react-md/core/sheet/Sheet\";\n * import { type ReactElement, type ReactNode } from \"react\";\n *\n * import { CustomNavigation } from \"./CustomNavigation\";\n *\n * export interface LayoutProps {\n * children: ReactNode;\n * }\n *\n * export function Layout(props: LayoutProps): ReactElement {\n * const { children } = props;\n *\n * // choose whichever one for your app\n * // nextjs app dir\n * const pathname = usePathname();\n * // nextjs pages\n * const { pathname } = useRouter();\n * // react router\n * const { pathname } = useHistory();\n *\n * const {\n * temporary,\n * appBarProps,\n * expandableNavProps,\n * mainProps,\n * navToggleProps,\n * temporaryNavProps,\n * windowSplitterProps,\n * } = useResizableLayout({ pathname });\n *\n * return (\n * <>\n * <LayoutAppBar {...appBarProps}>\n * <Button {...navToggleProps} />\n * <AppBarTitle>Hello, world!</AppBarTitle>\n * </LayoutAppBar>\n * <LayoutNav {...expandableNavProps}>\n * <CustomNavigation />\n * </LayoutNav>\n * <LayoutWindowSplitter {...windowSplitterProps} />\n * {temporary && (\n * <Sheet {...temporaryNavProps}>\n * <CustomNavigation />\n * </Sheet>\n * )}\n * <Main {...mainProps}>{children}</Main>\n * </>\n * );\n * }\n * ```\n *\n * If you have a large navigation panel, you can conditionally render the\n * `LayoutNav` with the `persistent` boolean returned by the hook which will\n * ensure that the DOM has rehydrated before unmounting to prevent SSR errors.\n *\n * @example Conditionally Rendering\n * ```diff\n * const {\n * temporary,\n * + persistent,\n * appBarProps,\n * expandableNavProps,\n * mainProps,\n * navToggleProps,\n * temporaryNavProps,\n * windowSplitterProps,\n * } = useResizableLayout({ pathname });\n *\n * return (\n * <>\n * <LayoutAppBar {...appBarProps}>\n * <Button {...navToggleProps} />\n * <AppBarTitle>Hello, world!</AppBarTitle>\n * </LayoutAppBar>\n * - <LayoutNav {...expandableNavProps}>\n * - <CustomNavigation />\n * - </LayoutNav>\n * - <LayoutWindowSplitter {...windowSplitterProps} />\n * + {persistent && (\n * + <>\n * + <LayoutNav {...expandableNavProps}>\n * + <CustomNavigation />\n * + </LayoutNav>\n * + <LayoutWindowSplitter {...windowSplitterProps} />\n * + </>\n * + )}\n * {temporary && (\n * <Sheet {...temporaryNavProps}>\n * <CustomNavigation />\n * </Sheet>\n * )}\n * <Main {...mainProps}>{children}</Main>\n * </>\n * )\n * ```\n *\n * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}\n * @since 6.0.0\n */\nexport function useResizableLayout(\n options: ResizableLayoutOptions\n): ResizableLayoutImplementation {\n const {\n navId: propNavId,\n pathname,\n appBarPosition = \"fixed\",\n fullHeightNav = false,\n temporaryUntil,\n defaultVisible,\n defaultExpanded,\n ...splitterOptions\n } = options;\n const navId = useEnsuredId(propNavId, \"layout-nav\");\n const { splitterProps, ...windowSplitter } =\n useLayoutWindowSplitter(splitterOptions);\n const expandableLayout = useExpandableLayout({\n pathname,\n appBarPosition,\n temporaryUntil,\n fullHeightNav,\n defaultExpanded,\n defaultVisible,\n });\n const { expandableNavProps, expanded } = expandableLayout;\n\n return {\n ...expandableLayout,\n ...windowSplitter,\n expandableNavProps: {\n id: navId,\n ...expandableNavProps,\n },\n windowSplitterProps: {\n ...splitterProps,\n \"aria-controls\": navId,\n appBarOffset: !fullHeightNav,\n className: (!expanded && DISPLAY_NONE_CLASS) || undefined,\n },\n };\n}\n"],"names":["useEnsuredId","DISPLAY_NONE_CLASS","useExpandableLayout","useLayoutWindowSplitter","useResizableLayout","options","navId","propNavId","pathname","appBarPosition","fullHeightNav","temporaryUntil","defaultVisible","defaultExpanded","splitterOptions","splitterProps","windowSplitter","expandableLayout","expandableNavProps","expanded","id","windowSplitterProps","appBarOffset","className","undefined"],"mappings":"AAAA,SAASA,YAAY,QAAQ,qBAAqB;AAClD,SAASC,kBAAkB,QAAQ,+BAA+B;AAOlE,SAASC,mBAAmB,QAAQ,2BAA2B;AAC/D,SAEEC,uBAAuB,QAClB,+BAA+B;AAkCtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GC,GACD,OAAO,SAASC,mBACdC,OAA+B;IAE/B,MAAM,EACJC,OAAOC,SAAS,EAChBC,QAAQ,EACRC,iBAAiB,OAAO,EACxBC,gBAAgB,KAAK,EACrBC,cAAc,EACdC,cAAc,EACdC,eAAe,EACf,GAAGC,iBACJ,GAAGT;IACJ,MAAMC,QAAQN,aAAaO,WAAW;IACtC,MAAM,EAAEQ,aAAa,EAAE,GAAGC,gBAAgB,GACxCb,wBAAwBW;IAC1B,MAAMG,mBAAmBf,oBAAoB;QAC3CM;QACAC;QACAE;QACAD;QACAG;QACAD;IACF;IACA,MAAM,EAAEM,kBAAkB,EAAEC,QAAQ,EAAE,GAAGF;IAEzC,OAAO;QACL,GAAGA,gBAAgB;QACnB,GAAGD,cAAc;QACjBE,oBAAoB;YAClBE,IAAId;YACJ,GAAGY,kBAAkB;QACvB;QACAG,qBAAqB;YACnB,GAAGN,aAAa;YAChB,iBAAiBT;YACjBgB,cAAc,CAACZ;YACfa,WAAW,AAAC,CAACJ,YAAYlB,sBAAuBuB;QAClD;IACF;AACF"}
@@ -99,7 +99,7 @@ export interface TemporaryLayoutImplementation {
99
99
  * }
100
100
  * ```
101
101
  *
102
- * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}
102
+ * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
103
103
  * @since 6.0.0
104
104
  */
105
105
  export declare function useTemporaryLayout(options: TemporaryLayoutOptions): TemporaryLayoutImplementation;
@@ -55,7 +55,7 @@ import { useToggle } from "../useToggle.js";
55
55
  * }
56
56
  * ```
57
57
  *
58
- * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}
58
+ * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
59
59
  * @since 6.0.0
60
60
  */ export function useTemporaryLayout(options) {
61
61
  const { pathname, defaultVisible = false, appBarPosition = "fixed" } = options;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/layout/useTemporaryLayout.ts"],"sourcesContent":["\"use client\";\n\nimport { type PropsWithChildren, useEffect } from \"react\";\n\nimport { type AppBarProps } from \"../app-bar/AppBar.js\";\nimport { type ButtonProps } from \"../button/Button.js\";\nimport { getIcon } from \"../icon/config.js\";\nimport { type SheetProps } from \"../sheet/Sheet.js\";\nimport { type CssPosition, type UseStateInitializer } from \"../types.js\";\nimport { useToggle } from \"../useToggle.js\";\nimport { type MainProps } from \"./Main.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface TemporaryLayoutOptions {\n /**\n * This is used to automatically hide the temporary navigation whenever the\n * route changes. Set this to `null` if you want to handle closing yourself.\n */\n pathname: string | null;\n\n /** @defaultValue `\"fixed\"` */\n appBarPosition?: CssPosition;\n\n /** @defaultValue `false` */\n defaultVisible?: UseStateInitializer<boolean>;\n}\n\n/**\n * @since 6.0.0\n */\nexport type ProvidedLayoutNavToggleProps = PropsWithChildren<\n Pick<Required<ButtonProps>, \"aria-label\" | \"buttonType\" | \"onClick\">\n>;\n\n/**\n * @since 6.0.0\n */\nexport type ProvidedTemporaryLayoutNavProps = Pick<\n Required<SheetProps>,\n \"aria-label\" | \"visible\" | \"onRequestClose\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport type ProvidedTemporaryLayoutMainProps = Required<\n Pick<MainProps, \"appBarOffset\">\n>;\n\n/**\n * @since 6.0.0\n */\nexport type ProvidedTemporaryLayoutAppBarProps = Required<\n Pick<AppBarProps, \"position\">\n>;\n\n/**\n * @since 6.0.0\n */\nexport interface TemporaryLayoutImplementation {\n visible: boolean;\n showTemporaryNav: () => void;\n hideTemporaryNav: () => void;\n appBarProps: ProvidedTemporaryLayoutAppBarProps;\n mainProps: ProvidedTemporaryLayoutMainProps;\n navToggleProps: ProvidedLayoutNavToggleProps;\n temporaryNavProps: ProvidedTemporaryLayoutNavProps;\n}\n\n/**\n * The `useTemporaryLayout` hook is used to create a layout where the main\n * navigation is hidden in a `Sheet` until a user clicks a button to show the\n * navigation.\n *\n * @example\n * ```tsx\n * import { AppBar } from \"@react-md/core/app-bar/AppBar\";\n * import { AppBarTitle } from \"@react-md/core/app-bar/AppBarTitle\";\n * import { Button } from \"@react-md/core/button/Button\";\n * import { useTemporaryLayout } from \"@react-md/core/layout/useTemporaryLayout\";\n * import { Main } from \"@react-md/core/layout/Main\";\n * import { Sheet } from \"@react-md/core/sheet/Sheet\";\n * import { type ReactElement, type ReactNode } from \"react\";\n *\n * import { CustomNavigation } from \"./CustomNavigation.jsx\";\n *\n * export interface LayoutProps {\n * children: ReactNode;\n * }\n *\n * export function Layout(props: LayoutProps): ReactElement {\n * const { children } = props;\n *\n * // choose whichever one for your app\n * // nextjs app dir\n * const pathname = usePathname();\n * // nextjs pages\n * const { pathname } = useRouter();\n * // react router\n * const { pathname } = useHistory();\n *\n * const {\n * mainProps,\n * navToggleProps,\n * temporaryNavProps,\n * } = useTemporaryLayout({ pathname });\n *\n * return (\n * <>\n * <AppBar position=\"fixed\">\n * <Button {...navToggleProps} />\n * <AppBarTitle>Hello, world!</AppBarTitle>\n * </AppBar>\n * <Main {...mainProps}>{children}</Main>\n * <Sheet {...temporaryNavProps}>\n * <CustomNavigation />\n * </Sheet>\n * </>\n * );\n * }\n * ```\n *\n * @see {@link https://next.react-md.dev/getting-started/layout | Layout Demos}\n * @since 6.0.0\n */\nexport function useTemporaryLayout(\n options: TemporaryLayoutOptions\n): TemporaryLayoutImplementation {\n const {\n pathname,\n defaultVisible = false,\n appBarPosition = \"fixed\",\n } = options;\n\n const menuIcon = getIcon(\"menu\");\n const {\n toggled: visible,\n enable: showTemporaryNav,\n disable: hideTemporaryNav,\n } = useToggle(defaultVisible);\n\n // hide the temporary nav whenever the route changes\n useEffect(() => {\n if (pathname !== null) {\n hideTemporaryNav();\n }\n }, [hideTemporaryNav, pathname]);\n\n return {\n visible,\n showTemporaryNav,\n hideTemporaryNav,\n appBarProps: {\n position: appBarPosition,\n },\n mainProps: {\n appBarOffset: appBarPosition !== \"static\",\n },\n temporaryNavProps: {\n \"aria-label\": \"Navigation\",\n visible,\n onRequestClose: hideTemporaryNav,\n },\n navToggleProps: {\n \"aria-label\": \"Navigation\",\n buttonType: \"icon\",\n children: menuIcon,\n onClick() {\n showTemporaryNav();\n },\n },\n };\n}\n"],"names":["useEffect","getIcon","useToggle","useTemporaryLayout","options","pathname","defaultVisible","appBarPosition","menuIcon","toggled","visible","enable","showTemporaryNav","disable","hideTemporaryNav","appBarProps","position","mainProps","appBarOffset","temporaryNavProps","onRequestClose","navToggleProps","buttonType","children","onClick"],"mappings":"AAAA;AAEA,SAAiCA,SAAS,QAAQ,QAAQ;AAI1D,SAASC,OAAO,QAAQ,oBAAoB;AAG5C,SAASC,SAAS,QAAQ,kBAAkB;AA8D5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDC,GACD,OAAO,SAASC,mBACdC,OAA+B;IAE/B,MAAM,EACJC,QAAQ,EACRC,iBAAiB,KAAK,EACtBC,iBAAiB,OAAO,EACzB,GAAGH;IAEJ,MAAMI,WAAWP,QAAQ;IACzB,MAAM,EACJQ,SAASC,OAAO,EAChBC,QAAQC,gBAAgB,EACxBC,SAASC,gBAAgB,EAC1B,GAAGZ,UAAUI;IAEd,oDAAoD;IACpDN,UAAU;QACR,IAAIK,aAAa,MAAM;YACrBS;QACF;IACF,GAAG;QAACA;QAAkBT;KAAS;IAE/B,OAAO;QACLK;QACAE;QACAE;QACAC,aAAa;YACXC,UAAUT;QACZ;QACAU,WAAW;YACTC,cAAcX,mBAAmB;QACnC;QACAY,mBAAmB;YACjB,cAAc;YACdT;YACAU,gBAAgBN;QAClB;QACAO,gBAAgB;YACd,cAAc;YACdC,YAAY;YACZC,UAAUf;YACVgB;gBACEZ;YACF;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/layout/useTemporaryLayout.ts"],"sourcesContent":["\"use client\";\n\nimport { type PropsWithChildren, useEffect } from \"react\";\n\nimport { type AppBarProps } from \"../app-bar/AppBar.js\";\nimport { type ButtonProps } from \"../button/Button.js\";\nimport { getIcon } from \"../icon/config.js\";\nimport { type SheetProps } from \"../sheet/Sheet.js\";\nimport { type CssPosition, type UseStateInitializer } from \"../types.js\";\nimport { useToggle } from \"../useToggle.js\";\nimport { type MainProps } from \"./Main.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface TemporaryLayoutOptions {\n /**\n * This is used to automatically hide the temporary navigation whenever the\n * route changes. Set this to `null` if you want to handle closing yourself.\n */\n pathname: string | null;\n\n /** @defaultValue `\"fixed\"` */\n appBarPosition?: CssPosition;\n\n /** @defaultValue `false` */\n defaultVisible?: UseStateInitializer<boolean>;\n}\n\n/**\n * @since 6.0.0\n */\nexport type ProvidedLayoutNavToggleProps = PropsWithChildren<\n Pick<Required<ButtonProps>, \"aria-label\" | \"buttonType\" | \"onClick\">\n>;\n\n/**\n * @since 6.0.0\n */\nexport type ProvidedTemporaryLayoutNavProps = Pick<\n Required<SheetProps>,\n \"aria-label\" | \"visible\" | \"onRequestClose\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport type ProvidedTemporaryLayoutMainProps = Required<\n Pick<MainProps, \"appBarOffset\">\n>;\n\n/**\n * @since 6.0.0\n */\nexport type ProvidedTemporaryLayoutAppBarProps = Required<\n Pick<AppBarProps, \"position\">\n>;\n\n/**\n * @since 6.0.0\n */\nexport interface TemporaryLayoutImplementation {\n visible: boolean;\n showTemporaryNav: () => void;\n hideTemporaryNav: () => void;\n appBarProps: ProvidedTemporaryLayoutAppBarProps;\n mainProps: ProvidedTemporaryLayoutMainProps;\n navToggleProps: ProvidedLayoutNavToggleProps;\n temporaryNavProps: ProvidedTemporaryLayoutNavProps;\n}\n\n/**\n * The `useTemporaryLayout` hook is used to create a layout where the main\n * navigation is hidden in a `Sheet` until a user clicks a button to show the\n * navigation.\n *\n * @example\n * ```tsx\n * import { AppBar } from \"@react-md/core/app-bar/AppBar\";\n * import { AppBarTitle } from \"@react-md/core/app-bar/AppBarTitle\";\n * import { Button } from \"@react-md/core/button/Button\";\n * import { useTemporaryLayout } from \"@react-md/core/layout/useTemporaryLayout\";\n * import { Main } from \"@react-md/core/layout/Main\";\n * import { Sheet } from \"@react-md/core/sheet/Sheet\";\n * import { type ReactElement, type ReactNode } from \"react\";\n *\n * import { CustomNavigation } from \"./CustomNavigation.jsx\";\n *\n * export interface LayoutProps {\n * children: ReactNode;\n * }\n *\n * export function Layout(props: LayoutProps): ReactElement {\n * const { children } = props;\n *\n * // choose whichever one for your app\n * // nextjs app dir\n * const pathname = usePathname();\n * // nextjs pages\n * const { pathname } = useRouter();\n * // react router\n * const { pathname } = useHistory();\n *\n * const {\n * mainProps,\n * navToggleProps,\n * temporaryNavProps,\n * } = useTemporaryLayout({ pathname });\n *\n * return (\n * <>\n * <AppBar position=\"fixed\">\n * <Button {...navToggleProps} />\n * <AppBarTitle>Hello, world!</AppBarTitle>\n * </AppBar>\n * <Main {...mainProps}>{children}</Main>\n * <Sheet {...temporaryNavProps}>\n * <CustomNavigation />\n * </Sheet>\n * </>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}\n * @since 6.0.0\n */\nexport function useTemporaryLayout(\n options: TemporaryLayoutOptions\n): TemporaryLayoutImplementation {\n const {\n pathname,\n defaultVisible = false,\n appBarPosition = \"fixed\",\n } = options;\n\n const menuIcon = getIcon(\"menu\");\n const {\n toggled: visible,\n enable: showTemporaryNav,\n disable: hideTemporaryNav,\n } = useToggle(defaultVisible);\n\n // hide the temporary nav whenever the route changes\n useEffect(() => {\n if (pathname !== null) {\n hideTemporaryNav();\n }\n }, [hideTemporaryNav, pathname]);\n\n return {\n visible,\n showTemporaryNav,\n hideTemporaryNav,\n appBarProps: {\n position: appBarPosition,\n },\n mainProps: {\n appBarOffset: appBarPosition !== \"static\",\n },\n temporaryNavProps: {\n \"aria-label\": \"Navigation\",\n visible,\n onRequestClose: hideTemporaryNav,\n },\n navToggleProps: {\n \"aria-label\": \"Navigation\",\n buttonType: \"icon\",\n children: menuIcon,\n onClick() {\n showTemporaryNav();\n },\n },\n };\n}\n"],"names":["useEffect","getIcon","useToggle","useTemporaryLayout","options","pathname","defaultVisible","appBarPosition","menuIcon","toggled","visible","enable","showTemporaryNav","disable","hideTemporaryNav","appBarProps","position","mainProps","appBarOffset","temporaryNavProps","onRequestClose","navToggleProps","buttonType","children","onClick"],"mappings":"AAAA;AAEA,SAAiCA,SAAS,QAAQ,QAAQ;AAI1D,SAASC,OAAO,QAAQ,oBAAoB;AAG5C,SAASC,SAAS,QAAQ,kBAAkB;AA8D5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDC,GACD,OAAO,SAASC,mBACdC,OAA+B;IAE/B,MAAM,EACJC,QAAQ,EACRC,iBAAiB,KAAK,EACtBC,iBAAiB,OAAO,EACzB,GAAGH;IAEJ,MAAMI,WAAWP,QAAQ;IACzB,MAAM,EACJQ,SAASC,OAAO,EAChBC,QAAQC,gBAAgB,EACxBC,SAASC,gBAAgB,EAC1B,GAAGZ,UAAUI;IAEd,oDAAoD;IACpDN,UAAU;QACR,IAAIK,aAAa,MAAM;YACrBS;QACF;IACF,GAAG;QAACA;QAAkBT;KAAS;IAE/B,OAAO;QACLK;QACAE;QACAE;QACAC,aAAa;YACXC,UAAUT;QACZ;QACAU,WAAW;YACTC,cAAcX,mBAAmB;QACnC;QACAY,mBAAmB;YACjB,cAAc;YACdT;YACAU,gBAAgBN;QAClB;QACAO,gBAAgB;YACd,cAAc;YACdC,YAAY;YACZC,UAAUf;YACVgB;gBACEZ;YACF;QACF;IACF;AACF"}
@@ -55,7 +55,7 @@ export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement>, Link
55
55
  * ```
56
56
  *
57
57
  *
58
- * @see {@link https://next.react-md.dev/components/link | Link Demos}
58
+ * @see {@link https://react-md.dev/components/link | Link Demos}
59
59
  * @since 6.0.0 Removed the `preventMaliciousTarget` prop since browsers
60
60
  * default to `rel=noopener` after updating the {@link https://github.com/whatwg/html/issues/4078|spec}.
61
61
  * @since 6.0.0 Removed the `component` prop since all you need for link
package/dist/link/Link.js CHANGED
@@ -19,7 +19,7 @@ import { link } from "./styles.js";
19
19
  * ```
20
20
  *
21
21
  *
22
- * @see {@link https://next.react-md.dev/components/link | Link Demos}
22
+ * @see {@link https://react-md.dev/components/link | Link Demos}
23
23
  * @since 6.0.0 Removed the `preventMaliciousTarget` prop since browsers
24
24
  * default to `rel=noopener` after updating the {@link https://github.com/whatwg/html/issues/4078|spec}.
25
25
  * @since 6.0.0 Removed the `component` prop since all you need for link
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/link/Link.tsx"],"sourcesContent":["import {\n type AnchorHTMLAttributes,\n type ForwardRefExoticComponent,\n forwardRef,\n} from \"react\";\n\nimport { type LinkClassNameOptions, link } from \"./styles.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-link-color\"?: string;\n \"--rmd-link-visited-color\"?: string;\n \"--rmd-link-hover-color\"?: string;\n }\n}\n\n/**\n * @since 6.0.0\n */\nexport type CustomLinkComponent =\n | ForwardRefExoticComponent<{ href: string }>\n | ForwardRefExoticComponent<{ to: string }>\n | \"a\";\n\n/**\n * @since 6.0.0 Removed the `preventMaliciousTarget` prop since browsers\n * default to `rel=noopener` after updating the {@link https://github.com/whatwg/html/issues/4078|spec}.\n * @since 6.0.0 Removed the `component` prop since all you need for link\n * behavior is `className=\"rmd-link\"`.\n * @since 6.0.0 The `href` prop is required.\n * @since 6.0.0 Renamed `flexCentered` to `flex`.\n */\nexport interface LinkProps\n extends AnchorHTMLAttributes<HTMLAnchorElement>,\n LinkClassNameOptions {\n /**\n * All links **must** have a valid href.\n */\n href: string;\n\n /**\n * Set this to `true` if your link contains icons that should be centered and\n * spaced with additional text. This is not used by default so that links can\n * correctly line wrap while rendered within paragraphs of text.\n *\n * @defaultValue `false`\n */\n flex?: boolean;\n}\n\n/**\n * @example Simple Example\n * ```tsx\n * import { Link } from \"@react-md/core/link/Link\";\n * import { Typography } from \"@react-md/core/typography/Typography\";\n * import type { ReactElement } from \"react\";\n *\n * function Element(): ReactElement {\n * return (\n * <Typography>\n * Here is a paragraph of text with a {\" \"}\n * <Link href=\"/some-url\">link to some content</Link>.\n * </Typography>\n * );\n * }\n * ```\n *\n *\n * @see {@link https://next.react-md.dev/components/link | Link Demos}\n * @since 6.0.0 Removed the `preventMaliciousTarget` prop since browsers\n * default to `rel=noopener` after updating the {@link https://github.com/whatwg/html/issues/4078|spec}.\n * @since 6.0.0 Removed the `component` prop since all you need for link\n * behavior is `className=\"rmd-link\"`.\n * @since 6.0.0 The `href` prop is required.\n * @since 6.0.0 Renamed `flexCentered` to `flex`.\n */\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(\n function Link(props, ref) {\n const { className, flex, children, ...remaining } = props;\n\n return (\n <a {...remaining} ref={ref} className={link({ flex, className })}>\n {children}\n </a>\n );\n }\n);\n"],"names":["forwardRef","link","Link","props","ref","className","flex","children","remaining","a"],"mappings":";AAAA,SAGEA,UAAU,QACL,QAAQ;AAEf,SAAoCC,IAAI,QAAQ,cAAc;AA4C9D;;;;;;;;;;;;;;;;;;;;;;;;;CAyBC,GACD,OAAO,MAAMC,qBAAOF,WAClB,SAASE,KAAKC,KAAK,EAAEC,GAAG;IACtB,MAAM,EAAEC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGC,WAAW,GAAGL;IAEpD,qBACE,KAACM;QAAG,GAAGD,SAAS;QAAEJ,KAAKA;QAAKC,WAAWJ,KAAK;YAAEK;YAAMD;QAAU;kBAC3DE;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/link/Link.tsx"],"sourcesContent":["import {\n type AnchorHTMLAttributes,\n type ForwardRefExoticComponent,\n forwardRef,\n} from \"react\";\n\nimport { type LinkClassNameOptions, link } from \"./styles.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-link-color\"?: string;\n \"--rmd-link-visited-color\"?: string;\n \"--rmd-link-hover-color\"?: string;\n }\n}\n\n/**\n * @since 6.0.0\n */\nexport type CustomLinkComponent =\n | ForwardRefExoticComponent<{ href: string }>\n | ForwardRefExoticComponent<{ to: string }>\n | \"a\";\n\n/**\n * @since 6.0.0 Removed the `preventMaliciousTarget` prop since browsers\n * default to `rel=noopener` after updating the {@link https://github.com/whatwg/html/issues/4078|spec}.\n * @since 6.0.0 Removed the `component` prop since all you need for link\n * behavior is `className=\"rmd-link\"`.\n * @since 6.0.0 The `href` prop is required.\n * @since 6.0.0 Renamed `flexCentered` to `flex`.\n */\nexport interface LinkProps\n extends AnchorHTMLAttributes<HTMLAnchorElement>,\n LinkClassNameOptions {\n /**\n * All links **must** have a valid href.\n */\n href: string;\n\n /**\n * Set this to `true` if your link contains icons that should be centered and\n * spaced with additional text. This is not used by default so that links can\n * correctly line wrap while rendered within paragraphs of text.\n *\n * @defaultValue `false`\n */\n flex?: boolean;\n}\n\n/**\n * @example Simple Example\n * ```tsx\n * import { Link } from \"@react-md/core/link/Link\";\n * import { Typography } from \"@react-md/core/typography/Typography\";\n * import type { ReactElement } from \"react\";\n *\n * function Element(): ReactElement {\n * return (\n * <Typography>\n * Here is a paragraph of text with a {\" \"}\n * <Link href=\"/some-url\">link to some content</Link>.\n * </Typography>\n * );\n * }\n * ```\n *\n *\n * @see {@link https://react-md.dev/components/link | Link Demos}\n * @since 6.0.0 Removed the `preventMaliciousTarget` prop since browsers\n * default to `rel=noopener` after updating the {@link https://github.com/whatwg/html/issues/4078|spec}.\n * @since 6.0.0 Removed the `component` prop since all you need for link\n * behavior is `className=\"rmd-link\"`.\n * @since 6.0.0 The `href` prop is required.\n * @since 6.0.0 Renamed `flexCentered` to `flex`.\n */\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(\n function Link(props, ref) {\n const { className, flex, children, ...remaining } = props;\n\n return (\n <a {...remaining} ref={ref} className={link({ flex, className })}>\n {children}\n </a>\n );\n }\n);\n"],"names":["forwardRef","link","Link","props","ref","className","flex","children","remaining","a"],"mappings":";AAAA,SAGEA,UAAU,QACL,QAAQ;AAEf,SAAoCC,IAAI,QAAQ,cAAc;AA4C9D;;;;;;;;;;;;;;;;;;;;;;;;;CAyBC,GACD,OAAO,MAAMC,qBAAOF,WAClB,SAASE,KAAKC,KAAK,EAAEC,GAAG;IACtB,MAAM,EAAEC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGC,WAAW,GAAGL;IAEpD,qBACE,KAACM;QAAG,GAAGD,SAAS;QAAEJ,KAAKA;QAAKC,WAAWJ,KAAK;YAAEK;YAAMD;QAAU;kBAC3DE;;AAGP,GACA"}
@@ -48,7 +48,7 @@ export interface SkipToMainContentProps extends Omit<LinkProps, "href">, SkipToM
48
48
  * }
49
49
  * ```
50
50
  *
51
- * @see {@link https://next.react-md.dev/components/skip-to-main-content | SkipToMainContent Demos}
51
+ * @see {@link https://react-md.dev/components/skip-to-main-content | SkipToMainContent Demos}
52
52
  * @since 6.0.0 Changed the default `id` from `"skip-to-main-content"` to
53
53
  * `"skip-to-main"`.
54
54
  * @since 6.0.0 The `mainId` prop is optional
@@ -31,7 +31,7 @@ const getMainElement = (mainId)=>mainId ? document.getElementById(mainId) : docu
31
31
  * }
32
32
  * ```
33
33
  *
34
- * @see {@link https://next.react-md.dev/components/skip-to-main-content | SkipToMainContent Demos}
34
+ * @see {@link https://react-md.dev/components/skip-to-main-content | SkipToMainContent Demos}
35
35
  * @since 6.0.0 Changed the default `id` from `"skip-to-main-content"` to
36
36
  * `"skip-to-main"`.
37
37
  * @since 6.0.0 The `mainId` prop is optional
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/link/SkipToMainContent.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactNode, forwardRef, useEffect, useRef } from \"react\";\n\nimport { Link, type LinkProps } from \"./Link.js\";\nimport {\n type SkipToMainContentClassNameOptions,\n skipToMainContent,\n} from \"./styles.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\nconst getMainElement = (mainId: string): HTMLElement | null =>\n mainId\n ? document.getElementById(mainId)\n : document.querySelector<HTMLElement>('main,[role=\"main\"]');\n\n/**\n * @since 6.0.0 The `mainId` is optional\n */\nexport interface SkipToMainContentProps\n extends Omit<LinkProps, \"href\">,\n SkipToMainContentClassNameOptions {\n /**\n * @since 6.0.0 Changed default value from `\"skip-to-main-content\"`\n * @defaultValue `\"skip-to-main\"`\n */\n id?: string;\n\n /**\n * An optional id for the main element. When this is not provided, the main\n * element will be found by:\n *\n * ```ts\n * document.querySelector('main,[role=\"main\"]');\n * ```\n */\n mainId?: string;\n\n /**\n * @defaultValue `\"Skip to main content\"`\n */\n children?: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This component is used to allow keyboard users a quick way to skip directly\n * to the main content instead of needing to tab through all navigation items.\n *\n * This component should not be used if using the LayoutAppBar component since\n * it is already built-in.\n *\n * @example Simple Example\n * ```tsx\n * import { AppBar } from \"@react-md/core/app-bar/AppBar\";\n * import { SkipToMainContent } from \"@react-md/core/link/SkipToMainContent\";\n * import { type ReactElement } from \"react\";\n *\n * export default function SimpleSkipToMainContentExample(): ReactElement {\n * return (\n * <AppBar style={{ position: \"relative\" }}>\n * <SkipToMainContent />\n * </AppBar>\n * );\n * }\n * ```\n *\n * @see {@link https://next.react-md.dev/components/skip-to-main-content | SkipToMainContent Demos}\n * @since 6.0.0 Changed the default `id` from `\"skip-to-main-content\"` to\n * `\"skip-to-main\"`.\n * @since 6.0.0 The `mainId` prop is optional\n * @since 6.0.0 Throws an error after rendering if no main element can be found\n * with the provided `mainId` in development mode. The previous behavior would\n * only log an error after being clicked.\n */\nexport const SkipToMainContent = forwardRef<\n HTMLAnchorElement,\n SkipToMainContentProps\n>(function SkipToMainContent(props, ref) {\n const {\n id = \"skip-to-main\",\n className,\n children = \"Skip to main content\",\n mainId = \"\",\n onClick = noop,\n unstyled,\n ...remaining\n } = props;\n\n const mainNodeRef = useRef<HTMLElement | null>(null);\n // want to warn the developer about missing main element in development\n // immediately to help prevent errors, but in production this can be lazy\n // initialized only once a keyboard user focuses and clicks this element\n if (process.env.NODE_ENV !== \"production\") {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(() => {\n mainNodeRef.current = getMainElement(mainId);\n\n if (!mainNodeRef.current) {\n const foundMainId = document.querySelector('main,[role=\"main\"]')?.id;\n let message = `Unable to find a main element to focus`;\n if (mainId) {\n message += ` with an id of \"${mainId}\"`;\n\n if (foundMainId) {\n message += ` but a main element was found with an id of \"${foundMainId}\".`;\n }\n }\n if (!foundMainId) {\n message +=\n '. There should be at least one <main> element or an element with role=\"main\" on the page for accessibility.';\n }\n\n throw new Error(message);\n }\n }, [mainId]);\n }\n\n return (\n <Link\n {...remaining}\n id={id}\n ref={ref}\n href={`#${mainId}`}\n onClick={(event) => {\n onClick(event);\n if (event.isPropagationStopped()) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n // see comment above useEffect\n mainNodeRef.current ||= getMainElement(mainId);\n mainNodeRef.current?.focus();\n }}\n className={skipToMainContent({\n unstyled,\n className,\n })}\n >\n {children}\n </Link>\n );\n});\n"],"names":["forwardRef","useEffect","useRef","Link","skipToMainContent","noop","getMainElement","mainId","document","getElementById","querySelector","SkipToMainContent","props","ref","id","className","children","onClick","unstyled","remaining","mainNodeRef","process","env","NODE_ENV","current","foundMainId","message","Error","href","event","isPropagationStopped","preventDefault","stopPropagation","focus"],"mappings":"AAAA;;AAEA,SAAyBA,UAAU,EAAEC,SAAS,EAAEC,MAAM,QAAQ,QAAQ;AAEtE,SAASC,IAAI,QAAwB,YAAY;AACjD,SAEEC,iBAAiB,QACZ,cAAc;AAErB,MAAMC,OAAO;AACX,aAAa;AACf;AAEA,MAAMC,iBAAiB,CAACC,SACtBA,SACIC,SAASC,cAAc,CAACF,UACxBC,SAASE,aAAa,CAAc;AA8B1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BC,GACD,OAAO,MAAMC,kCAAoBX,WAG/B,SAASW,kBAAkBC,KAAK,EAAEC,GAAG;IACrC,MAAM,EACJC,KAAK,cAAc,EACnBC,SAAS,EACTC,WAAW,sBAAsB,EACjCT,SAAS,EAAE,EACXU,UAAUZ,IAAI,EACda,QAAQ,EACR,GAAGC,WACJ,GAAGP;IAEJ,MAAMQ,cAAclB,OAA2B;IAC/C,uEAAuE;IACvE,yEAAyE;IACzE,wEAAwE;IACxE,IAAImB,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,sDAAsD;QACtDtB,UAAU;YACRmB,YAAYI,OAAO,GAAGlB,eAAeC;YAErC,IAAI,CAACa,YAAYI,OAAO,EAAE;gBACxB,MAAMC,cAAcjB,SAASE,aAAa,CAAC,uBAAuBI;gBAClE,IAAIY,UAAU,CAAC,sCAAsC,CAAC;gBACtD,IAAInB,QAAQ;oBACVmB,WAAW,CAAC,gBAAgB,EAAEnB,OAAO,CAAC,CAAC;oBAEvC,IAAIkB,aAAa;wBACfC,WAAW,CAAC,6CAA6C,EAAED,YAAY,EAAE,CAAC;oBAC5E;gBACF;gBACA,IAAI,CAACA,aAAa;oBAChBC,WACE;gBACJ;gBAEA,MAAM,IAAIC,MAAMD;YAClB;QACF,GAAG;YAACnB;SAAO;IACb;IAEA,qBACE,KAACJ;QACE,GAAGgB,SAAS;QACbL,IAAIA;QACJD,KAAKA;QACLe,MAAM,CAAC,CAAC,EAAErB,QAAQ;QAClBU,SAAS,CAACY;YACRZ,QAAQY;YACR,IAAIA,MAAMC,oBAAoB,IAAI;gBAChC;YACF;YAEAD,MAAME,cAAc;YACpBF,MAAMG,eAAe;YAErB,8BAA8B;YAC9BZ,YAAYI,OAAO,KAAKlB,eAAeC;YACvCa,YAAYI,OAAO,EAAES;QACvB;QACAlB,WAAWX,kBAAkB;YAC3Bc;YACAH;QACF;kBAECC;;AAGP,GAAG"}
1
+ {"version":3,"sources":["../../src/link/SkipToMainContent.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactNode, forwardRef, useEffect, useRef } from \"react\";\n\nimport { Link, type LinkProps } from \"./Link.js\";\nimport {\n type SkipToMainContentClassNameOptions,\n skipToMainContent,\n} from \"./styles.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\nconst getMainElement = (mainId: string): HTMLElement | null =>\n mainId\n ? document.getElementById(mainId)\n : document.querySelector<HTMLElement>('main,[role=\"main\"]');\n\n/**\n * @since 6.0.0 The `mainId` is optional\n */\nexport interface SkipToMainContentProps\n extends Omit<LinkProps, \"href\">,\n SkipToMainContentClassNameOptions {\n /**\n * @since 6.0.0 Changed default value from `\"skip-to-main-content\"`\n * @defaultValue `\"skip-to-main\"`\n */\n id?: string;\n\n /**\n * An optional id for the main element. When this is not provided, the main\n * element will be found by:\n *\n * ```ts\n * document.querySelector('main,[role=\"main\"]');\n * ```\n */\n mainId?: string;\n\n /**\n * @defaultValue `\"Skip to main content\"`\n */\n children?: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This component is used to allow keyboard users a quick way to skip directly\n * to the main content instead of needing to tab through all navigation items.\n *\n * This component should not be used if using the LayoutAppBar component since\n * it is already built-in.\n *\n * @example Simple Example\n * ```tsx\n * import { AppBar } from \"@react-md/core/app-bar/AppBar\";\n * import { SkipToMainContent } from \"@react-md/core/link/SkipToMainContent\";\n * import { type ReactElement } from \"react\";\n *\n * export default function SimpleSkipToMainContentExample(): ReactElement {\n * return (\n * <AppBar style={{ position: \"relative\" }}>\n * <SkipToMainContent />\n * </AppBar>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/skip-to-main-content | SkipToMainContent Demos}\n * @since 6.0.0 Changed the default `id` from `\"skip-to-main-content\"` to\n * `\"skip-to-main\"`.\n * @since 6.0.0 The `mainId` prop is optional\n * @since 6.0.0 Throws an error after rendering if no main element can be found\n * with the provided `mainId` in development mode. The previous behavior would\n * only log an error after being clicked.\n */\nexport const SkipToMainContent = forwardRef<\n HTMLAnchorElement,\n SkipToMainContentProps\n>(function SkipToMainContent(props, ref) {\n const {\n id = \"skip-to-main\",\n className,\n children = \"Skip to main content\",\n mainId = \"\",\n onClick = noop,\n unstyled,\n ...remaining\n } = props;\n\n const mainNodeRef = useRef<HTMLElement | null>(null);\n // want to warn the developer about missing main element in development\n // immediately to help prevent errors, but in production this can be lazy\n // initialized only once a keyboard user focuses and clicks this element\n if (process.env.NODE_ENV !== \"production\") {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(() => {\n mainNodeRef.current = getMainElement(mainId);\n\n if (!mainNodeRef.current) {\n const foundMainId = document.querySelector('main,[role=\"main\"]')?.id;\n let message = `Unable to find a main element to focus`;\n if (mainId) {\n message += ` with an id of \"${mainId}\"`;\n\n if (foundMainId) {\n message += ` but a main element was found with an id of \"${foundMainId}\".`;\n }\n }\n if (!foundMainId) {\n message +=\n '. There should be at least one <main> element or an element with role=\"main\" on the page for accessibility.';\n }\n\n throw new Error(message);\n }\n }, [mainId]);\n }\n\n return (\n <Link\n {...remaining}\n id={id}\n ref={ref}\n href={`#${mainId}`}\n onClick={(event) => {\n onClick(event);\n if (event.isPropagationStopped()) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n // see comment above useEffect\n mainNodeRef.current ||= getMainElement(mainId);\n mainNodeRef.current?.focus();\n }}\n className={skipToMainContent({\n unstyled,\n className,\n })}\n >\n {children}\n </Link>\n );\n});\n"],"names":["forwardRef","useEffect","useRef","Link","skipToMainContent","noop","getMainElement","mainId","document","getElementById","querySelector","SkipToMainContent","props","ref","id","className","children","onClick","unstyled","remaining","mainNodeRef","process","env","NODE_ENV","current","foundMainId","message","Error","href","event","isPropagationStopped","preventDefault","stopPropagation","focus"],"mappings":"AAAA;;AAEA,SAAyBA,UAAU,EAAEC,SAAS,EAAEC,MAAM,QAAQ,QAAQ;AAEtE,SAASC,IAAI,QAAwB,YAAY;AACjD,SAEEC,iBAAiB,QACZ,cAAc;AAErB,MAAMC,OAAO;AACX,aAAa;AACf;AAEA,MAAMC,iBAAiB,CAACC,SACtBA,SACIC,SAASC,cAAc,CAACF,UACxBC,SAASE,aAAa,CAAc;AA8B1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BC,GACD,OAAO,MAAMC,kCAAoBX,WAG/B,SAASW,kBAAkBC,KAAK,EAAEC,GAAG;IACrC,MAAM,EACJC,KAAK,cAAc,EACnBC,SAAS,EACTC,WAAW,sBAAsB,EACjCT,SAAS,EAAE,EACXU,UAAUZ,IAAI,EACda,QAAQ,EACR,GAAGC,WACJ,GAAGP;IAEJ,MAAMQ,cAAclB,OAA2B;IAC/C,uEAAuE;IACvE,yEAAyE;IACzE,wEAAwE;IACxE,IAAImB,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,sDAAsD;QACtDtB,UAAU;YACRmB,YAAYI,OAAO,GAAGlB,eAAeC;YAErC,IAAI,CAACa,YAAYI,OAAO,EAAE;gBACxB,MAAMC,cAAcjB,SAASE,aAAa,CAAC,uBAAuBI;gBAClE,IAAIY,UAAU,CAAC,sCAAsC,CAAC;gBACtD,IAAInB,QAAQ;oBACVmB,WAAW,CAAC,gBAAgB,EAAEnB,OAAO,CAAC,CAAC;oBAEvC,IAAIkB,aAAa;wBACfC,WAAW,CAAC,6CAA6C,EAAED,YAAY,EAAE,CAAC;oBAC5E;gBACF;gBACA,IAAI,CAACA,aAAa;oBAChBC,WACE;gBACJ;gBAEA,MAAM,IAAIC,MAAMD;YAClB;QACF,GAAG;YAACnB;SAAO;IACb;IAEA,qBACE,KAACJ;QACE,GAAGgB,SAAS;QACbL,IAAIA;QACJD,KAAKA;QACLe,MAAM,CAAC,CAAC,EAAErB,QAAQ;QAClBU,SAAS,CAACY;YACRZ,QAAQY;YACR,IAAIA,MAAMC,oBAAoB,IAAI;gBAChC;YACF;YAEAD,MAAME,cAAc;YACpBF,MAAMG,eAAe;YAErB,8BAA8B;YAC9BZ,YAAYI,OAAO,KAAKlB,eAAeC;YACvCa,YAAYI,OAAO,EAAES;QACvB;QACAlB,WAAWX,kBAAkB;YAC3Bc;YACAH;QACF;kBAECC;;AAGP,GAAG"}
@@ -4,6 +4,7 @@
4
4
 
5
5
  @use "sass:map";
6
6
  @use "../utils";
7
+ @use "../spacing";
7
8
  @use "../theme/colors";
8
9
  @use "../theme/theme";
9
10
  @use "../icon/icon";
@@ -49,8 +50,8 @@ $skip-to-main-z-index: 10000 !default;
49
50
  $skip-to-main-styles: (
50
51
  color: theme.theme-get-var(on-primary-color),
51
52
  left: 50%,
52
- padding: 0.25rem 1rem,
53
- top: 0.25rem,
53
+ padding: spacing.get-var(xs) spacing.get-var(md),
54
+ top: spacing.get-var(xs),
54
55
  transform: translateX(-50%),
55
56
  z-index: $skip-to-main-z-index,
56
57
  ) !default;
@@ -73,6 +73,6 @@ export interface ListProps extends HTMLAttributes<ListElement> {
73
73
  * }
74
74
  * ```
75
75
  *
76
- * @see {@link https://next.react-md.dev/components/list | List Demos}
76
+ * @see {@link https://react-md.dev/components/list | List Demos}
77
77
  */
78
78
  export declare const List: import("react").ForwardRefExoticComponent<ListProps & import("react").RefAttributes<ListElement>>;