@react-md/core 1.0.0-next.15 → 1.0.0-next.17
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/RootHtml.d.ts +0 -2
- package/dist/RootHtml.js +0 -2
- package/dist/RootHtml.js.map +1 -1
- package/dist/_box-shadows.scss +76 -0
- package/dist/_colors.scss +279 -277
- package/dist/_core.scss +107 -16
- package/dist/_object-fit.scss +86 -0
- package/dist/_utils.scss +246 -72
- package/dist/app-bar/AppBar.d.ts +1 -92
- package/dist/app-bar/AppBar.js +1 -42
- package/dist/app-bar/AppBar.js.map +1 -1
- package/dist/app-bar/AppBarTitle.d.ts +1 -30
- package/dist/app-bar/AppBarTitle.js +1 -17
- package/dist/app-bar/AppBarTitle.js.map +1 -1
- package/dist/app-bar/_app-bar.scss +156 -25
- package/dist/app-bar/styles.d.ts +117 -0
- package/dist/app-bar/styles.js +55 -0
- package/dist/app-bar/styles.js.map +1 -0
- package/dist/autocomplete/Autocomplete.d.ts +8 -79
- package/dist/autocomplete/Autocomplete.js +112 -83
- package/dist/autocomplete/Autocomplete.js.map +1 -1
- package/dist/autocomplete/AutocompleteChip.d.ts +8 -0
- package/dist/autocomplete/AutocompleteChip.js +34 -0
- package/dist/autocomplete/AutocompleteChip.js.map +1 -0
- package/dist/autocomplete/AutocompleteCircularProgress.d.ts +5 -11
- package/dist/autocomplete/AutocompleteCircularProgress.js +4 -0
- package/dist/autocomplete/AutocompleteCircularProgress.js.map +1 -1
- package/dist/autocomplete/AutocompleteClearButton.d.ts +9 -0
- package/dist/autocomplete/AutocompleteClearButton.js +29 -0
- package/dist/autocomplete/AutocompleteClearButton.js.map +1 -0
- package/dist/autocomplete/AutocompleteDropdownButton.d.ts +4 -26
- package/dist/autocomplete/AutocompleteDropdownButton.js +5 -1
- package/dist/autocomplete/AutocompleteDropdownButton.js.map +1 -1
- package/dist/autocomplete/AutocompleteListboxChildren.d.ts +22 -0
- package/dist/autocomplete/AutocompleteListboxChildren.js +37 -0
- package/dist/autocomplete/AutocompleteListboxChildren.js.map +1 -0
- package/dist/autocomplete/_autocomplete.scss +362 -34
- package/dist/autocomplete/autocompleteStyles.d.ts +22 -0
- package/dist/autocomplete/autocompleteStyles.js +17 -8
- package/dist/autocomplete/autocompleteStyles.js.map +1 -1
- package/dist/autocomplete/defaults.d.ts +9 -9
- package/dist/autocomplete/defaults.js +13 -13
- package/dist/autocomplete/defaults.js.map +1 -1
- package/dist/autocomplete/types.d.ts +554 -56
- package/dist/autocomplete/types.js.map +1 -1
- package/dist/autocomplete/useAutocomplete.d.ts +22 -0
- package/dist/autocomplete/useAutocomplete.js +281 -0
- package/dist/autocomplete/useAutocomplete.js.map +1 -0
- package/dist/autocomplete/utils.d.ts +81 -0
- package/dist/autocomplete/utils.js +108 -0
- package/dist/autocomplete/utils.js.map +1 -0
- package/dist/avatar/Avatar.d.ts +0 -2
- package/dist/avatar/Avatar.js +0 -2
- package/dist/avatar/Avatar.js.map +1 -1
- package/dist/avatar/_avatar.scss +93 -2
- package/dist/badge/Badge.d.ts +2 -23
- package/dist/badge/Badge.js +1 -16
- package/dist/badge/Badge.js.map +1 -1
- package/dist/badge/_badge.scss +90 -3
- package/dist/badge/styles.d.ts +26 -0
- package/dist/badge/styles.js +18 -0
- package/dist/badge/styles.js.map +1 -0
- package/dist/box/Box.d.ts +0 -2
- package/dist/box/Box.js +2 -3
- package/dist/box/Box.js.map +1 -1
- package/dist/box/_box.scss +130 -17
- package/dist/box/styles.d.ts +6 -0
- package/dist/box/styles.js +2 -1
- package/dist/box/styles.js.map +1 -1
- package/dist/button/AsyncButton.d.ts +1 -1
- package/dist/button/AsyncButton.js.map +1 -1
- package/dist/button/Button.d.ts +2 -1
- package/dist/button/Button.js +2 -1
- package/dist/button/Button.js.map +1 -1
- package/dist/button/ButtonUnstyled.d.ts +0 -2
- package/dist/button/ButtonUnstyled.js +0 -2
- package/dist/button/ButtonUnstyled.js.map +1 -1
- package/dist/button/_button.scss +157 -25
- package/dist/card/Card.d.ts +16 -2
- package/dist/card/Card.js +11 -5
- package/dist/card/Card.js.map +1 -1
- package/dist/card/CardContent.d.ts +0 -2
- package/dist/card/CardContent.js +0 -2
- package/dist/card/CardContent.js.map +1 -1
- package/dist/card/CardFooter.d.ts +0 -3
- package/dist/card/CardFooter.js +0 -2
- package/dist/card/CardFooter.js.map +1 -1
- package/dist/card/CardHeader.d.ts +0 -2
- package/dist/card/CardHeader.js +0 -2
- package/dist/card/CardHeader.js.map +1 -1
- package/dist/card/CardSubtitle.d.ts +0 -3
- package/dist/card/CardSubtitle.js +0 -2
- package/dist/card/CardSubtitle.js.map +1 -1
- package/dist/card/CardTitle.d.ts +0 -3
- package/dist/card/CardTitle.js +0 -2
- package/dist/card/CardTitle.js.map +1 -1
- package/dist/card/ClickableCard.d.ts +2 -1
- package/dist/card/ClickableCard.js +5 -2
- package/dist/card/ClickableCard.js.map +1 -1
- package/dist/card/_card.scss +90 -19
- package/dist/card/styles.d.ts +0 -7
- package/dist/card/styles.js +2 -3
- package/dist/card/styles.js.map +1 -1
- package/dist/chip/Chip.d.ts +2 -3
- package/dist/chip/Chip.js +2 -3
- package/dist/chip/Chip.js.map +1 -1
- package/dist/chip/_chip.scss +42 -20
- package/dist/chip/styles.d.ts +12 -10
- package/dist/chip/styles.js.map +1 -1
- package/dist/cssUtils.js.map +1 -1
- package/dist/delegateEvent.d.ts +2 -2
- package/dist/delegateEvent.js.map +1 -1
- package/dist/dialog/Dialog.d.ts +8 -21
- package/dist/dialog/Dialog.js +27 -27
- package/dist/dialog/Dialog.js.map +1 -1
- package/dist/dialog/DialogContent.d.ts +3 -3
- package/dist/dialog/DialogContent.js +3 -3
- package/dist/dialog/DialogContent.js.map +1 -1
- package/dist/dialog/DialogFooter.d.ts +2 -3
- package/dist/dialog/DialogFooter.js +2 -3
- package/dist/dialog/DialogFooter.js.map +1 -1
- package/dist/dialog/DialogHeader.d.ts +3 -3
- package/dist/dialog/DialogHeader.js +3 -3
- package/dist/dialog/DialogHeader.js.map +1 -1
- package/dist/dialog/DialogTitle.d.ts +3 -4
- package/dist/dialog/DialogTitle.js +3 -3
- package/dist/dialog/DialogTitle.js.map +1 -1
- package/dist/dialog/FixedDialog.d.ts +1 -3
- package/dist/dialog/FixedDialog.js +0 -8
- package/dist/dialog/FixedDialog.js.map +1 -1
- package/dist/dialog/NestedDialogProvider.d.ts +0 -1
- package/dist/dialog/_dialog.scss +67 -13
- package/dist/dialog/styles.d.ts +56 -0
- package/dist/dialog/styles.js +29 -2
- package/dist/dialog/styles.js.map +1 -1
- package/dist/divider/Divider.d.ts +0 -13
- package/dist/divider/Divider.js +0 -2
- package/dist/divider/Divider.js.map +1 -1
- package/dist/divider/_divider.scss +7 -1
- package/dist/divider/styles.d.ts +11 -0
- package/dist/divider/styles.js.map +1 -1
- package/dist/draggable/useDraggable.d.ts +6 -6
- package/dist/draggable/useDraggable.js.map +1 -1
- package/dist/draggable/utils.d.ts +3 -3
- package/dist/draggable/utils.js.map +1 -1
- package/dist/expansion-panel/ExpansionList.d.ts +1 -1
- package/dist/expansion-panel/ExpansionList.js +1 -1
- package/dist/expansion-panel/ExpansionList.js.map +1 -1
- package/dist/expansion-panel/ExpansionPanel.d.ts +9 -25
- package/dist/expansion-panel/ExpansionPanel.js +1 -12
- package/dist/expansion-panel/ExpansionPanel.js.map +1 -1
- package/dist/expansion-panel/ExpansionPanelHeader.d.ts +0 -1
- package/dist/expansion-panel/ExpansionPanelHeader.js +0 -1
- package/dist/expansion-panel/ExpansionPanelHeader.js.map +1 -1
- package/dist/expansion-panel/_expansion-panel.scss +5 -1
- package/dist/expansion-panel/expansionPanelStyles.d.ts +19 -0
- package/dist/expansion-panel/expansionPanelStyles.js +14 -0
- package/dist/expansion-panel/expansionPanelStyles.js.map +1 -0
- package/dist/expansion-panel/useExpansionPanels.js +12 -24
- package/dist/expansion-panel/useExpansionPanels.js.map +1 -1
- package/dist/{form → files}/FileInput.d.ts +3 -6
- package/dist/{form → files}/FileInput.js +3 -6
- package/dist/files/FileInput.js.map +1 -0
- package/dist/files/_files.scss +22 -0
- package/dist/files/styles.d.ts +5 -0
- package/dist/files/styles.js +7 -0
- package/dist/files/styles.js.map +1 -0
- package/dist/{form → files}/useFileUpload.d.ts +7 -9
- package/dist/{form → files}/useFileUpload.js +5 -7
- package/dist/files/useFileUpload.js.map +1 -0
- package/dist/files/utils.d.ts +169 -0
- package/dist/files/utils.js +114 -0
- package/dist/files/utils.js.map +1 -0
- package/dist/{form/fileUtils.d.ts → files/validation.d.ts} +9 -174
- package/dist/{form/fileUtils.js → files/validation.js} +9 -134
- package/dist/files/validation.js.map +1 -0
- package/dist/focus/useFocusContainer.d.ts +2 -2
- package/dist/focus/useFocusContainer.js.map +1 -1
- package/dist/focus/utils.js.map +1 -1
- package/dist/form/Checkbox.d.ts +0 -1
- package/dist/form/Fieldset.d.ts +0 -2
- package/dist/form/Fieldset.js.map +1 -1
- package/dist/form/FormMessage.d.ts +0 -3
- package/dist/form/FormMessage.js +0 -2
- package/dist/form/FormMessage.js.map +1 -1
- package/dist/form/FormMessageContainer.d.ts +0 -1
- package/dist/form/FormMessageContainer.js +4 -3
- package/dist/form/FormMessageContainer.js.map +1 -1
- package/dist/form/FormMessageCounter.d.ts +0 -2
- package/dist/form/FormMessageCounter.js +0 -2
- package/dist/form/FormMessageCounter.js.map +1 -1
- package/dist/form/InputToggle.d.ts +2 -1
- package/dist/form/InputToggle.js +2 -1
- package/dist/form/InputToggle.js.map +1 -1
- package/dist/form/InputToggleIcon.d.ts +0 -2
- package/dist/form/InputToggleIcon.js +0 -2
- package/dist/form/InputToggleIcon.js.map +1 -1
- package/dist/form/Label.d.ts +0 -3
- package/dist/form/Label.js +2 -4
- package/dist/form/Label.js.map +1 -1
- package/dist/form/Legend.d.ts +0 -3
- package/dist/form/Legend.js +0 -2
- package/dist/form/Legend.js.map +1 -1
- package/dist/form/Listbox.d.ts +24 -0
- package/dist/form/Listbox.js +46 -0
- package/dist/form/Listbox.js.map +1 -0
- package/dist/form/ListboxProvider.d.ts +21 -0
- package/dist/form/{useListboxProvider.js → ListboxProvider.js} +1 -1
- package/dist/form/ListboxProvider.js.map +1 -0
- package/dist/form/MenuItemCheckbox.d.ts +0 -1
- package/dist/form/MenuItemRadio.d.ts +0 -1
- package/dist/form/MenuItemSwitch.d.ts +0 -1
- package/dist/form/MenuItemTextField.js +1 -2
- package/dist/form/MenuItemTextField.js.map +1 -1
- package/dist/form/NativeSelect.d.ts +0 -2
- package/dist/form/NativeSelect.js +7 -6
- package/dist/form/NativeSelect.js.map +1 -1
- package/dist/form/Option.d.ts +49 -10
- package/dist/form/Option.js +11 -9
- package/dist/form/Option.js.map +1 -1
- package/dist/form/Password.js.map +1 -1
- package/dist/form/Radio.d.ts +0 -1
- package/dist/form/Select.d.ts +2 -2
- package/dist/form/Select.js +81 -85
- package/dist/form/Select.js.map +1 -1
- package/dist/form/SelectedOption.d.ts +0 -2
- package/dist/form/SelectedOption.js +0 -2
- package/dist/form/SelectedOption.js.map +1 -1
- package/dist/form/Slider.d.ts +4 -4
- package/dist/form/Slider.js +6 -2
- package/dist/form/Slider.js.map +1 -1
- package/dist/form/SliderContainer.d.ts +0 -2
- package/dist/form/SliderContainer.js +0 -2
- package/dist/form/SliderContainer.js.map +1 -1
- package/dist/form/SliderMark.d.ts +0 -2
- package/dist/form/SliderMark.js +0 -2
- package/dist/form/SliderMark.js.map +1 -1
- package/dist/form/SliderMarkLabel.d.ts +0 -2
- package/dist/form/SliderMarkLabel.js +0 -2
- package/dist/form/SliderMarkLabel.js.map +1 -1
- package/dist/form/SliderThumb.d.ts +3 -3
- package/dist/form/SliderThumb.js.map +1 -1
- package/dist/form/SliderTrack.d.ts +0 -2
- package/dist/form/SliderTrack.js +0 -2
- package/dist/form/SliderTrack.js.map +1 -1
- package/dist/form/SliderValueMarks.d.ts +2 -4
- package/dist/form/SliderValueMarks.js +0 -2
- package/dist/form/SliderValueMarks.js.map +1 -1
- package/dist/form/SliderValueTooltip.js.map +1 -1
- package/dist/form/Switch.d.ts +0 -2
- package/dist/form/Switch.js +0 -2
- package/dist/form/Switch.js.map +1 -1
- package/dist/form/SwitchTrack.d.ts +2 -1
- package/dist/form/SwitchTrack.js +2 -1
- package/dist/form/SwitchTrack.js.map +1 -1
- package/dist/form/TextArea.js +1 -2
- package/dist/form/TextArea.js.map +1 -1
- package/dist/form/TextField.d.ts +0 -2
- package/dist/form/TextField.js +1 -4
- package/dist/form/TextField.js.map +1 -1
- package/dist/form/TextFieldAddon.d.ts +1 -4
- package/dist/form/TextFieldAddon.js +1 -3
- package/dist/form/TextFieldAddon.js.map +1 -1
- package/dist/form/TextFieldContainer.js +1 -2
- package/dist/form/TextFieldContainer.js.map +1 -1
- package/dist/form/_form.scss +186 -121
- package/dist/form/formMessageContainerStyles.d.ts +10 -0
- package/dist/form/formMessageContainerStyles.js +11 -0
- package/dist/form/formMessageContainerStyles.js.map +1 -0
- package/dist/form/inputToggleStyles.js.map +1 -1
- package/dist/form/optionStyles.d.ts +1 -0
- package/dist/form/optionStyles.js +2 -2
- package/dist/form/optionStyles.js.map +1 -1
- package/dist/form/selectUtils.js.map +1 -1
- package/dist/form/sliderUtils.d.ts +1 -1
- package/dist/form/sliderUtils.js.map +1 -1
- package/dist/form/textFieldContainerStyles.d.ts +0 -2
- package/dist/form/textFieldContainerStyles.js +1 -2
- package/dist/form/textFieldContainerStyles.js.map +1 -1
- package/dist/form/types.d.ts +3 -10
- package/dist/form/types.js.map +1 -1
- package/dist/form/useCheckboxGroup.d.ts +17 -17
- package/dist/form/useCheckboxGroup.js +9 -17
- package/dist/form/useCheckboxGroup.js.map +1 -1
- package/dist/form/useCombobox.d.ts +56 -21
- package/dist/form/useCombobox.js +19 -4
- package/dist/form/useCombobox.js.map +1 -1
- package/dist/form/useEditableCombobox.d.ts +24 -4
- package/dist/form/useEditableCombobox.js +5 -0
- package/dist/form/useEditableCombobox.js.map +1 -1
- package/dist/form/useNumberField.js.map +1 -1
- package/dist/form/useRadioGroup.d.ts +6 -6
- package/dist/form/useRadioGroup.js.map +1 -1
- package/dist/form/useResizingTextArea.js.map +1 -1
- package/dist/form/useSelectCombobox.d.ts +3 -4
- package/dist/form/useSelectCombobox.js.map +1 -1
- package/dist/form/useTextField.d.ts +1 -1
- package/dist/form/useTextField.js.map +1 -1
- package/dist/form/useTextFieldContainerAddons.js.map +1 -1
- package/dist/hoverMode/useHoverMode.d.ts +3 -3
- package/dist/hoverMode/useHoverMode.js.map +1 -1
- package/dist/hoverMode/useHoverModeProvider.d.ts +4 -4
- package/dist/hoverMode/useHoverModeProvider.js.map +1 -1
- package/dist/icon/FontIcon.d.ts +0 -2
- package/dist/icon/FontIcon.js +0 -2
- package/dist/icon/FontIcon.js.map +1 -1
- package/dist/icon/IconRotator.d.ts +0 -2
- package/dist/icon/IconRotator.js +0 -2
- package/dist/icon/IconRotator.js.map +1 -1
- package/dist/icon/MaterialIcon.d.ts +0 -2
- package/dist/icon/MaterialIcon.js +0 -2
- package/dist/icon/MaterialIcon.js.map +1 -1
- package/dist/icon/MaterialSymbol.d.ts +0 -1
- package/dist/icon/MaterialSymbol.js +0 -1
- package/dist/icon/MaterialSymbol.js.map +1 -1
- package/dist/icon/SVGIcon.d.ts +0 -2
- package/dist/icon/SVGIcon.js +0 -2
- package/dist/icon/SVGIcon.js.map +1 -1
- package/dist/icon/TextIconSpacing.d.ts +0 -2
- package/dist/icon/TextIconSpacing.js +0 -2
- package/dist/icon/TextIconSpacing.js.map +1 -1
- package/dist/icon/_icon.scss +153 -4
- package/dist/icon/iconConfig.d.ts +10 -0
- package/dist/icon/iconConfig.js +7 -0
- package/dist/icon/iconConfig.js.map +1 -1
- package/dist/icon/materialConfig.js.map +1 -1
- package/dist/icon/styles.js +1 -1
- package/dist/icon/styles.js.map +1 -1
- package/dist/interaction/RippleContainer.d.ts +0 -2
- package/dist/interaction/RippleContainer.js +0 -2
- package/dist/interaction/RippleContainer.js.map +1 -1
- package/dist/interaction/UserInteractionModeProvider.d.ts +5 -5
- package/dist/interaction/UserInteractionModeProvider.js +12 -8
- package/dist/interaction/UserInteractionModeProvider.js.map +1 -1
- package/dist/interaction/types.d.ts +20 -2
- package/dist/interaction/types.js.map +1 -1
- package/dist/interaction/useElementInteraction.d.ts +7 -1
- package/dist/interaction/useElementInteraction.js +1 -2
- package/dist/interaction/useElementInteraction.js.map +1 -1
- package/dist/interaction/utils.d.ts +2 -2
- package/dist/interaction/utils.js +2 -2
- package/dist/interaction/utils.js.map +1 -1
- package/dist/layout/LayoutAppBar.d.ts +0 -1
- package/dist/layout/LayoutNav.js +1 -2
- package/dist/layout/LayoutNav.js.map +1 -1
- package/dist/layout/LayoutWindowSplitter.d.ts +0 -1
- package/dist/layout/LayoutWindowSplitter.js.map +1 -1
- package/dist/layout/_layout.scss +23 -10
- package/dist/layout/useExpandableLayout.d.ts +3 -3
- package/dist/layout/useExpandableLayout.js.map +1 -1
- package/dist/layout/useHorizontalLayoutTransition.js +1 -1
- package/dist/layout/useHorizontalLayoutTransition.js.map +1 -1
- package/dist/layout/useLayoutAppBarHeight.d.ts +2 -3
- package/dist/layout/useLayoutAppBarHeight.js.map +1 -1
- package/dist/layout/useLayoutTree.d.ts +2 -2
- package/dist/layout/useLayoutTree.js.map +1 -1
- package/dist/layout/useTemporaryLayout.d.ts +2 -2
- package/dist/layout/useTemporaryLayout.js.map +1 -1
- package/dist/link/Link.d.ts +0 -2
- package/dist/link/Link.js +0 -2
- package/dist/link/Link.js.map +1 -1
- package/dist/link/SkipToMainContent.js.map +1 -1
- package/dist/list/List.d.ts +0 -20
- package/dist/list/List.js +1 -14
- package/dist/list/List.js.map +1 -1
- package/dist/list/ListItem.d.ts +2 -17
- package/dist/list/ListItem.js +2 -1
- package/dist/list/ListItem.js.map +1 -1
- package/dist/list/ListItemAddon.d.ts +0 -2
- package/dist/list/ListItemAddon.js +0 -2
- package/dist/list/ListItemAddon.js.map +1 -1
- package/dist/list/ListItemChildren.d.ts +0 -2
- package/dist/list/ListItemChildren.js +0 -2
- package/dist/list/ListItemChildren.js.map +1 -1
- package/dist/list/ListItemLink.d.ts +2 -1
- package/dist/list/ListItemLink.js +2 -1
- package/dist/list/ListItemLink.js.map +1 -1
- package/dist/list/ListItemText.d.ts +0 -2
- package/dist/list/ListItemText.js +0 -2
- package/dist/list/ListItemText.js.map +1 -1
- package/dist/list/ListSubheader.d.ts +3 -2
- package/dist/list/ListSubheader.js +0 -2
- package/dist/list/ListSubheader.js.map +1 -1
- package/dist/list/_list.scss +6 -5
- package/dist/list/getListItemHeight.d.ts +2 -2
- package/dist/list/getListItemHeight.js +2 -2
- package/dist/list/getListItemHeight.js.map +1 -1
- package/dist/list/listItemStyles.d.ts +17 -1
- package/dist/list/listItemStyles.js.map +1 -1
- package/dist/list/listStyles.d.ts +18 -0
- package/dist/list/listStyles.js +14 -0
- package/dist/list/listStyles.js.map +1 -0
- package/dist/list/types.d.ts +9 -3
- package/dist/list/types.js +6 -1
- package/dist/list/types.js.map +1 -1
- package/dist/media-queries/AppSizeProvider.d.ts +8 -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 +12 -0
- package/dist/media-queries/appSize.d.ts +5 -5
- package/dist/media-queries/appSize.js.map +1 -1
- package/dist/media-queries/useMediaQuery.d.ts +1 -1
- package/dist/media-queries/useMediaQuery.js +4 -2
- package/dist/media-queries/useMediaQuery.js.map +1 -1
- package/dist/menu/DropdownMenu.js.map +1 -1
- package/dist/menu/Menu.d.ts +8 -3
- package/dist/menu/Menu.js +2 -1
- package/dist/menu/Menu.js.map +1 -1
- package/dist/menu/MenuBar.d.ts +0 -1
- package/dist/menu/MenuButton.d.ts +0 -1
- package/dist/menu/MenuConfigurationProvider.js.map +1 -1
- package/dist/menu/MenuItem.d.ts +0 -1
- package/dist/menu/MenuItemButton.d.ts +0 -1
- package/dist/menu/MenuItemButton.js +6 -2
- package/dist/menu/MenuItemButton.js.map +1 -1
- package/dist/menu/useContextMenu.d.ts +3 -3
- package/dist/menu/useContextMenu.js.map +1 -1
- package/dist/menu/useMenuBarProvider.d.ts +0 -1
- package/dist/movement/types.d.ts +5 -5
- package/dist/movement/types.js.map +1 -1
- package/dist/movement/useKeyboardMovementProvider.d.ts +0 -1
- package/dist/navigation/CollapsibleNavGroup.d.ts +5 -3
- package/dist/navigation/CollapsibleNavGroup.js +3 -4
- package/dist/navigation/CollapsibleNavGroup.js.map +1 -1
- package/dist/navigation/DefaultNavigationRenderer.d.ts +1 -2
- package/dist/navigation/DefaultNavigationRenderer.js +6 -2
- package/dist/navigation/DefaultNavigationRenderer.js.map +1 -1
- package/dist/navigation/NavGroup.d.ts +0 -2
- package/dist/navigation/NavGroup.js +0 -2
- package/dist/navigation/NavGroup.js.map +1 -1
- package/dist/navigation/NavItem.d.ts +0 -2
- package/dist/navigation/NavItem.js +0 -2
- package/dist/navigation/NavItem.js.map +1 -1
- package/dist/navigation/NavItemButton.d.ts +1 -1
- package/dist/navigation/NavItemButton.js +1 -0
- package/dist/navigation/NavItemButton.js.map +1 -1
- package/dist/navigation/NavItemLink.d.ts +3 -2
- package/dist/navigation/NavItemLink.js +6 -2
- package/dist/navigation/NavItemLink.js.map +1 -1
- package/dist/navigation/NavSubheader.d.ts +2 -6
- package/dist/navigation/NavSubheader.js +0 -2
- package/dist/navigation/NavSubheader.js.map +1 -1
- package/dist/navigation/Navigation.d.ts +1 -1
- package/dist/navigation/Navigation.js.map +1 -1
- package/dist/navigation/_navigation.scss +6 -5
- package/dist/navigation/types.d.ts +54 -6
- package/dist/navigation/types.js.map +1 -1
- package/dist/navigation/useActiveHeadingId.d.ts +1 -1
- package/dist/navigation/useActiveHeadingId.js.map +1 -1
- package/dist/navigation/useNavigationExpansion.d.ts +104 -0
- package/dist/navigation/useNavigationExpansion.js +77 -0
- package/dist/navigation/useNavigationExpansion.js.map +1 -0
- package/dist/navigation/utils.d.ts +13 -0
- package/dist/navigation/utils.js +36 -0
- package/dist/navigation/utils.js.map +1 -0
- package/dist/objectFit.d.ts +69 -0
- package/dist/objectFit.js +52 -0
- package/dist/objectFit.js.map +1 -0
- package/dist/overlay/_overlay.scss +2 -1
- package/dist/positioning/useFixedPositioning.d.ts +17 -4
- package/dist/positioning/useFixedPositioning.js +10 -5
- package/dist/positioning/useFixedPositioning.js.map +1 -1
- package/dist/positioning/utils.js.map +1 -1
- package/dist/progress/CircularProgress.d.ts +0 -2
- package/dist/progress/CircularProgress.js +0 -2
- package/dist/progress/CircularProgress.js.map +1 -1
- package/dist/progress/LinearProgress.d.ts +0 -2
- package/dist/progress/LinearProgress.js +0 -2
- package/dist/progress/LinearProgress.js.map +1 -1
- package/dist/progress/_progress.scss +20 -14
- package/dist/responsive-item/ResponsiveItem.d.ts +64 -0
- package/dist/responsive-item/ResponsiveItem.js +68 -0
- package/dist/responsive-item/ResponsiveItem.js.map +1 -0
- package/dist/responsive-item/ResponsiveItemOverlay.d.ts +1 -21
- package/dist/responsive-item/ResponsiveItemOverlay.js +1 -14
- package/dist/responsive-item/ResponsiveItemOverlay.js.map +1 -1
- package/dist/responsive-item/_responsive-item.scss +110 -133
- package/dist/responsive-item/responsiveItemOverlayStyles.d.ts +19 -0
- package/dist/responsive-item/responsiveItemOverlayStyles.js +14 -0
- package/dist/responsive-item/responsiveItemOverlayStyles.js.map +1 -0
- package/dist/responsive-item/responsiveItemStyles.d.ts +52 -0
- package/dist/responsive-item/responsiveItemStyles.js +15 -0
- package/dist/responsive-item/responsiveItemStyles.js.map +1 -0
- package/dist/scroll/useScrollLock.d.ts +5 -0
- package/dist/scroll/useScrollLock.js.map +1 -1
- package/dist/searching/utils.d.ts +2 -2
- package/dist/searching/utils.js.map +1 -1
- package/dist/segmented-button/SegmentedButton.d.ts +2 -1
- package/dist/segmented-button/SegmentedButton.js +2 -1
- package/dist/segmented-button/SegmentedButton.js.map +1 -1
- package/dist/segmented-button/SegmentedButtonContainer.d.ts +0 -2
- package/dist/segmented-button/SegmentedButtonContainer.js +0 -2
- package/dist/segmented-button/SegmentedButtonContainer.js.map +1 -1
- package/dist/segmented-button/_segmented-button.scss +6 -6
- package/dist/sheet/Sheet.d.ts +30 -16
- package/dist/sheet/Sheet.js +24 -14
- package/dist/sheet/Sheet.js.map +1 -1
- package/dist/sheet/_sheet.scss +18 -6
- package/dist/sheet/styles.d.ts +29 -0
- package/dist/sheet/styles.js +13 -0
- package/dist/sheet/styles.js.map +1 -1
- package/dist/snackbar/ToastActionButton.d.ts +0 -1
- package/dist/snackbar/ToastCloseButton.d.ts +0 -1
- package/dist/snackbar/ToastManager.js +15 -5
- package/dist/snackbar/ToastManager.js.map +1 -1
- package/dist/snackbar/_snackbar.scss +30 -17
- package/dist/snackbar/useCurrentToastActions.d.ts +5 -6
- package/dist/snackbar/useCurrentToastActions.js.map +1 -1
- package/dist/suspense/CircularProgressSuspense.d.ts +0 -2
- package/dist/suspense/CircularProgressSuspense.js +0 -2
- package/dist/suspense/CircularProgressSuspense.js.map +1 -1
- package/dist/suspense/NullSuspense.d.ts +0 -2
- package/dist/suspense/NullSuspense.js +0 -2
- package/dist/suspense/NullSuspense.js.map +1 -1
- package/dist/table/TableCellContent.d.ts +0 -3
- package/dist/table/TableCellContent.js +0 -3
- package/dist/table/TableCellContent.js.map +1 -1
- package/dist/table/TableConfigurationProvider.d.ts +0 -1
- package/dist/table/_table.scss +15 -3
- package/dist/table/tableCellStyles.d.ts +7 -3
- package/dist/table/tableCellStyles.js +2 -2
- package/dist/table/tableCellStyles.js.map +1 -1
- package/dist/tabs/Tab.d.ts +5 -1
- package/dist/tabs/Tab.js +2 -1
- package/dist/tabs/Tab.js.map +1 -1
- package/dist/tabs/TabList.d.ts +2 -2
- package/dist/tabs/TabList.js.map +1 -1
- package/dist/tabs/TabListScrollButton.d.ts +1 -1
- package/dist/tabs/TabListScrollButton.js +6 -2
- package/dist/tabs/TabListScrollButton.js.map +1 -1
- package/dist/tabs/_tabs.scss +48 -9
- package/dist/tabs/getTabListScrollToOptions.d.ts +18 -0
- package/dist/tabs/getTabListScrollToOptions.js +19 -0
- package/dist/tabs/getTabListScrollToOptions.js.map +1 -0
- package/dist/tabs/tabListScrollButtonStyles.d.ts +2 -0
- package/dist/tabs/tabListScrollButtonStyles.js +9 -5
- package/dist/tabs/tabListScrollButtonStyles.js.map +1 -1
- package/dist/tabs/tabStyles.d.ts +3 -0
- package/dist/tabs/tabStyles.js.map +1 -1
- package/dist/tabs/useTabList.d.ts +3 -8
- package/dist/tabs/useTabList.js +5 -2
- package/dist/tabs/useTabList.js.map +1 -1
- package/dist/tabs/useTabs.d.ts +39 -17
- package/dist/tabs/useTabs.js +9 -3
- package/dist/tabs/useTabs.js.map +1 -1
- package/dist/tabs/utils.d.ts +0 -18
- package/dist/tabs/utils.js +0 -15
- package/dist/tabs/utils.js.map +1 -1
- package/dist/test-utils/IntersectionObserver.js.map +1 -1
- package/dist/test-utils/data-testid.d.ts +0 -1
- package/dist/test-utils/matchMedia.d.ts +1 -1
- package/dist/test-utils/matchMedia.js +4 -4
- package/dist/test-utils/matchMedia.js.map +1 -1
- package/dist/test-utils/polyfills/TextDecoder.js +0 -1
- package/dist/test-utils/polyfills/TextDecoder.js.map +1 -1
- package/dist/test-utils/timers.d.ts +9 -5
- package/dist/test-utils/timers.js +5 -5
- package/dist/test-utils/timers.js.map +1 -1
- package/dist/theme/LocalStorageColorSchemeProvider.d.ts +1 -1
- package/dist/theme/LocalStorageColorSchemeProvider.js +2 -1
- package/dist/theme/LocalStorageColorSchemeProvider.js.map +1 -1
- package/dist/theme/ThemeProvider.js +3 -1
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/_a11y.scss +77 -13
- package/dist/theme/_colors.scss +279 -277
- package/dist/theme/_theme.scss +308 -37
- package/dist/theme/isColorScheme.d.ts +16 -0
- package/dist/theme/isColorScheme.js +19 -0
- package/dist/theme/isColorScheme.js.map +1 -0
- package/dist/theme/types.d.ts +53 -1
- package/dist/theme/types.js +1 -23
- package/dist/theme/types.js.map +1 -1
- package/dist/theme/useCSSVariables.d.ts +2 -19
- package/dist/theme/useCSSVariables.js.map +1 -1
- package/dist/theme/useColorScheme.d.ts +1 -36
- package/dist/theme/useColorScheme.js.map +1 -1
- package/dist/theme/useColorSchemeMetaTag.d.ts +1 -1
- package/dist/theme/useColorSchemeMetaTag.js.map +1 -1
- package/dist/theme/useColorSchemeProvider.d.ts +1 -1
- package/dist/theme/useColorSchemeProvider.js +1 -1
- package/dist/theme/useColorSchemeProvider.js.map +1 -1
- package/dist/theme/{usePrefersColorScheme.js → usePrefersDarkScheme.js} +1 -1
- package/dist/theme/usePrefersDarkScheme.js.map +1 -0
- package/dist/theme/utils.js.map +1 -1
- package/dist/tooltip/useTooltip.d.ts +14 -9
- package/dist/tooltip/useTooltip.js +2 -1
- package/dist/tooltip/useTooltip.js.map +1 -1
- package/dist/transition/SlideContainer.d.ts +2 -48
- package/dist/transition/SlideContainer.js +2 -48
- package/dist/transition/SlideContainer.js.map +1 -1
- package/dist/transition/_transition.scss +16 -9
- package/dist/transition/skeletonPlaceholderUtils.js.map +1 -1
- package/dist/transition/types.d.ts +1 -1
- package/dist/transition/types.js.map +1 -1
- package/dist/transition/useCarousel.d.ts +3 -3
- package/dist/transition/useCarousel.js.map +1 -1
- package/dist/transition/useCollapseTransition.js.map +1 -1
- package/dist/transition/useTransition.js +1 -0
- package/dist/transition/useTransition.js.map +1 -1
- package/dist/transition/utils.js.map +1 -1
- package/dist/tree/DefaultTreeItemRenderer.d.ts +2 -3
- package/dist/tree/DefaultTreeItemRenderer.js +1 -1
- package/dist/tree/DefaultTreeItemRenderer.js.map +1 -1
- package/dist/tree/Tree.d.ts +3 -4
- package/dist/tree/Tree.js.map +1 -1
- package/dist/tree/TreeItem.d.ts +12 -4
- package/dist/tree/TreeItem.js +9 -5
- package/dist/tree/TreeItem.js.map +1 -1
- package/dist/tree/TreeItemExpander.js.map +1 -1
- package/dist/tree/_tree.scss +8 -6
- package/dist/tree/types.d.ts +11 -6
- package/dist/tree/types.js +1 -26
- package/dist/tree/types.js.map +1 -1
- package/dist/tree/useTree.d.ts +3 -3
- package/dist/tree/useTree.js.map +1 -1
- package/dist/tree/useTreeExpansion.d.ts +4 -4
- package/dist/tree/useTreeExpansion.js +6 -18
- package/dist/tree/useTreeExpansion.js.map +1 -1
- package/dist/tree/useTreeSelection.d.ts +4 -4
- package/dist/tree/useTreeSelection.js +7 -25
- package/dist/tree/useTreeSelection.js.map +1 -1
- package/dist/tree/utils.d.ts +1 -1
- package/dist/tree/utils.js.map +1 -1
- package/dist/types.d.ts +12 -4
- package/dist/types.js.map +1 -1
- package/dist/typography/SrOnly.d.ts +2 -1
- package/dist/typography/SrOnly.js +2 -1
- package/dist/typography/SrOnly.js.map +1 -1
- package/dist/typography/TextContainer.d.ts +0 -2
- package/dist/typography/TextContainer.js +0 -2
- package/dist/typography/TextContainer.js.map +1 -1
- package/dist/typography/Typography.d.ts +0 -2
- package/dist/typography/Typography.js +0 -2
- package/dist/typography/Typography.js.map +1 -1
- package/dist/typography/WritingDirectionProvider.d.ts +3 -3
- package/dist/typography/WritingDirectionProvider.js +2 -2
- package/dist/typography/WritingDirectionProvider.js.map +1 -1
- package/dist/typography/_typography.scss +94 -37
- package/dist/typography/typographyStyles.js.map +1 -1
- package/dist/useDebouncedFunction.d.ts +1 -5
- package/dist/useDebouncedFunction.js +3 -1
- package/dist/useDebouncedFunction.js.map +1 -1
- package/dist/useDropzone.d.ts +4 -4
- package/dist/useDropzone.js.map +1 -1
- package/dist/useEnsuredId.js.map +1 -1
- package/dist/useIntersectionObserver.d.ts +5 -5
- package/dist/useIntersectionObserver.js.map +1 -1
- package/dist/useLocalStorage.d.ts +3 -3
- package/dist/useLocalStorage.js +1 -1
- package/dist/useLocalStorage.js.map +1 -1
- package/dist/useMutationObserver.d.ts +1 -1
- package/dist/useMutationObserver.js.map +1 -1
- package/dist/useOrientation.js +3 -1
- package/dist/useOrientation.js.map +1 -1
- package/dist/usePageInactive.d.ts +2 -2
- package/dist/usePageInactive.js.map +1 -1
- package/dist/useReadonlySet.d.ts +76 -0
- package/dist/useReadonlySet.js +72 -0
- package/dist/useReadonlySet.js.map +1 -0
- package/dist/useResizeListener.d.ts +8 -2
- package/dist/useResizeListener.js.map +1 -1
- package/dist/useResizeObserver.d.ts +3 -3
- package/dist/useResizeObserver.js.map +1 -1
- package/dist/useThrottledFunction.d.ts +1 -5
- package/dist/useThrottledFunction.js +3 -1
- package/dist/useThrottledFunction.js.map +1 -1
- package/dist/useToggle.d.ts +7 -7
- package/dist/useToggle.js +1 -1
- package/dist/useToggle.js.map +1 -1
- package/dist/utils/RenderRecursively.d.ts +1 -1
- package/dist/utils/RenderRecursively.js.map +1 -1
- package/dist/utils/alphaNumericSort.d.ts +1 -1
- package/dist/utils/alphaNumericSort.js.map +1 -1
- package/dist/utils/bem.js.map +1 -1
- package/dist/utils/debounce.d.ts +5 -0
- package/dist/utils/debounce.js +17 -0
- package/dist/utils/debounce.js.map +1 -0
- package/dist/utils/nearest.js.map +1 -1
- package/dist/utils/parseCssLengthUnit.js.map +1 -1
- package/dist/utils/throttle.d.ts +5 -0
- package/dist/utils/throttle.js +30 -0
- package/dist/utils/throttle.js.map +1 -0
- package/dist/utils/wait.js +3 -1
- package/dist/utils/wait.js.map +1 -1
- package/dist/window-splitter/WindowSplitter.d.ts +39 -17
- package/dist/window-splitter/WindowSplitter.js +40 -19
- package/dist/window-splitter/WindowSplitter.js.map +1 -1
- package/dist/window-splitter/_window-splitter.scss +32 -14
- package/dist/window-splitter/styles.d.ts +14 -0
- package/dist/window-splitter/styles.js +18 -0
- package/dist/window-splitter/styles.js.map +1 -0
- package/package.json +27 -26
- package/src/RootHtml.tsx +0 -2
- package/src/app-bar/AppBar.tsx +1 -172
- package/src/app-bar/AppBarTitle.tsx +1 -46
- package/src/app-bar/styles.ts +206 -0
- package/src/autocomplete/Autocomplete.tsx +194 -211
- package/src/autocomplete/AutocompleteChip.tsx +48 -0
- package/src/autocomplete/AutocompleteCircularProgress.tsx +6 -17
- package/src/autocomplete/AutocompleteClearButton.tsx +44 -0
- package/src/autocomplete/AutocompleteDropdownButton.tsx +16 -37
- package/src/autocomplete/AutocompleteListboxChildren.tsx +68 -0
- package/src/autocomplete/autocompleteStyles.ts +48 -9
- package/src/autocomplete/defaults.ts +26 -17
- package/src/autocomplete/types.ts +744 -61
- package/src/autocomplete/useAutocomplete.ts +428 -0
- package/src/autocomplete/utils.ts +211 -0
- package/src/avatar/Avatar.tsx +0 -2
- package/src/badge/Badge.tsx +2 -42
- package/src/badge/styles.ts +45 -0
- package/src/box/Box.tsx +11 -11
- package/src/box/styles.ts +14 -5
- package/src/button/AsyncButton.tsx +1 -1
- package/src/button/Button.tsx +5 -1
- package/src/button/ButtonUnstyled.tsx +0 -2
- package/src/card/Card.tsx +35 -6
- package/src/card/CardContent.tsx +0 -2
- package/src/card/CardFooter.tsx +0 -2
- package/src/card/CardHeader.tsx +0 -2
- package/src/card/CardSubtitle.tsx +0 -2
- package/src/card/CardTitle.tsx +0 -2
- package/src/card/ClickableCard.tsx +9 -2
- package/src/card/styles.ts +1 -10
- package/src/chip/Chip.tsx +6 -3
- package/src/chip/styles.ts +12 -10
- package/src/delegateEvent.ts +5 -5
- package/src/dialog/Dialog.tsx +48 -61
- package/src/dialog/DialogContent.tsx +3 -3
- package/src/dialog/DialogFooter.tsx +2 -3
- package/src/dialog/DialogHeader.tsx +3 -3
- package/src/dialog/DialogTitle.tsx +3 -3
- package/src/dialog/FixedDialog.tsx +1 -11
- package/src/dialog/styles.ts +97 -0
- package/src/divider/Divider.tsx +0 -14
- package/src/divider/styles.ts +12 -0
- package/src/draggable/useDraggable.ts +17 -10
- package/src/draggable/utils.ts +3 -3
- package/src/expansion-panel/ExpansionList.tsx +1 -1
- package/src/expansion-panel/ExpansionPanel.tsx +10 -39
- package/src/expansion-panel/ExpansionPanelHeader.tsx +0 -1
- package/src/expansion-panel/expansionPanelStyles.ts +33 -0
- package/src/expansion-panel/useExpansionPanels.ts +18 -27
- package/src/{form → files}/FileInput.tsx +7 -15
- package/src/files/styles.ts +10 -0
- package/src/{form → files}/useFileUpload.ts +30 -34
- package/src/files/utils.ts +234 -0
- package/src/{form/fileUtils.ts → files/validation.ts} +13 -242
- package/src/focus/useFocusContainer.ts +16 -8
- package/src/form/Fieldset.tsx +0 -2
- package/src/form/FormMessage.tsx +0 -2
- package/src/form/FormMessageContainer.tsx +2 -3
- package/src/form/FormMessageCounter.tsx +0 -2
- package/src/form/InputToggle.tsx +6 -2
- package/src/form/InputToggleIcon.tsx +0 -2
- package/src/form/Label.tsx +18 -20
- package/src/form/Legend.tsx +0 -2
- package/src/form/Listbox.tsx +87 -0
- package/src/form/ListboxProvider.ts +37 -0
- package/src/form/MenuItemTextField.tsx +1 -2
- package/src/form/NativeSelect.tsx +14 -12
- package/src/form/Option.tsx +74 -22
- package/src/form/Select.tsx +89 -85
- package/src/form/SelectedOption.tsx +0 -2
- package/src/form/Slider.tsx +14 -11
- package/src/form/SliderContainer.tsx +0 -2
- package/src/form/SliderMark.tsx +0 -2
- package/src/form/SliderMarkLabel.tsx +0 -2
- package/src/form/SliderThumb.tsx +4 -4
- package/src/form/SliderTrack.tsx +0 -2
- package/src/form/SliderValueMarks.tsx +4 -6
- package/src/form/Switch.tsx +0 -2
- package/src/form/SwitchTrack.tsx +2 -1
- package/src/form/TextArea.tsx +6 -8
- package/src/form/TextField.tsx +0 -4
- package/src/form/TextFieldAddon.tsx +1 -3
- package/src/form/TextFieldContainer.tsx +9 -11
- package/src/form/formMessageContainerStyles.ts +22 -0
- package/src/form/optionStyles.ts +7 -2
- package/src/form/sliderUtils.ts +1 -1
- package/src/form/textFieldContainerStyles.ts +9 -14
- package/src/form/types.ts +3 -11
- package/src/form/useCheckboxGroup.ts +28 -36
- package/src/form/useCombobox.ts +86 -38
- package/src/form/useEditableCombobox.ts +43 -8
- package/src/form/useRadioGroup.ts +6 -6
- package/src/form/useSelectCombobox.ts +4 -4
- package/src/form/useTextField.ts +1 -1
- package/src/hoverMode/useHoverMode.ts +3 -3
- package/src/hoverMode/useHoverModeProvider.ts +4 -4
- package/src/icon/FontIcon.tsx +0 -2
- package/src/icon/IconRotator.tsx +0 -2
- package/src/icon/MaterialIcon.tsx +0 -2
- package/src/icon/MaterialSymbol.tsx +0 -1
- package/src/icon/SVGIcon.tsx +0 -2
- package/src/icon/TextIconSpacing.tsx +0 -2
- package/src/icon/iconConfig.tsx +12 -0
- package/src/icon/styles.ts +1 -1
- package/src/interaction/RippleContainer.tsx +0 -2
- package/src/interaction/UserInteractionModeProvider.tsx +12 -8
- package/src/interaction/types.ts +21 -2
- package/src/interaction/useElementInteraction.tsx +9 -2
- package/src/interaction/utils.ts +7 -7
- package/src/layout/LayoutNav.tsx +3 -2
- package/src/layout/useExpandableLayout.ts +3 -3
- package/src/layout/useHorizontalLayoutTransition.ts +1 -1
- package/src/layout/useLayoutAppBarHeight.ts +3 -4
- package/src/layout/useLayoutTree.ts +2 -2
- package/src/layout/useTemporaryLayout.ts +2 -2
- package/src/link/Link.tsx +0 -2
- package/src/list/List.tsx +1 -33
- package/src/list/ListItem.tsx +5 -18
- package/src/list/ListItemAddon.tsx +0 -2
- package/src/list/ListItemChildren.tsx +0 -2
- package/src/list/ListItemLink.tsx +5 -1
- package/src/list/ListItemText.tsx +0 -2
- package/src/list/ListSubheader.tsx +3 -2
- package/src/list/getListItemHeight.ts +2 -2
- package/src/list/listItemStyles.ts +21 -4
- package/src/list/listStyles.ts +31 -0
- package/src/list/types.ts +9 -3
- package/src/media-queries/AppSizeProvider.tsx +8 -0
- package/src/media-queries/useMediaQuery.ts +3 -2
- package/src/menu/Menu.tsx +11 -3
- package/src/menu/MenuConfigurationProvider.tsx +2 -2
- package/src/menu/MenuItemButton.tsx +7 -1
- package/src/menu/useContextMenu.ts +3 -3
- package/src/movement/types.ts +5 -5
- package/src/navigation/CollapsibleNavGroup.tsx +16 -8
- package/src/navigation/DefaultNavigationRenderer.tsx +8 -6
- package/src/navigation/NavGroup.tsx +0 -2
- package/src/navigation/NavItem.tsx +0 -2
- package/src/navigation/NavItemButton.tsx +2 -1
- package/src/navigation/NavItemLink.tsx +11 -3
- package/src/navigation/NavSubheader.tsx +1 -3
- package/src/navigation/Navigation.tsx +1 -1
- package/src/navigation/types.ts +60 -10
- package/src/navigation/useActiveHeadingId.ts +1 -1
- package/src/navigation/useNavigationExpansion.ts +170 -0
- package/src/navigation/utils.ts +47 -0
- package/src/objectFit.ts +88 -0
- package/src/positioning/useFixedPositioning.ts +34 -11
- package/src/progress/CircularProgress.tsx +0 -2
- package/src/progress/LinearProgress.tsx +0 -2
- package/src/responsive-item/ResponsiveItem.tsx +96 -0
- package/src/responsive-item/ResponsiveItemOverlay.tsx +6 -48
- package/src/responsive-item/responsiveItemOverlayStyles.ts +46 -0
- package/src/responsive-item/responsiveItemStyles.ts +81 -0
- package/src/scroll/useScrollLock.ts +6 -0
- package/src/searching/utils.ts +3 -3
- package/src/segmented-button/SegmentedButton.tsx +5 -1
- package/src/segmented-button/SegmentedButtonContainer.tsx +0 -2
- package/src/sheet/Sheet.tsx +36 -33
- package/src/sheet/styles.ts +50 -0
- package/src/snackbar/ToastManager.tsx +16 -5
- package/src/snackbar/useCurrentToastActions.ts +5 -5
- package/src/suspense/CircularProgressSuspense.tsx +0 -2
- package/src/suspense/NullSuspense.tsx +0 -2
- package/src/table/TableCellContent.tsx +0 -3
- package/src/table/tableCellStyles.ts +10 -6
- package/src/tabs/Tab.tsx +7 -1
- package/src/tabs/TabList.tsx +2 -2
- package/src/tabs/TabListScrollButton.tsx +13 -6
- package/src/tabs/getTabListScrollToOptions.ts +37 -0
- package/src/tabs/tabListScrollButtonStyles.ts +9 -5
- package/src/tabs/tabStyles.ts +4 -0
- package/src/tabs/useTabList.ts +6 -9
- package/src/tabs/useTabs.ts +67 -20
- package/src/tabs/utils.ts +0 -38
- package/src/test-utils/IntersectionObserver.ts +1 -1
- package/src/test-utils/matchMedia.ts +5 -5
- package/src/test-utils/polyfills/TextDecoder.ts +0 -1
- package/src/test-utils/timers.ts +10 -7
- package/src/theme/LocalStorageColorSchemeProvider.tsx +4 -4
- package/src/theme/ThemeProvider.tsx +3 -3
- package/src/theme/isColorScheme.ts +22 -0
- package/src/theme/types.ts +67 -1
- package/src/theme/useCSSVariables.ts +7 -30
- package/src/theme/useColorScheme.ts +1 -40
- package/src/theme/useColorSchemeMetaTag.ts +1 -1
- package/src/theme/useColorSchemeProvider.ts +2 -2
- package/src/tooltip/useTooltip.ts +17 -9
- package/src/transition/SlideContainer.tsx +2 -48
- package/src/transition/types.ts +1 -1
- package/src/transition/useCarousel.ts +3 -3
- package/src/transition/useTransition.ts +1 -0
- package/src/tree/DefaultTreeItemRenderer.tsx +3 -4
- package/src/tree/Tree.tsx +4 -6
- package/src/tree/TreeItem.tsx +18 -5
- package/src/tree/TreeItemExpander.tsx +1 -1
- package/src/tree/types.ts +16 -6
- package/src/tree/useTree.ts +3 -3
- package/src/tree/useTreeExpansion.ts +10 -28
- package/src/tree/useTreeSelection.ts +11 -35
- package/src/tree/utils.ts +6 -2
- package/src/types.ts +20 -4
- package/src/typography/SrOnly.tsx +2 -1
- package/src/typography/TextContainer.tsx +0 -2
- package/src/typography/Typography.tsx +0 -2
- package/src/typography/WritingDirectionProvider.tsx +3 -3
- package/src/useDebouncedFunction.ts +4 -9
- package/src/useDropzone.ts +4 -4
- package/src/useIntersectionObserver.ts +5 -5
- package/src/useLocalStorage.ts +6 -6
- package/src/useMutationObserver.ts +1 -1
- package/src/useOrientation.ts +3 -1
- package/src/usePageInactive.ts +2 -2
- package/src/useReadonlySet.ts +122 -0
- package/src/useResizeListener.ts +8 -2
- package/src/useResizeObserver.ts +3 -3
- package/src/useThrottledFunction.ts +6 -9
- package/src/useToggle.ts +7 -7
- package/src/utils/RenderRecursively.tsx +1 -1
- package/src/utils/alphaNumericSort.ts +1 -1
- package/src/utils/debounce.ts +22 -0
- package/src/utils/throttle.ts +38 -0
- package/src/utils/wait.ts +5 -1
- package/src/window-splitter/WindowSplitter.tsx +40 -45
- package/src/window-splitter/styles.ts +42 -0
- package/.eslintrc.cjs +0 -34
- package/.stylelintrc.json +0 -14
- package/.swcrc +0 -17
- package/.turbo/turbo-build.log +0 -22
- package/.turbo/turbo-lint.log +0 -12
- package/.turbo/turbo-test.log +0 -5516
- package/.turbo/turbo-typecheck.log +0 -4
- package/CHANGELOG.md +0 -323
- package/coverage/clover.xml +0 -842
- package/coverage/coverage-final.json +0 -6
- package/coverage/lcov-report/autocomplete/Autocomplete.tsx.html +0 -1033
- package/coverage/lcov-report/autocomplete/AutocompleteClearButton.tsx.html +0 -262
- package/coverage/lcov-report/autocomplete/FilterAutocompleteOptions.tsx.html +0 -364
- package/coverage/lcov-report/autocomplete/index.html +0 -146
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/button/Button.tsx.html +0 -676
- package/coverage/lcov-report/button/index.html +0 -116
- package/coverage/lcov-report/card/Card.tsx.html +0 -349
- package/coverage/lcov-report/card/CardSubtitle.tsx.html +0 -265
- package/coverage/lcov-report/card/index.html +0 -146
- package/coverage/lcov-report/card/styles.ts.html +0 -682
- package/coverage/lcov-report/createHorizontalPosition.ts.html +0 -1075
- package/coverage/lcov-report/createVerticalPosition.ts.html +0 -997
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/form/Option.tsx.html +0 -727
- package/coverage/lcov-report/form/index.html +0 -131
- package/coverage/lcov-report/form/useListboxProvider.ts.html +0 -253
- package/coverage/lcov-report/index.html +0 -146
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/searching/fuzzy.ts.html +0 -607
- package/coverage/lcov-report/searching/index.html +0 -116
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/src/card/Card.tsx.html +0 -349
- package/coverage/lcov-report/src/card/CardSubtitle.tsx.html +0 -277
- package/coverage/lcov-report/src/card/index.html +0 -146
- package/coverage/lcov-report/src/card/styles.ts.html +0 -682
- package/coverage/lcov-report/src/cssUtils.ts.html +0 -787
- package/coverage/lcov-report/src/index.html +0 -116
- package/coverage/lcov-report/src/transition/index.html +0 -116
- package/coverage/lcov-report/src/transition/useCSSTransition.ts.html +0 -766
- package/coverage/lcov-report/transition/index.html +0 -116
- package/coverage/lcov-report/transition/useCSSTransition.ts.html +0 -766
- package/coverage/lcov-report/typography/SrOnly.tsx.html +0 -325
- package/coverage/lcov-report/typography/index.html +0 -116
- package/coverage/lcov-report/utils.ts.html +0 -1225
- package/coverage/lcov.info +0 -952
- package/dist/autocomplete/FilterAutocompleteOptions.d.ts +0 -8
- package/dist/autocomplete/FilterAutocompleteOptions.js +0 -57
- package/dist/autocomplete/FilterAutocompleteOptions.js.map +0 -1
- package/dist/dialog/DialogContainer.d.ts +0 -16
- package/dist/dialog/DialogContainer.js +0 -22
- package/dist/dialog/DialogContainer.js.map +0 -1
- package/dist/form/FileInput.js.map +0 -1
- package/dist/form/fileUtils.js.map +0 -1
- package/dist/form/useFileUpload.js.map +0 -1
- package/dist/form/useListboxProvider.d.ts +0 -31
- package/dist/form/useListboxProvider.js.map +0 -1
- package/dist/navigation/getHrefFromParents.d.ts +0 -5
- package/dist/navigation/getHrefFromParents.js +0 -13
- package/dist/navigation/getHrefFromParents.js.map +0 -1
- package/dist/responsive-item/ResponsiveItemContainer.d.ts +0 -117
- package/dist/responsive-item/ResponsiveItemContainer.js +0 -82
- package/dist/responsive-item/ResponsiveItemContainer.js.map +0 -1
- package/dist/responsive-item/styles.d.ts +0 -34
- package/dist/responsive-item/styles.js +0 -17
- package/dist/responsive-item/styles.js.map +0 -1
- package/dist/theme/usePrefersColorScheme.js.map +0 -1
- package/jest.config.ts +0 -68
- package/jest.setup.ts +0 -3
- package/scripts/copySassFiles.ts +0 -70
- package/scripts/getExportMap.ts +0 -66
- package/scripts/tsconfig.json +0 -18
- package/src/__tests__/NoSsr.node.tsx +0 -26
- package/src/__tests__/NoSsr.tsx +0 -89
- package/src/__tests__/RootHtml.node.tsx +0 -46
- package/src/__tests__/__snapshots__/RootHtml.node.tsx.snap +0 -19
- package/src/__tests__/useAsyncFunction.tsx +0 -124
- package/src/__tests__/useDebouncedFunction.tsx +0 -108
- package/src/__tests__/useDropzone.tsx +0 -131
- package/src/__tests__/useElementSize.tsx +0 -181
- package/src/__tests__/useEnsuredId.tsx +0 -25
- package/src/__tests__/useEnsuredState.tsx +0 -74
- package/src/__tests__/useHtmlClassName.tsx +0 -54
- package/src/__tests__/useLocalStorage.tsx +0 -377
- package/src/__tests__/useOrientation.node.tsx +0 -20
- package/src/__tests__/useOrientation.tsx +0 -63
- package/src/__tests__/useResizeObserver.tsx +0 -258
- package/src/__tests__/useThrottledFunction.tsx +0 -226
- package/src/__tests__/useToggle.tsx +0 -78
- package/src/__tests__/useWindowSize.node.tsx +0 -56
- package/src/__tests__/useWindowSize.tsx +0 -155
- package/src/_box-shadows.scss +0 -219
- package/src/_core.scss +0 -432
- package/src/_utils.scss +0 -348
- package/src/app-bar/__tests__/AppBar.tsx +0 -121
- package/src/app-bar/__tests__/AppBarTitle.tsx +0 -39
- package/src/app-bar/__tests__/__snapshots__/AppBar.tsx.snap +0 -186
- package/src/app-bar/__tests__/__snapshots__/AppBarTitle.tsx.snap +0 -47
- package/src/app-bar/_app-bar.scss +0 -248
- package/src/autocomplete/FilterAutocompleteOptions.tsx +0 -86
- package/src/autocomplete/__tests__/Autocomplete.tsx +0 -458
- package/src/autocomplete/__tests__/__snapshots__/Autocomplete.tsx.snap +0 -144
- package/src/autocomplete/_autocomplete.scss +0 -75
- package/src/avatar/__tests__/Avatar.tsx +0 -75
- package/src/avatar/__tests__/__snapshots__/Avatar.tsx.snap +0 -73
- package/src/avatar/_avatar.scss +0 -157
- package/src/badge/__tests__/Badge.tsx +0 -42
- package/src/badge/__tests__/__snapshots__/Badge.tsx.snap +0 -54
- package/src/badge/_badge.scss +0 -145
- package/src/box/__tests__/Box.tsx +0 -158
- package/src/box/__tests__/__snapshots__/Box.tsx.snap +0 -544
- package/src/box/_box.scss +0 -168
- package/src/button/__tests__/AsyncButton.tsx +0 -211
- package/src/button/__tests__/Button.tsx +0 -198
- package/src/button/__tests__/ButtonUnstyled.tsx +0 -37
- package/src/button/__tests__/TooltippedButton.tsx +0 -60
- package/src/button/__tests__/__snapshots__/AsyncButton.tsx.snap +0 -418
- package/src/button/__tests__/__snapshots__/Button.tsx.snap +0 -573
- package/src/button/__tests__/__snapshots__/ButtonUnstyled.tsx.snap +0 -22
- package/src/button/__tests__/__snapshots__/TooltippedButton.tsx.snap +0 -26
- package/src/button/__tests__/__snapshots__/buttonStyles.ts.snap +0 -11
- package/src/button/__tests__/buttonStyles.ts +0 -15
- package/src/button/_button.scss +0 -330
- package/src/card/__tests__/Card.tsx +0 -37
- package/src/card/__tests__/CardContent.tsx +0 -40
- package/src/card/__tests__/CardFooter.tsx +0 -34
- package/src/card/__tests__/CardHeader.tsx +0 -66
- package/src/card/__tests__/CardSubtitle.tsx +0 -30
- package/src/card/__tests__/CardTitle.tsx +0 -30
- package/src/card/__tests__/ClickableCard.tsx +0 -66
- package/src/card/__tests__/__snapshots__/Card.tsx.snap +0 -40
- package/src/card/__tests__/__snapshots__/CardContent.tsx.snap +0 -50
- package/src/card/__tests__/__snapshots__/CardFooter.tsx.snap +0 -30
- package/src/card/__tests__/__snapshots__/CardHeader.tsx.snap +0 -74
- package/src/card/__tests__/__snapshots__/CardSubtitle.tsx.snap +0 -18
- package/src/card/__tests__/__snapshots__/CardTitle.tsx.snap +0 -18
- package/src/card/__tests__/__snapshots__/ClickableCard.tsx.snap +0 -20
- package/src/card/__tests__/__snapshots__/styles.ts.snap +0 -13
- package/src/card/__tests__/styles.ts +0 -45
- package/src/card/_card.scss +0 -189
- package/src/chip/__tests__/Chip.tsx +0 -327
- package/src/chip/__tests__/__snapshots__/Chip.tsx.snap +0 -597
- package/src/chip/__tests__/__snapshots__/styles.ts.snap +0 -5
- package/src/chip/__tests__/styles.ts +0 -14
- package/src/chip/_chip.scss +0 -324
- package/src/dialog/DialogContainer.tsx +0 -30
- package/src/dialog/__tests__/Dialog.tsx +0 -316
- package/src/dialog/__tests__/DialogContent.tsx +0 -53
- package/src/dialog/__tests__/DialogFooter.tsx +0 -70
- package/src/dialog/__tests__/DialogHeader.tsx +0 -37
- package/src/dialog/__tests__/DialogTitle.tsx +0 -41
- package/src/dialog/__tests__/__snapshots__/Dialog.tsx.snap +0 -84
- package/src/dialog/__tests__/__snapshots__/DialogContent.tsx.snap +0 -36
- package/src/dialog/__tests__/__snapshots__/DialogFooter.tsx.snap +0 -186
- package/src/dialog/__tests__/__snapshots__/DialogHeader.tsx.snap +0 -18
- package/src/dialog/__tests__/__snapshots__/DialogTitle.tsx.snap +0 -26
- package/src/dialog/_dialog.scss +0 -273
- package/src/divider/__tests__/Divider.tsx +0 -36
- package/src/divider/__tests__/__snapshots__/Divider.tsx.snap +0 -26
- package/src/divider/_divider.scss +0 -124
- package/src/draggable/__tests__/__snapshots__/useDraggable.tsx.snap +0 -49
- package/src/draggable/__tests__/useDraggable.tsx +0 -540
- package/src/draggable/_draggable.scss +0 -29
- package/src/expansion-panel/__tests__/ExpansionPanel.tsx +0 -290
- package/src/expansion-panel/__tests__/__snapshots__/ExpansionPanel.tsx.snap +0 -197
- package/src/expansion-panel/_expansion-panel.scss +0 -107
- package/src/focus/__tests__/useFocusContainer.tsx +0 -280
- package/src/form/__tests__/Checkbox.tsx +0 -42
- package/src/form/__tests__/Fieldset.tsx +0 -44
- package/src/form/__tests__/FileInput.tsx +0 -120
- package/src/form/__tests__/Label.tsx +0 -69
- package/src/form/__tests__/Legend.tsx +0 -34
- package/src/form/__tests__/MenuItemCheckbox.tsx +0 -53
- package/src/form/__tests__/MenuItemRadio.tsx +0 -53
- package/src/form/__tests__/Radio.tsx +0 -35
- package/src/form/__tests__/Select.tsx +0 -439
- package/src/form/__tests__/Switch.tsx +0 -152
- package/src/form/__tests__/TextArea.tsx +0 -433
- package/src/form/__tests__/TextField.tsx +0 -195
- package/src/form/__tests__/__snapshots__/Checkbox.tsx.snap +0 -99
- package/src/form/__tests__/__snapshots__/Fieldset.tsx.snap +0 -58
- package/src/form/__tests__/__snapshots__/FileInput.tsx.snap +0 -612
- package/src/form/__tests__/__snapshots__/Label.tsx.snap +0 -140
- package/src/form/__tests__/__snapshots__/Legend.tsx.snap +0 -30
- package/src/form/__tests__/__snapshots__/MenuItemCheckbox.tsx.snap +0 -96
- package/src/form/__tests__/__snapshots__/MenuItemRadio.tsx.snap +0 -96
- package/src/form/__tests__/__snapshots__/Radio.tsx.snap +0 -99
- package/src/form/__tests__/__snapshots__/Select.tsx.snap +0 -492
- package/src/form/__tests__/__snapshots__/Switch.tsx.snap +0 -428
- package/src/form/__tests__/__snapshots__/TextArea.tsx.snap +0 -548
- package/src/form/__tests__/__snapshots__/TextField.tsx.snap +0 -279
- package/src/form/__tests__/__snapshots__/useCheckboxGroup.tsx.snap +0 -481
- package/src/form/__tests__/__snapshots__/useRadioGroup.tsx.snap +0 -704
- package/src/form/__tests__/useCheckboxGroup.tsx +0 -292
- package/src/form/__tests__/useFileUpload.tsx +0 -289
- package/src/form/__tests__/useFormReset.tsx +0 -194
- package/src/form/__tests__/useRadioGroup.tsx +0 -227
- package/src/form/__tests__/utils.ts +0 -247
- package/src/form/_form.scss +0 -2190
- package/src/form/useListboxProvider.ts +0 -45
- package/src/icon/__tests__/FontIcon.tsx +0 -45
- package/src/icon/__tests__/IconRotator.tsx +0 -120
- package/src/icon/__tests__/MaterialIcon.tsx +0 -79
- package/src/icon/__tests__/MaterialSymbol.tsx +0 -100
- package/src/icon/__tests__/SVGIcon.tsx +0 -40
- package/src/icon/__tests__/TextIconSpacing.tsx +0 -108
- package/src/icon/__tests__/__snapshots__/FontIcon.tsx.snap +0 -35
- package/src/icon/__tests__/__snapshots__/IconRotator.tsx.snap +0 -165
- package/src/icon/__tests__/__snapshots__/MaterialIcon.tsx.snap +0 -82
- package/src/icon/__tests__/__snapshots__/MaterialSymbol.tsx.snap +0 -42
- package/src/icon/__tests__/__snapshots__/SVGIcon.tsx.snap +0 -47
- package/src/icon/__tests__/__snapshots__/TextIconSpacing.tsx.snap +0 -101
- package/src/icon/__tests__/__snapshots__/styles.ts.snap +0 -29
- package/src/icon/__tests__/styles.ts +0 -28
- package/src/icon/_icon.scss +0 -213
- package/src/interaction/__tests__/UserInteractionModeProvider.tsx +0 -121
- package/src/interaction/__tests__/__snapshots__/useHigherContrastChildren.tsx.snap +0 -79
- package/src/interaction/__tests__/useHigherContrastChildren.tsx +0 -97
- package/src/interaction/_interaction.scss +0 -436
- package/src/layout/__tests__/LayoutAppBar.tsx +0 -117
- package/src/layout/__tests__/LayoutNav.tsx +0 -78
- package/src/layout/__tests__/LayoutWindowSplitter.tsx +0 -63
- package/src/layout/__tests__/Main.tsx +0 -51
- package/src/layout/__tests__/__snapshots__/LayoutAppBar.tsx.snap +0 -78
- package/src/layout/__tests__/__snapshots__/LayoutNav.tsx.snap +0 -31
- package/src/layout/__tests__/__snapshots__/LayoutWindowSplitter.tsx.snap +0 -60
- package/src/layout/__tests__/__snapshots__/Main.tsx.snap +0 -32
- package/src/layout/__tests__/__snapshots__/useExpandableLayout.tsx.snap +0 -116
- package/src/layout/__tests__/__snapshots__/useLayoutTree.tsx.snap +0 -676
- package/src/layout/__tests__/__snapshots__/useResizableLayout.tsx.snap +0 -95
- package/src/layout/__tests__/__snapshots__/useTemporaryLayout.tsx.snap +0 -141
- package/src/layout/__tests__/useExpandableLayout.tsx +0 -279
- package/src/layout/__tests__/useLayoutTree.tsx +0 -212
- package/src/layout/__tests__/useResizableLayout.tsx +0 -170
- package/src/layout/__tests__/useTemporaryLayout.tsx +0 -109
- package/src/layout/_layout.scss +0 -163
- package/src/link/__tests__/Link.tsx +0 -31
- package/src/link/__tests__/SkipToMainContent.tsx +0 -125
- package/src/link/__tests__/__snapshots__/Link.tsx.snap +0 -20
- package/src/link/__tests__/__snapshots__/SkipToMainContent.tsx.snap +0 -22
- package/src/link/_link.scss +0 -149
- package/src/list/__tests__/List.tsx +0 -58
- package/src/list/__tests__/ListItem.tsx +0 -280
- package/src/list/__tests__/ListItemLink.tsx +0 -89
- package/src/list/__tests__/ListSubheader.tsx +0 -81
- package/src/list/__tests__/__snapshots__/List.tsx.snap +0 -41
- package/src/list/__tests__/__snapshots__/ListItem.tsx.snap +0 -414
- package/src/list/__tests__/__snapshots__/ListItemLink.tsx.snap +0 -73
- package/src/list/__tests__/__snapshots__/ListSubheader.tsx.snap +0 -99
- package/src/list/__tests__/getListItemHeight.ts +0 -176
- package/src/list/_list.scss +0 -322
- package/src/media-queries/__tests__/AppSizeProvider.node.tsx +0 -37
- package/src/media-queries/__tests__/AppSizeProvider.tsx +0 -119
- package/src/media-queries/__tests__/useMediaQuery.node.tsx +0 -20
- package/src/media-queries/__tests__/useMediaQuery.tsx +0 -59
- package/src/media-queries/_media-queries.scss +0 -63
- package/src/menu/__tests__/DropdownMenu.tsx +0 -627
- package/src/menu/__tests__/MenuBar.tsx +0 -354
- package/src/menu/__tests__/MenuItemCircularProgress.tsx +0 -39
- package/src/menu/__tests__/MenuVisibilityProvider.tsx +0 -34
- package/src/menu/__tests__/__snapshots__/DropdownMenu.tsx.snap +0 -292
- package/src/menu/__tests__/__snapshots__/MenuBar.tsx.snap +0 -87
- package/src/menu/__tests__/__snapshots__/MenuItemCircularProgress.tsx.snap +0 -68
- package/src/menu/__tests__/__snapshots__/useContextMenu.tsx.snap +0 -54
- package/src/menu/__tests__/useContextMenu.tsx +0 -41
- package/src/menu/__tests__/utils.ts +0 -121
- package/src/menu/_menu.scss +0 -116
- package/src/movement/__tests__/findMatchIndex.ts +0 -244
- package/src/movement/__tests__/utils.ts +0 -710
- package/src/navigation/__tests__/Navigation.tsx +0 -97
- package/src/navigation/__tests__/__snapshots__/Navigation.tsx.snap +0 -165
- package/src/navigation/_navigation.scss +0 -99
- package/src/navigation/getHrefFromParents.ts +0 -15
- package/src/overlay/__tests__/Overlay.tsx +0 -198
- package/src/overlay/__tests__/__snapshots__/Overlay.tsx.snap +0 -77
- package/src/overlay/_overlay.scss +0 -74
- package/src/portal/__tests__/PortalContainerProvider.node.tsx +0 -26
- package/src/portal/__tests__/PortalContainerProvider.tsx +0 -84
- package/src/positioning/__tests__/__snapshots__/useFixedPositioning.tsx.snap +0 -87
- package/src/positioning/__tests__/createHorizontalPosition.ts +0 -777
- package/src/positioning/__tests__/createVerticalPosition.ts +0 -464
- package/src/positioning/__tests__/useFixedPositioning.tsx +0 -205
- package/src/positioning/__tests__/utils.ts +0 -1311
- package/src/progress/__tests__/CircularProgress.tsx +0 -153
- package/src/progress/__tests__/LinearProgress.tsx +0 -131
- package/src/progress/__tests__/__snapshots__/CircularProgress.tsx.snap +0 -499
- package/src/progress/__tests__/__snapshots__/LinearProgress.tsx.snap +0 -321
- package/src/progress/__tests__/getProgressA11y.ts +0 -16
- package/src/progress/_progress.scss +0 -577
- package/src/responsive-item/ResponsiveItemContainer.tsx +0 -176
- package/src/responsive-item/__tests__/ResponsiveItemContainer.tsx +0 -56
- package/src/responsive-item/__tests__/ResponsiveItemOverlay.tsx +0 -66
- package/src/responsive-item/__tests__/__snapshots__/ResponsiveItemContainer.tsx.snap +0 -85
- package/src/responsive-item/__tests__/__snapshots__/ResponsiveItemOverlay.tsx.snap +0 -151
- package/src/responsive-item/__tests__/__snapshots__/styles.ts.snap +0 -9
- package/src/responsive-item/__tests__/styles.ts +0 -32
- package/src/responsive-item/_responsive-item.scss +0 -199
- package/src/responsive-item/styles.ts +0 -58
- package/src/searching/__tests__/caseInsensitive.ts +0 -165
- package/src/searching/__tests__/fuzzy.ts +0 -169
- package/src/searching/__tests__/toSearchQuery.ts +0 -21
- package/src/searching/__tests__/useFuzzyMatch.tsx +0 -200
- package/src/segmented-button/__tests__/SegmentedButton.tsx +0 -61
- package/src/segmented-button/__tests__/SegmentedButtonContainer.tsx +0 -38
- package/src/segmented-button/__tests__/__snapshots__/SegmentedButton.tsx.snap +0 -116
- package/src/segmented-button/__tests__/__snapshots__/SegmentedButtonContainer.tsx.snap +0 -22
- package/src/segmented-button/_segmented-button.scss +0 -208
- package/src/sheet/_sheet.scss +0 -189
- package/src/snackbar/__tests__/Snackbar.tsx +0 -85
- package/src/snackbar/__tests__/Toast.tsx +0 -105
- package/src/snackbar/__tests__/ToastActionButton.tsx +0 -112
- package/src/snackbar/__tests__/ToastCloseButton.tsx +0 -140
- package/src/snackbar/__tests__/ToastContent.tsx +0 -88
- package/src/snackbar/__tests__/ToastManagerProvider.tsx +0 -852
- package/src/snackbar/__tests__/__snapshots__/Snackbar.tsx.snap +0 -176
- package/src/snackbar/__tests__/__snapshots__/Toast.tsx.snap +0 -52
- package/src/snackbar/__tests__/__snapshots__/ToastActionButton.tsx.snap +0 -36
- package/src/snackbar/__tests__/__snapshots__/ToastCloseButton.tsx.snap +0 -104
- package/src/snackbar/__tests__/__snapshots__/ToastContent.tsx.snap +0 -26
- package/src/snackbar/__tests__/__snapshots__/ToastManagerProvider.tsx.snap +0 -290
- package/src/snackbar/_snackbar.scss +0 -266
- package/src/suspense/__tests__/CircularProgressSuspense.tsx +0 -90
- package/src/suspense/__tests__/NullSuspense.tsx +0 -46
- package/src/suspense/__tests__/__snapshots__/CircularProgressSuspense.tsx.snap +0 -24
- package/src/table/__tests__/Table.tsx +0 -315
- package/src/table/__tests__/TableBody.tsx +0 -52
- package/src/table/__tests__/TableCheckbox.tsx +0 -89
- package/src/table/__tests__/TableContainer.tsx +0 -31
- package/src/table/__tests__/TableRadio.tsx +0 -112
- package/src/table/__tests__/TableRow.tsx +0 -63
- package/src/table/__tests__/__snapshots__/Table.tsx.snap +0 -2426
- package/src/table/__tests__/__snapshots__/TableBody.tsx.snap +0 -54
- package/src/table/__tests__/__snapshots__/TableCheckbox.tsx.snap +0 -142
- package/src/table/__tests__/__snapshots__/TableContainer.tsx.snap +0 -16
- package/src/table/__tests__/__snapshots__/TableRadio.tsx.snap +0 -138
- package/src/table/__tests__/__snapshots__/TableRow.tsx.snap +0 -56
- package/src/table/__tests__/__snapshots__/tableContainerStyles.ts.snap +0 -3
- package/src/table/__tests__/__snapshots__/tableRowStyles.ts.snap +0 -3
- package/src/table/__tests__/__snapshots__/tableStyles.ts.snap +0 -3
- package/src/table/__tests__/tableContainerStyles.ts +0 -8
- package/src/table/__tests__/tableRowStyles.ts +0 -8
- package/src/table/__tests__/tableStyles.ts +0 -8
- package/src/table/_table.scss +0 -447
- package/src/tabs/__tests__/Tab.tsx +0 -51
- package/src/tabs/__tests__/TabList.tsx +0 -640
- package/src/tabs/__tests__/__snapshots__/Tab.tsx.snap +0 -85
- package/src/tabs/__tests__/__snapshots__/TabList.tsx.snap +0 -51
- package/src/tabs/__tests__/useTabs.tsx +0 -212
- package/src/tabs/_tabs.scss +0 -273
- package/src/test-utils/__tests__/ResizeObserver.ts +0 -171
- package/src/theme/__tests__/LocalStorageColorSchemeProvider.tsx +0 -162
- package/src/theme/__tests__/ThemeProvider.tsx +0 -90
- package/src/theme/__tests__/__snapshots__/useCSSVariables.tsx.snap +0 -27
- package/src/theme/__tests__/__snapshots__/useColorSchemeMetaTag.tsx.snap +0 -15
- package/src/theme/__tests__/useCSSVariables.tsx +0 -177
- package/src/theme/__tests__/useColorSchemeMetaTag.tsx +0 -36
- package/src/theme/__tests__/utils.ts +0 -67
- package/src/theme/_a11y.scss +0 -114
- package/src/theme/_colors.scss +0 -1057
- package/src/theme/_theme.scss +0 -520
- package/src/tooltip/__tests__/Tooltip.tsx +0 -501
- package/src/tooltip/__tests__/TooltipHoverModeProvider.tsx +0 -94
- package/src/tooltip/__tests__/__snapshots__/Tooltip.tsx.snap +0 -34
- package/src/tooltip/__tests__/utils.ts +0 -94
- package/src/tooltip/_tooltip.scss +0 -155
- package/src/transition/__tests__/CSSTransition.tsx +0 -182
- package/src/transition/__tests__/Collapse.tsx +0 -209
- package/src/transition/__tests__/CrossFade.tsx +0 -227
- package/src/transition/__tests__/ScaleTransition.tsx +0 -204
- package/src/transition/__tests__/SkeletonPlaceholder.tsx +0 -72
- package/src/transition/__tests__/__snapshots__/CSSTransition.tsx.snap +0 -145
- package/src/transition/__tests__/__snapshots__/Collapse.tsx.snap +0 -224
- package/src/transition/__tests__/__snapshots__/CrossFade.tsx.snap +0 -240
- package/src/transition/__tests__/__snapshots__/ScaleTransition.tsx.snap +0 -239
- package/src/transition/__tests__/__snapshots__/SkeletonPlaceholder.tsx.snap +0 -24
- package/src/transition/__tests__/__snapshots__/useCollapseTransition.tsx.snap +0 -361
- package/src/transition/__tests__/__snapshots__/useCrossFadeTransition.tsx.snap +0 -258
- package/src/transition/__tests__/__snapshots__/useMaxWidthTransition.tsx.snap +0 -68
- package/src/transition/__tests__/__snapshots__/useScaleTransition.tsx.snap +0 -209
- package/src/transition/__tests__/useCSSTransition.tsx +0 -190
- package/src/transition/__tests__/useCollapseTransition.tsx +0 -316
- package/src/transition/__tests__/useCrossFadeTransition.tsx +0 -229
- package/src/transition/__tests__/useMaxWidthTransition.tsx +0 -123
- package/src/transition/__tests__/useScaleTransition.tsx +0 -212
- package/src/transition/__tests__/useTransition.tsx +0 -569
- package/src/transition/__tests__/utils.ts +0 -620
- package/src/transition/_transition.scss +0 -365
- package/src/tree/__tests__/Tree.tsx +0 -735
- package/src/tree/__tests__/TreeGroup.tsx +0 -76
- package/src/tree/__tests__/TreeItemExpander.tsx +0 -74
- package/src/tree/__tests__/__snapshots__/Tree.tsx.snap +0 -3618
- package/src/tree/__tests__/__snapshots__/TreeItemExpander.tsx.snap +0 -11
- package/src/tree/__tests__/utils.ts +0 -98
- package/src/tree/_tree.scss +0 -176
- package/src/typography/__tests__/SrOnly.tsx +0 -43
- package/src/typography/__tests__/TextContainer.tsx +0 -45
- package/src/typography/__tests__/Typography.tsx +0 -87
- package/src/typography/__tests__/WritingDirectionProvider.node.tsx +0 -27
- package/src/typography/__tests__/WritingDirectionProvider.tsx +0 -119
- package/src/typography/__tests__/__snapshots__/SrOnly.tsx.snap +0 -56
- package/src/typography/__tests__/__snapshots__/TextContainer.tsx.snap +0 -29
- package/src/typography/__tests__/__snapshots__/Typography.tsx.snap +0 -112
- package/src/typography/_typography.scss +0 -399
- package/src/utils/__tests__/RenderRecursively.tsx +0 -87
- package/src/utils/__tests__/__snapshots__/RenderRecursively.tsx.snap +0 -80
- package/src/utils/__tests__/applyRef.ts +0 -30
- package/src/utils/__tests__/bem.ts +0 -54
- package/src/utils/__tests__/getMiddleOfRange.ts +0 -12
- package/src/utils/__tests__/getPercentage.ts +0 -104
- package/src/utils/__tests__/getRangeDefaultValue.ts +0 -47
- package/src/utils/__tests__/getRangeSteps.ts +0 -14
- package/src/utils/__tests__/loop.ts +0 -50
- package/src/utils/__tests__/nearest.ts +0 -83
- package/src/utils/__tests__/parseCssLengthUnit.node.ts +0 -28
- package/src/utils/__tests__/parseCssLengthUnit.ts +0 -47
- package/src/utils/__tests__/wait.ts +0 -12
- package/src/utils/__tests__/withinRange.ts +0 -24
- package/src/window-splitter/_window-splitter.scss +0 -143
- package/tsconfig.json +0 -19
- package/tsconfig.types.json +0 -12
- package/tsdoc.json +0 -14
- /package/dist/theme/{usePrefersColorScheme.d.ts → usePrefersDarkScheme.d.ts} +0 -0
- /package/src/theme/{usePrefersColorScheme.ts → usePrefersDarkScheme.ts} +0 -0
package/dist/icon/_icon.scss
CHANGED
|
@@ -3,28 +3,132 @@
|
|
|
3
3
|
@use "../transition/transition";
|
|
4
4
|
@use "../utils";
|
|
5
5
|
|
|
6
|
+
// Set to `true` to disable the font icon styles. You normally want to only have
|
|
7
|
+
// one icon type enabled.
|
|
8
|
+
//
|
|
9
|
+
// @example Font Icons Only
|
|
10
|
+
// ```scss
|
|
11
|
+
// @use "@react-md/core" with (
|
|
12
|
+
// $disable-svg: true,
|
|
13
|
+
// $disable-symbol: true
|
|
14
|
+
// );
|
|
15
|
+
// ```
|
|
16
|
+
// @type boolean
|
|
6
17
|
$disable-font: false !default;
|
|
18
|
+
|
|
19
|
+
// Set to `true` to disable the svg icon styles. You normally want to only have
|
|
20
|
+
// one icon type enabled.
|
|
21
|
+
//
|
|
22
|
+
// @example SVG Icons Only
|
|
23
|
+
// ```scss
|
|
24
|
+
// @use "@react-md/core" with (
|
|
25
|
+
// $disable-font: true,
|
|
26
|
+
// $disable-symbol: true
|
|
27
|
+
// );
|
|
28
|
+
// ```
|
|
29
|
+
// @type boolean
|
|
7
30
|
$disable-svg: false !default;
|
|
31
|
+
|
|
32
|
+
// Set to `true` to disable the symbol icon styles. You normally want to only have
|
|
33
|
+
// one icon type enabled.
|
|
34
|
+
//
|
|
35
|
+
// @example Material Symbols Icons Only
|
|
36
|
+
// ```scss
|
|
37
|
+
// @use "@react-md/core" with (
|
|
38
|
+
// $disable-font: true,
|
|
39
|
+
// $disable-svg: true
|
|
40
|
+
// );
|
|
41
|
+
// ```
|
|
42
|
+
// @type boolean
|
|
8
43
|
$disable-symbol: false !default;
|
|
44
|
+
|
|
45
|
+
// Set to `true` to disable the dense icon sizes
|
|
46
|
+
// @type boolean
|
|
9
47
|
$disable-dense: false !default;
|
|
48
|
+
|
|
49
|
+
// Set to `true` to disable the styles for aligning icons within inline text
|
|
50
|
+
// blocks (like paragraphs).
|
|
51
|
+
// @type boolean
|
|
10
52
|
$disable-inline: false !default;
|
|
53
|
+
|
|
54
|
+
// Set to `true` to disable the `.rmd-icon--before` styles with the
|
|
55
|
+
// `TextIconSpacing` component.
|
|
56
|
+
// @type boolean
|
|
11
57
|
$disable-spacing-before: false !default;
|
|
58
|
+
|
|
59
|
+
// Set to `true` to disable the `.rmd-icon--after` styles with the
|
|
60
|
+
// `TextIconSpacing` component.
|
|
61
|
+
// @type boolean
|
|
12
62
|
$disable-spacing-after: false !default;
|
|
63
|
+
|
|
64
|
+
// Set to `true` to disable the `.rmd-icon--above` styles with the
|
|
65
|
+
// `TextIconSpacing` component.
|
|
66
|
+
// @type boolean
|
|
13
67
|
$disable-spacing-above: false !default;
|
|
68
|
+
|
|
69
|
+
// Set to `true` to disable the `.rmd-icon--below` styles with the
|
|
70
|
+
// `TextIconSpacing` component.
|
|
71
|
+
// @type boolean
|
|
14
72
|
$disable-spacing-below: false !default;
|
|
73
|
+
|
|
74
|
+
// Set to `true` to disable the icon rotator styles
|
|
75
|
+
// @type boolean
|
|
15
76
|
$disable-rotator: false !default;
|
|
16
77
|
|
|
78
|
+
// The default icon color when using the global light theme
|
|
79
|
+
// @type Color
|
|
17
80
|
$light-theme-color: color.adjust(#000, $lightness: 46%) !default;
|
|
81
|
+
|
|
82
|
+
// The default icon color when using the global dark theme
|
|
83
|
+
// @type Color
|
|
18
84
|
$dark-theme-color: color.adjust(#fff, $lightness: -30%) !default;
|
|
19
85
|
|
|
86
|
+
// The default icon color
|
|
87
|
+
// @type Color
|
|
20
88
|
$color: theme.get-default-color($light-theme-color, $dark-theme-color) !default;
|
|
21
89
|
|
|
90
|
+
// The default icon size
|
|
91
|
+
// @type number
|
|
22
92
|
$size: 1.5rem !default;
|
|
93
|
+
|
|
94
|
+
// The default icon dense size
|
|
95
|
+
// @type number
|
|
23
96
|
$dense-size: 1.25rem !default;
|
|
24
97
|
|
|
98
|
+
// This is the default material symbol fill value. It should be one of:
|
|
99
|
+
// - `0`
|
|
100
|
+
// - `1`
|
|
101
|
+
//
|
|
102
|
+
// @type number
|
|
25
103
|
$symbol-fill: 0 !default;
|
|
104
|
+
|
|
105
|
+
// This is the default material symbol weight value. It should be one of:
|
|
106
|
+
// - `100`
|
|
107
|
+
// - `200`
|
|
108
|
+
// - `300`
|
|
109
|
+
// - `400`
|
|
110
|
+
// - `500`
|
|
111
|
+
// - `600`
|
|
112
|
+
// - `700`
|
|
113
|
+
//
|
|
114
|
+
// @type number
|
|
26
115
|
$symbol-weight: 400 !default;
|
|
116
|
+
|
|
117
|
+
// This is the default material symbol grade value. It should be one of:
|
|
118
|
+
// - `-25`
|
|
119
|
+
// - `0`
|
|
120
|
+
// - `200`
|
|
121
|
+
//
|
|
122
|
+
// @type number
|
|
27
123
|
$symbol-grade: 0 !default;
|
|
124
|
+
|
|
125
|
+
// This is the default material symbol fill value. It should be one of:
|
|
126
|
+
// - `20`
|
|
127
|
+
// - `24`
|
|
128
|
+
// - `40`
|
|
129
|
+
// - `48`
|
|
130
|
+
//
|
|
131
|
+
// @type number
|
|
28
132
|
$symbol-optical-size: 48 !default;
|
|
29
133
|
|
|
30
134
|
$_validated-fill: utils.validate((0, 1), $symbol-fill, "$symbol-fill");
|
|
@@ -40,12 +144,27 @@ $_validated_optical-size: utils.validate(
|
|
|
40
144
|
"$symbol-optical-size"
|
|
41
145
|
);
|
|
42
146
|
|
|
147
|
+
// The default spacing for the `TextIconSpacing` component or anytime icons
|
|
148
|
+
// should be separated from other content.
|
|
149
|
+
//
|
|
150
|
+
// @type number
|
|
43
151
|
$spacing: 0.5rem !default;
|
|
44
152
|
|
|
153
|
+
// The default `IconRotator` starting position
|
|
154
|
+
// @type string
|
|
45
155
|
$rotate-from: 0deg !default;
|
|
156
|
+
|
|
157
|
+
// The default `IconRotator` ending position
|
|
158
|
+
// @type string
|
|
46
159
|
$rotate-to: 180deg !default;
|
|
160
|
+
|
|
161
|
+
// The default `IconRotator` transition duration
|
|
162
|
+
// @type number
|
|
47
163
|
$rotate-duration: transition.$linear-duration !default;
|
|
48
164
|
|
|
165
|
+
// The available configurable css variables and mostly used internally for the
|
|
166
|
+
// `get-var`, `set-var`, and `use-var` utils.
|
|
167
|
+
// @type List
|
|
49
168
|
$variables: (
|
|
50
169
|
color,
|
|
51
170
|
size,
|
|
@@ -61,6 +180,9 @@ $variables: (
|
|
|
61
180
|
// shouldn't really use react-md without icons though...
|
|
62
181
|
$_disable-icons: $disable-font and $disable-svg and $disable-symbol;
|
|
63
182
|
|
|
183
|
+
// @param {string} name - The supported variable name
|
|
184
|
+
// @param {any} fallback - An optional fallback value
|
|
185
|
+
// @returns {string} a `var()` statement
|
|
64
186
|
@function get-var($name, $fallback: null) {
|
|
65
187
|
$var: utils.get-var-name($variables, $name, "icon");
|
|
66
188
|
@if $fallback {
|
|
@@ -70,34 +192,45 @@ $_disable-icons: $disable-font and $disable-svg and $disable-symbol;
|
|
|
70
192
|
@return var(#{$var});
|
|
71
193
|
}
|
|
72
194
|
|
|
195
|
+
// @param {string} name - The supported variable name
|
|
196
|
+
// @param {any} value - The value to set the variable to. Supports `null` which
|
|
197
|
+
// will just be a no-op.
|
|
73
198
|
@mixin set-var($name, $value) {
|
|
74
199
|
@if $value {
|
|
75
200
|
#{utils.get-var-name($variables, $name, "icon")}: #{$value};
|
|
76
201
|
}
|
|
77
202
|
}
|
|
78
203
|
|
|
204
|
+
// @param {string} property - The css property to apply the variable to
|
|
205
|
+
// @param {string} name - The supported variable name
|
|
206
|
+
// @param {any} fallback - An optional fallback value if the variable has not
|
|
207
|
+
// been set
|
|
79
208
|
@mixin use-var($property, $name: $property, $fallback: null) {
|
|
80
209
|
#{$property}: get-var($name, $fallback);
|
|
81
210
|
}
|
|
82
211
|
|
|
212
|
+
// Applies the light the variables based on feature flags
|
|
83
213
|
@mixin use-light-theme {
|
|
84
214
|
@if not $_disable-icons {
|
|
85
215
|
@include set-var(color, $light-theme-color);
|
|
86
216
|
}
|
|
87
217
|
}
|
|
88
218
|
|
|
219
|
+
// Applies the dark the variables based on feature flags
|
|
89
220
|
@mixin use-dark-theme {
|
|
90
221
|
@if not $_disable-icons {
|
|
91
222
|
@include set-var(color, $dark-theme-color);
|
|
92
223
|
}
|
|
93
224
|
}
|
|
94
225
|
|
|
226
|
+
// Applies the dense height variables
|
|
95
227
|
@mixin dense {
|
|
96
228
|
@if $dense-size {
|
|
97
229
|
@include set-var(size, $dense-size);
|
|
98
230
|
}
|
|
99
231
|
}
|
|
100
232
|
|
|
233
|
+
// Conditionally applies the css variables based on feature flags
|
|
101
234
|
@mixin variables {
|
|
102
235
|
@if not $_disable-icons {
|
|
103
236
|
@include set-var(color, $color);
|
|
@@ -118,6 +251,10 @@ $_disable-icons: $disable-font and $disable-svg and $disable-symbol;
|
|
|
118
251
|
}
|
|
119
252
|
}
|
|
120
253
|
|
|
254
|
+
// Generates all the styles based on feature flags.
|
|
255
|
+
//
|
|
256
|
+
// @param {boolean} disable-layer - Set this to `true` to disable the
|
|
257
|
+
// layer behavior
|
|
121
258
|
@mixin styles($disable-layer: false) {
|
|
122
259
|
@if not $_disable-icons {
|
|
123
260
|
@include utils.optional-layer(icon, $disable-layer) {
|
|
@@ -159,20 +296,32 @@ $_disable-icons: $disable-font and $disable-svg and $disable-symbol;
|
|
|
159
296
|
}
|
|
160
297
|
|
|
161
298
|
@if not $disable-inline {
|
|
162
|
-
&--
|
|
163
|
-
vertical-align:
|
|
299
|
+
&--vam {
|
|
300
|
+
vertical-align: middle;
|
|
164
301
|
}
|
|
165
302
|
}
|
|
166
303
|
|
|
167
304
|
@if not $disable-spacing-before {
|
|
168
305
|
&--before {
|
|
169
|
-
@include
|
|
306
|
+
@include use-var(margin-right, spacing);
|
|
307
|
+
|
|
308
|
+
@include utils.rtl {
|
|
309
|
+
@include use-var(margin-left, spacing);
|
|
310
|
+
|
|
311
|
+
margin-right: 0;
|
|
312
|
+
}
|
|
170
313
|
}
|
|
171
314
|
}
|
|
172
315
|
|
|
173
316
|
@if not $disable-spacing-after {
|
|
174
317
|
&--after {
|
|
175
|
-
@include
|
|
318
|
+
@include use-var(margin-left, spacing);
|
|
319
|
+
|
|
320
|
+
@include utils.rtl {
|
|
321
|
+
@include use-var(margin-right, spacing);
|
|
322
|
+
|
|
323
|
+
margin-left: 0;
|
|
324
|
+
}
|
|
176
325
|
}
|
|
177
326
|
}
|
|
178
327
|
|
|
@@ -105,6 +105,12 @@ export interface ConfigurableIcons {
|
|
|
105
105
|
* @defaultValue `<FontIcon>radio_button_checked</FontIcon>`
|
|
106
106
|
*/
|
|
107
107
|
radioChecked?: ReactNode;
|
|
108
|
+
/**
|
|
109
|
+
* The icon to use when removing elements.
|
|
110
|
+
*
|
|
111
|
+
* @defaultValue `<FontIcon>cancel</FontIcon>`
|
|
112
|
+
*/
|
|
113
|
+
remove?: ReactNode;
|
|
108
114
|
/**
|
|
109
115
|
* The icon to use for showing that something has been selected that is not a
|
|
110
116
|
* radio or checkbox. This is used internally for the `Chip` in the
|
|
@@ -146,6 +152,7 @@ export type ConfigurableIconName = keyof ConfigurableIcons;
|
|
|
146
152
|
* import { ICON_CONFIG } from "@react-md/core";
|
|
147
153
|
* import ArrowDropDownIcon from "@react-md/material-icons/ArrowDropDownIcon";
|
|
148
154
|
* import ArrowUpwardIcon from "@react-md/material-icons/ArrowUpwardIcon";
|
|
155
|
+
* import CancelIcon from "@react-md/material-icons/CancelIcon";
|
|
149
156
|
* import CheckBoxIcon from "@react-md/material-icons/CheckBoxIcon";
|
|
150
157
|
* import CheckBoxOutlineBlankIcon from "@react-md/material-icons/CheckBoxOutlineBlankIcon";
|
|
151
158
|
* import CheckIcon from "@react-md/material-icons/CheckIcon";
|
|
@@ -176,6 +183,7 @@ export type ConfigurableIconName = keyof ConfigurableIcons;
|
|
|
176
183
|
* ICON_CONFIG.password = <RemoveRedEyeIcon />;
|
|
177
184
|
* ICON_CONFIG.radio = <RadioButtonUncheckedIcon />;
|
|
178
185
|
* ICON_CONFIG.radioChecked = <RadioButtonCheckedIcon />;
|
|
186
|
+
* ICON_CONFIG.remove = <CancelIcon />;
|
|
179
187
|
* ICON_CONFIG.selected = <CheckIcon />;
|
|
180
188
|
* ICON_CONFIG.sort = <ArrowUpwardIcon />;
|
|
181
189
|
* ICON_CONFIG.upload = <FileUploadIcon />;
|
|
@@ -194,6 +202,7 @@ export declare const ICON_CONFIG: ConfiguredIcons;
|
|
|
194
202
|
* import { configureIcons } from "@react-md/core";
|
|
195
203
|
* import ArrowDropDownIcon from "@react-md/material-icons/ArrowDropDownIcon";
|
|
196
204
|
* import ArrowUpwardIcon from "@react-md/material-icons/ArrowUpwardIcon";
|
|
205
|
+
* import CancelIcon from "@react-md/material-icons/CancelIcon";
|
|
197
206
|
* import CheckBoxIcon from "@react-md/material-icons/CheckBoxIcon";
|
|
198
207
|
* import CheckBoxOutlineBlankIcon from "@react-md/material-icons/CheckBoxOutlineBlankIcon";
|
|
199
208
|
* import CheckIcon from "@react-md/material-icons/CheckIcon";
|
|
@@ -225,6 +234,7 @@ export declare const ICON_CONFIG: ConfiguredIcons;
|
|
|
225
234
|
* password: <RemoveRedEyeIcon />,
|
|
226
235
|
* radio: <RadioButtonUncheckedIcon />,
|
|
227
236
|
* radioChecked: <RadioButtonCheckedIcon />,
|
|
237
|
+
* remove: <CancelIcon />,
|
|
228
238
|
* selected: <CheckIcon />,
|
|
229
239
|
* sort: <ArrowUpwardIcon />,
|
|
230
240
|
* upload: <FileUploadIcon />,
|
package/dist/icon/iconConfig.js
CHANGED
|
@@ -13,6 +13,7 @@ import { FontIcon } from "./FontIcon.js";
|
|
|
13
13
|
* import { ICON_CONFIG } from "@react-md/core";
|
|
14
14
|
* import ArrowDropDownIcon from "@react-md/material-icons/ArrowDropDownIcon";
|
|
15
15
|
* import ArrowUpwardIcon from "@react-md/material-icons/ArrowUpwardIcon";
|
|
16
|
+
* import CancelIcon from "@react-md/material-icons/CancelIcon";
|
|
16
17
|
* import CheckBoxIcon from "@react-md/material-icons/CheckBoxIcon";
|
|
17
18
|
* import CheckBoxOutlineBlankIcon from "@react-md/material-icons/CheckBoxOutlineBlankIcon";
|
|
18
19
|
* import CheckIcon from "@react-md/material-icons/CheckIcon";
|
|
@@ -43,6 +44,7 @@ import { FontIcon } from "./FontIcon.js";
|
|
|
43
44
|
* ICON_CONFIG.password = <RemoveRedEyeIcon />;
|
|
44
45
|
* ICON_CONFIG.radio = <RadioButtonUncheckedIcon />;
|
|
45
46
|
* ICON_CONFIG.radioChecked = <RadioButtonCheckedIcon />;
|
|
47
|
+
* ICON_CONFIG.remove = <CancelIcon />;
|
|
46
48
|
* ICON_CONFIG.selected = <CheckIcon />;
|
|
47
49
|
* ICON_CONFIG.sort = <ArrowUpwardIcon />;
|
|
48
50
|
* ICON_CONFIG.upload = <FileUploadIcon />;
|
|
@@ -96,6 +98,9 @@ import { FontIcon } from "./FontIcon.js";
|
|
|
96
98
|
radioChecked: /*#__PURE__*/ _jsx(FontIcon, {
|
|
97
99
|
children: "radio_button_checked"
|
|
98
100
|
}),
|
|
101
|
+
remove: /*#__PURE__*/ _jsx(FontIcon, {
|
|
102
|
+
children: "cancel"
|
|
103
|
+
}),
|
|
99
104
|
selected: /*#__PURE__*/ _jsx(FontIcon, {
|
|
100
105
|
children: "check"
|
|
101
106
|
}),
|
|
@@ -115,6 +120,7 @@ import { FontIcon } from "./FontIcon.js";
|
|
|
115
120
|
* import { configureIcons } from "@react-md/core";
|
|
116
121
|
* import ArrowDropDownIcon from "@react-md/material-icons/ArrowDropDownIcon";
|
|
117
122
|
* import ArrowUpwardIcon from "@react-md/material-icons/ArrowUpwardIcon";
|
|
123
|
+
* import CancelIcon from "@react-md/material-icons/CancelIcon";
|
|
118
124
|
* import CheckBoxIcon from "@react-md/material-icons/CheckBoxIcon";
|
|
119
125
|
* import CheckBoxOutlineBlankIcon from "@react-md/material-icons/CheckBoxOutlineBlankIcon";
|
|
120
126
|
* import CheckIcon from "@react-md/material-icons/CheckIcon";
|
|
@@ -146,6 +152,7 @@ import { FontIcon } from "./FontIcon.js";
|
|
|
146
152
|
* password: <RemoveRedEyeIcon />,
|
|
147
153
|
* radio: <RadioButtonUncheckedIcon />,
|
|
148
154
|
* radioChecked: <RadioButtonCheckedIcon />,
|
|
155
|
+
* remove: <CancelIcon />,
|
|
149
156
|
* selected: <CheckIcon />,
|
|
150
157
|
* sort: <ArrowUpwardIcon />,
|
|
151
158
|
* upload: <FileUploadIcon />,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/icon/iconConfig.tsx"],"sourcesContent":["import { type ReactNode } from \"react\";\nimport { FontIcon } from \"./FontIcon.js\";\n\n/**\n * @since 5.0.0 The `download` icon has been renamed to `upload`.\n */\nexport interface ConfigurableIcons {\n /**\n * The icon for navigating backwards or closing an item to the left.\n *\n * @defaultValue `<FontIcon>keyboard_arrow_left</FontIcon>`\n */\n back?: ReactNode;\n\n /**\n * The icon to use when clearing content from a text field.\n *\n * @defaultValue `<FontIcon>clear</FontIcon>`\n * @since 6.0.0\n */\n clear?: ReactNode;\n\n /**\n * @defaultValue `<FontIcon>close</FontIcon>`\n *\n * @since 6.0.0\n */\n close?: ReactNode;\n\n /**\n * The icon to use for unchecked checkboxes.\n *\n * @defaultValue `<FontIcon>check_box_outline_blank</FontIcon>`\n * @since 6.0.0 This icon now represents the unchecked state for\n * checkboxes.\n */\n checkbox?: ReactNode;\n\n /**\n * The icon to use for checked checkboxes.\n *\n * @defaultValue `<FontIcon>check_box</FontIcon>`\n * @since 6.0.0\n */\n checkboxChecked?: ReactNode;\n\n /**\n * The icon to use for indeterminate checkboxes.\n *\n * @defaultValue `<FontIcon>indeterminate_check_box</FontIcon>`\n * @since 6.0.0\n */\n checkboxIndeterminate?: ReactNode;\n\n /**\n * The icon to use for dropdown menus or content that expands vertically in a\n * new material instead of inline like the `expander` icon.\n *\n * @defaultValue `<FontIcon>arrow_drop_down</FontIcon>`\n */\n dropdown?: ReactNode;\n\n /**\n * The icon to use when there are form errors.\n *\n * @since 2.5.0\n * @defaultValue `<FontIcon>error_outline</FontIcon>`\n */\n error?: ReactNode;\n\n /**\n * The icon to use for expanding content vertically.\n *\n * @defaultValue `<FontIcon>keyboard_arrow_down</FontIcon>`\n */\n expander?: ReactNode;\n\n /**\n * The icon for navigating forwards or closing an item to the right. This is\n * also used internally for nested dropdown menus.\n *\n * @defaultValue `<FontIcon>keyboard_arrow_right</FontIcon>`\n */\n forward?: ReactNode;\n\n /**\n * The general to use for displaying a main navigation menu (usually a\n * hamburger menu).\n *\n * @defaultValue `<FontIcon>menu</FontIcon>`\n */\n menu?: ReactNode;\n\n /**\n * The icon for displaying notifications. This is used internally in the\n * `BadgedButton` in the `@react-md/badge` package.\n *\n * @defaultValue `<FontIcon>notifications</FontIcon>`\n */\n notification?: ReactNode;\n\n /**\n * The icon for temporarily displaying a password's field value as plain text.\n *\n * @defaultValue `<FontIcon>remove_red_eye</FontIcon>`\n */\n password?: ReactNode;\n\n /**\n * The icon to use for unchecked radio buttons.\n *\n * @defaultValue `<FontIcon>radio_button_unchecked</FontIcon>`\n * @since 6.0.0 This icon now represents the unchecked state for\n * radios.\n */\n radio?: ReactNode;\n\n /**\n * The icon to use for checked radio buttons.\n *\n * @defaultValue `<FontIcon>radio_button_checked</FontIcon>`\n */\n radioChecked?: ReactNode;\n\n /**\n * The icon to use for showing that something has been selected that is not a\n * radio or checkbox. This is used internally for the `Chip` in the\n * `@react-md/core` package.\n *\n * @defaultValue `<FontIcon>check</FontIcon>`\n */\n selected?: ReactNode;\n\n /**\n * The icon to represent sorting content.\n *\n * @defaultValue `<FontIcon>arrow_upward</FontIcon>`\n */\n sort?: ReactNode;\n\n /**\n * The icon to use for the `FileInput` component (normally file\n * uploads).\n *\n * @since 5.0.0\n * @defaultValue `<FontIcon>file_upload</FontIcon>`\n */\n upload?: ReactNode;\n}\n\nexport type ConfiguredIcons = Required<ConfigurableIcons>;\n\n/**\n * @since 6.0.0\n */\nexport type ConfigurableIconName = keyof ConfigurableIcons;\n\n/**\n * This is a **mutable** object of icons that `react-md` will use for rendering\n * icons within components. The defaults will use the font versions of material\n * icons.\n *\n * @see {@link configureIcons} for a quick way of overriding the configuration\n * or the example below.\n *\n * @example Mutating this object\n * ```tsx\n * import { ICON_CONFIG } from \"@react-md/core\";\n * import ArrowDropDownIcon from \"@react-md/material-icons/ArrowDropDownIcon\";\n * import ArrowUpwardIcon from \"@react-md/material-icons/ArrowUpwardIcon\";\n * import CheckBoxIcon from \"@react-md/material-icons/CheckBoxIcon\";\n * import CheckBoxOutlineBlankIcon from \"@react-md/material-icons/CheckBoxOutlineBlankIcon\";\n * import CheckIcon from \"@react-md/material-icons/CheckIcon\";\n * import CloseIcon from \"@react-md/material-icons/CloseIcon\";\n * import ErrorOutlineIcon from \"@react-md/material-icons/ErrorOutlineIcon\";\n * import FileUploadIcon from \"@react-md/material-icons/FileUploadIcon\";\n * import IndeterminateCheckBoxIcon from \"@react-md/material-icons/IndeterminateCheckBoxIcon\";\n * import KeyboardArrowDownIcon from \"@react-md/material-icons/KeyboardArrowDownIcon\";\n * import KeyboardArrowLeftIcon from \"@react-md/material-icons/KeyboardArrowLeftIcon\";\n * import KeyboardArrowRightIcon from \"@react-md/material-icons/KeyboardArrowRightIcon\";\n * import MenuIcon from \"@react-md/material-icons/MenuIcon\";\n * import NotificationsIcon from \"@react-md/material-icons/NotificationsIcon\";\n * import RadioButtonCheckedIcon from \"@react-md/material-icons/RadioButtonCheckedIcon\";\n * import RadioButtonUncheckedIcon from \"@react-md/material-icons/RadioButtonUncheckedIcon\";\n * import RemoveRedEyeIcon from \"@react-md/material-icons/RemoveRedEyeIcon\";\n *\n * ICON_CONFIG.back = <KeyboardArrowLeftIcon />;\n * ICON_CONFIG.close = <CloseIcon />;\n * ICON_CONFIG.checkbox = <CheckBoxOutlineBlankIcon />;\n * ICON_CONFIG.checkboxChecked = <CheckBoxIcon />;\n * ICON_CONFIG.checkboxIndeterminate = <IndeterminateCheckBoxIcon />;\n * ICON_CONFIG.dropdown = <ArrowDropDownIcon />;\n * ICON_CONFIG.error = <ErrorOutlineIcon />;\n * ICON_CONFIG.expander = <KeyboardArrowDownIcon />;\n * ICON_CONFIG.forward = <KeyboardArrowRightIcon />;\n * ICON_CONFIG.menu = <MenuIcon />;\n * ICON_CONFIG.notification = <NotificationsIcon />;\n * ICON_CONFIG.password = <RemoveRedEyeIcon />;\n * ICON_CONFIG.radio = <RadioButtonUncheckedIcon />;\n * ICON_CONFIG.radioChecked = <RadioButtonCheckedIcon />;\n * ICON_CONFIG.selected = <CheckIcon />;\n * ICON_CONFIG.sort = <ArrowUpwardIcon />;\n * ICON_CONFIG.upload = <FileUploadIcon />;\n * ```\n *\n *\n * @since 6.0.0\n */\nexport const ICON_CONFIG: ConfiguredIcons = {\n back: <FontIcon>keyboard_arrow_left</FontIcon>,\n clear: <FontIcon>clear</FontIcon>,\n close: <FontIcon>close</FontIcon>,\n checkbox: <FontIcon>check_box_outline_blank</FontIcon>,\n checkboxChecked: <FontIcon>check_box</FontIcon>,\n checkboxIndeterminate: <FontIcon>indeterminate_check_box</FontIcon>,\n dropdown: <FontIcon>arrow_drop_down</FontIcon>,\n error: <FontIcon>error_outline</FontIcon>,\n expander: <FontIcon>keyboard_arrow_down</FontIcon>,\n forward: <FontIcon>keyboard_arrow_right</FontIcon>,\n menu: <FontIcon>menu</FontIcon>,\n notification: <FontIcon>notifications</FontIcon>,\n password: <FontIcon>remove_red_eye</FontIcon>,\n radio: <FontIcon>radio_button_unchecked</FontIcon>,\n radioChecked: <FontIcon>radio_button_checked</FontIcon>,\n selected: <FontIcon>check</FontIcon>,\n sort: <FontIcon>arrow_upward</FontIcon>,\n upload: <FontIcon>file_upload</FontIcon>,\n};\n\n/**\n * A convenience helper to reconfigure icons within `react-md`.\n *\n * @example Using SVG Material Icons\n * ```tsx\n * \"use client\";\n * import { configureIcons } from \"@react-md/core\";\n * import ArrowDropDownIcon from \"@react-md/material-icons/ArrowDropDownIcon\";\n * import ArrowUpwardIcon from \"@react-md/material-icons/ArrowUpwardIcon\";\n * import CheckBoxIcon from \"@react-md/material-icons/CheckBoxIcon\";\n * import CheckBoxOutlineBlankIcon from \"@react-md/material-icons/CheckBoxOutlineBlankIcon\";\n * import CheckIcon from \"@react-md/material-icons/CheckIcon\";\n * import CloseIcon from \"@react-md/material-icons/CloseIcon\";\n * import ErrorOutlineIcon from \"@react-md/material-icons/ErrorOutlineIcon\";\n * import FileUploadIcon from \"@react-md/material-icons/FileUploadIcon\";\n * import IndeterminateCheckBoxIcon from \"@react-md/material-icons/IndeterminateCheckBoxIcon\";\n * import KeyboardArrowDownIcon from \"@react-md/material-icons/KeyboardArrowDownIcon\";\n * import KeyboardArrowLeftIcon from \"@react-md/material-icons/KeyboardArrowLeftIcon\";\n * import KeyboardArrowRightIcon from \"@react-md/material-icons/KeyboardArrowRightIcon\";\n * import MenuIcon from \"@react-md/material-icons/MenuIcon\";\n * import NotificationsIcon from \"@react-md/material-icons/NotificationsIcon\";\n * import RadioButtonCheckedIcon from \"@react-md/material-icons/RadioButtonCheckedIcon\";\n * import RadioButtonUncheckedIcon from \"@react-md/material-icons/RadioButtonUncheckedIcon\";\n * import RemoveRedEyeIcon from \"@react-md/material-icons/RemoveRedEyeIcon\";\n *\n * configureIcons({\n * back: <KeyboardArrowLeftIcon />,\n * close: <CloseIcon />,\n * checkbox: <CheckBoxOutlineBlankIcon />,\n * checkboxChecked: <CheckBoxIcon />,\n * checkboxIndeterminate: <IndeterminateCheckBoxIcon />,\n * dropdown: <ArrowDropDownIcon />,\n * error: <ErrorOutlineIcon />,\n * expander: <KeyboardArrowDownIcon />,\n * forward: <KeyboardArrowRightIcon />,\n * menu: <MenuIcon />,\n * notification: <NotificationsIcon />,\n * password: <RemoveRedEyeIcon />,\n * radio: <RadioButtonUncheckedIcon />,\n * radioChecked: <RadioButtonCheckedIcon />,\n * selected: <CheckIcon />,\n * sort: <ArrowUpwardIcon />,\n * upload: <FileUploadIcon />,\n * });\n * ```\n *\n * @since 6.0.0\n */\nexport function configureIcons(overrides: ConfiguredIcons): void {\n Object.entries(overrides).forEach(([name, value]) => {\n if (process.env.NODE_ENV !== \"production\" && !(name in ICON_CONFIG)) {\n throw new Error(`${name} is an invalid react-md icon name.`);\n }\n\n ICON_CONFIG[name as keyof ConfiguredIcons] = value;\n });\n}\n\n/**\n * This is mostly an internal helper to get a specific icon by name and allowing\n * a custom prop to override this behavior. The main benefit of this function is\n * that icons can be removed if the override is set to `null`.\n *\n * @since 6.0.0\n */\nexport function getIcon(\n name: ConfigurableIconName,\n override?: ReactNode\n): ReactNode {\n if (typeof override !== \"undefined\") {\n return override;\n }\n\n return ICON_CONFIG[name];\n}\n"],"names":["FontIcon","ICON_CONFIG","back","clear","close","checkbox","checkboxChecked","checkboxIndeterminate","dropdown","error","expander","forward","menu","notification","password","radio","radioChecked","selected","sort","upload","configureIcons","overrides","Object","entries","forEach","name","value","process","env","NODE_ENV","Error","getIcon","override"],"mappings":";AACA,SAASA,QAAQ,QAAQ,gBAAgB;AA4JzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDC,GACD,OAAO,MAAMC,cAA+B;IAC1CC,oBAAM,KAACF;kBAAS;;IAChBG,qBAAO,KAACH;kBAAS;;IACjBI,qBAAO,KAACJ;kBAAS;;IACjBK,wBAAU,KAACL;kBAAS;;IACpBM,+BAAiB,KAACN;kBAAS;;IAC3BO,qCAAuB,KAACP;kBAAS;;IACjCQ,wBAAU,KAACR;kBAAS;;IACpBS,qBAAO,KAACT;kBAAS;;IACjBU,wBAAU,KAACV;kBAAS;;IACpBW,uBAAS,KAACX;kBAAS;;IACnBY,oBAAM,KAACZ;kBAAS;;IAChBa,4BAAc,KAACb;kBAAS;;IACxBc,wBAAU,KAACd;kBAAS;;IACpBe,qBAAO,KAACf;kBAAS;;IACjBgB,4BAAc,KAAChB;kBAAS;;IACxBiB,wBAAU,KAACjB;kBAAS;;IACpBkB,oBAAM,KAAClB;kBAAS;;IAChBmB,sBAAQ,KAACnB;kBAAS;;AACpB,EAAE;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CC,GACD,OAAO,SAASoB,eAAeC,SAA0B;IACvDC,OAAOC,OAAO,CAACF,WAAWG,OAAO,CAAC,CAAC,CAACC,MAAMC,MAAM;QAC9C,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,gBAAgB,CAAEJ,CAAAA,QAAQxB,WAAU,GAAI;YACnE,MAAM,IAAI6B,MAAM,CAAC,EAAEL,KAAK,kCAAkC,CAAC;QAC7D;QAEAxB,WAAW,CAACwB,KAA8B,GAAGC;IAC/C;AACF;AAEA;;;;;;CAMC,GACD,OAAO,SAASK,QACdN,IAA0B,EAC1BO,QAAoB;IAEpB,IAAI,OAAOA,aAAa,aAAa;QACnC,OAAOA;IACT;IAEA,OAAO/B,WAAW,CAACwB,KAAK;AAC1B"}
|
|
1
|
+
{"version":3,"sources":["../../src/icon/iconConfig.tsx"],"sourcesContent":["import { type ReactNode } from \"react\";\nimport { FontIcon } from \"./FontIcon.js\";\n\n/**\n * @since 5.0.0 The `download` icon has been renamed to `upload`.\n */\nexport interface ConfigurableIcons {\n /**\n * The icon for navigating backwards or closing an item to the left.\n *\n * @defaultValue `<FontIcon>keyboard_arrow_left</FontIcon>`\n */\n back?: ReactNode;\n\n /**\n * The icon to use when clearing content from a text field.\n *\n * @defaultValue `<FontIcon>clear</FontIcon>`\n * @since 6.0.0\n */\n clear?: ReactNode;\n\n /**\n * @defaultValue `<FontIcon>close</FontIcon>`\n *\n * @since 6.0.0\n */\n close?: ReactNode;\n\n /**\n * The icon to use for unchecked checkboxes.\n *\n * @defaultValue `<FontIcon>check_box_outline_blank</FontIcon>`\n * @since 6.0.0 This icon now represents the unchecked state for\n * checkboxes.\n */\n checkbox?: ReactNode;\n\n /**\n * The icon to use for checked checkboxes.\n *\n * @defaultValue `<FontIcon>check_box</FontIcon>`\n * @since 6.0.0\n */\n checkboxChecked?: ReactNode;\n\n /**\n * The icon to use for indeterminate checkboxes.\n *\n * @defaultValue `<FontIcon>indeterminate_check_box</FontIcon>`\n * @since 6.0.0\n */\n checkboxIndeterminate?: ReactNode;\n\n /**\n * The icon to use for dropdown menus or content that expands vertically in a\n * new material instead of inline like the `expander` icon.\n *\n * @defaultValue `<FontIcon>arrow_drop_down</FontIcon>`\n */\n dropdown?: ReactNode;\n\n /**\n * The icon to use when there are form errors.\n *\n * @since 2.5.0\n * @defaultValue `<FontIcon>error_outline</FontIcon>`\n */\n error?: ReactNode;\n\n /**\n * The icon to use for expanding content vertically.\n *\n * @defaultValue `<FontIcon>keyboard_arrow_down</FontIcon>`\n */\n expander?: ReactNode;\n\n /**\n * The icon for navigating forwards or closing an item to the right. This is\n * also used internally for nested dropdown menus.\n *\n * @defaultValue `<FontIcon>keyboard_arrow_right</FontIcon>`\n */\n forward?: ReactNode;\n\n /**\n * The general to use for displaying a main navigation menu (usually a\n * hamburger menu).\n *\n * @defaultValue `<FontIcon>menu</FontIcon>`\n */\n menu?: ReactNode;\n\n /**\n * The icon for displaying notifications. This is used internally in the\n * `BadgedButton` in the `@react-md/badge` package.\n *\n * @defaultValue `<FontIcon>notifications</FontIcon>`\n */\n notification?: ReactNode;\n\n /**\n * The icon for temporarily displaying a password's field value as plain text.\n *\n * @defaultValue `<FontIcon>remove_red_eye</FontIcon>`\n */\n password?: ReactNode;\n\n /**\n * The icon to use for unchecked radio buttons.\n *\n * @defaultValue `<FontIcon>radio_button_unchecked</FontIcon>`\n * @since 6.0.0 This icon now represents the unchecked state for\n * radios.\n */\n radio?: ReactNode;\n\n /**\n * The icon to use for checked radio buttons.\n *\n * @defaultValue `<FontIcon>radio_button_checked</FontIcon>`\n */\n radioChecked?: ReactNode;\n\n /**\n * The icon to use when removing elements.\n *\n * @defaultValue `<FontIcon>cancel</FontIcon>`\n */\n remove?: ReactNode;\n\n /**\n * The icon to use for showing that something has been selected that is not a\n * radio or checkbox. This is used internally for the `Chip` in the\n * `@react-md/core` package.\n *\n * @defaultValue `<FontIcon>check</FontIcon>`\n */\n selected?: ReactNode;\n\n /**\n * The icon to represent sorting content.\n *\n * @defaultValue `<FontIcon>arrow_upward</FontIcon>`\n */\n sort?: ReactNode;\n\n /**\n * The icon to use for the `FileInput` component (normally file\n * uploads).\n *\n * @since 5.0.0\n * @defaultValue `<FontIcon>file_upload</FontIcon>`\n */\n upload?: ReactNode;\n}\n\nexport type ConfiguredIcons = Required<ConfigurableIcons>;\n\n/**\n * @since 6.0.0\n */\nexport type ConfigurableIconName = keyof ConfigurableIcons;\n\n/**\n * This is a **mutable** object of icons that `react-md` will use for rendering\n * icons within components. The defaults will use the font versions of material\n * icons.\n *\n * @see {@link configureIcons} for a quick way of overriding the configuration\n * or the example below.\n *\n * @example Mutating this object\n * ```tsx\n * import { ICON_CONFIG } from \"@react-md/core\";\n * import ArrowDropDownIcon from \"@react-md/material-icons/ArrowDropDownIcon\";\n * import ArrowUpwardIcon from \"@react-md/material-icons/ArrowUpwardIcon\";\n * import CancelIcon from \"@react-md/material-icons/CancelIcon\";\n * import CheckBoxIcon from \"@react-md/material-icons/CheckBoxIcon\";\n * import CheckBoxOutlineBlankIcon from \"@react-md/material-icons/CheckBoxOutlineBlankIcon\";\n * import CheckIcon from \"@react-md/material-icons/CheckIcon\";\n * import CloseIcon from \"@react-md/material-icons/CloseIcon\";\n * import ErrorOutlineIcon from \"@react-md/material-icons/ErrorOutlineIcon\";\n * import FileUploadIcon from \"@react-md/material-icons/FileUploadIcon\";\n * import IndeterminateCheckBoxIcon from \"@react-md/material-icons/IndeterminateCheckBoxIcon\";\n * import KeyboardArrowDownIcon from \"@react-md/material-icons/KeyboardArrowDownIcon\";\n * import KeyboardArrowLeftIcon from \"@react-md/material-icons/KeyboardArrowLeftIcon\";\n * import KeyboardArrowRightIcon from \"@react-md/material-icons/KeyboardArrowRightIcon\";\n * import MenuIcon from \"@react-md/material-icons/MenuIcon\";\n * import NotificationsIcon from \"@react-md/material-icons/NotificationsIcon\";\n * import RadioButtonCheckedIcon from \"@react-md/material-icons/RadioButtonCheckedIcon\";\n * import RadioButtonUncheckedIcon from \"@react-md/material-icons/RadioButtonUncheckedIcon\";\n * import RemoveRedEyeIcon from \"@react-md/material-icons/RemoveRedEyeIcon\";\n *\n * ICON_CONFIG.back = <KeyboardArrowLeftIcon />;\n * ICON_CONFIG.close = <CloseIcon />;\n * ICON_CONFIG.checkbox = <CheckBoxOutlineBlankIcon />;\n * ICON_CONFIG.checkboxChecked = <CheckBoxIcon />;\n * ICON_CONFIG.checkboxIndeterminate = <IndeterminateCheckBoxIcon />;\n * ICON_CONFIG.dropdown = <ArrowDropDownIcon />;\n * ICON_CONFIG.error = <ErrorOutlineIcon />;\n * ICON_CONFIG.expander = <KeyboardArrowDownIcon />;\n * ICON_CONFIG.forward = <KeyboardArrowRightIcon />;\n * ICON_CONFIG.menu = <MenuIcon />;\n * ICON_CONFIG.notification = <NotificationsIcon />;\n * ICON_CONFIG.password = <RemoveRedEyeIcon />;\n * ICON_CONFIG.radio = <RadioButtonUncheckedIcon />;\n * ICON_CONFIG.radioChecked = <RadioButtonCheckedIcon />;\n * ICON_CONFIG.remove = <CancelIcon />;\n * ICON_CONFIG.selected = <CheckIcon />;\n * ICON_CONFIG.sort = <ArrowUpwardIcon />;\n * ICON_CONFIG.upload = <FileUploadIcon />;\n * ```\n *\n *\n * @since 6.0.0\n */\nexport const ICON_CONFIG: ConfiguredIcons = {\n back: <FontIcon>keyboard_arrow_left</FontIcon>,\n clear: <FontIcon>clear</FontIcon>,\n close: <FontIcon>close</FontIcon>,\n checkbox: <FontIcon>check_box_outline_blank</FontIcon>,\n checkboxChecked: <FontIcon>check_box</FontIcon>,\n checkboxIndeterminate: <FontIcon>indeterminate_check_box</FontIcon>,\n dropdown: <FontIcon>arrow_drop_down</FontIcon>,\n error: <FontIcon>error_outline</FontIcon>,\n expander: <FontIcon>keyboard_arrow_down</FontIcon>,\n forward: <FontIcon>keyboard_arrow_right</FontIcon>,\n menu: <FontIcon>menu</FontIcon>,\n notification: <FontIcon>notifications</FontIcon>,\n password: <FontIcon>remove_red_eye</FontIcon>,\n radio: <FontIcon>radio_button_unchecked</FontIcon>,\n radioChecked: <FontIcon>radio_button_checked</FontIcon>,\n remove: <FontIcon>cancel</FontIcon>,\n selected: <FontIcon>check</FontIcon>,\n sort: <FontIcon>arrow_upward</FontIcon>,\n upload: <FontIcon>file_upload</FontIcon>,\n};\n\n/**\n * A convenience helper to reconfigure icons within `react-md`.\n *\n * @example Using SVG Material Icons\n * ```tsx\n * \"use client\";\n * import { configureIcons } from \"@react-md/core\";\n * import ArrowDropDownIcon from \"@react-md/material-icons/ArrowDropDownIcon\";\n * import ArrowUpwardIcon from \"@react-md/material-icons/ArrowUpwardIcon\";\n * import CancelIcon from \"@react-md/material-icons/CancelIcon\";\n * import CheckBoxIcon from \"@react-md/material-icons/CheckBoxIcon\";\n * import CheckBoxOutlineBlankIcon from \"@react-md/material-icons/CheckBoxOutlineBlankIcon\";\n * import CheckIcon from \"@react-md/material-icons/CheckIcon\";\n * import CloseIcon from \"@react-md/material-icons/CloseIcon\";\n * import ErrorOutlineIcon from \"@react-md/material-icons/ErrorOutlineIcon\";\n * import FileUploadIcon from \"@react-md/material-icons/FileUploadIcon\";\n * import IndeterminateCheckBoxIcon from \"@react-md/material-icons/IndeterminateCheckBoxIcon\";\n * import KeyboardArrowDownIcon from \"@react-md/material-icons/KeyboardArrowDownIcon\";\n * import KeyboardArrowLeftIcon from \"@react-md/material-icons/KeyboardArrowLeftIcon\";\n * import KeyboardArrowRightIcon from \"@react-md/material-icons/KeyboardArrowRightIcon\";\n * import MenuIcon from \"@react-md/material-icons/MenuIcon\";\n * import NotificationsIcon from \"@react-md/material-icons/NotificationsIcon\";\n * import RadioButtonCheckedIcon from \"@react-md/material-icons/RadioButtonCheckedIcon\";\n * import RadioButtonUncheckedIcon from \"@react-md/material-icons/RadioButtonUncheckedIcon\";\n * import RemoveRedEyeIcon from \"@react-md/material-icons/RemoveRedEyeIcon\";\n *\n * configureIcons({\n * back: <KeyboardArrowLeftIcon />,\n * close: <CloseIcon />,\n * checkbox: <CheckBoxOutlineBlankIcon />,\n * checkboxChecked: <CheckBoxIcon />,\n * checkboxIndeterminate: <IndeterminateCheckBoxIcon />,\n * dropdown: <ArrowDropDownIcon />,\n * error: <ErrorOutlineIcon />,\n * expander: <KeyboardArrowDownIcon />,\n * forward: <KeyboardArrowRightIcon />,\n * menu: <MenuIcon />,\n * notification: <NotificationsIcon />,\n * password: <RemoveRedEyeIcon />,\n * radio: <RadioButtonUncheckedIcon />,\n * radioChecked: <RadioButtonCheckedIcon />,\n * remove: <CancelIcon />,\n * selected: <CheckIcon />,\n * sort: <ArrowUpwardIcon />,\n * upload: <FileUploadIcon />,\n * });\n * ```\n *\n * @since 6.0.0\n */\nexport function configureIcons(overrides: ConfiguredIcons): void {\n Object.entries(overrides).forEach(([name, value]) => {\n if (process.env.NODE_ENV !== \"production\" && !(name in ICON_CONFIG)) {\n throw new Error(`${name} is an invalid react-md icon name.`);\n }\n\n ICON_CONFIG[name as keyof ConfiguredIcons] = value;\n });\n}\n\n/**\n * This is mostly an internal helper to get a specific icon by name and allowing\n * a custom prop to override this behavior. The main benefit of this function is\n * that icons can be removed if the override is set to `null`.\n *\n * @since 6.0.0\n */\nexport function getIcon(\n name: ConfigurableIconName,\n override?: ReactNode\n): ReactNode {\n if (typeof override !== \"undefined\") {\n return override;\n }\n\n return ICON_CONFIG[name];\n}\n"],"names":["FontIcon","ICON_CONFIG","back","clear","close","checkbox","checkboxChecked","checkboxIndeterminate","dropdown","error","expander","forward","menu","notification","password","radio","radioChecked","remove","selected","sort","upload","configureIcons","overrides","Object","entries","forEach","name","value","process","env","NODE_ENV","Error","getIcon","override"],"mappings":";AACA,SAASA,QAAQ,QAAQ,gBAAgB;AAmKzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDC,GACD,OAAO,MAAMC,cAA+B;IAC1CC,oBAAM,KAACF;kBAAS;;IAChBG,qBAAO,KAACH;kBAAS;;IACjBI,qBAAO,KAACJ;kBAAS;;IACjBK,wBAAU,KAACL;kBAAS;;IACpBM,+BAAiB,KAACN;kBAAS;;IAC3BO,qCAAuB,KAACP;kBAAS;;IACjCQ,wBAAU,KAACR;kBAAS;;IACpBS,qBAAO,KAACT;kBAAS;;IACjBU,wBAAU,KAACV;kBAAS;;IACpBW,uBAAS,KAACX;kBAAS;;IACnBY,oBAAM,KAACZ;kBAAS;;IAChBa,4BAAc,KAACb;kBAAS;;IACxBc,wBAAU,KAACd;kBAAS;;IACpBe,qBAAO,KAACf;kBAAS;;IACjBgB,4BAAc,KAAChB;kBAAS;;IACxBiB,sBAAQ,KAACjB;kBAAS;;IAClBkB,wBAAU,KAAClB;kBAAS;;IACpBmB,oBAAM,KAACnB;kBAAS;;IAChBoB,sBAAQ,KAACpB;kBAAS;;AACpB,EAAE;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDC,GACD,OAAO,SAASqB,eAAeC,SAA0B;IACvDC,OAAOC,OAAO,CAACF,WAAWG,OAAO,CAAC,CAAC,CAACC,MAAMC,MAAM;QAC9C,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,gBAAgB,CAAEJ,CAAAA,QAAQzB,WAAU,GAAI;YACnE,MAAM,IAAI8B,MAAM,GAAGL,KAAK,kCAAkC,CAAC;QAC7D;QAEAzB,WAAW,CAACyB,KAA8B,GAAGC;IAC/C;AACF;AAEA;;;;;;CAMC,GACD,OAAO,SAASK,QACdN,IAA0B,EAC1BO,QAAoB;IAEpB,IAAI,OAAOA,aAAa,aAAa;QACnC,OAAOA;IACT;IAEA,OAAOhC,WAAW,CAACyB,KAAK;AAC1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/icon/materialConfig.ts"],"sourcesContent":["import { type CSSProperties } from \"react\";\nimport {\n type MaterialIconFamily,\n type MaterialSymbolFamily,\n} from \"./material.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface MaterialIconCustomization {\n /**\n * @defaultValue `\"filled\"`\n */\n iconFamily?: MaterialIconFamily;\n}\n\n/**\n * @since 6.0.0\n */\nexport type MaterialIconConfiguration = Required<MaterialIconCustomization>;\n\n/**\n * Fill gives you the ability to modify the default icon style. A single icon\n * can render both unfilled and filled states.\n *\n * To convey a state transition, use the fill axis for animation or\n * interaction. The values are 0 for default or 1 for completely filled. Along\n * with the weight axis, the fill also impacts the look of the icon.\n *\n * @since 6.0.0\n */\nexport type MaterialSymbolFill = 0 | 1;\n\n/**\n * Weight defines the symbol’s stroke weight, with a range of weights between\n * thin (100) and bold (700). Weight can also affect the overall size of the\n * symbol.\n *\n * @since 6.0.0\n */\nexport type MaterialSymbolWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700;\n\n/**\n * Weight and grade affect a symbol’s thickness. Adjustments to grade are more\n * granular than adjustments to weight and have a small impact on the size of\n * the symbol.\n *\n * Grade is also available in some text fonts. You can match grade levels\n * between text and symbols for a harmonious visual effect. For example, if\n * the text font has a -25 grade value, the symbols can match it with a\n * suitable value, say -25.\n *\n * You can use grade for different needs:\n *\n * - Low emphasis (e.g. -25 grade): To reduce glare for a light symbol on a\n * dark background, use a low grade.\n * - High emphasis (e.g. 200 grade): To highlight a symbol, increase the\n * positive grade.\n *\n * @since 6.0.0\n */\nexport type MaterialSymbolGrade = -25 | 0 | 200;\n\n/**\n * Optical Sizes range from 20dp to 48dp.\n *\n * For the image to look the same at different sizes, the stroke weight\n * (thickness) changes as the icon size scales. Optical Size offers a way to\n * automatically adjust the stroke weight when you increase or decrease the\n * symbol size.\n *\n * @since 6.0.0\n */\nexport type MaterialSymbolOpticalSize = 20 | 24 | 40 | 48;\n\n/**\n * The comments for each customizable part was copied from\n * https://fonts.google.com/icons?icon.set=Material+Symbols and clicking the\n * info icon next to each property.\n *\n * @see https://fonts.google.com/icons?icon.set=Material+Symbols\n * @since 6.0.0\n */\nexport interface MaterialSymbolCustomization {\n /**\n * Fill gives you the ability to modify the default icon style. A single icon\n * can render both unfilled and filled states.\n *\n * To convey a state transition, use the fill axis for animation or\n * interaction. The values are 0 for default or 1 for completely filled. Along\n * with the weight axis, the fill also impacts the look of the icon.\n *\n * @defaultValue `0`\n */\n fill?: MaterialSymbolFill;\n\n /**\n * Weight defines the symbol’s stroke weight, with a range of weights between\n * thin (100) and bold (700). Weight can also affect the overall size of the\n * symbol.\n *\n * @defaultValue `400`\n */\n weight?: MaterialSymbolWeight;\n\n /**\n * Weight and grade affect a symbol’s thickness. Adjustments to grade are more\n * granular than adjustments to weight and have a small impact on the size of\n * the symbol.\n *\n * Grade is also available in some text fonts. You can match grade levels\n * between text and symbols for a harmonious visual effect. For example, if\n * the text font has a -25 grade value, the symbols can match it with a\n * suitable value, say -25.\n *\n * You can use grade for different needs:\n *\n * - Low emphasis (e.g. -25 grade): To reduce glare for a light symbol on a\n * dark background, use a low grade.\n * - High emphasis (e.g. 200 grade): To highlight a symbol, increase the\n * positive grade.\n *\n * @defaultValue `0`\n */\n grade?: MaterialSymbolGrade;\n\n /**\n * Optical Sizes range from 20dp to 48dp.\n *\n * For the image to look the same at different sizes, the stroke weight\n * (thickness) changes as the icon size scales. Optical Size offers a way to\n * automatically adjust the stroke weight when you increase or decrease the\n * symbol size.\n *\n * @defaultValue `48`\n */\n opticalSize?: MaterialSymbolOpticalSize;\n\n /**\n * @defaultValue `\"outlined\"`\n */\n family?: MaterialSymbolFamily;\n}\n\n/**\n * @since 6.0.0\n */\nexport type MaterialSymbolConfiguration = Required<MaterialSymbolCustomization>;\n\n/**\n * @since 6.0.0\n */\nexport interface MaterialConfiguration\n extends MaterialIconConfiguration,\n MaterialSymbolConfiguration {}\n\n/**\n * @since 6.0.0\n */\nexport const MATERIAL_CONFIG: MaterialConfiguration = {\n fill: 0,\n weight: 400,\n grade: 0,\n opticalSize: 48,\n iconFamily: \"filled\",\n family: \"outlined\",\n};\n\n/**\n * @since 6.0.0\n */\nexport interface MaterialSymbolFontVariationSettings {\n style?: CSSProperties;\n family: MaterialSymbolFamily;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport function getFontVariationSettings(\n options: MaterialSymbolCustomization & { style?: CSSProperties }\n): MaterialSymbolFontVariationSettings {\n let { style } = options;\n const {\n fill = MATERIAL_CONFIG.fill,\n grade = MATERIAL_CONFIG.grade,\n opticalSize = MATERIAL_CONFIG.opticalSize,\n weight = MATERIAL_CONFIG.weight,\n family: symbolFamily = MATERIAL_CONFIG.family,\n } = options;\n if (\n !style?.fontVariationSettings &&\n (fill !== MATERIAL_CONFIG.fill ||\n grade !== MATERIAL_CONFIG.grade ||\n opticalSize !== MATERIAL_CONFIG.opticalSize ||\n weight !== MATERIAL_CONFIG.weight)\n ) {\n style = {\n ...style,\n fontVariationSettings: `\"FILL\" ${fill}, \"wght\" ${weight}, \"GRAD\" ${grade}, \"opsz\" ${opticalSize}`,\n };\n }\n\n return { family: symbolFamily, style };\n}\n"],"names":["MATERIAL_CONFIG","fill","weight","grade","opticalSize","iconFamily","family","getFontVariationSettings","options","style","symbolFamily","fontVariationSettings"],"mappings":"AA4JA;;CAEC,GACD,OAAO,MAAMA,kBAAyC;IACpDC,MAAM;IACNC,QAAQ;IACRC,OAAO;IACPC,aAAa;IACbC,YAAY;IACZC,QAAQ;AACV,EAAE;AAUF;;;CAGC,GACD,OAAO,SAASC,yBACdC,OAAgE;IAEhE,IAAI,EAAEC,KAAK,EAAE,GAAGD;IAChB,MAAM,EACJP,OAAOD,gBAAgBC,IAAI,EAC3BE,QAAQH,gBAAgBG,KAAK,EAC7BC,cAAcJ,gBAAgBI,WAAW,EACzCF,SAASF,gBAAgBE,MAAM,EAC/BI,QAAQI,eAAeV,gBAAgBM,MAAM,EAC9C,GAAGE;IACJ,IACE,CAACC,OAAOE,yBACPV,CAAAA,SAASD,gBAAgBC,IAAI,IAC5BE,UAAUH,gBAAgBG,KAAK,IAC/BC,gBAAgBJ,gBAAgBI,WAAW,IAC3CF,WAAWF,gBAAgBE,MAAM,AAAD,GAClC;QACAO,QAAQ;YACN,GAAGA,KAAK;YACRE,uBAAuB,CAAC,OAAO,EAAEV,KAAK,SAAS,EAAEC,OAAO,SAAS,EAAEC,MAAM,SAAS,EAAEC,
|
|
1
|
+
{"version":3,"sources":["../../src/icon/materialConfig.ts"],"sourcesContent":["import { type CSSProperties } from \"react\";\nimport {\n type MaterialIconFamily,\n type MaterialSymbolFamily,\n} from \"./material.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface MaterialIconCustomization {\n /**\n * @defaultValue `\"filled\"`\n */\n iconFamily?: MaterialIconFamily;\n}\n\n/**\n * @since 6.0.0\n */\nexport type MaterialIconConfiguration = Required<MaterialIconCustomization>;\n\n/**\n * Fill gives you the ability to modify the default icon style. A single icon\n * can render both unfilled and filled states.\n *\n * To convey a state transition, use the fill axis for animation or\n * interaction. The values are 0 for default or 1 for completely filled. Along\n * with the weight axis, the fill also impacts the look of the icon.\n *\n * @since 6.0.0\n */\nexport type MaterialSymbolFill = 0 | 1;\n\n/**\n * Weight defines the symbol’s stroke weight, with a range of weights between\n * thin (100) and bold (700). Weight can also affect the overall size of the\n * symbol.\n *\n * @since 6.0.0\n */\nexport type MaterialSymbolWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700;\n\n/**\n * Weight and grade affect a symbol’s thickness. Adjustments to grade are more\n * granular than adjustments to weight and have a small impact on the size of\n * the symbol.\n *\n * Grade is also available in some text fonts. You can match grade levels\n * between text and symbols for a harmonious visual effect. For example, if\n * the text font has a -25 grade value, the symbols can match it with a\n * suitable value, say -25.\n *\n * You can use grade for different needs:\n *\n * - Low emphasis (e.g. -25 grade): To reduce glare for a light symbol on a\n * dark background, use a low grade.\n * - High emphasis (e.g. 200 grade): To highlight a symbol, increase the\n * positive grade.\n *\n * @since 6.0.0\n */\nexport type MaterialSymbolGrade = -25 | 0 | 200;\n\n/**\n * Optical Sizes range from 20dp to 48dp.\n *\n * For the image to look the same at different sizes, the stroke weight\n * (thickness) changes as the icon size scales. Optical Size offers a way to\n * automatically adjust the stroke weight when you increase or decrease the\n * symbol size.\n *\n * @since 6.0.0\n */\nexport type MaterialSymbolOpticalSize = 20 | 24 | 40 | 48;\n\n/**\n * The comments for each customizable part was copied from\n * https://fonts.google.com/icons?icon.set=Material+Symbols and clicking the\n * info icon next to each property.\n *\n * @see https://fonts.google.com/icons?icon.set=Material+Symbols\n * @since 6.0.0\n */\nexport interface MaterialSymbolCustomization {\n /**\n * Fill gives you the ability to modify the default icon style. A single icon\n * can render both unfilled and filled states.\n *\n * To convey a state transition, use the fill axis for animation or\n * interaction. The values are 0 for default or 1 for completely filled. Along\n * with the weight axis, the fill also impacts the look of the icon.\n *\n * @defaultValue `0`\n */\n fill?: MaterialSymbolFill;\n\n /**\n * Weight defines the symbol’s stroke weight, with a range of weights between\n * thin (100) and bold (700). Weight can also affect the overall size of the\n * symbol.\n *\n * @defaultValue `400`\n */\n weight?: MaterialSymbolWeight;\n\n /**\n * Weight and grade affect a symbol’s thickness. Adjustments to grade are more\n * granular than adjustments to weight and have a small impact on the size of\n * the symbol.\n *\n * Grade is also available in some text fonts. You can match grade levels\n * between text and symbols for a harmonious visual effect. For example, if\n * the text font has a -25 grade value, the symbols can match it with a\n * suitable value, say -25.\n *\n * You can use grade for different needs:\n *\n * - Low emphasis (e.g. -25 grade): To reduce glare for a light symbol on a\n * dark background, use a low grade.\n * - High emphasis (e.g. 200 grade): To highlight a symbol, increase the\n * positive grade.\n *\n * @defaultValue `0`\n */\n grade?: MaterialSymbolGrade;\n\n /**\n * Optical Sizes range from 20dp to 48dp.\n *\n * For the image to look the same at different sizes, the stroke weight\n * (thickness) changes as the icon size scales. Optical Size offers a way to\n * automatically adjust the stroke weight when you increase or decrease the\n * symbol size.\n *\n * @defaultValue `48`\n */\n opticalSize?: MaterialSymbolOpticalSize;\n\n /**\n * @defaultValue `\"outlined\"`\n */\n family?: MaterialSymbolFamily;\n}\n\n/**\n * @since 6.0.0\n */\nexport type MaterialSymbolConfiguration = Required<MaterialSymbolCustomization>;\n\n/**\n * @since 6.0.0\n */\nexport interface MaterialConfiguration\n extends MaterialIconConfiguration,\n MaterialSymbolConfiguration {}\n\n/**\n * @since 6.0.0\n */\nexport const MATERIAL_CONFIG: MaterialConfiguration = {\n fill: 0,\n weight: 400,\n grade: 0,\n opticalSize: 48,\n iconFamily: \"filled\",\n family: \"outlined\",\n};\n\n/**\n * @since 6.0.0\n */\nexport interface MaterialSymbolFontVariationSettings {\n style?: CSSProperties;\n family: MaterialSymbolFamily;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport function getFontVariationSettings(\n options: MaterialSymbolCustomization & { style?: CSSProperties }\n): MaterialSymbolFontVariationSettings {\n let { style } = options;\n const {\n fill = MATERIAL_CONFIG.fill,\n grade = MATERIAL_CONFIG.grade,\n opticalSize = MATERIAL_CONFIG.opticalSize,\n weight = MATERIAL_CONFIG.weight,\n family: symbolFamily = MATERIAL_CONFIG.family,\n } = options;\n if (\n !style?.fontVariationSettings &&\n (fill !== MATERIAL_CONFIG.fill ||\n grade !== MATERIAL_CONFIG.grade ||\n opticalSize !== MATERIAL_CONFIG.opticalSize ||\n weight !== MATERIAL_CONFIG.weight)\n ) {\n style = {\n ...style,\n fontVariationSettings: `\"FILL\" ${fill}, \"wght\" ${weight}, \"GRAD\" ${grade}, \"opsz\" ${opticalSize}`,\n };\n }\n\n return { family: symbolFamily, style };\n}\n"],"names":["MATERIAL_CONFIG","fill","weight","grade","opticalSize","iconFamily","family","getFontVariationSettings","options","style","symbolFamily","fontVariationSettings"],"mappings":"AA4JA;;CAEC,GACD,OAAO,MAAMA,kBAAyC;IACpDC,MAAM;IACNC,QAAQ;IACRC,OAAO;IACPC,aAAa;IACbC,YAAY;IACZC,QAAQ;AACV,EAAE;AAUF;;;CAGC,GACD,OAAO,SAASC,yBACdC,OAAgE;IAEhE,IAAI,EAAEC,KAAK,EAAE,GAAGD;IAChB,MAAM,EACJP,OAAOD,gBAAgBC,IAAI,EAC3BE,QAAQH,gBAAgBG,KAAK,EAC7BC,cAAcJ,gBAAgBI,WAAW,EACzCF,SAASF,gBAAgBE,MAAM,EAC/BI,QAAQI,eAAeV,gBAAgBM,MAAM,EAC9C,GAAGE;IACJ,IACE,CAACC,OAAOE,yBACPV,CAAAA,SAASD,gBAAgBC,IAAI,IAC5BE,UAAUH,gBAAgBG,KAAK,IAC/BC,gBAAgBJ,gBAAgBI,WAAW,IAC3CF,WAAWF,gBAAgBE,MAAM,AAAD,GAClC;QACAO,QAAQ;YACN,GAAGA,KAAK;YACRE,uBAAuB,CAAC,OAAO,EAAEV,KAAK,SAAS,EAAEC,OAAO,SAAS,EAAEC,MAAM,SAAS,EAAEC,aAAa;QACnG;IACF;IAEA,OAAO;QAAEE,QAAQI;QAAcD;IAAM;AACvC"}
|
package/dist/icon/styles.js
CHANGED
|
@@ -16,7 +16,7 @@ const rotatorStyles = bem("rmd-icon-rotator");
|
|
|
16
16
|
svg: isSvg,
|
|
17
17
|
font: isFont || isMaterial,
|
|
18
18
|
symbol: isSymbol,
|
|
19
|
-
|
|
19
|
+
vam: inline,
|
|
20
20
|
dense
|
|
21
21
|
}), isSymbol && `material-symbols-${family}`, isMaterial && `material-icons${family === "filled" ? "" : `-${family === "rounded" ? "round" : family}`}`, cssUtils({
|
|
22
22
|
textColor: theme
|
package/dist/icon/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/icon/styles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils, type TextColor, type ThemeColor } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport type { MaterialIconFamily, MaterialSymbolFamily } from \"./material.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-icon-color\"?: string;\n \"--rmd-icon-size\"?: string | number;\n \"--rmd-icon-spacing\"?: string | number;\n \"--rmd-icon-rotate-from\"?: string | number;\n \"--rmd-icon-rotate-to\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-icon\");\nconst rotatorStyles = bem(\"rmd-icon-rotator\");\n\n/** @since 6.0.0 */\nexport interface SVGIconClassNameOptions {\n className?: string;\n\n /**\n * An optional theme color to apply to the icon. When this is `undefined`, the\n * default icon color will be used instead.\n *\n * - `primary -> $primary-color`\n * - `secondary -> $secondary-color`\n * - `warning -> $warning-color`\n * - `success -> $success-color`\n * - `error -> $error-color`\n * - `text-primary -> $text-primary-color`\n * - `text-secondary -> $text-primary-color`\n * - `text-hint -> $text-hint-color`\n * - `text-disabled -> $text-disabled-color`\n */\n theme?: ThemeColor | TextColor;\n\n /**\n * Boolean if the font icon should use the dense spec.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` if the icon should display inline with other text (like\n * a paragraph) by applying `vertical-align: bottom`.\n *\n * @example\n * ```tsx\n * <Typography>\n * <InfoIcon inline className=\"rmd-icon--before\" />\n * Some additional information around xyz.\n * </Typography>\n * ```\n *\n * @defaultValue `false`\n */\n inline?: boolean;\n}\n\n/** @since 6.0.0 */\nexport interface FontIconClassNameOptions extends SVGIconClassNameOptions {\n /**\n * The font icon class name to use.\n *\n * @defaultValue `\"material-icons\"`\n */\n iconClassName?: string;\n}\n\n/** @since 6.0.0 */\nexport interface MaterialIconClassNameOptions extends SVGIconClassNameOptions {\n family: MaterialIconFamily;\n}\n\n/** @since 6.0.0 */\nexport interface MaterialSymbolClassNameOptions\n extends SVGIconClassNameOptions {\n family: MaterialSymbolFamily;\n}\n\n/** @since 6.0.0 */\nexport type IconClassNameOptions =\n | ({ type: \"font\" } & FontIconClassNameOptions)\n | ({ type: \"svg\" } & SVGIconClassNameOptions)\n | ({ type: \"material\" } & MaterialIconClassNameOptions)\n | ({ type: \"symbol\" } & MaterialSymbolClassNameOptions);\n\n/**\n *\n * @since 6.0.0\n */\nexport function icon(options: IconClassNameOptions): string {\n const {\n className,\n type,\n theme,\n family = \"\",\n dense = false,\n inline = false,\n iconClassName,\n } = options as FontIconClassNameOptions &\n SVGIconClassNameOptions & {\n type: \"font\" | \"svg\" | \"symbol\" | \"material\";\n family?: MaterialIconFamily;\n };\n\n const isFont = type === \"font\";\n const isSvg = type === \"svg\";\n const isSymbol = type === \"symbol\";\n const isMaterial = type === \"material\";\n\n return cnb(\n styles({\n svg: isSvg,\n font: isFont || isMaterial,\n symbol: isSymbol,\n
|
|
1
|
+
{"version":3,"sources":["../../src/icon/styles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils, type TextColor, type ThemeColor } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport type { MaterialIconFamily, MaterialSymbolFamily } from \"./material.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-icon-color\"?: string;\n \"--rmd-icon-size\"?: string | number;\n \"--rmd-icon-spacing\"?: string | number;\n \"--rmd-icon-rotate-from\"?: string | number;\n \"--rmd-icon-rotate-to\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-icon\");\nconst rotatorStyles = bem(\"rmd-icon-rotator\");\n\n/** @since 6.0.0 */\nexport interface SVGIconClassNameOptions {\n className?: string;\n\n /**\n * An optional theme color to apply to the icon. When this is `undefined`, the\n * default icon color will be used instead.\n *\n * - `primary -> $primary-color`\n * - `secondary -> $secondary-color`\n * - `warning -> $warning-color`\n * - `success -> $success-color`\n * - `error -> $error-color`\n * - `text-primary -> $text-primary-color`\n * - `text-secondary -> $text-primary-color`\n * - `text-hint -> $text-hint-color`\n * - `text-disabled -> $text-disabled-color`\n */\n theme?: ThemeColor | TextColor;\n\n /**\n * Boolean if the font icon should use the dense spec.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` if the icon should display inline with other text (like\n * a paragraph) by applying `vertical-align: bottom`.\n *\n * @example\n * ```tsx\n * <Typography>\n * <InfoIcon inline className=\"rmd-icon--before\" />\n * Some additional information around xyz.\n * </Typography>\n * ```\n *\n * @defaultValue `false`\n */\n inline?: boolean;\n}\n\n/** @since 6.0.0 */\nexport interface FontIconClassNameOptions extends SVGIconClassNameOptions {\n /**\n * The font icon class name to use.\n *\n * @defaultValue `\"material-icons\"`\n */\n iconClassName?: string;\n}\n\n/** @since 6.0.0 */\nexport interface MaterialIconClassNameOptions extends SVGIconClassNameOptions {\n family: MaterialIconFamily;\n}\n\n/** @since 6.0.0 */\nexport interface MaterialSymbolClassNameOptions\n extends SVGIconClassNameOptions {\n family: MaterialSymbolFamily;\n}\n\n/** @since 6.0.0 */\nexport type IconClassNameOptions =\n | ({ type: \"font\" } & FontIconClassNameOptions)\n | ({ type: \"svg\" } & SVGIconClassNameOptions)\n | ({ type: \"material\" } & MaterialIconClassNameOptions)\n | ({ type: \"symbol\" } & MaterialSymbolClassNameOptions);\n\n/**\n *\n * @since 6.0.0\n */\nexport function icon(options: IconClassNameOptions): string {\n const {\n className,\n type,\n theme,\n family = \"\",\n dense = false,\n inline = false,\n iconClassName,\n } = options as FontIconClassNameOptions &\n SVGIconClassNameOptions & {\n type: \"font\" | \"svg\" | \"symbol\" | \"material\";\n family?: MaterialIconFamily;\n };\n\n const isFont = type === \"font\";\n const isSvg = type === \"svg\";\n const isSymbol = type === \"symbol\";\n const isMaterial = type === \"material\";\n\n return cnb(\n styles({\n svg: isSvg,\n font: isFont || isMaterial,\n symbol: isSymbol,\n vam: inline,\n dense,\n }),\n isSymbol && `material-symbols-${family}`,\n isMaterial &&\n `material-icons${\n family === \"filled\" ? \"\" : `-${family === \"rounded\" ? \"round\" : family}`\n }`,\n cssUtils({\n textColor: theme,\n }),\n iconClassName,\n className\n );\n}\n\n/** @since 6.0.0 */\nexport interface IconRotatorClassNameOptions {\n className?: string;\n\n /**\n * Boolean if the icon is currently rotated.\n */\n rotated: boolean;\n\n /**\n * Boolean if changing the {@link rotated} state should no longer transition.\n *\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n}\n\n/**\n *\n * @since 6.0.0\n */\nexport function iconRotator(options: IconRotatorClassNameOptions): string {\n const { className, rotated, disableTransition = false } = options;\n\n return cnb(\n rotatorStyles({\n animate: !disableTransition,\n rotated,\n }),\n className\n );\n}\n"],"names":["cnb","cssUtils","bem","styles","rotatorStyles","icon","options","className","type","theme","family","dense","inline","iconClassName","isFont","isSvg","isSymbol","isMaterial","svg","font","symbol","vam","textColor","iconRotator","rotated","disableTransition","animate"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,QAAQ,QAAyC,iBAAiB;AAC3E,SAASC,GAAG,QAAQ,kBAAkB;AAatC,MAAMC,SAASD,IAAI;AACnB,MAAME,gBAAgBF,IAAI;AA0E1B;;;CAGC,GACD,OAAO,SAASG,KAAKC,OAA6B;IAChD,MAAM,EACJC,SAAS,EACTC,IAAI,EACJC,KAAK,EACLC,SAAS,EAAE,EACXC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,aAAa,EACd,GAAGP;IAMJ,MAAMQ,SAASN,SAAS;IACxB,MAAMO,QAAQP,SAAS;IACvB,MAAMQ,WAAWR,SAAS;IAC1B,MAAMS,aAAaT,SAAS;IAE5B,OAAOR,IACLG,OAAO;QACLe,KAAKH;QACLI,MAAML,UAAUG;QAChBG,QAAQJ;QACRK,KAAKT;QACLD;IACF,IACAK,YAAY,CAAC,iBAAiB,EAAEN,QAAQ,EACxCO,cACE,CAAC,cAAc,EACbP,WAAW,WAAW,KAAK,CAAC,CAAC,EAAEA,WAAW,YAAY,UAAUA,QAAQ,EACxE,EACJT,SAAS;QACPqB,WAAWb;IACb,IACAI,eACAN;AAEJ;AAmBA;;;CAGC,GACD,OAAO,SAASgB,YAAYjB,OAAoC;IAC9D,MAAM,EAAEC,SAAS,EAAEiB,OAAO,EAAEC,oBAAoB,KAAK,EAAE,GAAGnB;IAE1D,OAAON,IACLI,cAAc;QACZsB,SAAS,CAACD;QACVD;IACF,IACAjB;AAEJ"}
|
|
@@ -11,8 +11,6 @@ export interface RippleContainerProps extends ProvidedRippleContainerProps {
|
|
|
11
11
|
className?: string;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* **Server Component**
|
|
15
|
-
*
|
|
16
14
|
* This component should generally only be used internally within `react-md`
|
|
17
15
|
* unless you are implementing a custom component interaction with
|
|
18
16
|
* `useElementInteraction`.
|
|
@@ -2,8 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { cnb } from "cnbuilder";
|
|
3
3
|
import { Ripple } from "./Ripple.js";
|
|
4
4
|
/**
|
|
5
|
-
* **Server Component**
|
|
6
|
-
*
|
|
7
5
|
* This component should generally only be used internally within `react-md`
|
|
8
6
|
* unless you are implementing a custom component interaction with
|
|
9
7
|
* `useElementInteraction`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/interaction/RippleContainer.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { type ReactElement } from \"react\";\nimport { Ripple } from \"./Ripple.js\";\nimport { type ProvidedRippleContainerProps } from \"./types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-ripple-inset\"?: string | number;\n \"--rmd-ripple-border-radius\"?: string | number;\n }\n}\n\n/** @internal */\nexport interface RippleContainerProps extends ProvidedRippleContainerProps {\n className?: string;\n}\n\n/**\n *
|
|
1
|
+
{"version":3,"sources":["../../src/interaction/RippleContainer.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { type ReactElement } from \"react\";\nimport { Ripple } from \"./Ripple.js\";\nimport { type ProvidedRippleContainerProps } from \"./types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-ripple-inset\"?: string | number;\n \"--rmd-ripple-border-radius\"?: string | number;\n }\n}\n\n/** @internal */\nexport interface RippleContainerProps extends ProvidedRippleContainerProps {\n className?: string;\n}\n\n/**\n * This component should generally only be used internally within `react-md`\n * unless you are implementing a custom component interaction with\n * `useElementInteraction`.\n *\n * @see {@link useElementInteraction} for example usage.\n */\nexport function RippleContainer(props: RippleContainerProps): ReactElement {\n const { className, ripples, onEntered, onExited } = props;\n\n return (\n <span className={cnb(\"rmd-ripple-container\", className)}>\n {ripples.map((ripple) => (\n <Ripple\n key={ripple.startTime}\n ripple={ripple}\n onEntered={onEntered}\n onExited={onExited}\n />\n ))}\n </span>\n );\n}\n"],"names":["cnb","Ripple","RippleContainer","props","className","ripples","onEntered","onExited","span","map","ripple","startTime"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAEhC,SAASC,MAAM,QAAQ,cAAc;AAerC;;;;;;CAMC,GACD,OAAO,SAASC,gBAAgBC,KAA2B;IACzD,MAAM,EAAEC,SAAS,EAAEC,OAAO,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGJ;IAEpD,qBACE,KAACK;QAAKJ,WAAWJ,IAAI,wBAAwBI;kBAC1CC,QAAQI,GAAG,CAAC,CAACC,uBACZ,KAACT;gBAECS,QAAQA;gBACRJ,WAAWA;gBACXC,UAAUA;eAHLG,OAAOC,SAAS;;AAQ/B"}
|
|
@@ -21,13 +21,13 @@ export interface UserInteractionModeProviderProps {
|
|
|
21
21
|
* to update component functionality and applying the following class names to
|
|
22
22
|
* the `document.body`:
|
|
23
23
|
*
|
|
24
|
-
* - `"mouse-mode"`
|
|
25
|
-
* - `"keyboard-mode"`
|
|
26
|
-
* - `"touch-mode"`
|
|
24
|
+
* - `"rmd-mouse-mode"`
|
|
25
|
+
* - `"rmd-keyboard-mode"`
|
|
26
|
+
* - `"rmd-touch-mode"`
|
|
27
27
|
*
|
|
28
28
|
* Within `react-md`, these classes are used for the following behavior:
|
|
29
|
-
* - only display `:focus` outlines while in `"keyboard-mode"`
|
|
30
|
-
* - do not display `:hover` effects while in `"touch-mode"`
|
|
29
|
+
* - only display `:focus` outlines while in `"rmd-keyboard-mode"`
|
|
30
|
+
* - do not display `:hover` effects while in `"rmd-touch-mode"`
|
|
31
31
|
*
|
|
32
32
|
* @example Mount at the root of your app
|
|
33
33
|
* ```tsx
|
|
@@ -20,13 +20,13 @@ const { Provider } = context;
|
|
|
20
20
|
* to update component functionality and applying the following class names to
|
|
21
21
|
* the `document.body`:
|
|
22
22
|
*
|
|
23
|
-
* - `"mouse-mode"`
|
|
24
|
-
* - `"keyboard-mode"`
|
|
25
|
-
* - `"touch-mode"`
|
|
23
|
+
* - `"rmd-mouse-mode"`
|
|
24
|
+
* - `"rmd-keyboard-mode"`
|
|
25
|
+
* - `"rmd-touch-mode"`
|
|
26
26
|
*
|
|
27
27
|
* Within `react-md`, these classes are used for the following behavior:
|
|
28
|
-
* - only display `:focus` outlines while in `"keyboard-mode"`
|
|
29
|
-
* - do not display `:hover` effects while in `"touch-mode"`
|
|
28
|
+
* - only display `:focus` outlines while in `"rmd-keyboard-mode"`
|
|
29
|
+
* - do not display `:hover` effects while in `"rmd-touch-mode"`
|
|
30
30
|
*
|
|
31
31
|
* @example Mount at the root of your app
|
|
32
32
|
* ```tsx
|
|
@@ -95,8 +95,12 @@ const { Provider } = context;
|
|
|
95
95
|
* don't really know of any use-cases other than the weird touch-desktop stuff
|
|
96
96
|
* and I have no experience using them.
|
|
97
97
|
*/ useEffect(()=>{
|
|
98
|
-
const enableMouseMode = ()=>
|
|
99
|
-
|
|
98
|
+
const enableMouseMode = ()=>{
|
|
99
|
+
setMode("mouse");
|
|
100
|
+
};
|
|
101
|
+
const enableKeyboardMode = ()=>{
|
|
102
|
+
setMode("keyboard");
|
|
103
|
+
};
|
|
100
104
|
const handleTouchStart = ()=>{
|
|
101
105
|
lastTouchTime.current = Date.now();
|
|
102
106
|
isTouchContextMenu.current = false;
|
|
@@ -112,7 +116,7 @@ const { Provider } = context;
|
|
|
112
116
|
const handleContextMenu = ()=>{
|
|
113
117
|
isTouchContextMenu.current = true;
|
|
114
118
|
};
|
|
115
|
-
const className =
|
|
119
|
+
const className = `rmd-${mode}-mode`;
|
|
116
120
|
document.body.classList.add(className);
|
|
117
121
|
window.addEventListener("touchstart", handleTouchStart, true);
|
|
118
122
|
if (mode === "mouse") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/interaction/UserInteractionModeProvider.tsx"],"sourcesContent":["\"use client\";\nimport {\n createContext,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ReactElement,\n type ReactNode,\n} from \"react\";\n\n/**\n * This is the current mode for how your user is interacting with your app. This\n * will be used to determine which type of state styles should be applied at the\n * time of interacting with an element on your page.\n *\n * @defaultValue `\"mouse\"`\n */\nexport type UserInteractionMode = \"keyboard\" | \"mouse\" | \"touch\";\n\n/** @internal */\ninterface UserInteractionModeContext {\n __root: boolean;\n mode: UserInteractionMode;\n}\n\nconst context = createContext<UserInteractionModeContext>({\n __root: false,\n mode: \"mouse\",\n});\ncontext.displayName = \"UserInteractionMode\";\nconst { Provider } = context;\n\n/**\n * @returns the current user interaction mode\n */\nexport function useUserInteractionMode(): UserInteractionMode {\n return useContext(context).mode;\n}\n\n/** @internal */\nconst TOUCH_TIMEOUT = 1200;\n\nexport interface UserInteractionModeProviderProps {\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This component is used to determine how a user is interacting with your app\n * to update component functionality and applying the following class names to\n * the `document.body`:\n *\n * - `\"mouse-mode\"`\n * - `\"keyboard-mode\"`\n * - `\"touch-mode\"`\n *\n * Within `react-md`, these classes are used for the following behavior:\n * - only display `:focus` outlines while in `\"keyboard-mode\"`\n * - do not display `:hover` effects while in `\"touch-mode\"`\n *\n * @example Mount at the root of your app\n * ```tsx\n * import { createRoot } from \"react-dom/client\";\n * import { UserInteractionModeProvider } from \"@react-md/core\";\n * import App from \"./App\":\n *\n * const container = document.getElementById(\"root\");\n * const root = createRoot(container);\n *\n * root.render(\n * <UserInteractionModeProvider>\n * <App />\n * </UserInteractionModeProvider>\n * );\n * ```\n *\n * @throws \"The `UserInteractionModeProvider` cannot be mounted multiple times.\"\n * if this component is mounted multiple times in your app.\n */\nexport function UserInteractionModeProvider(\n props: UserInteractionModeProviderProps\n): ReactElement {\n const { children } = props;\n const { __root } = useContext(context);\n if (__root) {\n throw new Error(\n \"The `UserInteractionModeProvider` cannot be mounted multiple times.\"\n );\n }\n\n const [mode, setMode] = useState<UserInteractionMode>(\"mouse\");\n const lastTouchTime = useRef(0);\n const isTouchContextMenu = useRef(false);\n\n /**\n * This effect helps determine the current interaction mode by attaching the\n * required event listeners to the window. The `mode` will always be defaulted\n * to `mouse` at first since it has the least possibilities of causing errors\n * with styles since the mouse-only styles are normally just `:hover` effects.\n *\n * ## Switching between modes:\n *\n * ### While in `mouse` mode:\n *\n * - any `keydown` event will switch to `keyboard` mode\n * - this does have the side effect of meta keys also causing the switch over,\n * but it feels fine since it helps show the current focus in the document\n * as well\n * - any `touchstart` event will switch to `touch` mode\n *\n * ### While in `keyboard` mode:\n *\n * - any `mousedown` event will switch to `mouse` mode\n * - it is perfectly okay to move the mouse while in keyboard mode, but still\n * want to keep the keyboard styles until the user actually starts clicking\n * - any `touchstart` event will switch to `touch` mode\n *\n * ### While in `touch` mode:\n *\n * - any `mousemove` event will switch to `mouse` mode, but **only** if there\n * hasn't been a `contextmenu` event within the last `1.2s`\n * - you can really only switch back to `mouse` mode if you are using the\n * devtools to emulate devices OR using a touch-desktop. I don't know how\n * common this really is though.\n * - touching the screen will always fire a `mousemove` event (which is why\n * the `:hover` styles are normally with `rmd-utils-mouse-only`) and even\n * after the `contextmenu` event. Normally want to go back to `mouse` mode\n * when the mouse re-enters the `window`\n *\n * Note: It's currently impossible to switch from `touch` to `keyboard`\n * immediately. You'd first need to switch to `mouse` and then to `keyboard`. I\n * don't really know of any use-cases other than the weird touch-desktop stuff\n * and I have no experience using them.\n */\n useEffect(() => {\n const enableMouseMode = (): void => setMode(\"mouse\");\n const enableKeyboardMode = (): void => setMode(\"keyboard\");\n\n const handleTouchStart = (): void => {\n lastTouchTime.current = Date.now();\n isTouchContextMenu.current = false;\n setMode(\"touch\");\n };\n\n const handleMouseMove = (): void => {\n if (\n isTouchContextMenu.current ||\n Date.now() - lastTouchTime.current < TOUCH_TIMEOUT\n ) {\n isTouchContextMenu.current = false;\n return;\n }\n\n enableMouseMode();\n };\n const handleContextMenu = (): void => {\n isTouchContextMenu.current = true;\n };\n\n const className =
|
|
1
|
+
{"version":3,"sources":["../../src/interaction/UserInteractionModeProvider.tsx"],"sourcesContent":["\"use client\";\nimport {\n createContext,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ReactElement,\n type ReactNode,\n} from \"react\";\n\n/**\n * This is the current mode for how your user is interacting with your app. This\n * will be used to determine which type of state styles should be applied at the\n * time of interacting with an element on your page.\n *\n * @defaultValue `\"mouse\"`\n */\nexport type UserInteractionMode = \"keyboard\" | \"mouse\" | \"touch\";\n\n/** @internal */\ninterface UserInteractionModeContext {\n __root: boolean;\n mode: UserInteractionMode;\n}\n\nconst context = createContext<UserInteractionModeContext>({\n __root: false,\n mode: \"mouse\",\n});\ncontext.displayName = \"UserInteractionMode\";\nconst { Provider } = context;\n\n/**\n * @returns the current user interaction mode\n */\nexport function useUserInteractionMode(): UserInteractionMode {\n return useContext(context).mode;\n}\n\n/** @internal */\nconst TOUCH_TIMEOUT = 1200;\n\nexport interface UserInteractionModeProviderProps {\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This component is used to determine how a user is interacting with your app\n * to update component functionality and applying the following class names to\n * the `document.body`:\n *\n * - `\"rmd-mouse-mode\"`\n * - `\"rmd-keyboard-mode\"`\n * - `\"rmd-touch-mode\"`\n *\n * Within `react-md`, these classes are used for the following behavior:\n * - only display `:focus` outlines while in `\"rmd-keyboard-mode\"`\n * - do not display `:hover` effects while in `\"rmd-touch-mode\"`\n *\n * @example Mount at the root of your app\n * ```tsx\n * import { createRoot } from \"react-dom/client\";\n * import { UserInteractionModeProvider } from \"@react-md/core\";\n * import App from \"./App\":\n *\n * const container = document.getElementById(\"root\");\n * const root = createRoot(container);\n *\n * root.render(\n * <UserInteractionModeProvider>\n * <App />\n * </UserInteractionModeProvider>\n * );\n * ```\n *\n * @throws \"The `UserInteractionModeProvider` cannot be mounted multiple times.\"\n * if this component is mounted multiple times in your app.\n */\nexport function UserInteractionModeProvider(\n props: UserInteractionModeProviderProps\n): ReactElement {\n const { children } = props;\n const { __root } = useContext(context);\n if (__root) {\n throw new Error(\n \"The `UserInteractionModeProvider` cannot be mounted multiple times.\"\n );\n }\n\n const [mode, setMode] = useState<UserInteractionMode>(\"mouse\");\n const lastTouchTime = useRef(0);\n const isTouchContextMenu = useRef(false);\n\n /**\n * This effect helps determine the current interaction mode by attaching the\n * required event listeners to the window. The `mode` will always be defaulted\n * to `mouse` at first since it has the least possibilities of causing errors\n * with styles since the mouse-only styles are normally just `:hover` effects.\n *\n * ## Switching between modes:\n *\n * ### While in `mouse` mode:\n *\n * - any `keydown` event will switch to `keyboard` mode\n * - this does have the side effect of meta keys also causing the switch over,\n * but it feels fine since it helps show the current focus in the document\n * as well\n * - any `touchstart` event will switch to `touch` mode\n *\n * ### While in `keyboard` mode:\n *\n * - any `mousedown` event will switch to `mouse` mode\n * - it is perfectly okay to move the mouse while in keyboard mode, but still\n * want to keep the keyboard styles until the user actually starts clicking\n * - any `touchstart` event will switch to `touch` mode\n *\n * ### While in `touch` mode:\n *\n * - any `mousemove` event will switch to `mouse` mode, but **only** if there\n * hasn't been a `contextmenu` event within the last `1.2s`\n * - you can really only switch back to `mouse` mode if you are using the\n * devtools to emulate devices OR using a touch-desktop. I don't know how\n * common this really is though.\n * - touching the screen will always fire a `mousemove` event (which is why\n * the `:hover` styles are normally with `rmd-utils-mouse-only`) and even\n * after the `contextmenu` event. Normally want to go back to `mouse` mode\n * when the mouse re-enters the `window`\n *\n * Note: It's currently impossible to switch from `touch` to `keyboard`\n * immediately. You'd first need to switch to `mouse` and then to `keyboard`. I\n * don't really know of any use-cases other than the weird touch-desktop stuff\n * and I have no experience using them.\n */\n useEffect(() => {\n const enableMouseMode = (): void => {\n setMode(\"mouse\");\n };\n const enableKeyboardMode = (): void => {\n setMode(\"keyboard\");\n };\n\n const handleTouchStart = (): void => {\n lastTouchTime.current = Date.now();\n isTouchContextMenu.current = false;\n setMode(\"touch\");\n };\n\n const handleMouseMove = (): void => {\n if (\n isTouchContextMenu.current ||\n Date.now() - lastTouchTime.current < TOUCH_TIMEOUT\n ) {\n isTouchContextMenu.current = false;\n return;\n }\n\n enableMouseMode();\n };\n const handleContextMenu = (): void => {\n isTouchContextMenu.current = true;\n };\n\n const className = `rmd-${mode}-mode`;\n document.body.classList.add(className);\n window.addEventListener(\"touchstart\", handleTouchStart, true);\n if (mode === \"mouse\") {\n window.addEventListener(\"keydown\", enableKeyboardMode, true);\n } else if (mode === \"keyboard\") {\n window.addEventListener(\"mousedown\", enableMouseMode, true);\n } else {\n window.addEventListener(\"mousemove\", handleMouseMove, true);\n window.addEventListener(\"contextmenu\", handleContextMenu, true);\n }\n\n return () => {\n document.body.classList.remove(className);\n window.removeEventListener(\"touchstart\", handleTouchStart, true);\n if (mode === \"mouse\") {\n window.removeEventListener(\"keydown\", enableKeyboardMode, true);\n } else if (mode === \"keyboard\") {\n window.removeEventListener(\"mousedown\", enableMouseMode, true);\n } else {\n window.removeEventListener(\"mousemove\", handleMouseMove, true);\n window.removeEventListener(\"contextmenu\", handleContextMenu, true);\n }\n };\n }, [mode]);\n\n const value = useMemo<UserInteractionModeContext>(\n () => ({\n mode,\n __root: true,\n }),\n [mode]\n );\n return <Provider value={value}>{children}</Provider>;\n}\n"],"names":["createContext","useContext","useEffect","useMemo","useRef","useState","context","__root","mode","displayName","Provider","useUserInteractionMode","TOUCH_TIMEOUT","UserInteractionModeProvider","props","children","Error","setMode","lastTouchTime","isTouchContextMenu","enableMouseMode","enableKeyboardMode","handleTouchStart","current","Date","now","handleMouseMove","handleContextMenu","className","document","body","classList","add","window","addEventListener","remove","removeEventListener","value"],"mappings":"AAAA;;AACA,SACEA,aAAa,EACbC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QAGH,QAAQ;AAiBf,MAAMC,wBAAUN,cAA0C;IACxDO,QAAQ;IACRC,MAAM;AACR;AACAF,QAAQG,WAAW,GAAG;AACtB,MAAM,EAAEC,QAAQ,EAAE,GAAGJ;AAErB;;CAEC,GACD,OAAO,SAASK;IACd,OAAOV,WAAWK,SAASE,IAAI;AACjC;AAEA,cAAc,GACd,MAAMI,gBAAgB;AAMtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCC,GACD,OAAO,SAASC,4BACdC,KAAuC;IAEvC,MAAM,EAAEC,QAAQ,EAAE,GAAGD;IACrB,MAAM,EAAEP,MAAM,EAAE,GAAGN,WAAWK;IAC9B,IAAIC,QAAQ;QACV,MAAM,IAAIS,MACR;IAEJ;IAEA,MAAM,CAACR,MAAMS,QAAQ,GAAGZ,SAA8B;IACtD,MAAMa,gBAAgBd,OAAO;IAC7B,MAAMe,qBAAqBf,OAAO;IAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCC,GACDF,UAAU;QACR,MAAMkB,kBAAkB;YACtBH,QAAQ;QACV;QACA,MAAMI,qBAAqB;YACzBJ,QAAQ;QACV;QAEA,MAAMK,mBAAmB;YACvBJ,cAAcK,OAAO,GAAGC,KAAKC,GAAG;YAChCN,mBAAmBI,OAAO,GAAG;YAC7BN,QAAQ;QACV;QAEA,MAAMS,kBAAkB;YACtB,IACEP,mBAAmBI,OAAO,IAC1BC,KAAKC,GAAG,KAAKP,cAAcK,OAAO,GAAGX,eACrC;gBACAO,mBAAmBI,OAAO,GAAG;gBAC7B;YACF;YAEAH;QACF;QACA,MAAMO,oBAAoB;YACxBR,mBAAmBI,OAAO,GAAG;QAC/B;QAEA,MAAMK,YAAY,CAAC,IAAI,EAAEpB,KAAK,KAAK,CAAC;QACpCqB,SAASC,IAAI,CAACC,SAAS,CAACC,GAAG,CAACJ;QAC5BK,OAAOC,gBAAgB,CAAC,cAAcZ,kBAAkB;QACxD,IAAId,SAAS,SAAS;YACpByB,OAAOC,gBAAgB,CAAC,WAAWb,oBAAoB;QACzD,OAAO,IAAIb,SAAS,YAAY;YAC9ByB,OAAOC,gBAAgB,CAAC,aAAad,iBAAiB;QACxD,OAAO;YACLa,OAAOC,gBAAgB,CAAC,aAAaR,iBAAiB;YACtDO,OAAOC,gBAAgB,CAAC,eAAeP,mBAAmB;QAC5D;QAEA,OAAO;YACLE,SAASC,IAAI,CAACC,SAAS,CAACI,MAAM,CAACP;YAC/BK,OAAOG,mBAAmB,CAAC,cAAcd,kBAAkB;YAC3D,IAAId,SAAS,SAAS;gBACpByB,OAAOG,mBAAmB,CAAC,WAAWf,oBAAoB;YAC5D,OAAO,IAAIb,SAAS,YAAY;gBAC9ByB,OAAOG,mBAAmB,CAAC,aAAahB,iBAAiB;YAC3D,OAAO;gBACLa,OAAOG,mBAAmB,CAAC,aAAaV,iBAAiB;gBACzDO,OAAOG,mBAAmB,CAAC,eAAeT,mBAAmB;YAC/D;QACF;IACF,GAAG;QAACnB;KAAK;IAET,MAAM6B,QAAQlC,QACZ,IAAO,CAAA;YACLK;YACAD,QAAQ;QACV,CAAA,GACA;QAACC;KAAK;IAER,qBAAO,KAACE;QAAS2B,OAAOA;kBAAQtB;;AAClC"}
|