@wix/form-elements 1.93.0 → 1.95.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 (112) hide show
  1. package/dist/component/{appointment-rac-bw0pvoxP.js → appointment-rac-mhQIjy3A.js} +310 -311
  2. package/dist/component/{bookings-address-rac-DECq7eWR.js → bookings-address-rac-pcZeAN2d.js} +1 -1
  3. package/dist/component/{bookings-email-rac-DTLjh6Zw.js → bookings-email-rac-BHdvWhcv.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-DObRe-Gq.js → bookings-first-name-rac-mPNuMBGo.js} +1 -1
  5. package/dist/component/{bookings-header-rac-DjpmYRJG.js → bookings-header-rac-CUzR91gM.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-Ds3o0ABM.js → bookings-last-name-rac-q2bsOPke.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-DPUL2jWj.js → bookings-login-bar-rac-BpwVjQwz.js} +4 -4
  8. package/dist/component/{bookings-phone-rac-DIIHPxEP.js → bookings-phone-rac-DWdDpi-n.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-BrcQO9xx.js → bookings-rich-text-rac-CZnGLPwv.js} +1 -1
  10. package/dist/component/{get-first-day-of-the-week-DvnsxYhQ.js → calendar.module-DnhTT4QT.js} +23 -18
  11. package/dist/component/{checkbox-field-rac-CD1MP1LT.js → checkbox-field-rac-DRVjITJ_.js} +7 -7
  12. package/dist/component/{checkbox-group-field-headless-C0V6zq0u.js → checkbox-group-field-headless-CKXgbUdv.js} +3 -3
  13. package/dist/component/{checkbox-group-field-rac-B-MYpz53.js → checkbox-group-field-rac-Dt3yWmua.js} +14 -14
  14. package/dist/component/{checkbox-group-rac-BejQjiO2.js → checkbox-group-rac-BTFoDjxn.js} +1 -1
  15. package/dist/component/{checkbox-indicator-module-classes-mJ7hl_8K.js → checkbox-indicator-module-classes-DhbNznSB.js} +1 -1
  16. package/dist/component/{checkbox-rac-B0YgCj29.js → checkbox-rac-Crn5HP7E.js} +1 -1
  17. package/dist/component/{contacts-address-rac-B1QNl3Lb.js → contacts-address-rac-c1zfBJgx.js} +1 -1
  18. package/dist/component/{contacts-birthdate-rac-Cp-gh3P-.js → contacts-birthdate-rac-BaaSPZgO.js} +1 -1
  19. package/dist/component/{contacts-company-rac-CSCU7JGm.js → contacts-company-rac-CzuRjr1D.js} +1 -1
  20. package/dist/component/{contacts-email-rac-B1Oov6-3.js → contacts-email-rac-hL98o3x4.js} +1 -1
  21. package/dist/component/{contacts-first-name-rac-rsHIOcjr.js → contacts-first-name-rac-BXTnd1aU.js} +1 -1
  22. package/dist/component/{contacts-last-name-rac-Csgq53Wm.js → contacts-last-name-rac-DYjmWO4_.js} +1 -1
  23. package/dist/component/{contacts-phone-rac-r9SwjDZ4.js → contacts-phone-rac-KMnorQhu.js} +1 -1
  24. package/dist/component/{contacts-position-rac-D7VcCM7v.js → contacts-position-rac-ylzvuGhD.js} +1 -1
  25. package/dist/component/{contacts-subscribe-rac-8Nu9ncZW.js → contacts-subscribe-rac-Bi3ZazuW.js} +2 -2
  26. package/dist/component/{contacts-tax-id-rac-CL_JSl_W.js → contacts-tax-id-rac-C01LkO1D.js} +1 -1
  27. package/dist/component/{date-availability-DLOKY9C4.js → date-availability-BXwnYCBt.js} +1 -1
  28. package/dist/component/{date-input-field-rac-D23Al-Mr.js → date-input-field-rac-BMdPQoFk.js} +58 -57
  29. package/dist/component/{date-input-rac-B6zgkw-L.js → date-input-rac-D2mDdJ_4.js} +1 -1
  30. package/dist/component/date-picker-field-rac-7gyRMkPp.js +317 -0
  31. package/dist/component/{date-picker-rac-C7g6aceb.js → date-picker-rac-FyNcNbTc.js} +1 -1
  32. package/dist/component/{date-time-input-field-rac-BENzf6gc.js → date-time-input-field-rac-BTjqn_g-.js} +54 -53
  33. package/dist/component/{date-time-input-rac-CVpK3mgw.js → date-time-input-rac-C81cN7rJ.js} +1 -1
  34. package/dist/component/{dext-checkbox-group-rac-CbEFDD3H.js → dext-checkbox-group-rac-DAjQPdi_.js} +2 -2
  35. package/dist/component/{dext-checkbox-rac-BdtZvn6I.js → dext-checkbox-rac-DVt9mAXM.js} +1 -1
  36. package/dist/component/{dext-date-picker-rac-BAhFvUEx.js → dext-date-picker-rac-BnaExh1i.js} +1 -1
  37. package/dist/component/{dext-date-time-input-rac-iXMKMwQY.js → dext-date-time-input-rac-DPAW4eBA.js} +1 -1
  38. package/dist/component/{dext-dropdown-rac-D-NPziZS.js → dext-dropdown-rac-P9T1vh24.js} +1 -1
  39. package/dist/component/{dext-email-rac-DYSwyB80.js → dext-email-rac-BfEuFGaV.js} +1 -1
  40. package/dist/component/{dext-number-input-rac-DXx8hgFg.js → dext-number-input-rac-B5eN2rLP.js} +1 -1
  41. package/dist/component/{dext-phone-rac-BtuLROzm.js → dext-phone-rac-DA-h_tpZ.js} +1 -1
  42. package/dist/component/{dext-radio-group-rac-MdKNiJ2i.js → dext-radio-group-rac-BjpkApRr.js} +2 -2
  43. package/dist/component/{dext-rating-input-rac-d998xond.js → dext-rating-input-rac-DUMRW9uI.js} +1 -1
  44. package/dist/component/{dext-tags-rac-DnSpOM9T.js → dext-tags-rac-s0WchM4X.js} +2 -2
  45. package/dist/component/{dext-text-area-rac-KqjeDDWe.js → dext-text-area-rac-BRMsiGEH.js} +1 -1
  46. package/dist/component/{dext-text-input-rac-CtCnClfX.js → dext-text-input-rac-BBZi3D8V.js} +1 -1
  47. package/dist/component/{dext-url-input-rac-DSJQcLLr.js → dext-url-input-rac-jKMWbCGB.js} +1 -1
  48. package/dist/component/{donation-rac-B_KGkBgo.js → donation-rac-DyeKbodo.js} +30 -30
  49. package/dist/component/{dropdown-field-headless-BUilB8wZ.js → dropdown-field-headless-BK8BN3u4.js} +4 -4
  50. package/dist/component/{dropdown-field-rac-COupYC1a.js → dropdown-field-rac-B6yzL_R0.js} +6 -6
  51. package/dist/component/{dropdown-rac-Dj0UZrE0.js → dropdown-rac-CQaMpex2.js} +1 -1
  52. package/dist/component/{ecom-address-rac-C0xnn86e.js → ecom-address-rac-DQr3-QeV.js} +1 -1
  53. package/dist/component/{ecom-subscription-checkbox-rac-D-ekxwUE.js → ecom-subscription-checkbox-rac-CZ-pj21A.js} +3 -3
  54. package/dist/component/{email-input-field-rac-DVj1qz_R.js → email-input-field-rac-Vp0YfQOe.js} +41 -41
  55. package/dist/component/{events-repeater-rac-U0aq9Z4Q.js → events-repeater-rac-BPE4Hn_G.js} +6 -6
  56. package/dist/component/{events-rsvp-rac-C7J58_5q.js → events-rsvp-rac-u_BDmDJ2.js} +21 -21
  57. package/dist/component/{field-error-headless-2nYJ2792.js → field-error-headless-BOlFtckJ.js} +1 -1
  58. package/dist/component/{field-label-headless-D97ACnmc.js → field-label-headless-Dx3VrM-U.js} +1 -1
  59. package/dist/component/field-rac.module-DobpyqOd.js +26 -0
  60. package/dist/component/{file-upload-rac-BR7QpuPW.js → file-upload-rac-DaFuvO-g.js} +44 -44
  61. package/dist/component/{fixed-payment-rac-COl18wW1.js → fixed-payment-rac-DpBwOtOf.js} +11 -11
  62. package/dist/component/{form-DKKTSAj1.js → form-Wsx4lguO.js} +69 -69
  63. package/dist/component/{form-element-classes-CLZXu-91.js → form-element-classes-BtKlobUX.js} +60 -59
  64. package/dist/component/form.css +1 -1
  65. package/dist/component/form.js +1 -1
  66. package/dist/component/{header-field-rac-B6DyMG3U.js → header-field-rac-C8FlksmH.js} +3 -3
  67. package/dist/component/{header-rac-x4H2qMky.js → header-rac-C2J-pLq-.js} +1 -1
  68. package/dist/component/{image-choice-rac-BVgmKTKk.js → image-choice-rac-i4C_OXyb.js} +16 -16
  69. package/dist/component/{index-C47UMGhd.js → index-C34urqyX.js} +4 -4
  70. package/dist/component/{index-DnpqBcg5.js → index-CRI82pG6.js} +2 -2
  71. package/dist/component/{isObjectLike-BrrFBP4f.js → isObjectLike-D-9JnXmU.js} +1 -1
  72. package/dist/component/{multiline-address-field-rac-B6ka-2Wy.js → multiline-address-field-rac-Dkfso46f.js} +87 -86
  73. package/dist/component/{multiline-address-rac-Bh58qUEe.js → multiline-address-rac-BjrwDwOk.js} +1 -1
  74. package/dist/component/{number-input-field-rac-pAmxvk3A.js → number-input-field-rac-CgHi83Q1.js} +19 -19
  75. package/dist/component/{number-input-rac-mKA2njIU.js → number-input-rac-BinBxOCS.js} +1 -1
  76. package/dist/component/{password-rac-BbD7PQXO.js → password-rac-CDGqIRW5.js} +38 -38
  77. package/dist/component/{payment-input-rac-UdkwC1ek.js → payment-input-rac-f4uuGeJF.js} +23 -23
  78. package/dist/component/{phone-input-field-rac-BVLVVDTq.js → phone-input-field-rac-IdBqjM9Q.js} +33 -32
  79. package/dist/component/{phone-rac-LixcB9WV.js → phone-rac-VHPMrSpw.js} +1 -1
  80. package/dist/component/{product-list-rac-B_dL1Ov-.js → product-list-rac-Bk8q5y5L.js} +17 -17
  81. package/dist/component/{quiz-radio-group-rac-Bj5XfqNf.js → quiz-radio-group-rac-kTWqvAoW.js} +2 -2
  82. package/dist/component/{radio-button-module-classes-y_PtsZPP.js → radio-button-module-classes-D77Nc48M.js} +3 -3
  83. package/dist/component/{radio-group-field-rac-C8OElNAQ.js → radio-group-field-rac-DC-AYSOH.js} +5 -5
  84. package/dist/component/{radio-group-rac-BqJFboHE.js → radio-group-rac-BkswH1Py.js} +1 -1
  85. package/dist/component/{rating-input-field-rac-C9_ITvEh.js → rating-input-field-rac-Cqgw6PjV.js} +32 -32
  86. package/dist/component/{rating-input-rac-CvTpEUoU.js → rating-input-rac-CbZhlK3h.js} +1 -1
  87. package/dist/component/{rich-content-rac.module-D4pEN-TY.js → rich-content-rac.module-j_9YbXMI.js} +1 -1
  88. package/dist/component/{rich-text-field-rac-B8cqCmaf.js → rich-text-field-rac-Da1EIb3b.js} +3 -3
  89. package/dist/component/{rich-text-rac-C1o-tfXG.js → rich-text-rac-BarNBtgP.js} +1 -1
  90. package/dist/component/{service-dropdown-rac-BOXqB2aq.js → service-dropdown-rac-DLIC_csj.js} +36 -36
  91. package/dist/component/{services-multi-choice-rac-Dk4rz-fw.js → services-multi-choice-rac-vyxtwSM2.js} +14 -14
  92. package/dist/component/{signature-rac-h9GWVdez.js → signature-rac-DIM2Uwsg.js} +102 -102
  93. package/dist/component/{submit-button-rac-qNaTyCxd.js → submit-button-rac-DgxjomCu.js} +2 -2
  94. package/dist/component/{tags-field-rac-NMRn0YnW.js → tags-field-rac-BFlkxifd.js} +67 -67
  95. package/dist/component/{tags-rac-DGx4KxEn.js → tags-rac-D4TwrAWc.js} +1 -1
  96. package/dist/component/{text-area-field-rac-C7u0D4l3.js → text-area-field-rac-Dcz7VUQ5.js} +28 -28
  97. package/dist/component/{text-area-rac-Yo-RIyLm.js → text-area-rac-DhloXdO2.js} +1 -1
  98. package/dist/component/{text-input-field-rac-CvU-1clq.js → text-input-field-rac-C8e3TMxI.js} +8 -8
  99. package/dist/component/{text-input-headless-DLRwVmwf.js → text-input-headless-fl7qoZzR.js} +3 -3
  100. package/dist/component/{text-input-rac-CWh5xjZA.js → text-input-rac-CBn6bHtP.js} +1 -1
  101. package/dist/component/{time-input-rac-BZlso9qK.js → time-input-rac-Dsm7_vrf.js} +26 -26
  102. package/dist/component/{url-input-field-rac-Bax0TB4Q.js → url-input-field-rac-9Hfx1xzO.js} +20 -20
  103. package/dist/component/{url-input-rac-Bw2nfybR.js → url-input-rac-CVlE4pcg.js} +1 -1
  104. package/dist/component/use-dropdown-option-class-name-Dsxto42_.js +21 -0
  105. package/dist/component/{use-element-state-class-name-C0zLrsDR.js → use-element-state-class-name-BIqDbVvI.js} +1 -1
  106. package/dist/component/use-is-forced-open-dropdown-BMPqRDVW.js +41 -0
  107. package/dist/component/{use-service-options-base-Bkj6BSQL.js → use-service-options-base-07_rqXcG.js} +1 -1
  108. package/dist/component/{use-text-input-class-name-Biu89Ma7.js → use-text-input-class-name-DqFt59gd.js} +4 -4
  109. package/package.json +2 -2
  110. package/dist/component/date-picker-field-rac-BqdzPPzK.js +0 -304
  111. package/dist/component/field-rac.module-BUvPquav.js +0 -26
  112. package/dist/component/use-dropdown-option-class-name-vKSagp3b.js +0 -57
@@ -1,23 +1,23 @@
1
- import s, { useRef as W, useCallback as I, useState as K, useEffect as Q, useMemo as De, isValidElement as Re } from "react";
2
- import { RicosViewer as we } from "@wix/ricos/viewer";
1
+ import s, { useRef as W, useCallback as I, useState as K, useEffect as Q, useMemo as De, isValidElement as we } from "react";
2
+ import { RicosViewer as Re } from "@wix/ricos/viewer";
3
3
  import v from "classnames";
4
- import { useHover as ve, useFocusRing as xe, mergeProps as Se } from "react-aria";
4
+ import { useHover as ve, useFocusRing as Se, mergeProps as xe } from "react-aria";
5
5
  import { RadioGroup as Fe, Button as fe, TextField as Ae, Input as _e, RadioField as Pe, RadioButton as Ne } from "react-aria-components";
6
6
  import he from "signature_pad";
7
- import { G as Ue, ag as Oe, ac as Be, as as ge, E as ce, e as G, ak as A, ah as H, am as Ee, au as Me } from "./form-DKKTSAj1.js";
8
- import { f as T, a as F } from "./find-child-C60k4CxG.js";
9
- import { D as We, E as He } from "./field-error-headless-2nYJ2792.js";
10
- import { L as Ye } from "./field-label-headless-D97ACnmc.js";
7
+ import { G as Ue, ag as Oe, ac as Be, as as ge, E as ce, e as G, ak as A, ah as H, am as Ee, au as Me } from "./form-Wsx4lguO.js";
8
+ import { f as C, a as F } from "./find-child-C60k4CxG.js";
9
+ import { D as We, E as He } from "./field-error-headless-BOlFtckJ.js";
10
+ import { L as Ye } from "./field-label-headless-Dx3VrM-U.js";
11
11
  import { D as ke } from "./data-hooks-Dkw1pbRj.js";
12
12
  import { E as $e } from "./error-icon-hZxQ6DEy.js";
13
- import { s as z } from "./field-rac.module-BUvPquav.js";
14
- import { B as ue, R as ze, z as B, a2 as Ve, q as Ze, i as Xe } from "./form-element-classes-CLZXu-91.js";
13
+ import { s as V } from "./field-rac.module-DobpyqOd.js";
14
+ import { C as ue, S as Ve, B, a3 as ze, r as Ze, j as Xe } from "./form-element-classes-BtKlobUX.js";
15
15
  const Ge = typeof s.useId == "function" ? s.useId : () => W(Ue()).current;
16
- var R = /* @__PURE__ */ (function(e) {
16
+ var w = /* @__PURE__ */ (function(e) {
17
17
  return e.TEXT = "text/plain", e.POINTS = "points/json", e;
18
18
  })({}), b = /* @__PURE__ */ (function(e) {
19
19
  return e.DRAW = "draw", e.TYPE = "type", e.UPLOAD = "upload", e;
20
- })({}), S = /* @__PURE__ */ (function(e) {
20
+ })({}), x = /* @__PURE__ */ (function(e) {
21
21
  return e.DRAW = "draw", e.TYPE = "type", e.IMAGE = "image", e.UPLOAD = "upload", e;
22
22
  })({});
23
23
  const qe = (e) => {
@@ -43,7 +43,7 @@ const qe = (e) => {
43
43
  ]);
44
44
  };
45
45
  function je(e) {
46
- const a = V(1, 1).getContext("2d");
46
+ const a = z(1, 1).getContext("2d");
47
47
  a.fillStyle = e, a.fillRect(0, 0, 1, 1);
48
48
  const n = a.getImageData(0, 0, 1, 1);
49
49
  return n.data[0] * 65536 + n.data[1] * 256 + n.data[2];
@@ -72,7 +72,7 @@ function J(e, t) {
72
72
  const p = a.getImageData(l, d, h, E), L = document.createElement("canvas"), y = L.getContext("2d");
73
73
  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;
74
74
  }
75
- function V(e, t, a) {
75
+ function z(e, t, a) {
76
76
  const n = document.createElement("canvas");
77
77
  if (n.width = e, n.height = t, a) {
78
78
  const r = n.getContext("2d", {
@@ -86,7 +86,7 @@ function Qe(e, t) {
86
86
  return new Promise((a, n) => {
87
87
  const r = new Image();
88
88
  r.onload = () => {
89
- const o = V(r.width, r.height), i = o.getContext("2d", {
89
+ const o = z(r.width, r.height), i = o.getContext("2d", {
90
90
  willReadFrequently: !0
91
91
  });
92
92
  i == null || i.drawImage(r, 0, 0), a(o);
@@ -94,19 +94,19 @@ function Qe(e, t) {
94
94
  });
95
95
  }
96
96
  function de(e, t, a, n) {
97
- const r = e.width, o = e.height, i = 1, l = a / o, c = Math.min(l, i), d = r * c, u = o * c, f = V(d, u), m = f.getContext("2d");
97
+ 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");
98
98
  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;
99
99
  }
100
100
  function me(e, t) {
101
101
  const a = e.getContext("2d"), n = e.offsetWidth, r = e.offsetHeight, o = Math.max(window.devicePixelRatio || 1, 1), i = n * o, l = r * o;
102
102
  return (e.width !== i || e.height !== l) && a ? (e.width = i, e.height = l, a.scale(o, o), t == null || t.redraw(), !0) : !1;
103
103
  }
104
- const M = 480, et = (e) => Ce({
104
+ const M = 480, et = (e) => Te({
105
105
  data: JSON.stringify(e),
106
- mimeType: R.POINTS
106
+ mimeType: w.POINTS
107
107
  }), Le = (e) => {
108
108
  const t = N(e);
109
- if ((t == null ? void 0 : t.mimeType) === R.POINTS)
109
+ if ((t == null ? void 0 : t.mimeType) === w.POINTS)
110
110
  try {
111
111
  return JSON.parse(t.data);
112
112
  } catch {
@@ -136,14 +136,14 @@ function nt(e, t, a = "black", n = !1, r) {
136
136
  const m = (l - d) / 2;
137
137
  o.fillText(t, n ? l - m : m, (c - u) / 2 + f);
138
138
  }
139
- const Te = /^data:([^;,]+)(?:;([^,]+))?,(.+)$/;
139
+ const Ce = /^data:([^;,]+)(?:;([^,]+))?,(.+)$/;
140
140
  function at(e) {
141
- return Te.test(e);
141
+ return Ce.test(e);
142
142
  }
143
143
  function N(e) {
144
144
  if (!e)
145
145
  return;
146
- const t = e.match(Te);
146
+ const t = e.match(Ce);
147
147
  if (!t)
148
148
  return;
149
149
  const [, a, n, r] = t;
@@ -153,7 +153,7 @@ function N(e) {
153
153
  encoding: n
154
154
  };
155
155
  }
156
- function Ce({ data: e, mimeType: t, encoding: a = "text" }) {
156
+ function Te({ data: e, mimeType: t, encoding: a = "text" }) {
157
157
  const n = a === "base64" ? btoa(e) : encodeURI(e);
158
158
  return `data:${a === "base64" ? `${t};base64` : t},${n}`;
159
159
  }
@@ -186,20 +186,20 @@ async function ot(e, t) {
186
186
  if (!a)
187
187
  return e;
188
188
  const n = a.mimeType;
189
- if (n === R.TEXT) {
190
- const r = V(M * 20, M, 1);
189
+ if (n === w.TEXT) {
190
+ const r = z(M * 20, M, 1);
191
191
  nt(r, a.data, "black", t, "white");
192
192
  const o = J(r, "white");
193
193
  return (o == null ? void 0 : o.toDataURL("image/jpeg", 0.7)) ?? null;
194
194
  }
195
- if (n === R.POINTS) {
195
+ if (n === w.POINTS) {
196
196
  const r = Le(e);
197
197
  if (!r)
198
198
  return null;
199
199
  const o = r.map((u) => ({
200
200
  ...u,
201
201
  penColor: "black"
202
- })), i = V(M * 20, M, Math.max(window.devicePixelRatio || 1, 1));
202
+ })), i = z(M * 20, M, Math.max(window.devicePixelRatio || 1, 1));
203
203
  new he(i).fromData(o);
204
204
  const c = J(i);
205
205
  return c ? de(c, void 0, M, "white").toDataURL("image/jpeg", 0.7) : null;
@@ -275,9 +275,9 @@ const it = ({ value: e, onChange: t, target: a }) => {
275
275
  if (o == null)
276
276
  return b.DRAW;
277
277
  switch (i == null ? void 0 : i.mimeType) {
278
- case R.POINTS:
278
+ case w.POINTS:
279
279
  return b.DRAW;
280
- case R.TEXT:
280
+ case w.TEXT:
281
281
  return b.TYPE;
282
282
  default:
283
283
  return b.UPLOAD;
@@ -298,13 +298,13 @@ const it = ({ value: e, onChange: t, target: a }) => {
298
298
  ]), m = o != null, h = ut(l, o, i), E = (() => {
299
299
  switch (l) {
300
300
  case b.DRAW:
301
- return S.DRAW;
301
+ return x.DRAW;
302
302
  case b.TYPE:
303
- return S.TYPE;
303
+ return x.TYPE;
304
304
  case b.UPLOAD:
305
- return h != null ? S.IMAGE : S.UPLOAD;
305
+ return h != null ? x.IMAGE : x.UPLOAD;
306
306
  default:
307
- return S.DRAW;
307
+ return x.DRAW;
308
308
  }
309
309
  })();
310
310
  return {
@@ -320,28 +320,28 @@ const it = ({ value: e, onChange: t, target: a }) => {
320
320
  handleClear: f
321
321
  };
322
322
  }, ct = {
323
- [b.DRAW]: (e) => (e == null ? void 0 : e.mimeType) === R.POINTS,
324
- [b.TYPE]: (e) => (e == null ? void 0 : e.mimeType) === R.TEXT,
325
- [b.UPLOAD]: (e) => (e == null ? void 0 : e.mimeType) !== R.POINTS && (e == null ? void 0 : e.mimeType) !== R.TEXT
323
+ [b.DRAW]: (e) => (e == null ? void 0 : e.mimeType) === w.POINTS,
324
+ [b.TYPE]: (e) => (e == null ? void 0 : e.mimeType) === w.TEXT,
325
+ [b.UPLOAD]: (e) => (e == null ? void 0 : e.mimeType) !== w.POINTS && (e == null ? void 0 : e.mimeType) !== w.TEXT
326
326
  };
327
327
  function ut(e, t, a) {
328
328
  return t && ct[e](a) ? t : void 0;
329
329
  }
330
330
  const dt = (e) => {
331
331
  const t = e.url ? N(e.url) : void 0;
332
- return t ? t.mimeType !== R.POINTS && t.mimeType !== R.TEXT : !0;
332
+ return t ? t.mimeType !== w.POINTS && t.mimeType !== w.TEXT : !0;
333
333
  }, te = () => {
334
- const { hoverProps: e, isHovered: t } = ve({}), { focusProps: a, isFocused: n, isFocusVisible: r } = xe({
334
+ const { hoverProps: e, isHovered: t } = ve({}), { focusProps: a, isFocused: n, isFocusVisible: r } = Se({
335
335
  within: !0
336
336
  });
337
337
  return {
338
- ...Se(e, a),
338
+ ...xe(e, a),
339
339
  "data-hovered": t || void 0,
340
340
  "data-focus-within": n || void 0,
341
341
  "data-focus-visible": r || void 0
342
342
  };
343
343
  }, g = ({ children: e }) => {
344
- const { id: t, FieldLayout: a } = A(), n = T(e, g.Label), r = T(e, g.Input), o = T(e, g.Description), i = T(e, g.Error);
344
+ const { id: t, FieldLayout: a } = A(), n = C(e, g.Label), r = C(e, g.Input), o = C(e, g.Description), i = C(e, g.Error);
345
345
  return /* @__PURE__ */ s.createElement(a, {
346
346
  fieldId: t,
347
347
  renderLabel: () => n,
@@ -353,7 +353,7 @@ const dt = (e) => {
353
353
  target: n,
354
354
  value: t,
355
355
  onChange: a
356
- }), h = T(e, Z.Header), E = T(e, Z.Value), p = {
356
+ }), h = C(e, Z.Header), E = C(e, Z.Value), p = {
357
357
  signatureMode: o,
358
358
  setSignatureMode: i,
359
359
  handleClear: l,
@@ -365,7 +365,7 @@ const dt = (e) => {
365
365
  };
366
366
  return /* @__PURE__ */ s.createElement(s.Fragment, null, !r && F(h, p), F(E, p));
367
367
  }, X = ({ children: e, className: t, ...a }) => {
368
- const { signatureMode: n, setSignatureMode: r, clearable: o, handleClear: i } = a, { uploadEnabled: l } = A(), c = T(e, X.Tabs), d = T(e, X.Clear);
368
+ const { signatureMode: n, setSignatureMode: r, clearable: o, handleClear: i } = a, { uploadEnabled: l } = A(), c = C(e, X.Tabs), d = C(e, X.Clear);
369
369
  return /* @__PURE__ */ s.createElement("div", {
370
370
  className: t
371
371
  }, F(c, {
@@ -381,9 +381,9 @@ const dt = (e) => {
381
381
  }, [
382
382
  r
383
383
  ]), u = {
384
- [b.DRAW]: T(e, _.Draw),
385
- [b.TYPE]: T(e, _.Type),
386
- [b.UPLOAD]: o ? T(e, _.Upload) : null
384
+ [b.DRAW]: C(e, _.Draw),
385
+ [b.TYPE]: C(e, _.Type),
386
+ [b.UPLOAD]: o ? C(e, _.Upload) : null
387
387
  }, f = u[n], m = mt(f) ? f.props.description : void 0;
388
388
  return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("div", {
389
389
  role: "status",
@@ -404,7 +404,7 @@ const dt = (e) => {
404
404
  "data-hook": ke.SIGNATURE_FIELD_MODE_SELECT,
405
405
  className: t
406
406
  }, u[b.DRAW], u[b.TYPE], u[b.UPLOAD]));
407
- }, mt = (e) => /* @__PURE__ */ Re(e), ne = ({ mode: e, children: t, className: a, "aria-label": n }) => /* @__PURE__ */ s.createElement(Pe, {
407
+ }, mt = (e) => /* @__PURE__ */ we(e), ne = ({ mode: e, children: t, className: a, "aria-label": n }) => /* @__PURE__ */ s.createElement(Pe, {
408
408
  value: e,
409
409
  "aria-label": n
410
410
  }, /* @__PURE__ */ s.createElement(Ne, {
@@ -430,14 +430,14 @@ const dt = (e) => {
430
430
  className: t
431
431
  }, e);
432
432
  }, P = ({ children: e, className: t, ...a }) => {
433
- const { signatureView: n, signatureValueForView: r, handleChange: o, handleBeforeChange: i } = a, { disabled: l, readOnly: c, onBlur: d, onFocus: u, hasError: f } = A(), m = T(e, P.Canvas), h = T(e, P.Type), E = T(e, P.Upload);
433
+ const { signatureView: n, signatureValueForView: r, handleChange: o, handleBeforeChange: i } = a, { disabled: l, readOnly: c, onBlur: d, onFocus: u, hasError: f } = A(), m = C(e, P.Canvas), h = C(e, P.Type), E = C(e, P.Upload);
434
434
  return /* @__PURE__ */ s.createElement("div", {
435
435
  className: t,
436
436
  "data-hook": "signature-input",
437
437
  "data-invalid": f,
438
438
  "data-disabled": l,
439
439
  "data-readonly": c
440
- }, n === S.DRAW && F(m, {
440
+ }, n === x.DRAW && F(m, {
441
441
  value: r,
442
442
  onChange: o,
443
443
  onBeforeChange: i,
@@ -445,7 +445,7 @@ const dt = (e) => {
445
445
  readOnly: c,
446
446
  onBlur: d,
447
447
  onFocus: u
448
- }), n === S.TYPE && F(h, {
448
+ }), n === x.TYPE && F(h, {
449
449
  value: r,
450
450
  onChange: o,
451
451
  onBeforeChange: i,
@@ -453,7 +453,7 @@ const dt = (e) => {
453
453
  readOnly: c,
454
454
  onBlur: d,
455
455
  onFocus: u
456
- }), (n === S.UPLOAD || n === S.IMAGE) && F(E, {
456
+ }), (n === x.UPLOAD || n === x.IMAGE) && F(E, {
457
457
  value: r,
458
458
  onChange: o,
459
459
  onBeforeChange: i,
@@ -463,12 +463,12 @@ const dt = (e) => {
463
463
  onFocus: u
464
464
  }));
465
465
  }, Et = ({ className: e, emptyLabel: t, signedLabel: a, ...n }) => {
466
- 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), x = r == null ? void 0 : r.url, [U, Y] = K(!1);
466
+ 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);
467
467
  Ee(() => {
468
468
  var D;
469
469
  (D = L.current) == null || D.focus();
470
470
  }, f);
471
- const w = De(() => ({
471
+ const R = De(() => ({
472
472
  throttle: 0,
473
473
  dotSize: 2,
474
474
  minWidth: 1,
@@ -495,10 +495,10 @@ const dt = (e) => {
495
495
  var k, $, se, ie;
496
496
  if (D != null) {
497
497
  if (L.current = D, p.current = new he(D, {
498
- ...w,
498
+ ...R,
499
499
  penColor: getComputedStyle(D).color || void 0
500
- }), me(L.current, p.current), x) {
501
- const le = Le(x);
500
+ }), me(L.current, p.current), S) {
501
+ const le = Le(S);
502
502
  le && (p.current.fromData(le), Y(!0));
503
503
  } else
504
504
  p.current.clear(), Y(!1);
@@ -508,8 +508,8 @@ const dt = (e) => {
508
508
  } else
509
509
  ($ = y.current) == null || $.disconnect(), (se = p.current) == null || se.removeEventListener("endStroke", q), (ie = p.current) == null || ie.removeEventListener("beginStroke", j);
510
510
  }, [
511
- w,
512
- x,
511
+ R,
512
+ S,
513
513
  j,
514
514
  q
515
515
  ]);
@@ -526,7 +526,7 @@ const dt = (e) => {
526
526
  id: m,
527
527
  "data-hook": "signature-canvas",
528
528
  "data-input-id": m,
529
- "data-has-value": !!x,
529
+ "data-has-value": !!S,
530
530
  onFocus: u,
531
531
  onBlur: d,
532
532
  role: "img",
@@ -534,35 +534,35 @@ const dt = (e) => {
534
534
  "aria-describedby": h
535
535
  }));
536
536
  }, ae = ({ children: e, className: t, ...a }) => {
537
- 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 ? N(n.url) : void 0, { data: x = "" } = y ?? {
537
+ 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 ? N(n.url) : void 0, { data: S = "" } = y ?? {
538
538
  data: ""
539
539
  };
540
540
  Ee(() => {
541
- const w = document.getElementById(h);
542
- w == null || w.focus({
541
+ const R = document.getElementById(h);
542
+ R == null || R.focus({
543
543
  preventScroll: !0
544
544
  });
545
545
  }, u), Q(() => {
546
546
  if (!n) {
547
- const w = document.getElementById(h);
548
- w && (w.value = "");
547
+ const R = document.getElementById(h);
548
+ R && (R.value = "");
549
549
  }
550
550
  }, [
551
551
  n,
552
552
  h
553
553
  ]);
554
- const U = I((w) => {
555
- o == null || o(), w.trim() ? r(ee(Ce({
556
- data: w,
557
- mimeType: R.TEXT
554
+ const U = I((R) => {
555
+ o == null || o(), R.trim() ? r(ee(Te({
556
+ data: R,
557
+ mimeType: w.TEXT
558
558
  }))) : r(null);
559
559
  }, [
560
560
  o,
561
561
  r
562
- ]), Y = T(e, ae.Value);
562
+ ]), Y = C(e, ae.Value);
563
563
  return /* @__PURE__ */ s.createElement(Ae, {
564
564
  "aria-labelledby": p,
565
- value: x,
565
+ value: S,
566
566
  onChange: U,
567
567
  onBlur: c,
568
568
  onFocus: d,
@@ -590,16 +590,16 @@ const dt = (e) => {
590
590
  }, bt = {
591
591
  display: "none"
592
592
  }, re = ({ children: e, className: t, imageAlt: a, ...n }) => {
593
- const { value: r, onChange: o, disabled: i, readOnly: l, onBlur: c, onFocus: d } = n, { inputId: u } = H(), f = te(), m = T(e, re.Button), h = W(null), E = I((L) => {
593
+ const { value: r, onChange: o, disabled: i, readOnly: l, onBlur: c, onFocus: d } = n, { inputId: u } = H(), f = te(), m = C(e, re.Button), h = W(null), E = I((L) => {
594
594
  const y = L.target.files;
595
595
  if (!y || y.length === 0) {
596
596
  o(null);
597
597
  return;
598
598
  }
599
- const x = y[0], U = new FileReader();
599
+ const S = y[0], U = new FileReader();
600
600
  U.onload = function() {
601
- o(ee(this.result, x.name));
602
- }, U.readAsDataURL(x);
601
+ o(ee(this.result, S.name));
602
+ }, U.readAsDataURL(S);
603
603
  }, [
604
604
  o
605
605
  ]), p = r && dt(r);
@@ -668,7 +668,7 @@ P.Type = ae;
668
668
  P.Upload = re;
669
669
  ae.Value = Lt;
670
670
  re.Button = yt;
671
- const Tt = () => {
671
+ const Ct = () => {
672
672
  const { t: e } = Me();
673
673
  return {
674
674
  drawLabel: e("field.signature.mode.draw.label"),
@@ -684,7 +684,7 @@ const Tt = () => {
684
684
  imageAlt: e("field.signature.a11y.state.signed"),
685
685
  uploadLabel: e("field.signature.settings.upload-button.label")
686
686
  };
687
- }, Ct = (e) => /* @__PURE__ */ s.createElement("svg", {
687
+ }, Tt = (e) => /* @__PURE__ */ s.createElement("svg", {
688
688
  viewBox: "0 0 24 24",
689
689
  width: 24,
690
690
  height: 24,
@@ -714,7 +714,7 @@ const Tt = () => {
714
714
  }, /* @__PURE__ */ s.createElement("path", {
715
715
  fillRule: "evenodd",
716
716
  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"
717
- })), Rt = (e) => /* @__PURE__ */ s.createElement("svg", {
717
+ })), wt = (e) => /* @__PURE__ */ s.createElement("svg", {
718
718
  viewBox: "0 0 20 20",
719
719
  width: 24,
720
720
  height: 24,
@@ -724,70 +724,70 @@ const Tt = () => {
724
724
  }, /* @__PURE__ */ s.createElement("path", {
725
725
  fillRule: "evenodd",
726
726
  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"
727
- })), wt = "_header_15ti0_1", vt = "_tabs_15ti0_8", xt = "_tab_15ti0_8", St = "_tabIcon_15ti0_74", Ft = "_clear_15ti0_81", At = "_value_15ti0_113", _t = "_box_15ti0_118", Pt = "_uploadBox_15ti0_119", Nt = "_typeInput_15ti0_230", C = {
728
- header: wt,
727
+ })), Rt = "_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", Pt = "_uploadBox_15ti0_119", Nt = "_typeInput_15ti0_230", T = {
728
+ header: Rt,
729
729
  tabs: vt,
730
- tab: xt,
731
- tabIcon: St,
730
+ tab: St,
731
+ tabIcon: xt,
732
732
  clear: Ft,
733
733
  value: At,
734
734
  box: _t,
735
735
  uploadBox: Pt,
736
736
  typeInput: Nt
737
- }, Ut = ({ content: e, locale: t }) => /* @__PURE__ */ s.createElement(we, {
737
+ }, Ut = ({ content: e, locale: t }) => /* @__PURE__ */ s.createElement(Re, {
738
738
  content: e,
739
739
  locale: t
740
740
  }), Ot = () => {
741
- const e = Tt();
741
+ const e = Ct();
742
742
  return /* @__PURE__ */ s.createElement(g, null, /* @__PURE__ */ s.createElement(g.Label, {
743
- className: v(ue, z.label)
743
+ className: v(ue, V.label)
744
744
  }, /* @__PURE__ */ s.createElement(g.Label.Required, {
745
- className: v(ze, z.requiredMark)
745
+ className: v(Ve, V.requiredMark)
746
746
  })), /* @__PURE__ */ s.createElement(g.Input, null, /* @__PURE__ */ s.createElement(g.Input.Header, {
747
- className: C.header
747
+ className: T.header
748
748
  }, /* @__PURE__ */ s.createElement(g.Input.Header.Tabs, {
749
- className: C.tabs
749
+ className: T.tabs
750
750
  }, /* @__PURE__ */ s.createElement(g.Input.Header.Tabs.Draw, {
751
- className: v(B, C.tab),
751
+ className: v(B, T.tab),
752
752
  "aria-label": e.drawLabel,
753
753
  description: e.drawDescription
754
754
  }, /* @__PURE__ */ s.createElement(Dt, {
755
- className: C.tabIcon
755
+ className: T.tabIcon
756
756
  })), /* @__PURE__ */ s.createElement(g.Input.Header.Tabs.Type, {
757
- className: v(B, C.tab),
757
+ className: v(B, T.tab),
758
758
  "aria-label": e.typeLabel,
759
759
  description: e.typeDescription
760
- }, /* @__PURE__ */ s.createElement(Rt, {
761
- className: C.tabIcon
760
+ }, /* @__PURE__ */ s.createElement(wt, {
761
+ className: T.tabIcon
762
762
  })), /* @__PURE__ */ s.createElement(g.Input.Header.Tabs.Upload, {
763
- className: v(B, C.tab),
763
+ className: v(B, T.tab),
764
764
  "aria-label": e.uploadModeLabel,
765
765
  description: e.uploadDescription
766
766
  }, /* @__PURE__ */ s.createElement(It, {
767
- className: C.tabIcon
767
+ className: T.tabIcon
768
768
  }))), /* @__PURE__ */ s.createElement(g.Input.Header.Clear, {
769
- className: v(ue, C.clear),
769
+ className: v(ue, T.clear),
770
770
  "aria-label": e.clearLabel
771
- }, /* @__PURE__ */ s.createElement(Ct, null))), /* @__PURE__ */ s.createElement(g.Input.Value, {
772
- className: C.value
771
+ }, /* @__PURE__ */ s.createElement(Tt, null))), /* @__PURE__ */ s.createElement(g.Input.Value, {
772
+ className: T.value
773
773
  }, /* @__PURE__ */ s.createElement(g.Input.Value.Canvas, {
774
- className: v(B, C.box),
774
+ className: v(B, T.box),
775
775
  emptyLabel: e.emptyLabel,
776
776
  signedLabel: e.signedLabel
777
777
  }), /* @__PURE__ */ s.createElement(g.Input.Value.Type, {
778
- className: v(B, C.box)
778
+ className: v(B, T.box)
779
779
  }, /* @__PURE__ */ s.createElement(g.Input.Value.Type.Value, {
780
- className: C.typeInput,
780
+ className: T.typeInput,
781
781
  placeholder: e.placeholder
782
782
  })), /* @__PURE__ */ s.createElement(g.Input.Value.Upload, {
783
- className: v(B, C.uploadBox),
783
+ className: v(B, T.uploadBox),
784
784
  imageAlt: e.imageAlt
785
785
  }, /* @__PURE__ */ s.createElement(g.Input.Value.Upload.Button, {
786
- className: v(Ve, z.uploadButton)
786
+ className: v(ze, V.uploadButton)
787
787
  }, e.uploadLabel)))), /* @__PURE__ */ s.createElement(g.Error, {
788
- className: v(Ze, z.error)
788
+ className: v(Ze, V.error)
789
789
  }, /* @__PURE__ */ s.createElement($e, null), /* @__PURE__ */ s.createElement(g.Error.Text, null)), /* @__PURE__ */ s.createElement(g.Description, {
790
- className: v(Xe, z.description)
790
+ className: v(Xe, V.description)
791
791
  }, Ut));
792
792
  }, Jt = () => /* @__PURE__ */ s.createElement(Ot, null);
793
793
  export {
@@ -1,10 +1,10 @@
1
1
  import t, { useRef as y, useCallback as f } from "react";
2
2
  import P from "@wix/editor-react-components/AnimatedIcon";
3
3
  import b from "classnames";
4
- import { ak as B, ae as h } from "./form-DKKTSAj1.js";
4
+ import { ak as B, ae as h } from "./form-Wsx4lguO.js";
5
5
  import { ProgressBar as A, Button as N } from "react-aria-components";
6
6
  import { f as c } from "./find-child-C60k4CxG.js";
7
- import { a4 as I, a3 as O, a6 as w, a8 as F, A as k, a7 as R } from "./form-element-classes-CLZXu-91.js";
7
+ import { a5 as I, a4 as O, a7 as w, a9 as F, A as k, a8 as R } from "./form-element-classes-BtKlobUX.js";
8
8
  function M(n) {
9
9
  const s = "calc(50% - 2px)";
10
10
  return /* @__PURE__ */ t.createElement(A, {