@wix/form-elements 1.187.0 → 1.189.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-DiGTD4hn.js → appointment-rac-Biwj0bKe.js} +78 -78
- package/dist/component/{bookings-address-rac-Bczo07PP.js → bookings-address-rac-B_o25LOI.js} +1 -1
- package/dist/component/{bookings-email-rac-D0cw7HFH.js → bookings-email-rac-BBcusxbS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DqxVpKqV.js → bookings-first-name-rac-CNTGannm.js} +1 -1
- package/dist/component/{bookings-header-rac-BxlD5Wje.js → bookings-header-rac-BTvG2vnk.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CraNB_ut.js → bookings-last-name-rac-BQumGsz9.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BMGnVYXE.js → bookings-login-bar-rac-Cl_rwWhO.js} +8 -8
- package/dist/component/{bookings-phone-rac-CnSlSyLi.js → bookings-phone-rac-B_gXe9Fa.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CWWvRRRi.js → bookings-rich-text-rac-CbMuPVCB.js} +1 -1
- package/dist/component/{checkbox-field-rac-C2LLGbbS.js → checkbox-field-rac-QwFSqEgs.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-B2hKVuJD.js → checkbox-group-field-headless-CTDMO0TM.js} +38 -38
- package/dist/component/{checkbox-group-field-rac-Bqo7LRpI.js → checkbox-group-field-rac-DFUST9Th.js} +4 -4
- package/dist/component/{checkbox-group-rac-CHAnQW7L.js → checkbox-group-rac-CBAE-o1Q.js} +1 -1
- package/dist/component/{checkbox-rac-D09xnf-F.js → checkbox-rac-DkYPhGTU.js} +1 -1
- package/dist/component/{contacts-address-rac-CY_ff8gq.js → contacts-address-rac-DKf42iJk.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BkPpyiCP.js → contacts-birthdate-rac-ffPSb2YW.js} +1 -1
- package/dist/component/{contacts-company-rac-2I05yC97.js → contacts-company-rac-DLVdNbYz.js} +1 -1
- package/dist/component/{contacts-email-rac-B5vwkBUk.js → contacts-email-rac-CW8SdcYX.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CVxn7EaP.js → contacts-first-name-rac-CGdzgpkw.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DIu7T_QU.js → contacts-last-name-rac-DNQj7UcW.js} +1 -1
- package/dist/component/{contacts-phone-rac-B_9KO997.js → contacts-phone-rac-zAMIceti.js} +1 -1
- package/dist/component/{contacts-position-rac-Dll7FDN5.js → contacts-position-rac-DLwn9B2T.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DvZ0S_7T.js → contacts-subscribe-rac-Cy5rxTkC.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BmYWQGbm.js → contacts-tax-id-rac-CEfU6N6C.js} +1 -1
- package/dist/component/{date-availability-C2IYlnG_.js → date-availability-C9EOQUiy.js} +1 -1
- package/dist/component/{date-input-field-rac-TwaBKY7l.js → date-input-field-rac-F4QQeEtO.js} +57 -57
- package/dist/component/{date-input-rac-CusCOLnm.js → date-input-rac-CJeOgyF5.js} +1 -1
- package/dist/component/{date-picker-field-rac-ufxxlmpA.js → date-picker-field-rac-33ARKAxQ.js} +35 -35
- package/dist/component/{date-picker-rac-IGr_hLjg.js → date-picker-rac-Beaqh84V.js} +1 -1
- package/dist/component/{date-time-input-field-rac-B6ZQo4Tk.js → date-time-input-field-rac-CB8FfYUM.js} +44 -44
- package/dist/component/{date-time-input-rac-X1GCfhSl.js → date-time-input-rac-DQ9P6IVp.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-D9UmRqnt.js → dext-checkbox-group-rac-Cho-hueW.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DrMbQCX3.js → dext-checkbox-rac-BIwIwy-y.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Barwg8La.js → dext-date-picker-rac-C03HJdvX.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-ChIUfDk4.js → dext-date-time-input-rac-Bo4XfnRA.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BCrEGvfc.js → dext-dropdown-rac-CadT1tMH.js} +1 -1
- package/dist/component/{dext-email-rac-D7l9fah1.js → dext-email-rac-DbiEws8H.js} +1 -1
- package/dist/component/{dext-number-input-rac-CrI6ChK9.js → dext-number-input-rac-XoW8CLvX.js} +1 -1
- package/dist/component/{dext-phone-rac-B_ObVduc.js → dext-phone-rac-9rFyUD8e.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DOBaXXjq.js → dext-radio-group-rac-U6BNL7IT.js} +2 -2
- package/dist/component/{dext-rating-input-rac-D4LxflR7.js → dext-rating-input-rac-BDGUv8jU.js} +1 -1
- package/dist/component/{dext-tags-rac-nTSiW-H7.js → dext-tags-rac-CAFGVcIi.js} +2 -2
- package/dist/component/{dext-text-area-rac-DYV_gO7a.js → dext-text-area-rac-DXyzm9oe.js} +1 -1
- package/dist/component/{dext-text-input-rac-Zjq6PsXg.js → dext-text-input-rac-C27gdfyG.js} +1 -1
- package/dist/component/{dext-url-input-rac-BM7jm0Tn.js → dext-url-input-rac-DovYH3_G.js} +1 -1
- package/dist/component/{donation-rac-CGjEtI7s.js → donation-rac-DV2aRsDt.js} +60 -60
- package/dist/component/{dropdown-field-rac-c-Owb2hL.js → dropdown-field-rac-D58C7YZG.js} +3 -3
- package/dist/component/{dropdown-rac-Bp9hWnJS.js → dropdown-rac-57yZf_yZ.js} +1 -1
- package/dist/component/{ecom-address-rac-C1YRffNH.js → ecom-address-rac-Co3WhA7m.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-B5uCvEqP.js → ecom-subscription-checkbox-rac-CYjsuRA9.js} +2 -2
- package/dist/component/{email-input-field-rac-BDQYfj6b.js → email-input-field-rac-C5G3pVkR.js} +14 -14
- package/dist/component/{events-repeater-rac-DoZBb6e0.js → events-repeater-rac-D5PXSDIH.js} +72 -70
- package/dist/component/{events-rsvp-rac-OyYogsL5.js → events-rsvp-rac-BfyQNZh6.js} +3 -3
- package/dist/component/{field-error-headless-B41KJxbD.js → field-error-headless-RTyrenpC.js} +8 -8
- package/dist/component/{field-label-headless-DHt_Wm_S.js → field-label-headless-Bd00Hl2z.js} +4 -4
- package/dist/component/{file-upload-rac-Bed5vOYu.js → file-upload-rac-D5pTnsHO.js} +61 -61
- package/dist/component/{fixed-payment-rac-_HtF4gSw.js → fixed-payment-rac-ByxSjPu5.js} +9 -9
- package/dist/component/{form-DAUDnpk6.js → form-BG5UjjLA.js} +3276 -3217
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BwlXDMt4.js → header-field-rac-Bql6VoAi.js} +2 -2
- package/dist/component/{header-rac-CdFpA8bi.js → header-rac-DWAIn4eY.js} +1 -1
- package/dist/component/{image-choice-rac-Bfs7ixsZ.js → image-choice-rac-D5dSQ4Xd.js} +11 -11
- package/dist/component/{index-B5HfcvO_.js → index-37eV-JEp.js} +5 -5
- package/dist/component/{index-BQctPc9k.js → index-DlcCtz4h.js} +4 -4
- package/dist/component/{isObjectLike-CKRIZUUL.js → isObjectLike-ClPDcTiq.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Gs6BGlnz.js → multiline-address-field-rac-CpvwzmpC.js} +345 -345
- package/dist/component/{multiline-address-rac-6tsDZK20.js → multiline-address-rac-ENim2Bn6.js} +1 -1
- package/dist/component/{number-input-field-rac-D2vzcEDT.js → number-input-field-rac-DTRnmRDk.js} +21 -21
- package/dist/component/{number-input-rac-DJA2sjJ2.js → number-input-rac-QROlEpkx.js} +1 -1
- package/dist/component/{password-rac-DS9j5AEn.js → password-rac-jMoyzIP2.js} +47 -47
- package/dist/component/{payment-input-rac-t15HwuyR.js → payment-input-rac-DOOV4P4b.js} +31 -31
- package/dist/component/{phone-input-field-rac-DCEMaJjP.js → phone-input-field-rac-BA_mTcND.js} +47 -47
- package/dist/component/{phone-rac-R2KIpq9Y.js → phone-rac-DXcbIqHK.js} +1 -1
- package/dist/component/{product-list-rac-BCaz8EbJ.js → product-list-rac-CsxR7Ut6.js} +63 -63
- package/dist/component/{quiz-radio-group-rac-Czjt8SZW.js → quiz-radio-group-rac-IQgqvqjs.js} +1 -1
- package/dist/component/{radio-button-module-classes-B2cY0daS.js → radio-button-module-classes-DIFYfYiH.js} +36 -36
- package/dist/component/{radio-group-field-rac-BdCqn6Uq.js → radio-group-field-rac-Ca2RlxOl.js} +4 -4
- package/dist/component/{radio-group-rac-CdKWOA6d.js → radio-group-rac-DDervEEb.js} +1 -1
- package/dist/component/{rating-input-field-rac-qllcIC5u.js → rating-input-field-rac-0kyPo9cU.js} +12 -12
- package/dist/component/{rating-input-rac-Cno0IibX.js → rating-input-rac-DqPsqUKR.js} +1 -1
- package/dist/component/{rich-content-rac.module-Bj8zO5BD.js → rich-content-rac.module-2T_-7jvb.js} +5 -5
- package/dist/component/{rich-text-field-rac-CJOPMgvk.js → rich-text-field-rac-W-eKzhuC.js} +4 -4
- package/dist/component/{rich-text-rac-qJLSQUfk.js → rich-text-rac-CzJfbAyx.js} +1 -1
- package/dist/component/{service-dropdown-rac-CrrqMt0I.js → service-dropdown-rac-BMJy2pZ5.js} +25 -25
- package/dist/component/{services-multi-choice-rac-DHpIgQT8.js → services-multi-choice-rac-BBAWlI7U.js} +7 -7
- package/dist/component/{signature-rac-vHDz7aO9.js → signature-rac-Y1GLswrp.js} +22 -22
- package/dist/component/{submit-button-rac-CdSXP5MY.js → submit-button-rac-CSKbrgQ3.js} +17 -17
- package/dist/component/{tags-field-rac-BE5q3Yzp.js → tags-field-rac-D3zOYcC5.js} +19 -19
- package/dist/component/{tags-rac-DPH9Jekq.js → tags-rac-Cs77Abgs.js} +1 -1
- package/dist/component/text-area-field-rac-DZZW7rAX.js +74 -0
- package/dist/component/{text-area-rac-BWI_FwJ_.js → text-area-rac-BRPp0HnX.js} +1 -1
- package/dist/component/{text-input-field-rac-SljlZsKs.js → text-input-field-rac-tPDZmLdU.js} +3 -3
- package/dist/component/text-input-headless-tkwEZWs7.js +47 -0
- package/dist/component/{text-input-rac-OP8CxA5d.js → text-input-rac-DnHt4vkM.js} +1 -1
- package/dist/component/{time-input-rac-Dc0pojpK.js → time-input-rac-Dbg4Nqb5.js} +18 -18
- package/dist/component/url-input-field-rac-3ODFXFRP.js +77 -0
- package/dist/component/{url-input-rac-DW245AQ3.js → url-input-rac-CPb5o8Of.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-CohYBaie.js → use-dropdown-option-class-name-Dd4ncVaY.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-CcyW9dW5.js → use-dropdown-trigger-class-name-zVniRqM7.js} +29 -29
- package/dist/component/{use-element-state-class-name-ByWbyT81.js → use-element-state-class-name-C8jFeDrq.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-CmYpz2Os.js → use-hoverable-input-class-name-B9diy0Mr.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-D4-XPkUN.js → use-is-forced-open-dropdown-BR1U1l5w.js} +6 -6
- package/dist/component/{use-service-options-base-DGHhZKVh.js → use-service-options-base-yM4rJlq1.js} +3 -3
- package/dist/component/use-text-input-class-name-D6AnBbJx.js +6 -0
- package/package.json +2 -2
- package/dist/component/text-area-field-rac-CUSpvF_P.js +0 -74
- package/dist/component/text-input-headless-BWFcuwI4.js +0 -47
- package/dist/component/url-input-field-rac-CcUeuaJX.js +0 -77
- package/dist/component/use-text-input-class-name-VJ-nzeqS.js +0 -6
package/dist/component/{date-input-field-rac-TwaBKY7l.js → date-input-field-rac-F4QQeEtO.js}
RENAMED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { RicosViewer as ne } from "@wix/ricos/viewer";
|
|
2
|
-
import
|
|
2
|
+
import _ from "classnames";
|
|
3
3
|
import t, { useMemo as N, useState as $, useCallback as x, useRef as H } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as re } from "react-aria";
|
|
5
5
|
import { ListBoxItem as se, Select as oe, TextField as z, SelectValue as le, Input as X } from "react-aria-components";
|
|
6
|
-
import {
|
|
7
|
-
import { f as p, a as
|
|
6
|
+
import { bM as D, bJ as J, bE as U, bh as K, bu as Q, b4 as s, bX as M, bb as ce, bi as ie, bB as me, bO as B, u as de, X as ue, am as pe, w as Y, x as Ee, M as be, I as fe, v as _e, y as Ie, z as q } from "./form-BG5UjjLA.js";
|
|
7
|
+
import { f as p, a as V } from "./find-child-C60k4CxG.js";
|
|
8
8
|
import { g as De } from "./helpers-HmkkXrh2.js";
|
|
9
|
-
import { D as Oe, E as ge } from "./field-error-headless-
|
|
10
|
-
import { L as he } from "./field-label-headless-
|
|
9
|
+
import { D as Oe, E as ge } from "./field-error-headless-RTyrenpC.js";
|
|
10
|
+
import { L as he } from "./field-label-headless-Bd00Hl2z.js";
|
|
11
11
|
import { F as Ne } from "./fieldset-headless-CD3fds9J.js";
|
|
12
12
|
import { N as Le, E as ye, S as Fe } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
-
import { u as Ce } from "./use-is-forced-open-dropdown-
|
|
14
|
-
import { V as Te, a as Ae } from "./use-dropdown-option-class-name-
|
|
15
|
-
import { C as
|
|
16
|
-
import { E as
|
|
13
|
+
import { u as Ce } from "./use-is-forced-open-dropdown-BR1U1l5w.js";
|
|
14
|
+
import { V as Te, a as Ae } from "./use-dropdown-option-class-name-Dd4ncVaY.js";
|
|
15
|
+
import { C as Me } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
|
+
import { E as Re } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as Pe } from "./custom-focus-class-_483Pkwp.js";
|
|
18
18
|
import { s as b } from "./field-rac.module-DcyJyi2B.js";
|
|
19
|
-
import { u as v } from "./use-hoverable-input-class-name-
|
|
19
|
+
import { u as v } from "./use-hoverable-input-class-name-B9diy0Mr.js";
|
|
20
20
|
const Se = {
|
|
21
21
|
[s.MONTH]: "bday-month",
|
|
22
22
|
[s.DAY]: "bday-day",
|
|
23
23
|
[s.YEAR]: "bday-year"
|
|
24
24
|
}, w = (e, a) => e === "bday" ? Se[a] : void 0, n = ({ children: e, className: a }) => {
|
|
25
|
-
const { id: r, required: o, onBlur: l, onFocus: c, FieldLayout: m } = D(), { inputId: i, labelId: d, ariaDescribedBy: u } =
|
|
25
|
+
const { id: r, required: o, onBlur: l, onFocus: c, FieldLayout: m } = D(), { inputId: i, labelId: d, ariaDescribedBy: u } = J(), { regionalFormat: E } = U(), f = N(() => K(E).filter(Q).map((S) => S.toUpperCase()), [
|
|
26
26
|
E
|
|
27
|
-
]), y = p(e, n.Label),
|
|
27
|
+
]), y = p(e, n.Label), R = p(e, n.Description), P = p(e, n.Error), O = {
|
|
28
28
|
[s.MONTH]: p(e, n.Month),
|
|
29
29
|
[s.DAY]: p(e, n.Day),
|
|
30
30
|
[s.YEAR]: p(e, n.Year)
|
|
31
31
|
};
|
|
32
32
|
return /* @__PURE__ */ t.createElement(m, {
|
|
33
33
|
fieldId: r,
|
|
34
|
-
renderLabel: () =>
|
|
34
|
+
renderLabel: () => V(y, {
|
|
35
35
|
as: "div"
|
|
36
36
|
}),
|
|
37
37
|
renderInput: () => /* @__PURE__ */ t.createElement(Ne, {
|
|
@@ -43,10 +43,10 @@ const Se = {
|
|
|
43
43
|
onFocus: c,
|
|
44
44
|
className: a
|
|
45
45
|
}, O[f[0]], O[f[1]], O[f[2]]),
|
|
46
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, P,
|
|
46
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, P, R)
|
|
47
47
|
});
|
|
48
48
|
}, g = ({ children: e, className: a }) => {
|
|
49
|
-
const { id: r, disabled: o, readOnly: l, showDateLabels: c, hidePlaceholder: m, autoComplete: i } = D(), { labelId: d } = h(s.MONTH), { partValue: u, partError: E, onPartChange: f } = L(s.MONTH), { t: y } =
|
|
49
|
+
const { id: r, disabled: o, readOnly: l, showDateLabels: c, hidePlaceholder: m, autoComplete: i } = D(), { labelId: d } = h(s.MONTH), { partValue: u, partError: E, onPartChange: f } = L(s.MONTH), { t: y } = M(), [R, P] = $(!1), O = Ce(r), [S, W] = $(null), j = m ? ye : y("field.date.placeholder.month"), G = x((T) => {
|
|
50
50
|
l || f(typeof T == "string" ? T : "");
|
|
51
51
|
}, [
|
|
52
52
|
f,
|
|
@@ -60,7 +60,7 @@ const Se = {
|
|
|
60
60
|
className: a,
|
|
61
61
|
"data-date-field": !0
|
|
62
62
|
}, c ? ee : null, /* @__PURE__ */ t.createElement("div", {
|
|
63
|
-
ref:
|
|
63
|
+
ref: W,
|
|
64
64
|
style: {
|
|
65
65
|
display: "contents"
|
|
66
66
|
}
|
|
@@ -70,13 +70,13 @@ const Se = {
|
|
|
70
70
|
autoComplete: w(i, s.MONTH),
|
|
71
71
|
"aria-labelledby": c ? d : void 0,
|
|
72
72
|
value: u || null,
|
|
73
|
-
onChange:
|
|
73
|
+
onChange: G,
|
|
74
74
|
isDisabled: o,
|
|
75
75
|
isInvalid: E,
|
|
76
|
-
placeholder:
|
|
77
|
-
isOpen: O ||
|
|
76
|
+
placeholder: j,
|
|
77
|
+
isOpen: O || R,
|
|
78
78
|
onOpenChange: O ? void 0 : Z
|
|
79
|
-
}, te,
|
|
79
|
+
}, te, V(ae, {
|
|
80
80
|
isForcedOpen: O
|
|
81
81
|
}))));
|
|
82
82
|
}, Ye = ({ className: e }) => /* @__PURE__ */ t.createElement(k, {
|
|
@@ -84,7 +84,7 @@ const Se = {
|
|
|
84
84
|
className: e
|
|
85
85
|
}), ve = ({ children: e, className: a }) => {
|
|
86
86
|
const { id: r, readOnly: o } = D(), { inputId: l } = h(s.MONTH), { partError: c, isFirstPart: m } = L(s.MONTH), i = H(null);
|
|
87
|
-
return
|
|
87
|
+
return B(() => {
|
|
88
88
|
var d;
|
|
89
89
|
m && ((d = i.current) == null || d.focus({
|
|
90
90
|
preventScroll: !0
|
|
@@ -108,7 +108,7 @@ const Se = {
|
|
|
108
108
|
}, /* @__PURE__ */ t.createElement(Te, {
|
|
109
109
|
isForcedOpen: o,
|
|
110
110
|
autoFocus: o ? !1 : void 0
|
|
111
|
-
}, c.map((i, d) =>
|
|
111
|
+
}, c.map((i, d) => V(m, {
|
|
112
112
|
key: String(d + 1),
|
|
113
113
|
value: String(d + 1),
|
|
114
114
|
label: i
|
|
@@ -142,8 +142,8 @@ const F = ({ children: e, className: a }) => {
|
|
|
142
142
|
datePart: s.DAY,
|
|
143
143
|
className: e
|
|
144
144
|
}), Ue = ({ className: e }) => {
|
|
145
|
-
const { id: a, hidePlaceholder: r, autoComplete: o } = D(), { inputId: l } = h(s.DAY), { isFirstPart: c } = L(s.DAY), { t: m } =
|
|
146
|
-
return
|
|
145
|
+
const { id: a, hidePlaceholder: r, autoComplete: o } = D(), { inputId: l } = h(s.DAY), { isFirstPart: c } = L(s.DAY), { t: m } = M(), i = H(null), d = r ? void 0 : m("field.date.placeholder.day");
|
|
146
|
+
return B(() => {
|
|
147
147
|
var u;
|
|
148
148
|
c && ((u = i.current) == null || u.focus({
|
|
149
149
|
preventScroll: !0
|
|
@@ -174,12 +174,12 @@ const C = ({ children: e, className: a }) => {
|
|
|
174
174
|
isReadOnly: o,
|
|
175
175
|
isInvalid: i
|
|
176
176
|
}, E));
|
|
177
|
-
},
|
|
177
|
+
}, Be = ({ className: e }) => /* @__PURE__ */ t.createElement(k, {
|
|
178
178
|
datePart: s.YEAR,
|
|
179
179
|
className: e
|
|
180
|
-
}),
|
|
181
|
-
const { id: a, hidePlaceholder: r, autoComplete: o } = D(), { inputId: l } = h(s.YEAR), { isFirstPart: c } = L(s.YEAR), { t: m } =
|
|
182
|
-
return
|
|
180
|
+
}), Ve = ({ className: e }) => {
|
|
181
|
+
const { id: a, hidePlaceholder: r, autoComplete: o } = D(), { inputId: l } = h(s.YEAR), { isFirstPart: c } = L(s.YEAR), { t: m } = M(), i = H(null), d = r ? void 0 : m("field.date.placeholder.year");
|
|
182
|
+
return B(() => {
|
|
183
183
|
var u;
|
|
184
184
|
c && ((u = i.current) == null || u.focus({
|
|
185
185
|
preventScroll: !0
|
|
@@ -195,8 +195,8 @@ const C = ({ children: e, className: a }) => {
|
|
|
195
195
|
"data-hook": s.YEAR
|
|
196
196
|
});
|
|
197
197
|
};
|
|
198
|
-
C.Label =
|
|
199
|
-
C.Input =
|
|
198
|
+
C.Label = Be;
|
|
199
|
+
C.Input = Ve;
|
|
200
200
|
n.Label = he;
|
|
201
201
|
n.Month = g;
|
|
202
202
|
n.Day = F;
|
|
@@ -204,7 +204,7 @@ n.Year = C;
|
|
|
204
204
|
n.Description = Oe;
|
|
205
205
|
n.Error = ge;
|
|
206
206
|
function h(e) {
|
|
207
|
-
const { inputId: a } =
|
|
207
|
+
const { inputId: a } = J();
|
|
208
208
|
return N(() => {
|
|
209
209
|
const r = e.toLowerCase();
|
|
210
210
|
return {
|
|
@@ -229,7 +229,7 @@ function L(e) {
|
|
|
229
229
|
r,
|
|
230
230
|
c,
|
|
231
231
|
e
|
|
232
|
-
]), u = N(() =>
|
|
232
|
+
]), u = N(() => K(l).filter(Q).map((y) => y.toUpperCase())[0] === e, [
|
|
233
233
|
l,
|
|
234
234
|
e
|
|
235
235
|
]);
|
|
@@ -241,68 +241,68 @@ function L(e) {
|
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
243
|
function k({ datePart: e, className: a }) {
|
|
244
|
-
const { inputId: r, labelId: o } = h(e), { t: l } =
|
|
244
|
+
const { inputId: r, labelId: o } = h(e), { t: l } = M(), c = `field.date.label.${e.toLowerCase()}`, m = l(c);
|
|
245
245
|
return /* @__PURE__ */ t.createElement("label", {
|
|
246
246
|
id: o,
|
|
247
247
|
htmlFor: r,
|
|
248
248
|
className: a
|
|
249
249
|
}, m);
|
|
250
250
|
}
|
|
251
|
-
const we = "_fields_b2cgx_1", ke = "_month_b2cgx_10", $e = "_day_b2cgx_11", qe = "_year_b2cgx_12", ze = "_dayInput_b2cgx_28", Xe = "_yearInput_b2cgx_29",
|
|
251
|
+
const we = "_fields_b2cgx_1", ke = "_month_b2cgx_10", $e = "_day_b2cgx_11", qe = "_year_b2cgx_12", ze = "_dayInput_b2cgx_28", Xe = "_yearInput_b2cgx_29", Je = "_monthTrigger_b2cgx_33", Ke = "_monthOption_b2cgx_53", I = {
|
|
252
252
|
fields: we,
|
|
253
253
|
month: ke,
|
|
254
254
|
day: $e,
|
|
255
255
|
year: qe,
|
|
256
256
|
dayInput: ze,
|
|
257
257
|
yearInput: Xe,
|
|
258
|
-
monthTrigger:
|
|
259
|
-
monthOption:
|
|
260
|
-
},
|
|
258
|
+
monthTrigger: Je,
|
|
259
|
+
monthOption: Ke
|
|
260
|
+
}, Qe = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ne, {
|
|
261
261
|
content: e,
|
|
262
262
|
locale: a
|
|
263
263
|
}), bt = () => {
|
|
264
|
-
const e = v(
|
|
265
|
-
|
|
266
|
-
]), a = Ae(
|
|
267
|
-
|
|
264
|
+
const e = v(_e, [
|
|
265
|
+
I.monthTrigger
|
|
266
|
+
]), a = Ae(Ie, I.monthOption, Pe), r = v(q, [
|
|
267
|
+
I.dayInput
|
|
268
268
|
]), o = v(q, [
|
|
269
|
-
|
|
269
|
+
I.yearInput
|
|
270
270
|
]);
|
|
271
271
|
return /* @__PURE__ */ t.createElement(n, {
|
|
272
|
-
className:
|
|
272
|
+
className: _(de, I.fields)
|
|
273
273
|
}, /* @__PURE__ */ t.createElement(n.Label, {
|
|
274
|
-
className:
|
|
274
|
+
className: _(ue, b.label)
|
|
275
275
|
}, /* @__PURE__ */ t.createElement(n.Label.Required, {
|
|
276
|
-
className:
|
|
276
|
+
className: _(pe, b.requiredMark)
|
|
277
277
|
})), /* @__PURE__ */ t.createElement(n.Month, {
|
|
278
|
-
className:
|
|
278
|
+
className: I.month
|
|
279
279
|
}, /* @__PURE__ */ t.createElement(n.Month.Label, {
|
|
280
|
-
className:
|
|
280
|
+
className: _(Y, b.label)
|
|
281
281
|
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
282
282
|
className: e
|
|
283
|
-
}, /* @__PURE__ */ t.createElement(
|
|
283
|
+
}, /* @__PURE__ */ t.createElement(Me, {
|
|
284
284
|
className: b.dropdownIcon
|
|
285
285
|
})), /* @__PURE__ */ t.createElement(n.Month.Options, {
|
|
286
|
-
className:
|
|
286
|
+
className: _(Ee, b.selectPopover, b.dropdownPopover)
|
|
287
287
|
}, /* @__PURE__ */ t.createElement(n.Month.Options.Option, {
|
|
288
288
|
className: a
|
|
289
289
|
}))), /* @__PURE__ */ t.createElement(n.Day, {
|
|
290
|
-
className:
|
|
290
|
+
className: I.day
|
|
291
291
|
}, /* @__PURE__ */ t.createElement(n.Day.Label, {
|
|
292
|
-
className:
|
|
292
|
+
className: _(Y, b.label)
|
|
293
293
|
}), /* @__PURE__ */ t.createElement(n.Day.Input, {
|
|
294
294
|
className: r
|
|
295
295
|
})), /* @__PURE__ */ t.createElement(n.Year, {
|
|
296
|
-
className:
|
|
296
|
+
className: I.year
|
|
297
297
|
}, /* @__PURE__ */ t.createElement(n.Year.Label, {
|
|
298
|
-
className:
|
|
298
|
+
className: _(Y, b.label)
|
|
299
299
|
}), /* @__PURE__ */ t.createElement(n.Year.Input, {
|
|
300
300
|
className: o
|
|
301
301
|
})), /* @__PURE__ */ t.createElement(n.Error, {
|
|
302
|
-
className:
|
|
303
|
-
}, /* @__PURE__ */ t.createElement(
|
|
304
|
-
className:
|
|
305
|
-
},
|
|
302
|
+
className: _(be, b.error)
|
|
303
|
+
}, /* @__PURE__ */ t.createElement(Re, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
304
|
+
className: _(fe, b.description)
|
|
305
|
+
}, Qe));
|
|
306
306
|
};
|
|
307
307
|
export {
|
|
308
308
|
bt as D
|
package/dist/component/{date-picker-field-rac-ufxxlmpA.js → date-picker-field-rac-33ARKAxQ.js}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as z } from "@wix/ricos/viewer";
|
|
2
2
|
import p from "classnames";
|
|
3
3
|
import e, { useState as L, useCallback as k, useContext as ee, useRef as P, useMemo as v } from "react";
|
|
4
4
|
import { parseDate as te } from "@internationalized/date";
|
|
5
5
|
import { UNSAFE_PortalProvider as re } from "react-aria";
|
|
6
6
|
import { I18nProvider as ae, DatePicker as ne, DatePickerStateContext as le, Group as oe, DateInput as se, DateSegment as ce, Calendar as ie, CalendarMonthPicker as me, CalendarYearPicker as de, CalendarGrid as ue, Dialog as ge, CalendarCell as Ee, Button as M, Select as x, SelectValue as Y, ListBox as w, ListBoxItem as B } from "react-aria-components";
|
|
7
|
-
import { D as f,
|
|
8
|
-
import { g as
|
|
7
|
+
import { D as f, bM as h, bJ as U, bE as O, bO as pe, X as fe, am as De, H as Ce, M as ye, I as Se, G as _e } from "./form-BG5UjjLA.js";
|
|
8
|
+
import { g as he, c as A } from "./calendar.module-BMUyMVja.js";
|
|
9
9
|
import { f as E, a as _ } from "./find-child-C60k4CxG.js";
|
|
10
|
-
import { D as
|
|
11
|
-
import { L as be } from "./field-label-headless-
|
|
12
|
-
import { D as ve, N as
|
|
13
|
-
import { a as Ie } from "./use-is-forced-open-dropdown-
|
|
14
|
-
import { i as
|
|
10
|
+
import { D as Ne, E as Te } from "./field-error-headless-RTyrenpC.js";
|
|
11
|
+
import { L as be } from "./field-label-headless-Bd00Hl2z.js";
|
|
12
|
+
import { D as ve, N as F, S as V } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
+
import { a as Ie } from "./use-is-forced-open-dropdown-BR1U1l5w.js";
|
|
14
|
+
import { i as Oe } from "./date-availability-C9EOQUiy.js";
|
|
15
15
|
import { C as I } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
|
-
import { E as
|
|
16
|
+
import { E as Fe } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as Le } from "./custom-focus-class-_483Pkwp.js";
|
|
18
18
|
import { s as D } from "./field-rac.module-DcyJyi2B.js";
|
|
19
|
-
import { u as Pe } from "./use-hoverable-input-class-name-
|
|
19
|
+
import { u as Pe } from "./use-hoverable-input-class-name-B9diy0Mr.js";
|
|
20
20
|
const Ae = [
|
|
21
21
|
f.SUNDAY,
|
|
22
22
|
f.MONDAY,
|
|
@@ -28,17 +28,17 @@ const Ae = [
|
|
|
28
28
|
], Re = {
|
|
29
29
|
availableDays: Ae
|
|
30
30
|
}, a = ({ children: t }) => {
|
|
31
|
-
const { id: r, value: l, onChange: n, disabled: i, required: c, onBlur: u, onFocus: o, FieldLayout: m, hasError: d, readOnly: C } =
|
|
32
|
-
const
|
|
33
|
-
n(
|
|
31
|
+
const { id: r, value: l, onChange: n, disabled: i, required: c, onBlur: u, onFocus: o, FieldLayout: m, hasError: d, readOnly: C } = h(), { labelId: y } = U(), { regionalFormat: N } = O(), [s, T] = L(null), [K, H] = L(!1), b = Ie(r), W = k((X) => {
|
|
32
|
+
const Z = We(X);
|
|
33
|
+
n(Z);
|
|
34
34
|
}, [
|
|
35
35
|
n
|
|
36
|
-
]), $ = E(t, a.Label), q = E(t, a.Control), G = E(t, a.Calendar), j = E(t, a.Description),
|
|
36
|
+
]), $ = E(t, a.Label), q = E(t, a.Control), G = E(t, a.Calendar), j = E(t, a.Description), J = E(t, a.Error), Q = He(l);
|
|
37
37
|
return /* @__PURE__ */ e.createElement(m, {
|
|
38
38
|
fieldId: r,
|
|
39
39
|
renderLabel: () => $,
|
|
40
40
|
renderInput: () => /* @__PURE__ */ e.createElement(ae, {
|
|
41
|
-
locale:
|
|
41
|
+
locale: N
|
|
42
42
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
43
43
|
ref: T,
|
|
44
44
|
style: {
|
|
@@ -48,7 +48,7 @@ const Ae = [
|
|
|
48
48
|
getContainer: () => s
|
|
49
49
|
}, /* @__PURE__ */ e.createElement(ne, {
|
|
50
50
|
"aria-labelledby": y,
|
|
51
|
-
value:
|
|
51
|
+
value: Q,
|
|
52
52
|
onChange: W,
|
|
53
53
|
isDisabled: i,
|
|
54
54
|
isInvalid: d,
|
|
@@ -61,10 +61,10 @@ const Ae = [
|
|
|
61
61
|
}, q, _(G, {
|
|
62
62
|
isForcedOpen: b
|
|
63
63
|
})))),
|
|
64
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
64
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, J, j)
|
|
65
65
|
});
|
|
66
66
|
}, ke = ({ children: t, className: r }) => {
|
|
67
|
-
const { inputId: l, ariaDescribedBy: n } = U(), { hasError: i, disabled: c, readOnly: u } =
|
|
67
|
+
const { inputId: l, ariaDescribedBy: n } = U(), { hasError: i, disabled: c, readOnly: u } = h(), o = ee(le), m = k((d) => {
|
|
68
68
|
if (!o || o.isOpen || c || u)
|
|
69
69
|
return;
|
|
70
70
|
const C = d.target;
|
|
@@ -85,7 +85,7 @@ const Ae = [
|
|
|
85
85
|
onClick: m
|
|
86
86
|
}, t);
|
|
87
87
|
}, Me = ({ className: t }) => {
|
|
88
|
-
const { id: r, placeholder: l } =
|
|
88
|
+
const { id: r, placeholder: l } = h(), { regionalFormat: n } = O(), i = P(null), c = P(!1);
|
|
89
89
|
pe(() => {
|
|
90
90
|
var o;
|
|
91
91
|
(o = i.current) == null || o.focus({
|
|
@@ -118,15 +118,15 @@ const Ae = [
|
|
|
118
118
|
}, xe = ({ children: t, className: r }) => /* @__PURE__ */ e.createElement(ve, {
|
|
119
119
|
className: r
|
|
120
120
|
}, t), g = ({ children: t, className: r, ...l }) => {
|
|
121
|
-
const { isForcedOpen: n } = l, { regionalFormat: i } =
|
|
121
|
+
const { isForcedOpen: n } = l, { regionalFormat: i } = O(), { availability: c } = h(), u = v(() => he(i), [
|
|
122
122
|
i
|
|
123
123
|
]), o = v(() => (s) => {
|
|
124
124
|
const T = new Date(s.year, s.month - 1, s.day);
|
|
125
|
-
return !
|
|
125
|
+
return !Oe(T, c || Re);
|
|
126
126
|
}, [
|
|
127
127
|
c
|
|
128
|
-
]), m = E(t, g.Day) ?? /* @__PURE__ */ e.createElement(g.Day, null), d = E(t, g.PreviousTrigger), C = E(t, g.NextTrigger), y = E(t, g.MonthTrigger),
|
|
129
|
-
return /* @__PURE__ */ e.createElement(
|
|
128
|
+
]), m = E(t, g.Day) ?? /* @__PURE__ */ e.createElement(g.Day, null), d = E(t, g.PreviousTrigger), C = E(t, g.NextTrigger), y = E(t, g.MonthTrigger), N = E(t, g.YearTrigger);
|
|
129
|
+
return /* @__PURE__ */ e.createElement(F, {
|
|
130
130
|
className: r,
|
|
131
131
|
containerPadding: 0
|
|
132
132
|
}, /* @__PURE__ */ e.createElement(Ye, {
|
|
@@ -143,7 +143,7 @@ const Ae = [
|
|
|
143
143
|
popoverClassName: r
|
|
144
144
|
})), /* @__PURE__ */ e.createElement(de, {
|
|
145
145
|
visibleYears: 100
|
|
146
|
-
}, (s) => _(
|
|
146
|
+
}, (s) => _(N, {
|
|
147
147
|
ariaLabel: s["aria-label"],
|
|
148
148
|
selectedKey: s.value,
|
|
149
149
|
onSelectionChange: s.onChange,
|
|
@@ -176,7 +176,7 @@ const Ae = [
|
|
|
176
176
|
onSelectionChange: c
|
|
177
177
|
}, /* @__PURE__ */ e.createElement(V, {
|
|
178
178
|
className: r
|
|
179
|
-
}, /* @__PURE__ */ e.createElement(Y, null), t), /* @__PURE__ */ e.createElement(
|
|
179
|
+
}, /* @__PURE__ */ e.createElement(Y, null), t), /* @__PURE__ */ e.createElement(F, {
|
|
180
180
|
className: o,
|
|
181
181
|
containerPadding: 0
|
|
182
182
|
}, /* @__PURE__ */ e.createElement(w, {
|
|
@@ -192,7 +192,7 @@ const Ae = [
|
|
|
192
192
|
onSelectionChange: c
|
|
193
193
|
}, /* @__PURE__ */ e.createElement(V, {
|
|
194
194
|
className: r
|
|
195
|
-
}, /* @__PURE__ */ e.createElement(Y, null), t), /* @__PURE__ */ e.createElement(
|
|
195
|
+
}, /* @__PURE__ */ e.createElement(Y, null), t), /* @__PURE__ */ e.createElement(F, {
|
|
196
196
|
className: o,
|
|
197
197
|
containerPadding: 0
|
|
198
198
|
}, /* @__PURE__ */ e.createElement(w, {
|
|
@@ -211,7 +211,7 @@ a.Control = ke;
|
|
|
211
211
|
a.Input = Me;
|
|
212
212
|
a.Trigger = xe;
|
|
213
213
|
a.Calendar = g;
|
|
214
|
-
a.Description =
|
|
214
|
+
a.Description = Ne;
|
|
215
215
|
a.Error = Te;
|
|
216
216
|
function He(t) {
|
|
217
217
|
if (!t)
|
|
@@ -264,14 +264,14 @@ const Ge = (t) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
264
264
|
strokeWidth: "1.5",
|
|
265
265
|
strokeLinecap: "round",
|
|
266
266
|
strokeLinejoin: "round"
|
|
267
|
-
})), je = "_control_1le52_1",
|
|
267
|
+
})), je = "_control_1le52_1", Je = "_segments_1le52_14", Qe = "_trigger_1le52_72", Xe = "_calendarPopover_1le52_103 _textOnFillOptions_vf5u1_8", Ze = "_calendarDay_1le52_246", ze = "_dayNumber_1le52_253", S = {
|
|
268
268
|
control: je,
|
|
269
|
-
segments:
|
|
270
|
-
trigger:
|
|
271
|
-
calendarPopover:
|
|
272
|
-
calendarDay:
|
|
273
|
-
dayNumber:
|
|
274
|
-
}, et = ({ content: t, locale: r }) => /* @__PURE__ */ e.createElement(
|
|
269
|
+
segments: Je,
|
|
270
|
+
trigger: Qe,
|
|
271
|
+
calendarPopover: Xe,
|
|
272
|
+
calendarDay: Ze,
|
|
273
|
+
dayNumber: ze
|
|
274
|
+
}, et = ({ content: t, locale: r }) => /* @__PURE__ */ e.createElement(z, {
|
|
275
275
|
content: t,
|
|
276
276
|
locale: r
|
|
277
277
|
}), tt = {
|
|
@@ -311,7 +311,7 @@ const Ge = (t) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
311
311
|
className: p(A.dayNumber, S.dayNumber)
|
|
312
312
|
}, r))), /* @__PURE__ */ e.createElement(a.Error, {
|
|
313
313
|
className: p(ye, D.error)
|
|
314
|
-
}, /* @__PURE__ */ e.createElement(
|
|
314
|
+
}, /* @__PURE__ */ e.createElement(Fe, null), /* @__PURE__ */ e.createElement(a.Error.Text, null)), /* @__PURE__ */ e.createElement(a.Description, {
|
|
315
315
|
className: p(Se, D.description)
|
|
316
316
|
}, et));
|
|
317
317
|
};
|