@wix/form-elements 1.106.0 → 1.108.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component/{appointment-rac-D2F4vgf1.js → appointment-rac-ZAp8oWbK.js} +289 -290
- package/dist/component/{bookings-address-rac-_5S8J8_i.js → bookings-address-rac-x-Az7vHf.js} +1 -1
- package/dist/component/{bookings-email-rac-6vmDR9nS.js → bookings-email-rac-MoF_CaqB.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DtTJ4T2K.js → bookings-first-name-rac-CWh3Rb0M.js} +1 -1
- package/dist/component/{bookings-header-rac-B3dsEwzR.js → bookings-header-rac-BVTiXUWk.js} +1 -1
- package/dist/component/{bookings-last-name-rac-B3idkbi8.js → bookings-last-name-rac-kXRRlyHl.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CrRBcQwT.js → bookings-login-bar-rac-C4Zr6kXE.js} +23 -24
- package/dist/component/{bookings-phone-rac-BE0yWNnj.js → bookings-phone-rac-2rz1m_xi.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CYo1l0-6.js → bookings-rich-text-rac-BEjGypQw.js} +1 -1
- package/dist/component/{checkbox-field-rac-boTtXVEt.js → checkbox-field-rac-DwEQLIaz.js} +66 -67
- package/dist/component/{checkbox-group-field-headless-DnkUvDm8.js → checkbox-group-field-headless-BsOww_QB.js} +37 -37
- package/dist/component/{checkbox-group-field-rac-DrDTgHMg.js → checkbox-group-field-rac-DTcZcVS6.js} +6 -6
- package/dist/component/{checkbox-group-rac-v3ozUBpo.js → checkbox-group-rac-DQsML-pW.js} +1 -1
- package/dist/component/{checkbox-rac-YSLE-RnG.js → checkbox-rac-irEBBOxP.js} +1 -1
- package/dist/component/{contacts-address-rac-C653yaHZ.js → contacts-address-rac-B5bSAYrm.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BeAQ6shx.js → contacts-birthdate-rac-DyScj8f4.js} +1 -1
- package/dist/component/{contacts-company-rac-BglKOoTG.js → contacts-company-rac-C5X9-jXa.js} +1 -1
- package/dist/component/{contacts-email-rac-D6m7ynfc.js → contacts-email-rac-B0vkfmrS.js} +1 -1
- package/dist/component/{contacts-first-name-rac-Dgxn0tUJ.js → contacts-first-name-rac-Cfil3U_e.js} +1 -1
- package/dist/component/{contacts-last-name-rac-1UyIuRKH.js → contacts-last-name-rac-CtPLE-7-.js} +1 -1
- package/dist/component/{contacts-phone-rac-BQ77BlW4.js → contacts-phone-rac-YkzsAoBZ.js} +1 -1
- package/dist/component/{contacts-position-rac-BUDUv7lv.js → contacts-position-rac-BS4j8QC-.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DdtA0qKW.js → contacts-subscribe-rac-z_9VsEZL.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-WUaKcNl0.js → contacts-tax-id-rac-WFkmKyZv.js} +1 -1
- package/dist/component/{date-availability-XjBFq8jt.js → date-availability-NN3rxosk.js} +1 -1
- package/dist/component/{date-input-field-rac-aY2zuuKs.js → date-input-field-rac-mdhEC3oq.js} +88 -89
- package/dist/component/{date-input-rac-DRiP2_97.js → date-input-rac-CGciuoTx.js} +1 -1
- package/dist/component/{date-picker-field-rac-Bzl-d3Uj.js → date-picker-field-rac-CRZVODfF.js} +90 -91
- package/dist/component/{date-picker-rac-DHHUh8vn.js → date-picker-rac-Bfbvjy8W.js} +1 -1
- package/dist/component/{date-time-input-field-rac-DP_StuLr.js → date-time-input-field-rac-TDWBXZ44.js} +76 -77
- package/dist/component/{date-time-input-rac-B11KIxsf.js → date-time-input-rac-DY0qdSix.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BHZBqyWv.js → dext-checkbox-group-rac-BFGM7SOt.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BIlAqEvV.js → dext-checkbox-rac-DPZvTeUZ.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CHBXNrZi.js → dext-date-picker-rac-Xd5kojsQ.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BYtliKry.js → dext-date-time-input-rac-C0RIdxJW.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C2VPSFV5.js → dext-dropdown-rac-D1m8vJvm.js} +1 -1
- package/dist/component/{dext-email-rac-Fnb0Ggcs.js → dext-email-rac-BC81RFYY.js} +1 -1
- package/dist/component/{dext-number-input-rac-DopfSyFi.js → dext-number-input-rac-Z_ih9FfX.js} +1 -1
- package/dist/component/{dext-phone-rac-Rn4i_2rc.js → dext-phone-rac-s3BOnXuI.js} +1 -1
- package/dist/component/{dext-radio-group-rac-bNaskJpK.js → dext-radio-group-rac-CL3jcezs.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DL6ZZd7d.js → dext-rating-input-rac-wz1EyP5b.js} +1 -1
- package/dist/component/{dext-tags-rac-TsUPoImO.js → dext-tags-rac-BY4Rf2BP.js} +2 -2
- package/dist/component/{dext-text-area-rac-BIuY7LTd.js → dext-text-area-rac-DRJzlsq8.js} +1 -1
- package/dist/component/{dext-text-input-rac-CSYPW0Qi.js → dext-text-input-rac-BGcRNNAi.js} +1 -1
- package/dist/component/{dext-url-input-rac-_g0lqGfW.js → dext-url-input-rac-CRAIm8yp.js} +1 -1
- package/dist/component/{donation-rac-BYKFtsyR.js → donation-rac-BlTfOIlE.js} +83 -84
- package/dist/component/{dropdown-field-headless-CBaqlNZi.js → dropdown-field-headless-DhzRAMcM.js} +12 -12
- package/dist/component/{dropdown-field-rac-CCAGSMm3.js → dropdown-field-rac-DXyY5we-.js} +5 -5
- package/dist/component/{dropdown-rac-C_EqUsZ1.js → dropdown-rac-C6YM6qxm.js} +1 -1
- package/dist/component/{ecom-address-rac-Bw9eH0iF.js → ecom-address-rac-CAdr7wya.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-B5PVOO2a.js → ecom-subscription-checkbox-rac-Z2VMuCbt.js} +6 -6
- package/dist/component/{email-input-field-rac-B2kqQ6yo.js → email-input-field-rac-DpkfunVK.js} +53 -54
- package/dist/component/{events-repeater-rac--4OnUxWE.js → events-repeater-rac-CuJkdrPo.js} +61 -62
- package/dist/component/{events-rsvp-rac-CczCoo3T.js → events-rsvp-rac-BKWlSeQ9.js} +8 -8
- package/dist/component/{field-error-headless-D3-1L5sf.js → field-error-headless-tsg9FQ-_.js} +12 -12
- package/dist/component/{field-label-headless-Du4ckIVy.js → field-label-headless-CB8dEat8.js} +11 -11
- package/dist/component/{file-upload-rac-DbdkUbWM.js → file-upload-rac-ZdgYt646.js} +67 -68
- package/dist/component/{fixed-payment-rac-f9-01iDN.js → fixed-payment-rac-CuIQEeHh.js} +20 -21
- package/dist/component/{form-DQauhsho.js → form-0jt4L5xo.js} +3045 -2896
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/header-field-rac-CWVGzxKb.js +24 -0
- package/dist/component/{header-rac-CR9T3Pnu.js → header-rac-D6KsV-ko.js} +1 -1
- package/dist/component/{image-choice-rac-DJ_8v467.js → image-choice-rac-CUCyVS8c.js} +29 -30
- package/dist/component/{index-BB7d_9Dv.js → index-TJSnVtCO.js} +72 -72
- package/dist/component/{index-CcUTIUWM.js → index-iOqQidgV.js} +12 -12
- package/dist/component/{isObjectLike-xvPa_08X.js → isObjectLike-DQbx8r1c.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CyaFOloE.js → multiline-address-field-rac-DtZ1NTfD.js} +186 -187
- package/dist/component/{multiline-address-rac-CaHGUN_f.js → multiline-address-rac-ub-_XzHU.js} +1 -1
- package/dist/component/number-input-field-rac-DLItn4DK.js +92 -0
- package/dist/component/{number-input-rac-DMKX6nhk.js → number-input-rac-UuxJzqEx.js} +1 -1
- package/dist/component/{password-rac-0RUXPAn6.js → password-rac-Di6q96Rn.js} +37 -38
- package/dist/component/{payment-input-rac-CHSZ3-Lt.js → payment-input-rac-CG6c4-Ge.js} +52 -53
- package/dist/component/{phone-input-field-rac-JmIFcP1e.js → phone-input-field-rac-D4JphCuT.js} +75 -76
- package/dist/component/{phone-rac-BLRnAPXP.js → phone-rac-_vDw2usa.js} +1 -1
- package/dist/component/{product-list-rac-BkF5tDwt.js → product-list-rac-CgxRlj1f.js} +73 -74
- package/dist/component/{quiz-radio-group-rac-32cCMTUS.js → quiz-radio-group-rac-bi26aGxN.js} +1 -1
- package/dist/component/{radio-button-module-classes-IOulhuSH.js → radio-button-module-classes-DDJq2ESf.js} +33 -33
- package/dist/component/{radio-group-field-rac-CJwku6e0.js → radio-group-field-rac-D1aMVO6l.js} +4 -4
- package/dist/component/{radio-group-rac-BiW-9Abj.js → radio-group-rac-HKC85M6t.js} +1 -1
- package/dist/component/{rating-input-field-rac-B9cwaROK.js → rating-input-field-rac-CpRehxFB.js} +42 -43
- package/dist/component/{rating-input-rac-BpwlNvzQ.js → rating-input-rac-BMuCZ3oj.js} +1 -1
- package/dist/component/{rich-content-rac.module-B1uyPmtK.js → rich-content-rac.module-mZ6xoAOd.js} +4 -4
- package/dist/component/rich-text-field-rac-CUK8V8Kf.js +21 -0
- package/dist/component/{rich-text-rac-VfeZxS27.js → rich-text-rac-B-7sR2FJ.js} +1 -1
- package/dist/component/{service-dropdown-rac-BCfs8IhW.js → service-dropdown-rac-1DDNT5bn.js} +43 -44
- package/dist/component/{services-multi-choice-rac-CCqdF_7P.js → services-multi-choice-rac-CB-6dwxz.js} +21 -22
- package/dist/component/{signature-rac-DOyMo3u0.js → signature-rac-7XBci6P2.js} +35 -36
- package/dist/component/{submit-button-rac-C2uA5DeE.js → submit-button-rac-B1-Mk8Gg.js} +21 -22
- package/dist/component/{tags-field-rac-C_uIw2by.js → tags-field-rac-CQ9Y7mq-.js} +49 -50
- package/dist/component/{tags-rac-1pQ-fpe_.js → tags-rac-Visic-Ml.js} +1 -1
- package/dist/component/{text-area-field-rac-DqlOkm7e.js → text-area-field-rac-C8fP1g-w.js} +31 -32
- package/dist/component/{text-area-rac-DPdkrFcH.js → text-area-rac-B6yZxzxm.js} +1 -1
- package/dist/component/{text-input-field-rac-CmXm6r1w.js → text-input-field-rac-CNjbOxD1.js} +5 -5
- package/dist/component/{text-input-headless-DD__2DFf.js → text-input-headless-Bm8PJGep.js} +12 -12
- package/dist/component/{text-input-rac-DRHyQEH7.js → text-input-rac-BEPC1Z-4.js} +1 -1
- package/dist/component/{time-input-rac-BJPIymQY.js → time-input-rac-3m6C_Jp5.js} +41 -42
- package/dist/component/url-input-field-rac-CIk_6Lf6.js +74 -0
- package/dist/component/{url-input-rac-C0ChQUzq.js → url-input-rac-DyVoygXH.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-McG3ayOT.js +21 -0
- package/dist/component/{use-element-state-class-name-BatTc2bw.js → use-element-state-class-name-B9MBWX44.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-B0jiPTmS.js → use-is-forced-open-dropdown-r5G_sZsO.js} +7 -7
- package/dist/component/{use-service-options-base-oeE7xszw.js → use-service-options-base-hcbkvhpw.js} +7 -7
- package/dist/component/use-text-input-class-name-SnurFqAr.js +23 -0
- package/dist/form.d.ts +3 -1
- package/package.json +2 -2
- package/dist/component/form-element-classes-bLFmhsKw.js +0 -137
- package/dist/component/header-field-rac-DamDk5BR.js +0 -25
- package/dist/component/number-input-field-rac-BuYUzDWV.js +0 -93
- package/dist/component/rich-text-field-rac-C_qE7Ykg.js +0 -22
- package/dist/component/url-input-field-rac-CFDYkZ6I.js +0 -75
- package/dist/component/use-dropdown-option-class-name-3L5ZmNLK.js +0 -21
- package/dist/component/use-text-input-class-name-LQ5S-NLh.js +0 -24
package/dist/component/{checkbox-group-field-rac-DrDTgHMg.js → checkbox-group-field-rac-DTcZcVS6.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
2
|
import a from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { C as t } from "./checkbox-group-field-headless-
|
|
4
|
+
import { C as t } from "./checkbox-group-field-headless-BsOww_QB.js";
|
|
5
5
|
import { E as n } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { C as c } from "./checkbox-indicator-module-classes-BpeSpGsW.js";
|
|
7
7
|
import { s } from "./field-rac.module-B4l_0KRU.js";
|
|
8
|
-
import {
|
|
8
|
+
import { H as i, T as p, i as E, k as C, u as O, p as _, j as I } from "./form-0jt4L5xo.js";
|
|
9
9
|
import { o as l } from "./options-rac.module-CTDdATiz.js";
|
|
10
|
-
import { u as L } from "./use-element-state-class-name-
|
|
11
|
-
import { u as R } from "./use-text-input-class-name-
|
|
10
|
+
import { u as L } from "./use-element-state-class-name-B9MBWX44.js";
|
|
11
|
+
import { u as R } from "./use-text-input-class-name-SnurFqAr.js";
|
|
12
12
|
const u = ({ content: o, locale: r }) => /* @__PURE__ */ e.createElement(m, {
|
|
13
13
|
content: o,
|
|
14
14
|
locale: r
|
|
@@ -22,9 +22,9 @@ const u = ({ content: o, locale: r }) => /* @__PURE__ */ e.createElement(m, {
|
|
|
22
22
|
}, /* @__PURE__ */ e.createElement(t.Label, {
|
|
23
23
|
className: a(i, s.label)
|
|
24
24
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
25
|
-
className: a(
|
|
25
|
+
className: a(p, s.requiredMark)
|
|
26
26
|
})), /* @__PURE__ */ e.createElement(t.Options, {
|
|
27
|
-
className: a(
|
|
27
|
+
className: a(E, l.options)
|
|
28
28
|
}, /* @__PURE__ */ e.createElement(t.Options.Option, null, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox, {
|
|
29
29
|
className: s.checkbox
|
|
30
30
|
}, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Input, {
|
package/dist/component/{date-input-field-rac-aY2zuuKs.js → date-input-field-rac-mdhEC3oq.js}
RENAMED
|
@@ -1,38 +1,37 @@
|
|
|
1
1
|
import { RicosViewer as ee } from "@wix/ricos/viewer";
|
|
2
2
|
import b from "classnames";
|
|
3
|
-
import t, { useMemo as
|
|
3
|
+
import t, { useMemo as y, useState as x, useCallback as v, useRef as k } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as te } from "react-aria";
|
|
5
|
-
import { ListBoxItem as ae, ListBox as ne, Select as re, TextField as U, SelectValue as se, Input as
|
|
6
|
-
import {
|
|
7
|
-
import { f as u, a as
|
|
8
|
-
import { g as
|
|
9
|
-
import { D as
|
|
10
|
-
import { L as
|
|
11
|
-
import { F as
|
|
12
|
-
import { N as
|
|
13
|
-
import { u as
|
|
14
|
-
import { C as
|
|
15
|
-
import { E as
|
|
16
|
-
import { H as
|
|
5
|
+
import { ListBoxItem as ae, ListBox as ne, Select as re, TextField as U, SelectValue as se, Input as q } from "react-aria-components";
|
|
6
|
+
import { b5 as I, b2 as $, aZ as w, aC as z, aP as G, aq as d, bf as P, ax as oe, aD as le, aW as ce, b7 as H, H as S, T as ie, t as de, J as me, u as ue, p as pe } from "./form-0jt4L5xo.js";
|
|
7
|
+
import { f as u, a as B } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { g as Ee } from "./helpers-HmkkXrh2.js";
|
|
9
|
+
import { D as fe, E as be } from "./field-error-headless-tsg9FQ-_.js";
|
|
10
|
+
import { L as he } from "./field-label-headless-CB8dEat8.js";
|
|
11
|
+
import { F as De } from "./fieldset-headless-CD3fds9J.js";
|
|
12
|
+
import { N as Ie, S as Oe } from "./non-modal-popover-DtIMXHbe.js";
|
|
13
|
+
import { u as ge } from "./use-is-forced-open-dropdown-r5G_sZsO.js";
|
|
14
|
+
import { C as ye } from "./chevron-down-icon-CcpVm6B-.js";
|
|
15
|
+
import { E as Ne } from "./error-icon-hZxQ6DEy.js";
|
|
16
|
+
import { H as _e } from "./custom-focus-class-_483Pkwp.js";
|
|
17
17
|
import { s as E } from "./field-rac.module-B4l_0KRU.js";
|
|
18
|
-
import {
|
|
19
|
-
import { u as
|
|
20
|
-
import { u as x } from "./use-text-input-class-name-LQ5S-NLh.js";
|
|
18
|
+
import { u as Le } from "./use-dropdown-option-class-name-McG3ayOT.js";
|
|
19
|
+
import { u as j } from "./use-text-input-class-name-SnurFqAr.js";
|
|
21
20
|
const n = ({ children: e, className: a }) => {
|
|
22
|
-
const { id: r, required: o, onBlur: s, onFocus: l, FieldLayout: c } =
|
|
21
|
+
const { id: r, required: o, onBlur: s, onFocus: l, FieldLayout: c } = I(), { inputId: m, labelId: i, ariaDescribedBy: f } = $(), { regionalFormat: p } = w(), h = y(() => z(p).filter(G).map((Y) => Y.toUpperCase()), [
|
|
23
22
|
p
|
|
24
23
|
]), _ = u(e, n.Label), T = u(e, n.Description), L = u(e, n.Error), F = {
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
24
|
+
[d.MONTH]: u(e, n.Month),
|
|
25
|
+
[d.DAY]: u(e, n.Day),
|
|
26
|
+
[d.YEAR]: u(e, n.Year)
|
|
28
27
|
};
|
|
29
28
|
return /* @__PURE__ */ t.createElement(c, {
|
|
30
29
|
fieldId: r,
|
|
31
|
-
renderLabel: () =>
|
|
30
|
+
renderLabel: () => B(_, {
|
|
32
31
|
as: "div"
|
|
33
32
|
}),
|
|
34
|
-
renderInput: () => /* @__PURE__ */ t.createElement(
|
|
35
|
-
id:
|
|
33
|
+
renderInput: () => /* @__PURE__ */ t.createElement(De, {
|
|
34
|
+
id: m,
|
|
36
35
|
ariaLabelledBy: i,
|
|
37
36
|
ariaDescribedBy: f,
|
|
38
37
|
required: o,
|
|
@@ -43,20 +42,20 @@ const n = ({ children: e, className: a }) => {
|
|
|
43
42
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, L, T)
|
|
44
43
|
});
|
|
45
44
|
}, O = ({ children: e, className: a }) => {
|
|
46
|
-
const { id: r, disabled: o, readOnly: s, showDateLabels: l, hidePlaceholder: c } =
|
|
45
|
+
const { id: r, disabled: o, readOnly: s, showDateLabels: l, hidePlaceholder: c } = I(), { labelId: m } = g(d.MONTH), { partValue: i, partError: f, onPartChange: p } = N(d.MONTH), { t: h } = P(), [_, T] = x(!1), L = ge(r), [F, Y] = x(null), W = c ? void 0 : h("field.date.placeholder.month"), J = v((M) => {
|
|
47
46
|
s || p(typeof M == "string" ? M : "");
|
|
48
47
|
}, [
|
|
49
48
|
p,
|
|
50
49
|
s
|
|
51
|
-
]),
|
|
50
|
+
]), K = v((M) => {
|
|
52
51
|
T(M && !s);
|
|
53
52
|
}, [
|
|
54
53
|
s
|
|
55
|
-
]),
|
|
54
|
+
]), Q = u(e, O.Label), Z = u(e, O.Trigger), X = u(e, O.Options);
|
|
56
55
|
return /* @__PURE__ */ t.createElement("div", {
|
|
57
56
|
className: a,
|
|
58
57
|
"data-date-field": !0
|
|
59
|
-
}, l ?
|
|
58
|
+
}, l ? Q : null, /* @__PURE__ */ t.createElement("div", {
|
|
60
59
|
ref: Y,
|
|
61
60
|
style: {
|
|
62
61
|
display: "contents"
|
|
@@ -64,47 +63,47 @@ const n = ({ children: e, className: a }) => {
|
|
|
64
63
|
}), /* @__PURE__ */ t.createElement(te, {
|
|
65
64
|
getContainer: () => F
|
|
66
65
|
}, /* @__PURE__ */ t.createElement(re, {
|
|
67
|
-
"aria-labelledby": l ?
|
|
66
|
+
"aria-labelledby": l ? m : void 0,
|
|
68
67
|
value: i || null,
|
|
69
68
|
onChange: J,
|
|
70
69
|
isDisabled: o,
|
|
71
70
|
isInvalid: f,
|
|
72
|
-
placeholder:
|
|
71
|
+
placeholder: W,
|
|
73
72
|
isOpen: L || _,
|
|
74
|
-
onOpenChange: L ? void 0 :
|
|
75
|
-
},
|
|
73
|
+
onOpenChange: L ? void 0 : K
|
|
74
|
+
}, Z, B(X, {
|
|
76
75
|
isForcedOpen: L
|
|
77
76
|
}))));
|
|
78
77
|
}, Fe = ({ className: e }) => /* @__PURE__ */ t.createElement(V, {
|
|
79
|
-
datePart:
|
|
78
|
+
datePart: d.MONTH,
|
|
80
79
|
className: e
|
|
81
80
|
}), Ce = ({ children: e, className: a }) => {
|
|
82
|
-
const { id: r, readOnly: o } =
|
|
83
|
-
return
|
|
81
|
+
const { id: r, readOnly: o } = I(), { inputId: s } = g(d.MONTH), { partError: l, isFirstPart: c } = N(d.MONTH), m = k(null);
|
|
82
|
+
return H(() => {
|
|
84
83
|
var i;
|
|
85
|
-
c && ((i =
|
|
86
|
-
}, r), /* @__PURE__ */ t.createElement(
|
|
87
|
-
ref:
|
|
84
|
+
c && ((i = m.current) == null || i.focus());
|
|
85
|
+
}, r), /* @__PURE__ */ t.createElement(Oe, {
|
|
86
|
+
ref: m,
|
|
88
87
|
id: s,
|
|
89
88
|
className: a,
|
|
90
|
-
"data-hook":
|
|
89
|
+
"data-hook": d.MONTH,
|
|
91
90
|
"data-invalid": l || void 0,
|
|
92
91
|
"data-readonly": o || void 0
|
|
93
92
|
}, /* @__PURE__ */ t.createElement(se, null), e);
|
|
94
93
|
}, A = ({ children: e, className: a, ...r }) => {
|
|
95
|
-
const { isForcedOpen: o } = r, { language: s } = w(), l =
|
|
94
|
+
const { isForcedOpen: o } = r, { language: s } = w(), l = y(() => Ee(s), [
|
|
96
95
|
s
|
|
97
96
|
]), c = u(e, A.Option) ?? /* @__PURE__ */ t.createElement(A.Option, null);
|
|
98
|
-
return /* @__PURE__ */ t.createElement(
|
|
97
|
+
return /* @__PURE__ */ t.createElement(Ie, {
|
|
99
98
|
className: a,
|
|
100
99
|
containerPadding: 0,
|
|
101
100
|
offset: 0
|
|
102
101
|
}, /* @__PURE__ */ t.createElement(ne, {
|
|
103
102
|
autoFocus: o ? !1 : void 0
|
|
104
|
-
}, l.map((
|
|
103
|
+
}, l.map((m, i) => B(c, {
|
|
105
104
|
key: String(i + 1),
|
|
106
105
|
value: String(i + 1),
|
|
107
|
-
label:
|
|
106
|
+
label: m
|
|
108
107
|
}))));
|
|
109
108
|
}, Re = ({ className: e, ...a }) => {
|
|
110
109
|
const { value: r, label: o } = a;
|
|
@@ -119,7 +118,7 @@ O.Trigger = Ce;
|
|
|
119
118
|
O.Options = A;
|
|
120
119
|
A.Option = Re;
|
|
121
120
|
const C = ({ children: e, className: a }) => {
|
|
122
|
-
const { disabled: r, readOnly: o, showDateLabels: s } =
|
|
121
|
+
const { disabled: r, readOnly: o, showDateLabels: s } = I(), { labelId: l } = g(d.DAY), { partValue: c, partError: m, onPartChange: i } = N(d.DAY), f = u(e, C.Label), p = u(e, C.Input);
|
|
123
122
|
return /* @__PURE__ */ t.createElement("div", {
|
|
124
123
|
className: a,
|
|
125
124
|
"data-date-field": !0
|
|
@@ -129,30 +128,30 @@ const C = ({ children: e, className: a }) => {
|
|
|
129
128
|
onChange: i,
|
|
130
129
|
isDisabled: r,
|
|
131
130
|
isReadOnly: o,
|
|
132
|
-
isInvalid:
|
|
131
|
+
isInvalid: m
|
|
133
132
|
}, p));
|
|
134
133
|
}, Me = ({ className: e }) => /* @__PURE__ */ t.createElement(V, {
|
|
135
|
-
datePart:
|
|
134
|
+
datePart: d.DAY,
|
|
136
135
|
className: e
|
|
137
136
|
}), Se = ({ className: e }) => {
|
|
138
|
-
const { id: a, hidePlaceholder: r } =
|
|
139
|
-
return
|
|
137
|
+
const { id: a, hidePlaceholder: r } = I(), { inputId: o } = g(d.DAY), { isFirstPart: s } = N(d.DAY), { t: l } = P(), c = k(null), m = r ? void 0 : l("field.date.placeholder.day");
|
|
138
|
+
return H(() => {
|
|
140
139
|
var i;
|
|
141
140
|
s && ((i = c.current) == null || i.focus());
|
|
142
|
-
}, a), /* @__PURE__ */ t.createElement(
|
|
141
|
+
}, a), /* @__PURE__ */ t.createElement(q, {
|
|
143
142
|
ref: c,
|
|
144
143
|
id: o,
|
|
145
144
|
className: e,
|
|
146
|
-
placeholder:
|
|
145
|
+
placeholder: m,
|
|
147
146
|
maxLength: 2,
|
|
148
147
|
inputMode: "numeric",
|
|
149
|
-
"data-hook":
|
|
148
|
+
"data-hook": d.DAY
|
|
150
149
|
});
|
|
151
150
|
};
|
|
152
151
|
C.Label = Me;
|
|
153
152
|
C.Input = Se;
|
|
154
153
|
const R = ({ children: e, className: a }) => {
|
|
155
|
-
const { disabled: r, readOnly: o, showDateLabels: s } =
|
|
154
|
+
const { disabled: r, readOnly: o, showDateLabels: s } = I(), { labelId: l } = g(d.YEAR), { partValue: c, partError: m, onPartChange: i } = N(d.YEAR), f = u(e, R.Label), p = u(e, R.Input);
|
|
156
155
|
return /* @__PURE__ */ t.createElement("div", {
|
|
157
156
|
className: a,
|
|
158
157
|
"data-date-field": !0
|
|
@@ -162,37 +161,37 @@ const R = ({ children: e, className: a }) => {
|
|
|
162
161
|
onChange: i,
|
|
163
162
|
isDisabled: r,
|
|
164
163
|
isReadOnly: o,
|
|
165
|
-
isInvalid:
|
|
164
|
+
isInvalid: m
|
|
166
165
|
}, p));
|
|
167
166
|
}, Ae = ({ className: e }) => /* @__PURE__ */ t.createElement(V, {
|
|
168
|
-
datePart:
|
|
167
|
+
datePart: d.YEAR,
|
|
169
168
|
className: e
|
|
170
169
|
}), Pe = ({ className: e }) => {
|
|
171
|
-
const { id: a, hidePlaceholder: r } =
|
|
172
|
-
return
|
|
170
|
+
const { id: a, hidePlaceholder: r } = I(), { inputId: o } = g(d.YEAR), { isFirstPart: s } = N(d.YEAR), { t: l } = P(), c = k(null), m = r ? void 0 : l("field.date.placeholder.year");
|
|
171
|
+
return H(() => {
|
|
173
172
|
var i;
|
|
174
173
|
s && ((i = c.current) == null || i.focus());
|
|
175
|
-
}, a), /* @__PURE__ */ t.createElement(
|
|
174
|
+
}, a), /* @__PURE__ */ t.createElement(q, {
|
|
176
175
|
ref: c,
|
|
177
176
|
id: o,
|
|
178
177
|
className: e,
|
|
179
|
-
placeholder:
|
|
178
|
+
placeholder: m,
|
|
180
179
|
maxLength: 4,
|
|
181
180
|
inputMode: "numeric",
|
|
182
|
-
"data-hook":
|
|
181
|
+
"data-hook": d.YEAR
|
|
183
182
|
});
|
|
184
183
|
};
|
|
185
184
|
R.Label = Ae;
|
|
186
185
|
R.Input = Pe;
|
|
187
|
-
n.Label =
|
|
186
|
+
n.Label = he;
|
|
188
187
|
n.Month = O;
|
|
189
188
|
n.Day = C;
|
|
190
189
|
n.Year = R;
|
|
191
|
-
n.Description =
|
|
192
|
-
n.Error =
|
|
193
|
-
function
|
|
194
|
-
const { inputId: a } =
|
|
195
|
-
return
|
|
190
|
+
n.Description = fe;
|
|
191
|
+
n.Error = be;
|
|
192
|
+
function g(e) {
|
|
193
|
+
const { inputId: a } = $();
|
|
194
|
+
return y(() => {
|
|
196
195
|
const r = e.toLowerCase();
|
|
197
196
|
return {
|
|
198
197
|
inputId: `${a}-${r}-input`,
|
|
@@ -204,87 +203,87 @@ function y(e) {
|
|
|
204
203
|
]);
|
|
205
204
|
}
|
|
206
205
|
function N(e) {
|
|
207
|
-
const { value: a, onChange: r, hasError: o = !1 } =
|
|
206
|
+
const { value: a, onChange: r, hasError: o = !1 } = I(), { regionalFormat: s } = w(), l = y(() => oe(a ?? ""), [
|
|
208
207
|
a
|
|
209
|
-
]), c =
|
|
208
|
+
]), c = y(() => le(o, a ?? ""), [
|
|
210
209
|
a,
|
|
211
210
|
o
|
|
212
|
-
]),
|
|
211
|
+
]), m = l[e] || "", i = v((p) => {
|
|
213
212
|
const h = ce(p, e, l);
|
|
214
213
|
r(h);
|
|
215
214
|
}, [
|
|
216
215
|
r,
|
|
217
216
|
l,
|
|
218
217
|
e
|
|
219
|
-
]), f =
|
|
218
|
+
]), f = y(() => z(s).filter(G).map((_) => _.toUpperCase())[0] === e, [
|
|
220
219
|
s,
|
|
221
220
|
e
|
|
222
221
|
]);
|
|
223
222
|
return {
|
|
224
|
-
partValue:
|
|
223
|
+
partValue: m,
|
|
225
224
|
partError: c[e],
|
|
226
225
|
onPartChange: i,
|
|
227
226
|
isFirstPart: f
|
|
228
227
|
};
|
|
229
228
|
}
|
|
230
229
|
function V({ datePart: e, className: a }) {
|
|
231
|
-
const { inputId: r, labelId: o } =
|
|
230
|
+
const { inputId: r, labelId: o } = g(e), { t: s } = P(), l = `field.date.label.${e.toLowerCase()}`, c = s(l);
|
|
232
231
|
return /* @__PURE__ */ t.createElement("label", {
|
|
233
232
|
id: o,
|
|
234
233
|
htmlFor: r,
|
|
235
234
|
className: a
|
|
236
235
|
}, c);
|
|
237
236
|
}
|
|
238
|
-
const Te = "_fields_bc5kj_1", Ye = "_month_bc5kj_11", ve = "_day_bc5kj_12", ke = "_year_bc5kj_13", we = "_dayInput_bc5kj_35",
|
|
237
|
+
const Te = "_fields_bc5kj_1", Ye = "_month_bc5kj_11", ve = "_day_bc5kj_12", ke = "_year_bc5kj_13", we = "_dayInput_bc5kj_35", He = "_yearInput_bc5kj_36", Be = "_monthTrigger_bc5kj_40", Ve = "_monthOption_bc5kj_60", D = {
|
|
239
238
|
fields: Te,
|
|
240
239
|
month: Ye,
|
|
241
240
|
day: ve,
|
|
242
241
|
year: ke,
|
|
243
242
|
dayInput: we,
|
|
244
|
-
yearInput:
|
|
245
|
-
monthTrigger:
|
|
243
|
+
yearInput: He,
|
|
244
|
+
monthTrigger: Be,
|
|
246
245
|
monthOption: Ve
|
|
247
|
-
},
|
|
246
|
+
}, xe = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ee, {
|
|
248
247
|
content: e,
|
|
249
248
|
locale: a
|
|
250
|
-
}),
|
|
251
|
-
const e = Le(
|
|
249
|
+
}), lt = () => {
|
|
250
|
+
const e = Le(D.monthOption, _e), a = j(D.dayInput), r = j(D.yearInput);
|
|
252
251
|
return /* @__PURE__ */ t.createElement(n, {
|
|
253
|
-
className:
|
|
252
|
+
className: D.fields
|
|
254
253
|
}, /* @__PURE__ */ t.createElement(n.Label, {
|
|
255
254
|
className: b(S, E.label)
|
|
256
255
|
}, /* @__PURE__ */ t.createElement(n.Label.Required, {
|
|
257
|
-
className: b(
|
|
256
|
+
className: b(ie, E.requiredMark)
|
|
258
257
|
})), /* @__PURE__ */ t.createElement(n.Month, {
|
|
259
|
-
className:
|
|
258
|
+
className: D.month
|
|
260
259
|
}, /* @__PURE__ */ t.createElement(n.Month.Label, {
|
|
261
260
|
className: b(S, E.label)
|
|
262
261
|
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
263
|
-
className: b(
|
|
264
|
-
}, /* @__PURE__ */ t.createElement(
|
|
262
|
+
className: b(de, E.input, D.monthTrigger)
|
|
263
|
+
}, /* @__PURE__ */ t.createElement(ye, {
|
|
265
264
|
className: E.dropdownIcon
|
|
266
265
|
})), /* @__PURE__ */ t.createElement(n.Month.Options, {
|
|
267
|
-
className: b(
|
|
266
|
+
className: b(me, E.selectPopover, E.dropdownPopover)
|
|
268
267
|
}, /* @__PURE__ */ t.createElement(n.Month.Options.Option, {
|
|
269
268
|
className: e
|
|
270
269
|
}))), /* @__PURE__ */ t.createElement(n.Day, {
|
|
271
|
-
className:
|
|
270
|
+
className: D.day
|
|
272
271
|
}, /* @__PURE__ */ t.createElement(n.Day.Label, {
|
|
273
272
|
className: b(S, E.label)
|
|
274
273
|
}), /* @__PURE__ */ t.createElement(n.Day.Input, {
|
|
275
274
|
className: a
|
|
276
275
|
})), /* @__PURE__ */ t.createElement(n.Year, {
|
|
277
|
-
className:
|
|
276
|
+
className: D.year
|
|
278
277
|
}, /* @__PURE__ */ t.createElement(n.Year.Label, {
|
|
279
278
|
className: b(S, E.label)
|
|
280
279
|
}), /* @__PURE__ */ t.createElement(n.Year.Input, {
|
|
281
280
|
className: r
|
|
282
281
|
})), /* @__PURE__ */ t.createElement(n.Error, {
|
|
283
|
-
className: b(
|
|
284
|
-
}, /* @__PURE__ */ t.createElement(
|
|
285
|
-
className: b(
|
|
286
|
-
},
|
|
282
|
+
className: b(ue, E.error)
|
|
283
|
+
}, /* @__PURE__ */ t.createElement(Ne, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
284
|
+
className: b(pe, E.description)
|
|
285
|
+
}, xe));
|
|
287
286
|
};
|
|
288
287
|
export {
|
|
289
|
-
|
|
288
|
+
lt as D
|
|
290
289
|
};
|