@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/RenderRecursively.tsx"],"sourcesContent":["// TODO: Figure out how to strictly enforce the data\nimport { type ComponentType, type ReactElement, type ReactNode } from \"react\";\n\n/**\n * @since 6.0.0\n */\nexport type RecursiveItem<T = Record<string, unknown>> = T & {\n items?: readonly RecursiveItem<T>[];\n};\n\n/**\n * @since 6.0.0\n */\nexport interface RecursiveItemKeyOptions<Item = Record<string, unknown>> {\n item: RecursiveItem<Item>;\n depth: number;\n index: number;\n}\n\n/**\n * This is the default implementation for {@link RenderRecursivelyProps.getItemKey}.\n *\n * ```ts\n * return `${options.depth}-${options.index}`\n * ```\n *\n * @since 6.0.0\n */\nexport function getRecursiveItemKey<Item = Record<string, unknown>>(\n options: RecursiveItemKeyOptions<Item>\n): string {\n const { depth, index } = options;\n\n return `${depth}-${index}`;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface RenderRecursiveItemsProps<\n Item = Record<string, unknown>,\n Data = unknown,\n> {\n data?: Data;\n\n /**\n * The current item to render.\n */\n item: RecursiveItem<Item>;\n\n /**\n * The list of parent items which can be used to determine the depth or \"share\n * props\" if the items contained props.\n */\n parents: readonly RecursiveItem<Item>[];\n\n /**\n * This will be provided if the {@link item} had child items and will be the\n * rendered content.\n */\n children?: ReactNode;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface RenderRecursivelyProps<\n Item = Record<string, unknown>,\n Data = unknown,\n> {\n data?: Data;\n items: readonly RecursiveItem<Item>[];\n\n /**\n * The renderer for each item.\n */\n render: ComponentType<RenderRecursiveItemsProps<Item, Data>>;\n\n /**\n * This should not be used for external users. This is used to build the\n * {@link RenderRecursiveItemsProps.parents} list.\n *\n * @internal\n * @defaultValue `[]`\n */\n parents?: readonly RecursiveItem<Item>[];\n\n /**\n * Gets a React `key` for a specific item. This should be provided if the\n * items can be moved around to improve performance.\n *\n * @example\n * ```ts\n * getItemKey={({ item }) => item.id}\n * ```\n *\n * @see {@link getRecursiveItemKey}\n * @defaultValue `` ({ index, depth }) => `${depth}-${index}` ``\n */\n getItemKey?: (options: RecursiveItemKeyOptions<Item>) => string;\n}\n\n/**\n * Helper component for recursively rendering specific data structures (mostly\n * trees). The main use-case is for rendering site navigation and the `Tree`\n * component.\n *\n * @example\n * ```tsx\n * \"use client\";\n *\n * import { Box } from \"@react-md/core/box/Box\";\n * import { Button } from \"@react-md/core/button/Button\";\n * import { Divider } from \"@react-md/core/divider/Divider\";\n * import { List } from \"@react-md/core/list/List\";\n * import { useCollapseTransition } from \"@react-md/core/transition/useCollapseTransition\";\n * import {\n * type DefaultTreeItemNode,\n * type TreeData,\n * } from \"@react-md/core/tree/types\";\n * import { type UseStateSetter } from \"@react-md/core/types\";\n * import { useToggle } from \"@react-md/core/useToggle\";\n * import {\n * type RenderRecursiveItemsProps,\n * RenderRecursively,\n * } from \"@react-md/core/utils/RenderRecursively\";\n * import { type ReactElement, useState } from \"react\";\n *\n * interface Data {\n * activeId: string;\n * setActiveId: UseStateSetter<string>;\n * }\n *\n * export default function SimpleExample(): ReactElement {\n * const [activeId, setActiveId] = useState(\"/\");\n * return (\n * <Box fullWidth disableWrap>\n * <Box stacked align=\"stretch\">\n * <RenderRecursively\n * // this is optional and can be any sort of info\n * data={{ activeId, setActiveId }}\n * items={Object.values(navItems)}\n * render={Render}\n * />\n * </Box>\n * <div>Active route: {activeId}</div>\n * </Box>\n * );\n * }\n *\n * const navItems = {\n * \"/\": {\n * href: \"/\",\n * itemId: \"/\",\n * parentId: null,\n * children: \"Home\",\n * },\n * \"/route-1\": {\n * itemId: \"/route-1\",\n * parentId: null,\n * children: \"Collapsible\",\n * },\n * \"/nested-route-1\": {\n * itemId: \"/nested-route-1\",\n * parentId: \"/route-1\",\n * children: \"Child 1\",\n * },\n * \"/nested-route-2\": {\n * itemId: \"/nested-route-2\",\n * parentId: \"/route-2\",\n * children: \"Child 2\",\n * },\n * \"/divider-1\": {\n * itemId: \"/divider-1\",\n * parentId: null,\n * },\n * \"/route-2\": {\n * itemId: \"/route-2\",\n * parentId: null,\n * children: \"Route 2\",\n * },\n * } satisfies TreeData;\n *\n * function Render(\n * props: RenderRecursiveItemsProps<DefaultTreeItemNode, Data>\n * ): ReactElement {\n * const {\n * item,\n * parents,\n * // this is passed down from the root `RenderRecursively`\n * data,\n * // this _might_ be defined based on the implementation. it's set to any\n * // renderable element\n * children: _children,\n * } = props;\n * if (item.itemId.includes(\"divider\")) {\n * return <Divider />;\n * }\n *\n * if (item.items) {\n * return <NestedNavigation {...props} />;\n * }\n *\n * const prefix = parents.map((parent) => parent.itemId).join(\"/\");\n * const currentId = `${prefix}${item.itemId}`;\n * // I haven't figured out how to manage the type safety of this yet\n * const active = data?.activeId === currentId;\n * // this would normally be a link, but to keep the demo simple, it's a button\n * return (\n * <Button\n * theme={active ? \"primary\" : \"clear\"}\n * themeType={active ? \"contained\" : \"flat\"}\n * onClick={() => {\n * data?.setActiveId(currentId);\n * }}\n * style={{ justifyContent: \"flex-start\" }}\n * >\n * {item.children}\n * </Button>\n * );\n * }\n *\n * function NestedNavigation(\n * props: RenderRecursiveItemsProps<DefaultTreeItemNode, Data>\n * ): ReactElement {\n * const {\n * item,\n * parents: _parents,\n * // this is passed down from the root `RenderRecursively`\n * data: _data,\n * children,\n * } = props;\n * const { toggle, toggled: collapsed } = useToggle(false);\n * const { elementProps } = useCollapseTransition({\n * transitionIn: !collapsed,\n * });\n *\n * return (\n * <li>\n * <Button onClick={toggle}>{item.children}</Button>\n * <List {...elementProps}>{children}</List>\n * </li>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport function RenderRecursively<Item, Data>(\n props: RenderRecursivelyProps<Item, Data>\n): ReactElement {\n const {\n data,\n items,\n render: Render,\n getItemKey = getRecursiveItemKey,\n parents = [],\n } = props;\n\n return (\n <>\n {items.map((item, index) => {\n let children: ReactNode;\n const depth = parents.length;\n if (item.items?.length) {\n children = (\n <RenderRecursively\n data={data}\n items={item.items}\n render={Render}\n getItemKey={getItemKey}\n parents={[...parents, item]}\n />\n );\n }\n\n return (\n <Render\n key={getItemKey({ item, depth, index })}\n // typecast since it should be undefined in renderer as well?\n data={data}\n item={item}\n parents={parents}\n >\n {children}\n </Render>\n );\n })}\n </>\n );\n}\n"],"names":["getRecursiveItemKey","options","depth","index","RenderRecursively","props","data","items","render","Render","getItemKey","parents","map","item","children","length"],"mappings":"AAAA,oDAAoD;;AAmBpD;;;;;;;;CAQC,GACD,OAAO,SAASA,oBACdC,OAAsC;IAEtC,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGF;IAEzB,OAAO,GAAGC,MAAM,CAAC,EAAEC,OAAO;AAC5B;AAoEA
|
|
1
|
+
{"version":3,"sources":["../../src/utils/RenderRecursively.tsx"],"sourcesContent":["// TODO: Figure out how to strictly enforce the data\nimport { type ComponentType, type ReactElement, type ReactNode } from \"react\";\n\n/**\n * @since 6.0.0\n */\nexport type RecursiveItem<T = Record<string, unknown>> = T & {\n items?: readonly RecursiveItem<T>[];\n};\n\n/**\n * @since 6.0.0\n */\nexport interface RecursiveItemKeyOptions<Item = Record<string, unknown>> {\n item: RecursiveItem<Item>;\n depth: number;\n index: number;\n}\n\n/**\n * This is the default implementation for {@link RenderRecursivelyProps.getItemKey}.\n *\n * ```ts\n * return `${options.depth}-${options.index}`\n * ```\n *\n * @since 6.0.0\n */\nexport function getRecursiveItemKey<Item = Record<string, unknown>>(\n options: RecursiveItemKeyOptions<Item>\n): string {\n const { depth, index } = options;\n\n return `${depth}-${index}`;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface RenderRecursiveItemsProps<\n Item = Record<string, unknown>,\n Data = unknown,\n> {\n data?: Data;\n\n /**\n * The current item to render.\n */\n item: RecursiveItem<Item>;\n\n /**\n * The list of parent items which can be used to determine the depth or \"share\n * props\" if the items contained props.\n */\n parents: readonly RecursiveItem<Item>[];\n\n /**\n * This will be provided if the {@link item} had child items and will be the\n * rendered content.\n */\n children?: ReactNode;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface RenderRecursivelyProps<\n Item = Record<string, unknown>,\n Data = unknown,\n> {\n data?: Data;\n items: readonly RecursiveItem<Item>[];\n\n /**\n * The renderer for each item.\n */\n render: ComponentType<RenderRecursiveItemsProps<Item, Data>>;\n\n /**\n * This should not be used for external users. This is used to build the\n * {@link RenderRecursiveItemsProps.parents} list.\n *\n * @internal\n * @defaultValue `[]`\n */\n parents?: readonly RecursiveItem<Item>[];\n\n /**\n * Gets a React `key` for a specific item. This should be provided if the\n * items can be moved around to improve performance.\n *\n * @example\n * ```ts\n * getItemKey={({ item }) => item.id}\n * ```\n *\n * @see {@link getRecursiveItemKey}\n * @defaultValue `` ({ index, depth }) => `${depth}-${index}` ``\n */\n getItemKey?: (options: RecursiveItemKeyOptions<Item>) => string;\n}\n\n/**\n * Helper component for recursively rendering specific data structures (mostly\n * trees). The main use-case is for rendering site navigation and the `Tree`\n * component.\n *\n * @example\n * ```tsx\n * \"use client\";\n *\n * import { Box } from \"@react-md/core/box/Box\";\n * import { Button } from \"@react-md/core/button/Button\";\n * import { Divider } from \"@react-md/core/divider/Divider\";\n * import { List } from \"@react-md/core/list/List\";\n * import { useCollapseTransition } from \"@react-md/core/transition/useCollapseTransition\";\n * import {\n * type DefaultTreeItemNode,\n * type TreeData,\n * } from \"@react-md/core/tree/types\";\n * import { type UseStateSetter } from \"@react-md/core/types\";\n * import { useToggle } from \"@react-md/core/useToggle\";\n * import {\n * type RenderRecursiveItemsProps,\n * RenderRecursively,\n * } from \"@react-md/core/utils/RenderRecursively\";\n * import { type ReactElement, useState } from \"react\";\n *\n * interface Data {\n * activeId: string;\n * setActiveId: UseStateSetter<string>;\n * }\n *\n * export default function SimpleExample(): ReactElement {\n * const [activeId, setActiveId] = useState(\"/\");\n * return (\n * <Box fullWidth disableWrap>\n * <Box stacked align=\"stretch\">\n * <RenderRecursively\n * // this is optional and can be any sort of info\n * data={{ activeId, setActiveId }}\n * items={Object.values(navItems)}\n * render={Render}\n * />\n * </Box>\n * <div>Active route: {activeId}</div>\n * </Box>\n * );\n * }\n *\n * const navItems = {\n * \"/\": {\n * href: \"/\",\n * itemId: \"/\",\n * parentId: null,\n * children: \"Home\",\n * },\n * \"/route-1\": {\n * itemId: \"/route-1\",\n * parentId: null,\n * children: \"Collapsible\",\n * },\n * \"/nested-route-1\": {\n * itemId: \"/nested-route-1\",\n * parentId: \"/route-1\",\n * children: \"Child 1\",\n * },\n * \"/nested-route-2\": {\n * itemId: \"/nested-route-2\",\n * parentId: \"/route-2\",\n * children: \"Child 2\",\n * },\n * \"/divider-1\": {\n * itemId: \"/divider-1\",\n * parentId: null,\n * },\n * \"/route-2\": {\n * itemId: \"/route-2\",\n * parentId: null,\n * children: \"Route 2\",\n * },\n * } satisfies TreeData;\n *\n * function Render(\n * props: RenderRecursiveItemsProps<DefaultTreeItemNode, Data>\n * ): ReactElement {\n * const {\n * item,\n * parents,\n * // this is passed down from the root `RenderRecursively`\n * data,\n * // this _might_ be defined based on the implementation. it's set to any\n * // renderable element\n * children: _children,\n * } = props;\n * if (item.itemId.includes(\"divider\")) {\n * return <Divider />;\n * }\n *\n * if (item.items) {\n * return <NestedNavigation {...props} />;\n * }\n *\n * const prefix = parents.map((parent) => parent.itemId).join(\"/\");\n * const currentId = `${prefix}${item.itemId}`;\n * // I haven't figured out how to manage the type safety of this yet\n * const active = data?.activeId === currentId;\n * // this would normally be a link, but to keep the demo simple, it's a button\n * return (\n * <Button\n * theme={active ? \"primary\" : \"clear\"}\n * themeType={active ? \"contained\" : \"flat\"}\n * onClick={() => {\n * data?.setActiveId(currentId);\n * }}\n * style={{ justifyContent: \"flex-start\" }}\n * >\n * {item.children}\n * </Button>\n * );\n * }\n *\n * function NestedNavigation(\n * props: RenderRecursiveItemsProps<DefaultTreeItemNode, Data>\n * ): ReactElement {\n * const {\n * item,\n * parents: _parents,\n * // this is passed down from the root `RenderRecursively`\n * data: _data,\n * children,\n * } = props;\n * const { toggle, toggled: collapsed } = useToggle(false);\n * const { elementProps } = useCollapseTransition({\n * transitionIn: !collapsed,\n * });\n *\n * return (\n * <li>\n * <Button onClick={toggle}>{item.children}</Button>\n * <List {...elementProps}>{children}</List>\n * </li>\n * );\n * }\n * ```\n *\n * @see {@link https://next.react-md.dev/components/render-recursively | RenderRecursively Demos}\n * @since 6.0.0\n */\nexport function RenderRecursively<Item, Data>(\n props: RenderRecursivelyProps<Item, Data>\n): ReactElement {\n const {\n data,\n items,\n render: Render,\n getItemKey = getRecursiveItemKey,\n parents = [],\n } = props;\n\n return (\n <>\n {items.map((item, index) => {\n let children: ReactNode;\n const depth = parents.length;\n if (item.items?.length) {\n children = (\n <RenderRecursively\n data={data}\n items={item.items}\n render={Render}\n getItemKey={getItemKey}\n parents={[...parents, item]}\n />\n );\n }\n\n return (\n <Render\n key={getItemKey({ item, depth, index })}\n // typecast since it should be undefined in renderer as well?\n data={data}\n item={item}\n parents={parents}\n >\n {children}\n </Render>\n );\n })}\n </>\n );\n}\n"],"names":["getRecursiveItemKey","options","depth","index","RenderRecursively","props","data","items","render","Render","getItemKey","parents","map","item","children","length"],"mappings":"AAAA,oDAAoD;;AAmBpD;;;;;;;;CAQC,GACD,OAAO,SAASA,oBACdC,OAAsC;IAEtC,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGF;IAEzB,OAAO,GAAGC,MAAM,CAAC,EAAEC,OAAO;AAC5B;AAoEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkJC,GACD,OAAO,SAASC,kBACdC,KAAyC;IAEzC,MAAM,EACJC,IAAI,EACJC,KAAK,EACLC,QAAQC,MAAM,EACdC,aAAaV,mBAAmB,EAChCW,UAAU,EAAE,EACb,GAAGN;IAEJ,qBACE;kBACGE,MAAMK,GAAG,CAAC,CAACC,MAAMV;YAChB,IAAIW;YACJ,MAAMZ,QAAQS,QAAQI,MAAM;YAC5B,IAAIF,KAAKN,KAAK,EAAEQ,QAAQ;gBACtBD,yBACE,KAACV;oBACCE,MAAMA;oBACNC,OAAOM,KAAKN,KAAK;oBACjBC,QAAQC;oBACRC,YAAYA;oBACZC,SAAS;2BAAIA;wBAASE;qBAAK;;YAGjC;YAEA,qBACE,KAACJ;gBAEC,6DAA6D;gBAC7DH,MAAMA;gBACNO,MAAMA;gBACNF,SAASA;0BAERG;eANIJ,WAAW;gBAAEG;gBAAMX;gBAAOC;YAAM;QAS3C;;AAGN"}
|
package/dist/utils/applyRef.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { Ref } from "react";
|
|
|
6
6
|
* @example Simple Example
|
|
7
7
|
* ```tsx
|
|
8
8
|
* import { HTMLAttributes, forwardRef } from "react";
|
|
9
|
-
* import { applyRef } from "@react-md/core";
|
|
9
|
+
* import { applyRef } from "@react-md/core/utils/applyRef";
|
|
10
10
|
*
|
|
11
11
|
* export type ExampleProps = HTMLAttributes<HTMLDivElement>;
|
|
12
12
|
*
|
package/dist/utils/applyRef.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @example Simple Example
|
|
6
6
|
* ```tsx
|
|
7
7
|
* import { HTMLAttributes, forwardRef } from "react";
|
|
8
|
-
* import { applyRef } from "@react-md/core";
|
|
8
|
+
* import { applyRef } from "@react-md/core/utils/applyRef";
|
|
9
9
|
*
|
|
10
10
|
* export type ExampleProps = HTMLAttributes<HTMLDivElement>;
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/applyRef.ts"],"sourcesContent":["import type { MutableRefObject, Ref } from \"react\";\n\n/**\n * A small utility function that allows me to apply a passed in ref along with\n * my own custom ref logic.\n *\n * @example Simple Example\n * ```tsx\n * import { HTMLAttributes, forwardRef } from \"react\";\n * import { applyRef } from \"@react-md/core\";\n *\n * export type ExampleProps = HTMLAttributes<HTMLDivElement>;\n *\n * const Example = forwardRef<HTMLDivElement, ExampleProps>(function Example(props, ref) {\n * const refHandler = useCallback((instance: HTMLDivElement | null) => {\n * applyRef(instance, ref);\n * if (!instance) {\n * return;\n * }\n *\n * // do something with instance\n * });\n *\n * return <div ref={refHandler} />;\n * });\n * ```\n *\n * @param instance - The DOM Node instance\n * @param ref - The prop ref\n * @internal\n */\nexport function applyRef<E>(instance: E | null, ref: Ref<E> | undefined): void {\n if (!ref) {\n return;\n }\n\n if (typeof ref === \"function\") {\n ref(instance);\n } else if (typeof ref === \"object\") {\n (ref as MutableRefObject<E | null>).current = instance;\n }\n}\n"],"names":["applyRef","instance","ref","current"],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BC,GACD,OAAO,SAASA,SAAYC,QAAkB,EAAEC,GAAuB;IACrE,IAAI,CAACA,KAAK;QACR;IACF;IAEA,IAAI,OAAOA,QAAQ,YAAY;QAC7BA,IAAID;IACN,OAAO,IAAI,OAAOC,QAAQ,UAAU;QACjCA,IAAmCC,OAAO,GAAGF;IAChD;AACF"}
|
|
1
|
+
{"version":3,"sources":["../../src/utils/applyRef.ts"],"sourcesContent":["import type { MutableRefObject, Ref } from \"react\";\n\n/**\n * A small utility function that allows me to apply a passed in ref along with\n * my own custom ref logic.\n *\n * @example Simple Example\n * ```tsx\n * import { HTMLAttributes, forwardRef } from \"react\";\n * import { applyRef } from \"@react-md/core/utils/applyRef\";\n *\n * export type ExampleProps = HTMLAttributes<HTMLDivElement>;\n *\n * const Example = forwardRef<HTMLDivElement, ExampleProps>(function Example(props, ref) {\n * const refHandler = useCallback((instance: HTMLDivElement | null) => {\n * applyRef(instance, ref);\n * if (!instance) {\n * return;\n * }\n *\n * // do something with instance\n * });\n *\n * return <div ref={refHandler} />;\n * });\n * ```\n *\n * @param instance - The DOM Node instance\n * @param ref - The prop ref\n * @internal\n */\nexport function applyRef<E>(instance: E | null, ref: Ref<E> | undefined): void {\n if (!ref) {\n return;\n }\n\n if (typeof ref === \"function\") {\n ref(instance);\n } else if (typeof ref === \"object\") {\n (ref as MutableRefObject<E | null>).current = instance;\n }\n}\n"],"names":["applyRef","instance","ref","current"],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BC,GACD,OAAO,SAASA,SAAYC,QAAkB,EAAEC,GAAuB;IACrE,IAAI,CAACA,KAAK;QACR;IACF;IAEA,IAAI,OAAOA,QAAQ,YAAY;QAC7BA,IAAID;IACN,OAAO,IAAI,OAAOC,QAAQ,UAAU;QACjCA,IAAmCC,OAAO,GAAGF;IAChD;AACF"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { type ButtonHTMLAttributes } from "react";
|
|
2
2
|
import { type LabelRequiredForA11y } from "../types.js";
|
|
3
|
+
declare module "react" {
|
|
4
|
+
interface CSSProperties {
|
|
5
|
+
"--rmd-window-splitter-top"?: number | string;
|
|
6
|
+
"--rmd-window-splitter-right"?: number | string;
|
|
7
|
+
"--rmd-window-splitter-bottom"?: number | string;
|
|
8
|
+
"--rmd-window-splitter-left"?: number | string;
|
|
9
|
+
"--rmd-window-splitter-opacity"?: number | string;
|
|
10
|
+
"--rmd-window-splitter-position"?: number | string;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
3
13
|
/**
|
|
4
14
|
* @since 6.0.0
|
|
5
15
|
* @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/}
|
|
@@ -70,6 +80,7 @@ export type WindowSplitterProps = LabelRequiredForA11y<BaseWindowSplitterProps>;
|
|
|
70
80
|
* }
|
|
71
81
|
* ```
|
|
72
82
|
*
|
|
83
|
+
* @see {@link https://next.react-md.dev/components/window-splitter | WindowSplitter Demos}
|
|
73
84
|
* @since 6.0.0
|
|
74
85
|
*/
|
|
75
86
|
export declare const WindowSplitter: import("react").ForwardRefExoticComponent<WindowSplitterProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -42,6 +42,7 @@ import { windowSplitter } from "./styles.js";
|
|
|
42
42
|
* }
|
|
43
43
|
* ```
|
|
44
44
|
*
|
|
45
|
+
* @see {@link https://next.react-md.dev/components/window-splitter | WindowSplitter Demos}
|
|
45
46
|
* @since 6.0.0
|
|
46
47
|
*/ export const WindowSplitter = /*#__PURE__*/ forwardRef(function WindowSplitter(props, ref) {
|
|
47
48
|
const { role = "separator", className, dragging, reversed, disableFixed = false, ...remaining } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/window-splitter/WindowSplitter.tsx"],"sourcesContent":["import { type ButtonHTMLAttributes, forwardRef } from \"react\";\n\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { windowSplitter } from \"./styles.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { type useWindowSplitter } from \"./useWindowSplitter.js\";\n\n/**\n * @since 6.0.0\n * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/}\n */\nexport interface BaseWindowSplitterProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"type\" | \"children\"> {\n /**\n * This will be provided by the {@link useWindowSplitter} hook.\n */\n \"aria-controls\": string;\n\n /**\n * This will be provided by the {@link useWindowSplitter} hook.\n */\n dragging: boolean;\n\n /**\n * This will be provided by the {@link useWindowSplitter} hook.\n */\n reversed: boolean;\n\n /**\n * Set this to `true` if the window splitter should use `position: absolute`\n * instead of `position: fixed`.\n *\n * @defaultValue `false`\n */\n disableFixed?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport type WindowSplitterProps = LabelRequiredForA11y<BaseWindowSplitterProps>;\n\n/**\n * The `WindowSplitter` should be used with the `useWindowSplitter` hook to\n * resize parts of a layout.\n *\n * See the `useResizableLayout` hook if the entire page layout should be\n * resizable.\n *\n * @example Simple Example\n * ```tsx\n * \"use client\";\n * import { WindowSplitter } from \"@react-md/core/window-splitter/WindowSplitter\";\n * import { useWindowSplitter } from \"@react-md/core/window-splitter/useWindowSplitter\";\n * import { useId, type ReactElement } from \"react\";\n *\n * export function Example(): ReactElement {\n * const panelId = useId();\n * const { value, splitterProps } = useWindowSplitter({\n * min: 120,\n * max: 380,\n * });\n *\n * return (\n * <div\n * style={{\n * \"--rmd-window-splitter-position\": `${value}px`,\n * display: \"grid\",\n * gridTemplateColumns: \"var(--rmd-window-splitter-position, 120px) 1fr\",\n * }}\n * >\n * <div>Panel 1</div>\n * <WindowSplitter\n * {...splitterProps}\n * aria-controls={panelId}\n * aria-labelledby={panelId}\n * />\n * <div>Panel 2</div>\n * </div>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport const WindowSplitter = forwardRef<\n HTMLButtonElement,\n WindowSplitterProps\n>(function WindowSplitter(props, ref) {\n const {\n role = \"separator\",\n className,\n dragging,\n reversed,\n disableFixed = false,\n ...remaining\n } = props;\n const vertical = props[\"aria-orientation\"] === \"vertical\";\n\n return (\n <button\n {...remaining}\n ref={ref}\n type=\"button\"\n role={role}\n className={windowSplitter({\n className,\n reversed,\n dragging,\n vertical,\n disableFixed,\n })}\n />\n );\n});\n"],"names":["forwardRef","windowSplitter","WindowSplitter","props","ref","role","className","dragging","reversed","disableFixed","remaining","vertical","button","type"],"mappings":";AAAA,SAAoCA,UAAU,QAAQ,QAAQ;AAG9D,SAASC,cAAc,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"sources":["../../src/window-splitter/WindowSplitter.tsx"],"sourcesContent":["import { type ButtonHTMLAttributes, forwardRef } from \"react\";\n\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { windowSplitter } from \"./styles.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { type useWindowSplitter } from \"./useWindowSplitter.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-window-splitter-top\"?: number | string;\n \"--rmd-window-splitter-right\"?: number | string;\n \"--rmd-window-splitter-bottom\"?: number | string;\n \"--rmd-window-splitter-left\"?: number | string;\n \"--rmd-window-splitter-opacity\"?: number | string;\n \"--rmd-window-splitter-position\"?: number | string;\n }\n}\n\n/**\n * @since 6.0.0\n * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/}\n */\nexport interface BaseWindowSplitterProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"type\" | \"children\"> {\n /**\n * This will be provided by the {@link useWindowSplitter} hook.\n */\n \"aria-controls\": string;\n\n /**\n * This will be provided by the {@link useWindowSplitter} hook.\n */\n dragging: boolean;\n\n /**\n * This will be provided by the {@link useWindowSplitter} hook.\n */\n reversed: boolean;\n\n /**\n * Set this to `true` if the window splitter should use `position: absolute`\n * instead of `position: fixed`.\n *\n * @defaultValue `false`\n */\n disableFixed?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport type WindowSplitterProps = LabelRequiredForA11y<BaseWindowSplitterProps>;\n\n/**\n * The `WindowSplitter` should be used with the `useWindowSplitter` hook to\n * resize parts of a layout.\n *\n * See the `useResizableLayout` hook if the entire page layout should be\n * resizable.\n *\n * @example Simple Example\n * ```tsx\n * \"use client\";\n * import { WindowSplitter } from \"@react-md/core/window-splitter/WindowSplitter\";\n * import { useWindowSplitter } from \"@react-md/core/window-splitter/useWindowSplitter\";\n * import { useId, type ReactElement } from \"react\";\n *\n * export function Example(): ReactElement {\n * const panelId = useId();\n * const { value, splitterProps } = useWindowSplitter({\n * min: 120,\n * max: 380,\n * });\n *\n * return (\n * <div\n * style={{\n * \"--rmd-window-splitter-position\": `${value}px`,\n * display: \"grid\",\n * gridTemplateColumns: \"var(--rmd-window-splitter-position, 120px) 1fr\",\n * }}\n * >\n * <div>Panel 1</div>\n * <WindowSplitter\n * {...splitterProps}\n * aria-controls={panelId}\n * aria-labelledby={panelId}\n * />\n * <div>Panel 2</div>\n * </div>\n * );\n * }\n * ```\n *\n * @see {@link https://next.react-md.dev/components/window-splitter | WindowSplitter Demos}\n * @since 6.0.0\n */\nexport const WindowSplitter = forwardRef<\n HTMLButtonElement,\n WindowSplitterProps\n>(function WindowSplitter(props, ref) {\n const {\n role = \"separator\",\n className,\n dragging,\n reversed,\n disableFixed = false,\n ...remaining\n } = props;\n const vertical = props[\"aria-orientation\"] === \"vertical\";\n\n return (\n <button\n {...remaining}\n ref={ref}\n type=\"button\"\n role={role}\n className={windowSplitter({\n className,\n reversed,\n dragging,\n vertical,\n disableFixed,\n })}\n />\n );\n});\n"],"names":["forwardRef","windowSplitter","WindowSplitter","props","ref","role","className","dragging","reversed","disableFixed","remaining","vertical","button","type"],"mappings":";AAAA,SAAoCA,UAAU,QAAQ,QAAQ;AAG9D,SAASC,cAAc,QAAQ,cAAc;AAkD7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CC,GACD,OAAO,MAAMC,+BAAiBF,WAG5B,SAASE,eAAeC,KAAK,EAAEC,GAAG;IAClC,MAAM,EACJC,OAAO,WAAW,EAClBC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,eAAe,KAAK,EACpB,GAAGC,WACJ,GAAGP;IACJ,MAAMQ,WAAWR,KAAK,CAAC,mBAAmB,KAAK;IAE/C,qBACE,KAACS;QACE,GAAGF,SAAS;QACbN,KAAKA;QACLS,MAAK;QACLR,MAAMA;QACNC,WAAWL,eAAe;YACxBK;YACAE;YACAD;YACAI;YACAF;QACF;;AAGN,GAAG"}
|
|
@@ -1,21 +1,56 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// @group window-splitter
|
|
3
|
+
////
|
|
4
|
+
|
|
1
5
|
@use "sass:map";
|
|
2
6
|
@use "../utils";
|
|
3
7
|
@use "../interaction/interaction";
|
|
4
8
|
@use "../transition/transition";
|
|
5
9
|
|
|
10
|
+
/// Set to `true` to disable generating any styles
|
|
11
|
+
/// @type Boolean
|
|
6
12
|
$disable-everything: false !default;
|
|
13
|
+
|
|
14
|
+
/// Set to `true` to disable the horizontal `WindowSplitter` styles.
|
|
15
|
+
/// @type Boolean
|
|
7
16
|
$disable-horizontal: false !default;
|
|
17
|
+
|
|
18
|
+
/// Set to `true` to disable the vertical `WindowSplitter` styles.
|
|
19
|
+
/// @type Boolean
|
|
8
20
|
$disable-vertical: false !default;
|
|
21
|
+
|
|
22
|
+
/// Set to `true` to disable the reversed `WindowSplitter` styles.
|
|
23
|
+
/// @type Boolean
|
|
9
24
|
$disable-reversed: false !default;
|
|
25
|
+
|
|
26
|
+
/// Set to `true` to disable the `position: absolute` styles
|
|
27
|
+
/// @type Boolean
|
|
10
28
|
$disable-absolute-position: false !default;
|
|
11
29
|
|
|
30
|
+
/// The default `WindowSplitter` draggable area.
|
|
31
|
+
/// @type Number
|
|
12
32
|
$size: 1rem !default;
|
|
33
|
+
|
|
34
|
+
/// The default `WindowSplitter` visible size (`background-color`).
|
|
35
|
+
/// @type Number
|
|
13
36
|
$background-size: 0.25rem !default;
|
|
37
|
+
|
|
38
|
+
/// The default `background-color` for the `WindowSplitter`.
|
|
39
|
+
/// @type Color
|
|
14
40
|
$background-color: interaction.get-var(focus-color) !default;
|
|
41
|
+
|
|
42
|
+
/// The default `z-index` for the `WindowSplitter`.
|
|
43
|
+
/// @type Number
|
|
15
44
|
$z-index: 30 !default;
|
|
16
45
|
|
|
46
|
+
/// The available configurable css variables and mostly used internally for the
|
|
47
|
+
/// `get-var`, `set-var`, and `use-var` utils.
|
|
48
|
+
/// @type List
|
|
17
49
|
$variables: (top, right, bottom, left, opacity, position);
|
|
18
50
|
|
|
51
|
+
/// @param {String} name - The supported variable name
|
|
52
|
+
/// @param {any} fallback [null] - An optional fallback value
|
|
53
|
+
/// @returns {String} a `var()` statement
|
|
19
54
|
@function get-var($name, $fallback: null) {
|
|
20
55
|
$var: utils.get-var-name($variables, $name, "window-splitter");
|
|
21
56
|
// window-splitter variables don't make much sense to set globally
|
|
@@ -27,16 +62,27 @@ $variables: (top, right, bottom, left, opacity, position);
|
|
|
27
62
|
@return var(#{$var});
|
|
28
63
|
}
|
|
29
64
|
|
|
65
|
+
/// @param {String} name - The supported variable name
|
|
66
|
+
/// @param {any} value - The value to set the variable to. Supports `null` which
|
|
67
|
+
/// will just be a no-op.
|
|
30
68
|
@mixin set-var($name, $value) {
|
|
31
69
|
@if $value {
|
|
32
70
|
#{utils.get-var-name($variables, $name, "window-splitter")}: #{$value};
|
|
33
71
|
}
|
|
34
72
|
}
|
|
35
73
|
|
|
74
|
+
/// @param {String} property - The css property to apply the variable to
|
|
75
|
+
/// @param {String} name [$property] - The supported variable name
|
|
76
|
+
/// @param {any} fallback [null] - An optional fallback value if the variable
|
|
77
|
+
/// has not been set
|
|
36
78
|
@mixin use-var($property, $name: $property, $fallback: null) {
|
|
37
79
|
#{$property}: get-var($name, $fallback);
|
|
38
80
|
}
|
|
39
81
|
|
|
82
|
+
/// Generates all the styles based on feature flags.
|
|
83
|
+
///
|
|
84
|
+
/// @param {Boolean} disable-layer [false] - Set this to `true` to disable the
|
|
85
|
+
/// layer behavior
|
|
40
86
|
@mixin styles($disable-layer: false) {
|
|
41
87
|
@if not $disable-everything {
|
|
42
88
|
@include utils.optional-layer(window-splitter, $disable-layer) {
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import { type Ref, type RefCallback } from "react";
|
|
2
2
|
import { type BaseDraggableOptions, type DraggableImplementation, type DraggableKeyboardEventHandlers, type DraggableMouseEventHandlers, type DraggableStateOptions, type DraggableTouchEventHandlers } from "../draggable/useDraggable.js";
|
|
3
|
-
declare module "react" {
|
|
4
|
-
interface CSSProperties {
|
|
5
|
-
"--rmd-window-splitter-top"?: number | string;
|
|
6
|
-
"--rmd-window-splitter-right"?: number | string;
|
|
7
|
-
"--rmd-window-splitter-bottom"?: number | string;
|
|
8
|
-
"--rmd-window-splitter-left"?: number | string;
|
|
9
|
-
"--rmd-window-splitter-opacity"?: number | string;
|
|
10
|
-
"--rmd-window-splitter-position"?: number | string;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
3
|
/**
|
|
14
4
|
* @since 6.0.0
|
|
15
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/window-splitter/useWindowSplitter.ts"],"sourcesContent":["\"use client\";\n\nimport { type Ref, type RefCallback } from \"react\";\n\nimport {\n type BaseDraggableOptions,\n type DraggableImplementation,\n type DraggableKeyboardEventHandlers,\n type DraggableMouseEventHandlers,\n type DraggableStateOptions,\n type DraggableTouchEventHandlers,\n useDraggable,\n} from \"../draggable/useDraggable.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\n\
|
|
1
|
+
{"version":3,"sources":["../../src/window-splitter/useWindowSplitter.ts"],"sourcesContent":["\"use client\";\n\nimport { type Ref, type RefCallback } from \"react\";\n\nimport {\n type BaseDraggableOptions,\n type DraggableImplementation,\n type DraggableKeyboardEventHandlers,\n type DraggableMouseEventHandlers,\n type DraggableStateOptions,\n type DraggableTouchEventHandlers,\n useDraggable,\n} from \"../draggable/useDraggable.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface BaseWindowSplitterOptions<\n E extends HTMLElement = HTMLButtonElement,\n> extends Omit<BaseDraggableOptions<E>, keyof DraggableTouchEventHandlers<E>> {\n /**\n * An optional id to use for the window splitter.\n *\n * @defaultValue `\"window-splitter-\" + useId()`\n */\n id?: string;\n\n /**\n * An optional ref for the window splitter element. This will be merged into\n * the {@link WindowSplitterWidgetProps.ref}.\n */\n ref?: Ref<E>;\n}\n\n/**\n * @since 6.0.0\n */\nexport type WindowSplitterOptions<E extends HTMLElement = HTMLButtonElement> =\n BaseWindowSplitterOptions<E> & DraggableStateOptions;\n\n/**\n * @since 6.0.0\n */\nexport interface WindowSplitterWidgetProps<E extends HTMLElement>\n extends Required<DraggableMouseEventHandlers<E>>,\n Required<DraggableKeyboardEventHandlers<E>> {\n \"aria-orientation\": \"vertical\" | undefined;\n \"aria-valuenow\": number;\n \"aria-valuemin\": number;\n \"aria-valuemax\": number;\n id: string;\n ref: RefCallback<E>;\n role: \"separator\";\n reversed: boolean;\n dragging: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface WindowSplitterImplementation<\n E extends HTMLElement = HTMLButtonElement,\n> extends DraggableImplementation<E> {\n splitterProps: WindowSplitterWidgetProps<E>;\n}\n\n/**\n * Used to control the state for the `WindowSplitter` component.\n *\n * @example Custom Implementation\n * ```tsx\n * import {\n * useWindowSplitter,\n * type WindowSplitterImplementation\n * } from \"@react-md/core/window-splitter/useWindowSplitter\";\n * import { useState } from \"react\";\n *\n * // this is pretty much the `useWindowSplitter` implementation\n * export function useMyCustomWindowSplitter(): WindowSplitterImplementation {\n * const [dragging, setDragging] = useState(false);\n * const [value, setValue] = useState(0);\n * const splitter = useWindowSplitter({\n * min: 0,\n * max: 100,\n * value,\n * setValue,\n * dragging,\n * setDragging,\n * });\n *\n * return {\n * ...splitter,\n * value,\n * setValue,\n * dragging,\n * }\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport function useWindowSplitter<E extends HTMLElement = HTMLButtonElement>(\n options: WindowSplitterOptions<E>\n): WindowSplitterImplementation<E> {\n const { id: propId, reversed = false, vertical } = options;\n\n const id = useEnsuredId(propId, \"splitter\");\n const draggableImplementation = useDraggable(options);\n const {\n dragging,\n percentage,\n draggableRef,\n mouseEventHandlers,\n keyboardEventHandlers,\n } = draggableImplementation;\n\n return {\n ...draggableImplementation,\n splitterProps: {\n \"aria-orientation\": vertical ? \"vertical\" : undefined,\n \"aria-valuenow\": Math.ceil(percentage * 100),\n \"aria-valuemin\": 0,\n \"aria-valuemax\": 100,\n id,\n ref: draggableRef,\n role: \"separator\",\n dragging,\n reversed,\n ...mouseEventHandlers,\n ...keyboardEventHandlers,\n },\n };\n}\n"],"names":["useDraggable","useEnsuredId","useWindowSplitter","options","id","propId","reversed","vertical","draggableImplementation","dragging","percentage","draggableRef","mouseEventHandlers","keyboardEventHandlers","splitterProps","undefined","Math","ceil","ref","role"],"mappings":"AAAA;AAIA,SAOEA,YAAY,QACP,+BAA+B;AACtC,SAASC,YAAY,QAAQ,qBAAqB;AAsDlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCC,GACD,OAAO,SAASC,kBACdC,OAAiC;IAEjC,MAAM,EAAEC,IAAIC,MAAM,EAAEC,WAAW,KAAK,EAAEC,QAAQ,EAAE,GAAGJ;IAEnD,MAAMC,KAAKH,aAAaI,QAAQ;IAChC,MAAMG,0BAA0BR,aAAaG;IAC7C,MAAM,EACJM,QAAQ,EACRC,UAAU,EACVC,YAAY,EACZC,kBAAkB,EAClBC,qBAAqB,EACtB,GAAGL;IAEJ,OAAO;QACL,GAAGA,uBAAuB;QAC1BM,eAAe;YACb,oBAAoBP,WAAW,aAAaQ;YAC5C,iBAAiBC,KAAKC,IAAI,CAACP,aAAa;YACxC,iBAAiB;YACjB,iBAAiB;YACjBN;YACAc,KAAKP;YACLQ,MAAM;YACNV;YACAH;YACA,GAAGM,kBAAkB;YACrB,GAAGC,qBAAqB;QAC1B;IACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-md/core",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.21",
|
|
4
4
|
"description": "The core components and functionality for react-md.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sass": "./dist/_core.scss",
|
|
7
7
|
"exports": {
|
|
8
|
+
"./a11y": {
|
|
9
|
+
"sass": "./dist/_a11y.scss"
|
|
10
|
+
},
|
|
8
11
|
".": {
|
|
9
12
|
"sass": "./dist/_core.scss"
|
|
10
13
|
},
|
|
@@ -23,6 +26,27 @@
|
|
|
23
26
|
"sass": "./dist/_colors.scss",
|
|
24
27
|
"default": "./dist/theme/colors.js"
|
|
25
28
|
},
|
|
29
|
+
"./autocomplete/AutocompleteListboxChildren": null,
|
|
30
|
+
"./autocomplete/utils": null,
|
|
31
|
+
"./draggable/utils": null,
|
|
32
|
+
"./error-boundary/context": null,
|
|
33
|
+
"./form/InputToggleIcon": null,
|
|
34
|
+
"./form/ResizingTextAreaWrapper": null,
|
|
35
|
+
"./form/SliderTrack": null,
|
|
36
|
+
"./form/selectUtils": null,
|
|
37
|
+
"./form/sliderUtils": null,
|
|
38
|
+
"./form/useResizingTextArea": null,
|
|
39
|
+
"./form/useSliderDraggable": null,
|
|
40
|
+
"./interaction/utils": null,
|
|
41
|
+
"./menu/MenuWidgetKeyboardProvider": null,
|
|
42
|
+
"./menu/utils": null,
|
|
43
|
+
"./positioning/createHorizontalPosition": null,
|
|
44
|
+
"./positioning/createVerticalPosition": null,
|
|
45
|
+
"./storage/internalUtils": null,
|
|
46
|
+
"./tabs/useTabList": null,
|
|
47
|
+
"./tooltip/useTooltipPosition": null,
|
|
48
|
+
"./transition/utils": null,
|
|
49
|
+
"./tree/useTreeMovement": null,
|
|
26
50
|
"./*": "./dist/*.js",
|
|
27
51
|
"./package.json": "./package.json"
|
|
28
52
|
},
|
|
@@ -51,27 +75,28 @@
|
|
|
51
75
|
"license": "MIT",
|
|
52
76
|
"dependencies": {
|
|
53
77
|
"cnbuilder": "^3.1.0",
|
|
54
|
-
"nanoid": "^5.
|
|
78
|
+
"nanoid": "^5.1.5",
|
|
79
|
+
"remove-accents": "^0.5.0"
|
|
55
80
|
},
|
|
56
81
|
"devDependencies": {
|
|
57
82
|
"@jest/globals": "^29.7.0",
|
|
58
83
|
"@jest/types": "^29.6.3",
|
|
59
|
-
"@microsoft/api-extractor": "^7.
|
|
60
|
-
"@mlaursen/eslint-config": "^
|
|
84
|
+
"@microsoft/api-extractor": "^7.52.2",
|
|
85
|
+
"@mlaursen/eslint-config": "^7.0.0",
|
|
61
86
|
"@swc/cli": "^0.6.0",
|
|
62
|
-
"@swc/core": "^1.
|
|
87
|
+
"@swc/core": "^1.11.16",
|
|
63
88
|
"@swc/jest": "^0.2.37",
|
|
64
89
|
"@testing-library/dom": "^10.4.0",
|
|
65
90
|
"@testing-library/jest-dom": "^6.6.3",
|
|
66
|
-
"@testing-library/react": "^16.
|
|
91
|
+
"@testing-library/react": "^16.3.0",
|
|
67
92
|
"@testing-library/user-event": "^14.6.1",
|
|
68
93
|
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
|
69
|
-
"@types/lodash": "^4.17.
|
|
70
|
-
"@types/node": "^22.
|
|
94
|
+
"@types/lodash": "^4.17.16",
|
|
95
|
+
"@types/node": "^22.14.0",
|
|
71
96
|
"@types/react": "^18.3.12",
|
|
72
97
|
"@types/react-dom": "^18.3.1",
|
|
73
98
|
"chokidar": "^4.0.3",
|
|
74
|
-
"eslint": "^9.
|
|
99
|
+
"eslint": "^9.23.0",
|
|
75
100
|
"filesize": "^10.1.6",
|
|
76
101
|
"glob": "11.0.1",
|
|
77
102
|
"jest": "^29.7.0",
|
|
@@ -80,19 +105,19 @@
|
|
|
80
105
|
"lodash": "^4.17.21",
|
|
81
106
|
"lz-string": "^1.5.0",
|
|
82
107
|
"npm-run-all": "^4.1.5",
|
|
83
|
-
"postcss": "^8.5.
|
|
108
|
+
"postcss": "^8.5.3",
|
|
84
109
|
"postcss-scss": "^4.0.9",
|
|
85
|
-
"prettier": "^3.5.
|
|
86
|
-
"stylelint": "^16.
|
|
110
|
+
"prettier": "^3.5.3",
|
|
111
|
+
"stylelint": "^16.17.0",
|
|
87
112
|
"stylelint-config-prettier-scss": "^1.0.0",
|
|
88
113
|
"stylelint-config-recommended-scss": "^14.1.0",
|
|
89
114
|
"stylelint-order": "^6.0.4",
|
|
90
|
-
"stylelint-scss": "^6.11.
|
|
115
|
+
"stylelint-scss": "^6.11.1",
|
|
91
116
|
"ts-morph": "^25.0.1",
|
|
92
117
|
"ts-node": "^10.9.2",
|
|
93
|
-
"tsx": "^4.19.
|
|
94
|
-
"typescript": "^5.
|
|
95
|
-
"vitest": "^3.
|
|
118
|
+
"tsx": "^4.19.3",
|
|
119
|
+
"typescript": "^5.8.2",
|
|
120
|
+
"vitest": "^3.1.1"
|
|
96
121
|
},
|
|
97
122
|
"peerDependencies": {
|
|
98
123
|
"@jest/globals": "^29.7.0",
|
|
@@ -139,11 +164,12 @@
|
|
|
139
164
|
},
|
|
140
165
|
"volta": {
|
|
141
166
|
"node": "22.13.1",
|
|
142
|
-
"pnpm": "10.
|
|
167
|
+
"pnpm": "10.7.1"
|
|
143
168
|
},
|
|
144
169
|
"scripts": {
|
|
145
170
|
"run-script": "tsx --tsconfig scripts/tsconfig.json",
|
|
146
171
|
"export-map": "pnpm run run-script scripts/getExportMap.ts",
|
|
172
|
+
"create-index-file": "pnpm run run-script scripts/createIndexFile.ts",
|
|
147
173
|
"dev": "npm-run-all --parallel build-esm-watch build-scss-watch build-types-watch",
|
|
148
174
|
"prepare-release": "npm-run-all clean-dist build",
|
|
149
175
|
"build": "npm-run-all build-esm build-scss build-types",
|
package/src/CoreProviders.tsx
CHANGED
|
@@ -87,6 +87,7 @@ export interface CoreProvidersProps extends ReactMDCoreConfiguration {
|
|
|
87
87
|
* - {@link Snackbar} - This isn't a provider but this is how you can display
|
|
88
88
|
* alerts in your app
|
|
89
89
|
*
|
|
90
|
+
* @see {@link https://next.react-md.dev/components/core-providers | CoreProviders Demos}
|
|
90
91
|
* @since 6.0.0
|
|
91
92
|
*/
|
|
92
93
|
export function CoreProviders(props: CoreProvidersProps): ReactElement {
|
package/src/NoSsr.tsx
CHANGED
|
@@ -17,7 +17,9 @@ export interface NoSsrProps {
|
|
|
17
17
|
*
|
|
18
18
|
* @example Simple Example
|
|
19
19
|
* ```tsx
|
|
20
|
-
* import {
|
|
20
|
+
* import { NoSsr } from "@react-md/core/NoSsr";
|
|
21
|
+
* import { CoreProviders } from "@react-md/core/CoreProviders"
|
|
22
|
+
* import { Typography } from "@react-md/core/typography/Typography"
|
|
21
23
|
* import type { ReactElement } from "react";
|
|
22
24
|
*
|
|
23
25
|
* function Example(): ReactElement {
|
package/src/RootHtml.tsx
CHANGED
|
@@ -51,7 +51,7 @@ export interface RootHtmlProps extends HtmlHTMLAttributes<HTMLHtmlElement> {
|
|
|
51
51
|
* @example Simple Example
|
|
52
52
|
* ```tsx
|
|
53
53
|
* // src/app/layout.tsx
|
|
54
|
-
* import { RootHtml } from "@react-md/core";
|
|
54
|
+
* import { RootHtml } from "@react-md/core/RootHtml";
|
|
55
55
|
* import { type ReactElement, type PropsWithChildren } from "react";
|
|
56
56
|
* import { Roboto_Flex } from "next/font/google";
|
|
57
57
|
*
|
package/src/SsrProvider.tsx
CHANGED
package/src/app-bar/AppBar.tsx
CHANGED
|
@@ -36,7 +36,9 @@ export interface AppBarProps
|
|
|
36
36
|
/**
|
|
37
37
|
* @example Simple Example
|
|
38
38
|
* ```tsx
|
|
39
|
-
* import { AppBar
|
|
39
|
+
* import { AppBar } from "@react-md/core/app-bar/AppBar";
|
|
40
|
+
* import { AppBarTitle } from "@react-md/core/app-bar/AppBarTitle";
|
|
41
|
+
* import { Button } from "@react-md/core/button/Button";
|
|
40
42
|
* import MenuIcon from "@react-md/material-icons/MenuIcon";
|
|
41
43
|
* import MoreVertIcon from "@react-md/material-icons/MoreVertIcon";
|
|
42
44
|
* import type { ReactElement } from "react";
|
|
@@ -27,7 +27,8 @@ export interface AppBarTitleProps
|
|
|
27
27
|
/**
|
|
28
28
|
* @example Updating the Keyline
|
|
29
29
|
* ```tsx
|
|
30
|
-
* import { AppBar
|
|
30
|
+
* import { AppBar } from "@react-md/core/app-bar/AppBar";
|
|
31
|
+
* import { AppBarTitle } from "@react-md/core/app-bar/AppBarTitle";
|
|
31
32
|
* import type { ReactElement } from "react";
|
|
32
33
|
*
|
|
33
34
|
* function Example(): ReactElement {
|
|
@@ -29,22 +29,102 @@ import { useAutocomplete } from "./useAutocomplete.js";
|
|
|
29
29
|
const noop = (): undefined => undefined;
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* An `Autocomplete` is a component that allows for real-time suggestions from
|
|
33
|
+
* a pre-determined list as the user types by filtering data based on the
|
|
34
|
+
* current value. It can also be used to interact with an API that handles the
|
|
35
|
+
* sorting, filtering, matching, etc as well.
|
|
33
36
|
*
|
|
37
|
+
* An `Autocomplete` always requires the following props:
|
|
38
|
+
*
|
|
39
|
+
* - `options` - a list of available options that can be a list of strings,
|
|
40
|
+
* a list of objects with a `{ label: string }`, or any list of objects
|
|
41
|
+
* - if the list of objects do not have a `label`, the
|
|
42
|
+
* {@link AutocompleteProps.getOptionLabel} **must** be provided to allow
|
|
43
|
+
* filtering
|
|
44
|
+
* - `label` or `aria-label` to describe the textbox for accessibility
|
|
45
|
+
* - `listboxLabel` or `listboxLabelledBy` for an accessible label describing the options
|
|
46
|
+
*
|
|
47
|
+
* @example Simple Example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* "use client";
|
|
50
|
+
*
|
|
51
|
+
* import { Autocomplete } from "@react-md/core/autocomplete/Autocomplete";
|
|
52
|
+
* import { type ReactElement } from "react";
|
|
53
|
+
*
|
|
54
|
+
* export default function SimpleExample(): ReactElement {
|
|
55
|
+
* return (
|
|
56
|
+
* <Autocomplete
|
|
57
|
+
* label="Fruit"
|
|
58
|
+
* placeholder="Apple"
|
|
59
|
+
* listboxLabel="Fruits"
|
|
60
|
+
* options={[
|
|
61
|
+
* "Apple",
|
|
62
|
+
* "Apricot",
|
|
63
|
+
* "Banana",
|
|
64
|
+
* "Blueberry",
|
|
65
|
+
* "Cranberry",
|
|
66
|
+
* "Kiwi",
|
|
67
|
+
* "Mango",
|
|
68
|
+
* "Orange",
|
|
69
|
+
* "Peach",
|
|
70
|
+
* "Plum",
|
|
71
|
+
* "Strawberry",
|
|
72
|
+
* ]}
|
|
73
|
+
* />
|
|
74
|
+
* );
|
|
75
|
+
* }
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
|
|
34
79
|
* @since 6.0.0
|
|
35
80
|
*/
|
|
36
81
|
export function Autocomplete<Option extends AutocompleteOption>(
|
|
37
82
|
props: AutocompleteSingleSelectProps<Option>
|
|
38
83
|
): ReactElement;
|
|
39
84
|
/**
|
|
40
|
-
*
|
|
85
|
+
* To create an `Autocomplete` that can have multiple values selected at once,
|
|
86
|
+
* either provide an array `value` or `defaultValue`.
|
|
87
|
+
*
|
|
88
|
+
* @example Simple Example
|
|
89
|
+
* ```tsx
|
|
90
|
+
* "use client";
|
|
91
|
+
*
|
|
92
|
+
* import { Autocomplete } from "@react-md/core/autocomplete/Autocomplete";
|
|
93
|
+
* import { type ReactElement, useState } from "react";
|
|
94
|
+
*
|
|
95
|
+
* export default function SimpleExample(): ReactElement {
|
|
96
|
+
* const [value, setValue] = useState<readonly Dessert[]>([]);
|
|
97
|
+
* return (
|
|
98
|
+
* <Autocomplete
|
|
99
|
+
* label="Fruit"
|
|
100
|
+
* placeholder="Apple"
|
|
101
|
+
* listboxLabel="Fruits"
|
|
102
|
+
* options={[
|
|
103
|
+
* "Apple",
|
|
104
|
+
* "Apricot",
|
|
105
|
+
* "Banana",
|
|
106
|
+
* "Blueberry",
|
|
107
|
+
* "Cranberry",
|
|
108
|
+
* "Kiwi",
|
|
109
|
+
* "Mango",
|
|
110
|
+
* "Orange",
|
|
111
|
+
* "Peach",
|
|
112
|
+
* "Plum",
|
|
113
|
+
* "Strawberry",
|
|
114
|
+
* ]}
|
|
115
|
+
* />
|
|
116
|
+
* );
|
|
117
|
+
* }
|
|
118
|
+
* ```
|
|
41
119
|
*
|
|
120
|
+
* @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
|
|
42
121
|
* @since 6.0.0
|
|
43
122
|
*/
|
|
44
123
|
export function Autocomplete<Option extends AutocompleteOption>(
|
|
45
124
|
props: AutocompleteMultiSelectProps<Option>
|
|
46
125
|
): ReactElement;
|
|
47
126
|
/**
|
|
127
|
+
* @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
|
|
48
128
|
* @since 6.0.0
|
|
49
129
|
* @internal
|
|
50
130
|
*/
|
|
@@ -92,6 +172,7 @@ export function Autocomplete<Option extends AutocompleteOption>(
|
|
|
92
172
|
disableDropdownButton,
|
|
93
173
|
clearButtonProps,
|
|
94
174
|
disableClearButton,
|
|
175
|
+
clearButtonVisibility = "query",
|
|
95
176
|
noOptionsChildren = <ListSubheader>No Options</ListSubheader>,
|
|
96
177
|
leftAddon: propLeftAddon,
|
|
97
178
|
disableLeftAddonStyles: propDisableLeftAddonStyles,
|
|
@@ -235,9 +316,10 @@ export function Autocomplete<Option extends AutocompleteOption>(
|
|
|
235
316
|
<>
|
|
236
317
|
{rightAddon}
|
|
237
318
|
{loading && <AutocompleteCircularProgress {...loadingProps} />}
|
|
238
|
-
{!disableClearButton &&
|
|
319
|
+
{!disableClearButton && (
|
|
239
320
|
<AutocompleteClearButton
|
|
240
321
|
{...clearButtonProps}
|
|
322
|
+
visibility={clearButtonVisibility}
|
|
241
323
|
{...getClearButtonProps(clearButtonProps)}
|
|
242
324
|
/>
|
|
243
325
|
)}
|
|
@@ -9,6 +9,7 @@ import { type AutocompleteChipProps } from "./types.js";
|
|
|
9
9
|
* A small wrapper around the `Chip` that defaults the `rightAddon` to the
|
|
10
10
|
* remove icon and adds a default `aria-description`.
|
|
11
11
|
*
|
|
12
|
+
* @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
|
|
12
13
|
* @since 6.0.0
|
|
13
14
|
*/
|
|
14
15
|
export const AutocompleteChip = forwardRef<
|
|
@@ -7,6 +7,7 @@ import { type AutocompleteCircularProgressProps } from "./types.js";
|
|
|
7
7
|
* An internal component used to handle the styling and minimal accessibility
|
|
8
8
|
* for the `CircularProgress` within the `Autocomplete`
|
|
9
9
|
*
|
|
10
|
+
* @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
|
|
10
11
|
* @internal
|
|
11
12
|
* @since 6.0.0
|
|
12
13
|
*/
|
|
@@ -11,6 +11,7 @@ import { type AutocompleteClearButtonProps } from "./types.js";
|
|
|
11
11
|
/**
|
|
12
12
|
* An internal component used for to clear the value from the `Autocomplete`.
|
|
13
13
|
*
|
|
14
|
+
* @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
|
|
14
15
|
* @internal
|
|
15
16
|
* @since 6.0.0
|
|
16
17
|
*/
|
|
@@ -26,6 +27,7 @@ export function AutocompleteClearButton(
|
|
|
26
27
|
"aria-label": ariaLabel = buttonType === "text" || ariaLabelledBy
|
|
27
28
|
? undefined
|
|
28
29
|
: "Clear",
|
|
30
|
+
visibility,
|
|
29
31
|
...remaining
|
|
30
32
|
} = props;
|
|
31
33
|
const id = useEnsuredId(propId, "autocomplete-clear");
|
|
@@ -36,7 +38,7 @@ export function AutocompleteClearButton(
|
|
|
36
38
|
aria-label={ariaLabel}
|
|
37
39
|
aria-labelledby={ariaLabelledBy}
|
|
38
40
|
id={id}
|
|
39
|
-
className={autocompleteClearButton({ className })}
|
|
41
|
+
className={autocompleteClearButton({ className, visibility })}
|
|
40
42
|
tabIndex={-1}
|
|
41
43
|
buttonType={buttonType}
|
|
42
44
|
>
|
|
@@ -14,6 +14,7 @@ import { type AutocompleteDropdownButtonProps } from "./types.js";
|
|
|
14
14
|
* This is a simple `Button` wrapper to be used as a dropdown button within the
|
|
15
15
|
* `Autocomplete`.
|
|
16
16
|
*
|
|
17
|
+
* @see {@link https://next.react-md.dev/components/autocomplete | Autocomplete Demos}
|
|
17
18
|
* @since 6.0.0
|
|
18
19
|
*/
|
|
19
20
|
export function AutocompleteDropdownButton(
|
|
@@ -16,11 +16,10 @@ import {
|
|
|
16
16
|
*/
|
|
17
17
|
export interface AutocompleteListboxChildrenProps<
|
|
18
18
|
Option extends AutocompleteOption,
|
|
19
|
-
>
|
|
19
|
+
> extends Required<AutocompleteGetOptionProps<Option>>,
|
|
20
|
+
Required<AutocompleteGetOptionLabel<Option>> {
|
|
20
21
|
query: string;
|
|
21
22
|
options: readonly Option[];
|
|
22
|
-
getOptionLabel: AutocompleteGetOptionLabel<Option>;
|
|
23
|
-
getOptionProps: AutocompleteGetOptionProps<Option>;
|
|
24
23
|
children: ReactNode;
|
|
25
24
|
noOptionsChildren: ReactNode;
|
|
26
25
|
}
|