@mui/docs 6.0.0-alpha.5 → 6.0.0-alpha.7

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 (49) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/CodeCopy/CodeCopyButton.js +4 -11
  3. package/ComponentLinkHeader/ComponentLinkHeader.d.ts +9 -0
  4. package/ComponentLinkHeader/ComponentLinkHeader.js +179 -0
  5. package/ComponentLinkHeader/index.d.ts +2 -0
  6. package/ComponentLinkHeader/index.js +2 -0
  7. package/ComponentLinkHeader/package.json +6 -0
  8. package/InfoCard/InfoCard.d.ts +0 -1
  9. package/InfoCard/InfoCard.js +10 -8
  10. package/MarkdownElement/MarkdownElement.js +25 -33
  11. package/SectionTitle/SectionTitle.d.ts +7 -0
  12. package/SectionTitle/SectionTitle.js +30 -0
  13. package/SectionTitle/index.d.ts +1 -0
  14. package/SectionTitle/index.js +1 -0
  15. package/SectionTitle/package.json +6 -0
  16. package/branding/brandingTheme.js +2 -1
  17. package/node/CodeCopy/CodeCopyButton.js +4 -11
  18. package/node/ComponentLinkHeader/ComponentLinkHeader.js +189 -0
  19. package/node/ComponentLinkHeader/index.js +24 -0
  20. package/node/InfoCard/InfoCard.js +10 -8
  21. package/node/MarkdownElement/MarkdownElement.js +25 -33
  22. package/node/SectionTitle/SectionTitle.js +38 -0
  23. package/node/SectionTitle/index.js +16 -0
  24. package/node/branding/brandingTheme.js +2 -1
  25. package/node/svgIcons/AdobeXDIcon.js +22 -0
  26. package/node/svgIcons/BundleSizeIcon.js +22 -0
  27. package/node/svgIcons/FigmaIcon.js +31 -0
  28. package/node/svgIcons/MaterialDesignIcon.js +27 -0
  29. package/node/svgIcons/SketchIcon.js +36 -0
  30. package/node/svgIcons/W3CIcon.js +24 -0
  31. package/node/translations/translations.json +1 -0
  32. package/package.json +3 -3
  33. package/svgIcons/AdobeXDIcon.d.ts +4 -0
  34. package/svgIcons/AdobeXDIcon.js +14 -0
  35. package/svgIcons/BundleSizeIcon.d.ts +4 -0
  36. package/svgIcons/BundleSizeIcon.js +14 -0
  37. package/svgIcons/FigmaIcon.d.ts +4 -0
  38. package/svgIcons/FigmaIcon.js +23 -0
  39. package/svgIcons/FileDownload.d.ts +7 -0
  40. package/svgIcons/JavaScript.d.ts +7 -0
  41. package/svgIcons/MaterialDesignIcon.d.ts +4 -0
  42. package/svgIcons/MaterialDesignIcon.js +19 -0
  43. package/svgIcons/SketchIcon.d.ts +4 -0
  44. package/svgIcons/SketchIcon.js +28 -0
  45. package/svgIcons/TypeScript.d.ts +7 -0
  46. package/svgIcons/W3CIcon.d.ts +4 -0
  47. package/svgIcons/W3CIcon.js +16 -0
  48. package/translations/translations.json +1 -0
  49. package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,100 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## v6.0.0-alpha.7
4
+
5
+ <!-- generated comparing v6.0.0-alpha.6..next -->
6
+
7
+ _May 16, 2024_
8
+
9
+ A big thanks to the 14 contributors who made this release possible.
10
+
11
+ ### `@mui/material@6.0.0-alpha.7`
12
+
13
+ - &#8203;<!-- 23 -->[Autocomplete] Deprecate `componentsProps` props (#42179) @lhilgert9
14
+ - &#8203;<!-- 22 -->[Autocomplete] Improve design when there's a start adornment for small autocomplete (#41781) @TahaRhidouani
15
+ - &#8203;<!-- 21 -->[Autocomplete] deprecate `*Component` and `*Props` for v6 (#41875) @lhilgert9
16
+ - &#8203;<!-- 19 -->[CircularProgress] Deprecate composed classes (#42076) @sai6855
17
+ - &#8203;<!-- 05 -->[ToggleButtonGroup] Add missing `selected` class in ToggleButtonGroupClasses type (#42243) @tarunrajput
18
+
19
+ ### `@mui/codemod@6.0.0-alpha.6`
20
+
21
+ - &#8203;<!-- 18 -->[Divider] Only apply codemod if light prop is present (#42098) @DiegoAndai
22
+
23
+ ### Docs
24
+
25
+ - &#8203;<!-- 13 -->Fix 301 to Figma @oliviertassinari
26
+ - &#8203;<!-- 12 -->Fix use of deprecated React API (#42118) @oliviertassinari
27
+ - &#8203;<!-- 11 -->Remove the Base notification (#42191) @danilo-leal
28
+ - &#8203;<!-- 07 -->[material-ui] Improve descriptions for deprecated props (#42221) @aarongarciah
29
+ - &#8203;<!-- 06 -->[material-ui] Fix typo in composition docs (#42195) @aarongarciah
30
+
31
+ ### Core
32
+
33
+ - &#8203;<!-- 20 -->[blog] Introducing Pigment CSS blog post (#42198) @samuelsycamore
34
+ - &#8203;<!-- 17 -->[core] Remove confusing comment @oliviertassinari
35
+ - &#8203;<!-- 16 -->[core] Match other repositories and convention @oliviertassinari
36
+ - &#8203;<!-- 15 -->[core] Fix React 18.3 warnings about spreading keys in the Material UI `Autocomplete` component (#42099) @heath-freenome
37
+ - &#8203;<!-- 14 -->[core] Remove unecessary quotes @oliviertassinari
38
+ - &#8203;<!-- 10 -->[docs-infra] Share code for section title (#42236) @alexfauquette
39
+ - &#8203;<!-- 09 -->[docs-infra] Limit the copy button to the visible code block (#42115) @danilo-leal
40
+ - &#8203;<!-- 08 -->[docs-infra] Make select components with two capital letters (#42004) @alexfauquette
41
+ - &#8203;<!-- 08 -->[docs-infra][toolpad] Fix Page title and SERP title mismatch (#41919) @bharatkashyap
42
+ - &#8203;<!-- 05 -->[website] Add redirection for talk @oliviertassinari
43
+ - &#8203;<!-- 04 -->[website] Adds Arthur Balduini team info (#42193) @arthurbalduini
44
+ - &#8203;<!-- 03 -->[website] Update the role template file (#42192) @danilo-leal
45
+ - &#8203;<!-- 02 -->[website] Update MUI X deps and migrate TreeView demos to v7 API (#42149) @noraleonte
46
+ - &#8203;<!-- 01 -->[website] Fix pricing casing (#42178) @aarongarciah
47
+
48
+ All contributors of this release in alphabetical order: @aarongarciah, @alexfauquette, @arthurbalduini, @bharatkashyap, @danilo-leal, @DiegoAndai, @heath-freenome, @lhilgert9, @noraleonte, @oliviertassinari, @sai6855, @samuelsycamore, @TahaRhidouani, @tarunrajput
49
+
50
+ ## v6.0.0-alpha.6
51
+
52
+ <!-- generated comparing v6.0.0-alpha.5..next -->
53
+
54
+ _May 8, 2024_
55
+
56
+ A big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
57
+
58
+ ### `@mui/material@6.0.0-alpha.6`
59
+
60
+ - [Chip] Add colorDefault class to chipClasses (#42067) @sai6855
61
+ - Migrate components to support CSS extraction (#42001) @siriwatknp
62
+ - [SpeedDial] Deprecate TransitionComponent (#40698) @harry-whorlow
63
+
64
+ ### `@mui/codemod@6.0.0-alpha.6`
65
+
66
+ - Add `theme-v6` migration (#42056) @siriwatknp
67
+
68
+ ### `@mui/icons-material@6.0.0-alpha.6`
69
+
70
+ - Add the Emergency icon (#42080) @danilo-leal
71
+
72
+ ### Docs
73
+
74
+ - [autocomplete] Fix duplicate autocomplete id (#42086) @oliviertassinari
75
+ - Fix SEO redirection issues @oliviertassinari
76
+ - [material-ui] Fix broken link (#42142) @aarongarciah
77
+ - [material-ui][docs] Fix link on the Sync page (#42088) @danilo-leal
78
+
79
+ ### Core
80
+
81
+ - [blog] Shorten title to fit @oliviertassinari
82
+ - [blog] Update Sync post OG image (#42114) @danilo-leal
83
+ - [blog] A few tweaks in introducing-sync-plugin (#42092) @oliviertassinari
84
+ - [code-infra] Add canary release scripts (#41949) @michaldudak
85
+ - [code-infra] Move ComponentLinkHeader to @mui/docs (#42061) @Janpot
86
+ - [code-infra] Bump node image used by CI in docker (#42079) @LukasTy
87
+ - [core] Restrict import path with ESLint (#41970) @oliviertassinari
88
+ - [docs-infra] Add design and formatting improvements (#42063) @danilo-leal
89
+ - [docs-infra] Fix HTML structure violations (#42085) @oliviertassinari
90
+ - [website] Componentize a few Careers page sections (#42102) @danilo-leal
91
+ - [website] Refine the InfoCard design (#42116) @danilo-leal
92
+ - [website] Fix home page slider's track position (#42141) @aarongarciah
93
+ - [website] Closing the survey @oliviertassinari
94
+ - [website] Remove Survey banner from website and Core docs (#42104) @joserodolfofreitas
95
+
96
+ All contributors of this release in alphabetical order: @aarongarciah, @danilo-leal, @harry-whorlow, @Janpot, @joserodolfofreitas, @LukasTy, @michaldudak, @oliviertassinari, @sai6855, @siriwatknp
97
+
3
98
  ## v6.0.0-alpha.5
4
99
 
5
100
  <!-- generated comparing v6.0.0-alpha.4..next -->
@@ -3,8 +3,6 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  var _span, _span2;
4
4
  const _excluded = ["code"];
5
5
  import * as React from 'react';
6
- import ContentCopyRoundedIcon from '@mui/icons-material/ContentCopyRounded';
7
- import LibraryAddCheckRoundedIcon from '@mui/icons-material/LibraryAddCheckRounded';
8
6
  import useClipboardCopy from './useClipboardCopy';
9
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
8
  export function CodeCopyButton(props) {
@@ -29,16 +27,11 @@ export function CodeCopyButton(props) {
29
27
  // event.stopPropagation();
30
28
  await copy(code);
31
29
  },
32
- children: [isCopied ? /*#__PURE__*/_jsx(LibraryAddCheckRoundedIcon, {
33
- sx: {
34
- fontSize: 18
35
- }
36
- }) : /*#__PURE__*/_jsx(ContentCopyRoundedIcon, {
37
- sx: {
38
- fontSize: 18
39
- }
40
- }), /*#__PURE__*/_jsxs("span", {
30
+ children: [isCopied ? 'Copied' : 'Copy', /*#__PURE__*/_jsxs("span", {
41
31
  className: "MuiCode-copyKeypress",
32
+ style: {
33
+ opacity: isCopied ? 0 : 1
34
+ },
42
35
  children: [_span || (_span = /*#__PURE__*/_jsx("span", {
43
36
  children: "(or"
44
37
  })), " ", key, "C", _span2 || (_span2 = /*#__PURE__*/_jsx("span", {
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { MarkdownHeaders } from '@mui/internal-markdown';
3
+ export interface ComponentLinkHeaderProps {
4
+ design?: boolean;
5
+ markdown: {
6
+ headers: MarkdownHeaders;
7
+ };
8
+ }
9
+ export declare function ComponentLinkHeader(props: ComponentLinkHeaderProps): React.JSX.Element;
@@ -0,0 +1,179 @@
1
+ var _ChatRounded, _BundleSizeIcon, _W3CIcon, _MaterialDesignIcon, _li, _React$Fragment;
2
+ import * as React from 'react';
3
+ import Chip from '@mui/material/Chip';
4
+ import Tooltip from '@mui/material/Tooltip';
5
+ import ChatRounded from '@mui/icons-material/ChatRounded';
6
+ import { styled } from '@mui/material/styles';
7
+ import SketchIcon from '../svgIcons/SketchIcon';
8
+ import FigmaIcon from '../svgIcons/FigmaIcon';
9
+ import AdobeXDIcon from '../svgIcons/AdobeXDIcon';
10
+ import BundleSizeIcon from '../svgIcons/BundleSizeIcon';
11
+ import W3CIcon from '../svgIcons/W3CIcon';
12
+ import MaterialDesignIcon from '../svgIcons/MaterialDesignIcon';
13
+ import { useTranslate } from '../i18n';
14
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
+ const Root = styled('ul')({
16
+ margin: 0,
17
+ padding: 0,
18
+ listStyle: 'none',
19
+ display: 'flex',
20
+ flexWrap: 'wrap',
21
+ gap: 8,
22
+ '& .MuiChip-root': {
23
+ height: 26,
24
+ padding: '0 8px',
25
+ gap: 6,
26
+ '& .MuiChip-label': {
27
+ padding: 0
28
+ },
29
+ '& .MuiChip-iconSmall': {
30
+ margin: 0,
31
+ fontSize: 14
32
+ }
33
+ }
34
+ });
35
+ const defaultPackageNames = {
36
+ 'material-ui': '@mui/material',
37
+ 'joy-ui': '@mui/joy',
38
+ 'base-ui': '@mui/base',
39
+ system: '@mui/system'
40
+ };
41
+ export function ComponentLinkHeader(props) {
42
+ const {
43
+ markdown: {
44
+ headers
45
+ },
46
+ design
47
+ } = props;
48
+ const t = useTranslate();
49
+ const packageName = headers.packageName ?? defaultPackageNames[headers.productId] ?? '@mui/material';
50
+ return /*#__PURE__*/_jsxs(Root, {
51
+ children: [headers.githubLabel ? /*#__PURE__*/_jsx("li", {
52
+ children: /*#__PURE__*/_jsx(Chip, {
53
+ clickable: true,
54
+ role: undefined,
55
+ component: "a",
56
+ size: "small",
57
+ variant: "outlined",
58
+ rel: "nofollow",
59
+ href: `${process.env.SOURCE_CODE_REPO}/labels/${encodeURIComponent(headers.githubLabel)}`,
60
+ icon: _ChatRounded || (_ChatRounded = /*#__PURE__*/_jsx(ChatRounded, {
61
+ color: "primary"
62
+ })),
63
+ "data-ga-event-category": "ComponentLinkHeader",
64
+ "data-ga-event-action": "click",
65
+ "data-ga-event-label": t('githubLabel'),
66
+ "data-ga-event-split": "0.1",
67
+ label: t('githubLabel')
68
+ })
69
+ }) : null, /*#__PURE__*/_jsx("li", {
70
+ children: /*#__PURE__*/_jsx(Tooltip, {
71
+ title: t('bundleSizeTooltip'),
72
+ describeChild: true,
73
+ children: /*#__PURE__*/_jsx(Chip, {
74
+ clickable: true,
75
+ role: undefined,
76
+ component: "a",
77
+ size: "small",
78
+ variant: "outlined",
79
+ rel: "nofollow",
80
+ href: `https://bundlephobia.com/package/${packageName}@latest`,
81
+ icon: _BundleSizeIcon || (_BundleSizeIcon = /*#__PURE__*/_jsx(BundleSizeIcon, {
82
+ color: "primary"
83
+ })),
84
+ "data-ga-event-category": "ComponentLinkHeader",
85
+ "data-ga-event-action": "click",
86
+ "data-ga-event-label": t('bundleSize'),
87
+ "data-ga-event-split": "0.1",
88
+ label: t('bundleSize')
89
+ })
90
+ })
91
+ }), headers.waiAria ? /*#__PURE__*/_jsx("li", {
92
+ children: /*#__PURE__*/_jsx(Chip, {
93
+ clickable: true,
94
+ role: undefined,
95
+ component: "a",
96
+ size: "small",
97
+ variant: "outlined",
98
+ rel: "nofollow",
99
+ href: headers.waiAria,
100
+ icon: _W3CIcon || (_W3CIcon = /*#__PURE__*/_jsx(W3CIcon, {
101
+ color: "primary"
102
+ })),
103
+ "data-ga-event-category": "ComponentLinkHeader",
104
+ "data-ga-event-action": "click",
105
+ "data-ga-event-label": "WAI-ARIA",
106
+ "data-ga-event-split": "0.1",
107
+ label: "WAI-ARIA"
108
+ })
109
+ }) : null, headers.materialDesign ? /*#__PURE__*/_jsx("li", {
110
+ children: /*#__PURE__*/_jsx(Chip, {
111
+ clickable: true,
112
+ role: undefined,
113
+ component: "a",
114
+ size: "small",
115
+ variant: "outlined",
116
+ rel: "nofollow",
117
+ href: headers.materialDesign,
118
+ icon: _MaterialDesignIcon || (_MaterialDesignIcon = /*#__PURE__*/_jsx(MaterialDesignIcon, {})),
119
+ "data-ga-event-category": "ComponentLinkHeader",
120
+ "data-ga-event-action": "click",
121
+ "data-ga-event-label": "Material Design",
122
+ "data-ga-event-split": "0.1",
123
+ label: "Material Design"
124
+ })
125
+ }) : null, design === false ? null : /*#__PURE__*/_jsxs(React.Fragment, {
126
+ children: [_li || (_li = /*#__PURE__*/_jsx("li", {
127
+ children: /*#__PURE__*/_jsx(Chip, {
128
+ clickable: true,
129
+ role: undefined,
130
+ component: "a",
131
+ size: "small",
132
+ variant: "outlined",
133
+ rel: "nofollow",
134
+ href: "https://mui.com/store/items/figma-react/?utm_source=docs&utm_medium=referral&utm_campaign=component-link-header",
135
+ icon: /*#__PURE__*/_jsx(FigmaIcon, {}),
136
+ "data-ga-event-category": "ComponentLinkHeader",
137
+ "data-ga-event-action": "click",
138
+ "data-ga-event-label": "Figma",
139
+ "data-ga-event-split": "0.1",
140
+ label: "Figma"
141
+ })
142
+ })), packageName === '@mui/joy' ? null : _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {
143
+ children: [/*#__PURE__*/_jsx("li", {
144
+ children: /*#__PURE__*/_jsx(Chip, {
145
+ clickable: true,
146
+ role: undefined,
147
+ component: "a",
148
+ size: "small",
149
+ variant: "outlined",
150
+ rel: "nofollow",
151
+ href: "https://mui.com/store/items/adobe-xd-react/?utm_source=docs&utm_medium=referral&utm_campaign=component-link-header",
152
+ icon: /*#__PURE__*/_jsx(AdobeXDIcon, {}),
153
+ "data-ga-event-category": "ComponentLinkHeader",
154
+ "data-ga-event-action": "click",
155
+ "data-ga-event-label": "Adobe XD",
156
+ "data-ga-event-split": "0.1",
157
+ label: "Adobe"
158
+ })
159
+ }), /*#__PURE__*/_jsx("li", {
160
+ children: /*#__PURE__*/_jsx(Chip, {
161
+ clickable: true,
162
+ role: undefined,
163
+ component: "a",
164
+ size: "small",
165
+ variant: "outlined",
166
+ rel: "nofollow",
167
+ href: "https://mui.com/store/items/sketch-react/?utm_source=docs&utm_medium=referral&utm_campaign=component-link-header",
168
+ icon: /*#__PURE__*/_jsx(SketchIcon, {}),
169
+ "data-ga-event-category": "ComponentLinkHeader",
170
+ "data-ga-event-action": "click",
171
+ "data-ga-event-label": "Sketch",
172
+ "data-ga-event-split": "0.1",
173
+ label: "Sketch"
174
+ })
175
+ })]
176
+ }))]
177
+ })]
178
+ });
179
+ }
@@ -0,0 +1,2 @@
1
+ export * from './ComponentLinkHeader';
2
+ export { ComponentLinkHeader as default } from './ComponentLinkHeader';
@@ -0,0 +1,2 @@
1
+ export * from './ComponentLinkHeader';
2
+ export { ComponentLinkHeader as default } from './ComponentLinkHeader';
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "main": "../node/ComponentLinkHeader/index.js",
5
+ "types": "./index.d.ts"
6
+ }
@@ -8,7 +8,6 @@ export declare function GlowingIconContainer({ icon }: GlowingIconContainerProps
8
8
  interface InfoCardProps {
9
9
  classNameDescription?: string;
10
10
  classNameTitle?: string;
11
- dense?: boolean;
12
11
  description?: string;
13
12
  icon?: React.ReactNode;
14
13
  link?: string;
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["classNameDescription", "classNameTitle", "dense", "description", "icon", "link", "svg", "title", "titleProps"];
3
+ const _excluded = ["classNameDescription", "classNameTitle", "description", "icon", "link", "svg", "title", "titleProps"];
4
4
  import * as React from 'react';
5
5
  import { alpha } from '@mui/material/styles';
6
6
  import Box from '@mui/material/Box';
@@ -13,8 +13,8 @@ export function GlowingIconContainer({
13
13
  }) {
14
14
  return /*#__PURE__*/_jsx(Box, {
15
15
  sx: theme => _extends({
16
- width: 40,
17
- height: 40,
16
+ width: 36,
17
+ height: 36,
18
18
  display: 'flex',
19
19
  justifyContent: 'center',
20
20
  alignItems: 'center',
@@ -23,10 +23,13 @@ export function GlowingIconContainer({
23
23
  border: '1px solid',
24
24
  borderColor: 'primary.200',
25
25
  bgcolor: 'primary.50',
26
- boxShadow: `0px 0 0 2px ${alpha(theme.palette.primary[500], 0.1)}, 0px 2px 12px 0px rgba(234, 237, 241, 0.3) inset`
26
+ boxShadow: `0px 0 0 2px ${alpha(theme.palette.primary[500], 0.1)}, 0px 2px 12px 0px rgba(234, 237, 241, 0.3) inset`,
27
+ '& .MuiSvgIcon-root': {
28
+ fontSize: theme.typography.pxToRem(18)
29
+ }
27
30
  }, theme.applyDarkStyles({
28
31
  borderColor: alpha(theme.palette.primary[400], 0.25),
29
- bgcolor: alpha(theme.palette.primary[900], 0.4),
32
+ bgcolor: alpha(theme.palette.primary[900], 0.2),
30
33
  boxShadow: `0 0 0 2px ${alpha(theme.palette.primary[600], 0.1)}, 0px 2px 12px 0px rgba(0, 0, 0, 0.25) inset`
31
34
  })),
32
35
  children: icon
@@ -36,7 +39,6 @@ export function InfoCard(props) {
36
39
  const {
37
40
  classNameDescription,
38
41
  classNameTitle,
39
- dense,
40
42
  description,
41
43
  icon,
42
44
  link,
@@ -55,7 +57,7 @@ export function InfoCard(props) {
55
57
  prefetch: false
56
58
  } : {}, {
57
59
  sx: theme => _extends({
58
- p: dense ? 2.5 : 3.5,
60
+ p: 2.5,
59
61
  height: '100%',
60
62
  background: `${(theme.vars || theme).palette.gradients.linearSubtle}`
61
63
  }, theme.applyDarkStyles({
@@ -67,7 +69,7 @@ export function InfoCard(props) {
67
69
  children: [svg && svg, icon && /*#__PURE__*/_jsx(GlowingIconContainer, {
68
70
  icon: icon
69
71
  }), /*#__PURE__*/_jsx(Typography, _extends({
70
- fontWeight: "bold",
72
+ fontWeight: "semiBold",
71
73
  component: "h3",
72
74
  color: "text.primary",
73
75
  variant: "body2",
@@ -526,45 +526,35 @@ const Root = styled('div')(({
526
526
  top: 0
527
527
  },
528
528
  '& .MuiCode-copy': {
529
- display: 'inline-flex',
530
- flexDirection: 'row-reverse',
531
- alignItems: 'center',
532
- width: 26,
533
- height: 26,
534
529
  cursor: 'pointer',
535
530
  position: 'absolute',
536
531
  top: 12,
537
532
  right: 12,
533
+ display: 'inline-flex',
534
+ flexDirection: 'row-reverse',
535
+ alignItems: 'center',
536
+ height: 24,
538
537
  padding: theme.spacing(0.5),
539
- fontFamily: 'inherit',
540
- fontWeight: 500,
538
+ paddingBottom: '5px',
539
+ // optical alignment
540
+ fontFamily: lightTheme.typography.fontFamily,
541
+ fontWeight: lightTheme.typography.fontWeightMedium,
542
+ fontSize: lightTheme.typography.pxToRem(12),
541
543
  borderRadius: 6,
542
- border: 'none',
543
- backgroundColor: 'hsl(210, 35%, 9%)',
544
- // using the code block one-off background color (defined in line 23)
545
- color: '#FFF',
544
+ border: '1px solid',
545
+ borderColor: alpha(lightTheme.palette.primaryDark[600], 0.5),
546
+ backgroundColor: alpha(lightTheme.palette.primaryDark[800], 0.5),
547
+ color: `var(--muidocs-palette-grey-200, ${lightTheme.palette.grey[200]})`,
546
548
  transition: theme.transitions.create(['background', 'borderColor', 'display'], {
547
549
  duration: theme.transitions.duration.shortest
548
550
  }),
549
- '& svg': {
550
- userSelect: 'none',
551
- width: theme.typography.pxToRem(16),
552
- height: theme.typography.pxToRem(16),
553
- display: 'inline-block',
554
- fill: 'currentcolor',
555
- flexShrink: 0,
556
- fontSize: '18px',
557
- margin: 'auto',
558
- opacity: 0.5
559
- },
560
- '& .MuiCode-copied-icon': {
551
+ '& .MuiCode-copied-label': {
561
552
  display: 'none'
562
553
  },
563
554
  '&:hover, &:focus': {
564
- backgroundColor: lightTheme.palette.primaryDark[600],
565
- '& svg': {
566
- opacity: 1
567
- },
555
+ borderColor: `var(--muidocs-palette-primaryDark-400, ${lightTheme.palette.primaryDark[400]})`,
556
+ backgroundColor: `var(--muidocs-palette-primaryDark-700, ${lightTheme.palette.primaryDark[700]})`,
557
+ color: '#FFF',
568
558
  '& .MuiCode-copyKeypress': {
569
559
  display: 'block',
570
560
  // Approximate no hover capabilities with no keyboard
@@ -577,17 +567,19 @@ const Root = styled('div')(({
577
567
  '& .MuiCode-copyKeypress': {
578
568
  display: 'none',
579
569
  position: 'absolute',
580
- right: 26
570
+ right: 34
581
571
  },
582
572
  '&[data-copied]': {
583
- // style of the button when it is in copied state.
584
- borderColor: lightTheme.palette.primary[700],
573
+ borderColor: `var(--muidocs-palette-primaryDark-400, ${lightTheme.palette.primaryDark[400]})`,
574
+ backgroundColor: `var(--muidocs-palette-primaryDark-700, ${lightTheme.palette.primaryDark[700]})`,
585
575
  color: '#fff',
586
- backgroundColor: lightTheme.palette.primaryDark[600],
587
- '& .MuiCode-copy-icon': {
576
+ '& .MuiCode-copyKeypress': {
577
+ opacity: 0
578
+ },
579
+ '& .MuiCode-copy-label': {
588
580
  display: 'none'
589
581
  },
590
- '& .MuiCode-copied-icon': {
582
+ '& .MuiCode-copied-label': {
591
583
  display: 'block'
592
584
  }
593
585
  }
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ export interface SectionTitleProps {
3
+ title: string;
4
+ hash: string;
5
+ level?: 'h2' | 'h3' | 'h4';
6
+ }
7
+ export declare function SectionTitle(props: SectionTitleProps): React.JSX.Element;
@@ -0,0 +1,30 @@
1
+ var _span;
2
+ import * as React from 'react';
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ export function SectionTitle(props) {
5
+ const {
6
+ title,
7
+ hash,
8
+ level: Level = 'h2'
9
+ } = props;
10
+ return /*#__PURE__*/_jsx(Level, {
11
+ id: hash,
12
+ style: {
13
+ flexGrow: 1
14
+ },
15
+ children: /*#__PURE__*/_jsxs("a", {
16
+ "aria-labelledby": hash,
17
+ className: "title-link-to-anchor",
18
+ href: `#${hash}`,
19
+ tabIndex: -1,
20
+ children: [title, _span || (_span = /*#__PURE__*/_jsx("span", {
21
+ className: "anchor-icon",
22
+ children: /*#__PURE__*/_jsx("svg", {
23
+ children: /*#__PURE__*/_jsx("use", {
24
+ xlinkHref: "#anchor-link-icon"
25
+ })
26
+ })
27
+ }))]
28
+ })
29
+ });
30
+ }
@@ -0,0 +1 @@
1
+ export * from './SectionTitle';
@@ -0,0 +1 @@
1
+ export * from './SectionTitle';
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "main": "../node/SectionTitle/index.js",
5
+ "types": "./index.d.ts"
6
+ }
@@ -661,7 +661,8 @@ export function getThemedComponents() {
661
661
  fontSize: theme.typography.pxToRem(14),
662
662
  fontWeight: 500,
663
663
  '&:hover, &:focus': {
664
- backgroundColor: (theme.vars || theme).palette.grey[50]
664
+ backgroundColor: (theme.vars || theme).palette.grey[100],
665
+ color: (theme.vars || theme).palette.text.primary
665
666
  },
666
667
  '&:focus-visible': {
667
668
  outline: 'none'
@@ -8,8 +8,6 @@ exports.CodeCopyButton = CodeCopyButton;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
10
10
  var React = _interopRequireWildcard(require("react"));
11
- var _ContentCopyRounded = _interopRequireDefault(require("@mui/icons-material/ContentCopyRounded"));
12
- var _LibraryAddCheckRounded = _interopRequireDefault(require("@mui/icons-material/LibraryAddCheckRounded"));
13
11
  var _useClipboardCopy = _interopRequireDefault(require("./useClipboardCopy"));
14
12
  var _jsxRuntime = require("react/jsx-runtime");
15
13
  var _span, _span2;
@@ -38,16 +36,11 @@ function CodeCopyButton(props) {
38
36
  // event.stopPropagation();
39
37
  await copy(code);
40
38
  },
41
- children: [isCopied ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_LibraryAddCheckRounded.default, {
42
- sx: {
43
- fontSize: 18
44
- }
45
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ContentCopyRounded.default, {
46
- sx: {
47
- fontSize: 18
48
- }
49
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
39
+ children: [isCopied ? 'Copied' : 'Copy', /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
50
40
  className: "MuiCode-copyKeypress",
41
+ style: {
42
+ opacity: isCopied ? 0 : 1
43
+ },
51
44
  children: [_span || (_span = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
52
45
  children: "(or"
53
46
  })), " ", key, "C", _span2 || (_span2 = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {