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

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 (1134) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/.turbo/turbo-lint.log +3 -3
  3. package/.turbo/turbo-typecheck.log +1 -1
  4. package/CHANGELOG.md +6 -0
  5. package/coverage/clover.xml +529 -437
  6. package/coverage/coverage-final.json +3 -3
  7. package/coverage/lcov-report/ListItem.tsx.html +2 -2
  8. package/coverage/lcov-report/ListItemLink.tsx.html +616 -0
  9. package/coverage/lcov-report/getListItemHeight.ts.html +298 -0
  10. package/coverage/lcov-report/index.html +38 -23
  11. package/coverage/lcov.info +423 -317
  12. package/dist/_core.scss +1 -1
  13. package/dist/form/_form.scss +1 -1
  14. package/dist/list/getListItemHeight.d.ts +0 -1
  15. package/dist/list/types.d.ts +1 -1
  16. package/dist/menu/_menu.scss +0 -2
  17. package/dist/src/CoreProviders.js.map +1 -0
  18. package/dist/src/NoSsr.js.map +1 -0
  19. package/dist/src/SsrProvider.js.map +1 -0
  20. package/dist/src/app-bar/AppBar.js.map +1 -0
  21. package/dist/src/app-bar/AppBarTitle.js.map +1 -0
  22. package/dist/src/avatar/Avatar.js.map +1 -0
  23. package/dist/src/avatar/styles.js.map +1 -0
  24. package/dist/src/badge/Badge.js.map +1 -0
  25. package/dist/src/box/Box.js.map +1 -0
  26. package/dist/src/box/styles.js.map +1 -0
  27. package/dist/src/button/AsyncButton.js.map +1 -0
  28. package/dist/src/button/Button.js.map +1 -0
  29. package/dist/src/button/ButtonUnstyled.js.map +1 -0
  30. package/dist/src/button/FloatingActionButton.js.map +1 -0
  31. package/dist/src/button/TooltippedButton.js.map +1 -0
  32. package/dist/src/button/buttonStyles.js.map +1 -0
  33. package/dist/src/button/buttonUnstyledStyles.js.map +1 -0
  34. package/dist/src/card/Card.js.map +1 -0
  35. package/dist/src/card/CardContent.js.map +1 -0
  36. package/dist/src/card/CardFooter.js.map +1 -0
  37. package/dist/src/card/CardHeader.js.map +1 -0
  38. package/dist/src/card/CardSubtitle.js.map +1 -0
  39. package/dist/src/card/CardTitle.js.map +1 -0
  40. package/dist/src/card/ClickableCard.js.map +1 -0
  41. package/dist/src/card/styles.js.map +1 -0
  42. package/dist/src/chip/Chip.js.map +1 -0
  43. package/dist/src/chip/styles.js.map +1 -0
  44. package/dist/src/cssUtils.js.map +1 -0
  45. package/dist/src/delegateEvent.js.map +1 -0
  46. package/dist/src/dialog/Dialog.js.map +1 -0
  47. package/dist/src/dialog/DialogContainer.js.map +1 -0
  48. package/dist/src/dialog/DialogContent.js.map +1 -0
  49. package/dist/src/dialog/DialogFooter.js.map +1 -0
  50. package/dist/src/dialog/DialogHeader.js.map +1 -0
  51. package/dist/src/dialog/DialogTitle.js.map +1 -0
  52. package/dist/src/dialog/FixedDialog.js.map +1 -0
  53. package/dist/src/dialog/NestedDialogProvider.js.map +1 -0
  54. package/dist/src/dialog/styles.js.map +1 -0
  55. package/dist/src/divider/Divider.js.map +1 -0
  56. package/dist/src/divider/styles.js.map +1 -0
  57. package/dist/src/draggable/useDraggable.js.map +1 -0
  58. package/dist/src/draggable/utils.js.map +1 -0
  59. package/dist/src/expansion-panel/ExpansionList.js.map +1 -0
  60. package/dist/src/expansion-panel/ExpansionPanel.js.map +1 -0
  61. package/dist/src/expansion-panel/ExpansionPanelHeader.js.map +1 -0
  62. package/dist/src/expansion-panel/useExpansionList.js.map +1 -0
  63. package/dist/src/expansion-panel/useExpansionPanels.js.map +1 -0
  64. package/dist/src/focus/useFocusContainer.js.map +1 -0
  65. package/dist/src/focus/utils.js.map +1 -0
  66. package/dist/src/form/Checkbox.js.map +1 -0
  67. package/dist/src/form/Fieldset.js.map +1 -0
  68. package/dist/src/form/FileInput.js.map +1 -0
  69. package/dist/src/form/Form.js.map +1 -0
  70. package/dist/src/form/FormMessage.js.map +1 -0
  71. package/dist/src/form/FormMessageContainer.js.map +1 -0
  72. package/dist/src/form/FormMessageCounter.js.map +1 -0
  73. package/dist/src/form/InputToggle.js.map +1 -0
  74. package/dist/src/form/InputToggleIcon.js.map +1 -0
  75. package/dist/src/form/Label.js.map +1 -0
  76. package/dist/src/form/Legend.js.map +1 -0
  77. package/dist/src/form/MenuItemCheckbox.js.map +1 -0
  78. package/dist/src/form/MenuItemFileInput.js.map +1 -0
  79. package/dist/src/form/MenuItemInputToggle.js.map +1 -0
  80. package/dist/src/form/MenuItemRadio.js.map +1 -0
  81. package/dist/src/form/MenuItemSwitch.js.map +1 -0
  82. package/dist/src/form/MenuItemTextField.js.map +1 -0
  83. package/dist/src/form/NativeSelect.js.map +1 -0
  84. package/dist/src/form/OptGroup.js.map +1 -0
  85. package/dist/src/form/Option.js.map +1 -0
  86. package/dist/src/form/Password.js.map +1 -0
  87. package/dist/src/form/Radio.js.map +1 -0
  88. package/dist/src/form/Select.js.map +1 -0
  89. package/dist/src/form/SelectValue.js.map +1 -0
  90. package/dist/src/form/Slider.js.map +1 -0
  91. package/dist/src/form/SliderContainer.js.map +1 -0
  92. package/dist/src/form/SliderMark.js.map +1 -0
  93. package/dist/src/form/SliderMarkLabel.js.map +1 -0
  94. package/dist/src/form/SliderThumb.js.map +1 -0
  95. package/dist/src/form/SliderTrack.js.map +1 -0
  96. package/dist/src/form/SliderValueMarks.js.map +1 -0
  97. package/dist/src/form/SliderValueTooltip.js.map +1 -0
  98. package/dist/src/form/Switch.js.map +1 -0
  99. package/dist/src/form/SwitchTrack.js.map +1 -0
  100. package/dist/src/form/TextArea.js.map +1 -0
  101. package/dist/src/form/TextField.js.map +1 -0
  102. package/dist/src/form/TextFieldAddon.js.map +1 -0
  103. package/dist/src/form/TextFieldContainer.js.map +1 -0
  104. package/dist/src/form/TextFieldContainerStyles.js.map +1 -0
  105. package/dist/src/form/fileUtils.js.map +1 -0
  106. package/dist/src/form/formConfig.js.map +1 -0
  107. package/dist/src/form/formMessageStyles.js.map +1 -0
  108. package/dist/src/form/inputToggleStyles.js.map +1 -0
  109. package/dist/src/form/nativeSelectStyles.js.map +1 -0
  110. package/dist/src/form/optionStyles.js.map +1 -0
  111. package/dist/src/form/passwordStyles.js.map +1 -0
  112. package/dist/src/form/selectStyles.js.map +1 -0
  113. package/dist/src/form/selectUtils.js.map +1 -0
  114. package/dist/src/form/sliderUtils.js.map +1 -0
  115. package/dist/src/form/switchStyles.js.map +1 -0
  116. package/dist/src/form/textAreaStyles.js.map +1 -0
  117. package/dist/src/form/textFieldStyles.js.map +1 -0
  118. package/dist/src/form/types.js.map +1 -0
  119. package/dist/src/form/useCheckboxGroup.js.map +1 -0
  120. package/dist/src/form/useFileUpload.js.map +1 -0
  121. package/dist/src/form/useListboxProvider.js.map +1 -0
  122. package/dist/src/form/useNumberField.js.map +1 -0
  123. package/dist/src/form/useRadioGroup.js.map +1 -0
  124. package/dist/src/form/useRangeSlider.js.map +1 -0
  125. package/dist/src/form/useResizingTextArea.js.map +1 -0
  126. package/dist/src/form/useSlider.js.map +1 -0
  127. package/dist/src/form/useTextField.js.map +1 -0
  128. package/dist/src/form/utils.js.map +1 -0
  129. package/dist/src/form/validation.js.map +1 -0
  130. package/dist/src/hoverMode/useHoverMode.js.map +1 -0
  131. package/dist/src/hoverMode/useHoverModeProvider.js.map +1 -0
  132. package/dist/src/icon/FontIcon.js.map +1 -0
  133. package/dist/src/icon/IconRotator.js.map +1 -0
  134. package/dist/src/icon/MaterialIcon.js.map +1 -0
  135. package/dist/src/icon/MaterialSymbol.js.map +1 -0
  136. package/dist/src/icon/SVGIcon.js.map +1 -0
  137. package/dist/src/icon/TextIconSpacing.js.map +1 -0
  138. package/dist/src/icon/iconConfig.js.map +1 -0
  139. package/dist/src/icon/material.js.map +1 -0
  140. package/dist/src/icon/materialConfig.js.map +1 -0
  141. package/dist/src/icon/styles.js.map +1 -0
  142. package/dist/src/index.js.map +1 -0
  143. package/dist/src/interaction/Ripple.js.map +1 -0
  144. package/dist/src/interaction/RippleContainer.js.map +1 -0
  145. package/dist/src/interaction/UserInteractionModeProvider.js.map +1 -0
  146. package/dist/src/interaction/config.js.map +1 -0
  147. package/dist/src/interaction/types.js.map +1 -0
  148. package/dist/src/interaction/useElementInteraction.js.map +1 -0
  149. package/dist/src/interaction/useHigherContrastChildren.js.map +1 -0
  150. package/dist/src/interaction/utils.js.map +1 -0
  151. package/dist/src/layout/LayoutAppBar.js.map +1 -0
  152. package/dist/src/layout/LayoutNav.js.map +1 -0
  153. package/dist/src/layout/LayoutWindowSplitter.js.map +1 -0
  154. package/dist/src/layout/Main.js.map +1 -0
  155. package/dist/src/layout/layoutNavStyles.js.map +1 -0
  156. package/dist/src/layout/layoutWindowSplitterStyles.js.map +1 -0
  157. package/dist/src/layout/mainStyles.js.map +1 -0
  158. package/dist/src/layout/useExpandableLayout.js.map +1 -0
  159. package/dist/src/layout/useHorizontalLayoutTransition.js.map +1 -0
  160. package/dist/src/layout/useLayoutAppBarHeight.js.map +1 -0
  161. package/dist/src/layout/useLayoutTree.js.map +1 -0
  162. package/dist/src/layout/useLayoutWindowSplitter.js.map +1 -0
  163. package/dist/src/layout/useMainTabIndex.js.map +1 -0
  164. package/dist/src/layout/useResizableLayout.js.map +1 -0
  165. package/dist/src/layout/useTemporaryLayout.js.map +1 -0
  166. package/dist/src/link/Link.js.map +1 -0
  167. package/dist/src/link/SkipToMainContent.js.map +1 -0
  168. package/dist/src/link/styles.js.map +1 -0
  169. package/dist/src/list/List.js.map +1 -0
  170. package/dist/src/list/ListItem.js +148 -0
  171. package/dist/src/list/ListItem.js.map +1 -0
  172. package/dist/src/list/ListItemAddon.js.map +1 -0
  173. package/dist/src/list/ListItemChildren.js.map +1 -0
  174. package/dist/src/list/ListItemLink.js +89 -0
  175. package/dist/src/list/ListItemLink.js.map +1 -0
  176. package/dist/src/list/ListItemText.js.map +1 -0
  177. package/dist/src/list/ListSubheader.js.map +1 -0
  178. package/dist/src/list/getListItemHeight.js +28 -0
  179. package/dist/src/list/getListItemHeight.js.map +1 -0
  180. package/dist/src/list/listItemStyles.js.map +1 -0
  181. package/dist/src/list/types.js.map +1 -0
  182. package/dist/src/media-queries/AppSizeProvider.js.map +1 -0
  183. package/dist/src/media-queries/appSize.js.map +1 -0
  184. package/dist/src/media-queries/useMediaQuery.js.map +1 -0
  185. package/dist/src/menu/DropdownMenu.js.map +1 -0
  186. package/dist/src/menu/Menu.js.map +1 -0
  187. package/dist/src/menu/MenuBar.js.map +1 -0
  188. package/dist/src/menu/MenuButton.js.map +1 -0
  189. package/dist/src/menu/MenuConfigurationProvider.js.map +1 -0
  190. package/dist/src/menu/MenuItem.js.map +1 -0
  191. package/dist/src/menu/MenuItemButton.js.map +1 -0
  192. package/dist/src/menu/MenuItemGroup.js.map +1 -0
  193. package/dist/src/menu/MenuItemSeparator.js.map +1 -0
  194. package/dist/src/menu/MenuSheet.js.map +1 -0
  195. package/dist/src/menu/MenuVisibilityProvider.js.map +1 -0
  196. package/dist/src/menu/MenuWidget.js.map +1 -0
  197. package/dist/src/menu/MenuWidgetKeyboardProvider.js.map +1 -0
  198. package/dist/src/menu/useContextMenu.js.map +1 -0
  199. package/dist/src/menu/useMenuBarProvider.js.map +1 -0
  200. package/dist/src/menu/utils.js.map +1 -0
  201. package/dist/src/movement/constants.js.map +1 -0
  202. package/dist/src/movement/findMatchIndex.js.map +1 -0
  203. package/dist/src/movement/types.js.map +1 -0
  204. package/dist/src/movement/useKeyboardMovementProvider.js.map +1 -0
  205. package/dist/src/movement/utils.js.map +1 -0
  206. package/dist/src/overlay/Overlay.js.map +1 -0
  207. package/dist/src/overlay/overlayStyles.js.map +1 -0
  208. package/dist/src/portal/Portal.js.map +1 -0
  209. package/dist/src/portal/PortalContainerProvider.js.map +1 -0
  210. package/dist/src/positioning/constants.js.map +1 -0
  211. package/dist/src/positioning/createHorizontalPosition.js.map +1 -0
  212. package/dist/src/positioning/createVerticalPosition.js.map +1 -0
  213. package/dist/src/positioning/getFixedPosition.js.map +1 -0
  214. package/dist/src/positioning/types.js.map +1 -0
  215. package/dist/src/positioning/useFixedPositioning.js.map +1 -0
  216. package/dist/src/positioning/utils.js.map +1 -0
  217. package/dist/src/progress/CircularProgress.js.map +1 -0
  218. package/dist/src/progress/LinearProgress.js.map +1 -0
  219. package/dist/src/progress/getProgressA11y.js.map +1 -0
  220. package/dist/src/progress/types.js.map +1 -0
  221. package/dist/src/responsive-item/ResponsiveItemContainer.js.map +1 -0
  222. package/dist/src/responsive-item/ResponsiveItemOverlay.js.map +1 -0
  223. package/dist/src/responsive-item/styles.js.map +1 -0
  224. package/dist/src/scroll/ScrollLock.js.map +1 -0
  225. package/dist/src/scroll/getScrollbarWidth.js.map +1 -0
  226. package/dist/src/scroll/useScrollLock.js.map +1 -0
  227. package/dist/src/segmented-button/SegmentedButton.js.map +1 -0
  228. package/dist/src/segmented-button/SegmentedButtonContainer.js.map +1 -0
  229. package/dist/src/segmented-button/segmentedButtonContainerStyles.js.map +1 -0
  230. package/dist/src/segmented-button/segmentedButtonStyles.js.map +1 -0
  231. package/dist/src/sheet/Sheet.js.map +1 -0
  232. package/dist/src/sheet/styles.js.map +1 -0
  233. package/dist/src/snackbar/DefaultToastRenderer.js.map +1 -0
  234. package/dist/src/snackbar/Snackbar.js.map +1 -0
  235. package/dist/src/snackbar/Toast.js.map +1 -0
  236. package/dist/src/snackbar/ToastActionButton.js.map +1 -0
  237. package/dist/src/snackbar/ToastCloseButton.js.map +1 -0
  238. package/dist/src/snackbar/ToastContent.js.map +1 -0
  239. package/dist/src/snackbar/ToastManager.js.map +1 -0
  240. package/dist/src/snackbar/ToastManagerProvider.js.map +1 -0
  241. package/dist/src/snackbar/snackbarStyles.js.map +1 -0
  242. package/dist/src/snackbar/toastContentStyles.js.map +1 -0
  243. package/dist/src/snackbar/toastStyles.js.map +1 -0
  244. package/dist/src/snackbar/useCurrentToastActions.js.map +1 -0
  245. package/dist/src/suspense/CircularProgressSuspense.js.map +1 -0
  246. package/dist/src/suspense/NullSuspense.js.map +1 -0
  247. package/dist/src/table/Table.js.map +1 -0
  248. package/dist/src/table/TableBody.js.map +1 -0
  249. package/dist/src/table/TableCell.js.map +1 -0
  250. package/dist/src/table/TableCellContent.js.map +1 -0
  251. package/dist/src/table/TableCheckbox.js.map +1 -0
  252. package/dist/src/table/TableConfigurationProvider.js.map +1 -0
  253. package/dist/src/table/TableContainer.js.map +1 -0
  254. package/dist/src/table/TableContainerProvider.js.map +1 -0
  255. package/dist/src/table/TableFooter.js.map +1 -0
  256. package/dist/src/table/TableHeader.js.map +1 -0
  257. package/dist/src/table/TableRadio.js.map +1 -0
  258. package/dist/src/table/TableRow.js.map +1 -0
  259. package/dist/src/table/tableCellStyles.js.map +1 -0
  260. package/dist/src/table/tableContainerStyles.js.map +1 -0
  261. package/dist/src/table/tableFooterStyles.js.map +1 -0
  262. package/dist/src/table/tableHeaderStyles.js.map +1 -0
  263. package/dist/src/table/tableRowStyles.js.map +1 -0
  264. package/dist/src/table/tableStyles.js.map +1 -0
  265. package/dist/src/table/types.js.map +1 -0
  266. package/dist/src/tabs/Tab.js.map +1 -0
  267. package/dist/src/tabs/TabList.js.map +1 -0
  268. package/dist/src/tabs/TabListScrollButton.js.map +1 -0
  269. package/dist/src/tabs/tabIndicatorStyles.js.map +1 -0
  270. package/dist/src/tabs/tabListScrollButtonStyles.js.map +1 -0
  271. package/dist/src/tabs/tabListStyles.js.map +1 -0
  272. package/dist/src/tabs/tabStyles.js.map +1 -0
  273. package/dist/src/tabs/useTabList.js.map +1 -0
  274. package/dist/src/tabs/useTabs.js.map +1 -0
  275. package/dist/src/tabs/utils.js.map +1 -0
  276. package/dist/src/test-utils/IntersectionObserver.js.map +1 -0
  277. package/dist/src/test-utils/ResizeObserver.js.map +1 -0
  278. package/dist/src/test-utils/data-testid.js.map +1 -0
  279. package/dist/src/test-utils/index.js.map +1 -0
  280. package/dist/src/test-utils/jest-setup.js.map +1 -0
  281. package/dist/src/test-utils/matchMedia.js.map +1 -0
  282. package/dist/src/test-utils/polyfills/IntersectionObserver.js.map +1 -0
  283. package/dist/src/test-utils/polyfills/ResizeObserver.js.map +1 -0
  284. package/dist/src/test-utils/polyfills/index.js.map +1 -0
  285. package/dist/src/test-utils/polyfills/matchMedia.js.map +1 -0
  286. package/dist/src/test-utils/polyfills/offsetParent.js.map +1 -0
  287. package/dist/src/test-utils/polyfills/scrollIntoView.js.map +1 -0
  288. package/dist/src/test-utils/render.js.map +1 -0
  289. package/dist/src/test-utils/timers.js.map +1 -0
  290. package/dist/src/theme/LocalStorageColorSchemeProvider.js.map +1 -0
  291. package/dist/src/theme/ThemeProvider.js.map +1 -0
  292. package/dist/src/theme/colors.js.map +1 -0
  293. package/dist/src/theme/cssVars.js.map +1 -0
  294. package/dist/src/theme/types.js.map +1 -0
  295. package/dist/src/theme/useCSSVariables.js.map +1 -0
  296. package/dist/src/theme/useColorScheme.js.map +1 -0
  297. package/dist/src/theme/useColorSchemeMetaTag.js.map +1 -0
  298. package/dist/src/theme/useColorSchemeProvider.js.map +1 -0
  299. package/dist/src/theme/usePrefersColorScheme.js.map +1 -0
  300. package/dist/src/theme/utils.js.map +1 -0
  301. package/dist/src/tooltip/Tooltip.js.map +1 -0
  302. package/dist/src/tooltip/TooltipHoverModeProvider.js.map +1 -0
  303. package/dist/src/tooltip/constants.js.map +1 -0
  304. package/dist/src/tooltip/tooltipStyles.js.map +1 -0
  305. package/dist/src/tooltip/useTooltip.js.map +1 -0
  306. package/dist/src/tooltip/useTooltipPosition.js.map +1 -0
  307. package/dist/src/tooltip/utils.js.map +1 -0
  308. package/dist/src/transition/CSSTransition.js.map +1 -0
  309. package/dist/src/transition/Collapse.js.map +1 -0
  310. package/dist/src/transition/CrossFade.js.map +1 -0
  311. package/dist/src/transition/ScaleTransition.js.map +1 -0
  312. package/dist/src/transition/SkeletonPlaceholder.js.map +1 -0
  313. package/dist/src/transition/Slide.js.map +1 -0
  314. package/dist/src/transition/SlideContainer.js.map +1 -0
  315. package/dist/src/transition/collapseStyles.js.map +1 -0
  316. package/dist/src/transition/config.js.map +1 -0
  317. package/dist/src/transition/maxWidthTransition.js.map +1 -0
  318. package/dist/src/transition/skeletonPlaceholderUtils.js.map +1 -0
  319. package/dist/src/transition/types.js.map +1 -0
  320. package/dist/src/transition/useCSSTransition.js.map +1 -0
  321. package/dist/src/transition/useCarousel.js.map +1 -0
  322. package/dist/src/transition/useCollapseTransition.js.map +1 -0
  323. package/dist/src/transition/useCrossFadeTransition.js.map +1 -0
  324. package/dist/src/transition/useMaxWidthTransition.js.map +1 -0
  325. package/dist/src/transition/useScaleTransition.js.map +1 -0
  326. package/dist/src/transition/useSkeletonPlaceholder.js.map +1 -0
  327. package/dist/src/transition/useSlideTransition.js.map +1 -0
  328. package/dist/src/transition/useTransition.js.map +1 -0
  329. package/dist/src/transition/utils.js.map +1 -0
  330. package/dist/src/tree/DefaultTreeItemRenderer.js.map +1 -0
  331. package/dist/src/tree/Tree.js.map +1 -0
  332. package/dist/src/tree/TreeGroup.js.map +1 -0
  333. package/dist/src/tree/TreeItem.js.map +1 -0
  334. package/dist/src/tree/TreeItemExpander.js.map +1 -0
  335. package/dist/src/tree/TreeProvider.js.map +1 -0
  336. package/dist/src/tree/styles.js.map +1 -0
  337. package/dist/src/tree/types.js.map +1 -0
  338. package/dist/src/tree/useTree.js.map +1 -0
  339. package/dist/src/tree/useTreeExpansion.js.map +1 -0
  340. package/dist/src/tree/useTreeItems.js.map +1 -0
  341. package/dist/src/tree/useTreeMovement.js.map +1 -0
  342. package/dist/src/tree/useTreeSelection.js.map +1 -0
  343. package/dist/src/tree/utils.js.map +1 -0
  344. package/dist/src/types.js.map +1 -0
  345. package/dist/src/typography/SrOnly.js.map +1 -0
  346. package/dist/src/typography/TextContainer.js.map +1 -0
  347. package/dist/src/typography/Typography.js.map +1 -0
  348. package/dist/src/typography/WritingDirectionProvider.js.map +1 -0
  349. package/dist/src/useAsyncAction.js.map +1 -0
  350. package/dist/src/useDebouncedFunction.js.map +1 -0
  351. package/dist/src/useDropzone.js.map +1 -0
  352. package/dist/src/useElementSize.js.map +1 -0
  353. package/dist/src/useEnsuredId.js.map +1 -0
  354. package/dist/src/useEnsuredRef.js.map +1 -0
  355. package/dist/src/useEnsuredState.js.map +1 -0
  356. package/dist/src/useHtmlClassName.js.map +1 -0
  357. package/dist/src/useIntersectionObserver.js.map +1 -0
  358. package/dist/src/useIsomorphicLayoutEffect.js.map +1 -0
  359. package/dist/src/useLocalStorage.js.map +1 -0
  360. package/dist/src/useOrientation.js.map +1 -0
  361. package/dist/src/usePageInactive.js.map +1 -0
  362. package/dist/src/useResizeListener.js.map +1 -0
  363. package/dist/src/useResizeObserver.js.map +1 -0
  364. package/dist/src/useThrottledFunction.js.map +1 -0
  365. package/dist/src/useToggle.js.map +1 -0
  366. package/dist/src/useUnmounted.js.map +1 -0
  367. package/dist/src/useWindowSize.js.map +1 -0
  368. package/dist/src/utils/RenderRecursively.js.map +1 -0
  369. package/dist/src/utils/alphaNumericSort.js.map +1 -0
  370. package/dist/src/utils/applyRef.js.map +1 -0
  371. package/dist/src/utils/bem.js.map +1 -0
  372. package/dist/src/utils/filters.js.map +1 -0
  373. package/dist/src/utils/getClientPosition.js.map +1 -0
  374. package/dist/src/utils/getMiddleOfRange.js.map +1 -0
  375. package/dist/src/utils/getPercentage.js.map +1 -0
  376. package/dist/src/utils/getRangeDefaultValue.js.map +1 -0
  377. package/dist/src/utils/getRangeSteps.js.map +1 -0
  378. package/dist/src/utils/identity.js.map +1 -0
  379. package/dist/src/utils/isElementVisible.js.map +1 -0
  380. package/dist/src/utils/loop.js.map +1 -0
  381. package/dist/src/utils/nearest.js.map +1 -0
  382. package/dist/src/utils/parseCssLengthUnit.js.map +1 -0
  383. package/dist/src/utils/randomInt.js.map +1 -0
  384. package/dist/src/utils/wait.js.map +1 -0
  385. package/dist/src/utils/withinRange.js.map +1 -0
  386. package/dist/src/window-splitter/WindowSplitter.js.map +1 -0
  387. package/dist/src/window-splitter/useWindowSplitter.js.map +1 -0
  388. package/dist/theme/_theme.scss +20 -10
  389. package/package.json +8 -8
  390. package/src/_core.scss +1 -1
  391. package/src/form/_form.scss +1 -1
  392. package/src/list/ListItem.tsx +1 -1
  393. package/src/list/ListItemLink.tsx +1 -1
  394. package/src/list/__tests__/getListItemHeight.ts +2 -2
  395. package/src/list/getListItemHeight.ts +2 -3
  396. package/src/list/types.ts +1 -1
  397. package/src/menu/_menu.scss +0 -2
  398. package/src/theme/_theme.scss +20 -10
  399. package/dist/CoreProviders.js.map +0 -1
  400. package/dist/NoSsr.js.map +0 -1
  401. package/dist/SsrProvider.js.map +0 -1
  402. package/dist/app-bar/AppBar.js.map +0 -1
  403. package/dist/app-bar/AppBarTitle.js.map +0 -1
  404. package/dist/avatar/Avatar.js.map +0 -1
  405. package/dist/avatar/styles.js.map +0 -1
  406. package/dist/badge/Badge.js.map +0 -1
  407. package/dist/box/Box.js.map +0 -1
  408. package/dist/box/styles.js.map +0 -1
  409. package/dist/button/AsyncButton.js.map +0 -1
  410. package/dist/button/Button.js.map +0 -1
  411. package/dist/button/ButtonUnstyled.js.map +0 -1
  412. package/dist/button/FloatingActionButton.js.map +0 -1
  413. package/dist/button/TooltippedButton.js.map +0 -1
  414. package/dist/button/buttonStyles.js.map +0 -1
  415. package/dist/button/buttonUnstyledStyles.js.map +0 -1
  416. package/dist/card/Card.js.map +0 -1
  417. package/dist/card/CardContent.js.map +0 -1
  418. package/dist/card/CardFooter.js.map +0 -1
  419. package/dist/card/CardHeader.js.map +0 -1
  420. package/dist/card/CardSubtitle.js.map +0 -1
  421. package/dist/card/CardTitle.js.map +0 -1
  422. package/dist/card/ClickableCard.js.map +0 -1
  423. package/dist/card/styles.js.map +0 -1
  424. package/dist/chip/Chip.js.map +0 -1
  425. package/dist/chip/styles.js.map +0 -1
  426. package/dist/cssUtils.js.map +0 -1
  427. package/dist/delegateEvent.js.map +0 -1
  428. package/dist/dialog/Dialog.js.map +0 -1
  429. package/dist/dialog/DialogContainer.js.map +0 -1
  430. package/dist/dialog/DialogContent.js.map +0 -1
  431. package/dist/dialog/DialogFooter.js.map +0 -1
  432. package/dist/dialog/DialogHeader.js.map +0 -1
  433. package/dist/dialog/DialogTitle.js.map +0 -1
  434. package/dist/dialog/FixedDialog.js.map +0 -1
  435. package/dist/dialog/NestedDialogProvider.js.map +0 -1
  436. package/dist/dialog/styles.js.map +0 -1
  437. package/dist/divider/Divider.js.map +0 -1
  438. package/dist/divider/styles.js.map +0 -1
  439. package/dist/draggable/useDraggable.js.map +0 -1
  440. package/dist/draggable/utils.js.map +0 -1
  441. package/dist/expansion-panel/ExpansionList.js.map +0 -1
  442. package/dist/expansion-panel/ExpansionPanel.js.map +0 -1
  443. package/dist/expansion-panel/ExpansionPanelHeader.js.map +0 -1
  444. package/dist/expansion-panel/useExpansionList.js.map +0 -1
  445. package/dist/expansion-panel/useExpansionPanels.js.map +0 -1
  446. package/dist/focus/useFocusContainer.js.map +0 -1
  447. package/dist/focus/utils.js.map +0 -1
  448. package/dist/form/Checkbox.js.map +0 -1
  449. package/dist/form/Fieldset.js.map +0 -1
  450. package/dist/form/FileInput.js.map +0 -1
  451. package/dist/form/Form.js.map +0 -1
  452. package/dist/form/FormMessage.js.map +0 -1
  453. package/dist/form/FormMessageContainer.js.map +0 -1
  454. package/dist/form/FormMessageCounter.js.map +0 -1
  455. package/dist/form/InputToggle.js.map +0 -1
  456. package/dist/form/InputToggleIcon.js.map +0 -1
  457. package/dist/form/Label.js.map +0 -1
  458. package/dist/form/Legend.js.map +0 -1
  459. package/dist/form/MenuItemCheckbox.js.map +0 -1
  460. package/dist/form/MenuItemFileInput.js.map +0 -1
  461. package/dist/form/MenuItemInputToggle.js.map +0 -1
  462. package/dist/form/MenuItemRadio.js.map +0 -1
  463. package/dist/form/MenuItemSwitch.js.map +0 -1
  464. package/dist/form/MenuItemTextField.js.map +0 -1
  465. package/dist/form/NativeSelect.js.map +0 -1
  466. package/dist/form/OptGroup.js.map +0 -1
  467. package/dist/form/Option.js.map +0 -1
  468. package/dist/form/Password.js.map +0 -1
  469. package/dist/form/Radio.js.map +0 -1
  470. package/dist/form/Select.js.map +0 -1
  471. package/dist/form/SelectValue.js.map +0 -1
  472. package/dist/form/Slider.js.map +0 -1
  473. package/dist/form/SliderContainer.js.map +0 -1
  474. package/dist/form/SliderMark.js.map +0 -1
  475. package/dist/form/SliderMarkLabel.js.map +0 -1
  476. package/dist/form/SliderThumb.js.map +0 -1
  477. package/dist/form/SliderTrack.js.map +0 -1
  478. package/dist/form/SliderValueMarks.js.map +0 -1
  479. package/dist/form/SliderValueTooltip.js.map +0 -1
  480. package/dist/form/Switch.js.map +0 -1
  481. package/dist/form/SwitchTrack.js.map +0 -1
  482. package/dist/form/TextArea.js.map +0 -1
  483. package/dist/form/TextField.js.map +0 -1
  484. package/dist/form/TextFieldAddon.js.map +0 -1
  485. package/dist/form/TextFieldContainer.js.map +0 -1
  486. package/dist/form/TextFieldContainerStyles.js.map +0 -1
  487. package/dist/form/fileUtils.js.map +0 -1
  488. package/dist/form/formConfig.js.map +0 -1
  489. package/dist/form/formMessageStyles.js.map +0 -1
  490. package/dist/form/inputToggleStyles.js.map +0 -1
  491. package/dist/form/nativeSelectStyles.js.map +0 -1
  492. package/dist/form/optionStyles.js.map +0 -1
  493. package/dist/form/passwordStyles.js.map +0 -1
  494. package/dist/form/selectStyles.js.map +0 -1
  495. package/dist/form/selectUtils.js.map +0 -1
  496. package/dist/form/sliderUtils.js.map +0 -1
  497. package/dist/form/switchStyles.js.map +0 -1
  498. package/dist/form/textAreaStyles.js.map +0 -1
  499. package/dist/form/textFieldStyles.js.map +0 -1
  500. package/dist/form/types.js.map +0 -1
  501. package/dist/form/useCheckboxGroup.js.map +0 -1
  502. package/dist/form/useFileUpload.js.map +0 -1
  503. package/dist/form/useListboxProvider.js.map +0 -1
  504. package/dist/form/useNumberField.js.map +0 -1
  505. package/dist/form/useRadioGroup.js.map +0 -1
  506. package/dist/form/useRangeSlider.js.map +0 -1
  507. package/dist/form/useResizingTextArea.js.map +0 -1
  508. package/dist/form/useSlider.js.map +0 -1
  509. package/dist/form/useTextField.js.map +0 -1
  510. package/dist/form/utils.js.map +0 -1
  511. package/dist/form/validation.js.map +0 -1
  512. package/dist/hoverMode/useHoverMode.js.map +0 -1
  513. package/dist/hoverMode/useHoverModeProvider.js.map +0 -1
  514. package/dist/icon/FontIcon.js.map +0 -1
  515. package/dist/icon/IconRotator.js.map +0 -1
  516. package/dist/icon/MaterialIcon.js.map +0 -1
  517. package/dist/icon/MaterialSymbol.js.map +0 -1
  518. package/dist/icon/SVGIcon.js.map +0 -1
  519. package/dist/icon/TextIconSpacing.js.map +0 -1
  520. package/dist/icon/iconConfig.js.map +0 -1
  521. package/dist/icon/material.js.map +0 -1
  522. package/dist/icon/materialConfig.js.map +0 -1
  523. package/dist/icon/styles.js.map +0 -1
  524. package/dist/index.js.map +0 -1
  525. package/dist/interaction/Ripple.js.map +0 -1
  526. package/dist/interaction/RippleContainer.js.map +0 -1
  527. package/dist/interaction/UserInteractionModeProvider.js.map +0 -1
  528. package/dist/interaction/config.js.map +0 -1
  529. package/dist/interaction/types.js.map +0 -1
  530. package/dist/interaction/useElementInteraction.js.map +0 -1
  531. package/dist/interaction/useHigherContrastChildren.js.map +0 -1
  532. package/dist/interaction/utils.js.map +0 -1
  533. package/dist/layout/LayoutAppBar.js.map +0 -1
  534. package/dist/layout/LayoutNav.js.map +0 -1
  535. package/dist/layout/LayoutWindowSplitter.js.map +0 -1
  536. package/dist/layout/Main.js.map +0 -1
  537. package/dist/layout/layoutNavStyles.js.map +0 -1
  538. package/dist/layout/layoutWindowSplitterStyles.js.map +0 -1
  539. package/dist/layout/mainStyles.js.map +0 -1
  540. package/dist/layout/useExpandableLayout.js.map +0 -1
  541. package/dist/layout/useHorizontalLayoutTransition.js.map +0 -1
  542. package/dist/layout/useLayoutAppBarHeight.js.map +0 -1
  543. package/dist/layout/useLayoutTree.js.map +0 -1
  544. package/dist/layout/useLayoutWindowSplitter.js.map +0 -1
  545. package/dist/layout/useMainTabIndex.js.map +0 -1
  546. package/dist/layout/useResizableLayout.js.map +0 -1
  547. package/dist/layout/useTemporaryLayout.js.map +0 -1
  548. package/dist/link/Link.js.map +0 -1
  549. package/dist/link/SkipToMainContent.js.map +0 -1
  550. package/dist/link/styles.js.map +0 -1
  551. package/dist/list/List.js.map +0 -1
  552. package/dist/list/ListItem.js +0 -148
  553. package/dist/list/ListItem.js.map +0 -1
  554. package/dist/list/ListItemAddon.js.map +0 -1
  555. package/dist/list/ListItemChildren.js.map +0 -1
  556. package/dist/list/ListItemLink.js +0 -89
  557. package/dist/list/ListItemLink.js.map +0 -1
  558. package/dist/list/ListItemText.js.map +0 -1
  559. package/dist/list/ListSubheader.js.map +0 -1
  560. package/dist/list/getListItemHeight.js +0 -28
  561. package/dist/list/getListItemHeight.js.map +0 -1
  562. package/dist/list/listItemStyles.js.map +0 -1
  563. package/dist/list/types.js.map +0 -1
  564. package/dist/media-queries/AppSizeProvider.js.map +0 -1
  565. package/dist/media-queries/appSize.js.map +0 -1
  566. package/dist/media-queries/useMediaQuery.js.map +0 -1
  567. package/dist/menu/DropdownMenu.js.map +0 -1
  568. package/dist/menu/Menu.js.map +0 -1
  569. package/dist/menu/MenuBar.js.map +0 -1
  570. package/dist/menu/MenuButton.js.map +0 -1
  571. package/dist/menu/MenuConfigurationProvider.js.map +0 -1
  572. package/dist/menu/MenuItem.js.map +0 -1
  573. package/dist/menu/MenuItemButton.js.map +0 -1
  574. package/dist/menu/MenuItemGroup.js.map +0 -1
  575. package/dist/menu/MenuItemSeparator.js.map +0 -1
  576. package/dist/menu/MenuSheet.js.map +0 -1
  577. package/dist/menu/MenuVisibilityProvider.js.map +0 -1
  578. package/dist/menu/MenuWidget.js.map +0 -1
  579. package/dist/menu/MenuWidgetKeyboardProvider.js.map +0 -1
  580. package/dist/menu/useContextMenu.js.map +0 -1
  581. package/dist/menu/useMenuBarProvider.js.map +0 -1
  582. package/dist/menu/utils.js.map +0 -1
  583. package/dist/movement/constants.js.map +0 -1
  584. package/dist/movement/findMatchIndex.js.map +0 -1
  585. package/dist/movement/types.js.map +0 -1
  586. package/dist/movement/useKeyboardMovementProvider.js.map +0 -1
  587. package/dist/movement/utils.js.map +0 -1
  588. package/dist/overlay/Overlay.js.map +0 -1
  589. package/dist/overlay/overlayStyles.js.map +0 -1
  590. package/dist/portal/Portal.js.map +0 -1
  591. package/dist/portal/PortalContainerProvider.js.map +0 -1
  592. package/dist/positioning/constants.js.map +0 -1
  593. package/dist/positioning/createHorizontalPosition.js.map +0 -1
  594. package/dist/positioning/createVerticalPosition.js.map +0 -1
  595. package/dist/positioning/getFixedPosition.js.map +0 -1
  596. package/dist/positioning/types.js.map +0 -1
  597. package/dist/positioning/useFixedPositioning.js.map +0 -1
  598. package/dist/positioning/utils.js.map +0 -1
  599. package/dist/progress/CircularProgress.js.map +0 -1
  600. package/dist/progress/LinearProgress.js.map +0 -1
  601. package/dist/progress/getProgressA11y.js.map +0 -1
  602. package/dist/progress/types.js.map +0 -1
  603. package/dist/responsive-item/ResponsiveItemContainer.js.map +0 -1
  604. package/dist/responsive-item/ResponsiveItemOverlay.js.map +0 -1
  605. package/dist/responsive-item/styles.js.map +0 -1
  606. package/dist/scroll/ScrollLock.js.map +0 -1
  607. package/dist/scroll/getScrollbarWidth.js.map +0 -1
  608. package/dist/scroll/useScrollLock.js.map +0 -1
  609. package/dist/segmented-button/SegmentedButton.js.map +0 -1
  610. package/dist/segmented-button/SegmentedButtonContainer.js.map +0 -1
  611. package/dist/segmented-button/segmentedButtonContainerStyles.js.map +0 -1
  612. package/dist/segmented-button/segmentedButtonStyles.js.map +0 -1
  613. package/dist/sheet/Sheet.js.map +0 -1
  614. package/dist/sheet/styles.js.map +0 -1
  615. package/dist/snackbar/DefaultToastRenderer.js.map +0 -1
  616. package/dist/snackbar/Snackbar.js.map +0 -1
  617. package/dist/snackbar/Toast.js.map +0 -1
  618. package/dist/snackbar/ToastActionButton.js.map +0 -1
  619. package/dist/snackbar/ToastCloseButton.js.map +0 -1
  620. package/dist/snackbar/ToastContent.js.map +0 -1
  621. package/dist/snackbar/ToastManager.js.map +0 -1
  622. package/dist/snackbar/ToastManagerProvider.js.map +0 -1
  623. package/dist/snackbar/snackbarStyles.js.map +0 -1
  624. package/dist/snackbar/toastContentStyles.js.map +0 -1
  625. package/dist/snackbar/toastStyles.js.map +0 -1
  626. package/dist/snackbar/useCurrentToastActions.js.map +0 -1
  627. package/dist/suspense/CircularProgressSuspense.js.map +0 -1
  628. package/dist/suspense/NullSuspense.js.map +0 -1
  629. package/dist/table/Table.js.map +0 -1
  630. package/dist/table/TableBody.js.map +0 -1
  631. package/dist/table/TableCell.js.map +0 -1
  632. package/dist/table/TableCellContent.js.map +0 -1
  633. package/dist/table/TableCheckbox.js.map +0 -1
  634. package/dist/table/TableConfigurationProvider.js.map +0 -1
  635. package/dist/table/TableContainer.js.map +0 -1
  636. package/dist/table/TableContainerProvider.js.map +0 -1
  637. package/dist/table/TableFooter.js.map +0 -1
  638. package/dist/table/TableHeader.js.map +0 -1
  639. package/dist/table/TableRadio.js.map +0 -1
  640. package/dist/table/TableRow.js.map +0 -1
  641. package/dist/table/tableCellStyles.js.map +0 -1
  642. package/dist/table/tableContainerStyles.js.map +0 -1
  643. package/dist/table/tableFooterStyles.js.map +0 -1
  644. package/dist/table/tableHeaderStyles.js.map +0 -1
  645. package/dist/table/tableRowStyles.js.map +0 -1
  646. package/dist/table/tableStyles.js.map +0 -1
  647. package/dist/table/types.js.map +0 -1
  648. package/dist/tabs/Tab.js.map +0 -1
  649. package/dist/tabs/TabList.js.map +0 -1
  650. package/dist/tabs/TabListScrollButton.js.map +0 -1
  651. package/dist/tabs/tabIndicatorStyles.js.map +0 -1
  652. package/dist/tabs/tabListScrollButtonStyles.js.map +0 -1
  653. package/dist/tabs/tabListStyles.js.map +0 -1
  654. package/dist/tabs/tabStyles.js.map +0 -1
  655. package/dist/tabs/useTabList.js.map +0 -1
  656. package/dist/tabs/useTabs.js.map +0 -1
  657. package/dist/tabs/utils.js.map +0 -1
  658. package/dist/test-utils/IntersectionObserver.js.map +0 -1
  659. package/dist/test-utils/ResizeObserver.js.map +0 -1
  660. package/dist/test-utils/data-testid.js.map +0 -1
  661. package/dist/test-utils/index.js.map +0 -1
  662. package/dist/test-utils/jest-setup.js.map +0 -1
  663. package/dist/test-utils/matchMedia.js.map +0 -1
  664. package/dist/test-utils/polyfills/IntersectionObserver.js.map +0 -1
  665. package/dist/test-utils/polyfills/ResizeObserver.js.map +0 -1
  666. package/dist/test-utils/polyfills/index.js.map +0 -1
  667. package/dist/test-utils/polyfills/matchMedia.js.map +0 -1
  668. package/dist/test-utils/polyfills/offsetParent.js.map +0 -1
  669. package/dist/test-utils/polyfills/scrollIntoView.js.map +0 -1
  670. package/dist/test-utils/render.js.map +0 -1
  671. package/dist/test-utils/timers.js.map +0 -1
  672. package/dist/theme/LocalStorageColorSchemeProvider.js.map +0 -1
  673. package/dist/theme/ThemeProvider.js.map +0 -1
  674. package/dist/theme/colors.js.map +0 -1
  675. package/dist/theme/cssVars.js.map +0 -1
  676. package/dist/theme/types.js.map +0 -1
  677. package/dist/theme/useCSSVariables.js.map +0 -1
  678. package/dist/theme/useColorScheme.js.map +0 -1
  679. package/dist/theme/useColorSchemeMetaTag.js.map +0 -1
  680. package/dist/theme/useColorSchemeProvider.js.map +0 -1
  681. package/dist/theme/usePrefersColorScheme.js.map +0 -1
  682. package/dist/theme/utils.js.map +0 -1
  683. package/dist/tooltip/Tooltip.js.map +0 -1
  684. package/dist/tooltip/TooltipHoverModeProvider.js.map +0 -1
  685. package/dist/tooltip/constants.js.map +0 -1
  686. package/dist/tooltip/tooltipStyles.js.map +0 -1
  687. package/dist/tooltip/useTooltip.js.map +0 -1
  688. package/dist/tooltip/useTooltipPosition.js.map +0 -1
  689. package/dist/tooltip/utils.js.map +0 -1
  690. package/dist/transition/CSSTransition.js.map +0 -1
  691. package/dist/transition/Collapse.js.map +0 -1
  692. package/dist/transition/CrossFade.js.map +0 -1
  693. package/dist/transition/ScaleTransition.js.map +0 -1
  694. package/dist/transition/SkeletonPlaceholder.js.map +0 -1
  695. package/dist/transition/Slide.js.map +0 -1
  696. package/dist/transition/SlideContainer.js.map +0 -1
  697. package/dist/transition/collapseStyles.js.map +0 -1
  698. package/dist/transition/config.js.map +0 -1
  699. package/dist/transition/maxWidthTransition.js.map +0 -1
  700. package/dist/transition/skeletonPlaceholderUtils.js.map +0 -1
  701. package/dist/transition/types.js.map +0 -1
  702. package/dist/transition/useCSSTransition.js.map +0 -1
  703. package/dist/transition/useCarousel.js.map +0 -1
  704. package/dist/transition/useCollapseTransition.js.map +0 -1
  705. package/dist/transition/useCrossFadeTransition.js.map +0 -1
  706. package/dist/transition/useMaxWidthTransition.js.map +0 -1
  707. package/dist/transition/useScaleTransition.js.map +0 -1
  708. package/dist/transition/useSkeletonPlaceholder.js.map +0 -1
  709. package/dist/transition/useSlideTransition.js.map +0 -1
  710. package/dist/transition/useTransition.js.map +0 -1
  711. package/dist/transition/utils.js.map +0 -1
  712. package/dist/tree/DefaultTreeItemRenderer.js.map +0 -1
  713. package/dist/tree/Tree.js.map +0 -1
  714. package/dist/tree/TreeGroup.js.map +0 -1
  715. package/dist/tree/TreeItem.js.map +0 -1
  716. package/dist/tree/TreeItemExpander.js.map +0 -1
  717. package/dist/tree/TreeProvider.js.map +0 -1
  718. package/dist/tree/styles.js.map +0 -1
  719. package/dist/tree/types.js.map +0 -1
  720. package/dist/tree/useTree.js.map +0 -1
  721. package/dist/tree/useTreeExpansion.js.map +0 -1
  722. package/dist/tree/useTreeItems.js.map +0 -1
  723. package/dist/tree/useTreeMovement.js.map +0 -1
  724. package/dist/tree/useTreeSelection.js.map +0 -1
  725. package/dist/tree/utils.js.map +0 -1
  726. package/dist/types.js.map +0 -1
  727. package/dist/typography/SrOnly.js.map +0 -1
  728. package/dist/typography/TextContainer.js.map +0 -1
  729. package/dist/typography/Typography.js.map +0 -1
  730. package/dist/typography/WritingDirectionProvider.js.map +0 -1
  731. package/dist/useAsyncAction.js.map +0 -1
  732. package/dist/useDebouncedFunction.js.map +0 -1
  733. package/dist/useDropzone.js.map +0 -1
  734. package/dist/useElementSize.js.map +0 -1
  735. package/dist/useEnsuredId.js.map +0 -1
  736. package/dist/useEnsuredRef.js.map +0 -1
  737. package/dist/useEnsuredState.js.map +0 -1
  738. package/dist/useHtmlClassName.js.map +0 -1
  739. package/dist/useIntersectionObserver.js.map +0 -1
  740. package/dist/useIsomorphicLayoutEffect.js.map +0 -1
  741. package/dist/useLocalStorage.js.map +0 -1
  742. package/dist/useOrientation.js.map +0 -1
  743. package/dist/usePageInactive.js.map +0 -1
  744. package/dist/useResizeListener.js.map +0 -1
  745. package/dist/useResizeObserver.js.map +0 -1
  746. package/dist/useThrottledFunction.js.map +0 -1
  747. package/dist/useToggle.js.map +0 -1
  748. package/dist/useUnmounted.js.map +0 -1
  749. package/dist/useWindowSize.js.map +0 -1
  750. package/dist/utils/RenderRecursively.js.map +0 -1
  751. package/dist/utils/alphaNumericSort.js.map +0 -1
  752. package/dist/utils/applyRef.js.map +0 -1
  753. package/dist/utils/bem.js.map +0 -1
  754. package/dist/utils/filters.js.map +0 -1
  755. package/dist/utils/getClientPosition.js.map +0 -1
  756. package/dist/utils/getMiddleOfRange.js.map +0 -1
  757. package/dist/utils/getPercentage.js.map +0 -1
  758. package/dist/utils/getRangeDefaultValue.js.map +0 -1
  759. package/dist/utils/getRangeSteps.js.map +0 -1
  760. package/dist/utils/identity.js.map +0 -1
  761. package/dist/utils/isElementVisible.js.map +0 -1
  762. package/dist/utils/loop.js.map +0 -1
  763. package/dist/utils/nearest.js.map +0 -1
  764. package/dist/utils/parseCssLengthUnit.js.map +0 -1
  765. package/dist/utils/randomInt.js.map +0 -1
  766. package/dist/utils/wait.js.map +0 -1
  767. package/dist/utils/withinRange.js.map +0 -1
  768. package/dist/window-splitter/WindowSplitter.js.map +0 -1
  769. package/dist/window-splitter/useWindowSplitter.js.map +0 -1
  770. /package/dist/{CoreProviders.js → src/CoreProviders.js} +0 -0
  771. /package/dist/{NoSsr.js → src/NoSsr.js} +0 -0
  772. /package/dist/{SsrProvider.js → src/SsrProvider.js} +0 -0
  773. /package/dist/{app-bar → src/app-bar}/AppBar.js +0 -0
  774. /package/dist/{app-bar → src/app-bar}/AppBarTitle.js +0 -0
  775. /package/dist/{avatar → src/avatar}/Avatar.js +0 -0
  776. /package/dist/{avatar → src/avatar}/styles.js +0 -0
  777. /package/dist/{badge → src/badge}/Badge.js +0 -0
  778. /package/dist/{box → src/box}/Box.js +0 -0
  779. /package/dist/{box → src/box}/styles.js +0 -0
  780. /package/dist/{button → src/button}/AsyncButton.js +0 -0
  781. /package/dist/{button → src/button}/Button.js +0 -0
  782. /package/dist/{button → src/button}/ButtonUnstyled.js +0 -0
  783. /package/dist/{button → src/button}/FloatingActionButton.js +0 -0
  784. /package/dist/{button → src/button}/TooltippedButton.js +0 -0
  785. /package/dist/{button → src/button}/buttonStyles.js +0 -0
  786. /package/dist/{button → src/button}/buttonUnstyledStyles.js +0 -0
  787. /package/dist/{card → src/card}/Card.js +0 -0
  788. /package/dist/{card → src/card}/CardContent.js +0 -0
  789. /package/dist/{card → src/card}/CardFooter.js +0 -0
  790. /package/dist/{card → src/card}/CardHeader.js +0 -0
  791. /package/dist/{card → src/card}/CardSubtitle.js +0 -0
  792. /package/dist/{card → src/card}/CardTitle.js +0 -0
  793. /package/dist/{card → src/card}/ClickableCard.js +0 -0
  794. /package/dist/{card → src/card}/styles.js +0 -0
  795. /package/dist/{chip → src/chip}/Chip.js +0 -0
  796. /package/dist/{chip → src/chip}/styles.js +0 -0
  797. /package/dist/{cssUtils.js → src/cssUtils.js} +0 -0
  798. /package/dist/{delegateEvent.js → src/delegateEvent.js} +0 -0
  799. /package/dist/{dialog → src/dialog}/Dialog.js +0 -0
  800. /package/dist/{dialog → src/dialog}/DialogContainer.js +0 -0
  801. /package/dist/{dialog → src/dialog}/DialogContent.js +0 -0
  802. /package/dist/{dialog → src/dialog}/DialogFooter.js +0 -0
  803. /package/dist/{dialog → src/dialog}/DialogHeader.js +0 -0
  804. /package/dist/{dialog → src/dialog}/DialogTitle.js +0 -0
  805. /package/dist/{dialog → src/dialog}/FixedDialog.js +0 -0
  806. /package/dist/{dialog → src/dialog}/NestedDialogProvider.js +0 -0
  807. /package/dist/{dialog → src/dialog}/styles.js +0 -0
  808. /package/dist/{divider → src/divider}/Divider.js +0 -0
  809. /package/dist/{divider → src/divider}/styles.js +0 -0
  810. /package/dist/{draggable → src/draggable}/useDraggable.js +0 -0
  811. /package/dist/{draggable → src/draggable}/utils.js +0 -0
  812. /package/dist/{expansion-panel → src/expansion-panel}/ExpansionList.js +0 -0
  813. /package/dist/{expansion-panel → src/expansion-panel}/ExpansionPanel.js +0 -0
  814. /package/dist/{expansion-panel → src/expansion-panel}/ExpansionPanelHeader.js +0 -0
  815. /package/dist/{expansion-panel → src/expansion-panel}/useExpansionList.js +0 -0
  816. /package/dist/{expansion-panel → src/expansion-panel}/useExpansionPanels.js +0 -0
  817. /package/dist/{focus → src/focus}/useFocusContainer.js +0 -0
  818. /package/dist/{focus → src/focus}/utils.js +0 -0
  819. /package/dist/{form → src/form}/Checkbox.js +0 -0
  820. /package/dist/{form → src/form}/Fieldset.js +0 -0
  821. /package/dist/{form → src/form}/FileInput.js +0 -0
  822. /package/dist/{form → src/form}/Form.js +0 -0
  823. /package/dist/{form → src/form}/FormMessage.js +0 -0
  824. /package/dist/{form → src/form}/FormMessageContainer.js +0 -0
  825. /package/dist/{form → src/form}/FormMessageCounter.js +0 -0
  826. /package/dist/{form → src/form}/InputToggle.js +0 -0
  827. /package/dist/{form → src/form}/InputToggleIcon.js +0 -0
  828. /package/dist/{form → src/form}/Label.js +0 -0
  829. /package/dist/{form → src/form}/Legend.js +0 -0
  830. /package/dist/{form → src/form}/MenuItemCheckbox.js +0 -0
  831. /package/dist/{form → src/form}/MenuItemFileInput.js +0 -0
  832. /package/dist/{form → src/form}/MenuItemInputToggle.js +0 -0
  833. /package/dist/{form → src/form}/MenuItemRadio.js +0 -0
  834. /package/dist/{form → src/form}/MenuItemSwitch.js +0 -0
  835. /package/dist/{form → src/form}/MenuItemTextField.js +0 -0
  836. /package/dist/{form → src/form}/NativeSelect.js +0 -0
  837. /package/dist/{form → src/form}/OptGroup.js +0 -0
  838. /package/dist/{form → src/form}/Option.js +0 -0
  839. /package/dist/{form → src/form}/Password.js +0 -0
  840. /package/dist/{form → src/form}/Radio.js +0 -0
  841. /package/dist/{form → src/form}/Select.js +0 -0
  842. /package/dist/{form → src/form}/SelectValue.js +0 -0
  843. /package/dist/{form → src/form}/Slider.js +0 -0
  844. /package/dist/{form → src/form}/SliderContainer.js +0 -0
  845. /package/dist/{form → src/form}/SliderMark.js +0 -0
  846. /package/dist/{form → src/form}/SliderMarkLabel.js +0 -0
  847. /package/dist/{form → src/form}/SliderThumb.js +0 -0
  848. /package/dist/{form → src/form}/SliderTrack.js +0 -0
  849. /package/dist/{form → src/form}/SliderValueMarks.js +0 -0
  850. /package/dist/{form → src/form}/SliderValueTooltip.js +0 -0
  851. /package/dist/{form → src/form}/Switch.js +0 -0
  852. /package/dist/{form → src/form}/SwitchTrack.js +0 -0
  853. /package/dist/{form → src/form}/TextArea.js +0 -0
  854. /package/dist/{form → src/form}/TextField.js +0 -0
  855. /package/dist/{form → src/form}/TextFieldAddon.js +0 -0
  856. /package/dist/{form → src/form}/TextFieldContainer.js +0 -0
  857. /package/dist/{form → src/form}/TextFieldContainerStyles.js +0 -0
  858. /package/dist/{form → src/form}/fileUtils.js +0 -0
  859. /package/dist/{form → src/form}/formConfig.js +0 -0
  860. /package/dist/{form → src/form}/formMessageStyles.js +0 -0
  861. /package/dist/{form → src/form}/inputToggleStyles.js +0 -0
  862. /package/dist/{form → src/form}/nativeSelectStyles.js +0 -0
  863. /package/dist/{form → src/form}/optionStyles.js +0 -0
  864. /package/dist/{form → src/form}/passwordStyles.js +0 -0
  865. /package/dist/{form → src/form}/selectStyles.js +0 -0
  866. /package/dist/{form → src/form}/selectUtils.js +0 -0
  867. /package/dist/{form → src/form}/sliderUtils.js +0 -0
  868. /package/dist/{form → src/form}/switchStyles.js +0 -0
  869. /package/dist/{form → src/form}/textAreaStyles.js +0 -0
  870. /package/dist/{form → src/form}/textFieldStyles.js +0 -0
  871. /package/dist/{form → src/form}/types.js +0 -0
  872. /package/dist/{form → src/form}/useCheckboxGroup.js +0 -0
  873. /package/dist/{form → src/form}/useFileUpload.js +0 -0
  874. /package/dist/{form → src/form}/useListboxProvider.js +0 -0
  875. /package/dist/{form → src/form}/useNumberField.js +0 -0
  876. /package/dist/{form → src/form}/useRadioGroup.js +0 -0
  877. /package/dist/{form → src/form}/useRangeSlider.js +0 -0
  878. /package/dist/{form → src/form}/useResizingTextArea.js +0 -0
  879. /package/dist/{form → src/form}/useSlider.js +0 -0
  880. /package/dist/{form → src/form}/useTextField.js +0 -0
  881. /package/dist/{form → src/form}/utils.js +0 -0
  882. /package/dist/{form → src/form}/validation.js +0 -0
  883. /package/dist/{hoverMode → src/hoverMode}/useHoverMode.js +0 -0
  884. /package/dist/{hoverMode → src/hoverMode}/useHoverModeProvider.js +0 -0
  885. /package/dist/{icon → src/icon}/FontIcon.js +0 -0
  886. /package/dist/{icon → src/icon}/IconRotator.js +0 -0
  887. /package/dist/{icon → src/icon}/MaterialIcon.js +0 -0
  888. /package/dist/{icon → src/icon}/MaterialSymbol.js +0 -0
  889. /package/dist/{icon → src/icon}/SVGIcon.js +0 -0
  890. /package/dist/{icon → src/icon}/TextIconSpacing.js +0 -0
  891. /package/dist/{icon → src/icon}/iconConfig.js +0 -0
  892. /package/dist/{icon → src/icon}/material.js +0 -0
  893. /package/dist/{icon → src/icon}/materialConfig.js +0 -0
  894. /package/dist/{icon → src/icon}/styles.js +0 -0
  895. /package/dist/{index.js → src/index.js} +0 -0
  896. /package/dist/{interaction → src/interaction}/Ripple.js +0 -0
  897. /package/dist/{interaction → src/interaction}/RippleContainer.js +0 -0
  898. /package/dist/{interaction → src/interaction}/UserInteractionModeProvider.js +0 -0
  899. /package/dist/{interaction → src/interaction}/config.js +0 -0
  900. /package/dist/{interaction → src/interaction}/types.js +0 -0
  901. /package/dist/{interaction → src/interaction}/useElementInteraction.js +0 -0
  902. /package/dist/{interaction → src/interaction}/useHigherContrastChildren.js +0 -0
  903. /package/dist/{interaction → src/interaction}/utils.js +0 -0
  904. /package/dist/{layout → src/layout}/LayoutAppBar.js +0 -0
  905. /package/dist/{layout → src/layout}/LayoutNav.js +0 -0
  906. /package/dist/{layout → src/layout}/LayoutWindowSplitter.js +0 -0
  907. /package/dist/{layout → src/layout}/Main.js +0 -0
  908. /package/dist/{layout → src/layout}/layoutNavStyles.js +0 -0
  909. /package/dist/{layout → src/layout}/layoutWindowSplitterStyles.js +0 -0
  910. /package/dist/{layout → src/layout}/mainStyles.js +0 -0
  911. /package/dist/{layout → src/layout}/useExpandableLayout.js +0 -0
  912. /package/dist/{layout → src/layout}/useHorizontalLayoutTransition.js +0 -0
  913. /package/dist/{layout → src/layout}/useLayoutAppBarHeight.js +0 -0
  914. /package/dist/{layout → src/layout}/useLayoutTree.js +0 -0
  915. /package/dist/{layout → src/layout}/useLayoutWindowSplitter.js +0 -0
  916. /package/dist/{layout → src/layout}/useMainTabIndex.js +0 -0
  917. /package/dist/{layout → src/layout}/useResizableLayout.js +0 -0
  918. /package/dist/{layout → src/layout}/useTemporaryLayout.js +0 -0
  919. /package/dist/{link → src/link}/Link.js +0 -0
  920. /package/dist/{link → src/link}/SkipToMainContent.js +0 -0
  921. /package/dist/{link → src/link}/styles.js +0 -0
  922. /package/dist/{list → src/list}/List.js +0 -0
  923. /package/dist/{list → src/list}/ListItemAddon.js +0 -0
  924. /package/dist/{list → src/list}/ListItemChildren.js +0 -0
  925. /package/dist/{list → src/list}/ListItemText.js +0 -0
  926. /package/dist/{list → src/list}/ListSubheader.js +0 -0
  927. /package/dist/{list → src/list}/listItemStyles.js +0 -0
  928. /package/dist/{list → src/list}/types.js +0 -0
  929. /package/dist/{media-queries → src/media-queries}/AppSizeProvider.js +0 -0
  930. /package/dist/{media-queries → src/media-queries}/appSize.js +0 -0
  931. /package/dist/{media-queries → src/media-queries}/useMediaQuery.js +0 -0
  932. /package/dist/{menu → src/menu}/DropdownMenu.js +0 -0
  933. /package/dist/{menu → src/menu}/Menu.js +0 -0
  934. /package/dist/{menu → src/menu}/MenuBar.js +0 -0
  935. /package/dist/{menu → src/menu}/MenuButton.js +0 -0
  936. /package/dist/{menu → src/menu}/MenuConfigurationProvider.js +0 -0
  937. /package/dist/{menu → src/menu}/MenuItem.js +0 -0
  938. /package/dist/{menu → src/menu}/MenuItemButton.js +0 -0
  939. /package/dist/{menu → src/menu}/MenuItemGroup.js +0 -0
  940. /package/dist/{menu → src/menu}/MenuItemSeparator.js +0 -0
  941. /package/dist/{menu → src/menu}/MenuSheet.js +0 -0
  942. /package/dist/{menu → src/menu}/MenuVisibilityProvider.js +0 -0
  943. /package/dist/{menu → src/menu}/MenuWidget.js +0 -0
  944. /package/dist/{menu → src/menu}/MenuWidgetKeyboardProvider.js +0 -0
  945. /package/dist/{menu → src/menu}/useContextMenu.js +0 -0
  946. /package/dist/{menu → src/menu}/useMenuBarProvider.js +0 -0
  947. /package/dist/{menu → src/menu}/utils.js +0 -0
  948. /package/dist/{movement → src/movement}/constants.js +0 -0
  949. /package/dist/{movement → src/movement}/findMatchIndex.js +0 -0
  950. /package/dist/{movement → src/movement}/types.js +0 -0
  951. /package/dist/{movement → src/movement}/useKeyboardMovementProvider.js +0 -0
  952. /package/dist/{movement → src/movement}/utils.js +0 -0
  953. /package/dist/{overlay → src/overlay}/Overlay.js +0 -0
  954. /package/dist/{overlay → src/overlay}/overlayStyles.js +0 -0
  955. /package/dist/{portal → src/portal}/Portal.js +0 -0
  956. /package/dist/{portal → src/portal}/PortalContainerProvider.js +0 -0
  957. /package/dist/{positioning → src/positioning}/constants.js +0 -0
  958. /package/dist/{positioning → src/positioning}/createHorizontalPosition.js +0 -0
  959. /package/dist/{positioning → src/positioning}/createVerticalPosition.js +0 -0
  960. /package/dist/{positioning → src/positioning}/getFixedPosition.js +0 -0
  961. /package/dist/{positioning → src/positioning}/types.js +0 -0
  962. /package/dist/{positioning → src/positioning}/useFixedPositioning.js +0 -0
  963. /package/dist/{positioning → src/positioning}/utils.js +0 -0
  964. /package/dist/{progress → src/progress}/CircularProgress.js +0 -0
  965. /package/dist/{progress → src/progress}/LinearProgress.js +0 -0
  966. /package/dist/{progress → src/progress}/getProgressA11y.js +0 -0
  967. /package/dist/{progress → src/progress}/types.js +0 -0
  968. /package/dist/{responsive-item → src/responsive-item}/ResponsiveItemContainer.js +0 -0
  969. /package/dist/{responsive-item → src/responsive-item}/ResponsiveItemOverlay.js +0 -0
  970. /package/dist/{responsive-item → src/responsive-item}/styles.js +0 -0
  971. /package/dist/{scroll → src/scroll}/ScrollLock.js +0 -0
  972. /package/dist/{scroll → src/scroll}/getScrollbarWidth.js +0 -0
  973. /package/dist/{scroll → src/scroll}/useScrollLock.js +0 -0
  974. /package/dist/{segmented-button → src/segmented-button}/SegmentedButton.js +0 -0
  975. /package/dist/{segmented-button → src/segmented-button}/SegmentedButtonContainer.js +0 -0
  976. /package/dist/{segmented-button → src/segmented-button}/segmentedButtonContainerStyles.js +0 -0
  977. /package/dist/{segmented-button → src/segmented-button}/segmentedButtonStyles.js +0 -0
  978. /package/dist/{sheet → src/sheet}/Sheet.js +0 -0
  979. /package/dist/{sheet → src/sheet}/styles.js +0 -0
  980. /package/dist/{snackbar → src/snackbar}/DefaultToastRenderer.js +0 -0
  981. /package/dist/{snackbar → src/snackbar}/Snackbar.js +0 -0
  982. /package/dist/{snackbar → src/snackbar}/Toast.js +0 -0
  983. /package/dist/{snackbar → src/snackbar}/ToastActionButton.js +0 -0
  984. /package/dist/{snackbar → src/snackbar}/ToastCloseButton.js +0 -0
  985. /package/dist/{snackbar → src/snackbar}/ToastContent.js +0 -0
  986. /package/dist/{snackbar → src/snackbar}/ToastManager.js +0 -0
  987. /package/dist/{snackbar → src/snackbar}/ToastManagerProvider.js +0 -0
  988. /package/dist/{snackbar → src/snackbar}/snackbarStyles.js +0 -0
  989. /package/dist/{snackbar → src/snackbar}/toastContentStyles.js +0 -0
  990. /package/dist/{snackbar → src/snackbar}/toastStyles.js +0 -0
  991. /package/dist/{snackbar → src/snackbar}/useCurrentToastActions.js +0 -0
  992. /package/dist/{suspense → src/suspense}/CircularProgressSuspense.js +0 -0
  993. /package/dist/{suspense → src/suspense}/NullSuspense.js +0 -0
  994. /package/dist/{table → src/table}/Table.js +0 -0
  995. /package/dist/{table → src/table}/TableBody.js +0 -0
  996. /package/dist/{table → src/table}/TableCell.js +0 -0
  997. /package/dist/{table → src/table}/TableCellContent.js +0 -0
  998. /package/dist/{table → src/table}/TableCheckbox.js +0 -0
  999. /package/dist/{table → src/table}/TableConfigurationProvider.js +0 -0
  1000. /package/dist/{table → src/table}/TableContainer.js +0 -0
  1001. /package/dist/{table → src/table}/TableContainerProvider.js +0 -0
  1002. /package/dist/{table → src/table}/TableFooter.js +0 -0
  1003. /package/dist/{table → src/table}/TableHeader.js +0 -0
  1004. /package/dist/{table → src/table}/TableRadio.js +0 -0
  1005. /package/dist/{table → src/table}/TableRow.js +0 -0
  1006. /package/dist/{table → src/table}/tableCellStyles.js +0 -0
  1007. /package/dist/{table → src/table}/tableContainerStyles.js +0 -0
  1008. /package/dist/{table → src/table}/tableFooterStyles.js +0 -0
  1009. /package/dist/{table → src/table}/tableHeaderStyles.js +0 -0
  1010. /package/dist/{table → src/table}/tableRowStyles.js +0 -0
  1011. /package/dist/{table → src/table}/tableStyles.js +0 -0
  1012. /package/dist/{table → src/table}/types.js +0 -0
  1013. /package/dist/{tabs → src/tabs}/Tab.js +0 -0
  1014. /package/dist/{tabs → src/tabs}/TabList.js +0 -0
  1015. /package/dist/{tabs → src/tabs}/TabListScrollButton.js +0 -0
  1016. /package/dist/{tabs → src/tabs}/tabIndicatorStyles.js +0 -0
  1017. /package/dist/{tabs → src/tabs}/tabListScrollButtonStyles.js +0 -0
  1018. /package/dist/{tabs → src/tabs}/tabListStyles.js +0 -0
  1019. /package/dist/{tabs → src/tabs}/tabStyles.js +0 -0
  1020. /package/dist/{tabs → src/tabs}/useTabList.js +0 -0
  1021. /package/dist/{tabs → src/tabs}/useTabs.js +0 -0
  1022. /package/dist/{tabs → src/tabs}/utils.js +0 -0
  1023. /package/dist/{test-utils → src/test-utils}/IntersectionObserver.js +0 -0
  1024. /package/dist/{test-utils → src/test-utils}/ResizeObserver.js +0 -0
  1025. /package/dist/{test-utils → src/test-utils}/data-testid.js +0 -0
  1026. /package/dist/{test-utils → src/test-utils}/index.js +0 -0
  1027. /package/dist/{test-utils → src/test-utils}/jest-setup.js +0 -0
  1028. /package/dist/{test-utils → src/test-utils}/matchMedia.js +0 -0
  1029. /package/dist/{test-utils → src/test-utils}/polyfills/IntersectionObserver.js +0 -0
  1030. /package/dist/{test-utils → src/test-utils}/polyfills/ResizeObserver.js +0 -0
  1031. /package/dist/{test-utils → src/test-utils}/polyfills/index.js +0 -0
  1032. /package/dist/{test-utils → src/test-utils}/polyfills/matchMedia.js +0 -0
  1033. /package/dist/{test-utils → src/test-utils}/polyfills/offsetParent.js +0 -0
  1034. /package/dist/{test-utils → src/test-utils}/polyfills/scrollIntoView.js +0 -0
  1035. /package/dist/{test-utils → src/test-utils}/render.js +0 -0
  1036. /package/dist/{test-utils → src/test-utils}/timers.js +0 -0
  1037. /package/dist/{theme → src/theme}/LocalStorageColorSchemeProvider.js +0 -0
  1038. /package/dist/{theme → src/theme}/ThemeProvider.js +0 -0
  1039. /package/dist/{theme → src/theme}/colors.js +0 -0
  1040. /package/dist/{theme → src/theme}/cssVars.js +0 -0
  1041. /package/dist/{theme → src/theme}/types.js +0 -0
  1042. /package/dist/{theme → src/theme}/useCSSVariables.js +0 -0
  1043. /package/dist/{theme → src/theme}/useColorScheme.js +0 -0
  1044. /package/dist/{theme → src/theme}/useColorSchemeMetaTag.js +0 -0
  1045. /package/dist/{theme → src/theme}/useColorSchemeProvider.js +0 -0
  1046. /package/dist/{theme → src/theme}/usePrefersColorScheme.js +0 -0
  1047. /package/dist/{theme → src/theme}/utils.js +0 -0
  1048. /package/dist/{tooltip → src/tooltip}/Tooltip.js +0 -0
  1049. /package/dist/{tooltip → src/tooltip}/TooltipHoverModeProvider.js +0 -0
  1050. /package/dist/{tooltip → src/tooltip}/constants.js +0 -0
  1051. /package/dist/{tooltip → src/tooltip}/tooltipStyles.js +0 -0
  1052. /package/dist/{tooltip → src/tooltip}/useTooltip.js +0 -0
  1053. /package/dist/{tooltip → src/tooltip}/useTooltipPosition.js +0 -0
  1054. /package/dist/{tooltip → src/tooltip}/utils.js +0 -0
  1055. /package/dist/{transition → src/transition}/CSSTransition.js +0 -0
  1056. /package/dist/{transition → src/transition}/Collapse.js +0 -0
  1057. /package/dist/{transition → src/transition}/CrossFade.js +0 -0
  1058. /package/dist/{transition → src/transition}/ScaleTransition.js +0 -0
  1059. /package/dist/{transition → src/transition}/SkeletonPlaceholder.js +0 -0
  1060. /package/dist/{transition → src/transition}/Slide.js +0 -0
  1061. /package/dist/{transition → src/transition}/SlideContainer.js +0 -0
  1062. /package/dist/{transition → src/transition}/collapseStyles.js +0 -0
  1063. /package/dist/{transition → src/transition}/config.js +0 -0
  1064. /package/dist/{transition → src/transition}/maxWidthTransition.js +0 -0
  1065. /package/dist/{transition → src/transition}/skeletonPlaceholderUtils.js +0 -0
  1066. /package/dist/{transition → src/transition}/types.js +0 -0
  1067. /package/dist/{transition → src/transition}/useCSSTransition.js +0 -0
  1068. /package/dist/{transition → src/transition}/useCarousel.js +0 -0
  1069. /package/dist/{transition → src/transition}/useCollapseTransition.js +0 -0
  1070. /package/dist/{transition → src/transition}/useCrossFadeTransition.js +0 -0
  1071. /package/dist/{transition → src/transition}/useMaxWidthTransition.js +0 -0
  1072. /package/dist/{transition → src/transition}/useScaleTransition.js +0 -0
  1073. /package/dist/{transition → src/transition}/useSkeletonPlaceholder.js +0 -0
  1074. /package/dist/{transition → src/transition}/useSlideTransition.js +0 -0
  1075. /package/dist/{transition → src/transition}/useTransition.js +0 -0
  1076. /package/dist/{transition → src/transition}/utils.js +0 -0
  1077. /package/dist/{tree → src/tree}/DefaultTreeItemRenderer.js +0 -0
  1078. /package/dist/{tree → src/tree}/Tree.js +0 -0
  1079. /package/dist/{tree → src/tree}/TreeGroup.js +0 -0
  1080. /package/dist/{tree → src/tree}/TreeItem.js +0 -0
  1081. /package/dist/{tree → src/tree}/TreeItemExpander.js +0 -0
  1082. /package/dist/{tree → src/tree}/TreeProvider.js +0 -0
  1083. /package/dist/{tree → src/tree}/styles.js +0 -0
  1084. /package/dist/{tree → src/tree}/types.js +0 -0
  1085. /package/dist/{tree → src/tree}/useTree.js +0 -0
  1086. /package/dist/{tree → src/tree}/useTreeExpansion.js +0 -0
  1087. /package/dist/{tree → src/tree}/useTreeItems.js +0 -0
  1088. /package/dist/{tree → src/tree}/useTreeMovement.js +0 -0
  1089. /package/dist/{tree → src/tree}/useTreeSelection.js +0 -0
  1090. /package/dist/{tree → src/tree}/utils.js +0 -0
  1091. /package/dist/{types.js → src/types.js} +0 -0
  1092. /package/dist/{typography → src/typography}/SrOnly.js +0 -0
  1093. /package/dist/{typography → src/typography}/TextContainer.js +0 -0
  1094. /package/dist/{typography → src/typography}/Typography.js +0 -0
  1095. /package/dist/{typography → src/typography}/WritingDirectionProvider.js +0 -0
  1096. /package/dist/{useAsyncAction.js → src/useAsyncAction.js} +0 -0
  1097. /package/dist/{useDebouncedFunction.js → src/useDebouncedFunction.js} +0 -0
  1098. /package/dist/{useDropzone.js → src/useDropzone.js} +0 -0
  1099. /package/dist/{useElementSize.js → src/useElementSize.js} +0 -0
  1100. /package/dist/{useEnsuredId.js → src/useEnsuredId.js} +0 -0
  1101. /package/dist/{useEnsuredRef.js → src/useEnsuredRef.js} +0 -0
  1102. /package/dist/{useEnsuredState.js → src/useEnsuredState.js} +0 -0
  1103. /package/dist/{useHtmlClassName.js → src/useHtmlClassName.js} +0 -0
  1104. /package/dist/{useIntersectionObserver.js → src/useIntersectionObserver.js} +0 -0
  1105. /package/dist/{useIsomorphicLayoutEffect.js → src/useIsomorphicLayoutEffect.js} +0 -0
  1106. /package/dist/{useLocalStorage.js → src/useLocalStorage.js} +0 -0
  1107. /package/dist/{useOrientation.js → src/useOrientation.js} +0 -0
  1108. /package/dist/{usePageInactive.js → src/usePageInactive.js} +0 -0
  1109. /package/dist/{useResizeListener.js → src/useResizeListener.js} +0 -0
  1110. /package/dist/{useResizeObserver.js → src/useResizeObserver.js} +0 -0
  1111. /package/dist/{useThrottledFunction.js → src/useThrottledFunction.js} +0 -0
  1112. /package/dist/{useToggle.js → src/useToggle.js} +0 -0
  1113. /package/dist/{useUnmounted.js → src/useUnmounted.js} +0 -0
  1114. /package/dist/{useWindowSize.js → src/useWindowSize.js} +0 -0
  1115. /package/dist/{utils → src/utils}/RenderRecursively.js +0 -0
  1116. /package/dist/{utils → src/utils}/alphaNumericSort.js +0 -0
  1117. /package/dist/{utils → src/utils}/applyRef.js +0 -0
  1118. /package/dist/{utils → src/utils}/bem.js +0 -0
  1119. /package/dist/{utils → src/utils}/filters.js +0 -0
  1120. /package/dist/{utils → src/utils}/getClientPosition.js +0 -0
  1121. /package/dist/{utils → src/utils}/getMiddleOfRange.js +0 -0
  1122. /package/dist/{utils → src/utils}/getPercentage.js +0 -0
  1123. /package/dist/{utils → src/utils}/getRangeDefaultValue.js +0 -0
  1124. /package/dist/{utils → src/utils}/getRangeSteps.js +0 -0
  1125. /package/dist/{utils → src/utils}/identity.js +0 -0
  1126. /package/dist/{utils → src/utils}/isElementVisible.js +0 -0
  1127. /package/dist/{utils → src/utils}/loop.js +0 -0
  1128. /package/dist/{utils → src/utils}/nearest.js +0 -0
  1129. /package/dist/{utils → src/utils}/parseCssLengthUnit.js +0 -0
  1130. /package/dist/{utils → src/utils}/randomInt.js +0 -0
  1131. /package/dist/{utils → src/utils}/wait.js +0 -0
  1132. /package/dist/{utils → src/utils}/withinRange.js +0 -0
  1133. /package/dist/{window-splitter → src/window-splitter}/WindowSplitter.js +0 -0
  1134. /package/dist/{window-splitter → src/window-splitter}/useWindowSplitter.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/Option.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, Fragment, type ReactNode } from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { icon } from \"../icon/styles.js\";\nimport {\n TextIconSpacing,\n type TextIconSpacingProps,\n} from \"../icon/TextIconSpacing.js\";\nimport { getListItemHeight } from \"../list/getListItemHeight.js\";\nimport { ListItemText } from \"../list/ListItemText.js\";\nimport { MenuItem, type MenuItemProps } from \"../menu/MenuItem.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { option } from \"./optionStyles.js\";\nimport { useListboxContext } from \"./useListboxProvider.js\";\nimport { triggerManualChangeEvent } from \"./utils.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * This icon is used while the option is unselected so that the selected and\n * unselected options have the same alignment.\n *\n * @remarks \\@since 6.0.0\n */\nexport const DEFAULT_OPTION_UNSELECTED_ICON = (\n <span className={icon({ type: \"svg\" })} />\n);\n\n/**\n * @remarks\n * \\@since 6.0.0 removed the `selected` and `focused` props.\n * \\@since 6.0.0 Added the `value`, `selectedIcon`, `unselectedIcon`,\n * `selectedIconAfter`, and `iconSpacingProps` props.\n */\nexport interface OptionProps extends MenuItemProps {\n /**\n * @defaultValue `\"option\"`\n */\n role?: string;\n\n value: string | number;\n\n /**\n * @defaultValue `getIcon(\"selected\")`\n */\n selectedIcon?: ReactNode;\n\n /**\n * @see {@link DEFAULT_OPTION_UNSELECTED_ICON}\n * @defaultValue `<span className=\"rmd-icon rmd-icon--svg\" />`\n */\n unselectedIcon?: ReactNode;\n\n /**\n * Set this to `true` of the {@link selectedIcon}/{@link unselectedIcon}\n * should appear as the {@link rightAddon} instead of the {@link leftAddon}.\n *\n * @defaultValue `false`\n */\n selectedIconAfter?: boolean;\n\n /**\n * Since the `selectedIcon`/`unselectedIcon` are rendered as\n * `leftAddon`/`rightAddon`, the provided `leftAddon`/`rightAddon` will be\n * wrapped in the {@link TextIconSpacing} component to maintain the correct\n * spacing. You can use this prop to provide any additional configuration to\n * the spacing.\n *\n * @example\n * ```tsx\n * <Option\n * leftAddon={<Avatar>A</Avatar>}\n * leftAddonType=\"avatar\"\n * value={0}\n * textIconSpacingProps={{\n * beforeClassName: \"my-custom-class-name\",\n * }}\n * >\n * Some Content\n * </Option>\n * ```\n */\n textIconSpacingProps?: Omit<TextIconSpacingProps, \"icon\" | \"children\">;\n}\n\n/**\n * **Client Component**\n *\n * This component is a wrapper around the {@link MenuItem} to implement custom\n * select option behavior.\n *\n * @remarks\n * \\@since 6.0.0 removed the `selected` and `focused` props.\n * \\@since 6.0.0 Added the `value`, `selectedIcon`, `unselectedIcon`,\n * `selectedIconAfter`, and `iconSpacingProps` props.\n */\nexport const Option = forwardRef<HTMLLIElement, OptionProps>(\n function Option(props, ref) {\n const {\n id: propId,\n role = \"option\",\n value,\n children: propChildren,\n onClick = noop,\n className,\n selectedIcon: propSelectedIcon,\n unselectedIcon: propUnselectedIcon,\n selectedIconAfter = false,\n textIconSpacingProps,\n leftAddon: propLeftAddon,\n leftAddonType,\n leftAddonClassName,\n rightAddon: propRightAddon,\n rightAddonType,\n rightAddonClassName,\n secondaryText,\n height: propHeight,\n disableTextChildren: propDisableTextChildren,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"option\");\n const { inputRef, currentValue, disableSelectedIcon } = useListboxContext();\n const selected = value === currentValue;\n const selectedIcon = getIcon(\n \"selected\",\n disableSelectedIcon ? null : propSelectedIcon\n );\n const unselectedIcon = disableSelectedIcon\n ? null\n : propUnselectedIcon ?? DEFAULT_OPTION_UNSELECTED_ICON;\n const icon = selected ? selectedIcon : unselectedIcon;\n\n let leftAddon = propLeftAddon;\n let rightAddon = propRightAddon;\n let children = propChildren;\n let disableTextChildren = propDisableTextChildren;\n if (!selectedIconAfter && icon) {\n leftAddon = icon;\n if (propLeftAddon) {\n disableTextChildren = true;\n const Wrapper = propDisableTextChildren ? Fragment : ListItemText;\n\n children = (\n <TextIconSpacing {...textIconSpacingProps} icon={propLeftAddon}>\n <Wrapper>{children}</Wrapper>\n </TextIconSpacing>\n );\n }\n } else if (icon) {\n rightAddon = icon;\n if (propRightAddon) {\n disableTextChildren = true;\n const Wrapper = propDisableTextChildren ? Fragment : ListItemText;\n\n children = (\n <TextIconSpacing {...textIconSpacingProps} icon={propRightAddon}>\n <Wrapper>{children}</Wrapper>\n </TextIconSpacing>\n );\n }\n }\n\n const height = getListItemHeight({\n height: propHeight,\n leftAddon: leftAddon === icon ? null : leftAddon,\n leftAddonType,\n rightAddon: rightAddon === icon ? null : rightAddon,\n rightAddonType,\n secondaryText,\n });\n\n return (\n <MenuItem\n {...remaining}\n aria-selected={selected || undefined}\n id={id}\n ref={ref}\n role={role}\n onClick={(event) => {\n onClick(event);\n triggerManualChangeEvent(inputRef.current, value);\n }}\n className={option({ icon: !!icon, selected, className })}\n secondaryText={secondaryText}\n height={height}\n leftAddon={leftAddon}\n leftAddonType={leftAddonType}\n leftAddonClassName={cnb(\n leftAddon === icon && \"rmd-option__icon\",\n leftAddonClassName\n )}\n rightAddon={rightAddon}\n rightAddonType={rightAddonType}\n rightAddonClassName={cnb(\n rightAddon === icon && \"rmd-option__icon\",\n rightAddonClassName\n )}\n disableTextChildren={disableTextChildren}\n >\n {children}\n </MenuItem>\n );\n }\n);\n"],"names":["cnb","forwardRef","Fragment","getIcon","icon","TextIconSpacing","getListItemHeight","ListItemText","MenuItem","useEnsuredId","option","useListboxContext","triggerManualChangeEvent","noop","DEFAULT_OPTION_UNSELECTED_ICON","span","className","type","Option","props","ref","id","propId","role","value","children","propChildren","onClick","selectedIcon","propSelectedIcon","unselectedIcon","propUnselectedIcon","selectedIconAfter","textIconSpacingProps","leftAddon","propLeftAddon","leftAddonType","leftAddonClassName","rightAddon","propRightAddon","rightAddonType","rightAddonClassName","secondaryText","height","propHeight","disableTextChildren","propDisableTextChildren","remaining","inputRef","currentValue","disableSelectedIcon","selected","Wrapper","aria-selected","undefined","event","current"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,EAAEC,QAAQ,QAAwB,QAAQ;AAC7D,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SACEC,eAAe,QAEV,6BAA6B;AACpC,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,QAAQ,QAA4B,sBAAsB;AACnE,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,0BAA0B;AAC5D,SAASC,wBAAwB,QAAQ,aAAa;AAEtD,MAAMC,OAAO;AACX,aAAa;AACf;AAEA;;;;;CAKC,GACD,OAAO,MAAMC,+CACX,KAACC;IAAKC,WAAWZ,KAAK;QAAEa,MAAM;IAAM;GACpC;AA2DF;;;;;;;;;;CAUC,GACD,OAAO,MAAMC,uBAASjB,WACpB,SAASiB,OAAOC,KAAK,EAAEC,GAAG;IACxB,MAAM,EACJC,IAAIC,MAAM,EACVC,OAAO,QAAQ,EACfC,KAAK,EACLC,UAAUC,YAAY,EACtBC,UAAUd,IAAI,EACdG,SAAS,EACTY,cAAcC,gBAAgB,EAC9BC,gBAAgBC,kBAAkB,EAClCC,oBAAoB,KAAK,EACzBC,oBAAoB,EACpBC,WAAWC,aAAa,EACxBC,aAAa,EACbC,kBAAkB,EAClBC,YAAYC,cAAc,EAC1BC,cAAc,EACdC,mBAAmB,EACnBC,aAAa,EACbC,QAAQC,UAAU,EAClBC,qBAAqBC,uBAAuB,EAC5C,GAAGC,WACJ,GAAG5B;IAEJ,MAAME,KAAKZ,aAAaa,QAAQ;IAChC,MAA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C,oBAAoBrC,IAClBkC,cAAc9B,QAAQ,oBACtBiC;QAEFC,YAAYA;QACZE,gBAAgBA;QAChBC,qBAAqBzC,IACnBsC,eAAelC,QAAQ,oBACvBqC;QAEFI,qBAAqBA;kBAEpBpB;;AAGP,GACA"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/Password.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type ReactNode } from \"react\";\nimport { Button, type ButtonProps } from \"../button/Button.js\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { useToggle } from \"../useToggle.js\";\nimport {\n password,\n passwordInput,\n passwordInputToggle,\n} from \"./passwordStyles.js\";\nimport { TextField, type TextFieldProps } from \"./TextField.js\";\n\n/**\n * @example\n * Simple Example\n * ```tsx\n * const getVisibilityIcon: GetPasswordVisibilityIcon = (isPasswordVisible) => {\n * if (isPasswordVisible) {\n * return <SecurityIcon />;\n * }\n *\n * return <RemoveRedEyeIcon />;\n * };\n * ```\n *\n * @param isPasswordVisible - `true` when the password is visible and in plain\n * text\n * @returns a custom icon to use for the password visibility toggle.\n */\nexport type GetPasswordVisibilityIcon = (\n isPasswordVisible: boolean\n) => ReactNode;\n\n/**\n * @example\n * Simple Example\n * ```tsx\n * const visibilityIcon: ConfigurableVisibilityIcon = {\n * visible: <SecurityIcon />,\n * invisible: <RemoveRedEyeIcon />,\n * };\n * ```\n */\nexport interface ConfigurableVisibilityIcon {\n /**\n * The icon to display while the password is currently visible as plain text.\n */\n visible: ReactNode;\n\n /**\n * The icon to display while the password is currently invisible as the\n * password input.\n */\n invisible: ReactNode;\n}\n\nexport interface PasswordProps\n extends Omit<TextFieldProps, \"type\" | \"rightAddon\"> {\n /**\n * @defaultValue `\"password\"`\n * @remarks \\@since 6.0.0 Defaults to `\"password\"`\n */\n name?: string;\n\n /**\n * @example\n * Configurable Visibility Icon Object\n * ```tsx\n * <Password\n * {...props}\n * visibilityIcon={{\n * visible: <SecurityIcon />,\n * invisible: <RemoveRedEyeIcon />,\n * }}\n * />\n * ```\n *\n * @example\n * Get Password Visibility Icon Function\n * ```tsx\n * <Password\n * {...props}\n * visibilityIcon={(isPasswordVisible) => {\n * if (isPasswordVisible) {\n * return <SecurityIcon />;\n * }\n *\n * return <RemoveRedEyeIcon />;\n * }}\n * />\n * ```\n *\n * @example\n * Custom Icon\n * ```tsx\n * <Password\n * {...props}\n * visibilityIcon={<SomeCustomComponent />}\n * />\n * ```\n */\n visibilityIcon?:\n | ConfigurableVisibilityIcon\n | GetPasswordVisibilityIcon\n | ReactNode;\n\n /**\n * The `aria-label` to use for the password visibility icon button.\n *\n * @defaultValue `\"Show password\"`\n */\n visibilityLabel?: string;\n\n /**\n * Any props that should be passed to the password visibility icon button. If\n * `id`, `buttonType`, `aria-label`, `aria-pressed`, or `children` are\n * provided here, they will override the default implementation.\n */\n visibilityProps?: PropsWithRef<ButtonProps, HTMLButtonElement>;\n}\n\n/**\n * **Client Component**\n *\n * @example\n * Simple Example\n * ```tsx\n * import { Password } from \"@react-md/core\";\n *\n * function Example(): ReactElement {\n * return (\n * <Password\n * label=\"Password\"\n * name=\"password\"\n * required\n * />\n * );\n * }\n * ```\n */\nexport const Password = forwardRef<HTMLInputElement, PasswordProps>(\n function Password(props, ref) {\n const {\n id: propId,\n name = \"password\",\n className,\n inputClassName,\n visibilityIcon: propVisibilityIcon,\n visibilityLabel = \"Show password\",\n visibilityProps,\n ...remaining\n } = props;\n const { toggled: isPasswordVisible, toggle } = useToggle(false);\n\n let currentVisibilityIcon: ReactNode;\n if (\n propVisibilityIcon &&\n typeof propVisibilityIcon === \"object\" &&\n \"visible\" in propVisibilityIcon\n ) {\n currentVisibilityIcon = isPasswordVisible\n ? propVisibilityIcon.visible\n : propVisibilityIcon.invisible;\n } else if (typeof propVisibilityIcon === \"function\") {\n currentVisibilityIcon = propVisibilityIcon(isPasswordVisible);\n } else {\n currentVisibilityIcon = propVisibilityIcon;\n }\n\n const id = useEnsuredId(propId, \"password\");\n const visibilityIcon = getIcon(\"password\", currentVisibilityIcon);\n\n return (\n <TextField\n {...remaining}\n ref={ref}\n name={name}\n type={isPasswordVisible ? \"text\" : \"password\"}\n className={password({ className })}\n inputClassName={passwordInput({ className: inputClassName })}\n rightAddon={\n <Button\n id={`${id}-toggle`}\n buttonType=\"icon\"\n aria-label={visibilityLabel}\n aria-pressed={isPasswordVisible}\n // allow all props except the onClick, className, and aria-pressed to\n // be overridden. onClick can only stop default behavior with\n // `event.stopPropagation()`\n {...visibilityProps}\n className={passwordInputToggle({\n className: visibilityProps?.className,\n })}\n onClick={(event) => {\n visibilityProps?.onClick?.(event);\n if (event.isPropagationStopped()) {\n return;\n }\n\n toggle();\n }}\n >\n {visibilityProps?.children ?? visibilityIcon}\n </Button>\n }\n disableRightAddonStyles\n />\n );\n }\n);\n"],"names":["forwardRef","Button","getIcon","useEnsuredId","useToggle","password","passwordInput","passwordInputToggle","TextField","Password","props","ref","id","propId","name","className","inputClassName","visibilityIcon","propVisibilityIcon","visibilityLabel","visibilityProps","remaining","toggled","isPasswordVisible","toggle","currentVisibilityIcon","visible","invisible","type","rightAddon","buttonType","aria-label","aria-pressed","onClick","event","isPropagationStopped","children","disableRightAddonStyles"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAAwB,QAAQ;AACnD,SAASC,MAAM,QAA0B,sBAAsB;AAC/D,SAASC,OAAO,QAAQ,wBAAwB;AAEhD,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SACEC,QAAQ,EACRC,aAAa,EACbC,mBAAmB,QACd,sBAAsB;AAC7B,SAASC,SAAS,QAA6B,iBAAiB;AA+GhE;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,MAAMC,yBAAWT,WACtB,SAASS,SAASC,KAAK,EAAEC,GAAG;IAC1B,MAAM,EACJC,IAAIC,MAAM,EACVC,OAAO,UAAU,EACjBC,SAAS,EACTC,cAAc,EACdC,gBAAgBC,kBAAkB,EAClCC,kBAAkB,eAAe,EACjCC,eAAe,EACf,GAAGC,WACJ,GAAGX;IACJ,MAAM,EAAEY,SAASC,iBAAiB,EAAEC,MAAM,EAAE,GAAGpB,UAAU;IAEzD,IAAIqB;IACJ,IACEP,sBACA,OAAOA,uBAAuB,YAC9B,aAAaA,oBACb;QACAO,wBAAwBF,oBACpBL,mBAAmBQ,OAAO,GAC1BR,mBAAmBS,SAAS;IAClC,OAAO,IAAI,OAAOT,uBAAuB,YAAY;QACnDO,wBAAwBP,mBAAmBK;IAC7C,OAAO;QACLE,wBAAwBP;IAC1B;IAEA,MAAMN,KAAKT,aAAaU,QAAQ;IAChC,MAAMI,iBAAiBf,QAAQ,YAAYuB;IAE3C,qBACE,KAACjB;QACE,GAAGa,SAAS;QACbV,KAAKA;QACLG,MAAMA;QACNc,MAAML,oBAAoB,SAAS;QACnCR,WAAWV,SAAS;YAAEU;QAAU;QAChCC,gBAAgBV,cAAc;YAAES,WAAWC;QAAe;QAC1Da,0BACE,KAAC5B;YACCW,IAAI,CAAC,EAAEA,GAAG,OAAO,CAAC;YAClBkB,YAAW;YACXC,cAAYZ;YACZa,gBAAcT;YAIb,GAAGH,eAAe;YACnBL,WAAWR,oBAAoB;gBAC7BQ,WAAWK,iBAAiBL;YAC9B;YACAkB,SAAS,CAACC;gBACRd,iBAAiBa,UAAUC;gBAC3B,IAAIA,MAAMC,oBAAoB,IAAI;oBAChC;gBACF;gBAEAX;YACF;sBAECJ,iBAAiBgB,YAAYnB;;QAGlCoB,uBAAuB;;AAG7B,GACA"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/Radio.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef } from \"react\";\nimport { InputToggle, type RadioProps } from \"./InputToggle.js\";\n\n/**\n * **Client Component**\n *\n * You'll generally want to use the `useRadioGroup` hook along with this\n * component.\n *\n * @example\n * Simple Example\n * ```tsx\n * const { value, getRadioProps } = useRadioGroup({ name: \"group\" });\n *\n * return (\n * <>\n * <Radio {...getRadioProps(\"a\")} label=\"First\" />\n * <Radio {...getRadioProps(\"b\")} label=\"Second\" />\n * <Radio {...getRadioProps(\"c\")} label=\"Third\" />\n * </>\n * );\n * ```\n */\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(\n function Radio(props, ref) {\n return <InputToggle {...props} ref={ref} type=\"radio\" />;\n }\n);\n"],"names":["forwardRef","InputToggle","Radio","props","ref","type"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SAASC,WAAW,QAAyB,mBAAmB;AAEhE;;;;;;;;;;;;;;;;;;;CAmBC,GACD,OAAO,MAAMC,sBAAQF,WACnB,SAASE,MAAMC,KAAK,EAAEC,GAAG;IACvB,qBAAO,KAACH;QAAa,GAAGE,KAAK;QAAEC,KAAKA;QAAKC,MAAK;;AAChD,GACA"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/Select.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n useEffect,\n useMemo,\n useRef,\n useState,\n type ChangeEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { IconRotator } from \"../icon/IconRotator.js\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { Menu, type MenuProps } from \"../menu/Menu.js\";\nimport { findMatchIndex } from \"../movement/findMatchIndex.js\";\nimport {\n KeyboardMovementProvider,\n useKeyboardMovementProvider,\n} from \"../movement/useKeyboardMovementProvider.js\";\nimport { isSearchableEvent } from \"../movement/utils.js\";\nimport { BELOW_CENTER_ANCHOR } from \"../positioning/constants.js\";\nimport {\n type TransitionEnterHandler,\n type TransitionExitHandler,\n} from \"../transition/types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport { useToggle } from \"../useToggle.js\";\nimport { loop } from \"../utils/loop.js\";\nimport { SelectValue } from \"./SelectValue.js\";\nimport { TextField, type TextFieldProps } from \"./TextField.js\";\nimport { getFormConfig } from \"./formConfig.js\";\nimport { select } from \"./selectStyles.js\";\nimport { extractOptionsFromChildren } from \"./selectUtils.js\";\nimport {\n type FormFieldOptions,\n type UserAgentAutoCompleteProps,\n} from \"./types.js\";\nimport { ListboxProvider } from \"./useListboxProvider.js\";\nimport { triggerManualChangeEvent, tryToSubmitRelatedForm } from \"./utils.js\";\n\nconst EMPTY_STRING = \"\" as const;\nconst noop = (): void => {\n // do nothing\n};\n\nconst getNonDisabledOptions = (\n container: HTMLElement\n): readonly HTMLElement[] => [\n ...container.querySelectorAll<HTMLLIElement>(\n '[role=\"option\"]:not([aria-disabled])'\n ),\n];\n\n/**\n * This is a convenience type for casting the `event.currentTarget.value` of a\n * `Select`'s change event to be union of available values.\n *\n * Note: The change event does not provide any sort of validation on the value\n * so automation tools like Cypress, Playwright, or Selenium might set an\n * invalid value. This also does not work for numbers, so you will need to\n * implement that yourself.\n *\n * @example\n * Simple Usage\n * ```tsx\n * import type { SelectedChangeEvent } from \"@react-md/core\";\n * import { Select, Option } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * type Value = \"\" | \"a\" | \"b\" | \"c\" | \"d\";\n *\n * function Example(): ReactElement {\n * const [value, setValue] = useState<Value>(\"\");\n *\n * const handleChange = (event: SelectChangeEvent<Value>): void => {\n * // No type error!\n * // `event.currentTarget.value`'s type is `Value` instead of a generic `string`\n * setValue(event.currentTarget.value);\n * };\n *\n * return (\n * <Select\n * label=\"Label\"\n * value={value}\n * onChange={handleChange}\n * >\n * <Option value=\"a\">First</Option>\n * <Option value=\"b\">Second</Option>\n * <Option value=\"c\">Third</Option>\n * <Option value=\"d\">Fourth</Option>\n * </Select>\n * );\n * }\n * ```\n * @remarks \\@since 6.0.0\n */\nexport type SelectChangeEvent<Value extends string> =\n ChangeEvent<HTMLInputElement> & { currentTarget: { value: Value } };\n\n/**\n * @remarks \\@since 6.0.0 Rewritten with a new API.\n */\nexport interface SelectProps<Value extends string>\n extends Omit<TextFieldProps, \"placeholder\" | \"type\" | \"onChange\">,\n UserAgentAutoCompleteProps,\n FormFieldOptions {\n /**\n * An optional ref to pass to the hidden `<input type=\"text\" />` element that\n * stores the current value. This is really only useful if you'd like to keep\n * this component uncontrolled and access the value through\n * `inputRef.current.value`.\n */\n inputRef?: Ref<HTMLInputElement>;\n\n /**\n * Set this to a custom dropdown icon or `null` to not render a dropdown icon.\n *\n * @defaultValue `getIcon(\"dropdown\")`\n */\n icon?: ReactNode;\n\n /**\n * Set this value to fully control the value of the select component. The\n * {@link onChange} handler **must** also be provided if this prop exists.\n */\n value?: Value;\n\n /**\n * An optional default value when the value of the select component is\n * uncontrolled.\n *\n * @defaultValue `\"\"`\n */\n defaultValue?: Value;\n\n /** @see {@link SelectChangeEvent} */\n onChange?(event: SelectChangeEvent<Value>): void;\n\n /**\n * Any additional props to provide to the `Menu` component that renders all\n * the `Option`s.\n *\n * The menu will always have these default values unless explicity\n * overwritten by this prop:\n *\n * - `aria-labelledby={containerId}`\n * - `anchor={BELOW_CENTER_ANCHOR}`\n * - `width=\"min\"`\n */\n menuProps?: Omit<MenuProps, \"visible\" | \"onRequestClose\" | \"fixedTo\">;\n\n /**\n * Set this to `true` to update all the `Option` components to no longer\n * render an icon while selected.\n *\n * @defaultValue `false`\n */\n disableSelectedIcon?: boolean;\n\n /**\n * Set this to `true` to prevent the current option from rendering the\n * `leftAddon` in the `TextFieldContainer`.\n *\n * @defaultValue `false`\n */\n disableValueAddon?: boolean;\n\n /**\n * This should be the available `Option`s for the select to choose from. It\n * can also contain `OptGroup` or any other elements but only clicking on an\n * `Option` component will update the value.\n */\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * @remarks \\@since 6.0.0 Rewritten with a new API.\n */\nexport function Select<Value extends string>(\n props: SelectProps<Value>\n): ReactElement {\n const {\n id: propId,\n className,\n active = false,\n inputRef: propInputRef,\n inputClassName,\n menuProps = {},\n containerProps: propContainerProps = {},\n icon: propIcon,\n value,\n defaultValue,\n theme: propTheme,\n onChange = noop,\n leftAddon,\n rightAddon: propRightAddon,\n disableValueAddon = false,\n disableSelectedIcon = false,\n children,\n ...remaining\n } = props;\n const { disabled = false, form } = props;\n\n const id = useEnsuredId(propId, \"select\");\n const containerId = useEnsuredId(propContainerProps.id, \"select-container\");\n const icon = getIcon(\"dropdown\", propIcon);\n const theme = getFormConfig(\"theme\", propTheme);\n\n const { toggled: visible, enable: show, disable: hide } = useToggle();\n const [inputRef, inputRefCallback] = useEnsuredRef(propInputRef);\n const [containerRef, containerRefCallback] = useEnsuredRef(\n propContainerProps.ref\n );\n const [menuRef, menuRefCallback] = useEnsuredRef(menuProps.nodeRef);\n const [currentValue, setCurrentValue] = useState(() => {\n if (typeof defaultValue !== \"undefined\") {\n return defaultValue;\n }\n\n return typeof value !== \"undefined\" ? value : EMPTY_STRING;\n });\n const initialValue = useRef(currentValue);\n\n useEffect(() => {\n const select = inputRef.current;\n if (!select) {\n return;\n }\n\n const formElement =\n select.closest<HTMLFormElement>(\"form\") ||\n (form && document.getElementById(form)) ||\n null;\n\n if (!formElement) {\n return;\n }\n\n const handleReset = (): void => {\n triggerManualChangeEvent(select, initialValue.current);\n };\n\n formElement.addEventListener(\"reset\", handleReset);\n return () => {\n formElement.removeEventListener(\"reset\", handleReset);\n };\n }, [form, inputRef]);\n\n const { options, searchValues, currentOption, currentIndex } =\n extractOptionsFromChildren(\n children,\n typeof value === \"undefined\" ? currentValue : value\n );\n const totalOptions = options.length - 1;\n\n let rightAddon = propRightAddon;\n if (typeof rightAddon === \"undefined\" && icon) {\n rightAddon = <IconRotator rotated={visible}>{icon}</IconRotator>;\n }\n\n const listboxContext = useMemo(\n () => ({\n inputRef,\n currentValue: typeof value === \"undefined\" ? currentValue : value,\n disableSelectedIcon,\n }),\n [currentValue, disableSelectedIcon, inputRef, value]\n );\n\n // TODO: Need to update this to support editable listboxes where these props\n // would go to the input element instead of the container\n const a11yProps = {\n \"aria-haspopup\": \"listbox\",\n \"aria-expanded\": visible,\n role: \"combobox\",\n tabIndex: disabled ? -1 : 0,\n } as const;\n const {\n movementProps,\n movementContext,\n currentFocusIndex,\n setActiveDescendantId,\n } = useKeyboardMovementProvider<HTMLDivElement>({\n onFocus: propContainerProps.onFocus,\n onClick(event) {\n propContainerProps.onClick?.(event);\n if (disabled) {\n return;\n }\n\n show();\n },\n onKeyDown(event) {\n propContainerProps.onKeyDown?.(event);\n if (disabled) {\n return;\n }\n\n if (visible) {\n if (event.key === \"Escape\" || event.key === \"Tab\") {\n event.stopPropagation();\n hide();\n }\n\n return;\n }\n\n if (isSearchableEvent(event)) {\n event.stopPropagation();\n\n const nextIndex = findMatchIndex({\n value: event.key,\n values: searchValues,\n startIndex: event.shiftKey ? -1 : currentIndex,\n });\n\n if (nextIndex !== -1) {\n triggerManualChangeEvent(inputRef.current, options[nextIndex].value);\n }\n return;\n }\n\n switch (event.key) {\n case \" \":\n event.preventDefault();\n event.stopPropagation();\n show();\n break;\n case \"Enter\":\n tryToSubmitRelatedForm(event, form);\n break;\n case \"Home\":\n event.preventDefault();\n event.stopPropagation();\n if (currentIndex !== 0) {\n triggerManualChangeEvent(inputRef.current, options[0].value);\n }\n break;\n case \"End\":\n event.preventDefault();\n event.stopPropagation();\n if (currentIndex !== totalOptions) {\n triggerManualChangeEvent(\n inputRef.current,\n options[totalOptions].value\n );\n }\n break;\n case \"ArrowDown\":\n case \"ArrowUp\": {\n event.preventDefault();\n event.stopPropagation();\n\n const increment = event.key === \"ArrowDown\";\n if (currentIndex === -1 && !increment) {\n // this matches the native select behavior where it will do\n // nothing if there is no current value\n return;\n }\n\n const nextIndex = loop({\n max: totalOptions,\n value: currentIndex,\n minmax: true,\n increment,\n });\n\n triggerManualChangeEvent(inputRef.current, options[nextIndex].value);\n break;\n }\n }\n },\n loopable: false,\n searchable: true,\n programmatic: true,\n includeDisabled: false,\n tabIndexBehavior: \"virtual\",\n getDefaultFocusedIndex(focusOptions) {\n if (typeof menuProps.getDefaultFocusedIndex === \"function\") {\n return menuProps.getDefaultFocusedIndex(focusOptions);\n }\n\n const val = typeof value === \"undefined\" ? currentValue : value;\n return options.findIndex((option) => option.value === val);\n },\n getFocusableElements() {\n const menu = menuRef.current;\n if (!menu) {\n return [];\n }\n\n return [\n ...menu.querySelectorAll<HTMLLIElement>(\n '[role=\"option\"]:not([aria-disabled])'\n ),\n ];\n },\n });\n\n const containerProps: Required<SelectProps<Value>>[\"containerProps\"] = {\n ...propContainerProps,\n ...movementProps,\n ...a11yProps,\n ref: containerRefCallback,\n };\n\n const { onEntering, onEntered, onExiting, onExited, disableTransition } =\n menuProps;\n const handleMounting =\n (callback: TransitionEnterHandler | undefined = noop, skipped: boolean) =>\n (appearing: boolean) => {\n callback(appearing);\n\n const menu = menuRef.current;\n if (!menu || skipped) {\n return;\n }\n\n // Since the keyboard movement behavior is tied to the\n // `TextFieldContainer` or `input` element instead of the menu for this\n // widget, the focus index and active descendant must manually be updated\n // whenever the menu becomes visible. Without this, no items will be\n // focused until the first keyboard event that would move focus\n const val = typeof value === \"undefined\" ? currentValue : value;\n const focusables = getNonDisabledOptions(menu);\n const index = Math.max(\n 0,\n options.findIndex((option) => option.value === val)\n );\n focusables[index].scrollIntoView({ block: \"nearest\" });\n currentFocusIndex.current = index;\n setActiveDescendantId(focusables[index]?.id || \"\");\n };\n\n const handleUnmounting =\n (callback: TransitionExitHandler | undefined = noop, skipped = false) =>\n (): void => {\n callback();\n\n if (!skipped) {\n // since the menu is unmounted or set to hidden while not visible, need\n // to clear the aria-activedescendant and current focus index when\n // hiding\n currentFocusIndex.current = -1;\n setActiveDescendantId(\"\");\n }\n };\n\n return (\n <ListboxProvider value={listboxContext}>\n <KeyboardMovementProvider value={movementContext}>\n <TextField\n {...remaining}\n aria-hidden\n id={id}\n ref={inputRefCallback}\n containerProps={containerProps}\n type=\"text\"\n tabIndex={-1}\n theme={theme}\n value={value}\n defaultValue={defaultValue}\n active={active || visible}\n leftAddon={leftAddon}\n rightAddon={rightAddon}\n className={cnb(\"rmd-select-container\", className)}\n inputClassName={select({\n theme,\n className: inputClassName,\n })}\n onChange={(event) => {\n onChange(event as SelectChangeEvent<Value>);\n if (typeof value !== \"undefined\") {\n return;\n }\n\n const nextValue = event.currentTarget.value;\n const valueAsNumber = parseFloat(nextValue);\n const nextOption = options.find(\n (option) =>\n // need to compare both here since\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n option.value === nextValue || option.value === valueAsNumber\n );\n\n setCurrentValue(\n nextOption ? nextOption.value : initialValue.current\n );\n }}\n >\n <SelectValue disableAddon={disableValueAddon} {...currentOption} />\n </TextField>\n <Menu\n aria-labelledby={containerId}\n anchor={BELOW_CENTER_ANCHOR}\n role=\"listbox\"\n width=\"min\"\n {...menuProps}\n ref={menuRefCallback}\n visible={visible}\n fixedTo={containerRef}\n onRequestClose={hide}\n onEntering={handleMounting(onEntering, false)}\n onEntered={handleMounting(onEntered, !disableTransition)}\n onExiting={handleUnmounting(onExiting, false)}\n onExited={handleUnmounting(onExited, !disableTransition)}\n sheetProps={{\n ...menuProps.sheetProps,\n onEntering: handleMounting(menuProps.sheetProps?.onEntering, false),\n onEntered: handleMounting(\n menuProps.sheetProps?.onEntered,\n !disableTransition\n ),\n }}\n >\n {children}\n </Menu>\n </KeyboardMovementProvider>\n </ListboxProvider>\n );\n}\n"],"names":["cnb","useEffect","useMemo","useRef","useState","IconRotator","getIcon","Menu","findMatchIndex","KeyboardMovementProvider","useKeyboardMovementProvider","isSearchableEvent","BELOW_CENTER_ANCHOR","useEnsuredId","useEnsuredRef","useToggle","loop","SelectValue","TextField","getFormConfig","select","extractOptionsFromChildren","ListboxProvider","triggerManualChangeEvent","tryToSubmitRelatedForm","EMPTY_STRING","noop","getNonDisabledOptions","container","querySelectorAll","Select","props","id","propId","className","active","inputRef","propInputRef","inputClassName","menuProps","containerProps","propContainerProps","icon","propIcon","value","defaultValue","theme","propTheme","onChange","leftAddon","rightAddon","propRightAddon","disableValueAddon","disableSelectedIcon","children","remaining","disabled","form","containerId","toggled","visible","enable","show","disable","hide","inputRefCallback","containerRef","containerRefCallback","ref","menuRef","menuRefCallback","nodeRef","currentValue","setCurrentValue","initialValue","current","formElement","closest","document","getElementById","handleReset","addEventListener","removeEventListener","options","searchValues","currentOption","currentIndex","totalOptions","length","rotated","listboxContext","a11yProps","role","tabIndex","movementProps","movementContext","currentFocusIndex","setActiveDescendantId","onFocus","onClick","event","onKeyDown","key","stopPropagation","nextIndex","values","startIndex","shiftKey","preventDefault","increment","max","minmax","loopable","searchable","programmatic","includeDisabled","tabIndexBehavior","getDefaultFocusedIndex","focusOptions","val","findIndex","option","getFocusableElements","menu","onEntering","onEntered","onExiting","onExited","disableTransition","handleMounting","callback","skipped","appearing","focusables","index","Math","scrollIntoView","block","handleUnmounting","aria-hidden","type","nextValue","currentTarget","valueAsNumber","parseFloat","nextOption","find","disableAddon","aria-labelledby","anchor","width","fixedTo","onRequestClose","sheetProps"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QAKH,QAAQ;AACf,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,IAAI,QAAwB,kBAAkB;AACvD,SAASC,cAAc,QAAQ,gCAAgC;AAC/D,SACEC,wBAAwB,EACxBC,2BAA2B,QACtB,6CAA6C;AACpD,SAASC,iBAAiB,QAAQ,uBAAuB;AACzD,SAASC,mBAAmB,QAAQ,8BAA8B;AAKlE,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SAASC,IAAI,QAAQ,mBAAmB;AACxC,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,SAAS,QAA6B,iBAAiB;AAChE,SAASC,aAAa,QAAQ,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AO7E,KAAK,KAAKmG;wBAGnDtE,gBACEwE,aAAaA,WAAWrG,KAAK,GAAG8B,aAAaC,OAAO;oBAExD;8BAEA,cAAA,KAAC1D;wBAAYkI,cAAc/F;wBAAoB,GAAGiC,aAAa;;;8BAEjE,KAAC9E;oBACC6I,mBAAiB1F;oBACjB2F,QAAQzI;oBACRgF,MAAK;oBACL0D,OAAM;oBACL,GAAG/G,SAAS;oBACb6B,KAAKE;oBACLV,SAASA;oBACT2F,SAASrF;oBACTsF,gBAAgBxF;oBAChB4D,YAAYK,eAAeL,YAAY;oBACvCC,WAAWI,eAAeJ,WAAW,CAACG;oBACtCF,WAAWY,iBAAiBZ,WAAW;oBACvCC,UAAUW,iBAAiBX,UAAU,CAACC;oBACtCyB,YAAY;wBACV,GAAGlH,UAAUkH,UAAU;wBACvB7B,YAAYK,eAAe1F,UAAUkH,UAAU,EAAE7B,YAAY;wBAC7DC,WAAWI,eACT1F,UAAUkH,UAAU,EAAE5B,WACtB,CAACG;oBAEL;8BAEC1E;;;;;AAKX"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/SelectValue.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { type ReactElement } from \"react\";\nimport { bem } from \"../utils/bem.js\";\nimport { type OptionProps } from \"./Option.js\";\n\nconst styles = bem(\"rmd-select-value\");\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface SelectValueProps extends Partial<OptionProps> {\n disableAddon: boolean;\n}\n\n/**\n * **Server Component**\n *\n * This component is used to render the current option.\n *\n * @remarks \\@since 6.0.0\n * @internal\n */\nexport function SelectValue(props: SelectValueProps): ReactElement {\n const { leftAddon, disableAddon, children: propChildren } = props;\n\n let children = propChildren;\n // when the children are a string or number, wrap it in additional span so\n // that overflow can be ellipsis-ed\n if (typeof children === \"string\" || typeof children === \"number\") {\n children = <span className={styles(\"v\")}>{children}</span>;\n }\n\n return (\n <div className={cnb(styles())}>\n {!disableAddon && leftAddon}\n {children}\n </div>\n );\n}\n"],"names":["cnb","bem","styles","SelectValue","props","leftAddon","disableAddon","children","propChildren","span","className","div"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAEhC,SAASC,GAAG,QAAQ,kBAAkB;AAGtC,MAAMC,SAASD,IAAI;AASnB;;;;;;;CAOC,GACD,OAAO,SAASE,YAAYC,KAAuB;IACjD,MAAM,EAAEC,SAAS,EAAEC,YAAY,EAAEC,UAAUC,YAAY,EAAE,GAAGJ;IAE5D,IAAIG,WAAWC;IACf,0EAA0E;IAC1E,mCAAmC;IACnC,IAAI,OAAOD,aAAa,YAAY,OAAOA,aAAa,UAAU;QAChEA,yBAAW,KAACE;YAAKC,WAAWR,OAAO;sBAAOK;;IAC5C;IAEA,qBACE,MAACI;QAAID,WAAWV,IAAIE;;YACjB,CAACI,gBAAgBD;YACjBE;;;AAGP"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/Slider.tsx"],"sourcesContent":["\"use client\";\nimport {\n useRef,\n useState,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { useDraggable } from \"../draggable/useDraggable.js\";\nimport { type TooltipProps } from \"../tooltip/Tooltip.js\";\nimport {\n type LabelRequiredForA11y,\n type PropsWithRef,\n type UseStateSetter,\n} from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { identity } from \"../utils/identity.js\";\nimport { withinRange } from \"../utils/withinRange.js\";\nimport { SliderContainer, type SliderAddonProps } from \"./SliderContainer.js\";\nimport {\n SliderThumb,\n type SliderThumbPresentation,\n type SliderThumbProps,\n} from \"./SliderThumb.js\";\nimport { SliderTrack } from \"./SliderTrack.js\";\nimport {\n SliderValueMarks,\n type SliderMarksOptions,\n} from \"./SliderValueMarks.js\";\nimport { getJumpValue } from \"./sliderUtils.js\";\nimport { type RangeSliderState } from \"./useRangeSlider.js\";\nimport { type SliderState, type SliderValueOptions } from \"./useSlider.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-slider-color\"?: string;\n \"--rmd-slider-active-color\"?: string;\n \"--rmd-slider-inactive-color\"?: string;\n \"--rmd-slider-size\"?: string | number;\n \"--rmd-slider-active-size\"?: string | number;\n \"--rmd-slider-inactive-size\"?: string | number;\n \"--rmd-slider-vertical-size\"?: string | number;\n \"--rmd-slider-offset-1\"?: string;\n \"--rmd-slider-offset-2\"?: string;\n \"--rmd-slider-tooltip-scale\"?: string | number;\n \"--rmd-slider-tooltip-translate\"?: string | number;\n \"--rmd-slider-mark-offset\"?: string;\n }\n}\n\nconst emptyString = (): string => \"\";\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @remarks \\@since 2.5.0\n */\nexport interface BaseSliderProps\n extends HTMLAttributes<HTMLDivElement>,\n SliderThumbPresentation,\n SliderValueOptions,\n SliderAddonProps,\n SliderMarksOptions {\n /**\n * This can be used to apply a ref to the container element since this\n * component does not use `forwardRef`.\n */\n containerRef?: Ref<HTMLDivElement>;\n\n /**\n * The amount to jump the slider's value when the `PageUp` or `PageDown`\n * key is pressed.\n *\n * The default value is 1/10th of the range.\n *\n * @defaultValue `(numberOfSteps / 10) * step`\n */\n jump?: number;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /** @defaultValue `false` */\n vertical?: boolean;\n\n /**\n * This can be used to apply custom styles or a `ref` to the track element if\n * needed.\n */\n trackProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n\n /**\n * This can be used to configure any additional tooltip props like the\n * CSS transition `classNames`, styles, etc.\n *\n * This will only be used when {@link discrete} is `true`.\n *\n * Note: The `position` will always be `\"above\"` for horizontal sliders and\n * `\"left\"` for vertical sliders.\n */\n tooltipProps?: Omit<Partial<TooltipProps>, \"position\">;\n}\n\n/**\n * @remarks\n * \\@since 2.5.0\n * \\@since 6.0.0 Only requires `value` and `setValue` props instead of all the\n * slider controls.\n * \\@since 6.0.0 The `thumbLabel` and `thumbLabelledBy` props were removed. Use\n * the `aria-label` or `aria-labelledby` props instead.\n */\nexport interface SliderProps extends BaseSliderProps, SliderState {\n /**\n * Any additional props that should be provided to the thumb element. This can\n * be useful for applying additional styling.\n */\n thumbProps?: HTMLAttributes<HTMLSpanElement>;\n\n /**\n * This can be used to update the discrete slider's tooltip props.\n *\n * @example\n * Custom Styles\n * ```tsx\n * <Slider\n * {...slider}\n * discrete\n * getTooltipProps={(value) => ({\n * className: cssUtils({\n * backgroundColor: value < 30 ? \"warning\" : undefined,\n * }),\n * })}\n * />\n * ```\n */\n getTooltipProps?(value: number): Partial<TooltipProps>;\n\n /**\n * This can be used to update the discrete slider's value tooltip.\n *\n * @example\n * More Value Information\n * ```tsx\n * <Slider\n * {...slider}\n * discrete\n * getTooltipChildren={(value) => (\n * <TextIconSpacing icon={<FavoriteIcon />}>\n * {value}\n * </TextIconSpacing>\n * )}\n * />\n * ```\n *\n * This will only be used when {@link discrete} is `true`.\n *\n * @defaultValue `(value) => value`\n */\n getTooltipChildren?(value: number): ReactNode;\n}\n\n/**\n * @remarks\n * \\@since 2.5.0\n * \\@since 6.0.0 Only requires `rangeValue` and `setRangeValue` props instead of\n * all the slider controls.\n * \\@since 6.0.0 The `thumb1Label`, `thumb1LabelledBy`, `thumb1Props`,\n * `thumb2Label`, `thumb2LabelledBy` and `thumb2Props` were renamed to\n * `minThumbLabel`, `minThumbLabelledBy`, `minThumbProps`, `maxThumbLabel`,\n * `maxThumbLabelledBy`, and `maxThumbProps` respectively.\n */\nexport interface RangeSliderProps extends BaseSliderProps, RangeSliderState {\n /**\n * Any additional props that should be provided to the min value thumb\n * element. This can be useful for applying additional styling.\n */\n minThumbProps?: HTMLAttributes<HTMLSpanElement>;\n\n /**\n * Any additional props that should be provided to the max value thumb\n * element. This can be useful for applying additional styling.\n */\n maxThumbProps?: HTMLAttributes<HTMLSpanElement>;\n\n /**\n * The `aria-label` to apply to the min value.\n *\n * Note: Either this prop or the {@link minThumbLabelledBy} are required for\n * accessibility.\n *\n * @defaultValue `\"Min\"`\n */\n minThumbLabel?: string;\n\n /**\n * Set this to an element's id that labels the min value.\n *\n * Note: Either this prop or the {@link minThumbLabel} are required for\n * accessibility.\n */\n minThumbLabelledBy?: string;\n\n /**\n * The `aria-label` to apply to the max value.\n *\n * Note: Either this prop or the {@link maxThumbLabelledBy} are required for\n * accessibility.\n *\n * @defaultValue `\"Max\"`\n */\n maxThumbLabel?: string;\n\n /**\n * Set this to an element's id that labels the max value.\n *\n * Note: Either this prop or the {@link maxThumbLabel} are required for\n * accessibility.\n */\n maxThumbLabelledBy?: string;\n\n /**\n * This can be used to update the discrete slider's tooltip props.\n *\n * @example\n * Custom Styles\n * ```tsx\n * <Slider\n * {...slider}\n * discrete\n * getTooltipProps={(value, isFirstThumb) => ({\n * className: cssUtils({\n * backgroundColor: value < 30 && isFirstThumb ? \"warning\" : undefined,\n * }),\n * })}\n * />\n * ```\n */\n getTooltipProps?(value: number, isFirstThumb: boolean): Partial<TooltipProps>;\n\n /**\n * This can be used to update the discrete slider's value tooltip.\n *\n * @example\n * More Value Information\n * ```tsx\n * <Slider\n * {...rangeSlider}\n * discrete\n * getTooltipChildren={(value, isFirstThumb) => (\n * <TextIconSpacing\n * icon={isFirstThumb ? <FavoriteIcon /> : <CloseIcon /}\n * iconAfter={!isFirstValue}\n * >\n * {value}\n * </TextIconSpacing>\n * )}\n * />\n * ```\n *\n * This will only be used when {@link discrete} is `true`.\n *\n * @defaultValue `(value) => value`\n */\n getTooltipChildren?(value: number, isFirstThumb: boolean): ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * @example\n * Simple Example\n * ```tsx\n * import { Form, Slider, useSlider } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const slider = useSlider({\n * // these are the defaults and can be changed\n * min: 0,\n * max: 100,\n * step: 1,\n * defaultValue: 50,\n * });\n *\n * // if you need access to the current value or manually change the value\n * // yourself.\n * const { value, setValue } = slider;\n *\n * return (\n * <Form>\n * <Slider {...slider} aria-label=\"Volume\" />\n * </Form>\n * );\n * }\n * ```\n *\n * @example\n * Range Slider Example\n * ```tsx\n * import { Fieldset, Form, Legend, Slider, useRangeSlider } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n * import { useId } from \"react\";\n *\n * function Example(): ReactElement {\n * const slider = useRangeSlider({\n * // these are the defaults and can be changed\n * min: 0,\n * max: 100,\n * step: 1,\n * defaultValue: [0, 100],\n * });\n *\n * // if you need access to the current value or manually change the value\n * // yourself.\n * const { rangeValue, setRangeValue } = slider;\n * const [minPrice, maxPrice] = rangeValue;\n *\n * return (\n * <Form>\n * <Fieldset>\n * <Legend>Price Range</Legend>\n * <Slider {...slider} />\n * </Fieldset>\n * </Form>\n * );\n * }\n * ```\n *\n * @remarks\n * \\@since 2.5.0\n * \\@since 6.0.0 The `Slider` and `RangeSlider` have been combined into the\n * single `Slider` component and removed the `label` support.\n * \\@since 6.0.0 Each thumb includes an invisible `<input type=\"range\">` instead\n * of an `<input type=\"hidden\">`.\n */\nexport function Slider(props: LabelRequiredForA11y<SliderProps>): ReactElement;\nexport function Slider(props: RangeSliderProps): ReactElement;\nexport function Slider(\n props: LabelRequiredForA11y<SliderProps> | RangeSliderProps\n): ReactElement {\n const {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n id: propId,\n min = 0,\n max = 100,\n step = 1,\n jump: propJump,\n vertical = false,\n discrete = false,\n disabled = false,\n getValueText = emptyString,\n children,\n marks = false,\n value,\n setValue,\n rangeValue,\n setRangeValue,\n trackProps,\n thumbProps,\n minThumbProps,\n minThumbLabel,\n minThumbLabelledBy,\n maxThumbProps,\n maxThumbLabel,\n maxThumbLabelledBy,\n tooltipProps,\n containerRef,\n getMarkProps = noop,\n getMarkLabelProps = noop,\n tooltipVisibility = \"auto\",\n getTooltipProps = noop,\n getTooltipChildren = identity,\n disableSmoothDragging = !!marks,\n ...remaining\n } = props as SliderProps & RangeSliderProps;\n\n const jump = getJumpValue({ min, max, step, jump: propJump });\n const isRangeSlider = typeof value !== \"number\";\n\n const thumb1Id = useEnsuredId(propId, \"slider\");\n const thumb2Id = `${thumb1Id}-2`;\n const thumb1Ref = useRef<HTMLSpanElement>(null);\n const thumb2Ref = useRef<HTMLSpanElement>(null);\n\n let thumb1Max = max;\n let thumb2Min = min;\n let thumb1Label: string | undefined;\n let thumb1LabelledBy: string | undefined;\n let thumb2Label: string | undefined;\n let thumb2LabelledBy: string | undefined;\n let thumb1Value: number;\n let thumb2Value: number;\n let setThumb1Value: UseStateSetter<number>;\n let setThumb2Value: UseStateSetter<number>;\n if (!isRangeSlider) {\n thumb1Value = value;\n setThumb1Value = setValue;\n thumb2Value = max;\n setThumb2Value = noop;\n thumb1Label = ariaLabel;\n thumb1LabelledBy = ariaLabelledBy;\n } else {\n thumb1LabelledBy = minThumbLabelledBy;\n thumb1Label = minThumbLabel || (minThumbLabelledBy ? undefined : \"Min\");\n thumb2LabelledBy = maxThumbLabelledBy;\n thumb2Label = maxThumbLabel || (maxThumbLabelledBy ? undefined : \"max\");\n\n [thumb1Value, thumb2Value] = rangeValue;\n\n thumb1Max = thumb2Value - step;\n thumb2Min = thumb1Value + step;\n\n setThumb1Value = (valueOrSetter) => {\n setRangeValue((prevRangeValue) => {\n const value =\n typeof valueOrSetter === \"number\"\n ? valueOrSetter\n : valueOrSetter(prevRangeValue[0]);\n\n return [value, prevRangeValue[1]];\n });\n };\n setThumb2Value = (valueOrSetter) => {\n setRangeValue((prevRangeValue) => {\n const value =\n typeof valueOrSetter === \"number\"\n ? valueOrSetter\n : valueOrSetter(prevRangeValue[1]);\n\n return [prevRangeValue[0], value];\n });\n };\n }\n\n const [thumb1Dragging, setThumb1Dragging] = useState(false);\n const {\n onKeyDown: thumb1OnKeyDown,\n onMouseUp: thumb1OnMouseUp,\n onMouseDown: thumb1OnMouseDown,\n onMouseMove: thumb1OnMouseMove,\n onTouchStart: thumb1OnTouchStart,\n onTouchMove: thumb1OnTouchMove,\n dragPercentage: thumb1DragPercentage,\n draggableRef: thumb1DraggableRef,\n } = useDraggable({\n ref: thumb1Ref,\n min,\n max: thumb1Max,\n rangeMax: max,\n step,\n value: thumb1Value,\n setValue: setThumb1Value,\n dragging: thumb1Dragging,\n setDragging: setThumb1Dragging,\n disabled,\n vertical,\n withinOffsetParent: true,\n disableDraggingCursorClassName: true,\n onKeyDown(event) {\n switch (event.key) {\n case \"PageUp\":\n event.preventDefault();\n event.stopPropagation();\n setThumb1Value((prevValue) =>\n withinRange({\n min,\n max: thumb1Max,\n value: prevValue + jump,\n })\n );\n break;\n case \"PageDown\":\n event.preventDefault();\n event.stopPropagation();\n setThumb1Value((prevValue) =>\n withinRange({\n min,\n max: thumb1Max,\n value: prevValue - jump,\n })\n );\n break;\n }\n },\n });\n\n const [thumb2Dragging, setThumb2Dragging] = useState(false);\n const {\n onKeyDown: thumb2OnKeyDown,\n onMouseUp: thumb2OnMouseUp,\n onMouseDown: thumb2OnMouseDown,\n onMouseMove: thumb2OnMouseMove,\n onTouchStart: thumb2OnTouchStart,\n onTouchMove: thumb2OnTouchMove,\n dragPercentage: thumb2DragPercentage,\n draggableRef: thumb2DraggableRef,\n } = useDraggable({\n ref: thumb2Ref,\n min: thumb2Min,\n max,\n rangeMin: min,\n step,\n value: thumb2Value,\n setValue: setThumb2Value,\n dragging: thumb2Dragging,\n setDragging: setThumb2Dragging,\n vertical,\n disabled,\n withinOffsetParent: true,\n disableDraggingCursorClassName: true,\n onKeyDown(event) {\n switch (event.key) {\n case \"PageUp\":\n event.preventDefault();\n event.stopPropagation();\n setThumb2Value((prevValue) =>\n withinRange({\n min: thumb2Min,\n max,\n value: prevValue + jump,\n })\n );\n break;\n case \"PageDown\":\n event.preventDefault();\n event.stopPropagation();\n setThumb2Value((prevValue) =>\n withinRange({\n min: thumb2Min,\n max,\n value: prevValue - jump,\n })\n );\n break;\n }\n },\n });\n\n const dragging = thumb1Dragging || thumb2Dragging;\n const sharedThumbProps = {\n step,\n animate: !dragging,\n discrete,\n disabled,\n vertical,\n getValueText,\n tooltipProps,\n getTooltipProps,\n getTooltipChildren,\n tooltipVisibility,\n disableSmoothDragging,\n } as const satisfies Partial<SliderThumbProps>;\n\n return (\n <SliderContainer {...remaining} ref={containerRef} vertical={vertical}>\n <SliderTrack\n {...trackProps}\n min={min}\n max={max}\n thumb1Ref={thumb1Ref}\n thumb1Value={thumb1Value}\n thumb1Dragging={!disableSmoothDragging && thumb1Dragging}\n thumb1DragPercentage={thumb1DragPercentage}\n thumb1OnMouseUp={thumb1OnMouseUp}\n thumb1OnMouseDown={thumb1OnMouseDown}\n thumb1OnMouseMove={thumb1OnMouseMove}\n thumb1OnTouchStart={thumb1OnTouchStart}\n thumb1OnTouchMove={thumb1OnTouchMove}\n thumb2Ref={thumb2Ref}\n thumb2Value={thumb2Value}\n thumb2Dragging={!disableSmoothDragging && thumb2Dragging}\n thumb2DragPercentage={thumb2DragPercentage}\n thumb2OnMouseUp={thumb2OnMouseUp}\n thumb2OnMouseDown={thumb2OnMouseDown}\n thumb2OnMouseMove={thumb2OnMouseMove}\n thumb2OnTouchStart={thumb2OnTouchStart}\n thumb2OnTouchMove={thumb2OnTouchMove}\n animate={!disableSmoothDragging && !dragging}\n disabled={disabled}\n vertical={vertical}\n isRangeSlider={isRangeSlider}\n >\n <SliderThumb\n aria-label={thumb1Label as string}\n aria-labelledby={thumb1LabelledBy}\n id={thumb1Id}\n {...thumbProps}\n {...minThumbProps}\n {...sharedThumbProps}\n ref={thumb1DraggableRef}\n min={min}\n max={thumb1Max}\n value={thumb1Value}\n index={1}\n active={thumb1Dragging}\n onChange={(event) =>\n setThumb1Value(event.currentTarget.valueAsNumber)\n }\n onKeyDown={thumb1OnKeyDown}\n />\n {isRangeSlider && (\n <SliderThumb\n aria-label={thumb2Label as string}\n aria-labelledby={thumb2LabelledBy}\n id={thumb2Id}\n {...maxThumbProps}\n {...sharedThumbProps}\n ref={thumb2DraggableRef}\n min={thumb2Min}\n max={max}\n value={thumb2Value}\n index={2}\n active={thumb2Dragging}\n onChange={(event) =>\n setThumb2Value(event.currentTarget.valueAsNumber)\n }\n onKeyDown={thumb2OnKeyDown}\n />\n )}\n {marks && (\n <SliderValueMarks\n min={min}\n max={max}\n step={step}\n marks={marks}\n vertical={vertical}\n thumb1Value={thumb1Value}\n thumb2Value={thumb2Value}\n isRangeSlider={isRangeSlider}\n getMarkProps={getMarkProps}\n getMarkLabelProps={getMarkLabelProps}\n />\n )}\n {children}\n </SliderTrack>\n </SliderContainer>\n );\n}\n"],"names":["useRef","useState","useDraggable","useEnsuredId","identity","withinRange","SliderContainer","SliderThumb","SliderTrack","SliderValueMarks","getJumpValue","emptyString","noop","Slider","props","ariaLabel","ariaLabelledBy","id","propId","min","max","step","jump","propJump","vertical","discrete","disabled","getValueText","children","marks","value","setValue","rangeValue","setRangeValue","trackProps","thumbProps","minThumbProps","minThumbLabel","minThumbLabelledBy","maxThumbProps","maxThumbLabel","maxThumbLabelledBy","tooltipProps","containerRef","getMarkProps","getMarkLabelProps","tooltipVisibility","getTooltipProps","getTooltipChildren","disableSmoothDragging","remaining","isRangeSlider","thumb1Id","thumb2Id","thumb1Ref","thumb2Ref","thumb1Max","thumb2Min","thumb1Label","thumb1LabelledBy","thumb2Label","thumb2LabelledBy","thumb1Value","thumb2Value","setThumb1Value","setThumb2Value","undefined","valueOrSetter","prevRangeValue","thumb1Dragging","setThumb1Dragging","onKeyDown","thumb1OnKeyDown","onMouseUp","thumb1OnMouseUp","onMouseDown","thumb1OnMouseDown","onMouseMove","thumb1OnMouseMove","onTouchStart","thumb1OnTouchStart","onTouchMove","thumb1OnTouchMove","dragPercentage","thumb1DragPercentage","draggableRef","thumb1DraggableRef","ref","rangeMax","dragging","setDragging","withinOffsetParent","disableDraggingCursorClassName","event","key","preventDefault","stopPropagation","prevValue","thumb2Dragging","setThumb2Dragging","thumb2OnKeyDown","thumb2OnMouseUp","thumb2OnMouseDown","thumb2OnMouseMove","thumb2OnTouchStart","thumb2OnTouchMove","thumb2DragPercentage","thumb2DraggableRef","rangeMin","sharedThumbProps","animate","aria-label","aria-labelledby","index","active","onChange","currentTarget","valueAsNumber"],"mappings":"AAAA;;AACA,SACEA,MAAM,EACNC,QAAQ,QAKH,QAAQ;AACf,SAASC,YAAY,QAAQ,+BAA+B;AAO5D,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,WAAW,QAAQ,0BAA0B;AACtD,SAASC,eAAe,QAA+B,uBAAuB;AAC9E,SACEC,WAAW,QAGN,mBAAmB;AAC1B,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SACEC,gBAAgB,QAEX,wBAAwB;AAC/B,SAASC,YAAY,QAAQ,mBAAmB;AAqBhD,MAAMC,cAAc,IAAc;AAClC,MAAMC,OAAO;AACX,aAAa;AACf;AA6RA,OAAO,SAASC,OACdC,KAA2D;IAE3D,MAAM,EACJ,cAAcC,SAAS,EACvB,mBAAmBC,cAAc,EACjCC,IAAIC,MAAM,EACVC,MAAM,CAAC,EACPC,MAAM,GAAG,EACTC,OAAO,CAAC,EACRC,MAAMC,QAAQ,EACdC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,eAAehB,WAAW,EAC1BiB,QAAQ,EACRC,QAAQ,KAAK,EACbC,KAAK,EACLC,QAAQ,EACRC,UAAU,EACVC,aAAa,EACbC,UAAU,EACVC,UAAU,EACVC,aAAa,EACbC,aAAa,EACbC,kBAAkB,EAClBC,aAAa,EACbC,aAAa,EACbC,kBAAkB,EAClBC,YAAY,EACZC,YAAY,EACZC,eAAehC,IAAI,EACnBiC,oBAAoBjC,IAAI,EACxBkC,oBAAoB,MAAM,EAC1BC,kBAAkBnC,IAAI,EACtBoC,qBAAqB5C,QAAQ,EAC7B6C,wBAAwB,CAAC,CAACpB,KAAK,EAC/B,GAAGqB,WACJ,GAAGpC;IAEJ,MAAMQ,OAAOZ,aAAa;QAAES;QAAKC;QAAKC;QAAMC,MAAMC;IAA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AACC,aAAa;oBAElD9C,WAAWC;;gBAEZrB,+BACC,KAAC5C;oBACCwG,cAAYnD;oBACZoD,mBAAiBnD;oBACjB5C,IAAIoC;oBACH,GAAGd,aAAa;oBAChB,GAAGsE,gBAAgB;oBACpBtB,KAAKoB;oBACLxF,KAAKsC;oBACLrC,KAAKA;oBACLU,OAAOiC;oBACPkD,OAAO;oBACPC,QAAQhB;oBACRiB,UAAU,CAACtB,QACT5B,eAAe4B,MAAMuB,aAAa,CAACC,aAAa;oBAElD9C,WAAW6B;;gBAGdvE,uBACC,KAACpB;oBACCU,KAAKA;oBACLC,KAAKA;oBACLC,MAAMA;oBACNQ,OAAOA;oBACPL,UAAUA;oBACVsC,aAAaA;oBACbC,aAAaA;oBACbZ,eAAeA;oBACfP,cAAcA;oBACdC,mBAAmBA;;gBAGtBjB;;;;AAIT"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/SliderContainer.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-slider-container\");\n\n/**\n * @remarks\n * \\@since 2.5.0\n * \\@since 6.0.0 Renamed from `SliderAddons` to `SliderContainerAddonProps`\n */\nexport interface SliderAddonProps {\n /**\n * An optional addon to render before the slider's track. This can be anything\n * and will be wrapped in the `TextIconSpacing` component.\n *\n * When the `vertical` prop is enabled, the addon will appear underneath the\n * track.\n */\n beforeAddon?: ReactNode;\n\n /**\n * An optional addon to render after the slider's track. This can be anything\n * and will be wrapped in the `TextIconSpacing` component.\n *\n * When the `vertical` prop is enabled, the addon will appear above the track.\n */\n afterAddon?: ReactNode;\n}\n\n/**\n * @internal\n * @remarks\n * \\@since 2.5.0\n * \\@since 6.0.0 Removed the `label` support since you'll generally want to use\n * a `Fieldset` instead.\n */\nexport interface SliderContainerProps\n extends HTMLAttributes<HTMLDivElement>,\n SliderAddonProps {\n vertical: boolean;\n}\n\n/**\n * **Server Component**\n *\n * The `SliderContainer` component is mostly an internal component that is\n * built-in to the `Slider` and `RangeSlider` components to add addons to the\n * left or right of the `SliderTrack`. When vertical, it will add addons to the\n * bottom or top instead.\n *\n * @internal\n * @remarks\n * \\@since 2.5.0\n * \\@since 6.0.0 Removed the `label` support since you'll generally want to use\n * a `Fieldset` instead.\n */\nexport const SliderContainer = forwardRef<HTMLDivElement, SliderContainerProps>(\n function SliderContainer(props, ref) {\n const {\n className,\n children,\n beforeAddon,\n afterAddon,\n vertical,\n ...remaining\n } = props;\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={cnb(\n styles({\n h: !vertical,\n \"pad-left\": !vertical && !beforeAddon,\n \"pad-right\": !vertical && !afterAddon,\n v: vertical,\n \"pad-bottom\": vertical && !beforeAddon,\n \"pad-top\": vertical && !afterAddon,\n }),\n className\n )}\n >\n {beforeAddon}\n {children}\n {afterAddon}\n </div>\n );\n }\n);\n"],"names":["cnb","forwardRef","bem","styles","SliderContainer","props","ref","className","children","beforeAddon","afterAddon","vertical","remaining","div","h","v"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6C,QAAQ;AACxE,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAuCnB;;;;;;;;;;;;;CAaC,GACD,OAAO,MAAME,gCAAkBH,WAC7B,SAASG,gBAAgBC,KAAK,EAAEC,GAAG;IACjC,MAAM,EACJC,SAAS,EACTC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,QAAQ,EACR,GAAGC,WACJ,GAAGP;IAEJ,qBACE,MAACQ;QACE,GAAGD,SAAS;QACbN,KAAKA;QACLC,WAAWP,IACTG,OAAO;YACLW,GAAG,CAACH;YACJ,YAAY,CAACA,YAAY,CAACF;YAC1B,aAAa,CAACE,YAAY,CAACD;YAC3BK,GAAGJ;YACH,cAAcA,YAAY,CAACF;YAC3B,WAAWE,YAAY,CAACD;QAC1B,IACAH;;YAGDE;YACAD;YACAE;;;AAGP,GACA"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/SliderMark.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { type HTMLAttributes, type ReactElement } from \"react\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-slider-mark\");\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport interface SliderMarkProps extends HTMLAttributes<HTMLSpanElement> {\n active: boolean;\n offset: string;\n vertical: boolean;\n}\n\n/**\n * **Server Component**\n *\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport function SliderMark(props: SliderMarkProps): ReactElement {\n const { active, offset, vertical, style, className, ...remaining } = props;\n\n return (\n <span\n {...remaining}\n style={{ ...style, \"--rmd-slider-mark-offset\": offset }}\n className={cnb(\n styles({\n active,\n inactive: !active,\n h: !vertical,\n v: vertical,\n }),\n className\n )}\n />\n );\n}\n"],"names":["cnb","bem","styles","SliderMark","props","active","offset","vertical","style","className","remaining","span","inactive","h","v"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAEhC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAYnB;;;;;CAKC,GACD,OAAO,SAASE,WAAWC,KAAsB;IAC/C,MAAM,EAAEC,MAAM,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,SAAS,EAAE,GAAGC,WAAW,GAAGN;IAErE,qBACE,KAACO;QACE,GAAGD,SAAS;QACbF,OAAO;YAAE,GAAGA,KAAK;YAAE,4BAA4BF;QAAO;QACtDG,WAAWT,IACTE,OAAO;YACLG;YACAO,UAAU,CAACP;YACXQ,GAAG,CAACN;YACJO,GAAGP;QACL,IACAE;;AAIR"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/SliderMarkLabel.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { type ReactElement } from \"react\";\nimport {\n Typography,\n type CustomTypographyComponent,\n type TypographyProps,\n type TypographyType,\n} from \"../typography/Typography.js\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-slider-mark-label\");\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface CustomizableSliderMarkLabelProps extends TypographyProps {\n /** @defaultValue `\"span\"` */\n as?: CustomTypographyComponent;\n\n /** @defaultValue `\"body-2\"` */\n type?: TypographyType;\n}\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport interface SliderMarkLabelProps extends CustomizableSliderMarkLabelProps {\n offset: string;\n vertical: boolean;\n}\n\n/**\n * **Server Component**\n *\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport function SliderMarkLabel(props: SliderMarkLabelProps): ReactElement {\n const {\n as = \"span\",\n type = \"body-2\",\n offset,\n vertical,\n style,\n className,\n children,\n ...remaining\n } = props;\n\n return (\n <Typography\n {...remaining}\n as={as}\n type={type}\n style={{ ...style, \"--rmd-slider-mark-offset\": offset }}\n className={cnb(styles({ h: !vertical, v: vertical }), className)}\n >\n {children}\n </Typography>\n );\n}\n"],"names":["cnb","Typography","bem","styles","SliderMarkLabel","props","as","type","offset","vertical","style","className","children","remaining","h","v"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAEhC,SACEC,UAAU,QAIL,8BAA8B;AACrC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAsBnB;;;;;CAKC,GACD,OAAO,SAASE,gBAAgBC,KAA2B;IACzD,MAAM,EACJC,KAAK,MAAM,EACXC,OAAO,QAAQ,EACfC,MAAM,EACNC,QAAQ,EACRC,KAAK,EACLC,SAAS,EACTC,QAAQ,EACR,GAAGC,WACJ,GAAGR;IAEJ,qBACE,KAACJ;QACE,GAAGY,SAAS;QACbP,IAAIA;QACJC,MAAMA;QACNG,OAAO;YAAE,GAAGA,KAAK;YAAE,4BAA4BF;QAAO;QACtDG,WAAWX,IAAIG,OAAO;YAAEW,GAAG,CAACL;YAAUM,GAAGN;QAAS,IAAIE;kBAErDC;;AAGP"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/SliderThumb.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n useEffect,\n useState,\n type ChangeEventHandler,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { useUserInteractionMode } from \"../interaction/UserInteractionModeProvider.js\";\nimport { type TooltipProps } from \"../tooltip/Tooltip.js\";\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { SliderValueTooltip } from \"./SliderValueTooltip.js\";\nimport { type SliderValueOptions } from \"./useSlider.js\";\n\nconst styles = bem(\"rmd-slider-thumb\");\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\ninterface SliderThumbClassNameOptions {\n className?: string;\n\n mask?: boolean;\n index: 1 | 2;\n active: boolean;\n animate: boolean;\n vertical: boolean;\n disabled: boolean;\n}\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nfunction sliderThumb(options: SliderThumbClassNameOptions): string {\n const { className, mask, index, active, animate, disabled, vertical } =\n options;\n\n const isSecondThumb = index === 2;\n return cnb(\n styles({\n h: !vertical,\n h1: !vertical && !isSecondThumb,\n h2: !vertical && isSecondThumb,\n v: vertical,\n v1: vertical && !isSecondThumb,\n v2: vertical && isSecondThumb,\n mask,\n \"mask-h\": mask && !vertical,\n \"mask-v\": mask && vertical,\n active,\n animate,\n disabled,\n \"disabled-h\": disabled && !vertical && !mask,\n \"disabled-v\": disabled && vertical && !mask,\n }),\n className\n );\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type SliderTooltipVisibility = \"auto\" | \"hover\" | \"always\";\n\n/**\n * @remarks \\@since 2.5.0\n */\nexport interface SliderThumbPresentation {\n /**\n * Boolean if the slider should act as a discrete slider which will render a\n * tooltip above the thumb while dragging to visualize the current value for\n * the slider.\n *\n * @defaultValue `false`\n */\n discrete?: boolean;\n\n /**\n * A function that is used to help with accessibility by creating a better\n * value string if just a number isn't representative enough of your range.\n *\n * Example:\n *\n * ```tsx\n * const [value, controls] = useSlider(0, {\n * // format to be `$100`, etc\n * getValueText: value => `$${value}`,\n * });\n *\n * return <Slider baseId=\"price-slider\" label=\"Price\" {...controls} />;\n * ```\n *\n * @defaultValue `() => \"\"`\n */\n getValueText?(value: number): string;\n\n /**\n * Set this to `true` if the slider's thumb position should only update when\n * the user has dragged to the next value instead of with the mouse.\n *\n * @see {@link marks}\n * @defaultValue `!!marks`\n */\n disableSmoothDragging?: boolean;\n\n /**\n * The discrete slider's value tooltip will only become visible when:\n *\n * - `\"auto\"` - the user is dragging with touch/mouse or focused with a keyboard\n * - `\"hover\"` - the behavior of `\"auto\"` plus while hovering the thumb with a mouse\n * - `\"always\"` - ... always\n *\n * This only applies when the {@link discrete} prop is `true`.\n *\n * @defaultValue `\"auto\"`\n */\n tooltipVisibility?: SliderTooltipVisibility;\n}\n\n/**\n * @internal\n * @remarks\n * \\@since 2.5.0\n * \\@since 6.0.0 Internal only component.\n */\nexport interface SliderThumbProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, \"onChange\">,\n Required<SliderValueOptions>,\n Required<SliderThumbPresentation> {\n id: string;\n name?: string;\n value: number;\n index: 1 | 2;\n active: boolean;\n animate: boolean;\n disabled: boolean;\n vertical: boolean;\n onChange: ChangeEventHandler<HTMLInputElement>;\n tooltipProps?: Partial<TooltipProps>;\n getTooltipProps(\n value: number,\n isFirstThumb: boolean\n ): Partial<TooltipProps> | void;\n getTooltipChildren(value: number, isFirstThumb: boolean): ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * @internal\n * @remarks\n * \\@since 2.5.0\n * \\@since 6.0.0 Internal only component.\n */\nexport const SliderThumb = forwardRef<\n HTMLSpanElement,\n LabelRequiredForA11y<SliderThumbProps>\n>(function SliderThumb(props, ref) {\n const {\n id,\n min,\n max,\n name,\n value,\n onChange,\n index,\n getValueText,\n step,\n active,\n animate,\n disabled,\n vertical,\n discrete,\n tabIndex = disabled ? -1 : 0,\n className,\n onFocus = noop,\n onKeyDown = noop,\n onMouseEnter = noop,\n onMouseLeave = noop,\n tooltipProps,\n getTooltipProps,\n getTooltipChildren,\n disableSmoothDragging,\n tooltipVisibility = \"auto\",\n ...remaining\n } = props;\n const { \"aria-label\": ariaLabel, \"aria-labelledby\": ariaLabelledBy } = props;\n\n const isFirstThumb = index === 1;\n const mode = useUserInteractionMode();\n const keyboard = mode === \"keyboard\";\n const touch = mode === \"touch\";\n const [mouseVisible, setMouseVisible] = useState(false);\n const [keyboardVisible, setKeyboardVisible] = useState(false);\n useEffect(() => {\n if (disabled || !discrete) {\n setKeyboardVisible(false);\n return;\n }\n\n // if the mode changes away from keyboard, need to disable the keyboard\n // state\n setKeyboardVisible((prevVisible) => prevVisible && mode === \"keyboard\");\n }, [disabled, discrete, mode]);\n useEffect(() => {\n if (disabled || !discrete) {\n setMouseVisible(false);\n return;\n }\n\n setMouseVisible((prevVisible) => prevVisible && mode !== \"touch\");\n }, [disabled, discrete, mode]);\n useEffect(() => {\n if (!keyboardVisible) {\n return;\n }\n\n const callback = (): void => {\n setKeyboardVisible(false);\n };\n\n window.addEventListener(\"blur\", callback, true);\n return () => {\n window.removeEventListener(\"blur\", callback);\n };\n }, [keyboardVisible]);\n\n const classNameOptions = {\n index,\n active,\n animate: !disableSmoothDragging && animate,\n disabled,\n vertical,\n className,\n } as const;\n\n return (\n <>\n {disabled && (\n <span\n className={sliderThumb({\n ...classNameOptions,\n mask: true,\n })}\n />\n )}\n <span\n {...remaining}\n id={id}\n ref={ref}\n role=\"slider\"\n aria-disabled={disabled || undefined}\n aria-orientation={vertical ? \"vertical\" : undefined}\n aria-valuemax={max}\n aria-valuemin={min}\n aria-valuenow={value}\n aria-valuetext={getValueText(value) || undefined}\n tabIndex={tabIndex}\n className={sliderThumb(classNameOptions)}\n onFocus={(event) => {\n onFocus(event);\n\n if (discrete && keyboard) {\n setKeyboardVisible(true);\n }\n }}\n onKeyDown={(event) => {\n onKeyDown(event);\n\n // this allows the tooltip to be visible when switching from mouse to\n // keyboard\n if (discrete && event.key !== \"Tab\") {\n setKeyboardVisible(true);\n }\n }}\n onMouseEnter={(event) => {\n onMouseEnter(event);\n if (discrete && tooltipVisibility === \"hover\" && !touch) {\n setMouseVisible(true);\n }\n }}\n onMouseLeave={(event) => {\n onMouseLeave(event);\n if (discrete && tooltipVisibility === \"hover\" && !touch) {\n setMouseVisible(false);\n }\n }}\n />\n <input\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-hidden\n id={`${id}-value`}\n type=\"range\"\n name={name}\n min={min}\n max={max}\n step={step}\n value={value}\n tabIndex={-1}\n onChange={onChange}\n className={styles(\"input\")}\n />\n {discrete && (\n <SliderValueTooltip\n position={vertical ? \"left\" : \"above\"}\n vertical={vertical}\n animate={!disableSmoothDragging && !active}\n visible={\n tooltipVisibility === \"always\" ||\n active ||\n keyboardVisible ||\n mouseVisible\n }\n {...tooltipProps}\n {...getTooltipProps(value, isFirstThumb)}\n index={index}\n >\n {getTooltipChildren(value, isFirstThumb)}\n </SliderValueTooltip>\n )}\n </>\n );\n});\n"],"names":["cnb","forwardRef","useEffect","useState","useUserInteractionMode","bem","SliderValueTooltip","styles","noop","sliderThumb","options","className","mask","index","active","animate","disabled","vertical","isSecondThumb","h","h1","h2","v","v1","v2","SliderThumb","props","ref","id","min","max","name","value","onChange","getValueText","step","discrete","tabIndex","onFocus","onKeyDown","onMouseEnter","onMouseLeave","tooltipProps","getTooltipProps","getTooltipChildren","disableSmoothDragging","tooltipVisibility","remaining","ariaLabel","ariaLabelledBy","isFirstThumb","mode","keyboard","touch","mouseVisible","setMouseVisible","keyboardVisible","setKeyboardVisible","prevVisible","callback","window","addEventListener","removeEventListener","classNameOptions","span","role","aria-disabled","undefined","aria-orientation","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","event","key","input","aria-label","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.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { bem } from \"../utils/bem.js\";\nimport {\n getClosestThumbEventHandlers,\n getThumbOffsets,\n type ClosestThumbEventHandlersOptions,\n type ThumbOffsetsOptions,\n} from \"./sliderUtils.js\";\n\nconst styles = bem(\"rmd-slider-track\");\n\n/**\n * @internal\n * @remarks\n * \\@since 2.5.0\n * \\@since 6.0.0 Updated to be internal only.\n */\nexport interface SliderTrackProps\n extends HTMLAttributes<HTMLSpanElement>,\n ClosestThumbEventHandlersOptions,\n ThumbOffsetsOptions {\n animate: boolean;\n disabled: boolean;\n}\n\n/**\n * **Server Component**\n *\n * @internal\n * @remarks\n * \\@since 2.5.0\n * \\@since 6.0.0 Updated to be internal only.\n */\nexport const SliderTrack = forwardRef<HTMLSpanElement, SliderTrackProps>(\n function SliderTrack(props, ref) {\n const {\n style,\n className,\n animate,\n vertical,\n disabled,\n min,\n max,\n thumb1Ref,\n thumb1Value,\n thumb1Dragging,\n thumb1DragPercentage,\n thumb1OnMouseUp,\n thumb1OnMouseDown,\n thumb1OnMouseMove,\n thumb1OnTouchStart,\n thumb1OnTouchMove,\n thumb2Ref,\n thumb2Value,\n thumb2Dragging,\n thumb2DragPercentage,\n thumb2OnMouseUp,\n thumb2OnMouseDown,\n thumb2OnMouseMove,\n thumb2OnTouchStart,\n thumb2OnTouchMove,\n isRangeSlider,\n children,\n ...remaining\n } = props;\n\n return (\n <span\n {...remaining}\n ref={ref}\n style={{\n ...style,\n ...getThumbOffsets({\n min,\n max,\n thumb1Value,\n thumb1Dragging,\n thumb1DragPercentage,\n thumb2Value,\n thumb2Dragging,\n thumb2DragPercentage,\n isRangeSlider,\n }),\n }}\n className={cnb(\n styles({\n animate,\n disabled,\n hoverable: !disabled,\n h: !vertical,\n h1: !vertical && !isRangeSlider,\n h2: !vertical && isRangeSlider,\n v: vertical,\n v1: vertical && !isRangeSlider,\n v2: vertical && isRangeSlider,\n }),\n className\n )}\n {...getClosestThumbEventHandlers({\n vertical,\n isRangeSlider,\n thumb1Ref,\n thumb1Dragging,\n thumb1OnMouseUp,\n thumb1OnMouseDown,\n thumb1OnMouseMove,\n thumb1OnTouchStart,\n thumb1OnTouchMove,\n thumb2Ref,\n thumb2Dragging,\n thumb2OnMouseUp,\n thumb2OnMouseDown,\n thumb2OnMouseMove,\n thumb2OnTouchStart,\n thumb2OnTouchMove,\n })}\n >\n {children}\n </span>\n );\n }\n);\n"],"names":["cnb","forwardRef","bem","getClosestThumbEventHandlers","getThumbOffsets","styles","SliderTrack","props","ref","style","className","animate","vertical","disabled","min","max","thumb1Ref","thumb1Value","thumb1Dragging","thumb1DragPercentage","thumb1OnMouseUp","thumb1OnMouseDown","thumb1OnMouseMove","thumb1OnTouchStart","thumb1OnTouchMove","thumb2Ref","thumb2Value","thumb2Dragging","thumb2DragPercentage","thumb2OnMouseUp","thumb2OnMouseDown","thumb2OnMouseMove","thumb2OnTouchStart","thumb2OnTouchMove","isRangeSlider","children","remaining","span","hoverable","h","h1","h2","v","v1","v2"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6B,QAAQ;AACxD,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SACEC,4BAA4B,EAC5BC,eAAe,QAGV,mBAAmB;AAE1B,MAAMC,SAASH,IAAI;AAgBnB;;;;;;;CAOC,GACD,OAAO,MAAMI,4BAAcL,WACzB,SAASK,YAAYC,KAAK,EAAEC,GAAG;IAC7B,MAAM,EACJC,KAAK,EACLC,SAAS,EACTC,OAAO,EACPC,QAAQ,EACRC,QAAQ,EACRC,GAAG,EACHC,GAAG,EACHC,SAAS,EACTC,WAAW,EACXC,cAAc,EACdC,oBAAoB,EACpBC,eAAe,EACfC,iBAAiB,EACjBC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,SAAS,EACTC,WAAW,EACXC,cAAc,EACdC,oBAAoB,EACpBC,eAAe,EACfC,iBAAiB,EACjBC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,aAAa,EACbC,QAAQ,EACR,GAAGC,WACJ,GAAG7B;IAEJ,qBACE,KAAC8B;QACE,GAAGD,SAAS;QACb5B,KAAKA;QACLC,OAAO;YACL,GAAGA,KAAK;YACR,GAAGL,gBAAgB;gBACjBU;gBACAC;gBACAE;gBACAC;gBACAC;gBACAO;gBACAC;gBACAC;gBACAM;YACF,EAAE;QACJ;QACAxB,WAAWV,IACTK,OAAO;YACLM;YACAE;YACAyB,WAAW,CAACzB;YACZ0B,GAAG,CAAC3B;YACJ4B,IAAI,CAAC5B,YAAY,CAACsB;YAClBO,IAAI,CAAC7B,YAAYsB;YACjBQ,GAAG9B;YACH+B,IAAI/B,YAAY,CAACsB;YACjBU,IAAIhC,YAAYsB;QAClB,IACAxB;QAED,GAAGP,6BAA6B;YAC/BS;YACAsB;YACAlB;YACAE;YACAE;YACAC;YACAC;YACAC;YACAC;YACAC;YACAE;YACAE;YACAC;YACAC;YACAC;YACAC;QACF,EAAE;kBAEDE;;AAGP,GACA"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/SliderValueMarks.tsx"],"sourcesContent":["import {\n Fragment,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n} from \"react\";\nimport { getPercentage } from \"../utils/getPercentage.js\";\nimport {\n getRangeSteps,\n type RangeStepsOptions,\n} from \"../utils/getRangeSteps.js\";\nimport { SliderMark } from \"./SliderMark.js\";\nimport {\n SliderMarkLabel,\n type CustomizableSliderMarkLabelProps,\n} from \"./SliderMarkLabel.js\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface SliderValueMark {\n /**\n * An optional label to display alongside the current mark. This will be\n * positioned below the mark for horizontal sliders and to the right for\n * vertical sliders.\n */\n label?: ReactNode;\n\n /**\n * The value of the mark that should be a valid step within the slider.\n */\n value: number;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface SliderValueMarkState {\n /** The {@link SliderValueMark.value} */\n value: number;\n\n /**\n * No idea if this is actually useful (maybe custom styles?), but it is the\n * current percentage the mark is offset and is what is set as the\n * `left`/`top` values for the mark.\n */\n offset: string;\n\n /**\n * This will be `true` when the mark is being covered by the slider track's\n * active state.\n */\n active: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface SliderMarksOptions {\n /**\n * Set this to `true` to display a mark for each step within the slider. This\n * can be used alongside the {@link getMarkProps} and\n * {@link getMarkLabelProps} to customize the styles or display a label for\n * the mark.\n *\n * @example\n * Custom Marks\n * ```tsx\n * const slider = useSlider({ step: 10 });\n *\n * <Slider\n * {...slider}\n * marks={[\n * { value: 0, label: \"Minimum\" },\n * { value: 10 },\n * { value: 20 },\n * { value: 30 },\n * { value: 40 },\n * { value: 50, label: \"Medium\" },\n * { value: 60 },\n * { value: 70 },\n * { value: 80 },\n * { value: 90 },\n * { value: 100, label: \"Maximum\" },\n * ]}\n * />\n * ```\n */\n marks?: boolean | readonly SliderValueMark[];\n\n /**\n * This can be used to override any styles for the specific mark.\n */\n getMarkProps?(\n options: SliderValueMarkState\n ): HTMLAttributes<HTMLSpanElement> | void;\n\n /**\n * This can be used to override any styles for a specific mark's label or\n * display a label dynamically.\n *\n * @example\n * Dynamic Labels\n * ```tsx\n * <Slider\n * {...slider}\n * marks\n * getMarkLabelProps={({ active, value }) => {\n * if (value % 10 !== 0) {\n * return;\n * }\n *\n * return {\n * children: `${value} degrees`,\n * className: cnb(active && styles.somethingCustom),\n * };\n * }}\n * />\n * ```\n */\n getMarkLabelProps?(\n options: SliderValueMarkState\n ): Partial<CustomizableSliderMarkLabelProps> | void;\n}\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport interface SliderValueMarksProps\n extends RangeStepsOptions,\n Required<SliderMarksOptions> {\n vertical: boolean;\n thumb1Value: number;\n thumb2Value: number;\n isRangeSlider: boolean;\n}\n\n/**\n * **Server Component**\n *\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport function SliderValueMarks(props: SliderValueMarksProps): ReactElement {\n const {\n min,\n max,\n step,\n marks: propMarks,\n vertical,\n thumb1Value,\n thumb2Value,\n isRangeSlider,\n getMarkProps,\n getMarkLabelProps,\n } = props;\n\n let marks: readonly SliderValueMark[];\n if (typeof propMarks === \"boolean\") {\n const steps = getRangeSteps({ min, max, step }) + 1;\n marks = Array.from({ length: steps }, (_, i) => ({\n value: min + i * step,\n }));\n } else {\n marks = propMarks;\n }\n\n return (\n <>\n {marks.map(({ value, label: markLabel }) => {\n // I can't think of a good name, but this is when the slider's track's\n // active color is covering the mark which requires different styles\n let active: boolean;\n let percentage = getPercentage({ min, max, value }) * 100;\n let markValue = value;\n if (vertical) {\n // need to reverse the percentage since it uses `top` for positioning\n // where the max value is at the top instead of bottom\n percentage = 100 - percentage;\n\n // need to reverse the mark's value as well for the same reason as\n // above\n markValue = max - value;\n }\n\n if (isRangeSlider) {\n active = markValue > thumb1Value && markValue < thumb2Value;\n } else {\n active = markValue < thumb1Value;\n }\n\n const offset = `${percentage}%`;\n const markProps = getMarkProps({ value, active, offset });\n const labelProps = getMarkLabelProps({ value, active, offset });\n const label = markLabel ?? labelProps?.children ?? null;\n\n return (\n <Fragment key={value}>\n <SliderMark\n {...markProps}\n offset={offset}\n active={active}\n vertical={vertical}\n />\n {label !== null && (\n <SliderMarkLabel\n {...labelProps}\n offset={offset}\n vertical={vertical}\n >\n {label}\n </SliderMarkLabel>\n )}\n </Fragment>\n );\n })}\n </>\n );\n}\n"],"names":["Fragment","getPercentage","getRangeSteps","SliderMark","SliderMarkLabel","SliderValueMarks","props","min","max","step","marks","propMarks","vertical","thumb1Value","thumb2Value","isRangeSlider","getMarkProps","getMarkLabelProps","steps","Array","from","length","_","i","value","map","label","markLabel","active","percentage","markValue","offset","markProps","labelProps","children"],"mappings":";AAAA,SACEA,QAAQ,QAIH,QAAQ;AACf,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SACEC,aAAa,QAER,4BAA4B;A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ACG;wBACE,GAAG6B,SAAS;wBACbD,QAAQA;wBACRH,QAAQA;wBACRhB,UAAUA;;oBAEXc,UAAU,sBACT,KAACtB;wBACE,GAAG6B,UAAU;wBACdF,QAAQA;wBACRnB,UAAUA;kCAETc;;;eAbQF;QAkBnB;;AAGN"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/SliderValueTooltip.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { type ReactElement, type ReactNode } from \"react\";\nimport { Tooltip, type TooltipProps } from \"../tooltip/Tooltip.js\";\nimport { type CSSTransitionClassNames } from \"../transition/types.js\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-slider-tooltip\");\n\nconst HORIZONTAL_CLASS_NAMES: CSSTransitionClassNames = {\n enter: \"rmd-slider-tooltip--h-off\",\n enterActive: \"rmd-slider-tooltip--h-on rmd-slider-tooltip--animate\",\n exit: \"rmd-slider-tooltip--animate\",\n exitActive: \"rmd-slider-tooltip--h-off\",\n};\n\nconst VERTICAL_CLASS_NAMES: CSSTransitionClassNames = {\n enter: \"rmd-slider-tooltip--v-off\",\n enterActive: \"rmd-slider-tooltip--v-on rmd-slider-tooltip--animate\",\n exit: \"rmd-slider-tooltip--animate\",\n exitActive: \"rmd-slider-tooltip--v-off\",\n};\n\n/**\n * @internal\n * @remarks\n * \\@since 2.5.0\n * \\@since 6.0.0 Renamed from `SliderValueProps` to `SliderValueTooltipProps`.\n */\nexport interface SliderValueTooltipProps extends TooltipProps {\n index: 1 | 2;\n animate: boolean;\n vertical: boolean;\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This component creates the \"discrete\" slider thumb value by rendering a\n * tooltip when needed.\n *\n * @internal\n * @remarks\n * \\@since 2.5.0\n * \\@since 6.0.0 Renamed from `SliderValue` to `SliderValueTooltip`.\n */\nexport function SliderValueTooltip(\n props: SliderValueTooltipProps\n): ReactElement {\n const {\n index,\n animate,\n vertical,\n className,\n children,\n classNames = vertical ? VERTICAL_CLASS_NAMES : HORIZONTAL_CLASS_NAMES,\n ...remaining\n } = props;\n\n return (\n <Tooltip\n dense\n disablePortal\n textOverflow=\"nowrap\"\n className={cnb(\n styles({ h: !vertical, v: vertical }),\n animate && \"rmd-slider-thumb--animate\",\n `rmd-slider-thumb--${vertical ? \"v\" : \"h\"}${index}`,\n className\n )}\n classNames={classNames}\n {...remaining}\n >\n {children}\n </Tooltip>\n );\n}\n"],"names":["cnb","Tooltip","bem","styles","HORIZONTAL_CLASS_NAMES","enter","enterActive","exit","exitActive","VERTICAL_CLASS_NAMES","SliderValueTooltip","props","index","animate","vertical","className","children","classNames","remaining","dense","disablePortal","textOverflow","h","v"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAEhC,SAASC,OAAO,QAA2B,wBAAwB;AAEnE,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAEnB,MAAME,yBAAkD;IACtDC,OAAO;IACPC,aAAa;IACbC,MAAM;IACNC,YAAY;AACd;AAEA,MAAMC,uBAAgD;IACpDJ,OAAO;IACPC,aAAa;IACbC,MAAM;IACNC,YAAY;AACd;AAeA;;;;;;;;;;CAUC,GACD,OAAO,SAASE,mBACdC,KAA8B;IAE9B,MAAM,EACJC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,SAAS,EACTC,QAAQ,EACRC,aAAaH,WAAWL,uBAAuBL,sBAAsB,EACrE,GAAGc,WACJ,GAAGP;IAEJ,qBACE,KAACV;QACCkB,KAAK;QACLC,aAAa;QACbC,cAAa;QACbN,WAAWf,IACTG,OAAO;YAAEmB,GAAG,CAACR;YAAUS,GAAGT;QAAS,IACnCD,WAAW,6BACX,CAAC,kBAAkB,EAAEC,WAAW,MAAM,IAAI,EAAEF,MAAM,CAAC,EACnDG;QAEFE,YAAYA;QACX,GAAGC,SAAS;kBAEZF;;AAGP"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/Switch.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { FormMessageContainer } from \"./FormMessageContainer.js\";\nimport { type InputToggleLabelProps } from \"./InputToggle.js\";\nimport { Label } from \"./Label.js\";\nimport { SwitchTrack } from \"./SwitchTrack.js\";\nimport { switchStyles } from \"./switchStyles.js\";\nimport {\n type FormComponentStates,\n type FormMessageContainerExtension,\n} from \"./types.js\";\n\n/**\n * @remarks \\@since 6.0.0 Added `containerProps` and support for the\n * `FormMessage` behavior.\n */\nexport interface SwitchProps\n extends InputHTMLAttributes<HTMLInputElement>,\n InputToggleLabelProps,\n FormMessageContainerExtension,\n FormComponentStates {\n containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n trackProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n trackStyle?: CSSProperties;\n trackClassName?: string;\n ballAddon?: ReactNode;\n ballProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n ballStyle?: CSSProperties;\n ballClassName?: string;\n}\n\n/**\n * **Server Component**\n *\n * @example\n * Simple Example\n * ```tsx\n * import { Form, Switch } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n * import { useState } from \"react\";\n *\n * function Example(): ReactElement {\n * const [checked, setChecked] = useState(false);\n *\n * return (\n * <Form>\n * <Switch\n * label=\"Label\"\n * name=\"enabled\"\n * checked={checked}\n * onChange={(event) => setChecked(event.currentTarget.checked)}\n * />\n * </Form>\n * );\n * }\n * ```\n *\n * @remarks \\@since 6.0.0 Added support for `FormMessage` behavior.\n */\nexport const Switch = forwardRef<HTMLInputElement, SwitchProps>(\n function Switch(props, ref) {\n const {\n id: propId,\n label,\n labelProps,\n style,\n className,\n containerProps,\n ballProps,\n ballStyle,\n ballClassName,\n ballAddon,\n trackProps,\n trackStyle,\n trackClassName,\n messageProps,\n messageContainerProps,\n disableLabelGap = false,\n error = false,\n active = false,\n stacked = false,\n iconAfter = false,\n disabled = false,\n readOnly = false,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"switch\");\n\n return (\n <FormMessageContainer\n {...messageContainerProps}\n messageProps={messageProps}\n >\n <Label\n style={style}\n {...labelProps}\n className={cnb(className, labelProps?.className)}\n gap={!disableLabelGap}\n stacked={stacked}\n reversed={!iconAfter}\n active={active}\n error={error}\n disabled={disabled}\n >\n {label}\n <div\n {...containerProps}\n className={switchStyles({\n clickable: !disabled && !readOnly,\n className: containerProps?.className,\n currentColor: active || error,\n })}\n >\n <SwitchTrack\n style={trackStyle}\n {...trackProps}\n className={cnb(trackClassName, trackProps?.className)}\n disabled={disabled}\n ballAddon={ballAddon}\n ballProps={ballProps}\n ballStyle={ballStyle}\n ballClassName={ballClassName}\n >\n <input\n {...remaining}\n id={id}\n ref={ref}\n role=\"switch\"\n type=\"checkbox\"\n className={cnb(\n \"rmd-switch__input rmd-hidden-input\",\n disabled && \"rmd-hidden-input--disabled\"\n )}\n disabled={disabled}\n />\n </SwitchTrack>\n </div>\n </Label>\n </FormMessageContainer>\n );\n }\n);\n"],"names":["cnb","forwardRef","useEnsuredId","FormMessageContainer","Label","SwitchTrack","switchStyles","Switch","props","ref","id","propId","label","labelProps","style","className","containerProps","ballProps","ballStyle","ballClassName","ballAddon","trackProps","trackStyle","trackClassName","messageProps","messageContainerProps","disableLabelGap","error","active","stacked","iconAfter","disabled","readOnly","remaining","gap","reversed","div","clickable","currentColor","input","role","type"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAKL,QAAQ;AAEf,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,oBAAoB,QAAQ,4BAA4B;AAEjE,SAASC,KAAK,QAAQ,aAAa;AACnC,SAASC,WAAW,QAAQ,mBAAmB;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YAAY;4BAEdA,UAAUA;;;;;;;AAOxB,GACA"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/SwitchTrack.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-switch\");\n\nexport interface SwitchTrackProps extends HTMLAttributes<HTMLDivElement> {\n active?: boolean;\n disabled?: boolean;\n ballAddon?: ReactNode;\n ballProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n ballStyle?: CSSProperties;\n ballClassName?: string;\n}\n\n/**\n * **Server Component**\n */\nexport const SwitchTrack = forwardRef<HTMLDivElement, SwitchTrackProps>(\n function SwitchTrack(props, ref) {\n const {\n style,\n className,\n ballAddon,\n ballProps,\n ballStyle,\n ballClassName,\n active,\n children,\n disabled = false,\n ...remaining\n } = props;\n\n return (\n <div\n {...remaining}\n ref={ref}\n style={style}\n className={cnb(styles(\"track\", { disabled }), className)}\n >\n {children}\n <span\n style={ballStyle}\n {...ballProps}\n className={cnb(styles(\"ball\", { active }), ballClassName)}\n >\n {ballAddon}\n {ballProps?.children}\n </span>\n </div>\n );\n }\n);\n"],"names":["cnb","forwardRef","bem","styles","SwitchTrack","props","ref","style","className","ballAddon","ballProps","ballStyle","ballClassName","active","children","disabled","remaining","div","span"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAIL,QAAQ;AAEf,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAWnB;;CAEC,GACD,OAAO,MAAME,4BAAcH,WACzB,SAASG,YAAYC,KAAK,EAAEC,GAAG;IAC7B,MAAM,EACJC,KAAK,EACLC,SAAS,EACTC,SAAS,EACTC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,MAAM,EACNC,QAAQ,EACRC,WAAW,KAAK,EAChB,GAAGC,WACJ,GAAGX;IAEJ,qBACE,MAACY;QACE,GAAGD,SAAS;QACbV,KAAKA;QACLC,OAAOA;QACPC,WAAWR,IAAIG,OAAO,SAAS;YAAEY;QAAS,IAAIP;;YAE7CM;0BACD,MAACI;gBACCX,OAAOI;gBACN,GAAGD,SAAS;gBACbF,WAAWR,IAAIG,OAAO,QAAQ;oBAAEU;gBAAO,IAAID;;oBAE1CH;oBACAC,WAAWI;;;;;AAIpB,GACA"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/TextArea.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n useRef,\n type CSSProperties,\n type HTMLAttributes,\n type TextareaHTMLAttributes,\n} from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport { FormMessageContainer } from \"./FormMessageContainer.js\";\nimport { Label } from \"./Label.js\";\nimport { TextFieldContainer } from \"./TextFieldContainer.js\";\nimport { getFormConfig } from \"./formConfig.js\";\nimport { textArea, textAreaContainer } from \"./textAreaStyles.js\";\nimport { type FormFieldOptions } from \"./types.js\";\nimport {\n useResizingTextArea,\n type TextAreaResize,\n} from \"./useResizingTextArea.js\";\n\nexport interface TextAreaProps\n extends FormFieldOptions,\n TextareaHTMLAttributes<HTMLTextAreaElement> {\n /**\n * Optional placeholder text to display in the text field.\n *\n * @defaultValue `label ? \" \" : \"\"`\n */\n placeholder?: string;\n\n /**\n * Set this to `true` if the auto resizing textarea should not animate for new\n * height changes.\n *\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n\n /**\n * An optional style to apply to the textarea element. The base `style` prop\n * is applied to the surrounding `div` instead.\n */\n areaStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the textarea element. The base `style`\n * prop is applied to the surrounding `div` instead.\n */\n areaClassName?: string;\n\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n * @defaultValue `2`\n */\n rows?: number;\n\n /**\n * The maximum number of rows a textarea can expand to before showing a\n * scrollbar. When this is set to `-1`, there will be no limit.\n *\n * @defaultValue `-1`\n */\n maxRows?: number;\n\n /**\n * @see {@link TextAreaResize}\n * @defaultValue `\"auto\"`\n */\n resize?: TextAreaResize;\n\n /**\n * When the {@link resize} prop is set to `\"auto\"`, an additional `<div>` is\n * added along with a hidden `<textarea>` mask. This prop can be used to add\n * any additional styling or props to that div.\n *\n * This will only be applied when {@link resize} is set to `\"auto\"`.\n */\n resizeContainerProps?: PropsWithRef<\n HTMLAttributes<HTMLDivElement>,\n HTMLDivElement\n >;\n}\n\n/**\n * **Client Component**\n *\n * @example\n * Simple Example\n * ```tsx\n * import { TextArea } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <TextArea\n * label=\"Label\"\n * placeholder=\"Placeholder\"\n * />\n * );\n * }\n * ```\n */\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n function TextArea(props, ref) {\n const {\n id: propId,\n style,\n className,\n label,\n labelProps,\n labelStyle,\n labelClassName,\n areaStyle,\n areaClassName,\n resizeContainerProps,\n resize = \"auto\",\n dense = false,\n error = false,\n active = false,\n inline: propInline = false,\n stretch = false,\n leftAddon,\n rightAddon,\n disableLeftAddonStyles = false,\n disableRightAddonStyles = false,\n theme: propTheme,\n underlineDirection: propUnderlineDirection,\n messageProps,\n messageContainerProps,\n rows = 2,\n maxRows = -1,\n onChange: propOnChange,\n disableTransition = false,\n ...remaining\n } = props;\n const { disabled = false, readOnly = false, value, defaultValue } = props;\n const id = useEnsuredId(propId, \"text-field\");\n const theme = getFormConfig(\"theme\", propTheme);\n const underlineDirection = getFormConfig(\n \"underlineDirection\",\n propUnderlineDirection\n );\n const [areaRef, areaRefCallback] = useEnsuredRef(ref);\n const containerRef = useRef<HTMLDivElement>(null);\n\n const { maskRef, height, onChange, scrollable } = useResizingTextArea({\n maxRows,\n resize,\n onChange: propOnChange,\n containerRef,\n });\n\n let { placeholder = \"\" } = props;\n if (label && !placeholder) {\n // See the placeholder type definition comments for information\n placeholder = \" \";\n }\n\n // have to force it inline or else you won't be able to resize\n // it horizontally.\n const inline = resize === \"horizontal\" || resize === \"both\" || propInline;\n\n const area = (\n <textarea\n {...remaining}\n id={id}\n ref={areaRefCallback}\n rows={rows}\n disabled={disabled}\n onChange={onChange}\n style={areaStyle}\n className={textArea({\n resize,\n scrollable,\n className: areaClassName,\n placeholderHidden: !!label && !active,\n })}\n />\n );\n\n const labelNode = label && (\n <Label\n {...labelProps}\n htmlFor={id}\n style={labelProps?.style ?? labelStyle}\n className={labelProps?.className ?? labelClassName}\n floating\n dense={dense}\n error={error}\n active={active}\n disabled={disabled}\n >\n {label}\n </Label>\n );\n\n let children = (\n <>\n {area}\n {labelNode}\n </>\n );\n\n if (resize === \"auto\") {\n children = (\n <div\n {...resizeContainerProps}\n className={cnb(\n \"rmd-textarea-container__inner\",\n !disableTransition && \"rmd-textarea-container__inner--animate\",\n resizeContainerProps?.className\n )}\n >\n {area}\n {labelNode}\n <textarea\n aria-hidden\n id={`${id}-mask`}\n ref={maskRef}\n defaultValue={value ?? defaultValue}\n readOnly\n tabIndex={-1}\n rows={rows}\n style={areaStyle}\n className={textArea({\n mask: true,\n resize,\n className: areaClassName,\n })}\n />\n </div>\n );\n }\n\n return (\n <FormMessageContainer\n {...messageContainerProps}\n messageProps={messageProps}\n >\n <TextFieldContainer\n ref={containerRef}\n style={{\n ...style,\n \"--rmd-textarea-height\": height,\n }}\n className={textAreaContainer({\n animate: !disableTransition && resize == \"auto\",\n disabled,\n height: !!height,\n underlineLabelled:\n !!label && (theme === \"underline\" || theme === \"filled\"),\n className,\n })}\n theme={theme}\n label={!!label}\n error={error}\n dense={dense}\n inline={inline}\n active={active}\n stretch={stretch}\n readOnly={readOnly}\n disabled={disabled}\n leftAddon={leftAddon}\n rightAddon={rightAddon}\n underlineDirection={underlineDirection}\n disableLeftAddonStyles={disableLeftAddonStyles}\n disableRightAddonStyles={disableRightAddonStyles}\n onClick={(event) => {\n // The textarea container adds padding-top when there is a label so\n // that the label does not cover the text so this makes it so you\n // can still click anywhere in the \"box\" to focus the textarea.\n if (!disabled && event.target === event.currentTarget) {\n areaRef.current?.focus();\n }\n }}\n >\n {children}\n </TextFieldContainer>\n </FormMessageContainer>\n );\n }\n);\n"],"names":["cnb","forwardRef","useRef","useEnsuredId","useEnsuredRef","FormMessageContainer","Label","TextFieldContainer","getFormConfig","textArea","textAreaContainer","useResizingTextArea","TextArea","props","ref","id","propId","style","className","label","labelProps","labelStyle","labelClassName","areaStyle","areaClassName","resizeContainerProps","resize","dense","error","active","inline","propInline","stretch","leftAddon","rightAddon","disableLeftAddonStyles","disableRightAddonStyles","theme","propTheme","underlineDirection","propUnderlineDirection","messageProps","messageContainerProps","rows","maxRows","onChange","propOnChange","disableTransition","remaining","disabled","readOnly","value","defaultValue","areaRef","areaRefCallback","containerRef","maskRef","height","scrollable","placeholder","area","textarea","placeholderHidden","labelNode","htmlFor","floating","children","div","aria-hidden","tabIndex","mask","animate","underlineLabelled","onClick","event","target","currentTarget","current","focus"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,EACVC,MAAM,QAID,QAAQ;AAEf,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,oBAAoB,QAAQ,4BAA4B;AACjE,SAASC,KAAK,QAAQ,aAAa;AACnC,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,QAAQ,EAAEC,iBAAiB,QAAQ,sBAAsB;AAElE,SACEC,mBAAmB,QAEd,2BAA2B;AAiElC;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,MAAMC,yBAAWX,WACtB,SAASW,SAASC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kB,UAAUA;YACVD,UAAUA;YACVhB,WAAWA;YACXC,YAAYA;YACZK,oBAAoBA;YACpBJ,wBAAwBA;YACxBC,yBAAyBA;YACzBqC,SAAS,CAACC;gBACR,mEAAmE;gBACnE,iEAAiE;gBACjE,+DAA+D;gBAC/D,IAAI,CAACzB,YAAYyB,MAAMC,MAAM,KAAKD,MAAME,aAAa,EAAE;oBACrDvB,QAAQwB,OAAO,EAAEC;gBACnB;YACF;sBAECZ;;;AAIT,GACA"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/TextField.tsx"],"sourcesContent":["import {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { FormMessageContainer } from \"./FormMessageContainer.js\";\nimport { Label } from \"./Label.js\";\nimport { TextFieldContainer } from \"./TextFieldContainer.js\";\nimport { getFormConfig } from \"./formConfig.js\";\nimport { textField } from \"./textFieldStyles.js\";\nimport {\n type FormFieldOptions,\n type UserAgentAutoCompleteProps,\n} from \"./types.js\";\n\n/**\n * These are all the \"supported\" input types for react-md so that they at least\n * render reasonably well by default. There is no built-in validation or\n * anything adding onto existing browser functionality for these types.\n *\n * @remarks\n * \\@since 2.5.0 - `\"search\"` was added\n * \\@since 6.0.0 Dropped support for `\"week\"` and `\"month\"` input types since\n * they are not available in Firefox and Safari at this time.\n */\nexport type SupportedInputTypes =\n | \"text\"\n | \"password\"\n | \"number\"\n | \"tel\"\n | \"email\"\n | \"date\"\n | \"time\"\n | \"datetime-local\"\n | \"url\"\n | \"color\"\n | \"search\";\n\n/**\n * @remarks \\@since 6.0.0 Renamed from `TextFieldAttributes` to\n * `TextFieldInputAttributes`\n */\nexport type TextFieldInputAttributes = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"type\"\n>;\n\n/**\n * @remarks \\@since 6.0.0 Removed the `containerRef` prop.\n */\nexport interface TextFieldProps\n extends TextFieldInputAttributes,\n UserAgentAutoCompleteProps,\n FormFieldOptions {\n /**\n * @defaultValue `\"text-field-\" + useId()`\n */\n id?: string;\n\n /**\n * Optional placeholder text to display in the text field.\n *\n * @defaultValue `label ? \" \" : \"\"`\n */\n placeholder?: string;\n\n /**\n * Any optional inline styles to set on the input.\n */\n inputStyle?: CSSProperties;\n\n /**\n * An optional `className` to add to the input.\n */\n inputClassName?: string;\n\n /**\n * The text field type.\n *\n * @defaultValue `\"text\"`\n */\n type?: SupportedInputTypes;\n\n /**\n * Optional props to provide to the {@link TextFieldContainer} component.\n * There probably isn't any real use for this prop other than if you need to\n * add a `ref` for some DOM behavior.\n */\n containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n\n /**\n * The `children` will be rendered within the `TextFieldContainer` and before\n * the `<input />` element. This was added to support the new `Select`\n * component implementation\n *\n * @internal\n * @remarks \\@since 6.0.0\n */\n children?: ReactNode;\n}\n\n/**\n * **Server Component**\n *\n * The structure for this component is:\n * @example\n * Component Structure\n * ```tsx\n * <FormMessageContainer {...messageContainerProps}>\n * <TextFieldContainer {...containerProps}>\n * <input {...props} />\n * <Label {...labelProps} />\n * </TextFieldContainer>\n * </FormMessageContainer>\n * ```\n *\n * @example\n * Simple Example\n * ```tsx\n * import { TextField } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <TextField\n * label=\"Name\"\n * placeholder=\"Bob\"\n * defaultValue=\"\"\n * />\n * );\n * }\n * ```\n */\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(props, ref) {\n const {\n id: propId,\n style,\n className,\n type = \"text\",\n label,\n labelProps,\n labelStyle,\n labelClassName,\n autoCompleteValue,\n autoComplete = autoCompleteValue,\n name = autoCompleteValue,\n dense = false,\n error = false,\n active = false,\n inline = false,\n stretch = false,\n leftAddon,\n leftAddonProps,\n rightAddon,\n rightAddonProps,\n disableLeftAddonStyles = false,\n disableRightAddonStyles = false,\n inputStyle,\n inputClassName,\n theme: propTheme,\n underlineDirection: propUnderlineDirection,\n messageProps,\n messageContainerProps,\n containerProps,\n children,\n ...remaining\n } = props;\n const { disabled = false, readOnly = false } = props;\n const id = useEnsuredId(propId, \"text-field\");\n const theme = getFormConfig(\"theme\", propTheme);\n const underlineDirection = getFormConfig(\n \"underlineDirection\",\n propUnderlineDirection\n );\n\n let { placeholder = \"\" } = props;\n if (label && !placeholder) {\n // See the placeholder type definition comments for information\n placeholder = \" \";\n }\n\n return (\n <FormMessageContainer\n {...messageContainerProps}\n messageProps={messageProps}\n >\n <TextFieldContainer\n {...containerProps}\n style={style}\n className={className}\n theme={theme}\n label={!!label}\n error={error}\n dense={dense}\n inline={inline}\n active={active}\n stretch={stretch}\n readOnly={readOnly}\n disabled={disabled}\n leftAddon={leftAddon}\n leftAddonProps={leftAddonProps}\n rightAddon={rightAddon}\n rightAddonProps={rightAddonProps}\n underlineDirection={underlineDirection}\n disableLeftAddonStyles={disableLeftAddonStyles}\n disableRightAddonStyles={disableRightAddonStyles}\n >\n {children}\n <input\n {...remaining}\n id={id}\n ref={ref}\n type={type}\n name={name}\n disabled={disabled}\n placeholder={placeholder}\n autoComplete={autoComplete}\n style={inputStyle}\n className={textField({\n className: inputClassName,\n placeholderHidden: !!label && !active,\n })}\n />\n {label && (\n <Label\n floating\n dense={dense}\n error={error}\n active={active}\n disabled={disabled}\n {...labelProps}\n htmlFor={id}\n style={labelProps?.style ?? labelStyle}\n className={labelProps?.className ?? labelClassName}\n >\n {label}\n </Label>\n )}\n </TextFieldContainer>\n </FormMessageContainer>\n );\n }\n);\n"],"names":["forwardRef","useEnsuredId","FormMessageContainer","Label","TextFieldContainer","getFormConfig","textField","TextField","props","ref","id","propId","style","className","type","label","labelProps","labelStyle","labelClassName","autoCompleteValue","autoComplete","name","dense","error","active","inline","stretch","leftAddon","leftAddonProps","rightAddon","rightAddonProps","disableLeftAddonStyles","disableRightAddonStyles","inputStyle","inputClassName","theme","propTheme","underlineDirection","propUnderlineDirection","messageProps","messageContainerProps","containerProps","children","remaining","disabled","readOnly","placeholder","input","placeholderHidden","floating","htmlFor"],"mappings":";AAAA,SACEA,UAAU,QAKL,QAAQ;AAEf,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,oBAAoB,QAAQ,4BAA4B;AACjE,SAASC,KAAK,QAAQ,aAAa;AACnC,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,SAAS,QAAQ,uBAAuB;AA4FjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BC,GACD,OAAO,MAAMC,0BAAYP,WACvB,SAASO,UAAUC,KAAK,EAAEC,GAAG;IAC3B,MAAM,EACJC,IAAIC,MAAM,EACVC,KAAK,EACLC,SAAS,EACTC,OAAO,MAAM,EACbC,KAAK,EACLC,UAAU,EACVC,UAAU,EACVC,cAAc,EACdC,iBAAiB,EACjBC,eAAeD,iBAAiB,EAChCE,OAAOF,iBAAiB,EACxBG,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,SAAS,EACTC,cAAc,EACdC,UAAU,EACVC,eAAe,EACfC,yBAAyB,KAAK,EAC9BC,0BAA0B,KAAK,EAC/BC,UAAU,EACVC,cAAc,EACdC,OAAOC,SAAS,EAChBC,oBAAoBC,sBAAsB,EAC1CC,YAAY,EACZC,qBAAqB,EACrBC,cAAc,EACdC,QAAQ,EACR,GAAGC,WACJ,GAAGnC;IACJ,MAAM,EAAEoC,WAAW,KAAK,EAAEC,WAAW,KAAK,EAAE,GAAGrC;IAC/C,MAAME,KAAKT,aAAaU,QAAQ;IAChC,MAAMwB,QAAQ9B,cAAc,SAAS+B;IACrC,MAAMC,qBAAqBhC,cACzB,sBACAiC;IAGF,IAAI,EAAEQ,cAAc,EAAE,EAAE,GAAGtC;IAC3B,IAAIO,SAAS,CAAC+B,aAAa;QACzB,+DAA+D;QAC/DA,cAAc;IAChB;IAEA,qBACE,KAAC5C;QACE,GAAGsC,qBAAqB;QACzBD,cAAcA;kBAEd,cAAA,MAACnC;YACE,GAAGqC,cAAc;YAClB7B,OAAOA;YACPC,WAAWA;YACXsB,OAAOA;YACPpB,OAAO,CAAC,CAACA;YACTQ,OAAOA;YACPD,OAAOA;YACPG,QAAQA;YACRD,QAAQA;YACRE,SAASA;YACTmB,UAAUA;YACVD,UAAUA;YACVjB,WAAWA;YACXC,gBAAgBA;YAChBC,YAAYA;YACZC,iBAAiBA;YACjBO,oBAAoBA;YACpBN,wBAAwBA;YACxBC,yBAAyBA;;gBAExBU;8BACD,KAACK;oBACE,GAAGJ,SAAS;oBACbjC,IAAIA;oBACJD,KAAKA;oBACLK,MAAMA;oBACNO,MAAMA;oBACNuB,UAAUA;oBACVE,aAAaA;oBACb1B,cAAcA;oBACdR,OAAOqB;oBACPpB,WAAWP,UAAU;wBACnBO,WAAWqB;wBACXc,mBAAmB,CAAC,CAACjC,SAAS,CAACS;oBACjC;;gBAEDT,uBACC,KAACZ;oBACC8C,QAAQ;oBACR3B,OAAOA;oBACPC,OAAOA;oBACPC,QAAQA;oBACRoB,UAAUA;oBACT,GAAG5B,UAAU;oBACdkC,SAASxC;oBACTE,OAAOI,YAAYJ,SAASK;oBAC5BJ,WAAWG,YAAYH,aAAaK;8BAEnCH;;;;;AAMb,GACA"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/TextFieldAddon.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef } from \"react\";\nimport { bem } from \"../utils/bem.js\";\nimport { type ConfigurableTextFieldAddonProps } from \"./types.js\";\n\nconst styles = bem(\"rmd-text-field-addon\");\n\n/** @remarks \\@since 6.0.0 */\nexport interface TextFieldAddonClassNameOptions {\n className?: string;\n\n /**\n * @defaultValue `false`\n */\n after?: boolean;\n\n /**\n *\n * @defaultValue `true`\n */\n presentational?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function textFieldAddon(\n options: TextFieldAddonClassNameOptions = {}\n): string {\n const { className, after = false, presentational = false } = options;\n\n return cnb(\n styles({\n before: !after,\n after,\n presentational,\n }),\n className\n );\n}\n\n/**\n * @remarks \\@since 6.0.0 Split props into `ConfigurableTextFieldAddonProps`\n */\nexport interface TextFieldAddonProps extends ConfigurableTextFieldAddonProps {\n /**\n * @defaultValue `false`\n */\n after?: boolean;\n\n /**\n * Set this to `true` if the addon should not be wrapped in a `<span>` with some\n * additional styles.\n *\n * @defaultValue `false`\n */\n disabled?: boolean;\n}\n\n/**\n * **Server Component**\n *\n * This component is used to add an an icon before or after the text field with\n * correct styling.\n */\nexport const TextFieldAddon = forwardRef<HTMLSpanElement, TextFieldAddonProps>(\n function TextFieldAddon(props, ref) {\n const {\n after = false,\n children,\n className,\n disabled = false,\n pointerEvents = false,\n ...remaining\n } = props;\n\n if (!children) {\n return null;\n }\n\n if (disabled) {\n return <>{children}</>;\n }\n\n return (\n <span\n {...remaining}\n ref={ref}\n className={textFieldAddon({\n after,\n presentational: !pointerEvents,\n className,\n })}\n >\n {children}\n </span>\n );\n }\n);\n"],"names":["cnb","forwardRef","bem","styles","textFieldAddon","options","className","after","presentational","before","TextFieldAddon","props","ref","children","disabled","pointerEvents","remaining","span"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAQ,QAAQ;AACnC,SAASC,GAAG,QAAQ,kBAAkB;AAGtC,MAAMC,SAASD,IAAI;AAkBnB;;CAEC,GACD,OAAO,SAASE,eACdC,UAA0C,CAAC,CAAC;IAE5C,MAAM,EAAEC,SAAS,EAAEC,QAAQ,KAAK,EAAEC,iBAAiB,KAAK,EAAE,GAAGH;IAE7D,OAAOL,IACLG,OAAO;QACLM,QAAQ,CAACF;QACTA;QACAC;IACF,IACAF;AAEJ;AAoBA;;;;;CAKC,GACD,OAAO,MAAMI,+BAAiBT,WAC5B,SAASS,eAAeC,KAAK,EAAEC,GAAG;IAChC,MAAM,EACJL,QAAQ,KAAK,EACbM,QAAQ,EACRP,SAAS,EACTQ,WAAW,KAAK,EAChBC,gBAAgB,KAAK,EACrB,GAAGC,WACJ,GAAGL;IAEJ,IAAI,CAACE,UAAU;QACb,OAAO;IACT;IAEA,IAAIC,UAAU;QACZ,qBAAO;sBAAGD;;IACZ;IAEA,qBACE,KAACI;QACE,GAAGD,SAAS;QACbJ,KAAKA;QACLN,WAAWF,eAAe;YACxBG;YACAC,gBAAgB,CAACO;YACjBT;QACF;kBAECO;;AAGP,GACA"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/TextFieldContainer.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { getFormConfig } from \"./formConfig.js\";\nimport { TextFieldAddon } from \"./TextFieldAddon.js\";\nimport { textFieldContainer } from \"./TextFieldContainerStyles.js\";\nimport { type TextFieldContainerOptions } from \"./types.js\";\n\nexport interface TextFieldContainerProps\n extends HTMLAttributes<HTMLDivElement>,\n TextFieldContainerOptions {\n /**\n * Set this to `true` if there is a floating label with the `TextField` or\n * `TextArea`.\n *\n * @defaultValue `false`\n */\n label?: boolean;\n}\n\n/**\n * **Client Component**\n * This might be able to become a server component if I remove the useFormTheme hook\n *\n * This component is used to add the additional `TextField`, `TextArea`, and\n * `Select` theme styles.\n *\n * @internal\n */\nexport const TextFieldContainer = forwardRef<\n HTMLDivElement,\n TextFieldContainerProps\n>(function TextFieldContainer(props, ref) {\n const {\n children,\n className,\n dense = false,\n error = false,\n label = false,\n active = false,\n inline = false,\n stretch = false,\n readOnly = false,\n disabled = false,\n leftAddon,\n leftAddonProps,\n disableLeftAddonStyles = false,\n rightAddon,\n rightAddonProps,\n disableRightAddonStyles = false,\n theme: propTheme,\n underlineDirection: propUnderlineDirection,\n ...remaining\n } = props;\n const theme = getFormConfig(\"theme\", propTheme);\n const underlineDirection = getFormConfig(\n \"underlineDirection\",\n propUnderlineDirection\n );\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={textFieldContainer({\n theme,\n dense,\n error,\n label,\n inline,\n active,\n stretch,\n readOnly,\n disabled,\n className,\n leftAddon: !!leftAddon && !disableLeftAddonStyles,\n rightAddon: !!rightAddon && !disableRightAddonStyles,\n underlineDirection,\n })}\n >\n <TextFieldAddon {...leftAddonProps} disabled={disableLeftAddonStyles}>\n {leftAddon}\n </TextFieldAddon>\n {children}\n <TextFieldAddon\n {...rightAddonProps}\n disabled={disableRightAddonStyles}\n after\n >\n {rightAddon}\n </TextFieldAddon>\n </div>\n );\n});\n"],"names":["forwardRef","getFormConfig","TextFieldAddon","textFieldContainer","TextFieldContainer","props","ref","children","className","dense","error","label","active","inline","stretch","readOnly","disabled","leftAddon","leftAddonProps","disableLeftAddonStyles","rightAddon","rightAddonProps","disableRightAddonStyles","theme","propTheme","underlineDirection","propUnderlineDirection","remaining","div","after"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAA6B,QAAQ;AACxD,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,kBAAkB,QAAQ,gCAAgC;AAenE;;;;;;;;CAQC,GACD,OAAO,MAAMC,mCAAqBJ,WAGhC,SAASI,mBAAmBC,KAAK,EAAEC,GAAG;IACtC,MAAM,EACJC,QAAQ,EACRC,SAAS,EACTC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,SAAS,EACTC,cAAc,EACdC,yBAAyB,KAAK,EAC9BC,UAAU,EACVC,eAAe,EACfC,0BAA0B,KAAK,EAC/BC,OAAOC,SAAS,EAChBC,oBAAoBC,sBAAsB,EAC1C,GAAGC,WACJ,GAAGtB;IACJ,MAAMkB,QAAQtB,cAAc,SAASuB;IACrC,MAAMC,qBAAqBxB,cACzB,sBACAyB;IAGF,qBACE,MAACE;QACE,GAAGD,SAAS;QACbrB,KAAKA;QACLE,WAAWL,mBAAmB;YAC5BoB;YACAd;YACAC;YACAC;YACAE;YACAD;YACAE;YACAC;YACAC;YACAR;YACAS,WAAW,CAAC,CAACA,aAAa,CAACE;YAC3BC,YAAY,CAAC,CAACA,cAAc,CAACE;YAC7BG;QACF;;0BAEA,KAACvB;gBAAgB,GAAGgB,cAAc;gBAAEF,UAAUG;0BAC3CF;;YAEFV;0BACD,KAACL;gBACE,GAAGmB,eAAe;gBACnBL,UAAUM;gBACVO,KAAK;0BAEJT;;;;AAIT,GAAG"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/TextFieldContainerStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils, type TextColor, type ThemeColor } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { type FormComponentStates, type FormThemeOptions } from \"./types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-text-field-height\"?: string | number;\n \"--rmd-text-field-padding-left\"?: string | number;\n \"--rmd-text-field-padding-right\"?: string | number;\n \"--rmd-text-field-padding-top\"?: string | number;\n \"--rmd-text-field-border-color\"?: string;\n \"--rmd-text-field-hover-border-color\"?: string;\n \"--rmd-text-field-filled-color\"?: string;\n \"--rmd-form-addon-top\"?: string | number;\n \"--rmd-form-addon-margin-top\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-text-field-container\");\n\n/** @remarks \\@since 6.0.0 */\nexport interface TextFieldContainerClassNameOptions\n extends FormThemeOptions,\n FormComponentStates {\n className?: string;\n\n /** @defaultValue `false` */\n dense?: boolean;\n\n /** @defaultValue `false` */\n inline?: boolean;\n\n /** @defaultValue `false` */\n stretch?: boolean;\n\n /** @defaultValue `false` */\n label?: boolean;\n\n /** @defaultValue `false` */\n leftAddon?: boolean;\n\n /** @defaultValue `false` */\n rightAddon?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function textFieldContainer(\n options: TextFieldContainerClassNameOptions = {}\n): string {\n const {\n className,\n theme = \"outline\",\n dense = false,\n error = false,\n label = false,\n active = false,\n inline = false,\n stretch = false,\n readOnly = false,\n disabled = false,\n leftAddon = false,\n rightAddon = false,\n underlineDirection = \"left\",\n } = options;\n const underline = theme === \"underline\";\n const outline = theme === \"outline\";\n const filled = theme === \"filled\";\n const isUnderlined = underline || filled;\n const isOutlineActive = outline && active;\n\n let textColor: ThemeColor | TextColor | undefined;\n if (disabled) {\n textColor = \"text-disabled\";\n } else if (error) {\n textColor = \"error\";\n }\n\n return cnb(\n styles({\n error,\n inline,\n stretch,\n filled,\n outline,\n disabled: disabled || readOnly,\n hoverable: !disabled && !isOutlineActive,\n label: label && !dense,\n dense: !label && dense,\n \"dense-label\": label && dense,\n \"dense-placeholder\": !label && dense && isUnderlined,\n \"outline-active\": isOutlineActive,\n \"outline-error\": outline && error,\n \"outline-left\": outline && leftAddon,\n \"outline-right\": outline && rightAddon,\n underline: isUnderlined,\n \"underline-placeholder\": isUnderlined && !label,\n \"underline-placeholder-only\":\n isUnderlined && !label && !leftAddon && !rightAddon,\n \"underline-labelled\": isUnderlined && label,\n \"underline-active\": isUnderlined && active,\n [`underline-${underlineDirection}`]: isUnderlined,\n \"underline-left-addon\": isUnderlined && leftAddon,\n \"underline-right-addon\": isUnderlined && rightAddon,\n }),\n cssUtils({ textColor }),\n className\n );\n}\n"],"names":["cnb","cssUtils","bem","styles","textFieldContainer","options","className","theme","dense","error","label","active","inline","stretch","readOnly","disabled","leftAddon","rightAddon","underlineDirection","underline","outline","filled","isUnderlined","isOutlineActive","textColor","hoverable"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,QAAQ,QAAyC,iBAAiB;AAC3E,SAASC,GAAG,QAAQ,kBAAkB;AAiBtC,MAAMC,SAASD,IAAI;AA2BnB;;CAEC,GACD,OAAO,SAASE,mBACdC,UAA8C,CAAC,CAAC;IAEhD,MAAM,EACJC,SAAS,EACTC,QAAQ,SAAS,EACjBC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,YAAY,KAAK,EACjBC,aAAa,KAAK,EAClBC,qBAAqB,MAAM,EAC5B,GAAGb;IACJ,MAAMc,YAAYZ,UAAU;IAC5B,MAAMa,UAAUb,UAAU;IAC1B,MAAMc,SAASd,UAAU;IACzB,MAAMe,eAAeH,aAAaE;IAClC,MAAME,kBAAkBH,WAAWT;IAEnC,IAAIa;IACJ,IAAIT,UAAU;QACZS,YAAY;IACd,OAAO,IAAIf,OAAO;QAChBe,YAAY;IACd;IAEA,OAAOxB,IACLG,OAAO;QACLM;QACAG;QACAC;QACAQ;QACAD;QACAL,UAAUA,YAAYD;QACtBW,WAAW,CAACV,YAAY,CAACQ;QACzBb,OAAOA,SAAS,CAACF;QACjBA,OAAO,CAACE,SAASF;QACjB,eAAeE,SAASF;QACxB,qBAAqB,CAACE,SAASF,SAASc;QACxC,kBAAkBC;QAClB,iBAAiBH,WAAWX;QAC5B,gBAAgBW,WAAWJ;QAC3B,iBAAiBI,WAAWH;QAC5BE,WAAWG;QACX,yBAAyBA,gBAAgB,CAACZ;QAC1C,8BACEY,gBAAgB,CAACZ,SAAS,CAACM,aAAa,CAACC;QAC3C,sBAAsBK,gBAAgBZ;QACtC,oBAAoBY,gBAAgBX;QACpC,CAAC,CAAC,UAAU,EAAEO,mBAAmB,CAAC,CAAC,EAAEI;QACrC,wBAAwBA,gBAAgBN;QACxC,yBAAyBM,gBAAgBL;IAC3C,IACAhB,SAAS;QAAEuB;IAAU,IACrBlB;AAEJ"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/fileUtils.ts"],"sourcesContent":["import { nanoid } from \"nanoid\";\nimport { type ChangeEventHandler, type DragEventHandler } from \"react\";\n\n/** @remarks \\@since 2.9.0 */\nexport interface BaseFileUploadStats {\n /**\n * A unique key associated with each upload generated by `nanoid`.\n */\n key: string;\n\n /**\n * The file instance that is being uploaded.\n */\n file: File;\n\n /**\n * The current upload progress as a percentage from 0 - 100 percent.\n */\n progress: number;\n}\n\n/** @remarks \\@since 2.9.0 */\nexport interface ProcessingFileUploadStats extends BaseFileUploadStats {\n status: \"pending\" | \"uploading\";\n}\n\n/** @remarks \\@since 2.9.0 */\nexport type FileReaderResult = FileReader[\"result\"];\n\n/** @remarks \\@since 2.9.0 */\nexport interface CompletedFileUploadStats extends BaseFileUploadStats {\n status: \"complete\";\n\n /**\n * The result after a `FileReader` has read a file completely.\n *\n * Note: This _should_ be an `ArrayBuffer` if the next step is to upload to a\n * server.\n *\n * @see {@link FileReaderParser}\n * @see {@link getFileParser}\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/FileReader | FileReader}\n */\n result: FileReaderResult;\n}\n\n/** @remarks \\@since 2.9.0 */\nexport type FileUploadStats =\n | ProcessingFileUploadStats\n | CompletedFileUploadStats;\n\n/** @remarks \\@since 2.9.0 */\nexport type FileUploadStatus = FileUploadStats[\"status\"];\n\n/** @remarks \\@since 2.9.0 */\nexport interface FileUploadHandlers<E extends HTMLElement> {\n onDrop?: DragEventHandler<E>;\n onChange?: ChangeEventHandler<HTMLInputElement>;\n}\n\n/**\n * An error that will be created if a user tries dragging and dropping files\n * from a shared directory that they do not have access to. This error will not\n * occur much.\n *\n * @remarks \\@since 2.9.0\n */\nexport class FileAccessError extends Error {\n /**\n * A unique key generated by `nanoid` that can be used as a `React` key\n */\n public key: string;\n\n /**\n *\n * @param message - An optional message for the error.\n */\n constructor(message?: string) {\n super(message);\n this.key = nanoid();\n this.name = \"FileAccessError\";\n }\n}\n\n/**\n * An error that just requires a `File` to be passed as the first argument.\n *\n * @remarks \\@since 2.9.0\n */\nexport class GenericFileError extends Error {\n /**\n * A unique key generated by `nanoid` that can be used as a `React` key\n */\n public key: string;\n\n /**\n *\n * @param files - A list of files that caused the error.\n * @param reason - An optional reason for the error\n */\n constructor(\n public files: readonly File[],\n public reason?: string\n ) {\n super(\"Invalid files\");\n this.key = nanoid();\n this.name = \"GenericFileError\";\n }\n}\n\n/**\n * An error that is created during the upload process if the number of files\n * exceeds the {@link FileUploadOptions.maxFiles} amount.\n *\n * @remarks \\@since 2.9.0\n */\nexport class TooManyFilesError extends GenericFileError {\n /**\n *\n * @param files - The list of files that could not be uploaded due to the file\n * limit defined.\n * @param limit - The max limit of files allowed.\n */\n constructor(\n files: readonly File[],\n public limit: number\n ) {\n super(files, \"file limit\");\n this.name = \"TooManyFilesError\";\n }\n}\n\n/**\n * An error that will be created if a user tries to upload a file that\n * is either:\n * - less than the {@link FileValidationOptions.minFileSize}\n * - greater than the {@link FileValidationOptions.maxFileSize}\n * - including the file would be greater than the {@link FileValidationOptions.totalFileSize}\n *\n * @remarks \\@since 2.9.0\n */\nexport class FileSizeError extends GenericFileError {\n /**\n *\n * @param files - The list of files that have the file size error\n * @param type - The file size error type\n * @param limit - The number of bytes allowed based on the type\n */\n constructor(\n files: readonly File[],\n public type: \"min\" | \"max\" | \"total\",\n public limit: number\n ) {\n super(files, \"file size\");\n this.name = \"FileSizeError\";\n }\n}\n\n/**\n * An error that will be created if a user tries to upload a file that does not\n * end with one of the {@link FileValidationOptions.extensions}.\n *\n * @remarks \\@since 2.9.0\n */\nexport class FileExtensionError extends GenericFileError {\n /**\n *\n * @param files - The file that caused the error\n * @param extensions - The allowed list of file extensions\n */\n constructor(\n files: readonly File[],\n public extensions: readonly string[]\n ) {\n super(files, \"extension\");\n this.name = \"FileExtensionError\";\n }\n}\n\n/**\n * Mostly an internal type that is used to allow custom validation errors\n *\n * @remarks \\@since 2.9.0\n */\nexport type FileValidationError<E = GenericFileError> =\n | FileAccessError\n | TooManyFilesError\n | FileSizeError\n | FileExtensionError\n | E;\n\n/**\n * A simple type-guard that can be used to check if the\n * {@link FileValidationError} is the {@link GenericFileError} which can be\n * useful when displaying the errors to the user.\n *\n * @param error - The error to check\n * @returns true if the error is a {@link FileAccessError}\n */\nexport function isGenericFileError<CustomError extends {}>(\n error: FileValidationError<CustomError>\n): error is GenericFileError {\n return \"name\" in error && error.name === \"GenericFileError\";\n}\n\n/**\n * A simple type-guard that can be used to check if the\n * {@link FileValidationError} is the {@link FileAccessError} which can be\n * useful when displaying the errors to the user.\n *\n * @param error - The error to check\n * @returns true if the error is a {@link FileAccessError}\n */\nexport function isFileAccessError<CustomError extends {}>(\n error: FileValidationError<CustomError>\n): error is FileAccessError {\n return \"name\" in error && error.name === \"FileAccessError\";\n}\n\n/**\n * A simple type-guard that can be used to check if the\n * {@link FileValidationError} is the {@link TooManyFilesError} which can be\n * useful when displaying the errors to the user.\n *\n * @param error - The error to check\n * @returns true if the error is a {@link TooManyFilesError}\n */\nexport function isTooManyFilesError<CustomError extends {}>(\n error: FileValidationError<CustomError>\n): error is TooManyFilesError {\n return \"name\" in error && error.name === \"TooManyFilesError\";\n}\n\n/**\n * A simple type-guard that can be used to check if the\n * {@link FileValidationError} is the {@link FileSizeError} which can be\n * useful when displaying the errors to the user.\n *\n * @param error - The error to check\n * @returns true if the error is a {@link FileSizeError}\n */\nexport function isFileSizeError<CustomError extends {}>(\n error: FileValidationError<CustomError>\n): error is FileSizeError {\n return \"name\" in error && error.name === \"FileSizeError\";\n}\n\n/**\n * A simple type-guard that can be used to check if the\n * {@link FileValidationError} is the {@link FileExtensionError} which can be\n * useful when displaying the errors to the user.\n *\n * @param error - The error to check\n * @returns true if the error is a {@link FileExtensionError}\n */\nexport function isFileExtensionError<CustomError extends {}>(\n error: FileValidationError<CustomError>\n): error is FileExtensionError {\n return \"name\" in error && error.name === \"FileExtensionError\";\n}\n\n/**\n * This function is used to determine if a file should be added to the\n * {@link FileExtensionError}. The default implementation should work for most\n * use cases except when files that do not have extensions can be uploaded. i.e.\n * LICENSE files.\n *\n * @param file - The file being checked\n * @param extensionRegExp - A regex that will only be defined if the\n * `extensions` list had at least one value.\n * @param extensions - The list of extensions allowed\n * @returns true if the file has a valid name.\n * @remarks \\@since 3.1.0\n */\nexport type IsValidFileName = (\n file: File,\n extensionRegExp: RegExp | undefined,\n extensions: readonly string[]\n) => boolean;\n\n/**\n *\n * @defaultValue `matcher?.test(file.name) ?? true`\n * @remarks \\@since 3.1.0\n */\nexport const isValidFileName: IsValidFileName = (file, matcher) =>\n matcher?.test(file.name) ?? true;\n\n/** @remarks \\@since 2.9.0 */\nexport interface FileValidationOptions {\n /**\n * If the number of files should be limited, set this value to a number\n * greater than `0`.\n *\n * Note: This still allows \"infinite\" files when set to `0` since the\n * `<input>` element should normally be set to `disabled` if files should not\n * be able to be uploaded.\n *\n * @defaultValue `-1`\n */\n maxFiles?: number;\n\n /**\n * An optional minimum file size to enforce for each file. This will only be\n * used when it is greater than `0`.\n *\n * @defaultValue `-1`\n */\n minFileSize?: number;\n\n /**\n * An optional maximum file size to enforce for each file. This will only be\n * used when it is greater than `0`.\n *\n * @defaultValue `-1`\n */\n maxFileSize?: number;\n\n /**\n * An optional list of extensions to enforce when uploading files.\n *\n * Note: The extensions and file names will be compared ignoring case.\n *\n * @example\n * Only Allow Images\n * ```ts\n * const extensions = [\"png\", \"jpeg\", \"jpg\", \"gif\"];\n * ```\n */\n extensions?: readonly string[];\n\n /** {@inheritDoc IsValidFileName} */\n isValidFileName?: IsValidFileName;\n\n /**\n * An optional total file size to enforce when the {@link maxFiles} option is\n * not set to `1`.\n *\n * @defaultValue `-1`\n */\n totalFileSize?: number;\n}\n\n/** @remarks \\@since 2.9.0 */\nexport interface FilesValidationOptions\n extends Required<FileValidationOptions> {\n /**\n * The total number of bytes in the {@link FileUploadHookReturnValue.stats}\n * list. This is really just:\n *\n * ```ts\n * const totalBytes = stats.reduce((total, stat) => total + stat.file.size, 0);\n * ```\n */\n totalBytes: number;\n\n /**\n * The total number of files in the {@link FileUploadHookReturnValue.stats}.\n */\n totalFiles: number;\n}\n\n/** @remarks \\@since 2.9.0 */\nexport interface ValidatedFilesResult<CustomError> {\n /**\n * A filtered list of files that have been validated and can be queued for the\n * upload process.\n */\n pending: readonly File[];\n\n /**\n * A list of {@link FileValidationError} that occurred during the validation\n * step.\n *\n * Note: If an error has occurred, the file **should not** be added to the\n * {@link pending} list of files.\n */\n errors: readonly FileValidationError<CustomError>[];\n}\n\n/**\n * This function will be called whenever a file has been uploaded by the user\n * either through an `<input type=\"file\">` or drag and drop behavior.\n *\n * @example\n * Simple Example\n * ```ts\n * const validateFiles: FilesValidator = (files, options) => {\n * const invalid: File[] = [];\n * const pending: File[] = [];\n * for (const file of files) {\n * if (!/\\.(jpe?g|svg|png)$/i.test(name)) {\n * invalid.push(file);\n * } else {\n * pending.push(file);\n * }\n * }\n *\n * const errors: FileValidationError[] = [];\n * if (invalid.length) {\n * errors.push(new GenericFileError(invalid))\n * }\n *\n * return { pending, errors };\n * };\n * ```\n *\n * @typeparam E - An optional custom file validation error.\n * @param files - The list of files to check\n * @param options - The {@link FilesValidationOptions}\n * @returns the {@link ValidatedFilesResult}\n * @see {@link validateFiles} for the default implementation\n * @remarks \\@since 2.9.0\n */\nexport type FilesValidator<CustomError = never> = (\n files: readonly File[],\n options: FilesValidationOptions\n) => ValidatedFilesResult<CustomError>;\n\n/**\n * A pretty decent default implementation for validating files with the\n * {@link useFileUpload} that ensures the {@link FilesValidationOptions} are\n * enforced before allowing a file to be uploaded.\n *\n * @typeparam E - An optional custom file validation error.\n * @param files - The list of files to check\n * @param options - The {@link FilesValidationOptions}\n * @returns the {@link ValidatedFilesResult}\n * @remarks \\@since 2.9.0\n */\nexport function validateFiles<CustomError>(\n files: readonly File[],\n {\n maxFiles,\n extensions,\n minFileSize,\n maxFileSize,\n totalBytes,\n totalFiles,\n totalFileSize,\n isValidFileName,\n }: FilesValidationOptions\n): ValidatedFilesResult<CustomError> {\n const errors: FileValidationError<CustomError>[] = [];\n const pending: File[] = [];\n const extraFiles: File[] = [];\n const extensionRegExp =\n extensions.length > 0\n ? new RegExp(`\\\\.(${extensions.join(\"|\")})$`, \"i\")\n : undefined;\n\n let maxFilesReached = maxFiles > 0 && totalFiles >= maxFiles;\n let remainingBytes = totalFileSize - totalBytes;\n const extensionErrors: File[] = [];\n const minErrors: File[] = [];\n const maxErrors: File[] = [];\n const totalSizeErrors: File[] = [];\n for (let i = 0; i < files.length; i += 1) {\n const file = files[i];\n\n let valid = true;\n const { size } = file;\n if (!isValidFileName(file, extensionRegExp, extensions)) {\n valid = false;\n extensionErrors.push(file);\n }\n\n if (minFileSize > 0 && size < minFileSize) {\n valid = false;\n minErrors.push(file);\n }\n\n if (maxFileSize > 0 && size > maxFileSize) {\n valid = false;\n maxErrors.push(file);\n } else if (totalFileSize > 0 && remainingBytes - file.size < 0) {\n // don't want both errors displaying\n valid = false;\n totalSizeErrors.push(file);\n }\n\n if (maxFilesReached && valid) {\n extraFiles.push(file);\n } else if (!maxFilesReached && valid) {\n pending.push(file);\n remainingBytes -= file.size;\n maxFilesReached =\n maxFilesReached ||\n (maxFiles > 0 && totalFiles + pending.length >= maxFiles);\n }\n }\n\n if (extensionErrors.length) {\n errors.push(new FileExtensionError(extensionErrors, extensions));\n }\n\n if (minErrors.length) {\n errors.push(new FileSizeError(minErrors, \"min\", minFileSize));\n }\n\n if (maxErrors.length) {\n errors.push(new FileSizeError(maxErrors, \"max\", maxFileSize));\n }\n\n if (totalSizeErrors.length) {\n errors.push(new FileSizeError(totalSizeErrors, \"total\", totalFileSize));\n }\n\n if (extraFiles.length) {\n errors.push(new TooManyFilesError(extraFiles, maxFiles));\n }\n\n return { pending, errors };\n}\n\n/**\n * This will first check if the mime-type of the file starts with `text/` and\n * fallback to checking a few file names or extensions that should be considered\n * text.\n *\n * This function is not guaranteed to be 100% correct and is only useful if\n * trying to generate a preview of files uploaded to the browser.\n *\n * @param file - The file to check\n * @returns `true` if the file should be considered as a text-content file.\n * @remarks \\@since 2.9.0\n */\nexport function isTextFile(file: File): boolean {\n return /\\.((j|t)sx?|json|lock|hbs|ya?ml|log|txt|md)$/i.test(file.name);\n}\n\n/**\n * This will first check if the mime-type of the file starts with `text\\/` and\n * fallback to checking a few file names or extensions that should be considered\n * text.\n *\n * This function is not guaranteed to be 100% correct and is only useful if\n * trying to generate a preview of files uploaded to the browser.\n *\n * @param file - The file to check\n * @returns `true` if the file should be considered as a text content file.\n * @remarks \\@since 2.9.0\n */\nexport function isImageFile(file: File): boolean {\n return /\\.(a?png|avif|svg|tiff|gifv?|jpe?g)/i.test(file.name);\n}\n\n/**\n * This will first check if the mime-type of the file starts with `audio/` and\n * fallback to checking a few file names or extensions that should be considered\n * audio.\n *\n * This function is not guaranteed to be 100% correct and is only useful if\n * trying to generate a preview of files uploaded to the browser.\n *\n * @param file - The file to check\n * @returns `true` if the file should be considered as a audio content file.\n * @remarks \\@since 2.9.0\n */\nexport function isAudioFile(file: File): boolean {\n return /\\.(mp3|wav|ogg|m4p|flac)$/i.test(file.name);\n}\n\n/**\n * This will first check if the mime-type of the file starts with `video/` and\n * fallback to checking a few file names or extensions that should be considered\n * video.\n *\n * This function is not guaranteed to be 100% correct and is only useful if\n * trying to generate a preview of files uploaded to the browser.\n *\n * @param file - The file to check\n * @returns `true` if the file should be considered as a video content file.\n * @remarks \\@since 2.9.0\n */\nexport function isVideoFile(file: File): boolean {\n return /\\.(mkv|mpe?g|mov|avi|flv|webm|mp4)$/i.test(file.name);\n}\n\n/**\n * This function is not guaranteed to be 100% correct and is only useful if\n * trying to generate a preview of files uploaded to the browser.\n *\n * @param file - The file to check\n * @returns `true` if the file matches an image, audio, or video file.\n * @remarks \\@since 2.9.0\n */\nexport function isMediaFile(file: File): boolean {\n return isImageFile(file) || isAudioFile(file) || isVideoFile(file);\n}\n\n/**\n * One of the function names from a `FileReader` to upload a file to the\n * client.\n *\n * Note: If this file does not need to be previewed in the browser and will\n * immediately be uploaded to a server, use `readAsArrayBuffer`.\n *\n * @remarks \\@since 2.9.0\n */\nexport type FileReaderParser =\n | \"readAsText\"\n | \"readAsDataURL\"\n | \"readAsBinaryString\"\n | \"readAsArrayBuffer\";\n\n/**\n * A function that should return one of the {@link FileReaderParser} functions\n * to start uploading a file to the browser.\n *\n * @example\n * The Default File Upload Parser\n * ```ts\n * export const getFileParser: GetFileParser = (file) => {\n * if (isMediaFile(file)) {\n * return \"readAsDataURL\";\n * }\n *\n * if (isTextFile(file)) {\n * return \"readAsText\";\n * }\n *\n * return \"readAsArrayBuffer\";\n * };\n * ```\n *\n * @param file - The file to get a parser for\n * @returns the {@link FileReaderParser} string.\n * @remarks \\@since 2.9.0\n */\nexport type GetFileParser = (file: File) => FileReaderParser;\n\n/**\n * This function will attempt to read:\n * - media (image, audio, and video) files as a data url so they can be\n * previewed in `<img>`, `<audio>`, and `<video>` tags\n * - text files as plain text\n * - everything else as an `ArrayBuffer` which can be manually converted into a\n * data url if needed with `URL.createObjectURL`\n *\n * @remarks \\@since 2.9.0\n */\nexport const getFileParser: GetFileParser = (file) => {\n if (isMediaFile(file)) {\n return \"readAsDataURL\";\n }\n\n if (isTextFile(file)) {\n return \"readAsText\";\n }\n\n return \"readAsArrayBuffer\";\n};\n\n/** @remarks \\@since 2.9.0 */\nexport interface SplitFileUploads {\n readonly pending: readonly ProcessingFileUploadStats[];\n readonly uploading: readonly ProcessingFileUploadStats[];\n readonly complete: readonly CompletedFileUploadStats[];\n}\n\n/**\n * This util will split all the current upload stats by status.\n *\n * @param stats - The {@link FileUploadStats} list generally returned by the\n * {@link useFileUpload} hook.\n * @returns the {@link SplitFileUploads}.\n * @remarks \\@since 2.9.0\n */\nexport function getSplitFileUploads(\n stats: readonly FileUploadStats[]\n): SplitFileUploads {\n const pending: ProcessingFileUploadStats[] = [];\n const uploading: ProcessingFileUploadStats[] = [];\n const complete: CompletedFileUploadStats[] = [];\n stats.forEach((stat) => {\n if (stat.status === \"pending\") {\n pending.push(stat);\n } else if (stat.status === \"uploading\") {\n uploading.push(stat);\n } else if (stat.status === \"complete\") {\n complete.push(stat);\n } else {\n /* istanbul ignore next */\n throw new Error(\"Invalid upload stat\");\n }\n });\n\n return { pending, uploading, complete };\n}\n"],"names":["nanoid","FileAccessError","Error","constructor","message","key","name","GenericFileError","files","reason","TooManyFilesError","limit","FileSizeError","type","FileExtensionError","extensions","isGenericFileError","error","isFileAccessError","isTooManyFilesError","isFileSizeError","isFileExtensionError","isValidFileName","file","matcher","test","validateFiles","maxFiles","minFileSize","maxFileSize","totalBytes","totalFiles","totalFileSize","errors","pending","extraFiles","extensionRegExp","length","RegExp","join","undefined","maxFilesReached","remainingBytes","extensionErrors","minErrors","maxErrors","totalSizeErrors","i","valid","size","push","isTextFile","isImageFile","isAudioFile","isVideoFile","isMediaFile","getFileParser","getSplitFileUploads","stats","uploading","complete","forEach","stat","status"],"mappings":";;;;;;;;;;;;;AAAA,SAASA,MAAM,QAAQ,SAAS;AA4DhC;;;;;;CAMC,GACD,OAAO,MAAMC,wBAAwBC;IAMnC;;;GAGC,GACDC,YAAYC,OAAgB,CAAE;QAC5B,KAAK,CAACA;QAVR;;GAEC,GACD,uBAAOC,OAAP,KAAA;QAQE,IAAI,CAACA,GAAG,GAAGL;QACX,IAAI,CAACM,IAAI,GAAG;IACd;AACF;AAEA;;;;CAIC,GACD,OAAO,MAAMC,yBAAyBL;IAMpC;;;;GAIC,GACDC,YACE,AAAOK,KAAsB,EAC7B,AAAOC,MAAe,CACtB;QACA,KAAK,CAAC;;;QAdR;;GAEC,GACD,uBAAOJ,OAAP,KAAA;aAQSG,QAAAA;aACAC,SAAAA;QAGP,IAAI,CAACJ,GAAG,GAAGL;QACX,IAAI,CAACM,IAAI,GAAG;IACd;AACF;AAEA;;;;;CAKC,GACD,OAAO,MAAMI,0BAA0BH;IACrC;;;;;GAKC,GACDJ,YACEK,KAAsB,EACtB,AAAOG,KAAa,CACpB;QACA,KAAK,CAACH,OAAO;;aAFNG,QAAAA;QAGP,IAAI,CAACL,IAAI,GAAG;IACd;AACF;AAEA;;;;;;;;CAQC,GAC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;;CAOC,GACD,OAAO,SAASkC,oBACdC,KAAiC;IAEjC,MAAMxB,UAAuC,EAAE;IAC/C,MAAMyB,YAAyC,EAAE;IACjD,MAAMC,WAAuC,EAAE;IAC/CF,MAAMG,OAAO,CAAC,CAACC;QACb,IAAIA,KAAKC,MAAM,KAAK,WAAW;YAC7B7B,QAAQgB,IAAI,CAACY;QACf,OAAO,IAAIA,KAAKC,MAAM,KAAK,aAAa;YACtCJ,UAAUT,IAAI,CAACY;QACjB,OAAO,IAAIA,KAAKC,MAAM,KAAK,YAAY;YACrCH,SAASV,IAAI,CAACY;QAChB,OAAO;YACL,wBAAwB,GACxB,MAAM,IAAI5D,MAAM;QAClB;IACF;IAEA,OAAO;QAAEgC;QAASyB;QAAWC;IAAS;AACxC"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/formConfig.ts"],"sourcesContent":["import { type FormConfiguration } from \"./types.js\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport const FORM_CONFIG: FormConfiguration = {\n theme: \"outline\",\n underlineDirection: \"left\",\n uncontrolledToggles: true,\n};\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function getFormConfig<N extends keyof FormConfiguration>(\n name: N,\n override?: FormConfiguration[N]\n): FormConfiguration[N] {\n if (typeof override !== \"undefined\") {\n return override;\n }\n\n return FORM_CONFIG[name];\n}\n"],"names":["FORM_CONFIG","theme","underlineDirection","uncontrolledToggles","getFormConfig","name","override"],"mappings":"AAEA;;CAEC,GACD,OAAO,MAAMA,cAAiC;IAC5CC,OAAO;IACPC,oBAAoB;IACpBC,qBAAqB;AACvB,EAAE;AAEF;;CAEC,GACD,OAAO,SAASC,cACdC,IAAO,EACPC,QAA+B;IAE/B,IAAI,OAAOA,aAAa,aAAa;QACnC,OAAOA;IACT;IAEA,OAAON,WAAW,CAACK,KAAK;AAC1B"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/formMessageStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { type FormMessageClassNameOptions } from \"./types.js\";\n\nconst styles = bem(\"rmd-form-message\");\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function formMessage(options: FormMessageClassNameOptions = {}): string {\n const { className, error = false, theme = \"none\" } = options;\n\n return cnb(\n styles({ [theme]: theme !== \"none\" }),\n cssUtils({ textColor: error ? \"error\" : \"text-secondary\" }),\n className\n );\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface FormMessageTextClassNameOptions {\n className?: string;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function formMessageText(\n options: FormMessageTextClassNameOptions = {}\n): string {\n const { className } = options;\n\n return cnb(styles(\"message\"), className);\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface FormMessageCounterClassNameOptions {\n className?: string;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function formMessageCounter(\n options: FormMessageCounterClassNameOptions = {}\n): string {\n const { className } = options;\n\n return cnb(styles(\"counter\"), className);\n}\n"],"names":["cnb","cssUtils","bem","styles","formMessage","options","className","error","theme","textColor","formMessageText","formMessageCounter"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,GAAG,QAAQ,kBAAkB;AAGtC,MAAMC,SAASD,IAAI;AAEnB;;CAEC,GACD,OAAO,SAASE,YAAYC,UAAuC,CAAC,CAAC;IACnE,MAAM,EAAEC,SAAS,EAAEC,QAAQ,KAAK,EAAEC,QAAQ,MAAM,EAAE,GAAGH;IAErD,OAAOL,IACLG,OAAO;QAAE,CAACK,MAAM,EAAEA,UAAU;IAAO,IACnCP,SAAS;QAAEQ,WAAWF,QAAQ,UAAU;IAAiB,IACzDD;AAEJ;AAOA;;CAEC,GACD,OAAO,SAASI,gBACdL,UAA2C,CAAC,CAAC;IAE7C,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,OAAOL,IAAIG,OAAO,YAAYG;AAChC;AAOA;;CAEC,GACD,OAAO,SAASK,mBACdN,UAA8C,CAAC,CAAC;IAEhD,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,OAAOL,IAAIG,OAAO,YAAYG;AAChC"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/inputToggleStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { type FormComponentStates } from \"./types.js\";\n\nconst styles = bem(\"rmd-input-toggle\");\n\n/**\n * The size to use for the `Checkbox` or `Radio` component. Each of these values\n * except for `\"auto\"` map to Sass variables:\n * - `\"small\"` - `$input-toggle-small-size`\n * - `\"dense\"` - `$input-toggle-dense-size`\n * - `\"normal\"` - `$input-toggle-large-size`\n * - `\"large\"` - `$input-toggle-large-size`\n *\n * When this is set to `\"auto\"`, the size will be determined by the current\n * `font-size` of the `Label` element.\n *\n * @remarks \\@since 6.0.0\n */\nexport type InputToggleSize = \"auto\" | \"small\" | \"dense\" | \"normal\" | \"large\";\n\n/** @remarks \\@since 6.0.0 */\nexport interface InputToggleClassNameOptions\n extends Omit<FormComponentStates, \"readOnly\"> {\n className?: string;\n type: \"checkbox\" | \"radio\";\n\n /**\n * Set the icon size to `1em` to allow easy sizing through font size.\n *\n * @defaultValue `true`\n */\n em?: boolean;\n\n /**\n * @see {@link InputToggleSize}\n * @defaultValue `\"auto\"`\n */\n size?: InputToggleSize;\n\n uncontrolled?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function inputToggle(options: InputToggleClassNameOptions): string {\n const {\n className,\n em = true,\n type,\n size = \"auto\",\n error,\n active = false,\n disabled = false,\n uncontrolled,\n } = options;\n\n return cnb(\n `rmd-${type}`,\n styles({\n em,\n active: active && !disabled,\n disabled,\n small: size === \"small\",\n dense: size === \"dense\",\n normal: size === \"normal\",\n large: size === \"large\",\n uncontrolled,\n }),\n cssUtils({\n textColor: disabled ? \"text-disabled\" : error ? \"error\" : undefined,\n }),\n className\n );\n}\n"],"names":["cnb","cssUtils","bem","styles","inputToggle","options","className","em","type","size","error","active","disabled","uncontrolled","small","dense","normal","large","textColor","undefined"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,GAAG,QAAQ,kBAAkB;AAGtC,MAAMC,SAASD,IAAI;AAuCnB;;CAEC,GACD,OAAO,SAASE,YAAYC,OAAoC;IAC9D,MAAM,EACJC,SAAS,EACTC,KAAK,IAAI,EACTC,IAAI,EACJC,OAAO,MAAM,EACbC,KAAK,EACLC,SAAS,KAAK,EACdC,WAAW,KAAK,EAChBC,YAAY,EACb,GAAGR;IAEJ,OAAOL,IACL,CAAC,IAAI,EAAEQ,KAAK,CAAC,EACbL,OAAO;QACLI;QACAI,QAAQA,UAAU,CAACC;QACnBA;QACAE,OAAOL,SAAS;QAChBM,OAAON,SAAS;QAChBO,QAAQP,SAAS;QACjBQ,OAAOR,SAAS;QAChBI;IACF,IACAZ,SAAS;QACPiB,WAAWN,WAAW,kBAAkBF,QAAQ,UAAUS;IAC5D,IACAb;AAEJ"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/nativeSelectStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-native-select\");\nconst containerStyles = bem(\"rmd-native-select-container\");\n\n/** @remarks \\@since 6.0.0 */\nexport interface NativeSelectClassNameOptions {\n className?: string;\n\n /**\n * Set to `true` if using a custom icon instead of the default `<select>`\n * appearance.\n *\n * @defaultValue `false`\n */\n icon?: boolean;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport function nativeSelect(\n options: NativeSelectClassNameOptions = {}\n): string {\n const { className, icon = false } = options;\n\n return cnb(styles({ icon }), className);\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface NativeSelectContainerClassNameOptions {\n className?: string;\n label?: boolean;\n multiple?: boolean;\n underlined?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function nativeSelectContainer(\n options: NativeSelectContainerClassNameOptions = {}\n): string {\n const { className, label, multiple, underlined } = options;\n\n return cnb(\n containerStyles({\n multi: multiple,\n padded: label && multiple && !underlined,\n underline: multiple && underlined,\n \"underline-padded\": label && multiple && underlined,\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","containerStyles","nativeSelect","options","className","icon","nativeSelectContainer","label","multiple","underlined","multi","padded","underline"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AACnB,MAAME,kBAAkBF,IAAI;AAe5B,2BAA2B,GAC3B,OAAO,SAASG,aACdC,UAAwC,CAAC,CAAC;IAE1C,MAAM,EAAEC,SAAS,EAAEC,OAAO,KAAK,EAAE,GAAGF;IAEpC,OAAOL,IAAIE,OAAO;QAAEK;IAAK,IAAID;AAC/B;AAYA;;CAEC,GACD,OAAO,SAASE,sBACdH,UAAiD,CAAC,CAAC;IAEnD,MAAM,EAAEC,SAAS,EAAEG,KAAK,EAAEC,QAAQ,EAAEC,UAAU,EAAE,GAAGN;IAEnD,OAAOL,IACLG,gBAAgB;QACdS,OAAOF;QACPG,QAAQJ,SAASC,YAAY,CAACC;QAC9BG,WAAWJ,YAAYC;QACvB,oBAAoBF,SAASC,YAAYC;IAC3C,IACAL;AAEJ"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/optionStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-option\");\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface OptionClassNameOptions {\n className?: string;\n icon: boolean;\n selected: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function option(options: OptionClassNameOptions): string {\n const { className, icon, selected } = options;\n\n return cnb(styles({ icon, selected }), className);\n}\n"],"names":["cnb","bem","styles","option","options","className","icon","selected"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAWnB;;CAEC,GACD,OAAO,SAASE,OAAOC,OAA+B;IACpD,MAAM,EAAEC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGH;IAEtC,OAAOJ,IAAIE,OAAO;QAAEI;QAAMC;IAAS,IAAIF;AACzC"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/passwordStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-password\");\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface PasswordClassNameOptions {\n className?: string;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function password(options: PasswordClassNameOptions = {}): string {\n const { className } = options;\n\n return cnb(styles(), className);\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface PasswordInputClassNameOptions {\n className?: string;\n}\n\nexport function passwordInput(\n options: PasswordInputClassNameOptions = {}\n): string {\n const { className } = options;\n\n return cnb(styles(\"input\"), className);\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface PasswordInputToggleClassNameOptions {\n className?: string;\n}\n\nexport function passwordInputToggle(\n options: PasswordInputToggleClassNameOptions = {}\n): string {\n const { className } = options;\n\n return cnb(styles(\"toggle\"), className);\n}\n"],"names":["cnb","bem","styles","password","options","className","passwordInput","passwordInputToggle"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AASnB;;CAEC,GACD,OAAO,SAASE,SAASC,UAAoC,CAAC,CAAC;IAC7D,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,OAAOJ,IAAIE,UAAUG;AACvB;AASA,OAAO,SAASC,cACdF,UAAyC,CAAC,CAAC;IAE3C,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,OAAOJ,IAAIE,OAAO,UAAUG;AAC9B;AASA,OAAO,SAASE,oBACdH,UAA+C,CAAC,CAAC;IAEjD,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,OAAOJ,IAAIE,OAAO,WAAWG;AAC/B"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/selectStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\nimport { type FormTheme } from \"./types.js\";\n\nconst styles = bem(\"rmd-select\");\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface SelectClassNameOptions {\n className?: string;\n /**\n * @defaultValue `\"outline\"`\n */\n theme?: FormTheme;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function select(options: SelectClassNameOptions = {}): string {\n const { className, theme = \"outline\" } = options;\n\n return cnb(\n styles({\n filled: theme === \"filled\",\n outline: theme === \"outline\",\n underline: theme === \"underline\",\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","select","options","className","theme","filled","outline","underline"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAGtC,MAAMC,SAASD,IAAI;AAanB;;CAEC,GACD,OAAO,SAASE,OAAOC,UAAkC,CAAC,CAAC;IACzD,MAAM,EAAEC,SAAS,EAAEC,QAAQ,SAAS,EAAE,GAAGF;IAEzC,OAAOJ,IACLE,OAAO;QACLK,QAAQD,UAAU;QAClBE,SAASF,UAAU;QACnBG,WAAWH,UAAU;IACvB,IACAD;AAEJ"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/form/selectUtils.ts"],"sourcesContent":["import { Children, isValidElement, type ReactNode } from \"react\";\nimport { type MenuItemProps } from \"../menu/MenuItem.js\";\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport interface SelectOption<Value extends string | number = string>\n extends MenuItemProps {\n value: Value;\n}\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nfunction getLabelFromChildren(children: ReactNode): string {\n if (!children) {\n return \"\";\n }\n\n if (typeof children === \"string\" || typeof children === \"number\") {\n return `${children}`;\n }\n\n if (isValidElement<{ children: ReactNode; hidden?: boolean }>(children)) {\n if (children.props.hidden) {\n return \"\";\n }\n\n return getLabelFromChildren(children.props.children);\n }\n\n const childList = Children.toArray(children);\n for (const child of childList) {\n if (typeof child === \"string\" || typeof child === \"number\") {\n return `${child}`[0].toUpperCase();\n }\n\n if (\n isValidElement<{ children: ReactNode; hidden?: boolean }>(child) &&\n !child.props.hidden\n ) {\n return getLabelFromChildren(child.props.children);\n }\n }\n\n return \"\";\n}\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\ninterface ExtractedOptions<Value extends string | number> {\n options: readonly SelectOption<Value>[];\n currentOption: SelectOption<Value> | undefined;\n searchValues: readonly string[];\n currentIndex: number;\n}\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport function extractOptionsFromChildren<Value extends string | number>(\n children: ReactNode,\n currentValue: Value | undefined\n): ExtractedOptions<Value> {\n let currentOption: SelectOption<Value> | undefined;\n let currentIndex = -1;\n\n const options: SelectOption<Value>[] = [];\n const searchValues: string[] = [];\n Children.forEach(children, (child) => {\n if (!isValidElement<SelectOption<Value>>(child)) {\n return;\n }\n\n const { value, disabled, children } = child.props;\n if (typeof value !== \"undefined\") {\n if (\n value === currentValue ||\n (!currentOption && typeof currentValue === \"undefined\")\n ) {\n currentOption = child.props;\n currentIndex = options.length;\n }\n\n if (!disabled) {\n options.push(child.props);\n searchValues.push(getLabelFromChildren(children));\n }\n } else if (children) {\n const result = extractOptionsFromChildren(children, currentValue);\n if (!currentOption) {\n ({ currentOption } = result);\n }\n\n if (result.currentIndex !== -1) {\n currentIndex = options.length + result.currentIndex;\n }\n\n options.push(...result.options);\n searchValues.push(...result.searchValues);\n }\n });\n\n return {\n options,\n searchValues,\n currentOption,\n currentIndex,\n };\n}\n"],"names":["Children","isValidElement","getLabelFromChildren","children","props","hidden","childList","toArray","child","toUpperCase","extractOptionsFromChildren","currentValue","currentOption","currentIndex","options","searchValues","forEach","value","disabled","length","push","result"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,cAAc,QAAwB,QAAQ;AAYjE;;;CAGC,GACD,SAASC,qBAAqBC,QAAmB;IAC/C,IAAI,CAACA,UAAU;QACb,OAAO;IACT;IAEA,IAAI,OAAOA,aAAa,YAAY,OAAOA,aAAa,UAAU;QAChE,OAAO,CAAC,EAAEA,SAAS,CAAC;IACtB;IAEA,IAAIF,eAA0DE,WAAW;QACvE,IAAIA,SAASC,KAAK,CAACC,MAAM,EAAE;YACzB,OAAO;QACT;QAEA,OAAOH,qBAAqBC,SAASC,KAAK,CAACD,QAAQ;IACrD;IAEA,MAAMG,YAAYN,SAASO,OAAO,CAACJ;IACnC,KAAK,MAAMK,SAASF,UAAW;QAC7B,IAAI,OAAOE,UAAU,YAAY,OAAOA,UAAU,UAAU;YAC1D,OAAO,CAAC,EAAEA,MAAM,CAAC,CAAC,EAAE,CAACC,WAAW;QAClC;QAEA,IACER,eAA0DO,UAC1D,CAACA,MAAMJ,KAAK,CAACC,MAAM,EACnB;YACA,OAAOH,qBAAqBM,MAAMJ,KAAK,CAACD,QAAQ;QAClD;IACF;IAEA,OAAO;AACT;AAaA;;;CAGC,GACD,OAAO,SAASO,2BACdP,QAAmB,EACnBQ,YAA+B;IAE/B,IAAIC;IACJ,IAAIC,eAAe,CAAC;IAEpB,MAAMC,UAAiC,EAAE;IACzC,MAAMC,eAAyB,EAAE;IACjCf,SAASgB,OAAO,CAACb,UAAU,CAACK;QAC1B,IAAI,CAACP,eAAoCO,QAAQ;YAC/C;QACF;QAEA,MAAM,EAAES,KAAK,EAAEC,QAAQ,EAAEf,QAAQ,EAAE,GAAGK,MAAMJ,KAAK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