@mui/material 7.3.3 → 7.3.5
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/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
- package/Alert/alertClasses.d.ts +24 -24
- package/Breadcrumbs/BreadcrumbCollapsed.js +0 -2
- package/Button/buttonClasses.d.ts +33 -33
- package/ButtonGroup/buttonGroupClasses.d.ts +17 -17
- package/CHANGELOG.md +80 -0
- package/Chip/chipClasses.d.ts +26 -26
- package/CircularProgress/circularProgressClasses.d.ts +2 -2
- package/Collapse/Collapse.d.ts +31 -1
- package/Collapse/Collapse.js +73 -30
- package/DefaultPropsProvider/DefaultPropsProvider.d.ts +1 -1
- package/Dialog/dialogClasses.d.ts +2 -2
- package/Divider/dividerClasses.d.ts +1 -1
- package/Drawer/drawerClasses.d.ts +8 -8
- package/GlobalStyles/GlobalStyles.js +0 -2
- package/ImageListItemBar/imageListItemBarClasses.d.ts +4 -4
- package/InitColorSchemeScript/InitColorSchemeScript.d.ts +1 -2
- package/InitColorSchemeScript/InitColorSchemeScript.js +0 -2
- package/Input/inputClasses.d.ts +4 -4
- package/InputBase/inputBaseClasses.d.ts +5 -5
- package/LinearProgress/linearProgressClasses.d.ts +9 -9
- package/OutlinedInput/NotchedOutline.js +0 -2
- package/OutlinedInput/outlinedInputClasses.d.ts +4 -4
- package/PaginationItem/paginationItemClasses.d.ts +4 -4
- package/Radio/RadioButtonIcon.js +0 -2
- package/Select/selectClasses.d.ts +3 -3
- package/Slider/sliderClasses.d.ts +7 -7
- package/StepConnector/stepConnectorClasses.d.ts +2 -2
- package/TableSortLabel/tableSortLabelClasses.d.ts +2 -2
- package/Tabs/Tabs.js +0 -5
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +2 -2
- package/Zoom/Zoom.d.ts +1 -1
- package/Zoom/Zoom.js +1 -1
- package/esm/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
- package/esm/Alert/alertClasses.d.ts +24 -24
- package/esm/Breadcrumbs/BreadcrumbCollapsed.js +0 -1
- package/esm/Button/buttonClasses.d.ts +33 -33
- package/esm/ButtonGroup/buttonGroupClasses.d.ts +17 -17
- package/esm/Chip/chipClasses.d.ts +26 -26
- package/esm/CircularProgress/circularProgressClasses.d.ts +2 -2
- package/esm/Collapse/Collapse.d.ts +31 -1
- package/esm/Collapse/Collapse.js +73 -30
- package/esm/DefaultPropsProvider/DefaultPropsProvider.d.ts +1 -1
- package/esm/Dialog/dialogClasses.d.ts +2 -2
- package/esm/Divider/dividerClasses.d.ts +1 -1
- package/esm/Drawer/drawerClasses.d.ts +8 -8
- package/esm/GlobalStyles/GlobalStyles.js +0 -1
- package/esm/ImageListItemBar/imageListItemBarClasses.d.ts +4 -4
- package/esm/InitColorSchemeScript/InitColorSchemeScript.d.ts +1 -2
- package/esm/InitColorSchemeScript/InitColorSchemeScript.js +0 -1
- package/esm/Input/inputClasses.d.ts +4 -4
- package/esm/InputBase/inputBaseClasses.d.ts +5 -5
- package/esm/LinearProgress/linearProgressClasses.d.ts +9 -9
- package/esm/OutlinedInput/NotchedOutline.js +0 -1
- package/esm/OutlinedInput/outlinedInputClasses.d.ts +4 -4
- package/esm/PaginationItem/paginationItemClasses.d.ts +4 -4
- package/esm/Radio/RadioButtonIcon.js +0 -1
- package/esm/Select/selectClasses.d.ts +3 -3
- package/esm/Slider/sliderClasses.d.ts +7 -7
- package/esm/StepConnector/stepConnectorClasses.d.ts +2 -2
- package/esm/TableSortLabel/tableSortLabelClasses.d.ts +2 -2
- package/esm/Tabs/Tabs.js +0 -5
- package/esm/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +2 -2
- package/esm/Zoom/Zoom.d.ts +1 -1
- package/esm/Zoom/Zoom.js +1 -1
- package/esm/index.js +1 -1
- package/esm/internal/svg-icons/Add.js +0 -1
- package/esm/internal/svg-icons/ArrowDownward.js +0 -1
- package/esm/internal/svg-icons/ArrowDropDown.js +0 -1
- package/esm/internal/svg-icons/Cancel.js +0 -1
- package/esm/internal/svg-icons/CheckBox.js +0 -1
- package/esm/internal/svg-icons/CheckBoxOutlineBlank.js +0 -1
- package/esm/internal/svg-icons/CheckCircle.js +0 -1
- package/esm/internal/svg-icons/Close.js +0 -1
- package/esm/internal/svg-icons/ErrorOutline.js +0 -1
- package/esm/internal/svg-icons/FirstPage.js +0 -1
- package/esm/internal/svg-icons/IndeterminateCheckBox.js +0 -1
- package/esm/internal/svg-icons/InfoOutlined.js +0 -1
- package/esm/internal/svg-icons/KeyboardArrowLeft.js +0 -1
- package/esm/internal/svg-icons/KeyboardArrowRight.js +0 -1
- package/esm/internal/svg-icons/LastPage.js +0 -1
- package/esm/internal/svg-icons/MoreHoriz.js +0 -1
- package/esm/internal/svg-icons/NavigateBefore.js +0 -1
- package/esm/internal/svg-icons/NavigateNext.js +0 -1
- package/esm/internal/svg-icons/Person.js +0 -1
- package/esm/internal/svg-icons/RadioButtonChecked.js +0 -1
- package/esm/internal/svg-icons/RadioButtonUnchecked.js +0 -1
- package/esm/internal/svg-icons/ReportProblemOutlined.js +0 -1
- package/esm/internal/svg-icons/Star.js +0 -1
- package/esm/internal/svg-icons/StarBorder.js +0 -1
- package/esm/internal/svg-icons/SuccessOutlined.js +0 -1
- package/esm/internal/svg-icons/Warning.js +0 -1
- package/esm/locale/caES.js +45 -42
- package/esm/styles/ThemeProvider.d.ts +1 -1
- package/esm/styles/ThemeProviderWithVars.d.ts +2 -3
- package/esm/styles/ThemeProviderWithVars.js +0 -1
- package/esm/styles/createTheme.d.ts +13 -5
- package/esm/styles/createThemeFoundation.d.ts +279 -0
- package/esm/styles/createThemeFoundation.js +37 -0
- package/esm/styles/createThemeNoVars.d.ts +3 -1
- package/esm/styles/createThemeWithVars.d.ts +23 -306
- package/esm/styles/index.d.ts +1 -1
- package/esm/version/index.js +2 -2
- package/esm/zero-styled/index.d.ts +1 -2
- package/esm/zero-styled/index.js +0 -1
- package/index.js +1 -1
- package/internal/svg-icons/Add.js +0 -2
- package/internal/svg-icons/ArrowDownward.js +0 -2
- package/internal/svg-icons/ArrowDropDown.js +0 -2
- package/internal/svg-icons/Cancel.js +0 -2
- package/internal/svg-icons/CheckBox.js +0 -2
- package/internal/svg-icons/CheckBoxOutlineBlank.js +0 -2
- package/internal/svg-icons/CheckCircle.js +0 -2
- package/internal/svg-icons/Close.js +0 -2
- package/internal/svg-icons/ErrorOutline.js +0 -2
- package/internal/svg-icons/FirstPage.js +0 -2
- package/internal/svg-icons/IndeterminateCheckBox.js +0 -2
- package/internal/svg-icons/InfoOutlined.js +0 -2
- package/internal/svg-icons/KeyboardArrowLeft.js +0 -2
- package/internal/svg-icons/KeyboardArrowRight.js +0 -2
- package/internal/svg-icons/LastPage.js +0 -2
- package/internal/svg-icons/MoreHoriz.js +0 -2
- package/internal/svg-icons/NavigateBefore.js +0 -2
- package/internal/svg-icons/NavigateNext.js +0 -2
- package/internal/svg-icons/Person.js +0 -2
- package/internal/svg-icons/RadioButtonChecked.js +0 -2
- package/internal/svg-icons/RadioButtonUnchecked.js +0 -2
- package/internal/svg-icons/ReportProblemOutlined.js +0 -2
- package/internal/svg-icons/Star.js +0 -2
- package/internal/svg-icons/StarBorder.js +0 -2
- package/internal/svg-icons/SuccessOutlined.js +0 -2
- package/internal/svg-icons/Warning.js +0 -2
- package/locale/caES.js +45 -42
- package/package.json +7 -7
- package/styles/ThemeProvider.d.ts +1 -1
- package/styles/ThemeProviderWithVars.d.ts +2 -3
- package/styles/ThemeProviderWithVars.js +0 -2
- package/styles/createTheme.d.ts +13 -5
- package/styles/createThemeFoundation.d.ts +279 -0
- package/styles/createThemeFoundation.js +5 -0
- package/styles/createThemeNoVars.d.ts +3 -1
- package/styles/createThemeWithVars.d.ts +23 -306
- package/styles/index.d.ts +1 -1
- package/version/index.js +2 -2
- package/zero-styled/index.d.ts +1 -2
- package/zero-styled/index.js +0 -2
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
5
|
Object.defineProperty(exports, "__esModule", {
|
|
7
6
|
value: true
|
|
8
7
|
});
|
|
9
8
|
exports.default = void 0;
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _createSvgIcon = _interopRequireDefault(require("../../utils/createSvgIcon"));
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
11
|
/**
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
5
|
Object.defineProperty(exports, "__esModule", {
|
|
7
6
|
value: true
|
|
8
7
|
});
|
|
9
8
|
exports.default = void 0;
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _createSvgIcon = _interopRequireDefault(require("../../utils/createSvgIcon"));
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
11
|
/**
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
5
|
Object.defineProperty(exports, "__esModule", {
|
|
7
6
|
value: true
|
|
8
7
|
});
|
|
9
8
|
exports.default = void 0;
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _createSvgIcon = _interopRequireDefault(require("../../utils/createSvgIcon"));
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
11
|
/**
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
5
|
Object.defineProperty(exports, "__esModule", {
|
|
7
6
|
value: true
|
|
8
7
|
});
|
|
9
8
|
exports.default = void 0;
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _createSvgIcon = _interopRequireDefault(require("../../utils/createSvgIcon"));
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
11
|
/**
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
5
|
Object.defineProperty(exports, "__esModule", {
|
|
7
6
|
value: true
|
|
8
7
|
});
|
|
9
8
|
exports.default = void 0;
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _createSvgIcon = _interopRequireDefault(require("../../utils/createSvgIcon"));
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
11
|
/**
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
5
|
Object.defineProperty(exports, "__esModule", {
|
|
7
6
|
value: true
|
|
8
7
|
});
|
|
9
8
|
exports.default = void 0;
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _createSvgIcon = _interopRequireDefault(require("../../utils/createSvgIcon"));
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
11
|
/**
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
5
|
Object.defineProperty(exports, "__esModule", {
|
|
7
6
|
value: true
|
|
8
7
|
});
|
|
9
8
|
exports.default = void 0;
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _createSvgIcon = _interopRequireDefault(require("../../utils/createSvgIcon"));
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
11
|
/**
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
5
|
Object.defineProperty(exports, "__esModule", {
|
|
7
6
|
value: true
|
|
8
7
|
});
|
|
9
8
|
exports.default = void 0;
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _createSvgIcon = _interopRequireDefault(require("../../utils/createSvgIcon"));
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
11
|
/**
|
package/locale/caES.js
CHANGED
|
@@ -6,29 +6,32 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.caES = void 0;
|
|
7
7
|
const caES = exports.caES = {
|
|
8
8
|
components: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
MuiBreadcrumbs: {
|
|
10
|
+
defaultProps: {
|
|
11
|
+
expandText: 'Mostra el camí'
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
14
|
MuiTablePagination: {
|
|
15
15
|
defaultProps: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
labelRowsPerPage: 'Files per pàgina:'
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
getItemAriaLabel: type => {
|
|
17
|
+
if (type === 'first') {
|
|
18
|
+
return 'Ves a la primera pàgina';
|
|
19
|
+
}
|
|
20
|
+
if (type === 'last') {
|
|
21
|
+
return "Ves a l'última pàgina";
|
|
22
|
+
}
|
|
23
|
+
if (type === 'next') {
|
|
24
|
+
return 'Ves a la pàgina següent';
|
|
25
|
+
}
|
|
26
|
+
// if (type === 'previous') {
|
|
27
|
+
return 'Ves a la pàgina anterior';
|
|
28
|
+
},
|
|
29
|
+
labelRowsPerPage: 'Files per pàgina:',
|
|
30
|
+
labelDisplayedRows: ({
|
|
31
|
+
from,
|
|
32
|
+
to,
|
|
33
|
+
count
|
|
34
|
+
}) => `${from}–${to} de ${count !== -1 ? count : `més de ${to}`}`
|
|
32
35
|
}
|
|
33
36
|
},
|
|
34
37
|
MuiRating: {
|
|
@@ -50,27 +53,27 @@ const caES = exports.caES = {
|
|
|
50
53
|
defaultProps: {
|
|
51
54
|
closeText: 'Tancat'
|
|
52
55
|
}
|
|
56
|
+
},
|
|
57
|
+
MuiPagination: {
|
|
58
|
+
defaultProps: {
|
|
59
|
+
'aria-label': 'Navegació entre pàgines',
|
|
60
|
+
getItemAriaLabel: (type, page, selected) => {
|
|
61
|
+
if (type === 'page') {
|
|
62
|
+
return `${selected ? '' : 'Ves a la '}pàgina ${page}`;
|
|
63
|
+
}
|
|
64
|
+
if (type === 'first') {
|
|
65
|
+
return 'Ves a la primera pàgina';
|
|
66
|
+
}
|
|
67
|
+
if (type === 'last') {
|
|
68
|
+
return "Ves a l'última pàgina";
|
|
69
|
+
}
|
|
70
|
+
if (type === 'next') {
|
|
71
|
+
return 'Ves a la pàgina següent';
|
|
72
|
+
}
|
|
73
|
+
// if (type === 'previous') {
|
|
74
|
+
return 'Ves a la pàgina anterior';
|
|
75
|
+
}
|
|
76
|
+
}
|
|
53
77
|
}
|
|
54
|
-
// MuiPagination: {
|
|
55
|
-
// defaultProps: {
|
|
56
|
-
// 'aria-label': 'Pagination navigation',
|
|
57
|
-
// getItemAriaLabel: (type, page, selected) => {
|
|
58
|
-
// if (type === 'page') {
|
|
59
|
-
// return `${selected ? '' : 'Go to '}page ${page}`;
|
|
60
|
-
// }
|
|
61
|
-
// if (type === 'first') {
|
|
62
|
-
// return 'Go to first page';
|
|
63
|
-
// }
|
|
64
|
-
// if (type === 'last') {
|
|
65
|
-
// return 'Go to last page';
|
|
66
|
-
// }
|
|
67
|
-
// if (type === 'next') {
|
|
68
|
-
// return 'Go to next page';
|
|
69
|
-
// }
|
|
70
|
-
// // if (type === 'previous') {
|
|
71
|
-
// return 'Go to previous page';
|
|
72
|
-
// },
|
|
73
|
-
// },
|
|
74
|
-
// },
|
|
75
78
|
}
|
|
76
79
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.5",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.",
|
|
6
6
|
"keywords": [
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"clsx": "^2.1.1",
|
|
32
32
|
"csstype": "^3.1.3",
|
|
33
33
|
"prop-types": "^15.8.1",
|
|
34
|
-
"react-is": "^19.
|
|
34
|
+
"react-is": "^19.2.0",
|
|
35
35
|
"react-transition-group": "^4.4.5",
|
|
36
|
-
"@mui/
|
|
37
|
-
"@mui/
|
|
38
|
-
"@mui/types": "^7.4.
|
|
39
|
-
"@mui/utils": "^7.3.
|
|
36
|
+
"@mui/core-downloads-tracker": "^7.3.5",
|
|
37
|
+
"@mui/system": "^7.3.5",
|
|
38
|
+
"@mui/types": "^7.4.8",
|
|
39
|
+
"@mui/utils": "^7.3.5"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@emotion/react": "^11.5.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
45
45
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
46
46
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
47
|
-
"@mui/material-pigment-css": "^7.3.
|
|
47
|
+
"@mui/material-pigment-css": "^7.3.5"
|
|
48
48
|
},
|
|
49
49
|
"peerDependenciesMeta": {
|
|
50
50
|
"@types/react": {
|
|
@@ -72,5 +72,5 @@ export interface ThemeProviderProps<Theme = DefaultTheme> extends ThemeProviderC
|
|
|
72
72
|
export default function ThemeProvider<Theme = DefaultTheme>({
|
|
73
73
|
theme,
|
|
74
74
|
...props
|
|
75
|
-
}: ThemeProviderProps<Theme>):
|
|
75
|
+
}: ThemeProviderProps<Theme>): import("react/jsx-runtime").JSX.Element;
|
|
76
76
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { SupportedColorScheme } from "./createThemeWithVars.js";
|
|
3
2
|
declare const useColorScheme: () => import("@mui/system").ColorSchemeContextValue<SupportedColorScheme>, deprecatedGetInitColorSchemeScript: typeof import("@mui/system/InitColorSchemeScript").default;
|
|
4
|
-
declare function Experimental_CssVarsProvider(props: any):
|
|
3
|
+
declare function Experimental_CssVarsProvider(props: any): import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
declare const getInitColorSchemeScript: typeof deprecatedGetInitColorSchemeScript;
|
|
6
5
|
/**
|
|
7
6
|
* TODO: remove this export in v7
|
|
@@ -26,7 +25,7 @@ declare const getInitColorSchemeScript: typeof deprecatedGetInitColorSchemeScrip
|
|
|
26
25
|
*
|
|
27
26
|
* To see the full documentation, check out https://mui.com/material-ui/customization/css-theme-variables/usage/.
|
|
28
27
|
*/
|
|
29
|
-
export declare const CssVarsProvider: (props:
|
|
28
|
+
export declare const CssVarsProvider: (props: import("react").PropsWithChildren<Partial<import("@mui/system").CssVarsProviderConfig<SupportedColorScheme>> & {
|
|
30
29
|
theme?: {
|
|
31
30
|
cssVariables?: false;
|
|
32
31
|
cssVarPrefix?: string;
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
5
|
Object.defineProperty(exports, "__esModule", {
|
|
7
6
|
value: true
|
|
8
7
|
});
|
|
9
8
|
exports.CssVarsProvider = void 0;
|
|
10
9
|
exports.Experimental_CssVarsProvider = Experimental_CssVarsProvider;
|
|
11
10
|
exports.useColorScheme = exports.getInitColorSchemeScript = void 0;
|
|
12
|
-
var React = _interopRequireWildcard(require("react"));
|
|
13
11
|
var _styleFunctionSx = _interopRequireDefault(require("@mui/system/styleFunctionSx"));
|
|
14
12
|
var _system = require("@mui/system");
|
|
15
13
|
var _createTheme = _interopRequireDefault(require("./createTheme"));
|
package/styles/createTheme.d.ts
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
|
+
import { PaletteOptions } from "./createPalette.js";
|
|
2
|
+
import { ColorSystemOptions } from "./createThemeFoundation.js";
|
|
1
3
|
import { CssVarsThemeOptions } from "./createThemeWithVars.js";
|
|
2
|
-
import { Theme,
|
|
3
|
-
export type {
|
|
4
|
+
import { Theme, CssThemeVariables } from "./createThemeNoVars.js";
|
|
5
|
+
export type { Theme, CssThemeVariables } from "./createThemeNoVars.js";
|
|
6
|
+
type CssVarsOptions = CssThemeVariables extends {
|
|
7
|
+
enabled: true;
|
|
8
|
+
} ? ColorSystemOptions : {};
|
|
9
|
+
type CssVarsConfigList = 'colorSchemeSelector' | 'rootSelector' | 'disableCssColorScheme' | 'cssVarPrefix' | 'shouldSkipGeneratingVar' | 'nativeColor';
|
|
10
|
+
export interface ThemeOptions extends CssVarsOptions, Omit<CssVarsThemeOptions, CssVarsConfigList> {
|
|
11
|
+
cssVariables?: boolean | Pick<CssVarsThemeOptions, CssVarsConfigList>;
|
|
12
|
+
palette?: PaletteOptions;
|
|
13
|
+
}
|
|
4
14
|
/**
|
|
5
15
|
* Generate a theme base on the options received.
|
|
6
16
|
* @param options Takes an incomplete theme object and adds the missing parts.
|
|
7
17
|
* @param args Deep merge the arguments with the about to be returned theme.
|
|
8
18
|
* @returns A complete, ready-to-use theme object.
|
|
9
19
|
*/
|
|
10
|
-
export default function createTheme(options?:
|
|
11
|
-
cssVariables?: boolean | Pick<CssVarsThemeOptions, 'colorSchemeSelector' | 'rootSelector' | 'disableCssColorScheme' | 'cssVarPrefix' | 'shouldSkipGeneratingVar' | 'nativeColor'>;
|
|
12
|
-
},
|
|
20
|
+
export default function createTheme(options?: ThemeOptions,
|
|
13
21
|
// cast type to skip module augmentation test
|
|
14
22
|
...args: object[]): Theme;
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
2
|
+
import { SxConfig, SxProps, CSSObject, ApplyStyles, Theme as SystemTheme, Shape as SystemShape, ShapeOptions as SystemShapeOptions } from '@mui/system';
|
|
3
|
+
import { ExtractTypographyTokens } from '@mui/system/cssVars';
|
|
4
|
+
import { Palette, PaletteOptions } from "./createPalette.js";
|
|
5
|
+
import { Shadows } from "./shadows.js";
|
|
6
|
+
import { Transitions } from "./createTransitions.js";
|
|
7
|
+
import { Mixins } from "./createMixins.js";
|
|
8
|
+
import { TypographyVariants } from "./createTypography.js";
|
|
9
|
+
import { ZIndex } from "./zIndex.js";
|
|
10
|
+
/**
|
|
11
|
+
* default MD color-schemes
|
|
12
|
+
*/
|
|
13
|
+
export type DefaultColorScheme = 'light' | 'dark';
|
|
14
|
+
/**
|
|
15
|
+
* The application can add more color-scheme by extending this interface via module augmentation
|
|
16
|
+
*
|
|
17
|
+
* Ex.
|
|
18
|
+
* declare module @mui/material/styles {
|
|
19
|
+
* interface ColorSchemeOverrides {
|
|
20
|
+
* foo: true;
|
|
21
|
+
* }
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* // SupportedColorScheme = 'light' | 'dark' | 'foo';
|
|
25
|
+
*/
|
|
26
|
+
export interface ColorSchemeOverrides {}
|
|
27
|
+
export type ExtendedColorScheme = OverridableStringUnion<never, ColorSchemeOverrides>;
|
|
28
|
+
/**
|
|
29
|
+
* All color-schemes that the application has
|
|
30
|
+
*/
|
|
31
|
+
export type SupportedColorScheme = DefaultColorScheme | ExtendedColorScheme;
|
|
32
|
+
export interface Opacity {
|
|
33
|
+
inputPlaceholder: number;
|
|
34
|
+
inputUnderline: number;
|
|
35
|
+
switchTrackDisabled: number;
|
|
36
|
+
switchTrack: number;
|
|
37
|
+
}
|
|
38
|
+
export type Overlays = [string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined];
|
|
39
|
+
export interface PaletteBackgroundChannel {
|
|
40
|
+
defaultChannel: string;
|
|
41
|
+
paperChannel: string;
|
|
42
|
+
}
|
|
43
|
+
export interface PaletteCommonChannel {
|
|
44
|
+
background: string;
|
|
45
|
+
backgroundChannel: string;
|
|
46
|
+
onBackground: string;
|
|
47
|
+
onBackgroundChannel: string;
|
|
48
|
+
}
|
|
49
|
+
export interface PaletteColorChannel {
|
|
50
|
+
mainChannel: string;
|
|
51
|
+
lightChannel: string;
|
|
52
|
+
darkChannel: string;
|
|
53
|
+
contrastTextChannel: string;
|
|
54
|
+
}
|
|
55
|
+
export interface PaletteActionChannel {
|
|
56
|
+
activeChannel: string;
|
|
57
|
+
selectedChannel: string;
|
|
58
|
+
}
|
|
59
|
+
export interface PaletteTextChannel {
|
|
60
|
+
primaryChannel: string;
|
|
61
|
+
secondaryChannel: string;
|
|
62
|
+
}
|
|
63
|
+
export interface PaletteAlert {
|
|
64
|
+
errorColor: string;
|
|
65
|
+
infoColor: string;
|
|
66
|
+
successColor: string;
|
|
67
|
+
warningColor: string;
|
|
68
|
+
errorFilledBg: string;
|
|
69
|
+
infoFilledBg: string;
|
|
70
|
+
successFilledBg: string;
|
|
71
|
+
warningFilledBg: string;
|
|
72
|
+
errorFilledColor: string;
|
|
73
|
+
infoFilledColor: string;
|
|
74
|
+
successFilledColor: string;
|
|
75
|
+
warningFilledColor: string;
|
|
76
|
+
errorStandardBg: string;
|
|
77
|
+
infoStandardBg: string;
|
|
78
|
+
successStandardBg: string;
|
|
79
|
+
warningStandardBg: string;
|
|
80
|
+
errorIconColor: string;
|
|
81
|
+
infoIconColor: string;
|
|
82
|
+
successIconColor: string;
|
|
83
|
+
warningIconColor: string;
|
|
84
|
+
}
|
|
85
|
+
export interface PaletteAppBar {
|
|
86
|
+
defaultBg: string;
|
|
87
|
+
darkBg: string;
|
|
88
|
+
darkColor: string;
|
|
89
|
+
}
|
|
90
|
+
export interface PaletteAvatar {
|
|
91
|
+
defaultBg: string;
|
|
92
|
+
}
|
|
93
|
+
export interface PaletteButton {
|
|
94
|
+
inheritContainedBg: string;
|
|
95
|
+
inheritContainedHoverBg: string;
|
|
96
|
+
}
|
|
97
|
+
export interface PaletteChip {
|
|
98
|
+
defaultBorder: string;
|
|
99
|
+
defaultAvatarColor: string;
|
|
100
|
+
defaultIconColor: string;
|
|
101
|
+
}
|
|
102
|
+
export interface PaletteFilledInput {
|
|
103
|
+
bg: string;
|
|
104
|
+
hoverBg: string;
|
|
105
|
+
disabledBg: string;
|
|
106
|
+
}
|
|
107
|
+
export interface PaletteLinearProgress {
|
|
108
|
+
primaryBg: string;
|
|
109
|
+
secondaryBg: string;
|
|
110
|
+
errorBg: string;
|
|
111
|
+
infoBg: string;
|
|
112
|
+
successBg: string;
|
|
113
|
+
warningBg: string;
|
|
114
|
+
}
|
|
115
|
+
export interface PaletteSkeleton {
|
|
116
|
+
bg: string;
|
|
117
|
+
}
|
|
118
|
+
export interface PaletteSlider {
|
|
119
|
+
primaryTrack: string;
|
|
120
|
+
secondaryTrack: string;
|
|
121
|
+
errorTrack: string;
|
|
122
|
+
infoTrack: string;
|
|
123
|
+
successTrack: string;
|
|
124
|
+
warningTrack: string;
|
|
125
|
+
}
|
|
126
|
+
export interface PaletteSnackbarContent {
|
|
127
|
+
bg: string;
|
|
128
|
+
color: string;
|
|
129
|
+
}
|
|
130
|
+
export interface PaletteSpeedDialAction {
|
|
131
|
+
fabHoverBg: string;
|
|
132
|
+
}
|
|
133
|
+
export interface PaletteStepConnector {
|
|
134
|
+
border: string;
|
|
135
|
+
}
|
|
136
|
+
export interface PaletteStepContent {
|
|
137
|
+
border: string;
|
|
138
|
+
}
|
|
139
|
+
export interface PaletteSwitch {
|
|
140
|
+
defaultColor: string;
|
|
141
|
+
defaultDisabledColor: string;
|
|
142
|
+
primaryDisabledColor: string;
|
|
143
|
+
secondaryDisabledColor: string;
|
|
144
|
+
errorDisabledColor: string;
|
|
145
|
+
infoDisabledColor: string;
|
|
146
|
+
successDisabledColor: string;
|
|
147
|
+
warningDisabledColor: string;
|
|
148
|
+
}
|
|
149
|
+
export interface PaletteTableCell {
|
|
150
|
+
border: string;
|
|
151
|
+
}
|
|
152
|
+
export interface PaletteTooltip {
|
|
153
|
+
bg: string;
|
|
154
|
+
}
|
|
155
|
+
export interface Shape extends SystemShape {}
|
|
156
|
+
export interface ShapeOptions extends SystemShapeOptions {}
|
|
157
|
+
export interface ColorSystemOptions {
|
|
158
|
+
palette?: PaletteOptions & {
|
|
159
|
+
background?: Partial<PaletteBackgroundChannel>;
|
|
160
|
+
common?: Partial<PaletteCommonChannel>;
|
|
161
|
+
primary?: Partial<PaletteColorChannel>;
|
|
162
|
+
secondary?: Partial<PaletteColorChannel>;
|
|
163
|
+
error?: Partial<PaletteColorChannel>;
|
|
164
|
+
info?: Partial<PaletteColorChannel>;
|
|
165
|
+
success?: Partial<PaletteColorChannel>;
|
|
166
|
+
text?: Partial<PaletteTextChannel>;
|
|
167
|
+
dividerChannel?: Partial<string>;
|
|
168
|
+
action?: Partial<PaletteActionChannel>;
|
|
169
|
+
Alert?: Partial<PaletteAlert>;
|
|
170
|
+
AppBar?: Partial<PaletteAppBar>;
|
|
171
|
+
Avatar?: Partial<PaletteAvatar>;
|
|
172
|
+
Button?: Partial<PaletteButton>;
|
|
173
|
+
Chip?: Partial<PaletteChip>;
|
|
174
|
+
FilledInput?: Partial<PaletteFilledInput>;
|
|
175
|
+
LinearProgress?: Partial<PaletteLinearProgress>;
|
|
176
|
+
Skeleton?: Partial<PaletteSkeleton>;
|
|
177
|
+
Slider?: Partial<PaletteSlider>;
|
|
178
|
+
SnackbarContent?: Partial<PaletteSnackbarContent>;
|
|
179
|
+
SpeedDialAction?: Partial<PaletteSpeedDialAction>;
|
|
180
|
+
StepConnector?: Partial<PaletteStepConnector>;
|
|
181
|
+
StepContent?: Partial<PaletteStepContent>;
|
|
182
|
+
Switch?: Partial<PaletteSwitch>;
|
|
183
|
+
TableCell?: Partial<PaletteTableCell>;
|
|
184
|
+
Tooltip?: Partial<PaletteTooltip>;
|
|
185
|
+
};
|
|
186
|
+
opacity?: Partial<Opacity>;
|
|
187
|
+
overlays?: Overlays;
|
|
188
|
+
}
|
|
189
|
+
export interface CssVarsPalette {
|
|
190
|
+
common: PaletteCommonChannel;
|
|
191
|
+
primary: PaletteColorChannel;
|
|
192
|
+
secondary: PaletteColorChannel;
|
|
193
|
+
error: PaletteColorChannel;
|
|
194
|
+
info: PaletteColorChannel;
|
|
195
|
+
success: PaletteColorChannel;
|
|
196
|
+
warning: PaletteColorChannel;
|
|
197
|
+
text: PaletteTextChannel;
|
|
198
|
+
background: PaletteBackgroundChannel;
|
|
199
|
+
dividerChannel: string;
|
|
200
|
+
action: PaletteActionChannel;
|
|
201
|
+
Alert: PaletteAlert;
|
|
202
|
+
AppBar: PaletteAppBar;
|
|
203
|
+
Avatar: PaletteAvatar;
|
|
204
|
+
Button: PaletteButton;
|
|
205
|
+
Chip: PaletteChip;
|
|
206
|
+
FilledInput: PaletteFilledInput;
|
|
207
|
+
LinearProgress: PaletteLinearProgress;
|
|
208
|
+
Skeleton: PaletteSkeleton;
|
|
209
|
+
Slider: PaletteSlider;
|
|
210
|
+
SnackbarContent: PaletteSnackbarContent;
|
|
211
|
+
SpeedDialAction: PaletteSpeedDialAction;
|
|
212
|
+
StepConnector: PaletteStepConnector;
|
|
213
|
+
StepContent: PaletteStepContent;
|
|
214
|
+
Switch: PaletteSwitch;
|
|
215
|
+
TableCell: PaletteTableCell;
|
|
216
|
+
Tooltip: PaletteTooltip;
|
|
217
|
+
}
|
|
218
|
+
export interface ColorSystem {
|
|
219
|
+
palette: Palette & CssVarsPalette;
|
|
220
|
+
opacity: Opacity;
|
|
221
|
+
overlays: Overlays;
|
|
222
|
+
}
|
|
223
|
+
export interface ThemeVars {
|
|
224
|
+
font: ExtractTypographyTokens<TypographyVariants>;
|
|
225
|
+
palette: Omit<ColorSystem['palette'], 'colorScheme' | 'mode' | 'contrastThreshold' | 'tonalOffset' | 'getContrastText' | 'augmentColor'>;
|
|
226
|
+
opacity: Opacity;
|
|
227
|
+
overlays: Overlays;
|
|
228
|
+
shadows: Shadows;
|
|
229
|
+
shape: Shape;
|
|
230
|
+
spacing: string;
|
|
231
|
+
zIndex: ZIndex;
|
|
232
|
+
}
|
|
233
|
+
type Split<T, K extends keyof T = keyof T> = K extends string | number ? { [k in K]: Exclude<T[K], undefined> } : never;
|
|
234
|
+
type ConcatDeep<T> = T extends Record<string | number, infer V> ? keyof T extends string | number ? V extends string | number ? keyof T : keyof V extends string | number ? `${keyof T}-${ConcatDeep<Split<V>>}` : never : never : never;
|
|
235
|
+
/**
|
|
236
|
+
* Does not work for these cases:
|
|
237
|
+
* - { borderRadius: string | number } // the value can't be a union
|
|
238
|
+
* - { shadows: [string, string, ..., string] } // the value can't be an array
|
|
239
|
+
*/
|
|
240
|
+
type NormalizeVars<T> = ConcatDeep<Split<T>>;
|
|
241
|
+
export {};
|
|
242
|
+
export interface ThemeCssVarOverrides {}
|
|
243
|
+
export type ThemeCssVar = OverridableStringUnion<NormalizeVars<Omit<ThemeVars, 'overlays' | 'shadows' | 'shape'>> | 'shape-borderRadius' | 'shadows-0' | 'shadows-1' | 'shadows-2' | 'shadows-3' | 'shadows-4' | 'shadows-5' | 'shadows-6' | 'shadows-7' | 'shadows-8' | 'shadows-9' | 'shadows-10' | 'shadows-11' | 'shadows-12' | 'shadows-13' | 'shadows-14' | 'shadows-15' | 'shadows-16' | 'shadows-17' | 'shadows-18' | 'shadows-19' | 'shadows-20' | 'shadows-21' | 'shadows-22' | 'shadows-23' | 'shadows-24' | 'overlays-0' | 'overlays-1' | 'overlays-2' | 'overlays-3' | 'overlays-4' | 'overlays-5' | 'overlays-6' | 'overlays-7' | 'overlays-8' | 'overlays-9' | 'overlays-10' | 'overlays-11' | 'overlays-12' | 'overlays-13' | 'overlays-14' | 'overlays-15' | 'overlays-16' | 'overlays-17' | 'overlays-18' | 'overlays-19' | 'overlays-20' | 'overlays-21' | 'overlays-22' | 'overlays-23' | 'overlays-24', ThemeCssVarOverrides>;
|
|
244
|
+
/**
|
|
245
|
+
* Theme properties generated by extendTheme and CssVarsProvider
|
|
246
|
+
*/
|
|
247
|
+
export interface CssVarsTheme extends ColorSystem {
|
|
248
|
+
colorSchemes: Partial<Record<SupportedColorScheme, ColorSystem>>;
|
|
249
|
+
rootSelector: string;
|
|
250
|
+
colorSchemeSelector: 'media' | 'class' | 'data' | string;
|
|
251
|
+
cssVarPrefix: string;
|
|
252
|
+
defaultColorScheme: SupportedColorScheme;
|
|
253
|
+
vars: ThemeVars;
|
|
254
|
+
getCssVar: (field: ThemeCssVar, ...vars: ThemeCssVar[]) => string;
|
|
255
|
+
getColorSchemeSelector: (colorScheme: SupportedColorScheme) => string;
|
|
256
|
+
generateThemeVars: () => ThemeVars;
|
|
257
|
+
generateStyleSheets: () => Array<Record<string, any>>;
|
|
258
|
+
generateSpacing: () => SystemTheme['spacing'];
|
|
259
|
+
spacing: SystemTheme['spacing'];
|
|
260
|
+
breakpoints: SystemTheme['breakpoints'];
|
|
261
|
+
shape: Shape;
|
|
262
|
+
typography: TypographyVariants;
|
|
263
|
+
transitions: Transitions;
|
|
264
|
+
shadows: Shadows;
|
|
265
|
+
mixins: Mixins;
|
|
266
|
+
zIndex: ZIndex;
|
|
267
|
+
direction: SystemTheme['direction'];
|
|
268
|
+
/**
|
|
269
|
+
* A function to determine if the key, value should be attached as CSS Variable
|
|
270
|
+
* `keys` is an array that represents the object path keys.
|
|
271
|
+
* Ex, if the theme is { foo: { bar: 'var(--test)' } }
|
|
272
|
+
* then, keys = ['foo', 'bar']
|
|
273
|
+
* value = 'var(--test)'
|
|
274
|
+
*/
|
|
275
|
+
shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
|
|
276
|
+
unstable_sxConfig: SxConfig;
|
|
277
|
+
unstable_sx: (props: SxProps<CssVarsTheme>) => CSSObject;
|
|
278
|
+
applyStyles: ApplyStyles<SupportedColorScheme>;
|
|
279
|
+
}
|
|
@@ -6,7 +6,7 @@ import { Shadows } from "./shadows.js";
|
|
|
6
6
|
import { Transitions, TransitionsOptions } from "./createTransitions.js";
|
|
7
7
|
import { ZIndex, ZIndexOptions } from "./zIndex.js";
|
|
8
8
|
import { Components } from "./components.js";
|
|
9
|
-
import { CssVarsTheme, CssVarsPalette, ColorSystemOptions } from "./
|
|
9
|
+
import { CssVarsTheme, CssVarsPalette, ColorSystemOptions, Shape, ShapeOptions } from "./createThemeFoundation.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* To disable custom properties, use module augmentation
|
|
@@ -27,6 +27,7 @@ export interface ThemeOptions extends Omit<SystemThemeOptions, 'zIndex'>, CssVar
|
|
|
27
27
|
components?: Components<Omit<Theme, 'components'>>;
|
|
28
28
|
palette?: PaletteOptions;
|
|
29
29
|
shadows?: Shadows;
|
|
30
|
+
shape?: ShapeOptions;
|
|
30
31
|
transitions?: TransitionsOptions;
|
|
31
32
|
typography?: TypographyVariantsOptions | ((palette: Palette) => TypographyVariantsOptions);
|
|
32
33
|
zIndex?: ZIndexOptions;
|
|
@@ -40,6 +41,7 @@ export interface BaseTheme extends SystemTheme {
|
|
|
40
41
|
enabled: true;
|
|
41
42
|
} ? CssVarsPalette : {});
|
|
42
43
|
shadows: Shadows;
|
|
44
|
+
shape: Shape;
|
|
43
45
|
transitions: Transitions;
|
|
44
46
|
typography: TypographyVariants;
|
|
45
47
|
zIndex: ZIndex;
|