@mui/codemod 6.0.0-alpha.8 → 6.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 (126) hide show
  1. package/README.md +609 -180
  2. package/codemod.js +0 -2
  3. package/node/deprecations/all/deprecations-all.js +34 -22
  4. package/node/deprecations/all/postcss.config.js +7 -1
  5. package/node/deprecations/autocomplete-props/autocomplete-props.js +0 -32
  6. package/node/deprecations/autocomplete-props/test-cases/actual.js +13 -35
  7. package/node/deprecations/autocomplete-props/test-cases/expected.js +13 -41
  8. package/node/deprecations/autocomplete-props/test-cases/theme.actual.js +0 -18
  9. package/node/deprecations/autocomplete-props/test-cases/theme.expected.js +0 -22
  10. package/node/deprecations/avatar-group-props/avatar-group-props.js +87 -0
  11. package/node/deprecations/avatar-group-props/index.js +13 -0
  12. package/node/deprecations/avatar-group-props/test-cases/actual.js +56 -0
  13. package/node/deprecations/avatar-group-props/test-cases/expected.js +58 -0
  14. package/node/deprecations/avatar-group-props/test-cases/theme.actual.js +48 -0
  15. package/node/deprecations/avatar-group-props/test-cases/theme.expected.js +50 -0
  16. package/node/deprecations/backdrop-props/backdrop-props.js +3 -5
  17. package/node/deprecations/backdrop-props/test-cases/actual.js +30 -14
  18. package/node/deprecations/backdrop-props/test-cases/expected.js +23 -13
  19. package/node/deprecations/backdrop-props/test-cases/theme.actual.js +32 -6
  20. package/node/deprecations/backdrop-props/test-cases/theme.expected.js +27 -5
  21. package/node/deprecations/filled-input-props/filled-input-props.js +22 -0
  22. package/node/deprecations/filled-input-props/index.js +13 -0
  23. package/node/deprecations/filled-input-props/test-cases/actual.js +60 -0
  24. package/node/deprecations/filled-input-props/test-cases/expected.js +52 -0
  25. package/node/deprecations/filled-input-props/test-cases/theme.actual.js +73 -0
  26. package/node/deprecations/filled-input-props/test-cases/theme.expected.js +65 -0
  27. package/node/deprecations/grid-props/grid-props.js +51 -0
  28. package/node/deprecations/grid-props/index.js +13 -0
  29. package/node/deprecations/grid-props/test-cases/actual.js +25 -0
  30. package/node/deprecations/grid-props/test-cases/expected.js +23 -0
  31. package/node/deprecations/grid-props/test-cases/theme.actual.js +24 -0
  32. package/node/deprecations/grid-props/test-cases/theme.expected.js +23 -0
  33. package/node/deprecations/input-base-props/index.js +13 -0
  34. package/node/deprecations/input-base-props/input-base-props.js +22 -0
  35. package/node/deprecations/input-base-props/test-cases/actual.js +60 -0
  36. package/node/deprecations/input-base-props/test-cases/expected.js +52 -0
  37. package/node/deprecations/input-base-props/test-cases/theme.actual.js +73 -0
  38. package/node/deprecations/input-base-props/test-cases/theme.expected.js +65 -0
  39. package/node/deprecations/input-props/index.js +13 -0
  40. package/node/deprecations/input-props/input-props.js +22 -0
  41. package/node/deprecations/input-props/test-cases/actual.js +60 -0
  42. package/node/deprecations/input-props/test-cases/expected.js +52 -0
  43. package/node/deprecations/input-props/test-cases/theme.actual.js +73 -0
  44. package/node/deprecations/input-props/test-cases/theme.expected.js +65 -0
  45. package/node/deprecations/list-item-props/index.js +13 -0
  46. package/node/deprecations/list-item-props/list-item-props.js +22 -0
  47. package/node/deprecations/list-item-props/test-cases/actual.js +43 -0
  48. package/node/deprecations/list-item-props/test-cases/expected.js +40 -0
  49. package/node/deprecations/list-item-props/test-cases/theme.actual.js +56 -0
  50. package/node/deprecations/list-item-props/test-cases/theme.expected.js +53 -0
  51. package/node/deprecations/modal-props/index.js +13 -0
  52. package/node/deprecations/modal-props/modal-props.js +22 -0
  53. package/node/deprecations/modal-props/test-cases/actual.js +43 -0
  54. package/node/deprecations/modal-props/test-cases/expected.js +40 -0
  55. package/node/deprecations/modal-props/test-cases/theme.actual.js +56 -0
  56. package/node/deprecations/modal-props/test-cases/theme.expected.js +53 -0
  57. package/node/deprecations/outlined-input-props/index.js +13 -0
  58. package/node/deprecations/outlined-input-props/outlined-input-props.js +22 -0
  59. package/node/deprecations/outlined-input-props/test-cases/actual.js +60 -0
  60. package/node/deprecations/outlined-input-props/test-cases/expected.js +52 -0
  61. package/node/deprecations/outlined-input-props/test-cases/theme.actual.js +73 -0
  62. package/node/deprecations/outlined-input-props/test-cases/theme.expected.js +65 -0
  63. package/node/deprecations/popper-props/index.js +13 -0
  64. package/node/deprecations/popper-props/popper-props.js +22 -0
  65. package/node/deprecations/popper-props/test-cases/actual.js +27 -0
  66. package/node/deprecations/popper-props/test-cases/expected.js +24 -0
  67. package/node/deprecations/popper-props/test-cases/theme.actual.js +32 -0
  68. package/node/deprecations/popper-props/test-cases/theme.expected.js +29 -0
  69. package/node/deprecations/step-label-props/step-label-props.js +0 -14
  70. package/node/deprecations/step-label-props/test-cases/actual.js +0 -23
  71. package/node/deprecations/step-label-props/test-cases/expected.js +0 -27
  72. package/node/deprecations/step-label-props/test-cases/theme.actual.js +0 -22
  73. package/node/deprecations/step-label-props/test-cases/theme.expected.js +0 -28
  74. package/node/deprecations/tab-classes/index.js +13 -0
  75. package/node/deprecations/tab-classes/postcss-plugin.js +30 -0
  76. package/node/deprecations/tab-classes/postcss.config.js +8 -0
  77. package/node/deprecations/tab-classes/tab-classes.js +53 -0
  78. package/node/deprecations/tab-classes/test-cases/actual.js +5 -0
  79. package/node/deprecations/tab-classes/test-cases/expected.js +5 -0
  80. package/node/deprecations/table-sort-label-classes/index.js +13 -0
  81. package/node/deprecations/table-sort-label-classes/postcss-plugin.js +33 -0
  82. package/node/deprecations/table-sort-label-classes/postcss.config.js +8 -0
  83. package/node/deprecations/table-sort-label-classes/table-sort-label-classes.js +77 -0
  84. package/node/deprecations/table-sort-label-classes/test-cases/actual.js +7 -0
  85. package/node/deprecations/table-sort-label-classes/test-cases/expected.js +7 -0
  86. package/node/deprecations/tooltip-props/index.js +13 -0
  87. package/node/deprecations/tooltip-props/test-cases/actual.js +92 -0
  88. package/node/deprecations/tooltip-props/test-cases/expected.js +84 -0
  89. package/node/deprecations/tooltip-props/test-cases/theme.actual.js +73 -0
  90. package/node/deprecations/tooltip-props/test-cases/theme.expected.js +65 -0
  91. package/node/deprecations/tooltip-props/tooltip-props.js +22 -0
  92. package/node/util/migrateToVariants.js +244 -138
  93. package/node/v5.0.0/theme-spacing.test/large-actual.js +1 -1
  94. package/node/v5.0.0/theme-spacing.test/large-expected.js +1 -1
  95. package/node/v6.0.0/grid-v2-props/grid-v2-props.js +149 -0
  96. package/node/v6.0.0/grid-v2-props/index.js +13 -0
  97. package/node/v6.0.0/grid-v2-props/test-cases/actual.js +85 -0
  98. package/node/v6.0.0/grid-v2-props/test-cases/custom-breakpoints.actual.js +18 -0
  99. package/node/v6.0.0/grid-v2-props/test-cases/custom-breakpoints.expected.js +22 -0
  100. package/node/v6.0.0/grid-v2-props/test-cases/expected.js +97 -0
  101. package/node/v6.0.0/styled/test-cases/ConditionalStyled.expected.js +9 -22
  102. package/node/v6.0.0/styled/test-cases/DynamicPropsStyled.actual.js +39 -0
  103. package/node/v6.0.0/styled/test-cases/DynamicPropsStyled.expected.js +65 -0
  104. package/node/v6.0.0/styled/test-cases/LogicalStyled.actual.js +31 -1
  105. package/node/v6.0.0/styled/test-cases/LogicalStyled.expected.js +39 -1
  106. package/node/v6.0.0/styled/test-cases/NestedSpread.expected.js +11 -13
  107. package/node/v6.0.0/sx-prop/index.js +13 -0
  108. package/node/v6.0.0/sx-prop/sx-v6.js +405 -0
  109. package/node/v6.0.0/sx-prop/test-cases/basic-sx.actual.js +36 -0
  110. package/node/v6.0.0/sx-prop/test-cases/basic-sx.expected.js +46 -0
  111. package/node/v6.0.0/sx-prop/test-cases/sx-css-vars.actual.js +55 -0
  112. package/node/v6.0.0/sx-prop/test-cases/sx-css-vars.expected.js +88 -0
  113. package/node/v6.0.0/sx-prop/test-cases/sx-dynamic.actual.js +107 -0
  114. package/node/v6.0.0/sx-prop/test-cases/sx-dynamic.expected.js +120 -0
  115. package/node/v6.0.0/sx-prop/test-cases/sx-dynamic2.actual.js +49 -0
  116. package/node/v6.0.0/sx-prop/test-cases/sx-dynamic2.expected.js +64 -0
  117. package/node/v6.0.0/sx-prop/test-cases/sx-line-break.actual.js +69 -0
  118. package/node/v6.0.0/sx-prop/test-cases/sx-line-break.expected.js +69 -0
  119. package/node/v6.0.0/sx-prop/test-cases/sx-value-callback.actual.js +102 -0
  120. package/node/v6.0.0/sx-prop/test-cases/sx-value-callback.expected.js +111 -0
  121. package/node/v6.0.0/system-props/index.js +13 -0
  122. package/node/v6.0.0/system-props/removeSystemProps.js +242 -0
  123. package/node/v6.0.0/system-props/test-cases/system-props.actual.js +79 -0
  124. package/node/v6.0.0/system-props/test-cases/system-props.expected.js +92 -0
  125. package/node/v6.0.0/theme-v6/theme-v6.js +2 -2
  126. package/package.json +7 -7
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+
3
+ var _jsxRuntime = require("react/jsx-runtime");
4
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
5
+ sx: {
6
+ mb: 1,
7
+ display: 'flex',
8
+ justifyContent: 'space-between',
9
+ alignItems: 'center',
10
+ gap: 2,
11
+ color: tier.title === 'Professional' ? 'grey.100' : '',
12
+ backgroundColor: theme => theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[900],
13
+ borderBottom: theme => `1px solid ${theme.palette.mode === 'light' ? 'grey.200' : 'grey.800'}`
14
+ }
15
+ });
16
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Card, {
17
+ sx: theme => ({
18
+ p: 2,
19
+ display: 'flex',
20
+ flexDirection: 'column',
21
+ gap: 4,
22
+ ...(tier.title === 'Professional' && {
23
+ border: 'none',
24
+ boxShadow: theme.palette.mode === 'light' ? `0 8px 12px hsla(210, 98%, 42%, 0.2)` : `0 8px 12px hsla(0, 0%, 0%, 0.8)`,
25
+ background: 'radial-gradient(circle at 50% 0%, hsl(210, 98%, 35%), hsl(210, 100%, 16%))'
26
+ })
27
+ })
28
+ });
29
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Card, {
30
+ component: Button,
31
+ onClick: () => handleItemClick(index),
32
+ sx: theme => ({
33
+ p: 3,
34
+ height: 'fit-content',
35
+ width: '100%',
36
+ background: 'none',
37
+ ...(selectedItemIndex === index && {
38
+ backgroundColor: 'action.selected',
39
+ borderColor: theme.palette.mode === 'light' ? 'primary.light' : 'primary.dark'
40
+ }),
41
+ '&:hover': {
42
+ background: theme.palette.mode === 'light' ? 'linear-gradient(to bottom right, hsla(210, 100%, 97%, 0.5) 25%, hsla(210, 100%, 90%, 0.3) 100%)' : 'linear-gradient(to right bottom, hsla(210, 100%, 12%, 0.2) 25%, hsla(210, 100%, 16%, 0.2) 100%)',
43
+ borderColor: theme.palette.mode === 'light' ? 'primary.light' : 'primary.dark',
44
+ boxShadow: theme.palette.mode === 'light' ? '0px 2px 8px hsla(0, 0%, 0%, 0.1)' : '0px 1px 8px hsla(210, 100%, 25%, 0.5) '
45
+ }
46
+ })
47
+ }, index);
48
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(CreditCardRoundedIcon, {
49
+ fontSize: "small",
50
+ sx: theme => ({
51
+ color: theme.palette.mode === 'light' ? 'grey.400' : 'grey.600',
52
+ ...(paymentType === 'creditCard' && {
53
+ color: 'primary.main'
54
+ })
55
+ })
56
+ });
57
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
58
+ edge: "start",
59
+ color: "inherit",
60
+ "aria-label": "open drawer",
61
+ onClick: toggleDrawer,
62
+ sx: {
63
+ marginRight: '36px',
64
+ ...(open && {
65
+ display: 'none'
66
+ })
67
+ },
68
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(MenuIcon, {})
69
+ });
70
+ /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
71
+ sx: [{
72
+ ...(selectedItemIndex === index && {
73
+ backgroundColor: 'action.selected',
74
+ borderColor: theme.palette.mode === 'light' ? 'primary.light' : 'primary.dark'
75
+ })
76
+ }, theme => ({
77
+ color: theme.palette.mode === 'light' ? 'grey.400' : 'grey.600',
78
+ ...(paymentType === 'creditCard' && {
79
+ color: 'primary.main'
80
+ })
81
+ }), {
82
+ marginRight: '36px',
83
+ ...(open && {
84
+ display: 'none'
85
+ })
86
+ }]
87
+ });
88
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Step, {
89
+ indicator: /*#__PURE__*/(0, _jsxRuntime.jsx)(StepIndicator, {
90
+ variant: activeStep <= index ? 'soft' : 'solid',
91
+ color: activeStep < index ? 'neutral' : 'primary',
92
+ children: activeStep <= index ? index + 1 : /*#__PURE__*/(0, _jsxRuntime.jsx)(Check, {})
93
+ }),
94
+ sx: {
95
+ '&:not([data-active])': {
96
+ '&::after': {
97
+ ...(activeStep > index && index !== 2 && {
98
+ bgcolor: 'primary.solidBg'
99
+ })
100
+ }
101
+ }
102
+ },
103
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(StepButton, {
104
+ onClick: () => setActiveStep(index),
105
+ children: step
106
+ })
107
+ }, step);
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+
3
+ var _jsxRuntime = require("react/jsx-runtime");
4
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
5
+ sx: theme => ({
6
+ mb: 1,
7
+ display: 'flex',
8
+ justifyContent: 'space-between',
9
+ alignItems: 'center',
10
+ gap: 2,
11
+ backgroundColor: theme.palette.grey[900],
12
+ borderBottom: `1px solid ${'grey.800'}`,
13
+ ...theme.applyStyles("light", {
14
+ backgroundColor: theme.palette.grey[100],
15
+ borderBottom: `1px solid ${'grey.200'}`
16
+ })
17
+ })
18
+ });
19
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Card, {
20
+ sx: [theme => ({
21
+ p: 2,
22
+ display: 'flex',
23
+ flexDirection: 'column',
24
+ gap: 4
25
+ }), tier.title === 'Professional' && (theme => ({
26
+ border: 'none',
27
+ boxShadow: `0 8px 12px hsla(0, 0%, 0%, 0.8)`,
28
+ background: 'radial-gradient(circle at 50% 0%, hsl(210, 98%, 35%), hsl(210, 100%, 16%))',
29
+ ...theme.applyStyles("light", {
30
+ boxShadow: `0 8px 12px hsla(210, 98%, 42%, 0.2)`
31
+ })
32
+ }))]
33
+ });
34
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Card, {
35
+ component: Button,
36
+ onClick: () => handleItemClick(index),
37
+ sx: [theme => ({
38
+ p: 3,
39
+ height: 'fit-content',
40
+ width: '100%',
41
+ background: 'none',
42
+ '&:hover': {
43
+ background: 'linear-gradient(to right bottom, hsla(210, 100%, 12%, 0.2) 25%, hsla(210, 100%, 16%, 0.2) 100%)',
44
+ borderColor: 'primary.dark',
45
+ boxShadow: '0px 1px 8px hsla(210, 100%, 25%, 0.5) ',
46
+ ...theme.applyStyles("light", {
47
+ background: 'linear-gradient(to bottom right, hsla(210, 100%, 97%, 0.5) 25%, hsla(210, 100%, 90%, 0.3) 100%)',
48
+ borderColor: 'primary.light',
49
+ boxShadow: '0px 2px 8px hsla(0, 0%, 0%, 0.1)'
50
+ })
51
+ }
52
+ }), selectedItemIndex === index && (theme => ({
53
+ backgroundColor: 'action.selected',
54
+ borderColor: 'primary.dark',
55
+ ...theme.applyStyles("light", {
56
+ borderColor: 'primary.light'
57
+ })
58
+ }))]
59
+ }, index);
60
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(CreditCardRoundedIcon, {
61
+ fontSize: "small",
62
+ sx: [theme => ({
63
+ color: 'grey.600',
64
+ ...theme.applyStyles("light", {
65
+ color: 'grey.400'
66
+ })
67
+ }), paymentType === 'creditCard' && {
68
+ color: 'primary.main'
69
+ }]
70
+ });
71
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
72
+ edge: "start",
73
+ color: "inherit",
74
+ "aria-label": "open drawer",
75
+ onClick: toggleDrawer,
76
+ sx: [{
77
+ marginRight: '36px'
78
+ }, open && {
79
+ display: 'none'
80
+ }],
81
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(MenuIcon, {})
82
+ });
83
+ /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
84
+ sx: [selectedItemIndex === index && (theme => ({
85
+ backgroundColor: 'action.selected',
86
+ borderColor: 'primary.dark',
87
+ ...theme.applyStyles("light", {
88
+ borderColor: 'primary.light'
89
+ })
90
+ })), theme => ({
91
+ color: 'grey.600',
92
+ ...theme.applyStyles("light", {
93
+ color: 'grey.400'
94
+ })
95
+ }), paymentType === 'creditCard' && {
96
+ color: 'primary.main'
97
+ }, {
98
+ marginRight: '36px'
99
+ }, open && {
100
+ display: 'none'
101
+ }]
102
+ });
103
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Step, {
104
+ indicator: /*#__PURE__*/(0, _jsxRuntime.jsx)(StepIndicator, {
105
+ variant: activeStep <= index ? 'soft' : 'solid',
106
+ color: activeStep < index ? 'neutral' : 'primary',
107
+ children: activeStep <= index ? index + 1 : /*#__PURE__*/(0, _jsxRuntime.jsx)(Check, {})
108
+ }),
109
+ sx: [activeStep > index && index !== 2 && {
110
+ '&:not([data-active])': {
111
+ '&::after': {
112
+ bgcolor: 'primary.solidBg'
113
+ }
114
+ }
115
+ }],
116
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(StepButton, {
117
+ onClick: () => setActiveStep(index),
118
+ children: step
119
+ })
120
+ }, step);
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ var _jsxRuntime = require("react/jsx-runtime");
4
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Accordion, {
5
+ expanded: expanded,
6
+ onChange: handleExpansion,
7
+ slotProps: {
8
+ transition: {
9
+ timeout: 400
10
+ }
11
+ },
12
+ sx: {
13
+ '& .MuiAccordion-region': {
14
+ height: expanded ? 'auto' : 0
15
+ },
16
+ '& .MuiAccordionDetails-root': {
17
+ display: expanded ? 'block' : 'none'
18
+ }
19
+ }
20
+ });
21
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
22
+ sx: {
23
+ display: 'flex',
24
+ flexDirection: {
25
+ xs: 'column-reverse',
26
+ sm: 'row'
27
+ },
28
+ justifyContent: activeStep !== 0 ? 'space-between' : 'flex-end',
29
+ alignItems: 'end',
30
+ flexGrow: 1,
31
+ gap: 1,
32
+ pb: {
33
+ xs: 12,
34
+ sm: 0
35
+ },
36
+ mt: {
37
+ xs: 2,
38
+ sm: 0
39
+ },
40
+ mb: '60px'
41
+ }
42
+ });
43
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
44
+ sx: {
45
+ display: 'flex',
46
+ alignItems: 'baseline',
47
+ color: tier.title === 'Professional' ? 'grey.50' : undefined
48
+ }
49
+ });
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ var _jsxRuntime = require("react/jsx-runtime");
4
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Accordion, {
5
+ expanded: expanded,
6
+ onChange: handleExpansion,
7
+ slotProps: {
8
+ transition: {
9
+ timeout: 400
10
+ }
11
+ },
12
+ sx: [expanded ? {
13
+ '& .MuiAccordion-region': {
14
+ height: 'auto'
15
+ }
16
+ } : {
17
+ '& .MuiAccordion-region': {
18
+ height: 0
19
+ }
20
+ }, expanded ? {
21
+ '& .MuiAccordionDetails-root': {
22
+ display: 'block'
23
+ }
24
+ } : {
25
+ '& .MuiAccordionDetails-root': {
26
+ display: 'none'
27
+ }
28
+ }]
29
+ });
30
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
31
+ sx: [{
32
+ display: 'flex',
33
+ flexDirection: {
34
+ xs: 'column-reverse',
35
+ sm: 'row'
36
+ },
37
+ alignItems: 'end',
38
+ flexGrow: 1,
39
+ gap: 1,
40
+ pb: {
41
+ xs: 12,
42
+ sm: 0
43
+ },
44
+ mt: {
45
+ xs: 2,
46
+ sm: 0
47
+ },
48
+ mb: '60px'
49
+ }, activeStep !== 0 ? {
50
+ justifyContent: 'space-between'
51
+ } : {
52
+ justifyContent: 'flex-end'
53
+ }]
54
+ });
55
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
56
+ sx: [{
57
+ display: 'flex',
58
+ alignItems: 'baseline'
59
+ }, tier.title === 'Professional' ? {
60
+ color: 'grey.50'
61
+ } : {
62
+ color: null
63
+ }]
64
+ });
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = EnableColorOnDarkAppBar;
8
+ var React = _interopRequireWildcard(require("react"));
9
+ var _AppBar = _interopRequireDefault(require("@mui/material/AppBar"));
10
+ var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
11
+ var _Toolbar = _interopRequireDefault(require("@mui/material/Toolbar"));
12
+ var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
13
+ var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
14
+ var _Menu = _interopRequireDefault(require("@mui/icons-material/Menu"));
15
+ var _styles = require("@mui/material/styles");
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
+ var _MenuIcon;
18
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
19
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
+ function appBarLabel(label) {
21
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Toolbar.default, {
22
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
23
+ edge: "start",
24
+ color: "inherit",
25
+ "aria-label": "menu",
26
+ sx: {
27
+ mr: 2
28
+ },
29
+ children: _MenuIcon || (_MenuIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Menu.default, {}))
30
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
31
+ variant: "h6",
32
+ noWrap: true,
33
+ component: "div",
34
+ sx: {
35
+ flexGrow: 1
36
+ },
37
+ children: label
38
+ })]
39
+ });
40
+ }
41
+ const darkTheme = (0, _styles.createTheme)({
42
+ palette: {
43
+ mode: 'dark',
44
+ primary: {
45
+ main: '#1976d2'
46
+ }
47
+ }
48
+ });
49
+ function EnableColorOnDarkAppBar() {
50
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Stack.default, {
51
+ spacing: 2,
52
+ sx: {
53
+ flexGrow: 1
54
+ },
55
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.ThemeProvider, {
56
+ theme: darkTheme,
57
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppBar.default, {
58
+ position: "static",
59
+ color: "primary",
60
+ enableColorOnDark: true,
61
+ children: appBarLabel('enableColorOnDark')
62
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppBar.default, {
63
+ position: "static",
64
+ color: "primary",
65
+ children: appBarLabel('default')
66
+ })]
67
+ })
68
+ });
69
+ }
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = EnableColorOnDarkAppBar;
8
+ var React = _interopRequireWildcard(require("react"));
9
+ var _AppBar = _interopRequireDefault(require("@mui/material/AppBar"));
10
+ var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
11
+ var _Toolbar = _interopRequireDefault(require("@mui/material/Toolbar"));
12
+ var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
13
+ var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
14
+ var _Menu = _interopRequireDefault(require("@mui/icons-material/Menu"));
15
+ var _styles = require("@mui/material/styles");
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
+ var _MenuIcon;
18
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
19
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
+ function appBarLabel(label) {
21
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Toolbar.default, {
22
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
23
+ edge: "start",
24
+ color: "inherit",
25
+ "aria-label": "menu",
26
+ sx: {
27
+ mr: 2
28
+ },
29
+ children: _MenuIcon || (_MenuIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Menu.default, {}))
30
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
31
+ variant: "h6",
32
+ noWrap: true,
33
+ component: "div",
34
+ sx: {
35
+ flexGrow: 1
36
+ },
37
+ children: label
38
+ })]
39
+ });
40
+ }
41
+ const darkTheme = (0, _styles.createTheme)({
42
+ palette: {
43
+ mode: 'dark',
44
+ primary: {
45
+ main: '#1976d2'
46
+ }
47
+ }
48
+ });
49
+ function EnableColorOnDarkAppBar() {
50
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Stack.default, {
51
+ spacing: 2,
52
+ sx: {
53
+ flexGrow: 1
54
+ },
55
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.ThemeProvider, {
56
+ theme: darkTheme,
57
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppBar.default, {
58
+ position: "static",
59
+ color: "primary",
60
+ enableColorOnDark: true,
61
+ children: appBarLabel('enableColorOnDark')
62
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppBar.default, {
63
+ position: "static",
64
+ color: "primary",
65
+ children: appBarLabel('default')
66
+ })]
67
+ })
68
+ });
69
+ }
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+
3
+ var _jsxRuntime = require("react/jsx-runtime");
4
+ function FacebookCircularProgress(props) {
5
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Box, {
6
+ sx: {
7
+ position: 'relative'
8
+ },
9
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(CircularProgress, {
10
+ variant: "determinate",
11
+ sx: {
12
+ color: theme => theme.palette.grey[theme.palette.mode === 'light' ? 200 : 800]
13
+ },
14
+ size: 40,
15
+ thickness: 4,
16
+ ...props,
17
+ value: 100
18
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(CircularProgress, {
19
+ variant: "indeterminate",
20
+ disableShrink: true,
21
+ sx: {
22
+ color: theme => theme.palette.mode === 'light' ? '#1a90ff' : '#308fe8',
23
+ animationDuration: '550ms',
24
+ position: 'absolute',
25
+ left: 0,
26
+ [`& .${circularProgressClasses.circle}`]: {
27
+ strokeLinecap: 'round'
28
+ }
29
+ },
30
+ size: 40,
31
+ thickness: 4,
32
+ ...props
33
+ })]
34
+ });
35
+ }
36
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Paper, {
37
+ elevation: 0,
38
+ sx: {
39
+ display: 'flex',
40
+ border: theme => `1px solid ${theme.palette.divider}`,
41
+ flexWrap: 'wrap'
42
+ }
43
+ });
44
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Divider, {
45
+ sx: {
46
+ border: theme => `1px solid ${theme.palette.mode === 'dark' ? '#fff' : '#000'}`
47
+ }
48
+ });
49
+ /*#__PURE__*/(0, _jsxRuntime.jsxs)(Typography, {
50
+ component: "span",
51
+ variant: "subtitle1",
52
+ color: "inherit",
53
+ sx: {
54
+ position: 'relative',
55
+ p: 4,
56
+ pt: 2,
57
+ pb: theme => `calc(${theme.spacing(1)} + 6px)`
58
+ },
59
+ children: [image.title, /*#__PURE__*/(0, _jsxRuntime.jsx)(ImageMarked, {
60
+ className: "MuiImageMarked-root"
61
+ })]
62
+ });
63
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Autocomplete, {
64
+ sx: {
65
+ display: 'inline-block',
66
+ '& input': {
67
+ width: 200,
68
+ bgcolor: 'background.paper',
69
+ color: theme => theme.palette.getContrastText(theme.palette.background.paper)
70
+ }
71
+ },
72
+ id: "custom-input-demo",
73
+ options: options,
74
+ renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
75
+ ref: params.InputProps.ref,
76
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
77
+ type: "text",
78
+ ...params.inputProps
79
+ })
80
+ })
81
+ });
82
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
83
+ sx: {
84
+ position: 'relative',
85
+ width: 400,
86
+ bgcolor: 'background.paper',
87
+ border: '2px solid #000',
88
+ boxShadow: theme => theme.shadows[5],
89
+ p: 4
90
+ }
91
+ });
92
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Backdrop, {
93
+ sx: {
94
+ color: '#fff',
95
+ zIndex: theme => theme.zIndex.drawer + 1
96
+ },
97
+ open: open,
98
+ onClick: handleClose,
99
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(CircularProgress, {
100
+ color: "inherit"
101
+ })
102
+ });
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+
3
+ var _jsxRuntime = require("react/jsx-runtime");
4
+ function FacebookCircularProgress(props) {
5
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Box, {
6
+ sx: {
7
+ position: 'relative'
8
+ },
9
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(CircularProgress, {
10
+ variant: "determinate",
11
+ sx: theme => ({
12
+ color: theme.palette.grey[800],
13
+ ...theme.applyStyles("light", {
14
+ color: theme.palette.grey[200]
15
+ })
16
+ }),
17
+ size: 40,
18
+ thickness: 4,
19
+ ...props,
20
+ value: 100
21
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(CircularProgress, {
22
+ variant: "indeterminate",
23
+ disableShrink: true,
24
+ sx: theme => ({
25
+ color: '#308fe8',
26
+ animationDuration: '550ms',
27
+ position: 'absolute',
28
+ left: 0,
29
+ [`& .${circularProgressClasses.circle}`]: {
30
+ strokeLinecap: 'round'
31
+ },
32
+ ...theme.applyStyles("light", {
33
+ color: '#1a90ff'
34
+ })
35
+ }),
36
+ size: 40,
37
+ thickness: 4,
38
+ ...props
39
+ })]
40
+ });
41
+ }
42
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Paper, {
43
+ elevation: 0,
44
+ sx: theme => ({
45
+ display: 'flex',
46
+ border: `1px solid ${theme.palette.divider}`,
47
+ flexWrap: 'wrap'
48
+ })
49
+ });
50
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Divider, {
51
+ sx: theme => ({
52
+ border: `1px solid ${'#000'}`,
53
+ ...theme.applyStyles("dark", {
54
+ border: `1px solid ${'#fff'}`
55
+ })
56
+ })
57
+ });
58
+ /*#__PURE__*/(0, _jsxRuntime.jsxs)(Typography, {
59
+ component: "span",
60
+ variant: "subtitle1",
61
+ color: "inherit",
62
+ sx: theme => ({
63
+ position: 'relative',
64
+ p: 4,
65
+ pt: 2,
66
+ pb: `calc(${theme.spacing(1)} + 6px)`
67
+ }),
68
+ children: [image.title, /*#__PURE__*/(0, _jsxRuntime.jsx)(ImageMarked, {
69
+ className: "MuiImageMarked-root"
70
+ })]
71
+ });
72
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Autocomplete, {
73
+ sx: theme => ({
74
+ display: 'inline-block',
75
+ '& input': {
76
+ width: 200,
77
+ bgcolor: 'background.paper',
78
+ color: theme.palette.getContrastText(theme.palette.background.paper)
79
+ }
80
+ }),
81
+ id: "custom-input-demo",
82
+ options: options,
83
+ renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
84
+ ref: params.InputProps.ref,
85
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
86
+ type: "text",
87
+ ...params.inputProps
88
+ })
89
+ })
90
+ });
91
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
92
+ sx: theme => ({
93
+ position: 'relative',
94
+ width: 400,
95
+ bgcolor: 'background.paper',
96
+ border: '2px solid #000',
97
+ boxShadow: theme.shadows[5],
98
+ p: 4
99
+ })
100
+ });
101
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Backdrop, {
102
+ sx: theme => ({
103
+ color: '#fff',
104
+ zIndex: theme.zIndex.drawer + 1
105
+ }),
106
+ open: open,
107
+ onClick: handleClose,
108
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(CircularProgress, {
109
+ color: "inherit"
110
+ })
111
+ });