@3sc/common-component 0.0.223 → 0.0.224

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
@@ -27561,6 +27561,7 @@ const iN = (e, t) => Mp(e) ? new sN(t) : new rN(t, {
27561
27561
  }
27562
27562
  );
27563
27563
  }, kx = ({ styles: e, label: t, disabled: n, onClick: o, ...s }) => {
27564
+ var y, h;
27564
27565
  const i = Dt();
27565
27566
  let a = (t == null ? void 0 : t.length) * ((t == null ? void 0 : t.length) >= 10 ? 6.5 : 7.5) + 38 || 0;
27566
27567
  a = s != null && s.options ? a + 15 : a;
@@ -27578,6 +27579,10 @@ const iN = (e, t) => Mp(e) ? new sN(t) : new rN(t, {
27578
27579
  animate: {
27579
27580
  width: f ? `${l ? a / 10 : 3.2}rem` : t ? `${a / 10}rem` : "3.2rem"
27580
27581
  },
27582
+ whileHover: {
27583
+ backgroundColor: (y = e == null ? void 0 : e.hover) == null ? void 0 : y.backgroundColor,
27584
+ color: (h = e == null ? void 0 : e.hover) == null ? void 0 : h.color
27585
+ },
27581
27586
  transition: {
27582
27587
  duration: 0.2,
27583
27588
  ease: "easeInOut"
@@ -27603,7 +27608,7 @@ const iN = (e, t) => Mp(e) ? new sN(t) : new rN(t, {
27603
27608
  disabled: n,
27604
27609
  layout: !0,
27605
27610
  onClick: () => {
27606
- !(s != null && s.options) && o(), s != null && s.options && (p((y) => !y), g(d));
27611
+ !(s != null && s.options) && o(), s != null && s.options && (p((b) => !b), g(d));
27607
27612
  },
27608
27613
  ...s,
27609
27614
  children: [
@@ -38711,7 +38716,7 @@ const b_ = ({ options: e, isDraggable: t }) => {
38711
38716
  L.push({ ...A, children: [R] });
38712
38717
  } else
38713
38718
  L = L.some((U) => U.id === R.id) ? L.filter((U) => U.id !== R.id) : [...L, R];
38714
- p(L), (_ = l == null ? void 0 : l.onChange) == null || _.call(l, L);
38719
+ p(L), (_ = l == null ? void 0 : l.onChange) == null || _.call(l, L), g("");
38715
38720
  };
38716
38721
  xt(() => {
38717
38722
  const R = m_(n, f);
@@ -38765,6 +38770,9 @@ const b_ = ({ options: e, isDraggable: t }) => {
38765
38770
  borderBottomRightRadius: c && b.startsWith("bottom") ? 0 : "0.7rem",
38766
38771
  borderTopLeftRadius: c && b.startsWith("top") ? 0 : "0.7rem",
38767
38772
  borderTopRightRadius: c && b.startsWith("top") ? 0 : "0.7rem"
38773
+ },
38774
+ "& .MuiInputBase-input": {
38775
+ color: (R) => `${l != null && l.placeholder ? R.palette.primary.notifyTextColor : R.palette.primary.notifyActiveText}!important`
38768
38776
  }
38769
38777
  },
38770
38778
  onClick: (R) => {
@@ -38824,6 +38832,10 @@ const b_ = ({ options: e, isDraggable: t }) => {
38824
38832
  InputProps: { disableUnderline: !0 },
38825
38833
  onChange: N,
38826
38834
  sx: {
38835
+ position: "sticky",
38836
+ top: 0,
38837
+ zIndex: 1,
38838
+ backgroundColor: (R) => R.palette.primary.appBackground,
38827
38839
  fontSize: "1.1rem",
38828
38840
  borderBottom: (R) => `1px solid ${R.palette.primary.notifyBorderColor}`,
38829
38841
  "& .MuiInputBase-input": {
@@ -38870,7 +38882,7 @@ const b_ = ({ options: e, isDraggable: t }) => {
38870
38882
  {
38871
38883
  sx: {
38872
38884
  opacity: R != null && R.isMandatory || R != null && R.disabled ? 0.5 : 1,
38873
- cursor: "pointer",
38885
+ cursor: e ? "grab" : "pointer",
38874
38886
  pointerEvents: R != null && R.isMandatory || R != null && R.disabled ? "none" : "auto",
38875
38887
  padding: "0.8rem 1.2rem",
38876
38888
  borderTop: A !== 0 || i ? (_) => `0.1rem solid ${_.palette.primary.notifyBorderColor}` : "none"
@@ -38883,58 +38895,39 @@ const b_ = ({ options: e, isDraggable: t }) => {
38883
38895
  var U;
38884
38896
  _.stopPropagation(), (!((U = R == null ? void 0 : R.children) != null && U.length) || R != null && R.showCheckbox) && B(R);
38885
38897
  },
38886
- children: /* @__PURE__ */ m.jsxs(
38887
- lt,
38888
- {
38889
- direction: "row",
38890
- alignItems: "center",
38891
- justifyContent: "space-between",
38892
- gap: "1rem",
38893
- width: "100%",
38894
- children: [
38895
- /* @__PURE__ */ m.jsxs(
38896
- lt,
38897
- {
38898
- direction: "row",
38899
- alignItems: "center",
38900
- gap: "1rem",
38901
- sx: { minWidth: 0, flex: 1 },
38902
- children: [
38903
- s && (!((L = R == null ? void 0 : R.children) != null && L.length) || (R == null ? void 0 : R.showCheckbox)) && /* @__PURE__ */ m.jsx(
38904
- Jc,
38905
- {
38906
- sx: { p: 0 },
38907
- checked: o.some((_) => _.id === R.id)
38908
- }
38909
- ),
38910
- /* @__PURE__ */ m.jsx(
38911
- et,
38912
- {
38913
- component: "h3",
38914
- noWrap: !0,
38915
- sx: {
38916
- color: (_) => {
38917
- var U;
38918
- return (U = R == null ? void 0 : R.children) != null && U.length && !(R != null && R.showCheckbox) ? _.palette.primary.notifyActiveText : _.palette.primary.notifyTextColor;
38919
- },
38920
- fontWeight: (P = R == null ? void 0 : R.children) != null && P.length && !(R != null && R.showCheckbox) ? "500" : "300",
38921
- fontSize: "1.1rem",
38922
- overflow: "hidden",
38923
- textOverflow: "ellipsis",
38924
- whiteSpace: "nowrap",
38925
- minWidth: 0,
38926
- flex: 1
38927
- },
38928
- children: R.label
38929
- }
38930
- )
38931
- ]
38932
- }
38933
- ),
38934
- !(R != null && R.isMandatory) && e && /* @__PURE__ */ m.jsx(be, { component: "img", src: Xe.Drag })
38935
- ]
38936
- }
38937
- )
38898
+ children: /* @__PURE__ */ m.jsxs(lt, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: "1rem", width: "100%", children: [
38899
+ /* @__PURE__ */ m.jsxs(lt, { direction: "row", alignItems: "center", gap: "1rem", sx: { minWidth: 0, flex: 1 }, children: [
38900
+ s && (!((L = R == null ? void 0 : R.children) != null && L.length) || (R == null ? void 0 : R.showCheckbox)) && /* @__PURE__ */ m.jsx(
38901
+ Jc,
38902
+ {
38903
+ sx: { p: 0 },
38904
+ checked: o.some((_) => _.id === R.id)
38905
+ }
38906
+ ),
38907
+ /* @__PURE__ */ m.jsx(
38908
+ et,
38909
+ {
38910
+ component: "h3",
38911
+ noWrap: !0,
38912
+ sx: {
38913
+ color: (_) => {
38914
+ var U;
38915
+ return (U = R == null ? void 0 : R.children) != null && U.length && !(R != null && R.showCheckbox) ? _.palette.primary.notifyActiveText : _.palette.primary.notifyTextColor;
38916
+ },
38917
+ fontWeight: (P = R == null ? void 0 : R.children) != null && P.length && !(R != null && R.showCheckbox) ? "500" : "300",
38918
+ fontSize: "1.1rem",
38919
+ overflow: "hidden",
38920
+ textOverflow: "ellipsis",
38921
+ whiteSpace: "nowrap",
38922
+ minWidth: 0,
38923
+ flex: 1
38924
+ },
38925
+ children: R.label
38926
+ }
38927
+ )
38928
+ ] }),
38929
+ !(R != null && R.isMandatory) && e && /* @__PURE__ */ m.jsx(be, { component: "img", src: Xe.Drag, draggable: !1 })
38930
+ ] })
38938
38931
  }
38939
38932
  ),
38940
38933
  (D = R.children) == null ? void 0 : D.map((_, U) => /* @__PURE__ */ m.jsx(
@@ -43654,10 +43647,7 @@ const UB = ({
43654
43647
  dividers: !0,
43655
43648
  sx: {
43656
43649
  p: 0,
43657
- ...i && { alignItems: "center", justifyContent: "center" },
43658
- display: "flex",
43659
- justifyContent: "center",
43660
- alignItems: "center",
43650
+ ...i && !c.length && { alignItems: "center", justifyContent: "center" },
43661
43651
  flexGrow: 1,
43662
43652
  overflowY: "auto",
43663
43653
  mx: "1.2rem",