@m4l/styles 0.0.3 → 0.0.4
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/config.d.ts +13 -0
- package/index.d.ts +2 -0
- package/index.js +947 -437
- package/package.json +1 -1
- package/theme/defaultThemeOptions.d.ts +1 -2
- package/theme/index.d.ts +4 -5
- package/theme/overrides/M4LExtendedComponents/M4LButton.d.ts +1 -8
- package/theme/overrides/M4LExtendedComponents/M4LIconButton.d.ts +0 -3
- package/theme/overrides/M4LExtendedComponents/M4LImageButton.d.ts +35 -1
- package/theme/overrides/M4LExtendedComponents/M4LNavLink.d.ts +10 -0
- package/theme/overrides/M4LExtendedComponents/M4LPopover.d.ts +5 -1
- package/theme/overrides/M4LExtendedComponents/M4LTypography.d.ts +5 -2
- package/theme/overrides/M4LExtendedComponents/M4LanguagePopover.d.ts +1 -4
- package/theme/overrides/M4LExtendedComponents/M4LoadingButton.d.ts +6 -0
- package/theme/overrides/M4LRHFComponents/M4LRHFAutocomplete.d.ts +10 -0
- package/theme/overrides/M4LRHFComponents/M4LRHFAutocompleteAsync.d.ts +10 -0
- package/theme/overrides/M4LRHFComponents/M4LRHFCheckbox.d.ts +46 -1
- package/theme/overrides/M4LRHFComponents/M4LRHFTextField.d.ts +1 -11
- package/theme/overrides/M4LRHFComponents/M4LRHFTextFieldPassword.d.ts +4 -4
- package/theme/overrides/MUIComponents/Autocomplete.d.ts +0 -3
- package/theme/overrides/MUIComponents/ButtonGroup.d.ts +8 -0
- package/theme/overrides/MUIComponents/Fab.d.ts +1 -1
- package/theme/overrides/MUIComponents/Paper.d.ts +35 -0
- package/theme/overrides/MUIComponents/Typography.d.ts +5 -0
- package/theme/palette.d.ts +167 -93
- package/theme/shadows.d.ts +5 -50
- package/theme/typography.d.ts +146 -18
- package/types/index.d.ts +1 -1
- package/types/types.d.ts +151 -0
- package/utils/getColorPresets.d.ts +9 -105
- package/utils/getColorState.d.ts +15 -0
- package/utils/getFontValue.d.ts +1 -1
- package/utils/index.d.ts +1 -0
package/types/types.d.ts
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { Patronus, PatronusConstantColors } from '../theme/palette';
|
|
2
|
+
import {CustomShadowOptions } from '../theme'
|
|
3
|
+
import { ColorStateOptions } from '../utils/getColorState';
|
|
4
|
+
import { TypographyVariants } from '../theme/typography';
|
|
5
|
+
|
|
6
|
+
export {};
|
|
7
|
+
|
|
8
|
+
export declare type ThemeColorPresets = 'patronus' | 'turqui' | 'grass' | 'candy' | 'blaze';
|
|
9
|
+
|
|
10
|
+
declare module '@mui/material/styles' {
|
|
11
|
+
interface Theme {
|
|
12
|
+
stretch?: boolean;
|
|
13
|
+
customShadows: CustomShadowOptions;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface ThemeOptions {
|
|
17
|
+
stretch?: boolean;
|
|
18
|
+
customShadows?: CustomShadowOptions;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface TypographyVariants {
|
|
22
|
+
subtitle: Record<any>;
|
|
23
|
+
subtitleDens: Record<any>;
|
|
24
|
+
paragraph: Record<any>;
|
|
25
|
+
paragraphDens: Record<any>;
|
|
26
|
+
body: Record<any>;
|
|
27
|
+
bodyDens: Record<any>;
|
|
28
|
+
action: Record<any>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
// allow configuration using `createTheme`
|
|
34
|
+
interface TypographyVariantsOptions {
|
|
35
|
+
subtitle: React.CSSProperties;
|
|
36
|
+
subtitleDens: React.CSSProperties;
|
|
37
|
+
paragraph: React.CSSProperties;
|
|
38
|
+
paragraphDens: React.CSSProperties;
|
|
39
|
+
body: React.CSSProperties;
|
|
40
|
+
bodyDens: React.CSSProperties;
|
|
41
|
+
action: React.CSSProperties;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare module '@mui/material/Typography' {
|
|
49
|
+
interface TypographyPropsVariantOverrides {
|
|
50
|
+
subtitle: true;
|
|
51
|
+
subtitleDens: true;
|
|
52
|
+
paragraph: true;
|
|
53
|
+
paragraphDens: true;
|
|
54
|
+
body: true;
|
|
55
|
+
bodyDens: true;
|
|
56
|
+
action: true;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface GridPaletteOptions {
|
|
61
|
+
sectionHeader: string;
|
|
62
|
+
rowHover: string;
|
|
63
|
+
divider: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ChartPaletteOptions {
|
|
67
|
+
violet: string[];
|
|
68
|
+
blue: string[];
|
|
69
|
+
green: string[];
|
|
70
|
+
yellow: string[];
|
|
71
|
+
red: string[];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface GradientsPaletteOptions {
|
|
75
|
+
primary: string;
|
|
76
|
+
info: string;
|
|
77
|
+
success: string;
|
|
78
|
+
warning: string;
|
|
79
|
+
error: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* interface AgumentationInfoOptions extends Pick<PaletteColor, 'lighter' | 'light' | 'main' | 'dark' | 'darker' >{
|
|
83
|
+
opacity: string
|
|
84
|
+
}
|
|
85
|
+
*/
|
|
86
|
+
declare module '@mui/material/styles/createPalette' {
|
|
87
|
+
interface TypeBackground {
|
|
88
|
+
neutral: string;
|
|
89
|
+
autofill: string;
|
|
90
|
+
header: string;
|
|
91
|
+
}
|
|
92
|
+
interface SimplePaletteColorOptions {
|
|
93
|
+
lighter?: string;
|
|
94
|
+
darker?: string;
|
|
95
|
+
LightSelected?: string;
|
|
96
|
+
LightSelectedHover?: string;
|
|
97
|
+
DarkSelected?: string;
|
|
98
|
+
DarkSelectedHover?: string;
|
|
99
|
+
}
|
|
100
|
+
interface PaletteColor {
|
|
101
|
+
lighter?: string;
|
|
102
|
+
darker?: string;
|
|
103
|
+
LightSelected?: string;
|
|
104
|
+
LightSelectedHover?: string;
|
|
105
|
+
DarkSelected?: string;
|
|
106
|
+
DarkSelectedHover?: string;
|
|
107
|
+
opacity?: string;
|
|
108
|
+
}
|
|
109
|
+
interface Palette {
|
|
110
|
+
gradients?: GradientsPaletteOptions;
|
|
111
|
+
chart: ChartPaletteOptions;
|
|
112
|
+
grid?: GridPaletteOptions;
|
|
113
|
+
patronus?: PatronusConstantColors;
|
|
114
|
+
state: ColorStateOptions;
|
|
115
|
+
/* info: AgumentationInfoOptions; */ /* Organizar cada caso con los valores específicos. */
|
|
116
|
+
}
|
|
117
|
+
interface PaletteOptions {
|
|
118
|
+
gradients?: GradientsPaletteOptions;
|
|
119
|
+
chart?: ChartPaletteOptions;
|
|
120
|
+
grid?: GridPaletteOptions;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* declare module '@material-ui/core/styles/createTypography' {
|
|
125
|
+
interface TypographyOptions extends TypographyVariants {}
|
|
126
|
+
}
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
declare module '@mui/material' {
|
|
131
|
+
interface Color {
|
|
132
|
+
0: string;
|
|
133
|
+
500_8: string;
|
|
134
|
+
500_12: string;
|
|
135
|
+
500_16: string;
|
|
136
|
+
500_24: string;
|
|
137
|
+
500_32: string;
|
|
138
|
+
500_48: string;
|
|
139
|
+
500_56: string;
|
|
140
|
+
500_80: string;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
/* import { TypographyProps } from '@material-ui/core/Typography'; */
|
|
146
|
+
|
|
147
|
+
declare module '@material-ui/core/Typography' {
|
|
148
|
+
interface TypographyProps {
|
|
149
|
+
variant?: 'subtitle';
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
import { ThemeColorPresets } from '../types';
|
|
2
|
-
export declare
|
|
3
|
-
LightSelected: string;
|
|
4
|
-
LightSelectedHover: string;
|
|
5
|
-
DarkSelected: string;
|
|
6
|
-
DarkSelectedHover: string;
|
|
7
|
-
contrastText: string;
|
|
8
|
-
lighter: string;
|
|
9
|
-
light: string;
|
|
10
|
-
main: string;
|
|
11
|
-
dark: string;
|
|
12
|
-
darker: string;
|
|
13
|
-
name: string;
|
|
14
|
-
} | {
|
|
2
|
+
export declare type ColorVariants = {
|
|
15
3
|
name: string;
|
|
16
4
|
lighter: string;
|
|
17
5
|
light: string;
|
|
@@ -19,20 +7,8 @@ export declare const colorPresets: ({
|
|
|
19
7
|
dark: string;
|
|
20
8
|
darker: string;
|
|
21
9
|
contrastText: string;
|
|
22
|
-
}
|
|
23
|
-
export declare const
|
|
24
|
-
LightSelected: string;
|
|
25
|
-
LightSelectedHover: string;
|
|
26
|
-
DarkSelected: string;
|
|
27
|
-
DarkSelectedHover: string;
|
|
28
|
-
contrastText: string;
|
|
29
|
-
lighter: string;
|
|
30
|
-
light: string;
|
|
31
|
-
main: string;
|
|
32
|
-
dark: string;
|
|
33
|
-
darker: string;
|
|
34
|
-
name: string;
|
|
35
|
-
} | {
|
|
10
|
+
};
|
|
11
|
+
export declare const colorPresets: {
|
|
36
12
|
name: string;
|
|
37
13
|
lighter: string;
|
|
38
14
|
light: string;
|
|
@@ -40,20 +16,8 @@ export declare const defaultPreset: {
|
|
|
40
16
|
dark: string;
|
|
41
17
|
darker: string;
|
|
42
18
|
contrastText: string;
|
|
43
|
-
};
|
|
44
|
-
export declare const
|
|
45
|
-
LightSelected: string;
|
|
46
|
-
LightSelectedHover: string;
|
|
47
|
-
DarkSelected: string;
|
|
48
|
-
DarkSelectedHover: string;
|
|
49
|
-
contrastText: string;
|
|
50
|
-
lighter: string;
|
|
51
|
-
light: string;
|
|
52
|
-
main: string;
|
|
53
|
-
dark: string;
|
|
54
|
-
darker: string;
|
|
55
|
-
name: string;
|
|
56
|
-
} | {
|
|
19
|
+
}[];
|
|
20
|
+
export declare const defaultPreset: {
|
|
57
21
|
name: string;
|
|
58
22
|
lighter: string;
|
|
59
23
|
light: string;
|
|
@@ -62,19 +26,7 @@ export declare const purplePreset: {
|
|
|
62
26
|
darker: string;
|
|
63
27
|
contrastText: string;
|
|
64
28
|
};
|
|
65
|
-
export declare const
|
|
66
|
-
LightSelected: string;
|
|
67
|
-
LightSelectedHover: string;
|
|
68
|
-
DarkSelected: string;
|
|
69
|
-
DarkSelectedHover: string;
|
|
70
|
-
contrastText: string;
|
|
71
|
-
lighter: string;
|
|
72
|
-
light: string;
|
|
73
|
-
main: string;
|
|
74
|
-
dark: string;
|
|
75
|
-
darker: string;
|
|
76
|
-
name: string;
|
|
77
|
-
} | {
|
|
29
|
+
export declare const turqui: {
|
|
78
30
|
name: string;
|
|
79
31
|
lighter: string;
|
|
80
32
|
light: string;
|
|
@@ -83,19 +35,7 @@ export declare const cyanPreset: {
|
|
|
83
35
|
darker: string;
|
|
84
36
|
contrastText: string;
|
|
85
37
|
};
|
|
86
|
-
export declare const
|
|
87
|
-
LightSelected: string;
|
|
88
|
-
LightSelectedHover: string;
|
|
89
|
-
DarkSelected: string;
|
|
90
|
-
DarkSelectedHover: string;
|
|
91
|
-
contrastText: string;
|
|
92
|
-
lighter: string;
|
|
93
|
-
light: string;
|
|
94
|
-
main: string;
|
|
95
|
-
dark: string;
|
|
96
|
-
darker: string;
|
|
97
|
-
name: string;
|
|
98
|
-
} | {
|
|
38
|
+
export declare const grass: {
|
|
99
39
|
name: string;
|
|
100
40
|
lighter: string;
|
|
101
41
|
light: string;
|
|
@@ -104,19 +44,7 @@ export declare const bluePreset: {
|
|
|
104
44
|
darker: string;
|
|
105
45
|
contrastText: string;
|
|
106
46
|
};
|
|
107
|
-
export declare const
|
|
108
|
-
LightSelected: string;
|
|
109
|
-
LightSelectedHover: string;
|
|
110
|
-
DarkSelected: string;
|
|
111
|
-
DarkSelectedHover: string;
|
|
112
|
-
contrastText: string;
|
|
113
|
-
lighter: string;
|
|
114
|
-
light: string;
|
|
115
|
-
main: string;
|
|
116
|
-
dark: string;
|
|
117
|
-
darker: string;
|
|
118
|
-
name: string;
|
|
119
|
-
} | {
|
|
47
|
+
export declare const candy: {
|
|
120
48
|
name: string;
|
|
121
49
|
lighter: string;
|
|
122
50
|
light: string;
|
|
@@ -125,19 +53,7 @@ export declare const orangePreset: {
|
|
|
125
53
|
darker: string;
|
|
126
54
|
contrastText: string;
|
|
127
55
|
};
|
|
128
|
-
export declare const
|
|
129
|
-
LightSelected: string;
|
|
130
|
-
LightSelectedHover: string;
|
|
131
|
-
DarkSelected: string;
|
|
132
|
-
DarkSelectedHover: string;
|
|
133
|
-
contrastText: string;
|
|
134
|
-
lighter: string;
|
|
135
|
-
light: string;
|
|
136
|
-
main: string;
|
|
137
|
-
dark: string;
|
|
138
|
-
darker: string;
|
|
139
|
-
name: string;
|
|
140
|
-
} | {
|
|
56
|
+
export declare const blaze: {
|
|
141
57
|
name: string;
|
|
142
58
|
lighter: string;
|
|
143
59
|
light: string;
|
|
@@ -147,18 +63,6 @@ export declare const redPreset: {
|
|
|
147
63
|
contrastText: string;
|
|
148
64
|
};
|
|
149
65
|
export declare function getColorPresets(presetsKey: ThemeColorPresets): {
|
|
150
|
-
LightSelected: string;
|
|
151
|
-
LightSelectedHover: string;
|
|
152
|
-
DarkSelected: string;
|
|
153
|
-
DarkSelectedHover: string;
|
|
154
|
-
contrastText: string;
|
|
155
|
-
lighter: string;
|
|
156
|
-
light: string;
|
|
157
|
-
main: string;
|
|
158
|
-
dark: string;
|
|
159
|
-
darker: string;
|
|
160
|
-
name: string;
|
|
161
|
-
} | {
|
|
162
66
|
name: string;
|
|
163
67
|
lighter: string;
|
|
164
68
|
light: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StateDefault, StateSkeleton } from "../theme";
|
|
2
|
+
import { ThemeColorPresets } from "../types";
|
|
3
|
+
export interface ColorStateOptions {
|
|
4
|
+
active12: string;
|
|
5
|
+
active: string;
|
|
6
|
+
focus: string;
|
|
7
|
+
hover: string;
|
|
8
|
+
default: string;
|
|
9
|
+
info: StateDefault;
|
|
10
|
+
success: StateDefault;
|
|
11
|
+
warning: StateDefault;
|
|
12
|
+
error: StateDefault;
|
|
13
|
+
skeleton: StateSkeleton;
|
|
14
|
+
}
|
|
15
|
+
export declare const getColorState: (presetsKey: ThemeColorPresets, mode: 'light' | 'dark') => ColorStateOptions;
|
package/utils/getFontValue.d.ts
CHANGED
package/utils/index.d.ts
CHANGED