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

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 (548) hide show
  1. package/.eslintrc.cjs +8 -0
  2. package/.turbo/turbo-build.log +22 -22
  3. package/.turbo/turbo-lint.log +3 -3
  4. package/.turbo/turbo-test.log +4000 -3982
  5. package/.turbo/turbo-typecheck.log +1 -23
  6. package/CHANGELOG.md +13 -0
  7. package/coverage/clover.xml +477 -410
  8. package/coverage/coverage-final.json +5 -4
  9. package/coverage/lcov-report/autocomplete/Autocomplete.tsx.html +81 -15
  10. package/coverage/lcov-report/autocomplete/AutocompleteClearButton.tsx.html +262 -0
  11. package/coverage/lcov-report/autocomplete/FilterAutocompleteOptions.tsx.html +364 -0
  12. package/coverage/lcov-report/autocomplete/index.html +48 -18
  13. package/coverage/lcov-report/card/Card.tsx.html +349 -0
  14. package/coverage/lcov-report/card/CardSubtitle.tsx.html +265 -0
  15. package/coverage/lcov-report/card/index.html +146 -0
  16. package/coverage/lcov-report/card/styles.ts.html +682 -0
  17. package/coverage/lcov-report/form/Option.tsx.html +727 -0
  18. package/coverage/lcov-report/form/index.html +131 -0
  19. package/coverage/lcov-report/form/useListboxProvider.ts.html +253 -0
  20. package/coverage/lcov-report/index.html +22 -37
  21. package/coverage/lcov-report/src/card/Card.tsx.html +349 -0
  22. package/coverage/lcov-report/src/card/CardSubtitle.tsx.html +277 -0
  23. package/coverage/lcov-report/src/card/index.html +146 -0
  24. package/coverage/lcov-report/src/card/styles.ts.html +682 -0
  25. package/coverage/lcov-report/src/cssUtils.ts.html +787 -0
  26. package/coverage/lcov-report/src/index.html +116 -0
  27. package/coverage/lcov-report/src/transition/index.html +116 -0
  28. package/coverage/lcov-report/src/transition/useCSSTransition.ts.html +766 -0
  29. package/coverage/lcov-report/transition/index.html +116 -0
  30. package/coverage/lcov-report/transition/useCSSTransition.ts.html +766 -0
  31. package/coverage/lcov.info +572 -456
  32. package/dist/CoreProviders.js.map +1 -1
  33. package/dist/NoSsr.js.map +1 -1
  34. package/dist/RootHtml.js.map +1 -1
  35. package/dist/SsrProvider.js.map +1 -1
  36. package/dist/app-bar/AppBar.js.map +1 -1
  37. package/dist/app-bar/AppBarTitle.d.ts +8 -4
  38. package/dist/app-bar/AppBarTitle.js +3 -2
  39. package/dist/app-bar/AppBarTitle.js.map +1 -1
  40. package/dist/autocomplete/Autocomplete.js.map +1 -1
  41. package/dist/autocomplete/AutocompleteCircularProgress.js.map +1 -1
  42. package/dist/autocomplete/AutocompleteDropdownButton.js.map +1 -1
  43. package/dist/autocomplete/FilterAutocompleteOptions.js.map +1 -1
  44. package/dist/autocomplete/autocompleteStyles.js.map +1 -1
  45. package/dist/autocomplete/defaults.d.ts +2 -2
  46. package/dist/autocomplete/defaults.js +3 -3
  47. package/dist/autocomplete/defaults.js.map +1 -1
  48. package/dist/autocomplete/types.js.map +1 -1
  49. package/dist/avatar/Avatar.d.ts +1 -2
  50. package/dist/avatar/Avatar.js +1 -2
  51. package/dist/avatar/Avatar.js.map +1 -1
  52. package/dist/avatar/styles.js.map +1 -1
  53. package/dist/badge/Badge.js.map +1 -1
  54. package/dist/box/Box.js.map +1 -1
  55. package/dist/box/styles.js.map +1 -1
  56. package/dist/button/AsyncButton.js.map +1 -1
  57. package/dist/button/Button.js.map +1 -1
  58. package/dist/button/ButtonUnstyled.js.map +1 -1
  59. package/dist/button/FloatingActionButton.js.map +1 -1
  60. package/dist/button/TooltippedButton.js.map +1 -1
  61. package/dist/button/buttonStyles.js.map +1 -1
  62. package/dist/button/buttonUnstyledStyles.js.map +1 -1
  63. package/dist/card/Card.d.ts +2 -1
  64. package/dist/card/Card.js.map +1 -1
  65. package/dist/card/CardContent.js.map +1 -1
  66. package/dist/card/CardFooter.js.map +1 -1
  67. package/dist/card/CardHeader.js.map +1 -1
  68. package/dist/card/CardSubtitle.d.ts +6 -0
  69. package/dist/card/CardSubtitle.js +2 -1
  70. package/dist/card/CardSubtitle.js.map +1 -1
  71. package/dist/card/CardTitle.js.map +1 -1
  72. package/dist/card/ClickableCard.js.map +1 -1
  73. package/dist/card/styles.js +2 -4
  74. package/dist/card/styles.js.map +1 -1
  75. package/dist/chip/Chip.js.map +1 -1
  76. package/dist/chip/styles.js.map +1 -1
  77. package/dist/cssUtils.d.ts +1 -1
  78. package/dist/cssUtils.js.map +1 -1
  79. package/dist/delegateEvent.js.map +1 -1
  80. package/dist/dialog/Dialog.js.map +1 -1
  81. package/dist/dialog/DialogContainer.js.map +1 -1
  82. package/dist/dialog/DialogContent.js.map +1 -1
  83. package/dist/dialog/DialogFooter.js.map +1 -1
  84. package/dist/dialog/DialogHeader.js.map +1 -1
  85. package/dist/dialog/DialogTitle.js.map +1 -1
  86. package/dist/dialog/FixedDialog.js.map +1 -1
  87. package/dist/dialog/NestedDialogProvider.js.map +1 -1
  88. package/dist/dialog/styles.js.map +1 -1
  89. package/dist/divider/Divider.js.map +1 -1
  90. package/dist/divider/styles.js.map +1 -1
  91. package/dist/draggable/useDraggable.js.map +1 -1
  92. package/dist/draggable/utils.js.map +1 -1
  93. package/dist/expansion-panel/ExpansionList.js.map +1 -1
  94. package/dist/expansion-panel/ExpansionPanel.js.map +1 -1
  95. package/dist/expansion-panel/ExpansionPanelHeader.js.map +1 -1
  96. package/dist/expansion-panel/useExpansionList.js.map +1 -1
  97. package/dist/expansion-panel/useExpansionPanels.js.map +1 -1
  98. package/dist/focus/useFocusContainer.js.map +1 -1
  99. package/dist/focus/utils.js.map +1 -1
  100. package/dist/form/Checkbox.js.map +1 -1
  101. package/dist/form/Fieldset.js.map +1 -1
  102. package/dist/form/FileInput.js.map +1 -1
  103. package/dist/form/Form.js.map +1 -1
  104. package/dist/form/FormMessage.js.map +1 -1
  105. package/dist/form/FormMessageContainer.js.map +1 -1
  106. package/dist/form/FormMessageCounter.js.map +1 -1
  107. package/dist/form/InputToggle.js.map +1 -1
  108. package/dist/form/InputToggleIcon.js.map +1 -1
  109. package/dist/form/Label.js.map +1 -1
  110. package/dist/form/Legend.js.map +1 -1
  111. package/dist/form/MenuItemCheckbox.js.map +1 -1
  112. package/dist/form/MenuItemFileInput.js.map +1 -1
  113. package/dist/form/MenuItemInputToggle.js.map +1 -1
  114. package/dist/form/MenuItemRadio.js.map +1 -1
  115. package/dist/form/MenuItemSwitch.js.map +1 -1
  116. package/dist/form/MenuItemTextField.js.map +1 -1
  117. package/dist/form/NativeSelect.js.map +1 -1
  118. package/dist/form/OptGroup.js.map +1 -1
  119. package/dist/form/Option.js.map +1 -1
  120. package/dist/form/Password.js.map +1 -1
  121. package/dist/form/Radio.js.map +1 -1
  122. package/dist/form/ResizingTextAreaWrapper.js.map +1 -1
  123. package/dist/form/Select.js.map +1 -1
  124. package/dist/form/SelectedOption.js.map +1 -1
  125. package/dist/form/Slider.js.map +1 -1
  126. package/dist/form/SliderContainer.js.map +1 -1
  127. package/dist/form/SliderMark.js.map +1 -1
  128. package/dist/form/SliderMarkLabel.js.map +1 -1
  129. package/dist/form/SliderThumb.js.map +1 -1
  130. package/dist/form/SliderTrack.js.map +1 -1
  131. package/dist/form/SliderValueMarks.js.map +1 -1
  132. package/dist/form/SliderValueTooltip.js.map +1 -1
  133. package/dist/form/Switch.js.map +1 -1
  134. package/dist/form/SwitchTrack.js.map +1 -1
  135. package/dist/form/TextArea.js.map +1 -1
  136. package/dist/form/TextField.js.map +1 -1
  137. package/dist/form/TextFieldAddon.js.map +1 -1
  138. package/dist/form/TextFieldContainer.js.map +1 -1
  139. package/dist/form/fileUtils.js.map +1 -1
  140. package/dist/form/formConfig.js.map +1 -1
  141. package/dist/form/formMessageStyles.js.map +1 -1
  142. package/dist/form/inputToggleStyles.js.map +1 -1
  143. package/dist/form/menuItemInputToggleStyles.js.map +1 -1
  144. package/dist/form/nativeSelectStyles.js.map +1 -1
  145. package/dist/form/optionStyles.js.map +1 -1
  146. package/dist/form/passwordStyles.js.map +1 -1
  147. package/dist/form/selectStyles.js.map +1 -1
  148. package/dist/form/selectUtils.js.map +1 -1
  149. package/dist/form/sliderUtils.js.map +1 -1
  150. package/dist/form/switchStyles.js.map +1 -1
  151. package/dist/form/textAreaStyles.js.map +1 -1
  152. package/dist/form/textFieldContainerStyles.js.map +1 -1
  153. package/dist/form/textFieldStyles.js.map +1 -1
  154. package/dist/form/types.js.map +1 -1
  155. package/dist/form/useCheckboxGroup.js.map +1 -1
  156. package/dist/form/useCombobox.js.map +1 -1
  157. package/dist/form/useEditableCombobox.js.map +1 -1
  158. package/dist/form/useFileUpload.js.map +1 -1
  159. package/dist/form/useFormReset.js.map +1 -1
  160. package/dist/form/useListboxProvider.js.map +1 -1
  161. package/dist/form/useNumberField.js.map +1 -1
  162. package/dist/form/useRadioGroup.js.map +1 -1
  163. package/dist/form/useRangeSlider.js.map +1 -1
  164. package/dist/form/useResizingTextArea.js.map +1 -1
  165. package/dist/form/useSelectCombobox.js.map +1 -1
  166. package/dist/form/useSlider.js.map +1 -1
  167. package/dist/form/useTextField.js.map +1 -1
  168. package/dist/form/useTextFieldContainerAddons.js.map +1 -1
  169. package/dist/form/utils.js.map +1 -1
  170. package/dist/form/validation.js.map +1 -1
  171. package/dist/hoverMode/useHoverMode.js.map +1 -1
  172. package/dist/hoverMode/useHoverModeProvider.js.map +1 -1
  173. package/dist/icon/FontIcon.d.ts +10 -6
  174. package/dist/icon/FontIcon.js +1 -5
  175. package/dist/icon/FontIcon.js.map +1 -1
  176. package/dist/icon/IconRotator.js.map +1 -1
  177. package/dist/icon/MaterialIcon.d.ts +19 -2
  178. package/dist/icon/MaterialIcon.js +14 -2
  179. package/dist/icon/MaterialIcon.js.map +1 -1
  180. package/dist/icon/MaterialSymbol.js.map +1 -1
  181. package/dist/icon/SVGIcon.d.ts +3 -0
  182. package/dist/icon/SVGIcon.js.map +1 -1
  183. package/dist/icon/TextIconSpacing.js.map +1 -1
  184. package/dist/icon/iconConfig.d.ts +1 -0
  185. package/dist/icon/iconConfig.js +1 -0
  186. package/dist/icon/iconConfig.js.map +1 -1
  187. package/dist/icon/material.d.ts +1 -1
  188. package/dist/icon/material.js.map +1 -1
  189. package/dist/icon/materialConfig.js.map +1 -1
  190. package/dist/icon/styles.js.map +1 -1
  191. package/dist/interaction/Ripple.js.map +1 -1
  192. package/dist/interaction/RippleContainer.js.map +1 -1
  193. package/dist/interaction/UserInteractionModeProvider.js.map +1 -1
  194. package/dist/interaction/config.js.map +1 -1
  195. package/dist/interaction/types.js.map +1 -1
  196. package/dist/interaction/useElementInteraction.js.map +1 -1
  197. package/dist/interaction/useHigherContrastChildren.js.map +1 -1
  198. package/dist/interaction/utils.js.map +1 -1
  199. package/dist/layout/LayoutAppBar.js.map +1 -1
  200. package/dist/layout/LayoutNav.js.map +1 -1
  201. package/dist/layout/LayoutWindowSplitter.js.map +1 -1
  202. package/dist/layout/Main.js.map +1 -1
  203. package/dist/layout/layoutNavStyles.js.map +1 -1
  204. package/dist/layout/layoutWindowSplitterStyles.js.map +1 -1
  205. package/dist/layout/mainStyles.js.map +1 -1
  206. package/dist/layout/useExpandableLayout.js.map +1 -1
  207. package/dist/layout/useHorizontalLayoutTransition.js.map +1 -1
  208. package/dist/layout/useLayoutAppBarHeight.js.map +1 -1
  209. package/dist/layout/useLayoutTree.js.map +1 -1
  210. package/dist/layout/useLayoutWindowSplitter.js.map +1 -1
  211. package/dist/layout/useMainTabIndex.js.map +1 -1
  212. package/dist/layout/useResizableLayout.js.map +1 -1
  213. package/dist/layout/useTemporaryLayout.js.map +1 -1
  214. package/dist/link/Link.d.ts +2 -4
  215. package/dist/link/Link.js +1 -2
  216. package/dist/link/Link.js.map +1 -1
  217. package/dist/link/SkipToMainContent.d.ts +10 -3
  218. package/dist/link/SkipToMainContent.js +4 -1
  219. package/dist/link/SkipToMainContent.js.map +1 -1
  220. package/dist/link/styles.d.ts +2 -2
  221. package/dist/link/styles.js.map +1 -1
  222. package/dist/list/List.js.map +1 -1
  223. package/dist/list/ListItem.js.map +1 -1
  224. package/dist/list/ListItemAddon.js.map +1 -1
  225. package/dist/list/ListItemChildren.js.map +1 -1
  226. package/dist/list/ListItemLink.js.map +1 -1
  227. package/dist/list/ListItemText.js.map +1 -1
  228. package/dist/list/ListSubheader.js.map +1 -1
  229. package/dist/list/getListItemHeight.js.map +1 -1
  230. package/dist/list/listItemStyles.js.map +1 -1
  231. package/dist/list/types.js.map +1 -1
  232. package/dist/media-queries/AppSizeProvider.js.map +1 -1
  233. package/dist/media-queries/appSize.js.map +1 -1
  234. package/dist/media-queries/useMediaQuery.js.map +1 -1
  235. package/dist/menu/DropdownMenu.js.map +1 -1
  236. package/dist/menu/Menu.js.map +1 -1
  237. package/dist/menu/MenuBar.js.map +1 -1
  238. package/dist/menu/MenuButton.js.map +1 -1
  239. package/dist/menu/MenuConfigurationProvider.js.map +1 -1
  240. package/dist/menu/MenuItem.js.map +1 -1
  241. package/dist/menu/MenuItemButton.js.map +1 -1
  242. package/dist/menu/MenuItemCircularProgress.js.map +1 -1
  243. package/dist/menu/MenuItemGroup.js.map +1 -1
  244. package/dist/menu/MenuItemSeparator.js.map +1 -1
  245. package/dist/menu/MenuSheet.js.map +1 -1
  246. package/dist/menu/MenuVisibilityProvider.js.map +1 -1
  247. package/dist/menu/MenuWidget.js.map +1 -1
  248. package/dist/menu/MenuWidgetKeyboardProvider.js.map +1 -1
  249. package/dist/menu/useContextMenu.js.map +1 -1
  250. package/dist/menu/useMenuBarProvider.js.map +1 -1
  251. package/dist/menu/utils.js.map +1 -1
  252. package/dist/movement/constants.js.map +1 -1
  253. package/dist/movement/findMatchIndex.js.map +1 -1
  254. package/dist/movement/types.js.map +1 -1
  255. package/dist/movement/useKeyboardMovementProvider.js.map +1 -1
  256. package/dist/movement/utils.js.map +1 -1
  257. package/dist/navigation/CollapsibleNavGroup.js.map +1 -1
  258. package/dist/navigation/DefaultNavigationRenderer.js.map +1 -1
  259. package/dist/navigation/NavGroup.js.map +1 -1
  260. package/dist/navigation/NavItem.js.map +1 -1
  261. package/dist/navigation/NavItemButton.js.map +1 -1
  262. package/dist/navigation/NavItemLink.js.map +1 -1
  263. package/dist/navigation/NavSubheader.js.map +1 -1
  264. package/dist/navigation/Navigation.js.map +1 -1
  265. package/dist/navigation/getHrefFromParents.js.map +1 -1
  266. package/dist/navigation/navGroupStyles.js.map +1 -1
  267. package/dist/navigation/navItemStyles.js.map +1 -1
  268. package/dist/navigation/types.js.map +1 -1
  269. package/dist/navigation/useActiveHeadingId.js.map +1 -1
  270. package/dist/overlay/Overlay.d.ts +1 -0
  271. package/dist/overlay/Overlay.js.map +1 -1
  272. package/dist/overlay/overlayStyles.js.map +1 -1
  273. package/dist/portal/Portal.d.ts +4 -0
  274. package/dist/portal/Portal.js.map +1 -1
  275. package/dist/portal/PortalContainerProvider.d.ts +8 -3
  276. package/dist/portal/PortalContainerProvider.js +1 -0
  277. package/dist/portal/PortalContainerProvider.js.map +1 -1
  278. package/dist/positioning/constants.js.map +1 -1
  279. package/dist/positioning/createHorizontalPosition.js.map +1 -1
  280. package/dist/positioning/createVerticalPosition.js.map +1 -1
  281. package/dist/positioning/getFixedPosition.js.map +1 -1
  282. package/dist/positioning/types.js.map +1 -1
  283. package/dist/positioning/useFixedPositioning.js.map +1 -1
  284. package/dist/positioning/utils.js.map +1 -1
  285. package/dist/progress/CircularProgress.d.ts +5 -4
  286. package/dist/progress/CircularProgress.js.map +1 -1
  287. package/dist/progress/LinearProgress.js.map +1 -1
  288. package/dist/progress/getProgressA11y.js.map +1 -1
  289. package/dist/progress/types.js.map +1 -1
  290. package/dist/responsive-item/ResponsiveItemContainer.js.map +1 -1
  291. package/dist/responsive-item/ResponsiveItemOverlay.js.map +1 -1
  292. package/dist/responsive-item/styles.js.map +1 -1
  293. package/dist/scroll/ScrollLock.js.map +1 -1
  294. package/dist/scroll/getScrollbarWidth.js.map +1 -1
  295. package/dist/scroll/useScrollLock.js.map +1 -1
  296. package/dist/searching/caseInsensitive.js.map +1 -1
  297. package/dist/searching/fuzzy.js.map +1 -1
  298. package/dist/searching/toSearchQuery.js.map +1 -1
  299. package/dist/searching/types.js.map +1 -1
  300. package/dist/searching/useFuzzyMatch.js.map +1 -1
  301. package/dist/searching/utils.js.map +1 -1
  302. package/dist/segmented-button/SegmentedButton.js.map +1 -1
  303. package/dist/segmented-button/SegmentedButtonContainer.js.map +1 -1
  304. package/dist/segmented-button/segmentedButtonContainerStyles.js.map +1 -1
  305. package/dist/segmented-button/segmentedButtonStyles.js.map +1 -1
  306. package/dist/sheet/Sheet.js.map +1 -1
  307. package/dist/sheet/styles.js.map +1 -1
  308. package/dist/snackbar/DefaultToastRenderer.js.map +1 -1
  309. package/dist/snackbar/Snackbar.js.map +1 -1
  310. package/dist/snackbar/Toast.js.map +1 -1
  311. package/dist/snackbar/ToastActionButton.js.map +1 -1
  312. package/dist/snackbar/ToastCloseButton.js.map +1 -1
  313. package/dist/snackbar/ToastContent.js.map +1 -1
  314. package/dist/snackbar/ToastManager.js.map +1 -1
  315. package/dist/snackbar/ToastManagerProvider.js.map +1 -1
  316. package/dist/snackbar/snackbarStyles.js.map +1 -1
  317. package/dist/snackbar/toastContentStyles.js.map +1 -1
  318. package/dist/snackbar/toastStyles.js.map +1 -1
  319. package/dist/snackbar/useCurrentToastActions.js.map +1 -1
  320. package/dist/suspense/CircularProgressSuspense.js.map +1 -1
  321. package/dist/suspense/NullSuspense.js.map +1 -1
  322. package/dist/table/StickyTableSection.d.ts +23 -0
  323. package/dist/table/StickyTableSection.js +56 -0
  324. package/dist/table/StickyTableSection.js.map +1 -0
  325. package/dist/table/Table.d.ts +1 -1
  326. package/dist/table/Table.js.map +1 -1
  327. package/dist/table/TableBody.d.ts +1 -1
  328. package/dist/table/TableBody.js.map +1 -1
  329. package/dist/table/TableCell.d.ts +3 -2
  330. package/dist/table/TableCell.js.map +1 -1
  331. package/dist/table/TableCellContent.d.ts +1 -2
  332. package/dist/table/TableCellContent.js.map +1 -1
  333. package/dist/table/TableCheckbox.js.map +1 -1
  334. package/dist/table/TableConfigurationProvider.d.ts +1 -73
  335. package/dist/table/TableConfigurationProvider.js.map +1 -1
  336. package/dist/table/TableContainer.js.map +1 -1
  337. package/dist/table/TableContainerProvider.js.map +1 -1
  338. package/dist/table/TableFooter.d.ts +8 -17
  339. package/dist/table/TableFooter.js +17 -80
  340. package/dist/table/TableFooter.js.map +1 -1
  341. package/dist/table/TableHeader.d.ts +8 -17
  342. package/dist/table/TableHeader.js +20 -87
  343. package/dist/table/TableHeader.js.map +1 -1
  344. package/dist/table/TableRadio.js.map +1 -1
  345. package/dist/table/TableRow.d.ts +1 -1
  346. package/dist/table/TableRow.js.map +1 -1
  347. package/dist/table/tableCellStyles.d.ts +1 -1
  348. package/dist/table/tableCellStyles.js.map +1 -1
  349. package/dist/table/tableContainerStyles.js.map +1 -1
  350. package/dist/table/tableFooterStyles.js.map +1 -1
  351. package/dist/table/tableHeaderStyles.js.map +1 -1
  352. package/dist/table/tableRowStyles.js.map +1 -1
  353. package/dist/table/tableStyles.js.map +1 -1
  354. package/dist/table/types.d.ts +89 -9
  355. package/dist/table/types.js.map +1 -1
  356. package/dist/table/useStickyTableSection.d.ts +27 -0
  357. package/dist/table/useStickyTableSection.js +84 -0
  358. package/dist/table/useStickyTableSection.js.map +1 -0
  359. package/dist/table/useTableSectionConfig.d.ts +13 -0
  360. package/dist/table/useTableSectionConfig.js +33 -0
  361. package/dist/table/useTableSectionConfig.js.map +1 -0
  362. package/dist/tabs/Tab.js.map +1 -1
  363. package/dist/tabs/TabList.js.map +1 -1
  364. package/dist/tabs/TabListScrollButton.js.map +1 -1
  365. package/dist/tabs/tabIndicatorStyles.js.map +1 -1
  366. package/dist/tabs/tabListScrollButtonStyles.js.map +1 -1
  367. package/dist/tabs/tabListStyles.js.map +1 -1
  368. package/dist/tabs/tabStyles.js.map +1 -1
  369. package/dist/tabs/useTabList.js.map +1 -1
  370. package/dist/tabs/useTabs.js.map +1 -1
  371. package/dist/tabs/utils.js.map +1 -1
  372. package/dist/test-utils/IntersectionObserver.js.map +1 -1
  373. package/dist/test-utils/ResizeObserver.js.map +1 -1
  374. package/dist/test-utils/data-testid.js.map +1 -1
  375. package/dist/test-utils/index.js.map +1 -1
  376. package/dist/test-utils/jest-setup.js.map +1 -1
  377. package/dist/test-utils/matchMedia.js.map +1 -1
  378. package/dist/test-utils/polyfills/IntersectionObserver.js.map +1 -1
  379. package/dist/test-utils/polyfills/ResizeObserver.js.map +1 -1
  380. package/dist/test-utils/polyfills/TextDecoder.js.map +1 -1
  381. package/dist/test-utils/polyfills/TextEncoder.js.map +1 -1
  382. package/dist/test-utils/polyfills/index.js.map +1 -1
  383. package/dist/test-utils/polyfills/matchMedia.js.map +1 -1
  384. package/dist/test-utils/polyfills/offsetParent.js.map +1 -1
  385. package/dist/test-utils/polyfills/scrollIntoView.js.map +1 -1
  386. package/dist/test-utils/render.js.map +1 -1
  387. package/dist/test-utils/timers.js.map +1 -1
  388. package/dist/theme/LocalStorageColorSchemeProvider.js.map +1 -1
  389. package/dist/theme/ThemeProvider.js.map +1 -1
  390. package/dist/theme/_theme.scss +2 -1
  391. package/dist/theme/colors.js.map +1 -1
  392. package/dist/theme/cssVars.js.map +1 -1
  393. package/dist/theme/types.js.map +1 -1
  394. package/dist/theme/useCSSVariables.js.map +1 -1
  395. package/dist/theme/useColorScheme.js.map +1 -1
  396. package/dist/theme/useColorSchemeMetaTag.js.map +1 -1
  397. package/dist/theme/useColorSchemeProvider.js.map +1 -1
  398. package/dist/theme/usePrefersColorScheme.js.map +1 -1
  399. package/dist/theme/utils.js.map +1 -1
  400. package/dist/tooltip/Tooltip.d.ts +20 -9
  401. package/dist/tooltip/Tooltip.js.map +1 -1
  402. package/dist/tooltip/TooltipHoverModeProvider.js.map +1 -1
  403. package/dist/tooltip/constants.js.map +1 -1
  404. package/dist/tooltip/tooltipStyles.js.map +1 -1
  405. package/dist/tooltip/useTooltip.d.ts +30 -16
  406. package/dist/tooltip/useTooltip.js.map +1 -1
  407. package/dist/tooltip/useTooltipPosition.d.ts +2 -4
  408. package/dist/tooltip/useTooltipPosition.js.map +1 -1
  409. package/dist/tooltip/utils.js.map +1 -1
  410. package/dist/transition/CSSTransition.js.map +1 -1
  411. package/dist/transition/Collapse.js.map +1 -1
  412. package/dist/transition/CrossFade.js.map +1 -1
  413. package/dist/transition/ScaleTransition.js.map +1 -1
  414. package/dist/transition/SkeletonPlaceholder.js.map +1 -1
  415. package/dist/transition/Slide.js.map +1 -1
  416. package/dist/transition/SlideContainer.js.map +1 -1
  417. package/dist/transition/collapseStyles.js.map +1 -1
  418. package/dist/transition/config.js.map +1 -1
  419. package/dist/transition/maxWidthTransition.js.map +1 -1
  420. package/dist/transition/skeletonPlaceholderUtils.js.map +1 -1
  421. package/dist/transition/types.d.ts +19 -24
  422. package/dist/transition/types.js.map +1 -1
  423. package/dist/transition/useCSSTransition.js.map +1 -1
  424. package/dist/transition/useCarousel.js.map +1 -1
  425. package/dist/transition/useCollapseTransition.js.map +1 -1
  426. package/dist/transition/useCrossFadeTransition.js.map +1 -1
  427. package/dist/transition/useMaxWidthTransition.js.map +1 -1
  428. package/dist/transition/useScaleTransition.js.map +1 -1
  429. package/dist/transition/useSkeletonPlaceholder.js.map +1 -1
  430. package/dist/transition/useSlideTransition.js.map +1 -1
  431. package/dist/transition/useTransition.d.ts +1 -0
  432. package/dist/transition/useTransition.js +1 -0
  433. package/dist/transition/useTransition.js.map +1 -1
  434. package/dist/transition/utils.js.map +1 -1
  435. package/dist/tree/DefaultTreeItemRenderer.js.map +1 -1
  436. package/dist/tree/Tree.js.map +1 -1
  437. package/dist/tree/TreeGroup.js.map +1 -1
  438. package/dist/tree/TreeItem.js.map +1 -1
  439. package/dist/tree/TreeItemExpander.js.map +1 -1
  440. package/dist/tree/TreeProvider.js.map +1 -1
  441. package/dist/tree/styles.js.map +1 -1
  442. package/dist/tree/types.js.map +1 -1
  443. package/dist/tree/useTree.d.ts +3 -3
  444. package/dist/tree/useTree.js.map +1 -1
  445. package/dist/tree/useTreeExpansion.js.map +1 -1
  446. package/dist/tree/useTreeItems.js.map +1 -1
  447. package/dist/tree/useTreeMovement.js.map +1 -1
  448. package/dist/tree/useTreeSelection.js.map +1 -1
  449. package/dist/tree/utils.js.map +1 -1
  450. package/dist/types.js.map +1 -1
  451. package/dist/typography/SrOnly.js.map +1 -1
  452. package/dist/typography/TextContainer.d.ts +4 -0
  453. package/dist/typography/TextContainer.js +2 -0
  454. package/dist/typography/TextContainer.js.map +1 -1
  455. package/dist/typography/Typography.d.ts +10 -0
  456. package/dist/typography/Typography.js +3 -0
  457. package/dist/typography/Typography.js.map +1 -1
  458. package/dist/typography/WritingDirectionProvider.js.map +1 -1
  459. package/dist/typography/textContainerStyles.js.map +1 -1
  460. package/dist/typography/typographyStyles.js.map +1 -1
  461. package/dist/useAsyncFunction.js.map +1 -1
  462. package/dist/useDebouncedFunction.js.map +1 -1
  463. package/dist/useDropzone.js.map +1 -1
  464. package/dist/useElementSize.js.map +1 -1
  465. package/dist/useEnsuredId.js.map +1 -1
  466. package/dist/useEnsuredRef.js.map +1 -1
  467. package/dist/useEnsuredState.js.map +1 -1
  468. package/dist/useHtmlClassName.js.map +1 -1
  469. package/dist/useIntersectionObserver.js.map +1 -1
  470. package/dist/useIsomorphicLayoutEffect.js.map +1 -1
  471. package/dist/useLocalStorage.js.map +1 -1
  472. package/dist/useMutationObserver.js.map +1 -1
  473. package/dist/useOrientation.js.map +1 -1
  474. package/dist/usePageInactive.js.map +1 -1
  475. package/dist/useResizeListener.js.map +1 -1
  476. package/dist/useResizeObserver.js.map +1 -1
  477. package/dist/useThrottledFunction.js.map +1 -1
  478. package/dist/useToggle.js.map +1 -1
  479. package/dist/useUnmounted.js.map +1 -1
  480. package/dist/useWindowSize.js.map +1 -1
  481. package/dist/utils/RenderRecursively.js.map +1 -1
  482. package/dist/utils/alphaNumericSort.js.map +1 -1
  483. package/dist/utils/applyRef.js.map +1 -1
  484. package/dist/utils/bem.js.map +1 -1
  485. package/dist/utils/getClientPosition.js.map +1 -1
  486. package/dist/utils/getMiddleOfRange.js.map +1 -1
  487. package/dist/utils/getPercentage.js.map +1 -1
  488. package/dist/utils/getRangeDefaultValue.js.map +1 -1
  489. package/dist/utils/getRangeSteps.js.map +1 -1
  490. package/dist/utils/identity.js.map +1 -1
  491. package/dist/utils/isElementVisible.js.map +1 -1
  492. package/dist/utils/loop.js.map +1 -1
  493. package/dist/utils/nearest.js.map +1 -1
  494. package/dist/utils/parseCssLengthUnit.js.map +1 -1
  495. package/dist/utils/randomInt.js.map +1 -1
  496. package/dist/utils/wait.js.map +1 -1
  497. package/dist/utils/withinRange.js.map +1 -1
  498. package/dist/window-splitter/WindowSplitter.js.map +1 -1
  499. package/dist/window-splitter/useWindowSplitter.js.map +1 -1
  500. package/package.json +21 -20
  501. package/scripts/getExportMap.ts +66 -0
  502. package/scripts/tsconfig.json +1 -1
  503. package/src/app-bar/AppBarTitle.tsx +8 -4
  504. package/src/autocomplete/defaults.ts +3 -3
  505. package/src/avatar/Avatar.tsx +1 -2
  506. package/src/card/Card.tsx +2 -1
  507. package/src/card/CardSubtitle.tsx +9 -0
  508. package/src/card/__tests__/__snapshots__/CardHeader.tsx.snap +1 -1
  509. package/src/card/__tests__/__snapshots__/CardSubtitle.tsx.snap +2 -2
  510. package/src/card/__tests__/__snapshots__/styles.ts.snap +1 -1
  511. package/src/card/styles.ts +2 -6
  512. package/src/cssUtils.ts +1 -1
  513. package/src/icon/FontIcon.tsx +19 -9
  514. package/src/icon/MaterialIcon.tsx +23 -4
  515. package/src/icon/SVGIcon.tsx +3 -0
  516. package/src/icon/iconConfig.tsx +1 -0
  517. package/src/icon/material.ts +276 -19
  518. package/src/link/Link.tsx +2 -4
  519. package/src/link/SkipToMainContent.tsx +11 -4
  520. package/src/link/styles.ts +2 -2
  521. package/src/overlay/Overlay.tsx +1 -0
  522. package/src/portal/Portal.tsx +5 -0
  523. package/src/portal/PortalContainerProvider.tsx +16 -7
  524. package/src/progress/CircularProgress.tsx +5 -4
  525. package/src/table/StickyTableSection.tsx +91 -0
  526. package/src/table/Table.tsx +2 -5
  527. package/src/table/TableBody.tsx +1 -2
  528. package/src/table/TableCell.tsx +3 -5
  529. package/src/table/TableCellContent.tsx +1 -3
  530. package/src/table/TableConfigurationProvider.tsx +1 -86
  531. package/src/table/TableFooter.tsx +19 -116
  532. package/src/table/TableHeader.tsx +20 -118
  533. package/src/table/TableRow.tsx +2 -4
  534. package/src/table/__tests__/Table.tsx +9 -8
  535. package/src/table/tableCellStyles.ts +1 -1
  536. package/src/table/types.ts +105 -10
  537. package/src/table/useStickyTableSection.tsx +126 -0
  538. package/src/table/useTableSectionConfig.ts +45 -0
  539. package/src/theme/_theme.scss +2 -1
  540. package/src/tooltip/Tooltip.tsx +24 -8
  541. package/src/tooltip/useTooltip.ts +52 -27
  542. package/src/tooltip/useTooltipPosition.ts +2 -4
  543. package/src/transition/types.ts +23 -27
  544. package/src/transition/useTransition.ts +1 -0
  545. package/src/tree/useTree.ts +3 -5
  546. package/src/typography/TextContainer.tsx +4 -0
  547. package/src/typography/Typography.tsx +10 -0
  548. package/src/useResizeListener.ts +1 -1
@@ -1,19 +1,11 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { forwardRef, useCallback, useMemo, useState } from "react";
4
- import { useEnsuredRef } from "../useEnsuredRef.js";
5
- import { useIntersectionObserver } from "../useIntersectionObserver.js";
6
- import { TableConfigProvider, useTableConfig } from "./TableConfigurationProvider.js";
7
- import { useTableContainer } from "./TableContainerProvider.js";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { forwardRef } from "react";
4
+ import { TableConfigProvider } from "./TableConfigurationProvider.js";
8
5
  import { tableHeader } from "./tableHeaderStyles.js";
9
- /**
10
- * @since 6.0.0
11
- */ export const isTableHeaderStickyActive = (entry)=>{
12
- return entry.intersectionRatio < 1 && entry.boundingClientRect.bottom <= window.innerHeight;
13
- };
6
+ import { useTableSectionConfig } from "./useTableSectionConfig.js";
14
7
  /**
15
8
  * **Client Component**
16
- * TODO: Create separate useStickyTableHeader + StickyTableHeader component
17
9
  *
18
10
  * Creates a `<thead>` element with some basic styles. This component will also
19
11
  * update the table configuration so that all the `TableCell` children will
@@ -22,84 +14,25 @@ import { tableHeader } from "./tableHeaderStyles.js";
22
14
  * line-wrapping can be re-enabled if desired through the `hoverable` and
23
15
  * `disableNoWrap` props.
24
16
  */ export const TableHeader = /*#__PURE__*/ forwardRef(function TableHeader(props, propRef) {
25
- const { className, hoverable = false, lineWrap: propLineWrap, children, sticky = false, stickyOptions, isStickyActive = isTableHeaderStickyActive, disableStickyStyles = false, stickyActiveClassName, ...remaining } = props;
26
- // update the table configuration with the custom overrides for the `<thead>`
27
- const { dense, hAlign, vAlign, lineWrap, disableHover, disableBorders } = useTableConfig({
28
- lineWrap: propLineWrap,
29
- disableHover: !hoverable
30
- });
31
- const configuration = useMemo(()=>({
32
- dense,
33
- header: true,
34
- hAlign,
35
- vAlign,
36
- lineWrap,
37
- disableBorders,
38
- disableHover
39
- }), [
40
- dense,
41
- hAlign,
42
- vAlign,
17
+ const { className, sticky, lineWrap, hoverable, children, ...remaining } = props;
18
+ const config = useTableSectionConfig({
19
+ type: "header",
43
20
  lineWrap,
44
- disableBorders,
45
- disableHover
46
- ]);
47
- const [theadRef, theadRefCallback] = useEnsuredRef(propRef);
48
- const { exists, containerRef } = useTableContainer();
49
- const [stickyActive, setStickyActive] = useState(false);
50
- const targetRef = useIntersectionObserver({
51
- ref: exists ? undefined : theadRefCallback,
52
- root: containerRef,
53
- disabled: !sticky || disableStickyStyles,
54
- threshold: exists ? 0 : 1,
55
- getRootMargin: useCallback(()=>{
56
- const thead = theadRef.current;
57
- if (!thead) {
58
- return;
59
- }
60
- let topOffset;
61
- if (exists) {
62
- topOffset = thead.offsetHeight - 1;
63
- } else {
64
- const top = parseFloat(window.getComputedStyle(thead).top);
65
- topOffset = Number.isNaN(top) ? 1 : top + 1;
66
- }
67
- return `-${topOffset}px 0px 0px`;
68
- }, [
69
- exists,
70
- theadRef
71
- ]),
72
- onUpdate: useCallback(([entry])=>{
73
- setStickyActive(isStickyActive(entry, exists));
74
- }, [
75
- exists,
76
- isStickyActive
77
- ]),
78
- // allow the user defined sticky options to override the default behavior
79
- ...stickyOptions
21
+ hoverable
80
22
  });
81
- return /*#__PURE__*/ _jsxs(TableConfigProvider, {
82
- value: configuration,
83
- children: [
84
- /*#__PURE__*/ _jsx("thead", {
85
- ...remaining,
86
- ref: exists ? theadRefCallback : targetRef,
87
- className: tableHeader({
88
- className,
89
- dense,
90
- sticky,
91
- stickyActive,
92
- stickyActiveClassName
93
- }),
94
- children: children
23
+ const { dense } = config;
24
+ return /*#__PURE__*/ _jsx(TableConfigProvider, {
25
+ value: config,
26
+ children: /*#__PURE__*/ _jsx("thead", {
27
+ ...remaining,
28
+ ref: propRef,
29
+ className: tableHeader({
30
+ className,
31
+ dense,
32
+ sticky
95
33
  }),
96
- exists && sticky && !disableStickyStyles && // rendering a `<tbody>` since it is valid to have 0-many in a table
97
- // https://html.spec.whatwg.org/multipage/tables.html#the-table-element
98
- /*#__PURE__*/ _jsx("tbody", {
99
- "aria-hidden": true,
100
- ref: targetRef
101
- })
102
- ]
34
+ children: children
35
+ })
103
36
  });
104
37
  });
105
38
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/TableHeader.tsx"],"sourcesContent":["\"use client\";\nimport {\n forwardRef,\n useCallback,\n useMemo,\n useState,\n type HTMLAttributes,\n} from \"react\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport { useIntersectionObserver } from \"../useIntersectionObserver.js\";\nimport {\n TableConfigProvider,\n useTableConfig,\n type TableCellConfig,\n type TableConfigContext,\n} from \"./TableConfigurationProvider.js\";\nimport { useTableContainer } from \"./TableContainerProvider.js\";\nimport { tableHeader } from \"./tableHeaderStyles.js\";\nimport {\n type IsStickyTableSectionActive,\n type TableStickySectionProps,\n} from \"./types.js\";\n\n/**\n * @since 6.0.0\n */\nexport const isTableHeaderStickyActive: IsStickyTableSectionActive = (\n entry\n) => {\n return (\n entry.intersectionRatio < 1 &&\n entry.boundingClientRect.bottom <= window.innerHeight\n );\n};\n\n/**\n * @since 6.0.0 Added support for \"sticky-active\" state.\n */\nexport interface TableHeaderProps\n extends HTMLAttributes<HTMLTableSectionElement>,\n Pick<TableCellConfig, \"lineWrap\">,\n TableStickySectionProps {\n /**\n * This is a rename of the `disableHover` of the `TableConfig` since table\n * headers are not hoverable by default. This prop can be enabled to add the\n * row hover color within table headers, but it is not really recommended.\n *\n * @defaultValue `false`\n */\n hoverable?: boolean;\n\n /** @defaultValue {@link isTableHeaderStickyActive} */\n isStickyActive?: IsStickyTableSectionActive;\n}\n\n/**\n * **Client Component**\n * TODO: Create separate useStickyTableHeader + StickyTableHeader component\n *\n * Creates a `<thead>` element with some basic styles. This component will also\n * update the table configuration so that all the `TableCell` children will\n * automatically become `<th>` elements instead of the normal `<td>` as well as\n * disabling the hover effect and line wrapping. The hover effect and\n * line-wrapping can be re-enabled if desired through the `hoverable` and\n * `disableNoWrap` props.\n */\nexport const TableHeader = forwardRef<\n HTMLTableSectionElement,\n TableHeaderProps\n>(function TableHeader(props, propRef) {\n const {\n className,\n hoverable = false,\n lineWrap: propLineWrap,\n children,\n sticky = false,\n stickyOptions,\n isStickyActive = isTableHeaderStickyActive,\n disableStickyStyles = false,\n stickyActiveClassName,\n ...remaining\n } = props;\n\n // update the table configuration with the custom overrides for the `<thead>`\n const { dense, hAlign, vAlign, lineWrap, disableHover, disableBorders } =\n useTableConfig({\n lineWrap: propLineWrap,\n disableHover: !hoverable,\n });\n\n const configuration = useMemo<TableConfigContext>(\n () => ({\n dense,\n header: true,\n hAlign,\n vAlign,\n lineWrap,\n disableBorders,\n disableHover,\n }),\n [dense, hAlign, vAlign, lineWrap, disableBorders, disableHover]\n );\n\n const [theadRef, theadRefCallback] = useEnsuredRef(propRef);\n const { exists, containerRef } = useTableContainer();\n const [stickyActive, setStickyActive] = useState(false);\n const targetRef = useIntersectionObserver({\n ref: exists ? undefined : theadRefCallback,\n root: containerRef,\n disabled: !sticky || disableStickyStyles,\n threshold: exists ? 0 : 1,\n getRootMargin: useCallback(() => {\n const thead = theadRef.current;\n if (!thead) {\n return;\n }\n\n let topOffset: number;\n if (exists) {\n topOffset = thead.offsetHeight - 1;\n } else {\n const top = parseFloat(window.getComputedStyle(thead).top);\n topOffset = Number.isNaN(top) ? 1 : top + 1;\n }\n\n return `-${topOffset}px 0px 0px`;\n }, [exists, theadRef]),\n onUpdate: useCallback(\n ([entry]) => {\n setStickyActive(isStickyActive(entry, exists));\n },\n [exists, isStickyActive]\n ),\n // allow the user defined sticky options to override the default behavior\n ...stickyOptions,\n });\n\n return (\n <TableConfigProvider value={configuration}>\n <thead\n {...remaining}\n ref={exists ? theadRefCallback : targetRef}\n className={tableHeader({\n className,\n dense,\n sticky,\n stickyActive,\n stickyActiveClassName,\n })}\n >\n {children}\n </thead>\n {exists && sticky && !disableStickyStyles && (\n // rendering a `<tbody>` since it is valid to have 0-many in a table\n // https://html.spec.whatwg.org/multipage/tables.html#the-table-element\n <tbody aria-hidden ref={targetRef} />\n )}\n </TableConfigProvider>\n );\n});\n"],"names":["forwardRef","useCallback","useMemo","useState","useEnsuredRef","useIntersectionObserver","TableConfigProvider","useTableConfig","useTableContainer","tableHeader","isTableHeaderStickyActive","entry","intersectionRatio","boundingClientRect","bottom","window","innerHeight","TableHeader","props","propRef","className","hoverable","lineWrap","propLineWrap","children","sticky","stickyOptions","isStickyActive","disableStickyStyles","stickyActiveClassName","remaining","dense","hAlign","vAlign","disableHover","disableBorders","configuration","header","theadRef","theadRefCallback","exists","containerRef","stickyActive","setStickyActive","targetRef","ref","undefined","root","disabled","threshold","getRootMargin","thead","current","topOffset","offsetHeight","top","parseFloat","getComputedStyle","Number","isNaN","onUpdate","value","tbody","aria-hidden"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AACA,SACEA,UAAU,EACVC,WAAW,EACXC,OAAO,EACPC,QAAQ,QAEH,QAAQ;AACf,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,uBAAuB,QAAQ,gCAAgC;AACxE,SACEC,mBAAmB,EACnBC,cAAc,QAGT,kCAAkC;AACzC,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,WAAW,QAAQ,yBAAyB;AAMrD;;CAEC,GACD,OAAO,MAAMC,4BAAwD,CACnEC;IAEA,OACEA,MAAMC,iBAAiB,GAAG,KAC1BD,MAAME,kBAAkB,CAACC,MAAM,IAAIC,OAAOC,WAAW;AAEzD,EAAE;AAsBF;;;;;;;;;;CAUC,GACD,OAAO,MAAMC,4BAAcjB,WAGzB,SAASiB,YAAYC,KAAK,EAAEC,OAAO;IACnC,MAAM,EACJC,SAAS,EACTC,YAAY,KAAK,EACjBC,UAAUC,YAAY,EACtBC,QAAQ,EACRC,SAAS,KAAK,EACdC,aAAa,EACbC,iBAAiBjB,yBAAyB,EAC1CkB,sBAAsB,KAAK,EAC3BC,qBAAqB,EACrB,GAAGC,WACJ,GAAGZ;IAEJ,6EAA6E;IAC7E,MAAM,EAAEa,KAAK,EAAEC,MAAM,EAAEC,MAAM,EAAEX,QAAQ,EAAEY,YAAY,EAAEC,cAAc,EAAE,GACrE5B,eAAe;QACbe,UAAUC;QACVW,cAAc,CAACb;IACjB;IAEF,MAAMe,gBAAgBlC,QACpB,IAAO,CAAA;YACL6B;YACAM,QAAQ;YACRL;YACAC;YACAX;YACAa;YACAD;QACF,CAAA,GACA;QAACH;QAAOC;QAAQC;QAAQX;QAAUa;QAAgBD;KAAa;IAGjE,MAAM,CAACI,UAAUC,iBAAiB,GAAGnC,cAAce;IACnD,MAAM,EAAEqB,MAAM,EAAEC,YAAY,EAAE,GAAGjC;IACjC,MAAM,CAACkC,cAAcC,gBAAgB,GAAGxC,SAAS;IACjD,MAAMyC,YAAYvC,wBAAwB;QACxCwC,KAAKL,SAASM,YAAYP;QAC1BQ,MAAMN;QACNO,UAAU,CAACvB,UAAUG;QACrBqB,WAAWT,SAAS,IAAI;QACxBU,eAAejD,YAAY;YACzB,MAAMkD,QAAQb,SAASc,OAAO;YAC9B,IAAI,CAACD,OAAO;gBACV;YACF;YAEA,IAAIE;YACJ,IAAIb,QAAQ;gBACVa,YAAYF,MAAMG,YAAY,GAAG;YACnC,OAAO;gBACL,MAAMC,MAAMC,WAAWzC,OAAO0C,gBAAgB,CAACN,OAAOI,GAAG;gBACzDF,YAAYK,OAAOC,KAAK,CAACJ,OAAO,IAAIA,MAAM;YAC5C;YAEA,OAAO,CAAC,CAAC,EAAEF,UAAU,UAAU,CAAC;QAClC,GAAG;YAACb;YAAQF;SAAS;QACrBsB,UAAU3D,YACR,CAAC,CAACU,MAAM;YACNgC,gBAAgBhB,eAAehB,OAAO6B;QACxC,GACA;YAACA;YAAQb;SAAe;QAE1B,yEAAyE;QACzE,GAAGD,aAAa;IAClB;IAEA,qBACE,MAACpB;QAAoBuD,OAAOzB;;0BAC1B,KAACe;gBACE,GAAGrB,SAAS;gBACbe,KAAKL,SAASD,mBAAmBK;gBACjCxB,WAAWX,YAAY;oBACrBW;oBACAW;oBACAN;oBACAiB;oBACAb;gBACF;0BAECL;;YAEFgB,UAAUf,UAAU,CAACG,uBACpB,oEAAoE;YACpE,uEAAuE;0BACvE,KAACkC;gBAAMC,aAAW;gBAAClB,KAAKD;;;;AAIhC,GAAG"}
1
+ {"version":3,"sources":["../../src/table/TableHeader.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { TableConfigProvider } from \"./TableConfigurationProvider.js\";\nimport { tableHeader } from \"./tableHeaderStyles.js\";\nimport { type TableSectionConfiguration } from \"./types.js\";\nimport { useTableSectionConfig } from \"./useTableSectionConfig.js\";\n\nexport interface TableHeaderProps\n extends HTMLAttributes<HTMLTableSectionElement>,\n TableSectionConfiguration {\n /**\n * NOTE: It is recommended to use the `StickyTableSection` component instead\n * of enabling this prop since it supports dynamically adding styles while the\n * header covering table rows.\n *\n * Set this to `true` to enable the sticky behavior.\n *\n * @defaultValue `false`\n */\n sticky?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * Creates a `<thead>` element with some basic styles. This component will also\n * update the table configuration so that all the `TableCell` children will\n * automatically become `<th>` elements instead of the normal `<td>` as well as\n * disabling the hover effect and line wrapping. The hover effect and\n * line-wrapping can be re-enabled if desired through the `hoverable` and\n * `disableNoWrap` props.\n */\nexport const TableHeader = forwardRef<\n HTMLTableSectionElement,\n TableHeaderProps\n>(function TableHeader(props, propRef) {\n const { className, sticky, lineWrap, hoverable, children, ...remaining } =\n props;\n\n const config = useTableSectionConfig({\n type: \"header\",\n lineWrap,\n hoverable,\n });\n const { dense } = config;\n\n return (\n <TableConfigProvider value={config}>\n <thead\n {...remaining}\n ref={propRef}\n className={tableHeader({\n className,\n dense,\n sticky,\n })}\n >\n {children}\n </thead>\n </TableConfigProvider>\n );\n});\n"],"names":["forwardRef","TableConfigProvider","tableHeader","useTableSectionConfig","TableHeader","props","propRef","className","sticky","lineWrap","hoverable","children","remaining","config","type","dense","value","thead","ref"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAA6B,QAAQ;AACxD,SAASC,mBAAmB,QAAQ,kCAAkC;AACtE,SAASC,WAAW,QAAQ,yBAAyB;AAErD,SAASC,qBAAqB,QAAQ,6BAA6B;AAiBnE;;;;;;;;;CASC,GACD,OAAO,MAAMC,4BAAcJ,WAGzB,SAASI,YAAYC,KAAK,EAAEC,OAAO;IACnC,MAAM,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,WAAW,GACtEP;IAEF,MAAMQ,SAASV,sBAAsB;QACnCW,MAAM;QACNL;QACAC;IACF;IACA,MAAM,EAAEK,KAAK,EAAE,GAAGF;IAElB,qBACE,KAACZ;QAAoBe,OAAOH;kBAC1B,cAAA,KAACI;YACE,GAAGL,SAAS;YACbM,KAAKZ;YACLC,WAAWL,YAAY;gBACrBK;gBACAQ;gBACAP;YACF;sBAECG;;;AAIT,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/TableRadio.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type TdHTMLAttributes } from \"react\";\nimport { type RadioProps } from \"../form/InputToggle.js\";\nimport { Radio } from \"../form/Radio.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { TableCell } from \"./TableCell.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 6.0.0\n */\nexport type TableRadioTdHTMLAttributes = Omit<\n TdHTMLAttributes<HTMLTableCellElement>,\n \"aria-sort\" | \"scope\" | \"onChange\" | \"onInvalid\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport type TableRadioSupportedRadioProps = Pick<\n RadioProps,\n | \"name\"\n | \"value\"\n | \"icon\"\n | \"iconStyle\"\n | \"iconClassName\"\n | \"iconProps\"\n | \"checkedIcon\"\n | \"checked\"\n | \"onChange\"\n | \"defaultChecked\"\n | \"error\"\n | \"required\"\n | \"onInvalid\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport interface TableRadioProps\n extends TableRadioTdHTMLAttributes,\n TableRadioSupportedRadioProps {\n /**\n * @defaultValue `!props[\"aria-labelledby\"] ? \"Select Row\" : undefined`\n */\n \"aria-label\"?: string;\n\n /** @defaultValue `false` */\n sticky?: boolean;\n\n /**\n * This allows you to override any props for the checkbox that are not\n * configurable as top-level props.\n *\n * @example Simple Example\n * ```tsx\n * checkboxProps={{\n * id: \"some-custom-id\",\n * ref: checkboxRef,\n * }}\n * ```\n *\n * @see {@link TableRadioSupportedRadioProps}\n * @since 6.0.0\n */\n radioProps?: PropsWithRef<RadioProps, HTMLInputElement>;\n}\n\n/**\n * **Client Component**\n * The `TableRadio` is used to render a `Radio` within a `TableCell` by applying\n * some minimal styles.\n *\n * @example Simple Example\n * ```tsx\n * import {\n * Table,\n * TableBody,\n * TableCell,\n * TableRadio,\n * TableContainer,\n * TableHeader,\n * TableRow,\n * useRadioGroup,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * const rows = [\n * { name: \"Frozen Yogurt\", type: \"Ice Cream\" },\n * { name: \"Ice cream sandwich\", type: \"Ice Cream\" },\n * { name: \"Eclair\", type: \"Pastry\" },\n * // ...other content\n * ] as const;\n *\n * function Example(): ReactElement {\n * const { getRadioProps } = useRadioGroup({\n * name: \"selected\",\n * });\n * return (\n * <TableContainer>\n * <Table>\n * <TableHeader>\n * <TableRow>\n * <TableCell header={false} />\n * <TableCell>Name</TableCell>\n * <TableCell>Type</TableCell>\n * </TableRow>\n * </TableHeader>\n * <TableBody>\n * {rows.map(({ name, type }) => {\n * const radioProps = getRadioProps(name);\n * const { checked, onChange } = radioProps;\n *\n * return (\n * <TableRow\n * key={name}\n * onClick={onChange}\n * clickable\n * selected={checked}\n * >\n * <TableRadio {...radioProps} />\n * <TableCell>{name}</TableCell>\n * <TableCell hAlign=\"right\">{type}</TableCell>\n * </TableRow>\n * );\n * })}\n * </TableBody>\n * </Table>\n * </TableContainer>\n * );\n * }\n * ```\n * @since 6.0.0\n */\nexport const TableRadio = forwardRef<HTMLTableCellElement, TableRadioProps>(\n function TableRadio(props, ref) {\n const {\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel = !ariaLabelledBy ? \"Select Row\" : undefined,\n \"aria-controls\": ariaControls,\n name,\n icon,\n iconProps,\n iconStyle,\n iconClassName,\n checkedIcon,\n value,\n checked,\n onChange,\n defaultChecked,\n radioProps,\n onClick = noop,\n error,\n required,\n onInvalid,\n ...remaining\n } = props;\n\n return (\n <TableCell\n {...remaining}\n ref={ref}\n header={false}\n inputToggle\n onClick={(event) => {\n event.stopPropagation();\n onClick(event);\n }}\n >\n <Radio\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-controls={ariaControls}\n name={name}\n icon={icon}\n iconProps={iconProps}\n iconStyle={iconStyle}\n iconClassName={iconClassName}\n checkedIcon={checkedIcon}\n value={value}\n checked={checked}\n defaultChecked={defaultChecked}\n error={error}\n required={required}\n onChange={onChange}\n onInvalid={onInvalid}\n {...radioProps}\n />\n </TableCell>\n );\n }\n);\n"],"names":["forwardRef","Radio","TableCell","noop","TableRadio","props","ref","ariaLabelledBy","ariaLabel","undefined","ariaControls","name","icon","iconProps","iconStyle","iconClassName","checkedIcon","value","checked","onChange","defaultChecked","radioProps","onClick","error","required","onInvalid","remaining","header","inputToggle","event","stopPropagation","aria-label","aria-labelledby","aria-controls"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AACA,SAASA,UAAU,QAA+B,QAAQ;AAE1D,SAASC,KAAK,QAAQ,mBAAmB;AAEzC,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,MAAMC,OAAO;AACX,aAAa;AACf;AA8DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEC,GACD,OAAO,MAAMC,2BAAaJ,WACxB,SAASI,WAAWC,KAAK,EAAEC,GAAG;IAC5B,MAAM,EACJ,mBAAmBC,cAAc,EACjC,cAAcC,YAAY,CAACD,iBAAiB,eAAeE,SAAS,EACpE,iBAAiBC,YAAY,EAC7BC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,WAAW,EACXC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,cAAc,EACdC,UAAU,EACVC,UAAUnB,IAAI,EACdoB,KAAK,EACLC,QAAQ,EACRC,SAAS,EACT,GAAGC,WACJ,GAAGrB;IAEJ,qBACE,KAACH;QACE,GAAGwB,SAAS;QACbpB,KAAKA;QACLqB,QAAQ;QACRC,WAAW;QACXN,SAAS,CAACO;YACRA,MAAMC,eAAe;YACrBR,QAAQO;QACV;kBAEA,cAAA,KAAC5B;YACC8B,cAAYvB;YACZwB,mBAAiBzB;YACjB0B,iBAAevB;YACfC,MAAMA;YACNC,MAAMA;YACNC,WAAWA;YACXC,WAAWA;YACXC,eAAeA;YACfC,aAAaA;YACbC,OAAOA;YACPC,SAASA;YACTE,gBAAgBA;YAChBG,OAAOA;YACPC,UAAUA;YACVL,UAAUA;YACVM,WAAWA;YACV,GAAGJ,UAAU;;;AAItB,GACA"}
1
+ {"version":3,"sources":["../../src/table/TableRadio.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type TdHTMLAttributes } from \"react\";\nimport { type RadioProps } from \"../form/InputToggle.js\";\nimport { Radio } from \"../form/Radio.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { TableCell } from \"./TableCell.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 6.0.0\n */\nexport type TableRadioTdHTMLAttributes = Omit<\n TdHTMLAttributes<HTMLTableCellElement>,\n \"aria-sort\" | \"scope\" | \"onChange\" | \"onInvalid\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport type TableRadioSupportedRadioProps = Pick<\n RadioProps,\n | \"name\"\n | \"value\"\n | \"icon\"\n | \"iconStyle\"\n | \"iconClassName\"\n | \"iconProps\"\n | \"checkedIcon\"\n | \"checked\"\n | \"onChange\"\n | \"defaultChecked\"\n | \"error\"\n | \"required\"\n | \"onInvalid\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport interface TableRadioProps\n extends TableRadioTdHTMLAttributes,\n TableRadioSupportedRadioProps {\n /**\n * @defaultValue `!props[\"aria-labelledby\"] ? \"Select Row\" : undefined`\n */\n \"aria-label\"?: string;\n\n /** @defaultValue `false` */\n sticky?: boolean;\n\n /**\n * This allows you to override any props for the checkbox that are not\n * configurable as top-level props.\n *\n * @example Simple Example\n * ```tsx\n * checkboxProps={{\n * id: \"some-custom-id\",\n * ref: checkboxRef,\n * }}\n * ```\n *\n * @see {@link TableRadioSupportedRadioProps}\n * @since 6.0.0\n */\n radioProps?: PropsWithRef<RadioProps, HTMLInputElement>;\n}\n\n/**\n * **Client Component**\n * The `TableRadio` is used to render a `Radio` within a `TableCell` by applying\n * some minimal styles.\n *\n * @example Simple Example\n * ```tsx\n * import {\n * Table,\n * TableBody,\n * TableCell,\n * TableRadio,\n * TableContainer,\n * TableHeader,\n * TableRow,\n * useRadioGroup,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * const rows = [\n * { name: \"Frozen Yogurt\", type: \"Ice Cream\" },\n * { name: \"Ice cream sandwich\", type: \"Ice Cream\" },\n * { name: \"Eclair\", type: \"Pastry\" },\n * // ...other content\n * ] as const;\n *\n * function Example(): ReactElement {\n * const { getRadioProps } = useRadioGroup({\n * name: \"selected\",\n * });\n * return (\n * <TableContainer>\n * <Table>\n * <TableHeader>\n * <TableRow>\n * <TableCell header={false} />\n * <TableCell>Name</TableCell>\n * <TableCell>Type</TableCell>\n * </TableRow>\n * </TableHeader>\n * <TableBody>\n * {rows.map(({ name, type }) => {\n * const radioProps = getRadioProps(name);\n * const { checked, onChange } = radioProps;\n *\n * return (\n * <TableRow\n * key={name}\n * onClick={onChange}\n * clickable\n * selected={checked}\n * >\n * <TableRadio {...radioProps} />\n * <TableCell>{name}</TableCell>\n * <TableCell hAlign=\"right\">{type}</TableCell>\n * </TableRow>\n * );\n * })}\n * </TableBody>\n * </Table>\n * </TableContainer>\n * );\n * }\n * ```\n * @since 6.0.0\n */\nexport const TableRadio = forwardRef<HTMLTableCellElement, TableRadioProps>(\n function TableRadio(props, ref) {\n const {\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel = !ariaLabelledBy ? \"Select Row\" : undefined,\n \"aria-controls\": ariaControls,\n name,\n icon,\n iconProps,\n iconStyle,\n iconClassName,\n checkedIcon,\n value,\n checked,\n onChange,\n defaultChecked,\n radioProps,\n onClick = noop,\n error,\n required,\n onInvalid,\n ...remaining\n } = props;\n\n return (\n <TableCell\n {...remaining}\n ref={ref}\n header={false}\n inputToggle\n onClick={(event) => {\n event.stopPropagation();\n onClick(event);\n }}\n >\n <Radio\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-controls={ariaControls}\n name={name}\n icon={icon}\n iconProps={iconProps}\n iconStyle={iconStyle}\n iconClassName={iconClassName}\n checkedIcon={checkedIcon}\n value={value}\n checked={checked}\n defaultChecked={defaultChecked}\n error={error}\n required={required}\n onChange={onChange}\n onInvalid={onInvalid}\n {...radioProps}\n />\n </TableCell>\n );\n }\n);\n"],"names":["forwardRef","Radio","TableCell","noop","TableRadio","props","ref","ariaLabelledBy","ariaLabel","undefined","ariaControls","name","icon","iconProps","iconStyle","iconClassName","checkedIcon","value","checked","onChange","defaultChecked","radioProps","onClick","error","required","onInvalid","remaining","header","inputToggle","event","stopPropagation","aria-label","aria-labelledby","aria-controls"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAA+B,QAAQ;AAE1D,SAASC,KAAK,QAAQ,mBAAmB;AAEzC,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,MAAMC,OAAO;AACX,aAAa;AACf;AA8DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEC,GACD,OAAO,MAAMC,2BAAaJ,WACxB,SAASI,WAAWC,KAAK,EAAEC,GAAG;IAC5B,MAAM,EACJ,mBAAmBC,cAAc,EACjC,cAAcC,YAAY,CAACD,iBAAiB,eAAeE,SAAS,EACpE,iBAAiBC,YAAY,EAC7BC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,WAAW,EACXC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,cAAc,EACdC,UAAU,EACVC,UAAUnB,IAAI,EACdoB,KAAK,EACLC,QAAQ,EACRC,SAAS,EACT,GAAGC,WACJ,GAAGrB;IAEJ,qBACE,KAACH;QACE,GAAGwB,SAAS;QACbpB,KAAKA;QACLqB,QAAQ;QACRC,WAAW;QACXN,SAAS,CAACO;YACRA,MAAMC,eAAe;YACrBR,QAAQO;QACV;kBAEA,cAAA,KAAC5B;YACC8B,cAAYvB;YACZwB,mBAAiBzB;YACjB0B,iBAAevB;YACfC,MAAMA;YACNC,MAAMA;YACNC,WAAWA;YACXC,WAAWA;YACXC,eAAeA;YACfC,aAAaA;YACbC,OAAOA;YACPC,SAASA;YACTE,gBAAgBA;YAChBG,OAAOA;YACPC,UAAUA;YACVL,UAAUA;YACVM,WAAWA;YACV,GAAGJ,UAAU;;;AAItB,GACA"}
@@ -1,5 +1,5 @@
1
1
  import { type HTMLAttributes } from "react";
2
- import { type TableRowConfiguration } from "./TableConfigurationProvider.js";
2
+ import { type TableRowConfiguration } from "./types.js";
3
3
  export interface TableRowProps extends HTMLAttributes<HTMLTableRowElement>, TableRowConfiguration {
4
4
  /**
5
5
  * Boolean if the current row has been selected and should apply the selected
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/TableRow.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport {\n useTableConfig,\n type TableRowConfiguration,\n} from \"./TableConfigurationProvider.js\";\nimport { tableRow } from \"./tableRowStyles.js\";\n\nexport interface TableRowProps\n extends HTMLAttributes<HTMLTableRowElement>,\n TableRowConfiguration {\n /**\n * Boolean if the current row has been selected and should apply the selected\n * background-color.\n *\n * @defaultValue `false`\n */\n selected?: boolean;\n\n /**\n * Boolean if the row should be clickable and update the cursor while hovered\n * to be a pointer.\n *\n * @defaultValue `false`\n */\n clickable?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * Creates a `<tr>` element with some general styles that are inherited from the\n * base table configuration.\n */\nexport const TableRow = forwardRef<HTMLTableRowElement, TableRowProps>(\n function TableRow(props, ref) {\n const {\n className,\n disableHover: propDisableHover,\n disableBorders: propDisableBorders,\n children,\n selected = false,\n clickable = false,\n ...remaining\n } = props;\n\n const { disableHover, disableBorders } = useTableConfig({\n disableHover: propDisableHover,\n disableBorders: propDisableBorders,\n });\n\n return (\n <tr\n {...remaining}\n ref={ref}\n className={tableRow({\n selected,\n clickable,\n disableHover,\n disableBorders,\n className,\n })}\n >\n {children}\n </tr>\n );\n }\n);\n"],"names":["forwardRef","useTableConfig","tableRow","TableRow","props","ref","className","disableHover","propDisableHover","disableBorders","propDisableBorders","children","selected","clickable","remaining","tr"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AACA,SAASA,UAAU,QAA6B,QAAQ;AACxD,SACEC,cAAc,QAET,kCAAkC;AACzC,SAASC,QAAQ,QAAQ,sBAAsB;AAsB/C;;;;;CAKC,GACD,OAAO,MAAMC,yBAAWH,WACtB,SAASG,SAASC,KAAK,EAAEC,GAAG;IAC1B,MAAM,EACJC,SAAS,EACTC,cAAcC,gBAAgB,EAC9BC,gBAAgBC,kBAAkB,EAClCC,QAAQ,EACRC,WAAW,KAAK,EAChBC,YAAY,KAAK,EACjB,GAAGC,WACJ,GAAGV;IAEJ,MAAM,EAAEG,YAAY,EAAEE,cAAc,EAAE,GAAGR,eAAe;QACtDM,cAAcC;QACdC,gBAAgBC;IAClB;IAEA,qBACE,KAACK;QACE,GAAGD,SAAS;QACbT,KAAKA;QACLC,WAAWJ,SAAS;YAClBU;YACAC;YACAN;YACAE;YACAH;QACF;kBAECK;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/table/TableRow.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { useTableConfig } from \"./TableConfigurationProvider.js\";\nimport { tableRow } from \"./tableRowStyles.js\";\nimport { type TableRowConfiguration } from \"./types.js\";\n\nexport interface TableRowProps\n extends HTMLAttributes<HTMLTableRowElement>,\n TableRowConfiguration {\n /**\n * Boolean if the current row has been selected and should apply the selected\n * background-color.\n *\n * @defaultValue `false`\n */\n selected?: boolean;\n\n /**\n * Boolean if the row should be clickable and update the cursor while hovered\n * to be a pointer.\n *\n * @defaultValue `false`\n */\n clickable?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * Creates a `<tr>` element with some general styles that are inherited from the\n * base table configuration.\n */\nexport const TableRow = forwardRef<HTMLTableRowElement, TableRowProps>(\n function TableRow(props, ref) {\n const {\n className,\n disableHover: propDisableHover,\n disableBorders: propDisableBorders,\n children,\n selected = false,\n clickable = false,\n ...remaining\n } = props;\n\n const { disableHover, disableBorders } = useTableConfig({\n disableHover: propDisableHover,\n disableBorders: propDisableBorders,\n });\n\n return (\n <tr\n {...remaining}\n ref={ref}\n className={tableRow({\n selected,\n clickable,\n disableHover,\n disableBorders,\n className,\n })}\n >\n {children}\n </tr>\n );\n }\n);\n"],"names":["forwardRef","useTableConfig","tableRow","TableRow","props","ref","className","disableHover","propDisableHover","disableBorders","propDisableBorders","children","selected","clickable","remaining","tr"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAA6B,QAAQ;AACxD,SAASC,cAAc,QAAQ,kCAAkC;AACjE,SAASC,QAAQ,QAAQ,sBAAsB;AAuB/C;;;;;CAKC,GACD,OAAO,MAAMC,yBAAWH,WACtB,SAASG,SAASC,KAAK,EAAEC,GAAG;IAC1B,MAAM,EACJC,SAAS,EACTC,cAAcC,gBAAgB,EAC9BC,gBAAgBC,kBAAkB,EAClCC,QAAQ,EACRC,WAAW,KAAK,EAChBC,YAAY,KAAK,EACjB,GAAGC,WACJ,GAAGV;IAEJ,MAAM,EAAEG,YAAY,EAAEE,cAAc,EAAE,GAAGR,eAAe;QACtDM,cAAcC;QACdC,gBAAgBC;IAClB;IAEA,qBACE,KAACK;QACE,GAAGD,SAAS;QACbT,KAAKA;QACLC,WAAWJ,SAAS;YAClBU;YACAC;YACAN;YACAE;YACAH;QACF;kBAECK;;AAGP,GACA"}
@@ -1,4 +1,4 @@
1
- import { type TableCellHorizontalAlignment, type TableCellVerticalAlignment } from "./TableConfigurationProvider.js";
1
+ import { type TableCellHorizontalAlignment, type TableCellVerticalAlignment } from "./types.js";
2
2
  /** @since 6.0.0 */
3
3
  export interface TableCellClassNameOptions {
4
4
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/tableCellStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport {\n type TableCellHorizontalAlignment,\n type TableCellVerticalAlignment,\n} from \"./TableConfigurationProvider.js\";\n\n/** @since 6.0.0 */\nexport interface TableCellClassNameOptions {\n className?: string;\n\n /**\n * Set this to `true` if the cell is rendered as a `<th>` so that the correct\n * sticky styles can be applied.\n */\n header: boolean;\n\n /**\n * Set this to true if the cell is rendered in a `<thead>` so that the correct\n * sticky styles can be applied.\n */\n isInTableHeader: boolean;\n\n /** @defaultValue `false` */\n grow?: boolean;\n\n /** @defaultValue `false` */\n sticky?: boolean;\n\n /** @defaultValue `false` */\n inputToggle?: boolean;\n\n hAlign?: TableCellHorizontalAlignment;\n vAlign?: TableCellVerticalAlignment;\n\n /** @defaultValue `true` */\n lineWrap?: boolean;\n\n /**\n * @defaultValue `\"horizontal\"`\n */\n padding?: \"horizontal\" | \"vertical\" | \"none\";\n}\n\n/**\n * @since 6.0.0\n */\nexport function tableCell(options: TableCellClassNameOptions): string {\n const {\n grow,\n sticky,\n header,\n inputToggle,\n hAlign,\n vAlign,\n lineWrap = true,\n padding = \"horizontal\",\n isInTableHeader,\n className,\n } = options;\n\n // using `&&` instead of `bem` since the latest version of typescript does not\n // support setting the same object key (empty string)\n const p = \"rmd-table-cell--\";\n return cnb(\n \"rmd-table-cell\",\n grow && `${p}grow`,\n header && `${p}header`,\n sticky && `${p}sticky`,\n inputToggle && `${p}input-toggle`,\n sticky && (!isInTableHeader || inputToggle) && `${p}sticky-cell`,\n sticky && isInTableHeader && `${p}sticky-header`,\n sticky && isInTableHeader && inputToggle && `${p}header-cell`,\n vAlign && vAlign !== \"middle\" && `${p}${vAlign}`,\n !lineWrap && `${p}no-wrap`,\n padding === \"vertical\" && `${p}v-padding`,\n padding === \"none\" && `${p}no-padding`,\n cssUtils({\n textAlign: hAlign,\n }),\n className\n );\n}\n"],"names":["cnb","cssUtils","tableCell","options","grow","sticky","header","inputToggle","hAlign","vAlign","lineWrap","padding","isInTableHeader","className","p","textAlign"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,QAAQ,QAAQ,iBAAiB;AA2C1C;;CAEC,GACD,OAAO,SAASC,UAAUC,OAAkC;IAC1D,MAAM,EACJC,IAAI,EACJC,MAAM,EACNC,MAAM,EACNC,WAAW,EACXC,MAAM,EACNC,MAAM,EACNC,WAAW,IAAI,EACfC,UAAU,YAAY,EACtBC,eAAe,EACfC,SAAS,EACV,GAAGV;IAEJ,8EAA8E;IAC9E,qDAAqD;IACrD,MAAMW,IAAI;IACV,OAAOd,IACL,kBACAI,QAAQ,CAAC,EAAEU,EAAE,IAAI,CAAC,EAClBR,UAAU,CAAC,EAAEQ,EAAE,MAAM,CAAC,EACtBT,UAAU,CAAC,EAAES,EAAE,MAAM,CAAC,EACtBP,eAAe,CAAC,EAAEO,EAAE,YAAY,CAAC,EACjCT,UAAW,CAAA,CAACO,mBAAmBL,WAAU,KAAM,CAAC,EAAEO,EAAE,WAAW,CAAC,EAChET,UAAUO,mBAAmB,CAAC,EAAEE,EAAE,aAAa,CAAC,EAChDT,UAAUO,mBAAmBL,eAAe,CAAC,EAAEO,EAAE,WAAW,CAAC,EAC7DL,UAAUA,WAAW,YAAY,CAAC,EAAEK,EAAE,EAAEL,OAAO,CAAC,EAChD,CAACC,YAAY,CAAC,EAAEI,EAAE,OAAO,CAAC,EAC1BH,YAAY,cAAc,CAAC,EAAEG,EAAE,SAAS,CAAC,EACzCH,YAAY,UAAU,CAAC,EAAEG,EAAE,UAAU,CAAC,EACtCb,SAAS;QACPc,WAAWP;IACb,IACAK;AAEJ"}
1
+ {"version":3,"sources":["../../src/table/tableCellStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport {\n type TableCellHorizontalAlignment,\n type TableCellVerticalAlignment,\n} from \"./types.js\";\n\n/** @since 6.0.0 */\nexport interface TableCellClassNameOptions {\n className?: string;\n\n /**\n * Set this to `true` if the cell is rendered as a `<th>` so that the correct\n * sticky styles can be applied.\n */\n header: boolean;\n\n /**\n * Set this to true if the cell is rendered in a `<thead>` so that the correct\n * sticky styles can be applied.\n */\n isInTableHeader: boolean;\n\n /** @defaultValue `false` */\n grow?: boolean;\n\n /** @defaultValue `false` */\n sticky?: boolean;\n\n /** @defaultValue `false` */\n inputToggle?: boolean;\n\n hAlign?: TableCellHorizontalAlignment;\n vAlign?: TableCellVerticalAlignment;\n\n /** @defaultValue `true` */\n lineWrap?: boolean;\n\n /**\n * @defaultValue `\"horizontal\"`\n */\n padding?: \"horizontal\" | \"vertical\" | \"none\";\n}\n\n/**\n * @since 6.0.0\n */\nexport function tableCell(options: TableCellClassNameOptions): string {\n const {\n grow,\n sticky,\n header,\n inputToggle,\n hAlign,\n vAlign,\n lineWrap = true,\n padding = \"horizontal\",\n isInTableHeader,\n className,\n } = options;\n\n // using `&&` instead of `bem` since the latest version of typescript does not\n // support setting the same object key (empty string)\n const p = \"rmd-table-cell--\";\n return cnb(\n \"rmd-table-cell\",\n grow && `${p}grow`,\n header && `${p}header`,\n sticky && `${p}sticky`,\n inputToggle && `${p}input-toggle`,\n sticky && (!isInTableHeader || inputToggle) && `${p}sticky-cell`,\n sticky && isInTableHeader && `${p}sticky-header`,\n sticky && isInTableHeader && inputToggle && `${p}header-cell`,\n vAlign && vAlign !== \"middle\" && `${p}${vAlign}`,\n !lineWrap && `${p}no-wrap`,\n padding === \"vertical\" && `${p}v-padding`,\n padding === \"none\" && `${p}no-padding`,\n cssUtils({\n textAlign: hAlign,\n }),\n className\n );\n}\n"],"names":["cnb","cssUtils","tableCell","options","grow","sticky","header","inputToggle","hAlign","vAlign","lineWrap","padding","isInTableHeader","className","p","textAlign"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,QAAQ,QAAQ,iBAAiB;AA2C1C;;CAEC,GACD,OAAO,SAASC,UAAUC,OAAkC;IAC1D,MAAM,EACJC,IAAI,EACJC,MAAM,EACNC,MAAM,EACNC,WAAW,EACXC,MAAM,EACNC,MAAM,EACNC,WAAW,IAAI,EACfC,UAAU,YAAY,EACtBC,eAAe,EACfC,SAAS,EACV,GAAGV;IAEJ,8EAA8E;IAC9E,qDAAqD;IACrD,MAAMW,IAAI;IACV,OAAOd,IACL,kBACAI,QAAQ,CAAC,EAAEU,EAAE,IAAI,CAAC,EAClBR,UAAU,CAAC,EAAEQ,EAAE,MAAM,CAAC,EACtBT,UAAU,CAAC,EAAES,EAAE,MAAM,CAAC,EACtBP,eAAe,CAAC,EAAEO,EAAE,YAAY,CAAC,EACjCT,UAAW,CAAA,CAACO,mBAAmBL,WAAU,KAAM,CAAC,EAAEO,EAAE,WAAW,CAAC,EAChET,UAAUO,mBAAmB,CAAC,EAAEE,EAAE,aAAa,CAAC,EAChDT,UAAUO,mBAAmBL,eAAe,CAAC,EAAEO,EAAE,WAAW,CAAC,EAC7DL,UAAUA,WAAW,YAAY,CAAC,EAAEK,EAAE,EAAEL,OAAO,CAAC,EAChD,CAACC,YAAY,CAAC,EAAEI,EAAE,OAAO,CAAC,EAC1BH,YAAY,cAAc,CAAC,EAAEG,EAAE,SAAS,CAAC,EACzCH,YAAY,UAAU,CAAC,EAAEG,EAAE,UAAU,CAAC,EACtCb,SAAS;QACPc,WAAWP;IACb,IACAK;AAEJ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/tableContainerStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\n\n/**\n * @since 6.0.0\n */\nexport interface TableContainerClassNameOptions {\n className?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport function tableContainer(\n options: TableContainerClassNameOptions = {}\n): string {\n const { className } = options;\n\n return cnb(\"rmd-table-container\", className);\n}\n"],"names":["cnb","tableContainer","options","className"],"rangeMappings":";;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAShC;;CAEC,GACD,OAAO,SAASC,eACdC,UAA0C,CAAC,CAAC;IAE5C,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,OAAOF,IAAI,uBAAuBG;AACpC"}
1
+ {"version":3,"sources":["../../src/table/tableContainerStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\n\n/**\n * @since 6.0.0\n */\nexport interface TableContainerClassNameOptions {\n className?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport function tableContainer(\n options: TableContainerClassNameOptions = {}\n): string {\n const { className } = options;\n\n return cnb(\"rmd-table-container\", className);\n}\n"],"names":["cnb","tableContainer","options","className"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAShC;;CAEC,GACD,OAAO,SAASC,eACdC,UAA0C,CAAC,CAAC;IAE5C,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,OAAOF,IAAI,uBAAuBG;AACpC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/tableFooterStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-tfoot\");\n\n/**\n * @since 6.0.0\n */\nexport interface TableFooterClassNameOptions {\n className?: string;\n sticky?: boolean;\n stickyActive?: boolean;\n stickyActiveClassName?: string;\n}\n\nexport function tableFooter(options: TableFooterClassNameOptions = {}): string {\n const { className, sticky, stickyActive, stickyActiveClassName } = options;\n\n return cnb(\n styles({\n sticky,\n \"sticky-active\": stickyActive,\n }),\n stickyActive && stickyActiveClassName,\n className\n );\n}\n"],"names":["cnb","bem","styles","tableFooter","options","className","sticky","stickyActive","stickyActiveClassName"],"rangeMappings":";;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAYnB,OAAO,SAASE,YAAYC,UAAuC,CAAC,CAAC;IACnE,MAAM,EAAEC,SAAS,EAAEC,MAAM,EAAEC,YAAY,EAAEC,qBAAqB,EAAE,GAAGJ;IAEnE,OAAOJ,IACLE,OAAO;QACLI;QACA,iBAAiBC;IACnB,IACAA,gBAAgBC,uBAChBH;AAEJ"}
1
+ {"version":3,"sources":["../../src/table/tableFooterStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-tfoot\");\n\n/**\n * @since 6.0.0\n */\nexport interface TableFooterClassNameOptions {\n className?: string;\n sticky?: boolean;\n stickyActive?: boolean;\n stickyActiveClassName?: string;\n}\n\nexport function tableFooter(options: TableFooterClassNameOptions = {}): string {\n const { className, sticky, stickyActive, stickyActiveClassName } = options;\n\n return cnb(\n styles({\n sticky,\n \"sticky-active\": stickyActive,\n }),\n stickyActive && stickyActiveClassName,\n className\n );\n}\n"],"names":["cnb","bem","styles","tableFooter","options","className","sticky","stickyActive","stickyActiveClassName"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAYnB,OAAO,SAASE,YAAYC,UAAuC,CAAC,CAAC;IACnE,MAAM,EAAEC,SAAS,EAAEC,MAAM,EAAEC,YAAY,EAAEC,qBAAqB,EAAE,GAAGJ;IAEnE,OAAOJ,IACLE,OAAO;QACLI;QACA,iBAAiBC;IACnB,IACAA,gBAAgBC,uBAChBH;AAEJ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/tableHeaderStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-thead\");\n\n/** @since 6.0.0 */\nexport interface TableHeaderClassNameOptions {\n className?: string;\n dense?: boolean;\n sticky?: boolean;\n stickyActive?: boolean;\n stickyActiveClassName?: string;\n}\n\n/** @since 6.0.0 */\nexport function tableHeader(options: TableHeaderClassNameOptions = {}): string {\n const { dense, sticky, stickyActive, stickyActiveClassName, className } =\n options;\n\n return cnb(\n styles({\n dense,\n sticky,\n \"sticky-active\": stickyActive,\n }),\n stickyActive && stickyActiveClassName,\n className\n );\n}\n"],"names":["cnb","bem","styles","tableHeader","options","dense","sticky","stickyActive","stickyActiveClassName","className"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAWnB,iBAAiB,GACjB,OAAO,SAASE,YAAYC,UAAuC,CAAC,CAAC;IACnE,MAAM,EAAEC,KAAK,EAAEC,MAAM,EAAEC,YAAY,EAAEC,qBAAqB,EAAEC,SAAS,EAAE,GACrEL;IAEF,OAAOJ,IACLE,OAAO;QACLG;QACAC;QACA,iBAAiBC;IACnB,IACAA,gBAAgBC,uBAChBC;AAEJ"}
1
+ {"version":3,"sources":["../../src/table/tableHeaderStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-thead\");\n\n/** @since 6.0.0 */\nexport interface TableHeaderClassNameOptions {\n className?: string;\n dense?: boolean;\n sticky?: boolean;\n stickyActive?: boolean;\n stickyActiveClassName?: string;\n}\n\n/** @since 6.0.0 */\nexport function tableHeader(options: TableHeaderClassNameOptions = {}): string {\n const { dense, sticky, stickyActive, stickyActiveClassName, className } =\n options;\n\n return cnb(\n styles({\n dense,\n sticky,\n \"sticky-active\": stickyActive,\n }),\n stickyActive && stickyActiveClassName,\n className\n );\n}\n"],"names":["cnb","bem","styles","tableHeader","options","dense","sticky","stickyActive","stickyActiveClassName","className"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAWnB,iBAAiB,GACjB,OAAO,SAASE,YAAYC,UAAuC,CAAC,CAAC;IACnE,MAAM,EAAEC,KAAK,EAAEC,MAAM,EAAEC,YAAY,EAAEC,qBAAqB,EAAEC,SAAS,EAAE,GACrEL;IAEF,OAAOJ,IACLE,OAAO;QACLG;QACAC;QACA,iBAAiBC;IACnB,IACAA,gBAAgBC,uBAChBC;AAEJ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/tableRowStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-tr\");\n\n/** @since 6.0.0 */\nexport interface TableRowClassNameOptions {\n className?: string;\n disableHover?: boolean;\n disableBorders?: boolean;\n selected?: boolean;\n clickable?: boolean;\n}\n\n/** @since 6.0.0 */\nexport function tableRow(options: TableRowClassNameOptions = {}): string {\n const { disableHover, disableBorders, selected, clickable, className } =\n options;\n return cnb(\n styles({\n bordered: !disableBorders,\n hoverable: !disableHover,\n clickable,\n selected,\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","tableRow","options","disableHover","disableBorders","selected","clickable","className","bordered","hoverable"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAWnB,iBAAiB,GACjB,OAAO,SAASE,SAASC,UAAoC,CAAC,CAAC;IAC7D,MAAM,EAAEC,YAAY,EAAEC,cAAc,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,SAAS,EAAE,GACpEL;IACF,OAAOJ,IACLE,OAAO;QACLQ,UAAU,CAACJ;QACXK,WAAW,CAACN;QACZG;QACAD;IACF,IACAE;AAEJ"}
1
+ {"version":3,"sources":["../../src/table/tableRowStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-tr\");\n\n/** @since 6.0.0 */\nexport interface TableRowClassNameOptions {\n className?: string;\n disableHover?: boolean;\n disableBorders?: boolean;\n selected?: boolean;\n clickable?: boolean;\n}\n\n/** @since 6.0.0 */\nexport function tableRow(options: TableRowClassNameOptions = {}): string {\n const { disableHover, disableBorders, selected, clickable, className } =\n options;\n return cnb(\n styles({\n bordered: !disableBorders,\n hoverable: !disableHover,\n clickable,\n selected,\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","tableRow","options","disableHover","disableBorders","selected","clickable","className","bordered","hoverable"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAWnB,iBAAiB,GACjB,OAAO,SAASE,SAASC,UAAoC,CAAC,CAAC;IAC7D,MAAM,EAAEC,YAAY,EAAEC,cAAc,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,SAAS,EAAE,GACpEL;IACF,OAAOJ,IACLE,OAAO;QACLQ,UAAU,CAACJ;QACXK,WAAW,CAACN;QACZG;QACAD;IACF,IACAE;AAEJ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/tableStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-table\");\n\n/** @since 6.0.0 */\nexport interface TableClassNameOptions {\n className?: string;\n\n /** @defaultValue `false` */\n dense?: boolean;\n\n /** @defaultValue `false` */\n fullWidth?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function table(options: TableClassNameOptions = {}): string {\n const { dense = false, fullWidth = false, className } = options;\n\n return cnb(styles({ dense, \"full-width\": fullWidth }), className);\n}\n"],"names":["cnb","bem","styles","table","options","dense","fullWidth","className"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAanB;;CAEC,GACD,OAAO,SAASE,MAAMC,UAAiC,CAAC,CAAC;IACvD,MAAM,EAAEC,QAAQ,KAAK,EAAEC,YAAY,KAAK,EAAEC,SAAS,EAAE,GAAGH;IAExD,OAAOJ,IAAIE,OAAO;QAAEG;QAAO,cAAcC;IAAU,IAAIC;AACzD"}
1
+ {"version":3,"sources":["../../src/table/tableStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-table\");\n\n/** @since 6.0.0 */\nexport interface TableClassNameOptions {\n className?: string;\n\n /** @defaultValue `false` */\n dense?: boolean;\n\n /** @defaultValue `false` */\n fullWidth?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function table(options: TableClassNameOptions = {}): string {\n const { dense = false, fullWidth = false, className } = options;\n\n return cnb(styles({ dense, \"full-width\": fullWidth }), className);\n}\n"],"names":["cnb","bem","styles","table","options","dense","fullWidth","className"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAanB;;CAEC,GACD,OAAO,SAASE,MAAMC,UAAiC,CAAC,CAAC;IACvD,MAAM,EAAEC,QAAQ,KAAK,EAAEC,YAAY,KAAK,EAAEC,SAAS,EAAE,GAAGH;IAExD,OAAOJ,IAAIE,OAAO;QAAEG;QAAO,cAAcC;IAAU,IAAIC;AACzD"}
@@ -1,6 +1,80 @@
1
- import type { IntersectionObserverHookOptions } from "../useIntersectionObserver.js";
1
+ import { type IntersectionObserverHookOptions } from "../useIntersectionObserver.js";
2
+ export type SortOrder = "ascending" | "descending" | "none" | "other";
3
+ export interface TableRowConfiguration {
4
+ /**
5
+ * Set to `true` if rows should no longer change background color while
6
+ * hovered.
7
+ *
8
+ * @defaultValue `false`
9
+ */
10
+ disableHover?: boolean;
11
+ /**
12
+ * Set to `true` if the rows in the `TableBody` should no longer have borders
13
+ * applied.
14
+ *
15
+ * @defaultValue `false`
16
+ */
17
+ disableBorders?: boolean;
18
+ }
19
+ /**
20
+ * The horizontal alignment for the content within a cell.
21
+ *
22
+ * Note: Table default behavior is to align to the left.
23
+ */
24
+ export type TableCellHorizontalAlignment = "left" | "center" | "right";
25
+ /**
26
+ * The vertical alignment for the content within a cell.
27
+ *
28
+ * Note: When this is set to `"top"` or `"bottom"`, `padding-top` or
29
+ * `padding-bottom` will also be applied due to how styling tables work.
30
+ */
31
+ export type TableCellVerticalAlignment = "top" | "middle" | "bottom";
32
+ export interface TableCellConfiguration {
33
+ hAlign?: TableCellHorizontalAlignment;
34
+ vAlign?: TableCellVerticalAlignment;
35
+ /**
36
+ * Set this to `true` to allow `TableCell` content to line wrap.
37
+ *
38
+ * @defaultValue `false`
39
+ */
40
+ lineWrap?: boolean;
41
+ }
42
+ /**
43
+ * @internal
44
+ */
45
+ export interface TableCellConfig extends TableCellConfiguration {
46
+ /**
47
+ * Boolean if all the `TableCell` components should be rendered as a `<th>`
48
+ * instead of a `<td>`. This is really just a convenience prop for the
49
+ * `TableHeader` component so the user of `react-md` doesn't need to keep
50
+ * setting the `type="th"` fot the `TableCell` if using the low-level
51
+ * components.
52
+ *
53
+ * @internal
54
+ */
55
+ header?: boolean;
56
+ }
57
+ export interface TableConfig extends TableRowConfiguration, TableCellConfig {
58
+ /**
59
+ * Set this to `true` to decrease the height of all cells within the table.
60
+ *
61
+ * @defaultValue `false`
62
+ */
63
+ dense?: boolean;
64
+ }
65
+ export interface TableConfiguration extends TableConfig {
66
+ /**
67
+ * Set this to `true` to allow the table to span the full width of the
68
+ * container element instead of having the width be determined by the content
69
+ * within the table.
70
+ *
71
+ * @defaultValue `false`
72
+ */
73
+ fullWidth?: boolean;
74
+ }
75
+ export type TableConfigContext = Required<TableConfig>;
2
76
  /** @since 6.0.0 */
3
- export type TableStickySectionOptions = Pick<IntersectionObserverHookOptions<HTMLTableSectionElement>, "disabled" | "getThreshold" | "getRootMargin">;
77
+ export type TableStickySectionIntersectionObserverOptions = Pick<IntersectionObserverHookOptions<HTMLTableSectionElement>, "disabled" | "getThreshold" | "getRootMargin">;
4
78
  /**
5
79
  * This **should be wrapped in `useCallback`** to increase performance.
6
80
  *
@@ -15,17 +89,13 @@ export type TableStickySectionOptions = Pick<IntersectionObserverHookOptions<HTM
15
89
  * viewport.
16
90
  * - Note: This really only works with `px` and `rem` units.
17
91
  *
18
- * @see {@link TableStickySectionProps.stickyOptions} for an example usage with custom threshold and
92
+ * @see {@link TableStickySectionConfiguration.stickyOptions} for an example usage with custom threshold and
19
93
  * margin.
20
94
  * @since 6.0.0
21
95
  */
22
96
  export type IsStickyTableSectionActive = (entry: IntersectionObserverEntry, isInTableContainer: boolean) => boolean;
23
97
  /** @since 6.0.0 */
24
- export interface TableStickySectionProps {
25
- /**
26
- * @defaultValue `false`
27
- */
28
- sticky?: boolean;
98
+ export interface TableStickySectionConfiguration {
29
99
  /**
30
100
  * This can be used when the {@link sticky} prop is set to `true` for
31
101
  * additional behavior around the "active" state for sticky headers.
@@ -58,7 +128,7 @@ export interface TableStickySectionProps {
58
128
  * @since 6.0.0
59
129
  * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API}
60
130
  */
61
- stickyOptions?: TableStickySectionOptions;
131
+ stickyOptions?: TableStickySectionIntersectionObserverOptions;
62
132
  /**
63
133
  * An optional className to use when the sticky section is covering other rows
64
134
  * (`active`). When this is defined, the default
@@ -84,3 +154,13 @@ export interface TableStickySectionProps {
84
154
  */
85
155
  disableStickyStyles?: boolean;
86
156
  }
157
+ /** @since 6.0.0 */
158
+ export interface TableSectionConfiguration {
159
+ /** @see {@link TableCellConfiguration.lineWrap} */
160
+ lineWrap?: boolean;
161
+ /**
162
+ * @see {@link TableRowConfiguration.disableHover}
163
+ * @defaultValue `false`
164
+ */
165
+ hoverable?: boolean;
166
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/types.ts"],"sourcesContent":["import type { IntersectionObserverHookOptions } from \"../useIntersectionObserver.js\";\n\n/** @since 6.0.0 */\nexport type TableStickySectionOptions = Pick<\n IntersectionObserverHookOptions<HTMLTableSectionElement>,\n \"disabled\" | \"getThreshold\" | \"getRootMargin\"\n>;\n\n/**\n * This **should be wrapped in `useCallback`** to increase performance.\n *\n * The default behavior is to enable the \"active\" state for sticky headers is:\n *\n * - if the `TableHeader` is within a `TableContainer`, add a hidden `<tbody>`\n * after the `<thead>` and enable the active state once 1px overlaps with\n * the container.\n * - otherwise, assume the `TableHeader` is fixed within the viewport and\n * parse the `top` CSS style as `px`. enable the active state once 1px\n * overlaps with this value AND the `TableHeader` exists within the\n * viewport.\n * - Note: This really only works with `px` and `rem` units.\n *\n * @see {@link TableStickySectionProps.stickyOptions} for an example usage with custom threshold and\n * margin.\n * @since 6.0.0\n */\nexport type IsStickyTableSectionActive = (\n entry: IntersectionObserverEntry,\n isInTableContainer: boolean\n) => boolean;\n\n/** @since 6.0.0 */\nexport interface TableStickySectionProps {\n /**\n * @defaultValue `false`\n */\n sticky?: boolean;\n\n /**\n * This can be used when the {@link sticky} prop is set to `true` for\n * additional behavior around the \"active\" state for sticky headers.\n *\n * @example Disabling Sticky Active State\n * ```ts\n * stickyOptions={{\n * disabled: true,\n * }}\n * ```\n *\n * @example Custom Options\n * ```ts\n * stickyOptions={{\n * getThreshold: useCallback(() => {\n * // you can access the DOM safely from here\n * return [0, 0.25, 0.5, 1];\n * }, []),\n * getRootMargin: useCallback(() => {\n * // you can access the DOM safely from here\n * return \"-1px 0px 150px 0px\";\n * }, []),\n * }}\n * isStickyActive={useCallback((entry) => {\n * // whatever custom logic you want. you can access the DOM safely from here\n * return entry.isIntersecting;\n * }, [])}\n * ```\n *\n * @since 6.0.0\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API}\n */\n stickyOptions?: TableStickySectionOptions;\n\n /**\n * An optional className to use when the sticky section is covering other rows\n * (`active`). When this is defined, the default\n * `rmd-thead--sticky-active`/`rmd-tfoot--sticky-active` will no longer be\n * applied.\n */\n stickyActiveClassName?: string;\n\n /**\n * @see {@link IsStickyTableSectionActive} for a description.\n * @see {@link stickyOptions} for an example usage with custom threshold and\n * margin.\n * @since 6.0.0\n */\n isStickyActive?: IsStickyTableSectionActive;\n\n /**\n * Set this to `true` when the {@link sticky} prop is `true` to disable the\n * behavior of adding an additional className when the sticky mode is active.\n *\n * The `TableHeader` would gain the `.rmd-thead--sticky-active` class while\n * the `TableFooter` would gain the `.rmd-tfoot--sticky-active` class.\n *\n * @defaultValue `false`\n */\n disableStickyStyles?: boolean;\n}\n"],"names":[],"rangeMappings":"","mappings":"AA+BA,iBAAiB,GACjB,WAkEC"}
1
+ {"version":3,"sources":["../../src/table/types.ts"],"sourcesContent":["import { type IntersectionObserverHookOptions } from \"../useIntersectionObserver.js\";\n\nexport type SortOrder = \"ascending\" | \"descending\" | \"none\" | \"other\";\n\n// interfaces that are \"public\" should be the full word `Configuration` while\n// the private/internal should just be `Config`. \"Great\" naming convention!\n\nexport interface TableRowConfiguration {\n /**\n * Set to `true` if rows should no longer change background color while\n * hovered.\n *\n * @defaultValue `false`\n */\n disableHover?: boolean;\n\n /**\n * Set to `true` if the rows in the `TableBody` should no longer have borders\n * applied.\n *\n * @defaultValue `false`\n */\n disableBorders?: boolean;\n}\n\n/**\n * The horizontal alignment for the content within a cell.\n *\n * Note: Table default behavior is to align to the left.\n */\nexport type TableCellHorizontalAlignment = \"left\" | \"center\" | \"right\";\n\n/**\n * The vertical alignment for the content within a cell.\n *\n * Note: When this is set to `\"top\"` or `\"bottom\"`, `padding-top` or\n * `padding-bottom` will also be applied due to how styling tables work.\n */\nexport type TableCellVerticalAlignment = \"top\" | \"middle\" | \"bottom\";\n\nexport interface TableCellConfiguration {\n hAlign?: TableCellHorizontalAlignment;\n vAlign?: TableCellVerticalAlignment;\n\n /**\n * Set this to `true` to allow `TableCell` content to line wrap.\n *\n * @defaultValue `false`\n */\n lineWrap?: boolean;\n}\n\n/**\n * @internal\n */\nexport interface TableCellConfig extends TableCellConfiguration {\n /**\n * Boolean if all the `TableCell` components should be rendered as a `<th>`\n * instead of a `<td>`. This is really just a convenience prop for the\n * `TableHeader` component so the user of `react-md` doesn't need to keep\n * setting the `type=\"th\"` fot the `TableCell` if using the low-level\n * components.\n *\n * @internal\n */\n header?: boolean;\n}\n\nexport interface TableConfig extends TableRowConfiguration, TableCellConfig {\n /**\n * Set this to `true` to decrease the height of all cells within the table.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n}\n\nexport interface TableConfiguration extends TableConfig {\n /**\n * Set this to `true` to allow the table to span the full width of the\n * container element instead of having the width be determined by the content\n * within the table.\n *\n * @defaultValue `false`\n */\n fullWidth?: boolean;\n}\n\nexport type TableConfigContext = Required<TableConfig>;\n\n/** @since 6.0.0 */\nexport type TableStickySectionIntersectionObserverOptions = Pick<\n IntersectionObserverHookOptions<HTMLTableSectionElement>,\n \"disabled\" | \"getThreshold\" | \"getRootMargin\"\n>;\n\n/**\n * This **should be wrapped in `useCallback`** to increase performance.\n *\n * The default behavior is to enable the \"active\" state for sticky headers is:\n *\n * - if the `TableHeader` is within a `TableContainer`, add a hidden `<tbody>`\n * after the `<thead>` and enable the active state once 1px overlaps with\n * the container.\n * - otherwise, assume the `TableHeader` is fixed within the viewport and\n * parse the `top` CSS style as `px`. enable the active state once 1px\n * overlaps with this value AND the `TableHeader` exists within the\n * viewport.\n * - Note: This really only works with `px` and `rem` units.\n *\n * @see {@link TableStickySectionConfiguration.stickyOptions} for an example usage with custom threshold and\n * margin.\n * @since 6.0.0\n */\nexport type IsStickyTableSectionActive = (\n entry: IntersectionObserverEntry,\n isInTableContainer: boolean\n) => boolean;\n\n/** @since 6.0.0 */\nexport interface TableStickySectionConfiguration {\n /**\n * This can be used when the {@link sticky} prop is set to `true` for\n * additional behavior around the \"active\" state for sticky headers.\n *\n * @example Disabling Sticky Active State\n * ```ts\n * stickyOptions={{\n * disabled: true,\n * }}\n * ```\n *\n * @example Custom Options\n * ```ts\n * stickyOptions={{\n * getThreshold: useCallback(() => {\n * // you can access the DOM safely from here\n * return [0, 0.25, 0.5, 1];\n * }, []),\n * getRootMargin: useCallback(() => {\n * // you can access the DOM safely from here\n * return \"-1px 0px 150px 0px\";\n * }, []),\n * }}\n * isStickyActive={useCallback((entry) => {\n * // whatever custom logic you want. you can access the DOM safely from here\n * return entry.isIntersecting;\n * }, [])}\n * ```\n *\n * @since 6.0.0\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API}\n */\n stickyOptions?: TableStickySectionIntersectionObserverOptions;\n\n /**\n * An optional className to use when the sticky section is covering other rows\n * (`active`). When this is defined, the default\n * `rmd-thead--sticky-active`/`rmd-tfoot--sticky-active` will no longer be\n * applied.\n */\n stickyActiveClassName?: string;\n\n /**\n * @see {@link IsStickyTableSectionActive} for a description.\n * @see {@link stickyOptions} for an example usage with custom threshold and\n * margin.\n * @since 6.0.0\n */\n isStickyActive?: IsStickyTableSectionActive;\n\n /**\n * Set this to `true` when the {@link sticky} prop is `true` to disable the\n * behavior of adding an additional className when the sticky mode is active.\n *\n * The `TableHeader` would gain the `.rmd-thead--sticky-active` class while\n * the `TableFooter` would gain the `.rmd-tfoot--sticky-active` class.\n *\n * @defaultValue `false`\n */\n disableStickyStyles?: boolean;\n}\n\n/** @since 6.0.0 */\nexport interface TableSectionConfiguration {\n /** @see {@link TableCellConfiguration.lineWrap} */\n lineWrap?: boolean;\n\n /**\n * @see {@link TableRowConfiguration.disableHover}\n * @defaultValue `false`\n */\n hoverable?: boolean;\n}\n"],"names":[],"mappings":"AAuLA,iBAAiB,GACjB,WASC"}
@@ -0,0 +1,27 @@
1
+ import { type ReactNode, type Ref, type RefCallback } from "react";
2
+ import { type IsStickyTableSectionActive, type TableStickySectionConfiguration } from "./types.js";
3
+ /**
4
+ * @since 6.0.0
5
+ */
6
+ export declare const isTableHeaderStickyActive: IsStickyTableSectionActive;
7
+ /**
8
+ * @since 6.0.0
9
+ */
10
+ export declare const isTableFooterStickyActive: IsStickyTableSectionActive;
11
+ /** @since 6.0.0 */
12
+ export interface TableStickySectionOptions extends TableStickySectionConfiguration {
13
+ ref?: Ref<HTMLTableSectionElement>;
14
+ type: "header" | "footer";
15
+ }
16
+ /** @since 6.0.0 */
17
+ export interface TableStickySectionImplementation {
18
+ tbody: ReactNode;
19
+ targetRef: RefCallback<HTMLTableSectionElement>;
20
+ sectionRef: RefCallback<HTMLTableSectionElement>;
21
+ stickyActive: boolean;
22
+ }
23
+ /**
24
+ * @since 6.0.0
25
+ * @internal
26
+ */
27
+ export declare function useStickyTableSection(options: TableStickySectionOptions): TableStickySectionImplementation;
@@ -0,0 +1,84 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useCallback, useState } from "react";
4
+ import { useEnsuredRef } from "../useEnsuredRef.js";
5
+ import { useIntersectionObserver } from "../useIntersectionObserver.js";
6
+ import { useTableContainer } from "./TableContainerProvider.js";
7
+ /**
8
+ * @since 6.0.0
9
+ */ export const isTableHeaderStickyActive = (entry)=>{
10
+ return entry.intersectionRatio < 1 && entry.boundingClientRect.bottom <= window.innerHeight;
11
+ };
12
+ /**
13
+ * @since 6.0.0
14
+ */ export const isTableFooterStickyActive = (entry, isInTableContainer)=>{
15
+ const { intersectionRatio, boundingClientRect, isIntersecting } = entry;
16
+ if (isInTableContainer) {
17
+ return !isIntersecting;
18
+ }
19
+ return intersectionRatio < 1 && boundingClientRect.top >= 0;
20
+ };
21
+ /**
22
+ * @since 6.0.0
23
+ * @internal
24
+ */ export function useStickyTableSection(options) {
25
+ const { ref, type, disableStickyStyles, stickyOptions } = options;
26
+ const isHeader = type === "header";
27
+ const isStickyActive = options.isStickyActive ?? (isHeader ? isTableHeaderStickyActive : isTableFooterStickyActive);
28
+ const [sectionRef, sectionRefCallback] = useEnsuredRef(ref);
29
+ const { exists, containerRef } = useTableContainer();
30
+ const [stickyActive, setStickyActive] = useState(false);
31
+ const targetRef = useIntersectionObserver({
32
+ ref: exists ? undefined : sectionRefCallback,
33
+ root: containerRef,
34
+ disabled: disableStickyStyles,
35
+ threshold: exists ? 0 : 1,
36
+ getRootMargin: useCallback(()=>{
37
+ const section = sectionRef.current;
38
+ if (!isHeader) {
39
+ const topOffset = exists && section ? section.offsetHeight - 1 : 1;
40
+ return `0px 0px -${topOffset}px 0px`;
41
+ }
42
+ if (!section) {
43
+ return;
44
+ }
45
+ let topOffset;
46
+ if (exists) {
47
+ topOffset = section.offsetHeight - 1;
48
+ } else {
49
+ const top = parseFloat(window.getComputedStyle(section).top);
50
+ topOffset = Number.isNaN(top) ? 1 : top + 1;
51
+ }
52
+ return `-${topOffset}px 0px 0px`;
53
+ }, [
54
+ exists,
55
+ isHeader,
56
+ sectionRef
57
+ ]),
58
+ onUpdate: useCallback(([entry])=>{
59
+ setStickyActive(isStickyActive(entry, exists));
60
+ }, [
61
+ exists,
62
+ isStickyActive
63
+ ]),
64
+ // allow the user defined sticky options to override the default behavior
65
+ ...stickyOptions
66
+ });
67
+ let tbody;
68
+ if (exists && !disableStickyStyles) {
69
+ // rendering a `<tbody>` since it is valid to have 0-many in a table
70
+ // https://html.spec.whatwg.org/multipage/tables.html#the-table-element
71
+ tbody = /*#__PURE__*/ _jsx("tbody", {
72
+ "aria-hidden": true,
73
+ ref: targetRef
74
+ });
75
+ }
76
+ return {
77
+ tbody,
78
+ targetRef,
79
+ sectionRef: exists ? sectionRefCallback : targetRef,
80
+ stickyActive
81
+ };
82
+ }
83
+
84
+ //# sourceMappingURL=useStickyTableSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/table/useStickyTableSection.tsx"],"sourcesContent":["\"use client\";\nimport {\n useCallback,\n useState,\n type ReactNode,\n type Ref,\n type RefCallback,\n} from \"react\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport { useIntersectionObserver } from \"../useIntersectionObserver.js\";\nimport { useTableContainer } from \"./TableContainerProvider.js\";\nimport {\n type IsStickyTableSectionActive,\n type TableStickySectionConfiguration,\n} from \"./types.js\";\n\n/**\n * @since 6.0.0\n */\nexport const isTableHeaderStickyActive: IsStickyTableSectionActive = (\n entry\n) => {\n return (\n entry.intersectionRatio < 1 &&\n entry.boundingClientRect.bottom <= window.innerHeight\n );\n};\n\n/**\n * @since 6.0.0\n */\nexport const isTableFooterStickyActive: IsStickyTableSectionActive = (\n entry,\n isInTableContainer\n) => {\n const { intersectionRatio, boundingClientRect, isIntersecting } = entry;\n if (isInTableContainer) {\n return !isIntersecting;\n }\n\n return intersectionRatio < 1 && boundingClientRect.top >= 0;\n};\n\n/** @since 6.0.0 */\nexport interface TableStickySectionOptions\n extends TableStickySectionConfiguration {\n ref?: Ref<HTMLTableSectionElement>;\n type: \"header\" | \"footer\";\n}\n\n/** @since 6.0.0 */\nexport interface TableStickySectionImplementation {\n tbody: ReactNode;\n targetRef: RefCallback<HTMLTableSectionElement>;\n sectionRef: RefCallback<HTMLTableSectionElement>;\n stickyActive: boolean;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport function useStickyTableSection(\n options: TableStickySectionOptions\n): TableStickySectionImplementation {\n const { ref, type, disableStickyStyles, stickyOptions } = options;\n\n const isHeader = type === \"header\";\n const isStickyActive =\n options.isStickyActive ??\n (isHeader ? isTableHeaderStickyActive : isTableFooterStickyActive);\n\n const [sectionRef, sectionRefCallback] = useEnsuredRef(ref);\n const { exists, containerRef } = useTableContainer();\n const [stickyActive, setStickyActive] = useState(false);\n const targetRef = useIntersectionObserver({\n ref: exists ? undefined : sectionRefCallback,\n root: containerRef,\n disabled: disableStickyStyles,\n threshold: exists ? 0 : 1,\n getRootMargin: useCallback(() => {\n const section = sectionRef.current;\n if (!isHeader) {\n const topOffset = exists && section ? section.offsetHeight - 1 : 1;\n\n return `0px 0px -${topOffset}px 0px`;\n }\n\n if (!section) {\n return;\n }\n\n let topOffset: number;\n if (exists) {\n topOffset = section.offsetHeight - 1;\n } else {\n const top = parseFloat(window.getComputedStyle(section).top);\n topOffset = Number.isNaN(top) ? 1 : top + 1;\n }\n\n return `-${topOffset}px 0px 0px`;\n }, [exists, isHeader, sectionRef]),\n onUpdate: useCallback(\n ([entry]) => {\n setStickyActive(isStickyActive(entry, exists));\n },\n [exists, isStickyActive]\n ),\n // allow the user defined sticky options to override the default behavior\n ...stickyOptions,\n });\n\n let tbody: ReactNode;\n if (exists && !disableStickyStyles) {\n // rendering a `<tbody>` since it is valid to have 0-many in a table\n // https://html.spec.whatwg.org/multipage/tables.html#the-table-element\n tbody = <tbody aria-hidden ref={targetRef} />;\n }\n\n return {\n tbody,\n targetRef,\n sectionRef: exists ? sectionRefCallback : targetRef,\n stickyActive,\n };\n}\n"],"names":["useCallback","useState","useEnsuredRef","useIntersectionObserver","useTableContainer","isTableHeaderStickyActive","entry","intersectionRatio","boundingClientRect","bottom","window","innerHeight","isTableFooterStickyActive","isInTableContainer","isIntersecting","top","useStickyTableSection","options","ref","type","disableStickyStyles","stickyOptions","isHeader","isStickyActive","sectionRef","sectionRefCallback","exists","containerRef","stickyActive","setStickyActive","targetRef","undefined","root","disabled","threshold","getRootMargin","section","current","topOffset","offsetHeight","parseFloat","getComputedStyle","Number","isNaN","onUpdate","tbody","aria-hidden"],"mappings":"AAAA;;AACA,SACEA,WAAW,EACXC,QAAQ,QAIH,QAAQ;AACf,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,uBAAuB,QAAQ,gCAAgC;AACxE,SAASC,iBAAiB,QAAQ,8BAA8B;AAMhE;;CAEC,GACD,OAAO,MAAMC,4BAAwD,CACnEC;IAEA,OACEA,MAAMC,iBAAiB,GAAG,KAC1BD,MAAME,kBAAkB,CAACC,MAAM,IAAIC,OAAOC,WAAW;AAEzD,EAAE;AAEF;;CAEC,GACD,OAAO,MAAMC,4BAAwD,CACnEN,OACAO;IAEA,MAAM,EAAEN,iBAAiB,EAAEC,kBAAkB,EAAEM,cAAc,EAAE,GAAGR;IAClE,IAAIO,oBAAoB;QACtB,OAAO,CAACC;IACV;IAEA,OAAOP,oBAAoB,KAAKC,mBAAmBO,GAAG,IAAI;AAC5D,EAAE;AAiBF;;;CAGC,GACD,OAAO,SAASC,sBACdC,OAAkC;IAElC,MAAM,EAAEC,GAAG,EAAEC,IAAI,EAAEC,mBAAmB,EAAEC,aAAa,EAAE,GAAGJ;IAE1D,MAAMK,WAAWH,SAAS;IAC1B,MAAMI,iBACJN,QAAQM,cAAc,IACrBD,CAAAA,WAAWjB,4BAA4BO,yBAAwB;IAElE,MAAM,CAACY,YAAYC,mBAAmB,GAAGvB,cAAcgB;IACvD,MAAM,EAAEQ,MAAM,EAAEC,YAAY,EAAE,GAAGvB;IACjC,MAAM,CAACwB,cAAcC,gBAAgB,GAAG5B,SAAS;IACjD,MAAM6B,YAAY3B,wBAAwB;QACxCe,KAAKQ,SAASK,YAAYN;QAC1BO,MAAML;QACNM,UAAUb;QACVc,WAAWR,SAAS,IAAI;QACxBS,eAAenC,YAAY;YACzB,MAAMoC,UAAUZ,WAAWa,OAAO;YAClC,IAAI,CAACf,UAAU;gBACb,MAAMgB,YAAYZ,UAAUU,UAAUA,QAAQG,YAAY,GAAG,IAAI;gBAEjE,OAAO,CAAC,SAAS,EAAED,UAAU,MAAM,CAAC;YACtC;YAEA,IAAI,CAACF,SAAS;gBACZ;YACF;YAEA,IAAIE;YACJ,IAAIZ,QAAQ;gBACVY,YAAYF,QAAQG,YAAY,GAAG;YACrC,OAAO;gBACL,MAAMxB,MAAMyB,WAAW9B,OAAO+B,gBAAgB,CAACL,SAASrB,GAAG;gBAC3DuB,YAAYI,OAAOC,KAAK,CAAC5B,OAAO,IAAIA,MAAM;YAC5C;YAEA,OAAO,CAAC,CAAC,EAAEuB,UAAU,UAAU,CAAC;QAClC,GAAG;YAACZ;YAAQJ;YAAUE;SAAW;QACjCoB,UAAU5C,YACR,CAAC,CAACM,MAAM;YACNuB,gBAAgBN,eAAejB,OAAOoB;QACxC,GACA;YAACA;YAAQH;SAAe;QAE1B,yEAAyE;QACzE,GAAGF,aAAa;IAClB;IAEA,IAAIwB;IACJ,IAAInB,UAAU,CAACN,qBAAqB;QAClC,oEAAoE;QACpE,uEAAuE;QACvEyB,sBAAQ,KAACA;YAAMC,aAAW;YAAC5B,KAAKY;;IAClC;IAEA,OAAO;QACLe;QACAf;QACAN,YAAYE,SAASD,qBAAqBK;QAC1CF;IACF;AACF"}
@@ -0,0 +1,13 @@
1
+ import { type TableConfigContext, type TableSectionConfiguration } from "./types.js";
2
+ /**
3
+ * @since 6.0.0
4
+ * @internal
5
+ */
6
+ export interface TableSectionConfigOptions extends TableSectionConfiguration {
7
+ type: "header" | "footer";
8
+ }
9
+ /**
10
+ * @since 6.0.0
11
+ * @internal
12
+ */
13
+ export declare function useTableSectionConfig(options: TableSectionConfigOptions): Readonly<TableConfigContext>;
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ import { useMemo } from "react";
3
+ import { useTableConfig } from "./TableConfigurationProvider.js";
4
+ /**
5
+ * @since 6.0.0
6
+ * @internal
7
+ */ export function useTableSectionConfig(options) {
8
+ const { type, lineWrap: propLineWrap, hoverable } = options;
9
+ // update the table configuration with the custom overrides for the `<thead>/<tfoot>`
10
+ const { dense, hAlign, vAlign, lineWrap, disableHover, disableBorders } = useTableConfig({
11
+ lineWrap: propLineWrap,
12
+ disableHover: !hoverable
13
+ });
14
+ return useMemo(()=>({
15
+ dense,
16
+ header: type === "header",
17
+ hAlign,
18
+ vAlign,
19
+ lineWrap,
20
+ disableBorders,
21
+ disableHover
22
+ }), [
23
+ dense,
24
+ type,
25
+ hAlign,
26
+ vAlign,
27
+ lineWrap,
28
+ disableBorders,
29
+ disableHover
30
+ ]);
31
+ }
32
+
33
+ //# sourceMappingURL=useTableSectionConfig.js.map