@lax-wp/design-system 0.8.19 → 0.8.21

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
@@ -158,7 +158,7 @@ const a9 = ({ isConditional: A }) => /* @__PURE__ */ l("span", { className: `${A
158
158
  variant: "medium",
159
159
  size: "extra-small",
160
160
  appearance: "subtitle",
161
- className: "flex gap-1",
161
+ className: "flex",
162
162
  children: [
163
163
  A,
164
164
  e ? /* @__PURE__ */ l(a9, { isConditional: t }) : null
@@ -12693,30 +12693,30 @@ const KM = ({
12693
12693
  const Z = typeof t == "string" && Y7(t);
12694
12694
  if (p && typeof t == "object")
12695
12695
  return t;
12696
- if (t || n === "boolean" && t === 0 || n === "currency" && Number(t) >= 0) {
12696
+ if (t || n?.toLowerCase() === "boolean" && t === 0 || n?.toLowerCase() === "currency" && Number(t) >= 0) {
12697
12697
  if ((t === !0 || t === "True") && !m)
12698
12698
  return "Yes";
12699
12699
  if ((t === !1 || t === "False") && !m)
12700
12700
  return "No";
12701
- if (n === "url")
12701
+ if (n?.toLowerCase() === "url")
12702
12702
  return /* @__PURE__ */ l("a", { href: t, className: "text-primary-600 truncate", children: t });
12703
- if (n === "boolean")
12703
+ if (n?.toLowerCase() === "boolean")
12704
12704
  return sh(t);
12705
- if (n === "currency")
12705
+ if (n?.toLowerCase() === "currency")
12706
12706
  return Ga(t, o?.currency_code) || "-";
12707
- if (n === "datetime") {
12707
+ if (n?.toLowerCase() === "datetime") {
12708
12708
  const re = typeof t == "string" && t.includes("Z") ? t.replace(/\.000Z$/, "Z") : t;
12709
12709
  return ks(re, {
12710
12710
  skipTimezone: !1,
12711
12711
  withTime: !0
12712
12712
  });
12713
- } else if (n === "date" || Z) {
12713
+ } else if (n?.toLowerCase() === "date" || Z) {
12714
12714
  const re = typeof t == "string" && t.includes("Z") ? t.replace(/\.000Z$/, "Z") : t;
12715
12715
  return ks(re, {
12716
12716
  skipTimezone: !0,
12717
12717
  withTime: !1
12718
12718
  });
12719
- } else return n === "percentage" ? `${t}%` : typeof t == "string" && t.length > 100 ? /* @__PURE__ */ k("p", { children: [
12719
+ } else return n?.toLowerCase() === "percentage" ? `${t}%` : typeof t == "string" && t.length > 100 ? /* @__PURE__ */ k("p", { children: [
12720
12720
  t.slice(0, N ? 100 : t.length),
12721
12721
  N ? "... " : " ",
12722
12722
  /* @__PURE__ */ l(
@@ -12823,7 +12823,7 @@ const KM = ({
12823
12823
  /* @__PURE__ */ l("span", { className: "line-through", children: h }),
12824
12824
  /* @__PURE__ */ l("span", { children: K() })
12825
12825
  ] }) : c || u ? /* @__PURE__ */ l("mark", { className: q("rounded-md py-0.5 px-1", Ae()), children: K() }) : K(),
12826
- n === "currency" && y !== 0 && y !== void 0 && y !== null && /* @__PURE__ */ k(
12826
+ n?.toLowerCase() === "currency" && y !== 0 && y !== void 0 && y !== null && /* @__PURE__ */ k(
12827
12827
  rt.span,
12828
12828
  {
12829
12829
  initial: { opacity: 0, y: 2 },
@@ -12871,13 +12871,13 @@ const KM = ({
12871
12871
  size: "extra-small",
12872
12872
  className: "pt-0.5",
12873
12873
  appearance: "body",
12874
- children: /* @__PURE__ */ l("mark", { className: "rounded-md py-0.5 px-1 bg-error-100", children: /* @__PURE__ */ l("del", { children: h || n === "boolean" && h === "0" ? h === "True" ? "Yes" : h === "False" ? "No" : n === "boolean" ? sh(h) : n === "currency" ? Ga(h, o?.currency_code) : n === "date" ? ks(h, {
12874
+ children: /* @__PURE__ */ l("mark", { className: "rounded-md py-0.5 px-1 bg-error-100", children: /* @__PURE__ */ l("del", { children: h || n?.toLowerCase() === "boolean" && h === "0" ? h === "True" ? "Yes" : h === "False" ? "No" : n?.toLowerCase() === "boolean" ? sh(h) : n?.toLowerCase() === "currency" ? Ga(h, o?.currency_code) : n?.toLowerCase() === "date" ? ks(h, {
12875
12875
  skipTimezone: !0,
12876
12876
  withTime: !1
12877
- }) : n === "datetime" ? ks(h, {
12877
+ }) : n?.toLowerCase() === "datetime" ? ks(h, {
12878
12878
  skipTimezone: !0,
12879
12879
  withTime: !0
12880
- }) : n === "percentage" ? `${h}%` : h.length > 100 ? /* @__PURE__ */ k("p", { children: [
12880
+ }) : n?.toLowerCase() === "percentage" ? `${h}%` : h.length > 100 ? /* @__PURE__ */ k("p", { children: [
12881
12881
  h.slice(0, N ? 100 : h.length),
12882
12882
  N ? "... " : " ",
12883
12883
  /* @__PURE__ */ l(
@@ -13411,6 +13411,7 @@ const l8 = {
13411
13411
  }, y = (x) => {
13412
13412
  x.preventDefault(), x.stopPropagation(), p || n?.(x);
13413
13413
  }, v = Oe(() => (x) => {
13414
+ if (i === "body") return document.body;
13414
13415
  if (i) {
13415
13416
  const w = document.getElementById(i);
13416
13417
  if (w) return w;