@wix/form-elements 1.158.0 → 1.160.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 (117) hide show
  1. package/dist/component/{appointment-rac-m5-FH9kU.js → appointment-rac-BmHu56e5.js} +63 -63
  2. package/dist/component/{bookings-address-rac-VtG7wH0l.js → bookings-address-rac-DY9l2g0h.js} +1 -1
  3. package/dist/component/{bookings-email-rac-C8T3aTQH.js → bookings-email-rac-B5vNSOsS.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-BlhIWWNj.js → bookings-first-name-rac-CJiefCNz.js} +1 -1
  5. package/dist/component/{bookings-header-rac-adwR7PKJ.js → bookings-header-rac-BFu7Ko5w.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-z5z1GJQL.js → bookings-last-name-rac-DegMM13h.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-DMgVxy8J.js → bookings-login-bar-rac-DrA-5tBH.js} +7 -7
  8. package/dist/component/{bookings-phone-rac-DS7ffO6T.js → bookings-phone-rac-DsaeqxCI.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-BNWI0o60.js → bookings-rich-text-rac-jRHiwqi8.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-CUKZ9NHF.js → checkbox-field-rac-CyoBb6Yf.js} +43 -43
  11. package/dist/component/{checkbox-group-field-headless-Didam2ZD.js → checkbox-group-field-headless-Bv1gU3oL.js} +54 -54
  12. package/dist/component/{checkbox-group-field-rac-C3WCeVA8.js → checkbox-group-field-rac-DasArcdV.js} +6 -6
  13. package/dist/component/{checkbox-group-rac-Bkq-wm7_.js → checkbox-group-rac-CzmufV1U.js} +1 -1
  14. package/dist/component/{checkbox-rac-66ga9Lph.js → checkbox-rac-6C7XoUoZ.js} +1 -1
  15. package/dist/component/{contacts-address-rac-DSOk97te.js → contacts-address-rac-BZobbFtz.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-1qguKm9O.js → contacts-birthdate-rac-DIzf41DS.js} +1 -1
  17. package/dist/component/{contacts-company-rac-Chefzmw3.js → contacts-company-rac-BiBDO28r.js} +1 -1
  18. package/dist/component/{contacts-email-rac-DG6eAnz2.js → contacts-email-rac-5mqokCSD.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-tSGE0w5w.js → contacts-first-name-rac-BXe3_Nz5.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-BjZWfbM5.js → contacts-last-name-rac-Cfqgh7u1.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-jfGNKLoZ.js → contacts-phone-rac-cmLUWnAc.js} +1 -1
  22. package/dist/component/{contacts-position-rac-kv8I-m_Q.js → contacts-position-rac-DTyvklfN.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-BkUG0AMs.js → contacts-subscribe-rac-D-ZEX1A3.js} +1 -1
  24. package/dist/component/{contacts-tax-id-rac-BtFrK_Ci.js → contacts-tax-id-rac-B4NYJwWt.js} +1 -1
  25. package/dist/component/{date-availability-_A9DS6za.js → date-availability-Dach9aRC.js} +1 -1
  26. package/dist/component/date-input-field-rac-B72mHcya.js +309 -0
  27. package/dist/component/{date-input-rac-CpseQkV4.js → date-input-rac-CYix11gT.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-B4gjhxG6.js → date-picker-field-rac-B8pvtPir.js} +86 -86
  29. package/dist/component/{date-picker-rac-DDJfUDCM.js → date-picker-rac-D6cR0zH9.js} +1 -1
  30. package/dist/component/date-time-input-field-rac-B7Y3Yf5l.js +441 -0
  31. package/dist/component/{date-time-input-rac-BkvcyU3H.js → date-time-input-rac-DMN-noQX.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-UWDhIjU-.js → dext-checkbox-group-rac-Kq0GnteP.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-q9UJnqsC.js → dext-checkbox-rac-BY9GZ4n1.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-C164FDSF.js → dext-date-picker-rac-CXArIddp.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-BvbnfRYU.js → dext-date-time-input-rac-B39TtxGq.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-z0xU1mRO.js → dext-dropdown-rac-C3y0G8cS.js} +1 -1
  37. package/dist/component/{dext-email-rac-BkiWpfNw.js → dext-email-rac-BIg3cq7Q.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-DeQWO-RK.js → dext-number-input-rac-27sHJ7yN.js} +1 -1
  39. package/dist/component/{dext-phone-rac-CGlVpadW.js → dext-phone-rac-CcohoFQp.js} +1 -1
  40. package/dist/component/dext-radio-group-rac-eead3Gve.js +18 -0
  41. package/dist/component/{dext-rating-input-rac-ibIctxU_.js → dext-rating-input-rac-B_E6OcBr.js} +1 -1
  42. package/dist/component/{dext-tags-rac-snCgM6u0.js → dext-tags-rac-Yd9aAtnF.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-BHVs8ixR.js → dext-text-area-rac-CMACri2C.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-DGI747Od.js → dext-text-input-rac-sNjSCfQ-.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-CpO2VDPE.js → dext-url-input-rac-DwhbzJty.js} +1 -1
  46. package/dist/component/{donation-rac-Ck6HkRcW.js → donation-rac-BVAN3kMk.js} +90 -90
  47. package/dist/component/{dropdown-field-rac-e5MjWn5B.js → dropdown-field-rac-DdoGigWx.js} +14 -14
  48. package/dist/component/{dropdown-rac-B2jprC8G.js → dropdown-rac-CRkt5w47.js} +1 -1
  49. package/dist/component/{ecom-address-rac-D0stOqRv.js → ecom-address-rac-C36hFHW0.js} +1 -1
  50. package/dist/component/{ecom-subscription-checkbox-rac-BRzaQKx3.js → ecom-subscription-checkbox-rac-BKfQ348w.js} +2 -2
  51. package/dist/component/{email-input-field-rac-0UIjNipg.js → email-input-field-rac-MOaISYxa.js} +59 -59
  52. package/dist/component/{events-repeater-rac-BBQZzP7U.js → events-repeater-rac-D6p-NgE8.js} +20 -20
  53. package/dist/component/{events-rsvp-rac-Ck7BXGKy.js → events-rsvp-rac-DVpgN8gm.js} +18 -18
  54. package/dist/component/{field-error-headless-vApyo-y9.js → field-error-headless-XNWmDH3E.js} +4 -4
  55. package/dist/component/{field-label-headless-C8-ShLxy.js → field-label-headless-CORRAJGt.js} +4 -4
  56. package/dist/component/{file-upload-rac-BzWJOM6C.js → file-upload-rac-DRMr7E4b.js} +89 -89
  57. package/dist/component/{fixed-payment-rac-C4_xI103.js → fixed-payment-rac-BUXzNex9.js} +18 -18
  58. package/dist/component/{form-D7ulDPh1.js → form-DSpx-AO8.js} +785 -728
  59. package/dist/component/form.css +1 -1
  60. package/dist/component/form.js +1 -1
  61. package/dist/component/{header-field-rac-BnBbhsOZ.js → header-field-rac-CiDXlNsa.js} +6 -6
  62. package/dist/component/{header-rac-CEWayr6b.js → header-rac-B5Rg-h8u.js} +1 -1
  63. package/dist/component/{image-choice-rac-DTZrz6oP.js → image-choice-rac-CtoA_KDp.js} +44 -44
  64. package/dist/component/{index-CKtw7kvn.js → index-Bz7ZhQsF.js} +53 -53
  65. package/dist/component/{index-DBbgIHYT.js → index-CwruESwc.js} +5 -5
  66. package/dist/component/{isObjectLike-BHfPE26c.js → isObjectLike-C5dHxHP0.js} +11 -11
  67. package/dist/component/multiline-address-field-rac-Z-qF366L.js +1664 -0
  68. package/dist/component/{multiline-address-rac-YQj_QROS.js → multiline-address-rac-CJIHTMw5.js} +1 -1
  69. package/dist/component/{number-input-field-rac-A7xM2c6F.js → number-input-field-rac-D4vf6I6N.js} +29 -29
  70. package/dist/component/{number-input-rac-DeDatLY5.js → number-input-rac-B2jW6JUQ.js} +1 -1
  71. package/dist/component/{password-rac-7Si7JHee.js → password-rac-DGRZ17Jl.js} +29 -29
  72. package/dist/component/{payment-input-rac-D4JKZl-5.js → payment-input-rac-BtD-tAKv.js} +27 -27
  73. package/dist/component/phone-input-field-rac-KD4-APhr.js +512 -0
  74. package/dist/component/{phone-rac-Y2mWnseb.js → phone-rac-Cw2yccgg.js} +1 -1
  75. package/dist/component/{product-list-rac-CYUcNqf3.js → product-list-rac-XbzTDdbp.js} +33 -33
  76. package/dist/component/{quiz-radio-group-rac-f3O7fksW.js → quiz-radio-group-rac-BDw_mAw5.js} +1 -1
  77. package/dist/component/{radio-button-module-classes-BgVUqcvD.js → radio-button-module-classes-CFGf0Hzh.js} +23 -23
  78. package/dist/component/{radio-group-field-rac-DrOiyk5C.js → radio-group-field-rac-CXN7tyVu.js} +6 -6
  79. package/dist/component/{radio-group-rac-Btt_bz_K.js → radio-group-rac-COHzqjBh.js} +1 -1
  80. package/dist/component/{rating-input-field-rac-CwN7wyaw.js → rating-input-field-rac-DCXNZgf1.js} +37 -37
  81. package/dist/component/{rating-input-rac-sTy0SV3L.js → rating-input-rac-DwQt9ML7.js} +1 -1
  82. package/dist/component/{rich-content-rac.module-C11w9mXa.js → rich-content-rac.module-B7rPwNns.js} +8 -8
  83. package/dist/component/{rich-text-field-rac-kGwuDtNs.js → rich-text-field-rac-DlER7NRD.js} +4 -4
  84. package/dist/component/{rich-text-rac-T4ic2hrA.js → rich-text-rac-CjicsHA7.js} +1 -1
  85. package/dist/component/service-dropdown-rac-B81LC_6_.js +145 -0
  86. package/dist/component/{services-multi-choice-rac-CLQ4dLxO.js → services-multi-choice-rac-BR6gZeHk.js} +16 -16
  87. package/dist/component/{signature-rac-DLiFeCNL.js → signature-rac-XFj7Ddtp.js} +69 -69
  88. package/dist/component/{submit-button-rac-CccO80E1.js → submit-button-rac-Bz7zs_3W.js} +12 -12
  89. package/dist/component/{tags-field-rac-DaghCGJU.js → tags-field-rac-DWWkNKqc.js} +79 -79
  90. package/dist/component/{tags-rac-3ly5shW2.js → tags-rac-BXyiQ9i1.js} +1 -1
  91. package/dist/component/{text-area-field-rac-2-TYC5Lb.js → text-area-field-rac-DsIRYi0d.js} +21 -21
  92. package/dist/component/{text-area-rac-Bx0pgw80.js → text-area-rac-CF9pDP9d.js} +1 -1
  93. package/dist/component/{text-input-field-rac-Dyur2Wby.js → text-input-field-rac-BwIDZACz.js} +5 -5
  94. package/dist/component/{text-input-headless-DZ-Pjpm4.js → text-input-headless-5kQs2_Xu.js} +14 -14
  95. package/dist/component/{text-input-rac-BuBtJDX_.js → text-input-rac-CRmSuw1k.js} +1 -1
  96. package/dist/component/{time-input-rac-AlDEpfXZ.js → time-input-rac-BRMNpe51.js} +20 -20
  97. package/dist/component/{url-input-field-rac-BzP4-8yP.js → url-input-field-rac-CKLS3QDk.js} +17 -17
  98. package/dist/component/{url-input-rac-DaBXuedf.js → url-input-rac-Dv-kp50D.js} +1 -1
  99. package/dist/component/use-dropdown-option-class-name-BQi_qE_-.js +116 -0
  100. package/dist/component/use-dropdown-trigger-class-name-bAK8aHiG.js +96 -0
  101. package/dist/component/{use-element-state-class-name-DY0UyIQg.js → use-element-state-class-name-rXM_lHug.js} +1 -1
  102. package/dist/component/{use-hoverable-input-class-name-C_Wh4Qfc.js → use-hoverable-input-class-name-BnV_uerV.js} +2 -2
  103. package/dist/component/use-is-forced-open-dropdown-Bp-5Xpmw.js +53 -0
  104. package/dist/component/{use-service-options-base-DgSaAuGy.js → use-service-options-base-CLeE9-Tx.js} +10 -10
  105. package/dist/component/use-text-input-class-name-DIKWvfkm.js +6 -0
  106. package/dist/form.d.ts +8 -0
  107. package/package.json +2 -2
  108. package/dist/component/date-input-field-rac-QZUxFX5e.js +0 -303
  109. package/dist/component/date-time-input-field-rac-DcwKQKHf.js +0 -433
  110. package/dist/component/dext-radio-group-rac-D8hMWNIQ.js +0 -18
  111. package/dist/component/dropdown-field-headless-Bv6LrkeA.js +0 -93
  112. package/dist/component/multiline-address-field-rac-jhcWn4wT.js +0 -1659
  113. package/dist/component/phone-input-field-rac-GxcQ_Pyl.js +0 -508
  114. package/dist/component/service-dropdown-rac-BfliE4hs.js +0 -145
  115. package/dist/component/use-dropdown-trigger-class-name-BKOFwNvc.js +0 -117
  116. package/dist/component/use-is-forced-open-dropdown-Bw_IFUKt.js +0 -48
  117. package/dist/component/use-text-input-class-name-DFMQAg_E.js +0 -6
@@ -1,18 +1,18 @@
1
- import e, { useCallback as v, useRef as V, useContext as q } from "react";
2
- import { RicosViewer as x } from "@wix/ricos/viewer";
1
+ import e, { useCallback as V, useRef as v, useContext as x } from "react";
2
+ import { RicosViewer as B } from "@wix/ricos/viewer";
3
3
  import m from "classnames";
4
- import { parseTime as B } from "@internationalized/date";
5
- import { TimeField as k, DateInput as U, DateSegment as _, TimeFieldStateContext as w } from "react-aria-components";
6
- import { bo as p, bl as j, by as T, bq as Q, R as z, a0 as G, H as J, v as K } from "./form-D7ulDPh1.js";
4
+ import { parseTime as q } from "@internationalized/date";
5
+ import { TimeField as k, DateInput as w, DateSegment as _, TimeFieldStateContext as U } from "react-aria-components";
6
+ import { bz as p, bw as z, bJ as T, bB as j, V as J, ab as Q, L as G, z as K } from "./form-DSpx-AO8.js";
7
7
  import { f as u, a as F } from "./find-child-C60k4CxG.js";
8
- import { D as W, E as X } from "./field-error-headless-vApyo-y9.js";
9
- import { L as Y } from "./field-label-headless-C8-ShLxy.js";
8
+ import { D as W, E as X } from "./field-error-headless-XNWmDH3E.js";
9
+ import { L as Y } from "./field-label-headless-CORRAJGt.js";
10
10
  import { E as Z } from "./error-icon-hZxQ6DEy.js";
11
11
  import { H as S } from "./custom-focus-class-_483Pkwp.js";
12
12
  import { s as f } from "./field-rac.module-DP0lkkEv.js";
13
- import { u as $ } from "./use-text-input-class-name-DFMQAg_E.js";
13
+ import { u as $ } from "./use-text-input-class-name-DIKWvfkm.js";
14
14
  const r = ({ children: t }) => {
15
- const { id: n, value: s, onChange: a, disabled: i, readOnly: o, required: c, onBlur: l, onFocus: E, use24HourFormat: b, FieldLayout: C, hasError: g } = p(), { inputId: I, ariaDescribedBy: R, labelId: D } = j(), L = v((M) => {
15
+ const { id: n, value: s, onChange: a, disabled: i, readOnly: o, required: c, onBlur: l, onFocus: E, use24HourFormat: b, FieldLayout: C, hasError: g } = p(), { inputId: I, ariaDescribedBy: L, labelId: D } = z(), R = V((M) => {
16
16
  const H = ae(M);
17
17
  a(H);
18
18
  }, [
@@ -24,9 +24,9 @@ const r = ({ children: t }) => {
24
24
  renderInput: () => /* @__PURE__ */ e.createElement(k, {
25
25
  "aria-labelledby": D,
26
26
  id: I,
27
- "aria-describedby": R,
27
+ "aria-describedby": L,
28
28
  value: O,
29
- onChange: L,
29
+ onChange: R,
30
30
  isDisabled: i,
31
31
  isReadOnly: o,
32
32
  isInvalid: g,
@@ -39,7 +39,7 @@ const r = ({ children: t }) => {
39
39
  });
40
40
  }, d = ({ children: t, className: n }) => {
41
41
  const { hasError: s, hidePlaceholder: a } = p(), i = u(t, d.Hour), o = u(t, d.Minute), c = u(t, d.Period);
42
- return /* @__PURE__ */ e.createElement(U, {
42
+ return /* @__PURE__ */ e.createElement(w, {
43
43
  className: n,
44
44
  "data-invalid": s || void 0,
45
45
  "data-placeholder-hidden": a || void 0
@@ -66,8 +66,8 @@ const r = ({ children: t }) => {
66
66
  }
67
67
  });
68
68
  }, ee = ({ className: t, ...n }) => {
69
- const { id: s, hidePlaceholder: a } = p(), { segment: i } = n, { t: o } = T(), c = V(null);
70
- Q(() => {
69
+ const { id: s, hidePlaceholder: a } = p(), { segment: i } = n, { t: o } = T(), c = v(null);
70
+ j(() => {
71
71
  var E;
72
72
  (E = c.current) == null || E.focus({
73
73
  preventScroll: !0
@@ -92,7 +92,7 @@ const r = ({ children: t }) => {
92
92
  }
93
93
  });
94
94
  }, re = ({ className: t, ...n }) => {
95
- const { hidePlaceholder: s } = p(), { segment: a } = n, { t: i } = T(), o = q(w), c = s ? void 0 : i("field.date.placeholder.period"), l = () => o == null ? void 0 : o.increment("dayPeriod");
95
+ const { hidePlaceholder: s } = p(), { segment: a } = n, { t: i } = T(), o = x(U), c = s ? void 0 : i("field.date.placeholder.period"), l = () => o == null ? void 0 : o.increment("dayPeriod");
96
96
  return /* @__PURE__ */ e.createElement(_, {
97
97
  segment: a,
98
98
  className: t,
@@ -113,7 +113,7 @@ function ne(t) {
113
113
  if (!t)
114
114
  return null;
115
115
  try {
116
- return B(t);
116
+ return q(t);
117
117
  } catch {
118
118
  return null;
119
119
  }
@@ -133,15 +133,15 @@ const oe = "_time_5p151_1", le = "_hour_5p151_17", se = "_minute_5p151_18", ie =
133
133
  hour: le,
134
134
  minute: se,
135
135
  period: ie
136
- }, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(x, {
136
+ }, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(B, {
137
137
  content: t,
138
138
  locale: n
139
139
  }), me = () => {
140
140
  const t = $(h.time);
141
141
  return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
142
- className: m(z, f.label)
142
+ className: m(J, f.label)
143
143
  }, /* @__PURE__ */ e.createElement(r.Label.Required, {
144
- className: m(G, f.requiredMark)
144
+ className: m(Q, f.requiredMark)
145
145
  })), /* @__PURE__ */ e.createElement(r.Time, {
146
146
  className: t
147
147
  }, /* @__PURE__ */ e.createElement(r.Time.Hour, {
@@ -151,7 +151,7 @@ const oe = "_time_5p151_1", le = "_hour_5p151_17", se = "_minute_5p151_18", ie =
151
151
  }), /* @__PURE__ */ e.createElement(r.Time.Period, {
152
152
  className: m(h.period, S)
153
153
  })), /* @__PURE__ */ e.createElement(r.Error, {
154
- className: m(J, f.error)
154
+ className: m(G, f.error)
155
155
  }, /* @__PURE__ */ e.createElement(Z, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
156
156
  className: m(K, f.description)
157
157
  }, ce));
@@ -2,27 +2,27 @@ import { RicosViewer as N } from "@wix/ricos/viewer";
2
2
  import i from "classnames";
3
3
  import r, { useCallback as h, useRef as O } from "react";
4
4
  import { TextField as y, Input as A } from "react-aria-components";
5
- import { bo as d, bl as E, bq as v, R as B, a0 as T, H as g, v as k } from "./form-D7ulDPh1.js";
5
+ import { bz as d, bw as E, bB as B, V as v, ab as T, L as g, z as k } from "./form-DSpx-AO8.js";
6
6
  import { f as c } from "./find-child-C60k4CxG.js";
7
- import { D as q, E as M } from "./field-error-headless-vApyo-y9.js";
8
- import { L as P } from "./field-label-headless-C8-ShLxy.js";
7
+ import { D as M, E as P } from "./field-error-headless-XNWmDH3E.js";
8
+ import { L as q } from "./field-label-headless-CORRAJGt.js";
9
9
  import { u as x } from "./use-invoke-callback-UH73A_J3.js";
10
10
  import { E as U } from "./error-icon-hZxQ6DEy.js";
11
11
  import { s as u } from "./field-rac.module-DP0lkkEv.js";
12
- import { u as w } from "./use-text-input-class-name-DFMQAg_E.js";
13
- const H = (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 = x(b), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), S = h(() => {
15
- n(H(l)), p();
12
+ import { u as w } from "./use-text-input-class-name-DIKWvfkm.js";
13
+ const V = (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: L } = d(), { labelId: R } = E(), p = x(b), F = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), S = h(() => {
15
+ n(V(l)), p();
16
16
  }, [
17
17
  p,
18
18
  n,
19
19
  l
20
20
  ]);
21
- return /* @__PURE__ */ r.createElement(R, {
21
+ return /* @__PURE__ */ r.createElement(L, {
22
22
  fieldId: o,
23
- renderLabel: () => L,
23
+ renderLabel: () => F,
24
24
  renderInput: () => /* @__PURE__ */ r.createElement(y, {
25
- "aria-labelledby": F,
25
+ "aria-labelledby": R,
26
26
  value: l ?? "",
27
27
  onChange: n,
28
28
  isDisabled: m,
@@ -34,9 +34,9 @@ const H = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
34
34
  }, D),
35
35
  renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, C)
36
36
  });
37
- }, V = ({ className: t }) => {
37
+ }, z = ({ className: t }) => {
38
38
  const { id: o, placeholder: l } = d(), { inputId: n, ariaDescribedBy: m } = E(), s = O(null);
39
- return v(() => {
39
+ return B(() => {
40
40
  var a;
41
41
  (a = s.current) == null || a.focus({
42
42
  preventScroll: !0
@@ -51,17 +51,17 @@ const H = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
51
51
  placeholder: l
52
52
  });
53
53
  };
54
- e.Label = P;
55
- e.Input = V;
56
- e.Description = q;
57
- e.Error = M;
54
+ e.Label = q;
55
+ e.Input = z;
56
+ e.Description = M;
57
+ e.Error = P;
58
58
  const W = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(N, {
59
59
  content: t,
60
60
  locale: o
61
61
  }), te = () => {
62
62
  const t = w();
63
63
  return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
64
- className: i(B, u.label)
64
+ className: i(v, u.label)
65
65
  }, /* @__PURE__ */ r.createElement(e.Label.Required, {
66
66
  className: i(T, u.requiredMark)
67
67
  })), /* @__PURE__ */ r.createElement(e.Input, {
@@ -1,5 +1,5 @@
1
1
  import r from "react";
2
- import { U as t } from "./url-input-field-rac-BzP4-8yP.js";
2
+ import { U as t } from "./url-input-field-rac-CKLS3QDk.js";
3
3
  const n = () => /* @__PURE__ */ r.createElement(t, null);
4
4
  export {
5
5
  n as UrlInputRAC
@@ -0,0 +1,116 @@
1
+ import d, { useContext as _, useRef as L, useState as m, Children as N, useLayoutEffect as p, useMemo as D } from "react";
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 { J as T } from "./form-DSpx-AO8.js";
6
+ import { u as H } from "./use-element-state-class-name-rXM_lHug.js";
7
+ const R = 1 / 0, I = {
8
+ position: "absolute",
9
+ width: 0,
10
+ height: "var(--popoverMaxHeight, 240px)",
11
+ visibility: "hidden",
12
+ pointerEvents: "none"
13
+ }, B = (e, n) => Object.create(e, {
14
+ [Symbol.iterator]: {
15
+ value: function* () {
16
+ let s = 0;
17
+ for (const t of e) {
18
+ if (s >= n)
19
+ return;
20
+ s += 1, yield t;
21
+ }
22
+ }
23
+ }
24
+ }), S = (e) => e.querySelector('[role="option"]') !== null, A = (e, n) => {
25
+ const s = e.getBoundingClientRect().top - e.scrollTop;
26
+ let t = 0;
27
+ for (const r of e.querySelectorAll('[role="option"]')) {
28
+ const f = r.getBoundingClientRect().top - s;
29
+ if (t > 0 && f >= n)
30
+ break;
31
+ t += 1;
32
+ }
33
+ return t;
34
+ }, X = ({ isForcedOpen: e, ...n }) => {
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
+ p(() => {
37
+ O(R);
38
+ }, [
39
+ r,
40
+ x,
41
+ b
42
+ ]), p(() => {
43
+ const o = t.current;
44
+ if (!r || !o || l !== R)
45
+ return;
46
+ const a = () => {
47
+ const c = r.getBoundingClientRect().height;
48
+ c > 0 && O(A(o, c));
49
+ };
50
+ if (S(o)) {
51
+ a();
52
+ return;
53
+ }
54
+ const i = new MutationObserver(() => {
55
+ S(o) && (i.disconnect(), a());
56
+ });
57
+ return i.observe(o, {
58
+ childList: !0,
59
+ subtree: !0
60
+ }), () => i.disconnect();
61
+ }, [
62
+ r,
63
+ l,
64
+ b
65
+ ]), p(() => {
66
+ const o = t.current;
67
+ if (!r || !o || typeof ResizeObserver > "u")
68
+ return;
69
+ const a = /* @__PURE__ */ new Map(), i = new ResizeObserver((c) => {
70
+ c.some(({ target: u, contentRect: v }) => {
71
+ const C = a.get(u);
72
+ return a.set(u, v.height), C !== void 0 && C !== v.height;
73
+ }) && w((u) => u + 1);
74
+ });
75
+ return i.observe(r), o.querySelectorAll('[role="option"]').forEach((c) => i.observe(c)), () => i.disconnect();
76
+ }, [
77
+ r,
78
+ l
79
+ ]);
80
+ const y = D(() => ({
81
+ ...E,
82
+ CollectionRoot: (o) => /* @__PURE__ */ d.createElement(E.CollectionRoot, {
83
+ ...o,
84
+ collection: B(o.collection, l)
85
+ })
86
+ }), [
87
+ l
88
+ ]);
89
+ return /* @__PURE__ */ d.createElement(g.Provider, {
90
+ value: e ? y : s
91
+ }, /* @__PURE__ */ d.createElement(M, {
92
+ ref: t,
93
+ ...n
94
+ }), e && /* @__PURE__ */ d.createElement("div", {
95
+ ref: f,
96
+ style: I
97
+ }));
98
+ }, V = {
99
+ base: h.selectOption,
100
+ selected: h.selectOptionSelected,
101
+ hover: h.selectOptionHover
102
+ }, q = ({ isSelected: e, isHovered: n, isFocused: s }) => ({
103
+ isSelected: e,
104
+ isHovered: (n || s) && !e
105
+ }), W = (e, ...n) => {
106
+ const s = H({
107
+ globalClasses: e,
108
+ moduleClasses: V
109
+ });
110
+ return (t) => P(s(q(t)), n);
111
+ }, Y = (...e) => W(T, ...e);
112
+ export {
113
+ X as V,
114
+ W as a,
115
+ Y as u
116
+ };
@@ -0,0 +1,96 @@
1
+ import n, { useState as b, useCallback as g, useRef as M } from "react";
2
+ import { UNSAFE_PortalProvider as k } from "react-aria";
3
+ import { Select as q, SelectValue as G, ListBoxItem as H } from "react-aria-components";
4
+ import { bz as E, bw as O, bB as z, K } from "./form-DSpx-AO8.js";
5
+ import { f as d, a as F } from "./find-child-C60k4CxG.js";
6
+ import { D as U, E as W } from "./field-error-headless-XNWmDH3E.js";
7
+ import { L as Y } from "./field-label-headless-CORRAJGt.js";
8
+ import { E as j, S as J, N as Q } from "./non-modal-popover-D-u13tmp.js";
9
+ import { a as X } from "./use-is-forced-open-dropdown-Bp-5Xpmw.js";
10
+ import { V as Z } from "./use-dropdown-option-class-name-BQi_qE_-.js";
11
+ import { u as $ } from "./use-hoverable-input-class-name-BnV_uerV.js";
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) => {
14
+ s || t(typeof c == "string" ? c : null);
15
+ }, [
16
+ t,
17
+ s
18
+ ]), B = g((c) => N(c && !i && !s), [
19
+ i,
20
+ s
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
+ return /* @__PURE__ */ n.createElement(L, {
23
+ fieldId: l,
24
+ renderLabel: () => V,
25
+ renderInput: () => /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("div", {
26
+ ref: R,
27
+ style: {
28
+ display: "contents"
29
+ }
30
+ }), /* @__PURE__ */ n.createElement(k, {
31
+ getContainer: () => P
32
+ }, /* @__PURE__ */ n.createElement(q, {
33
+ "aria-labelledby": h,
34
+ value: T,
35
+ isOpen: p || y && !i && !s,
36
+ onOpenChange: p ? void 0 : B,
37
+ onChange: S,
38
+ isDisabled: i,
39
+ isInvalid: I,
40
+ isRequired: v,
41
+ placeholder: m || j,
42
+ onBlur: D,
43
+ onFocus: C
44
+ }, _, F(w, {
45
+ isForcedOpen: p
46
+ })))),
47
+ renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, A, x)
48
+ });
49
+ }, ee = ({ children: e, className: l }) => {
50
+ const { inputId: a, ariaDescribedBy: o } = O(), { id: u, hasError: s, isLoading: t } = E(), m = M(null);
51
+ return z(() => {
52
+ var i;
53
+ (i = m.current) == null || i.focus({
54
+ preventScroll: !0
55
+ });
56
+ }, u), /* @__PURE__ */ n.createElement(J, {
57
+ ref: m,
58
+ id: a,
59
+ "aria-describedby": o,
60
+ className: l,
61
+ "data-invalid": s || void 0,
62
+ "data-loading": t || void 0
63
+ }, /* @__PURE__ */ n.createElement(G, null), e);
64
+ }, f = ({ children: e, className: l, ...a }) => {
65
+ const { isForcedOpen: o } = a, { options: u = [] } = E(), s = d(e, f.Option);
66
+ return /* @__PURE__ */ n.createElement(Q, {
67
+ className: l,
68
+ containerPadding: 0,
69
+ offset: 0
70
+ }, /* @__PURE__ */ n.createElement(Z, {
71
+ isForcedOpen: o,
72
+ autoFocus: o ? !1 : void 0
73
+ }, u.map((t) => F(s, {
74
+ key: t.value ?? t.label,
75
+ value: t.value ?? t.label,
76
+ label: t.label
77
+ }))));
78
+ }, ne = ({ className: e, ...l }) => {
79
+ const { value: a, label: o } = l;
80
+ return /* @__PURE__ */ n.createElement(H, {
81
+ className: e,
82
+ id: a,
83
+ textValue: o
84
+ }, o);
85
+ };
86
+ f.Option = ne;
87
+ r.Label = Y;
88
+ r.Trigger = ee;
89
+ r.Options = f;
90
+ r.Description = U;
91
+ r.Error = W;
92
+ const pe = (...e) => $(K, e);
93
+ export {
94
+ r as D,
95
+ pe as u
96
+ };
@@ -1,5 +1,5 @@
1
1
  import i from "classnames";
2
- import { bh as s, aQ as v } from "./form-D7ulDPh1.js";
2
+ import { bs as s, a$ as v } from "./form-DSpx-AO8.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 { bo as n } from "./form-D7ulDPh1.js";
1
+ import { bz as n } from "./form-DSpx-AO8.js";
2
2
  import { s as e } from "./field-rac.module-DP0lkkEv.js";
3
- import { u } from "./use-element-state-class-name-DY0UyIQg.js";
3
+ import { u } from "./use-element-state-class-name-rXM_lHug.js";
4
4
  const b = (s, a) => {
5
5
  const { disabled: t, readOnly: o } = n(), r = u({
6
6
  globalClasses: s,
@@ -0,0 +1,53 @@
1
+ import { useContext as c, useMemo as i } from "react";
2
+ import { bt as r, aF as a, br as d, F as t } from "./form-DSpx-AO8.js";
3
+ const u = [
4
+ t.DROPDOWN,
5
+ t.DEXT_DROPDOWN,
6
+ t.SERVICES_DROPDOWN,
7
+ t.DATE_INPUT,
8
+ t.CONTACTS_BIRTHDATE,
9
+ t.DATE_TIME_INPUT,
10
+ t.DEXT_DATE_TIME_INPUT
11
+ ], T = [
12
+ t.DATE_PICKER,
13
+ t.DEXT_DATE_PICKER
14
+ ], O = [
15
+ t.PHONE,
16
+ t.CONTACTS_PHONE,
17
+ t.BOOKINGS_PHONE,
18
+ t.DEXT_PHONE
19
+ ], p = [
20
+ t.MULTILINE_ADDRESS,
21
+ t.BOOKINGS_ADDRESS,
22
+ t.ECOM_ADDRESS
23
+ ], _ = ({ properties: e }) => {
24
+ var n, o, s, D;
25
+ return ((D = (s = (o = (n = e.validation) == null ? void 0 : n.string) == null ? void 0 : o.phoneOptions) == null ? void 0 : s.allowedCountryCodes) == null ? void 0 : D.length) !== 1;
26
+ }, I = ({ properties: e }) => {
27
+ var n, o;
28
+ return ((o = (n = e.fieldSettings) == null ? void 0 : n.country) == null ? void 0 : o.show) !== !1;
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: o = !1 } = d();
31
+ return i(() => !n || n.parentId ? [] : n.fields.filter((s) => e(s, o) && C(s)).map((s) => s.id), [
32
+ n,
33
+ o,
34
+ e
35
+ ]);
36
+ }, R = (e) => {
37
+ var s;
38
+ const n = ((s = r().dropdown) == null ? void 0 : s.open) === !0, o = E(l);
39
+ return n && o.includes(e);
40
+ }, F = (e) => {
41
+ var s;
42
+ const n = ((s = r().phone) == null ? void 0 : s.open) === !0, o = E(P);
43
+ return n && o.includes(e);
44
+ }, f = (e) => {
45
+ var s;
46
+ const n = ((s = r().datePicker) == null ? void 0 : s.open) === !0, o = E(S);
47
+ return n && o.includes(e);
48
+ };
49
+ export {
50
+ R as a,
51
+ F as b,
52
+ f as u
53
+ };
@@ -1,7 +1,7 @@
1
- import { useState as o, useCallback as y, useEffect as m, useMemo as D } from "react";
2
- import { bn as v } from "./form-D7ulDPh1.js";
1
+ import { useState as o, useCallback as b, useEffect as m, useMemo as D } from "react";
2
+ import { by as v } from "./form-DSpx-AO8.js";
3
3
  const k = (I) => {
4
- const { fieldType: L, isEditor: t = !1, postProcessOptions: i, customFetchLogic: n, onInitialDataLoaded: a } = I, [O, h] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(L), r = y((e) => {
4
+ const { fieldType: L, isEditor: t = !1, postProcessOptions: i, customFetchLogic: a, onInitialDataLoaded: n } = I, [O, h] = o(!1), [g, p] = o([]), [y, u] = o(!1), [c, f] = o(!1), s = v(L), r = b((e) => {
5
5
  let d = e.map((l) => ({
6
6
  value: l.id ?? "",
7
7
  label: l.name ?? "",
@@ -14,28 +14,28 @@ const k = (I) => {
14
14
  m(() => {
15
15
  if (s != null && s.services) {
16
16
  const e = r(s.services);
17
- p(e), u(e.length === 0), f(!0), a && a(e);
17
+ p(e), u(e.length === 0), f(!0), n && n(e);
18
18
  }
19
19
  }, [
20
20
  s,
21
21
  r,
22
- a
22
+ n
23
23
  ]), m(() => {
24
- n && !t && n();
24
+ a && !t && a();
25
25
  }, [
26
- n,
26
+ a,
27
27
  t
28
28
  ]);
29
- const b = D(() => t || c, [
29
+ const E = D(() => t || c, [
30
30
  t,
31
31
  c
32
32
  ]);
33
33
  return {
34
34
  isLoading: O,
35
35
  options: g,
36
- isEmpty: E,
36
+ isEmpty: y,
37
37
  hasInitialDataLoaded: c,
38
- shouldRender: b,
38
+ shouldRender: E,
39
39
  setIsLoading: h,
40
40
  setOptions: p,
41
41
  setIsEmpty: u,
@@ -0,0 +1,6 @@
1
+ import { an as a } from "./form-DSpx-AO8.js";
2
+ import { u as e } from "./use-hoverable-input-class-name-BnV_uerV.js";
3
+ const m = (...s) => e(a, s);
4
+ export {
5
+ m as u
6
+ };
package/dist/form.d.ts CHANGED
@@ -6992,6 +6992,14 @@ type ElementProps = ElementTree & {
6992
6992
  }> & {
6993
6993
  open?: boolean;
6994
6994
  };
6995
+ phone?: ElementEntry<{
6996
+ popover?: ElementEntry<{
6997
+ option?: LeafEntry;
6998
+ search?: LeafEntry;
6999
+ }>;
7000
+ }> & {
7001
+ open?: boolean;
7002
+ };
6995
7003
  signature?: ElementEntry<ElementTree & {
6996
7004
  dropZone?: ElementEntry<{
6997
7005
  uploadButton?: ElementEntry<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/form-elements",
3
- "version": "1.158.0",
3
+ "version": "1.160.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": "5dff21ac1548ee67d98865de3d5b7b1a4eeb632a3e8378fd78bd2bb7"
159
+ "falconPackageHash": "4056ec8b67966e77ee233ab87cc12bb9411034a30bc372bf323425d1"
160
160
  }