@webpros/mui-theme 0.1.6 → 0.2.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 +6 -4
- 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 +60 -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/LinearProgress/LinearProgress.theme.d.ts +6 -1
- package/dist/src/components/feedback/LinearProgress/LinearProgress.theme.js +83 -9
- package/dist/src/components/feedback/Snackbar/Snackbar.theme.d.ts +4 -4
- package/dist/src/components/feedback/Snackbar/Snackbar.theme.js +7 -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/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 +3 -6
- package/dist/src/style/custom-color-palette.js +50 -52
- 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 +1398 -0
- package/dist/src/tokens/colors/Light.d.ts +16 -0
- package/dist/src/tokens/colors/Light.js +1398 -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 +174 -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/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 +4 -9
- 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 +6 -4
- 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
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
2
|
-
export const getPagination = (
|
|
3
|
-
const { palette: _ } = theme;
|
|
2
|
+
export const getPagination = (_theme) => {
|
|
4
3
|
return {
|
|
5
|
-
MuiPagination: {
|
|
4
|
+
MuiPagination: {
|
|
5
|
+
defaultProps: {
|
|
6
|
+
shape: 'rounded',
|
|
7
|
+
},
|
|
8
|
+
styleOverrides: {
|
|
9
|
+
ul: {
|
|
10
|
+
gap: 0,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
6
14
|
};
|
|
7
15
|
};
|
|
8
16
|
export default {};
|
|
@@ -1,25 +1,80 @@
|
|
|
1
1
|
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
2
|
-
import {
|
|
2
|
+
import { PaginationFirstIcon, PaginationLastIcon, PaginationPreviousIcon, PaginationNextIcon, } from './components';
|
|
3
|
+
// Figma tokens
|
|
4
|
+
const ITEM_SIZE = 34;
|
|
5
|
+
const BORDER_RADIUS = 17;
|
|
3
6
|
export const getPaginationItem = (theme) => {
|
|
4
|
-
const {
|
|
7
|
+
const { colors } = theme;
|
|
8
|
+
// Reusable state styles
|
|
9
|
+
const hoverState = {
|
|
10
|
+
backgroundColor: colors.stateLayers.surfaces.onSurface.opacity08,
|
|
11
|
+
};
|
|
12
|
+
const focusActiveState = {
|
|
13
|
+
backgroundColor: colors.stateLayers.surfaces.onSurface.opacity12,
|
|
14
|
+
};
|
|
15
|
+
const disabledState = {
|
|
16
|
+
opacity: 0.38,
|
|
17
|
+
color: colors.schemes.surfaces.onSurfaceVariant,
|
|
18
|
+
};
|
|
19
|
+
// Navigation button styles (prev, next, first, last)
|
|
20
|
+
const navigationButtonStyles = {
|
|
21
|
+
color: colors.schemes.surfaces.onSurface,
|
|
22
|
+
'&:hover': hoverState,
|
|
23
|
+
'&.Mui-focusVisible': focusActiveState,
|
|
24
|
+
'&:active': focusActiveState,
|
|
25
|
+
'&.Mui-disabled': disabledState,
|
|
26
|
+
};
|
|
5
27
|
return {
|
|
6
28
|
MuiPaginationItem: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
29
|
+
defaultProps: {
|
|
30
|
+
slots: {
|
|
31
|
+
first: PaginationFirstIcon,
|
|
32
|
+
last: PaginationLastIcon,
|
|
33
|
+
previous: PaginationPreviousIcon,
|
|
34
|
+
next: PaginationNextIcon,
|
|
10
35
|
},
|
|
11
|
-
|
|
12
|
-
|
|
36
|
+
},
|
|
37
|
+
styleOverrides: {
|
|
38
|
+
root: {
|
|
39
|
+
minWidth: ITEM_SIZE,
|
|
40
|
+
height: ITEM_SIZE,
|
|
41
|
+
margin: '0 2px',
|
|
42
|
+
padding: '7px 6px',
|
|
43
|
+
borderRadius: BORDER_RADIUS,
|
|
44
|
+
fontSize: 14,
|
|
45
|
+
fontWeight: 400,
|
|
46
|
+
lineHeight: '20px',
|
|
47
|
+
letterSpacing: 0.5,
|
|
48
|
+
color: colors.schemes.surfaces.onSurfaceVariant,
|
|
49
|
+
'&:hover': hoverState,
|
|
50
|
+
'&.Mui-focusVisible': focusActiveState,
|
|
51
|
+
'&:active': focusActiveState,
|
|
13
52
|
'&.Mui-selected': {
|
|
14
|
-
backgroundColor:
|
|
53
|
+
backgroundColor: colors.schemes.base.primaryContainer,
|
|
54
|
+
color: colors.schemes.base.onPrimaryContainer,
|
|
15
55
|
'&:hover': {
|
|
16
|
-
backgroundColor:
|
|
56
|
+
backgroundColor: colors.blendSchemaWithStateLayer('schemes.base.primaryContainer', 'stateLayers.base.onPrimaryContainer.opacity08'),
|
|
57
|
+
},
|
|
58
|
+
'&.Mui-focusVisible, &:active': {
|
|
59
|
+
backgroundColor: colors.blendSchemaWithStateLayer('schemes.base.primaryContainer', 'stateLayers.base.onPrimaryContainer.opacity12'),
|
|
17
60
|
},
|
|
18
61
|
},
|
|
62
|
+
'&.Mui-disabled': disabledState,
|
|
63
|
+
},
|
|
64
|
+
ellipsis: {
|
|
65
|
+
minWidth: ITEM_SIZE,
|
|
66
|
+
height: ITEM_SIZE,
|
|
67
|
+
display: 'flex',
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
justifyContent: 'center',
|
|
70
|
+
color: colors.schemes.surfaces.onSurfaceVariant,
|
|
71
|
+
cursor: 'default',
|
|
19
72
|
'&:hover': {
|
|
20
|
-
backgroundColor:
|
|
73
|
+
backgroundColor: 'transparent',
|
|
21
74
|
},
|
|
22
75
|
},
|
|
76
|
+
previousNext: navigationButtonStyles,
|
|
77
|
+
firstLast: navigationButtonStyles,
|
|
23
78
|
},
|
|
24
79
|
},
|
|
25
80
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const PaginationFirstIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const PaginationLastIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const PaginationPreviousIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const PaginationNextIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
3
|
+
import { CaretLeftIcon, CaretRightIcon, SkipBackIcon, SkipForwardIcon, } from '@phosphor-icons/react';
|
|
4
|
+
// Navigation icons for PaginationItem
|
|
5
|
+
export const PaginationFirstIcon = () => _jsx(SkipBackIcon, { size: 20 });
|
|
6
|
+
export const PaginationLastIcon = () => _jsx(SkipForwardIcon, { size: 20 });
|
|
7
|
+
export const PaginationPreviousIcon = () => _jsx(CaretLeftIcon, { size: 20 });
|
|
8
|
+
export const PaginationNextIcon = () => _jsx(CaretRightIcon, { size: 20 });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaginationIcons';
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { Theme, ComponentsOverrides, ComponentsProps } from '@mui/material';
|
|
1
|
+
import { Theme, ComponentsOverrides, ComponentsProps, ComponentsVariants } from '@mui/material';
|
|
2
|
+
import { ComponentWithViewContextOwnProps } from '../../../shared/viewContext';
|
|
3
|
+
declare module '@mui/material/Tab' {
|
|
4
|
+
interface TabOwnProps extends ComponentWithViewContextOwnProps {
|
|
5
|
+
}
|
|
6
|
+
}
|
|
2
7
|
interface M3Tab {
|
|
3
8
|
MuiTab: {
|
|
4
9
|
defaultProps?: ComponentsProps['MuiTab'];
|
|
5
10
|
styleOverrides?: ComponentsOverrides<Theme>['MuiTab'];
|
|
11
|
+
variants?: ComponentsVariants['MuiTab'];
|
|
6
12
|
};
|
|
7
13
|
}
|
|
8
14
|
export declare const getTab: (theme: Theme) => M3Tab;
|
|
@@ -1,18 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
2
|
+
import { touchRippleClasses, tabClasses, } from '@mui/material';
|
|
3
|
+
import { rippleEnterKeyframe } from '../../../shared/rippleEnterKeyframe';
|
|
4
|
+
const getStylesByContext = (theme, viewContext) => {
|
|
5
|
+
const { colors, typography } = theme;
|
|
6
|
+
const isInverseView = viewContext === 'inverse';
|
|
7
|
+
const schemesPath = isInverseView ? 'inverseSchemes' : 'schemes';
|
|
8
|
+
const stateLayersPath = isInverseView ? 'inverseStateLayers' : 'stateLayers';
|
|
3
9
|
return {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
props: { viewContext },
|
|
11
|
+
style: Object.assign(Object.assign({}, typography.LabelMedium), { textTransform: 'none', color: colors[schemesPath].surfaces.onSurfaceVariant, opacity: 1, padding: '18px 12px', minHeight: 'auto', minWidth: 'auto', borderRadius: 10, '&:hover': {
|
|
12
|
+
backgroundColor: colors[stateLayersPath].surfaces.onSurface.opacity08,
|
|
13
|
+
color: colors[schemesPath].surfaces.onSurface,
|
|
14
|
+
}, '&:focus': {
|
|
15
|
+
backgroundColor: colors[stateLayersPath].surfaces.onSurface.opacity12,
|
|
16
|
+
color: colors[schemesPath].surfaces.onSurface,
|
|
17
|
+
}, '&:active': {
|
|
18
|
+
backgroundColor: colors[stateLayersPath].surfaces.onSurface.opacity12,
|
|
19
|
+
color: colors[schemesPath].surfaces.onSurface,
|
|
20
|
+
}, [`&.${tabClasses.selected}`]: {
|
|
21
|
+
color: colors[schemesPath].base.primary,
|
|
22
|
+
'&:hover': {
|
|
23
|
+
backgroundColor: colors[stateLayersPath].base.primary.opacity08,
|
|
13
24
|
},
|
|
14
|
-
|
|
15
|
-
|
|
25
|
+
'&:focus': {
|
|
26
|
+
backgroundColor: colors[stateLayersPath].base.primary.opacity12,
|
|
27
|
+
},
|
|
28
|
+
'&:active': {
|
|
29
|
+
backgroundColor: colors[stateLayersPath].base.primary.opacity12,
|
|
30
|
+
},
|
|
31
|
+
[`& .${touchRippleClasses.ripple}.${touchRippleClasses.rippleVisible}`]: {
|
|
32
|
+
color: colors[stateLayersPath].base.primary.opacity12,
|
|
33
|
+
},
|
|
34
|
+
}, [`&.${tabClasses.disabled}`]: {
|
|
35
|
+
color: colors[stateLayersPath].surfaces.onSurface.opacity38,
|
|
36
|
+
opacity: 1,
|
|
37
|
+
}, [`& .${touchRippleClasses.ripple}.${touchRippleClasses.rippleVisible}`]: {
|
|
38
|
+
color: colors[stateLayersPath].surfaces.onSurface.opacity12,
|
|
39
|
+
opacity: 1,
|
|
40
|
+
animationName: rippleEnterKeyframe,
|
|
41
|
+
} }),
|
|
16
42
|
};
|
|
17
43
|
};
|
|
44
|
+
export const getTab = (theme) => ({
|
|
45
|
+
MuiTab: {
|
|
46
|
+
styleOverrides: {
|
|
47
|
+
root: {},
|
|
48
|
+
icon: {
|
|
49
|
+
width: 20,
|
|
50
|
+
height: 20,
|
|
51
|
+
marginBottom: 4,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
variants: [getStylesByContext(theme), getStylesByContext(theme, 'inverse')],
|
|
55
|
+
},
|
|
56
|
+
});
|
|
18
57
|
export default {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Theme, ComponentsOverrides, ComponentsProps, ComponentsVariants } from '@mui/material';
|
|
2
|
+
import { ComponentWithViewContextOwnProps } from '../../../shared/viewContext';
|
|
3
|
+
declare module '@mui/material/Tabs' {
|
|
4
|
+
interface TabsOwnProps extends ComponentWithViewContextOwnProps {
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
interface M3Tabs {
|
|
8
|
+
MuiTabs: {
|
|
9
|
+
defaultProps?: ComponentsProps['MuiTabs'];
|
|
10
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiTabs'];
|
|
11
|
+
variants?: ComponentsVariants['MuiTabs'];
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare const getTabs: (theme: Theme) => M3Tabs;
|
|
15
|
+
declare const _default: {};
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
3
|
+
import { tabsClasses, tabClasses, } from '@mui/material';
|
|
4
|
+
const getStylesByContext = (theme, viewContext) => {
|
|
5
|
+
const { colors } = theme;
|
|
6
|
+
const isInverseView = viewContext === 'inverse';
|
|
7
|
+
const schemesPath = isInverseView ? 'inverseSchemes' : 'schemes';
|
|
8
|
+
return {
|
|
9
|
+
props: { viewContext },
|
|
10
|
+
style: {
|
|
11
|
+
[`& .${tabsClasses.indicator}Span`]: {
|
|
12
|
+
width: '100%',
|
|
13
|
+
backgroundColor: colors[schemesPath].base.primary,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export const getTabs = (theme) => ({
|
|
19
|
+
MuiTabs: {
|
|
20
|
+
defaultProps: {
|
|
21
|
+
slotProps: {
|
|
22
|
+
indicator: {
|
|
23
|
+
children: _jsx("span", { className: `${tabsClasses.indicator}Span` }),
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
styleOverrides: {
|
|
28
|
+
root: {
|
|
29
|
+
[`&.${tabsClasses.vertical}`]: {
|
|
30
|
+
[`& .${tabClasses.root}`]: {
|
|
31
|
+
padding: '10px 16px 10px 10px',
|
|
32
|
+
flexDirection: 'row',
|
|
33
|
+
justifyContent: 'flex-start',
|
|
34
|
+
textAlign: 'left',
|
|
35
|
+
[`& .${tabClasses.icon}`]: {
|
|
36
|
+
marginBottom: 0,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
[`& .${tabsClasses.indicator}`]: {
|
|
40
|
+
width: 3,
|
|
41
|
+
padding: '10px 0',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
indicator: {
|
|
46
|
+
display: 'flex',
|
|
47
|
+
height: 3,
|
|
48
|
+
padding: '0 12px',
|
|
49
|
+
backgroundColor: 'transparent',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
variants: [getStylesByContext(theme), getStylesByContext(theme, 'inverse')],
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
export default {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tabs.theme';
|
|
@@ -1,39 +1,71 @@
|
|
|
1
1
|
// Copyright 2025 WebPros International GmbH. All rights reserved.
|
|
2
|
+
const BORDER_RADIUS = 6;
|
|
3
|
+
const GAP = 8;
|
|
2
4
|
export const getAccordion = (theme) => {
|
|
3
|
-
const {
|
|
5
|
+
const { colors } = theme;
|
|
4
6
|
return {
|
|
5
7
|
MuiAccordion: {
|
|
8
|
+
defaultProps: {
|
|
9
|
+
disableGutters: true,
|
|
10
|
+
square: false,
|
|
11
|
+
},
|
|
6
12
|
styleOverrides: {
|
|
7
13
|
root: {
|
|
8
14
|
boxShadow: 'none',
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
backgroundColor: 'transparent',
|
|
16
|
+
color: colors.schemes.surfaces.onSurfaceVariant,
|
|
17
|
+
'&:before': {
|
|
18
|
+
display: 'none',
|
|
19
|
+
},
|
|
20
|
+
borderRadius: BORDER_RADIUS,
|
|
21
|
+
'&:not(:last-of-type)': {
|
|
22
|
+
borderBottom: `1px solid ${colors.schemes.surfaces.surfaceContainerLowest}`,
|
|
23
|
+
},
|
|
14
24
|
'&:first-of-type': {
|
|
15
|
-
|
|
25
|
+
borderTopLeftRadius: BORDER_RADIUS,
|
|
26
|
+
borderTopRightRadius: BORDER_RADIUS,
|
|
16
27
|
},
|
|
17
28
|
'&:last-of-type': {
|
|
29
|
+
borderBottomLeftRadius: BORDER_RADIUS,
|
|
30
|
+
borderBottomRightRadius: BORDER_RADIUS,
|
|
31
|
+
},
|
|
32
|
+
'&:not(:first-of-type):not(:last-of-type)': {
|
|
18
33
|
borderRadius: 0,
|
|
19
34
|
},
|
|
20
|
-
'
|
|
21
|
-
|
|
22
|
-
|
|
35
|
+
'&.Mui-expanded': {
|
|
36
|
+
marginTop: GAP,
|
|
37
|
+
marginBottom: GAP,
|
|
38
|
+
borderBottom: 'none',
|
|
39
|
+
'&:first-of-type': {
|
|
40
|
+
marginTop: 0,
|
|
41
|
+
},
|
|
42
|
+
'&:last-of-type': {
|
|
43
|
+
marginBottom: 0,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
'&.Mui-expanded + &': {
|
|
47
|
+
borderTop: 'none',
|
|
23
48
|
},
|
|
24
49
|
'&.Mui-disabled': {
|
|
25
|
-
backgroundColor:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
50
|
+
backgroundColor: colors.schemes.surfaces.surfaceContainerLow,
|
|
51
|
+
},
|
|
52
|
+
'&:not(:first-of-type):not(:last-of-type) .MuiAccordionSummary-root': {
|
|
53
|
+
borderRadius: 0,
|
|
54
|
+
},
|
|
55
|
+
'&:first-of-type .MuiAccordionSummary-root': {
|
|
56
|
+
borderBottomLeftRadius: 0,
|
|
57
|
+
borderBottomRightRadius: 0,
|
|
58
|
+
},
|
|
59
|
+
'&:last-of-type:not(.Mui-expanded) .MuiAccordionSummary-root': {
|
|
60
|
+
borderTopLeftRadius: 0,
|
|
61
|
+
borderTopRightRadius: 0,
|
|
62
|
+
},
|
|
63
|
+
'&:last-of-type.Mui-expanded .MuiAccordionSummary-root': {
|
|
64
|
+
borderRadius: 0,
|
|
65
|
+
},
|
|
66
|
+
'&:not(:last-of-type) .MuiAccordionDetails-root': {
|
|
67
|
+
borderBottomLeftRadius: 0,
|
|
68
|
+
borderBottomRightRadius: 0,
|
|
37
69
|
},
|
|
38
70
|
},
|
|
39
71
|
},
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Theme, ComponentsProps, ComponentsOverrides } from '@mui/material';
|
|
2
|
+
interface M3AccordionDetails {
|
|
3
|
+
MuiAccordionDetails: {
|
|
4
|
+
defaultProps?: ComponentsProps['MuiAccordionDetails'];
|
|
5
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiAccordionDetails'];
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export declare const getAccordionDetails: (theme: Theme) => M3AccordionDetails;
|
|
9
|
+
declare const _default: {};
|
|
10
|
+
export default _default;
|
|
@@ -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];
|