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

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 (752) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/.turbo/turbo-lint.log +12 -0
  3. package/.turbo/turbo-test.log +179 -0
  4. package/.turbo/turbo-typecheck.log +4 -0
  5. package/CHANGELOG.md +103 -0
  6. package/coverage/clover.xml +437 -3
  7. package/coverage/coverage-final.json +4 -1
  8. package/coverage/lcov-report/Avatar.tsx.html +472 -0
  9. package/coverage/lcov-report/IconRotator.tsx.html +322 -0
  10. package/coverage/lcov-report/ListItem.tsx.html +892 -0
  11. package/coverage/lcov-report/Portal.tsx.html +223 -0
  12. package/coverage/lcov-report/PortalContainerProvider.tsx.html +367 -0
  13. package/coverage/lcov-report/SkeletonPlaceholder.tsx.html +613 -0
  14. package/coverage/lcov-report/Tab.tsx.html +261 -147
  15. package/coverage/lcov-report/TreeGroup.tsx.html +313 -0
  16. package/coverage/lcov-report/app-bar/AppBar.tsx.html +178 -28
  17. package/coverage/lcov-report/app-bar/index.html +7 -7
  18. package/coverage/lcov-report/button/TooltippedButton.tsx.html +445 -0
  19. package/coverage/lcov-report/button/index.html +10 -10
  20. package/coverage/lcov-report/card/Card.tsx.html +349 -0
  21. package/coverage/lcov-report/card/CardContent.tsx.html +223 -0
  22. package/coverage/lcov-report/card/ClickableCard.tsx.html +400 -0
  23. package/coverage/lcov-report/card/index.html +21 -21
  24. package/coverage/lcov-report/card/styles.ts.html +428 -392
  25. package/coverage/lcov-report/cssUtils.ts.html +86 -59
  26. package/coverage/lcov-report/draggable/index.html +21 -36
  27. package/coverage/lcov-report/draggable/useDraggable.ts.html +377 -368
  28. package/coverage/lcov-report/draggable/utils.ts.html +96 -195
  29. package/coverage/lcov-report/expansion-panel/ExpansionList.tsx.html +211 -0
  30. package/coverage/lcov-report/expansion-panel/ExpansionPanel.tsx.html +12 -15
  31. package/coverage/lcov-report/expansion-panel/index.html +34 -19
  32. package/coverage/lcov-report/expansion-panel/useExpansionPanels.ts.html +928 -0
  33. package/coverage/lcov-report/form/MenuItemInputToggle.tsx.html +2 -2
  34. package/coverage/lcov-report/form/Select.tsx.html +1663 -0
  35. package/coverage/lcov-report/form/Slider.tsx.html +163 -40
  36. package/coverage/lcov-report/form/index.html +21 -21
  37. package/coverage/lcov-report/icon/FontIcon.tsx.html +28 -28
  38. package/coverage/lcov-report/icon/index.html +1 -1
  39. package/coverage/lcov-report/index.html +41 -11
  40. package/coverage/lcov-report/interaction/UserInteractionModeProvider.tsx.html +679 -0
  41. package/coverage/lcov-report/interaction/config.ts.html +181 -0
  42. package/coverage/lcov-report/interaction/index.html +33 -18
  43. package/coverage/lcov-report/list/List.tsx.html +490 -0
  44. package/coverage/lcov-report/list/ListItem.tsx.html +886 -0
  45. package/coverage/lcov-report/list/ListItemAddon.tsx.html +286 -0
  46. package/coverage/lcov-report/list/ListItemChildren.tsx.html +445 -0
  47. package/coverage/lcov-report/list/ListItemLink.tsx.html +5 -5
  48. package/coverage/lcov-report/list/index.html +81 -6
  49. package/coverage/lcov-report/list/listItemStyles.ts.html +703 -0
  50. package/coverage/lcov-report/media-queries/appSize.ts.html +1 -1
  51. package/coverage/lcov-report/media-queries/index.html +1 -1
  52. package/coverage/lcov-report/menu/Menu.tsx.html +37 -19
  53. package/coverage/lcov-report/menu/index.html +14 -44
  54. package/coverage/lcov-report/sheet/index.html +8 -8
  55. package/coverage/lcov-report/sheet/styles.ts.html +376 -0
  56. package/coverage/lcov-report/skeletonPlaceholderUtils.ts.html +400 -0
  57. package/coverage/lcov-report/src/CoreProviders.tsx.html +20 -20
  58. package/coverage/lcov-report/src/NoSsr.tsx.html +1 -1
  59. package/coverage/lcov-report/src/SsrProvider.tsx.html +10 -10
  60. package/coverage/lcov-report/src/app-bar/AppBar.tsx.html +143 -23
  61. package/coverage/lcov-report/src/app-bar/AppBarTitle.tsx.html +1 -1
  62. package/coverage/lcov-report/src/app-bar/index.html +5 -5
  63. package/coverage/lcov-report/src/avatar/Avatar.tsx.html +2 -2
  64. package/coverage/lcov-report/src/avatar/index.html +1 -1
  65. package/coverage/lcov-report/src/avatar/styles.ts.html +1 -1
  66. package/coverage/lcov-report/src/badge/Badge.tsx.html +1 -1
  67. package/coverage/lcov-report/src/badge/index.html +1 -1
  68. package/coverage/lcov-report/src/box/Box.tsx.html +1 -1
  69. package/coverage/lcov-report/src/box/index.html +23 -8
  70. package/coverage/lcov-report/src/box/styles.ts.html +46 -46
  71. package/coverage/lcov-report/src/button/AsyncButton.tsx.html +1 -1
  72. package/coverage/lcov-report/src/button/Button.tsx.html +84 -84
  73. package/coverage/lcov-report/src/button/ButtonUnstyled.tsx.html +1 -1
  74. package/coverage/lcov-report/src/button/FloatingActionButton.tsx.html +11 -11
  75. package/coverage/lcov-report/src/button/TooltippedButton.tsx.html +445 -0
  76. package/coverage/lcov-report/src/button/buttonStyles.ts.html +52 -52
  77. package/coverage/lcov-report/src/button/buttonUnstyledStyles.ts.html +1 -1
  78. package/coverage/lcov-report/src/button/index.html +83 -8
  79. package/coverage/lcov-report/src/card/Card.tsx.html +37 -31
  80. package/coverage/lcov-report/src/card/CardContent.tsx.html +4 -4
  81. package/coverage/lcov-report/src/card/CardFooter.tsx.html +1 -1
  82. package/coverage/lcov-report/src/card/CardHeader.tsx.html +1 -1
  83. package/coverage/lcov-report/src/card/CardSubtitle.tsx.html +1 -1
  84. package/coverage/lcov-report/src/card/CardTitle.tsx.html +1 -1
  85. package/coverage/lcov-report/src/card/ClickableCard.tsx.html +400 -0
  86. package/coverage/lcov-report/src/card/index.html +24 -9
  87. package/coverage/lcov-report/src/card/styles.ts.html +58 -31
  88. package/coverage/lcov-report/src/chip/Chip.tsx.html +1 -1
  89. package/coverage/lcov-report/src/chip/index.html +7 -7
  90. package/coverage/lcov-report/src/chip/styles.ts.html +9 -12
  91. package/coverage/lcov-report/src/cssUtils.ts.html +53 -53
  92. package/coverage/lcov-report/src/delegateEvent.ts.html +109 -109
  93. package/coverage/lcov-report/src/dialog/Dialog.tsx.html +1 -1
  94. package/coverage/lcov-report/src/dialog/DialogContainer.tsx.html +1 -1
  95. package/coverage/lcov-report/src/dialog/DialogContent.tsx.html +1 -1
  96. package/coverage/lcov-report/src/dialog/DialogFooter.tsx.html +1 -1
  97. package/coverage/lcov-report/src/dialog/DialogHeader.tsx.html +1 -1
  98. package/coverage/lcov-report/src/dialog/DialogTitle.tsx.html +1 -1
  99. package/coverage/lcov-report/src/dialog/FixedDialog.tsx.html +1 -1
  100. package/coverage/lcov-report/src/dialog/NestedDialogProvider.ts.html +1 -1
  101. package/coverage/lcov-report/src/dialog/index.html +129 -9
  102. package/coverage/lcov-report/src/dialog/styles.ts.html +1 -1
  103. package/coverage/lcov-report/src/divider/Divider.tsx.html +4 -7
  104. package/coverage/lcov-report/src/divider/index.html +5 -5
  105. package/coverage/lcov-report/src/divider/styles.ts.html +1 -1
  106. package/coverage/lcov-report/src/draggable/index.html +27 -27
  107. package/coverage/lcov-report/src/draggable/useDraggable.ts.html +47 -44
  108. package/coverage/lcov-report/src/draggable/utils.ts.html +29 -131
  109. package/coverage/lcov-report/src/expansion-panel/ExpansionList.tsx.html +1 -1
  110. package/coverage/lcov-report/src/expansion-panel/ExpansionPanel.tsx.html +1 -1
  111. package/coverage/lcov-report/src/expansion-panel/ExpansionPanelHeader.tsx.html +1 -1
  112. package/coverage/lcov-report/src/expansion-panel/index.html +8 -8
  113. package/coverage/lcov-report/src/expansion-panel/useExpansionList.ts.html +1 -1
  114. package/coverage/lcov-report/src/expansion-panel/useExpansionPanels.ts.html +36 -24
  115. package/coverage/lcov-report/src/focus/index.html +1 -1
  116. package/coverage/lcov-report/src/focus/useFocusContainer.ts.html +1 -1
  117. package/coverage/lcov-report/src/focus/utils.ts.html +1 -1
  118. package/coverage/lcov-report/src/form/Checkbox.tsx.html +1 -1
  119. package/coverage/lcov-report/src/form/Fieldset.tsx.html +1 -1
  120. package/coverage/lcov-report/src/form/FileInput.tsx.html +1 -1
  121. package/coverage/lcov-report/src/form/Form.tsx.html +1 -1
  122. package/coverage/lcov-report/src/form/FormMessage.tsx.html +1 -1
  123. package/coverage/lcov-report/src/form/FormMessageContainer.tsx.html +5 -5
  124. package/coverage/lcov-report/src/form/FormMessageCounter.tsx.html +1 -1
  125. package/coverage/lcov-report/src/form/InputToggle.tsx.html +110 -110
  126. package/coverage/lcov-report/src/form/InputToggleIcon.tsx.html +63 -63
  127. package/coverage/lcov-report/src/form/Label.tsx.html +98 -98
  128. package/coverage/lcov-report/src/form/Legend.tsx.html +1 -1
  129. package/coverage/lcov-report/src/form/MenuItemCheckbox.tsx.html +1 -1
  130. package/coverage/lcov-report/src/form/MenuItemFileInput.tsx.html +1 -1
  131. package/coverage/lcov-report/src/form/MenuItemInputToggle.tsx.html +2 -2
  132. package/coverage/lcov-report/src/form/MenuItemRadio.tsx.html +1 -1
  133. package/coverage/lcov-report/src/form/MenuItemSwitch.tsx.html +1 -1
  134. package/coverage/lcov-report/src/form/MenuItemTextField.tsx.html +1 -1
  135. package/coverage/lcov-report/src/form/NativeSelect.tsx.html +1 -1
  136. package/coverage/lcov-report/src/form/OptGroup.tsx.html +1 -1
  137. package/coverage/lcov-report/src/form/Option.tsx.html +1 -1
  138. package/coverage/lcov-report/src/form/Password.tsx.html +1 -1
  139. package/coverage/lcov-report/src/form/Radio.tsx.html +3 -3
  140. package/coverage/lcov-report/src/form/Select.tsx.html +29 -5
  141. package/coverage/lcov-report/src/form/SelectValue.tsx.html +1 -1
  142. package/coverage/lcov-report/src/form/Slider.tsx.html +1 -1
  143. package/coverage/lcov-report/src/form/SliderContainer.tsx.html +1 -1
  144. package/coverage/lcov-report/src/form/SliderMark.tsx.html +1 -1
  145. package/coverage/lcov-report/src/form/SliderMarkLabel.tsx.html +1 -1
  146. package/coverage/lcov-report/src/form/SliderThumb.tsx.html +1 -1
  147. package/coverage/lcov-report/src/form/SliderTrack.tsx.html +1 -1
  148. package/coverage/lcov-report/src/form/SliderValueMarks.tsx.html +1 -1
  149. package/coverage/lcov-report/src/form/SliderValueTooltip.tsx.html +1 -1
  150. package/coverage/lcov-report/src/form/Switch.tsx.html +1 -1
  151. package/coverage/lcov-report/src/form/SwitchTrack.tsx.html +1 -1
  152. package/coverage/lcov-report/src/form/TextArea.tsx.html +2 -2
  153. package/coverage/lcov-report/src/form/TextField.tsx.html +1 -1
  154. package/coverage/lcov-report/src/form/TextFieldAddon.tsx.html +1 -1
  155. package/coverage/lcov-report/src/form/TextFieldContainer.tsx.html +1 -1
  156. package/coverage/lcov-report/src/form/TextFieldContainerStyles.ts.html +8 -8
  157. package/coverage/lcov-report/src/form/fileUtils.ts.html +1 -1
  158. package/coverage/lcov-report/src/form/formConfig.ts.html +1 -1
  159. package/coverage/lcov-report/src/form/formMessageStyles.ts.html +1 -1
  160. package/coverage/lcov-report/src/form/index.html +940 -10
  161. package/coverage/lcov-report/src/form/inputToggleStyles.ts.html +30 -30
  162. package/coverage/lcov-report/src/form/nativeSelectStyles.ts.html +1 -1
  163. package/coverage/lcov-report/src/form/optionStyles.ts.html +1 -1
  164. package/coverage/lcov-report/src/form/passwordStyles.ts.html +1 -1
  165. package/coverage/lcov-report/src/form/selectStyles.ts.html +1 -1
  166. package/coverage/lcov-report/src/form/selectUtils.ts.html +1 -1
  167. package/coverage/lcov-report/src/form/sliderUtils.ts.html +1 -1
  168. package/coverage/lcov-report/src/form/switchStyles.ts.html +1 -1
  169. package/coverage/lcov-report/src/form/textAreaStyles.ts.html +3 -3
  170. package/coverage/lcov-report/src/form/textFieldStyles.ts.html +1 -1
  171. package/coverage/lcov-report/src/form/useCheckboxGroup.ts.html +1 -1
  172. package/coverage/lcov-report/src/form/useFileUpload.ts.html +1 -1
  173. package/coverage/lcov-report/src/form/useListboxProvider.ts.html +1 -1
  174. package/coverage/lcov-report/src/form/useNumberField.ts.html +1 -1
  175. package/coverage/lcov-report/src/form/useRadioGroup.ts.html +47 -47
  176. package/coverage/lcov-report/src/form/useRangeSlider.ts.html +1 -1
  177. package/coverage/lcov-report/src/form/useResizingTextArea.ts.html +1 -1
  178. package/coverage/lcov-report/src/form/useSlider.ts.html +1 -1
  179. package/coverage/lcov-report/src/form/useTextField.ts.html +1 -1
  180. package/coverage/lcov-report/src/form/utils.ts.html +1 -1
  181. package/coverage/lcov-report/src/form/validation.ts.html +1 -1
  182. package/coverage/lcov-report/src/hoverMode/index.html +1 -1
  183. package/coverage/lcov-report/src/hoverMode/useHoverMode.ts.html +98 -98
  184. package/coverage/lcov-report/src/hoverMode/useHoverModeProvider.ts.html +19 -19
  185. package/coverage/lcov-report/src/icon/FontIcon.tsx.html +28 -28
  186. package/coverage/lcov-report/src/icon/IconRotator.tsx.html +5 -8
  187. package/coverage/lcov-report/src/icon/MaterialIcon.tsx.html +1 -1
  188. package/coverage/lcov-report/src/icon/MaterialSymbol.tsx.html +1 -1
  189. package/coverage/lcov-report/src/icon/SVGIcon.tsx.html +1 -1
  190. package/coverage/lcov-report/src/icon/TextIconSpacing.tsx.html +1 -1
  191. package/coverage/lcov-report/src/icon/iconConfig.tsx.html +8 -8
  192. package/coverage/lcov-report/src/icon/index.html +7 -7
  193. package/coverage/lcov-report/src/icon/material.ts.html +1 -1
  194. package/coverage/lcov-report/src/icon/materialConfig.ts.html +1 -1
  195. package/coverage/lcov-report/src/icon/styles.ts.html +38 -38
  196. package/coverage/lcov-report/src/index.html +354 -9
  197. package/coverage/lcov-report/src/interaction/Ripple.tsx.html +1 -1
  198. package/coverage/lcov-report/src/interaction/RippleContainer.tsx.html +1 -1
  199. package/coverage/lcov-report/src/interaction/UserInteractionModeProvider.tsx.html +87 -87
  200. package/coverage/lcov-report/src/interaction/config.ts.html +7 -7
  201. package/coverage/lcov-report/src/interaction/index.html +1 -1
  202. package/coverage/lcov-report/src/interaction/useElementInteraction.tsx.html +123 -123
  203. package/coverage/lcov-report/src/interaction/useHigherContrastChildren.tsx.html +17 -17
  204. package/coverage/lcov-report/src/interaction/utils.ts.html +1 -1
  205. package/coverage/lcov-report/src/layout/LayoutAppBar.tsx.html +1 -1
  206. package/coverage/lcov-report/src/layout/LayoutNav.tsx.html +60 -60
  207. package/coverage/lcov-report/src/layout/LayoutWindowSplitter.tsx.html +1 -1
  208. package/coverage/lcov-report/src/layout/Main.tsx.html +1 -1
  209. package/coverage/lcov-report/src/layout/index.html +15 -15
  210. package/coverage/lcov-report/src/layout/layoutNavStyles.ts.html +5 -5
  211. package/coverage/lcov-report/src/layout/layoutWindowSplitterStyles.ts.html +1 -1
  212. package/coverage/lcov-report/src/layout/mainStyles.ts.html +1 -1
  213. package/coverage/lcov-report/src/layout/useExpandableLayout.ts.html +1 -1
  214. package/coverage/lcov-report/src/layout/useHorizontalLayoutTransition.ts.html +1 -1
  215. package/coverage/lcov-report/src/layout/useLayoutAppBarHeight.ts.html +20 -32
  216. package/coverage/lcov-report/src/layout/useLayoutTree.ts.html +1 -1
  217. package/coverage/lcov-report/src/layout/useLayoutWindowSplitter.ts.html +1 -1
  218. package/coverage/lcov-report/src/layout/useMainTabIndex.ts.html +1 -1
  219. package/coverage/lcov-report/src/layout/useResizableLayout.ts.html +1 -1
  220. package/coverage/lcov-report/src/layout/useTemporaryLayout.ts.html +1 -1
  221. package/coverage/lcov-report/src/link/Link.tsx.html +1 -1
  222. package/coverage/lcov-report/src/link/SkipToMainContent.tsx.html +1 -1
  223. package/coverage/lcov-report/src/link/index.html +1 -1
  224. package/coverage/lcov-report/src/link/styles.ts.html +1 -1
  225. package/coverage/lcov-report/src/list/List.tsx.html +30 -30
  226. package/coverage/lcov-report/src/list/ListItem.tsx.html +37 -16
  227. package/coverage/lcov-report/src/list/ListItemAddon.tsx.html +13 -7
  228. package/coverage/lcov-report/src/list/ListItemChildren.tsx.html +12 -6
  229. package/coverage/lcov-report/src/list/ListItemLink.tsx.html +4 -4
  230. package/coverage/lcov-report/src/list/ListItemText.tsx.html +1 -1
  231. package/coverage/lcov-report/src/list/ListSubheader.tsx.html +1 -1
  232. package/coverage/lcov-report/src/list/getListItemHeight.ts.html +1 -1
  233. package/coverage/lcov-report/src/list/index.html +11 -11
  234. package/coverage/lcov-report/src/list/listItemStyles.ts.html +39 -9
  235. package/coverage/lcov-report/src/media-queries/AppSizeProvider.tsx.html +54 -54
  236. package/coverage/lcov-report/src/media-queries/appSize.ts.html +1 -1
  237. package/coverage/lcov-report/src/media-queries/index.html +1 -1
  238. package/coverage/lcov-report/src/media-queries/useMediaQuery.ts.html +25 -25
  239. package/coverage/lcov-report/src/menu/DropdownMenu.tsx.html +1 -1
  240. package/coverage/lcov-report/src/menu/Menu.tsx.html +2 -2
  241. package/coverage/lcov-report/src/menu/MenuBar.tsx.html +1 -1
  242. package/coverage/lcov-report/src/menu/MenuButton.tsx.html +1 -1
  243. package/coverage/lcov-report/src/menu/MenuConfigurationProvider.tsx.html +1 -1
  244. package/coverage/lcov-report/src/menu/MenuItem.tsx.html +1 -1
  245. package/coverage/lcov-report/src/menu/MenuItemButton.tsx.html +1 -1
  246. package/coverage/lcov-report/src/menu/MenuItemGroup.tsx.html +1 -1
  247. package/coverage/lcov-report/src/menu/MenuItemSeparator.tsx.html +1 -1
  248. package/coverage/lcov-report/src/menu/MenuSheet.tsx.html +1 -1
  249. package/coverage/lcov-report/src/menu/MenuVisibilityProvider.tsx.html +1 -1
  250. package/coverage/lcov-report/src/menu/MenuWidget.tsx.html +1 -1
  251. package/coverage/lcov-report/src/menu/MenuWidgetKeyboardProvider.tsx.html +1 -1
  252. package/coverage/lcov-report/src/menu/index.html +1 -1
  253. package/coverage/lcov-report/src/menu/useContextMenu.ts.html +1 -1
  254. package/coverage/lcov-report/src/menu/useMenuBarProvider.ts.html +1 -1
  255. package/coverage/lcov-report/src/menu/utils.ts.html +1 -1
  256. package/coverage/lcov-report/src/movement/constants.ts.html +1 -1
  257. package/coverage/lcov-report/src/movement/findMatchIndex.ts.html +1 -1
  258. package/coverage/lcov-report/src/movement/index.html +1 -1
  259. package/coverage/lcov-report/src/movement/useKeyboardMovementProvider.ts.html +3 -3
  260. package/coverage/lcov-report/src/movement/utils.ts.html +1 -1
  261. package/coverage/lcov-report/src/overlay/Overlay.tsx.html +1 -1
  262. package/coverage/lcov-report/src/overlay/index.html +1 -1
  263. package/coverage/lcov-report/src/overlay/overlayStyles.ts.html +1 -1
  264. package/coverage/lcov-report/src/portal/Portal.tsx.html +7 -7
  265. package/coverage/lcov-report/src/portal/PortalContainerProvider.tsx.html +59 -35
  266. package/coverage/lcov-report/src/portal/index.html +7 -7
  267. package/coverage/lcov-report/src/positioning/constants.ts.html +1 -1
  268. package/coverage/lcov-report/src/positioning/createHorizontalPosition.ts.html +47 -47
  269. package/coverage/lcov-report/src/positioning/createVerticalPosition.ts.html +55 -55
  270. package/coverage/lcov-report/src/positioning/getFixedPosition.ts.html +89 -89
  271. package/coverage/lcov-report/src/positioning/index.html +1 -1
  272. package/coverage/lcov-report/src/positioning/useFixedPositioning.ts.html +193 -193
  273. package/coverage/lcov-report/src/positioning/utils.ts.html +59 -59
  274. package/coverage/lcov-report/src/progress/CircularProgress.tsx.html +3 -3
  275. package/coverage/lcov-report/src/progress/LinearProgress.tsx.html +3 -3
  276. package/coverage/lcov-report/src/progress/getProgressA11y.ts.html +1 -1
  277. package/coverage/lcov-report/src/progress/index.html +20 -5
  278. package/coverage/lcov-report/src/responsive-item/ResponsiveItemContainer.tsx.html +1 -1
  279. package/coverage/lcov-report/src/responsive-item/ResponsiveItemOverlay.tsx.html +1 -1
  280. package/coverage/lcov-report/src/responsive-item/index.html +1 -1
  281. package/coverage/lcov-report/src/responsive-item/styles.ts.html +1 -1
  282. package/coverage/lcov-report/src/scroll/ScrollLock.tsx.html +1 -1
  283. package/coverage/lcov-report/src/scroll/getScrollbarWidth.ts.html +1 -1
  284. package/coverage/lcov-report/src/scroll/index.html +1 -1
  285. package/coverage/lcov-report/src/scroll/useScrollLock.ts.html +1 -1
  286. package/coverage/lcov-report/src/segmented-button/SegmentedButton.tsx.html +1 -1
  287. package/coverage/lcov-report/src/segmented-button/SegmentedButtonContainer.tsx.html +1 -1
  288. package/coverage/lcov-report/src/segmented-button/index.html +1 -1
  289. package/coverage/lcov-report/src/segmented-button/segmentedButtonContainerStyles.ts.html +1 -1
  290. package/coverage/lcov-report/src/segmented-button/segmentedButtonStyles.ts.html +1 -1
  291. package/coverage/lcov-report/src/sheet/Sheet.tsx.html +1 -1
  292. package/coverage/lcov-report/src/sheet/index.html +5 -5
  293. package/coverage/lcov-report/src/sheet/styles.ts.html +45 -48
  294. package/coverage/lcov-report/src/snackbar/DefaultToastRenderer.tsx.html +80 -80
  295. package/coverage/lcov-report/src/snackbar/Snackbar.tsx.html +21 -45
  296. package/coverage/lcov-report/src/snackbar/Toast.tsx.html +108 -93
  297. package/coverage/lcov-report/src/snackbar/ToastActionButton.tsx.html +1 -1
  298. package/coverage/lcov-report/src/snackbar/ToastCloseButton.tsx.html +1 -1
  299. package/coverage/lcov-report/src/snackbar/ToastContent.tsx.html +48 -48
  300. package/coverage/lcov-report/src/snackbar/ToastManager.tsx.html +278 -275
  301. package/coverage/lcov-report/src/snackbar/ToastManagerProvider.tsx.html +6 -6
  302. package/coverage/lcov-report/src/snackbar/index.html +19 -19
  303. package/coverage/lcov-report/src/snackbar/snackbarStyles.ts.html +15 -15
  304. package/coverage/lcov-report/src/snackbar/toastContentStyles.ts.html +14 -14
  305. package/coverage/lcov-report/src/snackbar/toastStyles.ts.html +27 -27
  306. package/coverage/lcov-report/src/snackbar/useCurrentToastActions.ts.html +1 -1
  307. package/coverage/lcov-report/src/suspense/CircularProgressSuspense.tsx.html +1 -1
  308. package/coverage/lcov-report/src/suspense/NullSuspense.tsx.html +1 -1
  309. package/coverage/lcov-report/src/suspense/index.html +20 -5
  310. package/coverage/lcov-report/src/table/Table.tsx.html +45 -114
  311. package/coverage/lcov-report/src/table/TableBody.tsx.html +43 -43
  312. package/coverage/lcov-report/src/table/TableCell.tsx.html +109 -298
  313. package/coverage/lcov-report/src/table/TableCellContent.tsx.html +81 -27
  314. package/coverage/lcov-report/src/table/TableCheckbox.tsx.html +16 -10
  315. package/coverage/lcov-report/src/table/TableConfigurationProvider.tsx.html +20 -20
  316. package/coverage/lcov-report/src/table/TableContainer.tsx.html +7 -28
  317. package/coverage/lcov-report/src/table/TableContainerProvider.tsx.html +1 -1
  318. package/coverage/lcov-report/src/table/TableFooter.tsx.html +64 -43
  319. package/coverage/lcov-report/src/table/TableHeader.tsx.html +41 -92
  320. package/coverage/lcov-report/src/table/TableRadio.tsx.html +676 -0
  321. package/coverage/lcov-report/src/table/TableRow.tsx.html +38 -119
  322. package/coverage/lcov-report/src/table/index.html +151 -46
  323. package/coverage/lcov-report/src/table/tableCellStyles.ts.html +334 -0
  324. package/coverage/lcov-report/src/table/tableContainerStyles.ts.html +142 -0
  325. package/coverage/lcov-report/src/table/tableFooterStyles.ts.html +166 -0
  326. package/coverage/lcov-report/src/table/tableHeaderStyles.ts.html +172 -0
  327. package/coverage/lcov-report/src/table/tableRowStyles.ts.html +169 -0
  328. package/coverage/lcov-report/src/table/tableStyles.ts.html +157 -0
  329. package/coverage/lcov-report/src/tabs/Tab.tsx.html +263 -143
  330. package/coverage/lcov-report/src/tabs/TabList.tsx.html +1 -1
  331. package/coverage/lcov-report/src/tabs/TabListScrollButton.tsx.html +1 -1
  332. package/coverage/lcov-report/src/tabs/index.html +25 -25
  333. package/coverage/lcov-report/src/tabs/tabIndicatorStyles.ts.html +37 -7
  334. package/coverage/lcov-report/src/tabs/tabListScrollButtonStyles.ts.html +1 -1
  335. package/coverage/lcov-report/src/tabs/tabListStyles.ts.html +2 -2
  336. package/coverage/lcov-report/src/tabs/tabStyles.ts.html +64 -28
  337. package/coverage/lcov-report/src/tabs/useTabList.ts.html +44 -38
  338. package/coverage/lcov-report/src/tabs/useTabs.ts.html +1 -1
  339. package/coverage/lcov-report/src/tabs/utils.ts.html +3 -3
  340. package/coverage/lcov-report/src/test-utils/IntersectionObserver.ts.html +1 -1
  341. package/coverage/lcov-report/src/test-utils/ResizeObserver.ts.html +205 -205
  342. package/coverage/lcov-report/src/test-utils/data-testid.ts.html +1 -1
  343. package/coverage/lcov-report/src/test-utils/drag.ts.html +1 -1
  344. package/coverage/lcov-report/src/test-utils/index.html +4 -4
  345. package/coverage/lcov-report/src/test-utils/jest-setup.ts.html +9 -9
  346. package/coverage/lcov-report/src/test-utils/matchMedia.ts.html +4 -4
  347. package/coverage/lcov-report/src/test-utils/polyfills/IntersectionObserver.ts.html +4 -4
  348. package/coverage/lcov-report/src/test-utils/polyfills/ResizeObserver.ts.html +3 -3
  349. package/coverage/lcov-report/src/test-utils/polyfills/index.html +1 -1
  350. package/coverage/lcov-report/src/test-utils/polyfills/matchMedia.ts.html +6 -6
  351. package/coverage/lcov-report/src/test-utils/polyfills/offsetParent.ts.html +14 -14
  352. package/coverage/lcov-report/src/test-utils/polyfills/scrollIntoView.ts.html +5 -5
  353. package/coverage/lcov-report/src/test-utils/render.tsx.html +21 -21
  354. package/coverage/lcov-report/src/test-utils/timers.ts.html +1 -1
  355. package/coverage/lcov-report/src/theme/LocalStorageColorSchemeProvider.tsx.html +1 -1
  356. package/coverage/lcov-report/src/theme/ThemeProvider.tsx.html +1 -1
  357. package/coverage/lcov-report/src/theme/colors.ts.html +1 -1
  358. package/coverage/lcov-report/src/theme/cssVars.ts.html +1 -1
  359. package/coverage/lcov-report/src/theme/index.html +1 -1
  360. package/coverage/lcov-report/src/theme/useCSSVariables.ts.html +25 -25
  361. package/coverage/lcov-report/src/theme/useColorScheme.ts.html +1 -1
  362. package/coverage/lcov-report/src/theme/useColorSchemeMetaTag.ts.html +1 -1
  363. package/coverage/lcov-report/src/theme/useColorSchemeProvider.ts.html +1 -1
  364. package/coverage/lcov-report/src/theme/usePrefersColorScheme.ts.html +1 -1
  365. package/coverage/lcov-report/src/theme/utils.ts.html +1 -1
  366. package/coverage/lcov-report/src/tooltip/Tooltip.tsx.html +62 -62
  367. package/coverage/lcov-report/src/tooltip/TooltipHoverModeProvider.tsx.html +3 -3
  368. package/coverage/lcov-report/src/tooltip/constants.ts.html +1 -1
  369. package/coverage/lcov-report/src/tooltip/index.html +9 -9
  370. package/coverage/lcov-report/src/tooltip/tooltipStyles.ts.html +12 -12
  371. package/coverage/lcov-report/src/tooltip/useTooltip.ts.html +243 -222
  372. package/coverage/lcov-report/src/tooltip/useTooltipPosition.ts.html +27 -27
  373. package/coverage/lcov-report/src/tooltip/utils.ts.html +22 -22
  374. package/coverage/lcov-report/src/transition/CSSTransition.tsx.html +1 -1
  375. package/coverage/lcov-report/src/transition/Collapse.tsx.html +1 -1
  376. package/coverage/lcov-report/src/transition/CrossFade.tsx.html +1 -1
  377. package/coverage/lcov-report/src/transition/ScaleTransition.tsx.html +1 -1
  378. package/coverage/lcov-report/src/transition/SkeletonPlaceholder.tsx.html +374 -338
  379. package/coverage/lcov-report/src/transition/Slide.tsx.html +1 -1
  380. package/coverage/lcov-report/src/transition/SlideContainer.tsx.html +1 -1
  381. package/coverage/lcov-report/src/transition/collapseStyles.ts.html +13 -13
  382. package/coverage/lcov-report/src/transition/config.ts.html +5 -5
  383. package/coverage/lcov-report/src/transition/index.html +47 -32
  384. package/coverage/lcov-report/src/transition/maxWidthTransition.ts.html +1 -1
  385. package/coverage/lcov-report/src/transition/skeletonPlaceholderUtils.ts.html +400 -0
  386. package/coverage/lcov-report/src/transition/useCSSTransition.ts.html +68 -68
  387. package/coverage/lcov-report/src/transition/useCarousel.ts.html +1 -1
  388. package/coverage/lcov-report/src/transition/useCollapseTransition.ts.html +87 -87
  389. package/coverage/lcov-report/src/transition/useCrossFadeTransition.ts.html +1 -1
  390. package/coverage/lcov-report/src/transition/useMaxWidthTransition.ts.html +1 -1
  391. package/coverage/lcov-report/src/transition/useScaleTransition.ts.html +18 -18
  392. package/coverage/lcov-report/src/transition/useSkeletonPlaceholder.ts.html +607 -562
  393. package/coverage/lcov-report/src/transition/useSlideTransition.ts.html +1 -1
  394. package/coverage/lcov-report/src/transition/useTransition.ts.html +237 -237
  395. package/coverage/lcov-report/src/transition/utils.ts.html +43 -43
  396. package/coverage/lcov-report/src/tree/DefaultTreeItemRenderer.tsx.html +18 -6
  397. package/coverage/lcov-report/src/tree/Tree.tsx.html +20 -8
  398. package/coverage/lcov-report/src/tree/TreeGroup.tsx.html +45 -45
  399. package/coverage/lcov-report/src/tree/TreeItem.tsx.html +7 -10
  400. package/coverage/lcov-report/src/tree/TreeItemExpander.tsx.html +1 -1
  401. package/coverage/lcov-report/src/tree/TreeProvider.tsx.html +8 -8
  402. package/coverage/lcov-report/src/tree/index.html +11 -11
  403. package/coverage/lcov-report/src/tree/styles.ts.html +8 -35
  404. package/coverage/lcov-report/src/tree/useTree.ts.html +1 -1
  405. package/coverage/lcov-report/src/tree/useTreeExpansion.ts.html +1 -1
  406. package/coverage/lcov-report/src/tree/useTreeItems.ts.html +1 -1
  407. package/coverage/lcov-report/src/tree/useTreeMovement.ts.html +1 -1
  408. package/coverage/lcov-report/src/tree/useTreeSelection.ts.html +1 -1
  409. package/coverage/lcov-report/src/tree/utils.ts.html +1 -1
  410. package/coverage/lcov-report/src/typography/SrOnly.tsx.html +1 -1
  411. package/coverage/lcov-report/src/typography/TextContainer.tsx.html +1 -1
  412. package/coverage/lcov-report/src/typography/Typography.tsx.html +1 -1
  413. package/coverage/lcov-report/src/typography/WritingDirectionProvider.tsx.html +1 -1
  414. package/coverage/lcov-report/src/typography/index.html +1 -1
  415. package/coverage/lcov-report/src/useAsyncAction.ts.html +1 -1
  416. package/coverage/lcov-report/src/useDebouncedFunction.ts.html +1 -1
  417. package/coverage/lcov-report/src/useDropzone.ts.html +1 -1
  418. package/coverage/lcov-report/src/useElementSize.ts.html +334 -0
  419. package/coverage/lcov-report/src/useEnsuredId.ts.html +8 -8
  420. package/coverage/lcov-report/src/useEnsuredRef.ts.html +14 -14
  421. package/coverage/lcov-report/src/useEnsuredState.ts.html +1 -1
  422. package/coverage/lcov-report/src/useHtmlClassName.ts.html +1 -1
  423. package/coverage/lcov-report/src/useIntersectionObserver.ts.html +1 -1
  424. package/coverage/lcov-report/src/useIsomorphicLayoutEffect.ts.html +1 -1
  425. package/coverage/lcov-report/src/useLocalStorage.ts.html +1 -1
  426. package/coverage/lcov-report/src/useOrientation.ts.html +32 -32
  427. package/coverage/lcov-report/src/usePageInactive.ts.html +30 -30
  428. package/coverage/lcov-report/src/useResizeListener.ts.html +38 -32
  429. package/coverage/lcov-report/src/useResizeObserver.ts.html +68 -179
  430. package/coverage/lcov-report/src/useThrottledFunction.ts.html +1 -1
  431. package/coverage/lcov-report/src/useToggle.ts.html +1 -1
  432. package/coverage/lcov-report/src/useUnmounted.ts.html +1 -1
  433. package/coverage/lcov-report/src/useWindowSize.ts.html +124 -94
  434. package/coverage/lcov-report/src/utils/RenderRecursively.tsx.html +1 -1
  435. package/coverage/lcov-report/src/utils/alphaNumericSort.ts.html +1 -1
  436. package/coverage/lcov-report/src/utils/applyRef.ts.html +11 -11
  437. package/coverage/lcov-report/src/utils/bem.ts.html +45 -45
  438. package/coverage/lcov-report/src/utils/filters.ts.html +1 -1
  439. package/coverage/lcov-report/src/utils/getClientPosition.ts.html +1 -1
  440. package/coverage/lcov-report/src/utils/getMiddleOfRange.ts.html +163 -0
  441. package/coverage/lcov-report/src/utils/getPercentage.ts.html +9 -9
  442. package/coverage/lcov-report/src/utils/getRangeDefaultValue.ts.html +66 -87
  443. package/coverage/lcov-report/src/utils/getRangeSteps.ts.html +7 -7
  444. package/coverage/lcov-report/src/utils/identity.ts.html +1 -1
  445. package/coverage/lcov-report/src/utils/index.html +46 -31
  446. package/coverage/lcov-report/src/utils/isElementVisible.ts.html +1 -1
  447. package/coverage/lcov-report/src/utils/isValidNumber.ts.html +118 -0
  448. package/coverage/lcov-report/src/utils/loop.ts.html +1 -1
  449. package/coverage/lcov-report/src/utils/nearest.ts.html +21 -21
  450. package/coverage/lcov-report/src/utils/parseCssLengthUnit.ts.html +18 -18
  451. package/coverage/lcov-report/src/utils/randomInt.ts.html +52 -52
  452. package/coverage/lcov-report/src/utils/wait.ts.html +1 -1
  453. package/coverage/lcov-report/src/utils/withinRange.ts.html +1 -1
  454. package/coverage/lcov-report/src/window-splitter/WindowSplitter.tsx.html +1 -1
  455. package/coverage/lcov-report/src/window-splitter/index.html +14 -14
  456. package/coverage/lcov-report/src/window-splitter/useWindowSplitter.ts.html +19 -67
  457. package/coverage/lcov-report/src/window-splitter/useWindowSplitterMaxValue.ts.html +256 -0
  458. package/coverage/lcov-report/suspense/CircularProgressSuspense.tsx.html +283 -0
  459. package/coverage/lcov-report/suspense/NullSuspense.tsx.html +202 -0
  460. package/coverage/lcov-report/suspense/index.html +131 -0
  461. package/coverage/lcov-report/tabIndicatorStyles.ts.html +43 -13
  462. package/coverage/lcov-report/tabListStyles.ts.html +35 -26
  463. package/coverage/lcov-report/tabStyles.ts.html +68 -26
  464. package/coverage/lcov-report/tabs/Tab.tsx.html +233 -143
  465. package/coverage/lcov-report/tabs/TabList.tsx.html +85 -85
  466. package/coverage/lcov-report/tabs/index.html +56 -11
  467. package/coverage/lcov-report/tabs/tabIndicatorStyles.ts.html +187 -0
  468. package/coverage/lcov-report/tabs/tabListStyles.ts.html +241 -0
  469. package/coverage/lcov-report/tabs/tabStyles.ts.html +253 -0
  470. package/coverage/lcov-report/tabs/useTabList.ts.html +736 -0
  471. package/coverage/lcov-report/tabs/useTabs.ts.html +1 -1
  472. package/coverage/lcov-report/tabs/utils.ts.html +1 -1
  473. package/coverage/lcov-report/test-utils/index.html +21 -21
  474. package/coverage/lcov-report/test-utils/use.ts.html +187 -0
  475. package/coverage/lcov-report/tooltip/Tooltip.tsx.html +62 -62
  476. package/coverage/lcov-report/tooltip/index.html +10 -70
  477. package/coverage/lcov-report/tooltip/useTooltip.ts.html +243 -222
  478. package/coverage/lcov-report/transition/SkeletonPlaceholder.tsx.html +595 -0
  479. package/coverage/lcov-report/transition/config.ts.html +5 -5
  480. package/coverage/lcov-report/transition/index.html +1 -1
  481. package/coverage/lcov-report/transition/skeletonPlaceholderUtils.ts.html +400 -0
  482. package/coverage/lcov-report/transition/useSkeletonPlaceholder.ts.html +952 -0
  483. package/coverage/lcov-report/tree/TreeItem.tsx.html +7 -10
  484. package/coverage/lcov-report/tree/index.html +12 -27
  485. package/coverage/lcov-report/tree/styles.ts.html +538 -0
  486. package/coverage/lcov-report/typography/Typography.tsx.html +110 -110
  487. package/coverage/lcov-report/typography/WritingDirectionProvider.tsx.html +75 -75
  488. package/coverage/lcov-report/typography/index.html +15 -15
  489. package/coverage/lcov-report/useSkeletonPlaceholder.ts.html +952 -0
  490. package/coverage/lcov-report/useTabList.ts.html +142 -136
  491. package/coverage/lcov-report/useWindowSplitter.ts.html +640 -0
  492. package/coverage/lcov-report/useWindowSplitterMaxValue.ts.html +256 -0
  493. package/coverage/lcov-report/utils/index.html +16 -31
  494. package/coverage/lcov-report/utils/isElementVisible.ts.html +14 -14
  495. package/coverage/lcov-report/utils/randomInt.ts.html +148 -0
  496. package/coverage/lcov-report/utils/wait.ts.html +1 -1
  497. package/coverage/lcov-report/window-splitter/index.html +21 -36
  498. package/coverage/lcov-report/window-splitter/useWindowSplitter.ts.html +406 -328
  499. package/coverage/lcov.info +474 -0
  500. package/dist/_box-shadows.scss +12 -2
  501. package/dist/_core.scss +0 -2
  502. package/dist/_utils.scss +22 -0
  503. package/dist/app-bar/AppBar.d.ts +4 -9
  504. package/dist/app-bar/AppBar.js +29 -7
  505. package/dist/app-bar/AppBar.js.map +1 -1
  506. package/dist/app-bar/_app-bar.scss +7 -9
  507. package/dist/avatar/Avatar.d.ts +1 -1
  508. package/dist/avatar/Avatar.js.map +1 -1
  509. package/dist/badge/_badge.scss +12 -7
  510. package/dist/button/TooltippedButton.d.ts +62 -0
  511. package/dist/button/TooltippedButton.js +62 -0
  512. package/dist/button/TooltippedButton.js.map +1 -0
  513. package/dist/card/Card.js +3 -2
  514. package/dist/card/Card.js.map +1 -1
  515. package/dist/card/CardContent.js +1 -1
  516. package/dist/card/CardContent.js.map +1 -1
  517. package/dist/card/ClickableCard.d.ts +42 -0
  518. package/dist/card/ClickableCard.js +73 -0
  519. package/dist/card/ClickableCard.js.map +1 -0
  520. package/dist/card/_card.scss +15 -9
  521. package/dist/card/styles.d.ts +8 -0
  522. package/dist/card/styles.js +6 -3
  523. package/dist/card/styles.js.map +1 -1
  524. package/dist/dialog/_dialog.scss +28 -15
  525. package/dist/divider/_divider.scss +9 -10
  526. package/dist/draggable/useDraggable.d.ts +12 -23
  527. package/dist/draggable/useDraggable.js +15 -6
  528. package/dist/draggable/useDraggable.js.map +1 -1
  529. package/dist/draggable/utils.d.ts +4 -17
  530. package/dist/draggable/utils.js +9 -25
  531. package/dist/draggable/utils.js.map +1 -1
  532. package/dist/expansion-panel/_expansion-panel.scss +25 -16
  533. package/dist/expansion-panel/useExpansionPanels.d.ts +5 -3
  534. package/dist/expansion-panel/useExpansionPanels.js +16 -9
  535. package/dist/expansion-panel/useExpansionPanels.js.map +1 -1
  536. package/dist/form/MenuItemInputToggle.d.ts +1 -1
  537. package/dist/form/MenuItemInputToggle.js.map +1 -1
  538. package/dist/form/Select.js +6 -1
  539. package/dist/form/Select.js.map +1 -1
  540. package/dist/form/_form.scss +40 -22
  541. package/dist/icon/IconRotator.js +2 -3
  542. package/dist/icon/IconRotator.js.map +1 -1
  543. package/dist/icon/_icon.scss +7 -2
  544. package/dist/index.d.ts +5 -0
  545. package/dist/index.js +5 -0
  546. package/dist/index.js.map +1 -1
  547. package/dist/interaction/_interaction.scss +12 -9
  548. package/dist/layout/useLayoutAppBarHeight.js +5 -9
  549. package/dist/layout/useLayoutAppBarHeight.js.map +1 -1
  550. package/dist/link/_link.scss +26 -12
  551. package/dist/list/ListItem.d.ts +8 -3
  552. package/dist/list/ListItem.js +4 -3
  553. package/dist/list/ListItem.js.map +1 -1
  554. package/dist/list/ListItemAddon.js +2 -1
  555. package/dist/list/ListItemAddon.js.map +1 -1
  556. package/dist/list/ListItemChildren.js +3 -2
  557. package/dist/list/ListItemChildren.js.map +1 -1
  558. package/dist/list/ListItemLink.js +3 -3
  559. package/dist/list/ListItemLink.js.map +1 -1
  560. package/dist/list/_list.scss +29 -18
  561. package/dist/list/listItemStyles.d.ts +9 -1
  562. package/dist/list/listItemStyles.js +5 -5
  563. package/dist/list/listItemStyles.js.map +1 -1
  564. package/dist/list/types.d.ts +14 -4
  565. package/dist/list/types.js.map +1 -1
  566. package/dist/menu/Menu.d.ts +1 -1
  567. package/dist/menu/Menu.js.map +1 -1
  568. package/dist/menu/_menu.scss +3 -14
  569. package/dist/portal/PortalContainerProvider.d.ts +2 -2
  570. package/dist/portal/PortalContainerProvider.js +6 -1
  571. package/dist/portal/PortalContainerProvider.js.map +1 -1
  572. package/dist/sheet/styles.d.ts +14 -15
  573. package/dist/sheet/styles.js.map +1 -1
  574. package/dist/table/TableCheckbox.d.ts +3 -2
  575. package/dist/table/TableCheckbox.js +4 -2
  576. package/dist/table/TableCheckbox.js.map +1 -1
  577. package/dist/table/TableRadio.d.ts +3 -2
  578. package/dist/table/TableRadio.js +4 -2
  579. package/dist/table/TableRadio.js.map +1 -1
  580. package/dist/table/tableCellStyles.d.ts +1 -1
  581. package/dist/table/tableCellStyles.js.map +1 -1
  582. package/dist/tabs/Tab.d.ts +24 -3
  583. package/dist/tabs/Tab.js +15 -8
  584. package/dist/tabs/Tab.js.map +1 -1
  585. package/dist/tabs/_tabs.scss +28 -16
  586. package/dist/tabs/tabIndicatorStyles.d.ts +2 -1
  587. package/dist/tabs/tabIndicatorStyles.js +6 -3
  588. package/dist/tabs/tabIndicatorStyles.js.map +1 -1
  589. package/dist/tabs/tabListStyles.js +2 -1
  590. package/dist/tabs/tabListStyles.js.map +1 -1
  591. package/dist/tabs/tabStyles.d.ts +2 -0
  592. package/dist/tabs/tabStyles.js +6 -3
  593. package/dist/tabs/tabStyles.js.map +1 -1
  594. package/dist/tabs/useTabList.d.ts +3 -3
  595. package/dist/tabs/useTabList.js +9 -6
  596. package/dist/tabs/useTabList.js.map +1 -1
  597. package/dist/tooltip/useTooltip.d.ts +14 -14
  598. package/dist/tooltip/useTooltip.js.map +1 -1
  599. package/dist/transition/SkeletonPlaceholder.d.ts +2 -2
  600. package/dist/transition/SkeletonPlaceholder.js +8 -3
  601. package/dist/transition/SkeletonPlaceholder.js.map +1 -1
  602. package/dist/transition/_transition.scss +12 -7
  603. package/dist/transition/skeletonPlaceholderUtils.d.ts +77 -0
  604. package/dist/transition/skeletonPlaceholderUtils.js +38 -0
  605. package/dist/transition/skeletonPlaceholderUtils.js.map +1 -0
  606. package/dist/transition/useSkeletonPlaceholder.d.ts +12 -7
  607. package/dist/transition/useSkeletonPlaceholder.js +38 -37
  608. package/dist/transition/useSkeletonPlaceholder.js.map +1 -1
  609. package/dist/tree/DefaultTreeItemRenderer.d.ts +2 -2
  610. package/dist/tree/DefaultTreeItemRenderer.js.map +1 -1
  611. package/dist/tree/Tree.d.ts +8 -4
  612. package/dist/tree/Tree.js.map +1 -1
  613. package/dist/tree/TreeItem.js +3 -4
  614. package/dist/tree/TreeItem.js.map +1 -1
  615. package/dist/tree/_tree.scss +29 -22
  616. package/dist/tree/styles.d.ts +0 -6
  617. package/dist/tree/styles.js +1 -2
  618. package/dist/tree/styles.js.map +1 -1
  619. package/dist/types.d.ts +7 -0
  620. package/dist/types.js +1 -2
  621. package/dist/types.js.map +1 -1
  622. package/dist/typography/_typography.scss +12 -2
  623. package/dist/useElementSize.d.ts +40 -0
  624. package/dist/useElementSize.js +53 -0
  625. package/dist/useElementSize.js.map +1 -0
  626. package/dist/useResizeListener.d.ts +1 -1
  627. package/dist/useResizeListener.js +1 -0
  628. package/dist/useResizeListener.js.map +1 -1
  629. package/dist/useResizeObserver.d.ts +4 -43
  630. package/dist/useResizeObserver.js +3 -42
  631. package/dist/useResizeObserver.js.map +1 -1
  632. package/dist/useWindowSize.d.ts +14 -11
  633. package/dist/useWindowSize.js +12 -7
  634. package/dist/useWindowSize.js.map +1 -1
  635. package/dist/utils/getMiddleOfRange.d.ts +13 -0
  636. package/dist/utils/getMiddleOfRange.js +20 -0
  637. package/dist/utils/getMiddleOfRange.js.map +1 -0
  638. package/dist/utils/getRangeDefaultValue.d.ts +3 -5
  639. package/dist/utils/getRangeDefaultValue.js +3 -13
  640. package/dist/utils/getRangeDefaultValue.js.map +1 -1
  641. package/dist/utils/getRangeSteps.d.ts +1 -1
  642. package/dist/utils/getRangeSteps.js +2 -2
  643. package/dist/utils/getRangeSteps.js.map +1 -1
  644. package/dist/utils/nearest.js +1 -1
  645. package/dist/utils/nearest.js.map +1 -1
  646. package/dist/window-splitter/_window-splitter.scss +11 -16
  647. package/dist/window-splitter/useWindowSplitter.d.ts +3 -5
  648. package/dist/window-splitter/useWindowSplitter.js +3 -11
  649. package/dist/window-splitter/useWindowSplitter.js.map +1 -1
  650. package/package.json +18 -18
  651. package/src/__tests__/useElementSize.tsx +181 -0
  652. package/src/__tests__/useWindowSize.node.tsx +56 -0
  653. package/src/__tests__/useWindowSize.tsx +156 -0
  654. package/src/_box-shadows.scss +12 -2
  655. package/src/_core.scss +0 -2
  656. package/src/_utils.scss +22 -0
  657. package/src/app-bar/AppBar.tsx +59 -19
  658. package/src/app-bar/__tests__/__snapshots__/AppBar.tsx.snap +21 -21
  659. package/src/app-bar/_app-bar.scss +7 -9
  660. package/src/avatar/Avatar.tsx +1 -1
  661. package/src/badge/_badge.scss +12 -7
  662. package/src/button/TooltippedButton.tsx +120 -0
  663. package/src/button/__tests__/TooltippedButton.tsx +60 -0
  664. package/src/button/__tests__/__snapshots__/TooltippedButton.tsx.snap +26 -0
  665. package/src/card/Card.tsx +5 -3
  666. package/src/card/CardContent.tsx +3 -3
  667. package/src/card/ClickableCard.tsx +105 -0
  668. package/src/card/__tests__/ClickableCard.tsx +66 -0
  669. package/src/card/__tests__/__snapshots__/CardHeader.tsx.snap +1 -1
  670. package/src/card/__tests__/__snapshots__/CardSubtitle.tsx.snap +2 -2
  671. package/src/card/__tests__/__snapshots__/ClickableCard.tsx.snap +20 -0
  672. package/src/card/__tests__/__snapshots__/styles.ts.snap +1 -1
  673. package/src/card/_card.scss +15 -9
  674. package/src/card/styles.ts +19 -10
  675. package/src/dialog/_dialog.scss +28 -15
  676. package/src/divider/_divider.scss +9 -10
  677. package/src/draggable/useDraggable.ts +26 -25
  678. package/src/draggable/utils.ts +16 -50
  679. package/src/expansion-panel/__tests__/ExpansionPanel.tsx +2 -2
  680. package/src/expansion-panel/_expansion-panel.scss +25 -16
  681. package/src/expansion-panel/useExpansionPanels.ts +20 -16
  682. package/src/form/MenuItemInputToggle.tsx +1 -1
  683. package/src/form/Select.tsx +9 -1
  684. package/src/form/_form.scss +40 -22
  685. package/src/icon/IconRotator.tsx +1 -2
  686. package/src/icon/_icon.scss +7 -2
  687. package/src/index.ts +5 -0
  688. package/src/interaction/_interaction.scss +12 -9
  689. package/src/layout/__tests__/__snapshots__/LayoutAppBar.tsx.snap +4 -4
  690. package/src/layout/__tests__/__snapshots__/useExpandableLayout.tsx.snap +1 -1
  691. package/src/layout/__tests__/__snapshots__/useLayoutTree.tsx.snap +18 -18
  692. package/src/layout/__tests__/__snapshots__/useResizableLayout.tsx.snap +1 -1
  693. package/src/layout/__tests__/__snapshots__/useTemporaryLayout.tsx.snap +1 -1
  694. package/src/layout/useLayoutAppBarHeight.ts +5 -9
  695. package/src/link/_link.scss +26 -12
  696. package/src/list/ListItem.tsx +19 -12
  697. package/src/list/ListItemAddon.tsx +5 -3
  698. package/src/list/ListItemChildren.tsx +4 -2
  699. package/src/list/ListItemLink.tsx +3 -3
  700. package/src/list/__tests__/ListItem.tsx +1 -1
  701. package/src/list/__tests__/__snapshots__/ListItem.tsx.snap +1 -1
  702. package/src/list/_list.scss +29 -18
  703. package/src/list/listItemStyles.ts +15 -5
  704. package/src/list/types.ts +15 -4
  705. package/src/menu/Menu.tsx +1 -1
  706. package/src/menu/_menu.scss +3 -14
  707. package/src/portal/PortalContainerProvider.tsx +10 -2
  708. package/src/portal/__tests__/PortalContainerProvider.tsx +23 -0
  709. package/src/sheet/styles.ts +14 -15
  710. package/src/suspense/__tests__/CircularProgressSuspense.tsx +90 -0
  711. package/src/suspense/__tests__/NullSuspense.tsx +46 -0
  712. package/src/suspense/__tests__/__snapshots__/CircularProgressSuspense.tsx.snap +24 -0
  713. package/src/table/TableCheckbox.tsx +4 -2
  714. package/src/table/TableRadio.tsx +4 -2
  715. package/src/table/tableCellStyles.ts +1 -1
  716. package/src/tabs/Tab.tsx +110 -70
  717. package/src/tabs/__tests__/Tab.tsx +25 -2
  718. package/src/tabs/__tests__/TabList.tsx +4 -4
  719. package/src/tabs/__tests__/__snapshots__/TabList.tsx.snap +2 -2
  720. package/src/tabs/_tabs.scss +28 -16
  721. package/src/tabs/tabIndicatorStyles.ts +13 -3
  722. package/src/tabs/tabListStyles.ts +1 -1
  723. package/src/tabs/tabStyles.ts +16 -4
  724. package/src/tabs/useTabList.ts +10 -8
  725. package/src/tooltip/useTooltip.ts +23 -16
  726. package/src/transition/SkeletonPlaceholder.tsx +18 -6
  727. package/src/transition/__tests__/SkeletonPlaceholder.tsx +72 -0
  728. package/src/transition/__tests__/__snapshots__/SkeletonPlaceholder.tsx.snap +24 -0
  729. package/src/transition/_transition.scss +12 -7
  730. package/src/transition/skeletonPlaceholderUtils.ts +105 -0
  731. package/src/transition/useSkeletonPlaceholder.ts +62 -47
  732. package/src/tree/DefaultTreeItemRenderer.tsx +6 -2
  733. package/src/tree/Tree.tsx +8 -4
  734. package/src/tree/TreeItem.tsx +3 -4
  735. package/src/tree/__tests__/Tree.tsx +1 -1
  736. package/src/tree/__tests__/__snapshots__/Tree.tsx.snap +124 -124
  737. package/src/tree/_tree.scss +29 -22
  738. package/src/tree/styles.ts +0 -9
  739. package/src/types.ts +8 -0
  740. package/src/typography/_typography.scss +12 -2
  741. package/src/useElementSize.ts +83 -0
  742. package/src/useResizeListener.ts +3 -1
  743. package/src/useResizeObserver.ts +7 -44
  744. package/src/useWindowSize.ts +29 -19
  745. package/src/utils/__tests__/getMiddleOfRange.ts +12 -0
  746. package/src/utils/__tests__/getRangeDefaultValue.ts +47 -0
  747. package/src/utils/getMiddleOfRange.ts +26 -0
  748. package/src/utils/getRangeDefaultValue.ts +8 -15
  749. package/src/utils/getRangeSteps.ts +2 -2
  750. package/src/utils/nearest.ts +1 -1
  751. package/src/window-splitter/_window-splitter.scss +11 -16
  752. package/src/window-splitter/useWindowSplitter.ts +12 -28
@@ -17,14 +17,15 @@ $disable-item-media-large: false !default;
17
17
  $disable-medium-height: false !default;
18
18
  $disable-large-height: false !default;
19
19
  $disable-extra-large-height: false !default;
20
- $disable-three-line-height: false !default;
20
+ $disable-multiline-clamp: false !default;
21
+ $disable-multiline-height: true !default;
21
22
  $disable-item-link-styles: false !default;
22
23
 
23
24
  $disable-subheader: false !default;
24
25
  $disable-subheader-inset: false !default;
25
26
 
26
27
  $item-secondary-text-line-height: 1.42857 !default;
27
- $item-secondary-text-three-line-max-height: 3rem !default;
28
+ $item-secondary-text-multiline-max-height: 3rem !default;
28
29
 
29
30
  $vertical-padding: 0.5rem !default;
30
31
  $dense-vertical-padding: 0.25rem !default;
@@ -51,8 +52,9 @@ $item-large-height: 4rem !default;
51
52
  $item-dense-large-height: 3.5rem !default;
52
53
  $item-extra-large-height: 4.5rem !default;
53
54
  $item-dense-extra-large-height: 4rem !default;
54
- $item-three-line-height: 5.5rem !default;
55
- $item-dense-three-line-height: 5rem !default;
55
+ $item-multiline-clamp: 2 !default;
56
+ $item-multiline-height: 5.5rem !default;
57
+ $item-dense-multiline-height: 5rem !default;
56
58
 
57
59
  $item-media-spacing: 1rem !default;
58
60
  $item-media-size: 3.5rem !default;
@@ -70,10 +72,11 @@ $variables: (
70
72
  item-medium-height,
71
73
  item-large-height,
72
74
  item-extra-large-height,
73
- item-three-line-height,
75
+ item-multiline-height,
74
76
  item-media-size,
75
77
  item-media-spacing,
76
- item-text-three-line-height
78
+ item-text-multiline-height,
79
+ item-multiline-clamp
77
80
  );
78
81
 
79
82
  @function get-var($name, $fallback: null) {
@@ -111,6 +114,7 @@ $variables: (
111
114
  @include set-var(vertical-padding, $vertical-padding);
112
115
  @include set-var(item-horizontal-padding, $item-horizontal-padding);
113
116
  @include set-var(item-vertical-padding, $item-vertical-padding);
117
+ @include set-var(item-keyline, $item-keyline);
114
118
 
115
119
  @include set-var(item-height, $item-height);
116
120
  @if not $disable-medium-height {
@@ -122,11 +126,14 @@ $variables: (
122
126
  @if not $disable-extra-large-height {
123
127
  @include set-var(item-extra-large-height, $item-extra-large-height);
124
128
  }
125
- @if not $disable-three-line-height {
126
- @include set-var(item-three-line-height, $item-three-line-height);
129
+ @if not $disable-multiline-clamp {
130
+ @include set-var(item-multiline-clamp, $item-multiline-clamp);
131
+ }
132
+ @if not $disable-multiline-height {
133
+ @include set-var(item-multiline-height, $item-multiline-height);
127
134
  @include set-var(
128
- item-text-three-line-height,
129
- $item-secondary-text-three-line-max-height
135
+ item-text-multiline-height,
136
+ $item-secondary-text-multiline-max-height
130
137
  );
131
138
  }
132
139
 
@@ -212,9 +219,9 @@ $variables: (
212
219
  }
213
220
  }
214
221
 
215
- @if not $disable-three-line-height {
216
- &--three-lines {
217
- @include set-var(item-height, get-var(item-three-line-height));
222
+ @if not $disable-multiline-height {
223
+ &--multiline {
224
+ @include set-var(item-height, get-var(item-multiline-height));
218
225
  }
219
226
  }
220
227
 
@@ -231,12 +238,16 @@ $variables: (
231
238
  @include theme.theme-use-var(color, text-secondary-color);
232
239
  }
233
240
 
234
- &--clamped {
235
- @include typography.line-clamp;
236
- @include use-var(max-height, item-text-three-line-height);
241
+ @if not $disable-multiline-clamp {
242
+ &--clamped {
243
+ @include typography.line-clamp(get-var(item-multiline-clamp));
244
+ @if not $disable-multiline-height {
245
+ @include use-var(max-height, item-text-multiline-height);
246
+ }
237
247
 
238
- line-height: $item-secondary-text-line-height;
239
- white-space: normal;
248
+ line-height: $item-secondary-text-line-height;
249
+ white-space: normal;
250
+ }
240
251
  }
241
252
  }
242
253
 
@@ -10,7 +10,7 @@ export interface ListItemClassNameOptions {
10
10
  /**
11
11
  * @defaultValue `false`
12
12
  */
13
- threeLines?: boolean;
13
+ multiline?: boolean;
14
14
  /**
15
15
  * @defaultValue `false`
16
16
  */
@@ -98,6 +98,14 @@ export interface ListItemAddonClassNameOptions {
98
98
  * @remarks \@since 6.0.0
99
99
  */
100
100
  disableCenteredMedia?: boolean;
101
+ /**
102
+ * Set this to `true` to disable the additional spacing applied to the addons
103
+ * that appear before the `children` and the normal `--rmd-text-icon-spacing`
104
+ * value is used instead.
105
+ *
106
+ * @defaultValue `false`
107
+ */
108
+ disableBeforeSpacing?: boolean;
101
109
  }
102
110
  /**
103
111
  *
@@ -5,11 +5,11 @@ const styles = bem("rmd-list-item");
5
5
  /**
6
6
  * @remarks \@since 6.0.0
7
7
  */ export function listItem(options = {}) {
8
- const { className, link = false, height = "auto", clickable = true, threeLines = false, disabled = false, disabledOpacity = false, pressedClassName } = options;
8
+ const { className, link = false, height = "auto", clickable = true, multiline = false, disabled = false, disabledOpacity = false, pressedClassName } = options;
9
9
  return cnb(styles({
10
10
  link,
11
11
  [height]: height !== "auto",
12
- "three-lines": threeLines,
12
+ multiline,
13
13
  "disabled-color": disabled && !disabledOpacity,
14
14
  "disabled-opacity": disabled && disabledOpacity
15
15
  }), cssUtils({
@@ -29,13 +29,13 @@ const styles = bem("rmd-list-item");
29
29
  *
30
30
  * @remarks \@since 6.0.0
31
31
  */ export function listItemAddon(options = {}) {
32
- const { type = "icon", position = "middle", className, addonAfter = false, disableCenteredMedia = false } = options;
32
+ const { type = "icon", position = "middle", className, addonAfter = false, disableCenteredMedia = false, disableBeforeSpacing = false } = options;
33
33
  const isMedia = type === "media" || type === "large-media";
34
34
  const isAvatar = type === "avatar";
35
35
  return cnb(styles("addon", {
36
36
  [position]: position !== "middle",
37
- before: !addonAfter,
38
- "avatar-before": !addonAfter && isAvatar,
37
+ before: !disableBeforeSpacing && !addonAfter,
38
+ "avatar-before": !disableBeforeSpacing && !addonAfter && isAvatar,
39
39
  media: isMedia,
40
40
  "media-large": type === "large-media",
41
41
  "media-centered": isMedia && !disableCenteredMedia
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/list/listItemStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport type {\n ListItemAddonPosition,\n ListItemAddonType,\n ListItemHeight,\n} from \"./types.js\";\n\nconst styles = bem(\"rmd-list-item\");\n\n/** @remarks \\@since 6.0.0 */\nexport interface ListItemClassNameOptions {\n className?: string;\n /**\n * @see {@link ListItemHeight}\n * @defaultValue `\"auto\"`\n */\n height?: ListItemHeight;\n\n /**\n * @defaultValue `false`\n */\n threeLines?: boolean;\n\n /**\n * @defaultValue `false`\n */\n disabled?: boolean;\n\n /**\n * Note: This does nothing if the `disabled` prop is not enabled.\n *\n * @defaultValue `false`\n * @remarks \\@since 2.4.3\n */\n disabledOpacity?: boolean;\n\n /**\n * Set this to `false` if the list item should not gain the interaction\n * states: hover, focus, press, etc. This is kind of like being disabled\n * without the disabled styles being applied.\n *\n * @defaultValue `true`\n */\n clickable?: boolean;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface InternalListItemClassNameOptions\n extends ListItemClassNameOptions {\n /**\n * @defaultValue `false`\n */\n link?: boolean;\n\n /**\n * This is prop is used internally when integrating with the\n * {@link useElementInteraction} hook.\n */\n pressedClassName?: string;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function listItem(\n options: InternalListItemClassNameOptions = {}\n): string {\n const {\n className,\n link = false,\n height = \"auto\",\n clickable = true,\n threeLines = false,\n disabled = false,\n disabledOpacity = false,\n pressedClassName,\n } = options;\n\n return cnb(\n styles({\n link,\n [height]: height !== \"auto\",\n \"three-lines\": threeLines,\n \"disabled-color\": disabled && !disabledOpacity,\n \"disabled-opacity\": disabled && disabledOpacity,\n }),\n cssUtils({ surface: clickable }),\n pressedClassName,\n className\n );\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface ListItemTextClassNameOptions {\n className?: string;\n /**\n * @defaultValue `false`\n */\n clamped?: boolean;\n\n /**\n * @defaultValue `false`\n */\n secondary?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function listItemText(\n options: ListItemTextClassNameOptions = {}\n): string {\n const { className, secondary = false, clamped = false } = options;\n\n return cnb(\n styles(\"text\", {\n clamped: secondary && clamped,\n secondary,\n }),\n className\n );\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface ListItemAddonClassNameOptions {\n className?: string;\n\n /**\n * The addon type that is used to adjust the spacing styles.\n *\n * @defaultValue `\"icon\"`\n */\n type?: ListItemAddonType;\n\n /**\n * The vertical position to use for the addon.\n *\n * @defaultValue `\"middle\"`\n */\n position?: ListItemAddonPosition;\n\n /**\n * Boolean if the addon should appear after the `children`.\n *\n * @defaultValue `false`\n */\n addonAfter?: boolean;\n\n /**\n * The media items are centered by default using:\n * ```scss\n * align-items: center;\n * display: flex;\n * justify-content: center;\n * ```\n *\n * When this is set to `true`, the flex styles will not be applied.\n *\n * @defaultValue `false`\n * @remarks \\@since 6.0.0\n */\n disableCenteredMedia?: boolean;\n}\n\n/**\n *\n * @remarks \\@since 6.0.0\n */\nexport function listItemAddon(\n options: ListItemAddonClassNameOptions = {}\n): string {\n const {\n type = \"icon\",\n position = \"middle\",\n className,\n addonAfter = false,\n disableCenteredMedia = false,\n } = options;\n\n const isMedia = type === \"media\" || type === \"large-media\";\n const isAvatar = type === \"avatar\";\n\n return cnb(\n styles(\"addon\", {\n [position]: position !== \"middle\",\n before: !addonAfter,\n \"avatar-before\": !addonAfter && isAvatar,\n media: isMedia,\n \"media-large\": type === \"large-media\",\n \"media-centered\": isMedia && !disableCenteredMedia,\n }),\n className\n );\n}\n"],"names":["cnb","cssUtils","bem","styles","listItem","options","className","link","height","clickable","threeLines","disabled","disabledOpacity","pressedClassName","surface","listItemText","secondary","clamped","listItemAddon","type","position","addonAfter","disableCenteredMedia","isMedia","isAvatar","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../src/list/listItemStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport type {\n ListItemAddonPosition,\n ListItemAddonType,\n ListItemHeight,\n} from \"./types.js\";\n\nconst styles = bem(\"rmd-list-item\");\n\n/** @remarks \\@since 6.0.0 */\nexport interface ListItemClassNameOptions {\n className?: string;\n /**\n * @see {@link ListItemHeight}\n * @defaultValue `\"auto\"`\n */\n height?: ListItemHeight;\n\n /**\n * @defaultValue `false`\n */\n multiline?: boolean;\n\n /**\n * @defaultValue `false`\n */\n disabled?: boolean;\n\n /**\n * Note: This does nothing if the `disabled` prop is not enabled.\n *\n * @defaultValue `false`\n * @remarks \\@since 2.4.3\n */\n disabledOpacity?: boolean;\n\n /**\n * Set this to `false` if the list item should not gain the interaction\n * states: hover, focus, press, etc. This is kind of like being disabled\n * without the disabled styles being applied.\n *\n * @defaultValue `true`\n */\n clickable?: boolean;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface InternalListItemClassNameOptions\n extends ListItemClassNameOptions {\n /**\n * @defaultValue `false`\n */\n link?: boolean;\n\n /**\n * This is prop is used internally when integrating with the\n * {@link useElementInteraction} hook.\n */\n pressedClassName?: string;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function listItem(\n options: InternalListItemClassNameOptions = {}\n): string {\n const {\n className,\n link = false,\n height = \"auto\",\n clickable = true,\n multiline = false,\n disabled = false,\n disabledOpacity = false,\n pressedClassName,\n } = options;\n\n return cnb(\n styles({\n link,\n [height]: height !== \"auto\",\n multiline,\n \"disabled-color\": disabled && !disabledOpacity,\n \"disabled-opacity\": disabled && disabledOpacity,\n }),\n cssUtils({ surface: clickable }),\n pressedClassName,\n className\n );\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface ListItemTextClassNameOptions {\n className?: string;\n /**\n * @defaultValue `false`\n */\n clamped?: boolean;\n\n /**\n * @defaultValue `false`\n */\n secondary?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function listItemText(\n options: ListItemTextClassNameOptions = {}\n): string {\n const { className, secondary = false, clamped = false } = options;\n\n return cnb(\n styles(\"text\", {\n clamped: secondary && clamped,\n secondary,\n }),\n className\n );\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface ListItemAddonClassNameOptions {\n className?: string;\n\n /**\n * The addon type that is used to adjust the spacing styles.\n *\n * @defaultValue `\"icon\"`\n */\n type?: ListItemAddonType;\n\n /**\n * The vertical position to use for the addon.\n *\n * @defaultValue `\"middle\"`\n */\n position?: ListItemAddonPosition;\n\n /**\n * Boolean if the addon should appear after the `children`.\n *\n * @defaultValue `false`\n */\n addonAfter?: boolean;\n\n /**\n * The media items are centered by default using:\n * ```scss\n * align-items: center;\n * display: flex;\n * justify-content: center;\n * ```\n *\n * When this is set to `true`, the flex styles will not be applied.\n *\n * @defaultValue `false`\n * @remarks \\@since 6.0.0\n */\n disableCenteredMedia?: boolean;\n\n /**\n * Set this to `true` to disable the additional spacing applied to the addons\n * that appear before the `children` and the normal `--rmd-text-icon-spacing`\n * value is used instead.\n *\n * @defaultValue `false`\n */\n disableBeforeSpacing?: boolean;\n}\n\n/**\n *\n * @remarks \\@since 6.0.0\n */\nexport function listItemAddon(\n options: ListItemAddonClassNameOptions = {}\n): string {\n const {\n type = \"icon\",\n position = \"middle\",\n className,\n addonAfter = false,\n disableCenteredMedia = false,\n disableBeforeSpacing = false,\n } = options;\n\n const isMedia = type === \"media\" || type === \"large-media\";\n const isAvatar = type === \"avatar\";\n\n return cnb(\n styles(\"addon\", {\n [position]: position !== \"middle\",\n before: !disableBeforeSpacing && !addonAfter,\n \"avatar-before\": !disableBeforeSpacing && !addonAfter && isAvatar,\n media: isMedia,\n \"media-large\": type === \"large-media\",\n \"media-centered\": isMedia && !disableCenteredMedia,\n }),\n className\n );\n}\n"],"names":["cnb","cssUtils","bem","styles","listItem","options","className","link","height","clickable","multiline","disabled","disabledOpacity","pressedClassName","surface","listItemText","secondary","clamped","listItemAddon","type","position","addonAfter","disableCenteredMedia","disableBeforeSpacing","isMedia","isAvatar","before","media"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,GAAG,QAAQ,kBAAkB;AAOtC,MAAMC,SAASD,IAAI;AAsDnB;;CAEC,GACD,OAAO,SAASE,SACdC,UAA4C,CAAC,CAAC;IAE9C,MAAM,EACJC,SAAS,EACTC,OAAO,KAAK,EACZC,SAAS,MAAM,EACfC,YAAY,IAAI,EAChBC,YAAY,KAAK,EACjBC,WAAW,KAAK,EAChBC,kBAAkB,KAAK,EACvBC,gBAAgB,EACjB,GAAGR;IAEJ,OAAOL,IACLG,OAAO;QACLI;QACA,CAACC,OAAO,EAAEA,WAAW;QACrBE;QACA,kBAAkBC,YAAY,CAACC;QAC/B,oBAAoBD,YAAYC;IAClC,IACAX,SAAS;QAAEa,SAASL;IAAU,IAC9BI,kBACAP;AAEJ;AAgBA;;CAEC,GACD,OAAO,SAASS,aACdV,UAAwC,CAAC,CAAC;IAE1C,MAAM,EAAEC,SAAS,EAAEU,YAAY,KAAK,EAAEC,UAAU,KAAK,EAAE,GAAGZ;IAE1D,OAAOL,IACLG,OAAO,QAAQ;QACbc,SAASD,aAAaC;QACtBD;IACF,IACAV;AAEJ;AAoDA;;;CAGC,GACD,OAAO,SAASY,cACdb,UAAyC,CAAC,CAAC;IAE3C,MAAM,EACJc,OAAO,MAAM,EACbC,WAAW,QAAQ,EACnBd,SAAS,EACTe,aAAa,KAAK,EAClBC,uBAAuB,KAAK,EAC5BC,uBAAuB,KAAK,EAC7B,GAAGlB;IAEJ,MAAMmB,UAAUL,SAAS,WAAWA,SAAS;IAC7C,MAAMM,WAAWN,SAAS;IAE1B,OAAOnB,IACLG,OAAO,SAAS;QACd,CAACiB,SAAS,EAAEA,aAAa;QACzBM,QAAQ,CAACH,wBAAwB,CAACF;QAClC,iBAAiB,CAACE,wBAAwB,CAACF,cAAcI;QACzDE,OAAOH;QACP,eAAeL,SAAS;QACxB,kBAAkBK,WAAW,CAACF;IAChC,IACAhB;AAEJ"}
@@ -1,5 +1,5 @@
1
- import type { HTMLAttributes, ReactNode } from "react";
2
- import type { PropsWithRef } from "../types.js";
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+ import { type PropsWithRef } from "../types.js";
3
3
  /**
4
4
  * The height to apply to the list item.
5
5
  *
@@ -48,6 +48,14 @@ export interface ListItemChildrenAddonProps {
48
48
  * @remarks \@since 6.0.0
49
49
  */
50
50
  leftAddonForceWrap?: boolean;
51
+ /**
52
+ * Set this to `true` to disable the additional spacing applied to the addons
53
+ * that appear before the `children` and the normal `--rmd-text-icon-spacing`
54
+ * value is used instead.
55
+ *
56
+ * @defaultValue `false`
57
+ */
58
+ disableLeftAddonSpacing?: boolean;
51
59
  /**
52
60
  * An optional addon to display to the right of the `primaryText` or
53
61
  * `children` and should be used with the `rightAddonType` prop to adjust
@@ -165,10 +173,12 @@ export interface ListItemChildrenProps extends ListItemChildrenAddonProps {
165
173
  secondaryTextProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
166
174
  /**
167
175
  * Set this to `true` to allow the {@link secondaryText} to span multiple
168
- * lines and use the CSS clamp after two lines of text are visible.
176
+ * lines and use the CSS clamp after two lines of text are visible. The number
177
+ * of lines can be configured by `core.$list-item-multiline-clamp` or
178
+ * `@include core.list-set-var(item-multiline-clamp, $new-value)`.
169
179
  *
170
180
  * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-line-clamp}
171
181
  * @defaultValue `false`
172
182
  */
173
- threeLines?: boolean;
183
+ multiline?: boolean;
174
184
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/list/types.ts"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from \"react\";\nimport type { PropsWithRef } from \"../types.js\";\n\n/**\n * The height to apply to the list item.\n *\n * Conversions:\n *\n * - height !== \"auto\" -&gt; height\n * - secondaryText or left/right addon is media/media-large -&gt; \"extra-large\"\n * - left/right addon is avatar -&gt; \"large\"\n * - left/right addon is icon -&gt; \"medium\"\n * - no addons and no secondary text -&gt; \"normal\"\n */\nexport type ListItemHeight =\n | \"auto\"\n | \"normal\"\n | \"medium\"\n | \"large\"\n | \"extra-large\";\n\nexport type ListItemAddonPosition = \"top\" | \"middle\" | \"bottom\";\nexport type ListItemAddonType = \"icon\" | \"avatar\" | \"media\" | \"large-media\";\n\n/** @remarks \\@since 6.0.0 */\nexport interface ListItemChildrenAddonProps {\n /**\n * An optional addon to display to the left of the `primaryText` or\n * `children` and should be used with the `leftAddonType` prop to adjust\n * spacing.\n */\n leftAddon?: ReactNode;\n\n /**\n * The type of the addon that appears to the left of the `primaryText` or\n * `children`.\n *\n * @defaultValue `\"icon\"`\n */\n leftAddonType?: ListItemAddonType;\n\n /**\n * The vertical position the left icon, avatar, media, or large media\n * should be placed.\n *\n * @defaultValue `\"middle\"`\n */\n leftAddonPosition?: ListItemAddonPosition;\n\n /**\n * @remarks \\@since 6.0.0\n */\n leftAddonClassName?: string;\n\n /**\n * Set this to `true` if your addon does not accept a `className` prop to\n * apply the correct styling.\n *\n * @defaultValue `leftAddonType === \"media\" || leftAddonType === \"large-media\"`\n * @remarks \\@since 6.0.0\n */\n leftAddonForceWrap?: boolean;\n\n /**\n * An optional addon to display to the right of the `primaryText` or\n * `children` and should be used with the `rightAddonType` prop to adjust\n * spacing.\n */\n rightAddon?: ReactNode;\n\n /**\n * The type of the addon that appears to the right of the `primaryText` or\n * `children`.\n *\n * @defaultValue `\"icon\"`\n */\n rightAddonType?: ListItemAddonType;\n\n /**\n * The vertical position the right icon, avatar, media, or large media\n * should be placed.\n *\n * @defaultValue `\"middle\"`\n */\n rightAddonPosition?: ListItemAddonPosition;\n\n /**\n * @remarks \\@since 6.0.0\n */\n rightAddonClassName?: string;\n\n /**\n * Set this to `true` if your addon does not accept a `className` prop to\n * apply the correct styling.\n *\n * @defaultValue `rightAddonType === \"media\" || rightAddonType === \"large-media\"`\n * @remarks \\@since 6.0.0\n */\n rightAddonForceWrap?: boolean;\n\n /**\n * The media items are centered by default using:\n * ```scss\n * align-items: center;\n * display: flex;\n * justify-content: center;\n * ```\n *\n * When this is set to `true`, the flex styles will not be applied.\n *\n * @defaultValue `false`\n * @remarks \\@since 6.0.0\n */\n disableLeftAddonCenteredMedia?: boolean;\n\n /**\n * The media items are centered by default using:\n * ```scss\n * align-items: center;\n * display: flex;\n * justify-content: center;\n * ```\n *\n * When this is set to `true`, the flex styles will not be applied.\n *\n * @defaultValue `false`\n * @remarks \\@since 6.0.0\n */\n disableRightAddonCenteredMedia?: boolean;\n}\n\nexport interface ListItemChildrenProps extends ListItemChildrenAddonProps {\n /**\n * The main content to display. When the `textChildren` prop is enabled and\n * there is child content, it will be treated as primary text and update the\n * styles automatically.\n */\n children?: ReactNode;\n\n /**\n * Any additional props that should be passed to the `<span>` surrounding\n * the {@link children}, {@link primaryText}, and {@link secondaryText}.\n *\n * @remarks \\@since 6.0.0\n */\n textProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n\n /**\n * An optional className to apply to the `<span>` that surrounds the\n * `primaryText` and optionally `secondaryText` within the list item.\n */\n textClassName?: string;\n\n /**\n * An optional className to apply to the `<span>` that surrounds the\n * `secondaryText` within the list item.\n */\n secondaryTextClassName?: string;\n\n /**\n * Set this to `true` if the {@link children} should not automatically be\n * wrapped in the `ListItemText` component.\n *\n * @remarks \\@since 6.0.0 Renamed from `textChildren` since it was defaulted on.\n * @defaultValue `false`\n */\n disableTextChildren?: boolean;\n\n /**\n * An optional element that should be rendered as the `primaryText` within the\n * list item. It is most likely easier to use the `children` prop instead, but\n * this allows you to create more complex components with the `ListItem` since\n * you can provided `children` and have the styles for the `primaryText` still\n * applied. By default, this will only allow one line of text and add ellipsis\n * for any text overflow.\n */\n primaryText?: ReactNode;\n\n /**\n * An optional element that should be rendered as the `secondaryText` within\n * the list item. By default, this will only span one line and add ellipsis\n * for overflow.\n */\n secondaryText?: ReactNode;\n\n /**\n * Any additional props that should be passed to the `<span>` surrounding\n * the {@link secondaryText}.\n *\n * @remarks \\@since 6.0.0\n */\n secondaryTextProps?: PropsWithRef<\n HTMLAttributes<HTMLSpanElement>,\n HTMLSpanElement\n >;\n\n /**\n * Set this to `true` to allow the {@link secondaryText} to span multiple\n * lines and use the CSS clamp after two lines of text are visible.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-line-clamp}\n * @defaultValue `false`\n */\n threeLines?: boolean;\n}\n"],"names":[],"mappings":"AAmIA,WAyEC"}
1
+ {"version":3,"sources":["../../src/list/types.ts"],"sourcesContent":["import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\n\n/**\n * The height to apply to the list item.\n *\n * Conversions:\n *\n * - height !== \"auto\" -&gt; height\n * - secondaryText or left/right addon is media/media-large -&gt; \"extra-large\"\n * - left/right addon is avatar -&gt; \"large\"\n * - left/right addon is icon -&gt; \"medium\"\n * - no addons and no secondary text -&gt; \"normal\"\n */\nexport type ListItemHeight =\n | \"auto\"\n | \"normal\"\n | \"medium\"\n | \"large\"\n | \"extra-large\";\n\nexport type ListItemAddonPosition = \"top\" | \"middle\" | \"bottom\";\nexport type ListItemAddonType = \"icon\" | \"avatar\" | \"media\" | \"large-media\";\n\n/** @remarks \\@since 6.0.0 */\nexport interface ListItemChildrenAddonProps {\n /**\n * An optional addon to display to the left of the `primaryText` or\n * `children` and should be used with the `leftAddonType` prop to adjust\n * spacing.\n */\n leftAddon?: ReactNode;\n\n /**\n * The type of the addon that appears to the left of the `primaryText` or\n * `children`.\n *\n * @defaultValue `\"icon\"`\n */\n leftAddonType?: ListItemAddonType;\n\n /**\n * The vertical position the left icon, avatar, media, or large media\n * should be placed.\n *\n * @defaultValue `\"middle\"`\n */\n leftAddonPosition?: ListItemAddonPosition;\n\n /**\n * @remarks \\@since 6.0.0\n */\n leftAddonClassName?: string;\n\n /**\n * Set this to `true` if your addon does not accept a `className` prop to\n * apply the correct styling.\n *\n * @defaultValue `leftAddonType === \"media\" || leftAddonType === \"large-media\"`\n * @remarks \\@since 6.0.0\n */\n leftAddonForceWrap?: boolean;\n\n /**\n * Set this to `true` to disable the additional spacing applied to the addons\n * that appear before the `children` and the normal `--rmd-text-icon-spacing`\n * value is used instead.\n *\n * @defaultValue `false`\n */\n disableLeftAddonSpacing?: boolean;\n\n /**\n * An optional addon to display to the right of the `primaryText` or\n * `children` and should be used with the `rightAddonType` prop to adjust\n * spacing.\n */\n rightAddon?: ReactNode;\n\n /**\n * The type of the addon that appears to the right of the `primaryText` or\n * `children`.\n *\n * @defaultValue `\"icon\"`\n */\n rightAddonType?: ListItemAddonType;\n\n /**\n * The vertical position the right icon, avatar, media, or large media\n * should be placed.\n *\n * @defaultValue `\"middle\"`\n */\n rightAddonPosition?: ListItemAddonPosition;\n\n /**\n * @remarks \\@since 6.0.0\n */\n rightAddonClassName?: string;\n\n /**\n * Set this to `true` if your addon does not accept a `className` prop to\n * apply the correct styling.\n *\n * @defaultValue `rightAddonType === \"media\" || rightAddonType === \"large-media\"`\n * @remarks \\@since 6.0.0\n */\n rightAddonForceWrap?: boolean;\n\n /**\n * The media items are centered by default using:\n * ```scss\n * align-items: center;\n * display: flex;\n * justify-content: center;\n * ```\n *\n * When this is set to `true`, the flex styles will not be applied.\n *\n * @defaultValue `false`\n * @remarks \\@since 6.0.0\n */\n disableLeftAddonCenteredMedia?: boolean;\n\n /**\n * The media items are centered by default using:\n * ```scss\n * align-items: center;\n * display: flex;\n * justify-content: center;\n * ```\n *\n * When this is set to `true`, the flex styles will not be applied.\n *\n * @defaultValue `false`\n * @remarks \\@since 6.0.0\n */\n disableRightAddonCenteredMedia?: boolean;\n}\n\nexport interface ListItemChildrenProps extends ListItemChildrenAddonProps {\n /**\n * The main content to display. When the `textChildren` prop is enabled and\n * there is child content, it will be treated as primary text and update the\n * styles automatically.\n */\n children?: ReactNode;\n\n /**\n * Any additional props that should be passed to the `<span>` surrounding\n * the {@link children}, {@link primaryText}, and {@link secondaryText}.\n *\n * @remarks \\@since 6.0.0\n */\n textProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n\n /**\n * An optional className to apply to the `<span>` that surrounds the\n * `primaryText` and optionally `secondaryText` within the list item.\n */\n textClassName?: string;\n\n /**\n * An optional className to apply to the `<span>` that surrounds the\n * `secondaryText` within the list item.\n */\n secondaryTextClassName?: string;\n\n /**\n * Set this to `true` if the {@link children} should not automatically be\n * wrapped in the `ListItemText` component.\n *\n * @remarks \\@since 6.0.0 Renamed from `textChildren` since it was defaulted on.\n * @defaultValue `false`\n */\n disableTextChildren?: boolean;\n\n /**\n * An optional element that should be rendered as the `primaryText` within the\n * list item. It is most likely easier to use the `children` prop instead, but\n * this allows you to create more complex components with the `ListItem` since\n * you can provided `children` and have the styles for the `primaryText` still\n * applied. By default, this will only allow one line of text and add ellipsis\n * for any text overflow.\n */\n primaryText?: ReactNode;\n\n /**\n * An optional element that should be rendered as the `secondaryText` within\n * the list item. By default, this will only span one line and add ellipsis\n * for overflow.\n */\n secondaryText?: ReactNode;\n\n /**\n * Any additional props that should be passed to the `<span>` surrounding\n * the {@link secondaryText}.\n *\n * @remarks \\@since 6.0.0\n */\n secondaryTextProps?: PropsWithRef<\n HTMLAttributes<HTMLSpanElement>,\n HTMLSpanElement\n >;\n\n /**\n * Set this to `true` to allow the {@link secondaryText} to span multiple\n * lines and use the CSS clamp after two lines of text are visible. The number\n * of lines can be configured by `core.$list-item-multiline-clamp` or\n * `@include core.list-set-var(item-multiline-clamp, $new-value)`.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-line-clamp}\n * @defaultValue `false`\n */\n multiline?: boolean;\n}\n"],"names":[],"mappings":"AA4IA,WA2EC"}
@@ -1,5 +1,5 @@
1
1
  import { type CSSProperties, type HTMLAttributes } from "react";
2
- import { type FloatingActionButtonPosition } from "../button/FloatingActionButton.jsx";
2
+ import { type FloatingActionButtonPosition } from "../button/FloatingActionButton.js";
3
3
  import { type ListElement, type ListProps } from "../list/List.js";
4
4
  import { type GetDefaultFocusedIndex } from "../movement/types.js";
5
5
  import { type CalculateFixedPositionOptions } from "../positioning/types.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/menu/Menu.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n useEffect,\n useRef,\n type CSSProperties,\n type HTMLAttributes,\n} from \"react\";\nimport { type FloatingActionButtonPosition } from \"../button/FloatingActionButton.jsx\";\nimport { useFocusContainer } from \"../focus/useFocusContainer.js\";\nimport { useUserInteractionMode } from \"../interaction/UserInteractionModeProvider.js\";\nimport { type ListElement, type ListProps } from \"../list/List.js\";\nimport { useAppSize } from \"../media-queries/AppSizeProvider.js\";\nimport { type GetDefaultFocusedIndex } from \"../movement/types.js\";\nimport { Portal } from \"../portal/Portal.js\";\nimport { type CalculateFixedPositionOptions } from \"../positioning/types.js\";\nimport {\n useFixedPositioning,\n type FixedPositioningOptions,\n} from \"../positioning/useFixedPositioning.js\";\nimport { useScrollLock } from \"../scroll/useScrollLock.js\";\nimport {\n useScaleTransition,\n type ScaleTransitionHookOptions,\n} from \"../transition/useScaleTransition.js\";\nimport { type LabelRequiredForA11y, type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport {\n MenuConfigurationProvider,\n useMenuConfiguration,\n type MenuConfiguration,\n type MenuOrientationProps,\n} from \"./MenuConfigurationProvider.js\";\nimport { MenuSheet, type MenuSheetConvenienceProps } from \"./MenuSheet.js\";\nimport { MenuWidget } from \"./MenuWidget.js\";\nimport { useMenuBarContext } from \"./useMenuBarProvider.js\";\nimport { getDefaultAnchor } from \"./utils.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-menu-background-color\"?: string;\n \"--rmd-menu-color\"?: string;\n \"--rmd-menu-min-width\"?: string | number;\n \"--rmd-menu-spacing\"?: string | number;\n }\n}\n\nconst noop = (): void => {\n // do nothing\n};\n\n/** @remarks \\@since 5.0.0 */\nexport type MenuTransitionProps = Omit<\n ScaleTransitionHookOptions<HTMLDivElement>,\n \"transitionIn\" | \"vertical\" | \"nodeRef\"\n>;\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface MenuConfigurationProps extends CalculateFixedPositionOptions {\n /**\n * @see {@link ScaleTransitionHookOptions.temporary}\n * @defaultValue `true`\n */\n temporary?: boolean;\n\n /**\n * @defaultValue `false`\n */\n disablePortal?: boolean;\n\n /**\n * Boolean if the menu should not gain the elevation styles and should only be\n * set to `true` when rendering within a `Sheet`.\n *\n * @defaultValue `false`\n */\n disableElevation?: boolean;\n\n /**\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n\n /**\n * @see {@link FixedPositioningOptions.transformOrigin}\n * @defaultValue `true`\n */\n transformOrigin?: boolean;\n\n /**\n * Boolean if the menu should close if the page is scrolled. The default\n * behavior is to just update the position of the menu relative to the menu\n * button until it can no longer be visible within the viewport.\n *\n * @defaultValue `false`\n */\n closeOnScroll?: boolean;\n\n /**\n * Boolean if the page should no longer be scrollable while the menu is\n * visible.\n *\n * @defaultValue `false`\n */\n preventScroll?: boolean;\n\n /**\n * Boolean if the menu should close instead of repositioning itself if the\n * browser window is resized.\n *\n * @defaultValue `false`\n */\n closeOnResize?: boolean;\n\n /** @see {@link FixedPositioningOptions.getFixedPositionOptions} */\n getFixedPositionOptions?(): CalculateFixedPositionOptions;\n}\n\n/**\n * @remarks\n * \\@since 5.1.0\n * \\@since 6.0.0 Renamed from `MenuListProps` to `MenuListConvenienceProps`\n */\nexport interface MenuListConvenienceProps {\n /**\n * An optional style to provide to the `List` component that surrounds the\n * `MenuItem` within a `Menu`.\n */\n listStyle?: CSSProperties;\n\n /**\n * An optional className to provide to the `List` component that surrounds the\n * `MenuItem` within a `Menu`.\n */\n listClassName?: string;\n\n /**\n * Any additional props to pass to the `List` component that surrounds the\n * `Menu`'s `MenuItem`s.\n */\n listProps?: PropsWithRef<Omit<ListProps, \"horizontal\">, ListElement>;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface MenuConvenienceProps extends MenuConfigurationProps {\n /**\n * This can be used to apply additional props to the `Menu` component.\n *\n * Note: You can override the `style` and `className` using\n * {@link menuStyle} and {@link menuClassName} instead for convenience.\n *\n * @example\n * ```tsx\n * <DropdownMenu\n * {...props}\n * menuProps={{\n * style: {\n * // custom inline style\n * },\n * className: \"come-class-name\",\n * getFixedPositionOptions: () => ({\n * preventOverlap: true,\n * }),\n * }}\n * />\n * ```\n */\n menuProps?: PropsWithRef<\n Omit<\n MenuProps,\n | \"children\"\n | \"fixedTo\"\n | \"visible\"\n | \"onRequestClose\"\n | \"getDefaultFocusedIndex\"\n >,\n HTMLDivElement\n >;\n\n /**\n * Convenience prop to apply custom style to the `Menu` component.\n */\n menuStyle?: CSSProperties;\n\n /**\n * Convenience prop to apply custom class name to the `Menu` component.\n */\n menuClassName?: string;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type MenuFixedPositioningOptions = Omit<\n FixedPositioningOptions<HTMLElement, HTMLDivElement>,\n \"onScroll\" | \"onResize\"\n>;\n\n/**\n * @remarks\n * \\@since 5.0.0\n * \\@since 6.0.0 Updated to use the latest Menu, Transition, and Portal API.\n */\nexport interface MenuProps\n extends HTMLAttributes<HTMLDivElement>,\n MenuConfiguration,\n MenuConfigurationProps,\n MenuFixedPositioningOptions,\n MenuOrientationProps,\n MenuTransitionProps,\n MenuListConvenienceProps,\n MenuSheetConvenienceProps {\n visible: boolean;\n onRequestClose(): void;\n\n /**\n * @defaultValue `\"menu-\" + useId()`\n */\n id?: string;\n\n /**\n * This is used to set the default focus index when the menu is visible.\n *\n * @internal\n */\n getDefaultFocusedIndex?: GetDefaultFocusedIndex;\n\n /**\n * Custom style that should be applied to the menu only while not rendered\n * within a sheet since the {@link style} would be applied to both versions.\n */\n menuStyle?: CSSProperties;\n\n /**\n * Custom class name that should be applied only while not rendered within a\n * sheet.\n */\n menuClassName?: string;\n\n /**\n * @internal\n *\n * This is only used to update the default anchor when the DropdownMenu's\n * toggle is a floating action button.\n */\n floating?: FloatingActionButtonPosition;\n}\n\n/**\n * **Client Component**\n *\n * This component should generally only be used to implement context menus with\n * the `useContextMenu` hook. Otherwise, the `DropdownMenu` component should be\n * used.\n *\n * @see The `useContextMenu` hook for an example.\n *\n * @remarks\n * \\@since 5.0.0\n * \\@since 6.0.0 Updated this component to implement all the `Menu`\n * functionality instead of requiring the `useMenu` hook and `MenuWidget`\n * component. In addition, the `renderAsSheet` behavior has been moved into this\n * implementation so that the `MenuRenderer` is no longer required and context\n * menus can appear as a `Sheet`.\n */\nexport const Menu = forwardRef<HTMLDivElement, LabelRequiredForA11y<MenuProps>>(\n function Menu(props, propRef) {\n const {\n id: propId,\n style: propStyle,\n role = \"menu\",\n children,\n horizontal: _horizontal,\n sheetHeader: _sheetHeader,\n sheetFooter: _sheetFooter,\n renderAsSheet: _renderAsSheet,\n sheetPosition: _sheetPosition,\n sheetVerticalSize: _sheetVerticalSize,\n sheetProps,\n sheetStyle,\n sheetClassName,\n menuStyle,\n menuClassName,\n disableElevation = false,\n temporary = true,\n tabIndex = -1,\n fixedTo,\n className,\n classNames,\n timeout,\n appear,\n enter,\n exit,\n onEnter,\n onEntering = noop,\n onEntered = noop,\n onExit,\n onExiting,\n onExited = noop,\n onKeyDown = noop,\n listProps,\n listStyle,\n listClassName,\n visible,\n onRequestClose,\n floating,\n anchor,\n closeOnResize = false,\n closeOnScroll = false,\n preventScroll = false,\n vwMargin,\n vhMargin,\n xMargin,\n yMargin,\n width,\n transformOrigin = true,\n preventOverlap,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n getFixedPositionOptions,\n disablePortal: propDisablePortal,\n disableTransition,\n ...remaining\n } = props;\n const { \"aria-label\": ariaLabel, \"aria-labelledby\": ariaLabelledBy } =\n props;\n\n const id = useEnsuredId(propId, \"menu\");\n const {\n root,\n menubar,\n menuitem,\n activeId,\n animatedOnceRef,\n hoverTimeoutRef,\n disableHoverMode,\n } = useMenuBarContext();\n const {\n horizontal,\n sheetHeader,\n sheetFooter,\n renderAsSheet,\n sheetPosition,\n sheetVerticalSize,\n } = useMenuConfiguration(props);\n const { isPhone } = useAppSize();\n const isSheet =\n renderAsSheet === true || (renderAsSheet === \"phone\" && isPhone);\n\n const entered = useRef(false);\n const cancelUnmountFocus = useRef(false);\n const hideWithoutRefocus = (): void => {\n cancelUnmountFocus.current = true;\n onRequestClose();\n };\n const mode = useUserInteractionMode();\n const mouse = mode === \"mouse\";\n\n const { eventHandlers, transitionOptions } = useFocusContainer({\n nodeRef: propRef,\n activate: visible,\n onKeyDown(event) {\n onKeyDown(event);\n\n // when a menu is within a sheet, it should not trigger the custom\n // keyboard behavior\n if (isSheet) {\n return;\n }\n\n switch (event.key) {\n case \"Escape\":\n // prevent parent components that have an \"Escape\" keypress event\n // from being triggered as well\n event.stopPropagation();\n disableHoverMode();\n onRequestClose();\n break;\n case \"Tab\":\n // since menus are portalled, tab index is kinda broke so just close\n // the menu instead of doing default tab behavior\n event.preventDefault();\n\n if (!menuitem) {\n // pressing the tab key should still cascade close all menus\n event.stopPropagation();\n }\n disableHoverMode();\n onRequestClose();\n break;\n case \"ArrowUp\":\n if (!root && menuitem && horizontal) {\n event.stopPropagation();\n event.preventDefault();\n onRequestClose();\n }\n break;\n case \"ArrowLeft\":\n if (!root && menuitem && !horizontal) {\n event.stopPropagation();\n event.preventDefault();\n onRequestClose();\n }\n break;\n }\n },\n onEntering(appearing) {\n onEntering(appearing);\n entered.current = true;\n },\n onEntered(appearing) {\n onEntered(appearing);\n entered.current = true;\n cancelUnmountFocus.current = false;\n animatedOnceRef.current = true;\n },\n onExited() {\n onExited();\n entered.current = false;\n },\n onExiting,\n disableTransition,\n isFocusTypeDisabled(type) {\n if (role === \"listbox\") {\n return !isSheet;\n }\n\n if (type === \"keyboard\") {\n return isSheet;\n }\n\n const isHoverDisabled = mouse && hoverTimeoutRef.current === 0;\n if (type === \"mount\") {\n return isHoverDisabled;\n }\n\n return (\n isHoverDisabled ||\n cancelUnmountFocus.current ||\n (root && !!activeId && id !== activeId)\n );\n },\n });\n\n const { ref, style, callbacks } = useFixedPositioning({\n ...transitionOptions,\n onEnter,\n style: isSheet ? propStyle : menuStyle,\n fixedTo,\n anchor: getDefaultAnchor({\n anchor,\n menubar,\n floating,\n menuitem: !root && menuitem,\n horizontal,\n }),\n vwMargin,\n vhMargin,\n xMargin,\n yMargin,\n width,\n transformOrigin,\n preventOverlap,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n getFixedPositionOptions,\n onResize: closeOnResize ? hideWithoutRefocus : undefined,\n onScroll(_event, data) {\n if (!data.visible || closeOnScroll) {\n hideWithoutRefocus();\n }\n },\n });\n const { rendered, disablePortal, elementProps } = useScaleTransition({\n nodeRef: ref,\n className: cnb(!isSheet && menuClassName, className),\n transitionIn: visible,\n vertical: !horizontal,\n temporary,\n timeout: isSheet || disableTransition ? 0 : timeout,\n classNames,\n appear,\n enter,\n exit,\n onExit,\n onExiting: transitionOptions.onExiting,\n exitedHidden: true,\n ...callbacks,\n });\n useScrollLock(visible && preventScroll);\n\n // need to make sure that the useEffect does not refire for hiding on click\n // events because of the `window.requestAnimationFrame`. It'll make it so\n // that menu items that update state are unable to close when clicked\n const hide = useRef(onRequestClose);\n useEffect(() => {\n hide.current = onRequestClose;\n });\n useEffect(() => {\n if (!visible) {\n return;\n }\n\n const callback = (event: globalThis.MouseEvent): void => {\n // this is required for when the transition is disabled\n if (!entered.current) {\n return;\n }\n\n // if the user clicks outside of the menu to close it, the toggle button\n // should not be focused. instead the nearest focusable element from the\n // click event should be focused when Tab or Shift + tab is pressed\n cancelUnmountFocus.current =\n !(event.target instanceof HTMLElement) ||\n !event.target.closest(`[role=\"${role}\"]`);\n\n // this won't be called if `event.stopPropagation()` is called\n hide.current();\n disableHoverMode();\n };\n\n // wait an animation frame so the initial click event that caused the menu\n // to become visible does not immediately close the menu\n const frame = window.requestAnimationFrame(() => {\n window.addEventListener(\"click\", callback);\n });\n\n return () => {\n window.cancelAnimationFrame(frame);\n window.removeEventListener(\"click\", callback);\n };\n }, [disableHoverMode, role, visible]);\n\n return (\n <MenuConfigurationProvider\n horizontal={horizontal}\n renderAsSheet={renderAsSheet}\n sheetFooter={sheetFooter}\n sheetHeader={sheetHeader}\n sheetPosition={sheetPosition}\n sheetVerticalSize={sheetVerticalSize}\n >\n <MenuSheet\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy as string}\n header={sheetHeader}\n footer={sheetFooter}\n position={sheetPosition}\n verticalSize={sheetVerticalSize}\n visible={visible}\n enabled={isSheet}\n onRequestClose={onRequestClose}\n style={sheetStyle}\n className={sheetClassName}\n disablePortal={propDisablePortal}\n temporary={temporary}\n disableTransition={disableTransition}\n {...sheetProps}\n >\n <Portal disabled={isSheet || (propDisablePortal ?? disablePortal)}>\n {(rendered || isSheet) && (\n <MenuWidget\n {...remaining}\n {...elementProps}\n {...eventHandlers}\n id={id}\n role={role}\n style={isSheet ? propStyle : style}\n isSheet={isSheet}\n tabIndex={tabIndex}\n horizontal={horizontal}\n listProps={listProps}\n listStyle={listStyle}\n listClassName={listClassName}\n disableElevation={disableElevation}\n cancelUnmountFocus={cancelUnmountFocus}\n >\n {children}\n </MenuWidget>\n )}\n </Portal>\n </MenuSheet>\n </MenuConfigurationProvider>\n );\n }\n);\n"],"names":["cnb","forwardRef","useEffect","useRef","useFocusContainer","useUserInteractionMode","useAppSize","Portal","useFixedPositioning","useScrollLock","useScaleTransition","useEnsuredId","MenuConfigurationProvider","useMenuConfiguration","MenuSheet","MenuWidget","useMenuBarContext","getDefaultAnchor","noop","Menu","props","propRef","id","propId","style","propStyle","role","children","horizontal","_horizontal","sheetHeader","_sheetHeader","sheetFooter","_sheetFooter","renderAsSheet","_renderAsSheet","sheetPosition","_sheetPosition","sheetVerticalSize","_sheetVerticalSize","sheetProps","sheetStyle","sheetClassName","menuStyle","menuClassName","disableElevation","temporary","tabIndex","fixedTo","className","classNames","timeout","appear","enter","exit","onEnter","onEntering","onEntered","onExit","onExiting","onExited","onKeyDown","listProps","listStyle","listClassName","visible","onRequestClose","floating","anchor","closeOnResize","closeOnScroll","preventScroll","vwMargin","vhMargin","xMargin","yMargin","width","transformOrigin","preventOverlap","disableSwapping","disableVHBounds","initialX","initialY","getFixedPositionOptions","disablePortal","propDisablePortal","disableTransition","remaining","ariaLabel","ariaLabelledBy","root","menubar","menuitem","activeId","animatedOnceRef","hoverTimeoutRef","disableHoverMode","isPhone","isSheet","entered","cancelUnmountFocus","hideWithoutRefocus","current","mode","mouse","eventHandlers","transitionOptions","nodeRef","activate","event","key","stopPropagation","preventDefault","appearing","isFocusTypeDisabled","type","isHoverDisabled","ref","callbacks","onResize","undefined","onScroll","_event","data","rendered","elementProps","transitionIn","vertical","exitedHidden","hide","callback","target","HTMLElement","closest","frame","window","requestAnimationFrame","addEventListener","cancelAnimationFrame","removeEventListener","aria-label","aria-labelledby","header","footer","position","verticalSize","enabled","disabled"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,EACVC,SAAS,EACTC,MAAM,QAGD,QAAQ;AAEf,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,sBAAsB,QAAQ,gDAAgD;AAEvF,SAASC,UAAU,QAAQ,sCAAsC;AAEjE,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,SACEC,mBAAmB,QAEd,wCAAwC;AAC/C,SAASC,aAAa,QAAQ,6BAA6B;AAC3D,SACEC,kBAAkB,QAEb,sCAAsC;AAE7C,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SACEC,yBAAyB,EACzBC,oBAAoB,QAGf,iCAAiC;AACxC,SAASC,SAAS,QAAwC,iBAAiB;AAC3E,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,iBAAiB,QAAQ,0BA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AO4I,UAAUjD,WAAYb,CAAAA,qBAAqBD,aAAY;0BAC5D,AAACwC,CAAAA,YAAY1B,OAAM,mBAClB,KAACnF;oBACE,GAAGwE,SAAS;oBACZ,GAAGsC,YAAY;oBACf,GAAGpB,aAAa;oBACjBnF,IAAIA;oBACJI,MAAMA;oBACNF,OAAO0E,UAAUzE,YAAYD;oBAC7B0E,SAASA;oBACTnD,UAAUA;oBACVnB,YAAYA;oBACZkC,WAAWA;oBACXC,WAAWA;oBACXC,eAAeA;oBACfnB,kBAAkBA;oBAClBuD,oBAAoBA;8BAEnBzE;;;;;AAOf,GACA"}
1
+ {"version":3,"sources":["../../src/menu/Menu.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n useEffect,\n useRef,\n type CSSProperties,\n type HTMLAttributes,\n} from \"react\";\nimport { type FloatingActionButtonPosition } from \"../button/FloatingActionButton.js\";\nimport { useFocusContainer } from \"../focus/useFocusContainer.js\";\nimport { useUserInteractionMode } from \"../interaction/UserInteractionModeProvider.js\";\nimport { type ListElement, type ListProps } from \"../list/List.js\";\nimport { useAppSize } from \"../media-queries/AppSizeProvider.js\";\nimport { type GetDefaultFocusedIndex } from \"../movement/types.js\";\nimport { Portal } from \"../portal/Portal.js\";\nimport { type CalculateFixedPositionOptions } from \"../positioning/types.js\";\nimport {\n useFixedPositioning,\n type FixedPositioningOptions,\n} from \"../positioning/useFixedPositioning.js\";\nimport { useScrollLock } from \"../scroll/useScrollLock.js\";\nimport {\n useScaleTransition,\n type ScaleTransitionHookOptions,\n} from \"../transition/useScaleTransition.js\";\nimport { type LabelRequiredForA11y, type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport {\n MenuConfigurationProvider,\n useMenuConfiguration,\n type MenuConfiguration,\n type MenuOrientationProps,\n} from \"./MenuConfigurationProvider.js\";\nimport { MenuSheet, type MenuSheetConvenienceProps } from \"./MenuSheet.js\";\nimport { MenuWidget } from \"./MenuWidget.js\";\nimport { useMenuBarContext } from \"./useMenuBarProvider.js\";\nimport { getDefaultAnchor } from \"./utils.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-menu-background-color\"?: string;\n \"--rmd-menu-color\"?: string;\n \"--rmd-menu-min-width\"?: string | number;\n \"--rmd-menu-spacing\"?: string | number;\n }\n}\n\nconst noop = (): void => {\n // do nothing\n};\n\n/** @remarks \\@since 5.0.0 */\nexport type MenuTransitionProps = Omit<\n ScaleTransitionHookOptions<HTMLDivElement>,\n \"transitionIn\" | \"vertical\" | \"nodeRef\"\n>;\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface MenuConfigurationProps extends CalculateFixedPositionOptions {\n /**\n * @see {@link ScaleTransitionHookOptions.temporary}\n * @defaultValue `true`\n */\n temporary?: boolean;\n\n /**\n * @defaultValue `false`\n */\n disablePortal?: boolean;\n\n /**\n * Boolean if the menu should not gain the elevation styles and should only be\n * set to `true` when rendering within a `Sheet`.\n *\n * @defaultValue `false`\n */\n disableElevation?: boolean;\n\n /**\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n\n /**\n * @see {@link FixedPositioningOptions.transformOrigin}\n * @defaultValue `true`\n */\n transformOrigin?: boolean;\n\n /**\n * Boolean if the menu should close if the page is scrolled. The default\n * behavior is to just update the position of the menu relative to the menu\n * button until it can no longer be visible within the viewport.\n *\n * @defaultValue `false`\n */\n closeOnScroll?: boolean;\n\n /**\n * Boolean if the page should no longer be scrollable while the menu is\n * visible.\n *\n * @defaultValue `false`\n */\n preventScroll?: boolean;\n\n /**\n * Boolean if the menu should close instead of repositioning itself if the\n * browser window is resized.\n *\n * @defaultValue `false`\n */\n closeOnResize?: boolean;\n\n /** @see {@link FixedPositioningOptions.getFixedPositionOptions} */\n getFixedPositionOptions?(): CalculateFixedPositionOptions;\n}\n\n/**\n * @remarks\n * \\@since 5.1.0\n * \\@since 6.0.0 Renamed from `MenuListProps` to `MenuListConvenienceProps`\n */\nexport interface MenuListConvenienceProps {\n /**\n * An optional style to provide to the `List` component that surrounds the\n * `MenuItem` within a `Menu`.\n */\n listStyle?: CSSProperties;\n\n /**\n * An optional className to provide to the `List` component that surrounds the\n * `MenuItem` within a `Menu`.\n */\n listClassName?: string;\n\n /**\n * Any additional props to pass to the `List` component that surrounds the\n * `Menu`'s `MenuItem`s.\n */\n listProps?: PropsWithRef<Omit<ListProps, \"horizontal\">, ListElement>;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface MenuConvenienceProps extends MenuConfigurationProps {\n /**\n * This can be used to apply additional props to the `Menu` component.\n *\n * Note: You can override the `style` and `className` using\n * {@link menuStyle} and {@link menuClassName} instead for convenience.\n *\n * @example\n * ```tsx\n * <DropdownMenu\n * {...props}\n * menuProps={{\n * style: {\n * // custom inline style\n * },\n * className: \"come-class-name\",\n * getFixedPositionOptions: () => ({\n * preventOverlap: true,\n * }),\n * }}\n * />\n * ```\n */\n menuProps?: PropsWithRef<\n Omit<\n MenuProps,\n | \"children\"\n | \"fixedTo\"\n | \"visible\"\n | \"onRequestClose\"\n | \"getDefaultFocusedIndex\"\n >,\n HTMLDivElement\n >;\n\n /**\n * Convenience prop to apply custom style to the `Menu` component.\n */\n menuStyle?: CSSProperties;\n\n /**\n * Convenience prop to apply custom class name to the `Menu` component.\n */\n menuClassName?: string;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type MenuFixedPositioningOptions = Omit<\n FixedPositioningOptions<HTMLElement, HTMLDivElement>,\n \"onScroll\" | \"onResize\"\n>;\n\n/**\n * @remarks\n * \\@since 5.0.0\n * \\@since 6.0.0 Updated to use the latest Menu, Transition, and Portal API.\n */\nexport interface MenuProps\n extends HTMLAttributes<HTMLDivElement>,\n MenuConfiguration,\n MenuConfigurationProps,\n MenuFixedPositioningOptions,\n MenuOrientationProps,\n MenuTransitionProps,\n MenuListConvenienceProps,\n MenuSheetConvenienceProps {\n visible: boolean;\n onRequestClose(): void;\n\n /**\n * @defaultValue `\"menu-\" + useId()`\n */\n id?: string;\n\n /**\n * This is used to set the default focus index when the menu is visible.\n *\n * @internal\n */\n getDefaultFocusedIndex?: GetDefaultFocusedIndex;\n\n /**\n * Custom style that should be applied to the menu only while not rendered\n * within a sheet since the {@link style} would be applied to both versions.\n */\n menuStyle?: CSSProperties;\n\n /**\n * Custom class name that should be applied only while not rendered within a\n * sheet.\n */\n menuClassName?: string;\n\n /**\n * @internal\n *\n * This is only used to update the default anchor when the DropdownMenu's\n * toggle is a floating action button.\n */\n floating?: FloatingActionButtonPosition;\n}\n\n/**\n * **Client Component**\n *\n * This component should generally only be used to implement context menus with\n * the `useContextMenu` hook. Otherwise, the `DropdownMenu` component should be\n * used.\n *\n * @see The `useContextMenu` hook for an example.\n *\n * @remarks\n * \\@since 5.0.0\n * \\@since 6.0.0 Updated this component to implement all the `Menu`\n * functionality instead of requiring the `useMenu` hook and `MenuWidget`\n * component. In addition, the `renderAsSheet` behavior has been moved into this\n * implementation so that the `MenuRenderer` is no longer required and context\n * menus can appear as a `Sheet`.\n */\nexport const Menu = forwardRef<HTMLDivElement, LabelRequiredForA11y<MenuProps>>(\n function Menu(props, propRef) {\n const {\n id: propId,\n style: propStyle,\n role = \"menu\",\n children,\n horizontal: _horizontal,\n sheetHeader: _sheetHeader,\n sheetFooter: _sheetFooter,\n renderAsSheet: _renderAsSheet,\n sheetPosition: _sheetPosition,\n sheetVerticalSize: _sheetVerticalSize,\n sheetProps,\n sheetStyle,\n sheetClassName,\n menuStyle,\n menuClassName,\n disableElevation = false,\n temporary = true,\n tabIndex = -1,\n fixedTo,\n className,\n classNames,\n timeout,\n appear,\n enter,\n exit,\n onEnter,\n onEntering = noop,\n onEntered = noop,\n onExit,\n onExiting,\n onExited = noop,\n onKeyDown = noop,\n listProps,\n listStyle,\n listClassName,\n visible,\n onRequestClose,\n floating,\n anchor,\n closeOnResize = false,\n closeOnScroll = false,\n preventScroll = false,\n vwMargin,\n vhMargin,\n xMargin,\n yMargin,\n width,\n transformOrigin = true,\n preventOverlap,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n getFixedPositionOptions,\n disablePortal: propDisablePortal,\n disableTransition,\n ...remaining\n } = props;\n const { \"aria-label\": ariaLabel, \"aria-labelledby\": ariaLabelledBy } =\n props;\n\n const id = useEnsuredId(propId, \"menu\");\n const {\n root,\n menubar,\n menuitem,\n activeId,\n animatedOnceRef,\n hoverTimeoutRef,\n disableHoverMode,\n } = useMenuBarContext();\n const {\n horizontal,\n sheetHeader,\n sheetFooter,\n renderAsSheet,\n sheetPosition,\n sheetVerticalSize,\n } = useMenuConfiguration(props);\n const { isPhone } = useAppSize();\n const isSheet =\n renderAsSheet === true || (renderAsSheet === \"phone\" && isPhone);\n\n const entered = useRef(false);\n const cancelUnmountFocus = useRef(false);\n const hideWithoutRefocus = (): void => {\n cancelUnmountFocus.current = true;\n onRequestClose();\n };\n const mode = useUserInteractionMode();\n const mouse = mode === \"mouse\";\n\n const { eventHandlers, transitionOptions } = useFocusContainer({\n nodeRef: propRef,\n activate: visible,\n onKeyDown(event) {\n onKeyDown(event);\n\n // when a menu is within a sheet, it should not trigger the custom\n // keyboard behavior\n if (isSheet) {\n return;\n }\n\n switch (event.key) {\n case \"Escape\":\n // prevent parent components that have an \"Escape\" keypress event\n // from being triggered as well\n event.stopPropagation();\n disableHoverMode();\n onRequestClose();\n break;\n case \"Tab\":\n // since menus are portalled, tab index is kinda broke so just close\n // the menu instead of doing default tab behavior\n event.preventDefault();\n\n if (!menuitem) {\n // pressing the tab key should still cascade close all menus\n event.stopPropagation();\n }\n disableHoverMode();\n onRequestClose();\n break;\n case \"ArrowUp\":\n if (!root && menuitem && horizontal) {\n event.stopPropagation();\n event.preventDefault();\n onRequestClose();\n }\n break;\n case \"ArrowLeft\":\n if (!root && menuitem && !horizontal) {\n event.stopPropagation();\n event.preventDefault();\n onRequestClose();\n }\n break;\n }\n },\n onEntering(appearing) {\n onEntering(appearing);\n entered.current = true;\n },\n onEntered(appearing) {\n onEntered(appearing);\n entered.current = true;\n cancelUnmountFocus.current = false;\n animatedOnceRef.current = true;\n },\n onExited() {\n onExited();\n entered.current = false;\n },\n onExiting,\n disableTransition,\n isFocusTypeDisabled(type) {\n if (role === \"listbox\") {\n return !isSheet;\n }\n\n if (type === \"keyboard\") {\n return isSheet;\n }\n\n const isHoverDisabled = mouse && hoverTimeoutRef.current === 0;\n if (type === \"mount\") {\n return isHoverDisabled;\n }\n\n return (\n isHoverDisabled ||\n cancelUnmountFocus.current ||\n (root && !!activeId && id !== activeId)\n );\n },\n });\n\n const { ref, style, callbacks } = useFixedPositioning({\n ...transitionOptions,\n onEnter,\n style: isSheet ? propStyle : menuStyle,\n fixedTo,\n anchor: getDefaultAnchor({\n anchor,\n menubar,\n floating,\n menuitem: !root && menuitem,\n horizontal,\n }),\n vwMargin,\n vhMargin,\n xMargin,\n yMargin,\n width,\n transformOrigin,\n preventOverlap,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n getFixedPositionOptions,\n onResize: closeOnResize ? hideWithoutRefocus : undefined,\n onScroll(_event, data) {\n if (!data.visible || closeOnScroll) {\n hideWithoutRefocus();\n }\n },\n });\n const { rendered, disablePortal, elementProps } = useScaleTransition({\n nodeRef: ref,\n className: cnb(!isSheet && menuClassName, className),\n transitionIn: visible,\n vertical: !horizontal,\n temporary,\n timeout: isSheet || disableTransition ? 0 : timeout,\n classNames,\n appear,\n enter,\n exit,\n onExit,\n onExiting: transitionOptions.onExiting,\n exitedHidden: true,\n ...callbacks,\n });\n useScrollLock(visible && preventScroll);\n\n // need to make sure that the useEffect does not refire for hiding on click\n // events because of the `window.requestAnimationFrame`. It'll make it so\n // that menu items that update state are unable to close when clicked\n const hide = useRef(onRequestClose);\n useEffect(() => {\n hide.current = onRequestClose;\n });\n useEffect(() => {\n if (!visible) {\n return;\n }\n\n const callback = (event: globalThis.MouseEvent): void => {\n // this is required for when the transition is disabled\n if (!entered.current) {\n return;\n }\n\n // if the user clicks outside of the menu to close it, the toggle button\n // should not be focused. instead the nearest focusable element from the\n // click event should be focused when Tab or Shift + tab is pressed\n cancelUnmountFocus.current =\n !(event.target instanceof HTMLElement) ||\n !event.target.closest(`[role=\"${role}\"]`);\n\n // this won't be called if `event.stopPropagation()` is called\n hide.current();\n disableHoverMode();\n };\n\n // wait an animation frame so the initial click event that caused the menu\n // to become visible does not immediately close the menu\n const frame = window.requestAnimationFrame(() => {\n window.addEventListener(\"click\", callback);\n });\n\n return () => {\n window.cancelAnimationFrame(frame);\n window.removeEventListener(\"click\", callback);\n };\n }, [disableHoverMode, role, visible]);\n\n return (\n <MenuConfigurationProvider\n horizontal={horizontal}\n renderAsSheet={renderAsSheet}\n sheetFooter={sheetFooter}\n sheetHeader={sheetHeader}\n sheetPosition={sheetPosition}\n sheetVerticalSize={sheetVerticalSize}\n >\n <MenuSheet\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy as string}\n header={sheetHeader}\n footer={sheetFooter}\n position={sheetPosition}\n verticalSize={sheetVerticalSize}\n visible={visible}\n enabled={isSheet}\n onRequestClose={onRequestClose}\n style={sheetStyle}\n className={sheetClassName}\n disablePortal={propDisablePortal}\n temporary={temporary}\n disableTransition={disableTransition}\n {...sheetProps}\n >\n <Portal disabled={isSheet || (propDisablePortal ?? disablePortal)}>\n {(rendered || isSheet) && (\n <MenuWidget\n {...remaining}\n {...elementProps}\n {...eventHandlers}\n id={id}\n role={role}\n style={isSheet ? propStyle : style}\n isSheet={isSheet}\n tabIndex={tabIndex}\n horizontal={horizontal}\n listProps={listProps}\n listStyle={listStyle}\n listClassName={listClassName}\n disableElevation={disableElevation}\n cancelUnmountFocus={cancelUnmountFocus}\n >\n {children}\n </MenuWidget>\n )}\n </Portal>\n </MenuSheet>\n </MenuConfigurationProvider>\n );\n }\n);\n"],"names":["cnb","forwardRef","useEffect","useRef","useFocusContainer","useUserInteractionMode","useAppSize","Portal","useFixedPositioning","useScrollLock","useScaleTransition","useEnsuredId","MenuConfigurationProvider","useMenuConfiguration","MenuSheet","MenuWidget","useMenuBarContext","getDefaultAnchor","noop","Menu","props","propRef","id","propId","style","propStyle","role","children","horizontal","_horizontal","sheetHeader","_sheetHeader","sheetFooter","_sheetFooter","renderAsSheet","_renderAsSheet","sheetPosition","_sheetPosition","sheetVerticalSize","_sheetVerticalSize","sheetProps","sheetStyle","sheetClassName","menuStyle","menuClassName","disableElevation","temporary","tabIndex","fixedTo","className","classNames","timeout","appear","enter","exit","onEnter","onEntering","onEntered","onExit","onExiting","onExited","onKeyDown","listProps","listStyle","listClassName","visible","onRequestClose","floating","anchor","closeOnResize","closeOnScroll","preventScroll","vwMargin","vhMargin","xMargin","yMargin","width","transformOrigin","preventOverlap","disableSwapping","disableVHBounds","initialX","initialY","getFixedPositionOptions","disablePortal","propDisablePortal","disableTransition","remaining","ariaLabel","ariaLabelledBy","root","menubar","menuitem","activeId","animatedOnceRef","hoverTimeoutRef","disableHoverMode","isPhone","isSheet","entered","cancelUnmountFocus","hideWithoutRefocus","current","mode","mouse","eventHandlers","transitionOptions","nodeRef","activate","event","key","stopPropagation","preventDefault","appearing","isFocusTypeDisabled","type","isHoverDisabled","ref","callbacks","onResize","undefined","onScroll","_event","data","rendered","elementProps","transitionIn","vertical","exitedHidden","hide","callback","target","HTMLElement","closest","frame","window","requestAnimationFrame","addEventListener","cancelAnimationFrame","removeEventListener","aria-label","aria-labelledby","header","footer","position","verticalSize","enabled","disabled"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,EACVC,SAAS,EACTC,MAAM,QAGD,QAAQ;AAEf,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,sBAAsB,QAAQ,gDAAgD;AAEvF,SAASC,UAAU,QAAQ,sCAAsC;AAEjE,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,SACEC,mBAAmB,QAEd,wCAAwC;AAC/C,SAASC,aAAa,QAAQ,6BAA6B;AAC3D,SACEC,kBAAkB,QAEb,sCAAsC;AAE7C,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ACV6G,cAAc3G;YACd2B,SAASA;YACTiF,SAAShD;YACThC,gBAAgBA;YAChB1C,OAAOiB;YACPQ,WAAWP;YACX0C,eAAeC;YACfvC,WAAWA;YACXwC,mBAAmBA;YAClB,GAAG9C,UAAU;sBAEd,cAAA,KAACjC;gBAAO4I,UAAUjD,WAAYb,CAAAA,qBAAqBD,aAAY;0BAC5D,AAACwC,CAAAA,YAAY1B,OAAM,mBAClB,KAACnF;oBACE,GAAGwE,SAAS;oBACZ,GAAGsC,YAAY;oBACf,GAAGpB,aAAa;oBACjBnF,IAAIA;oBACJI,MAAMA;oBACNF,OAAO0E,UAAUzE,YAAYD;oBAC7B0E,SAASA;oBACTnD,UAAUA;oBACVnB,YAAYA;oBACZkC,WAAWA;oBACXC,WAAWA;oBACXC,eAAeA;oBACfnB,kBAAkBA;oBAClBuD,oBAAoBA;8BAEnBzE;;;;;AAOf,GACA"}
@@ -8,7 +8,6 @@
8
8
  $disable-everything: false !default;
9
9
  $disable-menu-item: false !default;
10
10
  $disable-menu-item-group: false !default;
11
- $disable-focus-outline: false !default;
12
11
  $disable-elevation-colors: theme.$disable-dark-elevation !default;
13
12
 
14
13
  $elevation: 8 !default;
@@ -46,19 +45,6 @@ $variables: (background-color, color, min-width, spacing);
46
45
  outline: none;
47
46
  overflow: auto;
48
47
 
49
- @if not $disable-focus-outline {
50
- @include utils.keyboard-only {
51
- &--outline:focus {
52
- // Note: Do not use the `interaction-outline` mixin +
53
- // `interaction.set-var(interaction.$focus-color)` like normal focus
54
- // elements since it'll make all focusable children update with the
55
- // outline color as well
56
- outline: interaction.get-var(focus-color) solid
57
- interaction.get-var(focus-width);
58
- }
59
- }
60
- }
61
-
62
48
  &--elevated {
63
49
  @include box-shadows.box-shadow(
64
50
  $elevation,
@@ -82,6 +68,9 @@ $variables: (background-color, color, min-width, spacing);
82
68
  height: var(--rmd-list-item-height);
83
69
 
84
70
  &--focused {
71
+ // can't use `:focus-visible` here since this is mostly for virtual
72
+ // keyboard movement for comboboxes. the focus is on the button or textbox
73
+ // instead of a parent element
85
74
  @include utils.keyboard-only {
86
75
  @include interaction.set-var(
87
76
  background-color,
@@ -1,4 +1,4 @@
1
- import { type ReactElement, type ReactNode } from "react";
1
+ import { type ReactElement, type ReactNode, type RefObject } from "react";
2
2
  /**
3
3
  * @internal
4
4
  * @remarks \@since 6.0.0
@@ -17,7 +17,7 @@ export interface PortalContainerProviderProps {
17
17
  * `<div id="rmd-portal-container"></div>` will be added as the last child to
18
18
  * the `document.body` and be used as the container element.
19
19
  */
20
- container?: PortalContainer;
20
+ container?: PortalContainer | RefObject<PortalContainer>;
21
21
  children: ReactNode;
22
22
  }
23
23
  /**
@@ -27,6 +27,10 @@ const { Provider } = context;
27
27
  const { container, children } = props;
28
28
  const [value, setValue] = useState(portalContainer);
29
29
  useEffect(()=>{
30
+ if (container && "current" in container) {
31
+ setValue(container.current);
32
+ return;
33
+ }
30
34
  if (typeof container !== "undefined") {
31
35
  return;
32
36
  }
@@ -46,8 +50,9 @@ const { Provider } = context;
46
50
  }, [
47
51
  container
48
52
  ]);
53
+ const containerValue = container && "current" in container || !container ? value : container;
49
54
  return /*#__PURE__*/ _jsx(Provider, {
50
- value: container ?? value,
55
+ value: containerValue,
51
56
  children: children
52
57
  });
53
58
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/portal/PortalContainerProvider.tsx"],"sourcesContent":["\"use client\";\nimport {\n createContext,\n useContext,\n useEffect,\n useState,\n type ReactElement,\n type ReactNode,\n} from \"react\";\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport type PortalContainer = Element | DocumentFragment | null;\n\nexport const PORTAL_CONTAINER_ID = \"rmd-portal-container\";\n\nlet portalContainer: PortalContainer = null;\n\nconst getPortalContainer = (): PortalContainer =>\n typeof window === \"undefined\" ? null : document.body;\n\nconst context = createContext<PortalContainer>(getPortalContainer());\ncontext.displayName = \"PortalContainer\";\nconst { Provider } = context;\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport function usePortalContainer(): PortalContainer {\n return useContext(context);\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface PortalContainerProviderProps {\n /**\n * An optional container element to use. When this is `undefined`, a\n * `<div id=\"rmd-portal-container\"></div>` will be added as the last child to\n * the `document.body` and be used as the container element.\n */\n container?: PortalContainer;\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This component allows for all child `Portal` components to render within the\n * same container element. If a custom `container` element is not provided, a\n * `<div id=\"rmd-portal-container\"></div>` will be added as the last child to\n * the `document.body` and be used as the container element.\n *\n * @see {@link Portal}\n * @remarks \\@since 6.0.0\n */\nexport function PortalContainerProvider(\n props: PortalContainerProviderProps\n): ReactElement {\n const { container, children } = props;\n const [value, setValue] = useState<PortalContainer>(portalContainer);\n useEffect(() => {\n if (typeof container !== \"undefined\") {\n return;\n }\n\n if (!portalContainer) {\n portalContainer = document.createElement(\"div\");\n portalContainer.id = PORTAL_CONTAINER_ID;\n }\n if (!document.body.contains(portalContainer)) {\n document.body.appendChild(portalContainer);\n }\n\n setValue(portalContainer);\n\n return () => {\n if (portalContainer && document.body.contains(portalContainer)) {\n document.body.removeChild(portalContainer);\n }\n };\n }, [container]);\n\n return <Provider value={container ?? value}>{children}</Provider>;\n}\n"],"names":["createContext","useContext","useEffect","useState","PORTAL_CONTAINER_ID","portalContainer","getPortalContainer","window","document","body","context","displayName","Provider","usePortalContainer","PortalContainerProvider","props","container","children","value","setValue","createElement","id","contains","appendChild","removeChild"],"mappings":"AAAA;;AACA,SACEA,aAAa,EACbC,UAAU,EACVC,SAAS,EACTC,QAAQ,QAGH,QAAQ;AAQf,OAAO,MAAMC,sBAAsB,uBAAuB;AAE1D,IAAIC,kBAAmC;AAEvC,MAAMC,qBAAqB,IACzB,OAAOC,WAAW,cAAc,OAAOC,SAASC,IAAI;AAEtD,MAAMC,wBAAUV,cAA+BM;AAC/CI,QAAQC,WAAW,GAAG;AACtB,MAAM,EAAEC,QAAQ,EAAE,GAAGF;AAErB;;;CAGC,GACD,OAAO,SAASG;IACd,OAAOZ,WAAWS;AACpB;AAaA;;;;;;;;;;CAUC,GACD,OAAO,SAASI,wBACdC,KAAmC;IAEnC,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGF;IAChC,MAAM,CAACG,OAAOC,SAAS,GAAGhB,SAA0BE;IACpDH,UAAU;QACR,IAAI,OAAOc,cAAc,aAAa;YACpC;QACF;QAEA,IAAI,CAACX,iBAAiB;YACpBA,kBAAkBG,SAASY,aAAa,CAAC;YACzCf,gBAAgBgB,EAAE,GAAGjB;QACvB;QACA,IAAI,CAACI,SAASC,IAAI,CAACa,QAAQ,CAACjB,kBAAkB;YAC5CG,SAASC,IAAI,CAACc,WAAW,CAAClB;QAC5B;QAEAc,SAASd;QAET,OAAO;YACL,IAAIA,mBAAmBG,SAASC,IAAI,CAACa,QAAQ,CAACjB,kBAAkB;gBAC9DG,SAASC,IAAI,CAACe,WAAW,CAACnB;YAC5B;QACF;IACF,GAAG;QAACW;KAAU;IAEd,qBAAO,KAACJ;QAASM,OAAOF,aAAaE;kBAAQD;;AAC/C"}
1
+ {"version":3,"sources":["../../src/portal/PortalContainerProvider.tsx"],"sourcesContent":["\"use client\";\nimport {\n createContext,\n useContext,\n useEffect,\n useState,\n type ReactElement,\n type ReactNode,\n type RefObject,\n} from \"react\";\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport type PortalContainer = Element | DocumentFragment | null;\n\nexport const PORTAL_CONTAINER_ID = \"rmd-portal-container\";\n\nlet portalContainer: PortalContainer = null;\n\nconst getPortalContainer = (): PortalContainer =>\n typeof window === \"undefined\" ? null : document.body;\n\nconst context = createContext<PortalContainer>(getPortalContainer());\ncontext.displayName = \"PortalContainer\";\nconst { Provider } = context;\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport function usePortalContainer(): PortalContainer {\n return useContext(context);\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface PortalContainerProviderProps {\n /**\n * An optional container element to use. When this is `undefined`, a\n * `<div id=\"rmd-portal-container\"></div>` will be added as the last child to\n * the `document.body` and be used as the container element.\n */\n container?: PortalContainer | RefObject<PortalContainer>;\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This component allows for all child `Portal` components to render within the\n * same container element. If a custom `container` element is not provided, a\n * `<div id=\"rmd-portal-container\"></div>` will be added as the last child to\n * the `document.body` and be used as the container element.\n *\n * @see {@link Portal}\n * @remarks \\@since 6.0.0\n */\nexport function PortalContainerProvider(\n props: PortalContainerProviderProps\n): ReactElement {\n const { container, children } = props;\n const [value, setValue] = useState<PortalContainer>(portalContainer);\n useEffect(() => {\n if (container && \"current\" in container) {\n setValue(container.current);\n return;\n }\n\n if (typeof container !== \"undefined\") {\n return;\n }\n\n if (!portalContainer) {\n portalContainer = document.createElement(\"div\");\n portalContainer.id = PORTAL_CONTAINER_ID;\n }\n if (!document.body.contains(portalContainer)) {\n document.body.appendChild(portalContainer);\n }\n\n setValue(portalContainer);\n\n return () => {\n if (portalContainer && document.body.contains(portalContainer)) {\n document.body.removeChild(portalContainer);\n }\n };\n }, [container]);\n\n const containerValue =\n (container && \"current\" in container) || !container ? value : container;\n return <Provider value={containerValue}>{children}</Provider>;\n}\n"],"names":["createContext","useContext","useEffect","useState","PORTAL_CONTAINER_ID","portalContainer","getPortalContainer","window","document","body","context","displayName","Provider","usePortalContainer","PortalContainerProvider","props","container","children","value","setValue","current","createElement","id","contains","appendChild","removeChild","containerValue"],"mappings":"AAAA;;AACA,SACEA,aAAa,EACbC,UAAU,EACVC,SAAS,EACTC,QAAQ,QAIH,QAAQ;AAQf,OAAO,MAAMC,sBAAsB,uBAAuB;AAE1D,IAAIC,kBAAmC;AAEvC,MAAMC,qBAAqB,IACzB,OAAOC,WAAW,cAAc,OAAOC,SAASC,IAAI;AAEtD,MAAMC,wBAAUV,cAA+BM;AAC/CI,QAAQC,WAAW,GAAG;AACtB,MAAM,EAAEC,QAAQ,EAAE,GAAGF;AAErB;;;CAGC,GACD,OAAO,SAASG;IACd,OAAOZ,WAAWS;AACpB;AAaA;;;;;;;;;;CAUC,GACD,OAAO,SAASI,wBACdC,KAAmC;IAEnC,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGF;IAChC,MAAM,CAACG,OAAOC,SAAS,GAAGhB,SAA0BE;IACpDH,UAAU;QACR,IAAIc,aAAa,aAAaA,WAAW;YACvCG,SAASH,UAAUI,OAAO;YAC1B;QACF;QAEA,IAAI,OAAOJ,cAAc,aAAa;YACpC;QACF;QAEA,IAAI,CAACX,iBAAiB;YACpBA,kBAAkBG,SAASa,aAAa,CAAC;YACzChB,gBAAgBiB,EAAE,GAAGlB;QACvB;QACA,IAAI,CAACI,SAASC,IAAI,CAACc,QAAQ,CAAClB,kBAAkB;YAC5CG,SAASC,IAAI,CAACe,WAAW,CAACnB;QAC5B;QAEAc,SAASd;QAET,OAAO;YACL,IAAIA,mBAAmBG,SAASC,IAAI,CAACc,QAAQ,CAAClB,kBAAkB;gBAC9DG,SAASC,IAAI,CAACgB,WAAW,CAACpB;YAC5B;QACF;IACF,GAAG;QAACW;KAAU;IAEd,MAAMU,iBACJ,AAACV,aAAa,aAAaA,aAAc,CAACA,YAAYE,QAAQF;IAChE,qBAAO,KAACJ;QAASM,OAAOQ;kBAAiBT;;AAC3C"}
@@ -6,28 +6,27 @@ export type SheetPosition = "top" | "right" | "bottom" | "left";
6
6
  * The size to use for sheets that have been positioned left or right. The
7
7
  * default supported values are:
8
8
  *
9
- * - none - the size is based on content, but is still limited to the viewport
10
- * width so that the horizontal scrolling will not occur within the page. No
11
- * limits added to sizing.
12
- * - touch - the `min-width` is set to be the entire viewport width minus a
13
- * touchable area and `max-width` is set to `20rem` and is normally
14
- * recommended for mobile devices.
15
- * - static - the width is set to a static `16rem` and generally used for
9
+ * - `"none"` - the size is based on content, but is still limited to the
10
+ * viewport width so that the horizontal scrolling will not occur within the
11
+ * page. No limits added to sizing.
12
+ * - `"touch"` - the `width` is set to be the entire viewport width minus a
13
+ * touchable area and is normally recommended for mobile devices.
14
+ * - `"static"` - the `width` is set to a static `16rem` and generally used for
16
15
  * landscape tablets and desktops.
17
- * - media - automatically switches between "touch" and "static" based on css
18
- * media queries. (this is the default)
16
+ * - `"media"` - automatically switches between "touch" and "static" based on
17
+ * css media queries. (this is the default)
19
18
  */
20
19
  export type SheetHorizontalSize = "none" | "media" | "touch" | "static";
21
20
  /**
22
21
  * The size to use for sheets that have been positioned top or bottom. The
23
22
  * supported sizes are:
24
23
  *
25
- * - none - the size is based on content and is limited to the viewport
26
- * height.
27
- * - touch - the size is based on content and is limited to the viewport
28
- * height with a touchable area to close the sheet.
29
- * - recommended - the material design recommended sizing that forces a
30
- * max-height of 50vh and min-height of 3.5rem
24
+ * - `"none"` - the size is based on content and is limited to the viewport
25
+ * height
26
+ * - `"touch"` - the size is based on content and is limited to the viewport
27
+ * height minus a small touchable area
28
+ * - `"recommended"` - the material design recommended sizing that forces a
29
+ * `max-height` of 50vh and `min-height` of 3.5rem
31
30
  */
32
31
  export type SheetVerticalSize = "none" | "touch" | "recommended";
33
32
  /** @remarks \@since 6.0.0 */
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/sheet/styles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-sheet\");\n\n/**\n * The location that the sheet should be located within the viewport.\n */\nexport type SheetPosition = \"top\" | \"right\" | \"bottom\" | \"left\";\n\n/**\n * The size to use for sheets that have been positioned left or right. The\n * default supported values are:\n *\n * - none - the size is based on content, but is still limited to the viewport\n * width so that the horizontal scrolling will not occur within the page. No\n * limits added to sizing.\n * - touch - the `min-width` is set to be the entire viewport width minus a\n * touchable area and `max-width` is set to `20rem` and is normally\n * recommended for mobile devices.\n * - static - the width is set to a static `16rem` and generally used for\n * landscape tablets and desktops.\n * - media - automatically switches between \"touch\" and \"static\" based on css\n * media queries. (this is the default)\n */\nexport type SheetHorizontalSize = \"none\" | \"media\" | \"touch\" | \"static\";\n\n/**\n * The size to use for sheets that have been positioned top or bottom. The\n * supported sizes are:\n *\n * - none - the size is based on content and is limited to the viewport\n * height.\n * - touch - the size is based on content and is limited to the viewport\n * height with a touchable area to close the sheet.\n * - recommended - the material design recommended sizing that forces a\n * max-height of 50vh and min-height of 3.5rem\n */\nexport type SheetVerticalSize = \"none\" | \"touch\" | \"recommended\";\n\n/** @remarks \\@since 6.0.0 */\nexport interface BaseSheetClassNameOptions {\n className?: string;\n\n /**\n * @defaultValue `\"left\"`\n */\n position?: SheetPosition;\n\n /**\n * @defaultValue `\"media\"`\n */\n horizontalSize?: SheetHorizontalSize;\n\n /**\n * @defaultValue `\"recommended\"`\n */\n verticalSize?: SheetVerticalSize;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\nexport interface SheetClassNameOptions extends BaseSheetClassNameOptions {\n offscreen?: boolean;\n disableOverlay?: boolean;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport function sheet(options: SheetClassNameOptions): string {\n const {\n position = \"left\",\n horizontalSize = \"media\",\n verticalSize = \"recommended\",\n offscreen = false,\n disableOverlay,\n className,\n } = options;\n const horizontal = position === \"left\" || position === \"right\";\n\n return cnb(\n styles({\n horizontal,\n vertical: !horizontal,\n raised: !disableOverlay,\n offscreen,\n [position]: true,\n \"media-width\": horizontal && horizontalSize === \"media\",\n \"touch-width\": horizontal && horizontalSize === \"touch\",\n \"static-width\": horizontal && horizontalSize === \"static\",\n \"viewport-height\": !horizontal && verticalSize === \"none\",\n \"touchable-height\": !horizontal && verticalSize === \"touch\",\n \"recommended-height\": !horizontal && verticalSize === \"recommended\",\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","sheet","options","position","horizontalSize","verticalSize","offscreen","disableOverlay","className","horizontal","vertical","raised"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAkEnB,2BAA2B,GAC3B,OAAO,SAASE,MAAMC,OAA8B;IAClD,MAAM,EACJC,WAAW,MAAM,EACjBC,iBAAiB,OAAO,EACxBC,eAAe,aAAa,EAC5BC,YAAY,KAAK,EACjBC,cAAc,EACdC,SAAS,EACV,GAAGN;IACJ,MAAMO,aAAaN,aAAa,UAAUA,aAAa;IAEvD,OAAOL,IACLE,OAAO;QACLS;QACAC,UAAU,CAACD;QACXE,QAAQ,CAACJ;QACTD;QACA,CAACH,SAAS,EAAE;QACZ,eAAeM,cAAcL,mBAAmB;QAChD,eAAeK,cAAcL,mBAAmB;QAChD,gBAAgBK,cAAcL,mBAAmB;QACjD,mBAAmB,CAACK,cAAcJ,iBAAiB;QACnD,oBAAoB,CAACI,cAAcJ,iBAAiB;QACpD,sBAAsB,CAACI,cAAcJ,iBAAiB;IACxD,IACAG;AAEJ"}
1
+ {"version":3,"sources":["../../src/sheet/styles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-sheet\");\n\n/**\n * The location that the sheet should be located within the viewport.\n */\nexport type SheetPosition = \"top\" | \"right\" | \"bottom\" | \"left\";\n\n/**\n * The size to use for sheets that have been positioned left or right. The\n * default supported values are:\n *\n * - `\"none\"` - the size is based on content, but is still limited to the\n * viewport width so that the horizontal scrolling will not occur within the\n * page. No limits added to sizing.\n * - `\"touch\"` - the `width` is set to be the entire viewport width minus a\n * touchable area and is normally recommended for mobile devices.\n * - `\"static\"` - the `width` is set to a static `16rem` and generally used for\n * landscape tablets and desktops.\n * - `\"media\"` - automatically switches between \"touch\" and \"static\" based on\n * css media queries. (this is the default)\n */\nexport type SheetHorizontalSize = \"none\" | \"media\" | \"touch\" | \"static\";\n\n/**\n * The size to use for sheets that have been positioned top or bottom. The\n * supported sizes are:\n *\n * - `\"none\"` - the size is based on content and is limited to the viewport\n * height\n * - `\"touch\"` - the size is based on content and is limited to the viewport\n * height minus a small touchable area\n * - `\"recommended\"` - the material design recommended sizing that forces a\n * `max-height` of 50vh and `min-height` of 3.5rem\n */\nexport type SheetVerticalSize = \"none\" | \"touch\" | \"recommended\";\n\n/** @remarks \\@since 6.0.0 */\nexport interface BaseSheetClassNameOptions {\n className?: string;\n\n /**\n * @defaultValue `\"left\"`\n */\n position?: SheetPosition;\n\n /**\n * @defaultValue `\"media\"`\n */\n horizontalSize?: SheetHorizontalSize;\n\n /**\n * @defaultValue `\"recommended\"`\n */\n verticalSize?: SheetVerticalSize;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @internal\n */\nexport interface SheetClassNameOptions extends BaseSheetClassNameOptions {\n offscreen?: boolean;\n disableOverlay?: boolean;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport function sheet(options: SheetClassNameOptions): string {\n const {\n position = \"left\",\n horizontalSize = \"media\",\n verticalSize = \"recommended\",\n offscreen = false,\n disableOverlay,\n className,\n } = options;\n const horizontal = position === \"left\" || position === \"right\";\n\n return cnb(\n styles({\n horizontal,\n vertical: !horizontal,\n raised: !disableOverlay,\n offscreen,\n [position]: true,\n \"media-width\": horizontal && horizontalSize === \"media\",\n \"touch-width\": horizontal && horizontalSize === \"touch\",\n \"static-width\": horizontal && horizontalSize === \"static\",\n \"viewport-height\": !horizontal && verticalSize === \"none\",\n \"touchable-height\": !horizontal && verticalSize === \"touch\",\n \"recommended-height\": !horizontal && verticalSize === \"recommended\",\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","sheet","options","position","horizontalSize","verticalSize","offscreen","disableOverlay","className","horizontal","vertical","raised"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAiEnB,2BAA2B,GAC3B,OAAO,SAASE,MAAMC,OAA8B;IAClD,MAAM,EACJC,WAAW,MAAM,EACjBC,iBAAiB,OAAO,EACxBC,eAAe,aAAa,EAC5BC,YAAY,KAAK,EACjBC,cAAc,EACdC,SAAS,EACV,GAAGN;IACJ,MAAMO,aAAaN,aAAa,UAAUA,aAAa;IAEvD,OAAOL,IACLE,OAAO;QACLS;QACAC,UAAU,CAACD;QACXE,QAAQ,CAACJ;QACTD;QACA,CAACH,SAAS,EAAE;QACZ,eAAeM,cAAcL,mBAAmB;QAChD,eAAeK,cAAcL,mBAAmB;QAChD,gBAAgBK,cAAcL,mBAAmB;QACjD,mBAAmB,CAACK,cAAcJ,iBAAiB;QACnD,oBAAoB,CAACI,cAAcJ,iBAAiB;QACpD,sBAAsB,CAACI,cAAcJ,iBAAiB;IACxD,IACAG;AAEJ"}
@@ -44,8 +44,9 @@ export interface TableCheckboxProps extends TableCheckboxTdHTMLAttributes, Table
44
44
  checkboxProps?: PropsWithRef<CheckboxProps, HTMLInputElement>;
45
45
  }
46
46
  /**
47
- * **Server Component**
48
- * This might actually be a client component.
47
+ * **Client Component**
48
+ * The `TableCheckbox` is used to render a `Checkbox` within a `TableCell` by applying
49
+ * some minimal styles.
49
50
  *
50
51
  * @example
51
52
  * Simple Example
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import { forwardRef } from "react";
3
4
  import { Checkbox } from "../form/Checkbox.js";
@@ -6,8 +7,9 @@ const noop = ()=>{
6
7
  // do nothing
7
8
  };
8
9
  /**
9
- * **Server Component**
10
- * This might actually be a client component.
10
+ * **Client Component**
11
+ * The `TableCheckbox` is used to render a `Checkbox` within a `TableCell` by applying
12
+ * some minimal styles.
11
13
  *
12
14
  * @example
13
15
  * Simple Example