@wix/form-elements 1.146.0 → 1.148.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 (118) hide show
  1. package/dist/component/{appointment-rac-scUix9QX.js → appointment-rac-BNqXl3dq.js} +168 -164
  2. package/dist/component/{bookings-address-rac-CKemkJOO.js → bookings-address-rac-DzLf588z.js} +1 -1
  3. package/dist/component/{bookings-email-rac-CDqdhPAB.js → bookings-email-rac-BCNWH7ss.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-DEy_7Hjb.js → bookings-first-name-rac-D36aHUOJ.js} +1 -1
  5. package/dist/component/{bookings-header-rac-Bl4xy9lB.js → bookings-header-rac-CNr2y2ES.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-CsL9xQ1W.js → bookings-last-name-rac-yHE6ZIxr.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-DkHYQ4No.js → bookings-login-bar-rac-C3weOc1i.js} +6 -6
  8. package/dist/component/{bookings-phone-rac-BoBiFwbV.js → bookings-phone-rac-CIo_ApRf.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-DZZnPKWA.js → bookings-rich-text-rac-rgKnvt57.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-UgLmJxB-.js → checkbox-field-rac-CMaVxLNe.js} +9 -7
  11. package/dist/component/{checkbox-group-field-headless-C809nB0Q.js → checkbox-group-field-headless-XPtqS8Km.js} +68 -68
  12. package/dist/component/{checkbox-group-field-rac-u4i4wG21.js → checkbox-group-field-rac-C_58XfQt.js} +9 -9
  13. package/dist/component/{checkbox-group-rac-DBAQhSo3.js → checkbox-group-rac-FQrWViSh.js} +1 -1
  14. package/dist/component/{checkbox-indicator-module-classes-6173wvuW.js → checkbox-indicator-module-classes-akWZsZNn.js} +1 -1
  15. package/dist/component/{checkbox-rac-FDQVsI5-.js → checkbox-rac-C5Lj2b1N.js} +1 -1
  16. package/dist/component/{contacts-address-rac-DnArylPa.js → contacts-address-rac-OhpLzD0X.js} +1 -1
  17. package/dist/component/{contacts-birthdate-rac-C19jhGEO.js → contacts-birthdate-rac-Dnqq84ct.js} +1 -1
  18. package/dist/component/{contacts-company-rac-Dxs0hs_i.js → contacts-company-rac-DMnTF55t.js} +1 -1
  19. package/dist/component/{contacts-email-rac-D-H43L8r.js → contacts-email-rac-DmZhScW2.js} +1 -1
  20. package/dist/component/{contacts-first-name-rac-DwV5NESk.js → contacts-first-name-rac-B6A4fuzK.js} +1 -1
  21. package/dist/component/{contacts-last-name-rac-C5v2xurf.js → contacts-last-name-rac-DVz97lew.js} +1 -1
  22. package/dist/component/{contacts-phone-rac-D9a5x-xl.js → contacts-phone-rac-DV8aO0uS.js} +1 -1
  23. package/dist/component/{contacts-position-rac-DfsgOv-k.js → contacts-position-rac-BP_yBIE4.js} +1 -1
  24. package/dist/component/{contacts-subscribe-rac-B-Hho0Kb.js → contacts-subscribe-rac-wmTprtLf.js} +1 -1
  25. package/dist/component/{contacts-tax-id-rac-q6TQkB4b.js → contacts-tax-id-rac-CUEPBQye.js} +1 -1
  26. package/dist/component/{date-availability-CMDvf5VU.js → date-availability-BK_0gLRv.js} +1 -1
  27. package/dist/component/{date-input-field-rac-C1WLUct3.js → date-input-field-rac-BfWPvRnd.js} +84 -78
  28. package/dist/component/{date-input-rac-cNQ-nr4D.js → date-input-rac-B7vAMRBX.js} +1 -1
  29. package/dist/component/{date-picker-field-rac-mx11z-MO.js → date-picker-field-rac-CpDY4EkU.js} +111 -105
  30. package/dist/component/{date-picker-rac-DeTz17zC.js → date-picker-rac-BCswaZB1.js} +1 -1
  31. package/dist/component/{date-time-input-field-rac-feQ2E1eU.js → date-time-input-field-rac-D9w4eEa0.js} +135 -129
  32. package/dist/component/{date-time-input-rac-G0s0xP4v.js → date-time-input-rac-_im8-JRC.js} +1 -1
  33. package/dist/component/{dext-checkbox-group-rac-BcTN1nJb.js → dext-checkbox-group-rac-Di7B1Wzv.js} +2 -2
  34. package/dist/component/{dext-checkbox-rac-DX0TOrCO.js → dext-checkbox-rac-BPendOsP.js} +1 -1
  35. package/dist/component/{dext-date-picker-rac-CpDp11oa.js → dext-date-picker-rac-_-Ig9Qn6.js} +1 -1
  36. package/dist/component/{dext-date-time-input-rac-BRvO8izU.js → dext-date-time-input-rac-dKFW87yu.js} +1 -1
  37. package/dist/component/{dext-dropdown-rac-DGZ4Yi_X.js → dext-dropdown-rac-Cpdpps7P.js} +1 -1
  38. package/dist/component/{dext-email-rac-B9YCFHB4.js → dext-email-rac-D4UmYH5m.js} +1 -1
  39. package/dist/component/{dext-number-input-rac-D890dBZf.js → dext-number-input-rac-DUetGnYJ.js} +1 -1
  40. package/dist/component/{dext-phone-rac-BAQftbXo.js → dext-phone-rac-Bsz_DAT9.js} +1 -1
  41. package/dist/component/dext-radio-group-rac-B_soj2FD.js +18 -0
  42. package/dist/component/{dext-rating-input-rac-BqQKVaHo.js → dext-rating-input-rac-cm40qt4O.js} +1 -1
  43. package/dist/component/{dext-tags-rac-zxxKcNUe.js → dext-tags-rac-D1ULx6t1.js} +2 -2
  44. package/dist/component/{dext-text-area-rac-Ctp9SwPg.js → dext-text-area-rac-IkL67rHB.js} +1 -1
  45. package/dist/component/{dext-text-input-rac-c_QMlyjr.js → dext-text-input-rac-DsYSTEL2.js} +1 -1
  46. package/dist/component/{dext-url-input-rac-96pv15aC.js → dext-url-input-rac-BKvEkpYu.js} +1 -1
  47. package/dist/component/{donation-rac-GEWKSLJY.js → donation-rac-CaCXMa-H.js} +87 -85
  48. package/dist/component/{dropdown-field-headless-C3OxMhLE.js → dropdown-field-headless-DcrQK8mL.js} +36 -34
  49. package/dist/component/{dropdown-field-rac-CCXfBmSc.js → dropdown-field-rac-CuGoz_6I.js} +9 -10
  50. package/dist/component/{dropdown-rac-CR7hswXE.js → dropdown-rac-rIe6ZqaZ.js} +1 -1
  51. package/dist/component/{ecom-address-rac-khMuxEFD.js → ecom-address-rac-DT0rzvvp.js} +1 -1
  52. package/dist/component/{ecom-subscription-checkbox-rac-CAi_AHpb.js → ecom-subscription-checkbox-rac-ZfbiME6e.js} +5 -5
  53. package/dist/component/{email-input-field-rac-B83mY2lg.js → email-input-field-rac-8Qn3yskh.js} +62 -62
  54. package/dist/component/{events-repeater-rac-ClEwXgmb.js → events-repeater-rac-DyHrMd3y.js} +25 -21
  55. package/dist/component/{events-rsvp-rac-BJ5q2SVR.js → events-rsvp-rac-CoL-euuc.js} +9 -9
  56. package/dist/component/{field-error-headless-CsYQCsiT.js → field-error-headless-RylIeqXr.js} +6 -6
  57. package/dist/component/{field-label-headless-Yg_1PMSg.js → field-label-headless-d3hZxIEc.js} +15 -15
  58. package/dist/component/field-rac.module-DP0lkkEv.js +25 -0
  59. package/dist/component/{file-upload-rac-DJsuI_lR.js → file-upload-rac-rXbabrgc.js} +172 -168
  60. package/dist/component/{fixed-payment-rac-BMFe9wxU.js → fixed-payment-rac-CaR7pXXA.js} +13 -13
  61. package/dist/component/{form-Bed4Kfz8.js → form-DhIEC3nB.js} +2309 -2308
  62. package/dist/component/form.css +1 -1
  63. package/dist/component/form.js +2 -2
  64. package/dist/component/{header-field-rac-DPQTrOSZ.js → header-field-rac-nELbyGjP.js} +4 -4
  65. package/dist/component/{header-rac-CzXsuLmE.js → header-rac-q80EQNmM.js} +1 -1
  66. package/dist/component/{image-choice-rac-R_4pbOSr.js → image-choice-rac-CLMiTQK0.js} +42 -42
  67. package/dist/component/{index-DZxHlvzt.js → index-C-jVrv9Y.js} +91 -91
  68. package/dist/component/{index-qSZCe_WC.js → index-DnLJzPM-.js} +2 -2
  69. package/dist/component/{isObjectLike-B-a5uaU-.js → isObjectLike-Bf577MHV.js} +15 -15
  70. package/dist/component/{multiline-address-field-rac-rv4IZZy_.js → multiline-address-field-rac-BVAv1w9F.js} +155 -137
  71. package/dist/component/{multiline-address-rac-DZ7cYtgn.js → multiline-address-rac-qMuUHA9U.js} +1 -1
  72. package/dist/component/{number-input-field-rac-CL9iXKIf.js → number-input-field-rac-B_vnBWFG.js} +24 -22
  73. package/dist/component/{number-input-rac-BeGn6qJR.js → number-input-rac-BPCIW8Fz.js} +1 -1
  74. package/dist/component/{password-rac-DfvhdsKG.js → password-rac-D72HG72u.js} +28 -26
  75. package/dist/component/{payment-input-rac-BmMfi5rf.js → payment-input-rac-DthVgsAi.js} +32 -30
  76. package/dist/component/{phone-input-field-rac-DW0a1pXs.js → phone-input-field-rac-XIPkH8Fb.js} +46 -46
  77. package/dist/component/{phone-rac-quZjJ08H.js → phone-rac-U94fCfer.js} +1 -1
  78. package/dist/component/{product-list-rac-Ci0KB7sN.js → product-list-rac-BRMGPyhr.js} +78 -78
  79. package/dist/component/{quiz-radio-group-rac--UUtGx2t.js → quiz-radio-group-rac-DafNzzgX.js} +1 -1
  80. package/dist/component/radio-button-module-classes-DtFlHID_.js +134 -0
  81. package/dist/component/{radio-group-field-rac-w8fHpFKJ.js → radio-group-field-rac-BXrYWjew.js} +13 -13
  82. package/dist/component/{radio-group-rac-jO8aghii.js → radio-group-rac-BNyFfQYV.js} +1 -1
  83. package/dist/component/{rating-input-field-rac-BRc2PtqE.js → rating-input-field-rac-KbkiVCZ7.js} +27 -27
  84. package/dist/component/{rating-input-rac-D9zs06xR.js → rating-input-rac-zT4vPkwP.js} +1 -1
  85. package/dist/component/{rich-content-rac.module-Cv3ZmD00.js → rich-content-rac.module-C0OQetct.js} +8 -8
  86. package/dist/component/{rich-text-field-rac-BmWuIfA8.js → rich-text-field-rac-T4NoShC0.js} +4 -4
  87. package/dist/component/{rich-text-rac-BnqnrvB1.js → rich-text-rac-m6VRCRZu.js} +1 -1
  88. package/dist/component/{service-dropdown-rac-Cl81KfJU.js → service-dropdown-rac-BFwKhL1l.js} +44 -45
  89. package/dist/component/{services-multi-choice-rac-sQ1NF9hY.js → services-multi-choice-rac-DjzcuRWv.js} +13 -13
  90. package/dist/component/{signature-rac-Huairu7V.js → signature-rac-B1LPKnIw.js} +281 -279
  91. package/dist/component/{submit-button-rac-Dpg7N0TG.js → submit-button-rac-Cz3PVtW4.js} +25 -25
  92. package/dist/component/{tags-field-rac-BQ8TEqXH.js → tags-field-rac-DzSoL__s.js} +82 -82
  93. package/dist/component/{tags-rac-CFOmyCCc.js → tags-rac-DMYJDrm-.js} +1 -1
  94. package/dist/component/{text-area-field-rac-DNiMa7d3.js → text-area-field-rac-SuMzBm-Q.js} +30 -28
  95. package/dist/component/{text-area-rac-kLFe-KbZ.js → text-area-rac-C-zmnJgt.js} +1 -1
  96. package/dist/component/{text-input-field-rac-CqENSUUX.js → text-input-field-rac-BmQlXTK9.js} +6 -6
  97. package/dist/component/text-input-headless-BsrjGTK4.js +47 -0
  98. package/dist/component/{text-input-rac-uYQEfOtE.js → text-input-rac-DhQFKG4h.js} +1 -1
  99. package/dist/component/time-input-rac-CRZZdbTI.js +161 -0
  100. package/dist/component/{url-input-field-rac-BioH7kuz.js → url-input-field-rac-D617Pvsf.js} +30 -28
  101. package/dist/component/{url-input-rac-D2VSSyqW.js → url-input-rac-CLvxaWZz.js} +1 -1
  102. package/dist/component/use-dropdown-trigger-class-name-C4uqTKFP.js +117 -0
  103. package/dist/component/{use-element-state-class-name-oiKCauK-.js → use-element-state-class-name-DJx-T0zf.js} +3 -3
  104. package/dist/component/use-hoverable-input-class-name-pwVZXwrY.js +25 -0
  105. package/dist/component/use-is-forced-open-dropdown-DBpm1D-o.js +48 -0
  106. package/dist/component/{use-service-options-base-DXG60hA5.js → use-service-options-base-xHeVTve3.js} +6 -6
  107. package/dist/component/use-text-input-class-name-CrEjJ2Z8.js +6 -0
  108. package/dist/form.d.ts +5 -0
  109. package/package.json +2 -2
  110. package/dist/component/dext-radio-group-rac-CtEjnu_X.js +0 -18
  111. package/dist/component/field-rac.module-DfEb7pBp.js +0 -25
  112. package/dist/component/radio-button-module-classes-CqdBGknT.js +0 -132
  113. package/dist/component/text-input-headless-BdPkEeK2.js +0 -45
  114. package/dist/component/time-input-rac-BYoojlJ9.js +0 -159
  115. package/dist/component/use-dropdown-option-class-name-BEmvU-Gg.js +0 -115
  116. package/dist/component/use-dropdown-trigger-class-name-qj9skLWZ.js +0 -40
  117. package/dist/component/use-hoverable-input-class-name-BW3nCyhG.js +0 -25
  118. package/dist/component/use-text-input-class-name-BhQFcXYH.js +0 -6
@@ -0,0 +1,161 @@
1
+ import e, { useCallback as v, useRef as V, useContext as q } from "react";
2
+ import { RicosViewer as x } from "@wix/ricos/viewer";
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, S as z, a0 as G, H as J, v as K } from "./form-DhIEC3nB.js";
7
+ import { f as u, a as S } from "./find-child-C60k4CxG.js";
8
+ import { D as W, E as X } from "./field-error-headless-RylIeqXr.js";
9
+ import { L as Y } from "./field-label-headless-d3hZxIEc.js";
10
+ import { E as Z } from "./error-icon-hZxQ6DEy.js";
11
+ import { H as F } from "./custom-focus-class-_483Pkwp.js";
12
+ import { s as f } from "./field-rac.module-DP0lkkEv.js";
13
+ import { u as $ } from "./use-text-input-class-name-CrEjJ2Z8.js";
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: D, labelId: L } = j(), R = v((M) => {
16
+ const H = ae(M);
17
+ a(H);
18
+ }, [
19
+ a
20
+ ]), N = u(t, r.Label), y = u(t, r.Time), P = u(t, r.Description), A = u(t, r.Error), O = ne(s);
21
+ return /* @__PURE__ */ e.createElement(C, {
22
+ fieldId: n,
23
+ renderLabel: () => N,
24
+ renderInput: () => /* @__PURE__ */ e.createElement(k, {
25
+ "aria-labelledby": L,
26
+ id: I,
27
+ "aria-describedby": D,
28
+ value: O,
29
+ onChange: R,
30
+ isDisabled: i,
31
+ isReadOnly: o,
32
+ isInvalid: g,
33
+ isRequired: c,
34
+ onBlur: l,
35
+ onFocus: E,
36
+ hourCycle: b ? 24 : 12
37
+ }, y),
38
+ renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, A, P)
39
+ });
40
+ }, d = ({ children: t, className: n }) => {
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, {
43
+ className: n,
44
+ "data-invalid": s || void 0,
45
+ "data-placeholder-hidden": a || void 0
46
+ }, (l) => {
47
+ switch (l.type) {
48
+ case "hour":
49
+ return S(i, {
50
+ segment: l
51
+ }) || /* @__PURE__ */ e.createElement(e.Fragment, null);
52
+ case "minute":
53
+ return S(o, {
54
+ segment: l
55
+ }) || /* @__PURE__ */ e.createElement(e.Fragment, null);
56
+ case "dayPeriod":
57
+ return S(c, {
58
+ segment: l
59
+ }) || /* @__PURE__ */ e.createElement(e.Fragment, null);
60
+ case "literal":
61
+ return /* @__PURE__ */ e.createElement(_, {
62
+ segment: l
63
+ });
64
+ default:
65
+ return /* @__PURE__ */ e.createElement(e.Fragment, null);
66
+ }
67
+ });
68
+ }, ee = ({ className: t, ...n }) => {
69
+ const { id: s, hidePlaceholder: a } = p(), { segment: i } = n, { t: o } = T(), c = V(null);
70
+ Q(() => {
71
+ var E;
72
+ (E = c.current) == null || E.focus({
73
+ preventScroll: !0
74
+ });
75
+ }, s);
76
+ const l = a ? void 0 : o("field.date.placeholder.hour");
77
+ return /* @__PURE__ */ e.createElement(_, {
78
+ ref: c,
79
+ segment: i,
80
+ className: t,
81
+ ...l && {
82
+ placeholder: l
83
+ }
84
+ });
85
+ }, te = ({ className: t, ...n }) => {
86
+ const { hidePlaceholder: s } = p(), { segment: a } = n, { t: i } = T(), o = s ? void 0 : i("field.date.placeholder.minute");
87
+ return /* @__PURE__ */ e.createElement(_, {
88
+ segment: a,
89
+ className: t,
90
+ ...o && {
91
+ placeholder: o
92
+ }
93
+ });
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");
96
+ return /* @__PURE__ */ e.createElement(_, {
97
+ segment: a,
98
+ className: t,
99
+ onClick: l,
100
+ ...c && {
101
+ placeholder: c
102
+ }
103
+ });
104
+ };
105
+ d.Hour = ee;
106
+ d.Minute = te;
107
+ d.Period = re;
108
+ r.Label = Y;
109
+ r.Time = d;
110
+ r.Description = W;
111
+ r.Error = X;
112
+ function ne(t) {
113
+ if (!t)
114
+ return null;
115
+ try {
116
+ return B(t);
117
+ } catch {
118
+ return null;
119
+ }
120
+ }
121
+ function ae(t) {
122
+ if (!t)
123
+ return null;
124
+ const n = String(t.hour).padStart(2, "0"), s = String(t.minute).padStart(2, "0"), a = String(t.second).padStart(2, "0");
125
+ return [
126
+ n,
127
+ s,
128
+ a
129
+ ].join(":");
130
+ }
131
+ const oe = "_time_5p151_1", le = "_hour_5p151_17", se = "_minute_5p151_18", ie = "_period_5p151_19", h = {
132
+ time: oe,
133
+ hour: le,
134
+ minute: se,
135
+ period: ie
136
+ }, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(x, {
137
+ content: t,
138
+ locale: n
139
+ }), me = () => {
140
+ const t = $(h.time);
141
+ return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
142
+ className: m(z, f.label)
143
+ }, /* @__PURE__ */ e.createElement(r.Label.Required, {
144
+ className: m(G, f.requiredMark)
145
+ })), /* @__PURE__ */ e.createElement(r.Time, {
146
+ className: t
147
+ }, /* @__PURE__ */ e.createElement(r.Time.Hour, {
148
+ className: m(h.hour, F)
149
+ }), /* @__PURE__ */ e.createElement(r.Time.Minute, {
150
+ className: m(h.minute, F)
151
+ }), /* @__PURE__ */ e.createElement(r.Time.Period, {
152
+ className: m(h.period, F)
153
+ })), /* @__PURE__ */ e.createElement(r.Error, {
154
+ className: m(J, f.error)
155
+ }, /* @__PURE__ */ e.createElement(Z, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
156
+ className: m(K, f.description)
157
+ }, ce));
158
+ }, Ie = () => /* @__PURE__ */ e.createElement(me, null);
159
+ export {
160
+ Ie as TimeInputRAC
161
+ };
@@ -1,63 +1,65 @@
1
- import { RicosViewer as S } from "@wix/ricos/viewer";
1
+ 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 { bn as d, bk as E, bp as k, R as B, $ as T, G as g, u as v } from "./form-Bed4Kfz8.js";
5
+ import { bo as d, bl as E, bq as v, S as B, a0 as T, H as g, v as k } from "./form-DhIEC3nB.js";
6
6
  import { f as c } from "./find-child-C60k4CxG.js";
7
- import { D as M, E as P } from "./field-error-headless-CsYQCsiT.js";
8
- import { L as q } from "./field-label-headless-Yg_1PMSg.js";
7
+ import { D as q, E as M } from "./field-error-headless-RylIeqXr.js";
8
+ import { L as P } from "./field-label-headless-d3hZxIEc.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
- import { s as u } from "./field-rac.module-DfEb7pBp.js";
12
- import { u as $ } from "./use-text-input-class-name-BhQFcXYH.js";
13
- const w = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
14
- const { id: o, value: n, onChange: s, disabled: m, readOnly: l, 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), N = h(() => {
15
- s(w(n)), p();
11
+ import { s as u } from "./field-rac.module-DP0lkkEv.js";
12
+ import { u as w } from "./use-text-input-class-name-CrEjJ2Z8.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), S = c(t, e.Error), _ = h(() => {
15
+ n(H(l)), p();
16
16
  }, [
17
17
  p,
18
- s,
19
- n
18
+ n,
19
+ l
20
20
  ]);
21
21
  return /* @__PURE__ */ r.createElement(R, {
22
22
  fieldId: o,
23
23
  renderLabel: () => L,
24
24
  renderInput: () => /* @__PURE__ */ r.createElement(y, {
25
25
  "aria-labelledby": F,
26
- value: n ?? "",
27
- onChange: s,
26
+ value: l ?? "",
27
+ onChange: n,
28
28
  isDisabled: m,
29
- isReadOnly: l,
29
+ isReadOnly: s,
30
30
  isRequired: a,
31
31
  isInvalid: I,
32
- onBlur: N,
32
+ onBlur: _,
33
33
  onFocus: f
34
34
  }, D),
35
- renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, C)
35
+ renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, S, C)
36
36
  });
37
37
  }, V = ({ className: t }) => {
38
- const { id: o, placeholder: n } = d(), { inputId: s, ariaDescribedBy: m } = E(), l = O(null);
39
- return k(() => {
38
+ const { id: o, placeholder: l } = d(), { inputId: n, ariaDescribedBy: m } = E(), s = O(null);
39
+ return v(() => {
40
40
  var a;
41
- (a = l.current) == null || a.focus();
41
+ (a = s.current) == null || a.focus({
42
+ preventScroll: !0
43
+ });
42
44
  }, o), /* @__PURE__ */ r.createElement(A, {
43
- ref: l,
44
- id: s,
45
+ ref: s,
46
+ id: n,
45
47
  type: "url",
46
48
  autoComplete: "url",
47
49
  "aria-describedby": m,
48
50
  className: t,
49
- placeholder: n
51
+ placeholder: l
50
52
  });
51
53
  };
52
- e.Label = q;
54
+ e.Label = P;
53
55
  e.Input = V;
54
- e.Description = M;
55
- e.Error = P;
56
- const W = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(S, {
56
+ e.Description = q;
57
+ e.Error = M;
58
+ const W = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(N, {
57
59
  content: t,
58
60
  locale: o
59
61
  }), te = () => {
60
- const t = $();
62
+ const t = w();
61
63
  return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
62
64
  className: i(B, u.label)
63
65
  }, /* @__PURE__ */ r.createElement(e.Label.Required, {
@@ -67,7 +69,7 @@ const W = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(S, {
67
69
  }), /* @__PURE__ */ r.createElement(e.Error, {
68
70
  className: i(g, u.error)
69
71
  }, /* @__PURE__ */ r.createElement(U, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
70
- className: i(v, u.description)
72
+ className: i(k, u.description)
71
73
  }, W));
72
74
  };
73
75
  export {
@@ -1,5 +1,5 @@
1
1
  import r from "react";
2
- import { U as t } from "./url-input-field-rac-BioH7kuz.js";
2
+ import { U as t } from "./url-input-field-rac-D617Pvsf.js";
3
3
  const n = () => /* @__PURE__ */ r.createElement(t, null);
4
4
  export {
5
5
  n as UrlInputRAC
@@ -0,0 +1,117 @@
1
+ import d, { useContext as N, useRef as x, useState as f, Children as y, useLayoutEffect as p, useMemo as I } from "react";
2
+ import { CollectionRendererContext as g, DefaultCollectionRenderer as E, ListBox as L } from "react-aria-components";
3
+ import M from "classnames";
4
+ import { s as R } from "./field-rac.module-DP0lkkEv.js";
5
+ import { z as T, G as P } from "./form-DhIEC3nB.js";
6
+ import { u as H } from "./use-element-state-class-name-DJx-T0zf.js";
7
+ import { u as B } from "./use-hoverable-input-class-name-pwVZXwrY.js";
8
+ const h = 1 / 0, A = {
9
+ position: "absolute",
10
+ width: 0,
11
+ height: "var(--popoverMaxHeight, 240px)",
12
+ visibility: "hidden",
13
+ pointerEvents: "none"
14
+ }, G = (e, o) => Object.create(e, {
15
+ [Symbol.iterator]: {
16
+ value: function* () {
17
+ let s = 0;
18
+ for (const n of e) {
19
+ if (s >= o)
20
+ return;
21
+ s += 1, yield n;
22
+ }
23
+ }
24
+ }
25
+ }), S = (e) => e.querySelector('[role="option"]') !== null, V = (e, o) => {
26
+ const s = e.getBoundingClientRect().top - e.scrollTop;
27
+ let n = 0;
28
+ for (const r of e.querySelectorAll('[role="option"]')) {
29
+ const m = r.getBoundingClientRect().top - s;
30
+ if (n > 0 && m >= o)
31
+ break;
32
+ n += 1;
33
+ }
34
+ return n;
35
+ }, K = ({ isForcedOpen: e, ...o }) => {
36
+ const s = N(g), n = x(null), [r, m] = f(null), [c, O] = f(h), [b, _] = f(0), w = y.count(o.children);
37
+ p(() => {
38
+ O(h);
39
+ }, [
40
+ r,
41
+ w,
42
+ b
43
+ ]), p(() => {
44
+ const t = n.current;
45
+ if (!r || !t || c !== h)
46
+ return;
47
+ const a = () => {
48
+ const l = r.getBoundingClientRect().height;
49
+ l > 0 && O(V(t, l));
50
+ };
51
+ if (S(t)) {
52
+ a();
53
+ return;
54
+ }
55
+ const i = new MutationObserver(() => {
56
+ S(t) && (i.disconnect(), a());
57
+ });
58
+ return i.observe(t, {
59
+ childList: !0,
60
+ subtree: !0
61
+ }), () => i.disconnect();
62
+ }, [
63
+ r,
64
+ c,
65
+ b
66
+ ]), p(() => {
67
+ const t = n.current;
68
+ if (!r || !t || typeof ResizeObserver > "u")
69
+ return;
70
+ const a = /* @__PURE__ */ new Map(), i = new ResizeObserver((l) => {
71
+ l.some(({ target: u, contentRect: v }) => {
72
+ const C = a.get(u);
73
+ return a.set(u, v.height), C !== void 0 && C !== v.height;
74
+ }) && _((u) => u + 1);
75
+ });
76
+ return i.observe(r), t.querySelectorAll('[role="option"]').forEach((l) => i.observe(l)), () => i.disconnect();
77
+ }, [
78
+ r,
79
+ c
80
+ ]);
81
+ const D = I(() => ({
82
+ ...E,
83
+ CollectionRoot: (t) => /* @__PURE__ */ d.createElement(E.CollectionRoot, {
84
+ ...t,
85
+ collection: G(t.collection, c)
86
+ })
87
+ }), [
88
+ c
89
+ ]);
90
+ return /* @__PURE__ */ d.createElement(g.Provider, {
91
+ value: e ? D : s
92
+ }, /* @__PURE__ */ d.createElement(L, {
93
+ ref: n,
94
+ ...o
95
+ }), e && /* @__PURE__ */ d.createElement("div", {
96
+ ref: m,
97
+ style: A
98
+ }));
99
+ }, W = {
100
+ base: R.selectOption,
101
+ selected: R.selectOptionSelected,
102
+ hover: R.selectOptionHover
103
+ }, q = ({ isSelected: e, isHovered: o, isFocused: s }) => ({
104
+ isSelected: e,
105
+ isHovered: (o || s) && !e
106
+ }), Q = (...e) => {
107
+ const o = H({
108
+ globalClasses: T,
109
+ moduleClasses: W
110
+ });
111
+ return (s) => M(o(q(s)), e);
112
+ }, Z = (...e) => B(P, e);
113
+ export {
114
+ K as V,
115
+ Z as a,
116
+ Q as u
117
+ };
@@ -1,6 +1,6 @@
1
1
  import i from "classnames";
2
- import { bg as s, aP as v } from "./form-Bed4Kfz8.js";
3
- const S = ({ globalClasses: e, moduleClasses: r }) => {
2
+ import { bh as s, aQ as v } from "./form-DhIEC3nB.js";
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 = [
6
6
  e.selected,
@@ -19,5 +19,5 @@ const S = ({ globalClasses: e, moduleClasses: r }) => {
19
19
  };
20
20
  };
21
21
  export {
22
- S as u
22
+ x as u
23
23
  };
@@ -0,0 +1,25 @@
1
+ import { bo as n } from "./form-DhIEC3nB.js";
2
+ import { s as e } from "./field-rac.module-DP0lkkEv.js";
3
+ import { u } from "./use-element-state-class-name-DJx-T0zf.js";
4
+ const b = (s, a) => {
5
+ const { disabled: t, readOnly: o } = n(), r = u({
6
+ globalClasses: s,
7
+ moduleClasses: {
8
+ base: [
9
+ e.input,
10
+ ...a
11
+ ].join(" "),
12
+ hover: e.inputHover
13
+ }
14
+ });
15
+ return ({ isHovered: l, isFocused: i, isFocusWithin: m }) => r({
16
+ isSelected: !1,
17
+ isHovered: l,
18
+ isFocused: i,
19
+ isFocusWithin: m,
20
+ isInteractive: !t && !o
21
+ });
22
+ };
23
+ export {
24
+ b as u
25
+ };
@@ -0,0 +1,48 @@
1
+ import { useContext as i, useMemo as c } from "react";
2
+ import { bi as E, au as T, bg as a, F as s } from "./form-DhIEC3nB.js";
3
+ const u = [
4
+ s.DROPDOWN,
5
+ s.DEXT_DROPDOWN,
6
+ s.SERVICES_DROPDOWN,
7
+ s.DATE_INPUT,
8
+ s.CONTACTS_BIRTHDATE,
9
+ s.DATE_TIME_INPUT,
10
+ s.DEXT_DATE_TIME_INPUT
11
+ ], d = [
12
+ s.DATE_PICKER,
13
+ s.DEXT_DATE_PICKER
14
+ ], O = [
15
+ s.PHONE,
16
+ s.CONTACTS_PHONE,
17
+ s.BOOKINGS_PHONE,
18
+ s.DEXT_PHONE
19
+ ], _ = [
20
+ s.MULTILINE_ADDRESS,
21
+ s.BOOKINGS_ADDRESS,
22
+ s.ECOM_ADDRESS
23
+ ], I = ({ properties: e }) => {
24
+ var n, o, t, r;
25
+ return ((r = (t = (o = (n = e.validation) == null ? void 0 : n.string) == null ? void 0 : o.phoneOptions) == null ? void 0 : t.allowedCountryCodes) == null ? void 0 : r.length) !== 1;
26
+ }, P = ({ properties: e }) => {
27
+ var n, o;
28
+ return ((o = (n = e.fieldSettings) == null ? void 0 : n.country) == null ? void 0 : o.show) !== !1;
29
+ }, l = (e, n) => O.includes(e.fieldType) ? !n && I(e) : _.includes(e.fieldType) ? P(e) : u.includes(e.fieldType), p = (e) => d.includes(e.fieldType), S = ({ properties: e }) => !e.disabled && !e.readOnly, D = (e) => {
30
+ const n = i(T), { isMobile: o = !1 } = a();
31
+ return c(() => !n || n.parentId ? [] : n.fields.filter((t) => e(t, o) && S(t)).map((t) => t.id), [
32
+ n,
33
+ o,
34
+ e
35
+ ]);
36
+ }, A = (e) => {
37
+ var t;
38
+ const n = ((t = E().dropdown) == null ? void 0 : t.open) === !0, o = D(l);
39
+ return n && o.includes(e);
40
+ }, R = (e) => {
41
+ var t;
42
+ const n = ((t = E().datePicker) == null ? void 0 : t.open) === !0, o = D(p);
43
+ return n && o.includes(e);
44
+ };
45
+ export {
46
+ A as a,
47
+ R as u
48
+ };
@@ -1,7 +1,7 @@
1
1
  import { useState as o, useCallback as y, useEffect as m, useMemo as D } from "react";
2
- import { bm as v } from "./form-Bed4Kfz8.js";
2
+ import { bn as v } from "./form-DhIEC3nB.js";
3
3
  const k = (I) => {
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) => {
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) => {
5
5
  let d = e.map((l) => ({
6
6
  value: l.id ?? "",
7
7
  label: l.name ?? "",
@@ -14,16 +14,16 @@ 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), n && n(e);
17
+ p(e), u(e.length === 0), f(!0), a && a(e);
18
18
  }
19
19
  }, [
20
20
  s,
21
21
  r,
22
- n
22
+ a
23
23
  ]), m(() => {
24
- a && !t && a();
24
+ n && !t && n();
25
25
  }, [
26
- a,
26
+ n,
27
27
  t
28
28
  ]);
29
29
  const b = D(() => t || c, [
@@ -0,0 +1,6 @@
1
+ import { ac as a } from "./form-DhIEC3nB.js";
2
+ import { u as e } from "./use-hoverable-input-class-name-pwVZXwrY.js";
3
+ const m = (...s) => e(a, s);
4
+ export {
5
+ m as u
6
+ };
package/dist/form.d.ts CHANGED
@@ -6987,6 +6987,11 @@ type ElementProps = ElementTree & {
6987
6987
  }> & {
6988
6988
  open?: boolean;
6989
6989
  };
6990
+ datePicker?: ElementEntry<{
6991
+ calendar?: LeafEntry;
6992
+ }> & {
6993
+ open?: boolean;
6994
+ };
6990
6995
  signatureContainer?: ElementEntry<ElementTree & {
6991
6996
  signatureDropZone?: ElementEntry<{
6992
6997
  signatureUploadButton?: ElementEntry<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/form-elements",
3
- "version": "1.146.0",
3
+ "version": "1.148.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": "b8fb19820565c6c9d82651d852c6ff5a5859a739634c90f656579668"
159
+ "falconPackageHash": "a6483bff283eb3c40d63a3133af65737b1727dea49830efd452cc8e3"
160
160
  }
@@ -1,18 +0,0 @@
1
- import r from "react";
2
- import { bn as e, ap as t } from "./form-Bed4Kfz8.js";
3
- import { R as p } from "./radio-group-field-rac-w8fHpFKJ.js";
4
- import { a } from "./default-limits-D7qVv_Hv.js";
5
- const l = () => {
6
- const o = {
7
- ...e(),
8
- otherInputCharacterLimit: a
9
- };
10
- return /* @__PURE__ */ r.createElement(t.Provider, {
11
- value: {
12
- v2: o
13
- }
14
- }, /* @__PURE__ */ r.createElement(p, null));
15
- };
16
- export {
17
- l as DextRadioGroupRAC
18
- };
@@ -1,25 +0,0 @@
1
- const o = "_label_1l2r2_1", e = "_requiredMark_1l2r2_11", t = "_input_1l2r2_16", r = "_inputGroup_1l2r2_17", n = "_inputHover_1l2r2_70", c = "_innerInput_1l2r2_141", _ = "_dropdownTrigger_1l2r2_191", p = "_dropdownIcon_1l2r2_201", l = "_dropdownPopover_1l2r2_220", s = "_selectPopover_1l2r2_226", i = "_selectOption_1l2r2_253", u = "_selectOptionHover_1l2r2_276", d = "_selectOptionSelected_1l2r2_280", h = "_selectOptionWithoutFocusRing_1l2r2_284", b = "_description_1l2r2_290", k = "_error_1l2r2_306", v = "_checkbox_1l2r2_325", I = "_checkboxInput_1l2r2_348", x = "_checkboxInputSelected_1l2r2_387", O = "_checkboxInputHover_1l2r2_391", g = {
2
- label: o,
3
- requiredMark: e,
4
- input: t,
5
- inputGroup: r,
6
- inputHover: n,
7
- innerInput: c,
8
- dropdownTrigger: _,
9
- dropdownIcon: p,
10
- dropdownPopover: l,
11
- selectPopover: s,
12
- selectOption: i,
13
- selectOptionHover: u,
14
- selectOptionSelected: d,
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
- };