@m4l/styles 7.1.15 → 7.1.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.
- package/index.js +45 -32
- package/package.json +1 -1
- package/theme/index.d.ts +1 -1
- package/theme/shadows.d.ts +1 -0
- package/theme/shadows.js +22 -19
- package/theme/typography/index.d.ts +7 -0
- package/theme/typography/index.js +1 -0
- package/theme/typography/types.d.ts +6 -0
- package/theme/typography/types.js +1 -0
- package/theme/{typography.d.ts → typographyOld.d.ts} +5 -20
- package/theme/{typography.js → typographyOld.js} +17 -13
- package/utils/getPaletteByPreset.js +1 -1
- package/utils/getUserThemeOptions.js +1 -1
package/index.js
CHANGED
|
@@ -1,39 +1,52 @@
|
|
|
1
|
-
import { D as
|
|
1
|
+
import { D as e, g as s, m as t } from "./config.js";
|
|
2
2
|
import { c as p, s as m } from "./theme/shadows.js";
|
|
3
|
-
import { f as
|
|
4
|
-
import { B as
|
|
5
|
-
import { B as
|
|
6
|
-
import { C as
|
|
7
|
-
import { G as
|
|
8
|
-
import { p as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
3
|
+
import { f as E } from "./theme/overrides/index.js";
|
|
4
|
+
import { B as S } from "./theme/palette/baseColors.js";
|
|
5
|
+
import { B as O } from "./theme/palette/baseOpacityColors.js";
|
|
6
|
+
import { C as P } from "./theme/palette/commonColors.js";
|
|
7
|
+
import { G as A } from "./theme/palette/greyPalette.js";
|
|
8
|
+
import { p as R } from "./theme/palette/presetColors.js";
|
|
9
|
+
import { B as i } from "./theme/typography/baseFontSize.js";
|
|
10
|
+
import { B as n } from "./theme/typography/baseLetterSpacing.js";
|
|
11
|
+
import { B as L } from "./theme/typography/baseLineHeight.js";
|
|
12
|
+
import { B as Y } from "./theme/typography/baseWeight.js";
|
|
13
|
+
import { T as u } from "./theme/typography/typography.js";
|
|
14
|
+
import { a as D, T as h } from "./theme/typography/typographySizes.js";
|
|
15
|
+
import { t as M } from "./theme/typographyOld.js";
|
|
16
|
+
import { u as Z } from "./utils/useResponsive.js";
|
|
17
|
+
import { D as y, d as U, g as c } from "./utils/getColorPresets.js";
|
|
18
|
+
import { p as z, r as b, a as k } from "./utils/getFontValue.js";
|
|
19
|
+
import { g as V } from "./utils/getColorState.js";
|
|
20
|
+
import { g as j } from "./utils/getPaletteByPreset.js";
|
|
21
|
+
import { g as J } from "./utils/getUserThemeOptions.js";
|
|
16
22
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
n as
|
|
20
|
-
L as
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
S as BASE_COLORS,
|
|
24
|
+
i as BASE_FONT_SIZE,
|
|
25
|
+
n as BASE_LETTER_SPACING,
|
|
26
|
+
L as BASE_LINE_HEIGHT,
|
|
27
|
+
O as BASE_OPACITY_COLORS,
|
|
28
|
+
Y as BASE_WEIGHT,
|
|
29
|
+
P as COMMON_COLORS,
|
|
30
|
+
y as DEFAULT_PRESET,
|
|
31
|
+
e as DEFAULT_SIZE,
|
|
32
|
+
A as GREY_PALETTE,
|
|
33
|
+
u as TYPOGRAPHY,
|
|
34
|
+
D as TYPOGRAPHY_SIZES_DESKTOP,
|
|
35
|
+
h as TYPOGRAPHY_SIZES_MOBILE,
|
|
23
36
|
p as createCustomShadows,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
U as defaultPresetColors,
|
|
38
|
+
E as fnComponentsOverrides,
|
|
39
|
+
c as getColorPresets,
|
|
40
|
+
V as getColorState,
|
|
41
|
+
j as getPaletteByPreset,
|
|
42
|
+
J as getUserThemeOptions,
|
|
30
43
|
s as globalRemSize,
|
|
31
44
|
t as muiBreakpointsValues,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
45
|
+
R as presetsOptionsMainColor,
|
|
46
|
+
z as pxToRem,
|
|
47
|
+
b as remToPx,
|
|
48
|
+
k as responsiveFontSizes,
|
|
36
49
|
m as shadows,
|
|
37
|
-
|
|
38
|
-
|
|
50
|
+
M as typographyOld,
|
|
51
|
+
Z as useResponsive
|
|
39
52
|
};
|
package/package.json
CHANGED
package/theme/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export type { CustomShadowOptions } from './shadows';
|
|
|
2
2
|
export { shadows, createCustomShadows } from './shadows';
|
|
3
3
|
export * from './palette';
|
|
4
4
|
export * from './typography';
|
|
5
|
-
export
|
|
5
|
+
export * from './typographyOld';
|
|
6
6
|
export * from './sizes';
|
|
7
7
|
export { fnComponentsOverrides } from './overrides';
|
package/theme/shadows.d.ts
CHANGED
package/theme/shadows.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { alpha as x } from "@mui/material/styles";
|
|
2
2
|
import { G as r } from "./palette/greyPalette.js";
|
|
3
|
-
import { B as
|
|
4
|
-
import { C as
|
|
5
|
-
|
|
3
|
+
import { B as o } from "./palette/baseColors.js";
|
|
4
|
+
import { C as s } from "./palette/commonColors.js";
|
|
5
|
+
import { B as e } from "./palette/baseOpacityColors.js";
|
|
6
|
+
const i = r[500], d = "#000000", a = (t) => {
|
|
6
7
|
const p = x(t, 0.2), $ = x(t, 0.14), n = x(t, 0.12);
|
|
7
8
|
return [
|
|
8
9
|
"none",
|
|
@@ -31,19 +32,19 @@ const s = r[500], i = "#000000", a = (t) => {
|
|
|
31
32
|
`0px 11px 14px -7px ${p},0px 23px 36px 3px ${$},0px 9px 44px 8px ${n}`,
|
|
32
33
|
`0px 11px 15px -7px ${p},0px 24px 38px 3px ${$},0px 9px 46px 8px ${n}`
|
|
33
34
|
];
|
|
34
|
-
},
|
|
35
|
+
}, h = (t) => {
|
|
35
36
|
const p = {
|
|
36
|
-
info: `0px 2px 8px 0px ${x(
|
|
37
|
-
secondary: `0px 2px 8px 0px ${x(
|
|
38
|
-
success: `0px 2px 8px 0px ${x(
|
|
39
|
-
warning: `0px 2px 8px 0px ${x(
|
|
40
|
-
error: `0px 2px 8px 0px ${x(
|
|
37
|
+
info: `0px 2px 8px 0px ${x(o.patronusBlue[50], 0.2)}`,
|
|
38
|
+
secondary: `0px 2px 8px 0px ${x(o.patronusBlue[50], 0.24)}`,
|
|
39
|
+
success: `0px 2px 8px 0px ${x(o.acidGreen[50], 0.2)}`,
|
|
40
|
+
warning: `0px 2px 8px 0px ${x(o.middleYellow[50], 0.2)}`,
|
|
41
|
+
error: `0px 2px 8px 0px ${x(o.flameRed[50], 0.2)}`,
|
|
41
42
|
//
|
|
42
43
|
card: `0 0 2px 0 ${x(r[500], 0.2)}, 0 12px 24px -4px ${x(
|
|
43
44
|
r[500],
|
|
44
45
|
0.12
|
|
45
46
|
)}`,
|
|
46
|
-
dialog: `-40px 40px 80px -8px ${x(
|
|
47
|
+
dialog: `-40px 40px 80px -8px ${x(s.black, 0.24)}`,
|
|
47
48
|
dropdown: `0 0 2px 0 ${x(r[500], 0.24)}, -20px 20px 40px -4px ${x(
|
|
48
49
|
r[500],
|
|
49
50
|
0.24
|
|
@@ -58,8 +59,9 @@ const s = r[500], i = "#000000", a = (t) => {
|
|
|
58
59
|
// todo: solicitar a diseño crear token en base porque está quemado
|
|
59
60
|
z4: `0px 12px 32px 4px ${x("#243B46", 0.12)}`,
|
|
60
61
|
// todo: solicitar a diseño crear token en base porque está quemado
|
|
61
|
-
innerShadowContainer: `2px 2px 4px 1px ${x("#1C2121", 0.
|
|
62
|
-
innerShadowOutlinedText: `2px 2px
|
|
62
|
+
innerShadowContainer: `2px 2px 4px 1px ${x(e.onyx[80] || "#1C2121", 0.6)} inset`,
|
|
63
|
+
innerShadowOutlinedText: `2px 2px 6px 2px ${x(e.onyx[80] || "#1C2121", 0.48)} inset`,
|
|
64
|
+
innerShadowText: `2px 2px 4px 2px ${x(e.onyx[80] || "#1C2121", 0.16)} inset`,
|
|
63
65
|
...p
|
|
64
66
|
} : {
|
|
65
67
|
z1: `0px 2px 2px 2px ${x("#000000", 0.16)}`,
|
|
@@ -70,15 +72,16 @@ const s = r[500], i = "#000000", a = (t) => {
|
|
|
70
72
|
// todo: solicitar a diseño crear token en base porque está quemado
|
|
71
73
|
z4: `0px 12px 32px 4px ${x("#09090A", 0.35)}`,
|
|
72
74
|
// todo: solicitar a diseño crear token en base porque está quemado
|
|
73
|
-
innerShadowContainer: `
|
|
74
|
-
innerShadowOutlinedText: `
|
|
75
|
+
innerShadowContainer: `3px 3px 4px 1px ${x(e.onyx[80] || "#1C2121", 0.72)} inset`,
|
|
76
|
+
innerShadowOutlinedText: `3px 3px 6px 2px ${x(e.onyx[80] || "#1C2121", 0.72)} inset`,
|
|
77
|
+
innerShadowText: `2px 2px 4px 2px ${x(e.onyx[80] || "#1C2121", 0.72)} inset`,
|
|
75
78
|
...p
|
|
76
79
|
};
|
|
77
|
-
},
|
|
78
|
-
light: a(
|
|
79
|
-
dark: a(
|
|
80
|
+
}, l = {
|
|
81
|
+
light: a(i),
|
|
82
|
+
dark: a(d)
|
|
80
83
|
};
|
|
81
84
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
h as c,
|
|
86
|
+
l as s
|
|
84
87
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,27 +1,12 @@
|
|
|
1
|
-
export
|
|
2
|
-
fontSize: string;
|
|
3
|
-
fontWeight: number;
|
|
4
|
-
lineHeight: string;
|
|
5
|
-
letterSpacing: string;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Listas de variantes de tipografía disponibles para la aplicación web.
|
|
9
|
-
*/
|
|
10
|
-
export type M4LTypographyVariants = 'h1' | 'h2' | 'h3' | 'h5' | 'subtitle' | 'subtitleDens' | 'paragraph' | 'paragraphDens' | 'body' | 'bodyDens';
|
|
11
|
-
export interface TypographyVariants {
|
|
12
|
-
subtitle: FontProps;
|
|
13
|
-
subtitleDens: FontProps;
|
|
14
|
-
paragraph: FontProps;
|
|
15
|
-
paragraphDens: FontProps;
|
|
16
|
-
body: FontProps;
|
|
17
|
-
bodyDens: FontProps;
|
|
18
|
-
action: FontProps;
|
|
19
|
-
}
|
|
20
|
-
export declare const typography: {
|
|
1
|
+
export declare const typographyOld: {
|
|
21
2
|
readonly fontFamily: "Inter, Segoe UI, Poppins, sans-serif";
|
|
22
3
|
readonly fontWeightRegular: 400;
|
|
23
4
|
readonly fontWeightMedium: 600;
|
|
24
5
|
readonly fontWeightBold: 700;
|
|
6
|
+
readonly fontSize: 14;
|
|
7
|
+
readonly fontWeightLight: 300;
|
|
8
|
+
readonly htmlFontSize: 16;
|
|
9
|
+
readonly pxToRem: (size: number) => string;
|
|
25
10
|
readonly h1: {
|
|
26
11
|
readonly '@media (min-width:0px)': {
|
|
27
12
|
fontSize: string;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { a as e, p as t } from "../utils/getFontValue.js";
|
|
2
|
-
const
|
|
2
|
+
const n = "Inter, Segoe UI, Poppins, sans-serif", o = {
|
|
3
3
|
// ...baseTheme.typography,
|
|
4
|
-
fontFamily:
|
|
4
|
+
fontFamily: n,
|
|
5
5
|
fontWeightRegular: 400,
|
|
6
6
|
fontWeightMedium: 600,
|
|
7
7
|
fontWeightBold: 700,
|
|
8
|
-
|
|
8
|
+
fontSize: 14,
|
|
9
|
+
fontWeightLight: 300,
|
|
10
|
+
htmlFontSize: 16,
|
|
11
|
+
pxToRem: (i) => `${i / 16}rem`,
|
|
12
|
+
// Definindo en Patronus
|
|
9
13
|
h1: {
|
|
10
14
|
fontWeight: 600,
|
|
11
15
|
lineHeight: 1.5,
|
|
@@ -16,7 +20,7 @@ const i = "Inter, Segoe UI, Poppins, sans-serif", g = {
|
|
|
16
20
|
lineHeight: 1,
|
|
17
21
|
...e({ sm: 40, md: 40, lg: 40 })
|
|
18
22
|
},
|
|
19
|
-
|
|
23
|
+
// Definindo en Patronus
|
|
20
24
|
h3: {
|
|
21
25
|
fontWeight: 600,
|
|
22
26
|
lineHeight: 1.5,
|
|
@@ -27,7 +31,7 @@ const i = "Inter, Segoe UI, Poppins, sans-serif", g = {
|
|
|
27
31
|
lineHeight: 1.5,
|
|
28
32
|
...e({ sm: 20, md: 20, lg: 20 })
|
|
29
33
|
},
|
|
30
|
-
|
|
34
|
+
// Definindo en Patronus
|
|
31
35
|
h5: {
|
|
32
36
|
fontWeight: 500,
|
|
33
37
|
lineHeight: "28px",
|
|
@@ -40,28 +44,28 @@ const i = "Inter, Segoe UI, Poppins, sans-serif", g = {
|
|
|
40
44
|
letterSpacing: "-0.08em",
|
|
41
45
|
...e({ sm: 18, md: 18, lg: 18 })
|
|
42
46
|
},
|
|
43
|
-
|
|
47
|
+
// Definindo en Patronus
|
|
44
48
|
subtitle: {
|
|
45
49
|
fontWeight: 400,
|
|
46
50
|
lineHeight: "20px",
|
|
47
51
|
letterSpacing: "-0.006em",
|
|
48
52
|
...e({ sm: 15, md: 15, lg: 15 })
|
|
49
53
|
},
|
|
50
|
-
|
|
54
|
+
// Definindo en Patronus
|
|
51
55
|
subtitleDens: {
|
|
52
56
|
fontWeight: 600,
|
|
53
57
|
lineHeight: "24px",
|
|
54
58
|
letterSpacing: "-0.006em",
|
|
55
59
|
...e({ sm: 15, md: 15, lg: 15 })
|
|
56
60
|
},
|
|
57
|
-
|
|
61
|
+
// Definindo en Patronus
|
|
58
62
|
paragraph: {
|
|
59
63
|
fontWeight: 400,
|
|
60
64
|
lineHeight: "16px",
|
|
61
65
|
letterSpacing: "-0.003em",
|
|
62
66
|
...e({ sm: 13, md: 13, lg: 13 })
|
|
63
67
|
},
|
|
64
|
-
|
|
68
|
+
// Definindo en Patronus
|
|
65
69
|
paragraphDens: {
|
|
66
70
|
fontWeight: 600,
|
|
67
71
|
lineHeight: "20px",
|
|
@@ -78,13 +82,13 @@ const i = "Inter, Segoe UI, Poppins, sans-serif", g = {
|
|
|
78
82
|
lineHeight: 1.5,
|
|
79
83
|
fontSize: t(12)
|
|
80
84
|
},
|
|
81
|
-
|
|
85
|
+
// Definindo en Patronus
|
|
82
86
|
body: {
|
|
83
87
|
fontWeight: 400,
|
|
84
88
|
lineHeight: "16px",
|
|
85
89
|
...e({ sm: 11, md: 11, lg: 11 })
|
|
86
90
|
},
|
|
87
|
-
|
|
91
|
+
// Definindo en Patronus
|
|
88
92
|
bodyDens: {
|
|
89
93
|
fontWeight: 600,
|
|
90
94
|
lineHeight: "16px",
|
|
@@ -121,7 +125,7 @@ const i = "Inter, Segoe UI, Poppins, sans-serif", g = {
|
|
|
121
125
|
fontSize: t(14),
|
|
122
126
|
textTransform: "capitalize"
|
|
123
127
|
},
|
|
124
|
-
|
|
128
|
+
// Definindo en Patronus
|
|
125
129
|
action: {
|
|
126
130
|
fontWeight: 600,
|
|
127
131
|
lineHeight: "16px",
|
|
@@ -129,5 +133,5 @@ const i = "Inter, Segoe UI, Poppins, sans-serif", g = {
|
|
|
129
133
|
}
|
|
130
134
|
};
|
|
131
135
|
export {
|
|
132
|
-
|
|
136
|
+
o as t
|
|
133
137
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createTheme as p, alpha as s } from "@mui/material";
|
|
2
|
-
import { t as o } from "../theme/
|
|
2
|
+
import { t as o } from "../theme/typographyOld.js";
|
|
3
3
|
import { s as e, c as m } from "../theme/shadows.js";
|
|
4
4
|
import { S as i } from "../theme/sizes/size.js";
|
|
5
5
|
import { g } from "./getColorPresets.js";
|