@wix/form-elements 1.224.0 → 1.226.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 (125) hide show
  1. package/dist/component/{appointment-rac-UcRjJTHp.js → appointment-rac-C2ClvRys.js} +5 -5
  2. package/dist/component/{bookings-address-rac-DDjZGEhk.js → bookings-address-rac-CPQjosbZ.js} +1 -1
  3. package/dist/component/{bookings-email-rac-Dy2vh3dy.js → bookings-email-rac-DWvVUcBN.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-fDHMNznn.js → bookings-first-name-rac-_iG2xJiA.js} +1 -1
  5. package/dist/component/{bookings-header-rac-DLOeNNQf.js → bookings-header-rac-BbGm_Z8W.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-Bx19ROVT.js → bookings-last-name-rac-77Z29aHO.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-8FbvPiv1.js → bookings-login-bar-rac-DfqRpARE.js} +1 -1
  8. package/dist/component/{bookings-phone-rac-CvPQgtvq.js → bookings-phone-rac-BKoU7X0X.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-CO8bHRpD.js → bookings-rich-text-rac-DgSN4_f0.js} +1 -1
  10. package/dist/component/calendar-icon-DOeHn3jt.js +19 -0
  11. package/dist/component/{checkbox-field-rac-tzsGw10P.js → checkbox-field-rac-BLJ3Xb7C.js} +6 -6
  12. package/dist/component/{checkbox-group-field-headless-CL18dpkq.js → checkbox-group-field-headless-BeU8DG0A.js} +3 -3
  13. package/dist/component/{checkbox-group-field-rac-BmbxaprJ.js → checkbox-group-field-rac-ClRi6Ljp.js} +6 -6
  14. package/dist/component/{checkbox-group-rac-shsbUvRc.js → checkbox-group-rac--cM57qqw.js} +1 -1
  15. package/dist/component/{checkbox-indicator-module-classes-DOxE4UQg.js → checkbox-indicator-module-classes-Cozvs_kk.js} +1 -1
  16. package/dist/component/{checkbox-rac-CobYYayd.js → checkbox-rac-DnslW6as.js} +1 -1
  17. package/dist/component/{contacts-address-rac-BoDqJCi1.js → contacts-address-rac-Bpq_0vvi.js} +1 -1
  18. package/dist/component/{contacts-birthdate-rac-GAujbm-z.js → contacts-birthdate-rac-CB1h6kRm.js} +1 -1
  19. package/dist/component/{contacts-company-rac-CLcEz04V.js → contacts-company-rac-DvYX4SLX.js} +1 -1
  20. package/dist/component/{contacts-email-rac-D9q7TJwy.js → contacts-email-rac-sxbgKBUR.js} +1 -1
  21. package/dist/component/{contacts-first-name-rac-BAecbeNQ.js → contacts-first-name-rac-C4_o2nwv.js} +1 -1
  22. package/dist/component/{contacts-last-name-rac-Ccrw8BDa.js → contacts-last-name-rac-B3s96wWt.js} +1 -1
  23. package/dist/component/{contacts-phone-rac-DA2N033V.js → contacts-phone-rac-B5NZeYaI.js} +1 -1
  24. package/dist/component/{contacts-position-rac-0lAd-nCW.js → contacts-position-rac-CO4Bo4jG.js} +1 -1
  25. package/dist/component/{contacts-subscribe-rac-DB2ssF-E.js → contacts-subscribe-rac-CWmo3C6c.js} +1 -1
  26. package/dist/component/{contacts-tax-id-rac-B-Sn92Ho.js → contacts-tax-id-rac-pi_bJeA7.js} +1 -1
  27. package/dist/component/{date-availability-CtfWLvii.js → date-availability-DL8Xboob.js} +1 -1
  28. package/dist/component/date-input-field-rac-Di2pwVW7.js +365 -0
  29. package/dist/component/{date-input-rac-BnWwBe2i.js → date-input-rac-C5xC7fbz.js} +1 -1
  30. package/dist/component/date-picker-field-rac-DyPkuVVe.js +386 -0
  31. package/dist/component/{date-picker-rac-BhI6jOQE.js → date-picker-rac-CKNlOGZG.js} +1 -1
  32. package/dist/component/date-time-input-field-rac-Dk15pWyb.js +507 -0
  33. package/dist/component/{date-time-input-rac-DAbopLQt.js → date-time-input-rac-oOUelldq.js} +1 -1
  34. package/dist/component/{dext-checkbox-group-rac-D_HLv0tP.js → dext-checkbox-group-rac--jmNDOV2.js} +2 -2
  35. package/dist/component/{dext-checkbox-rac-BnBTlqEI.js → dext-checkbox-rac-BOjbBRrg.js} +1 -1
  36. package/dist/component/{dext-date-picker-rac-Co_yfhuz.js → dext-date-picker-rac-CHi5TisB.js} +1 -1
  37. package/dist/component/{dext-date-time-input-rac-BSpUehb2.js → dext-date-time-input-rac-CcF4ocHx.js} +1 -1
  38. package/dist/component/{dext-dropdown-rac-DPApx74L.js → dext-dropdown-rac-LLYhuGt_.js} +1 -1
  39. package/dist/component/{dext-email-rac-Dns6jFl4.js → dext-email-rac-CbC1crzT.js} +1 -1
  40. package/dist/component/{dext-number-input-rac-DfN-xRID.js → dext-number-input-rac-3-U9Hxre.js} +1 -1
  41. package/dist/component/{dext-phone-rac-b5Ix3aTQ.js → dext-phone-rac-CdMFXUNf.js} +1 -1
  42. package/dist/component/{dext-radio-group-rac-BAwIkDsJ.js → dext-radio-group-rac-Bg33r95T.js} +2 -2
  43. package/dist/component/{dext-rating-input-rac-mwQpCQUI.js → dext-rating-input-rac-DV8jA90b.js} +1 -1
  44. package/dist/component/{dext-tags-rac-BGmElgw8.js → dext-tags-rac-B-hpvZgE.js} +2 -2
  45. package/dist/component/{dext-text-area-rac-DN5HPqdg.js → dext-text-area-rac-kBBc0Xjo.js} +1 -1
  46. package/dist/component/{dext-text-input-rac-DEyDRhQ2.js → dext-text-input-rac-CImXblhX.js} +1 -1
  47. package/dist/component/{dext-url-input-rac-B1o3BAZE.js → dext-url-input-rac-J-7QABnD.js} +1 -1
  48. package/dist/component/dismiss-icon-Bw_zbdk_.js +69 -0
  49. package/dist/component/{donation-rac-Dp6PmATz.js → donation-rac-CvWwng6S.js} +6 -6
  50. package/dist/component/dropdown-field-rac-Dm9Qs8bh.js +40 -0
  51. package/dist/component/{dropdown-rac-eqQW-Z9k.js → dropdown-rac-BHqeUIje.js} +1 -1
  52. package/dist/component/{ecom-address-rac-Q02N1v6i.js → ecom-address-rac-NtuG7Q_T.js} +1 -1
  53. package/dist/component/{ecom-subscription-checkbox-rac-CmqVje9n.js → ecom-subscription-checkbox-rac-DAJnX_RJ.js} +2 -2
  54. package/dist/component/{email-input-field-rac-HmrdF3g7.js → email-input-field-rac-ompvaCLM.js} +4 -4
  55. package/dist/component/{events-repeater-rac-BSML2My0.js → events-repeater-rac-kHEFBH7l.js} +6 -6
  56. package/dist/component/{events-rsvp-rac-0pI3cb2e.js → events-rsvp-rac-R4F9aw6y.js} +4 -4
  57. package/dist/component/{field-error-headless-B3U_Gymg.js → field-error-headless-o2u5ldAp.js} +1 -1
  58. package/dist/component/{field-label-headless-Cyy9_5qJ.js → field-label-headless-DvNWYzXc.js} +1 -1
  59. package/dist/component/field-rac.module-D0QzJXUv.js +32 -0
  60. package/dist/component/{file-upload-rac-hR9TZqk2.js → file-upload-rac-DlE4dp0D.js} +5 -5
  61. package/dist/component/{fixed-payment-rac-CghZp6bR.js → fixed-payment-rac-BxsFHhXP.js} +4 -4
  62. package/dist/component/{form-BmSV4tOz.js → form-Co7SkMqj.js} +1701 -1688
  63. package/dist/component/form.css +1 -1
  64. package/dist/component/form.js +1 -1
  65. package/dist/component/{header-field-rac-C7LDm89o.js → header-field-rac-D56CKAtM.js} +2 -2
  66. package/dist/component/{header-rac-BNNzF5wQ.js → header-rac-DdYSBcq1.js} +1 -1
  67. package/dist/component/{image-choice-rac-DLgxkKIZ.js → image-choice-rac-g23R5qLL.js} +5 -5
  68. package/dist/component/{index-Dg8Fefid.js → index-BmOwghzn.js} +2 -2
  69. package/dist/component/{index-B8ObIJtL.js → index-C0yPsVXz.js} +4 -4
  70. package/dist/component/{isObjectLike-oBQcCfqW.js → isObjectLike-mlNAmhLJ.js} +1 -1
  71. package/dist/component/multiline-address-field-rac-ApBLSWB_.js +1818 -0
  72. package/dist/component/{multiline-address-rac-8MZkKfqY.js → multiline-address-rac-tdENoXBT.js} +1 -1
  73. package/dist/component/native-select-BbxBpe3S.js +32 -0
  74. package/dist/component/{number-input-field-rac-Dmp8pNIq.js → number-input-field-rac-CCIuPPeP.js} +5 -5
  75. package/dist/component/{number-input-rac-2cN_bN_s.js → number-input-rac-DxodjaRb.js} +1 -1
  76. package/dist/component/{password-rac-CFdC1hoi.js → password-rac-h9U6siGg.js} +5 -5
  77. package/dist/component/{payment-input-rac-BWElGzuv.js → payment-input-rac-YFXgnLS6.js} +5 -5
  78. package/dist/component/phone-input-field-rac-B9PUQJUP.js +558 -0
  79. package/dist/component/{phone-rac-CE9-90C3.js → phone-rac-B1Q9HXAB.js} +1 -1
  80. package/dist/component/{product-list-rac-QU7Ocwvy.js → product-list-rac-D63k_IAW.js} +6 -6
  81. package/dist/component/{quiz-radio-group-rac-Hm7B7RlU.js → quiz-radio-group-rac-Bl6DYjmg.js} +1 -1
  82. package/dist/component/{radio-button-module-classes-CcGF7N_Y.js → radio-button-module-classes-BRHKk6XZ.js} +3 -3
  83. package/dist/component/{radio-group-field-rac-Bk1JBBts.js → radio-group-field-rac-B8yEmx79.js} +5 -5
  84. package/dist/component/{radio-group-rac-D_YZnpID.js → radio-group-rac-xX_sfxL0.js} +1 -1
  85. package/dist/component/{rating-input-field-rac-zvA6QBGo.js → rating-input-field-rac-_p1u5oCL.js} +5 -5
  86. package/dist/component/{rating-input-rac-CXVQUoi-.js → rating-input-rac-C_i6Nwdz.js} +1 -1
  87. package/dist/component/{rich-content-rac.module-CnZ4lMBG.js → rich-content-rac.module-BlHWoitq.js} +1 -1
  88. package/dist/component/{rich-text-field-rac-DYQgVXdV.js → rich-text-field-rac-EiH-NdJm.js} +2 -2
  89. package/dist/component/{rich-text-rac-Dk8396e-.js → rich-text-rac-eZvghmFV.js} +1 -1
  90. package/dist/component/service-dropdown-rac-bujnhWyl.js +150 -0
  91. package/dist/component/{services-multi-choice-rac-D1RiVaLW.js → services-multi-choice-rac-FXrJOBdY.js} +7 -7
  92. package/dist/component/{signature-rac-DcGKMX84.js → signature-rac-CoVHMOpK.js} +5 -5
  93. package/dist/component/{submit-button-rac-DbMxQlNH.js → submit-button-rac-B8w753Be.js} +36 -36
  94. package/dist/component/{tags-field-rac-Bi4lKutL.js → tags-field-rac-iitBlZ8l.js} +6 -6
  95. package/dist/component/{tags-rac-DDCPnT8M.js → tags-rac-DJSUQlkc.js} +1 -1
  96. package/dist/component/{text-area-field-rac-cre_K0MD.js → text-area-field-rac-CePWfCbx.js} +5 -5
  97. package/dist/component/{text-area-rac-61wsMj-j.js → text-area-rac-m18L6Zwk.js} +1 -1
  98. package/dist/component/{text-input-field-rac-CV5_ba0x.js → text-input-field-rac-BSo_dbkm.js} +4 -4
  99. package/dist/component/{text-input-headless-kRv3KpSL.js → text-input-headless-D-o9wyGb.js} +3 -3
  100. package/dist/component/{text-input-rac-CwqZ6NXO.js → text-input-rac-CcGgoWaF.js} +1 -1
  101. package/dist/component/time-input-rac-DRIFM107.js +212 -0
  102. package/dist/component/to-native-time-Co_gOLkc.js +9 -0
  103. package/dist/component/{url-input-field-rac-C1JL_m6D.js → url-input-field-rac-Dpn9-sDD.js} +5 -5
  104. package/dist/component/{url-input-rac-C1CiGrCn.js → url-input-rac-CDSl1LX1.js} +1 -1
  105. package/dist/component/{use-dropdown-option-class-name-COGEk5d6.js → use-dropdown-option-class-name-CHg44uaJ.js} +3 -3
  106. package/dist/component/use-dropdown-trigger-class-name-Dpwl6OCY.js +137 -0
  107. package/dist/component/{use-element-state-class-name-pSOX0Y0p.js → use-element-state-class-name-BUu6zq-d.js} +1 -1
  108. package/dist/component/{use-hoverable-input-class-name-DGEpOAdi.js → use-hoverable-input-class-name-B1V7zCNe.js} +3 -3
  109. package/dist/component/{use-is-forced-open-dropdown-DPG1e5E9.js → use-is-forced-open-dropdown-BbHOZTaj.js} +1 -1
  110. package/dist/component/use-native-mobile-input-Ct8ysLL3.js +31 -0
  111. package/dist/component/use-native-state-class-name-B0m2ghbS.js +18 -0
  112. package/dist/component/{use-service-options-base-BgIZ94V9.js → use-service-options-base-u-WCeJHQ.js} +1 -1
  113. package/dist/component/use-text-input-class-name-DfNU2oQf.js +6 -0
  114. package/package.json +3 -2
  115. package/dist/component/date-input-field-rac-CiAaOiYY.js +0 -309
  116. package/dist/component/date-picker-field-rac-Dg-chlTL.js +0 -320
  117. package/dist/component/date-time-input-field-rac-CbDvEPIp.js +0 -441
  118. package/dist/component/dropdown-field-rac-DY3GGJgP.js +0 -36
  119. package/dist/component/field-rac.module-DcyJyi2B.js +0 -25
  120. package/dist/component/multiline-address-field-rac-CgH7lDce.js +0 -1738
  121. package/dist/component/phone-input-field-rac-CsJGw_OE.js +0 -520
  122. package/dist/component/service-dropdown-rac-BSXYuBPJ.js +0 -145
  123. package/dist/component/time-input-rac-DuQar6zW.js +0 -161
  124. package/dist/component/use-dropdown-trigger-class-name-D6c-3Lyw.js +0 -98
  125. package/dist/component/use-text-input-class-name-BcbHdFV-.js +0 -6
@@ -0,0 +1,212 @@
1
+ import e, { useCallback as Q, useRef as H, useContext as X } from "react";
2
+ import { RicosViewer as Y } from "@wix/ricos/viewer";
3
+ import u from "classnames";
4
+ import { bN as N, bK as k, bP as U, bY as g, X as z, am as G, M as J, I as W } from "./form-Co7SkMqj.js";
5
+ import { parseTime as Z } from "@internationalized/date";
6
+ import { mergeProps as $ } from "react-aria";
7
+ import { TimeField as ee, DateInput as te, DateSegment as v, TimeFieldStateContext as ne } from "react-aria-components";
8
+ import { f as m, a as _ } from "./find-child-C60k4CxG.js";
9
+ import { D as re, E as ae } from "./field-error-headless-o2u5ldAp.js";
10
+ import { L as oe } from "./field-label-headless-DvNWYzXc.js";
11
+ import { u as le, a as se, N as ie, D as ce } from "./dismiss-icon-Bw_zbdk_.js";
12
+ import { u as me, N as ue } from "./use-native-mobile-input-Ct8ysLL3.js";
13
+ import { t as de } from "./to-native-time-Co_gOLkc.js";
14
+ import { u as pe } from "./use-native-state-class-name-B0m2ghbS.js";
15
+ import { E as Ee } from "./error-icon-hZxQ6DEy.js";
16
+ import { H as B } from "./custom-focus-class-_483Pkwp.js";
17
+ import { s as f } from "./field-rac.module-D0QzJXUv.js";
18
+ import { u as x } from "./use-text-input-class-name-DfNU2oQf.js";
19
+ const n = ({ children: t }) => {
20
+ const { id: r, value: a, onChange: s, disabled: i, readOnly: o, required: c, onBlur: l, onFocus: p, use24HourFormat: S, FieldLayout: F, hasError: y } = N(), { inputId: C, ariaDescribedBy: D, labelId: b } = k(), T = me(), h = Q((j) => {
21
+ const K = w(j);
22
+ s(K);
23
+ }, [
24
+ s
25
+ ]), R = m(t, n.Label), L = m(t, n.Time), P = m(t, n.Description), O = m(t, n.Error), A = m(t, n.NativeTime), M = V(a), E = T ? A : /* @__PURE__ */ e.createElement(ee, {
26
+ "aria-labelledby": b,
27
+ id: C,
28
+ "aria-describedby": D,
29
+ value: M,
30
+ onChange: h,
31
+ isDisabled: i,
32
+ isReadOnly: o,
33
+ isInvalid: y,
34
+ isRequired: c,
35
+ onBlur: l,
36
+ onFocus: p,
37
+ hourCycle: S ? 24 : 12
38
+ }, L);
39
+ return /* @__PURE__ */ e.createElement(F, {
40
+ fieldId: r,
41
+ renderLabel: () => R,
42
+ renderInput: () => E,
43
+ renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, O, P)
44
+ });
45
+ }, d = ({ children: t, className: r }) => {
46
+ const { hasError: a, hidePlaceholder: s } = N(), i = m(t, d.Hour), o = m(t, d.Minute), c = m(t, d.Period);
47
+ return /* @__PURE__ */ e.createElement(te, {
48
+ className: r,
49
+ "data-invalid": a || void 0,
50
+ "data-placeholder-hidden": s || void 0
51
+ }, (l) => {
52
+ switch (l.type) {
53
+ case "hour":
54
+ return _(i, {
55
+ segment: l
56
+ }) || /* @__PURE__ */ e.createElement(e.Fragment, null);
57
+ case "minute":
58
+ return _(o, {
59
+ segment: l
60
+ }) || /* @__PURE__ */ e.createElement(e.Fragment, null);
61
+ case "dayPeriod":
62
+ return _(c, {
63
+ segment: l
64
+ }) || /* @__PURE__ */ e.createElement(e.Fragment, null);
65
+ case "literal":
66
+ return /* @__PURE__ */ e.createElement(v, {
67
+ segment: l
68
+ });
69
+ default:
70
+ return /* @__PURE__ */ e.createElement(e.Fragment, null);
71
+ }
72
+ });
73
+ }, fe = ({ className: t, ...r }) => {
74
+ const { id: a, hidePlaceholder: s } = N(), { segment: i } = r, { t: o } = g(), c = H(null);
75
+ U(() => {
76
+ var p;
77
+ (p = c.current) == null || p.focus({
78
+ preventScroll: !0
79
+ });
80
+ }, a);
81
+ const l = s ? void 0 : o("field.date.placeholder.hour");
82
+ return /* @__PURE__ */ e.createElement(v, {
83
+ ref: c,
84
+ segment: i,
85
+ className: t,
86
+ ...l && {
87
+ placeholder: l
88
+ }
89
+ });
90
+ }, Ne = ({ className: t, ...r }) => {
91
+ const { hidePlaceholder: a } = N(), { segment: s } = r, { t: i } = g(), o = a ? void 0 : i("field.date.placeholder.minute");
92
+ return /* @__PURE__ */ e.createElement(v, {
93
+ segment: s,
94
+ className: t,
95
+ ...o && {
96
+ placeholder: o
97
+ }
98
+ });
99
+ }, Ce = ({ className: t, ...r }) => {
100
+ const { hidePlaceholder: a } = N(), { segment: s } = r, { t: i } = g(), o = X(ne), c = a ? void 0 : i("field.date.placeholder.period"), l = () => o == null ? void 0 : o.increment("dayPeriod");
101
+ return /* @__PURE__ */ e.createElement(v, {
102
+ segment: s,
103
+ className: t,
104
+ onClick: l,
105
+ ...c && {
106
+ placeholder: c
107
+ }
108
+ });
109
+ };
110
+ d.Hour = fe;
111
+ d.Minute = Ne;
112
+ d.Period = Ce;
113
+ const q = ({ className: t, children: r }) => {
114
+ const { id: a, value: s, onChange: i, required: o, disabled: c, readOnly: l, hasError: p, onBlur: S, onFocus: F } = N(), { inputId: y, labelId: C, ariaDescribedBy: D } = k(), b = H(null), T = H(null);
115
+ U(() => {
116
+ var E;
117
+ (E = b.current) == null || E.focus({
118
+ preventScroll: !0
119
+ });
120
+ }, a);
121
+ const h = de(V(s)), { announcement: R, announceCleared: L } = le(!!h), P = !!h && !o && !c && !l, O = m(r, q.Clear), { className: A, stateProps: M } = pe(t);
122
+ return /* @__PURE__ */ e.createElement(ue, {
123
+ ref: T,
124
+ groupLabelId: C,
125
+ announcement: R
126
+ }, /* @__PURE__ */ e.createElement(se, {
127
+ ref: b,
128
+ type: "time",
129
+ id: y,
130
+ className: A,
131
+ ...$(M, {
132
+ onFocus: F,
133
+ onBlur: S
134
+ }),
135
+ "aria-labelledby": C,
136
+ "aria-describedby": D,
137
+ "aria-invalid": p || void 0,
138
+ value: h,
139
+ onChange: (E) => i(w(V(E))),
140
+ disabled: c,
141
+ readOnly: l,
142
+ required: o
143
+ }), P ? _(O, {
144
+ input: b,
145
+ control: T,
146
+ labelId: C,
147
+ onClear: () => {
148
+ i(null), L();
149
+ }
150
+ }) : null);
151
+ };
152
+ q.Clear = ie;
153
+ n.Label = oe;
154
+ n.NativeTime = q;
155
+ n.Time = d;
156
+ n.Description = re;
157
+ n.Error = ae;
158
+ function V(t) {
159
+ if (!t)
160
+ return null;
161
+ try {
162
+ return Z(t);
163
+ } catch {
164
+ return null;
165
+ }
166
+ }
167
+ function w(t) {
168
+ if (!t)
169
+ return null;
170
+ const r = String(t.hour).padStart(2, "0"), a = String(t.minute).padStart(2, "0"), s = String(t.second).padStart(2, "0");
171
+ return [
172
+ r,
173
+ a,
174
+ s
175
+ ].join(":");
176
+ }
177
+ const be = "_time_5p151_1", he = "_hour_5p151_17", Te = "_minute_5p151_18", Ie = "_period_5p151_19", I = {
178
+ time: be,
179
+ hour: he,
180
+ minute: Te,
181
+ period: Ie
182
+ }, _e = ({ content: t, locale: r }) => /* @__PURE__ */ e.createElement(Y, {
183
+ content: t,
184
+ locale: r
185
+ }), ge = () => {
186
+ const t = x(I.time), r = x(f.nativeInput), { t: a } = g();
187
+ return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(n.Label, {
188
+ className: u(z, f.label)
189
+ }, /* @__PURE__ */ e.createElement(n.Label.Required, {
190
+ className: u(G, f.requiredMark)
191
+ })), /* @__PURE__ */ e.createElement(n.Time, {
192
+ className: t
193
+ }, /* @__PURE__ */ e.createElement(n.Time.Hour, {
194
+ className: u(I.hour, B)
195
+ }), /* @__PURE__ */ e.createElement(n.Time.Minute, {
196
+ className: u(I.minute, B)
197
+ }), /* @__PURE__ */ e.createElement(n.Time.Period, {
198
+ className: u(I.period, B)
199
+ })), /* @__PURE__ */ e.createElement(n.NativeTime, {
200
+ className: r
201
+ }, /* @__PURE__ */ e.createElement(n.NativeTime.Clear, {
202
+ className: f.nativeClearButton,
203
+ "aria-label": a("date-picker.a11y.clear-button")
204
+ }, /* @__PURE__ */ e.createElement(ce, null))), /* @__PURE__ */ e.createElement(n.Error, {
205
+ className: u(J, f.error)
206
+ }, /* @__PURE__ */ e.createElement(Ee, null), /* @__PURE__ */ e.createElement(n.Error.Text, null)), /* @__PURE__ */ e.createElement(n.Description, {
207
+ className: u(W, f.description)
208
+ }, _e));
209
+ }, we = () => /* @__PURE__ */ e.createElement(ge, null);
210
+ export {
211
+ we as TimeInputRAC
212
+ };
@@ -0,0 +1,9 @@
1
+ const o = (t) => {
2
+ if (!t)
3
+ return "";
4
+ const r = String(t.hour).padStart(2, "0"), n = String(t.minute).padStart(2, "0");
5
+ return `${r}:${n}`;
6
+ };
7
+ export {
8
+ o as t
9
+ };
@@ -2,14 +2,14 @@ import { RicosViewer as S } from "@wix/ricos/viewer";
2
2
  import i from "classnames";
3
3
  import r, { useCallback as h, useRef as y } from "react";
4
4
  import { TextField as O, Input as A } from "react-aria-components";
5
- import { bN as d, bK as E, bP as P, bW as v, X as B, am as M, M as T, I as g } from "./form-BmSV4tOz.js";
5
+ import { bN as d, bK as E, bP as P, bW as v, X as B, am as M, M as T, I as g } from "./form-Co7SkMqj.js";
6
6
  import { f as c } from "./find-child-C60k4CxG.js";
7
- import { D as k, E as q } from "./field-error-headless-B3U_Gymg.js";
8
- import { L as x } from "./field-label-headless-Cyy9_5qJ.js";
7
+ import { D as k, E as q } from "./field-error-headless-o2u5ldAp.js";
8
+ import { L as x } from "./field-label-headless-DvNWYzXc.js";
9
9
  import { u as U } from "./use-invoke-callback-UH73A_J3.js";
10
10
  import { E as V } from "./error-icon-hZxQ6DEy.js";
11
- import { s as u } from "./field-rac.module-DcyJyi2B.js";
12
- import { u as W } from "./use-text-input-class-name-BcbHdFV-.js";
11
+ import { s as u } from "./field-rac.module-D0QzJXUv.js";
12
+ import { u as W } from "./use-text-input-class-name-DfNU2oQf.js";
13
13
  const w = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
14
14
  const { id: o, value: a, onChange: l, disabled: m, readOnly: s, required: n, hasError: I, onBlur: b, onFocus: f, FieldLayout: R } = d(), { labelId: F } = E(), p = U(b), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), N = h(() => {
15
15
  l(w(a)), p();
@@ -1,5 +1,5 @@
1
1
  import r from "react";
2
- import { U as t } from "./url-input-field-rac-C1JL_m6D.js";
2
+ import { U as t } from "./url-input-field-rac-Dpn9-sDD.js";
3
3
  const n = () => /* @__PURE__ */ r.createElement(t, null);
4
4
  export {
5
5
  n as UrlInputRAC
@@ -1,9 +1,9 @@
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
3
  import P from "classnames";
4
- import { s as h } from "./field-rac.module-DcyJyi2B.js";
5
- import { K as T } from "./form-BmSV4tOz.js";
6
- import { u as H } from "./use-element-state-class-name-pSOX0Y0p.js";
4
+ import { s as h } from "./field-rac.module-D0QzJXUv.js";
5
+ import { K as T } from "./form-Co7SkMqj.js";
6
+ import { u as H } from "./use-element-state-class-name-BUu6zq-d.js";
7
7
  const R = 1 / 0, I = {
8
8
  position: "absolute",
9
9
  width: 0,
@@ -0,0 +1,137 @@
1
+ import t, { useState as T, useCallback as R, useRef as V } from "react";
2
+ import { UNSAFE_PortalProvider as U, mergeProps as W } from "react-aria";
3
+ import { VisuallyHidden as j, Select as z, SelectValue as J, ListBoxItem as Q } from "react-aria-components";
4
+ import { bN as g, bK as L, bY as X, bP as B, L as Z } from "./form-Co7SkMqj.js";
5
+ import { f as u, a as q } from "./find-child-C60k4CxG.js";
6
+ import { D as ee, E as te } from "./field-error-headless-o2u5ldAp.js";
7
+ import { L as ae } from "./field-label-headless-DvNWYzXc.js";
8
+ import { u as re, N as ne } from "./use-native-mobile-input-Ct8ysLL3.js";
9
+ import { N as le } from "./native-select-BbxBpe3S.js";
10
+ import { E as se, S as oe, N as ie } from "./non-modal-popover-D-u13tmp.js";
11
+ import { b as ce } from "./use-is-forced-open-dropdown-BbHOZTaj.js";
12
+ import { u as de } from "./use-native-state-class-name-B0m2ghbS.js";
13
+ import { V as ue } from "./use-dropdown-option-class-name-CHg44uaJ.js";
14
+ import { u as me } from "./use-hoverable-input-class-name-B1V7zCNe.js";
15
+ const s = ({ children: e }) => {
16
+ const { id: r, value: o, defaultValue: a, options: d = [], readOnly: n, onChange: l, placeholder: m, disabled: c, required: p, onBlur: v, onFocus: N, FieldLayout: O, hasError: C } = g(), [F, y] = T(!1), b = ce(r), [f, D] = T(null), I = re(), i = _(o, a, d), { labelId: S } = L(), { t: w } = X(), P = `${S}-required`, x = R((E) => {
17
+ n || l(typeof E == "string" ? E : null);
18
+ }, [
19
+ l,
20
+ n
21
+ ]), M = R((E) => y(E && !c && !n), [
22
+ c,
23
+ n
24
+ ]), A = u(e, s.Label), H = u(e, s.Trigger), $ = u(e, s.Options), k = u(e, s.Description), G = u(e, s.Error), Y = u(e, s.NativeSelect), K = I ? Y : /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
25
+ ref: D,
26
+ style: {
27
+ display: "contents"
28
+ }
29
+ }), p ? /* @__PURE__ */ t.createElement(j, {
30
+ id: P
31
+ }, w("settings.required-indicator-text")) : null, /* @__PURE__ */ t.createElement(U, {
32
+ getContainer: () => f
33
+ }, /* @__PURE__ */ t.createElement(z, {
34
+ "aria-labelledby": p ? `${S} ${P}` : S,
35
+ value: i,
36
+ isOpen: b || F && !c && !n,
37
+ onOpenChange: b ? void 0 : M,
38
+ onChange: x,
39
+ isDisabled: c,
40
+ isInvalid: C,
41
+ isRequired: p,
42
+ placeholder: m || se,
43
+ onBlur: v,
44
+ onFocus: N
45
+ }, H, q($, {
46
+ isForcedOpen: b
47
+ }))));
48
+ return /* @__PURE__ */ t.createElement(O, {
49
+ fieldId: r,
50
+ renderLabel: () => A,
51
+ renderInput: () => K,
52
+ renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, G, k)
53
+ });
54
+ }, pe = ({ children: e, className: r }) => {
55
+ const { inputId: o, ariaDescribedBy: a } = L(), { id: d, hasError: n, isLoading: l } = g(), m = V(null);
56
+ return B(() => {
57
+ var c;
58
+ (c = m.current) == null || c.focus({
59
+ preventScroll: !0
60
+ });
61
+ }, d), /* @__PURE__ */ t.createElement(oe, {
62
+ ref: m,
63
+ id: o,
64
+ "aria-describedby": a,
65
+ className: r,
66
+ "data-invalid": n || void 0,
67
+ "data-loading": l || void 0
68
+ }, /* @__PURE__ */ t.createElement(J, null), e);
69
+ }, h = ({ children: e, className: r, ...o }) => {
70
+ const { isForcedOpen: a } = o, { options: d = [] } = g(), n = u(e, h.Option);
71
+ return /* @__PURE__ */ t.createElement(ie, {
72
+ className: r,
73
+ containerPadding: 0,
74
+ offset: 0
75
+ }, /* @__PURE__ */ t.createElement(ue, {
76
+ isForcedOpen: a,
77
+ autoFocus: a ? !1 : void 0
78
+ }, d.map((l) => q(n, {
79
+ key: l.value ?? l.label,
80
+ value: l.value ?? l.label,
81
+ label: l.label
82
+ }))));
83
+ }, be = ({ className: e, ...r }) => {
84
+ const { value: o, label: a } = r;
85
+ return /* @__PURE__ */ t.createElement(Q, {
86
+ className: e,
87
+ id: o,
88
+ textValue: a
89
+ }, a);
90
+ };
91
+ h.Option = be;
92
+ const fe = ({ className: e, children: r }) => {
93
+ const { id: o, value: a, defaultValue: d, options: n = [], readOnly: l, onChange: m, placeholder: c, disabled: p, required: v, onBlur: N, onFocus: O, hasError: C } = g(), { inputId: F, labelId: y, ariaDescribedBy: b } = L(), f = V(null);
94
+ B(() => {
95
+ var i;
96
+ (i = f.current) == null || i.focus({
97
+ preventScroll: !0
98
+ });
99
+ }, o);
100
+ const { className: D, stateProps: I } = de(e);
101
+ return /* @__PURE__ */ t.createElement(ne, null, /* @__PURE__ */ t.createElement(le, {
102
+ ref: f,
103
+ id: F,
104
+ className: D,
105
+ ...W(I, {
106
+ onFocus: O,
107
+ onBlur: N
108
+ }),
109
+ "aria-labelledby": y,
110
+ "aria-describedby": b,
111
+ "aria-invalid": C || void 0,
112
+ value: _(a, d, n),
113
+ options: n.map((i) => ({
114
+ value: i.value ?? i.label,
115
+ label: i.label
116
+ })),
117
+ placeholder: c,
118
+ onChange: (i) => m(i || null),
119
+ disabled: p,
120
+ readOnly: l,
121
+ required: v
122
+ }), r);
123
+ };
124
+ s.Label = ae;
125
+ s.NativeSelect = fe;
126
+ s.Trigger = pe;
127
+ s.Options = h;
128
+ s.Description = ee;
129
+ s.Error = te;
130
+ function _(e, r, o) {
131
+ return e && o.some((a) => (a.value ?? a.label) === e) ? e : r || null;
132
+ }
133
+ const Te = (...e) => me(Z, e);
134
+ export {
135
+ s as D,
136
+ Te as u
137
+ };
@@ -1,5 +1,5 @@
1
1
  import i from "classnames";
2
- import { bG as s, bc as v } from "./form-BmSV4tOz.js";
2
+ import { bG as s, bc as v } from "./form-Co7SkMqj.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 { bN as n } from "./form-BmSV4tOz.js";
2
- import { s as e } from "./field-rac.module-DcyJyi2B.js";
3
- import { u } from "./use-element-state-class-name-pSOX0Y0p.js";
1
+ import { bN as n } from "./form-Co7SkMqj.js";
2
+ import { s as e } from "./field-rac.module-D0QzJXUv.js";
3
+ import { u } from "./use-element-state-class-name-BUu6zq-d.js";
4
4
  const b = (s, a) => {
5
5
  const { disabled: t, readOnly: o } = n(), r = u({
6
6
  globalClasses: s,
@@ -1,5 +1,5 @@
1
1
  import { useContext as u, useMemo as a } from "react";
2
- import { bH as c, aR as p, bF as E, F as o } from "./form-BmSV4tOz.js";
2
+ import { bH as c, aR as p, bF as E, F as o } from "./form-Co7SkMqj.js";
3
3
  const D = [
4
4
  o.DROPDOWN,
5
5
  o.DEXT_DROPDOWN,
@@ -0,0 +1,31 @@
1
+ import o, { forwardRef as r, useSyncExternalStore as a } from "react";
2
+ import { VisuallyHidden as c } from "react-aria-components";
3
+ import { bI as d, d as l } from "./form-Co7SkMqj.js";
4
+ const E = {
5
+ position: "relative"
6
+ }, p = /* @__PURE__ */ r(({ groupLabelId: t, announcement: e, children: s }, i) => /* @__PURE__ */ o.createElement("div", {
7
+ ref: i,
8
+ style: E,
9
+ ...t && {
10
+ role: "group",
11
+ "aria-labelledby": t,
12
+ tabIndex: -1
13
+ }
14
+ }, s, e !== void 0 && /* @__PURE__ */ o.createElement(c, {
15
+ role: "status"
16
+ }, e)));
17
+ p.displayName = "NativeControl";
18
+ const f = "(max-width: 750px)", n = () => typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia(f) : void 0, m = (t) => {
19
+ const e = n();
20
+ return e == null || e.addEventListener("change", t), () => e == null ? void 0 : e.removeEventListener("change", t);
21
+ }, u = () => {
22
+ var t;
23
+ return ((t = n()) == null ? void 0 : t.matches) ?? !1;
24
+ }, w = () => !1, I = () => a(m, u, w), M = () => {
25
+ const { isExperimentEnabled: t } = d(), e = I();
26
+ return t(l.ERC_NATIVE_MOBILE_INPUTS) && e;
27
+ };
28
+ export {
29
+ p as N,
30
+ M as u
31
+ };
@@ -0,0 +1,18 @@
1
+ import { useState as c } from "react";
2
+ import { useHover as n, useFocus as i, mergeProps as a } from "react-aria";
3
+ const m = (s) => {
4
+ const { hoverProps: o, isHovered: e } = n({}), [t, r] = c(!1), { focusProps: u } = i({
5
+ onFocusChange: r
6
+ });
7
+ return {
8
+ className: typeof s == "function" ? s({
9
+ isHovered: e,
10
+ isFocused: t,
11
+ isFocusWithin: !1
12
+ }) : s,
13
+ stateProps: a(o, u)
14
+ };
15
+ };
16
+ export {
17
+ m as u
18
+ };
@@ -1,5 +1,5 @@
1
1
  import { useState as o, useCallback as y, useEffect as m, useMemo as D } from "react";
2
- import { bM as v } from "./form-BmSV4tOz.js";
2
+ import { bM as v } from "./form-Co7SkMqj.js";
3
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) => ({
@@ -0,0 +1,6 @@
1
+ import { az as a } from "./form-Co7SkMqj.js";
2
+ import { u as e } from "./use-hoverable-input-class-name-B1V7zCNe.js";
3
+ const m = (...s) => e(a, s);
4
+ export {
5
+ m as u
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/form-elements",
3
- "version": "1.224.0",
3
+ "version": "1.226.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": [
@@ -58,6 +58,7 @@
58
58
  "@wix/services-definitions": "^1.0.5",
59
59
  "@wix/site-service-captcha": "^1.0.1",
60
60
  "@wix/site-service-editor-context": "^1.0.7",
61
+ "@wix/site-service-experiments": "^1.0.8",
61
62
  "@wix/site-service-lightbox": "^3.0.0",
62
63
  "@wix/site-service-locale": "^1.0.10",
63
64
  "@wix/site-service-pages": "^1.10.0",
@@ -156,5 +157,5 @@
156
157
  ]
157
158
  }
158
159
  },
159
- "falconPackageHash": "bb6d402e938b6b0bb29e70d89e98b1683d4fffb003bd5282936de45d"
160
+ "falconPackageHash": "d57d129a5727057713fdfa451c2854d81891d0587a8e8de3fa040206"
160
161
  }