@salilvnair/dui 1.0.10 → 1.0.11

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.js CHANGED
@@ -21845,21 +21845,22 @@ function yS({
21845
21845
  slowAfterSeconds: l = 8,
21846
21846
  slowMessage: c,
21847
21847
  action: s,
21848
- hints: d,
21849
- className: u = "",
21850
- style: p
21848
+ messageWidth: d,
21849
+ hints: u,
21850
+ className: p = "",
21851
+ style: g
21851
21852
  }) {
21852
- const [g, f] = N(!1);
21853
+ const [f, h] = N(!1);
21853
21854
  U(() => {
21854
21855
  if (!l) return;
21855
- const y = window.setTimeout(() => f(!0), l * 1e3);
21856
- return () => window.clearTimeout(y);
21856
+ const v = window.setTimeout(() => h(!0), l * 1e3);
21857
+ return () => window.clearTimeout(v);
21857
21858
  }, [l]);
21858
- const h = a ?? (i ? 40 : 54), m = Math.round(h * 0.3), b = g && c ? c : n;
21859
+ const m = a ?? (i ? 40 : 54), b = Math.round(m * 0.3), y = f && c ? c : n;
21859
21860
  return /* @__PURE__ */ x(
21860
21861
  "div",
21861
21862
  {
21862
- className: u,
21863
+ className: p,
21863
21864
  role: "status",
21864
21865
  "aria-busy": "true",
21865
21866
  "aria-live": "polite",
@@ -21870,7 +21871,7 @@ function yS({
21870
21871
  gap: i ? 8 : 10,
21871
21872
  padding: i ? "18px 16px" : "34px 26px",
21872
21873
  textAlign: "center",
21873
- ...p
21874
+ ...g
21874
21875
  },
21875
21876
  children: [
21876
21877
  t && /* @__PURE__ */ x(
@@ -21880,15 +21881,15 @@ function yS({
21880
21881
  style: {
21881
21882
  display: "grid",
21882
21883
  placeItems: "center",
21883
- width: h,
21884
- height: h,
21885
- borderRadius: m,
21884
+ width: m,
21885
+ height: m,
21886
+ borderRadius: b,
21886
21887
  color: r,
21887
21888
  background: `color-mix(in srgb, ${r} 11%, transparent)`,
21888
21889
  border: `1px solid color-mix(in srgb, ${r} 22%, transparent)`
21889
21890
  },
21890
21891
  children: [
21891
- /* @__PURE__ */ o("span", { className: "dui_loading-state__ripple", style: { borderRadius: m } }),
21892
+ /* @__PURE__ */ o("span", { className: "dui_loading-state__ripple", style: { borderRadius: b } }),
21892
21893
  t
21893
21894
  ]
21894
21895
  }
@@ -21902,16 +21903,16 @@ function yS({
21902
21903
  color: "var(--color-text-primary)"
21903
21904
  }, children: [
21904
21905
  e,
21905
- /* @__PURE__ */ o("span", { "aria-hidden": "true", style: { display: "inline-flex", marginLeft: 1 }, children: [0, 1, 2].map((y) => /* @__PURE__ */ o("span", { className: "dui_loading-state__dot", style: { color: r }, children: "." }, y)) })
21906
+ /* @__PURE__ */ o("span", { "aria-hidden": "true", style: { display: "inline-flex", marginLeft: 1 }, children: [0, 1, 2].map((v) => /* @__PURE__ */ o("span", { className: "dui_loading-state__dot", style: { color: r }, children: "." }, v)) })
21906
21907
  ] }),
21907
- b && /* @__PURE__ */ o("p", { style: {
21908
+ y && /* @__PURE__ */ o("p", { style: {
21908
21909
  margin: 0,
21909
- maxWidth: "52ch",
21910
+ maxWidth: d ?? "52ch",
21910
21911
  fontSize: i ? 11 : 11.5,
21911
21912
  lineHeight: 1.6,
21912
- color: g ? "var(--color-warning)" : "var(--color-text-muted)"
21913
- }, children: b }),
21914
- d && d.length > 0 && /* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: 5, marginTop: 2 }, children: d.map((y, v) => /* @__PURE__ */ x("div", { style: {
21913
+ color: f ? "var(--color-warning)" : "var(--color-text-muted)"
21914
+ }, children: y }),
21915
+ u && u.length > 0 && /* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: 5, marginTop: 2 }, children: u.map((v, k) => /* @__PURE__ */ x("div", { style: {
21915
21916
  display: "flex",
21916
21917
  alignItems: "flex-start",
21917
21918
  gap: 8,
@@ -21920,10 +21921,10 @@ function yS({
21920
21921
  color: "var(--color-text-muted)",
21921
21922
  textAlign: "left"
21922
21923
  }, children: [
21923
- /* @__PURE__ */ o("span", { style: { color: r, flexShrink: 0, marginTop: 1 }, children: y.key }),
21924
- /* @__PURE__ */ o("span", { children: y.text })
21925
- ] }, v)) }),
21926
- s && g && /* @__PURE__ */ o(
21924
+ /* @__PURE__ */ o("span", { style: { color: r, flexShrink: 0, marginTop: 1 }, children: v.key }),
21925
+ /* @__PURE__ */ o("span", { children: v.text })
21926
+ ] }, k)) }),
21927
+ s && f && /* @__PURE__ */ o(
21927
21928
  "button",
21928
21929
  {
21929
21930
  type: "button",