@wix/form-elements 1.128.0 → 1.130.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-S9z3s23G.js → appointment-rac-BpZGi0ra.js} +4 -4
- package/dist/component/{bookings-address-rac-B7wL2TjQ.js → bookings-address-rac-IU28SJy5.js} +1 -1
- package/dist/component/{bookings-email-rac-T2lFRGpg.js → bookings-email-rac-BkhnLFKC.js} +1 -1
- package/dist/component/{bookings-first-name-rac-BBrENRBf.js → bookings-first-name-rac-CwMmkICM.js} +1 -1
- package/dist/component/{bookings-header-rac-CWGMiMQz.js → bookings-header-rac-BtGNPfsP.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BQWvH_gm.js → bookings-last-name-rac-BmloqxX9.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-tFs0Vioz.js → bookings-login-bar-rac-QHUQz0Do.js} +1 -1
- package/dist/component/{bookings-phone-rac-BV_BTfAh.js → bookings-phone-rac-CBKcGM_o.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-8cD6QJBZ.js → bookings-rich-text-rac-DnazNxHe.js} +1 -1
- package/dist/component/{checkbox-field-rac-YmG26i31.js → checkbox-field-rac-BSiNWGvO.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-CE8sEjZj.js → checkbox-group-field-headless-Bl_gIm5X.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CSuJRyk1.js → checkbox-group-field-rac-_cpM6zrw.js} +4 -4
- package/dist/component/{checkbox-group-rac-VDezm9js.js → checkbox-group-rac-mZwI2tQ7.js} +1 -1
- package/dist/component/{checkbox-rac-DoC1ZqAq.js → checkbox-rac-rfO8Kefs.js} +1 -1
- package/dist/component/{contacts-address-rac-10AZNzhI.js → contacts-address-rac-CHthblox.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-C7YDiyg2.js → contacts-birthdate-rac-CuvwylkU.js} +1 -1
- package/dist/component/{contacts-company-rac-xQEtJ_-m.js → contacts-company-rac-D546Lq1s.js} +1 -1
- package/dist/component/{contacts-email-rac-Bryw_aCU.js → contacts-email-rac-DwXQ_wWS.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BXmuuhfG.js → contacts-first-name-rac-C7bQDK9N.js} +1 -1
- package/dist/component/{contacts-last-name-rac-CVWVZO8I.js → contacts-last-name-rac-CQTkOyHY.js} +1 -1
- package/dist/component/{contacts-phone-rac-C-KSwisV.js → contacts-phone-rac-5_KC_NgQ.js} +1 -1
- package/dist/component/{contacts-position-rac-od-5Gie5.js → contacts-position-rac-Y467YbGC.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CCh9JcQx.js → contacts-subscribe-rac-By3IlB_r.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-DOM7TPQz.js → contacts-tax-id-rac-Cz7LLBFg.js} +1 -1
- package/dist/component/{date-availability-G5IwqtRi.js → date-availability-2VUtbyz1.js} +1 -1
- package/dist/component/{date-input-field-rac-BpBqS7LG.js → date-input-field-rac-C0YZZ7d1.js} +86 -86
- package/dist/component/{date-input-rac-CQyqRqZK.js → date-input-rac-BIlIrfkK.js} +1 -1
- package/dist/component/{date-picker-field-rac-BsR_0eAW.js → date-picker-field-rac-D96wqSQ2.js} +92 -91
- package/dist/component/{date-picker-rac-Bl2k363u.js → date-picker-rac-CgVftEAJ.js} +1 -1
- package/dist/component/date-time-input-field-rac-C4uP9wLp.js +427 -0
- package/dist/component/{date-time-input-rac-CInfYWxN.js → date-time-input-rac-BgHUANTP.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-E36LjEfn.js → dext-checkbox-group-rac-DjiWZ293.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DkMAv7aY.js → dext-checkbox-rac-BmUjJHD_.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BNkJPlYo.js → dext-date-picker-rac-BlrV70R7.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BH3Q0pwI.js → dext-date-time-input-rac-JkFxwGgu.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DkF_DD08.js → dext-dropdown-rac-Xbczi-Z0.js} +1 -1
- package/dist/component/{dext-email-rac-0x_DN0_O.js → dext-email-rac-DkMdn4ps.js} +1 -1
- package/dist/component/{dext-number-input-rac-UiIENkK3.js → dext-number-input-rac-CNMiNuNi.js} +1 -1
- package/dist/component/{dext-phone-rac-BZFK4Uq7.js → dext-phone-rac-C8c-RKQv.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CBAdO7kt.js → dext-radio-group-rac-BAJJSIKu.js} +2 -2
- package/dist/component/{dext-rating-input-rac-fqR1sriq.js → dext-rating-input-rac-BdnfHwl1.js} +1 -1
- package/dist/component/{dext-tags-rac-mDuiUs9L.js → dext-tags-rac-BjsYYa9X.js} +2 -2
- package/dist/component/{dext-text-area-rac-C-8jKWpK.js → dext-text-area-rac-Aatrs0NK.js} +1 -1
- package/dist/component/{dext-text-input-rac-CCBAM9YO.js → dext-text-input-rac-DgUfidRi.js} +1 -1
- package/dist/component/{dext-url-input-rac-C4_8Yk0p.js → dext-url-input-rac-DQbUHNX7.js} +1 -1
- package/dist/component/{donation-rac-BwDHypVJ.js → donation-rac-BEbw90qi.js} +5 -5
- package/dist/component/dropdown-field-headless-Cg-_dZP4.js +91 -0
- package/dist/component/{dropdown-field-rac-DduQJ9rO.js → dropdown-field-rac-EjA-abC8.js} +4 -4
- package/dist/component/{dropdown-rac-BhhECLoH.js → dropdown-rac-zDidZ7dx.js} +1 -1
- package/dist/component/{ecom-address-rac-BJ1nnEVL.js → ecom-address-rac-Df9TvxEv.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-4m1XMTDY.js → ecom-subscription-checkbox-rac-B6ztLCEK.js} +2 -2
- package/dist/component/{email-input-field-rac-bPEcgidt.js → email-input-field-rac-CpPKmeC5.js} +3 -3
- package/dist/component/{events-repeater-rac-CujTGEHx.js → events-repeater-rac-C5VWlWG-.js} +4 -4
- package/dist/component/{events-rsvp-rac-BPqr_aY9.js → events-rsvp-rac-CLTyr98o.js} +3 -3
- package/dist/component/{field-error-headless-Bu_4Huhb.js → field-error-headless-Dgx4BHo5.js} +1 -1
- package/dist/component/{field-label-headless-DkDmQPFG.js → field-label-headless-CsqtNbNm.js} +1 -1
- package/dist/component/{file-upload-rac-DmOQrGe8.js → file-upload-rac-1SX9-51k.js} +4 -4
- package/dist/component/{fixed-payment-rac-CDsddKrV.js → fixed-payment-rac-C_zIu17t.js} +3 -3
- package/dist/component/{form-BpJ4Lqbe.js → form-BoHpaLjl.js} +69 -69
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-Cr1FVQdq.js → header-field-rac-DBw1TpEG.js} +2 -2
- package/dist/component/{header-rac-CvAZsqDL.js → header-rac-DAnTKW4z.js} +1 -1
- package/dist/component/{image-choice-rac-D_EKrD73.js → image-choice-rac-CqnAnKbc.js} +4 -4
- package/dist/component/{index-Tnke1N8m.js → index-Rqkz8Lrx.js} +2 -2
- package/dist/component/{index-DxsHfkik.js → index-g0wVTJHp.js} +4 -4
- package/dist/component/{isObjectLike-CMWsWjX8.js → isObjectLike-Dt08IFKQ.js} +1 -1
- package/dist/component/{multiline-address-field-rac-BMeMP7J6.js → multiline-address-field-rac-1zdTMnWs.js} +7 -7
- package/dist/component/{multiline-address-rac-CFprfFXm.js → multiline-address-rac-DI_2qWao.js} +1 -1
- package/dist/component/non-modal-popover-D-u13tmp.js +64 -0
- package/dist/component/{number-input-field-rac-CaHySxYH.js → number-input-field-rac-1EfxOkZP.js} +4 -4
- package/dist/component/{number-input-rac-BezfoU8h.js → number-input-rac-AG8ecaT6.js} +1 -1
- package/dist/component/{password-rac-_wwZFd67.js → password-rac-CGu6cCp2.js} +4 -4
- package/dist/component/{payment-input-rac-CWrSvBDp.js → payment-input-rac-CRMqRcWZ.js} +4 -4
- package/dist/component/{phone-input-field-rac-R3LYdPIs.js → phone-input-field-rac-Bpk1kirr.js} +7 -7
- package/dist/component/{phone-rac-D6uILVRw.js → phone-rac-w7Kiv6ru.js} +1 -1
- package/dist/component/{product-list-rac-D3WTfC9k.js → product-list-rac-WIshqJ3F.js} +4 -4
- package/dist/component/{quiz-radio-group-rac-B6T7eedk.js → quiz-radio-group-rac-BkB4fikl.js} +1 -1
- package/dist/component/{radio-button-module-classes-D8Jm-Q6u.js → radio-button-module-classes-D78goUwl.js} +3 -3
- package/dist/component/{radio-group-field-rac-R5onZzJd.js → radio-group-field-rac-Cx2nvCDW.js} +4 -4
- package/dist/component/{radio-group-rac-DUPHR4tK.js → radio-group-rac-46JW3dAH.js} +1 -1
- package/dist/component/{rating-input-field-rac-C9GpwuRO.js → rating-input-field-rac-D05VBUGw.js} +4 -4
- package/dist/component/{rating-input-rac-Iv_2PVqP.js → rating-input-rac-DtnpPnnU.js} +1 -1
- package/dist/component/{rich-content-rac.module-Det3BKrI.js → rich-content-rac.module-W8U6Eupl.js} +1 -1
- package/dist/component/{rich-text-field-rac-DnBtp2d_.js → rich-text-field-rac-BKMs8NOQ.js} +2 -2
- package/dist/component/{rich-text-rac-CXzxap1G.js → rich-text-rac-BJ4Jii81.js} +1 -1
- package/dist/component/{service-dropdown-rac-CVyd2HYC.js → service-dropdown-rac-CEDqWqhg.js} +5 -5
- package/dist/component/{services-multi-choice-rac-BY-W0xIt.js → services-multi-choice-rac-9qwSAT5T.js} +5 -5
- package/dist/component/{signature-rac-BojdPJhg.js → signature-rac-D6BMpTFh.js} +4 -4
- package/dist/component/{submit-button-rac-Q7KKQbiL.js → submit-button-rac-Bj3iEONs.js} +2 -2
- package/dist/component/{tags-field-rac-CbmR6gi4.js → tags-field-rac-DMD53JR4.js} +5 -5
- package/dist/component/{tags-rac-hJo0tMVR.js → tags-rac-BNL4fHg-.js} +1 -1
- package/dist/component/{text-area-field-rac-DHQqkqtu.js → text-area-field-rac-CHJzdEBE.js} +4 -4
- package/dist/component/{text-area-rac-BTXxfWyK.js → text-area-rac-CgoEe9Qh.js} +1 -1
- package/dist/component/{text-input-field-rac-BVTBYjMM.js → text-input-field-rac-DewYQNfK.js} +3 -3
- package/dist/component/{text-input-headless-Dk_0y9U-.js → text-input-headless-OayaIOMS.js} +3 -3
- package/dist/component/{text-input-rac-DIwGn0WI.js → text-input-rac-4SxpOILY.js} +1 -1
- package/dist/component/{time-input-rac-ClyPOKOH.js → time-input-rac-CivcOPuU.js} +65 -64
- package/dist/component/{url-input-field-rac-BhPzHWTI.js → url-input-field-rac-BK3WIP-A.js} +4 -4
- package/dist/component/{url-input-rac-COD7T5wo.js → url-input-rac-Dgn9n6w1.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-CTDQ4YIC.js → use-dropdown-option-class-name-BZu-Fese.js} +2 -2
- package/dist/component/use-dropdown-trigger-class-name-Dpk8_xn2.js +40 -0
- package/dist/component/{use-element-state-class-name-BU86oHkX.js → use-element-state-class-name-Cby7DA2T.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-DWkmQfPd.js → use-hoverable-input-class-name-CKBvA8Gx.js} +2 -2
- package/dist/component/{use-service-options-base-jkecu8jY.js → use-service-options-base-Px-Ey93X.js} +1 -1
- package/dist/component/use-text-input-class-name-D30YesHa.js +6 -0
- package/package.json +2 -2
- package/dist/component/date-time-input-field-rac-C5TC2nsm.js +0 -426
- package/dist/component/dropdown-field-headless-CspX2zV_.js +0 -91
- package/dist/component/non-modal-popover-DtIMXHbe.js +0 -63
- package/dist/component/use-dropdown-trigger-class-name-DapDPNX0.js +0 -43
- package/dist/component/use-text-input-class-name-CNTXVb7N.js +0 -6
|
@@ -1,426 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as se } from "@wix/ricos/viewer";
|
|
2
|
-
import h from "classnames";
|
|
3
|
-
import t, { useMemo as T, useState as G, useCallback as H, useRef as U, useContext as oe } from "react";
|
|
4
|
-
import { parseTime as le } from "@internationalized/date";
|
|
5
|
-
import { UNSAFE_PortalProvider as ie } from "react-aria";
|
|
6
|
-
import { ListBoxItem as ce, Select as me, TextField as Q, TimeField as de, SelectValue as ue, Input as J, DateInput as pe, DateSegment as x, TimeFieldStateContext as Ee } from "react-aria-components";
|
|
7
|
-
import { bh as f, be as W, b9 as $, aO as X, a$ as Z, aB as d, br as C, b3 as K, aQ as he, aI as fe, b6 as be, aK as j, bj as z, I as R, U as ge, K as Ie, v as Ne, p as De } from "./form-BpJ4Lqbe.js";
|
|
8
|
-
import { f as u, a as P } from "./find-child-C60k4CxG.js";
|
|
9
|
-
import { g as ye } from "./helpers-HmkkXrh2.js";
|
|
10
|
-
import { D as _e, E as Oe } from "./field-error-headless-Bu_4Huhb.js";
|
|
11
|
-
import { L as Te } from "./field-label-headless-DkDmQPFG.js";
|
|
12
|
-
import { F as Ce } from "./fieldset-headless-CD3fds9J.js";
|
|
13
|
-
import { N as Fe, S as Le } from "./non-modal-popover-DtIMXHbe.js";
|
|
14
|
-
import { a as Pe, u as Me } from "./use-dropdown-trigger-class-name-DapDPNX0.js";
|
|
15
|
-
import { V as Se, u as Re } from "./use-dropdown-option-class-name-CTDQ4YIC.js";
|
|
16
|
-
import { C as Ae } from "./chevron-down-icon-CcpVm6B-.js";
|
|
17
|
-
import { E as Ve } from "./error-icon-hZxQ6DEy.js";
|
|
18
|
-
import { H as w } from "./custom-focus-class-_483Pkwp.js";
|
|
19
|
-
import { s as g } from "./field-rac.module-BIBNQEOK.js";
|
|
20
|
-
import { u as k } from "./use-text-input-class-name-CNTXVb7N.js";
|
|
21
|
-
const l = ({ children: e, className: a }) => {
|
|
22
|
-
const { id: n, required: s, onBlur: o, onFocus: r, FieldLayout: i } = f(), { inputId: m, labelId: c, ariaDescribedBy: b } = W(), { regionalFormat: p } = $(), y = T(() => X(p).filter(Z).map((S) => S.toUpperCase()), [
|
|
23
|
-
p
|
|
24
|
-
]), M = u(e, l.Label), v = u(e, l.Description), N = u(e, l.Error), D = {
|
|
25
|
-
[d.MONTH]: u(e, l.Month),
|
|
26
|
-
[d.DAY]: u(e, l.Day),
|
|
27
|
-
[d.YEAR]: u(e, l.Year)
|
|
28
|
-
}, _ = u(e, l.Time);
|
|
29
|
-
return /* @__PURE__ */ t.createElement(i, {
|
|
30
|
-
fieldId: n,
|
|
31
|
-
renderLabel: () => P(M, {
|
|
32
|
-
as: "div"
|
|
33
|
-
}),
|
|
34
|
-
renderInput: () => /* @__PURE__ */ t.createElement(Ce, {
|
|
35
|
-
id: m,
|
|
36
|
-
ariaLabelledBy: c,
|
|
37
|
-
ariaDescribedBy: b,
|
|
38
|
-
required: s,
|
|
39
|
-
onBlur: o,
|
|
40
|
-
onFocus: r,
|
|
41
|
-
className: a
|
|
42
|
-
}, D[y[0]], D[y[1]], D[y[2]], _),
|
|
43
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, N, v)
|
|
44
|
-
});
|
|
45
|
-
}, F = ({ children: e, className: a }) => {
|
|
46
|
-
const { id: n, disabled: s, readOnly: o, showDateLabels: r, hidePlaceholder: i } = f(), { labelId: m } = O(d.MONTH), { partValue: c, partError: b, onPartChange: p } = L(d.MONTH), { t: y } = C(), [M, v] = G(!1), N = Pe(n), [D, _] = G(null), S = i ? void 0 : y("field.date.placeholder.month"), ee = H((Y) => {
|
|
47
|
-
o || p(typeof Y == "string" ? Y : "");
|
|
48
|
-
}, [
|
|
49
|
-
p,
|
|
50
|
-
o
|
|
51
|
-
]), te = H((Y) => {
|
|
52
|
-
v(Y && !o);
|
|
53
|
-
}, [
|
|
54
|
-
o
|
|
55
|
-
]), ae = u(e, F.Label), ne = u(e, F.Trigger), re = u(e, F.Options);
|
|
56
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
57
|
-
className: a,
|
|
58
|
-
"data-date-field": !0
|
|
59
|
-
}, r ? ae : null, /* @__PURE__ */ t.createElement("div", {
|
|
60
|
-
ref: _,
|
|
61
|
-
style: {
|
|
62
|
-
display: "contents"
|
|
63
|
-
}
|
|
64
|
-
}), /* @__PURE__ */ t.createElement(ie, {
|
|
65
|
-
getContainer: () => D
|
|
66
|
-
}, /* @__PURE__ */ t.createElement(me, {
|
|
67
|
-
"aria-labelledby": r ? m : void 0,
|
|
68
|
-
value: c || null,
|
|
69
|
-
onChange: ee,
|
|
70
|
-
isDisabled: s,
|
|
71
|
-
isInvalid: b,
|
|
72
|
-
placeholder: S,
|
|
73
|
-
isOpen: N || M,
|
|
74
|
-
onOpenChange: N ? void 0 : te
|
|
75
|
-
}, ne, P(re, {
|
|
76
|
-
isForcedOpen: N
|
|
77
|
-
}))));
|
|
78
|
-
}, ve = ({ className: e }) => /* @__PURE__ */ t.createElement(q, {
|
|
79
|
-
datePart: d.MONTH,
|
|
80
|
-
className: e
|
|
81
|
-
}), Ye = ({ children: e, className: a }) => {
|
|
82
|
-
const { id: n, readOnly: s } = f(), { inputId: o } = O(d.MONTH), { partError: r, isFirstPart: i } = L(d.MONTH), m = U(null);
|
|
83
|
-
return z(() => {
|
|
84
|
-
var c;
|
|
85
|
-
i && ((c = m.current) == null || c.focus());
|
|
86
|
-
}, n), /* @__PURE__ */ t.createElement(Le, {
|
|
87
|
-
ref: m,
|
|
88
|
-
id: o,
|
|
89
|
-
className: a,
|
|
90
|
-
"data-hook": d.MONTH,
|
|
91
|
-
"data-invalid": r || void 0,
|
|
92
|
-
"data-readonly": s || void 0
|
|
93
|
-
}, /* @__PURE__ */ t.createElement(ue, null), e);
|
|
94
|
-
}, B = ({ children: e, className: a, ...n }) => {
|
|
95
|
-
const { isForcedOpen: s } = n, { language: o } = $(), r = T(() => ye(o), [
|
|
96
|
-
o
|
|
97
|
-
]), i = u(e, B.Option) ?? /* @__PURE__ */ t.createElement(B.Option, null);
|
|
98
|
-
return /* @__PURE__ */ t.createElement(Fe, {
|
|
99
|
-
className: a,
|
|
100
|
-
containerPadding: 0,
|
|
101
|
-
offset: 0
|
|
102
|
-
}, /* @__PURE__ */ t.createElement(Se, {
|
|
103
|
-
isForcedOpen: s,
|
|
104
|
-
autoFocus: s ? !1 : void 0
|
|
105
|
-
}, r.map((m, c) => P(i, {
|
|
106
|
-
key: String(c + 1),
|
|
107
|
-
value: String(c + 1),
|
|
108
|
-
label: m
|
|
109
|
-
}))));
|
|
110
|
-
}, we = ({ className: e, ...a }) => {
|
|
111
|
-
const { value: n, label: s } = a;
|
|
112
|
-
return /* @__PURE__ */ t.createElement(ce, {
|
|
113
|
-
className: e,
|
|
114
|
-
id: n,
|
|
115
|
-
textValue: s
|
|
116
|
-
}, s);
|
|
117
|
-
};
|
|
118
|
-
F.Label = ve;
|
|
119
|
-
F.Trigger = Ye;
|
|
120
|
-
F.Options = B;
|
|
121
|
-
B.Option = we;
|
|
122
|
-
const A = ({ children: e, className: a }) => {
|
|
123
|
-
const { disabled: n, readOnly: s, showDateLabels: o } = f(), { labelId: r } = O(d.DAY), { partValue: i, partError: m, onPartChange: c } = L(d.DAY), b = u(e, A.Label), p = u(e, A.Input);
|
|
124
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
125
|
-
className: a,
|
|
126
|
-
"data-date-field": !0
|
|
127
|
-
}, o && b, /* @__PURE__ */ t.createElement(Q, {
|
|
128
|
-
"aria-labelledby": o ? r : void 0,
|
|
129
|
-
value: i,
|
|
130
|
-
onChange: c,
|
|
131
|
-
isDisabled: n,
|
|
132
|
-
isReadOnly: s,
|
|
133
|
-
isInvalid: m
|
|
134
|
-
}, p));
|
|
135
|
-
}, He = ({ className: e }) => /* @__PURE__ */ t.createElement(q, {
|
|
136
|
-
datePart: d.DAY,
|
|
137
|
-
className: e
|
|
138
|
-
}), Be = ({ className: e }) => {
|
|
139
|
-
const { id: a, hidePlaceholder: n } = f(), { inputId: s } = O(d.DAY), { isFirstPart: o } = L(d.DAY), { t: r } = C(), i = U(null), m = n ? void 0 : r("field.date.placeholder.day");
|
|
140
|
-
return z(() => {
|
|
141
|
-
var c;
|
|
142
|
-
o && ((c = i.current) == null || c.focus());
|
|
143
|
-
}, a), /* @__PURE__ */ t.createElement(J, {
|
|
144
|
-
ref: i,
|
|
145
|
-
id: s,
|
|
146
|
-
className: e,
|
|
147
|
-
placeholder: m,
|
|
148
|
-
maxLength: 2,
|
|
149
|
-
inputMode: "numeric",
|
|
150
|
-
"data-hook": d.DAY
|
|
151
|
-
});
|
|
152
|
-
};
|
|
153
|
-
A.Label = He;
|
|
154
|
-
A.Input = Be;
|
|
155
|
-
const V = ({ children: e, className: a }) => {
|
|
156
|
-
const { disabled: n, readOnly: s, showDateLabels: o } = f(), { labelId: r } = O(d.YEAR), { partValue: i, partError: m, onPartChange: c } = L(d.YEAR), b = u(e, V.Label), p = u(e, V.Input);
|
|
157
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
158
|
-
className: a,
|
|
159
|
-
"data-date-field": !0
|
|
160
|
-
}, o && b, /* @__PURE__ */ t.createElement(Q, {
|
|
161
|
-
"aria-labelledby": o ? r : void 0,
|
|
162
|
-
value: i,
|
|
163
|
-
onChange: c,
|
|
164
|
-
isDisabled: n,
|
|
165
|
-
isReadOnly: s,
|
|
166
|
-
isInvalid: m
|
|
167
|
-
}, p));
|
|
168
|
-
}, xe = ({ className: e }) => /* @__PURE__ */ t.createElement(q, {
|
|
169
|
-
datePart: d.YEAR,
|
|
170
|
-
className: e
|
|
171
|
-
}), ke = ({ className: e }) => {
|
|
172
|
-
const { id: a, hidePlaceholder: n } = f(), { inputId: s } = O(d.YEAR), { isFirstPart: o } = L(d.YEAR), { t: r } = C(), i = U(null), m = n ? void 0 : r("field.date.placeholder.year");
|
|
173
|
-
return z(() => {
|
|
174
|
-
var c;
|
|
175
|
-
o && ((c = i.current) == null || c.focus());
|
|
176
|
-
}, a), /* @__PURE__ */ t.createElement(J, {
|
|
177
|
-
ref: i,
|
|
178
|
-
id: s,
|
|
179
|
-
className: e,
|
|
180
|
-
placeholder: m,
|
|
181
|
-
maxLength: 4,
|
|
182
|
-
inputMode: "numeric",
|
|
183
|
-
"data-hook": d.YEAR
|
|
184
|
-
});
|
|
185
|
-
};
|
|
186
|
-
V.Label = xe;
|
|
187
|
-
V.Input = ke;
|
|
188
|
-
const I = ({ children: e, className: a }) => {
|
|
189
|
-
const { disabled: n, readOnly: s, use24HourFormat: o, showDateLabels: r } = f(), { labelId: i } = O("time"), { partValue: m, partError: c, onPartChange: b } = L("time"), p = u(e, I.Label), y = u(e, I.Input);
|
|
190
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
191
|
-
className: a,
|
|
192
|
-
"data-date-field": !0
|
|
193
|
-
}, r && p, /* @__PURE__ */ t.createElement(de, {
|
|
194
|
-
"aria-labelledby": r ? i : void 0,
|
|
195
|
-
value: m,
|
|
196
|
-
onChange: b,
|
|
197
|
-
isDisabled: n,
|
|
198
|
-
isReadOnly: s,
|
|
199
|
-
isInvalid: c,
|
|
200
|
-
hourCycle: o ? 24 : 12
|
|
201
|
-
}, y));
|
|
202
|
-
}, Ue = ({ className: e }) => {
|
|
203
|
-
const { inputId: a, labelId: n } = O("time"), { t: s } = C(), o = s("field.date.label.time");
|
|
204
|
-
return /* @__PURE__ */ t.createElement("label", {
|
|
205
|
-
id: n,
|
|
206
|
-
htmlFor: a,
|
|
207
|
-
className: e
|
|
208
|
-
}, o);
|
|
209
|
-
}, $e = ({ children: e, className: a }) => {
|
|
210
|
-
const n = u(e, I.Hour), s = u(e, I.Minute), o = u(e, I.Period);
|
|
211
|
-
return /* @__PURE__ */ t.createElement(pe, {
|
|
212
|
-
className: a,
|
|
213
|
-
"data-hook": "time"
|
|
214
|
-
}, (r) => {
|
|
215
|
-
switch (r.type) {
|
|
216
|
-
case "hour":
|
|
217
|
-
return P(n, {
|
|
218
|
-
segment: r
|
|
219
|
-
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
220
|
-
case "minute":
|
|
221
|
-
return P(s, {
|
|
222
|
-
segment: r
|
|
223
|
-
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
224
|
-
case "dayPeriod":
|
|
225
|
-
return P(o, {
|
|
226
|
-
segment: r
|
|
227
|
-
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
228
|
-
case "literal":
|
|
229
|
-
return /* @__PURE__ */ t.createElement(x, {
|
|
230
|
-
segment: r
|
|
231
|
-
});
|
|
232
|
-
default:
|
|
233
|
-
return /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
}, ze = ({ className: e, ...a }) => {
|
|
237
|
-
const { hidePlaceholder: n } = f(), { segment: s } = a, { t: o } = C(), r = n ? void 0 : o("field.date.placeholder.hour");
|
|
238
|
-
return /* @__PURE__ */ t.createElement(x, {
|
|
239
|
-
segment: s,
|
|
240
|
-
className: e,
|
|
241
|
-
...r && {
|
|
242
|
-
placeholder: r
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
}, qe = ({ className: e, ...a }) => {
|
|
246
|
-
const { hidePlaceholder: n } = f(), { segment: s } = a, { t: o } = C(), r = n ? void 0 : o("field.date.placeholder.minute");
|
|
247
|
-
return /* @__PURE__ */ t.createElement(x, {
|
|
248
|
-
segment: s,
|
|
249
|
-
className: e,
|
|
250
|
-
...r && {
|
|
251
|
-
placeholder: r
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
}, Ge = ({ className: e, ...a }) => {
|
|
255
|
-
const { hidePlaceholder: n } = f(), { segment: s } = a, { t: o } = C(), r = oe(Ee), i = n ? void 0 : o("field.date.placeholder.period"), m = () => r == null ? void 0 : r.increment("dayPeriod");
|
|
256
|
-
return /* @__PURE__ */ t.createElement(x, {
|
|
257
|
-
segment: s,
|
|
258
|
-
className: e,
|
|
259
|
-
onClick: m,
|
|
260
|
-
...i && {
|
|
261
|
-
placeholder: i
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
};
|
|
265
|
-
I.Label = Ue;
|
|
266
|
-
I.Input = $e;
|
|
267
|
-
I.Hour = ze;
|
|
268
|
-
I.Minute = qe;
|
|
269
|
-
I.Period = Ge;
|
|
270
|
-
l.Label = Te;
|
|
271
|
-
l.Month = F;
|
|
272
|
-
l.Day = A;
|
|
273
|
-
l.Year = V;
|
|
274
|
-
l.Time = I;
|
|
275
|
-
l.Description = _e;
|
|
276
|
-
l.Error = Oe;
|
|
277
|
-
function O(e) {
|
|
278
|
-
const { inputId: a } = W();
|
|
279
|
-
return T(() => {
|
|
280
|
-
const n = e.toLowerCase();
|
|
281
|
-
return {
|
|
282
|
-
inputId: `${a}-${n}-input`,
|
|
283
|
-
labelId: `${a}-${n}-label`
|
|
284
|
-
};
|
|
285
|
-
}, [
|
|
286
|
-
a,
|
|
287
|
-
e
|
|
288
|
-
]);
|
|
289
|
-
}
|
|
290
|
-
function L(e) {
|
|
291
|
-
const { value: a, onChange: n, hasError: s = !1 } = f(), { regionalFormat: o } = $(), [r, i] = T(() => K(a ?? ""), [
|
|
292
|
-
a
|
|
293
|
-
]), m = T(() => he(s, a ?? ""), [
|
|
294
|
-
a,
|
|
295
|
-
s
|
|
296
|
-
]), c = T(() => fe(r), [
|
|
297
|
-
r
|
|
298
|
-
]), b = T(() => Ke(i), [
|
|
299
|
-
i
|
|
300
|
-
]), p = H((N) => {
|
|
301
|
-
const D = je(N), _ = j(r, D);
|
|
302
|
-
n(_);
|
|
303
|
-
}, [
|
|
304
|
-
n,
|
|
305
|
-
r
|
|
306
|
-
]), y = H((N) => {
|
|
307
|
-
const [, D] = K(a ?? ""), _ = be(N, e, c), S = j(_, D);
|
|
308
|
-
n(S);
|
|
309
|
-
}, [
|
|
310
|
-
n,
|
|
311
|
-
a,
|
|
312
|
-
c,
|
|
313
|
-
e
|
|
314
|
-
]), M = T(() => e === "time" ? !1 : X(o).filter(Z).map((_) => _.toUpperCase())[0] === e, [
|
|
315
|
-
o,
|
|
316
|
-
e
|
|
317
|
-
]);
|
|
318
|
-
return e === "time" ? {
|
|
319
|
-
partValue: b,
|
|
320
|
-
partError: m.TIME,
|
|
321
|
-
onPartChange: p,
|
|
322
|
-
isFirstPart: !1
|
|
323
|
-
} : {
|
|
324
|
-
partValue: c[e] || "",
|
|
325
|
-
partError: m[e],
|
|
326
|
-
onPartChange: y,
|
|
327
|
-
isFirstPart: M
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
function q({ datePart: e, className: a }) {
|
|
331
|
-
const { inputId: n, labelId: s } = O(e), { t: o } = C(), r = `field.date.label.${e.toLowerCase()}`, i = o(r);
|
|
332
|
-
return /* @__PURE__ */ t.createElement("label", {
|
|
333
|
-
id: s,
|
|
334
|
-
htmlFor: n,
|
|
335
|
-
className: a
|
|
336
|
-
}, i);
|
|
337
|
-
}
|
|
338
|
-
function Ke(e) {
|
|
339
|
-
if (!e)
|
|
340
|
-
return null;
|
|
341
|
-
try {
|
|
342
|
-
return le(e);
|
|
343
|
-
} catch {
|
|
344
|
-
return null;
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
function je(e) {
|
|
348
|
-
if (!e)
|
|
349
|
-
return null;
|
|
350
|
-
const a = String(e.hour).padStart(2, "0"), n = String(e.minute).padStart(2, "0"), s = String(e.second).padStart(2, "0");
|
|
351
|
-
return [
|
|
352
|
-
a,
|
|
353
|
-
n,
|
|
354
|
-
s
|
|
355
|
-
].join(":");
|
|
356
|
-
}
|
|
357
|
-
const Qe = "_fields_h99r9_1", Je = "_month_h99r9_10", We = "_day_h99r9_11", Xe = "_year_h99r9_12", Ze = "_timeGroup_h99r9_13", et = "_dayInput_h99r9_34", tt = "_yearInput_h99r9_35", at = "_monthTrigger_h99r9_39", nt = "_monthOption_h99r9_59", rt = "_time_h99r9_13", st = "_hour_h99r9_78", ot = "_minute_h99r9_79", lt = "_period_h99r9_80", E = {
|
|
358
|
-
fields: Qe,
|
|
359
|
-
month: Je,
|
|
360
|
-
day: We,
|
|
361
|
-
year: Xe,
|
|
362
|
-
timeGroup: Ze,
|
|
363
|
-
dayInput: et,
|
|
364
|
-
yearInput: tt,
|
|
365
|
-
monthTrigger: at,
|
|
366
|
-
monthOption: nt,
|
|
367
|
-
time: rt,
|
|
368
|
-
hour: st,
|
|
369
|
-
minute: ot,
|
|
370
|
-
period: lt
|
|
371
|
-
}, it = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(se, {
|
|
372
|
-
content: e,
|
|
373
|
-
locale: a
|
|
374
|
-
}), Pt = () => {
|
|
375
|
-
const e = Me(E.monthTrigger), a = Re(E.monthOption, w), n = k(E.dayInput), s = k(E.yearInput), o = k(E.time);
|
|
376
|
-
return /* @__PURE__ */ t.createElement(l, {
|
|
377
|
-
className: E.fields
|
|
378
|
-
}, /* @__PURE__ */ t.createElement(l.Label, {
|
|
379
|
-
className: h(R, g.label)
|
|
380
|
-
}, /* @__PURE__ */ t.createElement(l.Label.Required, {
|
|
381
|
-
className: h(ge, g.requiredMark)
|
|
382
|
-
})), /* @__PURE__ */ t.createElement(l.Month, {
|
|
383
|
-
className: E.month
|
|
384
|
-
}, /* @__PURE__ */ t.createElement(l.Month.Label, {
|
|
385
|
-
className: h(R, g.label)
|
|
386
|
-
}), /* @__PURE__ */ t.createElement(l.Month.Trigger, {
|
|
387
|
-
className: e
|
|
388
|
-
}, /* @__PURE__ */ t.createElement(Ae, {
|
|
389
|
-
className: g.dropdownIcon
|
|
390
|
-
})), /* @__PURE__ */ t.createElement(l.Month.Options, {
|
|
391
|
-
className: h(Ie, g.selectPopover, g.dropdownPopover)
|
|
392
|
-
}, /* @__PURE__ */ t.createElement(l.Month.Options.Option, {
|
|
393
|
-
className: a
|
|
394
|
-
}))), /* @__PURE__ */ t.createElement(l.Day, {
|
|
395
|
-
className: E.day
|
|
396
|
-
}, /* @__PURE__ */ t.createElement(l.Day.Label, {
|
|
397
|
-
className: h(R, g.label)
|
|
398
|
-
}), /* @__PURE__ */ t.createElement(l.Day.Input, {
|
|
399
|
-
className: n
|
|
400
|
-
})), /* @__PURE__ */ t.createElement(l.Year, {
|
|
401
|
-
className: E.year
|
|
402
|
-
}, /* @__PURE__ */ t.createElement(l.Year.Label, {
|
|
403
|
-
className: h(R, g.label)
|
|
404
|
-
}), /* @__PURE__ */ t.createElement(l.Year.Input, {
|
|
405
|
-
className: s
|
|
406
|
-
})), /* @__PURE__ */ t.createElement(l.Time, {
|
|
407
|
-
className: E.timeGroup
|
|
408
|
-
}, /* @__PURE__ */ t.createElement(l.Time.Label, {
|
|
409
|
-
className: h(R, g.label)
|
|
410
|
-
}), /* @__PURE__ */ t.createElement(l.Time.Input, {
|
|
411
|
-
className: o
|
|
412
|
-
}, /* @__PURE__ */ t.createElement(l.Time.Hour, {
|
|
413
|
-
className: h(E.hour, w)
|
|
414
|
-
}), /* @__PURE__ */ t.createElement(l.Time.Minute, {
|
|
415
|
-
className: h(E.minute, w)
|
|
416
|
-
}), /* @__PURE__ */ t.createElement(l.Time.Period, {
|
|
417
|
-
className: h(E.period, w)
|
|
418
|
-
}))), /* @__PURE__ */ t.createElement(l.Error, {
|
|
419
|
-
className: h(Ne, g.error)
|
|
420
|
-
}, /* @__PURE__ */ t.createElement(Ve, null), /* @__PURE__ */ t.createElement(l.Error.Text, null)), /* @__PURE__ */ t.createElement(l.Description, {
|
|
421
|
-
className: h(De, g.description)
|
|
422
|
-
}, it));
|
|
423
|
-
};
|
|
424
|
-
export {
|
|
425
|
-
Pt as D
|
|
426
|
-
};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import e, { useState as E, useCallback as g, useRef as A } from "react";
|
|
2
|
-
import { UNSAFE_PortalProvider as j } from "react-aria";
|
|
3
|
-
import { Select as M, SelectValue as U, ListBoxItem as _ } from "react-aria-components";
|
|
4
|
-
import { bh as f, be as O, bj as z } from "./form-BpJ4Lqbe.js";
|
|
5
|
-
import { f as d, a as F } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { D as G, E as H } from "./field-error-headless-Bu_4Huhb.js";
|
|
7
|
-
import { L as J } from "./field-label-headless-DkDmQPFG.js";
|
|
8
|
-
import { S as K, N as Q } from "./non-modal-popover-DtIMXHbe.js";
|
|
9
|
-
import { a as W } from "./use-dropdown-trigger-class-name-DapDPNX0.js";
|
|
10
|
-
import { V as X } from "./use-dropdown-option-class-name-CTDQ4YIC.js";
|
|
11
|
-
const r = ({ children: n }) => {
|
|
12
|
-
const { id: l, value: o, defaultValue: a, options: u = [], readOnly: s, onChange: t, placeholder: m, disabled: i, required: v, onBlur: y, onFocus: D, FieldLayout: h, hasError: C } = f(), [I, L] = E(!1), p = W(l), [B, N] = E(null), P = o && u.some((c) => (c.value ?? c.label) === o) ? o : a || null, { labelId: S } = O(), V = g((c) => {
|
|
13
|
-
s || t(typeof c == "string" ? c : null);
|
|
14
|
-
}, [
|
|
15
|
-
t,
|
|
16
|
-
s
|
|
17
|
-
]), T = g((c) => L(c && !i && !s), [
|
|
18
|
-
i,
|
|
19
|
-
s
|
|
20
|
-
]), x = d(n, r.Label), R = d(n, r.Trigger), w = d(n, r.Options), k = d(n, r.Description), q = d(n, r.Error);
|
|
21
|
-
return /* @__PURE__ */ e.createElement(h, {
|
|
22
|
-
fieldId: l,
|
|
23
|
-
renderLabel: () => x,
|
|
24
|
-
renderInput: () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", {
|
|
25
|
-
ref: N,
|
|
26
|
-
style: {
|
|
27
|
-
display: "contents"
|
|
28
|
-
}
|
|
29
|
-
}), /* @__PURE__ */ e.createElement(j, {
|
|
30
|
-
getContainer: () => B
|
|
31
|
-
}, /* @__PURE__ */ e.createElement(M, {
|
|
32
|
-
"aria-labelledby": S,
|
|
33
|
-
value: P,
|
|
34
|
-
isOpen: p || I && !i && !s,
|
|
35
|
-
onOpenChange: p ? void 0 : T,
|
|
36
|
-
onChange: V,
|
|
37
|
-
isDisabled: i,
|
|
38
|
-
isInvalid: C,
|
|
39
|
-
isRequired: v,
|
|
40
|
-
placeholder: m,
|
|
41
|
-
onBlur: y,
|
|
42
|
-
onFocus: D
|
|
43
|
-
}, R, F(w, {
|
|
44
|
-
isForcedOpen: p
|
|
45
|
-
})))),
|
|
46
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, q, k)
|
|
47
|
-
});
|
|
48
|
-
}, Y = ({ children: n, className: l }) => {
|
|
49
|
-
const { inputId: o, ariaDescribedBy: a } = O(), { id: u, hasError: s, isLoading: t } = f(), m = A(null);
|
|
50
|
-
return z(() => {
|
|
51
|
-
var i;
|
|
52
|
-
(i = m.current) == null || i.focus();
|
|
53
|
-
}, u), /* @__PURE__ */ e.createElement(K, {
|
|
54
|
-
ref: m,
|
|
55
|
-
id: o,
|
|
56
|
-
"aria-describedby": a,
|
|
57
|
-
className: l,
|
|
58
|
-
"data-invalid": s || void 0,
|
|
59
|
-
"data-loading": t || void 0
|
|
60
|
-
}, /* @__PURE__ */ e.createElement(U, null), n);
|
|
61
|
-
}, b = ({ children: n, className: l, ...o }) => {
|
|
62
|
-
const { isForcedOpen: a } = o, { options: u = [] } = f(), s = d(n, b.Option);
|
|
63
|
-
return /* @__PURE__ */ e.createElement(Q, {
|
|
64
|
-
className: l,
|
|
65
|
-
containerPadding: 0,
|
|
66
|
-
offset: 0
|
|
67
|
-
}, /* @__PURE__ */ e.createElement(X, {
|
|
68
|
-
isForcedOpen: a,
|
|
69
|
-
autoFocus: a ? !1 : void 0
|
|
70
|
-
}, u.map((t) => F(s, {
|
|
71
|
-
key: t.value ?? t.label,
|
|
72
|
-
value: t.value ?? t.label,
|
|
73
|
-
label: t.label
|
|
74
|
-
}))));
|
|
75
|
-
}, Z = ({ className: n, ...l }) => {
|
|
76
|
-
const { value: o, label: a } = l;
|
|
77
|
-
return /* @__PURE__ */ e.createElement(_, {
|
|
78
|
-
className: n,
|
|
79
|
-
id: o,
|
|
80
|
-
textValue: a
|
|
81
|
-
}, a);
|
|
82
|
-
};
|
|
83
|
-
b.Option = Z;
|
|
84
|
-
r.Label = J;
|
|
85
|
-
r.Trigger = Y;
|
|
86
|
-
r.Options = b;
|
|
87
|
-
r.Description = G;
|
|
88
|
-
r.Error = H;
|
|
89
|
-
export {
|
|
90
|
-
r as D
|
|
91
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import u, { forwardRef as f, useContext as i, useRef as p, useEffect as R, createContext as B } from "react";
|
|
2
|
-
import { useObjectRef as D, useInteractOutside as I } from "react-aria";
|
|
3
|
-
import { OverlayTriggerStateContext as P, useSlottedContext as S, PopoverContext as b, Popover as N, Button as T } from "react-aria-components";
|
|
4
|
-
const x = /* @__PURE__ */ B(null), k = (e) => e != null && e.matches("[aria-haspopup]") ? e : e == null ? void 0 : e.querySelector("[aria-haspopup]"), m = /* @__PURE__ */ f((e, r) => {
|
|
5
|
-
var l;
|
|
6
|
-
const t = D(r), n = i(P), o = (l = S(b)) == null ? void 0 : l.triggerRef, s = i(x), c = p(0), O = p(!1), a = n == null ? void 0 : n.isOpen;
|
|
7
|
-
R(() => {
|
|
8
|
-
if (!(!a || !t.current || !s))
|
|
9
|
-
return s.current += 1, () => {
|
|
10
|
-
s.current -= 1;
|
|
11
|
-
};
|
|
12
|
-
}, [
|
|
13
|
-
a,
|
|
14
|
-
t,
|
|
15
|
-
s
|
|
16
|
-
]);
|
|
17
|
-
const h = (d) => {
|
|
18
|
-
var C;
|
|
19
|
-
return !((C = k(o == null ? void 0 : o.current)) != null && C.contains(d));
|
|
20
|
-
};
|
|
21
|
-
return I({
|
|
22
|
-
ref: t,
|
|
23
|
-
isDisabled: !a,
|
|
24
|
-
onInteractOutsideStart: () => {
|
|
25
|
-
O.current = c.current > 0;
|
|
26
|
-
},
|
|
27
|
-
onInteractOutside: (d) => {
|
|
28
|
-
!O.current && h(d.target) && (n == null || n.close());
|
|
29
|
-
}
|
|
30
|
-
}), /* @__PURE__ */ u.createElement(x.Provider, {
|
|
31
|
-
value: c
|
|
32
|
-
}, /* @__PURE__ */ u.createElement(N, {
|
|
33
|
-
...e,
|
|
34
|
-
ref: t,
|
|
35
|
-
isNonModal: !0,
|
|
36
|
-
shouldCloseOnInteractOutside: h
|
|
37
|
-
}));
|
|
38
|
-
}), q = /* @__PURE__ */ f((e, r) => {
|
|
39
|
-
const t = i(P), n = (o) => {
|
|
40
|
-
var c;
|
|
41
|
-
(c = e.onPressStart) == null || c.call(e, o), o.pointerType !== "touch" && o.pointerType !== "keyboard" && (t != null && t.isOpen) && t.close();
|
|
42
|
-
};
|
|
43
|
-
return /* @__PURE__ */ u.createElement(T, {
|
|
44
|
-
...e,
|
|
45
|
-
ref: r,
|
|
46
|
-
onPressStart: n
|
|
47
|
-
});
|
|
48
|
-
}), v = /* @__PURE__ */ f((e, r) => {
|
|
49
|
-
const t = i(P), n = (o) => {
|
|
50
|
-
var s;
|
|
51
|
-
(s = e.onPress) == null || s.call(e, o), t != null && t.isOpen && t.close();
|
|
52
|
-
};
|
|
53
|
-
return /* @__PURE__ */ u.createElement(T, {
|
|
54
|
-
...e,
|
|
55
|
-
ref: r,
|
|
56
|
-
onPress: n
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
export {
|
|
60
|
-
v as D,
|
|
61
|
-
m as N,
|
|
62
|
-
q as S
|
|
63
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { useContext as i, useMemo as u } from "react";
|
|
2
|
-
import { bb as T, an as p, b9 as O, F as s, t as _ } from "./form-BpJ4Lqbe.js";
|
|
3
|
-
import { u as I } from "./use-hoverable-input-class-name-DWkmQfPd.js";
|
|
4
|
-
const l = [
|
|
5
|
-
s.DROPDOWN,
|
|
6
|
-
s.DEXT_DROPDOWN,
|
|
7
|
-
s.SERVICES_DROPDOWN,
|
|
8
|
-
s.DATE_INPUT,
|
|
9
|
-
s.CONTACTS_BIRTHDATE,
|
|
10
|
-
s.DATE_TIME_INPUT,
|
|
11
|
-
s.DEXT_DATE_TIME_INPUT,
|
|
12
|
-
s.DATE_PICKER,
|
|
13
|
-
s.DEXT_DATE_PICKER
|
|
14
|
-
], d = [
|
|
15
|
-
s.PHONE,
|
|
16
|
-
s.CONTACTS_PHONE,
|
|
17
|
-
s.BOOKINGS_PHONE,
|
|
18
|
-
s.DEXT_PHONE
|
|
19
|
-
], P = [
|
|
20
|
-
s.MULTILINE_ADDRESS,
|
|
21
|
-
s.BOOKINGS_ADDRESS,
|
|
22
|
-
s.ECOM_ADDRESS
|
|
23
|
-
], c = ({ properties: o }) => {
|
|
24
|
-
var e, n, t, r;
|
|
25
|
-
return ((r = (t = (n = (e = o.validation) == null ? void 0 : e.string) == null ? void 0 : n.phoneOptions) == null ? void 0 : t.allowedCountryCodes) == null ? void 0 : r.length) !== 1;
|
|
26
|
-
}, N = ({ properties: o }) => {
|
|
27
|
-
var e, n;
|
|
28
|
-
return ((n = (e = o.fieldSettings) == null ? void 0 : e.country) == null ? void 0 : n.show) !== !1;
|
|
29
|
-
}, S = (o, e) => d.includes(o.fieldType) ? !e && c(o) : P.includes(o.fieldType) ? N(o) : l.includes(o.fieldType), C = (o, e) => S(o, e) && !o.properties.hidden && !o.properties.disabled && !o.properties.readOnly, R = (o, e) => o.layout.row - e.layout.row || o.layout.column - e.layout.column, A = (o) => {
|
|
30
|
-
var D;
|
|
31
|
-
const e = ((D = T().dropdown) == null ? void 0 : D.open) === !0, n = i(p), { isMobile: t = !1 } = O(), r = u(() => {
|
|
32
|
-
var E;
|
|
33
|
-
return n && !n.parentId ? (E = n.fields.filter((a) => C(a, t)).sort(R)[0]) == null ? void 0 : E.id : void 0;
|
|
34
|
-
}, [
|
|
35
|
-
n,
|
|
36
|
-
t
|
|
37
|
-
]);
|
|
38
|
-
return e && r === o;
|
|
39
|
-
}, f = (...o) => I(_, o);
|
|
40
|
-
export {
|
|
41
|
-
A as a,
|
|
42
|
-
f as u
|
|
43
|
-
};
|