@alfadocs/ui-kit 0.39.0 → 0.41.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.
- package/dist/_chunks/{sign-document-DId1p-nn.js → sign-document-CpLDZ6Db.js} +10 -9
- package/dist/_chunks/{signature-capture-BRzCklg4.js → signature-capture-DoiBd6i3.js} +131 -139
- package/dist/agent-catalog.json +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/signature-capture/index.js +1 -1
- package/dist/index.js +2 -2
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
|
@@ -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-
|
|
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:
|
|
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-
|
|
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:
|
|
137
|
-
() => `sign-doc-${
|
|
138
|
-
[
|
|
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,
|
|
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,
|
|
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-
|
|
316
|
+
//# sourceMappingURL=sign-document-CpLDZ6Db.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
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-
|
|
82
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
),
|
|
197
|
-
|
|
198
|
-
const
|
|
199
|
-
return
|
|
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 =
|
|
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:
|
|
210
|
-
backgroundColor:
|
|
213
|
+
penColor: C,
|
|
214
|
+
backgroundColor: d,
|
|
211
215
|
allowTypedFallback: ce = !0,
|
|
212
|
-
disabled:
|
|
216
|
+
disabled: b = !1,
|
|
213
217
|
ariaLabel: le,
|
|
214
218
|
className: ue
|
|
215
219
|
}, fe) => {
|
|
216
|
-
const { t:
|
|
217
|
-
() => `sig-${
|
|
218
|
-
[
|
|
219
|
-
)}-live`, F =
|
|
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
|
|
227
|
+
const f = T(
|
|
224
228
|
(e) => {
|
|
225
|
-
|
|
229
|
+
ve.current = e, be(c(`signature.state.${e}`));
|
|
226
230
|
},
|
|
227
|
-
[
|
|
231
|
+
[c]
|
|
228
232
|
);
|
|
229
233
|
P(() => {
|
|
230
234
|
if (typeof document > "u") return;
|
|
231
235
|
function e() {
|
|
232
|
-
const
|
|
233
|
-
he(
|
|
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
|
-
}, [
|
|
244
|
-
const e =
|
|
245
|
-
e && (
|
|
246
|
-
}, [
|
|
247
|
-
if (
|
|
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:
|
|
252
|
-
backgroundColor:
|
|
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
|
-
|
|
258
|
-
const
|
|
259
|
-
var
|
|
260
|
-
I(!0),
|
|
261
|
-
},
|
|
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",
|
|
264
|
-
r.removeEventListener("beginStroke",
|
|
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
|
-
}, [
|
|
267
|
-
const e =
|
|
268
|
-
e && (
|
|
269
|
-
}, [
|
|
270
|
-
const
|
|
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(),
|
|
276
|
+
const r = e.getBoundingClientRect(), o = Math.max(
|
|
273
277
|
1,
|
|
274
278
|
typeof window < "u" ? window.devicePixelRatio : 1
|
|
275
|
-
),
|
|
276
|
-
if (e.width === A && e.height ===
|
|
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
|
|
279
|
-
e.width = A, e.height =
|
|
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(
|
|
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
|
-
[
|
|
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 =
|
|
300
|
-
e && e.clear(), L(""), I(!1),
|
|
301
|
-
}, [
|
|
302
|
-
const e =
|
|
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),
|
|
306
|
-
}, [
|
|
307
|
-
if (
|
|
308
|
-
const e =
|
|
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
|
-
}, [
|
|
311
|
-
var
|
|
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
|
-
),
|
|
317
|
-
let
|
|
318
|
-
if (
|
|
319
|
-
const u =
|
|
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
|
-
|
|
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
|
-
|
|
329
|
+
x = He(
|
|
326
330
|
u,
|
|
327
|
-
|
|
331
|
+
w,
|
|
328
332
|
A,
|
|
329
|
-
|
|
330
|
-
|
|
333
|
+
m || "currentColor",
|
|
334
|
+
y || "transparent"
|
|
331
335
|
).toDataURL("image/png");
|
|
332
|
-
const
|
|
333
|
-
|
|
336
|
+
const O = u.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
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 =
|
|
336
|
-
let
|
|
337
|
-
if (
|
|
338
|
-
const u =
|
|
339
|
-
|
|
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
|
|
342
|
-
png:
|
|
343
|
-
svg:
|
|
345
|
+
const te = {
|
|
346
|
+
png: x,
|
|
347
|
+
svg: p,
|
|
344
348
|
widthMm: D,
|
|
345
349
|
heightMm: ke,
|
|
346
|
-
capturedAt:
|
|
347
|
-
sha256:
|
|
350
|
+
capturedAt: ze,
|
|
351
|
+
sha256: ee,
|
|
348
352
|
strokes: M
|
|
349
353
|
};
|
|
350
|
-
return
|
|
351
|
-
}, [
|
|
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:
|
|
355
|
-
isEmpty:
|
|
356
|
-
confirm:
|
|
358
|
+
undo: K,
|
|
359
|
+
isEmpty: Q,
|
|
360
|
+
confirm: U
|
|
357
361
|
}),
|
|
358
|
-
[H,
|
|
362
|
+
[H, K, Q, U]
|
|
359
363
|
);
|
|
360
|
-
Re(fe, () =>
|
|
361
|
-
const we =
|
|
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__ */
|
|
375
|
+
return /* @__PURE__ */ W(
|
|
372
376
|
"div",
|
|
373
377
|
{
|
|
374
378
|
ref: F,
|
|
375
379
|
role: "group",
|
|
376
|
-
"aria-label": le ??
|
|
377
|
-
"aria-disabled":
|
|
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
|
-
|
|
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":
|
|
392
|
+
"aria-label": c("signature.padLabel"),
|
|
389
393
|
className: je(),
|
|
390
394
|
"data-testid": "signature-canvas"
|
|
391
395
|
}
|
|
392
|
-
) }) : /* @__PURE__ */
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
-
/* @__PURE__ */
|
|
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 ?
|
|
404
|
+
L(e.target.value), e.target.value.length > 0 ? f("drawing") : f("empty");
|
|
401
405
|
},
|
|
402
|
-
placeholder:
|
|
403
|
-
"aria-label":
|
|
404
|
-
disabled:
|
|
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__ */
|
|
413
|
+
S ? /* @__PURE__ */ k(
|
|
410
414
|
"div",
|
|
411
415
|
{
|
|
412
|
-
ref:
|
|
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__ */
|
|
423
|
+
/* @__PURE__ */ k(
|
|
420
424
|
"div",
|
|
421
425
|
{
|
|
422
|
-
id:
|
|
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:
|
|
431
|
+
children: me
|
|
428
432
|
}
|
|
429
433
|
),
|
|
430
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ W(
|
|
431
435
|
"div",
|
|
432
436
|
{
|
|
433
437
|
className: Ee(),
|
|
434
438
|
role: "group",
|
|
435
|
-
"aria-label":
|
|
439
|
+
"aria-label": c("signature.padLabel"),
|
|
436
440
|
children: [
|
|
437
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ k(
|
|
438
442
|
"button",
|
|
439
443
|
{
|
|
440
444
|
type: "button",
|
|
441
445
|
onClick: () => {
|
|
442
|
-
|
|
446
|
+
b || H();
|
|
443
447
|
},
|
|
444
|
-
"aria-disabled":
|
|
445
|
-
className:
|
|
446
|
-
children:
|
|
448
|
+
"aria-disabled": b || void 0,
|
|
449
|
+
className: ae(),
|
|
450
|
+
children: c("signature.clear")
|
|
447
451
|
}
|
|
448
452
|
),
|
|
449
|
-
|
|
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
|
-
|
|
458
|
+
b || (L(""), ge((e) => e === "draw" ? "typed" : "draw"), f("cleared"));
|
|
467
459
|
},
|
|
468
|
-
"aria-disabled":
|
|
469
|
-
className:
|
|
470
|
-
"aria-pressed":
|
|
471
|
-
children:
|
|
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__ */
|
|
466
|
+
/* @__PURE__ */ k(
|
|
475
467
|
"button",
|
|
476
468
|
{
|
|
477
469
|
type: "button",
|
|
478
470
|
onClick: () => {
|
|
479
|
-
|
|
471
|
+
Y || U();
|
|
480
472
|
},
|
|
481
|
-
"aria-disabled":
|
|
482
|
-
"aria-describedby":
|
|
473
|
+
"aria-disabled": Y || void 0,
|
|
474
|
+
"aria-describedby": q,
|
|
483
475
|
className: Be(),
|
|
484
476
|
"data-testid": "signature-confirm",
|
|
485
|
-
children:
|
|
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-
|
|
493
|
+
//# sourceMappingURL=signature-capture-DoiBd6i3.js.map
|
package/dist/agent-catalog.json
CHANGED
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-
|
|
150
|
-
import { S as dm, s as gm } from "./_chunks/sign-document-
|
|
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";
|