@react-md/core 1.0.0-next.15 → 1.0.0-next.16
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/app-bar/AppBar.d.ts +0 -2
- package/dist/app-bar/AppBar.js +0 -2
- package/dist/app-bar/AppBar.js.map +1 -1
- package/dist/app-bar/AppBarTitle.d.ts +0 -3
- package/dist/app-bar/AppBarTitle.js +0 -2
- package/dist/app-bar/AppBarTitle.js.map +1 -1
- 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/badge/Badge.d.ts +1 -3
- package/dist/badge/Badge.js +0 -2
- package/dist/badge/Badge.js.map +1 -1
- package/dist/box/Box.d.ts +0 -2
- package/dist/box/Box.js +0 -2
- package/dist/box/Box.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/card/Card.d.ts +0 -2
- package/dist/card/Card.js +0 -2
- 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/chip/Chip.d.ts +0 -2
- package/dist/chip/Chip.js +0 -2
- package/dist/chip/Chip.js.map +1 -1
- package/dist/dialog/DialogContainer.d.ts +0 -2
- package/dist/dialog/DialogContainer.js +0 -2
- package/dist/dialog/DialogContainer.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/NestedDialogProvider.d.ts +0 -1
- package/dist/divider/Divider.d.ts +0 -2
- package/dist/divider/Divider.js +0 -2
- package/dist/divider/Divider.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 +8 -24
- 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/expansionPanelStyles.d.ts +19 -0
- package/dist/expansion-panel/expansionPanelStyles.js +14 -0
- package/dist/expansion-panel/expansionPanelStyles.js.map +1 -0
- 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 +0 -1
- 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.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 +0 -2
- 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/MenuItemCheckbox.d.ts +0 -1
- package/dist/form/MenuItemRadio.d.ts +0 -1
- package/dist/form/MenuItemSwitch.d.ts +0 -1
- package/dist/form/NativeSelect.d.ts +0 -2
- package/dist/form/NativeSelect.js +0 -2
- package/dist/form/NativeSelect.js.map +1 -1
- package/dist/form/Option.js.map +1 -1
- package/dist/form/Radio.d.ts +0 -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/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/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 +0 -2
- package/dist/form/SliderValueMarks.js +0 -2
- package/dist/form/SliderValueMarks.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/TextField.d.ts +0 -2
- package/dist/form/TextField.js +0 -2
- 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/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 +2 -2
- 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/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/useHorizontalLayoutTransition.js +1 -1
- package/dist/layout/useHorizontalLayoutTransition.js.map +1 -1
- package/dist/layout/useLayoutTree.d.ts +2 -2
- package/dist/layout/useLayoutTree.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/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 +0 -16
- 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/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/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/appSize.d.ts +5 -5
- package/dist/media-queries/useMediaQuery.d.ts +1 -1
- package/dist/media-queries/useMediaQuery.js +1 -1
- package/dist/media-queries/useMediaQuery.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/useMenuBarProvider.d.ts +0 -1
- package/dist/movement/useKeyboardMovementProvider.d.ts +0 -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/NavSubheader.d.ts +0 -3
- package/dist/navigation/NavSubheader.js +0 -2
- package/dist/navigation/NavSubheader.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/responsive-item/ResponsiveItemContainer.d.ts +0 -2
- package/dist/responsive-item/ResponsiveItemContainer.js +0 -2
- package/dist/responsive-item/ResponsiveItemContainer.js.map +1 -1
- package/dist/responsive-item/ResponsiveItemOverlay.d.ts +0 -2
- package/dist/responsive-item/ResponsiveItemOverlay.js +0 -2
- package/dist/responsive-item/ResponsiveItemOverlay.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/sheet/Sheet.d.ts +30 -16
- package/dist/sheet/Sheet.js +24 -14
- package/dist/sheet/Sheet.js.map +1 -1
- 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.map +1 -1
- package/dist/snackbar/useCurrentToastActions.d.ts +0 -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/tabs/Tab.d.ts +3 -0
- package/dist/tabs/Tab.js.map +1 -1
- package/dist/tabs/TabListScrollButton.js +5 -1
- package/dist/tabs/TabListScrollButton.js.map +1 -1
- package/dist/tabs/_tabs.scss +21 -3
- 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/useTabList.d.ts +2 -0
- package/dist/tabs/useTabList.js +4 -2
- package/dist/tabs/useTabList.js.map +1 -1
- package/dist/tabs/useTabs.d.ts +33 -11
- package/dist/tabs/useTabs.js +9 -3
- package/dist/tabs/useTabs.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/theme/useColorScheme.d.ts +0 -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/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 +10 -3
- package/dist/tree/TreeItem.js +5 -2
- package/dist/tree/TreeItem.js.map +1 -1
- 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 +3 -3
- package/dist/tree/useTreeExpansion.js.map +1 -1
- package/dist/tree/useTreeSelection.d.ts +3 -3
- package/dist/tree/useTreeSelection.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 +2 -2
- package/dist/typography/WritingDirectionProvider.js +2 -2
- package/dist/typography/WritingDirectionProvider.js.map +1 -1
- package/dist/useResizeListener.d.ts +7 -1
- package/dist/useResizeListener.js.map +1 -1
- package/dist/useResizeObserver.d.ts +3 -3
- package/dist/useResizeObserver.js.map +1 -1
- package/dist/useToggle.d.ts +4 -4
- package/dist/useToggle.js +1 -1
- package/dist/useToggle.js.map +1 -1
- package/dist/window-splitter/WindowSplitter.d.ts +2 -2
- package/dist/window-splitter/WindowSplitter.js +2 -2
- package/dist/window-splitter/WindowSplitter.js.map +1 -1
- package/package.json +15 -15
- package/src/RootHtml.tsx +0 -2
- package/src/app-bar/AppBar.tsx +0 -2
- package/src/app-bar/AppBarTitle.tsx +0 -2
- package/src/avatar/Avatar.tsx +0 -2
- package/src/badge/Badge.tsx +1 -3
- package/src/box/Box.tsx +0 -2
- package/src/button/ButtonUnstyled.tsx +0 -2
- package/src/card/Card.tsx +0 -2
- 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/chip/Chip.tsx +0 -2
- package/src/dialog/DialogContainer.tsx +0 -2
- 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/divider/Divider.tsx +0 -2
- package/src/expansion-panel/ExpansionList.tsx +1 -1
- package/src/expansion-panel/ExpansionPanel.tsx +9 -38
- package/src/expansion-panel/ExpansionPanelHeader.tsx +0 -1
- package/src/expansion-panel/expansionPanelStyles.ts +33 -0
- package/src/form/Fieldset.tsx +0 -2
- package/src/form/FormMessage.tsx +0 -2
- package/src/form/FormMessageContainer.tsx +0 -1
- package/src/form/FormMessageCounter.tsx +0 -2
- package/src/form/InputToggle.tsx +1 -1
- package/src/form/InputToggleIcon.tsx +0 -2
- package/src/form/Label.tsx +0 -2
- package/src/form/Legend.tsx +0 -2
- package/src/form/NativeSelect.tsx +0 -2
- package/src/form/Option.tsx +1 -1
- package/src/form/SelectedOption.tsx +0 -2
- package/src/form/SliderContainer.tsx +0 -2
- package/src/form/SliderMark.tsx +0 -2
- package/src/form/SliderMarkLabel.tsx +0 -2
- package/src/form/SliderTrack.tsx +0 -2
- package/src/form/SliderValueMarks.tsx +0 -2
- package/src/form/Switch.tsx +0 -2
- package/src/form/SwitchTrack.tsx +2 -1
- package/src/form/TextField.tsx +0 -2
- package/src/form/TextFieldAddon.tsx +1 -3
- 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/styles.ts +1 -1
- package/src/interaction/RippleContainer.tsx +0 -2
- package/src/layout/LayoutNav.tsx +3 -2
- package/src/layout/useHorizontalLayoutTransition.ts +1 -1
- package/src/layout/useLayoutTree.ts +2 -2
- package/src/link/Link.tsx +0 -2
- package/src/list/List.tsx +1 -33
- package/src/list/ListItem.tsx +0 -17
- package/src/list/ListItemAddon.tsx +0 -2
- package/src/list/ListItemChildren.tsx +0 -2
- 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 +1 -1
- package/src/menu/MenuConfigurationProvider.tsx +2 -2
- package/src/navigation/NavGroup.tsx +0 -2
- package/src/navigation/NavItem.tsx +0 -2
- package/src/navigation/NavSubheader.tsx +0 -2
- package/src/progress/CircularProgress.tsx +0 -2
- package/src/progress/LinearProgress.tsx +0 -2
- package/src/responsive-item/ResponsiveItemContainer.tsx +0 -2
- package/src/responsive-item/ResponsiveItemOverlay.tsx +0 -2
- package/src/segmented-button/SegmentedButtonContainer.tsx +0 -2
- package/src/sheet/Sheet.tsx +36 -33
- package/src/sheet/styles.ts +50 -0
- package/src/suspense/CircularProgressSuspense.tsx +0 -2
- package/src/suspense/NullSuspense.tsx +0 -2
- package/src/table/TableCellContent.tsx +0 -3
- package/src/tabs/Tab.tsx +3 -0
- package/src/tabs/TabListScrollButton.tsx +9 -2
- package/src/tabs/tabListScrollButtonStyles.ts +9 -5
- package/src/tabs/useTabList.ts +4 -0
- package/src/tabs/useTabs.ts +61 -14
- package/src/test-utils/IntersectionObserver.ts +1 -1
- package/src/transition/SlideContainer.tsx +2 -48
- package/src/tree/DefaultTreeItemRenderer.tsx +3 -4
- package/src/tree/Tree.tsx +4 -6
- package/src/tree/TreeItem.tsx +11 -4
- package/src/tree/types.ts +16 -6
- package/src/tree/useTree.ts +3 -3
- package/src/tree/useTreeExpansion.ts +3 -3
- package/src/tree/useTreeSelection.ts +3 -3
- 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 +2 -2
- package/src/useResizeListener.ts +7 -1
- package/src/useResizeObserver.ts +3 -3
- package/src/useToggle.ts +4 -4
- package/src/window-splitter/WindowSplitter.tsx +2 -2
- 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/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/__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/__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/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/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/__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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/list/ListSubheader.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { ListItemText } from \"./ListItemText.js\";\n\nconst styles = bem(\"rmd-list-subheader\");\n\n/** @since 6.0.0 */\nexport interface ListSubheaderClassNameOptions {\n className?: string;\n\n /**\n * Boolean if the subheader should be inset to match the `ListItem` text\n * keyline.\n *\n * @defaultValue `false`\n */\n inset?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function listSubheader(\n options: ListSubheaderClassNameOptions = {}\n): string {\n const { inset = false, className } = options;\n\n return cnb(styles({ inset }), className);\n}\n\nexport interface ListSubheaderProps\n extends HTMLAttributes<HTMLLIElement>,\n ListSubheaderClassNameOptions {\n /**\n * @defaultValue `\"presentation\"`\n */\n role?: HTMLAttributes<HTMLLIElement>[\"role\"];\n\n /**\n * @since 6.0.0\n */\n textProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n}\n\n/**\n *
|
|
1
|
+
{"version":3,"sources":["../../src/list/ListSubheader.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { ListItemText } from \"./ListItemText.js\";\n\nconst styles = bem(\"rmd-list-subheader\");\n\n/** @since 6.0.0 */\nexport interface ListSubheaderClassNameOptions {\n className?: string;\n\n /**\n * Boolean if the subheader should be inset to match the `ListItem` text\n * keyline.\n *\n * @defaultValue `false`\n */\n inset?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function listSubheader(\n options: ListSubheaderClassNameOptions = {}\n): string {\n const { inset = false, className } = options;\n\n return cnb(styles({ inset }), className);\n}\n\n/**\n * @since 6.0.0 The `role` prop defaults to `\"presentation\"`\n */\nexport interface ListSubheaderProps\n extends HTMLAttributes<HTMLLIElement>,\n ListSubheaderClassNameOptions {\n /**\n * @defaultValue `\"presentation\"`\n */\n role?: HTMLAttributes<HTMLLIElement>[\"role\"];\n\n /**\n * @since 6.0.0\n */\n textProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n}\n\n/**\n * The `ListSubheader` is a wrapper for the `<li>` element to apply subheader\n * typography styles and {@link ListItemText} layout.\n */\nexport const ListSubheader = forwardRef<HTMLLIElement, ListSubheaderProps>(\n function ListSubheader(props, ref) {\n const {\n role = \"presentation\",\n inset = false,\n className,\n children,\n textProps,\n ...remaining\n } = props;\n\n return (\n <li\n {...remaining}\n ref={ref}\n role={role}\n className={listSubheader({\n inset,\n className,\n })}\n >\n <ListItemText {...textProps}>{children}</ListItemText>\n </li>\n );\n }\n);\n"],"names":["cnb","forwardRef","bem","ListItemText","styles","listSubheader","options","inset","className","ListSubheader","props","ref","role","children","textProps","remaining","li"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6B,QAAQ;AAExD,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SAASC,YAAY,QAAQ,oBAAoB;AAEjD,MAAMC,SAASF,IAAI;AAenB;;CAEC,GACD,OAAO,SAASG,cACdC,UAAyC,CAAC,CAAC;IAE3C,MAAM,EAAEC,QAAQ,KAAK,EAAEC,SAAS,EAAE,GAAGF;IAErC,OAAON,IAAII,OAAO;QAAEG;IAAM,IAAIC;AAChC;AAmBA;;;CAGC,GACD,OAAO,MAAMC,8BAAgBR,WAC3B,SAASQ,cAAcC,KAAK,EAAEC,GAAG;IAC/B,MAAM,EACJC,OAAO,cAAc,EACrBL,QAAQ,KAAK,EACbC,SAAS,EACTK,QAAQ,EACRC,SAAS,EACT,GAAGC,WACJ,GAAGL;IAEJ,qBACE,KAACM;QACE,GAAGD,SAAS;QACbJ,KAAKA;QACLC,MAAMA;QACNJ,WAAWH,cAAc;YACvBE;YACAC;QACF;kBAEA,cAAA,KAACL;YAAc,GAAGW,SAAS;sBAAGD;;;AAGpC,GACA"}
|
|
@@ -10,8 +10,8 @@ export interface ListItemHeightOptions extends Pick<ListItemChildrenProps, "left
|
|
|
10
10
|
height?: ListItemHeight;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Gets the expected height for the `ListItem`
|
|
14
|
-
*
|
|
13
|
+
* Gets the expected height for the `ListItem` based on the addons and
|
|
14
|
+
* `secondaryText` props.
|
|
15
15
|
*
|
|
16
16
|
* @see {@link ListItemHeight}
|
|
17
17
|
* @internal
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Gets the expected height for the `ListItem`
|
|
3
|
-
*
|
|
2
|
+
* Gets the expected height for the `ListItem` based on the addons and
|
|
3
|
+
* `secondaryText` props.
|
|
4
4
|
*
|
|
5
5
|
* @see {@link ListItemHeight}
|
|
6
6
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/list/getListItemHeight.ts"],"sourcesContent":["import type { ListItemChildrenProps, ListItemHeight } from \"./types.js\";\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport interface ListItemHeightOptions\n extends Pick<\n ListItemChildrenProps,\n | \"leftAddon\"\n | \"rightAddon\"\n | \"leftAddonType\"\n | \"rightAddonType\"\n | \"secondaryText\"\n > {\n /**\n * @see {@link ListItemHeight}\n */\n height?: ListItemHeight;\n}\n\n/**\n * Gets the expected height for the `ListItem`
|
|
1
|
+
{"version":3,"sources":["../../src/list/getListItemHeight.ts"],"sourcesContent":["import type { ListItemChildrenProps, ListItemHeight } from \"./types.js\";\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport interface ListItemHeightOptions\n extends Pick<\n ListItemChildrenProps,\n | \"leftAddon\"\n | \"rightAddon\"\n | \"leftAddonType\"\n | \"rightAddonType\"\n | \"secondaryText\"\n > {\n /**\n * @see {@link ListItemHeight}\n */\n height?: ListItemHeight;\n}\n\n/**\n * Gets the expected height for the `ListItem` based on the addons and\n * `secondaryText` props.\n *\n * @see {@link ListItemHeight}\n * @internal\n */\nexport function getListItemHeight(\n options: ListItemHeightOptions = {}\n): ListItemHeight {\n const {\n height,\n leftAddon,\n leftAddonType = \"icon\",\n rightAddon,\n rightAddonType = \"icon\",\n secondaryText,\n } = options;\n\n if (height) {\n return height;\n }\n\n const isIcon =\n (leftAddon && leftAddonType === \"icon\") ||\n (rightAddon && rightAddonType === \"icon\");\n const isAvatar =\n (leftAddon && leftAddonType === \"avatar\") ||\n (rightAddon && rightAddonType === \"avatar\");\n const isGraphic =\n (leftAddon &&\n (leftAddonType === \"media\" || leftAddonType === \"large-media\")) ||\n (rightAddon &&\n (rightAddonType === \"media\" || rightAddonType === \"large-media\"));\n\n // secondary text will always be extra large due to the default `line-height`\n if (isGraphic || secondaryText) {\n return \"extra-large\";\n }\n\n if (isAvatar) {\n return \"large\";\n }\n\n if (isIcon) {\n return \"medium\";\n }\n\n return \"normal\";\n}\n"],"names":["getListItemHeight","options","height","leftAddon","leftAddonType","rightAddon","rightAddonType","secondaryText","isIcon","isAvatar","isGraphic"],"mappings":"AAqBA;;;;;;CAMC,GACD,OAAO,SAASA,kBACdC,UAAiC,CAAC,CAAC;IAEnC,MAAM,EACJC,MAAM,EACNC,SAAS,EACTC,gBAAgB,MAAM,EACtBC,UAAU,EACVC,iBAAiB,MAAM,EACvBC,aAAa,EACd,GAAGN;IAEJ,IAAIC,QAAQ;QACV,OAAOA;IACT;IAEA,MAAMM,SACJ,AAACL,aAAaC,kBAAkB,UAC/BC,cAAcC,mBAAmB;IACpC,MAAMG,WACJ,AAACN,aAAaC,kBAAkB,YAC/BC,cAAcC,mBAAmB;IACpC,MAAMI,YACJ,AAACP,aACEC,CAAAA,kBAAkB,WAAWA,kBAAkB,aAAY,KAC7DC,cACEC,CAAAA,mBAAmB,WAAWA,mBAAmB,aAAY;IAElE,6EAA6E;IAC7E,IAAII,aAAaH,eAAe;QAC9B,OAAO;IACT;IAEA,IAAIE,UAAU;QACZ,OAAO;IACT;IAEA,IAAID,QAAQ;QACV,OAAO;IACT;IAEA,OAAO;AACT"}
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ListItemAddonPosition, type ListItemAddonType, type ListItemHeight } from "./types.js";
|
|
2
|
+
declare module "react" {
|
|
3
|
+
interface CSSProperties {
|
|
4
|
+
"--rmd-list-item-keyline"?: string | number;
|
|
5
|
+
"--rmd-list-item-padding-h"?: string | number;
|
|
6
|
+
"--rmd-list-item-padding-v"?: string | number;
|
|
7
|
+
"--rmd-list-item-height"?: string | number;
|
|
8
|
+
"--rmd-list-item-medium-height"?: string | number;
|
|
9
|
+
"--rmd-list-item-large-height"?: string | number;
|
|
10
|
+
"--rmd-list-item-extra-large-height"?: string | number;
|
|
11
|
+
"--rmd-list-item-multiline-clamp"?: string | number;
|
|
12
|
+
"--rmd-list-item-multiline-height"?: string | number;
|
|
13
|
+
"--rmd-list-item-media-size"?: string | number;
|
|
14
|
+
"--rmd-list-item-media-spacing"?: string | number;
|
|
15
|
+
"--rmd-list-item-text-multiline-height"?: string | number;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
2
18
|
/** @since 6.0.0 */
|
|
3
19
|
export interface ListItemClassNameOptions {
|
|
4
20
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/list/listItemStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport
|
|
1
|
+
{"version":3,"sources":["../../src/list/listItemStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport {\n type ListItemAddonPosition,\n type ListItemAddonType,\n type ListItemHeight,\n} from \"./types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-list-item-keyline\"?: string | number;\n \"--rmd-list-item-padding-h\"?: string | number;\n \"--rmd-list-item-padding-v\"?: string | number;\n \"--rmd-list-item-height\"?: string | number;\n \"--rmd-list-item-medium-height\"?: string | number;\n \"--rmd-list-item-large-height\"?: string | number;\n \"--rmd-list-item-extra-large-height\"?: string | number;\n \"--rmd-list-item-multiline-clamp\"?: string | number;\n \"--rmd-list-item-multiline-height\"?: string | number;\n \"--rmd-list-item-media-size\"?: string | number;\n \"--rmd-list-item-media-spacing\"?: string | number;\n \"--rmd-list-item-text-multiline-height\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-list-item\");\n\n/** @since 6.0.0 */\nexport interface ListItemClassNameOptions {\n className?: string;\n /**\n * @see {@link ListItemHeight}\n * @defaultValue `\"auto\"`\n */\n height?: ListItemHeight;\n\n /**\n * @defaultValue `false`\n */\n multiline?: boolean;\n\n /**\n * @defaultValue `false`\n */\n disabled?: boolean;\n\n /**\n * Note: This does nothing if the `disabled` prop is not enabled.\n *\n * @defaultValue `false`\n * @since 2.4.3\n */\n disabledOpacity?: boolean;\n\n /**\n * Set this to `false` if the list item should not gain the interaction\n * states: hover, focus, press, etc. This is kind of like being disabled\n * without the disabled styles being applied.\n *\n * @defaultValue `true`\n */\n clickable?: boolean;\n}\n\n/** @since 6.0.0 */\nexport interface InternalListItemClassNameOptions\n extends ListItemClassNameOptions {\n /**\n * @defaultValue `false`\n */\n link?: boolean;\n\n /**\n * This is prop is used internally when integrating with the\n * {@link useElementInteraction} hook.\n */\n pressedClassName?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport function listItem(\n options: InternalListItemClassNameOptions = {}\n): string {\n const {\n className,\n link = false,\n height = \"auto\",\n clickable = true,\n multiline = false,\n disabled = false,\n disabledOpacity = false,\n pressedClassName,\n } = options;\n\n return cnb(\n styles({\n link,\n [height]: height !== \"auto\",\n multiline,\n \"disabled-color\": disabled && !disabledOpacity,\n \"disabled-opacity\": disabled && disabledOpacity,\n }),\n cssUtils({ surface: clickable }),\n pressedClassName,\n className\n );\n}\n\n/** @since 6.0.0 */\nexport interface ListItemTextClassNameOptions {\n className?: string;\n /**\n * @defaultValue `false`\n */\n clamped?: boolean;\n\n /**\n * @defaultValue `false`\n */\n secondary?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function listItemText(\n options: ListItemTextClassNameOptions = {}\n): string {\n const { className, secondary = false, clamped = false } = options;\n\n return cnb(\n styles(\"text\", {\n clamped: secondary && clamped,\n secondary,\n }),\n className\n );\n}\n\n/** @since 6.0.0 */\nexport interface ListItemAddonClassNameOptions {\n className?: string;\n\n /**\n * The addon type that is used to adjust the spacing styles.\n *\n * @defaultValue `\"icon\"`\n */\n type?: ListItemAddonType;\n\n /**\n * The vertical position to use for the addon.\n *\n * @defaultValue `\"middle\"`\n */\n position?: ListItemAddonPosition;\n\n /**\n * Boolean if the addon should appear after the `children`.\n *\n * @defaultValue `false`\n */\n addonAfter?: boolean;\n\n /**\n * The media items are centered by default using:\n * ```scss\n * align-items: center;\n * display: flex;\n * justify-content: center;\n * ```\n *\n * When this is set to `true`, the flex styles will not be applied.\n *\n * @defaultValue `false`\n * @since 6.0.0\n */\n disableCenteredMedia?: boolean;\n\n /**\n * Set this to `true` to disable the additional spacing applied to the addons\n * that appear before the `children` and the normal `--rmd-text-icon-spacing`\n * value is used instead.\n *\n * @defaultValue `false`\n */\n disableBeforeSpacing?: boolean;\n}\n\n/**\n *\n * @since 6.0.0\n */\nexport function listItemAddon(\n options: ListItemAddonClassNameOptions = {}\n): string {\n const {\n type = \"icon\",\n position = \"middle\",\n className,\n addonAfter = false,\n disableCenteredMedia = false,\n disableBeforeSpacing = false,\n } = options;\n\n const isMedia = type === \"media\" || type === \"large-media\";\n const isAvatar = type === \"avatar\";\n\n return cnb(\n styles(\"addon\", {\n [position]: position !== \"middle\",\n before: !disableBeforeSpacing && !addonAfter,\n \"avatar-before\": !disableBeforeSpacing && !addonAfter && isAvatar,\n media: isMedia,\n \"media-large\": type === \"large-media\",\n \"media-centered\": isMedia && !disableCenteredMedia,\n }),\n className\n );\n}\n"],"names":["cnb","cssUtils","bem","styles","listItem","options","className","link","height","clickable","multiline","disabled","disabledOpacity","pressedClassName","surface","listItemText","secondary","clamped","listItemAddon","type","position","addonAfter","disableCenteredMedia","disableBeforeSpacing","isMedia","isAvatar","before","media"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,GAAG,QAAQ,kBAAkB;AAwBtC,MAAMC,SAASD,IAAI;AAsDnB;;CAEC,GACD,OAAO,SAASE,SACdC,UAA4C,CAAC,CAAC;IAE9C,MAAM,EACJC,SAAS,EACTC,OAAO,KAAK,EACZC,SAAS,MAAM,EACfC,YAAY,IAAI,EAChBC,YAAY,KAAK,EACjBC,WAAW,KAAK,EAChBC,kBAAkB,KAAK,EACvBC,gBAAgB,EACjB,GAAGR;IAEJ,OAAOL,IACLG,OAAO;QACLI;QACA,CAACC,OAAO,EAAEA,WAAW;QACrBE;QACA,kBAAkBC,YAAY,CAACC;QAC/B,oBAAoBD,YAAYC;IAClC,IACAX,SAAS;QAAEa,SAASL;IAAU,IAC9BI,kBACAP;AAEJ;AAgBA;;CAEC,GACD,OAAO,SAASS,aACdV,UAAwC,CAAC,CAAC;IAE1C,MAAM,EAAEC,SAAS,EAAEU,YAAY,KAAK,EAAEC,UAAU,KAAK,EAAE,GAAGZ;IAE1D,OAAOL,IACLG,OAAO,QAAQ;QACbc,SAASD,aAAaC;QACtBD;IACF,IACAV;AAEJ;AAoDA;;;CAGC,GACD,OAAO,SAASY,cACdb,UAAyC,CAAC,CAAC;IAE3C,MAAM,EACJc,OAAO,MAAM,EACbC,WAAW,QAAQ,EACnBd,SAAS,EACTe,aAAa,KAAK,EAClBC,uBAAuB,KAAK,EAC5BC,uBAAuB,KAAK,EAC7B,GAAGlB;IAEJ,MAAMmB,UAAUL,SAAS,WAAWA,SAAS;IAC7C,MAAMM,WAAWN,SAAS;IAE1B,OAAOnB,IACLG,OAAO,SAAS;QACd,CAACiB,SAAS,EAAEA,aAAa;QACzBM,QAAQ,CAACH,wBAAwB,CAACF;QAClC,iBAAiB,CAACE,wBAAwB,CAACF,cAAcI;QACzDE,OAAOH;QACP,eAAeL,SAAS;QACxB,kBAAkBK,WAAW,CAACF;IAChC,IACAhB;AAEJ"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare module "react" {
|
|
2
|
+
interface CSSProperties {
|
|
3
|
+
"--rmd-list-padding-h"?: string | number;
|
|
4
|
+
"--rmd-list-padding-v"?: string | number;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/** @since 6.0.0 */
|
|
8
|
+
export interface ListClassNameOptions {
|
|
9
|
+
className?: string;
|
|
10
|
+
/** @defaultValue `false` */
|
|
11
|
+
dense?: boolean;
|
|
12
|
+
/** @defaultValue `false` */
|
|
13
|
+
horizontal?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @since 6.0.0
|
|
17
|
+
*/
|
|
18
|
+
export declare function list(options?: ListClassNameOptions): string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { cnb } from "cnbuilder";
|
|
2
|
+
import { bem } from "../utils/bem.js";
|
|
3
|
+
const styles = bem("rmd-list");
|
|
4
|
+
/**
|
|
5
|
+
* @since 6.0.0
|
|
6
|
+
*/ export function list(options = {}) {
|
|
7
|
+
const { dense = false, horizontal = false, className } = options;
|
|
8
|
+
return cnb(styles({
|
|
9
|
+
dense,
|
|
10
|
+
horizontal
|
|
11
|
+
}), className);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=listStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/list/listStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-list-padding-h\"?: string | number;\n \"--rmd-list-padding-v\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-list\");\n\n/** @since 6.0.0 */\nexport interface ListClassNameOptions {\n className?: string;\n\n /** @defaultValue `false` */\n dense?: boolean;\n\n /** @defaultValue `false` */\n horizontal?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function list(options: ListClassNameOptions = {}): string {\n const { dense = false, horizontal = false, className } = options;\n\n return cnb(styles({ dense, horizontal }), className);\n}\n"],"names":["cnb","bem","styles","list","options","dense","horizontal","className"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAStC,MAAMC,SAASD,IAAI;AAanB;;CAEC,GACD,OAAO,SAASE,KAAKC,UAAgC,CAAC,CAAC;IACrD,MAAM,EAAEC,QAAQ,KAAK,EAAEC,aAAa,KAAK,EAAEC,SAAS,EAAE,GAAGH;IAEzD,OAAOJ,IAAIE,OAAO;QAAEG;QAAOC;IAAW,IAAIC;AAC5C"}
|
package/dist/list/types.d.ts
CHANGED
|
@@ -126,9 +126,9 @@ export interface ListItemChildrenAddonProps {
|
|
|
126
126
|
*/
|
|
127
127
|
export interface ListItemChildrenTextProps {
|
|
128
128
|
/**
|
|
129
|
-
* The main content to display
|
|
130
|
-
*
|
|
131
|
-
*
|
|
129
|
+
* The main content to display that defaults to being wrapped in the
|
|
130
|
+
* `ListItemText` component. Enable the {@link disableTextChildren} prop to
|
|
131
|
+
* render without the additional `ListItemText` wrapper.
|
|
132
132
|
*/
|
|
133
133
|
children?: ReactNode;
|
|
134
134
|
/**
|
|
@@ -189,5 +189,11 @@ export interface ListItemChildrenTextProps {
|
|
|
189
189
|
*/
|
|
190
190
|
multiline?: boolean;
|
|
191
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* @since 6.0.0 Extends the `ListItemChildrenTextProps` and
|
|
194
|
+
* `ListItemChildrenAddonProps` interfaces.
|
|
195
|
+
* @since 6.0.0 Added `textProps` and `secondaryTextClassName`
|
|
196
|
+
* @since 6.0.0 Renamed `textChildren` to `disableTextChildren`
|
|
197
|
+
*/
|
|
192
198
|
export interface ListItemChildrenProps extends ListItemChildrenTextProps, ListItemChildrenAddonProps {
|
|
193
199
|
}
|
package/dist/list/types.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @since 6.0.0 Extends the `ListItemChildrenTextProps` and
|
|
3
|
+
* `ListItemChildrenAddonProps` interfaces.
|
|
4
|
+
* @since 6.0.0 Added `textProps` and `secondaryTextClassName`
|
|
5
|
+
* @since 6.0.0 Renamed `textChildren` to `disableTextChildren`
|
|
6
|
+
*/ export { };
|
|
2
7
|
|
|
3
8
|
//# sourceMappingURL=types.js.map
|
package/dist/list/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/list/types.ts"],"sourcesContent":["import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\n\n/**\n * The height to apply to the list item.\n *\n * Conversions:\n *\n * - height !== undefined && height !== \"auto\" -> height\n * - secondaryText or left/right addon is media/media-large -> \"extra-large\"\n * - left/right addon is avatar -> \"large\"\n * - left/right addon is icon -> \"medium\"\n * - no addons and no secondary text -> \"normal\"\n */\nexport type ListItemHeight =\n | \"auto\"\n | \"normal\"\n | \"medium\"\n | \"large\"\n | \"extra-large\";\n\nexport type ListItemAddonPosition = \"top\" | \"middle\" | \"bottom\";\nexport type ListItemAddonType = \"icon\" | \"avatar\" | \"media\" | \"large-media\";\n\n/** @since 6.0.0 */\nexport interface ListItemChildrenAddonProps {\n /**\n * An optional addon to display to the left of the `primaryText` or\n * `children` and should be used with the `leftAddonType` prop to adjust\n * spacing.\n */\n leftAddon?: ReactNode;\n\n /**\n * The type of the addon that appears to the left of the `primaryText` or\n * `children`.\n *\n * @defaultValue `\"icon\"`\n */\n leftAddonType?: ListItemAddonType;\n\n /**\n * The vertical position the left icon, avatar, media, or large media\n * should be placed.\n *\n * @defaultValue `\"middle\"`\n */\n leftAddonPosition?: ListItemAddonPosition;\n\n /**\n * @since 6.0.0\n */\n leftAddonClassName?: string;\n\n /**\n * Set this to `true` if your addon does not accept a `className` prop to\n * apply the correct styling.\n *\n * @defaultValue `leftAddonType === \"media\" || leftAddonType === \"large-media\"`\n * @since 6.0.0\n */\n leftAddonForceWrap?: boolean;\n\n /**\n * Set this to `true` to disable the additional spacing applied to the addons\n * that appear before the `children` and the normal `--rmd-text-icon-spacing`\n * value is used instead.\n *\n * @defaultValue `false`\n */\n disableLeftAddonSpacing?: boolean;\n\n /**\n * An optional addon to display to the right of the `primaryText` or\n * `children` and should be used with the `rightAddonType` prop to adjust\n * spacing.\n */\n rightAddon?: ReactNode;\n\n /**\n * The type of the addon that appears to the right of the `primaryText` or\n * `children`.\n *\n * @defaultValue `\"icon\"`\n */\n rightAddonType?: ListItemAddonType;\n\n /**\n * The vertical position the right icon, avatar, media, or large media\n * should be placed.\n *\n * @defaultValue `\"middle\"`\n */\n rightAddonPosition?: ListItemAddonPosition;\n\n /**\n * @since 6.0.0\n */\n rightAddonClassName?: string;\n\n /**\n * Set this to `true` if your addon does not accept a `className` prop to\n * apply the correct styling.\n *\n * @defaultValue `rightAddonType === \"media\" || rightAddonType === \"large-media\"`\n * @since 6.0.0\n */\n rightAddonForceWrap?: boolean;\n\n /**\n * The media items are centered by default using:\n * ```scss\n * align-items: center;\n * display: flex;\n * justify-content: center;\n * ```\n *\n * When this is set to `true`, the flex styles will not be applied.\n *\n * @defaultValue `false`\n * @since 6.0.0\n */\n disableLeftAddonCenteredMedia?: boolean;\n\n /**\n * The media items are centered by default using:\n * ```scss\n * align-items: center;\n * display: flex;\n * justify-content: center;\n * ```\n *\n * When this is set to `true`, the flex styles will not be applied.\n *\n * @defaultValue `false`\n * @since 6.0.0\n */\n disableRightAddonCenteredMedia?: boolean;\n}\n\n/**\n * Note: This interface was added since there are components that replace the\n * {@link ListItemChildrenAddonProps} with renamed versions but should still\n * support everything for rendering text.\n *\n * @since 6.0.0\n */\nexport interface ListItemChildrenTextProps {\n /**\n * The main content to display
|
|
1
|
+
{"version":3,"sources":["../../src/list/types.ts"],"sourcesContent":["import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\n\n/**\n * The height to apply to the list item.\n *\n * Conversions:\n *\n * - height !== undefined && height !== \"auto\" -> height\n * - secondaryText or left/right addon is media/media-large -> \"extra-large\"\n * - left/right addon is avatar -> \"large\"\n * - left/right addon is icon -> \"medium\"\n * - no addons and no secondary text -> \"normal\"\n */\nexport type ListItemHeight =\n | \"auto\"\n | \"normal\"\n | \"medium\"\n | \"large\"\n | \"extra-large\";\n\nexport type ListItemAddonPosition = \"top\" | \"middle\" | \"bottom\";\nexport type ListItemAddonType = \"icon\" | \"avatar\" | \"media\" | \"large-media\";\n\n/** @since 6.0.0 */\nexport interface ListItemChildrenAddonProps {\n /**\n * An optional addon to display to the left of the `primaryText` or\n * `children` and should be used with the `leftAddonType` prop to adjust\n * spacing.\n */\n leftAddon?: ReactNode;\n\n /**\n * The type of the addon that appears to the left of the `primaryText` or\n * `children`.\n *\n * @defaultValue `\"icon\"`\n */\n leftAddonType?: ListItemAddonType;\n\n /**\n * The vertical position the left icon, avatar, media, or large media\n * should be placed.\n *\n * @defaultValue `\"middle\"`\n */\n leftAddonPosition?: ListItemAddonPosition;\n\n /**\n * @since 6.0.0\n */\n leftAddonClassName?: string;\n\n /**\n * Set this to `true` if your addon does not accept a `className` prop to\n * apply the correct styling.\n *\n * @defaultValue `leftAddonType === \"media\" || leftAddonType === \"large-media\"`\n * @since 6.0.0\n */\n leftAddonForceWrap?: boolean;\n\n /**\n * Set this to `true` to disable the additional spacing applied to the addons\n * that appear before the `children` and the normal `--rmd-text-icon-spacing`\n * value is used instead.\n *\n * @defaultValue `false`\n */\n disableLeftAddonSpacing?: boolean;\n\n /**\n * An optional addon to display to the right of the `primaryText` or\n * `children` and should be used with the `rightAddonType` prop to adjust\n * spacing.\n */\n rightAddon?: ReactNode;\n\n /**\n * The type of the addon that appears to the right of the `primaryText` or\n * `children`.\n *\n * @defaultValue `\"icon\"`\n */\n rightAddonType?: ListItemAddonType;\n\n /**\n * The vertical position the right icon, avatar, media, or large media\n * should be placed.\n *\n * @defaultValue `\"middle\"`\n */\n rightAddonPosition?: ListItemAddonPosition;\n\n /**\n * @since 6.0.0\n */\n rightAddonClassName?: string;\n\n /**\n * Set this to `true` if your addon does not accept a `className` prop to\n * apply the correct styling.\n *\n * @defaultValue `rightAddonType === \"media\" || rightAddonType === \"large-media\"`\n * @since 6.0.0\n */\n rightAddonForceWrap?: boolean;\n\n /**\n * The media items are centered by default using:\n * ```scss\n * align-items: center;\n * display: flex;\n * justify-content: center;\n * ```\n *\n * When this is set to `true`, the flex styles will not be applied.\n *\n * @defaultValue `false`\n * @since 6.0.0\n */\n disableLeftAddonCenteredMedia?: boolean;\n\n /**\n * The media items are centered by default using:\n * ```scss\n * align-items: center;\n * display: flex;\n * justify-content: center;\n * ```\n *\n * When this is set to `true`, the flex styles will not be applied.\n *\n * @defaultValue `false`\n * @since 6.0.0\n */\n disableRightAddonCenteredMedia?: boolean;\n}\n\n/**\n * Note: This interface was added since there are components that replace the\n * {@link ListItemChildrenAddonProps} with renamed versions but should still\n * support everything for rendering text.\n *\n * @since 6.0.0\n */\nexport interface ListItemChildrenTextProps {\n /**\n * The main content to display that defaults to being wrapped in the\n * `ListItemText` component. Enable the {@link disableTextChildren} prop to\n * render without the additional `ListItemText` wrapper.\n */\n children?: ReactNode;\n\n /**\n * Any additional props that should be passed to the `<span>` surrounding\n * the {@link children}, {@link primaryText}, and {@link secondaryText}.\n *\n * @since 6.0.0\n */\n textProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n\n /**\n * An optional className to apply to the `<span>` that surrounds the\n * `primaryText` and optionally `secondaryText` within the list item.\n */\n textClassName?: string;\n\n /**\n * An optional className to apply to the `<span>` that surrounds the\n * `secondaryText` within the list item.\n */\n secondaryTextClassName?: string;\n\n /**\n * Set this to `true` if the {@link children} should not automatically be\n * wrapped in the `ListItemText` component.\n *\n * @since 6.0.0 Renamed from `textChildren` since it was defaulted on.\n * @defaultValue `false`\n */\n disableTextChildren?: boolean;\n\n /**\n * An optional element that should be rendered as the `primaryText` within the\n * list item. It is most likely easier to use the `children` prop instead, but\n * this allows you to create more complex components with the `ListItem` since\n * you can provided `children` and have the styles for the `primaryText` still\n * applied. By default, this will only allow one line of text and add ellipsis\n * for any text overflow.\n */\n primaryText?: ReactNode;\n\n /**\n * An optional element that should be rendered as the `secondaryText` within\n * the list item. By default, this will only span one line and add ellipsis\n * for overflow.\n */\n secondaryText?: ReactNode;\n\n /**\n * Any additional props that should be passed to the `<span>` surrounding\n * the {@link secondaryText}.\n *\n * @since 6.0.0\n */\n secondaryTextProps?: PropsWithRef<\n HTMLAttributes<HTMLSpanElement>,\n HTMLSpanElement\n >;\n\n /**\n * Set this to `true` to allow the {@link secondaryText} to span multiple\n * lines and use the CSS clamp after two lines of text are visible. The number\n * of lines can be configured by `core.$list-item-multiline-clamp` or\n * `@include core.list-set-var(item-multiline-clamp, $new-value)`.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-line-clamp}\n * @defaultValue `false`\n */\n multiline?: boolean;\n}\n\n/**\n * @since 6.0.0 Extends the `ListItemChildrenTextProps` and\n * `ListItemChildrenAddonProps` interfaces.\n * @since 6.0.0 Added `textProps` and `secondaryTextClassName`\n * @since 6.0.0 Renamed `textChildren` to `disableTextChildren`\n */\nexport interface ListItemChildrenProps\n extends ListItemChildrenTextProps,\n ListItemChildrenAddonProps {}\n"],"names":[],"mappings":"AAgOA;;;;;CAKC,GACD,WAEiC"}
|
|
@@ -21,10 +21,16 @@ import { type AppSize, type AppSizeQueries } from "./appSize.js";
|
|
|
21
21
|
* @throws "The `AppSizeProvider` has not been mounted."
|
|
22
22
|
*/
|
|
23
23
|
export declare function useAppSize(): Readonly<AppSize>;
|
|
24
|
+
/**
|
|
25
|
+
* @since 6.0.0 Renamed from `AppSizeListenerProps`.
|
|
26
|
+
* @since 6.0.0 Removed the `onChange` prop
|
|
27
|
+
* @since 6.0.0 Renamed `defaultSize` to `ssrSize`
|
|
28
|
+
*/
|
|
24
29
|
export interface AppSizeProviderProps extends AppSizeQueries {
|
|
25
30
|
/**
|
|
26
31
|
* @defaultValue `DEFAULT_APP_SIZE`
|
|
27
32
|
* @see {@link DEFAULT_APP_SIZE}
|
|
33
|
+
* @since 6.0.0
|
|
28
34
|
*/
|
|
29
35
|
ssrSize?: Readonly<AppSize>;
|
|
30
36
|
children: ReactNode;
|
|
@@ -34,5 +40,7 @@ export interface AppSizeProviderProps extends AppSizeQueries {
|
|
|
34
40
|
*
|
|
35
41
|
* This component should be mounted near the root of your app to determine the
|
|
36
42
|
* current app size based on different media queries.
|
|
43
|
+
*
|
|
44
|
+
* @since 6.0.0 Renamed from `AppSizeListener`
|
|
37
45
|
*/
|
|
38
46
|
export declare function AppSizeProvider(props: AppSizeProviderProps): ReactElement;
|
|
@@ -46,6 +46,8 @@ const { Provider } = context;
|
|
|
46
46
|
*
|
|
47
47
|
* This component should be mounted near the root of your app to determine the
|
|
48
48
|
* current app size based on different media queries.
|
|
49
|
+
*
|
|
50
|
+
* @since 6.0.0 Renamed from `AppSizeListener`
|
|
49
51
|
*/ export function AppSizeProvider(props) {
|
|
50
52
|
const { ssrSize = DEFAULT_APP_SIZE, phoneMaxWidth = DEFAULT_PHONE_MAX_WIDTH, tabletMinWidth = DEFAULT_TABLET_MIN_WIDTH, tabletMaxWidth = DEFAULT_TABLET_MAX_WIDTH, desktopMinWidth = DEFAULT_DESKTOP_MIN_WIDTH, desktopLargeMinWidth = DEFAULT_DESKTOP_LARGE_MIN_WIDTH, children } = props;
|
|
51
53
|
const { __root } = useContext(context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/media-queries/AppSizeProvider.tsx"],"sourcesContent":["\"use client\";\nimport {\n createContext,\n useContext,\n useMemo,\n type ReactElement,\n type ReactNode,\n} from \"react\";\nimport { useSsr } from \"../SsrProvider.js\";\nimport { useOrientation } from \"../useOrientation.js\";\nimport {\n DEFAULT_APP_SIZE,\n DEFAULT_DESKTOP_LARGE_MIN_WIDTH,\n DEFAULT_DESKTOP_MIN_WIDTH,\n DEFAULT_PHONE_MAX_WIDTH,\n DEFAULT_TABLET_MAX_WIDTH,\n DEFAULT_TABLET_MIN_WIDTH,\n type AppSize,\n type AppSizeQueries,\n} from \"./appSize.js\";\nimport { useMediaQuery } from \"./useMediaQuery.js\";\n\n/** @internal */\ninterface AppSizeContext extends AppSize {\n __root: boolean;\n}\n\nconst context = createContext<AppSizeContext>({\n __root: false,\n isPhone: false,\n isTablet: false,\n isDesktop: true,\n isLargeDesktop: false,\n isLandscape: true,\n});\ncontext.displayName = \"AppSize\";\nconst { Provider } = context;\n\n/**\n * **Note**: The app size object returned by this hook will **not** be equal\n * between renders.\n *\n * @example Simple Example\n * ```tsx\n * import { useAppSize } from \"@react-md/core\";\n *\n * function Example() {\n * const { isPhone, isTablet, isDesktop, isLargeDesktop, isLandscape } =\n * useAppSize()\n *\n * // do something based on the app size\n * return null;\n * }\n * ```\n *\n * @returns the current app size.\n * @throws \"The `AppSizeProvider` has not been mounted.\"\n */\nexport function useAppSize(): Readonly<AppSize> {\n const { __root, ...appSize } = useContext(context);\n if (!__root) {\n throw new Error(\"The `AppSizeProvider` has not been mounted.\");\n }\n\n return appSize;\n}\n\nexport interface AppSizeProviderProps extends AppSizeQueries {\n /**\n * @defaultValue `DEFAULT_APP_SIZE`\n * @see {@link DEFAULT_APP_SIZE}\n */\n ssrSize?: Readonly<AppSize>;\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This component should be mounted near the root of your app to determine the\n * current app size based on different media queries.\n */\nexport function AppSizeProvider(props: AppSizeProviderProps): ReactElement {\n const {\n ssrSize = DEFAULT_APP_SIZE,\n phoneMaxWidth = DEFAULT_PHONE_MAX_WIDTH,\n tabletMinWidth = DEFAULT_TABLET_MIN_WIDTH,\n tabletMaxWidth = DEFAULT_TABLET_MAX_WIDTH,\n desktopMinWidth = DEFAULT_DESKTOP_MIN_WIDTH,\n desktopLargeMinWidth = DEFAULT_DESKTOP_LARGE_MIN_WIDTH,\n children,\n } = props;\n const { __root } = useContext(context);\n if (__root) {\n throw new Error(\"The `AppSizeProvider` cannot be mounted multiple times.\");\n }\n\n const ssr = useSsr();\n const matchesDesktop = useMediaQuery(\n `screen and (min-width: ${desktopMinWidth})`\n );\n const matchesLargeDesktop = useMediaQuery(\n `screen and (min-width: ${desktopLargeMinWidth})`\n );\n const matchesTablet = useMediaQuery(\n `screen and (min-width: ${tabletMinWidth}) and (max-width: ${tabletMaxWidth})`\n );\n const matchesPhone = useMediaQuery(\n `screen and (max-width: ${phoneMaxWidth})`\n );\n const isDesktop = matchesDesktop;\n const isTablet = !matchesDesktop && matchesTablet;\n const isPhone = !isTablet && !isDesktop && matchesPhone;\n const isLandscape = useOrientation().includes(\"landscape\");\n const isLargeDesktop = matchesLargeDesktop;\n\n const appSize = useMemo<AppSizeContext>(\n () => ({\n __root: true,\n isPhone,\n isTablet,\n isDesktop,\n isLargeDesktop,\n isLandscape,\n }),\n [isDesktop, isLandscape, isLargeDesktop, isPhone, isTablet]\n );\n\n let value = appSize;\n if (ssr || typeof window === \"undefined\") {\n value = {\n __root: true,\n ...ssrSize,\n };\n }\n\n return <Provider value={value}>{children}</Provider>;\n}\n"],"names":["createContext","useContext","useMemo","useSsr","useOrientation","DEFAULT_APP_SIZE","DEFAULT_DESKTOP_LARGE_MIN_WIDTH","DEFAULT_DESKTOP_MIN_WIDTH","DEFAULT_PHONE_MAX_WIDTH","DEFAULT_TABLET_MAX_WIDTH","DEFAULT_TABLET_MIN_WIDTH","useMediaQuery","context","__root","isPhone","isTablet","isDesktop","isLargeDesktop","isLandscape","displayName","Provider","useAppSize","appSize","Error","AppSizeProvider","props","ssrSize","phoneMaxWidth","tabletMinWidth","tabletMaxWidth","desktopMinWidth","desktopLargeMinWidth","children","ssr","matchesDesktop","matchesLargeDesktop","matchesTablet","matchesPhone","includes","value","window"],"mappings":"AAAA;;AACA,SACEA,aAAa,EACbC,UAAU,EACVC,OAAO,QAGF,QAAQ;AACf,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SACEC,gBAAgB,EAChBC,+BAA+B,EAC/BC,yBAAyB,EACzBC,uBAAuB,EACvBC,wBAAwB,EACxBC,wBAAwB,QAGnB,eAAe;AACtB,SAASC,aAAa,QAAQ,qBAAqB;AAOnD,MAAMC,wBAAUZ,cAA8B;IAC5Ca,QAAQ;IACRC,SAAS;IACTC,UAAU;IACVC,WAAW;IACXC,gBAAgB;IAChBC,aAAa;AACf;AACAN,QAAQO,WAAW,GAAG;AACtB,MAAM,EAAEC,QAAQ,EAAE,GAAGR;AAErB;;;;;;;;;;;;;;;;;;;CAmBC,GACD,OAAO,SAASS;IACd,MAAM,EAAER,MAAM,EAAE,GAAGS,SAAS,GAAGrB,WAAWW;IAC1C,IAAI,CAACC,QAAQ;QACX,MAAM,IAAIU,MAAM;IAClB;IAEA,OAAOD;AACT;
|
|
1
|
+
{"version":3,"sources":["../../src/media-queries/AppSizeProvider.tsx"],"sourcesContent":["\"use client\";\nimport {\n createContext,\n useContext,\n useMemo,\n type ReactElement,\n type ReactNode,\n} from \"react\";\nimport { useSsr } from \"../SsrProvider.js\";\nimport { useOrientation } from \"../useOrientation.js\";\nimport {\n DEFAULT_APP_SIZE,\n DEFAULT_DESKTOP_LARGE_MIN_WIDTH,\n DEFAULT_DESKTOP_MIN_WIDTH,\n DEFAULT_PHONE_MAX_WIDTH,\n DEFAULT_TABLET_MAX_WIDTH,\n DEFAULT_TABLET_MIN_WIDTH,\n type AppSize,\n type AppSizeQueries,\n} from \"./appSize.js\";\nimport { useMediaQuery } from \"./useMediaQuery.js\";\n\n/** @internal */\ninterface AppSizeContext extends AppSize {\n __root: boolean;\n}\n\nconst context = createContext<AppSizeContext>({\n __root: false,\n isPhone: false,\n isTablet: false,\n isDesktop: true,\n isLargeDesktop: false,\n isLandscape: true,\n});\ncontext.displayName = \"AppSize\";\nconst { Provider } = context;\n\n/**\n * **Note**: The app size object returned by this hook will **not** be equal\n * between renders.\n *\n * @example Simple Example\n * ```tsx\n * import { useAppSize } from \"@react-md/core\";\n *\n * function Example() {\n * const { isPhone, isTablet, isDesktop, isLargeDesktop, isLandscape } =\n * useAppSize()\n *\n * // do something based on the app size\n * return null;\n * }\n * ```\n *\n * @returns the current app size.\n * @throws \"The `AppSizeProvider` has not been mounted.\"\n */\nexport function useAppSize(): Readonly<AppSize> {\n const { __root, ...appSize } = useContext(context);\n if (!__root) {\n throw new Error(\"The `AppSizeProvider` has not been mounted.\");\n }\n\n return appSize;\n}\n\n/**\n * @since 6.0.0 Renamed from `AppSizeListenerProps`.\n * @since 6.0.0 Removed the `onChange` prop\n * @since 6.0.0 Renamed `defaultSize` to `ssrSize`\n */\nexport interface AppSizeProviderProps extends AppSizeQueries {\n /**\n * @defaultValue `DEFAULT_APP_SIZE`\n * @see {@link DEFAULT_APP_SIZE}\n * @since 6.0.0\n */\n ssrSize?: Readonly<AppSize>;\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This component should be mounted near the root of your app to determine the\n * current app size based on different media queries.\n *\n * @since 6.0.0 Renamed from `AppSizeListener`\n */\nexport function AppSizeProvider(props: AppSizeProviderProps): ReactElement {\n const {\n ssrSize = DEFAULT_APP_SIZE,\n phoneMaxWidth = DEFAULT_PHONE_MAX_WIDTH,\n tabletMinWidth = DEFAULT_TABLET_MIN_WIDTH,\n tabletMaxWidth = DEFAULT_TABLET_MAX_WIDTH,\n desktopMinWidth = DEFAULT_DESKTOP_MIN_WIDTH,\n desktopLargeMinWidth = DEFAULT_DESKTOP_LARGE_MIN_WIDTH,\n children,\n } = props;\n const { __root } = useContext(context);\n if (__root) {\n throw new Error(\"The `AppSizeProvider` cannot be mounted multiple times.\");\n }\n\n const ssr = useSsr();\n const matchesDesktop = useMediaQuery(\n `screen and (min-width: ${desktopMinWidth})`\n );\n const matchesLargeDesktop = useMediaQuery(\n `screen and (min-width: ${desktopLargeMinWidth})`\n );\n const matchesTablet = useMediaQuery(\n `screen and (min-width: ${tabletMinWidth}) and (max-width: ${tabletMaxWidth})`\n );\n const matchesPhone = useMediaQuery(\n `screen and (max-width: ${phoneMaxWidth})`\n );\n const isDesktop = matchesDesktop;\n const isTablet = !matchesDesktop && matchesTablet;\n const isPhone = !isTablet && !isDesktop && matchesPhone;\n const isLandscape = useOrientation().includes(\"landscape\");\n const isLargeDesktop = matchesLargeDesktop;\n\n const appSize = useMemo<AppSizeContext>(\n () => ({\n __root: true,\n isPhone,\n isTablet,\n isDesktop,\n isLargeDesktop,\n isLandscape,\n }),\n [isDesktop, isLandscape, isLargeDesktop, isPhone, isTablet]\n );\n\n let value = appSize;\n if (ssr || typeof window === \"undefined\") {\n value = {\n __root: true,\n ...ssrSize,\n };\n }\n\n return <Provider value={value}>{children}</Provider>;\n}\n"],"names":["createContext","useContext","useMemo","useSsr","useOrientation","DEFAULT_APP_SIZE","DEFAULT_DESKTOP_LARGE_MIN_WIDTH","DEFAULT_DESKTOP_MIN_WIDTH","DEFAULT_PHONE_MAX_WIDTH","DEFAULT_TABLET_MAX_WIDTH","DEFAULT_TABLET_MIN_WIDTH","useMediaQuery","context","__root","isPhone","isTablet","isDesktop","isLargeDesktop","isLandscape","displayName","Provider","useAppSize","appSize","Error","AppSizeProvider","props","ssrSize","phoneMaxWidth","tabletMinWidth","tabletMaxWidth","desktopMinWidth","desktopLargeMinWidth","children","ssr","matchesDesktop","matchesLargeDesktop","matchesTablet","matchesPhone","includes","value","window"],"mappings":"AAAA;;AACA,SACEA,aAAa,EACbC,UAAU,EACVC,OAAO,QAGF,QAAQ;AACf,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SACEC,gBAAgB,EAChBC,+BAA+B,EAC/BC,yBAAyB,EACzBC,uBAAuB,EACvBC,wBAAwB,EACxBC,wBAAwB,QAGnB,eAAe;AACtB,SAASC,aAAa,QAAQ,qBAAqB;AAOnD,MAAMC,wBAAUZ,cAA8B;IAC5Ca,QAAQ;IACRC,SAAS;IACTC,UAAU;IACVC,WAAW;IACXC,gBAAgB;IAChBC,aAAa;AACf;AACAN,QAAQO,WAAW,GAAG;AACtB,MAAM,EAAEC,QAAQ,EAAE,GAAGR;AAErB;;;;;;;;;;;;;;;;;;;CAmBC,GACD,OAAO,SAASS;IACd,MAAM,EAAER,MAAM,EAAE,GAAGS,SAAS,GAAGrB,WAAWW;IAC1C,IAAI,CAACC,QAAQ;QACX,MAAM,IAAIU,MAAM;IAClB;IAEA,OAAOD;AACT;AAiBA;;;;;;;CAOC,GACD,OAAO,SAASE,gBAAgBC,KAA2B;IACzD,MAAM,EACJC,UAAUrB,gBAAgB,EAC1BsB,gBAAgBnB,uBAAuB,EACvCoB,iBAAiBlB,wBAAwB,EACzCmB,iBAAiBpB,wBAAwB,EACzCqB,kBAAkBvB,yBAAyB,EAC3CwB,uBAAuBzB,+BAA+B,EACtD0B,QAAQ,EACT,GAAGP;IACJ,MAAM,EAAEZ,MAAM,EAAE,GAAGZ,WAAWW;IAC9B,IAAIC,QAAQ;QACV,MAAM,IAAIU,MAAM;IAClB;IAEA,MAAMU,MAAM9B;IACZ,MAAM+B,iBAAiBvB,cACrB,CAAC,uBAAuB,EAAEmB,gBAAgB,CAAC,CAAC;IAE9C,MAAMK,sBAAsBxB,cAC1B,CAAC,uBAAuB,EAAEoB,qBAAqB,CAAC,CAAC;IAEnD,MAAMK,gBAAgBzB,cACpB,CAAC,uBAAuB,EAAEiB,eAAe,kBAAkB,EAAEC,eAAe,CAAC,CAAC;IAEhF,MAAMQ,eAAe1B,cACnB,CAAC,uBAAuB,EAAEgB,cAAc,CAAC,CAAC;IAE5C,MAAMX,YAAYkB;IAClB,MAAMnB,WAAW,CAACmB,kBAAkBE;IACpC,MAAMtB,UAAU,CAACC,YAAY,CAACC,aAAaqB;IAC3C,MAAMnB,cAAcd,iBAAiBkC,QAAQ,CAAC;IAC9C,MAAMrB,iBAAiBkB;IAEvB,MAAMb,UAAUpB,QACd,IAAO,CAAA;YACLW,QAAQ;YACRC;YACAC;YACAC;YACAC;YACAC;QACF,CAAA,GACA;QAACF;QAAWE;QAAaD;QAAgBH;QAASC;KAAS;IAG7D,IAAIwB,QAAQjB;IACZ,IAAIW,OAAO,OAAOO,WAAW,aAAa;QACxCD,QAAQ;YACN1B,QAAQ;YACR,GAAGa,OAAO;QACZ;IACF;IAEA,qBAAO,KAACN;QAASmB,OAAOA;kBAAQP;;AAClC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export type QuerySize = number | `${number}${string}`;
|
|
2
2
|
/** @defaultValue `47.9375em` */
|
|
3
|
-
export declare const DEFAULT_PHONE_MAX_WIDTH
|
|
3
|
+
export declare const DEFAULT_PHONE_MAX_WIDTH = "47.9375em";
|
|
4
4
|
/** @defaultValue `48em` */
|
|
5
|
-
export declare const DEFAULT_TABLET_MIN_WIDTH
|
|
5
|
+
export declare const DEFAULT_TABLET_MIN_WIDTH = "48em";
|
|
6
6
|
/** @defaultValue `64em` */
|
|
7
|
-
export declare const DEFAULT_TABLET_MAX_WIDTH
|
|
7
|
+
export declare const DEFAULT_TABLET_MAX_WIDTH = "64em";
|
|
8
8
|
/** @defaultValue `64.0625em` */
|
|
9
|
-
export declare const DEFAULT_DESKTOP_MIN_WIDTH
|
|
9
|
+
export declare const DEFAULT_DESKTOP_MIN_WIDTH = "64.0625em";
|
|
10
10
|
/** @defaultValue `80em` */
|
|
11
|
-
export declare const DEFAULT_DESKTOP_LARGE_MIN_WIDTH
|
|
11
|
+
export declare const DEFAULT_DESKTOP_LARGE_MIN_WIDTH = "80em";
|
|
12
12
|
export interface AppSizeQueries {
|
|
13
13
|
/**
|
|
14
14
|
* The max width to use for phones. This one is a max width unlike the others
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
* @param disabled - When `true`, the `window.matchMedia` API will not be
|
|
16
16
|
* activated and the hook will always return `false`.
|
|
17
17
|
* @returns `true` if the media query matches
|
|
18
|
-
* @since 6.0.0
|
|
18
|
+
* @since 6.0.0 Removed the `defaultValue` and `checkImmediately` options.
|
|
19
19
|
*/
|
|
20
20
|
export declare function useMediaQuery(query: string, disabled?: boolean): boolean;
|
|
@@ -18,7 +18,7 @@ import { useSsr } from "../SsrProvider.js";
|
|
|
18
18
|
* @param disabled - When `true`, the `window.matchMedia` API will not be
|
|
19
19
|
* activated and the hook will always return `false`.
|
|
20
20
|
* @returns `true` if the media query matches
|
|
21
|
-
* @since 6.0.0
|
|
21
|
+
* @since 6.0.0 Removed the `defaultValue` and `checkImmediately` options.
|
|
22
22
|
*/ export function useMediaQuery(query, disabled = false) {
|
|
23
23
|
const ssr = useSsr();
|
|
24
24
|
const [matches, setMatches] = useState(()=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/media-queries/useMediaQuery.ts"],"sourcesContent":["\"use client\";\nimport { useEffect, useState } from \"react\";\nimport { useSsr } from \"../SsrProvider.js\";\n\n/**\n * @example Simple Example\n * ```tsx\n * import { useMediaQuery } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const matches = useMediaQuery(\"screen and (min-width: 768px)\");\n *\n * return <>{matches ? \"Matches\" : \"Doesn't\"}</>;\n * }\n * ```\n *\n * @param query - The media query to use\n * @param disabled - When `true`, the `window.matchMedia` API will not be\n * activated and the hook will always return `false`.\n * @returns `true` if the media query matches\n * @since 6.0.0
|
|
1
|
+
{"version":3,"sources":["../../src/media-queries/useMediaQuery.ts"],"sourcesContent":["\"use client\";\nimport { useEffect, useState } from \"react\";\nimport { useSsr } from \"../SsrProvider.js\";\n\n/**\n * @example Simple Example\n * ```tsx\n * import { useMediaQuery } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const matches = useMediaQuery(\"screen and (min-width: 768px)\");\n *\n * return <>{matches ? \"Matches\" : \"Doesn't\"}</>;\n * }\n * ```\n *\n * @param query - The media query to use\n * @param disabled - When `true`, the `window.matchMedia` API will not be\n * activated and the hook will always return `false`.\n * @returns `true` if the media query matches\n * @since 6.0.0 Removed the `defaultValue` and `checkImmediately` options.\n */\nexport function useMediaQuery(query: string, disabled = false): boolean {\n const ssr = useSsr();\n const [matches, setMatches] = useState(() => {\n if (typeof window === \"undefined\" || disabled || ssr) {\n return false;\n }\n\n return window.matchMedia(query).matches;\n });\n\n useEffect(() => {\n if (disabled || ssr) {\n return;\n }\n\n const result = window.matchMedia(query);\n setMatches(result.matches);\n\n const updater = ({ matches }: MediaQueryListEvent): void =>\n setMatches(matches);\n\n result.addEventListener(\"change\", updater);\n return () => {\n result.removeEventListener(\"change\", updater);\n };\n }, [disabled, query, ssr]);\n\n return matches;\n}\n"],"names":["useEffect","useState","useSsr","useMediaQuery","query","disabled","ssr","matches","setMatches","window","matchMedia","result","updater","addEventListener","removeEventListener"],"mappings":"AAAA;AACA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,QAAQ;AAC5C,SAASC,MAAM,QAAQ,oBAAoB;AAE3C;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,SAASC,cAAcC,KAAa,EAAEC,WAAW,KAAK;IAC3D,MAAMC,MAAMJ;IACZ,MAAM,CAACK,SAASC,WAAW,GAAGP,SAAS;QACrC,IAAI,OAAOQ,WAAW,eAAeJ,YAAYC,KAAK;YACpD,OAAO;QACT;QAEA,OAAOG,OAAOC,UAAU,CAACN,OAAOG,OAAO;IACzC;IAEAP,UAAU;QACR,IAAIK,YAAYC,KAAK;YACnB;QACF;QAEA,MAAMK,SAASF,OAAOC,UAAU,CAACN;QACjCI,WAAWG,OAAOJ,OAAO;QAEzB,MAAMK,UAAU,CAAC,EAAEL,OAAO,EAAuB,GAC/CC,WAAWD;QAEbI,OAAOE,gBAAgB,CAAC,UAAUD;QAClC,OAAO;YACLD,OAAOG,mBAAmB,CAAC,UAAUF;QACvC;IACF,GAAG;QAACP;QAAUD;QAAOE;KAAI;IAEzB,OAAOC;AACT"}
|
package/dist/menu/MenuBar.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/menu/MenuConfigurationProvider.tsx"],"sourcesContent":["\"use client\";\nimport {\n createContext,\n useContext,\n useMemo,\n type ReactElement,\n type ReactNode,\n} from \"react\";\nimport { type SheetPosition, type SheetVerticalSize } from \"../sheet/styles.js\";\n\n/** @since 5.0.0 */\nexport interface MenuOrientationProps {\n /**\n * Boolean if the menu should be rendered horizontally instead of vertically.\n * This will also update the `aria-orientation`.\n *\n * @defaultValue `false`\n */\n horizontal?: boolean;\n}\n\n/**\n * This allows the menu to be conditionally rendered as a `Sheet` instead of a\n * menu.\n *\n * - `false` - always render as a `Menu`\n * - `true` - always render as a `Sheet`\n * - `\"phone\"` - render as a sheet only when the {@link AppSize} is considered\n * phone (`isPhone === true`).\n *\n * @defaultValue `false`\n * @since 5.0.0\n */\nexport type RenderMenuAsSheet = boolean | \"phone\";\n\n/** @since 5.0.0 */\nexport interface MenuConfiguration extends MenuOrientationProps {\n /** {@inheritDoc RenderMenuAsSheet} */\n renderAsSheet?: RenderMenuAsSheet;\n\n /**\n * @see {@link SheetPosition}\n * @defaultValue `\"bottom\"`\n */\n sheetPosition?: SheetPosition;\n\n /**\n * @see {@link SheetVerticalSize}\n * @defaultValue `\"touch\"`\n */\n sheetVerticalSize?: SheetVerticalSize;\n\n /**\n * Any children to render above the sheet's menu implementation. This would\n * normally be something like a `<DialogHeader>` or `AppBar`.\n *\n * @defaultValue `null`\n */\n sheetHeader?: ReactNode;\n\n /**\n * Any children to render below the sheet's menu implementation. This would\n * normally be something like a `<DialogFooter>`.\n *\n * @defaultValue `null`\n */\n sheetFooter?: ReactNode;\n}\n\n/** @since 5.0.0 */\nexport type MenuConfigurationContext = Required<MenuConfiguration>;\n\n/** @since 5.0.0 */\nexport const DEFAULT_MENU_CONFIGURATION: Readonly<MenuConfiguration> = {\n horizontal: false,\n renderAsSheet: false,\n sheetHeader: null,\n sheetFooter: null,\n sheetPosition: \"bottom\",\n sheetVerticalSize: \"touch\",\n};\n\n/**\n * @internal\n * @since 5.0.0\n */\nconst context = createContext<MenuConfigurationContext>({\n horizontal: false,\n renderAsSheet: false,\n sheetHeader: null,\n sheetFooter: null,\n sheetPosition: \"bottom\",\n sheetVerticalSize: \"touch\",\n});\ncontext.displayName = \"MenuConfiguration\";\n\n/**\n * @internal\n * @since 5.0.0\n */\nconst { Provider } = context;\n\n/**\n * This is probably just an internal only hook that allows you to get the\n * {@link MenuConfigurationContext} with optional overrides.\n *\n * @param overrides - An object of {@link MenuConfiguration} that would override\n * the inherited context values if they are not `undefined`.\n * @returns the {@link MenuConfigurationContext} with any overrides that were\n * provided.\n * @since 5.0.0\n */\nexport function useMenuConfiguration(\n overrides: MenuConfiguration = {}\n): Readonly<MenuConfigurationContext> {\n const {\n horizontal,\n renderAsSheet,\n sheetHeader,\n sheetFooter,\n sheetPosition,\n sheetVerticalSize,\n } = overrides;\n const inherited = useContext(context);\n\n return {\n horizontal: horizontal ?? inherited.horizontal,\n renderAsSheet: renderAsSheet ?? inherited.renderAsSheet,\n sheetHeader:\n sheetHeader === null ? null : sheetHeader ?? inherited.sheetHeader,\n sheetFooter:\n sheetFooter === null ? null : sheetFooter ?? inherited.sheetFooter,\n sheetPosition: sheetPosition ?? inherited.sheetPosition,\n sheetVerticalSize: sheetVerticalSize ?? inherited.sheetVerticalSize,\n };\n}\n\n/** @since 5.0.0 */\nexport interface MenuConfigurationProviderProps extends MenuConfiguration {\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * Note: This will always merge values with any parent\n * `MenuConfigurationProvider`s.\n *\n * @since 5.0.0\n */\nexport function MenuConfigurationProvider(\n props: MenuConfigurationProviderProps\n): ReactElement {\n const { children, ...configuration } = props;\n const {\n horizontal,\n renderAsSheet,\n sheetHeader,\n sheetFooter,\n sheetPosition,\n sheetVerticalSize,\n } = useMenuConfiguration(configuration);\n\n const value = useMemo<MenuConfigurationContext>(\n () => ({\n horizontal,\n renderAsSheet,\n sheetHeader,\n sheetFooter,\n sheetPosition,\n sheetVerticalSize,\n }),\n [\n horizontal,\n renderAsSheet,\n sheetFooter,\n sheetHeader,\n sheetPosition,\n sheetVerticalSize,\n ]\n );\n\n return <Provider value={value}>{children}</Provider>;\n}\n"],"names":["createContext","useContext","useMemo","DEFAULT_MENU_CONFIGURATION","horizontal","renderAsSheet","sheetHeader","sheetFooter","sheetPosition","sheetVerticalSize","context","displayName","Provider","useMenuConfiguration","overrides","inherited","MenuConfigurationProvider","props","children","configuration","value"],"mappings":"AAAA;;AACA,SACEA,aAAa,EACbC,UAAU,EACVC,OAAO,QAGF,QAAQ;AAiEf,iBAAiB,GACjB,OAAO,MAAMC,6BAA0D;IACrEC,YAAY;IACZC,eAAe;IACfC,aAAa;IACbC,aAAa;IACbC,eAAe;IACfC,mBAAmB;AACrB,EAAE;AAEF;;;CAGC,GACD,MAAMC,wBAAUV,cAAwC;IACtDI,YAAY;IACZC,eAAe;IACfC,aAAa;IACbC,aAAa;IACbC,eAAe;IACfC,mBAAmB;AACrB;AACAC,QAAQC,WAAW,GAAG;AAEtB;;;CAGC,GACD,MAAM,EAAEC,QAAQ,EAAE,GAAGF;AAErB;;;;;;;;;CASC,GACD,OAAO,SAASG,qBACdC,YAA+B,CAAC,CAAC;IAEjC,MAAM,EACJV,UAAU,EACVC,aAAa,EACbC,WAAW,EACXC,WAAW,EACXC,aAAa,EACbC,iBAAiB,EAClB,GAAGK;IACJ,MAAMC,YAAYd,WAAWS;IAE7B,OAAO;QACLN,YAAYA,cAAcW,UAAUX,UAAU;QAC9CC,eAAeA,iBAAiBU,UAAUV,aAAa;QACvDC,aACEA,gBAAgB,OAAO,
|
|
1
|
+
{"version":3,"sources":["../../src/menu/MenuConfigurationProvider.tsx"],"sourcesContent":["\"use client\";\nimport {\n createContext,\n useContext,\n useMemo,\n type ReactElement,\n type ReactNode,\n} from \"react\";\nimport { type SheetPosition, type SheetVerticalSize } from \"../sheet/styles.js\";\n\n/** @since 5.0.0 */\nexport interface MenuOrientationProps {\n /**\n * Boolean if the menu should be rendered horizontally instead of vertically.\n * This will also update the `aria-orientation`.\n *\n * @defaultValue `false`\n */\n horizontal?: boolean;\n}\n\n/**\n * This allows the menu to be conditionally rendered as a `Sheet` instead of a\n * menu.\n *\n * - `false` - always render as a `Menu`\n * - `true` - always render as a `Sheet`\n * - `\"phone\"` - render as a sheet only when the {@link AppSize} is considered\n * phone (`isPhone === true`).\n *\n * @defaultValue `false`\n * @since 5.0.0\n */\nexport type RenderMenuAsSheet = boolean | \"phone\";\n\n/** @since 5.0.0 */\nexport interface MenuConfiguration extends MenuOrientationProps {\n /** {@inheritDoc RenderMenuAsSheet} */\n renderAsSheet?: RenderMenuAsSheet;\n\n /**\n * @see {@link SheetPosition}\n * @defaultValue `\"bottom\"`\n */\n sheetPosition?: SheetPosition;\n\n /**\n * @see {@link SheetVerticalSize}\n * @defaultValue `\"touch\"`\n */\n sheetVerticalSize?: SheetVerticalSize;\n\n /**\n * Any children to render above the sheet's menu implementation. This would\n * normally be something like a `<DialogHeader>` or `AppBar`.\n *\n * @defaultValue `null`\n */\n sheetHeader?: ReactNode;\n\n /**\n * Any children to render below the sheet's menu implementation. This would\n * normally be something like a `<DialogFooter>`.\n *\n * @defaultValue `null`\n */\n sheetFooter?: ReactNode;\n}\n\n/** @since 5.0.0 */\nexport type MenuConfigurationContext = Required<MenuConfiguration>;\n\n/** @since 5.0.0 */\nexport const DEFAULT_MENU_CONFIGURATION: Readonly<MenuConfiguration> = {\n horizontal: false,\n renderAsSheet: false,\n sheetHeader: null,\n sheetFooter: null,\n sheetPosition: \"bottom\",\n sheetVerticalSize: \"touch\",\n};\n\n/**\n * @internal\n * @since 5.0.0\n */\nconst context = createContext<MenuConfigurationContext>({\n horizontal: false,\n renderAsSheet: false,\n sheetHeader: null,\n sheetFooter: null,\n sheetPosition: \"bottom\",\n sheetVerticalSize: \"touch\",\n});\ncontext.displayName = \"MenuConfiguration\";\n\n/**\n * @internal\n * @since 5.0.0\n */\nconst { Provider } = context;\n\n/**\n * This is probably just an internal only hook that allows you to get the\n * {@link MenuConfigurationContext} with optional overrides.\n *\n * @param overrides - An object of {@link MenuConfiguration} that would override\n * the inherited context values if they are not `undefined`.\n * @returns the {@link MenuConfigurationContext} with any overrides that were\n * provided.\n * @since 5.0.0\n */\nexport function useMenuConfiguration(\n overrides: MenuConfiguration = {}\n): Readonly<MenuConfigurationContext> {\n const {\n horizontal,\n renderAsSheet,\n sheetHeader,\n sheetFooter,\n sheetPosition,\n sheetVerticalSize,\n } = overrides;\n const inherited = useContext(context);\n\n return {\n horizontal: horizontal ?? inherited.horizontal,\n renderAsSheet: renderAsSheet ?? inherited.renderAsSheet,\n sheetHeader:\n sheetHeader === null ? null : (sheetHeader ?? inherited.sheetHeader),\n sheetFooter:\n sheetFooter === null ? null : (sheetFooter ?? inherited.sheetFooter),\n sheetPosition: sheetPosition ?? inherited.sheetPosition,\n sheetVerticalSize: sheetVerticalSize ?? inherited.sheetVerticalSize,\n };\n}\n\n/** @since 5.0.0 */\nexport interface MenuConfigurationProviderProps extends MenuConfiguration {\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * Note: This will always merge values with any parent\n * `MenuConfigurationProvider`s.\n *\n * @since 5.0.0\n */\nexport function MenuConfigurationProvider(\n props: MenuConfigurationProviderProps\n): ReactElement {\n const { children, ...configuration } = props;\n const {\n horizontal,\n renderAsSheet,\n sheetHeader,\n sheetFooter,\n sheetPosition,\n sheetVerticalSize,\n } = useMenuConfiguration(configuration);\n\n const value = useMemo<MenuConfigurationContext>(\n () => ({\n horizontal,\n renderAsSheet,\n sheetHeader,\n sheetFooter,\n sheetPosition,\n sheetVerticalSize,\n }),\n [\n horizontal,\n renderAsSheet,\n sheetFooter,\n sheetHeader,\n sheetPosition,\n sheetVerticalSize,\n ]\n );\n\n return <Provider value={value}>{children}</Provider>;\n}\n"],"names":["createContext","useContext","useMemo","DEFAULT_MENU_CONFIGURATION","horizontal","renderAsSheet","sheetHeader","sheetFooter","sheetPosition","sheetVerticalSize","context","displayName","Provider","useMenuConfiguration","overrides","inherited","MenuConfigurationProvider","props","children","configuration","value"],"mappings":"AAAA;;AACA,SACEA,aAAa,EACbC,UAAU,EACVC,OAAO,QAGF,QAAQ;AAiEf,iBAAiB,GACjB,OAAO,MAAMC,6BAA0D;IACrEC,YAAY;IACZC,eAAe;IACfC,aAAa;IACbC,aAAa;IACbC,eAAe;IACfC,mBAAmB;AACrB,EAAE;AAEF;;;CAGC,GACD,MAAMC,wBAAUV,cAAwC;IACtDI,YAAY;IACZC,eAAe;IACfC,aAAa;IACbC,aAAa;IACbC,eAAe;IACfC,mBAAmB;AACrB;AACAC,QAAQC,WAAW,GAAG;AAEtB;;;CAGC,GACD,MAAM,EAAEC,QAAQ,EAAE,GAAGF;AAErB;;;;;;;;;CASC,GACD,OAAO,SAASG,qBACdC,YAA+B,CAAC,CAAC;IAEjC,MAAM,EACJV,UAAU,EACVC,aAAa,EACbC,WAAW,EACXC,WAAW,EACXC,aAAa,EACbC,iBAAiB,EAClB,GAAGK;IACJ,MAAMC,YAAYd,WAAWS;IAE7B,OAAO;QACLN,YAAYA,cAAcW,UAAUX,UAAU;QAC9CC,eAAeA,iBAAiBU,UAAUV,aAAa;QACvDC,aACEA,gBAAgB,OAAO,OAAQA,eAAeS,UAAUT,WAAW;QACrEC,aACEA,gBAAgB,OAAO,OAAQA,eAAeQ,UAAUR,WAAW;QACrEC,eAAeA,iBAAiBO,UAAUP,aAAa;QACvDC,mBAAmBA,qBAAqBM,UAAUN,iBAAiB;IACrE;AACF;AAOA;;;;;;;CAOC,GACD,OAAO,SAASO,0BACdC,KAAqC;IAErC,MAAM,EAAEC,QAAQ,EAAE,GAAGC,eAAe,GAAGF;IACvC,MAAM,EACJb,UAAU,EACVC,aAAa,EACbC,WAAW,EACXC,WAAW,EACXC,aAAa,EACbC,iBAAiB,EAClB,GAAGI,qBAAqBM;IAEzB,MAAMC,QAAQlB,QACZ,IAAO,CAAA;YACLE;YACAC;YACAC;YACAC;YACAC;YACAC;QACF,CAAA,GACA;QACEL;QACAC;QACAE;QACAD;QACAE;QACAC;KACD;IAGH,qBAAO,KAACG;QAASQ,OAAOA;kBAAQF;;AAClC"}
|
package/dist/menu/MenuItem.d.ts
CHANGED
|
@@ -8,8 +8,6 @@ export interface NavGroupProps extends ListProps {
|
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* **Server Component**
|
|
12
|
-
*
|
|
13
11
|
* A simple wrapper around the {@link Link} component that ads the
|
|
14
12
|
* `--rmd-tree-depth: depth` custom property to allow for incremented padding.
|
|
15
13
|
*
|
|
@@ -3,8 +3,6 @@ import { forwardRef } from "react";
|
|
|
3
3
|
import { List } from "../list/List.js";
|
|
4
4
|
import { navGroup } from "./navGroupStyles.js";
|
|
5
5
|
/**
|
|
6
|
-
* **Server Component**
|
|
7
|
-
*
|
|
8
6
|
* A simple wrapper around the {@link Link} component that ads the
|
|
9
7
|
* `--rmd-tree-depth: depth` custom property to allow for incremented padding.
|
|
10
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/navigation/NavGroup.tsx"],"sourcesContent":["import { forwardRef, type ReactNode } from \"react\";\nimport { List, type ListProps } from \"../list/List.js\";\nimport { navGroup } from \"./navGroupStyles.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface NavGroupProps extends ListProps {\n depth: number;\n children: ReactNode;\n}\n\n/**\n *
|
|
1
|
+
{"version":3,"sources":["../../src/navigation/NavGroup.tsx"],"sourcesContent":["import { forwardRef, type ReactNode } from \"react\";\nimport { List, type ListProps } from \"../list/List.js\";\nimport { navGroup } from \"./navGroupStyles.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface NavGroupProps extends ListProps {\n depth: number;\n children: ReactNode;\n}\n\n/**\n * A simple wrapper around the {@link Link} component that ads the\n * `--rmd-tree-depth: depth` custom property to allow for incremented padding.\n *\n * @since 6.0.0\n */\nexport const NavGroup = forwardRef<HTMLUListElement, NavGroupProps>(\n function NavGroup(props, ref) {\n const { style, depth, className, children, ...remaining } = props;\n\n return (\n <List\n {...remaining}\n ref={ref}\n style={{ ...style, \"--rmd-tree-depth\": depth }}\n className={navGroup({\n className,\n disablePadding: depth > 0,\n })}\n >\n {children}\n </List>\n );\n }\n);\n"],"names":["forwardRef","List","navGroup","NavGroup","props","ref","style","depth","className","children","remaining","disablePadding"],"mappings":";AAAA,SAASA,UAAU,QAAwB,QAAQ;AACnD,SAASC,IAAI,QAAwB,kBAAkB;AACvD,SAASC,QAAQ,QAAQ,sBAAsB;AAU/C;;;;;CAKC,GACD,OAAO,MAAMC,yBAAWH,WACtB,SAASG,SAASC,KAAK,EAAEC,GAAG;IAC1B,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,WAAW,GAAGN;IAE5D,qBACE,KAACH;QACE,GAAGS,SAAS;QACbL,KAAKA;QACLC,OAAO;YAAE,GAAGA,KAAK;YAAE,oBAAoBC;QAAM;QAC7CC,WAAWN,SAAS;YAClBM;YACAG,gBAAgBJ,QAAQ;QAC1B;kBAECE;;AAGP,GACA"}
|
|
@@ -6,8 +6,6 @@ export interface NavItemProps extends LiHTMLAttributes<HTMLLIElement> {
|
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* **Server Component**
|
|
10
|
-
*
|
|
11
9
|
* This component is just used to add padding based on the depth of the nav item
|
|
12
10
|
* and should not be used on its own. See the `CollapsibleNavGroup` and
|
|
13
11
|
* `NavItemLink` instead.
|
|
@@ -2,8 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { navItem } from "./navItemStyles.js";
|
|
4
4
|
/**
|
|
5
|
-
* **Server Component**
|
|
6
|
-
*
|
|
7
5
|
* This component is just used to add padding based on the depth of the nav item
|
|
8
6
|
* and should not be used on its own. See the `CollapsibleNavGroup` and
|
|
9
7
|
* `NavItemLink` instead.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/navigation/NavItem.tsx"],"sourcesContent":["import { forwardRef, type LiHTMLAttributes, type ReactNode } from \"react\";\nimport { navItem } from \"./navItemStyles.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface NavItemProps extends LiHTMLAttributes<HTMLLIElement> {\n children: ReactNode;\n}\n\n/**\n *
|
|
1
|
+
{"version":3,"sources":["../../src/navigation/NavItem.tsx"],"sourcesContent":["import { forwardRef, type LiHTMLAttributes, type ReactNode } from \"react\";\nimport { navItem } from \"./navItemStyles.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface NavItemProps extends LiHTMLAttributes<HTMLLIElement> {\n children: ReactNode;\n}\n\n/**\n * This component is just used to add padding based on the depth of the nav item\n * and should not be used on its own. See the `CollapsibleNavGroup` and\n * `NavItemLink` instead.\n *\n * @since 6.0.0\n */\nexport const NavItem = forwardRef<HTMLLIElement, NavItemProps>(\n function NavItem(props, ref) {\n const { className, children, ...remaining } = props;\n return (\n <li {...remaining} ref={ref} className={navItem({ className })}>\n {children}\n </li>\n );\n }\n);\n"],"names":["forwardRef","navItem","NavItem","props","ref","className","children","remaining","li"],"mappings":";AAAA,SAASA,UAAU,QAA+C,QAAQ;AAC1E,SAASC,OAAO,QAAQ,qBAAqB;AAS7C;;;;;;CAMC,GACD,OAAO,MAAMC,wBAAUF,WACrB,SAASE,QAAQC,KAAK,EAAEC,GAAG;IACzB,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,WAAW,GAAGJ;IAC9C,qBACE,KAACK;QAAI,GAAGD,SAAS;QAAEH,KAAKA;QAAKC,WAAWJ,QAAQ;YAAEI;QAAU;kBACzDC;;AAGP,GACA"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type ListSubheaderProps } from "../list/ListSubheader.js";
|
|
3
2
|
/**
|
|
4
3
|
* @since 6.0.0
|
|
@@ -6,8 +5,6 @@ import { type ListSubheaderProps } from "../list/ListSubheader.js";
|
|
|
6
5
|
export interface NavSubheaderProps extends ListSubheaderProps {
|
|
7
6
|
}
|
|
8
7
|
/**
|
|
9
|
-
* **Server Component**
|
|
10
|
-
*
|
|
11
8
|
* A simple wrapper around the {@Link ListSubheader} that updates the padding
|
|
12
9
|
* based on the current navigation item depth to match the other items.
|
|
13
10
|
*
|
|
@@ -3,8 +3,6 @@ import { forwardRef } from "react";
|
|
|
3
3
|
import { ListSubheader } from "../list/ListSubheader.js";
|
|
4
4
|
import { navItem } from "./navItemStyles.js";
|
|
5
5
|
/**
|
|
6
|
-
* **Server Component**
|
|
7
|
-
*
|
|
8
6
|
* A simple wrapper around the {@Link ListSubheader} that updates the padding
|
|
9
7
|
* based on the current navigation item depth to match the other items.
|
|
10
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/navigation/NavSubheader.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport {\n ListSubheader,\n type ListSubheaderProps,\n} from \"../list/ListSubheader.js\";\nimport { navItem } from \"./navItemStyles.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface NavSubheaderProps extends ListSubheaderProps {}\n\n/**\n *
|
|
1
|
+
{"version":3,"sources":["../../src/navigation/NavSubheader.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport {\n ListSubheader,\n type ListSubheaderProps,\n} from \"../list/ListSubheader.js\";\nimport { navItem } from \"./navItemStyles.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface NavSubheaderProps extends ListSubheaderProps {}\n\n/**\n * A simple wrapper around the {@Link ListSubheader} that updates the padding\n * based on the current navigation item depth to match the other items.\n *\n * @since 6.0.0\n */\nexport const NavSubheader = forwardRef<HTMLLIElement, NavSubheaderProps>(\n function NavSubheader(props, ref) {\n const { textProps, ...remaining } = props;\n\n return (\n <ListSubheader\n {...remaining}\n ref={ref}\n textProps={{\n ...textProps,\n className: navItem({ className: textProps?.className }),\n }}\n />\n );\n }\n);\n"],"names":["forwardRef","ListSubheader","navItem","NavSubheader","props","ref","textProps","remaining","className"],"mappings":";AAAA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SACEC,aAAa,QAER,2BAA2B;AAClC,SAASC,OAAO,QAAQ,qBAAqB;AAO7C;;;;;CAKC,GACD,OAAO,MAAMC,6BAAeH,WAC1B,SAASG,aAAaC,KAAK,EAAEC,GAAG;IAC9B,MAAM,EAAEC,SAAS,EAAE,GAAGC,WAAW,GAAGH;IAEpC,qBACE,KAACH;QACE,GAAGM,SAAS;QACbF,KAAKA;QACLC,WAAW;YACT,GAAGA,SAAS;YACZE,WAAWN,QAAQ;gBAAEM,WAAWF,WAAWE;YAAU;QACvD;;AAGN,GACA"}
|
|
@@ -7,8 +7,6 @@ import { bem } from "../utils/bem.js";
|
|
|
7
7
|
import { getPercentage } from "../utils/getPercentage.js";
|
|
8
8
|
const styles = bem("rmd-circular-progress");
|
|
9
9
|
/**
|
|
10
|
-
* **Server Component**
|
|
11
|
-
*
|
|
12
10
|
* @example Indeterminate Example
|
|
13
11
|
* ```tsx
|
|
14
12
|
* import { CircularProgress } from "@react-md/core":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/progress/CircularProgress.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n useMemo,\n type CSSProperties,\n type HTMLAttributes,\n} from \"react\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { getPercentage } from \"../utils/getPercentage.js\";\nimport { type ProgressProps } from \"./types.js\";\n\n/**\n * @since 6.0.0 Added the `disableShrink` prop.\n * @since 6.0.0 Renamed `small` to `dense`.\n * @since 6.0.0 Renamed `centered` to `disableCentered`.\n * @since 6.0.0 Removed the `maxRotation` prop since the determinate state no\n * longer rotates while increasing value.\n */\nexport interface CircularProgressProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, \"id\">,\n ProgressProps {\n /**\n * An optional style to apply to the svg within the circular progress. The\n * values of this style object will be merged with the current determinate\n * style (if it exists).\n */\n svgStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the svg within the circular progress.\n */\n svgClassName?: string;\n\n /**\n * An optional style to apply to the circle within the circular progress. The\n * values of this style object will be merged with the current determinate\n * style (if it exists).\n */\n circleStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the circle within the circular progress.\n */\n circleClassName?: string;\n\n /**\n * The radius for the circle. It is generally recommended to have the radius\n * be 1/2 of the viewbox and minus a few more pixels so that there is some\n * surrounding padding. You probably shouldn't really be changing this prop\n * though.\n *\n * @defaultValue `30`\n */\n radius?: number;\n\n /**\n * The center point for the circle. This should be half of the `viewBox` prop\n * 99% of the time and probably won't be changed.\n *\n * @defaultValue `33`\n */\n center?: number;\n\n /**\n * The viewbox for the child svg. I wouldn't recommend changing this value as\n * you will also need to update the `dashoffset` in both Sass and this prop to\n * get the animation to look nice again.\n *\n * @defaultValue `0 0 66 66`\n */\n viewBox?: string;\n\n /**\n * The `stroke-dashoffset` for the circle within the SVG. You probably won't\n * be changing this value that much as it should match the\n * `$rmd-progress-circle-dashoffset` Sass variable. This is really just used\n * to help to create the determinate progress animation.\n *\n * @defaultValue `187`\n */\n dashoffset?: number;\n\n /**\n * Boolean if the circular progress should be centered using left and right\n * margins.\n *\n * @defaultValue `false`\n * @since 6.0.0 Renamed from `centered`\n */\n disableCentered?: boolean;\n\n /**\n * Set to `true` to render as a smaller size.\n *\n * @defaultValue `false`\n * @since 2.3.0\n * @since 6.0.0 Renamed from `small`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to update the indeterminate behavior to only rotate\n * which will increase performance during CPU-intensive tasks or when many\n * loading spinners are displayed at once on the page.\n *\n * @defaultValue `false`\n * @since 6.0.0\n */\n disableShrink?: boolean;\n}\n\nconst styles = bem(\"rmd-circular-progress\");\n\n/**\n *
|
|
1
|
+
{"version":3,"sources":["../../src/progress/CircularProgress.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n useMemo,\n type CSSProperties,\n type HTMLAttributes,\n} from \"react\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { getPercentage } from \"../utils/getPercentage.js\";\nimport { type ProgressProps } from \"./types.js\";\n\n/**\n * @since 6.0.0 Added the `disableShrink` prop.\n * @since 6.0.0 Renamed `small` to `dense`.\n * @since 6.0.0 Renamed `centered` to `disableCentered`.\n * @since 6.0.0 Removed the `maxRotation` prop since the determinate state no\n * longer rotates while increasing value.\n */\nexport interface CircularProgressProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, \"id\">,\n ProgressProps {\n /**\n * An optional style to apply to the svg within the circular progress. The\n * values of this style object will be merged with the current determinate\n * style (if it exists).\n */\n svgStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the svg within the circular progress.\n */\n svgClassName?: string;\n\n /**\n * An optional style to apply to the circle within the circular progress. The\n * values of this style object will be merged with the current determinate\n * style (if it exists).\n */\n circleStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the circle within the circular progress.\n */\n circleClassName?: string;\n\n /**\n * The radius for the circle. It is generally recommended to have the radius\n * be 1/2 of the viewbox and minus a few more pixels so that there is some\n * surrounding padding. You probably shouldn't really be changing this prop\n * though.\n *\n * @defaultValue `30`\n */\n radius?: number;\n\n /**\n * The center point for the circle. This should be half of the `viewBox` prop\n * 99% of the time and probably won't be changed.\n *\n * @defaultValue `33`\n */\n center?: number;\n\n /**\n * The viewbox for the child svg. I wouldn't recommend changing this value as\n * you will also need to update the `dashoffset` in both Sass and this prop to\n * get the animation to look nice again.\n *\n * @defaultValue `0 0 66 66`\n */\n viewBox?: string;\n\n /**\n * The `stroke-dashoffset` for the circle within the SVG. You probably won't\n * be changing this value that much as it should match the\n * `$rmd-progress-circle-dashoffset` Sass variable. This is really just used\n * to help to create the determinate progress animation.\n *\n * @defaultValue `187`\n */\n dashoffset?: number;\n\n /**\n * Boolean if the circular progress should be centered using left and right\n * margins.\n *\n * @defaultValue `false`\n * @since 6.0.0 Renamed from `centered`\n */\n disableCentered?: boolean;\n\n /**\n * Set to `true` to render as a smaller size.\n *\n * @defaultValue `false`\n * @since 2.3.0\n * @since 6.0.0 Renamed from `small`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to update the indeterminate behavior to only rotate\n * which will increase performance during CPU-intensive tasks or when many\n * loading spinners are displayed at once on the page.\n *\n * @defaultValue `false`\n * @since 6.0.0\n */\n disableShrink?: boolean;\n}\n\nconst styles = bem(\"rmd-circular-progress\");\n\n/**\n * @example Indeterminate Example\n * ```tsx\n * import { CircularProgress } from \"@react-md/core\":\n * import { type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <CircularProgress aria-label=\"Loading\" />;\n * }\n * ```\n *\n * @example Determinate Example\n * ```tsx\n * import { CircularProgress } from \"@react-md/core\":\n * import { useState, type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * // a number from 0 - 100\n * const [progress, setProgress] = useState(0);\n *\n * return <CircularProgress aria-label=\"File upload\" value={progress} />;\n * }\n * ```\n *\n * @since 6.0.0 Updated the determinate circular progress to no longer\n * rotate while increasing the value and require a label for accessibility.\n */\nexport const CircularProgress = forwardRef<\n HTMLSpanElement,\n LabelRequiredForA11y<CircularProgressProps>\n>(function CircularProgress(props, ref) {\n const {\n id: propId,\n className,\n svgStyle,\n svgClassName,\n circleStyle: propCircleStyle,\n circleClassName,\n value,\n min = 0,\n max = 100,\n radius = 30,\n center = 33,\n viewBox = \"0 0 66 66\",\n theme = \"primary\",\n dense = false,\n dashoffset = 187,\n disableShrink = false,\n disableCentered = false,\n disableTransition = false,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"circular-progress\");\n let progress: number | undefined;\n if (typeof value === \"number\") {\n progress = getPercentage({ min, max, value, validate: true });\n }\n\n const circleStyle = useMemo(() => {\n if (typeof progress !== \"number\") {\n return propCircleStyle;\n }\n\n return {\n ...propCircleStyle,\n strokeDashoffset: dashoffset - dashoffset * progress,\n };\n }, [progress, propCircleStyle, dashoffset]);\n\n const determinate = typeof progress === \"number\";\n const indeterminate = !determinate;\n return (\n <span\n {...remaining}\n id={id}\n ref={ref}\n role=\"progressbar\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={value}\n className={cnb(\n styles({ dense, centered: !disableCentered }),\n theme !== \"current-color\" && cssUtils({ textColor: theme }),\n className\n )}\n >\n <svg\n style={svgStyle}\n className={cnb(\n styles(\"svg\", {\n determinate,\n indeterminate: indeterminate && !disableShrink,\n \"rotate-only\": indeterminate && disableShrink,\n }),\n svgClassName\n )}\n viewBox={viewBox}\n >\n <circle\n style={circleStyle}\n className={cnb(\n styles(\"circle\", {\n animate: !disableTransition && determinate,\n determinate,\n indeterminate: indeterminate && !disableShrink,\n \"rotate-only\": indeterminate && disableShrink,\n }),\n circleClassName\n )}\n r={radius}\n cx={center}\n cy={center}\n />\n </svg>\n </span>\n );\n});\n"],"names":["cnb","forwardRef","useMemo","cssUtils","useEnsuredId","bem","getPercentage","styles","CircularProgress","props","ref","id","propId","className","svgStyle","svgClassName","circleStyle","propCircleStyle","circleClassName","value","min","max","radius","center","viewBox","theme","dense","dashoffset","disableShrink","disableCentered","disableTransition","remaining","progress","validate","strokeDashoffset","determinate","indeterminate","span","role","aria-valuemin","aria-valuemax","aria-valuenow","centered","textColor","svg","style","circle","animate","r","cx","cy"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,EACVC,OAAO,QAGF,QAAQ;AACf,SAASC,QAAQ,QAAQ,iBAAiB;AAE1C,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SAASC,aAAa,QAAQ,4BAA4B;AAuG1D,MAAMC,SAASF,IAAI;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BC,GACD,OAAO,MAAMG,iCAAmBP,WAG9B,SAASO,iBAAiBC,KAAK,EAAEC,GAAG;IACpC,MAAM,EACJC,IAAIC,MAAM,EACVC,SAAS,EACTC,QAAQ,EACRC,YAAY,EACZC,aAAaC,eAAe,EAC5BC,eAAe,EACfC,KAAK,EACLC,MAAM,CAAC,EACPC,MAAM,GAAG,EACTC,SAAS,EAAE,EACXC,SAAS,EAAE,EACXC,UAAU,WAAW,EACrBC,QAAQ,SAAS,EACjBC,QAAQ,KAAK,EACbC,aAAa,GAAG,EAChBC,gBAAgB,KAAK,EACrBC,kBAAkB,KAAK,EACvBC,oBAAoB,KAAK,EACzB,GAAGC,WACJ,GAAGtB;IAEJ,MAAME,KAAKP,aAAaQ,QAAQ;IAChC,IAAIoB;IACJ,IAAI,OAAOb,UAAU,UAAU;QAC7Ba,WAAW1B,cAAc;YAAEc;YAAKC;YAAKF;YAAOc,UAAU;QAAK;IAC7D;IAEA,MAAMjB,cAAcd,QAAQ;QAC1B,IAAI,OAAO8B,aAAa,UAAU;YAChC,OAAOf;QACT;QAEA,OAAO;YACL,GAAGA,eAAe;YAClBiB,kBAAkBP,aAAaA,aAAaK;QAC9C;IACF,GAAG;QAACA;QAAUf;QAAiBU;KAAW;IAE1C,MAAMQ,cAAc,OAAOH,aAAa;IACxC,MAAMI,gBAAgB,CAACD;IACvB,qBACE,KAACE;QACE,GAAGN,SAAS;QACbpB,IAAIA;QACJD,KAAKA;QACL4B,MAAK;QACLC,iBAAenB;QACfoB,iBAAenB;QACfoB,iBAAetB;QACfN,WAAWb,IACTO,OAAO;YAAEmB;YAAOgB,UAAU,CAACb;QAAgB,IAC3CJ,UAAU,mBAAmBtB,SAAS;YAAEwC,WAAWlB;QAAM,IACzDZ;kBAGF,cAAA,KAAC+B;YACCC,OAAO/B;YACPD,WAAWb,IACTO,OAAO,OAAO;gBACZ4B;gBACAC,eAAeA,iBAAiB,CAACR;gBACjC,eAAeQ,iBAAiBR;YAClC,IACAb;YAEFS,SAASA;sBAET,cAAA,KAACsB;gBACCD,OAAO7B;gBACPH,WAAWb,IACTO,OAAO,UAAU;oBACfwC,SAAS,CAACjB,qBAAqBK;oBAC/BA;oBACAC,eAAeA,iBAAiB,CAACR;oBACjC,eAAeQ,iBAAiBR;gBAClC,IACAV;gBAEF8B,GAAG1B;gBACH2B,IAAI1B;gBACJ2B,IAAI3B;;;;AAKd,GAAG"}
|