@alfadocs/ui-kit 0.39.0 → 0.40.0

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.
@@ -3,7 +3,7 @@ import { forwardRef as ie, useId as oe, useMemo as M, useRef as k, useState as b
3
3
  import { c as i } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as ce } from "react-i18next";
5
5
  import { P as le } from "./pdf-viewer-Cy6Ul3hZ.js";
6
- import { S as ge } from "./signature-capture-BRzCklg4.js";
6
+ import { S as ge } from "./signature-capture-DoiBd6i3.js";
7
7
  import { u as me } from "./registry-nPAVE19X.js";
8
8
  import { C as O } from "./circle-check-9AeSgJD_.js";
9
9
  const ue = {
@@ -78,14 +78,15 @@ const ue = {
78
78
  ].join(" ")
79
79
  ), xe = i(
80
80
  [
81
- "ds:inline-flex ds:items-center ds:justify-center ds:self-start",
81
+ "ds:inline-flex ds:inline-size-full ds:items-center ds:justify-center",
82
82
  "ds:min-block-size-[var(--min-target-size)]",
83
83
  "ds:min-inline-size-[var(--min-target-size)]",
84
84
  "ds:gap-[var(--spacing-xs)]",
85
85
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
86
+ "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]",
86
87
  "ds:rounded-[var(--radius-sm)]",
87
88
  "ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]",
88
- "ds:text-[length:var(--font-size-sm)] ds:font-medium",
89
+ "ds:text-[length:var(--font-size-base)] ds:font-medium",
89
90
  "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
90
91
  "ds:hover:bg-[var(--primary-hover)]",
91
92
  "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
@@ -133,9 +134,9 @@ const Se = ie(
133
134
  ariaLabel: N,
134
135
  className: G
135
136
  }, J) => {
136
- const { t: s, i18n: V } = ce(), z = oe(), u = M(
137
- () => `sign-doc-${z.replace(/[^a-zA-Z0-9-_]/g, "")}`,
138
- [z]
137
+ const { t: s, i18n: z } = ce(), V = oe(), u = M(
138
+ () => `sign-doc-${V.replace(/[^a-zA-Z0-9-_]/g, "")}`,
139
+ [V]
139
140
  ), R = `${u}-doc-heading`, H = `${u}-sign-label`, Q = `${u}-live`, C = `${u}-gate-hint`, p = k(null), [E, w] = b(0), [U, $] = b(1), [W, j] = b(!1), [T, l] = b(!1), g = x != null, X = D || S || g, f = k(h), v = k(y);
140
141
  L(() => {
141
142
  f.current = h, v.current = y;
@@ -182,7 +183,7 @@ const Se = ie(
182
183
  );
183
184
  de(J, () => P, [P]), me(ue, P, n);
184
185
  const ne = N ?? (a ? s("signDocument.regionLabelNamed", { title: a }) : s("signDocument.regionLabel")), ae = a ?? s("signDocument.documentLabel"), te = g ? s("signDocument.signedOn", {
185
- date: Z(x, V.language)
186
+ date: Z(x, z.language)
186
187
  }) : o ? s("signDocument.readyToSign") : "", re = o ? T ? "" : s("signDocument.signToEnable") : s("signDocument.scrollToEnd");
187
188
  return /* @__PURE__ */ d(
188
189
  "div",
@@ -239,7 +240,7 @@ const Se = ie(
239
240
  /* @__PURE__ */ r("strong", { className: "ds:font-semibold", children: s("signDocument.signed") }),
240
241
  " — ",
241
242
  s("signDocument.signedOn", {
242
- date: Z(x, V.language)
243
+ date: Z(x, z.language)
243
244
  })
244
245
  ] })
245
246
  ]
@@ -312,4 +313,4 @@ export {
312
313
  Se as S,
313
314
  ue as s
314
315
  };
315
- //# sourceMappingURL=sign-document-DId1p-nn.js.map
316
+ //# sourceMappingURL=sign-document-CpLDZ6Db.js.map
@@ -1,5 +1,5 @@
1
- import { jsxs as X, jsx as h } from "react/jsx-runtime";
2
- import { forwardRef as ze, useId as Se, useMemo as ae, useRef as C, useState as N, useEffect as P, useCallback as T, useImperativeHandle as Re } from "react";
1
+ import { jsxs as W, jsx as k } from "react/jsx-runtime";
2
+ import { forwardRef as Ce, useId as Se, useMemo as se, useRef as z, useState as N, useEffect as P, useCallback as T, useImperativeHandle as Re } from "react";
3
3
  import Ae from "signature_pad";
4
4
  import { c as R } from "./index-D2ZczOXr.js";
5
5
  import { useTranslation as Me } from "react-i18next";
@@ -78,18 +78,21 @@ const Pe = {
78
78
  "ds:select-none"
79
79
  ].join(" ")
80
80
  ), Ee = R(
81
- ["ds:flex ds:items-center ds:flex-wrap ds:gap-[var(--spacing-xs)]"].join(" ")
82
- ), q = R(
81
+ ["ds:flex ds:items-stretch ds:flex-wrap ds:gap-[var(--spacing-sm)]"].join(
82
+ " "
83
+ )
84
+ ), ae = R(
83
85
  [
84
- "ds:inline-flex ds:items-center ds:justify-center",
86
+ "ds:inline-flex ds:flex-1 ds:items-center ds:justify-center",
85
87
  "ds:min-block-size-[var(--min-target-size)]",
86
88
  "ds:min-inline-size-[var(--min-target-size)]",
87
89
  "ds:gap-[var(--spacing-xs)]",
88
- "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
90
+ "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
91
+ "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]",
89
92
  "ds:rounded-[var(--radius-sm)]",
90
93
  "ds:border ds:border-[color:var(--border)]",
91
94
  "ds:bg-transparent ds:text-[var(--foreground)]",
92
- "ds:text-[length:var(--font-size-sm)] ds:font-medium",
95
+ "ds:text-[length:var(--font-size-base)] ds:font-medium",
93
96
  "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
94
97
  "ds:hover:bg-[var(--muted)]",
95
98
  "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
@@ -101,13 +104,14 @@ const Pe = {
101
104
  ].join(" ")
102
105
  ), Be = R(
103
106
  [
104
- "ds:inline-flex ds:items-center ds:justify-center",
107
+ "ds:inline-flex ds:flex-1 ds:items-center ds:justify-center",
105
108
  "ds:min-block-size-[var(--min-target-size)]",
106
109
  "ds:min-inline-size-[var(--min-target-size)]",
107
110
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
111
+ "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]",
108
112
  "ds:rounded-[var(--radius-sm)]",
109
113
  "ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]",
110
- "ds:text-[length:var(--font-size-sm)] ds:font-medium",
114
+ "ds:text-[length:var(--font-size-base)] ds:font-medium",
111
115
  "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
112
116
  "ds:hover:bg-[var(--primary-hover)]",
113
117
  "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
@@ -193,12 +197,12 @@ function He(t, n, s, i, a) {
193
197
  const v = Math.max(
194
198
  1,
195
199
  typeof window < "u" ? window.devicePixelRatio : 1
196
- ), z = document.createElement("canvas");
197
- z.width = Math.floor(n * v), z.height = Math.floor(s * v);
198
- const l = z.getContext("2d");
199
- return l && (l.setTransform(v, 0, 0, v, 0, 0), l.fillStyle = a, l.fillRect(0, 0, n, s), l.fillStyle = i, l.font = "32px italic sans-serif", l.textAlign = "center", l.textBaseline = "middle", l.fillText(t, n / 2, s / 2, n - 16)), z;
200
+ ), C = document.createElement("canvas");
201
+ C.width = Math.floor(n * v), C.height = Math.floor(s * v);
202
+ const d = C.getContext("2d");
203
+ return d && (d.setTransform(v, 0, 0, v, 0, 0), d.fillStyle = a, d.fillRect(0, 0, n, s), d.fillStyle = i, d.font = "32px italic sans-serif", d.textAlign = "center", d.textBaseline = "middle", d.fillText(t, n / 2, s / 2, n - 16)), C;
200
204
  }
201
- const Ue = ze(
205
+ const Ue = Ce(
202
206
  ({
203
207
  id: t,
204
208
  onConfirm: n,
@@ -206,31 +210,31 @@ const Ue = ze(
206
210
  onStart: i,
207
211
  width: a = 400,
208
212
  height: v = 200,
209
- penColor: z,
210
- backgroundColor: l,
213
+ penColor: C,
214
+ backgroundColor: d,
211
215
  allowTypedFallback: ce = !0,
212
- disabled: f = !1,
216
+ disabled: b = !1,
213
217
  ariaLabel: le,
214
218
  className: ue
215
219
  }, fe) => {
216
- const { t: o } = Me(), G = Se(), Z = `${ae(
217
- () => `sig-${G.replace(/[^a-zA-Z0-9-_]/g, "")}`,
218
- [G]
219
- )}-live`, F = C(null), J = C(null), V = C(null), K = C(null), y = C(null), [d, ge] = N("draw"), [S, L] = N(""), [pe, I] = N(!1), me = C("empty"), [ve, be] = N(""), [b, he] = N(""), [w, ye] = N(""), j = C(i), E = C(s), B = C(n);
220
+ const { t: c } = Me(), X = Se(), q = `${se(
221
+ () => `sig-${X.replace(/[^a-zA-Z0-9-_]/g, "")}`,
222
+ [X]
223
+ )}-live`, F = z(null), G = z(null), V = z(null), Z = z(null), h = z(null), [l, ge] = N("draw"), [S, L] = N(""), [pe, I] = N(!1), ve = z("empty"), [me, be] = N(""), [m, he] = N(""), [y, ye] = N(""), j = z(i), E = z(s), B = z(n);
220
224
  P(() => {
221
225
  j.current = i, E.current = s, B.current = n;
222
226
  }, [i, s, n]);
223
- const g = T(
227
+ const f = T(
224
228
  (e) => {
225
- me.current = e, be(o(`signature.state.${e}`));
229
+ ve.current = e, be(c(`signature.state.${e}`));
226
230
  },
227
- [o]
231
+ [c]
228
232
  );
229
233
  P(() => {
230
234
  if (typeof document > "u") return;
231
235
  function e() {
232
- const c = z ?? ie("--foreground"), p = l ?? ie("--background");
233
- he(c || "currentColor"), ye(p || "transparent");
236
+ const o = C ?? ie("--foreground"), g = d ?? ie("--background");
237
+ he(o || "currentColor"), ye(g || "transparent");
234
238
  }
235
239
  e();
236
240
  const r = new MutationObserver(() => {
@@ -240,47 +244,47 @@ const Ue = ze(
240
244
  attributes: !0,
241
245
  attributeFilter: ["class"]
242
246
  }), () => r.disconnect();
243
- }, [z, l]), P(() => {
244
- const e = y.current;
245
- e && (b && (e.penColor = b), w && (e.backgroundColor = w));
246
- }, [b, w]), P(() => {
247
- if (d !== "draw") return;
247
+ }, [C, d]), P(() => {
248
+ const e = h.current;
249
+ e && (m && (e.penColor = m), y && (e.backgroundColor = y));
250
+ }, [m, y]), P(() => {
251
+ if (l !== "draw") return;
248
252
  const e = V.current;
249
253
  if (!e) return;
250
254
  const r = new Ae(e, {
251
- penColor: b || "currentColor",
252
- backgroundColor: w || "transparent",
255
+ penColor: m || "currentColor",
256
+ backgroundColor: y || "transparent",
253
257
  minWidth: 0.5,
254
258
  maxWidth: 2.5,
255
259
  velocityFilterWeight: 0.7
256
260
  });
257
- y.current = r;
258
- const c = () => {
259
- var x;
260
- I(!0), g("drawing"), (x = j.current) == null || x.call(j);
261
- }, p = () => {
261
+ h.current = r;
262
+ const o = () => {
263
+ var w;
264
+ I(!0), f("drawing"), (w = j.current) == null || w.call(j);
265
+ }, g = () => {
262
266
  };
263
- return r.addEventListener("beginStroke", c), r.addEventListener("endStroke", p), $(e), g("empty"), () => {
264
- r.removeEventListener("beginStroke", c), r.removeEventListener("endStroke", p), r.clear(), r.off(), y.current = null;
267
+ return r.addEventListener("beginStroke", o), r.addEventListener("endStroke", g), $(e), f("empty"), () => {
268
+ r.removeEventListener("beginStroke", o), r.removeEventListener("endStroke", g), r.clear(), r.off(), h.current = null;
265
269
  };
266
- }, [d]), P(() => {
267
- const e = y.current;
268
- e && (f ? e.off() : e.on());
269
- }, [f, d]);
270
- const Q = 4096, $ = T(
270
+ }, [l]), P(() => {
271
+ const e = h.current;
272
+ e && (b ? e.off() : e.on());
273
+ }, [b, l]);
274
+ const J = 4096, $ = T(
271
275
  (e) => {
272
- const r = e.getBoundingClientRect(), c = Math.max(
276
+ const r = e.getBoundingClientRect(), o = Math.max(
273
277
  1,
274
278
  typeof window < "u" ? window.devicePixelRatio : 1
275
- ), p = Math.max(1, Math.floor(r.width * c)), x = Math.max(1, Math.floor(r.height * c)), A = Math.min(p, Q), k = Math.min(x, Q);
276
- if (e.width === A && e.height === k)
279
+ ), g = Math.max(1, Math.floor(r.width * o)), w = Math.max(1, Math.floor(r.height * o)), A = Math.min(g, J), x = Math.min(w, J);
280
+ if (e.width === A && e.height === x)
277
281
  return;
278
- const m = y.current, M = m ? m.toData() : null;
279
- e.width = A, e.height = k;
282
+ const p = h.current, M = p ? p.toData() : null;
283
+ e.width = A, e.height = x;
280
284
  const D = e.getContext("2d");
281
- D && D.scale(c, c), m && (w && (m.backgroundColor = w), b && (m.penColor = b), m.clear(), M && M.length > 0 && m.fromData(M));
285
+ D && D.scale(o, o), p && (y && (p.backgroundColor = y), m && (p.penColor = m), p.clear(), M && M.length > 0 && p.fromData(M));
282
286
  },
283
- [w, b]
287
+ [y, m]
284
288
  );
285
289
  P(() => {
286
290
  const e = V.current;
@@ -296,69 +300,69 @@ const Ue = ze(
296
300
  }, [$]);
297
301
  const H = T(() => {
298
302
  var r;
299
- const e = y.current;
300
- e && e.clear(), L(""), I(!1), g("cleared"), (r = E.current) == null || r.call(E);
301
- }, [g]), U = T(() => {
302
- const e = y.current;
303
+ const e = h.current;
304
+ e && e.clear(), L(""), I(!1), f("cleared"), (r = E.current) == null || r.call(E);
305
+ }, [f]), K = T(() => {
306
+ const e = h.current;
303
307
  if (!e) return;
304
308
  const r = e.toData();
305
- !r || r.length === 0 || (r.pop(), e.fromData(r), r.length === 0 && (I(!1), g("empty")));
306
- }, [g]), Y = T(() => {
307
- if (d === "typed") return S.trim().length === 0;
308
- const e = y.current;
309
+ !r || r.length === 0 || (r.pop(), e.fromData(r), r.length === 0 && (I(!1), f("empty")));
310
+ }, [f]), Q = T(() => {
311
+ if (l === "typed") return S.trim().length === 0;
312
+ const e = h.current;
309
313
  return e ? e.isEmpty() : !0;
310
- }, [d, S]), _ = T(async () => {
311
- var ne;
314
+ }, [l, S]), U = T(async () => {
315
+ var re;
312
316
  const e = de(
313
317
  typeof a == "number" ? `${a}` : String(a)
314
318
  ), r = de(
315
319
  typeof v == "number" ? `${v}` : String(v)
316
- ), c = d === "draw" ? V.current ?? J.current ?? F.current : K.current ?? F.current, p = c == null ? void 0 : c.getBoundingClientRect(), x = e ?? (p ? p.width : 400), A = r ?? (p ? p.height : 200);
317
- let k = "", m = "", M;
318
- if (d === "draw") {
319
- const u = y.current;
320
+ ), o = l === "draw" ? V.current ?? G.current ?? F.current : Z.current ?? F.current, g = o == null ? void 0 : o.getBoundingClientRect(), w = e ?? (g ? g.width : 400), A = r ?? (g ? g.height : 200);
321
+ let x = "", p = "", M;
322
+ if (l === "draw") {
323
+ const u = h.current;
320
324
  if (!u || u.isEmpty()) return null;
321
- k = u.toDataURL("image/png"), m = u.toSVG(), M = u.toData();
325
+ x = u.toDataURL("image/png"), p = u.toSVG(), M = u.toData();
322
326
  } else {
323
327
  const u = S.trim();
324
328
  if (u.length === 0) return null;
325
- k = He(
329
+ x = He(
326
330
  u,
327
- x,
331
+ w,
328
332
  A,
329
- b || "currentColor",
330
- w || "transparent"
333
+ m || "currentColor",
334
+ y || "transparent"
331
335
  ).toDataURL("image/png");
332
- const W = u.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
333
- m = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${x} ${A}" width="${x}" height="${A}"><text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="sans-serif" font-style="italic" font-size="32" fill="${b || "currentColor"}" letter-spacing="3">${W}</text></svg>`;
336
+ const O = u.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
337
+ p = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${w} ${A}" width="${w}" height="${A}"><text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="sans-serif" font-style="italic" font-size="32" fill="${m || "currentColor"}" letter-spacing="3">${O}</text></svg>`;
334
338
  }
335
- const D = x * 25.4 / 96, ke = A * 25.4 / 96, Ce = (/* @__PURE__ */ new Date()).toISOString();
336
- let te = "";
337
- if (k) {
338
- const u = k.indexOf(","), se = u >= 0 ? k.slice(u + 1) : "", W = Le(se);
339
- te = await Ie(W);
339
+ const D = w * 25.4 / 96, ke = A * 25.4 / 96, ze = (/* @__PURE__ */ new Date()).toISOString();
340
+ let ee = "";
341
+ if (x) {
342
+ const u = x.indexOf(","), ne = u >= 0 ? x.slice(u + 1) : "", O = Le(ne);
343
+ ee = await Ie(O);
340
344
  }
341
- const re = {
342
- png: k,
343
- svg: m,
345
+ const te = {
346
+ png: x,
347
+ svg: p,
344
348
  widthMm: D,
345
349
  heightMm: ke,
346
- capturedAt: Ce,
347
- sha256: te,
350
+ capturedAt: ze,
351
+ sha256: ee,
348
352
  strokes: M
349
353
  };
350
- return g("captured"), (ne = B.current) == null || ne.call(B, re), re;
351
- }, [d, S, a, v, b, w, g]), O = ae(
354
+ return f("captured"), (re = B.current) == null || re.call(B, te), te;
355
+ }, [l, S, a, v, m, y, f]), _ = se(
352
356
  () => ({
353
357
  clear: H,
354
- undo: U,
355
- isEmpty: Y,
356
- confirm: _
358
+ undo: K,
359
+ isEmpty: Q,
360
+ confirm: U
357
361
  }),
358
- [H, U, Y, _]
362
+ [H, K, Q, U]
359
363
  );
360
- Re(fe, () => O, [O]), Ne(Pe, O, t);
361
- const we = d === "typed" ? S.trim().length > 0 : pe, ee = f || !we, xe = {
364
+ Re(fe, () => _, [_]), Ne(Pe, _, t);
365
+ const we = l === "typed" ? S.trim().length > 0 : pe, Y = b || !we, xe = {
362
366
  "--signature-width": oe(
363
367
  a,
364
368
  "var(--signature-default-width)"
@@ -368,121 +372,109 @@ const Ue = ze(
368
372
  "var(--signature-default-height)"
369
373
  )
370
374
  };
371
- return /* @__PURE__ */ X(
375
+ return /* @__PURE__ */ W(
372
376
  "div",
373
377
  {
374
378
  ref: F,
375
379
  role: "group",
376
- "aria-label": le ?? o("signature.padLabel"),
377
- "aria-disabled": f || void 0,
380
+ "aria-label": le ?? c("signature.padLabel"),
381
+ "aria-disabled": b || void 0,
378
382
  className: [Te(), ue].filter(Boolean).join(" "),
379
383
  style: xe,
380
384
  "data-component": "signature-capture",
381
385
  "data-component-id": t,
382
386
  children: [
383
- d === "draw" ? /* @__PURE__ */ h("div", { ref: J, className: Ve(), children: /* @__PURE__ */ h(
387
+ l === "draw" ? /* @__PURE__ */ k("div", { ref: G, className: Ve(), children: /* @__PURE__ */ k(
384
388
  "canvas",
385
389
  {
386
390
  ref: V,
387
391
  role: "img",
388
- "aria-label": o("signature.padLabel"),
392
+ "aria-label": c("signature.padLabel"),
389
393
  className: je(),
390
394
  "data-testid": "signature-canvas"
391
395
  }
392
- ) }) : /* @__PURE__ */ X("label", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
393
- /* @__PURE__ */ h("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: o("signature.typedFallback.label") }),
394
- /* @__PURE__ */ h(
396
+ ) }) : /* @__PURE__ */ W("label", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
397
+ /* @__PURE__ */ k("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: c("signature.typedFallback.label") }),
398
+ /* @__PURE__ */ k(
395
399
  "input",
396
400
  {
397
401
  type: "text",
398
402
  value: S,
399
403
  onChange: (e) => {
400
- L(e.target.value), e.target.value.length > 0 ? g("drawing") : g("empty");
404
+ L(e.target.value), e.target.value.length > 0 ? f("drawing") : f("empty");
401
405
  },
402
- placeholder: o("signature.typedFallback.placeholder"),
403
- "aria-label": o("signature.typedFallback.label"),
404
- disabled: f,
406
+ placeholder: c("signature.typedFallback.placeholder"),
407
+ "aria-label": c("signature.typedFallback.label"),
408
+ disabled: b,
405
409
  className: $e(),
406
410
  "data-testid": "signature-typed-input"
407
411
  }
408
412
  ),
409
- S ? /* @__PURE__ */ h(
413
+ S ? /* @__PURE__ */ k(
410
414
  "div",
411
415
  {
412
- ref: K,
416
+ ref: Z,
413
417
  className: De(),
414
418
  "aria-hidden": "true",
415
419
  children: S
416
420
  }
417
421
  ) : null
418
422
  ] }),
419
- /* @__PURE__ */ h(
423
+ /* @__PURE__ */ k(
420
424
  "div",
421
425
  {
422
- id: Z,
426
+ id: q,
423
427
  "aria-live": "polite",
424
428
  "aria-atomic": "true",
425
429
  className: "ds:sr-only",
426
430
  "data-testid": "signature-live",
427
- children: ve
431
+ children: me
428
432
  }
429
433
  ),
430
- /* @__PURE__ */ X(
434
+ /* @__PURE__ */ W(
431
435
  "div",
432
436
  {
433
437
  className: Ee(),
434
438
  role: "group",
435
- "aria-label": o("signature.padLabel"),
439
+ "aria-label": c("signature.padLabel"),
436
440
  children: [
437
- /* @__PURE__ */ h(
441
+ /* @__PURE__ */ k(
438
442
  "button",
439
443
  {
440
444
  type: "button",
441
445
  onClick: () => {
442
- f || H();
446
+ b || H();
443
447
  },
444
- "aria-disabled": f || void 0,
445
- className: q(),
446
- children: o("signature.clear")
448
+ "aria-disabled": b || void 0,
449
+ className: ae(),
450
+ children: c("signature.clear")
447
451
  }
448
452
  ),
449
- d === "draw" ? /* @__PURE__ */ h(
450
- "button",
451
- {
452
- type: "button",
453
- onClick: () => {
454
- f || U();
455
- },
456
- "aria-disabled": f || void 0,
457
- className: q(),
458
- children: o("signature.undo")
459
- }
460
- ) : null,
461
- ce ? /* @__PURE__ */ h(
453
+ ce ? /* @__PURE__ */ k(
462
454
  "button",
463
455
  {
464
456
  type: "button",
465
457
  onClick: () => {
466
- f || (L(""), ge((e) => e === "draw" ? "typed" : "draw"), g("cleared"));
458
+ b || (L(""), ge((e) => e === "draw" ? "typed" : "draw"), f("cleared"));
467
459
  },
468
- "aria-disabled": f || void 0,
469
- className: q(),
470
- "aria-pressed": d === "typed",
471
- children: o(d === "draw" ? "signature.typedFallback.toggle" : "signature.typedFallback.toggleDraw")
460
+ "aria-disabled": b || void 0,
461
+ className: ae(),
462
+ "aria-pressed": l === "typed",
463
+ children: c(l === "draw" ? "signature.typedFallback.toggle" : "signature.typedFallback.toggleDraw")
472
464
  }
473
465
  ) : null,
474
- /* @__PURE__ */ h(
466
+ /* @__PURE__ */ k(
475
467
  "button",
476
468
  {
477
469
  type: "button",
478
470
  onClick: () => {
479
- ee || _();
471
+ Y || U();
480
472
  },
481
- "aria-disabled": ee || void 0,
482
- "aria-describedby": Z,
473
+ "aria-disabled": Y || void 0,
474
+ "aria-describedby": q,
483
475
  className: Be(),
484
476
  "data-testid": "signature-confirm",
485
- children: o("signature.confirm")
477
+ children: c("signature.confirm")
486
478
  }
487
479
  )
488
480
  ]
@@ -498,4 +490,4 @@ export {
498
490
  Ue as S,
499
491
  Pe as s
500
492
  };
501
- //# sourceMappingURL=signature-capture-BRzCklg4.js.map
493
+ //# sourceMappingURL=signature-capture-DoiBd6i3.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "0.39.0",
3
+ "packageVersion": "0.40.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -1,4 +1,4 @@
1
- import { S as o, s } from "../../_chunks/sign-document-DId1p-nn.js";
1
+ import { S as o, s } from "../../_chunks/sign-document-CpLDZ6Db.js";
2
2
  export {
3
3
  o as SignDocument,
4
4
  s as signDocumentAgent
@@ -1,4 +1,4 @@
1
- import { S as r, s as t } from "../../_chunks/signature-capture-BRzCklg4.js";
1
+ import { S as r, s as t } from "../../_chunks/signature-capture-DoiBd6i3.js";
2
2
  export {
3
3
  r as SignatureCapture,
4
4
  t as signatureCaptureAgent
package/dist/index.js CHANGED
@@ -146,8 +146,8 @@ import { P as Up, f as Kp, p as Yp, a as Qp, s as jp, b as qp, c as zp } from ".
146
146
  import { P as Xp, p as Zp } from "./_chunks/pdf-viewer-Cy6Ul3hZ.js";
147
147
  import { R as am, r as em } from "./_chunks/reviews-panel-CPrXu5TX.js";
148
148
  import { R as om, e as tm, r as sm, t as nm, a as im, w as pm } from "./_chunks/rich-text-editor-DLbg2852.js";
149
- import { S as lm, s as cm } from "./_chunks/signature-capture-BRzCklg4.js";
150
- import { S as dm, s as gm } from "./_chunks/sign-document-DId1p-nn.js";
149
+ import { S as lm, s as cm } from "./_chunks/signature-capture-DoiBd6i3.js";
150
+ import { S as dm, s as gm } from "./_chunks/sign-document-CpLDZ6Db.js";
151
151
  import { S as Am, f as um, i as Cm } from "./_chunks/slot-grid-BlHHP9Qy.js";
152
152
  import { C as Tm, a as bm, b as Pm, F as Im, c as Rm, d as Em, P as hm, e as Fm, T as Lm, f as Nm, g as Dm, h as km, l as _m, i as Om, t as Bm, r as Mm } from "./_chunks/tooth-scheme-CxlsLjfN.js";
153
153
  import { T as wm } from "./_chunks/transaction-chip-B8ujzowA.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "0.39.0",
3
+ "version": "0.40.0",
4
4
  "type": "module",
5
5
  "description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe.",
6
6
  "license": "BUSL-1.1",