@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,305 @@
1
+ import n, { useMemo as w, useCallback as L, useRef as ae } from "react";
2
+ import { RicosViewer as se } from "@wix/ricos/viewer";
3
+ import _ from "classnames";
4
+ import { RadioGroup as le, RadioField as Q, RadioButton as W, TextField as ce, Input as ie } from "react-aria-components";
5
+ import { debounce as ue } from "ts-debounce";
6
+ import { P as j, ag as P, ad as V, aq as me, aa as M, ai as pe } from "./form-Dn-MrArr.js";
7
+ import { f as h, a as g } from "./find-child-C60k4CxG.js";
8
+ import { a as J } from "./format-currency-BwShJ9vM.js";
9
+ import { D as de, E as Ie } from "./field-error-headless-D40GACk4.js";
10
+ import { L as Ce } from "./field-label-headless-Beq2Tn6V.js";
11
+ import { N as Ee } from "./options-layout-constants-DEfIEJWD.js";
12
+ import { a as fe, b as he } from "./numeric-input-utils-CuBMi4-a.js";
13
+ import { g as Oe } from "./payment-field-utils-DobiK5Xh.js";
14
+ import { u as ye } from "./use-synced-display-value-DcAxdn3M.js";
15
+ import { E as _e } from "./error-icon-hZxQ6DEy.js";
16
+ import { s as v } from "./field-rac.module-DXfwku6m.js";
17
+ import { r as be, H as ge, f as Y, t as B, l as Fe, h as Ne } from "./form-element-classes-Bi-nNM8q.js";
18
+ import { o as De } from "./options-rac.module-KM-VT_KY.js";
19
+ function Le(e, t) {
20
+ return e.reduce((r, o) => (r[o[t]] = o, r), {});
21
+ }
22
+ function Re(e) {
23
+ return Le(e, "id");
24
+ }
25
+ const ve = 0.01;
26
+ function Se(e) {
27
+ var t;
28
+ return ((t = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : t.price) || "0";
29
+ }
30
+ function K(e, t) {
31
+ const r = Number(t || "0");
32
+ return {
33
+ productId: e.id,
34
+ price: e.priceType === j.DYNAMIC_PRICE ? r : String(r),
35
+ quantity: 1
36
+ };
37
+ }
38
+ function Ae(e) {
39
+ return e.find((t) => t.priceType === j.DYNAMIC_PRICE);
40
+ }
41
+ function Pe(e, t) {
42
+ return (e == null ? void 0 : e.productId) === (t == null ? void 0 : t.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
43
+ }
44
+ function Me(e, t, r) {
45
+ const o = (t == null ? void 0 : t.productId) === e ? void 0 : e, s = o ? r[o] : void 0;
46
+ return s ? [
47
+ K(s, Se(s))
48
+ ] : [];
49
+ }
50
+ const a = ({ children: e }) => {
51
+ const { id: t, value: r, onChange: o, disabled: s, required: c, onBlur: i, onFocus: y, validation: u, addOther: m, addOtherPlaceholder: I, FieldLayout: O, hasError: E } = P(), { labelId: p } = V(), { t: d } = me(), { currency: b, regionalFormat: F } = M(), C = r == null ? void 0 : r[0], N = w(() => {
52
+ var f, T;
53
+ return ((T = (f = u == null ? void 0 : u.predefined) == null ? void 0 : f.paymentOptions) == null ? void 0 : T.products) || [];
54
+ }, [
55
+ u
56
+ ]), R = w(() => Re(N), [
57
+ N
58
+ ]), l = w(() => m ? Ae(N) : void 0, [
59
+ N,
60
+ m
61
+ ]), X = Pe(C, l), [q, x] = ye({
62
+ sourceValue: X,
63
+ format: (f) => he(String(f ?? ""), F),
64
+ regionalFormat: F
65
+ }), z = L((f) => {
66
+ o(Me(f, C, R)), x("");
67
+ }, [
68
+ o,
69
+ R,
70
+ C,
71
+ x
72
+ ]), $ = L((f) => {
73
+ l && o(typeof f == "number" ? [
74
+ K(l, String(f))
75
+ ] : []);
76
+ }, [
77
+ o,
78
+ l
79
+ ]), H = w(() => ue($, 500), [
80
+ $
81
+ ]), Z = L((f) => {
82
+ (C == null ? void 0 : C.productId) !== (l == null ? void 0 : l.id) && o(void 0);
83
+ const { validInput: T, validNumber: re } = fe(f.target.value, ve, q, F);
84
+ x(T), H(re);
85
+ }, [
86
+ F,
87
+ o,
88
+ C,
89
+ l,
90
+ q,
91
+ H,
92
+ x
93
+ ]), U = (C == null ? void 0 : C.productId) || null, ee = L(() => {
94
+ l != null && l.id && U !== l.id && z(l.id);
95
+ }, [
96
+ l == null ? void 0 : l.id,
97
+ U,
98
+ z
99
+ ]), te = h(e, a.Label), G = h(e, a.Control), ne = h(e, a.Description), oe = h(e, a.Error);
100
+ return /* @__PURE__ */ n.createElement(O, {
101
+ fieldId: t,
102
+ renderLabel: () => te,
103
+ renderInput: () => /* @__PURE__ */ n.createElement(le, {
104
+ "aria-labelledby": p,
105
+ value: U,
106
+ onChange: z,
107
+ isDisabled: s,
108
+ isInvalid: E,
109
+ isRequired: c,
110
+ onBlur: i,
111
+ onFocus: y
112
+ }, G ? g(G, {
113
+ productsById: R,
114
+ addOther: m,
115
+ customAmount: q,
116
+ onCustomAmountInputChange: Z,
117
+ currency: b,
118
+ t: d,
119
+ placeholder: I === void 0 ? d("donation.other-option.placeholder") : I,
120
+ customAmountProductId: l == null ? void 0 : l.id,
121
+ onFocusCustomInput: ee
122
+ }) : null),
123
+ renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, oe, ne)
124
+ });
125
+ }, xe = ({ children: e, className: t, ...r }) => {
126
+ const { productsById: o, addOther: s, customAmount: c, onCustomAmountInputChange: i, currency: y, t: u, placeholder: m, customAmountProductId: I, onFocusCustomInput: O } = r, { hasError: E } = P(), p = h(e, a.Options), d = h(e, a.OtherInput);
127
+ return /* @__PURE__ */ n.createElement("div", {
128
+ className: t,
129
+ "data-invalid": E
130
+ }, p ? g(p, {
131
+ productsById: o,
132
+ addOther: s,
133
+ customAmountProductId: I,
134
+ t: u
135
+ }) : null, d && s ? g(d, {
136
+ customAmount: c,
137
+ onCustomAmountInputChange: i,
138
+ currency: y,
139
+ t: u,
140
+ placeholder: m,
141
+ customAmountProductId: I,
142
+ onFocusCustomInput: O
143
+ }) : null);
144
+ }, k = ({ children: e, className: t, ...r }) => {
145
+ const { productsById: o, addOther: s, customAmountProductId: c, t: i } = r, { options: y, numberOfColumns: u } = P(), { isMobile: m } = M(), I = h(e, k.Option), O = m ? Ee.ONE : u;
146
+ return /* @__PURE__ */ n.createElement("div", {
147
+ className: t,
148
+ "data-columns": O
149
+ }, y.map((E) => {
150
+ var b;
151
+ const p = o[E.value], d = (b = p == null ? void 0 : p.fixedPriceOptions) == null ? void 0 : b.price;
152
+ return g(I, {
153
+ key: E.value,
154
+ value: E.value,
155
+ price: d || "0"
156
+ });
157
+ }), s && c && /* @__PURE__ */ n.createElement(Q, {
158
+ value: c,
159
+ style: {
160
+ position: "absolute",
161
+ width: "1px",
162
+ height: "1px",
163
+ padding: "0",
164
+ margin: "-1px",
165
+ overflow: "hidden",
166
+ clip: "rect(0, 0, 0, 0)",
167
+ whiteSpace: "nowrap",
168
+ border: "0"
169
+ }
170
+ }, /* @__PURE__ */ n.createElement(W, {
171
+ "aria-label": i("donation.other-option.label", "Custom amount")
172
+ }, i("donation.other-option.label", "Custom amount"))));
173
+ }, S = ({ children: e, className: t, ...r }) => {
174
+ const { value: o, price: s } = r, { id: c } = P(), { currency: i, regionalFormat: y } = M(), u = h(e, S.Value), m = h(e, S.Currency), { isCurrencyPrefixed: I } = J({
175
+ amount: s,
176
+ currency: i == null ? void 0 : i.code,
177
+ locale: y
178
+ }), O = ae(null);
179
+ pe(() => {
180
+ var p, d;
181
+ (d = (p = O.current) == null ? void 0 : p.querySelector("input")) == null || d.focus();
182
+ }, c);
183
+ const E = u ? g(u, {
184
+ price: s
185
+ }) : null;
186
+ return /* @__PURE__ */ n.createElement(Q, {
187
+ value: o
188
+ }, /* @__PURE__ */ n.createElement(W, {
189
+ className: t,
190
+ ref: O
191
+ }, /* @__PURE__ */ n.createElement(n.Fragment, null, I && m, E, !I && m)));
192
+ }, Te = ({ className: e, ...t }) => {
193
+ const { price: r } = t, { currency: o, regionalFormat: s } = M(), { value: c } = J({
194
+ amount: r,
195
+ currency: o == null ? void 0 : o.code,
196
+ locale: s
197
+ });
198
+ return /* @__PURE__ */ n.createElement("span", {
199
+ className: e
200
+ }, c);
201
+ }, we = ({ className: e }) => {
202
+ const { currency: t } = M();
203
+ return /* @__PURE__ */ n.createElement("span", {
204
+ className: e
205
+ }, (t == null ? void 0 : t.sign) || (t == null ? void 0 : t.code) || "");
206
+ };
207
+ S.Value = Te;
208
+ S.Currency = we;
209
+ const A = ({ children: e, className: t, ...r }) => {
210
+ const { customAmount: o, onCustomAmountInputChange: s, currency: c, t: i, placeholder: y, customAmountProductId: u, onFocusCustomInput: m } = r, { disabled: I, hasError: O } = P(), { labelId: E, prefixId: p } = V(), d = h(e, A.Currency), b = h(e, A.Value), F = L((R) => {
211
+ s({
212
+ target: {
213
+ value: R
214
+ }
215
+ });
216
+ }, [
217
+ s
218
+ ]), C = L(() => {
219
+ m();
220
+ }, [
221
+ m
222
+ ]), N = o && o.trim() !== "";
223
+ return /* @__PURE__ */ n.createElement(ce, {
224
+ "aria-labelledby": `${E} ${p}`,
225
+ value: o,
226
+ onChange: F,
227
+ onFocus: C,
228
+ isDisabled: I,
229
+ isInvalid: O,
230
+ className: t,
231
+ "data-selected": N ? "true" : void 0
232
+ }, o && c && d ? g(d, {
233
+ currency: c,
234
+ t: i
235
+ }) : null, b ? g(b, {
236
+ placeholder: y,
237
+ customAmountProductId: u
238
+ }) : null);
239
+ }, Be = ({ className: e, ...t }) => {
240
+ const { currency: r, t: o } = t, { prefixId: s } = V();
241
+ return /* @__PURE__ */ n.createElement("span", {
242
+ id: s,
243
+ "aria-hidden": !1,
244
+ "aria-label": Oe(o, r),
245
+ className: e
246
+ }, (r == null ? void 0 : r.sign) || (r == null ? void 0 : r.code) || "");
247
+ }, Ve = ({ className: e, ...t }) => {
248
+ const { placeholder: r, customAmountProductId: o } = t, { ariaDescribedBy: s, labelId: c, prefixId: i } = V();
249
+ return /* @__PURE__ */ n.createElement(ie, {
250
+ id: o,
251
+ "aria-labelledby": `${c} ${i}`,
252
+ "aria-describedby": s,
253
+ placeholder: r,
254
+ inputMode: "decimal",
255
+ autoComplete: "off",
256
+ className: e
257
+ });
258
+ };
259
+ A.Currency = Be;
260
+ A.Value = Ve;
261
+ k.Option = S;
262
+ a.Label = Ce;
263
+ a.Control = xe;
264
+ a.Options = k;
265
+ a.OtherInput = A;
266
+ a.Description = de;
267
+ a.Error = Ie;
268
+ const qe = "_control_7gwzv_1", ze = "_option_7gwzv_7", Ue = "_optionCurrency_7gwzv_91", ke = "_otherInput_7gwzv_95", $e = "_otherInputValue_7gwzv_112", He = "_otherInputCurrency_7gwzv_165", D = {
269
+ control: qe,
270
+ option: ze,
271
+ optionCurrency: Ue,
272
+ otherInput: ke,
273
+ otherInputValue: $e,
274
+ otherInputCurrency: He
275
+ }, Ge = ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(se, {
276
+ content: e,
277
+ locale: t
278
+ }), Ye = () => /* @__PURE__ */ n.createElement(a, null, /* @__PURE__ */ n.createElement(a.Label, {
279
+ className: _(be, v.label)
280
+ }, /* @__PURE__ */ n.createElement(a.Label.Required, {
281
+ className: _(ge, v.requiredMark)
282
+ })), /* @__PURE__ */ n.createElement(a.Control, {
283
+ className: D.control
284
+ }, /* @__PURE__ */ n.createElement(a.Options, {
285
+ className: De.options
286
+ }, /* @__PURE__ */ n.createElement(a.Options.Option, {
287
+ className: _(Y, D.option)
288
+ }, /* @__PURE__ */ n.createElement(a.Options.Option.Value, {
289
+ className: B
290
+ }), /* @__PURE__ */ n.createElement(a.Options.Option.Currency, {
291
+ className: _(B, D.optionCurrency)
292
+ }))), /* @__PURE__ */ n.createElement(a.OtherInput, {
293
+ className: _(Y, v.input, D.otherInput)
294
+ }, /* @__PURE__ */ n.createElement(a.OtherInput.Currency, {
295
+ className: _(B, D.otherInputCurrency)
296
+ }), /* @__PURE__ */ n.createElement(a.OtherInput.Value, {
297
+ className: _(B, D.otherInputValue)
298
+ }))), /* @__PURE__ */ n.createElement(a.Error, {
299
+ className: _(Fe, v.error)
300
+ }, /* @__PURE__ */ n.createElement(_e, null), /* @__PURE__ */ n.createElement(a.Error.Text, null)), /* @__PURE__ */ n.createElement(a.Description, {
301
+ className: _(Ne, v.description)
302
+ }, Ge)), mt = () => /* @__PURE__ */ n.createElement(Ye, null);
303
+ export {
304
+ mt as DonationRAC
305
+ };
@@ -0,0 +1,84 @@
1
+ import e, { useState as E, useCallback as g, useRef as q } from "react";
2
+ import { UNSAFE_PortalProvider as A } from "react-aria";
3
+ import { Select as w, SelectValue as M, ListBox as U, ListBoxItem as _ } from "react-aria-components";
4
+ import { ag as p, ad as b, ai as j } from "./form-Dn-MrArr.js";
5
+ import { f as d, a as z } from "./find-child-C60k4CxG.js";
6
+ import { D as G, E as H } from "./field-error-headless-D40GACk4.js";
7
+ import { L as J } from "./field-label-headless-Beq2Tn6V.js";
8
+ import { S as K, N as Q } from "./non-modal-popover-DtIMXHbe.js";
9
+ const n = ({ children: t }) => {
10
+ const { id: o, value: r, defaultValue: l, options: a = [], readOnly: s, onChange: u, placeholder: m, disabled: i, required: v, onBlur: O, onFocus: y, FieldLayout: F, hasError: C } = p(), [D, L] = E(!1), [h, I] = E(null), B = r && a.some((c) => (c.value ?? c.label) === r) ? r : l || null, { labelId: N } = b(), P = g((c) => {
11
+ s || u(typeof c == "string" ? c : null);
12
+ }, [
13
+ u,
14
+ s
15
+ ]), S = g((c) => L(c && !i && !s), [
16
+ i,
17
+ s
18
+ ]), T = d(t, n.Label), x = d(t, n.Trigger), V = d(t, n.Options), R = d(t, n.Description), k = d(t, n.Error);
19
+ return /* @__PURE__ */ e.createElement(F, {
20
+ fieldId: o,
21
+ renderLabel: () => T,
22
+ renderInput: () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", {
23
+ ref: I,
24
+ style: {
25
+ display: "contents"
26
+ }
27
+ }), /* @__PURE__ */ e.createElement(A, {
28
+ getContainer: () => h
29
+ }, /* @__PURE__ */ e.createElement(w, {
30
+ "aria-labelledby": N,
31
+ value: B,
32
+ isOpen: D && !i && !s,
33
+ onOpenChange: S,
34
+ onChange: P,
35
+ isDisabled: i,
36
+ isInvalid: C,
37
+ isRequired: v,
38
+ placeholder: m,
39
+ onBlur: O,
40
+ onFocus: y
41
+ }, x, V))),
42
+ renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, k, R)
43
+ });
44
+ }, W = ({ children: t, className: o }) => {
45
+ const { inputId: r, ariaDescribedBy: l } = b(), { id: a, hasError: s, isLoading: u } = p(), m = q(null);
46
+ return j(() => {
47
+ var i;
48
+ (i = m.current) == null || i.focus();
49
+ }, a), /* @__PURE__ */ e.createElement(K, {
50
+ ref: m,
51
+ id: r,
52
+ "aria-describedby": l,
53
+ className: o,
54
+ "data-invalid": s || void 0,
55
+ "data-loading": u || void 0
56
+ }, /* @__PURE__ */ e.createElement(M, null), t);
57
+ }, f = ({ children: t, className: o }) => {
58
+ const { options: r = [] } = p(), l = d(t, f.Option);
59
+ return /* @__PURE__ */ e.createElement(Q, {
60
+ className: o,
61
+ containerPadding: 0,
62
+ offset: 0
63
+ }, /* @__PURE__ */ e.createElement(U, null, r.map((a) => z(l, {
64
+ key: a.value ?? a.label,
65
+ value: a.value ?? a.label,
66
+ label: a.label
67
+ }))));
68
+ }, X = ({ className: t, ...o }) => {
69
+ const { value: r, label: l } = o;
70
+ return /* @__PURE__ */ e.createElement(_, {
71
+ className: t,
72
+ id: r,
73
+ textValue: l
74
+ }, l);
75
+ };
76
+ f.Option = X;
77
+ n.Label = J;
78
+ n.Trigger = W;
79
+ n.Options = f;
80
+ n.Description = G;
81
+ n.Error = H;
82
+ export {
83
+ n as D
84
+ };
@@ -0,0 +1,32 @@
1
+ import { RicosViewer as l } from "@wix/ricos/viewer";
2
+ import t from "classnames";
3
+ import e from "react";
4
+ import { D as o } from "./dropdown-field-headless-CYpFgZ3H.js";
5
+ import { C as m } from "./chevron-down-icon-CcpVm6B-.js";
6
+ import { E as n } from "./error-icon-hZxQ6DEy.js";
7
+ import { H as c } from "./custom-focus-class-_483Pkwp.js";
8
+ import { s as r } from "./field-rac.module-DXfwku6m.js";
9
+ import { r as E, H as i, q as p, u as _, l as S, h as R } from "./form-element-classes-Bi-nNM8q.js";
10
+ const D = ({ content: a, locale: s }) => /* @__PURE__ */ e.createElement(l, {
11
+ content: a,
12
+ locale: s
13
+ }), u = () => /* @__PURE__ */ e.createElement(o, null, /* @__PURE__ */ e.createElement(o.Label, {
14
+ className: t(E, r.label)
15
+ }, /* @__PURE__ */ e.createElement(o.Label.Required, {
16
+ className: t(i, r.requiredMark)
17
+ })), /* @__PURE__ */ e.createElement(o.Trigger, {
18
+ className: t(p, r.input, r.dropdownTrigger)
19
+ }, /* @__PURE__ */ e.createElement(m, {
20
+ className: r.dropdownIcon
21
+ })), /* @__PURE__ */ e.createElement(o.Options, {
22
+ className: t(_, r.selectPopover, r.dropdownPopover)
23
+ }, /* @__PURE__ */ e.createElement(o.Options.Option, {
24
+ className: t(r.selectOption, c)
25
+ })), /* @__PURE__ */ e.createElement(o.Error, {
26
+ className: t(S, r.error)
27
+ }, /* @__PURE__ */ e.createElement(n, null), /* @__PURE__ */ e.createElement(o.Error.Text, null)), /* @__PURE__ */ e.createElement(o.Description, {
28
+ className: t(R, r.description)
29
+ }, D));
30
+ export {
31
+ u as D
32
+ };
@@ -0,0 +1,6 @@
1
+ import o from "react";
2
+ import { D as r } from "./dropdown-field-rac-B5emHw3_.js";
3
+ const n = () => /* @__PURE__ */ o.createElement(r, null);
4
+ export {
5
+ n as DropdownRAC
6
+ };
@@ -0,0 +1,6 @@
1
+ import e from "react";
2
+ import { M as r } from "./multiline-address-field-rac-C0PUrp9n.js";
3
+ const l = () => /* @__PURE__ */ e.createElement(r, null);
4
+ export {
5
+ l as EcomAddressRAC
6
+ };
@@ -0,0 +1,49 @@
1
+ import o, { useMemo as a } from "react";
2
+ import { ag as n, aq as c, h as i } from "./form-Dn-MrArr.js";
3
+ import { C } from "./checkbox-field-rac-B4NsTbRK.js";
4
+ import { j as l, k as p, i as m } from "./form-element-classes-Bi-nNM8q.js";
5
+ const _ = (e) => ({
6
+ nodes: [
7
+ {
8
+ paragraphData: {
9
+ textStyle: {
10
+ textAlignment: "AUTO"
11
+ }
12
+ },
13
+ type: "PARAGRAPH",
14
+ nodes: [
15
+ {
16
+ type: "TEXT",
17
+ nodes: [],
18
+ textData: {
19
+ text: e("ecom.form.field-type.ecom-subscriptions.label"),
20
+ decorations: []
21
+ },
22
+ id: ""
23
+ }
24
+ ],
25
+ id: "8k8yy2"
26
+ }
27
+ ]
28
+ }), R = () => {
29
+ const e = n(), { t } = c(), s = a(() => _(t), [
30
+ t
31
+ ]), r = {
32
+ ...e,
33
+ label: s
34
+ };
35
+ return /* @__PURE__ */ o.createElement(i.Provider, {
36
+ value: {
37
+ v2: r
38
+ }
39
+ }, /* @__PURE__ */ o.createElement(C, {
40
+ classes: {
41
+ container: m,
42
+ label: p,
43
+ control: l
44
+ }
45
+ }));
46
+ };
47
+ export {
48
+ R as EcomSubscriptionCheckboxRAC
49
+ };