@wix/form-elements 0.0.0-stage → 1.54.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/LICENSE +21 -0
- package/README.md +118 -2
- package/dist/component/appointment-rac-DlOqbFoi.js +1005 -0
- package/dist/component/bookings-address-rac-CvK-P3df.js +6 -0
- package/dist/component/bookings-email-rac-9BEPTuox.js +6 -0
- package/dist/component/bookings-first-name-rac-BrU-BtPp.js +6 -0
- package/dist/component/bookings-header-rac-8NCL7fxp.js +8 -0
- package/dist/component/bookings-last-name-rac-DgLqZ1nS.js +6 -0
- package/dist/component/bookings-login-bar-rac-C2pzRMyt.js +74 -0
- package/dist/component/bookings-phone-rac-BrPBAo8B.js +6 -0
- package/dist/component/bookings-rich-text-rac-qpPsyIuc.js +8 -0
- package/dist/component/calling-country-codes-PyWuOTmF.js +243 -0
- package/dist/component/checkbox-field-rac-CaloY2Hs.js +625 -0
- package/dist/component/checkbox-group-field-headless-4HlJmarB.js +204 -0
- package/dist/component/checkbox-group-field-rac-B1tFZT3o.js +33 -0
- package/dist/component/checkbox-group-rac-C0SzN2Bx.js +6 -0
- package/dist/component/checkbox-rac-ssJIVvZI.js +6 -0
- package/dist/component/chevron-down-icon-CcpVm6B-.js +15 -0
- package/dist/component/contacts-address-rac-Dwf4yrGq.js +6 -0
- package/dist/component/contacts-birthdate-rac-C195rG5w.js +6 -0
- package/dist/component/contacts-company-rac-BHX6xZU8.js +6 -0
- package/dist/component/contacts-email-rac-CFY-m-r2.js +6 -0
- package/dist/component/contacts-first-name-rac-D23QFUGK.js +6 -0
- package/dist/component/contacts-last-name-rac-COuQB15p.js +6 -0
- package/dist/component/contacts-phone-rac-BfhY_I7p.js +6 -0
- package/dist/component/contacts-position-rac-D80_knc8.js +6 -0
- package/dist/component/contacts-subscribe-rac--NuPoBFm.js +13 -0
- package/dist/component/contacts-tax-id-rac-BURE313k.js +6 -0
- package/dist/component/custom-focus-class-_483Pkwp.js +4 -0
- package/dist/component/data-hooks-Dkw1pbRj.js +6 -0
- package/dist/component/date-availability-BQyNH-7j.js +49 -0
- package/dist/component/date-input-field-rac-BnFvhqe1.js +286 -0
- package/dist/component/date-input-rac-TLkITFRh.js +6 -0
- package/dist/component/date-picker-field-rac-BAFKYE1B.js +304 -0
- package/dist/component/date-picker-rac-uBJQkALE.js +6 -0
- package/dist/component/date-time-input-field-rac-DnOkBj7w.js +421 -0
- package/dist/component/date-time-input-rac-BxbWyK23.js +6 -0
- package/dist/component/default-limits-D7qVv_Hv.js +6 -0
- package/dist/component/dext-checkbox-group-rac-DnifcsEZ.js +18 -0
- package/dist/component/dext-checkbox-rac-D45Ok0J4.js +6 -0
- package/dist/component/dext-date-picker-rac-Cs47jywn.js +6 -0
- package/dist/component/dext-date-time-input-rac-UPwXpk2g.js +6 -0
- package/dist/component/dext-dropdown-rac-D18mhUDU.js +6 -0
- package/dist/component/dext-email-rac-B4frwTvA.js +6 -0
- package/dist/component/dext-number-input-rac-CoS-Fk59.js +6 -0
- package/dist/component/dext-phone-rac-DwR0JLia.js +6 -0
- package/dist/component/dext-radio-group-rac-DogWvoUg.js +18 -0
- package/dist/component/dext-rating-input-rac-C4NxeIto.js +6 -0
- package/dist/component/dext-tags-rac-DsEenrft.js +18 -0
- package/dist/component/dext-text-area-rac-Du-FqTqW.js +6 -0
- package/dist/component/dext-text-input-rac-DUE8JE9b.js +6 -0
- package/dist/component/dext-url-input-rac-Cn55pV9m.js +6 -0
- package/dist/component/donation-rac-Cjk_hFm1.js +305 -0
- package/dist/component/dropdown-field-headless-Dcy46MWj.js +84 -0
- package/dist/component/dropdown-field-rac-rMMPzKxL.js +32 -0
- package/dist/component/dropdown-rac-C6B8C8Yc.js +6 -0
- package/dist/component/ecom-address-rac-1wNixzip.js +6 -0
- package/dist/component/ecom-subscription-checkbox-rac-C5z68KHa.js +49 -0
- package/dist/component/email-input-field-rac-C7Wn2XVU.js +507 -0
- package/dist/component/error-icon-hZxQ6DEy.js +15 -0
- package/dist/component/events-repeater-rac-DTv4JD79.js +247 -0
- package/dist/component/events-rsvp-rac-cS7Mb04F.js +38 -0
- package/dist/component/field-error-headless-Dm5UCOBb.js +34 -0
- package/dist/component/field-label-headless-C7mDzdLq.js +52 -0
- package/dist/component/field-rac.module-DAPTqFDM.js +21 -0
- package/dist/component/fieldset-headless-CD3fds9J.js +54 -0
- package/dist/component/file-upload-rac-DeZvh7dy.js +484 -0
- package/dist/component/find-child-C60k4CxG.js +11 -0
- package/dist/component/fixed-payment-rac-D7t5DjVp.js +62 -0
- package/dist/component/form-DaOKiR16.js +8890 -0
- package/dist/component/form-element-classes-Bi-nNM8q.js +55 -0
- package/dist/component/form.css +1 -0
- package/dist/component/form.js +9 -0
- package/dist/component/format-currency-BwShJ9vM.js +44 -0
- package/dist/component/get-first-day-of-the-week-DvnsxYhQ.js +118 -0
- package/dist/component/header-field-rac-hJSXllPm.js +25 -0
- package/dist/component/header-rac-G_lsddOd.js +6 -0
- package/dist/component/headless-styles-CmcyA_pi.js +20 -0
- package/dist/component/helpers-HmkkXrh2.js +12 -0
- package/dist/component/image-choice-rac-BHyAKRDt.js +141 -0
- package/dist/component/index-CFW1VXFU.js +64 -0
- package/dist/component/index-CkCSQD3_.js +2290 -0
- package/dist/component/isObject-BAwJJxQ3.js +34 -0
- package/dist/component/messages_ar-BZXnU2Gj.js +3517 -0
- package/dist/component/messages_ar-L1BYLZbF.js +20 -0
- package/dist/component/messages_ar-PAHg01OB.js +299 -0
- package/dist/component/messages_bg-CO56qlOt.js +299 -0
- package/dist/component/messages_bg-CQcGl0Yi.js +20 -0
- package/dist/component/messages_bg-DgbMwIbv.js +3515 -0
- package/dist/component/messages_ca-BAHE5nuo.js +3515 -0
- package/dist/component/messages_ca-BRoHmzRw.js +20 -0
- package/dist/component/messages_ca-Bl6rZi_O.js +299 -0
- package/dist/component/messages_cs-BADd3t_h.js +3515 -0
- package/dist/component/messages_cs-CDyWDExk.js +298 -0
- package/dist/component/messages_cs-wn5UmrBw.js +20 -0
- package/dist/component/messages_da-BPnmb9Qb.js +20 -0
- package/dist/component/messages_da-BvVUWnBz.js +3515 -0
- package/dist/component/messages_da-DHlpaT4q.js +298 -0
- package/dist/component/messages_de-2czOmM8X.js +3515 -0
- package/dist/component/messages_de-BKgzIF1d.js +298 -0
- package/dist/component/messages_de-Bwx84N0O.js +20 -0
- package/dist/component/messages_el-BnuYMjcf.js +299 -0
- package/dist/component/messages_el-_D2RUBSU.js +20 -0
- package/dist/component/messages_el-qCyH12Uq.js +3515 -0
- package/dist/component/messages_en-BWaixPd6.js +3518 -0
- package/dist/component/messages_en-CBBcgtxs.js +296 -0
- package/dist/component/messages_en-DvSLxqKp.js +20 -0
- package/dist/component/messages_es-Cq6i2xci.js +3515 -0
- package/dist/component/messages_es-DlGCLaYi.js +298 -0
- package/dist/component/messages_es-rCKXnGf0.js +20 -0
- package/dist/component/messages_fi-B-ciZGqD.js +3515 -0
- package/dist/component/messages_fi-DzKva_Wq.js +299 -0
- package/dist/component/messages_fi-PCCXPo0O.js +20 -0
- package/dist/component/messages_fr-2im0dcYp.js +3515 -0
- package/dist/component/messages_fr-DMFilq1G.js +298 -0
- package/dist/component/messages_fr-DQa1dT9u.js +20 -0
- package/dist/component/messages_he-Bb1qTc2Y.js +299 -0
- package/dist/component/messages_he-BfIkDo1h.js +3515 -0
- package/dist/component/messages_he-DwIysfDp.js +20 -0
- package/dist/component/messages_hi-Bty6ytCh.js +3515 -0
- package/dist/component/messages_hi-C-6UHGbM.js +298 -0
- package/dist/component/messages_hi-DF1w6b6B.js +20 -0
- package/dist/component/messages_hr-BXzIzU3d.js +20 -0
- package/dist/component/messages_hr-CiU1ZVrx.js +3515 -0
- package/dist/component/messages_hr-tRSM9lmc.js +299 -0
- package/dist/component/messages_hu-ChzHFUtB.js +3515 -0
- package/dist/component/messages_hu-D86Taf9R.js +299 -0
- package/dist/component/messages_hu-Z9XpByCO.js +20 -0
- package/dist/component/messages_id-3952ilBE.js +20 -0
- package/dist/component/messages_id-CPuhTUYV.js +298 -0
- package/dist/component/messages_id-Ddr3ijST.js +3515 -0
- package/dist/component/messages_it-B-A1X4BZ.js +298 -0
- package/dist/component/messages_it-DnUTUabT.js +20 -0
- package/dist/component/messages_it-eY6GnuZC.js +3515 -0
- package/dist/component/messages_ja-B3PxHv2c.js +3515 -0
- package/dist/component/messages_ja-Ced6ZBxD.js +298 -0
- package/dist/component/messages_ja-Cg7CqBUL.js +20 -0
- package/dist/component/messages_ko-DBCjHG4c.js +3515 -0
- package/dist/component/messages_ko-PKIrqwPk.js +298 -0
- package/dist/component/messages_ko-zvhtZMGA.js +20 -0
- package/dist/component/messages_lt-DV3hdFsp.js +3515 -0
- package/dist/component/messages_lt-DywusvNm.js +20 -0
- package/dist/component/messages_lt-zxcCPHno.js +299 -0
- package/dist/component/messages_lv-BEowUv-S.js +299 -0
- package/dist/component/messages_lv-DggJE2f9.js +20 -0
- package/dist/component/messages_lv-hIonzpTs.js +3515 -0
- package/dist/component/messages_ms-Ca0m7bf7.js +20 -0
- package/dist/component/messages_ms-Cvypo0vi.js +299 -0
- package/dist/component/messages_ms-DoMzA8a3.js +3515 -0
- package/dist/component/messages_nl-CEmANR_r.js +3515 -0
- package/dist/component/messages_nl-CZR4TvNo.js +298 -0
- package/dist/component/messages_nl-DgVYmdO9.js +20 -0
- package/dist/component/messages_no-B2BBaGBH.js +298 -0
- package/dist/component/messages_no-DJfJSlDm.js +3515 -0
- package/dist/component/messages_no-hPkfRJQ9.js +20 -0
- package/dist/component/messages_pl-Bzph-WyD.js +20 -0
- package/dist/component/messages_pl-ChJVH7RO.js +3515 -0
- package/dist/component/messages_pl-rCMsbMbN.js +298 -0
- package/dist/component/messages_pt-Bv63V1uB.js +3515 -0
- package/dist/component/messages_pt-CBgCNF3T.js +20 -0
- package/dist/component/messages_pt-Cx0FF6uF.js +298 -0
- package/dist/component/messages_ro-BvLoD_wE.js +299 -0
- package/dist/component/messages_ro-CMzcu-9b.js +20 -0
- package/dist/component/messages_ro-PVRK7Gx4.js +3515 -0
- package/dist/component/messages_ru-8BI6MYA0.js +3515 -0
- package/dist/component/messages_ru-BhRKVmVC.js +298 -0
- package/dist/component/messages_ru-C_BaQo57.js +20 -0
- package/dist/component/messages_sk-Bgi_3583.js +3515 -0
- package/dist/component/messages_sk-CrsC7rOj.js +20 -0
- package/dist/component/messages_sk-CtF-ei23.js +299 -0
- package/dist/component/messages_sl-B5t-KKi8.js +299 -0
- package/dist/component/messages_sl-BFdYWVHd.js +3515 -0
- package/dist/component/messages_sl-NqfmyUP1.js +20 -0
- package/dist/component/messages_sv-Bd1CcY6G.js +3515 -0
- package/dist/component/messages_sv-DPRT-DpN.js +20 -0
- package/dist/component/messages_sv-bQwbNmjr.js +298 -0
- package/dist/component/messages_th-BauH9qdo.js +20 -0
- package/dist/component/messages_th-C_dL_PCq.js +298 -0
- package/dist/component/messages_th-DEWm01uD.js +3515 -0
- package/dist/component/messages_tl-CouXLNcW.js +299 -0
- package/dist/component/messages_tl-D2t9Y_ZC.js +3515 -0
- package/dist/component/messages_tl-UDZY8Wuk.js +20 -0
- package/dist/component/messages_tr-2-OHesob.js +3515 -0
- package/dist/component/messages_tr-CpsxYTDb.js +20 -0
- package/dist/component/messages_tr-DHXnlj_j.js +298 -0
- package/dist/component/messages_uk-CPK4y5lH.js +298 -0
- package/dist/component/messages_uk-DIuQ2HoD.js +3515 -0
- package/dist/component/messages_uk-gPkmA_ar.js +20 -0
- package/dist/component/messages_vi-CgxB4Ey0.js +20 -0
- package/dist/component/messages_vi-DZeFWgwp.js +3515 -0
- package/dist/component/messages_vi-Det8i7_V.js +298 -0
- package/dist/component/messages_zh-D53_A4N9.js +298 -0
- package/dist/component/messages_zh-O552w5dp.js +20 -0
- package/dist/component/messages_zh-nG7LNxIt.js +3515 -0
- package/dist/component/multiline-address-field-rac-CwLOzNF6.js +1574 -0
- package/dist/component/multiline-address-rac-C4JXBlFC.js +6 -0
- package/dist/component/non-modal-popover-DtIMXHbe.js +63 -0
- package/dist/component/number-input-field-rac-BOeiugCV.js +89 -0
- package/dist/component/number-input-rac-NqbFwW0d.js +6 -0
- package/dist/component/numeric-input-utils-CuBMi4-a.js +45 -0
- package/dist/component/options-layout-constants-DEfIEJWD.js +6 -0
- package/dist/component/options-rac.module-KM-VT_KY.js +7 -0
- package/dist/component/password-rac-DxCYgvu_.js +142 -0
- package/dist/component/payment-field-utils-DobiK5Xh.js +12 -0
- package/dist/component/payment-input-rac-C2aof0p0.js +137 -0
- package/dist/component/phone-input-field-rac-Cd7RFaoD.js +473 -0
- package/dist/component/phone-rac-4MQREqBG.js +6 -0
- package/dist/component/product-list-rac-CjoepDQ_.js +263 -0
- package/dist/component/quiz-radio-group-rac-CIwk7N3X.js +13 -0
- package/dist/component/radio-group-field-rac-DE2mnUHD.js +40 -0
- package/dist/component/radio-group-field-rac.module-DEP9BCiX.js +124 -0
- package/dist/component/radio-group-rac-XE6CeGnp.js +6 -0
- package/dist/component/rating-input-field-rac-BzAAMipp.js +130 -0
- package/dist/component/rating-input-rac-oIvpEVjK.js +6 -0
- package/dist/component/rich-content-rac.module-cis7mx3M.js +49 -0
- package/dist/component/rich-text-field-rac-CqkM22CI.js +22 -0
- package/dist/component/rich-text-rac-BKbz3TcX.js +6 -0
- package/dist/component/ricos-viewer-chunk-B4rfbgjA.js +5 -0
- package/dist/component/service-dropdown-rac-CfCMbT9d.js +142 -0
- package/dist/component/services-multi-choice-rac-F2h5gUOr.js +76 -0
- package/dist/component/signature-rac-CIRsmZhS.js +795 -0
- package/dist/component/submit-button-rac-BELGrClx.js +115 -0
- package/dist/component/tags-field-rac-B6Hg2XOI.js +201 -0
- package/dist/component/tags-rac-Dfv8VP7J.js +6 -0
- package/dist/component/text-area-field-rac-Bsd1V2Q3.js +69 -0
- package/dist/component/text-area-rac-BNVdI-Gq.js +6 -0
- package/dist/component/text-input-field-rac-DF9dD_KW.js +24 -0
- package/dist/component/text-input-headless-Dlao2R8f.js +44 -0
- package/dist/component/text-input-rac-C2p7E01b.js +6 -0
- package/dist/component/time-input-rac-90mLBZsX.js +152 -0
- package/dist/component/url-input-field-rac-bCEOlctr.js +71 -0
- package/dist/component/url-input-rac-D5o8b9gx.js +6 -0
- package/dist/component/use-invoke-callback-UH73A_J3.js +15 -0
- package/dist/component/use-service-options-base-DO5hy6mn.js +48 -0
- package/dist/component/use-synced-display-value-DcAxdn3M.js +19 -0
- package/dist/form.d.ts +6930 -0
- package/package.json +164 -3
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import d, { useMemo as x, useCallback as _, useRef as P, useState as w, useEffect as U } from "react";
|
|
2
|
+
import { CheckboxGroup as W, CheckboxField as A, CheckboxButton as j, TextField as z, Input as J } from "react-aria-components";
|
|
3
|
+
import { debounce as K } from "ts-debounce";
|
|
4
|
+
import { ag as N, ad as Q, aq as X, aa as Y, ai as Z } from "./form-DaOKiR16.js";
|
|
5
|
+
import { f as L, a as y } from "./find-child-C60k4CxG.js";
|
|
6
|
+
import { D as ee, E as te } from "./field-error-headless-Dm5UCOBb.js";
|
|
7
|
+
import { L as ae } from "./field-label-headless-C7mDzdLq.js";
|
|
8
|
+
import { F as ne } from "./fieldset-headless-CD3fds9J.js";
|
|
9
|
+
import { N as se } from "./options-layout-constants-DEfIEJWD.js";
|
|
10
|
+
const R = "Other", le = (e, t) => e.some((o) => !t.includes(o)), B = (e, t) => e.length > 0 && le(e, t), oe = (e, t) => {
|
|
11
|
+
const o = t == null ? void 0 : t("add-other.default-other-option-label");
|
|
12
|
+
return e || o || R;
|
|
13
|
+
}, M = (e, t) => {
|
|
14
|
+
const n = t ? t.length + 2 : 0;
|
|
15
|
+
return (e.find((r) => r.startsWith(`${t}: `)) || "").slice(n);
|
|
16
|
+
}, k = (e) => e.map((t) => t.value ?? t.label), v = ({ children: e }) => {
|
|
17
|
+
const t = N(), { id: o, value: n, onChange: a, disabled: r, required: i, onBlur: E, onFocus: m, hasError: p, FieldLayout: c } = t, { inputId: b, labelId: u, ariaDescribedBy: l } = Q(), f = L(e, v.Label), h = L(e, v.Options), g = L(e, v.Description), C = L(e, v.Error), s = x(() => n || [], [
|
|
18
|
+
n
|
|
19
|
+
]), O = _((V) => {
|
|
20
|
+
a == null || a(V);
|
|
21
|
+
}, [
|
|
22
|
+
a
|
|
23
|
+
]);
|
|
24
|
+
return /* @__PURE__ */ d.createElement(c, {
|
|
25
|
+
fieldId: o,
|
|
26
|
+
renderLabel: () => f,
|
|
27
|
+
renderInput: () => /* @__PURE__ */ d.createElement(ne, {
|
|
28
|
+
id: b,
|
|
29
|
+
ariaLabelledBy: u,
|
|
30
|
+
ariaDescribedBy: l,
|
|
31
|
+
required: i,
|
|
32
|
+
onBlur: E,
|
|
33
|
+
onFocus: m
|
|
34
|
+
}, /* @__PURE__ */ d.createElement(W, {
|
|
35
|
+
"aria-labelledby": u,
|
|
36
|
+
value: s,
|
|
37
|
+
onChange: O,
|
|
38
|
+
isDisabled: r,
|
|
39
|
+
isRequired: i,
|
|
40
|
+
isInvalid: p
|
|
41
|
+
}, h)),
|
|
42
|
+
renderDescription: () => /* @__PURE__ */ d.createElement(d.Fragment, null, C, g)
|
|
43
|
+
});
|
|
44
|
+
}, $ = ({ children: e, className: t }) => {
|
|
45
|
+
const o = N(), { id: n, options: a, addOther: r, addOtherLabel: i, numberOfColumns: E } = o, { t: m } = X(), { isMobile: p } = Y(), c = L(e, $.Option), b = oe(i, m), u = p ? se.ONE : E;
|
|
46
|
+
return /* @__PURE__ */ d.createElement("div", {
|
|
47
|
+
className: t,
|
|
48
|
+
"data-columns": u
|
|
49
|
+
}, a == null ? void 0 : a.map((l, f) => {
|
|
50
|
+
const h = l.value ?? l.label;
|
|
51
|
+
return y(c, {
|
|
52
|
+
key: l.id || l.label,
|
|
53
|
+
value: h,
|
|
54
|
+
label: l.label,
|
|
55
|
+
isFirst: f === 0,
|
|
56
|
+
fieldId: n
|
|
57
|
+
});
|
|
58
|
+
}), r && y(c, {
|
|
59
|
+
key: R,
|
|
60
|
+
value: R,
|
|
61
|
+
label: b,
|
|
62
|
+
isOther: !0
|
|
63
|
+
}));
|
|
64
|
+
}, re = ({ className: e }) => /* @__PURE__ */ d.createElement("div", {
|
|
65
|
+
"aria-hidden": "true",
|
|
66
|
+
className: e
|
|
67
|
+
}), ce = ({ className: e, ...t }) => {
|
|
68
|
+
const { label: o } = t;
|
|
69
|
+
return /* @__PURE__ */ d.createElement("span", {
|
|
70
|
+
className: e
|
|
71
|
+
}, o);
|
|
72
|
+
}, F = ({ children: e, className: t, ...o }) => {
|
|
73
|
+
const { value: n, label: a, isFirst: r = !1, isOther: i = !1, fieldId: E } = o, m = N(), { value: p, onChange: c, disabled: b, readOnly: u, hasError: l, options: f } = m, h = P(null);
|
|
74
|
+
Z(() => {
|
|
75
|
+
var I;
|
|
76
|
+
r && ((I = h.current) == null || I.focus({
|
|
77
|
+
preventScroll: !0
|
|
78
|
+
}));
|
|
79
|
+
}, E);
|
|
80
|
+
const g = L(e, F.Label), C = L(e, F.Input), s = x(() => p || [], [
|
|
81
|
+
p
|
|
82
|
+
]), O = x(() => i ? s.find((I) => I === a || I.startsWith(`${a}: `)) || a : n, [
|
|
83
|
+
i,
|
|
84
|
+
s,
|
|
85
|
+
a,
|
|
86
|
+
n
|
|
87
|
+
]), V = _((I) => {
|
|
88
|
+
if (!i)
|
|
89
|
+
return;
|
|
90
|
+
const S = k(f || []), D = s.filter((H) => S.includes(H)), G = I ? [
|
|
91
|
+
...D,
|
|
92
|
+
a
|
|
93
|
+
] : D;
|
|
94
|
+
c == null || c(G);
|
|
95
|
+
}, [
|
|
96
|
+
i,
|
|
97
|
+
a,
|
|
98
|
+
c,
|
|
99
|
+
f,
|
|
100
|
+
s
|
|
101
|
+
]);
|
|
102
|
+
return /* @__PURE__ */ d.createElement(A, {
|
|
103
|
+
value: O,
|
|
104
|
+
onChange: i ? V : void 0,
|
|
105
|
+
isDisabled: b,
|
|
106
|
+
isReadOnly: u,
|
|
107
|
+
isInvalid: l
|
|
108
|
+
}, /* @__PURE__ */ d.createElement(j, {
|
|
109
|
+
ref: h,
|
|
110
|
+
className: t,
|
|
111
|
+
"data-hook": `checkbox-${a}`
|
|
112
|
+
}, C, y(g, {
|
|
113
|
+
label: a
|
|
114
|
+
})));
|
|
115
|
+
};
|
|
116
|
+
F.Label = ce;
|
|
117
|
+
F.Input = re;
|
|
118
|
+
const q = ({ children: e, ...t }) => {
|
|
119
|
+
const { value: o, label: n, isFirst: a = !1, isOther: r = !1, fieldId: i } = t, E = N(), { value: m, onChange: p, options: c, addOtherPlaceholder: b, otherInputCharacterLimit: u, disabled: l, readOnly: f, hasError: h } = E, g = L(e, F), C = L(e, T), s = x(() => m || [], [
|
|
120
|
+
m
|
|
121
|
+
]), O = x(() => {
|
|
122
|
+
if (!r)
|
|
123
|
+
return !1;
|
|
124
|
+
const V = k(c || []);
|
|
125
|
+
return B(s, V);
|
|
126
|
+
}, [
|
|
127
|
+
r,
|
|
128
|
+
s,
|
|
129
|
+
c
|
|
130
|
+
]);
|
|
131
|
+
return /* @__PURE__ */ d.createElement(d.Fragment, null, y(g, {
|
|
132
|
+
value: o,
|
|
133
|
+
label: n,
|
|
134
|
+
isFirst: a,
|
|
135
|
+
isOther: r,
|
|
136
|
+
fieldId: i
|
|
137
|
+
}), r && O && y(C, {
|
|
138
|
+
fieldValue: s,
|
|
139
|
+
onChange: p,
|
|
140
|
+
label: n,
|
|
141
|
+
placeholder: b,
|
|
142
|
+
maxLength: u,
|
|
143
|
+
disabled: l,
|
|
144
|
+
readOnly: f,
|
|
145
|
+
hasError: h,
|
|
146
|
+
ariaLabel: n,
|
|
147
|
+
addOtherLabel: n,
|
|
148
|
+
options: c
|
|
149
|
+
}));
|
|
150
|
+
}, T = ({ className: e, inputClassName: t, ...o }) => {
|
|
151
|
+
const { fieldValue: n, onChange: a, label: r, placeholder: i, maxLength: E, disabled: m, readOnly: p, hasError: c, ariaLabel: b, addOtherLabel: u, options: l } = o, [f, h] = w(() => {
|
|
152
|
+
const s = k(l || []);
|
|
153
|
+
return B(n, s) ? M(n, u) : "";
|
|
154
|
+
});
|
|
155
|
+
U(() => {
|
|
156
|
+
const s = k(l || []), O = B(n, s);
|
|
157
|
+
h(O ? M(n, u) : "");
|
|
158
|
+
}, [
|
|
159
|
+
n,
|
|
160
|
+
l,
|
|
161
|
+
u
|
|
162
|
+
]);
|
|
163
|
+
const g = x(() => K((s) => {
|
|
164
|
+
const O = k(l || []), V = n.filter((D) => O.includes(D)), I = s ? `${u}: ${s}` : r, S = [
|
|
165
|
+
...V,
|
|
166
|
+
I
|
|
167
|
+
];
|
|
168
|
+
a(S);
|
|
169
|
+
}, 500), [
|
|
170
|
+
a,
|
|
171
|
+
l,
|
|
172
|
+
n,
|
|
173
|
+
u,
|
|
174
|
+
r
|
|
175
|
+
]), C = _((s) => {
|
|
176
|
+
h(s), g(s);
|
|
177
|
+
}, [
|
|
178
|
+
g
|
|
179
|
+
]);
|
|
180
|
+
return /* @__PURE__ */ d.createElement(z, {
|
|
181
|
+
"aria-label": b,
|
|
182
|
+
value: f,
|
|
183
|
+
onChange: C,
|
|
184
|
+
isDisabled: m,
|
|
185
|
+
isReadOnly: p,
|
|
186
|
+
isInvalid: c,
|
|
187
|
+
className: e
|
|
188
|
+
}, /* @__PURE__ */ d.createElement(J, {
|
|
189
|
+
className: t,
|
|
190
|
+
placeholder: i,
|
|
191
|
+
maxLength: E,
|
|
192
|
+
"aria-label": b
|
|
193
|
+
}));
|
|
194
|
+
};
|
|
195
|
+
v.Label = ae;
|
|
196
|
+
v.Options = $;
|
|
197
|
+
$.Option = q;
|
|
198
|
+
q.Checkbox = F;
|
|
199
|
+
q.OtherInput = T;
|
|
200
|
+
v.Description = ee;
|
|
201
|
+
v.Error = te;
|
|
202
|
+
export {
|
|
203
|
+
v as C
|
|
204
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { RicosViewer as l } from "@wix/ricos/viewer";
|
|
2
|
+
import r from "classnames";
|
|
3
|
+
import e from "react";
|
|
4
|
+
import { C as t } from "./checkbox-group-field-headless-4HlJmarB.js";
|
|
5
|
+
import { E as c } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
+
import { s as a } from "./field-rac.module-DAPTqFDM.js";
|
|
7
|
+
import { r as m, H as i, a as E, b as p, c as O, q as _, l as C, h as L } from "./form-element-classes-Bi-nNM8q.js";
|
|
8
|
+
import { o } from "./options-rac.module-KM-VT_KY.js";
|
|
9
|
+
const R = ({ content: s, locale: n }) => /* @__PURE__ */ e.createElement(l, {
|
|
10
|
+
content: s,
|
|
11
|
+
locale: n
|
|
12
|
+
}), h = () => /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
13
|
+
className: r(m, a.label)
|
|
14
|
+
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
15
|
+
className: r(i, a.requiredMark)
|
|
16
|
+
})), /* @__PURE__ */ e.createElement(t.Options, {
|
|
17
|
+
className: r(E, o.options)
|
|
18
|
+
}, /* @__PURE__ */ e.createElement(t.Options.Option, null, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox, {
|
|
19
|
+
className: a.checkbox
|
|
20
|
+
}, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Input, {
|
|
21
|
+
className: r(p, a.checkboxInput)
|
|
22
|
+
}), /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Label, {
|
|
23
|
+
className: r(O, o.optionLabel)
|
|
24
|
+
})), /* @__PURE__ */ e.createElement(t.Options.Option.OtherInput, {
|
|
25
|
+
inputClassName: r(_, a.input)
|
|
26
|
+
}))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
27
|
+
className: r(C, a.error)
|
|
28
|
+
}, /* @__PURE__ */ e.createElement(c, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
29
|
+
className: r(L, a.description)
|
|
30
|
+
}, R));
|
|
31
|
+
export {
|
|
32
|
+
h as C
|
|
33
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
const o = (t) => /* @__PURE__ */ e.createElement("svg", {
|
|
3
|
+
width: 16,
|
|
4
|
+
height: 16,
|
|
5
|
+
viewBox: "0 0 20 20",
|
|
6
|
+
fill: "currentColor",
|
|
7
|
+
"aria-hidden": "true",
|
|
8
|
+
...t
|
|
9
|
+
}, /* @__PURE__ */ e.createElement("path", {
|
|
10
|
+
fillRule: "evenodd",
|
|
11
|
+
d: "M15.6478199,6.64528691 L16.3549267,7.35239369 L11.0627131,12.6461801 L11.0652534,12.6489483 L10.3581467,13.356055 L10.3557131,13.3531801 L10.3548199,13.3549267 L9.64771309,12.6478199 L9.64771309,12.6451801 L4.35471309,7.35228691 L5.06181987,6.64518013 L10.3547131,11.9381801 L15.6478199,6.64528691 Z"
|
|
12
|
+
}));
|
|
13
|
+
export {
|
|
14
|
+
o as C
|
|
15
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import C from "react";
|
|
2
|
+
import { C as _ } from "./checkbox-field-rac-CaloY2Hs.js";
|
|
3
|
+
import { P as e, Q as o, O as r } from "./form-element-classes-Bi-nNM8q.js";
|
|
4
|
+
const a = () => /* @__PURE__ */ C.createElement(_, {
|
|
5
|
+
classes: {
|
|
6
|
+
container: r,
|
|
7
|
+
label: o,
|
|
8
|
+
control: e
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
a as ContactsSubscribeRAC
|
|
13
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
var e = /* @__PURE__ */ (function(E) {
|
|
2
|
+
return E.OPTION = "option", E.FIELD_SETTINGS_PANEL_ADD_NEW_OPTION_BUTTON = "add-new-option-button", E.FIELD_SETTINGS_PANEL_ADD_OTHER_OPTION = "add-other-option-toggle-switch", E.FIELD_SETTINGS_PANEL_OPTION_LABEL = "field-settings-panel-option-label", E.FIELD_SETTINGS_PANEL_PRODUCT_LABEL = "field-settings-panel-product-label", E.FIELD_SETTINGS_PANEL_BULK_EDIT_BUTTON = "field-settings-panel-bulk-edit-button", E.FIELD_SETTINGS_PANEL_BULK_EDIT_MODAL = "field-settings-panel-bulk-edit-modal", E.FIELD_SETTINGS_PANEL_BULK_EDIT_MODAL_LAYOUT = "field-settings-panel-bulk-edit-modal-layout", E.FIELD_SETTINGS_PANEL_LABEL_FORM_FIELD = "field-settings-label-form-field", E.FIELD_SETTINGS_PANEL_LABEL_INPUT = "field-settings-label", E.FIELD_SETTINGS_PANEL_CONTENT = "field-settings-panel-content", E.FIELD_SETTINGS_TABS = "field-settings-tabs", E.LABEL_MEDIA_TOGGLE = "label-media-toggle", E.LABEL_MEDIA_ADD_IMAGE = "label-media-add-image", E.LABEL_MEDIA_IMAGE_SETTINGS_MENU = "label-media-image-settings-menu", E.LABEL_MEDIA_IMAGE_SETTINGS_MENU_TRIGGER = "label-media-image-settings-menu-button", E.LABEL_MEDIA_DELETE_IMAGE = "label-media-delete-image", E.LABEL_MEDIA_IMAGE_SETTINGS = "label-media-image-settings", E.LABEL_MEDIA_IMAGE_FIT_TOGGLE = "label-media-image-fit-toggle", E.LABEL_MEDIA_IMAGE_FIT_COVER = "label-media-image-fit-cover", E.LABEL_MEDIA_IMAGE_FIT_CONTAIN = "label-media-image-fit-contain", E.LABEL_MEDIA_IMAGE_ALIGNMENT_TOGGLE = "label-media-image-alignment-toggle", E.LABEL_MEDIA_IMAGE_ALIGNMENT_LEFT = "label-media-image-alignment-left", E.LABEL_MEDIA_IMAGE_ALIGNMENT_CENTER = "label-media-image-alignment-center", E.LABEL_MEDIA_IMAGE_ALIGNMENT_RIGHT = "label-media-image-alignment-right", E.SHOW_FLAG_TOGGLE = "show-flag-toggle", E.DEFAULT_COUNTRY_TOGGLE = "default-country-toggle", E.DEFAULT_COUNTRY_DROPDOWN = "default-country-dropdown", E.DEFAULT_DESCRIPTION_TOGGLE = "description-toggle-switch", E.PLACEHOLDER_TOGGLE = "placeholder-toggle-switch", E.SHOW_DATE_LABELS_TOGGLE = "show-date-labels-toggle-switch", E.PLACEHOLDER_INPUT = "placeholder-input", E.OTHER_OPTION_INPUT = "other-option-input", E.DONATION_AMOUNT_OPTION = "donation-amount-option", E.DROPDOWN_DEFAULT_OPTION_TOGGLE = "default-view-toggle-switch", E.SIGNATURE_FIELD_MODE_SELECT = "signature-field-mode-select", E.CHECKED_BY_DEFAULT_TOGGLE = "checked-by-default-toggle-switch", E.ALLOWED_COUNTRIES_TOGGLE = "allowed-countries-toggle", E.ALLOWED_COUNTRIES_MODAL_TRIGGER = "allowed-countries-modal-trigger", E.ALLOWED_COUNTRIES_MODAL = "allowed-countries-modal", E.ALLOWED_COUNTRIES_MODAL_LAYOUT = "allowed-countries-modal-layout", E.ALLOWED_COUNTRIES_MODAL_SEARCH = "allowed-countries-modal-search", E.ALLOWED_COUNTRIES_MODAL_DESELECT_ALL = "allowed-countries-modal-deselect-all", E.ALLOWED_COUNTRIES_MODAL_SELECT_ALL = "allowed-countries-modal-select-all", E.ALLOWED_COUNTRIES_MODAL_FILTER = "allowed-countries-modal-filter", E.ALLOWED_COUNTRIES_MODAL_FILTER_TRIGGER = "allowed-countries-modal-filter-trigger-button", E.OPTIONS_BULK_EDIT_MODAL_INPUT_AREA = "options-bulk-edit-modal-input-area", E.ADD_PANEL_ITEM_TOOLTIP = "add-panel-item-tooltip", E.ADD_PANEL_ITEM = "add-panel-item", E.ADD_PANEL_ITEM_BUTTON = "add-panel-item-button", E.TOGGLE_TRUNCATE_BUTTON_READ_MORE = "toggle-truncate-button-read-more", E.TOGGLE_TRUNCATE_BUTTON_READ_LESS = "toggle-truncate-button-read-less", E.REGEX_SETTING_TOGGLE = "regex-setting-toggle", E.REGEX_SETTING_INPUT = "regex-setting-input", E.REGEX_SETTING_ERROR_MESSAGE_ADD_BUTTON = "regex-setting-error-message-add-button", E.REGEX_SETTING_ERROR_MESSAGE = "regex-setting-error-message", E.SUBMIT_BUTTON = "submit-button", E.POPOVER = "popover", E.OPTION_MENU_TRIGGER_BUTTON = "option-menu-trigger-button", E.DEFAULT_VALUE_TOGGLE = "default-value-toggle-switch", E.DEFAULT_VALUE_INPUT = "default-value-input", E.DEFAULT_VALUE_RADIO_GROUP = "default-value-radio-group", E.SCORE_SETTING_NUMBER_INPUT = "score-setting-number-input", E.OPTION_IMAGE_ASPECT_RATIO_DROPDOWN = "option-image-aspect-ratio-dropdown", E.OPTION_IMAGE_ALIGNMENT_TOGGLE = "option-image-alignment-toggle", E.DURATION_SETTING_DROPDOWN = "duration-setting-dropdown", E.DURATION_SETTING_HOURS_INPUT = "duration-setting-hours-input", E.DURATION_SETTING_MINUTES_INPUT = "duration-setting-minutes-input", E.AVAILABILITY_DATE_RANGE_START = "availability-date-range-start", E.AVAILABILITY_DATE_RANGE_END = "availability-date-range-end", E;
|
|
3
|
+
})({});
|
|
4
|
+
export {
|
|
5
|
+
e as D
|
|
6
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { D as r } from "./form-DaOKiR16.js";
|
|
2
|
+
const o = {
|
|
3
|
+
0: r.SUNDAY,
|
|
4
|
+
1: r.MONDAY,
|
|
5
|
+
2: r.TUESDAY,
|
|
6
|
+
3: r.WEDNESDAY,
|
|
7
|
+
4: r.THURSDAY,
|
|
8
|
+
5: r.FRIDAY,
|
|
9
|
+
6: r.SATURDAY
|
|
10
|
+
}, c = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
11
|
+
function i(t) {
|
|
12
|
+
const e = c.exec(t);
|
|
13
|
+
return !e || isNaN(new Date(t).getTime()) ? null : new Date(Number(e[1]), Number(e[2]) - 1, Number(e[3]));
|
|
14
|
+
}
|
|
15
|
+
function u(t) {
|
|
16
|
+
if (t instanceof Date)
|
|
17
|
+
return isNaN(t.getTime()) ? null : t;
|
|
18
|
+
const e = i(t);
|
|
19
|
+
if (e)
|
|
20
|
+
return e;
|
|
21
|
+
const n = new Date(t);
|
|
22
|
+
return isNaN(n.getTime()) ? null : n;
|
|
23
|
+
}
|
|
24
|
+
function D(t) {
|
|
25
|
+
return new Date(t.getFullYear(), t.getMonth(), t.getDate());
|
|
26
|
+
}
|
|
27
|
+
function f(t, e) {
|
|
28
|
+
if (!e.start || !e.end)
|
|
29
|
+
return !0;
|
|
30
|
+
const n = u(e.start), s = u(e.end);
|
|
31
|
+
if (!n || !s)
|
|
32
|
+
return !1;
|
|
33
|
+
const a = D(t);
|
|
34
|
+
return a >= D(n) && a <= D(s);
|
|
35
|
+
}
|
|
36
|
+
function A(t, e) {
|
|
37
|
+
var n, s;
|
|
38
|
+
if (e.availableDays) {
|
|
39
|
+
const a = o[t.getDay()];
|
|
40
|
+
if (!e.availableDays.includes(a))
|
|
41
|
+
return !1;
|
|
42
|
+
}
|
|
43
|
+
return !((n = e.availableDates) != null && n.length && !e.availableDates.some((a) => f(t, a)) || (s = e.unavailableDates) != null && s.length && e.unavailableDates.some((a) => f(t, a)));
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
i as a,
|
|
47
|
+
A as i,
|
|
48
|
+
u as p
|
|
49
|
+
};
|