@wix/form-elements 1.147.0 → 1.148.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component/{appointment-rac-BG5-bIZU.js → appointment-rac-BNqXl3dq.js} +93 -89
- package/dist/component/{bookings-address-rac-8e8PqKsp.js → bookings-address-rac-DzLf588z.js} +1 -1
- package/dist/component/{bookings-email-rac-CtlnU8ws.js → bookings-email-rac-BCNWH7ss.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CrivNlXM.js → bookings-first-name-rac-D36aHUOJ.js} +1 -1
- package/dist/component/{bookings-header-rac-DWDAjfqq.js → bookings-header-rac-CNr2y2ES.js} +1 -1
- package/dist/component/{bookings-last-name-rac-qAthWem2.js → bookings-last-name-rac-yHE6ZIxr.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BNyUDqlM.js → bookings-login-bar-rac-C3weOc1i.js} +1 -1
- package/dist/component/{bookings-phone-rac-Tc39XLr7.js → bookings-phone-rac-CIo_ApRf.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CPNaPtFK.js → bookings-rich-text-rac-rgKnvt57.js} +1 -1
- package/dist/component/{checkbox-field-rac-DEa78Tpf.js → checkbox-field-rac-CMaVxLNe.js} +9 -7
- package/dist/component/{checkbox-group-field-headless-BxBaMg29.js → checkbox-group-field-headless-XPtqS8Km.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CRRP03Qk.js → checkbox-group-field-rac-C_58XfQt.js} +6 -6
- package/dist/component/{checkbox-group-rac-TOofMGl3.js → checkbox-group-rac-FQrWViSh.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-6173wvuW.js → checkbox-indicator-module-classes-akWZsZNn.js} +1 -1
- package/dist/component/{checkbox-rac-CHMHr8Ry.js → checkbox-rac-C5Lj2b1N.js} +1 -1
- package/dist/component/{contacts-address-rac-Bc5yDvTL.js → contacts-address-rac-OhpLzD0X.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-Ubtg5ncv.js → contacts-birthdate-rac-Dnqq84ct.js} +1 -1
- package/dist/component/{contacts-company-rac-BksH9IoV.js → contacts-company-rac-DMnTF55t.js} +1 -1
- package/dist/component/{contacts-email-rac-DDPEtMAm.js → contacts-email-rac-DmZhScW2.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DUlCvEdx.js → contacts-first-name-rac-B6A4fuzK.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BikqNgUr.js → contacts-last-name-rac-DVz97lew.js} +1 -1
- package/dist/component/{contacts-phone-rac-B4OEgM_8.js → contacts-phone-rac-DV8aO0uS.js} +1 -1
- package/dist/component/{contacts-position-rac-BfybzySV.js → contacts-position-rac-BP_yBIE4.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CMHb33v1.js → contacts-subscribe-rac-wmTprtLf.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-C-qEqwO5.js → contacts-tax-id-rac-CUEPBQye.js} +1 -1
- package/dist/component/{date-availability-DZ3J3LLm.js → date-availability-BK_0gLRv.js} +1 -1
- package/dist/component/{date-input-field-rac-DeL5vuE7.js → date-input-field-rac-BfWPvRnd.js} +75 -69
- package/dist/component/{date-input-rac-Di6TQvFf.js → date-input-rac-B7vAMRBX.js} +1 -1
- package/dist/component/{date-picker-field-rac-BcdpTkjV.js → date-picker-field-rac-CpDY4EkU.js} +10 -8
- package/dist/component/{date-picker-rac-Brne65gr.js → date-picker-rac-BCswaZB1.js} +1 -1
- package/dist/component/{date-time-input-field-rac-BtQfAxRp.js → date-time-input-field-rac-D9w4eEa0.js} +115 -109
- package/dist/component/{date-time-input-rac-DM_HXiqV.js → date-time-input-rac-_im8-JRC.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-WTVwhGG0.js → dext-checkbox-group-rac-Di7B1Wzv.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BR5YwmLQ.js → dext-checkbox-rac-BPendOsP.js} +1 -1
- package/dist/component/{dext-date-picker-rac-DvDuRGYi.js → dext-date-picker-rac-_-Ig9Qn6.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-C6RgbaVv.js → dext-date-time-input-rac-dKFW87yu.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CWjSdcZx.js → dext-dropdown-rac-Cpdpps7P.js} +1 -1
- package/dist/component/{dext-email-rac-D-C1gVTq.js → dext-email-rac-D4UmYH5m.js} +1 -1
- package/dist/component/{dext-number-input-rac-YKzZS2ZG.js → dext-number-input-rac-DUetGnYJ.js} +1 -1
- package/dist/component/{dext-phone-rac-CFZlEH2a.js → dext-phone-rac-Bsz_DAT9.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DiH0wIIl.js → dext-radio-group-rac-B_soj2FD.js} +2 -2
- package/dist/component/{dext-rating-input-rac-D0s-i0qO.js → dext-rating-input-rac-cm40qt4O.js} +1 -1
- package/dist/component/{dext-tags-rac-Br48OQQ5.js → dext-tags-rac-D1ULx6t1.js} +2 -2
- package/dist/component/{dext-text-area-rac-6jG8gJ7i.js → dext-text-area-rac-IkL67rHB.js} +1 -1
- package/dist/component/{dext-text-input-rac-FAJTCXuf.js → dext-text-input-rac-DsYSTEL2.js} +1 -1
- package/dist/component/{dext-url-input-rac-BoMP8sQB.js → dext-url-input-rac-BKvEkpYu.js} +1 -1
- package/dist/component/{donation-rac-DNi4p-v5.js → donation-rac-CaCXMa-H.js} +60 -58
- package/dist/component/{dropdown-field-headless-7SCC-xOC.js → dropdown-field-headless-DcrQK8mL.js} +29 -27
- package/dist/component/{dropdown-field-rac-CMzZh6J6.js → dropdown-field-rac-CuGoz_6I.js} +4 -4
- package/dist/component/{dropdown-rac-qeugpHXY.js → dropdown-rac-rIe6ZqaZ.js} +1 -1
- package/dist/component/{ecom-address-rac-D8b_L5md.js → ecom-address-rac-DT0rzvvp.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BnAuR9La.js → ecom-subscription-checkbox-rac-ZfbiME6e.js} +2 -2
- package/dist/component/{email-input-field-rac-CunXRyc5.js → email-input-field-rac-8Qn3yskh.js} +4 -4
- package/dist/component/{events-repeater-rac-DMjyIOkB.js → events-repeater-rac-DyHrMd3y.js} +12 -8
- package/dist/component/{events-rsvp-rac-BsuDPq2K.js → events-rsvp-rac-CoL-euuc.js} +4 -4
- package/dist/component/{field-error-headless-E8WjFr_n.js → field-error-headless-RylIeqXr.js} +1 -1
- package/dist/component/{field-label-headless-BakLOu5E.js → field-label-headless-d3hZxIEc.js} +1 -1
- package/dist/component/field-rac.module-DP0lkkEv.js +25 -0
- package/dist/component/{file-upload-rac-Clu_c--0.js → file-upload-rac-rXbabrgc.js} +148 -144
- package/dist/component/{fixed-payment-rac-CzAXxsb-.js → fixed-payment-rac-CaR7pXXA.js} +4 -4
- package/dist/component/{form-DHAKwnLt.js → form-DhIEC3nB.js} +2251 -2256
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CwmVpz3r.js → header-field-rac-nELbyGjP.js} +2 -2
- package/dist/component/{header-rac-ahkGRjSy.js → header-rac-q80EQNmM.js} +1 -1
- package/dist/component/{image-choice-rac-BwxkkdUu.js → image-choice-rac-CLMiTQK0.js} +32 -32
- package/dist/component/{index-BQf23zZi.js → index-C-jVrv9Y.js} +4 -4
- package/dist/component/{index-BFi_n6B7.js → index-DnLJzPM-.js} +2 -2
- package/dist/component/{isObjectLike-DHcMRYYH.js → isObjectLike-Bf577MHV.js} +1 -1
- package/dist/component/{multiline-address-field-rac-C6xaqNOk.js → multiline-address-field-rac-BVAv1w9F.js} +106 -88
- package/dist/component/{multiline-address-rac-DF4TFuDx.js → multiline-address-rac-qMuUHA9U.js} +1 -1
- package/dist/component/{number-input-field-rac-uVJ3SBv2.js → number-input-field-rac-B_vnBWFG.js} +16 -14
- package/dist/component/{number-input-rac-D6ERhrSM.js → number-input-rac-BPCIW8Fz.js} +1 -1
- package/dist/component/{password-rac-CAiC0ZKl.js → password-rac-D72HG72u.js} +13 -11
- package/dist/component/{payment-input-rac-Bu25xvby.js → payment-input-rac-DthVgsAi.js} +13 -11
- package/dist/component/{phone-input-field-rac-32qUvCsC.js → phone-input-field-rac-XIPkH8Fb.js} +7 -7
- package/dist/component/{phone-rac-mNrpj30q.js → phone-rac-U94fCfer.js} +1 -1
- package/dist/component/{product-list-rac-zHdM9rHw.js → product-list-rac-BRMGPyhr.js} +49 -49
- package/dist/component/{quiz-radio-group-rac-BaSlT8w3.js → quiz-radio-group-rac-DafNzzgX.js} +1 -1
- package/dist/component/radio-button-module-classes-DtFlHID_.js +134 -0
- package/dist/component/{radio-group-field-rac-DI0UgTBr.js → radio-group-field-rac-BXrYWjew.js} +5 -5
- package/dist/component/{radio-group-rac-D2ESG8J4.js → radio-group-rac-BNyFfQYV.js} +1 -1
- package/dist/component/{rating-input-field-rac-BYT2XqOK.js → rating-input-field-rac-KbkiVCZ7.js} +5 -5
- package/dist/component/{rating-input-rac-D-5CmVAX.js → rating-input-rac-zT4vPkwP.js} +1 -1
- package/dist/component/{rich-content-rac.module-Dp9Advo9.js → rich-content-rac.module-C0OQetct.js} +1 -1
- package/dist/component/{rich-text-field-rac-COEUwoXQ.js → rich-text-field-rac-T4NoShC0.js} +2 -2
- package/dist/component/{rich-text-rac-CQZLjBQ0.js → rich-text-rac-m6VRCRZu.js} +1 -1
- package/dist/component/{service-dropdown-rac-BTtJVFv8.js → service-dropdown-rac-BFwKhL1l.js} +5 -5
- package/dist/component/{services-multi-choice-rac-hbY3g0Kb.js → services-multi-choice-rac-DjzcuRWv.js} +7 -7
- package/dist/component/{signature-rac-CTCNclwL.js → signature-rac-B1LPKnIw.js} +271 -269
- package/dist/component/{submit-button-rac-kKGeVgsG.js → submit-button-rac-Cz3PVtW4.js} +2 -2
- package/dist/component/{tags-field-rac-CVf7oQr_.js → tags-field-rac-DzSoL__s.js} +75 -75
- package/dist/component/{tags-rac-DiX1_nTT.js → tags-rac-DMYJDrm-.js} +1 -1
- package/dist/component/{text-area-field-rac-IhBNXiDl.js → text-area-field-rac-SuMzBm-Q.js} +15 -13
- package/dist/component/{text-area-rac-DHevCtFF.js → text-area-rac-C-zmnJgt.js} +1 -1
- package/dist/component/{text-input-field-rac-Da3_wTdh.js → text-input-field-rac-BmQlXTK9.js} +4 -4
- package/dist/component/text-input-headless-BsrjGTK4.js +47 -0
- package/dist/component/{text-input-rac-564LIZ1_.js → text-input-rac-DhQFKG4h.js} +1 -1
- package/dist/component/{time-input-rac-p-Nnsxp_.js → time-input-rac-CRZZdbTI.js} +29 -27
- package/dist/component/{url-input-field-rac-DjrcpRtm.js → url-input-field-rac-D617Pvsf.js} +20 -18
- package/dist/component/{url-input-rac-B3brpyop.js → url-input-rac-CLvxaWZz.js} +1 -1
- package/dist/component/{use-dropdown-trigger-class-name-BWTT7ltv.js → use-dropdown-trigger-class-name-C4uqTKFP.js} +4 -4
- package/dist/component/{use-element-state-class-name-CUZuhFvZ.js → use-element-state-class-name-DJx-T0zf.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-ugX8-g4E.js → use-hoverable-input-class-name-pwVZXwrY.js} +3 -3
- package/dist/component/{use-is-forced-open-dropdown-DUZMvWpk.js → use-is-forced-open-dropdown-DBpm1D-o.js} +1 -1
- package/dist/component/{use-service-options-base-hqO9Ev38.js → use-service-options-base-xHeVTve3.js} +1 -1
- package/dist/component/use-text-input-class-name-CrEjJ2Z8.js +6 -0
- package/package.json +2 -2
- package/dist/component/field-rac.module-DfEb7pBp.js +0 -25
- package/dist/component/radio-button-module-classes-BdWjkBlX.js +0 -132
- package/dist/component/text-input-headless-DcZRRXCp.js +0 -45
- package/dist/component/use-text-input-class-name-wp9dzpEy.js +0 -6
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import t, { useRef as X, useCallback as y } from "react";
|
|
2
2
|
import $ from "@wix/editor-react-components/AnimatedIcon";
|
|
3
3
|
import p from "classnames";
|
|
4
|
-
import { bo as b, bi as j, ai as q, ah as z, af as G, ae as J, an as K, am as Q, ag as Y, b as Z, ad as tt, al as et } from "./form-
|
|
4
|
+
import { bo as b, bi as j, ai as q, ah as z, af as G, ae as J, an as K, am as Q, ag as Y, b as Z, ad as tt, al as et } from "./form-DhIEC3nB.js";
|
|
5
5
|
import { ProgressBar as nt, Button as R } from "react-aria-components";
|
|
6
6
|
import { f as l } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { u as x } from "./use-element-state-class-name-
|
|
7
|
+
import { u as x } from "./use-element-state-class-name-DJx-T0zf.js";
|
|
8
8
|
function ot(e) {
|
|
9
9
|
const s = "calc(50% - 2px)";
|
|
10
10
|
return /* @__PURE__ */ t.createElement(nt, {
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { RicosViewer as w } from "@wix/ricos/viewer";
|
|
2
2
|
import F from "classnames";
|
|
3
|
-
import t, { useMemo as I, useState as z, useRef as
|
|
3
|
+
import t, { useMemo as I, useState as z, useRef as q, useLayoutEffect as B, useCallback as N } from "react";
|
|
4
4
|
import { CheckboxGroup as J, TextField as K, Input as X, CheckboxField as Y, CheckboxButton as Z } from "react-aria-components";
|
|
5
|
-
import { bo as D, bl as M, by as S, bq as U, S as ee, a0 as te, aa as
|
|
6
|
-
import { f as O, a as
|
|
7
|
-
import { E as
|
|
8
|
-
import { L as
|
|
5
|
+
import { bo as D, bl as M, by as S, bq as U, S as ee, a0 as te, aa as ae, H as ne, v as oe, ab as re } from "./form-DhIEC3nB.js";
|
|
6
|
+
import { f as O, a as k } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { E as x, D as H } from "./field-error-headless-RylIeqXr.js";
|
|
8
|
+
import { L as W } from "./field-label-headless-d3hZxIEc.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-DP0lkkEv.js";
|
|
12
|
+
import { u as ie } from "./use-element-state-class-name-DJx-T0zf.js";
|
|
13
|
+
import { u as ce } from "./use-text-input-class-name-CrEjJ2Z8.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 R = "Other", de = (e,
|
|
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, a) => {
|
|
18
|
+
const i = a.length + 2;
|
|
19
|
+
return (e.find((l) => l.startsWith(`${a}: `)) || "").slice(i);
|
|
20
|
+
}, me = (e) => e.map((a) => a.value ?? a.label), $ = ({ className: e, ...a }) => {
|
|
21
|
+
const { label: r } = a;
|
|
22
22
|
return /* @__PURE__ */ t.createElement("span", {
|
|
23
23
|
className: e
|
|
24
24
|
}, r);
|
|
25
25
|
}, P = ({ className: e }) => {
|
|
26
|
-
const { value:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
]), [c, L] = z(b), f =
|
|
26
|
+
const { value: a, 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(a || [], n), [
|
|
27
|
+
a,
|
|
28
|
+
n
|
|
29
|
+
]), [c, L] = z(b), f = q(r);
|
|
30
30
|
B(() => {
|
|
31
31
|
f.current = r;
|
|
32
32
|
});
|
|
33
|
-
const g =
|
|
33
|
+
const g = N((h) => {
|
|
34
34
|
L(h);
|
|
35
|
-
const C = (
|
|
35
|
+
const C = (a || []).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
|
+
a,
|
|
42
|
+
n
|
|
43
43
|
]);
|
|
44
44
|
return /* @__PURE__ */ t.createElement(K, {
|
|
45
45
|
value: c,
|
|
@@ -47,7 +47,7 @@ const R = "Other", de = (e, n) => {
|
|
|
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,23 +55,23 @@ const R = "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: a, ...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 = q(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 g = O(e,
|
|
66
|
+
const g = O(e, $), 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
|
|
73
|
+
]), _ = N((E) => {
|
|
74
|
+
const G = me(n || []), A = h.filter((Q) => G.includes(Q));
|
|
75
75
|
p(E ? [
|
|
76
76
|
...A,
|
|
77
77
|
s
|
|
@@ -79,7 +79,7 @@ const R = "Other", de = (e, n) => {
|
|
|
79
79
|
}, [
|
|
80
80
|
s,
|
|
81
81
|
p,
|
|
82
|
-
|
|
82
|
+
n,
|
|
83
83
|
h
|
|
84
84
|
]);
|
|
85
85
|
return /* @__PURE__ */ t.createElement(Y, {
|
|
@@ -90,60 +90,60 @@ const R = "Other", de = (e, n) => {
|
|
|
90
90
|
isReadOnly: c,
|
|
91
91
|
isInvalid: L
|
|
92
92
|
}, /* @__PURE__ */ t.createElement(Z, {
|
|
93
|
-
className:
|
|
93
|
+
className: a,
|
|
94
94
|
"data-hook": `tags-${l ? R : i}`
|
|
95
|
-
},
|
|
95
|
+
}, k(g, {
|
|
96
96
|
value: i,
|
|
97
97
|
label: s,
|
|
98
98
|
isOther: l,
|
|
99
99
|
isFirstOption: u
|
|
100
100
|
})));
|
|
101
|
-
}, V = ({ children: e, className:
|
|
101
|
+
}, V = ({ children: e, className: a }) => {
|
|
102
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
|
|
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: a,
|
|
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 k(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
|
-
},
|
|
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, V),
|
|
130
|
+
}, j = ({ children: e, className: a }) => {
|
|
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, V), n = O(e, P), 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: a,
|
|
138
138
|
"data-invalid": s,
|
|
139
139
|
"data-readonly": l
|
|
140
|
-
}, p, b &&
|
|
141
|
-
},
|
|
142
|
-
const { id:
|
|
140
|
+
}, p, b && n);
|
|
141
|
+
}, o = ({ children: e }) => {
|
|
142
|
+
const { id: a, 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
|
-
]), g = O(e,
|
|
144
|
+
]), g = O(e, W), h = O(e, j), C = O(e, H), _ = O(e, x);
|
|
145
145
|
return /* @__PURE__ */ t.createElement(s, {
|
|
146
|
-
fieldId:
|
|
146
|
+
fieldId: a,
|
|
147
147
|
renderLabel: () => g,
|
|
148
148
|
renderInput: () => /* @__PURE__ */ t.createElement(se, {
|
|
149
149
|
id: b,
|
|
@@ -151,7 +151,7 @@ const R = "Other", de = (e, n) => {
|
|
|
151
151
|
ariaDescribedBy: L,
|
|
152
152
|
required: l,
|
|
153
153
|
onBlur: p,
|
|
154
|
-
onFocus:
|
|
154
|
+
onFocus: n
|
|
155
155
|
}, /* @__PURE__ */ t.createElement(J, {
|
|
156
156
|
"aria-labelledby": c,
|
|
157
157
|
value: f,
|
|
@@ -165,49 +165,49 @@ const R = "Other", de = (e, n) => {
|
|
|
165
165
|
});
|
|
166
166
|
};
|
|
167
167
|
V.Option = T;
|
|
168
|
-
T.Label =
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
const pe = "
|
|
168
|
+
T.Label = $;
|
|
169
|
+
o.Label = W;
|
|
170
|
+
o.Control = j;
|
|
171
|
+
o.Options = V;
|
|
172
|
+
o.OtherInput = P;
|
|
173
|
+
o.Description = H;
|
|
174
|
+
o.Error = x;
|
|
175
|
+
const pe = "_control_tjqha_1", he = "_options_tjqha_7", Ee = "_option_tjqha_7", be = "_optionHover_tjqha_74", Oe = "_optionSelected_tjqha_74", 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: a }) => /* @__PURE__ */ t.createElement(w, {
|
|
182
182
|
content: e,
|
|
183
|
-
locale:
|
|
183
|
+
locale: a
|
|
184
184
|
}), Ie = {
|
|
185
185
|
base: v.option,
|
|
186
186
|
selected: v.optionSelected,
|
|
187
187
|
hover: v.optionHover
|
|
188
|
-
},
|
|
188
|
+
}, qe = () => {
|
|
189
189
|
const e = ie({
|
|
190
190
|
globalClasses: re,
|
|
191
191
|
moduleClasses: Ie
|
|
192
|
-
}),
|
|
193
|
-
return /* @__PURE__ */ t.createElement(
|
|
192
|
+
}), a = ce();
|
|
193
|
+
return /* @__PURE__ */ t.createElement(o, null, /* @__PURE__ */ t.createElement(o.Label, {
|
|
194
194
|
className: F(ee, y.label)
|
|
195
|
-
}, /* @__PURE__ */ t.createElement(
|
|
195
|
+
}, /* @__PURE__ */ t.createElement(o.Label.Required, {
|
|
196
196
|
className: F(te, y.requiredMark)
|
|
197
|
-
})), /* @__PURE__ */ t.createElement(
|
|
197
|
+
})), /* @__PURE__ */ t.createElement(o.Control, {
|
|
198
198
|
className: v.control
|
|
199
|
-
}, /* @__PURE__ */ t.createElement(
|
|
200
|
-
className: F(
|
|
201
|
-
}, /* @__PURE__ */ t.createElement(
|
|
199
|
+
}, /* @__PURE__ */ t.createElement(o.Options, {
|
|
200
|
+
className: F(ae, v.options)
|
|
201
|
+
}, /* @__PURE__ */ t.createElement(o.Options.Option, {
|
|
202
202
|
className: e
|
|
203
|
-
}, /* @__PURE__ */ t.createElement(
|
|
204
|
-
className:
|
|
205
|
-
})), /* @__PURE__ */ t.createElement(
|
|
206
|
-
className: F(
|
|
207
|
-
}, /* @__PURE__ */ t.createElement(le, null), /* @__PURE__ */ t.createElement(
|
|
208
|
-
className: F(
|
|
203
|
+
}, /* @__PURE__ */ t.createElement(o.Options.Option.Label, null))), /* @__PURE__ */ t.createElement(o.OtherInput, {
|
|
204
|
+
className: a
|
|
205
|
+
})), /* @__PURE__ */ t.createElement(o.Error, {
|
|
206
|
+
className: F(ne, y.error)
|
|
207
|
+
}, /* @__PURE__ */ t.createElement(le, null), /* @__PURE__ */ t.createElement(o.Error.Text, null)), /* @__PURE__ */ t.createElement(o.Description, {
|
|
208
|
+
className: F(oe, y.description)
|
|
209
209
|
}, fe));
|
|
210
210
|
};
|
|
211
211
|
export {
|
|
212
|
-
|
|
212
|
+
qe as T
|
|
213
213
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as S } from "@wix/ricos/viewer";
|
|
2
2
|
import o from "classnames";
|
|
3
|
-
import r, { useCallback as
|
|
3
|
+
import r, { useCallback as N, useRef as T } from "react";
|
|
4
4
|
import { TextField as O, TextArea as y } from "react-aria-components";
|
|
5
|
-
import { bo as p, bl as d, bq as x, S as
|
|
5
|
+
import { bo as p, bl as d, bq as x, S as v, a0 as g, H as h, v as q } from "./form-DhIEC3nB.js";
|
|
6
6
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as M, E as B } from "./field-error-headless-
|
|
8
|
-
import { L as k } from "./field-label-headless-
|
|
7
|
+
import { D as M, E as B } from "./field-error-headless-RylIeqXr.js";
|
|
8
|
+
import { L as k } from "./field-label-headless-d3hZxIEc.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 V } from "./use-text-input-class-name-
|
|
10
|
+
import { s as c } from "./field-rac.module-DP0lkkEv.js";
|
|
11
|
+
import { u as V } from "./use-text-input-class-name-CrEjJ2Z8.js";
|
|
12
12
|
const e = ({ children: t }) => {
|
|
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 =
|
|
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 = N((A) => {
|
|
14
14
|
s(A);
|
|
15
15
|
}, [
|
|
16
16
|
s
|
|
@@ -35,7 +35,9 @@ const e = ({ children: t }) => {
|
|
|
35
35
|
const { inputId: a, ariaDescribedBy: m } = d(), { id: s, placeholder: u } = p(), n = T(null);
|
|
36
36
|
return x(() => {
|
|
37
37
|
var l;
|
|
38
|
-
(l = n.current) == null || l.focus(
|
|
38
|
+
(l = n.current) == null || l.focus({
|
|
39
|
+
preventScroll: !0
|
|
40
|
+
});
|
|
39
41
|
}, s), /* @__PURE__ */ r.createElement(y, {
|
|
40
42
|
ref: n,
|
|
41
43
|
id: a,
|
|
@@ -50,19 +52,19 @@ e.Description = M;
|
|
|
50
52
|
e.Error = B;
|
|
51
53
|
const H = "_input_ug5v8_1", Q = {
|
|
52
54
|
input: H
|
|
53
|
-
}, U = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(
|
|
55
|
+
}, U = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(S, {
|
|
54
56
|
content: t,
|
|
55
57
|
locale: a
|
|
56
58
|
}), re = () => {
|
|
57
59
|
const t = V(Q.input);
|
|
58
60
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
59
|
-
className: o(
|
|
61
|
+
className: o(v, c.label)
|
|
60
62
|
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
61
|
-
className: o(
|
|
63
|
+
className: o(g, c.requiredMark)
|
|
62
64
|
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
63
65
|
className: t
|
|
64
66
|
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
65
|
-
className: o(
|
|
67
|
+
className: o(h, c.error)
|
|
66
68
|
}, /* @__PURE__ */ r.createElement(P, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
67
69
|
className: o(q, c.description)
|
|
68
70
|
}, U));
|
package/dist/component/{text-input-field-rac-Da3_wTdh.js → text-input-field-rac-BmQlXTK9.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-BsrjGTK4.js";
|
|
5
5
|
import { E as o } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
-
import { s as a } from "./field-rac.module-
|
|
7
|
-
import { S as n, a0 as c, H as E, v as i } from "./form-
|
|
8
|
-
import { u as p } from "./use-text-input-class-name-
|
|
6
|
+
import { s as a } from "./field-rac.module-DP0lkkEv.js";
|
|
7
|
+
import { S as n, a0 as c, H as E, v as i } from "./form-DhIEC3nB.js";
|
|
8
|
+
import { u as p } from "./use-text-input-class-name-CrEjJ2Z8.js";
|
|
9
9
|
const I = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
|
|
10
10
|
content: s,
|
|
11
11
|
locale: m
|
|
@@ -0,0 +1,47 @@
|
|
|
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-DhIEC3nB.js";
|
|
4
|
+
import { f as l } from "./find-child-C60k4CxG.js";
|
|
5
|
+
import { D as g, E as h } from "./field-error-headless-RylIeqXr.js";
|
|
6
|
+
import { L as q } from "./field-label-headless-d3hZxIEc.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
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import e, { useCallback as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import e, { useCallback as v, useRef as V, useContext as q } from "react";
|
|
2
|
+
import { RicosViewer as x } from "@wix/ricos/viewer";
|
|
3
3
|
import m from "classnames";
|
|
4
|
-
import { parseTime as
|
|
5
|
-
import { TimeField as
|
|
6
|
-
import { bo as p, bl as
|
|
7
|
-
import { f as u, a as
|
|
8
|
-
import { D as W, E as X } from "./field-error-headless-
|
|
9
|
-
import { L as Y } from "./field-label-headless-
|
|
4
|
+
import { parseTime as B } from "@internationalized/date";
|
|
5
|
+
import { TimeField as k, DateInput as U, DateSegment as _, TimeFieldStateContext as w } from "react-aria-components";
|
|
6
|
+
import { bo as p, bl as j, by as T, bq as Q, S as z, a0 as G, H as J, v as K } from "./form-DhIEC3nB.js";
|
|
7
|
+
import { f as u, a as S } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { D as W, E as X } from "./field-error-headless-RylIeqXr.js";
|
|
9
|
+
import { L as Y } from "./field-label-headless-d3hZxIEc.js";
|
|
10
10
|
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
-
import { H as
|
|
12
|
-
import { s as f } from "./field-rac.module-
|
|
13
|
-
import { u as $ } from "./use-text-input-class-name-
|
|
11
|
+
import { H as F } from "./custom-focus-class-_483Pkwp.js";
|
|
12
|
+
import { s as f } from "./field-rac.module-DP0lkkEv.js";
|
|
13
|
+
import { u as $ } from "./use-text-input-class-name-CrEjJ2Z8.js";
|
|
14
14
|
const r = ({ children: t }) => {
|
|
15
|
-
const { id: n, value: s, onChange: a, disabled: i, readOnly: o, required: c, onBlur: l, onFocus: E, use24HourFormat: b, FieldLayout: C, hasError: g } = p(), { inputId: I, ariaDescribedBy: D, labelId: L } =
|
|
15
|
+
const { id: n, value: s, onChange: a, disabled: i, readOnly: o, required: c, onBlur: l, onFocus: E, use24HourFormat: b, FieldLayout: C, hasError: g } = p(), { inputId: I, ariaDescribedBy: D, labelId: L } = j(), R = v((M) => {
|
|
16
16
|
const H = ae(M);
|
|
17
17
|
a(H);
|
|
18
18
|
}, [
|
|
@@ -21,7 +21,7 @@ const r = ({ children: t }) => {
|
|
|
21
21
|
return /* @__PURE__ */ e.createElement(C, {
|
|
22
22
|
fieldId: n,
|
|
23
23
|
renderLabel: () => N,
|
|
24
|
-
renderInput: () => /* @__PURE__ */ e.createElement(
|
|
24
|
+
renderInput: () => /* @__PURE__ */ e.createElement(k, {
|
|
25
25
|
"aria-labelledby": L,
|
|
26
26
|
id: I,
|
|
27
27
|
"aria-describedby": D,
|
|
@@ -39,22 +39,22 @@ const r = ({ children: t }) => {
|
|
|
39
39
|
});
|
|
40
40
|
}, d = ({ children: t, className: n }) => {
|
|
41
41
|
const { hasError: s, hidePlaceholder: a } = p(), i = u(t, d.Hour), o = u(t, d.Minute), c = u(t, d.Period);
|
|
42
|
-
return /* @__PURE__ */ e.createElement(
|
|
42
|
+
return /* @__PURE__ */ e.createElement(U, {
|
|
43
43
|
className: n,
|
|
44
44
|
"data-invalid": s || void 0,
|
|
45
45
|
"data-placeholder-hidden": a || void 0
|
|
46
46
|
}, (l) => {
|
|
47
47
|
switch (l.type) {
|
|
48
48
|
case "hour":
|
|
49
|
-
return
|
|
49
|
+
return S(i, {
|
|
50
50
|
segment: l
|
|
51
51
|
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
52
52
|
case "minute":
|
|
53
|
-
return
|
|
53
|
+
return S(o, {
|
|
54
54
|
segment: l
|
|
55
55
|
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
56
56
|
case "dayPeriod":
|
|
57
|
-
return
|
|
57
|
+
return S(c, {
|
|
58
58
|
segment: l
|
|
59
59
|
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
60
60
|
case "literal":
|
|
@@ -67,9 +67,11 @@ const r = ({ children: t }) => {
|
|
|
67
67
|
});
|
|
68
68
|
}, ee = ({ className: t, ...n }) => {
|
|
69
69
|
const { id: s, hidePlaceholder: a } = p(), { segment: i } = n, { t: o } = T(), c = V(null);
|
|
70
|
-
|
|
70
|
+
Q(() => {
|
|
71
71
|
var E;
|
|
72
|
-
(E = c.current) == null || E.focus(
|
|
72
|
+
(E = c.current) == null || E.focus({
|
|
73
|
+
preventScroll: !0
|
|
74
|
+
});
|
|
73
75
|
}, s);
|
|
74
76
|
const l = a ? void 0 : o("field.date.placeholder.hour");
|
|
75
77
|
return /* @__PURE__ */ e.createElement(_, {
|
|
@@ -90,7 +92,7 @@ const r = ({ children: t }) => {
|
|
|
90
92
|
}
|
|
91
93
|
});
|
|
92
94
|
}, re = ({ className: t, ...n }) => {
|
|
93
|
-
const { hidePlaceholder: s } = p(), { segment: a } = n, { t: i } = T(), o =
|
|
95
|
+
const { hidePlaceholder: s } = p(), { segment: a } = n, { t: i } = T(), o = q(w), c = s ? void 0 : i("field.date.placeholder.period"), l = () => o == null ? void 0 : o.increment("dayPeriod");
|
|
94
96
|
return /* @__PURE__ */ e.createElement(_, {
|
|
95
97
|
segment: a,
|
|
96
98
|
className: t,
|
|
@@ -111,7 +113,7 @@ function ne(t) {
|
|
|
111
113
|
if (!t)
|
|
112
114
|
return null;
|
|
113
115
|
try {
|
|
114
|
-
return
|
|
116
|
+
return B(t);
|
|
115
117
|
} catch {
|
|
116
118
|
return null;
|
|
117
119
|
}
|
|
@@ -126,28 +128,28 @@ function ae(t) {
|
|
|
126
128
|
a
|
|
127
129
|
].join(":");
|
|
128
130
|
}
|
|
129
|
-
const oe = "
|
|
131
|
+
const oe = "_time_5p151_1", le = "_hour_5p151_17", se = "_minute_5p151_18", ie = "_period_5p151_19", h = {
|
|
130
132
|
time: oe,
|
|
131
133
|
hour: le,
|
|
132
134
|
minute: se,
|
|
133
135
|
period: ie
|
|
134
|
-
}, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(
|
|
136
|
+
}, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(x, {
|
|
135
137
|
content: t,
|
|
136
138
|
locale: n
|
|
137
139
|
}), me = () => {
|
|
138
140
|
const t = $(h.time);
|
|
139
141
|
return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
140
|
-
className: m(
|
|
142
|
+
className: m(z, f.label)
|
|
141
143
|
}, /* @__PURE__ */ e.createElement(r.Label.Required, {
|
|
142
144
|
className: m(G, f.requiredMark)
|
|
143
145
|
})), /* @__PURE__ */ e.createElement(r.Time, {
|
|
144
146
|
className: t
|
|
145
147
|
}, /* @__PURE__ */ e.createElement(r.Time.Hour, {
|
|
146
|
-
className: m(h.hour,
|
|
148
|
+
className: m(h.hour, F)
|
|
147
149
|
}), /* @__PURE__ */ e.createElement(r.Time.Minute, {
|
|
148
|
-
className: m(h.minute,
|
|
150
|
+
className: m(h.minute, F)
|
|
149
151
|
}), /* @__PURE__ */ e.createElement(r.Time.Period, {
|
|
150
|
-
className: m(h.period,
|
|
152
|
+
className: m(h.period, F)
|
|
151
153
|
})), /* @__PURE__ */ e.createElement(r.Error, {
|
|
152
154
|
className: m(J, f.error)
|
|
153
155
|
}, /* @__PURE__ */ e.createElement(Z, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
@@ -2,20 +2,20 @@ import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
|
2
2
|
import i from "classnames";
|
|
3
3
|
import r, { useCallback as h, useRef as O } from "react";
|
|
4
4
|
import { TextField as y, Input as A } from "react-aria-components";
|
|
5
|
-
import { bo as d, bl as E, bq as v, S as B, a0 as T, H as g, v as k } from "./form-
|
|
5
|
+
import { bo as d, bl as E, bq as v, S as B, a0 as T, H as g, v as k } from "./form-DhIEC3nB.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as q, E as M } from "./field-error-headless-
|
|
8
|
-
import { L as P } from "./field-label-headless-
|
|
7
|
+
import { D as q, E as M } from "./field-error-headless-RylIeqXr.js";
|
|
8
|
+
import { L as P } from "./field-label-headless-d3hZxIEc.js";
|
|
9
9
|
import { u as x } from "./use-invoke-callback-UH73A_J3.js";
|
|
10
10
|
import { E as U } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
-
import { s as u } from "./field-rac.module-
|
|
12
|
-
import { u as w } from "./use-text-input-class-name-
|
|
11
|
+
import { s as u } from "./field-rac.module-DP0lkkEv.js";
|
|
12
|
+
import { u as w } from "./use-text-input-class-name-CrEjJ2Z8.js";
|
|
13
13
|
const H = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
|
|
14
|
-
const { id: o, value: l, onChange:
|
|
15
|
-
|
|
14
|
+
const { id: o, value: l, onChange: n, disabled: m, readOnly: s, required: a, hasError: I, onBlur: b, onFocus: f, FieldLayout: R } = d(), { labelId: F } = E(), p = x(b), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), S = c(t, e.Error), _ = h(() => {
|
|
15
|
+
n(H(l)), p();
|
|
16
16
|
}, [
|
|
17
17
|
p,
|
|
18
|
-
|
|
18
|
+
n,
|
|
19
19
|
l
|
|
20
20
|
]);
|
|
21
21
|
return /* @__PURE__ */ r.createElement(R, {
|
|
@@ -24,24 +24,26 @@ const H = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
|
|
|
24
24
|
renderInput: () => /* @__PURE__ */ r.createElement(y, {
|
|
25
25
|
"aria-labelledby": F,
|
|
26
26
|
value: l ?? "",
|
|
27
|
-
onChange:
|
|
27
|
+
onChange: n,
|
|
28
28
|
isDisabled: m,
|
|
29
|
-
isReadOnly:
|
|
30
|
-
isRequired:
|
|
29
|
+
isReadOnly: s,
|
|
30
|
+
isRequired: a,
|
|
31
31
|
isInvalid: I,
|
|
32
|
-
onBlur:
|
|
32
|
+
onBlur: _,
|
|
33
33
|
onFocus: f
|
|
34
34
|
}, D),
|
|
35
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null,
|
|
35
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, S, C)
|
|
36
36
|
});
|
|
37
37
|
}, V = ({ className: t }) => {
|
|
38
|
-
const { id: o, placeholder: l } = d(), { inputId:
|
|
38
|
+
const { id: o, placeholder: l } = d(), { inputId: n, ariaDescribedBy: m } = E(), s = O(null);
|
|
39
39
|
return v(() => {
|
|
40
|
-
var
|
|
41
|
-
(
|
|
40
|
+
var a;
|
|
41
|
+
(a = s.current) == null || a.focus({
|
|
42
|
+
preventScroll: !0
|
|
43
|
+
});
|
|
42
44
|
}, o), /* @__PURE__ */ r.createElement(A, {
|
|
43
|
-
ref:
|
|
44
|
-
id:
|
|
45
|
+
ref: s,
|
|
46
|
+
id: n,
|
|
45
47
|
type: "url",
|
|
46
48
|
autoComplete: "url",
|
|
47
49
|
"aria-describedby": m,
|