@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.
Files changed (78) hide show
  1. package/dist/components/grid/col/col.component.d.ts +4 -0
  2. package/dist/components/grid/col/col.component.d.ts.map +1 -0
  3. package/dist/components/grid/col/index.d.ts +2 -0
  4. package/dist/components/grid/col/index.d.ts.map +1 -0
  5. package/dist/components/grid/grid.stories.d.ts +52 -0
  6. package/dist/components/grid/grid.stories.d.ts.map +1 -0
  7. package/dist/components/grid/grid.test.d.ts +2 -0
  8. package/dist/components/grid/grid.test.d.ts.map +1 -0
  9. package/dist/components/grid/grid.types.d.ts +33 -0
  10. package/dist/components/grid/grid.types.d.ts.map +1 -0
  11. package/dist/components/grid/index.d.ts +3 -0
  12. package/dist/components/grid/index.d.ts.map +1 -0
  13. package/dist/components/grid/row/index.d.ts +2 -0
  14. package/dist/components/grid/row/index.d.ts.map +1 -0
  15. package/dist/components/grid/row/row.component.d.ts +4 -0
  16. package/dist/components/grid/row/row.component.d.ts.map +1 -0
  17. package/dist/components/index.d.ts +3 -0
  18. package/dist/components/index.d.ts.map +1 -1
  19. package/dist/components/tabs/index.d.ts +3 -0
  20. package/dist/components/tabs/index.d.ts.map +1 -0
  21. package/dist/components/tabs/tabs.component.d.ts +4 -0
  22. package/dist/components/tabs/tabs.component.d.ts.map +1 -0
  23. package/dist/components/tabs/tabs.stories.d.ts +8 -0
  24. package/dist/components/tabs/tabs.stories.d.ts.map +1 -0
  25. package/dist/components/tabs/tabs.styles.d.ts +15 -0
  26. package/dist/components/tabs/tabs.styles.d.ts.map +1 -0
  27. package/dist/components/tabs/tabs.test.d.ts +2 -0
  28. package/dist/components/tabs/tabs.test.d.ts.map +1 -0
  29. package/dist/components/tabs/tabs.types.d.ts +19 -0
  30. package/dist/components/tabs/tabs.types.d.ts.map +1 -0
  31. package/dist/components/tabs/tabs.utils.d.ts +6 -0
  32. package/dist/components/tabs/tabs.utils.d.ts.map +1 -0
  33. package/dist/components/tabs/tabsContent.d.ts +10 -0
  34. package/dist/components/tabs/tabsContent.d.ts.map +1 -0
  35. package/dist/components/tabs/tabsList.d.ts +11 -0
  36. package/dist/components/tabs/tabsList.d.ts.map +1 -0
  37. package/dist/index-BP9HuXkV.cjs +31 -0
  38. package/dist/index-C0ENqrRs.js +570 -0
  39. package/dist/layout/content.component.d.ts +19 -0
  40. package/dist/layout/content.component.d.ts.map +1 -0
  41. package/dist/layout/footer.component.d.ts +17 -0
  42. package/dist/layout/footer.component.d.ts.map +1 -0
  43. package/dist/layout/header/header.component.d.ts +33 -0
  44. package/dist/layout/header/header.component.d.ts.map +1 -0
  45. package/dist/layout/header/header.types.d.ts +30 -0
  46. package/dist/layout/header/header.types.d.ts.map +1 -0
  47. package/dist/layout/header/left-side.component.d.ts +19 -0
  48. package/dist/layout/header/left-side.component.d.ts.map +1 -0
  49. package/dist/layout/header/right-side.component.d.ts +27 -0
  50. package/dist/layout/header/right-side.component.d.ts.map +1 -0
  51. package/dist/layout/header/store.component.d.ts +20 -0
  52. package/dist/layout/header/store.component.d.ts.map +1 -0
  53. package/dist/layout/header/user.component.d.ts +27 -0
  54. package/dist/layout/header/user.component.d.ts.map +1 -0
  55. package/dist/layout/index.d.ts +2 -0
  56. package/dist/layout/index.d.ts.map +1 -0
  57. package/dist/layout/root-layout.component.d.ts +46 -0
  58. package/dist/layout/root-layout.component.d.ts.map +1 -0
  59. package/dist/layout/root-layout.stories.d.ts +12 -0
  60. package/dist/layout/root-layout.stories.d.ts.map +1 -0
  61. package/dist/layout/root-layout.test.d.ts +2 -0
  62. package/dist/layout/root-layout.test.d.ts.map +1 -0
  63. package/dist/layout/root-layout.types.d.ts +10 -0
  64. package/dist/layout/root-layout.types.d.ts.map +1 -0
  65. package/dist/styles.css +1 -1
  66. package/dist/ui-components-hooks.cjs +1 -1
  67. package/dist/ui-components-hooks.js +29 -170
  68. package/dist/ui-components-index.cjs +35 -65
  69. package/dist/ui-components-index.js +6417 -6683
  70. package/dist/ui-components-layout.cjs +135 -0
  71. package/dist/ui-components-layout.js +19938 -0
  72. package/dist/useTranslation-Cenukg7h.js +147 -0
  73. package/dist/useTranslation-CnSCmJou.cjs +1 -0
  74. package/package.json +6 -18
  75. package/dist/constants/tailwind-config/index.d.ts +0 -3
  76. package/dist/constants/tailwind-config/index.d.ts.map +0 -1
  77. package/dist/ui-components-tailwind.cjs +0 -1
  78. package/dist/ui-components-tailwind.js +0 -9
@@ -0,0 +1,147 @@
1
+ import { createContext as H, useContext as M, useCallback as U, useState as _, useRef as A, useEffect as x } from "react";
2
+ const G = (e, s, n, a) => {
3
+ var t, d, N, m;
4
+ const r = [n, {
5
+ code: s,
6
+ ...a || {}
7
+ }];
8
+ if ((d = (t = e == null ? void 0 : e.services) == null ? void 0 : t.logger) != null && d.forward)
9
+ return e.services.logger.forward(r, "warn", "react-i18next::", !0);
10
+ p(r[0]) && (r[0] = `react-i18next:: ${r[0]}`), (m = (N = e == null ? void 0 : e.services) == null ? void 0 : N.logger) != null && m.warn ? e.services.logger.warn(...r) : console != null && console.warn && console.warn(...r);
11
+ }, L = {}, S = (e, s, n, a) => {
12
+ p(n) && L[n] || (p(n) && (L[n] = /* @__PURE__ */ new Date()), G(e, s, n, a));
13
+ }, P = (e, s) => () => {
14
+ if (e.isInitialized)
15
+ s();
16
+ else {
17
+ const n = () => {
18
+ setTimeout(() => {
19
+ e.off("initialized", n);
20
+ }, 0), s();
21
+ };
22
+ e.on("initialized", n);
23
+ }
24
+ }, b = (e, s, n) => {
25
+ e.loadNamespaces(s, P(e, n));
26
+ }, R = (e, s, n, a) => {
27
+ if (p(n) && (n = [n]), e.options.preload && e.options.preload.indexOf(s) > -1) return b(e, n, a);
28
+ n.forEach((r) => {
29
+ e.options.ns.indexOf(r) < 0 && e.options.ns.push(r);
30
+ }), e.loadLanguages(s, P(e, a));
31
+ }, $ = (e, s, n = {}) => !s.languages || !s.languages.length ? (S(s, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
32
+ languages: s.languages
33
+ }), !0) : s.hasLoadedNamespace(e, {
34
+ lng: n.lng,
35
+ precheck: (a, r) => {
36
+ var t;
37
+ if (((t = n.bindI18n) == null ? void 0 : t.indexOf("languageChanging")) > -1 && a.services.backendConnector.backend && a.isLanguageChangingTo && !r(a.isLanguageChangingTo, e)) return !1;
38
+ }
39
+ }), p = (e) => typeof e == "string", q = (e) => typeof e == "object" && e !== null, B = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, W = {
40
+ "&amp;": "&",
41
+ "&#38;": "&",
42
+ "&lt;": "<",
43
+ "&#60;": "<",
44
+ "&gt;": ">",
45
+ "&#62;": ">",
46
+ "&apos;": "'",
47
+ "&#39;": "'",
48
+ "&quot;": '"',
49
+ "&#34;": '"',
50
+ "&nbsp;": " ",
51
+ "&#160;": " ",
52
+ "&copy;": "©",
53
+ "&#169;": "©",
54
+ "&reg;": "®",
55
+ "&#174;": "®",
56
+ "&hellip;": "…",
57
+ "&#8230;": "…",
58
+ "&#x2F;": "/",
59
+ "&#47;": "/"
60
+ }, J = (e) => W[e], K = (e) => e.replace(B, J);
61
+ let X = {
62
+ bindI18n: "languageChanged",
63
+ bindI18nStore: "",
64
+ transEmptyNodeValue: "",
65
+ transSupportBasicHtmlNodes: !0,
66
+ transWrapTextNodes: "",
67
+ transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
68
+ useSuspense: !0,
69
+ unescape: K
70
+ };
71
+ const Y = () => X;
72
+ let D;
73
+ const Q = () => D, Z = H();
74
+ class V {
75
+ constructor() {
76
+ this.usedNamespaces = {};
77
+ }
78
+ addUsedNamespaces(s) {
79
+ s.forEach((n) => {
80
+ this.usedNamespaces[n] || (this.usedNamespaces[n] = !0);
81
+ });
82
+ }
83
+ getUsedNamespaces() {
84
+ return Object.keys(this.usedNamespaces);
85
+ }
86
+ }
87
+ const ee = (e, s) => {
88
+ const n = A();
89
+ return x(() => {
90
+ n.current = e;
91
+ }, [e, s]), n.current;
92
+ }, j = (e, s, n, a) => e.getFixedT(s, n, a), te = (e, s, n, a) => U(j(e, s, n, a), [e, s, n, a]), ne = (e, s = {}) => {
93
+ var O, v, z, F;
94
+ const {
95
+ i18n: n
96
+ } = s, {
97
+ i18n: a,
98
+ defaultNS: r
99
+ } = M(Z) || {}, t = n || a || Q();
100
+ if (t && !t.reportNamespaces && (t.reportNamespaces = new V()), !t) {
101
+ S(t, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
102
+ const i = (l, u) => p(u) ? u : q(u) && p(u.defaultValue) ? u.defaultValue : Array.isArray(l) ? l[l.length - 1] : l, c = [i, {}, !1];
103
+ return c.t = i, c.i18n = {}, c.ready = !1, c;
104
+ }
105
+ (O = t.options.react) != null && O.wait && S(t, "DEPRECATED_OPTION", "useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
106
+ const d = {
107
+ ...Y(),
108
+ ...t.options.react,
109
+ ...s
110
+ }, {
111
+ useSuspense: N,
112
+ keyPrefix: m
113
+ } = d;
114
+ let o = e || r || ((v = t.options) == null ? void 0 : v.defaultNS);
115
+ o = p(o) ? [o] : o || ["translation"], (F = (z = t.reportNamespaces).addUsedNamespaces) == null || F.call(z, o);
116
+ const f = (t.isInitialized || t.initializedStoreOnce) && o.every((i) => $(i, t, d)), k = te(t, s.lng || null, d.nsMode === "fallback" ? o : o[0], m), E = () => k, T = () => j(t, s.lng || null, d.nsMode === "fallback" ? o : o[0], m), [C, h] = _(E);
117
+ let y = o.join();
118
+ s.lng && (y = `${s.lng}${y}`);
119
+ const I = ee(y), g = A(!0);
120
+ x(() => {
121
+ const {
122
+ bindI18n: i,
123
+ bindI18nStore: c
124
+ } = d;
125
+ g.current = !0, !f && !N && (s.lng ? R(t, s.lng, o, () => {
126
+ g.current && h(T);
127
+ }) : b(t, o, () => {
128
+ g.current && h(T);
129
+ })), f && I && I !== y && g.current && h(T);
130
+ const l = () => {
131
+ g.current && h(T);
132
+ };
133
+ return i && (t == null || t.on(i, l)), c && (t == null || t.store.on(c, l)), () => {
134
+ g.current = !1, t && (i == null || i.split(" ").forEach((u) => t.off(u, l))), c && t && c.split(" ").forEach((u) => t.store.off(u, l));
135
+ };
136
+ }, [t, y]), x(() => {
137
+ g.current && f && h(E);
138
+ }, [t, m, f]);
139
+ const w = [C, t, f];
140
+ if (w.t = C, w.i18n = t, w.ready = f, f || !f && !N) return w;
141
+ throw new Promise((i) => {
142
+ s.lng ? R(t, s.lng, o, () => i()) : b(t, o, () => i());
143
+ });
144
+ };
145
+ export {
146
+ ne as u
147
+ };
@@ -0,0 +1 @@
1
+ "use strict";const d=require("react"),k=(e,s,n,a)=>{var t,f,h,m;const r=[n,{code:s,...a||{}}];if((f=(t=e==null?void 0:e.services)==null?void 0:t.logger)!=null&&f.forward)return e.services.logger.forward(r,"warn","react-i18next::",!0);N(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),(m=(h=e==null?void 0:e.services)==null?void 0:h.logger)!=null&&m.warn?e.services.logger.warn(...r):console!=null&&console.warn&&console.warn(...r)},F={},x=(e,s,n,a)=>{N(n)&&F[n]||(N(n)&&(F[n]=new Date),k(e,s,n,a))},A=(e,s)=>()=>{if(e.isInitialized)s();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),s()};e.on("initialized",n)}},S=(e,s,n)=>{e.loadNamespaces(s,A(e,n))},L=(e,s,n,a)=>{if(N(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(s)>-1)return S(e,n,a);n.forEach(r=>{e.options.ns.indexOf(r)<0&&e.options.ns.push(r)}),e.loadLanguages(s,A(e,a))},H=(e,s,n={})=>!s.languages||!s.languages.length?(x(s,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:s.languages}),!0):s.hasLoadedNamespace(e,{lng:n.lng,precheck:(a,r)=>{var t;if(((t=n.bindI18n)==null?void 0:t.indexOf("languageChanging"))>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!r(a.isLanguageChangingTo,e))return!1}}),N=e=>typeof e=="string",M=e=>typeof e=="object"&&e!==null,U=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,_={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},q=e=>_[e],G=e=>e.replace(U,q);let $={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:G};const B=()=>$;let W;const J=()=>W,K=d.createContext();class X{constructor(){this.usedNamespaces={}}addUsedNamespaces(s){s.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Y=(e,s)=>{const n=d.useRef();return d.useEffect(()=>{n.current=e},[e,s]),n.current},P=(e,s,n,a)=>e.getFixedT(s,n,a),D=(e,s,n,a)=>d.useCallback(P(e,s,n,a),[e,s,n,a]),Q=(e,s={})=>{var O,R,v,z;const{i18n:n}=s,{i18n:a,defaultNS:r}=d.useContext(K)||{},t=n||a||J();if(t&&!t.reportNamespaces&&(t.reportNamespaces=new X),!t){x(t,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const i=(u,l)=>N(l)?l:M(l)&&N(l.defaultValue)?l.defaultValue:Array.isArray(u)?u[u.length-1]:u,c=[i,{},!1];return c.t=i,c.i18n={},c.ready=!1,c}(O=t.options.react)!=null&&O.wait&&x(t,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const f={...B(),...t.options.react,...s},{useSuspense:h,keyPrefix:m}=f;let o=e||r||((R=t.options)==null?void 0:R.defaultNS);o=N(o)?[o]:o||["translation"],(z=(v=t.reportNamespaces).addUsedNamespaces)==null||z.call(v,o);const g=(t.isInitialized||t.initializedStoreOnce)&&o.every(i=>H(i,t,f)),j=D(t,s.lng||null,f.nsMode==="fallback"?o:o[0],m),b=()=>j,E=()=>P(t,s.lng||null,f.nsMode==="fallback"?o:o[0],m),[C,y]=d.useState(b);let w=o.join();s.lng&&(w=`${s.lng}${w}`);const I=Y(w),p=d.useRef(!0);d.useEffect(()=>{const{bindI18n:i,bindI18nStore:c}=f;p.current=!0,!g&&!h&&(s.lng?L(t,s.lng,o,()=>{p.current&&y(E)}):S(t,o,()=>{p.current&&y(E)})),g&&I&&I!==w&&p.current&&y(E);const u=()=>{p.current&&y(E)};return i&&(t==null||t.on(i,u)),c&&(t==null||t.store.on(c,u)),()=>{p.current=!1,t&&(i==null||i.split(" ").forEach(l=>t.off(l,u))),c&&t&&c.split(" ").forEach(l=>t.store.off(l,u))}},[t,w]),d.useEffect(()=>{p.current&&g&&y(b)},[t,m,g]);const T=[C,t,g];if(T.t=C,T.i18n=t,T.ready=g,g||!g&&!h)return T;throw new Promise(i=>{s.lng?L(t,s.lng,o,()=>i()):S(t,o,()=>i())})};exports.useTranslation=Q;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mp-front/components",
3
- "version": "0.0.1-next-1",
3
+ "version": "0.0.1-next-3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/ui-components-index.cjs",
@@ -63,21 +63,16 @@
63
63
  "import": "./dist/ui-components-loadings.js",
64
64
  "require": "./dist/ui-components-loadings.cjs"
65
65
  },
66
- "./layouts": {
67
- "types": "./dist/layouts/index.d.ts",
68
- "import": "./dist/ui-components-layouts.js",
69
- "require": "./dist/ui-components-layouts.cjs"
66
+ "./layout": {
67
+ "types": "./dist/layout/index.d.ts",
68
+ "import": "./dist/ui-components-layout.js",
69
+ "require": "./dist/ui-components-layout.cjs"
70
70
  },
71
71
  "./hooks": {
72
72
  "types": "./dist/hooks/index.d.ts",
73
73
  "import": "./dist/ui-components-hooks.js",
74
74
  "require": "./dist/ui-components-hooks.cjs"
75
75
  },
76
- "./tailwind": {
77
- "types": "./dist/constants/tailwind-config/index.d.ts",
78
- "import": "./dist/ui-components-tailwind.js",
79
- "require": "./dist/ui-components-tailwind.cjs"
80
- },
81
76
  "./types": {
82
77
  "types": "./dist/interfaces/index.d.ts"
83
78
  },
@@ -86,11 +81,6 @@
86
81
  "import": "./dist/ui-components-utils.js",
87
82
  "require": "./dist/ui-components-utils.cjs"
88
83
  },
89
- "./v2": {
90
- "types": "./dist/components/v2/index.d.ts",
91
- "import": "./dist/ui-components-v2.js",
92
- "require": "./dist/ui-components-v2.cjs"
93
- },
94
84
  "./styles.css": {
95
85
  "require": "./dist/styles.css",
96
86
  "default": "./dist/styles.css"
@@ -105,7 +95,7 @@
105
95
  },
106
96
  "dependencies": {
107
97
  "@glidejs/glide": "3.7.1",
108
- "@headlessui/react": "2.2.0",
98
+ "@mp-front/icons": "0.0.2",
109
99
  "@tailwindcss/vite": "4.1.17",
110
100
  "@tanstack/react-table": "8.20.6",
111
101
  "chart.js": "4.4.7",
@@ -113,7 +103,6 @@
113
103
  "d3": "7.9.0",
114
104
  "dinero.js": "1.9.1",
115
105
  "i18next": "24.2.1",
116
- "lodash": "4.17.21",
117
106
  "motion": "12.23.26",
118
107
  "nanoid": "5.0.9",
119
108
  "qrcode.react": "4.2.0",
@@ -146,7 +135,6 @@
146
135
  "@types/d3-scale-chromatic": "3.1.0",
147
136
  "@types/dinero.js": "1.9.4",
148
137
  "@types/glidejs__glide": "3.6.5",
149
- "@types/lodash": "4.17.14",
150
138
  "@types/node": "20.11.20",
151
139
  "@types/react": "19.0.3",
152
140
  "@types/react-dom": "19.0.2",
@@ -1,3 +0,0 @@
1
- import { Config } from 'tailwindcss';
2
- export declare const tailwindConfig: Partial<Config>;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/constants/tailwind-config/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,MAAM,CAK1C,CAAA"}
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={theme:{extend:{}},plugins:[]};exports.tailwindConfig=e;
@@ -1,9 +0,0 @@
1
- const e = {
2
- theme: {
3
- extend: {}
4
- },
5
- plugins: []
6
- };
7
- export {
8
- e as tailwindConfig
9
- };