@wix/form-elements 0.0.0-stage → 1.53.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-Qa4fzPC_.js +1005 -0
- package/dist/component/bookings-address-rac-D9M-ozbl.js +6 -0
- package/dist/component/bookings-email-rac-BsQBkcmz.js +6 -0
- package/dist/component/bookings-first-name-rac-B3Ttwrj1.js +6 -0
- package/dist/component/bookings-header-rac-D1SGpqGf.js +8 -0
- package/dist/component/bookings-last-name-rac-B9O--4tU.js +6 -0
- package/dist/component/bookings-login-bar-rac-CHzNCOWx.js +74 -0
- package/dist/component/bookings-phone-rac-DhCGxcEU.js +6 -0
- package/dist/component/bookings-rich-text-rac-CftLqeZI.js +8 -0
- package/dist/component/calling-country-codes-PyWuOTmF.js +243 -0
- package/dist/component/checkbox-field-rac-B4NsTbRK.js +625 -0
- package/dist/component/checkbox-group-field-headless-qntvm5XF.js +204 -0
- package/dist/component/checkbox-group-field-rac-DwHc_GX9.js +33 -0
- package/dist/component/checkbox-group-rac-C1L8G1Y6.js +6 -0
- package/dist/component/checkbox-rac-DfbwQtOy.js +6 -0
- package/dist/component/chevron-down-icon-CcpVm6B-.js +15 -0
- package/dist/component/contacts-address-rac-Bstl5CRy.js +6 -0
- package/dist/component/contacts-birthdate-rac-DA4ijdaj.js +6 -0
- package/dist/component/contacts-company-rac-m0NA2GWU.js +6 -0
- package/dist/component/contacts-email-rac-DPVSYPew.js +6 -0
- package/dist/component/contacts-first-name-rac-C-JRqRzG.js +6 -0
- package/dist/component/contacts-last-name-rac-COBf-dyW.js +6 -0
- package/dist/component/contacts-phone-rac-Cw70dW7b.js +6 -0
- package/dist/component/contacts-position-rac-CMz19BR-.js +6 -0
- package/dist/component/contacts-subscribe-rac-KpLlwquo.js +13 -0
- package/dist/component/contacts-tax-id-rac-_uTLfEkF.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-DPHhHaFW.js +49 -0
- package/dist/component/date-input-field-rac-BrdGNXKw.js +286 -0
- package/dist/component/date-input-rac-D93biRsl.js +6 -0
- package/dist/component/date-picker-field-rac-ByhJ3Koo.js +304 -0
- package/dist/component/date-picker-rac-CuwcuCmJ.js +6 -0
- package/dist/component/date-time-input-field-rac-DY1u3LS6.js +421 -0
- package/dist/component/date-time-input-rac-BuGAMm_l.js +6 -0
- package/dist/component/default-limits-D7qVv_Hv.js +6 -0
- package/dist/component/dext-checkbox-group-rac-C3jCmtB7.js +18 -0
- package/dist/component/dext-checkbox-rac-dOvFH4gX.js +6 -0
- package/dist/component/dext-date-picker-rac-Bq6xFRoL.js +6 -0
- package/dist/component/dext-date-time-input-rac-9BE7wXiZ.js +6 -0
- package/dist/component/dext-dropdown-rac-j2ACAxk6.js +6 -0
- package/dist/component/dext-email-rac-CLoZGIl3.js +6 -0
- package/dist/component/dext-number-input-rac-D8IxqGdJ.js +6 -0
- package/dist/component/dext-phone-rac-B2Y-Ou4W.js +6 -0
- package/dist/component/dext-radio-group-rac-C88xnXTc.js +18 -0
- package/dist/component/dext-rating-input-rac-BArLS_bA.js +6 -0
- package/dist/component/dext-tags-rac-B9tKb852.js +18 -0
- package/dist/component/dext-text-area-rac-cBh24v0g.js +6 -0
- package/dist/component/dext-text-input-rac-B75yIKQa.js +6 -0
- package/dist/component/dext-url-input-rac-Da6T681p.js +6 -0
- package/dist/component/donation-rac-A0HtRtbH.js +305 -0
- package/dist/component/dropdown-field-headless-CYpFgZ3H.js +84 -0
- package/dist/component/dropdown-field-rac-B5emHw3_.js +32 -0
- package/dist/component/dropdown-rac-CRj3gKMe.js +6 -0
- package/dist/component/ecom-address-rac-ClBWgRGU.js +6 -0
- package/dist/component/ecom-subscription-checkbox-rac-DLvoidqP.js +49 -0
- package/dist/component/email-input-field-rac-Dq1HVu3Y.js +507 -0
- package/dist/component/error-icon-hZxQ6DEy.js +15 -0
- package/dist/component/events-repeater-rac-BwbNXM88.js +247 -0
- package/dist/component/events-rsvp-rac-BzVK7JNO.js +38 -0
- package/dist/component/field-error-headless-D40GACk4.js +34 -0
- package/dist/component/field-label-headless-Beq2Tn6V.js +52 -0
- package/dist/component/field-rac.module-DXfwku6m.js +21 -0
- package/dist/component/fieldset-headless-CD3fds9J.js +54 -0
- package/dist/component/file-upload-rac-BHqXPy1r.js +484 -0
- package/dist/component/find-child-C60k4CxG.js +11 -0
- package/dist/component/fixed-payment-rac-CSmY8yrQ.js +62 -0
- package/dist/component/form-Dn-MrArr.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-DlUZ8kEf.js +25 -0
- package/dist/component/header-rac-CKAFxlLV.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-DHtMOk8B.js +141 -0
- package/dist/component/index-0TWILUAM.js +64 -0
- package/dist/component/index-DS4A9cSk.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-C0PUrp9n.js +1574 -0
- package/dist/component/multiline-address-rac-BuIrCxJO.js +6 -0
- package/dist/component/non-modal-popover-DtIMXHbe.js +63 -0
- package/dist/component/number-input-field-rac-DY3hBv5k.js +89 -0
- package/dist/component/number-input-rac-LU2RRhXv.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-CKUa-xXB.js +142 -0
- package/dist/component/payment-field-utils-DobiK5Xh.js +12 -0
- package/dist/component/payment-input-rac-4-nB0Dtf.js +137 -0
- package/dist/component/phone-input-field-rac-D-WSiybW.js +473 -0
- package/dist/component/phone-rac-CHpAV4y9.js +6 -0
- package/dist/component/product-list-rac-43aeb4bH.js +263 -0
- package/dist/component/quiz-radio-group-rac-CIp82PU6.js +13 -0
- package/dist/component/radio-group-field-rac-Ctu5L43b.js +40 -0
- package/dist/component/radio-group-field-rac.module-xWCK2zEh.js +124 -0
- package/dist/component/radio-group-rac-C2z9k9zW.js +6 -0
- package/dist/component/rating-input-field-rac-FGf61_-a.js +130 -0
- package/dist/component/rating-input-rac-B4_5V8X4.js +6 -0
- package/dist/component/rich-content-rac.module-DuFIPLXP.js +49 -0
- package/dist/component/rich-text-field-rac-B1PbdTgi.js +22 -0
- package/dist/component/rich-text-rac-D1PDXRg5.js +6 -0
- package/dist/component/ricos-viewer-chunk-B4rfbgjA.js +5 -0
- package/dist/component/service-dropdown-rac-DIFcHwYR.js +142 -0
- package/dist/component/services-multi-choice-rac-BVgZsVc2.js +76 -0
- package/dist/component/signature-rac-DoznfA7u.js +795 -0
- package/dist/component/submit-button-rac-DQFhhUWx.js +115 -0
- package/dist/component/tags-field-rac-F3yYmtiN.js +201 -0
- package/dist/component/tags-rac-BkJ8931D.js +6 -0
- package/dist/component/text-area-field-rac-BQXCdqvK.js +69 -0
- package/dist/component/text-area-rac-CI4idsCI.js +6 -0
- package/dist/component/text-input-field-rac-Di3rvMr8.js +24 -0
- package/dist/component/text-input-headless-BFldUMDr.js +44 -0
- package/dist/component/text-input-rac-v2DSKy7B.js +6 -0
- package/dist/component/time-input-rac-CcbyfeiV.js +152 -0
- package/dist/component/url-input-field-rac-CcMmHuDT.js +71 -0
- package/dist/component/url-input-rac-DtbctKi2.js +6 -0
- package/dist/component/use-invoke-callback-UH73A_J3.js +15 -0
- package/dist/component/use-service-options-base-Cr8hJp01.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,115 @@
|
|
|
1
|
+
import t from "react";
|
|
2
|
+
import l from "classnames";
|
|
3
|
+
import { ag as c } from "./form-Dn-MrArr.js";
|
|
4
|
+
import { ProgressBar as v, Button as S } from "react-aria-components";
|
|
5
|
+
import { f as i } from "./find-child-C60k4CxG.js";
|
|
6
|
+
import { X as N, W as d, Z as f } from "./form-element-classes-Bi-nNM8q.js";
|
|
7
|
+
function x(e) {
|
|
8
|
+
const s = "calc(50% - 2px)";
|
|
9
|
+
return /* @__PURE__ */ t.createElement(v, {
|
|
10
|
+
...e,
|
|
11
|
+
isIndeterminate: !0
|
|
12
|
+
}, ({ percentage: o, isIndeterminate: a }) => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("svg", {
|
|
13
|
+
fill: "none",
|
|
14
|
+
width: "100%",
|
|
15
|
+
height: "100%",
|
|
16
|
+
viewBox: "0 0 32 32"
|
|
17
|
+
}, /* @__PURE__ */ t.createElement("circle", {
|
|
18
|
+
cx: "50%",
|
|
19
|
+
cy: "50%",
|
|
20
|
+
r: s
|
|
21
|
+
}), /* @__PURE__ */ t.createElement("circle", {
|
|
22
|
+
cx: "50%",
|
|
23
|
+
cy: "50%",
|
|
24
|
+
r: s,
|
|
25
|
+
// Normalize the path length to 100 so we can easily set stroke-dasharray/-offset to a percentage.
|
|
26
|
+
pathLength: "100",
|
|
27
|
+
strokeDasharray: a || o == null ? "25 100" : "100 100",
|
|
28
|
+
strokeDashoffset: a || o == null ? 0 : 100 - o,
|
|
29
|
+
strokeLinecap: "round"
|
|
30
|
+
}, a && /* @__PURE__ */ t.createElement("animateTransform", {
|
|
31
|
+
attributeName: "transform",
|
|
32
|
+
type: "rotate",
|
|
33
|
+
// Rotate around the circle's own center (viewBox is 32x32), not the SVG origin.
|
|
34
|
+
values: "0 16 16;360 16 16",
|
|
35
|
+
dur: "0.75s",
|
|
36
|
+
repeatCount: "indefinite"
|
|
37
|
+
})))));
|
|
38
|
+
}
|
|
39
|
+
const u = ({ children: e }) => {
|
|
40
|
+
const { id: n, FieldLayout: s } = c(), o = i(e, u.SubmitButton);
|
|
41
|
+
return /* @__PURE__ */ t.createElement(s, {
|
|
42
|
+
fieldId: n,
|
|
43
|
+
renderLabel: () => null,
|
|
44
|
+
renderInput: () => /* @__PURE__ */ t.createElement(t.Fragment, null, o),
|
|
45
|
+
renderDescription: () => null
|
|
46
|
+
});
|
|
47
|
+
}, m = ({ className: e, children: n }) => {
|
|
48
|
+
const s = i(n, b), o = i(n, E), a = i(n, B);
|
|
49
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
50
|
+
className: e
|
|
51
|
+
}, s, o, a);
|
|
52
|
+
}, b = ({ className: e }) => {
|
|
53
|
+
const { showPreviousButton: n, onPreviousClick: s, previousText: o } = c();
|
|
54
|
+
return n ? /* @__PURE__ */ t.createElement(S, {
|
|
55
|
+
className: e,
|
|
56
|
+
onPress: s
|
|
57
|
+
}, o) : null;
|
|
58
|
+
}, E = ({ className: e }) => {
|
|
59
|
+
const { showNextButton: n, onNextClick: s, nextText: o } = c();
|
|
60
|
+
return n ? /* @__PURE__ */ t.createElement(S, {
|
|
61
|
+
className: e,
|
|
62
|
+
onPress: s
|
|
63
|
+
}, o) : null;
|
|
64
|
+
}, B = ({ className: e, children: n }) => {
|
|
65
|
+
const { showSubmitButton: s, onSubmitClick: o, submitText: a, isDisabled: g, isInProgress: p } = c();
|
|
66
|
+
if (!s)
|
|
67
|
+
return null;
|
|
68
|
+
const _ = i(n, B.Loader);
|
|
69
|
+
return /* @__PURE__ */ t.createElement(S, {
|
|
70
|
+
className: e,
|
|
71
|
+
onPress: o,
|
|
72
|
+
isDisabled: g || p,
|
|
73
|
+
"data-in-progress": p
|
|
74
|
+
}, p && _ ? _ : a);
|
|
75
|
+
}, C = ({ className: e }) => /* @__PURE__ */ t.createElement("span", {
|
|
76
|
+
className: e
|
|
77
|
+
}, /* @__PURE__ */ t.createElement(x, null));
|
|
78
|
+
B.Loader = C;
|
|
79
|
+
m.PreviousButton = b;
|
|
80
|
+
m.NextButton = E;
|
|
81
|
+
m.SubmitButton = B;
|
|
82
|
+
u.SubmitButton = m;
|
|
83
|
+
const h = "_navigationContainer_1yuje_1", y = "_rowSpacing_1yuje_6", P = "_navigationButton_1yuje_10", T = "_nextButton_1yuje_24", L = "_previousButton_1yuje_47", w = "_button_1yuje_90", j = "_buttonNoSteps_1yuje_122", k = "_buttonWithSteps_1yuje_126", F = "_progress_1yuje_153", r = {
|
|
84
|
+
navigationContainer: h,
|
|
85
|
+
rowSpacing: y,
|
|
86
|
+
navigationButton: P,
|
|
87
|
+
nextButton: T,
|
|
88
|
+
previousButton: L,
|
|
89
|
+
button: w,
|
|
90
|
+
buttonNoSteps: j,
|
|
91
|
+
buttonWithSteps: k,
|
|
92
|
+
progress: F
|
|
93
|
+
}, O = () => {
|
|
94
|
+
const { hasSteps: e, showPreviousButton: n } = c();
|
|
95
|
+
return /* @__PURE__ */ t.createElement(u, null, /* @__PURE__ */ t.createElement(u.SubmitButton, {
|
|
96
|
+
className: l({
|
|
97
|
+
[r.navigationContainer]: e,
|
|
98
|
+
[r.rowSpacing]: n
|
|
99
|
+
})
|
|
100
|
+
}, /* @__PURE__ */ t.createElement(u.SubmitButton.PreviousButton, {
|
|
101
|
+
className: l(N, r.navigationButton, r.previousButton)
|
|
102
|
+
}), /* @__PURE__ */ t.createElement(u.SubmitButton.NextButton, {
|
|
103
|
+
className: l(d, r.navigationButton, r.nextButton)
|
|
104
|
+
}), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton, {
|
|
105
|
+
className: l(f, r.button, {
|
|
106
|
+
[r.buttonNoSteps]: !e,
|
|
107
|
+
[r.buttonWithSteps]: e
|
|
108
|
+
})
|
|
109
|
+
}, /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton.Loader, {
|
|
110
|
+
className: r.progress
|
|
111
|
+
}))));
|
|
112
|
+
}, M = () => /* @__PURE__ */ t.createElement(O, null);
|
|
113
|
+
export {
|
|
114
|
+
M as SubmitButtonRAC
|
|
115
|
+
};
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { RicosViewer as Q } from "@wix/ricos/viewer";
|
|
2
|
+
import _ from "classnames";
|
|
3
|
+
import e, { useMemo as F, useState as j, useRef as M, useLayoutEffect as w, useCallback as q } from "react";
|
|
4
|
+
import { CheckboxGroup as z, TextField as J, Input as K, CheckboxField as X, CheckboxButton as Y } from "react-aria-components";
|
|
5
|
+
import { ag as y, ad as Z, aq as T, aa as ee, ai as te } from "./form-Dn-MrArr.js";
|
|
6
|
+
import { f, a as k } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { E as x, D as B } from "./field-error-headless-D40GACk4.js";
|
|
8
|
+
import { L as P } from "./field-label-headless-Beq2Tn6V.js";
|
|
9
|
+
import { F as ae } from "./fieldset-headless-CD3fds9J.js";
|
|
10
|
+
import { N as D } from "./options-layout-constants-DEfIEJWD.js";
|
|
11
|
+
import { E as ne } from "./error-icon-hZxQ6DEy.js";
|
|
12
|
+
import { s as S } from "./field-rac.module-DXfwku6m.js";
|
|
13
|
+
import { r as re, H as oe, S as se, T as le, U as ie, q as ce, l as ue, h as de } from "./form-element-classes-Bi-nNM8q.js";
|
|
14
|
+
import { o as me } from "./options-rac.module-KM-VT_KY.js";
|
|
15
|
+
const g = "Other", pe = (t, a) => {
|
|
16
|
+
const c = a.length + 2;
|
|
17
|
+
return (t.find((r) => r.startsWith(`${a}: `)) || "").slice(c);
|
|
18
|
+
}, he = (t) => t.map((a) => a.value ?? a.label), $ = ({ className: t, ...a }) => {
|
|
19
|
+
const { label: l } = a;
|
|
20
|
+
return /* @__PURE__ */ e.createElement("span", {
|
|
21
|
+
className: t
|
|
22
|
+
}, l);
|
|
23
|
+
}, W = ({ className: t }) => {
|
|
24
|
+
const { value: a, onChange: l, addOtherLabel: c, addOtherPlaceholder: i, otherInputCharacterLimit: r, disabled: u, readOnly: b, hasError: d } = y(), { t: m } = T(), o = c || m("add-other.default-other-option-label") || g, p = F(() => pe(a || [], o), [
|
|
25
|
+
a,
|
|
26
|
+
o
|
|
27
|
+
]), [n, L] = j(p), h = M(l);
|
|
28
|
+
w(() => {
|
|
29
|
+
h.current = l;
|
|
30
|
+
});
|
|
31
|
+
const I = q((E) => {
|
|
32
|
+
L(E);
|
|
33
|
+
const C = (a || []).filter((O) => !O.startsWith(`${o}:`) && O !== o), R = E ? `${o}: ${E}` : o;
|
|
34
|
+
h.current([
|
|
35
|
+
...C,
|
|
36
|
+
R
|
|
37
|
+
]);
|
|
38
|
+
}, [
|
|
39
|
+
a,
|
|
40
|
+
o
|
|
41
|
+
]);
|
|
42
|
+
return /* @__PURE__ */ e.createElement(J, {
|
|
43
|
+
value: n,
|
|
44
|
+
onChange: I,
|
|
45
|
+
isDisabled: u,
|
|
46
|
+
isReadOnly: b,
|
|
47
|
+
isInvalid: d,
|
|
48
|
+
"aria-label": o
|
|
49
|
+
}, /* @__PURE__ */ e.createElement(K, {
|
|
50
|
+
"data-hook": "tags-other-input",
|
|
51
|
+
"data-filled": n ? !0 : void 0,
|
|
52
|
+
placeholder: i,
|
|
53
|
+
maxLength: r,
|
|
54
|
+
className: t
|
|
55
|
+
}));
|
|
56
|
+
}, v = ({ children: t, className: a, ...l }) => {
|
|
57
|
+
const { value: c, label: i, isOther: r, isFirstOption: u } = l, { id: b, value: d, onChange: m, options: o, disabled: p, readOnly: n, hasError: L } = y(), h = M(null);
|
|
58
|
+
te(() => {
|
|
59
|
+
var O;
|
|
60
|
+
u && ((O = h.current) == null || O.focus({
|
|
61
|
+
preventScroll: !0
|
|
62
|
+
}));
|
|
63
|
+
}, b);
|
|
64
|
+
const I = f(t, $), E = F(() => d || [], [
|
|
65
|
+
d
|
|
66
|
+
]), C = F(() => r ? E.find((O) => O === i || O.startsWith(`${i}: `)) || i : c, [
|
|
67
|
+
r,
|
|
68
|
+
E,
|
|
69
|
+
i,
|
|
70
|
+
c
|
|
71
|
+
]), R = q((O) => {
|
|
72
|
+
const G = he(o || []), V = E.filter((H) => G.includes(H));
|
|
73
|
+
m(O ? [
|
|
74
|
+
...V,
|
|
75
|
+
i
|
|
76
|
+
] : V);
|
|
77
|
+
}, [
|
|
78
|
+
i,
|
|
79
|
+
m,
|
|
80
|
+
o,
|
|
81
|
+
E
|
|
82
|
+
]);
|
|
83
|
+
return /* @__PURE__ */ e.createElement(X, {
|
|
84
|
+
inputRef: h,
|
|
85
|
+
value: C,
|
|
86
|
+
onChange: r ? R : void 0,
|
|
87
|
+
isDisabled: p,
|
|
88
|
+
isReadOnly: n,
|
|
89
|
+
isInvalid: L
|
|
90
|
+
}, /* @__PURE__ */ e.createElement(Y, {
|
|
91
|
+
className: a,
|
|
92
|
+
"data-hook": `tags-${r ? g : c}`
|
|
93
|
+
}, k(I, {
|
|
94
|
+
value: c,
|
|
95
|
+
label: i,
|
|
96
|
+
isOther: r,
|
|
97
|
+
isFirstOption: u
|
|
98
|
+
})));
|
|
99
|
+
}, A = ({ children: t, className: a }) => {
|
|
100
|
+
const { options: l, addOther: c, addOtherLabel: i, numberOfColumns: r = D.FREE_FLOW } = y(), { isMobile: u } = ee(), { t: b } = T(), d = u && r !== D.FREE_FLOW ? D.ONE : r, m = i || b("add-other.default-other-option-label") || g, o = f(t, v), p = F(() => {
|
|
101
|
+
const n = l || [];
|
|
102
|
+
return c ? [
|
|
103
|
+
...n,
|
|
104
|
+
{
|
|
105
|
+
label: m,
|
|
106
|
+
value: m,
|
|
107
|
+
isOther: !0
|
|
108
|
+
}
|
|
109
|
+
] : n;
|
|
110
|
+
}, [
|
|
111
|
+
l,
|
|
112
|
+
c,
|
|
113
|
+
m
|
|
114
|
+
]);
|
|
115
|
+
return p.length === 0 ? null : /* @__PURE__ */ e.createElement("div", {
|
|
116
|
+
className: a,
|
|
117
|
+
"data-columns": d
|
|
118
|
+
}, p.map((n, L) => {
|
|
119
|
+
const h = n.value ?? n.label;
|
|
120
|
+
return k(o, {
|
|
121
|
+
key: n.isOther ? g : h,
|
|
122
|
+
value: h,
|
|
123
|
+
label: n.label,
|
|
124
|
+
isOther: n.isOther,
|
|
125
|
+
isFirstOption: L === 0
|
|
126
|
+
});
|
|
127
|
+
}));
|
|
128
|
+
}, U = ({ children: t, className: a }) => {
|
|
129
|
+
const { addOther: l, addOtherLabel: c, hasError: i, readOnly: r, value: u } = y(), { t: b } = T(), d = c || b("add-other.default-other-option-label") || g, m = f(t, A), o = f(t, W), p = F(() => !l || !u ? !1 : u.some((n) => n === d || n.startsWith(`${d}:`)), [
|
|
130
|
+
l,
|
|
131
|
+
u,
|
|
132
|
+
d
|
|
133
|
+
]);
|
|
134
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
135
|
+
className: a,
|
|
136
|
+
"data-invalid": i,
|
|
137
|
+
"data-readonly": r
|
|
138
|
+
}, m, p && o);
|
|
139
|
+
}, s = ({ children: t }) => {
|
|
140
|
+
const { id: a, value: l, onChange: c, FieldLayout: i, required: r, disabled: u, readOnly: b, hasError: d, onBlur: m, onFocus: o } = y(), { inputId: p, labelId: n, ariaDescribedBy: L } = Z(), h = F(() => l || [], [
|
|
141
|
+
l
|
|
142
|
+
]), I = f(t, P), E = f(t, U), C = f(t, B), R = f(t, x);
|
|
143
|
+
return /* @__PURE__ */ e.createElement(i, {
|
|
144
|
+
fieldId: a,
|
|
145
|
+
renderLabel: () => I,
|
|
146
|
+
renderInput: () => /* @__PURE__ */ e.createElement(ae, {
|
|
147
|
+
id: p,
|
|
148
|
+
ariaLabelledBy: n,
|
|
149
|
+
ariaDescribedBy: L,
|
|
150
|
+
required: r,
|
|
151
|
+
onBlur: m,
|
|
152
|
+
onFocus: o
|
|
153
|
+
}, /* @__PURE__ */ e.createElement(z, {
|
|
154
|
+
"aria-labelledby": n,
|
|
155
|
+
value: h,
|
|
156
|
+
onChange: c,
|
|
157
|
+
isDisabled: u,
|
|
158
|
+
isReadOnly: b,
|
|
159
|
+
isRequired: r,
|
|
160
|
+
isInvalid: d
|
|
161
|
+
}, E)),
|
|
162
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, R, C)
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
A.Option = v;
|
|
166
|
+
v.Label = $;
|
|
167
|
+
s.Label = P;
|
|
168
|
+
s.Control = U;
|
|
169
|
+
s.Options = A;
|
|
170
|
+
s.OtherInput = W;
|
|
171
|
+
s.Description = B;
|
|
172
|
+
s.Error = x;
|
|
173
|
+
const Ee = "_control_lyoqm_1", Oe = "_options_lyoqm_7", be = "_option_lyoqm_7", N = {
|
|
174
|
+
control: Ee,
|
|
175
|
+
options: Oe,
|
|
176
|
+
option: be
|
|
177
|
+
}, fe = ({ content: t, locale: a }) => /* @__PURE__ */ e.createElement(Q, {
|
|
178
|
+
content: t,
|
|
179
|
+
locale: a
|
|
180
|
+
}), Ve = () => /* @__PURE__ */ e.createElement(s, null, /* @__PURE__ */ e.createElement(s.Label, {
|
|
181
|
+
className: _(re, S.label)
|
|
182
|
+
}, /* @__PURE__ */ e.createElement(s.Label.Required, {
|
|
183
|
+
className: _(oe, S.requiredMark)
|
|
184
|
+
})), /* @__PURE__ */ e.createElement(s.Control, {
|
|
185
|
+
className: N.control
|
|
186
|
+
}, /* @__PURE__ */ e.createElement(s.Options, {
|
|
187
|
+
className: _(se, N.options)
|
|
188
|
+
}, /* @__PURE__ */ e.createElement(s.Options.Option, {
|
|
189
|
+
className: ({ isSelected: t }) => _(le, t && ie, N.option)
|
|
190
|
+
}, /* @__PURE__ */ e.createElement(s.Options.Option.Label, {
|
|
191
|
+
className: me.optionLabel
|
|
192
|
+
}))), /* @__PURE__ */ e.createElement(s.OtherInput, {
|
|
193
|
+
className: _(ce, S.input)
|
|
194
|
+
})), /* @__PURE__ */ e.createElement(s.Error, {
|
|
195
|
+
className: _(ue, S.error)
|
|
196
|
+
}, /* @__PURE__ */ e.createElement(ne, null), /* @__PURE__ */ e.createElement(s.Error.Text, null)), /* @__PURE__ */ e.createElement(s.Description, {
|
|
197
|
+
className: _(de, S.description)
|
|
198
|
+
}, fe));
|
|
199
|
+
export {
|
|
200
|
+
Ve as T
|
|
201
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { RicosViewer as S } from "@wix/ricos/viewer";
|
|
2
|
+
import n from "classnames";
|
|
3
|
+
import r, { useCallback as O, useRef as T } from "react";
|
|
4
|
+
import { TextField as N, TextArea as y } from "react-aria-components";
|
|
5
|
+
import { ag as d, ad as E, ai as h } from "./form-Dn-MrArr.js";
|
|
6
|
+
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { D as x, E as g } from "./field-error-headless-D40GACk4.js";
|
|
8
|
+
import { L as M } from "./field-label-headless-Beq2Tn6V.js";
|
|
9
|
+
import { E as q } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
+
import { s } from "./field-rac.module-DXfwku6m.js";
|
|
11
|
+
import { r as v, H as B, q as P, l as k, h as U } from "./form-element-classes-Bi-nNM8q.js";
|
|
12
|
+
const e = ({ children: t }) => {
|
|
13
|
+
const { id: a, value: m, onChange: l, disabled: u, required: o, readOnly: i, onBlur: p, onFocus: I, FieldLayout: f, hasError: F } = d(), { labelId: L } = E(), R = O((C) => {
|
|
14
|
+
l(C);
|
|
15
|
+
}, [
|
|
16
|
+
l
|
|
17
|
+
]), _ = c(t, e.Label), b = c(t, e.Input), D = c(t, e.Description), A = c(t, e.Error);
|
|
18
|
+
return /* @__PURE__ */ r.createElement(f, {
|
|
19
|
+
fieldId: a,
|
|
20
|
+
renderLabel: () => _,
|
|
21
|
+
renderInput: () => /* @__PURE__ */ r.createElement(N, {
|
|
22
|
+
"aria-labelledby": L,
|
|
23
|
+
value: m ?? "",
|
|
24
|
+
onChange: R,
|
|
25
|
+
isDisabled: u,
|
|
26
|
+
isReadOnly: i,
|
|
27
|
+
isRequired: o,
|
|
28
|
+
isInvalid: F,
|
|
29
|
+
onBlur: p,
|
|
30
|
+
onFocus: I
|
|
31
|
+
}, b),
|
|
32
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, D)
|
|
33
|
+
});
|
|
34
|
+
}, V = ({ className: t }) => {
|
|
35
|
+
const { inputId: a, ariaDescribedBy: m } = E(), { id: l, placeholder: u } = d(), o = T(null);
|
|
36
|
+
return h(() => {
|
|
37
|
+
var i;
|
|
38
|
+
(i = o.current) == null || i.focus();
|
|
39
|
+
}, l), /* @__PURE__ */ r.createElement(y, {
|
|
40
|
+
ref: o,
|
|
41
|
+
id: a,
|
|
42
|
+
"aria-describedby": m,
|
|
43
|
+
placeholder: u,
|
|
44
|
+
className: t
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
e.Label = M;
|
|
48
|
+
e.Input = V;
|
|
49
|
+
e.Description = x;
|
|
50
|
+
e.Error = g;
|
|
51
|
+
const w = "_input_ug5v8_1", H = {
|
|
52
|
+
input: w
|
|
53
|
+
}, Q = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(S, {
|
|
54
|
+
content: t,
|
|
55
|
+
locale: a
|
|
56
|
+
}), re = () => /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
57
|
+
className: n(v, s.label)
|
|
58
|
+
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
59
|
+
className: n(B, s.requiredMark)
|
|
60
|
+
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
61
|
+
className: n(P, s.input, H.input)
|
|
62
|
+
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
63
|
+
className: n(k, s.error)
|
|
64
|
+
}, /* @__PURE__ */ r.createElement(q, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
65
|
+
className: n(U, s.description)
|
|
66
|
+
}, Q));
|
|
67
|
+
export {
|
|
68
|
+
re as T
|
|
69
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
|
+
import t from "classnames";
|
|
3
|
+
import e from "react";
|
|
4
|
+
import { T as r } from "./text-input-headless-BFldUMDr.js";
|
|
5
|
+
import { E as o } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
+
import { s as a } from "./field-rac.module-DXfwku6m.js";
|
|
7
|
+
import { r as n, H as c, q as E, l as i, h as R } from "./form-element-classes-Bi-nNM8q.js";
|
|
8
|
+
const _ = ({ content: l, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
9
|
+
content: l,
|
|
10
|
+
locale: s
|
|
11
|
+
}), N = () => /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
12
|
+
className: t(n, a.label)
|
|
13
|
+
}, /* @__PURE__ */ e.createElement(r.Label.Required, {
|
|
14
|
+
className: t(c, a.requiredMark)
|
|
15
|
+
})), /* @__PURE__ */ e.createElement(r.Input, {
|
|
16
|
+
className: t(E, a.input)
|
|
17
|
+
}), /* @__PURE__ */ e.createElement(r.Error, {
|
|
18
|
+
className: t(i, a.error)
|
|
19
|
+
}, /* @__PURE__ */ e.createElement(o, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
20
|
+
className: t(R, a.description)
|
|
21
|
+
}, _));
|
|
22
|
+
export {
|
|
23
|
+
N as T
|
|
24
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import t, { useRef as L } from "react";
|
|
2
|
+
import { TextField as R, Input as g } from "react-aria-components";
|
|
3
|
+
import { ag as d, ad as c, ai as v } from "./form-Dn-MrArr.js";
|
|
4
|
+
import { f as a } from "./find-child-C60k4CxG.js";
|
|
5
|
+
import { D as T, E as h } from "./field-error-headless-D40GACk4.js";
|
|
6
|
+
import { L as x } from "./field-label-headless-Beq2Tn6V.js";
|
|
7
|
+
const e = ({ children: r }) => {
|
|
8
|
+
const { id: s, value: i, onChange: l, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: b, FieldLayout: f } = d(), { labelId: E } = c(), I = a(r, e.Label), F = a(r, e.Input), y = a(r, e.Description), D = a(r, e.Error);
|
|
9
|
+
return /* @__PURE__ */ t.createElement(f, {
|
|
10
|
+
fieldId: s,
|
|
11
|
+
renderLabel: () => I,
|
|
12
|
+
renderInput: () => /* @__PURE__ */ t.createElement(R, {
|
|
13
|
+
"aria-labelledby": E,
|
|
14
|
+
value: i ?? "",
|
|
15
|
+
onChange: l,
|
|
16
|
+
isDisabled: u,
|
|
17
|
+
isReadOnly: n,
|
|
18
|
+
isRequired: o,
|
|
19
|
+
isInvalid: p,
|
|
20
|
+
onBlur: m,
|
|
21
|
+
onFocus: b
|
|
22
|
+
}, F),
|
|
23
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, D, y)
|
|
24
|
+
});
|
|
25
|
+
}, B = ({ className: r }) => {
|
|
26
|
+
const { id: s, placeholder: i } = d(), { inputId: l, ariaDescribedBy: u } = c(), n = L(null);
|
|
27
|
+
return v(() => {
|
|
28
|
+
var o;
|
|
29
|
+
(o = n.current) == null || o.focus();
|
|
30
|
+
}, s), /* @__PURE__ */ t.createElement(g, {
|
|
31
|
+
ref: n,
|
|
32
|
+
id: l,
|
|
33
|
+
"aria-describedby": u,
|
|
34
|
+
className: r,
|
|
35
|
+
placeholder: i
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
e.Label = x;
|
|
39
|
+
e.Input = B;
|
|
40
|
+
e.Description = T;
|
|
41
|
+
e.Error = h;
|
|
42
|
+
export {
|
|
43
|
+
e as T
|
|
44
|
+
};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import e, { useCallback as O, useRef as q } from "react";
|
|
2
|
+
import { RicosViewer as x } from "@wix/ricos/viewer";
|
|
3
|
+
import u from "classnames";
|
|
4
|
+
import { parseTime as H } from "@internationalized/date";
|
|
5
|
+
import { TimeField as V, DateInput as v, DateSegment as _ } from "react-aria-components";
|
|
6
|
+
import { ag as E, ad as B, aq as I, ai as k } from "./form-Dn-MrArr.js";
|
|
7
|
+
import { f as c, a as F } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { D as w, E as U } from "./field-error-headless-D40GACk4.js";
|
|
9
|
+
import { L as j } from "./field-label-headless-Beq2Tn6V.js";
|
|
10
|
+
import { E as Q } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
+
import { s as d } from "./field-rac.module-DXfwku6m.js";
|
|
12
|
+
import { r as z, H as G, q as J, l as K, h as W } from "./form-element-classes-Bi-nNM8q.js";
|
|
13
|
+
const r = ({ children: t }) => {
|
|
14
|
+
const { id: n, value: o, onChange: a, disabled: i, required: l, onBlur: s, onFocus: p, use24HourFormat: f, FieldLayout: T, hasError: D } = E(), { inputId: L, ariaDescribedBy: S, labelId: g } = B(), R = O((A) => {
|
|
15
|
+
const M = ee(A);
|
|
16
|
+
a(M);
|
|
17
|
+
}, [
|
|
18
|
+
a
|
|
19
|
+
]), b = c(t, r.Label), N = c(t, r.Time), C = c(t, r.Description), y = c(t, r.Error), P = $(o);
|
|
20
|
+
return /* @__PURE__ */ e.createElement(T, {
|
|
21
|
+
fieldId: n,
|
|
22
|
+
renderLabel: () => b,
|
|
23
|
+
renderInput: () => /* @__PURE__ */ e.createElement(V, {
|
|
24
|
+
"aria-labelledby": g,
|
|
25
|
+
id: L,
|
|
26
|
+
"aria-describedby": S,
|
|
27
|
+
value: P,
|
|
28
|
+
onChange: R,
|
|
29
|
+
isDisabled: i,
|
|
30
|
+
isInvalid: D,
|
|
31
|
+
isRequired: l,
|
|
32
|
+
onBlur: s,
|
|
33
|
+
onFocus: p,
|
|
34
|
+
hourCycle: f ? 24 : 12
|
|
35
|
+
}, N),
|
|
36
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, y, C)
|
|
37
|
+
});
|
|
38
|
+
}, m = ({ children: t, className: n }) => {
|
|
39
|
+
const { hasError: o } = E(), a = c(t, m.Hour), i = c(t, m.Minute), l = c(t, m.Period);
|
|
40
|
+
return /* @__PURE__ */ e.createElement(v, {
|
|
41
|
+
className: n,
|
|
42
|
+
"data-invalid": o || void 0
|
|
43
|
+
}, (s) => {
|
|
44
|
+
switch (s.type) {
|
|
45
|
+
case "hour":
|
|
46
|
+
return F(a, {
|
|
47
|
+
segment: s
|
|
48
|
+
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
49
|
+
case "minute":
|
|
50
|
+
return F(i, {
|
|
51
|
+
segment: s
|
|
52
|
+
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
53
|
+
case "dayPeriod":
|
|
54
|
+
return F(l, {
|
|
55
|
+
segment: s
|
|
56
|
+
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
57
|
+
case "literal":
|
|
58
|
+
return /* @__PURE__ */ e.createElement(_, {
|
|
59
|
+
segment: s
|
|
60
|
+
});
|
|
61
|
+
default:
|
|
62
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}, X = ({ className: t, ...n }) => {
|
|
66
|
+
const { id: o, hidePlaceholder: a } = E(), { segment: i } = n, { t: l } = I(), s = q(null);
|
|
67
|
+
k(() => {
|
|
68
|
+
var f;
|
|
69
|
+
(f = s.current) == null || f.focus();
|
|
70
|
+
}, o);
|
|
71
|
+
const p = a ? void 0 : l("field.date.placeholder.hour");
|
|
72
|
+
return /* @__PURE__ */ e.createElement(_, {
|
|
73
|
+
ref: s,
|
|
74
|
+
segment: i,
|
|
75
|
+
className: t,
|
|
76
|
+
...p && {
|
|
77
|
+
placeholder: p
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}, Y = ({ className: t, ...n }) => {
|
|
81
|
+
const { hidePlaceholder: o } = E(), { segment: a } = n, { t: i } = I(), l = o ? void 0 : i("field.date.placeholder.minute");
|
|
82
|
+
return /* @__PURE__ */ e.createElement(_, {
|
|
83
|
+
segment: a,
|
|
84
|
+
className: t,
|
|
85
|
+
...l && {
|
|
86
|
+
placeholder: l
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}, Z = ({ className: t, ...n }) => {
|
|
90
|
+
const { hidePlaceholder: o } = E(), { segment: a } = n, { t: i } = I(), l = o ? void 0 : i("field.date.placeholder.period");
|
|
91
|
+
return /* @__PURE__ */ e.createElement(_, {
|
|
92
|
+
segment: a,
|
|
93
|
+
className: t,
|
|
94
|
+
...l && {
|
|
95
|
+
placeholder: l
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
m.Hour = X;
|
|
100
|
+
m.Minute = Y;
|
|
101
|
+
m.Period = Z;
|
|
102
|
+
r.Label = j;
|
|
103
|
+
r.Time = m;
|
|
104
|
+
r.Description = w;
|
|
105
|
+
r.Error = U;
|
|
106
|
+
function $(t) {
|
|
107
|
+
if (!t)
|
|
108
|
+
return null;
|
|
109
|
+
try {
|
|
110
|
+
return H(t);
|
|
111
|
+
} catch {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function ee(t) {
|
|
116
|
+
if (!t)
|
|
117
|
+
return null;
|
|
118
|
+
const n = String(t.hour).padStart(2, "0"), o = String(t.minute).padStart(2, "0"), a = String(t.second).padStart(2, "0");
|
|
119
|
+
return [
|
|
120
|
+
n,
|
|
121
|
+
o,
|
|
122
|
+
a
|
|
123
|
+
].join(":");
|
|
124
|
+
}
|
|
125
|
+
const te = "_time_332x1_1", re = "_hour_332x1_14", ne = "_minute_332x1_15", ae = "_period_332x1_16", h = {
|
|
126
|
+
time: te,
|
|
127
|
+
hour: re,
|
|
128
|
+
minute: ne,
|
|
129
|
+
period: ae
|
|
130
|
+
}, oe = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(x, {
|
|
131
|
+
content: t,
|
|
132
|
+
locale: n
|
|
133
|
+
}), le = () => /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
134
|
+
className: u(z, d.label)
|
|
135
|
+
}, /* @__PURE__ */ e.createElement(r.Label.Required, {
|
|
136
|
+
className: u(G, d.requiredMark)
|
|
137
|
+
})), /* @__PURE__ */ e.createElement(r.Time, {
|
|
138
|
+
className: u(J, d.input, h.time)
|
|
139
|
+
}, /* @__PURE__ */ e.createElement(r.Time.Hour, {
|
|
140
|
+
className: h.hour
|
|
141
|
+
}), /* @__PURE__ */ e.createElement(r.Time.Minute, {
|
|
142
|
+
className: h.minute
|
|
143
|
+
}), /* @__PURE__ */ e.createElement(r.Time.Period, {
|
|
144
|
+
className: h.period
|
|
145
|
+
})), /* @__PURE__ */ e.createElement(r.Error, {
|
|
146
|
+
className: u(K, d.error)
|
|
147
|
+
}, /* @__PURE__ */ e.createElement(Q, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
148
|
+
className: u(W, d.description)
|
|
149
|
+
}, oe)), Ie = () => /* @__PURE__ */ e.createElement(le, null);
|
|
150
|
+
export {
|
|
151
|
+
Ie as TimeInputRAC
|
|
152
|
+
};
|