@react-md/core 1.0.0-next.16 → 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/_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 -90
- package/dist/app-bar/AppBar.js +1 -40
- package/dist/app-bar/AppBar.js.map +1 -1
- package/dist/app-bar/AppBarTitle.d.ts +1 -27
- package/dist/app-bar/AppBarTitle.js +1 -15
- 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.scss +93 -2
- package/dist/badge/Badge.d.ts +1 -20
- package/dist/badge/Badge.js +1 -14
- 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.js +2 -1
- 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/_button.scss +157 -25
- package/dist/card/Card.d.ts +16 -0
- package/dist/card/Card.js +11 -3
- package/dist/card/Card.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 -1
- package/dist/chip/Chip.js +2 -1
- 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/FixedDialog.d.ts +1 -3
- package/dist/dialog/FixedDialog.js +0 -8
- package/dist/dialog/FixedDialog.js.map +1 -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 -11
- 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/ExpansionPanel.d.ts +1 -1
- package/dist/expansion-panel/ExpansionPanel.js.map +1 -1
- package/dist/expansion-panel/_expansion-panel.scss +5 -1
- 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/FormMessage.js.map +1 -1
- package/dist/form/FormMessageContainer.js +4 -2
- package/dist/form/FormMessageContainer.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.js.map +1 -1
- package/dist/form/Label.js +2 -2
- package/dist/form/Label.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/MenuItemTextField.js +1 -2
- package/dist/form/MenuItemTextField.js.map +1 -1
- package/dist/form/NativeSelect.js +7 -4
- 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/Select.d.ts +2 -2
- package/dist/form/Select.js +81 -85
- package/dist/form/Select.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/SliderThumb.d.ts +3 -3
- package/dist/form/SliderThumb.js.map +1 -1
- package/dist/form/SliderValueMarks.d.ts +2 -2
- package/dist/form/SliderValueMarks.js.map +1 -1
- package/dist/form/SliderValueTooltip.js.map +1 -1
- package/dist/form/TextArea.js +1 -2
- package/dist/form/TextArea.js.map +1 -1
- package/dist/form/TextField.js +1 -2
- package/dist/form/TextField.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/_icon.scss +151 -2
- 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.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/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/useLayoutAppBarHeight.d.ts +2 -3
- package/dist/layout/useLayoutAppBarHeight.js.map +1 -1
- package/dist/layout/useTemporaryLayout.d.ts +2 -2
- package/dist/layout/useTemporaryLayout.js.map +1 -1
- package/dist/link/SkipToMainContent.js.map +1 -1
- package/dist/list/ListItem.d.ts +2 -1
- package/dist/list/ListItem.js +2 -1
- package/dist/list/ListItem.js.map +1 -1
- 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/_list.scss +6 -5
- package/dist/media-queries/_media-queries.scss +12 -0
- package/dist/media-queries/appSize.js.map +1 -1
- package/dist/media-queries/useMediaQuery.js +3 -1
- 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/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/movement/types.d.ts +5 -5
- package/dist/movement/types.js.map +1 -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/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 -3
- 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/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 -19
- package/dist/responsive-item/ResponsiveItemOverlay.js +1 -12
- 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/_segmented-button.scss +6 -6
- package/dist/sheet/_sheet.scss +18 -6
- 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 -5
- package/dist/snackbar/useCurrentToastActions.js.map +1 -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 +2 -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 +1 -1
- package/dist/tabs/TabListScrollButton.js.map +1 -1
- package/dist/tabs/_tabs.scss +30 -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/tabStyles.d.ts +3 -0
- package/dist/tabs/tabStyles.js.map +1 -1
- package/dist/tabs/useTabList.d.ts +1 -8
- package/dist/tabs/useTabList.js +1 -0
- package/dist/tabs/useTabList.js.map +1 -1
- package/dist/tabs/useTabs.d.ts +6 -6
- 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/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 -35
- 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/_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/TreeItem.d.ts +2 -1
- package/dist/tree/TreeItem.js +4 -3
- 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/useTreeExpansion.d.ts +1 -1
- package/dist/tree/useTreeExpansion.js +6 -18
- package/dist/tree/useTreeExpansion.js.map +1 -1
- package/dist/tree/useTreeSelection.d.ts +1 -1
- 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/WritingDirectionProvider.d.ts +1 -1
- 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 +1 -1
- package/dist/useResizeListener.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 +3 -3
- 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 +37 -15
- package/dist/window-splitter/WindowSplitter.js +38 -17
- 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 +24 -23
- package/src/app-bar/AppBar.tsx +1 -170
- package/src/app-bar/AppBarTitle.tsx +1 -44
- 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/badge/Badge.tsx +1 -39
- package/src/badge/styles.ts +45 -0
- package/src/box/Box.tsx +11 -9
- package/src/box/styles.ts +14 -5
- package/src/button/AsyncButton.tsx +1 -1
- package/src/button/Button.tsx +5 -1
- package/src/card/Card.tsx +35 -4
- package/src/card/ClickableCard.tsx +9 -2
- package/src/card/styles.ts +1 -10
- package/src/chip/Chip.tsx +6 -1
- package/src/chip/styles.ts +12 -10
- package/src/delegateEvent.ts +5 -5
- package/src/dialog/Dialog.tsx +48 -61
- package/src/dialog/FixedDialog.tsx +1 -11
- package/src/dialog/styles.ts +97 -0
- package/src/divider/Divider.tsx +0 -12
- 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/ExpansionPanel.tsx +1 -1
- 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/FormMessageContainer.tsx +2 -2
- package/src/form/InputToggle.tsx +5 -1
- package/src/form/Label.tsx +18 -18
- 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 -10
- package/src/form/Option.tsx +74 -22
- package/src/form/Select.tsx +89 -85
- package/src/form/Slider.tsx +14 -11
- package/src/form/SliderThumb.tsx +4 -4
- package/src/form/SliderValueMarks.tsx +4 -4
- package/src/form/TextArea.tsx +6 -8
- package/src/form/TextField.tsx +0 -2
- 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/iconConfig.tsx +12 -0
- 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/useExpandableLayout.ts +3 -3
- package/src/layout/useLayoutAppBarHeight.ts +3 -4
- package/src/layout/useTemporaryLayout.ts +2 -2
- package/src/list/ListItem.tsx +5 -1
- package/src/list/ListItemLink.tsx +5 -1
- package/src/media-queries/useMediaQuery.ts +2 -1
- package/src/menu/Menu.tsx +11 -3
- 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/NavItemButton.tsx +2 -1
- package/src/navigation/NavItemLink.tsx +11 -3
- package/src/navigation/NavSubheader.tsx +1 -1
- 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/responsive-item/ResponsiveItem.tsx +96 -0
- package/src/responsive-item/ResponsiveItemOverlay.tsx +6 -46
- 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/snackbar/ToastManager.tsx +16 -5
- package/src/snackbar/useCurrentToastActions.ts +5 -5
- package/src/table/tableCellStyles.ts +10 -6
- package/src/tabs/Tab.tsx +4 -1
- package/src/tabs/TabList.tsx +2 -2
- package/src/tabs/TabListScrollButton.tsx +4 -4
- package/src/tabs/getTabListScrollToOptions.ts +37 -0
- package/src/tabs/tabStyles.ts +4 -0
- package/src/tabs/useTabList.ts +2 -9
- package/src/tabs/useTabs.ts +6 -6
- package/src/tabs/utils.ts +0 -38
- 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/types.ts +1 -1
- package/src/transition/useCarousel.ts +3 -3
- package/src/transition/useTransition.ts +1 -0
- package/src/tree/TreeItem.tsx +7 -1
- package/src/tree/TreeItemExpander.tsx +1 -1
- package/src/tree/useTreeExpansion.ts +7 -25
- package/src/tree/useTreeSelection.ts +8 -32
- package/src/tree/utils.ts +6 -2
- package/src/types.ts +20 -4
- package/src/typography/WritingDirectionProvider.tsx +1 -1
- 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 +1 -1
- package/src/useThrottledFunction.ts +6 -9
- package/src/useToggle.ts +3 -3
- 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 +38 -43
- package/src/window-splitter/styles.ts +42 -0
- 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 -14
- package/dist/dialog/DialogContainer.js +0 -20
- 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 -115
- package/dist/responsive-item/ResponsiveItemContainer.js +0 -80
- 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/src/autocomplete/FilterAutocompleteOptions.tsx +0 -86
- package/src/dialog/DialogContainer.tsx +0 -28
- package/src/form/useListboxProvider.ts +0 -45
- package/src/navigation/getHrefFromParents.ts +0 -15
- package/src/responsive-item/ResponsiveItemContainer.tsx +0 -174
- package/src/responsive-item/styles.ts +0 -58
- /package/dist/theme/{usePrefersColorScheme.d.ts → usePrefersDarkScheme.d.ts} +0 -0
- /package/src/theme/{usePrefersColorScheme.ts → usePrefersDarkScheme.ts} +0 -0
package/dist/_utils.scss
CHANGED
|
@@ -3,37 +3,58 @@
|
|
|
3
3
|
@use "sass:meta";
|
|
4
4
|
@use "sass:string";
|
|
5
5
|
|
|
6
|
+
// Set this to `true` if you do not need to support RTL languages
|
|
6
7
|
$disable-rtl: false !default;
|
|
8
|
+
|
|
9
|
+
// Set this to `true` if you want to disable build-time validation for
|
|
10
|
+
// overriding react-md values. No idea why you would want this though.
|
|
7
11
|
$disable-validation: false !default;
|
|
8
|
-
|
|
9
|
-
//
|
|
10
|
-
//
|
|
12
|
+
|
|
13
|
+
// Set this to `true` to remove the `:has` selectors in the code if you need to
|
|
14
|
+
// support older browsers even though I don't really support older browsers.
|
|
11
15
|
$disable-has-selectors: false !default;
|
|
12
|
-
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
// Defaulting to `:focus-visible`, but allowing the keyboard-only styles as well
|
|
16
|
-
// if users are more familiar with it
|
|
16
|
+
|
|
17
|
+
// Set this to `true` if focus styles should be applied with
|
|
18
|
+
// `.rmd-keyboard-mode :focus` instead of `:focus-visible`.
|
|
17
19
|
$disable-focus-visible: false !default;
|
|
20
|
+
|
|
21
|
+
// The default z-index to use for temporary elements
|
|
18
22
|
$temporary-element-z-index: 30 !default;
|
|
19
23
|
|
|
24
|
+
// @internal
|
|
20
25
|
$_swappable-positions: top right bottom left;
|
|
26
|
+
// @internal
|
|
21
27
|
$_swappable-position-prefixes: border margin padding;
|
|
28
|
+
// @internal
|
|
22
29
|
$_swappable-properties: text-align;
|
|
23
30
|
|
|
31
|
+
// This function can be used to offset `position: fixed` or `position: absolute`
|
|
32
|
+
// elements by the current scrollbar size. The variable will only be set while
|
|
33
|
+
// the `useScrollLock` hook has been triggered.
|
|
34
|
+
//
|
|
35
|
+
// @example
|
|
36
|
+
// ```scss
|
|
37
|
+
// @use "@react-md/core";
|
|
38
|
+
//
|
|
39
|
+
// .selector {
|
|
40
|
+
// margin-right: core.scrollbar-size();
|
|
41
|
+
// }
|
|
42
|
+
// ```
|
|
43
|
+
//
|
|
44
|
+
// @returns {string} `var(--rmd-scrollbar-size, 0px)`}
|
|
24
45
|
@function scrollbar-size() {
|
|
25
46
|
@return var(--rmd-scrollbar-size, 0px);
|
|
26
47
|
}
|
|
27
48
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
49
|
+
// Replace `$search` with `$replace` in `$string`
|
|
50
|
+
//
|
|
51
|
+
// @author Hugo Giraudel
|
|
52
|
+
// @internal
|
|
53
|
+
// @param {string} string - Initial string
|
|
54
|
+
// @param {string} search - Substring to replace
|
|
55
|
+
// @param {string} replace - New value
|
|
56
|
+
// @returns {string} Updated string
|
|
57
|
+
// @link https://css-tricks.com/snippets/sass/str-replace-function Source from CSS Tricks
|
|
37
58
|
@function str-replace($string, $search, $replace) {
|
|
38
59
|
$index: string.index($string, $search);
|
|
39
60
|
|
|
@@ -49,10 +70,22 @@ $_swappable-properties: text-align;
|
|
|
49
70
|
@return $string;
|
|
50
71
|
}
|
|
51
72
|
|
|
73
|
+
// Used to negate a number or a variable that might be a `var` statement.
|
|
74
|
+
//
|
|
75
|
+
// @param {string} css-variable - The `var()` or number to negate.
|
|
76
|
+
// @returns {string} `calc(-1 * #{$css-variable})`}
|
|
52
77
|
@function negate-var($css-variable) {
|
|
53
78
|
@return calc(-1 * #{$css-variable});
|
|
54
79
|
}
|
|
55
80
|
|
|
81
|
+
// Internal validation function to ensure the user overrides variables with
|
|
82
|
+
// accepted values.
|
|
83
|
+
//
|
|
84
|
+
// @param {List|Map} list-or-map - The list or map to validate against
|
|
85
|
+
// @param {string|number} key-or-value - Either the map key or list value to
|
|
86
|
+
// check if exists
|
|
87
|
+
// @param {string} error-message - The additional error message to display
|
|
88
|
+
// @returns {any} the value from the list or map
|
|
56
89
|
@function validate($list-or-map, $key-or-value, $error-message) {
|
|
57
90
|
$type: meta.type-of($list-or-map);
|
|
58
91
|
$is-map: $type == map;
|
|
@@ -74,6 +107,13 @@ $_swappable-properties: text-align;
|
|
|
74
107
|
@return if($is-list, $key-or-value, map.get($list-or-map, $key-or-value));
|
|
75
108
|
}
|
|
76
109
|
|
|
110
|
+
// Used to get a custom property variable name.
|
|
111
|
+
//
|
|
112
|
+
// @internal
|
|
113
|
+
// @param {List} variables - The list of available variables
|
|
114
|
+
// @param {string} name - The variable name
|
|
115
|
+
// @param {string} group - The variable group. i.e. button, form, app-bar
|
|
116
|
+
// @returns {string} the name to be used in a `var()`
|
|
77
117
|
@function get-var-name($variables, $name, $group) {
|
|
78
118
|
@if $group == icon {
|
|
79
119
|
@if $name == symbol-grade {
|
|
@@ -131,6 +171,40 @@ $_swappable-properties: text-align;
|
|
|
131
171
|
@return "--rmd-" + $prefix + validate($variables, $name, $group + " var");
|
|
132
172
|
}
|
|
133
173
|
|
|
174
|
+
// Converts a `property: value` map into styles. Also supports custom selectors.
|
|
175
|
+
//
|
|
176
|
+
// Note: If the styles include complex selectors like `.parent &`, it will need
|
|
177
|
+
// to be the last mixin in the current block or wrap other styles in `& {}`
|
|
178
|
+
//
|
|
179
|
+
// @example Simple Example
|
|
180
|
+
// ```scss
|
|
181
|
+
// $styles: (
|
|
182
|
+
// background-color: red,
|
|
183
|
+
// color: blue,
|
|
184
|
+
// padding: 0.25rem,
|
|
185
|
+
// );
|
|
186
|
+
// .container {
|
|
187
|
+
// @include core.map-to-styles($styles);
|
|
188
|
+
// }
|
|
189
|
+
// ```
|
|
190
|
+
//
|
|
191
|
+
// @example Selectors
|
|
192
|
+
// ```scss
|
|
193
|
+
// $styles: (
|
|
194
|
+
// background-color: red,
|
|
195
|
+
//
|
|
196
|
+
// '&:hover': (
|
|
197
|
+
// background-color: orange,
|
|
198
|
+
// color: red,
|
|
199
|
+
// ),
|
|
200
|
+
// );
|
|
201
|
+
//
|
|
202
|
+
// .container {
|
|
203
|
+
// @include core.map-to-styles($styles);
|
|
204
|
+
// }
|
|
205
|
+
// ```
|
|
206
|
+
//
|
|
207
|
+
// @param {Map} map - the map of styles to generate
|
|
134
208
|
@mixin map-to-styles($map) {
|
|
135
209
|
@each $property, $value in $map {
|
|
136
210
|
@if meta.type-of($value) == map {
|
|
@@ -143,6 +217,31 @@ $_swappable-properties: text-align;
|
|
|
143
217
|
}
|
|
144
218
|
}
|
|
145
219
|
|
|
220
|
+
// Used to convert a map into a css animation
|
|
221
|
+
//
|
|
222
|
+
// @example
|
|
223
|
+
// ```scss
|
|
224
|
+
// $animation: (
|
|
225
|
+
// 0%: (
|
|
226
|
+
// opacity: 0.06,
|
|
227
|
+
// ),
|
|
228
|
+
// 60%: (
|
|
229
|
+
// opacity: 0.1,
|
|
230
|
+
// ),
|
|
231
|
+
// 80%: (
|
|
232
|
+
// opacity: 0.08,
|
|
233
|
+
// ),
|
|
234
|
+
// 100%: (
|
|
235
|
+
// opacity: 0.06,
|
|
236
|
+
// ),
|
|
237
|
+
// );
|
|
238
|
+
//
|
|
239
|
+
// @include core.keyframes(my-animation) {
|
|
240
|
+
// @include core.map-to-animation($animation);
|
|
241
|
+
// }
|
|
242
|
+
// ```
|
|
243
|
+
//
|
|
244
|
+
// @param {Map} map - the map of animation styles to generate
|
|
146
245
|
@mixin map-to-animation($map) {
|
|
147
246
|
@each $percentage, $styles in $map {
|
|
148
247
|
#{$percentage} {
|
|
@@ -151,6 +250,24 @@ $_swappable-properties: text-align;
|
|
|
151
250
|
}
|
|
152
251
|
}
|
|
153
252
|
|
|
253
|
+
// Generates a pseudo element with most used styles.
|
|
254
|
+
//
|
|
255
|
+
// @example
|
|
256
|
+
// ```scss
|
|
257
|
+
// .container {
|
|
258
|
+
// @include core.pseudo-element;
|
|
259
|
+
//
|
|
260
|
+
// position: relative;
|
|
261
|
+
// }
|
|
262
|
+
// ```
|
|
263
|
+
//
|
|
264
|
+
// @param {number} z-index - The z-index for the pseudo element.
|
|
265
|
+
// @param {boolean} fixed - Set to `true` to change from `position: absolute`
|
|
266
|
+
// to `position: fixed`
|
|
267
|
+
// @param {number} inset - Used to apply any inset styles from the parent
|
|
268
|
+
// element.
|
|
269
|
+
// @param {string} border-radius - You normally want to inherit the
|
|
270
|
+
// `border-radius`, but it can be configured with this param if needed.
|
|
154
271
|
@mixin pseudo-element(
|
|
155
272
|
$z-index: 0,
|
|
156
273
|
$fixed: false,
|
|
@@ -165,6 +282,7 @@ $_swappable-properties: text-align;
|
|
|
165
282
|
z-index: $z-index;
|
|
166
283
|
}
|
|
167
284
|
|
|
285
|
+
// @internal
|
|
168
286
|
@mixin _sr-only-focusable {
|
|
169
287
|
&:active,
|
|
170
288
|
&:focus {
|
|
@@ -178,6 +296,16 @@ $_swappable-properties: text-align;
|
|
|
178
296
|
}
|
|
179
297
|
}
|
|
180
298
|
|
|
299
|
+
// Generates styles to create a screen-reader only visible element but can also
|
|
300
|
+
// allow the element to be visible to everyone while focused.
|
|
301
|
+
//
|
|
302
|
+
// You'll normally just want to use the `SrOnly` component or `cssUtils` instead
|
|
303
|
+
// of this mixin.
|
|
304
|
+
//
|
|
305
|
+
// @param {boolean} focusable - Set to `true` to update the element so
|
|
306
|
+
// it will become visible to everyone while focused
|
|
307
|
+
// @param {string} focus-selector - A selector to show that the
|
|
308
|
+
// element has been focused
|
|
181
309
|
@mixin sr-only($focusable: false, $focus-selector: "&--focusable") {
|
|
182
310
|
border: 0;
|
|
183
311
|
clip: rect(1px, 1px, 1px, 1px);
|
|
@@ -201,6 +329,10 @@ $_swappable-properties: text-align;
|
|
|
201
329
|
}
|
|
202
330
|
}
|
|
203
331
|
|
|
332
|
+
// Used to hide the scrollbar for an element while still remaining scrollable.
|
|
333
|
+
//
|
|
334
|
+
// NOTE: This is generally not recommended for accessibility since most users do
|
|
335
|
+
// not know how to scroll without a visible scrollbar
|
|
204
336
|
@mixin hide-scrollbar {
|
|
205
337
|
scrollbar-width: none;
|
|
206
338
|
|
|
@@ -210,12 +342,21 @@ $_swappable-properties: text-align;
|
|
|
210
342
|
}
|
|
211
343
|
}
|
|
212
344
|
|
|
345
|
+
// Mostly an internal mixin for generating styles that might be created from a CSS
|
|
346
|
+
// module. This really just wraps the provided selector in `:global` and
|
|
347
|
+
// wrapping the rest of the content in `:local`.
|
|
348
|
+
//
|
|
349
|
+
// @param {string} selector - The selector that should not be affected by CSS
|
|
350
|
+
// module behavior
|
|
351
|
+
// @param {boolean} css-modules - Set to `true` when used within a CSS Module
|
|
352
|
+
// @param {boolean} parent-selector - Updates the selector to end with ` &` so
|
|
353
|
+
// it inherits the current scope
|
|
213
354
|
@mixin optional-css-modules(
|
|
214
|
-
$
|
|
355
|
+
$selector,
|
|
215
356
|
$css-modules: false,
|
|
216
357
|
$parent-selector: true
|
|
217
358
|
) {
|
|
218
|
-
$selector: if($css-modules, ":global #{$
|
|
359
|
+
$selector: if($css-modules, ":global #{$selector} :local", $selector);
|
|
219
360
|
$selector: if($parent-selector, "#{$selector} &", $selector);
|
|
220
361
|
|
|
221
362
|
#{$selector} {
|
|
@@ -223,6 +364,23 @@ $_swappable-properties: text-align;
|
|
|
223
364
|
}
|
|
224
365
|
}
|
|
225
366
|
|
|
367
|
+
// Used to apply styles when using rtl behavior
|
|
368
|
+
//
|
|
369
|
+
// Note: This will need to be included at the end of a block with the new Sass
|
|
370
|
+
// rules or prefix styles with `& {}`
|
|
371
|
+
//
|
|
372
|
+
// @example
|
|
373
|
+
// ```scss
|
|
374
|
+
// .selector {
|
|
375
|
+
// margin-right: 1rem;
|
|
376
|
+
//
|
|
377
|
+
// // swap the margin in RTL
|
|
378
|
+
// @include core.rtl {
|
|
379
|
+
// margin-left: 1rem;
|
|
380
|
+
// margin-right: auto;
|
|
381
|
+
// }
|
|
382
|
+
// }
|
|
383
|
+
// ```
|
|
226
384
|
@mixin rtl {
|
|
227
385
|
@if not $disable-rtl {
|
|
228
386
|
[dir="rtl"] & {
|
|
@@ -231,7 +389,13 @@ $_swappable-properties: text-align;
|
|
|
231
389
|
}
|
|
232
390
|
}
|
|
233
391
|
|
|
234
|
-
|
|
392
|
+
// This isn't really used anymore after the latest Sass changes since CSS will
|
|
393
|
+
// natively support nesting.
|
|
394
|
+
//
|
|
395
|
+
// @internal
|
|
396
|
+
// @param {string} property - The property to swap
|
|
397
|
+
// @returns {string} the swapped property
|
|
398
|
+
@function swap-position($property) {
|
|
235
399
|
$prefix: "";
|
|
236
400
|
$position: $property;
|
|
237
401
|
@each $valid-prefix in $_swappable-position-prefixes {
|
|
@@ -254,58 +418,21 @@ $_swappable-properties: text-align;
|
|
|
254
418
|
$next-position: top;
|
|
255
419
|
}
|
|
256
420
|
|
|
257
|
-
@return
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
@mixin auto-rtl-group($styles, $swapped-styles: ()) {
|
|
261
|
-
@include map-to-styles($styles);
|
|
262
|
-
@include rtl {
|
|
263
|
-
@each $property, $value in $styles {
|
|
264
|
-
$inversed-property: _swap-position($property);
|
|
265
|
-
$inversed-value: auto;
|
|
266
|
-
@if map.has-key($swapped-styles, $property) {
|
|
267
|
-
$inversed-value: map.get($swapped-styles, $property);
|
|
268
|
-
} @else if map.has-key($styles, $inversed-property) {
|
|
269
|
-
$inversed-value: map.get($swapped-styles, $inversed-property);
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
#{$property}: #{$inversed-value};
|
|
273
|
-
#{$inversed-property}: #{$value};
|
|
274
|
-
|
|
275
|
-
@content;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
@mixin auto-rtl($property, $value, $swapped-value: null) {
|
|
281
|
-
@include rtl {
|
|
282
|
-
@if list.index($_swappable-properties, $property) {
|
|
283
|
-
$swapped-property-value: $swapped-value or _swap-position($value);
|
|
284
|
-
#{$property}: #{$swapped-property-value};
|
|
285
|
-
} @else {
|
|
286
|
-
$inversed-property: _swap-position($property);
|
|
287
|
-
@if not $swapped-value {
|
|
288
|
-
$swapped-value: auto;
|
|
289
|
-
|
|
290
|
-
@each $prefix in $_swappable-position-prefixes {
|
|
291
|
-
@if string.index($property, "#{$prefix}-") {
|
|
292
|
-
$swapped-value: 0;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
#{$property}: #{$swapped-value};
|
|
298
|
-
#{$inversed-property}: #{$value};
|
|
299
|
-
}
|
|
300
|
-
@content;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
#{$property}: #{$value};
|
|
421
|
+
@return #{$prefix}#{$next-position};
|
|
304
422
|
}
|
|
305
423
|
|
|
424
|
+
// Used to apply styles only while the user is using a keyboard. This relies on
|
|
425
|
+
// the `UserInteractionModeProvider` to work correctly.
|
|
426
|
+
//
|
|
427
|
+
// Note: This will need to be included at the end of a block with the new Sass
|
|
428
|
+
// rules or prefix styles with `& {}`
|
|
429
|
+
//
|
|
430
|
+
// @param {boolean} css-modules - Set to `true` when used within a CSS Module
|
|
431
|
+
// @param {boolean} parent-selector - Updates the selector to end with ` &` so
|
|
432
|
+
// it inherits the current scope
|
|
306
433
|
@mixin keyboard-only($css-modules: false, $parent-selector: true) {
|
|
307
434
|
@include optional-css-modules(
|
|
308
|
-
".keyboard-mode",
|
|
435
|
+
".rmd-keyboard-mode",
|
|
309
436
|
$css-modules,
|
|
310
437
|
$parent-selector
|
|
311
438
|
) {
|
|
@@ -313,18 +440,60 @@ $_swappable-properties: text-align;
|
|
|
313
440
|
}
|
|
314
441
|
}
|
|
315
442
|
|
|
316
|
-
|
|
317
|
-
|
|
443
|
+
// Used to apply styles only while the user is using a mouse. This relies on
|
|
444
|
+
// the `UserInteractionModeProvider` to work correctly.
|
|
445
|
+
//
|
|
446
|
+
// Note: This will need to be included at the end of a block with the new Sass
|
|
447
|
+
// rules or prefix styles with `& {}`
|
|
448
|
+
//
|
|
449
|
+
// @param {boolean} css-modules - Set to `true` when used within a CSS Module
|
|
450
|
+
// @param {boolean} parent-selector - Updates the selector to end with ` &` so
|
|
451
|
+
// it inherits the current scope
|
|
452
|
+
@mixin mouse-only($css-modules: false, $parent-selector: true) {
|
|
453
|
+
@include optional-css-modules(
|
|
454
|
+
".rmd-mouse-mode",
|
|
455
|
+
$css-modules,
|
|
456
|
+
$parent-selector
|
|
457
|
+
) {
|
|
318
458
|
@content;
|
|
319
459
|
}
|
|
320
460
|
}
|
|
321
461
|
|
|
322
|
-
|
|
323
|
-
|
|
462
|
+
// Used to apply styles only while the user is using a touch device. This relies
|
|
463
|
+
// on the `UserInteractionModeProvider` to work correctly.
|
|
464
|
+
//
|
|
465
|
+
// Note: This will need to be included at the end of a block with the new Sass
|
|
466
|
+
// rules or prefix styles with `& {}`
|
|
467
|
+
//
|
|
468
|
+
// @param {boolean} css-modules - Set to `true` when used within a CSS Module
|
|
469
|
+
// @param {boolean} parent-selector - Updates the selector to end with ` &` so
|
|
470
|
+
// it inherits the current scope
|
|
471
|
+
@mixin touch-only($css-modules: false, $parent-selector: true) {
|
|
472
|
+
@include optional-css-modules(
|
|
473
|
+
".rmd-touch-mode",
|
|
474
|
+
$css-modules,
|
|
475
|
+
$parent-selector
|
|
476
|
+
) {
|
|
324
477
|
@content;
|
|
325
478
|
}
|
|
326
479
|
}
|
|
327
480
|
|
|
481
|
+
// A helper mixin to apply hover styles only when the user is using a mouse. If
|
|
482
|
+
// you just use `:hover`, the styles will also be applied after touching an
|
|
483
|
+
// element on touch screens until another element is focused.
|
|
484
|
+
//
|
|
485
|
+
// @example
|
|
486
|
+
// ```scss
|
|
487
|
+
// .selector {
|
|
488
|
+
//
|
|
489
|
+
// @include core.mouse-hover {
|
|
490
|
+
// background-color: red;
|
|
491
|
+
// }
|
|
492
|
+
// }
|
|
493
|
+
// ```
|
|
494
|
+
//
|
|
495
|
+
// @param {boolean} wrap-in-hover - Set this to `false` if the content should
|
|
496
|
+
// not automatically be wrapped in `&:hover`
|
|
328
497
|
@mixin mouse-hover($wrap-in-hover: true) {
|
|
329
498
|
@media (hover: hover) and (pointer: fine) {
|
|
330
499
|
@if $wrap-in-hover {
|
|
@@ -337,6 +506,11 @@ $_swappable-properties: text-align;
|
|
|
337
506
|
}
|
|
338
507
|
}
|
|
339
508
|
|
|
509
|
+
// An internal helper to dynamically wrap the CSS in a `@layer`.
|
|
510
|
+
//
|
|
511
|
+
// @param {string} name - The layer name to use
|
|
512
|
+
// @param {boolean} disabled - Set to `true` if the content should not be
|
|
513
|
+
// wrapped in the layer.
|
|
340
514
|
@mixin optional-layer($name, $disabled) {
|
|
341
515
|
@if $disabled {
|
|
342
516
|
@content;
|
package/dist/app-bar/AppBar.d.ts
CHANGED
|
@@ -1,94 +1,5 @@
|
|
|
1
1
|
import { type ElementType, type HTMLAttributes, type Ref } from "react";
|
|
2
|
-
import { type
|
|
3
|
-
import { type BackgroundColor } from "../cssUtils.js";
|
|
4
|
-
import { type CssPosition } from "../types.js";
|
|
5
|
-
declare module "react" {
|
|
6
|
-
interface CSSProperties {
|
|
7
|
-
"--rmd-app-bar-height"?: string | number;
|
|
8
|
-
"--rmd-app-bar-background-color"?: string;
|
|
9
|
-
"--rmd-app-bar-color"?: string;
|
|
10
|
-
"--rmd-app-bar-surface-background-color"?: string;
|
|
11
|
-
"--rmd-app-bar-surface-color"?: string;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
export type AppBarPosition = "top" | "bottom";
|
|
15
|
-
/**
|
|
16
|
-
* - `"clear"` - the background color will be transparent
|
|
17
|
-
* - `"primary"` - defaults to the current primary theme color
|
|
18
|
-
* - `"secondary"` - defaults to the current secondary theme color
|
|
19
|
-
* - `"surface"` - this will use the current surface background color which
|
|
20
|
-
* defaults to `#fff` for light themes, `#242424` for dark themes, and
|
|
21
|
-
* `#424242` for dark themes when the `$disable-dark-elevation` is set to
|
|
22
|
-
* `true`
|
|
23
|
-
*
|
|
24
|
-
* The default dark theme surface color also depends on the `$fixed-elevation`
|
|
25
|
-
* value.
|
|
26
|
-
*/
|
|
27
|
-
export type AppBarTheme = BackgroundColor | "clear";
|
|
28
|
-
/**
|
|
29
|
-
* - `"auto"` - the height will be determined by the height of the content
|
|
30
|
-
* - `"normal"` - defaults to `3.5rem` (`$height`)
|
|
31
|
-
* - `"prominent"` - defaults to `7rem` (`$prominent-height`)
|
|
32
|
-
* - `"dense"` - defaults to `3rem` (`$dense-height`)
|
|
33
|
-
* - `"prominent-dense"` - defaults to `6rem` (`$prominent-dense-height`)
|
|
34
|
-
*/
|
|
35
|
-
export type AppBarHeight = "auto" | "normal" | "prominent" | "dense" | "prominent-dense";
|
|
36
|
-
/** @since 6.0.0 */
|
|
37
|
-
export interface AppBarClassNameOptions extends Omit<BoxOptions, "fullWidth"> {
|
|
38
|
-
className?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Set this to `"fixed"` or `"sticky"` to set `position: fixed;` or
|
|
41
|
-
* `position: sticky;` to the app bar. The default position will be static and
|
|
42
|
-
* inline with other content.
|
|
43
|
-
*
|
|
44
|
-
* @defaultValue `'static'`
|
|
45
|
-
*/
|
|
46
|
-
position?: CssPosition;
|
|
47
|
-
/**
|
|
48
|
-
* The position within the page to "fix" the `AppBar` when the `fixed` prop is
|
|
49
|
-
* enabled.
|
|
50
|
-
*
|
|
51
|
-
* @defaultValue `"top"`
|
|
52
|
-
*/
|
|
53
|
-
pagePosition?: AppBarPosition;
|
|
54
|
-
/**
|
|
55
|
-
* Set this to `true` to remove the box-shadow.
|
|
56
|
-
*
|
|
57
|
-
* @defaultValue `false`
|
|
58
|
-
*/
|
|
59
|
-
disableElevation?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* The theme to apply to the `AppBar`.
|
|
62
|
-
*
|
|
63
|
-
* @defaultValue `"primary"`
|
|
64
|
-
* @see {@link AppBarTheme}
|
|
65
|
-
*/
|
|
66
|
-
theme?: AppBarTheme;
|
|
67
|
-
/**
|
|
68
|
-
* @defaultValue `stacked ? "auto" : "normal"`
|
|
69
|
-
* @see {@link AppBarHeight}
|
|
70
|
-
*/
|
|
71
|
-
height?: AppBarHeight;
|
|
72
|
-
/** @see {@link CssUtilsOptions.surfaceColor} */
|
|
73
|
-
surfaceColor?: "light" | "dark";
|
|
74
|
-
/**
|
|
75
|
-
* Set this to `true` if the app bar's positioning and width should be
|
|
76
|
-
* changed whenever the scrollbar is visible on the page. This defaults to
|
|
77
|
-
* `true` when the {@link position} prop is `true` so that once dialogs and menus
|
|
78
|
-
* become visible the contents in the app bar do not need to be repainted.
|
|
79
|
-
*
|
|
80
|
-
* @since 6.0.0
|
|
81
|
-
* @defaultValue `position === "fixed"`
|
|
82
|
-
*/
|
|
83
|
-
scrollbarOffset?: boolean;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Apply the `className`s for a tree component. This will be type-safe if using
|
|
87
|
-
* typescript.
|
|
88
|
-
*
|
|
89
|
-
* @since 6.0.0
|
|
90
|
-
*/
|
|
91
|
-
export declare function appBar(options?: AppBarClassNameOptions): string;
|
|
2
|
+
import { type AppBarClassNameOptions } from "./styles.js";
|
|
92
3
|
/** @since 6.0.0 */
|
|
93
4
|
export type CustomAppBarComponent = ElementType<HTMLAttributes<HTMLDivElement> & {
|
|
94
5
|
ref?: Ref<HTMLDivElement>;
|
package/dist/app-bar/AppBar.js
CHANGED
|
@@ -1,45 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cnb } from "cnbuilder";
|
|
3
2
|
import { forwardRef } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import { cssUtils } from "../cssUtils.js";
|
|
6
|
-
import { bem } from "../utils/bem.js";
|
|
7
|
-
const styles = bem("rmd-app-bar");
|
|
8
|
-
/**
|
|
9
|
-
* Apply the `className`s for a tree component. This will be type-safe if using
|
|
10
|
-
* typescript.
|
|
11
|
-
*
|
|
12
|
-
* @since 6.0.0
|
|
13
|
-
*/ export function appBar(options = {}) {
|
|
14
|
-
const { className, theme = "primary", stacked, height = stacked ? "auto" : "normal", position = "static", pagePosition = "top", scrollbarOffset = position === "fixed", align, grid, gridColumns, gridName, justify, reversed, surfaceColor, disableWrap = true, disablePadding, disableElevation } = options;
|
|
15
|
-
const surface = theme === "surface";
|
|
16
|
-
const clear = theme === "clear";
|
|
17
|
-
return cnb(styles({
|
|
18
|
-
surface,
|
|
19
|
-
[height]: height !== "normal",
|
|
20
|
-
fixed: position !== "static",
|
|
21
|
-
stacked,
|
|
22
|
-
sticky: position === "sticky",
|
|
23
|
-
[pagePosition]: position !== "static",
|
|
24
|
-
elevated: position !== "static" && !disableElevation,
|
|
25
|
-
"scrollbar-offset": scrollbarOffset,
|
|
26
|
-
"static-scrollbar-offset": position === "static" && scrollbarOffset
|
|
27
|
-
}), box({
|
|
28
|
-
align,
|
|
29
|
-
stacked,
|
|
30
|
-
fullWidth: true,
|
|
31
|
-
grid,
|
|
32
|
-
gridColumns,
|
|
33
|
-
gridName,
|
|
34
|
-
justify,
|
|
35
|
-
reversed,
|
|
36
|
-
disableWrap,
|
|
37
|
-
disablePadding
|
|
38
|
-
}), cssUtils({
|
|
39
|
-
backgroundColor: !surface && !clear ? theme : undefined,
|
|
40
|
-
surfaceColor
|
|
41
|
-
}), className);
|
|
42
|
-
}
|
|
3
|
+
import { appBar } from "./styles.js";
|
|
43
4
|
/**
|
|
44
5
|
* @example Simple Example
|
|
45
6
|
* ```tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/app-bar/AppBar.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/app-bar/AppBar.tsx"],"sourcesContent":["import {\n forwardRef,\n type ElementType,\n type HTMLAttributes,\n type Ref,\n} from \"react\";\nimport { appBar, type AppBarClassNameOptions } from \"./styles.js\";\n\n/** @since 6.0.0 */\nexport type CustomAppBarComponent = ElementType<\n HTMLAttributes<HTMLDivElement> & {\n ref?: Ref<HTMLDivElement>;\n className: string;\n }\n>;\n\n/**\n * @since 6.0.0 Renamed the `component` prop to `as` and updated the default\n * value to be a `\"div\"` when `fixed` is `false`.\n * @since 6.0.0 Renamed the `fixedElevation` prop to `disableFixedElevation` to\n * match naming conventions when a feature is enabled by default.\n * @since 6.0.0 Removed the `inheritColor` and `flexWrap` props since they are\n * no longer required.\n * @since 6.0.0 Removed the `fixed` prop in favor of the new `position` prop\n * which enables position `fixed` or `sticky` behavior.\n * @since 6.0.0 Added the {@link stacked} and {@link scrollbarOffset} props.\n */\nexport interface AppBarProps\n extends HTMLAttributes<HTMLDivElement>,\n AppBarClassNameOptions {\n /** @defaultValue `fixed ? \"header\" : \"div\"` */\n as?: CustomAppBarComponent;\n}\n\n/**\n * @example Simple Example\n * ```tsx\n * import { AppBar, AppBarTitle, Button } from \"@react-md/core\";\n * import MenuIcon from \"@react-md/material-icons/MenuIcon\";\n * import MoreVertIcon from \"@react-md/material-icons/MoreVertIcon\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <AppBar>\n * <Button aria-label=\"Navigation\"><MenuIcon /></Button>\n * <AppBarTitle>My Main Title</AppBarTitle>\n * <Button aria-label=\"Options\"><MoreVertIcon /></Button>\n * </AppBar>\n * );\n * }\n * ```\n *\n * @since 6.0.0 The `AppBar` was updated to use `gap` for spacing\n * instead of requiring the `AppBarNav` and `AppBarAction` components.\n */\nexport const AppBar = forwardRef<HTMLDivElement, AppBarProps>(\n function AppBar(props, ref) {\n const {\n className,\n theme,\n stacked,\n height,\n align,\n grid,\n gridName,\n justify,\n reversed,\n gridColumns,\n disableWrap,\n disablePadding,\n position,\n pagePosition,\n surfaceColor,\n scrollbarOffset,\n disableElevation,\n as: Component = position ? \"header\" : \"div\",\n children,\n ...remaining\n } = props;\n\n return (\n <Component\n {...remaining}\n className={appBar({\n className,\n theme,\n position,\n pagePosition,\n disableElevation,\n scrollbarOffset,\n height,\n grid,\n gridName,\n gridColumns,\n align,\n stacked,\n justify,\n reversed,\n surfaceColor,\n disableWrap,\n disablePadding,\n })}\n ref={ref}\n >\n {children}\n </Component>\n );\n }\n);\n"],"names":["forwardRef","appBar","AppBar","props","ref","className","theme","stacked","height","align","grid","gridName","justify","reversed","gridColumns","disableWrap","disablePadding","position","pagePosition","surfaceColor","scrollbarOffset","disableElevation","as","Component","children","remaining"],"mappings":";AAAA,SACEA,UAAU,QAIL,QAAQ;AACf,SAASC,MAAM,QAAqC,cAAc;AA4BlE;;;;;;;;;;;;;;;;;;;;;CAqBC,GACD,OAAO,MAAMC,uBAASF,WACpB,SAASE,OAAOC,KAAK,EAAEC,GAAG;IACxB,MAAM,EACJC,SAAS,EACTC,KAAK,EACLC,OAAO,EACPC,MAAM,EACNC,KAAK,EACLC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,WAAW,EACXC,cAAc,EACdC,QAAQ,EACRC,YAAY,EACZC,YAAY,EACZC,eAAe,EACfC,gBAAgB,EAChBC,IAAIC,YAAYN,WAAW,WAAW,KAAK,EAC3CO,QAAQ,EACR,GAAGC,WACJ,GAAGtB;IAEJ,qBACE,KAACoB;QACE,GAAGE,SAAS;QACbpB,WAAWJ,OAAO;YAChBI;YACAC;YACAW;YACAC;YACAG;YACAD;YACAZ;YACAE;YACAC;YACAG;YACAL;YACAF;YACAK;YACAC;YACAM;YACAJ;YACAC;QACF;QACAZ,KAAKA;kBAEJoB;;AAGP,GACA"}
|
|
@@ -1,33 +1,7 @@
|
|
|
1
1
|
import { type TextOverflow } from "../cssUtils.js";
|
|
2
2
|
import { type TypographyProps } from "../typography/Typography.js";
|
|
3
3
|
import { type TypographyType } from "../typography/typographyStyles.js";
|
|
4
|
-
|
|
5
|
-
* - `"small"` - the first character in the title will be `1rem` (`$keyline`)
|
|
6
|
-
* from the edge of the app bar horizontally
|
|
7
|
-
* - `"nav"` - this should be set when there is a nav button before the title so
|
|
8
|
-
* that the first character in the title will be `4.5rem` (`title-keyline`)
|
|
9
|
-
* - `"list"` - this should be used when the title should align with the list
|
|
10
|
-
* item keyline and there is no nav icon before.
|
|
11
|
-
*
|
|
12
|
-
* @since 6.0.0
|
|
13
|
-
*/
|
|
14
|
-
export type AppBarTitleKeyline = "small" | "nav" | "list";
|
|
15
|
-
/** @since 6.0.0 */
|
|
16
|
-
export interface AppBarTitleClassNameOptions {
|
|
17
|
-
className?: string;
|
|
18
|
-
/**
|
|
19
|
-
* @defaultValue `"small"`
|
|
20
|
-
* @see {@link AppBarTitleKeyline}
|
|
21
|
-
*/
|
|
22
|
-
keyline?: AppBarTitleKeyline;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Apply the `className`s for a `AppBarTitle` component. This will be type-safe
|
|
26
|
-
* if using typescript.
|
|
27
|
-
*
|
|
28
|
-
* @since 6.0.0
|
|
29
|
-
*/
|
|
30
|
-
export declare function appBarTitle(options?: AppBarTitleClassNameOptions): string;
|
|
4
|
+
import { type AppBarTitleClassNameOptions } from "./styles.js";
|
|
31
5
|
/**
|
|
32
6
|
* @since 6.0.0 The `keyline` prop was changed from a boolean to a type
|
|
33
7
|
* union of different keylines: {@link AppBarTitleKeyline}
|