@webpros/mui-theme 0.1.6 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +21 -11
- package/dist/src/components/data-display/Avatar/Avatar.theme.js +11 -8
- package/dist/src/components/data-display/Badge/Badge.theme.d.ts +4 -1
- package/dist/src/components/data-display/Badge/Badge.theme.js +216 -55
- package/dist/src/components/data-display/Chip/Chip.theme.d.ts +17 -3
- package/dist/src/components/data-display/Chip/Chip.theme.js +133 -477
- package/dist/src/components/data-display/Chip/get-chip-colors-map.d.ts +42 -0
- package/dist/src/components/data-display/Chip/get-chip-colors-map.js +253 -0
- package/dist/src/components/data-display/Divider/Divider.theme.d.ts +6 -1
- package/dist/src/components/data-display/Divider/Divider.theme.js +60 -3
- package/dist/src/components/data-display/List/List.theme.d.ts +1 -1
- package/dist/src/components/data-display/List/List.theme.js +1 -1
- package/dist/src/components/data-display/ListItem/ListItem.theme.d.ts +1 -1
- package/dist/src/components/data-display/ListItem/ListItem.theme.js +16 -8
- package/dist/src/components/data-display/ListItemAvatar/ListItemAvatar.theme.js +1 -2
- package/dist/src/components/data-display/ListItemButton/ListItemButton.theme.d.ts +0 -5
- package/dist/src/components/data-display/ListItemButton/ListItemButton.theme.js +14 -48
- package/dist/src/components/data-display/ListItemIcon/ListItemIcon.theme.js +4 -4
- package/dist/src/components/data-display/ListSubheader/ListSubheader.theme.d.ts +1 -1
- package/dist/src/components/data-display/ListSubheader/ListSubheader.theme.js +2 -5
- package/dist/src/components/data-display/Skeleton/Skeleton.d.ts +3 -0
- package/dist/src/components/data-display/Skeleton/Skeleton.js +4 -0
- package/dist/src/components/data-display/Skeleton/Skeleton.theme.d.ts +15 -0
- package/dist/src/components/data-display/Skeleton/Skeleton.theme.js +31 -0
- package/dist/src/components/data-display/Skeleton/index.d.ts +1 -0
- package/dist/src/components/data-display/Skeleton/index.js +2 -0
- package/dist/src/components/data-display/Tooltip/Tooltip.theme.js +7 -9
- package/dist/src/components/data-display/Typography/Typography.theme.d.ts +19 -26
- package/dist/src/components/data-display/Typography/Typography.theme.js +7 -163
- package/dist/src/components/feedback/Alert/Alert.theme.d.ts +12 -0
- package/dist/src/components/feedback/Alert/Alert.theme.js +61 -45
- package/dist/src/components/feedback/CircularProgress/CircularProgress.theme.d.ts +6 -1
- package/dist/src/components/feedback/CircularProgress/CircularProgress.theme.js +49 -8
- package/dist/src/components/feedback/Dialog/Dialog.theme.d.ts +5 -0
- package/dist/src/components/feedback/Dialog/Dialog.theme.js +43 -14
- package/dist/src/components/feedback/LinearProgress/LinearProgress.theme.d.ts +6 -1
- package/dist/src/components/feedback/LinearProgress/LinearProgress.theme.js +91 -9
- package/dist/src/components/feedback/Snackbar/Snackbar.theme.d.ts +4 -4
- package/dist/src/components/feedback/Snackbar/Snackbar.theme.js +11 -3
- package/dist/src/components/index.d.ts +10 -1
- package/dist/src/components/index.js +10 -1
- package/dist/src/components/inputs/Autocomplete/Autocomplete.theme.d.ts +1 -1
- package/dist/src/components/inputs/Autocomplete/Autocomplete.theme.js +23 -51
- package/dist/src/components/inputs/Autocomplete/components/AutocompleteCaretDownIcon.d.ts +1 -0
- package/dist/src/components/inputs/Autocomplete/components/{AutocompletePopupIcon.js → AutocompleteCaretDownIcon.js} +1 -1
- package/dist/src/components/inputs/Autocomplete/components/AutocompleteXIcon.d.ts +1 -0
- package/dist/src/components/inputs/Autocomplete/components/AutocompleteXIcon.js +4 -0
- package/dist/src/components/inputs/Button/Button.theme.d.ts +4 -0
- package/dist/src/components/inputs/Button/Button.theme.js +93 -226
- package/dist/src/components/inputs/Button/get-button-colors-map.d.ts +24 -0
- package/dist/src/components/inputs/Button/get-button-colors-map.js +211 -0
- package/dist/src/components/inputs/Checkbox/Checkbox.theme.d.ts +7 -2
- package/dist/src/components/inputs/Checkbox/Checkbox.theme.js +57 -7
- package/dist/src/components/inputs/Fab/Fab.theme.d.ts +5 -9
- package/dist/src/components/inputs/Fab/Fab.theme.js +27 -98
- package/dist/src/components/inputs/FormHelperText/FormHelperText.d.ts +2 -0
- package/dist/src/components/inputs/FormHelperText/FormHelperText.js +3 -0
- package/dist/src/components/inputs/FormHelperText/FormHelperText.theme.d.ts +7 -0
- package/dist/src/components/inputs/FormHelperText/FormHelperText.theme.js +8 -0
- package/dist/src/components/inputs/FormHelperText/index.d.ts +1 -0
- package/dist/src/components/inputs/FormHelperText/index.js +2 -0
- package/dist/src/components/inputs/FormLabel/FormLabel.d.ts +2 -0
- package/dist/src/components/inputs/FormLabel/FormLabel.js +3 -0
- package/dist/src/components/inputs/FormLabel/FormLabel.theme.d.ts +7 -0
- package/dist/src/components/inputs/FormLabel/FormLabel.theme.js +8 -0
- package/dist/src/components/inputs/FormLabel/index.d.ts +1 -0
- package/dist/src/components/inputs/FormLabel/index.js +2 -0
- package/dist/src/components/inputs/IconButton/IconButton.theme.d.ts +3 -2
- package/dist/src/components/inputs/IconButton/IconButton.theme.js +90 -95
- package/dist/src/components/inputs/InputBase/InputBase.theme.d.ts +9 -26
- package/dist/src/components/inputs/InputBase/InputBase.theme.js +2 -64
- package/dist/src/components/inputs/InputLabel/InputLabel.theme.d.ts +7 -4
- package/dist/src/components/inputs/InputLabel/InputLabel.theme.js +26 -12
- package/dist/src/components/inputs/OutlinedInput/OutlinedInput.theme.d.ts +8 -0
- package/dist/src/components/inputs/OutlinedInput/OutlinedInput.theme.js +67 -0
- package/dist/src/components/inputs/OutlinedInput/index.d.ts +1 -0
- package/dist/src/components/inputs/OutlinedInput/index.js +2 -0
- package/dist/src/components/inputs/Radio/Radio.d.ts +4 -0
- package/dist/src/components/inputs/Radio/Radio.js +4 -0
- package/dist/src/components/inputs/Radio/Radio.theme.d.ts +11 -0
- package/dist/src/components/inputs/Radio/Radio.theme.js +35 -0
- package/dist/src/components/inputs/Radio/index.d.ts +1 -0
- package/dist/src/components/{navigation/TabList → inputs/Radio}/index.js +1 -1
- package/dist/src/components/inputs/Select/Select.theme.d.ts +2 -3
- package/dist/src/components/inputs/Select/Select.theme.js +6 -33
- package/dist/src/components/inputs/Switch/Switch.theme.js +125 -49
- package/dist/src/components/inputs/TextField/TextField.theme.d.ts +2 -3
- package/dist/src/components/inputs/TextField/TextField.theme.js +2 -26
- package/dist/src/components/navigation/Breadcrumbs/Breadcrumbs.d.ts +4 -0
- package/dist/src/components/navigation/Breadcrumbs/Breadcrumbs.js +5 -0
- package/dist/src/components/navigation/Breadcrumbs/Breadcrumbs.theme.d.ts +11 -0
- package/dist/src/components/navigation/Breadcrumbs/Breadcrumbs.theme.js +23 -0
- package/dist/src/components/navigation/Breadcrumbs/Crumb.d.ts +10 -0
- package/dist/src/components/navigation/Breadcrumbs/Crumb.js +10 -0
- package/dist/src/components/navigation/Breadcrumbs/index.d.ts +1 -0
- package/dist/src/components/navigation/Breadcrumbs/index.js +2 -0
- package/dist/src/components/navigation/Drawer/Drawer.theme.d.ts +1 -1
- package/dist/src/components/navigation/Drawer/Drawer.theme.js +50 -6
- package/dist/src/components/navigation/Link/Link.theme.d.ts +11 -2
- package/dist/src/components/navigation/Link/Link.theme.js +66 -9
- package/dist/src/components/navigation/Menu/Menu.theme.d.ts +2 -3
- package/dist/src/components/navigation/Menu/Menu.theme.js +6 -11
- package/dist/src/components/navigation/MenuItem/MenuItem.theme.d.ts +2 -4
- package/dist/src/components/navigation/MenuItem/MenuItem.theme.js +8 -8
- package/dist/src/components/navigation/Pagination/Pagination.theme.d.ts +1 -1
- package/dist/src/components/navigation/Pagination/Pagination.theme.js +11 -3
- package/dist/src/components/navigation/PaginationItem/PaginationItem.theme.js +65 -10
- package/dist/src/components/navigation/PaginationItem/components/PaginationIcons.d.ts +4 -0
- package/dist/src/components/navigation/PaginationItem/components/PaginationIcons.js +8 -0
- package/dist/src/components/navigation/PaginationItem/components/index.d.ts +1 -0
- package/dist/src/components/navigation/PaginationItem/components/index.js +2 -0
- package/dist/src/components/navigation/Tab/Tab.theme.d.ts +7 -1
- package/dist/src/components/navigation/Tab/Tab.theme.js +52 -13
- package/dist/src/components/navigation/Tabs/Tabs.d.ts +3 -0
- package/dist/src/components/navigation/Tabs/Tabs.js +4 -0
- package/dist/src/components/navigation/Tabs/Tabs.theme.d.ts +16 -0
- package/dist/src/components/navigation/Tabs/Tabs.theme.js +55 -0
- package/dist/src/components/navigation/Tabs/index.d.ts +1 -0
- package/dist/src/components/navigation/Tabs/index.js +2 -0
- package/dist/src/components/surfaces/Accordion/Accordion.theme.js +54 -22
- package/dist/src/components/surfaces/Accordion/AccordionDetails.theme.d.ts +10 -0
- package/dist/src/components/surfaces/Accordion/AccordionDetails.theme.js +19 -0
- package/dist/src/components/surfaces/Accordion/AccordionSummary.theme.d.ts +10 -0
- package/dist/src/components/surfaces/Accordion/AccordionSummary.theme.js +37 -0
- package/dist/src/components/surfaces/Accordion/index.d.ts +2 -0
- package/dist/src/components/surfaces/Accordion/index.js +2 -0
- package/dist/src/components/surfaces/Card/Card.theme.js +1 -1
- package/dist/src/components/surfaces/Paper/Paper.theme.d.ts +16 -1
- package/dist/src/components/surfaces/Paper/Paper.theme.js +21 -7
- package/dist/src/components/surfaces/Paper/Paper.tokens.d.ts +8 -0
- package/dist/src/components/surfaces/Paper/Paper.tokens.js +50 -0
- package/dist/src/components/surfaces/Paper/Paper.variants.d.ts +4 -0
- package/dist/src/components/surfaces/Paper/Paper.variants.js +3 -0
- package/dist/src/components/surfaces/Popover/Popover.d.ts +4 -0
- package/dist/src/components/surfaces/Popover/Popover.js +4 -0
- package/dist/src/components/surfaces/Popover/Popover.theme.d.ts +9 -0
- package/dist/src/components/surfaces/Popover/Popover.theme.js +14 -0
- package/dist/src/components/surfaces/Popover/index.d.ts +1 -0
- package/dist/src/components/surfaces/Popover/index.js +2 -0
- package/dist/src/components/utils/Backdrop/Backdrop.d.ts +3 -0
- package/dist/src/components/utils/Backdrop/Backdrop.js +4 -0
- package/dist/src/components/utils/Backdrop/Backdrop.theme.d.ts +11 -0
- package/dist/src/components/utils/Backdrop/Backdrop.theme.js +17 -0
- package/dist/src/components/utils/Backdrop/index.d.ts +1 -0
- package/dist/src/components/utils/Backdrop/index.js +2 -0
- package/dist/src/icons/index.d.ts +4 -0
- package/dist/src/icons/index.js +12 -0
- package/dist/src/providers/ThemeModeProvider.d.ts +1 -2
- package/dist/src/providers/ThemeModeProvider.js +2 -2
- package/dist/src/providers/WebProsMuiThemeProvider.js +1 -1
- package/dist/src/providers/WebProsTheme.d.ts +1 -0
- package/dist/src/providers/WebProsTheme.js +11 -5
- package/dist/src/shared/rippleEnterKeyframe.d.ts +6 -0
- package/dist/src/shared/rippleEnterKeyframe.js +12 -0
- package/dist/src/shared/viewContext/index.d.ts +1 -0
- package/dist/src/shared/viewContext/index.js +2 -0
- package/dist/src/shared/viewContext/viewContext.d.ts +4 -0
- package/dist/src/shared/viewContext/viewContext.js +2 -0
- package/dist/src/style/additional-color-palette.d.ts +1 -3
- package/dist/src/style/additional-color-palette.js +4 -7
- package/dist/src/style/custom-color-palette.js +51 -53
- package/dist/src/tokens/ThemeColorTokens.d.ts +11 -93
- package/dist/src/tokens/ThemeColorTokens.js +4 -168
- package/dist/src/tokens/ThemeScheme.d.ts +0 -3
- package/dist/src/tokens/ThemeScheme.js +0 -2
- package/dist/src/tokens/colors/Dark.d.ts +16 -0
- package/dist/src/tokens/colors/Dark.js +1422 -0
- package/dist/src/tokens/colors/Light.d.ts +16 -0
- package/dist/src/tokens/colors/Light.js +1392 -0
- package/dist/src/tokens/colors/index.d.ts +7 -0
- package/dist/src/tokens/colors/index.js +4 -0
- package/dist/src/tokens/colors/inverseSchemas.d.ts +40 -0
- package/dist/src/tokens/colors/inverseSchemas.js +3 -0
- package/dist/src/tokens/colors/inverseSchemes.d.ts +53 -0
- package/dist/src/tokens/colors/inverseSchemes.js +3 -0
- package/dist/src/tokens/colors/inverseStateLayers.d.ts +188 -0
- package/dist/src/tokens/colors/inverseStateLayers.js +3 -0
- package/dist/src/tokens/colors/schemas.d.ts +111 -0
- package/dist/src/tokens/colors/schemas.js +3 -0
- package/dist/src/tokens/colors/schemes.d.ts +111 -0
- package/dist/src/tokens/colors/schemes.js +3 -0
- package/dist/src/tokens/colors/stateLayers.d.ts +456 -0
- package/dist/src/tokens/colors/stateLayers.js +3 -0
- package/dist/src/tokens/colors/types.d.ts +9 -0
- package/dist/src/tokens/colors/types.js +2 -0
- package/dist/src/tokens/index.d.ts +6 -2
- package/dist/src/tokens/index.js +2 -1
- package/dist/src/tokens/legacyColors/LegacyDark.d.ts +2 -0
- package/dist/src/tokens/legacyColors/LegacyDark.js +88 -0
- package/dist/src/tokens/legacyColors/LegacyLight.d.ts +2 -0
- package/dist/src/tokens/legacyColors/LegacyLight.js +86 -0
- package/dist/src/tokens/legacyColors/ThemeColorTokensLegacy.d.ts +74 -0
- package/dist/src/tokens/legacyColors/ThemeColorTokensLegacy.js +2 -0
- package/dist/src/tokens/legacyColors/additionalColors/additionalColors.d.ts +21 -0
- package/dist/src/tokens/legacyColors/additionalColors/additionalColors.js +2 -0
- package/dist/src/tokens/{additionalColors → legacyColors/additionalColors}/index.d.ts +1 -0
- package/dist/src/tokens/{additionalColors → legacyColors/additionalColors}/index.js +1 -0
- package/dist/src/tokens/legacyColors/index.d.ts +2 -0
- package/dist/src/tokens/legacyColors/index.js +3 -0
- package/dist/src/tokens/shadows/index.d.ts +12 -0
- package/dist/src/tokens/shadows/index.js +112 -0
- package/dist/src/tokens/typography/index.d.ts +2 -0
- package/dist/src/tokens/typography/index.js +4 -0
- package/dist/src/tokens/typography/typescale.d.ts +28 -0
- package/dist/src/tokens/typography/typescale.js +26 -0
- package/dist/src/tokens/typography/typography.d.ts +2 -0
- package/dist/src/tokens/typography/typography.js +156 -0
- package/dist/src/utils/createIcon.d.ts +12 -0
- package/dist/src/utils/createIcon.js +94 -0
- package/dist/src/utils/flatten.d.ts +1 -0
- package/dist/src/utils/flatten.js +12 -0
- package/dist/src/utils/getMUIComponents.js +2 -2
- package/dist/src/utils/getMUIPalette.d.ts +6 -11
- package/dist/src/utils/getMUIPalette.js +49 -25
- package/dist/src/utils/getMUIThemeCustoimzationType.d.ts +31 -0
- package/dist/src/utils/getMUIThemeCustoimzationType.js +2 -0
- package/dist/src/utils/getMUITypography.d.ts +2 -0
- package/dist/src/utils/getMUITypography.js +5 -0
- package/dist/src/utils/getStateLayerColor.d.ts +37 -0
- package/dist/src/utils/getStateLayerColor.js +43 -1
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/src/utils/index.js +1 -1
- package/dist/src/utils/patchMUIShadows.js +4 -3
- package/package.json +21 -11
- package/dist/src/components/inputs/Autocomplete/components/AutocompletePopupIcon.d.ts +0 -1
- package/dist/src/components/navigation/PaginationItem/PaginationItem.d.ts +0 -3
- package/dist/src/components/navigation/PaginationItem/PaginationItem.js +0 -4
- package/dist/src/components/navigation/TabList/TabList.d.ts +0 -3
- package/dist/src/components/navigation/TabList/TabList.js +0 -4
- package/dist/src/components/navigation/TabList/TabList.theme.d.ts +0 -10
- package/dist/src/components/navigation/TabList/TabList.theme.js +0 -17
- package/dist/src/components/navigation/TabList/index.d.ts +0 -1
- package/dist/src/hooks/useTonalPalette.d.ts +0 -3
- package/dist/src/hooks/useTonalPalette.js +0 -32
- package/dist/src/providers/ThemeSchemeProvider.d.ts +0 -12
- package/dist/src/providers/ThemeSchemeProvider.js +0 -29
- package/dist/src/tokens/TonalPalette.d.ts +0 -10
- package/dist/src/tokens/TonalPalette.js +0 -10
- package/dist/src/utils/generateTokens.d.ts +0 -4
- package/dist/src/utils/generateTokens.js +0 -107
- /package/dist/src/tokens/{Tone.d.ts → legacyColors/Tone.d.ts} +0 -0
- /package/dist/src/tokens/{Tone.js → legacyColors/Tone.js} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
2
|
+
const BORDER_RADIUS = 6;
|
|
3
|
+
export const getAccordionDetails = (theme) => {
|
|
4
|
+
const { colors } = theme;
|
|
5
|
+
return {
|
|
6
|
+
MuiAccordionDetails: {
|
|
7
|
+
styleOverrides: {
|
|
8
|
+
root: {
|
|
9
|
+
backgroundColor: colors.schemes.surfaces.surfaceContainerLow,
|
|
10
|
+
color: colors.schemes.surfaces.onSurfaceVariant,
|
|
11
|
+
padding: '0 16px 16px 18px',
|
|
12
|
+
borderBottomLeftRadius: BORDER_RADIUS,
|
|
13
|
+
borderBottomRightRadius: BORDER_RADIUS,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Theme, ComponentsProps, ComponentsOverrides } from '@mui/material';
|
|
2
|
+
interface M3AccordionSummary {
|
|
3
|
+
MuiAccordionSummary: {
|
|
4
|
+
defaultProps?: ComponentsProps['MuiAccordionSummary'];
|
|
5
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiAccordionSummary'];
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export declare const getAccordionSummary: (theme: Theme) => M3AccordionSummary;
|
|
9
|
+
declare const _default: {};
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
2
|
+
const BORDER_RADIUS = 6;
|
|
3
|
+
export const getAccordionSummary = (theme) => {
|
|
4
|
+
const { colors, typography } = theme;
|
|
5
|
+
return {
|
|
6
|
+
MuiAccordionSummary: {
|
|
7
|
+
styleOverrides: {
|
|
8
|
+
root: Object.assign(Object.assign({ backgroundColor: colors.schemes.surfaces.surfaceContainerLow, color: colors.schemes.surfaces.onSurfaceVariant, minHeight: 'auto', padding: '3px 16px 3px 18px', borderRadius: BORDER_RADIUS }, typography.BodyMedium), { '& .MuiTypography-root:first-of-type': Object.assign({}, typography.BodyMediumProminent), '&.Mui-expanded': {
|
|
9
|
+
minHeight: 'auto',
|
|
10
|
+
borderBottomLeftRadius: 0,
|
|
11
|
+
borderBottomRightRadius: 0,
|
|
12
|
+
} }),
|
|
13
|
+
content: {
|
|
14
|
+
margin: '8px 0',
|
|
15
|
+
gap: 0,
|
|
16
|
+
flex: 1,
|
|
17
|
+
display: 'flex',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
'& .MuiTypography-root': {
|
|
20
|
+
flex: 1,
|
|
21
|
+
},
|
|
22
|
+
'&.Mui-expanded': {
|
|
23
|
+
margin: '8px 0',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
expandIconWrapper: {
|
|
27
|
+
color: colors.schemes.surfaces.onSurfaceVariant,
|
|
28
|
+
marginLeft: 'auto',
|
|
29
|
+
'&.Mui-expanded': {
|
|
30
|
+
transform: 'rotate(180deg)',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export default {};
|
|
@@ -1,7 +1,22 @@
|
|
|
1
|
-
import { Theme, ComponentsOverrides } from '@mui/material';
|
|
1
|
+
import { Theme, ComponentsOverrides, ComponentsVariants } from '@mui/material';
|
|
2
|
+
import { ComponentWithViewContextOwnProps } from '../../../shared/viewContext';
|
|
3
|
+
declare module '@mui/material/Paper' {
|
|
4
|
+
interface PaperOwnProps extends ComponentWithViewContextOwnProps {
|
|
5
|
+
}
|
|
6
|
+
interface PaperPropsVariantOverrides {
|
|
7
|
+
flat: true;
|
|
8
|
+
elevation: true;
|
|
9
|
+
outlined: false;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
2
12
|
interface M3Paper {
|
|
3
13
|
MuiPaper: {
|
|
14
|
+
defaultProps?: {
|
|
15
|
+
variant?: 'flat' | 'elevation';
|
|
16
|
+
elevation?: number;
|
|
17
|
+
};
|
|
4
18
|
styleOverrides?: ComponentsOverrides<Theme>['MuiPaper'];
|
|
19
|
+
variants?: ComponentsVariants<Theme>['MuiPaper'];
|
|
5
20
|
};
|
|
6
21
|
}
|
|
7
22
|
export declare const getPaper: (theme: Theme) => M3Paper;
|
|
@@ -1,13 +1,27 @@
|
|
|
1
|
+
import { getPaperTokens } from './Paper.tokens';
|
|
2
|
+
import { PaperVariantsNames, PaperElevationLevels } from './Paper.variants';
|
|
1
3
|
export const getPaper = (theme) => {
|
|
2
|
-
const
|
|
4
|
+
const variants = [];
|
|
5
|
+
PaperVariantsNames.forEach((variant) => {
|
|
6
|
+
PaperElevationLevels.forEach((elevation) => {
|
|
7
|
+
const tokens = getPaperTokens(theme, variant, elevation);
|
|
8
|
+
const tokensInverse = getPaperTokens(theme, variant, elevation, 'inverse');
|
|
9
|
+
variants.push({
|
|
10
|
+
props: { variant, elevation },
|
|
11
|
+
style: Object.assign({ backgroundColor: tokens.backgroundColor, borderRadius: tokens.borderRadius }, (tokens.boxShadow
|
|
12
|
+
? { boxShadow: tokens.boxShadow }
|
|
13
|
+
: { boxShadow: 'none' })),
|
|
14
|
+
}, {
|
|
15
|
+
props: { variant, elevation, viewContext: 'inverse' },
|
|
16
|
+
style: Object.assign({ backgroundColor: tokensInverse.backgroundColor, borderRadius: tokensInverse.borderRadius }, (tokensInverse.boxShadow
|
|
17
|
+
? { boxShadow: tokensInverse.boxShadow }
|
|
18
|
+
: { boxShadow: 'none' })),
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
});
|
|
3
22
|
return {
|
|
4
23
|
MuiPaper: {
|
|
5
|
-
|
|
6
|
-
root: {
|
|
7
|
-
backgroundColor: palette.surfaceContainerLowest.main,
|
|
8
|
-
borderRadius: 16,
|
|
9
|
-
},
|
|
10
|
-
},
|
|
24
|
+
variants,
|
|
11
25
|
},
|
|
12
26
|
};
|
|
13
27
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Theme } from '@mui/material';
|
|
2
|
+
import type { PaperVariantName, PaperElevationLevel } from './Paper.variants';
|
|
3
|
+
export type PaperTokens = {
|
|
4
|
+
backgroundColor: string;
|
|
5
|
+
borderRadius: number;
|
|
6
|
+
boxShadow?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const getPaperTokens: (theme: Theme, variant: PaperVariantName, elevation: PaperElevationLevel, viewContext?: "default" | "inverse") => PaperTokens;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { shadowCssValues } from '../../../tokens/shadows';
|
|
2
|
+
export const getPaperTokens = (theme, variant, elevation, viewContext = 'default') => {
|
|
3
|
+
const { colors } = theme;
|
|
4
|
+
const isInverse = viewContext === 'inverse';
|
|
5
|
+
if (variant === 'flat') {
|
|
6
|
+
const backgroundColors = isInverse
|
|
7
|
+
? [
|
|
8
|
+
colors.inverseSchemes.surfaces.surfaceContainerLowest,
|
|
9
|
+
colors.inverseSchemes.surfaces.surfaceContainerLow,
|
|
10
|
+
colors.inverseSchemes.surfaces.surfaceContainer,
|
|
11
|
+
colors.inverseSchemes.surfaces.surfaceContainerHigh,
|
|
12
|
+
]
|
|
13
|
+
: [
|
|
14
|
+
colors.schemes.surfaces.surfaceContainerLowest,
|
|
15
|
+
colors.schemes.surfaces.surfaceContainerLow,
|
|
16
|
+
colors.schemes.surfaces.surfaceContainer,
|
|
17
|
+
colors.schemes.surfaces.surfaceContainerHigh,
|
|
18
|
+
];
|
|
19
|
+
const borderRadii = [17, 10, 6, 4];
|
|
20
|
+
return {
|
|
21
|
+
backgroundColor: backgroundColors[elevation],
|
|
22
|
+
borderRadius: borderRadii[elevation],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
if (variant === 'elevation') {
|
|
26
|
+
const backgroundColors = isInverse
|
|
27
|
+
? [
|
|
28
|
+
colors.inverseSchemes.surfaces.elevatedContainerLowest,
|
|
29
|
+
colors.inverseSchemes.surfaces.elevatedContainerLow,
|
|
30
|
+
colors.inverseSchemes.surfaces.elevatedContainer,
|
|
31
|
+
colors.inverseSchemes.surfaces.elevatedContainerHigh,
|
|
32
|
+
]
|
|
33
|
+
: [
|
|
34
|
+
colors.schemes.surfaces.elevatedContainerLowest,
|
|
35
|
+
colors.schemes.surfaces.elevatedContainerLow,
|
|
36
|
+
colors.schemes.surfaces.elevatedContainer,
|
|
37
|
+
colors.schemes.surfaces.elevatedContainerHigh,
|
|
38
|
+
];
|
|
39
|
+
const shadowTokenNames = ['Shadows-1', 'Shadows-2', 'Shadows-3', 'Shadows-4'];
|
|
40
|
+
return {
|
|
41
|
+
backgroundColor: backgroundColors[elevation],
|
|
42
|
+
borderRadius: 10,
|
|
43
|
+
boxShadow: shadowCssValues[shadowTokenNames[elevation]],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
backgroundColor: colors.schemes.surfaces.surfaceContainerLowest,
|
|
48
|
+
borderRadius: 17,
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const PaperVariantsNames: readonly ["flat", "elevation"];
|
|
2
|
+
export type PaperVariantName = (typeof PaperVariantsNames)[number];
|
|
3
|
+
export declare const PaperElevationLevels: readonly [0, 1, 2, 3];
|
|
4
|
+
export type PaperElevationLevel = (typeof PaperElevationLevels)[number];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Theme, ComponentsProps } from '@mui/material';
|
|
2
|
+
interface M3Popover {
|
|
3
|
+
MuiPopover: {
|
|
4
|
+
defaultProps?: ComponentsProps['MuiPopover'];
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export declare const getPopover: (_theme: Theme) => M3Popover;
|
|
8
|
+
declare const _default: {};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
2
|
+
export const getPopover = (_theme) => {
|
|
3
|
+
return {
|
|
4
|
+
MuiPopover: {
|
|
5
|
+
defaultProps: {
|
|
6
|
+
PaperProps: {
|
|
7
|
+
elevation: 3,
|
|
8
|
+
variant: 'elevation',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Popover.theme';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Theme, ComponentsProps, ComponentsOverrides, ComponentsVariants } from '@mui/material';
|
|
2
|
+
interface M3Backdrop {
|
|
3
|
+
MuiBackdrop: {
|
|
4
|
+
defaultProps?: ComponentsProps['MuiBackdrop'];
|
|
5
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiBackdrop'];
|
|
6
|
+
variants?: ComponentsVariants['MuiBackdrop'];
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare const getBackdrop: (theme: Theme) => M3Backdrop;
|
|
10
|
+
declare const _default: {};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
2
|
+
export const getBackdrop = (theme) => {
|
|
3
|
+
const { colors } = theme;
|
|
4
|
+
return {
|
|
5
|
+
MuiBackdrop: {
|
|
6
|
+
styleOverrides: {
|
|
7
|
+
root: {
|
|
8
|
+
backgroundColor: colors.stateLayers.surfaces.scrim.opacity48,
|
|
9
|
+
'&.MuiBackdrop-invisible': {
|
|
10
|
+
backgroundColor: 'transparent',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Backdrop.theme';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const CaretDoubleRightSmall: import("@phosphor-icons/react").Icon;
|
|
2
|
+
export declare const CloseSmall: import("@phosphor-icons/react").Icon;
|
|
3
|
+
export declare const Domino: import("@phosphor-icons/react").Icon;
|
|
4
|
+
export declare const Error: import("@phosphor-icons/react").Icon;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
2
|
+
// This file is auto-generated by scripts/generate-icons.cjs
|
|
3
|
+
// Do not edit manually. Run "yarn generate:icons" to regenerate.
|
|
4
|
+
import { createIcon, createStaticIcon } from '../utils/createIcon';
|
|
5
|
+
import caretDoubleRightSmallSvg from './svg/caret-double-right-small.svg?raw';
|
|
6
|
+
import closeSmallSvg from './svg/close-small.svg?raw';
|
|
7
|
+
import dominoSvg from './svg/domino.svg?raw';
|
|
8
|
+
import errorSvg from './svg/error.svg?raw';
|
|
9
|
+
export const CaretDoubleRightSmall = createIcon('CaretDoubleRightSmall', caretDoubleRightSmallSvg);
|
|
10
|
+
export const CloseSmall = createIcon('CloseSmall', closeSmallSvg);
|
|
11
|
+
export const Domino = createIcon('Domino', dominoSvg);
|
|
12
|
+
export const Error = createStaticIcon('Error', errorSvg);
|
|
@@ -6,9 +6,8 @@ export type ThemeModeContextType = {
|
|
|
6
6
|
};
|
|
7
7
|
export type ThemeModeProviderProps = {
|
|
8
8
|
children?: React.ReactNode;
|
|
9
|
-
mode?: ThemeMode;
|
|
10
9
|
};
|
|
11
10
|
export declare const ThemeModeContext: import("react").Context<ThemeModeContextType>;
|
|
12
|
-
declare const ThemeModeProvider: ({ children
|
|
11
|
+
declare const ThemeModeProvider: ({ children }: ThemeModeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
export default ThemeModeProvider;
|
|
14
13
|
export declare const useThemeModeContext: () => ThemeModeContextType;
|
|
@@ -7,9 +7,9 @@ export const ThemeModeContext = createContext({
|
|
|
7
7
|
toggleTheme: () => { },
|
|
8
8
|
setThemeMode: () => { },
|
|
9
9
|
});
|
|
10
|
-
const ThemeModeProvider = ({ children
|
|
10
|
+
const ThemeModeProvider = ({ children }) => {
|
|
11
11
|
const [themeMode, toggleTheme, setThemeMode] = useThemeMode();
|
|
12
|
-
const value = useMemo(() => ({ themeMode
|
|
12
|
+
const value = useMemo(() => ({ themeMode, toggleTheme, setThemeMode }), [themeMode, toggleTheme, setThemeMode]);
|
|
13
13
|
return _jsx(ThemeModeContext.Provider, { value: value, children: children });
|
|
14
14
|
};
|
|
15
15
|
export default ThemeModeProvider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import ThemeModeProvider from './ThemeModeProvider';
|
|
3
3
|
import WebProsTheme from './WebProsTheme';
|
|
4
|
-
const WebProsMuiThemeProvider = ({ children, localization, themeMode }) => (_jsx(ThemeModeProvider, {
|
|
4
|
+
const WebProsMuiThemeProvider = ({ children, localization, themeMode }) => (_jsx(ThemeModeProvider, { children: _jsx(WebProsTheme, { mode: themeMode, localization: localization, children: children }) }));
|
|
5
5
|
export default WebProsMuiThemeProvider;
|
|
@@ -4,22 +4,28 @@ import { useContext, useMemo } from 'react';
|
|
|
4
4
|
import { CssBaseline, createTheme, ThemeProvider } from '@mui/material';
|
|
5
5
|
import { deepmerge } from '@mui/utils';
|
|
6
6
|
import { ThemeModeContext } from '../providers/ThemeModeProvider';
|
|
7
|
-
import
|
|
7
|
+
import '../utils/getMUIThemeCustoimzationType';
|
|
8
8
|
import { getMUIPalette } from '../utils/getMUIPalette';
|
|
9
9
|
import { getMUIComponents } from '../utils/getMUIComponents';
|
|
10
10
|
import { enUS } from '@mui/material/locale';
|
|
11
11
|
import { patchMUIShadows } from '../utils/patchMUIShadows';
|
|
12
|
+
import { ThemeSchemeDefault } from '../tokens/ThemeScheme';
|
|
13
|
+
import { getMUITypography } from '../utils/getMUITypography';
|
|
12
14
|
export const WebProsTheme = ({ children, mode, localization = enUS }) => {
|
|
13
15
|
const themeModeContext = useContext(ThemeModeContext);
|
|
14
|
-
const { themeScheme } = useContext(ThemeSchemeContext);
|
|
15
16
|
const themeMode = mode !== null && mode !== void 0 ? mode : themeModeContext.themeMode;
|
|
17
|
+
const typography = getMUITypography();
|
|
16
18
|
const webprosTheme = useMemo(() => {
|
|
17
|
-
const muiPalette = getMUIPalette(themeMode,
|
|
18
|
-
let theme = createTheme(
|
|
19
|
+
const muiPalette = getMUIPalette(themeMode, ThemeSchemeDefault);
|
|
20
|
+
let theme = createTheme({
|
|
21
|
+
palette: muiPalette.palette,
|
|
22
|
+
colors: muiPalette.colors,
|
|
23
|
+
typography: Object.assign(Object.assign({}, getMUITypography()), { fontFamily: "'Roboto', 'Helvetica', 'Arial', sans-serif", fontSize: 14, fontWeightLight: 300, fontWeightRegular: 400, fontWeightMedium: 500, fontWeightBold: 700, h1: Object.assign({}, typography.DisplayLarge), h2: Object.assign({}, typography.DisplayMedium), h3: Object.assign({}, typography.DisplaySmall), h4: Object.assign({}, typography.HeadlineLarge), h5: Object.assign({}, typography.HeadlineMedium), h6: Object.assign({}, typography.HeadlineSmall), subtitle1: Object.assign({}, typography.TitleLarge), subtitle2: Object.assign({}, typography.TitleMedium), body1: Object.assign({}, typography.BodyMedium), body2: Object.assign({}, typography.BodySmall), button: Object.assign({}, typography.HeadlineLarge), caption: Object.assign({}, typography.BodySmall), overline: Object.assign({}, typography.LabelSmall) }),
|
|
24
|
+
}, localization);
|
|
19
25
|
patchMUIShadows(theme);
|
|
20
26
|
theme = deepmerge(theme, getMUIComponents(theme, themeMode));
|
|
21
27
|
return theme;
|
|
22
|
-
}, [themeMode,
|
|
28
|
+
}, [themeMode, localization]);
|
|
23
29
|
return (_jsxs(ThemeProvider, { theme: webprosTheme, children: [_jsx(CssBaseline, { enableColorScheme: true }), children] }));
|
|
24
30
|
};
|
|
25
31
|
export default WebProsTheme;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
2
|
+
import { keyframes } from '@mui/material';
|
|
3
|
+
export const rippleEnterKeyframe = keyframes `
|
|
4
|
+
0% {
|
|
5
|
+
transform: scale(0);
|
|
6
|
+
opacity: 0.3;
|
|
7
|
+
}
|
|
8
|
+
100% {
|
|
9
|
+
transform: scale(1);
|
|
10
|
+
opacity: 1;
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './viewContext';
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
3
|
-
import
|
|
4
|
-
import Grid from '@mui/material/Grid2/Grid2';
|
|
5
|
-
import { ThemeSchemeContext } from '../providers/ThemeSchemeProvider';
|
|
3
|
+
import Grid from '@mui/material/Grid';
|
|
6
4
|
import { ColorItem } from '@storybook/addon-docs/blocks';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return (_jsx(Grid, { container: true, rowSpacing: 2, direction: 'column', children: Object.entries(theme.additionalColors).map(([key, val]) => (_jsxs(_Fragment, { children: [_jsx("h3", { id: key, children: key }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "Primary", subtitle: "", colors: {
|
|
5
|
+
import { LegacyDarkTokensDefault } from '../tokens/legacyColors';
|
|
6
|
+
export const AdditionalColorPalette = () => {
|
|
7
|
+
return (_jsx(Grid, { container: true, rowSpacing: 2, direction: 'column', children: Object.entries(LegacyDarkTokensDefault.additionalColors).map(([key, val]) => (_jsxs(_Fragment, { children: [_jsx("h3", { id: key, children: key }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "Primary", subtitle: "", colors: {
|
|
11
8
|
[`theme.custom.${key}[50]`]: val[50],
|
|
12
9
|
[`theme.custom.${key}[100]`]: val[100],
|
|
13
10
|
[`theme.custom.${key}[200]`]: val[200],
|
|
@@ -1,75 +1,73 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
3
|
-
import
|
|
4
|
-
import Grid from '@mui/material/Grid2/Grid2';
|
|
5
|
-
import { ThemeSchemeContext } from '../providers/ThemeSchemeProvider';
|
|
3
|
+
import Grid from '@mui/material/Grid';
|
|
6
4
|
import { ColorItem } from '@storybook/addon-docs/blocks';
|
|
5
|
+
import { LegacyDarkTokensDefault, LegacyLightTokensDefault, } from '../tokens/legacyColors';
|
|
7
6
|
export const CustomColorPalette = ({ mode }) => {
|
|
8
|
-
const { themeScheme } = useContext(ThemeSchemeContext);
|
|
9
7
|
const modeTitle = mode === 'light' ? 'Light Theme' : 'Dark Theme';
|
|
10
|
-
const
|
|
8
|
+
const palette = mode === 'light' ? LegacyLightTokensDefault : LegacyDarkTokensDefault;
|
|
11
9
|
return (_jsxs(Grid, { container: true, rowSpacing: 2, direction: 'column', children: [_jsx("h3", { id: modeTitle, children: modeTitle }), _jsx("h3", { id: `${mode}-base-colors`, children: 'Base colors' }), _jsx("h3", { id: `${mode}-primary`, children: 'Primary' }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "Primary", subtitle: "", colors: {
|
|
12
|
-
'theme.primary':
|
|
13
|
-
'theme.onPrimary':
|
|
14
|
-
'theme.primaryContainer':
|
|
15
|
-
'theme.onPrimaryContainer':
|
|
10
|
+
'theme.primary': palette.primary,
|
|
11
|
+
'theme.onPrimary': palette.onPrimary,
|
|
12
|
+
'theme.primaryContainer': palette.primaryContainer,
|
|
13
|
+
'theme.onPrimaryContainer': palette.onPrimaryContainer,
|
|
16
14
|
} }) }), _jsx("h3", { id: `${mode}-secondary`, children: 'Secondary' }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "Secondary", subtitle: "", colors: {
|
|
17
|
-
'theme.secondary':
|
|
18
|
-
'theme.onSecondary':
|
|
19
|
-
'theme.secondaryContainer':
|
|
20
|
-
'theme.onSecondaryContainer':
|
|
15
|
+
'theme.secondary': palette.secondary,
|
|
16
|
+
'theme.onSecondary': palette.onSecondary,
|
|
17
|
+
'theme.secondaryContainer': palette.secondaryContainer,
|
|
18
|
+
'theme.onSecondaryContainer': palette.onSecondaryContainer,
|
|
21
19
|
} }) }), _jsx("h3", { id: `${mode}-tertiary`, children: 'Tertiary' }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "Tertiary", subtitle: "", colors: {
|
|
22
|
-
'theme.tertiary':
|
|
23
|
-
'theme.onTertiary':
|
|
24
|
-
'theme.tertiaryContainer':
|
|
25
|
-
'theme.onTertiaryContainer':
|
|
20
|
+
'theme.tertiary': palette.tertiary,
|
|
21
|
+
'theme.onTertiary': palette.onTertiary,
|
|
22
|
+
'theme.tertiaryContainer': palette.tertiaryContainer,
|
|
23
|
+
'theme.onTertiaryContainer': palette.onTertiaryContainer,
|
|
26
24
|
} }) }), _jsx("h3", { id: `${mode}-error`, children: 'Error' }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "Error", subtitle: "", colors: {
|
|
27
|
-
'theme.error':
|
|
28
|
-
'theme.onError':
|
|
29
|
-
'theme.errorContainer':
|
|
30
|
-
'theme.onErrorContainer':
|
|
25
|
+
'theme.error': palette.error,
|
|
26
|
+
'theme.onError': palette.onError,
|
|
27
|
+
'theme.errorContainer': palette.errorContainer,
|
|
28
|
+
'theme.onErrorContainer': palette.onErrorContainer,
|
|
31
29
|
} }) }), _jsx("h3", { id: `${mode}-surface`, children: 'Surface' }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "Surface", subtitle: "", colors: {
|
|
32
|
-
'theme.surfaceDim':
|
|
33
|
-
'theme.surface':
|
|
34
|
-
'theme.surfaceBright':
|
|
30
|
+
'theme.surfaceDim': palette.surfaceDim,
|
|
31
|
+
'theme.surface': palette.surface,
|
|
32
|
+
'theme.surfaceBright': palette.surfaceBright,
|
|
35
33
|
} }) }), _jsx("h3", { id: `${mode}-surface-container`, children: 'Surface container' }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "Surface container", subtitle: "", colors: {
|
|
36
|
-
'theme.surfaceContainerLowest ':
|
|
37
|
-
'theme.surfaceContainerLow':
|
|
38
|
-
'theme.surfaceContainer':
|
|
39
|
-
'theme.surfaceContainerHigh':
|
|
40
|
-
'theme.surfaceContainerHighest':
|
|
34
|
+
'theme.surfaceContainerLowest ': palette.surfaceContainerLowest,
|
|
35
|
+
'theme.surfaceContainerLow': palette.surfaceContainerLow,
|
|
36
|
+
'theme.surfaceContainer': palette.surfaceContainer,
|
|
37
|
+
'theme.surfaceContainerHigh': palette.surfaceContainerHigh,
|
|
38
|
+
'theme.surfaceContainerHighest': palette.surfaceContainerHighest,
|
|
41
39
|
} }) }), _jsx("h3", { id: `${mode}-on-surface`, children: 'On surface' }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "On surface", subtitle: "", colors: {
|
|
42
|
-
'theme.onSurface ':
|
|
43
|
-
'theme.onSurfaceVariant ':
|
|
44
|
-
'theme.outline ':
|
|
45
|
-
'theme.outlineVariant ':
|
|
40
|
+
'theme.onSurface ': palette.onSurface,
|
|
41
|
+
'theme.onSurfaceVariant ': palette.onSurfaceVariant,
|
|
42
|
+
'theme.outline ': palette.outline,
|
|
43
|
+
'theme.outlineVariant ': palette.outlineVariant,
|
|
46
44
|
} }) }), _jsx("h3", { id: `${mode}-inverse`, children: 'Inverse' }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "Inverse", subtitle: "", colors: {
|
|
47
|
-
'theme.inverseSurface ':
|
|
48
|
-
'theme.inversePrimary ':
|
|
49
|
-
'theme.inverseOnSurface ':
|
|
45
|
+
'theme.inverseSurface ': palette.inverseSurface,
|
|
46
|
+
'theme.inversePrimary ': palette.inversePrimary,
|
|
47
|
+
'theme.inverseOnSurface ': palette.inverseOnSurface,
|
|
50
48
|
} }) }), _jsx("h3", { id: `${mode}-shadow-and-scrim`, children: 'Shadow and Scrim' }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "Shadow and Scrim", subtitle: "", colors: {
|
|
51
|
-
'theme.shadow ':
|
|
52
|
-
'theme.scrim ':
|
|
49
|
+
'theme.shadow ': palette.shadow,
|
|
50
|
+
'theme.scrim ': palette.scrim,
|
|
53
51
|
} }) }), _jsx("h3", { id: `${mode}-custom-colors`, children: 'Custom state colors' }), _jsx("h3", { id: `${mode}-info`, children: 'Info' }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "Info", subtitle: "", colors: {
|
|
54
|
-
'theme.info':
|
|
55
|
-
'theme.onInfo':
|
|
56
|
-
'theme.infoContainer':
|
|
57
|
-
'theme.onInfoContainer':
|
|
52
|
+
'theme.info': palette.info,
|
|
53
|
+
'theme.onInfo': palette.onInfo,
|
|
54
|
+
'theme.infoContainer': palette.infoContainer,
|
|
55
|
+
'theme.onInfoContainer': palette.onInfoContainer,
|
|
58
56
|
} }) }), _jsx("h3", { id: `${mode}-warning`, children: 'Warning' }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "Warning", subtitle: "", colors: {
|
|
59
|
-
'theme.warning':
|
|
60
|
-
'theme.onWarning':
|
|
61
|
-
'theme.warningContainer':
|
|
62
|
-
'theme.onWarningContainer':
|
|
57
|
+
'theme.warning': palette.warning,
|
|
58
|
+
'theme.onWarning': palette.onWarning,
|
|
59
|
+
'theme.warningContainer': palette.warningContainer,
|
|
60
|
+
'theme.onWarningContainer': palette.onWarningContainer,
|
|
63
61
|
} }) }), _jsx("h3", { id: `${mode}-success`, children: 'Success' }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "Success", subtitle: "", colors: {
|
|
64
|
-
'theme.success':
|
|
65
|
-
'theme.onSuccess':
|
|
66
|
-
'theme.successContainer':
|
|
67
|
-
'theme.onSuccessContainer':
|
|
62
|
+
'theme.success': palette.success,
|
|
63
|
+
'theme.onSuccess': palette.onSuccess,
|
|
64
|
+
'theme.successContainer': palette.successContainer,
|
|
65
|
+
'theme.onSuccessContainer': palette.onSuccessContainer,
|
|
68
66
|
} }) }), _jsx("h3", { id: `${mode}-utility-colors`, children: 'Utility colors' }), _jsx("h3", { id: `${mode}-undefined`, children: 'Undefined' }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "Undefined", subtitle: "", colors: {
|
|
69
|
-
'theme.undefined':
|
|
67
|
+
'theme.undefined': palette.undefined,
|
|
70
68
|
} }) }), _jsx("h3", { id: `${mode}-supportive`, children: 'Supportive' }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "Supportive", subtitle: "", colors: {
|
|
71
|
-
'theme.supportive':
|
|
69
|
+
'theme.supportive': palette.supportive,
|
|
72
70
|
} }) }), _jsx("h3", { id: `${mode}-divider`, children: 'Outline' }), _jsx("div", { className: "color-item", children: _jsx(ColorItem, { title: "Outline", subtitle: "", colors: {
|
|
73
|
-
'theme.outline':
|
|
71
|
+
'theme.outline': palette.outline,
|
|
74
72
|
} }) })] }));
|
|
75
73
|
};
|