@m4l/styles 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +26 -19
- package/package.json +3 -3
- package/theme/index.d.ts +2 -0
- package/theme/overrides/M4LExtendedComponents/M4LImageButton.d.ts +6 -6
- package/theme/overrides/M4LExtendedComponents/M4LTypography.d.ts +1 -1
- package/theme/overrides/M4LExtendedComponents/M4LanguagePopover.d.ts +1 -1
- package/theme/overrides/M4LRHFComponents/M4LRHFCheckbox.d.ts +4 -4
- package/theme/overrides/MUIComponents/Paper.d.ts +10 -10
- package/theme/palette.d.ts +2 -2
- package/types/augmentations.d.ts +1 -9
- package/utils/getColorState.d.ts +2 -2
package/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { alpha as t, useTheme as m } from "@mui/material/styles";
|
|
2
|
-
import { StyledEngineProvider as yr, Theme as fr, ThemeOptions as hr, ThemeProvider as Mr, createTheme as vr, styled as Br } from "@mui/material/styles";
|
|
3
2
|
import { alpha as n } from "@mui/system";
|
|
4
3
|
import { alpha as F } from "@mui/material";
|
|
5
4
|
import { useResponsive as w } from "@m4l/graphics";
|
|
@@ -321,7 +320,11 @@ const r = {
|
|
|
321
320
|
light: {
|
|
322
321
|
...k,
|
|
323
322
|
mode: "light",
|
|
324
|
-
text: {
|
|
323
|
+
text: {
|
|
324
|
+
primary: r.ashBlak[10],
|
|
325
|
+
secondary: r.coolGrey[40],
|
|
326
|
+
disabled: r.coolGrey[10]
|
|
327
|
+
},
|
|
325
328
|
background: {
|
|
326
329
|
paper: "#fff0",
|
|
327
330
|
default: r.marbleLight[10],
|
|
@@ -333,7 +336,11 @@ const r = {
|
|
|
333
336
|
dark: {
|
|
334
337
|
...k,
|
|
335
338
|
mode: "dark",
|
|
336
|
-
text: {
|
|
339
|
+
text: {
|
|
340
|
+
primary: r.marbleLight[30],
|
|
341
|
+
secondary: r.coolGrey[20],
|
|
342
|
+
disabled: r.coolGrey[50]
|
|
343
|
+
},
|
|
337
344
|
background: {
|
|
338
345
|
paper: "#fff0",
|
|
339
346
|
default: r.ashBlak[10],
|
|
@@ -388,13 +395,13 @@ const r = {
|
|
|
388
395
|
darker: r.blazeOrange[20],
|
|
389
396
|
contrastText: r.marbleLight[10]
|
|
390
397
|
}
|
|
391
|
-
], P = g[0], W = g[1],
|
|
398
|
+
], P = g[0], W = g[1], _ = g[2], q = g[3], N = g[4];
|
|
392
399
|
function ir(o) {
|
|
393
400
|
return {
|
|
394
401
|
patronus: P,
|
|
395
402
|
turqui: W,
|
|
396
|
-
grass:
|
|
397
|
-
candy:
|
|
403
|
+
grass: _,
|
|
404
|
+
candy: q,
|
|
398
405
|
blaze: N
|
|
399
406
|
}[o];
|
|
400
407
|
}
|
|
@@ -702,9 +709,15 @@ const V = "Poppins, sans-serif", U = {
|
|
|
702
709
|
success: `0px 2px 8px 0px ${t(r.acidGreen[50], 0.2)}`,
|
|
703
710
|
warning: `0px 2px 8px 0px ${t(r.middleYellow[50], 0.2)}`,
|
|
704
711
|
error: `0px 2px 8px 0px ${t(r.flameRed[50], 0.2)}`,
|
|
705
|
-
card: `0 0 2px 0 ${t(d.light.grey[500], 0.2)}, 0 12px 24px -4px ${t(
|
|
712
|
+
card: `0 0 2px 0 ${t(d.light.grey[500], 0.2)}, 0 12px 24px -4px ${t(
|
|
713
|
+
d.light.grey[500],
|
|
714
|
+
0.12
|
|
715
|
+
)}`,
|
|
706
716
|
dialog: `-40px 40px 80px -8px ${t(d.light.common.black, 0.24)}`,
|
|
707
|
-
dropdown: `0 0 2px 0 ${t(d.light.grey[500], 0.24)}, -20px 20px 40px -4px ${t(
|
|
717
|
+
dropdown: `0 0 2px 0 ${t(d.light.grey[500], 0.24)}, -20px 20px 40px -4px ${t(
|
|
718
|
+
d.light.grey[500],
|
|
719
|
+
0.24
|
|
720
|
+
)}`
|
|
708
721
|
};
|
|
709
722
|
return o === "light" ? {
|
|
710
723
|
z1: `0px 1px 2px ${t(r.coolGrey[70], 0.12)}`,
|
|
@@ -2054,7 +2067,7 @@ const Go = (o) => ({
|
|
|
2054
2067
|
}
|
|
2055
2068
|
}
|
|
2056
2069
|
}
|
|
2057
|
-
}),
|
|
2070
|
+
}), _o = (o) => ({
|
|
2058
2071
|
M4LIconButton: {
|
|
2059
2072
|
styleOverrides: {
|
|
2060
2073
|
["&.M4LIconButton-root"]: {
|
|
@@ -2062,7 +2075,7 @@ const Go = (o) => ({
|
|
|
2062
2075
|
}
|
|
2063
2076
|
}
|
|
2064
2077
|
}
|
|
2065
|
-
}),
|
|
2078
|
+
}), qo = (o) => ({
|
|
2066
2079
|
M4LanguagePopover: {
|
|
2067
2080
|
styleOverrides: {
|
|
2068
2081
|
["&.M4LanguagePopover-root"]: {
|
|
@@ -2297,8 +2310,8 @@ function ur(o) {
|
|
|
2297
2310
|
Qo(),
|
|
2298
2311
|
Xo(),
|
|
2299
2312
|
Wo(),
|
|
2300
|
-
qo(),
|
|
2301
2313
|
_o(),
|
|
2314
|
+
qo(),
|
|
2302
2315
|
No(o),
|
|
2303
2316
|
or(),
|
|
2304
2317
|
Yo(),
|
|
@@ -2323,15 +2336,10 @@ const cr = {
|
|
|
2323
2336
|
};
|
|
2324
2337
|
export {
|
|
2325
2338
|
r as PATRONUSCOLORS,
|
|
2326
|
-
yr as StyledEngineProvider,
|
|
2327
|
-
fr as Theme,
|
|
2328
|
-
hr as ThemeOptions,
|
|
2329
|
-
Mr as ThemeProvider,
|
|
2330
2339
|
N as blaze,
|
|
2331
|
-
|
|
2340
|
+
q as candy,
|
|
2332
2341
|
g as colorPresets,
|
|
2333
2342
|
sr as createCustomShadows,
|
|
2334
|
-
vr as createTheme,
|
|
2335
2343
|
P as defaultPreset,
|
|
2336
2344
|
lr as defaultThemeOptions,
|
|
2337
2345
|
ur as fnComponentsOverrides,
|
|
@@ -2339,14 +2347,13 @@ export {
|
|
|
2339
2347
|
nr as getColorState,
|
|
2340
2348
|
pr as getFontValue,
|
|
2341
2349
|
gr as globalRemSize,
|
|
2342
|
-
|
|
2350
|
+
_ as grass,
|
|
2343
2351
|
cr as muiBreakpointsValues,
|
|
2344
2352
|
d as palette,
|
|
2345
2353
|
s as pxToRem,
|
|
2346
2354
|
Y as remToPx,
|
|
2347
2355
|
p as responsiveFontSizes,
|
|
2348
2356
|
dr as shadows,
|
|
2349
|
-
Br as styled,
|
|
2350
2357
|
W as turqui,
|
|
2351
2358
|
U as typography
|
|
2352
2359
|
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/styles",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@m4l/graphics": "*",
|
|
7
|
-
"@mui/material": "
|
|
8
|
-
"@mui/system": "
|
|
7
|
+
"@mui/material": "5.10.4",
|
|
8
|
+
"@mui/system": "5.10.4",
|
|
9
9
|
"react": "^17.0.0 || 18.x",
|
|
10
10
|
"react-dom": "^18.0.0"
|
|
11
11
|
},
|
package/theme/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ export type { CustomShadowOptions } from './shadows';
|
|
|
2
2
|
export { defaultThemeOptions } from './defaultThemeOptions';
|
|
3
3
|
export { shadows, createCustomShadows } from './shadows';
|
|
4
4
|
export { palette, PATRONUSCOLORS } from './palette';
|
|
5
|
+
export type { PatronusConstantColors } from './palette';
|
|
5
6
|
export type { ColorSchema, StateDefault, StateSkeleton } from './palette';
|
|
7
|
+
export type { ColorStateOptions } from '../utils/getColorState';
|
|
6
8
|
export { typography } from './typography';
|
|
7
9
|
export { fnComponentsOverrides } from './overrides';
|
|
@@ -11,7 +11,7 @@ export declare const M4LImageButton: (theme: Theme) => {
|
|
|
11
11
|
alignItems: string;
|
|
12
12
|
justifyContent: string;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
'.M4LImage-root': {
|
|
15
15
|
display: string;
|
|
16
16
|
alignItems: string;
|
|
17
17
|
justifyContent: string;
|
|
@@ -19,7 +19,7 @@ export declare const M4LImageButton: (theme: Theme) => {
|
|
|
19
19
|
width: string;
|
|
20
20
|
height: string;
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
'.M4LImage-lazyLoad': {
|
|
23
23
|
borderRadius: string;
|
|
24
24
|
width: string;
|
|
25
25
|
height: string;
|
|
@@ -27,16 +27,16 @@ export declare const M4LImageButton: (theme: Theme) => {
|
|
|
27
27
|
alignItems: string;
|
|
28
28
|
justifyContent: string;
|
|
29
29
|
};
|
|
30
|
-
|
|
30
|
+
'.M4LImage-img': {
|
|
31
31
|
borderRadius: string;
|
|
32
32
|
};
|
|
33
33
|
'.MuiButtonBase-root:hover': {
|
|
34
|
-
backgroundColor:
|
|
34
|
+
backgroundColor: any;
|
|
35
35
|
};
|
|
36
36
|
'.MuiButtonBase-root:focus': {
|
|
37
|
-
backgroundColor:
|
|
37
|
+
backgroundColor: any;
|
|
38
38
|
border: string;
|
|
39
|
-
borderColor:
|
|
39
|
+
borderColor: any;
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
};
|
|
@@ -34,20 +34,20 @@ export declare const M4LRHFCheckbox: (theme: Theme) => {
|
|
|
34
34
|
borderRadius: string;
|
|
35
35
|
};
|
|
36
36
|
'.MuiButtonBase-root:hover': {
|
|
37
|
-
backgroundColor:
|
|
37
|
+
backgroundColor: any;
|
|
38
38
|
};
|
|
39
39
|
'.Mui-focusVisible': {
|
|
40
40
|
border: string;
|
|
41
|
-
borderColor:
|
|
41
|
+
borderColor: any;
|
|
42
42
|
};
|
|
43
43
|
'.MuiButtonBase-root:hover .MuiSvgIcon-root': {
|
|
44
|
-
fill:
|
|
44
|
+
fill: any;
|
|
45
45
|
};
|
|
46
46
|
'.M4LRHFCheckbox-checkTypography .MuiTypography-root': {
|
|
47
47
|
[x: string]: any;
|
|
48
48
|
};
|
|
49
49
|
'.M4LRHFCheckbox-stateDisabled .MuiSvgIcon-root': {
|
|
50
|
-
fill:
|
|
50
|
+
fill: any;
|
|
51
51
|
};
|
|
52
52
|
'.M4LRHFCheckbox-stateDisabled .MuiTypography-root': {
|
|
53
53
|
color: string;
|
|
@@ -23,17 +23,17 @@ export default function Paper(theme: Theme): {
|
|
|
23
23
|
borderRadius: string;
|
|
24
24
|
};
|
|
25
25
|
'& .MuiStack-root .MuiMenuItem-root:hover': {
|
|
26
|
-
color:
|
|
26
|
+
color: any;
|
|
27
27
|
transition: string;
|
|
28
|
-
backgroundColor:
|
|
28
|
+
backgroundColor: any;
|
|
29
29
|
};
|
|
30
30
|
'& .MuiStack-root .MuiMenuItem-root.Mui-selected': {
|
|
31
|
-
color:
|
|
31
|
+
color: any;
|
|
32
32
|
transition: string;
|
|
33
|
-
backgroundColor:
|
|
33
|
+
backgroundColor: any;
|
|
34
34
|
};
|
|
35
35
|
'& .MuiStack-root .MuiMenuItem-root:focus': {
|
|
36
|
-
color:
|
|
36
|
+
color: any;
|
|
37
37
|
transition: string;
|
|
38
38
|
backgroundColor: string;
|
|
39
39
|
boxShadow: string;
|
|
@@ -44,17 +44,17 @@ export default function Paper(theme: Theme): {
|
|
|
44
44
|
borderRadius: string;
|
|
45
45
|
};
|
|
46
46
|
'& .MuiAutocomplete-listbox .MuiAutocomplete-option:hover': {
|
|
47
|
-
color:
|
|
47
|
+
color: any;
|
|
48
48
|
transition: string;
|
|
49
|
-
backgroundColor:
|
|
49
|
+
backgroundColor: any;
|
|
50
50
|
};
|
|
51
51
|
'& .MuiAutocomplete-listbox .MuiAutocomplete-option.Mui-selected': {
|
|
52
|
-
color:
|
|
52
|
+
color: any;
|
|
53
53
|
transition: string;
|
|
54
|
-
backgroundColor:
|
|
54
|
+
backgroundColor: any;
|
|
55
55
|
};
|
|
56
56
|
'& .MuiAutocomplete-listbox .MuiAutocomplete-option:active': {
|
|
57
|
-
color:
|
|
57
|
+
color: any;
|
|
58
58
|
transition: string;
|
|
59
59
|
backgroundColor: string;
|
|
60
60
|
boxShadow: string;
|
package/theme/palette.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare type ColorSchema = 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error';
|
|
2
|
-
declare type PatronusColors =
|
|
3
|
-
declare type PatronusOpacityColors =
|
|
2
|
+
declare type PatronusColors = 'patronusBlue' | 'crayonBlue' | 'middleYellow' | 'acidGreen' | 'grassGreen' | 'candyRed' | 'turquiBlue' | 'blazeOrange' | 'flameRed' | 'coolGrey' | 'marbleLight' | 'ashBlak';
|
|
3
|
+
declare type PatronusOpacityColors = 'patronus' | 'turqui' | 'grass' | 'candy' | 'blaze' | 'cool' | 'marbel';
|
|
4
4
|
interface PatronusColorOptions {
|
|
5
5
|
10: string;
|
|
6
6
|
20: string;
|
package/types/augmentations.d.ts
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { PatronusConstantColors } from '../theme/palette';
|
|
2
2
|
import { CustomShadowOptions } from '../theme';
|
|
3
3
|
import { ChartPaletteOptions, GradientsPaletteOptions, GridPaletteOptions } from './types';
|
|
4
|
-
import { ColorStateOptions } from '
|
|
5
|
-
export {
|
|
6
|
-
styled,
|
|
7
|
-
Theme,
|
|
8
|
-
ThemeOptions,
|
|
9
|
-
createTheme,
|
|
10
|
-
ThemeProvider,
|
|
11
|
-
StyledEngineProvider,
|
|
12
|
-
} from '@mui/material/styles';
|
|
4
|
+
import { ColorStateOptions } from '../../utils/getColorState';
|
|
13
5
|
|
|
14
6
|
declare module '@mui/material' {
|
|
15
7
|
interface Color {
|
package/utils/getColorState.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StateDefault, StateSkeleton } from
|
|
2
|
-
import { ThemeColorPresets } from
|
|
1
|
+
import { StateDefault, StateSkeleton } from '../theme';
|
|
2
|
+
import { ThemeColorPresets } from '../types';
|
|
3
3
|
export interface ColorStateOptions {
|
|
4
4
|
active12: string;
|
|
5
5
|
active: string;
|