@wix/form-elements 1.161.0 → 1.163.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-BubC8I9X.js → appointment-rac-Cskf9hxi.js} +123 -123
  2. package/dist/component/{bookings-address-rac-BbwvVs86.js → bookings-address-rac-C18tuPai.js} +1 -1
  3. package/dist/component/{bookings-email-rac-C2HCkcfa.js → bookings-email-rac-C2GL3cJg.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-Uy7c5EBs.js → bookings-first-name-rac-IEklnchg.js} +1 -1
  5. package/dist/component/{bookings-header-rac-nmwsWRjS.js → bookings-header-rac-iwcrj5Kj.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-BAioQLCg.js → bookings-last-name-rac-CXZfq3Rw.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-CO6vOBjG.js → bookings-login-bar-rac-DP0MBFTm.js} +6 -6
  8. package/dist/component/{bookings-phone-rac-Cr16h-_R.js → bookings-phone-rac-uJGk_tzr.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-CHLH3jd7.js → bookings-rich-text-rac-BerRAnFy.js} +1 -1
  10. package/dist/component/{calendar.module-CKCBG_Pg.js → calendar.module-BMUyMVja.js} +19 -19
  11. package/dist/component/{checkbox-field-rac-CMwmwFMD.js → checkbox-field-rac-BBftIi_U.js} +6 -6
  12. package/dist/component/{checkbox-group-field-headless-BNs_S-nT.js → checkbox-group-field-headless-BiQ4coe6.js} +27 -27
  13. package/dist/component/{checkbox-group-field-rac-BA60EPAN.js → checkbox-group-field-rac-moHc5Cyu.js} +6 -6
  14. package/dist/component/{checkbox-group-rac-BJZ4Oer9.js → checkbox-group-rac-iuPzxN7i.js} +1 -1
  15. package/dist/component/{checkbox-indicator-module-classes-akWZsZNn.js → checkbox-indicator-module-classes-DUTR4mcg.js} +1 -1
  16. package/dist/component/{checkbox-rac-KsVlI6_V.js → checkbox-rac-BwfHAeFo.js} +1 -1
  17. package/dist/component/{contacts-address-rac-CRYkz87z.js → contacts-address-rac-DuyEL5YR.js} +1 -1
  18. package/dist/component/{contacts-birthdate-rac-BIz-1-ZX.js → contacts-birthdate-rac-Mkoplu3x.js} +1 -1
  19. package/dist/component/{contacts-company-rac-B8G__j6I.js → contacts-company-rac-B-3QghQg.js} +1 -1
  20. package/dist/component/{contacts-email-rac-Dztkvp5i.js → contacts-email-rac-CqooKQl8.js} +1 -1
  21. package/dist/component/{contacts-first-name-rac-CVSEWpLU.js → contacts-first-name-rac-CAOu0GIH.js} +1 -1
  22. package/dist/component/{contacts-last-name-rac-Blz4M5bk.js → contacts-last-name-rac-Cd-wCTC3.js} +1 -1
  23. package/dist/component/{contacts-phone-rac-CPCE5soY.js → contacts-phone-rac-OGE6eaJc.js} +1 -1
  24. package/dist/component/{contacts-position-rac-Dd_kBjqG.js → contacts-position-rac-eSsV63RC.js} +1 -1
  25. package/dist/component/{contacts-subscribe-rac-C6AlsP10.js → contacts-subscribe-rac-19d4uPR-.js} +1 -1
  26. package/dist/component/{contacts-tax-id-rac-CQ1n29zI.js → contacts-tax-id-rac-TtyrAftZ.js} +1 -1
  27. package/dist/component/{date-availability-DDj1j0z5.js → date-availability-CudIaav_.js} +1 -1
  28. package/dist/component/{date-input-field-rac-D5r1n_ah.js → date-input-field-rac-DzMiQLxS.js} +89 -89
  29. package/dist/component/{date-input-rac-Cyi5mU_P.js → date-input-rac-BWfmwcmK.js} +1 -1
  30. package/dist/component/{date-picker-field-rac-CeG391Zo.js → date-picker-field-rac-w4Wf-m0I.js} +54 -54
  31. package/dist/component/{date-picker-rac-Ci9aHgav.js → date-picker-rac-Bejo7tOm.js} +1 -1
  32. package/dist/component/{date-time-input-field-rac-CrbYEbJJ.js → date-time-input-field-rac-D6JPrbGb.js} +80 -80
  33. package/dist/component/{date-time-input-rac-DDJLkqs0.js → date-time-input-rac-CAK5NgC4.js} +1 -1
  34. package/dist/component/{dext-checkbox-group-rac-C3ftVHBA.js → dext-checkbox-group-rac-BqoHMQwI.js} +4 -4
  35. package/dist/component/{dext-checkbox-rac-BGLYWn68.js → dext-checkbox-rac-BEis8bxo.js} +1 -1
  36. package/dist/component/{dext-date-picker-rac-Cy9RlDlt.js → dext-date-picker-rac-DDQTy3BG.js} +1 -1
  37. package/dist/component/{dext-date-time-input-rac-88ZoTd5e.js → dext-date-time-input-rac-Dp3UEXEu.js} +1 -1
  38. package/dist/component/{dext-dropdown-rac-CPxDUuk9.js → dext-dropdown-rac-DisXIXNb.js} +1 -1
  39. package/dist/component/{dext-email-rac-BAvQwDPA.js → dext-email-rac-CBv4umUC.js} +1 -1
  40. package/dist/component/{dext-number-input-rac-D7HYQVKq.js → dext-number-input-rac-0UNC_1Ac.js} +1 -1
  41. package/dist/component/{dext-phone-rac--FhcplSI.js → dext-phone-rac-CQVzz499.js} +1 -1
  42. package/dist/component/{dext-radio-group-rac-DBz8iCKW.js → dext-radio-group-rac-3lhx-xxX.js} +2 -2
  43. package/dist/component/{dext-rating-input-rac-Cv7nThfe.js → dext-rating-input-rac-2fwxV3iY.js} +1 -1
  44. package/dist/component/{dext-tags-rac-CRUUc5dr.js → dext-tags-rac-DCL78ClS.js} +2 -2
  45. package/dist/component/{dext-text-area-rac-DQBQXV1L.js → dext-text-area-rac-WTCWYySB.js} +1 -1
  46. package/dist/component/{dext-text-input-rac-4CpM581y.js → dext-text-input-rac-DMCzSYAI.js} +1 -1
  47. package/dist/component/{dext-url-input-rac-0C1jTEr9.js → dext-url-input-rac-Bzvt5zTa.js} +1 -1
  48. package/dist/component/{donation-rac-Cgt0ZE50.js → donation-rac-B3YHu0bl.js} +98 -98
  49. package/dist/component/{dropdown-field-rac-DlGKR7pZ.js → dropdown-field-rac-y4GPpf0W.js} +4 -4
  50. package/dist/component/{dropdown-rac-CYFW_3x_.js → dropdown-rac-Dj7OnxJL.js} +1 -1
  51. package/dist/component/{ecom-address-rac-CQfQHpXC.js → ecom-address-rac-Bnc60jDw.js} +1 -1
  52. package/dist/component/{ecom-subscription-checkbox-rac-D2v2Upvz.js → ecom-subscription-checkbox-rac-CesTpjav.js} +2 -2
  53. package/dist/component/{email-input-field-rac-CVw25yRo.js → email-input-field-rac-BT2FrAEM.js} +48 -48
  54. package/dist/component/{events-repeater-rac-BCVUcmFj.js → events-repeater-rac-CA2yjEEk.js} +24 -24
  55. package/dist/component/{events-rsvp-rac-DwbqEr8z.js → events-rsvp-rac-wVpVt7-p.js} +4 -4
  56. package/dist/component/{field-error-headless-XnVcMmsL.js → field-error-headless-CX95bMbk.js} +8 -8
  57. package/dist/component/{field-label-headless-BRTLT2Yt.js → field-label-headless-niuFY6Mw.js} +17 -17
  58. package/dist/component/field-rac.module-ts2t4WUO.js +25 -0
  59. package/dist/component/{file-upload-rac-Dkwg9Jk4.js → file-upload-rac-ByO8l8lE.js} +142 -142
  60. package/dist/component/{fixed-payment-rac-ST98xAa2.js → fixed-payment-rac-BNDAdNeQ.js} +18 -18
  61. package/dist/component/{form-BUqSKOvc.js → form-CCQN_rPn.js} +326 -336
  62. package/dist/component/form.css +1 -1
  63. package/dist/component/form.js +1 -1
  64. package/dist/component/{header-field-rac-CzNTGYWq.js → header-field-rac-C1RySfYy.js} +6 -6
  65. package/dist/component/{header-rac-DUt6AIAE.js → header-rac-BaFPV0vy.js} +1 -1
  66. package/dist/component/image-choice-rac-BShUj92P.js +155 -0
  67. package/dist/component/{index-cZZeAuuu.js → index-0_YjLphg.js} +2 -2
  68. package/dist/component/{index-CDO22hht.js → index-DHLfweXD.js} +69 -69
  69. package/dist/component/{isObjectLike-cs4bARpC.js → isObjectLike-D7tbAd6O.js} +3 -3
  70. package/dist/component/{multiline-address-field-rac-vcEWhUCV.js → multiline-address-field-rac-CFJKE5vA.js} +41 -41
  71. package/dist/component/{multiline-address-rac-WQaI2eUX.js → multiline-address-rac-BlzCkwEH.js} +1 -1
  72. package/dist/component/{number-input-field-rac-CBUMqATk.js → number-input-field-rac-XqxdqTRV.js} +24 -24
  73. package/dist/component/{number-input-rac-B4j5hyzS.js → number-input-rac-CQTg0QSm.js} +1 -1
  74. package/dist/component/{password-rac-DwLyf45N.js → password-rac-DPE-U2xs.js} +17 -17
  75. package/dist/component/{payment-input-rac-D0Od---y.js → payment-input-rac-oOh04431.js} +32 -32
  76. package/dist/component/{phone-input-field-rac-COlu9IeC.js → phone-input-field-rac-DW2vQhjC.js} +48 -48
  77. package/dist/component/{phone-rac-Dh4RacOF.js → phone-rac-BB9B-Hpl.js} +1 -1
  78. package/dist/component/{product-list-rac-D7zHDE2D.js → product-list-rac-K53VvPJV.js} +26 -26
  79. package/dist/component/{quiz-radio-group-rac-1AaKphJt.js → quiz-radio-group-rac-gikcMV2I.js} +1 -1
  80. package/dist/component/{radio-button-module-classes-VqaP6vpA.js → radio-button-module-classes-CY883yGO.js} +34 -34
  81. package/dist/component/{radio-group-field-rac-Cp3LRN3C.js → radio-group-field-rac-BOEWcfT9.js} +5 -5
  82. package/dist/component/{radio-group-rac-KhmhzYGf.js → radio-group-rac-gKhmLMm3.js} +1 -1
  83. package/dist/component/{rating-input-field-rac-10n6ciCr.js → rating-input-field-rac-83FXIVpy.js} +30 -30
  84. package/dist/component/{rating-input-rac-XZjjY2Gp.js → rating-input-rac-XDwakrtR.js} +1 -1
  85. package/dist/component/{rich-content-rac.module-kMwDoLBa.js → rich-content-rac.module-Bdx8hK3J.js} +5 -5
  86. package/dist/component/{rich-text-field-rac-H5bd8fAt.js → rich-text-field-rac-ksEKBaYG.js} +4 -4
  87. package/dist/component/{rich-text-rac-88GSQR62.js → rich-text-rac-XEFBeQrz.js} +1 -1
  88. package/dist/component/{service-dropdown-rac-B1_Xr_X3.js → service-dropdown-rac-CjFiqV1n.js} +26 -26
  89. package/dist/component/{services-multi-choice-rac-DWp_Llbi.js → services-multi-choice-rac-DNut4K3I.js} +15 -15
  90. package/dist/component/{signature-rac-zN_6KRDp.js → signature-rac-BhWPZpwu.js} +108 -108
  91. package/dist/component/{submit-button-rac-Dv6UarYX.js → submit-button-rac-CWmz_JCl.js} +7 -7
  92. package/dist/component/{tags-field-rac-sVN6MHfJ.js → tags-field-rac-D9P1jVrz.js} +75 -75
  93. package/dist/component/{tags-rac-DhTHs_XN.js → tags-rac-0zEd-xYa.js} +1 -1
  94. package/dist/component/{text-area-field-rac-DrWkww7W.js → text-area-field-rac-D_55oi2b.js} +19 -19
  95. package/dist/component/{text-area-rac-CXXh-ZdY.js → text-area-rac-CpkFyXCH.js} +1 -1
  96. package/dist/component/{text-input-field-rac-C2YiMr-g.js → text-input-field-rac-b7RXb4Ob.js} +4 -4
  97. package/dist/component/{text-input-headless-BJMNbsMY.js → text-input-headless-b1TEpdit.js} +11 -11
  98. package/dist/component/{text-input-rac-CpsPh7FH.js → text-input-rac-CoVcg1S0.js} +1 -1
  99. package/dist/component/{time-input-rac-DG_1KxS4.js → time-input-rac-DE7OyzgQ.js} +20 -20
  100. package/dist/component/url-input-field-rac-_yxWlb3a.js +77 -0
  101. package/dist/component/{url-input-rac-BTStO0NP.js → url-input-rac-wguMUqug.js} +1 -1
  102. package/dist/component/{use-dropdown-option-class-name-DbMMg1ws.js → use-dropdown-option-class-name-DdQ0sFRF.js} +12 -12
  103. package/dist/component/{use-dropdown-trigger-class-name-Yes4kC_0.js → use-dropdown-trigger-class-name-hB8KYv-I.js} +19 -19
  104. package/dist/component/{use-element-state-class-name-DlncY4hk.js → use-element-state-class-name-C2tQgxUX.js} +1 -1
  105. package/dist/component/{use-hoverable-input-class-name-C__zqP5j.js → use-hoverable-input-class-name-C8iuzofb.js} +3 -3
  106. package/dist/component/{use-is-forced-open-dropdown-DnK_MQRO.js → use-is-forced-open-dropdown-DkIrJPsK.js} +4 -4
  107. package/dist/component/{use-service-options-base-DKJe52Vk.js → use-service-options-base-B-xAR-tx.js} +3 -3
  108. package/dist/component/use-text-input-class-name-CK4rZeSM.js +6 -0
  109. package/package.json +2 -2
  110. package/dist/component/field-rac.module-DP0lkkEv.js +0 -25
  111. package/dist/component/image-choice-rac-DuBgrSt2.js +0 -155
  112. package/dist/component/url-input-field-rac-twxRREnl.js +0 -77
  113. package/dist/component/use-text-input-class-name-D9tJTR-b.js +0 -6
@@ -1,10 +1,10 @@
1
1
  import d, { useContext as _, useRef as L, useState as m, Children as N, useLayoutEffect as p, useMemo as D } from "react";
2
2
  import { CollectionRendererContext as g, DefaultCollectionRenderer as E, ListBox as M } from "react-aria-components";
3
- import P from "classnames";
4
- import { s as h } from "./field-rac.module-DP0lkkEv.js";
5
- import { K as T } from "./form-BUqSKOvc.js";
6
- import { u as H } from "./use-element-state-class-name-DlncY4hk.js";
7
- const R = 1 / 0, I = {
3
+ import I from "classnames";
4
+ import { s as h } from "./field-rac.module-ts2t4WUO.js";
5
+ import { I as P } from "./form-CCQN_rPn.js";
6
+ import { u as T } from "./use-element-state-class-name-C2tQgxUX.js";
7
+ const R = 1 / 0, H = {
8
8
  position: "absolute",
9
9
  width: 0,
10
10
  height: "var(--popoverMaxHeight, 240px)",
@@ -31,7 +31,7 @@ const R = 1 / 0, I = {
31
31
  t += 1;
32
32
  }
33
33
  return t;
34
- }, X = ({ isForcedOpen: e, ...n }) => {
34
+ }, Y = ({ isForcedOpen: e, ...n }) => {
35
35
  const s = _(g), t = L(null), [r, f] = m(null), [l, O] = m(R), [b, w] = m(0), x = N.count(n.children);
36
36
  p(() => {
37
37
  O(R);
@@ -93,7 +93,7 @@ const R = 1 / 0, I = {
93
93
  ...n
94
94
  }), e && /* @__PURE__ */ d.createElement("div", {
95
95
  ref: f,
96
- style: I
96
+ style: H
97
97
  }));
98
98
  }, V = {
99
99
  base: h.selectOption,
@@ -103,14 +103,14 @@ const R = 1 / 0, I = {
103
103
  isSelected: e,
104
104
  isHovered: (n || s) && !e
105
105
  }), W = (e, ...n) => {
106
- const s = H({
106
+ const s = T({
107
107
  globalClasses: e,
108
108
  moduleClasses: V
109
109
  });
110
- return (t) => P(s(q(t)), n);
111
- }, Y = (...e) => W(T, ...e);
110
+ return (t) => I(s(q(t)), n);
111
+ }, J = (...e) => W(P, ...e);
112
112
  export {
113
- X as V,
113
+ Y as V,
114
114
  W as a,
115
- Y as u
115
+ J as u
116
116
  };
@@ -1,16 +1,16 @@
1
1
  import n, { useState as b, useCallback as g, useRef as M } from "react";
2
2
  import { UNSAFE_PortalProvider as k } from "react-aria";
3
3
  import { Select as q, SelectValue as G, ListBoxItem as H } from "react-aria-components";
4
- import { bA as E, bx as O, bC as U, L as W } from "./form-BUqSKOvc.js";
4
+ import { by as E, bv as O, bA as J, J as U } from "./form-CCQN_rPn.js";
5
5
  import { f as d, a as F } from "./find-child-C60k4CxG.js";
6
- import { D as Y, E as j } from "./field-error-headless-XnVcMmsL.js";
7
- import { L as z } from "./field-label-headless-BRTLT2Yt.js";
8
- import { E as J, S as K, N as Q } from "./non-modal-popover-D-u13tmp.js";
9
- import { a as X } from "./use-is-forced-open-dropdown-DnK_MQRO.js";
10
- import { V as Z } from "./use-dropdown-option-class-name-DbMMg1ws.js";
11
- import { u as $ } from "./use-hoverable-input-class-name-C__zqP5j.js";
6
+ import { D as W, E as Y } from "./field-error-headless-CX95bMbk.js";
7
+ import { L as j } from "./field-label-headless-niuFY6Mw.js";
8
+ import { E as z, S as K, N as Q } from "./non-modal-popover-D-u13tmp.js";
9
+ import { a as X } from "./use-is-forced-open-dropdown-DkIrJPsK.js";
10
+ import { V as Z } from "./use-dropdown-option-class-name-DdQ0sFRF.js";
11
+ import { u as $ } from "./use-hoverable-input-class-name-C8iuzofb.js";
12
12
  const r = ({ children: e }) => {
13
- const { id: l, value: a, defaultValue: o, options: u = [], readOnly: s, onChange: t, placeholder: m, disabled: i, required: v, onBlur: D, onFocus: C, FieldLayout: L, hasError: I } = E(), [y, N] = b(!1), p = X(l), [P, R] = b(null), T = a && u.some((c) => (c.value ?? c.label) === a) ? a : o || null, { labelId: h } = O(), S = g((c) => {
13
+ const { id: l, value: a, defaultValue: o, options: u = [], readOnly: s, onChange: t, placeholder: m, disabled: i, required: v, onBlur: D, onFocus: C, FieldLayout: L, hasError: y } = E(), [I, N] = b(!1), p = X(l), [P, R] = b(null), T = a && u.some((c) => (c.value ?? c.label) === a) ? a : o || null, { labelId: h } = O(), S = g((c) => {
14
14
  s || t(typeof c == "string" ? c : null);
15
15
  }, [
16
16
  t,
@@ -18,7 +18,7 @@ const r = ({ children: e }) => {
18
18
  ]), B = g((c) => N(c && !i && !s), [
19
19
  i,
20
20
  s
21
- ]), V = d(e, r.Label), _ = d(e, r.Trigger), x = d(e, r.Options), w = d(e, r.Description), A = d(e, r.Error);
21
+ ]), V = d(e, r.Label), _ = d(e, r.Trigger), w = d(e, r.Options), x = d(e, r.Description), A = d(e, r.Error);
22
22
  return /* @__PURE__ */ n.createElement(L, {
23
23
  fieldId: l,
24
24
  renderLabel: () => V,
@@ -32,23 +32,23 @@ const r = ({ children: e }) => {
32
32
  }, /* @__PURE__ */ n.createElement(q, {
33
33
  "aria-labelledby": h,
34
34
  value: T,
35
- isOpen: p || y && !i && !s,
35
+ isOpen: p || I && !i && !s,
36
36
  onOpenChange: p ? void 0 : B,
37
37
  onChange: S,
38
38
  isDisabled: i,
39
- isInvalid: I,
39
+ isInvalid: y,
40
40
  isRequired: v,
41
- placeholder: m || J,
41
+ placeholder: m || z,
42
42
  onBlur: D,
43
43
  onFocus: C
44
- }, _, F(x, {
44
+ }, _, F(w, {
45
45
  isForcedOpen: p
46
46
  })))),
47
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, A, w)
47
+ renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, A, x)
48
48
  });
49
49
  }, ee = ({ children: e, className: l }) => {
50
50
  const { inputId: a, ariaDescribedBy: o } = O(), { id: u, hasError: s, isLoading: t } = E(), m = M(null);
51
- return U(() => {
51
+ return J(() => {
52
52
  var i;
53
53
  (i = m.current) == null || i.focus({
54
54
  preventScroll: !0
@@ -84,12 +84,12 @@ const r = ({ children: e }) => {
84
84
  }, o);
85
85
  };
86
86
  f.Option = ne;
87
- r.Label = z;
87
+ r.Label = j;
88
88
  r.Trigger = ee;
89
89
  r.Options = f;
90
- r.Description = Y;
91
- r.Error = j;
92
- const pe = (...e) => $(W, e);
90
+ r.Description = W;
91
+ r.Error = Y;
92
+ const pe = (...e) => $(U, e);
93
93
  export {
94
94
  r as D,
95
95
  pe as u
@@ -1,5 +1,5 @@
1
1
  import i from "classnames";
2
- import { bt as s, b0 as v } from "./form-BUqSKOvc.js";
2
+ import { br as s, a_ as v } from "./form-CCQN_rPn.js";
3
3
  const x = ({ globalClasses: e, moduleClasses: r }) => {
4
4
  var d;
5
5
  const c = ((d = s(...v(e))) == null ? void 0 : d.split(/\s+/)) ?? [], o = [
@@ -1,6 +1,6 @@
1
- import { bA as n } from "./form-BUqSKOvc.js";
2
- import { s as e } from "./field-rac.module-DP0lkkEv.js";
3
- import { u } from "./use-element-state-class-name-DlncY4hk.js";
1
+ import { by as n } from "./form-CCQN_rPn.js";
2
+ import { s as e } from "./field-rac.module-ts2t4WUO.js";
3
+ import { u } from "./use-element-state-class-name-C2tQgxUX.js";
4
4
  const b = (s, a) => {
5
5
  const { disabled: t, readOnly: o } = n(), r = u({
6
6
  globalClasses: s,
@@ -1,6 +1,6 @@
1
1
  import { useContext as c, useMemo as i } from "react";
2
- import { bu as r, aG as a, bs as u, F as o } from "./form-BUqSKOvc.js";
3
- const d = [
2
+ import { bs as r, aE as a, bq as d, F as o } from "./form-CCQN_rPn.js";
3
+ const u = [
4
4
  o.DROPDOWN,
5
5
  o.DEXT_DROPDOWN,
6
6
  o.SERVICES_DROPDOWN,
@@ -26,8 +26,8 @@ const d = [
26
26
  }, I = ({ properties: e }) => {
27
27
  var n, t;
28
28
  return ((t = (n = e.fieldSettings) == null ? void 0 : n.country) == null ? void 0 : t.show) !== !1;
29
- }, P = (e, n) => O.includes(e.fieldType) && !n && _(e), l = (e) => p.includes(e.fieldType) ? I(e) : d.includes(e.fieldType), S = (e) => T.includes(e.fieldType), C = ({ properties: e }) => !e.disabled && !e.readOnly, E = (e) => {
30
- const n = c(a), { isMobile: t = !1 } = u();
29
+ }, P = (e, n) => O.includes(e.fieldType) && !n && _(e), l = (e) => p.includes(e.fieldType) ? I(e) : u.includes(e.fieldType), S = (e) => T.includes(e.fieldType), C = ({ properties: e }) => !e.disabled && !e.readOnly, E = (e) => {
30
+ const n = c(a), { isMobile: t = !1 } = d();
31
31
  return i(() => !n || n.parentId ? [] : n.fields.filter((s) => e(s, t) && C(s)).map((s) => s.id), [
32
32
  n,
33
33
  t,
@@ -1,6 +1,6 @@
1
1
  import { useState as o, useCallback as y, useEffect as m, useMemo as D } from "react";
2
- import { bz as v } from "./form-BUqSKOvc.js";
3
- const k = (I) => {
2
+ import { bx as v } from "./form-CCQN_rPn.js";
3
+ const S = (I) => {
4
4
  const { fieldType: L, isEditor: t = !1, postProcessOptions: i, customFetchLogic: a, onInitialDataLoaded: n } = I, [O, h] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(L), r = y((e) => {
5
5
  let d = e.map((l) => ({
6
6
  value: l.id ?? "",
@@ -44,5 +44,5 @@ const k = (I) => {
44
44
  };
45
45
  };
46
46
  export {
47
- k as u
47
+ S as u
48
48
  };
@@ -0,0 +1,6 @@
1
+ import { am as a } from "./form-CCQN_rPn.js";
2
+ import { u as e } from "./use-hoverable-input-class-name-C8iuzofb.js";
3
+ const t = (...s) => e(a, s);
4
+ export {
5
+ t as u
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/form-elements",
3
- "version": "1.161.0",
3
+ "version": "1.163.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": [
@@ -156,5 +156,5 @@
156
156
  ]
157
157
  }
158
158
  },
159
- "falconPackageHash": "4e52da43abe6970aa777385ba13b7dd06003f37016d904acd97f4b33"
159
+ "falconPackageHash": "6823676e1ea17bc253e861f4a6ad3eabfbf40c9c6bacea192dc6c282"
160
160
  }
@@ -1,25 +0,0 @@
1
- const t = "_label_t702n_1", o = "_requiredMark_t702n_11", e = "_input_t702n_16", n = "_inputGroup_t702n_17", c = "_inputHover_t702n_70", _ = "_innerInput_t702n_151", r = "_dropdownTrigger_t702n_201", p = "_dropdownIcon_t702n_211", s = "_dropdownPopover_t702n_230", i = "_selectPopover_t702n_236", u = "_selectOption_t702n_263", d = "_selectOptionHover_t702n_286", l = "_selectOptionSelected_t702n_290", h = "_selectOptionWithoutFocusRing_t702n_294", b = "_description_t702n_300", k = "_error_t702n_316", v = "_checkbox_t702n_335", I = "_checkboxInput_t702n_358", x = "_checkboxInputSelected_t702n_397", O = "_checkboxInputHover_t702n_401", g = {
2
- label: t,
3
- requiredMark: o,
4
- input: e,
5
- inputGroup: n,
6
- inputHover: c,
7
- innerInput: _,
8
- dropdownTrigger: r,
9
- dropdownIcon: p,
10
- dropdownPopover: s,
11
- selectPopover: i,
12
- selectOption: u,
13
- selectOptionHover: d,
14
- selectOptionSelected: l,
15
- selectOptionWithoutFocusRing: h,
16
- description: b,
17
- error: k,
18
- checkbox: v,
19
- checkboxInput: I,
20
- checkboxInputSelected: x,
21
- checkboxInputHover: O
22
- };
23
- export {
24
- g as s
25
- };
@@ -1,155 +0,0 @@
1
- import e, { useMemo as H, useCallback as T, useRef as G } from "react";
2
- import { RicosViewer as k } from "@wix/ricos/viewer";
3
- import I from "classnames";
4
- import { bA as b, bx as x, bC as P, bt as B, W as q, ac as U, S as w, U as V, M as z, G as K, T as Q, f } from "./form-BUqSKOvc.js";
5
- import { CheckboxGroup as W, CheckboxField as Y, CheckboxButton as $ } from "react-aria-components";
6
- import { f as m, a as F } from "./find-child-C60k4CxG.js";
7
- import { L as j, g as J } from "./field-label-headless-BRTLT2Yt.js";
8
- import { D as X, E as Z } from "./field-error-headless-XnVcMmsL.js";
9
- import { F as ee } from "./fieldset-headless-CD3fds9J.js";
10
- import { E as te } from "./error-icon-hZxQ6DEy.js";
11
- import { s as O } from "./field-rac.module-DP0lkkEv.js";
12
- import { u as oe } from "./use-element-state-class-name-DlncY4hk.js";
13
- const o = ({ children: t, className: n }) => {
14
- const { id: s, value: a, onChange: i, disabled: l, readOnly: r, required: c, onBlur: u, onFocus: p, hasError: C, FieldLayout: L } = b(), { inputId: g, labelId: _, ariaDescribedBy: N } = x(), R = m(t, o.Label), S = m(t, o.Options), A = m(t, o.Description), D = m(t, o.Error), M = H(() => a || [], [
15
- a
16
- ]), v = T((y) => {
17
- i == null || i(y);
18
- }, [
19
- i
20
- ]);
21
- return /* @__PURE__ */ e.createElement(L, {
22
- fieldId: s,
23
- renderLabel: () => R,
24
- renderInput: () => /* @__PURE__ */ e.createElement(ee, {
25
- id: g,
26
- ariaLabelledBy: _,
27
- ariaDescribedBy: N,
28
- required: c,
29
- onBlur: u,
30
- onFocus: p
31
- }, /* @__PURE__ */ e.createElement(W, {
32
- className: n,
33
- "aria-labelledby": _,
34
- value: M,
35
- onChange: v,
36
- isDisabled: l,
37
- isReadOnly: r,
38
- isRequired: c,
39
- isInvalid: C
40
- }, S)),
41
- renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, D, A)
42
- });
43
- }, h = ({ children: t, className: n }) => {
44
- const { id: s, options: a, numberOfColumns: i } = b(), l = m(t, h.Option);
45
- return /* @__PURE__ */ e.createElement("div", {
46
- className: n,
47
- "data-columns": i
48
- }, a == null ? void 0 : a.map((r, c) => F(l, {
49
- key: r.id || r.label,
50
- option: r,
51
- isFirst: c === 0,
52
- fieldId: s
53
- })));
54
- }, ae = ({ className: t }) => /* @__PURE__ */ e.createElement("div", {
55
- "aria-hidden": "true",
56
- className: t
57
- }), ne = ({ className: t, ...n }) => {
58
- var u, p;
59
- const { option: s } = n, { choiceImageResize: a, choiceImageAlignment: i } = b(), l = (u = s.media) == null ? void 0 : u.image, r = l && J(l, l.width, l.height);
60
- if (!l || !r)
61
- return /* @__PURE__ */ e.createElement("div", {
62
- className: t,
63
- "data-placeholder": !0,
64
- "data-hook": "image-choice-option-image"
65
- });
66
- const c = ((p = s.media) == null ? void 0 : p.altText) || s.altText || l.altText || "";
67
- return /* @__PURE__ */ e.createElement("img", {
68
- className: t,
69
- src: r,
70
- alt: c,
71
- "data-fit": a,
72
- "data-alignment": i,
73
- "data-hook": "image-choice-option-image"
74
- });
75
- }, se = ({ className: t, ...n }) => {
76
- const { option: s } = n;
77
- return !s.label || s.isLabelHidden ? null : /* @__PURE__ */ e.createElement("span", {
78
- className: t
79
- }, s.label);
80
- }, E = ({ children: t, className: n, ...s }) => {
81
- const { option: a, isFirst: i = !1, fieldId: l } = s, { disabled: r, readOnly: c, hasError: u } = b(), p = G(null);
82
- P(() => {
83
- var _;
84
- i && ((_ = p.current) == null || _.focus({
85
- preventScroll: !0
86
- }));
87
- }, l);
88
- const C = m(t, E.Input), L = m(t, E.Image), g = m(t, E.Label);
89
- return /* @__PURE__ */ e.createElement(Y, {
90
- value: a.label,
91
- isDisabled: r,
92
- isReadOnly: c,
93
- isInvalid: u
94
- }, /* @__PURE__ */ e.createElement($, {
95
- ref: p,
96
- "aria-label": a.isLabelHidden ? a.label : void 0,
97
- className: n,
98
- "data-hook": `image-choice-${a.label}`
99
- }, C, F(L, {
100
- option: a
101
- }), F(g, {
102
- option: a
103
- })));
104
- };
105
- E.Input = ae;
106
- E.Image = ne;
107
- E.Label = se;
108
- o.Label = j;
109
- o.Options = h;
110
- h.Option = E;
111
- o.Description = X;
112
- o.Error = Z;
113
- const le = "_options_1h2d0_1", ie = "_optionInput_1h2d0_33", re = "_option_1h2d0_1", ce = "_optionHover_1h2d0_67", me = "_optionSelected_1h2d0_67", pe = "_optionLabel_1h2d0_107", de = "_optionImage_1h2d0_152", d = {
114
- options: le,
115
- optionInput: ie,
116
- option: re,
117
- optionHover: ce,
118
- optionSelected: me,
119
- optionLabel: pe,
120
- optionImage: de
121
- }, Ee = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(k, {
122
- content: t,
123
- locale: n
124
- }), ue = {
125
- base: d.option,
126
- selected: d.optionSelected,
127
- hover: d.optionHover
128
- }, Ie = () => {
129
- const t = oe({
130
- globalClasses: Q,
131
- moduleClasses: ue
132
- }), n = B(f.IMAGE_CHOICE, f.IMAGE_CHOICE_OPTION, f.IMAGE_CHOICE_OPTION_IMAGE);
133
- return /* @__PURE__ */ e.createElement(o, null, /* @__PURE__ */ e.createElement(o.Label, {
134
- className: I(q, O.label)
135
- }, /* @__PURE__ */ e.createElement(o.Label.Required, {
136
- className: I(U, O.requiredMark)
137
- })), /* @__PURE__ */ e.createElement(o.Options, {
138
- className: I(w, d.options)
139
- }, /* @__PURE__ */ e.createElement(o.Options.Option, {
140
- className: t
141
- }, /* @__PURE__ */ e.createElement(o.Options.Option.Input, {
142
- className: d.optionInput
143
- }), /* @__PURE__ */ e.createElement(o.Options.Option.Image, {
144
- className: I(V, d.optionImage, n)
145
- }), /* @__PURE__ */ e.createElement(o.Options.Option.Label, {
146
- className: d.optionLabel
147
- }))), /* @__PURE__ */ e.createElement(o.Error, {
148
- className: I(z, O.error)
149
- }, /* @__PURE__ */ e.createElement(te, null), /* @__PURE__ */ e.createElement(o.Error.Text, null)), /* @__PURE__ */ e.createElement(o.Description, {
150
- className: I(K, O.description)
151
- }, Ee));
152
- }, Ae = () => /* @__PURE__ */ e.createElement(Ie, null);
153
- export {
154
- Ae as ImageChoiceRAC
155
- };
@@ -1,77 +0,0 @@
1
- import { RicosViewer as N } from "@wix/ricos/viewer";
2
- import c from "classnames";
3
- import r, { useCallback as h, useRef as O } from "react";
4
- import { TextField as y, Input as A } from "react-aria-components";
5
- import { bA as d, bx as E, bC as v, W as B, ac as M, M as T, G as g } from "./form-BUqSKOvc.js";
6
- import { f as i } from "./find-child-C60k4CxG.js";
7
- import { D as k, E as x } from "./field-error-headless-XnVcMmsL.js";
8
- import { L as P } from "./field-label-headless-BRTLT2Yt.js";
9
- import { u as q } from "./use-invoke-callback-UH73A_J3.js";
10
- import { E as U } from "./error-icon-hZxQ6DEy.js";
11
- import { s as u } from "./field-rac.module-DP0lkkEv.js";
12
- import { u as W } from "./use-text-input-class-name-D9tJTR-b.js";
13
- const w = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
14
- const { id: o, value: l, onChange: n, disabled: m, readOnly: s, required: a, hasError: I, onBlur: b, onFocus: f, FieldLayout: R } = d(), { labelId: F } = E(), p = q(b), L = i(t, e.Label), D = i(t, e.Input), C = i(t, e.Description), _ = i(t, e.Error), S = h(() => {
15
- n(w(l)), p();
16
- }, [
17
- p,
18
- n,
19
- l
20
- ]);
21
- return /* @__PURE__ */ r.createElement(R, {
22
- fieldId: o,
23
- renderLabel: () => L,
24
- renderInput: () => /* @__PURE__ */ r.createElement(y, {
25
- "aria-labelledby": F,
26
- value: l ?? "",
27
- onChange: n,
28
- isDisabled: m,
29
- isReadOnly: s,
30
- isRequired: a,
31
- isInvalid: I,
32
- onBlur: S,
33
- onFocus: f
34
- }, D),
35
- renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, C)
36
- });
37
- }, V = ({ className: t }) => {
38
- const { id: o, placeholder: l } = d(), { inputId: n, ariaDescribedBy: m } = E(), s = O(null);
39
- return v(() => {
40
- var a;
41
- (a = s.current) == null || a.focus({
42
- preventScroll: !0
43
- });
44
- }, o), /* @__PURE__ */ r.createElement(A, {
45
- ref: s,
46
- id: n,
47
- type: "url",
48
- autoComplete: "url",
49
- "aria-describedby": m,
50
- className: t,
51
- placeholder: l
52
- });
53
- };
54
- e.Label = P;
55
- e.Input = V;
56
- e.Description = k;
57
- e.Error = x;
58
- const $ = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(N, {
59
- content: t,
60
- locale: o
61
- }), te = () => {
62
- const t = W();
63
- return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
64
- className: c(B, u.label)
65
- }, /* @__PURE__ */ r.createElement(e.Label.Required, {
66
- className: c(M, u.requiredMark)
67
- })), /* @__PURE__ */ r.createElement(e.Input, {
68
- className: t
69
- }), /* @__PURE__ */ r.createElement(e.Error, {
70
- className: c(T, u.error)
71
- }, /* @__PURE__ */ r.createElement(U, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
72
- className: c(g, u.description)
73
- }, $));
74
- };
75
- export {
76
- te as U
77
- };
@@ -1,6 +0,0 @@
1
- import { ao as a } from "./form-BUqSKOvc.js";
2
- import { u as e } from "./use-hoverable-input-class-name-C__zqP5j.js";
3
- const m = (...s) => e(a, s);
4
- export {
5
- m as u
6
- };