@react-md/core 6.5.1 → 7.0.0
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/_utils.scss +3 -0
- package/dist/app-bar/AppBar.d.ts +3 -2
- package/dist/app-bar/AppBar.js +3 -4
- package/dist/app-bar/AppBar.js.map +1 -1
- package/dist/app-bar/AppBarTitle.d.ts +3 -1
- package/dist/app-bar/AppBarTitle.js +3 -4
- package/dist/app-bar/AppBarTitle.js.map +1 -1
- package/dist/autocomplete/AutocompleteChip.d.ts +2 -1
- package/dist/autocomplete/AutocompleteChip.js +3 -4
- package/dist/autocomplete/AutocompleteChip.js.map +1 -1
- package/dist/autocomplete/types.d.ts +1 -0
- package/dist/autocomplete/types.js.map +1 -1
- package/dist/autocomplete/utils.d.ts +4 -4
- package/dist/autocomplete/utils.js.map +1 -1
- package/dist/avatar/Avatar.d.ts +3 -2
- package/dist/avatar/Avatar.js +3 -4
- package/dist/avatar/Avatar.js.map +1 -1
- package/dist/badge/Badge.d.ts +3 -2
- package/dist/badge/Badge.js +3 -4
- package/dist/badge/Badge.js.map +1 -1
- package/dist/box/Box.d.ts +3 -2
- package/dist/box/Box.js +3 -4
- package/dist/box/Box.js.map +1 -1
- package/dist/button/AsyncButton.d.ts +3 -2
- package/dist/button/AsyncButton.js +3 -4
- package/dist/button/AsyncButton.js.map +1 -1
- package/dist/button/Button.d.ts +3 -2
- package/dist/button/Button.js +3 -4
- package/dist/button/Button.js.map +1 -1
- package/dist/button/ButtonUnstyled.d.ts +5 -3
- package/dist/button/ButtonUnstyled.js +3 -4
- package/dist/button/ButtonUnstyled.js.map +1 -1
- package/dist/button/FloatingActionButton.d.ts +3 -2
- package/dist/button/FloatingActionButton.js +3 -4
- package/dist/button/FloatingActionButton.js.map +1 -1
- package/dist/button/TooltippedButton.d.ts +3 -2
- package/dist/button/TooltippedButton.js +3 -4
- package/dist/button/TooltippedButton.js.map +1 -1
- package/dist/card/Card.d.ts +3 -2
- package/dist/card/Card.js +3 -4
- package/dist/card/Card.js.map +1 -1
- package/dist/card/CardContent.d.ts +3 -2
- package/dist/card/CardContent.js +3 -4
- package/dist/card/CardContent.js.map +1 -1
- package/dist/card/CardFooter.d.ts +3 -1
- package/dist/card/CardFooter.js +3 -4
- package/dist/card/CardFooter.js.map +1 -1
- package/dist/card/CardHeader.d.ts +3 -2
- package/dist/card/CardHeader.js +3 -4
- package/dist/card/CardHeader.js.map +1 -1
- package/dist/card/CardSubtitle.d.ts +3 -1
- package/dist/card/CardSubtitle.js +3 -4
- package/dist/card/CardSubtitle.js.map +1 -1
- package/dist/card/CardTitle.d.ts +3 -1
- package/dist/card/CardTitle.js +3 -4
- package/dist/card/CardTitle.js.map +1 -1
- package/dist/card/ClickableCard.d.ts +3 -2
- package/dist/card/ClickableCard.js +3 -4
- package/dist/card/ClickableCard.js.map +1 -1
- package/dist/chip/Chip.d.ts +4 -2
- package/dist/chip/Chip.js +4 -4
- package/dist/chip/Chip.js.map +1 -1
- package/dist/datetime/NativeDateField.d.ts +3 -1
- package/dist/datetime/NativeDateField.js +3 -4
- package/dist/datetime/NativeDateField.js.map +1 -1
- package/dist/datetime/NativeTimeField.d.ts +3 -1
- package/dist/datetime/NativeTimeField.js +3 -4
- package/dist/datetime/NativeTimeField.js.map +1 -1
- package/dist/dialog/Dialog.d.ts +3 -2
- package/dist/dialog/Dialog.js +4 -4
- package/dist/dialog/Dialog.js.map +1 -1
- package/dist/dialog/DialogContainer.d.ts +3 -2
- package/dist/dialog/DialogContainer.js +3 -4
- package/dist/dialog/DialogContainer.js.map +1 -1
- package/dist/dialog/DialogContent.d.ts +3 -2
- package/dist/dialog/DialogContent.js +3 -4
- package/dist/dialog/DialogContent.js.map +1 -1
- package/dist/dialog/DialogFooter.d.ts +3 -2
- package/dist/dialog/DialogFooter.js +3 -4
- package/dist/dialog/DialogFooter.js.map +1 -1
- package/dist/dialog/DialogHeader.d.ts +3 -1
- package/dist/dialog/DialogHeader.js +3 -4
- package/dist/dialog/DialogHeader.js.map +1 -1
- package/dist/dialog/DialogTitle.d.ts +3 -1
- package/dist/dialog/DialogTitle.js +3 -4
- package/dist/dialog/DialogTitle.js.map +1 -1
- package/dist/dialog/FixedDialog.d.ts +4 -3
- package/dist/dialog/FixedDialog.js +4 -4
- package/dist/dialog/FixedDialog.js.map +1 -1
- package/dist/divider/Divider.d.ts +3 -2
- package/dist/divider/Divider.js +3 -4
- package/dist/divider/Divider.js.map +1 -1
- package/dist/draggable/useDraggable.d.ts +3 -3
- package/dist/draggable/useDraggable.js.map +1 -1
- package/dist/draggable/utils.d.ts +1 -1
- package/dist/draggable/utils.js.map +1 -1
- package/dist/expansion-panel/ExpansionList.d.ts +3 -2
- package/dist/expansion-panel/ExpansionList.js +3 -4
- package/dist/expansion-panel/ExpansionList.js.map +1 -1
- package/dist/expansion-panel/ExpansionPanel.d.ts +3 -2
- package/dist/expansion-panel/ExpansionPanel.js +3 -4
- package/dist/expansion-panel/ExpansionPanel.js.map +1 -1
- package/dist/expansion-panel/ExpansionPanelHeader.d.ts +3 -2
- package/dist/expansion-panel/ExpansionPanelHeader.js +3 -4
- package/dist/expansion-panel/ExpansionPanelHeader.js.map +1 -1
- package/dist/files/FileInput.d.ts +3 -2
- package/dist/files/FileInput.js +3 -4
- package/dist/files/FileInput.js.map +1 -1
- package/dist/focus/useFocusContainer.d.ts +1 -1
- package/dist/focus/useFocusContainer.js.map +1 -1
- package/dist/form/Checkbox.d.ts +2 -1
- package/dist/form/Checkbox.js +4 -4
- package/dist/form/Checkbox.js.map +1 -1
- package/dist/form/Fieldset.d.ts +3 -2
- package/dist/form/Fieldset.js +3 -4
- package/dist/form/Fieldset.js.map +1 -1
- package/dist/form/Form.d.ts +3 -2
- package/dist/form/Form.js +3 -4
- package/dist/form/Form.js.map +1 -1
- package/dist/form/FormMessage.d.ts +8 -2
- package/dist/form/FormMessage.js +3 -4
- package/dist/form/FormMessage.js.map +1 -1
- package/dist/form/FormMessageContainer.d.ts +5 -4
- package/dist/form/FormMessageContainer.js +3 -4
- package/dist/form/FormMessageContainer.js.map +1 -1
- package/dist/form/FormMessageCounter.d.ts +3 -2
- package/dist/form/FormMessageCounter.js +3 -4
- package/dist/form/FormMessageCounter.js.map +1 -1
- package/dist/form/InputToggle.d.ts +3 -2
- package/dist/form/InputToggle.js +3 -4
- package/dist/form/InputToggle.js.map +1 -1
- package/dist/form/InputToggleIcon.d.ts +3 -2
- package/dist/form/InputToggleIcon.js +3 -4
- package/dist/form/InputToggleIcon.js.map +1 -1
- package/dist/form/Label.d.ts +2 -1
- package/dist/form/Label.js +3 -4
- package/dist/form/Label.js.map +1 -1
- package/dist/form/Legend.d.ts +3 -1
- package/dist/form/Legend.js +3 -4
- package/dist/form/Legend.js.map +1 -1
- package/dist/form/NativeSelect.d.ts +3 -2
- package/dist/form/NativeSelect.js +3 -4
- package/dist/form/NativeSelect.js.map +1 -1
- package/dist/form/OptGroup.d.ts +3 -2
- package/dist/form/OptGroup.js +3 -4
- package/dist/form/OptGroup.js.map +1 -1
- package/dist/form/Option.d.ts +3 -2
- package/dist/form/Option.js +4 -4
- package/dist/form/Option.js.map +1 -1
- package/dist/form/Password.d.ts +2 -2
- package/dist/form/Password.js +3 -4
- package/dist/form/Password.js.map +1 -1
- package/dist/form/Radio.d.ts +2 -1
- package/dist/form/Radio.js +4 -4
- package/dist/form/Radio.js.map +1 -1
- package/dist/form/ResizingTextAreaWrapper.d.ts +3 -2
- package/dist/form/ResizingTextAreaWrapper.js +3 -4
- package/dist/form/ResizingTextAreaWrapper.js.map +1 -1
- package/dist/form/SliderContainer.d.ts +3 -2
- package/dist/form/SliderContainer.js +3 -4
- package/dist/form/SliderContainer.js.map +1 -1
- package/dist/form/SliderThumb.d.ts +3 -2
- package/dist/form/SliderThumb.js +4 -4
- package/dist/form/SliderThumb.js.map +1 -1
- package/dist/form/SliderTrack.d.ts +3 -2
- package/dist/form/SliderTrack.js +3 -4
- package/dist/form/SliderTrack.js.map +1 -1
- package/dist/form/Switch.d.ts +3 -2
- package/dist/form/Switch.js +3 -4
- package/dist/form/Switch.js.map +1 -1
- package/dist/form/SwitchTrack.d.ts +3 -2
- package/dist/form/SwitchTrack.js +3 -4
- package/dist/form/SwitchTrack.js.map +1 -1
- package/dist/form/TextArea.d.ts +3 -2
- package/dist/form/TextArea.js +3 -4
- package/dist/form/TextArea.js.map +1 -1
- package/dist/form/TextField.d.ts +3 -2
- package/dist/form/TextField.js +3 -4
- package/dist/form/TextField.js.map +1 -1
- package/dist/form/TextFieldAddon.d.ts +2 -1
- package/dist/form/TextFieldAddon.js +3 -4
- package/dist/form/TextFieldAddon.js.map +1 -1
- package/dist/form/TextFieldContainer.d.ts +3 -2
- package/dist/form/TextFieldContainer.js +3 -4
- package/dist/form/TextFieldContainer.js.map +1 -1
- package/dist/form/sliderUtils.d.ts +1 -1
- package/dist/form/sliderUtils.js.map +1 -1
- package/dist/form/types.d.ts +11 -5
- package/dist/form/types.js.map +1 -1
- package/dist/form/useCombobox.d.ts +6 -6
- package/dist/form/useCombobox.js.map +1 -1
- package/dist/form/useFormReset.d.ts +1 -1
- package/dist/form/useFormReset.js.map +1 -1
- package/dist/form/useTextField.d.ts +4 -4
- package/dist/form/useTextField.js.map +1 -1
- package/dist/hoverMode/useHoverMode.js +1 -1
- package/dist/hoverMode/useHoverMode.js.map +1 -1
- package/dist/hoverMode/useHoverModeProvider.d.ts +5 -5
- package/dist/hoverMode/useHoverModeProvider.js +1 -1
- package/dist/hoverMode/useHoverModeProvider.js.map +1 -1
- package/dist/icon/FontIcon.d.ts +3 -2
- package/dist/icon/FontIcon.js +3 -4
- package/dist/icon/FontIcon.js.map +1 -1
- package/dist/icon/IconRotator.d.ts +3 -2
- package/dist/icon/IconRotator.js +4 -4
- package/dist/icon/IconRotator.js.map +1 -1
- package/dist/icon/MaterialIcon.d.ts +3 -2
- package/dist/icon/MaterialIcon.js +3 -4
- package/dist/icon/MaterialIcon.js.map +1 -1
- package/dist/icon/MaterialSymbol.d.ts +3 -2
- package/dist/icon/MaterialSymbol.js +3 -4
- package/dist/icon/MaterialSymbol.js.map +1 -1
- package/dist/icon/SVGIcon.d.ts +3 -2
- package/dist/icon/SVGIcon.js +3 -4
- package/dist/icon/SVGIcon.js.map +1 -1
- package/dist/layout/LayoutAppBar.d.ts +3 -1
- package/dist/layout/LayoutAppBar.js +3 -4
- package/dist/layout/LayoutAppBar.js.map +1 -1
- package/dist/layout/LayoutNav.d.ts +3 -2
- package/dist/layout/LayoutNav.js +3 -4
- package/dist/layout/LayoutNav.js.map +1 -1
- package/dist/layout/LayoutWindowSplitter.d.ts +4 -2
- package/dist/layout/LayoutWindowSplitter.js +4 -4
- package/dist/layout/LayoutWindowSplitter.js.map +1 -1
- package/dist/layout/Main.d.ts +4 -3
- package/dist/layout/Main.js +3 -4
- package/dist/layout/Main.js.map +1 -1
- package/dist/link/Link.d.ts +10 -2
- package/dist/link/Link.js +4 -4
- package/dist/link/Link.js.map +1 -1
- package/dist/link/SkipToMainContent.d.ts +3 -2
- package/dist/link/SkipToMainContent.js +4 -4
- package/dist/link/SkipToMainContent.js.map +1 -1
- package/dist/list/List.d.ts +3 -2
- package/dist/list/List.js +3 -4
- package/dist/list/List.js.map +1 -1
- package/dist/list/ListItem.d.ts +3 -2
- package/dist/list/ListItem.js +3 -4
- package/dist/list/ListItem.js.map +1 -1
- package/dist/list/ListItemLink.d.ts +3 -2
- package/dist/list/ListItemLink.js +3 -4
- package/dist/list/ListItemLink.js.map +1 -1
- package/dist/list/ListItemText.d.ts +3 -2
- package/dist/list/ListItemText.js +3 -4
- package/dist/list/ListItemText.js.map +1 -1
- package/dist/list/ListSubheader.d.ts +3 -2
- package/dist/list/ListSubheader.js +3 -4
- package/dist/list/ListSubheader.js.map +1 -1
- package/dist/menu/DropdownMenu.js.map +1 -1
- package/dist/menu/Menu.d.ts +4 -2
- package/dist/menu/Menu.js +5 -4
- package/dist/menu/Menu.js.map +1 -1
- package/dist/menu/MenuBar.d.ts +3 -1
- package/dist/menu/MenuBar.js +3 -4
- package/dist/menu/MenuBar.js.map +1 -1
- package/dist/menu/MenuButton.d.ts +2 -1
- package/dist/menu/MenuButton.js +3 -4
- package/dist/menu/MenuButton.js.map +1 -1
- package/dist/menu/MenuItem.d.ts +3 -1
- package/dist/menu/MenuItem.js +3 -4
- package/dist/menu/MenuItem.js.map +1 -1
- package/dist/menu/MenuItemButton.d.ts +2 -1
- package/dist/menu/MenuItemButton.js +4 -4
- package/dist/menu/MenuItemButton.js.map +1 -1
- package/dist/menu/MenuItemCheckbox.d.ts +2 -1
- package/dist/menu/MenuItemCheckbox.js +4 -4
- package/dist/menu/MenuItemCheckbox.js.map +1 -1
- package/dist/menu/MenuItemCircularProgress.d.ts +3 -2
- package/dist/menu/MenuItemCircularProgress.js +3 -4
- package/dist/menu/MenuItemCircularProgress.js.map +1 -1
- package/dist/menu/MenuItemFileInput.d.ts +2 -2
- package/dist/menu/MenuItemFileInput.js +3 -4
- package/dist/menu/MenuItemFileInput.js.map +1 -1
- package/dist/menu/MenuItemGroup.d.ts +3 -3
- package/dist/menu/MenuItemGroup.js +4 -4
- package/dist/menu/MenuItemGroup.js.map +1 -1
- package/dist/menu/MenuItemInputToggle.d.ts +3 -2
- package/dist/menu/MenuItemInputToggle.js +3 -4
- package/dist/menu/MenuItemInputToggle.js.map +1 -1
- package/dist/menu/MenuItemRadio.d.ts +3 -1
- package/dist/menu/MenuItemRadio.js +4 -4
- package/dist/menu/MenuItemRadio.js.map +1 -1
- package/dist/menu/MenuItemSeparator.d.ts +3 -2
- package/dist/menu/MenuItemSeparator.js +3 -4
- package/dist/menu/MenuItemSeparator.js.map +1 -1
- package/dist/menu/MenuItemSwitch.d.ts +2 -1
- package/dist/menu/MenuItemSwitch.js +4 -4
- package/dist/menu/MenuItemSwitch.js.map +1 -1
- package/dist/menu/MenuItemTextField.d.ts +2 -2
- package/dist/menu/MenuItemTextField.js +3 -4
- package/dist/menu/MenuItemTextField.js.map +1 -1
- package/dist/menu/MenuVisibilityProvider.d.ts +3 -3
- package/dist/menu/MenuVisibilityProvider.js.map +1 -1
- package/dist/menu/MenuWidget.d.ts +4 -4
- package/dist/menu/MenuWidget.js +4 -4
- package/dist/menu/MenuWidget.js.map +1 -1
- package/dist/menu/useContextMenu.d.ts +4 -4
- package/dist/menu/useContextMenu.js.map +1 -1
- package/dist/movement/types.d.ts +5 -5
- package/dist/movement/types.js.map +1 -1
- package/dist/navigation/CollapsibleNavGroup.d.ts +2 -2
- package/dist/navigation/CollapsibleNavGroup.js +3 -4
- package/dist/navigation/CollapsibleNavGroup.js.map +1 -1
- package/dist/navigation/NavGroup.d.ts +3 -2
- package/dist/navigation/NavGroup.js +3 -4
- package/dist/navigation/NavGroup.js.map +1 -1
- package/dist/navigation/NavItem.d.ts +3 -2
- package/dist/navigation/NavItem.js +3 -4
- package/dist/navigation/NavItem.js.map +1 -1
- package/dist/navigation/NavItemButton.d.ts +2 -2
- package/dist/navigation/NavItemButton.js +3 -4
- package/dist/navigation/NavItemButton.js.map +1 -1
- package/dist/navigation/NavItemLink.d.ts +3 -2
- package/dist/navigation/NavItemLink.js +4 -4
- package/dist/navigation/NavItemLink.js.map +1 -1
- package/dist/navigation/NavSubheader.d.ts +2 -1
- package/dist/navigation/NavSubheader.js +3 -4
- package/dist/navigation/NavSubheader.js.map +1 -1
- package/dist/navigation/Navigation.d.ts +1 -1
- package/dist/navigation/Navigation.js +1 -1
- package/dist/navigation/Navigation.js.map +1 -1
- package/dist/navigation/types.d.ts +5 -2
- package/dist/navigation/types.js.map +1 -1
- package/dist/navigation/useActiveHeadingId.js +1 -1
- package/dist/navigation/useActiveHeadingId.js.map +1 -1
- package/dist/overlay/Overlay.d.ts +3 -2
- package/dist/overlay/Overlay.js +3 -4
- package/dist/overlay/Overlay.js.map +1 -1
- package/dist/positioning/useFixedPositioning.d.ts +1 -1
- package/dist/positioning/useFixedPositioning.js.map +1 -1
- package/dist/progress/CircularProgress.d.ts +2 -2
- package/dist/progress/CircularProgress.js +4 -4
- package/dist/progress/CircularProgress.js.map +1 -1
- package/dist/progress/LinearProgress.d.ts +2 -2
- package/dist/progress/LinearProgress.js +4 -4
- package/dist/progress/LinearProgress.js.map +1 -1
- package/dist/progress/types.d.ts +2 -0
- package/dist/progress/types.js.map +1 -1
- package/dist/responsive-item/ResponsiveItem.d.ts +3 -2
- package/dist/responsive-item/ResponsiveItem.js +3 -4
- package/dist/responsive-item/ResponsiveItem.js.map +1 -1
- package/dist/responsive-item/ResponsiveItemOverlay.d.ts +3 -2
- package/dist/responsive-item/ResponsiveItemOverlay.js +3 -4
- package/dist/responsive-item/ResponsiveItemOverlay.js.map +1 -1
- package/dist/segmented-button/SegmentedButton.d.ts +3 -2
- package/dist/segmented-button/SegmentedButton.js +3 -4
- package/dist/segmented-button/SegmentedButton.js.map +1 -1
- package/dist/segmented-button/SegmentedButtonContainer.d.ts +4 -3
- package/dist/segmented-button/SegmentedButtonContainer.js +4 -5
- package/dist/segmented-button/SegmentedButtonContainer.js.map +1 -1
- package/dist/sheet/Sheet.d.ts +2 -1
- package/dist/sheet/Sheet.js +3 -4
- package/dist/sheet/Sheet.js.map +1 -1
- package/dist/snackbar/Snackbar.d.ts +3 -2
- package/dist/snackbar/Snackbar.js +3 -4
- package/dist/snackbar/Snackbar.js.map +1 -1
- package/dist/snackbar/Toast.d.ts +3 -2
- package/dist/snackbar/Toast.js +4 -4
- package/dist/snackbar/Toast.js.map +1 -1
- package/dist/snackbar/ToastActionButton.d.ts +2 -1
- package/dist/snackbar/ToastActionButton.js +3 -4
- package/dist/snackbar/ToastActionButton.js.map +1 -1
- package/dist/snackbar/ToastCloseButton.d.ts +2 -1
- package/dist/snackbar/ToastCloseButton.js +3 -4
- package/dist/snackbar/ToastCloseButton.js.map +1 -1
- package/dist/snackbar/ToastContent.d.ts +3 -2
- package/dist/snackbar/ToastContent.js +4 -4
- package/dist/snackbar/ToastContent.js.map +1 -1
- package/dist/spinbutton/SpinButton.d.ts +4 -3
- package/dist/spinbutton/SpinButton.js +3 -4
- package/dist/spinbutton/SpinButton.js.map +1 -1
- package/dist/spinbutton/types.d.ts +1 -1
- package/dist/spinbutton/types.js.map +1 -1
- package/dist/table/StickyTableSection.d.ts +3 -2
- package/dist/table/StickyTableSection.js +3 -4
- package/dist/table/StickyTableSection.js.map +1 -1
- package/dist/table/Table.d.ts +3 -2
- package/dist/table/Table.js +4 -4
- package/dist/table/Table.js.map +1 -1
- package/dist/table/TableBody.d.ts +3 -2
- package/dist/table/TableBody.js +4 -4
- package/dist/table/TableBody.js.map +1 -1
- package/dist/table/TableCell.d.ts +3 -2
- package/dist/table/TableCell.js +3 -4
- package/dist/table/TableCell.js.map +1 -1
- package/dist/table/TableCellContent.d.ts +3 -2
- package/dist/table/TableCellContent.js +3 -4
- package/dist/table/TableCellContent.js.map +1 -1
- package/dist/table/TableCheckbox.d.ts +3 -2
- package/dist/table/TableCheckbox.js +3 -4
- package/dist/table/TableCheckbox.js.map +1 -1
- package/dist/table/TableContainer.d.ts +5 -3
- package/dist/table/TableContainer.js +4 -4
- package/dist/table/TableContainer.js.map +1 -1
- package/dist/table/TableContainerProvider.d.ts +1 -1
- package/dist/table/TableContainerProvider.js.map +1 -1
- package/dist/table/TableFooter.d.ts +3 -2
- package/dist/table/TableFooter.js +4 -5
- package/dist/table/TableFooter.js.map +1 -1
- package/dist/table/TableHeader.d.ts +3 -2
- package/dist/table/TableHeader.js +4 -5
- package/dist/table/TableHeader.js.map +1 -1
- package/dist/table/TableRadio.d.ts +3 -2
- package/dist/table/TableRadio.js +3 -4
- package/dist/table/TableRadio.js.map +1 -1
- package/dist/table/TableRow.d.ts +3 -2
- package/dist/table/TableRow.js +3 -4
- package/dist/table/TableRow.js.map +1 -1
- package/dist/tabs/SimpleTabPanel.d.ts +3 -2
- package/dist/tabs/SimpleTabPanel.js +3 -4
- package/dist/tabs/SimpleTabPanel.js.map +1 -1
- package/dist/tabs/SimpleTabPanels.d.ts +3 -2
- package/dist/tabs/SimpleTabPanels.js +3 -4
- package/dist/tabs/SimpleTabPanels.js.map +1 -1
- package/dist/tabs/TabList.d.ts +3 -2
- package/dist/tabs/TabList.js +4 -4
- package/dist/tabs/TabList.js.map +1 -1
- package/dist/tabs/TabListScrollButton.d.ts +3 -2
- package/dist/tabs/TabListScrollButton.js +4 -4
- package/dist/tabs/TabListScrollButton.js.map +1 -1
- package/dist/tabs/useTabList.d.ts +2 -2
- package/dist/tabs/useTabList.js.map +1 -1
- package/dist/theme/useCSSVariables.d.ts +1 -1
- package/dist/theme/useCSSVariables.js.map +1 -1
- package/dist/tooltip/Tooltip.d.ts +3 -2
- package/dist/tooltip/Tooltip.js +3 -4
- package/dist/tooltip/Tooltip.js.map +1 -1
- package/dist/tooltip/useTooltip.d.ts +3 -3
- package/dist/tooltip/useTooltip.js.map +1 -1
- package/dist/transition/SkeletonPlaceholder.d.ts +3 -2
- package/dist/transition/SkeletonPlaceholder.js +3 -4
- package/dist/transition/SkeletonPlaceholder.js.map +1 -1
- package/dist/transition/Slide.d.ts +3 -2
- package/dist/transition/Slide.js +3 -4
- package/dist/transition/Slide.js.map +1 -1
- package/dist/transition/SlideContainer.d.ts +3 -2
- package/dist/transition/SlideContainer.js +3 -4
- package/dist/transition/SlideContainer.js.map +1 -1
- package/dist/tree/TreeGroup.d.ts +2 -2
- package/dist/tree/TreeGroup.js +3 -4
- package/dist/tree/TreeGroup.js.map +1 -1
- package/dist/tree/TreeProvider.d.ts +2 -3
- package/dist/tree/TreeProvider.js.map +1 -1
- package/dist/tree/useTreeMovement.d.ts +6 -7
- package/dist/tree/useTreeMovement.js.map +1 -1
- package/dist/types.d.ts +1 -15
- package/dist/types.js.map +1 -1
- package/dist/typography/Mark.d.ts +3 -2
- package/dist/typography/Mark.js +3 -4
- package/dist/typography/Mark.js.map +1 -1
- package/dist/typography/SrOnly.d.ts +3 -2
- package/dist/typography/SrOnly.js +3 -4
- package/dist/typography/SrOnly.js.map +1 -1
- package/dist/typography/TextContainer.d.ts +3 -2
- package/dist/typography/TextContainer.js +3 -4
- package/dist/typography/TextContainer.js.map +1 -1
- package/dist/typography/Typography.d.ts +3 -2
- package/dist/typography/Typography.js +3 -4
- package/dist/typography/Typography.js.map +1 -1
- package/dist/useAsyncFunction.d.ts +3 -2
- package/dist/useAsyncFunction.js.map +1 -1
- package/dist/useDebouncedFunction.js +1 -1
- package/dist/useDebouncedFunction.js.map +1 -1
- package/dist/useDropzone.js +1 -1
- package/dist/useDropzone.js.map +1 -1
- package/dist/useEnsuredRef.d.ts +3 -3
- package/dist/useEnsuredRef.js +1 -1
- package/dist/useEnsuredRef.js.map +1 -1
- package/dist/useThrottledFunction.js +3 -3
- package/dist/useThrottledFunction.js.map +1 -1
- package/dist/useUnmounted.d.ts +2 -2
- package/dist/useUnmounted.js.map +1 -1
- package/dist/utils/applyRef.d.ts +1 -1
- package/dist/utils/applyRef.js.map +1 -1
- package/dist/window-splitter/WindowSplitter.d.ts +3 -2
- package/dist/window-splitter/WindowSplitter.js +3 -4
- package/dist/window-splitter/WindowSplitter.js.map +1 -1
- package/package.json +9 -9
- package/src/app-bar/AppBar.tsx +54 -54
- package/src/app-bar/AppBarTitle.tsx +29 -27
- package/src/autocomplete/AutocompleteChip.tsx +4 -6
- package/src/autocomplete/types.ts +2 -0
- package/src/autocomplete/utils.ts +4 -4
- package/src/avatar/Avatar.tsx +47 -45
- package/src/badge/Badge.tsx +17 -11
- package/src/box/Box.tsx +51 -50
- package/src/button/AsyncButton.tsx +125 -119
- package/src/button/Button.tsx +74 -73
- package/src/button/ButtonUnstyled.tsx +9 -9
- package/src/button/FloatingActionButton.tsx +9 -7
- package/src/button/TooltippedButton.tsx +6 -6
- package/src/card/Card.tsx +36 -35
- package/src/card/CardContent.tsx +31 -28
- package/src/card/CardFooter.tsx +22 -16
- package/src/card/CardHeader.tsx +36 -30
- package/src/card/CardSubtitle.tsx +8 -6
- package/src/card/CardTitle.tsx +26 -25
- package/src/card/ClickableCard.tsx +57 -54
- package/src/chip/Chip.tsx +122 -120
- package/src/datetime/NativeDateField.tsx +7 -7
- package/src/datetime/NativeTimeField.tsx +7 -7
- package/src/dialog/Dialog.tsx +156 -150
- package/src/dialog/DialogContainer.tsx +35 -29
- package/src/dialog/DialogContent.tsx +26 -19
- package/src/dialog/DialogFooter.tsx +22 -19
- package/src/dialog/DialogHeader.tsx +24 -23
- package/src/dialog/DialogTitle.tsx +27 -26
- package/src/dialog/FixedDialog.tsx +70 -69
- package/src/divider/Divider.tsx +32 -26
- package/src/draggable/useDraggable.ts +3 -6
- package/src/draggable/utils.ts +1 -1
- package/src/expansion-panel/ExpansionList.tsx +24 -19
- package/src/expansion-panel/ExpansionPanel.tsx +11 -6
- package/src/expansion-panel/ExpansionPanelHeader.tsx +9 -6
- package/src/files/FileInput.tsx +79 -79
- package/src/focus/useFocusContainer.ts +1 -1
- package/src/form/Checkbox.tsx +6 -6
- package/src/form/Fieldset.tsx +33 -28
- package/src/form/Form.tsx +26 -25
- package/src/form/FormMessage.tsx +13 -7
- package/src/form/FormMessageContainer.tsx +12 -9
- package/src/form/FormMessageCounter.tsx +8 -7
- package/src/form/InputToggle.tsx +105 -107
- package/src/form/InputToggleIcon.tsx +12 -6
- package/src/form/Label.tsx +40 -41
- package/src/form/Legend.tsx +44 -43
- package/src/form/NativeSelect.tsx +116 -114
- package/src/form/OptGroup.tsx +15 -15
- package/src/form/Option.tsx +123 -122
- package/src/form/Password.tsx +66 -67
- package/src/form/Radio.tsx +6 -6
- package/src/form/ResizingTextAreaWrapper.tsx +7 -6
- package/src/form/SliderContainer.tsx +35 -29
- package/src/form/SliderThumb.tsx +8 -6
- package/src/form/SliderTrack.tsx +80 -80
- package/src/form/Switch.tsx +80 -79
- package/src/form/SwitchTrack.tsx +35 -34
- package/src/form/TextArea.tsx +167 -165
- package/src/form/TextField.tsx +106 -104
- package/src/form/TextFieldAddon.tsx +33 -32
- package/src/form/TextFieldContainer.tsx +8 -6
- package/src/form/sliderUtils.ts +1 -1
- package/src/form/types.ts +15 -5
- package/src/form/useCombobox.ts +6 -10
- package/src/form/useFormReset.ts +1 -1
- package/src/form/useTextField.ts +4 -4
- package/src/hoverMode/useHoverMode.ts +1 -1
- package/src/hoverMode/useHoverModeProvider.ts +13 -8
- package/src/icon/FontIcon.tsx +32 -30
- package/src/icon/IconRotator.tsx +30 -28
- package/src/icon/MaterialIcon.tsx +36 -30
- package/src/icon/MaterialSymbol.tsx +50 -44
- package/src/icon/SVGIcon.tsx +47 -41
- package/src/layout/LayoutAppBar.tsx +23 -28
- package/src/layout/LayoutNav.tsx +68 -62
- package/src/layout/LayoutWindowSplitter.tsx +9 -7
- package/src/layout/Main.tsx +30 -29
- package/src/link/Link.tsx +16 -11
- package/src/link/SkipToMainContent.tsx +6 -6
- package/src/list/List.tsx +31 -29
- package/src/list/ListItem.tsx +126 -125
- package/src/list/ListItemLink.tsx +128 -126
- package/src/list/ListItemText.tsx +42 -37
- package/src/list/ListSubheader.tsx +27 -26
- package/src/menu/DropdownMenu.tsx +2 -2
- package/src/menu/Menu.tsx +327 -326
- package/src/menu/MenuBar.tsx +51 -50
- package/src/menu/MenuButton.tsx +69 -70
- package/src/menu/MenuItem.tsx +37 -37
- package/src/menu/MenuItemButton.tsx +132 -133
- package/src/menu/MenuItemCheckbox.tsx +6 -7
- package/src/menu/MenuItemCircularProgress.tsx +13 -6
- package/src/menu/MenuItemFileInput.tsx +4 -6
- package/src/menu/MenuItemGroup.tsx +18 -18
- package/src/menu/MenuItemInputToggle.tsx +8 -6
- package/src/menu/MenuItemRadio.tsx +6 -6
- package/src/menu/MenuItemSeparator.tsx +7 -7
- package/src/menu/MenuItemSwitch.tsx +6 -6
- package/src/menu/MenuItemTextField.tsx +5 -7
- package/src/menu/MenuVisibilityProvider.tsx +3 -2
- package/src/menu/MenuWidget.tsx +123 -119
- package/src/menu/useContextMenu.ts +7 -4
- package/src/movement/types.ts +5 -9
- package/src/navigation/CollapsibleNavGroup.tsx +10 -6
- package/src/navigation/NavGroup.tsx +18 -19
- package/src/navigation/NavItem.tsx +16 -11
- package/src/navigation/NavItemButton.tsx +69 -66
- package/src/navigation/NavItemLink.tsx +102 -100
- package/src/navigation/NavSubheader.tsx +14 -16
- package/src/navigation/Navigation.tsx +1 -1
- package/src/navigation/types.ts +13 -4
- package/src/navigation/useActiveHeadingId.ts +1 -1
- package/src/overlay/Overlay.tsx +66 -65
- package/src/positioning/useFixedPositioning.ts +1 -1
- package/src/progress/CircularProgress.tsx +6 -6
- package/src/progress/LinearProgress.tsx +6 -6
- package/src/progress/types.ts +4 -0
- package/src/responsive-item/ResponsiveItem.tsx +29 -28
- package/src/responsive-item/ResponsiveItemOverlay.tsx +9 -8
- package/src/segmented-button/SegmentedButton.tsx +11 -6
- package/src/segmented-button/SegmentedButtonContainer.tsx +14 -8
- package/src/sheet/Sheet.tsx +42 -43
- package/src/snackbar/Snackbar.tsx +44 -38
- package/src/snackbar/Toast.tsx +110 -109
- package/src/snackbar/ToastActionButton.tsx +6 -6
- package/src/snackbar/ToastCloseButton.tsx +4 -6
- package/src/snackbar/ToastContent.tsx +56 -49
- package/src/spinbutton/SpinButton.tsx +9 -8
- package/src/spinbutton/types.ts +1 -1
- package/src/table/StickyTableSection.tsx +8 -6
- package/src/table/Table.tsx +47 -41
- package/src/table/TableBody.tsx +46 -42
- package/src/table/TableCell.tsx +83 -81
- package/src/table/TableCellContent.tsx +11 -6
- package/src/table/TableCheckbox.tsx +6 -6
- package/src/table/TableContainer.tsx +31 -26
- package/src/table/TableContainerProvider.ts +1 -1
- package/src/table/TableFooter.tsx +7 -12
- package/src/table/TableHeader.tsx +15 -9
- package/src/table/TableRadio.tsx +59 -58
- package/src/table/TableRow.tsx +34 -33
- package/src/tabs/SimpleTabPanel.tsx +18 -13
- package/src/tabs/SimpleTabPanels.tsx +11 -7
- package/src/tabs/TabList.tsx +106 -105
- package/src/tabs/TabListScrollButton.tsx +9 -6
- package/src/tabs/useTabList.ts +2 -2
- package/src/theme/useCSSVariables.ts +1 -1
- package/src/tooltip/Tooltip.tsx +61 -61
- package/src/tooltip/useTooltip.ts +2 -3
- package/src/transition/SkeletonPlaceholder.tsx +8 -6
- package/src/transition/Slide.tsx +54 -48
- package/src/transition/SlideContainer.tsx +16 -16
- package/src/tree/TreeGroup.tsx +54 -55
- package/src/tree/TreeProvider.tsx +2 -2
- package/src/tree/useTreeMovement.ts +6 -6
- package/src/types.ts +1 -16
- package/src/typography/Mark.tsx +16 -11
- package/src/typography/SrOnly.tsx +41 -35
- package/src/typography/TextContainer.tsx +12 -12
- package/src/typography/Typography.tsx +42 -41
- package/src/useAsyncFunction.ts +3 -3
- package/src/useDebouncedFunction.ts +1 -1
- package/src/useDropzone.ts +1 -1
- package/src/useEnsuredRef.ts +3 -3
- package/src/useThrottledFunction.ts +3 -3
- package/src/useUnmounted.ts +2 -4
- package/src/utils/applyRef.ts +2 -2
- package/src/window-splitter/WindowSplitter.tsx +6 -6
package/dist/icon/SVGIcon.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { icon } from "./styles.js";
|
|
4
3
|
/**
|
|
5
4
|
* The `SVGIcon` component is used to render inline SVG icons or SVG icons in a
|
|
6
5
|
* sprite map as an icon.
|
|
7
6
|
*
|
|
8
7
|
* @see {@link https://react-md.dev/components/icon | Icon Demos}
|
|
9
|
-
*/ export
|
|
10
|
-
const { "aria-hidden": ariaHidden = true, focusable = "false", use, xmlns = use ? "http://www.w3.org/2000/svg" : undefined, viewBox = "0 0 24 24", dense = false, className, theme, inline, children: propChildren, ...remaining } = props;
|
|
8
|
+
*/ export function SVGIcon(props) {
|
|
9
|
+
const { ref, "aria-hidden": ariaHidden = true, focusable = "false", use, xmlns = use ? "http://www.w3.org/2000/svg" : undefined, viewBox = "0 0 24 24", dense = false, className, theme, inline, children: propChildren, ...remaining } = props;
|
|
11
10
|
let children = propChildren;
|
|
12
11
|
if (!children && use) {
|
|
13
12
|
children = /*#__PURE__*/ _jsx("use", {
|
|
@@ -30,6 +29,6 @@ import { icon } from "./styles.js";
|
|
|
30
29
|
viewBox: viewBox,
|
|
31
30
|
children: children
|
|
32
31
|
});
|
|
33
|
-
}
|
|
32
|
+
}
|
|
34
33
|
|
|
35
34
|
//# sourceMappingURL=SVGIcon.js.map
|
package/dist/icon/SVGIcon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/icon/SVGIcon.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/icon/SVGIcon.tsx"],"sourcesContent":["import {\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\n\nimport { type SVGIconClassNameOptions, icon } from \"./styles.js\";\n\n/**\n * @since 6.0.0 Added the `inline` and `theme` props.\n */\nexport interface SVGIconProps\n extends HTMLAttributes<SVGSVGElement>, SVGIconClassNameOptions {\n ref?: Ref<SVGSVGElement>;\n\n /**\n * Boolean if the SVG should gain the `focusable` attribute. This is disabled\n * by default since IE11 and Edge actually default this to true and keyboard's\n * will tab focus all SVGs.\n *\n * @defaultValue `false`\n */\n focusable?: \"false\" | \"true\" | boolean;\n\n /**\n * The `viewBox` attribute allows you to specify that a given set of graphics\n * stretch to fit a particular container element.\n *\n * The value of the `viewBox` attribute is a list of four numbers min-x,\n * min-y, width and height, separated by white space and/or a comma, which\n * specify a rectangle in user space which should be mapped to the bounds of\n * the viewport established by the given element, taking into account\n * attribute `preserveAspectRatio`.\n *\n * Negative values for width or height are not permitted and a value of zero\n * disables rendering of the element. An optional `viewbox` for the SVG.\n *\n * For example, if the SVG element is 250 (width) by 200 (height) and you\n * provide `viewBox=\"0 0 25 20\"`, the coordinates inside the SVG will go from\n * the top left corner (0, 0) to the bottom right (25, 20) and each unit will\n * be worth `10px`.\n *\n * @defaultValue `\"0 0 24 24\"`\n */\n viewBox?: string;\n\n /**\n * An optional `xmlns` string to provide. The `use` prop will not work without\n * this prop defined.\n *\n *\n * Note: The default value will be `undefined` unless the {@link use} prop is\n * defined.\n *\n * @defaultValue `\"http://www.w3.org/2000/svg\"`\n */\n xmlns?: string;\n\n /**\n * This should be a link to a part of an SVG sprite map. So normally one of\n * the following:\n * - `'#some-custom-svg'`\n * - `'/images/spritemap.svg#some-custom-svg'`\n *\n * This prop **should not** be used with the `children` prop as only one will\n * be rendered.\n *\n *\n * NOTE: IE **does not support** external SVGs. Please see the demo for more\n * details.\n */\n use?: string;\n\n /**\n * Any `<svg>` children to render to create your icon. This can not be used\n * with the `use` prop.\n */\n children?: ReactNode;\n}\n\n/**\n * The `SVGIcon` component is used to render inline SVG icons or SVG icons in a\n * sprite map as an icon.\n *\n * @see {@link https://react-md.dev/components/icon | Icon Demos}\n */\nexport function SVGIcon(props: SVGIconProps): ReactElement {\n const {\n ref,\n \"aria-hidden\": ariaHidden = true,\n focusable = \"false\",\n use,\n xmlns = use ? \"http://www.w3.org/2000/svg\" : undefined,\n viewBox = \"0 0 24 24\",\n dense = false,\n className,\n theme,\n inline,\n children: propChildren,\n ...remaining\n } = props;\n\n let children = propChildren;\n if (!children && use) {\n children = <use xlinkHref={use} />;\n }\n\n return (\n <svg\n {...remaining}\n aria-hidden={ariaHidden}\n ref={ref}\n className={icon({\n type: \"svg\",\n dense,\n theme,\n inline,\n className,\n })}\n focusable={focusable}\n xmlns={xmlns}\n viewBox={viewBox}\n >\n {children}\n </svg>\n );\n}\n"],"names":["icon","SVGIcon","props","ref","ariaHidden","focusable","use","xmlns","undefined","viewBox","dense","className","theme","inline","children","propChildren","remaining","xlinkHref","svg","aria-hidden","type"],"mappings":";AAOA,SAAuCA,IAAI,QAAQ,cAAc;AA0EjE;;;;;CAKC,GACD,OAAO,SAASC,QAAQC,KAAmB;IACzC,MAAM,EACJC,GAAG,EACH,eAAeC,aAAa,IAAI,EAChCC,YAAY,OAAO,EACnBC,GAAG,EACHC,QAAQD,MAAM,+BAA+BE,SAAS,EACtDC,UAAU,WAAW,EACrBC,QAAQ,KAAK,EACbC,SAAS,EACTC,KAAK,EACLC,MAAM,EACNC,UAAUC,YAAY,EACtB,GAAGC,WACJ,GAAGd;IAEJ,IAAIY,WAAWC;IACf,IAAI,CAACD,YAAYR,KAAK;QACpBQ,yBAAW,KAACR;YAAIW,WAAWX;;IAC7B;IAEA,qBACE,KAACY;QACE,GAAGF,SAAS;QACbG,eAAaf;QACbD,KAAKA;QACLQ,WAAWX,KAAK;YACdoB,MAAM;YACNV;YACAE;YACAC;YACAF;QACF;QACAN,WAAWA;QACXE,OAAOA;QACPE,SAASA;kBAERK;;AAGP"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactElement, type Ref } from "react";
|
|
1
2
|
import { type AppBarProps, type CustomAppBarComponent } from "../app-bar/AppBar.js";
|
|
2
3
|
import { type SkipToMainContentProps } from "../link/SkipToMainContent.js";
|
|
3
4
|
import { type CssPosition, type PropsWithRef } from "../types.js";
|
|
@@ -5,6 +6,7 @@ import { type CssPosition, type PropsWithRef } from "../types.js";
|
|
|
5
6
|
* @since 6.0.0 Only supports `AppBar` + `SkipToMainContent` props
|
|
6
7
|
*/
|
|
7
8
|
export interface LayoutAppBarProps extends AppBarProps {
|
|
9
|
+
ref?: Ref<HTMLDivElement>;
|
|
8
10
|
/** @defaultValue `"header"` */
|
|
9
11
|
as?: CustomAppBarComponent;
|
|
10
12
|
/** @defaultValue `"fixed"` */
|
|
@@ -48,4 +50,4 @@ export interface LayoutAppBarProps extends AppBarProps {
|
|
|
48
50
|
* `LayoutAppBarTitle` since they no longer exist. The only purpose of this
|
|
49
51
|
* component is to dynamically set the `--rmd-layout-header-height` variable.
|
|
50
52
|
*/
|
|
51
|
-
export declare
|
|
53
|
+
export declare function LayoutAppBar(props: LayoutAppBarProps): ReactElement;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
3
|
import { AppBar } from "../app-bar/AppBar.js";
|
|
5
4
|
import { SkipToMainContent } from "../link/SkipToMainContent.js";
|
|
6
5
|
import { useCSSVariables } from "../theme/useCSSVariables.js";
|
|
@@ -39,8 +38,8 @@ import { useLayoutAppBarHeight } from "./useLayoutAppBarHeight.js";
|
|
|
39
38
|
* @since 6.0.0 This component no longer renders the `LayoutNavToggle` and
|
|
40
39
|
* `LayoutAppBarTitle` since they no longer exist. The only purpose of this
|
|
41
40
|
* component is to dynamically set the `--rmd-layout-header-height` variable.
|
|
42
|
-
*/ export
|
|
43
|
-
const { as = "header", id: propId, position = "fixed", skipProps, children, ...remaining } = props;
|
|
41
|
+
*/ export function LayoutAppBar(props) {
|
|
42
|
+
const { ref, as = "header", id: propId, position = "fixed", skipProps, children, ...remaining } = props;
|
|
44
43
|
const id = useEnsuredId(propId, "layout-header");
|
|
45
44
|
const { appBarRef, variables } = useLayoutAppBarHeight(ref);
|
|
46
45
|
useCSSVariables(variables);
|
|
@@ -57,6 +56,6 @@ import { useLayoutAppBarHeight } from "./useLayoutAppBarHeight.js";
|
|
|
57
56
|
children
|
|
58
57
|
]
|
|
59
58
|
});
|
|
60
|
-
}
|
|
59
|
+
}
|
|
61
60
|
|
|
62
61
|
//# sourceMappingURL=LayoutAppBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/layout/LayoutAppBar.tsx"],"sourcesContent":["\"use client\";\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/layout/LayoutAppBar.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactElement, type Ref } from \"react\";\n\nimport {\n AppBar,\n type AppBarProps,\n type CustomAppBarComponent,\n} from \"../app-bar/AppBar.js\";\nimport {\n SkipToMainContent,\n type SkipToMainContentProps,\n} from \"../link/SkipToMainContent.js\";\nimport { useCSSVariables } from \"../theme/useCSSVariables.js\";\nimport { type CssPosition, type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { useLayoutAppBarHeight } from \"./useLayoutAppBarHeight.js\";\n\n/**\n * @since 6.0.0 Only supports `AppBar` + `SkipToMainContent` props\n */\nexport interface LayoutAppBarProps extends AppBarProps {\n ref?: Ref<HTMLDivElement>;\n\n /** @defaultValue `\"header\"` */\n as?: CustomAppBarComponent;\n\n /** @defaultValue `\"fixed\"` */\n position?: CssPosition;\n\n /**\n * Any additional props to pass to the {@link SkipToMainContent} component.\n */\n skipProps?: PropsWithRef<SkipToMainContentProps>;\n}\n\n/**\n * **Client Component**\n *\n * This component is used to dynamically update the `--rmd-layout-header-offset`\n * based on the current height of this app bar. If you are concerned about\n * javascript bundle size, it is recommended to configure this variable in SCSS\n * instead.\n *\n * @example Static Height\n * ```scss\n * @use \"everything\" as *;\n *\n * :root {\n * @include layout-set-var(header-height, $app-bar-height);\n * }\n * ```\n *\n * @example Media Query Height Changes\n * ```scss\n * @use \"everything\" as *;\n *\n * :root {\n * @include layout-set-var(header-height, $app-bar-height);\n * @include tablet-media {\n * @include layout-set-var(header-height, $app-bar-dense-height);\n * }\n * }\n * ```\n *\n * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}\n * @since 6.0.0 This component no longer renders the `LayoutNavToggle` and\n * `LayoutAppBarTitle` since they no longer exist. The only purpose of this\n * component is to dynamically set the `--rmd-layout-header-height` variable.\n */\nexport function LayoutAppBar(props: LayoutAppBarProps): ReactElement {\n const {\n ref,\n as = \"header\",\n id: propId,\n position = \"fixed\",\n skipProps,\n children,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"layout-header\");\n const { appBarRef, variables } = useLayoutAppBarHeight(ref);\n useCSSVariables(variables);\n\n return (\n <AppBar {...remaining} id={id} as={as} ref={appBarRef} position={position}>\n <SkipToMainContent {...skipProps} />\n {children}\n </AppBar>\n );\n}\n"],"names":["AppBar","SkipToMainContent","useCSSVariables","useEnsuredId","useLayoutAppBarHeight","LayoutAppBar","props","ref","as","id","propId","position","skipProps","children","remaining","appBarRef","variables"],"mappings":"AAAA;;AAIA,SACEA,MAAM,QAGD,uBAAuB;AAC9B,SACEC,iBAAiB,QAEZ,+BAA+B;AACtC,SAASC,eAAe,QAAQ,8BAA8B;AAE9D,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,qBAAqB,QAAQ,6BAA6B;AAoBnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCC,GACD,OAAO,SAASC,aAAaC,KAAwB;IACnD,MAAM,EACJC,GAAG,EACHC,KAAK,QAAQ,EACbC,IAAIC,MAAM,EACVC,WAAW,OAAO,EAClBC,SAAS,EACTC,QAAQ,EACR,GAAGC,WACJ,GAAGR;IACJ,MAAMG,KAAKN,aAAaO,QAAQ;IAChC,MAAM,EAAEK,SAAS,EAAEC,SAAS,EAAE,GAAGZ,sBAAsBG;IACvDL,gBAAgBc;IAEhB,qBACE,MAAChB;QAAQ,GAAGc,SAAS;QAAEL,IAAIA;QAAID,IAAIA;QAAID,KAAKQ;QAAWJ,UAAUA;;0BAC/D,KAACV;gBAAmB,GAAGW,SAAS;;YAC/BC;;;AAGP"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type HTMLAttributes, type ReactNode } from "react";
|
|
1
|
+
import { type HTMLAttributes, type ReactElement, type ReactNode, type Ref } from "react";
|
|
2
2
|
import { type BaseSheetClassNameOptions } from "../sheet/styles.js";
|
|
3
3
|
import { type CSSTransitionClassNames, type TransitionActions, type TransitionCallbacks, type TransitionTimeout } from "../transition/types.js";
|
|
4
4
|
/**
|
|
5
5
|
* @since 6.0.0
|
|
6
6
|
*/
|
|
7
7
|
export interface LayoutNavProps extends HTMLAttributes<HTMLDivElement>, BaseSheetClassNameOptions, TransitionCallbacks, TransitionActions {
|
|
8
|
+
ref?: Ref<HTMLDivElement>;
|
|
8
9
|
children: ReactNode;
|
|
9
10
|
/**
|
|
10
11
|
* The component to render as.
|
|
@@ -109,4 +110,4 @@ export interface LayoutNavProps extends HTMLAttributes<HTMLDivElement>, BaseShee
|
|
|
109
110
|
* @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
|
|
110
111
|
* @since 6.0.0
|
|
111
112
|
*/
|
|
112
|
-
export declare
|
|
113
|
+
export declare function LayoutNav(props: LayoutNavProps): ReactElement;
|
package/dist/layout/LayoutNav.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { cnb } from "cnbuilder";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
4
|
import { DEFAULT_SHEET_CLASSNAMES, DEFAULT_SHEET_TIMEOUT, sheet } from "../sheet/styles.js";
|
|
6
5
|
import { useCSSTransition } from "../transition/useCSSTransition.js";
|
|
7
6
|
import { layoutNav } from "./layoutNavStyles.js";
|
|
@@ -85,8 +84,8 @@ import { layoutNav } from "./layoutNavStyles.js";
|
|
|
85
84
|
*
|
|
86
85
|
* @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
|
|
87
86
|
* @since 6.0.0
|
|
88
|
-
*/ export
|
|
89
|
-
const { as: Component = "nav", "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel = Component === "nav" && !ariaLabelledBy ? "Navigation" : undefined, expanded, children, className, timeout = DEFAULT_SHEET_TIMEOUT, classNames = DEFAULT_SHEET_CLASSNAMES, appear, enter, exit, onEnter, onEntering, onEntered, onExit, onExited, onExiting, appBarOffset, ...remaining } = props;
|
|
87
|
+
*/ export function LayoutNav(props) {
|
|
88
|
+
const { ref, as: Component = "nav", "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel = Component === "nav" && !ariaLabelledBy ? "Navigation" : undefined, expanded, children, className, timeout = DEFAULT_SHEET_TIMEOUT, classNames = DEFAULT_SHEET_CLASSNAMES, appear, enter, exit, onEnter, onEntering, onEntered, onExit, onExited, onExiting, appBarOffset, ...remaining } = props;
|
|
90
89
|
const { elementProps } = useCSSTransition({
|
|
91
90
|
nodeRef: ref,
|
|
92
91
|
timeout,
|
|
@@ -117,6 +116,6 @@ import { layoutNav } from "./layoutNavStyles.js";
|
|
|
117
116
|
...elementProps,
|
|
118
117
|
children: children
|
|
119
118
|
});
|
|
120
|
-
}
|
|
119
|
+
}
|
|
121
120
|
|
|
122
121
|
//# sourceMappingURL=LayoutNav.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/layout/LayoutNav.tsx"],"sourcesContent":["\"use client\";\n\nimport { cnb } from \"cnbuilder\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/layout/LayoutNav.tsx"],"sourcesContent":["\"use client\";\n\nimport { cnb } from \"cnbuilder\";\nimport {\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\n\nimport {\n type BaseSheetClassNameOptions,\n DEFAULT_SHEET_CLASSNAMES,\n DEFAULT_SHEET_TIMEOUT,\n sheet,\n} from \"../sheet/styles.js\";\nimport {\n type CSSTransitionClassNames,\n type TransitionActions,\n type TransitionCallbacks,\n type TransitionTimeout,\n} from \"../transition/types.js\";\nimport { useCSSTransition } from \"../transition/useCSSTransition.js\";\nimport { layoutNav } from \"./layoutNavStyles.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface LayoutNavProps\n extends\n HTMLAttributes<HTMLDivElement>,\n BaseSheetClassNameOptions,\n TransitionCallbacks,\n TransitionActions {\n ref?: Ref<HTMLDivElement>;\n\n children: ReactNode;\n\n /**\n * The component to render as.\n *\n * @defaultValue `\"nav\"`\n */\n as?: \"nav\" | \"div\";\n\n /**\n * Set this to `true` to display the navigation.\n */\n expanded: boolean;\n\n /**\n * Set this to `true` to force the navigation to appear below the fixed app\n * bar.\n *\n * @defaultValue `false`\n */\n appBarOffset?: boolean;\n\n /** @defaultValue {@link DEFAULT_SHEET_TIMEOUT} */\n timeout?: TransitionTimeout;\n /** @defaultValue {@link DEFAULT_SHEET_CLASSNAMES} */\n classNames?: CSSTransitionClassNames;\n}\n\n/**\n * **Client Component**\n *\n * This component is used to render a persistent navigation on the left of the\n * page. There is some built-in functionality to support resizing with the\n * `LayoutWindowSplitter` and expandable layouts. Do not use this component for\n * temporary navigation and instead use a `Sheet`.\n *\n * @example Full Height Layout\n * ```tsx\n * \"use client\";\n * import { LayoutAppBar } from \"@react-md/core/layout/LayoutAppBar\";\n * import { LayoutNav } from \"@react-md/core/layout/LayoutNav\";\n * import { Main } from \"@react-md/core/layout/Main\";\n * import { useHorizontalLayoutTransition } from \"@react-md/core/layout/useHorizontalLayoutTransition\";\n * import type { ReactElement, PropsWithChildren } from \"react\";\n *\n * function Layout({ children }: PropsWithChildren): ReactElement {\n * const { elementProps } = useHorizontalLayoutTransition({\n * transitionIn: true,\n * });\n *\n * return (\n * <>\n * <LayoutAppBar {...elementProps}>\n * <YourAppBarContent />\n * </LayoutAppBar>\n * <LayoutNav expanded>\n * <YourNavigationComponent />\n * </LayoutNav>\n * <Main navOffset appBarOffset {...elementProps}>\n * {children}\n * </Main>\n * </>\n * );\n * }\n * ```\n *\n * @example Toggleable Layout\n * ```tsx\n * \"use client\";\n * import { LayoutAppBar } from \"@react-md/core/layout/LayoutAppBar\";\n * import { Main } from \"@react-md/core/layout/Main\";\n * import { useHorizontalLayoutTransition } from \"@react-md/core/layout/useHorizontalLayoutTransition\";\n * import { useToggle } from \"@react-md/core/useToggle\";\n * import MenuIcon from \"@react-md/material-icons/MenuIcon\";\n * import { cnb } from \"cnbuilder\";\n * import type { ReactElement, PropsWithChildren } from \"react\";\n *\n * function Layout({ children }: PropsWithChildren): ReactElement {\n * const { toggled: expanded, toggle } = useToggle();\n * const { elementProps } = useHorizontalLayoutTransition({\n * transitionIn: expanded,\n * });\n *\n * return (\n * <>\n * <LayoutAppBar {...elementProps}>\n * <Button\n * aria-label=\"Navigation\"\n * onClick={toggle}\n * buttonType=\"icon\"\n * >\n * <MenuIcon />\n * </Button>\n * <YourAppBarContent />\n * </LayoutAppBar>\n * <LayoutNav expanded>\n * <YourNavigationComponent />\n * </LayoutNav>\n * <Main navOffset={expanded} appBarOffset {...elementProps}>\n * {children}\n * </Main>\n * </>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}\n * @since 6.0.0\n */\nexport function LayoutNav(props: LayoutNavProps): ReactElement {\n const {\n ref,\n as: Component = \"nav\",\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel = Component === \"nav\" && !ariaLabelledBy\n ? \"Navigation\"\n : undefined,\n expanded,\n children,\n className,\n timeout = DEFAULT_SHEET_TIMEOUT,\n classNames = DEFAULT_SHEET_CLASSNAMES,\n appear,\n enter,\n exit,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExited,\n onExiting,\n appBarOffset,\n ...remaining\n } = props;\n const { elementProps } = useCSSTransition({\n nodeRef: ref,\n timeout,\n className: cnb(\n layoutNav({ appBarOffset }),\n sheet({\n className,\n raised: false,\n horizontalSize: \"none\",\n })\n ),\n classNames,\n enter,\n exit,\n appear,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExited,\n onExiting,\n exitedHidden: true,\n transitionIn: expanded,\n });\n\n return (\n <Component\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n {...remaining}\n {...elementProps}\n >\n {children}\n </Component>\n );\n}\n"],"names":["cnb","DEFAULT_SHEET_CLASSNAMES","DEFAULT_SHEET_TIMEOUT","sheet","useCSSTransition","layoutNav","LayoutNav","props","ref","as","Component","ariaLabelledBy","ariaLabel","undefined","expanded","children","className","timeout","classNames","appear","enter","exit","onEnter","onEntering","onEntered","onExit","onExited","onExiting","appBarOffset","remaining","elementProps","nodeRef","raised","horizontalSize","exitedHidden","transitionIn","aria-label","aria-labelledby"],"mappings":"AAAA;;AAEA,SAASA,GAAG,QAAQ,YAAY;AAQhC,SAEEC,wBAAwB,EACxBC,qBAAqB,EACrBC,KAAK,QACA,qBAAqB;AAO5B,SAASC,gBAAgB,QAAQ,oCAAoC;AACrE,SAASC,SAAS,QAAQ,uBAAuB;AAyCjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFC,GACD,OAAO,SAASC,UAAUC,KAAqB;IAC7C,MAAM,EACJC,GAAG,EACHC,IAAIC,YAAY,KAAK,EACrB,mBAAmBC,cAAc,EACjC,cAAcC,YAAYF,cAAc,SAAS,CAACC,iBAC9C,eACAE,SAAS,EACbC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EACTC,UAAUf,qBAAqB,EAC/BgB,aAAajB,wBAAwB,EACrCkB,MAAM,EACNC,KAAK,EACLC,IAAI,EACJC,OAAO,EACPC,UAAU,EACVC,SAAS,EACTC,MAAM,EACNC,QAAQ,EACRC,SAAS,EACTC,YAAY,EACZ,GAAGC,WACJ,GAAGtB;IACJ,MAAM,EAAEuB,YAAY,EAAE,GAAG1B,iBAAiB;QACxC2B,SAASvB;QACTS;QACAD,WAAWhB,IACTK,UAAU;YAAEuB;QAAa,IACzBzB,MAAM;YACJa;YACAgB,QAAQ;YACRC,gBAAgB;QAClB;QAEFf;QACAE;QACAC;QACAF;QACAG;QACAC;QACAC;QACAC;QACAC;QACAC;QACAO,cAAc;QACdC,cAAcrB;IAChB;IAEA,qBACE,KAACJ;QACC0B,cAAYxB;QACZyB,mBAAiB1B;QAChB,GAAGkB,SAAS;QACZ,GAAGC,YAAY;kBAEff;;AAGP"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { type ReactElement, type Ref } from "react";
|
|
1
2
|
import { type BaseWindowSplitterProps } from "../window-splitter/WindowSplitter.js";
|
|
2
3
|
import { type WindowSplitterWidgetProps } from "../window-splitter/useWindowSplitter.js";
|
|
3
4
|
import { type LayoutWindowSplitterClassNameOptions } from "./layoutWindowSplitterStyles.js";
|
|
4
5
|
/**
|
|
5
6
|
* @since 6.0.0
|
|
6
7
|
*/
|
|
7
|
-
export interface LayoutWindowSplitterProps extends WindowSplitterWidgetProps<HTMLButtonElement>, Omit<BaseWindowSplitterProps, keyof WindowSplitterWidgetProps<HTMLButtonElement>>, LayoutWindowSplitterClassNameOptions {
|
|
8
|
+
export interface LayoutWindowSplitterProps extends Omit<WindowSplitterWidgetProps<HTMLButtonElement>, "ref">, Omit<BaseWindowSplitterProps, keyof WindowSplitterWidgetProps<HTMLButtonElement>>, LayoutWindowSplitterClassNameOptions {
|
|
9
|
+
ref?: Ref<HTMLButtonElement>;
|
|
8
10
|
/** @defaultValue `"Resize Navigation"` */
|
|
9
11
|
"aria-label"?: string;
|
|
10
12
|
/**
|
|
@@ -71,4 +73,4 @@ export interface LayoutWindowSplitterProps extends WindowSplitterWidgetProps<HTM
|
|
|
71
73
|
* @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
|
|
72
74
|
* @since 6.0.0
|
|
73
75
|
*/
|
|
74
|
-
export declare
|
|
76
|
+
export declare function LayoutWindowSplitter(props: LayoutWindowSplitterProps): ReactElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { useMemo } from "react";
|
|
4
4
|
import { useCSSVariables } from "../theme/useCSSVariables.js";
|
|
5
5
|
import { WindowSplitter } from "../window-splitter/WindowSplitter.js";
|
|
6
6
|
import { layoutWindowSplitter } from "./layoutWindowSplitterStyles.js";
|
|
@@ -62,8 +62,8 @@ import { layoutWindowSplitter } from "./layoutWindowSplitterStyles.js";
|
|
|
62
62
|
*
|
|
63
63
|
* @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
|
|
64
64
|
* @since 6.0.0
|
|
65
|
-
*/ export
|
|
66
|
-
const { "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel = ariaLabelledBy ? undefined : "Resize Navigation", appBarOffset, disableResponsive, className, navWidth, ...remaining } = props;
|
|
65
|
+
*/ export function LayoutWindowSplitter(props) {
|
|
66
|
+
const { ref, "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel = ariaLabelledBy ? undefined : "Resize Navigation", appBarOffset, disableResponsive, className, navWidth, ...remaining } = props;
|
|
67
67
|
useCSSVariables(useMemo(()=>[
|
|
68
68
|
{
|
|
69
69
|
name: "--rmd-layout-size",
|
|
@@ -83,6 +83,6 @@ import { layoutWindowSplitter } from "./layoutWindowSplitterStyles.js";
|
|
|
83
83
|
className
|
|
84
84
|
})
|
|
85
85
|
});
|
|
86
|
-
}
|
|
86
|
+
}
|
|
87
87
|
|
|
88
88
|
//# sourceMappingURL=LayoutWindowSplitter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/layout/LayoutWindowSplitter.tsx"],"sourcesContent":["\"use client\";\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/layout/LayoutWindowSplitter.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactElement, type Ref, useMemo } from \"react\";\n\nimport { type DefinedCSSVariableName } from \"../theme/types.js\";\nimport { useCSSVariables } from \"../theme/useCSSVariables.js\";\nimport {\n type BaseWindowSplitterProps,\n WindowSplitter,\n} from \"../window-splitter/WindowSplitter.js\";\nimport { type WindowSplitterWidgetProps } from \"../window-splitter/useWindowSplitter.js\";\nimport {\n type LayoutWindowSplitterClassNameOptions,\n layoutWindowSplitter,\n} from \"./layoutWindowSplitterStyles.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface LayoutWindowSplitterProps\n extends\n Omit<WindowSplitterWidgetProps<HTMLButtonElement>, \"ref\">,\n Omit<\n BaseWindowSplitterProps,\n keyof WindowSplitterWidgetProps<HTMLButtonElement>\n >,\n LayoutWindowSplitterClassNameOptions {\n ref?: Ref<HTMLButtonElement>;\n\n /** @defaultValue `\"Resize Navigation\"` */\n \"aria-label\"?: string;\n\n /**\n * The current navigation width (in px).\n */\n navWidth: number;\n}\n\n/**\n * **Client Component**\n *\n * This component is used to resize the `LayoutNav` component.\n *\n * @see {@link useResizableExpandableLayout} for a default implementation for\n * this component.\n *\n * @example Dynamic Resizing\n * ```tsx\n * import { LayoutNav } from \"@react-md/core/layout/LayoutNav\";\n * import { LayoutWindowSplitter } from \"@react-md/core/layout/LayoutWindowSplitter\";\n * import { Main } from \"@react-md/core/layout/Main\";\n * import { NoSsr } from \"@react-md/core/NoSsr\";\n * import { useWindowSplitter } from \"@react-md/core/window-splitter/useWindowSplitter\";\n * import { useWindowSize } from \"@react-md/core/useWindowSize\";\n * import type { ReactElement, PropsWithChildren } from \"react\"\n *\n * function MyWindowSplitter(): ReactElement {\n * const { width } = useWindowSize({ disableHeight: true });\n * const min = 96;\n * const max = Math.max(600, width * .7);\n *\n * const { value, splitterProps } = useWindowSplitter({\n * min,\n * max,\n * defaultValue: 256,\n * });\n *\n * return (\n * <LayoutWindowSplitter\n * aria-controls=\"layout-nav-id\"\n * {...splitterProps}\n * value={value}\n * />\n * );\n * }\n *\n * function Layout({ children }: PropsWithChildren): ReactElement {\n * return (\n * <>\n * <LayoutNav id=\"layout-nav\" {...otherProps}>\n * <YourNavigation />\n * </LayoutNav>\n * // only required when using SSR\n * <NoSsr>\n * <MyWindowSplitter />\n * </NoSsr>\n * <Main navOffset>\n * {children}\n * </Main>\n * </>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}\n * @since 6.0.0\n */\nexport function LayoutWindowSplitter(\n props: LayoutWindowSplitterProps\n): ReactElement {\n const {\n ref,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel = ariaLabelledBy ? undefined : \"Resize Navigation\",\n appBarOffset,\n disableResponsive,\n className,\n navWidth,\n ...remaining\n } = props;\n\n useCSSVariables<DefinedCSSVariableName>(\n useMemo(\n () => [{ name: \"--rmd-layout-size\", value: `${navWidth}px` }],\n [navWidth]\n )\n );\n\n return (\n <WindowSplitter\n {...remaining}\n ref={ref}\n aria-label={ariaLabel as string}\n aria-labelledby={ariaLabelledBy}\n className={layoutWindowSplitter({\n appBarOffset,\n disableResponsive,\n className,\n })}\n />\n );\n}\n"],"names":["useMemo","useCSSVariables","WindowSplitter","layoutWindowSplitter","LayoutWindowSplitter","props","ref","ariaLabelledBy","ariaLabel","undefined","appBarOffset","disableResponsive","className","navWidth","remaining","name","value","aria-label","aria-labelledby"],"mappings":"AAAA;;AAEA,SAAsCA,OAAO,QAAQ,QAAQ;AAG7D,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,SAEEC,cAAc,QACT,uCAAuC;AAE9C,SAEEC,oBAAoB,QACf,kCAAkC;AAwBzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DC,GACD,OAAO,SAASC,qBACdC,KAAgC;IAEhC,MAAM,EACJC,GAAG,EACH,mBAAmBC,cAAc,EACjC,cAAcC,YAAYD,iBAAiBE,YAAY,mBAAmB,EAC1EC,YAAY,EACZC,iBAAiB,EACjBC,SAAS,EACTC,QAAQ,EACR,GAAGC,WACJ,GAAGT;IAEJJ,gBACED,QACE,IAAM;YAAC;gBAAEe,MAAM;gBAAqBC,OAAO,GAAGH,SAAS,EAAE,CAAC;YAAC;SAAE,EAC7D;QAACA;KAAS;IAId,qBACE,KAACX;QACE,GAAGY,SAAS;QACbR,KAAKA;QACLW,cAAYT;QACZU,mBAAiBX;QACjBK,WAAWT,qBAAqB;YAC9BO;YACAC;YACAC;QACF;;AAGN"}
|
package/dist/layout/Main.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type ElementType, type HTMLAttributes, type ReactNode, type Ref } from "react";
|
|
1
|
+
import { type ElementType, type HTMLAttributes, type ReactElement, type ReactNode, type Ref } from "react";
|
|
2
2
|
import { type MainClassNameOptions } from "./mainStyles.js";
|
|
3
3
|
/**
|
|
4
4
|
* @since 6.0.0
|
|
5
5
|
*/
|
|
6
6
|
export type CustomMainElement = ElementType<HTMLAttributes<HTMLElement> & {
|
|
7
|
-
ref
|
|
7
|
+
ref?: Ref<HTMLElement>;
|
|
8
8
|
className?: string;
|
|
9
9
|
tabIndex?: number;
|
|
10
10
|
}>;
|
|
@@ -12,6 +12,7 @@ export type CustomMainElement = ElementType<HTMLAttributes<HTMLElement> & {
|
|
|
12
12
|
* @since 6.0.0
|
|
13
13
|
*/
|
|
14
14
|
export interface MainProps extends HTMLAttributes<HTMLElement>, MainClassNameOptions {
|
|
15
|
+
ref?: Ref<HTMLElement>;
|
|
15
16
|
/**
|
|
16
17
|
* @defaultValue `"main"`
|
|
17
18
|
*/
|
|
@@ -48,4 +49,4 @@ export interface MainProps extends HTMLAttributes<HTMLElement>, MainClassNameOpt
|
|
|
48
49
|
* @since 6.0.0 Renamed from `LayoutMain` removed a lot of
|
|
49
50
|
* functionality to keep this component simple.
|
|
50
51
|
*/
|
|
51
|
-
export declare
|
|
52
|
+
export declare function Main(props: MainProps): ReactElement;
|
package/dist/layout/Main.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
3
|
import { useEnsuredId } from "../useEnsuredId.js";
|
|
5
4
|
import { main } from "./mainStyles.js";
|
|
6
5
|
import { useMainTabIndex } from "./useMainTabIndex.js";
|
|
@@ -33,8 +32,8 @@ import { useMainTabIndex } from "./useMainTabIndex.js";
|
|
|
33
32
|
* @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
|
|
34
33
|
* @since 6.0.0 Renamed from `LayoutMain` removed a lot of
|
|
35
34
|
* functionality to keep this component simple.
|
|
36
|
-
*/ export
|
|
37
|
-
const { as: Component = "main", id: propId, className, children, tabIndex: propTabIndex, navOffset, appBarOffset, ...remaining } = props;
|
|
35
|
+
*/ export function Main(props) {
|
|
36
|
+
const { as: Component = "main", id: propId, ref, className, children, tabIndex: propTabIndex, navOffset, appBarOffset, ...remaining } = props;
|
|
38
37
|
const id = useEnsuredId(propId, "main");
|
|
39
38
|
const tabIndex = useMainTabIndex(propTabIndex);
|
|
40
39
|
return /*#__PURE__*/ _jsx(Component, {
|
|
@@ -49,6 +48,6 @@ import { useMainTabIndex } from "./useMainTabIndex.js";
|
|
|
49
48
|
tabIndex: tabIndex,
|
|
50
49
|
children: children
|
|
51
50
|
});
|
|
52
|
-
}
|
|
51
|
+
}
|
|
53
52
|
|
|
54
53
|
//# sourceMappingURL=Main.js.map
|
package/dist/layout/Main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/layout/Main.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ElementType,\n type HTMLAttributes,\n type
|
|
1
|
+
{"version":3,"sources":["../../src/layout/Main.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ElementType,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\n\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { type MainClassNameOptions, main } from \"./mainStyles.js\";\nimport { useMainTabIndex } from \"./useMainTabIndex.js\";\n\n/**\n * @since 6.0.0\n */\nexport type CustomMainElement = ElementType<\n HTMLAttributes<HTMLElement> & {\n ref?: Ref<HTMLElement>;\n className?: string;\n tabIndex?: number;\n }\n>;\n\n/**\n * @since 6.0.0\n */\nexport interface MainProps\n extends HTMLAttributes<HTMLElement>, MainClassNameOptions {\n ref?: Ref<HTMLElement>;\n\n /**\n * @defaultValue `\"main\"`\n */\n as?: CustomMainElement;\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This component is really only used to dynamically set the `tabIndex` to `-1`\n * while using a keyboard for the `SkipToMainContent` component's focus behavior\n * to work correctly. If you don't need that functionality, use the {@link main}\n * style utility instead.\n *\n * @example Styles Only\n * ```tsx\n * import { main as mainStyles } from \"@react-md/core/layout/mainStyles\":\n *\n * function MyCustomMainElement({ children }) {\n * return (\n * <main\n * className={mainStyles({\n * navOffset: true,\n * appBarOffset: true,\n * })}\n * >\n * {children}\n * </main>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}\n * @since 6.0.0 Renamed from `LayoutMain` removed a lot of\n * functionality to keep this component simple.\n */\nexport function Main(props: MainProps): ReactElement {\n const {\n as: Component = \"main\",\n id: propId,\n ref,\n className,\n children,\n tabIndex: propTabIndex,\n navOffset,\n appBarOffset,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"main\");\n const tabIndex = useMainTabIndex(propTabIndex);\n\n return (\n <Component\n {...remaining}\n id={id}\n ref={ref}\n className={main({ navOffset, appBarOffset, className })}\n tabIndex={tabIndex}\n >\n {children}\n </Component>\n );\n}\n"],"names":["useEnsuredId","main","useMainTabIndex","Main","props","as","Component","id","propId","ref","className","children","tabIndex","propTabIndex","navOffset","appBarOffset","remaining"],"mappings":"AAAA;;AAUA,SAASA,YAAY,QAAQ,qBAAqB;AAClD,SAAoCC,IAAI,QAAQ,kBAAkB;AAClE,SAASC,eAAe,QAAQ,uBAAuB;AA2BvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BC,GACD,OAAO,SAASC,KAAKC,KAAgB;IACnC,MAAM,EACJC,IAAIC,YAAY,MAAM,EACtBC,IAAIC,MAAM,EACVC,GAAG,EACHC,SAAS,EACTC,QAAQ,EACRC,UAAUC,YAAY,EACtBC,SAAS,EACTC,YAAY,EACZ,GAAGC,WACJ,GAAGZ;IACJ,MAAMG,KAAKP,aAAaQ,QAAQ;IAChC,MAAMI,WAAWV,gBAAgBW;IAEjC,qBACE,KAACP;QACE,GAAGU,SAAS;QACbT,IAAIA;QACJE,KAAKA;QACLC,WAAWT,KAAK;YAAEa;YAAWC;YAAcL;QAAU;QACrDE,UAAUA;kBAETD;;AAGP"}
|
package/dist/link/Link.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AnchorHTMLAttributes, type ForwardRefExoticComponent } from "react";
|
|
1
|
+
import { type AnchorHTMLAttributes, type ComponentType, type ForwardRefExoticComponent, type ReactElement, type Ref } from "react";
|
|
2
2
|
import { type LinkClassNameOptions } from "./styles.js";
|
|
3
3
|
/**
|
|
4
4
|
* @since 6.0.0
|
|
@@ -7,6 +7,12 @@ export type CustomLinkComponent = ForwardRefExoticComponent<{
|
|
|
7
7
|
href: string;
|
|
8
8
|
}> | ForwardRefExoticComponent<{
|
|
9
9
|
to: string;
|
|
10
|
+
}> | ComponentType<{
|
|
11
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
12
|
+
href: string;
|
|
13
|
+
}> | ComponentType<{
|
|
14
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
15
|
+
to: string;
|
|
10
16
|
}> | "a";
|
|
11
17
|
/**
|
|
12
18
|
* @since 6.0.0 Removed the `preventMaliciousTarget` prop since browsers
|
|
@@ -17,6 +23,7 @@ export type CustomLinkComponent = ForwardRefExoticComponent<{
|
|
|
17
23
|
* @since 6.0.0 Renamed `flexCentered` to `flex`.
|
|
18
24
|
*/
|
|
19
25
|
export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement>, LinkClassNameOptions {
|
|
26
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
20
27
|
/**
|
|
21
28
|
* All links **must** have a valid href.
|
|
22
29
|
*/
|
|
@@ -55,5 +62,6 @@ export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement>, Link
|
|
|
55
62
|
* behavior is `className="rmd-link"`.
|
|
56
63
|
* @since 6.0.0 The `href` prop is required.
|
|
57
64
|
* @since 6.0.0 Renamed `flexCentered` to `flex`.
|
|
65
|
+
* @since 7.0.0 No longer uses `forwardRef`
|
|
58
66
|
*/
|
|
59
|
-
export declare
|
|
67
|
+
export declare function Link(props: LinkProps): ReactElement;
|
package/dist/link/Link.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { link } from "./styles.js";
|
|
4
3
|
/**
|
|
5
4
|
* @example Simple Example
|
|
@@ -26,8 +25,9 @@ import { link } from "./styles.js";
|
|
|
26
25
|
* behavior is `className="rmd-link"`.
|
|
27
26
|
* @since 6.0.0 The `href` prop is required.
|
|
28
27
|
* @since 6.0.0 Renamed `flexCentered` to `flex`.
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
* @since 7.0.0 No longer uses `forwardRef`
|
|
29
|
+
*/ export function Link(props) {
|
|
30
|
+
const { ref, className, flex, children, ...remaining } = props;
|
|
31
31
|
return /*#__PURE__*/ _jsx("a", {
|
|
32
32
|
...remaining,
|
|
33
33
|
ref: ref,
|
|
@@ -37,6 +37,6 @@ import { link } from "./styles.js";
|
|
|
37
37
|
}),
|
|
38
38
|
children: children
|
|
39
39
|
});
|
|
40
|
-
}
|
|
40
|
+
}
|
|
41
41
|
|
|
42
42
|
//# sourceMappingURL=Link.js.map
|
package/dist/link/Link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/link/Link.tsx"],"sourcesContent":["import {\n type AnchorHTMLAttributes,\n type ForwardRefExoticComponent,\n
|
|
1
|
+
{"version":3,"sources":["../../src/link/Link.tsx"],"sourcesContent":["import {\n type AnchorHTMLAttributes,\n type ComponentType,\n type ForwardRefExoticComponent,\n type ReactElement,\n type Ref,\n} from \"react\";\n\nimport { type LinkClassNameOptions, link } from \"./styles.js\";\n\n/**\n * @since 6.0.0\n */\nexport type CustomLinkComponent =\n | ForwardRefExoticComponent<{ href: string }>\n | ForwardRefExoticComponent<{ to: string }>\n | ComponentType<{ ref?: Ref<HTMLAnchorElement>; href: string }>\n | ComponentType<{ ref?: Ref<HTMLAnchorElement>; to: string }>\n | \"a\";\n\n/**\n * @since 6.0.0 Removed the `preventMaliciousTarget` prop since browsers\n * default to `rel=noopener` after updating the {@link https://github.com/whatwg/html/issues/4078|spec}.\n * @since 6.0.0 Removed the `component` prop since all you need for link\n * behavior is `className=\"rmd-link\"`.\n * @since 6.0.0 The `href` prop is required.\n * @since 6.0.0 Renamed `flexCentered` to `flex`.\n */\nexport interface LinkProps\n extends AnchorHTMLAttributes<HTMLAnchorElement>, LinkClassNameOptions {\n ref?: Ref<HTMLAnchorElement>;\n\n /**\n * All links **must** have a valid href.\n */\n href: string;\n\n /**\n * Set this to `true` if your link contains icons that should be centered and\n * spaced with additional text. This is not used by default so that links can\n * correctly line wrap while rendered within paragraphs of text.\n *\n * @defaultValue `false`\n */\n flex?: boolean;\n}\n\n/**\n * @example Simple Example\n * ```tsx\n * import { Link } from \"@react-md/core/link/Link\";\n * import { Typography } from \"@react-md/core/typography/Typography\";\n * import type { ReactElement } from \"react\";\n *\n * function Element(): ReactElement {\n * return (\n * <Typography>\n * Here is a paragraph of text with a {\" \"}\n * <Link href=\"/some-url\">link to some content</Link>.\n * </Typography>\n * );\n * }\n * ```\n *\n *\n * @see {@link https://react-md.dev/components/link | Link Demos}\n * @since 6.0.0 Removed the `preventMaliciousTarget` prop since browsers\n * default to `rel=noopener` after updating the {@link https://github.com/whatwg/html/issues/4078|spec}.\n * @since 6.0.0 Removed the `component` prop since all you need for link\n * behavior is `className=\"rmd-link\"`.\n * @since 6.0.0 The `href` prop is required.\n * @since 6.0.0 Renamed `flexCentered` to `flex`.\n * @since 7.0.0 No longer uses `forwardRef`\n */\nexport function Link(props: LinkProps): ReactElement {\n const { ref, className, flex, children, ...remaining } = props;\n\n return (\n <a {...remaining} ref={ref} className={link({ flex, className })}>\n {children}\n </a>\n );\n}\n"],"names":["link","Link","props","ref","className","flex","children","remaining","a"],"mappings":";AAQA,SAAoCA,IAAI,QAAQ,cAAc;AAuC9D;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BC,GACD,OAAO,SAASC,KAAKC,KAAgB;IACnC,MAAM,EAAEC,GAAG,EAAEC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGC,WAAW,GAAGL;IAEzD,qBACE,KAACM;QAAG,GAAGD,SAAS;QAAEJ,KAAKA;QAAKC,WAAWJ,KAAK;YAAEK;YAAMD;QAAU;kBAC3DE;;AAGP"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
1
|
+
import { type ReactElement, type ReactNode, type Ref } from "react";
|
|
2
2
|
import { type LinkProps } from "./Link.js";
|
|
3
3
|
import { type SkipToMainContentClassNameOptions } from "./styles.js";
|
|
4
4
|
/**
|
|
5
5
|
* @since 6.0.0 The `mainId` is optional
|
|
6
6
|
*/
|
|
7
7
|
export interface SkipToMainContentProps extends Omit<LinkProps, "href">, SkipToMainContentClassNameOptions {
|
|
8
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
8
9
|
/**
|
|
9
10
|
* @since 6.0.0 Changed default value from `"skip-to-main-content"`
|
|
10
11
|
* @defaultValue `"skip-to-main"`
|
|
@@ -56,4 +57,4 @@ export interface SkipToMainContentProps extends Omit<LinkProps, "href">, SkipToM
|
|
|
56
57
|
* with the provided `mainId` in development mode. The previous behavior would
|
|
57
58
|
* only log an error after being clicked.
|
|
58
59
|
*/
|
|
59
|
-
export declare
|
|
60
|
+
export declare function SkipToMainContent(props: SkipToMainContentProps): ReactElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { useRef } from "react";
|
|
4
4
|
import { useDevEffect } from "../utils/useDevEffect.js";
|
|
5
5
|
import { Link } from "./Link.js";
|
|
6
6
|
import { skipToMainContent } from "./styles.js";
|
|
@@ -39,8 +39,8 @@ const getMainElement = (mainId)=>mainId ? document.getElementById(mainId) : docu
|
|
|
39
39
|
* @since 6.0.0 Throws an error after rendering if no main element can be found
|
|
40
40
|
* with the provided `mainId` in development mode. The previous behavior would
|
|
41
41
|
* only log an error after being clicked.
|
|
42
|
-
*/ export
|
|
43
|
-
const { id = "skip-to-main", className, children = "Skip to main content", mainId = "", onClick = noop, unstyled, ...remaining } = props;
|
|
42
|
+
*/ export function SkipToMainContent(props) {
|
|
43
|
+
const { ref, id = "skip-to-main", className, children = "Skip to main content", mainId = "", onClick = noop, unstyled, ...remaining } = props;
|
|
44
44
|
const mainNodeRef = useRef(null);
|
|
45
45
|
// want to warn the developer about missing main element in development
|
|
46
46
|
// immediately to help prevent errors, but in production this can be lazy
|
|
@@ -86,6 +86,6 @@ const getMainElement = (mainId)=>mainId ? document.getElementById(mainId) : docu
|
|
|
86
86
|
}),
|
|
87
87
|
children: children
|
|
88
88
|
});
|
|
89
|
-
}
|
|
89
|
+
}
|
|
90
90
|
|
|
91
91
|
//# sourceMappingURL=SkipToMainContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/link/SkipToMainContent.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactNode,
|
|
1
|
+
{"version":3,"sources":["../../src/link/SkipToMainContent.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactElement, type ReactNode, type Ref, useRef } from \"react\";\n\nimport { useDevEffect } from \"../utils/useDevEffect.js\";\nimport { Link, type LinkProps } from \"./Link.js\";\nimport {\n type SkipToMainContentClassNameOptions,\n skipToMainContent,\n} from \"./styles.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\nconst getMainElement = (mainId: string): HTMLElement | null =>\n mainId\n ? document.getElementById(mainId)\n : document.querySelector<HTMLElement>('main,[role=\"main\"]');\n\n/**\n * @since 6.0.0 The `mainId` is optional\n */\nexport interface SkipToMainContentProps\n extends Omit<LinkProps, \"href\">, SkipToMainContentClassNameOptions {\n ref?: Ref<HTMLAnchorElement>;\n\n /**\n * @since 6.0.0 Changed default value from `\"skip-to-main-content\"`\n * @defaultValue `\"skip-to-main\"`\n */\n id?: string;\n\n /**\n * An optional id for the main element. When this is not provided, the main\n * element will be found by:\n *\n * ```ts\n * document.querySelector('main,[role=\"main\"]');\n * ```\n */\n mainId?: string;\n\n /**\n * @defaultValue `\"Skip to main content\"`\n */\n children?: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This component is used to allow keyboard users a quick way to skip directly\n * to the main content instead of needing to tab through all navigation items.\n *\n * This component should not be used if using the LayoutAppBar component since\n * it is already built-in.\n *\n * @example Simple Example\n * ```tsx\n * import { AppBar } from \"@react-md/core/app-bar/AppBar\";\n * import { SkipToMainContent } from \"@react-md/core/link/SkipToMainContent\";\n * import { type ReactElement } from \"react\";\n *\n * export default function SimpleSkipToMainContentExample(): ReactElement {\n * return (\n * <AppBar style={{ position: \"relative\" }}>\n * <SkipToMainContent />\n * </AppBar>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/skip-to-main-content | SkipToMainContent Demos}\n * @since 6.0.0 Changed the default `id` from `\"skip-to-main-content\"` to\n * `\"skip-to-main\"`.\n * @since 6.0.0 The `mainId` prop is optional\n * @since 6.0.0 Throws an error after rendering if no main element can be found\n * with the provided `mainId` in development mode. The previous behavior would\n * only log an error after being clicked.\n */\nexport function SkipToMainContent(props: SkipToMainContentProps): ReactElement {\n const {\n ref,\n id = \"skip-to-main\",\n className,\n children = \"Skip to main content\",\n mainId = \"\",\n onClick = noop,\n unstyled,\n ...remaining\n } = props;\n\n const mainNodeRef = useRef<HTMLElement | null>(null);\n // want to warn the developer about missing main element in development\n // immediately to help prevent errors, but in production this can be lazy\n // initialized only once a keyboard user focuses and clicks this element\n useDevEffect(() => {\n mainNodeRef.current = getMainElement(mainId);\n\n if (!mainNodeRef.current) {\n const foundMainId = document.querySelector('main,[role=\"main\"]')?.id;\n let message = `Unable to find a main element to focus`;\n if (mainId) {\n message += ` with an id of \"${mainId}\"`;\n\n if (foundMainId) {\n message += ` but a main element was found with an id of \"${foundMainId}\".`;\n }\n }\n if (!foundMainId) {\n message +=\n '. There should be at least one <main> element or an element with role=\"main\" on the page for accessibility.';\n }\n\n throw new Error(message);\n }\n }, [mainId]);\n\n return (\n <Link\n {...remaining}\n id={id}\n ref={ref}\n href={`#${mainId}`}\n onClick={(event) => {\n onClick(event);\n if (event.isPropagationStopped()) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n // see comment above useEffect\n mainNodeRef.current ||= getMainElement(mainId);\n mainNodeRef.current?.focus();\n }}\n className={skipToMainContent({\n unstyled,\n className,\n })}\n >\n {children}\n </Link>\n );\n}\n"],"names":["useRef","useDevEffect","Link","skipToMainContent","noop","getMainElement","mainId","document","getElementById","querySelector","SkipToMainContent","props","ref","id","className","children","onClick","unstyled","remaining","mainNodeRef","current","foundMainId","message","Error","href","event","isPropagationStopped","preventDefault","stopPropagation","focus"],"mappings":"AAAA;;AAEA,SAAsDA,MAAM,QAAQ,QAAQ;AAE5E,SAASC,YAAY,QAAQ,2BAA2B;AACxD,SAASC,IAAI,QAAwB,YAAY;AACjD,SAEEC,iBAAiB,QACZ,cAAc;AAErB,MAAMC,OAAO;AACX,aAAa;AACf;AAEA,MAAMC,iBAAiB,CAACC,SACtBA,SACIC,SAASC,cAAc,CAACF,UACxBC,SAASE,aAAa,CAAc;AA+B1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BC,GACD,OAAO,SAASC,kBAAkBC,KAA6B;IAC7D,MAAM,EACJC,GAAG,EACHC,KAAK,cAAc,EACnBC,SAAS,EACTC,WAAW,sBAAsB,EACjCT,SAAS,EAAE,EACXU,UAAUZ,IAAI,EACda,QAAQ,EACR,GAAGC,WACJ,GAAGP;IAEJ,MAAMQ,cAAcnB,OAA2B;IAC/C,uEAAuE;IACvE,yEAAyE;IACzE,wEAAwE;IACxEC,aAAa;QACXkB,YAAYC,OAAO,GAAGf,eAAeC;QAErC,IAAI,CAACa,YAAYC,OAAO,EAAE;YACxB,MAAMC,cAAcd,SAASE,aAAa,CAAC,uBAAuBI;YAClE,IAAIS,UAAU,CAAC,sCAAsC,CAAC;YACtD,IAAIhB,QAAQ;gBACVgB,WAAW,CAAC,gBAAgB,EAAEhB,OAAO,CAAC,CAAC;gBAEvC,IAAIe,aAAa;oBACfC,WAAW,CAAC,6CAA6C,EAAED,YAAY,EAAE,CAAC;gBAC5E;YACF;YACA,IAAI,CAACA,aAAa;gBAChBC,WACE;YACJ;YAEA,MAAM,IAAIC,MAAMD;QAClB;IACF,GAAG;QAAChB;KAAO;IAEX,qBACE,KAACJ;QACE,GAAGgB,SAAS;QACbL,IAAIA;QACJD,KAAKA;QACLY,MAAM,CAAC,CAAC,EAAElB,QAAQ;QAClBU,SAAS,CAACS;YACRT,QAAQS;YACR,IAAIA,MAAMC,oBAAoB,IAAI;gBAChC;YACF;YAEAD,MAAME,cAAc;YACpBF,MAAMG,eAAe;YAErB,8BAA8B;YAC9BT,YAAYC,OAAO,KAAKf,eAAeC;YACvCa,YAAYC,OAAO,EAAES;QACvB;QACAf,WAAWX,kBAAkB;YAC3Bc;YACAH;QACF;kBAECC;;AAGP"}
|
package/dist/list/List.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type HTMLAttributes } from "react";
|
|
1
|
+
import { type HTMLAttributes, type ReactElement, type Ref } from "react";
|
|
2
2
|
import { type ListClassNameOptions } from "./listStyles.js";
|
|
3
3
|
export type ListElement = HTMLUListElement | HTMLOListElement;
|
|
4
4
|
/**
|
|
5
5
|
* @since 6.3.1 Extends the ListClassNameOptions
|
|
6
6
|
*/
|
|
7
7
|
export interface ListProps extends HTMLAttributes<ListElement>, ListClassNameOptions {
|
|
8
|
+
ref?: Ref<ListElement>;
|
|
8
9
|
/**
|
|
9
10
|
* @defaultValue `"none"`
|
|
10
11
|
*/
|
|
@@ -60,4 +61,4 @@ export interface ListProps extends HTMLAttributes<ListElement>, ListClassNameOpt
|
|
|
60
61
|
*
|
|
61
62
|
* @see {@link https://react-md.dev/components/list | List Demos}
|
|
62
63
|
*/
|
|
63
|
-
export declare
|
|
64
|
+
export declare function List(props: ListProps): ReactElement;
|
package/dist/list/List.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { list } from "./listStyles.js";
|
|
4
3
|
/**
|
|
5
4
|
* The `List` component is used to render a collection of clickable actions
|
|
@@ -43,8 +42,8 @@ import { list } from "./listStyles.js";
|
|
|
43
42
|
* ```
|
|
44
43
|
*
|
|
45
44
|
* @see {@link https://react-md.dev/components/list | List Demos}
|
|
46
|
-
*/ export
|
|
47
|
-
const { className, children, role = "none", dense = false, ordered = false, horizontal = false, ...remaining } = props;
|
|
45
|
+
*/ export function List(props) {
|
|
46
|
+
const { ref, className, children, role = "none", dense = false, ordered = false, horizontal = false, ...remaining } = props;
|
|
48
47
|
const Component = ordered ? "ol" : "ul";
|
|
49
48
|
return /*#__PURE__*/ _jsx(Component, {
|
|
50
49
|
...remaining,
|
|
@@ -57,6 +56,6 @@ import { list } from "./listStyles.js";
|
|
|
57
56
|
}),
|
|
58
57
|
children: children
|
|
59
58
|
});
|
|
60
|
-
}
|
|
59
|
+
}
|
|
61
60
|
|
|
62
61
|
//# sourceMappingURL=List.js.map
|
package/dist/list/List.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/list/List.tsx"],"sourcesContent":["import { type HTMLAttributes,
|
|
1
|
+
{"version":3,"sources":["../../src/list/List.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactElement, type Ref } from \"react\";\n\nimport { type ListClassNameOptions, list } from \"./listStyles.js\";\n\nexport type ListElement = HTMLUListElement | HTMLOListElement;\n\n/**\n * @since 6.3.1 Extends the ListClassNameOptions\n */\nexport interface ListProps\n extends HTMLAttributes<ListElement>, ListClassNameOptions {\n ref?: Ref<ListElement>;\n\n /**\n * @defaultValue `\"none\"`\n */\n role?: HTMLAttributes<ListElement>[\"role\"];\n\n /**\n * Set this to `true` to render as `<ol>` instead of `<ul>` when the children\n * are in a specific order. For example: steps within a recipe.\n *\n * @defaultValue `false`\n */\n ordered?: boolean;\n}\n\n/**\n * The `List` component is used to render a collection of clickable actions\n * vertically or horizontally and does not include the default `ol`/`ul` styles.\n *\n * @example Simple Example\n * ```tsx\n * import { List } from \"@react-md/core/list/List\";\n * import { ListItem } from \"@react-md/core/list/ListItem\";\n * import { ListItemLink } from \"@react-md/core/list/ListItemLink\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <List>\n * <ListItem\n * onClick={() => {\n * // do something\n * }}\n * >\n * Item 1\n * </ListItem>\n * <ListItem\n * onClick={() => {\n * // do something\n * }}\n * >\n * Item 2\n * </ListItem>\n * <ListItem\n * onClick={() => {\n * // do something\n * }}\n * >\n * Item 3\n * </ListItem>\n * <ListItemLink href=\"/some-route\">Link Example</ListItemLink>\n * </List>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/list | List Demos}\n */\nexport function List(props: ListProps): ReactElement {\n const {\n ref,\n className,\n children,\n role = \"none\",\n dense = false,\n ordered = false,\n horizontal = false,\n ...remaining\n } = props;\n\n const Component = (ordered ? \"ol\" : \"ul\") as \"ul\";\n return (\n <Component\n {...remaining}\n ref={ref}\n role={role}\n className={list({\n dense,\n horizontal,\n className,\n })}\n >\n {children}\n </Component>\n );\n}\n"],"names":["list","List","props","ref","className","children","role","dense","ordered","horizontal","remaining","Component"],"mappings":";AAEA,SAAoCA,IAAI,QAAQ,kBAAkB;AAyBlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CC,GACD,OAAO,SAASC,KAAKC,KAAgB;IACnC,MAAM,EACJC,GAAG,EACHC,SAAS,EACTC,QAAQ,EACRC,OAAO,MAAM,EACbC,QAAQ,KAAK,EACbC,UAAU,KAAK,EACfC,aAAa,KAAK,EAClB,GAAGC,WACJ,GAAGR;IAEJ,MAAMS,YAAaH,UAAU,OAAO;IACpC,qBACE,KAACG;QACE,GAAGD,SAAS;QACbP,KAAKA;QACLG,MAAMA;QACNF,WAAWJ,KAAK;YACdO;YACAE;YACAL;QACF;kBAECC;;AAGP"}
|