@react-md/core 6.0.0 → 6.0.2

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 (764) hide show
  1. package/dist/CoreProviders.d.ts +1 -1
  2. package/dist/CoreProviders.js +1 -1
  3. package/dist/CoreProviders.js.map +1 -1
  4. package/dist/SsrProvider.d.ts +1 -1
  5. package/dist/SsrProvider.js +1 -1
  6. package/dist/SsrProvider.js.map +1 -1
  7. package/dist/autocomplete/Autocomplete.d.ts +2 -2
  8. package/dist/autocomplete/Autocomplete.js +1 -1
  9. package/dist/autocomplete/Autocomplete.js.map +1 -1
  10. package/dist/autocomplete/AutocompleteChip.d.ts +1 -1
  11. package/dist/autocomplete/AutocompleteChip.js +1 -1
  12. package/dist/autocomplete/AutocompleteChip.js.map +1 -1
  13. package/dist/autocomplete/AutocompleteCircularProgress.d.ts +1 -1
  14. package/dist/autocomplete/AutocompleteCircularProgress.js +1 -1
  15. package/dist/autocomplete/AutocompleteCircularProgress.js.map +1 -1
  16. package/dist/autocomplete/AutocompleteClearButton.d.ts +1 -1
  17. package/dist/autocomplete/AutocompleteClearButton.js +1 -1
  18. package/dist/autocomplete/AutocompleteClearButton.js.map +1 -1
  19. package/dist/autocomplete/AutocompleteDropdownButton.d.ts +1 -1
  20. package/dist/autocomplete/AutocompleteDropdownButton.js +1 -1
  21. package/dist/autocomplete/AutocompleteDropdownButton.js.map +1 -1
  22. package/dist/autocomplete/_autocomplete.scss +8 -5
  23. package/dist/autocomplete/useAutocomplete.d.ts +3 -3
  24. package/dist/autocomplete/useAutocomplete.js +2 -1
  25. package/dist/autocomplete/useAutocomplete.js.map +1 -1
  26. package/dist/avatar/Avatar.d.ts +1 -1
  27. package/dist/avatar/Avatar.js +1 -1
  28. package/dist/avatar/Avatar.js.map +1 -1
  29. package/dist/badge/Badge.d.ts +1 -1
  30. package/dist/badge/Badge.js +1 -1
  31. package/dist/badge/Badge.js.map +1 -1
  32. package/dist/box/Box.d.ts +1 -1
  33. package/dist/box/Box.js +1 -1
  34. package/dist/box/Box.js.map +1 -1
  35. package/dist/box/_box.scss +1 -1
  36. package/dist/button/AsyncButton.d.ts +1 -1
  37. package/dist/button/AsyncButton.js +1 -1
  38. package/dist/button/AsyncButton.js.map +1 -1
  39. package/dist/button/Button.d.ts +1 -1
  40. package/dist/button/Button.js +1 -1
  41. package/dist/button/Button.js.map +1 -1
  42. package/dist/button/ButtonUnstyled.d.ts +1 -1
  43. package/dist/button/ButtonUnstyled.js +1 -1
  44. package/dist/button/ButtonUnstyled.js.map +1 -1
  45. package/dist/button/TooltippedButton.d.ts +1 -1
  46. package/dist/button/TooltippedButton.js +1 -1
  47. package/dist/button/TooltippedButton.js.map +1 -1
  48. package/dist/card/Card.d.ts +1 -1
  49. package/dist/card/Card.js +1 -1
  50. package/dist/card/Card.js.map +1 -1
  51. package/dist/card/CardContent.d.ts +1 -1
  52. package/dist/card/CardContent.js +1 -1
  53. package/dist/card/CardContent.js.map +1 -1
  54. package/dist/card/CardFooter.d.ts +1 -1
  55. package/dist/card/CardFooter.js +1 -1
  56. package/dist/card/CardFooter.js.map +1 -1
  57. package/dist/card/CardHeader.d.ts +1 -1
  58. package/dist/card/CardHeader.js +1 -1
  59. package/dist/card/CardHeader.js.map +1 -1
  60. package/dist/card/CardSubtitle.d.ts +1 -1
  61. package/dist/card/CardSubtitle.js +1 -1
  62. package/dist/card/CardSubtitle.js.map +1 -1
  63. package/dist/card/CardTitle.d.ts +1 -1
  64. package/dist/card/CardTitle.js +1 -1
  65. package/dist/card/CardTitle.js.map +1 -1
  66. package/dist/card/ClickableCard.d.ts +1 -1
  67. package/dist/card/ClickableCard.js +1 -1
  68. package/dist/card/ClickableCard.js.map +1 -1
  69. package/dist/chip/Chip.d.ts +1 -1
  70. package/dist/chip/Chip.js +1 -1
  71. package/dist/chip/Chip.js.map +1 -1
  72. package/dist/dialog/Dialog.d.ts +1 -1
  73. package/dist/dialog/Dialog.js +1 -1
  74. package/dist/dialog/Dialog.js.map +1 -1
  75. package/dist/dialog/DialogContent.d.ts +1 -1
  76. package/dist/dialog/DialogContent.js +1 -1
  77. package/dist/dialog/DialogContent.js.map +1 -1
  78. package/dist/dialog/DialogFooter.d.ts +1 -1
  79. package/dist/dialog/DialogFooter.js +1 -1
  80. package/dist/dialog/DialogFooter.js.map +1 -1
  81. package/dist/dialog/DialogHeader.d.ts +1 -1
  82. package/dist/dialog/DialogHeader.js +1 -1
  83. package/dist/dialog/DialogHeader.js.map +1 -1
  84. package/dist/dialog/DialogTitle.d.ts +1 -1
  85. package/dist/dialog/DialogTitle.js +1 -1
  86. package/dist/dialog/DialogTitle.js.map +1 -1
  87. package/dist/dialog/FixedDialog.d.ts +1 -1
  88. package/dist/dialog/FixedDialog.js +1 -1
  89. package/dist/dialog/FixedDialog.js.map +1 -1
  90. package/dist/divider/Divider.d.ts +1 -1
  91. package/dist/divider/Divider.js +1 -1
  92. package/dist/divider/Divider.js.map +1 -1
  93. package/dist/draggable/useDraggable.d.ts +1 -1
  94. package/dist/draggable/useDraggable.js +1 -1
  95. package/dist/draggable/useDraggable.js.map +1 -1
  96. package/dist/expansion-panel/ExpansionList.d.ts +1 -1
  97. package/dist/expansion-panel/ExpansionList.js +1 -1
  98. package/dist/expansion-panel/ExpansionList.js.map +1 -1
  99. package/dist/expansion-panel/ExpansionPanel.d.ts +1 -1
  100. package/dist/expansion-panel/ExpansionPanel.js +1 -1
  101. package/dist/expansion-panel/ExpansionPanel.js.map +1 -1
  102. package/dist/expansion-panel/ExpansionPanelHeader.d.ts +1 -1
  103. package/dist/expansion-panel/ExpansionPanelHeader.js +1 -1
  104. package/dist/expansion-panel/ExpansionPanelHeader.js.map +1 -1
  105. package/dist/expansion-panel/useExpansionList.d.ts +1 -1
  106. package/dist/expansion-panel/useExpansionList.js +1 -1
  107. package/dist/expansion-panel/useExpansionList.js.map +1 -1
  108. package/dist/expansion-panel/useExpansionPanels.d.ts +1 -1
  109. package/dist/expansion-panel/useExpansionPanels.js +1 -1
  110. package/dist/expansion-panel/useExpansionPanels.js.map +1 -1
  111. package/dist/files/FileInput.d.ts +1 -1
  112. package/dist/files/FileInput.js +1 -1
  113. package/dist/files/FileInput.js.map +1 -1
  114. package/dist/files/useFileUpload.d.ts +2 -2
  115. package/dist/files/useFileUpload.js +2 -2
  116. package/dist/files/useFileUpload.js.map +1 -1
  117. package/dist/form/Checkbox.d.ts +1 -1
  118. package/dist/form/Checkbox.js +1 -1
  119. package/dist/form/Checkbox.js.map +1 -1
  120. package/dist/form/Fieldset.d.ts +1 -1
  121. package/dist/form/Fieldset.js +1 -1
  122. package/dist/form/Fieldset.js.map +1 -1
  123. package/dist/form/Form.d.ts +1 -1
  124. package/dist/form/Form.js +1 -1
  125. package/dist/form/Form.js.map +1 -1
  126. package/dist/form/FormMessage.d.ts +1 -1
  127. package/dist/form/FormMessage.js +1 -1
  128. package/dist/form/FormMessage.js.map +1 -1
  129. package/dist/form/FormMessageContainer.d.ts +1 -1
  130. package/dist/form/FormMessageContainer.js +1 -1
  131. package/dist/form/FormMessageContainer.js.map +1 -1
  132. package/dist/form/FormMessageCounter.d.ts +2 -2
  133. package/dist/form/FormMessageCounter.js +2 -2
  134. package/dist/form/FormMessageCounter.js.map +1 -1
  135. package/dist/form/InputToggle.d.ts +2 -2
  136. package/dist/form/InputToggle.js +2 -2
  137. package/dist/form/InputToggle.js.map +1 -1
  138. package/dist/form/Label.d.ts +3 -3
  139. package/dist/form/Label.js +3 -3
  140. package/dist/form/Label.js.map +1 -1
  141. package/dist/form/Legend.d.ts +1 -1
  142. package/dist/form/Legend.js +1 -1
  143. package/dist/form/Legend.js.map +1 -1
  144. package/dist/form/NativeSelect.d.ts +1 -1
  145. package/dist/form/NativeSelect.js +1 -1
  146. package/dist/form/NativeSelect.js.map +1 -1
  147. package/dist/form/OptGroup.d.ts +1 -1
  148. package/dist/form/OptGroup.js +1 -1
  149. package/dist/form/OptGroup.js.map +1 -1
  150. package/dist/form/Option.d.ts +1 -1
  151. package/dist/form/Option.js +1 -1
  152. package/dist/form/Option.js.map +1 -1
  153. package/dist/form/Password.d.ts +1 -1
  154. package/dist/form/Password.js +1 -1
  155. package/dist/form/Password.js.map +1 -1
  156. package/dist/form/Radio.d.ts +1 -1
  157. package/dist/form/Radio.js +1 -1
  158. package/dist/form/Radio.js.map +1 -1
  159. package/dist/form/Select.d.ts +1 -1
  160. package/dist/form/Select.js +1 -1
  161. package/dist/form/Select.js.map +1 -1
  162. package/dist/form/Slider.d.ts +1 -1
  163. package/dist/form/Slider.js.map +1 -1
  164. package/dist/form/Switch.d.ts +1 -1
  165. package/dist/form/Switch.js +1 -1
  166. package/dist/form/Switch.js.map +1 -1
  167. package/dist/form/TextArea.d.ts +1 -1
  168. package/dist/form/TextArea.js +1 -1
  169. package/dist/form/TextArea.js.map +1 -1
  170. package/dist/form/TextField.d.ts +1 -1
  171. package/dist/form/TextField.js +1 -1
  172. package/dist/form/TextField.js.map +1 -1
  173. package/dist/form/useCheckboxGroup.d.ts +8 -8
  174. package/dist/form/useCheckboxGroup.js +2 -2
  175. package/dist/form/useCheckboxGroup.js.map +1 -1
  176. package/dist/form/useCombobox.js +1 -0
  177. package/dist/form/useCombobox.js.map +1 -1
  178. package/dist/form/useNumberField.d.ts +2 -2
  179. package/dist/form/useNumberField.js +2 -2
  180. package/dist/form/useNumberField.js.map +1 -1
  181. package/dist/form/useRadioGroup.d.ts +4 -4
  182. package/dist/form/useRadioGroup.js +2 -2
  183. package/dist/form/useRadioGroup.js.map +1 -1
  184. package/dist/form/useRangeSlider.d.ts +1 -1
  185. package/dist/form/useRangeSlider.js +1 -1
  186. package/dist/form/useRangeSlider.js.map +1 -1
  187. package/dist/form/useSlider.d.ts +1 -1
  188. package/dist/form/useSlider.js +1 -1
  189. package/dist/form/useSlider.js.map +1 -1
  190. package/dist/form/useTextField.d.ts +4 -4
  191. package/dist/form/useTextField.js +2 -2
  192. package/dist/form/useTextField.js.map +1 -1
  193. package/dist/icon/FontIcon.d.ts +1 -1
  194. package/dist/icon/FontIcon.js +1 -1
  195. package/dist/icon/FontIcon.js.map +1 -1
  196. package/dist/icon/IconRotator.d.ts +1 -1
  197. package/dist/icon/IconRotator.js +1 -1
  198. package/dist/icon/IconRotator.js.map +1 -1
  199. package/dist/icon/MaterialIcon.d.ts +2 -2
  200. package/dist/icon/MaterialIcon.js +2 -2
  201. package/dist/icon/MaterialIcon.js.map +1 -1
  202. package/dist/icon/MaterialSymbol.d.ts +2 -2
  203. package/dist/icon/MaterialSymbol.js +2 -2
  204. package/dist/icon/MaterialSymbol.js.map +1 -1
  205. package/dist/icon/SVGIcon.d.ts +1 -1
  206. package/dist/icon/SVGIcon.js +1 -1
  207. package/dist/icon/SVGIcon.js.map +1 -1
  208. package/dist/icon/TextIconSpacing.d.ts +1 -1
  209. package/dist/icon/TextIconSpacing.js +1 -1
  210. package/dist/icon/TextIconSpacing.js.map +1 -1
  211. package/dist/layout/LayoutAppBar.d.ts +1 -1
  212. package/dist/layout/LayoutAppBar.js +1 -1
  213. package/dist/layout/LayoutAppBar.js.map +1 -1
  214. package/dist/layout/LayoutNav.d.ts +1 -1
  215. package/dist/layout/LayoutNav.js +1 -1
  216. package/dist/layout/LayoutNav.js.map +1 -1
  217. package/dist/layout/LayoutWindowSplitter.d.ts +1 -1
  218. package/dist/layout/LayoutWindowSplitter.js +1 -1
  219. package/dist/layout/LayoutWindowSplitter.js.map +1 -1
  220. package/dist/layout/Main.d.ts +1 -1
  221. package/dist/layout/Main.js +1 -1
  222. package/dist/layout/Main.js.map +1 -1
  223. package/dist/layout/useExpandableLayout.d.ts +1 -1
  224. package/dist/layout/useExpandableLayout.js +1 -1
  225. package/dist/layout/useExpandableLayout.js.map +1 -1
  226. package/dist/layout/useHorizontalLayoutTransition.d.ts +1 -1
  227. package/dist/layout/useHorizontalLayoutTransition.js +1 -1
  228. package/dist/layout/useHorizontalLayoutTransition.js.map +1 -1
  229. package/dist/layout/useLayoutAppBarHeight.d.ts +1 -1
  230. package/dist/layout/useLayoutAppBarHeight.js +1 -1
  231. package/dist/layout/useLayoutAppBarHeight.js.map +1 -1
  232. package/dist/layout/useLayoutTree.d.ts +3 -3
  233. package/dist/layout/useLayoutTree.js +3 -3
  234. package/dist/layout/useLayoutTree.js.map +1 -1
  235. package/dist/layout/useLayoutWindowSplitter.d.ts +1 -1
  236. package/dist/layout/useLayoutWindowSplitter.js +1 -1
  237. package/dist/layout/useLayoutWindowSplitter.js.map +1 -1
  238. package/dist/layout/useResizableLayout.d.ts +1 -1
  239. package/dist/layout/useResizableLayout.js +1 -1
  240. package/dist/layout/useResizableLayout.js.map +1 -1
  241. package/dist/layout/useTemporaryLayout.d.ts +1 -1
  242. package/dist/layout/useTemporaryLayout.js +1 -1
  243. package/dist/layout/useTemporaryLayout.js.map +1 -1
  244. package/dist/link/Link.d.ts +1 -1
  245. package/dist/link/Link.js +1 -1
  246. package/dist/link/Link.js.map +1 -1
  247. package/dist/link/SkipToMainContent.d.ts +1 -1
  248. package/dist/link/SkipToMainContent.js +1 -1
  249. package/dist/link/SkipToMainContent.js.map +1 -1
  250. package/dist/list/List.d.ts +1 -1
  251. package/dist/list/List.js +1 -1
  252. package/dist/list/List.js.map +1 -1
  253. package/dist/list/ListItem.d.ts +1 -1
  254. package/dist/list/ListItem.js +1 -1
  255. package/dist/list/ListItem.js.map +1 -1
  256. package/dist/list/ListItemChildren.d.ts +1 -1
  257. package/dist/list/ListItemChildren.js +1 -1
  258. package/dist/list/ListItemChildren.js.map +1 -1
  259. package/dist/list/ListItemLink.d.ts +1 -1
  260. package/dist/list/ListItemLink.js +1 -1
  261. package/dist/list/ListItemLink.js.map +1 -1
  262. package/dist/list/ListSubheader.d.ts +1 -1
  263. package/dist/list/ListSubheader.js +1 -1
  264. package/dist/list/ListSubheader.js.map +1 -1
  265. package/dist/media-queries/AppSizeProvider.d.ts +2 -2
  266. package/dist/media-queries/AppSizeProvider.js +2 -2
  267. package/dist/media-queries/AppSizeProvider.js.map +1 -1
  268. package/dist/media-queries/useMediaQuery.d.ts +2 -2
  269. package/dist/media-queries/useMediaQuery.js +2 -2
  270. package/dist/media-queries/useMediaQuery.js.map +1 -1
  271. package/dist/menu/DropdownMenu.d.ts +1 -1
  272. package/dist/menu/DropdownMenu.js +2 -1
  273. package/dist/menu/DropdownMenu.js.map +1 -1
  274. package/dist/menu/Menu.d.ts +1 -1
  275. package/dist/menu/Menu.js +1 -1
  276. package/dist/menu/Menu.js.map +1 -1
  277. package/dist/menu/MenuBar.d.ts +1 -1
  278. package/dist/menu/MenuBar.js +1 -1
  279. package/dist/menu/MenuBar.js.map +1 -1
  280. package/dist/menu/MenuButton.d.ts +1 -1
  281. package/dist/menu/MenuButton.js +1 -1
  282. package/dist/menu/MenuButton.js.map +1 -1
  283. package/dist/menu/MenuItem.d.ts +1 -1
  284. package/dist/menu/MenuItem.js +1 -1
  285. package/dist/menu/MenuItem.js.map +1 -1
  286. package/dist/menu/MenuItemCheckbox.d.ts +1 -1
  287. package/dist/menu/MenuItemCheckbox.js +1 -1
  288. package/dist/menu/MenuItemCheckbox.js.map +1 -1
  289. package/dist/menu/MenuItemFileInput.d.ts +1 -1
  290. package/dist/menu/MenuItemFileInput.js +1 -1
  291. package/dist/menu/MenuItemFileInput.js.map +1 -1
  292. package/dist/menu/MenuItemGroup.d.ts +1 -1
  293. package/dist/menu/MenuItemGroup.js +1 -1
  294. package/dist/menu/MenuItemGroup.js.map +1 -1
  295. package/dist/menu/MenuItemInputToggle.d.ts +1 -1
  296. package/dist/menu/MenuItemInputToggle.js +1 -1
  297. package/dist/menu/MenuItemInputToggle.js.map +1 -1
  298. package/dist/menu/MenuItemRadio.d.ts +1 -1
  299. package/dist/menu/MenuItemRadio.js +1 -1
  300. package/dist/menu/MenuItemRadio.js.map +1 -1
  301. package/dist/menu/MenuItemSeparator.d.ts +1 -1
  302. package/dist/menu/MenuItemSeparator.js +1 -1
  303. package/dist/menu/MenuItemSeparator.js.map +1 -1
  304. package/dist/menu/MenuItemSwitch.d.ts +1 -1
  305. package/dist/menu/MenuItemSwitch.js +1 -1
  306. package/dist/menu/MenuItemSwitch.js.map +1 -1
  307. package/dist/menu/MenuItemTextField.d.ts +1 -1
  308. package/dist/menu/MenuItemTextField.js +1 -1
  309. package/dist/menu/MenuItemTextField.js.map +1 -1
  310. package/dist/menu/useContextMenu.d.ts +1 -1
  311. package/dist/menu/useContextMenu.js +1 -1
  312. package/dist/menu/useContextMenu.js.map +1 -1
  313. package/dist/navigation/CollapsibleNavGroup.d.ts +1 -1
  314. package/dist/navigation/CollapsibleNavGroup.js +1 -1
  315. package/dist/navigation/CollapsibleNavGroup.js.map +1 -1
  316. package/dist/navigation/DefaultNavigationRenderer.d.ts +1 -1
  317. package/dist/navigation/DefaultNavigationRenderer.js +1 -1
  318. package/dist/navigation/DefaultNavigationRenderer.js.map +1 -1
  319. package/dist/navigation/NavGroup.d.ts +1 -1
  320. package/dist/navigation/NavGroup.js +1 -1
  321. package/dist/navigation/NavGroup.js.map +1 -1
  322. package/dist/navigation/NavItem.d.ts +1 -1
  323. package/dist/navigation/NavItem.js +1 -1
  324. package/dist/navigation/NavItem.js.map +1 -1
  325. package/dist/navigation/NavItemButton.d.ts +1 -1
  326. package/dist/navigation/NavItemButton.js +1 -1
  327. package/dist/navigation/NavItemButton.js.map +1 -1
  328. package/dist/navigation/NavItemLink.d.ts +1 -1
  329. package/dist/navigation/NavItemLink.js +1 -1
  330. package/dist/navigation/NavItemLink.js.map +1 -1
  331. package/dist/navigation/NavSubheader.d.ts +1 -1
  332. package/dist/navigation/NavSubheader.js +1 -1
  333. package/dist/navigation/NavSubheader.js.map +1 -1
  334. package/dist/navigation/Navigation.d.ts +1 -1
  335. package/dist/navigation/Navigation.js +1 -1
  336. package/dist/navigation/Navigation.js.map +1 -1
  337. package/dist/navigation/useActiveHeadingId.d.ts +1 -1
  338. package/dist/navigation/useActiveHeadingId.js +1 -1
  339. package/dist/navigation/useActiveHeadingId.js.map +1 -1
  340. package/dist/navigation/useNavigationExpansion.d.ts +2 -2
  341. package/dist/navigation/useNavigationExpansion.js +2 -2
  342. package/dist/navigation/useNavigationExpansion.js.map +1 -1
  343. package/dist/navigation/useTableOfContentsHeadings.d.ts +1 -1
  344. package/dist/navigation/useTableOfContentsHeadings.js +1 -1
  345. package/dist/navigation/useTableOfContentsHeadings.js.map +1 -1
  346. package/dist/overlay/Overlay.d.ts +1 -1
  347. package/dist/overlay/Overlay.js +1 -1
  348. package/dist/overlay/Overlay.js.map +1 -1
  349. package/dist/portal/Portal.d.ts +1 -1
  350. package/dist/portal/Portal.js +1 -1
  351. package/dist/portal/Portal.js.map +1 -1
  352. package/dist/portal/PortalContainerProvider.d.ts +1 -1
  353. package/dist/portal/PortalContainerProvider.js +1 -1
  354. package/dist/portal/PortalContainerProvider.js.map +1 -1
  355. package/dist/positioning/useFixedPositioning.d.ts +1 -1
  356. package/dist/positioning/useFixedPositioning.js +1 -1
  357. package/dist/positioning/useFixedPositioning.js.map +1 -1
  358. package/dist/progress/CircularProgress.d.ts +1 -1
  359. package/dist/progress/CircularProgress.js +1 -1
  360. package/dist/progress/CircularProgress.js.map +1 -1
  361. package/dist/progress/LinearProgress.d.ts +1 -1
  362. package/dist/progress/LinearProgress.js +1 -1
  363. package/dist/progress/LinearProgress.js.map +1 -1
  364. package/dist/responsive-item/ResponsiveItem.d.ts +1 -1
  365. package/dist/responsive-item/ResponsiveItem.js +1 -1
  366. package/dist/responsive-item/ResponsiveItem.js.map +1 -1
  367. package/dist/responsive-item/ResponsiveItemOverlay.d.ts +1 -1
  368. package/dist/responsive-item/ResponsiveItemOverlay.js +1 -1
  369. package/dist/responsive-item/ResponsiveItemOverlay.js.map +1 -1
  370. package/dist/scroll/useScrollLock.d.ts +1 -1
  371. package/dist/scroll/useScrollLock.js +1 -1
  372. package/dist/scroll/useScrollLock.js.map +1 -1
  373. package/dist/segmented-button/SegmentedButton.d.ts +1 -1
  374. package/dist/segmented-button/SegmentedButton.js +1 -1
  375. package/dist/segmented-button/SegmentedButton.js.map +1 -1
  376. package/dist/segmented-button/SegmentedButtonContainer.d.ts +1 -1
  377. package/dist/segmented-button/SegmentedButtonContainer.js +1 -1
  378. package/dist/segmented-button/SegmentedButtonContainer.js.map +1 -1
  379. package/dist/sheet/Sheet.d.ts +1 -1
  380. package/dist/sheet/Sheet.js +1 -1
  381. package/dist/sheet/Sheet.js.map +1 -1
  382. package/dist/snackbar/DefaultToastRenderer.d.ts +1 -1
  383. package/dist/snackbar/DefaultToastRenderer.js +1 -1
  384. package/dist/snackbar/DefaultToastRenderer.js.map +1 -1
  385. package/dist/snackbar/Snackbar.d.ts +1 -1
  386. package/dist/snackbar/Snackbar.js +1 -1
  387. package/dist/snackbar/Snackbar.js.map +1 -1
  388. package/dist/snackbar/Toast.d.ts +1 -1
  389. package/dist/snackbar/Toast.js +1 -1
  390. package/dist/snackbar/Toast.js.map +1 -1
  391. package/dist/snackbar/ToastActionButton.d.ts +1 -1
  392. package/dist/snackbar/ToastActionButton.js +1 -1
  393. package/dist/snackbar/ToastActionButton.js.map +1 -1
  394. package/dist/snackbar/ToastCloseButton.d.ts +1 -1
  395. package/dist/snackbar/ToastCloseButton.js +1 -1
  396. package/dist/snackbar/ToastCloseButton.js.map +1 -1
  397. package/dist/snackbar/ToastContent.d.ts +1 -1
  398. package/dist/snackbar/ToastContent.js +1 -1
  399. package/dist/snackbar/ToastContent.js.map +1 -1
  400. package/dist/snackbar/ToastManager.d.ts +1 -1
  401. package/dist/snackbar/ToastManager.js +1 -1
  402. package/dist/snackbar/ToastManager.js.map +1 -1
  403. package/dist/snackbar/ToastManagerProvider.d.ts +1 -1
  404. package/dist/snackbar/ToastManagerProvider.js +1 -1
  405. package/dist/snackbar/ToastManagerProvider.js.map +1 -1
  406. package/dist/snackbar/useCurrentToastActions.d.ts +1 -1
  407. package/dist/snackbar/useCurrentToastActions.js +1 -1
  408. package/dist/snackbar/useCurrentToastActions.js.map +1 -1
  409. package/dist/storage/useStorage.d.ts +1 -1
  410. package/dist/storage/useStorage.js +1 -1
  411. package/dist/storage/useStorage.js.map +1 -1
  412. package/dist/suspense/CircularProgressSuspense.d.ts +1 -1
  413. package/dist/suspense/CircularProgressSuspense.js +1 -1
  414. package/dist/suspense/CircularProgressSuspense.js.map +1 -1
  415. package/dist/suspense/NullSuspense.d.ts +1 -1
  416. package/dist/suspense/NullSuspense.js +1 -1
  417. package/dist/suspense/NullSuspense.js.map +1 -1
  418. package/dist/table/StickyTableSection.d.ts +2 -2
  419. package/dist/table/StickyTableSection.js +2 -2
  420. package/dist/table/StickyTableSection.js.map +1 -1
  421. package/dist/table/Table.d.ts +1 -1
  422. package/dist/table/Table.js +1 -1
  423. package/dist/table/Table.js.map +1 -1
  424. package/dist/table/TableBody.d.ts +1 -1
  425. package/dist/table/TableBody.js +1 -1
  426. package/dist/table/TableBody.js.map +1 -1
  427. package/dist/table/TableCell.d.ts +1 -1
  428. package/dist/table/TableCell.js +1 -1
  429. package/dist/table/TableCell.js.map +1 -1
  430. package/dist/table/TableCheckbox.d.ts +1 -1
  431. package/dist/table/TableCheckbox.js +1 -1
  432. package/dist/table/TableCheckbox.js.map +1 -1
  433. package/dist/table/TableContainer.d.ts +1 -1
  434. package/dist/table/TableContainer.js +1 -1
  435. package/dist/table/TableContainer.js.map +1 -1
  436. package/dist/table/TableFooter.d.ts +1 -1
  437. package/dist/table/TableFooter.js +1 -1
  438. package/dist/table/TableFooter.js.map +1 -1
  439. package/dist/table/TableHeader.d.ts +1 -1
  440. package/dist/table/TableHeader.js +1 -1
  441. package/dist/table/TableHeader.js.map +1 -1
  442. package/dist/table/TableRadio.d.ts +1 -1
  443. package/dist/table/TableRadio.js +1 -1
  444. package/dist/table/TableRadio.js.map +1 -1
  445. package/dist/table/TableRow.d.ts +1 -1
  446. package/dist/table/TableRow.js +1 -1
  447. package/dist/table/TableRow.js.map +1 -1
  448. package/dist/tabs/SimpleTabPanel.d.ts +2 -2
  449. package/dist/tabs/SimpleTabPanel.js +2 -2
  450. package/dist/tabs/SimpleTabPanel.js.map +1 -1
  451. package/dist/tabs/SimpleTabPanels.d.ts +2 -2
  452. package/dist/tabs/SimpleTabPanels.js +2 -2
  453. package/dist/tabs/SimpleTabPanels.js.map +1 -1
  454. package/dist/tabs/Tab.d.ts +1 -1
  455. package/dist/tabs/Tab.js +1 -1
  456. package/dist/tabs/Tab.js.map +1 -1
  457. package/dist/tabs/TabList.d.ts +1 -1
  458. package/dist/tabs/TabList.js +1 -1
  459. package/dist/tabs/TabList.js.map +1 -1
  460. package/dist/tabs/useTabs.d.ts +4 -4
  461. package/dist/tabs/useTabs.js +2 -1
  462. package/dist/tabs/useTabs.js.map +1 -1
  463. package/dist/theme/LocalStorageColorSchemeProvider.d.ts +2 -2
  464. package/dist/theme/LocalStorageColorSchemeProvider.js +2 -2
  465. package/dist/theme/LocalStorageColorSchemeProvider.js.map +1 -1
  466. package/dist/theme/ThemeProvider.d.ts +1 -1
  467. package/dist/theme/ThemeProvider.js +1 -1
  468. package/dist/theme/ThemeProvider.js.map +1 -1
  469. package/dist/theme/useColorSchemeProvider.js +1 -0
  470. package/dist/theme/useColorSchemeProvider.js.map +1 -1
  471. package/dist/tooltip/Tooltip.d.ts +1 -1
  472. package/dist/tooltip/Tooltip.js +1 -1
  473. package/dist/tooltip/Tooltip.js.map +1 -1
  474. package/dist/tooltip/TooltipHoverModeProvider.d.ts +1 -1
  475. package/dist/tooltip/TooltipHoverModeProvider.js +1 -1
  476. package/dist/tooltip/TooltipHoverModeProvider.js.map +1 -1
  477. package/dist/tooltip/useTooltip.d.ts +1 -1
  478. package/dist/tooltip/useTooltip.js +1 -1
  479. package/dist/tooltip/useTooltip.js.map +1 -1
  480. package/dist/transition/CSSTransition.d.ts +1 -1
  481. package/dist/transition/CSSTransition.js +1 -1
  482. package/dist/transition/CSSTransition.js.map +1 -1
  483. package/dist/transition/Collapse.d.ts +1 -1
  484. package/dist/transition/Collapse.js +1 -1
  485. package/dist/transition/Collapse.js.map +1 -1
  486. package/dist/transition/CrossFade.d.ts +1 -1
  487. package/dist/transition/CrossFade.js +1 -1
  488. package/dist/transition/CrossFade.js.map +1 -1
  489. package/dist/transition/ScaleTransition.d.ts +1 -1
  490. package/dist/transition/ScaleTransition.js +1 -1
  491. package/dist/transition/ScaleTransition.js.map +1 -1
  492. package/dist/transition/SkeletonPlaceholder.d.ts +1 -1
  493. package/dist/transition/SkeletonPlaceholder.js +1 -1
  494. package/dist/transition/SkeletonPlaceholder.js.map +1 -1
  495. package/dist/transition/Slide.d.ts +1 -1
  496. package/dist/transition/Slide.js +1 -1
  497. package/dist/transition/Slide.js.map +1 -1
  498. package/dist/transition/SlideContainer.d.ts +1 -1
  499. package/dist/transition/SlideContainer.js +1 -1
  500. package/dist/transition/SlideContainer.js.map +1 -1
  501. package/dist/transition/useCSSTransition.d.ts +2 -2
  502. package/dist/transition/useCSSTransition.js +2 -2
  503. package/dist/transition/useCSSTransition.js.map +1 -1
  504. package/dist/transition/useCarousel.d.ts +1 -1
  505. package/dist/transition/useCarousel.js +1 -1
  506. package/dist/transition/useCarousel.js.map +1 -1
  507. package/dist/transition/useCollapseTransition.d.ts +2 -2
  508. package/dist/transition/useCollapseTransition.js +2 -2
  509. package/dist/transition/useCollapseTransition.js.map +1 -1
  510. package/dist/transition/useCrossFadeTransition.d.ts +2 -2
  511. package/dist/transition/useCrossFadeTransition.js +2 -2
  512. package/dist/transition/useCrossFadeTransition.js.map +1 -1
  513. package/dist/transition/useScaleTransition.d.ts +2 -2
  514. package/dist/transition/useScaleTransition.js +2 -2
  515. package/dist/transition/useScaleTransition.js.map +1 -1
  516. package/dist/transition/useSkeletonPlaceholder.d.ts +2 -2
  517. package/dist/transition/useSkeletonPlaceholder.js +2 -2
  518. package/dist/transition/useSkeletonPlaceholder.js.map +1 -1
  519. package/dist/transition/useSlideTransition.d.ts +1 -1
  520. package/dist/transition/useSlideTransition.js +1 -1
  521. package/dist/transition/useSlideTransition.js.map +1 -1
  522. package/dist/transition/useTransition.d.ts +1 -1
  523. package/dist/transition/useTransition.js +1 -1
  524. package/dist/transition/useTransition.js.map +1 -1
  525. package/dist/tree/DefaultTreeItemRenderer.d.ts +1 -1
  526. package/dist/tree/DefaultTreeItemRenderer.js +1 -1
  527. package/dist/tree/DefaultTreeItemRenderer.js.map +1 -1
  528. package/dist/tree/Tree.d.ts +1 -1
  529. package/dist/tree/Tree.js +1 -1
  530. package/dist/tree/Tree.js.map +1 -1
  531. package/dist/tree/TreeItem.d.ts +1 -1
  532. package/dist/tree/TreeItem.js +1 -1
  533. package/dist/tree/TreeItem.js.map +1 -1
  534. package/dist/tree/useTree.d.ts +1 -1
  535. package/dist/tree/useTree.js +1 -1
  536. package/dist/tree/useTree.js.map +1 -1
  537. package/dist/tree/useTreeExpansion.d.ts +1 -1
  538. package/dist/tree/useTreeExpansion.js +1 -1
  539. package/dist/tree/useTreeExpansion.js.map +1 -1
  540. package/dist/tree/useTreeItems.d.ts +1 -1
  541. package/dist/tree/useTreeItems.js +1 -1
  542. package/dist/tree/useTreeItems.js.map +1 -1
  543. package/dist/tree/useTreeSelection.d.ts +1 -1
  544. package/dist/tree/useTreeSelection.js +1 -1
  545. package/dist/tree/useTreeSelection.js.map +1 -1
  546. package/dist/typography/HighlightText.d.ts +1 -1
  547. package/dist/typography/HighlightText.js +1 -1
  548. package/dist/typography/HighlightText.js.map +1 -1
  549. package/dist/typography/Mark.d.ts +1 -1
  550. package/dist/typography/Mark.js +1 -1
  551. package/dist/typography/Mark.js.map +1 -1
  552. package/dist/typography/SrOnly.d.ts +1 -1
  553. package/dist/typography/SrOnly.js +1 -1
  554. package/dist/typography/SrOnly.js.map +1 -1
  555. package/dist/typography/TextContainer.d.ts +1 -1
  556. package/dist/typography/TextContainer.js +1 -1
  557. package/dist/typography/TextContainer.js.map +1 -1
  558. package/dist/typography/Typography.d.ts +1 -1
  559. package/dist/typography/Typography.js +1 -1
  560. package/dist/typography/Typography.js.map +1 -1
  561. package/dist/typography/WritingDirectionProvider.d.ts +1 -1
  562. package/dist/typography/WritingDirectionProvider.js +1 -1
  563. package/dist/typography/WritingDirectionProvider.js.map +1 -1
  564. package/dist/useEnsuredState.d.ts +1 -0
  565. package/dist/useEnsuredState.js +5 -3
  566. package/dist/useEnsuredState.js.map +1 -1
  567. package/dist/utils/RenderRecursively.d.ts +1 -1
  568. package/dist/utils/RenderRecursively.js +1 -1
  569. package/dist/utils/RenderRecursively.js.map +1 -1
  570. package/dist/window-splitter/WindowSplitter.d.ts +1 -1
  571. package/dist/window-splitter/WindowSplitter.js +1 -1
  572. package/dist/window-splitter/WindowSplitter.js.map +1 -1
  573. package/package.json +1 -1
  574. package/src/CoreProviders.tsx +1 -1
  575. package/src/SsrProvider.tsx +1 -1
  576. package/src/autocomplete/Autocomplete.tsx +3 -3
  577. package/src/autocomplete/AutocompleteChip.tsx +1 -1
  578. package/src/autocomplete/AutocompleteCircularProgress.tsx +1 -1
  579. package/src/autocomplete/AutocompleteClearButton.tsx +1 -1
  580. package/src/autocomplete/AutocompleteDropdownButton.tsx +1 -1
  581. package/src/autocomplete/useAutocomplete.ts +5 -4
  582. package/src/avatar/Avatar.tsx +1 -1
  583. package/src/badge/Badge.tsx +1 -1
  584. package/src/box/Box.tsx +1 -1
  585. package/src/button/AsyncButton.tsx +1 -1
  586. package/src/button/Button.tsx +1 -1
  587. package/src/button/ButtonUnstyled.tsx +1 -1
  588. package/src/button/TooltippedButton.tsx +1 -1
  589. package/src/card/Card.tsx +1 -1
  590. package/src/card/CardContent.tsx +1 -1
  591. package/src/card/CardFooter.tsx +1 -1
  592. package/src/card/CardHeader.tsx +1 -1
  593. package/src/card/CardSubtitle.tsx +1 -1
  594. package/src/card/CardTitle.tsx +1 -1
  595. package/src/card/ClickableCard.tsx +1 -1
  596. package/src/chip/Chip.tsx +1 -1
  597. package/src/dialog/Dialog.tsx +1 -1
  598. package/src/dialog/DialogContent.tsx +1 -1
  599. package/src/dialog/DialogFooter.tsx +1 -1
  600. package/src/dialog/DialogHeader.tsx +1 -1
  601. package/src/dialog/DialogTitle.tsx +1 -1
  602. package/src/dialog/FixedDialog.tsx +1 -1
  603. package/src/divider/Divider.tsx +1 -1
  604. package/src/draggable/useDraggable.ts +1 -1
  605. package/src/expansion-panel/ExpansionList.tsx +1 -1
  606. package/src/expansion-panel/ExpansionPanel.tsx +1 -1
  607. package/src/expansion-panel/ExpansionPanelHeader.tsx +1 -1
  608. package/src/expansion-panel/useExpansionList.ts +1 -1
  609. package/src/expansion-panel/useExpansionPanels.ts +1 -1
  610. package/src/files/FileInput.tsx +1 -1
  611. package/src/files/useFileUpload.ts +2 -2
  612. package/src/form/Checkbox.tsx +1 -1
  613. package/src/form/Fieldset.tsx +1 -1
  614. package/src/form/Form.tsx +1 -1
  615. package/src/form/FormMessage.tsx +1 -1
  616. package/src/form/FormMessageContainer.tsx +1 -1
  617. package/src/form/FormMessageCounter.tsx +2 -2
  618. package/src/form/InputToggle.tsx +2 -2
  619. package/src/form/Label.tsx +3 -3
  620. package/src/form/Legend.tsx +1 -1
  621. package/src/form/NativeSelect.tsx +1 -1
  622. package/src/form/OptGroup.tsx +1 -1
  623. package/src/form/Option.tsx +1 -1
  624. package/src/form/Password.tsx +1 -1
  625. package/src/form/Radio.tsx +1 -1
  626. package/src/form/Select.tsx +1 -1
  627. package/src/form/Slider.tsx +1 -1
  628. package/src/form/Switch.tsx +1 -1
  629. package/src/form/TextArea.tsx +1 -1
  630. package/src/form/TextField.tsx +1 -1
  631. package/src/form/useCheckboxGroup.ts +10 -10
  632. package/src/form/useCombobox.ts +1 -0
  633. package/src/form/useNumberField.ts +4 -4
  634. package/src/form/useRadioGroup.ts +6 -6
  635. package/src/form/useRangeSlider.ts +1 -1
  636. package/src/form/useSlider.ts +1 -1
  637. package/src/form/useTextField.ts +6 -6
  638. package/src/icon/FontIcon.tsx +1 -1
  639. package/src/icon/IconRotator.tsx +1 -1
  640. package/src/icon/MaterialIcon.tsx +2 -2
  641. package/src/icon/MaterialSymbol.tsx +2 -2
  642. package/src/icon/SVGIcon.tsx +1 -1
  643. package/src/icon/TextIconSpacing.tsx +1 -1
  644. package/src/layout/LayoutAppBar.tsx +1 -1
  645. package/src/layout/LayoutNav.tsx +1 -1
  646. package/src/layout/LayoutWindowSplitter.tsx +1 -1
  647. package/src/layout/Main.tsx +1 -1
  648. package/src/layout/useExpandableLayout.ts +1 -1
  649. package/src/layout/useHorizontalLayoutTransition.ts +1 -1
  650. package/src/layout/useLayoutAppBarHeight.ts +1 -1
  651. package/src/layout/useLayoutTree.ts +3 -3
  652. package/src/layout/useLayoutWindowSplitter.ts +1 -1
  653. package/src/layout/useResizableLayout.ts +1 -1
  654. package/src/layout/useTemporaryLayout.ts +1 -1
  655. package/src/link/Link.tsx +1 -1
  656. package/src/link/SkipToMainContent.tsx +1 -1
  657. package/src/list/List.tsx +1 -1
  658. package/src/list/ListItem.tsx +1 -1
  659. package/src/list/ListItemChildren.tsx +1 -1
  660. package/src/list/ListItemLink.tsx +1 -1
  661. package/src/list/ListSubheader.tsx +1 -1
  662. package/src/media-queries/AppSizeProvider.tsx +2 -2
  663. package/src/media-queries/useMediaQuery.ts +2 -2
  664. package/src/menu/DropdownMenu.tsx +2 -1
  665. package/src/menu/Menu.tsx +1 -1
  666. package/src/menu/MenuBar.tsx +1 -1
  667. package/src/menu/MenuButton.tsx +1 -1
  668. package/src/menu/MenuItem.tsx +1 -1
  669. package/src/menu/MenuItemCheckbox.tsx +1 -1
  670. package/src/menu/MenuItemFileInput.tsx +1 -1
  671. package/src/menu/MenuItemGroup.tsx +1 -1
  672. package/src/menu/MenuItemInputToggle.tsx +1 -1
  673. package/src/menu/MenuItemRadio.tsx +1 -1
  674. package/src/menu/MenuItemSeparator.tsx +1 -1
  675. package/src/menu/MenuItemSwitch.tsx +1 -1
  676. package/src/menu/MenuItemTextField.tsx +1 -1
  677. package/src/menu/useContextMenu.ts +1 -1
  678. package/src/navigation/CollapsibleNavGroup.tsx +1 -1
  679. package/src/navigation/DefaultNavigationRenderer.tsx +1 -1
  680. package/src/navigation/NavGroup.tsx +1 -1
  681. package/src/navigation/NavItem.tsx +1 -1
  682. package/src/navigation/NavItemButton.tsx +1 -1
  683. package/src/navigation/NavItemLink.tsx +1 -1
  684. package/src/navigation/NavSubheader.tsx +1 -1
  685. package/src/navigation/Navigation.tsx +1 -1
  686. package/src/navigation/useActiveHeadingId.ts +1 -1
  687. package/src/navigation/useNavigationExpansion.ts +2 -2
  688. package/src/navigation/useTableOfContentsHeadings.ts +1 -1
  689. package/src/overlay/Overlay.tsx +1 -1
  690. package/src/portal/Portal.tsx +1 -1
  691. package/src/portal/PortalContainerProvider.tsx +1 -1
  692. package/src/positioning/useFixedPositioning.ts +1 -1
  693. package/src/progress/CircularProgress.tsx +1 -1
  694. package/src/progress/LinearProgress.tsx +1 -1
  695. package/src/responsive-item/ResponsiveItem.tsx +1 -1
  696. package/src/responsive-item/ResponsiveItemOverlay.tsx +1 -1
  697. package/src/scroll/useScrollLock.ts +1 -1
  698. package/src/segmented-button/SegmentedButton.tsx +1 -1
  699. package/src/segmented-button/SegmentedButtonContainer.tsx +1 -1
  700. package/src/sheet/Sheet.tsx +1 -1
  701. package/src/snackbar/DefaultToastRenderer.tsx +1 -1
  702. package/src/snackbar/Snackbar.tsx +1 -1
  703. package/src/snackbar/Toast.tsx +1 -1
  704. package/src/snackbar/ToastActionButton.tsx +1 -1
  705. package/src/snackbar/ToastCloseButton.tsx +1 -1
  706. package/src/snackbar/ToastContent.tsx +1 -1
  707. package/src/snackbar/ToastManager.ts +1 -1
  708. package/src/snackbar/ToastManagerProvider.tsx +1 -1
  709. package/src/snackbar/useCurrentToastActions.ts +1 -1
  710. package/src/storage/useStorage.ts +1 -1
  711. package/src/suspense/CircularProgressSuspense.tsx +1 -1
  712. package/src/suspense/NullSuspense.tsx +1 -1
  713. package/src/table/StickyTableSection.tsx +2 -2
  714. package/src/table/Table.tsx +1 -1
  715. package/src/table/TableBody.tsx +1 -1
  716. package/src/table/TableCell.tsx +1 -1
  717. package/src/table/TableCheckbox.tsx +1 -1
  718. package/src/table/TableContainer.tsx +1 -1
  719. package/src/table/TableFooter.tsx +1 -1
  720. package/src/table/TableHeader.tsx +1 -1
  721. package/src/table/TableRadio.tsx +1 -1
  722. package/src/table/TableRow.tsx +1 -1
  723. package/src/tabs/SimpleTabPanel.tsx +2 -2
  724. package/src/tabs/SimpleTabPanels.tsx +2 -2
  725. package/src/tabs/Tab.tsx +1 -1
  726. package/src/tabs/TabList.tsx +1 -1
  727. package/src/tabs/useTabs.ts +6 -5
  728. package/src/theme/LocalStorageColorSchemeProvider.tsx +2 -2
  729. package/src/theme/ThemeProvider.tsx +1 -1
  730. package/src/theme/useColorSchemeProvider.ts +1 -0
  731. package/src/tooltip/Tooltip.tsx +1 -1
  732. package/src/tooltip/TooltipHoverModeProvider.tsx +1 -1
  733. package/src/tooltip/useTooltip.ts +1 -1
  734. package/src/transition/CSSTransition.tsx +1 -1
  735. package/src/transition/Collapse.tsx +1 -1
  736. package/src/transition/CrossFade.tsx +1 -1
  737. package/src/transition/ScaleTransition.tsx +1 -1
  738. package/src/transition/SkeletonPlaceholder.tsx +1 -1
  739. package/src/transition/Slide.tsx +1 -1
  740. package/src/transition/SlideContainer.tsx +1 -1
  741. package/src/transition/useCSSTransition.ts +2 -2
  742. package/src/transition/useCarousel.ts +1 -1
  743. package/src/transition/useCollapseTransition.ts +2 -2
  744. package/src/transition/useCrossFadeTransition.ts +2 -2
  745. package/src/transition/useScaleTransition.ts +2 -2
  746. package/src/transition/useSkeletonPlaceholder.ts +2 -2
  747. package/src/transition/useSlideTransition.ts +1 -1
  748. package/src/transition/useTransition.ts +1 -1
  749. package/src/tree/DefaultTreeItemRenderer.tsx +1 -1
  750. package/src/tree/Tree.tsx +1 -1
  751. package/src/tree/TreeItem.tsx +1 -1
  752. package/src/tree/useTree.ts +1 -1
  753. package/src/tree/useTreeExpansion.ts +1 -1
  754. package/src/tree/useTreeItems.ts +1 -1
  755. package/src/tree/useTreeSelection.ts +1 -1
  756. package/src/typography/HighlightText.tsx +1 -1
  757. package/src/typography/Mark.tsx +1 -1
  758. package/src/typography/SrOnly.tsx +1 -1
  759. package/src/typography/TextContainer.tsx +1 -1
  760. package/src/typography/Typography.tsx +1 -1
  761. package/src/typography/WritingDirectionProvider.tsx +1 -1
  762. package/src/useEnsuredState.ts +6 -3
  763. package/src/utils/RenderRecursively.tsx +1 -1
  764. package/src/window-splitter/WindowSplitter.tsx +1 -1
@@ -57,7 +57,7 @@ export interface CoreProvidersProps extends ReactMDCoreConfiguration {
57
57
  * - {@link Snackbar} - This isn't a provider but this is how you can display
58
58
  * alerts in your app
59
59
  *
60
- * @see {@link https://next.react-md.dev/components/core-providers | CoreProviders Demos}
60
+ * @see {@link https://react-md.dev/components/core-providers | CoreProviders Demos}
61
61
  * @since 6.0.0
62
62
  */
63
63
  export declare function CoreProviders(props: CoreProvidersProps): ReactElement;
@@ -34,7 +34,7 @@ import { PortalContainerProvider } from "./portal/PortalContainerProvider.js";
34
34
  * - {@link Snackbar} - This isn't a provider but this is how you can display
35
35
  * alerts in your app
36
36
  *
37
- * @see {@link https://next.react-md.dev/components/core-providers | CoreProviders Demos}
37
+ * @see {@link https://react-md.dev/components/core-providers | CoreProviders Demos}
38
38
  * @since 6.0.0
39
39
  */ export function CoreProviders(props) {
40
40
  const { ssr = false, ssrAppSize = DEFAULT_APP_SIZE, appSizeQueries = DEFAULT_APP_SIZE_QUERIES, portalContainer, children } = props;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/CoreProviders.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactElement, type ReactNode } from \"react\";\n\nimport { SsrProvider } from \"./SsrProvider.js\";\nimport { UserInteractionModeProvider } from \"./interaction/UserInteractionModeProvider.js\";\nimport { AppSizeProvider } from \"./media-queries/AppSizeProvider.js\";\nimport {\n type AppSize,\n type AppSizeQueries,\n DEFAULT_APP_SIZE,\n DEFAULT_APP_SIZE_QUERIES,\n} from \"./media-queries/appSize.js\";\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { type MenuConfigurationProvider } from \"./menu/MenuConfigurationProvider.js\";\nimport {\n type PortalContainer,\n PortalContainerProvider,\n} from \"./portal/PortalContainerProvider.js\";\nimport { type Snackbar } from \"./snackbar/Snackbar.js\";\nimport { type LocalStorageColorSchemeProvider } from \"./theme/LocalStorageColorSchemeProvider.js\";\nimport { type ThemeProvider } from \"./theme/ThemeProvider.js\";\nimport { type useColorSchemeProvider } from \"./theme/useColorSchemeProvider.js\";\nimport { type TooltipHoverModeProvider } from \"./tooltip/TooltipHoverModeProvider.js\";\nimport { type WritingDirectionProvider } from \"./typography/WritingDirectionProvider.js\";\n\n/* eslint-enable @typescript-eslint/no-unused-vars */\n\n/** @since 6.0.0 */\nexport interface ReactMDCoreConfiguration {\n /**\n * Set this to `true` if you are using SSR. This will update some hook\n * behavior so that you will not have mismatched initial state between server\n * and client and correctly rehydrate after initial render.\n *\n * @defaultValue `false`\n */\n ssr?: boolean;\n\n /**\n * @defaultValue `DEFAULT_APP_SIZE`\n * @see {@link DEFAULT_APP_SIZE}\n */\n ssrAppSize?: Readonly<AppSize>;\n\n /**\n * @defaultValue `DEFAULT_APP_SIZE_QUERIES`\n * @see {@link DEFAULT_APP_SIZE_QUERIES}\n */\n appSizeQueries?: Readonly<AppSizeQueries>;\n\n /** @see {@link PortalContainerProvider} */\n portalContainer?: PortalContainer;\n}\n\n/** @since 6.0.0 */\nexport interface CoreProvidersProps extends ReactMDCoreConfiguration {\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This is a convenience wrapper for initializing providers for react-md. This\n * includes configuration for:\n *\n * - {@link SsrProvider}\n * - {@link PortalContainerProvider}\n * - {@link AppSizeProvider}\n * - {@link UserInteractionModeProvider}\n *\n * This does not include every provider within `react-md` to help decrease the\n * bundle size for unused features. Here are some other providers that might be\n * useful to initialize near the root of your app:\n *\n * - {@link MenuConfigurationProvider} - If you want to render menus as sheets\n * on phones or other configuration.\n * - {@link LocalStorageColorSchemeProvider}/{@link useColorSchemeProvider} - If\n * you want to allow the user to select a light, dark, or system theme\n * - {@link WritingDirectionProvider} - If you need dynamic support for ltr and\n * rtl languages\n * - {@link ThemeProvider} - If you allow the user to dynamically configure the\n * `react-md` theme\n * - {@link TooltipHoverModeProvider} - If you want tooltips to appear\n * immediately for a time after another tooltip has become visible. You can\n * also configure the global visible delay.\n * - {@link Snackbar} - This isn't a provider but this is how you can display\n * alerts in your app\n *\n * @see {@link https://next.react-md.dev/components/core-providers | CoreProviders Demos}\n * @since 6.0.0\n */\nexport function CoreProviders(props: CoreProvidersProps): ReactElement {\n const {\n ssr = false,\n ssrAppSize = DEFAULT_APP_SIZE,\n appSizeQueries = DEFAULT_APP_SIZE_QUERIES,\n portalContainer,\n children,\n } = props;\n return (\n <SsrProvider ssr={ssr}>\n <PortalContainerProvider container={portalContainer}>\n <UserInteractionModeProvider>\n <AppSizeProvider {...appSizeQueries} ssrSize={ssrAppSize}>\n {children}\n </AppSizeProvider>\n </UserInteractionModeProvider>\n </PortalContainerProvider>\n </SsrProvider>\n );\n}\n"],"names":["SsrProvider","UserInteractionModeProvider","AppSizeProvider","DEFAULT_APP_SIZE","DEFAULT_APP_SIZE_QUERIES","PortalContainerProvider","CoreProviders","props","ssr","ssrAppSize","appSizeQueries","portalContainer","children","container","ssrSize"],"mappings":"AAAA;;AAIA,SAASA,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,2BAA2B,QAAQ,+CAA+C;AAC3F,SAASC,eAAe,QAAQ,qCAAqC;AACrE,SAGEC,gBAAgB,EAChBC,wBAAwB,QACnB,6BAA6B;AAGpC,SAEEC,uBAAuB,QAClB,sCAAsC;AA0C7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BC,GACD,OAAO,SAASC,cAAcC,KAAyB;IACrD,MAAM,EACJC,MAAM,KAAK,EACXC,aAAaN,gBAAgB,EAC7BO,iBAAiBN,wBAAwB,EACzCO,eAAe,EACfC,QAAQ,EACT,GAAGL;IACJ,qBACE,KAACP;QAAYQ,KAAKA;kBAChB,cAAA,KAACH;YAAwBQ,WAAWF;sBAClC,cAAA,KAACV;0BACC,cAAA,KAACC;oBAAiB,GAAGQ,cAAc;oBAAEI,SAASL;8BAC3CG;;;;;AAMb"}
1
+ {"version":3,"sources":["../src/CoreProviders.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactElement, type ReactNode } from \"react\";\n\nimport { SsrProvider } from \"./SsrProvider.js\";\nimport { UserInteractionModeProvider } from \"./interaction/UserInteractionModeProvider.js\";\nimport { AppSizeProvider } from \"./media-queries/AppSizeProvider.js\";\nimport {\n type AppSize,\n type AppSizeQueries,\n DEFAULT_APP_SIZE,\n DEFAULT_APP_SIZE_QUERIES,\n} from \"./media-queries/appSize.js\";\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { type MenuConfigurationProvider } from \"./menu/MenuConfigurationProvider.js\";\nimport {\n type PortalContainer,\n PortalContainerProvider,\n} from \"./portal/PortalContainerProvider.js\";\nimport { type Snackbar } from \"./snackbar/Snackbar.js\";\nimport { type LocalStorageColorSchemeProvider } from \"./theme/LocalStorageColorSchemeProvider.js\";\nimport { type ThemeProvider } from \"./theme/ThemeProvider.js\";\nimport { type useColorSchemeProvider } from \"./theme/useColorSchemeProvider.js\";\nimport { type TooltipHoverModeProvider } from \"./tooltip/TooltipHoverModeProvider.js\";\nimport { type WritingDirectionProvider } from \"./typography/WritingDirectionProvider.js\";\n\n/* eslint-enable @typescript-eslint/no-unused-vars */\n\n/** @since 6.0.0 */\nexport interface ReactMDCoreConfiguration {\n /**\n * Set this to `true` if you are using SSR. This will update some hook\n * behavior so that you will not have mismatched initial state between server\n * and client and correctly rehydrate after initial render.\n *\n * @defaultValue `false`\n */\n ssr?: boolean;\n\n /**\n * @defaultValue `DEFAULT_APP_SIZE`\n * @see {@link DEFAULT_APP_SIZE}\n */\n ssrAppSize?: Readonly<AppSize>;\n\n /**\n * @defaultValue `DEFAULT_APP_SIZE_QUERIES`\n * @see {@link DEFAULT_APP_SIZE_QUERIES}\n */\n appSizeQueries?: Readonly<AppSizeQueries>;\n\n /** @see {@link PortalContainerProvider} */\n portalContainer?: PortalContainer;\n}\n\n/** @since 6.0.0 */\nexport interface CoreProvidersProps extends ReactMDCoreConfiguration {\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This is a convenience wrapper for initializing providers for react-md. This\n * includes configuration for:\n *\n * - {@link SsrProvider}\n * - {@link PortalContainerProvider}\n * - {@link AppSizeProvider}\n * - {@link UserInteractionModeProvider}\n *\n * This does not include every provider within `react-md` to help decrease the\n * bundle size for unused features. Here are some other providers that might be\n * useful to initialize near the root of your app:\n *\n * - {@link MenuConfigurationProvider} - If you want to render menus as sheets\n * on phones or other configuration.\n * - {@link LocalStorageColorSchemeProvider}/{@link useColorSchemeProvider} - If\n * you want to allow the user to select a light, dark, or system theme\n * - {@link WritingDirectionProvider} - If you need dynamic support for ltr and\n * rtl languages\n * - {@link ThemeProvider} - If you allow the user to dynamically configure the\n * `react-md` theme\n * - {@link TooltipHoverModeProvider} - If you want tooltips to appear\n * immediately for a time after another tooltip has become visible. You can\n * also configure the global visible delay.\n * - {@link Snackbar} - This isn't a provider but this is how you can display\n * alerts in your app\n *\n * @see {@link https://react-md.dev/components/core-providers | CoreProviders Demos}\n * @since 6.0.0\n */\nexport function CoreProviders(props: CoreProvidersProps): ReactElement {\n const {\n ssr = false,\n ssrAppSize = DEFAULT_APP_SIZE,\n appSizeQueries = DEFAULT_APP_SIZE_QUERIES,\n portalContainer,\n children,\n } = props;\n return (\n <SsrProvider ssr={ssr}>\n <PortalContainerProvider container={portalContainer}>\n <UserInteractionModeProvider>\n <AppSizeProvider {...appSizeQueries} ssrSize={ssrAppSize}>\n {children}\n </AppSizeProvider>\n </UserInteractionModeProvider>\n </PortalContainerProvider>\n </SsrProvider>\n );\n}\n"],"names":["SsrProvider","UserInteractionModeProvider","AppSizeProvider","DEFAULT_APP_SIZE","DEFAULT_APP_SIZE_QUERIES","PortalContainerProvider","CoreProviders","props","ssr","ssrAppSize","appSizeQueries","portalContainer","children","container","ssrSize"],"mappings":"AAAA;;AAIA,SAASA,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,2BAA2B,QAAQ,+CAA+C;AAC3F,SAASC,eAAe,QAAQ,qCAAqC;AACrE,SAGEC,gBAAgB,EAChBC,wBAAwB,QACnB,6BAA6B;AAGpC,SAEEC,uBAAuB,QAClB,sCAAsC;AA0C7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BC,GACD,OAAO,SAASC,cAAcC,KAAyB;IACrD,MAAM,EACJC,MAAM,KAAK,EACXC,aAAaN,gBAAgB,EAC7BO,iBAAiBN,wBAAwB,EACzCO,eAAe,EACfC,QAAQ,EACT,GAAGL;IACJ,qBACE,KAACP;QAAYQ,KAAKA;kBAChB,cAAA,KAACH;YAAwBQ,WAAWF;sBAClC,cAAA,KAACV;0BACC,cAAA,KAACC;oBAAiB,GAAGQ,cAAc;oBAAEI,SAASL;8BAC3CG;;;;;AAMb"}
@@ -13,7 +13,7 @@ export interface SsrProviderProps {
13
13
  /**
14
14
  * **Client Component**
15
15
  *
16
- * @see {@link https://next.react-md.dev/components/ssr-provider | SsrProvider Demos}
16
+ * @see {@link https://react-md.dev/components/ssr-provider | SsrProvider Demos}
17
17
  * @since 6.0.0
18
18
  */
19
19
  export declare function SsrProvider(props: SsrProviderProps): ReactElement;
@@ -12,7 +12,7 @@ context.displayName = "Ssr";
12
12
  /**
13
13
  * **Client Component**
14
14
  *
15
- * @see {@link https://next.react-md.dev/components/ssr-provider | SsrProvider Demos}
15
+ * @see {@link https://react-md.dev/components/ssr-provider | SsrProvider Demos}
16
16
  * @since 6.0.0
17
17
  */ export function SsrProvider(props) {
18
18
  const { ssr = false, children } = props;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/SsrProvider.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ReactElement,\n type ReactNode,\n createContext,\n useContext,\n useEffect,\n useState,\n} from \"react\";\n\nconst context = createContext(false);\nconst { Provider } = context;\ncontext.displayName = \"Ssr\";\n\n/**\n * @since 6.0.0\n */\nexport function useSsr(): boolean {\n return useContext(context);\n}\n\n/**\n * @since 6.0.0\n */\nexport interface SsrProviderProps {\n ssr?: boolean;\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * @see {@link https://next.react-md.dev/components/ssr-provider | SsrProvider Demos}\n * @since 6.0.0\n */\nexport function SsrProvider(props: SsrProviderProps): ReactElement {\n const { ssr = false, children } = props;\n const [isSsr, setSsr] = useState(ssr);\n useEffect(() => {\n setSsr(false);\n }, []);\n return <Provider value={isSsr}>{children}</Provider>;\n}\n"],"names":["createContext","useContext","useEffect","useState","context","Provider","displayName","useSsr","SsrProvider","props","ssr","children","isSsr","setSsr","value"],"mappings":"AAAA;;AAEA,SAGEA,aAAa,EACbC,UAAU,EACVC,SAAS,EACTC,QAAQ,QACH,QAAQ;AAEf,MAAMC,wBAAUJ,cAAc;AAC9B,MAAM,EAAEK,QAAQ,EAAE,GAAGD;AACrBA,QAAQE,WAAW,GAAG;AAEtB;;CAEC,GACD,OAAO,SAASC;IACd,OAAON,WAAWG;AACpB;AAUA;;;;;CAKC,GACD,OAAO,SAASI,YAAYC,KAAuB;IACjD,MAAM,EAAEC,MAAM,KAAK,EAAEC,QAAQ,EAAE,GAAGF;IAClC,MAAM,CAACG,OAAOC,OAAO,GAAGV,SAASO;IACjCR,UAAU;QACRW,OAAO;IACT,GAAG,EAAE;IACL,qBAAO,KAACR;QAASS,OAAOF;kBAAQD;;AAClC"}
1
+ {"version":3,"sources":["../src/SsrProvider.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ReactElement,\n type ReactNode,\n createContext,\n useContext,\n useEffect,\n useState,\n} from \"react\";\n\nconst context = createContext(false);\nconst { Provider } = context;\ncontext.displayName = \"Ssr\";\n\n/**\n * @since 6.0.0\n */\nexport function useSsr(): boolean {\n return useContext(context);\n}\n\n/**\n * @since 6.0.0\n */\nexport interface SsrProviderProps {\n ssr?: boolean;\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * @see {@link https://react-md.dev/components/ssr-provider | SsrProvider Demos}\n * @since 6.0.0\n */\nexport function SsrProvider(props: SsrProviderProps): ReactElement {\n const { ssr = false, children } = props;\n const [isSsr, setSsr] = useState(ssr);\n useEffect(() => {\n setSsr(false);\n }, []);\n return <Provider value={isSsr}>{children}</Provider>;\n}\n"],"names":["createContext","useContext","useEffect","useState","context","Provider","displayName","useSsr","SsrProvider","props","ssr","children","isSsr","setSsr","value"],"mappings":"AAAA;;AAEA,SAGEA,aAAa,EACbC,UAAU,EACVC,SAAS,EACTC,QAAQ,QACH,QAAQ;AAEf,MAAMC,wBAAUJ,cAAc;AAC9B,MAAM,EAAEK,QAAQ,EAAE,GAAGD;AACrBA,QAAQE,WAAW,GAAG;AAEtB;;CAEC,GACD,OAAO,SAASC;IACd,OAAON,WAAWG;AACpB;AAUA;;;;;CAKC,GACD,OAAO,SAASI,YAAYC,KAAuB;IACjD,MAAM,EAAEC,MAAM,KAAK,EAAEC,QAAQ,EAAE,GAAGF;IAClC,MAAM,CAACG,OAAOC,OAAO,GAAGV,SAASO;IACjCR,UAAU;QACRW,OAAO;IACT,GAAG,EAAE;IACL,qBAAO,KAACR;QAASS,OAAOF;kBAAQD;;AAClC"}
@@ -47,7 +47,7 @@ import { type AutocompleteMultiSelectProps, type AutocompleteOption, type Autoco
47
47
  * }
48
48
  * ```
49
49
  *
50
- * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
50
+ * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}
51
51
  * @since 6.0.0
52
52
  */
53
53
  export declare function Autocomplete<Option extends AutocompleteOption>(props: AutocompleteSingleSelectProps<Option>): ReactElement;
@@ -87,7 +87,7 @@ export declare function Autocomplete<Option extends AutocompleteOption>(props: A
87
87
  * }
88
88
  * ```
89
89
  *
90
- * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
90
+ * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}
91
91
  * @since 6.0.0
92
92
  */
93
93
  export declare function Autocomplete<Option extends AutocompleteOption>(props: AutocompleteMultiSelectProps<Option>): ReactElement;
@@ -16,7 +16,7 @@ import { defaultAutocompleteFilter, noopAutocompleteFilter } from "./defaults.js
16
16
  import { useAutocomplete } from "./useAutocomplete.js";
17
17
  const noop = ()=>undefined;
18
18
  /**
19
- * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
19
+ * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}
20
20
  * @since 6.0.0
21
21
  * @internal
22
22
  */ export function Autocomplete(props) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/autocomplete/Autocomplete.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactElement } from \"react\";\n\nimport { Listbox } from \"../form/Listbox.js\";\nimport { TextField } from \"../form/TextField.js\";\nimport { ListSubheader } from \"../list/ListSubheader.js\";\nimport { KeyboardMovementProvider } from \"../movement/useKeyboardMovementProvider.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport { AutocompleteChip } from \"./AutocompleteChip.js\";\nimport { AutocompleteCircularProgress } from \"./AutocompleteCircularProgress.js\";\nimport { AutocompleteClearButton } from \"./AutocompleteClearButton.js\";\nimport { AutocompleteDropdownButton } from \"./AutocompleteDropdownButton.js\";\nimport { AutocompleteListboxChildren } from \"./AutocompleteListboxChildren.js\";\nimport { autocomplete, autocompleteRightAddon } from \"./autocompleteStyles.js\";\nimport {\n defaultAutocompleteFilter,\n noopAutocompleteFilter,\n} from \"./defaults.js\";\nimport {\n type AutocompleteMultiSelectProps,\n type AutocompleteOption,\n type AutocompleteProps,\n type AutocompleteSingleSelectProps,\n} from \"./types.js\";\nimport { useAutocomplete } from \"./useAutocomplete.js\";\n\nconst noop = (): undefined => undefined;\n\n/**\n * An `Autocomplete` is a component that allows for real-time suggestions from\n * a pre-determined list as the user types by filtering data based on the\n * current value. It can also be used to interact with an API that handles the\n * sorting, filtering, matching, etc as well.\n *\n * An `Autocomplete` always requires the following props:\n *\n * - `options` - a list of available options that can be a list of strings,\n * a list of objects with a `{ label: string }`, or any list of objects\n * - if the list of objects do not have a `label`, the\n * {@link AutocompleteProps.getOptionLabel} **must** be provided to allow\n * filtering\n * - `label` or `aria-label` to describe the textbox for accessibility\n * - `listboxLabel` or `listboxLabelledBy` for an accessible label describing the options\n *\n * @example Simple Example\n * ```tsx\n * \"use client\";\n *\n * import { Autocomplete } from \"@react-md/core/autocomplete/Autocomplete\";\n * import { type ReactElement } from \"react\";\n *\n * export default function SimpleExample(): ReactElement {\n * return (\n * <Autocomplete\n * label=\"Fruit\"\n * placeholder=\"Apple\"\n * listboxLabel=\"Fruits\"\n * options={[\n * \"Apple\",\n * \"Apricot\",\n * \"Banana\",\n * \"Blueberry\",\n * \"Cranberry\",\n * \"Kiwi\",\n * \"Mango\",\n * \"Orange\",\n * \"Peach\",\n * \"Plum\",\n * \"Strawberry\",\n * ]}\n * />\n * );\n * }\n * ```\n *\n * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n */\nexport function Autocomplete<Option extends AutocompleteOption>(\n props: AutocompleteSingleSelectProps<Option>\n): ReactElement;\n/**\n * To create an `Autocomplete` that can have multiple values selected at once,\n * either provide an array `value` or `defaultValue`.\n *\n * @example Simple Example\n * ```tsx\n * \"use client\";\n *\n * import { Autocomplete } from \"@react-md/core/autocomplete/Autocomplete\";\n * import { type ReactElement, useState } from \"react\";\n *\n * export default function SimpleExample(): ReactElement {\n * const [value, setValue] = useState<readonly Dessert[]>([]);\n * return (\n * <Autocomplete\n * label=\"Fruit\"\n * placeholder=\"Apple\"\n * listboxLabel=\"Fruits\"\n * options={[\n * \"Apple\",\n * \"Apricot\",\n * \"Banana\",\n * \"Blueberry\",\n * \"Cranberry\",\n * \"Kiwi\",\n * \"Mango\",\n * \"Orange\",\n * \"Peach\",\n * \"Plum\",\n * \"Strawberry\",\n * ]}\n * />\n * );\n * }\n * ```\n *\n * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n */\nexport function Autocomplete<Option extends AutocompleteOption>(\n props: AutocompleteMultiSelectProps<Option>\n): ReactElement;\n/**\n * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n * @internal\n */\nexport function Autocomplete<Option extends AutocompleteOption>(\n props: AutocompleteProps<Option>\n): ReactElement {\n const {\n id: propId,\n onBlur,\n onFocus,\n onClick,\n onChange,\n onKeyDown,\n onOpen,\n type,\n className,\n inputRef,\n children,\n filter = type === \"search\"\n ? noopAutocompleteFilter\n : defaultAutocompleteFilter,\n filterSelected,\n value,\n setValue,\n defaultValue,\n onValueChange,\n query,\n setQuery,\n defaultQuery,\n options,\n getOptionLabel: propGetOptionLabel,\n getOptionProps: propGetOptionProps,\n allowAnyValue,\n listboxProps,\n listboxLabel,\n listboxLabelledBy,\n selectedIcon,\n unselectedIcon,\n selectedIconAfter,\n checkboxes,\n disableSelectedIcon,\n loading,\n loadingProps,\n dropdownButtonProps,\n disableDropdownButton,\n clearButtonProps,\n disableClearButton,\n clearButtonVisibility = \"query\",\n noOptionsChildren = <ListSubheader>No Options</ListSubheader>,\n leftAddon: propLeftAddon,\n disableLeftAddonStyles: propDisableLeftAddonStyles,\n labelProps,\n rightAddon,\n rightAddonProps,\n containerProps,\n getChipProps = noop,\n updateQueryOnSelect,\n visible,\n setVisible,\n defaultVisible,\n disableInlineChips,\n disableCloseOnSelect,\n ...remaining\n } = props;\n const { form, disabled } = props;\n\n const id = useEnsuredId(propId, \"autocomplete\");\n const menuId = useEnsuredId(listboxProps?.id, \"autocomplete-listbox\");\n const {\n query: currentQuery,\n value: currentValue,\n setValue: currentSetValue,\n multiselect,\n comboboxRef: inputNodeRef,\n comboboxProps,\n movementContext,\n availableOptions,\n getOptionLabel,\n getOptionProps,\n getListboxProps,\n getClearButtonProps,\n getDropdownButtonProps,\n } = useAutocomplete({\n form,\n onBlur,\n onFocus,\n onClick,\n onChange,\n onKeyDown,\n onOpen,\n disabled,\n filter,\n filterSelected,\n popupId: menuId,\n popupRef: listboxProps?.ref,\n comboboxId: id,\n comboboxRef: inputRef,\n options,\n getOptionLabel: propGetOptionLabel,\n getOptionProps: propGetOptionProps,\n allowAnyValue,\n updateQueryOnSelect,\n value,\n setValue,\n defaultValue,\n onValueChange,\n query,\n setQuery,\n defaultQuery,\n defaultVisible,\n visible,\n setVisible,\n checkboxes,\n selectedIcon,\n unselectedIcon,\n selectedIconAfter,\n disableSelectedIcon,\n disableCloseOnSelect,\n });\n const [containerRef, containerRefCallback] = useEnsuredRef(\n containerProps?.ref\n );\n\n let leftAddon = propLeftAddon;\n let disableLeftAddonStyles = propDisableLeftAddonStyles;\n let inlineChips = false;\n let floatingActive = labelProps?.floatingActive;\n if (multiselect && !disableInlineChips) {\n inlineChips = true;\n // TODO: Maybe one day fix the typing? Might not be possible with\n // destructuring though\n const value = currentValue as readonly Option[];\n disableLeftAddonStyles ??= true;\n floatingActive ||= value.length > 0;\n leftAddon = (\n <>\n {value.map((option, index) => {\n const label = getOptionLabel(option);\n const overrides = getChipProps({\n index,\n query: currentQuery,\n option,\n extractor: getOptionLabel,\n });\n return (\n <AutocompleteChip\n key={label}\n {...overrides}\n onClick={(event) => {\n overrides?.onClick?.(event);\n currentSetValue(value.filter((v) => v !== option));\n }}\n >\n {overrides?.children ?? label}\n </AutocompleteChip>\n );\n })}\n </>\n );\n }\n\n return (\n <KeyboardMovementProvider value={movementContext}>\n <TextField\n {...remaining}\n {...comboboxProps}\n containerProps={{\n ...containerProps,\n ref: containerRefCallback,\n onClick: (event) => {\n containerProps?.onClick?.(event);\n inputNodeRef.current?.focus();\n },\n }}\n className={autocomplete({\n className,\n loading,\n inlineChips,\n disableClearButton,\n disableDropdownButton,\n })}\n labelProps={{\n ...labelProps,\n floatingActive,\n }}\n leftAddon={leftAddon}\n disableLeftAddonStyles={disableLeftAddonStyles}\n rightAddon={\n <>\n {rightAddon}\n {loading && <AutocompleteCircularProgress {...loadingProps} />}\n {!disableClearButton && (\n <AutocompleteClearButton\n {...clearButtonProps}\n visibility={clearButtonVisibility}\n {...getClearButtonProps(clearButtonProps)}\n />\n )}\n {!disableDropdownButton && (\n <AutocompleteDropdownButton\n aria-label={listboxLabel as string}\n aria-labelledby={listboxLabelledBy}\n {...getDropdownButtonProps(dropdownButtonProps)}\n />\n )}\n </>\n }\n rightAddonProps={{\n ...rightAddonProps,\n pointerEvents: true,\n className: autocompleteRightAddon({\n className: rightAddonProps?.className,\n }),\n }}\n />\n <Listbox\n aria-label={listboxLabel as string}\n aria-labelledby={listboxLabelledBy}\n {...getListboxProps(listboxProps)}\n fixedTo={containerRef}\n >\n <AutocompleteListboxChildren\n query={currentQuery}\n options={availableOptions}\n getOptionLabel={getOptionLabel}\n getOptionProps={getOptionProps}\n noOptionsChildren={noOptionsChildren}\n >\n {children}\n </AutocompleteListboxChildren>\n </Listbox>\n </KeyboardMovementProvider>\n );\n}\n"],"names":["Listbox","TextField","ListSubheader","KeyboardMovementProvider","useEnsuredId","useEnsuredRef","AutocompleteChip","AutocompleteCircularProgress","AutocompleteClearButton","AutocompleteDropdownButton","AutocompleteListboxChildren","autocomplete","autocompleteRightAddon","defaultAutocompleteFilter","noopAutocompleteFilter","useAutocomplete","noop","undefined","Autocomplete","props","id","propId","onBlur","onFocus","onClick","onChange","onKeyDown","onOpen","type","className","inputRef","children","filter","filterSelected","value","setValue","defaultValue","onValueChange","query","setQuery","defaultQuery","options","getOptionLabel","propGetOptionLabel","getOptionProps","propGetOptionProps","allowAnyValue","listboxProps","listboxLabel","listboxLabelledBy","selectedIcon","unselectedIcon","selectedIconAfter","checkboxes","disableSelectedIcon","loading","loadingProps","dropdownButtonProps","disableDropdownButton","clearButtonProps","disableClearButton","clearButtonVisibility","noOptionsChildren","leftAddon","propLeftAddon","disableLeftAddonStyles","propDisableLeftAddonStyles","labelProps","rightAddon","rightAddonProps","containerProps","getChipProps","updateQueryOnSelect","visible","setVisible","defaultVisible","disableInlineChips","disableCloseOnSelect","remaining","form","disabled","menuId","currentQuery","currentValue","currentSetValue","multiselect","comboboxRef","inputNodeRef","comboboxProps","movementContext","availableOptions","getListboxProps","getClearButtonProps","getDropdownButtonProps","popupId","popupRef","ref","comboboxId","containerRef","containerRefCallback","inlineChips","floatingActive","length","map","option","index","label","overrides","extractor","event","v","current","focus","visibility","aria-label","aria-labelledby","pointerEvents","fixedTo"],"mappings":"AAAA;;AAIA,SAASA,OAAO,QAAQ,qBAAqB;AAC7C,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,aAAa,QAAQ,2BAA2B;AACzD,SAASC,wBAAwB,QAAQ,6CAA6C;AACtF,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SAASC,4BAA4B,QAAQ,oCAAoC;AACjF,SAASC,uBAAuB,QAAQ,+BAA+B;AACvE,SAASC,0BAA0B,QAAQ,kCAAkC;AAC7E,SAASC,2BAA2B,QAAQ,mCAAmC;AAC/E,SAASC,YAAY,EAAEC,sBAAsB,QAAQ,0BAA0B;AAC/E,SACEC,yBAAyB,EACzBC,sBAAsB,QACjB,gBAAgB;AAOvB,SAASC,eAAe,QAAQ,uBAAuB;AAEvD,MAAMC,OAAO,IAAiBC;AAiG9B;;;;CAIC,GACD,OAAO,SAASC,aACdC,KAAgC;IAEhC,MAAM,EACJC,IAAIC,MAAM,EACVC,MAAM,EACNC,OAAO,EACPC,OAAO,EACPC,QAAQ,EACRC,SAAS,EACTC,MAAM,EACNC,IAAI,EACJC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,SAASJ,SAAS,WACdd,yBACAD,yBAAyB,EAC7BoB,cAAc,EACdC,KAAK,EACLC,QAAQ,EACRC,YAAY,EACZC,aAAa,E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AGmD,gBAAgB;4BACpBsD,YAAYpD;4BACX,GAAG+B,oBAAoBjC,iBAAiB;;wBAG5C,CAACD,uCACA,KAACjD;4BACCyG,cAAYlE;4BACZmE,mBAAiBlE;4BAChB,GAAG4C,uBAAuBpC,oBAAoB;;;;gBAKvDY,iBAAiB;oBACf,GAAGA,eAAe;oBAClB+C,eAAe;oBACfvF,WAAWjB,uBAAuB;wBAChCiB,WAAWwC,iBAAiBxC;oBAC9B;gBACF;;0BAEF,KAAC7B;gBACCkH,cAAYlE;gBACZmE,mBAAiBlE;gBAChB,GAAG0C,gBAAgB5C,aAAa;gBACjCsE,SAASnB;0BAET,cAAA,KAACxF;oBACC4B,OAAO4C;oBACPzC,SAASiD;oBACThD,gBAAgBA;oBAChBE,gBAAgBA;oBAChBkB,mBAAmBA;8BAElB/B;;;;;AAKX"}
1
+ {"version":3,"sources":["../../src/autocomplete/Autocomplete.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactElement } from \"react\";\n\nimport { Listbox } from \"../form/Listbox.js\";\nimport { TextField } from \"../form/TextField.js\";\nimport { ListSubheader } from \"../list/ListSubheader.js\";\nimport { KeyboardMovementProvider } from \"../movement/useKeyboardMovementProvider.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport { AutocompleteChip } from \"./AutocompleteChip.js\";\nimport { AutocompleteCircularProgress } from \"./AutocompleteCircularProgress.js\";\nimport { AutocompleteClearButton } from \"./AutocompleteClearButton.js\";\nimport { AutocompleteDropdownButton } from \"./AutocompleteDropdownButton.js\";\nimport { AutocompleteListboxChildren } from \"./AutocompleteListboxChildren.js\";\nimport { autocomplete, autocompleteRightAddon } from \"./autocompleteStyles.js\";\nimport {\n defaultAutocompleteFilter,\n noopAutocompleteFilter,\n} from \"./defaults.js\";\nimport {\n type AutocompleteMultiSelectProps,\n type AutocompleteOption,\n type AutocompleteProps,\n type AutocompleteSingleSelectProps,\n} from \"./types.js\";\nimport { useAutocomplete } from \"./useAutocomplete.js\";\n\nconst noop = (): undefined => undefined;\n\n/**\n * An `Autocomplete` is a component that allows for real-time suggestions from\n * a pre-determined list as the user types by filtering data based on the\n * current value. It can also be used to interact with an API that handles the\n * sorting, filtering, matching, etc as well.\n *\n * An `Autocomplete` always requires the following props:\n *\n * - `options` - a list of available options that can be a list of strings,\n * a list of objects with a `{ label: string }`, or any list of objects\n * - if the list of objects do not have a `label`, the\n * {@link AutocompleteProps.getOptionLabel} **must** be provided to allow\n * filtering\n * - `label` or `aria-label` to describe the textbox for accessibility\n * - `listboxLabel` or `listboxLabelledBy` for an accessible label describing the options\n *\n * @example Simple Example\n * ```tsx\n * \"use client\";\n *\n * import { Autocomplete } from \"@react-md/core/autocomplete/Autocomplete\";\n * import { type ReactElement } from \"react\";\n *\n * export default function SimpleExample(): ReactElement {\n * return (\n * <Autocomplete\n * label=\"Fruit\"\n * placeholder=\"Apple\"\n * listboxLabel=\"Fruits\"\n * options={[\n * \"Apple\",\n * \"Apricot\",\n * \"Banana\",\n * \"Blueberry\",\n * \"Cranberry\",\n * \"Kiwi\",\n * \"Mango\",\n * \"Orange\",\n * \"Peach\",\n * \"Plum\",\n * \"Strawberry\",\n * ]}\n * />\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n */\nexport function Autocomplete<Option extends AutocompleteOption>(\n props: AutocompleteSingleSelectProps<Option>\n): ReactElement;\n/**\n * To create an `Autocomplete` that can have multiple values selected at once,\n * either provide an array `value` or `defaultValue`.\n *\n * @example Simple Example\n * ```tsx\n * \"use client\";\n *\n * import { Autocomplete } from \"@react-md/core/autocomplete/Autocomplete\";\n * import { type ReactElement, useState } from \"react\";\n *\n * export default function SimpleExample(): ReactElement {\n * const [value, setValue] = useState<readonly Dessert[]>([]);\n * return (\n * <Autocomplete\n * label=\"Fruit\"\n * placeholder=\"Apple\"\n * listboxLabel=\"Fruits\"\n * options={[\n * \"Apple\",\n * \"Apricot\",\n * \"Banana\",\n * \"Blueberry\",\n * \"Cranberry\",\n * \"Kiwi\",\n * \"Mango\",\n * \"Orange\",\n * \"Peach\",\n * \"Plum\",\n * \"Strawberry\",\n * ]}\n * />\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n */\nexport function Autocomplete<Option extends AutocompleteOption>(\n props: AutocompleteMultiSelectProps<Option>\n): ReactElement;\n/**\n * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n * @internal\n */\nexport function Autocomplete<Option extends AutocompleteOption>(\n props: AutocompleteProps<Option>\n): ReactElement {\n const {\n id: propId,\n onBlur,\n onFocus,\n onClick,\n onChange,\n onKeyDown,\n onOpen,\n type,\n className,\n inputRef,\n children,\n filter = type === \"search\"\n ? noopAutocompleteFilter\n : defaultAutocompleteFilter,\n filterSelected,\n value,\n setValue,\n defaultValue,\n onValueChange,\n query,\n setQuery,\n defaultQuery,\n options,\n getOptionLabel: propGetOptionLabel,\n getOptionProps: propGetOptionProps,\n allowAnyValue,\n listboxProps,\n listboxLabel,\n listboxLabelledBy,\n selectedIcon,\n unselectedIcon,\n selectedIconAfter,\n checkboxes,\n disableSelectedIcon,\n loading,\n loadingProps,\n dropdownButtonProps,\n disableDropdownButton,\n clearButtonProps,\n disableClearButton,\n clearButtonVisibility = \"query\",\n noOptionsChildren = <ListSubheader>No Options</ListSubheader>,\n leftAddon: propLeftAddon,\n disableLeftAddonStyles: propDisableLeftAddonStyles,\n labelProps,\n rightAddon,\n rightAddonProps,\n containerProps,\n getChipProps = noop,\n updateQueryOnSelect,\n visible,\n setVisible,\n defaultVisible,\n disableInlineChips,\n disableCloseOnSelect,\n ...remaining\n } = props;\n const { form, disabled } = props;\n\n const id = useEnsuredId(propId, \"autocomplete\");\n const menuId = useEnsuredId(listboxProps?.id, \"autocomplete-listbox\");\n const {\n query: currentQuery,\n value: currentValue,\n setValue: currentSetValue,\n multiselect,\n comboboxRef: inputNodeRef,\n comboboxProps,\n movementContext,\n availableOptions,\n getOptionLabel,\n getOptionProps,\n getListboxProps,\n getClearButtonProps,\n getDropdownButtonProps,\n } = useAutocomplete({\n form,\n onBlur,\n onFocus,\n onClick,\n onChange,\n onKeyDown,\n onOpen,\n disabled,\n filter,\n filterSelected,\n popupId: menuId,\n popupRef: listboxProps?.ref,\n comboboxId: id,\n comboboxRef: inputRef,\n options,\n getOptionLabel: propGetOptionLabel,\n getOptionProps: propGetOptionProps,\n allowAnyValue,\n updateQueryOnSelect,\n value,\n setValue,\n defaultValue,\n onValueChange,\n query,\n setQuery,\n defaultQuery,\n defaultVisible,\n visible,\n setVisible,\n checkboxes,\n selectedIcon,\n unselectedIcon,\n selectedIconAfter,\n disableSelectedIcon,\n disableCloseOnSelect,\n });\n const [containerRef, containerRefCallback] = useEnsuredRef(\n containerProps?.ref\n );\n\n let leftAddon = propLeftAddon;\n let disableLeftAddonStyles = propDisableLeftAddonStyles;\n let inlineChips = false;\n let floatingActive = labelProps?.floatingActive;\n if (multiselect && !disableInlineChips) {\n inlineChips = true;\n // TODO: Maybe one day fix the typing? Might not be possible with\n // destructuring though\n const value = currentValue as readonly Option[];\n disableLeftAddonStyles ??= true;\n floatingActive ||= value.length > 0;\n leftAddon = (\n <>\n {value.map((option, index) => {\n const label = getOptionLabel(option);\n const overrides = getChipProps({\n index,\n query: currentQuery,\n option,\n extractor: getOptionLabel,\n });\n return (\n <AutocompleteChip\n key={label}\n {...overrides}\n onClick={(event) => {\n overrides?.onClick?.(event);\n currentSetValue(value.filter((v) => v !== option));\n }}\n >\n {overrides?.children ?? label}\n </AutocompleteChip>\n );\n })}\n </>\n );\n }\n\n return (\n <KeyboardMovementProvider value={movementContext}>\n <TextField\n {...remaining}\n {...comboboxProps}\n containerProps={{\n ...containerProps,\n ref: containerRefCallback,\n onClick: (event) => {\n containerProps?.onClick?.(event);\n inputNodeRef.current?.focus();\n },\n }}\n className={autocomplete({\n className,\n loading,\n inlineChips,\n disableClearButton,\n disableDropdownButton,\n })}\n labelProps={{\n ...labelProps,\n floatingActive,\n }}\n leftAddon={leftAddon}\n disableLeftAddonStyles={disableLeftAddonStyles}\n rightAddon={\n <>\n {rightAddon}\n {loading && <AutocompleteCircularProgress {...loadingProps} />}\n {!disableClearButton && (\n <AutocompleteClearButton\n {...clearButtonProps}\n visibility={clearButtonVisibility}\n {...getClearButtonProps(clearButtonProps)}\n />\n )}\n {!disableDropdownButton && (\n <AutocompleteDropdownButton\n aria-label={listboxLabel as string}\n aria-labelledby={listboxLabelledBy}\n {...getDropdownButtonProps(dropdownButtonProps)}\n />\n )}\n </>\n }\n rightAddonProps={{\n ...rightAddonProps,\n pointerEvents: true,\n className: autocompleteRightAddon({\n className: rightAddonProps?.className,\n }),\n }}\n />\n <Listbox\n aria-label={listboxLabel as string}\n aria-labelledby={listboxLabelledBy}\n {...getListboxProps(listboxProps)}\n fixedTo={containerRef}\n >\n <AutocompleteListboxChildren\n query={currentQuery}\n options={availableOptions}\n getOptionLabel={getOptionLabel}\n getOptionProps={getOptionProps}\n noOptionsChildren={noOptionsChildren}\n >\n {children}\n </AutocompleteListboxChildren>\n </Listbox>\n </KeyboardMovementProvider>\n );\n}\n"],"names":["Listbox","TextField","ListSubheader","KeyboardMovementProvider","useEnsuredId","useEnsuredRef","AutocompleteChip","AutocompleteCircularProgress","AutocompleteClearButton","AutocompleteDropdownButton","AutocompleteListboxChildren","autocomplete","autocompleteRightAddon","defaultAutocompleteFilter","noopAutocompleteFilter","useAutocomplete","noop","undefined","Autocomplete","props","id","propId","onBlur","onFocus","onClick","onChange","onKeyDown","onOpen","type","className","inputRef","children","filter","filterSelected","value","setValue","defaultValue","onValueChange","query","setQuery","defaultQuery","options","getOptionLabel","propGetOptionLabel","getOptionProps","propGetOptionProps","allowAnyValue","listboxProps","listboxLabel","listboxLabelledBy","selectedIcon","unselectedIcon","selectedIconAfter","checkboxes","disableSelectedIcon","loading","loadingProps","dropdownButtonProps","disableDropdownButton","clearButtonProps","disableClearButton","clearButtonVisibility","noOptionsChildren","leftAddon","propLeftAddon","disableLeftAddonStyles","propDisableLeftAddonStyles","labelProps","rightAddon","rightAddonProps","containerProps","getChipProps","updateQueryOnSelect","visible","setVisible","defaultVisible","disableInlineChips","disableCloseOnSelect","remaining","form","disabled","menuId","currentQuery","currentValue","currentSetValue","multiselect","comboboxRef","inputNodeRef","comboboxProps","movementContext","availableOptions","getListboxProps","getClearButtonProps","getDropdownButtonProps","popupId","popupRef","ref","comboboxId","containerRef","containerRefCallback","inlineChips","floatingActive","length","map","option","index","label","overrides","extractor","event","v","current","focus","visibility","aria-label","aria-labelledby","pointerEvents","fixedTo"],"mappings":"AAAA;;AAIA,SAASA,OAAO,QAAQ,qBAAqB;AAC7C,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,aAAa,QAAQ,2BAA2B;AACzD,SAASC,wBAAwB,QAAQ,6CAA6C;AACtF,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SAASC,4BAA4B,QAAQ,oCAAoC;AACjF,SAASC,uBAAuB,QAAQ,+BAA+B;AACvE,SAASC,0BAA0B,QAAQ,kCAAkC;AAC7E,SAASC,2BAA2B,QAAQ,mCAAmC;AAC/E,SAASC,YAAY,EAAEC,sBAAsB,QAAQ,0BAA0B;AAC/E,SACEC,yBAAyB,EACzBC,sBAAsB,QACjB,gBAAgB;AAOvB,SAASC,eAAe,QAAQ,uBAAuB;AAEvD,MAAMC,OAAO,IAAiBC;AAiG9B;;;;CAIC,GACD,OAAO,SAASC,aACdC,KAAgC;IAEhC,MAAM,EACJC,IAAIC,MAAM,EACVC,MAAM,EACNC,OAAO,EACPC,OAAO,EACPC,QAAQ,EACRC,SAAS,EACTC,MAAM,EACNC,IAAI,EACJC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,SAASJ,SAAS,WACdd,y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wBACAb,yBAAW,KAAChD;4BAA8B,GAAGiD,YAAY;;wBACzD,CAACI,oCACA,KAACpD;4BACE,GAAGmD,gBAAgB;4BACpBsD,YAAYpD;4BACX,GAAG+B,oBAAoBjC,iBAAiB;;wBAG5C,CAACD,uCACA,KAACjD;4BACCyG,cAAYlE;4BACZmE,mBAAiBlE;4BAChB,GAAG4C,uBAAuBpC,oBAAoB;;;;gBAKvDY,iBAAiB;oBACf,GAAGA,eAAe;oBAClB+C,eAAe;oBACfvF,WAAWjB,uBAAuB;wBAChCiB,WAAWwC,iBAAiBxC;oBAC9B;gBACF;;0BAEF,KAAC7B;gBACCkH,cAAYlE;gBACZmE,mBAAiBlE;gBAChB,GAAG0C,gBAAgB5C,aAAa;gBACjCsE,SAASnB;0BAET,cAAA,KAACxF;oBACC4B,OAAO4C;oBACPzC,SAASiD;oBACThD,gBAAgBA;oBAChBE,gBAAgBA;oBAChBkB,mBAAmBA;8BAElB/B;;;;;AAKX"}
@@ -3,7 +3,7 @@ import { type AutocompleteChipProps } from "./types.js";
3
3
  * A small wrapper around the `Chip` that defaults the `rightAddon` to the
4
4
  * remove icon and adds a default `aria-description`.
5
5
  *
6
- * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
6
+ * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}
7
7
  * @since 6.0.0
8
8
  */
9
9
  export declare const AutocompleteChip: import("react").ForwardRefExoticComponent<AutocompleteChipProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -7,7 +7,7 @@ import { autocompleteChip } from "./autocompleteStyles.js";
7
7
  * A small wrapper around the `Chip` that defaults the `rightAddon` to the
8
8
  * remove icon and adds a default `aria-description`.
9
9
  *
10
- * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
10
+ * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}
11
11
  * @since 6.0.0
12
12
  */ export const AutocompleteChip = /*#__PURE__*/ forwardRef(function AutocompleteChip(props, ref) {
13
13
  const { "aria-description": propAriaDescription, children, className, removeIcon: propRemoveIcon, rightAddon: propRightAddon, ...remaining } = props;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/autocomplete/AutocompleteChip.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\n\nimport { Chip } from \"../chip/Chip.js\";\nimport { getIcon } from \"../icon/config.js\";\nimport { autocompleteChip } from \"./autocompleteStyles.js\";\nimport { type AutocompleteChipProps } from \"./types.js\";\n\n/**\n * A small wrapper around the `Chip` that defaults the `rightAddon` to the\n * remove icon and adds a default `aria-description`.\n *\n * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n */\nexport const AutocompleteChip = forwardRef<\n HTMLButtonElement,\n AutocompleteChipProps\n>(function AutocompleteChip(props, ref) {\n const {\n \"aria-description\": propAriaDescription,\n children,\n className,\n removeIcon: propRemoveIcon,\n rightAddon: propRightAddon,\n ...remaining\n } = props;\n\n let rightAddon = propRightAddon;\n let ariaDescription = propAriaDescription;\n const removeIcon = getIcon(\"remove\", propRemoveIcon);\n if (typeof rightAddon === \"undefined\") {\n rightAddon = removeIcon;\n }\n\n if (typeof ariaDescription === \"undefined\" && typeof children === \"string\") {\n ariaDescription = `Remove \"${children}\"`;\n }\n\n return (\n <Chip\n {...remaining}\n aria-description={ariaDescription}\n ref={ref}\n rightAddon={rightAddon}\n className={autocompleteChip({ className })}\n >\n {children}\n </Chip>\n );\n});\n"],"names":["forwardRef","Chip","getIcon","autocompleteChip","AutocompleteChip","props","ref","propAriaDescription","children","className","removeIcon","propRemoveIcon","rightAddon","propRightAddon","remaining","ariaDescription","aria-description"],"mappings":";AAAA,SAASA,UAAU,QAAQ,QAAQ;AAEnC,SAASC,IAAI,QAAQ,kBAAkB;AACvC,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,gBAAgB,QAAQ,0BAA0B;AAG3D;;;;;;CAMC,GACD,OAAO,MAAMC,iCAAmBJ,WAG9B,SAASI,iBAAiBC,KAAK,EAAEC,GAAG;IACpC,MAAM,EACJ,oBAAoBC,mBAAmB,EACvCC,QAAQ,EACRC,SAAS,EACTC,YAAYC,cAAc,EAC1BC,YAAYC,cAAc,EAC1B,GAAGC,WACJ,GAAGT;IAEJ,IAAIO,aAAaC;IACjB,IAAIE,kBAAkBR;IACtB,MAAMG,aAAaR,QAAQ,UAAUS;IACrC,IAAI,OAAOC,eAAe,aAAa;QACrCA,aAAaF;IACf;IAEA,IAAI,OAAOK,oBAAoB,eAAe,OAAOP,aAAa,UAAU;QAC1EO,kBAAkB,CAAC,QAAQ,EAAEP,SAAS,CAAC,CAAC;IAC1C;IAEA,qBACE,KAACP;QACE,GAAGa,SAAS;QACbE,oBAAkBD;QAClBT,KAAKA;QACLM,YAAYA;QACZH,WAAWN,iBAAiB;YAAEM;QAAU;kBAEvCD;;AAGP,GAAG"}
1
+ {"version":3,"sources":["../../src/autocomplete/AutocompleteChip.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\n\nimport { Chip } from \"../chip/Chip.js\";\nimport { getIcon } from \"../icon/config.js\";\nimport { autocompleteChip } from \"./autocompleteStyles.js\";\nimport { type AutocompleteChipProps } from \"./types.js\";\n\n/**\n * A small wrapper around the `Chip` that defaults the `rightAddon` to the\n * remove icon and adds a default `aria-description`.\n *\n * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n */\nexport const AutocompleteChip = forwardRef<\n HTMLButtonElement,\n AutocompleteChipProps\n>(function AutocompleteChip(props, ref) {\n const {\n \"aria-description\": propAriaDescription,\n children,\n className,\n removeIcon: propRemoveIcon,\n rightAddon: propRightAddon,\n ...remaining\n } = props;\n\n let rightAddon = propRightAddon;\n let ariaDescription = propAriaDescription;\n const removeIcon = getIcon(\"remove\", propRemoveIcon);\n if (typeof rightAddon === \"undefined\") {\n rightAddon = removeIcon;\n }\n\n if (typeof ariaDescription === \"undefined\" && typeof children === \"string\") {\n ariaDescription = `Remove \"${children}\"`;\n }\n\n return (\n <Chip\n {...remaining}\n aria-description={ariaDescription}\n ref={ref}\n rightAddon={rightAddon}\n className={autocompleteChip({ className })}\n >\n {children}\n </Chip>\n );\n});\n"],"names":["forwardRef","Chip","getIcon","autocompleteChip","AutocompleteChip","props","ref","propAriaDescription","children","className","removeIcon","propRemoveIcon","rightAddon","propRightAddon","remaining","ariaDescription","aria-description"],"mappings":";AAAA,SAASA,UAAU,QAAQ,QAAQ;AAEnC,SAASC,IAAI,QAAQ,kBAAkB;AACvC,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,gBAAgB,QAAQ,0BAA0B;AAG3D;;;;;;CAMC,GACD,OAAO,MAAMC,iCAAmBJ,WAG9B,SAASI,iBAAiBC,KAAK,EAAEC,GAAG;IACpC,MAAM,EACJ,oBAAoBC,mBAAmB,EACvCC,QAAQ,EACRC,SAAS,EACTC,YAAYC,cAAc,EAC1BC,YAAYC,cAAc,EAC1B,GAAGC,WACJ,GAAGT;IAEJ,IAAIO,aAAaC;IACjB,IAAIE,kBAAkBR;IACtB,MAAMG,aAAaR,QAAQ,UAAUS;IACrC,IAAI,OAAOC,eAAe,aAAa;QACrCA,aAAaF;IACf;IAEA,IAAI,OAAOK,oBAAoB,eAAe,OAAOP,aAAa,UAAU;QAC1EO,kBAAkB,CAAC,QAAQ,EAAEP,SAAS,CAAC,CAAC;IAC1C;IAEA,qBACE,KAACP;QACE,GAAGa,SAAS;QACbE,oBAAkBD;QAClBT,KAAKA;QACLM,YAAYA;QACZH,WAAWN,iBAAiB;YAAEM;QAAU;kBAEvCD;;AAGP,GAAG"}
@@ -4,7 +4,7 @@ import { type AutocompleteCircularProgressProps } from "./types.js";
4
4
  * An internal component used to handle the styling and minimal accessibility
5
5
  * for the `CircularProgress` within the `Autocomplete`
6
6
  *
7
- * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
7
+ * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}
8
8
  * @internal
9
9
  * @since 6.0.0
10
10
  */
@@ -4,7 +4,7 @@ import { CircularProgress } from "../progress/CircularProgress.js";
4
4
  * An internal component used to handle the styling and minimal accessibility
5
5
  * for the `CircularProgress` within the `Autocomplete`
6
6
  *
7
- * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
7
+ * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}
8
8
  * @internal
9
9
  * @since 6.0.0
10
10
  */ export function AutocompleteCircularProgress(props) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/autocomplete/AutocompleteCircularProgress.tsx"],"sourcesContent":["import { type ReactElement } from \"react\";\n\nimport { CircularProgress } from \"../progress/CircularProgress.js\";\nimport { type AutocompleteCircularProgressProps } from \"./types.js\";\n\n/**\n * An internal component used to handle the styling and minimal accessibility\n * for the `CircularProgress` within the `Autocomplete`\n *\n * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}\n * @internal\n * @since 6.0.0\n */\nexport function AutocompleteCircularProgress(\n props: AutocompleteCircularProgressProps\n): ReactElement {\n const {\n \"aria-labelledby\": ariaLabelledby,\n \"aria-label\": ariaLabel = ariaLabelledby ? undefined : \"Loading\",\n theme = \"current-color\",\n ...remaining\n } = props;\n\n return (\n <CircularProgress\n {...remaining}\n aria-label={ariaLabel as string}\n aria-labelledby={ariaLabelledby}\n theme={theme}\n />\n );\n}\n"],"names":["CircularProgress","AutocompleteCircularProgress","props","ariaLabelledby","ariaLabel","undefined","theme","remaining","aria-label","aria-labelledby"],"mappings":";AAEA,SAASA,gBAAgB,QAAQ,kCAAkC;AAGnE;;;;;;;CAOC,GACD,OAAO,SAASC,6BACdC,KAAwC;IAExC,MAAM,EACJ,mBAAmBC,cAAc,EACjC,cAAcC,YAAYD,iBAAiBE,YAAY,SAAS,EAChEC,QAAQ,eAAe,EACvB,GAAGC,WACJ,GAAGL;IAEJ,qBACE,KAACF;QACE,GAAGO,SAAS;QACbC,cAAYJ;QACZK,mBAAiBN;QACjBG,OAAOA;;AAGb"}
1
+ {"version":3,"sources":["../../src/autocomplete/AutocompleteCircularProgress.tsx"],"sourcesContent":["import { type ReactElement } from \"react\";\n\nimport { CircularProgress } from \"../progress/CircularProgress.js\";\nimport { type AutocompleteCircularProgressProps } from \"./types.js\";\n\n/**\n * An internal component used to handle the styling and minimal accessibility\n * for the `CircularProgress` within the `Autocomplete`\n *\n * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}\n * @internal\n * @since 6.0.0\n */\nexport function AutocompleteCircularProgress(\n props: AutocompleteCircularProgressProps\n): ReactElement {\n const {\n \"aria-labelledby\": ariaLabelledby,\n \"aria-label\": ariaLabel = ariaLabelledby ? undefined : \"Loading\",\n theme = \"current-color\",\n ...remaining\n } = props;\n\n return (\n <CircularProgress\n {...remaining}\n aria-label={ariaLabel as string}\n aria-labelledby={ariaLabelledby}\n theme={theme}\n />\n );\n}\n"],"names":["CircularProgress","AutocompleteCircularProgress","props","ariaLabelledby","ariaLabel","undefined","theme","remaining","aria-label","aria-labelledby"],"mappings":";AAEA,SAASA,gBAAgB,QAAQ,kCAAkC;AAGnE;;;;;;;CAOC,GACD,OAAO,SAASC,6BACdC,KAAwC;IAExC,MAAM,EACJ,mBAAmBC,cAAc,EACjC,cAAcC,YAAYD,iBAAiBE,YAAY,SAAS,EAChEC,QAAQ,eAAe,EACvB,GAAGC,WACJ,GAAGL;IAEJ,qBACE,KAACF;QACE,GAAGO,SAAS;QACbC,cAAYJ;QACZK,mBAAiBN;QACjBG,OAAOA;;AAGb"}
@@ -3,7 +3,7 @@ import { type AutocompleteClearButtonProps } from "./types.js";
3
3
  /**
4
4
  * An internal component used for to clear the value from the `Autocomplete`.
5
5
  *
6
- * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
6
+ * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}
7
7
  * @internal
8
8
  * @since 6.0.0
9
9
  */
@@ -7,7 +7,7 @@ import { autocompleteClearButton } from "./autocompleteStyles.js";
7
7
  /**
8
8
  * An internal component used for to clear the value from the `Autocomplete`.
9
9
  *
10
- * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
10
+ * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}
11
11
  * @internal
12
12
  * @since 6.0.0
13
13
  */ export function AutocompleteClearButton(props) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/autocomplete/AutocompleteClearButton.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactElement } from \"react\";\n\nimport { Button } from \"../button/Button.js\";\nimport { getIcon } from \"../icon/config.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { autocompleteClearButton } from \"./autocompleteStyles.js\";\nimport { type AutocompleteClearButtonProps } from \"./types.js\";\n\n/**\n * An internal component used for to clear the value from the `Autocomplete`.\n *\n * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}\n * @internal\n * @since 6.0.0\n */\nexport function AutocompleteClearButton(\n props: AutocompleteClearButtonProps\n): ReactElement {\n const {\n id: propId,\n className,\n children,\n buttonType = \"icon\",\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel = buttonType === \"text\" || ariaLabelledBy\n ? undefined\n : \"Clear\",\n visibility,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"autocomplete-clear\");\n\n return (\n <Button\n {...remaining}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n id={id}\n className={autocompleteClearButton({ className, visibility })}\n tabIndex={-1}\n buttonType={buttonType}\n >\n {getIcon(\"clear\", children)}\n </Button>\n );\n}\n"],"names":["Button","getIcon","useEnsuredId","autocompleteClearButton","AutocompleteClearButton","props","id","propId","className","children","buttonType","ariaLabelledBy","ariaLabel","undefined","visibility","remaining","aria-label","aria-labelledby","tabIndex"],"mappings":"AAAA;;AAIA,SAASA,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,uBAAuB,QAAQ,0BAA0B;AAGlE;;;;;;CAMC,GACD,OAAO,SAASC,wBACdC,KAAmC;IAEnC,MAAM,EACJC,IAAIC,MAAM,EACVC,SAAS,EACTC,QAAQ,EACRC,aAAa,MAAM,EACnB,mBAAmBC,cAAc,EACjC,cAAcC,YAAYF,eAAe,UAAUC,iBAC/CE,YACA,OAAO,EACXC,UAAU,EACV,GAAGC,WACJ,GAAGV;IACJ,MAAMC,KAAKJ,aAAaK,QAAQ;IAEhC,qBACE,KAACP;QACE,GAAGe,SAAS;QACbC,cAAYJ;QACZK,mBAAiBN;QACjBL,IAAIA;QACJE,WAAWL,wBAAwB;YAAEK;YAAWM;QAAW;QAC3DI,UAAU,CAAC;QACXR,YAAYA;kBAEXT,QAAQ,SAASQ;;AAGxB"}
1
+ {"version":3,"sources":["../../src/autocomplete/AutocompleteClearButton.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactElement } from \"react\";\n\nimport { Button } from \"../button/Button.js\";\nimport { getIcon } from \"../icon/config.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { autocompleteClearButton } from \"./autocompleteStyles.js\";\nimport { type AutocompleteClearButtonProps } from \"./types.js\";\n\n/**\n * An internal component used for to clear the value from the `Autocomplete`.\n *\n * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}\n * @internal\n * @since 6.0.0\n */\nexport function AutocompleteClearButton(\n props: AutocompleteClearButtonProps\n): ReactElement {\n const {\n id: propId,\n className,\n children,\n buttonType = \"icon\",\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel = buttonType === \"text\" || ariaLabelledBy\n ? undefined\n : \"Clear\",\n visibility,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"autocomplete-clear\");\n\n return (\n <Button\n {...remaining}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n id={id}\n className={autocompleteClearButton({ className, visibility })}\n tabIndex={-1}\n buttonType={buttonType}\n >\n {getIcon(\"clear\", children)}\n </Button>\n );\n}\n"],"names":["Button","getIcon","useEnsuredId","autocompleteClearButton","AutocompleteClearButton","props","id","propId","className","children","buttonType","ariaLabelledBy","ariaLabel","undefined","visibility","remaining","aria-label","aria-labelledby","tabIndex"],"mappings":"AAAA;;AAIA,SAASA,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,uBAAuB,QAAQ,0BAA0B;AAGlE;;;;;;CAMC,GACD,OAAO,SAASC,wBACdC,KAAmC;IAEnC,MAAM,EACJC,IAAIC,MAAM,EACVC,SAAS,EACTC,QAAQ,EACRC,aAAa,MAAM,EACnB,mBAAmBC,cAAc,EACjC,cAAcC,YAAYF,eAAe,UAAUC,iBAC/CE,YACA,OAAO,EACXC,UAAU,EACV,GAAGC,WACJ,GAAGV;IACJ,MAAMC,KAAKJ,aAAaK,QAAQ;IAEhC,qBACE,KAACP;QACE,GAAGe,SAAS;QACbC,cAAYJ;QACZK,mBAAiBN;QACjBL,IAAIA;QACJE,WAAWL,wBAAwB;YAAEK;YAAWM;QAAW;QAC3DI,UAAU,CAAC;QACXR,YAAYA;kBAEXT,QAAQ,SAASQ;;AAGxB"}
@@ -5,7 +5,7 @@ import { type AutocompleteDropdownButtonProps } from "./types.js";
5
5
  * This is a simple `Button` wrapper to be used as a dropdown button within the
6
6
  * `Autocomplete`.
7
7
  *
8
- * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
8
+ * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}
9
9
  * @since 6.0.0
10
10
  */
11
11
  export declare function AutocompleteDropdownButton(props: LabelRequiredForA11y<AutocompleteDropdownButtonProps>): ReactElement;
@@ -9,7 +9,7 @@ import { autocompleteDropdownButton } from "./autocompleteStyles.js";
9
9
  * This is a simple `Button` wrapper to be used as a dropdown button within the
10
10
  * `Autocomplete`.
11
11
  *
12
- * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
12
+ * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}
13
13
  * @since 6.0.0
14
14
  */ export function AutocompleteDropdownButton(props) {
15
15
  const { id: propId, icon, visible, iconRotatorProps, className, ...remaining } = props;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/autocomplete/AutocompleteDropdownButton.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactElement } from \"react\";\n\nimport { Button } from \"../button/Button.js\";\nimport { IconRotator } from \"../icon/IconRotator.js\";\nimport { getIcon } from \"../icon/config.js\";\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { autocompleteDropdownButton } from \"./autocompleteStyles.js\";\nimport { type AutocompleteDropdownButtonProps } from \"./types.js\";\n\n/**\n * This is a simple `Button` wrapper to be used as a dropdown button within the\n * `Autocomplete`.\n *\n * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n */\nexport function AutocompleteDropdownButton(\n props: LabelRequiredForA11y<AutocompleteDropdownButtonProps>\n): ReactElement {\n const {\n id: propId,\n icon,\n visible,\n iconRotatorProps,\n className,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"autocomplete-dropdown\");\n\n return (\n <Button\n {...remaining}\n id={id}\n aria-expanded={visible}\n tabIndex={-1}\n buttonType=\"icon\"\n className={autocompleteDropdownButton({ className })}\n >\n <IconRotator {...iconRotatorProps} rotated={visible}>\n {getIcon(\"dropdown\", icon)}\n </IconRotator>\n </Button>\n );\n}\n"],"names":["Button","IconRotator","getIcon","useEnsuredId","autocompleteDropdownButton","AutocompleteDropdownButton","props","id","propId","icon","visible","iconRotatorProps","className","remaining","aria-expanded","tabIndex","buttonType","rotated"],"mappings":"AAAA;;AAIA,SAASA,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,0BAA0B,QAAQ,0BAA0B;AAGrE;;;;;;CAMC,GACD,OAAO,SAASC,2BACdC,KAA4D;IAE5D,MAAM,EACJC,IAAIC,MAAM,EACVC,IAAI,EACJC,OAAO,EACPC,gBAAgB,EAChBC,SAAS,EACT,GAAGC,WACJ,GAAGP;IAEJ,MAAMC,KAAKJ,aAAaK,QAAQ;IAEhC,qBACE,KAACR;QACE,GAAGa,SAAS;QACbN,IAAIA;QACJO,iBAAeJ;QACfK,UAAU,CAAC;QACXC,YAAW;QACXJ,WAAWR,2BAA2B;YAAEQ;QAAU;kBAElD,cAAA,KAACX;YAAa,GAAGU,gBAAgB;YAAEM,SAASP;sBACzCR,QAAQ,YAAYO;;;AAI7B"}
1
+ {"version":3,"sources":["../../src/autocomplete/AutocompleteDropdownButton.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactElement } from \"react\";\n\nimport { Button } from \"../button/Button.js\";\nimport { IconRotator } from \"../icon/IconRotator.js\";\nimport { getIcon } from \"../icon/config.js\";\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { autocompleteDropdownButton } from \"./autocompleteStyles.js\";\nimport { type AutocompleteDropdownButtonProps } from \"./types.js\";\n\n/**\n * This is a simple `Button` wrapper to be used as a dropdown button within the\n * `Autocomplete`.\n *\n * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n */\nexport function AutocompleteDropdownButton(\n props: LabelRequiredForA11y<AutocompleteDropdownButtonProps>\n): ReactElement {\n const {\n id: propId,\n icon,\n visible,\n iconRotatorProps,\n className,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"autocomplete-dropdown\");\n\n return (\n <Button\n {...remaining}\n id={id}\n aria-expanded={visible}\n tabIndex={-1}\n buttonType=\"icon\"\n className={autocompleteDropdownButton({ className })}\n >\n <IconRotator {...iconRotatorProps} rotated={visible}>\n {getIcon(\"dropdown\", icon)}\n </IconRotator>\n </Button>\n );\n}\n"],"names":["Button","IconRotator","getIcon","useEnsuredId","autocompleteDropdownButton","AutocompleteDropdownButton","props","id","propId","icon","visible","iconRotatorProps","className","remaining","aria-expanded","tabIndex","buttonType","rotated"],"mappings":"AAAA;;AAIA,SAASA,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,0BAA0B,QAAQ,0BAA0B;AAGrE;;;;;;CAMC,GACD,OAAO,SAASC,2BACdC,KAA4D;IAE5D,MAAM,EACJC,IAAIC,MAAM,EACVC,IAAI,EACJC,OAAO,EACPC,gBAAgB,EAChBC,SAAS,EACT,GAAGC,WACJ,GAAGP;IAEJ,MAAMC,KAAKJ,aAAaK,QAAQ;IAEhC,qBACE,KAACR;QACE,GAAGa,SAAS;QACbN,IAAIA;QACJO,iBAAeJ;QACfK,UAAU,CAAC;QACXC,YAAW;QACXJ,WAAWR,2BAA2B;YAAEQ;QAAU;kBAElD,cAAA,KAACX;YAAa,GAAGU,gBAAgB;YAAEM,SAASP;sBACzCR,QAAQ,YAAYO;;;AAI7B"}
@@ -31,7 +31,7 @@ $disable-clear-button: false !default;
31
31
  /// `disableClearButton` was enabled on the `Autocomplete`.
32
32
  ///
33
33
  /// @type Boolean
34
- $disable-clear-button-opacity-query: false !default;
34
+ $disable-clear-button-display-none-query: false !default;
35
35
 
36
36
  /// Set to `true` to disable the dropdown button styles
37
37
  /// @type Boolean
@@ -130,7 +130,7 @@ $_clear-button-hover-selector: "&:where(:not(:hover):not(:focus-within)) :where(
130
130
  // showing the clear button if the input has a value (or query)
131
131
  $_clear-button-valued-selector: "&:where(:has(:placeholder-shown)) :where(#{$_clear-button-selector + "--query"})";
132
132
 
133
- $_clear-button-opacity-selector: $_clear-button-hover-selector + ", "
133
+ $_clear-button-display-none-selector: $_clear-button-hover-selector + ", "
134
134
  $_clear-button-valued-selector;
135
135
 
136
136
  /// The available configurable css variables and mostly used internally for the
@@ -340,9 +340,12 @@ $variables: (
340
340
  }
341
341
  }
342
342
 
343
- @if not $disable-clear-button {
344
- #{$_clear-button-opacity-selector} {
345
- opacity: 0;
343
+ @if not
344
+ $disable-clear-button and not
345
+ $disable-clear-button-display-none-query
346
+ {
347
+ #{$_clear-button-display-none-selector} {
348
+ display: none;
346
349
  }
347
350
  }
348
351
 
@@ -3,14 +3,14 @@ import { type AutocompleteImplementation, type AutocompleteMultiSelectImplementa
3
3
  /**
4
4
  * This is the single select autocomplete implementation.
5
5
  *
6
- * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
6
+ * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}
7
7
  * @since 6.0.0
8
8
  */
9
9
  export declare function useAutocomplete<Option extends AutocompleteOption, ComboboxEl extends EditableHTMLElement = HTMLInputElement, PopupEl extends HTMLElement = HTMLElement>(options: AutocompleteSingleSelectOptions<Option, ComboboxEl, PopupEl>): AutocompleteSingleSelectImplementation<Option, ComboboxEl, PopupEl>;
10
10
  /**
11
11
  * This is the multiselect autocomplete implementation.
12
12
  *
13
- * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
13
+ * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}
14
14
  * @since 6.0.0
15
15
  */
16
16
  export declare function useAutocomplete<Option extends AutocompleteOption, ComboboxEl extends EditableHTMLElement = HTMLInputElement, PopupEl extends HTMLElement = HTMLElement>(options: AutocompleteMultiSelectOptions<Option, ComboboxEl, PopupEl>): AutocompleteMultiSelectImplementation<Option, ComboboxEl, PopupEl>;
@@ -18,7 +18,7 @@ export declare function useAutocomplete<Option extends AutocompleteOption, Combo
18
18
  * This is an internal override implementation where the types are less strict
19
19
  * so it can be used with the `Autocomplete` component.
20
20
  *
21
- * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
21
+ * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}
22
22
  * @since 6.0.0
23
23
  * @internal
24
24
  */
@@ -12,7 +12,7 @@ const noop = ()=>{
12
12
  // do nothing
13
13
  };
14
14
  /**
15
- * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
15
+ * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}
16
16
  * @since 6.0.0
17
17
  * @internal
18
18
  */ export function useAutocomplete(options) {
@@ -38,6 +38,7 @@ const noop = ()=>{
38
38
  }
39
39
  const disableCloseOnSelect = propDisableCloseOnSelect ?? (multiselect && checkboxes);
40
40
  const [query, setQuery] = useEnsuredState({
41
+ name: "query",
41
42
  value: propQuery,
42
43
  setValue: propSetQuery,
43
44
  defaultValue: getDefaultQuery({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/autocomplete/useAutocomplete.ts"],"sourcesContent":["\"use client\";\n\nimport { useCallback, useMemo, useRef } from \"react\";\n\nimport { useEditableCombobox } from \"../form/useEditableCombobox.js\";\nimport {\n type EditableHTMLElement,\n triggerManualChangeEvent,\n} from \"../form/utils.js\";\nimport { getIcon } from \"../icon/config.js\";\nimport { useUserInteractionMode } from \"../interaction/UserInteractionModeProvider.js\";\nimport { getTransitionCallbacks } from \"../transition/getTransitionCallbacks.js\";\nimport { useEnsuredState } from \"../useEnsuredState.js\";\nimport {\n defaultAutocompleteExtractor,\n defaultAutocompleteFilter,\n defaultAutocompleteGetOptionProps,\n noopAutocompleteFilter,\n} from \"./defaults.js\";\nimport {\n type AutocompleteImplementation,\n type AutocompleteMultiSelectImplementation,\n type AutocompleteMultiSelectOptions,\n type AutocompleteOption,\n type AutocompleteOptions,\n type AutocompleteSingleSelectImplementation,\n type AutocompleteSingleSelectOptions,\n} from \"./types.js\";\nimport {\n enforceSelectedValue,\n getDefaultQuery,\n getDefaultValue,\n isMultipleValues,\n} from \"./utils.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * This is the single select autocomplete implementation.\n *\n * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n */\nexport function useAutocomplete<\n Option extends AutocompleteOption,\n ComboboxEl extends EditableHTMLElement = HTMLInputElement,\n PopupEl extends HTMLElement = HTMLElement,\n>(\n options: AutocompleteSingleSelectOptions<Option, ComboboxEl, PopupEl>\n): AutocompleteSingleSelectImplementation<Option, ComboboxEl, PopupEl>;\n/**\n * This is the multiselect autocomplete implementation.\n *\n * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n */\nexport function useAutocomplete<\n Option extends AutocompleteOption,\n ComboboxEl extends EditableHTMLElement = HTMLInputElement,\n PopupEl extends HTMLElement = HTMLElement,\n>(\n options: AutocompleteMultiSelectOptions<Option, ComboboxEl, PopupEl>\n): AutocompleteMultiSelectImplementation<Option, ComboboxEl, PopupEl>;\n/**\n * This is an internal override implementation where the types are less strict\n * so it can be used with the `Autocomplete` component.\n *\n * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n * @internal\n */\nexport function useAutocomplete<\n Option extends AutocompleteOption,\n ComboboxEl extends EditableHTMLElement = HTMLInputElement,\n PopupEl extends HTMLElement = HTMLElement,\n>(\n options: AutocompleteOptions<Option, ComboboxEl, PopupEl>\n): AutocompleteImplementation<Option, ComboboxEl, PopupEl>;\n/**\n * @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n * @internal\n */\nexport function useAutocomplete<\n Option extends AutocompleteOption,\n ComboboxEl extends EditableHTMLElement = HTMLInputElement,\n PopupEl extends HTMLElement = HTMLElement,\n>(\n options: AutocompleteOptions<Option, ComboboxEl, PopupEl>\n): AutocompleteImplementation<Option, ComboboxEl, PopupEl> {\n const {\n value: propValue,\n setValue: propSetValue,\n defaultValue,\n onValueChange = noop,\n query: propQuery,\n setQuery: propSetQuery,\n defaultQuery,\n options: values,\n getOptionLabel = defaultAutocompleteExtractor,\n getOptionProps = defaultAutocompleteGetOptionProps,\n onBlur = noop,\n onChange = noop,\n onOpen = noop,\n filter = defaultAutocompleteFilter,\n filterSelected,\n allowAnyValue = filter === noopAutocompleteFilter,\n multiselect: propMultiselect,\n checkboxes,\n selectedIcon: propSelectedIcon,\n unselectedIcon: propUnselectedIcon,\n selectedIconAfter,\n disableSelectedIcon: propDisableSelectedIcon,\n updateQueryOnSelect: propUpdateQueryOnSelect,\n disableCloseOnSelect: propDisableCloseOnSelect,\n ...comboboxOptions\n } = options;\n\n const mode = useUserInteractionMode();\n const [value, setValueState] = useEnsuredState({\n value: propValue,\n setValue: propSetValue,\n defaultValue: getDefaultValue({\n query: propQuery,\n filter,\n multiselect: propMultiselect,\n defaultQuery,\n defaultValue,\n options: values,\n getOptionLabel,\n }),\n });\n const multiselect =\n propMultiselect ??\n (!!value && typeof value === \"object\" && \"length\" in value);\n let updateQueryOnSelect = propUpdateQueryOnSelect;\n if (typeof propUpdateQueryOnSelect === \"undefined\") {\n updateQueryOnSelect = multiselect ? \"clear\" : \"selected\";\n }\n\n const disableCloseOnSelect =\n propDisableCloseOnSelect ?? (multiselect && checkboxes);\n\n const [query, setQuery] = useEnsuredState({\n value: propQuery,\n setValue: propSetQuery,\n defaultValue: getDefaultQuery({\n value,\n getOptionLabel,\n defaultQuery,\n }),\n });\n const setValue = useCallback(\n (value: Option | null | readonly Option[]) => {\n onValueChange(value);\n setValueState(value);\n },\n [onValueChange, setValueState]\n );\n\n const combobox = useEditableCombobox<ComboboxEl, PopupEl>({\n ...comboboxOptions,\n multiselect,\n });\n const {\n visible,\n setVisible,\n popupRef,\n comboboxRef,\n comboboxProps,\n getMenuProps,\n } = combobox;\n\n // These refs are used to make it so that the options are not filtered until\n // the user types a new query while the listbox is visible. The filtered\n // options will be \"cached\" while:\n // - the listbox is closing\n // - the listbox is opening and:\n // - the user has not typed at least one letter\n // - the options have not changed\n const entered = useRef(visible);\n const initialQuery = useRef(\"\");\n const prevAvailableOptions = useRef<readonly Option[] | null>(null);\n const isQueryChange =\n query && query !== initialQuery.current && entered.current;\n\n let availableOptions = prevAvailableOptions.current || values;\n if (\n isQueryChange &&\n filter !== noopAutocompleteFilter &&\n !prevAvailableOptions.current\n ) {\n initialQuery.current = \"\";\n availableOptions = filter({\n list: values,\n query,\n extractor: getOptionLabel,\n });\n }\n\n // This is probably overkill, but `filterSelected` will create a quick-lookup\n // for all the selected values in a `Set` since it is much faster than\n // `Array.includes()`. The lookup will only be re-created whenever the `value`\n // changes or is uninitialized to prevent it being created each render as\n // well.\n //\n // These optimizations only start mattering when there are around 5000 items\n // selected...\n const selectedOptions = useMemo(() => {\n if (!filterSelected) {\n return null;\n }\n\n let optionList: readonly Option[] = [];\n if (isMultipleValues(value)) {\n optionList = value;\n } else if (value) {\n optionList = [value];\n }\n\n return new Set(optionList);\n }, [filterSelected, value]);\n\n if (filterSelected && selectedOptions?.size) {\n availableOptions = availableOptions.filter(\n (option) => !selectedOptions.has(option)\n );\n }\n\n return {\n ...combobox,\n value,\n setValue,\n query,\n setQuery,\n availableOptions,\n multiselect,\n comboboxProps: {\n ...comboboxProps,\n \"aria-autocomplete\": filter === noopAutocompleteFilter ? \"none\" : \"list\",\n value: query,\n onKeyDown(event) {\n comboboxProps.onKeyDown(event);\n if (!visible && event.key === \"Escape\") {\n setQuery(\"\");\n }\n },\n onBlur(event) {\n onBlur(event);\n\n if (allowAnyValue) {\n return;\n }\n\n enforceSelectedValue({\n value,\n visible,\n popupRef,\n container: event.currentTarget.parentElement,\n comboboxRef,\n getOptionLabel,\n availableOptions,\n prevAvailableOptions,\n });\n },\n onFocus(event) {\n comboboxProps.onFocus(event);\n event.currentTarget.select();\n },\n onChange(event) {\n onChange(event);\n\n const { value } = event.currentTarget;\n setQuery(value);\n if (!value && !multiselect) {\n setValue(null);\n }\n },\n },\n getListboxProps(overrides) {\n const {\n ref,\n onEnter,\n onEntered,\n onExited,\n disableTransition,\n ...listboxProps\n } = getMenuProps(overrides);\n\n let selectedIcon = propSelectedIcon;\n let unselectedIcon = propUnselectedIcon;\n let disableSelectedIcon = propDisableSelectedIcon;\n if (multiselect && checkboxes) {\n if (typeof selectedIcon === \"undefined\") {\n selectedIcon = getIcon(\"checkboxChecked\");\n }\n if (typeof unselectedIcon === \"undefined\") {\n unselectedIcon = getIcon(\"checkbox\");\n }\n } else if (typeof disableSelectedIcon === \"undefined\") {\n disableSelectedIcon = true;\n }\n\n return {\n selectedIcon,\n unselectedIcon,\n selectedIconAfter,\n disableSelectedIcon,\n ...listboxProps,\n disableTransition,\n onRequestClose() {\n // Make it so clicking on the text field, clear button, dropdown\n // button, etc does not close the listbox\n if (\n mode !== \"keyboard\" &&\n comboboxRef.current?.parentElement?.contains(document.activeElement)\n ) {\n return;\n }\n\n listboxProps.onRequestClose();\n },\n nodeRef: ref,\n value,\n setValue(option) {\n if (!disableCloseOnSelect) {\n // this makes it so that the options are not filtered again while the\n // listbox is closing after selecting a value\n prevAvailableOptions.current = availableOptions;\n }\n\n if (value && typeof value === \"object\" && \"length\" in value) {\n const nextValue = [...value];\n const i = value.indexOf(option);\n if (i === -1) {\n nextValue.push(option);\n } else {\n nextValue.splice(i, 1);\n }\n\n setValue(nextValue);\n } else {\n setValue(option);\n }\n\n if (updateQueryOnSelect === \"as-is\") {\n return;\n }\n\n const nextQuery =\n updateQueryOnSelect === \"clear\" ? \"\" : getOptionLabel(option);\n triggerManualChangeEvent(comboboxRef.current, nextQuery);\n },\n ...getTransitionCallbacks({\n enter: true,\n onEnter,\n onEntered,\n onEnterOnce: () => {\n onOpen();\n\n // when the listbox is opened, need to flag the entered state to show\n // that new `query` values should be accepted. Also store the initial\n // query.\n entered.current = true;\n initialQuery.current = query;\n },\n disableTransition,\n }),\n onExited() {\n onExited();\n\n // once the listbox has exited, reset any cached states so the next\n // time the listbox is opened the filtering behaves the same\n entered.current = false;\n prevAvailableOptions.current = null;\n },\n };\n },\n getOptionLabel,\n getOptionProps(options) {\n const overrides = getOptionProps(options);\n\n return {\n ...overrides,\n onClick: (event) => {\n overrides?.onClick?.(event);\n if (disableCloseOnSelect) {\n event.stopPropagation();\n }\n },\n };\n },\n getClearButtonProps(overrides) {\n return {\n ...overrides,\n onClick(event) {\n overrides?.onClick?.(event);\n comboboxRef.current?.focus();\n\n if (!multiselect) {\n setValue(null);\n }\n triggerManualChangeEvent(comboboxRef.current, \"\");\n },\n };\n },\n getDropdownButtonProps(overrides) {\n return {\n \"aria-controls\": comboboxProps.id,\n visible,\n ...overrides,\n onClick(event) {\n overrides?.onClick?.(event);\n comboboxRef.current?.focus();\n if (visible) {\n prevAvailableOptions.current = availableOptions;\n }\n setVisible((prev) => !prev);\n },\n };\n },\n };\n}\n"],"names":["useCallback","useMemo","useRef","useEditableCombobox","triggerManualChangeEvent","getIcon","useUserInteractionMode","getTransitionCallbacks","useEnsuredState","defaultAutocompleteExtractor","defaultAutocompleteFilter","defaultAutocompleteGetOptionProps","noopAutocompleteFilter","enforceSelectedValue","getDefaultQuery","getDefaultValue","isMultipleValues","noop","useAutocomplete","options","value","propValue","setValue","propSetValue","defaultValue","onValueChange","query","propQuery","setQuery","propSetQuery","defaultQuery","values","getOptionLabel","getOptionProps","onBlur","onChange","onOpen","filter","filterSelected","allowAnyValue","multiselect","propMultiselect","checkboxes","selectedIcon","propSelectedIcon","unselectedIcon","propUnselectedIcon","selectedIconAfter","disableSelectedIcon","propDisableSelectedIcon","updateQueryOnSelect","propUpdateQueryOnSelect","disableCloseOnSelect","propDisableCloseOnSelect","comboboxOptions","mode","setValueState","combobox","visible","setVisible","popupRef","comboboxRef","comboboxProps","getMenuProps","entered","initialQuery","prevAvailableOptions","isQueryChange","current","availableOptions","list","extractor","selectedOptions","optionList","Set","size","option","has","onKeyDown","event","key","container","currentTarget","parentElement","onFocus","select","getListboxProps","overrides","ref","onEnter","onEntered","onExited","disableTransition","listboxProps","onRequestClose","contains","document","activeElement","nodeRef","nextValue","i","indexOf","push","splice","nextQuery","enter","onEnterOnce","onClick","stopPropagation","getClearButtonProps","focus","getDropdownButtonProps","id","prev"],"mappings":"AAAA;AAEA,SAASA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C;oBACAgB,aAAa;wBACXtE;wBAEA,qEAAqE;wBACrE,qEAAqE;wBACrE,SAAS;wBACT4B,QAAQI,OAAO,GAAG;wBAClBH,aAAaG,OAAO,GAAG1C;oBACzB;oBACAkE;gBACF,EAAE;gBACFD;oBACEA;oBAEA,mEAAmE;oBACnE,4DAA4D;oBAC5D3B,QAAQI,OAAO,GAAG;oBAClBF,qBAAqBE,OAAO,GAAG;gBACjC;YACF;QACF;QACApC;QACAC,gBAAed,OAAO;YACpB,MAAMoE,YAAYtD,eAAed;YAEjC,OAAO;gBACL,GAAGoE,SAAS;gBACZoB,SAAS,CAAC5B;oBACRQ,WAAWoB,UAAU5B;oBACrB,IAAI3B,sBAAsB;wBACxB2B,MAAM6B,eAAe;oBACvB;gBACF;YACF;QACF;QACAC,qBAAoBtB,SAAS;YAC3B,OAAO;gBACL,GAAGA,SAAS;gBACZoB,SAAQ5B,KAAK;oBACXQ,WAAWoB,UAAU5B;oBACrBlB,YAAYO,OAAO,EAAE0C;oBAErB,IAAI,CAACtE,aAAa;wBAChBlB,SAAS;oBACX;oBACAlB,yBAAyByD,YAAYO,OAAO,EAAE;gBAChD;YACF;QACF;QACA2C,wBAAuBxB,SAAS;YAC9B,OAAO;gBACL,iBAAiBzB,cAAckD,EAAE;gBACjCtD;gBACA,GAAG6B,SAAS;gBACZoB,SAAQ5B,KAAK;oBACXQ,WAAWoB,UAAU5B;oBACrBlB,YAAYO,OAAO,EAAE0C;oBACrB,IAAIpD,SAAS;wBACXQ,qBAAqBE,OAAO,GAAGC;oBACjC;oBACAV,WAAW,CAACsD,OAAS,CAACA;gBACxB;YACF;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/autocomplete/useAutocomplete.ts"],"sourcesContent":["\"use client\";\n\nimport { useCallback, useMemo, useRef } from \"react\";\n\nimport { useEditableCombobox } from \"../form/useEditableCombobox.js\";\nimport {\n type EditableHTMLElement,\n triggerManualChangeEvent,\n} from \"../form/utils.js\";\nimport { getIcon } from \"../icon/config.js\";\nimport { useUserInteractionMode } from \"../interaction/UserInteractionModeProvider.js\";\nimport { getTransitionCallbacks } from \"../transition/getTransitionCallbacks.js\";\nimport { useEnsuredState } from \"../useEnsuredState.js\";\nimport {\n defaultAutocompleteExtractor,\n defaultAutocompleteFilter,\n defaultAutocompleteGetOptionProps,\n noopAutocompleteFilter,\n} from \"./defaults.js\";\nimport {\n type AutocompleteImplementation,\n type AutocompleteMultiSelectImplementation,\n type AutocompleteMultiSelectOptions,\n type AutocompleteOption,\n type AutocompleteOptions,\n type AutocompleteSingleSelectImplementation,\n type AutocompleteSingleSelectOptions,\n} from \"./types.js\";\nimport {\n enforceSelectedValue,\n getDefaultQuery,\n getDefaultValue,\n isMultipleValues,\n} from \"./utils.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * This is the single select autocomplete implementation.\n *\n * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n */\nexport function useAutocomplete<\n Option extends AutocompleteOption,\n ComboboxEl extends EditableHTMLElement = HTMLInputElement,\n PopupEl extends HTMLElement = HTMLElement,\n>(\n options: AutocompleteSingleSelectOptions<Option, ComboboxEl, PopupEl>\n): AutocompleteSingleSelectImplementation<Option, ComboboxEl, PopupEl>;\n/**\n * This is the multiselect autocomplete implementation.\n *\n * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n */\nexport function useAutocomplete<\n Option extends AutocompleteOption,\n ComboboxEl extends EditableHTMLElement = HTMLInputElement,\n PopupEl extends HTMLElement = HTMLElement,\n>(\n options: AutocompleteMultiSelectOptions<Option, ComboboxEl, PopupEl>\n): AutocompleteMultiSelectImplementation<Option, ComboboxEl, PopupEl>;\n/**\n * This is an internal override implementation where the types are less strict\n * so it can be used with the `Autocomplete` component.\n *\n * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n * @internal\n */\nexport function useAutocomplete<\n Option extends AutocompleteOption,\n ComboboxEl extends EditableHTMLElement = HTMLInputElement,\n PopupEl extends HTMLElement = HTMLElement,\n>(\n options: AutocompleteOptions<Option, ComboboxEl, PopupEl>\n): AutocompleteImplementation<Option, ComboboxEl, PopupEl>;\n/**\n * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}\n * @since 6.0.0\n * @internal\n */\nexport function useAutocomplete<\n Option extends AutocompleteOption,\n ComboboxEl extends EditableHTMLElement = HTMLInputElement,\n PopupEl extends HTMLElement = HTMLElement,\n>(\n options: AutocompleteOptions<Option, ComboboxEl, PopupEl>\n): AutocompleteImplementation<Option, ComboboxEl, PopupEl> {\n const {\n value: propValue,\n setValue: propSetValue,\n defaultValue,\n onValueChange = noop,\n query: propQuery,\n setQuery: propSetQuery,\n defaultQuery,\n options: values,\n getOptionLabel = defaultAutocompleteExtractor,\n getOptionProps = defaultAutocompleteGetOptionProps,\n onBlur = noop,\n onChange = noop,\n onOpen = noop,\n filter = defaultAutocompleteFilter,\n filterSelected,\n allowAnyValue = filter === noopAutocompleteFilter,\n multiselect: propMultiselect,\n checkboxes,\n selectedIcon: propSelectedIcon,\n unselectedIcon: propUnselectedIcon,\n selectedIconAfter,\n disableSelectedIcon: propDisableSelectedIcon,\n updateQueryOnSelect: propUpdateQueryOnSelect,\n disableCloseOnSelect: propDisableCloseOnSelect,\n ...comboboxOptions\n } = options;\n\n const mode = useUserInteractionMode();\n const [value, setValueState] = useEnsuredState({\n value: propValue,\n setValue: propSetValue,\n defaultValue: getDefaultValue({\n query: propQuery,\n filter,\n multiselect: propMultiselect,\n defaultQuery,\n defaultValue,\n options: values,\n getOptionLabel,\n }),\n });\n const multiselect =\n propMultiselect ??\n (!!value && typeof value === \"object\" && \"length\" in value);\n let updateQueryOnSelect = propUpdateQueryOnSelect;\n if (typeof propUpdateQueryOnSelect === \"undefined\") {\n updateQueryOnSelect = multiselect ? \"clear\" : \"selected\";\n }\n\n const disableCloseOnSelect =\n propDisableCloseOnSelect ?? (multiselect && checkboxes);\n\n const [query, setQuery] = useEnsuredState({\n name: \"query\",\n value: propQuery,\n setValue: propSetQuery,\n defaultValue: getDefaultQuery({\n value,\n getOptionLabel,\n defaultQuery,\n }),\n });\n const setValue = useCallback(\n (value: Option | null | readonly Option[]) => {\n onValueChange(value);\n setValueState(value);\n },\n [onValueChange, setValueState]\n );\n\n const combobox = useEditableCombobox<ComboboxEl, PopupEl>({\n ...comboboxOptions,\n multiselect,\n });\n const {\n visible,\n setVisible,\n popupRef,\n comboboxRef,\n comboboxProps,\n getMenuProps,\n } = combobox;\n\n // These refs are used to make it so that the options are not filtered until\n // the user types a new query while the listbox is visible. The filtered\n // options will be \"cached\" while:\n // - the listbox is closing\n // - the listbox is opening and:\n // - the user has not typed at least one letter\n // - the options have not changed\n const entered = useRef(visible);\n const initialQuery = useRef(\"\");\n const prevAvailableOptions = useRef<readonly Option[] | null>(null);\n const isQueryChange =\n query && query !== initialQuery.current && entered.current;\n\n let availableOptions = prevAvailableOptions.current || values;\n if (\n isQueryChange &&\n filter !== noopAutocompleteFilter &&\n !prevAvailableOptions.current\n ) {\n initialQuery.current = \"\";\n availableOptions = filter({\n list: values,\n query,\n extractor: getOptionLabel,\n });\n }\n\n // This is probably overkill, but `filterSelected` will create a quick-lookup\n // for all the selected values in a `Set` since it is much faster than\n // `Array.includes()`. The lookup will only be re-created whenever the `value`\n // changes or is uninitialized to prevent it being created each render as\n // well.\n //\n // These optimizations only start mattering when there are around 5000 items\n // selected...\n const selectedOptions = useMemo(() => {\n if (!filterSelected) {\n return null;\n }\n\n let optionList: readonly Option[] = [];\n if (isMultipleValues(value)) {\n optionList = value;\n } else if (value) {\n optionList = [value];\n }\n\n return new Set(optionList);\n }, [filterSelected, value]);\n\n if (filterSelected && selectedOptions?.size) {\n availableOptions = availableOptions.filter(\n (option) => !selectedOptions.has(option)\n );\n }\n\n return {\n ...combobox,\n value,\n setValue,\n query,\n setQuery,\n availableOptions,\n multiselect,\n comboboxProps: {\n ...comboboxProps,\n \"aria-autocomplete\": filter === noopAutocompleteFilter ? \"none\" : \"list\",\n value: query,\n onKeyDown(event) {\n comboboxProps.onKeyDown(event);\n if (!visible && event.key === \"Escape\") {\n setQuery(\"\");\n }\n },\n onBlur(event) {\n onBlur(event);\n\n if (allowAnyValue) {\n return;\n }\n\n enforceSelectedValue({\n value,\n visible,\n popupRef,\n container: event.currentTarget.parentElement,\n comboboxRef,\n getOptionLabel,\n availableOptions,\n prevAvailableOptions,\n });\n },\n onFocus(event) {\n comboboxProps.onFocus(event);\n event.currentTarget.select();\n },\n onChange(event) {\n onChange(event);\n\n const { value } = event.currentTarget;\n setQuery(value);\n if (!value && !multiselect) {\n setValue(null);\n }\n },\n },\n getListboxProps(overrides) {\n const {\n ref,\n onEnter,\n onEntered,\n onExited,\n disableTransition,\n ...listboxProps\n } = getMenuProps(overrides);\n\n let selectedIcon = propSelectedIcon;\n let unselectedIcon = propUnselectedIcon;\n let disableSelectedIcon = propDisableSelectedIcon;\n if (multiselect && checkboxes) {\n if (typeof selectedIcon === \"undefined\") {\n selectedIcon = getIcon(\"checkboxChecked\");\n }\n if (typeof unselectedIcon === \"undefined\") {\n unselectedIcon = getIcon(\"checkbox\");\n }\n } else if (typeof disableSelectedIcon === \"undefined\") {\n disableSelectedIcon = true;\n }\n\n return {\n selectedIcon,\n unselectedIcon,\n selectedIconAfter,\n disableSelectedIcon,\n ...listboxProps,\n disableTransition,\n onRequestClose() {\n // Make it so clicking on the text field, clear button, dropdown\n // button, etc does not close the listbox\n if (\n mode !== \"keyboard\" &&\n comboboxRef.current?.parentElement?.contains(document.activeElement)\n ) {\n return;\n }\n\n listboxProps.onRequestClose();\n },\n nodeRef: ref,\n value,\n setValue(option) {\n if (!disableCloseOnSelect) {\n // this makes it so that the options are not filtered again while the\n // listbox is closing after selecting a value\n prevAvailableOptions.current = availableOptions;\n }\n\n if (value && typeof value === \"object\" && \"length\" in value) {\n const nextValue = [...value];\n const i = value.indexOf(option);\n if (i === -1) {\n nextValue.push(option);\n } else {\n nextValue.splice(i, 1);\n }\n\n setValue(nextValue);\n } else {\n setValue(option);\n }\n\n if (updateQueryOnSelect === \"as-is\") {\n return;\n }\n\n const nextQuery =\n updateQueryOnSelect === \"clear\" ? \"\" : getOptionLabel(option);\n triggerManualChangeEvent(comboboxRef.current, nextQuery);\n },\n ...getTransitionCallbacks({\n enter: true,\n onEnter,\n onEntered,\n onEnterOnce: () => {\n onOpen();\n\n // when the listbox is opened, need to flag the entered state to show\n // that new `query` values should be accepted. Also store the initial\n // query.\n entered.current = true;\n initialQuery.current = query;\n },\n disableTransition,\n }),\n onExited() {\n onExited();\n\n // once the listbox has exited, reset any cached states so the next\n // time the listbox is opened the filtering behaves the same\n entered.current = false;\n prevAvailableOptions.current = null;\n },\n };\n },\n getOptionLabel,\n getOptionProps(options) {\n const overrides = getOptionProps(options);\n\n return {\n ...overrides,\n onClick: (event) => {\n overrides?.onClick?.(event);\n if (disableCloseOnSelect) {\n event.stopPropagation();\n }\n },\n };\n },\n getClearButtonProps(overrides) {\n return {\n ...overrides,\n onClick(event) {\n overrides?.onClick?.(event);\n comboboxRef.current?.focus();\n\n if (!multiselect) {\n setValue(null);\n }\n triggerManualChangeEvent(comboboxRef.current, \"\");\n },\n };\n },\n getDropdownButtonProps(overrides) {\n return {\n \"aria-controls\": comboboxProps.id,\n visible,\n ...overrides,\n onClick(event) {\n overrides?.onClick?.(event);\n comboboxRef.current?.focus();\n if (visible) {\n prevAvailableOptions.current = availableOptions;\n }\n setVisible((prev) => !prev);\n },\n };\n },\n };\n}\n"],"names":["useCallback","useMemo","useRef","useEditableCombobox","triggerManualChangeEvent","getIcon","useUserInteractionMode","getTransitionCallbacks","useEnsuredState","defaultAutocompleteExtractor","defaultAutocompleteFilter","defaultAutocompleteGetOptionProps","noopAutocompleteFilter","enforceSelectedValue","getDefaultQuery","getDefaultValue","isMultipleValues","noop","useAutocomplete","options","value","propValue","setValue","propSetValue","defaultValue","onValueChange","query","propQuery","setQuery","propSetQuery","defaultQuery","values","getOptionLabel","getOptionProps","onBlur","onChange","onOpen","filter","filterSelected","allowAnyValue","multiselect","propMultiselect","checkboxes","selectedIcon","propSelectedIcon","unselectedIcon","propUnselectedIcon","selectedIconAfter","disableSelectedIcon","propDisableSelectedIcon","updateQueryOnSelect","propUpdateQueryOnSelect","disableCloseOnSelect","propDisableCloseOnSelect","comboboxOptions","mode","setValueState","name","combobox","visible","setVisible","popupRef","comboboxRef","comboboxProps","getMenuProps","entered","initialQuery","prevAvailableOptions","isQueryChange","current","availableOptions","list","extractor","selectedOptions","optionList","Set","size","option","has","onKeyDown","event","key","container","currentTarget","parentElement","onFocus","select","getListboxProps","overrides","ref","onEnter","onEntered","onExited","disableTransition","listboxProps","onRequestClose","contains","document","activeElement","nodeRef","nextValue","i","indexOf","push","splice","nextQuery","enter","onEnterOnce","onClick","stopPropagation","getClearButtonProps","focus","getDropdownButtonProps","id","prev"],"mappings":"AAAA;AAEA,SAASA,WAAW,EAAEC,OAAO,EAAEC,MAAM,QAAQ,QAAQ;AAErD,SAASC,mBAAmB,QAAQ,iCAAiC;AACrE,SAEEC,wBAAwB,QACnB,mBAAmB;AAC1B,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,sBAAsB,QAAQ,gDAAgD;AACvF,SAASC,sBAAsB,QAAQ,0CAA0C;AACjF,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SACEC,4BAA4B,EAC5BC,yBAAyB,EACzBC,iCAAiC,EACjCC,sBAAsB,QACjB,gBAAgB;AAUvB,SACEC,oBAAoB,EACpBC,eAAe,EACfC,eAAe,EACfC,gBAAgB,QACX,aAAa;AAEpB,MAAMC,OAAO;AACX,aAAa;AACf;AA2CA;;;;CAIC,GACD,OAAO,SAASC,gBAKdC,OAAyD;IAEzD,MAAM,EACJC,OAAOC,SAAS,EAChBC,UAAUC,YAAY,EACtBC,YAAY,EACZC,gBAAgBR,IAAI,EACpBS,OAAOC,SAAS,EAChBC,UAAUC,YAAY,EACtBC,YAAY,EACZX,SAASY,M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a;wBAChBlB,SAAS;oBACX;oBACAlB,yBAAyB0D,YAAYO,OAAO,EAAE;gBAChD;YACF;QACF;QACA2C,wBAAuBxB,SAAS;YAC9B,OAAO;gBACL,iBAAiBzB,cAAckD,EAAE;gBACjCtD;gBACA,GAAG6B,SAAS;gBACZoB,SAAQ5B,KAAK;oBACXQ,WAAWoB,UAAU5B;oBACrBlB,YAAYO,OAAO,EAAE0C;oBACrB,IAAIpD,SAAS;wBACXQ,qBAAqBE,OAAO,GAAGC;oBACjC;oBACAV,WAAW,CAACsD,OAAS,CAACA;gBACxB;YACF;QACF;IACF;AACF"}
@@ -80,7 +80,7 @@ export interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, "colo
80
80
  * }
81
81
  * ```
82
82
  *
83
- * @see {@link https://next.react-md.dev/components/avatar | Avatar Demos}
83
+ * @see {@link https://react-md.dev/components/avatar | Avatar Demos}
84
84
  * @since 6.0.0 `aria-hidden` is set to `true` by default.
85
85
  */
86
86
  export declare const Avatar: import("react").ForwardRefExoticComponent<AvatarProps & import("react").RefAttributes<HTMLSpanElement>>;
@@ -17,7 +17,7 @@ import { avatar, avatarImage } from "./styles.js";
17
17
  * }
18
18
  * ```
19
19
  *
20
- * @see {@link https://next.react-md.dev/components/avatar | Avatar Demos}
20
+ * @see {@link https://react-md.dev/components/avatar | Avatar Demos}
21
21
  * @since 6.0.0 `aria-hidden` is set to `true` by default.
22
22
  */ export const Avatar = /*#__PURE__*/ forwardRef(function Avatar(props, ref) {
23
23
  const { "aria-hidden": ariaHidden = true, className, children, src, alt = "", size = "avatar", color = "", theme, imgProps, referrerPolicy, ...remaining } = props;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/avatar/Avatar.tsx"],"sourcesContent":["import {\n type HTMLAttributes,\n type ImgHTMLAttributes,\n type ReactNode,\n forwardRef,\n} from \"react\";\n\nimport { type PropsWithRef } from \"../types.js\";\nimport { type AvatarClassNameOptions, avatar, avatarImage } from \"./styles.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-avatar-background-color\"?: string;\n \"--rmd-avatar-color\"?: string;\n \"--rmd-avatar-border-color\"?: string;\n \"--rmd-avatar-border-radius\"?: string | number;\n \"--rmd-avatar-size\"?: string | number;\n \"--rmd-avatar-font-size\"?: string | number;\n }\n}\n\nexport type AvatarImgAttributes = ImgHTMLAttributes<HTMLImageElement>;\n\n/**\n * @since 6.0.0 `aria-hidden` is set to `true` by default and removed\n * the `role=\"presentation\"`.\n */\nexport interface AvatarProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, \"color\">,\n AvatarClassNameOptions {\n /**\n * Since avatars are normally presentational data, they are hidden from screen\n * readers by default.\n *\n * @defaultValue `true`\n */\n \"aria-hidden\"?: HTMLAttributes<HTMLSpanElement>[\"aria-hidden\"];\n\n /**\n * This should be an image `src` attribute to create an avatar from. When this\n * prop is defined, you should not add any children to the avatar as the\n * positioning will break.\n */\n src?: string;\n\n /**\n * An optional alt tag to display on the `<img>` when the `src` prop is also\n * applied.\n *\n * For accessibility and screen readers, you normally do not want to actually\n * provide this prop. This should only be used if the `Avatar` is not\n * accompanied by some other component or main content as it will be extra\n * noise for screen readers.\n *\n * @defaultValue `\"\"`\n */\n alt?: string;\n\n /**\n * An optional `referrerPolicy` to provide to the `<img>` element if the `src`\n * or `imgProps` props are provided.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-referrerpolicy|Referrer Policy}\n *\n * @since 2.2.0\n */\n referrerPolicy?: AvatarImgAttributes[\"referrerPolicy\"];\n\n /**\n * An optional object of image props and ref that can be used to create an\n * image within the `Avatar`. This can be useful to add a custom `style`\n * or`className` to the `<img>` element if that additional customization is\n * needed.\n *\n * Note: The values in this object will override the `src`, `alt`, and\n * `referrerPolicy` root level avatar props if they exist on this object.\n *\n * @since 2.2.0\n */\n imgProps?: PropsWithRef<AvatarImgAttributes, HTMLImageElement>;\n}\n\n/**\n * An `Avatar` is generally used to represent objects or people within your app.\n * The avatar can consist of an image, an icon, or some text to display. When\n * the avatar is not an image, different themes can be applied to make the\n * avatar more unique.\n *\n * @example Simple Example\n * ```tsx\n * import { Avatar } from \"@react-md/core/avatar/Avatar\";\n * import { type ReactElement } from \"react\";\n *\n * export function Example(): ReactElement {\n * return <Avatar src=\"/path-to-img.png\" />;\n * }\n * ```\n *\n * @see {@link https://next.react-md.dev/components/avatar | Avatar Demos}\n * @since 6.0.0 `aria-hidden` is set to `true` by default.\n */\nexport const Avatar = forwardRef<HTMLSpanElement, AvatarProps>(\n function Avatar(props, ref) {\n const {\n \"aria-hidden\": ariaHidden = true,\n className,\n children,\n src,\n alt = \"\",\n size = \"avatar\",\n color = \"\",\n theme,\n imgProps,\n referrerPolicy,\n ...remaining\n } = props;\n\n let img: ReactNode;\n if (src || imgProps) {\n img = (\n <img\n src={src}\n alt={alt}\n referrerPolicy={referrerPolicy}\n {...imgProps}\n className={avatarImage({ className: imgProps?.className })}\n />\n );\n }\n\n return (\n <span\n {...remaining}\n aria-hidden={ariaHidden}\n ref={ref}\n className={avatar({\n size,\n color,\n theme,\n className,\n })}\n >\n {img}\n {children}\n </span>\n );\n }\n);\n"],"names":["forwardRef","avatar","avatarImage","Avatar","props","ref","ariaHidden","className","children","src","alt","size","color","theme","imgProps","referrerPolicy","remaining","img","span","aria-hidden"],"mappings":";AAAA,SAIEA,UAAU,QACL,QAAQ;AAGf,SAAsCC,MAAM,EAAEC,WAAW,QAAQ,cAAc;AA0E/E;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,MAAMC,uBAASH,WACpB,SAASG,OAAOC,KAAK,EAAEC,GAAG;IACxB,MAAM,EACJ,eAAeC,aAAa,IAAI,EAChCC,SAAS,EACTC,QAAQ,EACRC,GAAG,EACHC,MAAM,EAAE,EACRC,OAAO,QAAQ,EACfC,QAAQ,EAAE,EACVC,KAAK,EACLC,QAAQ,EACRC,cAAc,EACd,GAAGC,WACJ,GAAGZ;IAEJ,IAAIa;IACJ,IAAIR,OAAOK,UAAU;QACnBG,oBACE,KAACA;YACCR,KAAKA;YACLC,KAAKA;YACLK,gBAAgBA;YACf,GAAGD,QAAQ;YACZP,WAAWL,YAAY;gBAAEK,WAAWO,UAAUP;YAAU;;IAG9D;IAEA,qBACE,MAACW;QACE,GAAGF,SAAS;QACbG,eAAab;QACbD,KAAKA;QACLE,WAAWN,OAAO;YAChBU;YACAC;YACAC;YACAN;QACF;;YAECU;YACAT;;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/avatar/Avatar.tsx"],"sourcesContent":["import {\n type HTMLAttributes,\n type ImgHTMLAttributes,\n type ReactNode,\n forwardRef,\n} from \"react\";\n\nimport { type PropsWithRef } from \"../types.js\";\nimport { type AvatarClassNameOptions, avatar, avatarImage } from \"./styles.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-avatar-background-color\"?: string;\n \"--rmd-avatar-color\"?: string;\n \"--rmd-avatar-border-color\"?: string;\n \"--rmd-avatar-border-radius\"?: string | number;\n \"--rmd-avatar-size\"?: string | number;\n \"--rmd-avatar-font-size\"?: string | number;\n }\n}\n\nexport type AvatarImgAttributes = ImgHTMLAttributes<HTMLImageElement>;\n\n/**\n * @since 6.0.0 `aria-hidden` is set to `true` by default and removed\n * the `role=\"presentation\"`.\n */\nexport interface AvatarProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, \"color\">,\n AvatarClassNameOptions {\n /**\n * Since avatars are normally presentational data, they are hidden from screen\n * readers by default.\n *\n * @defaultValue `true`\n */\n \"aria-hidden\"?: HTMLAttributes<HTMLSpanElement>[\"aria-hidden\"];\n\n /**\n * This should be an image `src` attribute to create an avatar from. When this\n * prop is defined, you should not add any children to the avatar as the\n * positioning will break.\n */\n src?: string;\n\n /**\n * An optional alt tag to display on the `<img>` when the `src` prop is also\n * applied.\n *\n * For accessibility and screen readers, you normally do not want to actually\n * provide this prop. This should only be used if the `Avatar` is not\n * accompanied by some other component or main content as it will be extra\n * noise for screen readers.\n *\n * @defaultValue `\"\"`\n */\n alt?: string;\n\n /**\n * An optional `referrerPolicy` to provide to the `<img>` element if the `src`\n * or `imgProps` props are provided.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-referrerpolicy|Referrer Policy}\n *\n * @since 2.2.0\n */\n referrerPolicy?: AvatarImgAttributes[\"referrerPolicy\"];\n\n /**\n * An optional object of image props and ref that can be used to create an\n * image within the `Avatar`. This can be useful to add a custom `style`\n * or`className` to the `<img>` element if that additional customization is\n * needed.\n *\n * Note: The values in this object will override the `src`, `alt`, and\n * `referrerPolicy` root level avatar props if they exist on this object.\n *\n * @since 2.2.0\n */\n imgProps?: PropsWithRef<AvatarImgAttributes, HTMLImageElement>;\n}\n\n/**\n * An `Avatar` is generally used to represent objects or people within your app.\n * The avatar can consist of an image, an icon, or some text to display. When\n * the avatar is not an image, different themes can be applied to make the\n * avatar more unique.\n *\n * @example Simple Example\n * ```tsx\n * import { Avatar } from \"@react-md/core/avatar/Avatar\";\n * import { type ReactElement } from \"react\";\n *\n * export function Example(): ReactElement {\n * return <Avatar src=\"/path-to-img.png\" />;\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/avatar | Avatar Demos}\n * @since 6.0.0 `aria-hidden` is set to `true` by default.\n */\nexport const Avatar = forwardRef<HTMLSpanElement, AvatarProps>(\n function Avatar(props, ref) {\n const {\n \"aria-hidden\": ariaHidden = true,\n className,\n children,\n src,\n alt = \"\",\n size = \"avatar\",\n color = \"\",\n theme,\n imgProps,\n referrerPolicy,\n ...remaining\n } = props;\n\n let img: ReactNode;\n if (src || imgProps) {\n img = (\n <img\n src={src}\n alt={alt}\n referrerPolicy={referrerPolicy}\n {...imgProps}\n className={avatarImage({ className: imgProps?.className })}\n />\n );\n }\n\n return (\n <span\n {...remaining}\n aria-hidden={ariaHidden}\n ref={ref}\n className={avatar({\n size,\n color,\n theme,\n className,\n })}\n >\n {img}\n {children}\n </span>\n );\n }\n);\n"],"names":["forwardRef","avatar","avatarImage","Avatar","props","ref","ariaHidden","className","children","src","alt","size","color","theme","imgProps","referrerPolicy","remaining","img","span","aria-hidden"],"mappings":";AAAA,SAIEA,UAAU,QACL,QAAQ;AAGf,SAAsCC,MAAM,EAAEC,WAAW,QAAQ,cAAc;AA0E/E;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,MAAMC,uBAASH,WACpB,SAASG,OAAOC,KAAK,EAAEC,GAAG;IACxB,MAAM,EACJ,eAAeC,aAAa,IAAI,EAChCC,SAAS,EACTC,QAAQ,EACRC,GAAG,EACHC,MAAM,EAAE,EACRC,OAAO,QAAQ,EACfC,QAAQ,EAAE,EACVC,KAAK,EACLC,QAAQ,EACRC,cAAc,EACd,GAAGC,WACJ,GAAGZ;IAEJ,IAAIa;IACJ,IAAIR,OAAOK,UAAU;QACnBG,oBACE,KAACA;YACCR,KAAKA;YACLC,KAAKA;YACLK,gBAAgBA;YACf,GAAGD,QAAQ;YACZP,WAAWL,YAAY;gBAAEK,WAAWO,UAAUP;YAAU;;IAG9D;IAEA,qBACE,MAACW;QACE,GAAGF,SAAS;QACbG,eAAab;QACbD,KAAKA;QACLE,WAAWN,OAAO;YAChBU;YACAC;YACAC;YACAN;QACF;;YAECU;YACAT;;;AAGP,GACA"}
@@ -42,7 +42,7 @@ export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
42
42
  * }
43
43
  * ```
44
44
  *
45
- * @see {@link https://next.react-md.dev/components/badge | Badge Demos}
45
+ * @see {@link https://react-md.dev/components/badge | Badge Demos}
46
46
  * @since 6.0.0 Removed the `disableNullOnZero` feature since it's
47
47
  * easier just to use condition rendering yourself.
48
48
  */
@@ -38,7 +38,7 @@ import { badge } from "./styles.js";
38
38
  * }
39
39
  * ```
40
40
  *
41
- * @see {@link https://next.react-md.dev/components/badge | Badge Demos}
41
+ * @see {@link https://react-md.dev/components/badge | Badge Demos}
42
42
  * @since 6.0.0 Removed the `disableNullOnZero` feature since it's
43
43
  * easier just to use condition rendering yourself.
44
44
  */ export const Badge = /*#__PURE__*/ forwardRef(function Badge(props, ref) {