@amateescu/portal-ui-components 0.0.28 → 0.0.30-beta

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 (45) hide show
  1. package/dist/Box-ZFRI9JCw.js +102 -0
  2. package/dist/Button-CNfTnafe.js +676 -0
  3. package/dist/ButtonBase-DWpUn0eT.js +965 -0
  4. package/dist/CircularProgress-D6RyizwS.js +247 -0
  5. package/dist/{EllipsisOutlined-DZsCEqiL.js → EllipsisOutlined-CzFuvGH_.js} +3 -3
  6. package/dist/{PurePanel-iUNZWTe_.js → PurePanel-CxlAi3G7.js} +3 -3
  7. package/dist/{Skeleton-CfEiGUkR.js → Skeleton-dypyF9G2.js} +2 -2
  8. package/dist/{UserInfoDropdown-CoZutJAR.js → UserInfoDropdown-DPyds49a.js} +763 -769
  9. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  10. package/dist/components/ConfirmationModal/ConfirmationModal.js +1 -1
  11. package/dist/components/ConfirmationModal/ConfirmationModal.stories.js +1 -1
  12. package/dist/components/CustomButton/CustomButton.js +1 -1
  13. package/dist/components/CustomButton/CustomButton.stories.d.ts +1 -0
  14. package/dist/components/CustomButton/CustomButton.stories.js +21 -7
  15. package/dist/components/CustomFooter/CustomFooter.js +1 -1
  16. package/dist/components/CustomPagination/CustomPagination.js +484 -372
  17. package/dist/components/ErrorModal/ErrorModal.js +1 -1
  18. package/dist/components/ErrorModal/ErrorModal.stories.js +1 -1
  19. package/dist/components/InfoModal/InfoModal.js +1 -1
  20. package/dist/components/InfoModal/InfoModal.stories.js +1 -1
  21. package/dist/components/KpiCard/KpiCard.js +355 -351
  22. package/dist/components/LoadingAnimation/LoadingAnimation.js +6 -215
  23. package/dist/components/Login/Login.js +4638 -3844
  24. package/dist/components/Login/Login.stories.js +15693 -14785
  25. package/dist/components/SideMenu/SideMenu.js +1 -1
  26. package/dist/components/TotalDataGrid/TotalDataGrid.js +6 -6
  27. package/dist/components/UserInfoDropdown/UserInfoDropdown.js +1 -1
  28. package/dist/components/UserInfoDropdown/UserInfoDropdown.stories.js +1 -1
  29. package/dist/components/index.js +1 -1
  30. package/dist/{context-Crxhk7DD.js → context-Bk4VnwMB.js} +7 -7
  31. package/dist/createSimplePaletteValueFilter-rq2_biPF.js +3443 -0
  32. package/dist/createSvgIcon-jB7EUYpq.js +248 -0
  33. package/dist/{index-BxiDYyNJ.js → index-DLbr86ak.js} +511 -513
  34. package/dist/{index-DpDv68WZ.js → index-xh_JY2OQ.js} +1 -1
  35. package/dist/main.js +1 -1
  36. package/dist/objectWithoutPropertiesLoose-BTau6TOn.js +33 -0
  37. package/dist/useSlot-CT4096EK.js +188 -0
  38. package/package.json +31 -31
  39. package/dist/Box-C1OwXVV-.js +0 -68
  40. package/dist/Button-CIvE-fcO.js +0 -355
  41. package/dist/ButtonBase-BeQnmGXr.js +0 -966
  42. package/dist/assertThisInitialized-BUtkG-md.js +0 -13
  43. package/dist/createSvgIcon-Db107M0j.js +0 -250
  44. package/dist/generateUtilityClasses-DY-qyzNG.js +0 -3427
  45. package/dist/objectWithoutPropertiesLoose-DYizGgyG.js +0 -46
@@ -1,4 +1,4 @@
1
- import { g as zk } from "./objectWithoutPropertiesLoose-DYizGgyG.js";
1
+ import { g as zk } from "./_commonjsHelpers-C6fGbg64.js";
2
2
  import QT from "react";
3
3
  function Uk(ne, we) {
4
4
  for (var L = 0; L < we.length; L++) {
package/dist/main.js CHANGED
@@ -10,7 +10,7 @@ import { LoadingAnimation as L } from "./components/LoadingAnimation/LoadingAnim
10
10
  import { Login as P } from "./components/Login/Login.js";
11
11
  import { SideMenu as h } from "./components/SideMenu/SideMenu.js";
12
12
  import { TotalDataGrid as A } from "./components/TotalDataGrid/TotalDataGrid.js";
13
- import { U as I } from "./UserInfoDropdown-CoZutJAR.js";
13
+ import { U as I } from "./UserInfoDropdown-DPyds49a.js";
14
14
  import { chunkArray as b } from "./portal-utils/chunkArray.js";
15
15
  import { cn as v } from "./portal-utils/cn.js";
16
16
  import { currency as B, date as E, datetime as F, decimal as G, fuelUnitPrice as S, fuelVolume as T, hours as V, number as W, time as j } from "./portal-utils/formatters.js";
@@ -0,0 +1,33 @@
1
+ function i() {
2
+ return i = Object.assign ? Object.assign.bind() : function(t) {
3
+ for (var r = 1; r < arguments.length; r++) {
4
+ var n = arguments[r];
5
+ for (var e in n) ({}).hasOwnProperty.call(n, e) && (t[e] = n[e]);
6
+ }
7
+ return t;
8
+ }, i.apply(null, arguments);
9
+ }
10
+ function o(t, r) {
11
+ return o = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, e) {
12
+ return n.__proto__ = e, n;
13
+ }, o(t, r);
14
+ }
15
+ function s(t) {
16
+ if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
17
+ return t;
18
+ }
19
+ function a(t, r) {
20
+ if (t == null) return {};
21
+ var n = {};
22
+ for (var e in t) if ({}.hasOwnProperty.call(t, e)) {
23
+ if (r.indexOf(e) !== -1) continue;
24
+ n[e] = t[e];
25
+ }
26
+ return n;
27
+ }
28
+ export {
29
+ i as _,
30
+ o as a,
31
+ a as b,
32
+ s as c
33
+ };
@@ -0,0 +1,188 @@
1
+ import * as c from "react";
2
+ import { c as E, P as v } from "./createSimplePaletteValueFilter-rq2_biPF.js";
3
+ import "react/jsx-runtime";
4
+ import { u as I } from "./ButtonBase-DWpUn0eT.js";
5
+ function _({
6
+ controlled: e,
7
+ default: o,
8
+ name: n,
9
+ state: t = "value"
10
+ }) {
11
+ const {
12
+ current: s
13
+ } = c.useRef(e !== void 0), [u, f] = c.useState(o), l = s ? e : u;
14
+ if (process.env.NODE_ENV !== "production") {
15
+ c.useEffect(() => {
16
+ s !== (e !== void 0) && console.error([`MUI: A component is changing the ${s ? "" : "un"}controlled ${t} state of ${n} to be ${s ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
17
+ `));
18
+ }, [t, n, e]);
19
+ const {
20
+ current: r
21
+ } = c.useRef(o);
22
+ c.useEffect(() => {
23
+ !s && !Object.is(r, o) && console.error([`MUI: A component is changing the default ${t} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
24
+ `));
25
+ }, [JSON.stringify(o)]);
26
+ }
27
+ const m = c.useCallback((r) => {
28
+ s || f(r);
29
+ }, []);
30
+ return [l, m];
31
+ }
32
+ function k(e) {
33
+ const o = typeof e;
34
+ switch (o) {
35
+ case "number":
36
+ return Number.isNaN(e) ? "NaN" : Number.isFinite(e) ? e !== Math.floor(e) ? "float" : "number" : "Infinity";
37
+ case "object":
38
+ return e === null ? "null" : e.constructor.name;
39
+ default:
40
+ return o;
41
+ }
42
+ }
43
+ function b(e, o, n, t) {
44
+ const s = e[o];
45
+ if (s == null || !Number.isInteger(s)) {
46
+ const u = k(s);
47
+ return new RangeError(`Invalid ${t} \`${o}\` of type \`${u}\` supplied to \`${n}\`, expected \`integer\`.`);
48
+ }
49
+ return null;
50
+ }
51
+ function R(e, o, ...n) {
52
+ return e[o] === void 0 ? null : b(e, o, ...n);
53
+ }
54
+ function N() {
55
+ return null;
56
+ }
57
+ R.isRequired = b;
58
+ N.isRequired = N;
59
+ const W = process.env.NODE_ENV === "production" ? N : R;
60
+ function w(e) {
61
+ return typeof e == "string";
62
+ }
63
+ function H(e, o, n) {
64
+ return e === void 0 || w(e) ? o : {
65
+ ...o,
66
+ ownerState: {
67
+ ...o.ownerState,
68
+ ...n
69
+ }
70
+ };
71
+ }
72
+ function j(e, o = []) {
73
+ if (e === void 0)
74
+ return {};
75
+ const n = {};
76
+ return Object.keys(e).filter((t) => t.match(/^on[A-Z]/) && typeof e[t] == "function" && !o.includes(t)).forEach((t) => {
77
+ n[t] = e[t];
78
+ }), n;
79
+ }
80
+ function C(e) {
81
+ if (e === void 0)
82
+ return {};
83
+ const o = {};
84
+ return Object.keys(e).filter((n) => !(n.match(/^on[A-Z]/) && typeof e[n] == "function")).forEach((n) => {
85
+ o[n] = e[n];
86
+ }), o;
87
+ }
88
+ function A(e) {
89
+ const {
90
+ getSlotProps: o,
91
+ additionalProps: n,
92
+ externalSlotProps: t,
93
+ externalForwardedProps: s,
94
+ className: u
95
+ } = e;
96
+ if (!o) {
97
+ const h = E(n == null ? void 0 : n.className, u, s == null ? void 0 : s.className, t == null ? void 0 : t.className), i = {
98
+ ...n == null ? void 0 : n.style,
99
+ ...s == null ? void 0 : s.style,
100
+ ...t == null ? void 0 : t.style
101
+ }, d = {
102
+ ...n,
103
+ ...s,
104
+ ...t
105
+ };
106
+ return h.length > 0 && (d.className = h), Object.keys(i).length > 0 && (d.style = i), {
107
+ props: d,
108
+ internalRef: void 0
109
+ };
110
+ }
111
+ const f = j({
112
+ ...s,
113
+ ...t
114
+ }), l = C(t), m = C(s), r = o(f), a = E(r == null ? void 0 : r.className, n == null ? void 0 : n.className, u, s == null ? void 0 : s.className, t == null ? void 0 : t.className), p = {
115
+ ...r == null ? void 0 : r.style,
116
+ ...n == null ? void 0 : n.style,
117
+ ...s == null ? void 0 : s.style,
118
+ ...t == null ? void 0 : t.style
119
+ }, y = {
120
+ ...r,
121
+ ...n,
122
+ ...m,
123
+ ...l
124
+ };
125
+ return a.length > 0 && (y.className = a), Object.keys(p).length > 0 && (y.style = p), {
126
+ props: y,
127
+ internalRef: r.ref
128
+ };
129
+ }
130
+ function D(e, o, n) {
131
+ return typeof e == "function" ? e(o, n) : e;
132
+ }
133
+ const M = /* @__PURE__ */ c.createContext();
134
+ process.env.NODE_ENV !== "production" && (v.node, v.bool);
135
+ const Z = () => c.useContext(M) ?? !1;
136
+ function z(e, o) {
137
+ const {
138
+ className: n,
139
+ elementType: t,
140
+ ownerState: s,
141
+ externalForwardedProps: u,
142
+ internalForwardedProps: f,
143
+ shouldForwardComponentProp: l = !1,
144
+ ...m
145
+ } = o, {
146
+ component: r,
147
+ slots: a = {
148
+ [e]: void 0
149
+ },
150
+ slotProps: p = {
151
+ [e]: void 0
152
+ },
153
+ ...y
154
+ } = u, h = a[e] || t, i = D(p[e], s), {
155
+ props: {
156
+ component: d,
157
+ ...$
158
+ },
159
+ internalRef: O
160
+ } = A({
161
+ className: n,
162
+ ...m,
163
+ externalForwardedProps: e === "root" ? y : void 0,
164
+ externalSlotProps: i
165
+ }), V = I(O, i == null ? void 0 : i.ref, o.ref), g = e === "root" ? d || r : d, T = H(h, {
166
+ ...e === "root" && !r && !a[e] && f,
167
+ ...e !== "root" && !a[e] && f,
168
+ ...$,
169
+ ...g && !l && {
170
+ as: g
171
+ },
172
+ ...g && l && {
173
+ component: g
174
+ },
175
+ ref: V
176
+ }, s);
177
+ return [h, T];
178
+ }
179
+ export {
180
+ Z as a,
181
+ z as b,
182
+ H as c,
183
+ j as e,
184
+ W as i,
185
+ A as m,
186
+ D as r,
187
+ _ as u
188
+ };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@amateescu/portal-ui-components",
3
3
  "main": "dist/main.js",
4
4
  "types": "dist/main.d.ts",
5
- "version": "0.0.28",
5
+ "version": "0.0.30-beta",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist",
@@ -31,50 +31,50 @@
31
31
  "react-dom": ">=18.2.0",
32
32
  "react-i18next": ">=14.1.0",
33
33
  "antd": ">=5.16.2",
34
- "@mui/material": ">=5.15.12"
34
+ "@mui/material": ">=7.0.2"
35
35
  },
36
36
  "devDependencies": {
37
- "@chromatic-com/storybook": "^3.2.4",
37
+ "@chromatic-com/storybook": "^3.2.6",
38
38
  "@emotion/react": "^11.14.0",
39
39
  "@emotion/styled": "^11.14.0",
40
- "@eslint/js": "^9.21.0",
41
- "@mui/icons-material": "^5.15.12",
42
- "@mui/material": "^5.15.12",
43
- "@mui/x-data-grid": "^6.19.8",
44
- "@storybook/addon-essentials": "^8.5.8",
45
- "@storybook/addon-interactions": "^8.5.8",
46
- "@storybook/addon-onboarding": "^8.5.8",
47
- "@storybook/blocks": "^8.5.8",
48
- "@storybook/react": "^8.5.8",
49
- "@storybook/react-vite": "^8.5.8",
50
- "@storybook/test": "^8.5.8",
40
+ "@eslint/js": "^9.25.1",
41
+ "@mui/icons-material": "^7.0.2",
42
+ "@mui/material": "^7.0.2",
43
+ "@mui/x-data-grid": "^8.1.0",
44
+ "@storybook/addon-essentials": "^8.6.12",
45
+ "@storybook/addon-interactions": "^8.6.12",
46
+ "@storybook/addon-onboarding": "^8.6.12",
47
+ "@storybook/blocks": "^8.6.12",
48
+ "@storybook/react": "^8.6.12",
49
+ "@storybook/react-vite": "^8.6.12",
50
+ "@storybook/test": "^8.6.12",
51
51
  "@types/postcss-import": "^14.0.3",
52
52
  "@types/react": "^18.3.12",
53
53
  "@types/react-dom": "^18.3.1",
54
- "@vitejs/plugin-react": "^4.3.4",
55
- "antd": "^5.24.2",
54
+ "@vitejs/plugin-react": "^4.4.1",
55
+ "antd": "^5.24.8",
56
56
  "date-fns": "^4.1.0",
57
- "eslint": "^9.21.0",
58
- "eslint-plugin-react": "^7.37.4",
59
- "eslint-plugin-react-hooks": "^5.1.0",
60
- "eslint-plugin-react-refresh": "^0.4.19",
61
- "eslint-plugin-storybook": "^0.11.3",
62
- "glob": "^11.0.1",
57
+ "eslint": "^9.25.1",
58
+ "eslint-plugin-react": "^7.37.5",
59
+ "eslint-plugin-react-hooks": "^5.2.0",
60
+ "eslint-plugin-react-refresh": "^0.4.20",
61
+ "eslint-plugin-storybook": "^0.12.0",
62
+ "glob": "^11.0.2",
63
63
  "globals": "^16.0.0",
64
- "i18next": "^24.2.2",
64
+ "i18next": "^25.0.1",
65
65
  "postcss": "^8.5.3",
66
66
  "postcss-import": "^16.1.0",
67
- "postcss-preset-env": "^10.1.5",
67
+ "postcss-preset-env": "^10.1.6",
68
68
  "react": "^18.3.1",
69
69
  "react-dom": "^18.3.1",
70
- "react-i18next": "^15.4.1",
70
+ "react-i18next": "^15.5.1",
71
71
  "rimraf": "6.0.1",
72
- "sass-embedded": "^1.85.1",
73
- "storybook": "^8.5.8",
74
- "typescript": "^5.7.3",
75
- "vite": "^6.2.0",
76
- "vite-plugin-dts": "^4.5.0",
77
- "vite-plugin-lib-inject-css": "^2.2.1",
72
+ "sass-embedded": "^1.87.0",
73
+ "storybook": "^8.6.12",
74
+ "typescript": "^5.8.3",
75
+ "vite": "^6.3.3",
76
+ "vite-plugin-dts": "^4.5.3",
77
+ "vite-plugin-lib-inject-css": "^2.2.2",
78
78
  "vite-plugin-svgr": "^4.3.0"
79
79
  },
80
80
  "sideEffects": [
@@ -1,68 +0,0 @@
1
- import { i as h, j as T, k as y, l as C, c as N, a as B, C as b, T as j, m as _, P as e } from "./generateUtilityClasses-DY-qyzNG.js";
2
- import { _ as O, a as P } from "./objectWithoutPropertiesLoose-DYizGgyG.js";
3
- import * as m from "react";
4
- import { ThemeContext as g } from "@emotion/react";
5
- import { jsx as E } from "react/jsx-runtime";
6
- function v(t) {
7
- return Object.keys(t).length === 0;
8
- }
9
- function D(t = null) {
10
- const o = m.useContext(g);
11
- return !o || v(o) ? t : o;
12
- }
13
- const I = h();
14
- function M(t = I) {
15
- return D(t);
16
- }
17
- const R = ["className", "component"];
18
- function S(t = {}) {
19
- const {
20
- themeId: o,
21
- defaultTheme: u,
22
- defaultClassName: a = "MuiBox-root",
23
- generateClassName: r
24
- } = t, l = T("div", {
25
- shouldForwardProp: (s) => s !== "theme" && s !== "sx" && s !== "as"
26
- })(y);
27
- return /* @__PURE__ */ m.forwardRef(function(i, x) {
28
- const n = M(u), c = C(i), {
29
- className: f,
30
- component: d = "div"
31
- } = c, p = O(c, R);
32
- return /* @__PURE__ */ E(l, P({
33
- as: d,
34
- ref: x,
35
- className: N(f, r ? r(a) : a),
36
- theme: o && n[o] || n
37
- }, p));
38
- });
39
- }
40
- const k = B("MuiBox", ["root"]), w = _(), F = S({
41
- themeId: j,
42
- defaultTheme: w,
43
- defaultClassName: k.root,
44
- generateClassName: b.generate
45
- });
46
- process.env.NODE_ENV !== "production" && (F.propTypes = {
47
- // ┌────────────────────────────── Warning ──────────────────────────────┐
48
- // │ These PropTypes are generated from the TypeScript type definitions. │
49
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
50
- // └─────────────────────────────────────────────────────────────────────┘
51
- /**
52
- * @ignore
53
- */
54
- children: e.node,
55
- /**
56
- * The component used for the root node.
57
- * Either a string to use a HTML element or a component.
58
- */
59
- component: e.elementType,
60
- /**
61
- * The system prop that allows defining system overrides as well as additional CSS styles.
62
- */
63
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
64
- });
65
- export {
66
- F as B,
67
- M as u
68
- };