@wix/form-elements 1.187.0 → 1.188.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-DiGTD4hn.js → appointment-rac-Biwj0bKe.js} +78 -78
- package/dist/component/{bookings-address-rac-Bczo07PP.js → bookings-address-rac-B_o25LOI.js} +1 -1
- package/dist/component/{bookings-email-rac-D0cw7HFH.js → bookings-email-rac-BBcusxbS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DqxVpKqV.js → bookings-first-name-rac-CNTGannm.js} +1 -1
- package/dist/component/{bookings-header-rac-BxlD5Wje.js → bookings-header-rac-BTvG2vnk.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CraNB_ut.js → bookings-last-name-rac-BQumGsz9.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BMGnVYXE.js → bookings-login-bar-rac-Cl_rwWhO.js} +8 -8
- package/dist/component/{bookings-phone-rac-CnSlSyLi.js → bookings-phone-rac-B_gXe9Fa.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CWWvRRRi.js → bookings-rich-text-rac-CbMuPVCB.js} +1 -1
- package/dist/component/{checkbox-field-rac-C2LLGbbS.js → checkbox-field-rac-QwFSqEgs.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-B2hKVuJD.js → checkbox-group-field-headless-CTDMO0TM.js} +38 -38
- package/dist/component/{checkbox-group-field-rac-Bqo7LRpI.js → checkbox-group-field-rac-DFUST9Th.js} +4 -4
- package/dist/component/{checkbox-group-rac-CHAnQW7L.js → checkbox-group-rac-CBAE-o1Q.js} +1 -1
- package/dist/component/{checkbox-rac-D09xnf-F.js → checkbox-rac-DkYPhGTU.js} +1 -1
- package/dist/component/{contacts-address-rac-CY_ff8gq.js → contacts-address-rac-DKf42iJk.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BkPpyiCP.js → contacts-birthdate-rac-ffPSb2YW.js} +1 -1
- package/dist/component/{contacts-company-rac-2I05yC97.js → contacts-company-rac-DLVdNbYz.js} +1 -1
- package/dist/component/{contacts-email-rac-B5vwkBUk.js → contacts-email-rac-CW8SdcYX.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CVxn7EaP.js → contacts-first-name-rac-CGdzgpkw.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DIu7T_QU.js → contacts-last-name-rac-DNQj7UcW.js} +1 -1
- package/dist/component/{contacts-phone-rac-B_9KO997.js → contacts-phone-rac-zAMIceti.js} +1 -1
- package/dist/component/{contacts-position-rac-Dll7FDN5.js → contacts-position-rac-DLwn9B2T.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DvZ0S_7T.js → contacts-subscribe-rac-Cy5rxTkC.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BmYWQGbm.js → contacts-tax-id-rac-CEfU6N6C.js} +1 -1
- package/dist/component/{date-availability-C2IYlnG_.js → date-availability-C9EOQUiy.js} +1 -1
- package/dist/component/{date-input-field-rac-TwaBKY7l.js → date-input-field-rac-F4QQeEtO.js} +57 -57
- package/dist/component/{date-input-rac-CusCOLnm.js → date-input-rac-CJeOgyF5.js} +1 -1
- package/dist/component/{date-picker-field-rac-ufxxlmpA.js → date-picker-field-rac-33ARKAxQ.js} +35 -35
- package/dist/component/{date-picker-rac-IGr_hLjg.js → date-picker-rac-Beaqh84V.js} +1 -1
- package/dist/component/{date-time-input-field-rac-B6ZQo4Tk.js → date-time-input-field-rac-CB8FfYUM.js} +44 -44
- package/dist/component/{date-time-input-rac-X1GCfhSl.js → date-time-input-rac-DQ9P6IVp.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-D9UmRqnt.js → dext-checkbox-group-rac-Cho-hueW.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DrMbQCX3.js → dext-checkbox-rac-BIwIwy-y.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Barwg8La.js → dext-date-picker-rac-C03HJdvX.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-ChIUfDk4.js → dext-date-time-input-rac-Bo4XfnRA.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BCrEGvfc.js → dext-dropdown-rac-CadT1tMH.js} +1 -1
- package/dist/component/{dext-email-rac-D7l9fah1.js → dext-email-rac-DbiEws8H.js} +1 -1
- package/dist/component/{dext-number-input-rac-CrI6ChK9.js → dext-number-input-rac-XoW8CLvX.js} +1 -1
- package/dist/component/{dext-phone-rac-B_ObVduc.js → dext-phone-rac-9rFyUD8e.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DOBaXXjq.js → dext-radio-group-rac-U6BNL7IT.js} +2 -2
- package/dist/component/{dext-rating-input-rac-D4LxflR7.js → dext-rating-input-rac-BDGUv8jU.js} +1 -1
- package/dist/component/{dext-tags-rac-nTSiW-H7.js → dext-tags-rac-CAFGVcIi.js} +2 -2
- package/dist/component/{dext-text-area-rac-DYV_gO7a.js → dext-text-area-rac-DXyzm9oe.js} +1 -1
- package/dist/component/{dext-text-input-rac-Zjq6PsXg.js → dext-text-input-rac-C27gdfyG.js} +1 -1
- package/dist/component/{dext-url-input-rac-BM7jm0Tn.js → dext-url-input-rac-DovYH3_G.js} +1 -1
- package/dist/component/{donation-rac-CGjEtI7s.js → donation-rac-DV2aRsDt.js} +60 -60
- package/dist/component/{dropdown-field-rac-c-Owb2hL.js → dropdown-field-rac-D58C7YZG.js} +3 -3
- package/dist/component/{dropdown-rac-Bp9hWnJS.js → dropdown-rac-57yZf_yZ.js} +1 -1
- package/dist/component/{ecom-address-rac-C1YRffNH.js → ecom-address-rac-Co3WhA7m.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-B5uCvEqP.js → ecom-subscription-checkbox-rac-CYjsuRA9.js} +2 -2
- package/dist/component/{email-input-field-rac-BDQYfj6b.js → email-input-field-rac-C5G3pVkR.js} +14 -14
- package/dist/component/{events-repeater-rac-DoZBb6e0.js → events-repeater-rac-D5PXSDIH.js} +72 -70
- package/dist/component/{events-rsvp-rac-OyYogsL5.js → events-rsvp-rac-BfyQNZh6.js} +3 -3
- package/dist/component/{field-error-headless-B41KJxbD.js → field-error-headless-RTyrenpC.js} +8 -8
- package/dist/component/{field-label-headless-DHt_Wm_S.js → field-label-headless-Bd00Hl2z.js} +4 -4
- package/dist/component/{file-upload-rac-Bed5vOYu.js → file-upload-rac-D5pTnsHO.js} +61 -61
- package/dist/component/{fixed-payment-rac-_HtF4gSw.js → fixed-payment-rac-ByxSjPu5.js} +9 -9
- package/dist/component/{form-DAUDnpk6.js → form-BG5UjjLA.js} +3276 -3217
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BwlXDMt4.js → header-field-rac-Bql6VoAi.js} +2 -2
- package/dist/component/{header-rac-CdFpA8bi.js → header-rac-DWAIn4eY.js} +1 -1
- package/dist/component/{image-choice-rac-Bfs7ixsZ.js → image-choice-rac-D5dSQ4Xd.js} +11 -11
- package/dist/component/{index-B5HfcvO_.js → index-37eV-JEp.js} +5 -5
- package/dist/component/{index-BQctPc9k.js → index-DlcCtz4h.js} +4 -4
- package/dist/component/{isObjectLike-CKRIZUUL.js → isObjectLike-ClPDcTiq.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Gs6BGlnz.js → multiline-address-field-rac-CpvwzmpC.js} +345 -345
- package/dist/component/{multiline-address-rac-6tsDZK20.js → multiline-address-rac-ENim2Bn6.js} +1 -1
- package/dist/component/{number-input-field-rac-D2vzcEDT.js → number-input-field-rac-DTRnmRDk.js} +21 -21
- package/dist/component/{number-input-rac-DJA2sjJ2.js → number-input-rac-QROlEpkx.js} +1 -1
- package/dist/component/{password-rac-DS9j5AEn.js → password-rac-jMoyzIP2.js} +47 -47
- package/dist/component/{payment-input-rac-t15HwuyR.js → payment-input-rac-DOOV4P4b.js} +31 -31
- package/dist/component/{phone-input-field-rac-DCEMaJjP.js → phone-input-field-rac-BA_mTcND.js} +47 -47
- package/dist/component/{phone-rac-R2KIpq9Y.js → phone-rac-DXcbIqHK.js} +1 -1
- package/dist/component/{product-list-rac-BCaz8EbJ.js → product-list-rac-CsxR7Ut6.js} +63 -63
- package/dist/component/{quiz-radio-group-rac-Czjt8SZW.js → quiz-radio-group-rac-IQgqvqjs.js} +1 -1
- package/dist/component/{radio-button-module-classes-B2cY0daS.js → radio-button-module-classes-DIFYfYiH.js} +36 -36
- package/dist/component/{radio-group-field-rac-BdCqn6Uq.js → radio-group-field-rac-Ca2RlxOl.js} +4 -4
- package/dist/component/{radio-group-rac-CdKWOA6d.js → radio-group-rac-DDervEEb.js} +1 -1
- package/dist/component/{rating-input-field-rac-qllcIC5u.js → rating-input-field-rac-0kyPo9cU.js} +12 -12
- package/dist/component/{rating-input-rac-Cno0IibX.js → rating-input-rac-DqPsqUKR.js} +1 -1
- package/dist/component/{rich-content-rac.module-Bj8zO5BD.js → rich-content-rac.module-2T_-7jvb.js} +5 -5
- package/dist/component/{rich-text-field-rac-CJOPMgvk.js → rich-text-field-rac-W-eKzhuC.js} +4 -4
- package/dist/component/{rich-text-rac-qJLSQUfk.js → rich-text-rac-CzJfbAyx.js} +1 -1
- package/dist/component/{service-dropdown-rac-CrrqMt0I.js → service-dropdown-rac-BMJy2pZ5.js} +25 -25
- package/dist/component/{services-multi-choice-rac-DHpIgQT8.js → services-multi-choice-rac-BBAWlI7U.js} +7 -7
- package/dist/component/{signature-rac-vHDz7aO9.js → signature-rac-Y1GLswrp.js} +22 -22
- package/dist/component/{submit-button-rac-CdSXP5MY.js → submit-button-rac-CSKbrgQ3.js} +17 -17
- package/dist/component/{tags-field-rac-BE5q3Yzp.js → tags-field-rac-D3zOYcC5.js} +19 -19
- package/dist/component/{tags-rac-DPH9Jekq.js → tags-rac-Cs77Abgs.js} +1 -1
- package/dist/component/text-area-field-rac-DZZW7rAX.js +74 -0
- package/dist/component/{text-area-rac-BWI_FwJ_.js → text-area-rac-BRPp0HnX.js} +1 -1
- package/dist/component/{text-input-field-rac-SljlZsKs.js → text-input-field-rac-tPDZmLdU.js} +3 -3
- package/dist/component/text-input-headless-tkwEZWs7.js +47 -0
- package/dist/component/{text-input-rac-OP8CxA5d.js → text-input-rac-DnHt4vkM.js} +1 -1
- package/dist/component/{time-input-rac-Dc0pojpK.js → time-input-rac-Dbg4Nqb5.js} +18 -18
- package/dist/component/url-input-field-rac-3ODFXFRP.js +77 -0
- package/dist/component/{url-input-rac-DW245AQ3.js → url-input-rac-CPb5o8Of.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-CohYBaie.js → use-dropdown-option-class-name-Dd4ncVaY.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-CcyW9dW5.js → use-dropdown-trigger-class-name-zVniRqM7.js} +29 -29
- package/dist/component/{use-element-state-class-name-ByWbyT81.js → use-element-state-class-name-C8jFeDrq.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-CmYpz2Os.js → use-hoverable-input-class-name-B9diy0Mr.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-D4-XPkUN.js → use-is-forced-open-dropdown-BR1U1l5w.js} +6 -6
- package/dist/component/{use-service-options-base-DGHhZKVh.js → use-service-options-base-yM4rJlq1.js} +3 -3
- package/dist/component/use-text-input-class-name-D6AnBbJx.js +6 -0
- package/package.json +2 -2
- package/dist/component/text-area-field-rac-CUSpvF_P.js +0 -74
- package/dist/component/text-input-headless-BWFcuwI4.js +0 -47
- package/dist/component/url-input-field-rac-CcUeuaJX.js +0 -77
- package/dist/component/use-text-input-class-name-VJ-nzeqS.js +0 -6
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import t, { useRef as X, useCallback as y } from "react";
|
|
2
|
-
import
|
|
2
|
+
import G from "@wix/editor-react-components/AnimatedIcon";
|
|
3
3
|
import p from "classnames";
|
|
4
|
-
import {
|
|
4
|
+
import { bM as b, bG as J, aF as K, aE as $, aC as j, aB as q, aK as z, aJ as Q, aD as Y, b as Z, aA as tt, aI as et } from "./form-BG5UjjLA.js";
|
|
5
5
|
import { ProgressBar as nt, Button as w } from "react-aria-components";
|
|
6
6
|
import { f as c } 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-C8jFeDrq.js";
|
|
8
8
|
function ot(e) {
|
|
9
9
|
const s = "calc(50% - 2px)";
|
|
10
10
|
return /* @__PURE__ */ t.createElement(nt, {
|
|
@@ -145,14 +145,14 @@ const at = "_navigationContainer_16wic_1", rt = "_rowSpacing_16wic_6", ut = "_na
|
|
|
145
145
|
};
|
|
146
146
|
}, O = ({ icon: e, iconRef: o, iconClassName: s }) => {
|
|
147
147
|
const { wix: n, className: a, ...i } = e ?? {};
|
|
148
|
-
return i.svg ? /* @__PURE__ */ t.createElement(
|
|
148
|
+
return i.svg ? /* @__PURE__ */ t.createElement(G, {
|
|
149
149
|
...i,
|
|
150
150
|
ref: o,
|
|
151
151
|
className: p(Z, s, a)
|
|
152
152
|
}) : null;
|
|
153
153
|
}, Et = () => {
|
|
154
154
|
var A, F, h, U, M, k;
|
|
155
|
-
const { hasSteps: e, showPreviousButton: o, isDisabled: s, isInProgress: n, isSubmitting: a } = b(), v = !s && !(a || n), l =
|
|
155
|
+
const { hasSteps: e, showPreviousButton: o, isDisabled: s, isInProgress: n, isSubmitting: a } = b(), v = !s && !(a || n), l = J(), m = (F = (A = l.submitButton) == null ? void 0 : A.elementProps) == null ? void 0 : F.icon, C = (U = (h = l.nextButton) == null ? void 0 : h.elementProps) == null ? void 0 : U.icon, f = (k = (M = l.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),
|
|
@@ -173,7 +173,7 @@ const at = "_navigationContainer_16wic_1", rt = "_rowSpacing_16wic_6", ut = "_na
|
|
|
173
173
|
}),
|
|
174
174
|
hover: u.buttonHover
|
|
175
175
|
}
|
|
176
|
-
}),
|
|
176
|
+
}), H = P(), L = P(), T = P();
|
|
177
177
|
return /* @__PURE__ */ t.createElement(r, null, /* @__PURE__ */ t.createElement(r.SubmitButton, {
|
|
178
178
|
className: p({
|
|
179
179
|
[u.navigationContainer]: e,
|
|
@@ -187,37 +187,37 @@ const at = "_navigationContainer_16wic_1", rt = "_rowSpacing_16wic_6", ut = "_na
|
|
|
187
187
|
onHoverStart: T.onHoverStart,
|
|
188
188
|
onHoverEnd: T.onHoverEnd
|
|
189
189
|
}, /* @__PURE__ */ t.createElement(r.SubmitButton.PreviousButton.Label, {
|
|
190
|
-
className:
|
|
190
|
+
className: K
|
|
191
191
|
}), /* @__PURE__ */ t.createElement(r.SubmitButton.PreviousButton.Icon, null, /* @__PURE__ */ t.createElement(O, {
|
|
192
192
|
icon: f,
|
|
193
193
|
iconRef: T.iconRef,
|
|
194
|
-
iconClassName:
|
|
194
|
+
iconClassName: $
|
|
195
195
|
}))), /* @__PURE__ */ t.createElement(r.SubmitButton.NextButton, {
|
|
196
196
|
className: ({ isHovered: N }) => d({
|
|
197
197
|
isSelected: !1,
|
|
198
198
|
isHovered: N
|
|
199
199
|
}),
|
|
200
|
-
onHoverStart:
|
|
201
|
-
onHoverEnd:
|
|
200
|
+
onHoverStart: L.onHoverStart,
|
|
201
|
+
onHoverEnd: L.onHoverEnd
|
|
202
202
|
}, /* @__PURE__ */ t.createElement(r.SubmitButton.NextButton.Label, {
|
|
203
|
-
className:
|
|
203
|
+
className: j
|
|
204
204
|
}), /* @__PURE__ */ t.createElement(r.SubmitButton.NextButton.Icon, null, /* @__PURE__ */ t.createElement(O, {
|
|
205
205
|
icon: C,
|
|
206
|
-
iconRef:
|
|
207
|
-
iconClassName:
|
|
206
|
+
iconRef: L.iconRef,
|
|
207
|
+
iconClassName: q
|
|
208
208
|
}))), /* @__PURE__ */ t.createElement(r.SubmitButton.SubmitButton, {
|
|
209
209
|
className: ({ isHovered: N }) => _({
|
|
210
210
|
isSelected: !1,
|
|
211
211
|
isHovered: N,
|
|
212
212
|
isInteractive: v
|
|
213
213
|
}),
|
|
214
|
-
onHoverStart:
|
|
215
|
-
onHoverEnd:
|
|
214
|
+
onHoverStart: H.onHoverStart,
|
|
215
|
+
onHoverEnd: H.onHoverEnd
|
|
216
216
|
}, /* @__PURE__ */ t.createElement(r.SubmitButton.SubmitButton.Label, {
|
|
217
|
-
className:
|
|
217
|
+
className: z
|
|
218
218
|
}), /* @__PURE__ */ t.createElement(r.SubmitButton.SubmitButton.Icon, null, /* @__PURE__ */ t.createElement(O, {
|
|
219
219
|
icon: m,
|
|
220
|
-
iconRef:
|
|
220
|
+
iconRef: H.iconRef,
|
|
221
221
|
iconClassName: Q
|
|
222
222
|
})), /* @__PURE__ */ t.createElement(r.SubmitButton.SubmitButton.Loader, {
|
|
223
223
|
className: u.progress
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as J } from "@wix/ricos/viewer";
|
|
2
2
|
import F from "classnames";
|
|
3
|
-
import t, { useMemo as I, useState as
|
|
4
|
-
import { CheckboxGroup as
|
|
5
|
-
import {
|
|
3
|
+
import t, { useMemo as I, useState as Q, useRef as x, useLayoutEffect as w, useCallback as N } from "react";
|
|
4
|
+
import { CheckboxGroup as z, TextField as B, Input as K, CheckboxField as Y, CheckboxButton as Z } from "react-aria-components";
|
|
5
|
+
import { bM as D, bJ as M, bX as S, bO as U, X as ee, am as te, ax as oe, M as ne, I as ae, ay as se } from "./form-BG5UjjLA.js";
|
|
6
6
|
import { f as O, a as k } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { E as W, D as H } from "./field-error-headless-
|
|
8
|
-
import { L as $ } from "./field-label-headless-
|
|
7
|
+
import { E as W, D as H } from "./field-error-headless-RTyrenpC.js";
|
|
8
|
+
import { L as $ } from "./field-label-headless-Bd00Hl2z.js";
|
|
9
9
|
import { F as re } 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-DcyJyi2B.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-C8jFeDrq.js";
|
|
13
|
+
import { u as ce } from "./use-text-input-class-name-D6AnBbJx.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
|
})({});
|
|
@@ -26,11 +26,11 @@ const v = "Other", de = (e, o) => {
|
|
|
26
26
|
const { value: o, onChange: s, addOtherLabel: i, addOtherPlaceholder: r, otherInputCharacterLimit: l, disabled: u, readOnly: m, hasError: d } = D(), { t: p } = S(), n = i || p("add-other.default-other-option-label") || v, b = I(() => de(o || [], n), [
|
|
27
27
|
o,
|
|
28
28
|
n
|
|
29
|
-
]), [c, L] =
|
|
30
|
-
|
|
29
|
+
]), [c, L] = Q(b), f = x(s);
|
|
30
|
+
w(() => {
|
|
31
31
|
f.current = s;
|
|
32
32
|
});
|
|
33
|
-
const g =
|
|
33
|
+
const g = N((h) => {
|
|
34
34
|
L(h);
|
|
35
35
|
const C = (o || []).filter((E) => !E.startsWith(`${n}:`) && E !== n), _ = h ? `${n}: ${h}` : n;
|
|
36
36
|
f.current([
|
|
@@ -41,7 +41,7 @@ const v = "Other", de = (e, o) => {
|
|
|
41
41
|
o,
|
|
42
42
|
n
|
|
43
43
|
]);
|
|
44
|
-
return /* @__PURE__ */ t.createElement(
|
|
44
|
+
return /* @__PURE__ */ t.createElement(B, {
|
|
45
45
|
value: c,
|
|
46
46
|
onChange: g,
|
|
47
47
|
isDisabled: u,
|
|
@@ -56,7 +56,7 @@ const v = "Other", de = (e, o) => {
|
|
|
56
56
|
className: e
|
|
57
57
|
}));
|
|
58
58
|
}, T = ({ children: e, className: o, ...s }) => {
|
|
59
|
-
const { value: i, label: r, isOther: l, isFirstOption: u } = s, { id: m, value: d, onChange: p, options: n, disabled: b, readOnly: c, hasError: L } = D(), f =
|
|
59
|
+
const { value: i, label: r, isOther: l, isFirstOption: u } = s, { id: m, value: d, onChange: p, options: n, disabled: b, readOnly: c, hasError: L } = D(), f = x(null);
|
|
60
60
|
U(() => {
|
|
61
61
|
var E;
|
|
62
62
|
u && ((E = f.current) == null || E.focus({
|
|
@@ -70,8 +70,8 @@ const v = "Other", de = (e, o) => {
|
|
|
70
70
|
h,
|
|
71
71
|
r,
|
|
72
72
|
i
|
|
73
|
-
]), _ =
|
|
74
|
-
const G = me(n || []), A = h.filter((
|
|
73
|
+
]), _ = N((E) => {
|
|
74
|
+
const G = me(n || []), A = h.filter((X) => G.includes(X));
|
|
75
75
|
p(E ? [
|
|
76
76
|
...A,
|
|
77
77
|
r
|
|
@@ -152,7 +152,7 @@ const v = "Other", de = (e, o) => {
|
|
|
152
152
|
required: l,
|
|
153
153
|
onBlur: p,
|
|
154
154
|
onFocus: n
|
|
155
|
-
}, /* @__PURE__ */ t.createElement(
|
|
155
|
+
}, /* @__PURE__ */ t.createElement(z, {
|
|
156
156
|
"aria-labelledby": c,
|
|
157
157
|
value: f,
|
|
158
158
|
onChange: i,
|
|
@@ -178,14 +178,14 @@ const pe = "_control_oshjt_1", he = "_options_oshjt_7", Ee = "_option_oshjt_7",
|
|
|
178
178
|
option: Ee,
|
|
179
179
|
optionHover: be,
|
|
180
180
|
optionSelected: Oe
|
|
181
|
-
}, fe = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement(
|
|
181
|
+
}, fe = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement(J, {
|
|
182
182
|
content: e,
|
|
183
183
|
locale: o
|
|
184
184
|
}), Ie = {
|
|
185
185
|
base: R.option,
|
|
186
186
|
selected: R.optionSelected,
|
|
187
187
|
hover: R.optionHover
|
|
188
|
-
},
|
|
188
|
+
}, xe = () => {
|
|
189
189
|
const e = ie({
|
|
190
190
|
globalClasses: se,
|
|
191
191
|
moduleClasses: Ie
|
|
@@ -209,5 +209,5 @@ const pe = "_control_oshjt_1", he = "_options_oshjt_7", Ee = "_option_oshjt_7",
|
|
|
209
209
|
}, fe));
|
|
210
210
|
};
|
|
211
211
|
export {
|
|
212
|
-
|
|
212
|
+
xe as T
|
|
213
213
|
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
2
|
+
import o from "classnames";
|
|
3
|
+
import r, { useCallback as O, useRef as S } from "react";
|
|
4
|
+
import { TextField as T, TextArea as y } from "react-aria-components";
|
|
5
|
+
import { bM as p, bJ as d, bO as x, bV as h, X as M, am as g, M as v, I as q } from "./form-BG5UjjLA.js";
|
|
6
|
+
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { D as B, E as V } from "./field-error-headless-RTyrenpC.js";
|
|
8
|
+
import { L as P } from "./field-label-headless-Bd00Hl2z.js";
|
|
9
|
+
import { E as k } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
+
import { s as c } from "./field-rac.module-DcyJyi2B.js";
|
|
11
|
+
import { u as w } from "./use-text-input-class-name-D6AnBbJx.js";
|
|
12
|
+
const e = ({ children: t }) => {
|
|
13
|
+
const { id: a, value: m, onChange: n, disabled: u, required: s, readOnly: l, onBlur: E, onFocus: b, FieldLayout: I, hasError: f } = p(), { labelId: F } = d(), L = O((A) => {
|
|
14
|
+
n(A);
|
|
15
|
+
}, [
|
|
16
|
+
n
|
|
17
|
+
]), R = i(t, e.Label), D = i(t, e.Input), _ = i(t, e.Description), C = i(t, e.Error);
|
|
18
|
+
return /* @__PURE__ */ r.createElement(I, {
|
|
19
|
+
fieldId: a,
|
|
20
|
+
renderLabel: () => R,
|
|
21
|
+
renderInput: () => /* @__PURE__ */ r.createElement(T, {
|
|
22
|
+
"aria-labelledby": F,
|
|
23
|
+
value: m ?? "",
|
|
24
|
+
onChange: L,
|
|
25
|
+
isDisabled: u,
|
|
26
|
+
isReadOnly: l,
|
|
27
|
+
isRequired: s,
|
|
28
|
+
isInvalid: f,
|
|
29
|
+
onBlur: E,
|
|
30
|
+
onFocus: b
|
|
31
|
+
}, D),
|
|
32
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, C, _)
|
|
33
|
+
});
|
|
34
|
+
}, J = ({ className: t }) => {
|
|
35
|
+
const { inputId: a, ariaDescribedBy: m } = d(), { id: n, placeholder: u } = p(), s = S(null);
|
|
36
|
+
return x(() => {
|
|
37
|
+
var l;
|
|
38
|
+
(l = s.current) == null || l.focus({
|
|
39
|
+
preventScroll: !0
|
|
40
|
+
});
|
|
41
|
+
}, n), h(s), /* @__PURE__ */ r.createElement(y, {
|
|
42
|
+
ref: s,
|
|
43
|
+
id: a,
|
|
44
|
+
"aria-describedby": m,
|
|
45
|
+
placeholder: u,
|
|
46
|
+
className: t
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
e.Label = P;
|
|
50
|
+
e.Input = J;
|
|
51
|
+
e.Description = B;
|
|
52
|
+
e.Error = V;
|
|
53
|
+
const K = "_input_ug5v8_1", Q = {
|
|
54
|
+
input: K
|
|
55
|
+
}, U = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(N, {
|
|
56
|
+
content: t,
|
|
57
|
+
locale: a
|
|
58
|
+
}), te = () => {
|
|
59
|
+
const t = w(Q.input);
|
|
60
|
+
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
61
|
+
className: o(M, c.label)
|
|
62
|
+
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
63
|
+
className: o(g, c.requiredMark)
|
|
64
|
+
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
65
|
+
className: t
|
|
66
|
+
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
67
|
+
className: o(v, c.error)
|
|
68
|
+
}, /* @__PURE__ */ r.createElement(k, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
69
|
+
className: o(q, c.description)
|
|
70
|
+
}, U));
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
te as T
|
|
74
|
+
};
|
package/dist/component/{text-input-field-rac-SljlZsKs.js → text-input-field-rac-tPDZmLdU.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-tkwEZWs7.js";
|
|
5
5
|
import { E as o } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as a } from "./field-rac.module-DcyJyi2B.js";
|
|
7
|
-
import { X as n, am as c, M as E, I as i } from "./form-
|
|
8
|
-
import { u as p } from "./use-text-input-class-name-
|
|
7
|
+
import { X as n, am as c, M as E, I as i } from "./form-BG5UjjLA.js";
|
|
8
|
+
import { u as p } from "./use-text-input-class-name-D6AnBbJx.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 n, { useRef as v } from "react";
|
|
2
|
+
import { TextField as C, Input as R } from "react-aria-components";
|
|
3
|
+
import { bM as d, bJ as p, bO as h, bV as O } from "./form-BG5UjjLA.js";
|
|
4
|
+
import { f as a } from "./find-child-C60k4CxG.js";
|
|
5
|
+
import { D as T, E as g } from "./field-error-headless-RTyrenpC.js";
|
|
6
|
+
import { L as x } from "./field-label-headless-Bd00Hl2z.js";
|
|
7
|
+
const e = ({ children: r }) => {
|
|
8
|
+
const { id: s, value: l, onChange: i, disabled: u, readOnly: t, required: o, hasError: c, onBlur: m, onFocus: b, autoComplete: f, FieldLayout: E } = d(), { labelId: I } = p(), F = a(r, e.Label), y = a(r, e.Input), D = a(r, e.Description), L = a(r, e.Error);
|
|
9
|
+
return /* @__PURE__ */ n.createElement(E, {
|
|
10
|
+
fieldId: s,
|
|
11
|
+
renderLabel: () => F,
|
|
12
|
+
renderInput: () => /* @__PURE__ */ n.createElement(C, {
|
|
13
|
+
autoComplete: f,
|
|
14
|
+
"aria-labelledby": I,
|
|
15
|
+
value: l ?? "",
|
|
16
|
+
onChange: i,
|
|
17
|
+
isDisabled: u,
|
|
18
|
+
isReadOnly: t,
|
|
19
|
+
isRequired: o,
|
|
20
|
+
isInvalid: c,
|
|
21
|
+
onBlur: m,
|
|
22
|
+
onFocus: b
|
|
23
|
+
}, y),
|
|
24
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, L, D)
|
|
25
|
+
});
|
|
26
|
+
}, B = ({ className: r }) => {
|
|
27
|
+
const { id: s, placeholder: l } = d(), { inputId: i, ariaDescribedBy: u } = p(), t = v(null);
|
|
28
|
+
return h(() => {
|
|
29
|
+
var o;
|
|
30
|
+
(o = t.current) == null || o.focus({
|
|
31
|
+
preventScroll: !0
|
|
32
|
+
});
|
|
33
|
+
}, s), O(t), /* @__PURE__ */ n.createElement(R, {
|
|
34
|
+
ref: t,
|
|
35
|
+
id: i,
|
|
36
|
+
"aria-describedby": u,
|
|
37
|
+
className: r,
|
|
38
|
+
placeholder: l
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
e.Label = x;
|
|
42
|
+
e.Input = B;
|
|
43
|
+
e.Description = T;
|
|
44
|
+
e.Error = g;
|
|
45
|
+
export {
|
|
46
|
+
e as T
|
|
47
|
+
};
|
|
@@ -3,39 +3,39 @@ import { RicosViewer as q } from "@wix/ricos/viewer";
|
|
|
3
3
|
import m from "classnames";
|
|
4
4
|
import { parseTime as B } from "@internationalized/date";
|
|
5
5
|
import { TimeField as k, DateInput as U, DateSegment as _, TimeFieldStateContext as w } from "react-aria-components";
|
|
6
|
-
import {
|
|
6
|
+
import { bM as p, bJ as X, bX as T, bO as j, X as J, am as Q, M as z, I as G } from "./form-BG5UjjLA.js";
|
|
7
7
|
import { f as u, a as F } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { D as K, E as W } from "./field-error-headless-
|
|
9
|
-
import { L as Y } from "./field-label-headless-
|
|
8
|
+
import { D as K, E as W } from "./field-error-headless-RTyrenpC.js";
|
|
9
|
+
import { L as Y } from "./field-label-headless-Bd00Hl2z.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
12
|
import { s as f } from "./field-rac.module-DcyJyi2B.js";
|
|
13
|
-
import { u as $ } from "./use-text-input-class-name-
|
|
13
|
+
import { u as $ } from "./use-text-input-class-name-D6AnBbJx.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 } = X(), R = V((M) => {
|
|
16
16
|
const H = ae(M);
|
|
17
17
|
a(H);
|
|
18
18
|
}, [
|
|
19
19
|
a
|
|
20
|
-
]), N = u(t, r.Label), y = u(t, r.Time), P = u(t, r.Description),
|
|
21
|
-
return /* @__PURE__ */ e.createElement(
|
|
20
|
+
]), N = u(t, r.Label), y = u(t, r.Time), P = u(t, r.Description), O = u(t, r.Error), A = ne(s);
|
|
21
|
+
return /* @__PURE__ */ e.createElement(C, {
|
|
22
22
|
fieldId: n,
|
|
23
23
|
renderLabel: () => N,
|
|
24
24
|
renderInput: () => /* @__PURE__ */ e.createElement(k, {
|
|
25
|
-
"aria-labelledby":
|
|
25
|
+
"aria-labelledby": L,
|
|
26
26
|
id: g,
|
|
27
|
-
"aria-describedby":
|
|
28
|
-
value:
|
|
27
|
+
"aria-describedby": D,
|
|
28
|
+
value: A,
|
|
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
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
38
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, O, 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);
|
|
@@ -67,7 +67,7 @@ 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
|
+
j(() => {
|
|
71
71
|
var E;
|
|
72
72
|
(E = c.current) == null || E.focus({
|
|
73
73
|
preventScroll: !0
|
|
@@ -139,9 +139,9 @@ const oe = "_time_5p151_1", le = "_hour_5p151_17", se = "_minute_5p151_18", ie =
|
|
|
139
139
|
}), me = () => {
|
|
140
140
|
const t = $(h.time);
|
|
141
141
|
return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
142
|
-
className: m(
|
|
142
|
+
className: m(J, f.label)
|
|
143
143
|
}, /* @__PURE__ */ e.createElement(r.Label.Required, {
|
|
144
|
-
className: m(
|
|
144
|
+
className: m(Q, f.requiredMark)
|
|
145
145
|
})), /* @__PURE__ */ e.createElement(r.Time, {
|
|
146
146
|
className: t
|
|
147
147
|
}, /* @__PURE__ */ e.createElement(r.Time.Hour, {
|
|
@@ -151,9 +151,9 @@ 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(G, f.description)
|
|
157
157
|
}, ce));
|
|
158
158
|
}, ge = () => /* @__PURE__ */ e.createElement(me, null);
|
|
159
159
|
export {
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { RicosViewer as h } from "@wix/ricos/viewer";
|
|
2
|
+
import i from "classnames";
|
|
3
|
+
import r, { useCallback as N, useRef as O } from "react";
|
|
4
|
+
import { TextField as y, Input as A } from "react-aria-components";
|
|
5
|
+
import { bM as d, bJ as E, bO as M, bV as v, X as B, am as P, M as T, I as g } from "./form-BG5UjjLA.js";
|
|
6
|
+
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { D as k, E as q } from "./field-error-headless-RTyrenpC.js";
|
|
8
|
+
import { L as x } from "./field-label-headless-Bd00Hl2z.js";
|
|
9
|
+
import { u as U } from "./use-invoke-callback-UH73A_J3.js";
|
|
10
|
+
import { E as V } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
+
import { s as u } from "./field-rac.module-DcyJyi2B.js";
|
|
12
|
+
import { u as w } from "./use-text-input-class-name-D6AnBbJx.js";
|
|
13
|
+
const W = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
|
|
14
|
+
const { id: o, value: a, onChange: l, disabled: m, readOnly: s, required: n, hasError: I, onBlur: b, onFocus: f, FieldLayout: R } = d(), { labelId: F } = E(), p = U(b), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), S = N(() => {
|
|
15
|
+
l(W(a)), p();
|
|
16
|
+
}, [
|
|
17
|
+
p,
|
|
18
|
+
l,
|
|
19
|
+
a
|
|
20
|
+
]);
|
|
21
|
+
return /* @__PURE__ */ r.createElement(R, {
|
|
22
|
+
fieldId: o,
|
|
23
|
+
renderLabel: () => L,
|
|
24
|
+
renderInput: () => /* @__PURE__ */ r.createElement(y, {
|
|
25
|
+
"aria-labelledby": F,
|
|
26
|
+
value: a ?? "",
|
|
27
|
+
onChange: l,
|
|
28
|
+
isDisabled: m,
|
|
29
|
+
isReadOnly: s,
|
|
30
|
+
isRequired: n,
|
|
31
|
+
isInvalid: I,
|
|
32
|
+
onBlur: S,
|
|
33
|
+
onFocus: f
|
|
34
|
+
}, D),
|
|
35
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, C)
|
|
36
|
+
});
|
|
37
|
+
}, $ = ({ className: t }) => {
|
|
38
|
+
const { id: o, placeholder: a } = d(), { inputId: l, ariaDescribedBy: m } = E(), s = O(null);
|
|
39
|
+
return M(() => {
|
|
40
|
+
var n;
|
|
41
|
+
(n = s.current) == null || n.focus({
|
|
42
|
+
preventScroll: !0
|
|
43
|
+
});
|
|
44
|
+
}, o), v(s), /* @__PURE__ */ r.createElement(A, {
|
|
45
|
+
ref: s,
|
|
46
|
+
id: l,
|
|
47
|
+
type: "url",
|
|
48
|
+
autoComplete: "url",
|
|
49
|
+
"aria-describedby": m,
|
|
50
|
+
className: t,
|
|
51
|
+
placeholder: a
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
e.Label = x;
|
|
55
|
+
e.Input = $;
|
|
56
|
+
e.Description = k;
|
|
57
|
+
e.Error = q;
|
|
58
|
+
const H = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(h, {
|
|
59
|
+
content: t,
|
|
60
|
+
locale: o
|
|
61
|
+
}), oe = () => {
|
|
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(P, u.requiredMark)
|
|
67
|
+
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
68
|
+
className: t
|
|
69
|
+
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
70
|
+
className: i(T, u.error)
|
|
71
|
+
}, /* @__PURE__ */ r.createElement(V, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
72
|
+
className: i(g, u.description)
|
|
73
|
+
}, H));
|
|
74
|
+
};
|
|
75
|
+
export {
|
|
76
|
+
oe as U
|
|
77
|
+
};
|
|
@@ -2,8 +2,8 @@ import d, { useContext as _, useRef as L, useState as m, Children as N, useLayou
|
|
|
2
2
|
import { CollectionRendererContext as g, DefaultCollectionRenderer as E, ListBox as M } from "react-aria-components";
|
|
3
3
|
import P from "classnames";
|
|
4
4
|
import { s as h } from "./field-rac.module-DcyJyi2B.js";
|
|
5
|
-
import { K as T } from "./form-
|
|
6
|
-
import { u as H } from "./use-element-state-class-name-
|
|
5
|
+
import { K as T } from "./form-BG5UjjLA.js";
|
|
6
|
+
import { u as H } from "./use-element-state-class-name-C8jFeDrq.js";
|
|
7
7
|
const R = 1 / 0, I = {
|
|
8
8
|
position: "absolute",
|
|
9
9
|
width: 0,
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import e, { useState as F, useCallback as
|
|
1
|
+
import e, { useState as F, useCallback as v, useRef as H } from "react";
|
|
2
2
|
import { UNSAFE_PortalProvider as $ } from "react-aria";
|
|
3
|
-
import { VisuallyHidden as k, Select as G, SelectValue as
|
|
4
|
-
import {
|
|
5
|
-
import { f as d, a as
|
|
6
|
-
import { D as
|
|
7
|
-
import { L as
|
|
8
|
-
import { E as
|
|
9
|
-
import { b as te } from "./use-is-forced-open-dropdown-
|
|
10
|
-
import { V as ne } from "./use-dropdown-option-class-name-
|
|
11
|
-
import { u as re } from "./use-hoverable-input-class-name-
|
|
3
|
+
import { VisuallyHidden as k, Select as G, SelectValue as J, ListBoxItem as U } from "react-aria-components";
|
|
4
|
+
import { bM as b, bJ as D, bX as W, bO as X, L as Y } from "./form-BG5UjjLA.js";
|
|
5
|
+
import { f as d, a as L } from "./find-child-C60k4CxG.js";
|
|
6
|
+
import { D as j, E as z } from "./field-error-headless-RTyrenpC.js";
|
|
7
|
+
import { L as K } from "./field-label-headless-Bd00Hl2z.js";
|
|
8
|
+
import { E as Q, S as Z, N as ee } from "./non-modal-popover-D-u13tmp.js";
|
|
9
|
+
import { b as te } from "./use-is-forced-open-dropdown-BR1U1l5w.js";
|
|
10
|
+
import { V as ne } from "./use-dropdown-option-class-name-Dd4ncVaY.js";
|
|
11
|
+
import { u as re } from "./use-hoverable-input-class-name-B9diy0Mr.js";
|
|
12
12
|
const r = ({ children: t }) => {
|
|
13
|
-
const { id: l, value: a, defaultValue: s, options: u = [], readOnly: o, onChange: n, placeholder: m, disabled: i, required: p, onBlur:
|
|
13
|
+
const { id: l, value: a, defaultValue: s, options: u = [], readOnly: o, onChange: n, placeholder: m, disabled: i, required: p, onBlur: C, onFocus: I, FieldLayout: y, hasError: T } = b(), [N, P] = F(!1), E = te(l), [R, h] = F(null), S = a && u.some((c) => (c.value ?? c.label) === a) ? a : s || null, { labelId: f } = D(), { t: V } = W(), O = `${f}-required`, B = v((c) => {
|
|
14
14
|
o || n(typeof c == "string" ? c : null);
|
|
15
15
|
}, [
|
|
16
16
|
n,
|
|
17
17
|
o
|
|
18
|
-
]), _ =
|
|
18
|
+
]), _ = v((c) => P(c && !i && !o), [
|
|
19
19
|
i,
|
|
20
20
|
o
|
|
21
|
-
]), q = d(t, r.Label), x = d(t, r.Trigger), w = d(t, r.Options),
|
|
21
|
+
]), q = d(t, r.Label), x = d(t, r.Trigger), w = d(t, r.Options), M = d(t, r.Description), A = d(t, r.Error);
|
|
22
22
|
return /* @__PURE__ */ e.createElement(y, {
|
|
23
23
|
fieldId: l,
|
|
24
24
|
renderLabel: () => q,
|
|
@@ -34,23 +34,23 @@ const r = ({ children: t }) => {
|
|
|
34
34
|
}, /* @__PURE__ */ e.createElement(G, {
|
|
35
35
|
"aria-labelledby": p ? `${f} ${O}` : f,
|
|
36
36
|
value: S,
|
|
37
|
-
isOpen: E ||
|
|
37
|
+
isOpen: E || N && !i && !o,
|
|
38
38
|
onOpenChange: E ? void 0 : _,
|
|
39
39
|
onChange: B,
|
|
40
40
|
isDisabled: i,
|
|
41
|
-
isInvalid:
|
|
41
|
+
isInvalid: T,
|
|
42
42
|
isRequired: p,
|
|
43
|
-
placeholder: m ||
|
|
44
|
-
onBlur:
|
|
45
|
-
onFocus:
|
|
46
|
-
}, x,
|
|
43
|
+
placeholder: m || Q,
|
|
44
|
+
onBlur: C,
|
|
45
|
+
onFocus: I
|
|
46
|
+
}, x, L(w, {
|
|
47
47
|
isForcedOpen: E
|
|
48
48
|
})))),
|
|
49
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
49
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, A, M)
|
|
50
50
|
});
|
|
51
51
|
}, ae = ({ children: t, className: l }) => {
|
|
52
|
-
const { inputId: a, ariaDescribedBy: s } =
|
|
53
|
-
return
|
|
52
|
+
const { inputId: a, ariaDescribedBy: s } = D(), { id: u, hasError: o, isLoading: n } = b(), m = H(null);
|
|
53
|
+
return X(() => {
|
|
54
54
|
var i;
|
|
55
55
|
(i = m.current) == null || i.focus({
|
|
56
56
|
preventScroll: !0
|
|
@@ -62,7 +62,7 @@ const r = ({ children: t }) => {
|
|
|
62
62
|
className: l,
|
|
63
63
|
"data-invalid": o || void 0,
|
|
64
64
|
"data-loading": n || void 0
|
|
65
|
-
}, /* @__PURE__ */ e.createElement(
|
|
65
|
+
}, /* @__PURE__ */ e.createElement(J, null), t);
|
|
66
66
|
}, g = ({ children: t, className: l, ...a }) => {
|
|
67
67
|
const { isForcedOpen: s } = a, { options: u = [] } = b(), o = d(t, g.Option);
|
|
68
68
|
return /* @__PURE__ */ e.createElement(ee, {
|
|
@@ -72,26 +72,26 @@ const r = ({ children: t }) => {
|
|
|
72
72
|
}, /* @__PURE__ */ e.createElement(ne, {
|
|
73
73
|
isForcedOpen: s,
|
|
74
74
|
autoFocus: s ? !1 : void 0
|
|
75
|
-
}, u.map((n) =>
|
|
75
|
+
}, u.map((n) => L(o, {
|
|
76
76
|
key: n.value ?? n.label,
|
|
77
77
|
value: n.value ?? n.label,
|
|
78
78
|
label: n.label
|
|
79
79
|
}))));
|
|
80
80
|
}, se = ({ className: t, ...l }) => {
|
|
81
81
|
const { value: a, label: s } = l;
|
|
82
|
-
return /* @__PURE__ */ e.createElement(
|
|
82
|
+
return /* @__PURE__ */ e.createElement(U, {
|
|
83
83
|
className: t,
|
|
84
84
|
id: a,
|
|
85
85
|
textValue: s
|
|
86
86
|
}, s);
|
|
87
87
|
};
|
|
88
88
|
g.Option = se;
|
|
89
|
-
r.Label =
|
|
89
|
+
r.Label = K;
|
|
90
90
|
r.Trigger = ae;
|
|
91
91
|
r.Options = g;
|
|
92
|
-
r.Description =
|
|
93
|
-
r.Error =
|
|
94
|
-
const ge = (...t) => re(
|
|
92
|
+
r.Description = j;
|
|
93
|
+
r.Error = z;
|
|
94
|
+
const ge = (...t) => re(Y, t);
|
|
95
95
|
export {
|
|
96
96
|
r as D,
|
|
97
97
|
ge as u
|