@m4l/styles 0.0.8 → 0.0.9
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 +40 -36
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { alpha as t, useTheme as
|
|
1
|
+
import { alpha as t, useTheme as R } from "@mui/material/styles";
|
|
2
2
|
import { alpha as n } from "@mui/system";
|
|
3
3
|
import { alpha as F } from "@mui/material";
|
|
4
|
-
import { useResponsive as
|
|
4
|
+
import { useResponsive as $ } from "@m4l/graphics";
|
|
5
5
|
function c(o, e) {
|
|
6
6
|
return `linear-gradient(to bottom, ${o}, ${e})`;
|
|
7
7
|
}
|
|
@@ -138,7 +138,7 @@ const r = {
|
|
|
138
138
|
80: "#fff0",
|
|
139
139
|
90: "#fff0"
|
|
140
140
|
}
|
|
141
|
-
},
|
|
141
|
+
}, A = {
|
|
142
142
|
patronus: {
|
|
143
143
|
4: t(r.patronusBlue[50], 0.04),
|
|
144
144
|
12: t(r.patronusBlue[50], 0.12),
|
|
@@ -209,7 +209,7 @@ const r = {
|
|
|
209
209
|
dark: r.patronusBlue[40],
|
|
210
210
|
darker: r.patronusBlue[20],
|
|
211
211
|
contrastText: r.marbleLight[10]
|
|
212
|
-
},
|
|
212
|
+
}, T = {
|
|
213
213
|
lighter: "#fff0",
|
|
214
214
|
light: "#fff0",
|
|
215
215
|
main: "#fff0",
|
|
@@ -262,39 +262,39 @@ const r = {
|
|
|
262
262
|
50048: t("#919EAB", 0.48),
|
|
263
263
|
50056: t("#919EAB", 0.56),
|
|
264
264
|
50080: t("#919EAB", 0.8)
|
|
265
|
-
},
|
|
265
|
+
}, D = {
|
|
266
266
|
primary: c(b.light, b.main),
|
|
267
267
|
info: c(y.light, y.main),
|
|
268
268
|
success: c(f.light, f.main),
|
|
269
269
|
warning: c(h.light, h.main),
|
|
270
270
|
error: c(M.light, M.main)
|
|
271
|
-
},
|
|
271
|
+
}, I = {
|
|
272
272
|
violet: ["#826AF9", "#9E86FF", "#D0AEFF", "#F7D2FF"],
|
|
273
273
|
blue: ["#2D99FF", "#83CFFF", "#A5F3FF", "#CCFAFF"],
|
|
274
274
|
green: ["#2CD9C5", "#60F1C8", "#A4F7CC", "#C0F2DC"],
|
|
275
275
|
yellow: ["#FFE700", "#FFEF5A", "#FFF7AE", "#FFF3D6"],
|
|
276
276
|
red: ["#FF6C40", "#FF8F6D", "#FFBD98", "#FFF2D4"]
|
|
277
|
-
},
|
|
277
|
+
}, z = {
|
|
278
278
|
normal: r.crayonBlue[50],
|
|
279
279
|
hover: r.crayonBlue[70]
|
|
280
|
-
},
|
|
280
|
+
}, G = {
|
|
281
281
|
normal: r.acidGreen[60],
|
|
282
282
|
hover: r.acidGreen[70]
|
|
283
|
-
},
|
|
283
|
+
}, E = {
|
|
284
284
|
normal: r.flameRed[40],
|
|
285
285
|
hover: r.flameRed[60]
|
|
286
|
-
},
|
|
286
|
+
}, H = {
|
|
287
287
|
normal: r.flameRed[60],
|
|
288
288
|
hover: r.flameRed[70]
|
|
289
|
-
},
|
|
289
|
+
}, P = {
|
|
290
290
|
default: t(r.coolGrey[50], 0.24),
|
|
291
291
|
transition: t(r.coolGrey[50], 0.08)
|
|
292
292
|
}, l = {
|
|
293
|
-
info: { ...
|
|
294
|
-
success: { ...
|
|
295
|
-
error: { ...
|
|
296
|
-
warning: { ...
|
|
297
|
-
skeleton: { ...
|
|
293
|
+
info: { ...z },
|
|
294
|
+
success: { ...G },
|
|
295
|
+
error: { ...E },
|
|
296
|
+
warning: { ...H },
|
|
297
|
+
skeleton: { ...P }
|
|
298
298
|
}, k = {
|
|
299
299
|
common: { black: "#000", white: "#fff" },
|
|
300
300
|
primary: { ...b },
|
|
@@ -302,15 +302,15 @@ const r = {
|
|
|
302
302
|
...l
|
|
303
303
|
},
|
|
304
304
|
patronus: { ...r },
|
|
305
|
-
opacity: {
|
|
306
|
-
secondary: { ...
|
|
305
|
+
opacity: { ...A },
|
|
306
|
+
secondary: { ...T, contrastText: "#fff" },
|
|
307
307
|
info: { ...y, contrastText: "#fff" },
|
|
308
308
|
success: { ...f, contrastText: x[800] },
|
|
309
309
|
warning: { ...h, contrastText: x[800] },
|
|
310
310
|
error: { ...M, contrastText: "#fff" },
|
|
311
311
|
grey: x,
|
|
312
|
-
gradients:
|
|
313
|
-
chart:
|
|
312
|
+
gradients: D,
|
|
313
|
+
chart: I,
|
|
314
314
|
divider: x[50024],
|
|
315
315
|
action: {
|
|
316
316
|
hoverOpacity: 0.08,
|
|
@@ -395,15 +395,19 @@ const r = {
|
|
|
395
395
|
darker: r.blazeOrange[20],
|
|
396
396
|
contrastText: r.marbleLight[10]
|
|
397
397
|
}
|
|
398
|
-
],
|
|
398
|
+
], C = g[0], W = g[1], _ = g[2], q = g[3], N = g[4];
|
|
399
399
|
function ir(o) {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
400
|
+
try {
|
|
401
|
+
return {
|
|
402
|
+
patronus: C,
|
|
403
|
+
turqui: W,
|
|
404
|
+
grass: _,
|
|
405
|
+
candy: q,
|
|
406
|
+
blaze: N
|
|
407
|
+
}[o];
|
|
408
|
+
} catch {
|
|
409
|
+
}
|
|
410
|
+
return C;
|
|
407
411
|
}
|
|
408
412
|
const nr = (o, e) => {
|
|
409
413
|
let a = {};
|
|
@@ -551,14 +555,14 @@ function p({ sm: o, md: e, lg: a }) {
|
|
|
551
555
|
};
|
|
552
556
|
}
|
|
553
557
|
function j() {
|
|
554
|
-
return [...
|
|
555
|
-
const v =
|
|
558
|
+
return [...R().breakpoints.keys].reverse().reduce((a, i) => {
|
|
559
|
+
const v = $("up", i);
|
|
556
560
|
return !a && v ? i : a;
|
|
557
561
|
}, null) || "xs";
|
|
558
562
|
}
|
|
559
563
|
function pr(o) {
|
|
560
|
-
const e =
|
|
561
|
-
return { fontSize: B, lineHeight:
|
|
564
|
+
const e = R(), a = j(), i = e.breakpoints.up(a === "xl" ? "lg" : a), S = (o === "h1" || o === "h2" || o === "h3" || o === "h4" || o === "h5" || o === "h6") && e.typography[o][i] ? e.typography[o][i] : e.typography[o], B = Y(S.fontSize), L = Number(e.typography[o].lineHeight) * B, { fontWeight: O, letterSpacing: w } = e.typography[o];
|
|
565
|
+
return { fontSize: B, lineHeight: L, fontWeight: O, letterSpacing: w };
|
|
562
566
|
}
|
|
563
567
|
const V = "Poppins, sans-serif", U = {
|
|
564
568
|
fontFamily: V,
|
|
@@ -673,7 +677,7 @@ const V = "Poppins, sans-serif", U = {
|
|
|
673
677
|
}
|
|
674
678
|
}, lr = {
|
|
675
679
|
typography: U
|
|
676
|
-
}, K = d.light.grey[500], J = "#000000",
|
|
680
|
+
}, K = d.light.grey[500], J = "#000000", m = (o) => {
|
|
677
681
|
const e = t(o, 0.2), a = t(o, 0.14), i = t(o, 0.12);
|
|
678
682
|
return [
|
|
679
683
|
"none",
|
|
@@ -733,8 +737,8 @@ const V = "Poppins, sans-serif", U = {
|
|
|
733
737
|
...e
|
|
734
738
|
};
|
|
735
739
|
}, dr = {
|
|
736
|
-
light:
|
|
737
|
-
dark:
|
|
740
|
+
light: m(K),
|
|
741
|
+
dark: m(J)
|
|
738
742
|
};
|
|
739
743
|
function Q(o) {
|
|
740
744
|
return {
|
|
@@ -2340,7 +2344,7 @@ export {
|
|
|
2340
2344
|
q as candy,
|
|
2341
2345
|
g as colorPresets,
|
|
2342
2346
|
sr as createCustomShadows,
|
|
2343
|
-
|
|
2347
|
+
C as defaultPreset,
|
|
2344
2348
|
lr as defaultThemeOptions,
|
|
2345
2349
|
ur as fnComponentsOverrides,
|
|
2346
2350
|
ir as getColorPresets,
|