@3sc/common-component 0.0.438 → 0.0.439

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/index.es.js CHANGED
@@ -41746,36 +41746,41 @@ const LV = ({ progress: e = 0, status: t }) => {
41746
41746
  background: "transparent",
41747
41747
  boxShadow: "none"
41748
41748
  }
41749
- })), qV = ({ isChartType: e, setIsChartType: t, leftSwitchText: n, rigthSwitchText: r }) => {
41750
- const [o, i] = De(0), [a, l] = De(0), c = rt(null), u = rt(null);
41749
+ })), qV = ({ isChartType: e, setIsChartType: t, leftSwitchText: n, rigthSwitchText: r, disabled: o }) => {
41750
+ const [i, a] = De(0), [l, c] = De(0), u = rt(null), d = rt(null);
41751
41751
  return st(() => {
41752
- if (c.current && u.current) {
41753
- const d = e ? u.current : c.current;
41754
- i(d.offsetWidth), l(d.offsetLeft);
41752
+ if (u.current && d.current) {
41753
+ const f = e ? d.current : u.current;
41754
+ a(f.offsetWidth), c(f.offsetLeft);
41755
41755
  }
41756
- }, [e]), /* @__PURE__ */ m.jsx(we, { sx: { display: "flex" }, children: /* @__PURE__ */ m.jsxs(UV, { children: [
41757
- /* @__PURE__ */ m.jsx(HV, { sx: { width: o, transform: `translateX(${a}px)`, height: "2.5rem" } }),
41756
+ }, [e]), /* @__PURE__ */ m.jsx(we, { sx: { display: "flex" }, children: /* @__PURE__ */ m.jsxs(UV, { sx: {
41757
+ cursor: o ? "not-allowed" : "pointer",
41758
+ opacity: o ? 0.5 : 1
41759
+ }, children: [
41760
+ /* @__PURE__ */ m.jsx(HV, { sx: { width: i, transform: `translateX(${l}px)`, height: "2.5rem" } }),
41758
41761
  /* @__PURE__ */ m.jsx(
41759
41762
  py,
41760
41763
  {
41761
- ref: c,
41764
+ ref: u,
41762
41765
  disableRipple: !0,
41763
- sx: (d) => ({
41764
- color: e ? d.palette.brandColor.grey1 : d.palette.primary.notifyActiveText
41766
+ sx: (f) => ({
41767
+ cursor: o ? "not-allowed" : "pointer",
41768
+ color: e ? f.palette.brandColor.grey1 : f.palette.primary.notifyActiveText
41765
41769
  }),
41766
- onClick: () => t(!1),
41770
+ onClick: () => o ? null : t(!1),
41767
41771
  children: n
41768
41772
  }
41769
41773
  ),
41770
41774
  /* @__PURE__ */ m.jsx(
41771
41775
  py,
41772
41776
  {
41773
- ref: u,
41777
+ ref: d,
41774
41778
  disableRipple: !0,
41775
- sx: (d) => ({
41776
- color: e ? d.palette.primary.notifyActiveText : d.palette.brandColor.grey1
41779
+ sx: (f) => ({
41780
+ cursor: o ? "not-allowed" : "pointer",
41781
+ color: e ? f.palette.primary.notifyActiveText : f.palette.brandColor.grey1
41777
41782
  }),
41778
- onClick: () => t(!0),
41783
+ onClick: () => o ? null : t(!0),
41779
41784
  children: r
41780
41785
  }
41781
41786
  )
@@ -45523,8 +45528,8 @@ _w.propTypes = {
45523
45528
  handleLinkClick: s.func
45524
45529
  };
45525
45530
  const Bw = ({ breadcrumbProps: e, switchProps: t, filterComponentProps: n, metaDataProps: r }) => {
45526
- var i, a, l, c, u, d, f;
45527
- const o = Ft();
45531
+ var a, l, c, u, d, f, p, h;
45532
+ const o = Ft(), i = (a = n == null ? void 0 : n.filterBtnProps) == null ? void 0 : a.disabled;
45528
45533
  return /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
45529
45534
  /* @__PURE__ */ m.jsxs(
45530
45535
  ft,
@@ -45565,9 +45570,10 @@ const Bw = ({ breadcrumbProps: e, switchProps: t, filterComponentProps: n, metaD
45565
45570
  direction: "row",
45566
45571
  alignItems: "center",
45567
45572
  gap: "0.5rem",
45568
- onClick: (i = n == null ? void 0 : n.filterBtnProps) == null ? void 0 : i.onFilterClick,
45573
+ onClick: (l = n == null ? void 0 : n.filterBtnProps) == null ? void 0 : l.onFilterClick,
45569
45574
  sx: {
45570
- cursor: "pointer"
45575
+ opacity: i ? 0.5 : 1,
45576
+ cursor: i ? "not-allowed" : "pointer"
45571
45577
  },
45572
45578
  children: [
45573
45579
  /* @__PURE__ */ m.jsx(hn, { url: et.Filter }),
@@ -45578,7 +45584,7 @@ const Bw = ({ breadcrumbProps: e, switchProps: t, filterComponentProps: n, metaD
45578
45584
  fontSize: "1.1rem",
45579
45585
  color: o.palette.primary.notifyActiveText
45580
45586
  },
45581
- children: (a = n == null ? void 0 : n.filterBtnProps) == null ? void 0 : a.label
45587
+ children: (c = n == null ? void 0 : n.filterBtnProps) == null ? void 0 : c.label
45582
45588
  }
45583
45589
  )
45584
45590
  ]
@@ -45597,8 +45603,8 @@ const Bw = ({ breadcrumbProps: e, switchProps: t, filterComponentProps: n, metaD
45597
45603
  height: "0rem"
45598
45604
  },
45599
45605
  animate: {
45600
- height: (l = n == null ? void 0 : n.filterBtnProps) != null && l.filterContainerVisible ? "5rem" : "0rem",
45601
- opacity: (c = n == null ? void 0 : n.filterBtnProps) != null && c.filterContainerVisible ? 1 : 0
45606
+ height: (u = n == null ? void 0 : n.filterBtnProps) != null && u.filterContainerVisible ? "5rem" : "0rem",
45607
+ opacity: (d = n == null ? void 0 : n.filterBtnProps) != null && d.filterContainerVisible ? 1 : 0
45602
45608
  },
45603
45609
  transition: {
45604
45610
  duration: 0.5,
@@ -45612,7 +45618,7 @@ const Bw = ({ breadcrumbProps: e, switchProps: t, filterComponentProps: n, metaD
45612
45618
  alignItems: "center",
45613
45619
  display: "flex",
45614
45620
  overflow: "hidden",
45615
- width: (u = n == null ? void 0 : n.filterContainerProps) != null && u.isSideDrawerOpen ? "75%" : "100%"
45621
+ width: (f = n == null ? void 0 : n.filterContainerProps) != null && f.isSideDrawerOpen ? "75%" : "100%"
45616
45622
  },
45617
45623
  children: /* @__PURE__ */ m.jsxs(
45618
45624
  ft,
@@ -45666,7 +45672,7 @@ const Bw = ({ breadcrumbProps: e, switchProps: t, filterComponentProps: n, metaD
45666
45672
  sx: {
45667
45673
  overflow: "visible"
45668
45674
  },
45669
- children: (d = n == null ? void 0 : n.filterItems) == null ? void 0 : d.map((p, h) => /* @__PURE__ */ m.jsx(m.Fragment, { children: /* @__PURE__ */ m.jsxs(
45675
+ children: (p = n == null ? void 0 : n.filterItems) == null ? void 0 : p.map((y, g) => /* @__PURE__ */ m.jsx(m.Fragment, { children: /* @__PURE__ */ m.jsxs(
45670
45676
  we,
45671
45677
  {
45672
45678
  sx: {
@@ -45690,7 +45696,7 @@ const Bw = ({ breadcrumbProps: e, switchProps: t, filterComponentProps: n, metaD
45690
45696
  right: "-0.6rem",
45691
45697
  cursor: "pointer"
45692
45698
  },
45693
- onClick: () => n == null ? void 0 : n.onFilterChipClose(p)
45699
+ onClick: () => n == null ? void 0 : n.onFilterChipClose(y)
45694
45700
  }
45695
45701
  ),
45696
45702
  /* @__PURE__ */ m.jsx(
@@ -45700,12 +45706,12 @@ const Bw = ({ breadcrumbProps: e, switchProps: t, filterComponentProps: n, metaD
45700
45706
  fontSize: "1rem",
45701
45707
  color: o.palette.primary.notifyTextColor
45702
45708
  },
45703
- children: p == null ? void 0 : p.filterLabel
45709
+ children: y == null ? void 0 : y.filterLabel
45704
45710
  }
45705
45711
  )
45706
45712
  ]
45707
45713
  },
45708
- h
45714
+ g
45709
45715
  ) }))
45710
45716
  }
45711
45717
  )
@@ -45722,7 +45728,7 @@ const Bw = ({ breadcrumbProps: e, switchProps: t, filterComponentProps: n, metaD
45722
45728
  color: o.palette.brandColor.red,
45723
45729
  cursor: "pointer"
45724
45730
  },
45725
- onClick: (f = n == null ? void 0 : n.filterContainerProps) == null ? void 0 : f.onClearClick,
45731
+ onClick: (h = n == null ? void 0 : n.filterContainerProps) == null ? void 0 : h.onClearClick,
45726
45732
  children: "Clear"
45727
45733
  }
45728
45734
  )