@react-md/core 1.0.0-next.15 → 1.0.0-next.16

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 (815) hide show
  1. package/dist/RootHtml.d.ts +0 -2
  2. package/dist/RootHtml.js +0 -2
  3. package/dist/RootHtml.js.map +1 -1
  4. package/dist/app-bar/AppBar.d.ts +0 -2
  5. package/dist/app-bar/AppBar.js +0 -2
  6. package/dist/app-bar/AppBar.js.map +1 -1
  7. package/dist/app-bar/AppBarTitle.d.ts +0 -3
  8. package/dist/app-bar/AppBarTitle.js +0 -2
  9. package/dist/app-bar/AppBarTitle.js.map +1 -1
  10. package/dist/avatar/Avatar.d.ts +0 -2
  11. package/dist/avatar/Avatar.js +0 -2
  12. package/dist/avatar/Avatar.js.map +1 -1
  13. package/dist/badge/Badge.d.ts +1 -3
  14. package/dist/badge/Badge.js +0 -2
  15. package/dist/badge/Badge.js.map +1 -1
  16. package/dist/box/Box.d.ts +0 -2
  17. package/dist/box/Box.js +0 -2
  18. package/dist/box/Box.js.map +1 -1
  19. package/dist/button/ButtonUnstyled.d.ts +0 -2
  20. package/dist/button/ButtonUnstyled.js +0 -2
  21. package/dist/button/ButtonUnstyled.js.map +1 -1
  22. package/dist/card/Card.d.ts +0 -2
  23. package/dist/card/Card.js +0 -2
  24. package/dist/card/Card.js.map +1 -1
  25. package/dist/card/CardContent.d.ts +0 -2
  26. package/dist/card/CardContent.js +0 -2
  27. package/dist/card/CardContent.js.map +1 -1
  28. package/dist/card/CardFooter.d.ts +0 -3
  29. package/dist/card/CardFooter.js +0 -2
  30. package/dist/card/CardFooter.js.map +1 -1
  31. package/dist/card/CardHeader.d.ts +0 -2
  32. package/dist/card/CardHeader.js +0 -2
  33. package/dist/card/CardHeader.js.map +1 -1
  34. package/dist/card/CardSubtitle.d.ts +0 -3
  35. package/dist/card/CardSubtitle.js +0 -2
  36. package/dist/card/CardSubtitle.js.map +1 -1
  37. package/dist/card/CardTitle.d.ts +0 -3
  38. package/dist/card/CardTitle.js +0 -2
  39. package/dist/card/CardTitle.js.map +1 -1
  40. package/dist/chip/Chip.d.ts +0 -2
  41. package/dist/chip/Chip.js +0 -2
  42. package/dist/chip/Chip.js.map +1 -1
  43. package/dist/dialog/DialogContainer.d.ts +0 -2
  44. package/dist/dialog/DialogContainer.js +0 -2
  45. package/dist/dialog/DialogContainer.js.map +1 -1
  46. package/dist/dialog/DialogContent.d.ts +3 -3
  47. package/dist/dialog/DialogContent.js +3 -3
  48. package/dist/dialog/DialogContent.js.map +1 -1
  49. package/dist/dialog/DialogFooter.d.ts +2 -3
  50. package/dist/dialog/DialogFooter.js +2 -3
  51. package/dist/dialog/DialogFooter.js.map +1 -1
  52. package/dist/dialog/DialogHeader.d.ts +3 -3
  53. package/dist/dialog/DialogHeader.js +3 -3
  54. package/dist/dialog/DialogHeader.js.map +1 -1
  55. package/dist/dialog/DialogTitle.d.ts +3 -4
  56. package/dist/dialog/DialogTitle.js +3 -3
  57. package/dist/dialog/DialogTitle.js.map +1 -1
  58. package/dist/dialog/NestedDialogProvider.d.ts +0 -1
  59. package/dist/divider/Divider.d.ts +0 -2
  60. package/dist/divider/Divider.js +0 -2
  61. package/dist/divider/Divider.js.map +1 -1
  62. package/dist/expansion-panel/ExpansionList.d.ts +1 -1
  63. package/dist/expansion-panel/ExpansionList.js +1 -1
  64. package/dist/expansion-panel/ExpansionList.js.map +1 -1
  65. package/dist/expansion-panel/ExpansionPanel.d.ts +8 -24
  66. package/dist/expansion-panel/ExpansionPanel.js +1 -12
  67. package/dist/expansion-panel/ExpansionPanel.js.map +1 -1
  68. package/dist/expansion-panel/ExpansionPanelHeader.d.ts +0 -1
  69. package/dist/expansion-panel/ExpansionPanelHeader.js +0 -1
  70. package/dist/expansion-panel/ExpansionPanelHeader.js.map +1 -1
  71. package/dist/expansion-panel/expansionPanelStyles.d.ts +19 -0
  72. package/dist/expansion-panel/expansionPanelStyles.js +14 -0
  73. package/dist/expansion-panel/expansionPanelStyles.js.map +1 -0
  74. package/dist/form/Checkbox.d.ts +0 -1
  75. package/dist/form/Fieldset.d.ts +0 -2
  76. package/dist/form/Fieldset.js.map +1 -1
  77. package/dist/form/FormMessage.d.ts +0 -3
  78. package/dist/form/FormMessage.js +0 -2
  79. package/dist/form/FormMessage.js.map +1 -1
  80. package/dist/form/FormMessageContainer.d.ts +0 -1
  81. package/dist/form/FormMessageContainer.js +0 -1
  82. package/dist/form/FormMessageContainer.js.map +1 -1
  83. package/dist/form/FormMessageCounter.d.ts +0 -2
  84. package/dist/form/FormMessageCounter.js +0 -2
  85. package/dist/form/FormMessageCounter.js.map +1 -1
  86. package/dist/form/InputToggle.js.map +1 -1
  87. package/dist/form/InputToggleIcon.d.ts +0 -2
  88. package/dist/form/InputToggleIcon.js +0 -2
  89. package/dist/form/InputToggleIcon.js.map +1 -1
  90. package/dist/form/Label.d.ts +0 -3
  91. package/dist/form/Label.js +0 -2
  92. package/dist/form/Label.js.map +1 -1
  93. package/dist/form/Legend.d.ts +0 -3
  94. package/dist/form/Legend.js +0 -2
  95. package/dist/form/Legend.js.map +1 -1
  96. package/dist/form/MenuItemCheckbox.d.ts +0 -1
  97. package/dist/form/MenuItemRadio.d.ts +0 -1
  98. package/dist/form/MenuItemSwitch.d.ts +0 -1
  99. package/dist/form/NativeSelect.d.ts +0 -2
  100. package/dist/form/NativeSelect.js +0 -2
  101. package/dist/form/NativeSelect.js.map +1 -1
  102. package/dist/form/Option.js.map +1 -1
  103. package/dist/form/Radio.d.ts +0 -1
  104. package/dist/form/SelectedOption.d.ts +0 -2
  105. package/dist/form/SelectedOption.js +0 -2
  106. package/dist/form/SelectedOption.js.map +1 -1
  107. package/dist/form/SliderContainer.d.ts +0 -2
  108. package/dist/form/SliderContainer.js +0 -2
  109. package/dist/form/SliderContainer.js.map +1 -1
  110. package/dist/form/SliderMark.d.ts +0 -2
  111. package/dist/form/SliderMark.js +0 -2
  112. package/dist/form/SliderMark.js.map +1 -1
  113. package/dist/form/SliderMarkLabel.d.ts +0 -2
  114. package/dist/form/SliderMarkLabel.js +0 -2
  115. package/dist/form/SliderMarkLabel.js.map +1 -1
  116. package/dist/form/SliderTrack.d.ts +0 -2
  117. package/dist/form/SliderTrack.js +0 -2
  118. package/dist/form/SliderTrack.js.map +1 -1
  119. package/dist/form/SliderValueMarks.d.ts +0 -2
  120. package/dist/form/SliderValueMarks.js +0 -2
  121. package/dist/form/SliderValueMarks.js.map +1 -1
  122. package/dist/form/Switch.d.ts +0 -2
  123. package/dist/form/Switch.js +0 -2
  124. package/dist/form/Switch.js.map +1 -1
  125. package/dist/form/SwitchTrack.d.ts +2 -1
  126. package/dist/form/SwitchTrack.js +2 -1
  127. package/dist/form/SwitchTrack.js.map +1 -1
  128. package/dist/form/TextField.d.ts +0 -2
  129. package/dist/form/TextField.js +0 -2
  130. package/dist/form/TextField.js.map +1 -1
  131. package/dist/form/TextFieldAddon.d.ts +1 -4
  132. package/dist/form/TextFieldAddon.js +1 -3
  133. package/dist/form/TextFieldAddon.js.map +1 -1
  134. package/dist/icon/FontIcon.d.ts +0 -2
  135. package/dist/icon/FontIcon.js +0 -2
  136. package/dist/icon/FontIcon.js.map +1 -1
  137. package/dist/icon/IconRotator.d.ts +0 -2
  138. package/dist/icon/IconRotator.js +0 -2
  139. package/dist/icon/IconRotator.js.map +1 -1
  140. package/dist/icon/MaterialIcon.d.ts +0 -2
  141. package/dist/icon/MaterialIcon.js +0 -2
  142. package/dist/icon/MaterialIcon.js.map +1 -1
  143. package/dist/icon/MaterialSymbol.d.ts +0 -1
  144. package/dist/icon/MaterialSymbol.js +0 -1
  145. package/dist/icon/MaterialSymbol.js.map +1 -1
  146. package/dist/icon/SVGIcon.d.ts +0 -2
  147. package/dist/icon/SVGIcon.js +0 -2
  148. package/dist/icon/SVGIcon.js.map +1 -1
  149. package/dist/icon/TextIconSpacing.d.ts +0 -2
  150. package/dist/icon/TextIconSpacing.js +0 -2
  151. package/dist/icon/TextIconSpacing.js.map +1 -1
  152. package/dist/icon/_icon.scss +2 -2
  153. package/dist/icon/styles.js +1 -1
  154. package/dist/icon/styles.js.map +1 -1
  155. package/dist/interaction/RippleContainer.d.ts +0 -2
  156. package/dist/interaction/RippleContainer.js +0 -2
  157. package/dist/interaction/RippleContainer.js.map +1 -1
  158. package/dist/layout/LayoutAppBar.d.ts +0 -1
  159. package/dist/layout/LayoutNav.js +1 -2
  160. package/dist/layout/LayoutNav.js.map +1 -1
  161. package/dist/layout/LayoutWindowSplitter.d.ts +0 -1
  162. package/dist/layout/useHorizontalLayoutTransition.js +1 -1
  163. package/dist/layout/useHorizontalLayoutTransition.js.map +1 -1
  164. package/dist/layout/useLayoutTree.d.ts +2 -2
  165. package/dist/layout/useLayoutTree.js.map +1 -1
  166. package/dist/link/Link.d.ts +0 -2
  167. package/dist/link/Link.js +0 -2
  168. package/dist/link/Link.js.map +1 -1
  169. package/dist/list/List.d.ts +0 -20
  170. package/dist/list/List.js +1 -14
  171. package/dist/list/List.js.map +1 -1
  172. package/dist/list/ListItem.d.ts +0 -16
  173. package/dist/list/ListItem.js.map +1 -1
  174. package/dist/list/ListItemAddon.d.ts +0 -2
  175. package/dist/list/ListItemAddon.js +0 -2
  176. package/dist/list/ListItemAddon.js.map +1 -1
  177. package/dist/list/ListItemChildren.d.ts +0 -2
  178. package/dist/list/ListItemChildren.js +0 -2
  179. package/dist/list/ListItemChildren.js.map +1 -1
  180. package/dist/list/ListItemText.d.ts +0 -2
  181. package/dist/list/ListItemText.js +0 -2
  182. package/dist/list/ListItemText.js.map +1 -1
  183. package/dist/list/ListSubheader.d.ts +3 -2
  184. package/dist/list/ListSubheader.js +0 -2
  185. package/dist/list/ListSubheader.js.map +1 -1
  186. package/dist/list/getListItemHeight.d.ts +2 -2
  187. package/dist/list/getListItemHeight.js +2 -2
  188. package/dist/list/getListItemHeight.js.map +1 -1
  189. package/dist/list/listItemStyles.d.ts +17 -1
  190. package/dist/list/listItemStyles.js.map +1 -1
  191. package/dist/list/listStyles.d.ts +18 -0
  192. package/dist/list/listStyles.js +14 -0
  193. package/dist/list/listStyles.js.map +1 -0
  194. package/dist/list/types.d.ts +9 -3
  195. package/dist/list/types.js +6 -1
  196. package/dist/list/types.js.map +1 -1
  197. package/dist/media-queries/AppSizeProvider.d.ts +8 -0
  198. package/dist/media-queries/AppSizeProvider.js +2 -0
  199. package/dist/media-queries/AppSizeProvider.js.map +1 -1
  200. package/dist/media-queries/appSize.d.ts +5 -5
  201. package/dist/media-queries/useMediaQuery.d.ts +1 -1
  202. package/dist/media-queries/useMediaQuery.js +1 -1
  203. package/dist/media-queries/useMediaQuery.js.map +1 -1
  204. package/dist/menu/MenuBar.d.ts +0 -1
  205. package/dist/menu/MenuButton.d.ts +0 -1
  206. package/dist/menu/MenuConfigurationProvider.js.map +1 -1
  207. package/dist/menu/MenuItem.d.ts +0 -1
  208. package/dist/menu/MenuItemButton.d.ts +0 -1
  209. package/dist/menu/useMenuBarProvider.d.ts +0 -1
  210. package/dist/movement/useKeyboardMovementProvider.d.ts +0 -1
  211. package/dist/navigation/NavGroup.d.ts +0 -2
  212. package/dist/navigation/NavGroup.js +0 -2
  213. package/dist/navigation/NavGroup.js.map +1 -1
  214. package/dist/navigation/NavItem.d.ts +0 -2
  215. package/dist/navigation/NavItem.js +0 -2
  216. package/dist/navigation/NavItem.js.map +1 -1
  217. package/dist/navigation/NavSubheader.d.ts +0 -3
  218. package/dist/navigation/NavSubheader.js +0 -2
  219. package/dist/navigation/NavSubheader.js.map +1 -1
  220. package/dist/progress/CircularProgress.d.ts +0 -2
  221. package/dist/progress/CircularProgress.js +0 -2
  222. package/dist/progress/CircularProgress.js.map +1 -1
  223. package/dist/progress/LinearProgress.d.ts +0 -2
  224. package/dist/progress/LinearProgress.js +0 -2
  225. package/dist/progress/LinearProgress.js.map +1 -1
  226. package/dist/responsive-item/ResponsiveItemContainer.d.ts +0 -2
  227. package/dist/responsive-item/ResponsiveItemContainer.js +0 -2
  228. package/dist/responsive-item/ResponsiveItemContainer.js.map +1 -1
  229. package/dist/responsive-item/ResponsiveItemOverlay.d.ts +0 -2
  230. package/dist/responsive-item/ResponsiveItemOverlay.js +0 -2
  231. package/dist/responsive-item/ResponsiveItemOverlay.js.map +1 -1
  232. package/dist/segmented-button/SegmentedButtonContainer.d.ts +0 -2
  233. package/dist/segmented-button/SegmentedButtonContainer.js +0 -2
  234. package/dist/segmented-button/SegmentedButtonContainer.js.map +1 -1
  235. package/dist/sheet/Sheet.d.ts +30 -16
  236. package/dist/sheet/Sheet.js +24 -14
  237. package/dist/sheet/Sheet.js.map +1 -1
  238. package/dist/sheet/styles.d.ts +29 -0
  239. package/dist/sheet/styles.js +13 -0
  240. package/dist/sheet/styles.js.map +1 -1
  241. package/dist/snackbar/ToastActionButton.d.ts +0 -1
  242. package/dist/snackbar/ToastCloseButton.d.ts +0 -1
  243. package/dist/snackbar/ToastManager.js.map +1 -1
  244. package/dist/snackbar/useCurrentToastActions.d.ts +0 -1
  245. package/dist/suspense/CircularProgressSuspense.d.ts +0 -2
  246. package/dist/suspense/CircularProgressSuspense.js +0 -2
  247. package/dist/suspense/CircularProgressSuspense.js.map +1 -1
  248. package/dist/suspense/NullSuspense.d.ts +0 -2
  249. package/dist/suspense/NullSuspense.js +0 -2
  250. package/dist/suspense/NullSuspense.js.map +1 -1
  251. package/dist/table/TableCellContent.d.ts +0 -3
  252. package/dist/table/TableCellContent.js +0 -3
  253. package/dist/table/TableCellContent.js.map +1 -1
  254. package/dist/table/TableConfigurationProvider.d.ts +0 -1
  255. package/dist/tabs/Tab.d.ts +3 -0
  256. package/dist/tabs/Tab.js.map +1 -1
  257. package/dist/tabs/TabListScrollButton.js +5 -1
  258. package/dist/tabs/TabListScrollButton.js.map +1 -1
  259. package/dist/tabs/_tabs.scss +21 -3
  260. package/dist/tabs/tabListScrollButtonStyles.d.ts +2 -0
  261. package/dist/tabs/tabListScrollButtonStyles.js +9 -5
  262. package/dist/tabs/tabListScrollButtonStyles.js.map +1 -1
  263. package/dist/tabs/useTabList.d.ts +2 -0
  264. package/dist/tabs/useTabList.js +4 -2
  265. package/dist/tabs/useTabList.js.map +1 -1
  266. package/dist/tabs/useTabs.d.ts +33 -11
  267. package/dist/tabs/useTabs.js +9 -3
  268. package/dist/tabs/useTabs.js.map +1 -1
  269. package/dist/test-utils/IntersectionObserver.js.map +1 -1
  270. package/dist/test-utils/data-testid.d.ts +0 -1
  271. package/dist/theme/useColorScheme.d.ts +0 -1
  272. package/dist/transition/SlideContainer.d.ts +2 -48
  273. package/dist/transition/SlideContainer.js +2 -48
  274. package/dist/transition/SlideContainer.js.map +1 -1
  275. package/dist/tree/DefaultTreeItemRenderer.d.ts +2 -3
  276. package/dist/tree/DefaultTreeItemRenderer.js +1 -1
  277. package/dist/tree/DefaultTreeItemRenderer.js.map +1 -1
  278. package/dist/tree/Tree.d.ts +3 -4
  279. package/dist/tree/Tree.js.map +1 -1
  280. package/dist/tree/TreeItem.d.ts +10 -3
  281. package/dist/tree/TreeItem.js +5 -2
  282. package/dist/tree/TreeItem.js.map +1 -1
  283. package/dist/tree/types.d.ts +11 -6
  284. package/dist/tree/types.js +1 -26
  285. package/dist/tree/types.js.map +1 -1
  286. package/dist/tree/useTree.d.ts +3 -3
  287. package/dist/tree/useTree.js.map +1 -1
  288. package/dist/tree/useTreeExpansion.d.ts +3 -3
  289. package/dist/tree/useTreeExpansion.js.map +1 -1
  290. package/dist/tree/useTreeSelection.d.ts +3 -3
  291. package/dist/tree/useTreeSelection.js.map +1 -1
  292. package/dist/typography/SrOnly.d.ts +2 -1
  293. package/dist/typography/SrOnly.js +2 -1
  294. package/dist/typography/SrOnly.js.map +1 -1
  295. package/dist/typography/TextContainer.d.ts +0 -2
  296. package/dist/typography/TextContainer.js +0 -2
  297. package/dist/typography/TextContainer.js.map +1 -1
  298. package/dist/typography/Typography.d.ts +0 -2
  299. package/dist/typography/Typography.js +0 -2
  300. package/dist/typography/Typography.js.map +1 -1
  301. package/dist/typography/WritingDirectionProvider.d.ts +2 -2
  302. package/dist/typography/WritingDirectionProvider.js +2 -2
  303. package/dist/typography/WritingDirectionProvider.js.map +1 -1
  304. package/dist/useResizeListener.d.ts +7 -1
  305. package/dist/useResizeListener.js.map +1 -1
  306. package/dist/useResizeObserver.d.ts +3 -3
  307. package/dist/useResizeObserver.js.map +1 -1
  308. package/dist/useToggle.d.ts +4 -4
  309. package/dist/useToggle.js +1 -1
  310. package/dist/useToggle.js.map +1 -1
  311. package/dist/window-splitter/WindowSplitter.d.ts +2 -2
  312. package/dist/window-splitter/WindowSplitter.js +2 -2
  313. package/dist/window-splitter/WindowSplitter.js.map +1 -1
  314. package/package.json +15 -15
  315. package/src/RootHtml.tsx +0 -2
  316. package/src/app-bar/AppBar.tsx +0 -2
  317. package/src/app-bar/AppBarTitle.tsx +0 -2
  318. package/src/avatar/Avatar.tsx +0 -2
  319. package/src/badge/Badge.tsx +1 -3
  320. package/src/box/Box.tsx +0 -2
  321. package/src/button/ButtonUnstyled.tsx +0 -2
  322. package/src/card/Card.tsx +0 -2
  323. package/src/card/CardContent.tsx +0 -2
  324. package/src/card/CardFooter.tsx +0 -2
  325. package/src/card/CardHeader.tsx +0 -2
  326. package/src/card/CardSubtitle.tsx +0 -2
  327. package/src/card/CardTitle.tsx +0 -2
  328. package/src/chip/Chip.tsx +0 -2
  329. package/src/dialog/DialogContainer.tsx +0 -2
  330. package/src/dialog/DialogContent.tsx +3 -3
  331. package/src/dialog/DialogFooter.tsx +2 -3
  332. package/src/dialog/DialogHeader.tsx +3 -3
  333. package/src/dialog/DialogTitle.tsx +3 -3
  334. package/src/divider/Divider.tsx +0 -2
  335. package/src/expansion-panel/ExpansionList.tsx +1 -1
  336. package/src/expansion-panel/ExpansionPanel.tsx +9 -38
  337. package/src/expansion-panel/ExpansionPanelHeader.tsx +0 -1
  338. package/src/expansion-panel/expansionPanelStyles.ts +33 -0
  339. package/src/form/Fieldset.tsx +0 -2
  340. package/src/form/FormMessage.tsx +0 -2
  341. package/src/form/FormMessageContainer.tsx +0 -1
  342. package/src/form/FormMessageCounter.tsx +0 -2
  343. package/src/form/InputToggle.tsx +1 -1
  344. package/src/form/InputToggleIcon.tsx +0 -2
  345. package/src/form/Label.tsx +0 -2
  346. package/src/form/Legend.tsx +0 -2
  347. package/src/form/NativeSelect.tsx +0 -2
  348. package/src/form/Option.tsx +1 -1
  349. package/src/form/SelectedOption.tsx +0 -2
  350. package/src/form/SliderContainer.tsx +0 -2
  351. package/src/form/SliderMark.tsx +0 -2
  352. package/src/form/SliderMarkLabel.tsx +0 -2
  353. package/src/form/SliderTrack.tsx +0 -2
  354. package/src/form/SliderValueMarks.tsx +0 -2
  355. package/src/form/Switch.tsx +0 -2
  356. package/src/form/SwitchTrack.tsx +2 -1
  357. package/src/form/TextField.tsx +0 -2
  358. package/src/form/TextFieldAddon.tsx +1 -3
  359. package/src/icon/FontIcon.tsx +0 -2
  360. package/src/icon/IconRotator.tsx +0 -2
  361. package/src/icon/MaterialIcon.tsx +0 -2
  362. package/src/icon/MaterialSymbol.tsx +0 -1
  363. package/src/icon/SVGIcon.tsx +0 -2
  364. package/src/icon/TextIconSpacing.tsx +0 -2
  365. package/src/icon/styles.ts +1 -1
  366. package/src/interaction/RippleContainer.tsx +0 -2
  367. package/src/layout/LayoutNav.tsx +3 -2
  368. package/src/layout/useHorizontalLayoutTransition.ts +1 -1
  369. package/src/layout/useLayoutTree.ts +2 -2
  370. package/src/link/Link.tsx +0 -2
  371. package/src/list/List.tsx +1 -33
  372. package/src/list/ListItem.tsx +0 -17
  373. package/src/list/ListItemAddon.tsx +0 -2
  374. package/src/list/ListItemChildren.tsx +0 -2
  375. package/src/list/ListItemText.tsx +0 -2
  376. package/src/list/ListSubheader.tsx +3 -2
  377. package/src/list/getListItemHeight.ts +2 -2
  378. package/src/list/listItemStyles.ts +21 -4
  379. package/src/list/listStyles.ts +31 -0
  380. package/src/list/types.ts +9 -3
  381. package/src/media-queries/AppSizeProvider.tsx +8 -0
  382. package/src/media-queries/useMediaQuery.ts +1 -1
  383. package/src/menu/MenuConfigurationProvider.tsx +2 -2
  384. package/src/navigation/NavGroup.tsx +0 -2
  385. package/src/navigation/NavItem.tsx +0 -2
  386. package/src/navigation/NavSubheader.tsx +0 -2
  387. package/src/progress/CircularProgress.tsx +0 -2
  388. package/src/progress/LinearProgress.tsx +0 -2
  389. package/src/responsive-item/ResponsiveItemContainer.tsx +0 -2
  390. package/src/responsive-item/ResponsiveItemOverlay.tsx +0 -2
  391. package/src/segmented-button/SegmentedButtonContainer.tsx +0 -2
  392. package/src/sheet/Sheet.tsx +36 -33
  393. package/src/sheet/styles.ts +50 -0
  394. package/src/suspense/CircularProgressSuspense.tsx +0 -2
  395. package/src/suspense/NullSuspense.tsx +0 -2
  396. package/src/table/TableCellContent.tsx +0 -3
  397. package/src/tabs/Tab.tsx +3 -0
  398. package/src/tabs/TabListScrollButton.tsx +9 -2
  399. package/src/tabs/tabListScrollButtonStyles.ts +9 -5
  400. package/src/tabs/useTabList.ts +4 -0
  401. package/src/tabs/useTabs.ts +61 -14
  402. package/src/test-utils/IntersectionObserver.ts +1 -1
  403. package/src/transition/SlideContainer.tsx +2 -48
  404. package/src/tree/DefaultTreeItemRenderer.tsx +3 -4
  405. package/src/tree/Tree.tsx +4 -6
  406. package/src/tree/TreeItem.tsx +11 -4
  407. package/src/tree/types.ts +16 -6
  408. package/src/tree/useTree.ts +3 -3
  409. package/src/tree/useTreeExpansion.ts +3 -3
  410. package/src/tree/useTreeSelection.ts +3 -3
  411. package/src/typography/SrOnly.tsx +2 -1
  412. package/src/typography/TextContainer.tsx +0 -2
  413. package/src/typography/Typography.tsx +0 -2
  414. package/src/typography/WritingDirectionProvider.tsx +2 -2
  415. package/src/useResizeListener.ts +7 -1
  416. package/src/useResizeObserver.ts +3 -3
  417. package/src/useToggle.ts +4 -4
  418. package/src/window-splitter/WindowSplitter.tsx +2 -2
  419. package/.eslintrc.cjs +0 -34
  420. package/.stylelintrc.json +0 -14
  421. package/.swcrc +0 -17
  422. package/.turbo/turbo-build.log +0 -22
  423. package/.turbo/turbo-lint.log +0 -12
  424. package/.turbo/turbo-test.log +0 -5516
  425. package/.turbo/turbo-typecheck.log +0 -4
  426. package/CHANGELOG.md +0 -323
  427. package/coverage/clover.xml +0 -842
  428. package/coverage/coverage-final.json +0 -6
  429. package/coverage/lcov-report/autocomplete/Autocomplete.tsx.html +0 -1033
  430. package/coverage/lcov-report/autocomplete/AutocompleteClearButton.tsx.html +0 -262
  431. package/coverage/lcov-report/autocomplete/FilterAutocompleteOptions.tsx.html +0 -364
  432. package/coverage/lcov-report/autocomplete/index.html +0 -146
  433. package/coverage/lcov-report/base.css +0 -224
  434. package/coverage/lcov-report/block-navigation.js +0 -87
  435. package/coverage/lcov-report/button/Button.tsx.html +0 -676
  436. package/coverage/lcov-report/button/index.html +0 -116
  437. package/coverage/lcov-report/card/Card.tsx.html +0 -349
  438. package/coverage/lcov-report/card/CardSubtitle.tsx.html +0 -265
  439. package/coverage/lcov-report/card/index.html +0 -146
  440. package/coverage/lcov-report/card/styles.ts.html +0 -682
  441. package/coverage/lcov-report/createHorizontalPosition.ts.html +0 -1075
  442. package/coverage/lcov-report/createVerticalPosition.ts.html +0 -997
  443. package/coverage/lcov-report/favicon.png +0 -0
  444. package/coverage/lcov-report/form/Option.tsx.html +0 -727
  445. package/coverage/lcov-report/form/index.html +0 -131
  446. package/coverage/lcov-report/form/useListboxProvider.ts.html +0 -253
  447. package/coverage/lcov-report/index.html +0 -146
  448. package/coverage/lcov-report/prettify.css +0 -1
  449. package/coverage/lcov-report/prettify.js +0 -2
  450. package/coverage/lcov-report/searching/fuzzy.ts.html +0 -607
  451. package/coverage/lcov-report/searching/index.html +0 -116
  452. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  453. package/coverage/lcov-report/sorter.js +0 -196
  454. package/coverage/lcov-report/src/card/Card.tsx.html +0 -349
  455. package/coverage/lcov-report/src/card/CardSubtitle.tsx.html +0 -277
  456. package/coverage/lcov-report/src/card/index.html +0 -146
  457. package/coverage/lcov-report/src/card/styles.ts.html +0 -682
  458. package/coverage/lcov-report/src/cssUtils.ts.html +0 -787
  459. package/coverage/lcov-report/src/index.html +0 -116
  460. package/coverage/lcov-report/src/transition/index.html +0 -116
  461. package/coverage/lcov-report/src/transition/useCSSTransition.ts.html +0 -766
  462. package/coverage/lcov-report/transition/index.html +0 -116
  463. package/coverage/lcov-report/transition/useCSSTransition.ts.html +0 -766
  464. package/coverage/lcov-report/typography/SrOnly.tsx.html +0 -325
  465. package/coverage/lcov-report/typography/index.html +0 -116
  466. package/coverage/lcov-report/utils.ts.html +0 -1225
  467. package/coverage/lcov.info +0 -952
  468. package/jest.config.ts +0 -68
  469. package/jest.setup.ts +0 -3
  470. package/scripts/copySassFiles.ts +0 -70
  471. package/scripts/getExportMap.ts +0 -66
  472. package/scripts/tsconfig.json +0 -18
  473. package/src/__tests__/NoSsr.node.tsx +0 -26
  474. package/src/__tests__/NoSsr.tsx +0 -89
  475. package/src/__tests__/RootHtml.node.tsx +0 -46
  476. package/src/__tests__/__snapshots__/RootHtml.node.tsx.snap +0 -19
  477. package/src/__tests__/useAsyncFunction.tsx +0 -124
  478. package/src/__tests__/useDebouncedFunction.tsx +0 -108
  479. package/src/__tests__/useDropzone.tsx +0 -131
  480. package/src/__tests__/useElementSize.tsx +0 -181
  481. package/src/__tests__/useEnsuredId.tsx +0 -25
  482. package/src/__tests__/useEnsuredState.tsx +0 -74
  483. package/src/__tests__/useHtmlClassName.tsx +0 -54
  484. package/src/__tests__/useLocalStorage.tsx +0 -377
  485. package/src/__tests__/useOrientation.node.tsx +0 -20
  486. package/src/__tests__/useOrientation.tsx +0 -63
  487. package/src/__tests__/useResizeObserver.tsx +0 -258
  488. package/src/__tests__/useThrottledFunction.tsx +0 -226
  489. package/src/__tests__/useToggle.tsx +0 -78
  490. package/src/__tests__/useWindowSize.node.tsx +0 -56
  491. package/src/__tests__/useWindowSize.tsx +0 -155
  492. package/src/_box-shadows.scss +0 -219
  493. package/src/_core.scss +0 -432
  494. package/src/_utils.scss +0 -348
  495. package/src/app-bar/__tests__/AppBar.tsx +0 -121
  496. package/src/app-bar/__tests__/AppBarTitle.tsx +0 -39
  497. package/src/app-bar/__tests__/__snapshots__/AppBar.tsx.snap +0 -186
  498. package/src/app-bar/__tests__/__snapshots__/AppBarTitle.tsx.snap +0 -47
  499. package/src/app-bar/_app-bar.scss +0 -248
  500. package/src/autocomplete/__tests__/Autocomplete.tsx +0 -458
  501. package/src/autocomplete/__tests__/__snapshots__/Autocomplete.tsx.snap +0 -144
  502. package/src/autocomplete/_autocomplete.scss +0 -75
  503. package/src/avatar/__tests__/Avatar.tsx +0 -75
  504. package/src/avatar/__tests__/__snapshots__/Avatar.tsx.snap +0 -73
  505. package/src/avatar/_avatar.scss +0 -157
  506. package/src/badge/__tests__/Badge.tsx +0 -42
  507. package/src/badge/__tests__/__snapshots__/Badge.tsx.snap +0 -54
  508. package/src/badge/_badge.scss +0 -145
  509. package/src/box/__tests__/Box.tsx +0 -158
  510. package/src/box/__tests__/__snapshots__/Box.tsx.snap +0 -544
  511. package/src/box/_box.scss +0 -168
  512. package/src/button/__tests__/AsyncButton.tsx +0 -211
  513. package/src/button/__tests__/Button.tsx +0 -198
  514. package/src/button/__tests__/ButtonUnstyled.tsx +0 -37
  515. package/src/button/__tests__/TooltippedButton.tsx +0 -60
  516. package/src/button/__tests__/__snapshots__/AsyncButton.tsx.snap +0 -418
  517. package/src/button/__tests__/__snapshots__/Button.tsx.snap +0 -573
  518. package/src/button/__tests__/__snapshots__/ButtonUnstyled.tsx.snap +0 -22
  519. package/src/button/__tests__/__snapshots__/TooltippedButton.tsx.snap +0 -26
  520. package/src/button/__tests__/__snapshots__/buttonStyles.ts.snap +0 -11
  521. package/src/button/__tests__/buttonStyles.ts +0 -15
  522. package/src/button/_button.scss +0 -330
  523. package/src/card/__tests__/Card.tsx +0 -37
  524. package/src/card/__tests__/CardContent.tsx +0 -40
  525. package/src/card/__tests__/CardFooter.tsx +0 -34
  526. package/src/card/__tests__/CardHeader.tsx +0 -66
  527. package/src/card/__tests__/CardSubtitle.tsx +0 -30
  528. package/src/card/__tests__/CardTitle.tsx +0 -30
  529. package/src/card/__tests__/ClickableCard.tsx +0 -66
  530. package/src/card/__tests__/__snapshots__/Card.tsx.snap +0 -40
  531. package/src/card/__tests__/__snapshots__/CardContent.tsx.snap +0 -50
  532. package/src/card/__tests__/__snapshots__/CardFooter.tsx.snap +0 -30
  533. package/src/card/__tests__/__snapshots__/CardHeader.tsx.snap +0 -74
  534. package/src/card/__tests__/__snapshots__/CardSubtitle.tsx.snap +0 -18
  535. package/src/card/__tests__/__snapshots__/CardTitle.tsx.snap +0 -18
  536. package/src/card/__tests__/__snapshots__/ClickableCard.tsx.snap +0 -20
  537. package/src/card/__tests__/__snapshots__/styles.ts.snap +0 -13
  538. package/src/card/__tests__/styles.ts +0 -45
  539. package/src/card/_card.scss +0 -189
  540. package/src/chip/__tests__/Chip.tsx +0 -327
  541. package/src/chip/__tests__/__snapshots__/Chip.tsx.snap +0 -597
  542. package/src/chip/__tests__/__snapshots__/styles.ts.snap +0 -5
  543. package/src/chip/__tests__/styles.ts +0 -14
  544. package/src/chip/_chip.scss +0 -324
  545. package/src/dialog/__tests__/Dialog.tsx +0 -316
  546. package/src/dialog/__tests__/DialogContent.tsx +0 -53
  547. package/src/dialog/__tests__/DialogFooter.tsx +0 -70
  548. package/src/dialog/__tests__/DialogHeader.tsx +0 -37
  549. package/src/dialog/__tests__/DialogTitle.tsx +0 -41
  550. package/src/dialog/__tests__/__snapshots__/Dialog.tsx.snap +0 -84
  551. package/src/dialog/__tests__/__snapshots__/DialogContent.tsx.snap +0 -36
  552. package/src/dialog/__tests__/__snapshots__/DialogFooter.tsx.snap +0 -186
  553. package/src/dialog/__tests__/__snapshots__/DialogHeader.tsx.snap +0 -18
  554. package/src/dialog/__tests__/__snapshots__/DialogTitle.tsx.snap +0 -26
  555. package/src/dialog/_dialog.scss +0 -273
  556. package/src/divider/__tests__/Divider.tsx +0 -36
  557. package/src/divider/__tests__/__snapshots__/Divider.tsx.snap +0 -26
  558. package/src/divider/_divider.scss +0 -124
  559. package/src/draggable/__tests__/__snapshots__/useDraggable.tsx.snap +0 -49
  560. package/src/draggable/__tests__/useDraggable.tsx +0 -540
  561. package/src/draggable/_draggable.scss +0 -29
  562. package/src/expansion-panel/__tests__/ExpansionPanel.tsx +0 -290
  563. package/src/expansion-panel/__tests__/__snapshots__/ExpansionPanel.tsx.snap +0 -197
  564. package/src/expansion-panel/_expansion-panel.scss +0 -107
  565. package/src/focus/__tests__/useFocusContainer.tsx +0 -280
  566. package/src/form/__tests__/Checkbox.tsx +0 -42
  567. package/src/form/__tests__/Fieldset.tsx +0 -44
  568. package/src/form/__tests__/FileInput.tsx +0 -120
  569. package/src/form/__tests__/Label.tsx +0 -69
  570. package/src/form/__tests__/Legend.tsx +0 -34
  571. package/src/form/__tests__/MenuItemCheckbox.tsx +0 -53
  572. package/src/form/__tests__/MenuItemRadio.tsx +0 -53
  573. package/src/form/__tests__/Radio.tsx +0 -35
  574. package/src/form/__tests__/Select.tsx +0 -439
  575. package/src/form/__tests__/Switch.tsx +0 -152
  576. package/src/form/__tests__/TextArea.tsx +0 -433
  577. package/src/form/__tests__/TextField.tsx +0 -195
  578. package/src/form/__tests__/__snapshots__/Checkbox.tsx.snap +0 -99
  579. package/src/form/__tests__/__snapshots__/Fieldset.tsx.snap +0 -58
  580. package/src/form/__tests__/__snapshots__/FileInput.tsx.snap +0 -612
  581. package/src/form/__tests__/__snapshots__/Label.tsx.snap +0 -140
  582. package/src/form/__tests__/__snapshots__/Legend.tsx.snap +0 -30
  583. package/src/form/__tests__/__snapshots__/MenuItemCheckbox.tsx.snap +0 -96
  584. package/src/form/__tests__/__snapshots__/MenuItemRadio.tsx.snap +0 -96
  585. package/src/form/__tests__/__snapshots__/Radio.tsx.snap +0 -99
  586. package/src/form/__tests__/__snapshots__/Select.tsx.snap +0 -492
  587. package/src/form/__tests__/__snapshots__/Switch.tsx.snap +0 -428
  588. package/src/form/__tests__/__snapshots__/TextArea.tsx.snap +0 -548
  589. package/src/form/__tests__/__snapshots__/TextField.tsx.snap +0 -279
  590. package/src/form/__tests__/__snapshots__/useCheckboxGroup.tsx.snap +0 -481
  591. package/src/form/__tests__/__snapshots__/useRadioGroup.tsx.snap +0 -704
  592. package/src/form/__tests__/useCheckboxGroup.tsx +0 -292
  593. package/src/form/__tests__/useFileUpload.tsx +0 -289
  594. package/src/form/__tests__/useFormReset.tsx +0 -194
  595. package/src/form/__tests__/useRadioGroup.tsx +0 -227
  596. package/src/form/__tests__/utils.ts +0 -247
  597. package/src/form/_form.scss +0 -2190
  598. package/src/icon/__tests__/FontIcon.tsx +0 -45
  599. package/src/icon/__tests__/IconRotator.tsx +0 -120
  600. package/src/icon/__tests__/MaterialIcon.tsx +0 -79
  601. package/src/icon/__tests__/MaterialSymbol.tsx +0 -100
  602. package/src/icon/__tests__/SVGIcon.tsx +0 -40
  603. package/src/icon/__tests__/TextIconSpacing.tsx +0 -108
  604. package/src/icon/__tests__/__snapshots__/FontIcon.tsx.snap +0 -35
  605. package/src/icon/__tests__/__snapshots__/IconRotator.tsx.snap +0 -165
  606. package/src/icon/__tests__/__snapshots__/MaterialIcon.tsx.snap +0 -82
  607. package/src/icon/__tests__/__snapshots__/MaterialSymbol.tsx.snap +0 -42
  608. package/src/icon/__tests__/__snapshots__/SVGIcon.tsx.snap +0 -47
  609. package/src/icon/__tests__/__snapshots__/TextIconSpacing.tsx.snap +0 -101
  610. package/src/icon/__tests__/__snapshots__/styles.ts.snap +0 -29
  611. package/src/icon/__tests__/styles.ts +0 -28
  612. package/src/icon/_icon.scss +0 -213
  613. package/src/interaction/__tests__/UserInteractionModeProvider.tsx +0 -121
  614. package/src/interaction/__tests__/__snapshots__/useHigherContrastChildren.tsx.snap +0 -79
  615. package/src/interaction/__tests__/useHigherContrastChildren.tsx +0 -97
  616. package/src/interaction/_interaction.scss +0 -436
  617. package/src/layout/__tests__/LayoutAppBar.tsx +0 -117
  618. package/src/layout/__tests__/LayoutNav.tsx +0 -78
  619. package/src/layout/__tests__/LayoutWindowSplitter.tsx +0 -63
  620. package/src/layout/__tests__/Main.tsx +0 -51
  621. package/src/layout/__tests__/__snapshots__/LayoutAppBar.tsx.snap +0 -78
  622. package/src/layout/__tests__/__snapshots__/LayoutNav.tsx.snap +0 -31
  623. package/src/layout/__tests__/__snapshots__/LayoutWindowSplitter.tsx.snap +0 -60
  624. package/src/layout/__tests__/__snapshots__/Main.tsx.snap +0 -32
  625. package/src/layout/__tests__/__snapshots__/useExpandableLayout.tsx.snap +0 -116
  626. package/src/layout/__tests__/__snapshots__/useLayoutTree.tsx.snap +0 -676
  627. package/src/layout/__tests__/__snapshots__/useResizableLayout.tsx.snap +0 -95
  628. package/src/layout/__tests__/__snapshots__/useTemporaryLayout.tsx.snap +0 -141
  629. package/src/layout/__tests__/useExpandableLayout.tsx +0 -279
  630. package/src/layout/__tests__/useLayoutTree.tsx +0 -212
  631. package/src/layout/__tests__/useResizableLayout.tsx +0 -170
  632. package/src/layout/__tests__/useTemporaryLayout.tsx +0 -109
  633. package/src/layout/_layout.scss +0 -163
  634. package/src/link/__tests__/Link.tsx +0 -31
  635. package/src/link/__tests__/SkipToMainContent.tsx +0 -125
  636. package/src/link/__tests__/__snapshots__/Link.tsx.snap +0 -20
  637. package/src/link/__tests__/__snapshots__/SkipToMainContent.tsx.snap +0 -22
  638. package/src/link/_link.scss +0 -149
  639. package/src/list/__tests__/List.tsx +0 -58
  640. package/src/list/__tests__/ListItem.tsx +0 -280
  641. package/src/list/__tests__/ListItemLink.tsx +0 -89
  642. package/src/list/__tests__/ListSubheader.tsx +0 -81
  643. package/src/list/__tests__/__snapshots__/List.tsx.snap +0 -41
  644. package/src/list/__tests__/__snapshots__/ListItem.tsx.snap +0 -414
  645. package/src/list/__tests__/__snapshots__/ListItemLink.tsx.snap +0 -73
  646. package/src/list/__tests__/__snapshots__/ListSubheader.tsx.snap +0 -99
  647. package/src/list/__tests__/getListItemHeight.ts +0 -176
  648. package/src/list/_list.scss +0 -322
  649. package/src/media-queries/__tests__/AppSizeProvider.node.tsx +0 -37
  650. package/src/media-queries/__tests__/AppSizeProvider.tsx +0 -119
  651. package/src/media-queries/__tests__/useMediaQuery.node.tsx +0 -20
  652. package/src/media-queries/__tests__/useMediaQuery.tsx +0 -59
  653. package/src/media-queries/_media-queries.scss +0 -63
  654. package/src/menu/__tests__/DropdownMenu.tsx +0 -627
  655. package/src/menu/__tests__/MenuBar.tsx +0 -354
  656. package/src/menu/__tests__/MenuItemCircularProgress.tsx +0 -39
  657. package/src/menu/__tests__/MenuVisibilityProvider.tsx +0 -34
  658. package/src/menu/__tests__/__snapshots__/DropdownMenu.tsx.snap +0 -292
  659. package/src/menu/__tests__/__snapshots__/MenuBar.tsx.snap +0 -87
  660. package/src/menu/__tests__/__snapshots__/MenuItemCircularProgress.tsx.snap +0 -68
  661. package/src/menu/__tests__/__snapshots__/useContextMenu.tsx.snap +0 -54
  662. package/src/menu/__tests__/useContextMenu.tsx +0 -41
  663. package/src/menu/__tests__/utils.ts +0 -121
  664. package/src/menu/_menu.scss +0 -116
  665. package/src/movement/__tests__/findMatchIndex.ts +0 -244
  666. package/src/movement/__tests__/utils.ts +0 -710
  667. package/src/navigation/__tests__/Navigation.tsx +0 -97
  668. package/src/navigation/__tests__/__snapshots__/Navigation.tsx.snap +0 -165
  669. package/src/navigation/_navigation.scss +0 -99
  670. package/src/overlay/__tests__/Overlay.tsx +0 -198
  671. package/src/overlay/__tests__/__snapshots__/Overlay.tsx.snap +0 -77
  672. package/src/overlay/_overlay.scss +0 -74
  673. package/src/portal/__tests__/PortalContainerProvider.node.tsx +0 -26
  674. package/src/portal/__tests__/PortalContainerProvider.tsx +0 -84
  675. package/src/positioning/__tests__/__snapshots__/useFixedPositioning.tsx.snap +0 -87
  676. package/src/positioning/__tests__/createHorizontalPosition.ts +0 -777
  677. package/src/positioning/__tests__/createVerticalPosition.ts +0 -464
  678. package/src/positioning/__tests__/useFixedPositioning.tsx +0 -205
  679. package/src/positioning/__tests__/utils.ts +0 -1311
  680. package/src/progress/__tests__/CircularProgress.tsx +0 -153
  681. package/src/progress/__tests__/LinearProgress.tsx +0 -131
  682. package/src/progress/__tests__/__snapshots__/CircularProgress.tsx.snap +0 -499
  683. package/src/progress/__tests__/__snapshots__/LinearProgress.tsx.snap +0 -321
  684. package/src/progress/__tests__/getProgressA11y.ts +0 -16
  685. package/src/progress/_progress.scss +0 -577
  686. package/src/responsive-item/__tests__/ResponsiveItemContainer.tsx +0 -56
  687. package/src/responsive-item/__tests__/ResponsiveItemOverlay.tsx +0 -66
  688. package/src/responsive-item/__tests__/__snapshots__/ResponsiveItemContainer.tsx.snap +0 -85
  689. package/src/responsive-item/__tests__/__snapshots__/ResponsiveItemOverlay.tsx.snap +0 -151
  690. package/src/responsive-item/__tests__/__snapshots__/styles.ts.snap +0 -9
  691. package/src/responsive-item/__tests__/styles.ts +0 -32
  692. package/src/responsive-item/_responsive-item.scss +0 -199
  693. package/src/searching/__tests__/caseInsensitive.ts +0 -165
  694. package/src/searching/__tests__/fuzzy.ts +0 -169
  695. package/src/searching/__tests__/toSearchQuery.ts +0 -21
  696. package/src/searching/__tests__/useFuzzyMatch.tsx +0 -200
  697. package/src/segmented-button/__tests__/SegmentedButton.tsx +0 -61
  698. package/src/segmented-button/__tests__/SegmentedButtonContainer.tsx +0 -38
  699. package/src/segmented-button/__tests__/__snapshots__/SegmentedButton.tsx.snap +0 -116
  700. package/src/segmented-button/__tests__/__snapshots__/SegmentedButtonContainer.tsx.snap +0 -22
  701. package/src/segmented-button/_segmented-button.scss +0 -208
  702. package/src/sheet/_sheet.scss +0 -189
  703. package/src/snackbar/__tests__/Snackbar.tsx +0 -85
  704. package/src/snackbar/__tests__/Toast.tsx +0 -105
  705. package/src/snackbar/__tests__/ToastActionButton.tsx +0 -112
  706. package/src/snackbar/__tests__/ToastCloseButton.tsx +0 -140
  707. package/src/snackbar/__tests__/ToastContent.tsx +0 -88
  708. package/src/snackbar/__tests__/ToastManagerProvider.tsx +0 -852
  709. package/src/snackbar/__tests__/__snapshots__/Snackbar.tsx.snap +0 -176
  710. package/src/snackbar/__tests__/__snapshots__/Toast.tsx.snap +0 -52
  711. package/src/snackbar/__tests__/__snapshots__/ToastActionButton.tsx.snap +0 -36
  712. package/src/snackbar/__tests__/__snapshots__/ToastCloseButton.tsx.snap +0 -104
  713. package/src/snackbar/__tests__/__snapshots__/ToastContent.tsx.snap +0 -26
  714. package/src/snackbar/__tests__/__snapshots__/ToastManagerProvider.tsx.snap +0 -290
  715. package/src/snackbar/_snackbar.scss +0 -266
  716. package/src/suspense/__tests__/CircularProgressSuspense.tsx +0 -90
  717. package/src/suspense/__tests__/NullSuspense.tsx +0 -46
  718. package/src/suspense/__tests__/__snapshots__/CircularProgressSuspense.tsx.snap +0 -24
  719. package/src/table/__tests__/Table.tsx +0 -315
  720. package/src/table/__tests__/TableBody.tsx +0 -52
  721. package/src/table/__tests__/TableCheckbox.tsx +0 -89
  722. package/src/table/__tests__/TableContainer.tsx +0 -31
  723. package/src/table/__tests__/TableRadio.tsx +0 -112
  724. package/src/table/__tests__/TableRow.tsx +0 -63
  725. package/src/table/__tests__/__snapshots__/Table.tsx.snap +0 -2426
  726. package/src/table/__tests__/__snapshots__/TableBody.tsx.snap +0 -54
  727. package/src/table/__tests__/__snapshots__/TableCheckbox.tsx.snap +0 -142
  728. package/src/table/__tests__/__snapshots__/TableContainer.tsx.snap +0 -16
  729. package/src/table/__tests__/__snapshots__/TableRadio.tsx.snap +0 -138
  730. package/src/table/__tests__/__snapshots__/TableRow.tsx.snap +0 -56
  731. package/src/table/__tests__/__snapshots__/tableContainerStyles.ts.snap +0 -3
  732. package/src/table/__tests__/__snapshots__/tableRowStyles.ts.snap +0 -3
  733. package/src/table/__tests__/__snapshots__/tableStyles.ts.snap +0 -3
  734. package/src/table/__tests__/tableContainerStyles.ts +0 -8
  735. package/src/table/__tests__/tableRowStyles.ts +0 -8
  736. package/src/table/__tests__/tableStyles.ts +0 -8
  737. package/src/table/_table.scss +0 -447
  738. package/src/tabs/__tests__/Tab.tsx +0 -51
  739. package/src/tabs/__tests__/TabList.tsx +0 -640
  740. package/src/tabs/__tests__/__snapshots__/Tab.tsx.snap +0 -85
  741. package/src/tabs/__tests__/__snapshots__/TabList.tsx.snap +0 -51
  742. package/src/tabs/__tests__/useTabs.tsx +0 -212
  743. package/src/tabs/_tabs.scss +0 -273
  744. package/src/test-utils/__tests__/ResizeObserver.ts +0 -171
  745. package/src/theme/__tests__/LocalStorageColorSchemeProvider.tsx +0 -162
  746. package/src/theme/__tests__/ThemeProvider.tsx +0 -90
  747. package/src/theme/__tests__/__snapshots__/useCSSVariables.tsx.snap +0 -27
  748. package/src/theme/__tests__/__snapshots__/useColorSchemeMetaTag.tsx.snap +0 -15
  749. package/src/theme/__tests__/useCSSVariables.tsx +0 -177
  750. package/src/theme/__tests__/useColorSchemeMetaTag.tsx +0 -36
  751. package/src/theme/__tests__/utils.ts +0 -67
  752. package/src/theme/_a11y.scss +0 -114
  753. package/src/theme/_colors.scss +0 -1057
  754. package/src/theme/_theme.scss +0 -520
  755. package/src/tooltip/__tests__/Tooltip.tsx +0 -501
  756. package/src/tooltip/__tests__/TooltipHoverModeProvider.tsx +0 -94
  757. package/src/tooltip/__tests__/__snapshots__/Tooltip.tsx.snap +0 -34
  758. package/src/tooltip/__tests__/utils.ts +0 -94
  759. package/src/tooltip/_tooltip.scss +0 -155
  760. package/src/transition/__tests__/CSSTransition.tsx +0 -182
  761. package/src/transition/__tests__/Collapse.tsx +0 -209
  762. package/src/transition/__tests__/CrossFade.tsx +0 -227
  763. package/src/transition/__tests__/ScaleTransition.tsx +0 -204
  764. package/src/transition/__tests__/SkeletonPlaceholder.tsx +0 -72
  765. package/src/transition/__tests__/__snapshots__/CSSTransition.tsx.snap +0 -145
  766. package/src/transition/__tests__/__snapshots__/Collapse.tsx.snap +0 -224
  767. package/src/transition/__tests__/__snapshots__/CrossFade.tsx.snap +0 -240
  768. package/src/transition/__tests__/__snapshots__/ScaleTransition.tsx.snap +0 -239
  769. package/src/transition/__tests__/__snapshots__/SkeletonPlaceholder.tsx.snap +0 -24
  770. package/src/transition/__tests__/__snapshots__/useCollapseTransition.tsx.snap +0 -361
  771. package/src/transition/__tests__/__snapshots__/useCrossFadeTransition.tsx.snap +0 -258
  772. package/src/transition/__tests__/__snapshots__/useMaxWidthTransition.tsx.snap +0 -68
  773. package/src/transition/__tests__/__snapshots__/useScaleTransition.tsx.snap +0 -209
  774. package/src/transition/__tests__/useCSSTransition.tsx +0 -190
  775. package/src/transition/__tests__/useCollapseTransition.tsx +0 -316
  776. package/src/transition/__tests__/useCrossFadeTransition.tsx +0 -229
  777. package/src/transition/__tests__/useMaxWidthTransition.tsx +0 -123
  778. package/src/transition/__tests__/useScaleTransition.tsx +0 -212
  779. package/src/transition/__tests__/useTransition.tsx +0 -569
  780. package/src/transition/__tests__/utils.ts +0 -620
  781. package/src/transition/_transition.scss +0 -365
  782. package/src/tree/__tests__/Tree.tsx +0 -735
  783. package/src/tree/__tests__/TreeGroup.tsx +0 -76
  784. package/src/tree/__tests__/TreeItemExpander.tsx +0 -74
  785. package/src/tree/__tests__/__snapshots__/Tree.tsx.snap +0 -3618
  786. package/src/tree/__tests__/__snapshots__/TreeItemExpander.tsx.snap +0 -11
  787. package/src/tree/__tests__/utils.ts +0 -98
  788. package/src/tree/_tree.scss +0 -176
  789. package/src/typography/__tests__/SrOnly.tsx +0 -43
  790. package/src/typography/__tests__/TextContainer.tsx +0 -45
  791. package/src/typography/__tests__/Typography.tsx +0 -87
  792. package/src/typography/__tests__/WritingDirectionProvider.node.tsx +0 -27
  793. package/src/typography/__tests__/WritingDirectionProvider.tsx +0 -119
  794. package/src/typography/__tests__/__snapshots__/SrOnly.tsx.snap +0 -56
  795. package/src/typography/__tests__/__snapshots__/TextContainer.tsx.snap +0 -29
  796. package/src/typography/__tests__/__snapshots__/Typography.tsx.snap +0 -112
  797. package/src/typography/_typography.scss +0 -399
  798. package/src/utils/__tests__/RenderRecursively.tsx +0 -87
  799. package/src/utils/__tests__/__snapshots__/RenderRecursively.tsx.snap +0 -80
  800. package/src/utils/__tests__/applyRef.ts +0 -30
  801. package/src/utils/__tests__/bem.ts +0 -54
  802. package/src/utils/__tests__/getMiddleOfRange.ts +0 -12
  803. package/src/utils/__tests__/getPercentage.ts +0 -104
  804. package/src/utils/__tests__/getRangeDefaultValue.ts +0 -47
  805. package/src/utils/__tests__/getRangeSteps.ts +0 -14
  806. package/src/utils/__tests__/loop.ts +0 -50
  807. package/src/utils/__tests__/nearest.ts +0 -83
  808. package/src/utils/__tests__/parseCssLengthUnit.node.ts +0 -28
  809. package/src/utils/__tests__/parseCssLengthUnit.ts +0 -47
  810. package/src/utils/__tests__/wait.ts +0 -12
  811. package/src/utils/__tests__/withinRange.ts +0 -24
  812. package/src/window-splitter/_window-splitter.scss +0 -143
  813. package/tsconfig.json +0 -19
  814. package/tsconfig.types.json +0 -12
  815. package/tsdoc.json +0 -14
@@ -1,8 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { type FormMessageInputLengthCounterProps, type FormMessageProps } from "./types.js";
3
2
  /**
4
- * **Server Component**
5
- *
6
3
  * The `FormMessage` component is used to create additional helper messages or
7
4
  * error messages and generally placed below the related `TextField`. If a
8
5
  * `length` (of the `value`) and `maxLength` are provided, a counter will also
@@ -5,8 +5,6 @@ import { FormMessageCounter } from "./FormMessageCounter.js";
5
5
  import { getFormConfig } from "./formConfig.js";
6
6
  import { formMessage, formMessageText } from "./formMessageStyles.js";
7
7
  /**
8
- * **Server Component**
9
- *
10
8
  * The `FormMessage` component is used to create additional helper messages or
11
9
  * error messages and generally placed below the related `TextField`. If a
12
10
  * `length` (of the `value`) and `maxLength` are provided, a counter will also
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/FormMessage.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { FormMessageCounter } from \"./FormMessageCounter.js\";\nimport { getFormConfig } from \"./formConfig.js\";\nimport { formMessage, formMessageText } from \"./formMessageStyles.js\";\nimport {\n type FormMessageInputLengthCounterProps,\n type FormMessageProps,\n} from \"./types.js\";\n\n/**\n * **Server Component**\n *\n * The `FormMessage` component is used to create additional helper messages or\n * error messages and generally placed below the related `TextField`. If a\n * `length` (of the `value`) and `maxLength` are provided, a counter will also\n * be displayed to the right of the `children`.\n *\n * This component can also be used to create form-level validation messages by\n * setting the `role` prop to `\"alert\"`.\n */\nexport const FormMessage = forwardRef<\n HTMLDivElement,\n FormMessageProps & Partial<FormMessageInputLengthCounterProps>\n>(function FormMessage(props, ref) {\n const {\n id: propId,\n role,\n className,\n counterStyle,\n counterClassName,\n messageStyle,\n messageClassName,\n error = false,\n disableWrap = false,\n theme: propTheme,\n children,\n length,\n maxLength,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"form-message\");\n const theme = getFormConfig(\"theme\", propTheme);\n\n let message = children;\n if (!disableWrap && children) {\n message = (\n <p\n id={`${id}-message`}\n style={messageStyle}\n className={formMessageText({ className: messageClassName })}\n >\n {children}\n </p>\n );\n }\n\n return (\n <div\n {...remaining}\n id={id}\n ref={ref}\n aria-live={role !== \"alert\" ? \"polite\" : undefined}\n role={role}\n className={formMessage({ error, theme, className })}\n >\n {message}\n {typeof length === \"number\" && typeof maxLength === \"number\" && (\n <FormMessageCounter\n id={`${id}-counter`}\n style={counterStyle}\n className={counterClassName}\n >\n {`${length} / ${maxLength}`}\n </FormMessageCounter>\n )}\n </div>\n );\n});\n"],"names":["forwardRef","useEnsuredId","FormMessageCounter","getFormConfig","formMessage","formMessageText","FormMessage","props","ref","id","propId","role","className","counterStyle","counterClassName","messageStyle","messageClassName","error","disableWrap","theme","propTheme","children","length","maxLength","remaining","message","p","style","div","aria-live","undefined"],"mappings":";AAAA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,WAAW,EAAEC,eAAe,QAAQ,yBAAyB;AAMtE;;;;;;;;;;CAUC,GACD,OAAO,MAAMC,4BAAcN,WAGzB,SAASM,YAAYC,KAAK,EAAEC,GAAG;IAC/B,MAAM,EACJC,IAAIC,MAAM,EACVC,IAAI,EACJC,SAAS,EACTC,YAAY,EACZC,gBAAgB,EAChBC,YAAY,EACZC,gBAAgB,EAChBC,QAAQ,KAAK,EACbC,cAAc,KAAK,EACnBC,OAAOC,SAAS,EAChBC,QAAQ,EACRC,MAAM,EACNC,SAAS,EACT,GAAGC,WACJ,GAAGjB;IACJ,MAAME,KAAKR,aAAaS,QAAQ;IAChC,MAAMS,QAAQhB,cAAc,SAASiB;IAErC,IAAIK,UAAUJ;IACd,IAAI,CAACH,eAAeG,UAAU;QAC5BI,wBACE,KAACC;YACCjB,IAAI,CAAC,EAAEA,GAAG,QAAQ,CAAC;YACnBkB,OAAOZ;YACPH,WAAWP,gBAAgB;gBAAEO,WAAWI;YAAiB;sBAExDK;;IAGP;IAEA,qBACE,MAACO;QACE,GAAGJ,SAAS;QACbf,IAAIA;QACJD,KAAKA;QACLqB,aAAWlB,SAAS,UAAU,WAAWmB;QACzCnB,MAAMA;QACNC,WAAWR,YAAY;YAAEa;YAAOE;YAAOP;QAAU;;YAEhDa;YACA,OAAOH,WAAW,YAAY,OAAOC,cAAc,0BAClD,KAACrB;gBACCO,IAAI,CAAC,EAAEA,GAAG,QAAQ,CAAC;gBACnBkB,OAAOd;gBACPD,WAAWE;0BAEV,CAAC,EAAEQ,OAAO,GAAG,EAAEC,UAAU,CAAC;;;;AAKrC,GAAG"}
1
+ {"version":3,"sources":["../../src/form/FormMessage.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { FormMessageCounter } from \"./FormMessageCounter.js\";\nimport { getFormConfig } from \"./formConfig.js\";\nimport { formMessage, formMessageText } from \"./formMessageStyles.js\";\nimport {\n type FormMessageInputLengthCounterProps,\n type FormMessageProps,\n} from \"./types.js\";\n\n/**\n * The `FormMessage` component is used to create additional helper messages or\n * error messages and generally placed below the related `TextField`. If a\n * `length` (of the `value`) and `maxLength` are provided, a counter will also\n * be displayed to the right of the `children`.\n *\n * This component can also be used to create form-level validation messages by\n * setting the `role` prop to `\"alert\"`.\n */\nexport const FormMessage = forwardRef<\n HTMLDivElement,\n FormMessageProps & Partial<FormMessageInputLengthCounterProps>\n>(function FormMessage(props, ref) {\n const {\n id: propId,\n role,\n className,\n counterStyle,\n counterClassName,\n messageStyle,\n messageClassName,\n error = false,\n disableWrap = false,\n theme: propTheme,\n children,\n length,\n maxLength,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"form-message\");\n const theme = getFormConfig(\"theme\", propTheme);\n\n let message = children;\n if (!disableWrap && children) {\n message = (\n <p\n id={`${id}-message`}\n style={messageStyle}\n className={formMessageText({ className: messageClassName })}\n >\n {children}\n </p>\n );\n }\n\n return (\n <div\n {...remaining}\n id={id}\n ref={ref}\n aria-live={role !== \"alert\" ? \"polite\" : undefined}\n role={role}\n className={formMessage({ error, theme, className })}\n >\n {message}\n {typeof length === \"number\" && typeof maxLength === \"number\" && (\n <FormMessageCounter\n id={`${id}-counter`}\n style={counterStyle}\n className={counterClassName}\n >\n {`${length} / ${maxLength}`}\n </FormMessageCounter>\n )}\n </div>\n );\n});\n"],"names":["forwardRef","useEnsuredId","FormMessageCounter","getFormConfig","formMessage","formMessageText","FormMessage","props","ref","id","propId","role","className","counterStyle","counterClassName","messageStyle","messageClassName","error","disableWrap","theme","propTheme","children","length","maxLength","remaining","message","p","style","div","aria-live","undefined"],"mappings":";AAAA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,WAAW,EAAEC,eAAe,QAAQ,yBAAyB;AAMtE;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAAcN,WAGzB,SAASM,YAAYC,KAAK,EAAEC,GAAG;IAC/B,MAAM,EACJC,IAAIC,MAAM,EACVC,IAAI,EACJC,SAAS,EACTC,YAAY,EACZC,gBAAgB,EAChBC,YAAY,EACZC,gBAAgB,EAChBC,QAAQ,KAAK,EACbC,cAAc,KAAK,EACnBC,OAAOC,SAAS,EAChBC,QAAQ,EACRC,MAAM,EACNC,SAAS,EACT,GAAGC,WACJ,GAAGjB;IACJ,MAAME,KAAKR,aAAaS,QAAQ;IAChC,MAAMS,QAAQhB,cAAc,SAASiB;IAErC,IAAIK,UAAUJ;IACd,IAAI,CAACH,eAAeG,UAAU;QAC5BI,wBACE,KAACC;YACCjB,IAAI,CAAC,EAAEA,GAAG,QAAQ,CAAC;YACnBkB,OAAOZ;YACPH,WAAWP,gBAAgB;gBAAEO,WAAWI;YAAiB;sBAExDK;;IAGP;IAEA,qBACE,MAACO;QACE,GAAGJ,SAAS;QACbf,IAAIA;QACJD,KAAKA;QACLqB,aAAWlB,SAAS,UAAU,WAAWmB;QACzCnB,MAAMA;QACNC,WAAWR,YAAY;YAAEa;YAAOE;YAAOP;QAAU;;YAEhDa;YACA,OAAOH,WAAW,YAAY,OAAOC,cAAc,0BAClD,KAACrB;gBACCO,IAAI,CAAC,EAAEA,GAAG,QAAQ,CAAC;gBACnBkB,OAAOd;gBACPD,WAAWE;0BAEV,CAAC,EAAEQ,OAAO,GAAG,EAAEC,UAAU,CAAC;;;;AAKrC,GAAG"}
@@ -13,7 +13,6 @@ export interface FormMessageContainerProps extends HTMLAttributes<HTMLDivElement
13
13
  messageProps?: PropsWithRef<FormMessageProps, HTMLDivElement>;
14
14
  }
15
15
  /**
16
- * **Server Component**
17
16
  * Conditionally wraps the `children` in a `.rmd-form-message-container` wrapper
18
17
  * and renders the {@link FormMessage} component.
19
18
  *
@@ -3,7 +3,6 @@ import { cnb } from "cnbuilder";
3
3
  import { forwardRef } from "react";
4
4
  import { FormMessage } from "./FormMessage.js";
5
5
  /**
6
- * **Server Component**
7
6
  * Conditionally wraps the `children` in a `.rmd-form-message-container` wrapper
8
7
  * and renders the {@link FormMessage} component.
9
8
  *
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/FormMessageContainer.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { FormMessage } from \"./FormMessage.js\";\nimport { type FormMessageProps } from \"./types.js\";\n\n/**\n * @since 2.5.0\n */\nexport interface FormMessageContainerProps\n extends HTMLAttributes<HTMLDivElement> {\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<FormMessageProps, HTMLDivElement>;\n}\n\n/**\n * **Server Component**\n * Conditionally wraps the `children` in a `.rmd-form-message-container` wrapper\n * and renders the {@link FormMessage} component.\n *\n * @since 2.5.0\n */\nexport const FormMessageContainer = forwardRef<\n HTMLDivElement,\n FormMessageContainerProps\n>(function FormMessageContainer(props, ref) {\n const { className, children, messageProps, ...remaining } = props;\n if (!messageProps) {\n return <>{children}</>;\n }\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={cnb(\"rmd-form-message-container\", className)}\n >\n {children}\n <FormMessage {...messageProps} />\n </div>\n );\n});\n"],"names":["cnb","forwardRef","FormMessage","FormMessageContainer","props","ref","className","children","messageProps","remaining","div"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6B,QAAQ;AAExD,SAASC,WAAW,QAAQ,mBAAmB;AAgB/C;;;;;;CAMC,GACD,OAAO,MAAMC,qCAAuBF,WAGlC,SAASE,qBAAqBC,KAAK,EAAEC,GAAG;IACxC,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,YAAY,EAAE,GAAGC,WAAW,GAAGL;IAC5D,IAAI,CAACI,cAAc;QACjB,qBAAO;sBAAGD;;IACZ;IAEA,qBACE,MAACG;QACE,GAAGD,SAAS;QACbJ,KAAKA;QACLC,WAAWN,IAAI,8BAA8BM;;YAE5CC;0BACD,KAACL;gBAAa,GAAGM,YAAY;;;;AAGnC,GAAG"}
1
+ {"version":3,"sources":["../../src/form/FormMessageContainer.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { FormMessage } from \"./FormMessage.js\";\nimport { type FormMessageProps } from \"./types.js\";\n\n/**\n * @since 2.5.0\n */\nexport interface FormMessageContainerProps\n extends HTMLAttributes<HTMLDivElement> {\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<FormMessageProps, HTMLDivElement>;\n}\n\n/**\n * Conditionally wraps the `children` in a `.rmd-form-message-container` wrapper\n * and renders the {@link FormMessage} component.\n *\n * @since 2.5.0\n */\nexport const FormMessageContainer = forwardRef<\n HTMLDivElement,\n FormMessageContainerProps\n>(function FormMessageContainer(props, ref) {\n const { className, children, messageProps, ...remaining } = props;\n if (!messageProps) {\n return <>{children}</>;\n }\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={cnb(\"rmd-form-message-container\", className)}\n >\n {children}\n <FormMessage {...messageProps} />\n </div>\n );\n});\n"],"names":["cnb","forwardRef","FormMessage","FormMessageContainer","props","ref","className","children","messageProps","remaining","div"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6B,QAAQ;AAExD,SAASC,WAAW,QAAQ,mBAAmB;AAgB/C;;;;;CAKC,GACD,OAAO,MAAMC,qCAAuBF,WAGlC,SAASE,qBAAqBC,KAAK,EAAEC,GAAG;IACxC,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,YAAY,EAAE,GAAGC,WAAW,GAAGL;IAC5D,IAAI,CAACI,cAAc;QACjB,qBAAO;sBAAGD;;IACZ;IAEA,qBACE,MAACG;QACE,GAAGD,SAAS;QACbJ,KAAKA;QACLC,WAAWN,IAAI,8BAA8BM;;YAE5CC;0BACD,KAACL;gBAAa,GAAGM,YAAY;;;;AAGnC,GAAG"}
@@ -12,8 +12,6 @@ export interface FormMessageCounterProps extends HTMLAttributes<HTMLSpanElement>
12
12
  children: ReactNode;
13
13
  }
14
14
  /**
15
- * **Server Component**
16
- *
17
15
  * This component can be used to create a "counter" within the
18
16
  * {@link FormMessage} component.
19
17
  *
@@ -1,8 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { formMessageCounter } from "./formMessageStyles.js";
3
3
  /**
4
- * **Server Component**
5
- *
6
4
  * This component can be used to create a "counter" within the
7
5
  * {@link FormMessage} component.
8
6
  *
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/FormMessageCounter.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactElement, type ReactNode } from \"react\";\nimport { formMessageCounter } from \"./formMessageStyles.js\";\n\n/** @since 2.9.0 */\nexport interface FormMessageCounterProps\n extends HTMLAttributes<HTMLSpanElement> {\n /**\n * The children to display in the counter. This is normally a string like:\n *\n * @example String Example\n * ```ts\n * `${min} / ${max}`\n * ```\n */\n children: ReactNode;\n}\n\n/**\n * **Server Component**\n *\n * This component can be used to create a \"counter\" within the\n * {@link FormMessage} component.\n *\n * Note: This is really only useful when using the {@link FormMessage} component\n * without a {@link TextField}.\n *\n * @example Example Usage\n * ```ts\n * interface ExampleProps {\n * min: number;\n * max: number;\n * }\n *\n * function Example({ min, max }: ExampleProps) {\n * return (\n * <FormMessage disableWrap>\n * <FormMessageCounter>\n * {`${min} / ${max}`}\n * </FormMessageCounter>\n * </FormMessage>\n * );\n * }\n * ```\n *\n * @since 2.9.0\n */\nexport function FormMessageCounter(\n props: FormMessageCounterProps\n): ReactElement {\n const { children, className, ...remaining } = props;\n\n return (\n <span {...remaining} className={formMessageCounter({ className })}>\n {children}\n </span>\n );\n}\n"],"names":["formMessageCounter","FormMessageCounter","props","children","className","remaining","span"],"mappings":";AACA,SAASA,kBAAkB,QAAQ,yBAAyB;AAgB5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BC,GACD,OAAO,SAASC,mBACdC,KAA8B;IAE9B,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGC,WAAW,GAAGH;IAE9C,qBACE,KAACI;QAAM,GAAGD,SAAS;QAAED,WAAWJ,mBAAmB;YAAEI;QAAU;kBAC5DD;;AAGP"}
1
+ {"version":3,"sources":["../../src/form/FormMessageCounter.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactElement, type ReactNode } from \"react\";\nimport { formMessageCounter } from \"./formMessageStyles.js\";\n\n/** @since 2.9.0 */\nexport interface FormMessageCounterProps\n extends HTMLAttributes<HTMLSpanElement> {\n /**\n * The children to display in the counter. This is normally a string like:\n *\n * @example String Example\n * ```ts\n * `${min} / ${max}`\n * ```\n */\n children: ReactNode;\n}\n\n/**\n * This component can be used to create a \"counter\" within the\n * {@link FormMessage} component.\n *\n * Note: This is really only useful when using the {@link FormMessage} component\n * without a {@link TextField}.\n *\n * @example Example Usage\n * ```ts\n * interface ExampleProps {\n * min: number;\n * max: number;\n * }\n *\n * function Example({ min, max }: ExampleProps) {\n * return (\n * <FormMessage disableWrap>\n * <FormMessageCounter>\n * {`${min} / ${max}`}\n * </FormMessageCounter>\n * </FormMessage>\n * );\n * }\n * ```\n *\n * @since 2.9.0\n */\nexport function FormMessageCounter(\n props: FormMessageCounterProps\n): ReactElement {\n const { children, className, ...remaining } = props;\n\n return (\n <span {...remaining} className={formMessageCounter({ className })}>\n {children}\n </span>\n );\n}\n"],"names":["formMessageCounter","FormMessageCounter","props","children","className","remaining","span"],"mappings":";AACA,SAASA,kBAAkB,QAAQ,yBAAyB;AAgB5D;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BC,GACD,OAAO,SAASC,mBACdC,KAA8B;IAE9B,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGC,WAAW,GAAGH;IAE9C,qBACE,KAACI;QAAM,GAAGD,SAAS;QAAED,WAAWJ,mBAAmB;YAAEI;QAAU;kBAC5DD;;AAGP"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/InputToggle.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type LabelHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { useElementInteraction } from \"../interaction/useElementInteraction.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { FormMessageContainer } from \"./FormMessageContainer.js\";\nimport { InputToggleIcon } from \"./InputToggleIcon.js\";\nimport { Label } from \"./Label.js\";\nimport { type InputToggleSize } from \"./inputToggleStyles.js\";\nimport {\n type FormComponentStates,\n type FormMessageContainerExtension,\n} from \"./types.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface InputToggleIconProps {\n /**\n * @see {@link InputToggleSize}\n * @defaultValue `\"normal\"`\n */\n size?: InputToggleSize;\n\n /**\n * The icon to use while unchecked. This defaults to the unchecked\n * checkbox/radio icon from the `ICON_CONFIG`.\n *\n * @defaultValue `getIcon(props.type)`\n */\n icon?: ReactNode;\n\n /**\n * The icon to use while unchecked. This defaults to the unchecked\n * checkbox/radio icon from the `ICON_CONFIG`.\n *\n * @defaultValue `getIcon(``${props.type}Checked``)`\n */\n checkedIcon?: ReactNode;\n\n /**\n * Any props that should be passed to the `<span>` that surrounds the current\n * icon element.\n */\n iconProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n\n /**\n * Optional style to set on the `<span>` that surrounds the current icon\n * element.\n */\n iconStyle?: CSSProperties;\n\n /**\n * Optional className to set on the `<span>` that surrounds the current icon\n * element.\n */\n iconClassName?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface InputToggleLabelProps {\n /**\n * An optional label to display with the checkbox. If this is omitted, it is\n * recommended to provide an `aria-label` for accessibility.\n */\n label?: ReactNode;\n\n /**\n * Any props that should be passed to the `<Label>` component.\n *\n * Note: If `style` or `className` are provided in this object, they will be\n * ignored. Use the top-level `style` and `className` props instead.\n *\n * @example\n * ```\n * // bad\n * labelProps={{\n * \"aria-label\": \"checkbox\",\n * style: { color: \"red\" },\n * className: \"custom\"\n * }}\n *\n * // good\n * style={{ color: \"red\" }}\n * className=\"custom\"\n * labelProps={{\n * \"aria-label\": \"checkbox\",\n * }}\n * ```\n */\n labelProps?: PropsWithRef<\n LabelHTMLAttributes<HTMLLabelElement>,\n HTMLLabelElement\n >;\n\n /**\n * @see {@link LabelClassNameOptions.gap}\n * @defaultValue `false`\n */\n disableLabelGap?: boolean;\n\n /**\n * Set this to `true` to swap the position of the {@link label} and the current\n * icon. This prop can be used with the {@link stacked} prop to change the\n * position if the icon and label:\n *\n * ____________________________________\n * | stacked | iconAfter | position |\n * ____________________________________\n * | | | icon label |\n * ____________________________________\n * | | X | label icon |\n * ____________________________________\n * | X | | icon |\n * | | | label |\n * ____________________________________\n * | X | X | label |\n * | | | icon |\n * ____________________________________\n *\n *\n * @defaultValue `false`\n */\n iconAfter?: boolean;\n\n /**\n * Set this to `true` if the label should be stacked instead of inline with\n * the current icon.\n *\n * @see {@link iconAfter}\n * @defaultValue `false`\n */\n stacked?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface BaseInputToggleProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"size\">,\n FormMessageContainerExtension,\n FormComponentStates,\n InputToggleIconProps,\n InputToggleLabelProps {\n /**\n * @see https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing\n * @defaultValue `type === \"checkbox\" ? \"off\" : undefined`\n */\n autoComplete?: string;\n}\n\n/**\n * @since 2.8.5\n * @since 6.0.0 Removed the `aria-controls` prop and added the\n * `indeterminateIcon` prop.\n */\nexport interface IndeterminateCheckboxProps {\n /**\n * Set this value to `true` if the checkbox is in an \"indeterminate\" state:\n *\n * - this checkbox controls the select all/select none behavior of other\n * checkboxes in a group\n * - at least one of the checkboxes have been checked\n * - the `checked` prop for this Checkbox should also be `true`\n *\n * You should normally use the `useCheckboxGroup` hook to handle this\n * behavior.\n *\n * @defaultValue `false`\n */\n indeterminate?: boolean;\n\n /**\n * The icon to display when the checkbox is checked and the\n * {@link indeterminate} prop is `true`.\n *\n * @defaultValue `getIcon(\"checkboxIndeterminate\")`\n * @since 6.0.0\n */\n indeterminateIcon?: ReactNode;\n}\n\nexport interface CheckboxProps\n extends BaseInputToggleProps,\n IndeterminateCheckboxProps {}\n\n/** @since 6.0.0 */\nexport interface CheckboxInputToggleProps extends CheckboxProps {\n type: \"checkbox\";\n}\n\nexport interface RadioProps extends BaseInputToggleProps {\n /**\n * The value for the radio button.\n *\n * @since 6.0.0 This is now optional and no longer supports\n * `string[]` since there isn't much of a use case for array values.\n */\n value?: string | number;\n}\n\n/** @since 6.0.0 */\nexport interface RadioInputToggleProps extends RadioProps {\n type: \"radio\";\n}\n\n/**\n * @since 6.0.0 Updated to be a union between\n * `CheckboxInputToggleProps` and `RadioInputToggleProps`\n */\nexport type InputToggleProps = CheckboxInputToggleProps | RadioInputToggleProps;\n\n/**\n * **Client Component**\n *\n * @since 6.0.0 Now supports the `FormMessage` behavior and requires\n * different icons for each checked state.\n */\nexport const InputToggle = forwardRef<HTMLInputElement, InputToggleProps>(\n function InputToggle(props, ref) {\n const {\n id: propId,\n type,\n label,\n labelProps,\n style,\n className,\n autoComplete = type === \"checkbox\" ? \"off\" : undefined,\n disableLabelGap = false,\n stacked = false,\n iconAfter = false,\n size = \"normal\",\n error = false,\n active = false,\n indeterminate = false,\n messageProps,\n messageContainerProps,\n icon,\n checkedIcon,\n indeterminateIcon,\n iconProps,\n iconStyle,\n iconClassName,\n onBlur,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseLeave,\n onDragStart,\n onMouseUp,\n onTouchEnd,\n onTouchMove,\n onTouchStart,\n ...remaining\n } = props as CheckboxInputToggleProps;\n const { disabled = false, checked } = props;\n\n const id = useEnsuredId(propId, type);\n const { pressedClassName, ripples, handlers } = useElementInteraction({\n disabled,\n onBlur,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseLeave,\n onDragStart,\n onMouseUp,\n onTouchEnd,\n onTouchMove,\n onTouchStart,\n });\n\n // set on the `remaining` object to bypass the eslint rule about\n // aria-checked not being valid for textbox role\n remaining[\"aria-checked\"] =\n remaining[\"aria-checked\"] ?? indeterminate ? \"mixed\" : undefined;\n\n return (\n <FormMessageContainer\n {...messageContainerProps}\n messageProps={messageProps}\n >\n <Label\n {...labelProps}\n gap={!disableLabelGap}\n style={style}\n stacked={stacked}\n reversed={!iconAfter}\n active={active}\n error={error}\n disabled={disabled}\n className={className}\n >\n {label}\n <InputToggleIcon\n style={iconStyle}\n {...iconProps}\n className={cnb(\n pressedClassName,\n iconClassName,\n iconProps?.className\n )}\n error={error}\n checked={checked}\n disabled={disabled}\n size={size}\n type={type}\n icon={icon}\n checkedIcon={checkedIcon}\n indeterminate={indeterminate}\n indeterminateIcon={indeterminateIcon}\n >\n <input\n {...remaining}\n {...handlers}\n autoComplete={autoComplete}\n id={id}\n ref={ref}\n type={type}\n className=\"rmd-hidden-input\"\n />\n {ripples}\n </InputToggleIcon>\n </Label>\n </FormMessageContainer>\n );\n }\n);\n"],"names":["cnb","forwardRef","useElementInteraction","useEnsuredId","FormMessageContainer","InputToggleIcon","Label","InputToggle","props","ref","id","propId","type","label","labelProps","style","className","autoComplete","undefined","disableLabelGap","stacked","iconAfter","size","error","active","indeterminate","messageProps","messageContainerProps","icon","checkedIcon","indeterminateIcon","iconProps","iconStyle","iconClassName","onBlur","onClick","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onDragStart","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","remaining","disabled","checked","pressedClassName","ripples","handlers","gap","reversed","input"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAML,QAAQ;AACf,SAASC,qBAAqB,QAAQ,0CAA0C;AAEhF,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,oBAAoB,QAAQ,4BAA4B;AACjE,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,KAAK,QAAQ,aAAa;AA+MnC;;;;;CAKC,GACD,OAAO,MAAMC,4BAAcN,WACzB,SAASM,YAAYC,KAAK,EAAEC,GAAG;IAC7B,MAAM,EACJC,IAAIC,MAAM,EACVC,IAAI,EACJC,KAAK,EACLC,UAAU,EACVC,KAAK,EACLC,SAAS,EACTC,eAAeL,SAAS,aAAa,QAAQM,SAAS,EACtDC,kBAAkB,KAAK,EACvBC,UAAU,KAAK,EACfC,YAAY,KAAK,EACjBC,OAAO,QAAQ,EACfC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,gBAAgB,KAAK,EACrBC,YAAY,EACZC,qBAAqB,EACrBC,IAAI,EACJC,WAAW,EACXC,iBAAiB,EACjBC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,MAAM,EACNC,OAAO,EACPC,SAAS,EACTC,OAAO,EACPC,WAAW,EACXC,YAAY,EACZC,WAAW,EACXC,SAAS,EACTC,UAAU,EACVC,WAAW,EACXC,YAAY,EACZ,GAAGC,WACJ,GAAGrC;IACJ,MAAM,EAAEsC,WAAW,KAAK,EAAEC,OAAO,EAAE,GAAGvC;IAEtC,MAAME,KAAKP,aAAaQ,QAAQC;IAChC,MAAM,EAAEoC,gBAAgB,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGhD,sBAAsB;QACpE4C;QACAZ;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;IACF;IAEA,gEAAgE;IAChE,gDAAgD;IAChDC,SAAS,CAAC,eAAe,GACvBA,SAAS,CAAC,eAAe,IAAIpB,gBAAgB,UAAUP;IAEzD,qBACE,KAACd;QACE,GAAGuB,qBAAqB;QACzBD,cAAcA;kBAEd,cAAA,MAACpB;YACE,GAAGQ,UAAU;YACdqC,KAAK,CAAChC;YACNJ,OAAOA;YACPK,SAASA;YACTgC,UAAU,CAAC/B;YACXG,QAAQA;YACRD,OAAOA;YACPuB,UAAUA;YACV9B,WAAWA;;gBAEVH;8BACD,MAACR;oBACCU,OAAOiB;oBACN,GAAGD,SAAS;oBACbf,WAAWhB,IACTgD,kBACAf,eACAF,WAAWf;oBAEbO,OAAOA;oBACPwB,SAASA;oBACTD,UAAUA;oBACVxB,MAAMA;oBACNV,MAAMA;oBACNgB,MAAMA;oBACNC,aAAaA;oBACbJ,eAAeA;oBACfK,mBAAmBA;;sCAEnB,KAACuB;4BACE,GAAGR,SAAS;4BACZ,GAAGK,QAAQ;4BACZjC,cAAcA;4BACdP,IAAIA;4BACJD,KAAKA;4BACLG,MAAMA;4BACNI,WAAU;;wBAEXiC;;;;;;AAKX,GACA"}
1
+ {"version":3,"sources":["../../src/form/InputToggle.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type LabelHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { useElementInteraction } from \"../interaction/useElementInteraction.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { FormMessageContainer } from \"./FormMessageContainer.js\";\nimport { InputToggleIcon } from \"./InputToggleIcon.js\";\nimport { Label } from \"./Label.js\";\nimport { type InputToggleSize } from \"./inputToggleStyles.js\";\nimport {\n type FormComponentStates,\n type FormMessageContainerExtension,\n} from \"./types.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface InputToggleIconProps {\n /**\n * @see {@link InputToggleSize}\n * @defaultValue `\"normal\"`\n */\n size?: InputToggleSize;\n\n /**\n * The icon to use while unchecked. This defaults to the unchecked\n * checkbox/radio icon from the `ICON_CONFIG`.\n *\n * @defaultValue `getIcon(props.type)`\n */\n icon?: ReactNode;\n\n /**\n * The icon to use while unchecked. This defaults to the unchecked\n * checkbox/radio icon from the `ICON_CONFIG`.\n *\n * @defaultValue `getIcon(``${props.type}Checked``)`\n */\n checkedIcon?: ReactNode;\n\n /**\n * Any props that should be passed to the `<span>` that surrounds the current\n * icon element.\n */\n iconProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n\n /**\n * Optional style to set on the `<span>` that surrounds the current icon\n * element.\n */\n iconStyle?: CSSProperties;\n\n /**\n * Optional className to set on the `<span>` that surrounds the current icon\n * element.\n */\n iconClassName?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface InputToggleLabelProps {\n /**\n * An optional label to display with the checkbox. If this is omitted, it is\n * recommended to provide an `aria-label` for accessibility.\n */\n label?: ReactNode;\n\n /**\n * Any props that should be passed to the `<Label>` component.\n *\n * Note: If `style` or `className` are provided in this object, they will be\n * ignored. Use the top-level `style` and `className` props instead.\n *\n * @example\n * ```\n * // bad\n * labelProps={{\n * \"aria-label\": \"checkbox\",\n * style: { color: \"red\" },\n * className: \"custom\"\n * }}\n *\n * // good\n * style={{ color: \"red\" }}\n * className=\"custom\"\n * labelProps={{\n * \"aria-label\": \"checkbox\",\n * }}\n * ```\n */\n labelProps?: PropsWithRef<\n LabelHTMLAttributes<HTMLLabelElement>,\n HTMLLabelElement\n >;\n\n /**\n * @see {@link LabelClassNameOptions.gap}\n * @defaultValue `false`\n */\n disableLabelGap?: boolean;\n\n /**\n * Set this to `true` to swap the position of the {@link label} and the current\n * icon. This prop can be used with the {@link stacked} prop to change the\n * position if the icon and label:\n *\n * ____________________________________\n * | stacked | iconAfter | position |\n * ____________________________________\n * | | | icon label |\n * ____________________________________\n * | | X | label icon |\n * ____________________________________\n * | X | | icon |\n * | | | label |\n * ____________________________________\n * | X | X | label |\n * | | | icon |\n * ____________________________________\n *\n *\n * @defaultValue `false`\n */\n iconAfter?: boolean;\n\n /**\n * Set this to `true` if the label should be stacked instead of inline with\n * the current icon.\n *\n * @see {@link iconAfter}\n * @defaultValue `false`\n */\n stacked?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface BaseInputToggleProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"size\">,\n FormMessageContainerExtension,\n FormComponentStates,\n InputToggleIconProps,\n InputToggleLabelProps {\n /**\n * @see https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing\n * @defaultValue `type === \"checkbox\" ? \"off\" : undefined`\n */\n autoComplete?: string;\n}\n\n/**\n * @since 2.8.5\n * @since 6.0.0 Removed the `aria-controls` prop and added the\n * `indeterminateIcon` prop.\n */\nexport interface IndeterminateCheckboxProps {\n /**\n * Set this value to `true` if the checkbox is in an \"indeterminate\" state:\n *\n * - this checkbox controls the select all/select none behavior of other\n * checkboxes in a group\n * - at least one of the checkboxes have been checked\n * - the `checked` prop for this Checkbox should also be `true`\n *\n * You should normally use the `useCheckboxGroup` hook to handle this\n * behavior.\n *\n * @defaultValue `false`\n */\n indeterminate?: boolean;\n\n /**\n * The icon to display when the checkbox is checked and the\n * {@link indeterminate} prop is `true`.\n *\n * @defaultValue `getIcon(\"checkboxIndeterminate\")`\n * @since 6.0.0\n */\n indeterminateIcon?: ReactNode;\n}\n\nexport interface CheckboxProps\n extends BaseInputToggleProps,\n IndeterminateCheckboxProps {}\n\n/** @since 6.0.0 */\nexport interface CheckboxInputToggleProps extends CheckboxProps {\n type: \"checkbox\";\n}\n\nexport interface RadioProps extends BaseInputToggleProps {\n /**\n * The value for the radio button.\n *\n * @since 6.0.0 This is now optional and no longer supports\n * `string[]` since there isn't much of a use case for array values.\n */\n value?: string | number;\n}\n\n/** @since 6.0.0 */\nexport interface RadioInputToggleProps extends RadioProps {\n type: \"radio\";\n}\n\n/**\n * @since 6.0.0 Updated to be a union between\n * `CheckboxInputToggleProps` and `RadioInputToggleProps`\n */\nexport type InputToggleProps = CheckboxInputToggleProps | RadioInputToggleProps;\n\n/**\n * **Client Component**\n *\n * @since 6.0.0 Now supports the `FormMessage` behavior and requires\n * different icons for each checked state.\n */\nexport const InputToggle = forwardRef<HTMLInputElement, InputToggleProps>(\n function InputToggle(props, ref) {\n const {\n id: propId,\n type,\n label,\n labelProps,\n style,\n className,\n autoComplete = type === \"checkbox\" ? \"off\" : undefined,\n disableLabelGap = false,\n stacked = false,\n iconAfter = false,\n size = \"normal\",\n error = false,\n active = false,\n indeterminate = false,\n messageProps,\n messageContainerProps,\n icon,\n checkedIcon,\n indeterminateIcon,\n iconProps,\n iconStyle,\n iconClassName,\n onBlur,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseLeave,\n onDragStart,\n onMouseUp,\n onTouchEnd,\n onTouchMove,\n onTouchStart,\n ...remaining\n } = props as CheckboxInputToggleProps;\n const { disabled = false, checked } = props;\n\n const id = useEnsuredId(propId, type);\n const { pressedClassName, ripples, handlers } = useElementInteraction({\n disabled,\n onBlur,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseLeave,\n onDragStart,\n onMouseUp,\n onTouchEnd,\n onTouchMove,\n onTouchStart,\n });\n\n // set on the `remaining` object to bypass the eslint rule about\n // aria-checked not being valid for textbox role\n remaining[\"aria-checked\"] =\n (remaining[\"aria-checked\"] ?? indeterminate) ? \"mixed\" : undefined;\n\n return (\n <FormMessageContainer\n {...messageContainerProps}\n messageProps={messageProps}\n >\n <Label\n {...labelProps}\n gap={!disableLabelGap}\n style={style}\n stacked={stacked}\n reversed={!iconAfter}\n active={active}\n error={error}\n disabled={disabled}\n className={className}\n >\n {label}\n <InputToggleIcon\n style={iconStyle}\n {...iconProps}\n className={cnb(\n pressedClassName,\n iconClassName,\n iconProps?.className\n )}\n error={error}\n checked={checked}\n disabled={disabled}\n size={size}\n type={type}\n icon={icon}\n checkedIcon={checkedIcon}\n indeterminate={indeterminate}\n indeterminateIcon={indeterminateIcon}\n >\n <input\n {...remaining}\n {...handlers}\n autoComplete={autoComplete}\n id={id}\n ref={ref}\n type={type}\n className=\"rmd-hidden-input\"\n />\n {ripples}\n </InputToggleIcon>\n </Label>\n </FormMessageContainer>\n );\n }\n);\n"],"names":["cnb","forwardRef","useElementInteraction","useEnsuredId","FormMessageContainer","InputToggleIcon","Label","InputToggle","props","ref","id","propId","type","label","labelProps","style","className","autoComplete","undefined","disableLabelGap","stacked","iconAfter","size","error","active","indeterminate","messageProps","messageContainerProps","icon","checkedIcon","indeterminateIcon","iconProps","iconStyle","iconClassName","onBlur","onClick","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onDragStart","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","remaining","disabled","checked","pressedClassName","ripples","handlers","gap","reversed","input"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAML,QAAQ;AACf,SAASC,qBAAqB,QAAQ,0CAA0C;AAEhF,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,oBAAoB,QAAQ,4BAA4B;AACjE,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,KAAK,QAAQ,aAAa;AA+MnC;;;;;CAKC,GACD,OAAO,MAAMC,4BAAcN,WACzB,SAASM,YAAYC,KAAK,EAAEC,GAAG;IAC7B,MAAM,EACJC,IAAIC,MAAM,EACVC,IAAI,EACJC,KAAK,EACLC,UAAU,EACVC,KAAK,EACLC,SAAS,EACTC,eAAeL,SAAS,aAAa,QAAQM,SAAS,EACtDC,kBAAkB,KAAK,EACvBC,UAAU,KAAK,EACfC,YAAY,KAAK,EACjBC,OAAO,QAAQ,EACfC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,gBAAgB,KAAK,EACrBC,YAAY,EACZC,qBAAqB,EACrBC,IAAI,EACJC,WAAW,EACXC,iBAAiB,EACjBC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,MAAM,EACNC,OAAO,EACPC,SAAS,EACTC,OAAO,EACPC,WAAW,EACXC,YAAY,EACZC,WAAW,EACXC,SAAS,EACTC,UAAU,EACVC,WAAW,EACXC,YAAY,EACZ,GAAGC,WACJ,GAAGrC;IACJ,MAAM,EAAEsC,WAAW,KAAK,EAAEC,OAAO,EAAE,GAAGvC;IAEtC,MAAME,KAAKP,aAAaQ,QAAQC;IAChC,MAAM,EAAEoC,gBAAgB,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGhD,sBAAsB;QACpE4C;QACAZ;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;IACF;IAEA,gEAAgE;IAChE,gDAAgD;IAChDC,SAAS,CAAC,eAAe,GACvB,AAACA,SAAS,CAAC,eAAe,IAAIpB,gBAAiB,UAAUP;IAE3D,qBACE,KAACd;QACE,GAAGuB,qBAAqB;QACzBD,cAAcA;kBAEd,cAAA,MAACpB;YACE,GAAGQ,UAAU;YACdqC,KAAK,CAAChC;YACNJ,OAAOA;YACPK,SAASA;YACTgC,UAAU,CAAC/B;YACXG,QAAQA;YACRD,OAAOA;YACPuB,UAAUA;YACV9B,WAAWA;;gBAEVH;8BACD,MAACR;oBACCU,OAAOiB;oBACN,GAAGD,SAAS;oBACbf,WAAWhB,IACTgD,kBACAf,eACAF,WAAWf;oBAEbO,OAAOA;oBACPwB,SAASA;oBACTD,UAAUA;oBACVxB,MAAMA;oBACNV,MAAMA;oBACNgB,MAAMA;oBACNC,aAAaA;oBACbJ,eAAeA;oBACfK,mBAAmBA;;sCAEnB,KAACuB;4BACE,GAAGR,SAAS;4BACZ,GAAGK,QAAQ;4BACZjC,cAAcA;4BACdP,IAAIA;4BACJD,KAAKA;4BACLG,MAAMA;4BACNI,WAAU;;wBAEXiC;;;;;;AAKX,GACA"}
@@ -40,8 +40,6 @@ export interface InputToggleIconProps extends HTMLAttributes<HTMLSpanElement> {
40
40
  indeterminate?: boolean;
41
41
  }
42
42
  /**
43
- * **Server Component**
44
- *
45
43
  * @since 2.8.0
46
44
  * @since 6.0.0 Updated to use different icons for each checked state instead
47
45
  * of a css overlay hack.
@@ -5,8 +5,6 @@ import { getIcon } from "../icon/iconConfig.js";
5
5
  import { FORM_CONFIG } from "./formConfig.js";
6
6
  import { inputToggle } from "./inputToggleStyles.js";
7
7
  /**
8
- * **Server Component**
9
- *
10
8
  * @since 2.8.0
11
9
  * @since 6.0.0 Updated to use different icons for each checked state instead
12
10
  * of a css overlay hack.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/InputToggleIcon.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { FORM_CONFIG } from \"./formConfig.js\";\nimport { inputToggle, type InputToggleSize } from \"./inputToggleStyles.js\";\n\n/**\n * @since 2.8.0\n * @since 6.0.0 Removed the `circle` and `overlay` props since they are no\n * longer needed. Added the `icon`, `disableEm`, `checkedIcon` and\n * `indeterminateIcon` props.\n * @internal\n */\nexport interface InputToggleIconProps extends HTMLAttributes<HTMLSpanElement> {\n type: \"checkbox\" | \"radio\";\n /**\n * Note: If this is `undefined` and the {@link FORM_CONFIG.uncontrolledToggles} is `false`,\n * the icon state won't work.\n */\n checked?: boolean;\n\n /**\n * The icon to display while {@link checked} is `false`.\n */\n icon?: ReactNode;\n\n /**\n * The icon to display while {@link checked} is `true` and\n * {@link indeterminate} is `false`.\n */\n checkedIcon?: ReactNode;\n\n /**\n * The icon to display while both {@link checked} and {@link indeterminate}\n * are `true`.\n */\n indeterminateIcon?: ReactNode;\n\n /** @defaultValue `\"normal\"` */\n size?: InputToggleSize;\n\n /** @defaultValue `false` */\n error?: boolean;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /** @defaultValue `false` */\n disableEm?: boolean;\n\n /** @defaultValue `false` */\n indeterminate?: boolean;\n}\n\n/**\n * **Server Component**\n *\n * @since 2.8.0\n * @since 6.0.0 Updated to use different icons for each checked state instead\n * of a css overlay hack.\n * @internal\n */\nexport const InputToggleIcon = forwardRef<\n HTMLSpanElement,\n InputToggleIconProps\n>(function InputToggleIcon(props, ref) {\n const {\n type,\n size = \"normal\",\n icon: propIcon,\n error,\n checked,\n children,\n disabled,\n indeterminate,\n className,\n disableEm = false,\n checkedIcon: propCheckedIcon,\n indeterminateIcon: propIndeterminateIcon,\n ...remaining\n } = props;\n const uncheckedIcon = getIcon(type, propIcon);\n const checkedIcon = getIcon(`${type}Checked`, propCheckedIcon);\n const indeterminateIcon = getIcon(\n \"checkboxIndeterminate\",\n propIndeterminateIcon\n );\n\n let icon: ReactNode;\n let active = false;\n const uncontrolled = typeof checked !== \"boolean\";\n if (!uncontrolled || !FORM_CONFIG.uncontrolledToggles) {\n active = !!checked && !error;\n icon = checked\n ? indeterminate\n ? indeterminateIcon\n : checkedIcon\n : uncheckedIcon;\n } else {\n icon = (\n <>\n {uncheckedIcon}\n {indeterminate ? indeterminateIcon : checkedIcon}\n </>\n );\n }\n\n return (\n <span\n {...remaining}\n ref={ref}\n className={cnb(\n inputToggle({\n em: !disableEm,\n size,\n type,\n error,\n active,\n disabled,\n uncontrolled,\n className,\n })\n )}\n >\n {children}\n {icon}\n </span>\n );\n});\n"],"names":["cnb","forwardRef","getIcon","FORM_CONFIG","inputToggle","InputToggleIcon","props","ref","type","size","icon","propIcon","error","checked","children","disabled","indeterminate","className","disableEm","checkedIcon","propCheckedIcon","indeterminateIcon","propIndeterminateIcon","remaining","uncheckedIcon","active","uncontrolled","uncontrolledToggles","span","em"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6C,QAAQ;AACxE,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,SAASC,WAAW,QAA8B,yBAAyB;AAkD3E;;;;;;;CAOC,GACD,OAAO,MAAMC,gCAAkBJ,WAG7B,SAASI,gBAAgBC,KAAK,EAAEC,GAAG;IACnC,MAAM,EACJC,IAAI,EACJC,OAAO,QAAQ,EACfC,MAAMC,QAAQ,EACdC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,QAAQ,EACRC,aAAa,EACbC,SAAS,EACTC,YAAY,KAAK,EACjBC,aAAaC,eAAe,EAC5BC,mBAAmBC,qBAAqB,EACxC,GAAGC,WACJ,GAAGjB;IACJ,MAAMkB,gBAAgBtB,QAAQM,MAAMG;IACpC,MAAMQ,cAAcjB,QAAQ,CAAC,EAAEM,KAAK,OAAO,CAAC,EAAEY;IAC9C,MAAMC,oBAAoBnB,QACxB,yBACAoB;IAGF,IAAIZ;IACJ,IAAIe,SAAS;IACb,MAAMC,eAAe,OAAOb,YAAY;IACxC,IAAI,CAACa,gBAAgB,CAACvB,YAAYwB,mBAAmB,EAAE;QACrDF,SAAS,CAAC,CAACZ,WAAW,CAACD;QACvBF,OAAOG,UACHG,gBACEK,oBACAF,cACFK;IACN,OAAO;QACLd,qBACE;;gBACGc;gBACAR,gBAAgBK,oBAAoBF;;;IAG3C;IAEA,qBACE,MAACS;QACE,GAAGL,SAAS;QACbhB,KAAKA;QACLU,WAAWjB,IACTI,YAAY;YACVyB,IAAI,CAACX;YACLT;YACAD;YACAI;YACAa;YACAV;YACAW;YACAT;QACF;;YAGDH;YACAJ;;;AAGP,GAAG"}
1
+ {"version":3,"sources":["../../src/form/InputToggleIcon.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { FORM_CONFIG } from \"./formConfig.js\";\nimport { inputToggle, type InputToggleSize } from \"./inputToggleStyles.js\";\n\n/**\n * @since 2.8.0\n * @since 6.0.0 Removed the `circle` and `overlay` props since they are no\n * longer needed. Added the `icon`, `disableEm`, `checkedIcon` and\n * `indeterminateIcon` props.\n * @internal\n */\nexport interface InputToggleIconProps extends HTMLAttributes<HTMLSpanElement> {\n type: \"checkbox\" | \"radio\";\n /**\n * Note: If this is `undefined` and the {@link FORM_CONFIG.uncontrolledToggles} is `false`,\n * the icon state won't work.\n */\n checked?: boolean;\n\n /**\n * The icon to display while {@link checked} is `false`.\n */\n icon?: ReactNode;\n\n /**\n * The icon to display while {@link checked} is `true` and\n * {@link indeterminate} is `false`.\n */\n checkedIcon?: ReactNode;\n\n /**\n * The icon to display while both {@link checked} and {@link indeterminate}\n * are `true`.\n */\n indeterminateIcon?: ReactNode;\n\n /** @defaultValue `\"normal\"` */\n size?: InputToggleSize;\n\n /** @defaultValue `false` */\n error?: boolean;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /** @defaultValue `false` */\n disableEm?: boolean;\n\n /** @defaultValue `false` */\n indeterminate?: boolean;\n}\n\n/**\n * @since 2.8.0\n * @since 6.0.0 Updated to use different icons for each checked state instead\n * of a css overlay hack.\n * @internal\n */\nexport const InputToggleIcon = forwardRef<\n HTMLSpanElement,\n InputToggleIconProps\n>(function InputToggleIcon(props, ref) {\n const {\n type,\n size = \"normal\",\n icon: propIcon,\n error,\n checked,\n children,\n disabled,\n indeterminate,\n className,\n disableEm = false,\n checkedIcon: propCheckedIcon,\n indeterminateIcon: propIndeterminateIcon,\n ...remaining\n } = props;\n const uncheckedIcon = getIcon(type, propIcon);\n const checkedIcon = getIcon(`${type}Checked`, propCheckedIcon);\n const indeterminateIcon = getIcon(\n \"checkboxIndeterminate\",\n propIndeterminateIcon\n );\n\n let icon: ReactNode;\n let active = false;\n const uncontrolled = typeof checked !== \"boolean\";\n if (!uncontrolled || !FORM_CONFIG.uncontrolledToggles) {\n active = !!checked && !error;\n icon = checked\n ? indeterminate\n ? indeterminateIcon\n : checkedIcon\n : uncheckedIcon;\n } else {\n icon = (\n <>\n {uncheckedIcon}\n {indeterminate ? indeterminateIcon : checkedIcon}\n </>\n );\n }\n\n return (\n <span\n {...remaining}\n ref={ref}\n className={cnb(\n inputToggle({\n em: !disableEm,\n size,\n type,\n error,\n active,\n disabled,\n uncontrolled,\n className,\n })\n )}\n >\n {children}\n {icon}\n </span>\n );\n});\n"],"names":["cnb","forwardRef","getIcon","FORM_CONFIG","inputToggle","InputToggleIcon","props","ref","type","size","icon","propIcon","error","checked","children","disabled","indeterminate","className","disableEm","checkedIcon","propCheckedIcon","indeterminateIcon","propIndeterminateIcon","remaining","uncheckedIcon","active","uncontrolled","uncontrolledToggles","span","em"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6C,QAAQ;AACxE,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,SAASC,WAAW,QAA8B,yBAAyB;AAkD3E;;;;;CAKC,GACD,OAAO,MAAMC,gCAAkBJ,WAG7B,SAASI,gBAAgBC,KAAK,EAAEC,GAAG;IACnC,MAAM,EACJC,IAAI,EACJC,OAAO,QAAQ,EACfC,MAAMC,QAAQ,EACdC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,QAAQ,EACRC,aAAa,EACbC,SAAS,EACTC,YAAY,KAAK,EACjBC,aAAaC,eAAe,EAC5BC,mBAAmBC,qBAAqB,EACxC,GAAGC,WACJ,GAAGjB;IACJ,MAAMkB,gBAAgBtB,QAAQM,MAAMG;IACpC,MAAMQ,cAAcjB,QAAQ,CAAC,EAAEM,KAAK,OAAO,CAAC,EAAEY;IAC9C,MAAMC,oBAAoBnB,QACxB,yBACAoB;IAGF,IAAIZ;IACJ,IAAIe,SAAS;IACb,MAAMC,eAAe,OAAOb,YAAY;IACxC,IAAI,CAACa,gBAAgB,CAACvB,YAAYwB,mBAAmB,EAAE;QACrDF,SAAS,CAAC,CAACZ,WAAW,CAACD;QACvBF,OAAOG,UACHG,gBACEK,oBACAF,cACFK;IACN,OAAO;QACLd,qBACE;;gBACGc;gBACAR,gBAAgBK,oBAAoBF;;;IAG3C;IAEA,qBACE,MAACS;QACE,GAAGL,SAAS;QACbhB,KAAKA;QACLU,WAAWjB,IACTI,YAAY;YACVyB,IAAI,CAACX;YACLT;YACAD;YACAI;YACAa;YACAV;YACAW;YACAT;QACF;;YAGDH;YACAJ;;;AAGP,GAAG"}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type LabelClassNameOptions, type LabelProps } from "./types.js";
3
2
  declare module "react" {
4
3
  interface CSSProperties {
@@ -14,8 +13,6 @@ declare module "react" {
14
13
  */
15
14
  export declare function label(options: LabelClassNameOptions): string;
16
15
  /**
17
- * **Server Component**
18
- *
19
16
  * Most of the form components already use this `Label` internally when a
20
17
  * `label` prop has been provided. You should generally use this component if
21
18
  * you need to separate the label from an existing form component or you need to
@@ -33,8 +33,6 @@ const labelStyles = bem("rmd-label");
33
33
  }), className);
34
34
  }
35
35
  /**
36
- * **Server Component**
37
- *
38
36
  * Most of the form components already use this `Label` internally when a
39
37
  * `label` prop has been provided. You should generally use this component if
40
38
  * you need to separate the label from an existing form component or you need to
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/Label.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef } from \"react\";\nimport { type TextColor, type ThemeColor, cssUtils } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { type LabelClassNameOptions, type LabelProps } from \"./types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-label-floating-top\"?: string | number;\n \"--rmd-label-left-offset\"?: string | number;\n \"--rmd-label-top-offset\"?: string | number;\n \"--rmd-label-active-padding\"?: string | number;\n \"--rmd-label-active-background-color\"?: string;\n }\n}\n\nconst labelStyles = bem(\"rmd-label\");\n\n/**\n * @since 6.0.0\n */\nexport function label(options: LabelClassNameOptions): string {\n const {\n className,\n gap = false,\n error = false,\n dense = false,\n active = false,\n stacked = false,\n reversed = false,\n disabled = false,\n floating = false,\n inactive = false,\n floatingActive = active,\n } = options;\n\n let textColor: TextColor | ThemeColor | undefined;\n if (disabled) {\n textColor = \"text-disabled\";\n } else if (error) {\n textColor = \"error\";\n } else if (floating && inactive) {\n textColor = \"text-secondary\";\n }\n\n return cnb(\n labelStyles({\n gap,\n error,\n dense,\n active,\n disabled,\n floating,\n stacked: stacked && !reversed,\n reversed: !stacked && reversed,\n \"stacked-reversed\": stacked && reversed,\n \"floating-dense\": floating && dense,\n \"floating-active\": floating && floatingActive,\n }),\n cssUtils({\n textColor,\n }),\n className\n );\n}\n\n/**\n * **Server Component**\n *\n * Most of the form components already use this `Label` internally when a\n * `label` prop has been provided. You should generally use this component if\n * you need to separate the label from an existing form component or you need to\n * create a custom implementation of a form component.\n *\n * @since 6.0.0 Updated to be usable externally and combines the\n * floating label styles instead of having separate components.\n */\nexport const Label = forwardRef<HTMLLabelElement, LabelProps>(\n function Label(props, ref) {\n const {\n gap = false,\n error = false,\n dense = false,\n active = false,\n stacked = false,\n reversed = false,\n disabled = false,\n floating = false,\n inactive = false,\n floatingActive = active,\n className,\n children,\n ...remaining\n } = props;\n\n return (\n <label\n ref={ref}\n {...remaining}\n className={label({\n gap,\n error,\n dense,\n active,\n stacked,\n reversed,\n disabled,\n floating,\n floatingActive,\n inactive,\n className,\n })}\n >\n {children}\n </label>\n );\n }\n);\n"],"names":["cnb","forwardRef","cssUtils","bem","labelStyles","label","options","className","gap","error","dense","active","stacked","reversed","disabled","floating","inactive","floatingActive","textColor","Label","props","ref","children","remaining"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAQ,QAAQ;AACnC,SAA0CC,QAAQ,QAAQ,iBAAiB;AAC3E,SAASC,GAAG,QAAQ,kBAAkB;AAatC,MAAMC,cAAcD,IAAI;AAExB;;CAEC,GACD,OAAO,SAASE,MAAMC,OAA8B;IAClD,MAAM,EACJC,SAAS,EACTC,MAAM,KAAK,EACXC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,iBAAiBN,MAAM,EACxB,GAAGL;IAEJ,IAAIY;IACJ,IAAIJ,UAAU;QACZI,YAAY;IACd,OAAO,IAAIT,OAAO;QAChBS,YAAY;IACd,OAAO,IAAIH,YAAYC,UAAU;QAC/BE,YAAY;IACd;IAEA,OAAOlB,IACLI,YAAY;QACVI;QACAC;QACAC;QACAC;QACAG;QACAC;QACAH,SAASA,WAAW,CAACC;QACrBA,UAAU,CAACD,WAAWC;QACtB,oBAAoBD,WAAWC;QAC/B,kBAAkBE,YAAYL;QAC9B,mBAAmBK,YAAYE;IACjC,IACAf,SAAS;QACPgB;IACF,IACAX;AAEJ;AAEA;;;;;;;;;;CAUC,GACD,OAAO,MAAMY,sBAAQlB,WACnB,SAASkB,MAAMC,KAAK,EAAEC,GAAG;IACvB,MAAM,EACJb,MAAM,KAAK,EACXC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,iBAAiBN,MAAM,EACvBJ,SAAS,EACTe,QAAQ,EACR,GAAGC,WACJ,GAAGH;IAEJ,qBACE,KAACf;QACCgB,KAAKA;QACJ,GAAGE,SAAS;QACbhB,WAAWF,MAAM;YACfG;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAE;YACAD;YACAT;QACF;kBAECe;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/form/Label.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef } from \"react\";\nimport { type TextColor, type ThemeColor, cssUtils } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { type LabelClassNameOptions, type LabelProps } from \"./types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-label-floating-top\"?: string | number;\n \"--rmd-label-left-offset\"?: string | number;\n \"--rmd-label-top-offset\"?: string | number;\n \"--rmd-label-active-padding\"?: string | number;\n \"--rmd-label-active-background-color\"?: string;\n }\n}\n\nconst labelStyles = bem(\"rmd-label\");\n\n/**\n * @since 6.0.0\n */\nexport function label(options: LabelClassNameOptions): string {\n const {\n className,\n gap = false,\n error = false,\n dense = false,\n active = false,\n stacked = false,\n reversed = false,\n disabled = false,\n floating = false,\n inactive = false,\n floatingActive = active,\n } = options;\n\n let textColor: TextColor | ThemeColor | undefined;\n if (disabled) {\n textColor = \"text-disabled\";\n } else if (error) {\n textColor = \"error\";\n } else if (floating && inactive) {\n textColor = \"text-secondary\";\n }\n\n return cnb(\n labelStyles({\n gap,\n error,\n dense,\n active,\n disabled,\n floating,\n stacked: stacked && !reversed,\n reversed: !stacked && reversed,\n \"stacked-reversed\": stacked && reversed,\n \"floating-dense\": floating && dense,\n \"floating-active\": floating && floatingActive,\n }),\n cssUtils({\n textColor,\n }),\n className\n );\n}\n\n/**\n * Most of the form components already use this `Label` internally when a\n * `label` prop has been provided. You should generally use this component if\n * you need to separate the label from an existing form component or you need to\n * create a custom implementation of a form component.\n *\n * @since 6.0.0 Updated to be usable externally and combines the\n * floating label styles instead of having separate components.\n */\nexport const Label = forwardRef<HTMLLabelElement, LabelProps>(\n function Label(props, ref) {\n const {\n gap = false,\n error = false,\n dense = false,\n active = false,\n stacked = false,\n reversed = false,\n disabled = false,\n floating = false,\n inactive = false,\n floatingActive = active,\n className,\n children,\n ...remaining\n } = props;\n\n return (\n <label\n ref={ref}\n {...remaining}\n className={label({\n gap,\n error,\n dense,\n active,\n stacked,\n reversed,\n disabled,\n floating,\n floatingActive,\n inactive,\n className,\n })}\n >\n {children}\n </label>\n );\n }\n);\n"],"names":["cnb","forwardRef","cssUtils","bem","labelStyles","label","options","className","gap","error","dense","active","stacked","reversed","disabled","floating","inactive","floatingActive","textColor","Label","props","ref","children","remaining"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAQ,QAAQ;AACnC,SAA0CC,QAAQ,QAAQ,iBAAiB;AAC3E,SAASC,GAAG,QAAQ,kBAAkB;AAatC,MAAMC,cAAcD,IAAI;AAExB;;CAEC,GACD,OAAO,SAASE,MAAMC,OAA8B;IAClD,MAAM,EACJC,SAAS,EACTC,MAAM,KAAK,EACXC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,iBAAiBN,MAAM,EACxB,GAAGL;IAEJ,IAAIY;IACJ,IAAIJ,UAAU;QACZI,YAAY;IACd,OAAO,IAAIT,OAAO;QAChBS,YAAY;IACd,OAAO,IAAIH,YAAYC,UAAU;QAC/BE,YAAY;IACd;IAEA,OAAOlB,IACLI,YAAY;QACVI;QACAC;QACAC;QACAC;QACAG;QACAC;QACAH,SAASA,WAAW,CAACC;QACrBA,UAAU,CAACD,WAAWC;QACtB,oBAAoBD,WAAWC;QAC/B,kBAAkBE,YAAYL;QAC9B,mBAAmBK,YAAYE;IACjC,IACAf,SAAS;QACPgB;IACF,IACAX;AAEJ;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAMY,sBAAQlB,WACnB,SAASkB,MAAMC,KAAK,EAAEC,GAAG;IACvB,MAAM,EACJb,MAAM,KAAK,EACXC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,iBAAiBN,MAAM,EACvBJ,SAAS,EACTe,QAAQ,EACR,GAAGC,WACJ,GAAGH;IAEJ,qBACE,KAACf;QACCgB,KAAKA;QACJ,GAAGE,SAAS;QACbhB,WAAWF,MAAM;YACfG;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAE;YACAD;YACAT;QACF;kBAECe;;AAGP,GACA"}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type TypographyProps } from "../typography/Typography.js";
3
2
  /**
4
3
  * @since 6.0.0
@@ -10,8 +9,6 @@ export interface LegendProps extends TypographyProps {
10
9
  srOnly?: boolean;
11
10
  }
12
11
  /**
13
- * **Server Component**
14
- *
15
12
  * This should be used within a `Fieldset` to apply a label.
16
13
  *
17
14
  * @since 6.0.0
@@ -4,8 +4,6 @@ import { forwardRef } from "react";
4
4
  import { cssUtils } from "../cssUtils.js";
5
5
  import { Typography } from "../typography/Typography.js";
6
6
  /**
7
- * **Server Component**
8
- *
9
7
  * This should be used within a `Fieldset` to apply a label.
10
8
  *
11
9
  * @since 6.0.0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/Legend.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef } from \"react\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { Typography, type TypographyProps } from \"../typography/Typography.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface LegendProps extends TypographyProps {\n /**\n * @defaultValue `false`\n */\n srOnly?: boolean;\n}\n\n/**\n * **Server Component**\n *\n * This should be used within a `Fieldset` to apply a label.\n *\n * @since 6.0.0\n */\nexport const Legend = forwardRef<HTMLLegendElement, LegendProps>(\n function Legend(props, ref) {\n const { srOnly = false, className, children, ...remaining } = props;\n\n return (\n <Typography\n {...remaining}\n as=\"legend\"\n ref={ref}\n className={cnb(\"rmd-legend\", cssUtils({ srOnly }), className)}\n >\n {children}\n </Typography>\n );\n }\n);\n"],"names":["cnb","forwardRef","cssUtils","Typography","Legend","props","ref","srOnly","className","children","remaining","as"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAQ,QAAQ;AACnC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,UAAU,QAA8B,8BAA8B;AAY/E;;;;;;CAMC,GACD,OAAO,MAAMC,uBAASH,WACpB,SAASG,OAAOC,KAAK,EAAEC,GAAG;IACxB,MAAM,EAAEC,SAAS,KAAK,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,WAAW,GAAGL;IAE9D,qBACE,KAACF;QACE,GAAGO,SAAS;QACbC,IAAG;QACHL,KAAKA;QACLE,WAAWR,IAAI,cAAcE,SAAS;YAAEK;QAAO,IAAIC;kBAElDC;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/form/Legend.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef } from \"react\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { Typography, type TypographyProps } from \"../typography/Typography.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface LegendProps extends TypographyProps {\n /**\n * @defaultValue `false`\n */\n srOnly?: boolean;\n}\n\n/**\n * This should be used within a `Fieldset` to apply a label.\n *\n * @since 6.0.0\n */\nexport const Legend = forwardRef<HTMLLegendElement, LegendProps>(\n function Legend(props, ref) {\n const { srOnly = false, className, children, ...remaining } = props;\n\n return (\n <Typography\n {...remaining}\n as=\"legend\"\n ref={ref}\n className={cnb(\"rmd-legend\", cssUtils({ srOnly }), className)}\n >\n {children}\n </Typography>\n );\n }\n);\n"],"names":["cnb","forwardRef","cssUtils","Typography","Legend","props","ref","srOnly","className","children","remaining","as"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAQ,QAAQ;AACnC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,UAAU,QAA8B,8BAA8B;AAY/E;;;;CAIC,GACD,OAAO,MAAMC,uBAASH,WACpB,SAASG,OAAOC,KAAK,EAAEC,GAAG;IACxB,MAAM,EAAEC,SAAS,KAAK,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,WAAW,GAAGL;IAE9D,qBACE,KAACF;QACE,GAAGO,SAAS;QACbC,IAAG;QACHL,KAAKA;QACLE,WAAWR,IAAI,cAAcE,SAAS;YAAEK;QAAO,IAAIC;kBAElDC;;AAGP,GACA"}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type MenuItemCheckboxProps } from "./MenuItemInputToggle.js";
3
2
  /**
4
3
  * **Client Component**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * **Client Component**
4
3
  *
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type MenuItemSwitchProps } from "./MenuItemInputToggle.js";
3
2
  /**
4
3
  * **Client Component**
@@ -40,8 +40,6 @@ export interface NativeSelectProps extends Omit<SelectHTMLAttributes<HTMLSelectE
40
40
  containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
41
41
  }
42
42
  /**
43
- * **Server Component**
44
- *
45
43
  * This component is a wrapper for the native `<select>` field that applies the
46
44
  * same theming as `TextField` and `TextArea` components. This component might
47
45
  * not be used much since the `Select` offers more styling options.
@@ -8,8 +8,6 @@ import { TextFieldContainer } from "./TextFieldContainer.js";
8
8
  import { getFormConfig } from "./formConfig.js";
9
9
  import { nativeSelect, nativeSelectContainer } from "./nativeSelectStyles.js";
10
10
  /**
11
- * **Server Component**
12
- *
13
11
  * This component is a wrapper for the native `<select>` field that applies the
14
12
  * same theming as `TextField` and `TextArea` components. This component might
15
13
  * not be used much since the `Select` offers more styling options.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/NativeSelect.tsx"],"sourcesContent":["import {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n type SelectHTMLAttributes,\n} from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\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 { nativeSelect, nativeSelectContainer } from \"./nativeSelectStyles.js\";\nimport {\n type FormFieldOptions,\n type UserAgentAutocompleteProps,\n} from \"./types.js\";\n\n/**\n * @since 6.0.0 Added support for {@link UserAgentAutocompleteProps}\n */\nexport interface NativeSelectProps\n extends Omit<SelectHTMLAttributes<HTMLSelectElement>, \"autoComplete\">,\n UserAgentAutocompleteProps,\n FormFieldOptions {\n /**\n * A custom dropdown icon to use instead of the browser's default select\n * dropdown icon.\n *\n * Set this to `null` if the browser's default icon should be used instead.\n *\n * @defaultValue `getIcon(\"dropdown\")`\n */\n icon?: ReactNode;\n\n /**\n * This applies custom inline styles to the `<select>` element since the\n * `style` prop is applied to the container element instead.\n */\n selectStyle?: CSSProperties;\n\n /**\n * This applies custom className to the `<select>` element since the\n * `className` prop is applied to the container element instead.\n */\n selectClassName?: string;\n\n /**\n * This should be a list of `<option>` elements for specific values within the\n * `<select>`.\n *\n * Check out the {@link NativeSelect} for examples around using \"placeholder\"\n * text and requiring a value to be selected.\n */\n children: ReactNode;\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/**\n * **Server Component**\n *\n * This component is a wrapper for the native `<select>` field that applies the\n * same theming as `TextField` and `TextArea` components. This component might\n * not be used much since the `Select` offers more styling options.\n *\n * @example Simple Example\n * ```tsx\n * <NativeSelect label=\"Label\">\n * <option value=\"a\">Value 1</option>\n * <option value=\"b\">Value 2</option>\n * <option value=\"c\">Value 3</option>\n * <option value=\"d\">Value 4</option>\n * </NativeSelect>\n * ```\n *\n * @example Required Value Example\n * ```tsx\n * function Example(): ReactElement {\n * // using `defaultValue=\"\"` makes it so the first option selected by default\n * // and considered an \"invalid\" value since it is `disabled`\n * //\n * // a `name` must be set with `required` so that the form validation will\n * // fire if the value is still the empty string when the form is submitted\n * //\n * // the first `<option>` is kind of like placeholder text since it doesn't\n * // have a value and is disabled by default\n *\n * return (\n * <NativeSelect\n * label=\"State\"\n * name=\"state\"\n * required\n * defaultValue=\"\"\n * >\n * <option value=\"\" disabled>Choose a state</option>\n * {states.map(({ name, code }) => (\n * <option key={code} value={code}>{name}</option>\n * ))}\n * </NativeSelect>\n * );\n * }\n * ```\n */\nexport const NativeSelect = forwardRef<HTMLSelectElement, NativeSelectProps>(\n function NativeSelect(props, ref) {\n const {\n id: propId,\n style,\n className,\n icon: propIcon,\n label,\n labelProps,\n labelStyle,\n labelClassName,\n selectStyle,\n selectClassName,\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 rightAddon: propRightAddon,\n leftAddonProps,\n rightAddonProps,\n disableLeftAddonStyles = false,\n disableRightAddonStyles = false,\n theme: propTheme,\n underlineDirection: propUnderlineDirection,\n messageProps,\n messageContainerProps,\n containerProps,\n children,\n ...remaining\n } = props;\n const { disabled = false, readOnly = false, multiple = false } = props;\n const id = useEnsuredId(propId, \"select\");\n const theme = getFormConfig(\"theme\", propTheme);\n const underlineDirection = getFormConfig(\n \"underlineDirection\",\n propUnderlineDirection\n );\n const icon = getIcon(\"dropdown\", propIcon);\n const underlined = theme === \"underline\" || theme === \"filled\";\n\n let rightAddon = propRightAddon;\n if (typeof propRightAddon === \"undefined\" && !multiple) {\n rightAddon = icon;\n }\n\n return (\n <FormMessageContainer\n {...messageContainerProps}\n messageProps={messageProps}\n >\n <TextFieldContainer\n {...containerProps}\n style={style}\n className={nativeSelectContainer({\n label: !!label,\n multiple,\n underlined,\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 leftAddonProps={leftAddonProps}\n rightAddon={rightAddon}\n rightAddonProps={rightAddonProps}\n underlineDirection={underlineDirection}\n disableLeftAddonStyles={disableLeftAddonStyles}\n disableRightAddonStyles={disableRightAddonStyles}\n >\n <select\n {...remaining}\n id={id}\n ref={ref}\n autoComplete={autoComplete}\n name={name}\n disabled={disabled}\n style={selectStyle}\n className={nativeSelect({\n icon: !!icon,\n className: selectClassName,\n })}\n >\n {children}\n </select>\n {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 </TextFieldContainer>\n </FormMessageContainer>\n );\n }\n);\n"],"names":["forwardRef","getIcon","useEnsuredId","FormMessageContainer","Label","TextFieldContainer","getFormConfig","nativeSelect","nativeSelectContainer","NativeSelect","props","ref","id","propId","style","className","icon","propIcon","label","labelProps","labelStyle","labelClassName","selectStyle","selectClassName","autoCompleteValue","autoComplete","name","dense","error","active","inline","stretch","leftAddon","rightAddon","propRightAddon","leftAddonProps","rightAddonProps","disableLeftAddonStyles","disableRightAddonStyles","theme","propTheme","underlineDirection","propUnderlineDirection","messageProps","messageContainerProps","containerProps","children","remaining","disabled","readOnly","multiple","underlined","select","htmlFor","floating"],"mappings":";AAAA,SACEA,UAAU,QAKL,QAAQ;AACf,SAASC,OAAO,QAAQ,wBAAwB;AAEhD,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,YAAY,EAAEC,qBAAqB,QAAQ,0BAA0B;AAoD9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CC,GACD,OAAO,MAAMC,6BAAeT,WAC1B,SAASS,aAAaC,KAAK,EAAEC,GAAG;IAC9B,MAAM,EACJC,IAAIC,MAAM,EACVC,KAAK,EACLC,SAAS,EACTC,MAAMC,QAAQ,EACdC,KAAK,EACLC,UAAU,EACVC,UAAU,EACVC,cAAc,EACdC,WAAW,EACXC,eAAe,EACfC,iBAAiB,EACjBC,eAAeD,iBAAiB,EAChCE,OAAOF,iBAAiB,EACxBG,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,SAAS,EACTC,YAAYC,cAAc,EAC1BC,cAAc,EACdC,eAAe,EACfC,yBAAyB,KAAK,EAC9BC,0BAA0B,KAAK,EAC/BC,OAAOC,SAAS,EAChBC,oBAAoBC,sBAAsB,EAC1CC,YAAY,EACZC,qBAAqB,EACrBC,cAAc,EACdC,QAAQ,EACR,GAAGC,WACJ,GAAGrC;IACJ,MAAM,EAAEsC,WAAW,KAAK,EAAEC,WAAW,KAAK,EAAEC,WAAW,KAAK,EAAE,GAAGxC;IACjE,MAAME,KAAKV,aAAaW,QAAQ;IAChC,MAAM0B,QAAQjC,cAAc,SAASkC;IACrC,MAAMC,qBAAqBnC,cACzB,sBACAoC;IAEF,MAAM1B,OAAOf,QAAQ,YAAYgB;IACjC,MAAMkC,aAAaZ,UAAU,eAAeA,UAAU;IAEtD,IAAIN,aAAaC;IACjB,IAAI,OAAOA,mBAAmB,eAAe,CAACgB,UAAU;QACtDjB,aAAajB;IACf;IAEA,qBACE,KAACb;QACE,GAAGyC,qBAAqB;QACzBD,cAAcA;kBAEd,cAAA,MAACtC;YACE,GAAGwC,cAAc;YAClB/B,OAAOA;YACPC,WAAWP,sBAAsB;gBAC/BU,OAAO,CAAC,CAACA;gBACTgC;gBACAC;gBACApC;YACF;YACAwB,OAAOA;YACPrB,OAAO,CAAC,CAACA;YACTU,OAAOA;YACPD,OAAOA;YACPG,QAAQA;YACRD,QAAQA;YACRE,SAASA;YACTkB,UAAUA;YACVD,UAAUA;YACVhB,WAAWA;YACXG,gBAAgBA;YAChBF,YAAYA;YACZG,iBAAiBA;YACjBK,oBAAoBA;YACpBJ,wBAAwBA;YACxBC,yBAAyBA;;8BAEzB,KAACc;oBACE,GAAGL,SAAS;oBACbnC,IAAIA;oBACJD,KAAKA;oBACLc,cAAcA;oBACdC,MAAMA;oBACNsB,UAAUA;oBACVlC,OAAOQ;oBACPP,WAAWR,aAAa;wBACtBS,MAAM,CAAC,CAACA;wBACRD,WAAWQ;oBACb;8BAECuB;;gBAEF5B,uBACC,KAACd;oBACE,GAAGe,UAAU;oBACdkC,SAASzC;oBACTE,OAAOK,YAAYL,SAASM;oBAC5BL,WAAWI,YAAYJ,aAAaM;oBACpCiC,QAAQ;oBACR3B,OAAOA;oBACPC,OAAOA;oBACPC,QAAQA;oBACRmB,UAAUA;8BAET9B;;;;;AAMb,GACA"}
1
+ {"version":3,"sources":["../../src/form/NativeSelect.tsx"],"sourcesContent":["import {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n type SelectHTMLAttributes,\n} from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\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 { nativeSelect, nativeSelectContainer } from \"./nativeSelectStyles.js\";\nimport {\n type FormFieldOptions,\n type UserAgentAutocompleteProps,\n} from \"./types.js\";\n\n/**\n * @since 6.0.0 Added support for {@link UserAgentAutocompleteProps}\n */\nexport interface NativeSelectProps\n extends Omit<SelectHTMLAttributes<HTMLSelectElement>, \"autoComplete\">,\n UserAgentAutocompleteProps,\n FormFieldOptions {\n /**\n * A custom dropdown icon to use instead of the browser's default select\n * dropdown icon.\n *\n * Set this to `null` if the browser's default icon should be used instead.\n *\n * @defaultValue `getIcon(\"dropdown\")`\n */\n icon?: ReactNode;\n\n /**\n * This applies custom inline styles to the `<select>` element since the\n * `style` prop is applied to the container element instead.\n */\n selectStyle?: CSSProperties;\n\n /**\n * This applies custom className to the `<select>` element since the\n * `className` prop is applied to the container element instead.\n */\n selectClassName?: string;\n\n /**\n * This should be a list of `<option>` elements for specific values within the\n * `<select>`.\n *\n * Check out the {@link NativeSelect} for examples around using \"placeholder\"\n * text and requiring a value to be selected.\n */\n children: ReactNode;\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/**\n * This component is a wrapper for the native `<select>` field that applies the\n * same theming as `TextField` and `TextArea` components. This component might\n * not be used much since the `Select` offers more styling options.\n *\n * @example Simple Example\n * ```tsx\n * <NativeSelect label=\"Label\">\n * <option value=\"a\">Value 1</option>\n * <option value=\"b\">Value 2</option>\n * <option value=\"c\">Value 3</option>\n * <option value=\"d\">Value 4</option>\n * </NativeSelect>\n * ```\n *\n * @example Required Value Example\n * ```tsx\n * function Example(): ReactElement {\n * // using `defaultValue=\"\"` makes it so the first option selected by default\n * // and considered an \"invalid\" value since it is `disabled`\n * //\n * // a `name` must be set with `required` so that the form validation will\n * // fire if the value is still the empty string when the form is submitted\n * //\n * // the first `<option>` is kind of like placeholder text since it doesn't\n * // have a value and is disabled by default\n *\n * return (\n * <NativeSelect\n * label=\"State\"\n * name=\"state\"\n * required\n * defaultValue=\"\"\n * >\n * <option value=\"\" disabled>Choose a state</option>\n * {states.map(({ name, code }) => (\n * <option key={code} value={code}>{name}</option>\n * ))}\n * </NativeSelect>\n * );\n * }\n * ```\n */\nexport const NativeSelect = forwardRef<HTMLSelectElement, NativeSelectProps>(\n function NativeSelect(props, ref) {\n const {\n id: propId,\n style,\n className,\n icon: propIcon,\n label,\n labelProps,\n labelStyle,\n labelClassName,\n selectStyle,\n selectClassName,\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 rightAddon: propRightAddon,\n leftAddonProps,\n rightAddonProps,\n disableLeftAddonStyles = false,\n disableRightAddonStyles = false,\n theme: propTheme,\n underlineDirection: propUnderlineDirection,\n messageProps,\n messageContainerProps,\n containerProps,\n children,\n ...remaining\n } = props;\n const { disabled = false, readOnly = false, multiple = false } = props;\n const id = useEnsuredId(propId, \"select\");\n const theme = getFormConfig(\"theme\", propTheme);\n const underlineDirection = getFormConfig(\n \"underlineDirection\",\n propUnderlineDirection\n );\n const icon = getIcon(\"dropdown\", propIcon);\n const underlined = theme === \"underline\" || theme === \"filled\";\n\n let rightAddon = propRightAddon;\n if (typeof propRightAddon === \"undefined\" && !multiple) {\n rightAddon = icon;\n }\n\n return (\n <FormMessageContainer\n {...messageContainerProps}\n messageProps={messageProps}\n >\n <TextFieldContainer\n {...containerProps}\n style={style}\n className={nativeSelectContainer({\n label: !!label,\n multiple,\n underlined,\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 leftAddonProps={leftAddonProps}\n rightAddon={rightAddon}\n rightAddonProps={rightAddonProps}\n underlineDirection={underlineDirection}\n disableLeftAddonStyles={disableLeftAddonStyles}\n disableRightAddonStyles={disableRightAddonStyles}\n >\n <select\n {...remaining}\n id={id}\n ref={ref}\n autoComplete={autoComplete}\n name={name}\n disabled={disabled}\n style={selectStyle}\n className={nativeSelect({\n icon: !!icon,\n className: selectClassName,\n })}\n >\n {children}\n </select>\n {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 </TextFieldContainer>\n </FormMessageContainer>\n );\n }\n);\n"],"names":["forwardRef","getIcon","useEnsuredId","FormMessageContainer","Label","TextFieldContainer","getFormConfig","nativeSelect","nativeSelectContainer","NativeSelect","props","ref","id","propId","style","className","icon","propIcon","label","labelProps","labelStyle","labelClassName","selectStyle","selectClassName","autoCompleteValue","autoComplete","name","dense","error","active","inline","stretch","leftAddon","rightAddon","propRightAddon","leftAddonProps","rightAddonProps","disableLeftAddonStyles","disableRightAddonStyles","theme","propTheme","underlineDirection","propUnderlineDirection","messageProps","messageContainerProps","containerProps","children","remaining","disabled","readOnly","multiple","underlined","select","htmlFor","floating"],"mappings":";AAAA,SACEA,UAAU,QAKL,QAAQ;AACf,SAASC,OAAO,QAAQ,wBAAwB;AAEhD,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,YAAY,EAAEC,qBAAqB,QAAQ,0BAA0B;AAoD9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CC,GACD,OAAO,MAAMC,6BAAeT,WAC1B,SAASS,aAAaC,KAAK,EAAEC,GAAG;IAC9B,MAAM,EACJC,IAAIC,MAAM,EACVC,KAAK,EACLC,SAAS,EACTC,MAAMC,QAAQ,EACdC,KAAK,EACLC,UAAU,EACVC,UAAU,EACVC,cAAc,EACdC,WAAW,EACXC,eAAe,EACfC,iBAAiB,EACjBC,eAAeD,iBAAiB,EAChCE,OAAOF,iBAAiB,EACxBG,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,SAAS,EACTC,YAAYC,cAAc,EAC1BC,cAAc,EACdC,eAAe,EACfC,yBAAyB,KAAK,EAC9BC,0BAA0B,KAAK,EAC/BC,OAAOC,SAAS,EAChBC,oBAAoBC,sBAAsB,EAC1CC,YAAY,EACZC,qBAAqB,EACrBC,cAAc,EACdC,QAAQ,EACR,GAAGC,WACJ,GAAGrC;IACJ,MAAM,EAAEsC,WAAW,KAAK,EAAEC,WAAW,KAAK,EAAEC,WAAW,KAAK,EAAE,GAAGxC;IACjE,MAAME,KAAKV,aAAaW,QAAQ;IAChC,MAAM0B,QAAQjC,cAAc,SAASkC;IACrC,MAAMC,qBAAqBnC,cACzB,sBACAoC;IAEF,MAAM1B,OAAOf,QAAQ,YAAYgB;IACjC,MAAMkC,aAAaZ,UAAU,eAAeA,UAAU;IAEtD,IAAIN,aAAaC;IACjB,IAAI,OAAOA,mBAAmB,eAAe,CAACgB,UAAU;QACtDjB,aAAajB;IACf;IAEA,qBACE,KAACb;QACE,GAAGyC,qBAAqB;QACzBD,cAAcA;kBAEd,cAAA,MAACtC;YACE,GAAGwC,cAAc;YAClB/B,OAAOA;YACPC,WAAWP,sBAAsB;gBAC/BU,OAAO,CAAC,CAACA;gBACTgC;gBACAC;gBACApC;YACF;YACAwB,OAAOA;YACPrB,OAAO,CAAC,CAACA;YACTU,OAAOA;YACPD,OAAOA;YACPG,QAAQA;YACRD,QAAQA;YACRE,SAASA;YACTkB,UAAUA;YACVD,UAAUA;YACVhB,WAAWA;YACXG,gBAAgBA;YAChBF,YAAYA;YACZG,iBAAiBA;YACjBK,oBAAoBA;YACpBJ,wBAAwBA;YACxBC,yBAAyBA;;8BAEzB,KAACc;oBACE,GAAGL,SAAS;oBACbnC,IAAIA;oBACJD,KAAKA;oBACLc,cAAcA;oBACdC,MAAMA;oBACNsB,UAAUA;oBACVlC,OAAOQ;oBACPP,WAAWR,aAAa;wBACtBS,MAAM,CAAC,CAACA;wBACRD,WAAWQ;oBACb;8BAECuB;;gBAEF5B,uBACC,KAACd;oBACE,GAAGe,UAAU;oBACdkC,SAASzC;oBACTE,OAAOK,YAAYL,SAASM;oBAC5BL,WAAWI,YAAYJ,aAAaM;oBACpCiC,QAAQ;oBACR3B,OAAOA;oBACPC,OAAOA;oBACPC,QAAQA;oBACRmB,UAAUA;8BAET9B;;;;;AAMb,GACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/Option.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, Fragment, type ReactNode } from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { icon } from \"../icon/styles.js\";\nimport {\n TextIconSpacing,\n type TextIconSpacingProps,\n} from \"../icon/TextIconSpacing.js\";\nimport { getListItemHeight } from \"../list/getListItemHeight.js\";\nimport { ListItemText } from \"../list/ListItemText.js\";\nimport { MenuItem, type MenuItemProps } from \"../menu/MenuItem.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { option } from \"./optionStyles.js\";\nimport { useListboxContext } from \"./useListboxProvider.js\";\nimport { triggerManualChangeEvent } from \"./utils.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * This icon is used while the option is unselected so that the selected and\n * unselected options have the same alignment.\n *\n * @since 6.0.0\n */\nexport const DEFAULT_OPTION_UNSELECTED_ICON = (\n <span className={icon({ type: \"svg\" })} />\n);\n\n/**\n * @since 6.0.0 removed the `selected` and `focused` props.\n * @since 6.0.0 Added the `value`, `selectedIcon`, `unselectedIcon`,\n * `selectedIconAfter`, and `iconSpacingProps` props.\n */\nexport interface OptionProps extends MenuItemProps {\n /**\n * @defaultValue `\"option\"`\n */\n role?: string;\n\n value: string | number;\n\n /**\n * @defaultValue `getIcon(\"selected\")`\n */\n selectedIcon?: ReactNode;\n\n /**\n * @see {@link DEFAULT_OPTION_UNSELECTED_ICON}\n * @defaultValue `<span className=\"rmd-icon rmd-icon--svg\" />`\n */\n unselectedIcon?: ReactNode;\n\n /**\n * Set this to `true` of the {@link selectedIcon}/{@link unselectedIcon}\n * should appear as the {@link rightAddon} instead of the {@link leftAddon}.\n *\n * @defaultValue `false`\n */\n selectedIconAfter?: boolean;\n\n /**\n * Since the `selectedIcon`/`unselectedIcon` are rendered as\n * `leftAddon`/`rightAddon`, the provided `leftAddon`/`rightAddon` will be\n * wrapped in the {@link TextIconSpacing} component to maintain the correct\n * spacing. You can use this prop to provide any additional configuration to\n * the spacing.\n *\n * @example\n * ```tsx\n * <Option\n * leftAddon={<Avatar>A</Avatar>}\n * leftAddonType=\"avatar\"\n * value={0}\n * textIconSpacingProps={{\n * beforeClassName: \"my-custom-class-name\",\n * }}\n * >\n * Some Content\n * </Option>\n * ```\n */\n textIconSpacingProps?: Omit<TextIconSpacingProps, \"icon\" | \"children\">;\n}\n\n/**\n * **Client Component**\n *\n * This component is a wrapper around the {@link MenuItem} to implement custom\n * select option behavior.\n *\n * @since 6.0.0 removed the `selected` and `focused` props.\n * @since 6.0.0 Added the `value`, `selectedIcon`, `unselectedIcon`,\n * `selectedIconAfter`, and `iconSpacingProps` props.\n */\nexport const Option = forwardRef<HTMLLIElement, OptionProps>(\n function Option(props, ref) {\n const {\n id: propId,\n role = \"option\",\n value,\n children: propChildren,\n onClick = noop,\n className,\n selectedIcon: propSelectedIcon,\n unselectedIcon: propUnselectedIcon,\n selectedIconAfter: propSelectedIconAfter,\n textIconSpacingProps,\n leftAddon: propLeftAddon,\n leftAddonType,\n leftAddonClassName,\n rightAddon: propRightAddon,\n rightAddonType,\n rightAddonClassName,\n secondaryText,\n height: propHeight,\n disableTextChildren: propDisableTextChildren,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"option\");\n const {\n inputRef,\n currentValue,\n disableSelectedIcon,\n selectedIconAfter: contextSelectedIconAfter,\n } = useListboxContext();\n const selectedIconAfter = propSelectedIconAfter ?? contextSelectedIconAfter;\n const selected = value === currentValue;\n const selectedIcon = getIcon(\n \"selected\",\n disableSelectedIcon ? null : propSelectedIcon\n );\n const unselectedIcon = disableSelectedIcon\n ? null\n : propUnselectedIcon ?? DEFAULT_OPTION_UNSELECTED_ICON;\n const icon = selected ? selectedIcon : unselectedIcon;\n\n let leftAddon = propLeftAddon;\n let rightAddon = propRightAddon;\n let children = propChildren;\n let disableTextChildren = propDisableTextChildren;\n if (!selectedIconAfter && icon) {\n leftAddon = icon;\n if (propLeftAddon) {\n disableTextChildren = true;\n const Wrapper = propDisableTextChildren ? Fragment : ListItemText;\n\n children = (\n <TextIconSpacing {...textIconSpacingProps} icon={propLeftAddon}>\n <Wrapper>{children}</Wrapper>\n </TextIconSpacing>\n );\n }\n } else if (icon) {\n rightAddon = icon;\n if (propRightAddon) {\n disableTextChildren = true;\n const Wrapper = propDisableTextChildren ? Fragment : ListItemText;\n\n children = (\n <TextIconSpacing {...textIconSpacingProps} icon={propRightAddon}>\n <Wrapper>{children}</Wrapper>\n </TextIconSpacing>\n );\n }\n }\n\n const height = getListItemHeight({\n height: propHeight,\n leftAddon: leftAddon === icon ? null : leftAddon,\n leftAddonType,\n rightAddon: rightAddon === icon ? null : rightAddon,\n rightAddonType,\n secondaryText,\n });\n\n return (\n <MenuItem\n {...remaining}\n aria-selected={selected || undefined}\n id={id}\n ref={ref}\n role={role}\n onClick={(event) => {\n onClick(event);\n triggerManualChangeEvent(inputRef.current, value);\n }}\n className={option({ icon: !!icon, selected, className })}\n secondaryText={secondaryText}\n height={height}\n leftAddon={leftAddon}\n leftAddonType={leftAddonType}\n leftAddonClassName={cnb(\n leftAddon === icon && \"rmd-option__icon\",\n leftAddonClassName\n )}\n rightAddon={rightAddon}\n rightAddonType={rightAddonType}\n rightAddonClassName={cnb(\n rightAddon === icon && \"rmd-option__icon\",\n rightAddonClassName\n )}\n disableTextChildren={disableTextChildren}\n >\n {children}\n </MenuItem>\n );\n }\n);\n"],"names":["cnb","forwardRef","Fragment","getIcon","icon","TextIconSpacing","getListItemHeight","ListItemText","MenuItem","useEnsuredId","option","useListboxContext","triggerManualChangeEvent","noop","DEFAULT_OPTION_UNSELECTED_ICON","span","className","type","Option","props","ref","id","propId","role","value","children","propChildren","onClick","selectedIcon","propSelectedIcon","unselectedIcon","propUnselectedIcon","selectedIconAfter","propSelectedIconAfter","textIconSpacingProps","leftAddon","propLeftAddon","leftAddonType","leftAddonClassName","rightAddon","propRightAddon","rightAddonType","rightAddonClassName","secondaryText","height","propHeight","disableTextChildren","propDisableTextChildren","remaining","inputRef","currentValue","disableSelectedIcon","contextSelectedIconAfter","selected","Wrapper","aria-selected","undefined","event","current"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,EAAEC,QAAQ,QAAwB,QAAQ;AAC7D,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SACEC,eAAe,QAEV,6BAA6B;AACpC,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,QAAQ,QAA4B,sBAAsB;AACnE,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,0BAA0B;AAC5D,SAASC,wBAAwB,QAAQ,aAAa;AAEtD,MAAMC,OAAO;AACX,aAAa;AACf;AAEA;;;;;CAKC,GACD,OAAO,MAAMC,+CACX,KAACC;IAAKC,WAAWZ,KAAK;QAAEa,MAAM;IAAM;GACpC;AA0DF;;;;;;;;;CASC,GACD,OAAO,MAAMC,uBAASjB,WACpB,SAASiB,OAAOC,KAAK,EAAEC,GAAG;IACxB,MAAM,EACJC,IAAIC,MAAM,EACVC,OAAO,QAAQ,EACfC,KAAK,EACLC,UAAUC,YAAY,EACtBC,UAAUd,IAAI,EACdG,SAAS,EACTY,cAAcC,gBAAgB,EAC9BC,gBAAgBC,kBAAkB,EAClCC,mBAAmBC,qBAAqB,EACxCC,oBAAoB,EACpBC,WAAWC,aAAa,EACxBC,aAAa,EACbC,kBAAkB,EAClBC,YAAYC,cAAc,EAC1BC,cAAc,EACdC,mBAAmB,EACnBC,aAAa,EACbC,QAAQC,UAAU,EAClBC,qBAAqBC,uBAAuB,EAC5C,GAAGC,WACJ,GAAG7B;IAEJ,MAAME,KAAKZ,aAAaa,QAAQ;IAChC,MAAM,EACJ2B,QAAQ,EACRC,YAAY,EACZC,mBAAmB,EACnBnB,mBAAmBoB,wBAAwB,EAC5C,GAAGzC;IACJ,MAAMqB,oBAAoBC,yBAAyBmB;IACnD,MAAMC,WAAW7B,UAAU0B;IAC3B,MAAMtB,eAAezB,QACnB,YACAgD,sBAAsB,OAAOtB;IAE/B,MAAMC,iBAAiBqB,sBACnB,OACApB,sBAAsBjB;IAC1B,MAAMV,OAAOiD,WAAWzB,eAAeE;IAEvC,IAAIK,YAAYC;IAChB,IAAIG,aAAaC;IACjB,IAAIf,WAAWC;IACf,IAAIoB,sBAAsBC;IAC1B,IAAI,CAACf,qBAAqB5B,MAAM;QAC9B+B,YAAY/B;QACZ,IAAIgC,eAAe;YACjBU,sBAAsB;YACtB,MAAMQ,UAAUP,0BAA0B7C,WAAWK;YAErDkB,yBACE,KAACpB;gBAAiB,GAAG6B,oBAAoB;gBAAE9B,MAAMgC;0BAC/C,cAAA,KAACkB;8BAAS7B;;;QAGhB;IACF,OAAO,IAAIrB,MAAM;QACfmC,aAAanC;QACb,IAAIoC,gBAAgB;YAClBM,sBAAsB;YACtB,MAAMQ,UAAUP,0BAA0B7C,WAAWK;YAErDkB,yBACE,KAACpB;gBAAiB,GAAG6B,oBAAoB;gBAAE9B,MAAMoC;0BAC/C,cAAA,KAACc;8BAAS7B;;;QAGhB;IACF;IAEA,MAAMmB,SAAStC,kBAAkB;QAC/BsC,QAAQC;QACRV,WAAWA,cAAc/B,OAAO,OAAO+B;QACvCE;QACAE,YAAYA,eAAenC,OAAO,OAAOmC;QACzCE;QACAE;IACF;IAEA,qBACE,KAACnC;QACE,GAAGwC,SAAS;QACbO,iBAAeF,YAAYG;QAC3BnC,IAAIA;QACJD,KAAKA;QACLG,MAAMA;QACNI,SAAS,CAAC8B;YACR9B,QAAQ8B;YACR7C,yBAAyBqC,SAASS,OAAO,EAAElC;QAC7C;QACAR,WAAWN,OAAO;YAAEN,MAAM,CAAC,CAACA;YAAMiD;YAAUrC;QAAU;QACtD2B,eAAeA;QACfC,QAAQA;QACRT,WAAWA;QACXE,eAAeA;QACfC,oBAAoBtC,IAClBmC,cAAc/B,QAAQ,oBACtBkC;QAEFC,YAAYA;QACZE,gBAAgBA;QAChBC,qBAAqB1C,IACnBuC,eAAenC,QAAQ,oBACvBsC;QAEFI,qBAAqBA;kBAEpBrB;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/form/Option.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, Fragment, type ReactNode } from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { icon } from \"../icon/styles.js\";\nimport {\n TextIconSpacing,\n type TextIconSpacingProps,\n} from \"../icon/TextIconSpacing.js\";\nimport { getListItemHeight } from \"../list/getListItemHeight.js\";\nimport { ListItemText } from \"../list/ListItemText.js\";\nimport { MenuItem, type MenuItemProps } from \"../menu/MenuItem.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { option } from \"./optionStyles.js\";\nimport { useListboxContext } from \"./useListboxProvider.js\";\nimport { triggerManualChangeEvent } from \"./utils.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * This icon is used while the option is unselected so that the selected and\n * unselected options have the same alignment.\n *\n * @since 6.0.0\n */\nexport const DEFAULT_OPTION_UNSELECTED_ICON = (\n <span className={icon({ type: \"svg\" })} />\n);\n\n/**\n * @since 6.0.0 removed the `selected` and `focused` props.\n * @since 6.0.0 Added the `value`, `selectedIcon`, `unselectedIcon`,\n * `selectedIconAfter`, and `iconSpacingProps` props.\n */\nexport interface OptionProps extends MenuItemProps {\n /**\n * @defaultValue `\"option\"`\n */\n role?: string;\n\n value: string | number;\n\n /**\n * @defaultValue `getIcon(\"selected\")`\n */\n selectedIcon?: ReactNode;\n\n /**\n * @see {@link DEFAULT_OPTION_UNSELECTED_ICON}\n * @defaultValue `<span className=\"rmd-icon rmd-icon--svg\" />`\n */\n unselectedIcon?: ReactNode;\n\n /**\n * Set this to `true` of the {@link selectedIcon}/{@link unselectedIcon}\n * should appear as the {@link rightAddon} instead of the {@link leftAddon}.\n *\n * @defaultValue `false`\n */\n selectedIconAfter?: boolean;\n\n /**\n * Since the `selectedIcon`/`unselectedIcon` are rendered as\n * `leftAddon`/`rightAddon`, the provided `leftAddon`/`rightAddon` will be\n * wrapped in the {@link TextIconSpacing} component to maintain the correct\n * spacing. You can use this prop to provide any additional configuration to\n * the spacing.\n *\n * @example\n * ```tsx\n * <Option\n * leftAddon={<Avatar>A</Avatar>}\n * leftAddonType=\"avatar\"\n * value={0}\n * textIconSpacingProps={{\n * beforeClassName: \"my-custom-class-name\",\n * }}\n * >\n * Some Content\n * </Option>\n * ```\n */\n textIconSpacingProps?: Omit<TextIconSpacingProps, \"icon\" | \"children\">;\n}\n\n/**\n * **Client Component**\n *\n * This component is a wrapper around the {@link MenuItem} to implement custom\n * select option behavior.\n *\n * @since 6.0.0 removed the `selected` and `focused` props.\n * @since 6.0.0 Added the `value`, `selectedIcon`, `unselectedIcon`,\n * `selectedIconAfter`, and `iconSpacingProps` props.\n */\nexport const Option = forwardRef<HTMLLIElement, OptionProps>(\n function Option(props, ref) {\n const {\n id: propId,\n role = \"option\",\n value,\n children: propChildren,\n onClick = noop,\n className,\n selectedIcon: propSelectedIcon,\n unselectedIcon: propUnselectedIcon,\n selectedIconAfter: propSelectedIconAfter,\n textIconSpacingProps,\n leftAddon: propLeftAddon,\n leftAddonType,\n leftAddonClassName,\n rightAddon: propRightAddon,\n rightAddonType,\n rightAddonClassName,\n secondaryText,\n height: propHeight,\n disableTextChildren: propDisableTextChildren,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"option\");\n const {\n inputRef,\n currentValue,\n disableSelectedIcon,\n selectedIconAfter: contextSelectedIconAfter,\n } = useListboxContext();\n const selectedIconAfter = propSelectedIconAfter ?? contextSelectedIconAfter;\n const selected = value === currentValue;\n const selectedIcon = getIcon(\n \"selected\",\n disableSelectedIcon ? null : propSelectedIcon\n );\n const unselectedIcon = disableSelectedIcon\n ? null\n : (propUnselectedIcon ?? DEFAULT_OPTION_UNSELECTED_ICON);\n const icon = selected ? selectedIcon : unselectedIcon;\n\n let leftAddon = propLeftAddon;\n let rightAddon = propRightAddon;\n let children = propChildren;\n let disableTextChildren = propDisableTextChildren;\n if (!selectedIconAfter && icon) {\n leftAddon = icon;\n if (propLeftAddon) {\n disableTextChildren = true;\n const Wrapper = propDisableTextChildren ? Fragment : ListItemText;\n\n children = (\n <TextIconSpacing {...textIconSpacingProps} icon={propLeftAddon}>\n <Wrapper>{children}</Wrapper>\n </TextIconSpacing>\n );\n }\n } else if (icon) {\n rightAddon = icon;\n if (propRightAddon) {\n disableTextChildren = true;\n const Wrapper = propDisableTextChildren ? Fragment : ListItemText;\n\n children = (\n <TextIconSpacing {...textIconSpacingProps} icon={propRightAddon}>\n <Wrapper>{children}</Wrapper>\n </TextIconSpacing>\n );\n }\n }\n\n const height = getListItemHeight({\n height: propHeight,\n leftAddon: leftAddon === icon ? null : leftAddon,\n leftAddonType,\n rightAddon: rightAddon === icon ? null : rightAddon,\n rightAddonType,\n secondaryText,\n });\n\n return (\n <MenuItem\n {...remaining}\n aria-selected={selected || undefined}\n id={id}\n ref={ref}\n role={role}\n onClick={(event) => {\n onClick(event);\n triggerManualChangeEvent(inputRef.current, value);\n }}\n className={option({ icon: !!icon, selected, className })}\n secondaryText={secondaryText}\n height={height}\n leftAddon={leftAddon}\n leftAddonType={leftAddonType}\n leftAddonClassName={cnb(\n leftAddon === icon && \"rmd-option__icon\",\n leftAddonClassName\n )}\n rightAddon={rightAddon}\n rightAddonType={rightAddonType}\n rightAddonClassName={cnb(\n rightAddon === icon && \"rmd-option__icon\",\n rightAddonClassName\n )}\n disableTextChildren={disableTextChildren}\n >\n {children}\n </MenuItem>\n );\n }\n);\n"],"names":["cnb","forwardRef","Fragment","getIcon","icon","TextIconSpacing","getListItemHeight","ListItemText","MenuItem","useEnsuredId","option","useListboxContext","triggerManualChangeEvent","noop","DEFAULT_OPTION_UNSELECTED_ICON","span","className","type","Option","props","ref","id","propId","role","value","children","propChildren","onClick","selectedIcon","propSelectedIcon","unselectedIcon","propUnselectedIcon","selectedIconAfter","propSelectedIconAfter","textIconSpacingProps","leftAddon","propLeftAddon","leftAddonType","leftAddonClassName","rightAddon","propRightAddon","rightAddonType","rightAddonClassName","secondaryText","height","propHeight","disableTextChildren","propDisableTextChildren","remaining","inputRef","currentValue","disableSelectedIcon","contextSelectedIconAfter","selected","Wrapper","aria-selected","undefined","event","current"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,EAAEC,QAAQ,QAAwB,QAAQ;AAC7D,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SACEC,eAAe,QAEV,6BAA6B;AACpC,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,QAAQ,QAA4B,sBAAsB;AACnE,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,0BAA0B;AAC5D,SAASC,wBAAwB,QAAQ,aAAa;AAEtD,MAAMC,OAAO;AACX,aAAa;AACf;AAEA;;;;;CAKC,GACD,OAAO,MAAMC,+CACX,KAACC;IAAKC,WAAWZ,KAAK;QAAEa,MAAM;IAAM;GACpC;AA0DF;;;;;;;;;CASC,GACD,OAAO,MAAMC,uBAASjB,WACpB,SAASiB,OAAOC,KAAK,EAAEC,GAAG;IACxB,MAAM,EACJC,IAAIC,MAAM,EACVC,OAAO,QAAQ,EACfC,KAAK,EACLC,UAAUC,YAAY,EACtBC,UAAUd,IAAI,EACdG,SAAS,EACTY,cAAcC,gBAAgB,EAC9BC,gBAAgBC,kBAAkB,EAClCC,mBAAmBC,qBAAqB,EACxCC,oBAAoB,EACpBC,WAAWC,aAAa,EACxBC,aAAa,EACbC,kBAAkB,EAClBC,YAAYC,cAAc,EAC1BC,cAAc,EACdC,mBAAmB,EACnBC,aAAa,EACbC,QAAQC,UAAU,EAClBC,qBAAqBC,uBAAuB,EAC5C,GAAGC,WACJ,GAAG7B;IAEJ,MAAME,KAAKZ,aAAaa,QAAQ;IAChC,MAAM,EACJ2B,QAAQ,EACRC,YAAY,EACZC,mBAAmB,EACnBnB,mBAAmBoB,wBAAwB,EAC5C,GAAGzC;IACJ,MAAMqB,oBAAoBC,yBAAyBmB;IACnD,MAAMC,WAAW7B,UAAU0B;IAC3B,MAAMtB,eAAezB,QACnB,YACAgD,sBAAsB,OAAOtB;IAE/B,MAAMC,iBAAiBqB,sBACnB,OACCpB,sBAAsBjB;IAC3B,MAAMV,OAAOiD,WAAWzB,eAAeE;IAEvC,IAAIK,YAAYC;IAChB,IAAIG,aAAaC;IACjB,IAAIf,WAAWC;IACf,IAAIoB,sBAAsBC;IAC1B,IAAI,CAACf,qBAAqB5B,MAAM;QAC9B+B,YAAY/B;QACZ,IAAIgC,eAAe;YACjBU,sBAAsB;YACtB,MAAMQ,UAAUP,0BAA0B7C,WAAWK;YAErDkB,yBACE,KAACpB;gBAAiB,GAAG6B,oBAAoB;gBAAE9B,MAAMgC;0BAC/C,cAAA,KAACkB;8BAAS7B;;;QAGhB;IACF,OAAO,IAAIrB,MAAM;QACfmC,aAAanC;QACb,IAAIoC,gBAAgB;YAClBM,sBAAsB;YACtB,MAAMQ,UAAUP,0BAA0B7C,WAAWK;YAErDkB,yBACE,KAACpB;gBAAiB,GAAG6B,oBAAoB;gBAAE9B,MAAMoC;0BAC/C,cAAA,KAACc;8BAAS7B;;;QAGhB;IACF;IAEA,MAAMmB,SAAStC,kBAAkB;QAC/BsC,QAAQC;QACRV,WAAWA,cAAc/B,OAAO,OAAO+B;QACvCE;QACAE,YAAYA,eAAenC,OAAO,OAAOmC;QACzCE;QACAE;IACF;IAEA,qBACE,KAACnC;QACE,GAAGwC,SAAS;QACbO,iBAAeF,YAAYG;QAC3BnC,IAAIA;QACJD,KAAKA;QACLG,MAAMA;QACNI,SAAS,CAAC8B;YACR9B,QAAQ8B;YACR7C,yBAAyBqC,SAASS,OAAO,EAAElC;QAC7C;QACAR,WAAWN,OAAO;YAAEN,MAAM,CAAC,CAACA;YAAMiD;YAAUrC;QAAU;QACtD2B,eAAeA;QACfC,QAAQA;QACRT,WAAWA;QACXE,eAAeA;QACfC,oBAAoBtC,IAClBmC,cAAc/B,QAAQ,oBACtBkC;QAEFC,YAAYA;QACZE,gBAAgBA;QAChBC,qBAAqB1C,IACnBuC,eAAenC,QAAQ,oBACvBsC;QAEFI,qBAAqBA;kBAEpBrB;;AAGP,GACA"}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type RadioProps } from "./InputToggle.js";
3
2
  /**
4
3
  * **Client Component**
@@ -11,8 +11,6 @@ export interface SelectedOptionProps extends BoxProps {
11
11
  disableAddon: boolean;
12
12
  }
13
13
  /**
14
- * **Server Component**
15
- *
16
14
  * This component is used to render the current option.
17
15
  *
18
16
  * @since 6.0.0
@@ -4,8 +4,6 @@ import { Box } from "../box/Box.js";
4
4
  import { cssUtils } from "../cssUtils.js";
5
5
  import { textField } from "./textFieldStyles.js";
6
6
  /**
7
- * **Server Component**
8
- *
9
7
  * This component is used to render the current option.
10
8
  *
11
9
  * @since 6.0.0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/SelectedOption.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { type ReactElement, type ReactNode } from \"react\";\nimport { Box, type BoxProps } from \"../box/Box.js\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { type OptionProps } from \"./Option.js\";\nimport { textField } from \"./textFieldStyles.js\";\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport interface SelectedOptionProps extends BoxProps {\n option: OptionProps | undefined;\n placeholder?: ReactNode;\n disableAddon: boolean;\n}\n\n/**\n * **Server Component**\n *\n * This component is used to render the current option.\n *\n * @since 6.0.0\n * @internal\n */\nexport function SelectedOption(props: SelectedOptionProps): ReactElement {\n const {\n disableAddon,\n option,\n className,\n disablePadding = true,\n placeholder,\n ...remaining\n } = props;\n\n let children = option?.children || placeholder;\n // when the children are a string or number, wrap it in additional span so\n // that overflow can be ellipsis-ed\n if (typeof children === \"string\" || typeof children === \"number\") {\n children = (\n <span className={cssUtils({ textOverflow: \"ellipsis\" })}>{children}</span>\n );\n }\n\n return (\n <Box\n {...remaining}\n className={cnb(\"rmd-selected-option\", textField(), className)}\n disablePadding={disablePadding}\n >\n {!disableAddon && option?.leftAddon}\n {children}\n </Box>\n );\n}\n"],"names":["cnb","Box","cssUtils","textField","SelectedOption","props","disableAddon","option","className","disablePadding","placeholder","remaining","children","span","textOverflow","leftAddon"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAEhC,SAASC,GAAG,QAAuB,gBAAgB;AACnD,SAASC,QAAQ,QAAQ,iBAAiB;AAE1C,SAASC,SAAS,QAAQ,uBAAuB;AAYjD;;;;;;;CAOC,GACD,OAAO,SAASC,eAAeC,KAA0B;IACvD,MAAM,EACJC,YAAY,EACZC,MAAM,EACNC,SAAS,EACTC,iBAAiB,IAAI,EACrBC,WAAW,EACX,GAAGC,WACJ,GAAGN;IAEJ,IAAIO,WAAWL,QAAQK,YAAYF;IACnC,0EAA0E;IAC1E,mCAAmC;IACnC,IAAI,OAAOE,aAAa,YAAY,OAAOA,aAAa,UAAU;QAChEA,yBACE,KAACC;YAAKL,WAAWN,SAAS;gBAAEY,cAAc;YAAW;sBAAKF;;IAE9D;IAEA,qBACE,MAACX;QACE,GAAGU,SAAS;QACbH,WAAWR,IAAI,uBAAuBG,aAAaK;QACnDC,gBAAgBA;;YAEf,CAACH,gBAAgBC,QAAQQ;YACzBH;;;AAGP"}
1
+ {"version":3,"sources":["../../src/form/SelectedOption.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { type ReactElement, type ReactNode } from \"react\";\nimport { Box, type BoxProps } from \"../box/Box.js\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { type OptionProps } from \"./Option.js\";\nimport { textField } from \"./textFieldStyles.js\";\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport interface SelectedOptionProps extends BoxProps {\n option: OptionProps | undefined;\n placeholder?: ReactNode;\n disableAddon: boolean;\n}\n\n/**\n * This component is used to render the current option.\n *\n * @since 6.0.0\n * @internal\n */\nexport function SelectedOption(props: SelectedOptionProps): ReactElement {\n const {\n disableAddon,\n option,\n className,\n disablePadding = true,\n placeholder,\n ...remaining\n } = props;\n\n let children = option?.children || placeholder;\n // when the children are a string or number, wrap it in additional span so\n // that overflow can be ellipsis-ed\n if (typeof children === \"string\" || typeof children === \"number\") {\n children = (\n <span className={cssUtils({ textOverflow: \"ellipsis\" })}>{children}</span>\n );\n }\n\n return (\n <Box\n {...remaining}\n className={cnb(\"rmd-selected-option\", textField(), className)}\n disablePadding={disablePadding}\n >\n {!disableAddon && option?.leftAddon}\n {children}\n </Box>\n );\n}\n"],"names":["cnb","Box","cssUtils","textField","SelectedOption","props","disableAddon","option","className","disablePadding","placeholder","remaining","children","span","textOverflow","leftAddon"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAEhC,SAASC,GAAG,QAAuB,gBAAgB;AACnD,SAASC,QAAQ,QAAQ,iBAAiB;AAE1C,SAASC,SAAS,QAAQ,uBAAuB;AAYjD;;;;;CAKC,GACD,OAAO,SAASC,eAAeC,KAA0B;IACvD,MAAM,EACJC,YAAY,EACZC,MAAM,EACNC,SAAS,EACTC,iBAAiB,IAAI,EACrBC,WAAW,EACX,GAAGC,WACJ,GAAGN;IAEJ,IAAIO,WAAWL,QAAQK,YAAYF;IACnC,0EAA0E;IAC1E,mCAAmC;IACnC,IAAI,OAAOE,aAAa,YAAY,OAAOA,aAAa,UAAU;QAChEA,yBACE,KAACC;YAAKL,WAAWN,SAAS;gBAAEY,cAAc;YAAW;sBAAKF;;IAE9D;IAEA,qBACE,MAACX;QACE,GAAGU,SAAS;QACbH,WAAWR,IAAI,uBAAuBG,aAAaK;QACnDC,gBAAgBA;;YAEf,CAACH,gBAAgBC,QAAQQ;YACzBH;;;AAGP"}
@@ -30,8 +30,6 @@ export interface SliderContainerProps extends HTMLAttributes<HTMLDivElement>, Sl
30
30
  vertical: boolean;
31
31
  }
32
32
  /**
33
- * **Server Component**
34
- *
35
33
  * The `SliderContainer` component is mostly an internal component that is
36
34
  * built-in to the `Slider` and `RangeSlider` components to add addons to the
37
35
  * left or right of the `SliderTrack`. When vertical, it will add addons to the
@@ -4,8 +4,6 @@ import { forwardRef } from "react";
4
4
  import { bem } from "../utils/bem.js";
5
5
  const styles = bem("rmd-slider-container");
6
6
  /**
7
- * **Server Component**
8
- *
9
7
  * The `SliderContainer` component is mostly an internal component that is
10
8
  * built-in to the `Slider` and `RangeSlider` components to add addons to the
11
9
  * left or right of the `SliderTrack`. When vertical, it will add addons to the
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/SliderContainer.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-slider-container\");\n\n/**\n * @since 2.5.0\n * @since 6.0.0 Renamed from `SliderAddons` to `SliderContainerAddonProps`\n */\nexport interface SliderAddonProps {\n /**\n * An optional addon to render before the slider's track. This can be anything\n * and will be wrapped in the `TextIconSpacing` component.\n *\n * When the `vertical` prop is enabled, the addon will appear underneath the\n * track.\n */\n beforeAddon?: ReactNode;\n\n /**\n * An optional addon to render after the slider's track. This can be anything\n * and will be wrapped in the `TextIconSpacing` component.\n *\n * When the `vertical` prop is enabled, the addon will appear above the track.\n */\n afterAddon?: ReactNode;\n}\n\n/**\n * @internal\n * @since 2.5.0\n * @since 6.0.0 Removed the `label` support since you'll generally want to use\n * a `Fieldset` instead.\n */\nexport interface SliderContainerProps\n extends HTMLAttributes<HTMLDivElement>,\n SliderAddonProps {\n vertical: boolean;\n}\n\n/**\n * **Server Component**\n *\n * The `SliderContainer` component is mostly an internal component that is\n * built-in to the `Slider` and `RangeSlider` components to add addons to the\n * left or right of the `SliderTrack`. When vertical, it will add addons to the\n * bottom or top instead.\n *\n * @internal\n * @since 2.5.0\n * @since 6.0.0 Removed the `label` support since you'll generally want to use\n * a `Fieldset` instead.\n */\nexport const SliderContainer = forwardRef<HTMLDivElement, SliderContainerProps>(\n function SliderContainer(props, ref) {\n const {\n className,\n children,\n beforeAddon,\n afterAddon,\n vertical,\n ...remaining\n } = props;\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={cnb(\n styles({\n h: !vertical,\n \"pad-left\": !vertical && !beforeAddon,\n \"pad-right\": !vertical && !afterAddon,\n v: vertical,\n \"pad-bottom\": vertical && !beforeAddon,\n \"pad-top\": vertical && !afterAddon,\n }),\n className\n )}\n >\n {beforeAddon}\n {children}\n {afterAddon}\n </div>\n );\n }\n);\n"],"names":["cnb","forwardRef","bem","styles","SliderContainer","props","ref","className","children","beforeAddon","afterAddon","vertical","remaining","div","h","v"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6C,QAAQ;AACxE,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAqCnB;;;;;;;;;;;;CAYC,GACD,OAAO,MAAME,gCAAkBH,WAC7B,SAASG,gBAAgBC,KAAK,EAAEC,GAAG;IACjC,MAAM,EACJC,SAAS,EACTC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,QAAQ,EACR,GAAGC,WACJ,GAAGP;IAEJ,qBACE,MAACQ;QACE,GAAGD,SAAS;QACbN,KAAKA;QACLC,WAAWP,IACTG,OAAO;YACLW,GAAG,CAACH;YACJ,YAAY,CAACA,YAAY,CAACF;YAC1B,aAAa,CAACE,YAAY,CAACD;YAC3BK,GAAGJ;YACH,cAAcA,YAAY,CAACF;YAC3B,WAAWE,YAAY,CAACD;QAC1B,IACAH;;YAGDE;YACAD;YACAE;;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/form/SliderContainer.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-slider-container\");\n\n/**\n * @since 2.5.0\n * @since 6.0.0 Renamed from `SliderAddons` to `SliderContainerAddonProps`\n */\nexport interface SliderAddonProps {\n /**\n * An optional addon to render before the slider's track. This can be anything\n * and will be wrapped in the `TextIconSpacing` component.\n *\n * When the `vertical` prop is enabled, the addon will appear underneath the\n * track.\n */\n beforeAddon?: ReactNode;\n\n /**\n * An optional addon to render after the slider's track. This can be anything\n * and will be wrapped in the `TextIconSpacing` component.\n *\n * When the `vertical` prop is enabled, the addon will appear above the track.\n */\n afterAddon?: ReactNode;\n}\n\n/**\n * @internal\n * @since 2.5.0\n * @since 6.0.0 Removed the `label` support since you'll generally want to use\n * a `Fieldset` instead.\n */\nexport interface SliderContainerProps\n extends HTMLAttributes<HTMLDivElement>,\n SliderAddonProps {\n vertical: boolean;\n}\n\n/**\n * The `SliderContainer` component is mostly an internal component that is\n * built-in to the `Slider` and `RangeSlider` components to add addons to the\n * left or right of the `SliderTrack`. When vertical, it will add addons to the\n * bottom or top instead.\n *\n * @internal\n * @since 2.5.0\n * @since 6.0.0 Removed the `label` support since you'll generally want to use\n * a `Fieldset` instead.\n */\nexport const SliderContainer = forwardRef<HTMLDivElement, SliderContainerProps>(\n function SliderContainer(props, ref) {\n const {\n className,\n children,\n beforeAddon,\n afterAddon,\n vertical,\n ...remaining\n } = props;\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={cnb(\n styles({\n h: !vertical,\n \"pad-left\": !vertical && !beforeAddon,\n \"pad-right\": !vertical && !afterAddon,\n v: vertical,\n \"pad-bottom\": vertical && !beforeAddon,\n \"pad-top\": vertical && !afterAddon,\n }),\n className\n )}\n >\n {beforeAddon}\n {children}\n {afterAddon}\n </div>\n );\n }\n);\n"],"names":["cnb","forwardRef","bem","styles","SliderContainer","props","ref","className","children","beforeAddon","afterAddon","vertical","remaining","div","h","v"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6C,QAAQ;AACxE,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAqCnB;;;;;;;;;;CAUC,GACD,OAAO,MAAME,gCAAkBH,WAC7B,SAASG,gBAAgBC,KAAK,EAAEC,GAAG;IACjC,MAAM,EACJC,SAAS,EACTC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,QAAQ,EACR,GAAGC,WACJ,GAAGP;IAEJ,qBACE,MAACQ;QACE,GAAGD,SAAS;QACbN,KAAKA;QACLC,WAAWP,IACTG,OAAO;YACLW,GAAG,CAACH;YACJ,YAAY,CAACA,YAAY,CAACF;YAC1B,aAAa,CAACE,YAAY,CAACD;YAC3BK,GAAGJ;YACH,cAAcA,YAAY,CAACF;YAC3B,WAAWE,YAAY,CAACD;QAC1B,IACAH;;YAGDE;YACAD;YACAE;;;AAGP,GACA"}
@@ -9,8 +9,6 @@ export interface SliderMarkProps extends HTMLAttributes<HTMLSpanElement> {
9
9
  vertical: boolean;
10
10
  }
11
11
  /**
12
- * **Server Component**
13
- *
14
12
  * @internal
15
13
  * @since 6.0.0
16
14
  */
@@ -3,8 +3,6 @@ import { cnb } from "cnbuilder";
3
3
  import { bem } from "../utils/bem.js";
4
4
  const styles = bem("rmd-slider-mark");
5
5
  /**
6
- * **Server Component**
7
- *
8
6
  * @internal
9
7
  * @since 6.0.0
10
8
  */ export function SliderMark(props) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/SliderMark.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { type HTMLAttributes, type ReactElement } from \"react\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-slider-mark\");\n\n/**\n * @internal\n * @since 6.0.0\n */\nexport interface SliderMarkProps extends HTMLAttributes<HTMLSpanElement> {\n active: boolean;\n offset: string;\n vertical: boolean;\n}\n\n/**\n * **Server Component**\n *\n * @internal\n * @since 6.0.0\n */\nexport function SliderMark(props: SliderMarkProps): ReactElement {\n const { active, offset, vertical, style, className, ...remaining } = props;\n\n return (\n <span\n {...remaining}\n style={{ ...style, \"--rmd-slider-mark-offset\": offset }}\n className={cnb(\n styles({\n active,\n inactive: !active,\n h: !vertical,\n v: vertical,\n }),\n className\n )}\n />\n );\n}\n"],"names":["cnb","bem","styles","SliderMark","props","active","offset","vertical","style","className","remaining","span","inactive","h","v"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAEhC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAYnB;;;;;CAKC,GACD,OAAO,SAASE,WAAWC,KAAsB;IAC/C,MAAM,EAAEC,MAAM,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,SAAS,EAAE,GAAGC,WAAW,GAAGN;IAErE,qBACE,KAACO;QACE,GAAGD,SAAS;QACbF,OAAO;YAAE,GAAGA,KAAK;YAAE,4BAA4BF;QAAO;QACtDG,WAAWT,IACTE,OAAO;YACLG;YACAO,UAAU,CAACP;YACXQ,GAAG,CAACN;YACJO,GAAGP;QACL,IACAE;;AAIR"}
1
+ {"version":3,"sources":["../../src/form/SliderMark.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { type HTMLAttributes, type ReactElement } from \"react\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-slider-mark\");\n\n/**\n * @internal\n * @since 6.0.0\n */\nexport interface SliderMarkProps extends HTMLAttributes<HTMLSpanElement> {\n active: boolean;\n offset: string;\n vertical: boolean;\n}\n\n/**\n * @internal\n * @since 6.0.0\n */\nexport function SliderMark(props: SliderMarkProps): ReactElement {\n const { active, offset, vertical, style, className, ...remaining } = props;\n\n return (\n <span\n {...remaining}\n style={{ ...style, \"--rmd-slider-mark-offset\": offset }}\n className={cnb(\n styles({\n active,\n inactive: !active,\n h: !vertical,\n v: vertical,\n }),\n className\n )}\n />\n );\n}\n"],"names":["cnb","bem","styles","SliderMark","props","active","offset","vertical","style","className","remaining","span","inactive","h","v"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAEhC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAYnB;;;CAGC,GACD,OAAO,SAASE,WAAWC,KAAsB;IAC/C,MAAM,EAAEC,MAAM,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,SAAS,EAAE,GAAGC,WAAW,GAAGN;IAErE,qBACE,KAACO;QACE,GAAGD,SAAS;QACbF,OAAO;YAAE,GAAGA,KAAK;YAAE,4BAA4BF;QAAO;QACtDG,WAAWT,IACTE,OAAO;YACLG;YACAO,UAAU,CAACP;YACXQ,GAAG,CAACN;YACJO,GAAGP;QACL,IACAE;;AAIR"}
@@ -19,8 +19,6 @@ export interface SliderMarkLabelProps extends CustomizableSliderMarkLabelProps {
19
19
  vertical: boolean;
20
20
  }
21
21
  /**
22
- * **Server Component**
23
- *
24
22
  * @internal
25
23
  * @since 6.0.0
26
24
  */
@@ -4,8 +4,6 @@ import { Typography } from "../typography/Typography.js";
4
4
  import { bem } from "../utils/bem.js";
5
5
  const styles = bem("rmd-slider-mark-label");
6
6
  /**
7
- * **Server Component**
8
- *
9
7
  * @internal
10
8
  * @since 6.0.0
11
9
  */ export function SliderMarkLabel(props) {