@m4l/styles 2.0.4 → 3.0.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.
- package/index.js +27 -39
- package/package.json +1 -1
- package/theme/defaultThemeOptions-BlJvKCE6.js +24 -0
- package/theme/index.d.ts +0 -3
- package/theme/overrides/M4LExtendedComponents/M4LAccordion.d.ts +1 -1
- package/theme/overrides/M4LExtendedComponents/M4LAccountPopover.d.ts +17 -17
- package/theme/overrides/M4LExtendedComponents/M4LAppBar.d.ts +7 -12
- package/theme/overrides/M4LExtendedComponents/M4LAppBarCommercial.d.ts +1 -1
- package/theme/overrides/M4LExtendedComponents/M4LAreasAdmin.d.ts +33 -33
- package/theme/overrides/M4LExtendedComponents/M4LBadge.d.ts +2 -2
- package/theme/overrides/M4LExtendedComponents/M4LButton.d.ts +7 -7
- package/theme/overrides/M4LExtendedComponents/M4LCommonActions.d.ts +1 -1
- package/theme/overrides/M4LExtendedComponents/M4LErrorLabel.d.ts +1 -1
- package/theme/overrides/M4LExtendedComponents/M4LFieldLabel.d.ts +1 -1
- package/theme/overrides/M4LExtendedComponents/M4LGridLayout.d.ts +1 -1
- package/theme/overrides/M4LExtendedComponents/M4LHamburgerMenuCommercial.d.ts +1 -1
- package/theme/overrides/M4LExtendedComponents/M4LIconButton.d.ts +4 -4
- package/theme/overrides/M4LExtendedComponents/M4LImageButton.d.ts +1 -1
- package/theme/overrides/M4LExtendedComponents/M4LPaperForm.d.ts +6 -6
- package/theme/overrides/M4LExtendedComponents/M4LPeriod.d.ts +41 -41
- package/theme/overrides/M4LExtendedComponents/M4LPopover.d.ts +1 -1
- package/theme/overrides/M4LExtendedComponents/M4LScrollBar.d.ts +1 -1
- package/theme/overrides/M4LExtendedComponents/M4LTab.d.ts +7 -7
- package/theme/overrides/M4LExtendedComponents/M4LTabs.d.ts +1 -1
- package/theme/overrides/M4LExtendedComponents/M4LTooltip.d.ts +2 -2
- package/theme/overrides/M4LExtendedComponents/M4LanguagePopover.d.ts +1 -1
- package/theme/overrides/M4LExtendedComponents/M4LoadingButton.d.ts +15 -15
- package/theme/overrides/M4LExtendedComponents/M4LoadingError.d.ts +1 -1
- package/theme/overrides/M4LExtendedComponents/{index-CyXBfJc_.js → index-Cf72RC_D.js} +478 -523
- package/theme/overrides/M4LRHFComponents/M4LRHFCheckbox.d.ts +1 -1
- package/theme/overrides/M4LRHFComponents/M4LRHFColorPicker.d.ts +1 -1
- package/theme/overrides/M4LRHFComponents/M4LRHFDateTime.d.ts +1 -1
- package/theme/overrides/M4LRHFComponents/M4LRHFTextField.d.ts +2 -2
- package/theme/overrides/M4LRHFComponents/{index-D-E6fugB.js → index-BRZVeOM5.js} +161 -155
- package/theme/overrides/MUIComponents/Avatar.d.ts +1 -1
- package/theme/overrides/MUIComponents/Button.d.ts +1 -1
- package/theme/overrides/MUIComponents/ButtonGroup.d.ts +1 -1
- package/theme/overrides/MUIComponents/Pagination.d.ts +1 -1
- package/theme/overrides/MUIComponents/Paper.d.ts +1 -1
- package/theme/overrides/MUIComponents/ToggleButton.d.ts +2 -2
- package/theme/overrides/MUIComponents/{index-oLVtA5nq.js → index-XoLdmZP6.js} +74 -71
- package/theme/overrides/{index-DeiTY8li.js → index-DrDgOdnk.js} +3 -3
- package/theme/palette/baseColors.d.ts +2 -0
- package/theme/palette/baseOpacityColors.d.ts +2 -0
- package/theme/palette/commonColors.d.ts +2 -0
- package/theme/palette/greyPalette.d.ts +2 -0
- package/theme/palette/index.d.ts +6 -0
- package/theme/palette/palette.d.ts +6 -0
- package/theme/palette/presetColors.d.ts +5 -0
- package/theme/palette/stateColors.d.ts +2 -0
- package/theme/palette-DM0gXxA2.js +584 -0
- package/theme/{shadows-C9Ji2xrX.js → shadows-GTYqExFA.js} +18 -20
- package/types/augmentations.d.ts +144 -137
- package/types/types.d.ts +48 -25
- package/utils/getColorPresets-CXZaM9oS.js +14 -0
- package/utils/getColorPresets.d.ts +4 -9
- package/utils/index.d.ts +0 -1
- package/vite-env.d.ts +3 -3
- package/theme/defaultThemeOptions-CNJ2UmWH.js +0 -31
- package/theme/palette-CR1CkF2l.js +0 -439
- package/theme/palette.d.ts +0 -231
- package/utils/getColorPresets-B12zVrZ8.js +0 -85
- package/utils/getColorState-CGc0yrt5.js +0 -263
- package/utils/getColorState.d.ts +0 -26
package/types/augmentations.d.ts
CHANGED
|
@@ -1,137 +1,144 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
customShadows: CustomShadowOptions;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
1
|
+
import { Breakpoints } from '@mui/material';
|
|
2
|
+
import { CssVarsTheme } from '@mui/material/styles';
|
|
3
|
+
|
|
4
|
+
import type { CustomShadowOptions } from '../theme';
|
|
5
|
+
|
|
6
|
+
declare module '@mui/material' {
|
|
7
|
+
interface Color {
|
|
8
|
+
0: string;
|
|
9
|
+
500_8: string;
|
|
10
|
+
500_12: string;
|
|
11
|
+
500_16: string;
|
|
12
|
+
500_24: string;
|
|
13
|
+
500_32: string;
|
|
14
|
+
500_48: string;
|
|
15
|
+
500_56: string;
|
|
16
|
+
500_80: string;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare module '@mui/material/styles' {
|
|
21
|
+
interface PaletteColor {
|
|
22
|
+
lighter?: string;
|
|
23
|
+
darker?: string;
|
|
24
|
+
active: string;
|
|
25
|
+
activeOpacity: string;
|
|
26
|
+
hover: string;
|
|
27
|
+
focus: string;
|
|
28
|
+
selected: string;
|
|
29
|
+
toneOpacity: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface SimplePaletteColorOptions {
|
|
33
|
+
lighter?: string;
|
|
34
|
+
darker?: string;
|
|
35
|
+
active: string;
|
|
36
|
+
activeOpacity: string;
|
|
37
|
+
hover: string;
|
|
38
|
+
focus: string;
|
|
39
|
+
selected: string;
|
|
40
|
+
toneOpacity: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface Palette {
|
|
44
|
+
mode: 'light' | 'dark';
|
|
45
|
+
secondary: never;
|
|
46
|
+
skeleton: { default: string; transition: string };
|
|
47
|
+
border: {
|
|
48
|
+
active: string;
|
|
49
|
+
selected: string;
|
|
50
|
+
default: string;
|
|
51
|
+
primary: string;
|
|
52
|
+
secondary: string;
|
|
53
|
+
disabled: string;
|
|
54
|
+
dense: string;
|
|
55
|
+
line: string;
|
|
56
|
+
};
|
|
57
|
+
general: {
|
|
58
|
+
scrollBar: string;
|
|
59
|
+
gridHover: string;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
interface PaletteOptions {
|
|
64
|
+
mode: 'light' | 'dark';
|
|
65
|
+
secondary: never;
|
|
66
|
+
skeleton: { default: string; transition: string };
|
|
67
|
+
border: {
|
|
68
|
+
active: string;
|
|
69
|
+
selected: string;
|
|
70
|
+
default: string;
|
|
71
|
+
primary: string;
|
|
72
|
+
secondary: string;
|
|
73
|
+
disabled: string;
|
|
74
|
+
dense: string;
|
|
75
|
+
line: string;
|
|
76
|
+
};
|
|
77
|
+
general: {
|
|
78
|
+
scrollBar: string;
|
|
79
|
+
gridHover: string;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
interface ColorSchemeOverrides {
|
|
84
|
+
finalTheme?: true;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface Theme extends CssVarsTheme {
|
|
88
|
+
stretch: boolean;
|
|
89
|
+
customShadows: CustomShadowOptions;
|
|
90
|
+
breakpoints: Breakpoints;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
interface ThemeVars {
|
|
94
|
+
customShadows: CustomShadowOptions;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
interface ColorSystem {
|
|
98
|
+
typography: TypographyVariants;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
interface TypeBackground {
|
|
102
|
+
default: string;
|
|
103
|
+
hover: string;
|
|
104
|
+
surface: string;
|
|
105
|
+
subtle: string;
|
|
106
|
+
main: string;
|
|
107
|
+
bold: string;
|
|
108
|
+
backdrop: string;
|
|
109
|
+
reverse: string;
|
|
110
|
+
header: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
interface TypographyVariants {
|
|
114
|
+
subtitle: Record<string, any>;
|
|
115
|
+
subtitleDens: Record<string, any>;
|
|
116
|
+
paragraph: Record<string, any>;
|
|
117
|
+
paragraphDens: Record<string, any>;
|
|
118
|
+
body: Record<string, any>;
|
|
119
|
+
bodyDens: Record<string, any>;
|
|
120
|
+
action: Record<string, any>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
interface TypographyVariantsOptions {
|
|
124
|
+
subtitle: React.CSSProperties;
|
|
125
|
+
subtitleDens: React.CSSProperties;
|
|
126
|
+
paragraph: React.CSSProperties;
|
|
127
|
+
paragraphDens: React.CSSProperties;
|
|
128
|
+
body: React.CSSProperties;
|
|
129
|
+
bodyDens: React.CSSProperties;
|
|
130
|
+
action: React.CSSProperties;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
declare module '@mui/material/Typography' {
|
|
135
|
+
interface TypographyPropsVariantOverrides {
|
|
136
|
+
subtitle: true;
|
|
137
|
+
subtitleDens: true;
|
|
138
|
+
paragraph: true;
|
|
139
|
+
paragraphDens: true;
|
|
140
|
+
body: true;
|
|
141
|
+
bodyDens: true;
|
|
142
|
+
action: true;
|
|
143
|
+
}
|
|
144
|
+
}
|
package/types/types.d.ts
CHANGED
|
@@ -1,29 +1,52 @@
|
|
|
1
|
+
import { PaletteColor } from '@mui/material/styles';
|
|
1
2
|
export declare type ThemeColorPresets = 'patronus' | 'turqui' | 'grass' | 'brown' | 'blaze';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export declare type StateColorSchema = 'info' | 'success' | 'warning' | 'error';
|
|
4
|
+
export declare type ColorSchema = 'primary' | 'secondary' | StateColorSchema;
|
|
5
|
+
export declare type BasePalettes = 'patronusBlue' | 'crayonBlue' | 'middleYellow' | 'acidGreen' | 'grassGreen' | 'desertBeige' | 'turquiBlue' | 'blazeOrange' | 'flameRed' | 'coolGrey' | 'brown' | 'marbleLight' | 'onyx' | 'mint' | 'oxford';
|
|
6
|
+
export declare type BaseOpacityPalettes = 'patronus' | 'turqui' | 'grass' | 'brown' | 'beige' | 'orange' | 'cool' | 'marble' | 'mint' | 'oxford';
|
|
7
|
+
export interface Colors {
|
|
8
|
+
'00': string;
|
|
9
|
+
10: string;
|
|
10
|
+
20: string;
|
|
11
|
+
30: string;
|
|
12
|
+
40: string;
|
|
13
|
+
50: string;
|
|
14
|
+
60: string;
|
|
15
|
+
70: string;
|
|
16
|
+
80: string;
|
|
17
|
+
90: string;
|
|
18
|
+
100: string;
|
|
6
19
|
}
|
|
7
|
-
export interface
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
20
|
+
export interface OpacityColors {
|
|
21
|
+
4: string;
|
|
22
|
+
6: string;
|
|
23
|
+
8: string;
|
|
24
|
+
10: string;
|
|
25
|
+
12: string;
|
|
26
|
+
14: string;
|
|
27
|
+
16: string;
|
|
28
|
+
18: string;
|
|
29
|
+
28: string;
|
|
30
|
+
31: string;
|
|
31
|
+
32: string;
|
|
32
|
+
48: string;
|
|
33
|
+
60?: string;
|
|
34
|
+
72?: string;
|
|
13
35
|
}
|
|
14
|
-
export interface
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
36
|
+
export interface ActionsPaletteColors {
|
|
37
|
+
active: string;
|
|
38
|
+
activeOpacity: string;
|
|
39
|
+
hover: string;
|
|
40
|
+
focus: string;
|
|
41
|
+
selected: string;
|
|
42
|
+
toneOpacity: string;
|
|
20
43
|
}
|
|
21
|
-
export declare type
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
44
|
+
export declare type BaseConstantColors = Record<BasePalettes, Colors>;
|
|
45
|
+
export declare type BasePresetColors = Record<keyof PaletteColor, string>;
|
|
46
|
+
export declare type PresetPalettes = Record<ThemeColorPresets, BasePresetColors>;
|
|
47
|
+
export declare type StatePalettes = Record<StateColorSchema, BasePresetColors>;
|
|
48
|
+
export declare type PresetActionsPalettes = Record<ThemeColorPresets, ActionsPaletteColors>;
|
|
49
|
+
export declare type PresetsOptions = Array<{
|
|
50
|
+
name: string | undefined;
|
|
51
|
+
value: string;
|
|
52
|
+
}>;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { ThemeColorPresets } from '../types';
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
4
|
-
export declare
|
|
5
|
-
export declare const turqui: PaletteColor;
|
|
6
|
-
export declare const grass: PaletteColor;
|
|
7
|
-
export declare const brown: PaletteColor;
|
|
8
|
-
export declare const blaze: PaletteColor;
|
|
9
|
-
export declare function getColorPresets(presetsKey: ThemeColorPresets): any;
|
|
1
|
+
import { BasePresetColors, ThemeColorPresets } from '../types';
|
|
2
|
+
export declare const DEFAULT_PRESET: ThemeColorPresets;
|
|
3
|
+
export declare const defaultPresetColors: BasePresetColors;
|
|
4
|
+
export declare function getColorPresets(presetsKey: ThemeColorPresets): BasePresetColors;
|
|
10
5
|
export default getColorPresets;
|
package/utils/index.d.ts
CHANGED
package/vite-env.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
/// <reference types="vitest" />
|
|
3
|
-
/// <reference types="vitest/importMeta" />
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
/// <reference types="vitest" />
|
|
3
|
+
/// <reference types="vitest/importMeta" />
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { t as a } from "./typography-BsOO459U.js";
|
|
2
|
-
import { p as e } from "./palette-CR1CkF2l.js";
|
|
3
|
-
import { createTheme as o, alpha as s } from "@mui/material";
|
|
4
|
-
import { s as p, c as m } from "./shadows-C9Ji2xrX.js";
|
|
5
|
-
import { g as t } from "../utils/getColorPresets-B12zVrZ8.js";
|
|
6
|
-
import { g as i } from "../utils/getColorState-CGc0yrt5.js";
|
|
7
|
-
const r = o(), f = {
|
|
8
|
-
...r,
|
|
9
|
-
typography: a,
|
|
10
|
-
palette: {
|
|
11
|
-
...r.palette,
|
|
12
|
-
...e.dark,
|
|
13
|
-
primary: {
|
|
14
|
-
...r.palette.primary,
|
|
15
|
-
...t("patronus")
|
|
16
|
-
},
|
|
17
|
-
state: i("patronus", "light"),
|
|
18
|
-
representative: t("patronus").darker,
|
|
19
|
-
mode: "light"
|
|
20
|
-
},
|
|
21
|
-
shape: { borderRadius: 8 },
|
|
22
|
-
shadows: p.dark,
|
|
23
|
-
customShadows: {
|
|
24
|
-
primary: `0 8px 16px 0 ${s(t("patronus").main, 0.2)}`,
|
|
25
|
-
...m("dark")
|
|
26
|
-
},
|
|
27
|
-
stretch: !0
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
f as d
|
|
31
|
-
};
|