@wix/form-elements 1.74.0 → 1.75.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/component/{appointment-rac-Bze1s2XD.js → appointment-rac-7xVKSm2N.js} +27 -27
  2. package/dist/component/{bookings-address-rac-BcrkXf63.js → bookings-address-rac-VXnUSx8U.js} +1 -1
  3. package/dist/component/{bookings-email-rac-DYq5RxOP.js → bookings-email-rac-B2_ad7Y2.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-ZJ_sQ-01.js → bookings-first-name-rac-9BAY5vLx.js} +1 -1
  5. package/dist/component/{bookings-header-rac-Cv8kl01f.js → bookings-header-rac-B6IgiMOA.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-BmnulSZ6.js → bookings-last-name-rac-DoXEDO8K.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-Bdi4xs9y.js → bookings-login-bar-rac-DprQIFyj.js} +2 -2
  8. package/dist/component/{bookings-phone-rac-C8DjSzUY.js → bookings-phone-rac-VMoXtejZ.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-DYu011oy.js → bookings-rich-text-rac-DSzD2jBy.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-BH3yEE5j.js → checkbox-field-rac-BLihwz3C.js} +327 -320
  11. package/dist/component/checkbox-group-field-headless-BItyo_iD.js +205 -0
  12. package/dist/component/checkbox-group-field-rac-Bov3yFC6.js +40 -0
  13. package/dist/component/{checkbox-group-rac-CgW0DnhX.js → checkbox-group-rac-Fit-qssk.js} +1 -1
  14. package/dist/component/{checkbox-rac-DOAYMMsi.js → checkbox-rac-CSsY83Nx.js} +1 -1
  15. package/dist/component/{contacts-address-rac-DXJa4J_k.js → contacts-address-rac-iJuzUQe4.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-CVsuRq3B.js → contacts-birthdate-rac-0g2e8cQP.js} +1 -1
  17. package/dist/component/{contacts-company-rac-b2bwHSNC.js → contacts-company-rac-BC0tK4WQ.js} +1 -1
  18. package/dist/component/{contacts-email-rac-DMPcpQ1c.js → contacts-email-rac-dkuclkiH.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-CL2BsHuJ.js → contacts-first-name-rac-BSUkCuht.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-hdBsWaqb.js → contacts-last-name-rac-08bjVdN2.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-DQF6aV9B.js → contacts-phone-rac-DVb0Z_0M.js} +1 -1
  22. package/dist/component/{contacts-position-rac-CVX-WCfx.js → contacts-position-rac-AGUDkv7U.js} +1 -1
  23. package/dist/component/contacts-subscribe-rac-6jAQHibT.js +13 -0
  24. package/dist/component/{contacts-tax-id-rac-0KTXvF81.js → contacts-tax-id-rac-C7moEz5b.js} +1 -1
  25. package/dist/component/{date-availability-DBljhBgO.js → date-availability-DagbE0C8.js} +1 -1
  26. package/dist/component/{date-input-field-rac-CfflD2Ar.js → date-input-field-rac-BWHKsJGy.js} +30 -30
  27. package/dist/component/{date-input-rac-fQclCKoa.js → date-input-rac-BlZlmf-s.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-BSmFOaH-.js → date-picker-field-rac-BSNbYirD.js} +36 -36
  29. package/dist/component/{date-picker-rac-D7I3ramu.js → date-picker-rac-D3IWMst5.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-vjZDQ_Fp.js → date-time-input-field-rac-YKTwuIUs.js} +25 -25
  31. package/dist/component/{date-time-input-rac-CDbS0VZR.js → date-time-input-rac-CZRsKm1P.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-BBiPt6_a.js → dext-checkbox-group-rac-BE7ILz-f.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-Cqp--0SO.js → dext-checkbox-rac-B6-94A1N.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-5Wft0w9m.js → dext-date-picker-rac-Bx2hUFNm.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-Bbs7bgtn.js → dext-date-time-input-rac-DPKD6quz.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-CSvhtqbc.js → dext-dropdown-rac-WrSfNRa5.js} +1 -1
  37. package/dist/component/{dext-email-rac-BoLeXqyI.js → dext-email-rac-8PSMKNYG.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-DzaJYTSz.js → dext-number-input-rac-b9YSzEkN.js} +1 -1
  39. package/dist/component/{dext-phone-rac-BagPg_CT.js → dext-phone-rac-CkapN3c1.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-B5HSQt7a.js → dext-radio-group-rac-CfNMkwUa.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-DrtaAf-E.js → dext-rating-input-rac-Cun_t7HQ.js} +1 -1
  42. package/dist/component/{dext-tags-rac-Cg4jJ4jr.js → dext-tags-rac-DLZ91c3w.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-C_t-W7lk.js → dext-text-area-rac-N9A7QfYw.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-ChvV21Jf.js → dext-text-input-rac-XbVzAPHH.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-DclbSYTr.js → dext-url-input-rac-BiaWZ49r.js} +1 -1
  46. package/dist/component/{donation-rac-FYQIMm5m.js → donation-rac-BEIBjLHK.js} +46 -47
  47. package/dist/component/{dropdown-field-headless-CTZ-zGqZ.js → dropdown-field-headless-CQfZ3zPD.js} +3 -3
  48. package/dist/component/{dropdown-field-rac-C1KVtxwv.js → dropdown-field-rac-ubZN_Abg.js} +7 -7
  49. package/dist/component/{dropdown-rac-CkkDEDje.js → dropdown-rac-CHYFrEjY.js} +1 -1
  50. package/dist/component/{ecom-address-rac-BOuugSxX.js → ecom-address-rac-C7qJlrsv.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-IZeMlljb.js → ecom-subscription-checkbox-rac-CONIZsTy.js} +6 -6
  52. package/dist/component/{email-input-field-rac-CNzmm1j7.js → email-input-field-rac-Dg0p6WZe.js} +63 -63
  53. package/dist/component/events-repeater-rac-BoxNl7gn.js +254 -0
  54. package/dist/component/{events-rsvp-rac-BmjboAco.js → events-rsvp-rac-BU5d2n4k.js} +3 -3
  55. package/dist/component/{field-error-headless-DQZ5XAdn.js → field-error-headless-uQOcm2Ak.js} +1 -1
  56. package/dist/component/{field-label-headless-DoxfHHaj.js → field-label-headless-Bzh7f2Ji.js} +1 -1
  57. package/dist/component/field-rac.module-DjmaTYkc.js +23 -0
  58. package/dist/component/{file-upload-rac-YEQ7uXhm.js → file-upload-rac-BTt-rJE5.js} +74 -74
  59. package/dist/component/{fixed-payment-rac-DDufIQBT.js → fixed-payment-rac-1NOx3D-U.js} +17 -17
  60. package/dist/component/{form-C6WwBcGP.js → form-DCmjj8mZ.js} +69 -69
  61. package/dist/component/form-element-classes-Dn33C01k.js +111 -0
  62. package/dist/component/form.css +1 -1
  63. package/dist/component/form.js +1 -1
  64. package/dist/component/{header-field-rac-DGfjrjQC.js → header-field-rac-lyvjy6h2.js} +3 -3
  65. package/dist/component/{header-rac-C_JE2cTg.js → header-rac-B4iPEbNj.js} +1 -1
  66. package/dist/component/{image-choice-rac-LDLPQwrN.js → image-choice-rac-CmEG-waj.js} +29 -30
  67. package/dist/component/{index-C2srcuHD.js → index-D-CKLZBh.js} +4 -4
  68. package/dist/component/{index-CIOoaQ8Z.js → index-UZsDOe8e.js} +2 -2
  69. package/dist/component/{isObjectLike-E5QfEa1u.js → isObjectLike-BSGOU4jF.js} +1 -1
  70. package/dist/component/{multiline-address-field-rac-Biyj2tIN.js → multiline-address-field-rac-Dz0NEjSO.js} +125 -125
  71. package/dist/component/{multiline-address-rac-BCqCvG7a.js → multiline-address-rac-D_MAanxb.js} +1 -1
  72. package/dist/component/{number-input-field-rac-CwUoIbM8.js → number-input-field-rac-CvjeAm-W.js} +13 -13
  73. package/dist/component/{number-input-rac-CdYdTDem.js → number-input-rac-oKo2Wx_c.js} +1 -1
  74. package/dist/component/{password-rac-D62npVHY.js → password-rac-CrnkKtfp.js} +21 -21
  75. package/dist/component/{payment-input-rac-D4u-3vcW.js → payment-input-rac-BoVdGyvV.js} +18 -18
  76. package/dist/component/{phone-input-field-rac-uHxR3ozd.js → phone-input-field-rac-DksXoAnr.js} +54 -54
  77. package/dist/component/{phone-rac-Bf99_BGi.js → phone-rac-BR0iX5TL.js} +1 -1
  78. package/dist/component/product-list-rac-C4rvv5k-.js +270 -0
  79. package/dist/component/{quiz-radio-group-rac-CPGS0LEb.js → quiz-radio-group-rac-BxKmUUf8.js} +2 -2
  80. package/dist/component/{radio-group-field-rac-BWpTNAbO.js → radio-group-field-rac-Dj4rkkKF.js} +3 -3
  81. package/dist/component/{radio-group-field-rac.module-WxU5zxvM.js → radio-group-field-rac.module-CeBLm9QF.js} +3 -3
  82. package/dist/component/{radio-group-rac-dA4WZ1Vj.js → radio-group-rac-BpnfptSZ.js} +1 -1
  83. package/dist/component/{rating-input-field-rac-CJnFsBvH.js → rating-input-field-rac-BP0928qI.js} +30 -31
  84. package/dist/component/{rating-input-rac-DXVYozFV.js → rating-input-rac-DaEgvjIS.js} +1 -1
  85. package/dist/component/{rich-content-rac.module-DkKwzJS7.js → rich-content-rac.module-zvvH-tWq.js} +1 -1
  86. package/dist/component/{rich-text-field-rac-8FWCRrpb.js → rich-text-field-rac-CFCRiMl_.js} +3 -3
  87. package/dist/component/{rich-text-rac-OeM_mPRy.js → rich-text-rac-BRuLnyN4.js} +1 -1
  88. package/dist/component/{service-dropdown-rac-mvUMpcS_.js → service-dropdown-rac-C82l5y0C.js} +21 -21
  89. package/dist/component/services-multi-choice-rac-BAHBSgAT.js +83 -0
  90. package/dist/component/{signature-rac-D44U9Uyp.js → signature-rac-CIkm3SCW.js} +56 -56
  91. package/dist/component/{submit-button-rac-BqtcgVAn.js → submit-button-rac-Bz-X9Tbo.js} +2 -2
  92. package/dist/component/{tags-field-rac-CemsTKWz.js → tags-field-rac-Dn8VyPzT.js} +29 -30
  93. package/dist/component/{tags-rac-fVjCf6qo.js → tags-rac-BJpVdunR.js} +1 -1
  94. package/dist/component/{text-area-field-rac-BPciZlZb.js → text-area-field-rac-Pp9HnCS5.js} +18 -18
  95. package/dist/component/{text-area-rac-CRTORdZM.js → text-area-rac-DbwAFdel.js} +1 -1
  96. package/dist/component/{text-input-field-rac-CvFoWlRN.js → text-input-field-rac-x4ByKmBv.js} +6 -6
  97. package/dist/component/{text-input-headless-BQ3TWU9G.js → text-input-headless-fbiKci5q.js} +3 -3
  98. package/dist/component/{text-input-rac-DSFkEmob.js → text-input-rac-jyCKxyCt.js} +1 -1
  99. package/dist/component/{time-input-rac-CGgs7ncp.js → time-input-rac-C5Cvmxtt.js} +17 -17
  100. package/dist/component/{url-input-field-rac-CqvgTc-F.js → url-input-field-rac-CGpCEn2A.js} +20 -20
  101. package/dist/component/{url-input-rac-C45KOwnr.js → url-input-rac-DhFL8fGq.js} +1 -1
  102. package/dist/component/use-element-state-class-name-Bnw7sY9P.js +29 -0
  103. package/dist/component/{use-service-options-base-D4Zl-iGW.js → use-service-options-base-CgT1IKB3.js} +1 -1
  104. package/package.json +2 -2
  105. package/dist/component/checkbox-group-field-headless-D_GG5LHM.js +0 -210
  106. package/dist/component/checkbox-group-field-rac-Cj7Erubs.js +0 -41
  107. package/dist/component/contacts-subscribe-rac-Dl1ot9qw.js +0 -13
  108. package/dist/component/events-repeater-rac-CMV0Lmwz.js +0 -247
  109. package/dist/component/field-rac.module-Cac83bU5.js +0 -21
  110. package/dist/component/form-element-classes-DDKCTFQj.js +0 -65
  111. package/dist/component/form-element-keys-D0sEdpFo.js +0 -8
  112. package/dist/component/product-list-rac-iRf6Ra7i.js +0 -263
  113. package/dist/component/services-multi-choice-rac-DrgUrn_N.js +0 -76
@@ -1,18 +1,18 @@
1
- import e, { useCallback as H, useRef as V, useContext as q } from "react";
1
+ import e, { useCallback as H, useRef as V, useContext as x } from "react";
2
2
  import { RicosViewer as k } from "@wix/ricos/viewer";
3
3
  import c from "classnames";
4
- import { parseTime as v } from "@internationalized/date";
5
- import { TimeField as x, DateInput as B, DateSegment as h, TimeFieldStateContext as U } from "react-aria-components";
6
- import { ai as p, af as j, as as T, ak as z } from "./form-C6WwBcGP.js";
4
+ import { parseTime as q } from "@internationalized/date";
5
+ import { TimeField as v, DateInput as B, DateSegment as h, TimeFieldStateContext as U } from "react-aria-components";
6
+ import { ai as p, af as Q, as as T, ak as j } from "./form-DCmjj8mZ.js";
7
7
  import { f as m, a as F } from "./find-child-C60k4CxG.js";
8
- import { D as Q, E as G } from "./field-error-headless-DQZ5XAdn.js";
9
- import { L as J } from "./field-label-headless-DoxfHHaj.js";
8
+ import { D as z, E as G } from "./field-error-headless-uQOcm2Ak.js";
9
+ import { L as J } from "./field-label-headless-Bzh7f2Ji.js";
10
10
  import { E as K } from "./error-icon-hZxQ6DEy.js";
11
11
  import { H as S } from "./custom-focus-class-_483Pkwp.js";
12
- import { s as E } from "./field-rac.module-Cac83bU5.js";
13
- import { z as W, R as X, y as Y, q as Z, j as $ } from "./form-element-classes-DDKCTFQj.js";
12
+ import { s as E } from "./field-rac.module-DjmaTYkc.js";
13
+ import { y as W, Q as X, x as Y, p as Z, i as $ } from "./form-element-classes-Dn33C01k.js";
14
14
  const r = ({ children: t }) => {
15
- const { id: n, value: l, onChange: o, disabled: i, readOnly: s, required: a, onBlur: d, onFocus: f, use24HourFormat: b, FieldLayout: I, hasError: C } = p(), { inputId: L, ariaDescribedBy: R, labelId: g } = j(), D = H((M) => {
15
+ const { id: n, value: l, onChange: o, disabled: i, readOnly: s, required: a, onBlur: d, onFocus: f, use24HourFormat: b, FieldLayout: I, hasError: C } = p(), { inputId: L, ariaDescribedBy: g, labelId: D } = Q(), R = H((M) => {
16
16
  const w = ae(M);
17
17
  o(w);
18
18
  }, [
@@ -21,12 +21,12 @@ const r = ({ children: t }) => {
21
21
  return /* @__PURE__ */ e.createElement(I, {
22
22
  fieldId: n,
23
23
  renderLabel: () => y,
24
- renderInput: () => /* @__PURE__ */ e.createElement(x, {
25
- "aria-labelledby": g,
24
+ renderInput: () => /* @__PURE__ */ e.createElement(v, {
25
+ "aria-labelledby": D,
26
26
  id: L,
27
- "aria-describedby": R,
27
+ "aria-describedby": g,
28
28
  value: O,
29
- onChange: D,
29
+ onChange: R,
30
30
  isDisabled: i,
31
31
  isReadOnly: s,
32
32
  isInvalid: C,
@@ -66,7 +66,7 @@ const r = ({ children: t }) => {
66
66
  });
67
67
  }, ee = ({ className: t, ...n }) => {
68
68
  const { id: l, hidePlaceholder: o } = p(), { segment: i } = n, { t: s } = T(), a = V(null);
69
- z(() => {
69
+ j(() => {
70
70
  var f;
71
71
  (f = a.current) == null || f.focus();
72
72
  }, l);
@@ -89,7 +89,7 @@ const r = ({ children: t }) => {
89
89
  }
90
90
  });
91
91
  }, re = ({ className: t, ...n }) => {
92
- const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = T(), s = q(U), a = l ? void 0 : i("field.date.placeholder.period"), d = () => s == null ? void 0 : s.increment("dayPeriod");
92
+ const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = T(), s = x(U), a = l ? void 0 : i("field.date.placeholder.period"), d = () => s == null ? void 0 : s.increment("dayPeriod");
93
93
  return /* @__PURE__ */ e.createElement(h, {
94
94
  segment: o,
95
95
  className: t,
@@ -104,13 +104,13 @@ u.Minute = te;
104
104
  u.Period = re;
105
105
  r.Label = J;
106
106
  r.Time = u;
107
- r.Description = Q;
107
+ r.Description = z;
108
108
  r.Error = G;
109
109
  function ne(t) {
110
110
  if (!t)
111
111
  return null;
112
112
  try {
113
- return v(t);
113
+ return q(t);
114
114
  } catch {
115
115
  return null;
116
116
  }
@@ -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 k } from "./form-C6WwBcGP.js";
5
+ import { ai as E, af as d, ak as k } from "./form-DCmjj8mZ.js";
6
6
  import { f as u } from "./find-child-C60k4CxG.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";
7
+ import { D as B, E as M } from "./field-error-headless-uQOcm2Ak.js";
8
+ import { L as P } from "./field-label-headless-Bzh7f2Ji.js";
9
9
  import { u as T } from "./use-invoke-callback-UH73A_J3.js";
10
- import { E as q } from "./error-icon-hZxQ6DEy.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
- 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: 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
- a(V(n)), p();
10
+ import { E as v } from "./error-icon-hZxQ6DEy.js";
11
+ import { s } from "./field-rac.module-DjmaTYkc.js";
12
+ import { y as U, Q as g, x as q, p as x, i as w } from "./form-element-classes-Dn33C01k.js";
13
+ const Q = (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(() => {
15
+ a(Q(n)), p();
16
16
  }, [
17
17
  p,
18
18
  a,
19
19
  n
20
20
  ]);
21
- return /* @__PURE__ */ r.createElement(F, {
21
+ return /* @__PURE__ */ r.createElement(L, {
22
22
  fieldId: o,
23
23
  renderLabel: () => b,
24
24
  renderInput: () => /* @__PURE__ */ r.createElement(N, {
25
- "aria-labelledby": L,
25
+ "aria-labelledby": R,
26
26
  value: n ?? "",
27
27
  onChange: a,
28
28
  isDisabled: m,
@@ -30,11 +30,11 @@ const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
30
30
  isRequired: c,
31
31
  isInvalid: I,
32
32
  onBlur: S,
33
- onFocus: R
33
+ onFocus: F
34
34
  }, D),
35
35
  renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, C, _)
36
36
  });
37
- }, W = ({ className: t }) => {
37
+ }, V = ({ className: t }) => {
38
38
  const { id: o, placeholder: n } = E(), { inputId: a, ariaDescribedBy: m } = d(), i = y(null);
39
39
  return k(() => {
40
40
  var c;
@@ -49,23 +49,23 @@ const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
49
49
  });
50
50
  };
51
51
  e.Label = P;
52
- e.Input = W;
52
+ e.Input = V;
53
53
  e.Description = B;
54
54
  e.Error = M;
55
- const $ = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(O, {
55
+ const W = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(O, {
56
56
  content: t,
57
57
  locale: o
58
58
  }), te = () => /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
59
- className: l(v, s.label)
59
+ className: l(U, s.label)
60
60
  }, /* @__PURE__ */ r.createElement(e.Label.Required, {
61
- className: l(U, s.requiredMark)
61
+ className: l(g, s.requiredMark)
62
62
  })), /* @__PURE__ */ r.createElement(e.Input, {
63
- className: l(g, s.input)
63
+ className: l(q, s.input)
64
64
  }), /* @__PURE__ */ r.createElement(e.Error, {
65
65
  className: l(x, s.error)
66
- }, /* @__PURE__ */ r.createElement(q, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
66
+ }, /* @__PURE__ */ r.createElement(v, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
67
67
  className: l(w, s.description)
68
- }, $));
68
+ }, W));
69
69
  export {
70
70
  te as U
71
71
  };
@@ -1,5 +1,5 @@
1
1
  import r from "react";
2
- import { U as t } from "./url-input-field-rac-CqvgTc-F.js";
2
+ import { U as t } from "./url-input-field-rac-CGpCEn2A.js";
3
3
  const n = () => /* @__PURE__ */ r.createElement(t, null);
4
4
  export {
5
5
  n as UrlInputRAC
@@ -0,0 +1,29 @@
1
+ import m from "react";
2
+ import { s as r } from "./field-rac.module-DjmaTYkc.js";
3
+ import a from "classnames";
4
+ import { ac as p } from "./form-DCmjj8mZ.js";
5
+ const v = ({ className: e, ...t }) => {
6
+ const c = t;
7
+ return /* @__PURE__ */ m.createElement("div", {
8
+ "aria-hidden": "true",
9
+ className: typeof e == "function" ? e(c) : e
10
+ });
11
+ }, I = {
12
+ base: r.checkboxInput,
13
+ selected: r.checkboxInputSelected,
14
+ hover: r.checkboxInputHover
15
+ }, S = ({ globalClasses: e, moduleClasses: t }) => {
16
+ var o;
17
+ const c = ((o = p(e.key)) == null ? void 0 : o.split(/\s+/)) ?? [], i = c.includes(e.selected), d = c.includes(e.hover);
18
+ return ({ isSelected: n, isHovered: s }) => a(e.base, t.base, c, {
19
+ [e.selected]: n,
20
+ [e.hover]: s,
21
+ [t.selected]: n || i,
22
+ [t.hover]: s || d
23
+ });
24
+ };
25
+ export {
26
+ I as C,
27
+ v as a,
28
+ S as u
29
+ };
@@ -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-C6WwBcGP.js";
2
+ import { ah as v } from "./form-DCmjj8mZ.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.74.0",
3
+ "version": "1.75.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": "72ce2a6794445487f380a02a409cc5f78240e1520ce622b0ca881c2b"
154
+ "falconPackageHash": "e289d046abbbaf6510a3b4a08ef51a2b4dc1fa87a961f543da6a5a91"
155
155
  }
@@ -1,210 +0,0 @@
1
- import r, { useMemo as F, useCallback as _, useRef as H, useState as w, useEffect as U } from "react";
2
- import { CheckboxGroup as W, CheckboxField as A, CheckboxButton as j, TextField as z, Input as J } from "react-aria-components";
3
- import { debounce as K } from "ts-debounce";
4
- import { ai as N, af as Q, as as X, ab as Y, ak as Z } from "./form-C6WwBcGP.js";
5
- import { f as L, a as k } from "./find-child-C60k4CxG.js";
6
- import { D as ee, E as te } from "./field-error-headless-DQZ5XAdn.js";
7
- import { L as ne } from "./field-label-headless-DoxfHHaj.js";
8
- import { F as ae } from "./fieldset-headless-CD3fds9J.js";
9
- import { N as se } from "./options-layout-constants-DEfIEJWD.js";
10
- const R = "Other", le = (e, t) => e.some((l) => !t.includes(l)), B = (e, t) => e.length > 0 && le(e, t), oe = (e, t) => {
11
- const l = t == null ? void 0 : t("add-other.default-other-option-label");
12
- return e || l || R;
13
- }, P = (e, t) => {
14
- const a = t ? t.length + 2 : 0;
15
- return (e.find((c) => c.startsWith(`${t}: `)) || "").slice(a);
16
- }, D = (e) => e.map((t) => t.value ?? t.label), v = ({ children: e }) => {
17
- const t = N(), { id: l, value: a, onChange: n, disabled: c, required: u, onBlur: I, onFocus: p, hasError: b, FieldLayout: i } = t, { inputId: f, labelId: d, ariaDescribedBy: o } = Q(), O = L(e, v.Label), h = L(e, v.Options), g = L(e, v.Description), C = L(e, v.Error), s = F(() => a || [], [
18
- a
19
- ]), E = _((V) => {
20
- n == null || n(V);
21
- }, [
22
- n
23
- ]);
24
- return /* @__PURE__ */ r.createElement(i, {
25
- fieldId: l,
26
- renderLabel: () => O,
27
- renderInput: () => /* @__PURE__ */ r.createElement(ae, {
28
- id: f,
29
- ariaLabelledBy: d,
30
- ariaDescribedBy: o,
31
- required: u,
32
- onBlur: I,
33
- onFocus: p
34
- }, /* @__PURE__ */ r.createElement(W, {
35
- "aria-labelledby": d,
36
- value: s,
37
- onChange: E,
38
- isDisabled: c,
39
- isRequired: u,
40
- isInvalid: b
41
- }, h)),
42
- renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, C, g)
43
- });
44
- }, $ = ({ children: e, className: t }) => {
45
- const l = N(), { id: a, options: n, addOther: c, addOtherLabel: u, numberOfColumns: I } = l, { t: p } = X(), { isMobile: b } = Y(), i = L(e, $.Option), f = oe(u, p), d = b ? se.ONE : I;
46
- return /* @__PURE__ */ r.createElement("div", {
47
- className: t,
48
- "data-columns": d
49
- }, n == null ? void 0 : n.map((o, O) => {
50
- const h = o.value ?? o.label;
51
- return k(i, {
52
- key: o.id || o.label,
53
- value: h,
54
- label: o.label,
55
- isFirst: O === 0,
56
- fieldId: a
57
- });
58
- }), c && k(i, {
59
- key: R,
60
- value: R,
61
- label: f,
62
- isOther: !0
63
- }));
64
- }, re = ({ className: e, ...t }) => {
65
- const l = t;
66
- return /* @__PURE__ */ r.createElement("div", {
67
- "aria-hidden": "true",
68
- className: typeof e == "function" ? e(l) : e
69
- });
70
- }, ce = ({ className: e, ...t }) => {
71
- const { label: l } = t;
72
- return /* @__PURE__ */ r.createElement("span", {
73
- className: e
74
- }, l);
75
- }, x = ({ children: e, className: t, ...l }) => {
76
- const { value: a, label: n, isFirst: c = !1, isOther: u = !1, fieldId: I } = l, p = N(), { value: b, onChange: i, disabled: f, readOnly: d, hasError: o, options: O } = p, h = H(null);
77
- Z(() => {
78
- var m;
79
- c && ((m = h.current) == null || m.focus({
80
- preventScroll: !0
81
- }));
82
- }, I);
83
- const g = L(e, x.Label), C = L(e, x.Input), s = F(() => b || [], [
84
- b
85
- ]), E = F(() => u ? s.find((m) => m === n || m.startsWith(`${n}: `)) || n : a, [
86
- u,
87
- s,
88
- n,
89
- a
90
- ]), V = _((m) => {
91
- if (!u)
92
- return;
93
- const y = D(O || []), S = s.filter((G) => y.includes(G)), q = m ? [
94
- ...S,
95
- n
96
- ] : S;
97
- i == null || i(q);
98
- }, [
99
- u,
100
- n,
101
- i,
102
- O,
103
- s
104
- ]);
105
- return /* @__PURE__ */ r.createElement(A, {
106
- value: E,
107
- onChange: u ? V : void 0,
108
- isDisabled: f,
109
- isReadOnly: d,
110
- isInvalid: o
111
- }, /* @__PURE__ */ r.createElement(j, {
112
- ref: h,
113
- className: t,
114
- "data-hook": `checkbox-${n}`
115
- }, ({ isSelected: m, isHovered: y }) => /* @__PURE__ */ r.createElement(r.Fragment, null, k(C, {
116
- isSelected: m,
117
- isHovered: y
118
- }), k(g, {
119
- label: n
120
- }))));
121
- };
122
- x.Label = ce;
123
- x.Input = re;
124
- const M = ({ children: e, ...t }) => {
125
- const { value: l, label: a, isFirst: n = !1, isOther: c = !1, fieldId: u } = t, I = N(), { value: p, onChange: b, options: i, addOtherPlaceholder: f, otherInputCharacterLimit: d, disabled: o, readOnly: O, hasError: h } = I, g = L(e, x), C = L(e, T), s = F(() => p || [], [
126
- p
127
- ]), E = F(() => {
128
- if (!c)
129
- return !1;
130
- const V = D(i || []);
131
- return B(s, V);
132
- }, [
133
- c,
134
- s,
135
- i
136
- ]);
137
- return /* @__PURE__ */ r.createElement(r.Fragment, null, k(g, {
138
- value: l,
139
- label: a,
140
- isFirst: n,
141
- isOther: c,
142
- fieldId: u
143
- }), c && E && k(C, {
144
- fieldValue: s,
145
- onChange: b,
146
- label: a,
147
- placeholder: f,
148
- maxLength: d,
149
- disabled: o,
150
- readOnly: O,
151
- hasError: h,
152
- ariaLabel: a,
153
- addOtherLabel: a,
154
- options: i
155
- }));
156
- }, T = ({ className: e, inputClassName: t, ...l }) => {
157
- const { fieldValue: a, onChange: n, label: c, placeholder: u, maxLength: I, disabled: p, readOnly: b, hasError: i, ariaLabel: f, addOtherLabel: d, options: o } = l, [O, h] = w(() => {
158
- const s = D(o || []);
159
- return B(a, s) ? P(a, d) : "";
160
- });
161
- U(() => {
162
- const s = D(o || []), E = B(a, s);
163
- h(E ? P(a, d) : "");
164
- }, [
165
- a,
166
- o,
167
- d
168
- ]);
169
- const g = F(() => K((s) => {
170
- const E = D(o || []), V = a.filter((S) => E.includes(S)), m = s ? `${d}: ${s}` : c, y = [
171
- ...V,
172
- m
173
- ];
174
- n(y);
175
- }, 500), [
176
- n,
177
- o,
178
- a,
179
- d,
180
- c
181
- ]), C = _((s) => {
182
- h(s), g(s);
183
- }, [
184
- g
185
- ]);
186
- return /* @__PURE__ */ r.createElement(z, {
187
- "aria-label": f,
188
- value: O,
189
- onChange: C,
190
- isDisabled: p,
191
- isReadOnly: b,
192
- isInvalid: i,
193
- className: e
194
- }, /* @__PURE__ */ r.createElement(J, {
195
- className: t,
196
- placeholder: u,
197
- maxLength: I,
198
- "aria-label": f
199
- }));
200
- };
201
- v.Label = ne;
202
- v.Options = $;
203
- $.Option = M;
204
- M.Checkbox = x;
205
- M.OtherInput = T;
206
- v.Description = ee;
207
- v.Error = te;
208
- export {
209
- v as C
210
- };
@@ -1,41 +0,0 @@
1
- import { RicosViewer as l } from "@wix/ricos/viewer";
2
- import a from "classnames";
3
- import e from "react";
4
- import { ac as m } from "./form-C6WwBcGP.js";
5
- import { C as t } from "./checkbox-group-field-headless-D_GG5LHM.js";
6
- import { E as _ } from "./error-icon-hZxQ6DEy.js";
7
- import { s as r } from "./field-rac.module-Cac83bU5.js";
8
- import { z as c, R as O, a as C, b as i, c as p, d as R, e as L, y as I, q as S, j as D } from "./form-element-classes-DDKCTFQj.js";
9
- import { C as F } from "./form-element-keys-D0sEdpFo.js";
10
- import { o as n } from "./options-rac.module-KM-VT_KY.js";
11
- const N = ({ content: o, locale: s }) => /* @__PURE__ */ e.createElement(l, {
12
- content: o,
13
- locale: s
14
- }), k = () => {
15
- const o = m(F);
16
- return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
17
- className: a(c, r.label)
18
- }, /* @__PURE__ */ e.createElement(t.Label.Required, {
19
- className: a(O, r.requiredMark)
20
- })), /* @__PURE__ */ e.createElement(t.Options, {
21
- className: a(C, n.options)
22
- }, /* @__PURE__ */ e.createElement(t.Options.Option, null, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox, {
23
- className: r.checkbox
24
- }, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Input, {
25
- className: ({ isSelected: s, isHovered: E }) => a(i, r.checkboxInput, o, {
26
- [R]: s,
27
- [p]: E
28
- })
29
- }), /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Label, {
30
- className: a(L, n.optionLabel)
31
- })), /* @__PURE__ */ e.createElement(t.Options.Option.OtherInput, {
32
- inputClassName: a(I, r.input)
33
- }))), /* @__PURE__ */ e.createElement(t.Error, {
34
- className: a(S, r.error)
35
- }, /* @__PURE__ */ e.createElement(_, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
36
- className: a(D, r.description)
37
- }, N));
38
- };
39
- export {
40
- k as C
41
- };
@@ -1,13 +0,0 @@
1
- import C from "react";
2
- import { C as _ } from "./checkbox-field-rac-BH3yEE5j.js";
3
- import { Z as e, _ as o, Y as r } from "./form-element-classes-DDKCTFQj.js";
4
- const a = () => /* @__PURE__ */ C.createElement(_, {
5
- classes: {
6
- container: r,
7
- label: o,
8
- control: e
9
- }
10
- });
11
- export {
12
- a as ContactsSubscribeRAC
13
- };