@wix/form-elements 1.161.0 → 1.163.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component/{appointment-rac-BubC8I9X.js → appointment-rac-Cskf9hxi.js} +123 -123
- package/dist/component/{bookings-address-rac-BbwvVs86.js → bookings-address-rac-C18tuPai.js} +1 -1
- package/dist/component/{bookings-email-rac-C2HCkcfa.js → bookings-email-rac-C2GL3cJg.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Uy7c5EBs.js → bookings-first-name-rac-IEklnchg.js} +1 -1
- package/dist/component/{bookings-header-rac-nmwsWRjS.js → bookings-header-rac-iwcrj5Kj.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BAioQLCg.js → bookings-last-name-rac-CXZfq3Rw.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CO6vOBjG.js → bookings-login-bar-rac-DP0MBFTm.js} +6 -6
- package/dist/component/{bookings-phone-rac-Cr16h-_R.js → bookings-phone-rac-uJGk_tzr.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CHLH3jd7.js → bookings-rich-text-rac-BerRAnFy.js} +1 -1
- package/dist/component/{calendar.module-CKCBG_Pg.js → calendar.module-BMUyMVja.js} +19 -19
- package/dist/component/{checkbox-field-rac-CMwmwFMD.js → checkbox-field-rac-BBftIi_U.js} +6 -6
- package/dist/component/{checkbox-group-field-headless-BNs_S-nT.js → checkbox-group-field-headless-BiQ4coe6.js} +27 -27
- package/dist/component/{checkbox-group-field-rac-BA60EPAN.js → checkbox-group-field-rac-moHc5Cyu.js} +6 -6
- package/dist/component/{checkbox-group-rac-BJZ4Oer9.js → checkbox-group-rac-iuPzxN7i.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-akWZsZNn.js → checkbox-indicator-module-classes-DUTR4mcg.js} +1 -1
- package/dist/component/{checkbox-rac-KsVlI6_V.js → checkbox-rac-BwfHAeFo.js} +1 -1
- package/dist/component/{contacts-address-rac-CRYkz87z.js → contacts-address-rac-DuyEL5YR.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BIz-1-ZX.js → contacts-birthdate-rac-Mkoplu3x.js} +1 -1
- package/dist/component/{contacts-company-rac-B8G__j6I.js → contacts-company-rac-B-3QghQg.js} +1 -1
- package/dist/component/{contacts-email-rac-Dztkvp5i.js → contacts-email-rac-CqooKQl8.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CVSEWpLU.js → contacts-first-name-rac-CAOu0GIH.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Blz4M5bk.js → contacts-last-name-rac-Cd-wCTC3.js} +1 -1
- package/dist/component/{contacts-phone-rac-CPCE5soY.js → contacts-phone-rac-OGE6eaJc.js} +1 -1
- package/dist/component/{contacts-position-rac-Dd_kBjqG.js → contacts-position-rac-eSsV63RC.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-C6AlsP10.js → contacts-subscribe-rac-19d4uPR-.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-CQ1n29zI.js → contacts-tax-id-rac-TtyrAftZ.js} +1 -1
- package/dist/component/{date-availability-DDj1j0z5.js → date-availability-CudIaav_.js} +1 -1
- package/dist/component/{date-input-field-rac-D5r1n_ah.js → date-input-field-rac-DzMiQLxS.js} +89 -89
- package/dist/component/{date-input-rac-Cyi5mU_P.js → date-input-rac-BWfmwcmK.js} +1 -1
- package/dist/component/{date-picker-field-rac-CeG391Zo.js → date-picker-field-rac-w4Wf-m0I.js} +54 -54
- package/dist/component/{date-picker-rac-Ci9aHgav.js → date-picker-rac-Bejo7tOm.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CrbYEbJJ.js → date-time-input-field-rac-D6JPrbGb.js} +80 -80
- package/dist/component/{date-time-input-rac-DDJLkqs0.js → date-time-input-rac-CAK5NgC4.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-C3ftVHBA.js → dext-checkbox-group-rac-BqoHMQwI.js} +4 -4
- package/dist/component/{dext-checkbox-rac-BGLYWn68.js → dext-checkbox-rac-BEis8bxo.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Cy9RlDlt.js → dext-date-picker-rac-DDQTy3BG.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-88ZoTd5e.js → dext-date-time-input-rac-Dp3UEXEu.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CPxDUuk9.js → dext-dropdown-rac-DisXIXNb.js} +1 -1
- package/dist/component/{dext-email-rac-BAvQwDPA.js → dext-email-rac-CBv4umUC.js} +1 -1
- package/dist/component/{dext-number-input-rac-D7HYQVKq.js → dext-number-input-rac-0UNC_1Ac.js} +1 -1
- package/dist/component/{dext-phone-rac--FhcplSI.js → dext-phone-rac-CQVzz499.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DBz8iCKW.js → dext-radio-group-rac-3lhx-xxX.js} +2 -2
- package/dist/component/{dext-rating-input-rac-Cv7nThfe.js → dext-rating-input-rac-2fwxV3iY.js} +1 -1
- package/dist/component/{dext-tags-rac-CRUUc5dr.js → dext-tags-rac-DCL78ClS.js} +2 -2
- package/dist/component/{dext-text-area-rac-DQBQXV1L.js → dext-text-area-rac-WTCWYySB.js} +1 -1
- package/dist/component/{dext-text-input-rac-4CpM581y.js → dext-text-input-rac-DMCzSYAI.js} +1 -1
- package/dist/component/{dext-url-input-rac-0C1jTEr9.js → dext-url-input-rac-Bzvt5zTa.js} +1 -1
- package/dist/component/{donation-rac-Cgt0ZE50.js → donation-rac-B3YHu0bl.js} +98 -98
- package/dist/component/{dropdown-field-rac-DlGKR7pZ.js → dropdown-field-rac-y4GPpf0W.js} +4 -4
- package/dist/component/{dropdown-rac-CYFW_3x_.js → dropdown-rac-Dj7OnxJL.js} +1 -1
- package/dist/component/{ecom-address-rac-CQfQHpXC.js → ecom-address-rac-Bnc60jDw.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-D2v2Upvz.js → ecom-subscription-checkbox-rac-CesTpjav.js} +2 -2
- package/dist/component/{email-input-field-rac-CVw25yRo.js → email-input-field-rac-BT2FrAEM.js} +48 -48
- package/dist/component/{events-repeater-rac-BCVUcmFj.js → events-repeater-rac-CA2yjEEk.js} +24 -24
- package/dist/component/{events-rsvp-rac-DwbqEr8z.js → events-rsvp-rac-wVpVt7-p.js} +4 -4
- package/dist/component/{field-error-headless-XnVcMmsL.js → field-error-headless-CX95bMbk.js} +8 -8
- package/dist/component/{field-label-headless-BRTLT2Yt.js → field-label-headless-niuFY6Mw.js} +17 -17
- package/dist/component/field-rac.module-ts2t4WUO.js +25 -0
- package/dist/component/{file-upload-rac-Dkwg9Jk4.js → file-upload-rac-ByO8l8lE.js} +142 -142
- package/dist/component/{fixed-payment-rac-ST98xAa2.js → fixed-payment-rac-BNDAdNeQ.js} +18 -18
- package/dist/component/{form-BUqSKOvc.js → form-CCQN_rPn.js} +326 -336
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CzNTGYWq.js → header-field-rac-C1RySfYy.js} +6 -6
- package/dist/component/{header-rac-DUt6AIAE.js → header-rac-BaFPV0vy.js} +1 -1
- package/dist/component/image-choice-rac-BShUj92P.js +155 -0
- package/dist/component/{index-cZZeAuuu.js → index-0_YjLphg.js} +2 -2
- package/dist/component/{index-CDO22hht.js → index-DHLfweXD.js} +69 -69
- package/dist/component/{isObjectLike-cs4bARpC.js → isObjectLike-D7tbAd6O.js} +3 -3
- package/dist/component/{multiline-address-field-rac-vcEWhUCV.js → multiline-address-field-rac-CFJKE5vA.js} +41 -41
- package/dist/component/{multiline-address-rac-WQaI2eUX.js → multiline-address-rac-BlzCkwEH.js} +1 -1
- package/dist/component/{number-input-field-rac-CBUMqATk.js → number-input-field-rac-XqxdqTRV.js} +24 -24
- package/dist/component/{number-input-rac-B4j5hyzS.js → number-input-rac-CQTg0QSm.js} +1 -1
- package/dist/component/{password-rac-DwLyf45N.js → password-rac-DPE-U2xs.js} +17 -17
- package/dist/component/{payment-input-rac-D0Od---y.js → payment-input-rac-oOh04431.js} +32 -32
- package/dist/component/{phone-input-field-rac-COlu9IeC.js → phone-input-field-rac-DW2vQhjC.js} +48 -48
- package/dist/component/{phone-rac-Dh4RacOF.js → phone-rac-BB9B-Hpl.js} +1 -1
- package/dist/component/{product-list-rac-D7zHDE2D.js → product-list-rac-K53VvPJV.js} +26 -26
- package/dist/component/{quiz-radio-group-rac-1AaKphJt.js → quiz-radio-group-rac-gikcMV2I.js} +1 -1
- package/dist/component/{radio-button-module-classes-VqaP6vpA.js → radio-button-module-classes-CY883yGO.js} +34 -34
- package/dist/component/{radio-group-field-rac-Cp3LRN3C.js → radio-group-field-rac-BOEWcfT9.js} +5 -5
- package/dist/component/{radio-group-rac-KhmhzYGf.js → radio-group-rac-gKhmLMm3.js} +1 -1
- package/dist/component/{rating-input-field-rac-10n6ciCr.js → rating-input-field-rac-83FXIVpy.js} +30 -30
- package/dist/component/{rating-input-rac-XZjjY2Gp.js → rating-input-rac-XDwakrtR.js} +1 -1
- package/dist/component/{rich-content-rac.module-kMwDoLBa.js → rich-content-rac.module-Bdx8hK3J.js} +5 -5
- package/dist/component/{rich-text-field-rac-H5bd8fAt.js → rich-text-field-rac-ksEKBaYG.js} +4 -4
- package/dist/component/{rich-text-rac-88GSQR62.js → rich-text-rac-XEFBeQrz.js} +1 -1
- package/dist/component/{service-dropdown-rac-B1_Xr_X3.js → service-dropdown-rac-CjFiqV1n.js} +26 -26
- package/dist/component/{services-multi-choice-rac-DWp_Llbi.js → services-multi-choice-rac-DNut4K3I.js} +15 -15
- package/dist/component/{signature-rac-zN_6KRDp.js → signature-rac-BhWPZpwu.js} +108 -108
- package/dist/component/{submit-button-rac-Dv6UarYX.js → submit-button-rac-CWmz_JCl.js} +7 -7
- package/dist/component/{tags-field-rac-sVN6MHfJ.js → tags-field-rac-D9P1jVrz.js} +75 -75
- package/dist/component/{tags-rac-DhTHs_XN.js → tags-rac-0zEd-xYa.js} +1 -1
- package/dist/component/{text-area-field-rac-DrWkww7W.js → text-area-field-rac-D_55oi2b.js} +19 -19
- package/dist/component/{text-area-rac-CXXh-ZdY.js → text-area-rac-CpkFyXCH.js} +1 -1
- package/dist/component/{text-input-field-rac-C2YiMr-g.js → text-input-field-rac-b7RXb4Ob.js} +4 -4
- package/dist/component/{text-input-headless-BJMNbsMY.js → text-input-headless-b1TEpdit.js} +11 -11
- package/dist/component/{text-input-rac-CpsPh7FH.js → text-input-rac-CoVcg1S0.js} +1 -1
- package/dist/component/{time-input-rac-DG_1KxS4.js → time-input-rac-DE7OyzgQ.js} +20 -20
- package/dist/component/url-input-field-rac-_yxWlb3a.js +77 -0
- package/dist/component/{url-input-rac-BTStO0NP.js → url-input-rac-wguMUqug.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-DbMMg1ws.js → use-dropdown-option-class-name-DdQ0sFRF.js} +12 -12
- package/dist/component/{use-dropdown-trigger-class-name-Yes4kC_0.js → use-dropdown-trigger-class-name-hB8KYv-I.js} +19 -19
- package/dist/component/{use-element-state-class-name-DlncY4hk.js → use-element-state-class-name-C2tQgxUX.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-C__zqP5j.js → use-hoverable-input-class-name-C8iuzofb.js} +3 -3
- package/dist/component/{use-is-forced-open-dropdown-DnK_MQRO.js → use-is-forced-open-dropdown-DkIrJPsK.js} +4 -4
- package/dist/component/{use-service-options-base-DKJe52Vk.js → use-service-options-base-B-xAR-tx.js} +3 -3
- package/dist/component/use-text-input-class-name-CK4rZeSM.js +6 -0
- package/package.json +2 -2
- package/dist/component/field-rac.module-DP0lkkEv.js +0 -25
- package/dist/component/image-choice-rac-DuBgrSt2.js +0 -155
- package/dist/component/url-input-field-rac-twxRREnl.js +0 -77
- package/dist/component/use-text-input-class-name-D9tJTR-b.js +0 -6
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
import { RicosViewer as j } from "@wix/ricos/viewer";
|
|
2
2
|
import F from "classnames";
|
|
3
|
-
import t, { useMemo as I, useState as w, useRef as
|
|
3
|
+
import t, { useMemo as I, useState as w, useRef as V, useLayoutEffect as z, useCallback as k } from "react";
|
|
4
4
|
import { CheckboxGroup as B, TextField as J, Input as X, CheckboxField as Y, CheckboxButton as Z } from "react-aria-components";
|
|
5
|
-
import {
|
|
6
|
-
import { f as O, a as
|
|
7
|
-
import { E as
|
|
8
|
-
import { L as $ } from "./field-label-headless-
|
|
5
|
+
import { by as D, bv as M, bI as S, bA as U, U as ee, aa as te, ak as oe, K as ne, G as ae, al as re } from "./form-CCQN_rPn.js";
|
|
6
|
+
import { f as O, a as N } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { E as W, D as H } from "./field-error-headless-CX95bMbk.js";
|
|
8
|
+
import { L as $ } from "./field-label-headless-niuFY6Mw.js";
|
|
9
9
|
import { F as se } from "./fieldset-headless-CD3fds9J.js";
|
|
10
10
|
import { E as le } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
-
import { s as y } from "./field-rac.module-
|
|
12
|
-
import { u as ie } from "./use-element-state-class-name-
|
|
13
|
-
import { u as ce } from "./use-text-input-class-name-
|
|
11
|
+
import { s as y } from "./field-rac.module-ts2t4WUO.js";
|
|
12
|
+
import { u as ie } from "./use-element-state-class-name-C2tQgxUX.js";
|
|
13
|
+
import { u as ce } from "./use-text-input-class-name-CK4rZeSM.js";
|
|
14
14
|
var ue = /* @__PURE__ */ (function(e) {
|
|
15
15
|
return e[e.FREE_FLOW = 0] = "FREE_FLOW", e[e.ONE = 1] = "ONE", e[e.TWO = 2] = "TWO", e[e.THREE = 3] = "THREE", e;
|
|
16
16
|
})({});
|
|
17
|
-
const
|
|
18
|
-
const i =
|
|
19
|
-
return (e.find((l) => l.startsWith(`${
|
|
20
|
-
}, me = (e) => e.map((
|
|
21
|
-
const { label: r } =
|
|
17
|
+
const R = "Other", de = (e, o) => {
|
|
18
|
+
const i = o.length + 2;
|
|
19
|
+
return (e.find((l) => l.startsWith(`${o}: `)) || "").slice(i);
|
|
20
|
+
}, me = (e) => e.map((o) => o.value ?? o.label), P = ({ className: e, ...o }) => {
|
|
21
|
+
const { label: r } = o;
|
|
22
22
|
return /* @__PURE__ */ t.createElement("span", {
|
|
23
23
|
className: e
|
|
24
24
|
}, r);
|
|
25
25
|
}, q = ({ className: e }) => {
|
|
26
|
-
const { value:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
]), [c, L] = w(b), f =
|
|
26
|
+
const { value: o, onChange: r, addOtherLabel: i, addOtherPlaceholder: s, otherInputCharacterLimit: l, disabled: u, readOnly: m, hasError: d } = D(), { t: p } = S(), n = i || p("add-other.default-other-option-label") || R, b = I(() => de(o || [], n), [
|
|
27
|
+
o,
|
|
28
|
+
n
|
|
29
|
+
]), [c, L] = w(b), f = V(r);
|
|
30
30
|
z(() => {
|
|
31
31
|
f.current = r;
|
|
32
32
|
});
|
|
33
|
-
const
|
|
33
|
+
const g = k((h) => {
|
|
34
34
|
L(h);
|
|
35
|
-
const
|
|
35
|
+
const C = (o || []).filter((E) => !E.startsWith(`${n}:`) && E !== n), _ = h ? `${n}: ${h}` : n;
|
|
36
36
|
f.current([
|
|
37
|
-
...
|
|
37
|
+
...C,
|
|
38
38
|
_
|
|
39
39
|
]);
|
|
40
40
|
}, [
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
o,
|
|
42
|
+
n
|
|
43
43
|
]);
|
|
44
44
|
return /* @__PURE__ */ t.createElement(J, {
|
|
45
45
|
value: c,
|
|
46
|
-
onChange:
|
|
46
|
+
onChange: g,
|
|
47
47
|
isDisabled: u,
|
|
48
48
|
isReadOnly: m,
|
|
49
49
|
isInvalid: d,
|
|
50
|
-
"aria-label":
|
|
50
|
+
"aria-label": n
|
|
51
51
|
}, /* @__PURE__ */ t.createElement(X, {
|
|
52
52
|
"data-hook": "tags-other-input",
|
|
53
53
|
"data-filled": c ? !0 : void 0,
|
|
@@ -55,103 +55,103 @@ const v = "Other", de = (e, n) => {
|
|
|
55
55
|
maxLength: l,
|
|
56
56
|
className: e
|
|
57
57
|
}));
|
|
58
|
-
}, T = ({ children: e, className:
|
|
59
|
-
const { value: i, label: s, isOther: l, isFirstOption: u } = r, { id: m, value: d, onChange: p, options:
|
|
58
|
+
}, T = ({ children: e, className: o, ...r }) => {
|
|
59
|
+
const { value: i, label: s, isOther: l, isFirstOption: u } = r, { id: m, value: d, onChange: p, options: n, disabled: b, readOnly: c, hasError: L } = D(), f = V(null);
|
|
60
60
|
U(() => {
|
|
61
61
|
var E;
|
|
62
62
|
u && ((E = f.current) == null || E.focus({
|
|
63
63
|
preventScroll: !0
|
|
64
64
|
}));
|
|
65
65
|
}, m);
|
|
66
|
-
const
|
|
66
|
+
const g = O(e, P), h = I(() => d || [], [
|
|
67
67
|
d
|
|
68
|
-
]),
|
|
68
|
+
]), C = I(() => l ? h.find((E) => E === s || E.startsWith(`${s}: `)) || s : i, [
|
|
69
69
|
l,
|
|
70
70
|
h,
|
|
71
71
|
s,
|
|
72
72
|
i
|
|
73
|
-
]), _ =
|
|
74
|
-
const K = me(
|
|
73
|
+
]), _ = k((E) => {
|
|
74
|
+
const K = me(n || []), A = h.filter((Q) => K.includes(Q));
|
|
75
75
|
p(E ? [
|
|
76
|
-
...
|
|
76
|
+
...A,
|
|
77
77
|
s
|
|
78
|
-
] :
|
|
78
|
+
] : A);
|
|
79
79
|
}, [
|
|
80
80
|
s,
|
|
81
81
|
p,
|
|
82
|
-
|
|
82
|
+
n,
|
|
83
83
|
h
|
|
84
84
|
]);
|
|
85
85
|
return /* @__PURE__ */ t.createElement(Y, {
|
|
86
86
|
inputRef: f,
|
|
87
|
-
value:
|
|
87
|
+
value: C,
|
|
88
88
|
onChange: l ? _ : void 0,
|
|
89
89
|
isDisabled: b,
|
|
90
90
|
isReadOnly: c,
|
|
91
91
|
isInvalid: L
|
|
92
92
|
}, /* @__PURE__ */ t.createElement(Z, {
|
|
93
|
-
className:
|
|
94
|
-
"data-hook": `tags-${l ?
|
|
95
|
-
},
|
|
93
|
+
className: o,
|
|
94
|
+
"data-hook": `tags-${l ? R : i}`
|
|
95
|
+
}, N(g, {
|
|
96
96
|
value: i,
|
|
97
97
|
label: s,
|
|
98
98
|
isOther: l,
|
|
99
99
|
isFirstOption: u
|
|
100
100
|
})));
|
|
101
|
-
},
|
|
102
|
-
const { options: r, addOther: i, addOtherLabel: s, numberOfColumns: l = ue.FREE_FLOW } = D(), { t: u } = S(), m = s || u("add-other.default-other-option-label") ||
|
|
103
|
-
const
|
|
101
|
+
}, x = ({ children: e, className: o }) => {
|
|
102
|
+
const { options: r, addOther: i, addOtherLabel: s, numberOfColumns: l = ue.FREE_FLOW } = D(), { t: u } = S(), m = s || u("add-other.default-other-option-label") || R, d = O(e, T), p = I(() => {
|
|
103
|
+
const n = r || [];
|
|
104
104
|
return i ? [
|
|
105
|
-
...
|
|
105
|
+
...n,
|
|
106
106
|
{
|
|
107
107
|
label: m,
|
|
108
108
|
value: m,
|
|
109
109
|
isOther: !0
|
|
110
110
|
}
|
|
111
|
-
] :
|
|
111
|
+
] : n;
|
|
112
112
|
}, [
|
|
113
113
|
r,
|
|
114
114
|
i,
|
|
115
115
|
m
|
|
116
116
|
]);
|
|
117
117
|
return p.length === 0 ? null : /* @__PURE__ */ t.createElement("div", {
|
|
118
|
-
className:
|
|
118
|
+
className: o,
|
|
119
119
|
"data-columns": l
|
|
120
|
-
}, p.map((
|
|
121
|
-
const c =
|
|
122
|
-
return
|
|
123
|
-
key:
|
|
120
|
+
}, p.map((n, b) => {
|
|
121
|
+
const c = n.value ?? n.label;
|
|
122
|
+
return N(d, {
|
|
123
|
+
key: n.isOther ? R : c,
|
|
124
124
|
value: c,
|
|
125
|
-
label:
|
|
126
|
-
isOther:
|
|
125
|
+
label: n.label,
|
|
126
|
+
isOther: n.isOther,
|
|
127
127
|
isFirstOption: b === 0
|
|
128
128
|
});
|
|
129
129
|
}));
|
|
130
|
-
}, G = ({ children: e, className:
|
|
131
|
-
const { addOther: r, addOtherLabel: i, hasError: s, readOnly: l, value: u } = D(), { t: m } = S(), d = i || m("add-other.default-other-option-label") ||
|
|
130
|
+
}, G = ({ children: e, className: o }) => {
|
|
131
|
+
const { addOther: r, addOtherLabel: i, hasError: s, readOnly: l, value: u } = D(), { t: m } = S(), d = i || m("add-other.default-other-option-label") || R, p = O(e, x), n = O(e, q), b = I(() => !r || !u ? !1 : u.some((c) => c === d || c.startsWith(`${d}:`)), [
|
|
132
132
|
r,
|
|
133
133
|
u,
|
|
134
134
|
d
|
|
135
135
|
]);
|
|
136
136
|
return /* @__PURE__ */ t.createElement("div", {
|
|
137
|
-
className:
|
|
137
|
+
className: o,
|
|
138
138
|
"data-invalid": s,
|
|
139
139
|
"data-readonly": l
|
|
140
|
-
}, p, b &&
|
|
140
|
+
}, p, b && n);
|
|
141
141
|
}, a = ({ children: e }) => {
|
|
142
|
-
const { id:
|
|
142
|
+
const { id: o, value: r, onChange: i, FieldLayout: s, required: l, disabled: u, readOnly: m, hasError: d, onBlur: p, onFocus: n } = D(), { inputId: b, labelId: c, ariaDescribedBy: L } = M(), f = I(() => r || [], [
|
|
143
143
|
r
|
|
144
|
-
]),
|
|
144
|
+
]), g = O(e, $), h = O(e, G), C = O(e, H), _ = O(e, W);
|
|
145
145
|
return /* @__PURE__ */ t.createElement(s, {
|
|
146
|
-
fieldId:
|
|
147
|
-
renderLabel: () =>
|
|
146
|
+
fieldId: o,
|
|
147
|
+
renderLabel: () => g,
|
|
148
148
|
renderInput: () => /* @__PURE__ */ t.createElement(se, {
|
|
149
149
|
id: b,
|
|
150
150
|
ariaLabelledBy: c,
|
|
151
151
|
ariaDescribedBy: L,
|
|
152
152
|
required: l,
|
|
153
153
|
onBlur: p,
|
|
154
|
-
onFocus:
|
|
154
|
+
onFocus: n
|
|
155
155
|
}, /* @__PURE__ */ t.createElement(B, {
|
|
156
156
|
"aria-labelledby": c,
|
|
157
157
|
value: f,
|
|
@@ -161,53 +161,53 @@ const v = "Other", de = (e, n) => {
|
|
|
161
161
|
isRequired: l,
|
|
162
162
|
isInvalid: d
|
|
163
163
|
}, h)),
|
|
164
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, _,
|
|
164
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, _, C)
|
|
165
165
|
});
|
|
166
166
|
};
|
|
167
|
-
|
|
167
|
+
x.Option = T;
|
|
168
168
|
T.Label = P;
|
|
169
169
|
a.Label = $;
|
|
170
170
|
a.Control = G;
|
|
171
|
-
a.Options =
|
|
171
|
+
a.Options = x;
|
|
172
172
|
a.OtherInput = q;
|
|
173
173
|
a.Description = H;
|
|
174
|
-
a.Error =
|
|
175
|
-
const pe = "
|
|
174
|
+
a.Error = W;
|
|
175
|
+
const pe = "_control_hoxuh_1", he = "_options_hoxuh_7", Ee = "_option_hoxuh_7", be = "_optionHover_hoxuh_76", Oe = "_optionSelected_hoxuh_76", v = {
|
|
176
176
|
control: pe,
|
|
177
177
|
options: he,
|
|
178
178
|
option: Ee,
|
|
179
179
|
optionHover: be,
|
|
180
180
|
optionSelected: Oe
|
|
181
|
-
}, fe = ({ content: e, locale:
|
|
181
|
+
}, fe = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement(j, {
|
|
182
182
|
content: e,
|
|
183
|
-
locale:
|
|
183
|
+
locale: o
|
|
184
184
|
}), Ie = {
|
|
185
|
-
base:
|
|
186
|
-
selected:
|
|
187
|
-
hover:
|
|
188
|
-
},
|
|
185
|
+
base: v.option,
|
|
186
|
+
selected: v.optionSelected,
|
|
187
|
+
hover: v.optionHover
|
|
188
|
+
}, Ve = () => {
|
|
189
189
|
const e = ie({
|
|
190
190
|
globalClasses: re,
|
|
191
191
|
moduleClasses: Ie
|
|
192
|
-
}),
|
|
192
|
+
}), o = ce();
|
|
193
193
|
return /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
|
|
194
194
|
className: F(ee, y.label)
|
|
195
195
|
}, /* @__PURE__ */ t.createElement(a.Label.Required, {
|
|
196
196
|
className: F(te, y.requiredMark)
|
|
197
197
|
})), /* @__PURE__ */ t.createElement(a.Control, {
|
|
198
|
-
className:
|
|
198
|
+
className: v.control
|
|
199
199
|
}, /* @__PURE__ */ t.createElement(a.Options, {
|
|
200
|
-
className: F(
|
|
200
|
+
className: F(oe, v.options)
|
|
201
201
|
}, /* @__PURE__ */ t.createElement(a.Options.Option, {
|
|
202
202
|
className: e
|
|
203
203
|
}, /* @__PURE__ */ t.createElement(a.Options.Option.Label, null))), /* @__PURE__ */ t.createElement(a.OtherInput, {
|
|
204
|
-
className:
|
|
204
|
+
className: o
|
|
205
205
|
})), /* @__PURE__ */ t.createElement(a.Error, {
|
|
206
|
-
className: F(
|
|
206
|
+
className: F(ne, y.error)
|
|
207
207
|
}, /* @__PURE__ */ t.createElement(le, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)), /* @__PURE__ */ t.createElement(a.Description, {
|
|
208
208
|
className: F(ae, y.description)
|
|
209
209
|
}, fe));
|
|
210
210
|
};
|
|
211
211
|
export {
|
|
212
|
-
|
|
212
|
+
Ve as T
|
|
213
213
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
2
2
|
import o from "classnames";
|
|
3
3
|
import r, { useCallback as S, useRef as T } from "react";
|
|
4
|
-
import { TextField as
|
|
5
|
-
import {
|
|
4
|
+
import { TextField as y, TextArea as O } from "react-aria-components";
|
|
5
|
+
import { by as p, bv as d, bA as x, U as v, aa as g, K as h, G as M } from "./form-CCQN_rPn.js";
|
|
6
6
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as q, E as B } from "./field-error-headless-
|
|
8
|
-
import { L as k } from "./field-label-headless-
|
|
7
|
+
import { D as q, E as B } from "./field-error-headless-CX95bMbk.js";
|
|
8
|
+
import { L as k } from "./field-label-headless-niuFY6Mw.js";
|
|
9
9
|
import { E as P } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
-
import { s as c } from "./field-rac.module-
|
|
11
|
-
import { u as
|
|
10
|
+
import { s as c } from "./field-rac.module-ts2t4WUO.js";
|
|
11
|
+
import { u as U } from "./use-text-input-class-name-CK4rZeSM.js";
|
|
12
12
|
const e = ({ children: t }) => {
|
|
13
13
|
const { id: a, value: m, onChange: s, disabled: u, required: n, readOnly: l, onBlur: E, onFocus: b, FieldLayout: I, hasError: f } = p(), { labelId: F } = d(), L = S((A) => {
|
|
14
14
|
s(A);
|
|
@@ -18,7 +18,7 @@ const e = ({ children: t }) => {
|
|
|
18
18
|
return /* @__PURE__ */ r.createElement(I, {
|
|
19
19
|
fieldId: a,
|
|
20
20
|
renderLabel: () => R,
|
|
21
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
21
|
+
renderInput: () => /* @__PURE__ */ r.createElement(y, {
|
|
22
22
|
"aria-labelledby": F,
|
|
23
23
|
value: m ?? "",
|
|
24
24
|
onChange: L,
|
|
@@ -31,14 +31,14 @@ const e = ({ children: t }) => {
|
|
|
31
31
|
}, D),
|
|
32
32
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, C, _)
|
|
33
33
|
});
|
|
34
|
-
},
|
|
34
|
+
}, V = ({ className: t }) => {
|
|
35
35
|
const { inputId: a, ariaDescribedBy: m } = d(), { id: s, placeholder: u } = p(), n = T(null);
|
|
36
|
-
return
|
|
36
|
+
return x(() => {
|
|
37
37
|
var l;
|
|
38
38
|
(l = n.current) == null || l.focus({
|
|
39
39
|
preventScroll: !0
|
|
40
40
|
});
|
|
41
|
-
}, s), /* @__PURE__ */ r.createElement(
|
|
41
|
+
}, s), /* @__PURE__ */ r.createElement(O, {
|
|
42
42
|
ref: n,
|
|
43
43
|
id: a,
|
|
44
44
|
"aria-describedby": m,
|
|
@@ -47,27 +47,27 @@ const e = ({ children: t }) => {
|
|
|
47
47
|
});
|
|
48
48
|
};
|
|
49
49
|
e.Label = k;
|
|
50
|
-
e.Input =
|
|
50
|
+
e.Input = V;
|
|
51
51
|
e.Description = q;
|
|
52
52
|
e.Error = B;
|
|
53
|
-
const
|
|
54
|
-
input:
|
|
55
|
-
},
|
|
53
|
+
const w = "_input_ug5v8_1", G = {
|
|
54
|
+
input: w
|
|
55
|
+
}, K = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(N, {
|
|
56
56
|
content: t,
|
|
57
57
|
locale: a
|
|
58
58
|
}), re = () => {
|
|
59
|
-
const t =
|
|
59
|
+
const t = U(G.input);
|
|
60
60
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
61
|
-
className: o(
|
|
61
|
+
className: o(v, c.label)
|
|
62
62
|
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
63
|
-
className: o(
|
|
63
|
+
className: o(g, c.requiredMark)
|
|
64
64
|
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
65
65
|
className: t
|
|
66
66
|
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
67
|
-
className: o(
|
|
67
|
+
className: o(h, c.error)
|
|
68
68
|
}, /* @__PURE__ */ r.createElement(P, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
69
69
|
className: o(M, c.description)
|
|
70
|
-
},
|
|
70
|
+
}, K));
|
|
71
71
|
};
|
|
72
72
|
export {
|
|
73
73
|
re as T
|
package/dist/component/{text-input-field-rac-C2YiMr-g.js → text-input-field-rac-b7RXb4Ob.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { RicosViewer as l } from "@wix/ricos/viewer";
|
|
2
2
|
import t from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { T as r } from "./text-input-headless-
|
|
4
|
+
import { T as r } from "./text-input-headless-b1TEpdit.js";
|
|
5
5
|
import { E as o } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
-
import { s as a } from "./field-rac.module-
|
|
7
|
-
import {
|
|
8
|
-
import { u as p } from "./use-text-input-class-name-
|
|
6
|
+
import { s as a } from "./field-rac.module-ts2t4WUO.js";
|
|
7
|
+
import { U as n, aa as c, K as E, G as i } from "./form-CCQN_rPn.js";
|
|
8
|
+
import { u as p } from "./use-text-input-class-name-CK4rZeSM.js";
|
|
9
9
|
const I = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
|
|
10
10
|
content: s,
|
|
11
11
|
locale: m
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import t, { useRef as L } from "react";
|
|
2
|
-
import { TextField as
|
|
3
|
-
import {
|
|
2
|
+
import { TextField as C, Input as R } from "react-aria-components";
|
|
3
|
+
import { by as c, bv as d, bA as T } from "./form-CCQN_rPn.js";
|
|
4
4
|
import { f as s } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as
|
|
6
|
-
import { L as
|
|
5
|
+
import { D as g, E as h } from "./field-error-headless-CX95bMbk.js";
|
|
6
|
+
import { L as x } from "./field-label-headless-niuFY6Mw.js";
|
|
7
7
|
const e = ({ children: r }) => {
|
|
8
|
-
const { id: a, value: l, onChange: i, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: b, autoComplete: f, FieldLayout: E } = c(), { labelId: I } = d(), F = s(r, e.Label), y = s(r, e.Input), D = s(r, e.Description),
|
|
8
|
+
const { id: a, value: l, onChange: i, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: b, autoComplete: f, FieldLayout: E } = c(), { labelId: I } = d(), F = s(r, e.Label), y = s(r, e.Input), D = s(r, e.Description), v = s(r, e.Error);
|
|
9
9
|
return /* @__PURE__ */ t.createElement(E, {
|
|
10
10
|
fieldId: a,
|
|
11
11
|
renderLabel: () => F,
|
|
12
|
-
renderInput: () => /* @__PURE__ */ t.createElement(
|
|
12
|
+
renderInput: () => /* @__PURE__ */ t.createElement(C, {
|
|
13
13
|
autoComplete: f,
|
|
14
14
|
"aria-labelledby": I,
|
|
15
15
|
value: l ?? "",
|
|
@@ -21,11 +21,11 @@ const e = ({ children: r }) => {
|
|
|
21
21
|
onBlur: m,
|
|
22
22
|
onFocus: b
|
|
23
23
|
}, y),
|
|
24
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null,
|
|
24
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, v, D)
|
|
25
25
|
});
|
|
26
26
|
}, B = ({ className: r }) => {
|
|
27
27
|
const { id: a, placeholder: l } = c(), { inputId: i, ariaDescribedBy: u } = d(), n = L(null);
|
|
28
|
-
return
|
|
28
|
+
return T(() => {
|
|
29
29
|
var o;
|
|
30
30
|
(o = n.current) == null || o.focus({
|
|
31
31
|
preventScroll: !0
|
|
@@ -38,10 +38,10 @@ const e = ({ children: r }) => {
|
|
|
38
38
|
placeholder: l
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
|
-
e.Label =
|
|
41
|
+
e.Label = x;
|
|
42
42
|
e.Input = B;
|
|
43
|
-
e.Description =
|
|
44
|
-
e.Error =
|
|
43
|
+
e.Description = g;
|
|
44
|
+
e.Error = h;
|
|
45
45
|
export {
|
|
46
46
|
e as T
|
|
47
47
|
};
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import e, { useCallback as
|
|
1
|
+
import e, { useCallback as v, useRef as V, useContext as x } from "react";
|
|
2
2
|
import { RicosViewer as q } from "@wix/ricos/viewer";
|
|
3
3
|
import m from "classnames";
|
|
4
4
|
import { parseTime as B } from "@internationalized/date";
|
|
5
|
-
import { TimeField as
|
|
6
|
-
import {
|
|
5
|
+
import { TimeField as U, DateInput as k, DateSegment as _, TimeFieldStateContext as w } from "react-aria-components";
|
|
6
|
+
import { by as p, bv as j, bI as T, bA as G, U as K, aa as Q, K as z, G as J } from "./form-CCQN_rPn.js";
|
|
7
7
|
import { f as u, a as F } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { D as
|
|
9
|
-
import { L as Y } from "./field-label-headless-
|
|
8
|
+
import { D as W, E as X } from "./field-error-headless-CX95bMbk.js";
|
|
9
|
+
import { L as Y } from "./field-label-headless-niuFY6Mw.js";
|
|
10
10
|
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { H as S } from "./custom-focus-class-_483Pkwp.js";
|
|
12
|
-
import { s as f } from "./field-rac.module-
|
|
13
|
-
import { u as $ } from "./use-text-input-class-name-
|
|
12
|
+
import { s as f } from "./field-rac.module-ts2t4WUO.js";
|
|
13
|
+
import { u as $ } from "./use-text-input-class-name-CK4rZeSM.js";
|
|
14
14
|
const r = ({ children: t }) => {
|
|
15
|
-
const { id: n, value: s, onChange: a, disabled: i, readOnly: o, required: c, onBlur: l, onFocus: E, use24HourFormat:
|
|
15
|
+
const { id: n, value: s, onChange: a, disabled: i, readOnly: o, required: c, onBlur: l, onFocus: E, use24HourFormat: b, FieldLayout: C, hasError: I } = p(), { inputId: g, ariaDescribedBy: D, labelId: L } = j(), R = v((M) => {
|
|
16
16
|
const H = ae(M);
|
|
17
17
|
a(H);
|
|
18
18
|
}, [
|
|
19
19
|
a
|
|
20
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(
|
|
21
|
+
return /* @__PURE__ */ e.createElement(C, {
|
|
22
22
|
fieldId: n,
|
|
23
23
|
renderLabel: () => N,
|
|
24
|
-
renderInput: () => /* @__PURE__ */ e.createElement(
|
|
24
|
+
renderInput: () => /* @__PURE__ */ e.createElement(U, {
|
|
25
25
|
"aria-labelledby": L,
|
|
26
|
-
id:
|
|
26
|
+
id: g,
|
|
27
27
|
"aria-describedby": D,
|
|
28
28
|
value: O,
|
|
29
29
|
onChange: R,
|
|
30
30
|
isDisabled: i,
|
|
31
31
|
isReadOnly: o,
|
|
32
|
-
isInvalid:
|
|
32
|
+
isInvalid: I,
|
|
33
33
|
isRequired: c,
|
|
34
34
|
onBlur: l,
|
|
35
35
|
onFocus: E,
|
|
36
|
-
hourCycle:
|
|
36
|
+
hourCycle: b ? 24 : 12
|
|
37
37
|
}, y),
|
|
38
38
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, A, P)
|
|
39
39
|
});
|
|
40
40
|
}, d = ({ children: t, className: n }) => {
|
|
41
41
|
const { hasError: s, hidePlaceholder: a } = p(), i = u(t, d.Hour), o = u(t, d.Minute), c = u(t, d.Period);
|
|
42
|
-
return /* @__PURE__ */ e.createElement(
|
|
42
|
+
return /* @__PURE__ */ e.createElement(k, {
|
|
43
43
|
className: n,
|
|
44
44
|
"data-invalid": s || void 0,
|
|
45
45
|
"data-placeholder-hidden": a || void 0
|
|
@@ -92,7 +92,7 @@ const r = ({ children: t }) => {
|
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
94
|
}, re = ({ className: t, ...n }) => {
|
|
95
|
-
const { hidePlaceholder: s } = p(), { segment: a } = n, { t: i } = T(), o =
|
|
95
|
+
const { hidePlaceholder: s } = p(), { segment: a } = n, { t: i } = T(), o = x(w), c = s ? void 0 : i("field.date.placeholder.period"), l = () => o == null ? void 0 : o.increment("dayPeriod");
|
|
96
96
|
return /* @__PURE__ */ e.createElement(_, {
|
|
97
97
|
segment: a,
|
|
98
98
|
className: t,
|
|
@@ -107,7 +107,7 @@ d.Minute = te;
|
|
|
107
107
|
d.Period = re;
|
|
108
108
|
r.Label = Y;
|
|
109
109
|
r.Time = d;
|
|
110
|
-
r.Description =
|
|
110
|
+
r.Description = W;
|
|
111
111
|
r.Error = X;
|
|
112
112
|
function ne(t) {
|
|
113
113
|
if (!t)
|
|
@@ -151,11 +151,11 @@ const oe = "_time_5p151_1", le = "_hour_5p151_17", se = "_minute_5p151_18", ie =
|
|
|
151
151
|
}), /* @__PURE__ */ e.createElement(r.Time.Period, {
|
|
152
152
|
className: m(h.period, S)
|
|
153
153
|
})), /* @__PURE__ */ e.createElement(r.Error, {
|
|
154
|
-
className: m(
|
|
154
|
+
className: m(z, f.error)
|
|
155
155
|
}, /* @__PURE__ */ e.createElement(Z, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
156
|
-
className: m(
|
|
156
|
+
className: m(J, f.description)
|
|
157
157
|
}, ce));
|
|
158
|
-
},
|
|
158
|
+
}, ge = () => /* @__PURE__ */ e.createElement(me, null);
|
|
159
159
|
export {
|
|
160
|
-
|
|
160
|
+
ge as TimeInputRAC
|
|
161
161
|
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
2
|
+
import i from "classnames";
|
|
3
|
+
import r, { useCallback as h, useRef as y } from "react";
|
|
4
|
+
import { TextField as O, Input as A } from "react-aria-components";
|
|
5
|
+
import { by as d, bv as E, bA as v, U as B, aa as T, K as g, G as k } from "./form-CCQN_rPn.js";
|
|
6
|
+
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { D as M, E as P } from "./field-error-headless-CX95bMbk.js";
|
|
8
|
+
import { L as U } from "./field-label-headless-niuFY6Mw.js";
|
|
9
|
+
import { u as q } from "./use-invoke-callback-UH73A_J3.js";
|
|
10
|
+
import { E as x } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
+
import { s as u } from "./field-rac.module-ts2t4WUO.js";
|
|
12
|
+
import { u as w } from "./use-text-input-class-name-CK4rZeSM.js";
|
|
13
|
+
const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
|
|
14
|
+
const { id: o, value: l, onChange: a, disabled: m, readOnly: n, required: s, hasError: I, onBlur: b, onFocus: f, FieldLayout: R } = d(), { labelId: F } = E(), p = q(b), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), S = h(() => {
|
|
15
|
+
a(V(l)), p();
|
|
16
|
+
}, [
|
|
17
|
+
p,
|
|
18
|
+
a,
|
|
19
|
+
l
|
|
20
|
+
]);
|
|
21
|
+
return /* @__PURE__ */ r.createElement(R, {
|
|
22
|
+
fieldId: o,
|
|
23
|
+
renderLabel: () => L,
|
|
24
|
+
renderInput: () => /* @__PURE__ */ r.createElement(O, {
|
|
25
|
+
"aria-labelledby": F,
|
|
26
|
+
value: l ?? "",
|
|
27
|
+
onChange: a,
|
|
28
|
+
isDisabled: m,
|
|
29
|
+
isReadOnly: n,
|
|
30
|
+
isRequired: s,
|
|
31
|
+
isInvalid: I,
|
|
32
|
+
onBlur: S,
|
|
33
|
+
onFocus: f
|
|
34
|
+
}, D),
|
|
35
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, C)
|
|
36
|
+
});
|
|
37
|
+
}, W = ({ className: t }) => {
|
|
38
|
+
const { id: o, placeholder: l } = d(), { inputId: a, ariaDescribedBy: m } = E(), n = y(null);
|
|
39
|
+
return v(() => {
|
|
40
|
+
var s;
|
|
41
|
+
(s = n.current) == null || s.focus({
|
|
42
|
+
preventScroll: !0
|
|
43
|
+
});
|
|
44
|
+
}, o), /* @__PURE__ */ r.createElement(A, {
|
|
45
|
+
ref: n,
|
|
46
|
+
id: a,
|
|
47
|
+
type: "url",
|
|
48
|
+
autoComplete: "url",
|
|
49
|
+
"aria-describedby": m,
|
|
50
|
+
className: t,
|
|
51
|
+
placeholder: l
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
e.Label = U;
|
|
55
|
+
e.Input = W;
|
|
56
|
+
e.Description = M;
|
|
57
|
+
e.Error = P;
|
|
58
|
+
const $ = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(N, {
|
|
59
|
+
content: t,
|
|
60
|
+
locale: o
|
|
61
|
+
}), te = () => {
|
|
62
|
+
const t = w();
|
|
63
|
+
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
64
|
+
className: i(B, u.label)
|
|
65
|
+
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
66
|
+
className: i(T, u.requiredMark)
|
|
67
|
+
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
68
|
+
className: t
|
|
69
|
+
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
70
|
+
className: i(g, u.error)
|
|
71
|
+
}, /* @__PURE__ */ r.createElement(x, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
72
|
+
className: i(k, u.description)
|
|
73
|
+
}, $));
|
|
74
|
+
};
|
|
75
|
+
export {
|
|
76
|
+
te as U
|
|
77
|
+
};
|