@caseparts-org/caseblocks 0.0.158 → 0.0.159

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.
@@ -1 +1 @@
1
- ._error_lchwg_1{display:flex;flex-direction:column;align-items:center;justify-content:center;max-width:100%;overflow-x:hidden;gap:var(--spacing-spacing-2xs);padding:var(--spacing-spacing-2xs) var(--spacing-spacing-1xs);border:1px solid var(--border-border-error-warning);border-radius:var(--border-radius-sm);background-color:color-mix(in srgb,var(--color-alerts-error-warning) 8%,transparent);transition:all .3s ease-in}._variantError_lchwg_16{border-color:var(--border-border-error-warning);background-color:color-mix(in srgb,var(--color-alerts-error-warning) 8%,transparent)}._variantWarning_lchwg_21{border-color:var(--border-border-warning);background-color:color-mix(in srgb,var(--color-alerts-warning) 8%,transparent)}._variantDefault_lchwg_26{border-color:var(--border-border-primary);background-color:var(--surface-surface-primary)}._errorHeader_lchwg_31{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:var(--spacing-spacing-2xs)}._errorHeaderContent_lchwg_40{min-width:0;display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-2xs)}._detailsToggleButton_lchwg_48{width:1.5rem;height:1.5rem;border:none;border-radius:var(--border-radius-xs);background:transparent;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}._detailsToggleButton_lchwg_48:hover,._detailsToggleButton_lchwg_48:focus-visible{background-color:var(--surface-surface-secondary)}._detailsChevron_lchwg_66{display:inline-flex;align-items:center;justify-content:center;transform:rotate(0);transition:transform .2s ease}._detailsChevronOpen_lchwg_74{transform:rotate(180deg)}._errorDetails_lchwg_78{position:relative;padding:var(--spacing-spacing-2xs);border:1px solid var(--border-border-primary);background-color:var(--surface-surface-primary);border-radius:var(--border-radius-sm);overflow:hidden;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:break-word;overflow-wrap:anywhere;font-family:monospace;width:100%;transition:max-height .28s ease,opacity .2s ease}._errorDetailsContent_lchwg_94{padding-top:var(--spacing-spacing-3xs);padding-right:2rem}._copyButton_lchwg_99{position:absolute;top:var(--spacing-spacing-3xs);right:var(--spacing-spacing-3xs);width:1.5rem;height:1.5rem;border:none;border-radius:var(--border-radius-xs);background:transparent;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}._copyIcon_lchwg_114,._checkIcon_lchwg_115{position:absolute;display:inline-flex;align-items:center;justify-content:center}._hiddenIcon_lchwg_122{opacity:0;pointer-events:none}._copyButton_lchwg_99:hover,._copyButton_lchwg_99:focus-visible{background-color:var(--surface-surface-secondary)}
1
+ ._error_9tpem_1{display:flex;flex-direction:column;align-items:center;justify-content:center;max-width:100%;overflow-x:hidden;gap:var(--spacing-spacing-2xs);padding:var(--spacing-spacing-2xs) var(--spacing-spacing-1xs);border:1px solid var(--border-border-error-warning);border-radius:var(--border-radius-sm);background-color:color-mix(in srgb,var(--color-alerts-error-warning) 8%,transparent);transition:all .3s ease-in}._variantError_9tpem_16{border-color:var(--border-border-error-warning);background-color:color-mix(in srgb,var(--color-alerts-error-warning) 8%,transparent)}._variantWarning_9tpem_21{border-color:var(--border-border-warning);background-color:color-mix(in srgb,var(--color-alerts-warning) 8%,transparent)}._variantDefault_9tpem_26{border-color:var(--border-border-primary);background-color:var(--surface-surface-primary)}._errorHeader_9tpem_31{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:var(--spacing-spacing-2xs)}._errorHeaderContent_9tpem_40{min-width:0;display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-2xs)}._detailsToggleButton_9tpem_48{width:1.5rem;height:1.5rem;border:none;border-radius:var(--border-radius-xs);background:transparent;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}._detailsToggleButton_9tpem_48:hover,._detailsToggleButton_9tpem_48:focus-visible{background-color:var(--surface-surface-secondary)}._detailsChevron_9tpem_66{display:inline-flex;align-items:center;justify-content:center;transform:rotate(0);transition:transform .2s ease}._detailsChevronOpen_9tpem_74{transform:rotate(180deg)}._errorDetails_9tpem_78{position:relative;padding:var(--spacing-spacing-2xs);border:1px solid var(--border-border-primary);background-color:var(--surface-surface-primary);border-radius:var(--border-radius-sm);overflow:hidden;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:break-word;overflow-wrap:anywhere;font-family:monospace!important;width:100%;transition:max-height .28s ease,opacity .2s ease}._errorDetailsContent_9tpem_94{padding-top:var(--spacing-spacing-3xs);padding-right:2rem}._copyButton_9tpem_99{position:absolute;top:var(--spacing-spacing-3xs);right:var(--spacing-spacing-3xs);width:1.5rem;height:1.5rem;border:none;border-radius:var(--border-radius-xs);background:transparent;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}._copyIcon_9tpem_114,._checkIcon_9tpem_115{position:absolute;display:inline-flex;align-items:center;justify-content:center}._hiddenIcon_9tpem_122{opacity:0;pointer-events:none}._copyButton_9tpem_99:hover,._copyButton_9tpem_99:focus-visible{background-color:var(--surface-surface-secondary)}
@@ -1,9 +1,9 @@
1
- import { jsx as r, jsxs as h } from "react/jsx-runtime";
2
- import m, { useState as I, useEffect as N } from "react";
3
- import { c as f } from "../../clsx-OuTLNxxd.js";
4
- import { Icon as p } from "../../atoms/Icon/Icon.js";
1
+ import { jsx as r, jsxs as p } from "react/jsx-runtime";
2
+ import h, { useState as w, useEffect as N } from "react";
3
+ import { c as m } from "../../clsx-OuTLNxxd.js";
4
+ import { Icon as _ } from "../../atoms/Icon/Icon.js";
5
5
  import { Text as q } from "../../atoms/Text/Text.js";
6
- import '../../assets/Error.css';const F = "_error_lchwg_1", U = "_variantError_lchwg_16", Y = "_variantWarning_lchwg_21", G = "_variantDefault_lchwg_26", J = "_errorHeader_lchwg_31", P = "_errorHeaderContent_lchwg_40", Q = "_detailsToggleButton_lchwg_48", X = "_detailsChevron_lchwg_66", Z = "_detailsChevronOpen_lchwg_74", ee = "_errorDetails_lchwg_78", te = "_errorDetailsContent_lchwg_94", re = "_copyButton_lchwg_99", ne = "_copyIcon_lchwg_114", oe = "_checkIcon_lchwg_115", ae = "_hiddenIcon_lchwg_122", t = {
6
+ import '../../assets/Error.css';const F = "_error_9tpem_1", U = "_variantError_9tpem_16", Y = "_variantWarning_9tpem_21", G = "_variantDefault_9tpem_26", J = "_errorHeader_9tpem_31", P = "_errorHeaderContent_9tpem_40", Q = "_detailsToggleButton_9tpem_48", X = "_detailsChevron_9tpem_66", Z = "_detailsChevronOpen_9tpem_74", ee = "_errorDetails_9tpem_78", te = "_errorDetailsContent_9tpem_94", re = "_copyButton_9tpem_99", ne = "_copyIcon_9tpem_114", oe = "_checkIcon_9tpem_115", ae = "_hiddenIcon_9tpem_122", t = {
7
7
  error: F,
8
8
  variantError: U,
9
9
  variantWarning: Y,
@@ -24,7 +24,7 @@ function E({
24
24
  as: n,
25
25
  size: s = "md",
26
26
  variant: i = "body",
27
- weight: g = "regular",
27
+ weight: y = "regular",
28
28
  colorToken: l = "inherit",
29
29
  hideAt: a,
30
30
  className: b,
@@ -36,7 +36,7 @@ function E({
36
36
  as: n,
37
37
  size: s,
38
38
  variant: i,
39
- weight: g,
39
+ weight: y,
40
40
  colorToken: l,
41
41
  hideAt: a,
42
42
  className: b,
@@ -48,68 +48,68 @@ function O({ children: n, hide: s, ...i }) {
48
48
  return s ? null : /* @__PURE__ */ r("div", { ...i, children: n });
49
49
  }
50
50
  function A(n) {
51
- return m.isValidElement(n) && n.type === E;
51
+ return h.isValidElement(n) && n.type === E;
52
52
  }
53
53
  function B(n) {
54
- return m.isValidElement(n) && n.type === O;
54
+ return h.isValidElement(n) && n.type === O;
55
55
  }
56
56
  function se({
57
57
  isVisible: n = !0,
58
58
  className: s,
59
59
  children: i,
60
- hideDetails: g = !1,
60
+ hideDetails: y = !1,
61
61
  detailsMaxHeight: l = 300,
62
62
  variant: a = "error"
63
63
  }) {
64
- const [o, w] = I(!1), [y, C] = I(!1), [c, v] = I(!1), D = m.Children.toArray(i), k = D.find(
64
+ const [o, g] = w(!1), [C, v] = w(!1), [c, D] = w(!1), T = h.Children.toArray(i), k = T.find(
65
65
  (e) => B(e) && !e.props.hide
66
- ), x = D.find(A), H = D.filter(
66
+ ), x = T.find(A), H = T.filter(
67
67
  (e) => !B(e) && !A(e)
68
- ), S = x ? /* @__PURE__ */ r(E, { ...x.props }) : H.length > 0 ? H : null, _ = g || !k ? null : k.props, d = _ == null ? void 0 : _.children, u = d != null && d !== !1, {
68
+ ), S = x ? /* @__PURE__ */ r(E, { ...x.props }) : H.length > 0 ? H : null, f = y || !k ? null : k.props, d = f == null ? void 0 : f.children, u = d != null && d !== !1, {
69
69
  children: ie,
70
70
  hide: le,
71
71
  className: M,
72
72
  style: z,
73
73
  ...R
74
- } = _ ?? {};
74
+ } = f ?? {};
75
75
  if (N(() => {
76
- u || (w(!1), C(!1));
76
+ u || (g(!1), v(!1));
77
77
  }, [u]), N(() => {
78
- if (o || !y)
78
+ if (o || !C)
79
79
  return;
80
- const e = window.setTimeout(() => C(!1), 280);
80
+ const e = window.setTimeout(() => v(!1), 280);
81
81
  return () => window.clearTimeout(e);
82
- }, [o, y]), N(() => {
82
+ }, [o, C]), N(() => {
83
83
  if (!c)
84
84
  return;
85
- const e = window.setTimeout(() => v(!1), 1500);
85
+ const e = window.setTimeout(() => D(!1), 1500);
86
86
  return () => window.clearTimeout(e);
87
87
  }, [c]), !n || !S)
88
88
  return null;
89
- const j = t[`variant${a[0].toUpperCase()}${a.slice(1)}`], K = a === "warning" ? "warning" : a === "default" ? "default" : "error-warning", V = typeof l == "number" ? `${l}px` : l, T = (e) => e == null || typeof e == "boolean" ? "" : typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map((L) => T(L)).join("") : m.isValidElement(e) ? T(e.props.children) : "", W = async () => {
89
+ const j = t[`variant${a[0].toUpperCase()}${a.slice(1)}`], K = a === "warning" ? "warning" : a === "default" ? "default" : "error-warning", V = typeof l == "number" ? `${l}px` : l, I = (e) => e == null || typeof e == "boolean" ? "" : typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map((L) => I(L)).join("") : h.isValidElement(e) ? I(e.props.children) : "", W = async () => {
90
90
  if (!u)
91
91
  return;
92
- const e = T(d);
92
+ const e = I(d);
93
93
  if (e.trim())
94
94
  try {
95
- await navigator.clipboard.writeText(e), v(!0);
95
+ await navigator.clipboard.writeText(e), D(!0);
96
96
  } catch {
97
- v(!1);
97
+ D(!1);
98
98
  }
99
99
  }, $ = () => {
100
100
  if (o) {
101
- w(!1);
101
+ g(!1);
102
102
  return;
103
103
  }
104
- C(!0), window.requestAnimationFrame(() => {
105
- w(!0);
104
+ v(!0), window.requestAnimationFrame(() => {
105
+ g(!0);
106
106
  });
107
107
  };
108
- return /* @__PURE__ */ h("div", { className: f(t.error, j, s), children: [
109
- /* @__PURE__ */ h("div", { className: t.errorHeader, children: [
110
- /* @__PURE__ */ h("div", { className: t.errorHeaderContent, children: [
108
+ return /* @__PURE__ */ p("div", { className: m(t.error, j, s), children: [
109
+ /* @__PURE__ */ p("div", { className: t.errorHeader, children: [
110
+ /* @__PURE__ */ p("div", { className: t.errorHeaderContent, children: [
111
111
  /* @__PURE__ */ r(
112
- p,
112
+ _,
113
113
  {
114
114
  iconKey: "fa-solid fa-triangle-exclamation",
115
115
  size: "md",
@@ -126,14 +126,14 @@ function se({
126
126
  "aria-label": o ? "Hide details" : "Show details",
127
127
  title: o ? "Hide details" : "Show details",
128
128
  onClick: $,
129
- children: /* @__PURE__ */ r("span", { className: f(t.detailsChevron, o && t.detailsChevronOpen), children: /* @__PURE__ */ r(p, { iconKey: "fa-light fa-chevron-down", size: "sm", colorToken: "default" }) })
129
+ children: /* @__PURE__ */ r("span", { className: m(t.detailsChevron, o && t.detailsChevronOpen), children: /* @__PURE__ */ r(_, { iconKey: "fa-light fa-chevron-down", size: "sm", colorToken: "default" }) })
130
130
  }
131
131
  )
132
132
  ] }),
133
- u && y && /* @__PURE__ */ h(
133
+ u && C && /* @__PURE__ */ p(
134
134
  "div",
135
135
  {
136
- className: f(t.errorDetails, M),
136
+ className: m(t.errorDetails, M),
137
137
  style: {
138
138
  ...z,
139
139
  maxHeight: o ? V : "0px",
@@ -142,7 +142,7 @@ function se({
142
142
  },
143
143
  ...R,
144
144
  children: [
145
- /* @__PURE__ */ h(
145
+ /* @__PURE__ */ p(
146
146
  "button",
147
147
  {
148
148
  type: "button",
@@ -151,8 +151,8 @@ function se({
151
151
  title: c ? "Copied" : "Copy details",
152
152
  onClick: W,
153
153
  children: [
154
- /* @__PURE__ */ r("span", { className: f(t.copyIcon, c && t.hiddenIcon), children: /* @__PURE__ */ r(p, { iconKey: "fa-regular fa-copy", size: "sm", colorToken: "default" }) }),
155
- /* @__PURE__ */ r("span", { className: f(t.checkIcon, !c && t.hiddenIcon), children: /* @__PURE__ */ r(p, { iconKey: "fa-regular fa-check", size: "sm", colorToken: "default" }) })
154
+ /* @__PURE__ */ r("span", { className: m(t.copyIcon, c && t.hiddenIcon), children: /* @__PURE__ */ r(_, { iconKey: "fa-regular fa-copy", size: "sm", colorToken: "default" }) }),
155
+ /* @__PURE__ */ r("span", { className: m(t.checkIcon, !c && t.hiddenIcon), children: /* @__PURE__ */ r(_, { iconKey: "fa-regular fa-check", size: "sm", colorToken: "default" }) })
156
156
  ]
157
157
  }
158
158
  ),
@@ -162,10 +162,10 @@ function se({
162
162
  )
163
163
  ] });
164
164
  }
165
- const _e = Object.assign(se, {
165
+ const fe = Object.assign(se, {
166
166
  Message: E,
167
167
  Details: O
168
168
  });
169
169
  export {
170
- _e as Error
170
+ fe as Error
171
171
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.158",
4
+ "version": "0.0.159",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",