@wix/form-elements 1.126.0 → 1.127.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.
Files changed (113) hide show
  1. package/dist/component/{appointment-rac-CYB_k6uF.js → appointment-rac-BrC7gcpn.js} +5 -5
  2. package/dist/component/{bookings-address-rac-yJjV3u5m.js → bookings-address-rac-D-UmBxjD.js} +1 -1
  3. package/dist/component/{bookings-email-rac-WkFgaEv5.js → bookings-email-rac-CjHDzU0Q.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-CJ1cBR5Z.js → bookings-first-name-rac-ChBkkkWm.js} +1 -1
  5. package/dist/component/{bookings-header-rac-DiC19ttR.js → bookings-header-rac-ERfGeYyw.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-Dx0Nt5Z_.js → bookings-last-name-rac-CuTJ7Y8w.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-CcW2nUYQ.js → bookings-login-bar-rac-pudlQ67l.js} +6 -6
  8. package/dist/component/{bookings-phone-rac-BMLrrTf6.js → bookings-phone-rac-nLPnLRfS.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-DIbRjzxZ.js → bookings-rich-text-rac-DOmGQlyG.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-3a6NYcNf.js → checkbox-field-rac-DLazY-iO.js} +45 -45
  11. package/dist/component/{checkbox-group-field-headless-CM-2wLJv.js → checkbox-group-field-headless-CPyWmFBH.js} +3 -3
  12. package/dist/component/{checkbox-group-field-rac-CNWwJ_No.js → checkbox-group-field-rac-Bir3gaI9.js} +6 -6
  13. package/dist/component/{checkbox-group-rac-F08XYJSA.js → checkbox-group-rac-BGXUl-sJ.js} +1 -1
  14. package/dist/component/{checkbox-indicator-module-classes-DOAYUQ_Q.js → checkbox-indicator-module-classes-Bqo0QILF.js} +1 -1
  15. package/dist/component/{checkbox-rac-z98USBLu.js → checkbox-rac-D_wZVUFV.js} +1 -1
  16. package/dist/component/{contacts-address-rac-DuodyS7l.js → contacts-address-rac-CNldSQbf.js} +1 -1
  17. package/dist/component/{contacts-birthdate-rac-BY7L9nWm.js → contacts-birthdate-rac-AVyldaRF.js} +1 -1
  18. package/dist/component/{contacts-company-rac-iPNPKhx2.js → contacts-company-rac-CiP1Ctpa.js} +1 -1
  19. package/dist/component/{contacts-email-rac-C7kBUzQH.js → contacts-email-rac-CzjMVEJZ.js} +1 -1
  20. package/dist/component/{contacts-first-name-rac-DvDNRs2q.js → contacts-first-name-rac-G0kE0HmA.js} +1 -1
  21. package/dist/component/{contacts-last-name-rac-Cls5_7W0.js → contacts-last-name-rac-cnTTtnMZ.js} +1 -1
  22. package/dist/component/{contacts-phone-rac-DMy2lBJl.js → contacts-phone-rac-DJ9oxox4.js} +1 -1
  23. package/dist/component/{contacts-position-rac-Bn21lF_i.js → contacts-position-rac-e0uQ-eqL.js} +1 -1
  24. package/dist/component/{contacts-subscribe-rac-QSC_n_T_.js → contacts-subscribe-rac-D4J2x78f.js} +1 -1
  25. package/dist/component/{contacts-tax-id-rac-BvqoePCN.js → contacts-tax-id-rac-DwJuNH-C.js} +1 -1
  26. package/dist/component/{date-availability-SErYnVtm.js → date-availability-D2BSwZ_r.js} +1 -1
  27. package/dist/component/{date-input-field-rac-H81WktJT.js → date-input-field-rac-ztJ02C60.js} +42 -42
  28. package/dist/component/{date-input-rac-C6ZeK0zQ.js → date-input-rac-D-SFsC6P.js} +1 -1
  29. package/dist/component/{date-picker-field-rac-BwSKny80.js → date-picker-field-rac-DaNwsa8z.js} +15 -15
  30. package/dist/component/{date-picker-rac-BB5zswk4.js → date-picker-rac-Bn0sA6P1.js} +1 -1
  31. package/dist/component/{date-time-input-field-rac-C4srGo4X.js → date-time-input-field-rac-D-ArMpcJ.js} +64 -64
  32. package/dist/component/{date-time-input-rac-6PXunNeR.js → date-time-input-rac-qYLa3IDx.js} +1 -1
  33. package/dist/component/{dext-checkbox-group-rac-B1GOhxW8.js → dext-checkbox-group-rac-Dir6tyvo.js} +2 -2
  34. package/dist/component/{dext-checkbox-rac-DVels76t.js → dext-checkbox-rac-ByiMc3BH.js} +1 -1
  35. package/dist/component/{dext-date-picker-rac-kKH7Nu_c.js → dext-date-picker-rac-BwOozu5y.js} +1 -1
  36. package/dist/component/{dext-date-time-input-rac-C2xk0pv1.js → dext-date-time-input-rac-CaJEzZa4.js} +1 -1
  37. package/dist/component/{dext-dropdown-rac-bd3XpA-l.js → dext-dropdown-rac-DJnMjggU.js} +1 -1
  38. package/dist/component/{dext-email-rac-BtEeJsrT.js → dext-email-rac-CF4SQ86l.js} +1 -1
  39. package/dist/component/{dext-number-input-rac-BLPAbm2q.js → dext-number-input-rac--3goVI8C.js} +1 -1
  40. package/dist/component/{dext-phone-rac-ByEP8XRg.js → dext-phone-rac-MYJYG040.js} +1 -1
  41. package/dist/component/{dext-radio-group-rac-AY271KFi.js → dext-radio-group-rac-Q2J5Hk5W.js} +4 -4
  42. package/dist/component/{dext-rating-input-rac-Dp9N8OWT.js → dext-rating-input-rac-CAWhD-lI.js} +1 -1
  43. package/dist/component/{dext-tags-rac-PgZGGDwj.js → dext-tags-rac-DyxI5ooy.js} +4 -4
  44. package/dist/component/{dext-text-area-rac-BN99TM9O.js → dext-text-area-rac-CZpM-r49.js} +1 -1
  45. package/dist/component/{dext-text-input-rac-C5TaQVi8.js → dext-text-input-rac-Bv5Mhyw6.js} +1 -1
  46. package/dist/component/{dext-url-input-rac-BvMh_jc6.js → dext-url-input-rac-BkbTjbAI.js} +1 -1
  47. package/dist/component/{donation-rac-BSCyAZPx.js → donation-rac-DZjFeJFy.js} +36 -36
  48. package/dist/component/{dropdown-field-headless-DzDE-6ha.js → dropdown-field-headless-C7l2TQYy.js} +16 -16
  49. package/dist/component/{dropdown-field-rac-mbYavQtS.js → dropdown-field-rac-DOAlecw8.js} +5 -5
  50. package/dist/component/{dropdown-rac-BUJag5ow.js → dropdown-rac-D8HtaeBe.js} +1 -1
  51. package/dist/component/{ecom-address-rac-B7_RYjoj.js → ecom-address-rac-B25o-GVv.js} +1 -1
  52. package/dist/component/{ecom-subscription-checkbox-rac-BCDyH7x-.js → ecom-subscription-checkbox-rac-NvdWnD0v.js} +2 -2
  53. package/dist/component/{email-input-field-rac-CUi08-gD.js → email-input-field-rac-rWyojsu0.js} +19 -19
  54. package/dist/component/{events-repeater-rac-CkHq7ADr.js → events-repeater-rac-D2HvNt0y.js} +11 -11
  55. package/dist/component/{events-rsvp-rac-DBwLvDeR.js → events-rsvp-rac-D4WLn0Bx.js} +4 -4
  56. package/dist/component/{field-error-headless-Ct41F8cQ.js → field-error-headless-DU0YsEXR.js} +6 -6
  57. package/dist/component/{field-label-headless-DUqBV42_.js → field-label-headless-CvdTZi6i.js} +1 -1
  58. package/dist/component/field-rac.module-BIBNQEOK.js +25 -0
  59. package/dist/component/{file-upload-rac-CkbjhtAl.js → file-upload-rac-CMelyfA8.js} +68 -68
  60. package/dist/component/{fixed-payment-rac-Dgnhsx3e.js → fixed-payment-rac-CewsqE-k.js} +9 -9
  61. package/dist/component/{form-Dx1bK3Fi.js → form-D9IxiDXP.js} +668 -617
  62. package/dist/component/form.css +1 -1
  63. package/dist/component/form.js +3 -3
  64. package/dist/component/{header-field-rac-BuUxOZO1.js → header-field-rac-CYBfb_5D.js} +6 -6
  65. package/dist/component/{header-rac-CIvWVvYs.js → header-rac-BIq3DmbL.js} +1 -1
  66. package/dist/component/{image-choice-rac-BBo0PiW4.js → image-choice-rac-aOObRIMi.js} +12 -12
  67. package/dist/component/{index-BDSs3l4d.js → index-BXqA4oNj.js} +15 -15
  68. package/dist/component/{index-BmMiwDw9.js → index-D-g3wQ-z.js} +43 -43
  69. package/dist/component/{isObjectLike-xZCFQW_t.js → isObjectLike-BNDXzCto.js} +7 -7
  70. package/dist/component/{multiline-address-field-rac-C6mRorOw.js → multiline-address-field-rac-BcTa7Von.js} +8 -8
  71. package/dist/component/{multiline-address-rac-BOjsVo4R.js → multiline-address-rac-Cd_BFreP.js} +1 -1
  72. package/dist/component/{number-input-field-rac-C89M-zOh.js → number-input-field-rac-_JlH34_3.js} +9 -9
  73. package/dist/component/{number-input-rac-DttY0Ll3.js → number-input-rac-CiM20ScT.js} +1 -1
  74. package/dist/component/{password-rac-C2KTrH40.js → password-rac-DrpXSY74.js} +32 -32
  75. package/dist/component/{payment-input-rac-BhyBxeu1.js → payment-input-rac-RnMeVWDc.js} +15 -15
  76. package/dist/component/{phone-input-field-rac-BT-Fe6WZ.js → phone-input-field-rac-nNp7D7gK.js} +39 -39
  77. package/dist/component/{phone-rac-B26qwlDN.js → phone-rac-B2JjPT2w.js} +1 -1
  78. package/dist/component/{product-list-rac-CF4gkfTK.js → product-list-rac-Cv_fjFn3.js} +28 -28
  79. package/dist/component/{quiz-radio-group-rac-Bf2HeDDw.js → quiz-radio-group-rac-CNqF6Tq3.js} +1 -1
  80. package/dist/component/{radio-button-module-classes-DtmmP89u.js → radio-button-module-classes-vqR4TN-z.js} +3 -3
  81. package/dist/component/{radio-group-field-rac-BY2OIFFr.js → radio-group-field-rac-Bpyr40q-.js} +5 -5
  82. package/dist/component/{radio-group-rac-BuxVel2l.js → radio-group-rac-DBLPP0YC.js} +1 -1
  83. package/dist/component/{rating-input-field-rac-CbLzvwyk.js → rating-input-field-rac-BOi0G37L.js} +10 -10
  84. package/dist/component/{rating-input-rac-B8QxNYHU.js → rating-input-rac-CxpmV0Pa.js} +1 -1
  85. package/dist/component/{rich-content-rac.module-wu4JPlkg.js → rich-content-rac.module-Dmm9GyQq.js} +1 -1
  86. package/dist/component/{rich-text-field-rac-CTrEe0SQ.js → rich-text-field-rac-C466OrTf.js} +9 -9
  87. package/dist/component/{rich-text-rac-kmzPTMKb.js → rich-text-rac-BvVxD7oJ.js} +1 -1
  88. package/dist/component/{service-dropdown-rac-C8nTy49F.js → service-dropdown-rac-pmUKH0sP.js} +14 -14
  89. package/dist/component/{services-multi-choice-rac-rDkpN2fs.js → services-multi-choice-rac-B65i6q2D.js} +7 -7
  90. package/dist/component/signature-rac-BRyM06Vz.js +918 -0
  91. package/dist/component/{submit-button-rac-BFywt2Fn.js → submit-button-rac-DaCRjZlQ.js} +15 -15
  92. package/dist/component/{tags-field-rac-rpzvIn_0.js → tags-field-rac-CEdfh-EQ.js} +17 -17
  93. package/dist/component/{tags-rac-DVLGSSvh.js → tags-rac-CGSTQ0qK.js} +1 -1
  94. package/dist/component/{text-area-field-rac-BfVrtvl8.js → text-area-field-rac-C-EHPWwQ.js} +15 -15
  95. package/dist/component/{text-area-rac-VP-yXdJ6.js → text-area-rac-Df1nSb2q.js} +1 -1
  96. package/dist/component/{text-input-field-rac-BlaXiXoF.js → text-input-field-rac-DmCZtBi_.js} +4 -4
  97. package/dist/component/{text-input-headless-ChCTtqUX.js → text-input-headless-DAxEZP1P.js} +8 -8
  98. package/dist/component/{text-input-rac-CG-Oo3nZ.js → text-input-rac-DgpO17dl.js} +1 -1
  99. package/dist/component/{time-input-rac-CzUGIr2X.js → time-input-rac-Dld_tLub.js} +10 -10
  100. package/dist/component/{url-input-field-rac-BHF6gZlT.js → url-input-field-rac-DHZ6bpxZ.js} +10 -10
  101. package/dist/component/{url-input-rac-DouQt3DF.js → url-input-rac-CZlWy5RB.js} +1 -1
  102. package/dist/component/{use-dropdown-option-class-name-AklIMCCI.js → use-dropdown-option-class-name-opBd-YJA.js} +3 -3
  103. package/dist/component/{use-dropdown-trigger-class-name-COJhxT4T.js → use-dropdown-trigger-class-name-BGQH0WCO.js} +10 -10
  104. package/dist/component/use-element-state-class-name-B2ecLjwN.js +20 -0
  105. package/dist/component/{use-hoverable-input-class-name-CtHJHqiV.js → use-hoverable-input-class-name-B42rAp82.js} +3 -3
  106. package/dist/component/{use-service-options-base-2u1I6l-t.js → use-service-options-base-D60-jNUT.js} +4 -4
  107. package/dist/component/use-text-input-class-name-DGpCdZ_e.js +6 -0
  108. package/dist/form.d.ts +10 -0
  109. package/package.json +2 -2
  110. package/dist/component/field-rac.module-DQxyEwK7.js +0 -26
  111. package/dist/component/signature-rac-6r_gWBD2.js +0 -794
  112. package/dist/component/use-element-state-class-name-CCe7Cvsu.js +0 -22
  113. package/dist/component/use-text-input-class-name-Bnfv7ZsJ.js +0 -6
@@ -1,794 +0,0 @@
1
- import s, { useRef as W, useCallback as C, useState as K, useEffect as Q, useMemo as De, isValidElement as Re } from "react";
2
- import { RicosViewer as we } from "@wix/ricos/viewer";
3
- import v from "classnames";
4
- import { useHover as ve, useFocusRing as Se, mergeProps as xe } from "react-aria";
5
- import { RadioGroup as Fe, Button as fe, TextField as Ae, Input as _e, RadioField as Ne, RadioButton as Pe } from "react-aria-components";
6
- import he from "signature_pad";
7
- import { aD as Ue, b5 as Oe, b1 as Be, bh as ge, E as ce, a6 as G, b9 as A, b6 as H, bb as Ee, bj as Me, I as ue, U as We, H as B, W as He, v as Ye, p as ke } from "./form-Dx1bK3Fi.js";
8
- import { f as I, a as F } from "./find-child-C60k4CxG.js";
9
- import { D as $e, E as Ve } from "./field-error-headless-Ct41F8cQ.js";
10
- import { L as ze } from "./field-label-headless-DUqBV42_.js";
11
- import { D as Ze } from "./data-hooks-Dkw1pbRj.js";
12
- import { E as Xe } from "./error-icon-hZxQ6DEy.js";
13
- import { s as V } from "./field-rac.module-DQxyEwK7.js";
14
- const Ge = typeof s.useId == "function" ? s.useId : () => W(Ue()).current;
15
- var R = /* @__PURE__ */ (function(e) {
16
- return e.TEXT = "text/plain", e.POINTS = "points/json", e;
17
- })({}), b = /* @__PURE__ */ (function(e) {
18
- return e.DRAW = "draw", e.TYPE = "type", e.UPLOAD = "upload", e;
19
- })({}), x = /* @__PURE__ */ (function(e) {
20
- return e.DRAW = "draw", e.TYPE = "type", e.IMAGE = "image", e.UPLOAD = "upload", e;
21
- })({});
22
- const qe = (e) => {
23
- const { actions: t, formId: a } = Oe(), n = t == null ? void 0 : t.uploadFile;
24
- return C(async (r) => {
25
- if (!n)
26
- throw new Error("No uploadFile action");
27
- const o = await n({
28
- file: r,
29
- formId: a,
30
- uploadTarget: e
31
- }), { id: i, displayName: l, url: c, isPrivate: d } = o;
32
- return {
33
- fileId: i,
34
- displayName: l || r.name,
35
- url: d ? void 0 : c,
36
- fileType: r.type
37
- };
38
- }, [
39
- n,
40
- a,
41
- e
42
- ]);
43
- };
44
- function je(e) {
45
- const a = z(1, 1).getContext("2d");
46
- a.fillStyle = e, a.fillRect(0, 0, 1, 1);
47
- const n = a.getImageData(0, 0, 1, 1);
48
- return n.data[0] * 65536 + n.data[1] * 256 + n.data[2];
49
- }
50
- const Je = (e, t) => {
51
- const a = je(e);
52
- return (n, r) => {
53
- const o = (r * t.width + n) * 4;
54
- return t.data[o] * 65536 + t.data[o + 1] * 256 + t.data[o + 2] === a;
55
- };
56
- }, Ke = (e) => (t, a) => {
57
- const n = (a * e.width + t) * 4;
58
- return e.data[n + 3] === 0;
59
- };
60
- function J(e, t) {
61
- const a = e.getContext("2d", {
62
- willReadFrequently: !0
63
- }), n = e.width, r = e.height, o = a.getImageData(0, 0, n, r), i = t ? Je(t, o) : Ke(o);
64
- let l = n + 1, c = -1, d = r + 1, u = -1, f = 0, m = 0;
65
- for (m = 0; m < r; m++)
66
- for (f = 0; f < n; f++)
67
- i(f, m) || (l > f && (l = f), c < f && (c = f), d > m && (d = m), u < m && (u = m));
68
- const h = c - l, E = u - d;
69
- if (h < 0 || E < 0)
70
- return null;
71
- const p = a.getImageData(l, d, h, E), L = document.createElement("canvas"), y = L.getContext("2d");
72
- return L.width = h, L.height = E, t ? (y.fillStyle = t, y.fillRect(0, 0, h, E)) : y.clearRect(0, 0, h, E), y.putImageData(p, 0, 0), L;
73
- }
74
- function z(e, t, a) {
75
- const n = document.createElement("canvas");
76
- if (n.width = e, n.height = t, a) {
77
- const r = n.getContext("2d", {
78
- willReadFrequently: !0
79
- });
80
- r == null || r.scale(a, a);
81
- }
82
- return n;
83
- }
84
- function Qe(e, t) {
85
- return new Promise((a, n) => {
86
- const r = new Image();
87
- r.onload = () => {
88
- const o = z(r.width, r.height), i = o.getContext("2d", {
89
- willReadFrequently: !0
90
- });
91
- i == null || i.drawImage(r, 0, 0), a(o);
92
- }, r.onerror = n, r.src = e;
93
- });
94
- }
95
- function de(e, t, a, n) {
96
- const r = e.width, o = e.height, i = 1, l = a / o, c = Math.min(l, i), d = r * c, u = o * c, f = z(d, u), m = f.getContext("2d");
97
- return n && m && (m.fillStyle = n, m.fillRect(0, 0, d, u)), m == null || m.drawImage(e, 0, 0, r, o, 0, 0, d, u), f;
98
- }
99
- function me(e, t) {
100
- const a = e.getContext("2d"), n = e.offsetWidth, r = e.offsetHeight, o = Math.max(window.devicePixelRatio || 1, 1), i = n * o, l = r * o;
101
- return (e.width !== i || e.height !== l) && a ? (e.width = i, e.height = l, a.scale(o, o), t == null || t.redraw(), !0) : !1;
102
- }
103
- const M = 480, et = (e) => Te({
104
- data: JSON.stringify(e),
105
- mimeType: R.POINTS
106
- }), Le = (e) => {
107
- const t = P(e);
108
- if ((t == null ? void 0 : t.mimeType) === R.POINTS)
109
- try {
110
- return JSON.parse(t.data);
111
- } catch {
112
- return null;
113
- }
114
- return null;
115
- }, pe = 0.8, be = "Madefor";
116
- function ye(e, t) {
117
- const { width: a, actualBoundingBoxAscent: n, actualBoundingBoxDescent: r } = t.measureText(e);
118
- return {
119
- width: a,
120
- height: n + r,
121
- offsetY: n
122
- };
123
- }
124
- function tt(e, t) {
125
- const a = t.getContext("2d"), n = t.offsetWidth || t.width, o = (t.offsetHeight || t.height) * pe, i = n * pe;
126
- a.font = `${o}px ${be}`;
127
- const { width: l, height: c } = ye(e, a), d = o / (l / i), u = o / (c / o);
128
- return Math.min(d, u);
129
- }
130
- function nt(e, t, a = "black", n = !1, r) {
131
- const o = e.getContext("2d"), i = tt(t, e);
132
- o.font = `${i}px ${be}`, o.textBaseline = "top";
133
- const l = e.offsetWidth || e.width, c = e.offsetHeight || e.height, { width: d, height: u, offsetY: f } = ye(t, o);
134
- o.fillStyle = r, o.fillRect(0, 0, l, c), o.fillStyle = a;
135
- const m = (l - d) / 2;
136
- o.fillText(t, n ? l - m : m, (c - u) / 2 + f);
137
- }
138
- const Ie = /^data:([^;,]+)(?:;([^,]+))?,(.+)$/;
139
- function at(e) {
140
- return Ie.test(e);
141
- }
142
- function P(e) {
143
- if (!e)
144
- return;
145
- const t = e.match(Ie);
146
- if (!t)
147
- return;
148
- const [, a, n, r] = t;
149
- return {
150
- data: n === "base64" ? atob(r) : decodeURI(r),
151
- mimeType: a,
152
- encoding: n
153
- };
154
- }
155
- function Te({ data: e, mimeType: t, encoding: a = "text" }) {
156
- const n = a === "base64" ? btoa(e) : encodeURI(e);
157
- return `data:${a === "base64" ? `${t};base64` : t},${n}`;
158
- }
159
- function rt(e, t) {
160
- const a = P(e);
161
- if (!a)
162
- return;
163
- let n = a.data.length;
164
- const r = new Uint8Array(n);
165
- for (; n--; )
166
- r[n] = a.data.charCodeAt(n);
167
- const o = a.mimeType.split("/")[1] ?? "txt";
168
- return new File([
169
- r
170
- ], `${t}.${o}`, {
171
- type: a.mimeType
172
- });
173
- }
174
- function ee(e, t = "temp") {
175
- const a = P(e);
176
- return {
177
- fileId: "temp",
178
- displayName: t,
179
- url: e,
180
- fileType: (a == null ? void 0 : a.mimeType) ?? ""
181
- };
182
- }
183
- async function ot(e, t) {
184
- const a = P(e);
185
- if (!a)
186
- return e;
187
- const n = a.mimeType;
188
- if (n === R.TEXT) {
189
- const r = z(M * 20, M, 1);
190
- nt(r, a.data, "black", t, "white");
191
- const o = J(r, "white");
192
- return (o == null ? void 0 : o.toDataURL("image/jpeg", 0.7)) ?? null;
193
- }
194
- if (n === R.POINTS) {
195
- const r = Le(e);
196
- if (!r)
197
- return null;
198
- const o = r.map((u) => ({
199
- ...u,
200
- penColor: "black"
201
- })), i = z(M * 20, M, Math.max(window.devicePixelRatio || 1, 1));
202
- new he(i).fromData(o);
203
- const c = J(i);
204
- return c ? de(c, void 0, M, "white").toDataURL("image/jpeg", 0.7) : null;
205
- }
206
- if (n != null && n.startsWith("image/")) {
207
- const r = await Qe(e), o = J(r);
208
- return o ? de(o, void 0, M).toDataURL("image/jpeg", 0.7) : null;
209
- }
210
- return e;
211
- }
212
- async function st(e, t) {
213
- const a = await ot(e, t);
214
- if (a)
215
- return rt(a, "signature");
216
- }
217
- const it = ({ value: e, onChange: t, target: a }) => {
218
- const [n, r] = K(e), { isRTL: o } = Be(), i = qe(a), { setFormStatus: l } = ge(), c = W();
219
- Q(() => {
220
- e === ce && r(ce);
221
- }, [
222
- e
223
- ]);
224
- const d = C(() => {
225
- c.current && (clearTimeout(c.current), c.current = null);
226
- }, []), u = n == null ? void 0 : n[0], f = u != null && u.url ? P(u.url) : void 0, m = C(async (E) => {
227
- try {
228
- const p = (E == null ? void 0 : E.url) ?? "";
229
- if (at(p)) {
230
- const L = await st(p, o);
231
- if (L) {
232
- const y = await i(L);
233
- t([
234
- y
235
- ]);
236
- } else
237
- r(void 0), t(void 0);
238
- }
239
- c.current = null;
240
- } finally {
241
- l(a, G.READY);
242
- }
243
- }, [
244
- l,
245
- a,
246
- o,
247
- i,
248
- t
249
- ]);
250
- return {
251
- handleChange: C((E) => {
252
- const p = (L) => {
253
- c.current = setTimeout(() => m(L), 1500);
254
- };
255
- E ? (c.current && (clearTimeout(c.current), c.current = null), r([
256
- E
257
- ]), p(E)) : (t == null || t(null), r(void 0), l(a, G.READY));
258
- }, [
259
- m,
260
- t,
261
- l,
262
- a
263
- ]),
264
- signature: u,
265
- decodedValue: f,
266
- cancelUpload: d
267
- };
268
- }, lt = ({ target: e, value: t, onChange: a }) => {
269
- const { handleChange: n, cancelUpload: r, signature: o, decodedValue: i } = it({
270
- value: t,
271
- onChange: a,
272
- target: e
273
- }), [l, c] = K(() => {
274
- if (o == null)
275
- return b.DRAW;
276
- switch (i == null ? void 0 : i.mimeType) {
277
- case R.POINTS:
278
- return b.DRAW;
279
- case R.TEXT:
280
- return b.TYPE;
281
- default:
282
- return b.UPLOAD;
283
- }
284
- }), { setFormStatus: d } = ge(), u = C(() => {
285
- r(), d(e, G.BUSY);
286
- }, [
287
- r,
288
- d,
289
- e
290
- ]), f = C(() => {
291
- r(), n(null), d(e, G.READY);
292
- }, [
293
- r,
294
- n,
295
- d,
296
- e
297
- ]), m = o != null, h = ut(l, o, i), E = (() => {
298
- switch (l) {
299
- case b.DRAW:
300
- return x.DRAW;
301
- case b.TYPE:
302
- return x.TYPE;
303
- case b.UPLOAD:
304
- return h != null ? x.IMAGE : x.UPLOAD;
305
- default:
306
- return x.DRAW;
307
- }
308
- })();
309
- return {
310
- signature: o,
311
- decodedValue: i,
312
- signatureMode: l,
313
- clearable: m,
314
- signatureValueForView: h,
315
- signatureView: E,
316
- handleChange: n,
317
- setSignatureMode: c,
318
- handleBeforeChange: u,
319
- handleClear: f
320
- };
321
- }, ct = {
322
- [b.DRAW]: (e) => (e == null ? void 0 : e.mimeType) === R.POINTS,
323
- [b.TYPE]: (e) => (e == null ? void 0 : e.mimeType) === R.TEXT,
324
- [b.UPLOAD]: (e) => (e == null ? void 0 : e.mimeType) !== R.POINTS && (e == null ? void 0 : e.mimeType) !== R.TEXT
325
- };
326
- function ut(e, t, a) {
327
- return t && ct[e](a) ? t : void 0;
328
- }
329
- const dt = (e) => {
330
- const t = e.url ? P(e.url) : void 0;
331
- return t ? t.mimeType !== R.POINTS && t.mimeType !== R.TEXT : !0;
332
- }, te = () => {
333
- const { hoverProps: e, isHovered: t } = ve({}), { focusProps: a, isFocused: n, isFocusVisible: r } = Se({
334
- within: !0
335
- });
336
- return {
337
- ...xe(e, a),
338
- "data-hovered": t || void 0,
339
- "data-focus-within": n || void 0,
340
- "data-focus-visible": r || void 0
341
- };
342
- }, g = ({ children: e }) => {
343
- const { id: t, FieldLayout: a } = A(), n = I(e, g.Label), r = I(e, g.Input), o = I(e, g.Description), i = I(e, g.Error);
344
- return /* @__PURE__ */ s.createElement(a, {
345
- fieldId: t,
346
- renderLabel: () => n,
347
- renderInput: () => r,
348
- renderDescription: () => /* @__PURE__ */ s.createElement(s.Fragment, null, i, o)
349
- });
350
- }, Z = ({ children: e }) => {
351
- const { value: t, onChange: a, target: n, readOnly: r } = A(), { signatureMode: o, setSignatureMode: i, handleClear: l, clearable: c, signatureView: d, signatureValueForView: u, handleChange: f, handleBeforeChange: m } = lt({
352
- target: n,
353
- value: t,
354
- onChange: a
355
- }), h = I(e, Z.Header), E = I(e, Z.Value), p = {
356
- signatureMode: o,
357
- setSignatureMode: i,
358
- handleClear: l,
359
- clearable: c,
360
- signatureView: d,
361
- signatureValueForView: u,
362
- handleChange: f,
363
- handleBeforeChange: m
364
- };
365
- return /* @__PURE__ */ s.createElement(s.Fragment, null, !r && F(h, p), F(E, p));
366
- }, X = ({ children: e, className: t, ...a }) => {
367
- const { signatureMode: n, setSignatureMode: r, clearable: o, handleClear: i } = a, { uploadEnabled: l } = A(), c = I(e, X.Tabs), d = I(e, X.Clear);
368
- return /* @__PURE__ */ s.createElement("div", {
369
- className: t
370
- }, F(c, {
371
- signatureMode: n,
372
- setSignatureMode: r,
373
- uploadEnabled: l
374
- }), o && F(d, {
375
- handleClear: i
376
- }));
377
- }, _ = ({ children: e, className: t, ...a }) => {
378
- const { signatureMode: n, setSignatureMode: r, uploadEnabled: o } = a, { disabled: i } = A(), { labelId: l, inputId: c } = H(), d = C((h) => {
379
- r(h);
380
- }, [
381
- r
382
- ]), u = {
383
- [b.DRAW]: I(e, _.Draw),
384
- [b.TYPE]: I(e, _.Type),
385
- [b.UPLOAD]: o ? I(e, _.Upload) : null
386
- }, f = u[n], m = mt(f) ? f.props.description : void 0;
387
- return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("div", {
388
- role: "status",
389
- "aria-live": "polite",
390
- style: {
391
- position: "absolute",
392
- left: "-10000px",
393
- width: "1px",
394
- height: "1px",
395
- overflow: "hidden"
396
- }
397
- }, m), /* @__PURE__ */ s.createElement(Fe, {
398
- value: n,
399
- onChange: d,
400
- isDisabled: i,
401
- "aria-labelledby": l,
402
- "aria-controls": c,
403
- "data-hook": Ze.SIGNATURE_FIELD_MODE_SELECT,
404
- className: t
405
- }, u[b.DRAW], u[b.TYPE], u[b.UPLOAD]));
406
- }, mt = (e) => /* @__PURE__ */ Re(e), ne = ({ mode: e, children: t, className: a, "aria-label": n }) => /* @__PURE__ */ s.createElement(Ne, {
407
- value: e,
408
- "aria-label": n
409
- }, /* @__PURE__ */ s.createElement(Pe, {
410
- "data-hook": `signature-mode-${e}`,
411
- className: a
412
- }, t)), pt = (e) => /* @__PURE__ */ s.createElement(ne, {
413
- ...e,
414
- mode: b.DRAW
415
- }), ft = (e) => /* @__PURE__ */ s.createElement(ne, {
416
- ...e,
417
- mode: b.TYPE
418
- }), ht = (e) => /* @__PURE__ */ s.createElement(ne, {
419
- ...e,
420
- mode: b.UPLOAD
421
- }), gt = ({ children: e, className: t, "aria-label": a, ...n }) => {
422
- const { handleClear: r } = n, { disabled: o, target: i } = A(), { inputId: l } = H();
423
- return /* @__PURE__ */ s.createElement(fe, {
424
- onPress: r,
425
- isDisabled: o,
426
- "aria-label": a,
427
- "aria-controls": l,
428
- "data-hook": `clear-${i}`,
429
- className: t
430
- }, e);
431
- }, N = ({ children: e, className: t, ...a }) => {
432
- const { signatureView: n, signatureValueForView: r, handleChange: o, handleBeforeChange: i } = a, { disabled: l, readOnly: c, onBlur: d, onFocus: u, hasError: f } = A(), m = I(e, N.Canvas), h = I(e, N.Type), E = I(e, N.Upload);
433
- return /* @__PURE__ */ s.createElement("div", {
434
- className: t,
435
- "data-hook": "signature-input",
436
- "data-invalid": f,
437
- "data-disabled": l,
438
- "data-readonly": c
439
- }, n === x.DRAW && F(m, {
440
- value: r,
441
- onChange: o,
442
- onBeforeChange: i,
443
- disabled: l,
444
- readOnly: c,
445
- onBlur: d,
446
- onFocus: u
447
- }), n === x.TYPE && F(h, {
448
- value: r,
449
- onChange: o,
450
- onBeforeChange: i,
451
- disabled: l,
452
- readOnly: c,
453
- onBlur: d,
454
- onFocus: u
455
- }), (n === x.UPLOAD || n === x.IMAGE) && F(E, {
456
- value: r,
457
- onChange: o,
458
- onBeforeChange: i,
459
- disabled: l,
460
- readOnly: c,
461
- onBlur: d,
462
- onFocus: u
463
- }));
464
- }, Et = ({ className: e, emptyLabel: t, signedLabel: a, ...n }) => {
465
- const { value: r, onChange: o, onBeforeChange: i, disabled: l, readOnly: c, onBlur: d, onFocus: u } = n, { id: f } = A(), { inputId: m, ariaDescribedBy: h } = H(), E = te(), p = W(), L = W(), y = W(null), S = r == null ? void 0 : r.url, [U, Y] = K(!1);
466
- Ee(() => {
467
- var D;
468
- (D = L.current) == null || D.focus();
469
- }, f);
470
- const w = De(() => ({
471
- throttle: 0,
472
- dotSize: 2,
473
- minWidth: 1,
474
- maxWidth: 3,
475
- velocityFilterWeight: 0.2
476
- }), []), oe = C(() => {
477
- var O, k, $;
478
- if ((O = p.current) != null && O.isEmpty())
479
- return "";
480
- const D = (k = p.current) == null ? void 0 : k.toData();
481
- return D ? et(D) : (($ = p.current) == null ? void 0 : $.toDataURL()) ?? "";
482
- }, []), q = C(() => {
483
- var O;
484
- const D = (O = p.current) == null ? void 0 : O.isEmpty();
485
- Y(!D), o(ee(oe()));
486
- }, [
487
- oe,
488
- o
489
- ]), j = C(() => {
490
- i == null || i();
491
- }, [
492
- i
493
- ]), Ce = C((D) => {
494
- var k, $, se, ie;
495
- if (D != null) {
496
- if (L.current = D, p.current = new he(D, {
497
- ...w,
498
- penColor: getComputedStyle(D).color || void 0
499
- }), me(L.current, p.current), S) {
500
- const le = Le(S);
501
- le && (p.current.fromData(le), Y(!0));
502
- } else
503
- p.current.clear(), Y(!1);
504
- p.current.addEventListener("beginStroke", j), p.current.addEventListener("endStroke", q), typeof ResizeObserver < "u" && !y.current && (y.current = new ResizeObserver(() => {
505
- L.current && me(L.current, p == null ? void 0 : p.current);
506
- })), (k = y.current) == null || k.observe(D);
507
- } else
508
- ($ = y.current) == null || $.disconnect(), (se = p.current) == null || se.removeEventListener("endStroke", q), (ie = p.current) == null || ie.removeEventListener("beginStroke", j);
509
- }, [
510
- w,
511
- S,
512
- j,
513
- q
514
- ]);
515
- return Q(() => {
516
- p.current && (c || l ? p.current.off() : p.current.on());
517
- }, [
518
- l,
519
- c
520
- ]), /* @__PURE__ */ s.createElement("div", {
521
- className: e,
522
- ...E
523
- }, /* @__PURE__ */ s.createElement("canvas", {
524
- ref: Ce,
525
- id: m,
526
- "data-hook": "signature-canvas",
527
- "data-input-id": m,
528
- "data-has-value": !!S,
529
- onFocus: u,
530
- onBlur: d,
531
- role: "img",
532
- "aria-label": U ? a : t,
533
- "aria-describedby": h
534
- }));
535
- }, ae = ({ children: e, className: t, ...a }) => {
536
- const { value: n, onChange: r, onBeforeChange: o, disabled: i, readOnly: l, onBlur: c, onFocus: d } = a, { id: u, required: f, hasError: m } = A(), { inputId: h, ariaDescribedBy: E, labelId: p } = H(), L = te(), y = n != null && n.url ? P(n.url) : void 0, { data: S = "" } = y ?? {
537
- data: ""
538
- };
539
- Ee(() => {
540
- const w = document.getElementById(h);
541
- w == null || w.focus({
542
- preventScroll: !0
543
- });
544
- }, u), Q(() => {
545
- if (!n) {
546
- const w = document.getElementById(h);
547
- w && (w.value = "");
548
- }
549
- }, [
550
- n,
551
- h
552
- ]);
553
- const U = C((w) => {
554
- o == null || o(), w.trim() ? r(ee(Te({
555
- data: w,
556
- mimeType: R.TEXT
557
- }))) : r(null);
558
- }, [
559
- o,
560
- r
561
- ]), Y = I(e, ae.Value);
562
- return /* @__PURE__ */ s.createElement(Ae, {
563
- "aria-labelledby": p,
564
- value: S,
565
- onChange: U,
566
- onBlur: c,
567
- onFocus: d,
568
- isDisabled: i,
569
- isReadOnly: l,
570
- isRequired: f,
571
- isInvalid: m,
572
- validationBehavior: "aria"
573
- }, /* @__PURE__ */ s.createElement("div", {
574
- className: t,
575
- ...L
576
- }, F(Y, {
577
- inputId: h,
578
- ariaDescribedBy: E
579
- })));
580
- }, Lt = ({ className: e, placeholder: t, ...a }) => {
581
- const { inputId: n, ariaDescribedBy: r } = a;
582
- return /* @__PURE__ */ s.createElement(_e, {
583
- id: n,
584
- "data-hook": "signature-text",
585
- "aria-describedby": r,
586
- placeholder: t,
587
- className: e
588
- });
589
- }, bt = {
590
- display: "none"
591
- }, re = ({ children: e, className: t, imageAlt: a, ...n }) => {
592
- const { value: r, onChange: o, disabled: i, readOnly: l, onBlur: c, onFocus: d } = n, { inputId: u } = H(), f = te(), m = I(e, re.Button), h = W(null), E = C((L) => {
593
- const y = L.target.files;
594
- if (!y || y.length === 0) {
595
- o(null);
596
- return;
597
- }
598
- const S = y[0], U = new FileReader();
599
- U.onload = function() {
600
- o(ee(this.result, S.name));
601
- }, U.readAsDataURL(S);
602
- }, [
603
- o
604
- ]), p = r && dt(r);
605
- return /* @__PURE__ */ s.createElement("div", {
606
- className: t,
607
- "data-has-value": p || void 0,
608
- ...f
609
- }, /* @__PURE__ */ s.createElement("input", {
610
- ref: h,
611
- type: "file",
612
- accept: "image/*",
613
- onChange: E,
614
- disabled: i || l,
615
- style: bt,
616
- "aria-hidden": "true",
617
- tabIndex: -1
618
- }), !p && F(m, {
619
- fileInputRef: h,
620
- disabled: i,
621
- readOnly: l,
622
- onBlur: c,
623
- onFocus: d
624
- }), p && (r.url ? /* @__PURE__ */ s.createElement("img", {
625
- id: u,
626
- src: r.url,
627
- alt: r.displayName || a,
628
- "data-hook": "signature-image"
629
- }) : /* @__PURE__ */ s.createElement("span", {
630
- id: u,
631
- "data-hook": "signature-image"
632
- }, r.displayName || a)));
633
- }, yt = ({ children: e, className: t, ...a }) => {
634
- const { fileInputRef: n, disabled: r, readOnly: o, onBlur: i, onFocus: l } = a, { inputId: c, ariaDescribedBy: d, labelId: u } = H(), f = Ge(), m = C(() => {
635
- var h;
636
- (h = n.current) == null || h.click();
637
- }, [
638
- n
639
- ]);
640
- return /* @__PURE__ */ s.createElement(fe, {
641
- id: c,
642
- onPress: m,
643
- onBlur: i,
644
- onFocus: l,
645
- isDisabled: r || o,
646
- "aria-labelledby": `${u} ${f}`,
647
- "aria-describedby": d,
648
- "data-hook": "signature-upload",
649
- className: t
650
- }, /* @__PURE__ */ s.createElement("span", {
651
- id: f
652
- }, e));
653
- };
654
- g.Label = ze;
655
- g.Input = Z;
656
- g.Description = $e;
657
- g.Error = Ve;
658
- Z.Header = X;
659
- Z.Value = N;
660
- X.Tabs = _;
661
- X.Clear = gt;
662
- _.Draw = pt;
663
- _.Type = ft;
664
- _.Upload = ht;
665
- N.Canvas = Et;
666
- N.Type = ae;
667
- N.Upload = re;
668
- ae.Value = Lt;
669
- re.Button = yt;
670
- const It = () => {
671
- const { t: e } = Me();
672
- return {
673
- drawLabel: e("field.signature.mode.draw.label"),
674
- typeLabel: e("field.signature.mode.type.label"),
675
- uploadModeLabel: e("field.signature.mode.upload.label"),
676
- drawDescription: e("field.signature.mode.draw.description"),
677
- typeDescription: e("field.signature.mode.type.description"),
678
- uploadDescription: e("field.signature.mode.upload.description"),
679
- clearLabel: e("field.signature.clear-button.label"),
680
- emptyLabel: e("field.signature.canvas.aria-label.empty"),
681
- signedLabel: e("field.signature.canvas.aria-label.signed"),
682
- placeholder: e("field.signature.text.placeholder"),
683
- imageAlt: e("field.signature.a11y.state.signed"),
684
- uploadLabel: e("field.signature.settings.upload-button.label")
685
- };
686
- }, Tt = (e) => /* @__PURE__ */ s.createElement("svg", {
687
- viewBox: "0 0 24 24",
688
- width: 24,
689
- height: 24,
690
- fill: "currentColor",
691
- "aria-hidden": "true",
692
- ...e
693
- }, /* @__PURE__ */ s.createElement("path", {
694
- fillRule: "evenodd",
695
- d: "M13.5,3 C14.327,3 15,3.673 15,4.5 L15,4.5 L15,5 L19,5 L19,6 L18,6 L18,17.5 C18,18.879 16.878,20 15.5,20 L15.5,20 L7.5,20 C6.122,20 5,18.879 5,17.5 L5,17.5 L5,6 L4,6 L4,5 L8,5 L8,4.5 C8,3.673 8.673,3 9.5,3 L9.5,3 Z M17,6 L6,6 L6,17.5 C6,18.327 6.673,19 7.5,19 L7.5,19 L15.5,19 C16.327,19 17,18.327 17,17.5 L17,17.5 L17,6 Z M10,9 L10,16 L9,16 L9,9 L10,9 Z M14,9 L14,16 L13,16 L13,9 L14,9 Z M13.5,4 L9.5,4 C9.224,4 9,4.225 9,4.5 L9,4.5 L9,5 L14,5 L14,4.5 C14,4.225 13.776,4 13.5,4 L13.5,4 Z"
696
- })), Ct = (e) => /* @__PURE__ */ s.createElement("svg", {
697
- viewBox: "0 0 24 24",
698
- width: 24,
699
- height: 24,
700
- fill: "currentColor",
701
- "aria-hidden": "true",
702
- ...e
703
- }, /* @__PURE__ */ s.createElement("path", {
704
- fillRule: "evenodd",
705
- d: "M4.9937,15.9971 L4.9937,18.4971 C4.9937,18.7721 5.2177,18.9971 5.4937,18.9971 L5.4937,18.9971 L17.4937,18.9971 C17.7697,18.9971 17.9937,18.7721 17.9937,18.4971 L17.9937,18.4971 L17.9937,15.9971 L18.9937,15.9971 L18.9937,18.4971 C18.9937,19.3241 18.3207,19.9971 17.4937,19.9971 L17.4937,19.9971 L5.4937,19.9971 C4.6657,19.9971 3.9937,19.3241 3.9937,18.4971 L3.9937,18.4971 L3.9937,15.9971 L4.9937,15.9971 Z M11.9933,4 L11.9933,14.078 L15.0293,11.043 L15.7363,11.75 L11.4933,15.992 L7.2513,11.75 L7.9583,11.043 L10.9933,14.078 L10.9933,4 L11.9933,4 Z"
706
- })), Dt = (e) => /* @__PURE__ */ s.createElement("svg", {
707
- viewBox: "0 0 24 24",
708
- width: 24,
709
- height: 24,
710
- fill: "currentColor",
711
- "aria-hidden": "true",
712
- ...e
713
- }, /* @__PURE__ */ s.createElement("path", {
714
- fillRule: "evenodd",
715
- d: "M18.8525,7.543 L17.7515,8.644 L15.3565,6.248 L16.4575,5.147 C16.5555,5.05 16.6835,5.001 16.8105,5.001 C16.9385,5.001 17.0665,5.05 17.1645,5.147 L18.8525,6.835 C19.0475,7.03 19.0475,7.348 18.8525,7.543 L18.8525,7.543 Z M8.1895,18.206 C8.1185,18.276 8.0275,18.324 7.9295,18.344 L5.1275,18.873 L5.6575,16.07 C5.6755,15.972 5.7225,15.882 5.7945,15.811 L14.6495,6.955 L17.0445,9.351 L8.1895,18.206 Z M19.5595,6.128 L17.8715,4.44 C17.2865,3.856 16.3355,3.856 15.7505,4.44 L5.0875,15.103 C4.8735,15.317 4.7295,15.588 4.6745,15.886 L4.0085,19.407 C3.9775,19.569 4.0295,19.736 4.1465,19.854 C4.2415,19.948 4.3685,20 4.4995,20 C4.5305,20 4.5615,19.997 4.5925,19.991 L8.1165,19.326 C8.4145,19.269 8.6855,19.125 8.8965,18.912 L19.5595,8.25 C20.1445,7.665 20.1445,6.713 19.5595,6.128 L19.5595,6.128 Z"
716
- })), Rt = (e) => /* @__PURE__ */ s.createElement("svg", {
717
- viewBox: "0 0 20 20",
718
- width: 24,
719
- height: 24,
720
- fill: "currentColor",
721
- "aria-hidden": "true",
722
- ...e
723
- }, /* @__PURE__ */ s.createElement("path", {
724
- fillRule: "evenodd",
725
- d: "M12,4 L12,5 L8,5 L8,16 L7,16 L7,5 L3,5 L3,4 L12,4 Z M18,8 L18,9 L15,9 L15,16 L14,16 L14,9 L11,9 L11,8 L18,8 Z"
726
- })), wt = "_header_15ti0_1", vt = "_tabs_15ti0_8", St = "_tab_15ti0_8", xt = "_tabIcon_15ti0_74", Ft = "_clear_15ti0_81", At = "_value_15ti0_113", _t = "_box_15ti0_118", Nt = "_uploadBox_15ti0_119", Pt = "_typeInput_15ti0_230", T = {
727
- header: wt,
728
- tabs: vt,
729
- tab: St,
730
- tabIcon: xt,
731
- clear: Ft,
732
- value: At,
733
- box: _t,
734
- uploadBox: Nt,
735
- typeInput: Pt
736
- }, Ut = ({ content: e, locale: t }) => /* @__PURE__ */ s.createElement(we, {
737
- content: e,
738
- locale: t
739
- }), Ot = () => {
740
- const e = It();
741
- return /* @__PURE__ */ s.createElement(g, null, /* @__PURE__ */ s.createElement(g.Label, {
742
- className: v(ue, V.label)
743
- }, /* @__PURE__ */ s.createElement(g.Label.Required, {
744
- className: v(We, V.requiredMark)
745
- })), /* @__PURE__ */ s.createElement(g.Input, null, /* @__PURE__ */ s.createElement(g.Input.Header, {
746
- className: T.header
747
- }, /* @__PURE__ */ s.createElement(g.Input.Header.Tabs, {
748
- className: T.tabs
749
- }, /* @__PURE__ */ s.createElement(g.Input.Header.Tabs.Draw, {
750
- className: v(B, T.tab),
751
- "aria-label": e.drawLabel,
752
- description: e.drawDescription
753
- }, /* @__PURE__ */ s.createElement(Dt, {
754
- className: T.tabIcon
755
- })), /* @__PURE__ */ s.createElement(g.Input.Header.Tabs.Type, {
756
- className: v(B, T.tab),
757
- "aria-label": e.typeLabel,
758
- description: e.typeDescription
759
- }, /* @__PURE__ */ s.createElement(Rt, {
760
- className: T.tabIcon
761
- })), /* @__PURE__ */ s.createElement(g.Input.Header.Tabs.Upload, {
762
- className: v(B, T.tab),
763
- "aria-label": e.uploadModeLabel,
764
- description: e.uploadDescription
765
- }, /* @__PURE__ */ s.createElement(Ct, {
766
- className: T.tabIcon
767
- }))), /* @__PURE__ */ s.createElement(g.Input.Header.Clear, {
768
- className: v(ue, T.clear),
769
- "aria-label": e.clearLabel
770
- }, /* @__PURE__ */ s.createElement(Tt, null))), /* @__PURE__ */ s.createElement(g.Input.Value, {
771
- className: T.value
772
- }, /* @__PURE__ */ s.createElement(g.Input.Value.Canvas, {
773
- className: v(B, T.box),
774
- emptyLabel: e.emptyLabel,
775
- signedLabel: e.signedLabel
776
- }), /* @__PURE__ */ s.createElement(g.Input.Value.Type, {
777
- className: v(B, T.box)
778
- }, /* @__PURE__ */ s.createElement(g.Input.Value.Type.Value, {
779
- className: T.typeInput,
780
- placeholder: e.placeholder
781
- })), /* @__PURE__ */ s.createElement(g.Input.Value.Upload, {
782
- className: v(B, T.uploadBox),
783
- imageAlt: e.imageAlt
784
- }, /* @__PURE__ */ s.createElement(g.Input.Value.Upload.Button, {
785
- className: v(He, V.uploadButton)
786
- }, e.uploadLabel)))), /* @__PURE__ */ s.createElement(g.Error, {
787
- className: v(Ye, V.error)
788
- }, /* @__PURE__ */ s.createElement(Xe, null), /* @__PURE__ */ s.createElement(g.Error.Text, null)), /* @__PURE__ */ s.createElement(g.Description, {
789
- className: v(ke, V.description)
790
- }, Ut));
791
- }, jt = () => /* @__PURE__ */ s.createElement(Ot, null);
792
- export {
793
- jt as SignatureRAC
794
- };