@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,5 +1,5 @@
1
1
  import { type TableHTMLAttributes } from "react";
2
- import { type TableConfiguration } from "./TableConfigurationProvider.js";
2
+ import { type TableConfiguration } from "./types.js";
3
3
  declare module "react" {
4
4
  interface CSSProperties {
5
5
  "--rmd-table-background-color"?: string;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/Table.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, useMemo, type TableHTMLAttributes } from \"react\";\nimport {\n TableConfigProvider,\n type TableConfigContext,\n type TableConfiguration,\n} from \"./TableConfigurationProvider.js\";\nimport { table } from \"./tableStyles.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-table-background-color\"?: string;\n \"--rmd-table-border-size\"?: string | number;\n \"--rmd-table-border-color\"?: string;\n \"--rmd-table-header-background-color\"?: string;\n \"--rmd-table-cell-color\"?: string;\n \"--rmd-table-cell-height\"?: string | number;\n \"--rmd-table-cell-horizontal-padding\"?: string | number;\n \"--rmd-table-cell-vertical-padding\"?: string | number;\n \"--rmd-table-header-cell-height\"?: string | number;\n \"--rmd-table-hover-color\"?: string;\n \"--rmd-table-selected-color\"?: string;\n \"--rmd-table-sticky-cell\"?: string | number;\n \"--rmd-table-sticky-header\"?: string | number;\n \"--rmd-table-sticky-footer\"?: string | number;\n \"--rmd-table-sticky-background-color\"?: string;\n }\n}\n\nexport interface TableProps\n extends TableHTMLAttributes<HTMLTableElement>,\n TableConfiguration {}\n\n/**\n * **Client Component**\n *\n * @example Responsive Example\n * ```tsx\n * import {\n * Table,\n * TableBody,\n * TableCell,\n * TableContainer,\n * TableHeader,\n * TableRow,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <TableContainer>\n * <Table>\n * <TableHeader>\n * <TableRow>\n * <TableCell>Header 1</TableCell>\n * <TableCell>Header 2</TableCell>\n * <TableCell>Header 3</TableCell>\n * </TableRow>\n * </TableHeader>\n * <TableBody>\n * <TableRow>\n * <TableCell>Row 1 Cell 1</TableCell>\n * <TableCell>Row 1 Cell 2</TableCell>\n * <TableCell>Row 1 Cell 3</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Row 2 Cell 1</TableCell>\n * <TableCell>Row 2 Cell 2</TableCell>\n * <TableCell>Row 2 Cell 3</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Row 3 Cell 1</TableCell>\n * <TableCell>Row 3 Cell 2</TableCell>\n * <TableCell>Row 3 Cell 3</TableCell>\n * </TableRow>\n * </TableBody>\n * </Table>\n * </TableContainer>\n * );\n * }\n * ```\n */\nexport const Table = forwardRef<HTMLTableElement, TableProps>(\n function Table(props, ref) {\n const {\n className,\n children,\n dense = false,\n hAlign = \"left\",\n vAlign = \"middle\",\n lineWrap = false,\n fullWidth = false,\n disableHover = false,\n disableBorders = false,\n ...remaining\n } = props;\n\n const configuration = useMemo<TableConfigContext>(\n () => ({\n dense,\n header: false,\n hAlign,\n vAlign,\n lineWrap,\n disableHover,\n disableBorders,\n }),\n [dense, hAlign, vAlign, lineWrap, disableHover, disableBorders]\n );\n\n return (\n <TableConfigProvider value={configuration}>\n <table\n {...remaining}\n ref={ref}\n className={table({ dense, fullWidth, className })}\n >\n {children}\n </table>\n </TableConfigProvider>\n );\n }\n);\n"],"names":["forwardRef","useMemo","TableConfigProvider","table","Table","props","ref","className","children","dense","hAlign","vAlign","lineWrap","fullWidth","disableHover","disableBorders","remaining","configuration","header","value"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AACA,SAASA,UAAU,EAAEC,OAAO,QAAkC,QAAQ;AACtE,SACEC,mBAAmB,QAGd,kCAAkC;AACzC,SAASC,KAAK,QAAQ,mBAAmB;AA0BzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDC,GACD,OAAO,MAAMC,sBAAQJ,WACnB,SAASI,MAAMC,KAAK,EAAEC,GAAG;IACvB,MAAM,EACJC,SAAS,EACTC,QAAQ,EACRC,QAAQ,KAAK,EACbC,SAAS,MAAM,EACfC,SAAS,QAAQ,EACjBC,WAAW,KAAK,EAChBC,YAAY,KAAK,EACjBC,eAAe,KAAK,EACpBC,iBAAiB,KAAK,EACtB,GAAGC,WACJ,GAAGX;IAEJ,MAAMY,gBAAgBhB,QACpB,IAAO,CAAA;YACLQ;YACAS,QAAQ;YACRR;YACAC;YACAC;YACAE;YACAC;QACF,CAAA,GACA;QAACN;QAAOC;QAAQC;QAAQC;QAAUE;QAAcC;KAAe;IAGjE,qBACE,KAACb;QAAoBiB,OAAOF;kBAC1B,cAAA,KAACd;YACE,GAAGa,SAAS;YACbV,KAAKA;YACLC,WAAWJ,MAAM;gBAAEM;gBAAOI;gBAAWN;YAAU;sBAE9CC;;;AAIT,GACA"}
1
+ {"version":3,"sources":["../../src/table/Table.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, useMemo, type TableHTMLAttributes } from \"react\";\nimport { TableConfigProvider } from \"./TableConfigurationProvider.js\";\nimport { table } from \"./tableStyles.js\";\nimport { type TableConfigContext, type TableConfiguration } from \"./types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-table-background-color\"?: string;\n \"--rmd-table-border-size\"?: string | number;\n \"--rmd-table-border-color\"?: string;\n \"--rmd-table-header-background-color\"?: string;\n \"--rmd-table-cell-color\"?: string;\n \"--rmd-table-cell-height\"?: string | number;\n \"--rmd-table-cell-horizontal-padding\"?: string | number;\n \"--rmd-table-cell-vertical-padding\"?: string | number;\n \"--rmd-table-header-cell-height\"?: string | number;\n \"--rmd-table-hover-color\"?: string;\n \"--rmd-table-selected-color\"?: string;\n \"--rmd-table-sticky-cell\"?: string | number;\n \"--rmd-table-sticky-header\"?: string | number;\n \"--rmd-table-sticky-footer\"?: string | number;\n \"--rmd-table-sticky-background-color\"?: string;\n }\n}\n\nexport interface TableProps\n extends TableHTMLAttributes<HTMLTableElement>,\n TableConfiguration {}\n\n/**\n * **Client Component**\n *\n * @example Responsive Example\n * ```tsx\n * import {\n * Table,\n * TableBody,\n * TableCell,\n * TableContainer,\n * TableHeader,\n * TableRow,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <TableContainer>\n * <Table>\n * <TableHeader>\n * <TableRow>\n * <TableCell>Header 1</TableCell>\n * <TableCell>Header 2</TableCell>\n * <TableCell>Header 3</TableCell>\n * </TableRow>\n * </TableHeader>\n * <TableBody>\n * <TableRow>\n * <TableCell>Row 1 Cell 1</TableCell>\n * <TableCell>Row 1 Cell 2</TableCell>\n * <TableCell>Row 1 Cell 3</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Row 2 Cell 1</TableCell>\n * <TableCell>Row 2 Cell 2</TableCell>\n * <TableCell>Row 2 Cell 3</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Row 3 Cell 1</TableCell>\n * <TableCell>Row 3 Cell 2</TableCell>\n * <TableCell>Row 3 Cell 3</TableCell>\n * </TableRow>\n * </TableBody>\n * </Table>\n * </TableContainer>\n * );\n * }\n * ```\n */\nexport const Table = forwardRef<HTMLTableElement, TableProps>(\n function Table(props, ref) {\n const {\n className,\n children,\n dense = false,\n hAlign = \"left\",\n vAlign = \"middle\",\n lineWrap = false,\n fullWidth = false,\n disableHover = false,\n disableBorders = false,\n ...remaining\n } = props;\n\n const configuration = useMemo<TableConfigContext>(\n () => ({\n dense,\n header: false,\n hAlign,\n vAlign,\n lineWrap,\n disableHover,\n disableBorders,\n }),\n [dense, hAlign, vAlign, lineWrap, disableHover, disableBorders]\n );\n\n return (\n <TableConfigProvider value={configuration}>\n <table\n {...remaining}\n ref={ref}\n className={table({ dense, fullWidth, className })}\n >\n {children}\n </table>\n </TableConfigProvider>\n );\n }\n);\n"],"names":["forwardRef","useMemo","TableConfigProvider","table","Table","props","ref","className","children","dense","hAlign","vAlign","lineWrap","fullWidth","disableHover","disableBorders","remaining","configuration","header","value"],"mappings":"AAAA;;AACA,SAASA,UAAU,EAAEC,OAAO,QAAkC,QAAQ;AACtE,SAASC,mBAAmB,QAAQ,kCAAkC;AACtE,SAASC,KAAK,QAAQ,mBAAmB;AA2BzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDC,GACD,OAAO,MAAMC,sBAAQJ,WACnB,SAASI,MAAMC,KAAK,EAAEC,GAAG;IACvB,MAAM,EACJC,SAAS,EACTC,QAAQ,EACRC,QAAQ,KAAK,EACbC,SAAS,MAAM,EACfC,SAAS,QAAQ,EACjBC,WAAW,KAAK,EAChBC,YAAY,KAAK,EACjBC,eAAe,KAAK,EACpBC,iBAAiB,KAAK,EACtB,GAAGC,WACJ,GAAGX;IAEJ,MAAMY,gBAAgBhB,QACpB,IAAO,CAAA;YACLQ;YACAS,QAAQ;YACRR;YACAC;YACAC;YACAE;YACAC;QACF,CAAA,GACA;QAACN;QAAOC;QAAQC;QAAQC;QAAUE;QAAcC;KAAe;IAGjE,qBACE,KAACb;QAAoBiB,OAAOF;kBAC1B,cAAA,KAACd;YACE,GAAGa,SAAS;YACbV,KAAKA;YACLC,WAAWJ,MAAM;gBAAEM;gBAAOI;gBAAWN;YAAU;sBAE9CC;;;AAIT,GACA"}
@@ -1,5 +1,5 @@
1
1
  import { type HTMLAttributes } from "react";
2
- import { type TableConfig } from "./TableConfigurationProvider.js";
2
+ import { type TableConfig } from "./types.js";
3
3
  export interface TableBodyProps extends HTMLAttributes<HTMLTableSectionElement>, Omit<TableConfig, "header"> {
4
4
  }
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/TableBody.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, useMemo, type HTMLAttributes } from \"react\";\nimport {\n TableConfigProvider,\n useTableConfig,\n type TableConfig,\n type TableConfigContext,\n} from \"./TableConfigurationProvider.js\";\n\nexport interface TableBodyProps\n extends HTMLAttributes<HTMLTableSectionElement>,\n Omit<TableConfig, \"header\"> {}\n\n/**\n * **Client Component**\n *\n * Creates a `<tbody>` element that also allows for overriding all the child\n * `TableCell` components with additional styling behavior.\n */\nexport const TableBody = forwardRef<HTMLTableSectionElement, TableBodyProps>(\n function TableBody(props, ref) {\n const {\n className,\n children,\n hAlign: propHAlign,\n vAlign: propVAlign,\n lineWrap: propLineWrap,\n disableHover: propDisableHover,\n disableBorders: propDisableBorders,\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 hAlign: propHAlign,\n vAlign: propVAlign,\n lineWrap: propLineWrap,\n disableHover: propDisableHover,\n disableBorders: propDisableBorders,\n });\n\n const configuration = useMemo<TableConfigContext>(\n () => ({\n header: false,\n dense,\n hAlign,\n vAlign,\n lineWrap,\n disableBorders,\n disableHover,\n }),\n [dense, hAlign, vAlign, lineWrap, disableBorders, disableHover]\n );\n\n return (\n <TableConfigProvider value={configuration}>\n <tbody {...remaining} ref={ref} className={cnb(\"rmd-tbody\", className)}>\n {children}\n </tbody>\n </TableConfigProvider>\n );\n }\n);\n"],"names":["cnb","forwardRef","useMemo","TableConfigProvider","useTableConfig","TableBody","props","ref","className","children","hAlign","propHAlign","vAlign","propVAlign","lineWrap","propLineWrap","disableHover","propDisableHover","disableBorders","propDisableBorders","remaining","dense","configuration","header","value","tbody"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,EAAEC,OAAO,QAA6B,QAAQ;AACjE,SACEC,mBAAmB,EACnBC,cAAc,QAGT,kCAAkC;AAMzC;;;;;CAKC,GACD,OAAO,MAAMC,0BAAYJ,WACvB,SAASI,UAAUC,KAAK,EAAEC,GAAG;IAC3B,MAAM,EACJC,SAAS,EACTC,QAAQ,EACRC,QAAQC,UAAU,EAClBC,QAAQC,UAAU,EAClBC,UAAUC,YAAY,EACtBC,cAAcC,gBAAgB,EAC9BC,gBAAgBC,kBAAkB,EAClC,GAAGC,WACJ,GAAGd;IAEJ,6EAA6E;IAC7E,MAAM,EAAEe,KAAK,EAAEX,MAAM,EAAEE,MAAM,EAAEE,QAAQ,EAAEE,YAAY,EAAEE,cAAc,EAAE,GACrEd,eAAe;QACbM,QAAQC;QACRC,QAAQC;QACRC,UAAUC;QACVC,cAAcC;QACdC,gBAAgBC;IAClB;IAEF,MAAMG,gBAAgBpB,QACpB,IAAO,CAAA;YACLqB,QAAQ;YACRF;YACAX;YACAE;YACAE;YACAI;YACAF;QACF,CAAA,GACA;QAACK;QAAOX;QAAQE;QAAQE;QAAUI;QAAgBF;KAAa;IAGjE,qBACE,KAACb;QAAoBqB,OAAOF;kBAC1B,cAAA,KAACG;YAAO,GAAGL,SAAS;YAAEb,KAAKA;YAAKC,WAAWR,IAAI,aAAaQ;sBACzDC;;;AAIT,GACA"}
1
+ {"version":3,"sources":["../../src/table/TableBody.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, useMemo, type HTMLAttributes } from \"react\";\nimport {\n TableConfigProvider,\n useTableConfig,\n} from \"./TableConfigurationProvider.js\";\nimport { type TableConfig, type TableConfigContext } from \"./types.js\";\n\nexport interface TableBodyProps\n extends HTMLAttributes<HTMLTableSectionElement>,\n Omit<TableConfig, \"header\"> {}\n\n/**\n * **Client Component**\n *\n * Creates a `<tbody>` element that also allows for overriding all the child\n * `TableCell` components with additional styling behavior.\n */\nexport const TableBody = forwardRef<HTMLTableSectionElement, TableBodyProps>(\n function TableBody(props, ref) {\n const {\n className,\n children,\n hAlign: propHAlign,\n vAlign: propVAlign,\n lineWrap: propLineWrap,\n disableHover: propDisableHover,\n disableBorders: propDisableBorders,\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 hAlign: propHAlign,\n vAlign: propVAlign,\n lineWrap: propLineWrap,\n disableHover: propDisableHover,\n disableBorders: propDisableBorders,\n });\n\n const configuration = useMemo<TableConfigContext>(\n () => ({\n header: false,\n dense,\n hAlign,\n vAlign,\n lineWrap,\n disableBorders,\n disableHover,\n }),\n [dense, hAlign, vAlign, lineWrap, disableBorders, disableHover]\n );\n\n return (\n <TableConfigProvider value={configuration}>\n <tbody {...remaining} ref={ref} className={cnb(\"rmd-tbody\", className)}>\n {children}\n </tbody>\n </TableConfigProvider>\n );\n }\n);\n"],"names":["cnb","forwardRef","useMemo","TableConfigProvider","useTableConfig","TableBody","props","ref","className","children","hAlign","propHAlign","vAlign","propVAlign","lineWrap","propLineWrap","disableHover","propDisableHover","disableBorders","propDisableBorders","remaining","dense","configuration","header","value","tbody"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,EAAEC,OAAO,QAA6B,QAAQ;AACjE,SACEC,mBAAmB,EACnBC,cAAc,QACT,kCAAkC;AAOzC;;;;;CAKC,GACD,OAAO,MAAMC,0BAAYJ,WACvB,SAASI,UAAUC,KAAK,EAAEC,GAAG;IAC3B,MAAM,EACJC,SAAS,EACTC,QAAQ,EACRC,QAAQC,UAAU,EAClBC,QAAQC,UAAU,EAClBC,UAAUC,YAAY,EACtBC,cAAcC,gBAAgB,EAC9BC,gBAAgBC,kBAAkB,EAClC,GAAGC,WACJ,GAAGd;IAEJ,6EAA6E;IAC7E,MAAM,EAAEe,KAAK,EAAEX,MAAM,EAAEE,MAAM,EAAEE,QAAQ,EAAEE,YAAY,EAAEE,cAAc,EAAE,GACrEd,eAAe;QACbM,QAAQC;QACRC,QAAQC;QACRC,UAAUC;QACVC,cAAcC;QACdC,gBAAgBC;IAClB;IAEF,MAAMG,gBAAgBpB,QACpB,IAAO,CAAA;YACLqB,QAAQ;YACRF;YACAX;YACAE;YACAE;YACAI;YACAF;QACF,CAAA,GACA;QAACK;QAAOX;QAAQE;QAAQE;QAAUI;QAAgBF;KAAa;IAGjE,qBACE,KAACb;QAAoBqB,OAAOF;kBAC1B,cAAA,KAACG;YAAO,GAAGL,SAAS;YAAEb,KAAKA;YAAKC,WAAWR,IAAI,aAAaQ;sBACzDC;;;AAIT,GACA"}
@@ -1,7 +1,7 @@
1
1
  import { type ButtonHTMLAttributes, type ReactNode, type TdHTMLAttributes, type ThHTMLAttributes } from "react";
2
2
  import { type PropsWithRef } from "../types.js";
3
- import { type SortOrder, type TableCellContentsIconRotatorProps } from "./TableCellContent.js";
4
- import { type TableCellConfig } from "./TableConfigurationProvider.js";
3
+ import { type TableCellContentsIconRotatorProps } from "./TableCellContent.js";
4
+ import { type SortOrder, type TableCellConfig } from "./types.js";
5
5
  export type TableCellAttributes = Omit<TdHTMLAttributes<HTMLTableCellElement> | ThHTMLAttributes<HTMLTableCellElement>, "scope">;
6
6
  /**
7
7
  * @since 6.0.0
@@ -41,6 +41,7 @@ export interface TableCellOptions extends TableCellConfig {
41
41
  /**
42
42
  * @since 6.0.0 Removed the `colSpan="100%"` support since `colSpan`
43
43
  * really only supports numbers.
44
+ * @since 6.0.0 Removed `disablePadding` in favor of `padding`.
44
45
  */
45
46
  export interface TableCellProps extends TableCellAttributes, TableCellOptions {
46
47
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/TableCell.tsx"],"sourcesContent":["\"use client\";\nimport {\n forwardRef,\n type ButtonHTMLAttributes,\n type ReactNode,\n type TdHTMLAttributes,\n type ThHTMLAttributes,\n} from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport {\n TableCellContent,\n type SortOrder,\n type TableCellContentsIconRotatorProps,\n} from \"./TableCellContent.js\";\nimport {\n useTableConfig,\n type TableCellConfig,\n} from \"./TableConfigurationProvider.js\";\nimport { tableCell } from \"./tableCellStyles.js\";\n\nexport type TableCellAttributes = Omit<\n | TdHTMLAttributes<HTMLTableCellElement>\n | ThHTMLAttributes<HTMLTableCellElement>,\n \"scope\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport interface TableCellOptions extends TableCellConfig {\n /**\n * This is a bit of a \"weird\" prop since all it does is apply `width: 100%` to\n * this cell. This will make this specific cell fill the remaining width of\n * the table (if there is any). If no cells have this prop enabled and the\n * `fullWidth` table configuration is enabled, all cells will have an\n * equal-sized width.\n *\n * @defaultValue `false`\n */\n grow?: boolean;\n\n /**\n * This prop is only valid when the `header` prop is enabled or the\n * `TableCell` is a child of the `TableHeader` component. This will generally\n * be used with a value of `\"row\"` if you have table headers that are at the\n * start of each row instead of at the top of the table.\n *\n * @defaultValue `\"col\"`\n */\n scope?: \"row\" | \"col\" | \"rowgroup\" | \"colgroup\";\n\n /**\n *\n * @defaultValue `false`\n * @since 6.0.0 This prop is only a boolean.\n */\n sticky?: boolean;\n\n /**\n * @internal\n * @defaultValue `false`\n */\n inputToggle?: boolean;\n}\n\n/**\n * @since 6.0.0 Removed the `colSpan=\"100%\"` support since `colSpan`\n * really only supports numbers.\n */\nexport interface TableCellProps extends TableCellAttributes, TableCellOptions {\n /**\n * If you want to apply a sort icon for a header cell, set this prop to either\n * `\"ascending\"` or `\"descending\"`. When you change the sort order, this prop\n * should change as well which will cause the sort icon to rotate. The default\n * behavior is to have the icon facing upwards and not-rotated when\n * `\"ascending\"`, otherwise it will rotate downwards when `\"descending\"`.\n *\n * If this prop is set to `\"none\"`, the cell will render the clickable button\n * in the children, just without the sort icon. This is so that the sort\n * behavior can still be toggled for keyboard users and will be tab-focusable.\n *\n * @see {@link beforeChildren}\n * @see {@link afterChildren}\n */\n \"aria-sort\"?: SortOrder;\n\n /**\n * An optional sort icon to use. This will be defaulted to the configured sort\n * icon from the `@react-md/core` package. If you do not want the default\n * implementation for the sort icon behavior from `react-md`, you can set this\n * prop to `null`.\n */\n sortIcon?: ReactNode;\n\n /**\n * Boolean if the sort icon should appear after the children in the cell\n * instead of before.\n */\n sortIconAfter?: boolean;\n\n /**\n * Boolean if the sort icon should be rotated instead of the default\n * direction. When this is `undefined`, it will only be `true` when the\n * `\"aria-sort\"` prop is set to `\"descending\"`. If this is not `undefined`,\n * its boolean value will always be used.\n */\n sortIconRotated?: boolean;\n\n /**\n * @defaultValue `\"horizontal\"`\n */\n padding?: \"horizontal\" | \"vertical\" | \"none\";\n\n /**\n * This can be used to apply styling or any other props to the\n * `UnstyledButton` that surrounds the `children` when the `\"aria-sort\"` prop\n * has been provided.\n *\n * @since 6.0.0\n */\n contentProps?: PropsWithRef<\n ButtonHTMLAttributes<HTMLButtonElement>,\n HTMLButtonElement\n >;\n\n /**\n * Any additional props to pass to the `IconRotator` when the `aria-sort` prop\n * has been provided.\n *\n * @since 6.0.0\n */\n iconRotatorProps?: TableCellContentsIconRotatorProps;\n\n /**\n * Since providing an `aria-sort` prop will wrap the `children` in an\n * `UnstyledButton`, you can use this prop to render another button within the\n * table cell before the main `children`.\n *\n * @see {@link afterChildren} for an example.\n * @since 6.0.0\n */\n beforeChildren?: ReactNode;\n\n /**\n * Since providing an `aria-sort` prop will wrap the `children` in an\n * `UnstyledButton`, you can use this prop to render another button within the\n * table cell before the main `children`.\n *\n * @example\n * ```tsx\n * import type { SortOrder } from \"@react-md/core\";\n * import { Button, Dialog, TableCell } from \"@react-md/core\";\n * import MoreVertIcon from \"@react-md/material-icons/MoreVertIcon\";\n * import type { ReactElement } from \"react\";\n * import { useState } from \"react\";\n *\n * interface Props {\n * setSort(sort: string): void;\n * sortKey: string;\n * sortOrder: SortOrder;\n * }\n *\n * function Example({ sortKey, sortOrder, setSort }: Props): ReactElement {\n * const [visible, setVisible] = useState(false);\n *\n * return (\n * <>\n * <TableCell\n * aria-sort={sortKey === \"example\" ? sortOrder : \"none\"}\n * onClick={() => setSort(\"example\")}\n * afterChildren={\n * <Button\n * aria-label=\"Options\"\n * buttonType=\"icon\"\n * onClick={() => {\n * setVisible(true)\n * }}\n * >\n * <MoreVertIcon />\n * </Button>\n * }\n * >\n * Example content\n * </TableCell>\n * <Dialog\n * aria-label=\"Options\"\n * visible={visible}\n * onRequestClose={() => setVisible(false)}\n * >\n * Pretend Content...\n * </Dialog>\n * </>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\n afterChildren?: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * Creates a `<th>` or `<td>` cell with sensible styled defaults. You can create\n * a `<th>` element by enabling the `header` prop OR having a `TableCell` as a\n * child of the `TableHeader` component.\n *\n * Note: If you have a checkbox/radio column in the `TableHeader` without any\n * labels, you will need to manually set the `header={false}` prop for that cell\n * since it is invalid to have a `<th>` without any readable content for screen\n * readers.\n */\nexport const TableCell = forwardRef<HTMLTableCellElement, TableCellProps>(\n function TableCell(props, ref) {\n const {\n \"aria-sort\": sortOrder,\n className,\n grow = false,\n scope: propScope,\n hAlign: propHAlign,\n vAlign: propVAlign,\n header: propHeader,\n lineWrap: propDisableLineWrap,\n inputToggle,\n children,\n beforeChildren,\n afterChildren,\n sticky,\n sortIcon: propSortIcon,\n sortIconAfter = false,\n sortIconRotated,\n iconRotatorProps,\n padding = \"horizontal\",\n contentProps,\n ...remaining\n } = props;\n\n const sortIcon = getIcon(\"sort\", propSortIcon);\n\n // Note: unlike the other usages of `useTableConfig`, the `propHeader`\n // is not provided. This is so that `TableCheckbox` components can still\n // be a sticky header without being rendered as a `<th>`. This also makes\n // it so the scope can be defaulted to `col` or `row` automatically.\n const {\n header: inheritedHeader,\n hAlign,\n vAlign,\n lineWrap,\n } = useTableConfig({\n hAlign: propHAlign,\n vAlign: propVAlign,\n lineWrap: propDisableLineWrap,\n });\n const header = propHeader ?? inheritedHeader;\n\n let scope = propScope;\n if (!scope && header) {\n scope = !inheritedHeader && propHeader ? \"row\" : \"col\";\n }\n\n const Component = header ? \"th\" : \"td\";\n return (\n <Component\n {...remaining}\n ref={ref}\n aria-sort={sortOrder === \"none\" ? undefined : sortOrder}\n className={tableCell({\n className,\n grow,\n header,\n sticky,\n inputToggle,\n hAlign,\n vAlign,\n lineWrap: !sortOrder && lineWrap,\n padding: sortIcon && sortOrder ? \"none\" : padding,\n isInTableHeader: inheritedHeader,\n })}\n scope={scope}\n >\n {beforeChildren}\n <TableCellContent\n {...contentProps}\n icon={sortIcon}\n iconAfter={sortIconAfter}\n iconRotatorProps={iconRotatorProps}\n sortOrder={sortOrder}\n hAlign={hAlign}\n rotated={sortIconRotated}\n >\n {children}\n </TableCellContent>\n {afterChildren}\n </Component>\n );\n }\n);\n"],"names":["forwardRef","getIcon","TableCellContent","useTableConfig","tableCell","TableCell","props","ref","sortOrder","className","grow","scope","propScope","hAlign","propHAlign","vAlign","propVAlign","header","propHeader","lineWrap","propDisableLineWrap","inputToggle","children","beforeChildren","afterChildren","sticky","sortIcon","propSortIcon","sortIconAfter","sortIconRotated","iconRotatorProps","padding","contentProps","remaining","inheritedHeader","Component","aria-sort","undefined","isInTableHeader","icon","iconAfter","rotated"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AACA,SACEA,UAAU,QAKL,QAAQ;AACf,SAASC,OAAO,QAAQ,wBAAwB;AAEhD,SACEC,gBAAgB,QAGX,wBAAwB;AAC/B,SACEC,cAAc,QAET,kCAAkC;AACzC,SAASC,SAAS,QAAQ,uBAAuB;AAuLjD;;;;;;;;;;;CAWC,GACD,OAAO,MAAMC,0BAAYL,WACvB,SAASK,UAAUC,KAAK,EAAEC,GAAG;IAC3B,MAAM,EACJ,aAAaC,SAAS,EACtBC,SAAS,EACTC,OAAO,KAAK,EACZC,OAAOC,SAAS,EAChBC,QAAQC,UAAU,EAClBC,QAAQC,UAAU,EAClBC,QAAQC,UAAU,EAClBC,UAAUC,mBAAmB,EAC7BC,WAAW,EACXC,QAAQ,EACRC,cAAc,EACdC,aAAa,EACbC,MAAM,EACNC,UAAUC,YAAY,EACtBC,gBAAgB,KAAK,EACrBC,eAAe,EACfC,gBAAgB,EAChBC,UAAU,YAAY,EACtBC,YAAY,EACZ,GAAGC,WACJ,GAAG3B;IAEJ,MAAMoB,WAAWzB,QAAQ,QAAQ0B;IAEjC,sEAAsE;IACtE,wEAAwE;IACxE,yEAAyE;IACzE,oEAAoE;IACpE,MAAM,EACJV,QAAQiB,eAAe,EACvBrB,MAAM,EACNE,MAAM,EACNI,QAAQ,EACT,GAAGhB,eAAe;QACjBU,QAAQC;QACRC,QAAQC;QACRG,UAAUC;IACZ;IACA,MAAMH,SAASC,cAAcgB;IAE7B,IAAIvB,QAAQC;IACZ,IAAI,CAACD,SAASM,QAAQ;QACpBN,QAAQ,CAACuB,mBAAmBhB,aAAa,QAAQ;IACnD;IAEA,MAAMiB,YAAYlB,SAAS,OAAO;IAClC,qBACE,MAACkB;QACE,GAAGF,SAAS;QACb1B,KAAKA;QACL6B,aAAW5B,cAAc,SAAS6B,YAAY7B;QAC9CC,WAAWL,UAAU;YACnBK;YACAC;YACAO;YACAQ;YACAJ;YACAR;YACAE;YACAI,UAAU,CAACX,aAAaW;YACxBY,SAASL,YAAYlB,YAAY,SAASuB;YAC1CO,iBAAiBJ;QACnB;QACAvB,OAAOA;;YAENY;0BACD,KAACrB;gBACE,GAAG8B,YAAY;gBAChBO,MAAMb;gBACNc,WAAWZ;gBACXE,kBAAkBA;gBAClBtB,WAAWA;gBACXK,QAAQA;gBACR4B,SAASZ;0BAERP;;YAEFE;;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/table/TableCell.tsx"],"sourcesContent":["\"use client\";\nimport {\n forwardRef,\n type ButtonHTMLAttributes,\n type ReactNode,\n type TdHTMLAttributes,\n type ThHTMLAttributes,\n} from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport {\n TableCellContent,\n type TableCellContentsIconRotatorProps,\n} from \"./TableCellContent.js\";\nimport { useTableConfig } from \"./TableConfigurationProvider.js\";\nimport { tableCell } from \"./tableCellStyles.js\";\nimport { type SortOrder, type TableCellConfig } from \"./types.js\";\n\nexport type TableCellAttributes = Omit<\n | TdHTMLAttributes<HTMLTableCellElement>\n | ThHTMLAttributes<HTMLTableCellElement>,\n \"scope\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport interface TableCellOptions extends TableCellConfig {\n /**\n * This is a bit of a \"weird\" prop since all it does is apply `width: 100%` to\n * this cell. This will make this specific cell fill the remaining width of\n * the table (if there is any). If no cells have this prop enabled and the\n * `fullWidth` table configuration is enabled, all cells will have an\n * equal-sized width.\n *\n * @defaultValue `false`\n */\n grow?: boolean;\n\n /**\n * This prop is only valid when the `header` prop is enabled or the\n * `TableCell` is a child of the `TableHeader` component. This will generally\n * be used with a value of `\"row\"` if you have table headers that are at the\n * start of each row instead of at the top of the table.\n *\n * @defaultValue `\"col\"`\n */\n scope?: \"row\" | \"col\" | \"rowgroup\" | \"colgroup\";\n\n /**\n *\n * @defaultValue `false`\n * @since 6.0.0 This prop is only a boolean.\n */\n sticky?: boolean;\n\n /**\n * @internal\n * @defaultValue `false`\n */\n inputToggle?: boolean;\n}\n\n/**\n * @since 6.0.0 Removed the `colSpan=\"100%\"` support since `colSpan`\n * really only supports numbers.\n * @since 6.0.0 Removed `disablePadding` in favor of `padding`.\n */\nexport interface TableCellProps extends TableCellAttributes, TableCellOptions {\n /**\n * If you want to apply a sort icon for a header cell, set this prop to either\n * `\"ascending\"` or `\"descending\"`. When you change the sort order, this prop\n * should change as well which will cause the sort icon to rotate. The default\n * behavior is to have the icon facing upwards and not-rotated when\n * `\"ascending\"`, otherwise it will rotate downwards when `\"descending\"`.\n *\n * If this prop is set to `\"none\"`, the cell will render the clickable button\n * in the children, just without the sort icon. This is so that the sort\n * behavior can still be toggled for keyboard users and will be tab-focusable.\n *\n * @see {@link beforeChildren}\n * @see {@link afterChildren}\n */\n \"aria-sort\"?: SortOrder;\n\n /**\n * An optional sort icon to use. This will be defaulted to the configured sort\n * icon from the `@react-md/core` package. If you do not want the default\n * implementation for the sort icon behavior from `react-md`, you can set this\n * prop to `null`.\n */\n sortIcon?: ReactNode;\n\n /**\n * Boolean if the sort icon should appear after the children in the cell\n * instead of before.\n */\n sortIconAfter?: boolean;\n\n /**\n * Boolean if the sort icon should be rotated instead of the default\n * direction. When this is `undefined`, it will only be `true` when the\n * `\"aria-sort\"` prop is set to `\"descending\"`. If this is not `undefined`,\n * its boolean value will always be used.\n */\n sortIconRotated?: boolean;\n\n /**\n * @defaultValue `\"horizontal\"`\n */\n padding?: \"horizontal\" | \"vertical\" | \"none\";\n\n /**\n * This can be used to apply styling or any other props to the\n * `UnstyledButton` that surrounds the `children` when the `\"aria-sort\"` prop\n * has been provided.\n *\n * @since 6.0.0\n */\n contentProps?: PropsWithRef<\n ButtonHTMLAttributes<HTMLButtonElement>,\n HTMLButtonElement\n >;\n\n /**\n * Any additional props to pass to the `IconRotator` when the `aria-sort` prop\n * has been provided.\n *\n * @since 6.0.0\n */\n iconRotatorProps?: TableCellContentsIconRotatorProps;\n\n /**\n * Since providing an `aria-sort` prop will wrap the `children` in an\n * `UnstyledButton`, you can use this prop to render another button within the\n * table cell before the main `children`.\n *\n * @see {@link afterChildren} for an example.\n * @since 6.0.0\n */\n beforeChildren?: ReactNode;\n\n /**\n * Since providing an `aria-sort` prop will wrap the `children` in an\n * `UnstyledButton`, you can use this prop to render another button within the\n * table cell before the main `children`.\n *\n * @example\n * ```tsx\n * import type { SortOrder } from \"@react-md/core\";\n * import { Button, Dialog, TableCell } from \"@react-md/core\";\n * import MoreVertIcon from \"@react-md/material-icons/MoreVertIcon\";\n * import type { ReactElement } from \"react\";\n * import { useState } from \"react\";\n *\n * interface Props {\n * setSort(sort: string): void;\n * sortKey: string;\n * sortOrder: SortOrder;\n * }\n *\n * function Example({ sortKey, sortOrder, setSort }: Props): ReactElement {\n * const [visible, setVisible] = useState(false);\n *\n * return (\n * <>\n * <TableCell\n * aria-sort={sortKey === \"example\" ? sortOrder : \"none\"}\n * onClick={() => setSort(\"example\")}\n * afterChildren={\n * <Button\n * aria-label=\"Options\"\n * buttonType=\"icon\"\n * onClick={() => {\n * setVisible(true)\n * }}\n * >\n * <MoreVertIcon />\n * </Button>\n * }\n * >\n * Example content\n * </TableCell>\n * <Dialog\n * aria-label=\"Options\"\n * visible={visible}\n * onRequestClose={() => setVisible(false)}\n * >\n * Pretend Content...\n * </Dialog>\n * </>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\n afterChildren?: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * Creates a `<th>` or `<td>` cell with sensible styled defaults. You can create\n * a `<th>` element by enabling the `header` prop OR having a `TableCell` as a\n * child of the `TableHeader` component.\n *\n * Note: If you have a checkbox/radio column in the `TableHeader` without any\n * labels, you will need to manually set the `header={false}` prop for that cell\n * since it is invalid to have a `<th>` without any readable content for screen\n * readers.\n */\nexport const TableCell = forwardRef<HTMLTableCellElement, TableCellProps>(\n function TableCell(props, ref) {\n const {\n \"aria-sort\": sortOrder,\n className,\n grow = false,\n scope: propScope,\n hAlign: propHAlign,\n vAlign: propVAlign,\n header: propHeader,\n lineWrap: propDisableLineWrap,\n inputToggle,\n children,\n beforeChildren,\n afterChildren,\n sticky,\n sortIcon: propSortIcon,\n sortIconAfter = false,\n sortIconRotated,\n iconRotatorProps,\n padding = \"horizontal\",\n contentProps,\n ...remaining\n } = props;\n\n const sortIcon = getIcon(\"sort\", propSortIcon);\n\n // Note: unlike the other usages of `useTableConfig`, the `propHeader`\n // is not provided. This is so that `TableCheckbox` components can still\n // be a sticky header without being rendered as a `<th>`. This also makes\n // it so the scope can be defaulted to `col` or `row` automatically.\n const {\n header: inheritedHeader,\n hAlign,\n vAlign,\n lineWrap,\n } = useTableConfig({\n hAlign: propHAlign,\n vAlign: propVAlign,\n lineWrap: propDisableLineWrap,\n });\n const header = propHeader ?? inheritedHeader;\n\n let scope = propScope;\n if (!scope && header) {\n scope = !inheritedHeader && propHeader ? \"row\" : \"col\";\n }\n\n const Component = header ? \"th\" : \"td\";\n return (\n <Component\n {...remaining}\n ref={ref}\n aria-sort={sortOrder === \"none\" ? undefined : sortOrder}\n className={tableCell({\n className,\n grow,\n header,\n sticky,\n inputToggle,\n hAlign,\n vAlign,\n lineWrap: !sortOrder && lineWrap,\n padding: sortIcon && sortOrder ? \"none\" : padding,\n isInTableHeader: inheritedHeader,\n })}\n scope={scope}\n >\n {beforeChildren}\n <TableCellContent\n {...contentProps}\n icon={sortIcon}\n iconAfter={sortIconAfter}\n iconRotatorProps={iconRotatorProps}\n sortOrder={sortOrder}\n hAlign={hAlign}\n rotated={sortIconRotated}\n >\n {children}\n </TableCellContent>\n {afterChildren}\n </Component>\n );\n }\n);\n"],"names":["forwardRef","getIcon","TableCellContent","useTableConfig","tableCell","TableCell","props","ref","sortOrder","className","grow","scope","propScope","hAlign","propHAlign","vAlign","propVAlign","header","propHeader","lineWrap","propDisableLineWrap","inputToggle","children","beforeChildren","afterChildren","sticky","sortIcon","propSortIcon","sortIconAfter","sortIconRotated","iconRotatorProps","padding","contentProps","remaining","inheritedHeader","Component","aria-sort","undefined","isInTableHeader","icon","iconAfter","rotated"],"mappings":"AAAA;;AACA,SACEA,UAAU,QAKL,QAAQ;AACf,SAASC,OAAO,QAAQ,wBAAwB;AAEhD,SACEC,gBAAgB,QAEX,wBAAwB;AAC/B,SAASC,cAAc,QAAQ,kCAAkC;AACjE,SAASC,SAAS,QAAQ,uBAAuB;AAyLjD;;;;;;;;;;;CAWC,GACD,OAAO,MAAMC,0BAAYL,WACvB,SAASK,UAAUC,KAAK,EAAEC,GAAG;IAC3B,MAAM,EACJ,aAAaC,SAAS,EACtBC,SAAS,EACTC,OAAO,KAAK,EACZC,OAAOC,SAAS,EAChBC,QAAQC,UAAU,EAClBC,QAAQC,UAAU,EAClBC,QAAQC,UAAU,EAClBC,UAAUC,mBAAmB,EAC7BC,WAAW,EACXC,QAAQ,EACRC,cAAc,EACdC,aAAa,EACbC,MAAM,EACNC,UAAUC,YAAY,EACtBC,gBAAgB,KAAK,EACrBC,eAAe,EACfC,gBAAgB,EAChBC,UAAU,YAAY,EACtBC,YAAY,EACZ,GAAGC,WACJ,GAAG3B;IAEJ,MAAMoB,WAAWzB,QAAQ,QAAQ0B;IAEjC,sEAAsE;IACtE,wEAAwE;IACxE,yEAAyE;IACzE,oEAAoE;IACpE,MAAM,EACJV,QAAQiB,eAAe,EACvBrB,MAAM,EACNE,MAAM,EACNI,QAAQ,EACT,GAAGhB,eAAe;QACjBU,QAAQC;QACRC,QAAQC;QACRG,UAAUC;IACZ;IACA,MAAMH,SAASC,cAAcgB;IAE7B,IAAIvB,QAAQC;IACZ,IAAI,CAACD,SAASM,QAAQ;QACpBN,QAAQ,CAACuB,mBAAmBhB,aAAa,QAAQ;IACnD;IAEA,MAAMiB,YAAYlB,SAAS,OAAO;IAClC,qBACE,MAACkB;QACE,GAAGF,SAAS;QACb1B,KAAKA;QACL6B,aAAW5B,cAAc,SAAS6B,YAAY7B;QAC9CC,WAAWL,UAAU;YACnBK;YACAC;YACAO;YACAQ;YACAJ;YACAR;YACAE;YACAI,UAAU,CAACX,aAAaW;YACxBY,SAASL,YAAYlB,YAAY,SAASuB;YAC1CO,iBAAiBJ;QACnB;QACAvB,OAAOA;;YAENY;0BACD,KAACrB;gBACE,GAAG8B,YAAY;gBAChBO,MAAMb;gBACNc,WAAWZ;gBACXE,kBAAkBA;gBAClBtB,WAAWA;gBACXK,QAAQA;gBACR4B,SAASZ;0BAERP;;YAEFE;;;AAGP,GACA"}
@@ -1,7 +1,6 @@
1
1
  import { type ButtonHTMLAttributes, type ReactNode } from "react";
2
2
  import { type IconRotatorProps } from "../icon/IconRotator.js";
3
- import { type TableCellHorizontalAlignment } from "./TableConfigurationProvider.js";
4
- export type SortOrder = "ascending" | "descending" | "none" | "other";
3
+ import { type SortOrder, type TableCellHorizontalAlignment } from "./types.js";
5
4
  /**
6
5
  * @since 6.0.0
7
6
  */
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/TableCellContent.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type ButtonHTMLAttributes, type ReactNode } from \"react\";\nimport { ButtonUnstyled } from \"../button/ButtonUnstyled.js\";\nimport { IconRotator, type IconRotatorProps } from \"../icon/IconRotator.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { type TableCellHorizontalAlignment } from \"./TableConfigurationProvider.js\";\n\nexport type SortOrder = \"ascending\" | \"descending\" | \"none\" | \"other\";\n\n/**\n * @since 6.0.0\n */\nexport type TableCellContentsIconRotatorProps = Omit<\n IconRotatorProps,\n \"children\" | \"rotated\"\n>;\n\n/**\n * @since 6.0.0 Extends the `ButtonHTMLAttributes` so the extra props\n * can be passed to the `ButtonUnstyled`\n * @internal\n */\nexport interface TableCellContentProps\n extends ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The current sort order for this cell. Setting this to `null` will prevent\n * the button from being rendered.\n */\n sortOrder?: SortOrder;\n\n /**\n * This should normally be the `getIcon(\"sort\")`\n */\n icon?: ReactNode;\n\n /** @defaultValue `false` */\n iconAfter?: boolean;\n\n /**\n * Boolean if the icon should be rotated.\n */\n rotated?: boolean;\n\n /**\n * Any additional props to pass to the `IconRotator`.\n */\n iconRotatorProps?: TableCellContentsIconRotatorProps;\n\n /**\n * @since 4.0.3\n * @see {@link TableCellHorizontalAlignment}\n */\n hAlign?: TableCellHorizontalAlignment;\n}\n\nconst styles = bem(\"rmd-table-cell\");\n\n/**\n * **Server Component**\n * This might actually be a client component.\n *\n * This is mostly an internal component since it is automatically used within\n * the `TableCell` component but this will conditionally wrap the `children`\n * within an `UnstyledButton` to make a clickable cell. This is really to help\n * with sort behavior within headers.\n *\n * @internal\n */\nexport const TableCellContent = forwardRef<\n HTMLButtonElement,\n TableCellContentProps\n>(function TableCellContent(props, ref) {\n const {\n icon: propIcon,\n style,\n className,\n sortOrder,\n children,\n rotated: propRotated,\n hAlign = \"left\",\n iconAfter,\n iconRotatorProps,\n ...remaining\n } = props;\n if (!sortOrder || propIcon === null) {\n return <>{children}</>;\n }\n\n let icon: ReactNode = null;\n if (sortOrder !== \"none\") {\n const rotated = propRotated ?? sortOrder === \"descending\";\n\n icon = (\n <IconRotator {...iconRotatorProps} rotated={rotated}>\n {propIcon}\n </IconRotator>\n );\n }\n\n return (\n <ButtonUnstyled\n {...remaining}\n ref={ref}\n style={style}\n className={cnb(\n styles(\"content\", {\n [hAlign]: hAlign !== \"left\",\n }),\n className\n )}\n >\n {!iconAfter && icon}\n {children}\n {iconAfter && icon}\n </ButtonUnstyled>\n );\n});\n"],"names":["cnb","forwardRef","ButtonUnstyled","IconRotator","bem","styles","TableCellContent","props","ref","icon","propIcon","style","className","sortOrder","children","rotated","propRotated","hAlign","iconAfter","iconRotatorProps","remaining"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAmD,QAAQ;AAC9E,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,WAAW,QAA+B,yBAAyB;AAC5E,SAASC,GAAG,QAAQ,kBAAkB;AAmDtC,MAAMC,SAASD,IAAI;AAEnB;;;;;;;;;;CAUC,GACD,OAAO,MAAME,iCAAmBL,WAG9B,SAASK,iBAAiBC,KAAK,EAAEC,GAAG;IACpC,MAAM,EACJC,MAAMC,QAAQ,EACdC,KAAK,EACLC,SAAS,EACTC,SAAS,EACTC,QAAQ,EACRC,SAASC,WAAW,EACpBC,SAAS,MAAM,EACfC,SAAS,EACTC,gBAAgB,EAChB,GAAGC,WACJ,GAAGb;IACJ,IAAI,CAACM,aAAaH,aAAa,MAAM;QACnC,qBAAO;sBAAGI;;IACZ;IAEA,IAAIL,OAAkB;IACtB,IAAII,cAAc,QAAQ;QACxB,MAAME,UAAUC,eAAeH,cAAc;QAE7CJ,qBACE,KAACN;YAAa,GAAGgB,gBAAgB;YAAEJ,SAASA;sBACzCL;;IAGP;IAEA,qBACE,MAACR;QACE,GAAGkB,SAAS;QACbZ,KAAKA;QACLG,OAAOA;QACPC,WAAWZ,IACTK,OAAO,WAAW;YAChB,CAACY,OAAO,EAAEA,WAAW;QACvB,IACAL;;YAGD,CAACM,aAAaT;YACdK;YACAI,aAAaT;;;AAGpB,GAAG"}
1
+ {"version":3,"sources":["../../src/table/TableCellContent.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type ButtonHTMLAttributes, type ReactNode } from \"react\";\nimport { ButtonUnstyled } from \"../button/ButtonUnstyled.js\";\nimport { IconRotator, type IconRotatorProps } from \"../icon/IconRotator.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { type SortOrder, type TableCellHorizontalAlignment } from \"./types.js\";\n\n/**\n * @since 6.0.0\n */\nexport type TableCellContentsIconRotatorProps = Omit<\n IconRotatorProps,\n \"children\" | \"rotated\"\n>;\n\n/**\n * @since 6.0.0 Extends the `ButtonHTMLAttributes` so the extra props\n * can be passed to the `ButtonUnstyled`\n * @internal\n */\nexport interface TableCellContentProps\n extends ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The current sort order for this cell. Setting this to `null` will prevent\n * the button from being rendered.\n */\n sortOrder?: SortOrder;\n\n /**\n * This should normally be the `getIcon(\"sort\")`\n */\n icon?: ReactNode;\n\n /** @defaultValue `false` */\n iconAfter?: boolean;\n\n /**\n * Boolean if the icon should be rotated.\n */\n rotated?: boolean;\n\n /**\n * Any additional props to pass to the `IconRotator`.\n */\n iconRotatorProps?: TableCellContentsIconRotatorProps;\n\n /**\n * @since 4.0.3\n * @see {@link TableCellHorizontalAlignment}\n */\n hAlign?: TableCellHorizontalAlignment;\n}\n\nconst styles = bem(\"rmd-table-cell\");\n\n/**\n * **Server Component**\n * This might actually be a client component.\n *\n * This is mostly an internal component since it is automatically used within\n * the `TableCell` component but this will conditionally wrap the `children`\n * within an `UnstyledButton` to make a clickable cell. This is really to help\n * with sort behavior within headers.\n *\n * @internal\n */\nexport const TableCellContent = forwardRef<\n HTMLButtonElement,\n TableCellContentProps\n>(function TableCellContent(props, ref) {\n const {\n icon: propIcon,\n style,\n className,\n sortOrder,\n children,\n rotated: propRotated,\n hAlign = \"left\",\n iconAfter,\n iconRotatorProps,\n ...remaining\n } = props;\n if (!sortOrder || propIcon === null) {\n return <>{children}</>;\n }\n\n let icon: ReactNode = null;\n if (sortOrder !== \"none\") {\n const rotated = propRotated ?? sortOrder === \"descending\";\n\n icon = (\n <IconRotator {...iconRotatorProps} rotated={rotated}>\n {propIcon}\n </IconRotator>\n );\n }\n\n return (\n <ButtonUnstyled\n {...remaining}\n ref={ref}\n style={style}\n className={cnb(\n styles(\"content\", {\n [hAlign]: hAlign !== \"left\",\n }),\n className\n )}\n >\n {!iconAfter && icon}\n {children}\n {iconAfter && icon}\n </ButtonUnstyled>\n );\n});\n"],"names":["cnb","forwardRef","ButtonUnstyled","IconRotator","bem","styles","TableCellContent","props","ref","icon","propIcon","style","className","sortOrder","children","rotated","propRotated","hAlign","iconAfter","iconRotatorProps","remaining"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAmD,QAAQ;AAC9E,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,WAAW,QAA+B,yBAAyB;AAC5E,SAASC,GAAG,QAAQ,kBAAkB;AAiDtC,MAAMC,SAASD,IAAI;AAEnB;;;;;;;;;;CAUC,GACD,OAAO,MAAME,iCAAmBL,WAG9B,SAASK,iBAAiBC,KAAK,EAAEC,GAAG;IACpC,MAAM,EACJC,MAAMC,QAAQ,EACdC,KAAK,EACLC,SAAS,EACTC,SAAS,EACTC,QAAQ,EACRC,SAASC,WAAW,EACpBC,SAAS,MAAM,EACfC,SAAS,EACTC,gBAAgB,EAChB,GAAGC,WACJ,GAAGb;IACJ,IAAI,CAACM,aAAaH,aAAa,MAAM;QACnC,qBAAO;sBAAGI;;IACZ;IAEA,IAAIL,OAAkB;IACtB,IAAII,cAAc,QAAQ;QACxB,MAAME,UAAUC,eAAeH,cAAc;QAE7CJ,qBACE,KAACN;YAAa,GAAGgB,gBAAgB;YAAEJ,SAASA;sBACzCL;;IAGP;IAEA,qBACE,MAACR;QACE,GAAGkB,SAAS;QACbZ,KAAKA;QACLG,OAAOA;QACPC,WAAWZ,IACTK,OAAO,WAAW;YAChB,CAACY,OAAO,EAAEA,WAAW;QACvB,IACAL;;YAGD,CAACM,aAAaT;YACdK;YACAI,aAAaT;;;AAGpB,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/TableCheckbox.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type TdHTMLAttributes } from \"react\";\nimport { Checkbox } from \"../form/Checkbox.js\";\nimport { type CheckboxProps } from \"../form/InputToggle.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 TableCheckboxTdHTMLAttributes = Omit<\n TdHTMLAttributes<HTMLTableCellElement>,\n \"aria-sort\" | \"scope\" | \"onChange\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport type TableCheckboxSupportedCheckboxProps = Pick<\n CheckboxProps,\n | \"name\"\n | \"value\"\n | \"icon\"\n | \"iconStyle\"\n | \"iconClassName\"\n | \"iconProps\"\n | \"checkedIcon\"\n | \"indeterminateIcon\"\n | \"checked\"\n | \"onChange\"\n | \"defaultChecked\"\n | \"indeterminate\"\n | \"aria-controls\"\n>;\n\n/**\n * @since 6.0.0 The `id` prop is no longer required since the checkbox's id\n * will automatically be generated as `\"checkbox\" + useId()`. Use the {@link checkboxProps}\n * to set an `id` manually for the checkbox.\n * @since 6.0.0 The `cellId` prop was removed. Use the `id` prop instead.\n * @since 6,0.0 The default `aria-label` was changed from\n * `\"Toggle Row Selection\"` to `\"Select Row\"`.\n */\nexport interface TableCheckboxProps\n extends TableCheckboxTdHTMLAttributes,\n TableCheckboxSupportedCheckboxProps {\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 TableCheckboxSupportedCheckboxProps}\n * @since 6.0.0\n */\n checkboxProps?: PropsWithRef<CheckboxProps, HTMLInputElement>;\n}\n\n/**\n * **Client Component**\n * The `TableCheckbox` is used to render a `Checkbox` 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 * TableCheckbox,\n * TableContainer,\n * TableHeader,\n * TableRow,\n * useCheckboxGroup\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 { getCheckboxProps, getIndeterminateProps } = useCheckboxGroup({\n * values: rows.map(({ name }) => name),\n * name: \"selected\",\n * });\n * return (\n * <TableContainer>\n * <Table>\n * <TableHeader>\n * <TableRow>\n * <TableCheckbox {...getIndeterminateProps()} />\n * <TableCell>Name</TableCell>\n * <TableCell>Type</TableCell>\n * </TableRow>\n * </TableHeader>\n * <TableBody>\n * {rows.map(({ name, type }) => {\n * const checkboxProps = getCheckboxProps(name);\n * const { checked, onChange } = checkboxProps;\n *\n * return (\n * <TableRow\n * key={name}\n * onClick={onChange}\n * clickable\n * selected={checked}\n * >\n * <TableCheckbox {...checkboxProps} />\n * <TableCell>{name}</TableCell>\n * <TableCell hAlign=\"right\">{type}</TableCell>\n * </TableRow>\n * );\n * })}\n * </TableBody>\n * </Table>\n * </TableContainer>\n * );\n * }\n * ```\n *\n * @since 6.0.0 The `id` prop is no longer required since the checkbox's id\n * will automatically be generated as `\"checkbox\" + useId()`. Use the {@link checkboxProps}\n * to set an `id` manually for the checkbox.\n * @since 6.0.0 The `cellId` prop was removed. Use the `id` prop instead.\n * @since 6,0.0 The default `aria-label` was changed from\n * `\"Toggle Row Selection\"` to `\"Select Row\"`.\n */\nexport const TableCheckbox = forwardRef<\n HTMLTableCellElement,\n TableCheckboxProps\n>(function TableCheckbox(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 indeterminateIcon,\n value,\n checked,\n onChange,\n defaultChecked,\n indeterminate,\n checkboxProps,\n onClick = noop,\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 <Checkbox\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 indeterminateIcon={indeterminateIcon}\n value={value}\n checked={checked}\n defaultChecked={defaultChecked}\n onChange={onChange}\n indeterminate={indeterminate}\n {...checkboxProps}\n />\n </TableCell>\n );\n});\n"],"names":["forwardRef","Checkbox","TableCell","noop","TableCheckbox","props","ref","ariaLabelledBy","ariaLabel","undefined","ariaControls","name","icon","iconProps","iconStyle","iconClassName","checkedIcon","indeterminateIcon","value","checked","onChange","defaultChecked","indeterminate","checkboxProps","onClick","remaining","header","inputToggle","event","stopPropagation","aria-label","aria-labelledby","aria-controls"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AACA,SAASA,UAAU,QAA+B,QAAQ;AAC1D,SAASC,QAAQ,QAAQ,sBAAsB;AAG/C,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,MAAMC,OAAO;AACX,aAAa;AACf;AAmEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEC,GACD,OAAO,MAAMC,8BAAgBJ,WAG3B,SAASI,cAAcC,KAAK,EAAEC,GAAG;IACjC,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,iBAAiB,EACjBC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,cAAc,EACdC,aAAa,EACbC,aAAa,EACbC,UAAUrB,IAAI,EACd,GAAGsB,WACJ,GAAGpB;IAEJ,qBACE,KAACH;QACE,GAAGuB,SAAS;QACbnB,KAAKA;QACLoB,QAAQ;QACRC,WAAW;QACXH,SAAS,CAACI;YACRA,MAAMC,eAAe;YACrBL,QAAQI;QACV;kBAEA,cAAA,KAAC3B;YACC6B,cAAYtB;YACZuB,mBAAiBxB;YACjByB,iBAAetB;YACfC,MAAMA;YACNC,MAAMA;YACNC,WAAWA;YACXC,WAAWA;YACXC,eAAeA;YACfC,aAAaA;YACbC,mBAAmBA;YACnBC,OAAOA;YACPC,SAASA;YACTE,gBAAgBA;YAChBD,UAAUA;YACVE,eAAeA;YACd,GAAGC,aAAa;;;AAIzB,GAAG"}
1
+ {"version":3,"sources":["../../src/table/TableCheckbox.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type TdHTMLAttributes } from \"react\";\nimport { Checkbox } from \"../form/Checkbox.js\";\nimport { type CheckboxProps } from \"../form/InputToggle.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 TableCheckboxTdHTMLAttributes = Omit<\n TdHTMLAttributes<HTMLTableCellElement>,\n \"aria-sort\" | \"scope\" | \"onChange\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport type TableCheckboxSupportedCheckboxProps = Pick<\n CheckboxProps,\n | \"name\"\n | \"value\"\n | \"icon\"\n | \"iconStyle\"\n | \"iconClassName\"\n | \"iconProps\"\n | \"checkedIcon\"\n | \"indeterminateIcon\"\n | \"checked\"\n | \"onChange\"\n | \"defaultChecked\"\n | \"indeterminate\"\n | \"aria-controls\"\n>;\n\n/**\n * @since 6.0.0 The `id` prop is no longer required since the checkbox's id\n * will automatically be generated as `\"checkbox\" + useId()`. Use the {@link checkboxProps}\n * to set an `id` manually for the checkbox.\n * @since 6.0.0 The `cellId` prop was removed. Use the `id` prop instead.\n * @since 6,0.0 The default `aria-label` was changed from\n * `\"Toggle Row Selection\"` to `\"Select Row\"`.\n */\nexport interface TableCheckboxProps\n extends TableCheckboxTdHTMLAttributes,\n TableCheckboxSupportedCheckboxProps {\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 TableCheckboxSupportedCheckboxProps}\n * @since 6.0.0\n */\n checkboxProps?: PropsWithRef<CheckboxProps, HTMLInputElement>;\n}\n\n/**\n * **Client Component**\n * The `TableCheckbox` is used to render a `Checkbox` 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 * TableCheckbox,\n * TableContainer,\n * TableHeader,\n * TableRow,\n * useCheckboxGroup\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 { getCheckboxProps, getIndeterminateProps } = useCheckboxGroup({\n * values: rows.map(({ name }) => name),\n * name: \"selected\",\n * });\n * return (\n * <TableContainer>\n * <Table>\n * <TableHeader>\n * <TableRow>\n * <TableCheckbox {...getIndeterminateProps()} />\n * <TableCell>Name</TableCell>\n * <TableCell>Type</TableCell>\n * </TableRow>\n * </TableHeader>\n * <TableBody>\n * {rows.map(({ name, type }) => {\n * const checkboxProps = getCheckboxProps(name);\n * const { checked, onChange } = checkboxProps;\n *\n * return (\n * <TableRow\n * key={name}\n * onClick={onChange}\n * clickable\n * selected={checked}\n * >\n * <TableCheckbox {...checkboxProps} />\n * <TableCell>{name}</TableCell>\n * <TableCell hAlign=\"right\">{type}</TableCell>\n * </TableRow>\n * );\n * })}\n * </TableBody>\n * </Table>\n * </TableContainer>\n * );\n * }\n * ```\n *\n * @since 6.0.0 The `id` prop is no longer required since the checkbox's id\n * will automatically be generated as `\"checkbox\" + useId()`. Use the {@link checkboxProps}\n * to set an `id` manually for the checkbox.\n * @since 6.0.0 The `cellId` prop was removed. Use the `id` prop instead.\n * @since 6,0.0 The default `aria-label` was changed from\n * `\"Toggle Row Selection\"` to `\"Select Row\"`.\n */\nexport const TableCheckbox = forwardRef<\n HTMLTableCellElement,\n TableCheckboxProps\n>(function TableCheckbox(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 indeterminateIcon,\n value,\n checked,\n onChange,\n defaultChecked,\n indeterminate,\n checkboxProps,\n onClick = noop,\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 <Checkbox\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 indeterminateIcon={indeterminateIcon}\n value={value}\n checked={checked}\n defaultChecked={defaultChecked}\n onChange={onChange}\n indeterminate={indeterminate}\n {...checkboxProps}\n />\n </TableCell>\n );\n});\n"],"names":["forwardRef","Checkbox","TableCell","noop","TableCheckbox","props","ref","ariaLabelledBy","ariaLabel","undefined","ariaControls","name","icon","iconProps","iconStyle","iconClassName","checkedIcon","indeterminateIcon","value","checked","onChange","defaultChecked","indeterminate","checkboxProps","onClick","remaining","header","inputToggle","event","stopPropagation","aria-label","aria-labelledby","aria-controls"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAA+B,QAAQ;AAC1D,SAASC,QAAQ,QAAQ,sBAAsB;AAG/C,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,MAAMC,OAAO;AACX,aAAa;AACf;AAmEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEC,GACD,OAAO,MAAMC,8BAAgBJ,WAG3B,SAASI,cAAcC,KAAK,EAAEC,GAAG;IACjC,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,iBAAiB,EACjBC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,cAAc,EACdC,aAAa,EACbC,aAAa,EACbC,UAAUrB,IAAI,EACd,GAAGsB,WACJ,GAAGpB;IAEJ,qBACE,KAACH;QACE,GAAGuB,SAAS;QACbnB,KAAKA;QACLoB,QAAQ;QACRC,WAAW;QACXH,SAAS,CAACI;YACRA,MAAMC,eAAe;YACrBL,QAAQI;QACV;kBAEA,cAAA,KAAC3B;YACC6B,cAAYtB;YACZuB,mBAAiBxB;YACjByB,iBAAetB;YACfC,MAAMA;YACNC,MAAMA;YACNC,WAAWA;YACXC,WAAWA;YACXC,eAAeA;YACfC,aAAaA;YACbC,mBAAmBA;YACnBC,OAAOA;YACPC,SAASA;YACTE,gBAAgBA;YAChBD,UAAUA;YACVE,eAAeA;YACd,GAAGC,aAAa;;;AAIzB,GAAG"}
@@ -1,77 +1,5 @@
1
1
  /// <reference types="react" />
2
- export interface TableRowConfiguration {
3
- /**
4
- * Set to `true` if rows should no longer change background color while
5
- * hovered.
6
- *
7
- * @defaultValue `false`
8
- */
9
- disableHover?: boolean;
10
- /**
11
- * Set to `true` if the rows in the `TableBody` should no longer have borders
12
- * applied.
13
- *
14
- * @defaultValue `false`
15
- */
16
- disableBorders?: boolean;
17
- }
18
- /**
19
- * The horizontal alignment for the content within a cell.
20
- *
21
- * Note: Table default behavior is to align to the left.
22
- */
23
- export type TableCellHorizontalAlignment = "left" | "center" | "right";
24
- /**
25
- * The vertical alignment for the content within a cell.
26
- *
27
- * Note: When this is set to `"top"` or `"bottom"`, `padding-top` or
28
- * `padding-bottom` will also be applied due to how styling tables work.
29
- */
30
- export type TableCellVerticalAlignment = "top" | "middle" | "bottom";
31
- export interface TableCellConfiguration {
32
- hAlign?: TableCellHorizontalAlignment;
33
- vAlign?: TableCellVerticalAlignment;
34
- /**
35
- * Set this to `true` to allow `TableCell` content to line wrap.
36
- *
37
- * @defaultValue `false`
38
- */
39
- lineWrap?: boolean;
40
- }
41
- /**
42
- * @internal
43
- */
44
- export interface TableCellConfig extends TableCellConfiguration {
45
- /**
46
- * Boolean if all the `TableCell` components should be rendered as a `<th>`
47
- * instead of a `<td>`. This is really just a convenience prop for the
48
- * `TableHeader` component so the user of `react-md` doesn't need to keep
49
- * setting the `type="th"` fot the `TableCell` if using the low-level
50
- * components.
51
- *
52
- * @internal
53
- */
54
- header?: boolean;
55
- }
56
- export interface TableConfig extends TableRowConfiguration, TableCellConfig {
57
- /**
58
- * Set this to `true` to decrease the height of all cells within the table.
59
- *
60
- * @defaultValue `false`
61
- */
62
- dense?: boolean;
63
- }
64
- export interface TableConfiguration extends TableConfig {
65
- /**
66
- * Set this to `true` to allow the table to span the full width of the
67
- * container element instead of having the width be determined by the content
68
- * within the table.
69
- *
70
- * @defaultValue `false`
71
- */
72
- fullWidth?: boolean;
73
- }
74
- export type TableConfigContext = Required<TableConfig>;
2
+ import { type TableConfig, type TableConfigContext } from "./types.js";
75
3
  /**
76
4
  * An internal hook for getting the current table configuration in child
77
5
  * components for the table. This will use the inherited table configuration
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/TableConfigurationProvider.tsx"],"sourcesContent":["\"use client\";\nimport { createContext, useContext } from \"react\";\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\nconst context = createContext<TableConfigContext>({\n dense: false,\n header: false,\n hAlign: \"left\",\n vAlign: \"middle\",\n lineWrap: false,\n disableHover: false,\n disableBorders: false,\n});\n\n/**\n * An internal hook for getting the current table configuration in child\n * components for the table. This will use the inherited table configuration\n * context if the prop value is `undefined`.\n *\n * @internal\n */\nexport function useTableConfig(options: TableConfig): TableConfigContext {\n const inherited = useContext(context);\n const dense = options.dense ?? inherited.dense;\n const header = options.header ?? inherited.header;\n const hAlign = options.hAlign ?? inherited.hAlign;\n const vAlign = options.vAlign ?? inherited.vAlign;\n const lineWrap = options.lineWrap ?? inherited.lineWrap;\n const disableHover = options.disableHover ?? inherited.disableHover;\n const disableBorders = options.disableBorders ?? inherited.disableBorders;\n\n return {\n dense,\n header,\n hAlign,\n vAlign,\n lineWrap,\n disableHover,\n disableBorders,\n };\n}\n\n/**\n * **Client Component**\n *\n * @internal\n */\nexport const { Provider: TableConfigProvider } = context;\n"],"names":["createContext","useContext","context","dense","header","hAlign","vAlign","lineWrap","disableHover","disableBorders","useTableConfig","options","inherited","Provider","TableConfigProvider"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,SAASA,aAAa,EAAEC,UAAU,QAAQ,QAAQ;AAwFlD,MAAMC,wBAAUF,cAAkC;IAChDG,OAAO;IACPC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,UAAU;IACVC,cAAc;IACdC,gBAAgB;AAClB;AAEA;;;;;;CAMC,GACD,OAAO,SAASC,eAAeC,OAAoB;IACjD,MAAMC,YAAYX,WAAWC;IAC7B,MAAMC,QAAQQ,QAAQR,KAAK,IAAIS,UAAUT,KAAK;IAC9C,MAAMC,SAASO,QAAQP,MAAM,IAAIQ,UAAUR,MAAM;IACjD,MAAMC,SAASM,QAAQN,MAAM,IAAIO,UAAUP,MAAM;IACjD,MAAMC,SAASK,QAAQL,MAAM,IAAIM,UAAUN,MAAM;IACjD,MAAMC,WAAWI,QAAQJ,QAAQ,IAAIK,UAAUL,QAAQ;IACvD,MAAMC,eAAeG,QAAQH,YAAY,IAAII,UAAUJ,YAAY;IACnE,MAAMC,iBAAiBE,QAAQF,cAAc,IAAIG,UAAUH,cAAc;IAEzE,OAAO;QACLN;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;IACF;AACF;AAEA;;;;CAIC,GACD,OAAO,MAAM,EAAEI,UAAUC,mBAAmB,EAAE,GAAGZ,QAAQ"}
1
+ {"version":3,"sources":["../../src/table/TableConfigurationProvider.tsx"],"sourcesContent":["\"use client\";\nimport { createContext, useContext } from \"react\";\nimport { type TableConfig, type TableConfigContext } from \"./types.js\";\n\nconst context = createContext<TableConfigContext>({\n dense: false,\n header: false,\n hAlign: \"left\",\n vAlign: \"middle\",\n lineWrap: false,\n disableHover: false,\n disableBorders: false,\n});\n\n/**\n * An internal hook for getting the current table configuration in child\n * components for the table. This will use the inherited table configuration\n * context if the prop value is `undefined`.\n *\n * @internal\n */\nexport function useTableConfig(options: TableConfig): TableConfigContext {\n const inherited = useContext(context);\n const dense = options.dense ?? inherited.dense;\n const header = options.header ?? inherited.header;\n const hAlign = options.hAlign ?? inherited.hAlign;\n const vAlign = options.vAlign ?? inherited.vAlign;\n const lineWrap = options.lineWrap ?? inherited.lineWrap;\n const disableHover = options.disableHover ?? inherited.disableHover;\n const disableBorders = options.disableBorders ?? inherited.disableBorders;\n\n return {\n dense,\n header,\n hAlign,\n vAlign,\n lineWrap,\n disableHover,\n disableBorders,\n };\n}\n\n/**\n * **Client Component**\n *\n * @internal\n */\nexport const { Provider: TableConfigProvider } = context;\n"],"names":["createContext","useContext","context","dense","header","hAlign","vAlign","lineWrap","disableHover","disableBorders","useTableConfig","options","inherited","Provider","TableConfigProvider"],"mappings":"AAAA;AACA,SAASA,aAAa,EAAEC,UAAU,QAAQ,QAAQ;AAGlD,MAAMC,wBAAUF,cAAkC;IAChDG,OAAO;IACPC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,UAAU;IACVC,cAAc;IACdC,gBAAgB;AAClB;AAEA;;;;;;CAMC,GACD,OAAO,SAASC,eAAeC,OAAoB;IACjD,MAAMC,YAAYX,WAAWC;IAC7B,MAAMC,QAAQQ,QAAQR,KAAK,IAAIS,UAAUT,KAAK;IAC9C,MAAMC,SAASO,QAAQP,MAAM,IAAIQ,UAAUR,MAAM;IACjD,MAAMC,SAASM,QAAQN,MAAM,IAAIO,UAAUP,MAAM;IACjD,MAAMC,SAASK,QAAQL,MAAM,IAAIM,UAAUN,MAAM;IACjD,MAAMC,WAAWI,QAAQJ,QAAQ,IAAIK,UAAUL,QAAQ;IACvD,MAAMC,eAAeG,QAAQH,YAAY,IAAII,UAAUJ,YAAY;IACnE,MAAMC,iBAAiBE,QAAQF,cAAc,IAAIG,UAAUH,cAAc;IAEzE,OAAO;QACLN;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;IACF;AACF;AAEA;;;;CAIC,GACD,OAAO,MAAM,EAAEI,UAAUC,mBAAmB,EAAE,GAAGZ,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/TableContainer.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, useMemo, type HTMLAttributes } from \"react\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport {\n TableContainerProvider,\n type TableContainerContext,\n} from \"./TableContainerProvider.js\";\nimport { tableContainer } from \"./tableContainerStyles.js\";\n\nexport type TableContainerProps = HTMLAttributes<HTMLDivElement>;\n\n/**\n * **Client Component**\n *\n * An extremely \"useful\" component that should be used with the `Table`\n * component if you want to make a responsive table within the page. If you\n * don't want to use this component, you can just apply `overflow: auto` to a\n * parent element of the table.\n */\nexport const TableContainer = forwardRef<HTMLDivElement, TableContainerProps>(\n function TableContainer(props, ref) {\n const { className, children, ...remaining } = props;\n const [nodeRef, refCallback] = useEnsuredRef(ref);\n\n const value = useMemo<TableContainerContext>(\n () => ({\n exists: true,\n containerRef: nodeRef,\n }),\n [nodeRef]\n );\n\n return (\n <TableContainerProvider value={value}>\n <div\n {...remaining}\n ref={refCallback}\n className={tableContainer({ className })}\n >\n {children}\n </div>\n </TableContainerProvider>\n );\n }\n);\n"],"names":["forwardRef","useMemo","useEnsuredRef","TableContainerProvider","tableContainer","TableContainer","props","ref","className","children","remaining","nodeRef","refCallback","value","exists","containerRef","div"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AACA,SAASA,UAAU,EAAEC,OAAO,QAA6B,QAAQ;AACjE,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SACEC,sBAAsB,QAEjB,8BAA8B;AACrC,SAASC,cAAc,QAAQ,4BAA4B;AAI3D;;;;;;;CAOC,GACD,OAAO,MAAMC,+BAAiBL,WAC5B,SAASK,eAAeC,KAAK,EAAEC,GAAG;IAChC,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,WAAW,GAAGJ;IAC9C,MAAM,CAACK,SAASC,YAAY,GAAGV,cAAcK;IAE7C,MAAMM,QAAQZ,QACZ,IAAO,CAAA;YACLa,QAAQ;YACRC,cAAcJ;QAChB,CAAA,GACA;QAACA;KAAQ;IAGX,qBACE,KAACR;QAAuBU,OAAOA;kBAC7B,cAAA,KAACG;YACE,GAAGN,SAAS;YACbH,KAAKK;YACLJ,WAAWJ,eAAe;gBAAEI;YAAU;sBAErCC;;;AAIT,GACA"}
1
+ {"version":3,"sources":["../../src/table/TableContainer.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, useMemo, type HTMLAttributes } from \"react\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport {\n TableContainerProvider,\n type TableContainerContext,\n} from \"./TableContainerProvider.js\";\nimport { tableContainer } from \"./tableContainerStyles.js\";\n\nexport type TableContainerProps = HTMLAttributes<HTMLDivElement>;\n\n/**\n * **Client Component**\n *\n * An extremely \"useful\" component that should be used with the `Table`\n * component if you want to make a responsive table within the page. If you\n * don't want to use this component, you can just apply `overflow: auto` to a\n * parent element of the table.\n */\nexport const TableContainer = forwardRef<HTMLDivElement, TableContainerProps>(\n function TableContainer(props, ref) {\n const { className, children, ...remaining } = props;\n const [nodeRef, refCallback] = useEnsuredRef(ref);\n\n const value = useMemo<TableContainerContext>(\n () => ({\n exists: true,\n containerRef: nodeRef,\n }),\n [nodeRef]\n );\n\n return (\n <TableContainerProvider value={value}>\n <div\n {...remaining}\n ref={refCallback}\n className={tableContainer({ className })}\n >\n {children}\n </div>\n </TableContainerProvider>\n );\n }\n);\n"],"names":["forwardRef","useMemo","useEnsuredRef","TableContainerProvider","tableContainer","TableContainer","props","ref","className","children","remaining","nodeRef","refCallback","value","exists","containerRef","div"],"mappings":"AAAA;;AACA,SAASA,UAAU,EAAEC,OAAO,QAA6B,QAAQ;AACjE,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SACEC,sBAAsB,QAEjB,8BAA8B;AACrC,SAASC,cAAc,QAAQ,4BAA4B;AAI3D;;;;;;;CAOC,GACD,OAAO,MAAMC,+BAAiBL,WAC5B,SAASK,eAAeC,KAAK,EAAEC,GAAG;IAChC,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,WAAW,GAAGJ;IAC9C,MAAM,CAACK,SAASC,YAAY,GAAGV,cAAcK;IAE7C,MAAMM,QAAQZ,QACZ,IAAO,CAAA;YACLa,QAAQ;YACRC,cAAcJ;QAChB,CAAA,GACA;QAACA;KAAQ;IAGX,qBACE,KAACR;QAAuBU,OAAOA;kBAC7B,cAAA,KAACG;YACE,GAAGN,SAAS;YACbH,KAAKK;YACLJ,WAAWJ,eAAe;gBAAEI;YAAU;sBAErCC;;;AAIT,GACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/TableContainerProvider.tsx"],"sourcesContent":["\"use client\";\nimport { createContext, useContext, type RefObject } from \"react\";\n\n/**\n * @internal\n * @since 6.0.0\n */\nexport interface TableContainerContext {\n exists: boolean;\n containerRef: RefObject<HTMLDivElement>;\n}\n\nconst context = createContext<Readonly<TableContainerContext>>({\n exists: false,\n containerRef: { current: null },\n});\ncontext.displayName = \"TableContainer\";\n\n/**\n * **Client Component**\n *\n * @internal\n * @since 6.0.0\n */\nexport const { Provider: TableContainerProvider } = context;\n\n/**\n * This is used to implement the sticky header and footer intersection observer\n * behavior.\n *\n * @internal\n * @since 6.0.0\n */\nexport function useTableContainer(): Readonly<TableContainerContext> {\n return useContext(context);\n}\n"],"names":["createContext","useContext","context","exists","containerRef","current","displayName","Provider","TableContainerProvider","useTableContainer"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,SAASA,aAAa,EAAEC,UAAU,QAAwB,QAAQ;AAWlE,MAAMC,wBAAUF,cAA+C;IAC7DG,QAAQ;IACRC,cAAc;QAAEC,SAAS;IAAK;AAChC;AACAH,QAAQI,WAAW,GAAG;AAEtB;;;;;CAKC,GACD,OAAO,MAAM,EAAEC,UAAUC,sBAAsB,EAAE,GAAGN,QAAQ;AAE5D;;;;;;CAMC,GACD,OAAO,SAASO;IACd,OAAOR,WAAWC;AACpB"}
1
+ {"version":3,"sources":["../../src/table/TableContainerProvider.tsx"],"sourcesContent":["\"use client\";\nimport { createContext, useContext, type RefObject } from \"react\";\n\n/**\n * @internal\n * @since 6.0.0\n */\nexport interface TableContainerContext {\n exists: boolean;\n containerRef: RefObject<HTMLDivElement>;\n}\n\nconst context = createContext<Readonly<TableContainerContext>>({\n exists: false,\n containerRef: { current: null },\n});\ncontext.displayName = \"TableContainer\";\n\n/**\n * **Client Component**\n *\n * @internal\n * @since 6.0.0\n */\nexport const { Provider: TableContainerProvider } = context;\n\n/**\n * This is used to implement the sticky header and footer intersection observer\n * behavior.\n *\n * @internal\n * @since 6.0.0\n */\nexport function useTableContainer(): Readonly<TableContainerContext> {\n return useContext(context);\n}\n"],"names":["createContext","useContext","context","exists","containerRef","current","displayName","Provider","TableContainerProvider","useTableContainer"],"mappings":"AAAA;AACA,SAASA,aAAa,EAAEC,UAAU,QAAwB,QAAQ;AAWlE,MAAMC,wBAAUF,cAA+C;IAC7DG,QAAQ;IACRC,cAAc;QAAEC,SAAS;IAAK;AAChC;AACAH,QAAQI,WAAW,GAAG;AAEtB;;;;;CAKC,GACD,OAAO,MAAM,EAAEC,UAAUC,sBAAsB,EAAE,GAAGN,QAAQ;AAE5D;;;;;;CAMC,GACD,OAAO,SAASO;IACd,OAAOR,WAAWC;AACpB"}
@@ -1,28 +1,19 @@
1
1
  import { type HTMLAttributes } from "react";
2
- import { type TableCellConfig } from "./TableConfigurationProvider.js";
3
- import { type IsStickyTableSectionActive, type TableStickySectionProps } from "./types.js";
4
- /**
5
- * @since 6.0.0
6
- */
7
- export declare const isTableFooterStickyActive: IsStickyTableSectionActive;
8
- /**
9
- * @since 6.0.0 Added support for "sticky-active" state.
10
- */
11
- export interface TableFooterProps extends HTMLAttributes<HTMLTableSectionElement>, Pick<TableCellConfig, "lineWrap">, TableStickySectionProps {
2
+ import { type TableSectionConfiguration } from "./types.js";
3
+ export interface TableFooterProps extends HTMLAttributes<HTMLTableSectionElement>, TableSectionConfiguration {
12
4
  /**
13
- * This is a rename of the `disableHover` of the `TableConfig` since table
14
- * footers are not hoverable by default. This prop can be enabled to add the
15
- * row hover color within table footers, but it is not really recommended.
5
+ * NOTE: It is recommended to use the `StickyTableSection` component instead
6
+ * of enabling this prop since it supports dynamically adding styles while the
7
+ * header covering table rows.
8
+ *
9
+ * Set this to `true` to enable the sticky behavior.
16
10
  *
17
11
  * @defaultValue `false`
18
12
  */
19
- hoverable?: boolean;
20
- /** @defaultValue {@link isTableFooterStickyActive} */
21
- isStickyActive?: IsStickyTableSectionActive;
13
+ sticky?: boolean;
22
14
  }
23
15
  /**
24
16
  * **Client Component**
25
- * TODO: Create separate useStickyTableFooter + StickyTableFooter component
26
17
  *
27
18
  * Creates a `<tfoot>` element with some basic styles. This component will
28
19
  * disable the hover effect and line wrapping by default, but the hover effect
@@ -1,96 +1,33 @@
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 { tableFooter } from "./tableFooterStyles.js";
9
- /**
10
- * @since 6.0.0
11
- */ export const isTableFooterStickyActive = (entry, isInTableContainer)=>{
12
- const { intersectionRatio, boundingClientRect, isIntersecting } = entry;
13
- if (isInTableContainer) {
14
- return !isIntersecting;
15
- }
16
- return intersectionRatio < 1 && boundingClientRect.top >= 0;
17
- };
6
+ import { useTableSectionConfig } from "./useTableSectionConfig.js";
18
7
  /**
19
8
  * **Client Component**
20
- * TODO: Create separate useStickyTableFooter + StickyTableFooter component
21
9
  *
22
10
  * Creates a `<tfoot>` element with some basic styles. This component will
23
11
  * disable the hover effect and line wrapping by default, but the hover effect
24
12
  * and line-wrapping can be re-enabled if desired through the `hoverable` and
25
13
  * `disableNoWrap` props.
26
14
  */ export const TableFooter = /*#__PURE__*/ forwardRef(function TableFooter(props, propRef) {
27
- const { className, hoverable = false, lineWrap: propLineWrap, children, sticky = false, stickyOptions, isStickyActive = isTableFooterStickyActive, disableStickyStyles = false, stickyActiveClassName, ...remaining } = props;
28
- // update the table configuration with the custom overrides for the `<tfoot>`
29
- const { dense, hAlign, vAlign, lineWrap, disableHover, disableBorders } = useTableConfig({
30
- lineWrap: propLineWrap,
31
- disableHover: !hoverable
32
- });
33
- const configuration = useMemo(()=>({
34
- dense,
35
- header: false,
36
- hAlign,
37
- vAlign,
38
- lineWrap,
39
- disableBorders,
40
- disableHover
41
- }), [
42
- dense,
43
- hAlign,
44
- vAlign,
15
+ const { className, hoverable, lineWrap, children, ...remaining } = props;
16
+ const config = useTableSectionConfig({
17
+ type: "footer",
45
18
  lineWrap,
46
- disableBorders,
47
- disableHover
48
- ]);
49
- const [tfootRef, tfootRefCallback] = useEnsuredRef(propRef);
50
- const { exists, containerRef } = useTableContainer();
51
- const [stickyActive, setStickyActive] = useState(false);
52
- const targetRef = useIntersectionObserver({
53
- ref: exists ? undefined : tfootRefCallback,
54
- root: containerRef,
55
- disabled: !sticky || disableStickyStyles,
56
- threshold: exists ? 0 : 1,
57
- getRootMargin: useCallback(()=>{
58
- const topOffset = exists && tfootRef.current ? tfootRef.current.offsetHeight - 1 : 1;
59
- return `0px 0px -${topOffset}px 0px`;
60
- }, [
61
- exists,
62
- tfootRef
63
- ]),
64
- onUpdate: useCallback(([entry])=>{
65
- setStickyActive(isStickyActive(entry, exists));
66
- }, [
67
- exists,
68
- isStickyActive
69
- ]),
70
- // allow the user defined sticky options to override the default behavior
71
- ...stickyOptions
19
+ hoverable
72
20
  });
73
- return /*#__PURE__*/ _jsxs(TableConfigProvider, {
74
- value: configuration,
75
- children: [
76
- exists && sticky && !disableStickyStyles && // rendering a `<tbody>` since it is valid to have 0-many in a table
77
- // https://html.spec.whatwg.org/multipage/tables.html#the-table-element
78
- /*#__PURE__*/ _jsx("tbody", {
79
- "aria-hidden": true,
80
- ref: targetRef
21
+ return /*#__PURE__*/ _jsx(TableConfigProvider, {
22
+ value: config,
23
+ children: /*#__PURE__*/ _jsx("tfoot", {
24
+ ...remaining,
25
+ ref: propRef,
26
+ className: tableFooter({
27
+ className
81
28
  }),
82
- /*#__PURE__*/ _jsx("tfoot", {
83
- ...remaining,
84
- ref: exists ? tfootRefCallback : targetRef,
85
- className: tableFooter({
86
- className,
87
- sticky,
88
- stickyActive,
89
- stickyActiveClassName
90
- }),
91
- children: children
92
- })
93
- ]
29
+ children: children
30
+ })
94
31
  });
95
32
  });
96
33
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/TableFooter.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 { tableFooter } from \"./tableFooterStyles.js\";\nimport {\n type IsStickyTableSectionActive,\n type TableStickySectionProps,\n} from \"./types.js\";\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 Added support for \"sticky-active\" state.\n */\nexport interface TableFooterProps\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 * footers are not hoverable by default. This prop can be enabled to add the\n * row hover color within table footers, but it is not really recommended.\n *\n * @defaultValue `false`\n */\n hoverable?: boolean;\n\n /** @defaultValue {@link isTableFooterStickyActive} */\n isStickyActive?: IsStickyTableSectionActive;\n}\n\n/**\n * **Client Component**\n * TODO: Create separate useStickyTableFooter + StickyTableFooter component\n *\n * Creates a `<tfoot>` element with some basic styles. This component will\n * disable the hover effect and line wrapping by default, but the hover effect\n * and line-wrapping can be re-enabled if desired through the `hoverable` and\n * `disableNoWrap` props.\n */\nexport const TableFooter = forwardRef<\n HTMLTableSectionElement,\n TableFooterProps\n>(function TableFooter(props, propRef) {\n const {\n className,\n hoverable = false,\n lineWrap: propLineWrap,\n children,\n sticky = false,\n stickyOptions,\n isStickyActive = isTableFooterStickyActive,\n disableStickyStyles = false,\n stickyActiveClassName,\n ...remaining\n } = props;\n\n // update the table configuration with the custom overrides for the `<tfoot>`\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: false,\n hAlign,\n vAlign,\n lineWrap,\n disableBorders,\n disableHover,\n }),\n [dense, hAlign, vAlign, lineWrap, disableBorders, disableHover]\n );\n\n const [tfootRef, tfootRefCallback] = useEnsuredRef(propRef);\n const { exists, containerRef } = useTableContainer();\n const [stickyActive, setStickyActive] = useState(false);\n const targetRef = useIntersectionObserver<\n HTMLTableSectionElement | HTMLElement\n >({\n ref: exists ? undefined : tfootRefCallback,\n root: containerRef,\n disabled: !sticky || disableStickyStyles,\n threshold: exists ? 0 : 1,\n getRootMargin: useCallback(() => {\n const topOffset =\n exists && tfootRef.current ? tfootRef.current.offsetHeight - 1 : 1;\n\n return `0px 0px -${topOffset}px 0px`;\n }, [exists, tfootRef]),\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 {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 <tfoot\n {...remaining}\n ref={exists ? tfootRefCallback : targetRef}\n className={tableFooter({\n className,\n sticky,\n stickyActive,\n stickyActiveClassName,\n })}\n >\n {children}\n </tfoot>\n </TableConfigProvider>\n );\n});\n"],"names":["forwardRef","useCallback","useMemo","useState","useEnsuredRef","useIntersectionObserver","TableConfigProvider","useTableConfig","useTableContainer","tableFooter","isTableFooterStickyActive","entry","isInTableContainer","intersectionRatio","boundingClientRect","isIntersecting","top","TableFooter","props","propRef","className","hoverable","lineWrap","propLineWrap","children","sticky","stickyOptions","isStickyActive","disableStickyStyles","stickyActiveClassName","remaining","dense","hAlign","vAlign","disableHover","disableBorders","configuration","header","tfootRef","tfootRefCallback","exists","containerRef","stickyActive","setStickyActive","targetRef","ref","undefined","root","disabled","threshold","getRootMargin","topOffset","current","offsetHeight","onUpdate","value","tbody","aria-hidden","tfoot"],"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,OACAC;IAEA,MAAM,EAAEC,iBAAiB,EAAEC,kBAAkB,EAAEC,cAAc,EAAE,GAAGJ;IAClE,IAAIC,oBAAoB;QACtB,OAAO,CAACG;IACV;IAEA,OAAOF,oBAAoB,KAAKC,mBAAmBE,GAAG,IAAI;AAC5D,EAAE;AAqBF;;;;;;;;CAQC,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,wBAEhB;QACAwC,KAAKL,SAASM,YAAYP;QAC1BQ,MAAMN;QACNO,UAAU,CAACvB,UAAUG;QACrBqB,WAAWT,SAAS,IAAI;QACxBU,eAAejD,YAAY;YACzB,MAAMkD,YACJX,UAAUF,SAASc,OAAO,GAAGd,SAASc,OAAO,CAACC,YAAY,GAAG,IAAI;YAEnE,OAAO,CAAC,SAAS,EAAEF,UAAU,MAAM,CAAC;QACtC,GAAG;YAACX;YAAQF;SAAS;QACrBgB,UAAUrD,YACR,CAAC,CAACU,MAAM;YACNgC,gBAAgBhB,eAAehB,OAAO6B;QACxC,GACA;YAACA;YAAQb;SAAe;QAE1B,yEAAyE;QACzE,GAAGD,aAAa;IAClB;IAEA,qBACE,MAACpB;QAAoBiD,OAAOnB;;YACzBI,UAAUf,UAAU,CAACG,uBACpB,oEAAoE;YACpE,uEAAuE;0BACvE,KAAC4B;gBAAMC,aAAW;gBAACZ,KAAKD;;0BAE1B,KAACc;gBACE,GAAG5B,SAAS;gBACbe,KAAKL,SAASD,mBAAmBK;gBACjCxB,WAAWX,YAAY;oBACrBW;oBACAK;oBACAiB;oBACAb;gBACF;0BAECL;;;;AAIT,GAAG"}
1
+ {"version":3,"sources":["../../src/table/TableFooter.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { TableConfigProvider } from \"./TableConfigurationProvider.js\";\nimport { tableFooter } from \"./tableFooterStyles.js\";\nimport { type TableSectionConfiguration } from \"./types.js\";\nimport { useTableSectionConfig } from \"./useTableSectionConfig.js\";\n\nexport interface TableFooterProps\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 `<tfoot>` element with some basic styles. This component will\n * disable the hover effect and line wrapping by default, but the hover effect\n * and line-wrapping can be re-enabled if desired through the `hoverable` and\n * `disableNoWrap` props.\n */\nexport const TableFooter = forwardRef<\n HTMLTableSectionElement,\n TableFooterProps\n>(function TableFooter(props, propRef) {\n const { className, hoverable, lineWrap, children, ...remaining } = props;\n\n const config = useTableSectionConfig({\n type: \"footer\",\n lineWrap,\n hoverable,\n });\n\n return (\n <TableConfigProvider value={config}>\n <tfoot\n {...remaining}\n ref={propRef}\n className={tableFooter({ className })}\n >\n {children}\n </tfoot>\n </TableConfigProvider>\n );\n});\n"],"names":["forwardRef","TableConfigProvider","tableFooter","useTableSectionConfig","TableFooter","props","propRef","className","hoverable","lineWrap","children","remaining","config","type","value","tfoot","ref"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAA6B,QAAQ;AACxD,SAASC,mBAAmB,QAAQ,kCAAkC;AACtE,SAASC,WAAW,QAAQ,yBAAyB;AAErD,SAASC,qBAAqB,QAAQ,6BAA6B;AAiBnE;;;;;;;CAOC,GACD,OAAO,MAAMC,4BAAcJ,WAGzB,SAASI,YAAYC,KAAK,EAAEC,OAAO;IACnC,MAAM,EAAEC,SAAS,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,QAAQ,EAAE,GAAGC,WAAW,GAAGN;IAEnE,MAAMO,SAAST,sBAAsB;QACnCU,MAAM;QACNJ;QACAD;IACF;IAEA,qBACE,KAACP;QAAoBa,OAAOF;kBAC1B,cAAA,KAACG;YACE,GAAGJ,SAAS;YACbK,KAAKV;YACLC,WAAWL,YAAY;gBAAEK;YAAU;sBAElCG;;;AAIT,GAAG"}
@@ -1,28 +1,19 @@
1
1
  import { type HTMLAttributes } from "react";
2
- import { type TableCellConfig } from "./TableConfigurationProvider.js";
3
- import { type IsStickyTableSectionActive, type TableStickySectionProps } from "./types.js";
4
- /**
5
- * @since 6.0.0
6
- */
7
- export declare const isTableHeaderStickyActive: IsStickyTableSectionActive;
8
- /**
9
- * @since 6.0.0 Added support for "sticky-active" state.
10
- */
11
- export interface TableHeaderProps extends HTMLAttributes<HTMLTableSectionElement>, Pick<TableCellConfig, "lineWrap">, TableStickySectionProps {
2
+ import { type TableSectionConfiguration } from "./types.js";
3
+ export interface TableHeaderProps extends HTMLAttributes<HTMLTableSectionElement>, TableSectionConfiguration {
12
4
  /**
13
- * This is a rename of the `disableHover` of the `TableConfig` since table
14
- * headers are not hoverable by default. This prop can be enabled to add the
15
- * row hover color within table headers, but it is not really recommended.
5
+ * NOTE: It is recommended to use the `StickyTableSection` component instead
6
+ * of enabling this prop since it supports dynamically adding styles while the
7
+ * header covering table rows.
8
+ *
9
+ * Set this to `true` to enable the sticky behavior.
16
10
  *
17
11
  * @defaultValue `false`
18
12
  */
19
- hoverable?: boolean;
20
- /** @defaultValue {@link isTableHeaderStickyActive} */
21
- isStickyActive?: IsStickyTableSectionActive;
13
+ sticky?: boolean;
22
14
  }
23
15
  /**
24
16
  * **Client Component**
25
- * TODO: Create separate useStickyTableHeader + StickyTableHeader component
26
17
  *
27
18
  * Creates a `<thead>` element with some basic styles. This component will also
28
19
  * update the table configuration so that all the `TableCell` children will