@react-md/core 1.0.0-next.20 → 1.0.0-next.21
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.
- package/dist/CoreProviders.d.ts +1 -0
- package/dist/CoreProviders.js +1 -0
- package/dist/CoreProviders.js.map +1 -1
- package/dist/NoSsr.d.ts +3 -1
- package/dist/NoSsr.js +3 -1
- package/dist/NoSsr.js.map +1 -1
- package/dist/RootHtml.d.ts +1 -1
- package/dist/RootHtml.js +1 -1
- package/dist/RootHtml.js.map +1 -1
- package/dist/SsrProvider.d.ts +1 -0
- package/dist/SsrProvider.js +1 -0
- package/dist/SsrProvider.js.map +1 -1
- package/dist/_a11y.scss +187 -0
- package/dist/_base.scss +479 -0
- package/dist/_box-shadows.scss +80 -71
- package/dist/_colors.scss +283 -279
- package/dist/_core.scss +5 -483
- package/dist/_object-fit.scss +27 -23
- package/dist/_utils.scss +225 -225
- package/dist/app-bar/AppBar.d.ts +3 -1
- package/dist/app-bar/AppBar.js +3 -1
- package/dist/app-bar/AppBar.js.map +1 -1
- package/dist/app-bar/AppBarTitle.d.ts +2 -1
- package/dist/app-bar/AppBarTitle.js +2 -1
- package/dist/app-bar/AppBarTitle.js.map +1 -1
- package/dist/app-bar/_app-bar.scss +112 -105
- package/dist/autocomplete/Autocomplete.d.ts +81 -2
- package/dist/autocomplete/Autocomplete.js +4 -2
- package/dist/autocomplete/Autocomplete.js.map +1 -1
- package/dist/autocomplete/AutocompleteChip.d.ts +1 -0
- package/dist/autocomplete/AutocompleteChip.js +1 -0
- package/dist/autocomplete/AutocompleteChip.js.map +1 -1
- package/dist/autocomplete/AutocompleteCircularProgress.d.ts +1 -0
- package/dist/autocomplete/AutocompleteCircularProgress.js +1 -0
- package/dist/autocomplete/AutocompleteCircularProgress.js.map +1 -1
- package/dist/autocomplete/AutocompleteClearButton.d.ts +1 -0
- package/dist/autocomplete/AutocompleteClearButton.js +4 -2
- package/dist/autocomplete/AutocompleteClearButton.js.map +1 -1
- package/dist/autocomplete/AutocompleteDropdownButton.d.ts +1 -0
- package/dist/autocomplete/AutocompleteDropdownButton.js +1 -0
- package/dist/autocomplete/AutocompleteDropdownButton.js.map +1 -1
- package/dist/autocomplete/AutocompleteListboxChildren.d.ts +1 -3
- package/dist/autocomplete/AutocompleteListboxChildren.js.map +1 -1
- package/dist/autocomplete/_autocomplete.scss +125 -71
- package/dist/autocomplete/autocompleteStyles.d.ts +3 -0
- package/dist/autocomplete/autocompleteStyles.js +5 -2
- package/dist/autocomplete/autocompleteStyles.js.map +1 -1
- package/dist/autocomplete/types.d.ts +128 -82
- package/dist/autocomplete/types.js.map +1 -1
- package/dist/autocomplete/useAutocomplete.d.ts +3 -0
- package/dist/autocomplete/useAutocomplete.js +17 -17
- package/dist/autocomplete/useAutocomplete.js.map +1 -1
- package/dist/autocomplete/utils.d.ts +3 -6
- package/dist/autocomplete/utils.js.map +1 -1
- package/dist/avatar/Avatar.d.ts +2 -1
- package/dist/avatar/Avatar.js +2 -1
- package/dist/avatar/Avatar.js.map +1 -1
- package/dist/avatar/_avatar.scss +81 -77
- package/dist/badge/Badge.d.ts +8 -4
- package/dist/badge/Badge.js +8 -4
- package/dist/badge/Badge.js.map +1 -1
- package/dist/badge/_badge.scss +72 -68
- package/dist/box/Box.d.ts +4 -3
- package/dist/box/Box.js +4 -3
- package/dist/box/Box.js.map +1 -1
- package/dist/box/_box.scss +115 -119
- package/dist/button/AsyncButton.d.ts +3 -2
- package/dist/button/AsyncButton.js +4 -3
- package/dist/button/AsyncButton.js.map +1 -1
- package/dist/button/Button.d.ts +11 -9
- package/dist/button/Button.js +11 -9
- package/dist/button/Button.js.map +1 -1
- package/dist/button/ButtonUnstyled.d.ts +1 -0
- package/dist/button/ButtonUnstyled.js +2 -1
- package/dist/button/ButtonUnstyled.js.map +1 -1
- package/dist/button/TooltippedButton.d.ts +3 -2
- package/dist/button/TooltippedButton.js +2 -1
- package/dist/button/TooltippedButton.js.map +1 -1
- package/dist/button/_button.scss +128 -98
- package/dist/button/{buttonStyles.d.ts → styles.d.ts} +10 -0
- package/dist/button/{buttonStyles.js → styles.js} +9 -1
- package/dist/button/styles.js.map +1 -0
- package/dist/card/Card.d.ts +9 -10
- package/dist/card/Card.js +9 -10
- package/dist/card/Card.js.map +1 -1
- package/dist/card/CardContent.d.ts +1 -0
- package/dist/card/CardContent.js +1 -0
- package/dist/card/CardContent.js.map +1 -1
- package/dist/card/CardFooter.d.ts +1 -0
- package/dist/card/CardFooter.js +1 -0
- package/dist/card/CardFooter.js.map +1 -1
- package/dist/card/CardHeader.d.ts +1 -0
- package/dist/card/CardHeader.js +1 -0
- package/dist/card/CardHeader.js.map +1 -1
- package/dist/card/CardSubtitle.d.ts +1 -0
- package/dist/card/CardSubtitle.js +1 -0
- package/dist/card/CardSubtitle.js.map +1 -1
- package/dist/card/CardTitle.d.ts +2 -1
- package/dist/card/CardTitle.js +1 -0
- package/dist/card/CardTitle.js.map +1 -1
- package/dist/card/ClickableCard.d.ts +3 -1
- package/dist/card/ClickableCard.js +3 -1
- package/dist/card/ClickableCard.js.map +1 -1
- package/dist/card/_card.scss +76 -71
- package/dist/chip/Chip.d.ts +5 -3
- package/dist/chip/Chip.js +5 -3
- package/dist/chip/Chip.js.map +1 -1
- package/dist/chip/_chip.scss +247 -33
- package/dist/cssUtils.d.ts +1 -1
- package/dist/cssUtils.js.map +1 -1
- package/dist/dialog/Dialog.d.ts +9 -10
- package/dist/dialog/Dialog.js +9 -10
- package/dist/dialog/Dialog.js.map +1 -1
- package/dist/dialog/DialogContent.d.ts +2 -0
- package/dist/dialog/DialogContent.js +5 -2
- package/dist/dialog/DialogContent.js.map +1 -1
- package/dist/dialog/DialogFooter.d.ts +2 -0
- package/dist/dialog/DialogFooter.js +5 -2
- package/dist/dialog/DialogFooter.js.map +1 -1
- package/dist/dialog/DialogHeader.d.ts +14 -2
- package/dist/dialog/DialogHeader.js +8 -2
- package/dist/dialog/DialogHeader.js.map +1 -1
- package/dist/dialog/DialogTitle.d.ts +2 -0
- package/dist/dialog/DialogTitle.js +5 -2
- package/dist/dialog/DialogTitle.js.map +1 -1
- package/dist/dialog/FixedDialog.d.ts +11 -10
- package/dist/dialog/FixedDialog.js +13 -12
- package/dist/dialog/FixedDialog.js.map +1 -1
- package/dist/dialog/_dialog.scss +167 -22
- package/dist/dialog/styles.d.ts +12 -6
- package/dist/dialog/styles.js +11 -5
- package/dist/dialog/styles.js.map +1 -1
- package/dist/divider/Divider.d.ts +3 -1
- package/dist/divider/Divider.js +3 -1
- package/dist/divider/Divider.js.map +1 -1
- package/dist/divider/_divider.scss +68 -0
- package/dist/divider/styles.js.map +1 -1
- package/dist/draggable/_draggable.scss +16 -0
- package/dist/draggable/useDraggable.d.ts +1 -0
- package/dist/draggable/useDraggable.js +1 -0
- package/dist/draggable/useDraggable.js.map +1 -1
- package/dist/error-boundary/ErrorBoundary.d.ts +58 -0
- package/dist/error-boundary/ErrorBoundary.js +99 -0
- package/dist/error-boundary/ErrorBoundary.js.map +1 -0
- package/dist/error-boundary/context.d.ts +11 -0
- package/dist/error-boundary/context.js +12 -0
- package/dist/error-boundary/context.js.map +1 -0
- package/dist/error-boundary/types.d.ts +16 -0
- package/dist/error-boundary/types.js +7 -0
- package/dist/error-boundary/types.js.map +1 -0
- package/dist/error-boundary/useErrorBoundary.d.ts +25 -0
- package/dist/error-boundary/useErrorBoundary.js +33 -0
- package/dist/error-boundary/useErrorBoundary.js.map +1 -0
- package/dist/expansion-panel/ExpansionList.d.ts +1 -0
- package/dist/expansion-panel/ExpansionList.js +1 -0
- package/dist/expansion-panel/ExpansionList.js.map +1 -1
- package/dist/expansion-panel/ExpansionPanel.d.ts +32 -0
- package/dist/expansion-panel/ExpansionPanel.js +32 -0
- package/dist/expansion-panel/ExpansionPanel.js.map +1 -1
- package/dist/expansion-panel/ExpansionPanelHeader.d.ts +4 -7
- package/dist/expansion-panel/ExpansionPanelHeader.js +9 -10
- package/dist/expansion-panel/ExpansionPanelHeader.js.map +1 -1
- package/dist/expansion-panel/_expansion-panel.scss +45 -0
- package/dist/expansion-panel/expansionPanelStyles.d.ts +20 -0
- package/dist/expansion-panel/expansionPanelStyles.js +12 -0
- package/dist/expansion-panel/expansionPanelStyles.js.map +1 -1
- package/dist/expansion-panel/useExpansionList.d.ts +7 -8
- package/dist/expansion-panel/useExpansionList.js +7 -8
- package/dist/expansion-panel/useExpansionList.js.map +1 -1
- package/dist/expansion-panel/useExpansionPanels.d.ts +7 -10
- package/dist/expansion-panel/useExpansionPanels.js +7 -10
- package/dist/expansion-panel/useExpansionPanels.js.map +1 -1
- package/dist/files/FileInput.d.ts +4 -2
- package/dist/files/FileInput.js +3 -1
- package/dist/files/FileInput.js.map +1 -1
- package/dist/files/_files.scss +9 -0
- package/dist/files/styles.d.ts +1 -1
- package/dist/files/styles.js +1 -1
- package/dist/files/styles.js.map +1 -1
- package/dist/files/useFileUpload.d.ts +2 -0
- package/dist/files/useFileUpload.js +2 -0
- package/dist/files/useFileUpload.js.map +1 -1
- package/dist/focus/useFocusContainer.js +24 -23
- package/dist/focus/useFocusContainer.js.map +1 -1
- package/dist/form/Checkbox.d.ts +3 -1
- package/dist/form/Checkbox.js +3 -1
- package/dist/form/Checkbox.js.map +1 -1
- package/dist/form/Fieldset.d.ts +6 -20
- package/dist/form/Fieldset.js +6 -13
- package/dist/form/Fieldset.js.map +1 -1
- package/dist/form/Form.d.ts +2 -0
- package/dist/form/Form.js +2 -0
- package/dist/form/Form.js.map +1 -1
- package/dist/form/FormMessage.d.ts +2 -0
- package/dist/form/FormMessage.js +2 -0
- package/dist/form/FormMessage.js.map +1 -1
- package/dist/form/FormMessageContainer.d.ts +1 -0
- package/dist/form/FormMessageContainer.js +1 -0
- package/dist/form/FormMessageContainer.js.map +1 -1
- package/dist/form/FormMessageCounter.d.ts +2 -0
- package/dist/form/FormMessageCounter.js +2 -0
- package/dist/form/FormMessageCounter.js.map +1 -1
- package/dist/form/InputToggle.d.ts +4 -2
- package/dist/form/InputToggle.js +2 -0
- package/dist/form/InputToggle.js.map +1 -1
- package/dist/form/Label.d.ts +4 -5
- package/dist/form/Label.js +4 -32
- package/dist/form/Label.js.map +1 -1
- package/dist/form/Legend.d.ts +1 -0
- package/dist/form/Legend.js +1 -0
- package/dist/form/Legend.js.map +1 -1
- package/dist/form/Listbox.d.ts +1 -1
- package/dist/form/Listbox.js.map +1 -1
- package/dist/form/MenuItemCheckbox.d.ts +3 -1
- package/dist/form/MenuItemCheckbox.js +3 -1
- package/dist/form/MenuItemCheckbox.js.map +1 -1
- package/dist/form/MenuItemFileInput.d.ts +1 -0
- package/dist/form/MenuItemFileInput.js +1 -0
- package/dist/form/MenuItemFileInput.js.map +1 -1
- package/dist/form/MenuItemInputToggle.d.ts +3 -2
- package/dist/form/MenuItemInputToggle.js +1 -0
- package/dist/form/MenuItemInputToggle.js.map +1 -1
- package/dist/form/MenuItemRadio.d.ts +8 -8
- package/dist/form/MenuItemRadio.js +8 -8
- package/dist/form/MenuItemRadio.js.map +1 -1
- package/dist/form/MenuItemSwitch.d.ts +3 -1
- package/dist/form/MenuItemSwitch.js +3 -1
- package/dist/form/MenuItemSwitch.js.map +1 -1
- package/dist/form/MenuItemTextField.d.ts +1 -0
- package/dist/form/MenuItemTextField.js +1 -0
- package/dist/form/MenuItemTextField.js.map +1 -1
- package/dist/form/NativeSelect.d.ts +2 -0
- package/dist/form/NativeSelect.js +2 -0
- package/dist/form/NativeSelect.js.map +1 -1
- package/dist/form/OptGroup.d.ts +4 -1
- package/dist/form/OptGroup.js +4 -1
- package/dist/form/OptGroup.js.map +1 -1
- package/dist/form/Option.d.ts +2 -1
- package/dist/form/Option.js +1 -0
- package/dist/form/Option.js.map +1 -1
- package/dist/form/Password.d.ts +3 -1
- package/dist/form/Password.js +3 -1
- package/dist/form/Password.js.map +1 -1
- package/dist/form/Radio.d.ts +2 -0
- package/dist/form/Radio.js +2 -0
- package/dist/form/Radio.js.map +1 -1
- package/dist/form/Select.d.ts +5 -28
- package/dist/form/Select.js +4 -27
- package/dist/form/Select.js.map +1 -1
- package/dist/form/Slider.d.ts +9 -2
- package/dist/form/Slider.js.map +1 -1
- package/dist/form/SliderContainer.js +7 -11
- package/dist/form/SliderContainer.js.map +1 -1
- package/dist/form/SliderMark.js +5 -8
- package/dist/form/SliderMark.js.map +1 -1
- package/dist/form/SliderMarkLabel.js +5 -7
- package/dist/form/SliderMarkLabel.js.map +1 -1
- package/dist/form/SliderThumb.js +2 -27
- package/dist/form/SliderThumb.js.map +1 -1
- package/dist/form/SliderTrack.js +6 -12
- package/dist/form/SliderTrack.js.map +1 -1
- package/dist/form/SliderValueTooltip.js +7 -7
- package/dist/form/SliderValueTooltip.js.map +1 -1
- package/dist/form/Switch.d.ts +9 -1
- package/dist/form/Switch.js +3 -1
- package/dist/form/Switch.js.map +1 -1
- package/dist/form/SwitchTrack.js +8 -8
- package/dist/form/SwitchTrack.js.map +1 -1
- package/dist/form/TextArea.d.ts +9 -1
- package/dist/form/TextArea.js +3 -1
- package/dist/form/TextArea.js.map +1 -1
- package/dist/form/TextField.d.ts +3 -1
- package/dist/form/TextField.js +3 -1
- package/dist/form/TextField.js.map +1 -1
- package/dist/form/TextFieldAddon.d.ts +1 -34
- package/dist/form/TextFieldAddon.js +1 -16
- package/dist/form/TextFieldAddon.js.map +1 -1
- package/dist/form/TextFieldContainer.d.ts +13 -0
- package/dist/form/TextFieldContainer.js.map +1 -1
- package/dist/form/_form.scss +737 -10
- package/dist/form/fieldsetStyles.d.ts +19 -0
- package/dist/form/fieldsetStyles.js +14 -0
- package/dist/form/fieldsetStyles.js.map +1 -0
- package/dist/form/formConfig.js +22 -3
- package/dist/form/formConfig.js.map +1 -1
- package/dist/form/labelStyles.d.ts +5 -0
- package/dist/form/labelStyles.js +34 -0
- package/dist/form/labelStyles.js.map +1 -0
- package/dist/form/sliderStyles.d.ts +89 -0
- package/dist/form/sliderStyles.js +96 -0
- package/dist/form/sliderStyles.js.map +1 -0
- package/dist/form/switchStyles.d.ts +24 -6
- package/dist/form/switchStyles.js +18 -0
- package/dist/form/switchStyles.js.map +1 -1
- package/dist/form/textAreaStyles.d.ts +0 -6
- package/dist/form/textAreaStyles.js.map +1 -1
- package/dist/form/textFieldAddonStyles.d.ts +17 -0
- package/dist/form/textFieldAddonStyles.js +18 -0
- package/dist/form/textFieldAddonStyles.js.map +1 -0
- package/dist/form/textFieldContainerStyles.d.ts +0 -13
- package/dist/form/textFieldContainerStyles.js.map +1 -1
- package/dist/form/types.d.ts +23 -2
- package/dist/form/types.js.map +1 -1
- package/dist/form/useCheckboxGroup.d.ts +8 -0
- package/dist/form/useCheckboxGroup.js +6 -1
- package/dist/form/useCheckboxGroup.js.map +1 -1
- package/dist/form/useCombobox.d.ts +0 -1
- package/dist/form/useCombobox.js +66 -63
- package/dist/form/useCombobox.js.map +1 -1
- package/dist/form/useNumberField.d.ts +17 -7
- package/dist/form/useNumberField.js +2 -0
- package/dist/form/useNumberField.js.map +1 -1
- package/dist/form/useRadioGroup.d.ts +6 -0
- package/dist/form/useRadioGroup.js +3 -0
- package/dist/form/useRadioGroup.js.map +1 -1
- package/dist/form/useRangeSlider.d.ts +6 -1
- package/dist/form/useRangeSlider.js +6 -1
- package/dist/form/useRangeSlider.js.map +1 -1
- package/dist/form/useSlider.d.ts +4 -1
- package/dist/form/useSlider.js +4 -1
- package/dist/form/useSlider.js.map +1 -1
- package/dist/form/useTextField.d.ts +7 -1
- package/dist/form/useTextField.js +5 -1
- package/dist/form/useTextField.js.map +1 -1
- package/dist/form/validation.d.ts +1 -0
- package/dist/form/validation.js.map +1 -1
- package/dist/icon/FontIcon.d.ts +1 -0
- package/dist/icon/FontIcon.js +1 -0
- package/dist/icon/FontIcon.js.map +1 -1
- package/dist/icon/IconRotator.d.ts +2 -0
- package/dist/icon/IconRotator.js +2 -0
- package/dist/icon/IconRotator.js.map +1 -1
- package/dist/icon/MaterialIcon.d.ts +2 -0
- package/dist/icon/MaterialIcon.js +2 -0
- package/dist/icon/MaterialIcon.js.map +1 -1
- package/dist/icon/MaterialSymbol.d.ts +3 -1
- package/dist/icon/MaterialSymbol.js +3 -1
- package/dist/icon/MaterialSymbol.js.map +1 -1
- package/dist/icon/SVGIcon.d.ts +2 -0
- package/dist/icon/SVGIcon.js +2 -0
- package/dist/icon/SVGIcon.js.map +1 -1
- package/dist/icon/TextIconSpacing.d.ts +6 -2
- package/dist/icon/TextIconSpacing.js +6 -2
- package/dist/icon/TextIconSpacing.js.map +1 -1
- package/dist/icon/_icon.scss +137 -129
- package/dist/icon/config.d.ts +2 -2
- package/dist/icon/config.js +2 -2
- package/dist/icon/config.js.map +1 -1
- package/dist/icon/material.d.ts +1 -1
- package/dist/icon/material.js.map +1 -1
- package/dist/icon/styles.d.ts +2 -1
- package/dist/icon/styles.js.map +1 -1
- package/dist/interaction/Ripple.d.ts +11 -2
- package/dist/interaction/Ripple.js.map +1 -1
- package/dist/interaction/UserInteractionModeProvider.d.ts +1 -1
- package/dist/interaction/UserInteractionModeProvider.js +1 -1
- package/dist/interaction/UserInteractionModeProvider.js.map +1 -1
- package/dist/interaction/_interaction.scss +279 -13
- package/dist/layout/LayoutAppBar.d.ts +1 -0
- package/dist/layout/LayoutAppBar.js +1 -0
- package/dist/layout/LayoutAppBar.js.map +1 -1
- package/dist/layout/LayoutNav.d.ts +9 -12
- package/dist/layout/LayoutNav.js +9 -12
- package/dist/layout/LayoutNav.js.map +1 -1
- package/dist/layout/LayoutWindowSplitter.d.ts +7 -8
- package/dist/layout/LayoutWindowSplitter.js +7 -8
- package/dist/layout/LayoutWindowSplitter.js.map +1 -1
- package/dist/layout/Main.d.ts +2 -1
- package/dist/layout/Main.js +2 -1
- package/dist/layout/Main.js.map +1 -1
- package/dist/layout/_layout.scss +106 -23
- package/dist/layout/useExpandableLayout.d.ts +1 -0
- package/dist/layout/useExpandableLayout.js +1 -0
- package/dist/layout/useExpandableLayout.js.map +1 -1
- package/dist/layout/useHorizontalLayoutTransition.d.ts +9 -6
- package/dist/layout/useHorizontalLayoutTransition.js +4 -1
- package/dist/layout/useHorizontalLayoutTransition.js.map +1 -1
- package/dist/layout/useLayoutAppBarHeight.d.ts +7 -10
- package/dist/layout/useLayoutAppBarHeight.js +7 -10
- package/dist/layout/useLayoutAppBarHeight.js.map +1 -1
- package/dist/layout/useLayoutTree.d.ts +3 -0
- package/dist/layout/useLayoutTree.js +3 -0
- package/dist/layout/useLayoutTree.js.map +1 -1
- package/dist/layout/useLayoutWindowSplitter.d.ts +4 -2
- package/dist/layout/useLayoutWindowSplitter.js +4 -2
- package/dist/layout/useLayoutWindowSplitter.js.map +1 -1
- package/dist/layout/useResizableLayout.d.ts +1 -0
- package/dist/layout/useResizableLayout.js +3 -1
- package/dist/layout/useResizableLayout.js.map +1 -1
- package/dist/layout/useTemporaryLayout.d.ts +1 -0
- package/dist/layout/useTemporaryLayout.js +1 -0
- package/dist/layout/useTemporaryLayout.js.map +1 -1
- package/dist/link/Link.d.ts +3 -1
- package/dist/link/Link.js +3 -1
- package/dist/link/Link.js.map +1 -1
- package/dist/link/SkipToMainContent.d.ts +22 -0
- package/dist/link/SkipToMainContent.js +22 -0
- package/dist/link/SkipToMainContent.js.map +1 -1
- package/dist/link/_link.scss +55 -6
- package/dist/list/List.d.ts +11 -1
- package/dist/list/List.js +5 -1
- package/dist/list/List.js.map +1 -1
- package/dist/list/ListItem.d.ts +22 -2
- package/dist/list/ListItem.js +6 -2
- package/dist/list/ListItem.js.map +1 -1
- package/dist/list/ListItemChildren.d.ts +3 -1
- package/dist/list/ListItemChildren.js +3 -1
- package/dist/list/ListItemChildren.js.map +1 -1
- package/dist/list/ListItemLink.d.ts +32 -1
- package/dist/list/ListItemLink.js +32 -1
- package/dist/list/ListItemLink.js.map +1 -1
- package/dist/list/ListSubheader.d.ts +2 -0
- package/dist/list/ListSubheader.js +2 -0
- package/dist/list/ListSubheader.js.map +1 -1
- package/dist/list/_list.scss +224 -1
- package/dist/list/listItemStyles.d.ts +0 -16
- package/dist/list/listItemStyles.js.map +1 -1
- package/dist/list/listStyles.d.ts +0 -6
- package/dist/list/listStyles.js.map +1 -1
- package/dist/media-queries/AppSizeProvider.d.ts +2 -0
- package/dist/media-queries/AppSizeProvider.js +2 -0
- package/dist/media-queries/AppSizeProvider.js.map +1 -1
- package/dist/media-queries/_media-queries.scss +111 -4
- package/dist/media-queries/useMediaQuery.d.ts +2 -0
- package/dist/media-queries/useMediaQuery.js +2 -0
- package/dist/media-queries/useMediaQuery.js.map +1 -1
- package/dist/menu/DropdownMenu.d.ts +5 -2
- package/dist/menu/DropdownMenu.js +5 -2
- package/dist/menu/DropdownMenu.js.map +1 -1
- package/dist/menu/Menu.d.ts +1 -0
- package/dist/menu/Menu.js +1 -0
- package/dist/menu/Menu.js.map +1 -1
- package/dist/menu/MenuBar.d.ts +4 -1
- package/dist/menu/MenuBar.js +4 -1
- package/dist/menu/MenuBar.js.map +1 -1
- package/dist/menu/MenuButton.d.ts +1 -0
- package/dist/menu/MenuButton.js +1 -0
- package/dist/menu/MenuButton.js.map +1 -1
- package/dist/menu/MenuItem.d.ts +1 -0
- package/dist/menu/MenuItem.js +1 -0
- package/dist/menu/MenuItem.js.map +1 -1
- package/dist/menu/MenuItemCircularProgress.d.ts +4 -6
- package/dist/menu/MenuItemCircularProgress.js +4 -6
- package/dist/menu/MenuItemCircularProgress.js.map +1 -1
- package/dist/menu/MenuItemGroup.d.ts +6 -7
- package/dist/menu/MenuItemGroup.js +6 -7
- package/dist/menu/MenuItemGroup.js.map +1 -1
- package/dist/menu/MenuItemSeparator.d.ts +1 -0
- package/dist/menu/MenuItemSeparator.js +1 -0
- package/dist/menu/MenuItemSeparator.js.map +1 -1
- package/dist/menu/MenuWidget.d.ts +0 -12
- package/dist/menu/MenuWidget.js +1 -12
- package/dist/menu/MenuWidget.js.map +1 -1
- package/dist/menu/_menu.scss +61 -0
- package/dist/menu/styles.d.ts +12 -0
- package/dist/menu/styles.js +14 -0
- package/dist/menu/styles.js.map +1 -0
- package/dist/menu/useContextMenu.d.ts +4 -1
- package/dist/menu/useContextMenu.js +4 -1
- package/dist/menu/useContextMenu.js.map +1 -1
- package/dist/movement/useKeyboardMovementProvider.d.ts +3 -3
- package/dist/movement/useKeyboardMovementProvider.js +3 -3
- package/dist/movement/useKeyboardMovementProvider.js.map +1 -1
- package/dist/navigation/CollapsibleNavGroup.d.ts +1 -0
- package/dist/navigation/CollapsibleNavGroup.js +1 -0
- package/dist/navigation/CollapsibleNavGroup.js.map +1 -1
- package/dist/navigation/DefaultNavigationRenderer.d.ts +1 -0
- package/dist/navigation/DefaultNavigationRenderer.js +1 -0
- package/dist/navigation/DefaultNavigationRenderer.js.map +1 -1
- package/dist/navigation/NavGroup.d.ts +1 -0
- package/dist/navigation/NavGroup.js +1 -0
- package/dist/navigation/NavGroup.js.map +1 -1
- package/dist/navigation/NavItem.d.ts +1 -0
- package/dist/navigation/NavItem.js +1 -0
- package/dist/navigation/NavItem.js.map +1 -1
- package/dist/navigation/NavItemButton.d.ts +1 -0
- package/dist/navigation/NavItemButton.js +1 -0
- package/dist/navigation/NavItemButton.js.map +1 -1
- package/dist/navigation/NavItemLink.d.ts +1 -0
- package/dist/navigation/NavItemLink.js +1 -0
- package/dist/navigation/NavItemLink.js.map +1 -1
- package/dist/navigation/NavSubheader.d.ts +1 -0
- package/dist/navigation/NavSubheader.js +1 -0
- package/dist/navigation/NavSubheader.js.map +1 -1
- package/dist/navigation/Navigation.d.ts +44 -0
- package/dist/navigation/Navigation.js +44 -0
- package/dist/navigation/Navigation.js.map +1 -1
- package/dist/navigation/_navigation.scss +47 -5
- package/dist/navigation/getTableOfContentsHeadings.d.ts +20 -0
- package/dist/navigation/getTableOfContentsHeadings.js +53 -0
- package/dist/navigation/getTableOfContentsHeadings.js.map +1 -0
- package/dist/navigation/navItemStyles.js +1 -1
- package/dist/navigation/navItemStyles.js.map +1 -1
- package/dist/navigation/types.d.ts +47 -0
- package/dist/navigation/types.js +1 -3
- package/dist/navigation/types.js.map +1 -1
- package/dist/navigation/useActiveHeadingId.d.ts +2 -12
- package/dist/navigation/useActiveHeadingId.js +1 -0
- package/dist/navigation/useActiveHeadingId.js.map +1 -1
- package/dist/navigation/useNavigationExpansion.d.ts +2 -0
- package/dist/navigation/useNavigationExpansion.js +2 -0
- package/dist/navigation/useNavigationExpansion.js.map +1 -1
- package/dist/navigation/useTableOfContentsHeadings.d.ts +3 -37
- package/dist/navigation/useTableOfContentsHeadings.js +18 -41
- package/dist/navigation/useTableOfContentsHeadings.js.map +1 -1
- package/dist/overlay/Overlay.d.ts +10 -1
- package/dist/overlay/Overlay.js +5 -2
- package/dist/overlay/Overlay.js.map +1 -1
- package/dist/overlay/_overlay.scss +35 -0
- package/dist/overlay/{overlayStyles.d.ts → styles.d.ts} +0 -6
- package/dist/overlay/{overlayStyles.js → styles.js} +1 -1
- package/dist/overlay/styles.js.map +1 -0
- package/dist/portal/Portal.d.ts +1 -0
- package/dist/portal/Portal.js +1 -0
- package/dist/portal/Portal.js.map +1 -1
- package/dist/portal/PortalContainerProvider.d.ts +1 -0
- package/dist/portal/PortalContainerProvider.js +1 -0
- package/dist/portal/PortalContainerProvider.js.map +1 -1
- package/dist/positioning/createHorizontalPosition.d.ts +6 -6
- package/dist/positioning/createHorizontalPosition.js +12 -12
- package/dist/positioning/createHorizontalPosition.js.map +1 -1
- package/dist/positioning/createVerticalPosition.d.ts +6 -6
- package/dist/positioning/createVerticalPosition.js +2 -2
- package/dist/positioning/createVerticalPosition.js.map +1 -1
- package/dist/positioning/useFixedPositioning.d.ts +1 -0
- package/dist/positioning/useFixedPositioning.js +1 -0
- package/dist/positioning/useFixedPositioning.js.map +1 -1
- package/dist/progress/CircularProgress.d.ts +3 -2
- package/dist/progress/CircularProgress.js +3 -2
- package/dist/progress/CircularProgress.js.map +1 -1
- package/dist/progress/LinearProgress.d.ts +3 -2
- package/dist/progress/LinearProgress.js +3 -2
- package/dist/progress/LinearProgress.js.map +1 -1
- package/dist/progress/_progress.scss +164 -38
- package/dist/responsive-item/ResponsiveItem.d.ts +4 -3
- package/dist/responsive-item/ResponsiveItem.js +4 -3
- package/dist/responsive-item/ResponsiveItem.js.map +1 -1
- package/dist/responsive-item/ResponsiveItemOverlay.d.ts +6 -4
- package/dist/responsive-item/ResponsiveItemOverlay.js +6 -4
- package/dist/responsive-item/ResponsiveItemOverlay.js.map +1 -1
- package/dist/responsive-item/_responsive-item.scss +89 -0
- package/dist/scroll/useScrollLock.d.ts +1 -0
- package/dist/scroll/useScrollLock.js +1 -0
- package/dist/scroll/useScrollLock.js.map +1 -1
- package/dist/searching/fuzzy.d.ts +2 -1
- package/dist/searching/fuzzy.js +2 -1
- package/dist/searching/fuzzy.js.map +1 -1
- package/dist/segmented-button/SegmentedButton.d.ts +3 -4
- package/dist/segmented-button/SegmentedButton.js +3 -4
- package/dist/segmented-button/SegmentedButton.js.map +1 -1
- package/dist/segmented-button/SegmentedButtonContainer.d.ts +5 -6
- package/dist/segmented-button/SegmentedButtonContainer.js +7 -8
- package/dist/segmented-button/SegmentedButtonContainer.js.map +1 -1
- package/dist/segmented-button/_segmented-button.scss +79 -33
- package/dist/segmented-button/segmentedButtonContainerStyles.d.ts +1 -1
- package/dist/segmented-button/segmentedButtonContainerStyles.js +1 -1
- package/dist/segmented-button/segmentedButtonContainerStyles.js.map +1 -1
- package/dist/sheet/Sheet.d.ts +14 -0
- package/dist/sheet/Sheet.js +2 -0
- package/dist/sheet/Sheet.js.map +1 -1
- package/dist/sheet/_sheet.scss +84 -0
- package/dist/sheet/styles.d.ts +19 -15
- package/dist/sheet/styles.js +6 -2
- package/dist/sheet/styles.js.map +1 -1
- package/dist/snackbar/DefaultToastRenderer.d.ts +1 -0
- package/dist/snackbar/DefaultToastRenderer.js +1 -0
- package/dist/snackbar/DefaultToastRenderer.js.map +1 -1
- package/dist/snackbar/Snackbar.d.ts +10 -9
- package/dist/snackbar/Snackbar.js +4 -1
- package/dist/snackbar/Snackbar.js.map +1 -1
- package/dist/snackbar/Toast.d.ts +8 -0
- package/dist/snackbar/Toast.js +1 -0
- package/dist/snackbar/Toast.js.map +1 -1
- package/dist/snackbar/ToastActionButton.d.ts +2 -1
- package/dist/snackbar/ToastActionButton.js +1 -0
- package/dist/snackbar/ToastActionButton.js.map +1 -1
- package/dist/snackbar/ToastCloseButton.d.ts +2 -1
- package/dist/snackbar/ToastCloseButton.js +1 -0
- package/dist/snackbar/ToastCloseButton.js.map +1 -1
- package/dist/snackbar/ToastContent.d.ts +1 -0
- package/dist/snackbar/ToastContent.js +1 -0
- package/dist/snackbar/ToastContent.js.map +1 -1
- package/dist/snackbar/ToastManager.d.ts +1 -1
- package/dist/snackbar/ToastManager.js +1 -1
- package/dist/snackbar/ToastManager.js.map +1 -1
- package/dist/snackbar/ToastManagerProvider.d.ts +1 -0
- package/dist/snackbar/ToastManagerProvider.js +1 -0
- package/dist/snackbar/ToastManagerProvider.js.map +1 -1
- package/dist/snackbar/_snackbar.scss +131 -3
- package/dist/snackbar/toastStyles.d.ts +0 -7
- package/dist/snackbar/toastStyles.js.map +1 -1
- package/dist/snackbar/useCurrentToastActions.d.ts +1 -0
- package/dist/snackbar/useCurrentToastActions.js +1 -0
- package/dist/snackbar/useCurrentToastActions.js.map +1 -1
- package/dist/storage/useStorage.d.ts +1 -0
- package/dist/storage/useStorage.js +1 -0
- package/dist/storage/useStorage.js.map +1 -1
- package/dist/suspense/CircularProgressSuspense.d.ts +2 -1
- package/dist/suspense/CircularProgressSuspense.js +2 -1
- package/dist/suspense/CircularProgressSuspense.js.map +1 -1
- package/dist/suspense/NullSuspense.d.ts +2 -1
- package/dist/suspense/NullSuspense.js +2 -1
- package/dist/suspense/NullSuspense.js.map +1 -1
- package/dist/table/StickyTableSection.d.ts +2 -0
- package/dist/table/StickyTableSection.js +2 -0
- package/dist/table/StickyTableSection.js.map +1 -1
- package/dist/table/Table.d.ts +8 -8
- package/dist/table/Table.js +8 -8
- package/dist/table/Table.js.map +1 -1
- package/dist/table/TableBody.d.ts +2 -0
- package/dist/table/TableBody.js +2 -0
- package/dist/table/TableBody.js.map +1 -1
- package/dist/table/TableCell.d.ts +6 -2
- package/dist/table/TableCell.js +2 -0
- package/dist/table/TableCell.js.map +1 -1
- package/dist/table/TableCheckbox.d.ts +11 -12
- package/dist/table/TableCheckbox.js +10 -11
- package/dist/table/TableCheckbox.js.map +1 -1
- package/dist/table/TableConfigurationProvider.js +1 -1
- package/dist/table/TableConfigurationProvider.js.map +1 -1
- package/dist/table/TableContainer.d.ts +2 -0
- package/dist/table/TableContainer.js +2 -0
- package/dist/table/TableContainer.js.map +1 -1
- package/dist/table/TableContainerProvider.js +1 -1
- package/dist/table/TableContainerProvider.js.map +1 -1
- package/dist/table/TableFooter.d.ts +2 -0
- package/dist/table/TableFooter.js +2 -0
- package/dist/table/TableFooter.js.map +1 -1
- package/dist/table/TableHeader.d.ts +2 -0
- package/dist/table/TableHeader.js +2 -0
- package/dist/table/TableHeader.js.map +1 -1
- package/dist/table/TableRadio.d.ts +13 -13
- package/dist/table/TableRadio.js +10 -10
- package/dist/table/TableRadio.js.map +1 -1
- package/dist/table/TableRow.d.ts +2 -0
- package/dist/table/TableRow.js +2 -0
- package/dist/table/TableRow.js.map +1 -1
- package/dist/table/_table.scss +209 -11
- package/dist/table/tableCellStyles.js +3 -2
- package/dist/table/tableCellStyles.js.map +1 -1
- package/dist/tabs/SimpleTabPanel.d.ts +2 -0
- package/dist/tabs/SimpleTabPanel.js +2 -0
- package/dist/tabs/SimpleTabPanel.js.map +1 -1
- package/dist/tabs/SimpleTabPanels.d.ts +2 -0
- package/dist/tabs/SimpleTabPanels.js +2 -0
- package/dist/tabs/SimpleTabPanels.js.map +1 -1
- package/dist/tabs/Tab.d.ts +19 -1
- package/dist/tabs/Tab.js +1 -1
- package/dist/tabs/Tab.js.map +1 -1
- package/dist/tabs/TabList.d.ts +1 -1
- package/dist/tabs/TabList.js +1 -1
- package/dist/tabs/TabList.js.map +1 -1
- package/dist/tabs/TabListScrollButton.d.ts +1 -1
- package/dist/tabs/TabListScrollButton.js.map +1 -1
- package/dist/tabs/_tabs.scss +142 -5
- package/dist/tabs/tabStyles.d.ts +0 -18
- package/dist/tabs/tabStyles.js.map +1 -1
- package/dist/tabs/useTabs.d.ts +4 -0
- package/dist/tabs/useTabs.js +3 -2
- package/dist/tabs/useTabs.js.map +1 -1
- package/dist/test-utils/jest-globals/match-media.d.ts +1 -2
- package/dist/test-utils/jest-globals/match-media.js +1 -1
- package/dist/test-utils/jest-globals/match-media.js.map +1 -1
- package/dist/test-utils/jest-globals/resize-observer.js +2 -2
- package/dist/test-utils/jest-globals/resize-observer.js.map +1 -1
- package/dist/test-utils/mocks/ResizeObserver.d.ts +7 -7
- package/dist/test-utils/mocks/ResizeObserver.js +7 -7
- package/dist/test-utils/mocks/ResizeObserver.js.map +1 -1
- package/dist/test-utils/mocks/match-media.d.ts +31 -0
- package/dist/test-utils/mocks/match-media.js.map +1 -1
- package/dist/test-utils/utils/createMatchMediaSpy.d.ts +40 -0
- package/dist/test-utils/{mocks/match-media-implementation.js → utils/createMatchMediaSpy.js} +33 -4
- package/dist/test-utils/utils/createMatchMediaSpy.js.map +1 -0
- package/dist/test-utils/vitest/match-media.d.ts +1 -2
- package/dist/test-utils/vitest/match-media.js +1 -1
- package/dist/test-utils/vitest/match-media.js.map +1 -1
- package/dist/test-utils/vitest/resize-observer.js +2 -2
- package/dist/test-utils/vitest/resize-observer.js.map +1 -1
- package/dist/theme/LocalStorageColorSchemeProvider.d.ts +6 -6
- package/dist/theme/LocalStorageColorSchemeProvider.js +6 -6
- package/dist/theme/LocalStorageColorSchemeProvider.js.map +1 -1
- package/dist/theme/ThemeProvider.d.ts +10 -11
- package/dist/theme/ThemeProvider.js +7 -9
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/_a11y.scss +62 -62
- package/dist/theme/_colors.scss +283 -279
- package/dist/theme/_theme.scss +298 -249
- package/dist/theme/colors.d.ts +2 -2
- package/dist/theme/colors.js +2 -2
- package/dist/theme/colors.js.map +1 -1
- package/dist/theme/useColorScheme.d.ts +1 -1
- package/dist/theme/useColorScheme.js +1 -1
- package/dist/theme/useColorScheme.js.map +1 -1
- package/dist/tooltip/Tooltip.d.ts +12 -1
- package/dist/tooltip/Tooltip.js +6 -2
- package/dist/tooltip/Tooltip.js.map +1 -1
- package/dist/tooltip/TooltipHoverModeProvider.d.ts +1 -0
- package/dist/tooltip/TooltipHoverModeProvider.js +1 -0
- package/dist/tooltip/TooltipHoverModeProvider.js.map +1 -1
- package/dist/tooltip/_tooltip.scss +109 -5
- package/dist/tooltip/constants.d.ts +13 -3
- package/dist/tooltip/constants.js +4 -4
- package/dist/tooltip/constants.js.map +1 -1
- package/dist/tooltip/{tooltipStyles.d.ts → styles.d.ts} +1 -1
- package/dist/tooltip/{tooltipStyles.js → styles.js} +1 -1
- package/dist/tooltip/styles.js.map +1 -0
- package/dist/tooltip/useTooltip.d.ts +8 -15
- package/dist/tooltip/useTooltip.js +8 -8
- package/dist/tooltip/useTooltip.js.map +1 -1
- package/dist/transition/CSSTransition.d.ts +3 -1
- package/dist/transition/CSSTransition.js +3 -1
- package/dist/transition/CSSTransition.js.map +1 -1
- package/dist/transition/Collapse.d.ts +1 -0
- package/dist/transition/Collapse.js +1 -0
- package/dist/transition/Collapse.js.map +1 -1
- package/dist/transition/CrossFade.d.ts +1 -0
- package/dist/transition/CrossFade.js +1 -0
- package/dist/transition/CrossFade.js.map +1 -1
- package/dist/transition/ScaleTransition.d.ts +4 -1
- package/dist/transition/ScaleTransition.js +4 -1
- package/dist/transition/ScaleTransition.js.map +1 -1
- package/dist/transition/SkeletonPlaceholder.d.ts +3 -2
- package/dist/transition/SkeletonPlaceholder.js +3 -2
- package/dist/transition/SkeletonPlaceholder.js.map +1 -1
- package/dist/transition/Slide.d.ts +1 -0
- package/dist/transition/Slide.js +1 -0
- package/dist/transition/Slide.js.map +1 -1
- package/dist/transition/SlideContainer.d.ts +10 -7
- package/dist/transition/SlideContainer.js +12 -8
- package/dist/transition/SlideContainer.js.map +1 -1
- package/dist/transition/_transition.scss +178 -6
- package/dist/transition/getTransitionCallbacks.d.ts +76 -0
- package/dist/transition/getTransitionCallbacks.js +57 -0
- package/dist/transition/getTransitionCallbacks.js.map +1 -0
- package/dist/transition/skeletonPlaceholderUtils.d.ts +4 -1
- package/dist/transition/skeletonPlaceholderUtils.js +4 -1
- package/dist/transition/skeletonPlaceholderUtils.js.map +1 -1
- package/dist/transition/types.d.ts +26 -1
- package/dist/transition/types.js.map +1 -1
- package/dist/transition/useCSSTransition.d.ts +2 -0
- package/dist/transition/useCSSTransition.js +2 -0
- package/dist/transition/useCSSTransition.js.map +1 -1
- package/dist/transition/useCarousel.d.ts +6 -2
- package/dist/transition/useCarousel.js +11 -7
- package/dist/transition/useCarousel.js.map +1 -1
- package/dist/transition/useCollapseTransition.d.ts +7 -2
- package/dist/transition/useCollapseTransition.js +2 -0
- package/dist/transition/useCollapseTransition.js.map +1 -1
- package/dist/transition/useCrossFadeTransition.d.ts +22 -45
- package/dist/transition/useCrossFadeTransition.js +17 -49
- package/dist/transition/useCrossFadeTransition.js.map +1 -1
- package/dist/transition/useScaleTransition.d.ts +22 -16
- package/dist/transition/useScaleTransition.js +20 -14
- package/dist/transition/useScaleTransition.js.map +1 -1
- package/dist/transition/useSkeletonPlaceholder.d.ts +6 -3
- package/dist/transition/useSkeletonPlaceholder.js +3 -0
- package/dist/transition/useSkeletonPlaceholder.js.map +1 -1
- package/dist/transition/useSlideTransition.d.ts +9 -3
- package/dist/transition/useSlideTransition.js +1 -0
- package/dist/transition/useSlideTransition.js.map +1 -1
- package/dist/transition/useTransition.d.ts +1 -0
- package/dist/transition/useTransition.js +3 -2
- package/dist/transition/useTransition.js.map +1 -1
- package/dist/tree/DefaultTreeItemRenderer.d.ts +1 -0
- package/dist/tree/DefaultTreeItemRenderer.js +1 -0
- package/dist/tree/DefaultTreeItemRenderer.js.map +1 -1
- package/dist/tree/Tree.d.ts +8 -9
- package/dist/tree/Tree.js +4 -3
- package/dist/tree/Tree.js.map +1 -1
- package/dist/tree/TreeItem.d.ts +1 -0
- package/dist/tree/TreeItem.js +1 -0
- package/dist/tree/TreeItem.js.map +1 -1
- package/dist/tree/_tree.scss +71 -1
- package/dist/tree/types.d.ts +1 -1
- package/dist/tree/types.js.map +1 -1
- package/dist/tree/useTree.d.ts +4 -2
- package/dist/tree/useTree.js +4 -2
- package/dist/tree/useTree.js.map +1 -1
- package/dist/tree/useTreeExpansion.d.ts +1 -0
- package/dist/tree/useTreeExpansion.js +1 -0
- package/dist/tree/useTreeExpansion.js.map +1 -1
- package/dist/tree/useTreeItems.d.ts +1 -0
- package/dist/tree/useTreeItems.js +1 -0
- package/dist/tree/useTreeItems.js.map +1 -1
- package/dist/tree/useTreeSelection.d.ts +1 -0
- package/dist/tree/useTreeSelection.js +1 -0
- package/dist/tree/useTreeSelection.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js.map +1 -1
- package/dist/typography/HighlightText.d.ts +76 -0
- package/dist/typography/HighlightText.js +60 -0
- package/dist/typography/HighlightText.js.map +1 -0
- package/dist/typography/HighlightTextMark.d.ts +16 -0
- package/dist/typography/HighlightTextMark.js +16 -0
- package/dist/typography/HighlightTextMark.js.map +1 -0
- package/dist/typography/Mark.d.ts +27 -0
- package/dist/typography/Mark.js +34 -0
- package/dist/typography/Mark.js.map +1 -0
- package/dist/typography/SrOnly.d.ts +3 -1
- package/dist/typography/SrOnly.js +3 -1
- package/dist/typography/SrOnly.js.map +1 -1
- package/dist/typography/TextContainer.d.ts +9 -1
- package/dist/typography/TextContainer.js +3 -1
- package/dist/typography/TextContainer.js.map +1 -1
- package/dist/typography/Typography.d.ts +2 -1
- package/dist/typography/Typography.js +2 -1
- package/dist/typography/Typography.js.map +1 -1
- package/dist/typography/WritingDirectionProvider.d.ts +8 -8
- package/dist/typography/WritingDirectionProvider.js +8 -8
- package/dist/typography/WritingDirectionProvider.js.map +1 -1
- package/dist/typography/_typography.scss +392 -51
- package/dist/typography/markStyles.d.ts +10 -0
- package/dist/typography/markStyles.js +11 -0
- package/dist/typography/markStyles.js.map +1 -0
- package/dist/typography/textContainerStyles.d.ts +2 -7
- package/dist/typography/textContainerStyles.js +2 -1
- package/dist/typography/textContainerStyles.js.map +1 -1
- package/dist/typography/typographyStyles.d.ts +2 -2
- package/dist/typography/typographyStyles.js +2 -2
- package/dist/typography/typographyStyles.js.map +1 -1
- package/dist/useAsyncFunction.d.ts +10 -68
- package/dist/useAsyncFunction.js +9 -67
- package/dist/useAsyncFunction.js.map +1 -1
- package/dist/useDebouncedFunction.d.ts +3 -1
- package/dist/useDebouncedFunction.js +3 -1
- package/dist/useDebouncedFunction.js.map +1 -1
- package/dist/useDropzone.d.ts +3 -2
- package/dist/useDropzone.js +3 -2
- package/dist/useDropzone.js.map +1 -1
- package/dist/useThrottledFunction.d.ts +3 -1
- package/dist/useThrottledFunction.js +3 -1
- package/dist/useThrottledFunction.js.map +1 -1
- package/dist/useUnmounted.d.ts +1 -1
- package/dist/useUnmounted.js +1 -1
- package/dist/useUnmounted.js.map +1 -1
- package/dist/utils/RenderRecursively.d.ts +1 -0
- package/dist/utils/RenderRecursively.js +1 -0
- package/dist/utils/RenderRecursively.js.map +1 -1
- package/dist/utils/applyRef.d.ts +1 -1
- package/dist/utils/applyRef.js +1 -1
- package/dist/utils/applyRef.js.map +1 -1
- package/dist/window-splitter/WindowSplitter.d.ts +11 -0
- package/dist/window-splitter/WindowSplitter.js +1 -0
- package/dist/window-splitter/WindowSplitter.js.map +1 -1
- package/dist/window-splitter/_window-splitter.scss +46 -0
- package/dist/window-splitter/useWindowSplitter.d.ts +0 -10
- package/dist/window-splitter/useWindowSplitter.js.map +1 -1
- package/package.json +43 -17
- package/src/CoreProviders.tsx +1 -0
- package/src/NoSsr.tsx +3 -1
- package/src/RootHtml.tsx +1 -1
- package/src/SsrProvider.tsx +1 -0
- package/src/app-bar/AppBar.tsx +3 -1
- package/src/app-bar/AppBarTitle.tsx +2 -1
- package/src/autocomplete/Autocomplete.tsx +85 -3
- package/src/autocomplete/AutocompleteChip.tsx +1 -0
- package/src/autocomplete/AutocompleteCircularProgress.tsx +1 -0
- package/src/autocomplete/AutocompleteClearButton.tsx +3 -1
- package/src/autocomplete/AutocompleteDropdownButton.tsx +1 -0
- package/src/autocomplete/AutocompleteListboxChildren.tsx +2 -3
- package/src/autocomplete/autocompleteStyles.ts +11 -2
- package/src/autocomplete/types.ts +140 -86
- package/src/autocomplete/useAutocomplete.ts +21 -26
- package/src/autocomplete/utils.ts +6 -8
- package/src/avatar/Avatar.tsx +2 -1
- package/src/badge/Badge.tsx +8 -4
- package/src/box/Box.tsx +4 -3
- package/src/button/AsyncButton.tsx +4 -3
- package/src/button/Button.tsx +11 -9
- package/src/button/ButtonUnstyled.tsx +2 -1
- package/src/button/TooltippedButton.tsx +3 -2
- package/src/button/{buttonStyles.ts → styles.ts} +18 -0
- package/src/card/Card.tsx +9 -10
- package/src/card/CardContent.tsx +1 -0
- package/src/card/CardFooter.tsx +1 -0
- package/src/card/CardHeader.tsx +1 -0
- package/src/card/CardSubtitle.tsx +1 -0
- package/src/card/CardTitle.tsx +2 -1
- package/src/card/ClickableCard.tsx +3 -1
- package/src/chip/Chip.tsx +5 -3
- package/src/cssUtils.ts +1 -1
- package/src/dialog/Dialog.tsx +9 -10
- package/src/dialog/DialogContent.tsx +5 -5
- package/src/dialog/DialogFooter.tsx +5 -2
- package/src/dialog/DialogHeader.tsx +31 -5
- package/src/dialog/DialogTitle.tsx +8 -7
- package/src/dialog/FixedDialog.tsx +13 -12
- package/src/dialog/styles.ts +16 -10
- package/src/divider/Divider.tsx +3 -1
- package/src/divider/styles.ts +2 -2
- package/src/draggable/useDraggable.ts +1 -0
- package/src/error-boundary/ErrorBoundary.tsx +103 -0
- package/src/error-boundary/context.ts +16 -0
- package/src/error-boundary/types.ts +19 -0
- package/src/error-boundary/useErrorBoundary.ts +36 -0
- package/src/expansion-panel/ExpansionList.tsx +1 -0
- package/src/expansion-panel/ExpansionPanel.tsx +32 -0
- package/src/expansion-panel/ExpansionPanelHeader.tsx +10 -10
- package/src/expansion-panel/expansionPanelStyles.ts +33 -0
- package/src/expansion-panel/useExpansionList.ts +7 -8
- package/src/expansion-panel/useExpansionPanels.ts +7 -10
- package/src/files/FileInput.tsx +4 -2
- package/src/files/styles.ts +1 -1
- package/src/files/useFileUpload.ts +2 -0
- package/src/focus/useFocusContainer.ts +29 -43
- package/src/form/Checkbox.tsx +3 -1
- package/src/form/Fieldset.tsx +6 -35
- package/src/form/Form.tsx +2 -0
- package/src/form/FormMessage.tsx +2 -0
- package/src/form/FormMessageContainer.tsx +1 -0
- package/src/form/FormMessageCounter.tsx +2 -0
- package/src/form/InputToggle.tsx +4 -2
- package/src/form/Label.tsx +5 -54
- package/src/form/Legend.tsx +1 -0
- package/src/form/Listbox.tsx +1 -1
- package/src/form/MenuItemCheckbox.tsx +3 -1
- package/src/form/MenuItemFileInput.tsx +1 -0
- package/src/form/MenuItemInputToggle.tsx +3 -2
- package/src/form/MenuItemRadio.tsx +8 -8
- package/src/form/MenuItemSwitch.tsx +3 -1
- package/src/form/MenuItemTextField.tsx +1 -0
- package/src/form/NativeSelect.tsx +2 -0
- package/src/form/OptGroup.tsx +4 -1
- package/src/form/Option.tsx +2 -1
- package/src/form/Password.tsx +3 -1
- package/src/form/Radio.tsx +2 -0
- package/src/form/Select.tsx +6 -29
- package/src/form/Slider.tsx +9 -2
- package/src/form/SliderContainer.tsx +7 -15
- package/src/form/SliderMark.tsx +2 -13
- package/src/form/SliderMarkLabel.tsx +2 -5
- package/src/form/SliderThumb.tsx +2 -50
- package/src/form/SliderTrack.tsx +8 -18
- package/src/form/SliderValueTooltip.tsx +2 -10
- package/src/form/Switch.tsx +10 -1
- package/src/form/SwitchTrack.tsx +3 -6
- package/src/form/TextArea.tsx +10 -1
- package/src/form/TextField.tsx +3 -1
- package/src/form/TextFieldAddon.tsx +2 -59
- package/src/form/TextFieldContainer.tsx +14 -0
- package/src/form/fieldsetStyles.ts +35 -0
- package/src/form/formConfig.ts +29 -4
- package/src/form/labelStyles.ts +55 -0
- package/src/form/sliderStyles.ts +204 -0
- package/src/form/switchStyles.ts +36 -7
- package/src/form/textAreaStyles.ts +0 -7
- package/src/form/textFieldAddonStyles.ts +41 -0
- package/src/form/textFieldContainerStyles.ts +0 -14
- package/src/form/types.ts +25 -2
- package/src/form/useCheckboxGroup.ts +14 -0
- package/src/form/useCombobox.ts +78 -84
- package/src/form/useNumberField.ts +19 -7
- package/src/form/useRadioGroup.ts +9 -0
- package/src/form/useRangeSlider.ts +6 -1
- package/src/form/useSlider.ts +4 -1
- package/src/form/useTextField.ts +12 -1
- package/src/form/validation.ts +1 -0
- package/src/icon/FontIcon.tsx +1 -0
- package/src/icon/IconRotator.tsx +2 -0
- package/src/icon/MaterialIcon.tsx +2 -0
- package/src/icon/MaterialSymbol.tsx +3 -1
- package/src/icon/SVGIcon.tsx +2 -0
- package/src/icon/TextIconSpacing.tsx +6 -2
- package/src/icon/config.tsx +2 -2
- package/src/icon/material.ts +260 -17
- package/src/icon/styles.ts +5 -1
- package/src/interaction/Ripple.tsx +4 -4
- package/src/interaction/UserInteractionModeProvider.tsx +1 -1
- package/src/layout/LayoutAppBar.tsx +1 -0
- package/src/layout/LayoutNav.tsx +9 -12
- package/src/layout/LayoutWindowSplitter.tsx +7 -8
- package/src/layout/Main.tsx +2 -1
- package/src/layout/useExpandableLayout.ts +1 -0
- package/src/layout/useHorizontalLayoutTransition.ts +5 -2
- package/src/layout/useLayoutAppBarHeight.ts +7 -10
- package/src/layout/useLayoutTree.ts +3 -0
- package/src/layout/useLayoutWindowSplitter.ts +4 -2
- package/src/layout/useResizableLayout.ts +3 -0
- package/src/layout/useTemporaryLayout.ts +1 -0
- package/src/link/Link.tsx +3 -1
- package/src/link/SkipToMainContent.tsx +22 -0
- package/src/list/List.tsx +12 -1
- package/src/list/ListItem.tsx +23 -2
- package/src/list/ListItemChildren.tsx +3 -1
- package/src/list/ListItemLink.tsx +32 -1
- package/src/list/ListSubheader.tsx +2 -0
- package/src/list/listItemStyles.ts +0 -17
- package/src/list/listStyles.ts +0 -7
- package/src/media-queries/AppSizeProvider.tsx +2 -0
- package/src/media-queries/useMediaQuery.ts +2 -0
- package/src/menu/DropdownMenu.tsx +5 -2
- package/src/menu/Menu.tsx +1 -0
- package/src/menu/MenuBar.tsx +4 -1
- package/src/menu/MenuButton.tsx +1 -0
- package/src/menu/MenuItem.tsx +1 -0
- package/src/menu/MenuItemCircularProgress.tsx +4 -6
- package/src/menu/MenuItemGroup.tsx +6 -7
- package/src/menu/MenuItemSeparator.tsx +1 -0
- package/src/menu/MenuWidget.tsx +1 -21
- package/src/menu/styles.ts +23 -0
- package/src/menu/useContextMenu.ts +4 -1
- package/src/movement/useKeyboardMovementProvider.ts +3 -3
- package/src/navigation/CollapsibleNavGroup.tsx +1 -0
- package/src/navigation/DefaultNavigationRenderer.tsx +1 -0
- package/src/navigation/NavGroup.tsx +1 -0
- package/src/navigation/NavItem.tsx +1 -0
- package/src/navigation/NavItemButton.tsx +1 -0
- package/src/navigation/NavItemLink.tsx +1 -0
- package/src/navigation/NavSubheader.tsx +1 -0
- package/src/navigation/Navigation.tsx +44 -0
- package/src/navigation/getTableOfContentsHeadings.ts +70 -0
- package/src/navigation/navItemStyles.ts +1 -1
- package/src/navigation/types.ts +57 -0
- package/src/navigation/useActiveHeadingId.ts +3 -15
- package/src/navigation/useNavigationExpansion.ts +2 -0
- package/src/navigation/useTableOfContentsHeadings.ts +22 -89
- package/src/overlay/Overlay.tsx +12 -2
- package/src/overlay/{overlayStyles.ts → styles.ts} +1 -7
- package/src/portal/Portal.tsx +1 -0
- package/src/portal/PortalContainerProvider.tsx +1 -0
- package/src/positioning/createHorizontalPosition.ts +25 -19
- package/src/positioning/createVerticalPosition.ts +10 -8
- package/src/positioning/useFixedPositioning.ts +1 -0
- package/src/progress/CircularProgress.tsx +3 -2
- package/src/progress/LinearProgress.tsx +3 -2
- package/src/responsive-item/ResponsiveItem.tsx +4 -3
- package/src/responsive-item/ResponsiveItemOverlay.tsx +6 -4
- package/src/scroll/useScrollLock.ts +1 -0
- package/src/searching/fuzzy.ts +2 -1
- package/src/segmented-button/SegmentedButton.tsx +3 -4
- package/src/segmented-button/SegmentedButtonContainer.tsx +7 -8
- package/src/segmented-button/segmentedButtonContainerStyles.ts +1 -1
- package/src/sheet/Sheet.tsx +15 -0
- package/src/sheet/styles.ts +10 -17
- package/src/snackbar/DefaultToastRenderer.tsx +1 -0
- package/src/snackbar/Snackbar.tsx +10 -9
- package/src/snackbar/Toast.tsx +9 -0
- package/src/snackbar/ToastActionButton.tsx +2 -1
- package/src/snackbar/ToastCloseButton.tsx +2 -1
- package/src/snackbar/ToastContent.tsx +1 -0
- package/src/snackbar/{ToastManager.tsx → ToastManager.ts} +1 -1
- package/src/snackbar/ToastManagerProvider.tsx +1 -0
- package/src/snackbar/toastStyles.ts +0 -8
- package/src/snackbar/useCurrentToastActions.ts +1 -0
- package/src/storage/useStorage.ts +1 -0
- package/src/suspense/CircularProgressSuspense.tsx +2 -1
- package/src/suspense/NullSuspense.tsx +2 -1
- package/src/table/StickyTableSection.tsx +2 -0
- package/src/table/Table.tsx +8 -8
- package/src/table/TableBody.tsx +2 -0
- package/src/table/TableCell.tsx +6 -2
- package/src/table/TableCheckbox.tsx +11 -12
- package/src/table/TableContainer.tsx +2 -0
- package/src/table/TableFooter.tsx +2 -0
- package/src/table/TableHeader.tsx +2 -0
- package/src/table/TableRadio.tsx +13 -13
- package/src/table/TableRow.tsx +2 -0
- package/src/table/tableCellStyles.ts +1 -1
- package/src/tabs/SimpleTabPanel.tsx +2 -0
- package/src/tabs/SimpleTabPanels.tsx +2 -0
- package/src/tabs/Tab.tsx +21 -1
- package/src/tabs/TabList.tsx +1 -1
- package/src/tabs/TabListScrollButton.tsx +1 -1
- package/src/tabs/tabStyles.ts +0 -20
- package/src/tabs/useTabs.ts +7 -2
- package/src/test-utils/jest-globals/match-media.ts +4 -3
- package/src/test-utils/jest-globals/resize-observer.ts +2 -2
- package/src/test-utils/mocks/ResizeObserver.ts +7 -7
- package/src/test-utils/mocks/match-media.ts +32 -0
- package/src/test-utils/{mocks/match-media-implementation.ts → utils/createMatchMediaSpy.ts} +34 -36
- package/src/test-utils/vitest/match-media.ts +4 -3
- package/src/test-utils/vitest/resize-observer.ts +2 -2
- package/src/theme/LocalStorageColorSchemeProvider.tsx +6 -6
- package/src/theme/ThemeProvider.tsx +10 -11
- package/src/theme/colors.ts +2 -2
- package/src/theme/useColorScheme.ts +1 -1
- package/src/tooltip/Tooltip.tsx +14 -2
- package/src/tooltip/TooltipHoverModeProvider.tsx +1 -0
- package/src/tooltip/constants.ts +11 -11
- package/src/tooltip/{tooltipStyles.ts → styles.ts} +1 -1
- package/src/tooltip/useTooltip.ts +8 -16
- package/src/transition/CSSTransition.tsx +3 -1
- package/src/transition/Collapse.tsx +1 -0
- package/src/transition/CrossFade.tsx +1 -0
- package/src/transition/ScaleTransition.tsx +4 -1
- package/src/transition/SkeletonPlaceholder.tsx +3 -2
- package/src/transition/Slide.tsx +1 -0
- package/src/transition/SlideContainer.tsx +15 -11
- package/src/transition/getTransitionCallbacks.ts +140 -0
- package/src/transition/skeletonPlaceholderUtils.ts +4 -1
- package/src/transition/types.ts +28 -7
- package/src/transition/useCSSTransition.ts +2 -0
- package/src/transition/useCarousel.ts +11 -7
- package/src/transition/useCollapseTransition.ts +4 -3
- package/src/transition/useCrossFadeTransition.ts +23 -57
- package/src/transition/useScaleTransition.ts +27 -19
- package/src/transition/useSkeletonPlaceholder.ts +6 -3
- package/src/transition/useSlideTransition.ts +14 -13
- package/src/transition/useTransition.ts +3 -2
- package/src/tree/DefaultTreeItemRenderer.tsx +1 -0
- package/src/tree/Tree.tsx +8 -9
- package/src/tree/TreeItem.tsx +1 -0
- package/src/tree/types.ts +1 -1
- package/src/tree/useTree.ts +4 -2
- package/src/tree/useTreeExpansion.ts +1 -0
- package/src/tree/useTreeItems.ts +1 -0
- package/src/tree/useTreeSelection.ts +1 -0
- package/src/types.ts +1 -1
- package/src/typography/HighlightText.tsx +201 -0
- package/src/typography/HighlightTextMark.tsx +25 -0
- package/src/typography/Mark.tsx +41 -0
- package/src/typography/SrOnly.tsx +3 -1
- package/src/typography/TextContainer.tsx +10 -1
- package/src/typography/Typography.tsx +2 -1
- package/src/typography/WritingDirectionProvider.tsx +8 -8
- package/src/typography/markStyles.ts +20 -0
- package/src/typography/textContainerStyles.ts +2 -8
- package/src/typography/typographyStyles.ts +2 -2
- package/src/useAsyncFunction.ts +12 -68
- package/src/useDebouncedFunction.ts +3 -1
- package/src/useDropzone.ts +3 -2
- package/src/useThrottledFunction.ts +3 -1
- package/src/useUnmounted.ts +1 -1
- package/src/utils/RenderRecursively.tsx +1 -0
- package/src/utils/applyRef.ts +1 -1
- package/src/window-splitter/WindowSplitter.tsx +12 -0
- package/src/window-splitter/useWindowSplitter.ts +0 -11
- package/dist/button/buttonStyles.js.map +0 -1
- package/dist/button/buttonUnstyledStyles.d.ts +0 -10
- package/dist/button/buttonUnstyledStyles.js +0 -11
- package/dist/button/buttonUnstyledStyles.js.map +0 -1
- package/dist/overlay/overlayStyles.js.map +0 -1
- package/dist/test-utils/mocks/match-media-implementation.d.ts +0 -42
- package/dist/test-utils/mocks/match-media-implementation.js.map +0 -1
- package/dist/tooltip/tooltipStyles.js.map +0 -1
- package/src/button/buttonUnstyledStyles.ts +0 -19
- /package/src/table/{TableConfigurationProvider.tsx → TableConfigurationProvider.ts} +0 -0
- /package/src/table/{TableContainerProvider.tsx → TableContainerProvider.ts} +0 -0
|
@@ -16,7 +16,7 @@ export interface CircularProgressSuspenseProps extends CircularProgressProps {
|
|
|
16
16
|
*
|
|
17
17
|
* @example Simple Example
|
|
18
18
|
* ```tsx
|
|
19
|
-
* import { CircularProgressSuspense } from "@react-md/core";
|
|
19
|
+
* import { CircularProgressSuspense } from "@react-md/core/suspense/CircularProgressSuspense";
|
|
20
20
|
* import type { ReactElement } from "react";
|
|
21
21
|
* import { lazy } from "react";
|
|
22
22
|
*
|
|
@@ -31,6 +31,7 @@ export interface CircularProgressSuspenseProps extends CircularProgressProps {
|
|
|
31
31
|
* }
|
|
32
32
|
* ```
|
|
33
33
|
*
|
|
34
|
+
* @see {@link https://next.react-md.dev/components/suspense | Suspense Demos}
|
|
34
35
|
* @since 6.0.0
|
|
35
36
|
*/
|
|
36
37
|
export declare function CircularProgressSuspense(props: CircularProgressSuspenseProps): ReactElement;
|
|
@@ -7,7 +7,7 @@ import { CircularProgress } from "../progress/CircularProgress.js";
|
|
|
7
7
|
*
|
|
8
8
|
* @example Simple Example
|
|
9
9
|
* ```tsx
|
|
10
|
-
* import { CircularProgressSuspense } from "@react-md/core";
|
|
10
|
+
* import { CircularProgressSuspense } from "@react-md/core/suspense/CircularProgressSuspense";
|
|
11
11
|
* import type { ReactElement } from "react";
|
|
12
12
|
* import { lazy } from "react";
|
|
13
13
|
*
|
|
@@ -22,6 +22,7 @@ import { CircularProgress } from "../progress/CircularProgress.js";
|
|
|
22
22
|
* }
|
|
23
23
|
* ```
|
|
24
24
|
*
|
|
25
|
+
* @see {@link https://next.react-md.dev/components/suspense | Suspense Demos}
|
|
25
26
|
* @since 6.0.0
|
|
26
27
|
*/ export function CircularProgressSuspense(props) {
|
|
27
28
|
const { children, "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel = ariaLabelledBy ? undefined : "Loading", ...progressProps } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/suspense/CircularProgressSuspense.tsx"],"sourcesContent":["import { type ReactElement, type ReactNode, Suspense } from \"react\";\n\nimport {\n CircularProgress,\n type CircularProgressProps,\n} from \"../progress/CircularProgress.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface CircularProgressSuspenseProps extends CircularProgressProps {\n /**\n * @defaultValue `\"Loading\"`\n */\n \"aria-label\"?: string;\n children: ReactNode;\n}\n\n/**\n * This is just a convenience component to set the `fallback` to the\n * {@link CircularProgress} component.\n *\n * @example Simple Example\n * ```tsx\n * import { CircularProgressSuspense } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n * import { lazy } from \"react\";\n *\n * const Component = lazy(() => import('./Some/Path/To/Component'));\n *\n * function Example(): ReactElement {\n * return (\n * <CircularProgressSuspense>\n * <Component />\n * </CircularProgressSuspense>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport function CircularProgressSuspense(\n props: CircularProgressSuspenseProps\n): ReactElement {\n const {\n children,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel = ariaLabelledBy ? undefined : \"Loading\",\n ...progressProps\n } = props;\n return (\n <Suspense\n fallback={\n <CircularProgress\n aria-label={ariaLabel as string}\n aria-labelledby={ariaLabelledBy}\n {...progressProps}\n />\n }\n >\n {children}\n </Suspense>\n );\n}\n"],"names":["Suspense","CircularProgress","CircularProgressSuspense","props","children","ariaLabelledBy","ariaLabel","undefined","progressProps","fallback","aria-label","aria-labelledby"],"mappings":";AAAA,SAA4CA,QAAQ,QAAQ,QAAQ;AAEpE,SACEC,gBAAgB,QAEX,kCAAkC;AAazC
|
|
1
|
+
{"version":3,"sources":["../../src/suspense/CircularProgressSuspense.tsx"],"sourcesContent":["import { type ReactElement, type ReactNode, Suspense } from \"react\";\n\nimport {\n CircularProgress,\n type CircularProgressProps,\n} from \"../progress/CircularProgress.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface CircularProgressSuspenseProps extends CircularProgressProps {\n /**\n * @defaultValue `\"Loading\"`\n */\n \"aria-label\"?: string;\n children: ReactNode;\n}\n\n/**\n * This is just a convenience component to set the `fallback` to the\n * {@link CircularProgress} component.\n *\n * @example Simple Example\n * ```tsx\n * import { CircularProgressSuspense } from \"@react-md/core/suspense/CircularProgressSuspense\";\n * import type { ReactElement } from \"react\";\n * import { lazy } from \"react\";\n *\n * const Component = lazy(() => import('./Some/Path/To/Component'));\n *\n * function Example(): ReactElement {\n * return (\n * <CircularProgressSuspense>\n * <Component />\n * </CircularProgressSuspense>\n * );\n * }\n * ```\n *\n * @see {@link https://next.react-md.dev/components/suspense | Suspense Demos}\n * @since 6.0.0\n */\nexport function CircularProgressSuspense(\n props: CircularProgressSuspenseProps\n): ReactElement {\n const {\n children,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel = ariaLabelledBy ? undefined : \"Loading\",\n ...progressProps\n } = props;\n return (\n <Suspense\n fallback={\n <CircularProgress\n aria-label={ariaLabel as string}\n aria-labelledby={ariaLabelledBy}\n {...progressProps}\n />\n }\n >\n {children}\n </Suspense>\n );\n}\n"],"names":["Suspense","CircularProgress","CircularProgressSuspense","props","children","ariaLabelledBy","ariaLabel","undefined","progressProps","fallback","aria-label","aria-labelledby"],"mappings":";AAAA,SAA4CA,QAAQ,QAAQ,QAAQ;AAEpE,SACEC,gBAAgB,QAEX,kCAAkC;AAazC;;;;;;;;;;;;;;;;;;;;;;;CAuBC,GACD,OAAO,SAASC,yBACdC,KAAoC;IAEpC,MAAM,EACJC,QAAQ,EACR,mBAAmBC,cAAc,EACjC,cAAcC,YAAYD,iBAAiBE,YAAY,SAAS,EAChE,GAAGC,eACJ,GAAGL;IACJ,qBACE,KAACH;QACCS,wBACE,KAACR;YACCS,cAAYJ;YACZK,mBAAiBN;YAChB,GAAGG,aAAa;;kBAIpBJ;;AAGP"}
|
|
@@ -10,7 +10,7 @@ export interface NullSuspenseProps {
|
|
|
10
10
|
*
|
|
11
11
|
* @example Simple Example
|
|
12
12
|
* ```tsx
|
|
13
|
-
* import { NullSuspense } from "@react-md/core";
|
|
13
|
+
* import { NullSuspense } from "@react-md/core/suspense/NullSuspense";
|
|
14
14
|
* import type { ReactElement } from "react";
|
|
15
15
|
* import { lazy } from "react";
|
|
16
16
|
*
|
|
@@ -25,6 +25,7 @@ export interface NullSuspenseProps {
|
|
|
25
25
|
* }
|
|
26
26
|
* ```
|
|
27
27
|
*
|
|
28
|
+
* @see {@link https://next.react-md.dev/components/suspense | Suspense Demos}
|
|
28
29
|
* @since 6.0.0
|
|
29
30
|
*/
|
|
30
31
|
export declare function NullSuspense(props: NullSuspenseProps): ReactElement;
|
|
@@ -5,7 +5,7 @@ import { Suspense } from "react";
|
|
|
5
5
|
*
|
|
6
6
|
* @example Simple Example
|
|
7
7
|
* ```tsx
|
|
8
|
-
* import { NullSuspense } from "@react-md/core";
|
|
8
|
+
* import { NullSuspense } from "@react-md/core/suspense/NullSuspense";
|
|
9
9
|
* import type { ReactElement } from "react";
|
|
10
10
|
* import { lazy } from "react";
|
|
11
11
|
*
|
|
@@ -20,6 +20,7 @@ import { Suspense } from "react";
|
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
23
|
+
* @see {@link https://next.react-md.dev/components/suspense | Suspense Demos}
|
|
23
24
|
* @since 6.0.0
|
|
24
25
|
*/ export function NullSuspense(props) {
|
|
25
26
|
const { children } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/suspense/NullSuspense.tsx"],"sourcesContent":["import { type ReactElement, type ReactNode, Suspense } from \"react\";\n\n/**\n * @since 6.0.0\n */\nexport interface NullSuspenseProps {\n children: ReactNode;\n}\n\n/**\n * This is just a convenience component to set the `fallback` to `null`.\n *\n * @example Simple Example\n * ```tsx\n * import { NullSuspense } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n * import { lazy } from \"react\";\n *\n * const Component = lazy(() => import('./Some/Path/To/Component'));\n *\n * function Example() {\n * return (\n * <NullSuspense>\n * <Component />\n * </NullSuspense>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport function NullSuspense(props: NullSuspenseProps): ReactElement {\n const { children } = props;\n\n return <Suspense fallback={null}>{children}</Suspense>;\n}\n"],"names":["Suspense","NullSuspense","props","children","fallback"],"mappings":";AAAA,SAA4CA,QAAQ,QAAQ,QAAQ;AASpE
|
|
1
|
+
{"version":3,"sources":["../../src/suspense/NullSuspense.tsx"],"sourcesContent":["import { type ReactElement, type ReactNode, Suspense } from \"react\";\n\n/**\n * @since 6.0.0\n */\nexport interface NullSuspenseProps {\n children: ReactNode;\n}\n\n/**\n * This is just a convenience component to set the `fallback` to `null`.\n *\n * @example Simple Example\n * ```tsx\n * import { NullSuspense } from \"@react-md/core/suspense/NullSuspense\";\n * import type { ReactElement } from \"react\";\n * import { lazy } from \"react\";\n *\n * const Component = lazy(() => import('./Some/Path/To/Component'));\n *\n * function Example() {\n * return (\n * <NullSuspense>\n * <Component />\n * </NullSuspense>\n * );\n * }\n * ```\n *\n * @see {@link https://next.react-md.dev/components/suspense | Suspense Demos}\n * @since 6.0.0\n */\nexport function NullSuspense(props: NullSuspenseProps): ReactElement {\n const { children } = props;\n\n return <Suspense fallback={null}>{children}</Suspense>;\n}\n"],"names":["Suspense","NullSuspense","props","children","fallback"],"mappings":";AAAA,SAA4CA,QAAQ,QAAQ,QAAQ;AASpE;;;;;;;;;;;;;;;;;;;;;;CAsBC,GACD,OAAO,SAASC,aAAaC,KAAwB;IACnD,MAAM,EAAEC,QAAQ,EAAE,GAAGD;IAErB,qBAAO,KAACF;QAASI,UAAU;kBAAOD;;AACpC"}
|
|
@@ -18,6 +18,8 @@ export interface StickyTableSectionProps extends HTMLAttributes<HTMLTableSection
|
|
|
18
18
|
* dynamically applies styles whenever the `<thead>`/`<tfoot>` are covering
|
|
19
19
|
* content in the table.
|
|
20
20
|
*
|
|
21
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
22
|
+
* @see {@link https://next.react-md.dev/components/table#sticky-tables | Sticky Table Demos}
|
|
21
23
|
* @since 6.0.0
|
|
22
24
|
*/
|
|
23
25
|
export declare const StickyTableSection: import("react").ForwardRefExoticComponent<StickyTableSectionProps & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -13,6 +13,8 @@ import { useTableSectionConfig } from "./useTableSectionConfig.js";
|
|
|
13
13
|
* dynamically applies styles whenever the `<thead>`/`<tfoot>` are covering
|
|
14
14
|
* content in the table.
|
|
15
15
|
*
|
|
16
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
17
|
+
* @see {@link https://next.react-md.dev/components/table#sticky-tables | Sticky Table Demos}
|
|
16
18
|
* @since 6.0.0
|
|
17
19
|
*/ export const StickyTableSection = /*#__PURE__*/ forwardRef(function StickyTableSection(props, ref) {
|
|
18
20
|
const { type, className, hoverable, lineWrap, children, stickyOptions, isStickyActive, disableStickyStyles = false, stickyActiveClassName, ...remaining } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/table/StickyTableSection.tsx"],"sourcesContent":["\"use client\";\n\nimport { type HTMLAttributes, forwardRef } from \"react\";\n\nimport { TableConfigProvider } from \"./TableConfigurationProvider.js\";\nimport { tableFooter } from \"./tableFooterStyles.js\";\nimport { tableHeader } from \"./tableHeaderStyles.js\";\nimport {\n type TableSectionConfiguration,\n type TableStickySectionConfiguration,\n} from \"./types.js\";\nimport { useStickyTableSection } from \"./useStickyTableSection.js\";\nimport { useTableSectionConfig } from \"./useTableSectionConfig.js\";\n\n/** @since 6.0.0 */\nexport interface StickyTableSectionProps\n extends HTMLAttributes<HTMLTableSectionElement>,\n TableStickySectionConfiguration,\n TableSectionConfiguration {\n type: \"header\" | \"footer\";\n\n /**\n * An optional className to use when the sticky section is covering other rows\n * (`active`). When this is defined, the default\n * `rmd-thead--sticky-active`/`rmd-tfoot--sticky-active` will no longer be\n * applied.\n */\n stickyActiveClassName?: string;\n}\n\n/**\n * **Client Component**\n *\n * This component is used to render a sticky `<thead>`/`<tfoot>` that\n * dynamically applies styles whenever the `<thead>`/`<tfoot>` are covering\n * content in the table.\n *\n * @since 6.0.0\n */\nexport const StickyTableSection = forwardRef<\n HTMLTableSectionElement,\n StickyTableSectionProps\n>(function StickyTableSection(props, ref) {\n const {\n type,\n className,\n hoverable,\n lineWrap,\n children,\n stickyOptions,\n isStickyActive,\n disableStickyStyles = false,\n stickyActiveClassName,\n ...remaining\n } = props;\n\n const isHeader = type === \"header\";\n const Section = isHeader ? \"thead\" : \"tfoot\";\n const styles = isHeader ? tableHeader : tableFooter;\n const { tbody, sectionRef, stickyActive } = useStickyTableSection({\n ref,\n type,\n stickyOptions,\n isStickyActive,\n disableStickyStyles,\n stickyActiveClassName,\n });\n const config = useTableSectionConfig({\n type,\n lineWrap,\n hoverable,\n });\n\n return (\n <TableConfigProvider value={config}>\n {!isHeader && tbody}\n <Section\n {...remaining}\n ref={sectionRef}\n className={styles({\n className,\n dense: config.dense,\n sticky: true,\n stickyActive,\n stickyActiveClassName,\n })}\n >\n {children}\n </Section>\n {isHeader && tbody}\n </TableConfigProvider>\n );\n});\n"],"names":["forwardRef","TableConfigProvider","tableFooter","tableHeader","useStickyTableSection","useTableSectionConfig","StickyTableSection","props","ref","type","className","hoverable","lineWrap","children","stickyOptions","isStickyActive","disableStickyStyles","stickyActiveClassName","remaining","isHeader","Section","styles","tbody","sectionRef","stickyActive","config","value","dense","sticky"],"mappings":"AAAA;;AAEA,SAA8BA,UAAU,QAAQ,QAAQ;AAExD,SAASC,mBAAmB,QAAQ,kCAAkC;AACtE,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,WAAW,QAAQ,yBAAyB;AAKrD,SAASC,qBAAqB,QAAQ,6BAA6B;AACnE,SAASC,qBAAqB,QAAQ,6BAA6B;AAkBnE
|
|
1
|
+
{"version":3,"sources":["../../src/table/StickyTableSection.tsx"],"sourcesContent":["\"use client\";\n\nimport { type HTMLAttributes, forwardRef } from \"react\";\n\nimport { TableConfigProvider } from \"./TableConfigurationProvider.js\";\nimport { tableFooter } from \"./tableFooterStyles.js\";\nimport { tableHeader } from \"./tableHeaderStyles.js\";\nimport {\n type TableSectionConfiguration,\n type TableStickySectionConfiguration,\n} from \"./types.js\";\nimport { useStickyTableSection } from \"./useStickyTableSection.js\";\nimport { useTableSectionConfig } from \"./useTableSectionConfig.js\";\n\n/** @since 6.0.0 */\nexport interface StickyTableSectionProps\n extends HTMLAttributes<HTMLTableSectionElement>,\n TableStickySectionConfiguration,\n TableSectionConfiguration {\n type: \"header\" | \"footer\";\n\n /**\n * An optional className to use when the sticky section is covering other rows\n * (`active`). When this is defined, the default\n * `rmd-thead--sticky-active`/`rmd-tfoot--sticky-active` will no longer be\n * applied.\n */\n stickyActiveClassName?: string;\n}\n\n/**\n * **Client Component**\n *\n * This component is used to render a sticky `<thead>`/`<tfoot>` that\n * dynamically applies styles whenever the `<thead>`/`<tfoot>` are covering\n * content in the table.\n *\n * @see {@link https://next.react-md.dev/components/table | Table Demos}\n * @see {@link https://next.react-md.dev/components/table#sticky-tables | Sticky Table Demos}\n * @since 6.0.0\n */\nexport const StickyTableSection = forwardRef<\n HTMLTableSectionElement,\n StickyTableSectionProps\n>(function StickyTableSection(props, ref) {\n const {\n type,\n className,\n hoverable,\n lineWrap,\n children,\n stickyOptions,\n isStickyActive,\n disableStickyStyles = false,\n stickyActiveClassName,\n ...remaining\n } = props;\n\n const isHeader = type === \"header\";\n const Section = isHeader ? \"thead\" : \"tfoot\";\n const styles = isHeader ? tableHeader : tableFooter;\n const { tbody, sectionRef, stickyActive } = useStickyTableSection({\n ref,\n type,\n stickyOptions,\n isStickyActive,\n disableStickyStyles,\n stickyActiveClassName,\n });\n const config = useTableSectionConfig({\n type,\n lineWrap,\n hoverable,\n });\n\n return (\n <TableConfigProvider value={config}>\n {!isHeader && tbody}\n <Section\n {...remaining}\n ref={sectionRef}\n className={styles({\n className,\n dense: config.dense,\n sticky: true,\n stickyActive,\n stickyActiveClassName,\n })}\n >\n {children}\n </Section>\n {isHeader && tbody}\n </TableConfigProvider>\n );\n});\n"],"names":["forwardRef","TableConfigProvider","tableFooter","tableHeader","useStickyTableSection","useTableSectionConfig","StickyTableSection","props","ref","type","className","hoverable","lineWrap","children","stickyOptions","isStickyActive","disableStickyStyles","stickyActiveClassName","remaining","isHeader","Section","styles","tbody","sectionRef","stickyActive","config","value","dense","sticky"],"mappings":"AAAA;;AAEA,SAA8BA,UAAU,QAAQ,QAAQ;AAExD,SAASC,mBAAmB,QAAQ,kCAAkC;AACtE,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,WAAW,QAAQ,yBAAyB;AAKrD,SAASC,qBAAqB,QAAQ,6BAA6B;AACnE,SAASC,qBAAqB,QAAQ,6BAA6B;AAkBnE;;;;;;;;;;CAUC,GACD,OAAO,MAAMC,mCAAqBN,WAGhC,SAASM,mBAAmBC,KAAK,EAAEC,GAAG;IACtC,MAAM,EACJC,IAAI,EACJC,SAAS,EACTC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,aAAa,EACbC,cAAc,EACdC,sBAAsB,KAAK,EAC3BC,qBAAqB,EACrB,GAAGC,WACJ,GAAGX;IAEJ,MAAMY,WAAWV,SAAS;IAC1B,MAAMW,UAAUD,WAAW,UAAU;IACrC,MAAME,SAASF,WAAWhB,cAAcD;IACxC,MAAM,EAAEoB,KAAK,EAAEC,UAAU,EAAEC,YAAY,EAAE,GAAGpB,sBAAsB;QAChEI;QACAC;QACAK;QACAC;QACAC;QACAC;IACF;IACA,MAAMQ,SAASpB,sBAAsB;QACnCI;QACAG;QACAD;IACF;IAEA,qBACE,MAACV;QAAoByB,OAAOD;;YACzB,CAACN,YAAYG;0BACd,KAACF;gBACE,GAAGF,SAAS;gBACbV,KAAKe;gBACLb,WAAWW,OAAO;oBAChBX;oBACAiB,OAAOF,OAAOE,KAAK;oBACnBC,QAAQ;oBACRJ;oBACAP;gBACF;0BAECJ;;YAEFM,YAAYG;;;AAGnB,GAAG"}
|
package/dist/table/Table.d.ts
CHANGED
|
@@ -26,14 +26,12 @@ export interface TableProps extends TableHTMLAttributes<HTMLTableElement>, Table
|
|
|
26
26
|
*
|
|
27
27
|
* @example Responsive Example
|
|
28
28
|
* ```tsx
|
|
29
|
-
* import {
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* TableRow,
|
|
36
|
-
* } from "@react-md/core";
|
|
29
|
+
* import { Table } from "@react-md/core/table/Table";
|
|
30
|
+
* import { TableBody } from "@react-md/core/table/TableBody";
|
|
31
|
+
* import { TableCell } from "@react-md/core/table/TableCell";
|
|
32
|
+
* import { TableContainer } from "@react-md/core/table/TableContainer";
|
|
33
|
+
* import { TableHeader } from "@react-md/core/table/TableHeader";
|
|
34
|
+
* import { TableRow } from "@react-md/core/table/TableRow";
|
|
37
35
|
* import type { ReactElement } from "react";
|
|
38
36
|
*
|
|
39
37
|
* function Example(): ReactElement {
|
|
@@ -69,5 +67,7 @@ export interface TableProps extends TableHTMLAttributes<HTMLTableElement>, Table
|
|
|
69
67
|
* );
|
|
70
68
|
* }
|
|
71
69
|
* ```
|
|
70
|
+
*
|
|
71
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
72
72
|
*/
|
|
73
73
|
export declare const Table: import("react").ForwardRefExoticComponent<TableProps & import("react").RefAttributes<HTMLTableElement>>;
|
package/dist/table/Table.js
CHANGED
|
@@ -8,14 +8,12 @@ import { table } from "./tableStyles.js";
|
|
|
8
8
|
*
|
|
9
9
|
* @example Responsive Example
|
|
10
10
|
* ```tsx
|
|
11
|
-
* import {
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* TableRow,
|
|
18
|
-
* } from "@react-md/core";
|
|
11
|
+
* import { Table } from "@react-md/core/table/Table";
|
|
12
|
+
* import { TableBody } from "@react-md/core/table/TableBody";
|
|
13
|
+
* import { TableCell } from "@react-md/core/table/TableCell";
|
|
14
|
+
* import { TableContainer } from "@react-md/core/table/TableContainer";
|
|
15
|
+
* import { TableHeader } from "@react-md/core/table/TableHeader";
|
|
16
|
+
* import { TableRow } from "@react-md/core/table/TableRow";
|
|
19
17
|
* import type { ReactElement } from "react";
|
|
20
18
|
*
|
|
21
19
|
* function Example(): ReactElement {
|
|
@@ -51,6 +49,8 @@ import { table } from "./tableStyles.js";
|
|
|
51
49
|
* );
|
|
52
50
|
* }
|
|
53
51
|
* ```
|
|
52
|
+
*
|
|
53
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
54
54
|
*/ export const Table = /*#__PURE__*/ forwardRef(function Table(props, ref) {
|
|
55
55
|
const { className, children, dense = false, hAlign = "left", vAlign = "middle", lineWrap = false, fullWidth = false, disableHover = false, disableBorders = false, ...remaining } = props;
|
|
56
56
|
const configuration = useMemo(()=>({
|
package/dist/table/Table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/table/Table.tsx"],"sourcesContent":["\"use client\";\n\nimport { type TableHTMLAttributes, forwardRef, useMemo } from \"react\";\n\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 *
|
|
1
|
+
{"version":3,"sources":["../../src/table/Table.tsx"],"sourcesContent":["\"use client\";\n\nimport { type TableHTMLAttributes, forwardRef, useMemo } from \"react\";\n\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 { Table } from \"@react-md/core/table/Table\";\n * import { TableBody } from \"@react-md/core/table/TableBody\";\n * import { TableCell } from \"@react-md/core/table/TableCell\";\n * import { TableContainer } from \"@react-md/core/table/TableContainer\";\n * import { TableHeader } from \"@react-md/core/table/TableHeader\";\n * import { TableRow } from \"@react-md/core/table/TableRow\";\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 *\n * @see {@link https://next.react-md.dev/components/table | Table Demos}\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;;AAEA,SAAmCA,UAAU,EAAEC,OAAO,QAAQ,QAAQ;AAEtE,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"}
|
|
@@ -7,5 +7,7 @@ export interface TableBodyProps extends HTMLAttributes<HTMLTableSectionElement>,
|
|
|
7
7
|
*
|
|
8
8
|
* Creates a `<tbody>` element that also allows for overriding all the child
|
|
9
9
|
* `TableCell` components with additional styling behavior.
|
|
10
|
+
*
|
|
11
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
10
12
|
*/
|
|
11
13
|
export declare const TableBody: import("react").ForwardRefExoticComponent<TableBodyProps & import("react").RefAttributes<HTMLTableSectionElement>>;
|
package/dist/table/TableBody.js
CHANGED
|
@@ -8,6 +8,8 @@ import { TableConfigProvider, useTableConfig } from "./TableConfigurationProvide
|
|
|
8
8
|
*
|
|
9
9
|
* Creates a `<tbody>` element that also allows for overriding all the child
|
|
10
10
|
* `TableCell` components with additional styling behavior.
|
|
11
|
+
*
|
|
12
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
11
13
|
*/ export const TableBody = /*#__PURE__*/ forwardRef(function TableBody(props, ref) {
|
|
12
14
|
const { className, children, hAlign: propHAlign, vAlign: propVAlign, lineWrap: propLineWrap, disableHover: propDisableHover, disableBorders: propDisableBorders, ...remaining } = props;
|
|
13
15
|
// update the table configuration with the custom overrides for the `<thead>`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/table/TableBody.tsx"],"sourcesContent":["\"use client\";\n\nimport { cnb } from \"cnbuilder\";\nimport { type HTMLAttributes, forwardRef, useMemo } from \"react\";\n\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;;AAEA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAA8BC,UAAU,EAAEC,OAAO,QAAQ,QAAQ;AAEjE,SACEC,mBAAmB,EACnBC,cAAc,QACT,kCAAkC;AAOzC
|
|
1
|
+
{"version":3,"sources":["../../src/table/TableBody.tsx"],"sourcesContent":["\"use client\";\n\nimport { cnb } from \"cnbuilder\";\nimport { type HTMLAttributes, forwardRef, useMemo } from \"react\";\n\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 *\n * @see {@link https://next.react-md.dev/components/table | Table Demos}\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;;AAEA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAA8BC,UAAU,EAAEC,OAAO,QAAQ,QAAQ;AAEjE,SACEC,mBAAmB,EACnBC,cAAc,QACT,kCAAkC;AAOzC;;;;;;;CAOC,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"}
|
|
@@ -113,8 +113,10 @@ export interface TableCellProps extends TableCellAttributes, TableCellOptions {
|
|
|
113
113
|
*
|
|
114
114
|
* @example
|
|
115
115
|
* ```tsx
|
|
116
|
-
* import
|
|
117
|
-
* import {
|
|
116
|
+
* import { Button } from "@react-md/core/button/Button";
|
|
117
|
+
* import { Dialog } from "@react-md/core/dialog/Dialog";
|
|
118
|
+
* import { TableCell } from "@react-md/core/table/TableCell";
|
|
119
|
+
* import { type SortOrder } from "@react-md/core/table/types";
|
|
118
120
|
* import MoreVertIcon from "@react-md/material-icons/MoreVertIcon";
|
|
119
121
|
* import type { ReactElement } from "react";
|
|
120
122
|
* import { useState } from "react";
|
|
@@ -174,5 +176,7 @@ export interface TableCellProps extends TableCellAttributes, TableCellOptions {
|
|
|
174
176
|
* labels, you will need to manually set the `header={false}` prop for that cell
|
|
175
177
|
* since it is invalid to have a `<th>` without any readable content for screen
|
|
176
178
|
* readers.
|
|
179
|
+
*
|
|
180
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
177
181
|
*/
|
|
178
182
|
export declare const TableCell: import("react").ForwardRefExoticComponent<TableCellProps & import("react").RefAttributes<HTMLTableCellElement>>;
|
package/dist/table/TableCell.js
CHANGED
|
@@ -16,6 +16,8 @@ import { tableCell } from "./tableCellStyles.js";
|
|
|
16
16
|
* labels, you will need to manually set the `header={false}` prop for that cell
|
|
17
17
|
* since it is invalid to have a `<th>` without any readable content for screen
|
|
18
18
|
* readers.
|
|
19
|
+
*
|
|
20
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
19
21
|
*/ export const TableCell = /*#__PURE__*/ forwardRef(function TableCell(props, ref) {
|
|
20
22
|
const { "aria-sort": sortOrder, className, grow = false, scope: propScope, hAlign: propHAlign, vAlign: propVAlign, header: propHeader, lineWrap: propDisableLineWrap, inputToggle, children, beforeChildren, afterChildren, sticky, sortIcon: propSortIcon, sortIconAfter = false, sortIconRotated, iconRotatorProps, padding = "horizontal", contentProps, ...remaining } = props;
|
|
21
23
|
const sortIcon = getIcon("sort", propSortIcon);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/table/TableCell.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ButtonHTMLAttributes,\n type ReactNode,\n type TdHTMLAttributes,\n type ThHTMLAttributes,\n forwardRef,\n} from \"react\";\n\nimport { getIcon } from \"../icon/config.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;;AAEA,SAKEA,UAAU,QACL,QAAQ;AAEf,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,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
|
+
{"version":3,"sources":["../../src/table/TableCell.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ButtonHTMLAttributes,\n type ReactNode,\n type TdHTMLAttributes,\n type ThHTMLAttributes,\n forwardRef,\n} from \"react\";\n\nimport { getIcon } from \"../icon/config.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 { Button } from \"@react-md/core/button/Button\";\n * import { Dialog } from \"@react-md/core/dialog/Dialog\";\n * import { TableCell } from \"@react-md/core/table/TableCell\";\n * import { type SortOrder } from \"@react-md/core/table/types\";\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 *\n * @see {@link https://next.react-md.dev/components/table | Table Demos}\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;;AAEA,SAKEA,UAAU,QACL,QAAQ;AAEf,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,SACEC,gBAAgB,QAEX,wBAAwB;AAC/B,SAASC,cAAc,QAAQ,kCAAkC;AACjE,SAASC,SAAS,QAAQ,uBAAuB;AA2LjD;;;;;;;;;;;;;CAaC,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"}
|
|
@@ -14,7 +14,7 @@ export type TableCheckboxSupportedCheckboxProps = Pick<CheckboxProps, "name" | "
|
|
|
14
14
|
* will automatically be generated as `"checkbox" + useId()`. Use the {@link checkboxProps}
|
|
15
15
|
* to set an `id` manually for the checkbox.
|
|
16
16
|
* @since 6.0.0 The `cellId` prop was removed. Use the `id` prop instead.
|
|
17
|
-
* @since 6
|
|
17
|
+
* @since 6.0.0 The default `aria-label` was changed from
|
|
18
18
|
* `"Toggle Row Selection"` to `"Select Row"`.
|
|
19
19
|
*/
|
|
20
20
|
export interface TableCheckboxProps extends TableCheckboxTdHTMLAttributes, TableCheckboxSupportedCheckboxProps {
|
|
@@ -48,16 +48,14 @@ export interface TableCheckboxProps extends TableCheckboxTdHTMLAttributes, Table
|
|
|
48
48
|
*
|
|
49
49
|
* @example Simple Example
|
|
50
50
|
* ```tsx
|
|
51
|
-
* import {
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* useCheckboxGroup
|
|
60
|
-
* } from "@react-md/core";
|
|
51
|
+
* import { useCheckboxGroup } from "@react-md/core/form/useCheckboxGroup";
|
|
52
|
+
* import { Table } from "@react-md/core/table/Table";
|
|
53
|
+
* import { TableBody } from "@react-md/core/table/TableBody";
|
|
54
|
+
* import { TableCell } from "@react-md/core/table/TableCell";
|
|
55
|
+
* import { TableCheckbox } from "@react-md/core/table/TableCheckbox";
|
|
56
|
+
* import { TableContainer } from "@react-md/core/table/TableContainer";
|
|
57
|
+
* import { TableHeader } from "@react-md/core/table/TableHeader";
|
|
58
|
+
* import { TableRow } from "@react-md/core/table/TableRow";
|
|
61
59
|
* import { type ReactElement } from "react";
|
|
62
60
|
*
|
|
63
61
|
* const rows = [
|
|
@@ -107,11 +105,12 @@ export interface TableCheckboxProps extends TableCheckboxTdHTMLAttributes, Table
|
|
|
107
105
|
* }
|
|
108
106
|
* ```
|
|
109
107
|
*
|
|
108
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
110
109
|
* @since 6.0.0 The `id` prop is no longer required since the checkbox's id
|
|
111
110
|
* will automatically be generated as `"checkbox" + useId()`. Use the {@link checkboxProps}
|
|
112
111
|
* to set an `id` manually for the checkbox.
|
|
113
112
|
* @since 6.0.0 The `cellId` prop was removed. Use the `id` prop instead.
|
|
114
|
-
* @since 6
|
|
113
|
+
* @since 6.0.0 The default `aria-label` was changed from
|
|
115
114
|
* `"Toggle Row Selection"` to `"Select Row"`.
|
|
116
115
|
*/
|
|
117
116
|
export declare const TableCheckbox: import("react").ForwardRefExoticComponent<TableCheckboxProps & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
@@ -13,16 +13,14 @@ const noop = ()=>{
|
|
|
13
13
|
*
|
|
14
14
|
* @example Simple Example
|
|
15
15
|
* ```tsx
|
|
16
|
-
* import {
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* useCheckboxGroup
|
|
25
|
-
* } from "@react-md/core";
|
|
16
|
+
* import { useCheckboxGroup } from "@react-md/core/form/useCheckboxGroup";
|
|
17
|
+
* import { Table } from "@react-md/core/table/Table";
|
|
18
|
+
* import { TableBody } from "@react-md/core/table/TableBody";
|
|
19
|
+
* import { TableCell } from "@react-md/core/table/TableCell";
|
|
20
|
+
* import { TableCheckbox } from "@react-md/core/table/TableCheckbox";
|
|
21
|
+
* import { TableContainer } from "@react-md/core/table/TableContainer";
|
|
22
|
+
* import { TableHeader } from "@react-md/core/table/TableHeader";
|
|
23
|
+
* import { TableRow } from "@react-md/core/table/TableRow";
|
|
26
24
|
* import { type ReactElement } from "react";
|
|
27
25
|
*
|
|
28
26
|
* const rows = [
|
|
@@ -72,11 +70,12 @@ const noop = ()=>{
|
|
|
72
70
|
* }
|
|
73
71
|
* ```
|
|
74
72
|
*
|
|
73
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
75
74
|
* @since 6.0.0 The `id` prop is no longer required since the checkbox's id
|
|
76
75
|
* will automatically be generated as `"checkbox" + useId()`. Use the {@link checkboxProps}
|
|
77
76
|
* to set an `id` manually for the checkbox.
|
|
78
77
|
* @since 6.0.0 The `cellId` prop was removed. Use the `id` prop instead.
|
|
79
|
-
* @since 6
|
|
78
|
+
* @since 6.0.0 The default `aria-label` was changed from
|
|
80
79
|
* `"Toggle Row Selection"` to `"Select Row"`.
|
|
81
80
|
*/ export const TableCheckbox = /*#__PURE__*/ forwardRef(function TableCheckbox(props, ref) {
|
|
82
81
|
const { "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel = !ariaLabelledBy ? "Select Row" : undefined, "aria-controls": ariaControls, name, icon, iconProps, iconStyle, iconClassName, checkedIcon, indeterminateIcon, value, checked, onChange, defaultChecked, indeterminate, checkboxProps, onClick = noop, ...remaining } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/table/TableCheckbox.tsx"],"sourcesContent":["\"use client\";\n\nimport { type TdHTMLAttributes, forwardRef } from \"react\";\n\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
|
|
1
|
+
{"version":3,"sources":["../../src/table/TableCheckbox.tsx"],"sourcesContent":["\"use client\";\n\nimport { type TdHTMLAttributes, forwardRef } from \"react\";\n\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 { useCheckboxGroup } from \"@react-md/core/form/useCheckboxGroup\";\n * import { Table } from \"@react-md/core/table/Table\";\n * import { TableBody } from \"@react-md/core/table/TableBody\";\n * import { TableCell } from \"@react-md/core/table/TableCell\";\n * import { TableCheckbox } from \"@react-md/core/table/TableCheckbox\";\n * import { TableContainer } from \"@react-md/core/table/TableContainer\";\n * import { TableHeader } from \"@react-md/core/table/TableHeader\";\n * import { TableRow } from \"@react-md/core/table/TableRow\";\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 * @see {@link https://next.react-md.dev/components/table | Table Demos}\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;;AAEA,SAAgCA,UAAU,QAAQ,QAAQ;AAE1D,SAASC,QAAQ,QAAQ,sBAAsB;AAG/C,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,MAAMC,OAAO;AACX,aAAa;AACf;AAmEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuEC,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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/table/TableConfigurationProvider.
|
|
1
|
+
{"version":3,"sources":["../../src/table/TableConfigurationProvider.ts"],"sourcesContent":["\"use client\";\n\nimport { createContext, useContext } from \"react\";\n\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;AAEA,SAASA,aAAa,EAAEC,UAAU,QAAQ,QAAQ;AAIlD,MAAMC,UAAUF,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"}
|
|
@@ -7,5 +7,7 @@ export type TableContainerProps = HTMLAttributes<HTMLDivElement>;
|
|
|
7
7
|
* component if you want to make a responsive table within the page. If you
|
|
8
8
|
* don't want to use this component, you can just apply `overflow: auto` to a
|
|
9
9
|
* parent element of the table.
|
|
10
|
+
*
|
|
11
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
10
12
|
*/
|
|
11
13
|
export declare const TableContainer: import("react").ForwardRefExoticComponent<TableContainerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -11,6 +11,8 @@ import { tableContainer } from "./tableContainerStyles.js";
|
|
|
11
11
|
* component if you want to make a responsive table within the page. If you
|
|
12
12
|
* don't want to use this component, you can just apply `overflow: auto` to a
|
|
13
13
|
* parent element of the table.
|
|
14
|
+
*
|
|
15
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
14
16
|
*/ export const TableContainer = /*#__PURE__*/ forwardRef(function TableContainer(props, ref) {
|
|
15
17
|
const { className, children, ...remaining } = props;
|
|
16
18
|
const [nodeRef, refCallback] = useEnsuredRef(ref);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/table/TableContainer.tsx"],"sourcesContent":["\"use client\";\n\nimport { type HTMLAttributes, forwardRef, useMemo } from \"react\";\n\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport {\n type TableContainerContext,\n TableContainerProvider,\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;;AAEA,SAA8BA,UAAU,EAAEC,OAAO,QAAQ,QAAQ;AAEjE,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAEEC,sBAAsB,QACjB,8BAA8B;AACrC,SAASC,cAAc,QAAQ,4BAA4B;AAI3D
|
|
1
|
+
{"version":3,"sources":["../../src/table/TableContainer.tsx"],"sourcesContent":["\"use client\";\n\nimport { type HTMLAttributes, forwardRef, useMemo } from \"react\";\n\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport {\n type TableContainerContext,\n TableContainerProvider,\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 *\n * @see {@link https://next.react-md.dev/components/table | Table Demos}\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;;AAEA,SAA8BA,UAAU,EAAEC,OAAO,QAAQ,QAAQ;AAEjE,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAEEC,sBAAsB,QACjB,8BAA8B;AACrC,SAASC,cAAc,QAAQ,4BAA4B;AAI3D;;;;;;;;;CASC,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.
|
|
1
|
+
{"version":3,"sources":["../../src/table/TableContainerProvider.ts"],"sourcesContent":["\"use client\";\n\nimport { type RefObject, createContext, useContext } 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;AAEA,SAAyBA,aAAa,EAAEC,UAAU,QAAQ,QAAQ;AAWlE,MAAMC,UAAUF,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"}
|
|
@@ -19,5 +19,7 @@ export interface TableFooterProps extends HTMLAttributes<HTMLTableSectionElement
|
|
|
19
19
|
* disable the hover effect and line wrapping by default, but the hover effect
|
|
20
20
|
* and line-wrapping can be re-enabled if desired through the `hoverable` and
|
|
21
21
|
* `disableNoWrap` props.
|
|
22
|
+
*
|
|
23
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
22
24
|
*/
|
|
23
25
|
export declare const TableFooter: import("react").ForwardRefExoticComponent<TableFooterProps & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -11,6 +11,8 @@ import { useTableSectionConfig } from "./useTableSectionConfig.js";
|
|
|
11
11
|
* disable the hover effect and line wrapping by default, but the hover effect
|
|
12
12
|
* and line-wrapping can be re-enabled if desired through the `hoverable` and
|
|
13
13
|
* `disableNoWrap` props.
|
|
14
|
+
*
|
|
15
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
14
16
|
*/ export const TableFooter = /*#__PURE__*/ forwardRef(function TableFooter(props, propRef) {
|
|
15
17
|
const { className, hoverable, lineWrap, children, ...remaining } = props;
|
|
16
18
|
const config = useTableSectionConfig({
|