@amateescu/portal-ui-components 0.0.31 → 0.0.32-beta1

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.
@@ -1,13 +1,12 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { S as e } from "../../InvencoGVR-qnTq-d6S.js";
3
3
  import "react";
4
- import '../../assets/SideMenu.css';import '../../assets/theme.css';/* empty css */
5
4
  import "@mui/x-data-grid";
6
5
  import { KpiCard as i } from "../KpiCard/KpiCard.js";
7
6
  import { KpiWrapper as n } from "./KpiWrapper.js";
8
7
  import "i18next";
9
- /* empty css */
10
- const m = {
8
+ import '../../assets/SideMenu.css';/* empty css */
9
+ const s = {
11
10
  title: "Kpi Wrapper",
12
11
  component: n,
13
12
  tags: ["autodocs"],
@@ -20,7 +19,7 @@ const m = {
20
19
  padding: "10px 10px"
21
20
  }
22
21
  }
23
- }, K = {}, u = {
22
+ }, m = {}, K = {
24
23
  args: {
25
24
  children: [
26
25
  /* @__PURE__ */ t(i, { title: "Kpi Card", content: "Kpi Card Content", icon: /* @__PURE__ */ t(e, { width: 50, height: 50 }), menuCollapsed: !0 }),
@@ -28,7 +27,7 @@ const m = {
28
27
  /* @__PURE__ */ t(i, { title: "Kpi Card 3", content: "Kpi Card Content 3", icon: /* @__PURE__ */ t(e, { width: 50, height: 50 }), menuCollapsed: !0 })
29
28
  ]
30
29
  }
31
- }, g = {
30
+ }, u = {
32
31
  args: {
33
32
  children: [
34
33
  /* @__PURE__ */ t(i, { title: "Kpi Card", content: "Kpi Card Content", icon: /* @__PURE__ */ t(e, { width: 50, height: 50 }), menuCollapsed: !0 }),
@@ -37,7 +36,7 @@ const m = {
37
36
  /* @__PURE__ */ t(i, { title: "Kpi Card 4", content: "Kpi Card Content 4", icon: /* @__PURE__ */ t(e, { width: 50, height: 50 }), menuCollapsed: !0 })
38
37
  ]
39
38
  }
40
- }, w = {
39
+ }, g = {
41
40
  args: {
42
41
  children: [
43
42
  /* @__PURE__ */ t(i, { title: "Kpi Card", content: "Kpi Card Content", icon: /* @__PURE__ */ t(e, { width: 50, height: 50 }), menuCollapsed: !0 }),
@@ -48,9 +47,9 @@ const m = {
48
47
  render: (r) => /* @__PURE__ */ t("div", { dir: "rtl", style: { margin: "20px 20px" }, children: /* @__PURE__ */ t(n, { ...r }) })
49
48
  };
50
49
  export {
51
- K as Default,
52
- w as RTL,
53
- u as With3Kpis,
54
- g as With4Kpis,
55
- m as default
50
+ m as Default,
51
+ g as RTL,
52
+ K as With3Kpis,
53
+ u as With4Kpis,
54
+ s as default
56
55
  };
@@ -1,5 +1,4 @@
1
1
  import { jsx as v, jsxs as ce } from "react/jsx-runtime";
2
- import '../../assets/theme.css';/* empty css */
3
2
  import { c as ke } from "../../createSvgIcon-CgFXfzFk.js";
4
3
  import { t as Ye } from "i18next";
5
4
  import { P as e, q as gn, r as hn, c as Z, b as K, d as J, l as yn, g as te, t as Io, T as Po, a as se, u as oe, s as F, i as mt, v as Qt, m as ae, f as st, e as Re, w as eo, x as to, y as No, z as zt, h as Pe, A as Wt, B as vn } from "../../createSimplePaletteValueFilter-evt-Xthj.js";
@@ -8849,7 +8848,7 @@ process.env.NODE_ENV !== "production" && (Bt.propTypes = {
8849
8848
  });
8850
8849
  const ui = ke(/* @__PURE__ */ v("path", {
8851
8850
  d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2M9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9zm9 14H6V10h12zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2"
8852
- }), "LockOutlined"), Ri = ({ title: t, disableAll: o, error: n, setError: r, handleSubmit: i, version: s }) => /* @__PURE__ */ ce(Ko, { component: "main", maxWidth: "xs", children: [
8851
+ }), "LockOutlined"), Si = ({ title: t, disableAll: o, error: n, setError: r, handleSubmit: i, version: s }) => (localStorage.getItem("theme") === "portal-theme" ? import("../../portal-theme-BarSJQdA.js") : import("../../theme-94RKb7HE.js"), /* @__PURE__ */ ce(Ko, { component: "main", maxWidth: "xs", children: [
8853
8852
  /* @__PURE__ */ v(Xo, {}),
8854
8853
  /* @__PURE__ */ ce(
8855
8854
  oo,
@@ -8907,7 +8906,7 @@ const ui = ke(/* @__PURE__ */ v("path", {
8907
8906
  ]
8908
8907
  }
8909
8908
  )
8910
- ] });
8909
+ ] }));
8911
8910
  export {
8912
- Ri as Login
8911
+ Si as Login
8913
8912
  };
@@ -1,27 +1,26 @@
1
1
  import { jsxs as i, jsx as e, Fragment as M } from "react/jsx-runtime";
2
2
  import * as n from "react";
3
- import { M as R, S as N, U as h } from "../../UserInfoDropdown-DtadP0e7.js";
3
+ import { M as R, S as N, U as h } from "../../UserInfoDropdown-Cql8tlJU.js";
4
4
  import { S as H } from "../../InvencoGVR-qnTq-d6S.js";
5
- import '../../assets/SideMenu.css';import '../../assets/theme.css';/* empty css */
6
- /* empty css */
5
+ import '../../assets/SideMenu.css';/* empty css */
7
6
  const v = (l) => /* @__PURE__ */ n.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ n.createElement("path", { d: "M11 19L4 12L11 5M19 19L12 12L19 5", stroke: "#045529", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), p = (l) => /* @__PURE__ */ n.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ n.createElement("path", { d: "M13 5L20 12L13 19M5 5L12 12L5 19", stroke: "#045529", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), V = (l) => /* @__PURE__ */ n.createElement("svg", { width: 28, height: 27, viewBox: "0 0 28 27", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ n.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.5 4V9C10.5 9.55228 10.0523 10 9.5 10H4.5L6.5 12H9.5C11.1569 12 12.5 10.6569 12.5 9V6L10.5 4Z", fill: "#12121A" }), /* @__PURE__ */ n.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.5 6V0L8.5 2V7.75C8.5 7.88807 8.38807 8 8.25 8H2.5L0.5 6H6.5Z", fill: "#12121A" }), /* @__PURE__ */ n.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17.5 4V9C17.5 9.55228 17.9477 10 18.5 10H23.5L21.5 12H18.5C16.8431 12 15.5 10.6569 15.5 9V6L17.5 4Z", fill: "#12121A" }), /* @__PURE__ */ n.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M21.5 6V0L19.5 2V7.75C19.5 7.88807 19.6119 8 19.75 8H25.5L27.5 6H21.5Z", fill: "#12121A" }), /* @__PURE__ */ n.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.5 23V18C10.5 17.4477 10.0523 17 9.5 17H4.5L6.5 15H9.5C11.1569 15 12.5 16.3431 12.5 18V21L10.5 23Z", fill: "#12121A" }), /* @__PURE__ */ n.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.5 21V27L8.5 25V19.25C8.5 19.1119 8.38807 19 8.25 19H2.5L0.5 21H6.5Z", fill: "#12121A" })), j = ({
8
7
  logo: l,
9
8
  title: u,
10
9
  softwareName: r,
11
- majorVersion: L,
12
- menuItems: f,
10
+ majorVersion: f,
11
+ menuItems: L,
13
12
  userInfoDropdownItems: c,
14
13
  collapsed: t,
15
14
  username: a,
16
15
  isRtl: d,
17
- openKeys: w,
16
+ openKeys: g,
18
17
  toggleCollapsed: o,
19
- onClick: g,
18
+ onClick: w,
20
19
  handleMenuClickUserInfo: s,
21
20
  handleOpenChange: x
22
21
  }) => {
23
22
  const m = /@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g, k = t ? 54 : 250, C = t ? 50 : 250;
24
- return /* @__PURE__ */ i("div", { style: { width: k }, className: "main-container", children: [
23
+ return localStorage.getItem("theme") === "portal-theme" ? import("../../portal-theme-BarSJQdA.js") : import("../../theme-94RKb7HE.js"), /* @__PURE__ */ i("div", { style: { width: k }, className: "main-container", children: [
25
24
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { children: t ? /* @__PURE__ */ e("div", { className: "flex-col-center mt-15", children: d ? /* @__PURE__ */ e(v, { onClick: o, className: "pointer" }) : /* @__PURE__ */ e(p, { onClick: o, className: "pointer" }) }) : /* @__PURE__ */ i("div", { className: "space-around-center", children: [
26
25
  /* @__PURE__ */ i("div", { className: "flex-row-center", children: [
27
26
  l,
@@ -32,7 +31,7 @@ const v = (l) => /* @__PURE__ */ n.createElement("svg", { width: 24, height: 24,
32
31
  " ",
33
32
  r,
34
33
  ": ",
35
- L
34
+ f
36
35
  ] }) : ""
37
36
  ] })
38
37
  ] }),
@@ -41,12 +40,12 @@ const v = (l) => /* @__PURE__ */ n.createElement("svg", { width: 24, height: 24,
41
40
  /* @__PURE__ */ e(
42
41
  R,
43
42
  {
44
- onClick: g,
43
+ onClick: w,
45
44
  mode: "inline",
46
45
  onOpenChange: x,
47
- openKeys: w,
46
+ openKeys: g,
48
47
  selectedKeys: [location.pathname.slice(location.pathname.lastIndexOf("/"), location.pathname.length)],
49
- items: t ? void 0 : f,
48
+ items: t ? void 0 : L,
50
49
  expandIcon: /* @__PURE__ */ e(N, {}),
51
50
  style: {
52
51
  height: t ? "82vh" : "80vh",
@@ -1,17 +1,16 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import '../../assets/theme.css';/* empty css */
1
+ import { jsx as n } from "react/jsx-runtime";
3
2
  import { DataGrid as l, gridClasses as o } from "@mui/x-data-grid";
4
3
  const p = ({
5
4
  rows: r,
6
- isFetching: n,
7
- columnsDefinitions: i
8
- }) => /* @__PURE__ */ t(
5
+ isFetching: a,
6
+ columnsDefinitions: t
7
+ }) => (localStorage.getItem("theme") === "portal-theme" ? import("../../portal-theme-BarSJQdA.js") : import("../../theme-94RKb7HE.js"), /* @__PURE__ */ n(
9
8
  l,
10
9
  {
11
- loading: (!r || !r.length) && n,
12
- rows: r.map((a, e) => (a.id = e, a)),
13
- columns: i,
14
- getRowClassName: (a) => a.id === r.length - 1 ? "last-row" : "",
10
+ loading: (!r || !r.length) && a,
11
+ rows: r.map((e, i) => (e.id = i, e)),
12
+ columns: t,
13
+ getRowClassName: (e) => e.id === r.length - 1 ? "last-row" : "",
15
14
  sx: {
16
15
  "& .last-row": {
17
16
  "& .MuiDataGrid-cellContent": {
@@ -116,7 +115,7 @@ const p = ({
116
115
  }
117
116
  }
118
117
  }
119
- );
118
+ ));
120
119
  export {
121
120
  p as TotalDataGrid
122
121
  };
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { U as t } from "../../UserInfoDropdown-DtadP0e7.js";
2
+ import { U as t } from "../../UserInfoDropdown-Cql8tlJU.js";
3
3
  import "../../portal-utils/cn.js";
4
4
  export {
5
5
  t as UserInfoDropdown
@@ -1,6 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { userInfoDropdownItems as s } from "../../mock.js";
3
- import { U as o } from "../../UserInfoDropdown-DtadP0e7.js";
3
+ import { U as o } from "../../UserInfoDropdown-Cql8tlJU.js";
4
4
  const n = {
5
5
  title: "User Info Dropdown",
6
6
  component: o,
@@ -10,7 +10,7 @@ import { LoadingAnimation as D } from "./LoadingAnimation/LoadingAnimation.js";
10
10
  import { Login as K } from "./Login/Login.js";
11
11
  import { SideMenu as U } from "./SideMenu/SideMenu.js";
12
12
  import { TotalDataGrid as A } from "./TotalDataGrid/TotalDataGrid.js";
13
- import { U as E } from "../UserInfoDropdown-DtadP0e7.js";
13
+ import { U as E } from "../UserInfoDropdown-Cql8tlJU.js";
14
14
  export {
15
15
  t as ConfirmationModal,
16
16
  m as CustomButton,
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-DtadP0e7.js";
13
+ import { U as I } from "./UserInfoDropdown-Cql8tlJU.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";
package/package.json CHANGED
@@ -2,17 +2,19 @@
2
2
  "name": "@amateescu/portal-ui-components",
3
3
  "main": "dist/main.js",
4
4
  "types": "dist/main.d.ts",
5
- "version": "0.0.31",
5
+ "version": "0.0.32-beta1",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist",
9
- "src/theme/theme.scss"
9
+ "src/theme/theme.scss",
10
+ "src/theme/portal-theme.scss"
10
11
  ],
11
12
  "exports": {
12
13
  "./components": "./dist/components/index.js",
13
14
  "./types": "./dist/types/index.js",
14
15
  "./portal-utils": "./dist/portal-utils/index.js",
15
- "./theme.css": "./dist/assets/theme.css"
16
+ "./theme.css": "./dist/assets/theme.css",
17
+ "./portal-theme.css": "./dist/assets/portal-theme.css"
16
18
  },
17
19
  "scripts": {
18
20
  "build": "tsc && vite build",
@@ -0,0 +1,43 @@
1
+ :root {
2
+ --color-primary: #cbddf3;
3
+ --color-secondary: #626367;
4
+ --color-background: #f0f0f0;
5
+ --color-background-secondary: #f3f6f8;
6
+ --color-text: #12121a;
7
+ --color-text-secondary: #111111;
8
+ --color-text-light: #777;
9
+ --color-text-dark: #333;
10
+ --color-border: #ddd;
11
+ --color-highlight: #05a952;
12
+ --color-highlight-data-grid: #05a9521a; //data-grid row selection
13
+ --color-mui-selected: #F5F7FB;
14
+ --color-warning: #eea63c;
15
+ --color-critical: #f95048;
16
+ --color-neutral: #fafafa;
17
+ --color-red: red;
18
+ --color-gray: #e0e0e0;
19
+ --color-blue: #0054EE; //clear filters
20
+ --color-light-gray-blue: #E6EBEF;
21
+ --color-very-light-gray: #DBDBDB;
22
+ --color-white: white;
23
+ --color-green: green;
24
+ --color-ant-theme: #00b96b;
25
+ --color-avatar: #41b06e;
26
+
27
+ --font-size-xxsmall: 8px;
28
+ --font-size-9: 9px;
29
+ --font-size-xsmall: 10px;
30
+ --font-size-small: 12px;
31
+ --font-size-normal: 13px;
32
+ --font-size-medium: 14px;
33
+ --font-size-large: 16px;
34
+ --font-size-xlarge: 18px;
35
+ --font-size-xxlarge: 20px;
36
+ --font-size-xxxlarge: 21px;
37
+ --font-size-22: 22px;
38
+ --font-size-kpi-card: 32px;
39
+
40
+ --font-bolded: 600;
41
+ --font-500: 500;
42
+ --font-400: 400;
43
+ }