@wix/form-elements 1.224.0 → 1.225.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-UcRjJTHp.js → appointment-rac-DfglpMHC.js} +5 -5
- package/dist/component/{bookings-address-rac-DDjZGEhk.js → bookings-address-rac-BsAUAgUH.js} +1 -1
- package/dist/component/{bookings-email-rac-Dy2vh3dy.js → bookings-email-rac-DL0Q3omz.js} +1 -1
- package/dist/component/{bookings-first-name-rac-fDHMNznn.js → bookings-first-name-rac-C3eHsd6U.js} +1 -1
- package/dist/component/{bookings-header-rac-DLOeNNQf.js → bookings-header-rac-YVCqWtfu.js} +1 -1
- package/dist/component/{bookings-last-name-rac-Bx19ROVT.js → bookings-last-name-rac-BzBQBIMy.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-8FbvPiv1.js → bookings-login-bar-rac-MJvhVfsH.js} +1 -1
- package/dist/component/{bookings-phone-rac-CvPQgtvq.js → bookings-phone-rac-BTEB2Mzf.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CO8bHRpD.js → bookings-rich-text-rac-BopQG6gV.js} +1 -1
- package/dist/component/calendar-icon-DOeHn3jt.js +19 -0
- package/dist/component/{checkbox-field-rac-tzsGw10P.js → checkbox-field-rac-NvQt_qcN.js} +6 -6
- package/dist/component/{checkbox-group-field-headless-CL18dpkq.js → checkbox-group-field-headless-CwLaBukh.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-BmbxaprJ.js → checkbox-group-field-rac-BKQhos1K.js} +6 -6
- package/dist/component/{checkbox-group-rac-shsbUvRc.js → checkbox-group-rac-DMeC2rsZ.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-DOxE4UQg.js → checkbox-indicator-module-classes-Cozvs_kk.js} +1 -1
- package/dist/component/{checkbox-rac-CobYYayd.js → checkbox-rac-Dea1HbEL.js} +1 -1
- package/dist/component/{contacts-address-rac-BoDqJCi1.js → contacts-address-rac-B64jiofc.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-GAujbm-z.js → contacts-birthdate-rac-CM4GjTBV.js} +1 -1
- package/dist/component/{contacts-company-rac-CLcEz04V.js → contacts-company-rac-DTf9dwuR.js} +1 -1
- package/dist/component/{contacts-email-rac-D9q7TJwy.js → contacts-email-rac-B2vhNF_y.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BAecbeNQ.js → contacts-first-name-rac-C5ywHnnX.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Ccrw8BDa.js → contacts-last-name-rac-C2JbeG_J.js} +1 -1
- package/dist/component/{contacts-phone-rac-DA2N033V.js → contacts-phone-rac-Dm0PS175.js} +1 -1
- package/dist/component/{contacts-position-rac-0lAd-nCW.js → contacts-position-rac-t6bWP1Yh.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DB2ssF-E.js → contacts-subscribe-rac-D5EWQfGj.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-B-Sn92Ho.js → contacts-tax-id-rac-CXqezyXg.js} +1 -1
- package/dist/component/{date-availability-CtfWLvii.js → date-availability-CtrbZvl3.js} +1 -1
- package/dist/component/date-input-field-rac-CPLAqaMS.js +365 -0
- package/dist/component/{date-input-rac-BnWwBe2i.js → date-input-rac-DjQc-F8G.js} +1 -1
- package/dist/component/date-picker-field-rac-pA2HwauY.js +386 -0
- package/dist/component/{date-picker-rac-BhI6jOQE.js → date-picker-rac-B6M3C8dN.js} +1 -1
- package/dist/component/date-time-input-field-rac-Qz6g31Eu.js +507 -0
- package/dist/component/{date-time-input-rac-DAbopLQt.js → date-time-input-rac-D7bS3bUX.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-D_HLv0tP.js → dext-checkbox-group-rac-caVwDBtB.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BnBTlqEI.js → dext-checkbox-rac-CMxPnPT3.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Co_yfhuz.js → dext-date-picker-rac-5WBCluMk.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BSpUehb2.js → dext-date-time-input-rac-C5d1PKMu.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DPApx74L.js → dext-dropdown-rac-BPeVs1gI.js} +1 -1
- package/dist/component/{dext-email-rac-Dns6jFl4.js → dext-email-rac-BTXfUaaY.js} +1 -1
- package/dist/component/{dext-number-input-rac-DfN-xRID.js → dext-number-input-rac-DJt_dDVj.js} +1 -1
- package/dist/component/{dext-phone-rac-b5Ix3aTQ.js → dext-phone-rac-DDtneNPi.js} +1 -1
- package/dist/component/{dext-radio-group-rac-BAwIkDsJ.js → dext-radio-group-rac-DzLW_As4.js} +2 -2
- package/dist/component/{dext-rating-input-rac-mwQpCQUI.js → dext-rating-input-rac-0wwq1TR3.js} +1 -1
- package/dist/component/{dext-tags-rac-BGmElgw8.js → dext-tags-rac-Cj7nIZWu.js} +2 -2
- package/dist/component/{dext-text-area-rac-DN5HPqdg.js → dext-text-area-rac-D4Ej9MYY.js} +1 -1
- package/dist/component/{dext-text-input-rac-DEyDRhQ2.js → dext-text-input-rac-DgqBl2cb.js} +1 -1
- package/dist/component/{dext-url-input-rac-B1o3BAZE.js → dext-url-input-rac-CH-5gGxA.js} +1 -1
- package/dist/component/dismiss-icon-ejA47noY.js +69 -0
- package/dist/component/{donation-rac-Dp6PmATz.js → donation-rac-BwpE1YTR.js} +6 -6
- package/dist/component/dropdown-field-rac-CeywMN1E.js +40 -0
- package/dist/component/{dropdown-rac-eqQW-Z9k.js → dropdown-rac-DiXJLvXK.js} +1 -1
- package/dist/component/{ecom-address-rac-Q02N1v6i.js → ecom-address-rac-MD0hbW1w.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CmqVje9n.js → ecom-subscription-checkbox-rac-BssVeeXB.js} +2 -2
- package/dist/component/{email-input-field-rac-HmrdF3g7.js → email-input-field-rac-BXoueQNf.js} +4 -4
- package/dist/component/{events-repeater-rac-BSML2My0.js → events-repeater-rac-fm6lHaJ2.js} +6 -6
- package/dist/component/{events-rsvp-rac-0pI3cb2e.js → events-rsvp-rac-QV9f5chX.js} +4 -4
- package/dist/component/{field-error-headless-B3U_Gymg.js → field-error-headless-BIzDViIC.js} +1 -1
- package/dist/component/{field-label-headless-Cyy9_5qJ.js → field-label-headless-D_ubs4wp.js} +1 -1
- package/dist/component/field-rac.module-D0QzJXUv.js +32 -0
- package/dist/component/{file-upload-rac-hR9TZqk2.js → file-upload-rac-Csmt20hK.js} +5 -5
- package/dist/component/{fixed-payment-rac-CghZp6bR.js → fixed-payment-rac-BXr53Q8H.js} +4 -4
- package/dist/component/{form-BmSV4tOz.js → form-Dnq7LxSl.js} +1701 -1688
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-C7LDm89o.js → header-field-rac-9750XSxD.js} +2 -2
- package/dist/component/{header-rac-BNNzF5wQ.js → header-rac-DGSENeOk.js} +1 -1
- package/dist/component/{image-choice-rac-DLgxkKIZ.js → image-choice-rac-HX8H18Z3.js} +5 -5
- package/dist/component/{index-Dg8Fefid.js → index-pgW3uSoZ.js} +2 -2
- package/dist/component/{index-B8ObIJtL.js → index-vs-qkVQt.js} +4 -4
- package/dist/component/{isObjectLike-oBQcCfqW.js → isObjectLike-DoUrU0Hj.js} +1 -1
- package/dist/component/multiline-address-field-rac-B3gKz3u_.js +1818 -0
- package/dist/component/{multiline-address-rac-8MZkKfqY.js → multiline-address-rac-BBign7ot.js} +1 -1
- package/dist/component/native-select-BbxBpe3S.js +32 -0
- package/dist/component/{number-input-field-rac-Dmp8pNIq.js → number-input-field-rac-CO6DG443.js} +5 -5
- package/dist/component/{number-input-rac-2cN_bN_s.js → number-input-rac-C_Ndaqs4.js} +1 -1
- package/dist/component/{password-rac-CFdC1hoi.js → password-rac-pq-CaSkt.js} +5 -5
- package/dist/component/{payment-input-rac-BWElGzuv.js → payment-input-rac-Dco8O86k.js} +5 -5
- package/dist/component/phone-input-field-rac-BmcADPkC.js +558 -0
- package/dist/component/{phone-rac-CE9-90C3.js → phone-rac-B3aFMUMq.js} +1 -1
- package/dist/component/{product-list-rac-QU7Ocwvy.js → product-list-rac-Cw21coVk.js} +6 -6
- package/dist/component/{quiz-radio-group-rac-Hm7B7RlU.js → quiz-radio-group-rac-ChkNtxix.js} +1 -1
- package/dist/component/{radio-button-module-classes-CcGF7N_Y.js → radio-button-module-classes-BtiG6yqb.js} +3 -3
- package/dist/component/{radio-group-field-rac-Bk1JBBts.js → radio-group-field-rac-6SefZCE6.js} +5 -5
- package/dist/component/{radio-group-rac-D_YZnpID.js → radio-group-rac-BRhOFR2j.js} +1 -1
- package/dist/component/{rating-input-field-rac-zvA6QBGo.js → rating-input-field-rac-DaVnkb6k.js} +5 -5
- package/dist/component/{rating-input-rac-CXVQUoi-.js → rating-input-rac-B-2pZ61H.js} +1 -1
- package/dist/component/{rich-content-rac.module-CnZ4lMBG.js → rich-content-rac.module-C6LD--Ql.js} +1 -1
- package/dist/component/{rich-text-field-rac-DYQgVXdV.js → rich-text-field-rac-C-rfA6pQ.js} +2 -2
- package/dist/component/{rich-text-rac-Dk8396e-.js → rich-text-rac-1s5CGO8u.js} +1 -1
- package/dist/component/service-dropdown-rac-Bcr83doj.js +150 -0
- package/dist/component/{services-multi-choice-rac-D1RiVaLW.js → services-multi-choice-rac-C9nSuz9x.js} +7 -7
- package/dist/component/{signature-rac-DcGKMX84.js → signature-rac-pgob6vV_.js} +5 -5
- package/dist/component/{submit-button-rac-DbMxQlNH.js → submit-button-rac-CzcFB8hM.js} +2 -2
- package/dist/component/{tags-field-rac-Bi4lKutL.js → tags-field-rac-BBFxSNch.js} +6 -6
- package/dist/component/{tags-rac-DDCPnT8M.js → tags-rac-DkwugVvK.js} +1 -1
- package/dist/component/{text-area-field-rac-cre_K0MD.js → text-area-field-rac-DHT-fc0i.js} +5 -5
- package/dist/component/{text-area-rac-61wsMj-j.js → text-area-rac-cTq-i-bf.js} +1 -1
- package/dist/component/{text-input-field-rac-CV5_ba0x.js → text-input-field-rac-D3v-e_5R.js} +4 -4
- package/dist/component/{text-input-headless-kRv3KpSL.js → text-input-headless-B-DwvpWg.js} +3 -3
- package/dist/component/{text-input-rac-CwqZ6NXO.js → text-input-rac-CpG9qt33.js} +1 -1
- package/dist/component/time-input-rac-iL1G8Uwo.js +212 -0
- package/dist/component/to-native-time-Co_gOLkc.js +9 -0
- package/dist/component/{url-input-field-rac-C1JL_m6D.js → url-input-field-rac-1P81rK_4.js} +5 -5
- package/dist/component/{url-input-rac-C1CiGrCn.js → url-input-rac-D9c0BJKG.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-COGEk5d6.js → use-dropdown-option-class-name-CyC7rDCE.js} +3 -3
- package/dist/component/use-dropdown-trigger-class-name-BvRCjLXG.js +137 -0
- package/dist/component/{use-element-state-class-name-pSOX0Y0p.js → use-element-state-class-name-Cpdx_lRm.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-DGEpOAdi.js → use-hoverable-input-class-name-zEk2Vnct.js} +3 -3
- package/dist/component/{use-is-forced-open-dropdown-DPG1e5E9.js → use-is-forced-open-dropdown-_YI6RNG3.js} +1 -1
- package/dist/component/use-native-mobile-input-Czyhb-0V.js +31 -0
- package/dist/component/use-native-state-class-name-B0m2ghbS.js +18 -0
- package/dist/component/{use-service-options-base-BgIZ94V9.js → use-service-options-base-CbFG_r1u.js} +1 -1
- package/dist/component/use-text-input-class-name-CL-b4_Ph.js +6 -0
- package/package.json +3 -2
- package/dist/component/date-input-field-rac-CiAaOiYY.js +0 -309
- package/dist/component/date-picker-field-rac-Dg-chlTL.js +0 -320
- package/dist/component/date-time-input-field-rac-CbDvEPIp.js +0 -441
- package/dist/component/dropdown-field-rac-DY3GGJgP.js +0 -36
- package/dist/component/field-rac.module-DcyJyi2B.js +0 -25
- package/dist/component/multiline-address-field-rac-CgH7lDce.js +0 -1738
- package/dist/component/phone-input-field-rac-CsJGw_OE.js +0 -520
- package/dist/component/service-dropdown-rac-BSXYuBPJ.js +0 -145
- package/dist/component/time-input-rac-DuQar6zW.js +0 -161
- package/dist/component/use-dropdown-trigger-class-name-D6c-3Lyw.js +0 -98
- package/dist/component/use-text-input-class-name-BcbHdFV-.js +0 -6
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
import { RicosViewer as me } from "@wix/ricos/viewer";
|
|
2
|
+
import N from "classnames";
|
|
3
|
+
import t, { useMemo as F, useRef as U, Children as ue, isValidElement as de, useState as re, useCallback as G, useContext as pe } from "react";
|
|
4
|
+
import { bN as h, bK as ee, bF as te, bh as oe, bu as se, b4 as d, bP as X, bY as y, by as j, bd as Z, bj as Ee, bb as fe, bC as be, u as Ne, X as he, am as Ie, w as $, x as De, M as _e, I as ge, v as Te, y as Ce, z as q } from "./form-Dnq7LxSl.js";
|
|
5
|
+
import { parseTime as ye } from "@internationalized/date";
|
|
6
|
+
import { mergeProps as Oe, UNSAFE_PortalProvider as Le } from "react-aria";
|
|
7
|
+
import { ListBoxItem as Fe, Select as Pe, TextField as le, TimeField as ve, SelectValue as Me, Input as ie, DateInput as Se, DateSegment as Q, TimeFieldStateContext as Re } from "react-aria-components";
|
|
8
|
+
import { f as u, a as M } from "./find-child-C60k4CxG.js";
|
|
9
|
+
import { g as Ae } from "./helpers-HmkkXrh2.js";
|
|
10
|
+
import { D as Ve, E as we } from "./field-error-headless-BIzDViIC.js";
|
|
11
|
+
import { L as Ye } from "./field-label-headless-D_ubs4wp.js";
|
|
12
|
+
import { F as He } from "./fieldset-headless-CD3fds9J.js";
|
|
13
|
+
import { u as Be, a as Ue, N as xe, D as ke } from "./dismiss-icon-ejA47noY.js";
|
|
14
|
+
import { u as $e, N as qe } from "./use-native-mobile-input-Czyhb-0V.js";
|
|
15
|
+
import { N as ze, E as Ge, S as je } from "./non-modal-popover-D-u13tmp.js";
|
|
16
|
+
import { t as Ke, C as We } from "./calendar-icon-DOeHn3jt.js";
|
|
17
|
+
import { t as Xe } from "./to-native-time-Co_gOLkc.js";
|
|
18
|
+
import { u as Qe } from "./use-is-forced-open-dropdown-_YI6RNG3.js";
|
|
19
|
+
import { u as Je } from "./use-native-state-class-name-B0m2ghbS.js";
|
|
20
|
+
import { V as Ze, a as et } from "./use-dropdown-option-class-name-CyC7rDCE.js";
|
|
21
|
+
import { C as tt } from "./chevron-down-icon-CcpVm6B-.js";
|
|
22
|
+
import { E as at } from "./error-icon-hZxQ6DEy.js";
|
|
23
|
+
import { H as z } from "./custom-focus-class-_483Pkwp.js";
|
|
24
|
+
import { s as p } from "./field-rac.module-D0QzJXUv.js";
|
|
25
|
+
import { u as B } from "./use-hoverable-input-class-name-zEk2Vnct.js";
|
|
26
|
+
const l = ({ children: e, className: a }) => {
|
|
27
|
+
const { id: n, required: o, onBlur: r, onFocus: s, FieldLayout: i } = h(), { inputId: m, labelId: c, ariaDescribedBy: I } = ee(), { regionalFormat: E } = te(), C = $e(), _ = F(() => oe(E).filter(se).map((H) => H.toUpperCase()), [
|
|
28
|
+
E
|
|
29
|
+
]), P = u(e, l.Label), b = u(e, l.Description), g = u(e, l.Error), f = {
|
|
30
|
+
[d.MONTH]: u(e, l.Month),
|
|
31
|
+
[d.DAY]: u(e, l.Day),
|
|
32
|
+
[d.YEAR]: u(e, l.Year)
|
|
33
|
+
}, v = u(e, l.Time), V = u(e, l.NativeDateTime), w = C ? P : M(P, {
|
|
34
|
+
as: "div"
|
|
35
|
+
}), Y = C ? V : /* @__PURE__ */ t.createElement(He, {
|
|
36
|
+
id: m,
|
|
37
|
+
ariaLabelledBy: c,
|
|
38
|
+
ariaDescribedBy: I,
|
|
39
|
+
required: o,
|
|
40
|
+
onBlur: r,
|
|
41
|
+
onFocus: s,
|
|
42
|
+
className: a
|
|
43
|
+
}, f[_[0]], f[_[1]], f[_[2]], v);
|
|
44
|
+
return /* @__PURE__ */ t.createElement(i, {
|
|
45
|
+
fieldId: n,
|
|
46
|
+
renderLabel: () => w,
|
|
47
|
+
renderInput: () => Y,
|
|
48
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, g, b)
|
|
49
|
+
});
|
|
50
|
+
}, S = ({ children: e, className: a }) => {
|
|
51
|
+
const { id: n, disabled: o, readOnly: r, showDateLabels: s, hidePlaceholder: i } = h(), { labelId: m } = O(d.MONTH), { partValue: c, partError: I, onPartChange: E } = R(d.MONTH), { t: C } = y(), [_, P] = re(!1), b = Qe(n), [g, f] = re(null), v = i ? Ge : C("field.date.placeholder.month"), V = G((A) => {
|
|
52
|
+
r || E(typeof A == "string" ? A : "");
|
|
53
|
+
}, [
|
|
54
|
+
E,
|
|
55
|
+
r
|
|
56
|
+
]), w = G((A) => {
|
|
57
|
+
P(A && !r);
|
|
58
|
+
}, [
|
|
59
|
+
r
|
|
60
|
+
]), Y = u(e, S.Label), H = u(e, S.Trigger), J = u(e, S.Options);
|
|
61
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
62
|
+
className: a,
|
|
63
|
+
"data-date-field": !0
|
|
64
|
+
}, s ? Y : null, /* @__PURE__ */ t.createElement("div", {
|
|
65
|
+
ref: f,
|
|
66
|
+
style: {
|
|
67
|
+
display: "contents"
|
|
68
|
+
}
|
|
69
|
+
}), /* @__PURE__ */ t.createElement(Le, {
|
|
70
|
+
getContainer: () => g
|
|
71
|
+
}, /* @__PURE__ */ t.createElement(Pe, {
|
|
72
|
+
"aria-labelledby": s ? m : void 0,
|
|
73
|
+
value: c || null,
|
|
74
|
+
onChange: V,
|
|
75
|
+
isDisabled: o,
|
|
76
|
+
isInvalid: I,
|
|
77
|
+
placeholder: v,
|
|
78
|
+
isOpen: b || _,
|
|
79
|
+
onOpenChange: b ? void 0 : w
|
|
80
|
+
}, H, M(J, {
|
|
81
|
+
isForcedOpen: b
|
|
82
|
+
}))));
|
|
83
|
+
}, nt = ({ className: e }) => /* @__PURE__ */ t.createElement(ae, {
|
|
84
|
+
datePart: d.MONTH,
|
|
85
|
+
className: e
|
|
86
|
+
}), rt = ({ children: e, className: a }) => {
|
|
87
|
+
const { id: n, readOnly: o } = h(), { inputId: r } = O(d.MONTH), { partError: s, isFirstPart: i } = R(d.MONTH), m = U(null);
|
|
88
|
+
return X(() => {
|
|
89
|
+
var c;
|
|
90
|
+
i && ((c = m.current) == null || c.focus({
|
|
91
|
+
preventScroll: !0
|
|
92
|
+
}));
|
|
93
|
+
}, n), /* @__PURE__ */ t.createElement(je, {
|
|
94
|
+
ref: m,
|
|
95
|
+
id: r,
|
|
96
|
+
className: a,
|
|
97
|
+
"data-hook": d.MONTH,
|
|
98
|
+
"data-invalid": s || void 0,
|
|
99
|
+
"data-readonly": o || void 0
|
|
100
|
+
}, /* @__PURE__ */ t.createElement(Me, null), e);
|
|
101
|
+
}, K = ({ children: e, className: a, ...n }) => {
|
|
102
|
+
const { isForcedOpen: o } = n, { language: r } = te(), s = F(() => Ae(r), [
|
|
103
|
+
r
|
|
104
|
+
]), i = u(e, K.Option) ?? /* @__PURE__ */ t.createElement(K.Option, null);
|
|
105
|
+
return /* @__PURE__ */ t.createElement(ze, {
|
|
106
|
+
className: a,
|
|
107
|
+
containerPadding: 0,
|
|
108
|
+
offset: 0
|
|
109
|
+
}, /* @__PURE__ */ t.createElement(Ze, {
|
|
110
|
+
isForcedOpen: o,
|
|
111
|
+
autoFocus: o ? !1 : void 0
|
|
112
|
+
}, s.map((m, c) => M(i, {
|
|
113
|
+
key: String(c + 1),
|
|
114
|
+
value: String(c + 1),
|
|
115
|
+
label: m
|
|
116
|
+
}))));
|
|
117
|
+
}, ot = ({ className: e, ...a }) => {
|
|
118
|
+
const { value: n, label: o } = a;
|
|
119
|
+
return /* @__PURE__ */ t.createElement(Fe, {
|
|
120
|
+
className: e,
|
|
121
|
+
id: n,
|
|
122
|
+
textValue: o
|
|
123
|
+
}, o);
|
|
124
|
+
};
|
|
125
|
+
S.Label = nt;
|
|
126
|
+
S.Trigger = rt;
|
|
127
|
+
S.Options = K;
|
|
128
|
+
K.Option = ot;
|
|
129
|
+
const x = ({ children: e, className: a }) => {
|
|
130
|
+
const { disabled: n, readOnly: o, showDateLabels: r } = h(), { labelId: s } = O(d.DAY), { partValue: i, partError: m, onPartChange: c } = R(d.DAY), I = u(e, x.Label), E = u(e, x.Input);
|
|
131
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
132
|
+
className: a,
|
|
133
|
+
"data-date-field": !0
|
|
134
|
+
}, r && I, /* @__PURE__ */ t.createElement(le, {
|
|
135
|
+
"aria-labelledby": r ? s : void 0,
|
|
136
|
+
value: i,
|
|
137
|
+
onChange: c,
|
|
138
|
+
isDisabled: n,
|
|
139
|
+
isReadOnly: o,
|
|
140
|
+
isInvalid: m
|
|
141
|
+
}, E));
|
|
142
|
+
}, st = ({ className: e }) => /* @__PURE__ */ t.createElement(ae, {
|
|
143
|
+
datePart: d.DAY,
|
|
144
|
+
className: e
|
|
145
|
+
}), lt = ({ className: e }) => {
|
|
146
|
+
const { id: a, hidePlaceholder: n } = h(), { inputId: o } = O(d.DAY), { isFirstPart: r } = R(d.DAY), { t: s } = y(), i = U(null), m = n ? void 0 : s("field.date.placeholder.day");
|
|
147
|
+
return X(() => {
|
|
148
|
+
var c;
|
|
149
|
+
r && ((c = i.current) == null || c.focus({
|
|
150
|
+
preventScroll: !0
|
|
151
|
+
}));
|
|
152
|
+
}, a), /* @__PURE__ */ t.createElement(ie, {
|
|
153
|
+
ref: i,
|
|
154
|
+
id: o,
|
|
155
|
+
className: e,
|
|
156
|
+
placeholder: m,
|
|
157
|
+
maxLength: 2,
|
|
158
|
+
inputMode: "numeric",
|
|
159
|
+
"data-hook": d.DAY
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
x.Label = st;
|
|
163
|
+
x.Input = lt;
|
|
164
|
+
const k = ({ children: e, className: a }) => {
|
|
165
|
+
const { disabled: n, readOnly: o, showDateLabels: r } = h(), { labelId: s } = O(d.YEAR), { partValue: i, partError: m, onPartChange: c } = R(d.YEAR), I = u(e, k.Label), E = u(e, k.Input);
|
|
166
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
167
|
+
className: a,
|
|
168
|
+
"data-date-field": !0
|
|
169
|
+
}, r && I, /* @__PURE__ */ t.createElement(le, {
|
|
170
|
+
"aria-labelledby": r ? s : void 0,
|
|
171
|
+
value: i,
|
|
172
|
+
onChange: c,
|
|
173
|
+
isDisabled: n,
|
|
174
|
+
isReadOnly: o,
|
|
175
|
+
isInvalid: m
|
|
176
|
+
}, E));
|
|
177
|
+
}, it = ({ className: e }) => /* @__PURE__ */ t.createElement(ae, {
|
|
178
|
+
datePart: d.YEAR,
|
|
179
|
+
className: e
|
|
180
|
+
}), ct = ({ className: e }) => {
|
|
181
|
+
const { id: a, hidePlaceholder: n } = h(), { inputId: o } = O(d.YEAR), { isFirstPart: r } = R(d.YEAR), { t: s } = y(), i = U(null), m = n ? void 0 : s("field.date.placeholder.year");
|
|
182
|
+
return X(() => {
|
|
183
|
+
var c;
|
|
184
|
+
r && ((c = i.current) == null || c.focus({
|
|
185
|
+
preventScroll: !0
|
|
186
|
+
}));
|
|
187
|
+
}, a), /* @__PURE__ */ t.createElement(ie, {
|
|
188
|
+
ref: i,
|
|
189
|
+
id: o,
|
|
190
|
+
className: e,
|
|
191
|
+
placeholder: m,
|
|
192
|
+
maxLength: 4,
|
|
193
|
+
inputMode: "numeric",
|
|
194
|
+
"data-hook": d.YEAR
|
|
195
|
+
});
|
|
196
|
+
};
|
|
197
|
+
k.Label = it;
|
|
198
|
+
k.Input = ct;
|
|
199
|
+
const T = ({ children: e, className: a }) => {
|
|
200
|
+
const { disabled: n, readOnly: o, use24HourFormat: r, showDateLabels: s } = h(), { labelId: i } = O("time"), { partValue: m, partError: c, onPartChange: I } = R("time"), E = u(e, T.Label), C = u(e, T.Input);
|
|
201
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
202
|
+
className: a,
|
|
203
|
+
"data-date-field": !0
|
|
204
|
+
}, s && E, /* @__PURE__ */ t.createElement(ve, {
|
|
205
|
+
"aria-labelledby": s ? i : void 0,
|
|
206
|
+
value: m,
|
|
207
|
+
onChange: I,
|
|
208
|
+
isDisabled: n,
|
|
209
|
+
isReadOnly: o,
|
|
210
|
+
isInvalid: c,
|
|
211
|
+
hourCycle: r ? 24 : 12
|
|
212
|
+
}, C));
|
|
213
|
+
}, mt = ({ className: e }) => {
|
|
214
|
+
const { inputId: a, labelId: n } = O("time"), { t: o } = y(), r = o("field.date.label.time");
|
|
215
|
+
return /* @__PURE__ */ t.createElement("label", {
|
|
216
|
+
id: n,
|
|
217
|
+
htmlFor: a,
|
|
218
|
+
className: e
|
|
219
|
+
}, r);
|
|
220
|
+
}, ut = ({ children: e, className: a }) => {
|
|
221
|
+
const { hidePlaceholder: n } = h(), o = u(e, T.Hour), r = u(e, T.Minute), s = u(e, T.Period);
|
|
222
|
+
return /* @__PURE__ */ t.createElement(Se, {
|
|
223
|
+
className: a,
|
|
224
|
+
"data-hook": "time",
|
|
225
|
+
"data-placeholder-hidden": n || void 0
|
|
226
|
+
}, (i) => {
|
|
227
|
+
switch (i.type) {
|
|
228
|
+
case "hour":
|
|
229
|
+
return M(o, {
|
|
230
|
+
segment: i
|
|
231
|
+
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
232
|
+
case "minute":
|
|
233
|
+
return M(r, {
|
|
234
|
+
segment: i
|
|
235
|
+
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
236
|
+
case "dayPeriod":
|
|
237
|
+
return M(s, {
|
|
238
|
+
segment: i
|
|
239
|
+
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
240
|
+
case "literal":
|
|
241
|
+
return /* @__PURE__ */ t.createElement(Q, {
|
|
242
|
+
segment: i
|
|
243
|
+
});
|
|
244
|
+
default:
|
|
245
|
+
return /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
}, dt = ({ className: e, ...a }) => {
|
|
249
|
+
const { hidePlaceholder: n } = h(), { segment: o } = a, { t: r } = y(), s = n ? void 0 : r("field.date.placeholder.hour");
|
|
250
|
+
return /* @__PURE__ */ t.createElement(Q, {
|
|
251
|
+
segment: o,
|
|
252
|
+
className: e,
|
|
253
|
+
...s && {
|
|
254
|
+
placeholder: s
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
}, pt = ({ className: e, ...a }) => {
|
|
258
|
+
const { hidePlaceholder: n } = h(), { segment: o } = a, { t: r } = y(), s = n ? void 0 : r("field.date.placeholder.minute");
|
|
259
|
+
return /* @__PURE__ */ t.createElement(Q, {
|
|
260
|
+
segment: o,
|
|
261
|
+
className: e,
|
|
262
|
+
...s && {
|
|
263
|
+
placeholder: s
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
}, Et = ({ className: e, ...a }) => {
|
|
267
|
+
const { hidePlaceholder: n } = h(), { segment: o } = a, { t: r } = y(), s = pe(Re), i = n ? void 0 : r("field.date.placeholder.period"), m = () => s == null ? void 0 : s.increment("dayPeriod");
|
|
268
|
+
return /* @__PURE__ */ t.createElement(Q, {
|
|
269
|
+
segment: o,
|
|
270
|
+
className: e,
|
|
271
|
+
onClick: m,
|
|
272
|
+
...i && {
|
|
273
|
+
placeholder: i
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
};
|
|
277
|
+
T.Label = mt;
|
|
278
|
+
T.Input = ut;
|
|
279
|
+
T.Hour = dt;
|
|
280
|
+
T.Minute = pt;
|
|
281
|
+
T.Period = Et;
|
|
282
|
+
const W = ({ className: e, children: a }) => {
|
|
283
|
+
const { id: n, value: o, onChange: r, required: s, disabled: i, readOnly: m, hasError: c, onBlur: I, onFocus: E } = h(), { inputId: C, labelId: _, ariaDescribedBy: P } = ee(), b = U(null), g = U(null);
|
|
284
|
+
X(() => {
|
|
285
|
+
var L;
|
|
286
|
+
(L = b.current) == null || L.focus({
|
|
287
|
+
preventScroll: !0
|
|
288
|
+
});
|
|
289
|
+
}, n);
|
|
290
|
+
const f = ft(o), { announcement: v, announceCleared: V } = Be(!!f), w = !!f && !s && !i && !m, Y = u(a, W.Clear), H = ue.map(a, (L) => /* @__PURE__ */ de(L) && L.type === W.Clear ? null : L), { className: J, stateProps: A } = Je(e);
|
|
291
|
+
return /* @__PURE__ */ t.createElement(qe, {
|
|
292
|
+
ref: g,
|
|
293
|
+
groupLabelId: _,
|
|
294
|
+
announcement: v
|
|
295
|
+
}, /* @__PURE__ */ t.createElement(Ue, {
|
|
296
|
+
ref: b,
|
|
297
|
+
type: "datetime-local",
|
|
298
|
+
id: C,
|
|
299
|
+
className: J,
|
|
300
|
+
...Oe(A, {
|
|
301
|
+
onFocus: E,
|
|
302
|
+
onBlur: I
|
|
303
|
+
}),
|
|
304
|
+
"aria-labelledby": _,
|
|
305
|
+
"aria-describedby": P,
|
|
306
|
+
"aria-invalid": c || void 0,
|
|
307
|
+
value: f,
|
|
308
|
+
onChange: (L) => r(bt(L)),
|
|
309
|
+
disabled: i,
|
|
310
|
+
readOnly: m,
|
|
311
|
+
required: s
|
|
312
|
+
}), H, w ? M(Y, {
|
|
313
|
+
input: b,
|
|
314
|
+
control: g,
|
|
315
|
+
labelId: _,
|
|
316
|
+
onClear: () => {
|
|
317
|
+
r(""), V();
|
|
318
|
+
}
|
|
319
|
+
}) : null);
|
|
320
|
+
};
|
|
321
|
+
W.Clear = xe;
|
|
322
|
+
l.Label = Ye;
|
|
323
|
+
l.NativeDateTime = W;
|
|
324
|
+
l.Month = S;
|
|
325
|
+
l.Day = x;
|
|
326
|
+
l.Year = k;
|
|
327
|
+
l.Time = T;
|
|
328
|
+
l.Description = Ve;
|
|
329
|
+
l.Error = we;
|
|
330
|
+
function O(e) {
|
|
331
|
+
const { inputId: a } = ee();
|
|
332
|
+
return F(() => {
|
|
333
|
+
const n = e.toLowerCase();
|
|
334
|
+
return {
|
|
335
|
+
inputId: `${a}-${n}-input`,
|
|
336
|
+
labelId: `${a}-${n}-label`
|
|
337
|
+
};
|
|
338
|
+
}, [
|
|
339
|
+
a,
|
|
340
|
+
e
|
|
341
|
+
]);
|
|
342
|
+
}
|
|
343
|
+
function R(e) {
|
|
344
|
+
const { value: a, onChange: n, hasError: o = !1 } = h(), { regionalFormat: r } = te(), [s, i] = F(() => j(a ?? ""), [
|
|
345
|
+
a
|
|
346
|
+
]), m = F(() => Ee(o, a ?? ""), [
|
|
347
|
+
a,
|
|
348
|
+
o
|
|
349
|
+
]), c = F(() => fe(s), [
|
|
350
|
+
s
|
|
351
|
+
]), I = F(() => ne(i), [
|
|
352
|
+
i
|
|
353
|
+
]), E = G((b) => {
|
|
354
|
+
const g = ce(b), f = Z(s, g);
|
|
355
|
+
n(f);
|
|
356
|
+
}, [
|
|
357
|
+
n,
|
|
358
|
+
s
|
|
359
|
+
]), C = G((b) => {
|
|
360
|
+
const [, g] = j(a ?? ""), f = be(b, e, c), v = Z(f, g);
|
|
361
|
+
n(v);
|
|
362
|
+
}, [
|
|
363
|
+
n,
|
|
364
|
+
a,
|
|
365
|
+
c,
|
|
366
|
+
e
|
|
367
|
+
]), _ = F(() => e === "time" ? !1 : oe(r).filter(se).map((f) => f.toUpperCase())[0] === e, [
|
|
368
|
+
r,
|
|
369
|
+
e
|
|
370
|
+
]);
|
|
371
|
+
return e === "time" ? {
|
|
372
|
+
partValue: I,
|
|
373
|
+
partError: m.TIME,
|
|
374
|
+
onPartChange: E,
|
|
375
|
+
isFirstPart: !1
|
|
376
|
+
} : {
|
|
377
|
+
partValue: c[e] || "",
|
|
378
|
+
partError: m[e],
|
|
379
|
+
onPartChange: C,
|
|
380
|
+
isFirstPart: _
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
function ae({ datePart: e, className: a }) {
|
|
384
|
+
const { inputId: n, labelId: o } = O(e), { t: r } = y(), s = `field.date.label.${e.toLowerCase()}`, i = r(s);
|
|
385
|
+
return /* @__PURE__ */ t.createElement("label", {
|
|
386
|
+
id: o,
|
|
387
|
+
htmlFor: n,
|
|
388
|
+
className: a
|
|
389
|
+
}, i);
|
|
390
|
+
}
|
|
391
|
+
function ft(e) {
|
|
392
|
+
const [a, n] = j(e ?? ""), o = Ke(a), r = Xe(ne(n));
|
|
393
|
+
return o && r ? `${o}T${r}` : "";
|
|
394
|
+
}
|
|
395
|
+
function bt(e) {
|
|
396
|
+
if (!e)
|
|
397
|
+
return "";
|
|
398
|
+
const [a, n] = j(e);
|
|
399
|
+
return Z(a, ce(ne(n)));
|
|
400
|
+
}
|
|
401
|
+
function ne(e) {
|
|
402
|
+
if (!e)
|
|
403
|
+
return null;
|
|
404
|
+
try {
|
|
405
|
+
return ye(e);
|
|
406
|
+
} catch {
|
|
407
|
+
return null;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
function ce(e) {
|
|
411
|
+
if (!e)
|
|
412
|
+
return null;
|
|
413
|
+
const a = String(e.hour).padStart(2, "0"), n = String(e.minute).padStart(2, "0"), o = String(e.second).padStart(2, "0");
|
|
414
|
+
return [
|
|
415
|
+
a,
|
|
416
|
+
n,
|
|
417
|
+
o
|
|
418
|
+
].join(":");
|
|
419
|
+
}
|
|
420
|
+
const Nt = "_fields_1ofw4_1", ht = "_month_1ofw4_10", It = "_day_1ofw4_11", Dt = "_year_1ofw4_12", _t = "_timeGroup_1ofw4_13", gt = "_dayInput_1ofw4_34", Tt = "_yearInput_1ofw4_35", Ct = "_monthTrigger_1ofw4_39", yt = "_monthOption_1ofw4_59", Ot = "_time_1ofw4_13", Lt = "_hour_1ofw4_81", Ft = "_minute_1ofw4_82", Pt = "_period_1ofw4_83", D = {
|
|
421
|
+
fields: Nt,
|
|
422
|
+
month: ht,
|
|
423
|
+
day: It,
|
|
424
|
+
year: Dt,
|
|
425
|
+
timeGroup: _t,
|
|
426
|
+
dayInput: gt,
|
|
427
|
+
yearInput: Tt,
|
|
428
|
+
monthTrigger: Ct,
|
|
429
|
+
monthOption: yt,
|
|
430
|
+
time: Ot,
|
|
431
|
+
hour: Lt,
|
|
432
|
+
minute: Ft,
|
|
433
|
+
period: Pt
|
|
434
|
+
}, vt = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(me, {
|
|
435
|
+
content: e,
|
|
436
|
+
locale: a
|
|
437
|
+
}), aa = () => {
|
|
438
|
+
const { t: e } = y(), a = B(Te, [
|
|
439
|
+
D.monthTrigger
|
|
440
|
+
]), n = et(Ce, D.monthOption, z), o = B(q, [
|
|
441
|
+
D.dayInput
|
|
442
|
+
]), r = B(q, [
|
|
443
|
+
D.yearInput
|
|
444
|
+
]), s = B(q, [
|
|
445
|
+
D.time
|
|
446
|
+
]), i = B(q, [
|
|
447
|
+
p.nativeInput,
|
|
448
|
+
p.nativeWithLeadingIcon
|
|
449
|
+
]);
|
|
450
|
+
return /* @__PURE__ */ t.createElement(l, {
|
|
451
|
+
className: N(Ne, D.fields)
|
|
452
|
+
}, /* @__PURE__ */ t.createElement(l.Label, {
|
|
453
|
+
className: N(he, p.label)
|
|
454
|
+
}, /* @__PURE__ */ t.createElement(l.Label.Required, {
|
|
455
|
+
className: N(Ie, p.requiredMark)
|
|
456
|
+
})), /* @__PURE__ */ t.createElement(l.Month, {
|
|
457
|
+
className: D.month
|
|
458
|
+
}, /* @__PURE__ */ t.createElement(l.Month.Label, {
|
|
459
|
+
className: N($, p.label)
|
|
460
|
+
}), /* @__PURE__ */ t.createElement(l.Month.Trigger, {
|
|
461
|
+
className: a
|
|
462
|
+
}, /* @__PURE__ */ t.createElement(tt, {
|
|
463
|
+
className: p.dropdownIcon
|
|
464
|
+
})), /* @__PURE__ */ t.createElement(l.Month.Options, {
|
|
465
|
+
className: N(De, p.selectPopover, p.dropdownPopover)
|
|
466
|
+
}, /* @__PURE__ */ t.createElement(l.Month.Options.Option, {
|
|
467
|
+
className: n
|
|
468
|
+
}))), /* @__PURE__ */ t.createElement(l.Day, {
|
|
469
|
+
className: D.day
|
|
470
|
+
}, /* @__PURE__ */ t.createElement(l.Day.Label, {
|
|
471
|
+
className: N($, p.label)
|
|
472
|
+
}), /* @__PURE__ */ t.createElement(l.Day.Input, {
|
|
473
|
+
className: o
|
|
474
|
+
})), /* @__PURE__ */ t.createElement(l.Year, {
|
|
475
|
+
className: D.year
|
|
476
|
+
}, /* @__PURE__ */ t.createElement(l.Year.Label, {
|
|
477
|
+
className: N($, p.label)
|
|
478
|
+
}), /* @__PURE__ */ t.createElement(l.Year.Input, {
|
|
479
|
+
className: r
|
|
480
|
+
})), /* @__PURE__ */ t.createElement(l.Time, {
|
|
481
|
+
className: D.timeGroup
|
|
482
|
+
}, /* @__PURE__ */ t.createElement(l.Time.Label, {
|
|
483
|
+
className: N($, p.label)
|
|
484
|
+
}), /* @__PURE__ */ t.createElement(l.Time.Input, {
|
|
485
|
+
className: s
|
|
486
|
+
}, /* @__PURE__ */ t.createElement(l.Time.Hour, {
|
|
487
|
+
className: N(D.hour, z)
|
|
488
|
+
}), /* @__PURE__ */ t.createElement(l.Time.Minute, {
|
|
489
|
+
className: N(D.minute, z)
|
|
490
|
+
}), /* @__PURE__ */ t.createElement(l.Time.Period, {
|
|
491
|
+
className: N(D.period, z)
|
|
492
|
+
}))), /* @__PURE__ */ t.createElement(l.NativeDateTime, {
|
|
493
|
+
className: i
|
|
494
|
+
}, /* @__PURE__ */ t.createElement(We, {
|
|
495
|
+
className: N(p.nativeDecoration, p.nativeLeadingIcon)
|
|
496
|
+
}), /* @__PURE__ */ t.createElement(l.NativeDateTime.Clear, {
|
|
497
|
+
className: p.nativeClearButton,
|
|
498
|
+
"aria-label": e("date-picker.a11y.clear-button")
|
|
499
|
+
}, /* @__PURE__ */ t.createElement(ke, null))), /* @__PURE__ */ t.createElement(l.Error, {
|
|
500
|
+
className: N(_e, p.error)
|
|
501
|
+
}, /* @__PURE__ */ t.createElement(at, null), /* @__PURE__ */ t.createElement(l.Error.Text, null)), /* @__PURE__ */ t.createElement(l.Description, {
|
|
502
|
+
className: N(ge, p.description)
|
|
503
|
+
}, vt));
|
|
504
|
+
};
|
|
505
|
+
export {
|
|
506
|
+
aa as D
|
|
507
|
+
};
|
package/dist/component/{dext-checkbox-group-rac-D_HLv0tP.js → dext-checkbox-group-rac-caVwDBtB.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import o from "react";
|
|
2
|
-
import { bN as e, aN as t } from "./form-
|
|
3
|
-
import { C as p } from "./checkbox-group-field-rac-
|
|
2
|
+
import { bN as e, aN as t } from "./form-Dnq7LxSl.js";
|
|
3
|
+
import { C as p } from "./checkbox-group-field-rac-BKQhos1K.js";
|
|
4
4
|
import { D as s } from "./default-limits-D7qVv_Hv.js";
|
|
5
5
|
const C = () => {
|
|
6
6
|
const r = {
|
package/dist/component/{dext-radio-group-rac-BAwIkDsJ.js → dext-radio-group-rac-DzLW_As4.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import r from "react";
|
|
2
|
-
import { bN as e, aN as t } from "./form-
|
|
3
|
-
import { R as p } from "./radio-group-field-rac-
|
|
2
|
+
import { bN as e, aN as t } from "./form-Dnq7LxSl.js";
|
|
3
|
+
import { R as p } from "./radio-group-field-rac-6SefZCE6.js";
|
|
4
4
|
import { a } from "./default-limits-D7qVv_Hv.js";
|
|
5
5
|
const l = () => {
|
|
6
6
|
const o = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import r from "react";
|
|
2
|
-
import { bN as e, aN as o } from "./form-
|
|
3
|
-
import { T as s } from "./tags-field-rac-
|
|
2
|
+
import { bN as e, aN as o } from "./form-Dnq7LxSl.js";
|
|
3
|
+
import { T as s } from "./tags-field-rac-BBFxSNch.js";
|
|
4
4
|
import { b as a } from "./default-limits-D7qVv_Hv.js";
|
|
5
5
|
const l = () => {
|
|
6
6
|
const t = {
|