@lax-wp/design-system 0.11.5 → 0.11.7

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
@@ -34627,55 +34627,83 @@ const wj = ({
34627
34627
  mainClass: g,
34628
34628
  id: y,
34629
34629
  childrenClass: x,
34630
- ...S
34631
- }) => /* @__PURE__ */ C("div", { id: y, className: `${!d && "mb-4"} ${n ? "pb-1" : ""} ${g || ""}`, style: h?.style, ...S, children: [
34632
- /* @__PURE__ */ C(
34633
- "div",
34634
- {
34635
- className: q(
34636
- "flex items-center justify-between cursor-pointer border border-neutral-200 dark:border-none bg-neutral-100 dark:bg-black-600 px-3 py-1 rounded-lg",
34637
- p
34638
- ),
34639
- onClick: r,
34640
- ...S,
34641
- children: [
34642
- /* @__PURE__ */ C("div", { onClick: (E) => s ? s(E) : null, className: `${f && "flex"} w-full`, children: [
34643
- f && !o && /* @__PURE__ */ l(
34644
- "button",
34645
- {
34646
- id: "btn-accordion-outline-drag-indicator",
34647
- className: "flex items-center justify-center w-icon h-icon hover:transform hover:scale-125 transition-all duration-200 ease-in-out",
34648
- ...h?.attributes,
34649
- ...h?.listeners,
34650
- children: /* @__PURE__ */ l(vb, { height: "10px", width: "7px", color: "#98A2B3" })
34651
- }
34652
- ),
34653
- /* @__PURE__ */ C("div", { className: "flex items-center gap-1 w-full", children: [
34654
- u && /* @__PURE__ */ l(
34655
- EW,
34630
+ withAnimation: S = !1,
34631
+ ...E
34632
+ }) => {
34633
+ const T = q(!d && "p-4", x);
34634
+ return /* @__PURE__ */ C("div", { id: y, className: `${!d && "mb-4"} ${n ? "pb-1" : ""} ${g || ""}`, style: h?.style, ...E, children: [
34635
+ /* @__PURE__ */ C(
34636
+ "div",
34637
+ {
34638
+ className: q(
34639
+ "flex items-center justify-between cursor-pointer border border-neutral-200 dark:border-none bg-neutral-100 dark:bg-black-600 px-3 py-1 rounded-lg",
34640
+ p
34641
+ ),
34642
+ onClick: r,
34643
+ ...E,
34644
+ children: [
34645
+ /* @__PURE__ */ C("div", { onClick: (k) => s ? s(k) : null, className: `${f && "flex"} w-full`, children: [
34646
+ f && !o && /* @__PURE__ */ l(
34647
+ "button",
34656
34648
  {
34657
- isChecked: A,
34658
- onSelect: (E) => {
34659
- E.stopPropagation(), u();
34660
- },
34661
- className: "h-4 w-4 accent-[#366FE3]"
34649
+ id: "btn-accordion-outline-drag-indicator",
34650
+ className: "flex items-center justify-center w-icon h-icon hover:transform hover:scale-125 transition-all duration-200 ease-in-out",
34651
+ ...h?.attributes,
34652
+ ...h?.listeners,
34653
+ children: /* @__PURE__ */ l(vb, { height: "10px", width: "7px", color: "#98A2B3" })
34662
34654
  }
34663
34655
  ),
34664
- /* @__PURE__ */ C("div", { className: "flex gap-2 items-center", children: [
34665
- m,
34666
- /* @__PURE__ */ l(oe, { size: "small", appearance: "body", variant: "medium", className: "whitespace-nowrap", children: e })
34667
- ] }),
34668
- /* @__PURE__ */ l(oe, { size: "extra-small", appearance: "title", variant: "medium", className: "ml-1", children: c }),
34669
- v,
34670
- /* @__PURE__ */ l("span", { children: a === i && !o && /* @__PURE__ */ l(pr, { variant: "ghost", children: /* @__PURE__ */ l(Q_, { size: 16, className: "ml-[8px]" }) }) })
34671
- ] })
34672
- ] }),
34673
- /* @__PURE__ */ l(_N, { sx: { fontSize: 18 }, className: q("text-neutral-600 dark:text-neutral-400", n ? "rotate-90" : "-rotate-90") })
34674
- ]
34675
- }
34676
- ),
34677
- n ? /* @__PURE__ */ l(at.div, { className: ` ${!d && "p-4"} ${x}`, children: t }) : null
34678
- ] });
34656
+ /* @__PURE__ */ C("div", { className: "flex items-center gap-1 w-full", children: [
34657
+ u && /* @__PURE__ */ l(
34658
+ EW,
34659
+ {
34660
+ isChecked: A,
34661
+ onSelect: (k) => {
34662
+ k.stopPropagation(), u();
34663
+ },
34664
+ className: "h-4 w-4 accent-[#366FE3]"
34665
+ }
34666
+ ),
34667
+ /* @__PURE__ */ C("div", { className: "flex gap-2 items-center", children: [
34668
+ m,
34669
+ /* @__PURE__ */ l(oe, { size: "small", appearance: "body", variant: "medium", className: "whitespace-nowrap", children: e })
34670
+ ] }),
34671
+ /* @__PURE__ */ l(oe, { size: "extra-small", appearance: "title", variant: "medium", className: "ml-1", children: c }),
34672
+ v,
34673
+ /* @__PURE__ */ l("span", { children: a === i && !o && /* @__PURE__ */ l(pr, { variant: "ghost", children: /* @__PURE__ */ l(Q_, { size: 16, className: "ml-[8px]" }) }) })
34674
+ ] })
34675
+ ] }),
34676
+ /* @__PURE__ */ l(
34677
+ _N,
34678
+ {
34679
+ sx: { fontSize: 18 },
34680
+ className: q(
34681
+ "text-neutral-600 dark:text-neutral-400",
34682
+ n ? "rotate-90" : "-rotate-90",
34683
+ S && "transition-transform duration-300 ease-in-out"
34684
+ )
34685
+ }
34686
+ )
34687
+ ]
34688
+ }
34689
+ ),
34690
+ S ? /* @__PURE__ */ l(
34691
+ at.div,
34692
+ {
34693
+ initial: !1,
34694
+ animate: {
34695
+ height: n ? "auto" : 0
34696
+ },
34697
+ transition: {
34698
+ duration: 0.3,
34699
+ ease: [0.4, 0, 0.2, 1]
34700
+ },
34701
+ style: { overflow: "hidden" },
34702
+ children: /* @__PURE__ */ l("div", { className: T, children: t })
34703
+ }
34704
+ ) : n ? /* @__PURE__ */ l("div", { className: T, children: t }) : null
34705
+ ] });
34706
+ };
34679
34707
  wj.displayName = "Accordion";
34680
34708
  const Oj = ({
34681
34709
  steps: t,
@@ -36549,7 +36577,7 @@ const iG = ({ isOpen: t, onClose: e, anchorEl: r, placement: n = "right-start",
36549
36577
  "div",
36550
36578
  {
36551
36579
  ref: j,
36552
- className: "bg-white dark:bg-black-800 shadow rounded-lg border border-neutral-200 dark:border-black-700",
36580
+ className: "bg-white dark:bg-black-800 shadow rounded-lg border border-neutral-200 dark:border-black-700 min-w-[280px]",
36553
36581
  onMouseEnter: () => {
36554
36582
  B.current && clearTimeout(B.current);
36555
36583
  },
@@ -77064,11 +77092,13 @@ const WAe = ({
77064
77092
  }, [e, k, T]);
77065
77093
  const w = q({
77066
77094
  "bg-primary-50 dark:bg-primary-900": p,
77067
- "bg-neutral-100 dark:bg-black-600": r === e && !p,
77095
+ "bg-neutral-100 dark:bg-black-600": r === e && !p && !(s || d?.is_deleted) && !(A || d?.is_added),
77096
+ "bg-error-200 dark:bg-error-900": r === e && !p && (s || d?.is_deleted),
77097
+ "bg-success-100 dark:bg-success-800": r === e && !p && (A || d?.is_added),
77068
77098
  "bg-primary-50 dark:bg-black-700": !h && !a && c && r !== e && !p,
77069
77099
  "bg-warning-50 dark:bg-black-500": (h || i || o || d?.is_row_modified) && r !== e && !p,
77070
77100
  "bg-error-100 dark:bg-error-975": (s || d?.is_deleted) && r !== e && !p,
77071
- "bg-success-50": (A || d?.is_added) && r !== e && !p,
77101
+ "bg-success-50 dark:bg-success-900": (A || d?.is_added) && r !== e && !p,
77072
77102
  "bg-primary-50": u && !p,
77073
77103
  ...f && !p && { [f]: !0 }
77074
77104
  });
@@ -77818,7 +77848,9 @@ const t7 = (t) => {
77818
77848
  nt.current && clearTimeout(nt.current), Ve ? He(!0) : nt.current = setTimeout(() => He(!1), 200);
77819
77849
  }, []), $e = q({
77820
77850
  "bg-amber-100 dark:bg-amber-900/30": D,
77821
- "bg-neutral-100 dark:bg-black-600": a === e && !g && !D,
77851
+ "bg-neutral-100 dark:bg-black-600": a === e && !g && !D && !(h || A?.is_deleted) && !(p || A?.is_added),
77852
+ "bg-error-200 dark:bg-error-900": a === e && !g && !D && (h || A?.is_deleted),
77853
+ "bg-success-100 dark:bg-success-800": a === e && !g && !D && (p || A?.is_added),
77822
77854
  "bg-primary-50 dark:bg-black-700": !_ && !c && I && !N && a !== e && !g && !D,
77823
77855
  "bg-warning-50 dark:bg-black-500": (_ || d || f || A?.is_row_modified) && !N && a !== e && !g && !D,
77824
77856
  "bg-error-100 dark:bg-error-975": (h || A?.is_deleted) && !N && a !== e && !g && !D,
@@ -78020,11 +78052,13 @@ const t7 = (t) => {
78020
78052
  }, 300);
78021
78053
  }, N = q({
78022
78054
  "bg-primary-50 dark:bg-primary-900": o,
78023
- "bg-neutral-100 dark:bg-black-600": i === t && !o,
78055
+ "bg-neutral-100 dark:bg-black-600": i === t && !o && !c && !d,
78056
+ "bg-error-200 dark:bg-error-900": i === t && !o && c,
78057
+ "bg-success-100 dark:bg-success-800": i === t && !o && d,
78024
78058
  "bg-primary-50 dark:bg-black-700": !f && !s && h && i !== t && !o,
78025
78059
  "bg-warning-50 dark:bg-black-500": (f || A || u) && i !== t && !o,
78026
78060
  "bg-error-100 dark:bg-error-975": c && i !== t && !o,
78027
- "bg-success-50": d && i !== t && !o
78061
+ "bg-success-50 dark:bg-success-900": d && i !== t && !o
78028
78062
  });
78029
78063
  return /* @__PURE__ */ C("td", { className: `min-w-[28px] w-[28px] sticky left-0 z-30 ${N || "bg-white dark:bg-black-800"} h-[39px]`, children: [
78030
78064
  /* @__PURE__ */ l("div", { ref: S, className: "w-full h-[39px] flex items-center justify-center cursor-pointer", onMouseEnter: w, onMouseLeave: O, children: a && /* @__PURE__ */ l("div", { className: "w-5 h-5 rounded-full bg-warning-100 dark:bg-warning-900 flex items-center justify-center shadow-sm border border-warning-200 dark:border-warning-700", children: /* @__PURE__ */ l(r_, { sx: { fontSize: 14 }, className: "text-warning-600 dark:text-warning-400" }) }) }),
@@ -78085,7 +78119,9 @@ const t7 = (t) => {
78085
78119
  className: q(
78086
78120
  "absolute top-0 left-0 flex items-center justify-center w-full z-20",
78087
78121
  { [S]: f !== d || v },
78088
- { "bg-neutral-100 dark:bg-black-600": f === d && !v },
78122
+ { "bg-neutral-100 dark:bg-black-600": f === d && !v && !(s || A?.is_deleted) && !(u || A?.is_added) },
78123
+ { "bg-error-200 dark:bg-error-900": f === d && !v && (s || A?.is_deleted) },
78124
+ { "bg-success-100 dark:bg-success-800": f === d && !v && (u || A?.is_added) },
78089
78125
  g && "pointer-events-none"
78090
78126
  ),
78091
78127
  children: e(c, r)
@@ -78118,11 +78154,13 @@ const t7 = (t) => {
78118
78154
  }) => {
78119
78155
  const T = vn(), k = q({
78120
78156
  "bg-primary-50 dark:bg-primary-900": y,
78121
- "bg-neutral-100 dark:bg-black-600": n === t && !y,
78157
+ "bg-neutral-100 dark:bg-black-600": n === t && !y && !(u || A?.is_deleted) && !(c || A?.is_added),
78158
+ "bg-error-200 dark:bg-error-900": n === t && !y && (u || A?.is_deleted),
78159
+ "bg-success-100 dark:bg-success-800": n === t && !y && (c || A?.is_added),
78122
78160
  "bg-primary-50 dark:bg-black-700": !g && !a && i && n !== t && !y,
78123
78161
  "bg-warning-50 dark:bg-black-500": (g || o || s || A?.is_row_modified) && n !== t && !y,
78124
78162
  "bg-error-100 dark:bg-error-975": (u || A?.is_deleted) && n !== t && !y,
78125
- "bg-success-50": (c || A?.is_added) && n !== t && !y,
78163
+ "bg-success-50 dark:bg-success-900": (c || A?.is_added) && n !== t && !y,
78126
78164
  "bg-primary-50": d && !y,
78127
78165
  ...m && !y && { [m]: !0 }
78128
78166
  }), w = de(() => v(t), [v, t]), O = de(() => v(null), [v]), { asyncRowOptionsFilter: N, disableOptionsForRowIndex: _ = null, fieldOperationLoading: R } = cr(ea), D = T?.t?.("Save or cancel pending changes first") ?? "Save or cancel pending changes first", L = T?.getRowOptionsDropdownProps?.(), P = !!R, [z, H] = X(!!N), [I, U] = X(e), B = e ? e.filter((Q) => Q.isVisible !== !1).length : 0, j = async (Q) => {