@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/card/CardFooter.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/card/CardFooter.tsx"],"sourcesContent":["import { type ReactElement, type Ref } from \"react\";\n\nimport { Box, type BoxProps } from \"../box/Box.js\";\nimport { type BoxJustifyContent } from \"../box/styles.js\";\nimport { cardFooter } from \"./styles.js\";\n\n/** @since 6.0.0 */\nexport interface CardFooterProps extends BoxProps {\n ref?: Ref<HTMLDivElement>;\n\n /**\n * @defaultValue `\"flex-end\"`\n */\n justify?: BoxJustifyContent;\n}\n\n/**\n * A simple wrapper around the {@link Box} component that applies additional\n * padding and applies `justify-content: flex-end;` by default.\n *\n * @see {@link https://react-md.dev/components/card | Card Demos}\n * @since 6.0.0\n */\nexport function CardFooter(props: CardFooterProps): ReactElement {\n const {\n ref,\n className,\n children,\n justify = \"flex-end\",\n ...remaining\n } = props;\n\n return (\n <Box\n {...remaining}\n ref={ref}\n className={cardFooter({ className })}\n justify={justify}\n >\n {children}\n </Box>\n );\n}\n"],"names":["Box","cardFooter","CardFooter","props","ref","className","children","justify","remaining"],"mappings":";AAEA,SAASA,GAAG,QAAuB,gBAAgB;AAEnD,SAASC,UAAU,QAAQ,cAAc;AAYzC;;;;;;CAMC,GACD,OAAO,SAASC,WAAWC,KAAsB;IAC/C,MAAM,EACJC,GAAG,EACHC,SAAS,EACTC,QAAQ,EACRC,UAAU,UAAU,EACpB,GAAGC,WACJ,GAAGL;IAEJ,qBACE,KAACH;QACE,GAAGQ,SAAS;QACbJ,KAAKA;QACLC,WAAWJ,WAAW;YAAEI;QAAU;QAClCE,SAASA;kBAERD;;AAGP"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HTMLAttributes, type ReactNode } from "react";
|
|
1
|
+
import { type HTMLAttributes, type ReactElement, type ReactNode, type Ref } from "react";
|
|
2
2
|
import { type PropsWithRef } from "../types.js";
|
|
3
3
|
/**
|
|
4
4
|
* @since 6.0.0 Removed the `align` prop.
|
|
@@ -8,6 +8,7 @@ import { type PropsWithRef } from "../types.js";
|
|
|
8
8
|
* `contentProps`.
|
|
9
9
|
*/
|
|
10
10
|
export interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
11
|
+
ref?: Ref<HTMLDivElement>;
|
|
11
12
|
/**
|
|
12
13
|
* Any content to display after the children in the header. This could be an
|
|
13
14
|
* expander icon button, visual media like an image or video, etc.
|
|
@@ -35,4 +36,4 @@ export interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
35
36
|
* relies on the CSS `gap` for spacing.
|
|
36
37
|
* @since 6.0.0 Renders as a `<div>` instead of a `<header>`
|
|
37
38
|
*/
|
|
38
|
-
export declare
|
|
39
|
+
export declare function CardHeader(props: CardHeaderProps): ReactElement;
|
package/dist/card/CardHeader.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { cardHeader, cardHeaderContent } from "./styles.js";
|
|
4
3
|
/**
|
|
5
4
|
* @see {@link https://react-md.dev/components/card | Card Demos}
|
|
@@ -11,8 +10,8 @@ import { cardHeader, cardHeaderContent } from "./styles.js";
|
|
|
11
10
|
* @since 6.0.0 No longer uses the `TextIconSpacing` component and instead
|
|
12
11
|
* relies on the CSS `gap` for spacing.
|
|
13
12
|
* @since 6.0.0 Renders as a `<div>` instead of a `<header>`
|
|
14
|
-
*/ export
|
|
15
|
-
const { className, children, beforeAddon, afterAddon, contentProps, ...remaining } = props;
|
|
13
|
+
*/ export function CardHeader(props) {
|
|
14
|
+
const { ref, className, children, beforeAddon, afterAddon, contentProps, ...remaining } = props;
|
|
16
15
|
return /*#__PURE__*/ _jsxs("div", {
|
|
17
16
|
...remaining,
|
|
18
17
|
ref: ref,
|
|
@@ -33,6 +32,6 @@ import { cardHeader, cardHeaderContent } from "./styles.js";
|
|
|
33
32
|
afterAddon
|
|
34
33
|
]
|
|
35
34
|
});
|
|
36
|
-
}
|
|
35
|
+
}
|
|
37
36
|
|
|
38
37
|
//# sourceMappingURL=CardHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/card/CardHeader.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/card/CardHeader.tsx"],"sourcesContent":["import {\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\n\nimport { type PropsWithRef } from \"../types.js\";\nimport { cardHeader, cardHeaderContent } from \"./styles.js\";\n\n/**\n * @since 6.0.0 Removed the `align` prop.\n * @since 6.0.0 Renamed the `beforeChildren` and `afterChildren` props to\n * `beforeAddon` and `afterAddon`.\n * @since 6.0.0 Removed the `contentClassName` prop in favor of the\n * `contentProps`.\n */\nexport interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {\n ref?: Ref<HTMLDivElement>;\n\n /**\n * Any content to display after the children in the header. This could be an\n * expander icon button, visual media like an image or video, etc.\n */\n afterAddon?: ReactNode;\n\n /**\n * Any content to display before the children in the header. This could be an\n * expander icon button, visual media like an image or video, etc.\n */\n beforeAddon?: ReactNode;\n\n /**\n * Any props to pass to the `<div>` that surrounds the `children`. This is\n * generally used to apply custom `style` or `className`.\n */\n contentProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>>;\n}\n\n/**\n * @see {@link https://react-md.dev/components/card | Card Demos}\n * @since 6.0.0 Removed the `align` prop.\n * @since 6.0.0 Renamed the `beforeChildren` and `afterChildren` props to\n * `beforeAddon` and `afterAddon`.\n * @since 6.0.0 Removed the `contentClassName` prop in favor of the\n * `contentProps`.\n * @since 6.0.0 No longer uses the `TextIconSpacing` component and instead\n * relies on the CSS `gap` for spacing.\n * @since 6.0.0 Renders as a `<div>` instead of a `<header>`\n */\nexport function CardHeader(props: CardHeaderProps): ReactElement {\n const {\n ref,\n className,\n children,\n beforeAddon,\n afterAddon,\n contentProps,\n ...remaining\n } = props;\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={cardHeader({\n className,\n addonBefore: !!beforeAddon,\n addonAfter: !!afterAddon,\n })}\n >\n {beforeAddon}\n <div\n {...contentProps}\n className={cardHeaderContent({ className: contentProps?.className })}\n >\n {children}\n </div>\n {afterAddon}\n </div>\n );\n}\n"],"names":["cardHeader","cardHeaderContent","CardHeader","props","ref","className","children","beforeAddon","afterAddon","contentProps","remaining","div","addonBefore","addonAfter"],"mappings":";AAQA,SAASA,UAAU,EAAEC,iBAAiB,QAAQ,cAAc;AA+B5D;;;;;;;;;;CAUC,GACD,OAAO,SAASC,WAAWC,KAAsB;IAC/C,MAAM,EACJC,GAAG,EACHC,SAAS,EACTC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,YAAY,EACZ,GAAGC,WACJ,GAAGP;IAEJ,qBACE,MAACQ;QACE,GAAGD,SAAS;QACbN,KAAKA;QACLC,WAAWL,WAAW;YACpBK;YACAO,aAAa,CAAC,CAACL;YACfM,YAAY,CAAC,CAACL;QAChB;;YAECD;0BACD,KAACI;gBACE,GAAGF,YAAY;gBAChBJ,WAAWJ,kBAAkB;oBAAEI,WAAWI,cAAcJ;gBAAU;0BAEjEC;;YAEFE;;;AAGP"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { type ReactElement, type Ref } from "react";
|
|
1
2
|
import { type TypographyHTMLElement, type TypographyProps } from "../typography/Typography.js";
|
|
2
3
|
/**
|
|
3
4
|
* @since 6.0.0 Extends the {@link TypographyProps} and removed the
|
|
4
5
|
* `noWrap`/`disableSecondaryColor` props.
|
|
5
6
|
*/
|
|
6
7
|
export interface CardSubtitleProps extends TypographyProps {
|
|
8
|
+
ref?: Ref<TypographyHTMLElement>;
|
|
7
9
|
/** @defaultValue `"h6"` */
|
|
8
10
|
as?: TypographyProps["as"];
|
|
9
11
|
/** @defaultValue `"subtitle-2"` */
|
|
@@ -22,4 +24,4 @@ export interface CardSubtitleProps extends TypographyProps {
|
|
|
22
24
|
* @since 6.0.0 Extends the {@link Typography} component and removed the
|
|
23
25
|
* `noWrap`/`disableSecondaryColor` props.
|
|
24
26
|
*/
|
|
25
|
-
export declare const CardSubtitle:
|
|
27
|
+
export declare const CardSubtitle: (props: CardSubtitleProps) => ReactElement;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { Typography } from "../typography/Typography.js";
|
|
4
3
|
import { cardSubtitle } from "./styles.js";
|
|
5
4
|
/**
|
|
6
5
|
* @see {@link https://react-md.dev/components/card | Card Demos}
|
|
7
6
|
* @since 6.0.0 Extends the {@link Typography} component and removed the
|
|
8
7
|
* `noWrap`/`disableSecondaryColor` props.
|
|
9
|
-
*/ export const CardSubtitle =
|
|
10
|
-
const { children, as = "h6", type = "subtitle-2", margin = "none", textColor = "text-secondary", className, ...remaining } = props;
|
|
8
|
+
*/ export const CardSubtitle = function CardSubtitle(props) {
|
|
9
|
+
const { ref, children, as = "h6", type = "subtitle-2", margin = "none", textColor = "text-secondary", className, ...remaining } = props;
|
|
11
10
|
return /*#__PURE__*/ _jsx(Typography, {
|
|
12
11
|
...remaining,
|
|
13
12
|
ref: ref,
|
|
@@ -20,6 +19,6 @@ import { cardSubtitle } from "./styles.js";
|
|
|
20
19
|
}),
|
|
21
20
|
children: children
|
|
22
21
|
});
|
|
23
|
-
}
|
|
22
|
+
};
|
|
24
23
|
|
|
25
24
|
//# sourceMappingURL=CardSubtitle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/card/CardSubtitle.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/card/CardSubtitle.tsx"],"sourcesContent":["import { type ReactElement, type Ref } from \"react\";\n\nimport {\n Typography,\n type TypographyHTMLElement,\n type TypographyProps,\n} from \"../typography/Typography.js\";\nimport { cardSubtitle } from \"./styles.js\";\n\n/**\n * @since 6.0.0 Extends the {@link TypographyProps} and removed the\n * `noWrap`/`disableSecondaryColor` props.\n */\nexport interface CardSubtitleProps extends TypographyProps {\n ref?: Ref<TypographyHTMLElement>;\n\n /** @defaultValue `\"h6\"` */\n as?: TypographyProps[\"as\"];\n\n /** @defaultValue `\"subtitle-2\"` */\n type?: TypographyProps[\"type\"];\n\n /** @defaultValue `\"none\"` */\n margin?: TypographyProps[\"margin\"];\n\n /**\n * Set this to `null` to inherit the current color.\n *\n * @defaultValue `\"text-secondary\"`\n */\n textColor?: TypographyProps[\"textColor\"];\n}\n\n/**\n * @see {@link https://react-md.dev/components/card | Card Demos}\n * @since 6.0.0 Extends the {@link Typography} component and removed the\n * `noWrap`/`disableSecondaryColor` props.\n */\nexport const CardSubtitle = function CardSubtitle(\n props: CardSubtitleProps\n): ReactElement {\n const {\n ref,\n children,\n as = \"h6\",\n type = \"subtitle-2\",\n margin = \"none\",\n textColor = \"text-secondary\",\n className,\n ...remaining\n } = props;\n\n return (\n <Typography\n {...remaining}\n ref={ref}\n as={as}\n type={type}\n margin={margin}\n textColor={textColor}\n className={cardSubtitle({ className })}\n >\n {children}\n </Typography>\n );\n};\n"],"names":["Typography","cardSubtitle","CardSubtitle","props","ref","children","as","type","margin","textColor","className","remaining"],"mappings":";AAEA,SACEA,UAAU,QAGL,8BAA8B;AACrC,SAASC,YAAY,QAAQ,cAAc;AA0B3C;;;;CAIC,GACD,OAAO,MAAMC,eAAe,SAASA,aACnCC,KAAwB;IAExB,MAAM,EACJC,GAAG,EACHC,QAAQ,EACRC,KAAK,IAAI,EACTC,OAAO,YAAY,EACnBC,SAAS,MAAM,EACfC,YAAY,gBAAgB,EAC5BC,SAAS,EACT,GAAGC,WACJ,GAAGR;IAEJ,qBACE,KAACH;QACE,GAAGW,SAAS;QACbP,KAAKA;QACLE,IAAIA;QACJC,MAAMA;QACNC,QAAQA;QACRC,WAAWA;QACXC,WAAWT,aAAa;YAAES;QAAU;kBAEnCL;;AAGP,EAAE"}
|
package/dist/card/CardTitle.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { type ReactElement, type Ref } from "react";
|
|
1
2
|
import { type TypographyHTMLElement, type TypographyProps } from "../typography/Typography.js";
|
|
2
3
|
/**
|
|
3
4
|
* @since 6.0.0 Extends the {@link TypographyProps} and removed the
|
|
4
5
|
* `small`/`noWrap` props.
|
|
5
6
|
*/
|
|
6
7
|
export interface CardTitleProps extends TypographyProps {
|
|
8
|
+
ref?: Ref<TypographyHTMLElement>;
|
|
7
9
|
/** @defaultValue `"h5"` */
|
|
8
10
|
as?: TypographyProps["as"];
|
|
9
11
|
/** @defaultValue `"headline-5"` */
|
|
@@ -16,4 +18,4 @@ export interface CardTitleProps extends TypographyProps {
|
|
|
16
18
|
* @since 6.0.0 Extends the {@link Typography} component and removed
|
|
17
19
|
* the `small`/`noWrap` props.
|
|
18
20
|
*/
|
|
19
|
-
export declare
|
|
21
|
+
export declare function CardTitle(props: CardTitleProps): ReactElement;
|
package/dist/card/CardTitle.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { Typography } from "../typography/Typography.js";
|
|
4
3
|
import { cardTitle } from "./styles.js";
|
|
5
4
|
/**
|
|
6
5
|
* @see {@link https://react-md.dev/components/card | Card Demos}
|
|
7
6
|
* @since 6.0.0 Extends the {@link Typography} component and removed
|
|
8
7
|
* the `small`/`noWrap` props.
|
|
9
|
-
*/ export
|
|
10
|
-
const {
|
|
8
|
+
*/ export function CardTitle(props) {
|
|
9
|
+
const { ref, as = "h5", type = "headline-5", margin = "none", children, className, ...remaining } = props;
|
|
11
10
|
return /*#__PURE__*/ _jsx(Typography, {
|
|
12
11
|
...remaining,
|
|
13
12
|
ref: ref,
|
|
@@ -19,6 +18,6 @@ import { cardTitle } from "./styles.js";
|
|
|
19
18
|
}),
|
|
20
19
|
children: children
|
|
21
20
|
});
|
|
22
|
-
}
|
|
21
|
+
}
|
|
23
22
|
|
|
24
23
|
//# sourceMappingURL=CardTitle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/card/CardTitle.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/card/CardTitle.tsx"],"sourcesContent":["import { type ReactElement, type Ref } from \"react\";\n\nimport {\n Typography,\n type TypographyHTMLElement,\n type TypographyProps,\n} from \"../typography/Typography.js\";\nimport { cardTitle } from \"./styles.js\";\n\n/**\n * @since 6.0.0 Extends the {@link TypographyProps} and removed the\n * `small`/`noWrap` props.\n */\nexport interface CardTitleProps extends TypographyProps {\n ref?: Ref<TypographyHTMLElement>;\n\n /** @defaultValue `\"h5\"` */\n as?: TypographyProps[\"as\"];\n\n /** @defaultValue `\"headline-5\"` */\n type?: TypographyProps[\"type\"];\n\n /** @defaultValue \"none\" */\n margin?: TypographyProps[\"margin\"];\n}\n\n/**\n * @see {@link https://react-md.dev/components/card | Card Demos}\n * @since 6.0.0 Extends the {@link Typography} component and removed\n * the `small`/`noWrap` props.\n */\nexport function CardTitle(props: CardTitleProps): ReactElement {\n const {\n ref,\n as = \"h5\",\n type = \"headline-5\",\n margin = \"none\",\n children,\n className,\n ...remaining\n } = props;\n\n return (\n <Typography\n {...remaining}\n ref={ref}\n as={as}\n type={type}\n margin={margin}\n className={cardTitle({ className })}\n >\n {children}\n </Typography>\n );\n}\n"],"names":["Typography","cardTitle","CardTitle","props","ref","as","type","margin","children","className","remaining"],"mappings":";AAEA,SACEA,UAAU,QAGL,8BAA8B;AACrC,SAASC,SAAS,QAAQ,cAAc;AAmBxC;;;;CAIC,GACD,OAAO,SAASC,UAAUC,KAAqB;IAC7C,MAAM,EACJC,GAAG,EACHC,KAAK,IAAI,EACTC,OAAO,YAAY,EACnBC,SAAS,MAAM,EACfC,QAAQ,EACRC,SAAS,EACT,GAAGC,WACJ,GAAGP;IAEJ,qBACE,KAACH;QACE,GAAGU,SAAS;QACbN,KAAKA;QACLC,IAAIA;QACJC,MAAMA;QACNC,QAAQA;QACRE,WAAWR,UAAU;YAAEQ;QAAU;kBAEhCD;;AAGP"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type MouseEventHandler } from "react";
|
|
1
|
+
import { type MouseEventHandler, type ReactElement, type Ref } from "react";
|
|
2
2
|
import { type ComponentWithRippleProps } from "../interaction/types.js";
|
|
3
3
|
import { type CardProps } from "./Card.js";
|
|
4
4
|
/**
|
|
5
5
|
* @since 6.0.0
|
|
6
6
|
*/
|
|
7
7
|
export interface ClickableCardProps extends CardProps, ComponentWithRippleProps {
|
|
8
|
+
ref?: Ref<HTMLDivElement>;
|
|
8
9
|
onClick: MouseEventHandler<HTMLDivElement>;
|
|
9
10
|
/**
|
|
10
11
|
* Set this to `true` to disable all click events.
|
|
@@ -41,4 +42,4 @@ export interface ClickableCardProps extends CardProps, ComponentWithRippleProps
|
|
|
41
42
|
* @see {@link https://react-md.dev/components/card#clickable-card | ClickableCard Demos}
|
|
42
43
|
* @since 6.0.0
|
|
43
44
|
*/
|
|
44
|
-
export declare const ClickableCard:
|
|
45
|
+
export declare const ClickableCard: (props: ClickableCardProps) => ReactElement;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { cnb } from "cnbuilder";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
4
|
import { useElementInteraction } from "../interaction/useElementInteraction.js";
|
|
6
5
|
import { useHigherContrastChildren } from "../interaction/useHigherContrastChildren.js";
|
|
7
6
|
import { Card } from "./Card.js";
|
|
@@ -33,8 +32,8 @@ const noop = ()=>{
|
|
|
33
32
|
*
|
|
34
33
|
* @see {@link https://react-md.dev/components/card#clickable-card | ClickableCard Demos}
|
|
35
34
|
* @since 6.0.0
|
|
36
|
-
*/ export const ClickableCard =
|
|
37
|
-
const { role = "button", disabled, tabIndex = disabled ? undefined : 0, onClick, onKeyDown = noop, className, children: propChildren, disableRipple, ...remaining } = props;
|
|
35
|
+
*/ export const ClickableCard = function ClickableCard(props) {
|
|
36
|
+
const { ref, role = "button", disabled, tabIndex = disabled ? undefined : 0, onClick, onKeyDown = noop, className, children: propChildren, disableRipple, ...remaining } = props;
|
|
38
37
|
const { handlers, ripples } = useElementInteraction({
|
|
39
38
|
...remaining,
|
|
40
39
|
mode: disableRipple ? "none" : undefined
|
|
@@ -72,6 +71,6 @@ const noop = ()=>{
|
|
|
72
71
|
ripples
|
|
73
72
|
]
|
|
74
73
|
});
|
|
75
|
-
}
|
|
74
|
+
};
|
|
76
75
|
|
|
77
76
|
//# sourceMappingURL=ClickableCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/card/ClickableCard.tsx"],"sourcesContent":["\"use client\";\n\nimport { cnb } from \"cnbuilder\";\nimport { type MouseEventHandler,
|
|
1
|
+
{"version":3,"sources":["../../src/card/ClickableCard.tsx"],"sourcesContent":["\"use client\";\n\nimport { cnb } from \"cnbuilder\";\nimport { type MouseEventHandler, type ReactElement, type Ref } from \"react\";\n\nimport { type ComponentWithRippleProps } from \"../interaction/types.js\";\nimport { useElementInteraction } from \"../interaction/useElementInteraction.js\";\nimport { useHigherContrastChildren } from \"../interaction/useHigherContrastChildren.js\";\nimport { Card, type CardProps } from \"./Card.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 6.0.0\n */\nexport interface ClickableCardProps\n extends CardProps, ComponentWithRippleProps {\n ref?: Ref<HTMLDivElement>;\n\n onClick: MouseEventHandler<HTMLDivElement>;\n\n /**\n * Set this to `true` to disable all click events.\n *\n * Note: Any disabled styling will need to be manually applied.\n *\n * @defaultValue `false`\n */\n disabled?: boolean;\n}\n\n/**\n * A Small wrapper around the `Card` component that is clickable and has the\n * element interaction enabled (ripples).\n *\n * @example Simple Example\n * ```tsx\n * import { CardContent } from \"@react-md/core/card/CardContent\"\n * import { ClickableCard } from \"@react-md/core/card/ClickableCard\";\n * import { type ReactElement } from \"react\";\n *\n * export default function ClickableCardExample(): ReactElement {\n * return (\n * <ClickableCard\n * onClick={() => {\n * // do something\n * }}\n * >\n * <CardContent>Wow</CardContent>\n * </ClickableCard>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/card#clickable-card | ClickableCard Demos}\n * @since 6.0.0\n */\nexport const ClickableCard = function ClickableCard(\n props: ClickableCardProps\n): ReactElement {\n const {\n ref,\n role = \"button\",\n disabled,\n tabIndex = disabled ? undefined : 0,\n onClick,\n onKeyDown = noop,\n className,\n children: propChildren,\n disableRipple,\n ...remaining\n } = props;\n const { handlers, ripples } = useElementInteraction({\n ...remaining,\n mode: disableRipple ? \"none\" : undefined,\n });\n const children = useHigherContrastChildren(propChildren);\n\n return (\n <Card\n {...remaining}\n {...handlers}\n aria-disabled={disabled || undefined}\n ref={ref}\n role={role}\n tabIndex={tabIndex}\n className={cnb(\"rmd-card--clickable\", className)}\n onClick={(event) => {\n if (disabled) {\n return;\n }\n\n onClick(event);\n }}\n onKeyDown={(event) => {\n onKeyDown(event);\n if (disabled) {\n return;\n }\n\n const isSpace = event.key === \" \";\n if (isSpace || event.key === \"Enter\") {\n if (isSpace) {\n event.preventDefault();\n }\n\n event.currentTarget.click();\n }\n }}\n >\n {children}\n {ripples}\n </Card>\n );\n};\n"],"names":["cnb","useElementInteraction","useHigherContrastChildren","Card","noop","ClickableCard","props","ref","role","disabled","tabIndex","undefined","onClick","onKeyDown","className","children","propChildren","disableRipple","remaining","handlers","ripples","mode","aria-disabled","event","isSpace","key","preventDefault","currentTarget","click"],"mappings":"AAAA;;AAEA,SAASA,GAAG,QAAQ,YAAY;AAIhC,SAASC,qBAAqB,QAAQ,0CAA0C;AAChF,SAASC,yBAAyB,QAAQ,8CAA8C;AACxF,SAASC,IAAI,QAAwB,YAAY;AAEjD,MAAMC,OAAO;AACX,aAAa;AACf;AAqBA;;;;;;;;;;;;;;;;;;;;;;;;;CAyBC,GACD,OAAO,MAAMC,gBAAgB,SAASA,cACpCC,KAAyB;IAEzB,MAAM,EACJC,GAAG,EACHC,OAAO,QAAQ,EACfC,QAAQ,EACRC,WAAWD,WAAWE,YAAY,CAAC,EACnCC,OAAO,EACPC,YAAYT,IAAI,EAChBU,SAAS,EACTC,UAAUC,YAAY,EACtBC,aAAa,EACb,GAAGC,WACJ,GAAGZ;IACJ,MAAM,EAAEa,QAAQ,EAAEC,OAAO,EAAE,GAAGnB,sBAAsB;QAClD,GAAGiB,SAAS;QACZG,MAAMJ,gBAAgB,SAASN;IACjC;IACA,MAAMI,WAAWb,0BAA0Bc;IAE3C,qBACE,MAACb;QACE,GAAGe,SAAS;QACZ,GAAGC,QAAQ;QACZG,iBAAeb,YAAYE;QAC3BJ,KAAKA;QACLC,MAAMA;QACNE,UAAUA;QACVI,WAAWd,IAAI,uBAAuBc;QACtCF,SAAS,CAACW;YACR,IAAId,UAAU;gBACZ;YACF;YAEAG,QAAQW;QACV;QACAV,WAAW,CAACU;YACVV,UAAUU;YACV,IAAId,UAAU;gBACZ;YACF;YAEA,MAAMe,UAAUD,MAAME,GAAG,KAAK;YAC9B,IAAID,WAAWD,MAAME,GAAG,KAAK,SAAS;gBACpC,IAAID,SAAS;oBACXD,MAAMG,cAAc;gBACtB;gBAEAH,MAAMI,aAAa,CAACC,KAAK;YAC3B;QACF;;YAECb;YACAK;;;AAGP,EAAE"}
|
package/dist/chip/Chip.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ButtonHTMLAttributes, type CSSProperties, type HTMLAttributes, type ReactNode } from "react";
|
|
1
|
+
import { type ButtonHTMLAttributes, type CSSProperties, type HTMLAttributes, type ReactElement, type ReactNode, type Ref } from "react";
|
|
2
2
|
import { type BackgroundColor } from "../cssUtils.js";
|
|
3
3
|
import { type ComponentWithRippleProps } from "../interaction/types.js";
|
|
4
4
|
import { type BaseMaxWidthTransitionOptions } from "../transition/useMaxWidthTransition.js";
|
|
@@ -11,6 +11,7 @@ import { type ChipTheme } from "./styles.js";
|
|
|
11
11
|
* augmentation.
|
|
12
12
|
*/
|
|
13
13
|
export interface ChipProps extends ButtonHTMLAttributes<HTMLButtonElement>, BaseMaxWidthTransitionOptions, ComponentWithRippleProps {
|
|
14
|
+
ref?: Ref<HTMLButtonElement>;
|
|
14
15
|
/**
|
|
15
16
|
* @defaultValue `"solid"`
|
|
16
17
|
*/
|
|
@@ -164,5 +165,6 @@ export interface ChipProps extends ButtonHTMLAttributes<HTMLButtonElement>, Base
|
|
|
164
165
|
* @see {@link https://react-md.dev/components/chip | Chip Demos}
|
|
165
166
|
* @since 6.0.0 Renamed the `noninteractable` prop to
|
|
166
167
|
* `noninteractive`.
|
|
168
|
+
* @since 7.0.0 No longer uses `forwardRef`
|
|
167
169
|
*/
|
|
168
|
-
export declare
|
|
170
|
+
export declare function Chip(props: ChipProps): ReactElement;
|
package/dist/chip/Chip.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { cnb } from "cnbuilder";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
4
|
import { getIcon } from "../icon/config.js";
|
|
6
5
|
import { useElementInteraction } from "../interaction/useElementInteraction.js";
|
|
7
6
|
import { useHigherContrastChildren } from "../interaction/useHigherContrastChildren.js";
|
|
@@ -54,8 +53,9 @@ import { chip, chipContent } from "./styles.js";
|
|
|
54
53
|
* @see {@link https://react-md.dev/components/chip | Chip Demos}
|
|
55
54
|
* @since 6.0.0 Renamed the `noninteractable` prop to
|
|
56
55
|
* `noninteractive`.
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
* @since 7.0.0 No longer uses `forwardRef`
|
|
57
|
+
*/ export function Chip(props) {
|
|
58
|
+
const { "aria-pressed": ariaPressed, ref, theme = "solid", className, raisable = false, disabled = false, selected, selectedThemed = false, selectedClassName, selectedIcon: propSelectedIcon, selectedIconAfter = false, backgroundColor, noninteractive = false, disableRipple, disableIconTransition = false, children: propChildren, onClick, onKeyDown, onKeyUp, onMouseDown, onMouseUp, onMouseLeave, onDragStart, onTouchStart, onTouchEnd, onTouchMove, leftAddon: propLeftAddon, rightAddon: propRightAddon, contentProps, contentStyle, contentClassName, disableContentWrap = false, ...remaining } = props;
|
|
59
59
|
let buttonProps;
|
|
60
60
|
if (!noninteractive) {
|
|
61
61
|
buttonProps = {
|
|
@@ -134,6 +134,6 @@ import { chip, chipContent } from "./styles.js";
|
|
|
134
134
|
ripples
|
|
135
135
|
]
|
|
136
136
|
});
|
|
137
|
-
}
|
|
137
|
+
}
|
|
138
138
|
|
|
139
139
|
//# sourceMappingURL=Chip.js.map
|
package/dist/chip/Chip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/chip/Chip.tsx"],"sourcesContent":["\"use client\";\n\nimport { cnb } from \"cnbuilder\";\nimport {\n type ButtonHTMLAttributes,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n forwardRef,\n} from \"react\";\n\nimport { type BackgroundColor } from \"../cssUtils.js\";\nimport { getIcon } from \"../icon/config.js\";\nimport { type ComponentWithRippleProps } from \"../interaction/types.js\";\nimport { useElementInteraction } from \"../interaction/useElementInteraction.js\";\nimport { useHigherContrastChildren } from \"../interaction/useHigherContrastChildren.js\";\nimport {\n type BaseMaxWidthTransitionOptions,\n useMaxWidthTransition,\n} from \"../transition/useMaxWidthTransition.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { type ChipTheme, chip, chipContent } from \"./styles.js\";\n\n/**\n * @since 6.0.0 Renamed the `noninteractive` prop to\n * `noninteractable`.\n * @since 6.3.1 Extends BaseMaxWidthTransitionOptions for CSSProperties module\n * augmentation.\n */\nexport interface ChipProps\n extends\n ButtonHTMLAttributes<HTMLButtonElement>,\n BaseMaxWidthTransitionOptions,\n ComponentWithRippleProps {\n /**\n * @defaultValue `\"solid\"`\n */\n theme?: ChipTheme;\n\n /**\n * Set this to `true` if the chip should gain additional box shadow while the\n * user is pressing down on the chip.\n *\n * @defaultValue `false`\n */\n raisable?: boolean;\n\n /**\n * @defaultValue `false`\n */\n disabled?: boolean;\n\n /**\n * When this is a boolean, a selected icon will be displayed before the\n * `children` and appear/disappear when `true`/`false`.\n *\n * @see {@link selectedIcon}\n * @see {@link selectedIconAfter}\n * @see {@link selectedThemed}\n */\n selected?: boolean;\n\n /**\n * Set this to `true` if the chip should change background color while\n * {@link selected} instead of displaying an icon. The default background\n * color is a lighter swatch of the theme primary color.\n *\n * @defaultValue `false`\n */\n selectedThemed?: boolean;\n\n /**\n * An optional className to provide only while {@link selected} is `true`.\n */\n selectedClassName?: string;\n\n /**\n * This will be ignored if {@link selected} is `undefined`.\n *\n * @defaultValue `getIcon(\"selected\")`\n */\n selectedIcon?: ReactNode;\n\n /**\n * Set this to `true` if the {@link selectedIcon} should display as the\n * {@link rightAddon} instead of the {@link leftAddon}.\n *\n * @defaultValue `false`\n * @since 6.0.0\n */\n selectedIconAfter?: boolean;\n\n /**\n * Set this to `true` if the {@link selectedIcon} should not animate and\n * instead apply `display: none`\n *\n * @defaultValue `false`\n */\n disableIconTransition?: boolean;\n\n /**\n * Set this to `true` to render the chip as a `<span>` instead of a button.\n *\n * @since 2.6.0\n * @since 6.0.0 Renamed from `noninteractable`\n * @defaultValue `false`\n */\n noninteractive?: boolean;\n\n /**\n * An optional background color theme to use.\n *\n * @since 6.0.0\n */\n backgroundColor?: BackgroundColor;\n\n /**\n * An optional icon, avatar, circular progress, or custom component to render\n * before the `children`. This will remove some of the leading horizontal\n * padding on the chip as well.\n */\n leftAddon?: ReactNode;\n\n /**\n * An optional icon, avatar, circular progress, or custom component to render\n * after the `children`. This will remove some of the trailing horizontal\n * padding on the chip as well.\n */\n rightAddon?: ReactNode;\n\n /**\n * Set this to true if the `children` should not be wrapped in a span to apply\n * the {@link chipContent} styles which allow for shrinking text and\n * truncating text with ellipsis.\n *\n * @defaultValue `false`\n */\n disableContentWrap?: boolean;\n\n /**\n * This will be ignored if {@link disableContentWrap} is `true`.\n *\n * @since 6.0.0\n */\n contentProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>>;\n\n /**\n * This will be ignored if {@link disableContentWrap} is `true`.\n */\n contentStyle?: CSSProperties;\n\n /**\n * This will be ignored if {@link disableContentWrap} is `true`.\n */\n contentClassName?: string;\n}\n\n/**\n * @example Simple Example\n * ```tsx\n * import { Chip } from \"@react-md/core/chip/Chip\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <Chip>Content</Chip>;\n * }\n * ```\n *\n * @example Outlined Example\n * ```tsx\n * import { Chip } from \"@react-md/core/chip/Chip\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <Chip theme=\"outline\">Content</Chip>;\n * }\n * ```\n *\n * @example Addons Example\n * ```tsx\n * import { Avatar } from \"@react-md/core/avatar/Avatar\";\n * import { Chip } from \"@react-md/core/chip/Chip\";\n * import AddCircleIcon from \"@react-md/material-icons/AddCircleIcon\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <Chip\n * leftAddon={\n * <Avatar>\n * <img src=\"https://i.pravatar.cc/40?img=3\" alt=\"\" />\n * </Avatar>\n * }\n * rightAddon={<AddCircleIcon />}\n * >\n * Chip\n * </Chip>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/chip | Chip Demos}\n * @since 6.0.0 Renamed the `noninteractable` prop to\n * `noninteractive`.\n */\nexport const Chip = forwardRef<HTMLButtonElement, ChipProps>(\n function Chip(props, ref) {\n const {\n \"aria-pressed\": ariaPressed,\n theme = \"solid\",\n className,\n raisable = false,\n disabled = false,\n selected,\n selectedThemed = false,\n selectedClassName,\n selectedIcon: propSelectedIcon,\n selectedIconAfter = false,\n backgroundColor,\n noninteractive = false,\n disableRipple,\n disableIconTransition = false,\n children: propChildren,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onMouseLeave,\n onDragStart,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n leftAddon: propLeftAddon,\n rightAddon: propRightAddon,\n contentProps,\n contentStyle,\n contentClassName,\n disableContentWrap = false,\n ...remaining\n } = props;\n\n let buttonProps: ButtonHTMLAttributes<HTMLButtonElement> | undefined;\n if (!noninteractive) {\n buttonProps = {\n \"aria-pressed\": ariaPressed ?? (!!selected || undefined),\n type: \"button\",\n disabled,\n };\n }\n\n let content = propChildren;\n if (!disableContentWrap) {\n content = (\n <span\n style={contentStyle}\n {...contentProps}\n className={cnb(\n chipContent({ className: contentClassName }),\n contentProps?.className\n )}\n >\n {propChildren}\n </span>\n );\n }\n\n let leftAddon = propLeftAddon;\n let rightAddon = propRightAddon;\n const selectedIconNode = getIcon(\"selected\", propSelectedIcon);\n const isTransitionable =\n !selectedThemed &&\n typeof selected === \"boolean\" &&\n (selectedIconAfter ? propRightAddon : propLeftAddon) === undefined;\n const selectedIcon = useMaxWidthTransition({\n element: selectedIconNode,\n transitionIn: !!selected,\n disabled: !isTransitionable,\n disableTransition: disableIconTransition,\n });\n if (isTransitionable) {\n if (selectedIconAfter) {\n rightAddon = selectedIcon;\n } else {\n leftAddon = selectedIcon;\n }\n }\n\n const { pressed, pressedClassName, ripples, handlers } =\n useElementInteraction({\n mode: disableRipple ? \"none\" : undefined,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onMouseLeave,\n onDragStart,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n disabled: disabled || noninteractive,\n });\n const children = useHigherContrastChildren(content);\n const Component = noninteractive ? \"span\" : \"button\";\n\n return (\n <Component\n {...remaining}\n {...buttonProps}\n {...handlers}\n className={chip({\n className,\n theme,\n pressed: raisable && pressed,\n disabled,\n selected,\n selectedThemed,\n selectedClassName,\n noninteractive,\n backgroundColor,\n pressedClassName,\n leftAddon: !!leftAddon && (selectedIconAfter || selected !== false),\n rightAddon:\n !!rightAddon && (!selectedIconAfter || selected !== false),\n })}\n ref={ref}\n >\n {leftAddon}\n {children}\n {rightAddon}\n {ripples}\n </Component>\n );\n }\n);\n"],"names":["cnb","forwardRef","getIcon","useElementInteraction","useHigherContrastChildren","useMaxWidthTransition","chip","chipContent","Chip","props","ref","ariaPressed","theme","className","raisable","disabled","selected","selectedThemed","selectedClassName","selectedIcon","propSelectedIcon","selectedIconAfter","backgroundColor","noninteractive","disableRipple","disableIconTransition","children","propChildren","onClick","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onMouseLeave","onDragStart","onTouchStart","onTouchEnd","onTouchMove","leftAddon","propLeftAddon","rightAddon","propRightAddon","contentProps","contentStyle","contentClassName","disableContentWrap","remaining","buttonProps","undefined","type","content","span","style","selectedIconNode","isTransitionable","element","transitionIn","disableTransition","pressed","pressedClassName","ripples","handlers","mode","Component"],"mappings":"AAAA;;AAEA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAKEC,UAAU,QACL,QAAQ;AAGf,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,SAASC,qBAAqB,QAAQ,0CAA0C;AAChF,SAASC,yBAAyB,QAAQ,8CAA8C;AACxF,SAEEC,qBAAqB,QAChB,yCAAyC;AAEhD,SAAyBC,IAAI,EAAEC,WAAW,QAAQ,cAAc;AAwIhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CC,GACD,OAAO,MAAMC,qBAAOP,WAClB,SAASO,KAAKC,KAAK,EAAEC,GAAG;IACtB,MAAM,EACJ,gBAAgBC,WAAW,EAC3BC,QAAQ,OAAO,EACfC,SAAS,EACTC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,QAAQ,EACRC,iBAAiB,KAAK,EACtBC,iBAAiB,EACjBC,cAAcC,gBAAgB,EAC9BC,oBAAoB,KAAK,EACzBC,eAAe,EACfC,iBAAiB,KAAK,EACtBC,aAAa,EACbC,wBAAwB,KAAK,EAC7BC,UAAUC,YAAY,EACtBC,OAAO,EACPC,SAAS,EACTC,OAAO,EACPC,WAAW,EACXC,SAAS,EACTC,YAAY,EACZC,WAAW,EACXC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,WAAWC,aAAa,EACxBC,YAAYC,cAAc,EAC1BC,YAAY,EACZC,YAAY,EACZC,gBAAgB,EAChBC,qBAAqB,KAAK,EAC1B,GAAGC,WACJ,GAAGrC;IAEJ,IAAIsC;IACJ,IAAI,CAACxB,gBAAgB;QACnBwB,cAAc;YACZ,gBAAgBpC,eAAgB,CAAA,CAAC,CAACK,YAAYgC,SAAQ;YACtDC,MAAM;YACNlC;QACF;IACF;IAEA,IAAImC,UAAUvB;IACd,IAAI,CAACkB,oBAAoB;QACvBK,wBACE,KAACC;YACCC,OAAOT;YACN,GAAGD,YAAY;YAChB7B,WAAWb,IACTO,YAAY;gBAAEM,WAAW+B;YAAiB,IAC1CF,cAAc7B;sBAGfc;;IAGP;IAEA,IAAIW,YAAYC;IAChB,IAAIC,aAAaC;IACjB,MAAMY,mBAAmBnD,QAAQ,YAAYkB;IAC7C,MAAMkC,mBACJ,CAACrC,kBACD,OAAOD,aAAa,aACpB,AAACK,CAAAA,oBAAoBoB,iBAAiBF,aAAY,MAAOS;IAC3D,MAAM7B,eAAed,sBAAsB;QACzCkD,SAASF;QACTG,cAAc,CAAC,CAACxC;QAChBD,UAAU,CAACuC;QACXG,mBAAmBhC;IACrB;IACA,IAAI6B,kBAAkB;QACpB,IAAIjC,mBAAmB;YACrBmB,aAAarB;QACf,OAAO;YACLmB,YAAYnB;QACd;IACF;IAEA,MAAM,EAAEuC,OAAO,EAAEC,gBAAgB,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GACpD1D,sBAAsB;QACpB2D,MAAMtC,gBAAgB,SAASwB;QAC/BpB;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAtB,UAAUA,YAAYQ;IACxB;IACF,MAAMG,WAAWtB,0BAA0B8C;IAC3C,MAAMa,YAAYxC,iBAAiB,SAAS;IAE5C,qBACE,MAACwC;QACE,GAAGjB,SAAS;QACZ,GAAGC,WAAW;QACd,GAAGc,QAAQ;QACZhD,WAAWP,KAAK;YACdO;YACAD;YACA8C,SAAS5C,YAAY4C;YACrB3C;YACAC;YACAC;YACAC;YACAK;YACAD;YACAqC;YACArB,WAAW,CAAC,CAACA,aAAcjB,CAAAA,qBAAqBL,aAAa,KAAI;YACjEwB,YACE,CAAC,CAACA,cAAe,CAAA,CAACnB,qBAAqBL,aAAa,KAAI;QAC5D;QACAN,KAAKA;;YAEJ4B;YACAZ;YACAc;YACAoB;;;AAGP,GACA"}
|
|
1
|
+
{"version":3,"sources":["../../src/chip/Chip.tsx"],"sourcesContent":["\"use client\";\n\nimport { cnb } from \"cnbuilder\";\nimport {\n type ButtonHTMLAttributes,\n type CSSProperties,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\n\nimport { type BackgroundColor } from \"../cssUtils.js\";\nimport { getIcon } from \"../icon/config.js\";\nimport { type ComponentWithRippleProps } from \"../interaction/types.js\";\nimport { useElementInteraction } from \"../interaction/useElementInteraction.js\";\nimport { useHigherContrastChildren } from \"../interaction/useHigherContrastChildren.js\";\nimport {\n type BaseMaxWidthTransitionOptions,\n useMaxWidthTransition,\n} from \"../transition/useMaxWidthTransition.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { type ChipTheme, chip, chipContent } from \"./styles.js\";\n\n/**\n * @since 6.0.0 Renamed the `noninteractive` prop to\n * `noninteractable`.\n * @since 6.3.1 Extends BaseMaxWidthTransitionOptions for CSSProperties module\n * augmentation.\n */\nexport interface ChipProps\n extends\n ButtonHTMLAttributes<HTMLButtonElement>,\n BaseMaxWidthTransitionOptions,\n ComponentWithRippleProps {\n ref?: Ref<HTMLButtonElement>;\n\n /**\n * @defaultValue `\"solid\"`\n */\n theme?: ChipTheme;\n\n /**\n * Set this to `true` if the chip should gain additional box shadow while the\n * user is pressing down on the chip.\n *\n * @defaultValue `false`\n */\n raisable?: boolean;\n\n /**\n * @defaultValue `false`\n */\n disabled?: boolean;\n\n /**\n * When this is a boolean, a selected icon will be displayed before the\n * `children` and appear/disappear when `true`/`false`.\n *\n * @see {@link selectedIcon}\n * @see {@link selectedIconAfter}\n * @see {@link selectedThemed}\n */\n selected?: boolean;\n\n /**\n * Set this to `true` if the chip should change background color while\n * {@link selected} instead of displaying an icon. The default background\n * color is a lighter swatch of the theme primary color.\n *\n * @defaultValue `false`\n */\n selectedThemed?: boolean;\n\n /**\n * An optional className to provide only while {@link selected} is `true`.\n */\n selectedClassName?: string;\n\n /**\n * This will be ignored if {@link selected} is `undefined`.\n *\n * @defaultValue `getIcon(\"selected\")`\n */\n selectedIcon?: ReactNode;\n\n /**\n * Set this to `true` if the {@link selectedIcon} should display as the\n * {@link rightAddon} instead of the {@link leftAddon}.\n *\n * @defaultValue `false`\n * @since 6.0.0\n */\n selectedIconAfter?: boolean;\n\n /**\n * Set this to `true` if the {@link selectedIcon} should not animate and\n * instead apply `display: none`\n *\n * @defaultValue `false`\n */\n disableIconTransition?: boolean;\n\n /**\n * Set this to `true` to render the chip as a `<span>` instead of a button.\n *\n * @since 2.6.0\n * @since 6.0.0 Renamed from `noninteractable`\n * @defaultValue `false`\n */\n noninteractive?: boolean;\n\n /**\n * An optional background color theme to use.\n *\n * @since 6.0.0\n */\n backgroundColor?: BackgroundColor;\n\n /**\n * An optional icon, avatar, circular progress, or custom component to render\n * before the `children`. This will remove some of the leading horizontal\n * padding on the chip as well.\n */\n leftAddon?: ReactNode;\n\n /**\n * An optional icon, avatar, circular progress, or custom component to render\n * after the `children`. This will remove some of the trailing horizontal\n * padding on the chip as well.\n */\n rightAddon?: ReactNode;\n\n /**\n * Set this to true if the `children` should not be wrapped in a span to apply\n * the {@link chipContent} styles which allow for shrinking text and\n * truncating text with ellipsis.\n *\n * @defaultValue `false`\n */\n disableContentWrap?: boolean;\n\n /**\n * This will be ignored if {@link disableContentWrap} is `true`.\n *\n * @since 6.0.0\n */\n contentProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>>;\n\n /**\n * This will be ignored if {@link disableContentWrap} is `true`.\n */\n contentStyle?: CSSProperties;\n\n /**\n * This will be ignored if {@link disableContentWrap} is `true`.\n */\n contentClassName?: string;\n}\n\n/**\n * @example Simple Example\n * ```tsx\n * import { Chip } from \"@react-md/core/chip/Chip\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <Chip>Content</Chip>;\n * }\n * ```\n *\n * @example Outlined Example\n * ```tsx\n * import { Chip } from \"@react-md/core/chip/Chip\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <Chip theme=\"outline\">Content</Chip>;\n * }\n * ```\n *\n * @example Addons Example\n * ```tsx\n * import { Avatar } from \"@react-md/core/avatar/Avatar\";\n * import { Chip } from \"@react-md/core/chip/Chip\";\n * import AddCircleIcon from \"@react-md/material-icons/AddCircleIcon\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <Chip\n * leftAddon={\n * <Avatar>\n * <img src=\"https://i.pravatar.cc/40?img=3\" alt=\"\" />\n * </Avatar>\n * }\n * rightAddon={<AddCircleIcon />}\n * >\n * Chip\n * </Chip>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/chip | Chip Demos}\n * @since 6.0.0 Renamed the `noninteractable` prop to\n * `noninteractive`.\n * @since 7.0.0 No longer uses `forwardRef`\n */\nexport function Chip(props: ChipProps): ReactElement {\n const {\n \"aria-pressed\": ariaPressed,\n ref,\n theme = \"solid\",\n className,\n raisable = false,\n disabled = false,\n selected,\n selectedThemed = false,\n selectedClassName,\n selectedIcon: propSelectedIcon,\n selectedIconAfter = false,\n backgroundColor,\n noninteractive = false,\n disableRipple,\n disableIconTransition = false,\n children: propChildren,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onMouseLeave,\n onDragStart,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n leftAddon: propLeftAddon,\n rightAddon: propRightAddon,\n contentProps,\n contentStyle,\n contentClassName,\n disableContentWrap = false,\n ...remaining\n } = props;\n\n let buttonProps: ButtonHTMLAttributes<HTMLButtonElement> | undefined;\n if (!noninteractive) {\n buttonProps = {\n \"aria-pressed\": ariaPressed ?? (!!selected || undefined),\n type: \"button\",\n disabled,\n };\n }\n\n let content = propChildren;\n if (!disableContentWrap) {\n content = (\n <span\n style={contentStyle}\n {...contentProps}\n className={cnb(\n chipContent({ className: contentClassName }),\n contentProps?.className\n )}\n >\n {propChildren}\n </span>\n );\n }\n\n let leftAddon = propLeftAddon;\n let rightAddon = propRightAddon;\n const selectedIconNode = getIcon(\"selected\", propSelectedIcon);\n const isTransitionable =\n !selectedThemed &&\n typeof selected === \"boolean\" &&\n (selectedIconAfter ? propRightAddon : propLeftAddon) === undefined;\n const selectedIcon = useMaxWidthTransition({\n element: selectedIconNode,\n transitionIn: !!selected,\n disabled: !isTransitionable,\n disableTransition: disableIconTransition,\n });\n if (isTransitionable) {\n if (selectedIconAfter) {\n rightAddon = selectedIcon;\n } else {\n leftAddon = selectedIcon;\n }\n }\n\n const { pressed, pressedClassName, ripples, handlers } =\n useElementInteraction({\n mode: disableRipple ? \"none\" : undefined,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onMouseLeave,\n onDragStart,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n disabled: disabled || noninteractive,\n });\n const children = useHigherContrastChildren(content);\n const Component = noninteractive ? \"span\" : \"button\";\n\n return (\n <Component\n {...remaining}\n {...buttonProps}\n {...handlers}\n className={chip({\n className,\n theme,\n pressed: raisable && pressed,\n disabled,\n selected,\n selectedThemed,\n selectedClassName,\n noninteractive,\n backgroundColor,\n pressedClassName,\n leftAddon: !!leftAddon && (selectedIconAfter || selected !== false),\n rightAddon: !!rightAddon && (!selectedIconAfter || selected !== false),\n })}\n ref={ref}\n >\n {leftAddon}\n {children}\n {rightAddon}\n {ripples}\n </Component>\n );\n}\n"],"names":["cnb","getIcon","useElementInteraction","useHigherContrastChildren","useMaxWidthTransition","chip","chipContent","Chip","props","ariaPressed","ref","theme","className","raisable","disabled","selected","selectedThemed","selectedClassName","selectedIcon","propSelectedIcon","selectedIconAfter","backgroundColor","noninteractive","disableRipple","disableIconTransition","children","propChildren","onClick","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onMouseLeave","onDragStart","onTouchStart","onTouchEnd","onTouchMove","leftAddon","propLeftAddon","rightAddon","propRightAddon","contentProps","contentStyle","contentClassName","disableContentWrap","remaining","buttonProps","undefined","type","content","span","style","selectedIconNode","isTransitionable","element","transitionIn","disableTransition","pressed","pressedClassName","ripples","handlers","mode","Component"],"mappings":"AAAA;;AAEA,SAASA,GAAG,QAAQ,YAAY;AAWhC,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,SAASC,qBAAqB,QAAQ,0CAA0C;AAChF,SAASC,yBAAyB,QAAQ,8CAA8C;AACxF,SAEEC,qBAAqB,QAChB,yCAAyC;AAEhD,SAAyBC,IAAI,EAAEC,WAAW,QAAQ,cAAc;AA0IhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDC,GACD,OAAO,SAASC,KAAKC,KAAgB;IACnC,MAAM,EACJ,gBAAgBC,WAAW,EAC3BC,GAAG,EACHC,QAAQ,OAAO,EACfC,SAAS,EACTC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,QAAQ,EACRC,iBAAiB,KAAK,EACtBC,iBAAiB,EACjBC,cAAcC,gBAAgB,EAC9BC,oBAAoB,KAAK,EACzBC,eAAe,EACfC,iBAAiB,KAAK,EACtBC,aAAa,EACbC,wBAAwB,KAAK,EAC7BC,UAAUC,YAAY,EACtBC,OAAO,EACPC,SAAS,EACTC,OAAO,EACPC,WAAW,EACXC,SAAS,EACTC,YAAY,EACZC,WAAW,EACXC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,WAAWC,aAAa,EACxBC,YAAYC,cAAc,EAC1BC,YAAY,EACZC,YAAY,EACZC,gBAAgB,EAChBC,qBAAqB,KAAK,EAC1B,GAAGC,WACJ,GAAGrC;IAEJ,IAAIsC;IACJ,IAAI,CAACxB,gBAAgB;QACnBwB,cAAc;YACZ,gBAAgBrC,eAAgB,CAAA,CAAC,CAACM,YAAYgC,SAAQ;YACtDC,MAAM;YACNlC;QACF;IACF;IAEA,IAAImC,UAAUvB;IACd,IAAI,CAACkB,oBAAoB;QACvBK,wBACE,KAACC;YACCC,OAAOT;YACN,GAAGD,YAAY;YAChB7B,WAAWZ,IACTM,YAAY;gBAAEM,WAAW+B;YAAiB,IAC1CF,cAAc7B;sBAGfc;;IAGP;IAEA,IAAIW,YAAYC;IAChB,IAAIC,aAAaC;IACjB,MAAMY,mBAAmBnD,QAAQ,YAAYkB;IAC7C,MAAMkC,mBACJ,CAACrC,kBACD,OAAOD,aAAa,aACpB,AAACK,CAAAA,oBAAoBoB,iBAAiBF,aAAY,MAAOS;IAC3D,MAAM7B,eAAed,sBAAsB;QACzCkD,SAASF;QACTG,cAAc,CAAC,CAACxC;QAChBD,UAAU,CAACuC;QACXG,mBAAmBhC;IACrB;IACA,IAAI6B,kBAAkB;QACpB,IAAIjC,mBAAmB;YACrBmB,aAAarB;QACf,OAAO;YACLmB,YAAYnB;QACd;IACF;IAEA,MAAM,EAAEuC,OAAO,EAAEC,gBAAgB,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GACpD1D,sBAAsB;QACpB2D,MAAMtC,gBAAgB,SAASwB;QAC/BpB;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAtB,UAAUA,YAAYQ;IACxB;IACF,MAAMG,WAAWtB,0BAA0B8C;IAC3C,MAAMa,YAAYxC,iBAAiB,SAAS;IAE5C,qBACE,MAACwC;QACE,GAAGjB,SAAS;QACZ,GAAGC,WAAW;QACd,GAAGc,QAAQ;QACZhD,WAAWP,KAAK;YACdO;YACAD;YACA8C,SAAS5C,YAAY4C;YACrB3C;YACAC;YACAC;YACAC;YACAK;YACAD;YACAqC;YACArB,WAAW,CAAC,CAACA,aAAcjB,CAAAA,qBAAqBL,aAAa,KAAI;YACjEwB,YAAY,CAAC,CAACA,cAAe,CAAA,CAACnB,qBAAqBL,aAAa,KAAI;QACtE;QACAL,KAAKA;;YAEJ2B;YACAZ;YACAc;YACAoB;;;AAGP"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { type ReactElement, type Ref } from "react";
|
|
1
2
|
import { type TextFieldProps } from "../form/TextField.js";
|
|
2
3
|
import { type DateFieldOptions } from "./useDateField.js";
|
|
3
4
|
/** @since 6.3.0 */
|
|
4
5
|
export interface NativeDateFieldProps extends Omit<TextFieldProps, keyof DateFieldOptions | "value">, Omit<DateFieldOptions, "ref"> {
|
|
6
|
+
ref?: Ref<HTMLInputElement>;
|
|
5
7
|
}
|
|
6
8
|
/**
|
|
7
9
|
* The `NativeDateField` is a simple wrapper around the `TextField` using the
|
|
@@ -21,4 +23,4 @@ export interface NativeDateFieldProps extends Omit<TextFieldProps, keyof DateFie
|
|
|
21
23
|
* @see {@link https://react-md.dev/components/text-field | TextField Demos}
|
|
22
24
|
* @since 6.3.0
|
|
23
25
|
*/
|
|
24
|
-
export declare
|
|
26
|
+
export declare function NativeDateField(props: NativeDateFieldProps): ReactElement;
|
|
@@ -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 { TextField } from "../form/TextField.js";
|
|
5
4
|
import { useDateField } from "./useDateField.js";
|
|
6
5
|
/**
|
|
@@ -20,8 +19,8 @@ import { useDateField } from "./useDateField.js";
|
|
|
20
19
|
* @see {@link https://react-md.dev/components/native-time-field | NativeDateField Demos}
|
|
21
20
|
* @see {@link https://react-md.dev/components/text-field | TextField Demos}
|
|
22
21
|
* @since 6.3.0
|
|
23
|
-
*/ export
|
|
24
|
-
const { id, min, max, step, onBlur, onInvalid, onChange, helpText, required, validationType, disableMessage, errorIcon, isErrored, getErrorIcon, getErrorMessage, onErrorChange, disableReset, defaultValue, ...remaining } = props;
|
|
22
|
+
*/ export function NativeDateField(props) {
|
|
23
|
+
const { ref, id, min, max, step, onBlur, onInvalid, onChange, helpText, required, validationType, disableMessage, errorIcon, isErrored, getErrorIcon, getErrorMessage, onErrorChange, disableReset, defaultValue, ...remaining } = props;
|
|
25
24
|
const { name, form } = props;
|
|
26
25
|
const { fieldProps } = useDateField({
|
|
27
26
|
id,
|
|
@@ -58,6 +57,6 @@ import { useDateField } from "./useDateField.js";
|
|
|
58
57
|
...fieldProps,
|
|
59
58
|
messageProps: messageProps
|
|
60
59
|
});
|
|
61
|
-
}
|
|
60
|
+
}
|
|
62
61
|
|
|
63
62
|
//# sourceMappingURL=NativeDateField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/datetime/NativeDateField.tsx"],"sourcesContent":["\"use client\";\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/datetime/NativeDateField.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactElement, type Ref } from \"react\";\n\nimport { TextField, type TextFieldProps } from \"../form/TextField.js\";\nimport { type DateFieldOptions, useDateField } from \"./useDateField.js\";\n\n/** @since 6.3.0 */\nexport interface NativeDateFieldProps\n extends\n Omit<TextFieldProps, keyof DateFieldOptions | \"value\">,\n Omit<DateFieldOptions, \"ref\"> {\n ref?: Ref<HTMLInputElement>;\n}\n\n/**\n * The `NativeDateField` is a simple wrapper around the `TextField` using the\n * `useDateField` hook.\n *\n * @example Simple Example\n * ```tsx\n * import { NativeDateField } from \"@react-md/core/datetime/NativeDateField\";\n * import { type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <NativeDateField label=\"Delivery Date\" name=\"delivery\" />;\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/native-time-field | NativeDateField Demos}\n * @see {@link https://react-md.dev/components/text-field | TextField Demos}\n * @since 6.3.0\n */\nexport function NativeDateField(props: NativeDateFieldProps): ReactElement {\n const {\n ref,\n id,\n min,\n max,\n step,\n onBlur,\n onInvalid,\n onChange,\n helpText,\n required,\n validationType,\n disableMessage,\n errorIcon,\n isErrored,\n getErrorIcon,\n getErrorMessage,\n onErrorChange,\n disableReset,\n defaultValue,\n ...remaining\n } = props;\n const { name, form } = props;\n const { fieldProps } = useDateField({\n id,\n ref,\n name,\n form,\n min,\n max,\n step,\n onBlur,\n onChange,\n onInvalid,\n helpText,\n required,\n validationType,\n disableMessage: disableMessage ?? (!min && !max && !step && !required),\n errorIcon,\n isErrored,\n getErrorIcon,\n getErrorMessage,\n onErrorChange,\n disableReset,\n defaultValue,\n });\n\n let { messageProps } = remaining;\n if (fieldProps.messageProps) {\n messageProps = {\n ...fieldProps.messageProps,\n ...remaining.messageProps,\n };\n }\n\n return (\n <TextField {...remaining} {...fieldProps} messageProps={messageProps} />\n );\n}\n"],"names":["TextField","useDateField","NativeDateField","props","ref","id","min","max","step","onBlur","onInvalid","onChange","helpText","required","validationType","disableMessage","errorIcon","isErrored","getErrorIcon","getErrorMessage","onErrorChange","disableReset","defaultValue","remaining","name","form","fieldProps","messageProps"],"mappings":"AAAA;;AAIA,SAASA,SAAS,QAA6B,uBAAuB;AACtE,SAAgCC,YAAY,QAAQ,oBAAoB;AAUxE;;;;;;;;;;;;;;;;;CAiBC,GACD,OAAO,SAASC,gBAAgBC,KAA2B;IACzD,MAAM,EACJC,GAAG,EACHC,EAAE,EACFC,GAAG,EACHC,GAAG,EACHC,IAAI,EACJC,MAAM,EACNC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,QAAQ,EACRC,cAAc,EACdC,cAAc,EACdC,SAAS,EACTC,SAAS,EACTC,YAAY,EACZC,eAAe,EACfC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZ,GAAGC,WACJ,GAAGpB;IACJ,MAAM,EAAEqB,IAAI,EAAEC,IAAI,EAAE,GAAGtB;IACvB,MAAM,EAAEuB,UAAU,EAAE,GAAGzB,aAAa;QAClCI;QACAD;QACAoB;QACAC;QACAnB;QACAC;QACAC;QACAC;QACAE;QACAD;QACAE;QACAC;QACAC;QACAC,gBAAgBA,kBAAmB,CAAA,CAACT,OAAO,CAACC,OAAO,CAACC,QAAQ,CAACK,QAAO;QACpEG;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;IACF;IAEA,IAAI,EAAEK,YAAY,EAAE,GAAGJ;IACvB,IAAIG,WAAWC,YAAY,EAAE;QAC3BA,eAAe;YACb,GAAGD,WAAWC,YAAY;YAC1B,GAAGJ,UAAUI,YAAY;QAC3B;IACF;IAEA,qBACE,KAAC3B;QAAW,GAAGuB,SAAS;QAAG,GAAGG,UAAU;QAAEC,cAAcA;;AAE5D"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { type ReactElement, type Ref } from "react";
|
|
1
2
|
import { type TextFieldProps } from "../form/TextField.js";
|
|
2
3
|
import { type TimeFieldOptions } from "./useTimeField.js";
|
|
3
4
|
/**
|
|
4
5
|
* @since 6.3.0
|
|
5
6
|
*/
|
|
6
7
|
export interface NativeTimeFieldProps extends Omit<TextFieldProps, keyof TimeFieldOptions | "value">, Omit<TimeFieldOptions, "ref"> {
|
|
8
|
+
ref?: Ref<HTMLInputElement>;
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* The `NativeTimeField` is a simple wrapper around the `TextField` using the
|
|
@@ -23,4 +25,4 @@ export interface NativeTimeFieldProps extends Omit<TextFieldProps, keyof TimeFie
|
|
|
23
25
|
* @see {@link https://react-md.dev/components/text-field | TextField Demos}
|
|
24
26
|
* @since 6.3.0
|
|
25
27
|
*/
|
|
26
|
-
export declare
|
|
28
|
+
export declare function NativeTimeField(props: NativeTimeFieldProps): ReactElement;
|
|
@@ -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 { TextField } from "../form/TextField.js";
|
|
5
4
|
import { useTimeField } from "./useTimeField.js";
|
|
6
5
|
/**
|
|
@@ -20,8 +19,8 @@ import { useTimeField } from "./useTimeField.js";
|
|
|
20
19
|
* @see {@link https://react-md.dev/components/native-time-field | NativeTimeField Demos}
|
|
21
20
|
* @see {@link https://react-md.dev/components/text-field | TextField Demos}
|
|
22
21
|
* @since 6.3.0
|
|
23
|
-
*/ export
|
|
24
|
-
const { id, min, max, step, onBlur, onInvalid, onChange, helpText, required, validationType, disableMessage, errorIcon, isErrored, getErrorIcon, getErrorMessage, onErrorChange, disableReset, defaultValue, ...remaining } = props;
|
|
22
|
+
*/ export function NativeTimeField(props) {
|
|
23
|
+
const { ref, id, min, max, step, onBlur, onInvalid, onChange, helpText, required, validationType, disableMessage, errorIcon, isErrored, getErrorIcon, getErrorMessage, onErrorChange, disableReset, defaultValue, ...remaining } = props;
|
|
25
24
|
const { name, form } = props;
|
|
26
25
|
const { fieldProps } = useTimeField({
|
|
27
26
|
id,
|
|
@@ -58,6 +57,6 @@ import { useTimeField } from "./useTimeField.js";
|
|
|
58
57
|
...fieldProps,
|
|
59
58
|
messageProps: messageProps
|
|
60
59
|
});
|
|
61
|
-
}
|
|
60
|
+
}
|
|
62
61
|
|
|
63
62
|
//# sourceMappingURL=NativeTimeField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/datetime/NativeTimeField.tsx"],"sourcesContent":["\"use client\";\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/datetime/NativeTimeField.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactElement, type Ref } from \"react\";\n\nimport { TextField, type TextFieldProps } from \"../form/TextField.js\";\nimport { type TimeFieldOptions, useTimeField } from \"./useTimeField.js\";\n\n/**\n * @since 6.3.0\n */\nexport interface NativeTimeFieldProps\n extends\n Omit<TextFieldProps, keyof TimeFieldOptions | \"value\">,\n Omit<TimeFieldOptions, \"ref\"> {\n ref?: Ref<HTMLInputElement>;\n}\n\n/**\n * The `NativeTimeField` is a simple wrapper around the `TextField` using the\n * `useTimeField` hook.\n *\n * @example Simple Example\n * ```tsx\n * import { NativeTimeField } from \"@react-md/core/datetime/NativeTimeField\";\n * import { type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <NativeTimeField label=\"Time\" name=\"appt\" />;\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/native-time-field | NativeTimeField Demos}\n * @see {@link https://react-md.dev/components/text-field | TextField Demos}\n * @since 6.3.0\n */\nexport function NativeTimeField(props: NativeTimeFieldProps): ReactElement {\n const {\n ref,\n id,\n min,\n max,\n step,\n onBlur,\n onInvalid,\n onChange,\n helpText,\n required,\n validationType,\n disableMessage,\n errorIcon,\n isErrored,\n getErrorIcon,\n getErrorMessage,\n onErrorChange,\n disableReset,\n defaultValue,\n ...remaining\n } = props;\n const { name, form } = props;\n const { fieldProps } = useTimeField({\n id,\n ref,\n name,\n form,\n min,\n max,\n step,\n onBlur,\n onChange,\n onInvalid,\n helpText,\n required,\n validationType,\n disableMessage: disableMessage ?? (!min && !max && !step && !required),\n errorIcon,\n isErrored,\n getErrorIcon,\n getErrorMessage,\n onErrorChange,\n disableReset,\n defaultValue,\n });\n\n let { messageProps } = remaining;\n if (fieldProps.messageProps) {\n messageProps = {\n ...fieldProps.messageProps,\n ...remaining.messageProps,\n };\n }\n\n return (\n <TextField {...remaining} {...fieldProps} messageProps={messageProps} />\n );\n}\n"],"names":["TextField","useTimeField","NativeTimeField","props","ref","id","min","max","step","onBlur","onInvalid","onChange","helpText","required","validationType","disableMessage","errorIcon","isErrored","getErrorIcon","getErrorMessage","onErrorChange","disableReset","defaultValue","remaining","name","form","fieldProps","messageProps"],"mappings":"AAAA;;AAIA,SAASA,SAAS,QAA6B,uBAAuB;AACtE,SAAgCC,YAAY,QAAQ,oBAAoB;AAYxE;;;;;;;;;;;;;;;;;CAiBC,GACD,OAAO,SAASC,gBAAgBC,KAA2B;IACzD,MAAM,EACJC,GAAG,EACHC,EAAE,EACFC,GAAG,EACHC,GAAG,EACHC,IAAI,EACJC,MAAM,EACNC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,QAAQ,EACRC,cAAc,EACdC,cAAc,EACdC,SAAS,EACTC,SAAS,EACTC,YAAY,EACZC,eAAe,EACfC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZ,GAAGC,WACJ,GAAGpB;IACJ,MAAM,EAAEqB,IAAI,EAAEC,IAAI,EAAE,GAAGtB;IACvB,MAAM,EAAEuB,UAAU,EAAE,GAAGzB,aAAa;QAClCI;QACAD;QACAoB;QACAC;QACAnB;QACAC;QACAC;QACAC;QACAE;QACAD;QACAE;QACAC;QACAC;QACAC,gBAAgBA,kBAAmB,CAAA,CAACT,OAAO,CAACC,OAAO,CAACC,QAAQ,CAACK,QAAO;QACpEG;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;IACF;IAEA,IAAI,EAAEK,YAAY,EAAE,GAAGJ;IACvB,IAAIG,WAAWC,YAAY,EAAE;QAC3BA,eAAe;YACb,GAAGD,WAAWC,YAAY;YAC1B,GAAGJ,UAAUI,YAAY;QAC3B;IACF;IAEA,qBACE,KAAC3B;QAAW,GAAGuB,SAAS;QAAG,GAAGG,UAAU;QAAEC,cAAcA;;AAE5D"}
|
package/dist/dialog/Dialog.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 FocusContainerComponentProps } from "../focus/useFocusContainer.js";
|
|
3
3
|
import { type CSSTransitionClassNames, type CSSTransitionComponentProps, type TransitionActions, type TransitionTimeout } from "../transition/types.js";
|
|
4
4
|
import { type LabelRequiredForA11y, type PropsWithRef } from "../types.js";
|
|
5
5
|
import { type ConfigurableDialogContainerProps } from "./DialogContainer.js";
|
|
6
6
|
import { type DialogType, type DialogWidth } from "./styles.js";
|
|
7
7
|
export interface BaseDialogProps extends HTMLAttributes<HTMLDivElement>, CSSTransitionComponentProps, TransitionActions, FocusContainerComponentProps {
|
|
8
|
+
ref?: Ref<HTMLDivElement>;
|
|
8
9
|
/**
|
|
9
10
|
* @defaultValue `"dialog-" + useId()`
|
|
10
11
|
*/
|
|
@@ -174,4 +175,4 @@ export type DialogProps = LabelRequiredForA11y<BaseDialogProps>;
|
|
|
174
175
|
* within once it becomes visible. You must manually add `autoFocus` to a
|
|
175
176
|
* element instead.
|
|
176
177
|
*/
|
|
177
|
-
export declare
|
|
178
|
+
export declare function Dialog(props: DialogProps): ReactElement;
|
package/dist/dialog/Dialog.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { useState } from "react";
|
|
4
4
|
import { useSsr } from "../SsrProvider.js";
|
|
5
5
|
import { useFocusContainer } from "../focus/useFocusContainer.js";
|
|
6
6
|
import { Overlay } from "../overlay/Overlay.js";
|
|
@@ -66,8 +66,8 @@ const noopBool = ()=>false;
|
|
|
66
66
|
* @since 6.0.0 The `Dialog` no longer supports focusing elements
|
|
67
67
|
* within once it becomes visible. You must manually add `autoFocus` to a
|
|
68
68
|
* element instead.
|
|
69
|
-
*/ export
|
|
70
|
-
const { id: propId, modal = false, role = modal ? "alertdialog" : "dialog", type = "centered", width, tabIndex = -1, visible, onRequestClose, containerProps, temporary = true, className, timeout = DEFAULT_DIALOG_TIMEOUT, classNames = DEFAULT_DIALOG_CLASSNAMES, disableTransition = false, appear = false, enter = true, exit = true, onEnter = noop, onEntering = noop, onEntered = noop, onExit = noop, onExiting = noop, onExited = noop, exitedHidden = true, disableOverlay = false, overlayProps, overlayHidden, onKeyDown = noop, isFocusTypeDisabled = noopBool, disablePortal: propDisablePortal, disableScrollLock = false, disableEscapeClose = modal, disableFocusOutline = type === "full-page", children, ...remaining } = props;
|
|
69
|
+
*/ export function Dialog(props) {
|
|
70
|
+
const { ref, id: propId, modal = false, role = modal ? "alertdialog" : "dialog", type = "centered", width, tabIndex = -1, visible, onRequestClose, containerProps, temporary = true, className, timeout = DEFAULT_DIALOG_TIMEOUT, classNames = DEFAULT_DIALOG_CLASSNAMES, disableTransition = false, appear = false, enter = true, exit = true, onEnter = noop, onEntering = noop, onEntered = noop, onExit = noop, onExiting = noop, onExited = noop, exitedHidden = true, disableOverlay = false, overlayProps, overlayHidden, onKeyDown = noop, isFocusTypeDisabled = noopBool, disablePortal: propDisablePortal, disableScrollLock = false, disableEscapeClose = modal, disableFocusOutline = type === "full-page", children, ...remaining } = props;
|
|
71
71
|
const id = useEnsuredId(propId, "dialog");
|
|
72
72
|
const ssr = useSsr();
|
|
73
73
|
const setChildVisible = useNestedDialogContext();
|
|
@@ -168,6 +168,6 @@ const noopBool = ()=>false;
|
|
|
168
168
|
})
|
|
169
169
|
]
|
|
170
170
|
});
|
|
171
|
-
}
|
|
171
|
+
}
|
|
172
172
|
|
|
173
173
|
//# sourceMappingURL=Dialog.js.map
|