@ukpc-lib/react 0.1.27 → 0.1.29

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,8 +1,9 @@
1
1
  import { jsxs as R, Fragment as cr, jsx as v } from "react/jsx-runtime";
2
2
  import * as M from "react";
3
3
  import la, { useState as J, useRef as Ye, useEffect as Re, createContext as $t, useLayoutEffect as Gn, useContext as ue, useInsertionEffect as Vc, useCallback as Jt, useMemo as ur, forwardRef as ca, createElement as en, useId as Lc, PureComponent as zc } from "react";
4
- import { C as jc, g as Fc, Q as ua, R as $c, l as Bc, p as Wc, c as An, s as Pn, _ as W, a as st, P as D, b as je, d as Uc, o as Hc, e as Yc, f as Gc, h as ro, I as qc, i as Kc, j as io, D as Xc, k as ut, r as Zc, m as Qc, B as Jc } from "../index.module-ebc563e0.js";
5
- import { n as R3, q as N3 } from "../index.module-ebc563e0.js";
4
+ import { C as jc, g as Fc, Q as ua, R as $c, l as Bc, p as Wc, c as An, s as Pn, _ as W, a as st, P as D, b as je, d as Uc, o as Hc, e as Yc, f as Gc, h as ro, I as qc, i as Kc, j as io, D as Xc, k as ut, r as Zc, m as Qc, B as Jc } from "../index.module-34bab88b.js";
5
+ import { n as N3, q as D3 } from "../index.module-34bab88b.js";
6
+ import "@r2wc/react-to-web-component";
6
7
  import eu from "axios";
7
8
  import { Link as tu, useLocation as nu } from "react-router-dom";
8
9
  import { createPortal as ru } from "react-dom";
@@ -144,7 +145,7 @@ function ha({ children: e, styles: t = [], ...n }) {
144
145
  }
145
146
  const vu = `.avatar-dropdown-item{padding:.5rem;font-size:.875rem;line-height:1.25rem;cursor:pointer;border-radius:.25rem}.avartarDropdownMenu{background-color:#fff;padding:.5rem;width:13rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);position:absolute;left:-10rem;top:3.2rem}.avartarDropdownMenu ul{list-style:none;padding-inline-start:0;margin-block-end:0}.navbar{position:fixed;display:flex;z-index:30;background:black;top:0;width:100%;padding-left:2.5rem;height:64px}.navbar-container{display:flex;flex-direction:row;align-items:center;width:100%;justify-content:space-between}.logo-container{padding:16px 0;height:100%}.navbar-container img{height:100%}.right-side-container{display:flex;flex-direction:row;align-items:center;text-align:center;margin-right:2.5rem;gap:1rem}.userContainer{display:flex;align-items:center;gap:.5rem}.userFullName{color:#fff;font-weight:400;font-size:.875rem;line-height:1.25rem}.userAvatar{width:2.5rem;height:2.5rem;cursor:pointer;-o-object-fit:cover;object-fit:cover;border-radius:9999px}.relative{position:relative}.cursor-pointer{cursor:pointer}
146
147
  `;
147
- function g3({
148
+ function y3({
148
149
  logo: e,
149
150
  user: t,
150
151
  baseUrl: n,
@@ -786,7 +787,7 @@ var Ea = M.forwardRef(function(e, t) {
786
787
  });
787
788
  Ea.displayName = "SimpleBar";
788
789
  const nd = `[data-simplebar]{position:relative;flex-direction:column;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:flex-start}.simplebar-wrapper{overflow:hidden;width:inherit;height:inherit;max-width:inherit;max-height:inherit}.simplebar-mask{direction:inherit;position:absolute;overflow:hidden;padding:0;margin:0;left:0;top:0;bottom:0;right:0;width:auto!important;height:auto!important;z-index:0}.simplebar-offset{direction:inherit!important;box-sizing:inherit!important;resize:none!important;position:absolute;top:0;left:0;bottom:0;right:0;padding:0;margin:0;-webkit-overflow-scrolling:touch}.simplebar-content-wrapper{direction:inherit;box-sizing:border-box!important;position:relative;display:block;height:100%;width:auto;max-width:100%;max-height:100%;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.simplebar-content-wrapper::-webkit-scrollbar,.simplebar-hide-scrollbar::-webkit-scrollbar{display:none;width:0;height:0}.simplebar-content:after,.simplebar-content:before{content:" ";display:table}.simplebar-placeholder{max-height:100%;max-width:100%;width:100%;pointer-events:none}.simplebar-height-auto-observer-wrapper{box-sizing:inherit!important;height:100%;width:100%;max-width:1px;position:relative;float:left;max-height:1px;overflow:hidden;z-index:-1;padding:0;margin:0;pointer-events:none;flex-grow:inherit;flex-shrink:0;flex-basis:0}.simplebar-height-auto-observer{box-sizing:inherit;display:block;opacity:0;position:absolute;top:0;left:0;height:1000%;width:1000%;min-height:1px;min-width:1px;overflow:hidden;pointer-events:none;z-index:-1}.simplebar-track{z-index:1;position:absolute;right:0;bottom:0;pointer-events:none;overflow:hidden}[data-simplebar].simplebar-dragging,[data-simplebar].simplebar-dragging .simplebar-content{pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-simplebar].simplebar-dragging .simplebar-track{pointer-events:all}.simplebar-scrollbar{position:absolute;left:0;right:0;min-height:10px}.simplebar-scrollbar:before{position:absolute;content:"";background:#000;border-radius:7px;left:2px;right:2px;opacity:0;transition:opacity .2s .5s linear}.simplebar-scrollbar.simplebar-visible:before{opacity:.5;transition-delay:0s;transition-duration:0s}.simplebar-track.simplebar-vertical{top:0;width:11px}.simplebar-scrollbar:before{top:2px;bottom:2px;left:2px;right:2px}.simplebar-track.simplebar-horizontal{left:0;height:11px}.simplebar-track.simplebar-horizontal .simplebar-scrollbar{right:auto;left:0;top:0;bottom:0;min-height:0;min-width:10px;width:auto}[data-simplebar-direction=rtl] .simplebar-track.simplebar-vertical{right:auto;left:0}.simplebar-dummy-scrollbar-size{direction:rtl;position:fixed;opacity:0;visibility:hidden;height:500px;width:500px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:scrollbar!important}.simplebar-dummy-scrollbar-size>div{width:200%;height:200%;margin:10px 0}.simplebar-hide-scrollbar{position:fixed;left:0;visibility:hidden;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none}
789
- `, y3 = (e) => /* @__PURE__ */ v(
790
+ `, v3 = (e) => /* @__PURE__ */ v(
790
791
  ua,
791
792
  {
792
793
  autoClose: 3e3,
@@ -5113,7 +5114,7 @@ function Hl({ item: e, level: t = 0, ...n }) {
5113
5114
  }
5114
5115
  function y1({ item: e, cls: t }) {
5115
5116
  var s, a;
5116
- const [n, r] = J(!1), i = () => {
5117
+ const [n, r] = J(!e.icon), i = () => {
5117
5118
  r(!0);
5118
5119
  }, o = (s = e.icon) == null ? void 0 : s.endsWith(".svg");
5119
5120
  return /* @__PURE__ */ v("div", { className: t("menu-item__icon"), children: n ? /* @__PURE__ */ v(
@@ -5204,7 +5205,7 @@ function x1(e) {
5204
5205
  }
5205
5206
  const w1 = `.side-bar{display:flex;flex-direction:column;max-width:18rem;height:calc(100vh - 64px);border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s;padding:0 8px}.side-bar.expanded{width:18rem}.side-bar.collapsed{width:64px;padding-left:4px;padding-right:4px}.side-bar__menu{margin-left:-8px;margin-right:-8px;padding-left:8px;padding-right:8px}.side-bar__menu.collapsed{margin-left:-4px;margin-right:-4px;padding-left:4px;padding-right:4px}.side-bar__wrap-btn-logout,.side-bar__btn-logout{margin:40px 0}.side-bar__logout-btn__text{margin-left:12px}.side-bar__logout-btn__text.collapsed{display:none}.side-bar__wrapper-toggle-btn{display:flex;flex-direction:row;justify-content:flex-end;transition:all .3s;margin-right:-8px;margin-top:40px}.side-bar__wrapper-toggle-btn.collapsed{justify-content:center;width:100%}.side-bar__toggle-btn{margin-top:-6px;color:#85858a}.side-bar__logout-btn{width:100%;text-align:left;display:flex;flex-direction:row;align-items:center;padding:0 16px;min-height:48px;border-radius:.375rem}.side-bar__logout-btn:hover{background-color:#919eab14}.side-bar__logout-btn.collapsed{justify-content:center}.menu-item__wrapper{display:flex;flex-direction:column;position:relative;width:100%;margin-top:4px}.menu-item__wrapper:first-child,.menu-item__wrapper.collapsed{margin-top:0}.menu-item__wrapper.collapsed.level-1{margin-top:4px}.menu-item__link{display:flex;flex-direction:row;border-radius:.375rem;align-items:center;padding:.5rem;position:relative;height:48px;cursor:pointer;color:#85858a}.menu-item__link:hover{background-color:#919eab14}.menu-item__link.active{background-color:#009d4f1a!important;color:#009d4f!important}.menu-item__link.level-0{height:auto}.menu-item__link.menu-item__link.collapsed.level-0{display:none}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0}.menu-item__icon.collapsed.level-1{width:100%}.menu-item__icon.collapsed.level-1>*{margin:0 auto}.menu-item__label{font-size:.875rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;flex-shrink:1;margin-left:12px;padding-right:12px;color:#292929}.menu-item__label.active{color:inherit}.menu-item__label.collapsed{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.collapsed.level-1{text-align:center;margin-left:0;display:none}.menu-item__label.level-0{color:#85858a}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:-3px}.menu-item__icon-arrow__wrapper.expanded{right:0}.menu-item__icon-arrow__icon{transition:all .3s!important;transform:rotate(-90deg)!important}.menu-item__icon-arrow__icon.active{color:inherit}.menu-item__icon-arrow__icon.expanded.open{transform:rotate(0)!important}.menu-item__dropdown.collapsed{background-color:#fafafa;border:1px solid #ddd;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;border-radius:4px;width:180px;max-width:180px;padding:4px;z-index:1200}.menu-item__dropdown.collapsed .menu-item__link{height:40px}.menu-item__dropdown.collapsed .menu-item__link.level-1{height:48px}.menu-item__dropdown.collapsed.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.menu-item__dropdown.expanded{margin-top:4px;overflow:hidden}.icon-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px;border-radius:50%;background-color:transparent;transition:background-color .3s ease;border:none}.icon-btn:hover{background-color:var(--btn-bg-hover)}.simplebar-scrollbar:before{background-color:#0000002d}
5206
5207
  `;
5207
- function b3(e) {
5208
+ function x3(e) {
5208
5209
  return /* @__PURE__ */ v(
5209
5210
  ha,
5210
5211
  {
@@ -5372,7 +5373,7 @@ function T1(e) {
5372
5373
  (o = i.children) != null && o.length && (r[i.id] = !0);
5373
5374
  }), r;
5374
5375
  }
5375
- const x3 = ({ children: e }) => /* @__PURE__ */ R(
5376
+ const w3 = ({ children: e }) => /* @__PURE__ */ R(
5376
5377
  Me,
5377
5378
  {
5378
5379
  justifyContent: "center",
@@ -5718,7 +5719,7 @@ function O1(e) {
5718
5719
  }, []);
5719
5720
  return { value: t, setValue: n, setTrue: r, setFalse: i, toggle: o };
5720
5721
  }
5721
- function w3(e) {
5722
+ function S3(e) {
5722
5723
  var t;
5723
5724
  return /* @__PURE__ */ R(iu, { ...e.dialogProps, open: e.open, children: [
5724
5725
  !e.hideTitle && /* @__PURE__ */ R(
@@ -5772,7 +5773,7 @@ function w3(e) {
5772
5773
  )
5773
5774
  ] });
5774
5775
  }
5775
- function S3(e) {
5776
+ function E3(e) {
5776
5777
  const t = O1(typeof e == "boolean" ? e : void 0);
5777
5778
  return {
5778
5779
  setTrue: t.setTrue,
@@ -5781,7 +5782,7 @@ function S3(e) {
5781
5782
  onConfirm: typeof e != "boolean" ? e == null ? void 0 : e.onConfirm : void 0
5782
5783
  };
5783
5784
  }
5784
- const E3 = () => /* @__PURE__ */ v("div", { className: Pn["page-container"], children: /* @__PURE__ */ R("div", { className: Pn["page-main-content"], children: [
5785
+ const T3 = () => /* @__PURE__ */ v("div", { className: Pn["page-container"], children: /* @__PURE__ */ R("div", { className: Pn["page-main-content"], children: [
5785
5786
  /* @__PURE__ */ v(k1, {}),
5786
5787
  /* @__PURE__ */ v("br", {}),
5787
5788
  /* @__PURE__ */ v("h2", { className: Pn["page-title"], children: "Access Denied: No Access Permission" }),
@@ -10232,7 +10233,7 @@ const lr = 37, i3 = (e, t) => {
10232
10233
  const a = s.offsetHeight;
10233
10234
  return document.body.removeChild(s), a > 21 ? lr + 21 : lr;
10234
10235
  };
10235
- function T3(e) {
10236
+ function C3(e) {
10236
10237
  const [t, n] = J(!1), [r, i] = J(""), [o, s] = J(""), [a, l] = J(!1), { isRequired: c = !1 } = e, d = Jt(
10237
10238
  ro.debounce((S) => {
10238
10239
  var y;
@@ -10457,7 +10458,7 @@ function T3(e) {
10457
10458
  }
10458
10459
  );
10459
10460
  }
10460
- function C3(e) {
10461
+ function A3(e) {
10461
10462
  var d;
10462
10463
  const { listProps: t } = e, [n, r] = J({
10463
10464
  initLoading: !e.disabled,
@@ -10628,7 +10629,7 @@ function o3(e) {
10628
10629
  );
10629
10630
  }
10630
10631
  const s3 = "Reset date";
10631
- function A3(e) {
10632
+ function P3(e) {
10632
10633
  var s, a;
10633
10634
  const [t, n] = J(e.value), r = !(t != null && t.startDate) || !t.endDate ? "" : fe(t.startDate).format("DD/MM/YYYY") + " - " + fe(t.endDate).format("DD/MM/YYYY"), i = Ye(Date.now()), o = () => {
10634
10635
  i.current = Date.now();
@@ -10694,7 +10695,7 @@ function A3(e) {
10694
10695
  i.current
10695
10696
  );
10696
10697
  }
10697
- function P3(e) {
10698
+ function O3(e) {
10698
10699
  return /* @__PURE__ */ v(
10699
10700
  "svg",
10700
10701
  {
@@ -10715,7 +10716,7 @@ function P3(e) {
10715
10716
  }
10716
10717
  );
10717
10718
  }
10718
- function O3(e) {
10719
+ function k3(e) {
10719
10720
  return /* @__PURE__ */ R(
10720
10721
  "svg",
10721
10722
  {
@@ -10771,7 +10772,7 @@ const a3 = (e) => {
10771
10772
  )
10772
10773
  ] })
10773
10774
  ] }) }) });
10774
- }, k3 = (e) => {
10775
+ }, M3 = (e) => {
10775
10776
  const [t, n] = J({
10776
10777
  title: "",
10777
10778
  body: ""
@@ -10797,20 +10798,20 @@ const a3 = (e) => {
10797
10798
  };
10798
10799
  export {
10799
10800
  aa as AutocompleteOption,
10800
- O3 as CheckedIcon,
10801
- b3 as GlobalMenu,
10802
- x3 as NoData,
10803
- k3 as NotificationBase,
10804
- w3 as PopUpBase,
10805
- T3 as StyledAutocomplete,
10806
- A3 as StyledDateRangePicker,
10807
- y3 as ToastConfig,
10808
- g3 as TopBar,
10809
- E3 as UnauthorizedPage,
10810
- P3 as UncheckedIcon,
10801
+ k3 as CheckedIcon,
10802
+ x3 as GlobalMenu,
10803
+ w3 as NoData,
10804
+ M3 as NotificationBase,
10805
+ S3 as PopUpBase,
10806
+ C3 as StyledAutocomplete,
10807
+ P3 as StyledDateRangePicker,
10808
+ v3 as ToastConfig,
10809
+ y3 as TopBar,
10810
+ T3 as UnauthorizedPage,
10811
+ O3 as UncheckedIcon,
10811
10812
  Wc as pushError,
10812
- R3 as pushSuccess,
10813
- N3 as pushWarning,
10814
- S3 as usePopUp,
10815
- C3 as useStyledAutocomplete
10813
+ N3 as pushSuccess,
10814
+ D3 as pushWarning,
10815
+ E3 as usePopUp,
10816
+ A3 as useStyledAutocomplete
10816
10817
  };