@alfadocs/ui-kit 0.60.0 → 0.62.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/pdf-viewer-chMpwpA4.js +979 -0
- package/dist/_chunks/{sign-document-BmAT0kKD.js → sign-document--nr5cxsB.js} +2 -2
- package/dist/_chunks/signature-field-DbhbpLha.js +190 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/pdf-viewer/pdf-viewer.d.ts +7 -0
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/signature-field/index.js +1 -1
- package/dist/components/signature-field/signature-field.d.ts +8 -0
- package/dist/index.js +3 -3
- package/dist/tokens.css +1 -1
- package/package.json +3 -1
- package/dist/_chunks/pdf-viewer-XxWdtKfD.js +0 -965
- package/dist/_chunks/signature-field-DhscKdgk.js +0 -152
|
@@ -2,7 +2,7 @@ import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as ce, useId as le, useMemo as G, useRef as L, useState as x, useEffect as _, useCallback as l, useImperativeHandle as ue } from "react";
|
|
3
3
|
import { c as i } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as me } from "react-i18next";
|
|
5
|
-
import { P as ge } from "./pdf-viewer-
|
|
5
|
+
import { P as ge } from "./pdf-viewer-chMpwpA4.js";
|
|
6
6
|
import { S as pe } from "./signature-capture-COi0Uiqu.js";
|
|
7
7
|
import { u as fe } from "./registry-nPAVE19X.js";
|
|
8
8
|
import { C as J } from "./circle-check-9AeSgJD_.js";
|
|
@@ -341,4 +341,4 @@ export {
|
|
|
341
341
|
je as S,
|
|
342
342
|
ve as s
|
|
343
343
|
};
|
|
344
|
-
//# sourceMappingURL=sign-document
|
|
344
|
+
//# sourceMappingURL=sign-document--nr5cxsB.js.map
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { jsx as s, jsxs as f, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as k } from "react";
|
|
3
|
+
import { c as y } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as C } from "react-i18next";
|
|
5
|
+
import { S as _ } from "./spinner-OjQNn8oN.js";
|
|
6
|
+
import { C as T } from "./check-DPdL_Sm7.js";
|
|
7
|
+
import { c as w } from "./createLucideIcon-CrFbzy84.js";
|
|
8
|
+
/**
|
|
9
|
+
* @license lucide-react v1.8.0 - ISC
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the ISC license.
|
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
const S = [
|
|
15
|
+
["path", { d: "M13 21h8", key: "1jsn5i" }],
|
|
16
|
+
[
|
|
17
|
+
"path",
|
|
18
|
+
{
|
|
19
|
+
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
|
|
20
|
+
key: "1a8usu"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
], $ = w("pen-line", S), L = y(
|
|
24
|
+
[
|
|
25
|
+
// Overlay fields are always absolutely positioned within the
|
|
26
|
+
// renderPageOverlay box; the percent geometry rides the inline style.
|
|
27
|
+
"ds:absolute",
|
|
28
|
+
"ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]",
|
|
29
|
+
// The visible box renders at its true percentage geometry. A min-size
|
|
30
|
+
// floor here overstretched short fields past their authored box, so
|
|
31
|
+
// neighbours collided (signed box overlapping the next field). The 44/48px
|
|
32
|
+
// touch target is instead restored via a transparent ::before hit-area
|
|
33
|
+
// expansion — the same pattern Button's `sm` size uses — applied on touch
|
|
34
|
+
// viewports only; on desktop the precise box is the target.
|
|
35
|
+
'ds:before:absolute ds:before:content-[""]',
|
|
36
|
+
"ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)]",
|
|
37
|
+
"ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)]",
|
|
38
|
+
"ds:sm:before:hidden",
|
|
39
|
+
// Inline padding lives on the per-state variants below (not the base) so
|
|
40
|
+
// the signed state's tighter padding can't collide with a base ps/pe on
|
|
41
|
+
// the same logical side under Tailwind's JIT ordering.
|
|
42
|
+
"ds:rounded-[var(--radius-sm)]",
|
|
43
|
+
"ds:text-[length:var(--font-size-sm)] ds:font-medium",
|
|
44
|
+
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
45
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
46
|
+
"ds:focus-visible:outline-solid",
|
|
47
|
+
"ds:focus-visible:outline-[var(--ring)]",
|
|
48
|
+
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
49
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
50
|
+
"ds:aria-disabled:cursor-not-allowed"
|
|
51
|
+
].join(" "),
|
|
52
|
+
{
|
|
53
|
+
variants: {
|
|
54
|
+
state: {
|
|
55
|
+
unsigned: [
|
|
56
|
+
"ds:cursor-pointer",
|
|
57
|
+
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
58
|
+
"ds:border ds:border-dashed ds:border-[color:var(--ring)]",
|
|
59
|
+
"ds:bg-[color-mix(in_srgb,var(--info)_8%,transparent)]",
|
|
60
|
+
"ds:text-[var(--foreground)]",
|
|
61
|
+
"ds:hover:bg-[color-mix(in_srgb,var(--info)_16%,transparent)]",
|
|
62
|
+
"ds:forced-colors:border-[CanvasText]"
|
|
63
|
+
].join(" "),
|
|
64
|
+
signing: [
|
|
65
|
+
"ds:cursor-progress",
|
|
66
|
+
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
67
|
+
"ds:border ds:border-dashed ds:border-[color:var(--border)]",
|
|
68
|
+
"ds:bg-[var(--muted)]",
|
|
69
|
+
"ds:text-[var(--muted-foreground)]",
|
|
70
|
+
"ds:forced-colors:border-[CanvasText]"
|
|
71
|
+
].join(" "),
|
|
72
|
+
signed: [
|
|
73
|
+
// overflow-hidden is NOT on the button root — it would clip the
|
|
74
|
+
// ::before touch-target expansion. It lives on the inner image
|
|
75
|
+
// wrapper instead (see render).
|
|
76
|
+
"ds:cursor-pointer",
|
|
77
|
+
"ds:p-[var(--spacing-xs)]",
|
|
78
|
+
"ds:border ds:border-solid ds:border-[color:var(--success)]",
|
|
79
|
+
"ds:bg-[color-mix(in_srgb,var(--success)_8%,transparent)]",
|
|
80
|
+
"ds:text-[var(--foreground)]",
|
|
81
|
+
"ds:forced-colors:border-[CanvasText]"
|
|
82
|
+
].join(" ")
|
|
83
|
+
},
|
|
84
|
+
// Persistent selection ring for the nav-targeted field. Uses the same
|
|
85
|
+
// tokens as the focus ring but is NOT gated on :focus-visible, so it
|
|
86
|
+
// stays visible as the signer steps between fields. When the field is
|
|
87
|
+
// also focused, the base focus-visible ring composes over it (same
|
|
88
|
+
// outline property, same value) — no visual clash.
|
|
89
|
+
active: {
|
|
90
|
+
true: [
|
|
91
|
+
"ds:outline-solid",
|
|
92
|
+
"ds:outline-[length:var(--focus-ring-width)]",
|
|
93
|
+
"ds:outline-[var(--ring)]",
|
|
94
|
+
"ds:outline-offset-[length:var(--focus-ring-offset)]",
|
|
95
|
+
"ds:forced-colors:outline-[Highlight]"
|
|
96
|
+
].join(" "),
|
|
97
|
+
false: ""
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
defaultVariants: { state: "unsigned", active: !1 }
|
|
101
|
+
}
|
|
102
|
+
), M = k(
|
|
103
|
+
({
|
|
104
|
+
state: e = "unsigned",
|
|
105
|
+
insetInlineStart: o,
|
|
106
|
+
insetBlockStart: a,
|
|
107
|
+
inlineSize: t,
|
|
108
|
+
blockSize: l,
|
|
109
|
+
onActivate: d,
|
|
110
|
+
signedImageSrc: c,
|
|
111
|
+
label: r,
|
|
112
|
+
disabled: v = !1,
|
|
113
|
+
active: u = !1,
|
|
114
|
+
id: p,
|
|
115
|
+
className: b,
|
|
116
|
+
...h
|
|
117
|
+
}, x) => {
|
|
118
|
+
const { t: i } = C(), g = v || e === "signing", n = {};
|
|
119
|
+
o !== void 0 && (n.insetInlineStart = `${o}%`), a !== void 0 && (n.insetBlockStart = `${a}%`), t !== void 0 && (n.inlineSize = `${t}%`), l !== void 0 && (n.blockSize = `${l}%`);
|
|
120
|
+
const z = r ?? i("signatureField.prompt"), F = e === "signing" ? r ? i("signatureField.signingNamed", { label: r }) : i("signatureField.signing") : e === "signed" ? r ? i("signatureField.signedNamed", { label: r }) : i("signatureField.signed") : r ?? i("signatureField.unsigned");
|
|
121
|
+
function j(N) {
|
|
122
|
+
if (g) {
|
|
123
|
+
N.preventDefault();
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
d == null || d();
|
|
127
|
+
}
|
|
128
|
+
return /* @__PURE__ */ s(
|
|
129
|
+
"button",
|
|
130
|
+
{
|
|
131
|
+
ref: x,
|
|
132
|
+
type: "button",
|
|
133
|
+
...h,
|
|
134
|
+
"data-component": "signature-field",
|
|
135
|
+
"data-component-id": p,
|
|
136
|
+
"data-state": e,
|
|
137
|
+
"data-active": u || void 0,
|
|
138
|
+
"aria-label": F,
|
|
139
|
+
"aria-disabled": g || void 0,
|
|
140
|
+
"aria-busy": e === "signing" || void 0,
|
|
141
|
+
onClick: j,
|
|
142
|
+
className: [L({ state: e, active: u }), b].filter(Boolean).join(" "),
|
|
143
|
+
style: n,
|
|
144
|
+
children: e === "signing" ? (
|
|
145
|
+
// Decorative: the button's aria-label + aria-busy are the single
|
|
146
|
+
// source of the status announcement, so the Spinner's own
|
|
147
|
+
// role="status" live region is hidden from assistive tech.
|
|
148
|
+
/* @__PURE__ */ s("span", { "aria-hidden": "true", children: /* @__PURE__ */ s(_, { size: "sm", label: i("signatureField.signing") }) })
|
|
149
|
+
) : e === "signed" ? c ? (
|
|
150
|
+
// overflow-hidden + rounding live on this inner wrapper (not the
|
|
151
|
+
// button root) so the signature is clipped to the box WITHOUT
|
|
152
|
+
// clipping the button's ::before touch-target expansion.
|
|
153
|
+
/* @__PURE__ */ s("span", { className: "ds:inline-size-full ds:block-size-full ds:overflow-hidden ds:rounded-[var(--radius-sm)]", children: /* @__PURE__ */ s(
|
|
154
|
+
"img",
|
|
155
|
+
{
|
|
156
|
+
src: c,
|
|
157
|
+
alt: "",
|
|
158
|
+
"aria-hidden": "true",
|
|
159
|
+
className: "ds:block-size-full ds:inline-size-full ds:object-contain"
|
|
160
|
+
}
|
|
161
|
+
) })
|
|
162
|
+
) : /* @__PURE__ */ f(m, { children: [
|
|
163
|
+
/* @__PURE__ */ s(
|
|
164
|
+
T,
|
|
165
|
+
{
|
|
166
|
+
"aria-hidden": "true",
|
|
167
|
+
className: "ds:block-size-4 ds:inline-size-4 ds:text-[var(--success)]"
|
|
168
|
+
}
|
|
169
|
+
),
|
|
170
|
+
/* @__PURE__ */ s("span", { children: i("signatureField.signed") })
|
|
171
|
+
] }) : /* @__PURE__ */ f(m, { children: [
|
|
172
|
+
/* @__PURE__ */ s(
|
|
173
|
+
$,
|
|
174
|
+
{
|
|
175
|
+
"aria-hidden": "true",
|
|
176
|
+
className: "ds:block-size-4 ds:inline-size-4"
|
|
177
|
+
}
|
|
178
|
+
),
|
|
179
|
+
/* @__PURE__ */ s("span", { children: z })
|
|
180
|
+
] })
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
M.displayName = "SignatureField";
|
|
186
|
+
export {
|
|
187
|
+
M as S,
|
|
188
|
+
L as s
|
|
189
|
+
};
|
|
190
|
+
//# sourceMappingURL=signature-field-DbhbpLha.js.map
|
package/dist/agent-catalog.json
CHANGED
|
@@ -81,6 +81,13 @@ export interface PDFViewerProps {
|
|
|
81
81
|
onError?: (error: Error) => void;
|
|
82
82
|
/** Show the toolbar. Default `true`. */
|
|
83
83
|
toolbar?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Toolbar control set. `'full'` (default) is the editor toolbar (page nav,
|
|
86
|
+
* page input, zoom, fit-width, search, print). `'minimal'` is a lean,
|
|
87
|
+
* read-only control set — zoom out / in / preset only — for surfaces like
|
|
88
|
+
* signing where a signer just reads, scrolls, and occasionally zooms.
|
|
89
|
+
*/
|
|
90
|
+
toolbarVariant?: 'full' | 'minimal';
|
|
84
91
|
/** Accessible label for the viewer region. */
|
|
85
92
|
ariaLabel?: string;
|
|
86
93
|
/** Extra class names on the wrapper. */
|
|
@@ -26,9 +26,17 @@ export interface SignatureFieldProps extends Omit<ComponentPropsWithoutRef<'butt
|
|
|
26
26
|
label?: string;
|
|
27
27
|
/** Hard-disable the field (non-activatable, dimmed). Distinct from `state="signing"`. */
|
|
28
28
|
disabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Marks the field as the one currently targeted by field-to-field navigation
|
|
31
|
+
* (Next / Previous signature). Renders a **persistent** selection ring — not
|
|
32
|
+
* the transient `:focus-visible` ring — so the signer can see which field
|
|
33
|
+
* they're on as they step through, even after focus moves or is programmatic.
|
|
34
|
+
*/
|
|
35
|
+
active?: boolean;
|
|
29
36
|
}
|
|
30
37
|
declare const signatureFieldVariants: (props?: ({
|
|
31
38
|
state?: "signed" | "unsigned" | "signing" | null | undefined;
|
|
39
|
+
active?: boolean | null | undefined;
|
|
32
40
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
33
41
|
export declare const SignatureField: import("react").ForwardRefExoticComponent<SignatureFieldProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
34
42
|
export { signatureFieldVariants };
|
package/dist/index.js
CHANGED
|
@@ -160,12 +160,12 @@ import { C as Mm, a as km, b as Hm, c as wm } from "./_chunks/contact-profile-ca
|
|
|
160
160
|
import { P as Gm, p as Vm } from "./_chunks/practice-results-CtfciF2v.js";
|
|
161
161
|
import { P as Um, a as Km, p as Ym, b as qm } from "./_chunks/payment-request-card-B_lyobd0.js";
|
|
162
162
|
import { P as jm, f as zm, p as Xm, a as Jm, s as Zm, b as $m, c as al } from "./_chunks/payment-form-DJ9vnzrT.js";
|
|
163
|
-
import { P as rl, p as ol } from "./_chunks/pdf-viewer-
|
|
163
|
+
import { P as rl, p as ol } from "./_chunks/pdf-viewer-chMpwpA4.js";
|
|
164
164
|
import { R as sl, r as nl } from "./_chunks/reviews-panel-CPrXu5TX.js";
|
|
165
165
|
import { R as pl, r as ml, w as ll } from "./_chunks/rich-text-editor-B03qM22-.js";
|
|
166
166
|
import { S as cl, s as fl } from "./_chunks/signature-capture-COi0Uiqu.js";
|
|
167
|
-
import { S as Al, s as xl } from "./_chunks/signature-field-
|
|
168
|
-
import { S as ul, s as Sl } from "./_chunks/sign-document
|
|
167
|
+
import { S as Al, s as xl } from "./_chunks/signature-field-DbhbpLha.js";
|
|
168
|
+
import { S as ul, s as Sl } from "./_chunks/sign-document--nr5cxsB.js";
|
|
169
169
|
import { S as bl, f as Pl, i as Il } from "./_chunks/slot-grid-BlHHP9Qy.js";
|
|
170
170
|
import { C as El, a as hl, b as Fl, F as Nl, c as _l, d as Ll, P as Dl, e as yl, T as Ol, f as Bl, g as Ml, h as kl, l as Hl, i as wl, t as vl, r as Gl } from "./_chunks/tooth-scheme-CxlsLjfN.js";
|
|
171
171
|
import { T as Wl } from "./_chunks/transaction-chip-BZCa6XDn.js";
|