@m4l/styles 3.2.2 → 6.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 +33 -41
- package/package.json +1 -1
- package/theme/defaultThemeOptions-DVY68pts.js +125 -0
- package/theme/defaultThemeOptions.d.ts +2 -1
- package/theme/index.d.ts +1 -1
- package/theme/overrides/M4LExtendedComponents/{index.dbc24a3d.js → index-BO_x8lkT.js} +595 -274
- package/theme/overrides/M4LRHFComponents/{index.7d702163.js → index-Dv4h8DSV.js} +109 -37
- package/theme/overrides/MUIComponents/Avatar.d.ts +1 -1
- package/theme/overrides/MUIComponents/Input.d.ts +1 -1
- package/theme/overrides/MUIComponents/Progress.d.ts +1 -1
- package/theme/overrides/MUIComponents/ToggleButton.d.ts +2 -2
- package/theme/overrides/MUIComponents/{index.2b5bc914.js → index-DrBJTI1s.js} +108 -61
- package/theme/overrides/{index.cc540e59.js → index-BOMUIneQ.js} +20 -14
- package/theme/palette/baseOpacityColors.d.ts +3 -0
- package/theme/palette/defaultColors.d.ts +14 -0
- package/theme/palette/index.d.ts +0 -1
- package/theme/palette/presetColors.d.ts +18 -4
- package/theme/palette/semanticColors.d.ts +16 -0
- package/theme/palette-voCQl3kP.js +792 -0
- package/theme/{shadows.67c0a60a.js → shadows-Cek_1mpN.js} +2 -1
- package/theme/{typography.616cfe0c.js → typography-BsOO459U.js} +11 -1
- package/types/augmentations.d.ts +160 -155
- package/types/types.d.ts +72 -31
- package/utils/{getColorPresets.38329841.js → getColorPresets-DgmrCj5l.js} +1 -1
- package/utils/getColorPresets.d.ts +4 -4
- package/utils/getColorState.d.ts +2 -2
- package/utils/{getFontValue.88831637.js → getFontValue-BEO-XID9.js} +8 -5
- package/utils/getPaletteByPreset.d.ts +127 -0
- package/utils/index.d.ts +1 -0
- package/vite-env.d.ts +3 -3
- package/theme/defaultThemeOptions.b39953a8.js +0 -24
- package/theme/palette/palette.d.ts +0 -6
- package/theme/palette/stateColors.d.ts +0 -2
- package/theme/palette.fc293d0e.js +0 -575
- /package/{config.3bb6415c.js → config-B8bZIPuH.js} +0 -0
- /package/theme/{index.34d0fdea.js → index-l0sNRNKZ.js} +0 -0
- /package/utils/{getColorState.b8092fb6.js → getColorState-D1JKXD4T.js} +0 -0
- /package/utils/{useResponsive.2c45e8e0.js → useResponsive-DaeQVwlH.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { alpha as a } from "@mui/material/styles";
|
|
2
|
-
import { G as n, B as s, C as e } from "./palette.
|
|
2
|
+
import { G as n, B as s, C as e } from "./palette-voCQl3kP.js";
|
|
3
3
|
const o = n[500], c = "#000000", t = (r) => {
|
|
4
4
|
const p = a(r, 0.2), x = a(r, 0.14), $ = a(r, 0.12);
|
|
5
5
|
return [
|
|
@@ -36,6 +36,7 @@ const o = n[500], c = "#000000", t = (r) => {
|
|
|
36
36
|
success: `0px 2px 8px 0px ${a(s.acidGreen[50], 0.2)}`,
|
|
37
37
|
warning: `0px 2px 8px 0px ${a(s.middleYellow[50], 0.2)}`,
|
|
38
38
|
error: `0px 2px 8px 0px ${a(s.flameRed[50], 0.2)}`,
|
|
39
|
+
//
|
|
39
40
|
card: `0 0 2px 0 ${a(n[500], 0.2)}, 0 12px 24px -4px ${a(
|
|
40
41
|
n[500],
|
|
41
42
|
0.12
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { createTheme as i } from "@mui/material";
|
|
2
|
-
import { r as e, p as t } from "../utils/getFontValue.
|
|
2
|
+
import { r as e, p as t } from "../utils/getFontValue-BEO-XID9.js";
|
|
3
3
|
const n = "Segoe UI, Poppins, sans-serif", g = i(), l = {
|
|
4
4
|
...g.typography,
|
|
5
5
|
fontFamily: n,
|
|
6
6
|
fontWeightRegular: 400,
|
|
7
7
|
fontWeightMedium: 600,
|
|
8
8
|
fontWeightBold: 700,
|
|
9
|
+
/* Definindo en Patronus */
|
|
9
10
|
h1: {
|
|
10
11
|
fontWeight: 600,
|
|
11
12
|
lineHeight: 1.5,
|
|
@@ -16,6 +17,7 @@ const n = "Segoe UI, Poppins, sans-serif", g = i(), l = {
|
|
|
16
17
|
lineHeight: 1,
|
|
17
18
|
...e({ sm: 40, md: 40, lg: 40 })
|
|
18
19
|
},
|
|
20
|
+
/* Definindo en Patronus */
|
|
19
21
|
h3: {
|
|
20
22
|
fontWeight: 600,
|
|
21
23
|
lineHeight: 1.5,
|
|
@@ -26,6 +28,7 @@ const n = "Segoe UI, Poppins, sans-serif", g = i(), l = {
|
|
|
26
28
|
lineHeight: 1.5,
|
|
27
29
|
...e({ sm: 20, md: 20, lg: 20 })
|
|
28
30
|
},
|
|
31
|
+
/* Definindo en Patronus */
|
|
29
32
|
h5: {
|
|
30
33
|
fontWeight: 500,
|
|
31
34
|
lineHeight: "28px",
|
|
@@ -38,24 +41,28 @@ const n = "Segoe UI, Poppins, sans-serif", g = i(), l = {
|
|
|
38
41
|
letterSpacing: "-0.08em",
|
|
39
42
|
...e({ sm: 18, md: 18, lg: 18 })
|
|
40
43
|
},
|
|
44
|
+
/* Definindo en Patronus */
|
|
41
45
|
subtitle: {
|
|
42
46
|
fontWeight: 400,
|
|
43
47
|
lineHeight: "20px",
|
|
44
48
|
letterSpacing: "-0.006em",
|
|
45
49
|
...e({ sm: 15, md: 15, lg: 15 })
|
|
46
50
|
},
|
|
51
|
+
/* Definindo en Patronus */
|
|
47
52
|
subtitleDens: {
|
|
48
53
|
fontWeight: 600,
|
|
49
54
|
lineHeight: "24px",
|
|
50
55
|
letterSpacing: "-0.006em",
|
|
51
56
|
...e({ sm: 15, md: 15, lg: 15 })
|
|
52
57
|
},
|
|
58
|
+
/* Definindo en Patronus */
|
|
53
59
|
paragraph: {
|
|
54
60
|
fontWeight: 400,
|
|
55
61
|
lineHeight: "16px",
|
|
56
62
|
letterSpacing: "-0.003em",
|
|
57
63
|
...e({ sm: 13, md: 13, lg: 13 })
|
|
58
64
|
},
|
|
65
|
+
/* Definindo en Patronus */
|
|
59
66
|
paragraphDens: {
|
|
60
67
|
fontWeight: 600,
|
|
61
68
|
lineHeight: "20px",
|
|
@@ -72,11 +79,13 @@ const n = "Segoe UI, Poppins, sans-serif", g = i(), l = {
|
|
|
72
79
|
lineHeight: 1.5,
|
|
73
80
|
fontSize: t(12)
|
|
74
81
|
},
|
|
82
|
+
/* Definindo en Patronus */
|
|
75
83
|
body: {
|
|
76
84
|
fontWeight: 400,
|
|
77
85
|
lineHeight: "16px",
|
|
78
86
|
...e({ sm: 11, md: 11, lg: 11 })
|
|
79
87
|
},
|
|
88
|
+
/* Definindo en Patronus */
|
|
80
89
|
bodyDens: {
|
|
81
90
|
fontWeight: 600,
|
|
82
91
|
lineHeight: "16px",
|
|
@@ -113,6 +122,7 @@ const n = "Segoe UI, Poppins, sans-serif", g = i(), l = {
|
|
|
113
122
|
fontSize: t(14),
|
|
114
123
|
textTransform: "capitalize"
|
|
115
124
|
},
|
|
125
|
+
/* Definindo en Patronus */
|
|
116
126
|
action: {
|
|
117
127
|
fontWeight: 600,
|
|
118
128
|
lineHeight: "16px",
|
package/types/augmentations.d.ts
CHANGED
|
@@ -1,155 +1,160 @@
|
|
|
1
|
-
import { Breakpoints } from '@mui/material';
|
|
2
|
-
|
|
3
|
-
import type { CustomShadowOptions } from '../theme';
|
|
4
|
-
|
|
5
|
-
declare module '@mui/material' {
|
|
6
|
-
interface Color {
|
|
7
|
-
0: string;
|
|
8
|
-
500_8: string;
|
|
9
|
-
500_12: string;
|
|
10
|
-
500_16: string;
|
|
11
|
-
500_24: string;
|
|
12
|
-
500_32: string;
|
|
13
|
-
500_48: string;
|
|
14
|
-
500_56: string;
|
|
15
|
-
500_80: string;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare module '@mui/material/styles' {
|
|
20
|
-
interface PaletteColor {
|
|
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
|
-
};
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
interface
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
interface
|
|
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
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
1
|
+
import { Breakpoints } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
import type { CustomShadowOptions } from '../theme';
|
|
4
|
+
|
|
5
|
+
declare module '@mui/material' {
|
|
6
|
+
interface Color {
|
|
7
|
+
0: string;
|
|
8
|
+
500_8: string;
|
|
9
|
+
500_12: string;
|
|
10
|
+
500_16: string;
|
|
11
|
+
500_24: string;
|
|
12
|
+
500_32: string;
|
|
13
|
+
500_48: string;
|
|
14
|
+
500_56: string;
|
|
15
|
+
500_80: string;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare module '@mui/material/styles' {
|
|
20
|
+
interface PaletteColor {
|
|
21
|
+
//TODO: Documentar los colores segun figma
|
|
22
|
+
// light: string; *** Por compatibilidad con MUI
|
|
23
|
+
// main: string; ***
|
|
24
|
+
// dark: string; *** Por compatibilidad con MUI
|
|
25
|
+
// contrastText: string; ***
|
|
26
|
+
|
|
27
|
+
focusActive: string;
|
|
28
|
+
focusVisible: string;
|
|
29
|
+
hover: string;
|
|
30
|
+
hoverOpacity: string;
|
|
31
|
+
opacity: string;
|
|
32
|
+
toneOpacity: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface TypeBackground {
|
|
36
|
+
neutral: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* interface SimplePaletteColorOptions {
|
|
40
|
+
lighter?: string;
|
|
41
|
+
darker?: string;
|
|
42
|
+
active: string;
|
|
43
|
+
primary: string;
|
|
44
|
+
activeOpacity: string;
|
|
45
|
+
hover: string;
|
|
46
|
+
focusVisible: string;
|
|
47
|
+
toneOpacity: string;
|
|
48
|
+
} */
|
|
49
|
+
|
|
50
|
+
interface Palette {
|
|
51
|
+
mode: 'light' | 'dark';
|
|
52
|
+
secondary: never;
|
|
53
|
+
skeleton: { default: string; transition: string };
|
|
54
|
+
default: PaletteColor;
|
|
55
|
+
border: {
|
|
56
|
+
main: string;
|
|
57
|
+
default: string;
|
|
58
|
+
secondary: string;
|
|
59
|
+
dens: string;
|
|
60
|
+
disabled: string;
|
|
61
|
+
error: string;
|
|
62
|
+
};
|
|
63
|
+
general: {
|
|
64
|
+
scrollBar: string;
|
|
65
|
+
gridHover: string;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Interfaz de colores de material-ui, define las opciones de personalización de la paleta de colores que se
|
|
71
|
+
* pueden usar al crear un tema con la función `createTheme`.
|
|
72
|
+
*/
|
|
73
|
+
interface PaletteOptions {
|
|
74
|
+
mode: 'light' | 'dark';
|
|
75
|
+
secondary: never;
|
|
76
|
+
skeleton: { default: string; transition: string };
|
|
77
|
+
border: {
|
|
78
|
+
main: string;
|
|
79
|
+
default: string;
|
|
80
|
+
secondary: string;
|
|
81
|
+
dens: string;
|
|
82
|
+
disabled: string;
|
|
83
|
+
error: string;
|
|
84
|
+
};
|
|
85
|
+
default: PaletteColorOptions;
|
|
86
|
+
general: {
|
|
87
|
+
scrollBar: string;
|
|
88
|
+
gridHover: string;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
interface ColorSchemeOverrides {
|
|
93
|
+
finalTheme?: true;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
interface CssVarsTheme {
|
|
97
|
+
generalSettings: {
|
|
98
|
+
isMobile: boolean;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
interface Theme extends CssVarsTheme {
|
|
103
|
+
stretch: boolean;
|
|
104
|
+
customShadows: CustomShadowOptions;
|
|
105
|
+
breakpoints: Breakpoints;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
interface CssVarsThemeOptions {
|
|
109
|
+
generalSettings: {
|
|
110
|
+
isMobile: boolean;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
interface ThemeVars {
|
|
115
|
+
customShadows: CustomShadowOptions;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
interface ColorSystem {
|
|
119
|
+
typography: TypographyVariants;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
interface TypeBackground {
|
|
123
|
+
default: string,
|
|
124
|
+
neutral: string,
|
|
125
|
+
surface: string,
|
|
126
|
+
hover: string,
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
interface TypographyVariants {
|
|
130
|
+
subtitle: Record<string, any>;
|
|
131
|
+
subtitleDens: Record<string, any>;
|
|
132
|
+
paragraph: Record<string, any>;
|
|
133
|
+
paragraphDens: Record<string, any>;
|
|
134
|
+
body: Record<string, any>;
|
|
135
|
+
bodyDens: Record<string, any>;
|
|
136
|
+
action: Record<string, any>;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
interface TypographyVariantsOptions {
|
|
140
|
+
subtitle: React.CSSProperties;
|
|
141
|
+
subtitleDens: React.CSSProperties;
|
|
142
|
+
paragraph: React.CSSProperties;
|
|
143
|
+
paragraphDens: React.CSSProperties;
|
|
144
|
+
body: React.CSSProperties;
|
|
145
|
+
bodyDens: React.CSSProperties;
|
|
146
|
+
action: React.CSSProperties;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
declare module '@mui/material/Typography' {
|
|
151
|
+
interface TypographyPropsVariantOverrides {
|
|
152
|
+
subtitle: true;
|
|
153
|
+
subtitleDens: true;
|
|
154
|
+
paragraph: true;
|
|
155
|
+
paragraphDens: true;
|
|
156
|
+
body: true;
|
|
157
|
+
bodyDens: true;
|
|
158
|
+
action: true;
|
|
159
|
+
}
|
|
160
|
+
}
|
package/types/types.d.ts
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
|
-
import { PaletteColor } from '@mui/material/styles';
|
|
1
|
+
import { PaletteColor, Theme } from '@mui/material/styles';
|
|
2
2
|
/**
|
|
3
3
|
* type usado para tipar las props sizes de los componentes o sus derivaciones
|
|
4
4
|
*/
|
|
5
5
|
export declare type Sizes = 'small' | 'medium' | 'large';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare type
|
|
6
|
+
/**
|
|
7
|
+
* Opciones de color seleccionables por un usuario con los que se puede pintar la aplicación.
|
|
8
|
+
*/
|
|
9
|
+
export declare type ThemeColorOptionsType = 'patronus' | 'turqui' | 'grass' | 'brown' | 'blaze';
|
|
10
|
+
/**
|
|
11
|
+
* Lista de colores semánticos disponibles en la aplicación.
|
|
12
|
+
*/
|
|
13
|
+
export declare type SemanticColorOptionsType = 'info' | 'success' | 'warning' | 'error';
|
|
14
|
+
/**
|
|
15
|
+
* Son los conjuntos de colores que se pueden usar en los componentes y corresponde al tipo PaletteColor
|
|
16
|
+
*/
|
|
17
|
+
export declare type ComponentPalletColor = 'primary' | 'default' | SemanticColorOptionsType;
|
|
10
18
|
export declare type BasePalettes = 'patronusBlue' | 'crayonBlue' | 'middleYellow' | 'acidGreen' | 'grassGreen' | 'desertBeige' | 'turquiBlue' | 'blazeOrange' | 'flameRed' | 'coolGrey' | 'brown' | 'marbleLight' | 'onyx' | 'mint' | 'oxford';
|
|
11
|
-
export declare type BaseOpacityPalettes = 'patronus' | 'turqui' | 'grass' | 'brown' | 'beige' | '
|
|
19
|
+
export declare type BaseOpacityPalettes = 'patronus' | 'turqui' | 'grass' | 'brown' | 'beige' | 'blaze' | 'cool' | 'marble' | 'mint' | 'oxford' | 'middle' | 'acid' | 'flame' | 'crayon';
|
|
12
20
|
export interface Colors {
|
|
13
|
-
|
|
21
|
+
/**
|
|
22
|
+
* ToneOpacity se usa para colorear el fondo de los celdas en el compksonente grid.
|
|
23
|
+
* Requiere un todo de 100 en alpha pero basado en el color de opacidad con fondo ligth o dark.
|
|
24
|
+
*/
|
|
25
|
+
'toneOpacity10': string;
|
|
26
|
+
'toneOpacity20': string;
|
|
14
27
|
10: string;
|
|
15
28
|
20: string;
|
|
16
29
|
30: string;
|
|
@@ -23,36 +36,64 @@ export interface Colors {
|
|
|
23
36
|
100: string;
|
|
24
37
|
}
|
|
25
38
|
export interface OpacityColors {
|
|
26
|
-
4: string;
|
|
27
|
-
6: string;
|
|
28
|
-
8: string;
|
|
29
39
|
10: string;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
32: string;
|
|
37
|
-
48: string;
|
|
38
|
-
60?: string;
|
|
39
|
-
72?: string;
|
|
40
|
+
20: string;
|
|
41
|
+
30: string;
|
|
42
|
+
40: string;
|
|
43
|
+
50: string;
|
|
44
|
+
60: string;
|
|
45
|
+
70: string;
|
|
40
46
|
}
|
|
41
|
-
export interface
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
export interface PresetColor {
|
|
48
|
+
main: string;
|
|
49
|
+
contrastText: string;
|
|
50
|
+
light: string;
|
|
51
|
+
lighter: string;
|
|
52
|
+
toneOpacityLight: string;
|
|
53
|
+
/**
|
|
54
|
+
* Permite definir fondos de componentes en estados hover y focus dependiendo de la necesidad.
|
|
55
|
+
*/
|
|
56
|
+
opacityLight: string;
|
|
57
|
+
opacityDark: string;
|
|
58
|
+
dark: string;
|
|
59
|
+
darker: string;
|
|
60
|
+
toneOpacityDark: string;
|
|
61
|
+
/**
|
|
62
|
+
* Permite mantener consitencia en el color de tema para los borders en caso de estar en un estado de usuario focus.
|
|
63
|
+
*/
|
|
64
|
+
borderMainDark: string;
|
|
65
|
+
borderMainLight: string;
|
|
48
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Lista de colores base en formato Colors
|
|
69
|
+
*/
|
|
49
70
|
export declare type BaseConstantColors = Record<BasePalettes, Colors>;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
export declare type
|
|
71
|
+
/**
|
|
72
|
+
* Son los colores de las las ocpiones del tema, en formato PresetColor (Mas amplio que el PaletteColor)
|
|
73
|
+
*/
|
|
74
|
+
export declare type ThemePresetColors = Record<ThemeColorOptionsType, PresetColor>;
|
|
75
|
+
/**
|
|
76
|
+
* Son los colores semanticos en formato PresetColor
|
|
77
|
+
*/
|
|
78
|
+
export declare type SemanticPresetColors = Record<SemanticColorOptionsType, PresetColor>;
|
|
79
|
+
/**
|
|
80
|
+
* Son los colores de las ocpiones del tema, en formato PalletColor
|
|
81
|
+
*/
|
|
82
|
+
export declare type ThemePaletteColors = Record<ThemeColorOptionsType, PaletteColor>;
|
|
83
|
+
/**
|
|
84
|
+
* Son las opcines de paleta de colores semánticos en formato PaletteColor
|
|
85
|
+
*/
|
|
86
|
+
export declare type SemanticsPaletteColors = Record<SemanticColorOptionsType, PaletteColor>;
|
|
87
|
+
/**
|
|
88
|
+
* Es la configuración de color que se usa fabricar la paleta "default", se encuentra en formato PaletteColor.
|
|
89
|
+
*/
|
|
90
|
+
export declare type DefaultPresetColor = Omit<PresetColor, 'borderMainDark' | 'borderMainLight' | 'main' | 'contrastText'> & {
|
|
91
|
+
mainLight: string;
|
|
92
|
+
mainDark: string;
|
|
93
|
+
};
|
|
54
94
|
export declare type PresetsOptions = Array<{
|
|
55
95
|
name: string | undefined;
|
|
56
96
|
value: string;
|
|
57
97
|
}>;
|
|
58
98
|
export declare type ColorState = 'warning' | 'delete' | 'info' | 'success';
|
|
99
|
+
export declare type OurTheme = Pick<Theme, 'palette' | 'typography' | 'customShadows' | 'stretch'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const DEFAULT_PRESET:
|
|
3
|
-
export declare const defaultPresetColors:
|
|
4
|
-
export declare function getColorPresets(presetsKey:
|
|
1
|
+
import { PresetColor, ThemeColorOptionsType } from '../types';
|
|
2
|
+
export declare const DEFAULT_PRESET: ThemeColorOptionsType;
|
|
3
|
+
export declare const defaultPresetColors: PresetColor;
|
|
4
|
+
export declare function getColorPresets(presetsKey: ThemeColorOptionsType): PresetColor;
|
|
5
5
|
export default getColorPresets;
|
package/utils/getColorState.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPalletColor } from '../types/types';
|
|
2
2
|
import { Theme } from '@mui/material';
|
|
3
|
-
export declare const getColorState: (color:
|
|
3
|
+
export declare const getColorState: (color: ComponentPalletColor, palette: Theme['palette'] | Theme['vars']['palette']) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useTheme as h } from "@mui/material/styles";
|
|
2
|
-
import { u as m } from "./useResponsive.
|
|
2
|
+
import { u as m } from "./useResponsive-DaeQVwlH.js";
|
|
3
3
|
function f(e) {
|
|
4
4
|
return Math.round(parseFloat(e) * 16);
|
|
5
5
|
}
|
|
@@ -20,10 +20,13 @@ function l({ sm: e, md: t, lg: o }) {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
function g() {
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
return (
|
|
24
|
+
// @ts-ignore not sure what is this
|
|
25
|
+
[...h().breakpoints.keys].reverse().reduce((o, n) => {
|
|
26
|
+
const s = m("up", n);
|
|
27
|
+
return !o && s ? n : o;
|
|
28
|
+
}, null) || "xs"
|
|
29
|
+
);
|
|
27
30
|
}
|
|
28
31
|
function S(e) {
|
|
29
32
|
const t = h(), o = g(), n = t.breakpoints.up(o === "xl" ? "lg" : o), i = (e === "h1" || e === "h2" || e === "h3" || e === "h4" || e === "h5" || e === "h6") && t.typography[e][n] ? t.typography[e][n] : t.typography[e], p = f(i.fontSize), r = Number(t.typography[e].lineHeight) * p, { fontWeight: u, letterSpacing: c } = t.typography[e];
|