@mui/docs 9.0.0-alpha.4 → 9.0.0-beta.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.
Files changed (61) hide show
  1. package/ApiPage/ApiWarningAlert.d.ts +10 -0
  2. package/ApiPage/ApiWarningAlert.js +22 -0
  3. package/ApiPage/definitions/classes.d.ts +18 -0
  4. package/ApiPage/definitions/classes.js +54 -0
  5. package/ApiPage/definitions/index.d.ts +4 -0
  6. package/ApiPage/definitions/index.js +4 -0
  7. package/ApiPage/definitions/properties.d.ts +58 -0
  8. package/ApiPage/definitions/properties.js +110 -0
  9. package/ApiPage/definitions/slots.d.ts +16 -0
  10. package/ApiPage/definitions/slots.js +39 -0
  11. package/ApiPage/definitions/types.d.ts +53 -0
  12. package/ApiPage/definitions/types.js +1 -0
  13. package/ApiPage/index.d.ts +2 -0
  14. package/ApiPage/index.js +2 -0
  15. package/ApiPage/list/ClassesList.d.ts +11 -0
  16. package/ApiPage/list/ClassesList.js +103 -0
  17. package/ApiPage/list/ExpandableApiItem.d.ts +18 -0
  18. package/ApiPage/list/ExpandableApiItem.js +241 -0
  19. package/ApiPage/list/PropertiesList.d.ts +7 -0
  20. package/ApiPage/list/PropertiesList.js +263 -0
  21. package/ApiPage/list/SlotsList.d.ts +7 -0
  22. package/ApiPage/list/SlotsList.js +93 -0
  23. package/ApiPage/list/index.d.ts +1 -0
  24. package/ApiPage/list/index.js +1 -0
  25. package/ApiPage/private.d.ts +3 -0
  26. package/ApiPage/private.js +3 -0
  27. package/ApiPage/sections/ClassesSection.d.ts +34 -0
  28. package/ApiPage/sections/ClassesSection.js +76 -0
  29. package/ApiPage/sections/PropertiesSection.d.ts +45 -0
  30. package/ApiPage/sections/PropertiesSection.js +59 -0
  31. package/ApiPage/sections/SlotsSection.d.ts +24 -0
  32. package/ApiPage/sections/SlotsSection.js +61 -0
  33. package/ApiPage/sections/ToggleDisplayOption.d.ts +17 -0
  34. package/ApiPage/sections/ToggleDisplayOption.js +158 -0
  35. package/ApiPage/sections/index.d.ts +4 -0
  36. package/ApiPage/sections/index.js +4 -0
  37. package/ApiPage/table/ClassesTable.d.ts +7 -0
  38. package/ApiPage/table/ClassesTable.js +116 -0
  39. package/ApiPage/table/PropertiesTable.d.ts +6 -0
  40. package/ApiPage/table/PropertiesTable.js +286 -0
  41. package/ApiPage/table/SlotsTable.d.ts +6 -0
  42. package/ApiPage/table/SlotsTable.js +126 -0
  43. package/ApiPage/table/StyledTableContainer.d.ts +1 -0
  44. package/ApiPage/table/StyledTableContainer.js +42 -0
  45. package/ApiPage/types.d.ts +11 -0
  46. package/ApiPage/types.js +1 -0
  47. package/CHANGELOG.md +71 -4
  48. package/DocsApp/AnalyticsProvider.js +10 -6
  49. package/DocsApp/consoleBanner.js +0 -1
  50. package/DocsApp/createGetInitialProps.js +1 -1
  51. package/DocsApp/loadDependencies.js +0 -2
  52. package/DocsApp/reportWebVitals.js +0 -2
  53. package/DocsApp/serviceWorker.js +0 -2
  54. package/Document/Document.js +2 -2
  55. package/Document/getInitialProps.js +0 -2
  56. package/InfoCard/InfoCard.js +9 -5
  57. package/Link/SkipLink.js +1 -3
  58. package/NextNProgressBar/NextNProgressBar.js +0 -2
  59. package/branding/brandingTheme.js +3 -3
  60. package/package.json +20 -9
  61. package/utils/index.js +0 -1
@@ -0,0 +1,241 @@
1
+ var _svg, _Divider;
2
+ import * as React from 'react';
3
+ import clsx from 'clsx';
4
+ import { alpha, styled } from '@mui/material/styles';
5
+ import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
6
+ import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
7
+ import Divider from '@mui/material/Divider';
8
+ import IconButton from '@mui/material/IconButton';
9
+ import { brandingDarkTheme as darkTheme, brandingLightTheme as lightTheme } from "../../branding/index.js";
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ const Root = styled('div')(({
12
+ theme
13
+ }) => ({
14
+ position: 'relative',
15
+ marginBottom: 12,
16
+ '& .MuiApi-item-header': {
17
+ display: 'flex',
18
+ alignItems: 'center',
19
+ marginBottom: 8,
20
+ marginLeft: -38,
21
+ lineHeight: 1.5
22
+ },
23
+ '& .MuiApi-item-header-link': {
24
+ minHeight: 26,
25
+ display: 'flex',
26
+ alignItems: 'center',
27
+ scrollMarginTop: 'calc(var(--MuiDocs-header-height) + 32px)'
28
+ },
29
+ '& .MuiApi-item-link-visual': {
30
+ display: 'none',
31
+ flexShrink: 0,
32
+ border: '1px solid',
33
+ borderColor: `var(--muidocs-palette-divider, ${lightTheme.palette.divider})`,
34
+ borderRadius: 8,
35
+ backgroundColor: `var(--muidocs-palette-primary-50, ${lightTheme.palette.primary[50]})`,
36
+ height: 26,
37
+ width: 26,
38
+ textAlign: 'center',
39
+ lineHeight: '26px',
40
+ '& svg': {
41
+ fill: `var(--muidocs-palette-text-secondary, ${lightTheme.palette.text.secondary})`,
42
+ height: '14px',
43
+ width: '14px'
44
+ }
45
+ },
46
+ '& .MuiApi-item-title': {
47
+ marginLeft: 32,
48
+ padding: '2px 6px',
49
+ flexShrink: 0,
50
+ fontWeight: theme.typography.fontWeightSemiBold,
51
+ fontFamily: theme.typography.fontFamilyCode,
52
+ fontSize: theme.typography.pxToRem(13),
53
+ color: `var(--muidocs-palette-primary-600, ${lightTheme.palette.primary[600]})`
54
+ },
55
+ '& .MuiApi-item-content': {
56
+ verticalAlign: 'top',
57
+ paddingBottom: theme.spacing(2),
58
+ p: {
59
+ marginBottom: theme.spacing(1.5)
60
+ }
61
+ },
62
+ '& .MuiApi-item-note': {
63
+ marginLeft: 2,
64
+ color: `var(--muidocs-palette-success-800, ${lightTheme.palette.success[800]})`,
65
+ fontSize: theme.typography.pxToRem(11),
66
+ fontWeight: theme.typography.fontWeightSemiBold,
67
+ letterSpacing: '.1rem',
68
+ textTransform: 'uppercase'
69
+ },
70
+ '& .MuiApi-expand-button': {},
71
+ '& hr': {
72
+ margin: 0
73
+ },
74
+ [theme.breakpoints.up('lg')]: {
75
+ '&:hover, &:target': {
76
+ '.MuiApi-item-link-visual': {
77
+ display: 'inline-block'
78
+ },
79
+ '.MuiApi-item-title': {
80
+ marginLeft: 6
81
+ },
82
+ '.MuiApi-item-link-visual:hover': {
83
+ cursor: 'pointer',
84
+ backgroundColor: alpha(lightTheme.palette.primary[100], 0.4),
85
+ borderColor: `var(--muidocs-palette-primary-100, ${lightTheme.palette.primary[100]})`,
86
+ '& svg': {
87
+ fill: `var(--muidocs-palette-primary-main, ${lightTheme.palette.primary.main})`
88
+ }
89
+ }
90
+ },
91
+ '&:target': {
92
+ '.MuiApi-item-link-visual': {
93
+ '&>svg': {
94
+ transform: 'rotate(90deg) translateX(-0.5px) translateY(0.1px)'
95
+ }
96
+ }
97
+ }
98
+ },
99
+ '& code.Api-code': {
100
+ ...theme.typography.caption,
101
+ fontFamily: theme.typography.fontFamilyCode,
102
+ fontWeight: theme.typography.fontWeightRegular,
103
+ color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`,
104
+ padding: '1px 4px',
105
+ borderRadius: 6,
106
+ border: '1px solid',
107
+ borderColor: alpha(darkTheme.palette.primary[100], 0.8),
108
+ backgroundColor: `var(--muidocs-palette-primary-50, ${lightTheme.palette.primary[50]})`
109
+ },
110
+ '& .signature-type': {
111
+ textDecoration: 'underline',
112
+ textDecorationStyle: 'dotted',
113
+ textDecorationColor: alpha(lightTheme.palette.primary.main, 0.4),
114
+ fontWeight: theme.typography.fontWeightMedium,
115
+ color: `var(--muidocs-palette-primary-600, ${lightTheme.palette.primary[600]})`,
116
+ '&:hover': {
117
+ textDecorationColor: 'inherit'
118
+ },
119
+ cursor: 'help'
120
+ }
121
+ }), ({
122
+ theme
123
+ }) => ({
124
+ [`:where(${theme.vars ? '[data-mui-color-scheme="dark"]' : '.mode-dark'}) &`]: {
125
+ '& .MuiApi-item-header': {
126
+ '&>span, &>div': {
127
+ borderColor: `var(--muidocs-palette-divider, ${darkTheme.palette.divider})`
128
+ },
129
+ '& .MuiApi-item-title': {
130
+ color: `var(--muidocs-palette-primary-200, ${darkTheme.palette.primary[200]})`
131
+ },
132
+ '& .MuiApi-item-link-visual': {
133
+ borderColor: `var(--muidocs-palette-divider, ${darkTheme.palette.divider})`,
134
+ backgroundColor: alpha(darkTheme.palette.primary[900], 0.5),
135
+ '& svg': {
136
+ fill: `var(--muidocs-palette-primary-200, ${darkTheme.palette.primary[200]})`
137
+ }
138
+ },
139
+ '&:hover, &:target': {
140
+ '.MuiApi-item-link-visual:hover': {
141
+ borderColor: `var(--muidocs-palette-primary-900, ${darkTheme.palette.primary[900]})`,
142
+ backgroundColor: alpha(darkTheme.palette.primary[900], 0.6),
143
+ '& svg': {
144
+ fill: `var(--muidocs-palette-primary-100, ${darkTheme.palette.primary[100]})`
145
+ }
146
+ }
147
+ },
148
+ '& .MuiApi-item-description': {
149
+ color: `var(--muidocs-palette-grey-500, ${darkTheme.palette.grey[500]})`
150
+ },
151
+ '& .MuiApi-item-note': {
152
+ color: `var(--muidocs-palette-success-400, ${darkTheme.palette.success[400]})`
153
+ }
154
+ },
155
+ '& code.Api-code': {
156
+ color: `var(--muidocs-palette-text-primary, ${darkTheme.palette.text.primary})`,
157
+ borderColor: `var(--muidocs-palette-divider, ${darkTheme.palette.divider})`,
158
+ backgroundColor: alpha(darkTheme.palette.primary[900], 0.3)
159
+ },
160
+ '& .signature-type': {
161
+ color: `var(--muidocs-palette-primary-200, ${darkTheme.palette.primary[200]})`,
162
+ textDecorationColor: alpha(darkTheme.palette.primary.main, 0.6)
163
+ }
164
+ }
165
+ }));
166
+ export function ExpandableApiItem(props) {
167
+ const {
168
+ children,
169
+ className,
170
+ description,
171
+ displayOption,
172
+ id,
173
+ isExtendable = true,
174
+ note,
175
+ title,
176
+ type,
177
+ ...other
178
+ } = props;
179
+ const [isExtended, setIsExtended] = React.useState(() => displayOption === 'expanded');
180
+ React.useEffect(() => {
181
+ setIsExtended(displayOption === 'expanded');
182
+ }, [displayOption]);
183
+ return /*#__PURE__*/_jsxs(Root, {
184
+ ownerState: {
185
+ type
186
+ },
187
+ ...other,
188
+ className: clsx(`MuiApi-item-root${isExtendable ? ' MuiApi-item-header-extendable' : ''}`, className),
189
+ children: [/*#__PURE__*/_jsxs("div", {
190
+ className: "MuiApi-item-header",
191
+ children: [/*#__PURE__*/_jsxs("div", {
192
+ className: "MuiApi-item-header-link",
193
+ id: id,
194
+ children: [/*#__PURE__*/_jsx("a", {
195
+ className: "MuiApi-item-link-visual",
196
+ href: `#${id}`,
197
+ "aria-labelledby": id,
198
+ children: _svg || (_svg = /*#__PURE__*/_jsx("svg", {
199
+ children: /*#__PURE__*/_jsx("use", {
200
+ xlinkHref: "#anchor-link-icon"
201
+ })
202
+ }))
203
+ }), /*#__PURE__*/_jsx("span", {
204
+ className: "MuiApi-item-title algolia-lvl3" // This className is used by Algolia
205
+ ,
206
+ children: title
207
+ })]
208
+ }), note && /*#__PURE__*/_jsx("span", {
209
+ className: "MuiApi-item-note",
210
+ children: note
211
+ }), isExtendable && /*#__PURE__*/_jsx(IconButton, {
212
+ onClick: () => setIsExtended(prev => !prev),
213
+ className: "MuiApi-expand-button",
214
+ "aria-label": isExtended ? 'Collapse' : 'Expand',
215
+ size: "small",
216
+ sx: {
217
+ p: 0,
218
+ ml: 'auto',
219
+ borderRadius: '6px'
220
+ },
221
+ children: isExtended ? /*#__PURE__*/_jsx(KeyboardArrowUpIcon, {
222
+ sx: {
223
+ color: 'grey.500'
224
+ }
225
+ }) : /*#__PURE__*/_jsx(KeyboardArrowDownIcon, {
226
+ sx: {
227
+ color: 'grey.500'
228
+ }
229
+ })
230
+ })]
231
+ }), isExtended && /*#__PURE__*/_jsx("div", {
232
+ className: `MuiApi-item-content`,
233
+ children: isExtended && children
234
+ }), _Divider || (_Divider = /*#__PURE__*/_jsx(Divider, {}))]
235
+ });
236
+ }
237
+ export const ApiItemContainer = styled('div')({
238
+ width: '100%',
239
+ display: 'flex',
240
+ flexDirection: 'column'
241
+ });
@@ -0,0 +1,7 @@
1
+ import { PropertyDefinition } from "../definitions/index.js";
2
+ interface PropertiesListProps {
3
+ properties: PropertyDefinition[];
4
+ displayOption: 'collapsed' | 'expanded';
5
+ }
6
+ export default function PropertiesList(props: PropertiesListProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,263 @@
1
+ var _a, _a2;
2
+ /* eslint-disable react/no-danger */
3
+ import * as React from 'react';
4
+ import { styled } from '@mui/material/styles';
5
+ import Tooltip from '@mui/material/Tooltip';
6
+ import { brandingDarkTheme as darkTheme, brandingLightTheme as lightTheme } from "../../branding/index.js";
7
+ import { useTranslate } from "../../i18n/index.js";
8
+ import { ApiItemContainer, ExpandableApiItem } from "./ExpandableApiItem.js";
9
+ import { ApiWarningAlert } from "../ApiWarningAlert.js";
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ const StyledApiItem = styled(ExpandableApiItem)(({
12
+ theme
13
+ }) => ({
14
+ '& .prop-list-description': {
15
+ marginBottom: 10
16
+ },
17
+ '& .prop-list-additional-info': {
18
+ display: 'flex',
19
+ flexDirection: 'column',
20
+ gap: 8,
21
+ '& > p': {
22
+ margin: 0
23
+ },
24
+ '& .prop-list-title': {
25
+ ...theme.typography.body2,
26
+ fontWeight: theme.typography.fontWeightSemiBold,
27
+ color: (theme.vars || theme).palette.text.primary,
28
+ paddingRight: 5,
29
+ whiteSpace: 'nowrap',
30
+ margin: 0
31
+ },
32
+ '& .default-value': {
33
+ fontSize: theme.typography.pxToRem(12)
34
+ }
35
+ },
36
+ '&.prop-list-deprecated-item': {
37
+ '& .MuiApi-item-note': {
38
+ color: `var(--muidocs-palette-warning-700, ${lightTheme.palette.warning[700]})`
39
+ }
40
+ },
41
+ '& .prop-list-alert': {
42
+ marginBottom: 16,
43
+ '& .MuiAlert-icon': {
44
+ margin: 0
45
+ }
46
+ },
47
+ '& .prop-list-default-props': {
48
+ ...theme.typography.body2,
49
+ fontWeight: theme.typography.fontWeightSemiBold
50
+ },
51
+ '& .prop-list-signature': {
52
+ p: {
53
+ ...theme.typography.body2,
54
+ fontWeight: theme.typography.fontWeightSemiBold,
55
+ marginBottom: 8
56
+ },
57
+ ul: {
58
+ paddingLeft: 24,
59
+ marginTop: 2,
60
+ marginBottom: 0
61
+ },
62
+ '& > code': {
63
+ borderRadius: 8,
64
+ padding: 12,
65
+ width: '100%',
66
+ marginBottom: 8,
67
+ color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[50]})`,
68
+ border: '1px solid',
69
+ borderColor: `var(--muidocs-palette-primaryDark-700, ${lightTheme.palette.primaryDark[700]})`,
70
+ backgroundColor: `var(--muidocs-palette-primaryDark-800, ${lightTheme.palette.primaryDark[800]})`
71
+ }
72
+ }
73
+ }), ({
74
+ theme
75
+ }) => ({
76
+ [`:where(${theme.vars ? '[data-mui-color-scheme="dark"]' : '.mode-dark'}) &`]: {
77
+ '& .prop-list-additional-info': {
78
+ '& .prop-list-title': {
79
+ p: {
80
+ color: `var(--muidocs-palette-grey-50, ${darkTheme.palette.grey[50]})`
81
+ }
82
+ }
83
+ },
84
+ '& .prop-list-default-props': {
85
+ color: `var(--muidocs-palette-grey-300, ${darkTheme.palette.grey[300]})`
86
+ },
87
+ '&.prop-list-deprecated-item': {
88
+ '& .MuiApi-item-note': {
89
+ color: `var(--muidocs-palette-warning-400, ${darkTheme.palette.warning[400]})`
90
+ }
91
+ }
92
+ }
93
+ }));
94
+ function PropDescription(props) {
95
+ const {
96
+ description
97
+ } = props;
98
+ const isUlPresent = description.includes('<ul>');
99
+ const ComponentToRender = isUlPresent ? 'div' : 'p';
100
+ return /*#__PURE__*/_jsx(ComponentToRender, {
101
+ className: "prop-list-description algolia-content" // This className is used by Algolia
102
+ ,
103
+ dangerouslySetInnerHTML: {
104
+ __html: description
105
+ }
106
+ });
107
+ }
108
+ export default function PropertiesList(props) {
109
+ const {
110
+ properties,
111
+ displayOption
112
+ } = props;
113
+ const t = useTranslate();
114
+ return /*#__PURE__*/_jsx(ApiItemContainer, {
115
+ children: properties.map(params => {
116
+ const {
117
+ propName,
118
+ seeMoreDescription,
119
+ description,
120
+ requiresRef,
121
+ isOptional,
122
+ isRequired,
123
+ isDeprecated,
124
+ isProPlan,
125
+ isPremiumPlan,
126
+ deprecationInfo,
127
+ typeName,
128
+ propDefault,
129
+ additionalInfo,
130
+ signature,
131
+ signatureArgs,
132
+ signatureReturnDescription,
133
+ hash
134
+ } = params;
135
+ let note = isOptional && t('api-docs.optional') || isRequired && t('api-docs.required') || '';
136
+ if (isDeprecated) {
137
+ note = [note, t('api-docs.deprecated')].filter(Boolean).join(' - ');
138
+ }
139
+ return /*#__PURE__*/_jsxs(StyledApiItem, {
140
+ id: hash,
141
+ title: /*#__PURE__*/_jsxs(React.Fragment, {
142
+ children: [propName, isProPlan && (_a || (_a = /*#__PURE__*/_jsx("a", {
143
+ href: "/x/introduction/licensing/#pro-plan",
144
+ "aria-label": "Pro plan",
145
+ children: /*#__PURE__*/_jsx("span", {
146
+ className: "plan-pro"
147
+ })
148
+ }))), isPremiumPlan && (_a2 || (_a2 = /*#__PURE__*/_jsx("a", {
149
+ href: "/x/introduction/licensing/#premium-plan",
150
+ "aria-label": "Premium plan",
151
+ children: /*#__PURE__*/_jsx("span", {
152
+ className: "plan-premium"
153
+ })
154
+ })))]
155
+ }),
156
+ note: note,
157
+ type: "props",
158
+ displayOption: displayOption,
159
+ className: isDeprecated ? 'prop-list-deprecated-item' : '',
160
+ children: [description && /*#__PURE__*/_jsx(PropDescription, {
161
+ description: description
162
+ }), seeMoreDescription && /*#__PURE__*/_jsx("p", {
163
+ dangerouslySetInnerHTML: {
164
+ __html: seeMoreDescription
165
+ }
166
+ }), requiresRef && /*#__PURE__*/_jsx(ApiWarningAlert, {
167
+ className: "MuiApi-collapsible prop-list-alert",
168
+ children: /*#__PURE__*/_jsx("span", {
169
+ dangerouslySetInnerHTML: {
170
+ __html: t('api-docs.requires-ref')
171
+ }
172
+ })
173
+ }), additionalInfo?.map(key => /*#__PURE__*/_jsx("p", {
174
+ className: "prop-list-additional-description MuiApi-collapsible",
175
+ dangerouslySetInnerHTML: {
176
+ __html: t(`api-docs.additional-info.${key}`)
177
+ }
178
+ }, key)), /*#__PURE__*/_jsxs("div", {
179
+ className: "prop-list-additional-info",
180
+ children: [typeName && /*#__PURE__*/_jsxs("p", {
181
+ className: "prop-list-type MuiApi-collapsible",
182
+ children: [/*#__PURE__*/_jsxs("span", {
183
+ className: "prop-list-title",
184
+ children: [t('api-docs.type'), ":"]
185
+ }), /*#__PURE__*/_jsx("code", {
186
+ className: "Api-code",
187
+ dangerouslySetInnerHTML: {
188
+ __html: typeName
189
+ }
190
+ })]
191
+ }), propDefault && /*#__PURE__*/_jsxs("p", {
192
+ className: "prop-list-default-props MuiApi-collapsible",
193
+ children: [/*#__PURE__*/_jsxs("span", {
194
+ className: "prop-list-title",
195
+ children: [t('api-docs.default'), ":"]
196
+ }), /*#__PURE__*/_jsx("code", {
197
+ className: "default-value",
198
+ children: propDefault
199
+ })]
200
+ }), signature && /*#__PURE__*/_jsxs("div", {
201
+ className: "prop-list-signature MuiApi-collapsible",
202
+ children: [/*#__PURE__*/_jsxs("span", {
203
+ className: "prop-list-title",
204
+ children: [t('api-docs.signature'), ":"]
205
+ }), /*#__PURE__*/_jsxs("div", {
206
+ className: "prop-list-content",
207
+ children: [/*#__PURE__*/_jsx("code", {
208
+ dangerouslySetInnerHTML: {
209
+ __html: signature
210
+ }
211
+ }), signatureArgs && /*#__PURE__*/_jsx("div", {
212
+ children: /*#__PURE__*/_jsx("ul", {
213
+ children: signatureArgs.map(({
214
+ argName,
215
+ argDescription,
216
+ argType,
217
+ argTypeDescription
218
+ }) => /*#__PURE__*/_jsxs("li", {
219
+ children: [/*#__PURE__*/_jsxs("code", {
220
+ children: [argName, argType && argTypeDescription && /*#__PURE__*/_jsxs("span", {
221
+ children: [":", ' ', /*#__PURE__*/_jsx(Tooltip, {
222
+ title: /*#__PURE__*/_jsx("span", {
223
+ dangerouslySetInnerHTML: {
224
+ __html: argTypeDescription
225
+ }
226
+ }),
227
+ children: /*#__PURE__*/_jsx("span", {
228
+ className: "signature-type",
229
+ children: argType
230
+ })
231
+ })]
232
+ })]
233
+ }), ' ', argDescription && /*#__PURE__*/_jsx("span", {
234
+ dangerouslySetInnerHTML: {
235
+ __html: argDescription
236
+ }
237
+ })]
238
+ }, argName))
239
+ })
240
+ }), signatureReturnDescription && /*#__PURE__*/_jsxs("p", {
241
+ children: [t('api-docs.returns'), /*#__PURE__*/_jsx("span", {
242
+ dangerouslySetInnerHTML: {
243
+ __html: signatureReturnDescription
244
+ }
245
+ })]
246
+ })]
247
+ })]
248
+ })]
249
+ }), isDeprecated && /*#__PURE__*/_jsxs(ApiWarningAlert, {
250
+ children: [/*#__PURE__*/_jsx("b", {
251
+ children: t('api-docs.deprecated')
252
+ }), deprecationInfo && /*#__PURE__*/_jsxs(React.Fragment, {
253
+ children: ['-', /*#__PURE__*/_jsx("span", {
254
+ dangerouslySetInnerHTML: {
255
+ __html: deprecationInfo
256
+ }
257
+ })]
258
+ })]
259
+ })]
260
+ }, propName);
261
+ })
262
+ });
263
+ }
@@ -0,0 +1,7 @@
1
+ import { SlotDefinition } from "../definitions/index.js";
2
+ interface SlotsListProps {
3
+ slots: SlotDefinition[];
4
+ displayOption: 'collapsed' | 'expanded';
5
+ }
6
+ export default function SlotsList(props: SlotsListProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,93 @@
1
+ import { alpha, styled } from '@mui/material/styles';
2
+ import { brandingDarkTheme as darkTheme, brandingLightTheme as lightTheme } from "../../branding/index.js";
3
+ import { useTranslate } from "../../i18n/index.js";
4
+ import { ApiItemContainer, ExpandableApiItem } from "./ExpandableApiItem.js";
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ const StyledApiItem = styled(ExpandableApiItem)(({
7
+ theme
8
+ }) => ({
9
+ '.slot-classname, .slot-default-element': {
10
+ marginBottom: 8,
11
+ '& .prop-list-title': {
12
+ ...theme.typography.body2,
13
+ fontWeight: theme.typography.fontWeightSemiBold,
14
+ color: (theme.vars || theme).palette.text.primary
15
+ }
16
+ },
17
+ '& .default-slot-value': {
18
+ ...theme.typography.caption,
19
+ fontFamily: theme.typography.fontFamilyCode,
20
+ fontWeight: theme.typography.fontWeightRegular
21
+ },
22
+ '& .global-class-value': {
23
+ ...theme.typography.caption,
24
+ fontFamily: theme.typography.fontFamilyCode,
25
+ fontWeight: theme.typography.fontWeightRegular,
26
+ borderColor: alpha(darkTheme.palette.primary[100], 0.5),
27
+ backgroundColor: `var(--muidocs-palette-primary-50, ${lightTheme.palette.primary[50]})`
28
+ }
29
+ }), ({
30
+ theme
31
+ }) => ({
32
+ [`:where(${theme.vars ? '[data-mui-color-scheme="dark"]' : '.mode-dark'}) &`]: {
33
+ '& .global-class-value': {
34
+ borderColor: alpha(darkTheme.palette.primary[400], 0.1),
35
+ backgroundColor: alpha(darkTheme.palette.primary[900], 0.4)
36
+ }
37
+ }
38
+ }));
39
+ export default function SlotsList(props) {
40
+ const {
41
+ slots,
42
+ displayOption
43
+ } = props;
44
+ const t = useTranslate();
45
+ return /*#__PURE__*/_jsx(ApiItemContainer, {
46
+ className: "MuiApi-slot-list",
47
+ children: slots.map(params => {
48
+ const {
49
+ description,
50
+ className,
51
+ name,
52
+ defaultValue,
53
+ hash
54
+ } = params;
55
+ const isExtendable = description || defaultValue || className;
56
+ return /*#__PURE__*/_jsxs(StyledApiItem, {
57
+ id: hash,
58
+ title: name,
59
+ note: "",
60
+ type: "slots",
61
+ isExtendable: !!isExtendable,
62
+ displayOption: displayOption,
63
+ children: [description && /*#__PURE__*/_jsx("p", {
64
+ // eslint-disable-next-line react/no-danger
65
+ dangerouslySetInnerHTML: {
66
+ __html: description
67
+ }
68
+ }), className && /*#__PURE__*/_jsxs("p", {
69
+ className: "slot-classname",
70
+ children: [/*#__PURE__*/_jsxs("span", {
71
+ className: "prop-list-title",
72
+ children: [t('api-docs.className'), ":"]
73
+ }), ' ', /*#__PURE__*/_jsx("code", {
74
+ // eslint-disable-next-line react/no-danger
75
+ dangerouslySetInnerHTML: {
76
+ __html: `.${className}`
77
+ },
78
+ className: "global-class-value"
79
+ })]
80
+ }), defaultValue && /*#__PURE__*/_jsxs("p", {
81
+ className: "slot-default-element",
82
+ children: [/*#__PURE__*/_jsxs("span", {
83
+ className: "prop-list-title",
84
+ children: [t('api-docs.defaultComponent'), ":"]
85
+ }), ' ', /*#__PURE__*/_jsx("code", {
86
+ className: "default-slot-value",
87
+ children: defaultValue
88
+ })]
89
+ })]
90
+ }, name);
91
+ })
92
+ });
93
+ }
@@ -0,0 +1 @@
1
+ export * from "./ExpandableApiItem.js";
@@ -0,0 +1 @@
1
+ export * from "./ExpandableApiItem.js";
@@ -0,0 +1,3 @@
1
+ export * from "./definitions/index.js";
2
+ export * from "./list/index.js";
3
+ export * from "./sections/index.js";
@@ -0,0 +1,3 @@
1
+ export * from "./definitions/index.js";
2
+ export * from "./list/index.js";
3
+ export * from "./sections/index.js";
@@ -0,0 +1,34 @@
1
+ import { PropsTranslations, ComponentClassDefinition } from '@mui-internal/api-docs-builder';
2
+ import type { ClassDefinition } from "../definitions/types.js";
3
+ import { ApiDisplayLayout } from "./ToggleDisplayOption.js";
4
+ export type ClassesSectionProps = ({
5
+ classes: ClassDefinition[];
6
+ componentClasses?: undefined;
7
+ classDescriptions?: undefined;
8
+ componentName?: undefined;
9
+ } | {
10
+ classes: undefined;
11
+ componentClasses: ComponentClassDefinition[];
12
+ classDescriptions: PropsTranslations['classDescriptions'];
13
+ componentName: string;
14
+ }) & {
15
+ spreadHint?: string;
16
+ /**
17
+ * The translation key of the section title.
18
+ * @default 'api-docs.classes'
19
+ */
20
+ title?: string;
21
+ /**
22
+ * @default 'classes'
23
+ */
24
+ titleHash?: string;
25
+ /**
26
+ * @default 'h2'
27
+ */
28
+ level?: 'h2' | 'h3' | 'h4';
29
+ defaultLayout: ApiDisplayLayout;
30
+ layoutStorageKey: string;
31
+ displayClassKeys?: boolean;
32
+ styleOverridesLink?: string;
33
+ };
34
+ export declare function ClassesSection(props: ClassesSectionProps): import("react/jsx-runtime").JSX.Element | null;