@webpros/mui-theme 0.1.1 → 0.1.3
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/src/components/data-display/Avatar/Avatar.d.ts +3 -0
- package/dist/src/components/data-display/Avatar/Avatar.js +4 -0
- package/dist/src/components/data-display/Avatar/Avatar.theme.d.ts +12 -0
- package/dist/src/components/data-display/Avatar/Avatar.theme.js +20 -0
- package/dist/src/components/data-display/Avatar/index.d.ts +1 -0
- package/dist/src/components/data-display/Avatar/index.js +2 -0
- package/dist/src/components/data-display/Badge/Badge.d.ts +3 -0
- package/dist/src/components/data-display/Badge/Badge.js +4 -0
- package/dist/src/components/data-display/Badge/Badge.theme.d.ts +24 -0
- package/dist/src/components/data-display/Badge/Badge.theme.js +131 -0
- package/dist/src/components/data-display/Badge/index.d.ts +1 -0
- package/dist/src/components/data-display/Badge/index.js +2 -0
- package/dist/src/components/data-display/Chip/Chip.d.ts +3 -0
- package/dist/src/components/data-display/Chip/Chip.js +4 -0
- package/dist/src/components/data-display/Chip/Chip.theme.d.ts +19 -0
- package/dist/src/components/data-display/Chip/Chip.theme.js +503 -0
- package/dist/src/components/data-display/Chip/components/ChipDeleteIcon.d.ts +1 -0
- package/dist/src/components/data-display/Chip/components/ChipDeleteIcon.js +4 -0
- package/dist/src/components/data-display/Chip/index.d.ts +1 -0
- package/dist/src/components/data-display/Chip/index.js +2 -0
- package/dist/src/components/data-display/DataGrid/DataGrid.d.ts +4 -0
- package/dist/src/components/data-display/DataGrid/DataGrid.js +7 -0
- package/dist/src/components/data-display/DataGrid/DataGrid.theme.d.ts +11 -0
- package/dist/src/components/data-display/DataGrid/DataGrid.theme.js +21 -0
- package/dist/src/components/data-display/DataGrid/index.d.ts +1 -0
- package/dist/src/components/data-display/DataGrid/index.js +2 -0
- package/dist/src/components/data-display/DataGrid/mock-data.d.ts +18 -0
- package/dist/src/components/data-display/DataGrid/mock-data.js +184 -0
- package/dist/src/components/data-display/Divider/Divider.d.ts +3 -0
- package/dist/src/components/data-display/Divider/Divider.js +4 -0
- package/dist/src/components/data-display/Divider/Divider.theme.d.ts +11 -0
- package/dist/src/components/data-display/Divider/Divider.theme.js +19 -0
- package/dist/src/components/data-display/Divider/index.d.ts +1 -0
- package/dist/src/components/data-display/Divider/index.js +2 -0
- package/dist/src/components/data-display/List/List.d.ts +3 -0
- package/dist/src/components/data-display/List/List.js +4 -0
- package/dist/src/components/data-display/List/List.theme.d.ts +11 -0
- package/dist/src/components/data-display/List/List.theme.js +5 -0
- package/dist/src/components/data-display/List/index.d.ts +1 -0
- package/dist/src/components/data-display/List/index.js +2 -0
- package/dist/src/components/data-display/ListItem/ListItem.d.ts +3 -0
- package/dist/src/components/data-display/ListItem/ListItem.js +4 -0
- package/dist/src/components/data-display/ListItem/ListItem.theme.d.ts +11 -0
- package/dist/src/components/data-display/ListItem/ListItem.theme.js +13 -0
- package/dist/src/components/data-display/ListItem/index.d.ts +1 -0
- package/dist/src/components/data-display/ListItem/index.js +2 -0
- package/dist/src/components/data-display/ListItemAvatar/ListItemAvatar.d.ts +4 -0
- package/dist/src/components/data-display/ListItemAvatar/ListItemAvatar.js +4 -0
- package/dist/src/components/data-display/ListItemAvatar/ListItemAvatar.theme.d.ts +11 -0
- package/dist/src/components/data-display/ListItemAvatar/ListItemAvatar.theme.js +11 -0
- package/dist/src/components/data-display/ListItemAvatar/index.d.ts +1 -0
- package/dist/src/components/data-display/ListItemAvatar/index.js +2 -0
- package/dist/src/components/data-display/ListItemButton/ListItemButton.d.ts +3 -0
- package/dist/src/components/data-display/ListItemButton/ListItemButton.js +4 -0
- package/dist/src/components/data-display/ListItemButton/ListItemButton.theme.d.ts +16 -0
- package/dist/src/components/data-display/ListItemButton/ListItemButton.theme.js +68 -0
- package/dist/src/components/data-display/ListItemButton/index.d.ts +1 -0
- package/dist/src/components/data-display/ListItemButton/index.js +2 -0
- package/dist/src/components/data-display/ListItemIcon/ListItemIcon.d.ts +4 -0
- package/dist/src/components/data-display/ListItemIcon/ListItemIcon.js +4 -0
- package/dist/src/components/data-display/ListItemIcon/ListItemIcon.theme.d.ts +11 -0
- package/dist/src/components/data-display/ListItemIcon/ListItemIcon.theme.js +14 -0
- package/dist/src/components/data-display/ListItemIcon/index.d.ts +1 -0
- package/dist/src/components/data-display/ListItemIcon/index.js +2 -0
- package/dist/src/components/data-display/ListSubheader/ListSubheader.d.ts +3 -0
- package/dist/src/components/data-display/ListSubheader/ListSubheader.js +4 -0
- package/dist/src/components/data-display/ListSubheader/ListSubheader.theme.d.ts +11 -0
- package/dist/src/components/data-display/ListSubheader/ListSubheader.theme.js +15 -0
- package/dist/src/components/data-display/ListSubheader/index.d.ts +1 -0
- package/dist/src/components/data-display/ListSubheader/index.js +2 -0
- package/dist/src/components/data-display/Table/Table.d.ts +4 -0
- package/dist/src/components/data-display/Table/Table.js +4 -0
- package/dist/src/components/data-display/Table/Table.theme.d.ts +25 -0
- package/dist/src/components/data-display/Table/Table.theme.js +41 -0
- package/dist/src/components/data-display/Table/index.d.ts +1 -0
- package/dist/src/components/data-display/Table/index.js +2 -0
- package/dist/src/components/data-display/Table/mock-data.d.ts +17 -0
- package/dist/src/components/data-display/Table/mock-data.js +198 -0
- package/dist/src/components/data-display/Tooltip/Tooltip.d.ts +4 -0
- package/dist/src/components/data-display/Tooltip/Tooltip.js +4 -0
- package/dist/src/components/data-display/Tooltip/Tooltip.theme.d.ts +11 -0
- package/dist/src/components/data-display/Tooltip/Tooltip.theme.js +21 -0
- package/dist/src/components/data-display/Tooltip/index.d.ts +1 -0
- package/dist/src/components/data-display/Tooltip/index.js +2 -0
- package/dist/src/components/data-display/Typography/Typography.d.ts +3 -0
- package/dist/src/components/data-display/Typography/Typography.js +4 -0
- package/dist/src/components/data-display/Typography/Typography.theme.d.ts +36 -0
- package/dist/src/components/data-display/Typography/Typography.theme.js +169 -0
- package/dist/src/components/data-display/Typography/index.d.ts +1 -0
- package/dist/src/components/data-display/Typography/index.js +2 -0
- package/dist/src/components/feedback/Alert/Alert.d.ts +4 -0
- package/dist/src/components/feedback/Alert/Alert.js +4 -0
- package/dist/src/components/feedback/Alert/Alert.theme.d.ts +11 -0
- package/dist/src/components/feedback/Alert/Alert.theme.js +60 -0
- package/dist/src/components/feedback/Alert/index.d.ts +1 -0
- package/dist/src/components/feedback/Alert/index.js +2 -0
- package/dist/src/components/feedback/CircularProgress/CircularProgress.d.ts +4 -0
- package/dist/src/components/feedback/CircularProgress/CircularProgress.js +4 -0
- package/dist/src/components/feedback/CircularProgress/CircularProgress.theme.d.ts +10 -0
- package/dist/src/components/feedback/CircularProgress/CircularProgress.theme.js +11 -0
- package/dist/src/components/feedback/CircularProgress/index.d.ts +1 -0
- package/dist/src/components/feedback/CircularProgress/index.js +2 -0
- package/dist/src/components/feedback/Dialog/Dialog.d.ts +4 -0
- package/dist/src/components/feedback/Dialog/Dialog.js +5 -0
- package/dist/src/components/feedback/Dialog/Dialog.theme.d.ts +30 -0
- package/dist/src/components/feedback/Dialog/Dialog.theme.js +67 -0
- package/dist/src/components/feedback/Dialog/index.d.ts +1 -0
- package/dist/src/components/feedback/Dialog/index.js +2 -0
- package/dist/src/components/feedback/LinearProgress/LinearProgress.d.ts +4 -0
- package/dist/src/components/feedback/LinearProgress/LinearProgress.js +4 -0
- package/dist/src/components/feedback/LinearProgress/LinearProgress.theme.d.ts +10 -0
- package/dist/src/components/feedback/LinearProgress/LinearProgress.theme.js +13 -0
- package/dist/src/components/feedback/LinearProgress/index.d.ts +1 -0
- package/dist/src/components/feedback/LinearProgress/index.js +2 -0
- package/dist/src/components/feedback/Snackbar/Snackbar.d.ts +4 -0
- package/dist/src/components/feedback/Snackbar/Snackbar.js +4 -0
- package/dist/src/components/feedback/Snackbar/Snackbar.theme.d.ts +10 -0
- package/dist/src/components/feedback/Snackbar/Snackbar.theme.js +13 -0
- package/dist/src/components/feedback/Snackbar/index.d.ts +1 -0
- package/dist/src/components/feedback/Snackbar/index.js +2 -0
- package/dist/src/components/index.d.ts +43 -0
- package/dist/src/components/index.js +44 -0
- package/dist/src/components/inputs/Autocomplete/Autocomplete.d.ts +4 -0
- package/dist/src/components/inputs/Autocomplete/Autocomplete.js +4 -0
- package/dist/src/components/inputs/Autocomplete/Autocomplete.theme.d.ts +10 -0
- package/dist/src/components/inputs/Autocomplete/Autocomplete.theme.js +67 -0
- package/dist/src/components/inputs/Autocomplete/components/AutocompletePopupIcon.d.ts +1 -0
- package/dist/src/components/inputs/Autocomplete/components/AutocompletePopupIcon.js +4 -0
- package/dist/src/components/inputs/Autocomplete/index.d.ts +1 -0
- package/dist/src/components/inputs/Autocomplete/index.js +2 -0
- package/dist/src/components/inputs/Button/Button.d.ts +3 -0
- package/dist/src/components/inputs/Button/Button.js +4 -0
- package/dist/src/components/inputs/Button/Button.theme.d.ts +26 -0
- package/dist/src/components/inputs/Button/Button.theme.js +243 -0
- package/dist/src/components/inputs/Button/index.d.ts +1 -0
- package/dist/src/components/inputs/Button/index.js +2 -0
- package/dist/src/components/inputs/Checkbox/Checkbox.d.ts +4 -0
- package/dist/src/components/inputs/Checkbox/Checkbox.js +4 -0
- package/dist/src/components/inputs/Checkbox/Checkbox.theme.d.ts +10 -0
- package/dist/src/components/inputs/Checkbox/Checkbox.theme.js +20 -0
- package/dist/src/components/inputs/Checkbox/index.d.ts +1 -0
- package/dist/src/components/inputs/Checkbox/index.js +2 -0
- package/dist/src/components/inputs/Fab/Fab.d.ts +3 -0
- package/dist/src/components/inputs/Fab/Fab.js +4 -0
- package/dist/src/components/inputs/Fab/Fab.theme.d.ts +25 -0
- package/dist/src/components/inputs/Fab/Fab.theme.js +135 -0
- package/dist/src/components/inputs/Fab/index.d.ts +1 -0
- package/dist/src/components/inputs/Fab/index.js +2 -0
- package/dist/src/components/inputs/IconButton/IconButton.d.ts +3 -0
- package/dist/src/components/inputs/IconButton/IconButton.js +4 -0
- package/dist/src/components/inputs/IconButton/IconButton.theme.d.ts +19 -0
- package/dist/src/components/inputs/IconButton/IconButton.theme.js +116 -0
- package/dist/src/components/inputs/IconButton/index.d.ts +1 -0
- package/dist/src/components/inputs/IconButton/index.js +2 -0
- package/dist/src/components/inputs/InputBase/InputBase.theme.d.ts +30 -0
- package/dist/src/components/inputs/InputBase/InputBase.theme.js +70 -0
- package/dist/src/components/inputs/InputBase/index.d.ts +1 -0
- package/dist/src/components/inputs/InputBase/index.js +2 -0
- package/dist/src/components/inputs/InputLabel/InputLabel.d.ts +2 -0
- package/dist/src/components/inputs/InputLabel/InputLabel.js +3 -0
- package/dist/src/components/inputs/InputLabel/InputLabel.theme.d.ts +9 -0
- package/dist/src/components/inputs/InputLabel/InputLabel.theme.js +20 -0
- package/dist/src/components/inputs/InputLabel/index.d.ts +1 -0
- package/dist/src/components/inputs/InputLabel/index.js +2 -0
- package/dist/src/components/inputs/Select/Select.d.ts +4 -0
- package/dist/src/components/inputs/Select/Select.js +3 -0
- package/dist/src/components/inputs/Select/Select.theme.d.ts +9 -0
- package/dist/src/components/inputs/Select/Select.theme.js +46 -0
- package/dist/src/components/inputs/Select/index.d.ts +1 -0
- package/dist/src/components/inputs/Select/index.js +2 -0
- package/dist/src/components/inputs/Switch/Switch.d.ts +4 -0
- package/dist/src/components/inputs/Switch/Switch.js +4 -0
- package/dist/src/components/inputs/Switch/Switch.theme.d.ts +11 -0
- package/dist/src/components/inputs/Switch/Switch.theme.js +97 -0
- package/dist/src/components/inputs/Switch/index.d.ts +1 -0
- package/dist/src/components/inputs/Switch/index.js +2 -0
- package/dist/src/components/inputs/TextField/TextField.d.ts +4 -0
- package/dist/src/components/inputs/TextField/TextField.js +4 -0
- package/dist/src/components/inputs/TextField/TextField.theme.d.ts +14 -0
- package/dist/src/components/inputs/TextField/TextField.theme.js +32 -0
- package/dist/src/components/inputs/TextField/index.d.ts +1 -0
- package/dist/src/components/inputs/TextField/index.js +2 -0
- package/dist/src/components/inputs/TimePicker/TimePicker.theme.d.ts +8 -0
- package/dist/src/components/inputs/TimePicker/TimePicker.theme.js +23 -0
- package/dist/src/components/inputs/TimePicker/index.d.ts +1 -0
- package/dist/src/components/inputs/TimePicker/index.js +2 -0
- package/dist/src/components/inputs/ToggleButton/ToggleButton.d.ts +3 -0
- package/dist/src/components/inputs/ToggleButton/ToggleButton.js +4 -0
- package/dist/src/components/inputs/ToggleButton/ToggleButton.theme.d.ts +11 -0
- package/dist/src/components/inputs/ToggleButton/ToggleButton.theme.js +26 -0
- package/dist/src/components/inputs/ToggleButton/index.d.ts +1 -0
- package/dist/src/components/inputs/ToggleButton/index.js +2 -0
- package/dist/src/components/inputs/ToggleButtonGroup/ToggleButtonGroup.d.ts +4 -0
- package/dist/src/components/inputs/ToggleButtonGroup/ToggleButtonGroup.js +4 -0
- package/dist/src/components/inputs/ToggleButtonGroup/ToggleButtonGroup.theme.d.ts +11 -0
- package/dist/src/components/inputs/ToggleButtonGroup/ToggleButtonGroup.theme.js +25 -0
- package/dist/src/components/inputs/ToggleButtonGroup/index.d.ts +1 -0
- package/dist/src/components/inputs/ToggleButtonGroup/index.js +2 -0
- package/dist/src/components/navigation/Drawer/Drawer.d.ts +4 -0
- package/dist/src/components/navigation/Drawer/Drawer.js +4 -0
- package/dist/src/components/navigation/Drawer/Drawer.theme.d.ts +10 -0
- package/dist/src/components/navigation/Drawer/Drawer.theme.js +15 -0
- package/dist/src/components/navigation/Drawer/index.d.ts +1 -0
- package/dist/src/components/navigation/Drawer/index.js +2 -0
- package/dist/src/components/navigation/Link/Link.d.ts +3 -0
- package/dist/src/components/navigation/Link/Link.js +4 -0
- package/dist/src/components/navigation/Link/Link.theme.d.ts +11 -0
- package/dist/src/components/navigation/Link/Link.theme.js +42 -0
- package/dist/src/components/navigation/Link/index.d.ts +1 -0
- package/dist/src/components/navigation/Link/index.js +3 -0
- package/dist/src/components/navigation/Menu/Menu.d.ts +4 -0
- package/dist/src/components/navigation/Menu/Menu.js +4 -0
- package/dist/src/components/navigation/Menu/Menu.theme.d.ts +10 -0
- package/dist/src/components/navigation/Menu/Menu.theme.js +19 -0
- package/dist/src/components/navigation/Menu/index.d.ts +1 -0
- package/dist/src/components/navigation/Menu/index.js +2 -0
- package/dist/src/components/navigation/MenuItem/MenuItem.d.ts +3 -0
- package/dist/src/components/navigation/MenuItem/MenuItem.js +4 -0
- package/dist/src/components/navigation/MenuItem/MenuItem.theme.d.ts +10 -0
- package/dist/src/components/navigation/MenuItem/MenuItem.theme.js +22 -0
- package/dist/src/components/navigation/MenuItem/index.d.ts +1 -0
- package/dist/src/components/navigation/MenuItem/index.js +2 -0
- package/dist/src/components/navigation/Pagination/Pagination.d.ts +4 -0
- package/dist/src/components/navigation/Pagination/Pagination.js +4 -0
- package/dist/src/components/navigation/Pagination/Pagination.theme.d.ts +11 -0
- package/dist/src/components/navigation/Pagination/Pagination.theme.js +8 -0
- package/dist/src/components/navigation/Pagination/index.d.ts +1 -0
- package/dist/src/components/navigation/Pagination/index.js +2 -0
- package/dist/src/components/navigation/PaginationItem/PaginationItem.d.ts +3 -0
- package/dist/src/components/navigation/PaginationItem/PaginationItem.js +4 -0
- package/dist/src/components/navigation/PaginationItem/PaginationItem.theme.d.ts +11 -0
- package/dist/src/components/navigation/PaginationItem/PaginationItem.theme.js +27 -0
- package/dist/src/components/navigation/PaginationItem/index.d.ts +1 -0
- package/dist/src/components/navigation/PaginationItem/index.js +2 -0
- package/dist/src/components/navigation/Tab/Tab.d.ts +3 -0
- package/dist/src/components/navigation/Tab/Tab.js +4 -0
- package/dist/src/components/navigation/Tab/Tab.theme.d.ts +10 -0
- package/dist/src/components/navigation/Tab/Tab.theme.js +18 -0
- package/dist/src/components/navigation/Tab/index.d.ts +1 -0
- package/dist/src/components/navigation/Tab/index.js +2 -0
- package/dist/src/components/navigation/TabList/TabList.d.ts +3 -0
- package/dist/src/components/navigation/TabList/TabList.js +4 -0
- package/dist/src/components/navigation/TabList/TabList.theme.d.ts +10 -0
- package/dist/src/components/navigation/TabList/TabList.theme.js +17 -0
- package/dist/src/components/navigation/TabList/index.d.ts +1 -0
- package/dist/src/components/navigation/TabList/index.js +2 -0
- package/dist/src/components/surfaces/Accordion/Accordion.d.ts +3 -0
- package/dist/src/components/surfaces/Accordion/Accordion.js +4 -0
- package/dist/src/components/surfaces/Accordion/Accordion.theme.d.ts +11 -0
- package/dist/src/components/surfaces/Accordion/Accordion.theme.js +43 -0
- package/dist/src/components/surfaces/Accordion/index.d.ts +1 -0
- package/dist/src/components/surfaces/Accordion/index.js +2 -0
- package/dist/src/components/surfaces/AppBar/AppBar.d.ts +3 -0
- package/dist/src/components/surfaces/AppBar/AppBar.js +4 -0
- package/dist/src/components/surfaces/AppBar/AppBar.theme.d.ts +11 -0
- package/dist/src/components/surfaces/AppBar/AppBar.theme.js +22 -0
- package/dist/src/components/surfaces/AppBar/index.d.ts +1 -0
- package/dist/src/components/surfaces/AppBar/index.js +2 -0
- package/dist/src/components/surfaces/Card/Card.d.ts +3 -0
- package/dist/src/components/surfaces/Card/Card.js +4 -0
- package/dist/src/components/surfaces/Card/Card.theme.d.ts +16 -0
- package/dist/src/components/surfaces/Card/Card.theme.js +100 -0
- package/dist/src/components/surfaces/Card/index.d.ts +1 -0
- package/dist/src/components/surfaces/Card/index.js +2 -0
- package/dist/src/components/surfaces/Paper/Paper.d.ts +3 -0
- package/dist/src/components/surfaces/Paper/Paper.js +4 -0
- package/dist/src/components/surfaces/Paper/Paper.theme.d.ts +9 -0
- package/dist/src/components/surfaces/Paper/Paper.theme.js +14 -0
- package/dist/src/components/surfaces/Paper/index.d.ts +1 -0
- package/dist/src/components/surfaces/Paper/index.js +2 -0
- package/dist/src/components/utils/CssBaseline/CssBaseline.d.ts +4 -0
- package/dist/src/components/utils/CssBaseline/CssBaseline.js +4 -0
- package/dist/src/components/utils/CssBaseline/CssBaseline.theme.d.ts +11 -0
- package/dist/src/components/utils/CssBaseline/CssBaseline.theme.js +8 -0
- package/dist/src/components/utils/CssBaseline/index.d.ts +1 -0
- package/dist/src/components/utils/CssBaseline/index.js +2 -0
- package/dist/src/hooks/useThemeMode.d.ts +3 -0
- package/dist/src/hooks/useThemeMode.js +20 -0
- package/dist/src/hooks/useTonalPalette.d.ts +3 -0
- package/dist/src/hooks/useTonalPalette.js +32 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.js +7 -0
- package/dist/src/providers/ThemeModeProvider.d.ts +13 -0
- package/dist/src/providers/ThemeModeProvider.js +16 -0
- package/dist/src/providers/ThemeSchemeProvider.d.ts +12 -0
- package/dist/src/providers/ThemeSchemeProvider.js +29 -0
- package/dist/src/providers/WebProsMuiThemeProvider.d.ts +9 -0
- package/dist/src/providers/WebProsMuiThemeProvider.js +5 -0
- package/dist/src/providers/WebProsTheme.d.ts +9 -0
- package/dist/src/providers/WebProsTheme.js +25 -0
- package/dist/src/style/additional-color-palette.d.ts +3 -0
- package/dist/src/style/additional-color-palette.js +26 -0
- package/dist/src/style/custom-color-palette.d.ts +3 -0
- package/dist/src/style/custom-color-palette.js +75 -0
- package/dist/src/tokens/ThemeColorTokens.d.ts +96 -0
- package/dist/src/tokens/ThemeColorTokens.js +172 -0
- package/dist/src/tokens/ThemeMode.d.ts +1 -0
- package/dist/src/tokens/ThemeMode.js +1 -0
- package/dist/src/tokens/ThemeScheme.d.ts +12 -0
- package/dist/src/tokens/ThemeScheme.js +8 -0
- package/dist/src/tokens/TonalPalette.d.ts +10 -0
- package/dist/src/tokens/TonalPalette.js +10 -0
- package/dist/src/tokens/Tone.d.ts +174 -0
- package/dist/src/tokens/Tone.js +157 -0
- package/dist/src/tokens/additionalColors/index.d.ts +1 -0
- package/dist/src/tokens/additionalColors/index.js +5 -0
- package/dist/src/tokens/index.d.ts +2 -0
- package/dist/src/tokens/index.js +2 -0
- package/dist/src/utils/generateTokens.d.ts +4 -0
- package/dist/src/utils/generateTokens.js +107 -0
- package/dist/src/utils/getMUIComponents.d.ts +7 -0
- package/dist/src/utils/getMUIComponents.js +4 -0
- package/dist/src/utils/getMUIPalette.d.ts +101 -0
- package/dist/src/utils/getMUIPalette.js +263 -0
- package/dist/src/utils/getMuiLocaleByCode.d.ts +11 -0
- package/dist/src/utils/getMuiLocaleByCode.js +13 -0
- package/dist/src/utils/getStateLayerColor.d.ts +25 -0
- package/dist/src/utils/getStateLayerColor.js +36 -0
- package/dist/src/utils/index.d.ts +6 -0
- package/dist/src/utils/index.js +7 -0
- package/dist/src/utils/patchMUIShadows.d.ts +2 -0
- package/dist/src/utils/patchMUIShadows.js +5 -0
- package/package.json +22 -18
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
2
|
+
import { alpha, } from '@mui/material';
|
|
3
|
+
import { StateLayer, getStateLayerColor } from '../../../utils/getStateLayerColor';
|
|
4
|
+
export const getButton = (theme) => {
|
|
5
|
+
const { palette } = theme;
|
|
6
|
+
return {
|
|
7
|
+
MuiButton: {
|
|
8
|
+
styleOverrides: {
|
|
9
|
+
root: {
|
|
10
|
+
height: 40,
|
|
11
|
+
minWidth: 0,
|
|
12
|
+
padding: '0 6px',
|
|
13
|
+
borderRadius: 14,
|
|
14
|
+
textTransform: 'none',
|
|
15
|
+
fontWeight: 500,
|
|
16
|
+
'&.Mui-disabled': {
|
|
17
|
+
color: alpha(palette.onSurface.main, 0.38),
|
|
18
|
+
},
|
|
19
|
+
'.MuiButton-startIcon': { marginRight: 4 },
|
|
20
|
+
'.MuiButton-endIcon': { marginLeft: 4 },
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
variants: [
|
|
24
|
+
{
|
|
25
|
+
props: { size: 'small' },
|
|
26
|
+
style: {
|
|
27
|
+
height: 32,
|
|
28
|
+
borderRadius: 10,
|
|
29
|
+
fontSize: '0.875rem',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
props: { variant: 'filled' },
|
|
34
|
+
style: {
|
|
35
|
+
backgroundColor: palette.primary.main,
|
|
36
|
+
color: palette.onPrimary.main,
|
|
37
|
+
boxShadow: theme.shadows[0],
|
|
38
|
+
padding: '0 24px',
|
|
39
|
+
'&:hover': {
|
|
40
|
+
backgroundColor: getStateLayerColor(StateLayer.Hover, palette.primary.main, palette.onPrimary.main),
|
|
41
|
+
boxShadow: theme.shadows[1],
|
|
42
|
+
},
|
|
43
|
+
'&:focus': {
|
|
44
|
+
backgroundColor: getStateLayerColor(StateLayer.Focus, palette.primary.main, palette.onPrimary.main),
|
|
45
|
+
boxShadow: theme.shadows[0],
|
|
46
|
+
},
|
|
47
|
+
'&:active': {
|
|
48
|
+
backgroundColor: getStateLayerColor(StateLayer.Press, palette.primary.main, palette.onPrimary.main),
|
|
49
|
+
boxShadow: theme.shadows[0],
|
|
50
|
+
outline: `2px solid ${getStateLayerColor(StateLayer.Press, palette.primary.main, palette.onPrimary.main)}`,
|
|
51
|
+
outlineOffset: 2,
|
|
52
|
+
},
|
|
53
|
+
'&.Mui-disabled': {
|
|
54
|
+
backgroundColor: alpha(palette.onSurface.main, 0.04),
|
|
55
|
+
boxShadow: theme.shadows[0],
|
|
56
|
+
},
|
|
57
|
+
'.MuiButton-startIcon': { marginLeft: -8 },
|
|
58
|
+
'.MuiButton-endIcon': { marginRight: -8 },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
props: { variant: 'filled', size: 'small' },
|
|
63
|
+
style: {
|
|
64
|
+
padding: '0 12px',
|
|
65
|
+
'.MuiButton-startIcon': { marginLeft: -4 },
|
|
66
|
+
'.MuiButton-endIcon': { marginRight: -4 },
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
props: { variant: 'outlined' },
|
|
71
|
+
style: {
|
|
72
|
+
color: palette.primary.main,
|
|
73
|
+
borderColor: palette.outline.main,
|
|
74
|
+
borderWidth: 1,
|
|
75
|
+
padding: '0 24px',
|
|
76
|
+
'&:hover': {
|
|
77
|
+
backgroundColor: alpha(palette.primary.main, 0.08),
|
|
78
|
+
borderColor: palette.outline.main,
|
|
79
|
+
},
|
|
80
|
+
'&:focus': {
|
|
81
|
+
backgroundColor: alpha(palette.primary.main, 0.12),
|
|
82
|
+
borderColor: palette.primary.main,
|
|
83
|
+
},
|
|
84
|
+
'&:active': {
|
|
85
|
+
backgroundColor: alpha(palette.primary.main, 0.12),
|
|
86
|
+
borderColor: palette.outline.main,
|
|
87
|
+
},
|
|
88
|
+
'&.Mui-disabled': {
|
|
89
|
+
borderColor: alpha(palette.onSurface.main, 0.12),
|
|
90
|
+
},
|
|
91
|
+
'.MuiButton-startIcon': { marginLeft: -8 },
|
|
92
|
+
'.MuiButton-endIcon': { marginRight: -8 },
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
props: { variant: 'outlined', size: 'small' },
|
|
97
|
+
style: {
|
|
98
|
+
padding: '0 12px',
|
|
99
|
+
'.MuiButton-startIcon': { marginLeft: 0 },
|
|
100
|
+
'.MuiButton-endIcon': { marginRight: 0 },
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
props: { variant: 'text' },
|
|
105
|
+
style: {
|
|
106
|
+
backgroundColor: 'transparent',
|
|
107
|
+
color: palette.primary.main,
|
|
108
|
+
'&:hover': {
|
|
109
|
+
backgroundColor: alpha(palette.primary.main, 0.08),
|
|
110
|
+
},
|
|
111
|
+
'&:focus': {
|
|
112
|
+
backgroundColor: alpha(palette.primary.main, 0.12),
|
|
113
|
+
},
|
|
114
|
+
'&:active': {
|
|
115
|
+
backgroundColor: alpha(palette.primary.main, 0.12),
|
|
116
|
+
},
|
|
117
|
+
'.MuiButton-startIcon': { marginLeft: -2 },
|
|
118
|
+
'.MuiButton-endIcon': { marginRight: -2 },
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
props: { variant: 'text', size: 'small' },
|
|
123
|
+
style: {
|
|
124
|
+
padding: '0 6px',
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
props: { variant: 'ghost' },
|
|
129
|
+
style: {
|
|
130
|
+
backgroundColor: 'transparent',
|
|
131
|
+
color: palette.onSurfaceVariant.main,
|
|
132
|
+
'&:hover': {
|
|
133
|
+
backgroundColor: alpha(palette.primary.main, 0.08),
|
|
134
|
+
},
|
|
135
|
+
'&:focus': {
|
|
136
|
+
backgroundColor: alpha(palette.primary.main, 0.12),
|
|
137
|
+
},
|
|
138
|
+
'&:active': {
|
|
139
|
+
backgroundColor: alpha(palette.primary.main, 0.12),
|
|
140
|
+
},
|
|
141
|
+
'& .MuiButton-startIcon': {
|
|
142
|
+
marginRight: 4,
|
|
143
|
+
},
|
|
144
|
+
'.MuiButton-startIcon': { marginLeft: -2 },
|
|
145
|
+
'.MuiButton-endIcon': { marginRight: -2 },
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
props: { variant: 'ghost', size: 'small' },
|
|
150
|
+
style: {
|
|
151
|
+
padding: '0 6px',
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
props: { variant: 'elevated' },
|
|
156
|
+
style: {
|
|
157
|
+
boxShadow: theme.shadows[1],
|
|
158
|
+
backgroundColor: palette.surfaceContainerLow.main,
|
|
159
|
+
color: palette.primary.main,
|
|
160
|
+
padding: '0 24px',
|
|
161
|
+
'&:hover': {
|
|
162
|
+
background: getStateLayerColor(StateLayer.Hover, palette.surfaceContainerLow.main, palette.primary.main),
|
|
163
|
+
boxShadow: theme.shadows[2],
|
|
164
|
+
},
|
|
165
|
+
'&:focus': {
|
|
166
|
+
background: getStateLayerColor(StateLayer.Focus, palette.surfaceContainerLow.main, palette.primary.main),
|
|
167
|
+
},
|
|
168
|
+
'&:active': {
|
|
169
|
+
background: getStateLayerColor(StateLayer.Press, palette.surfaceContainerLow.main, palette.primary.main),
|
|
170
|
+
},
|
|
171
|
+
'&.Mui-disabled': {
|
|
172
|
+
backgroundColor: alpha(palette.onSurface.main, 0.04),
|
|
173
|
+
boxShadow: theme.shadows[0],
|
|
174
|
+
},
|
|
175
|
+
'.MuiButton-startIcon': { marginLeft: -8 },
|
|
176
|
+
'.MuiButton-endIcon': { marginRight: -8 },
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
props: { variant: 'elevated', size: 'small' },
|
|
181
|
+
style: {
|
|
182
|
+
padding: '0 12px',
|
|
183
|
+
'.MuiButton-startIcon': { marginLeft: -4 },
|
|
184
|
+
'.MuiButton-endIcon': { marginRight: -4 },
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
props: { variant: 'tonal' },
|
|
189
|
+
style: {
|
|
190
|
+
backgroundColor: palette.secondaryContainer.main,
|
|
191
|
+
color: palette.onSecondaryContainer.main,
|
|
192
|
+
padding: '0 24px',
|
|
193
|
+
'&:hover': {
|
|
194
|
+
backgroundColor: palette.primary.main,
|
|
195
|
+
color: palette.onPrimary.main,
|
|
196
|
+
},
|
|
197
|
+
'&:focus': {
|
|
198
|
+
backgroundColor: getStateLayerColor(StateLayer.Focus, palette.primary.main, palette.onSecondaryContainer.main),
|
|
199
|
+
color: palette.onPrimary.main,
|
|
200
|
+
},
|
|
201
|
+
'&:active': {
|
|
202
|
+
backgroundColor: getStateLayerColor(StateLayer.Press, palette.primary.main, palette.onSecondaryContainer.main),
|
|
203
|
+
color: palette.onPrimary.main,
|
|
204
|
+
outline: `2px solid ${getStateLayerColor(StateLayer.Press, palette.primary.main, palette.onSecondaryContainer.main)}`,
|
|
205
|
+
outlineOffset: 2,
|
|
206
|
+
},
|
|
207
|
+
'&.Mui-disabled': {
|
|
208
|
+
backgroundColor: alpha(palette.onSurface.main, 0.04),
|
|
209
|
+
},
|
|
210
|
+
'.MuiButton-startIcon': { marginLeft: -8 },
|
|
211
|
+
'.MuiButton-endIcon': { marginRight: -8 },
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
props: { variant: 'tonal', size: 'small' },
|
|
216
|
+
style: {
|
|
217
|
+
padding: '0 12px',
|
|
218
|
+
'.MuiButton-startIcon': { marginLeft: -4 },
|
|
219
|
+
'.MuiButton-endIcon': { marginRight: -4 },
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
props: { variant: 'filled', color: 'error' },
|
|
224
|
+
style: {
|
|
225
|
+
backgroundColor: palette.error.main,
|
|
226
|
+
color: palette.background.default,
|
|
227
|
+
'&:hover': {
|
|
228
|
+
backgroundColor: palette.error.main,
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
props: { variant: 'ghost', color: 'error' },
|
|
234
|
+
style: {
|
|
235
|
+
backgroundColor: 'transparent',
|
|
236
|
+
color: palette.onSurface.main,
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
],
|
|
240
|
+
},
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
export default {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button.theme';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Theme, ComponentsProps, ComponentsOverrides } from '@mui/material';
|
|
2
|
+
interface M3Checkbox {
|
|
3
|
+
MuiCheckbox: {
|
|
4
|
+
defaultProps?: ComponentsProps['MuiCheckbox'];
|
|
5
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiCheckbox'];
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export declare const getCheckbox: (theme: Theme) => M3Checkbox;
|
|
9
|
+
declare const _default: {};
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const getCheckbox = (theme) => {
|
|
2
|
+
const { palette } = theme;
|
|
3
|
+
return {
|
|
4
|
+
MuiCheckbox: {
|
|
5
|
+
styleOverrides: {
|
|
6
|
+
root: {
|
|
7
|
+
color: palette.outline.main,
|
|
8
|
+
padding: 8,
|
|
9
|
+
'&.Mui-checked': {
|
|
10
|
+
color: palette.primary.main,
|
|
11
|
+
},
|
|
12
|
+
'&.Mui-disabled': {
|
|
13
|
+
color: palette.outline.main,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Checkbox.theme';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Theme, ComponentsProps, ComponentsOverrides, ComponentsVariants } from '@mui/material';
|
|
2
|
+
interface M3Fab {
|
|
3
|
+
MuiFab: {
|
|
4
|
+
defaultProps?: ComponentsProps['MuiFab'];
|
|
5
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiFab'];
|
|
6
|
+
variants?: ComponentsVariants['MuiFab'];
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
declare module '@mui/material/Fab' {
|
|
10
|
+
interface FabPropsColorOverrides {
|
|
11
|
+
primary: true;
|
|
12
|
+
surface: true;
|
|
13
|
+
secondary: true;
|
|
14
|
+
tertiary: true;
|
|
15
|
+
success: false;
|
|
16
|
+
info: false;
|
|
17
|
+
warning: false;
|
|
18
|
+
error: false;
|
|
19
|
+
default: false;
|
|
20
|
+
inherit: false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare const getFab: (theme: Theme) => M3Fab;
|
|
24
|
+
declare const _default: {};
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { StateLayer, getStateLayerColor } from '../../../utils/getStateLayerColor';
|
|
2
|
+
export const getFab = (theme) => {
|
|
3
|
+
const { palette } = theme;
|
|
4
|
+
return {
|
|
5
|
+
MuiFab: {
|
|
6
|
+
defaultProps: { color: 'secondary' },
|
|
7
|
+
styleOverrides: {
|
|
8
|
+
root: {
|
|
9
|
+
boxShadow: theme.shadows[3],
|
|
10
|
+
borderRadius: '18px',
|
|
11
|
+
textTransform: 'capitalize',
|
|
12
|
+
fontWeight: 500,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
variants: [
|
|
16
|
+
{
|
|
17
|
+
props: { variant: 'extended', size: 'medium' },
|
|
18
|
+
style: {
|
|
19
|
+
height: '56px',
|
|
20
|
+
borderRadius: '20px',
|
|
21
|
+
paddingTop: 16,
|
|
22
|
+
paddingRight: 20,
|
|
23
|
+
paddingBottom: 16,
|
|
24
|
+
paddingLeft: 24,
|
|
25
|
+
'& > .MuiTypography-root': {
|
|
26
|
+
color: palette.onPrimaryContainer.main,
|
|
27
|
+
fontSize: '0.875rem',
|
|
28
|
+
fontWeight: 500,
|
|
29
|
+
lineHeight: '1.25rem',
|
|
30
|
+
letterSpacing: '0.006rem',
|
|
31
|
+
paddingLeft: '12px',
|
|
32
|
+
paddingRight: '12px',
|
|
33
|
+
},
|
|
34
|
+
'& > .MuiSvgIcon-root': {
|
|
35
|
+
color: palette.onPrimaryContainer.main,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
props: { size: 'medium', variant: 'circular' },
|
|
41
|
+
style: {
|
|
42
|
+
height: 56,
|
|
43
|
+
width: 56,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
props: { size: 'large', variant: 'circular' },
|
|
48
|
+
style: {
|
|
49
|
+
height: 96,
|
|
50
|
+
width: 96,
|
|
51
|
+
borderRadius: 28,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
props: { color: 'primary' },
|
|
56
|
+
style: {
|
|
57
|
+
backgroundColor: palette.primaryContainer.main,
|
|
58
|
+
color: palette.onPrimaryContainer.main,
|
|
59
|
+
boxShadow: theme.shadows[0],
|
|
60
|
+
'&:hover': {
|
|
61
|
+
background: getStateLayerColor(StateLayer.Hover, palette.primaryContainer.main, palette.onPrimaryContainer.main),
|
|
62
|
+
boxShadow: theme.shadows[0],
|
|
63
|
+
},
|
|
64
|
+
'&:focus': {
|
|
65
|
+
background: getStateLayerColor(StateLayer.Focus, palette.primaryContainer.main, palette.onPrimaryContainer.main),
|
|
66
|
+
boxShadow: theme.shadows[0],
|
|
67
|
+
},
|
|
68
|
+
'&:active': {
|
|
69
|
+
background: getStateLayerColor(StateLayer.Press, palette.primaryContainer.main, palette.onPrimaryContainer.main),
|
|
70
|
+
boxShadow: theme.shadows[0],
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
props: { color: 'secondary' },
|
|
76
|
+
style: {
|
|
77
|
+
backgroundColor: palette.secondaryContainer.main,
|
|
78
|
+
color: palette.onSecondaryContainer.main,
|
|
79
|
+
'&:hover': {
|
|
80
|
+
background: getStateLayerColor(StateLayer.Hover, palette.secondaryContainer.main, palette.onSecondaryContainer.main),
|
|
81
|
+
boxShadow: theme.shadows[4],
|
|
82
|
+
},
|
|
83
|
+
'&:focus': {
|
|
84
|
+
background: getStateLayerColor(StateLayer.Focus, palette.secondaryContainer.main, palette.onSecondaryContainer.main),
|
|
85
|
+
boxShadow: theme.shadows[3],
|
|
86
|
+
},
|
|
87
|
+
'&:active': {
|
|
88
|
+
background: getStateLayerColor(StateLayer.Press, palette.secondaryContainer.main, palette.onSecondaryContainer.main),
|
|
89
|
+
boxShadow: theme.shadows[3],
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
props: { color: 'surface' },
|
|
95
|
+
style: {
|
|
96
|
+
backgroundColor: palette.surfaceContainer.main,
|
|
97
|
+
color: palette.primary.main,
|
|
98
|
+
'&:hover': {
|
|
99
|
+
background: getStateLayerColor(StateLayer.Hover, palette.surfaceContainer.main, palette.primary.main),
|
|
100
|
+
boxShadow: theme.shadows[4],
|
|
101
|
+
},
|
|
102
|
+
'&:focus': {
|
|
103
|
+
background: getStateLayerColor(StateLayer.Focus, palette.surfaceContainer.main, palette.primary.main),
|
|
104
|
+
boxShadow: theme.shadows[3],
|
|
105
|
+
},
|
|
106
|
+
'&:active': {
|
|
107
|
+
background: getStateLayerColor(StateLayer.Press, palette.surfaceContainer.main, palette.primary.main),
|
|
108
|
+
boxShadow: theme.shadows[3],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
props: { color: 'tertiary' },
|
|
114
|
+
style: {
|
|
115
|
+
backgroundColor: palette.tertiaryContainer.main,
|
|
116
|
+
color: palette.onTertiaryContainer.main,
|
|
117
|
+
'&:hover': {
|
|
118
|
+
background: getStateLayerColor(StateLayer.Hover, palette.tertiaryContainer.main, palette.onTertiaryContainer.main),
|
|
119
|
+
boxShadow: theme.shadows[4],
|
|
120
|
+
},
|
|
121
|
+
'&:focus': {
|
|
122
|
+
background: getStateLayerColor(StateLayer.Focus, palette.tertiaryContainer.main, palette.onTertiaryContainer.main),
|
|
123
|
+
boxShadow: theme.shadows[3],
|
|
124
|
+
},
|
|
125
|
+
'&:active': {
|
|
126
|
+
background: getStateLayerColor(StateLayer.Press, palette.tertiaryContainer.main, palette.onTertiaryContainer.main),
|
|
127
|
+
boxShadow: theme.shadows[3],
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
export default {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Fab.theme';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Theme, ComponentsProps, ComponentsOverrides, ComponentsVariants } from '@mui/material';
|
|
2
|
+
declare module '@mui/material/IconButton' {
|
|
3
|
+
interface IconButtonOwnProps {
|
|
4
|
+
variant?: 'standard' | 'filled' | 'elevated' | 'tonal' | 'outlined';
|
|
5
|
+
}
|
|
6
|
+
interface IconButtonPropsColorOverrides {
|
|
7
|
+
asDisabled: true;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
interface M3IconButton {
|
|
11
|
+
MuiIconButton: {
|
|
12
|
+
defaultProps?: ComponentsProps['MuiIconButton'];
|
|
13
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiIconButton'];
|
|
14
|
+
variants?: ComponentsVariants['MuiIconButton'];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare const getIconButton: (theme: Theme) => M3IconButton;
|
|
18
|
+
declare const _default: {};
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
2
|
+
import { alpha, } from '@mui/material';
|
|
3
|
+
import { getStateLayerColor, StateLayer } from '../../../utils/getStateLayerColor';
|
|
4
|
+
export const getIconButton = (theme) => {
|
|
5
|
+
const { palette } = theme;
|
|
6
|
+
return {
|
|
7
|
+
MuiIconButton: {
|
|
8
|
+
styleOverrides: {
|
|
9
|
+
root: {
|
|
10
|
+
height: 40,
|
|
11
|
+
width: 40,
|
|
12
|
+
borderRadius: 14,
|
|
13
|
+
color: palette.onSurfaceVariant.main,
|
|
14
|
+
padding: 0,
|
|
15
|
+
'&:hover': {
|
|
16
|
+
background: getStateLayerColor(StateLayer.Hover, palette.surface.main),
|
|
17
|
+
},
|
|
18
|
+
'&:focus': {
|
|
19
|
+
background: getStateLayerColor(StateLayer.Focus, palette.onSurfaceVariant.main),
|
|
20
|
+
},
|
|
21
|
+
'&:active': {
|
|
22
|
+
background: getStateLayerColor(StateLayer.Active, palette.onSurfaceVariant.main),
|
|
23
|
+
},
|
|
24
|
+
'&.Mui-disabled': {
|
|
25
|
+
color: getStateLayerColor(StateLayer.Disabled, palette.onSurface.main),
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
variants: [
|
|
30
|
+
{
|
|
31
|
+
props: { size: 'small' },
|
|
32
|
+
style: {
|
|
33
|
+
height: 32,
|
|
34
|
+
width: 32,
|
|
35
|
+
borderRadius: 10,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
props: { variant: 'filled' },
|
|
40
|
+
style: {
|
|
41
|
+
backgroundColor: palette.primary.main,
|
|
42
|
+
color: palette.onPrimary.main,
|
|
43
|
+
'&:hover': {
|
|
44
|
+
backgroundColor: getStateLayerColor(StateLayer.Hover, palette.primary.main, palette.onPrimary.main),
|
|
45
|
+
},
|
|
46
|
+
'&:focus': {
|
|
47
|
+
backgroundColor: getStateLayerColor(StateLayer.Focus, palette.primary.main, palette.onPrimary.main),
|
|
48
|
+
},
|
|
49
|
+
'&:active': {
|
|
50
|
+
backgroundColor: getStateLayerColor(StateLayer.Press, palette.primary.main, palette.onPrimary.main),
|
|
51
|
+
},
|
|
52
|
+
'&.Mui-disabled': {
|
|
53
|
+
backgroundColor: alpha(palette.onSurface.main, 0.04),
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
props: { variant: 'elevated' },
|
|
59
|
+
style: {
|
|
60
|
+
boxShadow: theme.shadows[2],
|
|
61
|
+
'&:active': {
|
|
62
|
+
boxShadow: theme.shadows[3],
|
|
63
|
+
},
|
|
64
|
+
'&.Mui-disabled': {
|
|
65
|
+
backgroundColor: alpha(palette.onSurface.main, 0.04),
|
|
66
|
+
boxShadow: theme.shadows[0],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
props: { variant: 'tonal' },
|
|
72
|
+
style: {
|
|
73
|
+
backgroundColor: palette.secondaryContainer.main,
|
|
74
|
+
color: palette.onSecondaryContainer.main,
|
|
75
|
+
'&:hover': {
|
|
76
|
+
backgroundColor: getStateLayerColor(StateLayer.Hover, palette.secondaryContainer.main, palette.onSecondaryContainer.main),
|
|
77
|
+
},
|
|
78
|
+
'&:focus': {
|
|
79
|
+
backgroundColor: getStateLayerColor(StateLayer.Focus, palette.secondaryContainer.main, palette.onSecondaryContainer.main),
|
|
80
|
+
},
|
|
81
|
+
'&:active': {
|
|
82
|
+
backgroundColor: getStateLayerColor(StateLayer.Active, palette.secondaryContainer.main, palette.onSecondaryContainer.main),
|
|
83
|
+
},
|
|
84
|
+
'&.Mui-disabled': {
|
|
85
|
+
backgroundColor: alpha(palette.onSurface.main, 0.04),
|
|
86
|
+
},
|
|
87
|
+
'& > svg': {
|
|
88
|
+
color: palette.primary.main,
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
props: { variant: 'outlined' },
|
|
94
|
+
style: {
|
|
95
|
+
borderColor: palette.outline.main,
|
|
96
|
+
borderWidth: 1,
|
|
97
|
+
borderStyle: 'solid',
|
|
98
|
+
'&.Mui-disabled': {
|
|
99
|
+
borderColor: getStateLayerColor(StateLayer.Disabled, palette.outline.main, palette.onSurface.main),
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
props: { variant: 'outlined', color: 'asDisabled' },
|
|
105
|
+
style: {
|
|
106
|
+
color: alpha(palette.onSurface.main, 0.38),
|
|
107
|
+
borderColor: alpha(palette.onSurface.main, 0.12),
|
|
108
|
+
borderWidth: 1,
|
|
109
|
+
borderStyle: 'solid',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
export default {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './IconButton.theme';
|