@m4l/styles 7.1.14-beta.3 → 7.1.14
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/package.json +2 -3
- package/theme/shadows.d.ts +1 -0
- package/theme/shadows.js +22 -19
- package/theme/typography.d.ts +4 -0
- package/theme/typography.js +5 -4
- package/utils/getUserThemeOptions.js +13 -14
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/styles",
|
|
3
|
-
"version": "7.1.14
|
|
3
|
+
"version": "7.1.14",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": "m4l team",
|
|
6
6
|
"publishConfig": {
|
|
7
|
-
"access": "public"
|
|
8
|
-
"tag": "beta"
|
|
7
|
+
"access": "public"
|
|
9
8
|
},
|
|
10
9
|
"lint-staged": {
|
|
11
10
|
"*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
|
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
|
};
|
package/theme/typography.d.ts
CHANGED
|
@@ -238,4 +238,8 @@ export declare const typography: {
|
|
|
238
238
|
readonly fontWeight: 600;
|
|
239
239
|
readonly lineHeight: "16px";
|
|
240
240
|
};
|
|
241
|
+
readonly fontSize: number;
|
|
242
|
+
readonly fontWeightLight: React.CSSProperties["fontWeight"];
|
|
243
|
+
readonly htmlFontSize: number;
|
|
244
|
+
readonly pxToRem: (px: number) => string;
|
|
241
245
|
};
|
package/theme/typography.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { createTheme as i } from "@mui/material";
|
|
1
2
|
import { a as e, p as t } from "../utils/getFontValue.js";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
fontFamily:
|
|
3
|
+
const n = "Inter, Segoe UI, Poppins, sans-serif", g = i(), l = {
|
|
4
|
+
...g.typography,
|
|
5
|
+
fontFamily: n,
|
|
5
6
|
fontWeightRegular: 400,
|
|
6
7
|
fontWeightMedium: 600,
|
|
7
8
|
fontWeightBold: 700,
|
|
@@ -129,5 +130,5 @@ const i = "Inter, Segoe UI, Poppins, sans-serif", g = {
|
|
|
129
130
|
}
|
|
130
131
|
};
|
|
131
132
|
export {
|
|
132
|
-
|
|
133
|
+
l as t
|
|
133
134
|
};
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { createTheme as
|
|
2
|
-
import { t as
|
|
3
|
-
import { s as
|
|
1
|
+
import { createTheme as s, alpha as e } from "@mui/material/styles";
|
|
2
|
+
import { t as a } from "../theme/typography.js";
|
|
3
|
+
import { s as m, c as p } from "../theme/shadows.js";
|
|
4
4
|
import { S as i } from "../theme/sizes/size.js";
|
|
5
|
-
import { g } from "./getColorPresets.js";
|
|
6
|
-
import { g as
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { g as c } from "./getColorPresets.js";
|
|
6
|
+
import { g as f } from "./getPaletteByPreset.js";
|
|
7
|
+
const o = s();
|
|
8
|
+
function S(t, r) {
|
|
9
9
|
return {
|
|
10
|
-
...t,
|
|
11
|
-
...t.typography,
|
|
12
10
|
...o,
|
|
13
|
-
...
|
|
11
|
+
...a,
|
|
12
|
+
...m[t],
|
|
14
13
|
customShadows: {
|
|
15
|
-
primary: `0 8px 16px 0 ${
|
|
16
|
-
...
|
|
14
|
+
primary: `0 8px 16px 0 ${e(c(r).main, 0.2)}`,
|
|
15
|
+
...p(t)
|
|
17
16
|
},
|
|
18
17
|
stretch: !0,
|
|
19
|
-
palette: { ...
|
|
20
|
-
typography:
|
|
18
|
+
palette: { ...o.palette, ...f(r)[t] },
|
|
19
|
+
typography: a,
|
|
21
20
|
size: i
|
|
22
21
|
};
|
|
23
22
|
}
|