@superdoc-dev/esign 2.1.0-next.4 → 2.1.0-next.5
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/defaults/CheckboxInput.d.ts +2 -2
- package/dist/defaults/CheckboxInput.d.ts.map +1 -1
- package/dist/defaults/DownloadButton.d.ts +2 -2
- package/dist/defaults/DownloadButton.d.ts.map +1 -1
- package/dist/defaults/SignatureInput.d.ts +2 -2
- package/dist/defaults/SignatureInput.d.ts.map +1 -1
- package/dist/defaults/SubmitButton.d.ts +2 -2
- package/dist/defaults/SubmitButton.d.ts.map +1 -1
- package/dist/index.mjs +19 -46
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { FieldComponentProps } from '../types';
|
|
3
|
-
export declare const CheckboxInput:
|
|
3
|
+
export declare const CheckboxInput: FC<FieldComponentProps>;
|
|
4
4
|
//# sourceMappingURL=CheckboxInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxInput.d.ts","sourceRoot":"","sources":["../../src/defaults/CheckboxInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CheckboxInput.d.ts","sourceRoot":"","sources":["../../src/defaults/CheckboxInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,mBAAmB,CAYjD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { DownloadButtonProps, DownloadConfig } from '../types';
|
|
3
|
-
export declare const createDownloadButton: (config?: DownloadConfig) =>
|
|
3
|
+
export declare const createDownloadButton: (config?: DownloadConfig) => FC<DownloadButtonProps>;
|
|
4
4
|
//# sourceMappingURL=DownloadButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DownloadButton.d.ts","sourceRoot":"","sources":["../../src/defaults/DownloadButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DownloadButton.d.ts","sourceRoot":"","sources":["../../src/defaults/DownloadButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEpE,eAAO,MAAM,oBAAoB,GAAI,SAAS,cAAc,4BAkC3D,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { FieldComponentProps } from '../types';
|
|
3
|
-
export declare const SignatureInput:
|
|
3
|
+
export declare const SignatureInput: FC<FieldComponentProps>;
|
|
4
4
|
//# sourceMappingURL=SignatureInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureInput.d.ts","sourceRoot":"","sources":["../../src/defaults/SignatureInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SignatureInput.d.ts","sourceRoot":"","sources":["../../src/defaults/SignatureInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAiBlD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { SubmitButtonProps, SubmitConfig } from '../types';
|
|
3
|
-
export declare const createSubmitButton: (config?: SubmitConfig) =>
|
|
3
|
+
export declare const createSubmitButton: (config?: SubmitConfig) => FC<SubmitButtonProps>;
|
|
4
4
|
//# sourceMappingURL=SubmitButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmitButton.d.ts","sourceRoot":"","sources":["../../src/defaults/SubmitButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SubmitButton.d.ts","sourceRoot":"","sources":["../../src/defaults/SubmitButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEhE,eAAO,MAAM,kBAAkB,GAAI,SAAS,YAAY,0BAiCvD,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -5,40 +5,23 @@ const be = (u) => {
|
|
|
5
5
|
s.font = `italic ${o}px cursive`;
|
|
6
6
|
const i = s.measureText(u).width, m = o * 1.3, p = 4, k = 6;
|
|
7
7
|
return l.width = Math.ceil(i + p * 2) + 20, l.height = Math.ceil(m + k * 2), s.font = `italic ${o}px cursive`, s.fillStyle = "black", s.textAlign = "center", s.textBaseline = "middle", s.fillText(u, l.width / 2, l.height / 2), l.toDataURL("image/png");
|
|
8
|
-
}, we = ({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
onChange: (r) => l(r.target.value),
|
|
26
|
-
disabled: s,
|
|
27
|
-
placeholder: "Type your full name",
|
|
28
|
-
style: {
|
|
29
|
-
fontFamily: "cursive",
|
|
30
|
-
fontSize: "18px"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
)
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
), xe = ({
|
|
37
|
-
value: u,
|
|
38
|
-
onChange: l,
|
|
39
|
-
isDisabled: s,
|
|
40
|
-
label: o
|
|
41
|
-
}) => /* @__PURE__ */ b("label", { className: "superdoc-esign-checkbox-input", style: { display: "flex", gap: "8px" }, children: [
|
|
8
|
+
}, we = ({ value: u, onChange: l, isDisabled: s, label: o }) => /* @__PURE__ */ b("div", { className: "superdoc-esign-signature-input", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
9
|
+
o && /* @__PURE__ */ d("label", { children: o }),
|
|
10
|
+
/* @__PURE__ */ d(
|
|
11
|
+
"input",
|
|
12
|
+
{
|
|
13
|
+
type: "text",
|
|
14
|
+
value: String(u || ""),
|
|
15
|
+
onChange: (r) => l(r.target.value),
|
|
16
|
+
disabled: s,
|
|
17
|
+
placeholder: "Type your full name",
|
|
18
|
+
style: {
|
|
19
|
+
fontFamily: "cursive",
|
|
20
|
+
fontSize: "18px"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
] }), xe = ({ value: u, onChange: l, isDisabled: s, label: o }) => /* @__PURE__ */ b("label", { className: "superdoc-esign-checkbox-input", style: { display: "flex", gap: "8px" }, children: [
|
|
42
25
|
/* @__PURE__ */ d(
|
|
43
26
|
"input",
|
|
44
27
|
{
|
|
@@ -49,12 +32,7 @@ const be = (u) => {
|
|
|
49
32
|
}
|
|
50
33
|
),
|
|
51
34
|
/* @__PURE__ */ d("span", { children: o })
|
|
52
|
-
] }), Se = (u) => ({
|
|
53
|
-
onClick: s,
|
|
54
|
-
fileName: o,
|
|
55
|
-
isDisabled: r,
|
|
56
|
-
isDownloading: i
|
|
57
|
-
}) => {
|
|
35
|
+
] }), Se = (u) => ({ onClick: s, fileName: o, isDisabled: r, isDownloading: i }) => {
|
|
58
36
|
const m = u?.label || "Download", p = r || i;
|
|
59
37
|
return /* @__PURE__ */ b(
|
|
60
38
|
"button",
|
|
@@ -84,12 +62,7 @@ const be = (u) => {
|
|
|
84
62
|
]
|
|
85
63
|
}
|
|
86
64
|
);
|
|
87
|
-
}, Ce = (u) => ({
|
|
88
|
-
onClick: s,
|
|
89
|
-
isValid: o,
|
|
90
|
-
isDisabled: r,
|
|
91
|
-
isSubmitting: i
|
|
92
|
-
}) => {
|
|
65
|
+
}, Ce = (u) => ({ onClick: s, isValid: o, isDisabled: r, isSubmitting: i }) => {
|
|
93
66
|
const m = u?.label || "Submit", p = !o || r || i;
|
|
94
67
|
return /* @__PURE__ */ b(
|
|
95
68
|
"button",
|