@wix/form-elements 1.125.0 → 1.127.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-Z-zuUkSk.js → appointment-rac-BrC7gcpn.js} +5 -5
- package/dist/component/{bookings-address-rac-CKDBaGLn.js → bookings-address-rac-D-UmBxjD.js} +1 -1
- package/dist/component/{bookings-email-rac-D4aI_Jzq.js → bookings-email-rac-CjHDzU0Q.js} +1 -1
- package/dist/component/{bookings-first-name-rac-zzQHBi06.js → bookings-first-name-rac-ChBkkkWm.js} +1 -1
- package/dist/component/{bookings-header-rac-Ck8ODZZj.js → bookings-header-rac-ERfGeYyw.js} +1 -1
- package/dist/component/{bookings-last-name-rac-Bf6GZjrX.js → bookings-last-name-rac-CuTJ7Y8w.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DFDj9-BP.js → bookings-login-bar-rac-pudlQ67l.js} +6 -6
- package/dist/component/{bookings-phone-rac-Bv1-qlMw.js → bookings-phone-rac-nLPnLRfS.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-D7B-s_XR.js → bookings-rich-text-rac-DOmGQlyG.js} +1 -1
- package/dist/component/{checkbox-field-rac-CiKYZvTz.js → checkbox-field-rac-DLazY-iO.js} +86 -86
- package/dist/component/{checkbox-group-field-headless-CV6U8eSj.js → checkbox-group-field-headless-CPyWmFBH.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-BQlPsFkN.js → checkbox-group-field-rac-Bir3gaI9.js} +6 -6
- package/dist/component/{checkbox-group-rac-DS3C_O04.js → checkbox-group-rac-BGXUl-sJ.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-DOAYUQ_Q.js → checkbox-indicator-module-classes-Bqo0QILF.js} +1 -1
- package/dist/component/{checkbox-rac-dUEfjEya.js → checkbox-rac-D_wZVUFV.js} +1 -1
- package/dist/component/{contacts-address-rac-CpszOK8V.js → contacts-address-rac-CNldSQbf.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-8VQHFq-M.js → contacts-birthdate-rac-AVyldaRF.js} +1 -1
- package/dist/component/{contacts-company-rac-BOBr0Kk7.js → contacts-company-rac-CiP1Ctpa.js} +1 -1
- package/dist/component/{contacts-email-rac-CTLHE5HL.js → contacts-email-rac-CzjMVEJZ.js} +1 -1
- package/dist/component/{contacts-first-name-rac-nYNH569s.js → contacts-first-name-rac-G0kE0HmA.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BX1D0mI7.js → contacts-last-name-rac-cnTTtnMZ.js} +1 -1
- package/dist/component/{contacts-phone-rac-DKbEfOsH.js → contacts-phone-rac-DJ9oxox4.js} +1 -1
- package/dist/component/{contacts-position-rac-B0y-O-4j.js → contacts-position-rac-e0uQ-eqL.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-5yYJn7F0.js → contacts-subscribe-rac-D4J2x78f.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BB5ngpkv.js → contacts-tax-id-rac-DwJuNH-C.js} +1 -1
- package/dist/component/{date-availability-C87SaTKG.js → date-availability-D2BSwZ_r.js} +1 -1
- package/dist/component/{date-input-field-rac-CS8QQO3m.js → date-input-field-rac-ztJ02C60.js} +42 -42
- package/dist/component/{date-input-rac-VHB7v5UL.js → date-input-rac-D-SFsC6P.js} +1 -1
- package/dist/component/{date-picker-field-rac-Cri5p6Ms.js → date-picker-field-rac-DaNwsa8z.js} +15 -15
- package/dist/component/{date-picker-rac-B57G3x5E.js → date-picker-rac-Bn0sA6P1.js} +1 -1
- package/dist/component/{date-time-input-field-rac-4Qka-NnP.js → date-time-input-field-rac-D-ArMpcJ.js} +64 -64
- package/dist/component/{date-time-input-rac-DGCjjMFb.js → date-time-input-rac-qYLa3IDx.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DWvCwPTc.js → dext-checkbox-group-rac-Dir6tyvo.js} +2 -2
- package/dist/component/{dext-checkbox-rac-33LSTC36.js → dext-checkbox-rac-ByiMc3BH.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Bf7NykP3.js → dext-date-picker-rac-BwOozu5y.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-Bao0DdBz.js → dext-date-time-input-rac-CaJEzZa4.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DmcOs3JV.js → dext-dropdown-rac-DJnMjggU.js} +1 -1
- package/dist/component/{dext-email-rac-BQZuGJyR.js → dext-email-rac-CF4SQ86l.js} +1 -1
- package/dist/component/{dext-number-input-rac-BkRW3syI.js → dext-number-input-rac--3goVI8C.js} +1 -1
- package/dist/component/{dext-phone-rac-BQTtIO3M.js → dext-phone-rac-MYJYG040.js} +1 -1
- package/dist/component/{dext-radio-group-rac-8OX3bK1R.js → dext-radio-group-rac-Q2J5Hk5W.js} +4 -4
- package/dist/component/{dext-rating-input-rac-DzsAbe6_.js → dext-rating-input-rac-CAWhD-lI.js} +1 -1
- package/dist/component/{dext-tags-rac-vBL9kqB4.js → dext-tags-rac-DyxI5ooy.js} +4 -4
- package/dist/component/{dext-text-area-rac-DnaX_wQ4.js → dext-text-area-rac-CZpM-r49.js} +1 -1
- package/dist/component/{dext-text-input-rac-D94mFw2C.js → dext-text-input-rac-Bv5Mhyw6.js} +1 -1
- package/dist/component/{dext-url-input-rac-BbGsxHGa.js → dext-url-input-rac-BkbTjbAI.js} +1 -1
- package/dist/component/{donation-rac-BMSQOEKY.js → donation-rac-DZjFeJFy.js} +36 -36
- package/dist/component/{dropdown-field-headless-DfV7Hu_x.js → dropdown-field-headless-C7l2TQYy.js} +16 -16
- package/dist/component/{dropdown-field-rac-DV8KVcfL.js → dropdown-field-rac-DOAlecw8.js} +5 -5
- package/dist/component/{dropdown-rac-CWxp-u5t.js → dropdown-rac-D8HtaeBe.js} +1 -1
- package/dist/component/{ecom-address-rac-DDUa9lKf.js → ecom-address-rac-B25o-GVv.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-C6Bl1HwZ.js → ecom-subscription-checkbox-rac-NvdWnD0v.js} +2 -2
- package/dist/component/{email-input-field-rac-DssxRa6A.js → email-input-field-rac-rWyojsu0.js} +19 -19
- package/dist/component/{events-repeater-rac-C-Y70-hO.js → events-repeater-rac-D2HvNt0y.js} +11 -11
- package/dist/component/{events-rsvp-rac-CH8cmC73.js → events-rsvp-rac-D4WLn0Bx.js} +4 -4
- package/dist/component/{field-error-headless-B-dJmWQP.js → field-error-headless-DU0YsEXR.js} +6 -6
- package/dist/component/{field-label-headless-BMozN-s1.js → field-label-headless-CvdTZi6i.js} +1 -1
- package/dist/component/field-rac.module-BIBNQEOK.js +25 -0
- package/dist/component/{file-upload-rac-q-JbJbUf.js → file-upload-rac-CMelyfA8.js} +68 -68
- package/dist/component/{fixed-payment-rac-BUeec_59.js → fixed-payment-rac-CewsqE-k.js} +9 -9
- package/dist/component/{form-D_BE2Fzt.js → form-D9IxiDXP.js} +2400 -2346
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +3 -3
- package/dist/component/{header-field-rac-DWDGXZ-1.js → header-field-rac-CYBfb_5D.js} +6 -6
- package/dist/component/{header-rac-DSJRq-aS.js → header-rac-BIq3DmbL.js} +1 -1
- package/dist/component/{image-choice-rac-CZhE0M_b.js → image-choice-rac-aOObRIMi.js} +12 -12
- package/dist/component/{index-COa1NdN9.js → index-BXqA4oNj.js} +15 -15
- package/dist/component/{index-CbQKmL2D.js → index-D-g3wQ-z.js} +43 -43
- package/dist/component/{isObjectLike-OXbnWiQZ.js → isObjectLike-BNDXzCto.js} +7 -7
- package/dist/component/{multiline-address-field-rac-uwvOu2s8.js → multiline-address-field-rac-BcTa7Von.js} +8 -8
- package/dist/component/{multiline-address-rac-dechT7TO.js → multiline-address-rac-Cd_BFreP.js} +1 -1
- package/dist/component/{number-input-field-rac-Dzd1zIZ3.js → number-input-field-rac-_JlH34_3.js} +9 -9
- package/dist/component/{number-input-rac-CEkIm28k.js → number-input-rac-CiM20ScT.js} +1 -1
- package/dist/component/{password-rac-CWitmbZm.js → password-rac-DrpXSY74.js} +32 -32
- package/dist/component/{payment-input-rac-CM0uC5on.js → payment-input-rac-RnMeVWDc.js} +15 -15
- package/dist/component/{phone-input-field-rac-fWGQuICi.js → phone-input-field-rac-nNp7D7gK.js} +39 -39
- package/dist/component/{phone-rac-Yz8_o8zI.js → phone-rac-B2JjPT2w.js} +1 -1
- package/dist/component/{product-list-rac-CEWFFKC_.js → product-list-rac-Cv_fjFn3.js} +28 -28
- package/dist/component/{quiz-radio-group-rac-D0x2dT8O.js → quiz-radio-group-rac-CNqF6Tq3.js} +1 -1
- package/dist/component/{radio-button-module-classes-ByzyRWGZ.js → radio-button-module-classes-vqR4TN-z.js} +3 -3
- package/dist/component/{radio-group-field-rac-Bp-gAa8G.js → radio-group-field-rac-Bpyr40q-.js} +5 -5
- package/dist/component/{radio-group-rac-v2iHQ7Do.js → radio-group-rac-DBLPP0YC.js} +1 -1
- package/dist/component/{rating-input-field-rac-Cy2FMWGM.js → rating-input-field-rac-BOi0G37L.js} +10 -10
- package/dist/component/{rating-input-rac-BbVp3WB3.js → rating-input-rac-CxpmV0Pa.js} +1 -1
- package/dist/component/{rich-content-rac.module-CD6SVCbh.js → rich-content-rac.module-Dmm9GyQq.js} +1 -1
- package/dist/component/{rich-text-field-rac-BpNrx6yp.js → rich-text-field-rac-C466OrTf.js} +9 -9
- package/dist/component/{rich-text-rac-Dhy7uiP1.js → rich-text-rac-BvVxD7oJ.js} +1 -1
- package/dist/component/{service-dropdown-rac-CAneRKHw.js → service-dropdown-rac-pmUKH0sP.js} +14 -14
- package/dist/component/{services-multi-choice-rac-D6sXFbh-.js → services-multi-choice-rac-B65i6q2D.js} +7 -7
- package/dist/component/signature-rac-BRyM06Vz.js +918 -0
- package/dist/component/{submit-button-rac-BXXTjOsT.js → submit-button-rac-DaCRjZlQ.js} +15 -15
- package/dist/component/{tags-field-rac-C5UfRny_.js → tags-field-rac-CEdfh-EQ.js} +17 -17
- package/dist/component/{tags-rac-B9CeCJ7N.js → tags-rac-CGSTQ0qK.js} +1 -1
- package/dist/component/{text-area-field-rac-CPRcMTLB.js → text-area-field-rac-C-EHPWwQ.js} +15 -15
- package/dist/component/{text-area-rac-DTP1F7-n.js → text-area-rac-Df1nSb2q.js} +1 -1
- package/dist/component/{text-input-field-rac-BNWvKfLB.js → text-input-field-rac-DmCZtBi_.js} +4 -4
- package/dist/component/{text-input-headless-CLQsDBPq.js → text-input-headless-DAxEZP1P.js} +8 -8
- package/dist/component/{text-input-rac-D-x0vJ11.js → text-input-rac-DgpO17dl.js} +1 -1
- package/dist/component/{time-input-rac-CDyfV8is.js → time-input-rac-Dld_tLub.js} +10 -10
- package/dist/component/{url-input-field-rac-DS-y2pYu.js → url-input-field-rac-DHZ6bpxZ.js} +10 -10
- package/dist/component/{url-input-rac-mPuawQc5.js → url-input-rac-CZlWy5RB.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-C8fUy9a7.js → use-dropdown-option-class-name-opBd-YJA.js} +3 -3
- package/dist/component/{use-dropdown-trigger-class-name-TB7azWxx.js → use-dropdown-trigger-class-name-BGQH0WCO.js} +10 -10
- package/dist/component/use-element-state-class-name-B2ecLjwN.js +20 -0
- package/dist/component/{use-hoverable-input-class-name-Dd0kMkOT.js → use-hoverable-input-class-name-B42rAp82.js} +3 -3
- package/dist/component/{use-service-options-base-CZXMLBQ0.js → use-service-options-base-D60-jNUT.js} +4 -4
- package/dist/component/use-text-input-class-name-DGpCdZ_e.js +6 -0
- package/dist/form.d.ts +11 -1
- package/package.json +23 -23
- package/dist/component/field-rac.module-DQxyEwK7.js +0 -26
- package/dist/component/signature-rac-D_mfewhJ.js +0 -794
- package/dist/component/use-element-state-class-name-BUWRj3G2.js +0 -22
- package/dist/component/use-text-input-class-name-BJ6Qm1bq.js +0 -6
package/dist/component/{date-input-field-rac-CS8QQO3m.js → date-input-field-rac-ztJ02C60.js}
RENAMED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { RicosViewer as ee } from "@wix/ricos/viewer";
|
|
2
2
|
import h from "classnames";
|
|
3
|
-
import t, { useMemo as
|
|
3
|
+
import t, { useMemo as y, useState as x, useCallback as v, useRef as w } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as te } from "react-aria";
|
|
5
5
|
import { ListBoxItem as ae, Select as ne, TextField as k, SelectValue as re, Input as $ } from "react-aria-components";
|
|
6
|
-
import {
|
|
6
|
+
import { bh as g, be as q, b9 as V, aO as K, a$ as j, aB as d, br as S, aI as se, aP as oe, b6 as le, bj as z, I as A, U as ce, K as ie, v as de, p as me } from "./form-D9IxiDXP.js";
|
|
7
7
|
import { f as u, a as B } from "./find-child-C60k4CxG.js";
|
|
8
8
|
import { g as ue } from "./helpers-HmkkXrh2.js";
|
|
9
|
-
import { D as pe, E as Ee } from "./field-error-headless-
|
|
10
|
-
import { L as fe } from "./field-label-headless-
|
|
9
|
+
import { D as pe, E as Ee } from "./field-error-headless-DU0YsEXR.js";
|
|
10
|
+
import { L as fe } from "./field-label-headless-CvdTZi6i.js";
|
|
11
11
|
import { F as be } from "./fieldset-headless-CD3fds9J.js";
|
|
12
12
|
import { N as he, S as Ie } from "./non-modal-popover-DtIMXHbe.js";
|
|
13
|
-
import { a as ge, u as De } from "./use-dropdown-trigger-class-name-
|
|
14
|
-
import { V as
|
|
15
|
-
import { C as
|
|
13
|
+
import { a as ge, u as De } from "./use-dropdown-trigger-class-name-BGQH0WCO.js";
|
|
14
|
+
import { V as Oe, u as ye } from "./use-dropdown-option-class-name-opBd-YJA.js";
|
|
15
|
+
import { C as Ne } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as Le } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as _e } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
-
import { s as E } from "./field-rac.module-
|
|
19
|
-
import { u as U } from "./use-text-input-class-name-
|
|
18
|
+
import { s as E } from "./field-rac.module-BIBNQEOK.js";
|
|
19
|
+
import { u as U } from "./use-text-input-class-name-DGpCdZ_e.js";
|
|
20
20
|
const n = ({ children: e, className: a }) => {
|
|
21
|
-
const { id: r, required: s, onBlur: o, onFocus: l, FieldLayout: c } = g(), { inputId: m, labelId: i, ariaDescribedBy: f } = q(), { regionalFormat: p } = V(), b =
|
|
21
|
+
const { id: r, required: s, onBlur: o, onFocus: l, FieldLayout: c } = g(), { inputId: m, labelId: i, ariaDescribedBy: f } = q(), { regionalFormat: p } = V(), b = y(() => K(p).filter(j).map((Y) => Y.toUpperCase()), [
|
|
22
22
|
p
|
|
23
|
-
]), L = u(e, n.Label),
|
|
23
|
+
]), L = u(e, n.Label), T = u(e, n.Description), _ = u(e, n.Error), F = {
|
|
24
24
|
[d.MONTH]: u(e, n.Month),
|
|
25
25
|
[d.DAY]: u(e, n.Day),
|
|
26
26
|
[d.YEAR]: u(e, n.Year)
|
|
@@ -39,16 +39,16 @@ const n = ({ children: e, className: a }) => {
|
|
|
39
39
|
onFocus: l,
|
|
40
40
|
className: a
|
|
41
41
|
}, F[b[0]], F[b[1]], F[b[2]]),
|
|
42
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, _,
|
|
42
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, _, T)
|
|
43
43
|
});
|
|
44
44
|
}, D = ({ children: e, className: a }) => {
|
|
45
|
-
const { id: r, disabled: s, readOnly: o, showDateLabels: l, hidePlaceholder: c } = g(), { labelId: m } =
|
|
45
|
+
const { id: r, disabled: s, readOnly: o, showDateLabels: l, hidePlaceholder: c } = g(), { labelId: m } = O(d.MONTH), { partValue: i, partError: f, onPartChange: p } = N(d.MONTH), { t: b } = S(), [L, T] = x(!1), _ = ge(r), [F, Y] = x(null), Q = c ? void 0 : b("field.date.placeholder.month"), G = v((R) => {
|
|
46
46
|
o || p(typeof R == "string" ? R : "");
|
|
47
47
|
}, [
|
|
48
48
|
p,
|
|
49
49
|
o
|
|
50
50
|
]), J = v((R) => {
|
|
51
|
-
|
|
51
|
+
T(R && !o);
|
|
52
52
|
}, [
|
|
53
53
|
o
|
|
54
54
|
]), W = u(e, D.Label), X = u(e, D.Trigger), Z = u(e, D.Options);
|
|
@@ -65,10 +65,10 @@ const n = ({ children: e, className: a }) => {
|
|
|
65
65
|
}, /* @__PURE__ */ t.createElement(ne, {
|
|
66
66
|
"aria-labelledby": l ? m : void 0,
|
|
67
67
|
value: i || null,
|
|
68
|
-
onChange:
|
|
68
|
+
onChange: G,
|
|
69
69
|
isDisabled: s,
|
|
70
70
|
isInvalid: f,
|
|
71
|
-
placeholder:
|
|
71
|
+
placeholder: Q,
|
|
72
72
|
isOpen: _ || L,
|
|
73
73
|
onOpenChange: _ ? void 0 : J
|
|
74
74
|
}, X, B(Z, {
|
|
@@ -78,7 +78,7 @@ const n = ({ children: e, className: a }) => {
|
|
|
78
78
|
datePart: d.MONTH,
|
|
79
79
|
className: e
|
|
80
80
|
}), Ce = ({ children: e, className: a }) => {
|
|
81
|
-
const { id: r, readOnly: s } = g(), { inputId: o } =
|
|
81
|
+
const { id: r, readOnly: s } = g(), { inputId: o } = O(d.MONTH), { partError: l, isFirstPart: c } = N(d.MONTH), m = w(null);
|
|
82
82
|
return z(() => {
|
|
83
83
|
var i;
|
|
84
84
|
c && ((i = m.current) == null || i.focus());
|
|
@@ -90,15 +90,15 @@ const n = ({ children: e, className: a }) => {
|
|
|
90
90
|
"data-invalid": l || void 0,
|
|
91
91
|
"data-readonly": s || void 0
|
|
92
92
|
}, /* @__PURE__ */ t.createElement(re, null), e);
|
|
93
|
-
},
|
|
94
|
-
const { isForcedOpen: s } = r, { language: o } = V(), l =
|
|
93
|
+
}, P = ({ children: e, className: a, ...r }) => {
|
|
94
|
+
const { isForcedOpen: s } = r, { language: o } = V(), l = y(() => ue(o), [
|
|
95
95
|
o
|
|
96
|
-
]), c = u(e,
|
|
96
|
+
]), c = u(e, P.Option) ?? /* @__PURE__ */ t.createElement(P.Option, null);
|
|
97
97
|
return /* @__PURE__ */ t.createElement(he, {
|
|
98
98
|
className: a,
|
|
99
99
|
containerPadding: 0,
|
|
100
100
|
offset: 0
|
|
101
|
-
}, /* @__PURE__ */ t.createElement(
|
|
101
|
+
}, /* @__PURE__ */ t.createElement(Oe, {
|
|
102
102
|
isForcedOpen: s,
|
|
103
103
|
autoFocus: s ? !1 : void 0
|
|
104
104
|
}, l.map((m, i) => B(c, {
|
|
@@ -116,10 +116,10 @@ const n = ({ children: e, className: a }) => {
|
|
|
116
116
|
};
|
|
117
117
|
D.Label = Fe;
|
|
118
118
|
D.Trigger = Ce;
|
|
119
|
-
D.Options =
|
|
120
|
-
|
|
119
|
+
D.Options = P;
|
|
120
|
+
P.Option = Me;
|
|
121
121
|
const C = ({ children: e, className: a }) => {
|
|
122
|
-
const { disabled: r, readOnly: s, showDateLabels: o } = g(), { labelId: l } =
|
|
122
|
+
const { disabled: r, readOnly: s, showDateLabels: o } = g(), { labelId: l } = O(d.DAY), { partValue: c, partError: m, onPartChange: i } = N(d.DAY), f = u(e, C.Label), p = u(e, C.Input);
|
|
123
123
|
return /* @__PURE__ */ t.createElement("div", {
|
|
124
124
|
className: a,
|
|
125
125
|
"data-date-field": !0
|
|
@@ -135,7 +135,7 @@ const C = ({ children: e, className: a }) => {
|
|
|
135
135
|
datePart: d.DAY,
|
|
136
136
|
className: e
|
|
137
137
|
}), Ae = ({ className: e }) => {
|
|
138
|
-
const { id: a, hidePlaceholder: r } = g(), { inputId: s } =
|
|
138
|
+
const { id: a, hidePlaceholder: r } = g(), { inputId: s } = O(d.DAY), { isFirstPart: o } = N(d.DAY), { t: l } = S(), c = w(null), m = r ? void 0 : l("field.date.placeholder.day");
|
|
139
139
|
return z(() => {
|
|
140
140
|
var i;
|
|
141
141
|
o && ((i = c.current) == null || i.focus());
|
|
@@ -152,7 +152,7 @@ const C = ({ children: e, className: a }) => {
|
|
|
152
152
|
C.Label = Re;
|
|
153
153
|
C.Input = Ae;
|
|
154
154
|
const M = ({ children: e, className: a }) => {
|
|
155
|
-
const { disabled: r, readOnly: s, showDateLabels: o } = g(), { labelId: l } =
|
|
155
|
+
const { disabled: r, readOnly: s, showDateLabels: o } = g(), { labelId: l } = O(d.YEAR), { partValue: c, partError: m, onPartChange: i } = N(d.YEAR), f = u(e, M.Label), p = u(e, M.Input);
|
|
156
156
|
return /* @__PURE__ */ t.createElement("div", {
|
|
157
157
|
className: a,
|
|
158
158
|
"data-date-field": !0
|
|
@@ -164,11 +164,11 @@ const M = ({ children: e, className: a }) => {
|
|
|
164
164
|
isReadOnly: s,
|
|
165
165
|
isInvalid: m
|
|
166
166
|
}, p));
|
|
167
|
-
},
|
|
167
|
+
}, Pe = ({ className: e }) => /* @__PURE__ */ t.createElement(H, {
|
|
168
168
|
datePart: d.YEAR,
|
|
169
169
|
className: e
|
|
170
|
-
}),
|
|
171
|
-
const { id: a, hidePlaceholder: r } = g(), { inputId: s } =
|
|
170
|
+
}), Se = ({ className: e }) => {
|
|
171
|
+
const { id: a, hidePlaceholder: r } = g(), { inputId: s } = O(d.YEAR), { isFirstPart: o } = N(d.YEAR), { t: l } = S(), c = w(null), m = r ? void 0 : l("field.date.placeholder.year");
|
|
172
172
|
return z(() => {
|
|
173
173
|
var i;
|
|
174
174
|
o && ((i = c.current) == null || i.focus());
|
|
@@ -182,17 +182,17 @@ const M = ({ children: e, className: a }) => {
|
|
|
182
182
|
"data-hook": d.YEAR
|
|
183
183
|
});
|
|
184
184
|
};
|
|
185
|
-
M.Label =
|
|
186
|
-
M.Input =
|
|
185
|
+
M.Label = Pe;
|
|
186
|
+
M.Input = Se;
|
|
187
187
|
n.Label = fe;
|
|
188
188
|
n.Month = D;
|
|
189
189
|
n.Day = C;
|
|
190
190
|
n.Year = M;
|
|
191
191
|
n.Description = pe;
|
|
192
192
|
n.Error = Ee;
|
|
193
|
-
function
|
|
193
|
+
function O(e) {
|
|
194
194
|
const { inputId: a } = q();
|
|
195
|
-
return
|
|
195
|
+
return y(() => {
|
|
196
196
|
const r = e.toLowerCase();
|
|
197
197
|
return {
|
|
198
198
|
inputId: `${a}-${r}-input`,
|
|
@@ -203,10 +203,10 @@ function y(e) {
|
|
|
203
203
|
e
|
|
204
204
|
]);
|
|
205
205
|
}
|
|
206
|
-
function
|
|
207
|
-
const { value: a, onChange: r, hasError: s = !1 } = g(), { regionalFormat: o } = V(), l =
|
|
206
|
+
function N(e) {
|
|
207
|
+
const { value: a, onChange: r, hasError: s = !1 } = g(), { regionalFormat: o } = V(), l = y(() => se(a ?? ""), [
|
|
208
208
|
a
|
|
209
|
-
]), c =
|
|
209
|
+
]), c = y(() => oe(s, a ?? ""), [
|
|
210
210
|
a,
|
|
211
211
|
s
|
|
212
212
|
]), m = l[e] || "", i = v((p) => {
|
|
@@ -216,7 +216,7 @@ function O(e) {
|
|
|
216
216
|
r,
|
|
217
217
|
l,
|
|
218
218
|
e
|
|
219
|
-
]), f =
|
|
219
|
+
]), f = y(() => K(o).filter(j).map((L) => L.toUpperCase())[0] === e, [
|
|
220
220
|
o,
|
|
221
221
|
e
|
|
222
222
|
]);
|
|
@@ -228,15 +228,15 @@ function O(e) {
|
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
230
|
function H({ datePart: e, className: a }) {
|
|
231
|
-
const { inputId: r, labelId: s } =
|
|
231
|
+
const { inputId: r, labelId: s } = O(e), { t: o } = S(), l = `field.date.label.${e.toLowerCase()}`, c = o(l);
|
|
232
232
|
return /* @__PURE__ */ t.createElement("label", {
|
|
233
233
|
id: s,
|
|
234
234
|
htmlFor: r,
|
|
235
235
|
className: a
|
|
236
236
|
}, c);
|
|
237
237
|
}
|
|
238
|
-
const
|
|
239
|
-
fields:
|
|
238
|
+
const Te = "_fields_16lz4_1", Ye = "_month_16lz4_10", ve = "_day_16lz4_11", we = "_year_16lz4_12", Ve = "_dayInput_16lz4_28", ze = "_yearInput_16lz4_29", Be = "_monthTrigger_16lz4_33", He = "_monthOption_16lz4_53", I = {
|
|
239
|
+
fields: Te,
|
|
240
240
|
month: Ye,
|
|
241
241
|
day: ve,
|
|
242
242
|
year: we,
|
|
@@ -248,7 +248,7 @@ const Pe = "_fields_16lz4_1", Ye = "_month_16lz4_10", ve = "_day_16lz4_11", we =
|
|
|
248
248
|
content: e,
|
|
249
249
|
locale: a
|
|
250
250
|
}), lt = () => {
|
|
251
|
-
const e = De(I.monthTrigger), a =
|
|
251
|
+
const e = De(I.monthTrigger), a = ye(I.monthOption, _e), r = U(I.dayInput), s = U(I.yearInput);
|
|
252
252
|
return /* @__PURE__ */ t.createElement(n, {
|
|
253
253
|
className: I.fields
|
|
254
254
|
}, /* @__PURE__ */ t.createElement(n.Label, {
|
|
@@ -261,7 +261,7 @@ const Pe = "_fields_16lz4_1", Ye = "_month_16lz4_10", ve = "_day_16lz4_11", we =
|
|
|
261
261
|
className: h(A, E.label)
|
|
262
262
|
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
263
263
|
className: e
|
|
264
|
-
}, /* @__PURE__ */ t.createElement(
|
|
264
|
+
}, /* @__PURE__ */ t.createElement(Ne, {
|
|
265
265
|
className: E.dropdownIcon
|
|
266
266
|
})), /* @__PURE__ */ t.createElement(n.Month.Options, {
|
|
267
267
|
className: h(ie, E.selectPopover, E.dropdownPopover)
|
package/dist/component/{date-picker-field-rac-Cri5p6Ms.js → date-picker-field-rac-DaNwsa8z.js}
RENAMED
|
@@ -4,18 +4,18 @@ import e, { useState as A, useCallback as k, useContext as ee, useRef as O, 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 ae, DatePicker as ne, 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 w, SelectValue as x, ListBox as Y, ListBoxItem as B } from "react-aria-components";
|
|
7
|
-
import { D as p,
|
|
7
|
+
import { D as p, bh as h, be as U, b9 as F, bj as pe, I as De, U as fe, n as Ce, v as ye, p as Se } from "./form-D9IxiDXP.js";
|
|
8
8
|
import { g as Te, c as P } from "./calendar.module-DnhTT4QT.js";
|
|
9
9
|
import { f as E, a as T } from "./find-child-C60k4CxG.js";
|
|
10
|
-
import { D as
|
|
11
|
-
import { L as Ne } from "./field-label-headless-
|
|
10
|
+
import { D as he, E as ve } from "./field-error-headless-DU0YsEXR.js";
|
|
11
|
+
import { L as Ne } from "./field-label-headless-CvdTZi6i.js";
|
|
12
12
|
import { D as be, N as L, S as V } from "./non-modal-popover-DtIMXHbe.js";
|
|
13
|
-
import { a as _e, u as Ie } from "./use-dropdown-trigger-class-name-
|
|
14
|
-
import { i as Fe } from "./date-availability-
|
|
13
|
+
import { a as _e, u as Ie } from "./use-dropdown-trigger-class-name-BGQH0WCO.js";
|
|
14
|
+
import { i as Fe } from "./date-availability-D2BSwZ_r.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 Ae } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
-
import { s as D } from "./field-rac.module-
|
|
18
|
+
import { s as D } from "./field-rac.module-BIBNQEOK.js";
|
|
19
19
|
const Oe = [
|
|
20
20
|
p.SUNDAY,
|
|
21
21
|
p.MONDAY,
|
|
@@ -27,7 +27,7 @@ const Oe = [
|
|
|
27
27
|
], Pe = {
|
|
28
28
|
availableDays: Oe
|
|
29
29
|
}, a = ({ children: t }) => {
|
|
30
|
-
const { id: r, value: l, onChange: n, disabled: i, required: c, onBlur: d, onFocus: o, FieldLayout: m, hasError: u, readOnly: f } =
|
|
30
|
+
const { id: r, value: l, onChange: n, disabled: i, required: c, onBlur: d, onFocus: o, FieldLayout: m, hasError: u, readOnly: f } = h(), { labelId: C } = U(), { regionalFormat: v } = F(), [s, N] = A(null), [K, W] = A(!1), b = _e(r), $ = k((z) => {
|
|
31
31
|
const J = We(z);
|
|
32
32
|
n(J);
|
|
33
33
|
}, [
|
|
@@ -37,7 +37,7 @@ const Oe = [
|
|
|
37
37
|
fieldId: r,
|
|
38
38
|
renderLabel: () => H,
|
|
39
39
|
renderInput: () => /* @__PURE__ */ e.createElement(ae, {
|
|
40
|
-
locale:
|
|
40
|
+
locale: v
|
|
41
41
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
42
42
|
ref: N,
|
|
43
43
|
style: {
|
|
@@ -63,7 +63,7 @@ const Oe = [
|
|
|
63
63
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, Q, G)
|
|
64
64
|
});
|
|
65
65
|
}, Re = ({ children: t, className: r }) => {
|
|
66
|
-
const { inputId: l, ariaDescribedBy: n } = U(), { hasError: i, disabled: c, readOnly: d } =
|
|
66
|
+
const { inputId: l, ariaDescribedBy: n } = U(), { hasError: i, disabled: c, readOnly: d } = h(), o = ee(oe), m = k((u) => {
|
|
67
67
|
if (!o || o.isOpen || c || d)
|
|
68
68
|
return;
|
|
69
69
|
const f = u.target;
|
|
@@ -84,7 +84,7 @@ const Oe = [
|
|
|
84
84
|
onPointerDownCapture: m
|
|
85
85
|
}, t);
|
|
86
86
|
}, ke = ({ className: t }) => {
|
|
87
|
-
const { id: r, placeholder: l } =
|
|
87
|
+
const { id: r, placeholder: l } = h(), { regionalFormat: n } = F(), i = O(null), c = O(!1);
|
|
88
88
|
pe(() => {
|
|
89
89
|
var o;
|
|
90
90
|
(o = i.current) == null || o.focus();
|
|
@@ -114,14 +114,14 @@ const Oe = [
|
|
|
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: n } = l, { regionalFormat: i } = F(), { availability: c } =
|
|
117
|
+
const { isForcedOpen: n } = l, { regionalFormat: i } = F(), { availability: c } = h(), d = _(() => Te(i), [
|
|
118
118
|
i
|
|
119
119
|
]), o = _(() => (s) => {
|
|
120
120
|
const N = new Date(s.year, s.month - 1, s.day);
|
|
121
121
|
return !Fe(N, c || Pe);
|
|
122
122
|
}, [
|
|
123
123
|
c
|
|
124
|
-
]), m = E(t, g.Day) ?? /* @__PURE__ */ e.createElement(g.Day, null), u = E(t, g.PreviousTrigger), f = E(t, g.NextTrigger), C = E(t, g.MonthTrigger),
|
|
124
|
+
]), m = E(t, g.Day) ?? /* @__PURE__ */ e.createElement(g.Day, null), u = E(t, g.PreviousTrigger), f = E(t, g.NextTrigger), C = E(t, g.MonthTrigger), v = E(t, g.YearTrigger);
|
|
125
125
|
return /* @__PURE__ */ e.createElement(L, {
|
|
126
126
|
className: r,
|
|
127
127
|
containerPadding: 0
|
|
@@ -139,7 +139,7 @@ const Oe = [
|
|
|
139
139
|
popoverClassName: r
|
|
140
140
|
})), /* @__PURE__ */ e.createElement(ue, {
|
|
141
141
|
visibleYears: 100
|
|
142
|
-
}, (s) => T(
|
|
142
|
+
}, (s) => T(v, {
|
|
143
143
|
ariaLabel: s["aria-label"],
|
|
144
144
|
selectedKey: s.value,
|
|
145
145
|
onSelectionChange: s.onChange,
|
|
@@ -207,8 +207,8 @@ a.Control = Re;
|
|
|
207
207
|
a.Input = ke;
|
|
208
208
|
a.Trigger = Me;
|
|
209
209
|
a.Calendar = g;
|
|
210
|
-
a.Description =
|
|
211
|
-
a.Error =
|
|
210
|
+
a.Description = he;
|
|
211
|
+
a.Error = ve;
|
|
212
212
|
function Ke(t) {
|
|
213
213
|
if (!t)
|
|
214
214
|
return null;
|