@react-md/core 1.0.0-next.4 → 1.0.0-next.5

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 (1110) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/CHANGELOG.md +6 -0
  3. package/dist/CoreProviders.js.map +1 -0
  4. package/dist/NoSsr.js.map +1 -0
  5. package/dist/SsrProvider.js.map +1 -0
  6. package/dist/app-bar/AppBar.js.map +1 -0
  7. package/dist/app-bar/AppBarTitle.js.map +1 -0
  8. package/dist/avatar/Avatar.js.map +1 -0
  9. package/dist/avatar/styles.js.map +1 -0
  10. package/dist/badge/Badge.js.map +1 -0
  11. package/dist/box/Box.js.map +1 -0
  12. package/dist/box/styles.js.map +1 -0
  13. package/dist/button/AsyncButton.js.map +1 -0
  14. package/dist/button/Button.js.map +1 -0
  15. package/dist/button/ButtonUnstyled.js.map +1 -0
  16. package/dist/button/FloatingActionButton.js.map +1 -0
  17. package/dist/button/TooltippedButton.js.map +1 -0
  18. package/dist/button/buttonStyles.js.map +1 -0
  19. package/dist/button/buttonUnstyledStyles.js.map +1 -0
  20. package/dist/card/Card.js.map +1 -0
  21. package/dist/card/CardContent.js.map +1 -0
  22. package/dist/card/CardFooter.js.map +1 -0
  23. package/dist/card/CardHeader.js.map +1 -0
  24. package/dist/card/CardSubtitle.js.map +1 -0
  25. package/dist/card/CardTitle.js.map +1 -0
  26. package/dist/card/ClickableCard.js.map +1 -0
  27. package/dist/card/styles.js.map +1 -0
  28. package/dist/chip/Chip.js.map +1 -0
  29. package/dist/chip/styles.js.map +1 -0
  30. package/dist/cssUtils.js.map +1 -0
  31. package/dist/delegateEvent.js.map +1 -0
  32. package/dist/dialog/Dialog.js.map +1 -0
  33. package/dist/dialog/DialogContainer.js.map +1 -0
  34. package/dist/dialog/DialogContent.js.map +1 -0
  35. package/dist/dialog/DialogFooter.js.map +1 -0
  36. package/dist/dialog/DialogHeader.js.map +1 -0
  37. package/dist/dialog/DialogTitle.js.map +1 -0
  38. package/dist/dialog/FixedDialog.js.map +1 -0
  39. package/dist/dialog/NestedDialogProvider.js.map +1 -0
  40. package/dist/dialog/styles.js.map +1 -0
  41. package/dist/divider/Divider.js.map +1 -0
  42. package/dist/divider/styles.js.map +1 -0
  43. package/dist/draggable/useDraggable.js.map +1 -0
  44. package/dist/draggable/utils.js.map +1 -0
  45. package/dist/expansion-panel/ExpansionList.js.map +1 -0
  46. package/dist/expansion-panel/ExpansionPanel.js.map +1 -0
  47. package/dist/expansion-panel/ExpansionPanelHeader.js.map +1 -0
  48. package/dist/expansion-panel/useExpansionList.js.map +1 -0
  49. package/dist/expansion-panel/useExpansionPanels.js.map +1 -0
  50. package/dist/focus/useFocusContainer.js.map +1 -0
  51. package/dist/focus/utils.js.map +1 -0
  52. package/dist/form/Checkbox.js.map +1 -0
  53. package/dist/form/Fieldset.js.map +1 -0
  54. package/dist/form/FileInput.js.map +1 -0
  55. package/dist/form/Form.js.map +1 -0
  56. package/dist/form/FormMessage.js.map +1 -0
  57. package/dist/form/FormMessageContainer.js.map +1 -0
  58. package/dist/form/FormMessageCounter.js.map +1 -0
  59. package/dist/form/InputToggle.js.map +1 -0
  60. package/dist/form/InputToggleIcon.js.map +1 -0
  61. package/dist/form/Label.js.map +1 -0
  62. package/dist/form/Legend.js.map +1 -0
  63. package/dist/form/MenuItemCheckbox.js.map +1 -0
  64. package/dist/form/MenuItemFileInput.js.map +1 -0
  65. package/dist/form/MenuItemInputToggle.js.map +1 -0
  66. package/dist/form/MenuItemRadio.js.map +1 -0
  67. package/dist/form/MenuItemSwitch.js.map +1 -0
  68. package/dist/form/MenuItemTextField.js.map +1 -0
  69. package/dist/form/NativeSelect.js.map +1 -0
  70. package/dist/form/OptGroup.js.map +1 -0
  71. package/dist/form/Option.js.map +1 -0
  72. package/dist/form/Password.js.map +1 -0
  73. package/dist/form/Radio.js.map +1 -0
  74. package/dist/form/Select.js.map +1 -0
  75. package/dist/form/SelectValue.js.map +1 -0
  76. package/dist/form/Slider.js.map +1 -0
  77. package/dist/form/SliderContainer.js.map +1 -0
  78. package/dist/form/SliderMark.js.map +1 -0
  79. package/dist/form/SliderMarkLabel.js.map +1 -0
  80. package/dist/form/SliderThumb.js.map +1 -0
  81. package/dist/form/SliderTrack.js.map +1 -0
  82. package/dist/form/SliderValueMarks.js.map +1 -0
  83. package/dist/form/SliderValueTooltip.js.map +1 -0
  84. package/dist/form/Switch.js.map +1 -0
  85. package/dist/form/SwitchTrack.js.map +1 -0
  86. package/dist/form/TextArea.js.map +1 -0
  87. package/dist/form/TextField.js.map +1 -0
  88. package/dist/form/TextFieldAddon.js.map +1 -0
  89. package/dist/form/TextFieldContainer.js.map +1 -0
  90. package/dist/form/TextFieldContainerStyles.js.map +1 -0
  91. package/dist/form/fileUtils.js.map +1 -0
  92. package/dist/form/formConfig.js.map +1 -0
  93. package/dist/form/formMessageStyles.js.map +1 -0
  94. package/dist/form/inputToggleStyles.js.map +1 -0
  95. package/dist/form/nativeSelectStyles.js.map +1 -0
  96. package/dist/form/optionStyles.js.map +1 -0
  97. package/dist/form/passwordStyles.js.map +1 -0
  98. package/dist/form/selectStyles.js.map +1 -0
  99. package/dist/form/selectUtils.js.map +1 -0
  100. package/dist/form/sliderUtils.js.map +1 -0
  101. package/dist/form/switchStyles.js.map +1 -0
  102. package/dist/form/textAreaStyles.js.map +1 -0
  103. package/dist/form/textFieldStyles.js.map +1 -0
  104. package/dist/form/types.js.map +1 -0
  105. package/dist/form/useCheckboxGroup.js.map +1 -0
  106. package/dist/form/useFileUpload.js.map +1 -0
  107. package/dist/form/useListboxProvider.js.map +1 -0
  108. package/dist/form/useNumberField.js.map +1 -0
  109. package/dist/form/useRadioGroup.js.map +1 -0
  110. package/dist/form/useRangeSlider.js.map +1 -0
  111. package/dist/form/useResizingTextArea.js.map +1 -0
  112. package/dist/form/useSlider.js.map +1 -0
  113. package/dist/form/useTextField.js.map +1 -0
  114. package/dist/form/utils.js.map +1 -0
  115. package/dist/form/validation.js.map +1 -0
  116. package/dist/hoverMode/useHoverMode.js.map +1 -0
  117. package/dist/hoverMode/useHoverModeProvider.js.map +1 -0
  118. package/dist/icon/FontIcon.js.map +1 -0
  119. package/dist/icon/IconRotator.js.map +1 -0
  120. package/dist/icon/MaterialIcon.js.map +1 -0
  121. package/dist/icon/MaterialSymbol.js.map +1 -0
  122. package/dist/icon/SVGIcon.js.map +1 -0
  123. package/dist/icon/TextIconSpacing.js.map +1 -0
  124. package/dist/icon/iconConfig.js.map +1 -0
  125. package/dist/icon/material.js.map +1 -0
  126. package/dist/icon/materialConfig.js.map +1 -0
  127. package/dist/icon/styles.js.map +1 -0
  128. package/dist/index.js.map +1 -0
  129. package/dist/interaction/Ripple.js.map +1 -0
  130. package/dist/interaction/RippleContainer.js.map +1 -0
  131. package/dist/interaction/UserInteractionModeProvider.js.map +1 -0
  132. package/dist/interaction/config.js.map +1 -0
  133. package/dist/interaction/types.js.map +1 -0
  134. package/dist/interaction/useElementInteraction.js.map +1 -0
  135. package/dist/interaction/useHigherContrastChildren.js.map +1 -0
  136. package/dist/interaction/utils.js.map +1 -0
  137. package/dist/layout/LayoutAppBar.js.map +1 -0
  138. package/dist/layout/LayoutNav.js.map +1 -0
  139. package/dist/layout/LayoutWindowSplitter.js.map +1 -0
  140. package/dist/layout/Main.js.map +1 -0
  141. package/dist/layout/layoutNavStyles.js.map +1 -0
  142. package/dist/layout/layoutWindowSplitterStyles.js.map +1 -0
  143. package/dist/layout/mainStyles.js.map +1 -0
  144. package/dist/layout/useExpandableLayout.js.map +1 -0
  145. package/dist/layout/useHorizontalLayoutTransition.js.map +1 -0
  146. package/dist/layout/useLayoutAppBarHeight.js.map +1 -0
  147. package/dist/layout/useLayoutTree.js.map +1 -0
  148. package/dist/layout/useLayoutWindowSplitter.js.map +1 -0
  149. package/dist/layout/useMainTabIndex.js.map +1 -0
  150. package/dist/layout/useResizableLayout.js.map +1 -0
  151. package/dist/layout/useTemporaryLayout.js.map +1 -0
  152. package/dist/link/Link.js.map +1 -0
  153. package/dist/link/SkipToMainContent.js.map +1 -0
  154. package/dist/link/styles.js.map +1 -0
  155. package/dist/list/List.js.map +1 -0
  156. package/dist/list/ListItem.js.map +1 -0
  157. package/dist/list/ListItemAddon.js.map +1 -0
  158. package/dist/list/ListItemChildren.js.map +1 -0
  159. package/dist/list/ListItemLink.js.map +1 -0
  160. package/dist/list/ListItemText.js.map +1 -0
  161. package/dist/list/ListSubheader.js.map +1 -0
  162. package/dist/list/getListItemHeight.js.map +1 -0
  163. package/dist/list/listItemStyles.js.map +1 -0
  164. package/dist/list/types.js.map +1 -0
  165. package/dist/media-queries/AppSizeProvider.js.map +1 -0
  166. package/dist/media-queries/appSize.js.map +1 -0
  167. package/dist/media-queries/useMediaQuery.js.map +1 -0
  168. package/dist/menu/DropdownMenu.js.map +1 -0
  169. package/dist/menu/Menu.js.map +1 -0
  170. package/dist/menu/MenuBar.js.map +1 -0
  171. package/dist/menu/MenuButton.js.map +1 -0
  172. package/dist/menu/MenuConfigurationProvider.js.map +1 -0
  173. package/dist/menu/MenuItem.js.map +1 -0
  174. package/dist/menu/MenuItemButton.js.map +1 -0
  175. package/dist/menu/MenuItemGroup.js.map +1 -0
  176. package/dist/menu/MenuItemSeparator.js.map +1 -0
  177. package/dist/menu/MenuSheet.js.map +1 -0
  178. package/dist/menu/MenuVisibilityProvider.js.map +1 -0
  179. package/dist/menu/MenuWidget.js.map +1 -0
  180. package/dist/menu/MenuWidgetKeyboardProvider.js.map +1 -0
  181. package/dist/menu/useContextMenu.js.map +1 -0
  182. package/dist/menu/useMenuBarProvider.js.map +1 -0
  183. package/dist/menu/utils.js.map +1 -0
  184. package/dist/movement/constants.js.map +1 -0
  185. package/dist/movement/findMatchIndex.js.map +1 -0
  186. package/dist/movement/types.js.map +1 -0
  187. package/dist/movement/useKeyboardMovementProvider.js.map +1 -0
  188. package/dist/movement/utils.js.map +1 -0
  189. package/dist/overlay/Overlay.js.map +1 -0
  190. package/dist/overlay/overlayStyles.js.map +1 -0
  191. package/dist/portal/Portal.js.map +1 -0
  192. package/dist/portal/PortalContainerProvider.js.map +1 -0
  193. package/dist/positioning/constants.js.map +1 -0
  194. package/dist/positioning/createHorizontalPosition.js.map +1 -0
  195. package/dist/positioning/createVerticalPosition.js.map +1 -0
  196. package/dist/positioning/getFixedPosition.js.map +1 -0
  197. package/dist/positioning/types.js.map +1 -0
  198. package/dist/positioning/useFixedPositioning.js.map +1 -0
  199. package/dist/positioning/utils.js.map +1 -0
  200. package/dist/progress/CircularProgress.js.map +1 -0
  201. package/dist/progress/LinearProgress.js.map +1 -0
  202. package/dist/progress/getProgressA11y.js.map +1 -0
  203. package/dist/progress/types.js.map +1 -0
  204. package/dist/responsive-item/ResponsiveItemContainer.js.map +1 -0
  205. package/dist/responsive-item/ResponsiveItemOverlay.js.map +1 -0
  206. package/dist/responsive-item/styles.js.map +1 -0
  207. package/dist/scroll/ScrollLock.js.map +1 -0
  208. package/dist/scroll/getScrollbarWidth.js.map +1 -0
  209. package/dist/scroll/useScrollLock.js.map +1 -0
  210. package/dist/segmented-button/SegmentedButton.js.map +1 -0
  211. package/dist/segmented-button/SegmentedButtonContainer.js.map +1 -0
  212. package/dist/segmented-button/segmentedButtonContainerStyles.js.map +1 -0
  213. package/dist/segmented-button/segmentedButtonStyles.js.map +1 -0
  214. package/dist/sheet/Sheet.js.map +1 -0
  215. package/dist/sheet/styles.js.map +1 -0
  216. package/dist/snackbar/DefaultToastRenderer.js.map +1 -0
  217. package/dist/snackbar/Snackbar.js.map +1 -0
  218. package/dist/snackbar/Toast.js.map +1 -0
  219. package/dist/snackbar/ToastActionButton.js.map +1 -0
  220. package/dist/snackbar/ToastCloseButton.js.map +1 -0
  221. package/dist/snackbar/ToastContent.js.map +1 -0
  222. package/dist/snackbar/ToastManager.js.map +1 -0
  223. package/dist/snackbar/ToastManagerProvider.js.map +1 -0
  224. package/dist/snackbar/snackbarStyles.js.map +1 -0
  225. package/dist/snackbar/toastContentStyles.js.map +1 -0
  226. package/dist/snackbar/toastStyles.js.map +1 -0
  227. package/dist/snackbar/useCurrentToastActions.js.map +1 -0
  228. package/dist/suspense/CircularProgressSuspense.js.map +1 -0
  229. package/dist/suspense/NullSuspense.js.map +1 -0
  230. package/dist/table/Table.js.map +1 -0
  231. package/dist/table/TableBody.js.map +1 -0
  232. package/dist/table/TableCell.js.map +1 -0
  233. package/dist/table/TableCellContent.js.map +1 -0
  234. package/dist/table/TableCheckbox.js.map +1 -0
  235. package/dist/table/TableConfigurationProvider.js.map +1 -0
  236. package/dist/table/TableContainer.js.map +1 -0
  237. package/dist/table/TableContainerProvider.js.map +1 -0
  238. package/dist/table/TableFooter.js.map +1 -0
  239. package/dist/table/TableHeader.js.map +1 -0
  240. package/dist/table/TableRadio.js.map +1 -0
  241. package/dist/table/TableRow.js.map +1 -0
  242. package/dist/table/tableCellStyles.js.map +1 -0
  243. package/dist/table/tableContainerStyles.js.map +1 -0
  244. package/dist/table/tableFooterStyles.js.map +1 -0
  245. package/dist/table/tableHeaderStyles.js.map +1 -0
  246. package/dist/table/tableRowStyles.js.map +1 -0
  247. package/dist/table/tableStyles.js.map +1 -0
  248. package/dist/table/types.js.map +1 -0
  249. package/dist/tabs/Tab.js.map +1 -0
  250. package/dist/tabs/TabList.js.map +1 -0
  251. package/dist/tabs/TabListScrollButton.js.map +1 -0
  252. package/dist/tabs/tabIndicatorStyles.js.map +1 -0
  253. package/dist/tabs/tabListScrollButtonStyles.js.map +1 -0
  254. package/dist/tabs/tabListStyles.js.map +1 -0
  255. package/dist/tabs/tabStyles.js.map +1 -0
  256. package/dist/tabs/useTabList.js.map +1 -0
  257. package/dist/tabs/useTabs.js.map +1 -0
  258. package/dist/tabs/utils.js.map +1 -0
  259. package/dist/test-utils/IntersectionObserver.js.map +1 -0
  260. package/dist/test-utils/ResizeObserver.js.map +1 -0
  261. package/dist/test-utils/data-testid.js.map +1 -0
  262. package/dist/test-utils/index.js.map +1 -0
  263. package/dist/test-utils/jest-setup.js.map +1 -0
  264. package/dist/test-utils/matchMedia.js.map +1 -0
  265. package/dist/test-utils/polyfills/IntersectionObserver.js.map +1 -0
  266. package/dist/test-utils/polyfills/ResizeObserver.js.map +1 -0
  267. package/dist/test-utils/polyfills/index.js.map +1 -0
  268. package/dist/test-utils/polyfills/matchMedia.js.map +1 -0
  269. package/dist/test-utils/polyfills/offsetParent.js.map +1 -0
  270. package/dist/test-utils/polyfills/scrollIntoView.js.map +1 -0
  271. package/dist/test-utils/render.js.map +1 -0
  272. package/dist/test-utils/timers.js.map +1 -0
  273. package/dist/theme/LocalStorageColorSchemeProvider.js.map +1 -0
  274. package/dist/theme/ThemeProvider.js.map +1 -0
  275. package/dist/theme/colors.js.map +1 -0
  276. package/dist/theme/cssVars.js.map +1 -0
  277. package/dist/theme/types.js.map +1 -0
  278. package/dist/theme/useCSSVariables.js.map +1 -0
  279. package/dist/theme/useColorScheme.js.map +1 -0
  280. package/dist/theme/useColorSchemeMetaTag.js.map +1 -0
  281. package/dist/theme/useColorSchemeProvider.js.map +1 -0
  282. package/dist/theme/usePrefersColorScheme.js.map +1 -0
  283. package/dist/theme/utils.js.map +1 -0
  284. package/dist/tooltip/Tooltip.js.map +1 -0
  285. package/dist/tooltip/TooltipHoverModeProvider.js.map +1 -0
  286. package/dist/tooltip/constants.js.map +1 -0
  287. package/dist/tooltip/tooltipStyles.js.map +1 -0
  288. package/dist/tooltip/useTooltip.js.map +1 -0
  289. package/dist/tooltip/useTooltipPosition.js.map +1 -0
  290. package/dist/tooltip/utils.js.map +1 -0
  291. package/dist/transition/CSSTransition.js.map +1 -0
  292. package/dist/transition/Collapse.js.map +1 -0
  293. package/dist/transition/CrossFade.js.map +1 -0
  294. package/dist/transition/ScaleTransition.js.map +1 -0
  295. package/dist/transition/SkeletonPlaceholder.js.map +1 -0
  296. package/dist/transition/Slide.js.map +1 -0
  297. package/dist/transition/SlideContainer.js.map +1 -0
  298. package/dist/transition/collapseStyles.js.map +1 -0
  299. package/dist/transition/config.js.map +1 -0
  300. package/dist/transition/maxWidthTransition.js.map +1 -0
  301. package/dist/transition/skeletonPlaceholderUtils.js.map +1 -0
  302. package/dist/transition/types.js.map +1 -0
  303. package/dist/transition/useCSSTransition.js.map +1 -0
  304. package/dist/transition/useCarousel.js.map +1 -0
  305. package/dist/transition/useCollapseTransition.js.map +1 -0
  306. package/dist/transition/useCrossFadeTransition.js.map +1 -0
  307. package/dist/transition/useMaxWidthTransition.js.map +1 -0
  308. package/dist/transition/useScaleTransition.js.map +1 -0
  309. package/dist/transition/useSkeletonPlaceholder.js.map +1 -0
  310. package/dist/transition/useSlideTransition.js.map +1 -0
  311. package/dist/transition/useTransition.js.map +1 -0
  312. package/dist/transition/utils.js.map +1 -0
  313. package/dist/tree/DefaultTreeItemRenderer.js.map +1 -0
  314. package/dist/tree/Tree.js.map +1 -0
  315. package/dist/tree/TreeGroup.js.map +1 -0
  316. package/dist/tree/TreeItem.js.map +1 -0
  317. package/dist/tree/TreeItemExpander.js.map +1 -0
  318. package/dist/tree/TreeProvider.js.map +1 -0
  319. package/dist/tree/styles.js.map +1 -0
  320. package/dist/tree/types.js.map +1 -0
  321. package/dist/tree/useTree.js.map +1 -0
  322. package/dist/tree/useTreeExpansion.js.map +1 -0
  323. package/dist/tree/useTreeItems.js.map +1 -0
  324. package/dist/tree/useTreeMovement.js.map +1 -0
  325. package/dist/tree/useTreeSelection.js.map +1 -0
  326. package/dist/tree/utils.js.map +1 -0
  327. package/dist/types.js.map +1 -0
  328. package/dist/typography/SrOnly.js.map +1 -0
  329. package/dist/typography/TextContainer.js.map +1 -0
  330. package/dist/typography/Typography.js.map +1 -0
  331. package/dist/typography/WritingDirectionProvider.js.map +1 -0
  332. package/dist/useAsyncAction.js.map +1 -0
  333. package/dist/useDebouncedFunction.js.map +1 -0
  334. package/dist/useDropzone.js.map +1 -0
  335. package/dist/useElementSize.js.map +1 -0
  336. package/dist/useEnsuredId.js.map +1 -0
  337. package/dist/useEnsuredRef.js.map +1 -0
  338. package/dist/useEnsuredState.js.map +1 -0
  339. package/dist/useHtmlClassName.js.map +1 -0
  340. package/dist/useIntersectionObserver.js.map +1 -0
  341. package/dist/useIsomorphicLayoutEffect.js.map +1 -0
  342. package/dist/useLocalStorage.js.map +1 -0
  343. package/dist/useOrientation.js.map +1 -0
  344. package/dist/usePageInactive.js.map +1 -0
  345. package/dist/useResizeListener.js.map +1 -0
  346. package/dist/useResizeObserver.js.map +1 -0
  347. package/dist/useThrottledFunction.js.map +1 -0
  348. package/dist/useToggle.js.map +1 -0
  349. package/dist/useUnmounted.js.map +1 -0
  350. package/dist/useWindowSize.js.map +1 -0
  351. package/dist/utils/RenderRecursively.js.map +1 -0
  352. package/dist/utils/alphaNumericSort.js.map +1 -0
  353. package/dist/utils/applyRef.js.map +1 -0
  354. package/dist/utils/bem.js.map +1 -0
  355. package/dist/utils/filters.js.map +1 -0
  356. package/dist/utils/getClientPosition.js.map +1 -0
  357. package/dist/utils/getMiddleOfRange.js.map +1 -0
  358. package/dist/utils/getPercentage.js.map +1 -0
  359. package/dist/utils/getRangeDefaultValue.js.map +1 -0
  360. package/dist/utils/getRangeSteps.js.map +1 -0
  361. package/dist/utils/identity.js.map +1 -0
  362. package/dist/utils/isElementVisible.js.map +1 -0
  363. package/dist/utils/loop.js.map +1 -0
  364. package/dist/utils/nearest.js.map +1 -0
  365. package/dist/utils/parseCssLengthUnit.js.map +1 -0
  366. package/dist/utils/randomInt.js.map +1 -0
  367. package/dist/utils/wait.js.map +1 -0
  368. package/dist/utils/withinRange.js.map +1 -0
  369. package/dist/window-splitter/WindowSplitter.js.map +1 -0
  370. package/dist/window-splitter/useWindowSplitter.js.map +1 -0
  371. package/package.json +2 -2
  372. package/.turbo/turbo-lint.log +0 -12
  373. package/.turbo/turbo-test.log +0 -179
  374. package/.turbo/turbo-typecheck.log +0 -4
  375. package/dist/src/CoreProviders.js.map +0 -1
  376. package/dist/src/NoSsr.js.map +0 -1
  377. package/dist/src/SsrProvider.js.map +0 -1
  378. package/dist/src/app-bar/AppBar.js.map +0 -1
  379. package/dist/src/app-bar/AppBarTitle.js.map +0 -1
  380. package/dist/src/avatar/Avatar.js.map +0 -1
  381. package/dist/src/avatar/styles.js.map +0 -1
  382. package/dist/src/badge/Badge.js.map +0 -1
  383. package/dist/src/box/Box.js.map +0 -1
  384. package/dist/src/box/styles.js.map +0 -1
  385. package/dist/src/button/AsyncButton.js.map +0 -1
  386. package/dist/src/button/Button.js.map +0 -1
  387. package/dist/src/button/ButtonUnstyled.js.map +0 -1
  388. package/dist/src/button/FloatingActionButton.js.map +0 -1
  389. package/dist/src/button/TooltippedButton.js.map +0 -1
  390. package/dist/src/button/buttonStyles.js.map +0 -1
  391. package/dist/src/button/buttonUnstyledStyles.js.map +0 -1
  392. package/dist/src/card/Card.js.map +0 -1
  393. package/dist/src/card/CardContent.js.map +0 -1
  394. package/dist/src/card/CardFooter.js.map +0 -1
  395. package/dist/src/card/CardHeader.js.map +0 -1
  396. package/dist/src/card/CardSubtitle.js.map +0 -1
  397. package/dist/src/card/CardTitle.js.map +0 -1
  398. package/dist/src/card/ClickableCard.js.map +0 -1
  399. package/dist/src/card/styles.js.map +0 -1
  400. package/dist/src/chip/Chip.js.map +0 -1
  401. package/dist/src/chip/styles.js.map +0 -1
  402. package/dist/src/cssUtils.js.map +0 -1
  403. package/dist/src/delegateEvent.js.map +0 -1
  404. package/dist/src/dialog/Dialog.js.map +0 -1
  405. package/dist/src/dialog/DialogContainer.js.map +0 -1
  406. package/dist/src/dialog/DialogContent.js.map +0 -1
  407. package/dist/src/dialog/DialogFooter.js.map +0 -1
  408. package/dist/src/dialog/DialogHeader.js.map +0 -1
  409. package/dist/src/dialog/DialogTitle.js.map +0 -1
  410. package/dist/src/dialog/FixedDialog.js.map +0 -1
  411. package/dist/src/dialog/NestedDialogProvider.js.map +0 -1
  412. package/dist/src/dialog/styles.js.map +0 -1
  413. package/dist/src/divider/Divider.js.map +0 -1
  414. package/dist/src/divider/styles.js.map +0 -1
  415. package/dist/src/draggable/useDraggable.js.map +0 -1
  416. package/dist/src/draggable/utils.js.map +0 -1
  417. package/dist/src/expansion-panel/ExpansionList.js.map +0 -1
  418. package/dist/src/expansion-panel/ExpansionPanel.js.map +0 -1
  419. package/dist/src/expansion-panel/ExpansionPanelHeader.js.map +0 -1
  420. package/dist/src/expansion-panel/useExpansionList.js.map +0 -1
  421. package/dist/src/expansion-panel/useExpansionPanels.js.map +0 -1
  422. package/dist/src/focus/useFocusContainer.js.map +0 -1
  423. package/dist/src/focus/utils.js.map +0 -1
  424. package/dist/src/form/Checkbox.js.map +0 -1
  425. package/dist/src/form/Fieldset.js.map +0 -1
  426. package/dist/src/form/FileInput.js.map +0 -1
  427. package/dist/src/form/Form.js.map +0 -1
  428. package/dist/src/form/FormMessage.js.map +0 -1
  429. package/dist/src/form/FormMessageContainer.js.map +0 -1
  430. package/dist/src/form/FormMessageCounter.js.map +0 -1
  431. package/dist/src/form/InputToggle.js.map +0 -1
  432. package/dist/src/form/InputToggleIcon.js.map +0 -1
  433. package/dist/src/form/Label.js.map +0 -1
  434. package/dist/src/form/Legend.js.map +0 -1
  435. package/dist/src/form/MenuItemCheckbox.js.map +0 -1
  436. package/dist/src/form/MenuItemFileInput.js.map +0 -1
  437. package/dist/src/form/MenuItemInputToggle.js.map +0 -1
  438. package/dist/src/form/MenuItemRadio.js.map +0 -1
  439. package/dist/src/form/MenuItemSwitch.js.map +0 -1
  440. package/dist/src/form/MenuItemTextField.js.map +0 -1
  441. package/dist/src/form/NativeSelect.js.map +0 -1
  442. package/dist/src/form/OptGroup.js.map +0 -1
  443. package/dist/src/form/Option.js.map +0 -1
  444. package/dist/src/form/Password.js.map +0 -1
  445. package/dist/src/form/Radio.js.map +0 -1
  446. package/dist/src/form/Select.js.map +0 -1
  447. package/dist/src/form/SelectValue.js.map +0 -1
  448. package/dist/src/form/Slider.js.map +0 -1
  449. package/dist/src/form/SliderContainer.js.map +0 -1
  450. package/dist/src/form/SliderMark.js.map +0 -1
  451. package/dist/src/form/SliderMarkLabel.js.map +0 -1
  452. package/dist/src/form/SliderThumb.js.map +0 -1
  453. package/dist/src/form/SliderTrack.js.map +0 -1
  454. package/dist/src/form/SliderValueMarks.js.map +0 -1
  455. package/dist/src/form/SliderValueTooltip.js.map +0 -1
  456. package/dist/src/form/Switch.js.map +0 -1
  457. package/dist/src/form/SwitchTrack.js.map +0 -1
  458. package/dist/src/form/TextArea.js.map +0 -1
  459. package/dist/src/form/TextField.js.map +0 -1
  460. package/dist/src/form/TextFieldAddon.js.map +0 -1
  461. package/dist/src/form/TextFieldContainer.js.map +0 -1
  462. package/dist/src/form/TextFieldContainerStyles.js.map +0 -1
  463. package/dist/src/form/fileUtils.js.map +0 -1
  464. package/dist/src/form/formConfig.js.map +0 -1
  465. package/dist/src/form/formMessageStyles.js.map +0 -1
  466. package/dist/src/form/inputToggleStyles.js.map +0 -1
  467. package/dist/src/form/nativeSelectStyles.js.map +0 -1
  468. package/dist/src/form/optionStyles.js.map +0 -1
  469. package/dist/src/form/passwordStyles.js.map +0 -1
  470. package/dist/src/form/selectStyles.js.map +0 -1
  471. package/dist/src/form/selectUtils.js.map +0 -1
  472. package/dist/src/form/sliderUtils.js.map +0 -1
  473. package/dist/src/form/switchStyles.js.map +0 -1
  474. package/dist/src/form/textAreaStyles.js.map +0 -1
  475. package/dist/src/form/textFieldStyles.js.map +0 -1
  476. package/dist/src/form/types.js.map +0 -1
  477. package/dist/src/form/useCheckboxGroup.js.map +0 -1
  478. package/dist/src/form/useFileUpload.js.map +0 -1
  479. package/dist/src/form/useListboxProvider.js.map +0 -1
  480. package/dist/src/form/useNumberField.js.map +0 -1
  481. package/dist/src/form/useRadioGroup.js.map +0 -1
  482. package/dist/src/form/useRangeSlider.js.map +0 -1
  483. package/dist/src/form/useResizingTextArea.js.map +0 -1
  484. package/dist/src/form/useSlider.js.map +0 -1
  485. package/dist/src/form/useTextField.js.map +0 -1
  486. package/dist/src/form/utils.js.map +0 -1
  487. package/dist/src/form/validation.js.map +0 -1
  488. package/dist/src/hoverMode/useHoverMode.js.map +0 -1
  489. package/dist/src/hoverMode/useHoverModeProvider.js.map +0 -1
  490. package/dist/src/icon/FontIcon.js.map +0 -1
  491. package/dist/src/icon/IconRotator.js.map +0 -1
  492. package/dist/src/icon/MaterialIcon.js.map +0 -1
  493. package/dist/src/icon/MaterialSymbol.js.map +0 -1
  494. package/dist/src/icon/SVGIcon.js.map +0 -1
  495. package/dist/src/icon/TextIconSpacing.js.map +0 -1
  496. package/dist/src/icon/iconConfig.js.map +0 -1
  497. package/dist/src/icon/material.js.map +0 -1
  498. package/dist/src/icon/materialConfig.js.map +0 -1
  499. package/dist/src/icon/styles.js.map +0 -1
  500. package/dist/src/index.js.map +0 -1
  501. package/dist/src/interaction/Ripple.js.map +0 -1
  502. package/dist/src/interaction/RippleContainer.js.map +0 -1
  503. package/dist/src/interaction/UserInteractionModeProvider.js.map +0 -1
  504. package/dist/src/interaction/config.js.map +0 -1
  505. package/dist/src/interaction/types.js.map +0 -1
  506. package/dist/src/interaction/useElementInteraction.js.map +0 -1
  507. package/dist/src/interaction/useHigherContrastChildren.js.map +0 -1
  508. package/dist/src/interaction/utils.js.map +0 -1
  509. package/dist/src/layout/LayoutAppBar.js.map +0 -1
  510. package/dist/src/layout/LayoutNav.js.map +0 -1
  511. package/dist/src/layout/LayoutWindowSplitter.js.map +0 -1
  512. package/dist/src/layout/Main.js.map +0 -1
  513. package/dist/src/layout/layoutNavStyles.js.map +0 -1
  514. package/dist/src/layout/layoutWindowSplitterStyles.js.map +0 -1
  515. package/dist/src/layout/mainStyles.js.map +0 -1
  516. package/dist/src/layout/useExpandableLayout.js.map +0 -1
  517. package/dist/src/layout/useHorizontalLayoutTransition.js.map +0 -1
  518. package/dist/src/layout/useLayoutAppBarHeight.js.map +0 -1
  519. package/dist/src/layout/useLayoutTree.js.map +0 -1
  520. package/dist/src/layout/useLayoutWindowSplitter.js.map +0 -1
  521. package/dist/src/layout/useMainTabIndex.js.map +0 -1
  522. package/dist/src/layout/useResizableLayout.js.map +0 -1
  523. package/dist/src/layout/useTemporaryLayout.js.map +0 -1
  524. package/dist/src/link/Link.js.map +0 -1
  525. package/dist/src/link/SkipToMainContent.js.map +0 -1
  526. package/dist/src/link/styles.js.map +0 -1
  527. package/dist/src/list/List.js.map +0 -1
  528. package/dist/src/list/ListItem.js.map +0 -1
  529. package/dist/src/list/ListItemAddon.js.map +0 -1
  530. package/dist/src/list/ListItemChildren.js.map +0 -1
  531. package/dist/src/list/ListItemLink.js.map +0 -1
  532. package/dist/src/list/ListItemText.js.map +0 -1
  533. package/dist/src/list/ListSubheader.js.map +0 -1
  534. package/dist/src/list/getListItemHeight.js.map +0 -1
  535. package/dist/src/list/listItemStyles.js.map +0 -1
  536. package/dist/src/list/types.js.map +0 -1
  537. package/dist/src/media-queries/AppSizeProvider.js.map +0 -1
  538. package/dist/src/media-queries/appSize.js.map +0 -1
  539. package/dist/src/media-queries/useMediaQuery.js.map +0 -1
  540. package/dist/src/menu/DropdownMenu.js.map +0 -1
  541. package/dist/src/menu/Menu.js.map +0 -1
  542. package/dist/src/menu/MenuBar.js.map +0 -1
  543. package/dist/src/menu/MenuButton.js.map +0 -1
  544. package/dist/src/menu/MenuConfigurationProvider.js.map +0 -1
  545. package/dist/src/menu/MenuItem.js.map +0 -1
  546. package/dist/src/menu/MenuItemButton.js.map +0 -1
  547. package/dist/src/menu/MenuItemGroup.js.map +0 -1
  548. package/dist/src/menu/MenuItemSeparator.js.map +0 -1
  549. package/dist/src/menu/MenuSheet.js.map +0 -1
  550. package/dist/src/menu/MenuVisibilityProvider.js.map +0 -1
  551. package/dist/src/menu/MenuWidget.js.map +0 -1
  552. package/dist/src/menu/MenuWidgetKeyboardProvider.js.map +0 -1
  553. package/dist/src/menu/useContextMenu.js.map +0 -1
  554. package/dist/src/menu/useMenuBarProvider.js.map +0 -1
  555. package/dist/src/menu/utils.js.map +0 -1
  556. package/dist/src/movement/constants.js.map +0 -1
  557. package/dist/src/movement/findMatchIndex.js.map +0 -1
  558. package/dist/src/movement/types.js.map +0 -1
  559. package/dist/src/movement/useKeyboardMovementProvider.js.map +0 -1
  560. package/dist/src/movement/utils.js.map +0 -1
  561. package/dist/src/overlay/Overlay.js.map +0 -1
  562. package/dist/src/overlay/overlayStyles.js.map +0 -1
  563. package/dist/src/portal/Portal.js.map +0 -1
  564. package/dist/src/portal/PortalContainerProvider.js.map +0 -1
  565. package/dist/src/positioning/constants.js.map +0 -1
  566. package/dist/src/positioning/createHorizontalPosition.js.map +0 -1
  567. package/dist/src/positioning/createVerticalPosition.js.map +0 -1
  568. package/dist/src/positioning/getFixedPosition.js.map +0 -1
  569. package/dist/src/positioning/types.js.map +0 -1
  570. package/dist/src/positioning/useFixedPositioning.js.map +0 -1
  571. package/dist/src/positioning/utils.js.map +0 -1
  572. package/dist/src/progress/CircularProgress.js.map +0 -1
  573. package/dist/src/progress/LinearProgress.js.map +0 -1
  574. package/dist/src/progress/getProgressA11y.js.map +0 -1
  575. package/dist/src/progress/types.js.map +0 -1
  576. package/dist/src/responsive-item/ResponsiveItemContainer.js.map +0 -1
  577. package/dist/src/responsive-item/ResponsiveItemOverlay.js.map +0 -1
  578. package/dist/src/responsive-item/styles.js.map +0 -1
  579. package/dist/src/scroll/ScrollLock.js.map +0 -1
  580. package/dist/src/scroll/getScrollbarWidth.js.map +0 -1
  581. package/dist/src/scroll/useScrollLock.js.map +0 -1
  582. package/dist/src/segmented-button/SegmentedButton.js.map +0 -1
  583. package/dist/src/segmented-button/SegmentedButtonContainer.js.map +0 -1
  584. package/dist/src/segmented-button/segmentedButtonContainerStyles.js.map +0 -1
  585. package/dist/src/segmented-button/segmentedButtonStyles.js.map +0 -1
  586. package/dist/src/sheet/Sheet.js.map +0 -1
  587. package/dist/src/sheet/styles.js.map +0 -1
  588. package/dist/src/snackbar/DefaultToastRenderer.js.map +0 -1
  589. package/dist/src/snackbar/Snackbar.js.map +0 -1
  590. package/dist/src/snackbar/Toast.js.map +0 -1
  591. package/dist/src/snackbar/ToastActionButton.js.map +0 -1
  592. package/dist/src/snackbar/ToastCloseButton.js.map +0 -1
  593. package/dist/src/snackbar/ToastContent.js.map +0 -1
  594. package/dist/src/snackbar/ToastManager.js.map +0 -1
  595. package/dist/src/snackbar/ToastManagerProvider.js.map +0 -1
  596. package/dist/src/snackbar/snackbarStyles.js.map +0 -1
  597. package/dist/src/snackbar/toastContentStyles.js.map +0 -1
  598. package/dist/src/snackbar/toastStyles.js.map +0 -1
  599. package/dist/src/snackbar/useCurrentToastActions.js.map +0 -1
  600. package/dist/src/suspense/CircularProgressSuspense.js.map +0 -1
  601. package/dist/src/suspense/NullSuspense.js.map +0 -1
  602. package/dist/src/table/Table.js.map +0 -1
  603. package/dist/src/table/TableBody.js.map +0 -1
  604. package/dist/src/table/TableCell.js.map +0 -1
  605. package/dist/src/table/TableCellContent.js.map +0 -1
  606. package/dist/src/table/TableCheckbox.js.map +0 -1
  607. package/dist/src/table/TableConfigurationProvider.js.map +0 -1
  608. package/dist/src/table/TableContainer.js.map +0 -1
  609. package/dist/src/table/TableContainerProvider.js.map +0 -1
  610. package/dist/src/table/TableFooter.js.map +0 -1
  611. package/dist/src/table/TableHeader.js.map +0 -1
  612. package/dist/src/table/TableRadio.js.map +0 -1
  613. package/dist/src/table/TableRow.js.map +0 -1
  614. package/dist/src/table/tableCellStyles.js.map +0 -1
  615. package/dist/src/table/tableContainerStyles.js.map +0 -1
  616. package/dist/src/table/tableFooterStyles.js.map +0 -1
  617. package/dist/src/table/tableHeaderStyles.js.map +0 -1
  618. package/dist/src/table/tableRowStyles.js.map +0 -1
  619. package/dist/src/table/tableStyles.js.map +0 -1
  620. package/dist/src/table/types.js.map +0 -1
  621. package/dist/src/tabs/Tab.js.map +0 -1
  622. package/dist/src/tabs/TabList.js.map +0 -1
  623. package/dist/src/tabs/TabListScrollButton.js.map +0 -1
  624. package/dist/src/tabs/tabIndicatorStyles.js.map +0 -1
  625. package/dist/src/tabs/tabListScrollButtonStyles.js.map +0 -1
  626. package/dist/src/tabs/tabListStyles.js.map +0 -1
  627. package/dist/src/tabs/tabStyles.js.map +0 -1
  628. package/dist/src/tabs/useTabList.js.map +0 -1
  629. package/dist/src/tabs/useTabs.js.map +0 -1
  630. package/dist/src/tabs/utils.js.map +0 -1
  631. package/dist/src/test-utils/IntersectionObserver.js.map +0 -1
  632. package/dist/src/test-utils/ResizeObserver.js.map +0 -1
  633. package/dist/src/test-utils/data-testid.js.map +0 -1
  634. package/dist/src/test-utils/index.js.map +0 -1
  635. package/dist/src/test-utils/jest-setup.js.map +0 -1
  636. package/dist/src/test-utils/matchMedia.js.map +0 -1
  637. package/dist/src/test-utils/polyfills/IntersectionObserver.js.map +0 -1
  638. package/dist/src/test-utils/polyfills/ResizeObserver.js.map +0 -1
  639. package/dist/src/test-utils/polyfills/index.js.map +0 -1
  640. package/dist/src/test-utils/polyfills/matchMedia.js.map +0 -1
  641. package/dist/src/test-utils/polyfills/offsetParent.js.map +0 -1
  642. package/dist/src/test-utils/polyfills/scrollIntoView.js.map +0 -1
  643. package/dist/src/test-utils/render.js.map +0 -1
  644. package/dist/src/test-utils/timers.js.map +0 -1
  645. package/dist/src/theme/LocalStorageColorSchemeProvider.js.map +0 -1
  646. package/dist/src/theme/ThemeProvider.js.map +0 -1
  647. package/dist/src/theme/colors.js.map +0 -1
  648. package/dist/src/theme/cssVars.js.map +0 -1
  649. package/dist/src/theme/types.js.map +0 -1
  650. package/dist/src/theme/useCSSVariables.js.map +0 -1
  651. package/dist/src/theme/useColorScheme.js.map +0 -1
  652. package/dist/src/theme/useColorSchemeMetaTag.js.map +0 -1
  653. package/dist/src/theme/useColorSchemeProvider.js.map +0 -1
  654. package/dist/src/theme/usePrefersColorScheme.js.map +0 -1
  655. package/dist/src/theme/utils.js.map +0 -1
  656. package/dist/src/tooltip/Tooltip.js.map +0 -1
  657. package/dist/src/tooltip/TooltipHoverModeProvider.js.map +0 -1
  658. package/dist/src/tooltip/constants.js.map +0 -1
  659. package/dist/src/tooltip/tooltipStyles.js.map +0 -1
  660. package/dist/src/tooltip/useTooltip.js.map +0 -1
  661. package/dist/src/tooltip/useTooltipPosition.js.map +0 -1
  662. package/dist/src/tooltip/utils.js.map +0 -1
  663. package/dist/src/transition/CSSTransition.js.map +0 -1
  664. package/dist/src/transition/Collapse.js.map +0 -1
  665. package/dist/src/transition/CrossFade.js.map +0 -1
  666. package/dist/src/transition/ScaleTransition.js.map +0 -1
  667. package/dist/src/transition/SkeletonPlaceholder.js.map +0 -1
  668. package/dist/src/transition/Slide.js.map +0 -1
  669. package/dist/src/transition/SlideContainer.js.map +0 -1
  670. package/dist/src/transition/collapseStyles.js.map +0 -1
  671. package/dist/src/transition/config.js.map +0 -1
  672. package/dist/src/transition/maxWidthTransition.js.map +0 -1
  673. package/dist/src/transition/skeletonPlaceholderUtils.js.map +0 -1
  674. package/dist/src/transition/types.js.map +0 -1
  675. package/dist/src/transition/useCSSTransition.js.map +0 -1
  676. package/dist/src/transition/useCarousel.js.map +0 -1
  677. package/dist/src/transition/useCollapseTransition.js.map +0 -1
  678. package/dist/src/transition/useCrossFadeTransition.js.map +0 -1
  679. package/dist/src/transition/useMaxWidthTransition.js.map +0 -1
  680. package/dist/src/transition/useScaleTransition.js.map +0 -1
  681. package/dist/src/transition/useSkeletonPlaceholder.js.map +0 -1
  682. package/dist/src/transition/useSlideTransition.js.map +0 -1
  683. package/dist/src/transition/useTransition.js.map +0 -1
  684. package/dist/src/transition/utils.js.map +0 -1
  685. package/dist/src/tree/DefaultTreeItemRenderer.js.map +0 -1
  686. package/dist/src/tree/Tree.js.map +0 -1
  687. package/dist/src/tree/TreeGroup.js.map +0 -1
  688. package/dist/src/tree/TreeItem.js.map +0 -1
  689. package/dist/src/tree/TreeItemExpander.js.map +0 -1
  690. package/dist/src/tree/TreeProvider.js.map +0 -1
  691. package/dist/src/tree/styles.js.map +0 -1
  692. package/dist/src/tree/types.js.map +0 -1
  693. package/dist/src/tree/useTree.js.map +0 -1
  694. package/dist/src/tree/useTreeExpansion.js.map +0 -1
  695. package/dist/src/tree/useTreeItems.js.map +0 -1
  696. package/dist/src/tree/useTreeMovement.js.map +0 -1
  697. package/dist/src/tree/useTreeSelection.js.map +0 -1
  698. package/dist/src/tree/utils.js.map +0 -1
  699. package/dist/src/types.js.map +0 -1
  700. package/dist/src/typography/SrOnly.js.map +0 -1
  701. package/dist/src/typography/TextContainer.js.map +0 -1
  702. package/dist/src/typography/Typography.js.map +0 -1
  703. package/dist/src/typography/WritingDirectionProvider.js.map +0 -1
  704. package/dist/src/useAsyncAction.js.map +0 -1
  705. package/dist/src/useDebouncedFunction.js.map +0 -1
  706. package/dist/src/useDropzone.js.map +0 -1
  707. package/dist/src/useElementSize.js.map +0 -1
  708. package/dist/src/useEnsuredId.js.map +0 -1
  709. package/dist/src/useEnsuredRef.js.map +0 -1
  710. package/dist/src/useEnsuredState.js.map +0 -1
  711. package/dist/src/useHtmlClassName.js.map +0 -1
  712. package/dist/src/useIntersectionObserver.js.map +0 -1
  713. package/dist/src/useIsomorphicLayoutEffect.js.map +0 -1
  714. package/dist/src/useLocalStorage.js.map +0 -1
  715. package/dist/src/useOrientation.js.map +0 -1
  716. package/dist/src/usePageInactive.js.map +0 -1
  717. package/dist/src/useResizeListener.js.map +0 -1
  718. package/dist/src/useResizeObserver.js.map +0 -1
  719. package/dist/src/useThrottledFunction.js.map +0 -1
  720. package/dist/src/useToggle.js.map +0 -1
  721. package/dist/src/useUnmounted.js.map +0 -1
  722. package/dist/src/useWindowSize.js.map +0 -1
  723. package/dist/src/utils/RenderRecursively.js.map +0 -1
  724. package/dist/src/utils/alphaNumericSort.js.map +0 -1
  725. package/dist/src/utils/applyRef.js.map +0 -1
  726. package/dist/src/utils/bem.js.map +0 -1
  727. package/dist/src/utils/filters.js.map +0 -1
  728. package/dist/src/utils/getClientPosition.js.map +0 -1
  729. package/dist/src/utils/getMiddleOfRange.js.map +0 -1
  730. package/dist/src/utils/getPercentage.js.map +0 -1
  731. package/dist/src/utils/getRangeDefaultValue.js.map +0 -1
  732. package/dist/src/utils/getRangeSteps.js.map +0 -1
  733. package/dist/src/utils/identity.js.map +0 -1
  734. package/dist/src/utils/isElementVisible.js.map +0 -1
  735. package/dist/src/utils/loop.js.map +0 -1
  736. package/dist/src/utils/nearest.js.map +0 -1
  737. package/dist/src/utils/parseCssLengthUnit.js.map +0 -1
  738. package/dist/src/utils/randomInt.js.map +0 -1
  739. package/dist/src/utils/wait.js.map +0 -1
  740. package/dist/src/utils/withinRange.js.map +0 -1
  741. package/dist/src/window-splitter/WindowSplitter.js.map +0 -1
  742. package/dist/src/window-splitter/useWindowSplitter.js.map +0 -1
  743. /package/dist/{src/CoreProviders.js → CoreProviders.js} +0 -0
  744. /package/dist/{src/NoSsr.js → NoSsr.js} +0 -0
  745. /package/dist/{src/SsrProvider.js → SsrProvider.js} +0 -0
  746. /package/dist/{src/app-bar → app-bar}/AppBar.js +0 -0
  747. /package/dist/{src/app-bar → app-bar}/AppBarTitle.js +0 -0
  748. /package/dist/{src/avatar → avatar}/Avatar.js +0 -0
  749. /package/dist/{src/avatar → avatar}/styles.js +0 -0
  750. /package/dist/{src/badge → badge}/Badge.js +0 -0
  751. /package/dist/{src/box → box}/Box.js +0 -0
  752. /package/dist/{src/box → box}/styles.js +0 -0
  753. /package/dist/{src/button → button}/AsyncButton.js +0 -0
  754. /package/dist/{src/button → button}/Button.js +0 -0
  755. /package/dist/{src/button → button}/ButtonUnstyled.js +0 -0
  756. /package/dist/{src/button → button}/FloatingActionButton.js +0 -0
  757. /package/dist/{src/button → button}/TooltippedButton.js +0 -0
  758. /package/dist/{src/button → button}/buttonStyles.js +0 -0
  759. /package/dist/{src/button → button}/buttonUnstyledStyles.js +0 -0
  760. /package/dist/{src/card → card}/Card.js +0 -0
  761. /package/dist/{src/card → card}/CardContent.js +0 -0
  762. /package/dist/{src/card → card}/CardFooter.js +0 -0
  763. /package/dist/{src/card → card}/CardHeader.js +0 -0
  764. /package/dist/{src/card → card}/CardSubtitle.js +0 -0
  765. /package/dist/{src/card → card}/CardTitle.js +0 -0
  766. /package/dist/{src/card → card}/ClickableCard.js +0 -0
  767. /package/dist/{src/card → card}/styles.js +0 -0
  768. /package/dist/{src/chip → chip}/Chip.js +0 -0
  769. /package/dist/{src/chip → chip}/styles.js +0 -0
  770. /package/dist/{src/cssUtils.js → cssUtils.js} +0 -0
  771. /package/dist/{src/delegateEvent.js → delegateEvent.js} +0 -0
  772. /package/dist/{src/dialog → dialog}/Dialog.js +0 -0
  773. /package/dist/{src/dialog → dialog}/DialogContainer.js +0 -0
  774. /package/dist/{src/dialog → dialog}/DialogContent.js +0 -0
  775. /package/dist/{src/dialog → dialog}/DialogFooter.js +0 -0
  776. /package/dist/{src/dialog → dialog}/DialogHeader.js +0 -0
  777. /package/dist/{src/dialog → dialog}/DialogTitle.js +0 -0
  778. /package/dist/{src/dialog → dialog}/FixedDialog.js +0 -0
  779. /package/dist/{src/dialog → dialog}/NestedDialogProvider.js +0 -0
  780. /package/dist/{src/dialog → dialog}/styles.js +0 -0
  781. /package/dist/{src/divider → divider}/Divider.js +0 -0
  782. /package/dist/{src/divider → divider}/styles.js +0 -0
  783. /package/dist/{src/draggable → draggable}/useDraggable.js +0 -0
  784. /package/dist/{src/draggable → draggable}/utils.js +0 -0
  785. /package/dist/{src/expansion-panel → expansion-panel}/ExpansionList.js +0 -0
  786. /package/dist/{src/expansion-panel → expansion-panel}/ExpansionPanel.js +0 -0
  787. /package/dist/{src/expansion-panel → expansion-panel}/ExpansionPanelHeader.js +0 -0
  788. /package/dist/{src/expansion-panel → expansion-panel}/useExpansionList.js +0 -0
  789. /package/dist/{src/expansion-panel → expansion-panel}/useExpansionPanels.js +0 -0
  790. /package/dist/{src/focus → focus}/useFocusContainer.js +0 -0
  791. /package/dist/{src/focus → focus}/utils.js +0 -0
  792. /package/dist/{src/form → form}/Checkbox.js +0 -0
  793. /package/dist/{src/form → form}/Fieldset.js +0 -0
  794. /package/dist/{src/form → form}/FileInput.js +0 -0
  795. /package/dist/{src/form → form}/Form.js +0 -0
  796. /package/dist/{src/form → form}/FormMessage.js +0 -0
  797. /package/dist/{src/form → form}/FormMessageContainer.js +0 -0
  798. /package/dist/{src/form → form}/FormMessageCounter.js +0 -0
  799. /package/dist/{src/form → form}/InputToggle.js +0 -0
  800. /package/dist/{src/form → form}/InputToggleIcon.js +0 -0
  801. /package/dist/{src/form → form}/Label.js +0 -0
  802. /package/dist/{src/form → form}/Legend.js +0 -0
  803. /package/dist/{src/form → form}/MenuItemCheckbox.js +0 -0
  804. /package/dist/{src/form → form}/MenuItemFileInput.js +0 -0
  805. /package/dist/{src/form → form}/MenuItemInputToggle.js +0 -0
  806. /package/dist/{src/form → form}/MenuItemRadio.js +0 -0
  807. /package/dist/{src/form → form}/MenuItemSwitch.js +0 -0
  808. /package/dist/{src/form → form}/MenuItemTextField.js +0 -0
  809. /package/dist/{src/form → form}/NativeSelect.js +0 -0
  810. /package/dist/{src/form → form}/OptGroup.js +0 -0
  811. /package/dist/{src/form → form}/Option.js +0 -0
  812. /package/dist/{src/form → form}/Password.js +0 -0
  813. /package/dist/{src/form → form}/Radio.js +0 -0
  814. /package/dist/{src/form → form}/Select.js +0 -0
  815. /package/dist/{src/form → form}/SelectValue.js +0 -0
  816. /package/dist/{src/form → form}/Slider.js +0 -0
  817. /package/dist/{src/form → form}/SliderContainer.js +0 -0
  818. /package/dist/{src/form → form}/SliderMark.js +0 -0
  819. /package/dist/{src/form → form}/SliderMarkLabel.js +0 -0
  820. /package/dist/{src/form → form}/SliderThumb.js +0 -0
  821. /package/dist/{src/form → form}/SliderTrack.js +0 -0
  822. /package/dist/{src/form → form}/SliderValueMarks.js +0 -0
  823. /package/dist/{src/form → form}/SliderValueTooltip.js +0 -0
  824. /package/dist/{src/form → form}/Switch.js +0 -0
  825. /package/dist/{src/form → form}/SwitchTrack.js +0 -0
  826. /package/dist/{src/form → form}/TextArea.js +0 -0
  827. /package/dist/{src/form → form}/TextField.js +0 -0
  828. /package/dist/{src/form → form}/TextFieldAddon.js +0 -0
  829. /package/dist/{src/form → form}/TextFieldContainer.js +0 -0
  830. /package/dist/{src/form → form}/TextFieldContainerStyles.js +0 -0
  831. /package/dist/{src/form → form}/fileUtils.js +0 -0
  832. /package/dist/{src/form → form}/formConfig.js +0 -0
  833. /package/dist/{src/form → form}/formMessageStyles.js +0 -0
  834. /package/dist/{src/form → form}/inputToggleStyles.js +0 -0
  835. /package/dist/{src/form → form}/nativeSelectStyles.js +0 -0
  836. /package/dist/{src/form → form}/optionStyles.js +0 -0
  837. /package/dist/{src/form → form}/passwordStyles.js +0 -0
  838. /package/dist/{src/form → form}/selectStyles.js +0 -0
  839. /package/dist/{src/form → form}/selectUtils.js +0 -0
  840. /package/dist/{src/form → form}/sliderUtils.js +0 -0
  841. /package/dist/{src/form → form}/switchStyles.js +0 -0
  842. /package/dist/{src/form → form}/textAreaStyles.js +0 -0
  843. /package/dist/{src/form → form}/textFieldStyles.js +0 -0
  844. /package/dist/{src/form → form}/types.js +0 -0
  845. /package/dist/{src/form → form}/useCheckboxGroup.js +0 -0
  846. /package/dist/{src/form → form}/useFileUpload.js +0 -0
  847. /package/dist/{src/form → form}/useListboxProvider.js +0 -0
  848. /package/dist/{src/form → form}/useNumberField.js +0 -0
  849. /package/dist/{src/form → form}/useRadioGroup.js +0 -0
  850. /package/dist/{src/form → form}/useRangeSlider.js +0 -0
  851. /package/dist/{src/form → form}/useResizingTextArea.js +0 -0
  852. /package/dist/{src/form → form}/useSlider.js +0 -0
  853. /package/dist/{src/form → form}/useTextField.js +0 -0
  854. /package/dist/{src/form → form}/utils.js +0 -0
  855. /package/dist/{src/form → form}/validation.js +0 -0
  856. /package/dist/{src/hoverMode → hoverMode}/useHoverMode.js +0 -0
  857. /package/dist/{src/hoverMode → hoverMode}/useHoverModeProvider.js +0 -0
  858. /package/dist/{src/icon → icon}/FontIcon.js +0 -0
  859. /package/dist/{src/icon → icon}/IconRotator.js +0 -0
  860. /package/dist/{src/icon → icon}/MaterialIcon.js +0 -0
  861. /package/dist/{src/icon → icon}/MaterialSymbol.js +0 -0
  862. /package/dist/{src/icon → icon}/SVGIcon.js +0 -0
  863. /package/dist/{src/icon → icon}/TextIconSpacing.js +0 -0
  864. /package/dist/{src/icon → icon}/iconConfig.js +0 -0
  865. /package/dist/{src/icon → icon}/material.js +0 -0
  866. /package/dist/{src/icon → icon}/materialConfig.js +0 -0
  867. /package/dist/{src/icon → icon}/styles.js +0 -0
  868. /package/dist/{src/index.js → index.js} +0 -0
  869. /package/dist/{src/interaction → interaction}/Ripple.js +0 -0
  870. /package/dist/{src/interaction → interaction}/RippleContainer.js +0 -0
  871. /package/dist/{src/interaction → interaction}/UserInteractionModeProvider.js +0 -0
  872. /package/dist/{src/interaction → interaction}/config.js +0 -0
  873. /package/dist/{src/interaction → interaction}/types.js +0 -0
  874. /package/dist/{src/interaction → interaction}/useElementInteraction.js +0 -0
  875. /package/dist/{src/interaction → interaction}/useHigherContrastChildren.js +0 -0
  876. /package/dist/{src/interaction → interaction}/utils.js +0 -0
  877. /package/dist/{src/layout → layout}/LayoutAppBar.js +0 -0
  878. /package/dist/{src/layout → layout}/LayoutNav.js +0 -0
  879. /package/dist/{src/layout → layout}/LayoutWindowSplitter.js +0 -0
  880. /package/dist/{src/layout → layout}/Main.js +0 -0
  881. /package/dist/{src/layout → layout}/layoutNavStyles.js +0 -0
  882. /package/dist/{src/layout → layout}/layoutWindowSplitterStyles.js +0 -0
  883. /package/dist/{src/layout → layout}/mainStyles.js +0 -0
  884. /package/dist/{src/layout → layout}/useExpandableLayout.js +0 -0
  885. /package/dist/{src/layout → layout}/useHorizontalLayoutTransition.js +0 -0
  886. /package/dist/{src/layout → layout}/useLayoutAppBarHeight.js +0 -0
  887. /package/dist/{src/layout → layout}/useLayoutTree.js +0 -0
  888. /package/dist/{src/layout → layout}/useLayoutWindowSplitter.js +0 -0
  889. /package/dist/{src/layout → layout}/useMainTabIndex.js +0 -0
  890. /package/dist/{src/layout → layout}/useResizableLayout.js +0 -0
  891. /package/dist/{src/layout → layout}/useTemporaryLayout.js +0 -0
  892. /package/dist/{src/link → link}/Link.js +0 -0
  893. /package/dist/{src/link → link}/SkipToMainContent.js +0 -0
  894. /package/dist/{src/link → link}/styles.js +0 -0
  895. /package/dist/{src/list → list}/List.js +0 -0
  896. /package/dist/{src/list → list}/ListItem.js +0 -0
  897. /package/dist/{src/list → list}/ListItemAddon.js +0 -0
  898. /package/dist/{src/list → list}/ListItemChildren.js +0 -0
  899. /package/dist/{src/list → list}/ListItemLink.js +0 -0
  900. /package/dist/{src/list → list}/ListItemText.js +0 -0
  901. /package/dist/{src/list → list}/ListSubheader.js +0 -0
  902. /package/dist/{src/list → list}/getListItemHeight.js +0 -0
  903. /package/dist/{src/list → list}/listItemStyles.js +0 -0
  904. /package/dist/{src/list → list}/types.js +0 -0
  905. /package/dist/{src/media-queries → media-queries}/AppSizeProvider.js +0 -0
  906. /package/dist/{src/media-queries → media-queries}/appSize.js +0 -0
  907. /package/dist/{src/media-queries → media-queries}/useMediaQuery.js +0 -0
  908. /package/dist/{src/menu → menu}/DropdownMenu.js +0 -0
  909. /package/dist/{src/menu → menu}/Menu.js +0 -0
  910. /package/dist/{src/menu → menu}/MenuBar.js +0 -0
  911. /package/dist/{src/menu → menu}/MenuButton.js +0 -0
  912. /package/dist/{src/menu → menu}/MenuConfigurationProvider.js +0 -0
  913. /package/dist/{src/menu → menu}/MenuItem.js +0 -0
  914. /package/dist/{src/menu → menu}/MenuItemButton.js +0 -0
  915. /package/dist/{src/menu → menu}/MenuItemGroup.js +0 -0
  916. /package/dist/{src/menu → menu}/MenuItemSeparator.js +0 -0
  917. /package/dist/{src/menu → menu}/MenuSheet.js +0 -0
  918. /package/dist/{src/menu → menu}/MenuVisibilityProvider.js +0 -0
  919. /package/dist/{src/menu → menu}/MenuWidget.js +0 -0
  920. /package/dist/{src/menu → menu}/MenuWidgetKeyboardProvider.js +0 -0
  921. /package/dist/{src/menu → menu}/useContextMenu.js +0 -0
  922. /package/dist/{src/menu → menu}/useMenuBarProvider.js +0 -0
  923. /package/dist/{src/menu → menu}/utils.js +0 -0
  924. /package/dist/{src/movement → movement}/constants.js +0 -0
  925. /package/dist/{src/movement → movement}/findMatchIndex.js +0 -0
  926. /package/dist/{src/movement → movement}/types.js +0 -0
  927. /package/dist/{src/movement → movement}/useKeyboardMovementProvider.js +0 -0
  928. /package/dist/{src/movement → movement}/utils.js +0 -0
  929. /package/dist/{src/overlay → overlay}/Overlay.js +0 -0
  930. /package/dist/{src/overlay → overlay}/overlayStyles.js +0 -0
  931. /package/dist/{src/portal → portal}/Portal.js +0 -0
  932. /package/dist/{src/portal → portal}/PortalContainerProvider.js +0 -0
  933. /package/dist/{src/positioning → positioning}/constants.js +0 -0
  934. /package/dist/{src/positioning → positioning}/createHorizontalPosition.js +0 -0
  935. /package/dist/{src/positioning → positioning}/createVerticalPosition.js +0 -0
  936. /package/dist/{src/positioning → positioning}/getFixedPosition.js +0 -0
  937. /package/dist/{src/positioning → positioning}/types.js +0 -0
  938. /package/dist/{src/positioning → positioning}/useFixedPositioning.js +0 -0
  939. /package/dist/{src/positioning → positioning}/utils.js +0 -0
  940. /package/dist/{src/progress → progress}/CircularProgress.js +0 -0
  941. /package/dist/{src/progress → progress}/LinearProgress.js +0 -0
  942. /package/dist/{src/progress → progress}/getProgressA11y.js +0 -0
  943. /package/dist/{src/progress → progress}/types.js +0 -0
  944. /package/dist/{src/responsive-item → responsive-item}/ResponsiveItemContainer.js +0 -0
  945. /package/dist/{src/responsive-item → responsive-item}/ResponsiveItemOverlay.js +0 -0
  946. /package/dist/{src/responsive-item → responsive-item}/styles.js +0 -0
  947. /package/dist/{src/scroll → scroll}/ScrollLock.js +0 -0
  948. /package/dist/{src/scroll → scroll}/getScrollbarWidth.js +0 -0
  949. /package/dist/{src/scroll → scroll}/useScrollLock.js +0 -0
  950. /package/dist/{src/segmented-button → segmented-button}/SegmentedButton.js +0 -0
  951. /package/dist/{src/segmented-button → segmented-button}/SegmentedButtonContainer.js +0 -0
  952. /package/dist/{src/segmented-button → segmented-button}/segmentedButtonContainerStyles.js +0 -0
  953. /package/dist/{src/segmented-button → segmented-button}/segmentedButtonStyles.js +0 -0
  954. /package/dist/{src/sheet → sheet}/Sheet.js +0 -0
  955. /package/dist/{src/sheet → sheet}/styles.js +0 -0
  956. /package/dist/{src/snackbar → snackbar}/DefaultToastRenderer.js +0 -0
  957. /package/dist/{src/snackbar → snackbar}/Snackbar.js +0 -0
  958. /package/dist/{src/snackbar → snackbar}/Toast.js +0 -0
  959. /package/dist/{src/snackbar → snackbar}/ToastActionButton.js +0 -0
  960. /package/dist/{src/snackbar → snackbar}/ToastCloseButton.js +0 -0
  961. /package/dist/{src/snackbar → snackbar}/ToastContent.js +0 -0
  962. /package/dist/{src/snackbar → snackbar}/ToastManager.js +0 -0
  963. /package/dist/{src/snackbar → snackbar}/ToastManagerProvider.js +0 -0
  964. /package/dist/{src/snackbar → snackbar}/snackbarStyles.js +0 -0
  965. /package/dist/{src/snackbar → snackbar}/toastContentStyles.js +0 -0
  966. /package/dist/{src/snackbar → snackbar}/toastStyles.js +0 -0
  967. /package/dist/{src/snackbar → snackbar}/useCurrentToastActions.js +0 -0
  968. /package/dist/{src/suspense → suspense}/CircularProgressSuspense.js +0 -0
  969. /package/dist/{src/suspense → suspense}/NullSuspense.js +0 -0
  970. /package/dist/{src/table → table}/Table.js +0 -0
  971. /package/dist/{src/table → table}/TableBody.js +0 -0
  972. /package/dist/{src/table → table}/TableCell.js +0 -0
  973. /package/dist/{src/table → table}/TableCellContent.js +0 -0
  974. /package/dist/{src/table → table}/TableCheckbox.js +0 -0
  975. /package/dist/{src/table → table}/TableConfigurationProvider.js +0 -0
  976. /package/dist/{src/table → table}/TableContainer.js +0 -0
  977. /package/dist/{src/table → table}/TableContainerProvider.js +0 -0
  978. /package/dist/{src/table → table}/TableFooter.js +0 -0
  979. /package/dist/{src/table → table}/TableHeader.js +0 -0
  980. /package/dist/{src/table → table}/TableRadio.js +0 -0
  981. /package/dist/{src/table → table}/TableRow.js +0 -0
  982. /package/dist/{src/table → table}/tableCellStyles.js +0 -0
  983. /package/dist/{src/table → table}/tableContainerStyles.js +0 -0
  984. /package/dist/{src/table → table}/tableFooterStyles.js +0 -0
  985. /package/dist/{src/table → table}/tableHeaderStyles.js +0 -0
  986. /package/dist/{src/table → table}/tableRowStyles.js +0 -0
  987. /package/dist/{src/table → table}/tableStyles.js +0 -0
  988. /package/dist/{src/table → table}/types.js +0 -0
  989. /package/dist/{src/tabs → tabs}/Tab.js +0 -0
  990. /package/dist/{src/tabs → tabs}/TabList.js +0 -0
  991. /package/dist/{src/tabs → tabs}/TabListScrollButton.js +0 -0
  992. /package/dist/{src/tabs → tabs}/tabIndicatorStyles.js +0 -0
  993. /package/dist/{src/tabs → tabs}/tabListScrollButtonStyles.js +0 -0
  994. /package/dist/{src/tabs → tabs}/tabListStyles.js +0 -0
  995. /package/dist/{src/tabs → tabs}/tabStyles.js +0 -0
  996. /package/dist/{src/tabs → tabs}/useTabList.js +0 -0
  997. /package/dist/{src/tabs → tabs}/useTabs.js +0 -0
  998. /package/dist/{src/tabs → tabs}/utils.js +0 -0
  999. /package/dist/{src/test-utils → test-utils}/IntersectionObserver.js +0 -0
  1000. /package/dist/{src/test-utils → test-utils}/ResizeObserver.js +0 -0
  1001. /package/dist/{src/test-utils → test-utils}/data-testid.js +0 -0
  1002. /package/dist/{src/test-utils → test-utils}/index.js +0 -0
  1003. /package/dist/{src/test-utils → test-utils}/jest-setup.js +0 -0
  1004. /package/dist/{src/test-utils → test-utils}/matchMedia.js +0 -0
  1005. /package/dist/{src/test-utils → test-utils}/polyfills/IntersectionObserver.js +0 -0
  1006. /package/dist/{src/test-utils → test-utils}/polyfills/ResizeObserver.js +0 -0
  1007. /package/dist/{src/test-utils → test-utils}/polyfills/index.js +0 -0
  1008. /package/dist/{src/test-utils → test-utils}/polyfills/matchMedia.js +0 -0
  1009. /package/dist/{src/test-utils → test-utils}/polyfills/offsetParent.js +0 -0
  1010. /package/dist/{src/test-utils → test-utils}/polyfills/scrollIntoView.js +0 -0
  1011. /package/dist/{src/test-utils → test-utils}/render.js +0 -0
  1012. /package/dist/{src/test-utils → test-utils}/timers.js +0 -0
  1013. /package/dist/{src/theme → theme}/LocalStorageColorSchemeProvider.js +0 -0
  1014. /package/dist/{src/theme → theme}/ThemeProvider.js +0 -0
  1015. /package/dist/{src/theme → theme}/colors.js +0 -0
  1016. /package/dist/{src/theme → theme}/cssVars.js +0 -0
  1017. /package/dist/{src/theme → theme}/types.js +0 -0
  1018. /package/dist/{src/theme → theme}/useCSSVariables.js +0 -0
  1019. /package/dist/{src/theme → theme}/useColorScheme.js +0 -0
  1020. /package/dist/{src/theme → theme}/useColorSchemeMetaTag.js +0 -0
  1021. /package/dist/{src/theme → theme}/useColorSchemeProvider.js +0 -0
  1022. /package/dist/{src/theme → theme}/usePrefersColorScheme.js +0 -0
  1023. /package/dist/{src/theme → theme}/utils.js +0 -0
  1024. /package/dist/{src/tooltip → tooltip}/Tooltip.js +0 -0
  1025. /package/dist/{src/tooltip → tooltip}/TooltipHoverModeProvider.js +0 -0
  1026. /package/dist/{src/tooltip → tooltip}/constants.js +0 -0
  1027. /package/dist/{src/tooltip → tooltip}/tooltipStyles.js +0 -0
  1028. /package/dist/{src/tooltip → tooltip}/useTooltip.js +0 -0
  1029. /package/dist/{src/tooltip → tooltip}/useTooltipPosition.js +0 -0
  1030. /package/dist/{src/tooltip → tooltip}/utils.js +0 -0
  1031. /package/dist/{src/transition → transition}/CSSTransition.js +0 -0
  1032. /package/dist/{src/transition → transition}/Collapse.js +0 -0
  1033. /package/dist/{src/transition → transition}/CrossFade.js +0 -0
  1034. /package/dist/{src/transition → transition}/ScaleTransition.js +0 -0
  1035. /package/dist/{src/transition → transition}/SkeletonPlaceholder.js +0 -0
  1036. /package/dist/{src/transition → transition}/Slide.js +0 -0
  1037. /package/dist/{src/transition → transition}/SlideContainer.js +0 -0
  1038. /package/dist/{src/transition → transition}/collapseStyles.js +0 -0
  1039. /package/dist/{src/transition → transition}/config.js +0 -0
  1040. /package/dist/{src/transition → transition}/maxWidthTransition.js +0 -0
  1041. /package/dist/{src/transition → transition}/skeletonPlaceholderUtils.js +0 -0
  1042. /package/dist/{src/transition → transition}/types.js +0 -0
  1043. /package/dist/{src/transition → transition}/useCSSTransition.js +0 -0
  1044. /package/dist/{src/transition → transition}/useCarousel.js +0 -0
  1045. /package/dist/{src/transition → transition}/useCollapseTransition.js +0 -0
  1046. /package/dist/{src/transition → transition}/useCrossFadeTransition.js +0 -0
  1047. /package/dist/{src/transition → transition}/useMaxWidthTransition.js +0 -0
  1048. /package/dist/{src/transition → transition}/useScaleTransition.js +0 -0
  1049. /package/dist/{src/transition → transition}/useSkeletonPlaceholder.js +0 -0
  1050. /package/dist/{src/transition → transition}/useSlideTransition.js +0 -0
  1051. /package/dist/{src/transition → transition}/useTransition.js +0 -0
  1052. /package/dist/{src/transition → transition}/utils.js +0 -0
  1053. /package/dist/{src/tree → tree}/DefaultTreeItemRenderer.js +0 -0
  1054. /package/dist/{src/tree → tree}/Tree.js +0 -0
  1055. /package/dist/{src/tree → tree}/TreeGroup.js +0 -0
  1056. /package/dist/{src/tree → tree}/TreeItem.js +0 -0
  1057. /package/dist/{src/tree → tree}/TreeItemExpander.js +0 -0
  1058. /package/dist/{src/tree → tree}/TreeProvider.js +0 -0
  1059. /package/dist/{src/tree → tree}/styles.js +0 -0
  1060. /package/dist/{src/tree → tree}/types.js +0 -0
  1061. /package/dist/{src/tree → tree}/useTree.js +0 -0
  1062. /package/dist/{src/tree → tree}/useTreeExpansion.js +0 -0
  1063. /package/dist/{src/tree → tree}/useTreeItems.js +0 -0
  1064. /package/dist/{src/tree → tree}/useTreeMovement.js +0 -0
  1065. /package/dist/{src/tree → tree}/useTreeSelection.js +0 -0
  1066. /package/dist/{src/tree → tree}/utils.js +0 -0
  1067. /package/dist/{src/types.js → types.js} +0 -0
  1068. /package/dist/{src/typography → typography}/SrOnly.js +0 -0
  1069. /package/dist/{src/typography → typography}/TextContainer.js +0 -0
  1070. /package/dist/{src/typography → typography}/Typography.js +0 -0
  1071. /package/dist/{src/typography → typography}/WritingDirectionProvider.js +0 -0
  1072. /package/dist/{src/useAsyncAction.js → useAsyncAction.js} +0 -0
  1073. /package/dist/{src/useDebouncedFunction.js → useDebouncedFunction.js} +0 -0
  1074. /package/dist/{src/useDropzone.js → useDropzone.js} +0 -0
  1075. /package/dist/{src/useElementSize.js → useElementSize.js} +0 -0
  1076. /package/dist/{src/useEnsuredId.js → useEnsuredId.js} +0 -0
  1077. /package/dist/{src/useEnsuredRef.js → useEnsuredRef.js} +0 -0
  1078. /package/dist/{src/useEnsuredState.js → useEnsuredState.js} +0 -0
  1079. /package/dist/{src/useHtmlClassName.js → useHtmlClassName.js} +0 -0
  1080. /package/dist/{src/useIntersectionObserver.js → useIntersectionObserver.js} +0 -0
  1081. /package/dist/{src/useIsomorphicLayoutEffect.js → useIsomorphicLayoutEffect.js} +0 -0
  1082. /package/dist/{src/useLocalStorage.js → useLocalStorage.js} +0 -0
  1083. /package/dist/{src/useOrientation.js → useOrientation.js} +0 -0
  1084. /package/dist/{src/usePageInactive.js → usePageInactive.js} +0 -0
  1085. /package/dist/{src/useResizeListener.js → useResizeListener.js} +0 -0
  1086. /package/dist/{src/useResizeObserver.js → useResizeObserver.js} +0 -0
  1087. /package/dist/{src/useThrottledFunction.js → useThrottledFunction.js} +0 -0
  1088. /package/dist/{src/useToggle.js → useToggle.js} +0 -0
  1089. /package/dist/{src/useUnmounted.js → useUnmounted.js} +0 -0
  1090. /package/dist/{src/useWindowSize.js → useWindowSize.js} +0 -0
  1091. /package/dist/{src/utils → utils}/RenderRecursively.js +0 -0
  1092. /package/dist/{src/utils → utils}/alphaNumericSort.js +0 -0
  1093. /package/dist/{src/utils → utils}/applyRef.js +0 -0
  1094. /package/dist/{src/utils → utils}/bem.js +0 -0
  1095. /package/dist/{src/utils → utils}/filters.js +0 -0
  1096. /package/dist/{src/utils → utils}/getClientPosition.js +0 -0
  1097. /package/dist/{src/utils → utils}/getMiddleOfRange.js +0 -0
  1098. /package/dist/{src/utils → utils}/getPercentage.js +0 -0
  1099. /package/dist/{src/utils → utils}/getRangeDefaultValue.js +0 -0
  1100. /package/dist/{src/utils → utils}/getRangeSteps.js +0 -0
  1101. /package/dist/{src/utils → utils}/identity.js +0 -0
  1102. /package/dist/{src/utils → utils}/isElementVisible.js +0 -0
  1103. /package/dist/{src/utils → utils}/loop.js +0 -0
  1104. /package/dist/{src/utils → utils}/nearest.js +0 -0
  1105. /package/dist/{src/utils → utils}/parseCssLengthUnit.js +0 -0
  1106. /package/dist/{src/utils → utils}/randomInt.js +0 -0
  1107. /package/dist/{src/utils → utils}/wait.js +0 -0
  1108. /package/dist/{src/utils → utils}/withinRange.js +0 -0
  1109. /package/dist/{src/window-splitter → window-splitter}/WindowSplitter.js +0 -0
  1110. /package/dist/{src/window-splitter → window-splitter}/useWindowSplitter.js +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/positioning/constants.ts"],"sourcesContent":["import type { PositionAnchor } from \"./types.js\";\n\nexport const ABOVE_LEFT_ANCHOR: PositionAnchor = {\n x: \"left\",\n y: \"above\",\n};\n\nexport const ABOVE_INNER_LEFT_ANCHOR: PositionAnchor = {\n x: \"inner-left\",\n y: \"above\",\n};\n\nexport const ABOVE_CENTER_ANCHOR: PositionAnchor = {\n x: \"center\",\n y: \"above\",\n};\n\nexport const ABOVE_INNER_RIGHT_ANCHOR: PositionAnchor = {\n x: \"inner-right\",\n y: \"above\",\n};\n\nexport const ABOVE_RIGHT_ANCHOR: PositionAnchor = {\n x: \"right\",\n y: \"above\",\n};\n\nexport const TOP_LEFT_ANCHOR: PositionAnchor = {\n x: \"left\",\n y: \"top\",\n};\n\nexport const TOP_INNER_LEFT_ANCHOR: PositionAnchor = {\n x: \"inner-left\",\n y: \"top\",\n};\n\nexport const TOP_CENTER_ANCHOR: PositionAnchor = {\n x: \"center\",\n y: \"top\",\n};\n\nexport const TOP_INNER_RIGHT_ANCHOR: PositionAnchor = {\n x: \"inner-right\",\n y: \"top\",\n};\n\nexport const TOP_RIGHT_ANCHOR: PositionAnchor = {\n x: \"right\",\n y: \"top\",\n};\n\nexport const CENTER_LEFT_ANCHOR: PositionAnchor = {\n x: \"left\",\n y: \"center\",\n};\n\nexport const CENTER_INNER_LEFT_ANCHOR: PositionAnchor = {\n x: \"inner-left\",\n y: \"center\",\n};\n\nexport const CENTER_CENTER_ANCHOR: PositionAnchor = {\n x: \"center\",\n y: \"center\",\n};\n\nexport const CENTER_INNER_RIGHT_ANCHOR: PositionAnchor = {\n x: \"inner-right\",\n y: \"center\",\n};\n\nexport const CENTER_RIGHT_ANCHOR: PositionAnchor = {\n x: \"right\",\n y: \"center\",\n};\n\nexport const BOTTOM_LEFT_ANCHOR: PositionAnchor = {\n x: \"left\",\n y: \"bottom\",\n};\n\nexport const BOTTOM_INNER_LEFT_ANCHOR: PositionAnchor = {\n x: \"inner-left\",\n y: \"bottom\",\n};\n\nexport const BOTTOM_CENTER_ANCHOR: PositionAnchor = {\n x: \"center\",\n y: \"bottom\",\n};\n\nexport const BOTTOM_INNER_RIGHT_ANCHOR: PositionAnchor = {\n x: \"inner-right\",\n y: \"bottom\",\n};\n\nexport const BOTTOM_RIGHT_ANCHOR: PositionAnchor = {\n x: \"right\",\n y: \"bottom\",\n};\n\nexport const BELOW_LEFT_ANCHOR: PositionAnchor = {\n x: \"left\",\n y: \"below\",\n};\n\nexport const BELOW_INNER_LEFT_ANCHOR: PositionAnchor = {\n x: \"inner-left\",\n y: \"below\",\n};\n\nexport const BELOW_CENTER_ANCHOR: PositionAnchor = {\n x: \"center\",\n y: \"below\",\n};\n\nexport const BELOW_INNER_RIGHT_ANCHOR: PositionAnchor = {\n x: \"inner-right\",\n y: \"below\",\n};\n\nexport const BELOW_RIGHT_ANCHOR: PositionAnchor = {\n x: \"right\",\n y: \"below\",\n};\n"],"names":["ABOVE_LEFT_ANCHOR","x","y","ABOVE_INNER_LEFT_ANCHOR","ABOVE_CENTER_ANCHOR","ABOVE_INNER_RIGHT_ANCHOR","ABOVE_RIGHT_ANCHOR","TOP_LEFT_ANCHOR","TOP_INNER_LEFT_ANCHOR","TOP_CENTER_ANCHOR","TOP_INNER_RIGHT_ANCHOR","TOP_RIGHT_ANCHOR","CENTER_LEFT_ANCHOR","CENTER_INNER_LEFT_ANCHOR","CENTER_CENTER_ANCHOR","CENTER_INNER_RIGHT_ANCHOR","CENTER_RIGHT_ANCHOR","BOTTOM_LEFT_ANCHOR","BOTTOM_INNER_LEFT_ANCHOR","BOTTOM_CENTER_ANCHOR","BOTTOM_INNER_RIGHT_ANCHOR","BOTTOM_RIGHT_ANCHOR","BELOW_LEFT_ANCHOR","BELOW_INNER_LEFT_ANCHOR","BELOW_CENTER_ANCHOR","BELOW_INNER_RIGHT_ANCHOR","BELOW_RIGHT_ANCHOR"],"mappings":"AAEA,OAAO,MAAMA,oBAAoC;IAC/CC,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMC,0BAA0C;IACrDF,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAME,sBAAsC;IACjDH,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMG,2BAA2C;IACtDJ,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMI,qBAAqC;IAChDL,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMK,kBAAkC;IAC7CN,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMM,wBAAwC;IACnDP,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMO,oBAAoC;IAC/CR,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMQ,yBAAyC;IACpDT,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMS,mBAAmC;IAC9CV,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMU,qBAAqC;IAChDX,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMW,2BAA2C;IACtDZ,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMY,uBAAuC;IAClDb,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMa,4BAA4C;IACvDd,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMc,sBAAsC;IACjDf,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMe,qBAAqC;IAChDhB,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMgB,2BAA2C;IACtDjB,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMiB,uBAAuC;IAClDlB,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMkB,4BAA4C;IACvDnB,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMmB,sBAAsC;IACjDpB,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMoB,oBAAoC;IAC/CrB,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMqB,0BAA0C;IACrDtB,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMsB,sBAAsC;IACjDvB,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMuB,2BAA2C;IACtDxB,GAAG;IACHC,GAAG;AACL,EAAE;AAEF,OAAO,MAAMwB,qBAAqC;IAChDzB,GAAG;IACHC,GAAG;AACL,EAAE"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/positioning/createHorizontalPosition.ts"],"sourcesContent":["import type { XCoordConfig } from \"./utils.js\";\nimport {\n getCenterXCoord,\n getInnerLeftCoord,\n getInnerRightCoord,\n getLeftCoord,\n getRightCoord,\n} from \"./utils.js\";\nimport type { FixedPositionOptions, HorizontalPosition } from \"./types.js\";\n\n/**\n * @internal\n */\ninterface XPosition {\n left: number;\n right?: number;\n width?: number;\n minWidth?: number;\n actualX: HorizontalPosition;\n}\n\n/**\n * @internal\n */\nexport interface FixConfig extends XCoordConfig {\n vwMargin: number;\n screenRight: number;\n disableSwapping: boolean;\n}\n\n/**\n * @internal\n */\nexport interface CreateHorizontalPositionOptions\n extends Required<\n Pick<\n FixedPositionOptions,\n \"vwMargin\" | \"xMargin\" | \"width\" | \"disableSwapping\"\n >\n > {\n x: HorizontalPosition;\n vw: number;\n elWidth: number;\n initialX?: number;\n containerRect: DOMRect;\n}\n\n/**\n * Attempts to position the fixed element so that it will appear to the left of\n * the container element but also within the viewport boundaries. When swapping\n * is enabled, it will attempt to swap to the right position if it can't fit\n * within the viewport to the left. If it can't fit in the viewport even after\n * being swapped to the right or swapping is disabled, it will be positioned to\n * the viewport left boundary.\n *\n * @internal\n */\nexport function createAnchoredLeft(config: FixConfig): XPosition {\n const { vwMargin, screenRight, elWidth, disableSwapping } = config;\n\n let left = getLeftCoord(config);\n let actualX: HorizontalPosition = \"left\";\n if (left >= vwMargin) {\n return { actualX, left };\n }\n\n const swappedLeft = getRightCoord(config);\n if (disableSwapping || swappedLeft + elWidth > screenRight) {\n left = vwMargin;\n } else {\n left = swappedLeft;\n actualX = \"right\";\n }\n\n return { actualX, left };\n}\n\n/**\n * Attempts to position the fixed element so that it will appear to the\n * inner-left of the container element but also within the viewport boundaries.\n * When swapping is enabled, it will attempt to swap to the right position if it\n * can't fit within the viewport to the left. If it can't fit in the viewport\n * even after being swapped to the right or swapping is disabled, it will be\n * positioned to the viewport left boundary.\n *\n * @internal\n */\nexport function createAnchoredInnerLeft(config: FixConfig): XPosition {\n const { vwMargin, screenRight, elWidth, disableSwapping } = config;\n\n let left = getInnerLeftCoord(config);\n let actualX: HorizontalPosition = \"inner-left\";\n if (left + elWidth <= screenRight && left >= vwMargin) {\n return { actualX, left };\n }\n\n if (disableSwapping) {\n if (left + elWidth > screenRight) {\n left = screenRight - elWidth;\n } else {\n left = vwMargin;\n }\n\n return { actualX, left };\n }\n\n const swappedLeft = getInnerRightCoord(config);\n if (swappedLeft < vwMargin) {\n left = vwMargin;\n } else if (swappedLeft + elWidth > screenRight) {\n left = screenRight - elWidth;\n actualX = \"inner-right\";\n } else {\n left = swappedLeft;\n actualX = \"inner-right\";\n }\n\n return { actualX, left };\n}\n\n/**\n * Attempts to position the fixed element so that it will appear at the center\n * of the container element but also within the viewport boundaries. If the\n * centered element can't fit within the viewport, it will use the vwMargin\n * value if it overflowed to the left, it'll position to the screen right\n * boundary.\n *\n * @internal\n */\nexport function createAnchoredCenter(config: FixConfig): XPosition {\n const { vwMargin, screenRight, elWidth } = config;\n let left = getCenterXCoord(config);\n if (left < vwMargin) {\n left = vwMargin;\n } else if (left + elWidth > screenRight || left < vwMargin) {\n left = screenRight - elWidth;\n }\n\n return { actualX: \"center\", left };\n}\n\n/**\n * Attempts to position the fixed element so that it will appear to the\n * inner-right of the container element but also within the viewport boundaries.\n * When swapping is enabled, it will attempt to swap to the inner-left position\n * if it can't fit within the viewport to the right. If it can't fit in the\n * viewport even after being swapped to the left or swapping is disabled, it\n * will be positioned to the viewport right boundary.\n *\n * @internal\n */\nexport function createAnchoredInnerRight(config: FixConfig): XPosition {\n const { screenRight, vwMargin, elWidth, disableSwapping } = config;\n\n let left = getInnerRightCoord(config);\n let actualX: HorizontalPosition = \"inner-right\";\n if (left >= vwMargin) {\n return { actualX, left: Math.min(left, screenRight - elWidth) };\n }\n\n const swappedLeft = getInnerLeftCoord(config);\n if (disableSwapping || swappedLeft + elWidth > screenRight) {\n left = vwMargin;\n } else {\n left = Math.max(swappedLeft, vwMargin);\n actualX = \"inner-left\";\n }\n\n return { actualX, left };\n}\n\n/**\n * Attempts to position the fixed element so that it will appear to the right of\n * the container element but also within the viewport boundaries. When swapping\n * is enabled, it will attempt to swap to the left position if it can't fit\n * within the viewport to the right. If it can't fit in the viewport even after\n * being swapped to the left or swapping is disabled, it will be positioned to\n * the viewport right boundary.\n *\n * @internal\n */\nexport function createAnchoredRight(config: FixConfig): XPosition {\n const { screenRight, vwMargin, elWidth, disableSwapping } = config;\n\n let left = getRightCoord(config);\n let actualX: HorizontalPosition = \"right\";\n if (left + elWidth <= screenRight) {\n return { actualX, left };\n }\n\n const swappedLeft = getLeftCoord(config);\n if (disableSwapping || swappedLeft < vwMargin) {\n left = screenRight - elWidth;\n } else {\n left = swappedLeft;\n actualX = \"left\";\n }\n\n return { actualX, left };\n}\n\nexport interface EqualWidthOptions\n extends Pick<\n CreateHorizontalPositionOptions,\n \"x\" | \"elWidth\" | \"xMargin\" | \"vwMargin\" | \"containerRect\" | \"initialX\"\n > {\n screenRight: number;\n isMinWidth: boolean;\n}\n\n/**\n * @internal\n */\nexport function createEqualWidth(options: EqualWidthOptions): XPosition {\n const {\n x,\n elWidth,\n xMargin,\n vwMargin,\n initialX,\n containerRect,\n screenRight,\n isMinWidth,\n } = options;\n\n let left = initialX ?? containerRect.left + xMargin;\n\n let width: number | undefined = containerRect.width - xMargin * 2;\n let minWidth: number | undefined;\n let right: number | undefined;\n if (isMinWidth) {\n minWidth = width;\n // if the fixed element has a width greater than the element it is fixed to,\n // update the width to be the fixed element's width. since the \"min-width\"\n // option is only possible for horizontally centered elements, need to then\n // update the `left` position again.\n if (elWidth > width) {\n left -= (elWidth - width) / 2;\n minWidth = elWidth;\n }\n\n width = undefined;\n const elRight = left + elWidth;\n if (elRight > screenRight) {\n left -= elRight - screenRight;\n right = vwMargin;\n }\n\n left = Math.max(vwMargin, left);\n }\n\n // going to assume that the container element is visible in the DOM and just\n // make the fixed element have the same left and right corners\n return {\n left,\n right,\n width,\n minWidth,\n actualX: x,\n };\n}\n\n/**\n * Creates the horizontal position for a fixed element with the provided\n * options.\n * @internal\n */\nexport function createHorizontalPosition(\n options: CreateHorizontalPositionOptions\n): XPosition {\n const {\n x,\n vw,\n vwMargin,\n xMargin,\n width,\n elWidth,\n initialX,\n containerRect,\n disableSwapping,\n } = options;\n\n const screenRight = vw - vwMargin;\n if (width === \"min\" || width === \"equal\") {\n return createEqualWidth({\n x,\n vwMargin,\n xMargin,\n elWidth,\n initialX,\n containerRect,\n screenRight,\n isMinWidth: width === \"min\",\n });\n }\n\n if (elWidth > vw - vwMargin * 2) {\n // if the element's width is greater than the viewport's width minus the\n // margin on both sides, just make the element span the entire viewport with\n // the margin\n return {\n left: vwMargin,\n right: vwMargin,\n actualX: x,\n };\n }\n\n const config: FixConfig = {\n vwMargin,\n xMargin,\n elWidth,\n initialX,\n screenRight,\n containerRect,\n disableSwapping,\n };\n\n switch (x) {\n case \"left\":\n return createAnchoredLeft(config);\n case \"inner-left\":\n return createAnchoredInnerLeft(config);\n case \"center\":\n return createAnchoredCenter(config);\n case \"inner-right\":\n return createAnchoredInnerRight(config);\n case \"right\":\n return createAnchoredRight(config);\n }\n}\n"],"names":["getCenterXCoord","getInnerLeftCoord","getInnerRightCoord","getLeftCoord","getRightCoord","createAnchoredLeft","config","vwMargin","screenRight","elWidth","disableSwapping","left","actualX","swappedLeft","createAnchoredInnerLeft","createAnchoredCenter","createAnchoredInnerRight","Math","min","max","createAnchoredRight","createEqualWidth","options","x","xMargin","initialX","containerRect","isMinWidth","width","minWidth","right","undefined","elRight","createHorizontalPosition","vw"],"mappings":"AACA,SACEA,eAAe,EACfC,iBAAiB,EACjBC,kBAAkB,EAClBC,YAAY,EACZC,aAAa,QACR,aAAa;AAwCpB;;;;;;;;;CASC,GACD,OAAO,SAASC,mBAAmBC,MAAiB;IAClD,MAAM,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,OAAO,EAAEC,eAAe,EAAE,GAAGJ;IAE5D,IAAIK,OAAOR,aAAaG;IACxB,IAAIM,UAA8B;IAClC,IAAID,QAAQJ,UAAU;QACpB,OAAO;YAAEK;YAASD;QAAK;IACzB;IAEA,MAAME,cAAcT,cAAcE;IAClC,IAAII,mBAAmBG,cAAcJ,UAAUD,aAAa;QAC1DG,OAAOJ;IACT,OA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C,UAAUrB,OAAOF;QACvB,IAAIuB,UAAUxB,aAAa;YACzBG,QAAQqB,UAAUxB;YAClBsB,QAAQvB;QACV;QAEAI,OAAOM,KAAKE,GAAG,CAACZ,UAAUI;IAC5B;IAEA,4EAA4E;IAC5E,8DAA8D;IAC9D,OAAO;QACLA;QACAmB;QACAF;QACAC;QACAjB,SAASW;IACX;AACF;AAEA;;;;CAIC,GACD,OAAO,SAASU,yBACdX,OAAwC;IAExC,MAAM,EACJC,CAAC,EACDW,EAAE,EACF3B,QAAQ,EACRiB,OAAO,EACPI,KAAK,EACLnB,OAAO,EACPgB,QAAQ,EACRC,aAAa,EACbhB,eAAe,EAChB,GAAGY;IAEJ,MAAMd,cAAc0B,KAAK3B;IACzB,IAAIqB,UAAU,SAASA,UAAU,SAAS;QACxC,OAAOP,iBAAiB;YACtBE;YACAhB;YACAiB;YACAf;YACAgB;YACAC;YACAlB;YACAmB,YAAYC,UAAU;QACxB;IACF;IAEA,IAAInB,UAAUyB,KAAK3B,WAAW,GAAG;QAC/B,wEAAwE;QACxE,4EAA4E;QAC5E,aAAa;QACb,OAAO;YACLI,MAAMJ;YACNuB,OAAOvB;YACPK,SAASW;QACX;IACF;IAEA,MAAMjB,SAAoB;QACxBC;QACAiB;QACAf;QACAgB;QACAjB;QACAkB;QACAhB;IACF;IAEA,OAAQa;QACN,KAAK;YACH,OAAOlB,mBAAmBC;QAC5B,KAAK;YACH,OAAOQ,wBAAwBR;QACjC,KAAK;YACH,OAAOS,qBAAqBT;QAC9B,KAAK;YACH,OAAOU,yBAAyBV;QAClC,KAAK;YACH,OAAOc,oBAAoBd;IAC/B;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/positioning/createVerticalPosition.ts"],"sourcesContent":["import type { YCoordConfig } from \"./utils.js\";\nimport {\n getAboveCoord,\n getBelowCoord,\n getBottomCoord,\n getCenterYCoord,\n getTopCoord,\n} from \"./utils.js\";\nimport type { FixedPositionOptions, VerticalPosition } from \"./types.js\";\n\n/** @internal */\ninterface YPosition {\n top: number;\n bottom?: number;\n actualY: VerticalPosition;\n /** @remarks \\@since 6.0.0 */\n transformOriginY?: number;\n}\n\n/** @internal */\nexport interface FixConfig extends YCoordConfig {\n vhMargin: number;\n screenBottom: number;\n preventOverlap: boolean;\n disableSwapping: boolean;\n disableVHBounds: boolean;\n}\n\n/** @internal */\nexport interface CreateVerticalPositionOptions\n extends Required<\n Pick<\n FixedPositionOptions,\n | \"yMargin\"\n | \"vhMargin\"\n | \"preventOverlap\"\n | \"disableSwapping\"\n | \"disableVHBounds\"\n >\n > {\n y: VerticalPosition;\n vh: number;\n initialY?: number;\n elHeight: number;\n containerRect: DOMRect;\n}\n\n/**\n * Attempts to position the fixed element so that it will appear completely\n * above the container element but also within the viewport boundaries. When\n * swapping is enabled, it will attempt to swap to the below position if it\n * can't fit within the viewport above the container element. If it can't fit in\n * the viewport even after being swapped below or swapping is disabled, it will\n * be positioned to the top viewport boundary.\n *\n * @internal\n */\nexport function createAnchoredAbove(config: FixConfig): YPosition {\n const {\n yMargin,\n vhMargin,\n screenBottom,\n elHeight,\n containerRect,\n preventOverlap,\n disableSwapping,\n disableVHBounds,\n } = config;\n let top = getAboveCoord(config);\n let actualY: VerticalPosition = \"above\";\n\n if (disableVHBounds) {\n // can't actually allow a top value as a negative number since browsers\n // won't scroll upwards past the normal page top\n return { actualY, top: Math.max(0, top) };\n }\n\n if (top > vhMargin) {\n // don't need to do anything else since the top is still in the viewport and\n // since it's positioned above, we already know it can't overlap the\n // container element\n return { actualY, top };\n }\n\n const swappedTop = getBelowCoord(config);\n if (disableSwapping || swappedTop + elHeight > screenBottom) {\n top = Math.min(top, vhMargin);\n } else {\n actualY = \"below\";\n top = swappedTop;\n }\n\n let bottom: number | undefined;\n if (\n preventOverlap &&\n // can't overlap if it's positioned below\n actualY === \"above\" &&\n top + elHeight > containerRect.top\n ) {\n bottom = screenBottom - containerRect.top + yMargin;\n }\n\n return { actualY, top, bottom };\n}\n\n/**\n * Attempts to position the fixed element so that it will appear fixed to the\n * top of the container element but also within the viewport boundaries. When\n * swapping is enabled, it will attempt to swap to the bottom position if it\n * can't fit within the viewport. If it can't fit in the viewport even after\n * being swapped to the bottom position or swapping is disabled, it will be\n * positioned to the top viewport boundary.\n *\n * @internal\n */\nexport function createAnchoredTop(config: FixConfig): YPosition {\n const { vhMargin, screenBottom, elHeight, disableSwapping, disableVHBounds } =\n config;\n let top = getTopCoord(config);\n let actualY: VerticalPosition = \"top\";\n\n if (disableVHBounds || top + elHeight <= screenBottom) {\n return { actualY, top };\n }\n\n const swappedTop = getBottomCoord(config);\n if (disableSwapping || swappedTop < vhMargin) {\n top = Math.max(top, vhMargin);\n } else {\n actualY = \"bottom\";\n top = swappedTop;\n }\n\n return { actualY, top };\n}\n\n/**\n * Attempts to position the fixed element so that it will appear at the center\n * of the container element but also within the viewport boundaries. If the\n * entered element can't fit within the viewport, it'll update the top value\n * to either be the vhMargin or position to the screen bottom boundary\n *\n * @internal\n */\nexport function createAnchoredCenter(config: FixConfig): YPosition {\n const { vhMargin, screenBottom, elHeight, disableVHBounds } = config;\n let top = getCenterYCoord(config);\n const actualY: VerticalPosition = \"center\";\n if (disableVHBounds) {\n return { actualY, top: Math.max(0, top) };\n }\n\n top = Math.max(vhMargin, top);\n if (top + elHeight > screenBottom) {\n top = screenBottom - elHeight;\n }\n\n return { actualY, top };\n}\n\n/**\n * Attempts to position the fixed element so that it will appear fixed to the\n * bottom of the container element but also within the viewport boundaries. When\n * swapping is enabled, it will attempt to swap to the top position if it can't\n * fit within the viewport. If it can't fit in the viewport even after being\n * swapped to the top position or swapping is disabled, it will be positioned to\n * the bottom viewport boundary.\n *\n * @internal\n */\nexport function createAnchoredBottom(config: FixConfig): YPosition {\n const { vhMargin, screenBottom, elHeight, disableSwapping, disableVHBounds } =\n config;\n let top = getBottomCoord(config);\n let actualY: VerticalPosition = \"bottom\";\n if (disableVHBounds || top > vhMargin) {\n return { actualY, top };\n }\n\n const swappedTop = getTopCoord(config);\n if (disableSwapping || swappedTop + elHeight > screenBottom) {\n top = Math.min(top, screenBottom - elHeight);\n } else {\n actualY = \"top\";\n top = swappedTop;\n }\n\n return { actualY, top };\n}\n\n/**\n * Attempts to position the fixed element so that it will appear completely\n * below the container element but also within the viewport boundaries. When\n * swapping is enabled, it will attempt to swap to the above position if it\n * can't fit within the viewport below the container element. If it can't fit in\n * the viewport even after being swapped above or swapping is disabled, it will\n * be positioned to the bottom viewport boundary.\n *\n * @internal\n */\nexport function createAnchoredBelow(config: FixConfig): YPosition {\n const {\n yMargin,\n vhMargin,\n elHeight,\n screenBottom,\n containerRect,\n preventOverlap,\n disableSwapping,\n disableVHBounds,\n } = config;\n let top = getBelowCoord(config);\n let actualY: VerticalPosition = \"below\";\n if (disableVHBounds || top + elHeight <= screenBottom) {\n return { actualY, top };\n }\n\n if (preventOverlap) {\n const availableTop = containerRect.top - yMargin;\n if (disableSwapping || availableTop < screenBottom - top) {\n return {\n actualY,\n top,\n bottom: vhMargin,\n };\n }\n\n return {\n actualY: \"above\",\n top: Math.max(vhMargin, availableTop - elHeight),\n // this makes it so that the bottom of the fixed element is the top of the container\n // element. this ensures that it won't ever overlap the container element\n bottom: window.innerHeight - availableTop,\n };\n }\n\n const swappedTop = getAboveCoord(config);\n if (disableSwapping || swappedTop < vhMargin) {\n top = Math.min(top, screenBottom - elHeight);\n } else {\n actualY = \"above\";\n top = swappedTop;\n }\n\n return { actualY, top };\n}\n\n/**\n * Creates the vertical position for a fixed element with the provided options.\n *\n * @internal\n */\nexport function createVerticalPosition(\n options: CreateVerticalPositionOptions\n): YPosition {\n const {\n y,\n vh,\n vhMargin,\n yMargin,\n elHeight,\n initialY,\n containerRect,\n disableSwapping,\n preventOverlap,\n disableVHBounds,\n } = options;\n\n if (!disableVHBounds && !preventOverlap && elHeight > vh - vhMargin * 2) {\n // the element is too big to be displayed in the viewport, so just span the\n // full viewport excluding margins\n return {\n top: vhMargin,\n bottom: vhMargin,\n actualY: \"center\",\n transformOriginY: containerRect.top,\n };\n }\n\n const config: FixConfig = {\n vhMargin,\n yMargin,\n elHeight,\n initialY,\n containerRect,\n screenBottom: vh - vhMargin,\n preventOverlap,\n disableSwapping,\n disableVHBounds,\n };\n\n switch (y) {\n case \"above\":\n return createAnchoredAbove(config);\n case \"top\":\n return createAnchoredTop(config);\n case \"center\":\n return createAnchoredCenter(config);\n case \"bottom\":\n return createAnchoredBottom(config);\n case \"below\":\n return createAnchoredBelow(config);\n }\n}\n"],"names":["getAboveCoord","getBelowCoord","getBottomCoord","getCenterYCoord","getTopCoord","createAnchoredAbove","config","yMargin","vhMargin","screenBottom","elHeight","containerRect","preventOverlap","disableSwapping","disableVHBounds","top","actualY","Math","max","swappedTop","min","bottom","createAnchoredTop","createAnchoredCenter","createAnchoredBottom","createAnchoredBelow","availableTop","window","innerHeight","createVerticalPosition","options","y","vh","initialY","transformOriginY"],"mappings":"AACA,SACEA,aAAa,EACbC,aAAa,EACbC,cAAc,EACdC,eAAe,EACfC,WAAW,QACN,aAAa;AAwCpB;;;;;;;;;CASC,GACD,OAAO,SAASC,oBAAoBC,MAAiB;IACnD,MAAM,EACJC,OAAO,EACPC,QAAQ,EACRC,YAAY,EACZC,QAAQ,EACRC,aAAa,EACbC,cAAc,EACdC,eAAe,EACfC,eAAe,EAChB,GAAGR;IACJ,IAAIS,MAAMf,cAAcM;IACxB,IAAIU,UAA4B;IAEhC,IAAIF,iBAAiB;QACnB,uEAAuE;QACvE,gDAAgD;QAChD,OAAO;YAAEE;YAASD,KAAKE,KAAKC,GAAG,CAAC,GAAGH;QAAK;IAC1C;IAEA,IAAIA,MAAMP,UAAU;QAClB,4EAA4E;QAC5E,oEAAoE;QACpE,oBAAoB;QACpB,OAAO;YAAEQ;YAASD;QAAI;IACxB;IAEA,MAAMI,aAAalB,cAAcK;IACjC,IAAIO,mBAAmBM,aAAaT,WAAWD,cAAc;QAC3DM,MAAME,KAAKG,GAAG,CAACL,KAAKP;IACtB,OAAO;QACLQ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EACRD,OAAO,EACPG,QAAQ,EACRuB,QAAQ,EACRtB,aAAa,EACbE,eAAe,EACfD,cAAc,EACdE,eAAe,EAChB,GAAGgB;IAEJ,IAAI,CAAChB,mBAAmB,CAACF,kBAAkBF,WAAWsB,KAAKxB,WAAW,GAAG;QACvE,2EAA2E;QAC3E,kCAAkC;QAClC,OAAO;YACLO,KAAKP;YACLa,QAAQb;YACRQ,SAAS;YACTkB,kBAAkBvB,cAAcI,GAAG;QACrC;IACF;IAEA,MAAMT,SAAoB;QACxBE;QACAD;QACAG;QACAuB;QACAtB;QACAF,cAAcuB,KAAKxB;QACnBI;QACAC;QACAC;IACF;IAEA,OAAQiB;QACN,KAAK;YACH,OAAO1B,oBAAoBC;QAC7B,KAAK;YACH,OAAOgB,kBAAkBhB;QAC3B,KAAK;YACH,OAAOiB,qBAAqBjB;QAC9B,KAAK;YACH,OAAOkB,qBAAqBlB;QAC9B,KAAK;YACH,OAAOmB,oBAAoBnB;IAC/B;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/positioning/getFixedPosition.ts"],"sourcesContent":["import { getScrollbarWidth } from \"../scroll/getScrollbarWidth.js\";\nimport { BELOW_CENTER_ANCHOR } from \"./constants.js\";\nimport { createHorizontalPosition } from \"./createHorizontalPosition.js\";\nimport { createVerticalPosition } from \"./createVerticalPosition.js\";\nimport type { FixedPosition, FixedPositionOptions } from \"./types.js\";\nimport {\n findSizingContainer,\n getElementRect,\n getTransformOrigin,\n} from \"./utils.js\";\n\n/**\n * This is used when there is no `container` element so that some styles can\n * still be created. The main use-case for this is context menus and when the\n * `initialX` and `initialY` options have been provided.\n *\n * @internal\n * @remarks \\@since 5.0.0\n */\nconst FALLBACK_DOM_RECT: DOMRect = {\n x: 0,\n y: 0,\n height: 0,\n width: 0,\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n toJSON() {\n // do nothing\n },\n};\n\n/**\n * One of the most complicated functions in this project that will attempt to\n * position an element relative to another container element while still being\n * visible within the viewport. Below is the logical flow for attempting to fix\n * the element to the container:\n *\n * No Container: If there is no container element, return the provided x and y\n * positions and no styles since there's nothing we can use to calculate the\n * position.\n *\n * No Element: If the container was provided but the element to position does\n * not exist, return an style object containing the `left` and `top` values for\n * the container and apply as many of the positioning options as possible so\n * that the styles are \"as close as possible\" before the fixed element is added\n * to the DOM. This will also return the provided x and y positions since\n * nothing could be swapped around yet.\n *\n * Container and Element: If both the container and fixed element were provided,\n * apply all the positioning options to the `left` and `top` values of the\n * container based on the sizes of both elements.\n *\n * Now that the `left` and `top` values were applied, check to see if the\n * element is fully visible within the viewport with the provided positioning\n * options. If it is fully visible, do nothing else. If it isn't... follow the\n * next flow:\n *\n * First, check the horizontal sizes and make sure that the element is still\n * within the viewport with the provided view width margin. If it isn't, first\n * try to swap only to a `right` style instead of left to see if that fixes it,\n * otherwise keep both the `left` and `right` styles.\n */\nexport function getFixedPosition(options: FixedPositionOptions): FixedPosition {\n const {\n element,\n anchor = BELOW_CENTER_ANCHOR,\n initialX,\n vwMargin = 16,\n vhMargin = 16,\n xMargin = 0,\n yMargin = 0,\n width: widthType = \"auto\",\n preventOverlap = false,\n transformOrigin = false,\n disableSwapping = false,\n disableVHBounds = false,\n } = options;\n let { initialY } = options;\n const container = findSizingContainer(options.container);\n\n if (process.env.NODE_ENV !== \"production\") {\n if (preventOverlap && anchor.y !== \"above\" && anchor.y !== \"below\") {\n throw new Error(\n 'Unable to prevent overlap when the vertical anchor is not `\"above\"` or `\"below\"`'\n );\n }\n }\n\n if (!element) {\n return {\n actualX: anchor.x,\n actualY: anchor.y,\n style: {\n left: initialX,\n top: initialY,\n position: disableVHBounds ? \"absolute\" : \"fixed\",\n transformOrigin: transformOrigin\n ? getTransformOrigin({ x: anchor.x, y: anchor.y })\n : undefined,\n },\n };\n }\n\n const containerRect = container?.getBoundingClientRect() ?? FALLBACK_DOM_RECT;\n const vh = window.innerHeight;\n const vw = window.innerWidth;\n\n const { minWidth: elMinWidth } = element.style;\n // Note: This makes it \"min-content\" or \"min-container-width\"\n if (widthType === \"min\") {\n element.style.overflow = \"visible\";\n element.style.minWidth = \"\";\n }\n const elementRect = getElementRect(element);\n const { height } = elementRect;\n let elWidth = elementRect.width;\n if (widthType === \"min\") {\n elWidth += getScrollbarWidth();\n element.style.overflow = \"\";\n element.style.minWidth = elMinWidth;\n }\n if (disableVHBounds) {\n const dialog = element.closest(\"[role='dialog']\");\n if (!dialog) {\n initialY = (initialY ?? 0) + window.scrollY;\n }\n }\n\n const { left, right, width, minWidth, actualX } = createHorizontalPosition({\n x: anchor.x,\n vw,\n vwMargin,\n xMargin,\n width: widthType,\n elWidth,\n initialX,\n containerRect,\n disableSwapping,\n });\n const { top, bottom, actualY, transformOriginY } = createVerticalPosition({\n y: anchor.y,\n vh,\n vhMargin,\n yMargin,\n initialY,\n elHeight: height,\n containerRect,\n disableSwapping,\n preventOverlap,\n disableVHBounds,\n });\n\n return {\n actualX,\n actualY,\n style: {\n left,\n top,\n right,\n bottom,\n width,\n minWidth,\n position: disableVHBounds ? \"absolute\" : \"fixed\",\n transformOrigin: transformOrigin\n ? getTransformOrigin({\n x: actualX,\n y: actualY,\n transformOriginY,\n })\n : undefined,\n },\n };\n}\n"],"names":["getScrollbarWidth","BELOW_CENTER_ANCHOR","createHorizontalPosition","createVerticalPosition","findSizingContainer","getElementRect","getTransformOrigin","FALLBACK_DOM_RECT","x","y","height","width","left","right","top","bottom","toJSON","getFixedPosition","options","element","anchor","initialX","vwMargin","vhMargin","xMargin","yMargin","widthType","preventOverlap","transformOrigin","disableSwapping","disableVHBounds","initialY","container","process","env","NODE_ENV","Error","actualX","actualY","style","position","undefined","containerRect","getBoundingClientRect","vh","window","innerHeight","vw","innerWidth","minWidth","elMinWidth","overflow","elementRect","elWidth","dialog","closest","scrollY","transformOriginY","elHeight"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,iCAAiC;AACnE,SAASC,mBAAmB,QAAQ,iBAAiB;AACrD,SAASC,wBAAwB,QAAQ,g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1 +0,0 @@
1
- {"version":3,"sources":["../../../src/positioning/types.ts"],"sourcesContent":["/**\n * Above:\n * - the container top is in-line with the bottom of the element.\n *\n * Below:\n * - the container bottom is in-line with the top of the element\n *\n * Center:\n * - the container center is in-line with the top of the element\n *\n * Top:\n * - the container top is in-line with the top of the element\n *\n * Bottom:\n * - the container bottom is in-line with the bottom of the element\n */\nexport type VerticalPosition = \"above\" | \"below\" | \"center\" | \"top\" | \"bottom\";\n\n/**\n * Left:\n * - the container left is in-line with the right of the element\n *\n * Right:\n * - the container right is in-line with the left of the element\n *\n * Center:\n * - the container's horizontal center point will be aligned with the element's\n * horizontal center point\n *\n * Inner Left:\n * - the container's left is in-line with the left of the element\n *\n * Inner Right:\n * - the container's right is in-line with the right of the element\n */\nexport type HorizontalPosition =\n | \"left\"\n | \"right\"\n | \"center\"\n | \"inner-left\"\n | \"inner-right\";\n\n/**\n * An object containing the x and y positions to anchor a fixed element to\n * another container element.\n */\nexport interface PositionAnchor {\n x: HorizontalPosition;\n y: VerticalPosition;\n}\n\n/**\n * A \"simple\" version of all the positioning options. These are generally used\n * across all of react-md as it'll use the \"center\" version of the opposite type\n * when creating a fixed position.\n */\nexport type SimplePosition = \"above\" | \"below\" | \"left\" | \"right\";\n\n/**\n * An optional configuration for calculating and setting the width of the\n * element relative to the width of the container. When this value is set to\n * `\"auto\"` (default), the width will be based on content width but still\n * ensuring it can fit within the viewport. Setting this to `\"equal\"` will just\n * apply the container's width to the fixed element. Finally, setting this to\n * `\"min\"` will set the container's width as the `minWidth` for the fixed\n * element so that it is at least the same width as the container.\n *\n * If this is set to `\"equal\"` or `\"min\"` and the horizontal anchor is not set\n * to `\"center\"`, an error will be thrown.\n *\n * @defaultValue `\"auto\"`\n */\nexport type PositionWidth = \"auto\" | \"equal\" | \"min\";\n\nexport interface InitialCoords {\n /**\n * The initial x value to use when calculating the position instead of\n * finding the container element to determine the the correct position. All\n * the other positioning logic will still be in effect to ensure the element\n * will be visible within the viewport.\n */\n initialX?: number;\n\n /**\n * The initial y value to use when calculating the position instead of\n * finding the container element to determine the the correct position. All\n * the other positioning logic will still be in effect to ensure the element\n * will be visible within the viewport.\n */\n initialY?: number;\n}\n\n/** @remarks \\@since 4.0.0 */\nexport interface CalculateFixedPositionOptions extends InitialCoords {\n /**\n * The configuration to anchor the fixed element to the container element.\n *\n * @defaultValue `BELOW_CENTER_ANCHOR`\n */\n anchor?: PositionAnchor;\n\n /**\n * The viewwidth margin to apply so that the element doesn't need to be\n * directly on the screen edge.\n *\n * @defaultValue `16`\n */\n vwMargin?: number;\n\n /**\n * The viewwidth margin to apply so that the element doesn't need to be\n * directly on the screen edge.\n *\n * @defaultValue `16`\n */\n vhMargin?: number;\n\n /**\n * The container width margin to apply so that the element doesn't need to be\n * directly on the container's edge.\n *\n * @defaultValue `0`\n */\n xMargin?: number;\n\n /**\n * The container height margin to apply so that the element doesn't need to be\n * directly on the container's edge\n *\n * @defaultValue `0`\n */\n yMargin?: number;\n\n /** {@inheritDoc PositionWidth} */\n width?: PositionWidth;\n\n /**\n * Boolean if the style object should include the `transformOrigin` value\n * based on the x and y positions.\n *\n * @defaultValue `false`\n */\n transformOrigin?: boolean;\n\n /**\n * Boolean if the fixed element should no longer be able to overlap the\n * container element. This is useful for autocomplete menus or other\n * components that retain focus on the container element while the fixed\n * element becomes visible.\n *\n * @defaultValue `false`\n */\n preventOverlap?: boolean;\n\n /**\n * Boolean if the auto-swapping behavior should be disabled. It's normally\n * recommended to not disable this since it'll allow elements to appear off\n * screen.\n *\n * @defaultValue `false`\n * @remarks \\@since 5.0.0 This will always be `true` if the\n * {@link FixedPositionOptions.container} is `null`.\n * \\@remarks \\@since 6.0.0 Allow this to be `false` while the `container` is\n * null. I can't figure out why I prevented that.\n */\n disableSwapping?: boolean;\n\n /**\n * Boolean if the fixed positioning should no longer prevent the fixed element\n * to be positioned within the viewport. This is nice if you want to allow for\n * full page scrolling instead and manually set a max-height on your element.\n *\n * @defaultValue `false`\n */\n disableVHBounds?: boolean;\n}\n\nexport interface FixedPositionOptions extends CalculateFixedPositionOptions {\n /**\n * The container element that the `element` should be fixed to.\n */\n container: HTMLElement | null;\n\n /**\n * The element that is fixed to a `container` element.\n */\n element: HTMLElement | null;\n}\n\n/**\n * This is more of a private interface that is used to help show how fixed\n * elements are placed within the viewport. Most of the time the `top` and\n * `left` values will be provided, but there are a few flows where the `right`\n * and `bottom` could be added or the `top` and `left` are removed.\n *\n * The `width` values will only be used when the `equalWidth` or `minEqualWidth`\n * options are enabled.\n *\n * @internal\n */\nexport interface Coords {\n top?: number;\n right?: number;\n bottom?: number;\n left?: number;\n width?: number;\n minWidth?: number;\n}\n\n/**\n * The style object that should be applied to the fixed element so it will be\n * fixed to the container element. This will be `undefined` if the container\n * element doesn't exist within the DOM.\n *\n * Note: The fixed element styles **will not** contain styles for `z-index` or\n * `background-color` so you'll need to add that manually.\n *\n * @remarks \\@since 4.0.0\n */\nexport interface FixedPositionStyle extends Coords {\n /**\n * This will be `\"fixed\"` unless\n * {@link CalculateFixedPositionOptions.disableVHBounds} is set to `true`.\n */\n position: \"fixed\" | \"absolute\";\n\n /**\n * This will be `undefined` unless\n * {@link CalculateFixedPositionOptions.transformOrigin} is set to `true`\n */\n transformOrigin?: string;\n}\n\n/**\n * Since the position can be \"swapped\" to help fit the fixed element within the\n * viewport, this interface is used to contain the calculated positions as well\n * as an optional style object to apply.\n */\nexport interface FixedPosition {\n /**\n * The calculated horizontal position that can be used to compare to the\n * provided horizontal position anchor if additional manual updates should be\n * applied.\n */\n actualX: HorizontalPosition;\n\n /**\n * The calculated vertical position that can be used to compare to the\n * provided horizontal position anchor if additional manual updates should be\n * applied.\n */\n actualY: VerticalPosition;\n /** {@inheritDoc FixedPositionStyle} */\n style?: FixedPositionStyle;\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GA0ND;;;;CAIC,GACD,WAgBC"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/positioning/useFixedPositioning.ts"],"sourcesContent":["\"use client\";\nimport type { CSSProperties, Ref, RefCallback, RefObject } from \"react\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { delegateEvent } from \"../delegateEvent.js\";\nimport type { TransitionCallbacks } from \"../transition/types.js\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport { useIsomorphicLayoutEffect } from \"../useIsomorphicLayoutEffect.js\";\nimport { BELOW_CENTER_ANCHOR } from \"./constants.js\";\nimport { getFixedPosition } from \"./getFixedPosition.js\";\nimport type { CalculateFixedPositionOptions } from \"./types.js\";\nimport { isWithinViewport } from \"./utils.js\";\n\nconst noop = (): undefined => undefined;\n\n/**\n * @remarks \\@since 4.0.0\n */\nexport type FixedPositioningTransitionCallbacks = Pick<\n TransitionCallbacks,\n \"onEnter\" | \"onEntering\" | \"onEntered\" | \"onExited\"\n>;\n\n/**\n * This options should be passed to the {@link useCSSTransition} for the styling\n * and positioning to work correctly.\n *\n * @typeParam E - An HTMLElement type used for the ref required for the\n * transition.\n * @remarks \\@since 4.0.0\n */\nexport interface FixedPositioningTransitionOptions<E extends HTMLElement>\n extends FixedPositioningTransitionCallbacks {\n /** {@inheritDoc TransitionOptions.nodeRef} */\n nodeRef?: Ref<E>;\n}\n\n/**\n * @typeParam FixedToElement - An HTMLElement type for the static element.\n * @typeParam FixedElement - An HTMLElement type for the fixed element.\n * @remarks \\@since 4.0.0\n */\nexport interface FixedPositioningScrollData<\n FixedToElement extends HTMLElement,\n FixedElement extends HTMLElement,\n> {\n fixedElement: FixedElement;\n fixedToElement: FixedToElement;\n\n /**\n * Boolean if the {@link fixedToElement} is visible within the viewport.\n */\n visible: boolean;\n}\n\n/**\n * This function is called when the page is scrolled while the fixed element is\n * visible. This is generally used to reposition the fixed element or hide it if\n * it is no longer visible within the viewport.\n *\n * @typeParam FixedToElement - An HTMLElement type for the static element.\n * @typeParam FixedElement - An HTMLElement type for the fixed element.\n * @param event - The scroll event\n * @param data - The {@link FixedPositioningScrollData} that can be used for\n * custom scroll behavior.\n * @remarks \\@since 4.0.0\n */\nexport type TransitionScrollCallback<\n FixedToElement extends HTMLElement,\n FixedElement extends HTMLElement,\n> = (\n event: Event,\n data: Readonly<FixedPositioningScrollData<FixedToElement, FixedElement>>\n) => void;\n\n/**\n * @typeParam FixedToElement - An HTMLElement type for the static element.\n * @typeParam FixedElement - An HTMLElement type for the fixed element.\n * @remarks \\@since 4.0.0\n */\nexport interface FixedPositioningOptions<\n FixedToElement extends HTMLElement,\n FixedElement extends HTMLElement,\n> extends FixedPositioningTransitionOptions<FixedElement>,\n CalculateFixedPositionOptions {\n /**\n * An optional style that will be merged with the fixed positioning required\n * styles.\n *\n * @see {@link FixedPositionStyle}\n */\n style?: CSSProperties;\n\n /**\n * A ref pointing to an element that another element should be fixed to. This\n * **must** be provided for the positioning to work.\n */\n fixedTo: RefObject<FixedToElement>;\n\n /**\n * An optional function that can be used to override positioning options if\n * some options require the element to be in the DOM for specific\n * calculations.\n */\n getFixedPositionOptions?(): CalculateFixedPositionOptions;\n\n /**\n * An optional function to call if the page resizes while the `FixedElement`\n * is visible.\n */\n onResize?: EventListener;\n /** @see {@link TransitionScrollCallback} */\n onScroll?: TransitionScrollCallback<FixedToElement, FixedElement>;\n}\n\n/**\n * @typeParam E - An HTMLElement type for the fixed element.\n * @remarks \\@since 4.0.0\n */\nexport interface FixedPositioningHookReturnValue<E extends HTMLElement> {\n /**\n * A ref that should be passed to a component for the fixed positioning\n * behavior to work correctly.\n *\n * This should really only be used if the {@link TransitionOptions} is not\n * being used.\n */\n ref: RefCallback<E>;\n\n /**\n * @see {@link FixedPositionStyle}\n */\n style: CSSProperties;\n\n /**\n * This should really only be used if the {@link transitionOptions} is not\n * being used.\n */\n callbacks: Readonly<Required<FixedPositioningTransitionCallbacks>>;\n\n /**\n * A function that can be called to update the style for the fixed element.\n */\n updateStyle(): void;\n\n /** {@inheritDoc FixedPositioningTransitionOptions} */\n transitionOptions: Readonly<Required<FixedPositioningTransitionOptions<E>>>;\n}\n\n/**\n * This hook is used to attach a temporary (fixed) element to another element\n * within the page. In other words, this is a way to have an element with\n * `position: fixed` as if it were `position: absolute` to a parent element that\n * had `position: relative`.\n *\n * @example\n * Simple Example\n * ```tsx\n * import { ReactElement, useRef, useState } from \"react\";\n * import { Button, useCSSTransition, useFixedPositioning } from \"@react-md/core\";\n *\n * function Example(): ReactElement {\n * const fixedTo = useRef<HTMLButtonElement>(null);\n * const [transitionIn, setTransitionIn] = useState(false);\n * const { style, transitionOptions } = useFixedPositioning({\n * fixedTo,\n * });\n * const { elementProps, rendered } = useCSSTransition({\n * ...transitionOptions,\n * transitionIn,\n * temporary: true,\n * timeout: {\n * enter: 200,\n * exit: 150,\n * },\n * classNames: {\n * enter: \"enter\",\n * enterActive: \"enter--active\",\n * exit: \"exit\",\n * exitActive: \"exit--active\",\n * },\n * });\n *\n * return (\n * <>\n * <Button\n * ref={fixedTo}\n * onClick={() => setTransitionIn(!transitionIn)}\n * >\n * Toggle\n * </Button>\n * {rendered && (\n * <div {...elementProps} style={style}>\n * Fixed Temporary Element\n * </div>\n * )}\n * </>\n * );\n * }\n * ```\n *\n * @typeParam FixedToElement - An HTMLElement type for the static element.\n * @typeParam FixedElement - An HTMLElement type for the fixed element.\n * @remarks \\@since 4.0.0\n */\nexport function useFixedPositioning<\n FixedToElement extends HTMLElement,\n FixedElement extends HTMLElement,\n>(\n options: FixedPositioningOptions<FixedToElement, FixedElement>\n): FixedPositioningHookReturnValue<FixedElement> {\n const {\n style: propStyle,\n nodeRef,\n fixedTo,\n onEnter = noop,\n onEntering = noop,\n onEntered = noop,\n onExited = noop,\n anchor = BELOW_CENTER_ANCHOR,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n getFixedPositionOptions = noop,\n onScroll,\n onResize = noop,\n } = options;\n\n const [active, setActive] = useState(false);\n const [ref, refHandler] = useEnsuredRef(nodeRef);\n const optionsRef = useRef({\n ref,\n fixedTo,\n anchor,\n disableSwapping,\n disableVHBounds,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n getFixedPositionOptions,\n } as const);\n useIsomorphicLayoutEffect(() => {\n optionsRef.current = {\n ref,\n fixedTo,\n anchor,\n disableSwapping,\n disableVHBounds,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n getFixedPositionOptions,\n };\n }, [\n ref,\n fixedTo,\n anchor,\n disableSwapping,\n disableVHBounds,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n getFixedPositionOptions,\n ]);\n const [style, setStyle] = useState<CSSProperties | undefined>(\n () =>\n getFixedPosition({\n container: ref.current,\n element: fixedTo.current,\n anchor,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n ...getFixedPositionOptions(),\n }).style\n );\n\n const updateStyle = useCallback(() => {\n const {\n ref,\n fixedTo,\n anchor,\n disableSwapping,\n disableVHBounds,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n getFixedPositionOptions,\n } = optionsRef.current;\n const element = ref.current;\n const container = fixedTo.current;\n const { style } = getFixedPosition({\n container,\n element,\n anchor,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n preventOverlap,\n transformOrigin,\n vhMargin,\n vwMargin,\n width,\n xMargin,\n yMargin,\n ...getFixedPositionOptions(),\n });\n\n setStyle(style);\n setActive(!!element && !element.hidden);\n\n // Only changing the initialX and initialY should cause the useEffect below\n // to trigger, which is why everything else is set in a ref.\n }, [initialX, initialY]);\n\n useEffect(() => {\n if (!active) {\n return;\n }\n\n const resizeCallback = (event: Event): void => {\n onResize(event);\n updateStyle();\n };\n const scrollCallback = (event: Event): void => {\n const fixedElement = ref.current;\n const fixedToElement = fixedTo.current;\n if (onScroll && fixedElement && fixedToElement) {\n onScroll(event, {\n visible: isWithinViewport({ fixedElement, fixedToElement }),\n fixedElement,\n fixedToElement,\n });\n }\n\n updateStyle();\n };\n\n const resizeHandler = delegateEvent(\"resize\", window, true);\n const scrollHandler = delegateEvent(\"scroll\", window, true, {\n passive: true,\n });\n resizeHandler.add(resizeCallback);\n scrollHandler.add(scrollCallback);\n return () => {\n resizeHandler.remove(resizeCallback);\n scrollHandler.remove(scrollCallback);\n };\n }, [active, fixedTo, onResize, onScroll, ref, updateStyle]);\n\n useEffect(() => {\n if (!ref.current || !ref.current.hidden) {\n updateStyle();\n }\n }, [ref, updateStyle]);\n\n const callbacks: Required<FixedPositioningTransitionCallbacks> = {\n onEnter(appearing) {\n onEnter(appearing);\n updateStyle();\n },\n onEntering(appearing) {\n onEntering(appearing);\n updateStyle();\n },\n onEntered(appearing) {\n onEntered(appearing);\n updateStyle();\n },\n onExited() {\n onExited();\n setActive(false);\n },\n };\n\n return {\n ref: refHandler,\n style: { ...style, ...propStyle },\n callbacks,\n updateStyle,\n transitionOptions: {\n ...callbacks,\n nodeRef: refHandler,\n },\n };\n}\n"],"names":["useCallback","useEffect","useRef","useState","delegateEvent","useEnsuredRef","useIsomorphicLayoutEffect","BELOW_CENTER_ANCHOR","getFixedPosition","isWithinViewport","noop","undefined","useFixedPositioning","options","style","propStyle","nodeRef","fixedTo","onEnter","onEntering","onEntered","onExited","anchor","disableSwapping","disableVHBounds","initialX","initialY","preventOverlap","transformOrigin","vhMargin","vwMargin","width","xMargin","yMargin","getFixedPositionOptions","onScroll","onResize","active","setActive","ref","refHandler","optionsRef","current","setStyle","container","element","updateStyle","hidden","resizeCallback","event","scrollCallback","fixedElement","fixedToElement","visible","resizeHandler","window","scrollHandler","passive","add","remove","callbacks","appearing","transitionOptions"],"mappings":"AAAA;AAEA,SAASA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;A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ACAH,cAAcI,GAAG,CAACV;QAClBQ,cAAcE,GAAG,CAACR;QAClB,OAAO;YACLI,cAAcK,MAAM,CAACX;YACrBQ,cAAcG,MAAM,CAACT;QACvB;IACF,GAAG;QAACb;QAAQpB;QAASmB;QAAUD;QAAUI;QAAKO;KAAY;IAE1D7C,UAAU;QACR,IAAI,CAACsC,IAAIG,OAAO,IAAI,CAACH,IAAIG,OAAO,CAACK,MAAM,EAAE;YACvCD;QACF;IACF,GAAG;QAACP;QAAKO;KAAY;IAErB,MAAMc,YAA2D;QAC/D1C,SAAQ2C,SAAS;YACf3C,QAAQ2C;YACRf;QACF;QACA3B,YAAW0C,SAAS;YAClB1C,WAAW0C;YACXf;QACF;QACA1B,WAAUyC,SAAS;YACjBzC,UAAUyC;YACVf;QACF;QACAzB;YACEA;YACAiB,UAAU;QACZ;IACF;IAEA,OAAO;QACLC,KAAKC;QACL1B,OAAO;YAAE,GAAGA,KAAK;YAAE,GAAGC,SAAS;QAAC;QAChC6C;QACAd;QACAgB,mBAAmB;YACjB,GAAGF,SAAS;YACZ5C,SAASwB;QACX;IACF;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/positioning/utils.ts"],"sourcesContent":["import type { PositionAnchor } from \"./types.js\";\n\n/** @internal */\nexport interface XCoordConfig {\n xMargin: number;\n elWidth: number;\n initialX?: number;\n containerRect: DOMRect;\n}\n\n/** @internal */\nexport interface YCoordConfig {\n yMargin: number;\n elHeight: number;\n initialY?: number;\n containerRect: DOMRect;\n}\n\ntype Left = number;\ntype Top = number;\n\n/**\n * Creates the `left` style value for an element that should be fixed to the\n * (outer) left of the container element. So the right bounds of the fixed\n * element will be equal to the left bounds of the container element (before the\n * xMargin is applied).\n *\n * @internal\n */\nexport function getLeftCoord({\n xMargin,\n elWidth,\n initialX,\n containerRect,\n}: XCoordConfig): Left {\n return (initialX ?? containerRect.left) - elWidth - xMargin;\n}\n\n/**\n * Creates the `left` style value for an element that should be fixed to the\n * inner-left of the container element. So the left bounds of both the container\n * and fixed elements will overlap (before the xMargin is applied)\n *\n * @internal\n */\nexport function getInnerLeftCoord({\n xMargin,\n initialX,\n containerRect,\n}: XCoordConfig): Left {\n return (initialX ?? containerRect.left) + xMargin;\n}\n\n/**\n * Creates the `left` style value for an element that should be fixed to the\n * center of the container element. So the center point of the fixed element\n * should be the center point of the container element.\n *\n * Note: Unlike all the other horizontal positioning logic, the center position\n * does not use the xMargin.\n *\n * @internal\n */\nexport function getCenterXCoord({\n elWidth,\n initialX,\n containerRect,\n}: XCoordConfig): Left {\n const containerCenter = containerRect.width / 2;\n const elementCenter = elWidth / 2;\n return (initialX ?? containerRect.left + containerCenter) - elementCenter;\n}\n\n/**\n * Creates the `left` style value for an element that should be fixed to the\n * inner-right of the container element. So the right bounds for both the\n * container and fixed elements will overlap (before the xMargin is applied).\n *\n * @internal\n */\nexport function getInnerRightCoord({\n xMargin,\n elWidth,\n initialX,\n containerRect,\n}: XCoordConfig): Left {\n return (\n (initialX ?? containerRect.left + containerRect.width) - elWidth - xMargin\n );\n}\n\n/**\n * Creates the `left` style value for an element that should be fixed to the\n * (outer) right of the container element. So the left bounds of the fixed\n * element will overlap with the right bounds of the container element (before\n * the xMargin is applied).\n *\n * @internal\n */\nexport function getRightCoord({\n xMargin,\n initialX,\n containerRect,\n}: XCoordConfig): Left {\n return (initialX ?? containerRect.left + containerRect.width) + xMargin;\n}\n\n/**\n * Creates the `top` style value for an element that should be fixed above the\n * container element. So the bottom bounds of the fixed element will overlap\n * with the top bounds of the container element (before the yMargin is applied).\n *\n * @internal\n */\nexport function getAboveCoord({\n yMargin,\n initialY,\n elHeight,\n containerRect,\n}: YCoordConfig): Top {\n return (initialY ?? containerRect.top) - elHeight - yMargin;\n}\n\n/**\n * Creates the `top` style value for an element that should be fixed to the top\n * of the container element. So the top bounds for both the container and fixed\n * elements will overlap (before the yMargin is applied).\n *\n * @internal\n */\nexport function getTopCoord({\n yMargin,\n initialY,\n containerRect,\n}: YCoordConfig): Top {\n return (initialY ?? containerRect.top) + yMargin;\n}\n\n/**\n * Creates the `top` style value for an element that should be fixed vertically\n * centered relative to the container element. So the vertical center point for\n * the fixed element should overlap the vertical center point of the container\n * element.\n *\n * Note: Unlike all the other vertical positioning logic, the center position\n * does not use the yMargin.\n *\n * @internal\n */\nexport function getCenterYCoord({\n yMargin,\n elHeight,\n initialY,\n containerRect,\n}: YCoordConfig): Top {\n const containerCenter = containerRect.height / 2;\n const elementCenter = elHeight / 2;\n return (\n (initialY ?? containerRect.top + containerCenter + yMargin) - elementCenter\n );\n}\n\n/**\n * Creates the `top` style value for an element that should be fixed to the\n * bottom of the container element. So the top bounds of the fixed element\n * should overlap the bottom bounds of the container element (before the yMargin\n * is applied).\n *\n * @internal\n */\nexport function getBottomCoord({\n yMargin,\n initialY,\n elHeight,\n containerRect,\n}: YCoordConfig): Top {\n return (\n (initialY ?? containerRect.top + containerRect.height) - elHeight - yMargin\n );\n}\n\n/**\n * Creates the `top` style value for an element that should be fixed to the\n * bottom of the container element. So the bottom bounds of both the container\n * and fixed elements should overlap (before the yMargin is applied).\n *\n * @internal\n */\nexport function getBelowCoord({\n yMargin,\n initialY,\n containerRect,\n}: YCoordConfig): Top {\n return (initialY ?? containerRect.top + containerRect.height) + yMargin;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\nexport interface TransformOriginOptions extends PositionAnchor {\n transformOriginY?: number;\n}\n\n/**\n * This is a simple util that'll generate a css `transform-origin` string so\n * that the fixed element can animate from the correct point based on the\n * provided anchor.\n *\n * @param options - The anchor that should be used to create the transform origin\n * for.\n * @returns the transform origin string\n * @internal\n */\nexport function getTransformOrigin(options: TransformOriginOptions): string {\n const { transformOriginY: yPosition } = options;\n\n let x = \"0\";\n switch (options.x) {\n case \"right\":\n case \"inner-left\":\n x = \"0\";\n break;\n case \"center\":\n x = \"50%\";\n break;\n case \"left\":\n case \"inner-right\":\n x = \"100%\";\n break;\n default:\n x = \"0\";\n }\n\n let y = \"0\";\n if (typeof yPosition === \"number\") {\n y = `${yPosition}px`;\n } else {\n switch (options.y) {\n case \"above\":\n case \"bottom\":\n y = \"100%\";\n break;\n case \"center\":\n y = \"50%\";\n break;\n case \"below\":\n case \"top\":\n y = \"0\";\n break;\n default:\n y = \"0\";\n }\n }\n\n return `${x} ${y}`;\n}\n\n/**\n * Attempts to find a sizing container based on the provided HTMLElement. By\n * default, the sizing element will just be the provided element unless:\n * - the item has a known role within react-md that can target known classes\n * - the item has a `data-sizing-selector` attribute that is a valid query\n * selector for the nested item.\n *\n * NOTE: The `data-sizing-selector` will be run from the current element instead\n * of the `document`.\n *\n * @param el - The element to find a sizing container for.\n * @returns the sizing container relative to the provided element, or `null` if\n * none could be found.\n * @throws This error will be thrown if using the `data-query-selector` and the\n * query selector does not return an element on the page.\n * @internal\n */\nexport function findSizingContainer(\n el: HTMLElement | null\n): HTMLElement | null {\n if (!el) {\n return null;\n }\n\n if (/(tree|list)item/.test(el.getAttribute(\"role\") || \"\")) {\n const content = el.querySelector(\n \".rmd-tree-item__content, .rmd-item-text\"\n ) as HTMLElement;\n if (content) {\n return content;\n }\n } else if (el.getAttribute(\"type\") === \"file\") {\n const label = document.querySelector<HTMLLabelElement>(`[for=\"${el.id}\"]`);\n if (label) {\n return label;\n }\n }\n\n const data = el.getAttribute(\"data-sizing-selector\");\n if (data) {\n const content = el.querySelector(data) as HTMLElement;\n if (content) {\n return content;\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n throw new Error(\n \"Unable to find a child element using the `data-sizing-selector`\"\n );\n }\n }\n\n return el;\n}\n\n/**\n * This util is used to get the \"true\" `element.getBoundingClientRect()` that\n * ensures that transitions using transforms don't mess up the sizing so that\n * position calculations are easier to do.\n *\n * @param element - The element to get a rect for.\n * @returns either a DOMRect for the element\n * @internal\n */\nexport function getElementRect(element: HTMLElement): DOMRect {\n const cloned = element.cloneNode(true) as HTMLElement;\n // remove the id so there won't be two elements with the same id on the page\n cloned.removeAttribute(\"id\");\n\n // remove the role just in case the role would alert screen readers once added\n // to the dom\n cloned.removeAttribute(\"role\");\n\n // ensure the cloned node won't shift the page or be visible\n cloned.style.position = \"fixed\";\n cloned.style.visibility = \"hidden\";\n\n // reset positioning to get a \"pure\" calculation. otherwise this will mess up\n // the height and width if the element is able to line wrap.\n cloned.style.left = \"\";\n cloned.style.top = \"\";\n cloned.style.right = \"\";\n cloned.style.bottom = \"\";\n\n // reset transforms so that custom animations don't mess with the sizing\n cloned.style.transform = \"none\";\n\n const parent = element.parentElement || document.body;\n parent.appendChild(cloned);\n\n const rect = cloned.getBoundingClientRect();\n parent.removeChild(cloned);\n\n return rect;\n}\n\n/**\n * @remarks \\@since 4.0.0\n * @internal\n */\ninterface IsWithinViewportOptions {\n fixedElement: HTMLElement;\n fixedToElement: HTMLElement;\n}\n\n/**\n * @remarks \\@since 4.0.0\n * @internal\n */\nexport function isWithinViewport(options: IsWithinViewportOptions): boolean {\n const { fixedElement, fixedToElement } = options;\n const fixedElementRect = fixedElement.getBoundingClientRect();\n const fixedToElementRect = fixedToElement.getBoundingClientRect();\n const vh = window.innerHeight;\n const vw = window.innerWidth;\n const top = Math.min(fixedElementRect.top, fixedToElementRect.top);\n const right = Math.max(fixedElementRect.right, fixedToElementRect.right);\n const bottom = Math.max(fixedElementRect.bottom, fixedToElementRect.bottom);\n const left = Math.min(fixedElementRect.left, fixedToElementRect.left);\n\n return bottom >= 0 && top <= vh && right >= 0 && left <= vw;\n}\n"],"names":["getLeftCoord","xMargin","elWidth","initialX","containerRect","left","getInnerLeftCoord","getCenterXCoord","containerCenter","width","elementCenter","getInnerRightCoord","getRightCoord","getAboveCoord","yMargin","initialY","elHeight","top","getTopCoord","getCenterYCoord","height","getBottomCoord","getBelowCoord","getTransformOrigin","options","transformOriginY","yPosition","x","y","findSizingContainer","el","test","getAttribute","content","querySelector","label","document","id","data","process","env","NODE_ENV","Error","getElementRect","element","cloned","cloneNode","removeAttribute","style","position","visibility","right","bottom","transform","parent","parentElement","body","appendChild","rect","getBoundingClientRect","removeChild","isWithinViewport","fixedElement","fixedToElement","fixedElementRect","fixedToElementRect","vh","window","innerHeight","vw","innerWidth","Math","min","max"],"mappings":"AAqBA;;;;;;;CAOC,GACD,OAAO,SAASA,aAAa,EAC3BC,OAAO,EACPC,OAAO,EACPC,QAAQ,EACRC,aAAa,EACA;IACb,OAAO,AAACD,CAAAA,YAAYC,cAAcC,IAAI,AAAD,IAAKH,UAAUD;AACtD;AAEA;;;;;;CAMC,GACD,OAAO,SAASK,kBAAkB,EAChCL,OAAO,EACPE,QAAQ,EACRC,aAAa,EACA;IACb,OAAO,AAACD,CAAAA,YAAYC,cAAcC,IAAI,AAAD,IAAKJ;AAC5C;AAEA;;;;;;;;;CASC,GACD,OAAO,SAASM,gBAAgB,EAC9BL,OAAO,EACPC,QAAQ,EACRC,aAAa,EACA;IACb,MAAMI,kBAAkBJ,cAAcK,KAAK,GAAG;IAC9C,MAAMC,gBAAgBR,UAAU;IAChC,OAAO,AAACC,CAAAA,YAAYC,cAAcC,IAAI,GAAGG,eAAc,IAAKE;AAC9D;AAEA;;;;;;CAMC,GACD,OAAO,SAASC,mBAAmB,EACjCV,OAAO,EACPC,OAAO,EACPC,QAAQ,EACRC,aAAa,EACA;IACb,OACE,AAACD,CAAAA,YAAYC,cAAcC,IAAI,GAAGD,cAAcK,KAAK,AAAD,IAAKP,UAAUD;AAEvE;AAEA;;;;;;;CAOC,GACD,OAAO,SAASW,cAAc,EAC5BX,OAAO,EACPE,QAAQ,EACRC,aAAa,EACA;IACb,OAAO,AAACD,CAAAA,YAAYC,cAAcC,IAAI,GAAGD,cAAcK,KAAK,AAAD,IAAKR;AAClE;AAEA;;;;;;CAMC,GACD,OAAO,SAASY,cAAc,EAC5BC,OAAO,EACPC,QAAQ,EACRC,QAAQ,EACRZ,aAAa,EACA;IACb,OAAO,AAACW,CAAAA,YAAYX,cAAca,GAAG,AAAD,IAAKD,WAAWF;AACtD;AAEA;;;;;;CAMC,GACD,OAAO,SAASI,YAAY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OG,KAAK,CAACI,MAAM,GAAG;IAEtB,wEAAwE;IACxEP,OAAOG,KAAK,CAACK,SAAS,GAAG;IAEzB,MAAMC,SAASV,QAAQW,aAAa,IAAInB,SAASoB,IAAI;IACrDF,OAAOG,WAAW,CAACZ;IAEnB,MAAMa,OAAOb,OAAOc,qBAAqB;IACzCL,OAAOM,WAAW,CAACf;IAEnB,OAAOa;AACT;AAWA;;;CAGC,GACD,OAAO,SAASG,iBAAiBrC,OAAgC;IAC/D,MAAM,EAAEsC,YAAY,EAAEC,cAAc,EAAE,GAAGvC;IACzC,MAAMwC,mBAAmBF,aAAaH,qBAAqB;IAC3D,MAAMM,qBAAqBF,eAAeJ,qBAAqB;IAC/D,MAAMO,KAAKC,OAAOC,WAAW;IAC7B,MAAMC,KAAKF,OAAOG,UAAU;IAC5B,MAAMrD,MAAMsD,KAAKC,GAAG,CAACR,iBAAiB/C,GAAG,EAAEgD,mBAAmBhD,GAAG;IACjE,MAAMkC,QAAQoB,KAAKE,GAAG,CAACT,iBAAiBb,KAAK,EAAEc,mBAAmBd,KAAK;IACvE,MAAMC,SAASmB,KAAKE,GAAG,CAACT,iBAAiBZ,MAAM,EAAEa,mBAAmBb,MAAM;IAC1E,MAAM/C,OAAOkE,KAAKC,GAAG,CAACR,iBAAiB3D,IAAI,EAAE4D,mBAAmB5D,IAAI;IAEpE,OAAO+C,UAAU,KAAKnC,OAAOiD,MAAMf,SAAS,KAAK9C,QAAQgE;AAC3D"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/progress/CircularProgress.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n useMemo,\n type CSSProperties,\n type HTMLAttributes,\n} from \"react\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { getPercentage } from \"../utils/getPercentage.js\";\nimport { type ProgressProps } from \"./types.js\";\n\n/**\n * @remarks \\@since 6.0.0\n * Removed the `determinateRotateDegrees` prop since the determinate state no\n * longer rotates while increasing value.\n * Added the `disableShrink` prop.\n * Renamed the `small` prop to `dense` to match other components.\n */\nexport interface CircularProgressProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, \"id\">,\n ProgressProps {\n /**\n * An optional style to apply to the svg within the circular progress. The\n * values of this style object will be merged with the current determinate\n * style (if it exists).\n */\n svgStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the svg within the circular progress.\n */\n svgClassName?: string;\n\n /**\n * An optional style to apply to the circle within the circular progress. The\n * values of this style object will be merged with the current determinate\n * style (if it exists).\n */\n circleStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the circle within the circular progress.\n */\n circleClassName?: string;\n\n /**\n * The radius for the circle. It is generally recommended to have the radius\n * be 1/2 of the viewbox and minus a few more pixels so that there is some\n * surrounding padding. You probably shouldn't really be changing this prop\n * though.\n *\n * @defaultValue `30`\n */\n radius?: number;\n\n /**\n * The center point for the circle. This should be half of the `viewBox` prop\n * 99% of the time and probably won't be changed.\n *\n * @defaultValue `33`\n */\n center?: number;\n\n /**\n * The viewbox for the child svg. I wouldn't recommend changing this value as\n * you will also need to update the `dashoffset` in both Sass and this prop to\n * get the animation to look nice again.\n *\n * @defaultValue `0 0 66 66`\n */\n viewBox?: string;\n\n /**\n * The `stroke-dashoffset` for the circle within the SVG. You probably won't\n * be changing this value that much as it should match the\n * `$rmd-progress-circle-dashoffset` Sass variable. This is really just used\n * to help to create the determinate progress animation.\n *\n * @defaultValue `187`\n */\n dashoffset?: number;\n\n /**\n * Boolean if the circular progress should be centered using left and right\n * margins.\n *\n * @defaultValue `false`\n */\n disableCentered?: boolean;\n\n /**\n * Set to `true` to render as a smaller size.\n *\n * @defaultValue `false`\n * @remarks\n * \\@since 2.3.0\n * \\@since 6.0.0 Renamed from `small`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to update the indeterminate behavior to only rotate\n * which will increase performance during CPU-intensive tasks or when many\n * loading spinners are displayed at once on the page.\n *\n * @defaultValue `false`\n * @remarks \\@since 6.0.0\n */\n disableShrink?: boolean;\n}\n\nconst styles = bem(\"rmd-circular-progress\");\n\n/**\n * **Server Component**\n *\n * @example\n * Indeterminate Example\n * ```tsx\n * import { CircularProgress } from \"@react-md/core\":\n * import { type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <CircularProgress aria-label=\"Loading\" />;\n * }\n * ```\n *\n * @example\n * Determinate Example\n * ```tsx\n * import { CircularProgress } from \"@react-md/core\":\n * import { useState, type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * // a number from 0 - 100\n * const [progress, setProgress] = useState(0);\n *\n * return <CircularProgress aria-label=\"File upload\" value={progress} />;\n * }\n * ```\n *\n * @remarks \\@since 6.0.0 Updated the determinate circular progress to no longer\n * rotate while increasing the value and require a label for accessibility.\n */\nexport const CircularProgress = forwardRef<\n HTMLSpanElement,\n LabelRequiredForA11y<CircularProgressProps>\n>(function CircularProgress(props, ref) {\n const {\n id: propId,\n className,\n svgStyle,\n svgClassName,\n circleStyle: propCircleStyle,\n circleClassName,\n value,\n min = 0,\n max = 100,\n radius = 30,\n center = 33,\n viewBox = \"0 0 66 66\",\n theme = \"primary\",\n dense = false,\n dashoffset = 187,\n disableShrink = false,\n disableCentered = false,\n disableTransition = false,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"circular-progress\");\n let progress: number | undefined;\n if (typeof value === \"number\") {\n progress = getPercentage({ min, max, value, validate: true });\n }\n\n const circleStyle = useMemo(() => {\n if (typeof progress !== \"number\") {\n return propCircleStyle;\n }\n\n return {\n ...propCircleStyle,\n strokeDashoffset: dashoffset - dashoffset * progress,\n };\n }, [progress, propCircleStyle, dashoffset]);\n\n const determinate = typeof progress === \"number\";\n const indeterminate = !determinate;\n return (\n <span\n {...remaining}\n id={id}\n ref={ref}\n role=\"progressbar\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={value}\n className={cnb(\n styles({ dense, centered: !disableCentered }),\n theme !== \"current-color\" && cssUtils({ textColor: theme }),\n className\n )}\n >\n <svg\n style={svgStyle}\n className={cnb(\n styles(\"svg\", {\n determinate,\n indeterminate: indeterminate && !disableShrink,\n \"rotate-only\": indeterminate && disableShrink,\n }),\n svgClassName\n )}\n viewBox={viewBox}\n >\n <circle\n style={circleStyle}\n className={cnb(\n styles(\"circle\", {\n animate: !disableTransition && determinate,\n determinate,\n indeterminate: indeterminate && !disableShrink,\n \"rotate-only\": indeterminate && disableShrink,\n }),\n circleClassName\n )}\n r={radius}\n cx={center}\n cy={center}\n />\n </svg>\n </span>\n );\n});\n"],"names":["cnb","forwardRef","useMemo","cssUtils","useEnsuredId","bem","getPercentage","styles","CircularProgress","props","ref","id","propId","className","svgStyle","svgClassName","circleStyle","propCircleStyle","circleClassName","value","min","max","radius","center","viewBox","theme","dense","dashoffset","disableShrink","disableCentered","disableTransition","remaining","progress","validate","strokeDashoffset","determinate","indeterminate","span","role","aria-valuemin","aria-valuemax","aria-valuenow","centered","textColor","svg","style","circle","animate","r","cx","cy"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,EACVC,OAAO,QAGF,QAAQ;AACf,SAASC,QAAQ,QAAQ,iBAAiB;AAE1C,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SAASC,aAAa,QAAQ,4BAA4B;AAuG1D,MAAMC,SAASF,IAAI;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BC,GACD,OAAO,MAAMG,iCAAmBP,WAG9B,SAASO,iBAAiBC,KAAK,EAAEC,GAAG;IACpC,MAAM,EACJC,IAAIC,MAAM,EACVC,SAAS,EACTC,QAAQ,EACRC,YAAY,EACZC,aAAaC,eAAe,EAC5BC,eAAe,EACfC,KAAK,EACLC,MAAM,CAAC,EACPC,MAAM,GAAG,EACTC,SAAS,EAAE,EACXC,SAAS,EA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 -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/progress/LinearProgress.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n useMemo,\n type CSSProperties,\n type HTMLAttributes,\n} from \"react\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { getPercentage } from \"../utils/getPercentage.js\";\nimport { type ProgressProps } from \"./types.js\";\n\n/**\n * @remarks \\@since 6.0.0 Added the `theme` prop\n */\nexport interface LinearProgressProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, \"id\" | \"children\">,\n ProgressProps {\n /**\n * An optional style to apply to the progress bar. This will be merged with\n * the current width or height tracking the progress when a `value` is also\n * provided.\n */\n barStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the progress bar.\n */\n barClassName?: string;\n\n /**\n * Boolean if the progress should be reversed. This will change the progress\n * direction from `left-to-right` to be `right-to-left`. If the current\n * language is a rtl language and this prop is enabled, the direction will\n * still be `left-to-right`.\n *\n * @defaultValue `false`\n */\n reverse?: boolean;\n\n /**\n * Boolean if the progress should be vertical instead of horizontal. When\n * this prop is set, you should also set the `verticalHeight` prop to a height\n * value you want for your progress bar.\n *\n * @defaultValue `false`\n */\n vertical?: boolean;\n\n /**\n * Since there isn't really a good way to have \"auto height\", you'll need to\n * manually set the progress bar's height with this prop to some pixel value.\n * If you'd prefer to set the height in Sass/css, set this value to `null`\n * instead since this value would be passed down as a `height` inline style.\n *\n * @defaultValue `240`\n */\n verticalHeight?: number | null;\n}\n\nconst styles = bem(\"rmd-linear-progress\");\n\n/**\n * **Server Component**\n *\n * @example\n * Indeterminate Example\n * ```tsx\n * import { LinearProgress } from \"@react-md/core\";\n * import { type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <LinearProgress aria-label=\"Loading\" />;\n * }\n * ```\n *\n * @example\n * Determinate Example\n * ```tsx\n * import { LinearProgress } from \"@react-md/core\";\n * import { useState, type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * // a number from 0 - 100\n * const [progress, setProgress] = useState(0);\n *\n * return <LinearProgress aria-label=\"File upload\" value={progress} />;\n * }\n * ```\n *\n * @remarks \\@since 6.0.0 Supports rendering as any of the theme colors and\n * requires a label for accessibility.\n */\nexport const LinearProgress = forwardRef<\n HTMLSpanElement,\n LabelRequiredForA11y<LinearProgressProps>\n>(function LinearProgress(props, ref) {\n const {\n id: propId,\n style: propStyle,\n className,\n barStyle: propBarStyle,\n barClassName,\n min = 0,\n max = 100,\n value,\n reverse = false,\n theme = \"primary\",\n disableTransition = false,\n vertical = false,\n verticalHeight = 240,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"linear-progress\");\n const style = useMemo(() => {\n if (!vertical || verticalHeight === null) {\n return propStyle;\n }\n\n return {\n ...propStyle,\n height: verticalHeight,\n };\n }, [propStyle, vertical, verticalHeight]);\n\n let progress: number | undefined;\n if (typeof value === \"number\") {\n progress = getPercentage({ min, max, value, validate: true });\n }\n const barStyle = useMemo(() => {\n if (typeof progress !== \"number\") {\n return propBarStyle;\n }\n\n const key = vertical ? \"height\" : \"width\";\n return {\n ...propBarStyle,\n [key]: `${progress * 100}%`,\n };\n }, [progress, propBarStyle, vertical]);\n\n const determinate = typeof progress === \"number\";\n const indeterminate = !determinate;\n return (\n <span\n {...remaining}\n id={id}\n ref={ref}\n style={style}\n role=\"progressbar\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={value}\n className={cnb(\n styles({\n vertical,\n horizontal: !vertical,\n determinate,\n indeterminate,\n }),\n theme !== \"current-color\" && cssUtils({ textColor: theme }),\n className\n )}\n >\n <span\n style={barStyle}\n className={cnb(\n styles(\"bar\", {\n vertical,\n \"vertical-reverse\": vertical && reverse,\n horizontal: !vertical,\n \"horizontal-reverse\": !vertical && reverse,\n animate: !disableTransition && determinate,\n determinate,\n indeterminate,\n \"determinate-reverse\": determinate && reverse && !vertical,\n \"determinate-vertical-reverse\": determinate && reverse && vertical,\n \"indeterminate-reverse\": indeterminate && reverse && !vertical,\n \"indeterminate-vertical\": indeterminate && vertical,\n \"indeterminate-vertical-reverse\":\n indeterminate && reverse && vertical,\n }),\n barClassName\n )}\n />\n </span>\n );\n});\n"],"names":["cnb","forwardRef","useMemo","cssUtils","useEnsuredId","bem","getPercentage","styles","LinearProgress","props","ref","id","propId","style","propStyle","className","barStyle","propBarStyle","barClassName","min","max","value","reverse","theme","disableTransition","vertical","verticalHeight","remaining","height","progress","validate","key","determinate","indeterminate","span","role","aria-valuemin","aria-valuemax","aria-valuenow","horizontal","textColor","animate"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,EACVC,OAAO,QAGF,QAAQ;AACf,SAASC,QAAQ,QAAQ,iBAAiB;AAE1C,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SAASC,aAAa,QAAQ,4BAA4B;AAmD1D,MAAMC,SAASF,IAAI;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BC,GACD,OAAO,MAAMG,+BAAiBP,WAG5B,SAASO,eAAeC,KAAK,EAAEC,GAAG;IAClC,MAAM,EACJC,IAAIC,MAAM,EACVC,OAAOC,SAAS,EAChBC,SAAS,EACTC,UAAUC,YAAY,EACtBC,YAAY,EACZC,MAAM,CAAC,EACPC,MAAM,GAAG,EACTC,KAAK,EACLC,UAAU,KAAK,EACfC,QAAQ,SAAS,EACjBC,oBAAoB,KAAK,EACzBC,WAAW,KAAK,EAChBC,iBAAiB,GAAG,EACpB,GAAGC,WACJ,GAAGlB;IAEJ,MAAME,KAAKP,aAAaQ,QAAQ;IAChC,MAAMC,QAAQX,QAAQ;QACpB,IAAI,CAACuB,YAAYC,mBAAmB,MAAM;YACxC,OAAOZ;QACT;QAEA,OAAO;YACL,GAAGA,SAAS;YACZc,QAAQF;QACV;IACF,GAAG;QAACZ;QAAWW;QAAUC;KAAe;IAExC,IAAIG;IACJ,IAAI,OAAOR,UAAU,UAAU;QAC7BQ,WAAWvB,cAAc;YAAEa;YAAKC;YAAKC;YAAOS,UAAU;QAAK;IAC7D;IACA,MAAMd,WAAWd,QAAQ;QACvB,IAAI,OAAO2B,aAAa,UAAU;YAChC,OAAOZ;QACT;QAEA,MAAMc,MAAMN,WAAW,WAAW;QAClC,OAAO;YACL,GAAGR,YAAY;YACf,CAACc,IAAI,EAAE,CAAC,EAAEF,WAAW,IAAI,CAAC,CAAC;QAC7B;IACF,GAAG;QAACA;QAAUZ;QAAcQ;KAAS;IAErC,MAAMO,cAAc,OAAOH,aAAa;IACxC,MAAMI,gBAAgB,CAACD;IACvB,qBACE,KAACE;QACE,GAAGP,SAAS;QACbhB,IAAIA;QACJD,KAAKA;QACLG,OAAOA;QACPsB,MAAK;QACLC,iBAAejB;QACfkB,iBAAejB;QACfkB,iBAAejB;QACfN,WAAWf,IACTO,OAAO;YACLkB;YACAc,YAAY,CAACd;YACbO;YACAC;QACF,IACAV,UAAU,mBAAmBpB,SAAS;YAAEqC,WAAWjB;QAAM,IACzDR;kBAGF,cAAA,KAACmB;YACCrB,OAAOG;YACPD,WAAWf,IACTO,OAAO,OAAO;gBACZkB;gBACA,oBAAoBA,YAAYH;gBAChCiB,YAAY,CAACd;gBACb,sBAAsB,CAACA,YAAYH;gBACnCmB,SAAS,CAACjB,qBAAqBQ;gBAC/BA;gBACAC;gBACA,uBAAuBD,eAAeV,WAAW,CAACG;gBAClD,gCAAgCO,eAAeV,WAAWG;gBAC1D,yBAAyBQ,iBAAiBX,WAAW,CAACG;gBACtD,0BAA0BQ,iBAAiBR;gBAC3C,kCACEQ,iBAAiBX,WAAWG;YAChC,IACAP;;;AAKV,GAAG"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/progress/getProgressA11y.ts"],"sourcesContent":["export interface ProgressA11y {\n \"aria-busy\": true;\n \"aria-describedby\": string;\n}\n\n/**\n * An extremely simple util that can be used to get the required a11y props for\n * another component that relies on a progress component.\n *\n * @param progressId - The id for the progress bar\n * @param progressing - Boolean if the progress bar is visible and progressing\n */\nexport function getProgressA11y(\n progressId: string,\n progressing: boolean\n): ProgressA11y | undefined {\n if (!progressing) {\n return undefined;\n }\n\n return {\n \"aria-busy\": true,\n \"aria-describedby\": progressId,\n };\n}\n"],"names":["getProgressA11y","progressId","progressing","undefined"],"mappings":"AAKA;;;;;;CAMC,GACD,OAAO,SAASA,gBACdC,UAAkB,EAClBC,WAAoB;IAEpB,IAAI,CAACA,aAAa;QAChB,OAAOC;IACT;IAEA,OAAO;QACL,aAAa;QACb,oBAAoBF;IACtB;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/progress/types.ts"],"sourcesContent":["import { type ThemeColor } from \"../cssUtils.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-progress-background-color\"?: string;\n \"--rmd-progress-color\"?: string;\n \"--rmd-progress-circular-size\"?: string | number;\n \"--rmd-progress-circular-stroke-width\"?: number;\n \"--rmd-progress-linear-size\"?: string | number;\n }\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type ProgressTheme = ThemeColor | \"current-color\";\n\n/**\n * The base progress props for both the linear and circular progress components.\n *\n * @remarks \\@since 6.0.0 Added the `theme` prop.\n */\nexport interface ProgressProps {\n /**\n * The id for the progress component. This is required for accessibility since\n * the progress will 99% of the time be describing the progress of something\n * else within the page. The element that is loading or tracking progress\n * should also be updated to have `aria-busy=\"true\"` and\n * `aria-describedby=\"THIS_ID\"`.\n *\n * @defaultValue `\"circular-progress-\" useId() || \"linear-progress-\" + useId()`\n * @remarks \\@since 6.0.0 This prop is now optional.\n */\n id?: string;\n\n /**\n * The min value for the progress component. This is used to determine the\n * current progress percentage for screen readers and styles.\n *\n * @defaultValue `0`\n */\n min?: number;\n\n /**\n * The max value for the progress component. This is used to determine the\n * current progress percentage for screen readers and styles.\n *\n * @defaultValue `100`\n */\n max?: number;\n\n /**\n * The current value for the progress component. If this prop is omitted, the\n * progress component will be put in an \"indeterminate\" state which will just\n * infinitely loop an animation until it is unmounted.\n *\n * This value will be passed down as a percentage based on the `min` and `max`\n * props so that screen readers can be notified of changes.\n */\n value?: number;\n\n /**\n * Boolean if the determinate progress versions should animate when the value\n * changes. This should really only be enabled if you aren't getting quick\n * progress updates or the updates happen in chunks.\n *\n * @defaultValue `false`\n * @remarks \\@since 6.0.0 This was renamed from `animate` to\n * `disableTransition`.\n */\n disableTransition?: boolean;\n\n /**\n * @defaultValue `\"primary\"`\n * @remarks \\@since 6.0.0\n */\n theme?: ProgressTheme;\n}\n"],"names":[],"mappings":"AAiBA;;;;CAIC,GACD,WAuDC"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/responsive-item/ResponsiveItemContainer.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-responsive-item-container\");\n\n/** @remarks \\@since 6.0.0 */\nexport interface ResponsiveItemContainerClassNameOptions {\n className?: string;\n\n /**\n * Set this to `true` if the container should gain the following styles:\n *\n * ```scss\n * display: block;\n * width: 100%;\n * ```\n *\n * @defaultValue `false`\n */\n fullWidth?: boolean;\n\n /**\n * Set this to a custom aspect ratio to use.\n *\n * @example\n * Valid Aspect Ratios\n * ```tsx\n * aspectRatio=\"16-9\"\n * aspectRatio=\"9-16\"\n * aspectRatio=\"3-4\"\n * aspectRatio=\"4-3\"\n * aspectRatio=\"1-1\"\n * ```\n *\n * These values are based on the `core.$responsive-item-aspect-ratios` map.\n *\n * @defaultValue `\"\"`\n */\n aspectRatio?: `${number}-${number}`;\n\n /**\n * Set this to `\"manual\"` if you want to manually specify which elements are\n * responsive items using custom class names. You probably don't really want\n * to use this.\n *\n * Set this to `\"auto\"` to automatically update all visual media that appear\n * as a child in this component to a responsive item.\n *\n * Set this to `\"container\"` to automatically update all visual media that\n * appear as a child in this component to be a responsive item that scales to\n * the container's dimensions.\n *\n * Note: The `\"auto\"` and `\"container\"` values use the\n * `core.$responsive-item-selectors` value for their behavior.\n *\n * @defaultValue `\"auto\"`\n */\n responsive?: \"auto\" | \"manual\" | \"container\";\n}\n\n/** @remarks \\@since 6.0.0 */\nexport function responsiveItemContainer(\n options: ResponsiveItemContainerClassNameOptions = {}\n): string {\n const {\n className,\n fullWidth = false,\n aspectRatio = \"\",\n responsive = \"auto\",\n } = options;\n\n return cnb(\n styles({\n auto: responsive !== \"manual\",\n \"auto-scale\": responsive === \"container\",\n \"aspect-ratio\": aspectRatio,\n [aspectRatio]: aspectRatio,\n \"full-width\": fullWidth,\n }),\n className\n );\n}\n\n/**\n * @remarks\n * \\@since 6.0.0 Renamed from `MediaContainerProps` to\n * `ResponsiveItemContainerProps`\n * \\@since 6.0.0 The `height` and `width` props were removed in favor of the\n * `aspectRatio` props since the latest typescript string interpolation supports\n * enforcing the correct format.\n * \\@since 6.0.0 The `auto` prop was removed in favor of the new\n * {@link ResponsiveItemContainerProps.responsive} prop.\n */\nexport interface ResponsiveItemContainerProps\n extends HTMLAttributes<HTMLSpanElement>,\n ResponsiveItemContainerClassNameOptions {}\n\n/**\n * **Server Component**\n *\n * @example\n * Image Example\n * ```tsx\n * import { ResponsiveItemContainer } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <ResponsiveItemContainer>\n * <img alt=\"\" src=\"/some-image.png\" />\n * </ResponsiveItemContainer>\n * );\n * }\n * ```\n *\n * @example\n * Iframe Example\n * ```tsx\n * import { ResponsiveItemContainer } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <ResponsiveItemContainer>\n * <iframe\n * src=\"https://youtube.com/some-video-url\"\n * title=\"Some YouTube video\"\n * allowFullScreen\n * />\n * </ResponsiveItemContainer>\n * );\n * }\n * ```\n *\n * @example\n * Forced Aspect Ratio\n * ```tsx\n * import { ResponsiveItemContainer } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <ResponsiveItemContainer aspectRatio=\"16-9\">\n * <img alt=\"\" src=\"/some-image.png\" />\n * </ResponsiveItemContainer>\n * );\n * }\n * ```\n *\n * @remarks \\@since 6.0.0 Renamed from `MediaContainer` to\n * `ResponsiveItemContainer` and renders a `<span>` instead of a `<div>`.\n */\nexport const ResponsiveItemContainer = forwardRef<\n HTMLSpanElement,\n ResponsiveItemContainerProps\n>(function ResponsiveItemContainer(props, ref) {\n const {\n className,\n fullWidth = false,\n aspectRatio,\n responsive = \"auto\",\n children,\n ...remaining\n } = props;\n\n return (\n <span\n {...remaining}\n ref={ref}\n className={responsiveItemContainer({\n className,\n fullWidth,\n aspectRatio,\n responsive,\n })}\n >\n {children}\n </span>\n );\n});\n"],"names":["cnb","forwardRef","bem","styles","responsiveItemContainer","options","className","fullWidth","aspectRatio","responsive","auto","ResponsiveItemContainer","props","ref","children","remaining","span"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6B,QAAQ;AACxD,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAyDnB,2BAA2B,GAC3B,OAAO,SAASE,wBACdC,UAAmD,CAAC,CAAC;IAErD,MAAM,EACJC,SAAS,EACTC,YAAY,KAAK,EACjBC,cAAc,EAAE,EAChBC,aAAa,MAAM,EACpB,GAAGJ;IAEJ,OAAOL,IACLG,OAAO;QACLO,MAAMD,eAAe;QACrB,cAAcA,eAAe;QAC7B,gBAAgBD;QAChB,CAACA,YAAY,EAAEA;QACf,cAAcD;IAChB,IACAD;AAEJ;AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsDC,GACD,OAAO,MAAMK,wCAA0BV,WAGrC,SAASU,wBAAwBC,KAAK,EAAEC,GAAG;IAC3C,MAAM,EACJP,SAAS,EACTC,YAAY,KAAK,EACjBC,WAAW,EACXC,aAAa,MAAM,EACnBK,QAAQ,EACR,GAAGC,WACJ,GAAGH;IAEJ,qBACE,KAACI;QACE,GAAGD,SAAS;QACbF,KAAKA;QACLP,WAAWF,wBAAwB;YACjCE;YACAC;YACAC;YACAC;QACF;kBAECK;;AAGP,GAAG"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/responsive-item/ResponsiveItemOverlay.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-responsive-item-overlay\");\n\n/**\n * The overlay positions relative to the `MediaContainer` component. Most of\n * the sizes are self-explanatory, but the `middle` position will be centered\n * vertically while `center` will be centered `horizontally`.\n *\n * @remarks \\@since 6.0.0 Renamed from `MediaOverlayPosition` to\n * `ResponsiveItemOverlayProps`.\n */\nexport type ResponsiveItemOverlayPosition =\n | \"top\"\n | \"right\"\n | \"bottom\"\n | \"left\"\n | \"middle\"\n | \"center\"\n | \"absolute-center\";\n\n/** @remarks \\@since 6.0.0 */\nexport interface ResponsiveItemOverlayClassNameOptions {\n className?: string;\n /** @defaultValue `\"bottom\"` */\n position?: ResponsiveItemOverlayPosition;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function responsiveItemOverlay(\n options: ResponsiveItemOverlayClassNameOptions = {}\n): string {\n const { className, position = \"bottom\" } = options;\n\n return cnb(\n styles({\n [position]: true,\n horizontal:\n position !== \"top\" && position !== \"bottom\" && position !== \"middle\",\n }),\n className\n );\n}\n\n/**\n * @remarks \\@since 6.0.0 Renamed from `MediaOverlayProps` to\n * `ResponsiveItemOverlayProps`.\n */\nexport interface ResponsiveItemOverlayProps\n extends HTMLAttributes<HTMLSpanElement>,\n ResponsiveItemOverlayClassNameOptions {}\n\n/**\n * **Server Component**\n *\n * @example\n * Simple Example\n * ```tsx\n * import { ResponsiveItemContainer, ResponsiveItemOverlay } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <ResponsiveItemContainer>\n * <img alt=\"\" src=\"/some-image.png\" />\n * <ResponsiveItemOverlay>\n * <Typography type=\"headline-5\" margin=\"none\">\n * This appears at the bottom by default.\n * </Typography>\n * </ResponsiveItemOverlay>\n * </ResponsiveItemContainer>\n * );\n * }\n * ```\n *\n * @see {@link ResponsiveItemOverlayPosition}\n *\n * @remarks \\@since 6.0.0 Renamed from `MediaOverlay` to `ResponsiveItemOverlay`\n * and renders as a `<span>` instead of a `<div>`.\n */\nexport const ResponsiveItemOverlay = forwardRef<\n HTMLSpanElement,\n ResponsiveItemOverlayProps\n>(function ResponsiveItemOverlay(props, ref) {\n const { className, children, position = \"bottom\", ...remaining } = props;\n\n return (\n <span\n {...remaining}\n ref={ref}\n className={responsiveItemOverlay({ className, position })}\n >\n {children}\n </span>\n );\n});\n"],"names":["cnb","forwardRef","bem","styles","responsiveItemOverlay","options","className","position","horizontal","ResponsiveItemOverlay","props","ref","children","remaining","span"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6B,QAAQ;AACxD,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AA0BnB;;CAEC,GACD,OAAO,SAASE,sBACdC,UAAiD,CAAC,CAAC;IAEnD,MAAM,EAAEC,SAAS,EAAEC,WAAW,QAAQ,EAAE,GAAGF;IAE3C,OAAOL,IACLG,OAAO;QACL,CAACI,SAAS,EAAE;QACZC,YACED,aAAa,SAASA,aAAa,YAAYA,aAAa;IAChE,IACAD;AAEJ;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BC,GACD,OAAO,MAAMG,sCAAwBR,WAGnC,SAASQ,sBAAsBC,KAAK,EAAEC,GAAG;IACzC,MAAM,EAAEL,SAAS,EAAEM,QAAQ,EAAEL,WAAW,QAAQ,EAAE,GAAGM,WAAW,GAAGH;IAEnE,qBACE,KAACI;QACE,GAAGD,SAAS;QACbF,KAAKA;QACLL,WAAWF,sBAAsB;YAAEE;YAAWC;QAAS;kBAEtDK;;AAGP,GAAG"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/responsive-item/styles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-responsive-item\");\n\n/** @remarks \\@since 6.0.0 */\nexport interface ResponsiveItemClassNameOptions {\n className?: string;\n\n /**\n * Set this to `true` to apply the following styles:\n * ```scss\n * max-height: 100%;\n * max-width: 100%;\n * object-fit: contain;\n * ```\n *\n * This is useful for displaying images in a full page dialog so that scroll\n * bars do not appear while maintaining the correct aspect ratio for the item.\n *\n * @defaultValue `false`\n */\n scaleToContainer?: boolean;\n\n /**\n * Set this to `true` to force a specific aspect ratio.\n *\n * Note: This will only work if the parent element has applied the correct\n * {@link ResponsiveItemContainerStyles} as well.\n *\n * @defaultValue `false`\n */\n forcedAspectRatio?: boolean;\n}\n\n/**\n * Applies the visual media responsive styles manually if you cannot use the\n * `ResponsiveItemContainer` component.\n *\n * @remarks \\@since 6.0.0\n */\nexport function responsiveItem(\n options: ResponsiveItemClassNameOptions = {}\n): string {\n const {\n className,\n scaleToContainer = false,\n forcedAspectRatio = false,\n } = options;\n\n return cnb(\n styles({\n scale: scaleToContainer,\n \"aspect-ratio\": forcedAspectRatio,\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","responsiveItem","options","className","scaleToContainer","forcedAspectRatio","scale"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAgCnB;;;;;CAKC,GACD,OAAO,SAASE,eACdC,UAA0C,CAAC,CAAC;IAE5C,MAAM,EACJC,SAAS,EACTC,mBAAmB,KAAK,EACxBC,oBAAoB,KAAK,EAC1B,GAAGH;IAEJ,OAAOJ,IACLE,OAAO;QACLM,OAAOF;QACP,gBAAgBC;IAClB,IACAF;AAEJ"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/scroll/ScrollLock.tsx"],"sourcesContent":["\"use client\";\nimport { useScrollLock } from \"./useScrollLock.js\";\n\n/**\n * **Client Component**\n *\n * This is a convenience component that can be used within transitionable\n * components to ensure the scroll lock is active only while the element is\n * rendered.\n *\n * @remarks \\@since 6.0.0\n */\nexport function ScrollLock(): null {\n useScrollLock(true);\n return null;\n}\n"],"names":["useScrollLock","ScrollLock"],"mappings":"AAAA;AACA,SAASA,aAAa,QAAQ,qBAAqB;AAEnD;;;;;;;;CAQC,GACD,OAAO,SAASC;IACdD,cAAc;IACd,OAAO;AACT"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/scroll/getScrollbarWidth.ts"],"sourcesContent":["let cache: number | undefined;\n\n/**\n * @internal\n */\nexport function getScrollbarWidth(force = false): number {\n /* istanbul ignore if */\n if (typeof window === \"undefined\") {\n return 0;\n }\n\n let value = cache;\n if (!force && typeof value === \"number\") {\n return value;\n }\n\n const outer = document.createElement(\"div\");\n outer.style.visibility = \"hidden\";\n outer.style.overflow = \"scroll\";\n document.body.appendChild(outer);\n\n const inner = document.createElement(\"div\");\n outer.appendChild(inner);\n\n // the scrollbar width can be determined by comparing the width of the parent\n // element that has scrollbars to the child element that does not.\n value = outer.offsetWidth - inner.offsetWidth;\n cache = value;\n document.body.removeChild(outer);\n\n return value;\n}\n"],"names":["cache","getScrollbarWidth","force","window","value","outer","document","createElement","style","visibility","overflow","body","appendChild","inner","offsetWidth","removeChild"],"mappings":"AAAA,IAAIA;AAEJ;;CAEC,GACD,OAAO,SAASC,kBAAkBC,QAAQ,KAAK;IAC7C,sBAAsB,GACtB,IAAI,OAAOC,WAAW,aAAa;QACjC,OAAO;IACT;IAEA,IAAIC,QAAQJ;IACZ,IAAI,CAACE,SAAS,OAAOE,UAAU,UAAU;QACvC,OAAOA;IACT;IAEA,MAAMC,QAAQC,SAASC,aAAa,CAAC;IACrCF,MAAMG,KAAK,CAACC,UAAU,GAAG;IACzBJ,MAAMG,KAAK,CAACE,QAAQ,GAAG;IACvBJ,SAASK,IAAI,CAACC,WAAW,CAACP;IAE1B,MAAMQ,QAAQP,SAASC,aAAa,CAAC;IACrCF,MAAMO,WAAW,CAACC;IAElB,6EAA6E;IAC7E,kEAAkE;IAClET,QAAQC,MAAMS,WAAW,GAAGD,MAAMC,WAAW;IAC7Cd,QAAQI;IACRE,SAASK,IAAI,CAACI,WAAW,CAACV;IAE1B,OAAOD;AACT"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/scroll/useScrollLock.ts"],"sourcesContent":["\"use client\";\nimport { useEffect } from \"react\";\nimport { getScrollbarWidth } from \"./getScrollbarWidth.js\";\n\nexport const SCROLLBAR_SIZE_VAR = \"--rmd-scrollbar-size\";\n\n// this is really just so that nested dialogs will work correctly. Only the\n// first created dialog should prevent scroll locking on the `document.body`\nlet isLocked = false;\n\n/**\n *\n * @internal\n * @remarks\n * \\@since 6.0.0 No longer support scroll locking elements other than\n * the `document.body` since it's more reliable to scroll lock with an overlay.\n * \\@since 6.0.0 Now applies `paddingRight` equal to the current OS's\n * scrollbar width if there is a full page scrollbar to prevent layout shifting.\n *\n * @param locked - The `document.body` will not be scrollable when this is\n * `true`.\n */\nexport function useScrollLock(locked: boolean): void {\n useEffect(() => {\n if (isLocked || !locked) {\n return;\n }\n\n isLocked = true;\n\n const size = `${getScrollbarWidth()}px`;\n const el = document.body;\n const { paddingRight } = el.style;\n const isScrollbarVisible = el.scrollHeight > el.offsetHeight;\n\n el.style.overflow = \"hidden\";\n if (isScrollbarVisible) {\n el.style.setProperty(SCROLLBAR_SIZE_VAR, size);\n el.style.paddingRight = `var(${SCROLLBAR_SIZE_VAR})`;\n }\n\n return () => {\n isLocked = false;\n\n el.style.removeProperty(SCROLLBAR_SIZE_VAR);\n el.style.overflow = \"\";\n if (isScrollbarVisible) {\n el.style.paddingRight = paddingRight;\n }\n };\n }, [locked]);\n}\n"],"names":["useEffect","getScrollbarWidth","SCROLLBAR_SIZE_VAR","isLocked","useScrollLock","locked","size","el","document","body","paddingRight","style","isScrollbarVisible","scrollHeight","offsetHeight","overflow","setProperty","removeProperty"],"mappings":"AAAA;AACA,SAASA,SAAS,QAAQ,QAAQ;AAClC,SAASC,iBAAiB,QAAQ,yBAAyB;AAE3D,OAAO,MAAMC,qBAAqB,uBAAuB;AAEzD,2EAA2E;AAC3E,4EAA4E;AAC5E,IAAIC,WAAW;AAEf;;;;;;;;;;;CAWC,GACD,OAAO,SAASC,cAAcC,MAAe;IAC3CL,UAAU;QACR,IAAIG,YAAY,CAACE,QAAQ;YACvB;QACF;QAEAF,WAAW;QAEX,MAAMG,OAAO,CAAC,EAAEL,oBAAoB,EAAE,CAAC;QACvC,MAAMM,KAAKC,SAASC,IAAI;QACxB,MAAM,EAAEC,YAAY,EAAE,GAAGH,GAAGI,KAAK;QACjC,MAAMC,qBAAqBL,GAAGM,YAAY,GAAGN,GAAGO,YAAY;QAE5DP,GAAGI,KAAK,CAACI,QAAQ,GAAG;QACpB,IAAIH,oBAAoB;YACtBL,GAAGI,KAAK,CAACK,WAAW,CAACd,oBAAoBI;YACzCC,GAAGI,KAAK,CAACD,YAAY,GAAG,CAAC,IAAI,EAAER,mBAAmB,CAAC,CAAC;QACtD;QAEA,OAAO;YACLC,WAAW;YAEXI,GAAGI,KAAK,CAACM,cAAc,CAACf;YACxBK,GAAGI,KAAK,CAACI,QAAQ,GAAG;YACpB,IAAIH,oBAAoB;gBACtBL,GAAGI,KAAK,CAACD,YAAY,GAAGA;YAC1B;QACF;IACF,GAAG;QAACL;KAAO;AACb"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/segmented-button/SegmentedButton.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type ButtonHTMLAttributes, type ReactNode } from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { useElementInteraction } from \"../interaction/useElementInteraction.js\";\nimport { useHigherContrastChildren } from \"../interaction/useHigherContrastChildren.js\";\nimport { useMaxWidthTransition } from \"../transition/useMaxWidthTransition.js\";\nimport { segmentedButton } from \"./segmentedButtonStyles.js\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface SegmentedButtonProps\n extends ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * Set this to `true` to apply selected styles and an optional\n * {@link selectedIcon}\n *\n * @defaultValue `false`\n */\n selected?: boolean;\n\n /** @defaultValue `getIcon(\"selected\")` */\n selectedIcon?: ReactNode;\n\n /**\n * An optional className to apply when {@link selected} is `true`.\n */\n selectedClassName?: string;\n\n /**\n * Set this to `true` to not render the {@link selectedIcon} when\n * {@link selected} is `true`.\n *\n * @defaultValue `false`\n */\n disableSelectedIcon?: boolean;\n\n /**\n * Set this to `true` to disable the {@link selectedIcon} enter/exit\n * transition and instead just use `display: none`.\n *\n * @defaultValue `false`\n */\n disableSelectedTransition?: boolean;\n\n /**\n * An optional addon to render before the {@link children} and after the\n * {@link selectedIcon}. This is only useful when rendering text children so\n * it can appear above the interaction states.\n */\n leftAddon?: ReactNode;\n\n /**\n * An optional addon to render after the {@link children}. This is only useful\n * when rendering text children so it can appear above the interaction states.\n */\n rightAddon?: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * @example\n * Simple Example\n * ```tsx\n * import {\n * SegmentedButton,\n * SegmentedButtonContainer,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n * import { useState } from \"react\";\n *\n * function Example(): ReactElement {\n * const [value, setValue] = useState(\"a\");\n * return (\n * <SegmentedButtonContainer>\n * <SegmentedButton\n * onClick={() => setValue(\"a\")}\n * selected={value === \"a\"}\n * >\n * First\n * </SegmentedButton>\n * <SegmentedButton\n * onClick={() => setValue(\"b\")}\n * selected={value === \"b\"}\n * >\n * Second\n * </SegmentedButton>\n * <SegmentedButton\n * onClick={() => setValue(\"c\")}\n * selected={value === \"c\"}\n * disableSelectedIcon\n * >\n * Third\n * </SegmentedButton>\n * </SegmentedButtonContainer>\n * );\n * }\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport const SegmentedButton = forwardRef<\n HTMLButtonElement,\n SegmentedButtonProps\n>(function SegmentedButton(props, ref) {\n const {\n className,\n type = \"button\",\n leftAddon,\n rightAddon,\n children: propChildren,\n selected,\n selectedIcon: propSelectedIcon,\n selectedClassName,\n disableSelectedIcon,\n disableSelectedTransition,\n onBlur,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onMouseLeave,\n onDragStart,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n disabled,\n ...remaining\n } = props;\n\n const children = useHigherContrastChildren(propChildren);\n const selectedIconNode = getIcon(\"selected\", propSelectedIcon);\n const selectedIcon = useMaxWidthTransition({\n element: selectedIconNode,\n transitionIn: !!selected,\n disabled: disableSelectedIcon,\n disableTransition: disableSelectedTransition,\n });\n const { pressedClassName, handlers, ripples } = useElementInteraction({\n onBlur,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onMouseLeave,\n onDragStart,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n disabled,\n });\n\n return (\n <button\n {...remaining}\n {...handlers}\n aria-pressed={selected}\n ref={ref}\n type={type}\n disabled={disabled}\n className={segmentedButton({\n className,\n selected,\n selectedClassName,\n pressedClassName,\n })}\n >\n {!disableSelectedIcon && selectedIcon}\n {leftAddon}\n {children}\n {rightAddon}\n {ripples}\n </button>\n );\n});\n"],"names":["forwardRef","getIcon","useElementInteraction","useHigherContrastChildren","useMaxWidthTransition","segmentedButton","SegmentedButton","props","ref","className","type","leftAddon","rightAddon","children","propChildren","selected","selectedIcon","propSelectedIcon","selectedClassName","disableSelectedIcon","disableSelectedTransition","onBlur","onClick","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onMouseLeave","onDragStart","onTouchStart","onTouchEnd","onTouchMove","disabled","remaining","selectedIconNode","element","transitionIn","disableTransition","pressedClassName","handlers","ripples","button","aria-pressed"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAAmD,QAAQ;AAC9E,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,qBAAqB,QAAQ,0CAA0C;AAChF,SAASC,yBAAyB,QAAQ,8CAA8C;AACxF,SAASC,qBAAqB,QAAQ,yCAAyC;AAC/E,SAASC,eAAe,QAAQ,6BAA6B;AAqD7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CC,GACD,OAAO,MAAMC,gCAAkBN,WAG7B,SAASM,gBAAgBC,KAAK,EAAEC,GAAG;IACnC,MAAM,EACJC,SAAS,EACTC,OAAO,QAAQ,EACfC,SAAS,EACTC,UAAU,EACVC,UAAUC,YAAY,EACtBC,QAAQ,EACRC,cAAcC,gBAAgB,EAC9BC,iBAAiB,EACjBC,mBAAmB,EACnBC,yBAAyB,EACzBC,MAAM,EACNC,OAAO,EACPC,SAAS,EACTC,OAAO,EACPC,WAAW,EACXC,SAAS,EACTC,YAAY,EACZC,WAAW,EACXC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,QAAQ,EACR,GAAGC,WACJ,GAAG1B;IAEJ,MAAMM,WAAWV,0BAA0BW;IAC3C,MAAMoB,mBAAmBjC,QAAQ,YAAYgB;IAC7C,MAAMD,eAAeZ,sBAAsB;QACzC+B,SAASD;QACTE,cAAc,CAAC,CAACrB;QAChBiB,UAAUb;QACVkB,mBAAmBjB;IACrB;IACA,MAAM,EAAEkB,gBAAgB,EAAEC,QAAQ,EAAEC,OAAO,EAAE,GAAGtC,sBAAsB;QACpEmB;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;IACF;IAEA,qBACE,MAACS;QACE,GAAGR,SAAS;QACZ,GAAGM,QAAQ;QACZG,gBAAc3B;QACdP,KAAKA;QACLE,MAAMA;QACNsB,UAAUA;QACVvB,WAAWJ,gBAAgB;YACzBI;YACAM;YACAG;YACAoB;QACF;;YAEC,CAACnB,uBAAuBH;YACxBL;YACAE;YACAD;YACA4B;;;AAGP,GAAG"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/segmented-button/SegmentedButtonContainer.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport {\n segmentedButtonContainerStyles,\n type SegmentedButtonContainerClassNameOptions,\n} from \"./segmentedButtonContainerStyles.js\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface SegmentedButtonContainerProps\n extends HTMLAttributes<HTMLDivElement>,\n SegmentedButtonContainerClassNameOptions {\n children: ReactNode;\n}\n\n/**\n * **Server Component**\n *\n * Simple wrapper `div` to apply the segmented button container styles. You can\n * just use the {@link segmentedButtonContainerStyles} util function instead.\n *\n * @example\n * Without This Component\n * ```tsx\n * import {\n * SegmentedButton,\n * segmentedButtonContainerStyles,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * import { CustomWrapperComponent } from \"./CustomWrapperComponent.jsx\";\n *\n * function Example(): ReactElement {\n * return (\n * <CustomWrapperComponent className={segmentedButtonContainerStyles()}>\n * <SegmentedButton>One</SegmentedButton>\n * <SegmentedButton>Two</SegmentedButton>\n * <SegmentedButton>Three</SegmentedButton>\n * </CustomWrapperComponent>\n * );\n * }\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport const SegmentedButtonContainer = forwardRef<\n HTMLDivElement,\n SegmentedButtonContainerProps\n>(function SegmentedButtonContainer(props, ref) {\n const { className, disableFullWidth, children, ...remaining } = props;\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={segmentedButtonContainerStyles({\n className,\n disableFullWidth,\n })}\n >\n {children}\n </div>\n );\n});\n"],"names":["forwardRef","segmentedButtonContainerStyles","SegmentedButtonContainer","props","ref","className","disableFullWidth","children","remaining","div"],"mappings":";AAAA,SAASA,UAAU,QAA6C,QAAQ;AACxE,SACEC,8BAA8B,QAEzB,sCAAsC;AAW7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BC,GACD,OAAO,MAAMC,yCAA2BF,WAGtC,SAASE,yBAAyBC,KAAK,EAAEC,GAAG;IAC5C,MAAM,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,QAAQ,EAAE,GAAGC,WAAW,GAAGL;IAEhE,qBACE,KAACM;QACE,GAAGD,SAAS;QACbJ,KAAKA;QACLC,WAAWJ,+BAA+B;YACxCI;YACAC;QACF;kBAECC;;AAGP,GAAG"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/segmented-button/segmentedButtonContainerStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-segmented-button-container\");\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface SegmentedButtonContainerClassNameOptions {\n className?: string;\n\n /** @defaultValue `false` */\n disableFullWidth?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function segmentedButtonContainerStyles(\n options: SegmentedButtonContainerClassNameOptions = {}\n): string {\n const { className, disableFullWidth } = options;\n\n return cnb(styles({ \"full-width\": !disableFullWidth }), className);\n}\n"],"names":["cnb","bem","styles","segmentedButtonContainerStyles","options","className","disableFullWidth"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAYnB;;CAEC,GACD,OAAO,SAASE,+BACdC,UAAoD,CAAC,CAAC;IAEtD,MAAM,EAAEC,SAAS,EAAEC,gBAAgB,EAAE,GAAGF;IAExC,OAAOJ,IAAIE,OAAO;QAAE,cAAc,CAACI;IAAiB,IAAID;AAC1D"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/segmented-button/segmentedButtonStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-segmented-button\");\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface SegmentedButtonClassNameOptions {\n className?: string;\n\n /** @defaultValue `false` */\n selected?: boolean;\n\n /**\n * An optional className to apply when {@link selected} is `true`\n */\n selectedClassName?: string;\n\n /** @internal */\n pressedClassName?: string;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function segmentedButton(\n options: SegmentedButtonClassNameOptions = {}\n): string {\n const { className, selected, selectedClassName, pressedClassName } = options;\n\n return cnb(\n styles({ selected }),\n selected && selectedClassName,\n pressedClassName,\n cssUtils({ surface: true }),\n className\n );\n}\n"],"names":["cnb","cssUtils","bem","styles","segmentedButton","options","className","selected","selectedClassName","pressedClassName","surface"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAoBnB;;CAEC,GACD,OAAO,SAASE,gBACdC,UAA2C,CAAC,CAAC;IAE7C,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,iBAAiB,EAAEC,gBAAgB,EAAE,GAAGJ;IAErE,OAAOL,IACLG,OAAO;QAAEI;IAAS,IAClBA,YAAYC,mBACZC,kBACAR,SAAS;QAAES,SAAS;IAAK,IACzBJ;AAEJ"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/sheet/Sheet.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef } from \"react\";\nimport { Dialog, type BaseDialogProps } from \"../dialog/Dialog.js\";\nimport {\n type CSSTransitionClassNames,\n type TransitionTimeout,\n} from \"../transition/types.js\";\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { sheet, type BaseSheetClassNameOptions } from \"./styles.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-sheet-height\"?: string | number;\n \"--rmd-sheet-width\"?: string | number;\n \"--rmd-sheet-max-height\"?: string | number;\n \"--rmd-sheet-touch-width\"?: string | number;\n \"--rmd-sheet-touch-max-height\"?: string | number;\n \"--rmd-sheet-static-width\"?: string | number;\n \"--rmd-sheet-transform-offscreen\"?: string | number;\n \"--rmd-sheet-z-index\"?: number;\n }\n}\n\nexport const DEFAULT_SHEET_TIMEOUT: Readonly<TransitionTimeout> = {\n enter: 200,\n exit: 150,\n};\n\nexport const DEFAULT_SHEET_CLASSNAMES: Readonly<CSSTransitionClassNames> = {\n appear: \"rmd-sheet--offscreen\",\n appearActive: \"rmd-sheet--enter rmd-sheet--visible\",\n enter: \"rmd-sheet--offscreen\",\n enterActive: \"rmd-sheet--enter rmd-sheet--visible\",\n exit: \"rmd-sheet--exit\",\n exitActive: \"rmd-sheet--offscreen\",\n exitDone: \"rmd-sheet--offscreen rmd-sheet--hidden\",\n};\n\nexport type SheetDialogProps = Omit<BaseDialogProps, \"role\" | \"type\" | \"modal\">;\n\nexport interface BaseSheetProps\n extends SheetDialogProps,\n BaseSheetClassNameOptions {\n /**\n * @defaultValue `\"dialog\"`\n */\n role?: \"dialog\" | \"menu\" | \"none\";\n\n /**\n * @defaultValue `true`\n * @see {@link SheetDialogProps.exitedHidden}\n * @remarks \\@since 6.0.0\n */\n exitedHidden?: boolean;\n}\n\nexport type SheetProps = LabelRequiredForA11y<BaseSheetProps>;\n\n/**\n * **Client Component**\n *\n */\nexport const Sheet = forwardRef<HTMLDivElement, SheetProps>(\n function Sheet(props, ref) {\n const {\n role = \"dialog\",\n className,\n position = \"left\",\n horizontalSize = \"media\",\n verticalSize = \"recommended\",\n timeout = DEFAULT_SHEET_TIMEOUT,\n classNames = DEFAULT_SHEET_CLASSNAMES,\n visible,\n temporary = true,\n exitedHidden = true,\n children,\n ...remaining\n } = props;\n const { disableOverlay } = props;\n\n return (\n <Dialog\n {...remaining}\n ref={ref}\n role={role}\n type=\"custom\"\n timeout={timeout}\n classNames={classNames}\n visible={visible}\n temporary={temporary}\n exitedHidden={exitedHidden}\n className={sheet({\n position,\n horizontalSize,\n verticalSize,\n disableOverlay,\n className,\n })}\n >\n {children}\n </Dialog>\n );\n }\n);\n"],"names":["forwardRef","Dialog","sheet","DEFAULT_SHEET_TIMEOUT","enter","exit","DEFAULT_SHEET_CLASSNAMES","appear","appearActive","enterActive","exitActive","exitDone","Sheet","props","ref","role","className","position","horizontalSize","verticalSize","timeout","classNames","visible","temporary","exitedHidden","children","remaining","disableOverlay","type"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SAASC,MAAM,QAA8B,sBAAsB;AAMnE,SAASC,KAAK,QAAwC,cAAc;AAepE,OAAO,MAAMC,wBAAqD;IAChEC,OAAO;IACPC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,2BAA8D;IACzEC,QAAQ;IACRC,cAAc;IACdJ,OAAO;IACPK,aAAa;IACbJ,MAAM;IACNK,YAAY;IACZC,UAAU;AACZ,EAAE;AAsBF;;;CAGC,GACD,OAAO,MAAMC,sBAAQZ,WACnB,SAASY,MAAMC,KAAK,EAAEC,GAAG;IACvB,MAAM,EACJC,OAAO,QAAQ,EACfC,SAAS,EACTC,WAAW,MAAM,EACjBC,iBAAiB,OAAO,EACxBC,eAAe,aAAa,EAC5BC,UAAUjB,qBAAqB,EAC/BkB,aAAaf,wBAAwB,EACrCgB,OAAO,EACPC,YAAY,IAAI,EAChBC,eAAe,IAAI,EACnBC,QAAQ,EACR,GAAGC,WACJ,GAAGb;IACJ,MAAM,EAAEc,cAAc,EAAE,GAAGd;IAE3B,qBACE,KAACZ;QACE,GAAGyB,SAAS;QACbZ,KAAKA;QACLC,MAAMA;QACNa,MAAK;QACLR,SAASA;QACTC,YAAYA;QACZC,SAASA;QACTC,WAAWA;QACXC,cAAcA;QACdR,WAAWd,MAAM;YACfe;YACAC;YACAC;YACAQ;YACAX;QACF;kBAECS;;AAGP,GACA"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/sheet/styles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-sheet\");\n\n/**\n * The location that the sheet should be located within the viewport.\n */\nexport type SheetPosition = \"top\" | \"right\" | \"bottom\" | \"left\";\n\n/**\n * The size to use for sheets that have been positioned left or right. The\n * default supported values are:\n *\n * - `\"none\"` - the size is based on content, but is still limited to the\n * viewport width so that the horizontal scrolling will not occur within the\n * page. No limits added to sizing.\n * - `\"touch\"` - the `width` is set to be the entire viewport width minus a\n * touchable area and is normally recommended for mobile devices.\n * - `\"static\"` - the `width` is set to a static `16rem` and generally used for\n * landscape tablets and desktops.\n * - `\"media\"` - automatically switches between \"touch\" and \"static\" based on\n * css media queries. (this is the default)\n */\nexport type SheetHorizontalSize = \"none\" | \"media\" | \"touch\" | \"static\";\n\n/**\n * The size to use for sheets that have been positioned top or bottom. The\n * supported sizes are:\n *\n * - `\"none\"` - the size is based on content and is limited to the viewport\n * height\n * - `\"touch\"` - the size is based on content and is limited to the viewport\n * height minus a small touchable area\n * - `\"recommended\"` - the material design recommended sizing that forces a\n * `max-height` of 50vh and `min-height` of 3.5rem\n */\nexport type SheetVerticalSize = \"none\" | \"touch\" | \"recommended\";\n\n/** @remarks \\@since 6.0.0 */\nexport interface BaseSheetClassNameOptions {\n className?: string;\n\n /**\n * @defaultValue `\"left\"`\n */\n position?: SheetPosition;\n\n /**\n * @defaultValue `\"media\"`\n */\n horizontalSize?: SheetHorizontalSize;\n\n /**\n * @defaultValue `\"recommended\"`\n */\n verticalSize?: SheetVerticalSize;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\nexport interface SheetClassNameOptions extends BaseSheetClassNameOptions {\n offscreen?: boolean;\n disableOverlay?: boolean;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport function sheet(options: SheetClassNameOptions): string {\n const {\n position = \"left\",\n horizontalSize = \"media\",\n verticalSize = \"recommended\",\n offscreen = false,\n disableOverlay,\n className,\n } = options;\n const horizontal = position === \"left\" || position === \"right\";\n\n return cnb(\n styles({\n horizontal,\n vertical: !horizontal,\n raised: !disableOverlay,\n offscreen,\n [position]: true,\n \"media-width\": horizontal && horizontalSize === \"media\",\n \"touch-width\": horizontal && horizontalSize === \"touch\",\n \"static-width\": horizontal && horizontalSize === \"static\",\n \"viewport-height\": !horizontal && verticalSize === \"none\",\n \"touchable-height\": !horizontal && verticalSize === \"touch\",\n \"recommended-height\": !horizontal && verticalSize === \"recommended\",\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","sheet","options","position","horizontalSize","verticalSize","offscreen","disableOverlay","className","horizontal","vertical","raised"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAiEnB,2BAA2B,GAC3B,OAAO,SAASE,MAAMC,OAA8B;IAClD,MAAM,EACJC,WAAW,MAAM,EACjBC,iBAAiB,OAAO,EACxBC,eAAe,aAAa,EAC5BC,YAAY,KAAK,EACjBC,cAAc,EACdC,SAAS,EACV,GAAGN;IACJ,MAAMO,aAAaN,aAAa,UAAUA,aAAa;IAEvD,OAAOL,IACLE,OAAO;QACLS;QACAC,UAAU,CAACD;QACXE,QAAQ,CAACJ;QACTD;QACA,CAACH,SAAS,EAAE;QACZ,eAAeM,cAAcL,mBAAmB;QAChD,eAAeK,cAAcL,mBAAmB;QAChD,gBAAgBK,cAAcL,mBAAmB;QACjD,mBAAmB,CAACK,cAAcJ,iBAAiB;QACnD,oBAAoB,CAACI,cAAcJ,iBAAiB;QACpD,sBAAsB,CAACI,cAAcJ,iBAAiB;IACxD,IACAG;AAEJ"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/snackbar/DefaultToastRenderer.tsx"],"sourcesContent":["\"use client\";\nimport { useEffect, useMemo, type ReactElement } from \"react\";\nimport { usePageInactive } from \"../usePageInactive.js\";\nimport { Toast, type ConfigurableToastProps } from \"./Toast.js\";\nimport { type ToastMeta } from \"./ToastManager.js\";\nimport { useToastManager } from \"./ToastManagerProvider.js\";\nimport {\n CurrentToastActionsProvider,\n type CurrentToastActions,\n} from \"./useCurrentToastActions.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface ToastRendererProps extends ConfigurableToastProps, ToastMeta {\n /**\n * Optional props that should be passed to each `Toast` from the `Snackbar`.\n * This is a great way to enforce each toast having a close button, a custom\n * class name, theme, etc.\n */\n toastDefaults?: ConfigurableToastProps;\n}\n\n/**\n * **Client Component**\n *\n * This is the default implementation for rendering toasts that will:\n *\n * - controls the visibility of the toast with the {@link useToast} hook\n * - add a `closeButton` if the {@link ToastRendererProps.toastDefaults} has\n * `closeButton === true` or the `closeButtonProps` exists.\n * - add a `closeButton` if the `visibleTime` is `null` and the current toast\n * does not have an `action` or `actionButton`\n * - ensures both the toast's `onEntered` and the {@link ToastRendererProps.toastDefaults}'s\n * `onEntered` are called\n * - ensures both the toast's `onExited` and the {@link ToastRendererProps.toastDefaults}'s\n * `onExited` are called\n * - always renders the {@link ToastRendererProps.toastDefaults}'s `children`\n * 'after the optional toast's `children`\n *\n * @remarks \\@since 6.0.0\n */\nexport function DefaultToastRenderer(props: ToastRendererProps): ReactElement {\n const {\n toastId,\n paused,\n visible,\n priority: _priority,\n duplicates: _duplicates,\n visibleTime,\n onExited = noop,\n onEntered = noop,\n onMouseEnter = noop,\n onMouseLeave = noop,\n toastDefaults = {},\n ...remaining\n } = props;\n const {\n closeButtonProps,\n closeButton = !!closeButtonProps || !!remaining.closeButtonProps,\n onEntered: defaultEntered = noop,\n onExited: defaultExited = noop,\n onMouseEnter: defaultMouseEnter = noop,\n onMouseLeave: defaultMouseLeave = noop,\n ...defaults\n } = toastDefaults;\n\n const toastManager = useToastManager();\n const currentToastActions = useMemo<CurrentToastActions>(\n () => ({\n clearTimer() {\n toastManager.clearTimer(toastId);\n },\n removeToast(transition) {\n toastManager.removeToast(toastId, transition);\n },\n startRemoveTimeout() {\n toastManager.startRemoveTimeout(toastId);\n },\n pauseRemoveTimeout() {\n toastManager.pauseRemoveTimeout(toastId);\n },\n resumeRemoveTimeout() {\n toastManager.resumeRemoveTimeout(toastId);\n },\n }),\n [toastId, toastManager]\n );\n useEffect(() => {\n return () => {\n currentToastActions.clearTimer();\n };\n }, [currentToastActions]);\n usePageInactive({\n disabled: !visible,\n onChange(active) {\n if (active) {\n currentToastActions.resumeRemoveTimeout();\n } else {\n currentToastActions.pauseRemoveTimeout();\n }\n },\n });\n\n return (\n <CurrentToastActionsProvider value={currentToastActions}>\n <Toast\n closeButton={\n closeButton ||\n (!visibleTime && !remaining.action && !remaining.actionButton)\n }\n closeButtonProps={closeButtonProps}\n {...defaults}\n {...remaining}\n paused={paused}\n visible={visible}\n onEntered={(appearing) => {\n defaultEntered(appearing);\n onEntered(appearing);\n currentToastActions.startRemoveTimeout();\n }}\n onExited={() => {\n defaultExited();\n onExited();\n currentToastActions.removeToast(false);\n }}\n onMouseEnter={(event) => {\n defaultMouseEnter(event);\n onMouseEnter(event);\n currentToastActions.pauseRemoveTimeout();\n }}\n onMouseLeave={(event) => {\n defaultMouseLeave(event);\n onMouseLeave(event);\n currentToastActions.resumeRemoveTimeout();\n }}\n >\n {defaults.children}\n {remaining.children}\n </Toast>\n </CurrentToastActionsProvider>\n );\n}\n"],"names":["useEffect","useMemo","usePageInactive","Toast","useToastManager","CurrentToastActionsProvider","noop","DefaultToastRenderer","props","toastId","paused","visible","priority","_priority","duplicates","_duplicates","visibleTime","onExited","onEntered","onMouseEnter","onMouseLeave","toastDefaults","remaining","closeButtonProps","closeButton","defaultEntered","defaultExited","defaultMouseEnter","defaultMouseLeave","defaults","toastManager","currentToastActions","clearTimer","removeToast","transition","startRemoveTimeout","pauseRemoveTimeout","resumeRemoveTimeout","disabled","onChange","active","value","action","actionButton","appearing","event","children"],"mappings":"AAAA;;AACA,SAASA,SAAS,EAAEC,OAAO,QAA2B,QAAQ;AAC9D,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SAASC,KAAK,QAAqC,aAA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;IAEA,qBACE,KAAC/B;QAA4BoC,OAAOV;kBAClC,cAAA,MAAC5B;YACCqB,aACEA,eACC,CAACR,eAAe,CAACM,UAAUoB,MAAM,IAAI,CAACpB,UAAUqB,YAAY;YAE/DpB,kBAAkBA;YACjB,GAAGM,QAAQ;YACX,GAAGP,SAAS;YACbZ,QAAQA;YACRC,SAASA;YACTO,WAAW,CAAC0B;gBACVnB,eAAemB;gBACf1B,UAAU0B;gBACVb,oBAAoBI,kBAAkB;YACxC;YACAlB,UAAU;gBACRS;gBACAT;gBACAc,oBAAoBE,WAAW,CAAC;YAClC;YACAd,cAAc,CAAC0B;gBACblB,kBAAkBkB;gBAClB1B,aAAa0B;gBACbd,oBAAoBK,kBAAkB;YACxC;YACAhB,cAAc,CAACyB;gBACbjB,kBAAkBiB;gBAClBzB,aAAayB;gBACbd,oBAAoBM,mBAAmB;YACzC;;gBAECR,SAASiB,QAAQ;gBACjBxB,UAAUwB,QAAQ;;;;AAI3B"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/snackbar/Snackbar.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type ComponentType, type HTMLAttributes } from \"react\";\nimport { Portal } from \"../portal/Portal.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport {\n DefaultToastRenderer,\n type ToastRendererProps,\n} from \"./DefaultToastRenderer.js\";\nimport { type ConfigurableToastProps } from \"./Toast.js\";\nimport { useToastQueue } from \"./ToastManagerProvider.js\";\nimport { snackbar, type SnackbarPosition } from \"./snackbarStyles.js\";\n\n/**\n * @remarks \\@since 6.0.0 The `id` prop is optional\n */\nexport interface SnackbarProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * @defaultValue `\"snackbar-\" + useId()`\n */\n id?: string;\n\n /**\n * Set this to the number of toasts that can be visible within the snackbar at\n * the same time. Any toasts added after this value will be added into the\n * queue to be shown.\n *\n * @defaultValue `1`\n */\n limit?: number;\n\n /**\n * @defaultValue `\"bottom\"`\n */\n position?: SnackbarPosition;\n\n /**\n * @defaultValue `false`\n */\n disablePortal?: boolean;\n\n /**\n * This can be used to create a custom toast implementation.\n *\n * @example\n * ```ts\n * import type { ToastRendererProps } from \"@react-md/core\";\n * import {\n * Snackbar,\n * Toast,\n * ToastContent,\n * useToastManager,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function CustomToast(props: CustomToastRendererProps): ReactElement {\n * // Pretend like we don't need anything else from the toast since the\n * // custom behavior is related to the `toastId`\n * const { toastId, visible, duplicates, visibleTime } = props;\n *\n * const toastManager = useToastManager();\n *\n * // Note: If you want to rely on the `action` and `closeButton` behavior,\n * // you must also wrap the `Toast` with:\n * // <RemoveToastProvider value={() => toastManager.removeToast(toastId, true)}>\n *\n * return (\n * <Toast\n * theme={isError(toastId) ? \"error\" : \"surface\"}\n * visible={visible}\n * onEntered={() => {\n * toastManager.startRemoveTimeout(toastId);\n * }}\n * onExited={() => {\n * toastManager.removeToast(toastId, false)\n * }}\n * disableContentWrapper\n * >\n * <ToastContent>\n * <TranslateMessage id={toastId} />\n * </ToastContent>\n * {isActionable(toastId) && (\n * <Button\n * onClick={async () => {\n * await someApiCall();\n * toastManager.removeToast(toastId, true);\n * }}\n * >\n * Dismiss\n * </Button>\n * )}\n * </Toast>\n * );\n * }\n *\n * function Example(): ReactElement {\n * return <Snackbar renderToast={CustomToast} />\n * }\n * ```\n *\n * @see {@link DefaultToastRenderer}\n * @defaultValue `DefaultToastRenderer`\n */\n renderToast?: ComponentType<ToastRendererProps>;\n\n /**\n * Optional props that should be passed to each `Toast` from the `Snackbar`.\n * This is a great way to enforce each toast having a close button, a custom\n * class name, theme, etc.\n *\n * @see {@link DefaultToastRenderer}\n */\n toastDefaults?: ConfigurableToastProps;\n}\n\n/**\n * **Client Component**\n *\n * @example\n * Super SImple Example\n * ```tsx\n * import { Button, Snackbar, addToast } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <>\n * <Button\n * onClick={() => {\n * addToast({ children: \"A new toast!\" });\n * }}\n * >\n * Toast!\n * </Button>\n * <Snackbar />\n * </>\n * );\n * }\n * ```\n *\n * @see {@link SnackbarProps.renderToast} for creating a custom toast\n * implementation.\n * @remarks \\@since 6.0.0 Rewritten to use a new API that supports adding toasts\n * outside of React components and rendering multiple toasts at once.\n */\nexport const Snackbar = forwardRef<HTMLDivElement, SnackbarProps>(\n function Snackbar(props, ref) {\n const {\n id: propId,\n className,\n limit = 1,\n position = \"bottom\",\n renderToast: RenderToast = DefaultToastRenderer,\n disablePortal,\n toastDefaults,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"snackbar\");\n const queue = useToastQueue(limit);\n\n return (\n <Portal disabled={disablePortal}>\n {queue.length > 0 && (\n <div\n {...remaining}\n id={id}\n ref={ref}\n className={snackbar({ position, className })}\n >\n {queue.map((toast) => (\n <RenderToast\n {...toast}\n key={toast.toastId}\n toastDefaults={toastDefaults}\n />\n ))}\n </div>\n )}\n </Portal>\n );\n }\n);\n"],"names":["forwardRef","Portal","useEnsuredId","DefaultToastRenderer","useToastQueue","snackbar","Snackbar","props","ref","id","propId","className","limit","position","renderToast","RenderToast","disablePortal","toastDefaults","remaining","queue","disabled","length","div","map","toast","key","toastId"],"mappings":"AAAA;;;AACA,SAASA,UAAU,QAAiD,QAAQ;AAC5E,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SACEC,oBAAoB,QAEf,4BAA4B;AAEnC,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,QAAQ,QAA+B,sBAAsB;AAwGtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BC,GACD,OAAO,MAAMC,yBAAWN,WACtB,SAASM,SAASC,KAAK,EAAEC,GAAG;IAC1B,MAAM,EACJC,IAAIC,MAAM,EACVC,SAAS,EACTC,QAAQ,CAAC,EACTC,WAAW,QAAQ,EACnBC,aAAaC,cAAcZ,oBAAoB,EAC/Ca,aAAa,EACbC,aAAa,EACb,GAAGC,WACJ,GAAGX;IACJ,MAAME,KAAKP,aAAaQ,QAAQ;IAChC,MAAMS,QAAQf,cAAcQ;IAE5B,qBACE,KAACX;QAAOmB,UAAUJ;kBACfG,MAAME,MAAM,GAAG,mBACd,KAACC;YACE,GAAGJ,SAAS;YACbT,IAAIA;YACJD,KAAKA;YACLG,WAAWN,SAAS;gBAAEQ;gBAAUF;YAAU;sBAEzCQ,MAAMI,GAAG,CAAC,CAACC,sBACV,eAACT;oBACE,GAAGS,KAAK;oBACTC,KAAKD,MAAME,OAAO;oBAClBT,eAAeA;;;;AAO7B,GACA"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/snackbar/Toast.tsx"],"sourcesContent":["\"use client\";\nimport {\n forwardRef,\n isValidElement,\n type AriaRole,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n} from \"react\";\nimport { type ButtonProps } from \"../button/Button.js\";\nimport { type BackgroundColor } from \"../cssUtils.js\";\nimport {\n type CSSTransitionClassNames,\n type TransitionCallbacks,\n type TransitionTimeout,\n} from \"../transition/types.js\";\nimport { useScaleTransition } from \"../transition/useScaleTransition.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { ToastActionButton } from \"./ToastActionButton.js\";\nimport { ToastCloseButton } from \"./ToastCloseButton.js\";\nimport { ToastContent, type ToastContentProps } from \"./ToastContent.js\";\nimport { toast } from \"./toastStyles.js\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface ConfigurableToastProps\n extends HTMLAttributes<HTMLDivElement>,\n TransitionCallbacks {\n /**\n * Note: this default value will only be generated in the `Toast` component.\n *\n * @defaultValue `\"toast-\" + useId()`\n */\n id?: string;\n\n /**\n * Note: This is set while creating the toast.\n *\n * @defaultValue `visibleTime === null ? \"alert\" : \"status\"`\n */\n role?: AriaRole;\n\n /**\n * @defaultValue `\"surface\"`\n */\n theme?: BackgroundColor;\n\n /**\n * Set this to `true` to stack the content above the {@link action}. It is not\n * recommended to enable this prop if the {@link closeButton} is enabled.\n *\n * @defaultValue `false`\n */\n stacked?: boolean;\n\n /**\n * If this is not provided, a `ResizeObserver` will be used to determine if\n * there are multiple lines of content.\n */\n multiline?: boolean;\n\n /**\n * When this is a string or React element, it will be rendered as the\n * `children` within a `Button`\n */\n action?: ButtonProps | ReactElement | string;\n\n /**\n * This can be used to replace the custom action button behavior.\n */\n actionButton?: ReactNode;\n\n /**\n * @defaultValue `getIcon(\"close\")`\n */\n closeIcon?: ReactNode;\n\n /**\n * Set this to `true` if a close button should be rendered to the right of the\n * `children`.\n *\n * @defaultValue `!!closeButtonProps`\n */\n closeButton?: boolean;\n\n /**\n * Use this prop to override most of the close button behavior. The\n */\n closeButtonProps?: ButtonProps;\n\n /**\n * Any additional props that should be provided to the `<div>` that surrounds\n * the toast `children`.\n */\n contentProps?: PropsWithRef<ToastContentProps, HTMLDivElement>;\n\n /**\n * Set this to `true` if the `children` for the toast should no longer be\n * wrapped in an additional `<div>` that applies some toast layout styles.\n * This should normally only be used for custom `Toast` implementations.\n *\n * @see the `Snackbar`'s `renderToast` prop for an example.\n */\n disableToastContent?: boolean;\n\n /**\n * The toast's transition timeout for entering and exiting. This is **not**\n * how long the toast should remain visible.\n *\n * @defaultValue `SCALE_TIMEOUT`\n */\n timeout?: TransitionTimeout;\n\n /**\n * The toast's transition class names for entering and exiting.\n *\n * @defaultValue `SCALE_CLASSNAMES`\n */\n classNames?: CSSTransitionClassNames;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface ToastProps extends ConfigurableToastProps {\n paused?: boolean;\n visible: boolean;\n}\n\n/**\n * **Client Component**\n *\n * This component is just used for toast styling and does not implement any of\n * the visibility behavior.\n *\n * @remarks \\@since 6.0.0\n */\nexport const Toast = forwardRef<HTMLDivElement, ToastProps>(\n function Toast(props, ref) {\n const {\n id: propId,\n className,\n timeout,\n classNames,\n theme = \"surface\",\n action: propAction,\n actionButton: propActionButton,\n paused,\n visible,\n closeIcon: propCloseIcon,\n closeButtonProps,\n closeButton = !!closeButtonProps,\n contentProps,\n disableToastContent,\n stacked,\n multiline,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExiting,\n onExited,\n children,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"toast\");\n\n let actionButton = propActionButton;\n if (propAction) {\n let overrides: ButtonProps = {};\n let buttonChildren: ReactNode;\n // have to use `any` to correctly filter out all react elements\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isValidElement<any>(propAction) || typeof propAction !== \"object\") {\n buttonChildren = propAction;\n } else {\n ({ children: buttonChildren, ...overrides } = propAction);\n }\n\n actionButton = (\n <ToastActionButton\n theme={theme === \"surface\" ? \"secondary\" : \"clear\"}\n reordered={stacked && closeButton}\n {...overrides}\n >\n {buttonChildren}\n </ToastActionButton>\n );\n }\n\n let closeIcon = propCloseIcon;\n if (typeof closeButtonProps?.children !== \"undefined\") {\n closeIcon = closeButtonProps.children;\n }\n\n const action = !!actionButton;\n const reordered = stacked && action && closeButton;\n const { elementProps, rendered } = useScaleTransition({\n appear: true,\n nodeRef: ref,\n className: toast({\n className,\n theme,\n action,\n paused,\n stacked,\n reordered,\n closeButton,\n }),\n timeout,\n classNames,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExiting,\n onExited,\n temporary: true,\n transitionIn: visible,\n exitedHidden: true,\n });\n\n // this might get rid of the weird popping-back-in for a split second\n // that sometimes happens on mobile firefox\n if (!rendered) {\n return null;\n }\n\n return (\n <div {...remaining} {...elementProps} id={id}>\n <ToastContent\n action={action}\n stacked={stacked}\n multiline={multiline}\n closeButton={closeButton}\n disableWrapper={disableToastContent}\n {...contentProps}\n >\n {children}\n </ToastContent>\n {actionButton}\n {closeButton && (\n <ToastCloseButton reordered={reordered} {...closeButtonProps}>\n {closeIcon}\n </ToastCloseButton>\n )}\n </div>\n );\n }\n);\n"],"names":["forwardRef","isValidElement","useScaleTransition","useEnsuredId","ToastActionButton","ToastCloseButton","ToastContent","toast","Toast","props","ref","id","propId","className","timeout","classNames","theme","action","propAction","actionButton","propActionButton","paused","visible","closeIcon","propCloseIcon","closeButtonProps","closeButton","contentProps","disableToastContent","stacked","multiline","onEnter","onEntering","onEntered","onExit","onExiting","onExited","children","remaining","overrides","buttonChildren","reordered","elementProps","rendered","appear","nodeRef","temporary","transitionIn","exitedHidden","div","disableWrapper"],"mappings":"AAAA;;AACA,SACEA,UAAU,EACVC,cAAc,QAKT,QAAQ;AAQf,SAASC,kBAAkB,QAAQ,sCAAsC;AAEzE,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,iBAAiB,QAAQ,yBAAyB;AAC3D,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SAASC,YAAY,QAAgC,oBAAoB;AACzE,SAASC,KAAK,QAAQ,mBAAmB;AA6GzC;;;;;;;CAOC,GACD,OAAO,MAAMC,sBAAQR,WACnB,SAASQ,MAAMC,KAAK,EAAEC,GAAG;IACvB,MAAM,EACJC,IAAIC,MAAM,EACVC,SAAS,EACTC,OAAO,EACPC,UAAU,EACVC,QAAQ,SAAS,EACjBC,QAAQC,UAAU,EAClBC,cAAcC,gBAAgB,EAC9BC,MAAM,EACNC,OAAO,EACPC,WAAWC,aAAa,EACxBC,gBAAgB,EAChBC,cAAc,CAAC,CAACD,gBAAgB,EAChCE,YAAY,EACZC,mBAAmB,EACnBC,OAAO,EACPC,SAAS,EACTC,OAAO,EACPC,UAAU,EACVC,SAAS,EACTC,MAAM,EACNC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACR,GAAGC,WACJ,GAAG7B;IACJ,MAAME,KAAKR,aAAaS,QAAQ;IAEhC,IAAIO,eAAeC;IACnB,IAAIF,YAAY;QACd,IAAIqB,YAAyB,CAAC;QAC9B,IAAIC;QACJ,+DAA+D;QAC/D,8DAA8D;QAC9D,kBAAIvC,eAAoBiB,eAAe,OAAOA,eAAe,UAAU;YACrEsB,iBAAiBtB;QACnB,OAAO;YACJ,CAAA,EAAEmB,UAAUG,cAAc,EAAE,GAAGD,WAAW,GAAGrB,UAAS;QACzD;QAEAC,6BACE,KAACf;YACCY,OAAOA,UAAU,YAAY,cAAc;YAC3CyB,WAAWZ,WAAWH;YACrB,GAAGa,SAAS;sBAEZC;;IAGP;IAEA,IAAIjB,YAAYC;IAChB,IAAI,OAAOC,kBAAkBY,aAAa,aAAa;QACrDd,YAAYE,iBAAiBY,QAAQ;IACvC;IAEA,MAAMpB,SAAS,CAAC,CAACE;IACjB,MAAMsB,YAAYZ,WAAWZ,UAAUS;IACvC,MAAM,EAAEgB,YAAY,EAAEC,QAAQ,EAAE,GAAGzC,mBAAmB;QACpD0C,QAAQ;QACRC,SAASnC;QACTG,WAAWN,MAAM;YACfM;YACAG;YACAC;YACAI;YACAQ;YACAY;YACAf;QACF;QACAZ;QACAC;QACAgB;QACAC;QACAC;QACAC;QACAC;QACAC;QACAU,WAAW;QACXC,cAAczB;QACd0B,cAAc;IAChB;IAEA,qEAAqE;IACrE,2CAA2C;IAC3C,IAAI,CAACL,UAAU;QACb,OAAO;IACT;IAEA,qBACE,MAACM;QAAK,GAAGX,SAAS;QAAG,GAAGI,YAAY;QAAE/B,IAAIA;;0BACxC,KAACL;gBACCW,QAAQA;gBACRY,SAASA;gBACTC,WAAWA;gBACXJ,aAAaA;gBACbwB,gBAAgBtB;gBACf,GAAGD,YAAY;0BAEfU;;YAEFlB;YACAO,6BACC,KAACrB;gBAAiBoC,WAAWA;gBAAY,GAAGhB,gBAAgB;0BACzDF;;;;AAKX,GACA"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/snackbar/ToastActionButton.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef } from \"react\";\nimport { Button, type ButtonProps } from \"../button/Button.js\";\nimport { type ButtonTheme } from \"../button/buttonStyles.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { useCurrentToastActions } from \"./useCurrentToastActions.js\";\n\nconst styles = bem(\"rmd-toast-action\");\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface ToastActionButtonProps extends ButtonProps {\n /** @defaultValue `\"secondary\"` */\n theme?: ButtonTheme;\n\n /**\n * Set this to `true` when there is a close button visible and the content is\n * stacked. This will update the styles so the button renders in the bottom\n * right below the content and close button.\n *\n * @defaultValue `false`\n */\n reordered?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * This button will automatically close the toast when clicked unless\n * `event.stopPropagation()` is called from the `onClick` prop.\n *\n * @remarks \\@since 6.0.0\n */\nexport const ToastActionButton = forwardRef<\n HTMLButtonElement,\n ToastActionButtonProps\n>(function ToastActionButton(props, ref) {\n const {\n className,\n children,\n theme = \"secondary\",\n onClick = noop,\n reordered,\n ...remaining\n } = props;\n const { removeToast } = useCurrentToastActions();\n\n return (\n <Button\n {...remaining}\n ref={ref}\n onClick={(event) => {\n onClick(event);\n if (event.isPropagationStopped()) {\n return;\n }\n\n removeToast(true);\n }}\n theme={theme}\n className={cnb(styles({ reordered }), className)}\n >\n {children}\n </Button>\n );\n});\n"],"names":["cnb","forwardRef","Button","bem","useCurrentToastActions","styles","noop","ToastActionButton","props","ref","className","children","theme","onClick","reordered","remaining","removeToast","event","isPropagationStopped"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAQ,QAAQ;AACnC,SAASC,MAAM,QAA0B,sBAAsB;AAE/D,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SAASC,sBAAsB,QAAQ,8BAA8B;AAErE,MAAMC,SAASF,IAAI;AACnB,MAAMG,OAAO;AACX,aAAa;AACf;AAmBA;;;;;;;CAOC,GACD,OAAO,MAAMC,kCAAoBN,WAG/B,SAASM,kBAAkBC,KAAK,EAAEC,GAAG;IACrC,MAAM,EACJC,SAAS,EACTC,QAAQ,EACRC,QAAQ,WAAW,EACnBC,UAAUP,IAAI,EACdQ,SAAS,EACT,GAAGC,WACJ,GAAGP;IACJ,MAAM,EAAEQ,WAAW,EAAE,GAAGZ;IAExB,qBACE,KAACF;QACE,GAAGa,SAAS;QACbN,KAAKA;QACLI,SAAS,CAACI;YACRJ,QAAQI;YACR,IAAIA,MAAMC,oBAAoB,IAAI;gBAChC;YACF;YAEAF,YAAY;QACd;QACAJ,OAAOA;QACPF,WAAWV,IAAIK,OAAO;YAAES;QAAU,IAAIJ;kBAErCC;;AAGP,GAAG"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/snackbar/ToastCloseButton.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef } from \"react\";\nimport { Button, type ButtonProps } from \"../button/Button.js\";\nimport { type ButtonType } from \"../button/buttonStyles.js\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { useCurrentToastActions } from \"./useCurrentToastActions.js\";\n\nconst styles = bem(\"rmd-toast-x\");\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface ToastCloseButtonProps extends ButtonProps {\n /**\n * Note: This default value will only be used if the {@link buttonType} is not\n * `\"text\"` and an `aria-labelledby` is not provided.\n *\n * @defaultValue `\"Close\"`\n */\n \"aria-label\"?: string;\n\n /** @defaultValue `\"icon-square\"` */\n buttonType?: ButtonType;\n\n /**\n * Set this to `true` when there is a close button visible and the content is\n * stacked. This will update the styles so the button renders next to the\n * content and above the action button.\n *\n * @defaultValue `false`\n */\n reordered?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * This button will automatically close the toast when clicked unless\n * `event.stopPropagation()` is called from the `onClick` prop.\n *\n * @remarks \\@since 6.0.0\n */\nexport const ToastCloseButton = forwardRef<\n HTMLButtonElement,\n ToastCloseButtonProps\n>(function ToastCloseButton(props, ref) {\n const {\n buttonType = \"icon-square\",\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel = buttonType !== \"text\" && !ariaLabelledBy\n ? \"Close\"\n : undefined,\n children: propChildren,\n className,\n onClick = noop,\n reordered,\n ...remaining\n } = props;\n\n const children = getIcon(\"close\", propChildren);\n const { removeToast } = useCurrentToastActions();\n\n return (\n <Button\n {...remaining}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n ref={ref}\n onClick={(event) => {\n onClick(event);\n if (event.isPropagationStopped()) {\n return;\n }\n\n removeToast(true);\n }}\n className={cnb(styles({ reordered }), className)}\n buttonType={buttonType}\n >\n {children}\n </Button>\n );\n});\n"],"names":["cnb","forwardRef","Button","getIcon","bem","useCurrentToastActions","styles","noop","ToastCloseButton","props","ref","buttonType","ariaLabelledBy","ariaLabel","undefined","children","propChildren","className","onClick","reordered","remaining","removeToast","aria-label","aria-labelledby","event","isPropagationStopped"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAQ,QAAQ;AACnC,SAASC,MAAM,QAA0B,sBAAsB;AAE/D,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SAASC,sBAAsB,QAAQ,8BAA8B;AAErE,MAAMC,SAASF,IAAI;AACnB,MAAMG,OAAO;AACX,aAAa;AACf;AA2BA;;;;;;;CAOC,GACD,OAAO,MAAMC,iCAAmBP,WAG9B,SAASO,iBAAiBC,KAAK,EAAEC,GAAG;IACpC,MAAM,EACJC,aAAa,aAAa,EAC1B,mBAAmBC,cAAc,EACjC,cAAcC,YAAYF,eAAe,UAAU,CAACC,iBAChD,UACAE,SAAS,EACbC,UAAUC,YAAY,EACtBC,SAAS,EACTC,UAAUX,IAAI,EACdY,SAAS,EACT,GAAGC,WACJ,GAAGX;IAEJ,MAAMM,WAAWZ,QAAQ,SAASa;IAClC,MAAM,EAAEK,WAAW,EAAE,GAAGhB;IAExB,qBACE,KAACH;QACE,GAAGkB,SAAS;QACbE,cAAYT;QACZU,mBAAiBX;QACjBF,KAAKA;QACLQ,SAAS,CAACM;YACRN,QAAQM;YACR,IAAIA,MAAMC,oBAAoB,IAAI;gBAChC;YACF;YAEAJ,YAAY;QACd;QACAJ,WAAWjB,IAAIM,OAAO;YAAEa;QAAU,IAAIF;QACtCN,YAAYA;kBAEXI;;AAGP,GAAG"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/snackbar/ToastContent.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, useCallback, useState, type HTMLAttributes } from \"react\";\nimport { useResizeObserver } from \"../useResizeObserver.js\";\nimport { toastContent } from \"./toastContentStyles.js\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface ToastContentProps extends HTMLAttributes<HTMLDivElement> {\n /** @defaultValue `false` */\n action?: boolean;\n\n /** @defaultValue `false` */\n stacked?: boolean;\n\n /**\n * Set this to `true` if you know that the {@link children} span multiple\n * lines. When this is omitted, a `ResizeObserver` will be used to\n * automatically detect multiline content.\n */\n multiline?: boolean;\n\n /** @defaultValue `false` */\n closeButton?: boolean;\n\n /**\n * Set this to `true` if you do not want to wrap the `children` in a `<div>`\n * that applies some toast layout styles. This should really only be used for\n * custom `Toast` implementations.\n *\n * @internal\n * @defaultValue `false`\n */\n disableWrapper?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * @remarks \\@since 6.0.0\n */\nexport const ToastContent = forwardRef<HTMLDivElement, ToastContentProps>(\n function ToastContent(props, ref) {\n const {\n className,\n children,\n action,\n stacked,\n multiline: propMultiline,\n closeButton,\n disableWrapper,\n ...remaining\n } = props;\n\n const [isMultiline, setMultiline] = useState(false);\n const nodeRef = useResizeObserver({\n ref,\n disabled: disableWrapper || typeof propMultiline === \"boolean\",\n disableWidth: true,\n onUpdate: useCallback((entry) => {\n const element = entry.target;\n const style = window.getComputedStyle(element);\n const lineHeight = parseFloat(style.lineHeight);\n if (Number.isNaN(lineHeight)) {\n return;\n }\n\n setMultiline(element.scrollHeight > lineHeight);\n }, []),\n });\n const multiline = propMultiline ?? isMultiline;\n\n if (disableWrapper) {\n return <>{children}</>;\n }\n\n return (\n <div\n {...remaining}\n ref={nodeRef}\n className={toastContent({\n action,\n stacked,\n multiline,\n closeButton,\n className,\n })}\n >\n {children}\n </div>\n );\n }\n);\n"],"names":["forwardRef","useCallback","useState","useResizeObserver","toastContent","ToastContent","props","ref","className","children","action","stacked","multiline","propMultiline","closeButton","disableWrapper","remaining","isMultiline","setMultiline","nodeRef","disabled","disableWidth","onUpdate","entry","element","target","style","window","getComputedStyle","lineHeight","parseFloat","Number","isNaN","scrollHeight","div"],"mappings":"AAAA;;AACA,SAASA,UAAU,EAAEC,WAAW,EAAEC,QAAQ,QAA6B,QAAQ;AAC/E,SAASC,iBAAiB,QAAQ,0BAA0B;AAC5D,SAASC,YAAY,QAAQ,0BAA0B;AAiCvD;;;;CAIC,GACD,OAAO,MAAMC,6BAAeL,WAC1B,SAASK,aAAaC,KAAK,EAAEC,GAAG;IAC9B,MAAM,EACJC,SAAS,EACTC,QAAQ,EACRC,MAAM,EACNC,OAAO,EACPC,WAAWC,aAAa,EACxBC,WAAW,EACXC,cAAc,EACd,GAAGC,WACJ,GAAGV;IAEJ,MAAM,CAACW,aAAaC,aAAa,GAAGhB,SAAS;IAC7C,MAAMiB,UAAUhB,kBAAkB;QAChCI;QACAa,UAAUL,kBAAkB,OAAOF,kBAAkB;QACrDQ,cAAc;QACdC,UAAUrB,YAAY,CAACsB;YACrB,MAAMC,UAAUD,MAAME,MAAM;YAC5B,MAAMC,QAAQC,OAAOC,gBAAgB,CAACJ;YACtC,MAAMK,aAAaC,WAAWJ,MAAMG,UAAU;YAC9C,IAAIE,OAAOC,KAAK,CAACH,aAAa;gBAC5B;YACF;YAEAX,aAAaM,QAAQS,YAAY,GAAGJ;QACtC,GAAG,EAAE;IACP;IACA,MAAMjB,YAAYC,iBAAiBI;IAEnC,IAAIF,gBAAgB;QAClB,qBAAO;sBAAGN;;IACZ;IAEA,qBACE,KAACyB;QACE,GAAGlB,SAAS;QACbT,KAAKY;QACLX,WAAWJ,aAAa;YACtBM;YACAC;YACAC;YACAE;YACAN;QACF;kBAECC;;AAGP,GACA"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/snackbar/ToastManager.tsx"],"sourcesContent":["import { nanoid } from \"nanoid\";\nimport { type ConfigurableToastProps } from \"./Toast.js\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport const DEFAULT_TOAST_VISIBLE_TIME = 5000;\n\n/**\n * - `\"normal\"` - the toast will be added to the end of the queue\n * - `\"next\"` - the toast will be inserted next-in-line in the queue, waiting\n * for the current visible toast to exit before being shown. If the toast does\n * not support duplicates, the existing toast will be moved instead and merged\n * with the toast.\n * - `\"replace\"` - if there is a currently visible toast, it will start the\n * leave transition and display the newly added toast instead.\n * - `\"immediate\"` - the same behavior as `\"replace\"` except that if there was a\n * currently visible toast, the toast will be shown again once the `\"immediate\"`\n * toast is hidden.\n *\n * @remarks \\@since 6.0.0 Renamed from `MessagePriority` to `ToastPriority`\n */\nexport type ToastPriority = \"normal\" | \"next\" | \"replace\" | \"immediate\";\n\n/**\n * - `\"allow\"` - toasts with the same `toastId` can be added into the queue, but\n * the leave timeout behavior might not work if multiple toasts can be shown\n * at the same time.\n * - `\"restart\"` - (default) toasts that have the same `toastId` as a toast\n * being shown will restart the exit timeout and update the toast with any\n * differences in the toast. If the toast is not currently being shown, a new\n * toast will not be added.\n * - `\"update\"` - toasts that have the same `toastId` will just update the toast\n * with the latest content while maintaining any existing timeouts\n *\n * @remarks \\@since 6.0.0 Renamed from `DuplicateBehavior`\n */\nexport type ToastDuplicateBehavior = \"allow\" | \"restart\" | \"update\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface ToastMeta {\n /**\n * This will be `true` if the exit timeout has been paused either by hovering\n * the toast or the page has become inactive through blur or minimizing.\n */\n paused: boolean;\n\n /**\n * This will be `true` when the toast should be visible and `false` during the\n * exit animation.\n */\n visible: boolean;\n\n /**\n * The current toast's id which can be used with the:\n * - {@link ToastManager.removeToast}\n * - {@link ToastManager.startRemoveTimeout}\n * - {@link ToastManager.pauseRemoveTimeout}\n * - {@link ToastManager.resumeRemoveTimeout}\n */\n toastId: string;\n priority: ToastPriority;\n duplicates: ToastDuplicateBehavior;\n visibleTime: number | null;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface CreateToastOptions extends ConfigurableToastProps {\n /**\n * @defaultValue `nanoid()`\n */\n toastId?: string;\n\n /**\n * @see {@link ToastDuplicateBehavior}\n * @defaultValue `\"restart\"`\n */\n duplicates?: ToastDuplicateBehavior;\n\n /**\n * @see {@link ToastPriority}\n * @defaultValue `\"normal\"`\n */\n priority?: ToastPriority;\n\n /**\n * Set this to `null` to prevent the toast from automatically hiding,\n * otherwise set this to the number of milliseconds to remain visible.\n *\n * @see {@link DEFAULT_TOAST_VISIBLE_TIME}\n * @defaultValue `DEFAULT_TOAST_VISIBLE_TIME`\n */\n visibleTime?: number | null;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface QueuedToast extends ConfigurableToastProps, ToastMeta {}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type ToastQueue = readonly Readonly<QueuedToast>[];\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type ToastCallback = (queue: ToastQueue) => void;\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport interface ToastVisibilityTimers {\n inactive: boolean;\n startTime: number;\n elapsedTime: number;\n exitTimeout?: number;\n}\n\n/**\n * @see {@link ToastManagerProvider}\n *\n * @remarks \\@since 6.0.0\n */\nexport class ToastManager {\n #queue: QueuedToast[];\n #timers: Map<string, ToastVisibilityTimers>;\n #listeners: ToastCallback[];\n\n constructor() {\n this.#queue = [];\n this.#timers = new Map();\n this.#listeners = [];\n\n // All of the class methods must be arrow functions to preserve the correct\n // `this` value. If they aren't arrow functions, I'd have to wrap each call\n // in an arrow function to work.\n //\n // i.e.\n // useSyncExternalStore(\n // (cb) => manager.subscribe(cb),\n // () => manager.getQueue(),\n // () => manager.getQueue(),\n // );\n }\n\n #emit = (): void => {\n // shallow clone to ensure react updates\n this.#queue = [...this.#queue];\n this.#listeners.forEach((callback) => {\n callback(this.#queue);\n });\n };\n\n #getToastIndex = (toastId: string | undefined): number => {\n if (!toastId) {\n return -1;\n }\n\n return this.#queue.findIndex((toast) => toast.toastId === toastId);\n };\n\n #getToast = (toastId: string | undefined): QueuedToast | undefined => {\n return this.#queue[this.#getToastIndex(toastId)];\n };\n\n /**\n * Starts the exit transition for the currently shown toast and adds the next\n * toast into the queue. This requires a manual call to `this.#emit()`\n * afterwards.\n */\n #addToastImmediately = (nextToast: QueuedToast): void => {\n const [current] = this.#queue;\n this.clearTimer(current.toastId);\n this.#queue[0] = {\n ...current,\n visible: false,\n };\n if (nextToast.priority === \"immediate\") {\n this.#queue.splice(1, 0, nextToast, current);\n } else {\n this.#queue.splice(1, 0, nextToast);\n }\n };\n\n /**\n * This calls `this.#emit()` if the toast was updated\n */\n #updateToast = (\n toastIdOrIndex: string | number,\n patch: Partial<QueuedToast>\n ): void => {\n const index =\n typeof toastIdOrIndex === \"number\"\n ? toastIdOrIndex\n : this.#getToastIndex(toastIdOrIndex);\n\n if (index === -1) {\n return;\n }\n\n this.#queue[index] = {\n ...this.#queue[index],\n ...patch,\n };\n this.#emit();\n };\n\n /**\n * This is just used to subscribe to changes in the {@link useToastQueue}.\n *\n * ```tsx\n * useSyncExternalStore(\n * toastManager.subscribe,\n * toastManager.getQueue,\n * toastManager.getQueue,\n * );\n * ```\n *\n * @internal\n */\n subscribe = (callback: ToastCallback): (() => void) => {\n this.#listeners.push(callback);\n\n return () => {\n this.#listeners = this.#listeners.filter((cb) => cb !== callback);\n };\n };\n\n /**\n * @see {@link subscribe}\n * @internal\n */\n getQueue = (): ToastQueue => {\n return this.#queue;\n };\n\n /**\n * Either adds the toast to the queue or updates an existing toast when using\n * an existing `toastId`.\n *\n * @example\n * Adding toasts\n * ```tsx\n * // create a toast when the user is offline that will not disappear\n * addToast({ toastId: \"offline\", visibleTime: null });\n *\n * // add a new toast that displays `\"Toast\"` to the queue\n * addToast({ children: \"Toast!\" });\n *\n * // add an online toast notification. since these three use the same toast\n * // id, the hide timer will be reset each time\n * addToast({ toastId: \"online\" });\n * addToast({ toastId: \"online\" });\n * addToast({ toastId: \"online\" });\n *\n * // add a server error toast to the queue where the second one will be\n * // ignored\n * addToast({\n * toastId: \"ServerError\",\n * theme: \"error\",\n * duplicates: \"prevent\",\n * });\n * addToast({\n * toastId: \"ServerError\",\n * theme: \"error\",\n * duplicates: \"prevent\",\n * });\n *\n * // add a toast to the queue that has an action button that says \"Goodbye\"\n * addToast({\n * children: \"Hello, world!\",\n * action: \"Goodbye\",\n * });\n *\n * // add a toast to the queue that has an action button that says \"Goodbye\"\n * // and a custom click handler\n * addToast({\n * children: \"Hello, world!\",\n * action: {\n * onClick: () => {\n * logout();\n * },\n * children: \"Goodbye\",\n * },\n * });\n *\n * // add a toast to the queue that renders a react component in the content,\n * // a custom action button implementation (using `ToastActionButton`), and a\n * // close button\n * addToast({\n * children: <SomeCustomComponent />,\n * actionButton: <SomeCustomActionButton />,\n * closeButton: true,\n * });\n * ```\n */\n addToast = (toast: CreateToastOptions): void => {\n const {\n toastId = nanoid(),\n visibleTime = DEFAULT_TOAST_VISIBLE_TIME,\n role = visibleTime === null ? \"alert\" : \"status\",\n priority = \"normal\",\n duplicates = \"restart\",\n } = toast;\n\n const existingIndex = this.#getToastIndex(toast.toastId);\n if (existingIndex !== -1 && duplicates !== \"allow\") {\n const existingToast = this.#queue[existingIndex];\n\n // reorder/move the existing toast to be the next item in the queue by:\n // - removing the toast from the queue\n // - inserting it into the next position with the updates\n if (priority === \"next\" && existingIndex > 1) {\n this.#queue.splice(existingIndex, 1);\n this.#queue.splice(1, 0, { ...existingToast, ...toast });\n this.#emit();\n return;\n }\n\n // only need to reorder the queue if it is not being shown\n if (\n (priority === \"replace\" || priority === \"immediate\") &&\n existingIndex !== 0\n ) {\n this.#queue.splice(existingIndex, 1);\n this.#addToastImmediately({\n ...existingToast,\n ...toast,\n });\n this.#emit();\n return;\n }\n\n const timers = this.#timers.get(toastId);\n if (existingToast.visible && duplicates === \"restart\" && timers) {\n this.#timers.set(toastId, { ...timers, elapsedTime: 0 });\n this.startRemoveTimeout(toastId);\n }\n\n this.#updateToast(existingIndex, toast);\n return;\n }\n\n const nextToast: QueuedToast = {\n ...toast,\n role,\n paused: false,\n visible: true,\n toastId,\n priority,\n duplicates,\n visibleTime,\n };\n\n const queueSize = this.#queue.length;\n if (priority === \"next\" && queueSize > 1) {\n this.#queue.splice(1, 0, nextToast);\n } else if (\n (priority === \"replace\" || priority === \"immediate\") &&\n queueSize > 0\n ) {\n this.#addToastImmediately(nextToast);\n } else {\n this.#queue.push(nextToast);\n }\n\n this.#emit();\n };\n\n /**\n * Attempts to start the timeout for removing the toast when the `visibleTime`\n * is not null for a toast.\n *\n * @param toastId - The specific toastId to update\n */\n startRemoveTimeout = (toastId: string): void => {\n const toast = this.#getToast(toastId);\n if (!toast) {\n return;\n }\n\n const { visibleTime } = toast;\n if (visibleTime === null) {\n // Must manually be closed\n return;\n }\n\n const cached = this.#timers.get(toastId);\n const timers = (cached && { ...cached }) || {\n inactive: false,\n startTime: Date.now(),\n elapsedTime: 0,\n };\n window.clearTimeout(timers.exitTimeout);\n\n let duration = visibleTime;\n if (timers.elapsedTime) {\n duration -= timers.elapsedTime;\n }\n\n timers.inactive = false;\n timers.exitTimeout = window.setTimeout(() => {\n this.removeToast(toastId, true);\n }, duration);\n this.#timers.set(toastId, timers);\n };\n\n /**\n * Pauses the remove timeout for a specific toast normally with hover events\n * or the browser becoming inactive.\n *\n * @param toastId - The specific toastId to pause\n */\n pauseRemoveTimeout = (toastId: string): void => {\n const toast = this.#getToast(toastId);\n const cached = this.#timers.get(toastId);\n if (!toast || !cached || cached.inactive) {\n return;\n }\n\n window.clearTimeout(cached.exitTimeout);\n const timers = { ...cached };\n timers.inactive = true;\n timers.elapsedTime = Date.now() - timers.startTime + timers.elapsedTime;\n this.#timers.set(toastId, timers);\n this.#updateToast(toastId, { paused: true });\n };\n\n /**\n * Resumes the current remove timeout if it was paused by\n * {@link pauseRemoveTimeout}.\n *\n * @param toastId - The specific toastId to resume\n */\n resumeRemoveTimeout = (toastId: string): void => {\n const toastIndex = this.#getToastIndex(toastId);\n const timers = this.#timers.get(toastId);\n if (toastIndex === -1 || !timers?.startTime) {\n return;\n }\n\n this.#updateToast(toastIndex, { paused: false });\n this.startRemoveTimeout(toastId);\n };\n\n /**\n * Removes a toast by id from the queue without any exit animation.\n *\n * @param toastId - The specific {@link QueuedToast.toastId}\n * @param transition - Set this to `true` to remove the toast by the exit\n * transition instead of immediately.\n */\n removeToast = (toastId: string, transition: boolean): void => {\n const toastIndex = this.#getToastIndex(toastId);\n if (toastIndex === -1) {\n return;\n }\n\n if (transition) {\n this.clearTimer(toastId);\n this.#updateToast(toastIndex, { visible: false });\n return;\n }\n\n this.#queue.splice(toastIndex, 1);\n this.#emit();\n };\n\n /**\n * Clears any pending timers for the provided toast id. This should generally\n * be used in the `useEffect` cleanup effect for any custom toast renderer\n * implementations.\n *\n * @example\n * ```tsx\n * const { toastId } = toast;\n * const toastManager = useToastManager();\n *\n * useEffect(() => {\n * return () => {\n * toastManager.clearTimer(toastId):\n * }\n * }, [toastManager, toastId]);\n * ```\n */\n clearTimer = (toastId: string): void => {\n const timer = this.#timers.get(toastId);\n window.clearTimeout(timer?.exitTimeout);\n this.#timers.delete(toastId);\n };\n\n /**\n * Removes first toast from the queue without any exit animation. You most\n * likely want to use {@link removeToast} instead.\n */\n popToast = (): void => {\n this.#queue.pop();\n this.#emit();\n };\n\n /**\n * Removes all toasts from the queue. There will be no exit animation.\n *\n * @param disableEmit - Set this to `true` to disable emitting the empty queue.\n * Mostly used for tests.\n */\n clearToasts = (disableEmit = false): void => {\n this.#queue = [];\n this.#timers.forEach((meta) => {\n window.clearTimeout(meta.exitTimeout);\n });\n this.#timers.clear();\n if (!disableEmit) {\n this.#emit();\n }\n };\n}\n\n/**\n * The default toast manager for react-md apps that will allow toasts to be\n * added without setting up the {@link ToastManagerProvider}.\n *\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport const toastManager = new ToastManager();\n\n/**\n * @see {@link ToastManager.addToast}\n * @remarks \\@since 6.0.0\n */\nexport const addToast: ToastManager[\"addToast\"] = (toast) =>\n toastManager.addToast(toast);\n\n/**\n * @see {@link ToastManager.startRemoveTimeout}\n * @remarks \\@since 6.0.0\n */\nexport const startRemoveToastTimeout: ToastManager[\"startRemoveTimeout\"] = (\n toastId\n) => toastManager.startRemoveTimeout(toastId);\n\n/**\n * @see {@link ToastManager.popToast}\n * @remarks \\@since 6.0.0\n */\nexport const popToast: ToastManager[\"popToast\"] = () => toastManager.popToast();\n\n/**\n * @see {@link ToastManager.removeToast}\n * @remarks \\@since 6.0.0\n */\nexport const removeToast: ToastManager[\"removeToast\"] = (toastId, transition) =>\n toastManager.removeToast(toastId, transition);\n\n/**\n * @see {@link ToastManager.clearToasts}\n * @remarks \\@since 6.0.0\n */\nexport const clearToasts = (): void => toastManager.clearToasts();\n"],"names":["nanoid","DEFAULT_TOAST_VISIBLE_TIME","ToastManager","constructor","queue","listeners","forEach","callback","toastId","findIndex","toast","getToastIndex","nextToast","current","clearTimer","visible","priority","splice","toastIdOrIndex","patch","index","emit","subscribe","push","filter","cb","getQueue","addToast","visibleTime","role","duplicates","existingIndex","existingToast","addToastImmediately","timers","get","set","elapsedTime","startRemoveTimeout","updateToast","paused","queueSize","length","getToast","cached","inactive","startTime","Date","now","window","clearTimeout","exitTimeout","duration","setTimeout","removeToast","pauseRemoveTimeout","resumeRemoveTimeout","toastIndex","transition","timer","delete","popToast","pop","clearToasts","disableEmit","meta","clear","Map","toastManager","startRemoveToastTimeout"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,MAAM,QAAQ,SAAS;AAGhC;;CAEC,GACD,OAAO,MAAMC,6BAA6B,KA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