@wix/form-elements 1.145.0 → 1.147.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-De-uH9rz.js → appointment-rac-BG5-bIZU.js} +98 -98
- package/dist/component/{bookings-address-rac-DB6QCMQJ.js → bookings-address-rac-8e8PqKsp.js} +1 -1
- package/dist/component/{bookings-email-rac-g6ZdB_BO.js → bookings-email-rac-CtlnU8ws.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DQgL_VHl.js → bookings-first-name-rac-CrivNlXM.js} +1 -1
- package/dist/component/{bookings-header-rac-DAnIm-Oq.js → bookings-header-rac-DWDAjfqq.js} +1 -1
- package/dist/component/{bookings-last-name-rac-D62jNdDb.js → bookings-last-name-rac-qAthWem2.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-5z8HfBhU.js → bookings-login-bar-rac-BNyUDqlM.js} +6 -6
- package/dist/component/{bookings-phone-rac-D0gu-_wy.js → bookings-phone-rac-Tc39XLr7.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-b4J1HcdI.js → bookings-rich-text-rac-CPNaPtFK.js} +1 -1
- package/dist/component/{checkbox-field-rac-CmRRc9Dz.js → checkbox-field-rac-DEa78Tpf.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-CB8yAfMe.js → checkbox-group-field-headless-BxBaMg29.js} +68 -68
- package/dist/component/{checkbox-group-field-rac-C5gRZRTd.js → checkbox-group-field-rac-CRRP03Qk.js} +7 -7
- package/dist/component/{checkbox-group-rac-DNDF1Irh.js → checkbox-group-rac-TOofMGl3.js} +1 -1
- package/dist/component/{checkbox-rac-B9vztGBU.js → checkbox-rac-CHMHr8Ry.js} +1 -1
- package/dist/component/{contacts-address-rac-CKZeSncj.js → contacts-address-rac-Bc5yDvTL.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BbpNNQgF.js → contacts-birthdate-rac-Ubtg5ncv.js} +1 -1
- package/dist/component/{contacts-company-rac-BX2KT201.js → contacts-company-rac-BksH9IoV.js} +1 -1
- package/dist/component/{contacts-email-rac-5Irzx1mA.js → contacts-email-rac-DDPEtMAm.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CxKp8_2u.js → contacts-first-name-rac-DUlCvEdx.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BDCbSv5I.js → contacts-last-name-rac-BikqNgUr.js} +1 -1
- package/dist/component/{contacts-phone-rac-BM_PV_uH.js → contacts-phone-rac-B4OEgM_8.js} +1 -1
- package/dist/component/{contacts-position-rac-1aqthQSi.js → contacts-position-rac-BfybzySV.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CdqXs4kp.js → contacts-subscribe-rac-CMHb33v1.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BKHpcDb6.js → contacts-tax-id-rac-C-qEqwO5.js} +1 -1
- package/dist/component/{date-availability-DmFFTX8p.js → date-availability-DZ3J3LLm.js} +1 -1
- package/dist/component/date-input-field-rac-DeL5vuE7.js +297 -0
- package/dist/component/{date-input-rac-BB6qZ16w.js → date-input-rac-Di6TQvFf.js} +1 -1
- package/dist/component/{date-picker-field-rac-Ckwu2vD6.js → date-picker-field-rac-BcdpTkjV.js} +107 -103
- package/dist/component/{date-picker-rac-DSqzUAaH.js → date-picker-rac-Brne65gr.js} +1 -1
- package/dist/component/{date-time-input-field-rac-DO-iRdkW.js → date-time-input-field-rac-BtQfAxRp.js} +49 -49
- package/dist/component/{date-time-input-rac-smVCCxdY.js → date-time-input-rac-DM_HXiqV.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-B8bx3rT2.js → dext-checkbox-group-rac-WTVwhGG0.js} +2 -2
- package/dist/component/{dext-checkbox-rac-x8VLGRbc.js → dext-checkbox-rac-BR5YwmLQ.js} +1 -1
- package/dist/component/{dext-date-picker-rac-D2a9NXap.js → dext-date-picker-rac-DvDuRGYi.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-Cp5XjpGv.js → dext-date-time-input-rac-C6RgbaVv.js} +1 -1
- package/dist/component/{dext-dropdown-rac-nWgEvyxt.js → dext-dropdown-rac-CWjSdcZx.js} +1 -1
- package/dist/component/{dext-email-rac-CkX6ya8p.js → dext-email-rac-D-C1gVTq.js} +1 -1
- package/dist/component/{dext-number-input-rac-CKT0MS1x.js → dext-number-input-rac-YKzZS2ZG.js} +1 -1
- package/dist/component/{dext-phone-rac-DM2E7zW_.js → dext-phone-rac-CFZlEH2a.js} +1 -1
- package/dist/component/dext-radio-group-rac-DiH0wIIl.js +18 -0
- package/dist/component/{dext-rating-input-rac-CKWNpFuu.js → dext-rating-input-rac-D0s-i0qO.js} +1 -1
- package/dist/component/{dext-tags-rac-6AskGGTp.js → dext-tags-rac-Br48OQQ5.js} +2 -2
- package/dist/component/{dext-text-area-rac-ClGLD7sD.js → dext-text-area-rac-6jG8gJ7i.js} +1 -1
- package/dist/component/{dext-text-input-rac-Blbk53d4.js → dext-text-input-rac-FAJTCXuf.js} +1 -1
- package/dist/component/{dext-url-input-rac-BuitmJU0.js → dext-url-input-rac-BoMP8sQB.js} +1 -1
- package/dist/component/{donation-rac-DOifFCD7.js → donation-rac-DNi4p-v5.js} +69 -69
- package/dist/component/{dropdown-field-headless-m2P6s7X5.js → dropdown-field-headless-7SCC-xOC.js} +27 -27
- package/dist/component/{dropdown-field-rac-5e6wWJBl.js → dropdown-field-rac-CMzZh6J6.js} +8 -9
- package/dist/component/{dropdown-rac-BGxE9pJB.js → dropdown-rac-qeugpHXY.js} +1 -1
- package/dist/component/{ecom-address-rac-kbD9qW5Y.js → ecom-address-rac-D8b_L5md.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CE-Yixnj.js → ecom-subscription-checkbox-rac-BnAuR9La.js} +5 -5
- package/dist/component/{email-input-field-rac-CbwcB33o.js → email-input-field-rac-CunXRyc5.js} +64 -62
- package/dist/component/{events-repeater-rac-CGhUscBr.js → events-repeater-rac-DMjyIOkB.js} +17 -17
- package/dist/component/{events-rsvp-rac-AQ33zPTe.js → events-rsvp-rac-BsuDPq2K.js} +8 -8
- package/dist/component/{field-error-headless-ClPQ03Jc.js → field-error-headless-E8WjFr_n.js} +6 -6
- package/dist/component/{field-label-headless-DhN8Lkuq.js → field-label-headless-BakLOu5E.js} +15 -15
- package/dist/component/{file-upload-rac-yTx1ZRhZ.js → file-upload-rac-Clu_c--0.js} +43 -43
- package/dist/component/{fixed-payment-rac-nlyxa9nB.js → fixed-payment-rac-CzAXxsb-.js} +12 -12
- package/dist/component/{form-D3iU18lh.js → form-DHAKwnLt.js} +3850 -3872
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +2 -2
- package/dist/component/{header-field-rac-DAEzcleV.js → header-field-rac-CwmVpz3r.js} +4 -4
- package/dist/component/{header-rac-CJZ4qMFg.js → header-rac-ahkGRjSy.js} +1 -1
- package/dist/component/{image-choice-rac-BFAMHwPh.js → image-choice-rac-BwxkkdUu.js} +17 -17
- package/dist/component/{index-DQW26cnX.js → index-BFi_n6B7.js} +2 -2
- package/dist/component/{index-W7GOFnq8.js → index-BQf23zZi.js} +91 -91
- package/dist/component/{isObjectLike-CE8eaxSI.js → isObjectLike-DHcMRYYH.js} +15 -15
- package/dist/component/{multiline-address-field-rac-FbJO0HFf.js → multiline-address-field-rac-C6xaqNOk.js} +68 -60
- package/dist/component/{multiline-address-rac-CI-vt6Pm.js → multiline-address-rac-DF4TFuDx.js} +1 -1
- package/dist/component/{number-input-field-rac-BRVAr7LL.js → number-input-field-rac-uVJ3SBv2.js} +27 -27
- package/dist/component/{number-input-rac-C8hCiJiu.js → number-input-rac-D6ERhrSM.js} +1 -1
- package/dist/component/{password-rac-Baslr6Ga.js → password-rac-CAiC0ZKl.js} +47 -46
- package/dist/component/{payment-input-rac-CfJSKxYz.js → payment-input-rac-Bu25xvby.js} +33 -32
- package/dist/component/{phone-input-field-rac-Dqh4CXdC.js → phone-input-field-rac-32qUvCsC.js} +46 -45
- package/dist/component/{phone-rac-DaLuGuxd.js → phone-rac-mNrpj30q.js} +1 -1
- package/dist/component/{product-list-rac-PNMwRBtL.js → product-list-rac-zHdM9rHw.js} +53 -53
- package/dist/component/{quiz-radio-group-rac-DN8vY-oM.js → quiz-radio-group-rac-BaSlT8w3.js} +1 -1
- package/dist/component/{radio-button-module-classes-DlJi9a2f.js → radio-button-module-classes-BdWjkBlX.js} +9 -9
- package/dist/component/{radio-group-field-rac-C0tLXhl5.js → radio-group-field-rac-DI0UgTBr.js} +12 -12
- package/dist/component/{radio-group-rac-FAk7PYgP.js → radio-group-rac-D2ESG8J4.js} +1 -1
- package/dist/component/{rating-input-field-rac-Cl1kH_uu.js → rating-input-field-rac-BYT2XqOK.js} +26 -26
- package/dist/component/{rating-input-rac-D9p-0pkI.js → rating-input-rac-D-5CmVAX.js} +1 -1
- package/dist/component/{rich-content-rac.module-Dkr46kPC.js → rich-content-rac.module-Dp9Advo9.js} +8 -8
- package/dist/component/{rich-text-field-rac-DthhTvTp.js → rich-text-field-rac-COEUwoXQ.js} +4 -4
- package/dist/component/{rich-text-rac-DqZX4NeB.js → rich-text-rac-CQZLjBQ0.js} +1 -1
- package/dist/component/{service-dropdown-rac-BMOGLU2Z.js → service-dropdown-rac-BTtJVFv8.js} +44 -45
- package/dist/component/{services-multi-choice-rac-DcdUewzJ.js → services-multi-choice-rac-hbY3g0Kb.js} +11 -11
- package/dist/component/{signature-rac-BRvN6kUW.js → signature-rac-CTCNclwL.js} +67 -67
- package/dist/component/{submit-button-rac-B70UC8eS.js → submit-button-rac-kKGeVgsG.js} +25 -25
- package/dist/component/{tags-field-rac-NpYyV8X4.js → tags-field-rac-CVf7oQr_.js} +35 -35
- package/dist/component/{tags-rac-BMEbpJ-z.js → tags-rac-DiX1_nTT.js} +1 -1
- package/dist/component/{text-area-field-rac-BLSrNwJ6.js → text-area-field-rac-IhBNXiDl.js} +22 -22
- package/dist/component/{text-area-rac-Cm7aAfIz.js → text-area-rac-DHevCtFF.js} +1 -1
- package/dist/component/{text-input-field-rac-BDqV7s0M.js → text-input-field-rac-Da3_wTdh.js} +5 -5
- package/dist/component/text-input-headless-DcZRRXCp.js +45 -0
- package/dist/component/{text-input-rac-Cc_SkCCS.js → text-input-rac-564LIZ1_.js} +1 -1
- package/dist/component/{time-input-rac-DDCiAFe2.js → time-input-rac-p-Nnsxp_.js} +54 -54
- package/dist/component/{url-input-field-rac-jen6pbz7.js → url-input-field-rac-DjrcpRtm.js} +27 -26
- package/dist/component/{url-input-rac-BWh6udtS.js → url-input-rac-B3brpyop.js} +1 -1
- package/dist/component/use-dropdown-trigger-class-name-BWTT7ltv.js +117 -0
- package/dist/component/{use-element-state-class-name-B1r_nXW1.js → use-element-state-class-name-CUZuhFvZ.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-B-FhrcyQ.js → use-hoverable-input-class-name-ugX8-g4E.js} +6 -6
- package/dist/component/use-is-forced-open-dropdown-DUZMvWpk.js +48 -0
- package/dist/component/{use-service-options-base-CTA_43F3.js → use-service-options-base-hqO9Ev38.js} +6 -6
- package/dist/component/use-text-input-class-name-wp9dzpEy.js +6 -0
- package/dist/form.d.ts +5 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-BnlAOn12.js +0 -290
- package/dist/component/dext-radio-group-rac-Czr5yY3K.js +0 -18
- package/dist/component/text-input-headless-B0jcwDev.js +0 -44
- package/dist/component/use-dropdown-option-class-name-OD8brKoy.js +0 -115
- package/dist/component/use-dropdown-trigger-class-name-BrkmG0ad.js +0 -40
- package/dist/component/use-text-input-class-name-BXuk3TK7.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 {
|
|
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-DHAKwnLt.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-CUZuhFvZ.js";
|
|
8
8
|
function ot(e) {
|
|
9
9
|
const s = "calc(50% - 2px)";
|
|
10
10
|
return /* @__PURE__ */ t.createElement(nt, {
|
|
@@ -51,41 +51,41 @@ const r = ({ children: e }) => {
|
|
|
51
51
|
className: e
|
|
52
52
|
}, s, n, a);
|
|
53
53
|
}, S = ({ className: e, onHoverStart: o, onHoverEnd: s, children: n }) => {
|
|
54
|
-
const { showPreviousButton: a, onPreviousClick:
|
|
54
|
+
const { showPreviousButton: a, onPreviousClick: i, previousText: B } = b();
|
|
55
55
|
if (!a)
|
|
56
56
|
return null;
|
|
57
|
-
const
|
|
57
|
+
const c = l(n, S.Label), m = l(n, S.Icon);
|
|
58
58
|
return /* @__PURE__ */ t.createElement(R, {
|
|
59
59
|
className: e,
|
|
60
60
|
"aria-label": B,
|
|
61
|
-
onPress:
|
|
61
|
+
onPress: i,
|
|
62
62
|
onHoverStart: o,
|
|
63
63
|
onHoverEnd: s
|
|
64
|
-
}, m,
|
|
64
|
+
}, m, c ?? /* @__PURE__ */ t.createElement(W, null));
|
|
65
65
|
}, E = ({ className: e, onHoverStart: o, onHoverEnd: s, children: n }) => {
|
|
66
|
-
const { showNextButton: a, onNextClick:
|
|
66
|
+
const { showNextButton: a, onNextClick: i, nextText: B } = b();
|
|
67
67
|
if (!a)
|
|
68
68
|
return null;
|
|
69
|
-
const
|
|
69
|
+
const c = l(n, E.Label), m = l(n, E.Icon);
|
|
70
70
|
return /* @__PURE__ */ t.createElement(R, {
|
|
71
71
|
className: e,
|
|
72
72
|
"aria-label": B,
|
|
73
|
-
onPress:
|
|
73
|
+
onPress: i,
|
|
74
74
|
onHoverStart: o,
|
|
75
75
|
onHoverEnd: s
|
|
76
|
-
},
|
|
76
|
+
}, c ?? /* @__PURE__ */ t.createElement(V, null), m);
|
|
77
77
|
}, v = ({ className: e, onHoverStart: o, onHoverEnd: s, children: n }) => {
|
|
78
|
-
const { showSubmitButton: a, onSubmitClick:
|
|
78
|
+
const { showSubmitButton: a, onSubmitClick: i, submitText: B, isDisabled: c, isInProgress: m, isSubmitting: C } = b();
|
|
79
79
|
if (!a)
|
|
80
80
|
return null;
|
|
81
81
|
const f = l(n, v.Label), I = l(n, v.Icon), d = l(n, v.Loader), _ = C || m;
|
|
82
82
|
return /* @__PURE__ */ t.createElement(R, {
|
|
83
83
|
className: e,
|
|
84
84
|
"aria-label": B,
|
|
85
|
-
onPress: _ ? void 0 :
|
|
85
|
+
onPress: _ ? void 0 : i,
|
|
86
86
|
onHoverStart: o,
|
|
87
87
|
onHoverEnd: s,
|
|
88
|
-
isDisabled:
|
|
88
|
+
isDisabled: c && !_,
|
|
89
89
|
"aria-disabled": _ || void 0,
|
|
90
90
|
"data-in-progress": m
|
|
91
91
|
}, m && d ? d : /* @__PURE__ */ t.createElement(t.Fragment, null, f ?? /* @__PURE__ */ t.createElement(D, null), I));
|
|
@@ -104,27 +104,27 @@ const r = ({ children: e }) => {
|
|
|
104
104
|
return /* @__PURE__ */ t.createElement("span", {
|
|
105
105
|
className: e
|
|
106
106
|
}, o);
|
|
107
|
-
},
|
|
107
|
+
}, A = ({ children: e }) => /* @__PURE__ */ t.createElement(t.Fragment, null, e), st = ({ className: e }) => /* @__PURE__ */ t.createElement("span", {
|
|
108
108
|
className: e
|
|
109
109
|
}, /* @__PURE__ */ t.createElement(ot, null));
|
|
110
110
|
v.Label = D;
|
|
111
|
-
v.Icon =
|
|
111
|
+
v.Icon = A;
|
|
112
112
|
v.Loader = st;
|
|
113
113
|
S.Label = W;
|
|
114
|
-
S.Icon =
|
|
114
|
+
S.Icon = A;
|
|
115
115
|
E.Label = V;
|
|
116
|
-
E.Icon =
|
|
116
|
+
E.Icon = A;
|
|
117
117
|
g.PreviousButton = S;
|
|
118
118
|
g.NextButton = E;
|
|
119
119
|
g.SubmitButton = v;
|
|
120
120
|
r.SubmitButton = g;
|
|
121
|
-
const at = "_navigationContainer_s99vs_1", rt = "_rowSpacing_s99vs_6", ut = "_navigationButton_s99vs_10", lt = "_nextButton_s99vs_33",
|
|
121
|
+
const at = "_navigationContainer_s99vs_1", rt = "_rowSpacing_s99vs_6", ut = "_navigationButton_s99vs_10", lt = "_nextButton_s99vs_33", it = "_previousButton_s99vs_59", ct = "_navigationButtonHover_s99vs_100", mt = "_button_s99vs_116", vt = "_buttonNoSteps_s99vs_164", bt = "_buttonWithSteps_s99vs_168", Bt = "_buttonHover_s99vs_172", St = "_progress_s99vs_196", u = {
|
|
122
122
|
navigationContainer: at,
|
|
123
123
|
rowSpacing: rt,
|
|
124
124
|
navigationButton: ut,
|
|
125
125
|
nextButton: lt,
|
|
126
|
-
previousButton:
|
|
127
|
-
navigationButtonHover:
|
|
126
|
+
previousButton: it,
|
|
127
|
+
navigationButtonHover: ct,
|
|
128
128
|
button: mt,
|
|
129
129
|
buttonNoSteps: vt,
|
|
130
130
|
buttonWithSteps: bt,
|
|
@@ -144,15 +144,15 @@ const at = "_navigationContainer_s99vs_1", rt = "_rowSpacing_s99vs_6", ut = "_na
|
|
|
144
144
|
onHoverEnd: s
|
|
145
145
|
};
|
|
146
146
|
}, O = ({ icon: e, iconRef: o, iconClassName: s }) => {
|
|
147
|
-
const { wix: n, className: a, ...
|
|
148
|
-
return
|
|
149
|
-
...
|
|
147
|
+
const { wix: n, className: a, ...i } = e ?? {};
|
|
148
|
+
return i.svg ? /* @__PURE__ */ t.createElement($, {
|
|
149
|
+
...i,
|
|
150
150
|
ref: o,
|
|
151
151
|
className: p(Z, s, a)
|
|
152
152
|
}) : null;
|
|
153
153
|
}, Et = () => {
|
|
154
|
-
var
|
|
155
|
-
const { hasSteps: e, showPreviousButton: o, isDisabled: s, isInProgress: n, isSubmitting: a } = b(), B = !s && !(a || n),
|
|
154
|
+
var h, F, U, w, M, k;
|
|
155
|
+
const { hasSteps: e, showPreviousButton: o, isDisabled: s, isInProgress: n, isSubmitting: a } = b(), B = !s && !(a || n), c = j(), m = (F = (h = c.submitButton) == null ? void 0 : h.elementProps) == null ? void 0 : F.icon, C = (w = (U = c.nextButton) == null ? void 0 : U.elementProps) == null ? void 0 : w.icon, f = (k = (M = c.previousButton) == null ? void 0 : M.elementProps) == null ? void 0 : k.icon, I = x({
|
|
156
156
|
globalClasses: Y,
|
|
157
157
|
moduleClasses: {
|
|
158
158
|
base: p(u.navigationButton, u.previousButton),
|
|
@@ -1,36 +1,36 @@
|
|
|
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 N, useLayoutEffect as B, useCallback as k } 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 {
|
|
6
|
-
import { f as O, a as
|
|
7
|
-
import { E as
|
|
8
|
-
import { L as $ } from "./field-label-headless-
|
|
5
|
+
import { bo as D, bl as M, by as S, bq as U, S as ee, a0 as te, aa as ne, H as oe, v as ae, ab as re } from "./form-DHAKwnLt.js";
|
|
6
|
+
import { f as O, a as x } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { E as H, D as W } from "./field-error-headless-E8WjFr_n.js";
|
|
8
|
+
import { L as $ } from "./field-label-headless-BakLOu5E.js";
|
|
9
9
|
import { F as se } from "./fieldset-headless-CD3fds9J.js";
|
|
10
10
|
import { E as le } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s as y } from "./field-rac.module-DfEb7pBp.js";
|
|
12
|
-
import { u as ie } from "./use-element-state-class-name-
|
|
13
|
-
import { u as ce } from "./use-text-input-class-name-
|
|
12
|
+
import { u as ie } from "./use-element-state-class-name-CUZuhFvZ.js";
|
|
13
|
+
import { u as ce } from "./use-text-input-class-name-wp9dzpEy.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
|
|
17
|
+
const R = "Other", de = (e, n) => {
|
|
18
18
|
const i = n.length + 2;
|
|
19
19
|
return (e.find((l) => l.startsWith(`${n}: `)) || "").slice(i);
|
|
20
|
-
}, me = (e) => e.map((n) => n.value ?? n.label),
|
|
20
|
+
}, me = (e) => e.map((n) => n.value ?? n.label), q = ({ className: e, ...n }) => {
|
|
21
21
|
const { label: r } = n;
|
|
22
22
|
return /* @__PURE__ */ t.createElement("span", {
|
|
23
23
|
className: e
|
|
24
24
|
}, r);
|
|
25
|
-
},
|
|
26
|
-
const { value: n, onChange: r, addOtherLabel: i, addOtherPlaceholder: s, otherInputCharacterLimit: l, disabled: u, readOnly: m, hasError: d } = D(), { t: p } = S(), o = i || p("add-other.default-other-option-label") ||
|
|
25
|
+
}, P = ({ className: e }) => {
|
|
26
|
+
const { value: n, onChange: r, addOtherLabel: i, addOtherPlaceholder: s, otherInputCharacterLimit: l, disabled: u, readOnly: m, hasError: d } = D(), { t: p } = S(), o = i || p("add-other.default-other-option-label") || R, b = I(() => de(n || [], o), [
|
|
27
27
|
n,
|
|
28
28
|
o
|
|
29
|
-
]), [c, L] = z(b), f =
|
|
29
|
+
]), [c, L] = z(b), f = N(r);
|
|
30
30
|
B(() => {
|
|
31
31
|
f.current = r;
|
|
32
32
|
});
|
|
33
|
-
const g =
|
|
33
|
+
const g = k((h) => {
|
|
34
34
|
L(h);
|
|
35
35
|
const C = (n || []).filter((E) => !E.startsWith(`${o}:`) && E !== o), _ = h ? `${o}: ${h}` : o;
|
|
36
36
|
f.current([
|
|
@@ -56,21 +56,21 @@ const v = "Other", de = (e, n) => {
|
|
|
56
56
|
className: e
|
|
57
57
|
}));
|
|
58
58
|
}, T = ({ children: e, className: n, ...r }) => {
|
|
59
|
-
const { value: i, label: s, isOther: l, isFirstOption: u } = r, { id: m, value: d, onChange: p, options: o, disabled: b, readOnly: c, hasError: L } = D(), f =
|
|
59
|
+
const { value: i, label: s, isOther: l, isFirstOption: u } = r, { id: m, value: d, onChange: p, options: o, disabled: b, readOnly: c, hasError: L } = D(), f = N(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, q), 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
|
-
]), _ =
|
|
73
|
+
]), _ = k((E) => {
|
|
74
74
|
const Q = me(o || []), A = h.filter((j) => Q.includes(j));
|
|
75
75
|
p(E ? [
|
|
76
76
|
...A,
|
|
@@ -91,15 +91,15 @@ const v = "Other", de = (e, n) => {
|
|
|
91
91
|
isInvalid: L
|
|
92
92
|
}, /* @__PURE__ */ t.createElement(Z, {
|
|
93
93
|
className: n,
|
|
94
|
-
"data-hook": `tags-${l ?
|
|
95
|
-
},
|
|
94
|
+
"data-hook": `tags-${l ? R : i}`
|
|
95
|
+
}, x(g, {
|
|
96
96
|
value: i,
|
|
97
97
|
label: s,
|
|
98
98
|
isOther: l,
|
|
99
99
|
isFirstOption: u
|
|
100
100
|
})));
|
|
101
101
|
}, V = ({ children: e, className: n }) => {
|
|
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") ||
|
|
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
103
|
const o = r || [];
|
|
104
104
|
return i ? [
|
|
105
105
|
...o,
|
|
@@ -119,8 +119,8 @@ const v = "Other", de = (e, n) => {
|
|
|
119
119
|
"data-columns": l
|
|
120
120
|
}, p.map((o, b) => {
|
|
121
121
|
const c = o.value ?? o.label;
|
|
122
|
-
return
|
|
123
|
-
key: o.isOther ?
|
|
122
|
+
return x(d, {
|
|
123
|
+
key: o.isOther ? R : c,
|
|
124
124
|
value: c,
|
|
125
125
|
label: o.label,
|
|
126
126
|
isOther: o.isOther,
|
|
@@ -128,7 +128,7 @@ const v = "Other", de = (e, n) => {
|
|
|
128
128
|
});
|
|
129
129
|
}));
|
|
130
130
|
}, G = ({ children: e, className: n }) => {
|
|
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") ||
|
|
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), o = 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
|
|
@@ -141,7 +141,7 @@ const v = "Other", de = (e, n) => {
|
|
|
141
141
|
}, a = ({ children: e }) => {
|
|
142
142
|
const { id: n, value: r, onChange: i, FieldLayout: s, required: l, disabled: u, readOnly: m, hasError: d, onBlur: p, onFocus: o } = D(), { inputId: b, labelId: c, ariaDescribedBy: L } = M(), f = I(() => r || [], [
|
|
143
143
|
r
|
|
144
|
-
]), g = O(e, $), h = O(e, G), C = O(e,
|
|
144
|
+
]), g = O(e, $), h = O(e, G), C = O(e, W), _ = O(e, H);
|
|
145
145
|
return /* @__PURE__ */ t.createElement(s, {
|
|
146
146
|
fieldId: n,
|
|
147
147
|
renderLabel: () => g,
|
|
@@ -165,14 +165,14 @@ const v = "Other", de = (e, n) => {
|
|
|
165
165
|
});
|
|
166
166
|
};
|
|
167
167
|
V.Option = T;
|
|
168
|
-
T.Label =
|
|
168
|
+
T.Label = q;
|
|
169
169
|
a.Label = $;
|
|
170
170
|
a.Control = G;
|
|
171
171
|
a.Options = V;
|
|
172
|
-
a.OtherInput =
|
|
173
|
-
a.Description =
|
|
174
|
-
a.Error =
|
|
175
|
-
const pe = "_control_t6hu2_1", he = "_options_t6hu2_7", Ee = "_option_t6hu2_7", be = "_optionHover_t6hu2_74", Oe = "_optionSelected_t6hu2_74",
|
|
172
|
+
a.OtherInput = P;
|
|
173
|
+
a.Description = W;
|
|
174
|
+
a.Error = H;
|
|
175
|
+
const pe = "_control_t6hu2_1", he = "_options_t6hu2_7", Ee = "_option_t6hu2_7", be = "_optionHover_t6hu2_74", Oe = "_optionSelected_t6hu2_74", v = {
|
|
176
176
|
control: pe,
|
|
177
177
|
options: he,
|
|
178
178
|
option: Ee,
|
|
@@ -182,10 +182,10 @@ const pe = "_control_t6hu2_1", he = "_options_t6hu2_7", Ee = "_option_t6hu2_7",
|
|
|
182
182
|
content: e,
|
|
183
183
|
locale: n
|
|
184
184
|
}), Ie = {
|
|
185
|
-
base:
|
|
186
|
-
selected:
|
|
187
|
-
hover:
|
|
188
|
-
},
|
|
185
|
+
base: v.option,
|
|
186
|
+
selected: v.optionSelected,
|
|
187
|
+
hover: v.optionHover
|
|
188
|
+
}, Ne = () => {
|
|
189
189
|
const e = ie({
|
|
190
190
|
globalClasses: re,
|
|
191
191
|
moduleClasses: Ie
|
|
@@ -195,9 +195,9 @@ const pe = "_control_t6hu2_1", he = "_options_t6hu2_7", Ee = "_option_t6hu2_7",
|
|
|
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(ne,
|
|
200
|
+
className: F(ne, 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, {
|
|
@@ -209,5 +209,5 @@ const pe = "_control_t6hu2_1", he = "_options_t6hu2_7", Ee = "_option_t6hu2_7",
|
|
|
209
209
|
}, fe));
|
|
210
210
|
};
|
|
211
211
|
export {
|
|
212
|
-
|
|
212
|
+
Ne as T
|
|
213
213
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
2
2
|
import o from "classnames";
|
|
3
|
-
import r, { useCallback as
|
|
4
|
-
import { TextField as
|
|
5
|
-
import {
|
|
3
|
+
import r, { useCallback as S, useRef as T } from "react";
|
|
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 g, a0 as h, H as v, v as q } from "./form-DHAKwnLt.js";
|
|
6
6
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as
|
|
8
|
-
import { L as k } from "./field-label-headless-
|
|
7
|
+
import { D as M, E as B } from "./field-error-headless-E8WjFr_n.js";
|
|
8
|
+
import { L as k } from "./field-label-headless-BakLOu5E.js";
|
|
9
9
|
import { E as P } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { s as c } from "./field-rac.module-DfEb7pBp.js";
|
|
11
|
-
import { u as V } from "./use-text-input-class-name-
|
|
11
|
+
import { u as V } from "./use-text-input-class-name-wp9dzpEy.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:
|
|
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);
|
|
15
15
|
}, [
|
|
16
16
|
s
|
|
17
|
-
]),
|
|
17
|
+
]), R = i(t, e.Label), D = i(t, e.Input), _ = i(t, e.Description), C = i(t, e.Error);
|
|
18
18
|
return /* @__PURE__ */ r.createElement(I, {
|
|
19
19
|
fieldId: a,
|
|
20
|
-
renderLabel: () =>
|
|
21
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
22
|
-
"aria-labelledby":
|
|
20
|
+
renderLabel: () => R,
|
|
21
|
+
renderInput: () => /* @__PURE__ */ r.createElement(O, {
|
|
22
|
+
"aria-labelledby": F,
|
|
23
23
|
value: m ?? "",
|
|
24
|
-
onChange:
|
|
24
|
+
onChange: L,
|
|
25
25
|
isDisabled: u,
|
|
26
26
|
isReadOnly: l,
|
|
27
27
|
isRequired: n,
|
|
@@ -31,8 +31,8 @@ const e = ({ children: t }) => {
|
|
|
31
31
|
}, D),
|
|
32
32
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, C, _)
|
|
33
33
|
});
|
|
34
|
-
},
|
|
35
|
-
const { inputId: a, ariaDescribedBy: m } = d(), { id: s, placeholder: u } = p(), n =
|
|
34
|
+
}, w = ({ className: t }) => {
|
|
35
|
+
const { inputId: a, ariaDescribedBy: m } = d(), { id: s, placeholder: u } = p(), n = T(null);
|
|
36
36
|
return x(() => {
|
|
37
37
|
var l;
|
|
38
38
|
(l = n.current) == null || l.focus();
|
|
@@ -45,16 +45,16 @@ const e = ({ children: t }) => {
|
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
47
|
e.Label = k;
|
|
48
|
-
e.Input =
|
|
49
|
-
e.Description =
|
|
48
|
+
e.Input = w;
|
|
49
|
+
e.Description = M;
|
|
50
50
|
e.Error = B;
|
|
51
|
-
const
|
|
52
|
-
input:
|
|
53
|
-
},
|
|
51
|
+
const H = "_input_ug5v8_1", Q = {
|
|
52
|
+
input: H
|
|
53
|
+
}, U = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(N, {
|
|
54
54
|
content: t,
|
|
55
55
|
locale: a
|
|
56
56
|
}), re = () => {
|
|
57
|
-
const t = V(
|
|
57
|
+
const t = V(Q.input);
|
|
58
58
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
59
59
|
className: o(g, c.label)
|
|
60
60
|
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
@@ -64,8 +64,8 @@ const w = "_input_ug5v8_1", G = {
|
|
|
64
64
|
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
65
65
|
className: o(v, c.error)
|
|
66
66
|
}, /* @__PURE__ */ r.createElement(P, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
67
|
-
className: o(
|
|
68
|
-
},
|
|
67
|
+
className: o(q, c.description)
|
|
68
|
+
}, U));
|
|
69
69
|
};
|
|
70
70
|
export {
|
|
71
71
|
re as T
|
package/dist/component/{text-input-field-rac-BDqV7s0M.js → text-input-field-rac-Da3_wTdh.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
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-DcZRRXCp.js";
|
|
5
5
|
import { E as o } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as a } from "./field-rac.module-DfEb7pBp.js";
|
|
7
|
-
import {
|
|
8
|
-
import { u as p } from "./use-text-input-class-name-
|
|
9
|
-
const
|
|
7
|
+
import { S as n, a0 as c, H as E, v as i } from "./form-DHAKwnLt.js";
|
|
8
|
+
import { u as p } from "./use-text-input-class-name-wp9dzpEy.js";
|
|
9
|
+
const I = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
|
|
10
10
|
content: s,
|
|
11
11
|
locale: m
|
|
12
12
|
}), C = () => {
|
|
@@ -21,7 +21,7 @@ const R = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
|
|
|
21
21
|
className: t(E, a.error)
|
|
22
22
|
}, /* @__PURE__ */ e.createElement(o, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
23
23
|
className: t(i, a.description)
|
|
24
|
-
},
|
|
24
|
+
}, I));
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
27
27
|
C as T
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import t, { useRef as C } from "react";
|
|
2
|
+
import { TextField as R, Input as v } from "react-aria-components";
|
|
3
|
+
import { bo as d, bl as c, bq as T } from "./form-DHAKwnLt.js";
|
|
4
|
+
import { f as s } from "./find-child-C60k4CxG.js";
|
|
5
|
+
import { D as g, E as h } from "./field-error-headless-E8WjFr_n.js";
|
|
6
|
+
import { L as q } from "./field-label-headless-BakLOu5E.js";
|
|
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 } = d(), { labelId: I } = c(), F = s(r, e.Label), y = s(r, e.Input), D = s(r, e.Description), L = s(r, e.Error);
|
|
9
|
+
return /* @__PURE__ */ t.createElement(E, {
|
|
10
|
+
fieldId: a,
|
|
11
|
+
renderLabel: () => F,
|
|
12
|
+
renderInput: () => /* @__PURE__ */ t.createElement(R, {
|
|
13
|
+
autoComplete: f,
|
|
14
|
+
"aria-labelledby": I,
|
|
15
|
+
value: l ?? "",
|
|
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: a, placeholder: l } = d(), { inputId: i, ariaDescribedBy: u } = c(), n = C(null);
|
|
28
|
+
return T(() => {
|
|
29
|
+
var o;
|
|
30
|
+
(o = n.current) == null || o.focus();
|
|
31
|
+
}, a), /* @__PURE__ */ t.createElement(v, {
|
|
32
|
+
ref: n,
|
|
33
|
+
id: i,
|
|
34
|
+
"aria-describedby": u,
|
|
35
|
+
className: r,
|
|
36
|
+
placeholder: l
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
e.Label = q;
|
|
40
|
+
e.Input = x;
|
|
41
|
+
e.Description = g;
|
|
42
|
+
e.Error = h;
|
|
43
|
+
export {
|
|
44
|
+
e as T
|
|
45
|
+
};
|