@wix/form-elements 0.0.0-stage → 1.53.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 (237) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +118 -2
  3. package/dist/component/appointment-rac-Qa4fzPC_.js +1005 -0
  4. package/dist/component/bookings-address-rac-D9M-ozbl.js +6 -0
  5. package/dist/component/bookings-email-rac-BsQBkcmz.js +6 -0
  6. package/dist/component/bookings-first-name-rac-B3Ttwrj1.js +6 -0
  7. package/dist/component/bookings-header-rac-D1SGpqGf.js +8 -0
  8. package/dist/component/bookings-last-name-rac-B9O--4tU.js +6 -0
  9. package/dist/component/bookings-login-bar-rac-CHzNCOWx.js +74 -0
  10. package/dist/component/bookings-phone-rac-DhCGxcEU.js +6 -0
  11. package/dist/component/bookings-rich-text-rac-CftLqeZI.js +8 -0
  12. package/dist/component/calling-country-codes-PyWuOTmF.js +243 -0
  13. package/dist/component/checkbox-field-rac-B4NsTbRK.js +625 -0
  14. package/dist/component/checkbox-group-field-headless-qntvm5XF.js +204 -0
  15. package/dist/component/checkbox-group-field-rac-DwHc_GX9.js +33 -0
  16. package/dist/component/checkbox-group-rac-C1L8G1Y6.js +6 -0
  17. package/dist/component/checkbox-rac-DfbwQtOy.js +6 -0
  18. package/dist/component/chevron-down-icon-CcpVm6B-.js +15 -0
  19. package/dist/component/contacts-address-rac-Bstl5CRy.js +6 -0
  20. package/dist/component/contacts-birthdate-rac-DA4ijdaj.js +6 -0
  21. package/dist/component/contacts-company-rac-m0NA2GWU.js +6 -0
  22. package/dist/component/contacts-email-rac-DPVSYPew.js +6 -0
  23. package/dist/component/contacts-first-name-rac-C-JRqRzG.js +6 -0
  24. package/dist/component/contacts-last-name-rac-COBf-dyW.js +6 -0
  25. package/dist/component/contacts-phone-rac-Cw70dW7b.js +6 -0
  26. package/dist/component/contacts-position-rac-CMz19BR-.js +6 -0
  27. package/dist/component/contacts-subscribe-rac-KpLlwquo.js +13 -0
  28. package/dist/component/contacts-tax-id-rac-_uTLfEkF.js +6 -0
  29. package/dist/component/custom-focus-class-_483Pkwp.js +4 -0
  30. package/dist/component/data-hooks-Dkw1pbRj.js +6 -0
  31. package/dist/component/date-availability-DPHhHaFW.js +49 -0
  32. package/dist/component/date-input-field-rac-BrdGNXKw.js +286 -0
  33. package/dist/component/date-input-rac-D93biRsl.js +6 -0
  34. package/dist/component/date-picker-field-rac-ByhJ3Koo.js +304 -0
  35. package/dist/component/date-picker-rac-CuwcuCmJ.js +6 -0
  36. package/dist/component/date-time-input-field-rac-DY1u3LS6.js +421 -0
  37. package/dist/component/date-time-input-rac-BuGAMm_l.js +6 -0
  38. package/dist/component/default-limits-D7qVv_Hv.js +6 -0
  39. package/dist/component/dext-checkbox-group-rac-C3jCmtB7.js +18 -0
  40. package/dist/component/dext-checkbox-rac-dOvFH4gX.js +6 -0
  41. package/dist/component/dext-date-picker-rac-Bq6xFRoL.js +6 -0
  42. package/dist/component/dext-date-time-input-rac-9BE7wXiZ.js +6 -0
  43. package/dist/component/dext-dropdown-rac-j2ACAxk6.js +6 -0
  44. package/dist/component/dext-email-rac-CLoZGIl3.js +6 -0
  45. package/dist/component/dext-number-input-rac-D8IxqGdJ.js +6 -0
  46. package/dist/component/dext-phone-rac-B2Y-Ou4W.js +6 -0
  47. package/dist/component/dext-radio-group-rac-C88xnXTc.js +18 -0
  48. package/dist/component/dext-rating-input-rac-BArLS_bA.js +6 -0
  49. package/dist/component/dext-tags-rac-B9tKb852.js +18 -0
  50. package/dist/component/dext-text-area-rac-cBh24v0g.js +6 -0
  51. package/dist/component/dext-text-input-rac-B75yIKQa.js +6 -0
  52. package/dist/component/dext-url-input-rac-Da6T681p.js +6 -0
  53. package/dist/component/donation-rac-A0HtRtbH.js +305 -0
  54. package/dist/component/dropdown-field-headless-CYpFgZ3H.js +84 -0
  55. package/dist/component/dropdown-field-rac-B5emHw3_.js +32 -0
  56. package/dist/component/dropdown-rac-CRj3gKMe.js +6 -0
  57. package/dist/component/ecom-address-rac-ClBWgRGU.js +6 -0
  58. package/dist/component/ecom-subscription-checkbox-rac-DLvoidqP.js +49 -0
  59. package/dist/component/email-input-field-rac-Dq1HVu3Y.js +507 -0
  60. package/dist/component/error-icon-hZxQ6DEy.js +15 -0
  61. package/dist/component/events-repeater-rac-BwbNXM88.js +247 -0
  62. package/dist/component/events-rsvp-rac-BzVK7JNO.js +38 -0
  63. package/dist/component/field-error-headless-D40GACk4.js +34 -0
  64. package/dist/component/field-label-headless-Beq2Tn6V.js +52 -0
  65. package/dist/component/field-rac.module-DXfwku6m.js +21 -0
  66. package/dist/component/fieldset-headless-CD3fds9J.js +54 -0
  67. package/dist/component/file-upload-rac-BHqXPy1r.js +484 -0
  68. package/dist/component/find-child-C60k4CxG.js +11 -0
  69. package/dist/component/fixed-payment-rac-CSmY8yrQ.js +62 -0
  70. package/dist/component/form-Dn-MrArr.js +8890 -0
  71. package/dist/component/form-element-classes-Bi-nNM8q.js +55 -0
  72. package/dist/component/form.css +1 -0
  73. package/dist/component/form.js +9 -0
  74. package/dist/component/format-currency-BwShJ9vM.js +44 -0
  75. package/dist/component/get-first-day-of-the-week-DvnsxYhQ.js +118 -0
  76. package/dist/component/header-field-rac-DlUZ8kEf.js +25 -0
  77. package/dist/component/header-rac-CKAFxlLV.js +6 -0
  78. package/dist/component/headless-styles-CmcyA_pi.js +20 -0
  79. package/dist/component/helpers-HmkkXrh2.js +12 -0
  80. package/dist/component/image-choice-rac-DHtMOk8B.js +141 -0
  81. package/dist/component/index-0TWILUAM.js +64 -0
  82. package/dist/component/index-DS4A9cSk.js +2290 -0
  83. package/dist/component/isObject-BAwJJxQ3.js +34 -0
  84. package/dist/component/messages_ar-BZXnU2Gj.js +3517 -0
  85. package/dist/component/messages_ar-L1BYLZbF.js +20 -0
  86. package/dist/component/messages_ar-PAHg01OB.js +299 -0
  87. package/dist/component/messages_bg-CO56qlOt.js +299 -0
  88. package/dist/component/messages_bg-CQcGl0Yi.js +20 -0
  89. package/dist/component/messages_bg-DgbMwIbv.js +3515 -0
  90. package/dist/component/messages_ca-BAHE5nuo.js +3515 -0
  91. package/dist/component/messages_ca-BRoHmzRw.js +20 -0
  92. package/dist/component/messages_ca-Bl6rZi_O.js +299 -0
  93. package/dist/component/messages_cs-BADd3t_h.js +3515 -0
  94. package/dist/component/messages_cs-CDyWDExk.js +298 -0
  95. package/dist/component/messages_cs-wn5UmrBw.js +20 -0
  96. package/dist/component/messages_da-BPnmb9Qb.js +20 -0
  97. package/dist/component/messages_da-BvVUWnBz.js +3515 -0
  98. package/dist/component/messages_da-DHlpaT4q.js +298 -0
  99. package/dist/component/messages_de-2czOmM8X.js +3515 -0
  100. package/dist/component/messages_de-BKgzIF1d.js +298 -0
  101. package/dist/component/messages_de-Bwx84N0O.js +20 -0
  102. package/dist/component/messages_el-BnuYMjcf.js +299 -0
  103. package/dist/component/messages_el-_D2RUBSU.js +20 -0
  104. package/dist/component/messages_el-qCyH12Uq.js +3515 -0
  105. package/dist/component/messages_en-BWaixPd6.js +3518 -0
  106. package/dist/component/messages_en-CBBcgtxs.js +296 -0
  107. package/dist/component/messages_en-DvSLxqKp.js +20 -0
  108. package/dist/component/messages_es-Cq6i2xci.js +3515 -0
  109. package/dist/component/messages_es-DlGCLaYi.js +298 -0
  110. package/dist/component/messages_es-rCKXnGf0.js +20 -0
  111. package/dist/component/messages_fi-B-ciZGqD.js +3515 -0
  112. package/dist/component/messages_fi-DzKva_Wq.js +299 -0
  113. package/dist/component/messages_fi-PCCXPo0O.js +20 -0
  114. package/dist/component/messages_fr-2im0dcYp.js +3515 -0
  115. package/dist/component/messages_fr-DMFilq1G.js +298 -0
  116. package/dist/component/messages_fr-DQa1dT9u.js +20 -0
  117. package/dist/component/messages_he-Bb1qTc2Y.js +299 -0
  118. package/dist/component/messages_he-BfIkDo1h.js +3515 -0
  119. package/dist/component/messages_he-DwIysfDp.js +20 -0
  120. package/dist/component/messages_hi-Bty6ytCh.js +3515 -0
  121. package/dist/component/messages_hi-C-6UHGbM.js +298 -0
  122. package/dist/component/messages_hi-DF1w6b6B.js +20 -0
  123. package/dist/component/messages_hr-BXzIzU3d.js +20 -0
  124. package/dist/component/messages_hr-CiU1ZVrx.js +3515 -0
  125. package/dist/component/messages_hr-tRSM9lmc.js +299 -0
  126. package/dist/component/messages_hu-ChzHFUtB.js +3515 -0
  127. package/dist/component/messages_hu-D86Taf9R.js +299 -0
  128. package/dist/component/messages_hu-Z9XpByCO.js +20 -0
  129. package/dist/component/messages_id-3952ilBE.js +20 -0
  130. package/dist/component/messages_id-CPuhTUYV.js +298 -0
  131. package/dist/component/messages_id-Ddr3ijST.js +3515 -0
  132. package/dist/component/messages_it-B-A1X4BZ.js +298 -0
  133. package/dist/component/messages_it-DnUTUabT.js +20 -0
  134. package/dist/component/messages_it-eY6GnuZC.js +3515 -0
  135. package/dist/component/messages_ja-B3PxHv2c.js +3515 -0
  136. package/dist/component/messages_ja-Ced6ZBxD.js +298 -0
  137. package/dist/component/messages_ja-Cg7CqBUL.js +20 -0
  138. package/dist/component/messages_ko-DBCjHG4c.js +3515 -0
  139. package/dist/component/messages_ko-PKIrqwPk.js +298 -0
  140. package/dist/component/messages_ko-zvhtZMGA.js +20 -0
  141. package/dist/component/messages_lt-DV3hdFsp.js +3515 -0
  142. package/dist/component/messages_lt-DywusvNm.js +20 -0
  143. package/dist/component/messages_lt-zxcCPHno.js +299 -0
  144. package/dist/component/messages_lv-BEowUv-S.js +299 -0
  145. package/dist/component/messages_lv-DggJE2f9.js +20 -0
  146. package/dist/component/messages_lv-hIonzpTs.js +3515 -0
  147. package/dist/component/messages_ms-Ca0m7bf7.js +20 -0
  148. package/dist/component/messages_ms-Cvypo0vi.js +299 -0
  149. package/dist/component/messages_ms-DoMzA8a3.js +3515 -0
  150. package/dist/component/messages_nl-CEmANR_r.js +3515 -0
  151. package/dist/component/messages_nl-CZR4TvNo.js +298 -0
  152. package/dist/component/messages_nl-DgVYmdO9.js +20 -0
  153. package/dist/component/messages_no-B2BBaGBH.js +298 -0
  154. package/dist/component/messages_no-DJfJSlDm.js +3515 -0
  155. package/dist/component/messages_no-hPkfRJQ9.js +20 -0
  156. package/dist/component/messages_pl-Bzph-WyD.js +20 -0
  157. package/dist/component/messages_pl-ChJVH7RO.js +3515 -0
  158. package/dist/component/messages_pl-rCMsbMbN.js +298 -0
  159. package/dist/component/messages_pt-Bv63V1uB.js +3515 -0
  160. package/dist/component/messages_pt-CBgCNF3T.js +20 -0
  161. package/dist/component/messages_pt-Cx0FF6uF.js +298 -0
  162. package/dist/component/messages_ro-BvLoD_wE.js +299 -0
  163. package/dist/component/messages_ro-CMzcu-9b.js +20 -0
  164. package/dist/component/messages_ro-PVRK7Gx4.js +3515 -0
  165. package/dist/component/messages_ru-8BI6MYA0.js +3515 -0
  166. package/dist/component/messages_ru-BhRKVmVC.js +298 -0
  167. package/dist/component/messages_ru-C_BaQo57.js +20 -0
  168. package/dist/component/messages_sk-Bgi_3583.js +3515 -0
  169. package/dist/component/messages_sk-CrsC7rOj.js +20 -0
  170. package/dist/component/messages_sk-CtF-ei23.js +299 -0
  171. package/dist/component/messages_sl-B5t-KKi8.js +299 -0
  172. package/dist/component/messages_sl-BFdYWVHd.js +3515 -0
  173. package/dist/component/messages_sl-NqfmyUP1.js +20 -0
  174. package/dist/component/messages_sv-Bd1CcY6G.js +3515 -0
  175. package/dist/component/messages_sv-DPRT-DpN.js +20 -0
  176. package/dist/component/messages_sv-bQwbNmjr.js +298 -0
  177. package/dist/component/messages_th-BauH9qdo.js +20 -0
  178. package/dist/component/messages_th-C_dL_PCq.js +298 -0
  179. package/dist/component/messages_th-DEWm01uD.js +3515 -0
  180. package/dist/component/messages_tl-CouXLNcW.js +299 -0
  181. package/dist/component/messages_tl-D2t9Y_ZC.js +3515 -0
  182. package/dist/component/messages_tl-UDZY8Wuk.js +20 -0
  183. package/dist/component/messages_tr-2-OHesob.js +3515 -0
  184. package/dist/component/messages_tr-CpsxYTDb.js +20 -0
  185. package/dist/component/messages_tr-DHXnlj_j.js +298 -0
  186. package/dist/component/messages_uk-CPK4y5lH.js +298 -0
  187. package/dist/component/messages_uk-DIuQ2HoD.js +3515 -0
  188. package/dist/component/messages_uk-gPkmA_ar.js +20 -0
  189. package/dist/component/messages_vi-CgxB4Ey0.js +20 -0
  190. package/dist/component/messages_vi-DZeFWgwp.js +3515 -0
  191. package/dist/component/messages_vi-Det8i7_V.js +298 -0
  192. package/dist/component/messages_zh-D53_A4N9.js +298 -0
  193. package/dist/component/messages_zh-O552w5dp.js +20 -0
  194. package/dist/component/messages_zh-nG7LNxIt.js +3515 -0
  195. package/dist/component/multiline-address-field-rac-C0PUrp9n.js +1574 -0
  196. package/dist/component/multiline-address-rac-BuIrCxJO.js +6 -0
  197. package/dist/component/non-modal-popover-DtIMXHbe.js +63 -0
  198. package/dist/component/number-input-field-rac-DY3hBv5k.js +89 -0
  199. package/dist/component/number-input-rac-LU2RRhXv.js +6 -0
  200. package/dist/component/numeric-input-utils-CuBMi4-a.js +45 -0
  201. package/dist/component/options-layout-constants-DEfIEJWD.js +6 -0
  202. package/dist/component/options-rac.module-KM-VT_KY.js +7 -0
  203. package/dist/component/password-rac-CKUa-xXB.js +142 -0
  204. package/dist/component/payment-field-utils-DobiK5Xh.js +12 -0
  205. package/dist/component/payment-input-rac-4-nB0Dtf.js +137 -0
  206. package/dist/component/phone-input-field-rac-D-WSiybW.js +473 -0
  207. package/dist/component/phone-rac-CHpAV4y9.js +6 -0
  208. package/dist/component/product-list-rac-43aeb4bH.js +263 -0
  209. package/dist/component/quiz-radio-group-rac-CIp82PU6.js +13 -0
  210. package/dist/component/radio-group-field-rac-Ctu5L43b.js +40 -0
  211. package/dist/component/radio-group-field-rac.module-xWCK2zEh.js +124 -0
  212. package/dist/component/radio-group-rac-C2z9k9zW.js +6 -0
  213. package/dist/component/rating-input-field-rac-FGf61_-a.js +130 -0
  214. package/dist/component/rating-input-rac-B4_5V8X4.js +6 -0
  215. package/dist/component/rich-content-rac.module-DuFIPLXP.js +49 -0
  216. package/dist/component/rich-text-field-rac-B1PbdTgi.js +22 -0
  217. package/dist/component/rich-text-rac-D1PDXRg5.js +6 -0
  218. package/dist/component/ricos-viewer-chunk-B4rfbgjA.js +5 -0
  219. package/dist/component/service-dropdown-rac-DIFcHwYR.js +142 -0
  220. package/dist/component/services-multi-choice-rac-BVgZsVc2.js +76 -0
  221. package/dist/component/signature-rac-DoznfA7u.js +795 -0
  222. package/dist/component/submit-button-rac-DQFhhUWx.js +115 -0
  223. package/dist/component/tags-field-rac-F3yYmtiN.js +201 -0
  224. package/dist/component/tags-rac-BkJ8931D.js +6 -0
  225. package/dist/component/text-area-field-rac-BQXCdqvK.js +69 -0
  226. package/dist/component/text-area-rac-CI4idsCI.js +6 -0
  227. package/dist/component/text-input-field-rac-Di3rvMr8.js +24 -0
  228. package/dist/component/text-input-headless-BFldUMDr.js +44 -0
  229. package/dist/component/text-input-rac-v2DSKy7B.js +6 -0
  230. package/dist/component/time-input-rac-CcbyfeiV.js +152 -0
  231. package/dist/component/url-input-field-rac-CcMmHuDT.js +71 -0
  232. package/dist/component/url-input-rac-DtbctKi2.js +6 -0
  233. package/dist/component/use-invoke-callback-UH73A_J3.js +15 -0
  234. package/dist/component/use-service-options-base-Cr8hJp01.js +48 -0
  235. package/dist/component/use-synced-display-value-DcAxdn3M.js +19 -0
  236. package/dist/form.d.ts +6930 -0
  237. package/package.json +164 -3
@@ -0,0 +1,6 @@
1
+ import e from "react";
2
+ import { M as t } from "./multiline-address-field-rac-C0PUrp9n.js";
3
+ const i = () => /* @__PURE__ */ e.createElement(t, null);
4
+ export {
5
+ i as MultilineAddressRAC
6
+ };
@@ -0,0 +1,63 @@
1
+ import u, { forwardRef as f, useContext as i, useRef as p, useEffect as R, createContext as B } from "react";
2
+ import { useObjectRef as D, useInteractOutside as I } from "react-aria";
3
+ import { OverlayTriggerStateContext as P, useSlottedContext as S, PopoverContext as b, Popover as N, Button as T } from "react-aria-components";
4
+ const x = /* @__PURE__ */ B(null), k = (e) => e != null && e.matches("[aria-haspopup]") ? e : e == null ? void 0 : e.querySelector("[aria-haspopup]"), m = /* @__PURE__ */ f((e, r) => {
5
+ var l;
6
+ const t = D(r), n = i(P), o = (l = S(b)) == null ? void 0 : l.triggerRef, s = i(x), c = p(0), O = p(!1), a = n == null ? void 0 : n.isOpen;
7
+ R(() => {
8
+ if (!(!a || !t.current || !s))
9
+ return s.current += 1, () => {
10
+ s.current -= 1;
11
+ };
12
+ }, [
13
+ a,
14
+ t,
15
+ s
16
+ ]);
17
+ const h = (d) => {
18
+ var C;
19
+ return !((C = k(o == null ? void 0 : o.current)) != null && C.contains(d));
20
+ };
21
+ return I({
22
+ ref: t,
23
+ isDisabled: !a,
24
+ onInteractOutsideStart: () => {
25
+ O.current = c.current > 0;
26
+ },
27
+ onInteractOutside: (d) => {
28
+ !O.current && h(d.target) && (n == null || n.close());
29
+ }
30
+ }), /* @__PURE__ */ u.createElement(x.Provider, {
31
+ value: c
32
+ }, /* @__PURE__ */ u.createElement(N, {
33
+ ...e,
34
+ ref: t,
35
+ isNonModal: !0,
36
+ shouldCloseOnInteractOutside: h
37
+ }));
38
+ }), q = /* @__PURE__ */ f((e, r) => {
39
+ const t = i(P), n = (o) => {
40
+ var c;
41
+ (c = e.onPressStart) == null || c.call(e, o), o.pointerType !== "touch" && o.pointerType !== "keyboard" && (t != null && t.isOpen) && t.close();
42
+ };
43
+ return /* @__PURE__ */ u.createElement(T, {
44
+ ...e,
45
+ ref: r,
46
+ onPressStart: n
47
+ });
48
+ }), v = /* @__PURE__ */ f((e, r) => {
49
+ const t = i(P), n = (o) => {
50
+ var s;
51
+ (s = e.onPress) == null || s.call(e, o), t != null && t.isOpen && t.close();
52
+ };
53
+ return /* @__PURE__ */ u.createElement(T, {
54
+ ...e,
55
+ ref: r,
56
+ onPress: n
57
+ });
58
+ });
59
+ export {
60
+ v as D,
61
+ m as N,
62
+ q as S
63
+ };
@@ -0,0 +1,89 @@
1
+ import { RicosViewer as v } from "@wix/ricos/viewer";
2
+ import m from "classnames";
3
+ import r, { useState as U, useCallback as H, useEffect as Q, useRef as $ } from "react";
4
+ import { NumberField as j, Input as z } from "react-aria-components";
5
+ import { ag as C, ad as S, aq as G, ai as J } from "./form-Dn-MrArr.js";
6
+ import { f as d } from "./find-child-C60k4CxG.js";
7
+ import { D as K, E as W } from "./field-error-headless-D40GACk4.js";
8
+ import { L as X } from "./field-label-headless-Beq2Tn6V.js";
9
+ import { g as Y, c as Z } from "./numeric-input-utils-CuBMi4-a.js";
10
+ import { u as w } from "./use-invoke-callback-UH73A_J3.js";
11
+ import { E as ee } from "./error-icon-hZxQ6DEy.js";
12
+ import { s as i } from "./field-rac.module-DXfwku6m.js";
13
+ import { r as re, H as te, q as ne, l as ae, h as se } from "./form-element-classes-Bi-nNM8q.js";
14
+ const e = ({ children: n }) => {
15
+ var D, L, R;
16
+ const { id: a, value: s, onChange: l, disabled: p, required: E, readOnly: o, onBlur: b, onFocus: f, FieldLayout: u, hasError: c, validation: t } = C(), { labelId: A } = S(), F = ((D = t == null ? void 0 : t.number) == null ? void 0 : D.multipleOf) || 1, q = (L = t == null ? void 0 : t.number) == null ? void 0 : L.maximum, y = (R = t == null ? void 0 : t.number) == null ? void 0 : R.minimum, g = _(s), [h, I] = U(g), M = w(b), T = d(n, e.Label), V = d(n, e.Input), x = d(n, e.Description), k = d(n, e.Error), B = H((N) => {
17
+ if (N === void 0 || Number.isNaN(N)) {
18
+ l(""), I(NaN);
19
+ return;
20
+ }
21
+ const P = Y(F), O = Number(N.toFixed(P));
22
+ l(O), I(O);
23
+ }, [
24
+ F,
25
+ l
26
+ ]);
27
+ return Q(() => {
28
+ I(_(s));
29
+ }, [
30
+ s
31
+ ]), /* @__PURE__ */ r.createElement(u, {
32
+ fieldId: a,
33
+ renderLabel: () => T,
34
+ renderInput: () => /* @__PURE__ */ r.createElement(j, {
35
+ "aria-labelledby": A,
36
+ value: h,
37
+ onChange: B,
38
+ isDisabled: p,
39
+ isRequired: E,
40
+ isReadOnly: o,
41
+ isInvalid: c,
42
+ onBlur: M,
43
+ onFocus: f,
44
+ minValue: y ?? void 0,
45
+ maxValue: q ?? void 0
46
+ }, V),
47
+ renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, k, x)
48
+ });
49
+ }, le = ({ className: n }) => {
50
+ var c;
51
+ const { t: a } = G(), { inputId: s, ariaDescribedBy: l } = S(), { id: p, placeholder: E, validation: o, label: b, required: f } = C();
52
+ (c = o == null ? void 0 : o.number) != null && c.multipleOf;
53
+ const u = $(null);
54
+ return J(() => {
55
+ var t;
56
+ (t = u.current) == null || t.focus();
57
+ }, p), /* @__PURE__ */ r.createElement(z, {
58
+ ref: u,
59
+ id: s,
60
+ "aria-describedby": l,
61
+ "aria-label": b,
62
+ "aria-roledescription": a("field.number.aria-role-description"),
63
+ className: n,
64
+ inputMode: "decimal",
65
+ placeholder: E,
66
+ required: f
67
+ });
68
+ };
69
+ e.Label = X;
70
+ e.Input = le;
71
+ e.Description = K;
72
+ e.Error = W;
73
+ const _ = (n) => Z(n) ?? NaN, oe = ({ content: n, locale: a }) => /* @__PURE__ */ r.createElement(v, {
74
+ content: n,
75
+ locale: a
76
+ }), Le = () => /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
77
+ className: m(re, i.label)
78
+ }, /* @__PURE__ */ r.createElement(e.Label.Required, {
79
+ className: m(te, i.requiredMark)
80
+ })), /* @__PURE__ */ r.createElement(e.Input, {
81
+ className: m(ne, i.input)
82
+ }), /* @__PURE__ */ r.createElement(e.Error, {
83
+ className: m(ae, i.error)
84
+ }, /* @__PURE__ */ r.createElement(ee, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
85
+ className: m(se, i.description)
86
+ }, oe));
87
+ export {
88
+ Le as N
89
+ };
@@ -0,0 +1,6 @@
1
+ import e from "react";
2
+ import { N as r } from "./number-input-field-rac-DY3hBv5k.js";
3
+ const n = () => /* @__PURE__ */ e.createElement(r, null);
4
+ export {
5
+ n as NumberInputRAC
6
+ };
@@ -0,0 +1,45 @@
1
+ const c = (e) => `^-?\\d*(\\.\\d{0,${o(e)}})?$`, o = (e) => {
2
+ var n, t;
3
+ return ((t = (n = String(e).split(".")) == null ? void 0 : n[1]) == null ? void 0 : t.length) || 0;
4
+ }, l = (e, n, t, a) => {
5
+ if (e.trim() === "")
6
+ return {
7
+ validInput: "",
8
+ validNumber: void 0
9
+ };
10
+ const r = i(e);
11
+ return u(r, n) && r !== void 0 && r < Number.MAX_SAFE_INTEGER ? {
12
+ validInput: s(e, a),
13
+ validNumber: r
14
+ } : t ? {
15
+ validInput: t,
16
+ validNumber: i(t)
17
+ } : {
18
+ validInput: "",
19
+ validNumber: void 0
20
+ };
21
+ }, d = (e) => {
22
+ var n;
23
+ return e ? (n = Intl.NumberFormat(e).formatToParts(1.1).find((t) => t.type === "decimal")) == null ? void 0 : n.value : void 0;
24
+ }, s = (e, n) => {
25
+ const t = d(n);
26
+ return t ? e.replace(/[.,]/, t) : e;
27
+ }, u = (e, n) => {
28
+ const t = c(n);
29
+ return new RegExp(t).test(`${e}`);
30
+ }, m = (e = "", n) => {
31
+ const t = d(n);
32
+ return t && t !== "." && t !== "," && (e = e.replace(t, ".")), e.replace(",", ".");
33
+ }, i = (e) => {
34
+ if (e == null || e === "")
35
+ return;
36
+ const n = Number(m(String(e)));
37
+ return Number.isFinite(n) ? n : void 0;
38
+ };
39
+ export {
40
+ l as a,
41
+ s as b,
42
+ i as c,
43
+ o as g,
44
+ m as t
45
+ };
@@ -0,0 +1,6 @@
1
+ var T = /* @__PURE__ */ (function(r) {
2
+ return r[r.FREE_FLOW = 0] = "FREE_FLOW", r[r.ONE = 1] = "ONE", r[r.TWO = 2] = "TWO", r[r.THREE = 3] = "THREE", r;
3
+ })({});
4
+ export {
5
+ T as N
6
+ };
@@ -0,0 +1,7 @@
1
+ const o = "_options_fhx2z_1", t = "_optionLabel_fhx2z_20", n = {
2
+ options: o,
3
+ optionLabel: t
4
+ };
5
+ export {
6
+ n as o
7
+ };
@@ -0,0 +1,142 @@
1
+ import e, { useState as w, useRef as N } from "react";
2
+ import { RicosViewer as O } from "@wix/ricos/viewer";
3
+ import d from "classnames";
4
+ import { TextField as x, Group as A, Input as B, Button as P } from "react-aria-components";
5
+ import { ag as p, ad as I, ai as V, aq as v } from "./form-Dn-MrArr.js";
6
+ import { f as E, a as g } from "./find-child-C60k4CxG.js";
7
+ import { D as M, E as q } from "./field-error-headless-D40GACk4.js";
8
+ import { L as k } from "./field-label-headless-Beq2Tn6V.js";
9
+ import { E as U } from "./error-icon-hZxQ6DEy.js";
10
+ import { H } from "./custom-focus-class-_483Pkwp.js";
11
+ import { s as u } from "./field-rac.module-DXfwku6m.js";
12
+ import { r as j, H as W, q as Z, l as G, h as Q } from "./form-element-classes-Bi-nNM8q.js";
13
+ const t = ({ children: r, className: o }) => {
14
+ const { id: i, value: s, onChange: c, disabled: l, readOnly: m, required: n, hasError: a, onBlur: f, onFocus: _, FieldLayout: y } = p(), { labelId: C } = I(), [F, L] = w(!1), R = E(r, t.Label), D = E(r, t.Control), T = E(r, t.Description), S = E(r, t.Error);
15
+ return /* @__PURE__ */ e.createElement(y, {
16
+ fieldId: i,
17
+ renderLabel: () => R,
18
+ renderInput: () => /* @__PURE__ */ e.createElement(x, {
19
+ "aria-labelledby": C,
20
+ value: s ?? "",
21
+ onChange: c,
22
+ isDisabled: l,
23
+ isReadOnly: m,
24
+ isRequired: n,
25
+ isInvalid: a,
26
+ onBlur: f,
27
+ onFocus: _,
28
+ className: o
29
+ }, g(D, {
30
+ isVisible: F,
31
+ onToggleVisibility: () => L((h) => !h)
32
+ })),
33
+ renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, T, S)
34
+ });
35
+ }, $ = ({ children: r, className: o, ...i }) => {
36
+ const { isVisible: s, onToggleVisibility: c } = i, { disabled: l, hasError: m } = p(), n = E(r, t.Input), a = E(r, t.Toggle);
37
+ return /* @__PURE__ */ e.createElement(A, {
38
+ className: o,
39
+ isDisabled: l,
40
+ isInvalid: m
41
+ }, g(n, {
42
+ isVisible: s
43
+ }), g(a, {
44
+ isVisible: s,
45
+ onToggleVisibility: c
46
+ }));
47
+ }, z = ({ className: r, ...o }) => {
48
+ const { isVisible: i } = o, { id: s, placeholder: c } = p(), { inputId: l, ariaDescribedBy: m } = I(), n = N(null);
49
+ return V(() => {
50
+ var a;
51
+ (a = n.current) == null || a.focus();
52
+ }, s), /* @__PURE__ */ e.createElement(B, {
53
+ ref: n,
54
+ id: l,
55
+ type: i ? "text" : "password",
56
+ "aria-describedby": m,
57
+ className: r,
58
+ placeholder: c
59
+ });
60
+ }, J = ({ className: r, showPasswordTooltipText: o, hidePasswordTooltipText: i, children: s, ...c }) => {
61
+ const { isVisible: l, onToggleVisibility: m } = c, { disabled: n } = p(), a = l ? i : o;
62
+ return /* @__PURE__ */ e.createElement(P, {
63
+ type: "button",
64
+ isDisabled: n,
65
+ onPress: m,
66
+ "aria-label": a,
67
+ "aria-pressed": l,
68
+ className: r
69
+ }, s == null ? void 0 : s({
70
+ isVisible: l
71
+ }));
72
+ };
73
+ t.Label = k;
74
+ t.Control = $;
75
+ t.Input = z;
76
+ t.Toggle = J;
77
+ t.Description = M;
78
+ t.Error = q;
79
+ const K = (r) => /* @__PURE__ */ e.createElement("svg", {
80
+ viewBox: "0 0 24 24",
81
+ width: "20",
82
+ height: "20",
83
+ fill: "none",
84
+ stroke: "currentColor",
85
+ strokeWidth: "1.5",
86
+ "aria-hidden": "true",
87
+ ...r
88
+ }, /* @__PURE__ */ e.createElement("path", {
89
+ d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"
90
+ }), /* @__PURE__ */ e.createElement("circle", {
91
+ cx: "12",
92
+ cy: "12",
93
+ r: "3"
94
+ })), X = (r) => /* @__PURE__ */ e.createElement("svg", {
95
+ viewBox: "0 0 24 24",
96
+ width: "20",
97
+ height: "20",
98
+ fill: "none",
99
+ stroke: "currentColor",
100
+ strokeWidth: "1.5",
101
+ "aria-hidden": "true",
102
+ ...r
103
+ }, /* @__PURE__ */ e.createElement("path", {
104
+ d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"
105
+ }), /* @__PURE__ */ e.createElement("circle", {
106
+ cx: "12",
107
+ cy: "12",
108
+ r: "3"
109
+ }), /* @__PURE__ */ e.createElement("line", {
110
+ x1: "3",
111
+ y1: "21",
112
+ x2: "21",
113
+ y2: "3"
114
+ })), Y = "_control_1malj_1", ee = "_toggleButton_1malj_15", b = {
115
+ control: Y,
116
+ toggleButton: ee
117
+ }, te = ({ content: r, locale: o }) => /* @__PURE__ */ e.createElement(O, {
118
+ content: r,
119
+ locale: o
120
+ }), re = () => {
121
+ const { t: r } = v();
122
+ return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
123
+ className: d(j, u.label)
124
+ }, /* @__PURE__ */ e.createElement(t.Label.Required, {
125
+ className: d(W, u.requiredMark)
126
+ })), /* @__PURE__ */ e.createElement(t.Control, {
127
+ className: d(Z, u.input, b.control)
128
+ }, /* @__PURE__ */ e.createElement(t.Input, {
129
+ className: d(u.innerInput, H)
130
+ }), /* @__PURE__ */ e.createElement(t.Toggle, {
131
+ className: b.toggleButton,
132
+ showPasswordTooltipText: r("forms.widget.modals.show-password-tooltip"),
133
+ hidePasswordTooltipText: r("forms.widget.modals.hide-password-tooltip")
134
+ }, ({ isVisible: o }) => o ? /* @__PURE__ */ e.createElement(X, null) : /* @__PURE__ */ e.createElement(K, null))), /* @__PURE__ */ e.createElement(t.Error, {
135
+ className: d(G, u.error)
136
+ }, /* @__PURE__ */ e.createElement(U, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
137
+ className: d(Q, u.description)
138
+ }, te));
139
+ }, ge = () => /* @__PURE__ */ e.createElement(re, null);
140
+ export {
141
+ ge as PasswordRAC
142
+ };
@@ -0,0 +1,12 @@
1
+ import { b as d } from "./numeric-input-utils-CuBMi4-a.js";
2
+ const p = (o, a) => {
3
+ const l = o.replace(",", ".").match(/[\d.]+/);
4
+ if (!l)
5
+ return null;
6
+ const t = l[0], e = t.indexOf("."), i = e !== -1 && t.length > e + 2 ? t.substring(0, e + 3) : t, s = d(i, a), m = Number(s.replace(/,/g, "."));
7
+ return isNaN(m) ? null : s;
8
+ }, b = (o, a) => a != null && a.code ? o(`locale-dataset.currencies.${a == null ? void 0 : a.code}`) : (a == null ? void 0 : a.sign) || "";
9
+ export {
10
+ p as f,
11
+ b as g
12
+ };
@@ -0,0 +1,137 @@
1
+ import r, { useCallback as V, useRef as j } from "react";
2
+ import { RicosViewer as w } from "@wix/ricos/viewer";
3
+ import i from "classnames";
4
+ import { TextField as z, Group as J, Input as K } from "react-aria-components";
5
+ import { ag as D, ad as S, aa as q, aq as W, ai as X } from "./form-Dn-MrArr.js";
6
+ import { f as m } from "./find-child-C60k4CxG.js";
7
+ import { D as Y, E as Z } from "./field-error-headless-D40GACk4.js";
8
+ import { L as ee } from "./field-label-headless-Beq2Tn6V.js";
9
+ import { f as R, g as re } from "./payment-field-utils-DobiK5Xh.js";
10
+ import { u as te } from "./use-synced-display-value-DcAxdn3M.js";
11
+ import { E as ne } from "./error-icon-hZxQ6DEy.js";
12
+ import { H as ae } from "./custom-focus-class-_483Pkwp.js";
13
+ import { s as u } from "./field-rac.module-DXfwku6m.js";
14
+ import { r as se, H as oe, q as le, l as ce, h as ie } from "./form-element-classes-Bi-nNM8q.js";
15
+ function ue(e, t) {
16
+ return {
17
+ productId: e.id,
18
+ price: t,
19
+ quantity: 1
20
+ };
21
+ }
22
+ function h(e) {
23
+ if (e == null || e === "")
24
+ return;
25
+ const t = Number(String(e).replace(/,/g, "."));
26
+ return Number.isNaN(t) ? void 0 : t;
27
+ }
28
+ const n = ({ children: e }) => {
29
+ var O, g, A, P;
30
+ const { id: t, value: a, onChange: s, disabled: p, readOnly: d, required: y, hasError: b, onBlur: o, onFocus: f, FieldLayout: x, validation: _ } = D(), { labelId: M, prefixId: G } = S(), { regionalFormat: c } = q(), N = (A = (g = (O = _ == null ? void 0 : _.predefined) == null ? void 0 : O.paymentOptions) == null ? void 0 : g.products) == null ? void 0 : A[0], C = (P = a == null ? void 0 : a.at(0)) == null ? void 0 : P.price, [F, I] = te({
31
+ sourceValue: C,
32
+ format: (l) => R(String(l ?? ""), c),
33
+ regionalFormat: c
34
+ }), $ = V(() => {
35
+ const l = R(F, c);
36
+ I(l || ""), o == null || o();
37
+ }, [
38
+ F,
39
+ c,
40
+ o,
41
+ I
42
+ ]), U = V((l) => {
43
+ I(l);
44
+ const L = h(R(l, c)), Q = h(C);
45
+ if (L !== Q) {
46
+ if (L === void 0) {
47
+ s(null);
48
+ return;
49
+ }
50
+ s([
51
+ ue(N, L)
52
+ ]);
53
+ }
54
+ }, [
55
+ s,
56
+ N,
57
+ c,
58
+ C,
59
+ I
60
+ ]), B = m(e, n.Label), H = m(e, n.Input), k = m(e, n.Description), v = m(e, n.Error);
61
+ return /* @__PURE__ */ r.createElement(x, {
62
+ fieldId: t,
63
+ renderLabel: () => B,
64
+ renderInput: () => /* @__PURE__ */ r.createElement(z, {
65
+ "aria-labelledby": `${M} ${G}`,
66
+ value: a ? F : "",
67
+ onChange: U,
68
+ isDisabled: p,
69
+ isReadOnly: d,
70
+ isRequired: y,
71
+ isInvalid: b,
72
+ onBlur: $,
73
+ onFocus: f
74
+ }, H),
75
+ renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, v, k)
76
+ });
77
+ }, E = ({ children: e, className: t }) => {
78
+ const { disabled: a, hasError: s } = D(), p = m(e, E.Currency), d = m(e, E.Value);
79
+ return /* @__PURE__ */ r.createElement(J, {
80
+ className: t,
81
+ isDisabled: a,
82
+ isInvalid: s
83
+ }, p, d);
84
+ }, me = ({ className: e }) => {
85
+ const { currency: t } = q(), { t: a } = W(), { prefixId: s } = S();
86
+ return t ? /* @__PURE__ */ r.createElement("span", {
87
+ id: s,
88
+ "aria-hidden": !1,
89
+ "aria-label": re(a, t),
90
+ className: e
91
+ }, t.sign || t.code) : null;
92
+ }, pe = ({ className: e }) => {
93
+ const { id: t, placeholder: a, label: s } = D(), { inputId: p, labelId: d, prefixId: y, ariaDescribedBy: b } = S(), o = j(null);
94
+ return X(() => {
95
+ var f;
96
+ (f = o.current) == null || f.focus();
97
+ }, t), /* @__PURE__ */ r.createElement(K, {
98
+ ref: o,
99
+ id: p,
100
+ className: e,
101
+ placeholder: a,
102
+ "aria-label": s,
103
+ "aria-labelledby": `${d} ${y}`,
104
+ "aria-describedby": b,
105
+ autoComplete: "off"
106
+ });
107
+ };
108
+ E.Currency = me;
109
+ E.Value = pe;
110
+ n.Label = ee;
111
+ n.Input = E;
112
+ n.Description = Y;
113
+ n.Error = Z;
114
+ const de = "_inputGroup_vuy4u_1", Ee = "_currency_vuy4u_14", T = {
115
+ inputGroup: de,
116
+ currency: Ee
117
+ }, fe = ({ content: e, locale: t }) => /* @__PURE__ */ r.createElement(w, {
118
+ content: e,
119
+ locale: t
120
+ }), Ie = () => /* @__PURE__ */ r.createElement(n, null, /* @__PURE__ */ r.createElement(n.Label, {
121
+ className: i(se, u.label)
122
+ }, /* @__PURE__ */ r.createElement(n.Label.Required, {
123
+ className: i(oe, u.requiredMark)
124
+ })), /* @__PURE__ */ r.createElement(n.Input, {
125
+ className: i(le, u.input, T.inputGroup)
126
+ }, /* @__PURE__ */ r.createElement(n.Input.Currency, {
127
+ className: T.currency
128
+ }), /* @__PURE__ */ r.createElement(n.Input.Value, {
129
+ className: i(u.innerInput, ae)
130
+ })), /* @__PURE__ */ r.createElement(n.Error, {
131
+ className: i(ce, u.error)
132
+ }, /* @__PURE__ */ r.createElement(ne, null), /* @__PURE__ */ r.createElement(n.Error.Text, null)), /* @__PURE__ */ r.createElement(n.Description, {
133
+ className: i(ie, u.description)
134
+ }, fe)), Ve = () => /* @__PURE__ */ r.createElement(Ie, null);
135
+ export {
136
+ Ve as PaymentInputRAC
137
+ };