@wix/form-elements 1.71.0 → 1.73.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 (109) hide show
  1. package/dist/component/{appointment-rac-CrzIERuK.js → appointment-rac-Bze1s2XD.js} +5 -5
  2. package/dist/component/{bookings-address-rac-Dfkpd7m-.js → bookings-address-rac-BcrkXf63.js} +1 -1
  3. package/dist/component/{bookings-email-rac-qQ7bgngn.js → bookings-email-rac-DYq5RxOP.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-plgTTOzk.js → bookings-first-name-rac-ZJ_sQ-01.js} +1 -1
  5. package/dist/component/{bookings-header-rac-B3LjHXJs.js → bookings-header-rac-Cv8kl01f.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-DwDrEmTT.js → bookings-last-name-rac-BmnulSZ6.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-EGRy_-2H.js → bookings-login-bar-rac-Bdi4xs9y.js} +2 -2
  8. package/dist/component/{bookings-phone-rac-BgViVOU-.js → bookings-phone-rac-C8DjSzUY.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-CDwCdPHa.js → bookings-rich-text-rac-DYu011oy.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-wF2nX9PW.js → checkbox-field-rac-BH3yEE5j.js} +43 -43
  11. package/dist/component/{checkbox-group-field-headless-jNzvn7tN.js → checkbox-group-field-headless-D_GG5LHM.js} +3 -3
  12. package/dist/component/{checkbox-group-field-rac-6PaMjzeg.js → checkbox-group-field-rac-Cj7Erubs.js} +20 -19
  13. package/dist/component/{checkbox-group-rac-BV9-hfo0.js → checkbox-group-rac-CgW0DnhX.js} +1 -1
  14. package/dist/component/{checkbox-rac-BbKD6UEX.js → checkbox-rac-DOAYMMsi.js} +1 -1
  15. package/dist/component/{contacts-address-rac-pDLwXVYR.js → contacts-address-rac-DXJa4J_k.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-BJx3BjlB.js → contacts-birthdate-rac-CVsuRq3B.js} +1 -1
  17. package/dist/component/{contacts-company-rac-DyKNlrhE.js → contacts-company-rac-b2bwHSNC.js} +1 -1
  18. package/dist/component/{contacts-email-rac-DmYj37_A.js → contacts-email-rac-DMPcpQ1c.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-DeyEyMG0.js → contacts-first-name-rac-CL2BsHuJ.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-SwBI_L_7.js → contacts-last-name-rac-hdBsWaqb.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-BRDIz_ya.js → contacts-phone-rac-DQF6aV9B.js} +1 -1
  22. package/dist/component/{contacts-position-rac-DDfta8r4.js → contacts-position-rac-CVX-WCfx.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-Bx6b16b3.js → contacts-subscribe-rac-Dl1ot9qw.js} +2 -2
  24. package/dist/component/{contacts-tax-id-rac-DICtcCkJ.js → contacts-tax-id-rac-0KTXvF81.js} +1 -1
  25. package/dist/component/{date-availability-DM6KcDU2.js → date-availability-DBljhBgO.js} +1 -1
  26. package/dist/component/{date-input-field-rac-F_DfMOXT.js → date-input-field-rac-CfflD2Ar.js} +5 -5
  27. package/dist/component/{date-input-rac-Ho7shG41.js → date-input-rac-fQclCKoa.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-BEXQ7hyT.js → date-picker-field-rac-BSmFOaH-.js} +6 -6
  29. package/dist/component/{date-picker-rac-C32DD1bT.js → date-picker-rac-D7I3ramu.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-BVbgkFtL.js → date-time-input-field-rac-vjZDQ_Fp.js} +5 -5
  31. package/dist/component/{date-time-input-rac-DB4xpq5h.js → date-time-input-rac-CDbS0VZR.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-C2s4IBgt.js → dext-checkbox-group-rac-BBiPt6_a.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-NyBGiLzP.js → dext-checkbox-rac-Cqp--0SO.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-JKcEE1fQ.js → dext-date-picker-rac-5Wft0w9m.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-DtamPz-x.js → dext-date-time-input-rac-Bbs7bgtn.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-194Qq0or.js → dext-dropdown-rac-CSvhtqbc.js} +1 -1
  37. package/dist/component/{dext-email-rac-Chwg6ePI.js → dext-email-rac-BoLeXqyI.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-DORye-Si.js → dext-number-input-rac-DzaJYTSz.js} +1 -1
  39. package/dist/component/{dext-phone-rac-jykmsttk.js → dext-phone-rac-BagPg_CT.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-MvkExS4d.js → dext-radio-group-rac-B5HSQt7a.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-DUsqZg7A.js → dext-rating-input-rac-DrtaAf-E.js} +1 -1
  42. package/dist/component/{dext-tags-rac-DnMlv2wO.js → dext-tags-rac-Cg4jJ4jr.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-DGMWNaah.js → dext-text-area-rac-C_t-W7lk.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-Cv0NkJrp.js → dext-text-input-rac-ChvV21Jf.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-DpMC8935.js → dext-url-input-rac-DclbSYTr.js} +1 -1
  46. package/dist/component/donation-rac-FYQIMm5m.js +308 -0
  47. package/dist/component/{dropdown-field-headless-C_-tm9VD.js → dropdown-field-headless-CTZ-zGqZ.js} +3 -3
  48. package/dist/component/{dropdown-field-rac-DRKVFHE1.js → dropdown-field-rac-C1KVtxwv.js} +5 -5
  49. package/dist/component/{dropdown-rac-BLqlMGTK.js → dropdown-rac-CkkDEDje.js} +1 -1
  50. package/dist/component/{ecom-address-rac-BdlTO9SW.js → ecom-address-rac-BOuugSxX.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-CcF5V54K.js → ecom-subscription-checkbox-rac-IZeMlljb.js} +3 -3
  52. package/dist/component/{email-input-field-rac-C-lfW9Ua.js → email-input-field-rac-CNzmm1j7.js} +27 -27
  53. package/dist/component/{events-repeater-rac-sHbYZ-WY.js → events-repeater-rac-CMV0Lmwz.js} +4 -4
  54. package/dist/component/{events-rsvp-rac-Bx_xn-K0.js → events-rsvp-rac-BmjboAco.js} +3 -3
  55. package/dist/component/{field-error-headless-DWbRjy6q.js → field-error-headless-DQZ5XAdn.js} +1 -1
  56. package/dist/component/{field-label-headless-DUWK0CI-.js → field-label-headless-DoxfHHaj.js} +1 -1
  57. package/dist/component/field-rac.module-Cac83bU5.js +21 -0
  58. package/dist/component/{file-upload-rac-D9NdbrRq.js → file-upload-rac-YEQ7uXhm.js} +47 -47
  59. package/dist/component/{fixed-payment-rac-i_hkRpLX.js → fixed-payment-rac-DDufIQBT.js} +5 -5
  60. package/dist/component/{form-Pr0rklwH.js → form-C6WwBcGP.js} +69 -69
  61. package/dist/component/{form-element-classes-BSMjWijd.js → form-element-classes-DDKCTFQj.js} +24 -22
  62. package/dist/component/form-element-keys-D0sEdpFo.js +8 -0
  63. package/dist/component/form.css +1 -1
  64. package/dist/component/form.js +1 -1
  65. package/dist/component/{header-field-rac-C22TlZYz.js → header-field-rac-DGfjrjQC.js} +3 -3
  66. package/dist/component/{header-rac-CRBMp0xN.js → header-rac-C_JE2cTg.js} +1 -1
  67. package/dist/component/image-choice-rac-LDLPQwrN.js +147 -0
  68. package/dist/component/{index-FZEaJpsD.js → index-C2srcuHD.js} +4 -4
  69. package/dist/component/{index-BJ-kFqI7.js → index-CIOoaQ8Z.js} +2 -2
  70. package/dist/component/{isObjectLike-DnLDLZFA.js → isObjectLike-E5QfEa1u.js} +1 -1
  71. package/dist/component/{multiline-address-field-rac-c1vN8M4W.js → multiline-address-field-rac-Biyj2tIN.js} +6 -6
  72. package/dist/component/{multiline-address-rac-BVd_JUMw.js → multiline-address-rac-BCqCvG7a.js} +1 -1
  73. package/dist/component/{number-input-field-rac-DXfWTZkC.js → number-input-field-rac-CwUoIbM8.js} +5 -5
  74. package/dist/component/{number-input-rac-uUl9e8AI.js → number-input-rac-CdYdTDem.js} +1 -1
  75. package/dist/component/{password-rac-BDJ6HPYo.js → password-rac-D62npVHY.js} +10 -10
  76. package/dist/component/{payment-input-rac-XRcefuRt.js → payment-input-rac-D4u-3vcW.js} +7 -7
  77. package/dist/component/{phone-input-field-rac-DHgA6BeE.js → phone-input-field-rac-uHxR3ozd.js} +15 -15
  78. package/dist/component/{phone-rac-CMtVXoft.js → phone-rac-Bf99_BGi.js} +1 -1
  79. package/dist/component/{product-list-rac-CBLHOwHX.js → product-list-rac-iRf6Ra7i.js} +5 -5
  80. package/dist/component/{quiz-radio-group-rac-CAmXql2m.js → quiz-radio-group-rac-CPGS0LEb.js} +2 -2
  81. package/dist/component/{radio-group-field-rac-DBjgd4cD.js → radio-group-field-rac-BWpTNAbO.js} +3 -3
  82. package/dist/component/{radio-group-field-rac.module-CqOyiO2g.js → radio-group-field-rac.module-WxU5zxvM.js} +3 -3
  83. package/dist/component/{radio-group-rac-CrEtErkv.js → radio-group-rac-dA4WZ1Vj.js} +1 -1
  84. package/dist/component/rating-input-field-rac-CJnFsBvH.js +127 -0
  85. package/dist/component/{rating-input-rac-CtidC0z2.js → rating-input-rac-DXVYozFV.js} +1 -1
  86. package/dist/component/{rich-content-rac.module-DX2Jd5w6.js → rich-content-rac.module-DkKwzJS7.js} +1 -1
  87. package/dist/component/{rich-text-field-rac-CusODU1H.js → rich-text-field-rac-8FWCRrpb.js} +3 -3
  88. package/dist/component/{rich-text-rac-wq_vA-qU.js → rich-text-rac-OeM_mPRy.js} +1 -1
  89. package/dist/component/{service-dropdown-rac--YcOnGmq.js → service-dropdown-rac-mvUMpcS_.js} +15 -15
  90. package/dist/component/{services-multi-choice-rac-D_kSdluR.js → services-multi-choice-rac-DrgUrn_N.js} +10 -10
  91. package/dist/component/{signature-rac-DBAg8bEo.js → signature-rac-D44U9Uyp.js} +53 -53
  92. package/dist/component/{submit-button-rac-BW3P99jM.js → submit-button-rac-BqtcgVAn.js} +2 -2
  93. package/dist/component/tags-field-rac-CemsTKWz.js +207 -0
  94. package/dist/component/{tags-rac-Bqo0dqEU.js → tags-rac-fVjCf6qo.js} +1 -1
  95. package/dist/component/{text-area-field-rac-DaWfCdVq.js → text-area-field-rac-BPciZlZb.js} +7 -7
  96. package/dist/component/{text-area-rac-BVnA5cPV.js → text-area-rac-CRTORdZM.js} +1 -1
  97. package/dist/component/{text-input-field-rac-Dm6a4jOn.js → text-input-field-rac-CvFoWlRN.js} +3 -3
  98. package/dist/component/{text-input-headless-fTooOIqx.js → text-input-headless-BQ3TWU9G.js} +3 -3
  99. package/dist/component/{text-input-rac-DA0we6AY.js → text-input-rac-DSFkEmob.js} +1 -1
  100. package/dist/component/{time-input-rac-DQ9raFL_.js → time-input-rac-CGgs7ncp.js} +9 -9
  101. package/dist/component/{url-input-field-rac-BEpbWAVe.js → url-input-field-rac-CqvgTc-F.js} +13 -13
  102. package/dist/component/{url-input-rac-Du6EqRQX.js → url-input-rac-C45KOwnr.js} +1 -1
  103. package/dist/component/{use-service-options-base-OMXZXAVb.js → use-service-options-base-D4Zl-iGW.js} +1 -1
  104. package/package.json +2 -2
  105. package/dist/component/donation-rac-DeBx8D9a.js +0 -302
  106. package/dist/component/field-rac.module-DnUIb9Oh.js +0 -21
  107. package/dist/component/image-choice-rac-cjylrvfO.js +0 -141
  108. package/dist/component/rating-input-field-rac-BWn0usVp.js +0 -130
  109. package/dist/component/tags-field-rac-DSdwley7.js +0 -201
@@ -2,27 +2,27 @@ import { RicosViewer as O } from "@wix/ricos/viewer";
2
2
  import l from "classnames";
3
3
  import r, { useCallback as h, useRef as y } from "react";
4
4
  import { TextField as N, Input as A } from "react-aria-components";
5
- import { ai as E, af as d, ak as P } from "./form-Pr0rklwH.js";
5
+ import { ai as E, af as d, ak as k } from "./form-C6WwBcGP.js";
6
6
  import { f as u } from "./find-child-C60k4CxG.js";
7
- import { D as k, E as B } from "./field-error-headless-DWbRjy6q.js";
8
- import { L as M } from "./field-label-headless-DUWK0CI-.js";
7
+ import { D as B, E as M } from "./field-error-headless-DQZ5XAdn.js";
8
+ import { L as P } from "./field-label-headless-DoxfHHaj.js";
9
9
  import { u as T } from "./use-invoke-callback-UH73A_J3.js";
10
10
  import { E as q } from "./error-icon-hZxQ6DEy.js";
11
- import { s } from "./field-rac.module-DnUIb9Oh.js";
12
- import { z as v, P as U, y as g, q as x, j as w } from "./form-element-classes-BSMjWijd.js";
11
+ import { s } from "./field-rac.module-Cac83bU5.js";
12
+ import { z as v, R as U, y as g, q as x, j as w } from "./form-element-classes-DDKCTFQj.js";
13
13
  const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
14
- const { id: o, value: n, onChange: a, disabled: m, readOnly: i, required: c, hasError: I, onBlur: f, onFocus: F, FieldLayout: L } = E(), { labelId: R } = d(), p = T(f), b = u(t, e.Label), D = u(t, e.Input), _ = u(t, e.Description), C = u(t, e.Error), S = h(() => {
14
+ const { id: o, value: n, onChange: a, disabled: m, readOnly: i, required: c, hasError: I, onBlur: f, onFocus: R, FieldLayout: F } = E(), { labelId: L } = d(), p = T(f), b = u(t, e.Label), D = u(t, e.Input), _ = u(t, e.Description), C = u(t, e.Error), S = h(() => {
15
15
  a(V(n)), p();
16
16
  }, [
17
17
  p,
18
18
  a,
19
19
  n
20
20
  ]);
21
- return /* @__PURE__ */ r.createElement(L, {
21
+ return /* @__PURE__ */ r.createElement(F, {
22
22
  fieldId: o,
23
23
  renderLabel: () => b,
24
24
  renderInput: () => /* @__PURE__ */ r.createElement(N, {
25
- "aria-labelledby": R,
25
+ "aria-labelledby": L,
26
26
  value: n ?? "",
27
27
  onChange: a,
28
28
  isDisabled: m,
@@ -30,13 +30,13 @@ const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
30
30
  isRequired: c,
31
31
  isInvalid: I,
32
32
  onBlur: S,
33
- onFocus: F
33
+ onFocus: R
34
34
  }, D),
35
35
  renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, C, _)
36
36
  });
37
37
  }, W = ({ className: t }) => {
38
38
  const { id: o, placeholder: n } = E(), { inputId: a, ariaDescribedBy: m } = d(), i = y(null);
39
- return P(() => {
39
+ return k(() => {
40
40
  var c;
41
41
  (c = i.current) == null || c.focus();
42
42
  }, o), /* @__PURE__ */ r.createElement(A, {
@@ -48,10 +48,10 @@ const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
48
48
  placeholder: n
49
49
  });
50
50
  };
51
- e.Label = M;
51
+ e.Label = P;
52
52
  e.Input = W;
53
- e.Description = k;
54
- e.Error = B;
53
+ e.Description = B;
54
+ e.Error = M;
55
55
  const $ = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(O, {
56
56
  content: t,
57
57
  locale: o
@@ -1,5 +1,5 @@
1
1
  import r from "react";
2
- import { U as t } from "./url-input-field-rac-BEpbWAVe.js";
2
+ import { U as t } from "./url-input-field-rac-CqvgTc-F.js";
3
3
  const n = () => /* @__PURE__ */ r.createElement(t, null);
4
4
  export {
5
5
  n as UrlInputRAC
@@ -1,5 +1,5 @@
1
1
  import { useState as o, useCallback as D, useEffect as m, useMemo as b } from "react";
2
- import { ah as v } from "./form-Pr0rklwH.js";
2
+ import { ah as v } from "./form-C6WwBcGP.js";
3
3
  const k = (h) => {
4
4
  const { fieldType: I, isEditor: t = !1, postProcessOptions: i, customFetchLogic: a, onInitialDataLoaded: n } = h, [L, O] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(I), r = D((e) => {
5
5
  let d = e.map((l) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/form-elements",
3
- "version": "1.71.0",
3
+ "version": "1.73.0",
4
4
  "description": "The Wix Forms rendering element for Builder apps, loaded at runtime as @wix/form-elements/Form",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -151,5 +151,5 @@
151
151
  ]
152
152
  }
153
153
  },
154
- "falconPackageHash": "390cb193055faf5182b17b3c69fac3489195c3606ce57d6b3dcfcd0d"
154
+ "falconPackageHash": "72ce2a6794445487f380a02a409cc5f78240e1520ce622b0ca881c2b"
155
155
  }
@@ -1,302 +0,0 @@
1
- import t, { useMemo as B, useCallback as L, useRef as oe } from "react";
2
- import { RicosViewer as re } from "@wix/ricos/viewer";
3
- import y from "classnames";
4
- import { RadioGroup as ae, RadioField as Y, RadioButton as z, TextField as se, Group as le, Input as ie } from "react-aria-components";
5
- import { debounce as ce } from "ts-debounce";
6
- import { P as H, ai as A, af as j, as as ue, ab as v, ak as me } from "./form-Pr0rklwH.js";
7
- import { f, a as b } from "./find-child-C60k4CxG.js";
8
- import { a as Q } from "./format-currency-BwShJ9vM.js";
9
- import { D as pe, E as de } from "./field-error-headless-DWbRjy6q.js";
10
- import { L as Ie } from "./field-label-headless-DUWK0CI-.js";
11
- import { N as Ee } from "./options-layout-constants-DEfIEJWD.js";
12
- import { a as Ce, b as fe } from "./numeric-input-utils-CuBMi4-a.js";
13
- import { g as Oe } from "./payment-field-utils-DobiK5Xh.js";
14
- import { u as he } from "./use-synced-display-value-DcAxdn3M.js";
15
- import { E as _e } from "./error-icon-hZxQ6DEy.js";
16
- import { s as D } from "./field-rac.module-DnUIb9Oh.js";
17
- import { z as ye, P as be, k as Fe, l as Ne, m as De, y as ge, q as Le, j as Re } from "./form-element-classes-BSMjWijd.js";
18
- import { o as Se } from "./options-rac.module-KM-VT_KY.js";
19
- function Ae(e, n) {
20
- return e.reduce((o, r) => (o[r[n]] = r, o), {});
21
- }
22
- function ve(e) {
23
- return Ae(e, "id");
24
- }
25
- const Pe = 0.01;
26
- function Te(e) {
27
- var n;
28
- return ((n = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : n.price) || "0";
29
- }
30
- function W(e, n) {
31
- const o = Number(n || "0");
32
- return {
33
- productId: e.id,
34
- price: e.priceType === H.DYNAMIC_PRICE ? o : String(o),
35
- quantity: 1
36
- };
37
- }
38
- function Me(e) {
39
- return e.find((n) => n.priceType === H.DYNAMIC_PRICE);
40
- }
41
- function xe(e, n) {
42
- return (e == null ? void 0 : e.productId) === (n == null ? void 0 : n.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
43
- }
44
- function Be(e, n, o) {
45
- const r = (n == null ? void 0 : n.productId) === e ? void 0 : e, s = r ? o[r] : void 0;
46
- return s ? [
47
- W(s, Te(s))
48
- ] : [];
49
- }
50
- const a = ({ children: e }) => {
51
- const { id: n, value: o, onChange: r, disabled: s, required: m, onBlur: p, onFocus: h, validation: c, addOther: u, addOtherPlaceholder: i, FieldLayout: I, hasError: O } = A(), { labelId: _ } = j(), { t: E } = ue(), { currency: P, regionalFormat: F } = v(), d = o == null ? void 0 : o[0], N = B(() => {
52
- var C, x;
53
- return ((x = (C = c == null ? void 0 : c.predefined) == null ? void 0 : C.paymentOptions) == null ? void 0 : x.products) || [];
54
- }, [
55
- c
56
- ]), T = B(() => ve(N), [
57
- N
58
- ]), l = B(() => u ? Me(N) : void 0, [
59
- N,
60
- u
61
- ]), J = xe(d, l), [q, M] = he({
62
- sourceValue: J,
63
- format: (C) => fe(String(C ?? ""), F),
64
- regionalFormat: F
65
- }), k = L((C) => {
66
- r(Be(C, d, T)), M("");
67
- }, [
68
- r,
69
- T,
70
- d,
71
- M
72
- ]), $ = L((C) => {
73
- l && r(typeof C == "number" ? [
74
- W(l, String(C))
75
- ] : []);
76
- }, [
77
- r,
78
- l
79
- ]), V = B(() => ce($, 500), [
80
- $
81
- ]), K = L((C) => {
82
- (d == null ? void 0 : d.productId) !== (l == null ? void 0 : l.id) && r(void 0);
83
- const { validInput: x, validNumber: te } = Ce(C.target.value, Pe, q, F);
84
- M(x), V(te);
85
- }, [
86
- F,
87
- r,
88
- d,
89
- l,
90
- q,
91
- V,
92
- M
93
- ]), w = (d == null ? void 0 : d.productId) || null, X = L(() => {
94
- l != null && l.id && w !== l.id && k(l.id);
95
- }, [
96
- l == null ? void 0 : l.id,
97
- w,
98
- k
99
- ]), Z = f(e, a.Label), G = f(e, a.Control), ee = f(e, a.Description), ne = f(e, a.Error);
100
- return /* @__PURE__ */ t.createElement(I, {
101
- fieldId: n,
102
- renderLabel: () => Z,
103
- renderInput: () => /* @__PURE__ */ t.createElement(ae, {
104
- "aria-labelledby": _,
105
- value: w,
106
- onChange: k,
107
- isDisabled: s,
108
- isInvalid: O,
109
- isRequired: m,
110
- onBlur: p,
111
- onFocus: h
112
- }, G ? b(G, {
113
- productsById: T,
114
- addOther: u,
115
- customAmount: q,
116
- onCustomAmountInputChange: K,
117
- currency: P,
118
- t: E,
119
- placeholder: i === void 0 ? E("donation.other-option.placeholder") : i,
120
- customAmountProductId: l == null ? void 0 : l.id,
121
- onFocusCustomInput: X
122
- }) : null),
123
- renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, ne, ee)
124
- });
125
- }, je = ({ children: e, className: n, ...o }) => {
126
- const { productsById: r, addOther: s, customAmount: m, onCustomAmountInputChange: p, currency: h, t: c, placeholder: u, customAmountProductId: i, onFocusCustomInput: I } = o, { hasError: O } = A(), _ = f(e, a.Options), E = f(e, a.OtherInput);
127
- return /* @__PURE__ */ t.createElement("div", {
128
- className: n,
129
- "data-invalid": O
130
- }, _ ? b(_, {
131
- productsById: r
132
- }) : null, s && i && /* @__PURE__ */ t.createElement(Y, {
133
- value: i,
134
- style: {
135
- position: "absolute",
136
- width: "1px",
137
- height: "1px",
138
- padding: "0",
139
- margin: "-1px",
140
- overflow: "hidden",
141
- clip: "rect(0, 0, 0, 0)",
142
- whiteSpace: "nowrap",
143
- border: "0"
144
- }
145
- }, /* @__PURE__ */ t.createElement(z, {
146
- "aria-label": c("donation.other-option.label", "Custom amount")
147
- }, c("donation.other-option.label", "Custom amount"))), E && s ? b(E, {
148
- customAmount: m,
149
- onCustomAmountInputChange: p,
150
- currency: h,
151
- t: c,
152
- placeholder: u,
153
- customAmountProductId: i,
154
- onFocusCustomInput: I
155
- }) : null);
156
- }, U = ({ children: e, className: n, ...o }) => {
157
- const { productsById: r } = o, { options: s, numberOfColumns: m } = A(), { isMobile: p } = v(), h = f(e, U.Option), c = p ? Ee.ONE : m;
158
- return /* @__PURE__ */ t.createElement("div", {
159
- className: n,
160
- "data-columns": c
161
- }, s.map((u) => {
162
- var O;
163
- const i = r[u.value], I = (O = i == null ? void 0 : i.fixedPriceOptions) == null ? void 0 : O.price;
164
- return b(h, {
165
- key: u.value,
166
- value: u.value,
167
- price: I || "0"
168
- });
169
- }));
170
- }, R = ({ children: e, className: n, ...o }) => {
171
- const { value: r, price: s } = o, { id: m } = A(), { currency: p, regionalFormat: h } = v(), c = f(e, R.Value), u = f(e, R.Currency), { isCurrencyPrefixed: i } = Q({
172
- amount: s,
173
- currency: p == null ? void 0 : p.code,
174
- locale: h
175
- }), I = oe(null);
176
- me(() => {
177
- var _, E;
178
- (E = (_ = I.current) == null ? void 0 : _.querySelector("input")) == null || E.focus();
179
- }, m);
180
- const O = c ? b(c, {
181
- price: s
182
- }) : null;
183
- return /* @__PURE__ */ t.createElement(Y, {
184
- value: r
185
- }, /* @__PURE__ */ t.createElement(z, {
186
- className: n,
187
- ref: I
188
- }, /* @__PURE__ */ t.createElement(t.Fragment, null, i && u, O, !i && u)));
189
- }, qe = ({ className: e, ...n }) => {
190
- const { price: o } = n, { currency: r, regionalFormat: s } = v(), { value: m } = Q({
191
- amount: o,
192
- currency: r == null ? void 0 : r.code,
193
- locale: s
194
- });
195
- return /* @__PURE__ */ t.createElement("span", {
196
- className: e
197
- }, m);
198
- }, ke = ({ className: e }) => {
199
- const { currency: n } = v();
200
- return /* @__PURE__ */ t.createElement("span", {
201
- className: e
202
- }, (n == null ? void 0 : n.sign) || (n == null ? void 0 : n.code) || "");
203
- };
204
- R.Value = qe;
205
- R.Currency = ke;
206
- const S = ({ children: e, className: n, ...o }) => {
207
- const { customAmount: r, onCustomAmountInputChange: s, currency: m, t: p, placeholder: h, customAmountProductId: c, onFocusCustomInput: u } = o, { disabled: i, hasError: I } = A(), { labelId: O, prefixId: _ } = j(), E = f(e, S.Currency), P = f(e, S.Value), F = L((N) => {
208
- s({
209
- target: {
210
- value: N
211
- }
212
- });
213
- }, [
214
- s
215
- ]), d = L(() => {
216
- u();
217
- }, [
218
- u
219
- ]);
220
- return /* @__PURE__ */ t.createElement(se, {
221
- "aria-labelledby": `${O} ${_}`,
222
- value: r,
223
- onChange: F,
224
- onFocus: d,
225
- isDisabled: i,
226
- isInvalid: I
227
- }, /* @__PURE__ */ t.createElement(le, {
228
- className: n,
229
- isDisabled: i,
230
- isInvalid: I
231
- }, r && m && E ? b(E, {
232
- currency: m,
233
- t: p
234
- }) : null, P ? b(P, {
235
- placeholder: h,
236
- customAmountProductId: c
237
- }) : null));
238
- }, we = ({ className: e, ...n }) => {
239
- const { currency: o, t: r } = n, { prefixId: s } = j();
240
- return /* @__PURE__ */ t.createElement("span", {
241
- id: s,
242
- "aria-hidden": !1,
243
- "aria-label": Oe(r, o),
244
- className: e
245
- }, (o == null ? void 0 : o.sign) || (o == null ? void 0 : o.code) || "");
246
- }, Ue = ({ className: e, ...n }) => {
247
- const { placeholder: o, customAmountProductId: r } = n, { ariaDescribedBy: s, labelId: m, prefixId: p } = j();
248
- return /* @__PURE__ */ t.createElement(ie, {
249
- id: r,
250
- "aria-labelledby": `${m} ${p}`,
251
- "aria-describedby": s,
252
- placeholder: o,
253
- inputMode: "decimal",
254
- autoComplete: "off",
255
- className: e
256
- });
257
- };
258
- S.Currency = we;
259
- S.Value = Ue;
260
- U.Option = R;
261
- a.Label = Ie;
262
- a.Control = je;
263
- a.Options = U;
264
- a.OtherInput = S;
265
- a.Description = pe;
266
- a.Error = de;
267
- const $e = "_control_141js_1", Ve = "_options_141js_7", Ge = "_option_141js_7", Ye = "_optionCurrency_141js_89", ze = "_otherInput_141js_93", He = "_otherInputCurrency_141js_112", g = {
268
- control: $e,
269
- options: Ve,
270
- option: Ge,
271
- optionCurrency: Ye,
272
- otherInput: ze,
273
- otherInputCurrency: He
274
- }, Qe = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(re, {
275
- content: e,
276
- locale: n
277
- }), We = () => /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
278
- className: y(ye, D.label)
279
- }, /* @__PURE__ */ t.createElement(a.Label.Required, {
280
- className: y(be, D.requiredMark)
281
- })), /* @__PURE__ */ t.createElement(a.Control, {
282
- className: g.control
283
- }, /* @__PURE__ */ t.createElement(a.Options, {
284
- className: y(Fe, Se.options, g.options)
285
- }, /* @__PURE__ */ t.createElement(a.Options.Option, {
286
- className: ({ isSelected: e }) => y(Ne, e && De, g.option)
287
- }, /* @__PURE__ */ t.createElement(a.Options.Option.Value, null), /* @__PURE__ */ t.createElement(a.Options.Option.Currency, {
288
- className: g.optionCurrency
289
- }))), /* @__PURE__ */ t.createElement(a.OtherInput, {
290
- className: y(ge, D.input, g.otherInput)
291
- }, /* @__PURE__ */ t.createElement(a.OtherInput.Currency, {
292
- className: g.otherInputCurrency
293
- }), /* @__PURE__ */ t.createElement(a.OtherInput.Value, {
294
- className: D.innerInput
295
- }))), /* @__PURE__ */ t.createElement(a.Error, {
296
- className: y(Le, D.error)
297
- }, /* @__PURE__ */ t.createElement(_e, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)), /* @__PURE__ */ t.createElement(a.Description, {
298
- className: y(Re, D.description)
299
- }, Qe)), En = () => /* @__PURE__ */ t.createElement(We, null);
300
- export {
301
- En as DonationRAC
302
- };
@@ -1,21 +0,0 @@
1
- const o = "_label_1nskk_1", n = "_requiredMark_1nskk_11", t = "_input_1nskk_16", e = "_inputGroup_1nskk_17", s = "_innerInput_1nskk_129", r = "_dropdownTrigger_1nskk_177", _ = "_dropdownIcon_1nskk_187", c = "_dropdownPopover_1nskk_206", p = "_selectPopover_1nskk_210", k = "_selectOption_1nskk_237", i = "_selectOptionWithoutFocusRing_1nskk_261", u = "_description_1nskk_267", d = "_error_1nskk_283", l = "_checkbox_1nskk_302", a = "_checkboxInput_1nskk_325", h = "_uploadButton_1nskk_420", b = {
2
- label: o,
3
- requiredMark: n,
4
- input: t,
5
- inputGroup: e,
6
- innerInput: s,
7
- dropdownTrigger: r,
8
- dropdownIcon: _,
9
- dropdownPopover: c,
10
- selectPopover: p,
11
- selectOption: k,
12
- selectOptionWithoutFocusRing: i,
13
- description: u,
14
- error: d,
15
- checkbox: l,
16
- checkboxInput: a,
17
- uploadButton: h
18
- };
19
- export {
20
- b as s
21
- };
@@ -1,141 +0,0 @@
1
- import e, { useMemo as M, useCallback as v, useRef as T } from "react";
2
- import { RicosViewer as k } from "@wix/ricos/viewer";
3
- import E from "classnames";
4
- import { CheckboxGroup as x, CheckboxField as z, CheckboxButton as B } from "react-aria-components";
5
- import { ai as L, af as q, ab as H, ak as P } from "./form-Pr0rklwH.js";
6
- import { f as p, a as C } from "./find-child-C60k4CxG.js";
7
- import { L as G, g as w } from "./field-label-headless-DUWK0CI-.js";
8
- import { D as U, E as V } from "./field-error-headless-DWbRjy6q.js";
9
- import { F as j } from "./fieldset-headless-CD3fds9J.js";
10
- import { E as Q } from "./error-icon-hZxQ6DEy.js";
11
- import { s as O } from "./field-rac.module-DnUIb9Oh.js";
12
- import { z as $, P as J, u as K, v as W, w as X, q as Y, j as Z } from "./form-element-classes-BSMjWijd.js";
13
- const a = ({ children: t }) => {
14
- const { id: s, value: o, onChange: n, disabled: l, readOnly: i, required: r, onBlur: c, onFocus: m, hasError: u, FieldLayout: f } = L(), { inputId: g, labelId: b, ariaDescribedBy: _ } = q(), R = p(t, a.Label), D = p(t, a.Options), N = p(t, a.Description), S = p(t, a.Error), h = M(() => o || [], [
15
- o
16
- ]), A = v((y) => {
17
- n == null || n(y);
18
- }, [
19
- n
20
- ]);
21
- return /* @__PURE__ */ e.createElement(f, {
22
- fieldId: s,
23
- renderLabel: () => R,
24
- renderInput: () => /* @__PURE__ */ e.createElement(j, {
25
- id: g,
26
- ariaLabelledBy: b,
27
- ariaDescribedBy: _,
28
- required: r,
29
- onBlur: c,
30
- onFocus: m
31
- }, /* @__PURE__ */ e.createElement(x, {
32
- "aria-labelledby": b,
33
- value: h,
34
- onChange: A,
35
- isDisabled: l,
36
- isReadOnly: i,
37
- isRequired: r,
38
- isInvalid: u
39
- }, D)),
40
- renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, S, N)
41
- });
42
- }, F = ({ children: t, className: s }) => {
43
- const { isMobile: o } = H(), { id: n, options: l, numberOfColumns: i } = L(), r = p(t, F.Option);
44
- return /* @__PURE__ */ e.createElement("div", {
45
- className: s,
46
- "data-columns": o ? 1 : i
47
- }, l == null ? void 0 : l.map((c, m) => C(r, {
48
- key: c.id || c.label,
49
- option: c,
50
- isFirst: m === 0,
51
- fieldId: n
52
- })));
53
- }, ee = ({ className: t }) => /* @__PURE__ */ e.createElement("div", {
54
- "aria-hidden": "true",
55
- className: t
56
- }), te = ({ className: t, ...s }) => {
57
- var m, u;
58
- const { option: o } = s, { choiceImageResize: n, choiceImageAlignment: l } = L(), i = (m = o.media) == null ? void 0 : m.image;
59
- if (!i)
60
- return null;
61
- const r = w(i, i.width, i.height);
62
- if (!r)
63
- return null;
64
- const c = ((u = o.media) == null ? void 0 : u.altText) || o.altText || i.altText || "";
65
- return /* @__PURE__ */ e.createElement("img", {
66
- className: t,
67
- src: r,
68
- alt: c,
69
- "data-fit": n,
70
- "data-alignment": l,
71
- "data-hook": "image-choice-option-image"
72
- });
73
- }, ae = ({ className: t, ...s }) => {
74
- const { option: o } = s;
75
- return !o.label || o.isLabelHidden ? null : /* @__PURE__ */ e.createElement("span", {
76
- className: t
77
- }, o.label);
78
- }, d = ({ children: t, className: s, ...o }) => {
79
- const { option: n, isFirst: l = !1, fieldId: i } = o, { disabled: r, readOnly: c, hasError: m } = L(), u = T(null);
80
- P(() => {
81
- var _;
82
- l && ((_ = u.current) == null || _.focus({
83
- preventScroll: !0
84
- }));
85
- }, i);
86
- const f = p(t, d.Input), g = p(t, d.Image), b = p(t, d.Label);
87
- return /* @__PURE__ */ e.createElement(z, {
88
- value: n.label,
89
- isDisabled: r,
90
- isReadOnly: c,
91
- isInvalid: m
92
- }, /* @__PURE__ */ e.createElement(B, {
93
- ref: u,
94
- "aria-label": n.isLabelHidden ? n.label : void 0,
95
- className: s,
96
- "data-hook": `image-choice-${n.label}`
97
- }, f, C(g, {
98
- option: n
99
- }), C(b, {
100
- option: n
101
- })));
102
- };
103
- d.Input = ee;
104
- d.Image = te;
105
- d.Label = ae;
106
- a.Label = G;
107
- a.Options = F;
108
- F.Option = d;
109
- a.Description = U;
110
- a.Error = V;
111
- const ne = "_options_19z29_1", oe = "_optionInput_19z29_25", se = "_option_19z29_1", ie = "_optionLabel_19z29_95", le = "_optionImage_19z29_126", I = {
112
- options: ne,
113
- optionInput: oe,
114
- option: se,
115
- optionLabel: ie,
116
- optionImage: le
117
- }, re = ({ content: t, locale: s }) => /* @__PURE__ */ e.createElement(k, {
118
- content: t,
119
- locale: s
120
- }), ce = () => /* @__PURE__ */ e.createElement(a, null, /* @__PURE__ */ e.createElement(a.Label, {
121
- className: E($, O.label)
122
- }, /* @__PURE__ */ e.createElement(a.Label.Required, {
123
- className: E(J, O.requiredMark)
124
- })), /* @__PURE__ */ e.createElement(a.Options, {
125
- className: E(K, I.options)
126
- }, /* @__PURE__ */ e.createElement(a.Options.Option, {
127
- className: ({ isSelected: t }) => E(W, t && X, I.option)
128
- }, /* @__PURE__ */ e.createElement(a.Options.Option.Input, {
129
- className: I.optionInput
130
- }), /* @__PURE__ */ e.createElement(a.Options.Option.Image, {
131
- className: I.optionImage
132
- }), /* @__PURE__ */ e.createElement(a.Options.Option.Label, {
133
- className: I.optionLabel
134
- }))), /* @__PURE__ */ e.createElement(a.Error, {
135
- className: E(Y, O.error)
136
- }, /* @__PURE__ */ e.createElement(Q, null), /* @__PURE__ */ e.createElement(a.Error.Text, null)), /* @__PURE__ */ e.createElement(a.Description, {
137
- className: E(Z, O.description)
138
- }, re)), Ce = () => /* @__PURE__ */ e.createElement(ce, null);
139
- export {
140
- Ce as ImageChoiceRAC
141
- };