@sitecore/sc-contenthub-blok 0.0.36 → 0.0.38
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/BlokTheme.js +24 -0
- package/dist/BlokTheme.js.map +1 -1
- package/dist/Components/BlokButton/BlokButton.d.ts +9 -1
- package/dist/Components/BlokButton/BlokButton.js +11 -1
- package/dist/Components/BlokButton/BlokButton.js.map +1 -1
- package/dist/Components/BlokButton/BlokButton.stories.js +1 -0
- package/dist/Components/BlokButton/BlokButton.stories.js.map +1 -1
- package/dist/Components/BlokIconButton/BlokIconButton.stories.js +1 -0
- package/dist/Components/BlokIconButton/BlokIconButton.stories.js.map +1 -1
- package/esm/BlokTheme.js +24 -0
- package/esm/BlokTheme.js.map +1 -1
- package/esm/Components/BlokButton/BlokButton.js +11 -1
- package/esm/Components/BlokButton/BlokButton.js.map +1 -1
- package/node_modules/@mui/core-downloads-tracker/package.json +1 -1
- package/node_modules/@mui/material/AccordionSummary/AccordionSummary.js +4 -3
- package/node_modules/@mui/material/Alert/Alert.d.ts +69 -0
- package/node_modules/@mui/material/Alert/Alert.js +53 -21
- package/node_modules/@mui/material/AppBar/AppBar.d.ts +1 -1
- package/node_modules/@mui/material/AppBar/AppBar.js +1 -1
- package/node_modules/@mui/material/Autocomplete/Autocomplete.d.ts +1 -1
- package/node_modules/@mui/material/Autocomplete/Autocomplete.js +42 -55
- package/node_modules/@mui/material/AvatarGroup/AvatarGroup.js +5 -4
- package/node_modules/@mui/material/Backdrop/Backdrop.js +1 -9
- package/node_modules/@mui/material/Box/Box.d.ts +3 -1
- package/node_modules/@mui/material/Button/Button.d.ts +18 -0
- package/node_modules/@mui/material/Button/Button.js +233 -15
- package/node_modules/@mui/material/Button/buttonClasses.d.ts +14 -0
- package/node_modules/@mui/material/Button/buttonClasses.js +1 -1
- package/node_modules/@mui/material/ButtonBase/ButtonBase.d.ts +2 -0
- package/node_modules/@mui/material/ButtonGroup/ButtonGroupButtonContext.js +2 -0
- package/node_modules/@mui/material/ButtonGroup/ButtonGroupContext.js +2 -0
- package/node_modules/@mui/material/CHANGELOG.md +240 -2
- package/node_modules/@mui/material/CardHeader/CardHeader.d.ts +114 -1
- package/node_modules/@mui/material/CardHeader/CardHeader.js +106 -37
- package/node_modules/@mui/material/CircularProgress/CircularProgress.js +2 -2
- package/node_modules/@mui/material/Collapse/Collapse.js +5 -4
- package/node_modules/@mui/material/Dialog/Dialog.d.ts +85 -1
- package/node_modules/@mui/material/Dialog/Dialog.js +91 -20
- package/node_modules/@mui/material/Dialog/DialogContext.js +2 -0
- package/node_modules/@mui/material/Drawer/Drawer.js +1 -1
- package/node_modules/@mui/material/Drawer/drawerClasses.d.ts +32 -8
- package/node_modules/@mui/material/Drawer/drawerClasses.js +1 -1
- package/node_modules/@mui/material/Fade/Fade.js +5 -2
- package/node_modules/@mui/material/FilledInput/FilledInput.js +1 -3
- package/node_modules/@mui/material/FormControl/FormControl.js +14 -15
- package/node_modules/@mui/material/FormControl/FormControlContext.js +2 -0
- package/node_modules/@mui/material/FormLabel/FormLabel.js +5 -8
- package/node_modules/@mui/material/Grid/Grid.js +2 -2
- package/node_modules/@mui/material/Grow/Grow.js +5 -2
- package/node_modules/@mui/material/Hidden/withWidth.js +2 -0
- package/node_modules/@mui/material/Icon/Icon.js +1 -3
- package/node_modules/@mui/material/IconButton/IconButton.d.ts +13 -0
- package/node_modules/@mui/material/IconButton/IconButton.js +80 -7
- package/node_modules/@mui/material/IconButton/iconButtonClasses.d.ts +6 -0
- package/node_modules/@mui/material/IconButton/iconButtonClasses.js +1 -1
- package/node_modules/@mui/material/Input/Input.js +1 -3
- package/node_modules/@mui/material/LinearProgress/LinearProgress.js +4 -4
- package/node_modules/@mui/material/LinearProgress/linearProgressClasses.d.ts +31 -9
- package/node_modules/@mui/material/LinearProgress/linearProgressClasses.js +1 -1
- package/node_modules/@mui/material/Link/getTextDecoration.js +3 -2
- package/node_modules/@mui/material/ListItemText/ListItemText.d.ts +36 -1
- package/node_modules/@mui/material/ListItemText/ListItemText.js +46 -7
- package/node_modules/@mui/material/OutlinedInput/OutlinedInput.js +1 -3
- package/node_modules/@mui/material/PigmentGrid/PigmentGrid.js +1 -1
- package/node_modules/@mui/material/RadioGroup/RadioGroupContext.js +2 -0
- package/node_modules/@mui/material/Select/Select.js +10 -1
- package/node_modules/@mui/material/Select/SelectInput.js +9 -1
- package/node_modules/@mui/material/Select/selectClasses.d.ts +9 -3
- package/node_modules/@mui/material/Slide/Slide.js +5 -2
- package/node_modules/@mui/material/Slider/useSlider.js +69 -12
- package/node_modules/@mui/material/Step/StepContext.js +2 -0
- package/node_modules/@mui/material/StepContent/StepContent.d.ts +31 -2
- package/node_modules/@mui/material/StepContent/StepContent.js +39 -7
- package/node_modules/@mui/material/StepLabel/StepLabel.d.ts +1 -1
- package/node_modules/@mui/material/StepLabel/StepLabel.js +1 -3
- package/node_modules/@mui/material/Stepper/StepperContext.js +2 -0
- package/node_modules/@mui/material/SvgIcon/SvgIcon.js +1 -3
- package/node_modules/@mui/material/Table/Tablelvl2Context.js +2 -0
- package/node_modules/@mui/material/TablePagination/TablePagination.d.ts +134 -18
- package/node_modules/@mui/material/TablePagination/TablePagination.js +89 -33
- package/node_modules/@mui/material/TableSortLabel/TableSortLabel.d.ts +43 -1
- package/node_modules/@mui/material/TableSortLabel/TableSortLabel.js +40 -7
- package/node_modules/@mui/material/TextField/TextField.d.ts +1 -0
- package/node_modules/@mui/material/TextField/TextField.js +1 -0
- package/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroupButtonContext.js +2 -0
- package/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroupContext.js +2 -0
- package/node_modules/@mui/material/Tooltip/Tooltip.d.ts +1 -1
- package/node_modules/@mui/material/Tooltip/Tooltip.js +1 -1
- package/node_modules/@mui/material/Zoom/Zoom.js +5 -2
- package/node_modules/@mui/material/index.js +1 -1
- package/node_modules/@mui/material/modern/AccordionSummary/AccordionSummary.js +4 -3
- package/node_modules/@mui/material/modern/Alert/Alert.js +53 -21
- package/node_modules/@mui/material/modern/AppBar/AppBar.js +1 -1
- package/node_modules/@mui/material/modern/Autocomplete/Autocomplete.js +42 -55
- package/node_modules/@mui/material/modern/AvatarGroup/AvatarGroup.js +5 -4
- package/node_modules/@mui/material/modern/Backdrop/Backdrop.js +1 -9
- package/node_modules/@mui/material/modern/Button/Button.js +233 -15
- package/node_modules/@mui/material/modern/Button/buttonClasses.js +1 -1
- package/node_modules/@mui/material/modern/ButtonGroup/ButtonGroupButtonContext.js +2 -0
- package/node_modules/@mui/material/modern/ButtonGroup/ButtonGroupContext.js +2 -0
- package/node_modules/@mui/material/modern/CardHeader/CardHeader.js +106 -37
- package/node_modules/@mui/material/modern/CircularProgress/CircularProgress.js +2 -2
- package/node_modules/@mui/material/modern/Collapse/Collapse.js +5 -4
- package/node_modules/@mui/material/modern/Dialog/Dialog.js +91 -20
- package/node_modules/@mui/material/modern/Dialog/DialogContext.js +2 -0
- package/node_modules/@mui/material/modern/Drawer/Drawer.js +1 -1
- package/node_modules/@mui/material/modern/Drawer/drawerClasses.js +1 -1
- package/node_modules/@mui/material/modern/Fade/Fade.js +5 -2
- package/node_modules/@mui/material/modern/FilledInput/FilledInput.js +1 -3
- package/node_modules/@mui/material/modern/FormControl/FormControl.js +14 -15
- package/node_modules/@mui/material/modern/FormControl/FormControlContext.js +2 -0
- package/node_modules/@mui/material/modern/FormLabel/FormLabel.js +5 -8
- package/node_modules/@mui/material/modern/Grid/Grid.js +2 -2
- package/node_modules/@mui/material/modern/Grow/Grow.js +5 -2
- package/node_modules/@mui/material/modern/Hidden/withWidth.js +2 -0
- package/node_modules/@mui/material/modern/Icon/Icon.js +1 -3
- package/node_modules/@mui/material/modern/IconButton/IconButton.js +80 -7
- package/node_modules/@mui/material/modern/IconButton/iconButtonClasses.js +1 -1
- package/node_modules/@mui/material/modern/Input/Input.js +1 -3
- package/node_modules/@mui/material/modern/LinearProgress/LinearProgress.js +4 -4
- package/node_modules/@mui/material/modern/LinearProgress/linearProgressClasses.js +1 -1
- package/node_modules/@mui/material/modern/Link/getTextDecoration.js +3 -2
- package/node_modules/@mui/material/modern/ListItemText/ListItemText.js +46 -7
- package/node_modules/@mui/material/modern/OutlinedInput/OutlinedInput.js +1 -3
- package/node_modules/@mui/material/modern/PigmentGrid/PigmentGrid.js +1 -1
- package/node_modules/@mui/material/modern/RadioGroup/RadioGroupContext.js +2 -0
- package/node_modules/@mui/material/modern/Select/Select.js +10 -1
- package/node_modules/@mui/material/modern/Select/SelectInput.js +9 -1
- package/node_modules/@mui/material/modern/Slide/Slide.js +5 -2
- package/node_modules/@mui/material/modern/Slider/useSlider.js +69 -12
- package/node_modules/@mui/material/modern/Step/StepContext.js +2 -0
- package/node_modules/@mui/material/modern/StepContent/StepContent.js +39 -7
- package/node_modules/@mui/material/modern/StepLabel/StepLabel.js +1 -3
- package/node_modules/@mui/material/modern/Stepper/StepperContext.js +2 -0
- package/node_modules/@mui/material/modern/SvgIcon/SvgIcon.js +1 -3
- package/node_modules/@mui/material/modern/Table/Tablelvl2Context.js +2 -0
- package/node_modules/@mui/material/modern/TablePagination/TablePagination.js +89 -33
- package/node_modules/@mui/material/modern/TableSortLabel/TableSortLabel.js +40 -7
- package/node_modules/@mui/material/modern/TextField/TextField.js +1 -0
- package/node_modules/@mui/material/modern/ToggleButtonGroup/ToggleButtonGroupButtonContext.js +2 -0
- package/node_modules/@mui/material/modern/ToggleButtonGroup/ToggleButtonGroupContext.js +2 -0
- package/node_modules/@mui/material/modern/Tooltip/Tooltip.js +1 -1
- package/node_modules/@mui/material/modern/Zoom/Zoom.js +5 -2
- package/node_modules/@mui/material/modern/index.js +1 -1
- package/node_modules/@mui/material/modern/usePagination/usePagination.js +1 -1
- package/node_modules/@mui/material/modern/utils/index.js +1 -0
- package/node_modules/@mui/material/modern/utils/mergeSlotProps.js +43 -0
- package/node_modules/@mui/material/modern/utils/useSlot.js +5 -1
- package/node_modules/@mui/material/modern/version/index.js +3 -3
- package/node_modules/@mui/material/node/AccordionSummary/AccordionSummary.js +4 -3
- package/node_modules/@mui/material/node/Alert/Alert.js +53 -21
- package/node_modules/@mui/material/node/AppBar/AppBar.js +1 -1
- package/node_modules/@mui/material/node/Autocomplete/Autocomplete.js +42 -55
- package/node_modules/@mui/material/node/AvatarGroup/AvatarGroup.js +5 -4
- package/node_modules/@mui/material/node/Backdrop/Backdrop.js +1 -9
- package/node_modules/@mui/material/node/Button/Button.js +233 -15
- package/node_modules/@mui/material/node/Button/buttonClasses.js +1 -1
- package/node_modules/@mui/material/node/ButtonGroup/ButtonGroupButtonContext.js +1 -0
- package/node_modules/@mui/material/node/ButtonGroup/ButtonGroupContext.js +1 -0
- package/node_modules/@mui/material/node/CardHeader/CardHeader.js +106 -37
- package/node_modules/@mui/material/node/CircularProgress/CircularProgress.js +2 -2
- package/node_modules/@mui/material/node/Collapse/Collapse.js +5 -4
- package/node_modules/@mui/material/node/Dialog/Dialog.js +91 -20
- package/node_modules/@mui/material/node/Dialog/DialogContext.js +1 -0
- package/node_modules/@mui/material/node/Drawer/Drawer.js +1 -1
- package/node_modules/@mui/material/node/Drawer/drawerClasses.js +1 -1
- package/node_modules/@mui/material/node/Fade/Fade.js +5 -2
- package/node_modules/@mui/material/node/FilledInput/FilledInput.js +1 -3
- package/node_modules/@mui/material/node/FormControl/FormControl.js +14 -15
- package/node_modules/@mui/material/node/FormControl/FormControlContext.js +1 -0
- package/node_modules/@mui/material/node/FormLabel/FormLabel.js +5 -8
- package/node_modules/@mui/material/node/Grid/Grid.js +2 -2
- package/node_modules/@mui/material/node/Grow/Grow.js +5 -2
- package/node_modules/@mui/material/node/Hidden/withWidth.js +1 -0
- package/node_modules/@mui/material/node/Icon/Icon.js +1 -3
- package/node_modules/@mui/material/node/IconButton/IconButton.js +79 -6
- package/node_modules/@mui/material/node/IconButton/iconButtonClasses.js +1 -1
- package/node_modules/@mui/material/node/Input/Input.js +1 -3
- package/node_modules/@mui/material/node/LinearProgress/LinearProgress.js +4 -4
- package/node_modules/@mui/material/node/LinearProgress/linearProgressClasses.js +1 -1
- package/node_modules/@mui/material/node/Link/getTextDecoration.js +3 -2
- package/node_modules/@mui/material/node/ListItemText/ListItemText.js +46 -7
- package/node_modules/@mui/material/node/OutlinedInput/OutlinedInput.js +1 -3
- package/node_modules/@mui/material/node/PigmentGrid/PigmentGrid.js +2 -2
- package/node_modules/@mui/material/node/RadioGroup/RadioGroupContext.js +1 -0
- package/node_modules/@mui/material/node/Select/Select.js +10 -1
- package/node_modules/@mui/material/node/Select/SelectInput.js +9 -1
- package/node_modules/@mui/material/node/Slide/Slide.js +5 -2
- package/node_modules/@mui/material/node/Slider/useSlider.js +69 -12
- package/node_modules/@mui/material/node/Step/StepContext.js +1 -0
- package/node_modules/@mui/material/node/StepContent/StepContent.js +39 -7
- package/node_modules/@mui/material/node/StepLabel/StepLabel.js +1 -3
- package/node_modules/@mui/material/node/Stepper/StepperContext.js +1 -0
- package/node_modules/@mui/material/node/SvgIcon/SvgIcon.js +1 -3
- package/node_modules/@mui/material/node/Table/Tablelvl2Context.js +1 -0
- package/node_modules/@mui/material/node/TablePagination/TablePagination.js +89 -33
- package/node_modules/@mui/material/node/TableSortLabel/TableSortLabel.js +40 -7
- package/node_modules/@mui/material/node/TextField/TextField.js +1 -0
- package/node_modules/@mui/material/node/ToggleButtonGroup/ToggleButtonGroupButtonContext.js +1 -0
- package/node_modules/@mui/material/node/ToggleButtonGroup/ToggleButtonGroupContext.js +1 -0
- package/node_modules/@mui/material/node/Tooltip/Tooltip.js +1 -1
- package/node_modules/@mui/material/node/Zoom/Zoom.js +5 -2
- package/node_modules/@mui/material/node/index.js +1 -1
- package/node_modules/@mui/material/node/usePagination/usePagination.js +1 -1
- package/node_modules/@mui/material/node/utils/index.js +7 -0
- package/node_modules/@mui/material/node/utils/mergeSlotProps.js +50 -0
- package/node_modules/@mui/material/node/utils/useSlot.js +5 -1
- package/node_modules/@mui/material/node/version/index.js +3 -3
- package/node_modules/{react-is → @mui/material/node_modules/react-is}/LICENSE +1 -1
- package/node_modules/{react-is → @mui/material/node_modules/react-is}/README.md +0 -1
- package/node_modules/@mui/material/node_modules/react-is/cjs/react-is.development.js +133 -0
- package/node_modules/@mui/material/node_modules/react-is/cjs/react-is.production.js +130 -0
- package/node_modules/{react-is → @mui/material/node_modules/react-is}/index.js +1 -1
- package/node_modules/{react-is → @mui/material/node_modules/react-is}/package.json +4 -4
- package/node_modules/@mui/material/package.json +8 -8
- package/node_modules/@mui/material/styles/useThemeProps.d.ts +27 -0
- package/node_modules/@mui/material/useAutocomplete/useAutocomplete.d.ts +20 -5
- package/node_modules/@mui/material/useLazyRipple/useLazyRipple.d.ts +1 -1
- package/node_modules/@mui/material/usePagination/usePagination.js +1 -1
- package/node_modules/@mui/material/utils/index.d.ts +1 -0
- package/node_modules/@mui/material/utils/index.js +1 -0
- package/node_modules/@mui/material/utils/memoTheme.d.ts +1 -1
- package/node_modules/@mui/material/utils/mergeSlotProps.d.ts +2 -0
- package/node_modules/@mui/material/utils/mergeSlotProps.js +43 -0
- package/node_modules/@mui/material/utils/useSlot.d.ts +8 -0
- package/node_modules/@mui/material/utils/useSlot.js +5 -1
- package/node_modules/@mui/material/version/index.js +3 -3
- package/node_modules/@mui/private-theming/CHANGELOG.md +240 -2
- package/node_modules/@mui/private-theming/index.js +1 -1
- package/node_modules/@mui/private-theming/modern/index.js +1 -1
- package/node_modules/@mui/private-theming/modern/useTheme/ThemeContext.js +2 -0
- package/node_modules/@mui/private-theming/node/index.js +1 -1
- package/node_modules/@mui/private-theming/node/useTheme/ThemeContext.js +1 -0
- package/node_modules/@mui/private-theming/package.json +2 -2
- package/node_modules/@mui/private-theming/useTheme/ThemeContext.js +2 -0
- package/node_modules/@mui/styled-engine/CHANGELOG.md +198 -2
- package/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js +29 -19
- package/node_modules/@mui/styled-engine/index.js +1 -1
- package/node_modules/@mui/styled-engine/modern/StyledEngineProvider/StyledEngineProvider.js +29 -19
- package/node_modules/@mui/styled-engine/modern/index.js +1 -1
- package/node_modules/@mui/styled-engine/node/StyledEngineProvider/StyledEngineProvider.js +29 -19
- package/node_modules/@mui/styled-engine/node/index.js +1 -1
- package/node_modules/@mui/styled-engine/package.json +1 -1
- package/node_modules/@mui/system/CHANGELOG.md +240 -2
- package/node_modules/@mui/system/Grid/index.d.ts +1 -0
- package/node_modules/@mui/system/Grid/index.js +24 -2
- package/node_modules/@mui/system/RtlProvider/index.js +1 -0
- package/node_modules/@mui/system/colorManipulator/colorManipulator.js +5 -0
- package/node_modules/@mui/system/createTheme/applyStyles.d.ts +7 -3
- package/node_modules/@mui/system/createTheme/applyStyles.js +7 -3
- package/node_modules/@mui/system/cssVars/createCssVarsProvider.js +3 -1
- package/node_modules/@mui/system/esm/Grid/index.js +2 -1
- package/node_modules/@mui/system/esm/RtlProvider/index.js +2 -0
- package/node_modules/@mui/system/esm/colorManipulator/colorManipulator.js +5 -0
- package/node_modules/@mui/system/esm/createTheme/applyStyles.js +7 -3
- package/node_modules/@mui/system/esm/cssVars/createCssVarsProvider.js +4 -1
- package/node_modules/@mui/system/esm/version/index.js +3 -3
- package/node_modules/@mui/system/index.js +1 -1
- package/node_modules/@mui/system/memoTheme.d.ts +1 -1
- package/node_modules/@mui/system/modern/Grid/index.js +2 -1
- package/node_modules/@mui/system/modern/RtlProvider/index.js +2 -0
- package/node_modules/@mui/system/modern/colorManipulator/colorManipulator.js +5 -0
- package/node_modules/@mui/system/modern/createTheme/applyStyles.js +7 -3
- package/node_modules/@mui/system/modern/cssVars/createCssVarsProvider.js +4 -1
- package/node_modules/@mui/system/modern/index.js +1 -1
- package/node_modules/@mui/system/modern/version/index.js +3 -3
- package/node_modules/@mui/system/package.json +5 -5
- package/node_modules/@mui/system/version/index.js +3 -3
- package/node_modules/@mui/types/package.json +1 -1
- package/node_modules/@mui/utils/CHANGELOG.md +240 -2
- package/node_modules/@mui/utils/composeClasses/composeClasses.d.ts +28 -0
- package/node_modules/@mui/utils/composeClasses/composeClasses.js +28 -0
- package/node_modules/@mui/utils/deepmerge/deepmerge.d.ts +18 -0
- package/node_modules/@mui/utils/deepmerge/deepmerge.js +22 -2
- package/node_modules/@mui/utils/esm/composeClasses/composeClasses.js +28 -0
- package/node_modules/@mui/utils/esm/deepmerge/deepmerge.js +22 -2
- package/node_modules/@mui/utils/index.js +1 -1
- package/node_modules/@mui/utils/modern/composeClasses/composeClasses.js +28 -0
- package/node_modules/@mui/utils/modern/deepmerge/deepmerge.js +22 -2
- package/node_modules/@mui/utils/modern/index.js +1 -1
- package/node_modules/@mui/utils/node_modules/react-is/LICENSE +21 -0
- package/node_modules/@mui/utils/node_modules/react-is/README.md +103 -0
- package/node_modules/@mui/utils/node_modules/react-is/cjs/react-is.development.js +133 -0
- package/node_modules/@mui/utils/node_modules/react-is/cjs/react-is.production.js +130 -0
- package/node_modules/@mui/utils/node_modules/react-is/index.js +7 -0
- package/node_modules/@mui/utils/node_modules/react-is/package.json +26 -0
- package/node_modules/@mui/utils/package.json +4 -4
- package/node_modules/@mui/utils/useLazyRef/useLazyRef.d.ts +1 -1
- package/node_modules/@mui/x-date-pickers/CHANGELOG.md +487 -0
- package/node_modules/@mui/x-date-pickers/DateCalendar/PickersFadeTransitionGroup.d.ts +1 -1
- package/node_modules/@mui/x-date-pickers/DateCalendar/PickersSlideTransition.d.ts +1 -1
- package/node_modules/@mui/x-date-pickers/DateField/useDateField.d.ts +1 -1
- package/node_modules/@mui/x-date-pickers/DateTimeField/useDateTimeField.d.ts +1 -1
- package/node_modules/@mui/x-date-pickers/MultiSectionDigitalClock/MultiSectionDigitalClock.js +3 -0
- package/node_modules/@mui/x-date-pickers/PickersCalendarHeader/PickersCalendarHeader.js +2 -0
- package/node_modules/@mui/x-date-pickers/README.md +1 -1
- package/node_modules/@mui/x-date-pickers/TimeClock/Clock.d.ts +4 -0
- package/node_modules/@mui/x-date-pickers/TimeClock/Clock.js +10 -6
- package/node_modules/@mui/x-date-pickers/TimeClock/TimeClock.js +21 -4
- package/node_modules/@mui/x-date-pickers/TimeField/useTimeField.d.ts +1 -1
- package/node_modules/@mui/x-date-pickers/index.js +1 -1
- package/node_modules/@mui/x-date-pickers/internals/hooks/useField/useField.js +5 -0
- package/node_modules/@mui/x-date-pickers/internals/hooks/useField/useFieldV6TextField.js +5 -2
- package/node_modules/@mui/x-date-pickers/internals/hooks/useField/useFieldV7TextField.js +3 -0
- package/node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePickerViews.d.ts +1 -1
- package/node_modules/@mui/x-date-pickers/internals/hooks/useStaticPicker/useStaticPicker.js +0 -1
- package/node_modules/@mui/x-date-pickers/internals/hooks/useUtils.js +1 -1
- package/node_modules/@mui/x-date-pickers/locales/index.d.ts +1 -0
- package/node_modules/@mui/x-date-pickers/locales/index.js +1 -0
- package/node_modules/@mui/x-date-pickers/locales/nbNO.js +15 -19
- package/node_modules/@mui/x-date-pickers/locales/roRO.js +15 -18
- package/node_modules/@mui/x-date-pickers/locales/zhTW.d.ts +80 -0
- package/node_modules/@mui/x-date-pickers/locales/zhTW.js +73 -0
- package/node_modules/@mui/x-date-pickers/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +3 -0
- package/node_modules/@mui/x-date-pickers/modern/PickersCalendarHeader/PickersCalendarHeader.js +2 -0
- package/node_modules/@mui/x-date-pickers/modern/TimeClock/Clock.js +10 -6
- package/node_modules/@mui/x-date-pickers/modern/TimeClock/TimeClock.js +21 -4
- package/node_modules/@mui/x-date-pickers/modern/index.js +1 -1
- package/node_modules/@mui/x-date-pickers/modern/internals/hooks/useField/useField.js +5 -0
- package/node_modules/@mui/x-date-pickers/modern/internals/hooks/useField/useFieldV6TextField.js +5 -2
- package/node_modules/@mui/x-date-pickers/modern/internals/hooks/useField/useFieldV7TextField.js +3 -0
- package/node_modules/@mui/x-date-pickers/modern/internals/hooks/useStaticPicker/useStaticPicker.js +0 -1
- package/node_modules/@mui/x-date-pickers/modern/internals/hooks/useUtils.js +1 -1
- package/node_modules/@mui/x-date-pickers/modern/locales/index.js +1 -0
- package/node_modules/@mui/x-date-pickers/modern/locales/nbNO.js +15 -19
- package/node_modules/@mui/x-date-pickers/modern/locales/roRO.js +15 -18
- package/node_modules/@mui/x-date-pickers/modern/locales/zhTW.js +73 -0
- package/node_modules/@mui/x-date-pickers/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +3 -0
- package/node_modules/@mui/x-date-pickers/node/PickersCalendarHeader/PickersCalendarHeader.js +2 -0
- package/node_modules/@mui/x-date-pickers/node/TimeClock/Clock.js +10 -6
- package/node_modules/@mui/x-date-pickers/node/TimeClock/TimeClock.js +21 -4
- package/node_modules/@mui/x-date-pickers/node/index.js +1 -1
- package/node_modules/@mui/x-date-pickers/node/internals/hooks/useField/useField.js +5 -0
- package/node_modules/@mui/x-date-pickers/node/internals/hooks/useField/useFieldV6TextField.js +5 -2
- package/node_modules/@mui/x-date-pickers/node/internals/hooks/useField/useFieldV7TextField.js +3 -0
- package/node_modules/@mui/x-date-pickers/node/internals/hooks/useStaticPicker/useStaticPicker.js +0 -1
- package/node_modules/@mui/x-date-pickers/node/internals/hooks/useUtils.js +1 -1
- package/node_modules/@mui/x-date-pickers/node/locales/index.js +11 -0
- package/node_modules/@mui/x-date-pickers/node/locales/nbNO.js +15 -19
- package/node_modules/@mui/x-date-pickers/node/locales/roRO.js +15 -18
- package/node_modules/@mui/x-date-pickers/node/locales/zhTW.js +79 -0
- package/node_modules/@mui/x-date-pickers/package.json +3 -3
- package/node_modules/@mui/x-internals/CHANGELOG.md +487 -0
- package/node_modules/@mui/x-internals/esm/forwardRef/forwardRef.js +15 -0
- package/node_modules/@mui/x-internals/esm/forwardRef/index.js +1 -0
- package/node_modules/@mui/x-internals/esm/types/RefObject.js +1 -0
- package/node_modules/@mui/x-internals/esm/types/index.js +1 -0
- package/node_modules/@mui/x-internals/forwardRef/forwardRef.d.ts +4 -0
- package/node_modules/@mui/x-internals/forwardRef/forwardRef.js +23 -0
- package/node_modules/@mui/x-internals/forwardRef/index.d.ts +1 -0
- package/node_modules/@mui/x-internals/forwardRef/index.js +16 -0
- package/node_modules/@mui/x-internals/forwardRef/package.json +6 -0
- package/node_modules/@mui/x-internals/modern/forwardRef/forwardRef.js +15 -0
- package/node_modules/@mui/x-internals/modern/forwardRef/index.js +1 -0
- package/node_modules/@mui/x-internals/modern/types/RefObject.js +1 -0
- package/node_modules/@mui/x-internals/modern/types/index.js +1 -0
- package/node_modules/@mui/x-internals/package.json +1 -1
- package/node_modules/@mui/x-internals/types/RefObject.d.ts +8 -0
- package/node_modules/@mui/x-internals/types/RefObject.js +5 -0
- package/node_modules/@mui/x-internals/types/index.d.ts +1 -0
- package/node_modules/@mui/x-internals/types/index.js +16 -0
- package/node_modules/@mui/x-internals/types/package.json +6 -0
- package/node_modules/@mui/x-internals/useResizeObserver/useResizeObserver.d.ts +1 -1
- package/node_modules/@types/prop-types/README.md +1 -1
- package/node_modules/@types/prop-types/index.d.ts +21 -4
- package/node_modules/@types/prop-types/package.json +4 -3
- package/node_modules/@types/react-transition-group/README.md +3 -2
- package/node_modules/@types/react-transition-group/package.json +5 -4
- package/package.json +4 -4
- package/node_modules/@types/react/LICENSE +0 -21
- package/node_modules/@types/react/README.md +0 -15
- package/node_modules/@types/react/canary.d.ts +0 -166
- package/node_modules/@types/react/experimental.d.ts +0 -132
- package/node_modules/@types/react/global.d.ts +0 -160
- package/node_modules/@types/react/index.d.ts +0 -4543
- package/node_modules/@types/react/jsx-dev-runtime.d.ts +0 -45
- package/node_modules/@types/react/jsx-runtime.d.ts +0 -36
- package/node_modules/@types/react/package.json +0 -206
- package/node_modules/@types/react/ts5.0/canary.d.ts +0 -166
- package/node_modules/@types/react/ts5.0/experimental.d.ts +0 -132
- package/node_modules/@types/react/ts5.0/global.d.ts +0 -160
- package/node_modules/@types/react/ts5.0/index.d.ts +0 -4530
- package/node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts +0 -44
- package/node_modules/@types/react/ts5.0/jsx-runtime.d.ts +0 -35
- package/node_modules/react-is/cjs/react-is.development.js +0 -221
- package/node_modules/react-is/cjs/react-is.production.min.js +0 -14
- package/node_modules/react-is/umd/react-is.development.js +0 -220
- package/node_modules/react-is/umd/react-is.production.min.js +0 -15
|
@@ -6,11 +6,13 @@ import clsx from 'clsx';
|
|
|
6
6
|
import resolveProps from '@mui/utils/resolveProps';
|
|
7
7
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { alpha } from '@mui/system/colorManipulator';
|
|
9
|
+
import { unstable_useId as useId } from '@mui/material/utils';
|
|
9
10
|
import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
|
|
10
11
|
import { styled } from "../zero-styled/index.js";
|
|
11
12
|
import memoTheme from "../utils/memoTheme.js";
|
|
12
13
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
13
14
|
import ButtonBase from "../ButtonBase/index.js";
|
|
15
|
+
import CircularProgress from "../CircularProgress/index.js";
|
|
14
16
|
import capitalize from "../utils/capitalize.js";
|
|
15
17
|
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
16
18
|
import buttonClasses, { getButtonUtilityClass } from "./buttonClasses.js";
|
|
@@ -24,13 +26,16 @@ const useUtilityClasses = ownerState => {
|
|
|
24
26
|
fullWidth,
|
|
25
27
|
size,
|
|
26
28
|
variant,
|
|
29
|
+
loading,
|
|
30
|
+
loadingPosition,
|
|
27
31
|
classes
|
|
28
32
|
} = ownerState;
|
|
29
33
|
const slots = {
|
|
30
|
-
root: ['root', variant, `${variant}${capitalize(color)}`, `size${capitalize(size)}`, `${variant}Size${capitalize(size)}`, `color${capitalize(color)}`, disableElevation && 'disableElevation', fullWidth && 'fullWidth'],
|
|
31
|
-
label: ['label'],
|
|
34
|
+
root: ['root', loading && 'loading', variant, `${variant}${capitalize(color)}`, `size${capitalize(size)}`, `${variant}Size${capitalize(size)}`, `color${capitalize(color)}`, disableElevation && 'disableElevation', fullWidth && 'fullWidth', loading && `loadingPosition${capitalize(loadingPosition)}`],
|
|
32
35
|
startIcon: ['icon', 'startIcon', `iconSize${capitalize(size)}`],
|
|
33
|
-
endIcon: ['icon', 'endIcon', `iconSize${capitalize(size)}`]
|
|
36
|
+
endIcon: ['icon', 'endIcon', `iconSize${capitalize(size)}`],
|
|
37
|
+
loadingIndicator: ['loadingIndicator'],
|
|
38
|
+
loadingWrapper: ['loadingWrapper']
|
|
34
39
|
};
|
|
35
40
|
const composedClasses = composeClasses(slots, getButtonUtilityClass, classes);
|
|
36
41
|
return {
|
|
@@ -75,7 +80,7 @@ const ButtonRoot = styled(ButtonBase, {
|
|
|
75
80
|
const {
|
|
76
81
|
ownerState
|
|
77
82
|
} = props;
|
|
78
|
-
return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${capitalize(ownerState.color)}`], styles[`size${capitalize(ownerState.size)}`], styles[`${ownerState.variant}Size${capitalize(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, ownerState.disableElevation && styles.disableElevation, ownerState.fullWidth && styles.fullWidth];
|
|
83
|
+
return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${capitalize(ownerState.color)}`], styles[`size${capitalize(ownerState.size)}`], styles[`${ownerState.variant}Size${capitalize(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, ownerState.disableElevation && styles.disableElevation, ownerState.fullWidth && styles.fullWidth, ownerState.loading && styles.loading];
|
|
79
84
|
}
|
|
80
85
|
})(memoTheme(({
|
|
81
86
|
theme
|
|
@@ -262,6 +267,18 @@ const ButtonRoot = styled(ButtonBase, {
|
|
|
262
267
|
style: {
|
|
263
268
|
width: '100%'
|
|
264
269
|
}
|
|
270
|
+
}, {
|
|
271
|
+
props: {
|
|
272
|
+
loadingPosition: 'center'
|
|
273
|
+
},
|
|
274
|
+
style: {
|
|
275
|
+
transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {
|
|
276
|
+
duration: theme.transitions.duration.short
|
|
277
|
+
}),
|
|
278
|
+
[`&.${buttonClasses.loading}`]: {
|
|
279
|
+
color: 'transparent'
|
|
280
|
+
}
|
|
281
|
+
}
|
|
265
282
|
}]
|
|
266
283
|
};
|
|
267
284
|
}));
|
|
@@ -272,9 +289,11 @@ const ButtonStartIcon = styled('span', {
|
|
|
272
289
|
const {
|
|
273
290
|
ownerState
|
|
274
291
|
} = props;
|
|
275
|
-
return [styles.startIcon, styles[`iconSize${capitalize(ownerState.size)}`]];
|
|
292
|
+
return [styles.startIcon, ownerState.loading && styles.startIconLoadingStart, styles[`iconSize${capitalize(ownerState.size)}`]];
|
|
276
293
|
}
|
|
277
|
-
})({
|
|
294
|
+
})(({
|
|
295
|
+
theme
|
|
296
|
+
}) => ({
|
|
278
297
|
display: 'inherit',
|
|
279
298
|
marginRight: 8,
|
|
280
299
|
marginLeft: -4,
|
|
@@ -285,8 +304,28 @@ const ButtonStartIcon = styled('span', {
|
|
|
285
304
|
style: {
|
|
286
305
|
marginLeft: -2
|
|
287
306
|
}
|
|
307
|
+
}, {
|
|
308
|
+
props: {
|
|
309
|
+
loadingPosition: 'start',
|
|
310
|
+
loading: true
|
|
311
|
+
},
|
|
312
|
+
style: {
|
|
313
|
+
transition: theme.transitions.create(['opacity'], {
|
|
314
|
+
duration: theme.transitions.duration.short
|
|
315
|
+
}),
|
|
316
|
+
opacity: 0
|
|
317
|
+
}
|
|
318
|
+
}, {
|
|
319
|
+
props: {
|
|
320
|
+
loadingPosition: 'start',
|
|
321
|
+
loading: true,
|
|
322
|
+
fullWidth: true
|
|
323
|
+
},
|
|
324
|
+
style: {
|
|
325
|
+
marginRight: -8
|
|
326
|
+
}
|
|
288
327
|
}, ...commonIconStyles]
|
|
289
|
-
});
|
|
328
|
+
}));
|
|
290
329
|
const ButtonEndIcon = styled('span', {
|
|
291
330
|
name: 'MuiButton',
|
|
292
331
|
slot: 'EndIcon',
|
|
@@ -294,9 +333,11 @@ const ButtonEndIcon = styled('span', {
|
|
|
294
333
|
const {
|
|
295
334
|
ownerState
|
|
296
335
|
} = props;
|
|
297
|
-
return [styles.endIcon, styles[`iconSize${capitalize(ownerState.size)}`]];
|
|
336
|
+
return [styles.endIcon, ownerState.loading && styles.endIconLoadingEnd, styles[`iconSize${capitalize(ownerState.size)}`]];
|
|
298
337
|
}
|
|
299
|
-
})({
|
|
338
|
+
})(({
|
|
339
|
+
theme
|
|
340
|
+
}) => ({
|
|
300
341
|
display: 'inherit',
|
|
301
342
|
marginRight: -4,
|
|
302
343
|
marginLeft: 8,
|
|
@@ -307,7 +348,128 @@ const ButtonEndIcon = styled('span', {
|
|
|
307
348
|
style: {
|
|
308
349
|
marginRight: -2
|
|
309
350
|
}
|
|
351
|
+
}, {
|
|
352
|
+
props: {
|
|
353
|
+
loadingPosition: 'end',
|
|
354
|
+
loading: true
|
|
355
|
+
},
|
|
356
|
+
style: {
|
|
357
|
+
transition: theme.transitions.create(['opacity'], {
|
|
358
|
+
duration: theme.transitions.duration.short
|
|
359
|
+
}),
|
|
360
|
+
opacity: 0
|
|
361
|
+
}
|
|
362
|
+
}, {
|
|
363
|
+
props: {
|
|
364
|
+
loadingPosition: 'end',
|
|
365
|
+
loading: true,
|
|
366
|
+
fullWidth: true
|
|
367
|
+
},
|
|
368
|
+
style: {
|
|
369
|
+
marginLeft: -8
|
|
370
|
+
}
|
|
310
371
|
}, ...commonIconStyles]
|
|
372
|
+
}));
|
|
373
|
+
const ButtonLoadingIndicator = styled('span', {
|
|
374
|
+
name: 'MuiButton',
|
|
375
|
+
slot: 'LoadingIndicator',
|
|
376
|
+
overridesResolver: (props, styles) => styles.loadingIndicator
|
|
377
|
+
})(({
|
|
378
|
+
theme
|
|
379
|
+
}) => ({
|
|
380
|
+
display: 'none',
|
|
381
|
+
position: 'absolute',
|
|
382
|
+
visibility: 'visible',
|
|
383
|
+
variants: [{
|
|
384
|
+
props: {
|
|
385
|
+
loading: true
|
|
386
|
+
},
|
|
387
|
+
style: {
|
|
388
|
+
display: 'flex'
|
|
389
|
+
}
|
|
390
|
+
}, {
|
|
391
|
+
props: {
|
|
392
|
+
loadingPosition: 'start'
|
|
393
|
+
},
|
|
394
|
+
style: {
|
|
395
|
+
left: 14
|
|
396
|
+
}
|
|
397
|
+
}, {
|
|
398
|
+
props: {
|
|
399
|
+
loadingPosition: 'start',
|
|
400
|
+
size: 'small'
|
|
401
|
+
},
|
|
402
|
+
style: {
|
|
403
|
+
left: 10
|
|
404
|
+
}
|
|
405
|
+
}, {
|
|
406
|
+
props: {
|
|
407
|
+
variant: 'text',
|
|
408
|
+
loadingPosition: 'start'
|
|
409
|
+
},
|
|
410
|
+
style: {
|
|
411
|
+
left: 6
|
|
412
|
+
}
|
|
413
|
+
}, {
|
|
414
|
+
props: {
|
|
415
|
+
loadingPosition: 'center'
|
|
416
|
+
},
|
|
417
|
+
style: {
|
|
418
|
+
left: '50%',
|
|
419
|
+
transform: 'translate(-50%)',
|
|
420
|
+
color: (theme.vars || theme).palette.action.disabled
|
|
421
|
+
}
|
|
422
|
+
}, {
|
|
423
|
+
props: {
|
|
424
|
+
loadingPosition: 'end'
|
|
425
|
+
},
|
|
426
|
+
style: {
|
|
427
|
+
right: 14
|
|
428
|
+
}
|
|
429
|
+
}, {
|
|
430
|
+
props: {
|
|
431
|
+
loadingPosition: 'end',
|
|
432
|
+
size: 'small'
|
|
433
|
+
},
|
|
434
|
+
style: {
|
|
435
|
+
right: 10
|
|
436
|
+
}
|
|
437
|
+
}, {
|
|
438
|
+
props: {
|
|
439
|
+
variant: 'text',
|
|
440
|
+
loadingPosition: 'end'
|
|
441
|
+
},
|
|
442
|
+
style: {
|
|
443
|
+
right: 6
|
|
444
|
+
}
|
|
445
|
+
}, {
|
|
446
|
+
props: {
|
|
447
|
+
loadingPosition: 'start',
|
|
448
|
+
fullWidth: true
|
|
449
|
+
},
|
|
450
|
+
style: {
|
|
451
|
+
position: 'relative',
|
|
452
|
+
left: -10
|
|
453
|
+
}
|
|
454
|
+
}, {
|
|
455
|
+
props: {
|
|
456
|
+
loadingPosition: 'end',
|
|
457
|
+
fullWidth: true
|
|
458
|
+
},
|
|
459
|
+
style: {
|
|
460
|
+
position: 'relative',
|
|
461
|
+
right: -10
|
|
462
|
+
}
|
|
463
|
+
}]
|
|
464
|
+
}));
|
|
465
|
+
const ButtonLoadingIconPlaceholder = styled('span', {
|
|
466
|
+
name: 'MuiButton',
|
|
467
|
+
slot: 'LoadingIconPlaceholder',
|
|
468
|
+
overridesResolver: (props, styles) => styles.loadingIconPlaceholder
|
|
469
|
+
})({
|
|
470
|
+
display: 'inline-block',
|
|
471
|
+
width: '1em',
|
|
472
|
+
height: '1em'
|
|
311
473
|
});
|
|
312
474
|
const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
|
|
313
475
|
// props priority: `inProps` > `contextProps` > `themeDefaultProps`
|
|
@@ -329,12 +491,22 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
|
|
|
329
491
|
endIcon: endIconProp,
|
|
330
492
|
focusVisibleClassName,
|
|
331
493
|
fullWidth = false,
|
|
494
|
+
id: idProp,
|
|
495
|
+
loading = null,
|
|
496
|
+
loadingIndicator: loadingIndicatorProp,
|
|
497
|
+
loadingPosition = 'center',
|
|
332
498
|
size = 'medium',
|
|
333
499
|
startIcon: startIconProp,
|
|
334
500
|
type,
|
|
335
501
|
variant = 'text',
|
|
336
502
|
...other
|
|
337
503
|
} = props;
|
|
504
|
+
const id = useId(idProp);
|
|
505
|
+
const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/_jsx(CircularProgress, {
|
|
506
|
+
"aria-labelledby": id,
|
|
507
|
+
color: "inherit",
|
|
508
|
+
size: 16
|
|
509
|
+
});
|
|
338
510
|
const ownerState = {
|
|
339
511
|
...props,
|
|
340
512
|
color,
|
|
@@ -343,34 +515,58 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
|
|
|
343
515
|
disableElevation,
|
|
344
516
|
disableFocusRipple,
|
|
345
517
|
fullWidth,
|
|
518
|
+
loading,
|
|
519
|
+
loadingIndicator,
|
|
520
|
+
loadingPosition,
|
|
346
521
|
size,
|
|
347
522
|
type,
|
|
348
523
|
variant
|
|
349
524
|
};
|
|
350
525
|
const classes = useUtilityClasses(ownerState);
|
|
351
|
-
const startIcon = startIconProp && /*#__PURE__*/_jsx(ButtonStartIcon, {
|
|
526
|
+
const startIcon = (startIconProp || loading && loadingPosition === 'start') && /*#__PURE__*/_jsx(ButtonStartIcon, {
|
|
352
527
|
className: classes.startIcon,
|
|
353
528
|
ownerState: ownerState,
|
|
354
|
-
children: startIconProp
|
|
529
|
+
children: startIconProp || /*#__PURE__*/_jsx(ButtonLoadingIconPlaceholder, {
|
|
530
|
+
className: classes.loadingIconPlaceholder,
|
|
531
|
+
ownerState: ownerState
|
|
532
|
+
})
|
|
355
533
|
});
|
|
356
|
-
const endIcon = endIconProp && /*#__PURE__*/_jsx(ButtonEndIcon, {
|
|
534
|
+
const endIcon = (endIconProp || loading && loadingPosition === 'end') && /*#__PURE__*/_jsx(ButtonEndIcon, {
|
|
357
535
|
className: classes.endIcon,
|
|
358
536
|
ownerState: ownerState,
|
|
359
|
-
children: endIconProp
|
|
537
|
+
children: endIconProp || /*#__PURE__*/_jsx(ButtonLoadingIconPlaceholder, {
|
|
538
|
+
className: classes.loadingIconPlaceholder,
|
|
539
|
+
ownerState: ownerState
|
|
540
|
+
})
|
|
360
541
|
});
|
|
361
542
|
const positionClassName = buttonGroupButtonContextPositionClassName || '';
|
|
543
|
+
const loader = typeof loading === 'boolean' ?
|
|
544
|
+
/*#__PURE__*/
|
|
545
|
+
// use plain HTML span to minimize the runtime overhead
|
|
546
|
+
_jsx("span", {
|
|
547
|
+
className: classes.loadingWrapper,
|
|
548
|
+
style: {
|
|
549
|
+
display: 'contents'
|
|
550
|
+
},
|
|
551
|
+
children: loading && /*#__PURE__*/_jsx(ButtonLoadingIndicator, {
|
|
552
|
+
className: classes.loadingIndicator,
|
|
553
|
+
ownerState: ownerState,
|
|
554
|
+
children: loadingIndicator
|
|
555
|
+
})
|
|
556
|
+
}) : null;
|
|
362
557
|
return /*#__PURE__*/_jsxs(ButtonRoot, {
|
|
363
558
|
ownerState: ownerState,
|
|
364
559
|
className: clsx(contextProps.className, classes.root, className, positionClassName),
|
|
365
560
|
component: component,
|
|
366
|
-
disabled: disabled,
|
|
561
|
+
disabled: disabled || loading,
|
|
367
562
|
focusRipple: !disableFocusRipple,
|
|
368
563
|
focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
|
|
369
564
|
ref: ref,
|
|
370
565
|
type: type,
|
|
566
|
+
id: id,
|
|
371
567
|
...other,
|
|
372
568
|
classes: classes,
|
|
373
|
-
children: [startIcon, children, endIcon]
|
|
569
|
+
children: [startIcon, loadingPosition !== 'end' && loader, children, loadingPosition === 'end' && loader, endIcon]
|
|
374
570
|
});
|
|
375
571
|
});
|
|
376
572
|
process.env.NODE_ENV !== "production" ? Button.propTypes /* remove-proptypes */ = {
|
|
@@ -443,6 +639,28 @@ process.env.NODE_ENV !== "production" ? Button.propTypes /* remove-proptypes */
|
|
|
443
639
|
* If defined, an `a` element will be used as the root node.
|
|
444
640
|
*/
|
|
445
641
|
href: PropTypes.string,
|
|
642
|
+
/**
|
|
643
|
+
* @ignore
|
|
644
|
+
*/
|
|
645
|
+
id: PropTypes.string,
|
|
646
|
+
/**
|
|
647
|
+
* If `true`, the loading indicator is visible and the button is disabled.
|
|
648
|
+
* If `true | false`, the loading wrapper is always rendered before the children to prevent [Google Translation Crash](https://github.com/mui/material-ui/issues/27853).
|
|
649
|
+
* @default null
|
|
650
|
+
*/
|
|
651
|
+
loading: PropTypes.bool,
|
|
652
|
+
/**
|
|
653
|
+
* Element placed before the children if the button is in loading state.
|
|
654
|
+
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
655
|
+
* By default, it renders a `CircularProgress` that is labeled by the button itself.
|
|
656
|
+
* @default <CircularProgress color="inherit" size={16} />
|
|
657
|
+
*/
|
|
658
|
+
loadingIndicator: PropTypes.node,
|
|
659
|
+
/**
|
|
660
|
+
* The loading indicator can be positioned on the start, end, or the center of the button.
|
|
661
|
+
* @default 'center'
|
|
662
|
+
*/
|
|
663
|
+
loadingPosition: PropTypes.oneOf(['center', 'end', 'start']),
|
|
446
664
|
/**
|
|
447
665
|
* The size of the component.
|
|
448
666
|
* `small` is equivalent to the dense button styling.
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
|
3
3
|
export function getButtonUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiButton', slot);
|
|
5
5
|
}
|
|
6
|
-
const buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorError', 'colorInfo', 'colorWarning', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'icon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);
|
|
6
|
+
const buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorError', 'colorInfo', 'colorWarning', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'icon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge', 'loading', 'loadingWrapper', 'loadingIconPlaceholder', 'loadingIndicator', 'loadingPositionCenter', 'loadingPositionStart', 'loadingPositionEnd']);
|
|
7
7
|
export default buttonClasses;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
5
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
6
|
import Typography, { typographyClasses } from "../Typography/index.js";
|
|
8
7
|
import { styled } from "../zero-styled/index.js";
|
|
9
8
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
10
9
|
import cardHeaderClasses, { getCardHeaderUtilityClass } from "./cardHeaderClasses.js";
|
|
10
|
+
import useSlot from "../utils/useSlot.js";
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
const useUtilityClasses = ownerState => {
|
|
13
13
|
const {
|
|
@@ -26,11 +26,13 @@ const useUtilityClasses = ownerState => {
|
|
|
26
26
|
const CardHeaderRoot = styled('div', {
|
|
27
27
|
name: 'MuiCardHeader',
|
|
28
28
|
slot: 'Root',
|
|
29
|
-
overridesResolver: (props, styles) =>
|
|
30
|
-
[
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
overridesResolver: (props, styles) => {
|
|
30
|
+
return [{
|
|
31
|
+
[`& .${cardHeaderClasses.title}`]: styles.title
|
|
32
|
+
}, {
|
|
33
|
+
[`& .${cardHeaderClasses.subheader}`]: styles.subheader
|
|
34
|
+
}, styles.root];
|
|
35
|
+
}
|
|
34
36
|
})({
|
|
35
37
|
display: 'flex',
|
|
36
38
|
alignItems: 'center',
|
|
@@ -77,13 +79,14 @@ const CardHeader = /*#__PURE__*/React.forwardRef(function CardHeader(inProps, re
|
|
|
77
79
|
const {
|
|
78
80
|
action,
|
|
79
81
|
avatar,
|
|
80
|
-
className,
|
|
81
82
|
component = 'div',
|
|
82
83
|
disableTypography = false,
|
|
83
84
|
subheader: subheaderProp,
|
|
84
85
|
subheaderTypographyProps,
|
|
85
86
|
title: titleProp,
|
|
86
87
|
titleTypographyProps,
|
|
88
|
+
slots = {},
|
|
89
|
+
slotProps = {},
|
|
87
90
|
...other
|
|
88
91
|
} = props;
|
|
89
92
|
const ownerState = {
|
|
@@ -92,44 +95,88 @@ const CardHeader = /*#__PURE__*/React.forwardRef(function CardHeader(inProps, re
|
|
|
92
95
|
disableTypography
|
|
93
96
|
};
|
|
94
97
|
const classes = useUtilityClasses(ownerState);
|
|
98
|
+
const externalForwardedProps = {
|
|
99
|
+
slots,
|
|
100
|
+
slotProps: {
|
|
101
|
+
title: titleTypographyProps,
|
|
102
|
+
subheader: subheaderTypographyProps,
|
|
103
|
+
...slotProps
|
|
104
|
+
}
|
|
105
|
+
};
|
|
95
106
|
let title = titleProp;
|
|
96
|
-
|
|
97
|
-
title
|
|
107
|
+
const [TitleSlot, titleSlotProps] = useSlot('title', {
|
|
108
|
+
className: classes.title,
|
|
109
|
+
elementType: Typography,
|
|
110
|
+
externalForwardedProps,
|
|
111
|
+
ownerState,
|
|
112
|
+
additionalProps: {
|
|
98
113
|
variant: avatar ? 'body2' : 'h5',
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
114
|
+
component: 'span'
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
if (title != null && title.type !== Typography && !disableTypography) {
|
|
118
|
+
title = /*#__PURE__*/_jsx(TitleSlot, {
|
|
119
|
+
...titleSlotProps,
|
|
102
120
|
children: title
|
|
103
121
|
});
|
|
104
122
|
}
|
|
105
123
|
let subheader = subheaderProp;
|
|
106
|
-
|
|
107
|
-
subheader
|
|
124
|
+
const [SubheaderSlot, subheaderSlotProps] = useSlot('subheader', {
|
|
125
|
+
className: classes.subheader,
|
|
126
|
+
elementType: Typography,
|
|
127
|
+
externalForwardedProps,
|
|
128
|
+
ownerState,
|
|
129
|
+
additionalProps: {
|
|
108
130
|
variant: avatar ? 'body2' : 'body1',
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
131
|
+
color: 'textSecondary',
|
|
132
|
+
component: 'span'
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
if (subheader != null && subheader.type !== Typography && !disableTypography) {
|
|
136
|
+
subheader = /*#__PURE__*/_jsx(SubheaderSlot, {
|
|
137
|
+
...subheaderSlotProps,
|
|
113
138
|
children: subheader
|
|
114
139
|
});
|
|
115
140
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
141
|
+
const [RootSlot, rootSlotProps] = useSlot('root', {
|
|
142
|
+
ref,
|
|
143
|
+
className: classes.root,
|
|
144
|
+
elementType: CardHeaderRoot,
|
|
145
|
+
externalForwardedProps: {
|
|
146
|
+
...externalForwardedProps,
|
|
147
|
+
...other,
|
|
148
|
+
component
|
|
149
|
+
},
|
|
150
|
+
ownerState
|
|
151
|
+
});
|
|
152
|
+
const [AvatarSlot, avatarSlotProps] = useSlot('avatar', {
|
|
153
|
+
className: classes.avatar,
|
|
154
|
+
elementType: CardHeaderAvatar,
|
|
155
|
+
externalForwardedProps,
|
|
156
|
+
ownerState
|
|
157
|
+
});
|
|
158
|
+
const [ContentSlot, contentSlotProps] = useSlot('content', {
|
|
159
|
+
className: classes.content,
|
|
160
|
+
elementType: CardHeaderContent,
|
|
161
|
+
externalForwardedProps,
|
|
162
|
+
ownerState
|
|
163
|
+
});
|
|
164
|
+
const [ActionSlot, actionSlotProps] = useSlot('action', {
|
|
165
|
+
className: classes.action,
|
|
166
|
+
elementType: CardHeaderAction,
|
|
167
|
+
externalForwardedProps,
|
|
168
|
+
ownerState
|
|
169
|
+
});
|
|
170
|
+
return /*#__PURE__*/_jsxs(RootSlot, {
|
|
171
|
+
...rootSlotProps,
|
|
172
|
+
children: [avatar && /*#__PURE__*/_jsx(AvatarSlot, {
|
|
173
|
+
...avatarSlotProps,
|
|
125
174
|
children: avatar
|
|
126
|
-
}), /*#__PURE__*/_jsxs(
|
|
127
|
-
|
|
128
|
-
ownerState: ownerState,
|
|
175
|
+
}), /*#__PURE__*/_jsxs(ContentSlot, {
|
|
176
|
+
...contentSlotProps,
|
|
129
177
|
children: [title, subheader]
|
|
130
|
-
}), action && /*#__PURE__*/_jsx(
|
|
131
|
-
|
|
132
|
-
ownerState: ownerState,
|
|
178
|
+
}), action && /*#__PURE__*/_jsx(ActionSlot, {
|
|
179
|
+
...actionSlotProps,
|
|
133
180
|
children: action
|
|
134
181
|
})]
|
|
135
182
|
});
|
|
@@ -155,10 +202,6 @@ process.env.NODE_ENV !== "production" ? CardHeader.propTypes /* remove-proptypes
|
|
|
155
202
|
* Override or extend the styles applied to the component.
|
|
156
203
|
*/
|
|
157
204
|
classes: PropTypes.object,
|
|
158
|
-
/**
|
|
159
|
-
* @ignore
|
|
160
|
-
*/
|
|
161
|
-
className: PropTypes.string,
|
|
162
205
|
/**
|
|
163
206
|
* The component used for the root node.
|
|
164
207
|
* Either a string to use a HTML element or a component.
|
|
@@ -172,6 +215,30 @@ process.env.NODE_ENV !== "production" ? CardHeader.propTypes /* remove-proptypes
|
|
|
172
215
|
* @default false
|
|
173
216
|
*/
|
|
174
217
|
disableTypography: PropTypes.bool,
|
|
218
|
+
/**
|
|
219
|
+
* The props used for each slot inside.
|
|
220
|
+
* @default {}
|
|
221
|
+
*/
|
|
222
|
+
slotProps: PropTypes.shape({
|
|
223
|
+
action: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
224
|
+
avatar: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
225
|
+
content: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
226
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
227
|
+
subheader: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
228
|
+
title: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
229
|
+
}),
|
|
230
|
+
/**
|
|
231
|
+
* The components used for each slot inside.
|
|
232
|
+
* @default {}
|
|
233
|
+
*/
|
|
234
|
+
slots: PropTypes.shape({
|
|
235
|
+
action: PropTypes.elementType,
|
|
236
|
+
avatar: PropTypes.elementType,
|
|
237
|
+
content: PropTypes.elementType,
|
|
238
|
+
root: PropTypes.elementType,
|
|
239
|
+
subheader: PropTypes.elementType,
|
|
240
|
+
title: PropTypes.elementType
|
|
241
|
+
}),
|
|
175
242
|
/**
|
|
176
243
|
* The content of the component.
|
|
177
244
|
*/
|
|
@@ -179,6 +246,7 @@ process.env.NODE_ENV !== "production" ? CardHeader.propTypes /* remove-proptypes
|
|
|
179
246
|
/**
|
|
180
247
|
* These props will be forwarded to the subheader
|
|
181
248
|
* (as long as disableTypography is not `true`).
|
|
249
|
+
* @deprecated Use `slotProps.subheader` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
182
250
|
*/
|
|
183
251
|
subheaderTypographyProps: PropTypes.object,
|
|
184
252
|
/**
|
|
@@ -192,6 +260,7 @@ process.env.NODE_ENV !== "production" ? CardHeader.propTypes /* remove-proptypes
|
|
|
192
260
|
/**
|
|
193
261
|
* These props will be forwarded to the title
|
|
194
262
|
* (as long as disableTypography is not `true`).
|
|
263
|
+
* @deprecated Use `slotProps.title` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
195
264
|
*/
|
|
196
265
|
titleTypographyProps: PropTypes.object
|
|
197
266
|
} : void 0;
|
|
@@ -272,7 +272,10 @@ const Collapse = /*#__PURE__*/React.forwardRef(function Collapse(inProps, ref) {
|
|
|
272
272
|
nodeRef: nodeRef,
|
|
273
273
|
timeout: timeout === 'auto' ? null : timeout,
|
|
274
274
|
...other,
|
|
275
|
-
children: (state,
|
|
275
|
+
children: (state, {
|
|
276
|
+
ownerState: incomingOwnerState,
|
|
277
|
+
...restChildProps
|
|
278
|
+
}) => /*#__PURE__*/_jsx(CollapseRoot, {
|
|
276
279
|
as: component,
|
|
277
280
|
className: clsx(classes.root, className, {
|
|
278
281
|
'entered': classes.entered,
|
|
@@ -283,13 +286,11 @@ const Collapse = /*#__PURE__*/React.forwardRef(function Collapse(inProps, ref) {
|
|
|
283
286
|
...style
|
|
284
287
|
},
|
|
285
288
|
ref: handleRef,
|
|
286
|
-
...childProps,
|
|
287
|
-
// `ownerState` is set after `childProps` to override any existing `ownerState` property in `childProps`
|
|
288
|
-
// that might have been forwarded from the Transition component.
|
|
289
289
|
ownerState: {
|
|
290
290
|
...ownerState,
|
|
291
291
|
state
|
|
292
292
|
},
|
|
293
|
+
...restChildProps,
|
|
293
294
|
children: /*#__PURE__*/_jsx(CollapseWrapper, {
|
|
294
295
|
ownerState: {
|
|
295
296
|
...ownerState,
|