@wix/form-elements 1.159.0 → 1.161.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-CpiyUOXo.js → appointment-rac-BubC8I9X.js} +388 -381
  2. package/dist/component/{bookings-address-rac-BBEUV1t7.js → bookings-address-rac-BbwvVs86.js} +1 -1
  3. package/dist/component/{bookings-email-rac-DdfoeLFV.js → bookings-email-rac-C2HCkcfa.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-DH39yvQ-.js → bookings-first-name-rac-Uy7c5EBs.js} +1 -1
  5. package/dist/component/{bookings-header-rac-StLm7b4I.js → bookings-header-rac-nmwsWRjS.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-DHZMPMOO.js → bookings-last-name-rac-BAioQLCg.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-DrHp1ojM.js → bookings-login-bar-rac-CO6vOBjG.js} +5 -5
  8. package/dist/component/{bookings-phone-rac-6aGjbavK.js → bookings-phone-rac-Cr16h-_R.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-DBlGZUM5.js → bookings-rich-text-rac-CHLH3jd7.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-Cna1Va1X.js → checkbox-field-rac-CMwmwFMD.js} +4 -4
  11. package/dist/component/{checkbox-group-field-headless-m_-10Mdx.js → checkbox-group-field-headless-BNs_S-nT.js} +50 -50
  12. package/dist/component/{checkbox-group-field-rac-BSCi5hmx.js → checkbox-group-field-rac-BA60EPAN.js} +12 -12
  13. package/dist/component/{checkbox-group-rac-BWYQZmAI.js → checkbox-group-rac-BJZ4Oer9.js} +1 -1
  14. package/dist/component/{checkbox-rac-BsUTfSUf.js → checkbox-rac-KsVlI6_V.js} +1 -1
  15. package/dist/component/{contacts-address-rac-DwCLW8rV.js → contacts-address-rac-CRYkz87z.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-DnNgxbKb.js → contacts-birthdate-rac-BIz-1-ZX.js} +1 -1
  17. package/dist/component/{contacts-company-rac-BQqXzpNl.js → contacts-company-rac-B8G__j6I.js} +1 -1
  18. package/dist/component/{contacts-email-rac-BINnZzxp.js → contacts-email-rac-Dztkvp5i.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-DBWKFkIU.js → contacts-first-name-rac-CVSEWpLU.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-D_-qrF7I.js → contacts-last-name-rac-Blz4M5bk.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-7n7JkSDr.js → contacts-phone-rac-CPCE5soY.js} +1 -1
  22. package/dist/component/{contacts-position-rac-DvXP8nvT.js → contacts-position-rac-Dd_kBjqG.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-DnLnV5Gm.js → contacts-subscribe-rac-C6AlsP10.js} +1 -1
  24. package/dist/component/{contacts-tax-id-rac-BJVWhvYW.js → contacts-tax-id-rac-CQ1n29zI.js} +1 -1
  25. package/dist/component/{date-availability-Df807-eN.js → date-availability-DDj1j0z5.js} +1 -1
  26. package/dist/component/date-input-field-rac-D5r1n_ah.js +309 -0
  27. package/dist/component/{date-input-rac-CSB3MWHW.js → date-input-rac-Cyi5mU_P.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-CySThPfz.js → date-picker-field-rac-CeG391Zo.js} +79 -79
  29. package/dist/component/{date-picker-rac-Fp8_pxtf.js → date-picker-rac-Ci9aHgav.js} +1 -1
  30. package/dist/component/date-time-input-field-rac-CrbYEbJJ.js +441 -0
  31. package/dist/component/{date-time-input-rac-wctMR4uM.js → date-time-input-rac-DDJLkqs0.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-erMPfwFL.js → dext-checkbox-group-rac-C3ftVHBA.js} +4 -4
  33. package/dist/component/{dext-checkbox-rac-DQSq9Lqd.js → dext-checkbox-rac-BGLYWn68.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-RCLcd1VV.js → dext-date-picker-rac-Cy9RlDlt.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-DMolWzvy.js → dext-date-time-input-rac-88ZoTd5e.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-wQ2GJL4V.js → dext-dropdown-rac-CPxDUuk9.js} +1 -1
  37. package/dist/component/{dext-email-rac-BtymBVTW.js → dext-email-rac-BAvQwDPA.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-DHPiK0Z3.js → dext-number-input-rac-D7HYQVKq.js} +1 -1
  39. package/dist/component/{dext-phone-rac-C58vHEEe.js → dext-phone-rac--FhcplSI.js} +1 -1
  40. package/dist/component/dext-radio-group-rac-DBz8iCKW.js +18 -0
  41. package/dist/component/{dext-rating-input-rac-DI0k3tVa.js → dext-rating-input-rac-Cv7nThfe.js} +1 -1
  42. package/dist/component/{dext-tags-rac-DmF6ctvQ.js → dext-tags-rac-CRUUc5dr.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-Bv6ridbR.js → dext-text-area-rac-DQBQXV1L.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-DoTAdUgU.js → dext-text-input-rac-4CpM581y.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-BuoMS6g2.js → dext-url-input-rac-0C1jTEr9.js} +1 -1
  46. package/dist/component/{donation-rac-CjZalSgn.js → donation-rac-Cgt0ZE50.js} +79 -79
  47. package/dist/component/{dropdown-field-rac-By_fpqhx.js → dropdown-field-rac-DlGKR7pZ.js} +14 -14
  48. package/dist/component/{dropdown-rac-BnIEC4RX.js → dropdown-rac-CYFW_3x_.js} +1 -1
  49. package/dist/component/{ecom-address-rac-B6Usk1Ty.js → ecom-address-rac-CQfQHpXC.js} +1 -1
  50. package/dist/component/{ecom-subscription-checkbox-rac-B4B0wzlC.js → ecom-subscription-checkbox-rac-D2v2Upvz.js} +2 -2
  51. package/dist/component/{email-input-field-rac-Df3KI3_v.js → email-input-field-rac-CVw25yRo.js} +39 -39
  52. package/dist/component/{events-repeater-rac-B2iBk8lV.js → events-repeater-rac-BCVUcmFj.js} +25 -25
  53. package/dist/component/{events-rsvp-rac-xl_qCIh3.js → events-rsvp-rac-DwbqEr8z.js} +18 -18
  54. package/dist/component/{field-error-headless-DWc76YmY.js → field-error-headless-XnVcMmsL.js} +3 -3
  55. package/dist/component/{field-label-headless-DKBKqI2X.js → field-label-headless-BRTLT2Yt.js} +16 -16
  56. package/dist/component/{file-upload-rac-BVj4cRqe.js → file-upload-rac-Dkwg9Jk4.js} +118 -118
  57. package/dist/component/{fixed-payment-rac-BS1Hb4hg.js → fixed-payment-rac-ST98xAa2.js} +13 -13
  58. package/dist/component/{form-BTUoOcqB.js → form-BUqSKOvc.js} +785 -727
  59. package/dist/component/form.js +1 -1
  60. package/dist/component/{header-field-rac-DTJ_Us6u.js → header-field-rac-CzNTGYWq.js} +6 -6
  61. package/dist/component/{header-rac-CvYp0Jjo.js → header-rac-DUt6AIAE.js} +1 -1
  62. package/dist/component/{image-choice-rac--qrYqKJl.js → image-choice-rac-DuBgrSt2.js} +23 -23
  63. package/dist/component/{index-DIl9BH2M.js → index-CDO22hht.js} +66 -66
  64. package/dist/component/{index-CoEV4QEy.js → index-cZZeAuuu.js} +2 -2
  65. package/dist/component/{isObjectLike-CLN09X5V.js → isObjectLike-cs4bARpC.js} +11 -11
  66. package/dist/component/multiline-address-field-rac-vcEWhUCV.js +1664 -0
  67. package/dist/component/{multiline-address-rac-DtaAJjbR.js → multiline-address-rac-WQaI2eUX.js} +1 -1
  68. package/dist/component/{number-input-field-rac-2gqDUlw9.js → number-input-field-rac-CBUMqATk.js} +23 -23
  69. package/dist/component/{number-input-rac-BlciEPLN.js → number-input-rac-B4j5hyzS.js} +1 -1
  70. package/dist/component/{password-rac-BvvQgafk.js → password-rac-DwLyf45N.js} +27 -27
  71. package/dist/component/{payment-input-rac-CSRyOPPr.js → payment-input-rac-D0Od---y.js} +31 -31
  72. package/dist/component/phone-input-field-rac-COlu9IeC.js +512 -0
  73. package/dist/component/{phone-rac-DMP1MoRs.js → phone-rac-Dh4RacOF.js} +1 -1
  74. package/dist/component/{product-list-rac-WQ9Qhzum.js → product-list-rac-D7zHDE2D.js} +39 -39
  75. package/dist/component/{quiz-radio-group-rac-DzrL3-gZ.js → quiz-radio-group-rac-1AaKphJt.js} +1 -1
  76. package/dist/component/{radio-button-module-classes-CJk18LzO.js → radio-button-module-classes-VqaP6vpA.js} +30 -30
  77. package/dist/component/{radio-group-field-rac-DGoMoSgo.js → radio-group-field-rac-Cp3LRN3C.js} +8 -8
  78. package/dist/component/{radio-group-rac-DhAELVNV.js → radio-group-rac-KhmhzYGf.js} +1 -1
  79. package/dist/component/{rating-input-field-rac-CFoesqmC.js → rating-input-field-rac-10n6ciCr.js} +39 -39
  80. package/dist/component/{rating-input-rac-CFMIxche.js → rating-input-rac-XZjjY2Gp.js} +1 -1
  81. package/dist/component/{rich-content-rac.module-xJ03MegT.js → rich-content-rac.module-kMwDoLBa.js} +8 -8
  82. package/dist/component/{rich-text-field-rac-CBMY4JOB.js → rich-text-field-rac-H5bd8fAt.js} +4 -4
  83. package/dist/component/{rich-text-rac-CvZ7s1Ct.js → rich-text-rac-88GSQR62.js} +1 -1
  84. package/dist/component/service-dropdown-rac-B1_Xr_X3.js +145 -0
  85. package/dist/component/{services-multi-choice-rac-fXOov4K7.js → services-multi-choice-rac-DWp_Llbi.js} +11 -11
  86. package/dist/component/{signature-rac-CG_Q9Oxr.js → signature-rac-zN_6KRDp.js} +82 -82
  87. package/dist/component/{submit-button-rac-DAsovEp2.js → submit-button-rac-Dv6UarYX.js} +12 -12
  88. package/dist/component/{tags-field-rac-9mpOMPLm.js → tags-field-rac-sVN6MHfJ.js} +43 -43
  89. package/dist/component/{tags-rac-CNBJ08wS.js → tags-rac-DhTHs_XN.js} +1 -1
  90. package/dist/component/{text-area-field-rac-D4aTm7CM.js → text-area-field-rac-DrWkww7W.js} +19 -19
  91. package/dist/component/{text-area-rac-DoKiH_Kv.js → text-area-rac-CXXh-ZdY.js} +1 -1
  92. package/dist/component/{text-input-field-rac-BbvPB26b.js → text-input-field-rac-C2YiMr-g.js} +5 -5
  93. package/dist/component/text-input-headless-BJMNbsMY.js +47 -0
  94. package/dist/component/{text-input-rac-1ac1EKad.js → text-input-rac-CpsPh7FH.js} +1 -1
  95. package/dist/component/{time-input-rac-BS0rR-89.js → time-input-rac-DG_1KxS4.js} +20 -20
  96. package/dist/component/{url-input-field-rac-DbO6ATng.js → url-input-field-rac-twxRREnl.js} +19 -19
  97. package/dist/component/{url-input-rac-DHuny3d-.js → url-input-rac-BTStO0NP.js} +1 -1
  98. package/dist/component/use-dropdown-option-class-name-DbMMg1ws.js +116 -0
  99. package/dist/component/use-dropdown-trigger-class-name-Yes4kC_0.js +96 -0
  100. package/dist/component/{use-element-state-class-name-BUsFQfoW.js → use-element-state-class-name-DlncY4hk.js} +1 -1
  101. package/dist/component/{use-hoverable-input-class-name-C2l3G8gb.js → use-hoverable-input-class-name-C__zqP5j.js} +2 -2
  102. package/dist/component/use-is-forced-open-dropdown-DnK_MQRO.js +53 -0
  103. package/dist/component/{use-service-options-base-D_enm38a.js → use-service-options-base-DKJe52Vk.js} +6 -6
  104. package/dist/component/use-text-input-class-name-D9tJTR-b.js +6 -0
  105. package/dist/form.d.ts +11 -0
  106. package/package.json +2 -2
  107. package/dist/component/date-input-field-rac-CEuPElMH.js +0 -303
  108. package/dist/component/date-time-input-field-rac-DG5KSBHe.js +0 -433
  109. package/dist/component/dext-radio-group-rac-Cp-I94HW.js +0 -18
  110. package/dist/component/dropdown-field-headless-BYEjiIUf.js +0 -93
  111. package/dist/component/multiline-address-field-rac-BjWzx-LH.js +0 -1659
  112. package/dist/component/phone-input-field-rac-BVWzH_TY.js +0 -508
  113. package/dist/component/service-dropdown-rac-B627AgPG.js +0 -145
  114. package/dist/component/text-input-headless-BGaBRrP1.js +0 -47
  115. package/dist/component/use-dropdown-trigger-class-name-rcGBzxI1.js +0 -117
  116. package/dist/component/use-is-forced-open-dropdown-CoOk4W4i.js +0 -48
  117. package/dist/component/use-text-input-class-name-BLtPQoYE.js +0 -6
@@ -1,508 +0,0 @@
1
- import { RicosViewer as de } from "@wix/ricos/viewer";
2
- import b from "classnames";
3
- import t, { useMemo as j, useState as $, useRef as F, useEffect as k, useCallback as W, createContext as te, useContext as H, useId as ye } from "react";
4
- import { b7 as Ee, by as w, bg as ne, bx as fe, bo as D, bl as oe, bq as ge, R as he, a0 as be, y as Oe, H as Ne, v as _e } from "./form-BTUoOcqB.js";
5
- import { UNSAFE_PortalProvider as Se } from "react-aria";
6
- import { Dialog as re, OverlayTriggerStateContext as Le, ModalOverlay as Ie, Modal as ve, SearchField as Pe, Group as q, ListBoxItem as Fe, DialogTrigger as we, Select as De, Input as ae, Autocomplete as Be } from "react-aria-components";
7
- import { f as g, a as I } from "./find-child-C60k4CxG.js";
8
- import { D as xe, E as Re } from "./field-error-headless-DWc76YmY.js";
9
- import { L as Me } from "./field-label-headless-DKBKqI2X.js";
10
- import { N as Te, S as je } from "./non-modal-popover-D-u13tmp.js";
11
- import { u as $e } from "./use-invoke-callback-UH73A_J3.js";
12
- import { a as Ae } from "./use-is-forced-open-dropdown-CoOk4W4i.js";
13
- import { V as ke, u as Ve, a as Ue } from "./use-dropdown-trigger-class-name-rcGBzxI1.js";
14
- import se, { AsYouType as qe, isValidPhoneNumber as He, isSupportedCountry as Ge } from "libphonenumber-js";
15
- import "libphonenumber-js/metadata.min.json";
16
- import { C as Z } from "./calling-country-codes-PyWuOTmF.js";
17
- import { C as Ye } from "./chevron-down-icon-CcpVm6B-.js";
18
- import { E as ze } from "./error-icon-hZxQ6DEy.js";
19
- import { H as Q } from "./custom-focus-class-_483Pkwp.js";
20
- import { s as O } from "./field-rac.module-DP0lkkEv.js";
21
- import { u as J } from "./use-text-input-class-name-BLtPQoYE.js";
22
- function X(e) {
23
- const n = e ? se(e) : void 0, o = n == null ? void 0 : n.country;
24
- if (o)
25
- return o;
26
- const r = new qe();
27
- return e && r.input(e), r.getCountry();
28
- }
29
- function G(e) {
30
- var n;
31
- return e && ((n = Ee.getCountryByKey(e)) == null ? void 0 : n.dialCode);
32
- }
33
- function V(e) {
34
- return e === null ? null : e.replace(/[^0-9+]/g, "") || e;
35
- }
36
- function ee(e, n) {
37
- if (e && n)
38
- try {
39
- const o = se(e, n), r = o == null ? void 0 : o.formatInternational();
40
- if (r && He(r))
41
- return r.replace(/\s+/g, "");
42
- } catch {
43
- }
44
- return e;
45
- }
46
- function Ke() {
47
- const { t: e } = w(), { language: n } = ne();
48
- return j(() => Object.keys(Z).reduce((r, a) => {
49
- const c = Z[a], l = G(c), i = e(`locale-dataset.countries.${c.toUpperCase()}`);
50
- return l && Ge(a) && r.push({
51
- countryName: i,
52
- longCountryCode: c,
53
- shortCountryCode: a,
54
- callingCode: l
55
- }), r;
56
- }, []).sort((r, a) => r.countryName.localeCompare(a.countryName, n)), [
57
- e,
58
- n
59
- ]);
60
- }
61
- function We(e, n) {
62
- return e.filter((o) => n && n.length > 0 ? n.includes(o.shortCountryCode) : !0);
63
- }
64
- function Ze(e, n) {
65
- const { countryName: o, callingCode: r, shortCountryCode: a } = e;
66
- return !!(U(o, n) || U(r, n) || U(a, n));
67
- }
68
- function U(e, n) {
69
- return e.toLowerCase().includes(n.toLowerCase());
70
- }
71
- function Qe({ value: e, defaultCountryCode: n, allowedCountryCodes: o, onChange: r }) {
72
- const [a, c] = $(e || ""), l = F(V(e ?? null) ?? ""), [i, u] = $(n);
73
- fe(() => {
74
- c(""), l.current = "", u(n), r("");
75
- });
76
- const m = j(() => X(a), [
77
- a
78
- ]);
79
- k(() => {
80
- const p = e ?? "";
81
- p !== l.current && (c(p), l.current = p);
82
- }, [
83
- e
84
- ]), k(() => {
85
- n && !i && u(n);
86
- }, [
87
- n,
88
- i
89
- ]), k(() => {
90
- u(n ?? m);
91
- }, [
92
- m,
93
- n
94
- ]);
95
- const C = W((p) => {
96
- if (c(p), !p) {
97
- l.current = "", r(null);
98
- return;
99
- }
100
- const f = X(p);
101
- u((y) => {
102
- const L = f || y || ((o == null ? void 0 : o.length) === 1 ? o[0] : void 0), _ = V(ee(p, L));
103
- return l.current = _ ?? "", r(_), f || y;
104
- });
105
- }, [
106
- o,
107
- r
108
- ]), d = W((p) => {
109
- u(p), c((f) => {
110
- const y = V(ee(f, p));
111
- return l.current = y ?? "", r(y), f;
112
- });
113
- }, [
114
- r
115
- ]);
116
- return {
117
- currentValue: a,
118
- selectedCountryCode: i,
119
- handlePhoneChange: C,
120
- handleCountryCodeChange: d
121
- };
122
- }
123
- const ce = /* @__PURE__ */ te(null), N = () => {
124
- const e = H(ce);
125
- if (!e)
126
- throw new Error("Phone input components must be used within PhoneInput component");
127
- return e;
128
- }, le = /* @__PURE__ */ te(null), Y = () => {
129
- const e = H(le);
130
- if (!e)
131
- throw new Error("Option sub-components must be used within Option component");
132
- return e;
133
- }, z = ({ longCountryCode: e, className: n }) => {
134
- function o(c, l) {
135
- const i = "https://static.parastorage.com/services/linguist-flags/1.1005.0/assets/flags/square/", m = `${c}${l === "2x" ? "_2x" : ""}.png`;
136
- return `${i}${m}`;
137
- }
138
- const r = o(e, "1x"), a = o(e, "2x");
139
- return /* @__PURE__ */ t.createElement("img", {
140
- src: r,
141
- srcSet: `${r} 1x, ${a} 2x`,
142
- alt: "",
143
- "aria-hidden": "true",
144
- loading: "lazy",
145
- className: n
146
- });
147
- }, s = ({ children: e }) => {
148
- var S, P;
149
- const { id: n, value: o, onChange: r, FieldLayout: a, defaultCountry: c, validation: l } = D(), [i, u] = $(null), m = (P = (S = l == null ? void 0 : l.string) == null ? void 0 : S.phoneOptions) == null ? void 0 : P.allowedCountryCodes, C = Ke(), d = j(() => We(C, m), [
150
- C,
151
- m
152
- ]), p = j(() => d.map((T) => T.shortCountryCode), [
153
- d
154
- ]), { currentValue: f, selectedCountryCode: y, handlePhoneChange: L, handleCountryCodeChange: _ } = Qe({
155
- value: o,
156
- defaultCountryCode: c,
157
- allowedCountryCodes: p,
158
- onChange: r
159
- }), B = g(e, s.Label), x = g(e, s.Control), R = g(e, s.Description), M = g(e, s.Error), v = {
160
- currentValue: f,
161
- selectedCountryCode: y,
162
- handlePhoneChange: L,
163
- handleCountryCodeChange: _,
164
- countryCodes: p,
165
- countries: d,
166
- popoverContainer: i
167
- };
168
- return /* @__PURE__ */ t.createElement(ce.Provider, {
169
- value: v
170
- }, /* @__PURE__ */ t.createElement(a, {
171
- fieldId: n,
172
- renderLabel: () => B,
173
- renderInput: () => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
174
- ref: u,
175
- style: {
176
- display: "contents"
177
- }
178
- }), x),
179
- renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, M, R)
180
- }));
181
- }, K = ({ children: e, className: n }) => {
182
- const { labelId: o } = oe(), { hasError: r, disabled: a, readOnly: c } = D(), { t: l } = w(), { selectedCountryCode: i, countries: u } = N(), m = ye(), C = i ? u.find((y) => y.shortCountryCode === i) : void 0, d = C && G(C.longCountryCode) || "", p = l("field.phone.country-code.aria-label"), f = C ? `${p}, ${C.countryName}, ${d}` : p;
183
- return /* @__PURE__ */ t.createElement(je, {
184
- isDisabled: a || c,
185
- id: m,
186
- "aria-label": f,
187
- "aria-labelledby": o ? `${o} ${m}` : void 0,
188
- className: n,
189
- "data-invalid": r || void 0
190
- }, e);
191
- }, Je = ({ className: e }) => {
192
- const { selectedCountryCode: n, countries: o } = N(), r = o.find((a) => a.shortCountryCode === n);
193
- return r ? /* @__PURE__ */ t.createElement(z, {
194
- className: e,
195
- longCountryCode: r.longCountryCode
196
- }) : null;
197
- }, Xe = ({ children: e, className: n }) => {
198
- const { selectedCountryCode: o, countries: r } = N();
199
- return r.some((c) => c.shortCountryCode === o) ? null : /* @__PURE__ */ t.createElement("span", {
200
- className: n
201
- }, e);
202
- };
203
- K.Flag = Je;
204
- K.EmptyState = Xe;
205
- const h = ({ children: e, className: n, "aria-label": o, placement: r, offset: a, ...c }) => {
206
- const { triggerRef: l, optionsRef: i, isForcedOpen: u, isOpen: m } = c, { popoverContainer: C } = N(), d = g(e, h.Search);
207
- if (!m)
208
- return null;
209
- const p = /* @__PURE__ */ t.createElement(ue, {
210
- isForcedOpen: u
211
- }, e);
212
- return /* @__PURE__ */ t.createElement(Se, {
213
- getContainer: () => C
214
- }, /* @__PURE__ */ t.createElement(Te, {
215
- ref: i,
216
- triggerRef: l,
217
- className: n,
218
- placement: r,
219
- offset: a,
220
- containerPadding: 0
221
- }, d && !u ? /* @__PURE__ */ t.createElement(re, {
222
- "aria-label": o
223
- }, p) : p));
224
- }, et = ({ children: e, className: n, overlayClassName: o, "aria-label": r, portalContainer: a = t.Fragment, ...c }) => {
225
- const { optionsRef: l } = c, { selectedCountryCode: i, handleCountryCodeChange: u } = N(), m = H(Le);
226
- return /* @__PURE__ */ t.createElement(Ie, {
227
- className: o,
228
- isDismissable: !0
229
- }, /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(ve, {
230
- ref: l,
231
- className: n
232
- }, /* @__PURE__ */ t.createElement(re, {
233
- "aria-label": r
234
- }, /* @__PURE__ */ t.createElement(ue, {
235
- listBoxProps: {
236
- "aria-label": r,
237
- selectionMode: "single",
238
- selectedKeys: i ? [
239
- i
240
- ] : [],
241
- onSelectionChange: (C) => {
242
- const [d] = C === "all" ? [] : C;
243
- d && u(d), m == null || m.close();
244
- }
245
- }
246
- }, e)))));
247
- }, ue = ({ children: e, listBoxProps: n, isForcedOpen: o }) => {
248
- const { countries: r } = N(), a = g(e, h.Option), c = g(e, h.Search), l = g(e, h.EmptyState), i = /* @__PURE__ */ t.createElement(ke, {
249
- isForcedOpen: o === !0,
250
- ...n,
251
- renderEmptyState: l ? () => l : void 0
252
- }, r.map((u) => {
253
- const m = G(u.longCountryCode) || "";
254
- return I(a, {
255
- key: u.shortCountryCode,
256
- countryCode: u.shortCountryCode,
257
- dialingCode: m,
258
- countryName: u.countryName,
259
- longCountryCode: u.longCountryCode
260
- });
261
- }));
262
- return c ? /* @__PURE__ */ t.createElement(Be, {
263
- filter: (u, m, C) => {
264
- const d = r.find((p) => p.shortCountryCode === C.key);
265
- return !!d && Ze(d, m);
266
- }
267
- }, o ? I(c, {
268
- autoFocus: !1
269
- }) : c, i) : i;
270
- };
271
- h.Popover = h;
272
- h.Modal = et;
273
- const ie = ({ className: e, children: n, "aria-label": o, ...r }) => {
274
- const { autoFocus: a = !0 } = r;
275
- return /* @__PURE__ */ t.createElement(Pe, {
276
- "aria-label": o,
277
- autoFocus: a
278
- }, /* @__PURE__ */ t.createElement(q, {
279
- className: e
280
- }, n));
281
- }, tt = ({ className: e, placeholder: n }) => /* @__PURE__ */ t.createElement(ae, {
282
- className: e,
283
- placeholder: n
284
- });
285
- ie.Input = tt;
286
- h.Search = ie;
287
- const nt = ({ children: e, className: n }) => /* @__PURE__ */ t.createElement("div", {
288
- className: n
289
- }, e);
290
- h.EmptyState = nt;
291
- const A = ({ children: e, className: n, ...o }) => {
292
- const { countryCode: r, dialingCode: a, countryName: c, longCountryCode: l } = o, i = {
293
- countryCode: r,
294
- dialingCode: a,
295
- countryName: c,
296
- longCountryCode: l
297
- }, u = e || /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(me, null), /* @__PURE__ */ t.createElement(pe, null), /* @__PURE__ */ t.createElement(Ce, null));
298
- return /* @__PURE__ */ t.createElement(Fe, {
299
- className: n,
300
- id: r,
301
- textValue: `${c} ${a}`
302
- }, /* @__PURE__ */ t.createElement(le.Provider, {
303
- value: i
304
- }, u));
305
- }, me = ({ className: e }) => {
306
- const { longCountryCode: n } = Y();
307
- return /* @__PURE__ */ t.createElement(z, {
308
- className: e,
309
- longCountryCode: n
310
- });
311
- }, pe = ({ className: e }) => {
312
- const { countryName: n } = Y();
313
- return /* @__PURE__ */ t.createElement("span", {
314
- className: e
315
- }, n);
316
- }, Ce = ({ className: e }) => {
317
- const { dialingCode: n } = Y();
318
- return /* @__PURE__ */ t.createElement("span", {
319
- className: e
320
- }, n);
321
- };
322
- A.Flag = me;
323
- A.Name = pe;
324
- A.Code = Ce;
325
- h.Option = A;
326
- const ot = ({ className: e }) => {
327
- const { t: n } = w(), { inputId: o, ariaDescribedBy: r } = oe(), { id: a, placeholder: c, disabled: l, readOnly: i, required: u, label: m, hasError: C } = D(), { currentValue: d, handlePhoneChange: p } = N(), f = F(null);
328
- return ge(() => {
329
- var y;
330
- (y = f.current) == null || y.focus({
331
- preventScroll: !0
332
- });
333
- }, a), /* @__PURE__ */ t.createElement(ae, {
334
- ref: f,
335
- id: o,
336
- type: "tel",
337
- autoComplete: "tel",
338
- value: d,
339
- onChange: (y) => p(y.target.value),
340
- disabled: l,
341
- readOnly: i,
342
- required: u,
343
- "aria-label": `${m}. ${n("field.phone.aria-label")}`,
344
- "aria-describedby": r,
345
- "aria-invalid": C,
346
- placeholder: c,
347
- className: e
348
- });
349
- }, rt = ({ children: e, ...n }) => {
350
- const o = n, { isForcedOpen: r } = o, { disabled: a, readOnly: c, required: l, hasError: i } = D(), [u, m] = $(!1), { t: C } = w(), { selectedCountryCode: d, handleCountryCodeChange: p } = N(), f = r || u && !a && !c;
351
- return /* @__PURE__ */ t.createElement(De, {
352
- "aria-label": C("field.phone.country-code.aria-label"),
353
- value: d ?? null,
354
- onChange: (y) => p(y),
355
- isDisabled: a || c,
356
- isInvalid: i,
357
- isRequired: l,
358
- placeholder: "",
359
- isOpen: f,
360
- allowsEmptyCollection: !0,
361
- onOpenChange: r ? void 0 : m
362
- }, g(e, s.CountryButton), I(g(e, s.CountryOptions.Popover), {
363
- ...o,
364
- isOpen: f
365
- }));
366
- }, at = ({ children: e, ...n }) => {
367
- const o = n;
368
- return /* @__PURE__ */ t.createElement(we, null, g(e, s.CountryButton), I(g(e, s.CountryOptions.Modal), o));
369
- }, st = ({ children: e, className: n }) => {
370
- const o = F(null), r = F(null), a = F(!1), { id: c, disabled: l, hasError: i, showFlag: u, onFocus: m, onBlur: C } = D(), d = $e(C), { countries: p } = N(), f = g(e, s.CountryDrawer), y = g(e, s.CountryPopover), L = g(e, s.PhoneNumber), _ = p.length > 1, B = Ae(c) && !!y && _, x = typeof n == "function" ? ({ isHovered: v, isFocusWithin: S }) => n({
371
- hasCountryOptions: _,
372
- isHovered: v,
373
- isFocusWithin: S
374
- }) : n, R = {
375
- triggerRef: o,
376
- optionsRef: r,
377
- isForcedOpen: B
378
- }, M = {
379
- onFocus: () => {
380
- a.current || (a.current = !0, m == null || m());
381
- },
382
- onBlur: (v) => {
383
- var P, T;
384
- const S = v.relatedTarget;
385
- !((P = o.current) != null && P.contains(S)) && !((T = r.current) != null && T.contains(S)) && (a.current = !1, d());
386
- }
387
- };
388
- return p.length === 1 ? /* @__PURE__ */ t.createElement(q, {
389
- ref: o,
390
- className: x,
391
- isDisabled: l,
392
- isInvalid: i,
393
- ...M
394
- }, u && /* @__PURE__ */ t.createElement(z, {
395
- longCountryCode: p[0].longCountryCode
396
- }), L) : /* @__PURE__ */ t.createElement(q, {
397
- ref: o,
398
- className: x,
399
- isDisabled: l,
400
- isInvalid: i,
401
- ...M
402
- }, !B && I(f, R), I(y, R), L);
403
- };
404
- s.Label = Me;
405
- s.Control = st;
406
- s.CountryButton = K;
407
- s.CountryDrawer = at;
408
- s.CountryPopover = rt;
409
- s.CountryOptions = h;
410
- s.PhoneNumber = ot;
411
- s.Description = xe;
412
- s.Error = Re;
413
- const ct = (e) => /* @__PURE__ */ t.createElement("svg", {
414
- width: 24,
415
- height: 24,
416
- viewBox: "0 0 24 24",
417
- fill: "currentColor",
418
- "aria-hidden": "true",
419
- ...e
420
- }, /* @__PURE__ */ t.createElement("path", {
421
- fillRule: "evenodd",
422
- d: "M11.5,19 C11.331,19 11.166,18.985 11,18.975 L11,16.5 C11,16.224 10.776,16 10.5,16 L9.5,16 C9.224,16 9,15.775 9,15.5 L9,12.5 C9,12.366 8.947,12.238 8.852,12.145 L4.804,8.14 C6.04,5.688 8.573,4 11.5,4 C12.76,4 13.946,4.315 14.989,4.866 L15,6.497 C15.001,6.631 14.949,6.757 14.855,6.853 C14.76,6.947 14.634,7 14.5,7 L12.339,7 C12.207,7 12.08,7.053 11.986,7.146 L10.146,8.983 C10.053,9.077 10,9.204 10,9.337 L10,10.5 C10,11.325 10.672,11.999 11.499,12 L15.293,12 L17,13.707 L17,16.582 C15.629,18.064 13.674,19 11.5,19 M4,11.5 C4,10.673 4.14,9.879 4.388,9.135 L8,12.709 L8,15.5 C8,16.327 8.673,17 9.5,17 L10,17 L10,18.849 C6.581,18.152 4,15.122 4,11.5 M19,11.5 C19,12.856 18.632,14.127 18,15.226 L18,13.5 C18,13.367 17.947,13.24 17.854,13.146 L15.854,11.146 C15.76,11.053 15.633,11 15.5,11 L11.5,11 C11.224,11 11,10.775 11,10.5 L11,9.544 L12.546,8 L14.5,8 C14.902,8 15.281,7.843 15.564,7.557 C15.848,7.271 16.003,6.892 16,6.49 L15.993,5.51 C17.814,6.879 19,9.051 19,11.5 M11.5,3 C6.813,3 3,6.813 3,11.5 C3,16.187 6.813,20 11.5,20 C16.187,20 20,16.187 20,11.5 C20,6.813 16.187,3 11.5,3"
423
- })), lt = (e) => /* @__PURE__ */ t.createElement("svg", {
424
- width: 24,
425
- height: 24,
426
- viewBox: "0 0 24 24",
427
- fill: "currentColor",
428
- "aria-hidden": "true",
429
- ...e
430
- }, /* @__PURE__ */ t.createElement("path", {
431
- fillRule: "evenodd",
432
- d: "M6.6108,14.3887 C5.5718,13.3497 4.9998,11.9687 4.9998,10.4997 C4.9998,9.0317 5.5718,7.6507 6.6108,6.6117 C7.6498,5.5727 9.0308,4.9997 10.4998,4.9997 C11.9688,4.9997 13.3498,5.5727 14.3888,6.6117 C15.4278,7.6507 15.9998,9.0317 15.9998,10.4997 C15.9998,11.9687 15.4278,13.3497 14.3888,14.3887 C13.3498,15.4277 11.9688,15.9997 10.4998,15.9997 C9.0308,15.9997 7.6498,15.4277 6.6108,14.3887 L6.6108,14.3887 Z M20.0028,19.2957 L15.4328,14.7247 C16.4438,13.5477 16.9998,12.0687 16.9998,10.4997 C16.9998,8.7637 16.3238,7.1317 15.0958,5.9047 C13.8688,4.6767 12.2358,3.9997 10.4998,3.9997 C8.7638,3.9997 7.1318,4.6767 5.9038,5.9047 C4.6758,7.1317 3.9998,8.7637 3.9998,10.4997 C3.9998,12.2367 4.6758,13.8677 5.9038,15.0957 C7.1318,16.3237 8.7638,16.9997 10.4998,16.9997 C12.0688,16.9997 13.5478,16.4437 14.7258,15.4317 L19.2958,20.0027 L20.0028,19.2957 Z"
433
- })), ut = "_control_o9wij_1", it = "_countryButton_o9wij_9", mt = "_drawerButton_o9wij_25", pt = "_popoverButton_o9wij_34", Ct = "_chevron_o9wij_39", dt = "_globeIcon_o9wij_48", yt = "_searchIcon_o9wij_56", Et = "_flag_o9wij_61", ft = "_option_o9wij_67", gt = "_phoneNumber_o9wij_80", ht = "_countryOptions_o9wij_106", bt = "_countrySearch_o9wij_123", Ot = "_mobileDrawer_o9wij_131", Nt = "_name_o9wij_140", _t = "_code_o9wij_144", St = "_mobileOverlay_o9wij_161", E = {
434
- control: ut,
435
- countryButton: it,
436
- drawerButton: mt,
437
- popoverButton: pt,
438
- chevron: Ct,
439
- globeIcon: dt,
440
- searchIcon: yt,
441
- flag: Et,
442
- option: ft,
443
- phoneNumber: gt,
444
- countryOptions: ht,
445
- countrySearch: bt,
446
- mobileDrawer: Ot,
447
- name: Nt,
448
- code: _t,
449
- mobileOverlay: St
450
- }, Lt = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(de, {
451
- content: e,
452
- locale: n
453
- }), It = () => /* @__PURE__ */ t.createElement("span", {
454
- className: E.chevron,
455
- "aria-hidden": "true"
456
- }, /* @__PURE__ */ t.createElement(Ye, null)), Kt = () => {
457
- const e = Ve(O.selectOptionWithoutFocusRing, E.option, Q), n = Ue(E.control), o = J(E.control), r = J(E.countrySearch), { t: a } = w(), { PortalContainer: c } = ne(), l = /* @__PURE__ */ t.createElement(s.CountryOptions.Search, {
458
- className: r,
459
- "aria-label": a("field.phone.country-search-input.aria-label")
460
- }, /* @__PURE__ */ t.createElement(lt, {
461
- className: E.searchIcon
462
- }), /* @__PURE__ */ t.createElement(s.CountryOptions.Search.Input, {
463
- className: b(O.innerInput, Q),
464
- placeholder: a("field.phone.country-search-input.placeholder")
465
- })), i = /* @__PURE__ */ t.createElement(s.CountryOptions.EmptyState, null, a("field.phone.country-selector-dropdown.no-result")), u = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(s.CountryButton.Flag, {
466
- className: E.flag
467
- }), /* @__PURE__ */ t.createElement(s.CountryButton.EmptyState, null, /* @__PURE__ */ t.createElement(ct, {
468
- className: E.globeIcon
469
- })), /* @__PURE__ */ t.createElement(It, null)), m = /* @__PURE__ */ t.createElement(s.CountryOptions.Option, {
470
- className: e
471
- }, /* @__PURE__ */ t.createElement(s.CountryOptions.Option.Flag, {
472
- className: E.flag
473
- }), /* @__PURE__ */ t.createElement(s.CountryOptions.Option.Name, {
474
- className: E.name
475
- }), /* @__PURE__ */ t.createElement(s.CountryOptions.Option.Code, {
476
- className: E.code
477
- }));
478
- return /* @__PURE__ */ t.createElement(s, null, /* @__PURE__ */ t.createElement(s.Label, {
479
- className: b(he, O.label)
480
- }, /* @__PURE__ */ t.createElement(s.Label.Required, {
481
- className: b(be, O.requiredMark)
482
- })), /* @__PURE__ */ t.createElement(s.Control, {
483
- className: ({ hasCountryOptions: C, ...d }) => C ? n(d) : o(d)
484
- }, /* @__PURE__ */ t.createElement(s.CountryDrawer, null, /* @__PURE__ */ t.createElement(s.CountryButton, {
485
- className: b(E.countryButton, E.drawerButton)
486
- }, u), /* @__PURE__ */ t.createElement(s.CountryOptions.Modal, {
487
- className: b(O.selectPopover, E.mobileDrawer),
488
- overlayClassName: E.mobileOverlay,
489
- portalContainer: c,
490
- "aria-label": a("field.phone.country-code.aria-label")
491
- }, l, i, m)), /* @__PURE__ */ t.createElement(s.CountryPopover, null, /* @__PURE__ */ t.createElement(s.CountryButton, {
492
- className: b(E.countryButton, E.popoverButton)
493
- }, u), /* @__PURE__ */ t.createElement(s.CountryOptions.Popover, {
494
- className: b(Oe, O.selectPopover, E.countryOptions),
495
- placement: "bottom start",
496
- offset: 0,
497
- "aria-label": a("field.phone.country-code.aria-label")
498
- }, l, i, m)), /* @__PURE__ */ t.createElement(s.PhoneNumber, {
499
- className: b(O.innerInput, E.phoneNumber)
500
- })), /* @__PURE__ */ t.createElement(s.Error, {
501
- className: b(Ne, O.error)
502
- }, /* @__PURE__ */ t.createElement(ze, null), /* @__PURE__ */ t.createElement(s.Error.Text, null)), /* @__PURE__ */ t.createElement(s.Description, {
503
- className: b(_e, O.description)
504
- }, Lt));
505
- };
506
- export {
507
- Kt as P
508
- };
@@ -1,145 +0,0 @@
1
- import t, { useRef as T, useMemo as _, useCallback as C, useEffect as b } from "react";
2
- import { RicosViewer as w } from "@wix/ricos/viewer";
3
- import E from "classnames";
4
- import { bk as P, by as A, F as y, bo as M, bg as H, aq as V, R as k, a0 as q, y as x, H as U, v as W } from "./form-BTUoOcqB.js";
5
- import { u as B } from "./use-service-options-base-D_enm38a.js";
6
- import { D as u } from "./dropdown-field-headless-BYEjiIUf.js";
7
- import { C as Q } from "./chevron-down-icon-CcpVm6B-.js";
8
- import { E as Y } from "./error-icon-hZxQ6DEy.js";
9
- import { H as j } from "./custom-focus-class-_483Pkwp.js";
10
- import { s as i } from "./field-rac.module-DP0lkkEv.js";
11
- import { a as z, u as G } from "./use-dropdown-trigger-class-name-rcGBzxI1.js";
12
- const J = "00000000-0000-0000-0000-000000000000", K = (e) => {
13
- const { actions: o } = P(), { t: D } = A(), { addOther: n, addOtherLabel: p } = e, c = p || D("add-other.default-other-option-label"), a = T(!0), d = _(() => {
14
- var s;
15
- return ((s = e.options) == null ? void 0 : s.map((m) => m.id ?? "")) ?? [];
16
- }, [
17
- e.options
18
- ]), O = C((s) => n ? [
19
- ...s,
20
- {
21
- value: c,
22
- label: c,
23
- id: J
24
- }
25
- ] : s, [
26
- n,
27
- c
28
- ]), { isLoading: f, options: l, isEmpty: h, shouldRender: I, setIsLoading: S, setOptions: R, setIsEmpty: g, processOptions: F } = B({
29
- fieldType: y.SERVICES_DROPDOWN,
30
- isEditor: e.isEditor,
31
- postProcessOptions: O
32
- }), L = C(async () => {
33
- if (a.current && (o != null && o.fetchServices) && d.length > 0) {
34
- a.current = !1, S(!0);
35
- let s;
36
- try {
37
- s = await o.fetchServices({
38
- serviceIds: d
39
- });
40
- } catch (m) {
41
- console.error(m);
42
- }
43
- if (s) {
44
- const m = F(s);
45
- g(!n && m.length === 0), R(m);
46
- } else
47
- a.current = !0;
48
- S(!1);
49
- }
50
- }, [
51
- o,
52
- d,
53
- F,
54
- n,
55
- S,
56
- R,
57
- g
58
- ]);
59
- b(() => {
60
- if (!e.isEditor && l.length > 0) {
61
- const s = n ? l.length - 1 : l.length;
62
- g(s === 0);
63
- }
64
- }, [
65
- l,
66
- n,
67
- g,
68
- e.isEditor
69
- ]);
70
- const v = C(() => {
71
- e.onFocus && e.onFocus(), a.current && L();
72
- }, [
73
- L,
74
- e.onFocus
75
- ]), N = C(
76
- (s) => {
77
- e.onChange && e.onChange(s), a.current = !0;
78
- },
79
- // eslint-disable-next-line react-hooks/exhaustive-deps
80
- [
81
- e.onChange
82
- ]
83
- );
84
- return {
85
- isLoading: f,
86
- options: l,
87
- isEmpty: h,
88
- onFocus: v,
89
- onChange: N,
90
- shouldRender: I
91
- };
92
- }, r = ({ children: e }) => {
93
- const o = M(), { addOther: D } = o, n = H(), p = o.isEditor || n.isEditor || n.isComposer, { isLoading: c, options: a, isEmpty: d, onFocus: O, onChange: f, shouldRender: l } = K({
94
- ...o,
95
- isEditor: p
96
- }), h = _(() => ({
97
- ...o,
98
- options: c ? [] : a,
99
- isLoading: c,
100
- onFocus: O,
101
- onChange: f
102
- }), [
103
- o,
104
- a,
105
- c,
106
- O,
107
- f
108
- ]);
109
- return !p && d && !D || !l ? null : /* @__PURE__ */ t.createElement(V.Provider, {
110
- value: {
111
- v2: h
112
- }
113
- }, /* @__PURE__ */ t.createElement(u, null, e));
114
- };
115
- r.Label = u.Label;
116
- r.Trigger = u.Trigger;
117
- r.Options = u.Options;
118
- r.Description = u.Description;
119
- r.Error = u.Error;
120
- const X = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement(w, {
121
- content: e,
122
- locale: o
123
- }), Z = () => {
124
- const e = z(i.dropdownTrigger), o = G(j);
125
- return /* @__PURE__ */ t.createElement(r, null, /* @__PURE__ */ t.createElement(r.Label, {
126
- className: E(k, i.label)
127
- }, /* @__PURE__ */ t.createElement(r.Label.Required, {
128
- className: E(q, i.requiredMark)
129
- })), /* @__PURE__ */ t.createElement(r.Trigger, {
130
- className: e
131
- }, /* @__PURE__ */ t.createElement(Q, {
132
- className: i.dropdownIcon
133
- })), /* @__PURE__ */ t.createElement(r.Options, {
134
- className: E(x, i.selectPopover, i.dropdownPopover)
135
- }, /* @__PURE__ */ t.createElement(r.Options.Option, {
136
- className: o
137
- })), /* @__PURE__ */ t.createElement(r.Error, {
138
- className: E(U, i.error)
139
- }, /* @__PURE__ */ t.createElement(Y, null), /* @__PURE__ */ t.createElement(r.Error.Text, null)), /* @__PURE__ */ t.createElement(r.Description, {
140
- className: E(W, i.description)
141
- }, X));
142
- }, me = () => /* @__PURE__ */ t.createElement(Z, null);
143
- export {
144
- me as ServiceDropdownRAC
145
- };
@@ -1,47 +0,0 @@
1
- import t, { useRef as v } from "react";
2
- import { TextField as C, Input as R } from "react-aria-components";
3
- import { bo as c, bl as d, bq as T } from "./form-BTUoOcqB.js";
4
- import { f as l } from "./find-child-C60k4CxG.js";
5
- import { D as g, E as h } from "./field-error-headless-DWc76YmY.js";
6
- import { L as q } from "./field-label-headless-DKBKqI2X.js";
7
- const e = ({ children: r }) => {
8
- const { id: s, value: a, onChange: i, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: b, autoComplete: f, FieldLayout: E } = c(), { labelId: I } = d(), F = l(r, e.Label), y = l(r, e.Input), D = l(r, e.Description), L = l(r, e.Error);
9
- return /* @__PURE__ */ t.createElement(E, {
10
- fieldId: s,
11
- renderLabel: () => F,
12
- renderInput: () => /* @__PURE__ */ t.createElement(C, {
13
- autoComplete: f,
14
- "aria-labelledby": I,
15
- value: a ?? "",
16
- onChange: i,
17
- isDisabled: u,
18
- isReadOnly: n,
19
- isRequired: o,
20
- isInvalid: p,
21
- onBlur: m,
22
- onFocus: b
23
- }, y),
24
- renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, L, D)
25
- });
26
- }, x = ({ className: r }) => {
27
- const { id: s, placeholder: a } = c(), { inputId: i, ariaDescribedBy: u } = d(), n = v(null);
28
- return T(() => {
29
- var o;
30
- (o = n.current) == null || o.focus({
31
- preventScroll: !0
32
- });
33
- }, s), /* @__PURE__ */ t.createElement(R, {
34
- ref: n,
35
- id: i,
36
- "aria-describedby": u,
37
- className: r,
38
- placeholder: a
39
- });
40
- };
41
- e.Label = q;
42
- e.Input = x;
43
- e.Description = g;
44
- e.Error = h;
45
- export {
46
- e as T
47
- };