@mp-front/components 0.0.1-next-1 → 0.0.1-next-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/dist/components/grid/col/col.component.d.ts +4 -0
- package/dist/components/grid/col/col.component.d.ts.map +1 -0
- package/dist/components/grid/col/index.d.ts +2 -0
- package/dist/components/grid/col/index.d.ts.map +1 -0
- package/dist/components/grid/grid.stories.d.ts +52 -0
- package/dist/components/grid/grid.stories.d.ts.map +1 -0
- package/dist/components/grid/grid.test.d.ts +2 -0
- package/dist/components/grid/grid.test.d.ts.map +1 -0
- package/dist/components/grid/grid.types.d.ts +33 -0
- package/dist/components/grid/grid.types.d.ts.map +1 -0
- package/dist/components/grid/index.d.ts +3 -0
- package/dist/components/grid/index.d.ts.map +1 -0
- package/dist/components/grid/row/index.d.ts +2 -0
- package/dist/components/grid/row/index.d.ts.map +1 -0
- package/dist/components/grid/row/row.component.d.ts +4 -0
- package/dist/components/grid/row/row.component.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/components/tabs/tabs.component.d.ts +4 -0
- package/dist/components/tabs/tabs.component.d.ts.map +1 -0
- package/dist/components/tabs/tabs.stories.d.ts +8 -0
- package/dist/components/tabs/tabs.stories.d.ts.map +1 -0
- package/dist/components/tabs/tabs.styles.d.ts +15 -0
- package/dist/components/tabs/tabs.styles.d.ts.map +1 -0
- package/dist/components/tabs/tabs.test.d.ts +2 -0
- package/dist/components/tabs/tabs.test.d.ts.map +1 -0
- package/dist/components/tabs/tabs.types.d.ts +19 -0
- package/dist/components/tabs/tabs.types.d.ts.map +1 -0
- package/dist/components/tabs/tabs.utils.d.ts +6 -0
- package/dist/components/tabs/tabs.utils.d.ts.map +1 -0
- package/dist/components/tabs/tabsContent.d.ts +10 -0
- package/dist/components/tabs/tabsContent.d.ts.map +1 -0
- package/dist/components/tabs/tabsList.d.ts +11 -0
- package/dist/components/tabs/tabsList.d.ts.map +1 -0
- package/dist/index-BP9HuXkV.cjs +31 -0
- package/dist/index-C0ENqrRs.js +570 -0
- package/dist/layout/content.component.d.ts +19 -0
- package/dist/layout/content.component.d.ts.map +1 -0
- package/dist/layout/footer.component.d.ts +17 -0
- package/dist/layout/footer.component.d.ts.map +1 -0
- package/dist/layout/header/header.component.d.ts +33 -0
- package/dist/layout/header/header.component.d.ts.map +1 -0
- package/dist/layout/header/header.types.d.ts +30 -0
- package/dist/layout/header/header.types.d.ts.map +1 -0
- package/dist/layout/header/left-side.component.d.ts +19 -0
- package/dist/layout/header/left-side.component.d.ts.map +1 -0
- package/dist/layout/header/right-side.component.d.ts +27 -0
- package/dist/layout/header/right-side.component.d.ts.map +1 -0
- package/dist/layout/header/store.component.d.ts +20 -0
- package/dist/layout/header/store.component.d.ts.map +1 -0
- package/dist/layout/header/user.component.d.ts +27 -0
- package/dist/layout/header/user.component.d.ts.map +1 -0
- package/dist/layout/index.d.ts +2 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/root-layout.component.d.ts +46 -0
- package/dist/layout/root-layout.component.d.ts.map +1 -0
- package/dist/layout/root-layout.stories.d.ts +12 -0
- package/dist/layout/root-layout.stories.d.ts.map +1 -0
- package/dist/layout/root-layout.test.d.ts +2 -0
- package/dist/layout/root-layout.test.d.ts.map +1 -0
- package/dist/layout/root-layout.types.d.ts +10 -0
- package/dist/layout/root-layout.types.d.ts.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/ui-components-hooks.cjs +1 -1
- package/dist/ui-components-hooks.js +29 -170
- package/dist/ui-components-index.cjs +35 -65
- package/dist/ui-components-index.js +6417 -6683
- package/dist/ui-components-layout.cjs +135 -0
- package/dist/ui-components-layout.js +19938 -0
- package/dist/useTranslation-Cenukg7h.js +147 -0
- package/dist/useTranslation-CnSCmJou.cjs +1 -0
- package/package.json +6 -18
- package/dist/constants/tailwind-config/index.d.ts +0 -3
- package/dist/constants/tailwind-config/index.d.ts.map +0 -1
- package/dist/ui-components-tailwind.cjs +0 -1
- package/dist/ui-components-tailwind.js +0 -9
|
@@ -1,177 +1,36 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { useState as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
const o = [n, {
|
|
11
|
-
code: t,
|
|
12
|
-
...a || {}
|
|
13
|
-
}];
|
|
14
|
-
if ((u = (s = e == null ? void 0 : e.services) == null ? void 0 : s.logger) != null && u.forward)
|
|
15
|
-
return e.services.logger.forward(o, "warn", "react-i18next::", !0);
|
|
16
|
-
m(o[0]) && (o[0] = `react-i18next:: ${o[0]}`), (p = (N = e == null ? void 0 : e.services) == null ? void 0 : N.logger) != null && p.warn ? e.services.logger.warn(...o) : console != null && console.warn && console.warn(...o);
|
|
17
|
-
}, z = {}, L = (e, t, n, a) => {
|
|
18
|
-
m(n) && z[n] || (m(n) && (z[n] = /* @__PURE__ */ new Date()), B(e, t, n, a));
|
|
19
|
-
}, A = (e, t) => () => {
|
|
20
|
-
if (e.isInitialized)
|
|
21
|
-
t();
|
|
22
|
-
else {
|
|
23
|
-
const n = () => {
|
|
24
|
-
setTimeout(() => {
|
|
25
|
-
e.off("initialized", n);
|
|
26
|
-
}, 0), t();
|
|
27
|
-
};
|
|
28
|
-
e.on("initialized", n);
|
|
29
|
-
}
|
|
30
|
-
}, T = (e, t, n) => {
|
|
31
|
-
e.loadNamespaces(t, A(e, n));
|
|
32
|
-
}, F = (e, t, n, a) => {
|
|
33
|
-
if (m(n) && (n = [n]), e.options.preload && e.options.preload.indexOf(t) > -1) return T(e, n, a);
|
|
34
|
-
n.forEach((o) => {
|
|
35
|
-
e.options.ns.indexOf(o) < 0 && e.options.ns.push(o);
|
|
36
|
-
}), e.loadLanguages(t, A(e, a));
|
|
37
|
-
}, D = (e, t, n = {}) => !t.languages || !t.languages.length ? (L(t, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
|
|
38
|
-
languages: t.languages
|
|
39
|
-
}), !0) : t.hasLoadedNamespace(e, {
|
|
40
|
-
lng: n.lng,
|
|
41
|
-
precheck: (a, o) => {
|
|
42
|
-
var s;
|
|
43
|
-
if (((s = n.bindI18n) == null ? void 0 : s.indexOf("languageChanging")) > -1 && a.services.backendConnector.backend && a.isLanguageChangingTo && !o(a.isLanguageChangingTo, e)) return !1;
|
|
44
|
-
}
|
|
45
|
-
}), m = (e) => typeof e == "string", G = (e) => typeof e == "object" && e !== null, W = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, $ = {
|
|
46
|
-
"&": "&",
|
|
47
|
-
"&": "&",
|
|
48
|
-
"<": "<",
|
|
49
|
-
"<": "<",
|
|
50
|
-
">": ">",
|
|
51
|
-
">": ">",
|
|
52
|
-
"'": "'",
|
|
53
|
-
"'": "'",
|
|
54
|
-
""": '"',
|
|
55
|
-
""": '"',
|
|
56
|
-
" ": " ",
|
|
57
|
-
" ": " ",
|
|
58
|
-
"©": "©",
|
|
59
|
-
"©": "©",
|
|
60
|
-
"®": "®",
|
|
61
|
-
"®": "®",
|
|
62
|
-
"…": "…",
|
|
63
|
-
"…": "…",
|
|
64
|
-
"/": "/",
|
|
65
|
-
"/": "/"
|
|
66
|
-
}, q = (e) => $[e], J = (e) => e.replace(W, q);
|
|
67
|
-
let K = {
|
|
68
|
-
bindI18n: "languageChanged",
|
|
69
|
-
bindI18nStore: "",
|
|
70
|
-
transEmptyNodeValue: "",
|
|
71
|
-
transSupportBasicHtmlNodes: !0,
|
|
72
|
-
transWrapTextNodes: "",
|
|
73
|
-
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
74
|
-
useSuspense: !0,
|
|
75
|
-
unescape: J
|
|
76
|
-
};
|
|
77
|
-
const X = () => K;
|
|
78
|
-
let Y;
|
|
79
|
-
const Q = () => Y, Z = j();
|
|
80
|
-
class V {
|
|
81
|
-
constructor() {
|
|
82
|
-
this.usedNamespaces = {};
|
|
83
|
-
}
|
|
84
|
-
addUsedNamespaces(t) {
|
|
85
|
-
t.forEach((n) => {
|
|
86
|
-
this.usedNamespaces[n] || (this.usedNamespaces[n] = !0);
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
getUsedNamespaces() {
|
|
90
|
-
return Object.keys(this.usedNamespaces);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
const ee = (e, t) => {
|
|
94
|
-
const n = R();
|
|
95
|
-
return h(() => {
|
|
96
|
-
n.current = e;
|
|
97
|
-
}, [e, t]), n.current;
|
|
98
|
-
}, P = (e, t, n, a) => e.getFixedT(t, n, a), te = (e, t, n, a) => _(P(e, t, n, a), [e, t, n, a]), ne = (e, t = {}) => {
|
|
99
|
-
var v, k, O, M;
|
|
100
|
-
const {
|
|
101
|
-
i18n: n
|
|
102
|
-
} = t, {
|
|
103
|
-
i18n: a,
|
|
104
|
-
defaultNS: o
|
|
105
|
-
} = H(Z) || {}, s = n || a || Q();
|
|
106
|
-
if (s && !s.reportNamespaces && (s.reportNamespaces = new V()), !s) {
|
|
107
|
-
L(s, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
|
|
108
|
-
const i = (l, d) => m(d) ? d : G(d) && m(d.defaultValue) ? d.defaultValue : Array.isArray(l) ? l[l.length - 1] : l, c = [i, {}, !1];
|
|
109
|
-
return c.t = i, c.i18n = {}, c.ready = !1, c;
|
|
110
|
-
}
|
|
111
|
-
(v = s.options.react) != null && v.wait && L(s, "DEPRECATED_OPTION", "useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
112
|
-
const u = {
|
|
113
|
-
...X(),
|
|
114
|
-
...s.options.react,
|
|
115
|
-
...t
|
|
116
|
-
}, {
|
|
117
|
-
useSuspense: N,
|
|
118
|
-
keyPrefix: p
|
|
119
|
-
} = u;
|
|
120
|
-
let r = e || o || ((k = s.options) == null ? void 0 : k.defaultNS);
|
|
121
|
-
r = m(r) ? [r] : r || ["translation"], (M = (O = s.reportNamespaces).addUsedNamespaces) == null || M.call(O, r);
|
|
122
|
-
const g = (s.isInitialized || s.initializedStoreOnce) && r.every((i) => D(i, s, u)), U = te(s, t.lng || null, u.nsMode === "fallback" ? r : r[0], p), b = () => U, E = () => P(s, t.lng || null, u.nsMode === "fallback" ? r : r[0], p), [I, w] = x(b);
|
|
123
|
-
let y = r.join();
|
|
124
|
-
t.lng && (y = `${t.lng}${y}`);
|
|
125
|
-
const C = ee(y), f = R(!0);
|
|
126
|
-
h(() => {
|
|
127
|
-
const {
|
|
128
|
-
bindI18n: i,
|
|
129
|
-
bindI18nStore: c
|
|
130
|
-
} = u;
|
|
131
|
-
f.current = !0, !g && !N && (t.lng ? F(s, t.lng, r, () => {
|
|
132
|
-
f.current && w(E);
|
|
133
|
-
}) : T(s, r, () => {
|
|
134
|
-
f.current && w(E);
|
|
135
|
-
})), g && C && C !== y && f.current && w(E);
|
|
136
|
-
const l = () => {
|
|
137
|
-
f.current && w(E);
|
|
138
|
-
};
|
|
139
|
-
return i && (s == null || s.on(i, l)), c && (s == null || s.store.on(c, l)), () => {
|
|
140
|
-
f.current = !1, s && (i == null || i.split(" ").forEach((d) => s.off(d, l))), c && s && c.split(" ").forEach((d) => s.store.off(d, l));
|
|
141
|
-
};
|
|
142
|
-
}, [s, y]), h(() => {
|
|
143
|
-
f.current && g && w(b);
|
|
144
|
-
}, [s, p, g]);
|
|
145
|
-
const S = [I, s, g];
|
|
146
|
-
if (S.t = I, S.i18n = s, S.ready = g, g || !g && !N) return S;
|
|
147
|
-
throw new Promise((i) => {
|
|
148
|
-
t.lng ? F(s, t.lng, r, () => i()) : T(s, r, () => i());
|
|
149
|
-
});
|
|
150
|
-
}, oe = () => {
|
|
1
|
+
import { a as L, u as w } from "./use-controlled-state-FlR7N58L.js";
|
|
2
|
+
import { useState as s, useEffect as n } from "react";
|
|
3
|
+
import { u as d } from "./useTranslation-Cenukg7h.js";
|
|
4
|
+
const c = () => {
|
|
5
|
+
const o = typeof window < "u" ? localStorage.getItem("theme") === "dark" : "light", [e, a] = s(o);
|
|
6
|
+
return n(() => {
|
|
7
|
+
e ? (document.documentElement.classList.add("dark"), localStorage.setItem("theme", "dark")) : (document.documentElement.classList.remove("dark"), localStorage.setItem("theme", "light"));
|
|
8
|
+
}, [e]), { darkMode: e, setDarkMode: a };
|
|
9
|
+
}, u = () => {
|
|
151
10
|
const {
|
|
152
|
-
i18n: { changeLanguage:
|
|
153
|
-
} =
|
|
154
|
-
|
|
11
|
+
i18n: { changeLanguage: o, language: e }
|
|
12
|
+
} = d(), a = (t) => {
|
|
13
|
+
o(t), localStorage.setItem("lang", t);
|
|
155
14
|
};
|
|
156
|
-
return
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
}, []), { language:
|
|
160
|
-
},
|
|
161
|
-
const [
|
|
162
|
-
return
|
|
163
|
-
if (
|
|
164
|
-
const
|
|
165
|
-
return window.addEventListener("load",
|
|
166
|
-
window.removeEventListener("load",
|
|
15
|
+
return n(() => {
|
|
16
|
+
const t = localStorage.getItem("lang");
|
|
17
|
+
o(t || e);
|
|
18
|
+
}, []), { language: e, setLang: a };
|
|
19
|
+
}, g = (o) => {
|
|
20
|
+
const [e, a] = s(!1);
|
|
21
|
+
return n(() => {
|
|
22
|
+
if (o) {
|
|
23
|
+
const t = () => a(!1), r = () => a(!0);
|
|
24
|
+
return window.addEventListener("load", t), window.addEventListener("beforeunload", r), () => {
|
|
25
|
+
window.removeEventListener("load", t), window.removeEventListener("beforeunload", r);
|
|
167
26
|
};
|
|
168
27
|
}
|
|
169
|
-
}, []),
|
|
28
|
+
}, []), e;
|
|
170
29
|
};
|
|
171
30
|
export {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
31
|
+
L as useBreakpoint,
|
|
32
|
+
w as useControlledState,
|
|
33
|
+
c as useDarkMode,
|
|
34
|
+
u as useLang,
|
|
35
|
+
g as useWindowLoading
|
|
177
36
|
};
|