@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,421 @@
|
|
|
1
|
+
import { RicosViewer as ae } from "@wix/ricos/viewer";
|
|
2
|
+
import E from "classnames";
|
|
3
|
+
import t, { useMemo as T, useState as $, useCallback as H, useRef as U } from "react";
|
|
4
|
+
import { ag as g, ad as j, aa as B, H as Q, a0 as J, r as m, aq as O, a4 as G, K as ne, w as re, a7 as le, x as K, ai as q } from "./form-Dn-MrArr.js";
|
|
5
|
+
import { parseTime as oe } from "@internationalized/date";
|
|
6
|
+
import { UNSAFE_PortalProvider as se } from "react-aria";
|
|
7
|
+
import { ListBoxItem as ie, ListBox as ce, Select as me, TextField as W, TimeField as de, SelectValue as ue, Input as X, DateInput as pe, DateSegment as k } from "react-aria-components";
|
|
8
|
+
import { f as d, a as R } from "./find-child-C60k4CxG.js";
|
|
9
|
+
import { g as Ee } from "./helpers-HmkkXrh2.js";
|
|
10
|
+
import { D as fe, E as he } from "./field-error-headless-D40GACk4.js";
|
|
11
|
+
import { L as be } from "./field-label-headless-Beq2Tn6V.js";
|
|
12
|
+
import { F as ge } from "./fieldset-headless-CD3fds9J.js";
|
|
13
|
+
import { N as Ie, S as _e } from "./non-modal-popover-DtIMXHbe.js";
|
|
14
|
+
import { C as De } from "./chevron-down-icon-CcpVm6B-.js";
|
|
15
|
+
import { E as ye } from "./error-icon-hZxQ6DEy.js";
|
|
16
|
+
import { H as Ne } from "./custom-focus-class-_483Pkwp.js";
|
|
17
|
+
import { s as p } from "./field-rac.module-DXfwku6m.js";
|
|
18
|
+
import { r as S, H as Le, q as Y, u as Te, l as Oe, h as Fe } from "./form-element-classes-Bi-nNM8q.js";
|
|
19
|
+
const o = ({ children: e, className: a }) => {
|
|
20
|
+
const { id: n, required: r, onBlur: s, onFocus: l, FieldLayout: i } = g(), { inputId: u, labelId: c, ariaDescribedBy: h } = j(), { regionalFormat: b } = B(), D = T(() => Q(b).filter(J).map((M) => M.toUpperCase()), [
|
|
21
|
+
b
|
|
22
|
+
]), C = d(e, o.Label), V = d(e, o.Description), L = d(e, o.Error), _ = {
|
|
23
|
+
[m.MONTH]: d(e, o.Month),
|
|
24
|
+
[m.DAY]: d(e, o.Day),
|
|
25
|
+
[m.YEAR]: d(e, o.Year)
|
|
26
|
+
}, y = d(e, o.Time);
|
|
27
|
+
return /* @__PURE__ */ t.createElement(i, {
|
|
28
|
+
fieldId: n,
|
|
29
|
+
renderLabel: () => R(C, {
|
|
30
|
+
as: "div"
|
|
31
|
+
}),
|
|
32
|
+
renderInput: () => /* @__PURE__ */ t.createElement(ge, {
|
|
33
|
+
id: u,
|
|
34
|
+
ariaLabelledBy: c,
|
|
35
|
+
ariaDescribedBy: h,
|
|
36
|
+
required: r,
|
|
37
|
+
onBlur: s,
|
|
38
|
+
onFocus: l,
|
|
39
|
+
className: a
|
|
40
|
+
}, _[D[0]], _[D[1]], _[D[2]], y),
|
|
41
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, L, V)
|
|
42
|
+
});
|
|
43
|
+
}, F = ({ children: e, className: a }) => {
|
|
44
|
+
const { disabled: n, readOnly: r, showDateLabels: s, hidePlaceholder: l } = g(), { labelId: i } = N(m.MONTH), { partValue: u, partError: c, onPartChange: h } = P(m.MONTH), { t: b } = O(), [D, C] = $(!1), [V, L] = $(null), _ = l ? void 0 : b("field.date.placeholder.month"), y = H((x) => {
|
|
45
|
+
r || h(typeof x == "string" ? x : "");
|
|
46
|
+
}, [
|
|
47
|
+
h,
|
|
48
|
+
r
|
|
49
|
+
]), M = H((x) => {
|
|
50
|
+
C(x && !r);
|
|
51
|
+
}, [
|
|
52
|
+
r
|
|
53
|
+
]), Z = d(e, F.Label), ee = d(e, F.Trigger), te = d(e, F.Options);
|
|
54
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
55
|
+
className: a,
|
|
56
|
+
"data-date-field": !0
|
|
57
|
+
}, s ? Z : null, /* @__PURE__ */ t.createElement("div", {
|
|
58
|
+
ref: L,
|
|
59
|
+
style: {
|
|
60
|
+
display: "contents"
|
|
61
|
+
}
|
|
62
|
+
}), /* @__PURE__ */ t.createElement(se, {
|
|
63
|
+
getContainer: () => V
|
|
64
|
+
}, /* @__PURE__ */ t.createElement(me, {
|
|
65
|
+
"aria-labelledby": s ? i : void 0,
|
|
66
|
+
value: u || null,
|
|
67
|
+
onChange: y,
|
|
68
|
+
isDisabled: n,
|
|
69
|
+
isInvalid: c,
|
|
70
|
+
placeholder: _,
|
|
71
|
+
isOpen: D,
|
|
72
|
+
onOpenChange: M
|
|
73
|
+
}, ee, te)));
|
|
74
|
+
}, Pe = ({ className: e }) => /* @__PURE__ */ t.createElement(z, {
|
|
75
|
+
datePart: m.MONTH,
|
|
76
|
+
className: e
|
|
77
|
+
}), Ce = ({ children: e, className: a }) => {
|
|
78
|
+
const { id: n, readOnly: r } = g(), { inputId: s } = N(m.MONTH), { partError: l, isFirstPart: i } = P(m.MONTH), u = U(null);
|
|
79
|
+
return q(() => {
|
|
80
|
+
var c;
|
|
81
|
+
i && ((c = u.current) == null || c.focus());
|
|
82
|
+
}, n), /* @__PURE__ */ t.createElement(_e, {
|
|
83
|
+
ref: u,
|
|
84
|
+
id: s,
|
|
85
|
+
className: a,
|
|
86
|
+
"data-hook": m.MONTH,
|
|
87
|
+
"data-invalid": l || void 0,
|
|
88
|
+
"data-readonly": r || void 0
|
|
89
|
+
}, /* @__PURE__ */ t.createElement(ue, null), e);
|
|
90
|
+
}, w = ({ children: e, className: a }) => {
|
|
91
|
+
const { language: n } = B(), r = T(() => Ee(n), [
|
|
92
|
+
n
|
|
93
|
+
]), s = d(e, w.Option) ?? /* @__PURE__ */ t.createElement(w.Option, null);
|
|
94
|
+
return /* @__PURE__ */ t.createElement(Ie, {
|
|
95
|
+
className: a,
|
|
96
|
+
containerPadding: 0,
|
|
97
|
+
offset: 0
|
|
98
|
+
}, /* @__PURE__ */ t.createElement(ce, null, r.map((l, i) => R(s, {
|
|
99
|
+
key: String(i + 1),
|
|
100
|
+
value: String(i + 1),
|
|
101
|
+
label: l
|
|
102
|
+
}))));
|
|
103
|
+
}, Me = ({ className: e, ...a }) => {
|
|
104
|
+
const { value: n, label: r } = a;
|
|
105
|
+
return /* @__PURE__ */ t.createElement(ie, {
|
|
106
|
+
className: e,
|
|
107
|
+
id: n,
|
|
108
|
+
textValue: r
|
|
109
|
+
}, r);
|
|
110
|
+
};
|
|
111
|
+
F.Label = Pe;
|
|
112
|
+
F.Trigger = Ce;
|
|
113
|
+
F.Options = w;
|
|
114
|
+
w.Option = Me;
|
|
115
|
+
const A = ({ children: e, className: a }) => {
|
|
116
|
+
const { disabled: n, readOnly: r, showDateLabels: s } = g(), { labelId: l } = N(m.DAY), { partValue: i, partError: u, onPartChange: c } = P(m.DAY), h = d(e, A.Label), b = d(e, A.Input);
|
|
117
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
118
|
+
className: a,
|
|
119
|
+
"data-date-field": !0
|
|
120
|
+
}, s && h, /* @__PURE__ */ t.createElement(W, {
|
|
121
|
+
"aria-labelledby": s ? l : void 0,
|
|
122
|
+
value: i,
|
|
123
|
+
onChange: c,
|
|
124
|
+
isDisabled: n,
|
|
125
|
+
isReadOnly: r,
|
|
126
|
+
isInvalid: u
|
|
127
|
+
}, b));
|
|
128
|
+
}, Se = ({ className: e }) => /* @__PURE__ */ t.createElement(z, {
|
|
129
|
+
datePart: m.DAY,
|
|
130
|
+
className: e
|
|
131
|
+
}), Re = ({ className: e }) => {
|
|
132
|
+
const { id: a, hidePlaceholder: n } = g(), { inputId: r } = N(m.DAY), { isFirstPart: s } = P(m.DAY), { t: l } = O(), i = U(null), u = n ? void 0 : l("field.date.placeholder.day");
|
|
133
|
+
return q(() => {
|
|
134
|
+
var c;
|
|
135
|
+
s && ((c = i.current) == null || c.focus());
|
|
136
|
+
}, a), /* @__PURE__ */ t.createElement(X, {
|
|
137
|
+
ref: i,
|
|
138
|
+
id: r,
|
|
139
|
+
className: e,
|
|
140
|
+
placeholder: u,
|
|
141
|
+
maxLength: 2,
|
|
142
|
+
inputMode: "numeric",
|
|
143
|
+
"data-hook": m.DAY
|
|
144
|
+
});
|
|
145
|
+
};
|
|
146
|
+
A.Label = Se;
|
|
147
|
+
A.Input = Re;
|
|
148
|
+
const v = ({ children: e, className: a }) => {
|
|
149
|
+
const { disabled: n, readOnly: r, showDateLabels: s } = g(), { labelId: l } = N(m.YEAR), { partValue: i, partError: u, onPartChange: c } = P(m.YEAR), h = d(e, v.Label), b = d(e, v.Input);
|
|
150
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
151
|
+
className: a,
|
|
152
|
+
"data-date-field": !0
|
|
153
|
+
}, s && h, /* @__PURE__ */ t.createElement(W, {
|
|
154
|
+
"aria-labelledby": s ? l : void 0,
|
|
155
|
+
value: i,
|
|
156
|
+
onChange: c,
|
|
157
|
+
isDisabled: n,
|
|
158
|
+
isReadOnly: r,
|
|
159
|
+
isInvalid: u
|
|
160
|
+
}, b));
|
|
161
|
+
}, Ae = ({ className: e }) => /* @__PURE__ */ t.createElement(z, {
|
|
162
|
+
datePart: m.YEAR,
|
|
163
|
+
className: e
|
|
164
|
+
}), ve = ({ className: e }) => {
|
|
165
|
+
const { id: a, hidePlaceholder: n } = g(), { inputId: r } = N(m.YEAR), { isFirstPart: s } = P(m.YEAR), { t: l } = O(), i = U(null), u = n ? void 0 : l("field.date.placeholder.year");
|
|
166
|
+
return q(() => {
|
|
167
|
+
var c;
|
|
168
|
+
s && ((c = i.current) == null || c.focus());
|
|
169
|
+
}, a), /* @__PURE__ */ t.createElement(X, {
|
|
170
|
+
ref: i,
|
|
171
|
+
id: r,
|
|
172
|
+
className: e,
|
|
173
|
+
placeholder: u,
|
|
174
|
+
maxLength: 4,
|
|
175
|
+
inputMode: "numeric",
|
|
176
|
+
"data-hook": m.YEAR
|
|
177
|
+
});
|
|
178
|
+
};
|
|
179
|
+
v.Label = Ae;
|
|
180
|
+
v.Input = ve;
|
|
181
|
+
const I = ({ children: e, className: a }) => {
|
|
182
|
+
const { disabled: n, readOnly: r, use24HourFormat: s, showDateLabels: l } = g(), { labelId: i } = N("time"), { partValue: u, partError: c, onPartChange: h } = P("time"), b = d(e, I.Label), D = d(e, I.Input);
|
|
183
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
184
|
+
className: a,
|
|
185
|
+
"data-date-field": !0
|
|
186
|
+
}, l && b, /* @__PURE__ */ t.createElement(de, {
|
|
187
|
+
"aria-labelledby": l ? i : void 0,
|
|
188
|
+
value: u,
|
|
189
|
+
onChange: h,
|
|
190
|
+
isDisabled: n,
|
|
191
|
+
isReadOnly: r,
|
|
192
|
+
isInvalid: c,
|
|
193
|
+
hourCycle: s ? 24 : 12
|
|
194
|
+
}, D));
|
|
195
|
+
}, Ve = ({ className: e }) => {
|
|
196
|
+
const { inputId: a, labelId: n } = N("time"), { t: r } = O(), s = r("field.date.label.time");
|
|
197
|
+
return /* @__PURE__ */ t.createElement("label", {
|
|
198
|
+
id: n,
|
|
199
|
+
htmlFor: a,
|
|
200
|
+
className: e
|
|
201
|
+
}, s);
|
|
202
|
+
}, xe = ({ children: e, className: a }) => {
|
|
203
|
+
const n = d(e, I.Hour), r = d(e, I.Minute), s = d(e, I.Period);
|
|
204
|
+
return /* @__PURE__ */ t.createElement(pe, {
|
|
205
|
+
className: a,
|
|
206
|
+
"data-hook": "time"
|
|
207
|
+
}, (l) => {
|
|
208
|
+
switch (l.type) {
|
|
209
|
+
case "hour":
|
|
210
|
+
return R(n, {
|
|
211
|
+
segment: l
|
|
212
|
+
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
213
|
+
case "minute":
|
|
214
|
+
return R(r, {
|
|
215
|
+
segment: l
|
|
216
|
+
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
217
|
+
case "dayPeriod":
|
|
218
|
+
return R(s, {
|
|
219
|
+
segment: l
|
|
220
|
+
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
221
|
+
case "literal":
|
|
222
|
+
return /* @__PURE__ */ t.createElement(k, {
|
|
223
|
+
segment: l
|
|
224
|
+
});
|
|
225
|
+
default:
|
|
226
|
+
return /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
}, Ye = ({ className: e, ...a }) => {
|
|
230
|
+
const { hidePlaceholder: n } = g(), { segment: r } = a, { t: s } = O(), l = n ? void 0 : s("field.date.placeholder.hour");
|
|
231
|
+
return /* @__PURE__ */ t.createElement(k, {
|
|
232
|
+
segment: r,
|
|
233
|
+
className: e,
|
|
234
|
+
...l && {
|
|
235
|
+
placeholder: l
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
}, He = ({ className: e, ...a }) => {
|
|
239
|
+
const { hidePlaceholder: n } = g(), { segment: r } = a, { t: s } = O(), l = n ? void 0 : s("field.date.placeholder.minute");
|
|
240
|
+
return /* @__PURE__ */ t.createElement(k, {
|
|
241
|
+
segment: r,
|
|
242
|
+
className: e,
|
|
243
|
+
...l && {
|
|
244
|
+
placeholder: l
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
}, we = ({ className: e, ...a }) => {
|
|
248
|
+
const { hidePlaceholder: n } = g(), { segment: r } = a, { t: s } = O(), l = n ? void 0 : s("field.date.placeholder.period");
|
|
249
|
+
return /* @__PURE__ */ t.createElement(k, {
|
|
250
|
+
segment: r,
|
|
251
|
+
className: e,
|
|
252
|
+
...l && {
|
|
253
|
+
placeholder: l
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
};
|
|
257
|
+
I.Label = Ve;
|
|
258
|
+
I.Input = xe;
|
|
259
|
+
I.Hour = Ye;
|
|
260
|
+
I.Minute = He;
|
|
261
|
+
I.Period = we;
|
|
262
|
+
o.Label = be;
|
|
263
|
+
o.Month = F;
|
|
264
|
+
o.Day = A;
|
|
265
|
+
o.Year = v;
|
|
266
|
+
o.Time = I;
|
|
267
|
+
o.Description = fe;
|
|
268
|
+
o.Error = he;
|
|
269
|
+
function N(e) {
|
|
270
|
+
const { inputId: a } = j();
|
|
271
|
+
return T(() => {
|
|
272
|
+
const n = e.toLowerCase();
|
|
273
|
+
return {
|
|
274
|
+
inputId: `${a}-${n}-input`,
|
|
275
|
+
labelId: `${a}-${n}-label`
|
|
276
|
+
};
|
|
277
|
+
}, [
|
|
278
|
+
a,
|
|
279
|
+
e
|
|
280
|
+
]);
|
|
281
|
+
}
|
|
282
|
+
function P(e) {
|
|
283
|
+
const { value: a, onChange: n, hasError: r = !1 } = g(), { regionalFormat: s } = B(), [l, i] = T(() => G(a ?? ""), [
|
|
284
|
+
a
|
|
285
|
+
]), u = T(() => ne(r, a ?? ""), [
|
|
286
|
+
a,
|
|
287
|
+
r
|
|
288
|
+
]), c = T(() => re(l), [
|
|
289
|
+
l
|
|
290
|
+
]), h = T(() => Be(i), [
|
|
291
|
+
i
|
|
292
|
+
]), b = H((L) => {
|
|
293
|
+
const _ = ke(L), y = K(l, _);
|
|
294
|
+
n(y);
|
|
295
|
+
}, [
|
|
296
|
+
n,
|
|
297
|
+
l
|
|
298
|
+
]), D = H((L) => {
|
|
299
|
+
const [, _] = G(a ?? ""), y = le(L, e, c), M = K(y, _);
|
|
300
|
+
n(M);
|
|
301
|
+
}, [
|
|
302
|
+
n,
|
|
303
|
+
a,
|
|
304
|
+
c,
|
|
305
|
+
e
|
|
306
|
+
]), C = T(() => e === "time" ? !1 : Q(s).filter(J).map((y) => y.toUpperCase())[0] === e, [
|
|
307
|
+
s,
|
|
308
|
+
e
|
|
309
|
+
]);
|
|
310
|
+
return e === "time" ? {
|
|
311
|
+
partValue: h,
|
|
312
|
+
partError: u.TIME,
|
|
313
|
+
onPartChange: b,
|
|
314
|
+
isFirstPart: !1
|
|
315
|
+
} : {
|
|
316
|
+
partValue: c[e] || "",
|
|
317
|
+
partError: u[e],
|
|
318
|
+
onPartChange: D,
|
|
319
|
+
isFirstPart: C
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
function z({ datePart: e, className: a }) {
|
|
323
|
+
const { inputId: n, labelId: r } = N(e), { t: s } = O(), l = `field.date.label.${e.toLowerCase()}`, i = s(l);
|
|
324
|
+
return /* @__PURE__ */ t.createElement("label", {
|
|
325
|
+
id: r,
|
|
326
|
+
htmlFor: n,
|
|
327
|
+
className: a
|
|
328
|
+
}, i);
|
|
329
|
+
}
|
|
330
|
+
function Be(e) {
|
|
331
|
+
if (!e)
|
|
332
|
+
return null;
|
|
333
|
+
try {
|
|
334
|
+
return oe(e);
|
|
335
|
+
} catch {
|
|
336
|
+
return null;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
function ke(e) {
|
|
340
|
+
if (!e)
|
|
341
|
+
return null;
|
|
342
|
+
const a = String(e.hour).padStart(2, "0"), n = String(e.minute).padStart(2, "0"), r = String(e.second).padStart(2, "0");
|
|
343
|
+
return [
|
|
344
|
+
a,
|
|
345
|
+
n,
|
|
346
|
+
r
|
|
347
|
+
].join(":");
|
|
348
|
+
}
|
|
349
|
+
const Ue = "_fields_1x5em_1", qe = "_month_1x5em_10", ze = "_day_1x5em_11", $e = "_year_1x5em_12", Ge = "_timeGroup_1x5em_13", Ke = "_mobile_1x5em_32", je = "_dayInput_1x5em_45", Qe = "_yearInput_1x5em_46", Je = "_monthTrigger_1x5em_50", We = "_monthOption_1x5em_70", Xe = "_time_1x5em_13", Ze = "_hour_1x5em_89", et = "_minute_1x5em_90", tt = "_period_1x5em_91", f = {
|
|
350
|
+
fields: Ue,
|
|
351
|
+
month: qe,
|
|
352
|
+
day: ze,
|
|
353
|
+
year: $e,
|
|
354
|
+
timeGroup: Ge,
|
|
355
|
+
mobile: Ke,
|
|
356
|
+
dayInput: je,
|
|
357
|
+
yearInput: Qe,
|
|
358
|
+
monthTrigger: Je,
|
|
359
|
+
monthOption: We,
|
|
360
|
+
time: Xe,
|
|
361
|
+
hour: Ze,
|
|
362
|
+
minute: et,
|
|
363
|
+
period: tt
|
|
364
|
+
}, at = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ae, {
|
|
365
|
+
content: e,
|
|
366
|
+
locale: a
|
|
367
|
+
}), Dt = () => {
|
|
368
|
+
const { isMobile: e } = B();
|
|
369
|
+
return /* @__PURE__ */ t.createElement(o, {
|
|
370
|
+
className: E(f.fields, {
|
|
371
|
+
[f.mobile]: e
|
|
372
|
+
})
|
|
373
|
+
}, /* @__PURE__ */ t.createElement(o.Label, {
|
|
374
|
+
className: E(S, p.label)
|
|
375
|
+
}, /* @__PURE__ */ t.createElement(o.Label.Required, {
|
|
376
|
+
className: E(Le, p.requiredMark)
|
|
377
|
+
})), /* @__PURE__ */ t.createElement(o.Month, {
|
|
378
|
+
className: f.month
|
|
379
|
+
}, /* @__PURE__ */ t.createElement(o.Month.Label, {
|
|
380
|
+
className: E(S, p.label)
|
|
381
|
+
}), /* @__PURE__ */ t.createElement(o.Month.Trigger, {
|
|
382
|
+
className: E(Y, p.input, f.monthTrigger)
|
|
383
|
+
}, /* @__PURE__ */ t.createElement(De, {
|
|
384
|
+
className: p.dropdownIcon
|
|
385
|
+
})), /* @__PURE__ */ t.createElement(o.Month.Options, {
|
|
386
|
+
className: E(Te, p.selectPopover, p.dropdownPopover)
|
|
387
|
+
}, /* @__PURE__ */ t.createElement(o.Month.Options.Option, {
|
|
388
|
+
className: E(p.selectOption, f.monthOption, Ne)
|
|
389
|
+
}))), /* @__PURE__ */ t.createElement(o.Day, {
|
|
390
|
+
className: f.day
|
|
391
|
+
}, /* @__PURE__ */ t.createElement(o.Day.Label, {
|
|
392
|
+
className: E(S, p.label)
|
|
393
|
+
}), /* @__PURE__ */ t.createElement(o.Day.Input, {
|
|
394
|
+
className: E(Y, p.input, f.dayInput)
|
|
395
|
+
})), /* @__PURE__ */ t.createElement(o.Year, {
|
|
396
|
+
className: f.year
|
|
397
|
+
}, /* @__PURE__ */ t.createElement(o.Year.Label, {
|
|
398
|
+
className: E(S, p.label)
|
|
399
|
+
}), /* @__PURE__ */ t.createElement(o.Year.Input, {
|
|
400
|
+
className: E(Y, p.input, f.yearInput)
|
|
401
|
+
})), /* @__PURE__ */ t.createElement(o.Time, {
|
|
402
|
+
className: f.timeGroup
|
|
403
|
+
}, /* @__PURE__ */ t.createElement(o.Time.Label, {
|
|
404
|
+
className: E(S, p.label)
|
|
405
|
+
}), /* @__PURE__ */ t.createElement(o.Time.Input, {
|
|
406
|
+
className: E(Y, p.input, f.time)
|
|
407
|
+
}, /* @__PURE__ */ t.createElement(o.Time.Hour, {
|
|
408
|
+
className: f.hour
|
|
409
|
+
}), /* @__PURE__ */ t.createElement(o.Time.Minute, {
|
|
410
|
+
className: f.minute
|
|
411
|
+
}), /* @__PURE__ */ t.createElement(o.Time.Period, {
|
|
412
|
+
className: f.period
|
|
413
|
+
}))), /* @__PURE__ */ t.createElement(o.Error, {
|
|
414
|
+
className: E(Oe, p.error)
|
|
415
|
+
}, /* @__PURE__ */ t.createElement(ye, null), /* @__PURE__ */ t.createElement(o.Error.Text, null)), /* @__PURE__ */ t.createElement(o.Description, {
|
|
416
|
+
className: E(Fe, p.description)
|
|
417
|
+
}, at));
|
|
418
|
+
};
|
|
419
|
+
export {
|
|
420
|
+
Dt as D
|
|
421
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import o from "react";
|
|
2
|
+
import { ag as e, h as t } from "./form-Dn-MrArr.js";
|
|
3
|
+
import { C as p } from "./checkbox-group-field-rac-DwHc_GX9.js";
|
|
4
|
+
import { D as s } from "./default-limits-D7qVv_Hv.js";
|
|
5
|
+
const C = () => {
|
|
6
|
+
const r = {
|
|
7
|
+
...e(),
|
|
8
|
+
otherInputCharacterLimit: s
|
|
9
|
+
};
|
|
10
|
+
return /* @__PURE__ */ o.createElement(t.Provider, {
|
|
11
|
+
value: {
|
|
12
|
+
v2: r
|
|
13
|
+
}
|
|
14
|
+
}, /* @__PURE__ */ o.createElement(p, null));
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
C as DextCheckboxGroupRAC
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import r from "react";
|
|
2
|
+
import { ag as e, h as t } from "./form-Dn-MrArr.js";
|
|
3
|
+
import { R as p } from "./radio-group-field-rac-Ctu5L43b.js";
|
|
4
|
+
import { a } from "./default-limits-D7qVv_Hv.js";
|
|
5
|
+
const l = () => {
|
|
6
|
+
const o = {
|
|
7
|
+
...e(),
|
|
8
|
+
otherInputCharacterLimit: a
|
|
9
|
+
};
|
|
10
|
+
return /* @__PURE__ */ r.createElement(t.Provider, {
|
|
11
|
+
value: {
|
|
12
|
+
v2: o
|
|
13
|
+
}
|
|
14
|
+
}, /* @__PURE__ */ r.createElement(p, null));
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
l as DextRadioGroupRAC
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import r from "react";
|
|
2
|
+
import { ag as e, h as o } from "./form-Dn-MrArr.js";
|
|
3
|
+
import { T as s } from "./tags-field-rac-F3yYmtiN.js";
|
|
4
|
+
import { b as a } from "./default-limits-D7qVv_Hv.js";
|
|
5
|
+
const l = () => {
|
|
6
|
+
const t = {
|
|
7
|
+
...e(),
|
|
8
|
+
otherInputCharacterLimit: a
|
|
9
|
+
};
|
|
10
|
+
return /* @__PURE__ */ r.createElement(o.Provider, {
|
|
11
|
+
value: {
|
|
12
|
+
v2: t
|
|
13
|
+
}
|
|
14
|
+
}, /* @__PURE__ */ r.createElement(s, null));
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
l as DextTagsRAC
|
|
18
|
+
};
|