@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
|
@@ -22,7 +22,7 @@ export interface CircularProgressSuspenseProps extends CircularProgressProps {
|
|
|
22
22
|
*
|
|
23
23
|
* @example Simple Example
|
|
24
24
|
* ```tsx
|
|
25
|
-
* import { CircularProgressSuspense } from "@react-md/core";
|
|
25
|
+
* import { CircularProgressSuspense } from "@react-md/core/suspense/CircularProgressSuspense";
|
|
26
26
|
* import type { ReactElement } from "react";
|
|
27
27
|
* import { lazy } from "react";
|
|
28
28
|
*
|
|
@@ -37,6 +37,7 @@ export interface CircularProgressSuspenseProps extends CircularProgressProps {
|
|
|
37
37
|
* }
|
|
38
38
|
* ```
|
|
39
39
|
*
|
|
40
|
+
* @see {@link https://next.react-md.dev/components/suspense | Suspense Demos}
|
|
40
41
|
* @since 6.0.0
|
|
41
42
|
*/
|
|
42
43
|
export function CircularProgressSuspense(
|
|
@@ -12,7 +12,7 @@ export interface NullSuspenseProps {
|
|
|
12
12
|
*
|
|
13
13
|
* @example Simple Example
|
|
14
14
|
* ```tsx
|
|
15
|
-
* import { NullSuspense } from "@react-md/core";
|
|
15
|
+
* import { NullSuspense } from "@react-md/core/suspense/NullSuspense";
|
|
16
16
|
* import type { ReactElement } from "react";
|
|
17
17
|
* import { lazy } from "react";
|
|
18
18
|
*
|
|
@@ -27,6 +27,7 @@ export interface NullSuspenseProps {
|
|
|
27
27
|
* }
|
|
28
28
|
* ```
|
|
29
29
|
*
|
|
30
|
+
* @see {@link https://next.react-md.dev/components/suspense | Suspense Demos}
|
|
30
31
|
* @since 6.0.0
|
|
31
32
|
*/
|
|
32
33
|
export function NullSuspense(props: NullSuspenseProps): ReactElement {
|
|
@@ -35,6 +35,8 @@ export interface StickyTableSectionProps
|
|
|
35
35
|
* dynamically applies styles whenever the `<thead>`/`<tfoot>` are covering
|
|
36
36
|
* content in the table.
|
|
37
37
|
*
|
|
38
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
39
|
+
* @see {@link https://next.react-md.dev/components/table#sticky-tables | Sticky Table Demos}
|
|
38
40
|
* @since 6.0.0
|
|
39
41
|
*/
|
|
40
42
|
export const StickyTableSection = forwardRef<
|
package/src/table/Table.tsx
CHANGED
|
@@ -35,14 +35,12 @@ export interface TableProps
|
|
|
35
35
|
*
|
|
36
36
|
* @example Responsive Example
|
|
37
37
|
* ```tsx
|
|
38
|
-
* import {
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* TableRow,
|
|
45
|
-
* } from "@react-md/core";
|
|
38
|
+
* import { Table } from "@react-md/core/table/Table";
|
|
39
|
+
* import { TableBody } from "@react-md/core/table/TableBody";
|
|
40
|
+
* import { TableCell } from "@react-md/core/table/TableCell";
|
|
41
|
+
* import { TableContainer } from "@react-md/core/table/TableContainer";
|
|
42
|
+
* import { TableHeader } from "@react-md/core/table/TableHeader";
|
|
43
|
+
* import { TableRow } from "@react-md/core/table/TableRow";
|
|
46
44
|
* import type { ReactElement } from "react";
|
|
47
45
|
*
|
|
48
46
|
* function Example(): ReactElement {
|
|
@@ -78,6 +76,8 @@ export interface TableProps
|
|
|
78
76
|
* );
|
|
79
77
|
* }
|
|
80
78
|
* ```
|
|
79
|
+
*
|
|
80
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
81
81
|
*/
|
|
82
82
|
export const Table = forwardRef<HTMLTableElement, TableProps>(
|
|
83
83
|
function Table(props, ref) {
|
package/src/table/TableBody.tsx
CHANGED
|
@@ -18,6 +18,8 @@ export interface TableBodyProps
|
|
|
18
18
|
*
|
|
19
19
|
* Creates a `<tbody>` element that also allows for overriding all the child
|
|
20
20
|
* `TableCell` components with additional styling behavior.
|
|
21
|
+
*
|
|
22
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
21
23
|
*/
|
|
22
24
|
export const TableBody = forwardRef<HTMLTableSectionElement, TableBodyProps>(
|
|
23
25
|
function TableBody(props, ref) {
|
package/src/table/TableCell.tsx
CHANGED
|
@@ -149,8 +149,10 @@ export interface TableCellProps extends TableCellAttributes, TableCellOptions {
|
|
|
149
149
|
*
|
|
150
150
|
* @example
|
|
151
151
|
* ```tsx
|
|
152
|
-
* import
|
|
153
|
-
* import {
|
|
152
|
+
* import { Button } from "@react-md/core/button/Button";
|
|
153
|
+
* import { Dialog } from "@react-md/core/dialog/Dialog";
|
|
154
|
+
* import { TableCell } from "@react-md/core/table/TableCell";
|
|
155
|
+
* import { type SortOrder } from "@react-md/core/table/types";
|
|
154
156
|
* import MoreVertIcon from "@react-md/material-icons/MoreVertIcon";
|
|
155
157
|
* import type { ReactElement } from "react";
|
|
156
158
|
* import { useState } from "react";
|
|
@@ -211,6 +213,8 @@ export interface TableCellProps extends TableCellAttributes, TableCellOptions {
|
|
|
211
213
|
* labels, you will need to manually set the `header={false}` prop for that cell
|
|
212
214
|
* since it is invalid to have a `<th>` without any readable content for screen
|
|
213
215
|
* readers.
|
|
216
|
+
*
|
|
217
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
214
218
|
*/
|
|
215
219
|
export const TableCell = forwardRef<HTMLTableCellElement, TableCellProps>(
|
|
216
220
|
function TableCell(props, ref) {
|
|
@@ -44,7 +44,7 @@ export type TableCheckboxSupportedCheckboxProps = Pick<
|
|
|
44
44
|
* will automatically be generated as `"checkbox" + useId()`. Use the {@link checkboxProps}
|
|
45
45
|
* to set an `id` manually for the checkbox.
|
|
46
46
|
* @since 6.0.0 The `cellId` prop was removed. Use the `id` prop instead.
|
|
47
|
-
* @since 6
|
|
47
|
+
* @since 6.0.0 The default `aria-label` was changed from
|
|
48
48
|
* `"Toggle Row Selection"` to `"Select Row"`.
|
|
49
49
|
*/
|
|
50
50
|
export interface TableCheckboxProps
|
|
@@ -83,16 +83,14 @@ export interface TableCheckboxProps
|
|
|
83
83
|
*
|
|
84
84
|
* @example Simple Example
|
|
85
85
|
* ```tsx
|
|
86
|
-
* import {
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* useCheckboxGroup
|
|
95
|
-
* } from "@react-md/core";
|
|
86
|
+
* import { useCheckboxGroup } from "@react-md/core/form/useCheckboxGroup";
|
|
87
|
+
* import { Table } from "@react-md/core/table/Table";
|
|
88
|
+
* import { TableBody } from "@react-md/core/table/TableBody";
|
|
89
|
+
* import { TableCell } from "@react-md/core/table/TableCell";
|
|
90
|
+
* import { TableCheckbox } from "@react-md/core/table/TableCheckbox";
|
|
91
|
+
* import { TableContainer } from "@react-md/core/table/TableContainer";
|
|
92
|
+
* import { TableHeader } from "@react-md/core/table/TableHeader";
|
|
93
|
+
* import { TableRow } from "@react-md/core/table/TableRow";
|
|
96
94
|
* import { type ReactElement } from "react";
|
|
97
95
|
*
|
|
98
96
|
* const rows = [
|
|
@@ -142,11 +140,12 @@ export interface TableCheckboxProps
|
|
|
142
140
|
* }
|
|
143
141
|
* ```
|
|
144
142
|
*
|
|
143
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
145
144
|
* @since 6.0.0 The `id` prop is no longer required since the checkbox's id
|
|
146
145
|
* will automatically be generated as `"checkbox" + useId()`. Use the {@link checkboxProps}
|
|
147
146
|
* to set an `id` manually for the checkbox.
|
|
148
147
|
* @since 6.0.0 The `cellId` prop was removed. Use the `id` prop instead.
|
|
149
|
-
* @since 6
|
|
148
|
+
* @since 6.0.0 The default `aria-label` was changed from
|
|
150
149
|
* `"Toggle Row Selection"` to `"Select Row"`.
|
|
151
150
|
*/
|
|
152
151
|
export const TableCheckbox = forwardRef<
|
|
@@ -18,6 +18,8 @@ export type TableContainerProps = HTMLAttributes<HTMLDivElement>;
|
|
|
18
18
|
* component if you want to make a responsive table within the page. If you
|
|
19
19
|
* don't want to use this component, you can just apply `overflow: auto` to a
|
|
20
20
|
* parent element of the table.
|
|
21
|
+
*
|
|
22
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
21
23
|
*/
|
|
22
24
|
export const TableContainer = forwardRef<HTMLDivElement, TableContainerProps>(
|
|
23
25
|
function TableContainer(props, ref) {
|
|
@@ -29,6 +29,8 @@ export interface TableFooterProps
|
|
|
29
29
|
* disable the hover effect and line wrapping by default, but the hover effect
|
|
30
30
|
* and line-wrapping can be re-enabled if desired through the `hoverable` and
|
|
31
31
|
* `disableNoWrap` props.
|
|
32
|
+
*
|
|
33
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
32
34
|
*/
|
|
33
35
|
export const TableFooter = forwardRef<
|
|
34
36
|
HTMLTableSectionElement,
|
|
@@ -31,6 +31,8 @@ export interface TableHeaderProps
|
|
|
31
31
|
* disabling the hover effect and line wrapping. The hover effect and
|
|
32
32
|
* line-wrapping can be re-enabled if desired through the `hoverable` and
|
|
33
33
|
* `disableNoWrap` props.
|
|
34
|
+
*
|
|
35
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
34
36
|
*/
|
|
35
37
|
export const TableHeader = forwardRef<
|
|
36
38
|
HTMLTableSectionElement,
|
package/src/table/TableRadio.tsx
CHANGED
|
@@ -54,14 +54,14 @@ export interface TableRadioProps
|
|
|
54
54
|
sticky?: boolean;
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
|
-
* This allows you to override any props for the
|
|
57
|
+
* This allows you to override any props for the radio that are not
|
|
58
58
|
* configurable as top-level props.
|
|
59
59
|
*
|
|
60
60
|
* @example Simple Example
|
|
61
61
|
* ```tsx
|
|
62
|
-
*
|
|
62
|
+
* radioProps={{
|
|
63
63
|
* id: "some-custom-id",
|
|
64
|
-
* ref:
|
|
64
|
+
* ref: radioRef,
|
|
65
65
|
* }}
|
|
66
66
|
* ```
|
|
67
67
|
*
|
|
@@ -78,16 +78,14 @@ export interface TableRadioProps
|
|
|
78
78
|
*
|
|
79
79
|
* @example Simple Example
|
|
80
80
|
* ```tsx
|
|
81
|
-
* import {
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* useRadioGroup,
|
|
90
|
-
* } from "@react-md/core";
|
|
81
|
+
* import { useRadioGroup } from "@react-md/core/form/useRadioGroup";
|
|
82
|
+
* import { Table } from "@react-md/core/table/Table";
|
|
83
|
+
* import { TableBody } from "@react-md/core/table/TableBody";
|
|
84
|
+
* import { TableCell } from "@react-md/core/table/TableCell";
|
|
85
|
+
* import { TableContainer } from "@react-md/core/table/TableContainer";
|
|
86
|
+
* import { TableHeader } from "@react-md/core/table/TableHeader";
|
|
87
|
+
* import { TableRadio } from "@react-md/core/table/TableRadio";
|
|
88
|
+
* import { TableRow } from "@react-md/core/table/TableRow";
|
|
91
89
|
* import type { ReactElement } from "react";
|
|
92
90
|
*
|
|
93
91
|
* const rows = [
|
|
@@ -135,6 +133,8 @@ export interface TableRadioProps
|
|
|
135
133
|
* );
|
|
136
134
|
* }
|
|
137
135
|
* ```
|
|
136
|
+
*
|
|
137
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
138
138
|
* @since 6.0.0
|
|
139
139
|
*/
|
|
140
140
|
export const TableRadio = forwardRef<HTMLTableCellElement, TableRadioProps>(
|
package/src/table/TableRow.tsx
CHANGED
|
@@ -31,6 +31,8 @@ export interface TableRowProps
|
|
|
31
31
|
*
|
|
32
32
|
* Creates a `<tr>` element with some general styles that are inherited from the
|
|
33
33
|
* base table configuration.
|
|
34
|
+
*
|
|
35
|
+
* @see {@link https://next.react-md.dev/components/table | Table Demos}
|
|
34
36
|
*/
|
|
35
37
|
export const TableRow = forwardRef<HTMLTableRowElement, TableRowProps>(
|
|
36
38
|
function TableRow(props, ref) {
|
|
@@ -77,11 +77,11 @@ export function tableCell(options: TableCellClassNameOptions = {}): string {
|
|
|
77
77
|
sticky && isInTableHeader && `${p}sticky-header`,
|
|
78
78
|
sticky && isInTableHeader && inputToggle && `${p}header-cell`,
|
|
79
79
|
vAlign && vAlign !== "middle" && `${p}${vAlign}`,
|
|
80
|
-
!lineWrap && `${p}no-wrap`,
|
|
81
80
|
padding === "vertical" && `${p}v-padding`,
|
|
82
81
|
padding === "none" && `${p}no-padding`,
|
|
83
82
|
cssUtils({
|
|
84
83
|
textAlign: hAlign,
|
|
84
|
+
textOverflow: lineWrap ? undefined : "ellipsis",
|
|
85
85
|
}),
|
|
86
86
|
className
|
|
87
87
|
);
|
|
@@ -19,6 +19,8 @@ export interface SimpleTabPanelProps
|
|
|
19
19
|
*
|
|
20
20
|
* This should generally be used along with the `SimpleTabPanels` component.
|
|
21
21
|
*
|
|
22
|
+
* @see {@link https://next.react-md.dev/components/tabs | Tabs Demos}
|
|
23
|
+
* @see {@link https://next.react-md.dev/components/tabs#disable-tab-panel-transition|Disable Tab Panel Transition Demo}
|
|
22
24
|
* @since 6.0.0
|
|
23
25
|
*/
|
|
24
26
|
export const SimpleTabPanel = forwardRef<HTMLDivElement, SimpleTabPanelProps>(
|
|
@@ -17,6 +17,8 @@ export interface SimpleTabPanelsProps
|
|
|
17
17
|
*
|
|
18
18
|
* This should be normally be used along with the `SimpleTabPanel` component.
|
|
19
19
|
*
|
|
20
|
+
* @see {@link https://next.react-md.dev/components/tabs | Tabs Demos}
|
|
21
|
+
* @see {@link https://next.react-md.dev/components/tabs#disable-tab-panel-transition|Disable Tab Panel Transition Demo}
|
|
20
22
|
* @since 6.0.0
|
|
21
23
|
*/
|
|
22
24
|
export const SimpleTabPanels = forwardRef<HTMLDivElement, SimpleTabPanelsProps>(
|
package/src/tabs/Tab.tsx
CHANGED
|
@@ -19,6 +19,26 @@ import { tab } from "./tabStyles.js";
|
|
|
19
19
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20
20
|
import { type useTabs } from "./useTabs.js";
|
|
21
21
|
|
|
22
|
+
declare module "react" {
|
|
23
|
+
interface CSSProperties {
|
|
24
|
+
"--rmd-tab-color"?: string;
|
|
25
|
+
"--rmd-tab-active-color"?: string;
|
|
26
|
+
"--rmd-tab-inactive-color"?: string;
|
|
27
|
+
"--rmd-tab-disabled-color"?: string;
|
|
28
|
+
|
|
29
|
+
"--rmd-tab-size"?: string;
|
|
30
|
+
"--rmd-tab-offset"?: string | number;
|
|
31
|
+
"--rmd-tab-min-width"?: string;
|
|
32
|
+
"--rmd-tab-max-width"?: string;
|
|
33
|
+
"--rmd-tab-min-height"?: string;
|
|
34
|
+
"--rmd-tab-stacked-height"?: string;
|
|
35
|
+
"--rmd-tab-stacked-width"?: string;
|
|
36
|
+
"--rmd-tab-padding"?: string | number;
|
|
37
|
+
"--rmd-tab-stacked-padding"?: string | number;
|
|
38
|
+
"--rmd-tab-indicator-background"?: string;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
22
42
|
/**
|
|
23
43
|
* @since 6.0.0
|
|
24
44
|
*/
|
|
@@ -101,8 +121,8 @@ export type TabProps = TabButtonProps | TabLinkProps;
|
|
|
101
121
|
* This component should usually be used with the `TabsList` component and
|
|
102
122
|
* `useTabs` hook.
|
|
103
123
|
*
|
|
124
|
+
* @see {@link https://next.react-md.dev/components/tabs | Tabs Demos}
|
|
104
125
|
* @see {@link useTabs}
|
|
105
|
-
*
|
|
106
126
|
* @since 6.0.0
|
|
107
127
|
*/
|
|
108
128
|
export function Tab(props: TabProps): ReactElement {
|
package/src/tabs/TabList.tsx
CHANGED
|
@@ -114,8 +114,8 @@ export interface TabListProps
|
|
|
114
114
|
/**
|
|
115
115
|
* **Client Component**
|
|
116
116
|
*
|
|
117
|
+
* @see {@link https://next.react-md.dev/components/tabs | Tabs Demos}
|
|
117
118
|
* @see {@link useTabs} for example usage.
|
|
118
|
-
*
|
|
119
119
|
* @since 6.0.0
|
|
120
120
|
*/
|
|
121
121
|
export const TabList = forwardRef<HTMLDivElement, TabListProps>(
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "react";
|
|
10
10
|
|
|
11
11
|
import { Button, type ButtonProps } from "../button/Button.js";
|
|
12
|
-
import { type ButtonClassNameThemeOptions } from "../button/
|
|
12
|
+
import { type ButtonClassNameThemeOptions } from "../button/styles.js";
|
|
13
13
|
import { getIcon } from "../icon/config.js";
|
|
14
14
|
import { type PropsWithRef } from "../types.js";
|
|
15
15
|
import { useDir } from "../typography/WritingDirectionProvider.js";
|
package/src/tabs/tabStyles.ts
CHANGED
|
@@ -4,26 +4,6 @@ import { cssUtils } from "../cssUtils.js";
|
|
|
4
4
|
import { bem } from "../utils/bem.js";
|
|
5
5
|
import { tabIndicator } from "./tabIndicatorStyles.js";
|
|
6
6
|
|
|
7
|
-
declare module "react" {
|
|
8
|
-
interface CSSProperties {
|
|
9
|
-
"--rmd-tab-color"?: string;
|
|
10
|
-
"--rmd-tab-active-color"?: string;
|
|
11
|
-
"--rmd-tab-inactive-color"?: string;
|
|
12
|
-
"--rmd-tab-disabled-color"?: string;
|
|
13
|
-
|
|
14
|
-
"--rmd-tab-size"?: string;
|
|
15
|
-
"--rmd-tab-offset"?: string | number;
|
|
16
|
-
"--rmd-tab-min-width"?: string;
|
|
17
|
-
"--rmd-tab-max-width"?: string;
|
|
18
|
-
"--rmd-tab-min-height"?: string;
|
|
19
|
-
"--rmd-tab-stacked-height"?: string;
|
|
20
|
-
"--rmd-tab-stacked-width"?: string;
|
|
21
|
-
"--rmd-tab-padding"?: string | number;
|
|
22
|
-
"--rmd-tab-stacked-padding"?: string | number;
|
|
23
|
-
"--rmd-tab-indicator-background"?: string;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
7
|
const styles = bem("rmd-tab");
|
|
28
8
|
|
|
29
9
|
/**
|
package/src/tabs/useTabs.ts
CHANGED
|
@@ -181,6 +181,7 @@ export interface TabsImplementation<TabValue extends string | number = number> {
|
|
|
181
181
|
* }
|
|
182
182
|
* ```
|
|
183
183
|
*
|
|
184
|
+
* @see {@link https://next.react-md.dev/components/tabs | Tabs Demos}
|
|
184
185
|
* @since 6.0.0
|
|
185
186
|
*/
|
|
186
187
|
export function useTabs(): TabsImplementation & {
|
|
@@ -234,6 +235,7 @@ export function useTabs(): TabsImplementation & {
|
|
|
234
235
|
* }
|
|
235
236
|
* ```
|
|
236
237
|
*
|
|
238
|
+
* @see {@link https://next.react-md.dev/components/tabs | Tabs Demos}
|
|
237
239
|
* @since 6.0.0
|
|
238
240
|
*/
|
|
239
241
|
export function useTabs<TabValue extends number>(
|
|
@@ -301,6 +303,7 @@ export function useTabs<TabValue extends number>(
|
|
|
301
303
|
* }
|
|
302
304
|
* ```
|
|
303
305
|
*
|
|
306
|
+
* @see {@link https://next.react-md.dev/components/tabs | Tabs Demos}
|
|
304
307
|
* @since 6.0.0
|
|
305
308
|
*/
|
|
306
309
|
export function useTabs<TabValue extends string>(
|
|
@@ -410,6 +413,7 @@ export function useTabs<TabValue extends string>(
|
|
|
410
413
|
* }
|
|
411
414
|
* ```
|
|
412
415
|
*
|
|
416
|
+
* @see {@link https://next.react-md.dev/components/tabs | Tabs Demos}
|
|
413
417
|
* @since 6.0.0
|
|
414
418
|
*/
|
|
415
419
|
export function useTabs<TabValue extends string>(
|
|
@@ -424,6 +428,7 @@ export function useTabs<TabValue extends string>(
|
|
|
424
428
|
* This hook can be uncontrolled/controlled and supports strongly typing the tab
|
|
425
429
|
* values if needed. Check out the overloads for examples.
|
|
426
430
|
*
|
|
431
|
+
* @see {@link https://next.react-md.dev/components/tabs | Tabs Demos}
|
|
427
432
|
* @since 6.0.0
|
|
428
433
|
*/
|
|
429
434
|
export function useTabs<TabValue extends string | number>(
|
|
@@ -443,7 +448,7 @@ export function useTabs<TabValue extends string | number>(
|
|
|
443
448
|
} = options;
|
|
444
449
|
|
|
445
450
|
const baseId = useEnsuredId(propBaseId, "tab");
|
|
446
|
-
const [direction, setDirection] = useState<SlideDirection>("
|
|
451
|
+
const [direction, setDirection] = useState<SlideDirection>("forward");
|
|
447
452
|
|
|
448
453
|
const [activeTab, setActiveTab] = useEnsuredState({
|
|
449
454
|
value: propActiveTab,
|
|
@@ -489,7 +494,7 @@ export function useTabs<TabValue extends string | number>(
|
|
|
489
494
|
return {
|
|
490
495
|
activeIndex,
|
|
491
496
|
setActiveIndex: (nextActiveIndex) => {
|
|
492
|
-
setDirection(activeIndex < nextActiveIndex ? "
|
|
497
|
+
setDirection(activeIndex < nextActiveIndex ? "forward" : "backward");
|
|
493
498
|
if (typeof activeTab === "string" || tabs.length > 0) {
|
|
494
499
|
setActiveTab(tabs[nextActiveIndex]);
|
|
495
500
|
} else {
|
|
@@ -2,9 +2,10 @@ import { jest } from "@jest/globals";
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
type MatchMediaChangeViewport,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
type MatchMediaMatcher,
|
|
6
|
+
matchDesktop,
|
|
7
|
+
} from "../mocks/match-media.js";
|
|
8
|
+
import { createMatchMediaSpy } from "../utils/createMatchMediaSpy.js";
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* @example Default Behavior
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { afterEach, jest } from "@jest/globals";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { cleanupRO } from "../mocks/ResizeObserver.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @param restoreAllMocks - Set to `false` to prevent `jest.restoreAllMocks()` from being
|
|
7
7
|
* called.
|
|
8
8
|
*/
|
|
9
9
|
export function cleanupResizeObserverAfterEach(restoreAllMocks = true): void {
|
|
10
|
-
|
|
10
|
+
cleanupRO(afterEach, restoreAllMocks ? jest.restoreAllMocks : undefined);
|
|
11
11
|
}
|
|
@@ -42,18 +42,17 @@ export class ResizeObserverMock implements ResizeObserver {
|
|
|
42
42
|
* @example Main Usage
|
|
43
43
|
* ```tsx
|
|
44
44
|
* import {
|
|
45
|
-
* cleanupResizeObserverAfterEach,
|
|
46
45
|
* setupResizeObserverMock,
|
|
47
46
|
* } from "@react-md/core/test-utils";
|
|
48
|
-
* import { useResizeObserver } from "@react-md/core";
|
|
47
|
+
* import { useResizeObserver } from "@react-md/core/useResizeObserver";
|
|
49
48
|
* import { ExampleComponent } from "../ExampleComponent.js";
|
|
50
49
|
*
|
|
51
50
|
* // choose your test framework
|
|
52
|
-
* import { afterEach, jest } from "@jest/globals";
|
|
53
|
-
* cleanupResizeObserverAfterEach(
|
|
51
|
+
* import { afterEach, cleanupResizeObserverAfterEach, jest } from "@jest/globals";
|
|
52
|
+
* cleanupResizeObserverAfterEach();
|
|
54
53
|
*
|
|
55
|
-
* import { afterEach, vitest } from "vitest";
|
|
56
|
-
* cleanupResizeObserverAfterEach(
|
|
54
|
+
* import { afterEach, cleanupResizeObserverAfterEach, vitest } from "vitest";
|
|
55
|
+
* cleanupResizeObserverAfterEach();
|
|
57
56
|
*
|
|
58
57
|
* describe("ExampleComponent", () => {
|
|
59
58
|
* it("should do stuff", () => {
|
|
@@ -269,8 +268,9 @@ export function setupResizeObserverMock(
|
|
|
269
268
|
/**
|
|
270
269
|
* @see {@link setupResizeObserverMock}
|
|
271
270
|
* @since 6.0.0
|
|
271
|
+
* @internal
|
|
272
272
|
*/
|
|
273
|
-
export function
|
|
273
|
+
export function cleanupRO(
|
|
274
274
|
afterEach: (callback: () => void) => void,
|
|
275
275
|
restoreAllMocks: () => void = () => {}
|
|
276
276
|
): void {
|
|
@@ -5,6 +5,38 @@ import {
|
|
|
5
5
|
DEFAULT_TABLET_MIN_WIDTH,
|
|
6
6
|
} from "../../media-queries/appSize.js";
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @since 6.0.0
|
|
10
|
+
*/
|
|
11
|
+
export interface MatchMediaChangeViewport {
|
|
12
|
+
/**
|
|
13
|
+
* @example Default Behavior
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const matchMedia = spyOnMatchMedia();
|
|
16
|
+
* render(<Test />);
|
|
17
|
+
*
|
|
18
|
+
* // expect desktop results
|
|
19
|
+
*
|
|
20
|
+
* matchMedia.changeViewport(matchPhone);
|
|
21
|
+
* // expect phone results
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @example Custom Act Behavior
|
|
25
|
+
* ```tsx
|
|
26
|
+
* const matchMedia = spyOnMatchMedia();
|
|
27
|
+
* const { rerender } = render(<Test />);
|
|
28
|
+
*
|
|
29
|
+
* // expect desktop results
|
|
30
|
+
*
|
|
31
|
+
* matchMedia.changeViewport(matchPhone, false);
|
|
32
|
+
* rerender(<Test key="new-key" />);
|
|
33
|
+
*
|
|
34
|
+
* // expect phone results
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
changeViewport: (matcher: MatchMediaMatcher, disableAct?: boolean) => void;
|
|
38
|
+
}
|
|
39
|
+
|
|
8
40
|
const noop = (): void => {
|
|
9
41
|
// do nothing
|
|
10
42
|
};
|
|
@@ -2,41 +2,10 @@ import { act } from "@testing-library/react";
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
BASE_MEDIA_QUERY_LIST,
|
|
5
|
+
type MatchMediaChangeViewport,
|
|
5
6
|
type MatchMediaMatcher,
|
|
6
7
|
matchDesktop,
|
|
7
|
-
} from "
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @since 6.0.0
|
|
11
|
-
*/
|
|
12
|
-
export interface MatchMediaChangeViewport {
|
|
13
|
-
/**
|
|
14
|
-
* @example Default Behavior
|
|
15
|
-
* ```tsx
|
|
16
|
-
* const matchMedia = spyOnMatchMedia();
|
|
17
|
-
* render(<Test />);
|
|
18
|
-
*
|
|
19
|
-
* // expect desktop results
|
|
20
|
-
*
|
|
21
|
-
* matchMedia.changeViewport(matchPhone);
|
|
22
|
-
* // expect phone results
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* @example Custom Act Behavior
|
|
26
|
-
* ```tsx
|
|
27
|
-
* const matchMedia = spyOnMatchMedia();
|
|
28
|
-
* const { rerender } = render(<Test />);
|
|
29
|
-
*
|
|
30
|
-
* // expect desktop results
|
|
31
|
-
*
|
|
32
|
-
* matchMedia.changeViewport(matchPhone, false);
|
|
33
|
-
* rerender(<Test key="new-key" />);
|
|
34
|
-
*
|
|
35
|
-
* // expect phone results
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
changeViewport: (matcher: MatchMediaMatcher, disableAct?: boolean) => void;
|
|
39
|
-
}
|
|
8
|
+
} from "../mocks/match-media.js";
|
|
40
9
|
|
|
41
10
|
/**
|
|
42
11
|
* @since 6.0.0
|
|
@@ -46,12 +15,41 @@ export interface MatchMediaMockFunction {
|
|
|
46
15
|
}
|
|
47
16
|
|
|
48
17
|
/**
|
|
18
|
+
* Used to create a `spyOn(window, "matchMedia")` without knowing the test
|
|
19
|
+
* framework.
|
|
20
|
+
*
|
|
21
|
+
* @example Setup Test Framework
|
|
22
|
+
* ```tsx
|
|
23
|
+
* export function spyOnMatchMedia(
|
|
24
|
+
* defaultMatch: MatchMediaMatcher = matchDesktop
|
|
25
|
+
* ): jest.SpiedFunction<typeof window.matchMedia> & MatchMediaChangeViewport {
|
|
26
|
+
* return createMatchMediaSpy(jest.spyOn(window, "matchMedia"), defaultMatch);
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* NOTE: The `spyOnMatchMedia` function **must** not call the `.spyOn`
|
|
31
|
+
* immediately to work correctly. The spy needs to be invoked whenever this is
|
|
32
|
+
* called instead. For example, this is bad and will fail:
|
|
33
|
+
*
|
|
34
|
+
* @example Bad Example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* export const spyOnMatchMedia = createMatchMediaSpy.bind(null, jest.spy(window, "matchMedia"));
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* This is mostly a reminder to myself since I wanted something like the
|
|
40
|
+
* following code, but failed:
|
|
41
|
+
*
|
|
42
|
+
* ```ts
|
|
43
|
+
* export const spyOnMatchMedia = createMatchMediaSpy(jest.spyOn(window, "matchMedia"));
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
49
46
|
* @since 6.0.0
|
|
47
|
+
* @internal
|
|
50
48
|
*/
|
|
51
|
-
export
|
|
49
|
+
export function createMatchMediaSpy<SpyFunction extends MatchMediaMockFunction>(
|
|
52
50
|
matchMediaSpy: SpyFunction,
|
|
53
51
|
defaultMatch: MatchMediaMatcher = matchDesktop
|
|
54
|
-
): SpyFunction & MatchMediaChangeViewport
|
|
52
|
+
): SpyFunction & MatchMediaChangeViewport {
|
|
55
53
|
type Listener = (event: MediaQueryListEvent) => void;
|
|
56
54
|
|
|
57
55
|
const listeners = new Map<string, Listener>();
|
|
@@ -108,4 +106,4 @@ export const createMatchMediaSpy = <SpyFunction extends MatchMediaMockFunction>(
|
|
|
108
106
|
mock.changeViewport = changeViewport;
|
|
109
107
|
|
|
110
108
|
return mock;
|
|
111
|
-
}
|
|
109
|
+
}
|
|
@@ -2,9 +2,10 @@ import { type MockInstance, vi } from "vitest";
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
type MatchMediaChangeViewport,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
type MatchMediaMatcher,
|
|
6
|
+
matchDesktop,
|
|
7
|
+
} from "../mocks/match-media.js";
|
|
8
|
+
import { createMatchMediaSpy } from "../utils/createMatchMediaSpy.js";
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* @example Default Behavior
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { afterEach, vi } from "vitest";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { cleanupRO } from "../mocks/ResizeObserver.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @param restoreAllMocks - Set to `false` to prevent `vi.restoreAllMocks()` from being
|
|
7
7
|
* called.
|
|
8
8
|
*/
|
|
9
9
|
export function cleanupResizeObserverAfterEach(restoreAllMocks = true): void {
|
|
10
|
-
|
|
10
|
+
cleanupRO(afterEach, restoreAllMocks ? vi.restoreAllMocks : undefined);
|
|
11
11
|
}
|