@m4l/graphics 0.0.15 → 0.0.19

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 (83) hide show
  1. package/dist/commonjs.js +1 -0
  2. package/dist/components/Page/index.js +31 -0
  3. package/dist/components/ProgressBarStyle/index.js +34 -0
  4. package/dist/components/index.js +4 -1318
  5. package/dist/contexts/HostThemeContext/index.js +71 -0
  6. package/dist/contexts/LocalesContext/index.js +46 -0
  7. package/dist/contexts/index.js +3 -174
  8. package/dist/hooks/index.js +6 -40
  9. package/dist/hooks/useHostTheme/index.js +9 -0
  10. package/dist/hooks/useLocales/index.js +9 -0
  11. package/dist/hooks/useResponsive/index.js +26 -0
  12. package/dist/index.js +19 -1654
  13. package/dist/lib/components/Page/index.d.ts +3 -9
  14. package/dist/lib/components/Page/types.d.ts +7 -0
  15. package/dist/lib/components/{ProgressBar → ProgressBarStyle}/index.d.ts +0 -1
  16. package/dist/lib/components/index.d.ts +1 -6
  17. package/dist/lib/hooks/useHostTheme/index.d.ts +1 -0
  18. package/dist/lib/hooks/useLocales/index.d.ts +1 -0
  19. package/dist/lib/hooks/{useResponsive.d.ts → useResponsive/index.d.ts} +0 -0
  20. package/dist/lib/index.d.ts +0 -1
  21. package/dist/lib/theme/palette.d.ts +1 -2
  22. package/dist/react-helmet-async-invariant.js +19 -0
  23. package/dist/react-helmet-async-react-fast-compare.js +90 -0
  24. package/dist/react-helmet-async-shallowequal.js +32 -0
  25. package/dist/react-helmet-async.js +363 -0
  26. package/dist/theme/index.js +1553 -0
  27. package/dist/utils/index.js +91 -0
  28. package/package.json +3 -9
  29. package/dist/components/mui_extended/index.js +0 -53
  30. package/dist/layouts/index.js +0 -39
  31. package/dist/lib/components/CompanyLogo/index.d.ts +0 -3
  32. package/dist/lib/components/CompanyLogo/styles.d.ts +0 -5
  33. package/dist/lib/components/CompanyLogo/types.d.ts +0 -6
  34. package/dist/lib/components/Image/index.d.ts +0 -3
  35. package/dist/lib/components/Image/styles.d.ts +0 -5
  36. package/dist/lib/components/Image/types.d.ts +0 -19
  37. package/dist/lib/components/LanguagePopover/index.d.ts +0 -3
  38. package/dist/lib/components/LanguagePopover/types.d.ts +0 -3
  39. package/dist/lib/components/LinkWithRoute/index.d.ts +0 -3
  40. package/dist/lib/components/LinkWithRoute/types.d.ts +0 -7
  41. package/dist/lib/components/Loadable/index.d.ts +0 -2
  42. package/dist/lib/components/Typography/index.d.ts +0 -3
  43. package/dist/lib/components/Typography/types.d.ts +0 -5
  44. package/dist/lib/components/animate/DialogAnimate.d.ts +0 -7
  45. package/dist/lib/components/animate/FabButtonAnimate.d.ts +0 -8
  46. package/dist/lib/components/animate/IconButtonAnimate/index.d.ts +0 -4
  47. package/dist/lib/components/animate/MotionContainer.d.ts +0 -10
  48. package/dist/lib/components/animate/MotionInView.d.ts +0 -9
  49. package/dist/lib/components/animate/MotionLazyContainer.d.ts +0 -6
  50. package/dist/lib/components/animate/TextAnimate.d.ts +0 -9
  51. package/dist/lib/components/animate/index.d.ts +0 -8
  52. package/dist/lib/components/animate/type.d.ts +0 -26
  53. package/dist/lib/components/animate/variants/actions.d.ts +0 -5
  54. package/dist/lib/components/animate/variants/background.d.ts +0 -104
  55. package/dist/lib/components/animate/variants/bounce.d.ts +0 -136
  56. package/dist/lib/components/animate/variants/container.d.ts +0 -19
  57. package/dist/lib/components/animate/variants/fade.d.ts +0 -217
  58. package/dist/lib/components/animate/variants/flip.d.ts +0 -75
  59. package/dist/lib/components/animate/variants/index.d.ts +0 -12
  60. package/dist/lib/components/animate/variants/path.d.ts +0 -14
  61. package/dist/lib/components/animate/variants/rotate.d.ts +0 -39
  62. package/dist/lib/components/animate/variants/scale.d.ts +0 -75
  63. package/dist/lib/components/animate/variants/slide.d.ts +0 -155
  64. package/dist/lib/components/animate/variants/transition.d.ts +0 -13
  65. package/dist/lib/components/animate/variants/zoom.d.ts +0 -199
  66. package/dist/lib/components/mui_extended/LoadingButton/index.d.ts +0 -3
  67. package/dist/lib/components/mui_extended/LoadingButton/skeleton.d.ts +0 -2
  68. package/dist/lib/components/mui_extended/LoadingButton/styles.d.ts +0 -2
  69. package/dist/lib/components/mui_extended/LoadingButton/types.d.ts +0 -5
  70. package/dist/lib/components/mui_extended/Typography/index.d.ts +0 -3
  71. package/dist/lib/components/mui_extended/Typography/types.d.ts +0 -5
  72. package/dist/lib/components/mui_extended/index.d.ts +0 -37
  73. package/dist/lib/hooks/useHostTheme.d.ts +0 -1
  74. package/dist/lib/hooks/useLocales.d.ts +0 -1
  75. package/dist/lib/layouts/NoAuthModuleLayout/components/ModuleWrapper/index.d.ts +0 -3
  76. package/dist/lib/layouts/NoAuthModuleLayout/components/ModuleWrapper/styles.d.ts +0 -13
  77. package/dist/lib/layouts/NoAuthModuleLayout/components/ModuleWrapper/types.d.ts +0 -4
  78. package/dist/lib/layouts/NoAuthModuleLayout/contexts/NoAuthModuleContext/index.d.ts +0 -5
  79. package/dist/lib/layouts/NoAuthModuleLayout/contexts/NoAuthModuleContext/types.d.ts +0 -12
  80. package/dist/lib/layouts/NoAuthModuleLayout/index.d.ts +0 -3
  81. package/dist/lib/layouts/NoAuthModuleLayout/types.d.ts +0 -11
  82. package/dist/lib/layouts/index.d.ts +0 -1
  83. package/dist/node_modules.js +0 -150
package/dist/index.js CHANGED
@@ -1,1660 +1,25 @@
1
- export { L as LoadingButton } from "./components/mui_extended/index.js";
2
- export { D as DialogAnimate, F as FabButtonAnimate, I as IconButtonAnimate, c as LinkWithRoute, L as Loadable, f as MotionContainer, e as MotionInView, g as MotionLazyContainer, b as Page, P as ProgressBar, a as ProgressBarStyle, h as TRANSITION, d as TextAnimate, T as Typography, u as varBgColor, w as varBgKenburns, x as varBgPan, n as varBounce, q as varContainer, i as varFade, k as varFlip, p as varHover, v as varPath, o as varRotate, m as varScale, l as varSlide, s as varTranEnter, t as varTranExit, r as varTranHover, j as varZoom } from "./components/index.js";
3
- export { N as NoAuthModuleLayout } from "./layouts/index.js";
4
- export { H as HostThemeContext, b as HostThemeProvider, L as LocalesContext, a as LocalesProvider } from "./contexts/index.js";
5
- export { HelmetProvider } from "react-helmet-async";
6
- export { e as useHostTheme, c as useIsMountedRef, u as useLocales, d as useOffSetTop, a as useResponsive, b as useResponsiveDesktop } from "./hooks/index.js";
1
+ export { P as ProgressBarStyle } from "./components/ProgressBarStyle/index.js";
2
+ export { P as Page } from "./components/Page/index.js";
3
+ export { L as LocalesContext, a as LocalesProvider } from "./contexts/LocalesContext/index.js";
4
+ export { H as HostThemeContext, a as HostThemeProvider } from "./contexts/HostThemeContext/index.js";
5
+ export { q as HelmetProvider } from "./react-helmet-async.js";
6
+ export { u as useResponsive, a as useResponsiveDesktop } from "./hooks/useResponsive/index.js";
7
+ export { u as useIsMountedRef, a as useOffSetTop } from "./hooks/index.js";
8
+ export { u as useLocales } from "./hooks/useLocales/index.js";
9
+ export { u as useHostTheme } from "./hooks/useHostTheme/index.js";
7
10
  export { Controller, useFormContext, useWatch } from "react-hook-form";
8
- import { alpha } from "@mui/material/styles";
9
- import "@mui/material/useMediaQuery";
10
- import { alpha as alpha$1 } from "@mui/material";
11
- import "@mui/lab";
11
+ export { d as defaultThemeOptions, f as fnComponentsOverrides } from "./theme/index.js";
12
+ import "@mui/material/styles";
13
+ import "@mui/material";
12
14
  import "react/jsx-runtime";
13
15
  import "react";
14
- import "nprogress";
15
- import "react-router-dom";
16
- import "framer-motion";
17
- import "./node_modules.js";
18
- import "@m4l/core";
19
- import "react-lazy-load-image-component";
20
- import "react-lazy-load-image-component/src/effects/blur.css";
21
16
  import "date-fns/locale/es";
22
17
  import "date-fns/locale/fr";
23
18
  import "date-fns/locale/en-US";
24
- function pxToRem(value) {
25
- return `${value / 16}rem`;
26
- }
27
- function responsiveFontSizes({ sm, md, lg }) {
28
- return {
29
- "@media (min-width:600px)": {
30
- fontSize: pxToRem(sm)
31
- },
32
- "@media (min-width:900px)": {
33
- fontSize: pxToRem(md)
34
- },
35
- "@media (min-width:1200px)": {
36
- fontSize: pxToRem(lg)
37
- }
38
- };
39
- }
40
- const FONT_PRIMARY = "Public Sans, sans-serif";
41
- const typography = {
42
- fontFamily: FONT_PRIMARY,
43
- fontWeightRegular: 400,
44
- fontWeightMedium: 600,
45
- fontWeightBold: 700,
46
- h1: {
47
- fontWeight: 700,
48
- lineHeight: 80 / 64,
49
- fontSize: pxToRem(40),
50
- letterSpacing: 2,
51
- ...responsiveFontSizes({ sm: 52, md: 58, lg: 64 })
52
- },
53
- h2: {
54
- fontWeight: 700,
55
- lineHeight: 64 / 48,
56
- fontSize: pxToRem(32),
57
- ...responsiveFontSizes({ sm: 40, md: 44, lg: 48 })
58
- },
59
- h3: {
60
- fontWeight: 700,
61
- lineHeight: 1.5,
62
- fontSize: pxToRem(24),
63
- ...responsiveFontSizes({ sm: 26, md: 30, lg: 32 })
64
- },
65
- h4: {
66
- fontWeight: 700,
67
- lineHeight: 1.5,
68
- fontSize: pxToRem(20),
69
- ...responsiveFontSizes({ sm: 20, md: 24, lg: 24 })
70
- },
71
- h5: {
72
- fontWeight: 700,
73
- lineHeight: 1.5,
74
- fontSize: pxToRem(18),
75
- ...responsiveFontSizes({ sm: 19, md: 20, lg: 20 })
76
- },
77
- h6: {
78
- fontWeight: 700,
79
- lineHeight: 28 / 18,
80
- fontSize: pxToRem(17),
81
- ...responsiveFontSizes({ sm: 18, md: 18, lg: 18 })
82
- },
83
- subtitle1: {
84
- fontWeight: 600,
85
- lineHeight: 1.5,
86
- fontSize: pxToRem(14)
87
- },
88
- subtitle2: {
89
- fontWeight: 600,
90
- lineHeight: 1.5,
91
- fontSize: pxToRem(12)
92
- },
93
- body0: {
94
- lineHeight: 1.5,
95
- fontWeight: 400,
96
- fontSize: pxToRem(16)
97
- },
98
- body1: {
99
- lineHeight: 1.5,
100
- fontWeight: 400,
101
- fontSize: pxToRem(14)
102
- },
103
- body2: {
104
- lineHeight: 1.5,
105
- fontWeight: 400,
106
- fontSize: pxToRem(12)
107
- },
108
- caption: {
109
- lineHeight: 1.5,
110
- fontSize: pxToRem(11)
111
- },
112
- overline: {
113
- fontWeight: 700,
114
- lineHeight: 1.5,
115
- fontSize: pxToRem(12),
116
- textTransform: "uppercase"
117
- },
118
- button: {
119
- fontWeight: 700,
120
- lineHeight: 24 / 14,
121
- fontSize: pxToRem(14),
122
- textTransform: "capitalize"
123
- }
124
- };
125
- function createGradient(color1, color2) {
126
- return `linear-gradient(to bottom, ${color1}, ${color2})`;
127
- }
128
- const PRIMARY = {
129
- lighter: "#C8FACD",
130
- light: "#5BE584",
131
- main: "#00AB55",
132
- dark: "#007B55",
133
- darker: "#005249"
134
- };
135
- const SECONDARY = {
136
- lighter: "#D6E4FF",
137
- light: "#84A9FF",
138
- main: "#3366FF",
139
- dark: "#1939B7",
140
- darker: "#091A7A"
141
- };
142
- const INFO = {
143
- lighter: "#D0F2FF",
144
- light: "#74CAFF",
145
- main: "#1890FF",
146
- dark: "#0C53B7",
147
- darker: "#04297A"
148
- };
149
- const SUCCESS = {
150
- lighter: "#E9FCD4",
151
- light: "#AAF27F",
152
- main: "#54D62C",
153
- dark: "#229A16",
154
- darker: "#08660D"
155
- };
156
- const WARNING = {
157
- lighter: "#FFF7CD",
158
- light: "#FFE16A",
159
- main: "#FFC107",
160
- dark: "#B78103",
161
- darker: "#7A4F01"
162
- };
163
- const ERROR = {
164
- lighter: "#FFE7D9",
165
- light: "#FFA48D",
166
- main: "#FF4842",
167
- dark: "#B72136",
168
- darker: "#7A0C2E"
169
- };
170
- const GREY = {
171
- 0: "#FFFFFF",
172
- 100: "#F9FAFB",
173
- 200: "#F4F6F8",
174
- 300: "#DFE3E8",
175
- 400: "#C4CDD5",
176
- 500: "#919EAB",
177
- 600: "#637381",
178
- 700: "#454F5B",
179
- 800: "#212B36",
180
- 900: "#161C24",
181
- 5008: alpha("#919EAB", 0.08),
182
- 50012: alpha("#919EAB", 0.12),
183
- 50016: alpha("#919EAB", 0.16),
184
- 50024: alpha("#919EAB", 0.24),
185
- 50032: alpha("#919EAB", 0.32),
186
- 50048: alpha("#919EAB", 0.48),
187
- 50056: alpha("#919EAB", 0.56),
188
- 50080: alpha("#919EAB", 0.8)
189
- };
190
- const GRADIENTS = {
191
- primary: createGradient(PRIMARY.light, PRIMARY.main),
192
- info: createGradient(INFO.light, INFO.main),
193
- success: createGradient(SUCCESS.light, SUCCESS.main),
194
- warning: createGradient(WARNING.light, WARNING.main),
195
- error: createGradient(ERROR.light, ERROR.main)
196
- };
197
- const CHART_COLORS = {
198
- violet: ["#826AF9", "#9E86FF", "#D0AEFF", "#F7D2FF"],
199
- blue: ["#2D99FF", "#83CFFF", "#A5F3FF", "#CCFAFF"],
200
- green: ["#2CD9C5", "#60F1C8", "#A4F7CC", "#C0F2DC"],
201
- yellow: ["#FFE700", "#FFEF5A", "#FFF7AE", "#FFF3D6"],
202
- red: ["#FF6C40", "#FF8F6D", "#FFBD98", "#FFF2D4"]
203
- };
204
- const COMMON = {
205
- common: { black: "#000", white: "#fff" },
206
- primary: { ...PRIMARY, contrastText: "#fff" },
207
- secondary: { ...SECONDARY, contrastText: "#fff" },
208
- info: { ...INFO, contrastText: "#fff" },
209
- success: { ...SUCCESS, contrastText: GREY[800] },
210
- warning: { ...WARNING, contrastText: GREY[800] },
211
- error: { ...ERROR, contrastText: "#fff" },
212
- grey: GREY,
213
- gradients: GRADIENTS,
214
- chart: CHART_COLORS,
215
- divider: GREY[50024],
216
- action: {
217
- hover: GREY[5008],
218
- selected: GREY[50016],
219
- disabled: GREY[50080],
220
- disabledBackground: GREY[50024],
221
- focus: GREY[50024],
222
- hoverOpacity: 0.08,
223
- disabledOpacity: 0.48
224
- }
225
- };
226
- const palette = {
227
- light: {
228
- ...COMMON,
229
- mode: "light",
230
- text: { primary: GREY[800], secondary: GREY[700], disabled: GREY[500] },
231
- background: {
232
- paper: "#fff",
233
- default: "#fff",
234
- neutral: GREY[200],
235
- autocomplete: GREY[100],
236
- header: "#F6F7F9"
237
- },
238
- action: { active: GREY[600], ...COMMON.action },
239
- grid: { sectionHeader: "#F6F7F9", divider: "#EDEFF2", rowHover: "#FAFBFC" }
240
- },
241
- dark: {
242
- ...COMMON,
243
- mode: "dark",
244
- text: { primary: "#fff", secondary: GREY[500], disabled: GREY[600] },
245
- background: {
246
- paper: GREY[800],
247
- default: GREY[900],
248
- neutral: GREY[50016],
249
- autocomplete: GREY[800],
250
- header: "#29313A"
251
- },
252
- action: { active: GREY[500], ...COMMON.action },
253
- grid: { sectionHeader: "#29313A", divider: "#3E464F", rowHover: "#1F262F" }
254
- }
255
- };
256
- const LIGHT_MODE = palette.light.grey[500];
257
- const DARK_MODE = "#000000";
258
- const createShadow = (color) => {
259
- const transparent1 = alpha(color, 0.2);
260
- const transparent2 = alpha(color, 0.14);
261
- const transparent3 = alpha(color, 0.12);
262
- return [
263
- "none",
264
- `0px 2px 1px -1px ${transparent1},0px 1px 1px 0px ${transparent2},0px 1px 3px 0px ${transparent3}`,
265
- `0px 3px 1px -2px ${transparent1},0px 2px 2px 0px ${transparent2},0px 1px 5px 0px ${transparent3}`,
266
- `0px 3px 3px -2px ${transparent1},0px 3px 4px 0px ${transparent2},0px 1px 8px 0px ${transparent3}`,
267
- `0px 2px 4px -1px ${transparent1},0px 4px 5px 0px ${transparent2},0px 1px 10px 0px ${transparent3}`,
268
- `0px 3px 5px -1px ${transparent1},0px 5px 8px 0px ${transparent2},0px 1px 14px 0px ${transparent3}`,
269
- `0px 3px 5px -1px ${transparent1},0px 6px 10px 0px ${transparent2},0px 1px 18px 0px ${transparent3}`,
270
- `0px 4px 5px -2px ${transparent1},0px 7px 10px 1px ${transparent2},0px 2px 16px 1px ${transparent3}`,
271
- `0px 5px 5px -3px ${transparent1},0px 8px 10px 1px ${transparent2},0px 3px 14px 2px ${transparent3}`,
272
- `0px 5px 6px -3px ${transparent1},0px 9px 12px 1px ${transparent2},0px 3px 16px 2px ${transparent3}`,
273
- `0px 6px 6px -3px ${transparent1},0px 10px 14px 1px ${transparent2},0px 4px 18px 3px ${transparent3}`,
274
- `0px 6px 7px -4px ${transparent1},0px 11px 15px 1px ${transparent2},0px 4px 20px 3px ${transparent3}`,
275
- `0px 7px 8px -4px ${transparent1},0px 12px 17px 2px ${transparent2},0px 5px 22px 4px ${transparent3}`,
276
- `0px 7px 8px -4px ${transparent1},0px 13px 19px 2px ${transparent2},0px 5px 24px 4px ${transparent3}`,
277
- `0px 7px 9px -4px ${transparent1},0px 14px 21px 2px ${transparent2},0px 5px 26px 4px ${transparent3}`,
278
- `0px 8px 9px -5px ${transparent1},0px 15px 22px 2px ${transparent2},0px 6px 28px 5px ${transparent3}`,
279
- `0px 8px 10px -5px ${transparent1},0px 16px 24px 2px ${transparent2},0px 6px 30px 5px ${transparent3}`,
280
- `0px 8px 11px -5px ${transparent1},0px 17px 26px 2px ${transparent2},0px 6px 32px 5px ${transparent3}`,
281
- `0px 9px 11px -5px ${transparent1},0px 18px 28px 2px ${transparent2},0px 7px 34px 6px ${transparent3}`,
282
- `0px 9px 12px -6px ${transparent1},0px 19px 29px 2px ${transparent2},0px 7px 36px 6px ${transparent3}`,
283
- `0px 10px 13px -6px ${transparent1},0px 20px 31px 3px ${transparent2},0px 8px 38px 7px ${transparent3}`,
284
- `0px 10px 13px -6px ${transparent1},0px 21px 33px 3px ${transparent2},0px 8px 40px 7px ${transparent3}`,
285
- `0px 10px 14px -6px ${transparent1},0px 22px 35px 3px ${transparent2},0px 8px 42px 7px ${transparent3}`,
286
- `0px 11px 14px -7px ${transparent1},0px 23px 36px 3px ${transparent2},0px 9px 44px 8px ${transparent3}`,
287
- `0px 11px 15px -7px ${transparent1},0px 24px 38px 3px ${transparent2},0px 9px 46px 8px ${transparent3}`
288
- ];
289
- };
290
- const createCustomShadow = (color) => {
291
- const transparent = alpha(color, 0.16);
292
- return {
293
- z1: `0 1px 2px 0 ${transparent}`,
294
- z8: `0 8px 16px 0 ${transparent}`,
295
- z12: `0 12px 24px -4px ${transparent}`,
296
- z16: `0 16px 32px -4px ${transparent}`,
297
- z20: `0 20px 40px -4px ${transparent}`,
298
- z24: `0 24px 48px 0 ${transparent}`,
299
- primary: `0 8px 16px 0 ${alpha(palette.light.primary.main, 0.24)}`,
300
- info: `0 8px 16px 0 ${alpha(palette.light.info.main, 0.24)}`,
301
- secondary: `0 8px 16px 0 ${alpha(palette.light.secondary.main, 0.24)}`,
302
- success: `0 8px 16px 0 ${alpha(palette.light.success.main, 0.24)}`,
303
- warning: `0 8px 16px 0 ${alpha(palette.light.warning.main, 0.24)}`,
304
- error: `0 8px 16px 0 ${alpha(palette.light.error.main, 0.24)}`,
305
- card: `0 0 2px 0 ${alpha(color, 0.2)}, 0 12px 24px -4px ${alpha(color, 0.12)}`,
306
- dialog: `-40px 40px 80px -8px ${alpha(palette.light.common.black, 0.24)}`,
307
- dropdown: `0 0 2px 0 ${alpha(color, 0.24)}, -20px 20px 40px -4px ${alpha(color, 0.24)}`
308
- };
309
- };
310
- const customShadows = {
311
- light: createCustomShadow(LIGHT_MODE),
312
- dark: createCustomShadow(DARK_MODE)
313
- };
314
- const shadows = {
315
- light: createShadow(LIGHT_MODE),
316
- dark: createShadow(DARK_MODE)
317
- };
318
- const colorPresets = [
319
- {
320
- name: "default",
321
- ...palette.light.primary,
322
- LightSelected: "#EBF9F1",
323
- LightSelectedHover: "#D6F2E3",
324
- DarkSelected: "#142827",
325
- DarkSelectedHover: "#12342B"
326
- },
327
- {
328
- name: "purple",
329
- lighter: "#EBD6FD",
330
- light: "#B985F4",
331
- main: "#7635dc",
332
- dark: "#431A9E",
333
- darker: "#200A69",
334
- contrastText: "#fff"
335
- },
336
- {
337
- name: "cyan",
338
- lighter: "#D1FFFC",
339
- light: "#76F2FF",
340
- main: "#1CCAFF",
341
- dark: "#0E77B7",
342
- darker: "#053D7A",
343
- contrastText: palette.light.grey[800]
344
- },
345
- {
346
- name: "blue",
347
- lighter: "#D1E9FC",
348
- light: "#76B0F1",
349
- main: "#2065D1",
350
- dark: "#103996",
351
- darker: "#061B64",
352
- contrastText: "#fff"
353
- },
354
- {
355
- name: "orange",
356
- lighter: "#FEF4D4",
357
- light: "#FED680",
358
- main: "#fda92d",
359
- dark: "#B66816",
360
- darker: "#793908",
361
- contrastText: palette.light.grey[800]
362
- },
363
- {
364
- name: "red",
365
- lighter: "#FFE3D5",
366
- light: "#FFC1AC",
367
- main: "#FF3030",
368
- dark: "#B71833",
369
- darker: "#7A0930",
370
- contrastText: "#fff"
371
- }
372
- ];
373
- const defaultPreset = colorPresets[0];
374
- const purplePreset = colorPresets[1];
375
- const cyanPreset = colorPresets[2];
376
- const bluePreset = colorPresets[3];
377
- const orangePreset = colorPresets[4];
378
- const redPreset = colorPresets[5];
379
- function getColorPresets(presetsKey) {
380
- return {
381
- purple: purplePreset,
382
- cyan: cyanPreset,
383
- blue: bluePreset,
384
- orange: orangePreset,
385
- red: redPreset,
386
- default: defaultPreset
387
- }[presetsKey];
388
- }
389
- const defaultThemeOptions = {
390
- typography,
391
- shadows: shadows.light,
392
- customShadows: {
393
- ...customShadows.light,
394
- primary: `0 8px 16px 0 ${alpha(getColorPresets("default").main, 0.24)}`
395
- },
396
- palette: {
397
- ...palette.light,
398
- primary: {
399
- lighter: "#283829",
400
- light: "#26372b",
401
- main: "#00AB55",
402
- dark: "#007B55",
403
- darker: "#005249",
404
- LightSelected: "#EBF9F1",
405
- LightSelectedHover: "#D6F2E3",
406
- DarkSelected: "#142827",
407
- DarkSelectedHover: "#12342B"
408
- },
409
- text: { primary: GREY[800], secondary: GREY[700], disabled: GREY[500] },
410
- secondary: {
411
- main: "#34ac4e"
412
- }
413
- }
414
- };
415
- function Avatar(theme) {
416
- return {
417
- MuiAvatar: {
418
- styleOverrides: {
419
- colorDefault: {
420
- color: theme.palette.text.secondary,
421
- backgroundColor: theme.palette.grey[400]
422
- }
423
- }
424
- },
425
- MuiAvatarGroup: {
426
- styleOverrides: {
427
- avatar: {
428
- fontSize: 16,
429
- fontWeight: theme.typography.fontWeightMedium,
430
- "&:first-of-type": {
431
- fontSize: 14,
432
- color: theme.palette.primary.main,
433
- backgroundColor: theme.palette.primary.lighter
434
- }
435
- }
436
- }
437
- }
438
- };
439
- }
440
- function Button(theme) {
441
- return {
442
- MuiButton: {
443
- styleOverrides: {
444
- root: {
445
- "&:hover": {
446
- boxShadow: "none"
447
- }
448
- },
449
- sizeLarge: {
450
- height: 48
451
- },
452
- containedInherit: {
453
- color: theme.palette.grey[800],
454
- boxShadow: theme.customShadows.z1,
455
- "&:hover": {
456
- backgroundColor: theme.palette.grey[400]
457
- }
458
- },
459
- containedPrimary: {
460
- boxShadow: theme.customShadows.z24
461
- },
462
- containedSecondary: {
463
- boxShadow: theme.customShadows.secondary
464
- },
465
- containedInfo: {
466
- boxShadow: theme.customShadows.info
467
- },
468
- containedSuccess: {
469
- boxShadow: theme.customShadows.success
470
- },
471
- containedWarning: {
472
- boxShadow: theme.customShadows.warning
473
- },
474
- containedError: {
475
- boxShadow: theme.customShadows.error
476
- },
477
- outlinedInherit: {
478
- border: `1px solid ${theme.palette.grey[50032]}`,
479
- "&:hover": {
480
- backgroundColor: theme.palette.action.hover
481
- }
482
- },
483
- textInherit: {
484
- "&:hover": {
485
- backgroundColor: theme.palette.action.hover
486
- }
487
- }
488
- }
489
- }
490
- };
491
- }
492
- function IconButton(theme) {
493
- return {
494
- MuiIconButton: {
495
- styleOverrides: {
496
- root: {
497
- "&.MuiIconButton-sizeSmall": {
498
- height: theme.spacing(3.75),
499
- width: theme.spacing(3.75),
500
- margin: 0,
501
- padding: 0,
502
- " > svg": {
503
- height: 20,
504
- width: 20
505
- },
506
- "& .MuiBox-root": {
507
- height: 20,
508
- width: 20
509
- }
510
- }
511
- }
512
- }
513
- }
514
- };
515
- }
516
- function Fab(theme) {
517
- return {
518
- MuiFab: {
519
- defaultProps: {
520
- color: "primary"
521
- },
522
- styleOverrides: {
523
- root: {
524
- boxShadow: theme.customShadows.z8,
525
- "&:hover": {
526
- boxShadow: "none",
527
- backgroundColor: theme.palette.grey[400]
528
- }
529
- },
530
- primary: {
531
- boxShadow: theme.customShadows.primary,
532
- "&:hover": {
533
- backgroundColor: theme.palette.primary.dark
534
- }
535
- },
536
- secondary: {
537
- boxShadow: theme.customShadows.secondary,
538
- "&:hover": {
539
- backgroundColor: theme.palette.secondary.dark
540
- }
541
- },
542
- extended: {
543
- "& svg": {
544
- marginRight: theme.spacing(1)
545
- }
546
- }
547
- }
548
- }
549
- };
550
- }
551
- function Card(theme) {
552
- return {
553
- MuiCard: {
554
- styleOverrides: {
555
- root: {
556
- position: "relative",
557
- boxShadow: theme.customShadows.card,
558
- borderRadius: Number(theme.shape.borderRadius) * 2,
559
- zIndex: 0
560
- }
561
- }
562
- },
563
- MuiCardHeader: {
564
- defaultProps: {
565
- titleTypographyProps: { variant: "h6" },
566
- subheaderTypographyProps: { variant: "body2", marginTop: theme.spacing(0.5) }
567
- },
568
- styleOverrides: {
569
- root: {
570
- padding: theme.spacing(3, 3, 0)
571
- }
572
- }
573
- },
574
- MuiCardContent: {
575
- styleOverrides: {
576
- root: {
577
- padding: theme.spacing(3)
578
- }
579
- }
580
- }
581
- };
582
- }
583
- function Tabs(theme) {
584
- return {
585
- MuiTabs: {
586
- styleOverrides: {
587
- root: {
588
- padding: 0,
589
- fontWeight: theme.typography.fontWeightMedium,
590
- borderTopLeftRadius: theme.shape.borderRadius,
591
- borderTopRightRadius: theme.shape.borderRadius,
592
- "&.Mui-selected": {
593
- color: theme.palette.text.primary
594
- },
595
- "&:not(:last-of-type)": {
596
- marginRight: theme.spacing(5)
597
- },
598
- "@media (min-width: 600px)": {
599
- minWidth: 48
600
- },
601
- "& .MuiButtonBase-root": {
602
- ...theme.typography.subtitle2
603
- }
604
- },
605
- labelIcon: {
606
- minHeight: 48,
607
- flexDirection: "row",
608
- "& > *:first-of-type": {
609
- marginBottom: 0,
610
- marginRight: theme.spacing(1)
611
- }
612
- },
613
- wrapper: {
614
- flexDirection: "row",
615
- whiteSpace: "nowrap"
616
- },
617
- textColorInherit: {
618
- opacity: 1,
619
- color: theme.palette.text.secondary
620
- }
621
- }
622
- },
623
- MuiTabPanel: {
624
- styleOverrides: {
625
- root: {
626
- padding: 0
627
- }
628
- }
629
- },
630
- MuiTabScrollButton: {
631
- styleOverrides: {
632
- root: {
633
- width: 48,
634
- borderRadius: "50%"
635
- }
636
- }
637
- }
638
- };
639
- }
640
- function Menu(theme) {
641
- return {
642
- MuiMenuItem: {
643
- styleOverrides: {
644
- root: {
645
- "&.Mui-selected": {
646
- backgroundColor: theme.palette.action.selected,
647
- "&:hover": {
648
- backgroundColor: theme.palette.action.hover
649
- }
650
- }
651
- }
652
- }
653
- }
654
- };
655
- }
656
- function Link(theme) {
657
- return {
658
- MuiLink: {
659
- defaultProps: {
660
- underline: "hover"
661
- },
662
- styleOverrides: {
663
- root: {
664
- "&.MuiLink-underlineHover": {
665
- textDecorationColor: theme.palette.primary.main
666
- }
667
- }
668
- }
669
- }
670
- };
671
- }
672
- function List(theme) {
673
- return {
674
- MuiListItemIcon: {
675
- styleOverrides: {
676
- root: {
677
- color: "inherit",
678
- minWidth: "auto",
679
- marginRight: theme.spacing(2)
680
- }
681
- }
682
- },
683
- MuiListItemAvatar: {
684
- styleOverrides: {
685
- root: {
686
- minWidth: "auto",
687
- marginRight: theme.spacing(2)
688
- }
689
- }
690
- },
691
- MuiListItemText: {
692
- styleOverrides: {
693
- root: {
694
- marginTop: 0,
695
- marginBottom: 0
696
- },
697
- multiline: {
698
- marginTop: 0,
699
- marginBottom: 0
700
- }
701
- }
702
- }
703
- };
704
- }
705
- function Table(theme) {
706
- return {
707
- MuiTableRow: {
708
- styleOverrides: {
709
- root: {
710
- "&.Mui-selected": {
711
- backgroundColor: theme.palette.action.selected,
712
- "&:hover": {
713
- backgroundColor: theme.palette.action.hover
714
- }
715
- }
716
- }
717
- }
718
- },
719
- MuiTableCell: {
720
- styleOverrides: {
721
- root: {
722
- borderBottom: "none"
723
- },
724
- head: {
725
- color: theme.palette.text.secondary,
726
- backgroundColor: theme.palette.background.neutral,
727
- "&:first-of-type": {
728
- paddingLeft: theme.spacing(3),
729
- borderTopLeftRadius: theme.shape.borderRadius,
730
- borderBottomLeftRadius: theme.shape.borderRadius,
731
- boxShadow: `inset 8px 0 0 ${theme.palette.background.paper}`
732
- },
733
- "&:last-of-type": {
734
- paddingRight: theme.spacing(3),
735
- borderTopRightRadius: theme.shape.borderRadius,
736
- borderBottomRightRadius: theme.shape.borderRadius,
737
- boxShadow: `inset -8px 0 0 ${theme.palette.background.paper}`
738
- }
739
- },
740
- stickyHeader: {
741
- backgroundColor: theme.palette.background.paper,
742
- backgroundImage: `linear-gradient(to bottom, ${theme.palette.background.neutral} 0%, ${theme.palette.background.neutral} 100%)`
743
- },
744
- body: {
745
- "&:first-of-type": {
746
- paddingLeft: theme.spacing(3)
747
- },
748
- "&:last-of-type": {
749
- paddingRight: theme.spacing(3)
750
- }
751
- }
752
- }
753
- },
754
- MuiTablePagination: {
755
- styleOverrides: {
756
- root: {
757
- ...theme.typography.caption
758
- },
759
- toolbar: {
760
- "& .MuiInputBase-root": {
761
- marginLeft: theme.spacing(1),
762
- marginRight: theme.spacing(3),
763
- ...theme.typography.caption
764
- },
765
- "&.MuiToolbar-regular": {
766
- minHeight: 40,
767
- height: 40,
768
- paddingRight: 0
769
- },
770
- "& .MuiTablePagination-displayedRows": {
771
- ...theme.typography.caption
772
- }
773
- },
774
- selectLabel: {
775
- ...theme.typography.caption
776
- },
777
- select: {
778
- paddingBottom: 4,
779
- "&:focus": {
780
- borderRadius: theme.shape.borderRadius
781
- }
782
- },
783
- selectIcon: {
784
- width: 20,
785
- height: 20
786
- }
787
- }
788
- }
789
- };
790
- }
791
- function Badge(_theme) {
792
- return {
793
- MuiBadge: {
794
- styleOverrides: {
795
- dot: {
796
- width: 10,
797
- height: 10,
798
- borderRadius: "50%"
799
- }
800
- }
801
- }
802
- };
803
- }
804
- function Paper(theme) {
805
- return {
806
- MuiPaper: {
807
- defaultProps: {
808
- elevation: 0
809
- },
810
- variants: [
811
- {
812
- props: { variant: "outlined" },
813
- style: { borderColor: theme.palette.grey[50012] }
814
- }
815
- ],
816
- styleOverrides: {
817
- root: {
818
- backgroundImage: "none",
819
- borderRadius: "2px"
820
- }
821
- }
822
- }
823
- };
824
- }
825
- function Input(theme) {
826
- return {
827
- MuiFormControl: {
828
- styleOverrides: {
829
- root: {}
830
- }
831
- },
832
- MuiInputBase: {
833
- styleOverrides: {
834
- root: {
835
- backgroundColor: theme.palette.background.default,
836
- ...theme.typography.body2,
837
- borderRadius: theme.spacing(1),
838
- "&.Mui-disabled": {
839
- "& svg": { color: theme.palette.text.disabled }
840
- },
841
- padding: "0px"
842
- },
843
- input: {
844
- paddingLeft: "8px",
845
- "&::placeholder": {
846
- opacity: 1,
847
- color: theme.palette.text.disabled
848
- }
849
- }
850
- }
851
- },
852
- MuiInput: {
853
- styleOverrides: {
854
- underline: {
855
- "&:before": {
856
- borderBottomColor: theme.palette.grey[50056]
857
- }
858
- }
859
- }
860
- },
861
- MuiFilledInput: {
862
- styleOverrides: {
863
- root: {
864
- backgroundColor: theme.palette.grey[50012],
865
- "&:hover": {
866
- backgroundColor: theme.palette.grey[50016]
867
- },
868
- "&.Mui-focused": {
869
- backgroundColor: theme.palette.action.focus
870
- },
871
- "&.Mui-disabled": {
872
- backgroundColor: theme.palette.action.disabledBackground
873
- }
874
- },
875
- underline: {
876
- "&:before": {
877
- borderBottomColor: theme.palette.grey[50056]
878
- }
879
- }
880
- }
881
- },
882
- MuiOutlinedInput: {
883
- styleOverrides: {
884
- root: {
885
- ...theme.typography.body2,
886
- color: theme.palette.text.primary,
887
- "& > input": {
888
- padding: theme.spacing(1.5, 1.5)
889
- },
890
- "& .MuiOutlinedInput-notchedOutline": {
891
- borderColor: theme.palette.grey[50032],
892
- fontSize: "0.875rem"
893
- },
894
- "&.Mui-disabled": {
895
- "& .MuiOutlinedInput-notchedOutline": {
896
- borderColor: theme.palette.action.disabledBackground
897
- }
898
- },
899
- "& .MuiOutlinedInput-input:-webkit-autofill": {
900
- WebkitBoxShadow: `0 0 0 1000px ${theme.palette.background.autofill} inset`
901
- }
902
- }
903
- }
904
- }
905
- };
906
- }
907
- function InputLabel(_theme) {
908
- return {
909
- MuiInputLabel: {
910
- styleOverrides: {
911
- shrink: {
912
- transform: "translate(14px, -9px) scale(0.75)!important"
913
- },
914
- outlined: {
915
- transform: "translate(14px, 12px) scale(1)",
916
- fontSize: 12
917
- }
918
- }
919
- }
920
- };
921
- }
922
- function Radio(theme) {
923
- return {
924
- MuiRadio: {
925
- styleOverrides: {
926
- root: {
927
- padding: theme.spacing(1),
928
- svg: {
929
- fontSize: 24,
930
- "&[font-size=small]": {
931
- fontSize: 20
932
- }
933
- }
934
- }
935
- }
936
- }
937
- };
938
- }
939
- function Drawer(theme) {
940
- const isLight = theme.palette.mode === "light";
941
- return {
942
- MuiDrawer: {
943
- styleOverrides: {
944
- modal: {
945
- '&[role="presentation"]': {
946
- "& .MuiDrawer-paperAnchorLeft": {
947
- boxShadow: `8px 24px 24px 12px ${alpha$1(theme.palette.grey[900], isLight ? 0.16 : 0.48)}`
948
- },
949
- "& .MuiDrawer-paperAnchorRight": {
950
- boxShadow: `-8px 24px 24px 12px ${alpha$1(theme.palette.grey[900], isLight ? 0.16 : 0.48)}`
951
- }
952
- }
953
- }
954
- }
955
- }
956
- };
957
- }
958
- function Dialog(theme) {
959
- return {
960
- MuiDialog: {
961
- styleOverrides: {
962
- paper: {
963
- boxShadow: theme.customShadows.dialog,
964
- "&.MuiPaper-rounded": {
965
- borderRadius: Number(theme.shape.borderRadius) * 2
966
- },
967
- "&.MuiDialog-paperFullScreen": {
968
- borderRadius: 0
969
- },
970
- "&.MuiDialog-paper .MuiDialogActions-root": {
971
- padding: theme.spacing(3)
972
- },
973
- "@media (max-width: 600px)": {
974
- margin: theme.spacing(2)
975
- },
976
- "@media (max-width: 663.95px)": {
977
- "&.MuiDialog-paperWidthSm.MuiDialog-paperScrollBody": {
978
- maxWidth: "100%"
979
- }
980
- }
981
- },
982
- paperFullWidth: {
983
- width: "100%"
984
- }
985
- }
986
- },
987
- MuiDialogTitle: {
988
- styleOverrides: {
989
- root: {
990
- padding: theme.spacing(3, 3, 0)
991
- }
992
- }
993
- },
994
- MuiDialogContent: {
995
- styleOverrides: {
996
- root: {
997
- borderTop: 0,
998
- borderBottom: 0,
999
- padding: theme.spacing(3)
1000
- }
1001
- }
1002
- },
1003
- MuiDialogActions: {
1004
- styleOverrides: {
1005
- root: {
1006
- "& > :not(:first-of-type)": {
1007
- marginLeft: theme.spacing(1.5)
1008
- }
1009
- }
1010
- }
1011
- }
1012
- };
1013
- }
1014
- function Slider(theme) {
1015
- const isLight = theme.palette.mode === "light";
1016
- return {
1017
- MuiSlider: {
1018
- defaultProps: {
1019
- size: "small"
1020
- },
1021
- styleOverrides: {
1022
- root: {
1023
- "&.Mui-disabled": {
1024
- color: theme.palette.action.disabled
1025
- }
1026
- },
1027
- markLabel: {
1028
- fontSize: 13,
1029
- color: theme.palette.text.disabled
1030
- },
1031
- valueLabel: {
1032
- borderRadius: 8,
1033
- backgroundColor: theme.palette.grey[isLight ? 800 : 700]
1034
- }
1035
- }
1036
- }
1037
- };
1038
- }
1039
- function Switch(theme) {
1040
- const isLight = theme.palette.mode === "light";
1041
- return {
1042
- MuiSwitch: {
1043
- styleOverrides: {
1044
- thumb: {
1045
- boxShadow: theme.customShadows.z1
1046
- },
1047
- track: {
1048
- opacity: 1,
1049
- backgroundColor: theme.palette.grey[500]
1050
- },
1051
- switchBase: {
1052
- left: 0,
1053
- right: "auto",
1054
- "&:not(:.Mui-checked)": {
1055
- color: theme.palette.grey[isLight ? 100 : 300]
1056
- },
1057
- "&.Mui-checked.Mui-disabled, &.Mui-disabled": {
1058
- color: theme.palette.grey[isLight ? 400 : 600]
1059
- },
1060
- "&.Mui-disabled+.MuiSwitch-track": {
1061
- opacity: 1,
1062
- backgroundColor: `${theme.palette.action.disabledBackground} !important`
1063
- }
1064
- }
1065
- }
1066
- }
1067
- };
1068
- }
1069
- function SvgIcon(_theme) {
1070
- return {
1071
- MuiSvgIcon: {
1072
- styleOverrides: {
1073
- fontSizeSmall: {
1074
- width: 20,
1075
- height: 20,
1076
- fontSize: "inherit"
1077
- },
1078
- fontSizeLarge: {
1079
- width: 32,
1080
- height: 32,
1081
- fontSize: "inherit"
1082
- }
1083
- }
1084
- }
1085
- };
1086
- }
1087
- function Tooltip(theme) {
1088
- const isLight = theme.palette.mode === "light";
1089
- return {
1090
- MuiTooltip: {
1091
- styleOverrides: {
1092
- tooltip: {
1093
- backgroundColor: theme.palette.grey[isLight ? 800 : 700]
1094
- },
1095
- arrow: {
1096
- color: theme.palette.grey[isLight ? 800 : 700]
1097
- }
1098
- }
1099
- }
1100
- };
1101
- }
1102
- function Popover(theme) {
1103
- return {
1104
- MuiPopover: {
1105
- styleOverrides: {
1106
- paper: {
1107
- boxShadow: theme.customShadows.dropdown,
1108
- borderRadius: Number(theme.shape.borderRadius) * 1.5
1109
- }
1110
- }
1111
- }
1112
- };
1113
- }
1114
- function Stepper(theme) {
1115
- return {
1116
- MuiStepConnector: {
1117
- styleOverrides: {
1118
- line: {
1119
- borderColor: theme.palette.divider
1120
- }
1121
- }
1122
- }
1123
- };
1124
- }
1125
- function DataGrid(theme) {
1126
- return {
1127
- MuiDataGrid: {
1128
- styleOverrides: {
1129
- root: {
1130
- borderRadius: 0,
1131
- border: `1px solid transparent`,
1132
- "& .MuiTablePagination-root": {
1133
- borderTop: 0
1134
- },
1135
- "& .MuiDataGrid-toolbarContainer": {
1136
- padding: theme.spacing(2),
1137
- backgroundColor: theme.palette.background.neutral,
1138
- "& .MuiButton-root": {
1139
- marginRight: theme.spacing(1.5),
1140
- color: theme.palette.text.primary,
1141
- "&:hover": {
1142
- backgroundColor: theme.palette.action.hover
1143
- }
1144
- }
1145
- },
1146
- "& .MuiDataGrid-cell, .MuiDataGrid-columnsContainer": {
1147
- borderBottom: `1px solid ${theme.palette.divider}`
1148
- },
1149
- "& .MuiDataGrid-columnSeparator": {
1150
- color: theme.palette.divider
1151
- },
1152
- '& .MuiDataGrid-columnHeader[data-field="__check__"]': {
1153
- padding: 0
1154
- }
1155
- }
1156
- }
1157
- },
1158
- MuiGridMenu: {
1159
- styleOverrides: {
1160
- root: {
1161
- "& .MuiDataGrid-gridMenuList": {
1162
- boxShadow: theme.customShadows.z20,
1163
- borderRadius: theme.shape.borderRadius
1164
- },
1165
- "& .MuiMenuItem-root": {
1166
- ...theme.typography.body2
1167
- }
1168
- }
1169
- }
1170
- },
1171
- MuiGridFilterForm: {
1172
- styleOverrides: {
1173
- root: {
1174
- padding: theme.spacing(1.5, 0),
1175
- "& .MuiFormControl-root": {
1176
- margin: theme.spacing(0, 0.5)
1177
- },
1178
- "& .MuiInput-root": {
1179
- marginTop: theme.spacing(3),
1180
- "&::before, &::after": {
1181
- display: "none"
1182
- },
1183
- "& .MuiNativeSelect-select, .MuiInput-input": {
1184
- ...theme.typography.body2,
1185
- padding: theme.spacing(0.75, 1),
1186
- borderRadius: theme.shape.borderRadius,
1187
- backgroundColor: theme.palette.background.neutral
1188
- },
1189
- "& .MuiSvgIcon-root": {
1190
- right: 4
1191
- }
1192
- }
1193
- }
1194
- }
1195
- },
1196
- MuiGridPanelFooter: {
1197
- styleOverrides: {
1198
- root: {
1199
- padding: theme.spacing(2),
1200
- justifyContent: "flex-end",
1201
- "& .MuiButton-root": {
1202
- "&:first-of-type": {
1203
- marginRight: theme.spacing(1.5),
1204
- color: theme.palette.text.primary,
1205
- "&:hover": {
1206
- backgroundColor: theme.palette.action.hover
1207
- }
1208
- },
1209
- "&:last-of-type": {
1210
- color: theme.palette.common.white,
1211
- backgroundColor: theme.palette.primary.main,
1212
- "&:hover": {
1213
- backgroundColor: theme.palette.primary.dark
1214
- }
1215
- }
1216
- }
1217
- }
1218
- }
1219
- }
1220
- };
1221
- }
1222
- function Skeleton(theme) {
1223
- return {
1224
- MuiSkeleton: {
1225
- defaultProps: {
1226
- animation: "wave"
1227
- },
1228
- styleOverrides: {
1229
- root: {
1230
- backgroundColor: theme.palette.divider
1231
- }
1232
- }
1233
- }
1234
- };
1235
- }
1236
- function Backdrop(theme) {
1237
- const varLow = alpha(theme.palette.grey[900], 0.48);
1238
- const varHigh = alpha(theme.palette.grey[900], 1);
1239
- return {
1240
- MuiBackdrop: {
1241
- styleOverrides: {
1242
- root: {
1243
- background: [
1244
- `rgb(22,28,36)`,
1245
- `-moz-linear-gradient(75deg, ${varLow} 0%, ${varHigh} 100%)`,
1246
- `-webkit-linear-gradient(75deg, ${varLow} 0%, ${varHigh} 100%)`,
1247
- `linear-gradient(75deg, ${varLow} 0%, ${varHigh} 100%)`
1248
- ],
1249
- "&.MuiBackdrop-invisible": {
1250
- background: "transparent"
1251
- }
1252
- }
1253
- }
1254
- }
1255
- };
1256
- }
1257
- function Progress(theme) {
1258
- const isLight = theme.palette.mode === "light";
1259
- return {
1260
- MuiLinearProgress: {
1261
- styleOverrides: {
1262
- root: {
1263
- borderRadius: 4,
1264
- overflow: "hidden"
1265
- },
1266
- bar: {
1267
- borderRadius: 4
1268
- },
1269
- colorPrimary: {
1270
- backgroundColor: theme.palette.primary[isLight ? "lighter" : "darker"]
1271
- },
1272
- buffer: {
1273
- backgroundColor: "transparent"
1274
- }
1275
- }
1276
- }
1277
- };
1278
- }
1279
- function Timeline(theme) {
1280
- return {
1281
- MuiTimelineDot: {
1282
- styleOverrides: {
1283
- root: {
1284
- boxShadow: "none"
1285
- }
1286
- }
1287
- },
1288
- MuiTimelineConnector: {
1289
- styleOverrides: {
1290
- root: {
1291
- backgroundColor: theme.palette.divider
1292
- }
1293
- }
1294
- }
1295
- };
1296
- }
1297
- function Checkbox(theme) {
1298
- return {
1299
- MuiCheckbox: {
1300
- styleOverrides: {
1301
- root: {
1302
- padding: theme.spacing(1),
1303
- oleee: "sss",
1304
- color: theme.palette.action.active,
1305
- "& .Mui-checked": {
1306
- color: theme.palette.primary.main
1307
- },
1308
- "&.Mui-checked.Mui-disabled, &.Mui-disabled": {
1309
- color: theme.palette.action.disabled
1310
- }
1311
- }
1312
- }
1313
- }
1314
- };
1315
- }
1316
- function Accordion(theme) {
1317
- return {
1318
- MuiAccordion: {
1319
- styleOverrides: {
1320
- root: {
1321
- backgroundColor: theme.palette.background.default,
1322
- width: "100%",
1323
- marginTop: "0px",
1324
- marginBottom: theme.spacing(1.5),
1325
- "&.Mui-expanded": {
1326
- marginTop: "0px",
1327
- marginBottom: theme.spacing(1.5)
1328
- },
1329
- border: "0px solid transparent",
1330
- "&.Mui-disabled": {
1331
- backgroundColor: "transparent"
1332
- },
1333
- "&::before": {
1334
- content: "none"
1335
- }
1336
- }
1337
- }
1338
- },
1339
- MuiAccordionDetails: {
1340
- styleOverrides: {
1341
- root: {
1342
- padding: `0px ${theme.spacing(0)}`
1343
- }
1344
- }
1345
- },
1346
- MuiAccordionSummary: {
1347
- styleOverrides: {
1348
- root: {
1349
- borderRadius: theme.spacing(0.5),
1350
- height: theme.spacing(4.5),
1351
- minHeight: theme.spacing(4.5),
1352
- backgroundColor: theme.palette.background.header,
1353
- paddingLeft: theme.spacing(2),
1354
- paddingRight: theme.spacing(2),
1355
- marginBottom: "0px",
1356
- "&.Mui-expanded": {
1357
- height: theme.spacing(4.5),
1358
- minHeight: theme.spacing(4.5),
1359
- borderRadius: `${theme.spacing(0.5)} ${theme.spacing(0.5)} 0px 0px`
1360
- },
1361
- "&.Mui-disabled": {
1362
- opacity: 1,
1363
- color: theme.palette.action.disabled,
1364
- "& .MuiTypography-root": {
1365
- color: "inherit"
1366
- }
1367
- }
1368
- },
1369
- expandIconWrapper: {
1370
- color: theme.palette.action.active,
1371
- height: 20,
1372
- width: 20,
1373
- alignItems: "center",
1374
- justifyContent: "center",
1375
- "& > svg": {
1376
- height: 12,
1377
- width: 12
1378
- }
1379
- },
1380
- content: {
1381
- ...theme.typography.subtitle2,
1382
- margin: "0px",
1383
- "&.Mui-expanded": {
1384
- margin: "0px"
1385
- }
1386
- }
1387
- }
1388
- }
1389
- };
1390
- }
1391
- function Typography(theme) {
1392
- return {
1393
- MuiTypography: {
1394
- styleOverrides: {
1395
- paragraph: {
1396
- marginBottom: theme.spacing(2)
1397
- },
1398
- gutterBottom: {
1399
- marginBottom: theme.spacing(1)
1400
- }
1401
- }
1402
- }
1403
- };
1404
- }
1405
- function Pagination(theme) {
1406
- return {
1407
- MuiPaginationItem: {
1408
- styleOverrides: {
1409
- root: {
1410
- "&.Mui-selected": {
1411
- fontWeight: theme.typography.fontWeightBold
1412
- }
1413
- },
1414
- textPrimary: {
1415
- "&.Mui-selected": {
1416
- color: theme.palette.primary.main,
1417
- backgroundColor: alpha(theme.palette.primary.main, 0.08),
1418
- "&:hover, &.Mui-focusVisible": {
1419
- backgroundColor: `${alpha(theme.palette.primary.main, 0.24)} !important`
1420
- }
1421
- }
1422
- },
1423
- outlined: {
1424
- border: `1px solid ${theme.palette.grey[50032]}`
1425
- },
1426
- outlinedPrimary: {
1427
- "&.Mui-selected": {
1428
- backgroundColor: alpha(theme.palette.primary.main, 0.08),
1429
- border: `1px solid ${alpha(theme.palette.primary.main, 0.24)}`
1430
- }
1431
- }
1432
- }
1433
- }
1434
- };
1435
- }
1436
- function Breadcrumbs(theme) {
1437
- return {
1438
- MuiBreadcrumbs: {
1439
- styleOverrides: {
1440
- separator: {
1441
- marginLeft: theme.spacing(2),
1442
- marginRight: theme.spacing(2)
1443
- }
1444
- }
1445
- }
1446
- };
1447
- }
1448
- function ButtonGroup(theme) {
1449
- const styleContained = (color) => ({
1450
- props: { variant: "contained", color },
1451
- style: { boxShadow: theme.customShadows[color] }
1452
- });
1453
- return {
1454
- MuiButtonGroup: {
1455
- variants: [
1456
- {
1457
- props: { variant: "contained", color: "inherit" },
1458
- style: { boxShadow: theme.customShadows.z8 }
1459
- },
1460
- styleContained("primary"),
1461
- styleContained("secondary"),
1462
- styleContained("info"),
1463
- styleContained("success"),
1464
- styleContained("warning"),
1465
- styleContained("error"),
1466
- {
1467
- props: { disabled: true },
1468
- style: {
1469
- boxShadow: "none",
1470
- "& .MuiButtonGroup-grouped.Mui-disabled": {
1471
- color: theme.palette.action.disabled,
1472
- borderColor: `${theme.palette.action.disabledBackground} !important`,
1473
- "&.MuiButton-contained": {
1474
- backgroundColor: theme.palette.action.disabledBackground
1475
- }
1476
- }
1477
- }
1478
- }
1479
- ],
1480
- styleOverrides: {
1481
- root: {
1482
- "&:hover": {
1483
- boxShadow: "none"
1484
- }
1485
- }
1486
- }
1487
- }
1488
- };
1489
- }
1490
- function CssBaseline(_theme) {
1491
- return {
1492
- MuiCssBaseline: {
1493
- styleOverrides: {
1494
- "*": {
1495
- margin: 0,
1496
- padding: 0,
1497
- boxSizing: "border-box"
1498
- },
1499
- html: {
1500
- width: "100%",
1501
- height: "100%",
1502
- WebkitOverflowScrolling: "touch"
1503
- },
1504
- body: {
1505
- width: "100%",
1506
- height: "100%"
1507
- },
1508
- "#root": {
1509
- width: "100%",
1510
- height: "100%"
1511
- },
1512
- input: {
1513
- "&[type=number]": {
1514
- MozAppearance: "textfield",
1515
- "&::-webkit-outer-spin-button": {
1516
- margin: 0,
1517
- WebkitAppearance: "none"
1518
- },
1519
- "&::-webkit-inner-spin-button": {
1520
- margin: 0,
1521
- WebkitAppearance: "none"
1522
- }
1523
- }
1524
- },
1525
- img: {
1526
- display: "block",
1527
- maxWidth: "100%"
1528
- }
1529
- }
1530
- }
1531
- };
1532
- }
1533
- function Autocomplete(theme) {
1534
- return {
1535
- MuiAutocomplete: {
1536
- styleOverrides: {
1537
- root: {
1538
- "& .MuiInputBase-root": {
1539
- padding: "0 39px 0px 0"
1540
- },
1541
- input: {
1542
- padding: `${theme.spacing(1.5, 1.5)}!important`
1543
- }
1544
- },
1545
- paper: {
1546
- boxShadow: theme.customShadows.dropdown
1547
- },
1548
- listbox: {
1549
- padding: theme.spacing(0, 1),
1550
- "& .MuiAutocomplete-option": {
1551
- padding: theme.spacing(1),
1552
- margin: theme.spacing(1, 0),
1553
- borderRadius: theme.shape.borderRadius
1554
- }
1555
- }
1556
- }
1557
- }
1558
- };
1559
- }
1560
- const style = (theme, color) => ({
1561
- props: { color },
1562
- style: {
1563
- "&:hover": {
1564
- borderColor: alpha(theme.palette[color].main, 0.48),
1565
- backgroundColor: alpha(theme.palette[color].main, theme.palette.action.hoverOpacity)
1566
- },
1567
- "&.Mui-selected": {
1568
- borderColor: alpha(theme.palette[color].main, 0.48)
1569
- }
1570
- }
1571
- });
1572
- function ToggleButton(theme) {
1573
- return {
1574
- MuiToggleButton: {
1575
- variants: [
1576
- {
1577
- props: { color: "standard" },
1578
- style: {
1579
- "&.Mui-selected": {
1580
- backgroundColor: theme.palette.action.selected
1581
- }
1582
- }
1583
- },
1584
- style(theme, "primary"),
1585
- style(theme, "secondary"),
1586
- style(theme, "info"),
1587
- style(theme, "success"),
1588
- style(theme, "warning"),
1589
- style(theme, "error")
1590
- ]
1591
- },
1592
- MuiToggleButtonGroup: {
1593
- styleOverrides: {
1594
- root: {
1595
- borderRadius: theme.shape.borderRadius,
1596
- backgroundColor: theme.palette.background.paper,
1597
- border: `solid 1px ${theme.palette.grey[50012]}`,
1598
- "& .MuiToggleButton-root": {
1599
- margin: 4,
1600
- borderColor: "transparent !important",
1601
- borderRadius: `${theme.shape.borderRadius}px !important`
1602
- }
1603
- }
1604
- }
1605
- }
1606
- };
1607
- }
1608
- function ControlLabel(theme) {
1609
- return {
1610
- MuiFormControlLabel: {
1611
- styleOverrides: {
1612
- label: {
1613
- ...theme.typography.body1
1614
- }
1615
- }
1616
- },
1617
- MuiFormHelperText: {
1618
- styleOverrides: {
1619
- root: {
1620
- marginTop: theme.spacing(1)
1621
- }
1622
- }
1623
- },
1624
- MuiFormLabel: {
1625
- styleOverrides: {
1626
- root: {
1627
- color: theme.palette.text.disabled
1628
- }
1629
- }
1630
- }
1631
- };
1632
- }
1633
- function LoadingButton(theme) {
1634
- return {
1635
- MuiLoadingButton: {
1636
- styleOverrides: {
1637
- root: {
1638
- "&.MuiLoadingButton-root": {
1639
- ...theme.typography.subtitle2,
1640
- "& .MuiCircularProgress-root": {
1641
- color: theme.palette.primary.main
1642
- }
1643
- },
1644
- "&.MuiButton-text": {
1645
- "& .MuiLoadingButton-startIconPendingStart": {
1646
- marginLeft: 0
1647
- },
1648
- "& .MuiLoadingButton-endIconPendingEnd": {
1649
- marginRight: 0
1650
- }
1651
- }
1652
- }
1653
- }
1654
- }
1655
- };
1656
- }
1657
- function fnComponentsOverrides(theme) {
1658
- return Object.assign(Fab(theme), Tabs(theme), Card(theme), Menu(theme), Link(theme), Input(theme), InputLabel(), Radio(theme), Badge(), List(theme), Table(theme), Paper(theme), Switch(theme), Button(theme), IconButton(theme), Dialog(theme), Avatar(theme), Slider(theme), Drawer(theme), Stepper(theme), Tooltip(theme), Popover(theme), SvgIcon(), Checkbox(theme), DataGrid(theme), Skeleton(theme), Timeline(theme), Backdrop(theme), Progress(theme), Accordion(theme), Typography(theme), Pagination(theme), ButtonGroup(theme), Breadcrumbs(theme), CssBaseline(), Autocomplete(theme), ControlLabel(theme), ToggleButton(theme), LoadingButton(theme));
1659
- }
1660
- export { defaultThemeOptions, fnComponentsOverrides };
19
+ import "@m4l/core";
20
+ import "prop-types";
21
+ import "./react-helmet-async-react-fast-compare.js";
22
+ import "./react-helmet-async-invariant.js";
23
+ import "./react-helmet-async-shallowequal.js";
24
+ import "@mui/material/useMediaQuery";
25
+ import "./utils/index.js";