@wix/form-elements 1.108.0 → 1.109.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-ZAp8oWbK.js → appointment-rac-C9-XwsPI.js} +60 -60
- package/dist/component/{bookings-address-rac-x-Az7vHf.js → bookings-address-rac-jrrCPWjw.js} +1 -1
- package/dist/component/{bookings-email-rac-MoF_CaqB.js → bookings-email-rac-J9-RMEbf.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CWh3Rb0M.js → bookings-first-name-rac-CH7-6JmA.js} +1 -1
- package/dist/component/{bookings-header-rac-BVTiXUWk.js → bookings-header-rac-C2JV-ciN.js} +1 -1
- package/dist/component/{bookings-last-name-rac-kXRRlyHl.js → bookings-last-name-rac-0a9CwiaV.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-C4Zr6kXE.js → bookings-login-bar-rac-4Mb7MQYe.js} +3 -3
- package/dist/component/{bookings-phone-rac-2rz1m_xi.js → bookings-phone-rac-vYx5r5jn.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BEjGypQw.js → bookings-rich-text-rac-CWg1FgUp.js} +1 -1
- package/dist/component/{checkbox-field-rac-DwEQLIaz.js → checkbox-field-rac-Dwx1leKA.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-BsOww_QB.js → checkbox-group-field-headless-AFWgXzx_.js} +8 -8
- package/dist/component/{checkbox-group-field-rac-DTcZcVS6.js → checkbox-group-field-rac-CO8kmWJp.js} +4 -4
- package/dist/component/{checkbox-group-rac-DQsML-pW.js → checkbox-group-rac-_79HsFF4.js} +1 -1
- package/dist/component/{checkbox-rac-irEBBOxP.js → checkbox-rac-B_tbMfjo.js} +1 -1
- package/dist/component/{contacts-address-rac-B5bSAYrm.js → contacts-address-rac-SJ5Tvzd0.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DyScj8f4.js → contacts-birthdate-rac-BU1L3sbW.js} +1 -1
- package/dist/component/{contacts-company-rac-C5X9-jXa.js → contacts-company-rac-Y4B8KhDa.js} +1 -1
- package/dist/component/{contacts-email-rac-B0vkfmrS.js → contacts-email-rac-CQW84o7C.js} +1 -1
- package/dist/component/{contacts-first-name-rac-Cfil3U_e.js → contacts-first-name-rac-Dtai-wtH.js} +1 -1
- package/dist/component/{contacts-last-name-rac-CtPLE-7-.js → contacts-last-name-rac--ixuu3ri.js} +1 -1
- package/dist/component/{contacts-phone-rac-YkzsAoBZ.js → contacts-phone-rac-HOHfSvT-.js} +1 -1
- package/dist/component/{contacts-position-rac-BS4j8QC-.js → contacts-position-rac-BPMkh6yf.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-z_9VsEZL.js → contacts-subscribe-rac-D0_RMwJb.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-WFkmKyZv.js → contacts-tax-id-rac-CZJmMiVf.js} +1 -1
- package/dist/component/{date-availability-NN3rxosk.js → date-availability-C4dDHvuc.js} +1 -1
- package/dist/component/{date-input-field-rac-mdhEC3oq.js → date-input-field-rac-8oERZcqh.js} +64 -64
- package/dist/component/{date-input-rac-CGciuoTx.js → date-input-rac-CYRojmW6.js} +1 -1
- package/dist/component/{date-picker-field-rac-CRZVODfF.js → date-picker-field-rac-CIspU7No.js} +31 -31
- package/dist/component/{date-picker-rac-Bfbvjy8W.js → date-picker-rac-D0Y0zf2J.js} +1 -1
- package/dist/component/{date-time-input-field-rac-TDWBXZ44.js → date-time-input-field-rac-0daWK65I.js} +70 -70
- package/dist/component/{date-time-input-rac-DY0qdSix.js → date-time-input-rac-BemKPk1j.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BFGM7SOt.js → dext-checkbox-group-rac-BpFNn56W.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DPZvTeUZ.js → dext-checkbox-rac-DOISgubJ.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Xd5kojsQ.js → dext-date-picker-rac-CNGhFg_g.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-C0RIdxJW.js → dext-date-time-input-rac-BuUIvJRr.js} +1 -1
- package/dist/component/{dext-dropdown-rac-D1m8vJvm.js → dext-dropdown-rac-DtND-Dbo.js} +1 -1
- package/dist/component/{dext-email-rac-BC81RFYY.js → dext-email-rac-CmjLFOi8.js} +1 -1
- package/dist/component/{dext-number-input-rac-Z_ih9FfX.js → dext-number-input-rac-DHTNg1dh.js} +1 -1
- package/dist/component/{dext-phone-rac-s3BOnXuI.js → dext-phone-rac-BrrU5qH_.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CL3jcezs.js → dext-radio-group-rac-CD3MGfAM.js} +4 -4
- package/dist/component/{dext-rating-input-rac-wz1EyP5b.js → dext-rating-input-rac-BETGJZmt.js} +1 -1
- package/dist/component/{dext-tags-rac-BY4Rf2BP.js → dext-tags-rac-Coo9jN-T.js} +4 -4
- package/dist/component/{dext-text-area-rac-DRJzlsq8.js → dext-text-area-rac-CNWjqhUT.js} +1 -1
- package/dist/component/{dext-text-input-rac-BGcRNNAi.js → dext-text-input-rac-CCWyDexv.js} +1 -1
- package/dist/component/{dext-url-input-rac-CRAIm8yp.js → dext-url-input-rac-Dtakkgmk.js} +1 -1
- package/dist/component/{donation-rac-BlTfOIlE.js → donation-rac-BboGm_k_.js} +74 -74
- package/dist/component/{dropdown-field-headless-DhzRAMcM.js → dropdown-field-headless-BTMJGUwY.js} +10 -10
- package/dist/component/{dropdown-field-rac-DXyY5we-.js → dropdown-field-rac-CDRV8ckB.js} +3 -3
- package/dist/component/{dropdown-rac-C6YM6qxm.js → dropdown-rac-kEuU2pXW.js} +1 -1
- package/dist/component/{ecom-address-rac-CAdr7wya.js → ecom-address-rac-BgKL9ElH.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-Z2VMuCbt.js → ecom-subscription-checkbox-rac-CDhJsNPD.js} +2 -2
- package/dist/component/{email-input-field-rac-DpkfunVK.js → email-input-field-rac-DdOd86NX.js} +47 -47
- package/dist/component/{events-repeater-rac-CuJkdrPo.js → events-repeater-rac-_VJ30dpB.js} +8 -8
- package/dist/component/{events-rsvp-rac-BKWlSeQ9.js → events-rsvp-rac-DA-261bq.js} +10 -10
- package/dist/component/{field-error-headless-tsg9FQ-_.js → field-error-headless-CovyN0GI.js} +11 -11
- package/dist/component/{field-label-headless-CB8dEat8.js → field-label-headless-DVvX2QaH.js} +4 -4
- package/dist/component/file-upload-rac-bhEPUJPs.js +561 -0
- package/dist/component/{fixed-payment-rac-CuIQEeHh.js → fixed-payment-rac-DmI6MeKc.js} +15 -15
- package/dist/component/{form-0jt4L5xo.js → form-BTDgyr54.js} +950 -913
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +3 -3
- package/dist/component/{header-field-rac-CWVGzxKb.js → header-field-rac-C0rUjmo0.js} +4 -4
- package/dist/component/{header-rac-D6KsV-ko.js → header-rac-DRMO22PV.js} +1 -1
- package/dist/component/{image-choice-rac-CUCyVS8c.js → image-choice-rac-CQDQ7AlD.js} +9 -9
- package/dist/component/{index-iOqQidgV.js → index-B9QlosT1.js} +2 -2
- package/dist/component/{index-TJSnVtCO.js → index-CNWT9t6j.js} +43 -43
- package/dist/component/{isObjectLike-DQbx8r1c.js → isObjectLike-c0td2WCR.js} +1 -1
- package/dist/component/{multiline-address-field-rac-DtZ1NTfD.js → multiline-address-field-rac-D8bVxRsD.js} +78 -78
- package/dist/component/{multiline-address-rac-ub-_XzHU.js → multiline-address-rac-g-6RB7o8.js} +1 -1
- package/dist/component/{number-input-field-rac-DLItn4DK.js → number-input-field-rac-BaOwQ5Ya.js} +13 -13
- package/dist/component/{number-input-rac-UuxJzqEx.js → number-input-rac-BXv8-Pnj.js} +1 -1
- package/dist/component/{password-rac-Di6q96Rn.js → password-rac-BB9XeSSZ.js} +15 -15
- package/dist/component/{payment-input-rac-CG6c4-Ge.js → payment-input-rac-DwnSV9rM.js} +44 -44
- package/dist/component/{phone-input-field-rac-D4JphCuT.js → phone-input-field-rac-CC3C4ToW.js} +50 -50
- package/dist/component/{phone-rac-_vDw2usa.js → phone-rac-DpNhSaE0.js} +1 -1
- package/dist/component/{product-list-rac-CgxRlj1f.js → product-list-rac-BAESk3B6.js} +50 -50
- package/dist/component/{quiz-radio-group-rac-bi26aGxN.js → quiz-radio-group-rac-PS6AZr63.js} +1 -1
- package/dist/component/{radio-button-module-classes-DDJq2ESf.js → radio-button-module-classes-CXcn5unY.js} +14 -14
- package/dist/component/{radio-group-field-rac-D1aMVO6l.js → radio-group-field-rac-pt8xbDfS.js} +6 -6
- package/dist/component/{radio-group-rac-HKC85M6t.js → radio-group-rac-DkzkM6N_.js} +1 -1
- package/dist/component/{rating-input-field-rac-CpRehxFB.js → rating-input-field-rac-DDHBkR4x.js} +20 -20
- package/dist/component/{rating-input-rac-BMuCZ3oj.js → rating-input-rac-CcsDmLus.js} +1 -1
- package/dist/component/{rich-content-rac.module-mZ6xoAOd.js → rich-content-rac.module-B2vsO6fj.js} +1 -1
- package/dist/component/{rich-text-field-rac-CUK8V8Kf.js → rich-text-field-rac-CvKht2eC.js} +4 -4
- package/dist/component/{rich-text-rac-B-7sR2FJ.js → rich-text-rac-CRpSffQB.js} +1 -1
- package/dist/component/{service-dropdown-rac-1DDNT5bn.js → service-dropdown-rac-BOpdXNjG.js} +33 -33
- package/dist/component/{services-multi-choice-rac-CB-6dwxz.js → services-multi-choice-rac-t0wdSt_T.js} +13 -13
- package/dist/component/{signature-rac-7XBci6P2.js → signature-rac-2LsIYYIX.js} +133 -133
- package/dist/component/{submit-button-rac-B1-Mk8Gg.js → submit-button-rac-BbE8dS35.js} +17 -17
- package/dist/component/{tags-field-rac-CQ9Y7mq-.js → tags-field-rac-BnsBxReU.js} +32 -32
- package/dist/component/{tags-rac-Visic-Ml.js → tags-rac-BFH4RINA.js} +1 -1
- package/dist/component/{text-area-field-rac-C8fP1g-w.js → text-area-field-rac-Ag7_gniM.js} +14 -14
- package/dist/component/{text-area-rac-B6yZxzxm.js → text-area-rac-ByUX0p2O.js} +1 -1
- package/dist/component/{text-input-field-rac-CNjbOxD1.js → text-input-field-rac-D3MZ8teu.js} +5 -5
- package/dist/component/{text-input-headless-Bm8PJGep.js → text-input-headless-CwONErsY.js} +3 -3
- package/dist/component/{text-input-rac-BEPC1Z-4.js → text-input-rac-DLXdAhkK.js} +1 -1
- package/dist/component/{time-input-rac-3m6C_Jp5.js → time-input-rac-Bs55lTON.js} +27 -27
- package/dist/component/{url-input-field-rac-CIk_6Lf6.js → url-input-field-rac-FG-bCh-E.js} +19 -19
- package/dist/component/{url-input-rac-DyVoygXH.js → url-input-rac-BOKuCMTe.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-McG3ayOT.js → use-dropdown-option-class-name-DjV7FW5y.js} +2 -2
- package/dist/component/{use-element-state-class-name-B9MBWX44.js → use-element-state-class-name-DB1AzkvF.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-r5G_sZsO.js → use-is-forced-open-dropdown-ifUIpuwL.js} +8 -8
- package/dist/component/{use-service-options-base-hcbkvhpw.js → use-service-options-base-B11cq0HH.js} +1 -1
- package/dist/component/{use-text-input-class-name-SnurFqAr.js → use-text-input-class-name-va1PzWFg.js} +2 -2
- package/dist/form.d.ts +18 -0
- package/package.json +2 -2
- package/dist/component/file-upload-rac-ZdgYt646.js +0 -483
package/dist/component/{date-input-field-rac-mdhEC3oq.js → date-input-field-rac-8oERZcqh.js}
RENAMED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { RicosViewer as ee } from "@wix/ricos/viewer";
|
|
2
|
-
import
|
|
3
|
-
import t, { useMemo as y, useState as
|
|
2
|
+
import f from "classnames";
|
|
3
|
+
import t, { useMemo as y, useState as j, 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
|
|
5
|
+
import { ListBoxItem as ae, ListBox as ne, Select as re, TextField as U, SelectValue as se, Input as $ } from "react-aria-components";
|
|
6
|
+
import { b9 as D, b6 as q, b1 as w, aG as z, aT as G, au as d, bj as P, aB as oe, aH as le, a_ as ce, bb as B, I as S, U as ie, t as de, K as me, v as ue, p as pe } from "./form-BTDgyr54.js";
|
|
7
|
+
import { f as u, a as H } from "./find-child-C60k4CxG.js";
|
|
8
8
|
import { g as Ee } from "./helpers-HmkkXrh2.js";
|
|
9
|
-
import { D as
|
|
10
|
-
import { L as he } from "./field-label-headless-
|
|
11
|
-
import { F as
|
|
12
|
-
import { N as
|
|
13
|
-
import { u as ge } from "./use-is-forced-open-dropdown-
|
|
9
|
+
import { D as be, E as fe } from "./field-error-headless-CovyN0GI.js";
|
|
10
|
+
import { L as he } from "./field-label-headless-DVvX2QaH.js";
|
|
11
|
+
import { F as Ie } from "./fieldset-headless-CD3fds9J.js";
|
|
12
|
+
import { N as De, S as Oe } from "./non-modal-popover-DtIMXHbe.js";
|
|
13
|
+
import { u as ge } from "./use-is-forced-open-dropdown-ifUIpuwL.js";
|
|
14
14
|
import { C as ye } from "./chevron-down-icon-CcpVm6B-.js";
|
|
15
15
|
import { E as Ne } from "./error-icon-hZxQ6DEy.js";
|
|
16
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 { u as Le } from "./use-dropdown-option-class-name-
|
|
19
|
-
import { u as
|
|
18
|
+
import { u as Le } from "./use-dropdown-option-class-name-DjV7FW5y.js";
|
|
19
|
+
import { u as x } from "./use-text-input-class-name-va1PzWFg.js";
|
|
20
20
|
const n = ({ children: e, className: a }) => {
|
|
21
|
-
const { id: r, required: o, onBlur: s, onFocus: l, FieldLayout: c } =
|
|
21
|
+
const { id: r, required: o, onBlur: s, onFocus: l, FieldLayout: c } = D(), { inputId: m, labelId: i, ariaDescribedBy: b } = q(), { regionalFormat: p } = w(), h = y(() => z(p).filter(G).map((Y) => Y.toUpperCase()), [
|
|
22
22
|
p
|
|
23
23
|
]), _ = u(e, n.Label), T = u(e, n.Description), L = u(e, n.Error), F = {
|
|
24
24
|
[d.MONTH]: u(e, n.Month),
|
|
@@ -27,13 +27,13 @@ const n = ({ children: e, className: a }) => {
|
|
|
27
27
|
};
|
|
28
28
|
return /* @__PURE__ */ t.createElement(c, {
|
|
29
29
|
fieldId: r,
|
|
30
|
-
renderLabel: () =>
|
|
30
|
+
renderLabel: () => H(_, {
|
|
31
31
|
as: "div"
|
|
32
32
|
}),
|
|
33
|
-
renderInput: () => /* @__PURE__ */ t.createElement(
|
|
33
|
+
renderInput: () => /* @__PURE__ */ t.createElement(Ie, {
|
|
34
34
|
id: m,
|
|
35
35
|
ariaLabelledBy: i,
|
|
36
|
-
ariaDescribedBy:
|
|
36
|
+
ariaDescribedBy: b,
|
|
37
37
|
required: o,
|
|
38
38
|
onBlur: s,
|
|
39
39
|
onFocus: l,
|
|
@@ -42,20 +42,20 @@ const n = ({ children: e, className: a }) => {
|
|
|
42
42
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, L, T)
|
|
43
43
|
});
|
|
44
44
|
}, O = ({ children: e, className: a }) => {
|
|
45
|
-
const { id: r, disabled: o, readOnly: s, showDateLabels: l, hidePlaceholder: c } =
|
|
45
|
+
const { id: r, disabled: o, readOnly: s, showDateLabels: l, hidePlaceholder: c } = D(), { labelId: m } = g(d.MONTH), { partValue: i, partError: b, onPartChange: p } = N(d.MONTH), { t: h } = P(), [_, T] = j(!1), L = ge(r), [F, Y] = j(null), K = c ? void 0 : h("field.date.placeholder.month"), Q = v((M) => {
|
|
46
46
|
s || p(typeof M == "string" ? M : "");
|
|
47
47
|
}, [
|
|
48
48
|
p,
|
|
49
49
|
s
|
|
50
|
-
]),
|
|
50
|
+
]), W = v((M) => {
|
|
51
51
|
T(M && !s);
|
|
52
52
|
}, [
|
|
53
53
|
s
|
|
54
|
-
]),
|
|
54
|
+
]), J = u(e, O.Label), X = u(e, O.Trigger), Z = u(e, O.Options);
|
|
55
55
|
return /* @__PURE__ */ t.createElement("div", {
|
|
56
56
|
className: a,
|
|
57
57
|
"data-date-field": !0
|
|
58
|
-
}, l ?
|
|
58
|
+
}, l ? J : null, /* @__PURE__ */ t.createElement("div", {
|
|
59
59
|
ref: Y,
|
|
60
60
|
style: {
|
|
61
61
|
display: "contents"
|
|
@@ -65,21 +65,21 @@ const n = ({ children: e, className: a }) => {
|
|
|
65
65
|
}, /* @__PURE__ */ t.createElement(re, {
|
|
66
66
|
"aria-labelledby": l ? m : void 0,
|
|
67
67
|
value: i || null,
|
|
68
|
-
onChange:
|
|
68
|
+
onChange: Q,
|
|
69
69
|
isDisabled: o,
|
|
70
|
-
isInvalid:
|
|
71
|
-
placeholder:
|
|
70
|
+
isInvalid: b,
|
|
71
|
+
placeholder: K,
|
|
72
72
|
isOpen: L || _,
|
|
73
|
-
onOpenChange: L ? void 0 :
|
|
74
|
-
},
|
|
73
|
+
onOpenChange: L ? void 0 : W
|
|
74
|
+
}, X, H(Z, {
|
|
75
75
|
isForcedOpen: L
|
|
76
76
|
}))));
|
|
77
77
|
}, Fe = ({ className: e }) => /* @__PURE__ */ t.createElement(V, {
|
|
78
78
|
datePart: d.MONTH,
|
|
79
79
|
className: e
|
|
80
80
|
}), Ce = ({ children: e, className: a }) => {
|
|
81
|
-
const { id: r, readOnly: o } =
|
|
82
|
-
return
|
|
81
|
+
const { id: r, readOnly: o } = D(), { inputId: s } = g(d.MONTH), { partError: l, isFirstPart: c } = N(d.MONTH), m = k(null);
|
|
82
|
+
return B(() => {
|
|
83
83
|
var i;
|
|
84
84
|
c && ((i = m.current) == null || i.focus());
|
|
85
85
|
}, r), /* @__PURE__ */ t.createElement(Oe, {
|
|
@@ -94,13 +94,13 @@ const n = ({ children: e, className: a }) => {
|
|
|
94
94
|
const { isForcedOpen: o } = r, { language: s } = w(), l = y(() => Ee(s), [
|
|
95
95
|
s
|
|
96
96
|
]), c = u(e, A.Option) ?? /* @__PURE__ */ t.createElement(A.Option, null);
|
|
97
|
-
return /* @__PURE__ */ t.createElement(
|
|
97
|
+
return /* @__PURE__ */ t.createElement(De, {
|
|
98
98
|
className: a,
|
|
99
99
|
containerPadding: 0,
|
|
100
100
|
offset: 0
|
|
101
101
|
}, /* @__PURE__ */ t.createElement(ne, {
|
|
102
102
|
autoFocus: o ? !1 : void 0
|
|
103
|
-
}, l.map((m, i) =>
|
|
103
|
+
}, l.map((m, i) => H(c, {
|
|
104
104
|
key: String(i + 1),
|
|
105
105
|
value: String(i + 1),
|
|
106
106
|
label: m
|
|
@@ -118,11 +118,11 @@ O.Trigger = Ce;
|
|
|
118
118
|
O.Options = A;
|
|
119
119
|
A.Option = Re;
|
|
120
120
|
const C = ({ children: e, className: a }) => {
|
|
121
|
-
const { disabled: r, readOnly: o, showDateLabels: s } =
|
|
121
|
+
const { disabled: r, readOnly: o, showDateLabels: s } = D(), { labelId: l } = g(d.DAY), { partValue: c, partError: m, onPartChange: i } = N(d.DAY), b = u(e, C.Label), p = u(e, C.Input);
|
|
122
122
|
return /* @__PURE__ */ t.createElement("div", {
|
|
123
123
|
className: a,
|
|
124
124
|
"data-date-field": !0
|
|
125
|
-
}, s &&
|
|
125
|
+
}, s && b, /* @__PURE__ */ t.createElement(U, {
|
|
126
126
|
"aria-labelledby": s ? l : void 0,
|
|
127
127
|
value: c,
|
|
128
128
|
onChange: i,
|
|
@@ -134,11 +134,11 @@ const C = ({ children: e, className: a }) => {
|
|
|
134
134
|
datePart: d.DAY,
|
|
135
135
|
className: e
|
|
136
136
|
}), Se = ({ className: e }) => {
|
|
137
|
-
const { id: a, hidePlaceholder: r } =
|
|
138
|
-
return
|
|
137
|
+
const { id: a, hidePlaceholder: r } = D(), { 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 B(() => {
|
|
139
139
|
var i;
|
|
140
140
|
s && ((i = c.current) == null || i.focus());
|
|
141
|
-
}, a), /* @__PURE__ */ t.createElement(
|
|
141
|
+
}, a), /* @__PURE__ */ t.createElement($, {
|
|
142
142
|
ref: c,
|
|
143
143
|
id: o,
|
|
144
144
|
className: e,
|
|
@@ -151,11 +151,11 @@ const C = ({ children: e, className: a }) => {
|
|
|
151
151
|
C.Label = Me;
|
|
152
152
|
C.Input = Se;
|
|
153
153
|
const R = ({ children: e, className: a }) => {
|
|
154
|
-
const { disabled: r, readOnly: o, showDateLabels: s } =
|
|
154
|
+
const { disabled: r, readOnly: o, showDateLabels: s } = D(), { labelId: l } = g(d.YEAR), { partValue: c, partError: m, onPartChange: i } = N(d.YEAR), b = u(e, R.Label), p = u(e, R.Input);
|
|
155
155
|
return /* @__PURE__ */ t.createElement("div", {
|
|
156
156
|
className: a,
|
|
157
157
|
"data-date-field": !0
|
|
158
|
-
}, s &&
|
|
158
|
+
}, s && b, /* @__PURE__ */ t.createElement(U, {
|
|
159
159
|
"aria-labelledby": s ? l : void 0,
|
|
160
160
|
value: c,
|
|
161
161
|
onChange: i,
|
|
@@ -167,11 +167,11 @@ const R = ({ children: e, className: a }) => {
|
|
|
167
167
|
datePart: d.YEAR,
|
|
168
168
|
className: e
|
|
169
169
|
}), Pe = ({ className: e }) => {
|
|
170
|
-
const { id: a, hidePlaceholder: r } =
|
|
171
|
-
return
|
|
170
|
+
const { id: a, hidePlaceholder: r } = D(), { 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 B(() => {
|
|
172
172
|
var i;
|
|
173
173
|
s && ((i = c.current) == null || i.focus());
|
|
174
|
-
}, a), /* @__PURE__ */ t.createElement(
|
|
174
|
+
}, a), /* @__PURE__ */ t.createElement($, {
|
|
175
175
|
ref: c,
|
|
176
176
|
id: o,
|
|
177
177
|
className: e,
|
|
@@ -187,10 +187,10 @@ n.Label = he;
|
|
|
187
187
|
n.Month = O;
|
|
188
188
|
n.Day = C;
|
|
189
189
|
n.Year = R;
|
|
190
|
-
n.Description =
|
|
191
|
-
n.Error =
|
|
190
|
+
n.Description = be;
|
|
191
|
+
n.Error = fe;
|
|
192
192
|
function g(e) {
|
|
193
|
-
const { inputId: a } =
|
|
193
|
+
const { inputId: a } = q();
|
|
194
194
|
return y(() => {
|
|
195
195
|
const r = e.toLowerCase();
|
|
196
196
|
return {
|
|
@@ -203,7 +203,7 @@ function g(e) {
|
|
|
203
203
|
]);
|
|
204
204
|
}
|
|
205
205
|
function N(e) {
|
|
206
|
-
const { value: a, onChange: r, hasError: o = !1 } =
|
|
206
|
+
const { value: a, onChange: r, hasError: o = !1 } = D(), { regionalFormat: s } = w(), l = y(() => oe(a ?? ""), [
|
|
207
207
|
a
|
|
208
208
|
]), c = y(() => le(o, a ?? ""), [
|
|
209
209
|
a,
|
|
@@ -215,7 +215,7 @@ function N(e) {
|
|
|
215
215
|
r,
|
|
216
216
|
l,
|
|
217
217
|
e
|
|
218
|
-
]),
|
|
218
|
+
]), b = y(() => z(s).filter(G).map((_) => _.toUpperCase())[0] === e, [
|
|
219
219
|
s,
|
|
220
220
|
e
|
|
221
221
|
]);
|
|
@@ -223,7 +223,7 @@ function N(e) {
|
|
|
223
223
|
partValue: m,
|
|
224
224
|
partError: c[e],
|
|
225
225
|
onPartChange: i,
|
|
226
|
-
isFirstPart:
|
|
226
|
+
isFirstPart: b
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
229
|
function V({ datePart: e, className: a }) {
|
|
@@ -234,55 +234,55 @@ function V({ datePart: e, className: a }) {
|
|
|
234
234
|
className: a
|
|
235
235
|
}, c);
|
|
236
236
|
}
|
|
237
|
-
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", Be = "_yearInput_bc5kj_36", He = "_monthTrigger_bc5kj_40", Ve = "_monthOption_bc5kj_60", I = {
|
|
238
238
|
fields: Te,
|
|
239
239
|
month: Ye,
|
|
240
240
|
day: ve,
|
|
241
241
|
year: ke,
|
|
242
242
|
dayInput: we,
|
|
243
|
-
yearInput:
|
|
244
|
-
monthTrigger:
|
|
243
|
+
yearInput: Be,
|
|
244
|
+
monthTrigger: He,
|
|
245
245
|
monthOption: Ve
|
|
246
|
-
},
|
|
246
|
+
}, je = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ee, {
|
|
247
247
|
content: e,
|
|
248
248
|
locale: a
|
|
249
249
|
}), lt = () => {
|
|
250
|
-
const e = Le(
|
|
250
|
+
const e = Le(I.monthOption, _e), a = x(I.dayInput), r = x(I.yearInput);
|
|
251
251
|
return /* @__PURE__ */ t.createElement(n, {
|
|
252
|
-
className:
|
|
252
|
+
className: I.fields
|
|
253
253
|
}, /* @__PURE__ */ t.createElement(n.Label, {
|
|
254
|
-
className:
|
|
254
|
+
className: f(S, E.label)
|
|
255
255
|
}, /* @__PURE__ */ t.createElement(n.Label.Required, {
|
|
256
|
-
className:
|
|
256
|
+
className: f(ie, E.requiredMark)
|
|
257
257
|
})), /* @__PURE__ */ t.createElement(n.Month, {
|
|
258
|
-
className:
|
|
258
|
+
className: I.month
|
|
259
259
|
}, /* @__PURE__ */ t.createElement(n.Month.Label, {
|
|
260
|
-
className:
|
|
260
|
+
className: f(S, E.label)
|
|
261
261
|
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
262
|
-
className:
|
|
262
|
+
className: f(de, E.input, I.monthTrigger)
|
|
263
263
|
}, /* @__PURE__ */ t.createElement(ye, {
|
|
264
264
|
className: E.dropdownIcon
|
|
265
265
|
})), /* @__PURE__ */ t.createElement(n.Month.Options, {
|
|
266
|
-
className:
|
|
266
|
+
className: f(me, E.selectPopover, E.dropdownPopover)
|
|
267
267
|
}, /* @__PURE__ */ t.createElement(n.Month.Options.Option, {
|
|
268
268
|
className: e
|
|
269
269
|
}))), /* @__PURE__ */ t.createElement(n.Day, {
|
|
270
|
-
className:
|
|
270
|
+
className: I.day
|
|
271
271
|
}, /* @__PURE__ */ t.createElement(n.Day.Label, {
|
|
272
|
-
className:
|
|
272
|
+
className: f(S, E.label)
|
|
273
273
|
}), /* @__PURE__ */ t.createElement(n.Day.Input, {
|
|
274
274
|
className: a
|
|
275
275
|
})), /* @__PURE__ */ t.createElement(n.Year, {
|
|
276
|
-
className:
|
|
276
|
+
className: I.year
|
|
277
277
|
}, /* @__PURE__ */ t.createElement(n.Year.Label, {
|
|
278
|
-
className:
|
|
278
|
+
className: f(S, E.label)
|
|
279
279
|
}), /* @__PURE__ */ t.createElement(n.Year.Input, {
|
|
280
280
|
className: r
|
|
281
281
|
})), /* @__PURE__ */ t.createElement(n.Error, {
|
|
282
|
-
className:
|
|
282
|
+
className: f(ue, E.error)
|
|
283
283
|
}, /* @__PURE__ */ t.createElement(Ne, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
284
|
-
className:
|
|
285
|
-
},
|
|
284
|
+
className: f(pe, E.description)
|
|
285
|
+
}, je));
|
|
286
286
|
};
|
|
287
287
|
export {
|
|
288
288
|
lt as D
|
package/dist/component/{date-picker-field-rac-CRZVODfF.js → date-picker-field-rac-CIspU7No.js}
RENAMED
|
@@ -4,14 +4,14 @@ import e, { useState as O, useCallback as k, useContext as ee, useRef as A, useM
|
|
|
4
4
|
import { parseDate as te } from "@internationalized/date";
|
|
5
5
|
import { UNSAFE_PortalProvider as re } from "react-aria";
|
|
6
6
|
import { I18nProvider as ne, DatePicker as ae, DatePickerStateContext as oe, Group as le, DateInput as se, DateSegment as ce, Calendar as ie, CalendarMonthPicker as me, CalendarYearPicker as ue, CalendarGrid as de, Dialog as ge, CalendarCell as Ee, Button as M, Select as x, SelectValue as w, ListBox as Y, ListBoxItem as B } from "react-aria-components";
|
|
7
|
-
import { D as f,
|
|
8
|
-
import { g as
|
|
9
|
-
import { f as E, a as
|
|
10
|
-
import { D as
|
|
11
|
-
import { L as Ne } from "./field-label-headless-
|
|
7
|
+
import { D as f, b9 as T, b6 as U, b1 as F, bb as pe, I as De, U as fe, t as Ce, n as ye, v as Se, p as ve } from "./form-BTDgyr54.js";
|
|
8
|
+
import { g as Te, c as P } from "./calendar.module-DnhTT4QT.js";
|
|
9
|
+
import { f as E, a as v } from "./find-child-C60k4CxG.js";
|
|
10
|
+
import { D as he, E as _e } from "./field-error-headless-CovyN0GI.js";
|
|
11
|
+
import { L as Ne } from "./field-label-headless-DVvX2QaH.js";
|
|
12
12
|
import { D as be, N as L, S as V } from "./non-modal-popover-DtIMXHbe.js";
|
|
13
|
-
import { u as Ie } from "./use-is-forced-open-dropdown-
|
|
14
|
-
import { i as Fe } from "./date-availability-
|
|
13
|
+
import { u as Ie } from "./use-is-forced-open-dropdown-ifUIpuwL.js";
|
|
14
|
+
import { i as Fe } from "./date-availability-C4dDHvuc.js";
|
|
15
15
|
import { C as I } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as Le } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as Oe } from "./custom-focus-class-_483Pkwp.js";
|
|
@@ -27,17 +27,17 @@ const Ae = [
|
|
|
27
27
|
], Pe = {
|
|
28
28
|
availableDays: Ae
|
|
29
29
|
}, n = ({ children: t }) => {
|
|
30
|
-
const { id: r, value: l, onChange: a, disabled: i, required: c, onBlur: d, onFocus: o, FieldLayout: m, hasError: u, readOnly: C } =
|
|
30
|
+
const { id: r, value: l, onChange: a, disabled: i, required: c, onBlur: d, onFocus: o, FieldLayout: m, hasError: u, readOnly: C } = T(), { labelId: y } = U(), { regionalFormat: h } = F(), [s, _] = O(null), [W, K] = O(!1), N = Ie(r), $ = k((z) => {
|
|
31
31
|
const J = Ke(z);
|
|
32
32
|
a(J);
|
|
33
33
|
}, [
|
|
34
34
|
a
|
|
35
|
-
]),
|
|
35
|
+
]), H = E(t, n.Label), q = E(t, n.Control), G = E(t, n.Calendar), j = E(t, n.Description), Q = E(t, n.Error), Z = We(l);
|
|
36
36
|
return /* @__PURE__ */ e.createElement(m, {
|
|
37
37
|
fieldId: r,
|
|
38
|
-
renderLabel: () =>
|
|
38
|
+
renderLabel: () => H,
|
|
39
39
|
renderInput: () => /* @__PURE__ */ e.createElement(ne, {
|
|
40
|
-
locale:
|
|
40
|
+
locale: h
|
|
41
41
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
42
42
|
ref: _,
|
|
43
43
|
style: {
|
|
@@ -47,8 +47,8 @@ const Ae = [
|
|
|
47
47
|
getContainer: () => s
|
|
48
48
|
}, /* @__PURE__ */ e.createElement(ae, {
|
|
49
49
|
"aria-labelledby": y,
|
|
50
|
-
value:
|
|
51
|
-
onChange:
|
|
50
|
+
value: Z,
|
|
51
|
+
onChange: $,
|
|
52
52
|
isDisabled: i,
|
|
53
53
|
isInvalid: u,
|
|
54
54
|
isReadOnly: C,
|
|
@@ -57,13 +57,13 @@ const Ae = [
|
|
|
57
57
|
onFocus: o,
|
|
58
58
|
isOpen: N || W,
|
|
59
59
|
onOpenChange: N ? void 0 : K
|
|
60
|
-
}, q,
|
|
60
|
+
}, q, v(G, {
|
|
61
61
|
isForcedOpen: N
|
|
62
62
|
})))),
|
|
63
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
63
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, Q, j)
|
|
64
64
|
});
|
|
65
65
|
}, Re = ({ children: t, className: r }) => {
|
|
66
|
-
const { inputId: l, ariaDescribedBy: a } = U(), { hasError: i, disabled: c, readOnly: d } =
|
|
66
|
+
const { inputId: l, ariaDescribedBy: a } = U(), { hasError: i, disabled: c, readOnly: d } = T(), o = ee(oe), m = k((u) => {
|
|
67
67
|
if (!o || o.isOpen || c || d)
|
|
68
68
|
return;
|
|
69
69
|
const C = u.target;
|
|
@@ -84,12 +84,12 @@ const Ae = [
|
|
|
84
84
|
onPointerDownCapture: m
|
|
85
85
|
}, t);
|
|
86
86
|
}, ke = ({ className: t }) => {
|
|
87
|
-
const { id: r, placeholder: l } =
|
|
87
|
+
const { id: r, placeholder: l } = T(), { regionalFormat: a } = F(), i = A(null), c = A(!1);
|
|
88
88
|
pe(() => {
|
|
89
89
|
var o;
|
|
90
90
|
(o = i.current) == null || o.focus();
|
|
91
91
|
}, r);
|
|
92
|
-
const d = b(() =>
|
|
92
|
+
const d = b(() => $e(a), [
|
|
93
93
|
a
|
|
94
94
|
]);
|
|
95
95
|
return /* @__PURE__ */ e.createElement(se, {
|
|
@@ -114,14 +114,14 @@ const Ae = [
|
|
|
114
114
|
}, Me = ({ children: t, className: r }) => /* @__PURE__ */ e.createElement(be, {
|
|
115
115
|
className: r
|
|
116
116
|
}, t), g = ({ children: t, className: r, ...l }) => {
|
|
117
|
-
const { isForcedOpen: a } = l, { regionalFormat: i } = F(), { availability: c } =
|
|
117
|
+
const { isForcedOpen: a } = l, { regionalFormat: i } = F(), { availability: c } = T(), d = b(() => Te(i), [
|
|
118
118
|
i
|
|
119
119
|
]), o = b(() => (s) => {
|
|
120
120
|
const _ = new Date(s.year, s.month - 1, s.day);
|
|
121
121
|
return !Fe(_, c || Pe);
|
|
122
122
|
}, [
|
|
123
123
|
c
|
|
124
|
-
]), m = E(t, g.Day) ?? /* @__PURE__ */ e.createElement(g.Day, null), u = E(t, g.PreviousTrigger), C = E(t, g.NextTrigger), y = E(t, g.MonthTrigger),
|
|
124
|
+
]), m = E(t, g.Day) ?? /* @__PURE__ */ e.createElement(g.Day, null), u = E(t, g.PreviousTrigger), C = E(t, g.NextTrigger), y = E(t, g.MonthTrigger), h = E(t, g.YearTrigger);
|
|
125
125
|
return /* @__PURE__ */ e.createElement(L, {
|
|
126
126
|
className: r,
|
|
127
127
|
containerPadding: 0
|
|
@@ -129,9 +129,9 @@ const Ae = [
|
|
|
129
129
|
isForcedOpen: a
|
|
130
130
|
}, /* @__PURE__ */ e.createElement(ie, {
|
|
131
131
|
autoFocus: a ? !1 : void 0,
|
|
132
|
-
firstDayOfWeek:
|
|
132
|
+
firstDayOfWeek: He(d),
|
|
133
133
|
isDateUnavailable: o
|
|
134
|
-
}, /* @__PURE__ */ e.createElement("header", null, u, /* @__PURE__ */ e.createElement(me, null, (s) =>
|
|
134
|
+
}, /* @__PURE__ */ e.createElement("header", null, u, /* @__PURE__ */ e.createElement(me, null, (s) => v(y, {
|
|
135
135
|
ariaLabel: s["aria-label"],
|
|
136
136
|
selectedKey: s.value,
|
|
137
137
|
onSelectionChange: s.onChange,
|
|
@@ -139,7 +139,7 @@ const Ae = [
|
|
|
139
139
|
popoverClassName: r
|
|
140
140
|
})), /* @__PURE__ */ e.createElement(ue, {
|
|
141
141
|
visibleYears: 100
|
|
142
|
-
}, (s) =>
|
|
142
|
+
}, (s) => v(h, {
|
|
143
143
|
ariaLabel: s["aria-label"],
|
|
144
144
|
selectedKey: s.value,
|
|
145
145
|
onSelectionChange: s.onChange,
|
|
@@ -147,7 +147,7 @@ const Ae = [
|
|
|
147
147
|
popoverClassName: r
|
|
148
148
|
})), C), /* @__PURE__ */ e.createElement(de, {
|
|
149
149
|
weekdayStyle: "short"
|
|
150
|
-
}, (s) =>
|
|
150
|
+
}, (s) => v(m, {
|
|
151
151
|
date: s
|
|
152
152
|
})))));
|
|
153
153
|
}, xe = ({ isForcedOpen: t, children: r }) => t ? /* @__PURE__ */ e.createElement("div", {
|
|
@@ -207,7 +207,7 @@ n.Control = Re;
|
|
|
207
207
|
n.Input = ke;
|
|
208
208
|
n.Trigger = Me;
|
|
209
209
|
n.Calendar = g;
|
|
210
|
-
n.Description =
|
|
210
|
+
n.Description = he;
|
|
211
211
|
n.Error = _e;
|
|
212
212
|
function We(t) {
|
|
213
213
|
if (!t)
|
|
@@ -224,7 +224,7 @@ function Ke(t) {
|
|
|
224
224
|
const r = String(t.year).padStart(4, "0"), l = String(t.month).padStart(2, "0"), a = String(t.day).padStart(2, "0");
|
|
225
225
|
return `${r}-${l}-${a}`;
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function $e(t) {
|
|
228
228
|
var r;
|
|
229
229
|
try {
|
|
230
230
|
return ((r = new Intl.DateTimeFormat(t, {
|
|
@@ -236,7 +236,7 @@ function He(t) {
|
|
|
236
236
|
return "month";
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function He(t) {
|
|
240
240
|
return [
|
|
241
241
|
"sun",
|
|
242
242
|
"mon",
|
|
@@ -260,11 +260,11 @@ const qe = (t) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
260
260
|
strokeWidth: "1.5",
|
|
261
261
|
strokeLinecap: "round",
|
|
262
262
|
strokeLinejoin: "round"
|
|
263
|
-
})), Ge = "_control_1vunt_1", je = "_segments_1vunt_14",
|
|
263
|
+
})), Ge = "_control_1vunt_1", je = "_segments_1vunt_14", Qe = "_trigger_1vunt_65", Ze = "_calendarPopover_1vunt_96", ze = "_calendarDay_1vunt_242", S = {
|
|
264
264
|
control: Ge,
|
|
265
265
|
segments: je,
|
|
266
|
-
trigger:
|
|
267
|
-
calendarPopover:
|
|
266
|
+
trigger: Qe,
|
|
267
|
+
calendarPopover: Ze,
|
|
268
268
|
calendarDay: ze
|
|
269
269
|
}, Je = ({ content: t, locale: r }) => /* @__PURE__ */ e.createElement(X, {
|
|
270
270
|
content: t,
|
|
@@ -303,7 +303,7 @@ const qe = (t) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
303
303
|
}, t))), /* @__PURE__ */ e.createElement(n.Error, {
|
|
304
304
|
className: D(Se, p.error)
|
|
305
305
|
}, /* @__PURE__ */ e.createElement(Le, null), /* @__PURE__ */ e.createElement(n.Error.Text, null)), /* @__PURE__ */ e.createElement(n.Description, {
|
|
306
|
-
className: D(
|
|
306
|
+
className: D(ve, p.description)
|
|
307
307
|
}, Je));
|
|
308
308
|
export {
|
|
309
309
|
Ct as D
|