@react-md/core 6.5.2 → 7.0.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 (647) hide show
  1. package/dist/app-bar/AppBar.d.ts +3 -2
  2. package/dist/app-bar/AppBar.js +3 -4
  3. package/dist/app-bar/AppBar.js.map +1 -1
  4. package/dist/app-bar/AppBarTitle.d.ts +3 -1
  5. package/dist/app-bar/AppBarTitle.js +3 -4
  6. package/dist/app-bar/AppBarTitle.js.map +1 -1
  7. package/dist/autocomplete/AutocompleteChip.d.ts +2 -1
  8. package/dist/autocomplete/AutocompleteChip.js +3 -4
  9. package/dist/autocomplete/AutocompleteChip.js.map +1 -1
  10. package/dist/autocomplete/types.d.ts +1 -0
  11. package/dist/autocomplete/types.js.map +1 -1
  12. package/dist/autocomplete/utils.d.ts +4 -4
  13. package/dist/autocomplete/utils.js.map +1 -1
  14. package/dist/avatar/Avatar.d.ts +3 -2
  15. package/dist/avatar/Avatar.js +3 -4
  16. package/dist/avatar/Avatar.js.map +1 -1
  17. package/dist/badge/Badge.d.ts +3 -2
  18. package/dist/badge/Badge.js +3 -4
  19. package/dist/badge/Badge.js.map +1 -1
  20. package/dist/box/Box.d.ts +3 -2
  21. package/dist/box/Box.js +3 -4
  22. package/dist/box/Box.js.map +1 -1
  23. package/dist/button/AsyncButton.d.ts +3 -2
  24. package/dist/button/AsyncButton.js +3 -4
  25. package/dist/button/AsyncButton.js.map +1 -1
  26. package/dist/button/Button.d.ts +3 -2
  27. package/dist/button/Button.js +3 -4
  28. package/dist/button/Button.js.map +1 -1
  29. package/dist/button/ButtonUnstyled.d.ts +5 -3
  30. package/dist/button/ButtonUnstyled.js +3 -4
  31. package/dist/button/ButtonUnstyled.js.map +1 -1
  32. package/dist/button/FloatingActionButton.d.ts +3 -2
  33. package/dist/button/FloatingActionButton.js +3 -4
  34. package/dist/button/FloatingActionButton.js.map +1 -1
  35. package/dist/button/TooltippedButton.d.ts +3 -2
  36. package/dist/button/TooltippedButton.js +3 -4
  37. package/dist/button/TooltippedButton.js.map +1 -1
  38. package/dist/card/Card.d.ts +3 -2
  39. package/dist/card/Card.js +3 -4
  40. package/dist/card/Card.js.map +1 -1
  41. package/dist/card/CardContent.d.ts +3 -2
  42. package/dist/card/CardContent.js +3 -4
  43. package/dist/card/CardContent.js.map +1 -1
  44. package/dist/card/CardFooter.d.ts +3 -1
  45. package/dist/card/CardFooter.js +3 -4
  46. package/dist/card/CardFooter.js.map +1 -1
  47. package/dist/card/CardHeader.d.ts +3 -2
  48. package/dist/card/CardHeader.js +3 -4
  49. package/dist/card/CardHeader.js.map +1 -1
  50. package/dist/card/CardSubtitle.d.ts +3 -1
  51. package/dist/card/CardSubtitle.js +3 -4
  52. package/dist/card/CardSubtitle.js.map +1 -1
  53. package/dist/card/CardTitle.d.ts +3 -1
  54. package/dist/card/CardTitle.js +3 -4
  55. package/dist/card/CardTitle.js.map +1 -1
  56. package/dist/card/ClickableCard.d.ts +3 -2
  57. package/dist/card/ClickableCard.js +3 -4
  58. package/dist/card/ClickableCard.js.map +1 -1
  59. package/dist/chip/Chip.d.ts +4 -2
  60. package/dist/chip/Chip.js +4 -4
  61. package/dist/chip/Chip.js.map +1 -1
  62. package/dist/datetime/NativeDateField.d.ts +3 -1
  63. package/dist/datetime/NativeDateField.js +3 -4
  64. package/dist/datetime/NativeDateField.js.map +1 -1
  65. package/dist/datetime/NativeTimeField.d.ts +3 -1
  66. package/dist/datetime/NativeTimeField.js +3 -4
  67. package/dist/datetime/NativeTimeField.js.map +1 -1
  68. package/dist/dialog/Dialog.d.ts +3 -2
  69. package/dist/dialog/Dialog.js +4 -4
  70. package/dist/dialog/Dialog.js.map +1 -1
  71. package/dist/dialog/DialogContainer.d.ts +3 -2
  72. package/dist/dialog/DialogContainer.js +3 -4
  73. package/dist/dialog/DialogContainer.js.map +1 -1
  74. package/dist/dialog/DialogContent.d.ts +3 -2
  75. package/dist/dialog/DialogContent.js +3 -4
  76. package/dist/dialog/DialogContent.js.map +1 -1
  77. package/dist/dialog/DialogFooter.d.ts +3 -2
  78. package/dist/dialog/DialogFooter.js +3 -4
  79. package/dist/dialog/DialogFooter.js.map +1 -1
  80. package/dist/dialog/DialogHeader.d.ts +3 -1
  81. package/dist/dialog/DialogHeader.js +3 -4
  82. package/dist/dialog/DialogHeader.js.map +1 -1
  83. package/dist/dialog/DialogTitle.d.ts +3 -1
  84. package/dist/dialog/DialogTitle.js +3 -4
  85. package/dist/dialog/DialogTitle.js.map +1 -1
  86. package/dist/dialog/FixedDialog.d.ts +4 -3
  87. package/dist/dialog/FixedDialog.js +4 -4
  88. package/dist/dialog/FixedDialog.js.map +1 -1
  89. package/dist/divider/Divider.d.ts +3 -2
  90. package/dist/divider/Divider.js +3 -4
  91. package/dist/divider/Divider.js.map +1 -1
  92. package/dist/draggable/useDraggable.d.ts +3 -3
  93. package/dist/draggable/useDraggable.js.map +1 -1
  94. package/dist/draggable/utils.d.ts +1 -1
  95. package/dist/draggable/utils.js.map +1 -1
  96. package/dist/expansion-panel/ExpansionList.d.ts +3 -2
  97. package/dist/expansion-panel/ExpansionList.js +3 -4
  98. package/dist/expansion-panel/ExpansionList.js.map +1 -1
  99. package/dist/expansion-panel/ExpansionPanel.d.ts +3 -2
  100. package/dist/expansion-panel/ExpansionPanel.js +3 -4
  101. package/dist/expansion-panel/ExpansionPanel.js.map +1 -1
  102. package/dist/expansion-panel/ExpansionPanelHeader.d.ts +3 -2
  103. package/dist/expansion-panel/ExpansionPanelHeader.js +3 -4
  104. package/dist/expansion-panel/ExpansionPanelHeader.js.map +1 -1
  105. package/dist/files/FileInput.d.ts +3 -2
  106. package/dist/files/FileInput.js +3 -4
  107. package/dist/files/FileInput.js.map +1 -1
  108. package/dist/focus/useFocusContainer.d.ts +1 -1
  109. package/dist/focus/useFocusContainer.js.map +1 -1
  110. package/dist/form/Checkbox.d.ts +2 -1
  111. package/dist/form/Checkbox.js +4 -4
  112. package/dist/form/Checkbox.js.map +1 -1
  113. package/dist/form/Fieldset.d.ts +3 -2
  114. package/dist/form/Fieldset.js +3 -4
  115. package/dist/form/Fieldset.js.map +1 -1
  116. package/dist/form/Form.d.ts +3 -2
  117. package/dist/form/Form.js +3 -4
  118. package/dist/form/Form.js.map +1 -1
  119. package/dist/form/FormMessage.d.ts +8 -2
  120. package/dist/form/FormMessage.js +3 -4
  121. package/dist/form/FormMessage.js.map +1 -1
  122. package/dist/form/FormMessageContainer.d.ts +5 -4
  123. package/dist/form/FormMessageContainer.js +3 -4
  124. package/dist/form/FormMessageContainer.js.map +1 -1
  125. package/dist/form/FormMessageCounter.d.ts +3 -2
  126. package/dist/form/FormMessageCounter.js +3 -4
  127. package/dist/form/FormMessageCounter.js.map +1 -1
  128. package/dist/form/InputToggle.d.ts +3 -2
  129. package/dist/form/InputToggle.js +3 -4
  130. package/dist/form/InputToggle.js.map +1 -1
  131. package/dist/form/InputToggleIcon.d.ts +3 -2
  132. package/dist/form/InputToggleIcon.js +3 -4
  133. package/dist/form/InputToggleIcon.js.map +1 -1
  134. package/dist/form/Label.d.ts +2 -1
  135. package/dist/form/Label.js +3 -4
  136. package/dist/form/Label.js.map +1 -1
  137. package/dist/form/Legend.d.ts +3 -1
  138. package/dist/form/Legend.js +3 -4
  139. package/dist/form/Legend.js.map +1 -1
  140. package/dist/form/NativeSelect.d.ts +3 -2
  141. package/dist/form/NativeSelect.js +3 -4
  142. package/dist/form/NativeSelect.js.map +1 -1
  143. package/dist/form/OptGroup.d.ts +3 -2
  144. package/dist/form/OptGroup.js +3 -4
  145. package/dist/form/OptGroup.js.map +1 -1
  146. package/dist/form/Option.d.ts +3 -2
  147. package/dist/form/Option.js +4 -4
  148. package/dist/form/Option.js.map +1 -1
  149. package/dist/form/Password.d.ts +2 -2
  150. package/dist/form/Password.js +3 -4
  151. package/dist/form/Password.js.map +1 -1
  152. package/dist/form/Radio.d.ts +2 -1
  153. package/dist/form/Radio.js +4 -4
  154. package/dist/form/Radio.js.map +1 -1
  155. package/dist/form/ResizingTextAreaWrapper.d.ts +3 -2
  156. package/dist/form/ResizingTextAreaWrapper.js +3 -4
  157. package/dist/form/ResizingTextAreaWrapper.js.map +1 -1
  158. package/dist/form/SliderContainer.d.ts +3 -2
  159. package/dist/form/SliderContainer.js +3 -4
  160. package/dist/form/SliderContainer.js.map +1 -1
  161. package/dist/form/SliderThumb.d.ts +3 -2
  162. package/dist/form/SliderThumb.js +4 -4
  163. package/dist/form/SliderThumb.js.map +1 -1
  164. package/dist/form/SliderTrack.d.ts +3 -2
  165. package/dist/form/SliderTrack.js +3 -4
  166. package/dist/form/SliderTrack.js.map +1 -1
  167. package/dist/form/Switch.d.ts +3 -2
  168. package/dist/form/Switch.js +3 -4
  169. package/dist/form/Switch.js.map +1 -1
  170. package/dist/form/SwitchTrack.d.ts +3 -2
  171. package/dist/form/SwitchTrack.js +3 -4
  172. package/dist/form/SwitchTrack.js.map +1 -1
  173. package/dist/form/TextArea.d.ts +3 -2
  174. package/dist/form/TextArea.js +3 -4
  175. package/dist/form/TextArea.js.map +1 -1
  176. package/dist/form/TextField.d.ts +3 -2
  177. package/dist/form/TextField.js +3 -4
  178. package/dist/form/TextField.js.map +1 -1
  179. package/dist/form/TextFieldAddon.d.ts +2 -1
  180. package/dist/form/TextFieldAddon.js +3 -4
  181. package/dist/form/TextFieldAddon.js.map +1 -1
  182. package/dist/form/TextFieldContainer.d.ts +3 -2
  183. package/dist/form/TextFieldContainer.js +3 -4
  184. package/dist/form/TextFieldContainer.js.map +1 -1
  185. package/dist/form/sliderUtils.d.ts +1 -1
  186. package/dist/form/sliderUtils.js.map +1 -1
  187. package/dist/form/types.d.ts +11 -5
  188. package/dist/form/types.js.map +1 -1
  189. package/dist/form/useCombobox.d.ts +6 -6
  190. package/dist/form/useCombobox.js.map +1 -1
  191. package/dist/form/useFormReset.d.ts +1 -1
  192. package/dist/form/useFormReset.js.map +1 -1
  193. package/dist/form/useTextField.d.ts +4 -4
  194. package/dist/form/useTextField.js.map +1 -1
  195. package/dist/hoverMode/useHoverMode.js +1 -1
  196. package/dist/hoverMode/useHoverMode.js.map +1 -1
  197. package/dist/hoverMode/useHoverModeProvider.d.ts +5 -5
  198. package/dist/hoverMode/useHoverModeProvider.js +1 -1
  199. package/dist/hoverMode/useHoverModeProvider.js.map +1 -1
  200. package/dist/icon/FontIcon.d.ts +3 -2
  201. package/dist/icon/FontIcon.js +3 -4
  202. package/dist/icon/FontIcon.js.map +1 -1
  203. package/dist/icon/IconRotator.d.ts +3 -2
  204. package/dist/icon/IconRotator.js +4 -4
  205. package/dist/icon/IconRotator.js.map +1 -1
  206. package/dist/icon/MaterialIcon.d.ts +3 -2
  207. package/dist/icon/MaterialIcon.js +3 -4
  208. package/dist/icon/MaterialIcon.js.map +1 -1
  209. package/dist/icon/MaterialSymbol.d.ts +3 -2
  210. package/dist/icon/MaterialSymbol.js +3 -4
  211. package/dist/icon/MaterialSymbol.js.map +1 -1
  212. package/dist/icon/SVGIcon.d.ts +3 -2
  213. package/dist/icon/SVGIcon.js +3 -4
  214. package/dist/icon/SVGIcon.js.map +1 -1
  215. package/dist/layout/LayoutAppBar.d.ts +3 -1
  216. package/dist/layout/LayoutAppBar.js +3 -4
  217. package/dist/layout/LayoutAppBar.js.map +1 -1
  218. package/dist/layout/LayoutNav.d.ts +3 -2
  219. package/dist/layout/LayoutNav.js +3 -4
  220. package/dist/layout/LayoutNav.js.map +1 -1
  221. package/dist/layout/LayoutWindowSplitter.d.ts +4 -2
  222. package/dist/layout/LayoutWindowSplitter.js +4 -4
  223. package/dist/layout/LayoutWindowSplitter.js.map +1 -1
  224. package/dist/layout/Main.d.ts +4 -3
  225. package/dist/layout/Main.js +3 -4
  226. package/dist/layout/Main.js.map +1 -1
  227. package/dist/link/Link.d.ts +10 -2
  228. package/dist/link/Link.js +4 -4
  229. package/dist/link/Link.js.map +1 -1
  230. package/dist/link/SkipToMainContent.d.ts +3 -2
  231. package/dist/link/SkipToMainContent.js +4 -4
  232. package/dist/link/SkipToMainContent.js.map +1 -1
  233. package/dist/list/List.d.ts +3 -2
  234. package/dist/list/List.js +3 -4
  235. package/dist/list/List.js.map +1 -1
  236. package/dist/list/ListItem.d.ts +3 -2
  237. package/dist/list/ListItem.js +3 -4
  238. package/dist/list/ListItem.js.map +1 -1
  239. package/dist/list/ListItemLink.d.ts +3 -2
  240. package/dist/list/ListItemLink.js +3 -4
  241. package/dist/list/ListItemLink.js.map +1 -1
  242. package/dist/list/ListItemText.d.ts +3 -2
  243. package/dist/list/ListItemText.js +3 -4
  244. package/dist/list/ListItemText.js.map +1 -1
  245. package/dist/list/ListSubheader.d.ts +3 -2
  246. package/dist/list/ListSubheader.js +3 -4
  247. package/dist/list/ListSubheader.js.map +1 -1
  248. package/dist/menu/DropdownMenu.js.map +1 -1
  249. package/dist/menu/Menu.d.ts +4 -2
  250. package/dist/menu/Menu.js +5 -4
  251. package/dist/menu/Menu.js.map +1 -1
  252. package/dist/menu/MenuBar.d.ts +3 -1
  253. package/dist/menu/MenuBar.js +3 -4
  254. package/dist/menu/MenuBar.js.map +1 -1
  255. package/dist/menu/MenuButton.d.ts +2 -1
  256. package/dist/menu/MenuButton.js +3 -4
  257. package/dist/menu/MenuButton.js.map +1 -1
  258. package/dist/menu/MenuItem.d.ts +3 -1
  259. package/dist/menu/MenuItem.js +3 -4
  260. package/dist/menu/MenuItem.js.map +1 -1
  261. package/dist/menu/MenuItemButton.d.ts +2 -1
  262. package/dist/menu/MenuItemButton.js +4 -4
  263. package/dist/menu/MenuItemButton.js.map +1 -1
  264. package/dist/menu/MenuItemCheckbox.d.ts +2 -1
  265. package/dist/menu/MenuItemCheckbox.js +4 -4
  266. package/dist/menu/MenuItemCheckbox.js.map +1 -1
  267. package/dist/menu/MenuItemCircularProgress.d.ts +3 -2
  268. package/dist/menu/MenuItemCircularProgress.js +3 -4
  269. package/dist/menu/MenuItemCircularProgress.js.map +1 -1
  270. package/dist/menu/MenuItemFileInput.d.ts +2 -2
  271. package/dist/menu/MenuItemFileInput.js +3 -4
  272. package/dist/menu/MenuItemFileInput.js.map +1 -1
  273. package/dist/menu/MenuItemGroup.d.ts +3 -3
  274. package/dist/menu/MenuItemGroup.js +4 -4
  275. package/dist/menu/MenuItemGroup.js.map +1 -1
  276. package/dist/menu/MenuItemInputToggle.d.ts +3 -2
  277. package/dist/menu/MenuItemInputToggle.js +3 -4
  278. package/dist/menu/MenuItemInputToggle.js.map +1 -1
  279. package/dist/menu/MenuItemRadio.d.ts +3 -1
  280. package/dist/menu/MenuItemRadio.js +4 -4
  281. package/dist/menu/MenuItemRadio.js.map +1 -1
  282. package/dist/menu/MenuItemSeparator.d.ts +3 -2
  283. package/dist/menu/MenuItemSeparator.js +3 -4
  284. package/dist/menu/MenuItemSeparator.js.map +1 -1
  285. package/dist/menu/MenuItemSwitch.d.ts +2 -1
  286. package/dist/menu/MenuItemSwitch.js +4 -4
  287. package/dist/menu/MenuItemSwitch.js.map +1 -1
  288. package/dist/menu/MenuItemTextField.d.ts +2 -2
  289. package/dist/menu/MenuItemTextField.js +3 -4
  290. package/dist/menu/MenuItemTextField.js.map +1 -1
  291. package/dist/menu/MenuVisibilityProvider.d.ts +3 -3
  292. package/dist/menu/MenuVisibilityProvider.js.map +1 -1
  293. package/dist/menu/MenuWidget.d.ts +4 -4
  294. package/dist/menu/MenuWidget.js +4 -4
  295. package/dist/menu/MenuWidget.js.map +1 -1
  296. package/dist/menu/useContextMenu.d.ts +4 -4
  297. package/dist/menu/useContextMenu.js.map +1 -1
  298. package/dist/movement/types.d.ts +5 -5
  299. package/dist/movement/types.js.map +1 -1
  300. package/dist/navigation/CollapsibleNavGroup.d.ts +2 -2
  301. package/dist/navigation/CollapsibleNavGroup.js +3 -4
  302. package/dist/navigation/CollapsibleNavGroup.js.map +1 -1
  303. package/dist/navigation/NavGroup.d.ts +3 -2
  304. package/dist/navigation/NavGroup.js +3 -4
  305. package/dist/navigation/NavGroup.js.map +1 -1
  306. package/dist/navigation/NavItem.d.ts +3 -2
  307. package/dist/navigation/NavItem.js +3 -4
  308. package/dist/navigation/NavItem.js.map +1 -1
  309. package/dist/navigation/NavItemButton.d.ts +2 -2
  310. package/dist/navigation/NavItemButton.js +3 -4
  311. package/dist/navigation/NavItemButton.js.map +1 -1
  312. package/dist/navigation/NavItemLink.d.ts +3 -2
  313. package/dist/navigation/NavItemLink.js +4 -4
  314. package/dist/navigation/NavItemLink.js.map +1 -1
  315. package/dist/navigation/NavSubheader.d.ts +2 -1
  316. package/dist/navigation/NavSubheader.js +3 -4
  317. package/dist/navigation/NavSubheader.js.map +1 -1
  318. package/dist/navigation/Navigation.d.ts +1 -1
  319. package/dist/navigation/Navigation.js +1 -1
  320. package/dist/navigation/Navigation.js.map +1 -1
  321. package/dist/navigation/types.d.ts +5 -2
  322. package/dist/navigation/types.js.map +1 -1
  323. package/dist/navigation/useActiveHeadingId.js +1 -1
  324. package/dist/navigation/useActiveHeadingId.js.map +1 -1
  325. package/dist/overlay/Overlay.d.ts +3 -2
  326. package/dist/overlay/Overlay.js +3 -4
  327. package/dist/overlay/Overlay.js.map +1 -1
  328. package/dist/positioning/useFixedPositioning.d.ts +1 -1
  329. package/dist/positioning/useFixedPositioning.js.map +1 -1
  330. package/dist/progress/CircularProgress.d.ts +2 -2
  331. package/dist/progress/CircularProgress.js +4 -4
  332. package/dist/progress/CircularProgress.js.map +1 -1
  333. package/dist/progress/LinearProgress.d.ts +2 -2
  334. package/dist/progress/LinearProgress.js +4 -4
  335. package/dist/progress/LinearProgress.js.map +1 -1
  336. package/dist/progress/types.d.ts +2 -0
  337. package/dist/progress/types.js.map +1 -1
  338. package/dist/responsive-item/ResponsiveItem.d.ts +3 -2
  339. package/dist/responsive-item/ResponsiveItem.js +3 -4
  340. package/dist/responsive-item/ResponsiveItem.js.map +1 -1
  341. package/dist/responsive-item/ResponsiveItemOverlay.d.ts +3 -2
  342. package/dist/responsive-item/ResponsiveItemOverlay.js +3 -4
  343. package/dist/responsive-item/ResponsiveItemOverlay.js.map +1 -1
  344. package/dist/segmented-button/SegmentedButton.d.ts +3 -2
  345. package/dist/segmented-button/SegmentedButton.js +3 -4
  346. package/dist/segmented-button/SegmentedButton.js.map +1 -1
  347. package/dist/segmented-button/SegmentedButtonContainer.d.ts +4 -3
  348. package/dist/segmented-button/SegmentedButtonContainer.js +4 -5
  349. package/dist/segmented-button/SegmentedButtonContainer.js.map +1 -1
  350. package/dist/sheet/Sheet.d.ts +2 -1
  351. package/dist/sheet/Sheet.js +3 -4
  352. package/dist/sheet/Sheet.js.map +1 -1
  353. package/dist/snackbar/Snackbar.d.ts +3 -2
  354. package/dist/snackbar/Snackbar.js +3 -4
  355. package/dist/snackbar/Snackbar.js.map +1 -1
  356. package/dist/snackbar/Toast.d.ts +3 -2
  357. package/dist/snackbar/Toast.js +4 -4
  358. package/dist/snackbar/Toast.js.map +1 -1
  359. package/dist/snackbar/ToastActionButton.d.ts +2 -1
  360. package/dist/snackbar/ToastActionButton.js +3 -4
  361. package/dist/snackbar/ToastActionButton.js.map +1 -1
  362. package/dist/snackbar/ToastCloseButton.d.ts +2 -1
  363. package/dist/snackbar/ToastCloseButton.js +3 -4
  364. package/dist/snackbar/ToastCloseButton.js.map +1 -1
  365. package/dist/snackbar/ToastContent.d.ts +3 -2
  366. package/dist/snackbar/ToastContent.js +4 -4
  367. package/dist/snackbar/ToastContent.js.map +1 -1
  368. package/dist/spinbutton/SpinButton.d.ts +4 -3
  369. package/dist/spinbutton/SpinButton.js +3 -4
  370. package/dist/spinbutton/SpinButton.js.map +1 -1
  371. package/dist/spinbutton/types.d.ts +1 -1
  372. package/dist/spinbutton/types.js.map +1 -1
  373. package/dist/table/StickyTableSection.d.ts +3 -2
  374. package/dist/table/StickyTableSection.js +3 -4
  375. package/dist/table/StickyTableSection.js.map +1 -1
  376. package/dist/table/Table.d.ts +3 -2
  377. package/dist/table/Table.js +4 -4
  378. package/dist/table/Table.js.map +1 -1
  379. package/dist/table/TableBody.d.ts +3 -2
  380. package/dist/table/TableBody.js +4 -4
  381. package/dist/table/TableBody.js.map +1 -1
  382. package/dist/table/TableCell.d.ts +3 -2
  383. package/dist/table/TableCell.js +3 -4
  384. package/dist/table/TableCell.js.map +1 -1
  385. package/dist/table/TableCellContent.d.ts +3 -2
  386. package/dist/table/TableCellContent.js +3 -4
  387. package/dist/table/TableCellContent.js.map +1 -1
  388. package/dist/table/TableCheckbox.d.ts +3 -2
  389. package/dist/table/TableCheckbox.js +3 -4
  390. package/dist/table/TableCheckbox.js.map +1 -1
  391. package/dist/table/TableContainer.d.ts +5 -3
  392. package/dist/table/TableContainer.js +4 -4
  393. package/dist/table/TableContainer.js.map +1 -1
  394. package/dist/table/TableContainerProvider.d.ts +1 -1
  395. package/dist/table/TableContainerProvider.js.map +1 -1
  396. package/dist/table/TableFooter.d.ts +3 -2
  397. package/dist/table/TableFooter.js +4 -5
  398. package/dist/table/TableFooter.js.map +1 -1
  399. package/dist/table/TableHeader.d.ts +3 -2
  400. package/dist/table/TableHeader.js +4 -5
  401. package/dist/table/TableHeader.js.map +1 -1
  402. package/dist/table/TableRadio.d.ts +3 -2
  403. package/dist/table/TableRadio.js +3 -4
  404. package/dist/table/TableRadio.js.map +1 -1
  405. package/dist/table/TableRow.d.ts +3 -2
  406. package/dist/table/TableRow.js +3 -4
  407. package/dist/table/TableRow.js.map +1 -1
  408. package/dist/tabs/SimpleTabPanel.d.ts +3 -2
  409. package/dist/tabs/SimpleTabPanel.js +3 -4
  410. package/dist/tabs/SimpleTabPanel.js.map +1 -1
  411. package/dist/tabs/SimpleTabPanels.d.ts +3 -2
  412. package/dist/tabs/SimpleTabPanels.js +3 -4
  413. package/dist/tabs/SimpleTabPanels.js.map +1 -1
  414. package/dist/tabs/TabList.d.ts +3 -2
  415. package/dist/tabs/TabList.js +4 -4
  416. package/dist/tabs/TabList.js.map +1 -1
  417. package/dist/tabs/TabListScrollButton.d.ts +3 -2
  418. package/dist/tabs/TabListScrollButton.js +4 -4
  419. package/dist/tabs/TabListScrollButton.js.map +1 -1
  420. package/dist/tabs/useTabList.d.ts +2 -2
  421. package/dist/tabs/useTabList.js.map +1 -1
  422. package/dist/theme/useCSSVariables.d.ts +1 -1
  423. package/dist/theme/useCSSVariables.js.map +1 -1
  424. package/dist/tooltip/Tooltip.d.ts +3 -2
  425. package/dist/tooltip/Tooltip.js +3 -4
  426. package/dist/tooltip/Tooltip.js.map +1 -1
  427. package/dist/tooltip/useTooltip.d.ts +3 -3
  428. package/dist/tooltip/useTooltip.js.map +1 -1
  429. package/dist/transition/SkeletonPlaceholder.d.ts +3 -2
  430. package/dist/transition/SkeletonPlaceholder.js +3 -4
  431. package/dist/transition/SkeletonPlaceholder.js.map +1 -1
  432. package/dist/transition/Slide.d.ts +3 -2
  433. package/dist/transition/Slide.js +3 -4
  434. package/dist/transition/Slide.js.map +1 -1
  435. package/dist/transition/SlideContainer.d.ts +3 -2
  436. package/dist/transition/SlideContainer.js +3 -4
  437. package/dist/transition/SlideContainer.js.map +1 -1
  438. package/dist/tree/TreeGroup.d.ts +2 -2
  439. package/dist/tree/TreeGroup.js +3 -4
  440. package/dist/tree/TreeGroup.js.map +1 -1
  441. package/dist/tree/TreeProvider.d.ts +2 -3
  442. package/dist/tree/TreeProvider.js.map +1 -1
  443. package/dist/tree/useTreeMovement.d.ts +6 -7
  444. package/dist/tree/useTreeMovement.js.map +1 -1
  445. package/dist/types.d.ts +1 -15
  446. package/dist/types.js.map +1 -1
  447. package/dist/typography/Mark.d.ts +3 -2
  448. package/dist/typography/Mark.js +3 -4
  449. package/dist/typography/Mark.js.map +1 -1
  450. package/dist/typography/SrOnly.d.ts +3 -2
  451. package/dist/typography/SrOnly.js +3 -4
  452. package/dist/typography/SrOnly.js.map +1 -1
  453. package/dist/typography/TextContainer.d.ts +3 -2
  454. package/dist/typography/TextContainer.js +3 -4
  455. package/dist/typography/TextContainer.js.map +1 -1
  456. package/dist/typography/Typography.d.ts +3 -2
  457. package/dist/typography/Typography.js +3 -4
  458. package/dist/typography/Typography.js.map +1 -1
  459. package/dist/useAsyncFunction.d.ts +3 -2
  460. package/dist/useAsyncFunction.js.map +1 -1
  461. package/dist/useDebouncedFunction.js +1 -1
  462. package/dist/useDebouncedFunction.js.map +1 -1
  463. package/dist/useDropzone.js +1 -1
  464. package/dist/useDropzone.js.map +1 -1
  465. package/dist/useEnsuredRef.d.ts +3 -3
  466. package/dist/useEnsuredRef.js +1 -1
  467. package/dist/useEnsuredRef.js.map +1 -1
  468. package/dist/useThrottledFunction.js +3 -3
  469. package/dist/useThrottledFunction.js.map +1 -1
  470. package/dist/useUnmounted.d.ts +2 -2
  471. package/dist/useUnmounted.js.map +1 -1
  472. package/dist/utils/applyRef.d.ts +1 -1
  473. package/dist/utils/applyRef.js.map +1 -1
  474. package/dist/window-splitter/WindowSplitter.d.ts +3 -2
  475. package/dist/window-splitter/WindowSplitter.js +3 -4
  476. package/dist/window-splitter/WindowSplitter.js.map +1 -1
  477. package/package.json +9 -9
  478. package/src/app-bar/AppBar.tsx +54 -54
  479. package/src/app-bar/AppBarTitle.tsx +29 -27
  480. package/src/autocomplete/AutocompleteChip.tsx +4 -6
  481. package/src/autocomplete/types.ts +2 -0
  482. package/src/autocomplete/utils.ts +4 -4
  483. package/src/avatar/Avatar.tsx +47 -45
  484. package/src/badge/Badge.tsx +17 -11
  485. package/src/box/Box.tsx +51 -50
  486. package/src/button/AsyncButton.tsx +125 -119
  487. package/src/button/Button.tsx +74 -73
  488. package/src/button/ButtonUnstyled.tsx +9 -9
  489. package/src/button/FloatingActionButton.tsx +9 -7
  490. package/src/button/TooltippedButton.tsx +6 -6
  491. package/src/card/Card.tsx +36 -35
  492. package/src/card/CardContent.tsx +31 -28
  493. package/src/card/CardFooter.tsx +22 -16
  494. package/src/card/CardHeader.tsx +36 -30
  495. package/src/card/CardSubtitle.tsx +8 -6
  496. package/src/card/CardTitle.tsx +26 -25
  497. package/src/card/ClickableCard.tsx +57 -54
  498. package/src/chip/Chip.tsx +122 -120
  499. package/src/datetime/NativeDateField.tsx +7 -7
  500. package/src/datetime/NativeTimeField.tsx +7 -7
  501. package/src/dialog/Dialog.tsx +156 -150
  502. package/src/dialog/DialogContainer.tsx +35 -29
  503. package/src/dialog/DialogContent.tsx +26 -19
  504. package/src/dialog/DialogFooter.tsx +22 -19
  505. package/src/dialog/DialogHeader.tsx +24 -23
  506. package/src/dialog/DialogTitle.tsx +27 -26
  507. package/src/dialog/FixedDialog.tsx +70 -69
  508. package/src/divider/Divider.tsx +32 -26
  509. package/src/draggable/useDraggable.ts +3 -6
  510. package/src/draggable/utils.ts +1 -1
  511. package/src/expansion-panel/ExpansionList.tsx +24 -19
  512. package/src/expansion-panel/ExpansionPanel.tsx +11 -6
  513. package/src/expansion-panel/ExpansionPanelHeader.tsx +9 -6
  514. package/src/files/FileInput.tsx +79 -79
  515. package/src/focus/useFocusContainer.ts +1 -1
  516. package/src/form/Checkbox.tsx +6 -6
  517. package/src/form/Fieldset.tsx +33 -28
  518. package/src/form/Form.tsx +26 -25
  519. package/src/form/FormMessage.tsx +13 -7
  520. package/src/form/FormMessageContainer.tsx +12 -9
  521. package/src/form/FormMessageCounter.tsx +8 -7
  522. package/src/form/InputToggle.tsx +105 -107
  523. package/src/form/InputToggleIcon.tsx +12 -6
  524. package/src/form/Label.tsx +40 -41
  525. package/src/form/Legend.tsx +44 -43
  526. package/src/form/NativeSelect.tsx +116 -114
  527. package/src/form/OptGroup.tsx +15 -15
  528. package/src/form/Option.tsx +123 -122
  529. package/src/form/Password.tsx +66 -67
  530. package/src/form/Radio.tsx +6 -6
  531. package/src/form/ResizingTextAreaWrapper.tsx +7 -6
  532. package/src/form/SliderContainer.tsx +35 -29
  533. package/src/form/SliderThumb.tsx +8 -6
  534. package/src/form/SliderTrack.tsx +80 -80
  535. package/src/form/Switch.tsx +80 -79
  536. package/src/form/SwitchTrack.tsx +35 -34
  537. package/src/form/TextArea.tsx +167 -165
  538. package/src/form/TextField.tsx +106 -104
  539. package/src/form/TextFieldAddon.tsx +33 -32
  540. package/src/form/TextFieldContainer.tsx +8 -6
  541. package/src/form/sliderUtils.ts +1 -1
  542. package/src/form/types.ts +15 -5
  543. package/src/form/useCombobox.ts +6 -10
  544. package/src/form/useFormReset.ts +1 -1
  545. package/src/form/useTextField.ts +4 -4
  546. package/src/hoverMode/useHoverMode.ts +1 -1
  547. package/src/hoverMode/useHoverModeProvider.ts +13 -8
  548. package/src/icon/FontIcon.tsx +32 -30
  549. package/src/icon/IconRotator.tsx +30 -28
  550. package/src/icon/MaterialIcon.tsx +36 -30
  551. package/src/icon/MaterialSymbol.tsx +50 -44
  552. package/src/icon/SVGIcon.tsx +47 -41
  553. package/src/layout/LayoutAppBar.tsx +23 -28
  554. package/src/layout/LayoutNav.tsx +68 -62
  555. package/src/layout/LayoutWindowSplitter.tsx +9 -7
  556. package/src/layout/Main.tsx +30 -29
  557. package/src/link/Link.tsx +16 -11
  558. package/src/link/SkipToMainContent.tsx +6 -6
  559. package/src/list/List.tsx +31 -29
  560. package/src/list/ListItem.tsx +126 -125
  561. package/src/list/ListItemLink.tsx +128 -126
  562. package/src/list/ListItemText.tsx +42 -37
  563. package/src/list/ListSubheader.tsx +27 -26
  564. package/src/menu/DropdownMenu.tsx +2 -2
  565. package/src/menu/Menu.tsx +327 -326
  566. package/src/menu/MenuBar.tsx +51 -50
  567. package/src/menu/MenuButton.tsx +69 -70
  568. package/src/menu/MenuItem.tsx +37 -37
  569. package/src/menu/MenuItemButton.tsx +132 -133
  570. package/src/menu/MenuItemCheckbox.tsx +6 -7
  571. package/src/menu/MenuItemCircularProgress.tsx +13 -6
  572. package/src/menu/MenuItemFileInput.tsx +4 -6
  573. package/src/menu/MenuItemGroup.tsx +18 -18
  574. package/src/menu/MenuItemInputToggle.tsx +8 -6
  575. package/src/menu/MenuItemRadio.tsx +6 -6
  576. package/src/menu/MenuItemSeparator.tsx +7 -7
  577. package/src/menu/MenuItemSwitch.tsx +6 -6
  578. package/src/menu/MenuItemTextField.tsx +5 -7
  579. package/src/menu/MenuVisibilityProvider.tsx +3 -2
  580. package/src/menu/MenuWidget.tsx +123 -119
  581. package/src/menu/useContextMenu.ts +7 -4
  582. package/src/movement/types.ts +5 -9
  583. package/src/navigation/CollapsibleNavGroup.tsx +10 -6
  584. package/src/navigation/NavGroup.tsx +18 -19
  585. package/src/navigation/NavItem.tsx +16 -11
  586. package/src/navigation/NavItemButton.tsx +69 -66
  587. package/src/navigation/NavItemLink.tsx +102 -100
  588. package/src/navigation/NavSubheader.tsx +14 -16
  589. package/src/navigation/Navigation.tsx +1 -1
  590. package/src/navigation/types.ts +13 -4
  591. package/src/navigation/useActiveHeadingId.ts +1 -1
  592. package/src/overlay/Overlay.tsx +66 -65
  593. package/src/positioning/useFixedPositioning.ts +1 -1
  594. package/src/progress/CircularProgress.tsx +6 -6
  595. package/src/progress/LinearProgress.tsx +6 -6
  596. package/src/progress/types.ts +4 -0
  597. package/src/responsive-item/ResponsiveItem.tsx +29 -28
  598. package/src/responsive-item/ResponsiveItemOverlay.tsx +9 -8
  599. package/src/segmented-button/SegmentedButton.tsx +11 -6
  600. package/src/segmented-button/SegmentedButtonContainer.tsx +14 -8
  601. package/src/sheet/Sheet.tsx +42 -43
  602. package/src/snackbar/Snackbar.tsx +44 -38
  603. package/src/snackbar/Toast.tsx +110 -109
  604. package/src/snackbar/ToastActionButton.tsx +6 -6
  605. package/src/snackbar/ToastCloseButton.tsx +4 -6
  606. package/src/snackbar/ToastContent.tsx +56 -49
  607. package/src/spinbutton/SpinButton.tsx +9 -8
  608. package/src/spinbutton/types.ts +1 -1
  609. package/src/table/StickyTableSection.tsx +8 -6
  610. package/src/table/Table.tsx +47 -41
  611. package/src/table/TableBody.tsx +46 -42
  612. package/src/table/TableCell.tsx +83 -81
  613. package/src/table/TableCellContent.tsx +11 -6
  614. package/src/table/TableCheckbox.tsx +6 -6
  615. package/src/table/TableContainer.tsx +31 -26
  616. package/src/table/TableContainerProvider.ts +1 -1
  617. package/src/table/TableFooter.tsx +7 -12
  618. package/src/table/TableHeader.tsx +15 -9
  619. package/src/table/TableRadio.tsx +59 -58
  620. package/src/table/TableRow.tsx +34 -33
  621. package/src/tabs/SimpleTabPanel.tsx +18 -13
  622. package/src/tabs/SimpleTabPanels.tsx +11 -7
  623. package/src/tabs/TabList.tsx +106 -105
  624. package/src/tabs/TabListScrollButton.tsx +9 -6
  625. package/src/tabs/useTabList.ts +2 -2
  626. package/src/theme/useCSSVariables.ts +1 -1
  627. package/src/tooltip/Tooltip.tsx +61 -61
  628. package/src/tooltip/useTooltip.ts +2 -3
  629. package/src/transition/SkeletonPlaceholder.tsx +8 -6
  630. package/src/transition/Slide.tsx +54 -48
  631. package/src/transition/SlideContainer.tsx +16 -16
  632. package/src/tree/TreeGroup.tsx +54 -55
  633. package/src/tree/TreeProvider.tsx +2 -2
  634. package/src/tree/useTreeMovement.ts +6 -6
  635. package/src/types.ts +1 -16
  636. package/src/typography/Mark.tsx +16 -11
  637. package/src/typography/SrOnly.tsx +41 -35
  638. package/src/typography/TextContainer.tsx +12 -12
  639. package/src/typography/Typography.tsx +42 -41
  640. package/src/useAsyncFunction.ts +3 -3
  641. package/src/useDebouncedFunction.ts +1 -1
  642. package/src/useDropzone.ts +1 -1
  643. package/src/useEnsuredRef.ts +3 -3
  644. package/src/useThrottledFunction.ts +3 -3
  645. package/src/useUnmounted.ts +2 -4
  646. package/src/utils/applyRef.ts +2 -2
  647. package/src/window-splitter/WindowSplitter.tsx +6 -6
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/dialog/Dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { type HTMLAttributes, forwardRef, useState } from \"react\";\n\nimport { useSsr } from \"../SsrProvider.js\";\nimport {\n type FocusContainerComponentProps,\n useFocusContainer,\n} from \"../focus/useFocusContainer.js\";\nimport { Overlay } from \"../overlay/Overlay.js\";\nimport { Portal } from \"../portal/Portal.js\";\nimport { useScrollLock } from \"../scroll/useScrollLock.js\";\nimport {\n type CSSTransitionClassNames,\n type CSSTransitionComponentProps,\n type TransitionActions,\n type TransitionTimeout,\n} from \"../transition/types.js\";\nimport { useCSSTransition } from \"../transition/useCSSTransition.js\";\nimport { type LabelRequiredForA11y, type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport {\n type ConfigurableDialogContainerProps,\n DialogContainer,\n} from \"./DialogContainer.js\";\nimport {\n NestedDialogProvider,\n useNestedDialogContext,\n} from \"./NestedDialogProvider.js\";\nimport {\n DEFAULT_DIALOG_CLASSNAMES,\n DEFAULT_DIALOG_TIMEOUT,\n type DialogType,\n type DialogWidth,\n dialog,\n} from \"./styles.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\nconst noopBool = (): boolean => false;\n\nexport interface BaseDialogProps\n extends\n HTMLAttributes<HTMLDivElement>,\n CSSTransitionComponentProps,\n TransitionActions,\n FocusContainerComponentProps {\n /**\n * @defaultValue `\"dialog-\" + useId()`\n */\n id?: string;\n\n /**\n * @defaultValue `\"centered\"`\n */\n type?: DialogType;\n\n /**\n * @see {@link DialogWidth}\n * @defaultValue `\"auto\"`\n */\n width?: DialogWidth;\n\n /**\n * @defaultValue `\"dialog\"`\n */\n role?: \"dialog\" | \"alertdialog\" | \"menu\" | \"none\";\n\n /**\n * This value controls the visibility of the dialog.\n */\n visible: boolean;\n\n /**\n * This function should set the {@link visible} prop to false to hide the\n * modal when:\n * - the {@link modal} and {@link disableEscapeClose} props are `false` and\n * the user presses the `\"Escape\"` key.\n * - The overlay element is clicked\n */\n onRequestClose: () => void;\n\n /** @defaultValue `false` */\n disableTransition?: boolean;\n\n /** @defaultValue `-1` */\n tabIndex?: number;\n\n /**\n * Set this value to `true` if the dialog should behave as a modal which\n * prevents the modal from being closed by pressing the `\"Escape\"` key or\n * clicking the overlay. The user **must** click one of the actions within the\n * dialog instead.\n *\n * @defaultValue `false`\n */\n modal?: boolean;\n\n /**\n * Set this to `true` if the dialog should no longer use the `Portal`\n * behavior.\n *\n * @defaultValue `false`\n */\n disablePortal?: boolean;\n\n /**\n * Set this to `true` if you want the page to still be scrollable while the\n * dialog is visible. This should normally be `true` for popovers/fixed\n * dialogs.\n *\n * @defaultValue `type === \"custom\"`\n */\n disableScrollLock?: boolean;\n\n /**\n * Set this to `true` to prevent the dialog from being closed when the\n * `\"Escape\"` key is pressed. This is `true` by default when the {@link modal}\n * prop is `true`\n *\n * @defaultValue `modal`\n */\n disableEscapeClose?: boolean;\n\n /**\n * Set this to `true` if an overlay should not appear behind the dialog.\n *\n * Note: this was changed from `type === \"full-page\"` to `false` so that you\n * can change between full-page and centered based on media queries. If the\n * type changes the overlay would end up rendering above the dialog instead of\n * behind.\n *\n * @see {@link overlayHidden}\n * @defaultValue `false`\n */\n disableOverlay?: boolean;\n\n /**\n * Set this to `true` if an overlay should be appear behind the dialog but\n * have an `opacity: 0`. This is useful if you want to prevent other elements\n * on the page from being clicked while the dialog is visible, but don't want\n * a dark background. i.e. popovers/fixed dialogs.\n *\n * @defaultValue `false`\n */\n overlayHidden?: boolean;\n\n /**\n * Any additional props that should be passed to the overlay element if it is\n * rendered.\n */\n overlayProps?: HTMLAttributes<HTMLSpanElement>;\n\n /**\n * Any additional props that should be passed to the container element when\n * the `type !== \"custom\"`.\n */\n containerProps?: PropsWithRef<ConfigurableDialogContainerProps>;\n\n /**\n * @see {@link DEFAULT_DIALOG_TIMEOUT}\n * @defaultValue `DEFAULT_DIALOG_TIMEOUT`\n */\n timeout?: TransitionTimeout;\n\n /**\n * @see {@link DEFAULT_DIALOG_CLASSNAMES}\n * @defaultValue `DEFAULT_DIALOG_CLASSNAMES`\n */\n classNames?: CSSTransitionClassNames;\n\n /**\n * Set this to `true` if the `Dialog` should not gain the normal focus box\n * shadow while it is focused. The `Dialog` should normally only gain focus\n * when it becomes visible and no child elements have `autoFocus` enabled.\n *\n * @since 6.0.0\n * @defaultValue `type === \"full-page\"`\n */\n disableFocusOutline?: boolean;\n}\n\nexport type DialogProps = LabelRequiredForA11y<BaseDialogProps>;\n\n/**\n * **Client Component**\n *\n * @example Simple Example\n * ```tsx\n * import { Button } from \"@react-md/core/button/Button\";\n * import { Dialog } from \"@react-md/core/dialog/Dialog\";\n * import { DialogContent } from \"@react-md/core/dialog/DialogContent\";\n * import { DialogFooter } from \"@react-md/core/dialog/DialogFooter\";\n * import { DialogHeader } from \"@react-md/core/dialog/DialogHeader\";\n * import { DialogTitle } from \"@react-md/core/dialog/DialogTitle\";\n * import { Typography } from \"@react-md/core/typography/Typography\";\n * import { useToggle } from \"@react-md/core/useToggle\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const {\n * toggle,\n * disable: onRequestClose,\n * toggled: visible,\n * } = useToggle(false);\n *\n * return (\n * <>\n * <Button onClick={toggle}>Toggle</Button>\n * <Dialog\n * aria-labelledby=\"dialog-title\"\n * visible={visible}\n * onRequestClose={onRequestClose}\n * >\n * <DialogHeader>\n * <DialogTitle id=\"dialog-title\">Simple Dialog</DialogTitle>\n * </DialogHeader>\n * <DialogContent>\n * <Typography margin=\"none\">This is some text in a dialog.</Typography>\n * </DialogContent>\n * <DialogFooter>\n * <Button onClick={onRequestClose}>\n * Close\n * </Button>\n * </DialogFooter>\n * </Dialog>\n * </>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/dialog | Dialog Demos}\n * @since 6.0.0 The `Dialog` no longer supports focusing elements\n * within once it becomes visible. You must manually add `autoFocus` to a\n * element instead.\n */\nexport const Dialog = forwardRef<HTMLDivElement, DialogProps>(\n function Dialog(props, ref) {\n const {\n id: propId,\n modal = false,\n role = modal ? \"alertdialog\" : \"dialog\",\n type = \"centered\",\n width,\n tabIndex = -1,\n visible,\n onRequestClose,\n containerProps,\n temporary = true,\n className,\n timeout = DEFAULT_DIALOG_TIMEOUT,\n classNames = DEFAULT_DIALOG_CLASSNAMES,\n disableTransition = false,\n appear = false,\n enter = true,\n exit = true,\n onEnter = noop,\n onEntering = noop,\n onEntered = noop,\n onExit = noop,\n onExiting = noop,\n onExited = noop,\n exitedHidden = true,\n disableOverlay = false,\n overlayProps,\n overlayHidden,\n onKeyDown = noop,\n isFocusTypeDisabled = noopBool,\n disablePortal: propDisablePortal,\n disableScrollLock = false,\n disableEscapeClose = modal,\n disableFocusOutline = type === \"full-page\",\n children,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"dialog\");\n\n const ssr = useSsr();\n const setChildVisible = useNestedDialogContext();\n\n // this makes it so that as more non-full page dialogs become visible, the\n // overlay does not become darker as more and more overlays are stacked upon\n // each other. only the top-most overlay will have and active background\n // color.\n const [isChildVisible, setIsChildVisible] = useState(false);\n const { eventHandlers, transitionOptions } = useFocusContainer({\n nodeRef: ref,\n activate: visible,\n onEnter(appearing) {\n onEnter(appearing);\n setChildVisible(type !== \"full-page\");\n },\n onEntered(appear) {\n onEntered(appear);\n // this needs to be called onEnter and onEntered just in case the\n // transition is disabled\n setChildVisible(type !== \"full-page\");\n },\n onEntering,\n onExit() {\n onExit();\n setChildVisible(false);\n },\n onExiting,\n onExited() {\n onExited();\n // this needs to be called onExit and onExited just in case the\n // transition is disabled\n setChildVisible(false);\n },\n disableTransition,\n onKeyDown(event) {\n onKeyDown(event);\n if (\n event.isPropagationStopped() ||\n modal ||\n disableEscapeClose ||\n event.key !== \"Escape\"\n ) {\n return;\n }\n\n // prevent parent dialogs from closing as well\n event.stopPropagation();\n onRequestClose();\n },\n isFocusTypeDisabled,\n });\n const { elementProps, stage, rendered, disablePortal } = useCSSTransition({\n transitionIn: visible,\n timeout,\n classNames,\n className: dialog({\n type,\n width,\n fixed: type === \"custom\",\n outline: !disableFocusOutline,\n disableBoxShadow: isChildVisible,\n className,\n }),\n appear: appear && !disableTransition && !ssr,\n enter: enter && !disableTransition,\n exit: exit && !disableTransition,\n temporary,\n exitedHidden,\n disablePortal: propDisablePortal,\n ...transitionOptions,\n });\n useScrollLock(!disableScrollLock && visible);\n\n return (\n <NestedDialogProvider value={setIsChildVisible}>\n {!disableOverlay && (\n <Overlay\n visible={visible}\n disableTransition={disableTransition}\n temporary={temporary}\n disablePortal={disablePortal}\n {...overlayProps}\n onClick={modal ? noop : onRequestClose}\n clickable={!modal}\n noOpacity={overlayHidden || isChildVisible}\n />\n )}\n <Portal disabled={disablePortal}>\n {rendered && (\n <DialogContainer\n enabled={type !== \"custom\"}\n {...containerProps}\n centered={type === \"centered\"}\n displayNone={!temporary && exitedHidden && stage === \"exited\"}\n >\n <div\n aria-modal={modal || undefined}\n {...remaining}\n {...elementProps}\n {...eventHandlers}\n id={id}\n role={role}\n tabIndex={tabIndex}\n >\n {children}\n </div>\n </DialogContainer>\n )}\n </Portal>\n </NestedDialogProvider>\n );\n }\n);\n"],"names":["forwardRef","useState","useSsr","useFocusContainer","Overlay","Portal","useScrollLock","useCSSTransition","useEnsuredId","DialogContainer","NestedDialogProvider","useNestedDialogContext","DEFAULT_DIALOG_CLASSNAMES","DEFAULT_DIALOG_TIMEOUT","dialog","noop","noopBool","Dialog","props","ref","id","propId","modal","role","type","width","tabIndex","visible","onRequestClose","containerProps","temporary","className","timeout","classNames","disableTransition","appear","enter","exit","onEnter","onEntering","onEntered","onExit","onExiting","onExited","exitedHidden","disableOverlay","overlayProps","overlayHidden","onKeyDown","isFocusTypeDisabled","disablePortal","propDisablePortal","disableScrollLock","disableEscapeClose","disableFocusOutline","children","remaining","ssr","setChildVisible","isChildVisible","setIsChildVisible","eventHandlers","transitionOptions","nodeRef","activate","appearing","event","isPropagationStopped","key","stopPropagation","elementProps","stage","rendered","transitionIn","fixed","outline","disableBoxShadow","value","onClick","clickable","noOpacity","disabled","enabled","centered","displayNone","div","aria-modal","undefined"],"mappings":"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"}
1
+ {"version":3,"sources":["../../src/dialog/Dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type HTMLAttributes,\n type ReactElement,\n type Ref,\n useState,\n} from \"react\";\n\nimport { useSsr } from \"../SsrProvider.js\";\nimport {\n type FocusContainerComponentProps,\n useFocusContainer,\n} from \"../focus/useFocusContainer.js\";\nimport { Overlay } from \"../overlay/Overlay.js\";\nimport { Portal } from \"../portal/Portal.js\";\nimport { useScrollLock } from \"../scroll/useScrollLock.js\";\nimport {\n type CSSTransitionClassNames,\n type CSSTransitionComponentProps,\n type TransitionActions,\n type TransitionTimeout,\n} from \"../transition/types.js\";\nimport { useCSSTransition } from \"../transition/useCSSTransition.js\";\nimport { type LabelRequiredForA11y, type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport {\n type ConfigurableDialogContainerProps,\n DialogContainer,\n} from \"./DialogContainer.js\";\nimport {\n NestedDialogProvider,\n useNestedDialogContext,\n} from \"./NestedDialogProvider.js\";\nimport {\n DEFAULT_DIALOG_CLASSNAMES,\n DEFAULT_DIALOG_TIMEOUT,\n type DialogType,\n type DialogWidth,\n dialog,\n} from \"./styles.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\nconst noopBool = (): boolean => false;\n\nexport interface BaseDialogProps\n extends\n HTMLAttributes<HTMLDivElement>,\n CSSTransitionComponentProps,\n TransitionActions,\n FocusContainerComponentProps {\n ref?: Ref<HTMLDivElement>;\n\n /**\n * @defaultValue `\"dialog-\" + useId()`\n */\n id?: string;\n\n /**\n * @defaultValue `\"centered\"`\n */\n type?: DialogType;\n\n /**\n * @see {@link DialogWidth}\n * @defaultValue `\"auto\"`\n */\n width?: DialogWidth;\n\n /**\n * @defaultValue `\"dialog\"`\n */\n role?: \"dialog\" | \"alertdialog\" | \"menu\" | \"none\";\n\n /**\n * This value controls the visibility of the dialog.\n */\n visible: boolean;\n\n /**\n * This function should set the {@link visible} prop to false to hide the\n * modal when:\n * - the {@link modal} and {@link disableEscapeClose} props are `false` and\n * the user presses the `\"Escape\"` key.\n * - The overlay element is clicked\n */\n onRequestClose: () => void;\n\n /** @defaultValue `false` */\n disableTransition?: boolean;\n\n /** @defaultValue `-1` */\n tabIndex?: number;\n\n /**\n * Set this value to `true` if the dialog should behave as a modal which\n * prevents the modal from being closed by pressing the `\"Escape\"` key or\n * clicking the overlay. The user **must** click one of the actions within the\n * dialog instead.\n *\n * @defaultValue `false`\n */\n modal?: boolean;\n\n /**\n * Set this to `true` if the dialog should no longer use the `Portal`\n * behavior.\n *\n * @defaultValue `false`\n */\n disablePortal?: boolean;\n\n /**\n * Set this to `true` if you want the page to still be scrollable while the\n * dialog is visible. This should normally be `true` for popovers/fixed\n * dialogs.\n *\n * @defaultValue `type === \"custom\"`\n */\n disableScrollLock?: boolean;\n\n /**\n * Set this to `true` to prevent the dialog from being closed when the\n * `\"Escape\"` key is pressed. This is `true` by default when the {@link modal}\n * prop is `true`\n *\n * @defaultValue `modal`\n */\n disableEscapeClose?: boolean;\n\n /**\n * Set this to `true` if an overlay should not appear behind the dialog.\n *\n * Note: this was changed from `type === \"full-page\"` to `false` so that you\n * can change between full-page and centered based on media queries. If the\n * type changes the overlay would end up rendering above the dialog instead of\n * behind.\n *\n * @see {@link overlayHidden}\n * @defaultValue `false`\n */\n disableOverlay?: boolean;\n\n /**\n * Set this to `true` if an overlay should be appear behind the dialog but\n * have an `opacity: 0`. This is useful if you want to prevent other elements\n * on the page from being clicked while the dialog is visible, but don't want\n * a dark background. i.e. popovers/fixed dialogs.\n *\n * @defaultValue `false`\n */\n overlayHidden?: boolean;\n\n /**\n * Any additional props that should be passed to the overlay element if it is\n * rendered.\n */\n overlayProps?: HTMLAttributes<HTMLSpanElement>;\n\n /**\n * Any additional props that should be passed to the container element when\n * the `type !== \"custom\"`.\n */\n containerProps?: PropsWithRef<ConfigurableDialogContainerProps>;\n\n /**\n * @see {@link DEFAULT_DIALOG_TIMEOUT}\n * @defaultValue `DEFAULT_DIALOG_TIMEOUT`\n */\n timeout?: TransitionTimeout;\n\n /**\n * @see {@link DEFAULT_DIALOG_CLASSNAMES}\n * @defaultValue `DEFAULT_DIALOG_CLASSNAMES`\n */\n classNames?: CSSTransitionClassNames;\n\n /**\n * Set this to `true` if the `Dialog` should not gain the normal focus box\n * shadow while it is focused. The `Dialog` should normally only gain focus\n * when it becomes visible and no child elements have `autoFocus` enabled.\n *\n * @since 6.0.0\n * @defaultValue `type === \"full-page\"`\n */\n disableFocusOutline?: boolean;\n}\n\nexport type DialogProps = LabelRequiredForA11y<BaseDialogProps>;\n\n/**\n * **Client Component**\n *\n * @example Simple Example\n * ```tsx\n * import { Button } from \"@react-md/core/button/Button\";\n * import { Dialog } from \"@react-md/core/dialog/Dialog\";\n * import { DialogContent } from \"@react-md/core/dialog/DialogContent\";\n * import { DialogFooter } from \"@react-md/core/dialog/DialogFooter\";\n * import { DialogHeader } from \"@react-md/core/dialog/DialogHeader\";\n * import { DialogTitle } from \"@react-md/core/dialog/DialogTitle\";\n * import { Typography } from \"@react-md/core/typography/Typography\";\n * import { useToggle } from \"@react-md/core/useToggle\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const {\n * toggle,\n * disable: onRequestClose,\n * toggled: visible,\n * } = useToggle(false);\n *\n * return (\n * <>\n * <Button onClick={toggle}>Toggle</Button>\n * <Dialog\n * aria-labelledby=\"dialog-title\"\n * visible={visible}\n * onRequestClose={onRequestClose}\n * >\n * <DialogHeader>\n * <DialogTitle id=\"dialog-title\">Simple Dialog</DialogTitle>\n * </DialogHeader>\n * <DialogContent>\n * <Typography margin=\"none\">This is some text in a dialog.</Typography>\n * </DialogContent>\n * <DialogFooter>\n * <Button onClick={onRequestClose}>\n * Close\n * </Button>\n * </DialogFooter>\n * </Dialog>\n * </>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/dialog | Dialog Demos}\n * @since 6.0.0 The `Dialog` no longer supports focusing elements\n * within once it becomes visible. You must manually add `autoFocus` to a\n * element instead.\n */\nexport function Dialog(props: DialogProps): ReactElement {\n const {\n ref,\n id: propId,\n modal = false,\n role = modal ? \"alertdialog\" : \"dialog\",\n type = \"centered\",\n width,\n tabIndex = -1,\n visible,\n onRequestClose,\n containerProps,\n temporary = true,\n className,\n timeout = DEFAULT_DIALOG_TIMEOUT,\n classNames = DEFAULT_DIALOG_CLASSNAMES,\n disableTransition = false,\n appear = false,\n enter = true,\n exit = true,\n onEnter = noop,\n onEntering = noop,\n onEntered = noop,\n onExit = noop,\n onExiting = noop,\n onExited = noop,\n exitedHidden = true,\n disableOverlay = false,\n overlayProps,\n overlayHidden,\n onKeyDown = noop,\n isFocusTypeDisabled = noopBool,\n disablePortal: propDisablePortal,\n disableScrollLock = false,\n disableEscapeClose = modal,\n disableFocusOutline = type === \"full-page\",\n children,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"dialog\");\n\n const ssr = useSsr();\n const setChildVisible = useNestedDialogContext();\n\n // this makes it so that as more non-full page dialogs become visible, the\n // overlay does not become darker as more and more overlays are stacked upon\n // each other. only the top-most overlay will have and active background\n // color.\n const [isChildVisible, setIsChildVisible] = useState(false);\n const { eventHandlers, transitionOptions } = useFocusContainer({\n nodeRef: ref,\n activate: visible,\n onEnter(appearing) {\n onEnter(appearing);\n setChildVisible(type !== \"full-page\");\n },\n onEntered(appear) {\n onEntered(appear);\n // this needs to be called onEnter and onEntered just in case the\n // transition is disabled\n setChildVisible(type !== \"full-page\");\n },\n onEntering,\n onExit() {\n onExit();\n setChildVisible(false);\n },\n onExiting,\n onExited() {\n onExited();\n // this needs to be called onExit and onExited just in case the\n // transition is disabled\n setChildVisible(false);\n },\n disableTransition,\n onKeyDown(event) {\n onKeyDown(event);\n if (\n event.isPropagationStopped() ||\n modal ||\n disableEscapeClose ||\n event.key !== \"Escape\"\n ) {\n return;\n }\n\n // prevent parent dialogs from closing as well\n event.stopPropagation();\n onRequestClose();\n },\n isFocusTypeDisabled,\n });\n const { elementProps, stage, rendered, disablePortal } = useCSSTransition({\n transitionIn: visible,\n timeout,\n classNames,\n className: dialog({\n type,\n width,\n fixed: type === \"custom\",\n outline: !disableFocusOutline,\n disableBoxShadow: isChildVisible,\n className,\n }),\n appear: appear && !disableTransition && !ssr,\n enter: enter && !disableTransition,\n exit: exit && !disableTransition,\n temporary,\n exitedHidden,\n disablePortal: propDisablePortal,\n ...transitionOptions,\n });\n useScrollLock(!disableScrollLock && visible);\n\n return (\n <NestedDialogProvider value={setIsChildVisible}>\n {!disableOverlay && (\n <Overlay\n visible={visible}\n disableTransition={disableTransition}\n temporary={temporary}\n disablePortal={disablePortal}\n {...overlayProps}\n onClick={modal ? noop : onRequestClose}\n clickable={!modal}\n noOpacity={overlayHidden || isChildVisible}\n />\n )}\n <Portal disabled={disablePortal}>\n {rendered && (\n <DialogContainer\n enabled={type !== \"custom\"}\n {...containerProps}\n centered={type === \"centered\"}\n displayNone={!temporary && exitedHidden && stage === \"exited\"}\n >\n <div\n aria-modal={modal || undefined}\n {...remaining}\n {...elementProps}\n {...eventHandlers}\n id={id}\n role={role}\n tabIndex={tabIndex}\n >\n {children}\n </div>\n </DialogContainer>\n )}\n </Portal>\n </NestedDialogProvider>\n );\n}\n"],"names":["useState","useSsr","useFocusContainer","Overlay","Portal","useScrollLock","useCSSTransition","useEnsuredId","DialogContainer","NestedDialogProvider","useNestedDialogContext","DEFAULT_DIALOG_CLASSNAMES","DEFAULT_DIALOG_TIMEOUT","dialog","noop","noopBool","Dialog","props","ref","id","propId","modal","role","type","width","tabIndex","visible","onRequestClose","containerProps","temporary","className","timeout","classNames","disableTransition","appear","enter","exit","onEnter","onEntering","onEntered","onExit","onExiting","onExited","exitedHidden","disableOverlay","overlayProps","overlayHidden","onKeyDown","isFocusTypeDisabled","disablePortal","propDisablePortal","disableScrollLock","disableEscapeClose","disableFocusOutline","children","remaining","ssr","setChildVisible","isChildVisible","setIsChildVisible","eventHandlers","transitionOptions","nodeRef","activate","appearing","event","isPropagationStopped","key","stopPropagation","elementProps","stage","rendered","transitionIn","fixed","outline","disableBoxShadow","value","onClick","clickable","noOpacity","disabled","enabled","centered","displayNone","div","aria-modal","undefined"],"mappings":"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"}
@@ -1,8 +1,9 @@
1
- import { type HTMLAttributes, type ReactNode } from "react";
1
+ import { type HTMLAttributes, type ReactElement, type ReactNode, type Ref } from "react";
2
2
  /**
3
3
  * @since 6.0.0
4
4
  */
5
5
  export interface ConfigurableDialogContainerProps extends HTMLAttributes<HTMLDivElement> {
6
+ ref?: Ref<HTMLDivElement>;
6
7
  /**
7
8
  * Set to `true` to force the `Dialog` to be wrapped in a `DialogContainer`
8
9
  * div. This defaults to `true` for `type !== "custom"`.
@@ -23,4 +24,4 @@ export interface DialogContainerProps extends ConfigurableDialogContainerProps {
23
24
  * @since 6.0.0
24
25
  * @internal
25
26
  */
26
- export declare const DialogContainer: import("react").ForwardRefExoticComponent<DialogContainerProps & import("react").RefAttributes<HTMLDivElement>>;
27
+ export declare function DialogContainer(props: DialogContainerProps): ReactElement;
@@ -1,11 +1,10 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
2
  import { dialogContainer } from "./styles.js";
4
3
  /**
5
4
  * @since 6.0.0
6
5
  * @internal
7
- */ export const DialogContainer = /*#__PURE__*/ forwardRef(function DialogContainer(props, ref) {
8
- const { enabled, centered, displayNone, children, className, ...remaining } = props;
6
+ */ export function DialogContainer(props) {
7
+ const { ref, enabled, centered, displayNone, children, className, ...remaining } = props;
9
8
  if (!enabled) {
10
9
  return /*#__PURE__*/ _jsx(_Fragment, {
11
10
  children: children
@@ -21,6 +20,6 @@ import { dialogContainer } from "./styles.js";
21
20
  }),
22
21
  children: children
23
22
  });
24
- });
23
+ }
25
24
 
26
25
  //# sourceMappingURL=DialogContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/dialog/DialogContainer.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactNode, forwardRef } from \"react\";\n\nimport { dialogContainer } from \"./styles.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface ConfigurableDialogContainerProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Set to `true` to force the `Dialog` to be wrapped in a `DialogContainer`\n * div. This defaults to `true` for `type !== \"custom\"`.\n */\n enabled?: boolean;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport interface DialogContainerProps extends ConfigurableDialogContainerProps {\n enabled: boolean;\n centered: boolean;\n displayNone: boolean;\n children: ReactNode;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport const DialogContainer = forwardRef<HTMLDivElement, DialogContainerProps>(\n function DialogContainer(props, ref) {\n const {\n enabled,\n centered,\n displayNone,\n children,\n className,\n ...remaining\n } = props;\n\n if (!enabled) {\n return <>{children}</>;\n }\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={dialogContainer({\n className,\n centered,\n displayNone,\n })}\n >\n {children}\n </div>\n );\n }\n);\n"],"names":["forwardRef","dialogContainer","DialogContainer","props","ref","enabled","centered","displayNone","children","className","remaining","div"],"mappings":";AAAA,SAA8CA,UAAU,QAAQ,QAAQ;AAExE,SAASC,eAAe,QAAQ,cAAc;AAwB9C;;;CAGC,GACD,OAAO,MAAMC,gCAAkBF,WAC7B,SAASE,gBAAgBC,KAAK,EAAEC,GAAG;IACjC,MAAM,EACJC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,SAAS,EACT,GAAGC,WACJ,GAAGP;IAEJ,IAAI,CAACE,SAAS;QACZ,qBAAO;sBAAGG;;IACZ;IAEA,qBACE,KAACG;QACE,GAAGD,SAAS;QACbN,KAAKA;QACLK,WAAWR,gBAAgB;YACzBQ;YACAH;YACAC;QACF;kBAECC;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/dialog/DialogContainer.tsx"],"sourcesContent":["import {\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\n\nimport { dialogContainer } from \"./styles.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface ConfigurableDialogContainerProps extends HTMLAttributes<HTMLDivElement> {\n ref?: Ref<HTMLDivElement>;\n\n /**\n * Set to `true` to force the `Dialog` to be wrapped in a `DialogContainer`\n * div. This defaults to `true` for `type !== \"custom\"`.\n */\n enabled?: boolean;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport interface DialogContainerProps extends ConfigurableDialogContainerProps {\n enabled: boolean;\n centered: boolean;\n displayNone: boolean;\n children: ReactNode;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport function DialogContainer(props: DialogContainerProps): ReactElement {\n const {\n ref,\n enabled,\n centered,\n displayNone,\n children,\n className,\n ...remaining\n } = props;\n\n if (!enabled) {\n return <>{children}</>;\n }\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={dialogContainer({\n className,\n centered,\n displayNone,\n })}\n >\n {children}\n </div>\n );\n}\n"],"names":["dialogContainer","DialogContainer","props","ref","enabled","centered","displayNone","children","className","remaining","div"],"mappings":";AAOA,SAASA,eAAe,QAAQ,cAAc;AA0B9C;;;CAGC,GACD,OAAO,SAASC,gBAAgBC,KAA2B;IACzD,MAAM,EACJC,GAAG,EACHC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,SAAS,EACT,GAAGC,WACJ,GAAGP;IAEJ,IAAI,CAACE,SAAS;QACZ,qBAAO;sBAAGG;;IACZ;IAEA,qBACE,KAACG;QACE,GAAGD,SAAS;QACbN,KAAKA;QACLK,WAAWR,gBAAgB;YACzBQ;YACAH;YACAC;QACF;kBAECC;;AAGP"}
@@ -1,6 +1,7 @@
1
- import { type HTMLAttributes } from "react";
1
+ import { type HTMLAttributes, type ReactElement, type Ref } from "react";
2
2
  import { type DialogContentClassNameOptions } from "./styles.js";
3
3
  export interface DialogContentProps extends HTMLAttributes<HTMLDivElement>, DialogContentClassNameOptions {
4
+ ref?: Ref<HTMLDivElement>;
4
5
  }
5
6
  /**
6
7
  * The `DialogContent` component should be used as a child of the `Dialog`
@@ -9,4 +10,4 @@ export interface DialogContentProps extends HTMLAttributes<HTMLDivElement>, Dial
9
10
  *
10
11
  * @see {@link https://react-md.dev/components/dialog | Dialog Demos}
11
12
  */
12
- export declare const DialogContent: import("react").ForwardRefExoticComponent<DialogContentProps & import("react").RefAttributes<HTMLDivElement>>;
13
+ export declare function DialogContent(props: DialogContentProps): ReactElement;
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
2
  import { dialogContent } from "./styles.js";
4
3
  /**
5
4
  * The `DialogContent` component should be used as a child of the `Dialog`
@@ -7,8 +6,8 @@ import { dialogContent } from "./styles.js";
7
6
  * or `FixedDialog` components for example usage.
8
7
  *
9
8
  * @see {@link https://react-md.dev/components/dialog | Dialog Demos}
10
- */ export const DialogContent = /*#__PURE__*/ forwardRef(function DialogContent(props, ref) {
11
- const { children, className, disablePadding = false, ...remaining } = props;
9
+ */ export function DialogContent(props) {
10
+ const { ref, children, className, disablePadding = false, ...remaining } = props;
12
11
  return /*#__PURE__*/ _jsx("div", {
13
12
  ...remaining,
14
13
  ref: ref,
@@ -18,6 +17,6 @@ import { dialogContent } from "./styles.js";
18
17
  }),
19
18
  children: children
20
19
  });
21
- });
20
+ }
22
21
 
23
22
  //# sourceMappingURL=DialogContent.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/dialog/DialogContent.tsx"],"sourcesContent":["import { type HTMLAttributes, forwardRef } from \"react\";\n\nimport { type DialogContentClassNameOptions, dialogContent } from \"./styles.js\";\n\nexport interface DialogContentProps\n extends HTMLAttributes<HTMLDivElement>, DialogContentClassNameOptions {}\n\n/**\n * The `DialogContent` component should be used as a child of the `Dialog`\n * component that applies some reasonable default styles. Look at the `Dialog`\n * or `FixedDialog` components for example usage.\n *\n * @see {@link https://react-md.dev/components/dialog | Dialog Demos}\n */\nexport const DialogContent = forwardRef<HTMLDivElement, DialogContentProps>(\n function DialogContent(props, ref) {\n const { children, className, disablePadding = false, ...remaining } = props;\n return (\n <div\n {...remaining}\n ref={ref}\n className={dialogContent({\n className,\n disablePadding,\n })}\n >\n {children}\n </div>\n );\n }\n);\n"],"names":["forwardRef","dialogContent","DialogContent","props","ref","children","className","disablePadding","remaining","div"],"mappings":";AAAA,SAA8BA,UAAU,QAAQ,QAAQ;AAExD,SAA6CC,aAAa,QAAQ,cAAc;AAKhF;;;;;;CAMC,GACD,OAAO,MAAMC,8BAAgBF,WAC3B,SAASE,cAAcC,KAAK,EAAEC,GAAG;IAC/B,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,iBAAiB,KAAK,EAAE,GAAGC,WAAW,GAAGL;IACtE,qBACE,KAACM;QACE,GAAGD,SAAS;QACbJ,KAAKA;QACLE,WAAWL,cAAc;YACvBK;YACAC;QACF;kBAECF;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/dialog/DialogContent.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactElement, type Ref } from \"react\";\n\nimport { type DialogContentClassNameOptions, dialogContent } from \"./styles.js\";\n\nexport interface DialogContentProps\n extends HTMLAttributes<HTMLDivElement>, DialogContentClassNameOptions {\n ref?: Ref<HTMLDivElement>;\n}\n\n/**\n * The `DialogContent` component should be used as a child of the `Dialog`\n * component that applies some reasonable default styles. Look at the `Dialog`\n * or `FixedDialog` components for example usage.\n *\n * @see {@link https://react-md.dev/components/dialog | Dialog Demos}\n */\nexport function DialogContent(props: DialogContentProps): ReactElement {\n const {\n ref,\n children,\n className,\n disablePadding = false,\n ...remaining\n } = props;\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={dialogContent({\n className,\n disablePadding,\n })}\n >\n {children}\n </div>\n );\n}\n"],"names":["dialogContent","DialogContent","props","ref","children","className","disablePadding","remaining","div"],"mappings":";AAEA,SAA6CA,aAAa,QAAQ,cAAc;AAOhF;;;;;;CAMC,GACD,OAAO,SAASC,cAAcC,KAAyB;IACrD,MAAM,EACJC,GAAG,EACHC,QAAQ,EACRC,SAAS,EACTC,iBAAiB,KAAK,EACtB,GAAGC,WACJ,GAAGL;IAEJ,qBACE,KAACM;QACE,GAAGD,SAAS;QACbJ,KAAKA;QACLE,WAAWL,cAAc;YACvBK;YACAC;QACF;kBAECF;;AAGP"}
@@ -1,6 +1,7 @@
1
- import { type HTMLAttributes } from "react";
1
+ import { type HTMLAttributes, type ReactElement, type Ref } from "react";
2
2
  import { type DialogFooterClassNameOptions } from "./styles.js";
3
3
  export interface DialogFooterProps extends HTMLAttributes<HTMLDivElement>, DialogFooterClassNameOptions {
4
+ ref?: Ref<HTMLDivElement>;
4
5
  }
5
6
  /**
6
7
  * The `DialogFooter` is a simple `<footer>` with simple `display: flex` styles
@@ -8,4 +9,4 @@ export interface DialogFooterProps extends HTMLAttributes<HTMLDivElement>, Dialo
8
9
  *
9
10
  * @see {@link https://react-md.dev/components/dialog | Dialog Demos}
10
11
  */
11
- export declare const DialogFooter: import("react").ForwardRefExoticComponent<DialogFooterProps & import("react").RefAttributes<HTMLDivElement>>;
12
+ export declare const DialogFooter: (props: DialogFooterProps) => ReactElement;
@@ -1,13 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
2
  import { dialogFooter } from "./styles.js";
4
3
  /**
5
4
  * The `DialogFooter` is a simple `<footer>` with simple `display: flex` styles
6
5
  * applied. Look at the `Dialog` or `FixedDialog` components for example usage.
7
6
  *
8
7
  * @see {@link https://react-md.dev/components/dialog | Dialog Demos}
9
- */ export const DialogFooter = /*#__PURE__*/ forwardRef(function DialogFooter(props, ref) {
10
- const { children, className, align = "end", ...remaining } = props;
8
+ */ export const DialogFooter = function DialogFooter(props) {
9
+ const { ref, children, className, align = "end", ...remaining } = props;
11
10
  return /*#__PURE__*/ _jsx("footer", {
12
11
  ...remaining,
13
12
  ref: ref,
@@ -17,6 +16,6 @@ import { dialogFooter } from "./styles.js";
17
16
  }),
18
17
  children: children
19
18
  });
20
- });
19
+ };
21
20
 
22
21
  //# sourceMappingURL=DialogFooter.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/dialog/DialogFooter.tsx"],"sourcesContent":["import { type HTMLAttributes, forwardRef } from \"react\";\n\nimport { type DialogFooterClassNameOptions, dialogFooter } from \"./styles.js\";\n\nexport interface DialogFooterProps\n extends HTMLAttributes<HTMLDivElement>, DialogFooterClassNameOptions {}\n\n/**\n * The `DialogFooter` is a simple `<footer>` with simple `display: flex` styles\n * applied. Look at the `Dialog` or `FixedDialog` components for example usage.\n *\n * @see {@link https://react-md.dev/components/dialog | Dialog Demos}\n */\nexport const DialogFooter = forwardRef<HTMLDivElement, DialogFooterProps>(\n function DialogFooter(props, ref) {\n const { children, className, align = \"end\", ...remaining } = props;\n return (\n <footer\n {...remaining}\n ref={ref}\n className={dialogFooter({\n align,\n className,\n })}\n >\n {children}\n </footer>\n );\n }\n);\n"],"names":["forwardRef","dialogFooter","DialogFooter","props","ref","children","className","align","remaining","footer"],"mappings":";AAAA,SAA8BA,UAAU,QAAQ,QAAQ;AAExD,SAA4CC,YAAY,QAAQ,cAAc;AAK9E;;;;;CAKC,GACD,OAAO,MAAMC,6BAAeF,WAC1B,SAASE,aAAaC,KAAK,EAAEC,GAAG;IAC9B,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,KAAK,EAAE,GAAGC,WAAW,GAAGL;IAC7D,qBACE,KAACM;QACE,GAAGD,SAAS;QACbJ,KAAKA;QACLE,WAAWL,aAAa;YACtBM;YACAD;QACF;kBAECD;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/dialog/DialogFooter.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactElement, type Ref } from \"react\";\n\nimport { type DialogFooterClassNameOptions, dialogFooter } from \"./styles.js\";\n\nexport interface DialogFooterProps\n extends HTMLAttributes<HTMLDivElement>, DialogFooterClassNameOptions {\n ref?: Ref<HTMLDivElement>;\n}\n\n/**\n * The `DialogFooter` is a simple `<footer>` with simple `display: flex` styles\n * applied. Look at the `Dialog` or `FixedDialog` components for example usage.\n *\n * @see {@link https://react-md.dev/components/dialog | Dialog Demos}\n */\nexport const DialogFooter = function DialogFooter(\n props: DialogFooterProps\n): ReactElement {\n const { ref, children, className, align = \"end\", ...remaining } = props;\n\n return (\n <footer\n {...remaining}\n ref={ref}\n className={dialogFooter({\n align,\n className,\n })}\n >\n {children}\n </footer>\n );\n};\n"],"names":["dialogFooter","DialogFooter","props","ref","children","className","align","remaining","footer"],"mappings":";AAEA,SAA4CA,YAAY,QAAQ,cAAc;AAO9E;;;;;CAKC,GACD,OAAO,MAAMC,eAAe,SAASA,aACnCC,KAAwB;IAExB,MAAM,EAAEC,GAAG,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,KAAK,EAAE,GAAGC,WAAW,GAAGL;IAElE,qBACE,KAACM;QACE,GAAGD,SAAS;QACbJ,KAAKA;QACLE,WAAWL,aAAa;YACtBM;YACAD;QACF;kBAECD;;AAGP,EAAE"}
@@ -1,9 +1,11 @@
1
+ import { type ReactElement, type Ref } from "react";
1
2
  import { type BoxProps } from "../box/Box.js";
2
3
  import { type BoxAlignItems } from "../box/styles.js";
3
4
  /**
4
5
  * @since 6.0.0 Extends the `BoxProps`.
5
6
  */
6
7
  export interface DialogHeaderProps extends BoxProps {
8
+ ref?: Ref<HTMLDivElement>;
7
9
  /** @defaultValue `"center"` */
8
10
  align?: BoxAlignItems;
9
11
  /** @defaultValue `true` */
@@ -17,4 +19,4 @@ export interface DialogHeaderProps extends BoxProps {
17
19
  * @see {@link https://react-md.dev/components/dialog | Dialog Demos}
18
20
  * @since 6.0.0 Extends the `Box` component.
19
21
  */
20
- export declare const DialogHeader: import("react").ForwardRefExoticComponent<DialogHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
22
+ export declare function DialogHeader(props: DialogHeaderProps): ReactElement;
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
2
  import { Box } from "../box/Box.js";
4
3
  import { dialogHeader } from "./styles.js";
5
4
  /**
@@ -9,8 +8,8 @@ import { dialogHeader } from "./styles.js";
9
8
  *
10
9
  * @see {@link https://react-md.dev/components/dialog | Dialog Demos}
11
10
  * @since 6.0.0 Extends the `Box` component.
12
- */ export const DialogHeader = /*#__PURE__*/ forwardRef(function DialogHeader(props, ref) {
13
- const { align = "center", disableWrap = true, children, className, ...remaining } = props;
11
+ */ export function DialogHeader(props) {
12
+ const { ref, align = "center", disableWrap = true, children, className, ...remaining } = props;
14
13
  return /*#__PURE__*/ _jsx(Box, {
15
14
  ...remaining,
16
15
  align: align,
@@ -21,6 +20,6 @@ import { dialogHeader } from "./styles.js";
21
20
  }),
22
21
  children: children
23
22
  });
24
- });
23
+ }
25
24
 
26
25
  //# sourceMappingURL=DialogHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/dialog/DialogHeader.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\n\nimport { Box, type BoxProps } from \"../box/Box.js\";\nimport { type BoxAlignItems } from \"../box/styles.js\";\nimport { dialogHeader } from \"./styles.js\";\n\n/**\n * @since 6.0.0 Extends the `BoxProps`.\n */\nexport interface DialogHeaderProps extends BoxProps {\n /** @defaultValue `\"center\"` */\n align?: BoxAlignItems;\n\n /** @defaultValue `true` */\n disableWrap?: boolean;\n}\n\n/**\n * The `DialogHeader` component should be rendered within a `Dialog` component\n * and generally contains the `DialogTitle`. Look at the `Dialog` or\n * `FixedDialog` components for example usage.\n *\n * @see {@link https://react-md.dev/components/dialog | Dialog Demos}\n * @since 6.0.0 Extends the `Box` component.\n */\nexport const DialogHeader = forwardRef<HTMLDivElement, DialogHeaderProps>(\n function DialogHeader(props, ref) {\n const {\n align = \"center\",\n disableWrap = true,\n children,\n className,\n ...remaining\n } = props;\n\n return (\n <Box\n {...remaining}\n align={align}\n disableWrap={disableWrap}\n ref={ref}\n className={dialogHeader({ className })}\n >\n {children}\n </Box>\n );\n }\n);\n"],"names":["forwardRef","Box","dialogHeader","DialogHeader","props","ref","align","disableWrap","children","className","remaining"],"mappings":";AAAA,SAASA,UAAU,QAAQ,QAAQ;AAEnC,SAASC,GAAG,QAAuB,gBAAgB;AAEnD,SAASC,YAAY,QAAQ,cAAc;AAa3C;;;;;;;CAOC,GACD,OAAO,MAAMC,6BAAeH,WAC1B,SAASG,aAAaC,KAAK,EAAEC,GAAG;IAC9B,MAAM,EACJC,QAAQ,QAAQ,EAChBC,cAAc,IAAI,EAClBC,QAAQ,EACRC,SAAS,EACT,GAAGC,WACJ,GAAGN;IAEJ,qBACE,KAACH;QACE,GAAGS,SAAS;QACbJ,OAAOA;QACPC,aAAaA;QACbF,KAAKA;QACLI,WAAWP,aAAa;YAAEO;QAAU;kBAEnCD;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/dialog/DialogHeader.tsx"],"sourcesContent":["import { type ReactElement, type Ref } from \"react\";\n\nimport { Box, type BoxProps } from \"../box/Box.js\";\nimport { type BoxAlignItems } from \"../box/styles.js\";\nimport { dialogHeader } from \"./styles.js\";\n\n/**\n * @since 6.0.0 Extends the `BoxProps`.\n */\nexport interface DialogHeaderProps extends BoxProps {\n ref?: Ref<HTMLDivElement>;\n\n /** @defaultValue `\"center\"` */\n align?: BoxAlignItems;\n\n /** @defaultValue `true` */\n disableWrap?: boolean;\n}\n\n/**\n * The `DialogHeader` component should be rendered within a `Dialog` component\n * and generally contains the `DialogTitle`. Look at the `Dialog` or\n * `FixedDialog` components for example usage.\n *\n * @see {@link https://react-md.dev/components/dialog | Dialog Demos}\n * @since 6.0.0 Extends the `Box` component.\n */\nexport function DialogHeader(props: DialogHeaderProps): ReactElement {\n const {\n ref,\n align = \"center\",\n disableWrap = true,\n children,\n className,\n ...remaining\n } = props;\n\n return (\n <Box\n {...remaining}\n align={align}\n disableWrap={disableWrap}\n ref={ref}\n className={dialogHeader({ className })}\n >\n {children}\n </Box>\n );\n}\n"],"names":["Box","dialogHeader","DialogHeader","props","ref","align","disableWrap","children","className","remaining"],"mappings":";AAEA,SAASA,GAAG,QAAuB,gBAAgB;AAEnD,SAASC,YAAY,QAAQ,cAAc;AAe3C;;;;;;;CAOC,GACD,OAAO,SAASC,aAAaC,KAAwB;IACnD,MAAM,EACJC,GAAG,EACHC,QAAQ,QAAQ,EAChBC,cAAc,IAAI,EAClBC,QAAQ,EACRC,SAAS,EACT,GAAGC,WACJ,GAAGN;IAEJ,qBACE,KAACH;QACE,GAAGS,SAAS;QACbJ,OAAOA;QACPC,aAAaA;QACbF,KAAKA;QACLI,WAAWP,aAAa;YAAEO;QAAU;kBAEnCD;;AAGP"}
@@ -1,3 +1,4 @@
1
+ import { type ReactElement, type Ref } from "react";
1
2
  import { type Margin } from "../cssUtils.js";
2
3
  import { type CustomTypographyComponent, type TypographyProps } from "../typography/Typography.js";
3
4
  import { type TypographyType } from "../typography/typographyStyles.js";
@@ -6,6 +7,7 @@ import { type TypographyType } from "../typography/typographyStyles.js";
6
7
  * `HTMLAttributes<HTMLHeadingElement>`.
7
8
  */
8
9
  export interface DialogTitleProps extends TypographyProps {
10
+ ref?: Ref<HTMLHeadingElement>;
9
11
  /** @defaultValue `"h2"` */
10
12
  as?: CustomTypographyComponent;
11
13
  /** @defaultValue `"headline-4"` */
@@ -20,4 +22,4 @@ export interface DialogTitleProps extends TypographyProps {
20
22
  *
21
23
  * @see {@link https://react-md.dev/components/dialog | Dialog Demos}
22
24
  */
23
- export declare const DialogTitle: import("react").ForwardRefExoticComponent<DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
25
+ export declare function DialogTitle(props: DialogTitleProps): ReactElement;
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cnb } from "cnbuilder";
3
- import { forwardRef } from "react";
4
3
  import { Typography } from "../typography/Typography.js";
5
4
  /**
6
5
  * The `DialogTitle` component is a simple `Typography` component wrapper with
@@ -8,8 +7,8 @@ import { Typography } from "../typography/Typography.js";
8
7
  * `FixedDialog` components for example usage.
9
8
  *
10
9
  * @see {@link https://react-md.dev/components/dialog | Dialog Demos}
11
- */ export const DialogTitle = /*#__PURE__*/ forwardRef(function DialogTitle(props, ref) {
12
- const { as = "h2", type = "headline-4", margin = "none", children, className, ...remaining } = props;
10
+ */ export function DialogTitle(props) {
11
+ const { ref, as = "h2", type = "headline-4", margin = "none", children, className, ...remaining } = props;
13
12
  return /*#__PURE__*/ _jsx(Typography, {
14
13
  ...remaining,
15
14
  ref: ref,
@@ -20,6 +19,6 @@ import { Typography } from "../typography/Typography.js";
20
19
  className: cnb("rmd-dialog__title", className),
21
20
  children: children
22
21
  });
23
- });
22
+ }
24
23
 
25
24
  //# sourceMappingURL=DialogTitle.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/dialog/DialogTitle.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef } from \"react\";\n\nimport { type Margin } from \"../cssUtils.js\";\nimport {\n type CustomTypographyComponent,\n Typography,\n type TypographyProps,\n} from \"../typography/Typography.js\";\nimport { type TypographyType } from \"../typography/typographyStyles.js\";\n\n/**\n * @since 6.0.0 Inherits the `TypographyProps` instead of\n * `HTMLAttributes<HTMLHeadingElement>`.\n */\nexport interface DialogTitleProps extends TypographyProps {\n /** @defaultValue `\"h2\"` */\n as?: CustomTypographyComponent;\n\n /** @defaultValue `\"headline-4\"` */\n type?: TypographyType;\n\n /** @defaultValue `\"none\"` */\n margin?: Margin;\n}\n\n/**\n * The `DialogTitle` component is a simple `Typography` component wrapper with\n * sensible defaults to be rendered within a `Dialog`. Look at the `Dialog` or\n * `FixedDialog` components for example usage.\n *\n * @see {@link https://react-md.dev/components/dialog | Dialog Demos}\n */\nexport const DialogTitle = forwardRef<HTMLHeadingElement, DialogTitleProps>(\n function DialogTitle(props, ref) {\n const {\n as = \"h2\",\n type = \"headline-4\",\n margin = \"none\",\n children,\n className,\n ...remaining\n } = props;\n\n return (\n <Typography\n {...remaining}\n ref={ref}\n as={as}\n type={type}\n margin={margin}\n // Note: This class applies no styles at this time\n className={cnb(\"rmd-dialog__title\", className)}\n >\n {children}\n </Typography>\n );\n }\n);\n"],"names":["cnb","forwardRef","Typography","DialogTitle","props","ref","as","type","margin","children","className","remaining"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAQ,QAAQ;AAGnC,SAEEC,UAAU,QAEL,8BAA8B;AAkBrC;;;;;;CAMC,GACD,OAAO,MAAMC,4BAAcF,WACzB,SAASE,YAAYC,KAAK,EAAEC,GAAG;IAC7B,MAAM,EACJC,KAAK,IAAI,EACTC,OAAO,YAAY,EACnBC,SAAS,MAAM,EACfC,QAAQ,EACRC,SAAS,EACT,GAAGC,WACJ,GAAGP;IAEJ,qBACE,KAACF;QACE,GAAGS,SAAS;QACbN,KAAKA;QACLC,IAAIA;QACJC,MAAMA;QACNC,QAAQA;QACR,kDAAkD;QAClDE,WAAWV,IAAI,qBAAqBU;kBAEnCD;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/dialog/DialogTitle.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { type ReactElement, type Ref } from \"react\";\n\nimport { type Margin } from \"../cssUtils.js\";\nimport {\n type CustomTypographyComponent,\n Typography,\n type TypographyProps,\n} from \"../typography/Typography.js\";\nimport { type TypographyType } from \"../typography/typographyStyles.js\";\n\n/**\n * @since 6.0.0 Inherits the `TypographyProps` instead of\n * `HTMLAttributes<HTMLHeadingElement>`.\n */\nexport interface DialogTitleProps extends TypographyProps {\n ref?: Ref<HTMLHeadingElement>;\n\n /** @defaultValue `\"h2\"` */\n as?: CustomTypographyComponent;\n\n /** @defaultValue `\"headline-4\"` */\n type?: TypographyType;\n\n /** @defaultValue `\"none\"` */\n margin?: Margin;\n}\n\n/**\n * The `DialogTitle` component is a simple `Typography` component wrapper with\n * sensible defaults to be rendered within a `Dialog`. Look at the `Dialog` or\n * `FixedDialog` components for example usage.\n *\n * @see {@link https://react-md.dev/components/dialog | Dialog Demos}\n */\nexport function DialogTitle(props: DialogTitleProps): ReactElement {\n const {\n ref,\n as = \"h2\",\n type = \"headline-4\",\n margin = \"none\",\n children,\n className,\n ...remaining\n } = props;\n\n return (\n <Typography\n {...remaining}\n ref={ref}\n as={as}\n type={type}\n margin={margin}\n // Note: This class applies no styles at this time\n className={cnb(\"rmd-dialog__title\", className)}\n >\n {children}\n </Typography>\n );\n}\n"],"names":["cnb","Typography","DialogTitle","props","ref","as","type","margin","children","className","remaining"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAIhC,SAEEC,UAAU,QAEL,8BAA8B;AAoBrC;;;;;;CAMC,GACD,OAAO,SAASC,YAAYC,KAAuB;IACjD,MAAM,EACJC,GAAG,EACHC,KAAK,IAAI,EACTC,OAAO,YAAY,EACnBC,SAAS,MAAM,EACfC,QAAQ,EACRC,SAAS,EACT,GAAGC,WACJ,GAAGP;IAEJ,qBACE,KAACF;QACE,GAAGS,SAAS;QACbN,KAAKA;QACLC,IAAIA;QACJC,MAAMA;QACNC,QAAQA;QACR,kDAAkD;QAClDE,WAAWT,IAAI,qBAAqBS;kBAEnCD;;AAGP"}
@@ -1,10 +1,11 @@
1
- import { type RefObject } from "react";
1
+ import { type ReactElement, type Ref, type RefObject } from "react";
2
2
  import { type CalculateFixedPositionOptions, type PositionAnchor } from "../positioning/types.js";
3
3
  import { type LabelRequiredForA11y } from "../types.js";
4
4
  import { type BaseDialogProps } from "./Dialog.js";
5
5
  export interface BaseFixedDialogProps extends Omit<BaseDialogProps, "type"> {
6
+ ref?: Ref<HTMLDivElement>;
6
7
  anchor?: PositionAnchor;
7
- fixedTo: RefObject<HTMLElement>;
8
+ fixedTo: RefObject<HTMLElement | null>;
8
9
  options?: CalculateFixedPositionOptions;
9
10
  getFixedPositionOptions?: () => CalculateFixedPositionOptions;
10
11
  /**
@@ -70,4 +71,4 @@ export type FixedDialogProps = LabelRequiredForA11y<BaseFixedDialogProps>;
70
71
  *
71
72
  * @see {@link https://react-md.dev/components/dialog#fixed-dialog | FixedDialog Demos}
72
73
  */
73
- export declare const FixedDialog: import("react").ForwardRefExoticComponent<FixedDialogProps & import("react").RefAttributes<HTMLDivElement>>;
74
+ export declare function FixedDialog(props: FixedDialogProps): ReactElement;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { forwardRef, useRef } from "react";
3
+ import { useRef } from "react";
4
4
  import { TOP_INNER_RIGHT_ANCHOR } from "../positioning/constants.js";
5
5
  import { useFixedPositioning } from "../positioning/useFixedPositioning.js";
6
6
  import { DEFAULT_SCALE_CLASSNAMES } from "../transition/useScaleTransition.js";
@@ -60,8 +60,8 @@ const noop = ()=>{
60
60
  * ```
61
61
  *
62
62
  * @see {@link https://react-md.dev/components/dialog#fixed-dialog | FixedDialog Demos}
63
- */ export const FixedDialog = /*#__PURE__*/ forwardRef(function FixedDialog(props, nodeRef) {
64
- const { fixedTo, style: propStyle, classNames = DEFAULT_SCALE_CLASSNAMES, children, anchor = TOP_INNER_RIGHT_ANCHOR, options, getFixedPositionOptions, onEnter = noop, onEntering, onEntered = noop, onExited, onRequestClose, overlayHidden = true, disableScrollLock = true, isFocusTypeDisabled = noop, ...remaining } = props;
63
+ */ export function FixedDialog(props) {
64
+ const { ref: nodeRef, fixedTo, style: propStyle, classNames = DEFAULT_SCALE_CLASSNAMES, children, anchor = TOP_INNER_RIGHT_ANCHOR, options, getFixedPositionOptions, onEnter = noop, onEntering, onEntered = noop, onExited, onRequestClose, overlayHidden = true, disableScrollLock = true, isFocusTypeDisabled = noop, ...remaining } = props;
65
65
  const disableExitFocus = useRef(false);
66
66
  const { ref, style, callbacks } = useFixedPositioning({
67
67
  nodeRef,
@@ -101,6 +101,6 @@ const noop = ()=>{
101
101
  isFocusTypeDisabled: (type)=>isFocusTypeDisabled(type) || type === "unmount" && disableExitFocus.current,
102
102
  children: children
103
103
  });
104
- });
104
+ }
105
105
 
106
106
  //# sourceMappingURL=FixedDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/dialog/FixedDialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { type RefObject, forwardRef, useRef } from \"react\";\n\nimport { TOP_INNER_RIGHT_ANCHOR } from \"../positioning/constants.js\";\nimport {\n type CalculateFixedPositionOptions,\n type PositionAnchor,\n} from \"../positioning/types.js\";\nimport { useFixedPositioning } from \"../positioning/useFixedPositioning.js\";\nimport { DEFAULT_SCALE_CLASSNAMES } from \"../transition/useScaleTransition.js\";\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { type BaseDialogProps, Dialog } from \"./Dialog.js\";\n\nexport interface BaseFixedDialogProps extends Omit<BaseDialogProps, \"type\"> {\n anchor?: PositionAnchor;\n fixedTo: RefObject<HTMLElement>;\n options?: CalculateFixedPositionOptions;\n getFixedPositionOptions?: () => CalculateFixedPositionOptions;\n\n /**\n * @defaultValue `true`\n */\n overlayHidden?: boolean;\n\n /**\n * @defaultValue `true`\n */\n disableScrollLock?: boolean;\n}\n\nexport type FixedDialogProps = LabelRequiredForA11y<BaseFixedDialogProps>;\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * **Client Component**\n *\n * @example Simple Example\n * ```tsx\n * import { Button } from \"@react-md/core/button/Button\";\n * import { Dialog } from \"@react-md/core/dialog/Dialog\";\n * import { DialogContent } from \"@react-md/core/dialog/DialogContent\";\n * import { DialogFooter } from \"@react-md/core/dialog/DialogFooter\";\n * import { DialogHeader } from \"@react-md/core/dialog/DialogHeader\";\n * import { DialogTitle } from \"@react-md/core/dialog/DialogTitle\";\n * import { FixedDialog } from \"@react-md/core/dialog/FixedDialog\";\n * import { Typography } from \"@react-md/core/typography/Typography\";\n * import { useToggle } from \"@react-md/core/useToggle\";\n * import { useId, useRef, type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const {\n * toggle,\n * disable: onRequestClose,\n * toggled: visible,\n * } = useToggle(false);\n * const titleId = useId();\n * const fixedTo = useRef<HTMLButtonElement>(null)\n *\n * return (\n * <>\n * <Button ref={fixedTo} onClick={toggle}>Toggle</Button>\n * <FixedDialog\n * aria-labelledby={titleId}\n * fixedTo={fixedTo}\n * visible={visible}\n * onRequestClose={onRequestClose}\n * >\n * <DialogHeader>\n * <DialogTitle id={titleId}>Simple Dialog</DialogTitle>\n * </DialogHeader>\n * <DialogContent>\n * <Typography margin=\"none\">This is some text in a dialog.</Typography>\n * </DialogContent>\n * <DialogFooter>\n * <Button onClick={onRequestClose}>\n * Close\n * </Button>\n * </DialogFooter>\n * </FixedDialog>\n * </>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/dialog#fixed-dialog | FixedDialog Demos}\n */\nexport const FixedDialog = forwardRef<HTMLDivElement, FixedDialogProps>(\n function FixedDialog(props, nodeRef) {\n const {\n fixedTo,\n style: propStyle,\n classNames = DEFAULT_SCALE_CLASSNAMES,\n children,\n anchor = TOP_INNER_RIGHT_ANCHOR,\n options,\n getFixedPositionOptions,\n onEnter = noop,\n onEntering,\n onEntered = noop,\n onExited,\n onRequestClose,\n overlayHidden = true,\n disableScrollLock = true,\n isFocusTypeDisabled = noop,\n ...remaining\n } = props;\n\n const disableExitFocus = useRef(false);\n const { ref, style, callbacks } = useFixedPositioning({\n nodeRef,\n style: propStyle,\n transformOrigin: true,\n onEnter(appearing) {\n onEnter(appearing);\n disableExitFocus.current = false;\n },\n onEntering,\n onEntered(appearing) {\n onEntered(appearing);\n disableExitFocus.current = false;\n },\n onExited,\n anchor,\n fixedTo,\n onScroll(_event, data) {\n if (!data.visible) {\n disableExitFocus.current = true;\n onRequestClose();\n }\n },\n ...options,\n getFixedPositionOptions,\n });\n\n return (\n <Dialog\n {...remaining}\n {...callbacks}\n ref={ref}\n type=\"custom\"\n style={style}\n classNames={classNames}\n onRequestClose={onRequestClose}\n overlayHidden={overlayHidden}\n disableScrollLock={disableScrollLock}\n isFocusTypeDisabled={(type) =>\n isFocusTypeDisabled(type) ||\n (type === \"unmount\" && disableExitFocus.current)\n }\n >\n {children}\n </Dialog>\n );\n }\n);\n"],"names":["forwardRef","useRef","TOP_INNER_RIGHT_ANCHOR","useFixedPositioning","DEFAULT_SCALE_CLASSNAMES","Dialog","noop","FixedDialog","props","nodeRef","fixedTo","style","propStyle","classNames","children","anchor","options","getFixedPositionOptions","onEnter","onEntering","onEntered","onExited","onRequestClose","overlayHidden","disableScrollLock","isFocusTypeDisabled","remaining","disableExitFocus","ref","callbacks","transformOrigin","appearing","current","onScroll","_event","data","visible","type"],"mappings":"AAAA;;AAEA,SAAyBA,UAAU,EAAEC,MAAM,QAAQ,QAAQ;AAE3D,SAASC,sBAAsB,QAAQ,8BAA8B;AAKrE,SAASC,mBAAmB,QAAQ,wCAAwC;AAC5E,SAASC,wBAAwB,QAAQ,sCAAsC;AAE/E,SAA+BC,MAAM,QAAQ,cAAc;AAqB3D,MAAMC,OAAO;AACX,aAAa;AACf;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDC,GACD,OAAO,MAAMC,4BAAcP,WACzB,SAASO,YAAYC,KAAK,EAAEC,OAAO;IACjC,MAAM,EACJC,OAAO,EACPC,OAAOC,SAAS,EAChBC,aAAaT,wBAAwB,EACrCU,QAAQ,EACRC,SAASb,sBAAsB,EAC/Bc,OAAO,EACPC,uBAAuB,EACvBC,UAAUZ,IAAI,EACda,UAAU,EACVC,YAAYd,IAAI,EAChBe,QAAQ,EACRC,cAAc,EACdC,gBAAgB,IAAI,EACpBC,oBAAoB,IAAI,EACxBC,sBAAsBnB,IAAI,EAC1B,GAAGoB,WACJ,GAAGlB;IAEJ,MAAMmB,mBAAmB1B,OAAO;IAChC,MAAM,EAAE2B,GAAG,EAAEjB,KAAK,EAAEkB,SAAS,EAAE,GAAG1B,oBAAoB;QACpDM;QACAE,OAAOC;QACPkB,iBAAiB;QACjBZ,SAAQa,SAAS;YACfb,QAAQa;YACRJ,iBAAiBK,OAAO,GAAG;QAC7B;QACAb;QACAC,WAAUW,SAAS;YACjBX,UAAUW;YACVJ,iBAAiBK,OAAO,GAAG;QAC7B;QACAX;QACAN;QACAL;QACAuB,UAASC,MAAM,EAAEC,IAAI;YACnB,IAAI,CAACA,KAAKC,OAAO,EAAE;gBACjBT,iBAAiBK,OAAO,GAAG;gBAC3BV;YACF;QACF;QACA,GAAGN,OAAO;QACVC;IACF;IAEA,qBACE,KAACZ;QACE,GAAGqB,SAAS;QACZ,GAAGG,SAAS;QACbD,KAAKA;QACLS,MAAK;QACL1B,OAAOA;QACPE,YAAYA;QACZS,gBAAgBA;QAChBC,eAAeA;QACfC,mBAAmBA;QACnBC,qBAAqB,CAACY,OACpBZ,oBAAoBY,SACnBA,SAAS,aAAaV,iBAAiBK,OAAO;kBAGhDlB;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/dialog/FixedDialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactElement, type Ref, type RefObject, useRef } from \"react\";\n\nimport { TOP_INNER_RIGHT_ANCHOR } from \"../positioning/constants.js\";\nimport {\n type CalculateFixedPositionOptions,\n type PositionAnchor,\n} from \"../positioning/types.js\";\nimport { useFixedPositioning } from \"../positioning/useFixedPositioning.js\";\nimport { DEFAULT_SCALE_CLASSNAMES } from \"../transition/useScaleTransition.js\";\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { type BaseDialogProps, Dialog } from \"./Dialog.js\";\n\nexport interface BaseFixedDialogProps extends Omit<BaseDialogProps, \"type\"> {\n ref?: Ref<HTMLDivElement>;\n\n anchor?: PositionAnchor;\n fixedTo: RefObject<HTMLElement | null>;\n options?: CalculateFixedPositionOptions;\n getFixedPositionOptions?: () => CalculateFixedPositionOptions;\n\n /**\n * @defaultValue `true`\n */\n overlayHidden?: boolean;\n\n /**\n * @defaultValue `true`\n */\n disableScrollLock?: boolean;\n}\n\nexport type FixedDialogProps = LabelRequiredForA11y<BaseFixedDialogProps>;\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * **Client Component**\n *\n * @example Simple Example\n * ```tsx\n * import { Button } from \"@react-md/core/button/Button\";\n * import { Dialog } from \"@react-md/core/dialog/Dialog\";\n * import { DialogContent } from \"@react-md/core/dialog/DialogContent\";\n * import { DialogFooter } from \"@react-md/core/dialog/DialogFooter\";\n * import { DialogHeader } from \"@react-md/core/dialog/DialogHeader\";\n * import { DialogTitle } from \"@react-md/core/dialog/DialogTitle\";\n * import { FixedDialog } from \"@react-md/core/dialog/FixedDialog\";\n * import { Typography } from \"@react-md/core/typography/Typography\";\n * import { useToggle } from \"@react-md/core/useToggle\";\n * import { useId, useRef, type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const {\n * toggle,\n * disable: onRequestClose,\n * toggled: visible,\n * } = useToggle(false);\n * const titleId = useId();\n * const fixedTo = useRef<HTMLButtonElement>(null)\n *\n * return (\n * <>\n * <Button ref={fixedTo} onClick={toggle}>Toggle</Button>\n * <FixedDialog\n * aria-labelledby={titleId}\n * fixedTo={fixedTo}\n * visible={visible}\n * onRequestClose={onRequestClose}\n * >\n * <DialogHeader>\n * <DialogTitle id={titleId}>Simple Dialog</DialogTitle>\n * </DialogHeader>\n * <DialogContent>\n * <Typography margin=\"none\">This is some text in a dialog.</Typography>\n * </DialogContent>\n * <DialogFooter>\n * <Button onClick={onRequestClose}>\n * Close\n * </Button>\n * </DialogFooter>\n * </FixedDialog>\n * </>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/dialog#fixed-dialog | FixedDialog Demos}\n */\nexport function FixedDialog(props: FixedDialogProps): ReactElement {\n const {\n ref: nodeRef,\n fixedTo,\n style: propStyle,\n classNames = DEFAULT_SCALE_CLASSNAMES,\n children,\n anchor = TOP_INNER_RIGHT_ANCHOR,\n options,\n getFixedPositionOptions,\n onEnter = noop,\n onEntering,\n onEntered = noop,\n onExited,\n onRequestClose,\n overlayHidden = true,\n disableScrollLock = true,\n isFocusTypeDisabled = noop,\n ...remaining\n } = props;\n\n const disableExitFocus = useRef(false);\n const { ref, style, callbacks } = useFixedPositioning({\n nodeRef,\n style: propStyle,\n transformOrigin: true,\n onEnter(appearing) {\n onEnter(appearing);\n disableExitFocus.current = false;\n },\n onEntering,\n onEntered(appearing) {\n onEntered(appearing);\n disableExitFocus.current = false;\n },\n onExited,\n anchor,\n fixedTo,\n onScroll(_event, data) {\n if (!data.visible) {\n disableExitFocus.current = true;\n onRequestClose();\n }\n },\n ...options,\n getFixedPositionOptions,\n });\n\n return (\n <Dialog\n {...remaining}\n {...callbacks}\n ref={ref}\n type=\"custom\"\n style={style}\n classNames={classNames}\n onRequestClose={onRequestClose}\n overlayHidden={overlayHidden}\n disableScrollLock={disableScrollLock}\n isFocusTypeDisabled={(type) =>\n isFocusTypeDisabled(type) ||\n (type === \"unmount\" && disableExitFocus.current)\n }\n >\n {children}\n </Dialog>\n );\n}\n"],"names":["useRef","TOP_INNER_RIGHT_ANCHOR","useFixedPositioning","DEFAULT_SCALE_CLASSNAMES","Dialog","noop","FixedDialog","props","ref","nodeRef","fixedTo","style","propStyle","classNames","children","anchor","options","getFixedPositionOptions","onEnter","onEntering","onEntered","onExited","onRequestClose","overlayHidden","disableScrollLock","isFocusTypeDisabled","remaining","disableExitFocus","callbacks","transformOrigin","appearing","current","onScroll","_event","data","visible","type"],"mappings":"AAAA;;AAEA,SAAsDA,MAAM,QAAQ,QAAQ;AAE5E,SAASC,sBAAsB,QAAQ,8BAA8B;AAKrE,SAASC,mBAAmB,QAAQ,wCAAwC;AAC5E,SAASC,wBAAwB,QAAQ,sCAAsC;AAE/E,SAA+BC,MAAM,QAAQ,cAAc;AAuB3D,MAAMC,OAAO;AACX,aAAa;AACf;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDC,GACD,OAAO,SAASC,YAAYC,KAAuB;IACjD,MAAM,EACJC,KAAKC,OAAO,EACZC,OAAO,EACPC,OAAOC,SAAS,EAChBC,aAAaV,wBAAwB,EACrCW,QAAQ,EACRC,SAASd,sBAAsB,EAC/Be,OAAO,EACPC,uBAAuB,EACvBC,UAAUb,IAAI,EACdc,UAAU,EACVC,YAAYf,IAAI,EAChBgB,QAAQ,EACRC,cAAc,EACdC,gBAAgB,IAAI,EACpBC,oBAAoB,IAAI,EACxBC,sBAAsBpB,IAAI,EAC1B,GAAGqB,WACJ,GAAGnB;IAEJ,MAAMoB,mBAAmB3B,OAAO;IAChC,MAAM,EAAEQ,GAAG,EAAEG,KAAK,EAAEiB,SAAS,EAAE,GAAG1B,oBAAoB;QACpDO;QACAE,OAAOC;QACPiB,iBAAiB;QACjBX,SAAQY,SAAS;YACfZ,QAAQY;YACRH,iBAAiBI,OAAO,GAAG;QAC7B;QACAZ;QACAC,WAAUU,SAAS;YACjBV,UAAUU;YACVH,iBAAiBI,OAAO,GAAG;QAC7B;QACAV;QACAN;QACAL;QACAsB,UAASC,MAAM,EAAEC,IAAI;YACnB,IAAI,CAACA,KAAKC,OAAO,EAAE;gBACjBR,iBAAiBI,OAAO,GAAG;gBAC3BT;YACF;QACF;QACA,GAAGN,OAAO;QACVC;IACF;IAEA,qBACE,KAACb;QACE,GAAGsB,SAAS;QACZ,GAAGE,SAAS;QACbpB,KAAKA;QACL4B,MAAK;QACLzB,OAAOA;QACPE,YAAYA;QACZS,gBAAgBA;QAChBC,eAAeA;QACfC,mBAAmBA;QACnBC,qBAAqB,CAACW,OACpBX,oBAAoBW,SACnBA,SAAS,aAAaT,iBAAiBI,OAAO;kBAGhDjB;;AAGP"}
@@ -1,10 +1,11 @@
1
- import { type HTMLAttributes } from "react";
1
+ import { type HTMLAttributes, type ReactElement, type Ref } from "react";
2
2
  import { type DividerClassNameOptions } from "./styles.js";
3
3
  export type DividerElement = HTMLHRElement | HTMLDivElement;
4
4
  /**
5
5
  * @since 6.0.0 Extends the {@link DividerClassNameOptions}
6
6
  */
7
7
  export interface DividerProps extends HTMLAttributes<DividerElement>, DividerClassNameOptions {
8
+ ref?: Ref<DividerElement>;
8
9
  }
9
10
  /**
10
11
  * @example Simple Example
@@ -19,4 +20,4 @@ export interface DividerProps extends HTMLAttributes<DividerElement>, DividerCla
19
20
  *
20
21
  * @see {@link https://react-md.dev/components/divider | Divider Demos}
21
22
  */
22
- export declare const Divider: import("react").ForwardRefExoticComponent<DividerProps & import("react").RefAttributes<DividerElement>>;
23
+ export declare function Divider(props: DividerProps): ReactElement;
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
2
  import { divider } from "./styles.js";
4
3
  /**
5
4
  * @example Simple Example
@@ -13,8 +12,8 @@ import { divider } from "./styles.js";
13
12
  * ```
14
13
  *
15
14
  * @see {@link https://react-md.dev/components/divider | Divider Demos}
16
- */ export const Divider = /*#__PURE__*/ forwardRef(function Divider(props, ref) {
17
- const { inset = false, vertical = false, role = "separator", className, ...remaining } = props;
15
+ */ export function Divider(props) {
16
+ const { ref, inset = false, vertical = false, role = "separator", className, ...remaining } = props;
18
17
  const Component = vertical ? "div" : "hr";
19
18
  return /*#__PURE__*/ _jsx(Component, {
20
19
  ...remaining,
@@ -26,6 +25,6 @@ import { divider } from "./styles.js";
26
25
  className
27
26
  })
28
27
  });
29
- });
28
+ }
30
29
 
31
30
  //# sourceMappingURL=Divider.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/divider/Divider.tsx"],"sourcesContent":["import { type ElementType, type HTMLAttributes, forwardRef } from \"react\";\n\nimport { type DividerClassNameOptions, divider } from \"./styles.js\";\n\nexport type DividerElement = HTMLHRElement | HTMLDivElement;\n\n/**\n * @since 6.0.0 Extends the {@link DividerClassNameOptions}\n */\nexport interface DividerProps\n extends HTMLAttributes<DividerElement>, DividerClassNameOptions {}\n\n/**\n * @example Simple Example\n * ```tsx\n * import { Divider } from \"@react-md/core/divider/Divider\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <Divider />;\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/divider | Divider Demos}\n */\nexport const Divider = forwardRef<DividerElement, DividerProps>(\n function Divider(props, ref) {\n const {\n inset = false,\n vertical = false,\n role = \"separator\",\n className,\n ...remaining\n } = props;\n\n const Component = (vertical ? \"div\" : \"hr\") as ElementType;\n\n return (\n <Component\n {...remaining}\n ref={ref}\n role={role}\n className={divider({\n inset,\n vertical,\n className,\n })}\n />\n );\n }\n);\n"],"names":["forwardRef","divider","Divider","props","ref","inset","vertical","role","className","remaining","Component"],"mappings":";AAAA,SAAgDA,UAAU,QAAQ,QAAQ;AAE1E,SAAuCC,OAAO,QAAQ,cAAc;AAUpE;;;;;;;;;;;;CAYC,GACD,OAAO,MAAMC,wBAAUF,WACrB,SAASE,QAAQC,KAAK,EAAEC,GAAG;IACzB,MAAM,EACJC,QAAQ,KAAK,EACbC,WAAW,KAAK,EAChBC,OAAO,WAAW,EAClBC,SAAS,EACT,GAAGC,WACJ,GAAGN;IAEJ,MAAMO,YAAaJ,WAAW,QAAQ;IAEtC,qBACE,KAACI;QACE,GAAGD,SAAS;QACbL,KAAKA;QACLG,MAAMA;QACNC,WAAWP,QAAQ;YACjBI;YACAC;YACAE;QACF;;AAGN,GACA"}
1
+ {"version":3,"sources":["../../src/divider/Divider.tsx"],"sourcesContent":["import {\n type ElementType,\n type HTMLAttributes,\n type ReactElement,\n type Ref,\n} from \"react\";\n\nimport { type DividerClassNameOptions, divider } from \"./styles.js\";\n\nexport type DividerElement = HTMLHRElement | HTMLDivElement;\n\n/**\n * @since 6.0.0 Extends the {@link DividerClassNameOptions}\n */\nexport interface DividerProps\n extends HTMLAttributes<DividerElement>, DividerClassNameOptions {\n ref?: Ref<DividerElement>;\n}\n\n/**\n * @example Simple Example\n * ```tsx\n * import { Divider } from \"@react-md/core/divider/Divider\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <Divider />;\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/divider | Divider Demos}\n */\nexport function Divider(props: DividerProps): ReactElement {\n const {\n ref,\n inset = false,\n vertical = false,\n role = \"separator\",\n className,\n ...remaining\n } = props;\n\n const Component = (vertical ? \"div\" : \"hr\") as ElementType;\n\n return (\n <Component\n {...remaining}\n ref={ref}\n role={role}\n className={divider({\n inset,\n vertical,\n className,\n })}\n />\n );\n}\n"],"names":["divider","Divider","props","ref","inset","vertical","role","className","remaining","Component"],"mappings":";AAOA,SAAuCA,OAAO,QAAQ,cAAc;AAYpE;;;;;;;;;;;;CAYC,GACD,OAAO,SAASC,QAAQC,KAAmB;IACzC,MAAM,EACJC,GAAG,EACHC,QAAQ,KAAK,EACbC,WAAW,KAAK,EAChBC,OAAO,WAAW,EAClBC,SAAS,EACT,GAAGC,WACJ,GAAGN;IAEJ,MAAMO,YAAaJ,WAAW,QAAQ;IAEtC,qBACE,KAACI;QACE,GAAGD,SAAS;QACbL,KAAKA;QACLG,MAAMA;QACNC,WAAWP,QAAQ;YACjBI;YACAC;YACAE;QACF;;AAGN"}
@@ -1,5 +1,5 @@
1
- import { type HTMLAttributes, type Ref, type RefCallback } from "react";
2
- import { type NonNullRef, type UseStateInitializer, type UseStateSetter } from "../types.js";
1
+ import { type HTMLAttributes, type Ref, type RefCallback, type RefObject } from "react";
2
+ import { type UseStateInitializer, type UseStateSetter } from "../types.js";
3
3
  /**
4
4
  * @since 6.0.0
5
5
  */
@@ -243,7 +243,7 @@ export interface DraggableImplementation<E extends HTMLElement = HTMLElement> ex
243
243
  * for manually persisting the value into local storage once the user has
244
244
  * stopped dragging.
245
245
  */
246
- draggedOnce: NonNullRef<boolean>;
246
+ draggedOnce: RefObject<boolean>;
247
247
  value: number;
248
248
  setValue: UseStateSetter<number>;
249
249
  dragging: boolean;