@3sc/common-component 0.0.438 → 0.0.440

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