@m4l/graphics 1.0.1 → 1.0.3
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/components/GlobalStyle/{index.c11ef3f3.js → index.5c2f4861.js} +11 -11
- package/contexts/HostThemeContext/index.97bd7c68.js +44 -0
- package/contexts/{index.d28ab716.js → index.14a9154d.js} +1 -1
- package/hooks/{index.73785922.js → index.a60674c8.js} +2 -2
- package/hooks/useResponsive/{index.2b01d764.js → index.75bde930.js} +1 -1
- package/index.js +5 -5
- package/package.json +1 -1
- package/contexts/HostThemeContext/index.86691e12.js +0 -43
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useTheme as o } from "@mui/material/styles";
|
|
2
2
|
import { GlobalStyles as e } from "@mui/material";
|
|
3
|
-
import { globalRemSize as
|
|
3
|
+
import { globalRemSize as t } from "@m4l/styles";
|
|
4
4
|
import { jsx as a } from "react/jsx-runtime";
|
|
5
5
|
function p() {
|
|
6
|
-
const
|
|
7
|
-
return
|
|
6
|
+
const r = o();
|
|
7
|
+
return /* @__PURE__ */ a(e, {
|
|
8
8
|
styles: {
|
|
9
9
|
body: {
|
|
10
10
|
textRendering: "geometricPrecision",
|
|
@@ -24,7 +24,7 @@ function p() {
|
|
|
24
24
|
backgroundColor: "transparent"
|
|
25
25
|
},
|
|
26
26
|
"*::-webkit-scrollbar-thumb": {
|
|
27
|
-
background:
|
|
27
|
+
background: r.vars.palette.state.scrollBar,
|
|
28
28
|
borderRadius: "2px!important"
|
|
29
29
|
},
|
|
30
30
|
"& #root": {
|
|
@@ -40,9 +40,9 @@ function p() {
|
|
|
40
40
|
height: 2,
|
|
41
41
|
width: "100%",
|
|
42
42
|
position: "fixed",
|
|
43
|
-
zIndex:
|
|
44
|
-
backgroundColor:
|
|
45
|
-
boxShadow: `0 0 2px ${
|
|
43
|
+
zIndex: r.zIndex.snackbar,
|
|
44
|
+
backgroundColor: r.vars.palette.primary.main,
|
|
45
|
+
boxShadow: `0 0 2px ${r.vars.palette.primary.main}`
|
|
46
46
|
},
|
|
47
47
|
"& .peg": {
|
|
48
48
|
right: 0,
|
|
@@ -52,13 +52,13 @@ function p() {
|
|
|
52
52
|
display: "block",
|
|
53
53
|
position: "absolute",
|
|
54
54
|
transform: "rotate(3deg) translate(0px, -4px)",
|
|
55
|
-
boxShadow: `0 0 10px ${
|
|
55
|
+
boxShadow: `0 0 10px ${r.vars.palette.primary.main}, 0 0 5px ${r.vars.palette.primary.main}`
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"& html": {
|
|
59
|
-
fontSize:
|
|
60
|
-
[
|
|
61
|
-
fontSize:
|
|
59
|
+
fontSize: t.desktop,
|
|
60
|
+
[r.breakpoints.down("sm")]: {
|
|
61
|
+
fontSize: t.mobile
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createContext as c, useMemo as a } from "react";
|
|
2
|
+
import { CssBaseline as h } from "@mui/material";
|
|
3
|
+
import { G as d } from "../../components/GlobalStyle/index.5c2f4861.js";
|
|
4
|
+
import { createTheme as p, experimental_extendTheme as f, Experimental_CssVarsProvider as x, StyledEngineProvider as T } from "@mui/material/styles";
|
|
5
|
+
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
6
|
+
const u = c(null);
|
|
7
|
+
function j(i) {
|
|
8
|
+
const {
|
|
9
|
+
children: l,
|
|
10
|
+
hostThemeOptions: t,
|
|
11
|
+
fnComponentsOverrides: n
|
|
12
|
+
} = i, e = p({
|
|
13
|
+
...t
|
|
14
|
+
}), s = a(() => {
|
|
15
|
+
const r = f({
|
|
16
|
+
cssVarPrefix: "m4l",
|
|
17
|
+
colorSchemes: {
|
|
18
|
+
light: e,
|
|
19
|
+
finalTheme: e,
|
|
20
|
+
dark: e
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return r.components = n(r), r;
|
|
24
|
+
}, []);
|
|
25
|
+
return console.log("finalTheme", s), /* @__PURE__ */ m(x, {
|
|
26
|
+
theme: s,
|
|
27
|
+
children: [/* @__PURE__ */ o(d, {}), /* @__PURE__ */ o(u.Provider, {
|
|
28
|
+
value: {
|
|
29
|
+
hostThemeOptions: t,
|
|
30
|
+
fnComponentsOverrides: n
|
|
31
|
+
},
|
|
32
|
+
children: /* @__PURE__ */ m(T, {
|
|
33
|
+
injectFirst: !0,
|
|
34
|
+
children: [/* @__PURE__ */ o(h, {
|
|
35
|
+
enableColorScheme: !0
|
|
36
|
+
}), l]
|
|
37
|
+
})
|
|
38
|
+
})]
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
u as H,
|
|
43
|
+
j as a
|
|
44
|
+
};
|
|
@@ -4,7 +4,7 @@ import { createContext as d, useRef as p, useMemo as v, useLayoutEffect as f } f
|
|
|
4
4
|
import { c as u, d as R, i as g, l as h } from "../node_modules.9eeccca4.js";
|
|
5
5
|
import { jsx as x } from "react/jsx-runtime";
|
|
6
6
|
import "date-fns/locale/en-US";
|
|
7
|
-
import "./HostThemeContext/index.
|
|
7
|
+
import "./HostThemeContext/index.97bd7c68.js";
|
|
8
8
|
const m = { xs: 600, sm: 900, md: 1200, lg: 1536, xl: 1920 }, S = (c) => {
|
|
9
9
|
const a = {
|
|
10
10
|
...c
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useRef as r, useEffect as n, useState as f, useContext as i, useLayoutEffect as c } from "react";
|
|
2
|
-
import { H as m } from "../contexts/HostThemeContext/index.
|
|
2
|
+
import { H as m } from "../contexts/HostThemeContext/index.97bd7c68.js";
|
|
3
3
|
import "../contexts/FormatterContext/index.92336f4c.js";
|
|
4
4
|
import "../contexts/LocalesContext/index.53f0b702.js";
|
|
5
|
-
import "../contexts/index.
|
|
5
|
+
import "../contexts/index.14a9154d.js";
|
|
6
6
|
import "../node_modules.9eeccca4.js";
|
|
7
7
|
import "@m4l/styles";
|
|
8
8
|
function h() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext as t } from "react";
|
|
2
2
|
import { u as r } from "../../node_modules.9eeccca4.js";
|
|
3
|
-
import { R as n } from "../../contexts/index.
|
|
3
|
+
import { R as n } from "../../contexts/index.14a9154d.js";
|
|
4
4
|
import { useResponsive as i } from "@m4l/styles";
|
|
5
5
|
function f(e, s) {
|
|
6
6
|
const o = t(n);
|
package/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { G as l } from "./components/GlobalStyle/index.
|
|
1
|
+
import { G as l } from "./components/GlobalStyle/index.5c2f4861.js";
|
|
2
2
|
import { F as C, a as R } from "./contexts/FormatterContext/index.92336f4c.js";
|
|
3
3
|
import { L as c, a as F, g as L } from "./contexts/LocalesContext/index.53f0b702.js";
|
|
4
|
-
import { R as b, a as g } from "./contexts/index.
|
|
5
|
-
import { H, a as T } from "./contexts/HostThemeContext/index.
|
|
4
|
+
import { R as b, a as g } from "./contexts/index.14a9154d.js";
|
|
5
|
+
import { H, a as T } from "./contexts/HostThemeContext/index.97bd7c68.js";
|
|
6
6
|
import { u as k } from "./hooks/useFirstRender/index.1e9b02fb.js";
|
|
7
7
|
import { u as z } from "./hooks/useFormatter/index.57ac8cca.js";
|
|
8
|
-
import { b as I, u as M, a as O, c as y } from "./hooks/index.
|
|
8
|
+
import { b as I, u as M, a as O, c as y } from "./hooks/index.a60674c8.js";
|
|
9
9
|
import { u as D } from "./hooks/useLocales/index.d5a80aff.js";
|
|
10
|
-
import { u as N, a as W } from "./hooks/useResponsive/index.
|
|
10
|
+
import { u as N, a as W } from "./hooks/useResponsive/index.75bde930.js";
|
|
11
11
|
import { u as q } from "./hooks/useIsMobile/index.3de7c47a.js";
|
|
12
12
|
import { C as J, g as K } from "./utils/index.6909c662.js";
|
|
13
13
|
import "@mui/material/styles";
|
package/package.json
CHANGED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { createContext as l, useMemo as c } from "react";
|
|
2
|
-
import { CssBaseline as h } from "@mui/material";
|
|
3
|
-
import { createTheme as a, experimental_extendTheme as d, Experimental_CssVarsProvider as p, StyledEngineProvider as x } from "@mui/material/styles";
|
|
4
|
-
import { jsx as o, jsxs as f } from "react/jsx-runtime";
|
|
5
|
-
const T = l(null);
|
|
6
|
-
function g(i) {
|
|
7
|
-
const {
|
|
8
|
-
children: m,
|
|
9
|
-
hostThemeOptions: t,
|
|
10
|
-
fnComponentsOverrides: n
|
|
11
|
-
} = i, e = a({
|
|
12
|
-
...t
|
|
13
|
-
}), s = c(() => {
|
|
14
|
-
const r = d({
|
|
15
|
-
cssVarPrefix: "m4l",
|
|
16
|
-
colorSchemes: {
|
|
17
|
-
light: e,
|
|
18
|
-
finalTheme: e,
|
|
19
|
-
dark: e
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
return r.components = n(r), r;
|
|
23
|
-
}, []);
|
|
24
|
-
return console.log("finalTheme", s), /* @__PURE__ */ o(p, {
|
|
25
|
-
theme: s,
|
|
26
|
-
children: /* @__PURE__ */ o(T.Provider, {
|
|
27
|
-
value: {
|
|
28
|
-
hostThemeOptions: t,
|
|
29
|
-
fnComponentsOverrides: n
|
|
30
|
-
},
|
|
31
|
-
children: /* @__PURE__ */ f(x, {
|
|
32
|
-
injectFirst: !0,
|
|
33
|
-
children: [/* @__PURE__ */ o(h, {
|
|
34
|
-
enableColorScheme: !0
|
|
35
|
-
}), m]
|
|
36
|
-
})
|
|
37
|
-
})
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
export {
|
|
41
|
-
T as H,
|
|
42
|
-
g as a
|
|
43
|
-
};
|