@m4l/graphics 1.0.11 → 2.0.1
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.b7393a44.js → index-DHBkshRk.js} +8 -0
- package/components/index-l0sNRNKZ.js +1 -0
- package/contexts/FormatterContext/{index.92336f4c.js → index-BHG3bJJo.js} +2 -2
- package/contexts/HostThemeContext/{index.89c85eb6.js → index-C5Z07fH1.js} +1 -1
- package/contexts/LocalesContext/{index.53f0b702.js → index--VwMF60R.js} +1 -1
- package/contexts/{index.9a0fbc7c.js → index-BB_hmi4E.js} +16 -16
- package/hooks/index-c14LV1FI.js +52 -0
- package/hooks/useFormatter/index-DfdAcbzw.js +10 -0
- package/hooks/useIsMobile/{index.54bf37f7.js → index-Bro0dV28.js} +1 -1
- package/hooks/useLocales/index-mTHn9nqY.js +10 -0
- package/hooks/useResponsive/{index.ea7ff1dc.js → index-DOGfC2H7.js} +3 -4
- package/index.js +38 -50
- package/{node_modules.9690bbee.js → node_modules-BHhXVwYT.js} +1603 -1592
- package/package.json +2 -2
- package/components/index.8083534b.js +0 -4
- package/hooks/index.ff8c4415.js +0 -57
- package/hooks/useFormatter/index.57ac8cca.js +0 -11
- package/hooks/useLocales/index.d5a80aff.js +0 -11
- /package/{commonjs.e3daa2e5.js → commonjs-BCz0-aDl.js} +0 -0
- /package/hooks/useFirstRender/{index.1e9b02fb.js → index-B-Q0TTn0.js} +0 -0
- /package/utils/{index.6909c662.js → index-DZG6QXjf.js} +0 -0
|
@@ -7,6 +7,7 @@ function s() {
|
|
|
7
7
|
return /* @__PURE__ */ a(e, {
|
|
8
8
|
styles: {
|
|
9
9
|
body: {
|
|
10
|
+
/* backgroundColor: `${theme.vars.palette.background.background}!important`, */
|
|
10
11
|
textRendering: "geometricPrecision",
|
|
11
12
|
width: "100%",
|
|
12
13
|
height: "100vh",
|
|
@@ -14,19 +15,26 @@ function s() {
|
|
|
14
15
|
color: t.vars.palette.text.primary
|
|
15
16
|
},
|
|
16
17
|
"*::-webkit-scrollbar": {
|
|
18
|
+
// camino de la barra con radio
|
|
17
19
|
width: "7px",
|
|
18
20
|
height: "7px",
|
|
19
21
|
borderRadius: "3px",
|
|
20
22
|
backgroundColor: "transparent"
|
|
21
23
|
},
|
|
22
24
|
"*::-webkit-scrollbar-track": {
|
|
25
|
+
// Camino de la barrra sin radio
|
|
23
26
|
backgroundColor: "transparent",
|
|
24
27
|
border: "0px solid transparent"
|
|
25
28
|
},
|
|
26
29
|
"*::-webkit-scrollbar-corner": {
|
|
27
30
|
backgroundColor: "transparent"
|
|
28
31
|
},
|
|
32
|
+
// FireFox
|
|
33
|
+
// scrollbarColor: `${theme.vars.palette.primary.main} white`,
|
|
34
|
+
// scrollbarWidth: 'thin',
|
|
35
|
+
// Chrome
|
|
29
36
|
"*::-webkit-scrollbar-thumb": {
|
|
37
|
+
// barra que se mueve
|
|
30
38
|
background: t.vars.palette.state.scrollBar,
|
|
31
39
|
borderRadius: "2px!important"
|
|
32
40
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext as D, useState as C, useCallback as k, useEffect as p } from "react";
|
|
2
2
|
import { useHostTools as v, usePropageteMF as R, EmitEvents as f } from "@m4l/core";
|
|
3
|
-
import { u as h } from "../../hooks/useFirstRender/index.
|
|
3
|
+
import { u as h } from "../../hooks/useFirstRender/index-B-Q0TTn0.js";
|
|
4
4
|
import { jsx as V } from "react/jsx-runtime";
|
|
5
5
|
const x = D(null);
|
|
6
6
|
function I(T) {
|
|
@@ -10,7 +10,7 @@ function I(T) {
|
|
|
10
10
|
currencyFormatter: l,
|
|
11
11
|
numberFormatter: M,
|
|
12
12
|
dateFormatter: t
|
|
13
|
-
} = T, r = l?.decimalDigits || 0, o = l?.code || "USD", a = M?.decimalSymbol || 0.1
|
|
13
|
+
} = T, r = l?.decimalDigits || 0, o = l?.code || "USD", a = M?.decimalSymbol || 0.1.toLocaleString().substring(1, 2), s = M?.thousandsSymbol || 1e3.toLocaleString().substring(1, 2), m = t?.dateFormat || "yyyy-MM-dd", n = t?.dateMask || "____-__-__", c = t?.datetimeFormat || "yyyy-MM-dd HH:mm:ss", i = t?.datetimeMask || "____-__-__ __:__:__", _ = t?.timeFormat || "HH:mm:ss", d = t?.timeMask || "__:__:__", u = t?.formatDate || (() => {
|
|
14
14
|
throw new Error("Incorrect use of formatDate");
|
|
15
15
|
}), y = h(), {
|
|
16
16
|
events_emit: g
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext as c, useMemo as a } from "react";
|
|
2
2
|
import { CssBaseline as h } from "@mui/material";
|
|
3
|
-
import { G as d } from "../../components/GlobalStyle/index.
|
|
3
|
+
import { G as d } from "../../components/GlobalStyle/index-DHBkshRk.js";
|
|
4
4
|
import { createTheme as p, experimental_extendTheme as x, Experimental_CssVarsProvider as f, StyledEngineProvider as u } from "@mui/material/styles";
|
|
5
5
|
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
6
6
|
const T = c(null);
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import "./FormatterContext/index.92336f4c.js";
|
|
2
|
-
import "./LocalesContext/index.53f0b702.js";
|
|
3
1
|
import { createContext as f, useRef as T, useMemo as k, useLayoutEffect as y, useEffect as b } from "react";
|
|
4
|
-
import { c as v, d as R, i as P, l as E } from "../node_modules.
|
|
2
|
+
import { c as v, d as R, i as P, l as E } from "../node_modules-BHhXVwYT.js";
|
|
5
3
|
import { jsx as x } from "react/jsx-runtime";
|
|
6
|
-
import "date-fns/locale/en-US";
|
|
7
|
-
import "./HostThemeContext/index.89c85eb6.js";
|
|
8
4
|
import { useNetwork as M, useLocalStorageWithListener as w } from "@m4l/core";
|
|
9
|
-
import { getColorPresets as m, getColorState as d, typography as L, palette as
|
|
5
|
+
import { getColorPresets as m, getColorState as d, typography as L, palette as S, SECONDARY as A, COMMON as N, ERROR as D, WARNING as z, INFO as B, SUCCESS as $, shadows as p, createCustomShadows as j, defaultThemeOptions as W, defaultPreset as _, colorPresets as F } from "@m4l/styles";
|
|
10
6
|
import { alpha as I } from "@mui/system";
|
|
11
|
-
import { u as U } from "../hooks/useFirstRender/index.
|
|
7
|
+
import { u as U } from "../hooks/useFirstRender/index-B-Q0TTn0.js";
|
|
12
8
|
const C = { xs: 600, sm: 900, md: 1200, lg: 1536, xl: 1920 }, K = (r) => {
|
|
13
9
|
const t = {
|
|
14
10
|
...r
|
|
@@ -28,7 +24,7 @@ const C = { xs: 600, sm: 900, md: 1200, lg: 1536, xl: 1920 }, K = (r) => {
|
|
|
28
24
|
{ name: "Responsive Relative Store" }
|
|
29
25
|
)
|
|
30
26
|
);
|
|
31
|
-
}, X = f(null),
|
|
27
|
+
}, X = f(null), te = (r) => {
|
|
32
28
|
const {
|
|
33
29
|
children: t,
|
|
34
30
|
observedDivRef: o
|
|
@@ -50,7 +46,7 @@ const C = { xs: 600, sm: 900, md: 1200, lg: 1536, xl: 1920 }, K = (r) => {
|
|
|
50
46
|
}
|
|
51
47
|
}
|
|
52
48
|
}
|
|
53
|
-
}, i = k(() => E.
|
|
49
|
+
}, i = k(() => E.throttle(e, 200, {
|
|
54
50
|
leading: !1,
|
|
55
51
|
trailing: !0
|
|
56
52
|
}), [e]);
|
|
@@ -88,8 +84,7 @@ function O(r, t = "m4l") {
|
|
|
88
84
|
if (typeof e == "string" || typeof e == "number") {
|
|
89
85
|
const i = `--${t}-${n}`;
|
|
90
86
|
o.style.setProperty(i, e.toString());
|
|
91
|
-
} else
|
|
92
|
-
typeof e == "object" && e !== null && O(e, `${t}-${n}`);
|
|
87
|
+
} else typeof e == "object" && e !== null && O(e, `${t}-${n}`);
|
|
93
88
|
});
|
|
94
89
|
}
|
|
95
90
|
const c = (r) => {
|
|
@@ -104,7 +99,7 @@ const c = (r) => {
|
|
|
104
99
|
typography: L,
|
|
105
100
|
palette: {
|
|
106
101
|
...r.themeOptions.palette,
|
|
107
|
-
...o ?
|
|
102
|
+
...o ? S.light : S.dark,
|
|
108
103
|
primary: m(t.themeColorPresets),
|
|
109
104
|
state: d(t.themeColorPresets, t.themeMode),
|
|
110
105
|
representative: t.themeMode === "light" ? m(t.themeColorPresets)?.light : m(t.themeColorPresets)?.darker,
|
|
@@ -160,7 +155,7 @@ const c = (r) => {
|
|
|
160
155
|
},
|
|
161
156
|
shape: { borderRadius: 8 },
|
|
162
157
|
direction: t.themeDirection,
|
|
163
|
-
shadows: o ?
|
|
158
|
+
shadows: o ? p.light : p.dark,
|
|
164
159
|
customShadows: {
|
|
165
160
|
primary: `0 8px 16px 0 ${I(
|
|
166
161
|
m(t.themeColorPresets)?.main || "#fff",
|
|
@@ -182,6 +177,11 @@ const c = (r) => {
|
|
|
182
177
|
c(n);
|
|
183
178
|
});
|
|
184
179
|
},
|
|
180
|
+
// setThemeOptions: newObj => {
|
|
181
|
+
// set(state => {
|
|
182
|
+
// state.themeOptions = { ...state.themeOptions, ...newObj };
|
|
183
|
+
// });
|
|
184
|
+
// },
|
|
185
185
|
setThemeSettings: (n) => {
|
|
186
186
|
t((e) => {
|
|
187
187
|
e.currentThemeSettings = { ...e.currentThemeSettings, ...n }, h(e), c(e);
|
|
@@ -244,7 +244,7 @@ const c = (r) => {
|
|
|
244
244
|
{ name: "ExampleStore" }
|
|
245
245
|
)
|
|
246
246
|
), G = f(null);
|
|
247
|
-
function
|
|
247
|
+
function ne({
|
|
248
248
|
children: r,
|
|
249
249
|
themeSettings: t
|
|
250
250
|
}) {
|
|
@@ -274,7 +274,7 @@ function ie({
|
|
|
274
274
|
export {
|
|
275
275
|
X as R,
|
|
276
276
|
G as T,
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
te as a,
|
|
278
|
+
ne as b,
|
|
279
279
|
u as d
|
|
280
280
|
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useRef as n, useEffect as r, useState as i, useContext as u, useLayoutEffect as c } from "react";
|
|
2
|
+
import { H as m } from "../contexts/HostThemeContext/index-C5Z07fH1.js";
|
|
3
|
+
import { u as a } from "../node_modules-BHhXVwYT.js";
|
|
4
|
+
import { T as l } from "../contexts/index-BB_hmi4E.js";
|
|
5
|
+
function S() {
|
|
6
|
+
const e = n(!0);
|
|
7
|
+
return r(
|
|
8
|
+
() => () => {
|
|
9
|
+
e.current = !1;
|
|
10
|
+
},
|
|
11
|
+
[]
|
|
12
|
+
), e;
|
|
13
|
+
}
|
|
14
|
+
function x(e) {
|
|
15
|
+
const [s, t] = i(!1), o = e || 100;
|
|
16
|
+
return r(() => (window.onscroll = () => {
|
|
17
|
+
window.pageYOffset > o ? t(!0) : t(!1);
|
|
18
|
+
}, () => {
|
|
19
|
+
window.onscroll = null;
|
|
20
|
+
}), [o]), s;
|
|
21
|
+
}
|
|
22
|
+
const h = () => {
|
|
23
|
+
const e = u(m);
|
|
24
|
+
if (!e) throw new Error("useHostTheme context must be use inside HostThemeProvider");
|
|
25
|
+
return e;
|
|
26
|
+
};
|
|
27
|
+
function b(e) {
|
|
28
|
+
const s = n(null);
|
|
29
|
+
return c(() => {
|
|
30
|
+
const t = s?.current;
|
|
31
|
+
if (!t)
|
|
32
|
+
return;
|
|
33
|
+
const o = new ResizeObserver((f) => {
|
|
34
|
+
e(t, f[0]);
|
|
35
|
+
});
|
|
36
|
+
return o.observe(t), () => {
|
|
37
|
+
o.disconnect();
|
|
38
|
+
};
|
|
39
|
+
}, [e, s.current]), s;
|
|
40
|
+
}
|
|
41
|
+
function g(e, s) {
|
|
42
|
+
const t = u(l);
|
|
43
|
+
if (!t) throw new Error("useSettingsStore context must be use inside SettignsContext");
|
|
44
|
+
return a(t, e, s);
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
x as a,
|
|
48
|
+
h as b,
|
|
49
|
+
b as c,
|
|
50
|
+
g as d,
|
|
51
|
+
S as u
|
|
52
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useContext as r } from "react";
|
|
2
|
+
import { F as e } from "../../contexts/FormatterContext/index-BHG3bJJo.js";
|
|
3
|
+
const m = () => {
|
|
4
|
+
const t = r(e);
|
|
5
|
+
if (!t) throw new Error("useFormatter context must be use inside FormatterProvider");
|
|
6
|
+
return t;
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
m as u
|
|
10
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState as n, useEffect as o } from "react";
|
|
2
|
-
import { t as s } from "../../node_modules.
|
|
2
|
+
import { t as s } from "../../node_modules-BHhXVwYT.js";
|
|
3
3
|
const t = () => typeof navigator > "u" ? !1 : /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), l = () => {
|
|
4
4
|
const [i, r] = n(t());
|
|
5
5
|
return o(() => {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useContext as o } from "react";
|
|
2
|
+
import { L as t } from "../../contexts/LocalesContext/index--VwMF60R.js";
|
|
3
|
+
const n = () => {
|
|
4
|
+
const e = o(t);
|
|
5
|
+
if (!e) throw new Error("useLocales context must be use inside LocalesProvider");
|
|
6
|
+
return e;
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
n as u
|
|
10
|
+
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useContext as t } from "react";
|
|
2
|
-
import { u as r } from "../../node_modules.
|
|
3
|
-
import { R as n } from "../../contexts/index.
|
|
2
|
+
import { u as r } from "../../node_modules-BHhXVwYT.js";
|
|
3
|
+
import { R as n } from "../../contexts/index-BB_hmi4E.js";
|
|
4
4
|
import { useResponsive as i } from "@m4l/styles";
|
|
5
5
|
function f(e, s) {
|
|
6
6
|
const o = t(n);
|
|
7
|
-
if (!o)
|
|
8
|
-
throw new Error("useAreasStore context must be use inside AreasContext");
|
|
7
|
+
if (!o) throw new Error("useAreasStore context must be use inside AreasContext");
|
|
9
8
|
return r(o, e, s);
|
|
10
9
|
}
|
|
11
10
|
function c() {
|
package/index.js
CHANGED
|
@@ -1,52 +1,40 @@
|
|
|
1
|
-
import { G as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { R as
|
|
5
|
-
import { H as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { b as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import { C as
|
|
13
|
-
import "@mui/material/styles";
|
|
14
|
-
import "@mui/material";
|
|
15
|
-
import "@m4l/styles";
|
|
16
|
-
import "react/jsx-runtime";
|
|
17
|
-
import "react";
|
|
18
|
-
import "@m4l/core";
|
|
19
|
-
import "@mui/x-date-pickers/AdapterDateFns";
|
|
20
|
-
import "@mui/x-date-pickers";
|
|
21
|
-
import "date-fns/locale/en-US";
|
|
22
|
-
import "./node_modules.9690bbee.js";
|
|
23
|
-
import "./commonjs.e3daa2e5.js";
|
|
24
|
-
import "@mui/system";
|
|
1
|
+
import { G as s } from "./components/GlobalStyle/index-DHBkshRk.js";
|
|
2
|
+
import { L as r, a, g as i } from "./contexts/LocalesContext/index--VwMF60R.js";
|
|
3
|
+
import { F as m, a as p } from "./contexts/FormatterContext/index-BHG3bJJo.js";
|
|
4
|
+
import { R as x, a as f, T as d, b as l, d as v } from "./contexts/index-BB_hmi4E.js";
|
|
5
|
+
import { H as T, a as g } from "./contexts/HostThemeContext/index-C5Z07fH1.js";
|
|
6
|
+
import { u as R } from "./hooks/useFirstRender/index-B-Q0TTn0.js";
|
|
7
|
+
import { u as c } from "./hooks/useFormatter/index-DfdAcbzw.js";
|
|
8
|
+
import { b as P, u as b, a as L, c as H, d as k } from "./hooks/index-c14LV1FI.js";
|
|
9
|
+
import { u as z } from "./hooks/useLocales/index-mTHn9nqY.js";
|
|
10
|
+
import { u as I, a as M } from "./hooks/useResponsive/index-DOGfC2H7.js";
|
|
11
|
+
import { u as y } from "./hooks/useIsMobile/index-Bro0dV28.js";
|
|
12
|
+
import { C as D, g as E } from "./utils/index-DZG6QXjf.js";
|
|
25
13
|
export {
|
|
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
|
-
|
|
14
|
+
D as Capitalize,
|
|
15
|
+
m as FormatterContext,
|
|
16
|
+
p as FormatterProvider,
|
|
17
|
+
s as GlobalStyles,
|
|
18
|
+
T as HostThemeContext,
|
|
19
|
+
g as HostThemeProvider,
|
|
20
|
+
r as LocalesContext,
|
|
21
|
+
a as LocalesProvider,
|
|
22
|
+
x as ResponsiveContainerContext,
|
|
23
|
+
f as ResponsiveContainerProvider,
|
|
24
|
+
d as ThemeSettingsContext,
|
|
25
|
+
l as ThemeSettingsProvider,
|
|
26
|
+
v as defaultThemeSettings,
|
|
27
|
+
E as getAnchorElPositionWindow,
|
|
28
|
+
i as getLocaleFromNetwork,
|
|
29
|
+
R as useFirstRender,
|
|
30
|
+
c as useFormatter,
|
|
31
|
+
P as useHostTheme,
|
|
32
|
+
y as useIsMobile,
|
|
33
|
+
b as useIsMountedRef,
|
|
34
|
+
z as useLocales,
|
|
35
|
+
L as useOffSetTop,
|
|
36
|
+
H as useResizeObserver,
|
|
37
|
+
I as useResponsiveContainerStore,
|
|
38
|
+
M as useResponsiveDesktop,
|
|
39
|
+
k as useThemeSettingsStore
|
|
52
40
|
};
|