@react-md/core 1.0.0-next.2 → 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 (1804) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/.turbo/turbo-lint.log +12 -0
  3. package/.turbo/turbo-test.log +179 -0
  4. package/.turbo/turbo-typecheck.log +4 -0
  5. package/CHANGELOG.md +109 -0
  6. package/coverage/clover.xml +529 -3
  7. package/coverage/coverage-final.json +4 -1
  8. package/coverage/lcov-report/Avatar.tsx.html +472 -0
  9. package/coverage/lcov-report/IconRotator.tsx.html +322 -0
  10. package/coverage/lcov-report/ListItem.tsx.html +892 -0
  11. package/coverage/lcov-report/ListItemLink.tsx.html +616 -0
  12. package/coverage/lcov-report/Portal.tsx.html +223 -0
  13. package/coverage/lcov-report/PortalContainerProvider.tsx.html +367 -0
  14. package/coverage/lcov-report/SkeletonPlaceholder.tsx.html +613 -0
  15. package/coverage/lcov-report/Tab.tsx.html +261 -147
  16. package/coverage/lcov-report/TreeGroup.tsx.html +313 -0
  17. package/coverage/lcov-report/app-bar/AppBar.tsx.html +178 -28
  18. package/coverage/lcov-report/app-bar/index.html +7 -7
  19. package/coverage/lcov-report/button/TooltippedButton.tsx.html +445 -0
  20. package/coverage/lcov-report/button/index.html +10 -10
  21. package/coverage/lcov-report/card/Card.tsx.html +349 -0
  22. package/coverage/lcov-report/card/CardContent.tsx.html +223 -0
  23. package/coverage/lcov-report/card/ClickableCard.tsx.html +400 -0
  24. package/coverage/lcov-report/card/index.html +21 -21
  25. package/coverage/lcov-report/card/styles.ts.html +428 -392
  26. package/coverage/lcov-report/cssUtils.ts.html +86 -59
  27. package/coverage/lcov-report/draggable/index.html +21 -36
  28. package/coverage/lcov-report/draggable/useDraggable.ts.html +377 -368
  29. package/coverage/lcov-report/draggable/utils.ts.html +96 -195
  30. package/coverage/lcov-report/expansion-panel/ExpansionList.tsx.html +211 -0
  31. package/coverage/lcov-report/expansion-panel/ExpansionPanel.tsx.html +12 -15
  32. package/coverage/lcov-report/expansion-panel/index.html +34 -19
  33. package/coverage/lcov-report/expansion-panel/useExpansionPanels.ts.html +928 -0
  34. package/coverage/lcov-report/form/MenuItemInputToggle.tsx.html +2 -2
  35. package/coverage/lcov-report/form/Select.tsx.html +1663 -0
  36. package/coverage/lcov-report/form/Slider.tsx.html +163 -40
  37. package/coverage/lcov-report/form/index.html +21 -21
  38. package/coverage/lcov-report/getListItemHeight.ts.html +298 -0
  39. package/coverage/lcov-report/icon/FontIcon.tsx.html +28 -28
  40. package/coverage/lcov-report/icon/index.html +1 -1
  41. package/coverage/lcov-report/index.html +56 -11
  42. package/coverage/lcov-report/interaction/UserInteractionModeProvider.tsx.html +679 -0
  43. package/coverage/lcov-report/interaction/config.ts.html +181 -0
  44. package/coverage/lcov-report/interaction/index.html +33 -18
  45. package/coverage/lcov-report/list/List.tsx.html +490 -0
  46. package/coverage/lcov-report/list/ListItem.tsx.html +886 -0
  47. package/coverage/lcov-report/list/ListItemAddon.tsx.html +286 -0
  48. package/coverage/lcov-report/list/ListItemChildren.tsx.html +445 -0
  49. package/coverage/lcov-report/list/ListItemLink.tsx.html +5 -5
  50. package/coverage/lcov-report/list/index.html +81 -6
  51. package/coverage/lcov-report/list/listItemStyles.ts.html +703 -0
  52. package/coverage/lcov-report/media-queries/appSize.ts.html +1 -1
  53. package/coverage/lcov-report/media-queries/index.html +1 -1
  54. package/coverage/lcov-report/menu/Menu.tsx.html +37 -19
  55. package/coverage/lcov-report/menu/index.html +14 -44
  56. package/coverage/lcov-report/sheet/index.html +8 -8
  57. package/coverage/lcov-report/sheet/styles.ts.html +376 -0
  58. package/coverage/lcov-report/skeletonPlaceholderUtils.ts.html +400 -0
  59. package/coverage/lcov-report/src/CoreProviders.tsx.html +20 -20
  60. package/coverage/lcov-report/src/NoSsr.tsx.html +1 -1
  61. package/coverage/lcov-report/src/SsrProvider.tsx.html +10 -10
  62. package/coverage/lcov-report/src/app-bar/AppBar.tsx.html +143 -23
  63. package/coverage/lcov-report/src/app-bar/AppBarTitle.tsx.html +1 -1
  64. package/coverage/lcov-report/src/app-bar/index.html +5 -5
  65. package/coverage/lcov-report/src/avatar/Avatar.tsx.html +2 -2
  66. package/coverage/lcov-report/src/avatar/index.html +1 -1
  67. package/coverage/lcov-report/src/avatar/styles.ts.html +1 -1
  68. package/coverage/lcov-report/src/badge/Badge.tsx.html +1 -1
  69. package/coverage/lcov-report/src/badge/index.html +1 -1
  70. package/coverage/lcov-report/src/box/Box.tsx.html +1 -1
  71. package/coverage/lcov-report/src/box/index.html +23 -8
  72. package/coverage/lcov-report/src/box/styles.ts.html +46 -46
  73. package/coverage/lcov-report/src/button/AsyncButton.tsx.html +1 -1
  74. package/coverage/lcov-report/src/button/Button.tsx.html +84 -84
  75. package/coverage/lcov-report/src/button/ButtonUnstyled.tsx.html +1 -1
  76. package/coverage/lcov-report/src/button/FloatingActionButton.tsx.html +11 -11
  77. package/coverage/lcov-report/src/button/TooltippedButton.tsx.html +445 -0
  78. package/coverage/lcov-report/src/button/buttonStyles.ts.html +52 -52
  79. package/coverage/lcov-report/src/button/buttonUnstyledStyles.ts.html +1 -1
  80. package/coverage/lcov-report/src/button/index.html +83 -8
  81. package/coverage/lcov-report/src/card/Card.tsx.html +37 -31
  82. package/coverage/lcov-report/src/card/CardContent.tsx.html +4 -4
  83. package/coverage/lcov-report/src/card/CardFooter.tsx.html +1 -1
  84. package/coverage/lcov-report/src/card/CardHeader.tsx.html +1 -1
  85. package/coverage/lcov-report/src/card/CardSubtitle.tsx.html +1 -1
  86. package/coverage/lcov-report/src/card/CardTitle.tsx.html +1 -1
  87. package/coverage/lcov-report/src/card/ClickableCard.tsx.html +400 -0
  88. package/coverage/lcov-report/src/card/index.html +24 -9
  89. package/coverage/lcov-report/src/card/styles.ts.html +58 -31
  90. package/coverage/lcov-report/src/chip/Chip.tsx.html +1 -1
  91. package/coverage/lcov-report/src/chip/index.html +7 -7
  92. package/coverage/lcov-report/src/chip/styles.ts.html +9 -12
  93. package/coverage/lcov-report/src/cssUtils.ts.html +53 -53
  94. package/coverage/lcov-report/src/delegateEvent.ts.html +109 -109
  95. package/coverage/lcov-report/src/dialog/Dialog.tsx.html +1 -1
  96. package/coverage/lcov-report/src/dialog/DialogContainer.tsx.html +1 -1
  97. package/coverage/lcov-report/src/dialog/DialogContent.tsx.html +1 -1
  98. package/coverage/lcov-report/src/dialog/DialogFooter.tsx.html +1 -1
  99. package/coverage/lcov-report/src/dialog/DialogHeader.tsx.html +1 -1
  100. package/coverage/lcov-report/src/dialog/DialogTitle.tsx.html +1 -1
  101. package/coverage/lcov-report/src/dialog/FixedDialog.tsx.html +1 -1
  102. package/coverage/lcov-report/src/dialog/NestedDialogProvider.ts.html +1 -1
  103. package/coverage/lcov-report/src/dialog/index.html +129 -9
  104. package/coverage/lcov-report/src/dialog/styles.ts.html +1 -1
  105. package/coverage/lcov-report/src/divider/Divider.tsx.html +4 -7
  106. package/coverage/lcov-report/src/divider/index.html +5 -5
  107. package/coverage/lcov-report/src/divider/styles.ts.html +1 -1
  108. package/coverage/lcov-report/src/draggable/index.html +27 -27
  109. package/coverage/lcov-report/src/draggable/useDraggable.ts.html +47 -44
  110. package/coverage/lcov-report/src/draggable/utils.ts.html +29 -131
  111. package/coverage/lcov-report/src/expansion-panel/ExpansionList.tsx.html +1 -1
  112. package/coverage/lcov-report/src/expansion-panel/ExpansionPanel.tsx.html +1 -1
  113. package/coverage/lcov-report/src/expansion-panel/ExpansionPanelHeader.tsx.html +1 -1
  114. package/coverage/lcov-report/src/expansion-panel/index.html +8 -8
  115. package/coverage/lcov-report/src/expansion-panel/useExpansionList.ts.html +1 -1
  116. package/coverage/lcov-report/src/expansion-panel/useExpansionPanels.ts.html +36 -24
  117. package/coverage/lcov-report/src/focus/index.html +1 -1
  118. package/coverage/lcov-report/src/focus/useFocusContainer.ts.html +1 -1
  119. package/coverage/lcov-report/src/focus/utils.ts.html +1 -1
  120. package/coverage/lcov-report/src/form/Checkbox.tsx.html +1 -1
  121. package/coverage/lcov-report/src/form/Fieldset.tsx.html +1 -1
  122. package/coverage/lcov-report/src/form/FileInput.tsx.html +1 -1
  123. package/coverage/lcov-report/src/form/Form.tsx.html +1 -1
  124. package/coverage/lcov-report/src/form/FormMessage.tsx.html +1 -1
  125. package/coverage/lcov-report/src/form/FormMessageContainer.tsx.html +5 -5
  126. package/coverage/lcov-report/src/form/FormMessageCounter.tsx.html +1 -1
  127. package/coverage/lcov-report/src/form/InputToggle.tsx.html +110 -110
  128. package/coverage/lcov-report/src/form/InputToggleIcon.tsx.html +63 -63
  129. package/coverage/lcov-report/src/form/Label.tsx.html +98 -98
  130. package/coverage/lcov-report/src/form/Legend.tsx.html +1 -1
  131. package/coverage/lcov-report/src/form/MenuItemCheckbox.tsx.html +1 -1
  132. package/coverage/lcov-report/src/form/MenuItemFileInput.tsx.html +1 -1
  133. package/coverage/lcov-report/src/form/MenuItemInputToggle.tsx.html +2 -2
  134. package/coverage/lcov-report/src/form/MenuItemRadio.tsx.html +1 -1
  135. package/coverage/lcov-report/src/form/MenuItemSwitch.tsx.html +1 -1
  136. package/coverage/lcov-report/src/form/MenuItemTextField.tsx.html +1 -1
  137. package/coverage/lcov-report/src/form/NativeSelect.tsx.html +1 -1
  138. package/coverage/lcov-report/src/form/OptGroup.tsx.html +1 -1
  139. package/coverage/lcov-report/src/form/Option.tsx.html +1 -1
  140. package/coverage/lcov-report/src/form/Password.tsx.html +1 -1
  141. package/coverage/lcov-report/src/form/Radio.tsx.html +3 -3
  142. package/coverage/lcov-report/src/form/Select.tsx.html +29 -5
  143. package/coverage/lcov-report/src/form/SelectValue.tsx.html +1 -1
  144. package/coverage/lcov-report/src/form/Slider.tsx.html +1 -1
  145. package/coverage/lcov-report/src/form/SliderContainer.tsx.html +1 -1
  146. package/coverage/lcov-report/src/form/SliderMark.tsx.html +1 -1
  147. package/coverage/lcov-report/src/form/SliderMarkLabel.tsx.html +1 -1
  148. package/coverage/lcov-report/src/form/SliderThumb.tsx.html +1 -1
  149. package/coverage/lcov-report/src/form/SliderTrack.tsx.html +1 -1
  150. package/coverage/lcov-report/src/form/SliderValueMarks.tsx.html +1 -1
  151. package/coverage/lcov-report/src/form/SliderValueTooltip.tsx.html +1 -1
  152. package/coverage/lcov-report/src/form/Switch.tsx.html +1 -1
  153. package/coverage/lcov-report/src/form/SwitchTrack.tsx.html +1 -1
  154. package/coverage/lcov-report/src/form/TextArea.tsx.html +2 -2
  155. package/coverage/lcov-report/src/form/TextField.tsx.html +1 -1
  156. package/coverage/lcov-report/src/form/TextFieldAddon.tsx.html +1 -1
  157. package/coverage/lcov-report/src/form/TextFieldContainer.tsx.html +1 -1
  158. package/coverage/lcov-report/src/form/TextFieldContainerStyles.ts.html +8 -8
  159. package/coverage/lcov-report/src/form/fileUtils.ts.html +1 -1
  160. package/coverage/lcov-report/src/form/formConfig.ts.html +1 -1
  161. package/coverage/lcov-report/src/form/formMessageStyles.ts.html +1 -1
  162. package/coverage/lcov-report/src/form/index.html +940 -10
  163. package/coverage/lcov-report/src/form/inputToggleStyles.ts.html +30 -30
  164. package/coverage/lcov-report/src/form/nativeSelectStyles.ts.html +1 -1
  165. package/coverage/lcov-report/src/form/optionStyles.ts.html +1 -1
  166. package/coverage/lcov-report/src/form/passwordStyles.ts.html +1 -1
  167. package/coverage/lcov-report/src/form/selectStyles.ts.html +1 -1
  168. package/coverage/lcov-report/src/form/selectUtils.ts.html +1 -1
  169. package/coverage/lcov-report/src/form/sliderUtils.ts.html +1 -1
  170. package/coverage/lcov-report/src/form/switchStyles.ts.html +1 -1
  171. package/coverage/lcov-report/src/form/textAreaStyles.ts.html +3 -3
  172. package/coverage/lcov-report/src/form/textFieldStyles.ts.html +1 -1
  173. package/coverage/lcov-report/src/form/useCheckboxGroup.ts.html +1 -1
  174. package/coverage/lcov-report/src/form/useFileUpload.ts.html +1 -1
  175. package/coverage/lcov-report/src/form/useListboxProvider.ts.html +1 -1
  176. package/coverage/lcov-report/src/form/useNumberField.ts.html +1 -1
  177. package/coverage/lcov-report/src/form/useRadioGroup.ts.html +47 -47
  178. package/coverage/lcov-report/src/form/useRangeSlider.ts.html +1 -1
  179. package/coverage/lcov-report/src/form/useResizingTextArea.ts.html +1 -1
  180. package/coverage/lcov-report/src/form/useSlider.ts.html +1 -1
  181. package/coverage/lcov-report/src/form/useTextField.ts.html +1 -1
  182. package/coverage/lcov-report/src/form/utils.ts.html +1 -1
  183. package/coverage/lcov-report/src/form/validation.ts.html +1 -1
  184. package/coverage/lcov-report/src/hoverMode/index.html +1 -1
  185. package/coverage/lcov-report/src/hoverMode/useHoverMode.ts.html +98 -98
  186. package/coverage/lcov-report/src/hoverMode/useHoverModeProvider.ts.html +19 -19
  187. package/coverage/lcov-report/src/icon/FontIcon.tsx.html +28 -28
  188. package/coverage/lcov-report/src/icon/IconRotator.tsx.html +5 -8
  189. package/coverage/lcov-report/src/icon/MaterialIcon.tsx.html +1 -1
  190. package/coverage/lcov-report/src/icon/MaterialSymbol.tsx.html +1 -1
  191. package/coverage/lcov-report/src/icon/SVGIcon.tsx.html +1 -1
  192. package/coverage/lcov-report/src/icon/TextIconSpacing.tsx.html +1 -1
  193. package/coverage/lcov-report/src/icon/iconConfig.tsx.html +8 -8
  194. package/coverage/lcov-report/src/icon/index.html +7 -7
  195. package/coverage/lcov-report/src/icon/material.ts.html +1 -1
  196. package/coverage/lcov-report/src/icon/materialConfig.ts.html +1 -1
  197. package/coverage/lcov-report/src/icon/styles.ts.html +38 -38
  198. package/coverage/lcov-report/src/index.html +354 -9
  199. package/coverage/lcov-report/src/interaction/Ripple.tsx.html +1 -1
  200. package/coverage/lcov-report/src/interaction/RippleContainer.tsx.html +1 -1
  201. package/coverage/lcov-report/src/interaction/UserInteractionModeProvider.tsx.html +87 -87
  202. package/coverage/lcov-report/src/interaction/config.ts.html +7 -7
  203. package/coverage/lcov-report/src/interaction/index.html +1 -1
  204. package/coverage/lcov-report/src/interaction/useElementInteraction.tsx.html +123 -123
  205. package/coverage/lcov-report/src/interaction/useHigherContrastChildren.tsx.html +17 -17
  206. package/coverage/lcov-report/src/interaction/utils.ts.html +1 -1
  207. package/coverage/lcov-report/src/layout/LayoutAppBar.tsx.html +1 -1
  208. package/coverage/lcov-report/src/layout/LayoutNav.tsx.html +60 -60
  209. package/coverage/lcov-report/src/layout/LayoutWindowSplitter.tsx.html +1 -1
  210. package/coverage/lcov-report/src/layout/Main.tsx.html +1 -1
  211. package/coverage/lcov-report/src/layout/index.html +15 -15
  212. package/coverage/lcov-report/src/layout/layoutNavStyles.ts.html +5 -5
  213. package/coverage/lcov-report/src/layout/layoutWindowSplitterStyles.ts.html +1 -1
  214. package/coverage/lcov-report/src/layout/mainStyles.ts.html +1 -1
  215. package/coverage/lcov-report/src/layout/useExpandableLayout.ts.html +1 -1
  216. package/coverage/lcov-report/src/layout/useHorizontalLayoutTransition.ts.html +1 -1
  217. package/coverage/lcov-report/src/layout/useLayoutAppBarHeight.ts.html +20 -32
  218. package/coverage/lcov-report/src/layout/useLayoutTree.ts.html +1 -1
  219. package/coverage/lcov-report/src/layout/useLayoutWindowSplitter.ts.html +1 -1
  220. package/coverage/lcov-report/src/layout/useMainTabIndex.ts.html +1 -1
  221. package/coverage/lcov-report/src/layout/useResizableLayout.ts.html +1 -1
  222. package/coverage/lcov-report/src/layout/useTemporaryLayout.ts.html +1 -1
  223. package/coverage/lcov-report/src/link/Link.tsx.html +1 -1
  224. package/coverage/lcov-report/src/link/SkipToMainContent.tsx.html +1 -1
  225. package/coverage/lcov-report/src/link/index.html +1 -1
  226. package/coverage/lcov-report/src/link/styles.ts.html +1 -1
  227. package/coverage/lcov-report/src/list/List.tsx.html +30 -30
  228. package/coverage/lcov-report/src/list/ListItem.tsx.html +37 -16
  229. package/coverage/lcov-report/src/list/ListItemAddon.tsx.html +13 -7
  230. package/coverage/lcov-report/src/list/ListItemChildren.tsx.html +12 -6
  231. package/coverage/lcov-report/src/list/ListItemLink.tsx.html +4 -4
  232. package/coverage/lcov-report/src/list/ListItemText.tsx.html +1 -1
  233. package/coverage/lcov-report/src/list/ListSubheader.tsx.html +1 -1
  234. package/coverage/lcov-report/src/list/getListItemHeight.ts.html +1 -1
  235. package/coverage/lcov-report/src/list/index.html +11 -11
  236. package/coverage/lcov-report/src/list/listItemStyles.ts.html +39 -9
  237. package/coverage/lcov-report/src/media-queries/AppSizeProvider.tsx.html +54 -54
  238. package/coverage/lcov-report/src/media-queries/appSize.ts.html +1 -1
  239. package/coverage/lcov-report/src/media-queries/index.html +1 -1
  240. package/coverage/lcov-report/src/media-queries/useMediaQuery.ts.html +25 -25
  241. package/coverage/lcov-report/src/menu/DropdownMenu.tsx.html +1 -1
  242. package/coverage/lcov-report/src/menu/Menu.tsx.html +2 -2
  243. package/coverage/lcov-report/src/menu/MenuBar.tsx.html +1 -1
  244. package/coverage/lcov-report/src/menu/MenuButton.tsx.html +1 -1
  245. package/coverage/lcov-report/src/menu/MenuConfigurationProvider.tsx.html +1 -1
  246. package/coverage/lcov-report/src/menu/MenuItem.tsx.html +1 -1
  247. package/coverage/lcov-report/src/menu/MenuItemButton.tsx.html +1 -1
  248. package/coverage/lcov-report/src/menu/MenuItemGroup.tsx.html +1 -1
  249. package/coverage/lcov-report/src/menu/MenuItemSeparator.tsx.html +1 -1
  250. package/coverage/lcov-report/src/menu/MenuSheet.tsx.html +1 -1
  251. package/coverage/lcov-report/src/menu/MenuVisibilityProvider.tsx.html +1 -1
  252. package/coverage/lcov-report/src/menu/MenuWidget.tsx.html +1 -1
  253. package/coverage/lcov-report/src/menu/MenuWidgetKeyboardProvider.tsx.html +1 -1
  254. package/coverage/lcov-report/src/menu/index.html +1 -1
  255. package/coverage/lcov-report/src/menu/useContextMenu.ts.html +1 -1
  256. package/coverage/lcov-report/src/menu/useMenuBarProvider.ts.html +1 -1
  257. package/coverage/lcov-report/src/menu/utils.ts.html +1 -1
  258. package/coverage/lcov-report/src/movement/constants.ts.html +1 -1
  259. package/coverage/lcov-report/src/movement/findMatchIndex.ts.html +1 -1
  260. package/coverage/lcov-report/src/movement/index.html +1 -1
  261. package/coverage/lcov-report/src/movement/useKeyboardMovementProvider.ts.html +3 -3
  262. package/coverage/lcov-report/src/movement/utils.ts.html +1 -1
  263. package/coverage/lcov-report/src/overlay/Overlay.tsx.html +1 -1
  264. package/coverage/lcov-report/src/overlay/index.html +1 -1
  265. package/coverage/lcov-report/src/overlay/overlayStyles.ts.html +1 -1
  266. package/coverage/lcov-report/src/portal/Portal.tsx.html +7 -7
  267. package/coverage/lcov-report/src/portal/PortalContainerProvider.tsx.html +59 -35
  268. package/coverage/lcov-report/src/portal/index.html +7 -7
  269. package/coverage/lcov-report/src/positioning/constants.ts.html +1 -1
  270. package/coverage/lcov-report/src/positioning/createHorizontalPosition.ts.html +47 -47
  271. package/coverage/lcov-report/src/positioning/createVerticalPosition.ts.html +55 -55
  272. package/coverage/lcov-report/src/positioning/getFixedPosition.ts.html +89 -89
  273. package/coverage/lcov-report/src/positioning/index.html +1 -1
  274. package/coverage/lcov-report/src/positioning/useFixedPositioning.ts.html +193 -193
  275. package/coverage/lcov-report/src/positioning/utils.ts.html +59 -59
  276. package/coverage/lcov-report/src/progress/CircularProgress.tsx.html +3 -3
  277. package/coverage/lcov-report/src/progress/LinearProgress.tsx.html +3 -3
  278. package/coverage/lcov-report/src/progress/getProgressA11y.ts.html +1 -1
  279. package/coverage/lcov-report/src/progress/index.html +20 -5
  280. package/coverage/lcov-report/src/responsive-item/ResponsiveItemContainer.tsx.html +1 -1
  281. package/coverage/lcov-report/src/responsive-item/ResponsiveItemOverlay.tsx.html +1 -1
  282. package/coverage/lcov-report/src/responsive-item/index.html +1 -1
  283. package/coverage/lcov-report/src/responsive-item/styles.ts.html +1 -1
  284. package/coverage/lcov-report/src/scroll/ScrollLock.tsx.html +1 -1
  285. package/coverage/lcov-report/src/scroll/getScrollbarWidth.ts.html +1 -1
  286. package/coverage/lcov-report/src/scroll/index.html +1 -1
  287. package/coverage/lcov-report/src/scroll/useScrollLock.ts.html +1 -1
  288. package/coverage/lcov-report/src/segmented-button/SegmentedButton.tsx.html +1 -1
  289. package/coverage/lcov-report/src/segmented-button/SegmentedButtonContainer.tsx.html +1 -1
  290. package/coverage/lcov-report/src/segmented-button/index.html +1 -1
  291. package/coverage/lcov-report/src/segmented-button/segmentedButtonContainerStyles.ts.html +1 -1
  292. package/coverage/lcov-report/src/segmented-button/segmentedButtonStyles.ts.html +1 -1
  293. package/coverage/lcov-report/src/sheet/Sheet.tsx.html +1 -1
  294. package/coverage/lcov-report/src/sheet/index.html +5 -5
  295. package/coverage/lcov-report/src/sheet/styles.ts.html +45 -48
  296. package/coverage/lcov-report/src/snackbar/DefaultToastRenderer.tsx.html +80 -80
  297. package/coverage/lcov-report/src/snackbar/Snackbar.tsx.html +21 -45
  298. package/coverage/lcov-report/src/snackbar/Toast.tsx.html +108 -93
  299. package/coverage/lcov-report/src/snackbar/ToastActionButton.tsx.html +1 -1
  300. package/coverage/lcov-report/src/snackbar/ToastCloseButton.tsx.html +1 -1
  301. package/coverage/lcov-report/src/snackbar/ToastContent.tsx.html +48 -48
  302. package/coverage/lcov-report/src/snackbar/ToastManager.tsx.html +278 -275
  303. package/coverage/lcov-report/src/snackbar/ToastManagerProvider.tsx.html +6 -6
  304. package/coverage/lcov-report/src/snackbar/index.html +19 -19
  305. package/coverage/lcov-report/src/snackbar/snackbarStyles.ts.html +15 -15
  306. package/coverage/lcov-report/src/snackbar/toastContentStyles.ts.html +14 -14
  307. package/coverage/lcov-report/src/snackbar/toastStyles.ts.html +27 -27
  308. package/coverage/lcov-report/src/snackbar/useCurrentToastActions.ts.html +1 -1
  309. package/coverage/lcov-report/src/suspense/CircularProgressSuspense.tsx.html +1 -1
  310. package/coverage/lcov-report/src/suspense/NullSuspense.tsx.html +1 -1
  311. package/coverage/lcov-report/src/suspense/index.html +20 -5
  312. package/coverage/lcov-report/src/table/Table.tsx.html +45 -114
  313. package/coverage/lcov-report/src/table/TableBody.tsx.html +43 -43
  314. package/coverage/lcov-report/src/table/TableCell.tsx.html +109 -298
  315. package/coverage/lcov-report/src/table/TableCellContent.tsx.html +81 -27
  316. package/coverage/lcov-report/src/table/TableCheckbox.tsx.html +16 -10
  317. package/coverage/lcov-report/src/table/TableConfigurationProvider.tsx.html +20 -20
  318. package/coverage/lcov-report/src/table/TableContainer.tsx.html +7 -28
  319. package/coverage/lcov-report/src/table/TableContainerProvider.tsx.html +1 -1
  320. package/coverage/lcov-report/src/table/TableFooter.tsx.html +64 -43
  321. package/coverage/lcov-report/src/table/TableHeader.tsx.html +41 -92
  322. package/coverage/lcov-report/src/table/TableRadio.tsx.html +676 -0
  323. package/coverage/lcov-report/src/table/TableRow.tsx.html +38 -119
  324. package/coverage/lcov-report/src/table/index.html +151 -46
  325. package/coverage/lcov-report/src/table/tableCellStyles.ts.html +334 -0
  326. package/coverage/lcov-report/src/table/tableContainerStyles.ts.html +142 -0
  327. package/coverage/lcov-report/src/table/tableFooterStyles.ts.html +166 -0
  328. package/coverage/lcov-report/src/table/tableHeaderStyles.ts.html +172 -0
  329. package/coverage/lcov-report/src/table/tableRowStyles.ts.html +169 -0
  330. package/coverage/lcov-report/src/table/tableStyles.ts.html +157 -0
  331. package/coverage/lcov-report/src/tabs/Tab.tsx.html +263 -143
  332. package/coverage/lcov-report/src/tabs/TabList.tsx.html +1 -1
  333. package/coverage/lcov-report/src/tabs/TabListScrollButton.tsx.html +1 -1
  334. package/coverage/lcov-report/src/tabs/index.html +25 -25
  335. package/coverage/lcov-report/src/tabs/tabIndicatorStyles.ts.html +37 -7
  336. package/coverage/lcov-report/src/tabs/tabListScrollButtonStyles.ts.html +1 -1
  337. package/coverage/lcov-report/src/tabs/tabListStyles.ts.html +2 -2
  338. package/coverage/lcov-report/src/tabs/tabStyles.ts.html +64 -28
  339. package/coverage/lcov-report/src/tabs/useTabList.ts.html +44 -38
  340. package/coverage/lcov-report/src/tabs/useTabs.ts.html +1 -1
  341. package/coverage/lcov-report/src/tabs/utils.ts.html +3 -3
  342. package/coverage/lcov-report/src/test-utils/IntersectionObserver.ts.html +1 -1
  343. package/coverage/lcov-report/src/test-utils/ResizeObserver.ts.html +205 -205
  344. package/coverage/lcov-report/src/test-utils/data-testid.ts.html +1 -1
  345. package/coverage/lcov-report/src/test-utils/drag.ts.html +1 -1
  346. package/coverage/lcov-report/src/test-utils/index.html +4 -4
  347. package/coverage/lcov-report/src/test-utils/jest-setup.ts.html +9 -9
  348. package/coverage/lcov-report/src/test-utils/matchMedia.ts.html +4 -4
  349. package/coverage/lcov-report/src/test-utils/polyfills/IntersectionObserver.ts.html +4 -4
  350. package/coverage/lcov-report/src/test-utils/polyfills/ResizeObserver.ts.html +3 -3
  351. package/coverage/lcov-report/src/test-utils/polyfills/index.html +1 -1
  352. package/coverage/lcov-report/src/test-utils/polyfills/matchMedia.ts.html +6 -6
  353. package/coverage/lcov-report/src/test-utils/polyfills/offsetParent.ts.html +14 -14
  354. package/coverage/lcov-report/src/test-utils/polyfills/scrollIntoView.ts.html +5 -5
  355. package/coverage/lcov-report/src/test-utils/render.tsx.html +21 -21
  356. package/coverage/lcov-report/src/test-utils/timers.ts.html +1 -1
  357. package/coverage/lcov-report/src/theme/LocalStorageColorSchemeProvider.tsx.html +1 -1
  358. package/coverage/lcov-report/src/theme/ThemeProvider.tsx.html +1 -1
  359. package/coverage/lcov-report/src/theme/colors.ts.html +1 -1
  360. package/coverage/lcov-report/src/theme/cssVars.ts.html +1 -1
  361. package/coverage/lcov-report/src/theme/index.html +1 -1
  362. package/coverage/lcov-report/src/theme/useCSSVariables.ts.html +25 -25
  363. package/coverage/lcov-report/src/theme/useColorScheme.ts.html +1 -1
  364. package/coverage/lcov-report/src/theme/useColorSchemeMetaTag.ts.html +1 -1
  365. package/coverage/lcov-report/src/theme/useColorSchemeProvider.ts.html +1 -1
  366. package/coverage/lcov-report/src/theme/usePrefersColorScheme.ts.html +1 -1
  367. package/coverage/lcov-report/src/theme/utils.ts.html +1 -1
  368. package/coverage/lcov-report/src/tooltip/Tooltip.tsx.html +62 -62
  369. package/coverage/lcov-report/src/tooltip/TooltipHoverModeProvider.tsx.html +3 -3
  370. package/coverage/lcov-report/src/tooltip/constants.ts.html +1 -1
  371. package/coverage/lcov-report/src/tooltip/index.html +9 -9
  372. package/coverage/lcov-report/src/tooltip/tooltipStyles.ts.html +12 -12
  373. package/coverage/lcov-report/src/tooltip/useTooltip.ts.html +243 -222
  374. package/coverage/lcov-report/src/tooltip/useTooltipPosition.ts.html +27 -27
  375. package/coverage/lcov-report/src/tooltip/utils.ts.html +22 -22
  376. package/coverage/lcov-report/src/transition/CSSTransition.tsx.html +1 -1
  377. package/coverage/lcov-report/src/transition/Collapse.tsx.html +1 -1
  378. package/coverage/lcov-report/src/transition/CrossFade.tsx.html +1 -1
  379. package/coverage/lcov-report/src/transition/ScaleTransition.tsx.html +1 -1
  380. package/coverage/lcov-report/src/transition/SkeletonPlaceholder.tsx.html +374 -338
  381. package/coverage/lcov-report/src/transition/Slide.tsx.html +1 -1
  382. package/coverage/lcov-report/src/transition/SlideContainer.tsx.html +1 -1
  383. package/coverage/lcov-report/src/transition/collapseStyles.ts.html +13 -13
  384. package/coverage/lcov-report/src/transition/config.ts.html +5 -5
  385. package/coverage/lcov-report/src/transition/index.html +47 -32
  386. package/coverage/lcov-report/src/transition/maxWidthTransition.ts.html +1 -1
  387. package/coverage/lcov-report/src/transition/skeletonPlaceholderUtils.ts.html +400 -0
  388. package/coverage/lcov-report/src/transition/useCSSTransition.ts.html +68 -68
  389. package/coverage/lcov-report/src/transition/useCarousel.ts.html +1 -1
  390. package/coverage/lcov-report/src/transition/useCollapseTransition.ts.html +87 -87
  391. package/coverage/lcov-report/src/transition/useCrossFadeTransition.ts.html +1 -1
  392. package/coverage/lcov-report/src/transition/useMaxWidthTransition.ts.html +1 -1
  393. package/coverage/lcov-report/src/transition/useScaleTransition.ts.html +18 -18
  394. package/coverage/lcov-report/src/transition/useSkeletonPlaceholder.ts.html +607 -562
  395. package/coverage/lcov-report/src/transition/useSlideTransition.ts.html +1 -1
  396. package/coverage/lcov-report/src/transition/useTransition.ts.html +237 -237
  397. package/coverage/lcov-report/src/transition/utils.ts.html +43 -43
  398. package/coverage/lcov-report/src/tree/DefaultTreeItemRenderer.tsx.html +18 -6
  399. package/coverage/lcov-report/src/tree/Tree.tsx.html +20 -8
  400. package/coverage/lcov-report/src/tree/TreeGroup.tsx.html +45 -45
  401. package/coverage/lcov-report/src/tree/TreeItem.tsx.html +7 -10
  402. package/coverage/lcov-report/src/tree/TreeItemExpander.tsx.html +1 -1
  403. package/coverage/lcov-report/src/tree/TreeProvider.tsx.html +8 -8
  404. package/coverage/lcov-report/src/tree/index.html +11 -11
  405. package/coverage/lcov-report/src/tree/styles.ts.html +8 -35
  406. package/coverage/lcov-report/src/tree/useTree.ts.html +1 -1
  407. package/coverage/lcov-report/src/tree/useTreeExpansion.ts.html +1 -1
  408. package/coverage/lcov-report/src/tree/useTreeItems.ts.html +1 -1
  409. package/coverage/lcov-report/src/tree/useTreeMovement.ts.html +1 -1
  410. package/coverage/lcov-report/src/tree/useTreeSelection.ts.html +1 -1
  411. package/coverage/lcov-report/src/tree/utils.ts.html +1 -1
  412. package/coverage/lcov-report/src/typography/SrOnly.tsx.html +1 -1
  413. package/coverage/lcov-report/src/typography/TextContainer.tsx.html +1 -1
  414. package/coverage/lcov-report/src/typography/Typography.tsx.html +1 -1
  415. package/coverage/lcov-report/src/typography/WritingDirectionProvider.tsx.html +1 -1
  416. package/coverage/lcov-report/src/typography/index.html +1 -1
  417. package/coverage/lcov-report/src/useAsyncAction.ts.html +1 -1
  418. package/coverage/lcov-report/src/useDebouncedFunction.ts.html +1 -1
  419. package/coverage/lcov-report/src/useDropzone.ts.html +1 -1
  420. package/coverage/lcov-report/src/useElementSize.ts.html +334 -0
  421. package/coverage/lcov-report/src/useEnsuredId.ts.html +8 -8
  422. package/coverage/lcov-report/src/useEnsuredRef.ts.html +14 -14
  423. package/coverage/lcov-report/src/useEnsuredState.ts.html +1 -1
  424. package/coverage/lcov-report/src/useHtmlClassName.ts.html +1 -1
  425. package/coverage/lcov-report/src/useIntersectionObserver.ts.html +1 -1
  426. package/coverage/lcov-report/src/useIsomorphicLayoutEffect.ts.html +1 -1
  427. package/coverage/lcov-report/src/useLocalStorage.ts.html +1 -1
  428. package/coverage/lcov-report/src/useOrientation.ts.html +32 -32
  429. package/coverage/lcov-report/src/usePageInactive.ts.html +30 -30
  430. package/coverage/lcov-report/src/useResizeListener.ts.html +38 -32
  431. package/coverage/lcov-report/src/useResizeObserver.ts.html +68 -179
  432. package/coverage/lcov-report/src/useThrottledFunction.ts.html +1 -1
  433. package/coverage/lcov-report/src/useToggle.ts.html +1 -1
  434. package/coverage/lcov-report/src/useUnmounted.ts.html +1 -1
  435. package/coverage/lcov-report/src/useWindowSize.ts.html +124 -94
  436. package/coverage/lcov-report/src/utils/RenderRecursively.tsx.html +1 -1
  437. package/coverage/lcov-report/src/utils/alphaNumericSort.ts.html +1 -1
  438. package/coverage/lcov-report/src/utils/applyRef.ts.html +11 -11
  439. package/coverage/lcov-report/src/utils/bem.ts.html +45 -45
  440. package/coverage/lcov-report/src/utils/filters.ts.html +1 -1
  441. package/coverage/lcov-report/src/utils/getClientPosition.ts.html +1 -1
  442. package/coverage/lcov-report/src/utils/getMiddleOfRange.ts.html +163 -0
  443. package/coverage/lcov-report/src/utils/getPercentage.ts.html +9 -9
  444. package/coverage/lcov-report/src/utils/getRangeDefaultValue.ts.html +66 -87
  445. package/coverage/lcov-report/src/utils/getRangeSteps.ts.html +7 -7
  446. package/coverage/lcov-report/src/utils/identity.ts.html +1 -1
  447. package/coverage/lcov-report/src/utils/index.html +46 -31
  448. package/coverage/lcov-report/src/utils/isElementVisible.ts.html +1 -1
  449. package/coverage/lcov-report/src/utils/isValidNumber.ts.html +118 -0
  450. package/coverage/lcov-report/src/utils/loop.ts.html +1 -1
  451. package/coverage/lcov-report/src/utils/nearest.ts.html +21 -21
  452. package/coverage/lcov-report/src/utils/parseCssLengthUnit.ts.html +18 -18
  453. package/coverage/lcov-report/src/utils/randomInt.ts.html +52 -52
  454. package/coverage/lcov-report/src/utils/wait.ts.html +1 -1
  455. package/coverage/lcov-report/src/utils/withinRange.ts.html +1 -1
  456. package/coverage/lcov-report/src/window-splitter/WindowSplitter.tsx.html +1 -1
  457. package/coverage/lcov-report/src/window-splitter/index.html +14 -14
  458. package/coverage/lcov-report/src/window-splitter/useWindowSplitter.ts.html +19 -67
  459. package/coverage/lcov-report/src/window-splitter/useWindowSplitterMaxValue.ts.html +256 -0
  460. package/coverage/lcov-report/suspense/CircularProgressSuspense.tsx.html +283 -0
  461. package/coverage/lcov-report/suspense/NullSuspense.tsx.html +202 -0
  462. package/coverage/lcov-report/suspense/index.html +131 -0
  463. package/coverage/lcov-report/tabIndicatorStyles.ts.html +43 -13
  464. package/coverage/lcov-report/tabListStyles.ts.html +35 -26
  465. package/coverage/lcov-report/tabStyles.ts.html +68 -26
  466. package/coverage/lcov-report/tabs/Tab.tsx.html +233 -143
  467. package/coverage/lcov-report/tabs/TabList.tsx.html +85 -85
  468. package/coverage/lcov-report/tabs/index.html +56 -11
  469. package/coverage/lcov-report/tabs/tabIndicatorStyles.ts.html +187 -0
  470. package/coverage/lcov-report/tabs/tabListStyles.ts.html +241 -0
  471. package/coverage/lcov-report/tabs/tabStyles.ts.html +253 -0
  472. package/coverage/lcov-report/tabs/useTabList.ts.html +736 -0
  473. package/coverage/lcov-report/tabs/useTabs.ts.html +1 -1
  474. package/coverage/lcov-report/tabs/utils.ts.html +1 -1
  475. package/coverage/lcov-report/test-utils/index.html +21 -21
  476. package/coverage/lcov-report/test-utils/use.ts.html +187 -0
  477. package/coverage/lcov-report/tooltip/Tooltip.tsx.html +62 -62
  478. package/coverage/lcov-report/tooltip/index.html +10 -70
  479. package/coverage/lcov-report/tooltip/useTooltip.ts.html +243 -222
  480. package/coverage/lcov-report/transition/SkeletonPlaceholder.tsx.html +595 -0
  481. package/coverage/lcov-report/transition/config.ts.html +5 -5
  482. package/coverage/lcov-report/transition/index.html +1 -1
  483. package/coverage/lcov-report/transition/skeletonPlaceholderUtils.ts.html +400 -0
  484. package/coverage/lcov-report/transition/useSkeletonPlaceholder.ts.html +952 -0
  485. package/coverage/lcov-report/tree/TreeItem.tsx.html +7 -10
  486. package/coverage/lcov-report/tree/index.html +12 -27
  487. package/coverage/lcov-report/tree/styles.ts.html +538 -0
  488. package/coverage/lcov-report/typography/Typography.tsx.html +110 -110
  489. package/coverage/lcov-report/typography/WritingDirectionProvider.tsx.html +75 -75
  490. package/coverage/lcov-report/typography/index.html +15 -15
  491. package/coverage/lcov-report/useSkeletonPlaceholder.ts.html +952 -0
  492. package/coverage/lcov-report/useTabList.ts.html +142 -136
  493. package/coverage/lcov-report/useWindowSplitter.ts.html +640 -0
  494. package/coverage/lcov-report/useWindowSplitterMaxValue.ts.html +256 -0
  495. package/coverage/lcov-report/utils/index.html +16 -31
  496. package/coverage/lcov-report/utils/isElementVisible.ts.html +14 -14
  497. package/coverage/lcov-report/utils/randomInt.ts.html +148 -0
  498. package/coverage/lcov-report/utils/wait.ts.html +1 -1
  499. package/coverage/lcov-report/window-splitter/index.html +21 -36
  500. package/coverage/lcov-report/window-splitter/useWindowSplitter.ts.html +406 -328
  501. package/coverage/lcov.info +580 -0
  502. package/dist/_box-shadows.scss +12 -2
  503. package/dist/_core.scss +1 -3
  504. package/dist/_utils.scss +22 -0
  505. package/dist/app-bar/AppBar.d.ts +4 -9
  506. package/dist/app-bar/_app-bar.scss +7 -9
  507. package/dist/avatar/Avatar.d.ts +1 -1
  508. package/dist/badge/_badge.scss +12 -7
  509. package/dist/button/TooltippedButton.d.ts +62 -0
  510. package/dist/card/ClickableCard.d.ts +42 -0
  511. package/dist/card/_card.scss +15 -9
  512. package/dist/card/styles.d.ts +8 -0
  513. package/dist/dialog/_dialog.scss +28 -15
  514. package/dist/divider/_divider.scss +9 -10
  515. package/dist/draggable/useDraggable.d.ts +12 -23
  516. package/dist/draggable/utils.d.ts +4 -17
  517. package/dist/expansion-panel/_expansion-panel.scss +25 -16
  518. package/dist/expansion-panel/useExpansionPanels.d.ts +5 -3
  519. package/dist/form/MenuItemInputToggle.d.ts +1 -1
  520. package/dist/form/_form.scss +41 -23
  521. package/dist/icon/_icon.scss +7 -2
  522. package/dist/index.d.ts +5 -0
  523. package/dist/interaction/_interaction.scss +12 -9
  524. package/dist/link/_link.scss +26 -12
  525. package/dist/list/ListItem.d.ts +8 -3
  526. package/dist/list/_list.scss +29 -18
  527. package/dist/list/getListItemHeight.d.ts +0 -1
  528. package/dist/list/listItemStyles.d.ts +9 -1
  529. package/dist/list/types.d.ts +15 -5
  530. package/dist/menu/Menu.d.ts +1 -1
  531. package/dist/menu/_menu.scss +3 -16
  532. package/dist/portal/PortalContainerProvider.d.ts +2 -2
  533. package/dist/sheet/styles.d.ts +14 -15
  534. package/dist/src/CoreProviders.js.map +1 -0
  535. package/dist/src/NoSsr.js.map +1 -0
  536. package/dist/src/SsrProvider.js.map +1 -0
  537. package/dist/src/app-bar/AppBar.js +96 -0
  538. package/dist/src/app-bar/AppBar.js.map +1 -0
  539. package/dist/src/app-bar/AppBarTitle.js.map +1 -0
  540. package/dist/src/avatar/Avatar.js.map +1 -0
  541. package/dist/src/avatar/styles.js.map +1 -0
  542. package/dist/src/badge/Badge.js.map +1 -0
  543. package/dist/src/box/Box.js.map +1 -0
  544. package/dist/src/box/styles.js.map +1 -0
  545. package/dist/src/button/AsyncButton.js.map +1 -0
  546. package/dist/src/button/Button.js.map +1 -0
  547. package/dist/src/button/ButtonUnstyled.js.map +1 -0
  548. package/dist/src/button/FloatingActionButton.js.map +1 -0
  549. package/dist/src/button/TooltippedButton.js +62 -0
  550. package/dist/src/button/TooltippedButton.js.map +1 -0
  551. package/dist/src/button/buttonStyles.js.map +1 -0
  552. package/dist/src/button/buttonUnstyledStyles.js.map +1 -0
  553. package/dist/src/card/Card.js +60 -0
  554. package/dist/src/card/Card.js.map +1 -0
  555. package/dist/src/card/CardContent.js +25 -0
  556. package/dist/src/card/CardContent.js.map +1 -0
  557. package/dist/src/card/CardFooter.js.map +1 -0
  558. package/dist/src/card/CardHeader.js.map +1 -0
  559. package/dist/src/card/CardSubtitle.js.map +1 -0
  560. package/dist/src/card/CardTitle.js.map +1 -0
  561. package/dist/src/card/ClickableCard.js +73 -0
  562. package/dist/src/card/ClickableCard.js.map +1 -0
  563. package/dist/src/card/styles.js +65 -0
  564. package/dist/src/card/styles.js.map +1 -0
  565. package/dist/src/chip/Chip.js.map +1 -0
  566. package/dist/src/chip/styles.js.map +1 -0
  567. package/dist/src/cssUtils.js.map +1 -0
  568. package/dist/src/delegateEvent.js.map +1 -0
  569. package/dist/src/dialog/Dialog.js.map +1 -0
  570. package/dist/src/dialog/DialogContainer.js.map +1 -0
  571. package/dist/src/dialog/DialogContent.js.map +1 -0
  572. package/dist/src/dialog/DialogFooter.js.map +1 -0
  573. package/dist/src/dialog/DialogHeader.js.map +1 -0
  574. package/dist/src/dialog/DialogTitle.js.map +1 -0
  575. package/dist/src/dialog/FixedDialog.js.map +1 -0
  576. package/dist/src/dialog/NestedDialogProvider.js.map +1 -0
  577. package/dist/src/dialog/styles.js.map +1 -0
  578. package/dist/src/divider/Divider.js.map +1 -0
  579. package/dist/src/divider/styles.js.map +1 -0
  580. package/dist/src/draggable/useDraggable.js +434 -0
  581. package/dist/src/draggable/useDraggable.js.map +1 -0
  582. package/dist/src/draggable/utils.js +130 -0
  583. package/dist/src/draggable/utils.js.map +1 -0
  584. package/dist/src/expansion-panel/ExpansionList.js.map +1 -0
  585. package/dist/src/expansion-panel/ExpansionPanel.js.map +1 -0
  586. package/dist/src/expansion-panel/ExpansionPanelHeader.js.map +1 -0
  587. package/dist/src/expansion-panel/useExpansionList.js.map +1 -0
  588. package/dist/src/expansion-panel/useExpansionPanels.js +142 -0
  589. package/dist/src/expansion-panel/useExpansionPanels.js.map +1 -0
  590. package/dist/src/focus/useFocusContainer.js.map +1 -0
  591. package/dist/src/focus/utils.js.map +1 -0
  592. package/dist/src/form/Checkbox.js.map +1 -0
  593. package/dist/src/form/Fieldset.js.map +1 -0
  594. package/dist/src/form/FileInput.js.map +1 -0
  595. package/dist/src/form/Form.js.map +1 -0
  596. package/dist/src/form/FormMessage.js.map +1 -0
  597. package/dist/src/form/FormMessageContainer.js.map +1 -0
  598. package/dist/src/form/FormMessageCounter.js.map +1 -0
  599. package/dist/src/form/InputToggle.js.map +1 -0
  600. package/dist/src/form/InputToggleIcon.js.map +1 -0
  601. package/dist/src/form/Label.js.map +1 -0
  602. package/dist/src/form/Legend.js.map +1 -0
  603. package/dist/src/form/MenuItemCheckbox.js.map +1 -0
  604. package/dist/src/form/MenuItemFileInput.js.map +1 -0
  605. package/dist/src/form/MenuItemInputToggle.js.map +1 -0
  606. package/dist/src/form/MenuItemRadio.js.map +1 -0
  607. package/dist/src/form/MenuItemSwitch.js.map +1 -0
  608. package/dist/src/form/MenuItemTextField.js.map +1 -0
  609. package/dist/src/form/NativeSelect.js.map +1 -0
  610. package/dist/src/form/OptGroup.js.map +1 -0
  611. package/dist/src/form/Option.js.map +1 -0
  612. package/dist/src/form/Password.js.map +1 -0
  613. package/dist/src/form/Radio.js.map +1 -0
  614. package/dist/src/form/Select.js +304 -0
  615. package/dist/src/form/Select.js.map +1 -0
  616. package/dist/src/form/SelectValue.js.map +1 -0
  617. package/dist/src/form/Slider.js.map +1 -0
  618. package/dist/src/form/SliderContainer.js.map +1 -0
  619. package/dist/src/form/SliderMark.js.map +1 -0
  620. package/dist/src/form/SliderMarkLabel.js.map +1 -0
  621. package/dist/src/form/SliderThumb.js.map +1 -0
  622. package/dist/src/form/SliderTrack.js.map +1 -0
  623. package/dist/src/form/SliderValueMarks.js.map +1 -0
  624. package/dist/src/form/SliderValueTooltip.js.map +1 -0
  625. package/dist/src/form/Switch.js.map +1 -0
  626. package/dist/src/form/SwitchTrack.js.map +1 -0
  627. package/dist/src/form/TextArea.js.map +1 -0
  628. package/dist/src/form/TextField.js.map +1 -0
  629. package/dist/src/form/TextFieldAddon.js.map +1 -0
  630. package/dist/src/form/TextFieldContainer.js.map +1 -0
  631. package/dist/src/form/TextFieldContainerStyles.js.map +1 -0
  632. package/dist/src/form/fileUtils.js.map +1 -0
  633. package/dist/src/form/formConfig.js.map +1 -0
  634. package/dist/src/form/formMessageStyles.js.map +1 -0
  635. package/dist/src/form/inputToggleStyles.js.map +1 -0
  636. package/dist/src/form/nativeSelectStyles.js.map +1 -0
  637. package/dist/src/form/optionStyles.js.map +1 -0
  638. package/dist/src/form/passwordStyles.js.map +1 -0
  639. package/dist/src/form/selectStyles.js.map +1 -0
  640. package/dist/src/form/selectUtils.js.map +1 -0
  641. package/dist/src/form/sliderUtils.js.map +1 -0
  642. package/dist/src/form/switchStyles.js.map +1 -0
  643. package/dist/src/form/textAreaStyles.js.map +1 -0
  644. package/dist/src/form/textFieldStyles.js.map +1 -0
  645. package/dist/src/form/types.js.map +1 -0
  646. package/dist/src/form/useCheckboxGroup.js.map +1 -0
  647. package/dist/src/form/useFileUpload.js.map +1 -0
  648. package/dist/src/form/useListboxProvider.js.map +1 -0
  649. package/dist/src/form/useNumberField.js.map +1 -0
  650. package/dist/src/form/useRadioGroup.js.map +1 -0
  651. package/dist/src/form/useRangeSlider.js.map +1 -0
  652. package/dist/src/form/useResizingTextArea.js.map +1 -0
  653. package/dist/src/form/useSlider.js.map +1 -0
  654. package/dist/src/form/useTextField.js.map +1 -0
  655. package/dist/src/form/utils.js.map +1 -0
  656. package/dist/src/form/validation.js.map +1 -0
  657. package/dist/src/hoverMode/useHoverMode.js.map +1 -0
  658. package/dist/src/hoverMode/useHoverModeProvider.js.map +1 -0
  659. package/dist/src/icon/FontIcon.js.map +1 -0
  660. package/dist/src/icon/IconRotator.js +31 -0
  661. package/dist/src/icon/IconRotator.js.map +1 -0
  662. package/dist/src/icon/MaterialIcon.js.map +1 -0
  663. package/dist/src/icon/MaterialSymbol.js.map +1 -0
  664. package/dist/src/icon/SVGIcon.js.map +1 -0
  665. package/dist/src/icon/TextIconSpacing.js.map +1 -0
  666. package/dist/src/icon/iconConfig.js.map +1 -0
  667. package/dist/src/icon/material.js.map +1 -0
  668. package/dist/src/icon/materialConfig.js.map +1 -0
  669. package/dist/src/icon/styles.js.map +1 -0
  670. package/dist/src/index.js +329 -0
  671. package/dist/src/index.js.map +1 -0
  672. package/dist/src/interaction/Ripple.js.map +1 -0
  673. package/dist/src/interaction/RippleContainer.js.map +1 -0
  674. package/dist/src/interaction/UserInteractionModeProvider.js.map +1 -0
  675. package/dist/src/interaction/config.js.map +1 -0
  676. package/dist/src/interaction/types.js.map +1 -0
  677. package/dist/src/interaction/useElementInteraction.js.map +1 -0
  678. package/dist/src/interaction/useHigherContrastChildren.js.map +1 -0
  679. package/dist/src/interaction/utils.js.map +1 -0
  680. package/dist/src/layout/LayoutAppBar.js.map +1 -0
  681. package/dist/src/layout/LayoutNav.js.map +1 -0
  682. package/dist/src/layout/LayoutWindowSplitter.js.map +1 -0
  683. package/dist/src/layout/Main.js.map +1 -0
  684. package/dist/src/layout/layoutNavStyles.js.map +1 -0
  685. package/dist/src/layout/layoutWindowSplitterStyles.js.map +1 -0
  686. package/dist/src/layout/mainStyles.js.map +1 -0
  687. package/dist/src/layout/useExpandableLayout.js.map +1 -0
  688. package/dist/src/layout/useHorizontalLayoutTransition.js.map +1 -0
  689. package/dist/src/layout/useLayoutAppBarHeight.js +78 -0
  690. package/dist/src/layout/useLayoutAppBarHeight.js.map +1 -0
  691. package/dist/src/layout/useLayoutTree.js.map +1 -0
  692. package/dist/src/layout/useLayoutWindowSplitter.js.map +1 -0
  693. package/dist/src/layout/useMainTabIndex.js.map +1 -0
  694. package/dist/src/layout/useResizableLayout.js.map +1 -0
  695. package/dist/src/layout/useTemporaryLayout.js.map +1 -0
  696. package/dist/src/link/Link.js.map +1 -0
  697. package/dist/src/link/SkipToMainContent.js.map +1 -0
  698. package/dist/src/link/styles.js.map +1 -0
  699. package/dist/src/list/List.js.map +1 -0
  700. package/dist/src/list/ListItem.js +148 -0
  701. package/dist/src/list/ListItem.js.map +1 -0
  702. package/dist/src/list/ListItemAddon.js +31 -0
  703. package/dist/src/list/ListItemAddon.js.map +1 -0
  704. package/dist/src/list/ListItemChildren.js +82 -0
  705. package/dist/src/list/ListItemChildren.js.map +1 -0
  706. package/dist/src/list/ListItemLink.js +89 -0
  707. package/dist/src/list/ListItemLink.js.map +1 -0
  708. package/dist/src/list/ListItemText.js.map +1 -0
  709. package/dist/src/list/ListSubheader.js.map +1 -0
  710. package/dist/src/list/getListItemHeight.js +28 -0
  711. package/dist/src/list/getListItemHeight.js.map +1 -0
  712. package/dist/src/list/listItemStyles.js +45 -0
  713. package/dist/src/list/listItemStyles.js.map +1 -0
  714. package/dist/src/list/types.js.map +1 -0
  715. package/dist/src/media-queries/AppSizeProvider.js.map +1 -0
  716. package/dist/src/media-queries/appSize.js.map +1 -0
  717. package/dist/src/media-queries/useMediaQuery.js.map +1 -0
  718. package/dist/src/menu/DropdownMenu.js.map +1 -0
  719. package/dist/src/menu/Menu.js.map +1 -0
  720. package/dist/src/menu/MenuBar.js.map +1 -0
  721. package/dist/src/menu/MenuButton.js.map +1 -0
  722. package/dist/src/menu/MenuConfigurationProvider.js.map +1 -0
  723. package/dist/src/menu/MenuItem.js.map +1 -0
  724. package/dist/src/menu/MenuItemButton.js.map +1 -0
  725. package/dist/src/menu/MenuItemGroup.js.map +1 -0
  726. package/dist/src/menu/MenuItemSeparator.js.map +1 -0
  727. package/dist/src/menu/MenuSheet.js.map +1 -0
  728. package/dist/src/menu/MenuVisibilityProvider.js.map +1 -0
  729. package/dist/src/menu/MenuWidget.js.map +1 -0
  730. package/dist/src/menu/MenuWidgetKeyboardProvider.js.map +1 -0
  731. package/dist/src/menu/useContextMenu.js.map +1 -0
  732. package/dist/src/menu/useMenuBarProvider.js.map +1 -0
  733. package/dist/src/menu/utils.js.map +1 -0
  734. package/dist/src/movement/constants.js.map +1 -0
  735. package/dist/src/movement/findMatchIndex.js.map +1 -0
  736. package/dist/src/movement/types.js.map +1 -0
  737. package/dist/src/movement/useKeyboardMovementProvider.js.map +1 -0
  738. package/dist/src/movement/utils.js.map +1 -0
  739. package/dist/src/overlay/Overlay.js.map +1 -0
  740. package/dist/src/overlay/overlayStyles.js.map +1 -0
  741. package/dist/src/portal/Portal.js.map +1 -0
  742. package/dist/src/portal/PortalContainerProvider.js +60 -0
  743. package/dist/src/portal/PortalContainerProvider.js.map +1 -0
  744. package/dist/src/positioning/constants.js.map +1 -0
  745. package/dist/src/positioning/createHorizontalPosition.js.map +1 -0
  746. package/dist/src/positioning/createVerticalPosition.js.map +1 -0
  747. package/dist/src/positioning/getFixedPosition.js.map +1 -0
  748. package/dist/src/positioning/types.js.map +1 -0
  749. package/dist/src/positioning/useFixedPositioning.js.map +1 -0
  750. package/dist/src/positioning/utils.js.map +1 -0
  751. package/dist/src/progress/CircularProgress.js.map +1 -0
  752. package/dist/src/progress/LinearProgress.js.map +1 -0
  753. package/dist/src/progress/getProgressA11y.js.map +1 -0
  754. package/dist/src/progress/types.js.map +1 -0
  755. package/dist/src/responsive-item/ResponsiveItemContainer.js.map +1 -0
  756. package/dist/src/responsive-item/ResponsiveItemOverlay.js.map +1 -0
  757. package/dist/src/responsive-item/styles.js.map +1 -0
  758. package/dist/src/scroll/ScrollLock.js.map +1 -0
  759. package/dist/src/scroll/getScrollbarWidth.js.map +1 -0
  760. package/dist/src/scroll/useScrollLock.js.map +1 -0
  761. package/dist/src/segmented-button/SegmentedButton.js.map +1 -0
  762. package/dist/src/segmented-button/SegmentedButtonContainer.js.map +1 -0
  763. package/dist/src/segmented-button/segmentedButtonContainerStyles.js.map +1 -0
  764. package/dist/src/segmented-button/segmentedButtonStyles.js.map +1 -0
  765. package/dist/src/sheet/Sheet.js.map +1 -0
  766. package/dist/src/sheet/styles.js.map +1 -0
  767. package/dist/src/snackbar/DefaultToastRenderer.js.map +1 -0
  768. package/dist/src/snackbar/Snackbar.js.map +1 -0
  769. package/dist/src/snackbar/Toast.js.map +1 -0
  770. package/dist/src/snackbar/ToastActionButton.js.map +1 -0
  771. package/dist/src/snackbar/ToastCloseButton.js.map +1 -0
  772. package/dist/src/snackbar/ToastContent.js.map +1 -0
  773. package/dist/src/snackbar/ToastManager.js.map +1 -0
  774. package/dist/src/snackbar/ToastManagerProvider.js.map +1 -0
  775. package/dist/src/snackbar/snackbarStyles.js.map +1 -0
  776. package/dist/src/snackbar/toastContentStyles.js.map +1 -0
  777. package/dist/src/snackbar/toastStyles.js.map +1 -0
  778. package/dist/src/snackbar/useCurrentToastActions.js.map +1 -0
  779. package/dist/src/suspense/CircularProgressSuspense.js.map +1 -0
  780. package/dist/src/suspense/NullSuspense.js.map +1 -0
  781. package/dist/src/table/Table.js.map +1 -0
  782. package/dist/src/table/TableBody.js.map +1 -0
  783. package/dist/src/table/TableCell.js.map +1 -0
  784. package/dist/src/table/TableCellContent.js.map +1 -0
  785. package/dist/src/table/TableCheckbox.js +115 -0
  786. package/dist/src/table/TableCheckbox.js.map +1 -0
  787. package/dist/src/table/TableConfigurationProvider.js.map +1 -0
  788. package/dist/src/table/TableContainer.js.map +1 -0
  789. package/dist/src/table/TableContainerProvider.js.map +1 -0
  790. package/dist/src/table/TableFooter.js.map +1 -0
  791. package/dist/src/table/TableHeader.js.map +1 -0
  792. package/dist/src/table/TableRadio.js +108 -0
  793. package/dist/src/table/TableRadio.js.map +1 -0
  794. package/dist/src/table/TableRow.js.map +1 -0
  795. package/dist/src/table/tableCellStyles.js.map +1 -0
  796. package/dist/src/table/tableContainerStyles.js.map +1 -0
  797. package/dist/src/table/tableFooterStyles.js.map +1 -0
  798. package/dist/src/table/tableHeaderStyles.js.map +1 -0
  799. package/dist/src/table/tableRowStyles.js.map +1 -0
  800. package/dist/src/table/tableStyles.js.map +1 -0
  801. package/dist/src/table/types.js.map +1 -0
  802. package/dist/src/tabs/Tab.js +70 -0
  803. package/dist/src/tabs/Tab.js.map +1 -0
  804. package/dist/src/tabs/TabList.js.map +1 -0
  805. package/dist/src/tabs/TabListScrollButton.js.map +1 -0
  806. package/dist/src/tabs/tabIndicatorStyles.js +17 -0
  807. package/dist/src/tabs/tabIndicatorStyles.js.map +1 -0
  808. package/dist/src/tabs/tabListScrollButtonStyles.js.map +1 -0
  809. package/dist/src/tabs/tabListStyles.js +22 -0
  810. package/dist/src/tabs/tabListStyles.js.map +1 -0
  811. package/dist/src/tabs/tabStyles.js +24 -0
  812. package/dist/src/tabs/tabStyles.js.map +1 -0
  813. package/dist/src/tabs/useTabList.js +131 -0
  814. package/dist/src/tabs/useTabList.js.map +1 -0
  815. package/dist/src/tabs/useTabs.js.map +1 -0
  816. package/dist/src/tabs/utils.js.map +1 -0
  817. package/dist/src/test-utils/IntersectionObserver.js.map +1 -0
  818. package/dist/src/test-utils/ResizeObserver.js.map +1 -0
  819. package/dist/src/test-utils/data-testid.js.map +1 -0
  820. package/dist/src/test-utils/index.js.map +1 -0
  821. package/dist/src/test-utils/jest-setup.js.map +1 -0
  822. package/dist/src/test-utils/matchMedia.js.map +1 -0
  823. package/dist/src/test-utils/polyfills/IntersectionObserver.js.map +1 -0
  824. package/dist/src/test-utils/polyfills/ResizeObserver.js.map +1 -0
  825. package/dist/src/test-utils/polyfills/index.js.map +1 -0
  826. package/dist/src/test-utils/polyfills/matchMedia.js.map +1 -0
  827. package/dist/src/test-utils/polyfills/offsetParent.js.map +1 -0
  828. package/dist/src/test-utils/polyfills/scrollIntoView.js.map +1 -0
  829. package/dist/src/test-utils/render.js.map +1 -0
  830. package/dist/src/test-utils/timers.js.map +1 -0
  831. package/dist/src/theme/LocalStorageColorSchemeProvider.js.map +1 -0
  832. package/dist/src/theme/ThemeProvider.js.map +1 -0
  833. package/dist/src/theme/colors.js.map +1 -0
  834. package/dist/src/theme/cssVars.js.map +1 -0
  835. package/dist/src/theme/types.js.map +1 -0
  836. package/dist/src/theme/useCSSVariables.js.map +1 -0
  837. package/dist/src/theme/useColorScheme.js.map +1 -0
  838. package/dist/src/theme/useColorSchemeMetaTag.js.map +1 -0
  839. package/dist/src/theme/useColorSchemeProvider.js.map +1 -0
  840. package/dist/src/theme/usePrefersColorScheme.js.map +1 -0
  841. package/dist/src/theme/utils.js.map +1 -0
  842. package/dist/src/tooltip/Tooltip.js.map +1 -0
  843. package/dist/src/tooltip/TooltipHoverModeProvider.js.map +1 -0
  844. package/dist/src/tooltip/constants.js.map +1 -0
  845. package/dist/src/tooltip/tooltipStyles.js.map +1 -0
  846. package/dist/src/tooltip/useTooltip.js.map +1 -0
  847. package/dist/src/tooltip/useTooltipPosition.js.map +1 -0
  848. package/dist/src/tooltip/utils.js.map +1 -0
  849. package/dist/src/transition/CSSTransition.js.map +1 -0
  850. package/dist/src/transition/Collapse.js.map +1 -0
  851. package/dist/src/transition/CrossFade.js.map +1 -0
  852. package/dist/src/transition/ScaleTransition.js.map +1 -0
  853. package/dist/src/transition/SkeletonPlaceholder.js +131 -0
  854. package/dist/src/transition/SkeletonPlaceholder.js.map +1 -0
  855. package/dist/src/transition/Slide.js.map +1 -0
  856. package/dist/src/transition/SlideContainer.js.map +1 -0
  857. package/dist/src/transition/collapseStyles.js.map +1 -0
  858. package/dist/src/transition/config.js.map +1 -0
  859. package/dist/src/transition/maxWidthTransition.js.map +1 -0
  860. package/dist/src/transition/skeletonPlaceholderUtils.js +38 -0
  861. package/dist/src/transition/skeletonPlaceholderUtils.js.map +1 -0
  862. package/dist/src/transition/types.js.map +1 -0
  863. package/dist/src/transition/useCSSTransition.js.map +1 -0
  864. package/dist/src/transition/useCarousel.js.map +1 -0
  865. package/dist/src/transition/useCollapseTransition.js.map +1 -0
  866. package/dist/src/transition/useCrossFadeTransition.js.map +1 -0
  867. package/dist/src/transition/useMaxWidthTransition.js.map +1 -0
  868. package/dist/src/transition/useScaleTransition.js.map +1 -0
  869. package/dist/src/transition/useSkeletonPlaceholder.js +69 -0
  870. package/dist/src/transition/useSkeletonPlaceholder.js.map +1 -0
  871. package/dist/src/transition/useSlideTransition.js.map +1 -0
  872. package/dist/src/transition/useTransition.js.map +1 -0
  873. package/dist/src/transition/utils.js.map +1 -0
  874. package/dist/src/tree/DefaultTreeItemRenderer.js.map +1 -0
  875. package/dist/src/tree/Tree.js.map +1 -0
  876. package/dist/src/tree/TreeGroup.js.map +1 -0
  877. package/dist/src/tree/TreeItem.js +173 -0
  878. package/dist/src/tree/TreeItem.js.map +1 -0
  879. package/dist/src/tree/TreeItemExpander.js.map +1 -0
  880. package/dist/src/tree/TreeProvider.js.map +1 -0
  881. package/dist/src/tree/styles.js +58 -0
  882. package/dist/src/tree/styles.js.map +1 -0
  883. package/dist/src/tree/types.js.map +1 -0
  884. package/dist/src/tree/useTree.js.map +1 -0
  885. package/dist/src/tree/useTreeExpansion.js.map +1 -0
  886. package/dist/src/tree/useTreeItems.js.map +1 -0
  887. package/dist/src/tree/useTreeMovement.js.map +1 -0
  888. package/dist/src/tree/useTreeSelection.js.map +1 -0
  889. package/dist/src/tree/utils.js.map +1 -0
  890. package/dist/src/types.js +5 -0
  891. package/dist/src/types.js.map +1 -0
  892. package/dist/src/typography/SrOnly.js.map +1 -0
  893. package/dist/src/typography/TextContainer.js.map +1 -0
  894. package/dist/src/typography/Typography.js.map +1 -0
  895. package/dist/src/typography/WritingDirectionProvider.js.map +1 -0
  896. package/dist/src/useAsyncAction.js.map +1 -0
  897. package/dist/src/useDebouncedFunction.js.map +1 -0
  898. package/dist/src/useDropzone.js.map +1 -0
  899. package/dist/src/useElementSize.js +53 -0
  900. package/dist/src/useElementSize.js.map +1 -0
  901. package/dist/src/useEnsuredId.js.map +1 -0
  902. package/dist/src/useEnsuredRef.js.map +1 -0
  903. package/dist/src/useEnsuredState.js.map +1 -0
  904. package/dist/src/useHtmlClassName.js.map +1 -0
  905. package/dist/src/useIntersectionObserver.js.map +1 -0
  906. package/dist/src/useIsomorphicLayoutEffect.js.map +1 -0
  907. package/dist/src/useLocalStorage.js.map +1 -0
  908. package/dist/src/useOrientation.js.map +1 -0
  909. package/dist/src/usePageInactive.js.map +1 -0
  910. package/dist/src/useResizeListener.js +71 -0
  911. package/dist/src/useResizeListener.js.map +1 -0
  912. package/dist/src/useResizeObserver.js +134 -0
  913. package/dist/src/useResizeObserver.js.map +1 -0
  914. package/dist/src/useThrottledFunction.js.map +1 -0
  915. package/dist/src/useToggle.js.map +1 -0
  916. package/dist/src/useUnmounted.js.map +1 -0
  917. package/dist/src/useWindowSize.js +68 -0
  918. package/dist/src/useWindowSize.js.map +1 -0
  919. package/dist/src/utils/RenderRecursively.js.map +1 -0
  920. package/dist/src/utils/alphaNumericSort.js.map +1 -0
  921. package/dist/src/utils/applyRef.js.map +1 -0
  922. package/dist/src/utils/bem.js.map +1 -0
  923. package/dist/src/utils/filters.js.map +1 -0
  924. package/dist/src/utils/getClientPosition.js.map +1 -0
  925. package/dist/src/utils/getMiddleOfRange.js +20 -0
  926. package/dist/src/utils/getMiddleOfRange.js.map +1 -0
  927. package/dist/src/utils/getPercentage.js.map +1 -0
  928. package/dist/src/utils/getRangeDefaultValue.js +13 -0
  929. package/dist/src/utils/getRangeDefaultValue.js.map +1 -0
  930. package/dist/src/utils/getRangeSteps.js +17 -0
  931. package/dist/src/utils/getRangeSteps.js.map +1 -0
  932. package/dist/src/utils/identity.js.map +1 -0
  933. package/dist/src/utils/isElementVisible.js.map +1 -0
  934. package/dist/src/utils/loop.js.map +1 -0
  935. package/dist/src/utils/nearest.js +27 -0
  936. package/dist/src/utils/nearest.js.map +1 -0
  937. package/dist/src/utils/parseCssLengthUnit.js.map +1 -0
  938. package/dist/src/utils/randomInt.js.map +1 -0
  939. package/dist/src/utils/wait.js.map +1 -0
  940. package/dist/src/utils/withinRange.js.map +1 -0
  941. package/dist/src/window-splitter/WindowSplitter.js.map +1 -0
  942. package/dist/src/window-splitter/useWindowSplitter.js +59 -0
  943. package/dist/src/window-splitter/useWindowSplitter.js.map +1 -0
  944. package/dist/table/TableCheckbox.d.ts +3 -2
  945. package/dist/table/TableRadio.d.ts +3 -2
  946. package/dist/table/tableCellStyles.d.ts +1 -1
  947. package/dist/tabs/Tab.d.ts +24 -3
  948. package/dist/tabs/_tabs.scss +28 -16
  949. package/dist/tabs/tabIndicatorStyles.d.ts +2 -1
  950. package/dist/tabs/tabStyles.d.ts +2 -0
  951. package/dist/tabs/useTabList.d.ts +3 -3
  952. package/dist/theme/_theme.scss +20 -10
  953. package/dist/tooltip/useTooltip.d.ts +14 -14
  954. package/dist/transition/SkeletonPlaceholder.d.ts +2 -2
  955. package/dist/transition/_transition.scss +12 -7
  956. package/dist/transition/skeletonPlaceholderUtils.d.ts +77 -0
  957. package/dist/transition/useSkeletonPlaceholder.d.ts +12 -7
  958. package/dist/tree/DefaultTreeItemRenderer.d.ts +2 -2
  959. package/dist/tree/Tree.d.ts +8 -4
  960. package/dist/tree/_tree.scss +29 -22
  961. package/dist/tree/styles.d.ts +0 -6
  962. package/dist/types.d.ts +7 -0
  963. package/dist/typography/_typography.scss +12 -2
  964. package/dist/useElementSize.d.ts +40 -0
  965. package/dist/useResizeListener.d.ts +1 -1
  966. package/dist/useResizeObserver.d.ts +4 -43
  967. package/dist/useWindowSize.d.ts +14 -11
  968. package/dist/utils/getMiddleOfRange.d.ts +13 -0
  969. package/dist/utils/getRangeDefaultValue.d.ts +3 -5
  970. package/dist/utils/getRangeSteps.d.ts +1 -1
  971. package/dist/window-splitter/_window-splitter.scss +11 -16
  972. package/dist/window-splitter/useWindowSplitter.d.ts +3 -5
  973. package/package.json +19 -19
  974. package/src/__tests__/useElementSize.tsx +181 -0
  975. package/src/__tests__/useWindowSize.node.tsx +56 -0
  976. package/src/__tests__/useWindowSize.tsx +156 -0
  977. package/src/_box-shadows.scss +12 -2
  978. package/src/_core.scss +1 -3
  979. package/src/_utils.scss +22 -0
  980. package/src/app-bar/AppBar.tsx +59 -19
  981. package/src/app-bar/__tests__/__snapshots__/AppBar.tsx.snap +21 -21
  982. package/src/app-bar/_app-bar.scss +7 -9
  983. package/src/avatar/Avatar.tsx +1 -1
  984. package/src/badge/_badge.scss +12 -7
  985. package/src/button/TooltippedButton.tsx +120 -0
  986. package/src/button/__tests__/TooltippedButton.tsx +60 -0
  987. package/src/button/__tests__/__snapshots__/TooltippedButton.tsx.snap +26 -0
  988. package/src/card/Card.tsx +5 -3
  989. package/src/card/CardContent.tsx +3 -3
  990. package/src/card/ClickableCard.tsx +105 -0
  991. package/src/card/__tests__/ClickableCard.tsx +66 -0
  992. package/src/card/__tests__/__snapshots__/CardHeader.tsx.snap +1 -1
  993. package/src/card/__tests__/__snapshots__/CardSubtitle.tsx.snap +2 -2
  994. package/src/card/__tests__/__snapshots__/ClickableCard.tsx.snap +20 -0
  995. package/src/card/__tests__/__snapshots__/styles.ts.snap +1 -1
  996. package/src/card/_card.scss +15 -9
  997. package/src/card/styles.ts +19 -10
  998. package/src/dialog/_dialog.scss +28 -15
  999. package/src/divider/_divider.scss +9 -10
  1000. package/src/draggable/useDraggable.ts +26 -25
  1001. package/src/draggable/utils.ts +16 -50
  1002. package/src/expansion-panel/__tests__/ExpansionPanel.tsx +2 -2
  1003. package/src/expansion-panel/_expansion-panel.scss +25 -16
  1004. package/src/expansion-panel/useExpansionPanels.ts +20 -16
  1005. package/src/form/MenuItemInputToggle.tsx +1 -1
  1006. package/src/form/Select.tsx +9 -1
  1007. package/src/form/_form.scss +41 -23
  1008. package/src/icon/IconRotator.tsx +1 -2
  1009. package/src/icon/_icon.scss +7 -2
  1010. package/src/index.ts +5 -0
  1011. package/src/interaction/_interaction.scss +12 -9
  1012. package/src/layout/__tests__/__snapshots__/LayoutAppBar.tsx.snap +4 -4
  1013. package/src/layout/__tests__/__snapshots__/useExpandableLayout.tsx.snap +1 -1
  1014. package/src/layout/__tests__/__snapshots__/useLayoutTree.tsx.snap +18 -18
  1015. package/src/layout/__tests__/__snapshots__/useResizableLayout.tsx.snap +1 -1
  1016. package/src/layout/__tests__/__snapshots__/useTemporaryLayout.tsx.snap +1 -1
  1017. package/src/layout/useLayoutAppBarHeight.ts +5 -9
  1018. package/src/link/_link.scss +26 -12
  1019. package/src/list/ListItem.tsx +20 -13
  1020. package/src/list/ListItemAddon.tsx +5 -3
  1021. package/src/list/ListItemChildren.tsx +4 -2
  1022. package/src/list/ListItemLink.tsx +4 -4
  1023. package/src/list/__tests__/ListItem.tsx +1 -1
  1024. package/src/list/__tests__/__snapshots__/ListItem.tsx.snap +1 -1
  1025. package/src/list/__tests__/getListItemHeight.ts +2 -2
  1026. package/src/list/_list.scss +29 -18
  1027. package/src/list/getListItemHeight.ts +2 -3
  1028. package/src/list/listItemStyles.ts +15 -5
  1029. package/src/list/types.ts +16 -5
  1030. package/src/menu/Menu.tsx +1 -1
  1031. package/src/menu/_menu.scss +3 -16
  1032. package/src/portal/PortalContainerProvider.tsx +10 -2
  1033. package/src/portal/__tests__/PortalContainerProvider.tsx +23 -0
  1034. package/src/sheet/styles.ts +14 -15
  1035. package/src/suspense/__tests__/CircularProgressSuspense.tsx +90 -0
  1036. package/src/suspense/__tests__/NullSuspense.tsx +46 -0
  1037. package/src/suspense/__tests__/__snapshots__/CircularProgressSuspense.tsx.snap +24 -0
  1038. package/src/table/TableCheckbox.tsx +4 -2
  1039. package/src/table/TableRadio.tsx +4 -2
  1040. package/src/table/tableCellStyles.ts +1 -1
  1041. package/src/tabs/Tab.tsx +110 -70
  1042. package/src/tabs/__tests__/Tab.tsx +25 -2
  1043. package/src/tabs/__tests__/TabList.tsx +4 -4
  1044. package/src/tabs/__tests__/__snapshots__/TabList.tsx.snap +2 -2
  1045. package/src/tabs/_tabs.scss +28 -16
  1046. package/src/tabs/tabIndicatorStyles.ts +13 -3
  1047. package/src/tabs/tabListStyles.ts +1 -1
  1048. package/src/tabs/tabStyles.ts +16 -4
  1049. package/src/tabs/useTabList.ts +10 -8
  1050. package/src/theme/_theme.scss +20 -10
  1051. package/src/tooltip/useTooltip.ts +23 -16
  1052. package/src/transition/SkeletonPlaceholder.tsx +18 -6
  1053. package/src/transition/__tests__/SkeletonPlaceholder.tsx +72 -0
  1054. package/src/transition/__tests__/__snapshots__/SkeletonPlaceholder.tsx.snap +24 -0
  1055. package/src/transition/_transition.scss +12 -7
  1056. package/src/transition/skeletonPlaceholderUtils.ts +105 -0
  1057. package/src/transition/useSkeletonPlaceholder.ts +62 -47
  1058. package/src/tree/DefaultTreeItemRenderer.tsx +6 -2
  1059. package/src/tree/Tree.tsx +8 -4
  1060. package/src/tree/TreeItem.tsx +3 -4
  1061. package/src/tree/__tests__/Tree.tsx +1 -1
  1062. package/src/tree/__tests__/__snapshots__/Tree.tsx.snap +124 -124
  1063. package/src/tree/_tree.scss +29 -22
  1064. package/src/tree/styles.ts +0 -9
  1065. package/src/types.ts +8 -0
  1066. package/src/typography/_typography.scss +12 -2
  1067. package/src/useElementSize.ts +83 -0
  1068. package/src/useResizeListener.ts +3 -1
  1069. package/src/useResizeObserver.ts +7 -44
  1070. package/src/useWindowSize.ts +29 -19
  1071. package/src/utils/__tests__/getMiddleOfRange.ts +12 -0
  1072. package/src/utils/__tests__/getRangeDefaultValue.ts +47 -0
  1073. package/src/utils/getMiddleOfRange.ts +26 -0
  1074. package/src/utils/getRangeDefaultValue.ts +8 -15
  1075. package/src/utils/getRangeSteps.ts +2 -2
  1076. package/src/utils/nearest.ts +1 -1
  1077. package/src/window-splitter/_window-splitter.scss +11 -16
  1078. package/src/window-splitter/useWindowSplitter.ts +12 -28
  1079. package/dist/CoreProviders.js.map +0 -1
  1080. package/dist/NoSsr.js.map +0 -1
  1081. package/dist/SsrProvider.js.map +0 -1
  1082. package/dist/app-bar/AppBar.js +0 -74
  1083. package/dist/app-bar/AppBar.js.map +0 -1
  1084. package/dist/app-bar/AppBarTitle.js.map +0 -1
  1085. package/dist/avatar/Avatar.js.map +0 -1
  1086. package/dist/avatar/styles.js.map +0 -1
  1087. package/dist/badge/Badge.js.map +0 -1
  1088. package/dist/box/Box.js.map +0 -1
  1089. package/dist/box/styles.js.map +0 -1
  1090. package/dist/button/AsyncButton.js.map +0 -1
  1091. package/dist/button/Button.js.map +0 -1
  1092. package/dist/button/ButtonUnstyled.js.map +0 -1
  1093. package/dist/button/FloatingActionButton.js.map +0 -1
  1094. package/dist/button/buttonStyles.js.map +0 -1
  1095. package/dist/button/buttonUnstyledStyles.js.map +0 -1
  1096. package/dist/card/Card.js +0 -59
  1097. package/dist/card/Card.js.map +0 -1
  1098. package/dist/card/CardContent.js +0 -25
  1099. package/dist/card/CardContent.js.map +0 -1
  1100. package/dist/card/CardFooter.js.map +0 -1
  1101. package/dist/card/CardHeader.js.map +0 -1
  1102. package/dist/card/CardSubtitle.js.map +0 -1
  1103. package/dist/card/CardTitle.js.map +0 -1
  1104. package/dist/card/styles.js +0 -62
  1105. package/dist/card/styles.js.map +0 -1
  1106. package/dist/chip/Chip.js.map +0 -1
  1107. package/dist/chip/styles.js.map +0 -1
  1108. package/dist/cssUtils.js.map +0 -1
  1109. package/dist/delegateEvent.js.map +0 -1
  1110. package/dist/dialog/Dialog.js.map +0 -1
  1111. package/dist/dialog/DialogContainer.js.map +0 -1
  1112. package/dist/dialog/DialogContent.js.map +0 -1
  1113. package/dist/dialog/DialogFooter.js.map +0 -1
  1114. package/dist/dialog/DialogHeader.js.map +0 -1
  1115. package/dist/dialog/DialogTitle.js.map +0 -1
  1116. package/dist/dialog/FixedDialog.js.map +0 -1
  1117. package/dist/dialog/NestedDialogProvider.js.map +0 -1
  1118. package/dist/dialog/styles.js.map +0 -1
  1119. package/dist/divider/Divider.js.map +0 -1
  1120. package/dist/divider/styles.js.map +0 -1
  1121. package/dist/draggable/useDraggable.js +0 -425
  1122. package/dist/draggable/useDraggable.js.map +0 -1
  1123. package/dist/draggable/utils.js +0 -146
  1124. package/dist/draggable/utils.js.map +0 -1
  1125. package/dist/expansion-panel/ExpansionList.js.map +0 -1
  1126. package/dist/expansion-panel/ExpansionPanel.js.map +0 -1
  1127. package/dist/expansion-panel/ExpansionPanelHeader.js.map +0 -1
  1128. package/dist/expansion-panel/useExpansionList.js.map +0 -1
  1129. package/dist/expansion-panel/useExpansionPanels.js +0 -135
  1130. package/dist/expansion-panel/useExpansionPanels.js.map +0 -1
  1131. package/dist/focus/useFocusContainer.js.map +0 -1
  1132. package/dist/focus/utils.js.map +0 -1
  1133. package/dist/form/Checkbox.js.map +0 -1
  1134. package/dist/form/Fieldset.js.map +0 -1
  1135. package/dist/form/FileInput.js.map +0 -1
  1136. package/dist/form/Form.js.map +0 -1
  1137. package/dist/form/FormMessage.js.map +0 -1
  1138. package/dist/form/FormMessageContainer.js.map +0 -1
  1139. package/dist/form/FormMessageCounter.js.map +0 -1
  1140. package/dist/form/InputToggle.js.map +0 -1
  1141. package/dist/form/InputToggleIcon.js.map +0 -1
  1142. package/dist/form/Label.js.map +0 -1
  1143. package/dist/form/Legend.js.map +0 -1
  1144. package/dist/form/MenuItemCheckbox.js.map +0 -1
  1145. package/dist/form/MenuItemFileInput.js.map +0 -1
  1146. package/dist/form/MenuItemInputToggle.js.map +0 -1
  1147. package/dist/form/MenuItemRadio.js.map +0 -1
  1148. package/dist/form/MenuItemSwitch.js.map +0 -1
  1149. package/dist/form/MenuItemTextField.js.map +0 -1
  1150. package/dist/form/NativeSelect.js.map +0 -1
  1151. package/dist/form/OptGroup.js.map +0 -1
  1152. package/dist/form/Option.js.map +0 -1
  1153. package/dist/form/Password.js.map +0 -1
  1154. package/dist/form/Radio.js.map +0 -1
  1155. package/dist/form/Select.js +0 -299
  1156. package/dist/form/Select.js.map +0 -1
  1157. package/dist/form/SelectValue.js.map +0 -1
  1158. package/dist/form/Slider.js.map +0 -1
  1159. package/dist/form/SliderContainer.js.map +0 -1
  1160. package/dist/form/SliderMark.js.map +0 -1
  1161. package/dist/form/SliderMarkLabel.js.map +0 -1
  1162. package/dist/form/SliderThumb.js.map +0 -1
  1163. package/dist/form/SliderTrack.js.map +0 -1
  1164. package/dist/form/SliderValueMarks.js.map +0 -1
  1165. package/dist/form/SliderValueTooltip.js.map +0 -1
  1166. package/dist/form/Switch.js.map +0 -1
  1167. package/dist/form/SwitchTrack.js.map +0 -1
  1168. package/dist/form/TextArea.js.map +0 -1
  1169. package/dist/form/TextField.js.map +0 -1
  1170. package/dist/form/TextFieldAddon.js.map +0 -1
  1171. package/dist/form/TextFieldContainer.js.map +0 -1
  1172. package/dist/form/TextFieldContainerStyles.js.map +0 -1
  1173. package/dist/form/fileUtils.js.map +0 -1
  1174. package/dist/form/formConfig.js.map +0 -1
  1175. package/dist/form/formMessageStyles.js.map +0 -1
  1176. package/dist/form/inputToggleStyles.js.map +0 -1
  1177. package/dist/form/nativeSelectStyles.js.map +0 -1
  1178. package/dist/form/optionStyles.js.map +0 -1
  1179. package/dist/form/passwordStyles.js.map +0 -1
  1180. package/dist/form/selectStyles.js.map +0 -1
  1181. package/dist/form/selectUtils.js.map +0 -1
  1182. package/dist/form/sliderUtils.js.map +0 -1
  1183. package/dist/form/switchStyles.js.map +0 -1
  1184. package/dist/form/textAreaStyles.js.map +0 -1
  1185. package/dist/form/textFieldStyles.js.map +0 -1
  1186. package/dist/form/types.js.map +0 -1
  1187. package/dist/form/useCheckboxGroup.js.map +0 -1
  1188. package/dist/form/useFileUpload.js.map +0 -1
  1189. package/dist/form/useListboxProvider.js.map +0 -1
  1190. package/dist/form/useNumberField.js.map +0 -1
  1191. package/dist/form/useRadioGroup.js.map +0 -1
  1192. package/dist/form/useRangeSlider.js.map +0 -1
  1193. package/dist/form/useResizingTextArea.js.map +0 -1
  1194. package/dist/form/useSlider.js.map +0 -1
  1195. package/dist/form/useTextField.js.map +0 -1
  1196. package/dist/form/utils.js.map +0 -1
  1197. package/dist/form/validation.js.map +0 -1
  1198. package/dist/hoverMode/useHoverMode.js.map +0 -1
  1199. package/dist/hoverMode/useHoverModeProvider.js.map +0 -1
  1200. package/dist/icon/FontIcon.js.map +0 -1
  1201. package/dist/icon/IconRotator.js +0 -32
  1202. package/dist/icon/IconRotator.js.map +0 -1
  1203. package/dist/icon/MaterialIcon.js.map +0 -1
  1204. package/dist/icon/MaterialSymbol.js.map +0 -1
  1205. package/dist/icon/SVGIcon.js.map +0 -1
  1206. package/dist/icon/TextIconSpacing.js.map +0 -1
  1207. package/dist/icon/iconConfig.js.map +0 -1
  1208. package/dist/icon/material.js.map +0 -1
  1209. package/dist/icon/materialConfig.js.map +0 -1
  1210. package/dist/icon/styles.js.map +0 -1
  1211. package/dist/index.js +0 -324
  1212. package/dist/index.js.map +0 -1
  1213. package/dist/interaction/Ripple.js.map +0 -1
  1214. package/dist/interaction/RippleContainer.js.map +0 -1
  1215. package/dist/interaction/UserInteractionModeProvider.js.map +0 -1
  1216. package/dist/interaction/config.js.map +0 -1
  1217. package/dist/interaction/types.js.map +0 -1
  1218. package/dist/interaction/useElementInteraction.js.map +0 -1
  1219. package/dist/interaction/useHigherContrastChildren.js.map +0 -1
  1220. package/dist/interaction/utils.js.map +0 -1
  1221. package/dist/layout/LayoutAppBar.js.map +0 -1
  1222. package/dist/layout/LayoutNav.js.map +0 -1
  1223. package/dist/layout/LayoutWindowSplitter.js.map +0 -1
  1224. package/dist/layout/Main.js.map +0 -1
  1225. package/dist/layout/layoutNavStyles.js.map +0 -1
  1226. package/dist/layout/layoutWindowSplitterStyles.js.map +0 -1
  1227. package/dist/layout/mainStyles.js.map +0 -1
  1228. package/dist/layout/useExpandableLayout.js.map +0 -1
  1229. package/dist/layout/useHorizontalLayoutTransition.js.map +0 -1
  1230. package/dist/layout/useLayoutAppBarHeight.js +0 -82
  1231. package/dist/layout/useLayoutAppBarHeight.js.map +0 -1
  1232. package/dist/layout/useLayoutTree.js.map +0 -1
  1233. package/dist/layout/useLayoutWindowSplitter.js.map +0 -1
  1234. package/dist/layout/useMainTabIndex.js.map +0 -1
  1235. package/dist/layout/useResizableLayout.js.map +0 -1
  1236. package/dist/layout/useTemporaryLayout.js.map +0 -1
  1237. package/dist/link/Link.js.map +0 -1
  1238. package/dist/link/SkipToMainContent.js.map +0 -1
  1239. package/dist/link/styles.js.map +0 -1
  1240. package/dist/list/List.js.map +0 -1
  1241. package/dist/list/ListItem.js +0 -147
  1242. package/dist/list/ListItem.js.map +0 -1
  1243. package/dist/list/ListItemAddon.js +0 -30
  1244. package/dist/list/ListItemAddon.js.map +0 -1
  1245. package/dist/list/ListItemChildren.js +0 -81
  1246. package/dist/list/ListItemChildren.js.map +0 -1
  1247. package/dist/list/ListItemLink.js +0 -89
  1248. package/dist/list/ListItemLink.js.map +0 -1
  1249. package/dist/list/ListItemText.js.map +0 -1
  1250. package/dist/list/ListSubheader.js.map +0 -1
  1251. package/dist/list/getListItemHeight.js +0 -28
  1252. package/dist/list/getListItemHeight.js.map +0 -1
  1253. package/dist/list/listItemStyles.js +0 -45
  1254. package/dist/list/listItemStyles.js.map +0 -1
  1255. package/dist/list/types.js.map +0 -1
  1256. package/dist/media-queries/AppSizeProvider.js.map +0 -1
  1257. package/dist/media-queries/appSize.js.map +0 -1
  1258. package/dist/media-queries/useMediaQuery.js.map +0 -1
  1259. package/dist/menu/DropdownMenu.js.map +0 -1
  1260. package/dist/menu/Menu.js.map +0 -1
  1261. package/dist/menu/MenuBar.js.map +0 -1
  1262. package/dist/menu/MenuButton.js.map +0 -1
  1263. package/dist/menu/MenuConfigurationProvider.js.map +0 -1
  1264. package/dist/menu/MenuItem.js.map +0 -1
  1265. package/dist/menu/MenuItemButton.js.map +0 -1
  1266. package/dist/menu/MenuItemGroup.js.map +0 -1
  1267. package/dist/menu/MenuItemSeparator.js.map +0 -1
  1268. package/dist/menu/MenuSheet.js.map +0 -1
  1269. package/dist/menu/MenuVisibilityProvider.js.map +0 -1
  1270. package/dist/menu/MenuWidget.js.map +0 -1
  1271. package/dist/menu/MenuWidgetKeyboardProvider.js.map +0 -1
  1272. package/dist/menu/useContextMenu.js.map +0 -1
  1273. package/dist/menu/useMenuBarProvider.js.map +0 -1
  1274. package/dist/menu/utils.js.map +0 -1
  1275. package/dist/movement/constants.js.map +0 -1
  1276. package/dist/movement/findMatchIndex.js.map +0 -1
  1277. package/dist/movement/types.js.map +0 -1
  1278. package/dist/movement/useKeyboardMovementProvider.js.map +0 -1
  1279. package/dist/movement/utils.js.map +0 -1
  1280. package/dist/overlay/Overlay.js.map +0 -1
  1281. package/dist/overlay/overlayStyles.js.map +0 -1
  1282. package/dist/portal/Portal.js.map +0 -1
  1283. package/dist/portal/PortalContainerProvider.js +0 -55
  1284. package/dist/portal/PortalContainerProvider.js.map +0 -1
  1285. package/dist/positioning/constants.js.map +0 -1
  1286. package/dist/positioning/createHorizontalPosition.js.map +0 -1
  1287. package/dist/positioning/createVerticalPosition.js.map +0 -1
  1288. package/dist/positioning/getFixedPosition.js.map +0 -1
  1289. package/dist/positioning/types.js.map +0 -1
  1290. package/dist/positioning/useFixedPositioning.js.map +0 -1
  1291. package/dist/positioning/utils.js.map +0 -1
  1292. package/dist/progress/CircularProgress.js.map +0 -1
  1293. package/dist/progress/LinearProgress.js.map +0 -1
  1294. package/dist/progress/getProgressA11y.js.map +0 -1
  1295. package/dist/progress/types.js.map +0 -1
  1296. package/dist/responsive-item/ResponsiveItemContainer.js.map +0 -1
  1297. package/dist/responsive-item/ResponsiveItemOverlay.js.map +0 -1
  1298. package/dist/responsive-item/styles.js.map +0 -1
  1299. package/dist/scroll/ScrollLock.js.map +0 -1
  1300. package/dist/scroll/getScrollbarWidth.js.map +0 -1
  1301. package/dist/scroll/useScrollLock.js.map +0 -1
  1302. package/dist/segmented-button/SegmentedButton.js.map +0 -1
  1303. package/dist/segmented-button/SegmentedButtonContainer.js.map +0 -1
  1304. package/dist/segmented-button/segmentedButtonContainerStyles.js.map +0 -1
  1305. package/dist/segmented-button/segmentedButtonStyles.js.map +0 -1
  1306. package/dist/sheet/Sheet.js.map +0 -1
  1307. package/dist/sheet/styles.js.map +0 -1
  1308. package/dist/snackbar/DefaultToastRenderer.js.map +0 -1
  1309. package/dist/snackbar/Snackbar.js.map +0 -1
  1310. package/dist/snackbar/Toast.js.map +0 -1
  1311. package/dist/snackbar/ToastActionButton.js.map +0 -1
  1312. package/dist/snackbar/ToastCloseButton.js.map +0 -1
  1313. package/dist/snackbar/ToastContent.js.map +0 -1
  1314. package/dist/snackbar/ToastManager.js.map +0 -1
  1315. package/dist/snackbar/ToastManagerProvider.js.map +0 -1
  1316. package/dist/snackbar/snackbarStyles.js.map +0 -1
  1317. package/dist/snackbar/toastContentStyles.js.map +0 -1
  1318. package/dist/snackbar/toastStyles.js.map +0 -1
  1319. package/dist/snackbar/useCurrentToastActions.js.map +0 -1
  1320. package/dist/suspense/CircularProgressSuspense.js.map +0 -1
  1321. package/dist/suspense/NullSuspense.js.map +0 -1
  1322. package/dist/table/Table.js.map +0 -1
  1323. package/dist/table/TableBody.js.map +0 -1
  1324. package/dist/table/TableCell.js.map +0 -1
  1325. package/dist/table/TableCellContent.js.map +0 -1
  1326. package/dist/table/TableCheckbox.js +0 -113
  1327. package/dist/table/TableCheckbox.js.map +0 -1
  1328. package/dist/table/TableConfigurationProvider.js.map +0 -1
  1329. package/dist/table/TableContainer.js.map +0 -1
  1330. package/dist/table/TableContainerProvider.js.map +0 -1
  1331. package/dist/table/TableFooter.js.map +0 -1
  1332. package/dist/table/TableHeader.js.map +0 -1
  1333. package/dist/table/TableRadio.js +0 -106
  1334. package/dist/table/TableRadio.js.map +0 -1
  1335. package/dist/table/TableRow.js.map +0 -1
  1336. package/dist/table/tableCellStyles.js.map +0 -1
  1337. package/dist/table/tableContainerStyles.js.map +0 -1
  1338. package/dist/table/tableFooterStyles.js.map +0 -1
  1339. package/dist/table/tableHeaderStyles.js.map +0 -1
  1340. package/dist/table/tableRowStyles.js.map +0 -1
  1341. package/dist/table/tableStyles.js.map +0 -1
  1342. package/dist/table/types.js.map +0 -1
  1343. package/dist/tabs/Tab.js +0 -63
  1344. package/dist/tabs/Tab.js.map +0 -1
  1345. package/dist/tabs/TabList.js.map +0 -1
  1346. package/dist/tabs/TabListScrollButton.js.map +0 -1
  1347. package/dist/tabs/tabIndicatorStyles.js +0 -14
  1348. package/dist/tabs/tabIndicatorStyles.js.map +0 -1
  1349. package/dist/tabs/tabListScrollButtonStyles.js.map +0 -1
  1350. package/dist/tabs/tabListStyles.js +0 -21
  1351. package/dist/tabs/tabListStyles.js.map +0 -1
  1352. package/dist/tabs/tabStyles.js +0 -21
  1353. package/dist/tabs/tabStyles.js.map +0 -1
  1354. package/dist/tabs/useTabList.js +0 -128
  1355. package/dist/tabs/useTabList.js.map +0 -1
  1356. package/dist/tabs/useTabs.js.map +0 -1
  1357. package/dist/tabs/utils.js.map +0 -1
  1358. package/dist/test-utils/IntersectionObserver.js.map +0 -1
  1359. package/dist/test-utils/ResizeObserver.js.map +0 -1
  1360. package/dist/test-utils/data-testid.js.map +0 -1
  1361. package/dist/test-utils/index.js.map +0 -1
  1362. package/dist/test-utils/jest-setup.js.map +0 -1
  1363. package/dist/test-utils/matchMedia.js.map +0 -1
  1364. package/dist/test-utils/polyfills/IntersectionObserver.js.map +0 -1
  1365. package/dist/test-utils/polyfills/ResizeObserver.js.map +0 -1
  1366. package/dist/test-utils/polyfills/index.js.map +0 -1
  1367. package/dist/test-utils/polyfills/matchMedia.js.map +0 -1
  1368. package/dist/test-utils/polyfills/offsetParent.js.map +0 -1
  1369. package/dist/test-utils/polyfills/scrollIntoView.js.map +0 -1
  1370. package/dist/test-utils/render.js.map +0 -1
  1371. package/dist/test-utils/timers.js.map +0 -1
  1372. package/dist/theme/LocalStorageColorSchemeProvider.js.map +0 -1
  1373. package/dist/theme/ThemeProvider.js.map +0 -1
  1374. package/dist/theme/colors.js.map +0 -1
  1375. package/dist/theme/cssVars.js.map +0 -1
  1376. package/dist/theme/types.js.map +0 -1
  1377. package/dist/theme/useCSSVariables.js.map +0 -1
  1378. package/dist/theme/useColorScheme.js.map +0 -1
  1379. package/dist/theme/useColorSchemeMetaTag.js.map +0 -1
  1380. package/dist/theme/useColorSchemeProvider.js.map +0 -1
  1381. package/dist/theme/usePrefersColorScheme.js.map +0 -1
  1382. package/dist/theme/utils.js.map +0 -1
  1383. package/dist/tooltip/Tooltip.js.map +0 -1
  1384. package/dist/tooltip/TooltipHoverModeProvider.js.map +0 -1
  1385. package/dist/tooltip/constants.js.map +0 -1
  1386. package/dist/tooltip/tooltipStyles.js.map +0 -1
  1387. package/dist/tooltip/useTooltip.js.map +0 -1
  1388. package/dist/tooltip/useTooltipPosition.js.map +0 -1
  1389. package/dist/tooltip/utils.js.map +0 -1
  1390. package/dist/transition/CSSTransition.js.map +0 -1
  1391. package/dist/transition/Collapse.js.map +0 -1
  1392. package/dist/transition/CrossFade.js.map +0 -1
  1393. package/dist/transition/ScaleTransition.js.map +0 -1
  1394. package/dist/transition/SkeletonPlaceholder.js +0 -126
  1395. package/dist/transition/SkeletonPlaceholder.js.map +0 -1
  1396. package/dist/transition/Slide.js.map +0 -1
  1397. package/dist/transition/SlideContainer.js.map +0 -1
  1398. package/dist/transition/collapseStyles.js.map +0 -1
  1399. package/dist/transition/config.js.map +0 -1
  1400. package/dist/transition/maxWidthTransition.js.map +0 -1
  1401. package/dist/transition/types.js.map +0 -1
  1402. package/dist/transition/useCSSTransition.js.map +0 -1
  1403. package/dist/transition/useCarousel.js.map +0 -1
  1404. package/dist/transition/useCollapseTransition.js.map +0 -1
  1405. package/dist/transition/useCrossFadeTransition.js.map +0 -1
  1406. package/dist/transition/useMaxWidthTransition.js.map +0 -1
  1407. package/dist/transition/useScaleTransition.js.map +0 -1
  1408. package/dist/transition/useSkeletonPlaceholder.js +0 -68
  1409. package/dist/transition/useSkeletonPlaceholder.js.map +0 -1
  1410. package/dist/transition/useSlideTransition.js.map +0 -1
  1411. package/dist/transition/useTransition.js.map +0 -1
  1412. package/dist/transition/utils.js.map +0 -1
  1413. package/dist/tree/DefaultTreeItemRenderer.js.map +0 -1
  1414. package/dist/tree/Tree.js.map +0 -1
  1415. package/dist/tree/TreeGroup.js.map +0 -1
  1416. package/dist/tree/TreeItem.js +0 -174
  1417. package/dist/tree/TreeItem.js.map +0 -1
  1418. package/dist/tree/TreeItemExpander.js.map +0 -1
  1419. package/dist/tree/TreeProvider.js.map +0 -1
  1420. package/dist/tree/styles.js +0 -59
  1421. package/dist/tree/styles.js.map +0 -1
  1422. package/dist/tree/types.js.map +0 -1
  1423. package/dist/tree/useTree.js.map +0 -1
  1424. package/dist/tree/useTreeExpansion.js.map +0 -1
  1425. package/dist/tree/useTreeItems.js.map +0 -1
  1426. package/dist/tree/useTreeMovement.js.map +0 -1
  1427. package/dist/tree/useTreeSelection.js.map +0 -1
  1428. package/dist/tree/utils.js.map +0 -1
  1429. package/dist/types.js +0 -6
  1430. package/dist/types.js.map +0 -1
  1431. package/dist/typography/SrOnly.js.map +0 -1
  1432. package/dist/typography/TextContainer.js.map +0 -1
  1433. package/dist/typography/Typography.js.map +0 -1
  1434. package/dist/typography/WritingDirectionProvider.js.map +0 -1
  1435. package/dist/useAsyncAction.js.map +0 -1
  1436. package/dist/useDebouncedFunction.js.map +0 -1
  1437. package/dist/useDropzone.js.map +0 -1
  1438. package/dist/useEnsuredId.js.map +0 -1
  1439. package/dist/useEnsuredRef.js.map +0 -1
  1440. package/dist/useEnsuredState.js.map +0 -1
  1441. package/dist/useHtmlClassName.js.map +0 -1
  1442. package/dist/useIntersectionObserver.js.map +0 -1
  1443. package/dist/useIsomorphicLayoutEffect.js.map +0 -1
  1444. package/dist/useLocalStorage.js.map +0 -1
  1445. package/dist/useOrientation.js.map +0 -1
  1446. package/dist/usePageInactive.js.map +0 -1
  1447. package/dist/useResizeListener.js +0 -70
  1448. package/dist/useResizeListener.js.map +0 -1
  1449. package/dist/useResizeObserver.js +0 -173
  1450. package/dist/useResizeObserver.js.map +0 -1
  1451. package/dist/useThrottledFunction.js.map +0 -1
  1452. package/dist/useToggle.js.map +0 -1
  1453. package/dist/useUnmounted.js.map +0 -1
  1454. package/dist/useWindowSize.js +0 -63
  1455. package/dist/useWindowSize.js.map +0 -1
  1456. package/dist/utils/RenderRecursively.js.map +0 -1
  1457. package/dist/utils/alphaNumericSort.js.map +0 -1
  1458. package/dist/utils/applyRef.js.map +0 -1
  1459. package/dist/utils/bem.js.map +0 -1
  1460. package/dist/utils/filters.js.map +0 -1
  1461. package/dist/utils/getClientPosition.js.map +0 -1
  1462. package/dist/utils/getPercentage.js.map +0 -1
  1463. package/dist/utils/getRangeDefaultValue.js +0 -23
  1464. package/dist/utils/getRangeDefaultValue.js.map +0 -1
  1465. package/dist/utils/getRangeSteps.js +0 -17
  1466. package/dist/utils/getRangeSteps.js.map +0 -1
  1467. package/dist/utils/identity.js.map +0 -1
  1468. package/dist/utils/isElementVisible.js.map +0 -1
  1469. package/dist/utils/loop.js.map +0 -1
  1470. package/dist/utils/nearest.js +0 -27
  1471. package/dist/utils/nearest.js.map +0 -1
  1472. package/dist/utils/parseCssLengthUnit.js.map +0 -1
  1473. package/dist/utils/randomInt.js.map +0 -1
  1474. package/dist/utils/wait.js.map +0 -1
  1475. package/dist/utils/withinRange.js.map +0 -1
  1476. package/dist/window-splitter/WindowSplitter.js.map +0 -1
  1477. package/dist/window-splitter/useWindowSplitter.js +0 -67
  1478. package/dist/window-splitter/useWindowSplitter.js.map +0 -1
  1479. /package/dist/{CoreProviders.js → src/CoreProviders.js} +0 -0
  1480. /package/dist/{NoSsr.js → src/NoSsr.js} +0 -0
  1481. /package/dist/{SsrProvider.js → src/SsrProvider.js} +0 -0
  1482. /package/dist/{app-bar → src/app-bar}/AppBarTitle.js +0 -0
  1483. /package/dist/{avatar → src/avatar}/Avatar.js +0 -0
  1484. /package/dist/{avatar → src/avatar}/styles.js +0 -0
  1485. /package/dist/{badge → src/badge}/Badge.js +0 -0
  1486. /package/dist/{box → src/box}/Box.js +0 -0
  1487. /package/dist/{box → src/box}/styles.js +0 -0
  1488. /package/dist/{button → src/button}/AsyncButton.js +0 -0
  1489. /package/dist/{button → src/button}/Button.js +0 -0
  1490. /package/dist/{button → src/button}/ButtonUnstyled.js +0 -0
  1491. /package/dist/{button → src/button}/FloatingActionButton.js +0 -0
  1492. /package/dist/{button → src/button}/buttonStyles.js +0 -0
  1493. /package/dist/{button → src/button}/buttonUnstyledStyles.js +0 -0
  1494. /package/dist/{card → src/card}/CardFooter.js +0 -0
  1495. /package/dist/{card → src/card}/CardHeader.js +0 -0
  1496. /package/dist/{card → src/card}/CardSubtitle.js +0 -0
  1497. /package/dist/{card → src/card}/CardTitle.js +0 -0
  1498. /package/dist/{chip → src/chip}/Chip.js +0 -0
  1499. /package/dist/{chip → src/chip}/styles.js +0 -0
  1500. /package/dist/{cssUtils.js → src/cssUtils.js} +0 -0
  1501. /package/dist/{delegateEvent.js → src/delegateEvent.js} +0 -0
  1502. /package/dist/{dialog → src/dialog}/Dialog.js +0 -0
  1503. /package/dist/{dialog → src/dialog}/DialogContainer.js +0 -0
  1504. /package/dist/{dialog → src/dialog}/DialogContent.js +0 -0
  1505. /package/dist/{dialog → src/dialog}/DialogFooter.js +0 -0
  1506. /package/dist/{dialog → src/dialog}/DialogHeader.js +0 -0
  1507. /package/dist/{dialog → src/dialog}/DialogTitle.js +0 -0
  1508. /package/dist/{dialog → src/dialog}/FixedDialog.js +0 -0
  1509. /package/dist/{dialog → src/dialog}/NestedDialogProvider.js +0 -0
  1510. /package/dist/{dialog → src/dialog}/styles.js +0 -0
  1511. /package/dist/{divider → src/divider}/Divider.js +0 -0
  1512. /package/dist/{divider → src/divider}/styles.js +0 -0
  1513. /package/dist/{expansion-panel → src/expansion-panel}/ExpansionList.js +0 -0
  1514. /package/dist/{expansion-panel → src/expansion-panel}/ExpansionPanel.js +0 -0
  1515. /package/dist/{expansion-panel → src/expansion-panel}/ExpansionPanelHeader.js +0 -0
  1516. /package/dist/{expansion-panel → src/expansion-panel}/useExpansionList.js +0 -0
  1517. /package/dist/{focus → src/focus}/useFocusContainer.js +0 -0
  1518. /package/dist/{focus → src/focus}/utils.js +0 -0
  1519. /package/dist/{form → src/form}/Checkbox.js +0 -0
  1520. /package/dist/{form → src/form}/Fieldset.js +0 -0
  1521. /package/dist/{form → src/form}/FileInput.js +0 -0
  1522. /package/dist/{form → src/form}/Form.js +0 -0
  1523. /package/dist/{form → src/form}/FormMessage.js +0 -0
  1524. /package/dist/{form → src/form}/FormMessageContainer.js +0 -0
  1525. /package/dist/{form → src/form}/FormMessageCounter.js +0 -0
  1526. /package/dist/{form → src/form}/InputToggle.js +0 -0
  1527. /package/dist/{form → src/form}/InputToggleIcon.js +0 -0
  1528. /package/dist/{form → src/form}/Label.js +0 -0
  1529. /package/dist/{form → src/form}/Legend.js +0 -0
  1530. /package/dist/{form → src/form}/MenuItemCheckbox.js +0 -0
  1531. /package/dist/{form → src/form}/MenuItemFileInput.js +0 -0
  1532. /package/dist/{form → src/form}/MenuItemInputToggle.js +0 -0
  1533. /package/dist/{form → src/form}/MenuItemRadio.js +0 -0
  1534. /package/dist/{form → src/form}/MenuItemSwitch.js +0 -0
  1535. /package/dist/{form → src/form}/MenuItemTextField.js +0 -0
  1536. /package/dist/{form → src/form}/NativeSelect.js +0 -0
  1537. /package/dist/{form → src/form}/OptGroup.js +0 -0
  1538. /package/dist/{form → src/form}/Option.js +0 -0
  1539. /package/dist/{form → src/form}/Password.js +0 -0
  1540. /package/dist/{form → src/form}/Radio.js +0 -0
  1541. /package/dist/{form → src/form}/SelectValue.js +0 -0
  1542. /package/dist/{form → src/form}/Slider.js +0 -0
  1543. /package/dist/{form → src/form}/SliderContainer.js +0 -0
  1544. /package/dist/{form → src/form}/SliderMark.js +0 -0
  1545. /package/dist/{form → src/form}/SliderMarkLabel.js +0 -0
  1546. /package/dist/{form → src/form}/SliderThumb.js +0 -0
  1547. /package/dist/{form → src/form}/SliderTrack.js +0 -0
  1548. /package/dist/{form → src/form}/SliderValueMarks.js +0 -0
  1549. /package/dist/{form → src/form}/SliderValueTooltip.js +0 -0
  1550. /package/dist/{form → src/form}/Switch.js +0 -0
  1551. /package/dist/{form → src/form}/SwitchTrack.js +0 -0
  1552. /package/dist/{form → src/form}/TextArea.js +0 -0
  1553. /package/dist/{form → src/form}/TextField.js +0 -0
  1554. /package/dist/{form → src/form}/TextFieldAddon.js +0 -0
  1555. /package/dist/{form → src/form}/TextFieldContainer.js +0 -0
  1556. /package/dist/{form → src/form}/TextFieldContainerStyles.js +0 -0
  1557. /package/dist/{form → src/form}/fileUtils.js +0 -0
  1558. /package/dist/{form → src/form}/formConfig.js +0 -0
  1559. /package/dist/{form → src/form}/formMessageStyles.js +0 -0
  1560. /package/dist/{form → src/form}/inputToggleStyles.js +0 -0
  1561. /package/dist/{form → src/form}/nativeSelectStyles.js +0 -0
  1562. /package/dist/{form → src/form}/optionStyles.js +0 -0
  1563. /package/dist/{form → src/form}/passwordStyles.js +0 -0
  1564. /package/dist/{form → src/form}/selectStyles.js +0 -0
  1565. /package/dist/{form → src/form}/selectUtils.js +0 -0
  1566. /package/dist/{form → src/form}/sliderUtils.js +0 -0
  1567. /package/dist/{form → src/form}/switchStyles.js +0 -0
  1568. /package/dist/{form → src/form}/textAreaStyles.js +0 -0
  1569. /package/dist/{form → src/form}/textFieldStyles.js +0 -0
  1570. /package/dist/{form → src/form}/types.js +0 -0
  1571. /package/dist/{form → src/form}/useCheckboxGroup.js +0 -0
  1572. /package/dist/{form → src/form}/useFileUpload.js +0 -0
  1573. /package/dist/{form → src/form}/useListboxProvider.js +0 -0
  1574. /package/dist/{form → src/form}/useNumberField.js +0 -0
  1575. /package/dist/{form → src/form}/useRadioGroup.js +0 -0
  1576. /package/dist/{form → src/form}/useRangeSlider.js +0 -0
  1577. /package/dist/{form → src/form}/useResizingTextArea.js +0 -0
  1578. /package/dist/{form → src/form}/useSlider.js +0 -0
  1579. /package/dist/{form → src/form}/useTextField.js +0 -0
  1580. /package/dist/{form → src/form}/utils.js +0 -0
  1581. /package/dist/{form → src/form}/validation.js +0 -0
  1582. /package/dist/{hoverMode → src/hoverMode}/useHoverMode.js +0 -0
  1583. /package/dist/{hoverMode → src/hoverMode}/useHoverModeProvider.js +0 -0
  1584. /package/dist/{icon → src/icon}/FontIcon.js +0 -0
  1585. /package/dist/{icon → src/icon}/MaterialIcon.js +0 -0
  1586. /package/dist/{icon → src/icon}/MaterialSymbol.js +0 -0
  1587. /package/dist/{icon → src/icon}/SVGIcon.js +0 -0
  1588. /package/dist/{icon → src/icon}/TextIconSpacing.js +0 -0
  1589. /package/dist/{icon → src/icon}/iconConfig.js +0 -0
  1590. /package/dist/{icon → src/icon}/material.js +0 -0
  1591. /package/dist/{icon → src/icon}/materialConfig.js +0 -0
  1592. /package/dist/{icon → src/icon}/styles.js +0 -0
  1593. /package/dist/{interaction → src/interaction}/Ripple.js +0 -0
  1594. /package/dist/{interaction → src/interaction}/RippleContainer.js +0 -0
  1595. /package/dist/{interaction → src/interaction}/UserInteractionModeProvider.js +0 -0
  1596. /package/dist/{interaction → src/interaction}/config.js +0 -0
  1597. /package/dist/{interaction → src/interaction}/types.js +0 -0
  1598. /package/dist/{interaction → src/interaction}/useElementInteraction.js +0 -0
  1599. /package/dist/{interaction → src/interaction}/useHigherContrastChildren.js +0 -0
  1600. /package/dist/{interaction → src/interaction}/utils.js +0 -0
  1601. /package/dist/{layout → src/layout}/LayoutAppBar.js +0 -0
  1602. /package/dist/{layout → src/layout}/LayoutNav.js +0 -0
  1603. /package/dist/{layout → src/layout}/LayoutWindowSplitter.js +0 -0
  1604. /package/dist/{layout → src/layout}/Main.js +0 -0
  1605. /package/dist/{layout → src/layout}/layoutNavStyles.js +0 -0
  1606. /package/dist/{layout → src/layout}/layoutWindowSplitterStyles.js +0 -0
  1607. /package/dist/{layout → src/layout}/mainStyles.js +0 -0
  1608. /package/dist/{layout → src/layout}/useExpandableLayout.js +0 -0
  1609. /package/dist/{layout → src/layout}/useHorizontalLayoutTransition.js +0 -0
  1610. /package/dist/{layout → src/layout}/useLayoutTree.js +0 -0
  1611. /package/dist/{layout → src/layout}/useLayoutWindowSplitter.js +0 -0
  1612. /package/dist/{layout → src/layout}/useMainTabIndex.js +0 -0
  1613. /package/dist/{layout → src/layout}/useResizableLayout.js +0 -0
  1614. /package/dist/{layout → src/layout}/useTemporaryLayout.js +0 -0
  1615. /package/dist/{link → src/link}/Link.js +0 -0
  1616. /package/dist/{link → src/link}/SkipToMainContent.js +0 -0
  1617. /package/dist/{link → src/link}/styles.js +0 -0
  1618. /package/dist/{list → src/list}/List.js +0 -0
  1619. /package/dist/{list → src/list}/ListItemText.js +0 -0
  1620. /package/dist/{list → src/list}/ListSubheader.js +0 -0
  1621. /package/dist/{list → src/list}/types.js +0 -0
  1622. /package/dist/{media-queries → src/media-queries}/AppSizeProvider.js +0 -0
  1623. /package/dist/{media-queries → src/media-queries}/appSize.js +0 -0
  1624. /package/dist/{media-queries → src/media-queries}/useMediaQuery.js +0 -0
  1625. /package/dist/{menu → src/menu}/DropdownMenu.js +0 -0
  1626. /package/dist/{menu → src/menu}/Menu.js +0 -0
  1627. /package/dist/{menu → src/menu}/MenuBar.js +0 -0
  1628. /package/dist/{menu → src/menu}/MenuButton.js +0 -0
  1629. /package/dist/{menu → src/menu}/MenuConfigurationProvider.js +0 -0
  1630. /package/dist/{menu → src/menu}/MenuItem.js +0 -0
  1631. /package/dist/{menu → src/menu}/MenuItemButton.js +0 -0
  1632. /package/dist/{menu → src/menu}/MenuItemGroup.js +0 -0
  1633. /package/dist/{menu → src/menu}/MenuItemSeparator.js +0 -0
  1634. /package/dist/{menu → src/menu}/MenuSheet.js +0 -0
  1635. /package/dist/{menu → src/menu}/MenuVisibilityProvider.js +0 -0
  1636. /package/dist/{menu → src/menu}/MenuWidget.js +0 -0
  1637. /package/dist/{menu → src/menu}/MenuWidgetKeyboardProvider.js +0 -0
  1638. /package/dist/{menu → src/menu}/useContextMenu.js +0 -0
  1639. /package/dist/{menu → src/menu}/useMenuBarProvider.js +0 -0
  1640. /package/dist/{menu → src/menu}/utils.js +0 -0
  1641. /package/dist/{movement → src/movement}/constants.js +0 -0
  1642. /package/dist/{movement → src/movement}/findMatchIndex.js +0 -0
  1643. /package/dist/{movement → src/movement}/types.js +0 -0
  1644. /package/dist/{movement → src/movement}/useKeyboardMovementProvider.js +0 -0
  1645. /package/dist/{movement → src/movement}/utils.js +0 -0
  1646. /package/dist/{overlay → src/overlay}/Overlay.js +0 -0
  1647. /package/dist/{overlay → src/overlay}/overlayStyles.js +0 -0
  1648. /package/dist/{portal → src/portal}/Portal.js +0 -0
  1649. /package/dist/{positioning → src/positioning}/constants.js +0 -0
  1650. /package/dist/{positioning → src/positioning}/createHorizontalPosition.js +0 -0
  1651. /package/dist/{positioning → src/positioning}/createVerticalPosition.js +0 -0
  1652. /package/dist/{positioning → src/positioning}/getFixedPosition.js +0 -0
  1653. /package/dist/{positioning → src/positioning}/types.js +0 -0
  1654. /package/dist/{positioning → src/positioning}/useFixedPositioning.js +0 -0
  1655. /package/dist/{positioning → src/positioning}/utils.js +0 -0
  1656. /package/dist/{progress → src/progress}/CircularProgress.js +0 -0
  1657. /package/dist/{progress → src/progress}/LinearProgress.js +0 -0
  1658. /package/dist/{progress → src/progress}/getProgressA11y.js +0 -0
  1659. /package/dist/{progress → src/progress}/types.js +0 -0
  1660. /package/dist/{responsive-item → src/responsive-item}/ResponsiveItemContainer.js +0 -0
  1661. /package/dist/{responsive-item → src/responsive-item}/ResponsiveItemOverlay.js +0 -0
  1662. /package/dist/{responsive-item → src/responsive-item}/styles.js +0 -0
  1663. /package/dist/{scroll → src/scroll}/ScrollLock.js +0 -0
  1664. /package/dist/{scroll → src/scroll}/getScrollbarWidth.js +0 -0
  1665. /package/dist/{scroll → src/scroll}/useScrollLock.js +0 -0
  1666. /package/dist/{segmented-button → src/segmented-button}/SegmentedButton.js +0 -0
  1667. /package/dist/{segmented-button → src/segmented-button}/SegmentedButtonContainer.js +0 -0
  1668. /package/dist/{segmented-button → src/segmented-button}/segmentedButtonContainerStyles.js +0 -0
  1669. /package/dist/{segmented-button → src/segmented-button}/segmentedButtonStyles.js +0 -0
  1670. /package/dist/{sheet → src/sheet}/Sheet.js +0 -0
  1671. /package/dist/{sheet → src/sheet}/styles.js +0 -0
  1672. /package/dist/{snackbar → src/snackbar}/DefaultToastRenderer.js +0 -0
  1673. /package/dist/{snackbar → src/snackbar}/Snackbar.js +0 -0
  1674. /package/dist/{snackbar → src/snackbar}/Toast.js +0 -0
  1675. /package/dist/{snackbar → src/snackbar}/ToastActionButton.js +0 -0
  1676. /package/dist/{snackbar → src/snackbar}/ToastCloseButton.js +0 -0
  1677. /package/dist/{snackbar → src/snackbar}/ToastContent.js +0 -0
  1678. /package/dist/{snackbar → src/snackbar}/ToastManager.js +0 -0
  1679. /package/dist/{snackbar → src/snackbar}/ToastManagerProvider.js +0 -0
  1680. /package/dist/{snackbar → src/snackbar}/snackbarStyles.js +0 -0
  1681. /package/dist/{snackbar → src/snackbar}/toastContentStyles.js +0 -0
  1682. /package/dist/{snackbar → src/snackbar}/toastStyles.js +0 -0
  1683. /package/dist/{snackbar → src/snackbar}/useCurrentToastActions.js +0 -0
  1684. /package/dist/{suspense → src/suspense}/CircularProgressSuspense.js +0 -0
  1685. /package/dist/{suspense → src/suspense}/NullSuspense.js +0 -0
  1686. /package/dist/{table → src/table}/Table.js +0 -0
  1687. /package/dist/{table → src/table}/TableBody.js +0 -0
  1688. /package/dist/{table → src/table}/TableCell.js +0 -0
  1689. /package/dist/{table → src/table}/TableCellContent.js +0 -0
  1690. /package/dist/{table → src/table}/TableConfigurationProvider.js +0 -0
  1691. /package/dist/{table → src/table}/TableContainer.js +0 -0
  1692. /package/dist/{table → src/table}/TableContainerProvider.js +0 -0
  1693. /package/dist/{table → src/table}/TableFooter.js +0 -0
  1694. /package/dist/{table → src/table}/TableHeader.js +0 -0
  1695. /package/dist/{table → src/table}/TableRow.js +0 -0
  1696. /package/dist/{table → src/table}/tableCellStyles.js +0 -0
  1697. /package/dist/{table → src/table}/tableContainerStyles.js +0 -0
  1698. /package/dist/{table → src/table}/tableFooterStyles.js +0 -0
  1699. /package/dist/{table → src/table}/tableHeaderStyles.js +0 -0
  1700. /package/dist/{table → src/table}/tableRowStyles.js +0 -0
  1701. /package/dist/{table → src/table}/tableStyles.js +0 -0
  1702. /package/dist/{table → src/table}/types.js +0 -0
  1703. /package/dist/{tabs → src/tabs}/TabList.js +0 -0
  1704. /package/dist/{tabs → src/tabs}/TabListScrollButton.js +0 -0
  1705. /package/dist/{tabs → src/tabs}/tabListScrollButtonStyles.js +0 -0
  1706. /package/dist/{tabs → src/tabs}/useTabs.js +0 -0
  1707. /package/dist/{tabs → src/tabs}/utils.js +0 -0
  1708. /package/dist/{test-utils → src/test-utils}/IntersectionObserver.js +0 -0
  1709. /package/dist/{test-utils → src/test-utils}/ResizeObserver.js +0 -0
  1710. /package/dist/{test-utils → src/test-utils}/data-testid.js +0 -0
  1711. /package/dist/{test-utils → src/test-utils}/index.js +0 -0
  1712. /package/dist/{test-utils → src/test-utils}/jest-setup.js +0 -0
  1713. /package/dist/{test-utils → src/test-utils}/matchMedia.js +0 -0
  1714. /package/dist/{test-utils → src/test-utils}/polyfills/IntersectionObserver.js +0 -0
  1715. /package/dist/{test-utils → src/test-utils}/polyfills/ResizeObserver.js +0 -0
  1716. /package/dist/{test-utils → src/test-utils}/polyfills/index.js +0 -0
  1717. /package/dist/{test-utils → src/test-utils}/polyfills/matchMedia.js +0 -0
  1718. /package/dist/{test-utils → src/test-utils}/polyfills/offsetParent.js +0 -0
  1719. /package/dist/{test-utils → src/test-utils}/polyfills/scrollIntoView.js +0 -0
  1720. /package/dist/{test-utils → src/test-utils}/render.js +0 -0
  1721. /package/dist/{test-utils → src/test-utils}/timers.js +0 -0
  1722. /package/dist/{theme → src/theme}/LocalStorageColorSchemeProvider.js +0 -0
  1723. /package/dist/{theme → src/theme}/ThemeProvider.js +0 -0
  1724. /package/dist/{theme → src/theme}/colors.js +0 -0
  1725. /package/dist/{theme → src/theme}/cssVars.js +0 -0
  1726. /package/dist/{theme → src/theme}/types.js +0 -0
  1727. /package/dist/{theme → src/theme}/useCSSVariables.js +0 -0
  1728. /package/dist/{theme → src/theme}/useColorScheme.js +0 -0
  1729. /package/dist/{theme → src/theme}/useColorSchemeMetaTag.js +0 -0
  1730. /package/dist/{theme → src/theme}/useColorSchemeProvider.js +0 -0
  1731. /package/dist/{theme → src/theme}/usePrefersColorScheme.js +0 -0
  1732. /package/dist/{theme → src/theme}/utils.js +0 -0
  1733. /package/dist/{tooltip → src/tooltip}/Tooltip.js +0 -0
  1734. /package/dist/{tooltip → src/tooltip}/TooltipHoverModeProvider.js +0 -0
  1735. /package/dist/{tooltip → src/tooltip}/constants.js +0 -0
  1736. /package/dist/{tooltip → src/tooltip}/tooltipStyles.js +0 -0
  1737. /package/dist/{tooltip → src/tooltip}/useTooltip.js +0 -0
  1738. /package/dist/{tooltip → src/tooltip}/useTooltipPosition.js +0 -0
  1739. /package/dist/{tooltip → src/tooltip}/utils.js +0 -0
  1740. /package/dist/{transition → src/transition}/CSSTransition.js +0 -0
  1741. /package/dist/{transition → src/transition}/Collapse.js +0 -0
  1742. /package/dist/{transition → src/transition}/CrossFade.js +0 -0
  1743. /package/dist/{transition → src/transition}/ScaleTransition.js +0 -0
  1744. /package/dist/{transition → src/transition}/Slide.js +0 -0
  1745. /package/dist/{transition → src/transition}/SlideContainer.js +0 -0
  1746. /package/dist/{transition → src/transition}/collapseStyles.js +0 -0
  1747. /package/dist/{transition → src/transition}/config.js +0 -0
  1748. /package/dist/{transition → src/transition}/maxWidthTransition.js +0 -0
  1749. /package/dist/{transition → src/transition}/types.js +0 -0
  1750. /package/dist/{transition → src/transition}/useCSSTransition.js +0 -0
  1751. /package/dist/{transition → src/transition}/useCarousel.js +0 -0
  1752. /package/dist/{transition → src/transition}/useCollapseTransition.js +0 -0
  1753. /package/dist/{transition → src/transition}/useCrossFadeTransition.js +0 -0
  1754. /package/dist/{transition → src/transition}/useMaxWidthTransition.js +0 -0
  1755. /package/dist/{transition → src/transition}/useScaleTransition.js +0 -0
  1756. /package/dist/{transition → src/transition}/useSlideTransition.js +0 -0
  1757. /package/dist/{transition → src/transition}/useTransition.js +0 -0
  1758. /package/dist/{transition → src/transition}/utils.js +0 -0
  1759. /package/dist/{tree → src/tree}/DefaultTreeItemRenderer.js +0 -0
  1760. /package/dist/{tree → src/tree}/Tree.js +0 -0
  1761. /package/dist/{tree → src/tree}/TreeGroup.js +0 -0
  1762. /package/dist/{tree → src/tree}/TreeItemExpander.js +0 -0
  1763. /package/dist/{tree → src/tree}/TreeProvider.js +0 -0
  1764. /package/dist/{tree → src/tree}/types.js +0 -0
  1765. /package/dist/{tree → src/tree}/useTree.js +0 -0
  1766. /package/dist/{tree → src/tree}/useTreeExpansion.js +0 -0
  1767. /package/dist/{tree → src/tree}/useTreeItems.js +0 -0
  1768. /package/dist/{tree → src/tree}/useTreeMovement.js +0 -0
  1769. /package/dist/{tree → src/tree}/useTreeSelection.js +0 -0
  1770. /package/dist/{tree → src/tree}/utils.js +0 -0
  1771. /package/dist/{typography → src/typography}/SrOnly.js +0 -0
  1772. /package/dist/{typography → src/typography}/TextContainer.js +0 -0
  1773. /package/dist/{typography → src/typography}/Typography.js +0 -0
  1774. /package/dist/{typography → src/typography}/WritingDirectionProvider.js +0 -0
  1775. /package/dist/{useAsyncAction.js → src/useAsyncAction.js} +0 -0
  1776. /package/dist/{useDebouncedFunction.js → src/useDebouncedFunction.js} +0 -0
  1777. /package/dist/{useDropzone.js → src/useDropzone.js} +0 -0
  1778. /package/dist/{useEnsuredId.js → src/useEnsuredId.js} +0 -0
  1779. /package/dist/{useEnsuredRef.js → src/useEnsuredRef.js} +0 -0
  1780. /package/dist/{useEnsuredState.js → src/useEnsuredState.js} +0 -0
  1781. /package/dist/{useHtmlClassName.js → src/useHtmlClassName.js} +0 -0
  1782. /package/dist/{useIntersectionObserver.js → src/useIntersectionObserver.js} +0 -0
  1783. /package/dist/{useIsomorphicLayoutEffect.js → src/useIsomorphicLayoutEffect.js} +0 -0
  1784. /package/dist/{useLocalStorage.js → src/useLocalStorage.js} +0 -0
  1785. /package/dist/{useOrientation.js → src/useOrientation.js} +0 -0
  1786. /package/dist/{usePageInactive.js → src/usePageInactive.js} +0 -0
  1787. /package/dist/{useThrottledFunction.js → src/useThrottledFunction.js} +0 -0
  1788. /package/dist/{useToggle.js → src/useToggle.js} +0 -0
  1789. /package/dist/{useUnmounted.js → src/useUnmounted.js} +0 -0
  1790. /package/dist/{utils → src/utils}/RenderRecursively.js +0 -0
  1791. /package/dist/{utils → src/utils}/alphaNumericSort.js +0 -0
  1792. /package/dist/{utils → src/utils}/applyRef.js +0 -0
  1793. /package/dist/{utils → src/utils}/bem.js +0 -0
  1794. /package/dist/{utils → src/utils}/filters.js +0 -0
  1795. /package/dist/{utils → src/utils}/getClientPosition.js +0 -0
  1796. /package/dist/{utils → src/utils}/getPercentage.js +0 -0
  1797. /package/dist/{utils → src/utils}/identity.js +0 -0
  1798. /package/dist/{utils → src/utils}/isElementVisible.js +0 -0
  1799. /package/dist/{utils → src/utils}/loop.js +0 -0
  1800. /package/dist/{utils → src/utils}/parseCssLengthUnit.js +0 -0
  1801. /package/dist/{utils → src/utils}/randomInt.js +0 -0
  1802. /package/dist/{utils → src/utils}/wait.js +0 -0
  1803. /package/dist/{utils → src/utils}/withinRange.js +0 -0
  1804. /package/dist/{window-splitter → src/window-splitter}/WindowSplitter.js +0 -0
@@ -1 +0,0 @@
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","aria-labelledby","aria-hidden","type","position","visible"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,EACVC,SAAS,EACTC,QAAQ,QAIH,QAAQ;AACf,SAASC,sBAAsB,QAAQ,gDAAgD;AAGvF,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SAASC,kBAAkB,QAAQ,0BAA0B;AAG7D,MAAMC,SAASF,IAAI;AAEnB,MAAMG,OAAO;AACX,aAAa;AACf;AAiBA;;;CAGC,GACD,SAASC,YAAYC,OAAoC;IACvD,MAAM,EAAEC,SAAS,EAAEC,IAAI,EAAEC,KAAK,EAAEC,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,QAAQ,EAAE,GACnEP;IAEF,MAAMQ,gBAAgBL,UAAU;IAChC,OAAOb,IACLO,OAAO;QACLY,GAAG,CAACF;QACJG,IAAI,CAACH,YAAY,CAACC;QAClBG,IAAI,CAACJ,YAAYC;QACjBI,GAAGL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O,OAAO;wBACvDE,gBAAgB;oBAClB;gBACF;;0BAEF,KAACoB;gBACCC,cAAY5B;gBACZ6B,mBAAiB5B;gBACjB6B,aAAW;gBACXlD,IAAI,CAAC,EAAEA,GAAG,MAAM,CAAC;gBACjBmD,MAAK;gBACLhD,MAAMA;gBACNF,KAAKA;gBACLC,KAAKA;gBACLK,MAAMA;gBACNH,OAAOA;gBACPK,UAAU,CAAC;gBACXJ,UAAUA;gBACVtB,WAAWJ,OAAO;;YAEnB6B,0BACC,KAAC9B;gBACC0E,UAAU/D,WAAW,SAAS;gBAC9BA,UAAUA;gBACVF,SAAS,CAAC8B,yBAAyB,CAAC/B;gBACpCmE,SACEnC,sBAAsB,YACtBhC,UACA0C,mBACAF;gBAED,GAAGZ,YAAY;gBACf,GAAGC,gBAAgBX,OAAOkB,aAAa;gBACxCrC,OAAOA;0BAEN+B,mBAAmBZ,OAAOkB;;;;AAKrC,GAAG"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/form/SliderTrack.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"}
@@ -1 +0,0 @@
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;AACnC,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SACEC,eAAe,QAEV,uBAAuB;AA2H9B;;;;;CAKC,GACD,OAAO,SAASC,iBAAiBC,KAA4B;IAC3D,MAAM,EACJC,GAAG,EACHC,GAAG,EACHC,IAAI,EACJC,OAAOC,SAAS,EAChBC,QAAQ,EACRC,WAAW,EACXC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,iBAAiB,EAClB,GAAGX;IAEJ,IAAII;IACJ,IAAI,OAAOC,cAAc,WAAW;QAClC,MAAMO,QAAQhB,cAAc;YAAEK;YAAKC;YAAKC;QAAK,KAAK;QAClDC,QAAQS,MAAMC,IAAI,CAAC;YAAEC,QAAQH;QAAM,GAAG,CAACI,GAAGC,IAAO,CAAA;gBAC/CC,OAAOjB,MAAMgB,IAAId;YACnB,CAAA;IACF,OAAO;QACLC,QAAQC;IACV;IAEA,qBACE;kBACGD,MAAMe,GAAG,CAAC,CAAC,EAAED,KAAK,EAAEE,OAAOC,SAAS,EAAE;YACrC,sEAAsE;YACtE,oEAAoE;YACpE,IAAIC;YACJ,IAAIC,aAAa5B,cAAc;gBAAEM;gBAAKC;gBAAKgB;YAAM,KAAK;YACtD,IAAIM,YAAYN;YAChB,IAAIZ,UAAU;gBACZ,qEAAqE;gBACrE,sDAAsD;gBACtDiB,aAAa,MAAMA;gBAEnB,kEAAkE;gBAClE,QAAQ;gBACRC,YAAYtB,MAAMgB;YACpB;YAEA,IAAIT,eAAe;gBACjBa,SAASE,YAAYjB,eAAeiB,YAAYhB;YAClD,OAAO;gBACLc,SAASE,YAAYjB;YACvB;YAEA,MAAMkB,SAAS,CAAC,EAAEF,WAAW,CAAC,CAAC;YAC/B,MAAMG,YAAYhB,aAAa;gBAAEQ;gBAAOI;gBAAQG;YAAO;YACvD,MAAME,aAAahB,kBAAkB;gBAAEO;gBAAOI;gBAAQG;YAAO;YAC7D,MAAML,QAAQC,aAAaM,YAAYC,YAAY;YAEnD,qBACE,MAAClC;;kCACC,KAACG;wBACE,GAAG6B,SAAS;wBACbD,QAAQA;wBACRH,QAAQA;wBACRhB,UAAUA;;oBAEXc,UAAU,sBACT,KAACtB;wBACE,GAAG6B,UAAU;wBACdF,QAAQA;wBACRnB,UAAUA;kCAETc;;;eAbQF;QAkBnB;;AAGN"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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;AAC/C,SAASC,YAAY,QAAQ,oBAAoB;AAyBjD;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BC,GACD,OAAO,MAAMC,uBAASN,WACpB,SAASM,OAAOC,KAAK,EAAEC,GAAG;IACxB,MAAM,EACJC,IAAIC,MAAM,EACVC,KAAK,EACLC,UAAU,EACVC,KAAK,EACLC,SAAS,EACTC,cAAc,EACdC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,SAAS,EACTC,UAAU,EACVC,UAAU,EACVC,cAAc,EACdC,YAAY,EACZC,qBAAqB,EACrBC,kBAAkB,KAAK,EACvBC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,YAAY,KAAK,EACjBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChB,GAAGC,WACJ,GAAGzB;IACJ,MAAME,KAAKR,aAAaS,QAAQ;IAEhC,qBACE,KAACR;QACE,GAAGsB,qBAAqB;QACzBD,cAAcA;kBAEd,cAAA,MAACpB;YACCU,OAAOA;YACN,GAAGD,UAAU;YACdE,WAAWf,IAAIe,WAAWF,YAAYE;YACtCmB,KAAK,CAACR;YACNG,SAASA;YACTM,UAAU,CAACL;YACXF,QAAQA;YACRD,OAAOA;YACPI,UAAUA;;gBAETnB;8BACD,KAACwB;oBACE,GAAGpB,cAAc;oBAClBD,WAAWT,aAAa;wBACtB+B,WAAW,CAACN,YAAY,CAACC;wBACzBjB,WAAWC,gBAAgBD;wBAC3BuB,cAAcV,UAAUD;oBAC1B;8BAEA,cAAA,KAACtB;wBACCS,OAAOQ;wBACN,GAAGD,UAAU;wBACdN,WAAWf,IAAIuB,gBAAgBF,YAAYN;wBAC3CgB,UAAUA;wBACVX,WAAWA;wBACXH,WAAWA;wBACXC,WAAWA;wBACXC,eAAeA;kCAEf,cAAA,KAACoB;4BACE,GAAGN,SAAS;4BACbvB,IAAIA;4BACJD,KAAKA;4BACL+B,MAAK;4BACLC,MAAK;4BACL1B,WAAWf,IACT,sCACA+B,YAAY;4BAEdA,UAAUA;;;;;;;AAOxB,GACA"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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,KAAK,EAAEC,GAAG;IAC1B,MAAM,EACJC,IAAIC,MAAM,EACVC,KAAK,EACLC,SAAS,EACTC,KAAK,EACLC,UAAU,EACVC,UAAU,EACVC,cAAc,EACdC,SAAS,EACTC,aAAa,EACbC,oBAAoB,EACpBC,SAAS,MAAM,EACfC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,QAAQC,aAAa,KAAK,EAC1BC,UAAU,KAAK,EACfC,SAAS,EACTC,UAAU,EACVC,yBAAyB,KAAK,EAC9BC,0BAA0B,KAAK,EAC/BC,OAAOC,SAAS,EAChBC,oBAAoBC,sBAAsB,EAC1CC,YAAY,EACZC,qBAAqB,EACrBC,OAAO,CAAC,EACRC,UAAU,CAAC,CAAC,EACZC,UAAUC,YAAY,EACtBC,oBAAoB,KAAK,EACzB,GAAGC,WACJ,GAAGnC;IACJ,MAAM,EAAEoC,WAAW,KAAK,EAAEC,WAAW,KAAK,EAAEC,KAAK,EAAEC,YAAY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ChBD,KAAK0C;oBACLJ,cAAcD,SAASC;oBACvBF,QAAQ;oBACRmB,UAAU,CAAC;oBACX1B,MAAMA;oBACN1B,OAAOM;oBACPL,WAAWT,SAAS;wBAClB6D,MAAM;wBACN5C;wBACAR,WAAWM;oBACb;;;;IAIR;IAEA,qBACE,KAACnB;QACE,GAAGqC,qBAAqB;QACzBD,cAAcA;kBAEd,cAAA,KAAClC;YACCO,KAAKyC;YACLtC,OAAO;gBACL,GAAGA,KAAK;gBACR,yBAAyBwC;YAC3B;YACAvC,WAAWR,kBAAkB;gBAC3B6D,SAAS,CAACxB,qBAAqBrB,UAAU;gBACzCuB;gBACAQ,QAAQ,CAAC,CAACA;gBACVe,mBACE,CAAC,CAACrD,SAAUkB,CAAAA,UAAU,eAAeA,UAAU,QAAO;gBACxDnB;YACF;YACAmB,OAAOA;YACPlB,OAAO,CAAC,CAACA;YACTS,OAAOA;YACPD,OAAOA;YACPG,QAAQA;YACRD,QAAQA;YACRG,SAASA;YACTkB,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"}
@@ -1 +0,0 @@
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,EACj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nBO,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"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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;QA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AO,SAAS8C,YAAY7B,IAAU;IACpC,OAAO,uCAAuCE,IAAI,CAACF,KAAKjB,IAAI;AAC9D;AAEA;;;;;;;;;;;CAWC,GACD,OAAO,SAAS+C,YAAY9B,IAAU;IACpC,OAAO,6BAA6BE,IAAI,CAACF,KAAKjB,IAAI;AACpD;AAEA;;;;;;;;;;;CAWC,GACD,OAAO,SAASgD,YAAY/B,IAAU;IACpC,OAAO,uCAAuCE,IAAI,CAACF,KAAKjB,IAAI;AAC9D;AAEA;;;;;;;CAOC,GACD,OAAO,SAASiD,YAAYhC,IAAU;IACpC,OAAO6B,YAAY7B,SAAS8B,YAAY9B,SAAS+B,YAAY/B;AAC/D;AA2CA;;;;;;;;;CASC,GACD,OAAO,MAAMiC,gBAA+B,CAACjC;IAC3C,IAAIgC,YAAYhC,OAAO;QACrB,OAAO;IACT;IAEA,IAAI4B,WAAW5B,OAAO;QACpB,OAAO;IACT;IAEA,OAAO;AACT,EAAE;AASF;;;;;;;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"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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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ACF;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/form/sliderUtils.ts"],"sourcesContent":["import { type RefObject } from \"react\";\nimport {\n type DraggableEventHandlers,\n type DraggableImplementation,\n type DraggableMouseEventHandlers,\n type DraggableTouchEventHandlers,\n} from \"../draggable/useDraggable.js\";\nimport { type RenameKeysWithPrefix } from \"../types.js\";\nimport {\n getClientPosition,\n type ClientPositionEvent,\n} from \"../utils/getClientPosition.js\";\nimport { getPercentage } from \"../utils/getPercentage.js\";\nimport { getRangeSteps } from \"../utils/getRangeSteps.js\";\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\ninterface JumpOptions {\n min: number;\n max: number;\n step: number;\n jump: number | undefined;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\nexport const getJumpValue = (options: JumpOptions): number => {\n const { min, max, step, jump } = options;\n\n const steps = getRangeSteps({ min, max, step });\n const value = jump ?? (steps / 10) * step;\n if (Number.isInteger(step)) {\n return Math.ceil(value);\n }\n\n return value;\n};\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\ntype RequiredThumbProps = Pick<\n DraggableImplementation<HTMLElement>,\n | \"dragging\"\n | keyof DraggableMouseEventHandlers<HTMLElement>\n | keyof DraggableTouchEventHandlers<HTMLElement>\n> & { ref: RefObject<HTMLSpanElement> };\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\nexport type ClosestThumbEventHandlersOptions = RenameKeysWithPrefix<\n RequiredThumbProps,\n \"thumb1\"\n> &\n RenameKeysWithPrefix<RequiredThumbProps, \"thumb2\"> & {\n vertical: boolean;\n isRangeSlider: boolean;\n };\n\n/**\n * NOTE: I do not need the mousemove events for this one to work.\n *\n * @remarks \\@since 6.0.0\n * @internal\n */\nexport const getClosestThumbEventHandlers = (\n options: ClosestThumbEventHandlersOptions\n): DraggableEventHandlers<HTMLElement> => {\n const {\n thumb1Ref,\n thumb1Dragging,\n thumb1OnMouseUp,\n thumb1OnMouseDown,\n thumb1OnTouchStart,\n thumb1OnTouchMove,\n thumb2Ref,\n thumb2Dragging,\n thumb2OnMouseUp,\n thumb2OnMouseDown,\n thumb2OnTouchStart,\n thumb2OnTouchMove,\n isRangeSlider,\n vertical,\n } = options;\n\n if (!isRangeSlider) {\n return {\n onMouseDown: thumb1OnMouseDown,\n onMouseUp: thumb1OnMouseUp,\n onTouchStart: thumb1OnTouchStart,\n onTouchMove: thumb1OnTouchMove,\n };\n }\n\n const isThumbOneClosest = (event: ClientPositionEvent): boolean => {\n if (thumb2Dragging) {\n return false;\n }\n\n const thumb1 = thumb1Ref.current;\n const thumb2 = thumb2Ref.current;\n if (!thumb1Dragging && thumb1 && thumb2) {\n const clientPosition = getClientPosition({ event, vertical });\n const thumb1Rect = thumb1.getBoundingClientRect();\n const thumb2Rect = thumb2.getBoundingClientRect();\n const thumb1Position = vertical ? thumb1Rect.y : thumb1Rect.x;\n const thumb2Position = vertical ? thumb2Rect.y : thumb2Rect.x;\n\n return (\n Math.abs(clientPosition - thumb1Position) <\n Math.abs(clientPosition - thumb2Position)\n );\n }\n\n return true;\n };\n\n return {\n onMouseDown(event) {\n if (isThumbOneClosest(event)) {\n thumb1OnMouseDown(event);\n } else {\n thumb2OnMouseDown(event);\n }\n },\n onMouseUp(event) {\n if (isThumbOneClosest(event)) {\n thumb1OnMouseUp(event);\n } else {\n thumb2OnMouseUp(event);\n }\n },\n onTouchStart(event) {\n if (isThumbOneClosest(event)) {\n thumb1OnTouchStart(event);\n } else {\n thumb2OnTouchStart(event);\n }\n },\n onTouchMove(event) {\n if (isThumbOneClosest(event)) {\n thumb1OnTouchMove(event);\n } else {\n thumb2OnTouchMove(event);\n }\n },\n };\n};\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport function getThumbOffset(\n offset: number | undefined,\n fallback: number\n): string | undefined {\n if (typeof offset !== \"number\") {\n return;\n }\n\n // the `offset` will be NaN when there are no possible steps to take because\n // the first thumb is at the maximum value or the second thumb is at the\n // minimum value\n const value = Number.isNaN(offset) ? fallback : offset;\n return `${value * 100}%`;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\nexport interface ThumbOffsetsOptions {\n min: number;\n max: number;\n thumb1Value: number;\n thumb1Dragging: boolean;\n thumb1DragPercentage: number;\n thumb2Value: number;\n thumb2Dragging: boolean;\n thumb2DragPercentage: number;\n isRangeSlider: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\ninterface ThumbOffsets {\n \"--rmd-slider-offset-1\"?: string;\n \"--rmd-slider-offset-2\"?: string;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\nexport const getThumbOffsets = (options: ThumbOffsetsOptions): ThumbOffsets => {\n const {\n min,\n max,\n thumb1Value,\n thumb1Dragging,\n thumb1DragPercentage,\n thumb2Value,\n thumb2Dragging,\n thumb2DragPercentage,\n isRangeSlider,\n } = options;\n let thumb1Percentage = thumb1Dragging\n ? thumb1DragPercentage\n : getPercentage({ min, max, value: thumb1Value });\n\n let thumb2Percentage: number | undefined;\n if (isRangeSlider) {\n const percentage = getPercentage({ min, max, value: thumb2Value });\n\n thumb1Percentage = Math.min(thumb1Percentage, percentage);\n thumb2Percentage = thumb2Dragging\n ? Math.max(thumb1Percentage, thumb2DragPercentage)\n : percentage;\n }\n\n return {\n \"--rmd-slider-offset-1\": getThumbOffset(thumb1Percentage, 0),\n \"--rmd-slider-offset-2\": getThumbOffset(thumb2Percentage, 1),\n };\n};\n"],"names":["getClientPosition","getPercentage","getRangeSteps","getJumpValue","options","min","max","step","jump","steps","value","Number","isInteger","Math","ceil","getClosestThumbEventHandlers","thumb1Ref","thumb1Dragging","thumb1OnMouseUp","thumb1OnMouseDown","thumb1OnTouchStart","thumb1OnTouchMove","thumb2Ref","thumb2Dragging","thumb2OnMouseUp","thumb2OnMouseDown","thumb2OnTouchStart","thumb2OnTouchMove","isRangeSlider","vertical","onMouseDown","onMouseUp","onTouchStart","onTouchMove","isThumbOneClosest","event","thumb1","current","thumb2","clientPosition","thumb1Rect","getBoundingClientRect","thumb2Rect","thumb1Position","y","x","thumb2Position","abs","getThumbOffset","offset","fallback","isNaN","getThumbOffsets","thumb1Value","thumb1DragPercentage","thumb2Value","thumb2DragPercentage","thumb1Percentage","thumb2Percentage","percentage"],"mappings":"AAQA,SACEA,iBAAiB,QAEZ,gCAAgC;AACvC,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,aAAa,QAAQ,4BAA4B;AAa1D;;;CAGC,GACD,OAAO,MAAMC,eAAe,CAACC;IAC3B,MAAM,EAAEC,GAAG,EAAEC,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAE,GAAGJ;IAEjC,MAAMK,QAAQP,cAAc;QAAEG;QAAKC;QAAKC;IAAK;IAC7C,MAAMG,QAAQF,QAAQ,AAACC,QAAQ,KAAMF;IACrC,IAAII,OAAOC,SAAS,CAACL,OAAO;QAC1B,OAAOM,KAAKC,IAAI,CAACJ;IACnB;IAEA,OAAOA;AACT,EAAE;AA0BF;;;;;CAKC,GACD,OAAO,MAAMK,+BAA+B,CAC1CX;IAEA,MAAM,EACJY,SAAS,EACTC,cAAc,EACdC,eAAe,EACfC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,SAAS,EACTC,cAAc,EACdC,eAAe,EACfC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,aAAa,EACbC,QAAQ,EACT,GAAGzB;IAEJ,IAAI,CAACwB,eAAe;QAClB,OAAO;YACLE,aAAaX;YACbY,WAAWb;YACXc,cAAcZ;YACda,aAAaZ;QACf;IACF;IAEA,MAAMa,oBAAoB,CAACC;QACzB,IAAIZ,gBAAgB;YAClB,OAAO;QACT;QAEA,MAAMa,SAASpB,UAAUqB,OAAO;QAChC,MAAMC,SAAShB,UAAUe,OAAO;QAChC,IAAI,CAACpB,kBAAkBmB,UAAUE,QAAQ;YACvC,MAAMC,iBAAiBvC,kBAAkB;gBAAEmC;gBAAON;YAAS;YAC3D,MA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xB;IACJ,IAAIqD,mBAAmBxC,iBACnBqC,uBACArD,cAAc;QAAEI;QAAKC;QAAKI,OAAO2C;IAAY;IAEjD,IAAIK;IACJ,IAAI9B,eAAe;QACjB,MAAM+B,aAAa1D,cAAc;YAAEI;YAAKC;YAAKI,OAAO6C;QAAY;QAEhEE,mBAAmB5C,KAAKR,GAAG,CAACoD,kBAAkBE;QAC9CD,mBAAmBnC,iBACfV,KAAKP,GAAG,CAACmD,kBAAkBD,wBAC3BG;IACN;IAEA,OAAO;QACL,yBAAyBX,eAAeS,kBAAkB;QAC1D,yBAAyBT,eAAeU,kBAAkB;IAC5D;AACF,EAAE"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/form/switchStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-switch-track-background-color\"?: string;\n \"--rmd-switch-ball-background-color\"?: string;\n }\n}\n\nconst styles = bem(\"rmd-switch\");\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface SwitchClassNameOptions {\n className?: string;\n clickable?: boolean;\n currentColor?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function switchStyles(options: SwitchClassNameOptions = {}): string {\n const { className, clickable, currentColor } = options;\n\n return cnb(styles({ \"current-color\": currentColor, clickable }), className);\n}\n"],"names":["cnb","bem","styles","switchStyles","options","className","clickable","currentColor"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAStC,MAAMC,SAASD,IAAI;AAWnB;;CAEC,GACD,OAAO,SAASE,aAAaC,UAAkC,CAAC,CAAC;IAC/D,MAAM,EAAEC,SAAS,EAAEC,SAAS,EAAEC,YAAY,EAAE,GAAGH;IAE/C,OAAOJ,IAAIE,OAAO;QAAE,iBAAiBK;QAAcD;IAAU,IAAID;AACnE"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/form/textAreaStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\nimport {\n textField,\n type TextFieldClassNameOptions,\n} from \"./textFieldStyles.js\";\nimport { type TextAreaResize } from \"./useResizingTextArea.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-textarea-height\"?: string | number;\n \"--rmd-textarea-padding\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-textarea\");\nconst containerStyles = bem(\"rmd-textarea-container\");\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface TextareaClassNameOptions extends TextFieldClassNameOptions {\n className?: string;\n\n /**\n * This should not be used externally and is only used for creating the hidden\n * textarea mask for the auto resizing behavior.\n *\n * @defaultValue `false`\n */\n mask?: boolean;\n\n /**\n * @see {@link TextAreaResize}\n * @defaultValue `\"auto\"`\n */\n resize?: TextAreaResize;\n\n /**\n * Set this to `true` if the textarea should display a scrollbar.\n *\n * @defaultValue `false`\n */\n scrollable?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function textArea(options: TextareaClassNameOptions = {}): string {\n const {\n className,\n mask,\n resize = \"auto\",\n scrollable,\n placeholderHidden,\n } = options;\n\n return cnb(\n textField({ placeholderHidden }),\n styles({\n rh: resize === \"horizontal\",\n rv: resize === \"vertical\",\n rn: resize === \"auto\" || resize === \"none\",\n mask,\n scrollable: scrollable || resize === \"none\",\n }),\n className\n );\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface TextareaContainerClassNameOptions {\n className?: string;\n height?: boolean;\n disabled?: boolean;\n animate?: boolean;\n underlineLabelled?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function textAreaContainer(\n options: TextareaContainerClassNameOptions = {}\n): string {\n const { className, height, animate, disabled, underlineLabelled } = options;\n\n return cnb(\n containerStyles({\n height,\n animate,\n cursor: !disabled,\n \"underline-labelled\": underlineLabelled,\n }),\n className\n );\n}\n"],"names":["cnb","bem","textField","styles","containerStyles","textArea","options","className","mask","resize","scrollable","placeholderHidden","rh","rv","rn","textAreaContainer","height","animate","disabled","underlineLabelled","cursor"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SACEC,SAAS,QAEJ,uBAAuB;AAU9B,MAAMC,SAASF,IAAI;AACnB,MAAMG,kBAAkBH,IAAI;AA8B5B;;CAEC,GACD,OAAO,SAASI,SAASC,UAAoC,CAAC,CAAC;IAC7D,MAAM,EACJC,SAAS,EACTC,IAAI,EACJC,SAAS,MAAM,EACfC,UAAU,EACVC,iBAAiB,EAClB,GAAGL;IAEJ,OAAON,IACLE,UAAU;QAAES;IAAkB,IAC9BR,OAAO;QACLS,IAAIH,WAAW;QACfI,IAAIJ,WAAW;QACfK,IAAIL,WAAW,UAAUA,WAAW;QACpCD;QACAE,YAAYA,cAAcD,WAAW;IACvC,IACAF;AAEJ;AAaA;;CAEC,GACD,OAAO,SAASQ,kBACdT,UAA6C,CAAC,CAAC;IAE/C,MAAM,EAAEC,SAAS,EAAES,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,iBAAiB,EAAE,GAAGb;IAEpE,OAAON,IACLI,gBAAgB;QACdY;QACAC;QACAG,QAAQ,CAACF;QACT,sBAAsBC;IACxB,IACAZ;AAEJ"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/form/textFieldStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-text-field\");\n\n/** @remarks \\@since 6.0.0 */\nexport interface TextFieldClassNameOptions {\n className?: string;\n\n /**\n * Set this value to `true` when a text field has a floating label the text\n * field is not focused or valued so that the placeholder is hidden by setting\n * the opacity to 0. This makes it so the placeholder and label to not cover\n * each other.\n *\n * @defaultValue `false`\n */\n placeholderHidden?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function textField(options: TextFieldClassNameOptions = {}): string {\n const { className, placeholderHidden = false } = options;\n\n return cnb(\n styles({\n \"placeholder-hidden\": placeholderHidden,\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","textField","options","className","placeholderHidden"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAiBnB;;CAEC,GACD,OAAO,SAASE,UAAUC,UAAqC,CAAC,CAAC;IAC/D,MAAM,EAAEC,SAAS,EAAEC,oBAAoB,KAAK,EAAE,GAAGF;IAEjD,OAAOJ,IACLE,OAAO;QACL,sBAAsBI;IACxB,IACAD;AAEJ"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/form/types.ts"],"sourcesContent":["import {\n type CSSProperties,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type LabelHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-form-active-color\"?: string;\n \"--rmd-form-focus-color\"?: string;\n }\n}\n\n/**\n * The supported themes for the `TextField`, `TextArea`, and `Select`\n * components.\n *\n * - \"none\" - display as an unstyled text field without any border or background\n * colors.\n * - \"underline\" - display with only an underline that gains the form active\n * color and animates from the left or right to the other side when the field\n * is focused.\n * - \"filled\" - an extension of the `\"underline\"` state that will also have a\n * slightly dark background applied.\n * - \"outline\" - outlines the entire text field in a border and applies the\n * active color as box shadow when the field is focused.\n */\nexport type FormTheme = \"none\" | \"underline\" | \"filled\" | \"outline\";\n\n/**\n * The direction that the underline should appear from when the theme is\n * `\"underline\"` or `\"filled\"`.\n */\nexport type FormUnderlineDirection = \"left\" | \"center\" | \"right\";\n\nexport interface FormThemeOptions {\n /**\n * The current theme type.\n *\n * @defaultValue `\"outline\"`\n */\n theme?: FormTheme;\n\n /**\n * The current underline direction.\n *\n * @defaultValue `\"left\"`\n */\n underlineDirection?: FormUnderlineDirection;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface FormConfiguration extends Required<FormThemeOptions> {\n /**\n * Set this to `false` if the `$disable-uncontrolled-input-toggles` variable\n * is set to `true` in the Sass configuration.\n *\n * Since the `checked` state only changes for the radio that has been clicked,\n * the previously checked radio would also be shown as checked with no way of\n * fixing it without controlling the radio component. When this flag is\n * enabled, the checked icons and state are handled through css instead of\n * `useState`.\n *\n * @defaultValue `true`\n */\n uncontrolledToggles: boolean;\n}\n\nexport interface FormComponentStates {\n /** @defaultValue `false` */\n error?: boolean;\n\n /** @defaultValue `false` */\n active?: boolean;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /** @defaultValue `false` */\n readOnly?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @see https://html.spec.whatwg.org/multipage/forms.html#autofill\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n */\nexport type AutoCompleteValue =\n | \"off\"\n | \"on\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level1\"\n | \"address-level2\"\n | \"address-level3\"\n | \"address-level4\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tek-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface UserAgentAutoCompleteProps {\n /**\n * Set this to enable additional autocompletion suggestions for a user for\n * different form fields. Using this prop will update the\n * {@link UserAgentAutoCompleteProps.name} and {@link autoComplete} to default to\n * this value.\n *\n * @example\n * ```tsx\n * <Form>\n * <TextField\n * label=\"Enter your credit card number\"\n * autoCompleteValue=\"cc-number\"\n * {...creditCardProps}\n * inputMode=\"number\"\n * />\n * <TextField\n * label=\"Name on card\"\n * autoCompleteValue=\"cc-name\"\n * {...creditCardNameProps}\n * />\n * <TextField\n * label=\"Security code\"\n * autoCompleteValue=\"cc-csc\"\n * {...securityCodeProps}\n * inputMode=\"number\"\n * />\n * <Button type=\"submit\">Submit</Button>\n * </Form>\n * ```\n *\n * @see https://html.spec.whatwg.org/multipage/forms.html#autofill\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n * @see {@link AutoCompleteValue}\n * @see {@link autoComplete}\n * @see {@link UserAgentAutoCompleteProps.name}\n */\n autoCompleteValue?: AutoCompleteValue;\n\n /**\n * @see {@link autoCompleteValue}\n * @defaultValue `autoCompleteValue`\n */\n autoComplete?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n\n /**\n * @see {@link autoCompleteValue}\n * @defaultValue `autoCompleteValue`\n */\n name?: string;\n}\n\nexport interface FormMessageClassNameOptions {\n className?: string;\n\n /**\n * Boolean if the message should gain the error state which changes the text\n * color to `red` by default.\n *\n * @defaultValue `false`\n */\n error?: boolean;\n\n /**\n * The current theme for the related text field. This is really only used to\n * match the current horizontal padding of the text field.\n *\n * @defaultValue `\"outline\"`\n */\n theme?: FormTheme;\n}\n\nexport interface FormMessageProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"minLength\" | \"maxLength\">,\n FormMessageClassNameOptions {\n /**\n * If this component is acting as a form-level error message handler, the role\n * should be updated to be `\"alert\"` for additional accessibility.\n *\n * Note: when creating a form-level error message handler, the messages should\n * no longer appear as the user types and instead once the user tries to\n * submit the form. Having an alert role disrupts normal screen reader\n * behavior by immediately reading changes in this element.\n *\n * @defaultValue `undefined`\n */\n role?: \"alert\";\n\n /**\n * Boolean if the children should no longer be wrapped in a `<p>` tag. This\n * should normally only be disabled if using a custom error message wrapper or\n * the counter behavior is not being used. To get correct alignments of the\n * message and counter, the `children` must be wrapped in some element and\n * cannot be plain test.\n *\n * Note: this will always be considered `true` if the `role` is set to\n * `\"alert\"`.\n *\n * @defaultValue `false`\n */\n disableWrap?: boolean;\n\n /**\n * An optional style to apply to the `<p>` tag that surrounds the `children`.\n * This will not be used if `role=\"alert\"` or `disableWrap={true}`.\n */\n messageStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the `<p>` tag that surrounds the\n * `children`. This will not be used if `role=\"alert\"` or\n * `disableWrap={true}`.\n */\n messageClassName?: string;\n}\n\n/**\n * Props that are used to automatically add a counter for the remaining letters\n * available for the text field. The counter will always be created to the right\n * of the optional message.\n *\n * The counter is really a simple string of: `${length} / ${maxLength}`.\n *\n * If you need additional customization, it is recommended to create your own\n * implementation such as:\n *\n * ```tsx\n * <FormMessage>\n * {errorMessage}\n * <MyCounter {...props} />\n * </FormMessage>\n * ```\n *\n * Note: this should not be used alongside form-level messages.\n *\n * @remarks \\@since 2.9.0 Renamed from `FormMessageCounterProps` to\n * `FormMessageInputLengthCounterProps` since a `FormMessageCounter` component\n * was added\n */\nexport interface FormMessageInputLengthCounterProps {\n /**\n * The current length of the value in the related text field.\n */\n length: number;\n\n /**\n * The max length allowed for the value in the related text field.\n */\n maxLength: number;\n\n /**\n * An optional style to apply to the counter wrapper element.\n */\n counterStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the counter wrapper element.\n */\n counterClassName?: string;\n}\n\nexport interface FormMessageWithCounterProps\n extends FormMessageProps,\n FormMessageInputLengthCounterProps {}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface FormMessageWithoutCounterProps extends FormMessageProps {\n length?: never;\n maxLength?: never;\n counterStyle?: never;\n counterClassName?: never;\n}\n\nexport interface FormMessageContainerExtension {\n /**\n * If the extension doesn't actually want to render the `FormMessage`\n * component, these props are optional. It kind of eliminates the whole\n * purpose of this component though.\n */\n messageProps?: PropsWithRef<\n FormMessageProps & Partial<FormMessageInputLengthCounterProps>,\n HTMLDivElement\n >;\n\n /**\n * Any props (and an optional ref) to provide to the `<div>` surrounding the\n * children and `FormMessage` component.\n *\n * Note: This will not be used if the `messageProps` are not provided since\n * only the `children` will be returned without the container.\n */\n messageContainerProps?: PropsWithRef<\n HTMLAttributes<HTMLDivElement>,\n HTMLDivElement\n >;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface LabelClassNameOptions {\n className?: string;\n\n /**\n * Set this to `true` to remove the `gap` style from the label.\n *\n * @see `$label-gap`\n * @defaultValue `false`\n */\n gap?: boolean;\n\n /**\n * Set this to `true` when the parent `TextFieldContainer` has the `dense`\n * spec enabled. This updates the floating styles to match the smaller height.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to update the label's color to the error color.\n *\n * @see `$error-color`\n * @defaultValue `false`\n */\n error?: boolean;\n\n /**\n * Set this to `true` to update the label's color to the active color.\n *\n * @see `$active-color`\n * @defaultValue `false`\n */\n active?: boolean;\n\n /**\n * Set this to `true` if the label should gain `flex-direction: column`\n * styling.\n *\n * @defaultValue `false`\n */\n stacked?: boolean;\n\n /**\n * Set this to `true` to update the label's color to be the disabled color.\n *\n * @see `$disabled-color`\n * @defaultValue `false`\n */\n disabled?: boolean;\n\n /**\n * Set this to true when label can floating above an input, textarea, or\n * select inside of a `TextFieldContainer`.\n *\n * @defaultValue `false`\n */\n floating?: boolean;\n\n /**\n * Set this to true when label is currently floating above an input,\n * textarea, or selected inside of a `TextFieldContainer`.\n *\n * @see {@link active}\n * @defaultValue `active`\n */\n floatingActive?: boolean;\n\n /**\n * Set this to `true` to gain `flex-direction: row-reversed` styling. If the\n * {@link stacked} prop is also `true`, `flex-direction: column-reversed` will\n * be applied.\n *\n * @defaultValue `false`\n */\n reversed?: boolean;\n\n /**\n * @defaultValue `false`\n */\n inactive?: boolean;\n}\n\nexport interface LabelProps\n extends LabelHTMLAttributes<HTMLLabelElement>,\n LabelClassNameOptions {}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface ConfigurableTextFieldAddonProps\n extends HTMLAttributes<HTMLSpanElement> {\n /**\n * Boolean if the addon should be presentational only and prevent pointer\n * events.\n *\n * @defaultValue `false`\n */\n pointerEvents?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0 Added support for `leftAddonProps` and\n * `rightAddonProps`.\n */\nexport interface TextFieldContainerOptions\n extends FormThemeOptions,\n FormComponentStates {\n /**\n * Set this to `true` to enable the dense spec which reduces the height.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to change the style from `display: flex` to\n * `display: inline-flex`.\n *\n * @defaultValue `false`\n */\n inline?: boolean;\n\n /**\n * Set this to `true` if this component should stretch to fill a flex or grid\n * container using `flex: 1 1 auto`.\n *\n * @defaultValue `false`\n */\n stretch?: boolean;\n\n /**\n * This should generally be an icon or a button that will be placed before the\n * `TextField` or `TextArea`.\n */\n leftAddon?: ReactNode;\n\n /**\n * Any additional props to pass to the `<span>` surrounding the {@link leftAddon}.\n *\n * @remarks \\@since 6.0.0\n */\n leftAddonProps?: PropsWithRef<\n ConfigurableTextFieldAddonProps,\n HTMLSpanElement\n >;\n\n /**\n * @see {@link TextFieldAddonProps.disabled}\n *\n * @defaultValue `false`\n */\n disableLeftAddonStyles?: boolean;\n\n /**\n * This should generally be an icon or a button that will be placed after the\n * `TextField` or `TextArea`.\n */\n rightAddon?: ReactNode;\n\n /**\n * Any additional props to pass to the `<span>` surrounding the {@link rightAddon}.\n *\n * @remarks \\@since 6.0.0\n */\n rightAddonProps?: PropsWithRef<\n ConfigurableTextFieldAddonProps,\n HTMLSpanElement\n >;\n\n /**\n * @see {@link TextFieldAddonProps.disabled}\n *\n * @defaultValue `false`\n */\n disableRightAddonStyles?: boolean;\n}\n\nexport interface FormFieldOptions\n extends TextFieldContainerOptions,\n FormMessageContainerExtension {\n /**\n * An optional floating label to use with the text field. A label is generally\n * recommended for accessibility, but can be omitted if an `aria-label` or\n * `aria-labelledby` is provided.\n */\n label?: ReactNode;\n\n /**\n * Any additional props and/or ref that should be passed to the `<label>`\n * element when a {@link label} is provided.\n *\n * @example\n * ```tsx\n * labelProps={{\n * ref: labelRef,\n * style: {},\n * className: \"some-custom-class-name\",\n * onClick: (event) => {\n * // do something\n * }\n * }}\n * ```\n */\n labelProps?: PropsWithRef<LabelProps, HTMLLabelElement>;\n\n /**\n * A convenience prop to apply a custom style to a label. This is equivalent\n * to:\n *\n * ```ts\n * labelProps={{\n * style: // some style here\n * }}\n * ```\n */\n labelStyle?: CSSProperties;\n\n /**\n * A convenience prop to apply a custom className to a label. This is\n * equivalent to:\n *\n * ```ts\n * labelProps={{\n * className: \"some-class-name\",\n * }}\n * ```\n */\n labelClassName?: string;\n}\n"],"names":[],"mappings":"AAihBA,WAmDC"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/form/useCheckboxGroup.ts"],"sourcesContent":["\"use client\";\nimport { useCallback, useRef, useState } from \"react\";\nimport { type UseStateInitializer, type UseStateSetter } from \"../types.js\";\n\nconst EMPTY_LIST = [] as const;\n\n/** @remarks \\@since 6.0.0 */\nexport interface CheckboxGroupOptions<V> {\n /**\n * A `name` to apply to all the checkboxes within the group. This is required\n * if the {@link menu} option is set to `true`.\n */\n name?: string;\n\n /**\n * Set this to `true` if using the `MenuItemCheckbox` component instead of the\n * `Checkbox` so the correct props can be provided.\n *\n * @defaultValue `false`\n */\n menu?: boolean;\n\n /**\n * This prop **must** be defined to enable the indeterminate checkbox feature\n * from the hook. This should be a list of all the possible checkbox values in\n * the group. This will be used to select all values when the indeterminate\n * checkbox is checked and determine if all the checkboxes have manually be\n * selected.\n *\n * @example\n * Indeterminate Behavior\n * ```tsx\n * const OPTIONS = [\n * { label: \"First\", value: \"a\" },\n * { label: \"Second\", value: \"b\" },\n * { label: \"Third\", value: \"c\" },\n * ] as const:\n * const VALUES = OPTIONS.map(({ value }) => value) as const;\n *\n * const {\n * getCheckboxProps,\n * getIndeterminateProps,\n * checkedValues,\n * } = useCheckboxGroup({ name: \"group\", values: VALUES });\n * ```\n */\n values?: readonly V[];\n\n /**\n * Set this to a list of checkbox values that should be checked by default.\n *\n * @defaultValue `[]`\n */\n defaultCheckedValues?: UseStateInitializer<readonly V[]>;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface CheckboxGroupImplementation<V extends string> {\n reset(): void;\n checkedValues: ReadonlySet<V>;\n setCheckedValues: UseStateSetter<ReadonlySet<V>>;\n getCheckboxProps(value: V): {\n name: string;\n value: V;\n checked: boolean;\n onChange(): void;\n };\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface IndeterminateCheckboxGroupImplementation<V extends string>\n extends CheckboxGroupImplementation<V> {\n getIndeterminateProps(): {\n \"aria-checked\": \"mixed\" | undefined;\n name: string;\n checked: boolean;\n indeterminate: boolean;\n onChange(): void;\n };\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface MenuItemCheckboxGroupImplementation<V extends string> {\n reset(): void;\n checkedValues: ReadonlySet<V>;\n setCheckedValues: UseStateSetter<ReadonlySet<V>>;\n getCheckboxProps(value: V): {\n checked: boolean;\n onCheckedChange(): void;\n };\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface IndeterminateMenuItemCheckboxGroupImplementation<\n V extends string,\n> extends MenuItemCheckboxGroupImplementation<V> {\n getIndeterminateProps(): {\n \"aria-checked\": \"mixed\" | undefined;\n checked: boolean;\n indeterminate: boolean;\n onCheckedChange(): void;\n };\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface CombinedCheckboxGroupReturnValue<V extends string> {\n reset(): void;\n checkedValues: ReadonlySet<V>;\n setCheckedValues: UseStateSetter<ReadonlySet<V>>;\n getCheckboxProps(value: V): {\n name?: string;\n value?: V;\n checked: boolean;\n onChange?(): void;\n onCheckedChange?(): void;\n };\n getIndeterminateProps?(): {\n \"aria-checked\": \"mixed\" | undefined;\n name?: string;\n checked: boolean;\n indeterminate: boolean;\n onChange?(): void;\n onCheckedChange?(): void;\n };\n}\n\n/**\n * @example\n * Checkbox Group\n * ```tsx\n * const { getCheckboxProps, checkedValues } = useCheckboxGroup({ name: \"example\" });\n *\n * return (\n * <>\n * <Checkbox {...getCheckboxProps(\"a\")}>\n * First\n * </Checkbox>\n * <Checkbox {...getCheckboxProps(\"b\")}>\n * Second\n * </Checkbox>\n * <Checkbox {...getCheckboxProps(\"c\")}>\n * Third\n * </Checkbox>\n * </>\n * );\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu?: false;\n name: string;\n values?: never;\n }\n): CheckboxGroupImplementation<V>;\n/**\n * @example\n * Indeterminate Checkbox Group\n * ```tsx\n * const OPTIONS = [\n * { label: \"First\", value: \"a\" },\n * { label: \"Second\", value: \"b\" },\n * { label: \"Third\", value: \"c\" },\n * ] as const:\n * const VALUES = OPTIONS.map(({ value }) => value) as const;\n *\n * const {\n * getCheckboxProps,\n * getIndeterminateProps,\n * checkedValues\n * } = useCheckboxGroup({\n * name: \"example\",\n * values: VALUES,\n * });\n *\n * return (\n * <>\n * <Checkbox {...getIndeterminateProps()} label=\"Select all\" />\n * {VALUES.map(({ label, value }) => (\n * <Checkbox key={value} label={label} {...getCheckboxProps(value)} />\n * ))}\n * </>\n * );\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu?: false;\n name: string;\n values: readonly V[];\n }\n): IndeterminateCheckboxGroupImplementation<V>;\n/**\n * @example\n * MenuItemCheckbox Group\n * ```tsx\n * const { getCheckboxProps, checkedValues } = useCheckboxGroup({ menu: true });\n *\n * return (\n * <>\n * <MenuItemCheckbox {...getCheckboxProps(\"a\")}>\n * First\n * </MenuItemCheckbox>\n * <MenuItemCheckbox {...getCheckboxProps(\"b\")}>\n * Second\n * </MenuItemCheckbox>\n * <MenuItemCheckbox {...getCheckboxProps(\"c\")}>\n * Third\n * </MenuItemCheckbox>\n * </>\n * );\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu: true;\n name?: never;\n values?: never;\n }\n): MenuItemCheckboxGroupImplementation<V>;\n/**\n * @example\n * Indeterminate MenuItemCheckbox Group\n * ```tsx\n * const OPTIONS = [\n * { label: \"First\", value: \"a\" },\n * { label: \"Second\", value: \"b\" },\n * { label: \"Third\", value: \"c\" },\n * ] as const:\n * const VALUES = OPTIONS.map(({ value }) => value) as const;\n *\n * const { getCheckboxProps, getIndeterminateProps, checkedValues } = useCheckboxGroup({\n * menu: true,\n * values: VALUES,\n * });\n *\n * return (\n * <>\n * <MenuItemCheckbox {...getIndeterminateProps()}>\n * All\n * <MenuItemCheckbox>\n * {OPTIONS.map(({ label, value }) => (\n * <MenuItemCheckbox key={value} {...getCheckboxProps(value)}>\n * {label}\n * </MenuItemCheckbox>\n * ))}\n * </>\n * );\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu: true;\n name?: never;\n values: readonly V[];\n }\n): IndeterminateMenuItemCheckboxGroupImplementation<V>;\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V>\n): CombinedCheckboxGroupReturnValue<V> {\n const {\n name,\n menu = false,\n values,\n defaultCheckedValues = EMPTY_LIST,\n } = options;\n const [checkedValues, setCheckedValues] = useState<ReadonlySet<V>>(() => {\n if (typeof defaultCheckedValues === \"function\") {\n return new Set(defaultCheckedValues());\n }\n\n return new Set(defaultCheckedValues);\n });\n const initial = useRef(checkedValues);\n\n let getIndeterminateProps: CombinedCheckboxGroupReturnValue<V>[\"getIndeterminateProps\"];\n if (values) {\n getIndeterminateProps = () => {\n const checked = checkedValues.size > 0;\n const indeterminate = checked && checkedValues.size < values.length;\n\n return {\n \"aria-checked\": indeterminate ? \"mixed\" : undefined,\n name,\n checked,\n indeterminate,\n [menu ? \"onCheckedChange\" : \"onChange\"]() {\n setCheckedValues(() => {\n if (checkedValues.size === 0 || indeterminate) {\n return new Set(values);\n }\n\n return new Set();\n });\n },\n };\n };\n }\n\n return {\n reset: useCallback(() => {\n setCheckedValues(initial.current);\n }, []),\n checkedValues,\n setCheckedValues,\n getIndeterminateProps,\n getCheckboxProps(value) {\n return {\n name,\n value: menu ? undefined : value,\n checked: checkedValues.has(value),\n [menu ? \"onCheckedChange\" : \"onChange\"]() {\n setCheckedValues((prevValues) => {\n const nextValues = new Set(prevValues);\n if (prevValues.has(value)) {\n nextValues.delete(value);\n } else {\n nextValues.add(value);\n }\n\n return nextValues;\n });\n },\n };\n },\n };\n}\n"],"names":["useCallback","useRef","useState","EMPTY_LIST","useCheckboxGroup","options","name","menu","values","defaultCheckedValues","checkedValues","setCheckedValues","Set","initial","getIndeterminateProps","checked","size","indeterminate","length","undefined","reset","current","getCheckboxProps","value","has","prevValues","nextValues","delete","add"],"mappings":"AAAA;AACA,SAASA,WAAW,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAGtD,MAAMC,aAAa,EAAE;AAoQrB,OAAO,SAASC,iBACdC,OAAgC;IAEhC,MAAM,EACJC,IAAI,EACJC,OAAO,KAAK,EACZC,MAAM,EACNC,uBAAuBN,UAAU,EAClC,GAAGE;IACJ,MAAM,CAACK,eAAeC,iBAAiB,GAAGT,SAAyB;QACjE,IAAI,OAAOO,yBAAyB,YAAY;YAC9C,OAAO,IAAIG,IAAIH;QACjB;QAEA,OAAO,IAAIG,IAAIH;IACjB;IACA,MAAMI,UAAUZ,OAAOS;IAEvB,IAAII;IACJ,IAAIN,QAAQ;QACVM,wBAAwB;YACtB,MAAMC,UAAUL,cAAcM,IAAI,GAAG;YACrC,MAAMC,gBAAgBF,WAAWL,cAAcM,IAAI,GAAGR,OAAOU,MAAM;YAEnE,OAAO;gBACL,gBAAgBD,gBAAgB,UAAUE;gBAC1Cb;gBACAS;gBACAE;gBACA,CAACV,OAAO,oBAAoB,WAAW;oBACrCI,iBAAiB;wBACf,IAAID,cAAcM,IAAI,KAAK,KAAKC,eAAe;4BAC7C,OAAO,IAAIL,IAAIJ;wBACjB;wBAEA,OAAO,IAAII;oBACb;gBACF;YACF;QACF;IACF;IAEA,OAAO;QACLQ,OAAOpB,YAAY;YACjBW,iBAAiBE,QAAQQ,OAAO;QAClC,GAAG,EAAE;QACLX;QACAC;QACAG;QACAQ,kBAAiBC,KAAK;YACpB,OAAO;gBACLjB;gBACAiB,OAAOhB,OAAOY,YAAYI;gBAC1BR,SAASL,cAAcc,GAAG,CAACD;gBAC3B,CAAChB,OAAO,oBAAoB,WAAW;oBACrCI,iBAAiB,CAACc;wBAChB,MAAMC,aAAa,IAAId,IAAIa;wBAC3B,IAAIA,WAAWD,GAAG,CAACD,QAAQ;4BACzBG,WAAWC,MAAM,CAACJ;wBACpB,OAAO;4BACLG,WAAWE,GAAG,CAACL;wBACjB;wBAEA,OAAOG;oBACT;gBACF;YACF;QACF;IACF;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/form/useFileUpload.ts"],"sourcesContent":["\"use client\";\nimport { nanoid } from \"nanoid\";\nimport {\n useCallback,\n useEffect,\n useReducer,\n type ChangeEvent,\n type DragEvent,\n} from \"react\";\nimport {\n FileAccessError,\n getFileParser as defaultGetFileParser,\n isValidFileName as defaultIsValidFileName,\n validateFiles as defaultValidateFiles,\n type CompletedFileUploadStats,\n type FileReaderResult,\n type FileUploadHandlers,\n type FileUploadStats,\n type FileValidationError,\n type FileValidationOptions,\n type FilesValidator,\n type GetFileParser,\n type ProcessingFileUploadStats,\n} from \"./fileUtils.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n *\n * @typeParam CustomError - An optional error type that gets returned from the\n * {@link FilesValidator}.\n * @remarks \\@since 2.9.0\n */\nexport interface FileUploadState<CustomError = never> {\n /**\n * All the files that have been validated and are either:\n * - pending upload\n * - uploading\n * - complete\n *\n * Each key in this object is the {@link BaseFileUploadStats.key} generated\n * once the upload starts pending.\n */\n stats: Readonly<Record<string, Readonly<FileUploadStats>>>;\n\n /**\n * A list of validation errors that have occurred before starting the upload\n * process.\n *\n * @see {@link FileAccessError}\n * @see {@link TooManyFilesError}\n * @see {@link FileValidationError}\n */\n errors: readonly FileValidationError<CustomError>[];\n}\n\n/**\n *\n * @typeParam CustomError - An optional error type that gets returned from the\n * {@link FilesValidator}.\n * @remarks \\@since 2.9.0\n * @internal\n */\nexport interface FileUploadHookState<CustomError = never>\n extends FileUploadState<CustomError> {\n /**\n * All the current readers used for uploading files to the browser.\n *\n * Note: Once an upload has completed, the reader will be removed.\n */\n readers: Readonly<Record<string, FileReader>>;\n}\n\n/**\n *\n * @typeParam E - An optional HTMLElement type that is used for the\n * {@link FileUploadHandlers}.\n * @typeParam CustomError - An optional error type that gets returned from the\n * {@link FilesValidator}.\n * @remarks \\@since 2.9.0\n */\nexport interface FileUploadOptions<E extends HTMLElement, CustomError = never>\n extends FileUploadHandlers<E>,\n FileValidationOptions {\n /**\n * Setting this value to a number greater than `0` will update the browser\n * upload process to queue the uploads in chunks instead of all at once. This\n * can help prevent the browser from freezing if dealing with large files that\n * are being converted to data urls.\n *\n * @defaultValue `-1`\n */\n concurrency?: number;\n\n /** {@inheritDoc FilesValidator} */\n validateFiles?: FilesValidator<CustomError>;\n /** {@inheritDoc GetFileParser} */\n getFileParser?: GetFileParser;\n}\n\n/** @internal */\ntype Action<E = never> =\n | {\n type: \"queue\";\n errors: readonly FileValidationError<E>[];\n files: readonly File[];\n }\n | { type: \"reset\" }\n | { type: \"remove\"; files: readonly string[] }\n | { type: \"start\"; key: string; reader: FileReader }\n | { type: \"progress\"; key: string; progress: number }\n | { type: \"complete\"; key: string; result: FileReaderResult }\n | { type: \"clearErrors\" };\n\n/** @remarks \\@since 2.9.0 */\nexport interface FileUploadActions {\n /**\n * Reset everything related to uploads ensuring that all file readers have\n * been aborted.\n */\n reset(): void;\n\n /**\n * Removes all the errors that exist in state without cancelling any of the\n * uploads already in progress.\n */\n clearErrors(): void;\n\n /**\n * This function is used to cancel pending and uploading files or removing\n * completed files.\n *\n * @param keyOrKeys - A single or list of {@link BaseFileUploadStats.key} to\n * remove from state.\n */\n remove(keyOrKeys: string | readonly string[]): void;\n}\n\n/**\n *\n * @typeParam E - An optional HTMLElement type that is used for the\n * {@link FileUploadHandlers}.\n * @typeParam CustomError - An optional error type that gets returned from the\n * {@link FilesValidator}.\n * @remarks \\@since 2.9.0\n */\nexport interface FileUploadHookReturnValue<\n E extends HTMLElement = HTMLElement,\n CustomError = never,\n> extends FileUploadActions,\n Required<FileUploadHandlers<E>> {\n /** {@inheritDoc FileUploadState.errors} */\n errors: readonly FileValidationError<CustomError>[];\n\n /**\n * A list of all the {@link FileUploadStats}.\n *\n * @see {@link getSplitFileUploads} for separating by status\n */\n stats: readonly Readonly<FileUploadStats>[];\n\n /**\n * The total number of bytes for all the files that exist in the\n * {@link stats} list.\n */\n totalBytes: number;\n\n /**\n * The total number of files in the {@link stats} list.\n */\n totalFiles: number;\n\n /**\n * An `accept` string that can be passed to the {@link FileInput} component\n * when the {@link FileValidationOptions.extensions} list has been provided to\n * limit which files the OS will _attempt_ to allow access to.\n *\n * @example\n * Simple example\n * ```ts\n * const extensions = ['pdf', 'docx', 'ppt'];\n * const { accept } = useFileUpload({ extensions, ...others });\n *\n * expect(accept).toBe(\"*.pdf,*.docx,*.ppt\")\n * ```\n *\n * @defaultValue `\"*\"`\n */\n accept: string;\n}\n\n/** @internal */\nconst EMPTY_LIST = [] as const;\n/** @internal */\nconst EMPTY_OBJECT = {} as const;\n\n/**\n * This hook is generally used to upload files **to the browser** in different\n * formats to be previewed `<img>`, `<video>`, `<embed>`, etc tags. However, it\n * can also be used to upload the files as an `ArrayBuffer` and then uploaded to\n * a server.\n *\n * Note: If using the `aws-sdk` to upload files directly to S3, **do not use\n * this hook** since it uses its own upload process.\n *\n * @typeParam E - An optional HTMLElement type that is used for the\n * {@link FileUploadHandlers}.\n * @typeParam CustomError - An optional error type that gets returned from the\n * {@link FilesValidator}.\n * @param options - All the {@link FileUploadOptions}\n * @returns the {@link FileUploadHookReturnValue}\n * @remarks \\@since 2.9.0\n */\nexport function useFileUpload<E extends HTMLElement, CustomError = never>({\n maxFiles = -1,\n extensions = EMPTY_LIST,\n minFileSize = -1,\n maxFileSize = -1,\n totalFileSize = -1,\n concurrency = -1,\n onDrop: propOnDrop = noop,\n onChange: propOnChange = noop,\n validateFiles = defaultValidateFiles,\n getFileParser = defaultGetFileParser,\n isValidFileName = defaultIsValidFileName,\n}: FileUploadOptions<E, CustomError> = {}): Readonly<\n FileUploadHookReturnValue<E, CustomError>\n> {\n const [state, dispatch] = useReducer(\n function reducer(\n state: FileUploadHookState<CustomError>,\n action: Action<CustomError>\n ): FileUploadHookState<CustomError> {\n switch (action.type) {\n case \"reset\":\n // need to reuse constants so that calling reset doesn't cause an\n // infinite loop in an effect\n return {\n stats: EMPTY_OBJECT,\n errors: EMPTY_LIST,\n readers: EMPTY_OBJECT,\n };\n case \"remove\": {\n const stats: Record<string, FileUploadStats> = {};\n for (const key in state.stats) {\n if (!action.files.includes(key)) {\n stats[key] = state.stats[key];\n }\n }\n\n return {\n ...state,\n stats,\n };\n }\n case \"queue\":\n return {\n ...state,\n stats: {\n ...state.stats,\n ...action.files.reduce<Record<string, ProcessingFileUploadStats>>(\n (files, file) => {\n const key = nanoid();\n files[key] = {\n key,\n file,\n progress: 0,\n status: \"pending\",\n };\n\n return files;\n },\n {}\n ),\n },\n errors: [...state.errors, ...action.errors],\n };\n case \"start\": {\n const { key, reader } = action;\n const fileStats: ProcessingFileUploadStats = {\n key,\n file: state.stats[key].file,\n progress: 0,\n status: \"uploading\",\n };\n\n return {\n ...state,\n readers: {\n ...state.readers,\n [key]: reader,\n },\n stats: {\n ...state.stats,\n [key]: fileStats,\n },\n };\n }\n case \"progress\": {\n const { key, progress } = action;\n return {\n ...state,\n stats: {\n ...state.stats,\n [key]: {\n ...state.stats[key],\n progress,\n },\n },\n };\n }\n case \"complete\": {\n const { key, result } = action;\n const file: CompletedFileUploadStats = {\n key,\n file: state.stats[key].file,\n status: \"complete\",\n result,\n progress: 100,\n };\n const { [key]: _reader, ...readers } = state.readers;\n\n return {\n ...state,\n readers,\n stats: {\n ...state.stats,\n [key]: file,\n },\n };\n }\n case \"clearErrors\":\n return { ...state, errors: [] };\n }\n },\n {\n stats: EMPTY_OBJECT,\n errors: EMPTY_LIST,\n readers: EMPTY_OBJECT,\n }\n );\n const { stats, errors, readers } = state;\n\n const statsList = Object.values(stats);\n const totalFiles = statsList.length;\n const totalBytes = statsList.reduce(\n (result, { file: { size } }) => result + size,\n 0\n );\n const queueFiles = useCallback(\n (files: readonly File[]) => {\n const { pending, errors } = validateFiles(files, {\n maxFiles,\n extensions,\n minFileSize,\n maxFileSize,\n totalBytes,\n totalFiles,\n totalFileSize,\n isValidFileName,\n });\n\n dispatch({ type: \"queue\", errors, files: pending });\n },\n [\n validateFiles,\n maxFiles,\n extensions,\n minFileSize,\n maxFileSize,\n totalBytes,\n totalFiles,\n totalFileSize,\n isValidFileName,\n ]\n );\n const onDrop = useCallback(\n (event: DragEvent<E>) => {\n propOnDrop(event);\n event.preventDefault();\n event.stopPropagation();\n\n try {\n const files = event.dataTransfer.files;\n if (files) {\n queueFiles(Array.from(files));\n }\n } catch (e) {\n dispatch({\n type: \"queue\",\n files: [],\n errors: [\n new FileAccessError(e instanceof Error ? e.message : undefined),\n ],\n });\n }\n },\n [queueFiles, propOnDrop]\n );\n const onChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n propOnChange(event);\n try {\n const files = event.currentTarget.files;\n if (files) {\n queueFiles(Array.from(files));\n } else {\n throw new Error();\n }\n } catch (e) {\n dispatch({\n type: \"queue\",\n files: [],\n errors: [\n new FileAccessError(e instanceof Error ? e.message : undefined),\n ],\n });\n }\n },\n [queueFiles, propOnChange]\n );\n\n const remove = useCallback(\n (keyOrKeys: string | readonly string[]) => {\n const files = typeof keyOrKeys === \"string\" ? [keyOrKeys] : keyOrKeys;\n files.forEach((fileKey) => {\n readers[fileKey]?.abort();\n });\n\n dispatch({ type: \"remove\", files });\n },\n [readers]\n );\n const reset = useCallback(() => {\n Object.values(readers).forEach((reader) => {\n reader.abort();\n });\n\n dispatch({ type: \"reset\" });\n }, [readers]);\n const clearErrors = useCallback(() => {\n dispatch({ type: \"clearErrors\" });\n }, []);\n const start = useCallback((key: string, reader: FileReader) => {\n dispatch({ type: \"start\", key, reader });\n }, []);\n const complete = useCallback(\n (key: string, result: FileReaderResult = null) => {\n dispatch({ type: \"complete\", key, result });\n },\n []\n );\n const createProgressEventHandler = useCallback(\n (key: string) => (event: ProgressEvent) => {\n if (event.lengthComputable) {\n const percentage = Math.round((event.loaded * 100) / event.total);\n dispatch({ type: \"progress\", key, progress: percentage });\n }\n },\n []\n );\n\n useEffect(() => {\n const pending: ProcessingFileUploadStats[] = [];\n const uploading: ProcessingFileUploadStats[] = [];\n Object.values(stats).forEach((file) => {\n if (file.status === \"pending\") {\n pending.push(file);\n } else if (file.status === \"uploading\") {\n uploading.push(file);\n }\n });\n\n const lastIndex =\n concurrency === -1\n ? pending.length\n : Math.max(0, concurrency - uploading.length);\n const queue = pending.slice(0, lastIndex);\n if (!queue.length) {\n return;\n }\n\n queue.forEach((stats) => {\n const { key, file } = stats;\n const reader = new FileReader();\n\n // using `addEventListener` instead of directly setting to\n // `reader.progress`/`reader.load` so it's easier to test\n reader.addEventListener(\"progress\", createProgressEventHandler(key));\n reader.addEventListener(\"load\", () => {\n complete(key, reader.result);\n });\n\n start(key, reader);\n const parser = getFileParser(file);\n /* istanbul ignore next */\n if (\n process.env.NODE_ENV !== \"production\" &&\n ![\n \"readAsText\",\n \"readAsDataURL\",\n \"readAsArrayBuffer\",\n \"readAsBinaryString\",\n ].includes(parser)\n ) {\n throw new Error(\"Invalid file reader parser\");\n }\n\n reader[parser](file);\n });\n }, [\n concurrency,\n stats,\n getFileParser,\n createProgressEventHandler,\n start,\n complete,\n ]);\n\n let accept = \"\";\n if (extensions.length) {\n accept = extensions.reduce((s, ext) => `${s ? `${s},` : \"\"}.${ext}`, \"\");\n }\n\n return {\n stats: statsList,\n errors,\n accept,\n totalBytes,\n totalFiles,\n onDrop,\n onChange,\n reset,\n remove,\n clearErrors,\n };\n}\n"],"names":["nanoid","useCallback","useEffect","useReducer","FileAccessError","getFileParser","defaultGetFileParser","isValidFileName","defaultIsValidFileName","validateFiles","defaultValidateFiles","noop","EMPTY_LIST","EMPTY_OBJECT","useFileUpload","maxFiles","extensions","minFileSize","maxFileSize","totalFileSize","concurrency","onDrop","propOnDrop","onChange","propOnChange","state","dispatch","reducer","action","type","stats","errors","readers","key","files","includes","reduce","file","progress","status","reader","fileStats","result","_reader","statsList","Object","values","totalFiles","length","totalBytes","size","queueFiles","pending","event","preventDefault","stopPropagation","dataTransfer","Array","from","e","Error","message","undefined","currentTarget","remove","keyOrKeys","forEach","fileKey","abort","reset","clearErrors","start","complete","createProgressEventHandler","lengthComputable","percentage","Math","round","loaded","total","uploading","push","lastIndex","max","queue","slice","FileReader","addEventListener","parser","process","env","NODE_ENV","accept","s","ext"],"mappings":"AAAA;AACA,SAASA,MAAM,QAAQ,SAAS;AAChC,SACEC,WAAW,EACXC,SAAS,EACTC,UAAU,QAGL,QAAQ;AACf,SACEC,eAAe,EACfC,iBAAiBC,oBAAoB,EACrCC,mBAAmBC,sBAAsB,EACzCC,iBAAiBC,oBAAoB,QAUhC,iBAAiB;AAExB,MAAMC,OAAO;AACX,aAAa;AACf;AAsKA,cAAc,GACd,MAAMC,aAAa,EAAE;AACrB,cAAc,GACd,MAAMC,eAAe,CAAC;AAEtB;;;;;;;;;;;;;;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"use client\";\nimport { createContext, useContext, type RefObject } from \"react\";\n\n/**\n * @internal\n * \\@remarks \\@since 6.0.0\n */\nexport interface ListboxContext {\n /**\n * This ref is used to trigger the change event when an option is clicked.\n */\n inputRef: RefObject<HTMLInputElement>;\n\n /**\n * This is used within the `Option` component to determine if it is currently\n * selected or not.\n */\n currentValue: string | number | null;\n\n disableSelectedIcon: boolean;\n}\n\nconst context = createContext<ListboxContext>({\n inputRef: { current: null },\n currentValue: null,\n disableSelectedIcon: false,\n});\n\n/**\n * **Client Component**\n *\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport const { Provider: ListboxProvider } = context;\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport function useListboxContext(): ListboxContext {\n return useContext(context);\n}\n"],"names":["createContext","useContext","context","inputRef","current","currentValue","disableSelectedIcon","Provider","ListboxProvider","useListboxContext"],"mappings":"AAAA;AACA,SAASA,aAAa,EAAEC,UAAU,QAAwB,QAAQ;AAqBlE,MAAMC,UAAUF,cAA8B;IAC5CG,UAAU;QAAEC,SAAS;IAAK;IAC1BC,cAAc;IACdC,qBAAqB;AACvB;AAEA;;;;;CAKC,GACD,OAAO,MAAM,EAAEC,UAAUC,eAAe,EAAE,GAAGN,QAAQ;AAErD;;;CAGC,GACD,OAAO,SAASO;IACd,OAAOR,WAAWC;AACpB"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/form/useNumberField.ts"],"sourcesContent":["\"use client\";\nimport { useCallback, useRef, useState } from \"react\";\nimport { type UseStateInitializer, type UseStateSetter } from \"../types.js\";\nimport { withinRange } from \"../utils/withinRange.js\";\nimport {\n useTextField,\n type ProvidedTextFieldMessageProps,\n type ProvidedTextFieldProps,\n type TextFieldHookOptions,\n type TextFieldHookState,\n type TextFieldImplementation,\n type ValidatedTextFieldImplementation,\n} from \"./useTextField.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/** @remarks \\@since 2.5.0 */\nexport interface NumberFieldConstraints {\n /**\n * An optional min value for the number field.\n */\n min?: number;\n\n /**\n * An optional max value for the number field.\n */\n max?: number;\n\n /**\n * An optional step amount to use.\n *\n * Note: The `min` and `max` values must be divisible by this value when any\n * are defined.\n */\n step?: number;\n}\n\n/**\n * @remarks\n * \\@since 2.5.0\n * \\@since 6.0.0\n * - Removed `updateOnChange` in favor of `updateValue`\n * - Renamed `fixOnBlur` to `updateValueOnBlur`\n */\nexport interface NumberFieldHookOptions\n extends Omit<\n TextFieldHookOptions<HTMLInputElement>,\n \"defaultValue\" | \"isNumber\"\n >,\n NumberFieldConstraints {\n /**\n * @defaultValue `undefined`\n */\n defaultValue?: UseStateInitializer<number>;\n\n /**\n * This controls the behavior for the `value` returned by this hook. If you\n * need access to the current value immediately as the user types to update\n * other components, keep this as the default of `\"change\"`. Otherwise, set\n * this to `\"blur\"`.\n *\n * @example\n * Deferring Updates on Blur\n * ```tsx\n * import { TextField, useNumberField } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { fieldProps, value } = useNumberField({\n * min: 0,\n * max: 100,\n * name: \"someName\",\n * defaultValue: 0,\n * updateValue: \"blur\",\n * });\n *\n * const result = useMemo(() => someExpensiveComputation(value), [value]);\n *\n * return <TextField {...fieldProps} label=\"Label\" />;\n * }\n * ```\n *\n * @defaultValue `\"change\"`\n */\n updateValue?: \"blur\" | \"change\";\n\n /**\n * This option is used to update the `number` value and text field value to be\n * within the `min` and `max` range or just format the text field value when\n * the input is blurred. This update will only be applied if the text field\n * contains a valid number. Using `min = 0` and `max = 10`:\n *\n * | text value | updated value |\n * | ---------- | ------------- |\n * | 000001 | 1 |\n * | -1 | 0 |\n * | 20 | 10 |\n * | -12 | 0 |\n * | --1 | --1 |\n * | fjdka | fjdka |\n *\n *\n * Set this to `false` if no changed should be applied and force the user to\n * fix any min/max errors manually and maintain weird formatting.\n *\n * @defaultValue `true`\n * @remarks \\@since 6.0.0 This was renamed from `fixOnBlur` and removed the\n * `\"min\"` and `\"max\"` behavior.\n */\n updateValueOnBlur?: boolean;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface NumberFieldHookState\n extends Omit<TextFieldHookState, \"value\"> {\n value: number | undefined;\n}\n\n/** @remarks \\@since 2.5.6 */\nexport interface ProvidedNumberFieldProps\n extends ProvidedTextFieldProps<HTMLInputElement>,\n NumberFieldConstraints {\n type: \"number\";\n}\n\n/** @remarks \\@since 2.5.6 */\nexport interface ProvidedNumberFieldMessageProps\n extends ProvidedTextFieldMessageProps<HTMLInputElement>,\n NumberFieldConstraints {\n type: \"number\";\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface NumberFieldImplementation\n extends Omit<\n TextFieldImplementation<HTMLInputElement>,\n \"value\" | \"setState\"\n > {\n value: number | undefined;\n setState: UseStateSetter<NumberFieldHookState>;\n fieldProps: ProvidedNumberFieldProps;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface NumberFieldWithMessageImplementation\n extends NumberFieldImplementation {\n fieldProps: ProvidedNumberFieldMessageProps;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface ValidatedNumberFieldImplementation\n extends Omit<\n ValidatedTextFieldImplementation<HTMLInputElement>,\n \"value\" | \"setState\"\n > {\n value: number | undefined;\n setState: UseStateSetter<NumberFieldHookState>;\n fieldProps: ProvidedNumberFieldProps | ProvidedNumberFieldMessageProps;\n}\n\n/**\n * @example\n * Enforce Number Value and No Error Messages\n * ```tsx\n * import { TextField, useNumberField } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { fieldProps, value } = useNumberField({\n * min: 0,\n * max: 100,\n * name: \"someName\",\n * defaultValue: 0,\n * disableMessage: true,\n * });\n *\n * // this is safe since `value` will always be a number even if there is a\n * // validation error. since the min and max options were provided as well,\n * // number will be between that range as well.\n * const computed = value * 10;\n *\n * return <TextField {...fieldProps} label=\"Label\" />;\n * }\n *\n * @see {@link useTextField}\n * @see {@link useNumberField} overrides for other examples.\n * ```\n */\nexport function useNumberField(\n options: NumberFieldHookOptions & {\n disableMessage: true;\n defaultValue: UseStateInitializer<number>;\n }\n): NumberFieldImplementation & {\n value: number;\n setState: UseStateSetter<NumberFieldHookState & { value: number }>;\n};\n\n/**\n * @example\n * No Error Messages\n * ```tsx\n * import { TextField, useNumberField } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { fieldProps, value } = useNumberField({\n * min: 0,\n * max: 100,\n * name: \"someName\",\n * disableMessage: true,\n * });\n *\n * // `value` will be `undefined` until the user enters a valid value once\n * // there is a valid value, `value` will be a `number`. So this might cause\n * // `computed` to be `NaN | number`\n * //\n * // const computed = value * 10;\n *\n * return <TextField {...fieldProps} label=\"Label\" />;\n * }\n * ```\n *\n * @see {@link useTextField}\n * @see {@link useNumberField} overrides for other examples.\n */\nexport function useNumberField(\n options: NumberFieldHookOptions & { disableMessage: true }\n): NumberFieldImplementation;\n\n/**\n * @example\n * Enforce Number Value\n * ```tsx\n * import { TextField, useNumberField } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { fieldProps, value } = useNumberField({\n * min: 0,\n * max: 100,\n * name: \"someName\",\n * defaultValue: 0,\n * });\n *\n * // this is safe since `value` will always be a number even if there is a\n * // validation error. since the min and max options were provided as well,\n * // number will be between that range as well.\n * const computed = value * 10;\n *\n * return <TextField {...fieldProps} label=\"Label\" />;\n * }\n * ```\n *\n * @example\n * Enforce Number Value and Deferring Updates\n * ```tsx\n * import { TextField, useNumberField } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { fieldProps, value } = useNumberField({\n * min: 0,\n * max: 100,\n * name: \"someName\",\n * defaultValue: 0,\n * updateValue: \"blur\",\n * });\n *\n * // the `value` will only be updated whenever the `TextField` is blurred.\n * // This is helpful if the `value` is used in expensive computations or\n * // updates that do not need to be updated as the user types\n * const computed = value * 10;\n *\n * return <TextField {...fieldProps} label=\"Label\" />;\n * }\n * ```\n *\n * @see {@link useTextField}\n * @see {@link useNumberField} overrides for other examples.\n */\nexport function useNumberField(\n options: NumberFieldHookOptions & {\n defaultValue: UseStateInitializer<number>;\n }\n): NumberFieldWithMessageImplementation & {\n value: number;\n setState: UseStateSetter<NumberFieldHookState & { value: number }>;\n};\n\n/**\n * The `useNumberField` hook is used to control the state of a `TextField` or\n * `<input type=\"number\">`\n *\n * @example\n * Default Implementation\n * ```tsx\n * import { TextField, useNumberField } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { fieldProps, value } = useNumberField({\n * name: \"someName\",\n * });\n *\n * // `value` will be `undefined` until the user enters a valid value once\n * // there is a valid value, `value` will be a `number`. So this might cause\n * // `computed` to be `NaN | number`\n * //\n * // const computed = value * 10;\n *\n * // whenever there is an error, an error message will be displayed below the\n * // `TextField`\n * return <TextField {...fieldProps} label=\"Label\" />;\n * }\n * ```\n *\n * @example\n * Adding Constraints\n * ```tsx\n * import { TextField, useNumberField } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { fieldProps, value } = useNumberField({\n * name: \"someName\",\n * min: 0,\n * max: 100,\n * step: 2,\n * required: true,\n * });\n *\n * return <TextField {...fieldProps} label=\"Label\" />;\n * }\n * ```\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation\n * @see {@link useTextField}\n */\nexport function useNumberField(\n options: NumberFieldHookOptions\n): NumberFieldWithMessageImplementation;\n\n/**\n * @internal\n * @see {@link useTextField}\n * @see {@link useNumberField} overrides for other examples.\n */\nexport function useNumberField(\n options: NumberFieldHookOptions\n): ValidatedNumberFieldImplementation {\n const {\n min,\n max,\n step,\n onBlur = noop,\n onChange = noop,\n updateValue = \"change\",\n updateValueOnBlur = true,\n defaultValue,\n ...textOptions\n } = options;\n\n const [number, setNumber] = useState(defaultValue);\n const initial = useRef(number);\n const {\n value: _value,\n reset: resetTextField,\n fieldProps,\n setState: setTextFieldState,\n ...remaining\n } = useTextField({\n ...textOptions,\n isNumber: true,\n defaultValue: `${number ?? \"\"}`,\n onBlur(event) {\n onBlur(event);\n if (event.isPropagationStopped()) {\n return;\n }\n\n const input = event.currentTarget;\n input.setCustomValidity(\"\");\n input.checkValidity();\n if (\n !updateValueOnBlur ||\n // do nothing else since it's a weird value like: `\"--0\"` which causes\n // the value to be `\"\"` and `numberAsValue` to be `NaN`\n input.validity.badInput\n ) {\n return;\n }\n\n let value = input.valueAsNumber;\n if (input.value === \"\" && typeof initial.current === \"number\") {\n value = min ?? initial.current;\n }\n\n // can't have both rangeUnderflow and rangeOverflow at the same time, so\n // it's \"safe\" to always provide both\n value = withinRange({ min, max, value });\n if (!Number.isNaN(value)) {\n setNumber(value);\n input.value = `${value}`;\n } else if (typeof initial.current === \"undefined\") {\n setNumber(undefined);\n }\n },\n onChange(event) {\n onChange(event);\n if (event.isPropagationStopped() || updateValue === \"blur\") {\n return;\n }\n\n const input = event.currentTarget;\n input.checkValidity();\n const value = withinRange({\n min,\n max,\n value: event.currentTarget.valueAsNumber,\n });\n if (\n !input.validity.valid &&\n !input.validity.rangeUnderflow &&\n !input.validity.rangeOverflow\n ) {\n return;\n }\n\n if (!Number.isNaN(value)) {\n setNumber(value);\n } else if (initial.current === undefined) {\n setNumber(undefined);\n }\n },\n });\n\n const reset = useCallback(() => {\n resetTextField();\n setNumber(initial.current);\n }, [resetTextField]);\n const setState = useCallback<UseStateSetter<NumberFieldHookState>>(\n (nextState) => {\n if (typeof nextState === \"function\") {\n setNumber((prevNumber) => {\n let nextNumber: number | undefined = prevNumber;\n setTextFieldState((prevState) => {\n const updated = nextState({\n ...prevState,\n value: prevNumber,\n });\n\n nextNumber = updated.value;\n\n return {\n ...updated,\n value: `${nextNumber ?? \"\"}`,\n };\n });\n\n return nextNumber;\n });\n return;\n }\n\n const { value, error, errorMessage } = nextState;\n setNumber(value);\n setTextFieldState({\n value: `${value ?? \"\"}`,\n error,\n errorMessage,\n });\n },\n [setTextFieldState]\n );\n\n return {\n ...remaining,\n reset,\n value: number,\n setState,\n fieldProps: {\n ...fieldProps,\n min,\n max,\n step,\n type: \"number\",\n },\n };\n}\n"],"names":["useCallback","useRef","useState","withinRange","useTextField","noop","useNumberField","options","min","max","step","onBlur","onChange","updateValue","updateValueOnBlur","defaultValue","textOptions","number","setNumber","initial","value","_value","reset","resetTextField","fieldProps","setState","setTextFieldState","remaining","isNumber","event","isPropagationStopped","input","currentTarget","setCustomValidity","checkValidity","validity","badInput","valueAsNumber","current","Number","isNaN","undefined","valid","rangeUnderflow","rangeOverflow","nextState","prevNumber","nextNumber","prevState","updated","error","errorMessage","type"],"mappings":"AAAA;AACA,SAASA,WAAW,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAEtD,SAASC,WAAW,QAAQ,0BAA0B;AACtD,SACEC,YAAY,QAOP,oBAAoB;AAE3B,MAAMC,OAAO;AACX,aAAa;AACf;AAyUA;;;;CAIC,GACD,OAAO,SAASC,eACdC,OAA+B;IAE/B,MAAM,EACJC,GAAG,EACHC,GAAG,EACHC,IAAI,EACJC,SAASN,IAAI,EACbO,WAAWP,IAAI,EACfQ,cAAc,QAAQ,EACtBC,oBAAoB,IAAI,EACxBC,YAAY,EACZ,GAAGC,aACJ,GAAGT;IAEJ,MAAM,CAACU,QAAQC,UAAU,GAAGhB,SAASa;IACrC,MAAMI,UAAUlB,OAAOgB;IACvB,MAAM,EACJG,OAAOC,MAAM,EACbC,OAAOC,cAAc,EACrBC,UAAU,EACVC,UAAUC,iBAAiB,EAC3B,GAAGC,WACJ,GAAGvB,aAAa;QACf,GAAGY,WAAW;QACdY,UAAU;QACVb,cAAc,CAAC,EAAEE,UAAU,GAAG,CAAC;QAC/BN,QAAOkB,KAAK;YACVlB,OAAOkB;YACP,IAAIA,MAAMC,oBAAoB,IAAI;gBAChC;YACF;YAEA,MAAMC,QAAQF,MAAMG,aAAa;YACjCD,MAAME,iBAAiB,CAAC;YACxBF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