@wix/form-elements 1.145.0 → 1.147.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-De-uH9rz.js → appointment-rac-BG5-bIZU.js} +98 -98
- package/dist/component/{bookings-address-rac-DB6QCMQJ.js → bookings-address-rac-8e8PqKsp.js} +1 -1
- package/dist/component/{bookings-email-rac-g6ZdB_BO.js → bookings-email-rac-CtlnU8ws.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DQgL_VHl.js → bookings-first-name-rac-CrivNlXM.js} +1 -1
- package/dist/component/{bookings-header-rac-DAnIm-Oq.js → bookings-header-rac-DWDAjfqq.js} +1 -1
- package/dist/component/{bookings-last-name-rac-D62jNdDb.js → bookings-last-name-rac-qAthWem2.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-5z8HfBhU.js → bookings-login-bar-rac-BNyUDqlM.js} +6 -6
- package/dist/component/{bookings-phone-rac-D0gu-_wy.js → bookings-phone-rac-Tc39XLr7.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-b4J1HcdI.js → bookings-rich-text-rac-CPNaPtFK.js} +1 -1
- package/dist/component/{checkbox-field-rac-CmRRc9Dz.js → checkbox-field-rac-DEa78Tpf.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-CB8yAfMe.js → checkbox-group-field-headless-BxBaMg29.js} +68 -68
- package/dist/component/{checkbox-group-field-rac-C5gRZRTd.js → checkbox-group-field-rac-CRRP03Qk.js} +7 -7
- package/dist/component/{checkbox-group-rac-DNDF1Irh.js → checkbox-group-rac-TOofMGl3.js} +1 -1
- package/dist/component/{checkbox-rac-B9vztGBU.js → checkbox-rac-CHMHr8Ry.js} +1 -1
- package/dist/component/{contacts-address-rac-CKZeSncj.js → contacts-address-rac-Bc5yDvTL.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BbpNNQgF.js → contacts-birthdate-rac-Ubtg5ncv.js} +1 -1
- package/dist/component/{contacts-company-rac-BX2KT201.js → contacts-company-rac-BksH9IoV.js} +1 -1
- package/dist/component/{contacts-email-rac-5Irzx1mA.js → contacts-email-rac-DDPEtMAm.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CxKp8_2u.js → contacts-first-name-rac-DUlCvEdx.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BDCbSv5I.js → contacts-last-name-rac-BikqNgUr.js} +1 -1
- package/dist/component/{contacts-phone-rac-BM_PV_uH.js → contacts-phone-rac-B4OEgM_8.js} +1 -1
- package/dist/component/{contacts-position-rac-1aqthQSi.js → contacts-position-rac-BfybzySV.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CdqXs4kp.js → contacts-subscribe-rac-CMHb33v1.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BKHpcDb6.js → contacts-tax-id-rac-C-qEqwO5.js} +1 -1
- package/dist/component/{date-availability-DmFFTX8p.js → date-availability-DZ3J3LLm.js} +1 -1
- package/dist/component/date-input-field-rac-DeL5vuE7.js +297 -0
- package/dist/component/{date-input-rac-BB6qZ16w.js → date-input-rac-Di6TQvFf.js} +1 -1
- package/dist/component/{date-picker-field-rac-Ckwu2vD6.js → date-picker-field-rac-BcdpTkjV.js} +107 -103
- package/dist/component/{date-picker-rac-DSqzUAaH.js → date-picker-rac-Brne65gr.js} +1 -1
- package/dist/component/{date-time-input-field-rac-DO-iRdkW.js → date-time-input-field-rac-BtQfAxRp.js} +49 -49
- package/dist/component/{date-time-input-rac-smVCCxdY.js → date-time-input-rac-DM_HXiqV.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-B8bx3rT2.js → dext-checkbox-group-rac-WTVwhGG0.js} +2 -2
- package/dist/component/{dext-checkbox-rac-x8VLGRbc.js → dext-checkbox-rac-BR5YwmLQ.js} +1 -1
- package/dist/component/{dext-date-picker-rac-D2a9NXap.js → dext-date-picker-rac-DvDuRGYi.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-Cp5XjpGv.js → dext-date-time-input-rac-C6RgbaVv.js} +1 -1
- package/dist/component/{dext-dropdown-rac-nWgEvyxt.js → dext-dropdown-rac-CWjSdcZx.js} +1 -1
- package/dist/component/{dext-email-rac-CkX6ya8p.js → dext-email-rac-D-C1gVTq.js} +1 -1
- package/dist/component/{dext-number-input-rac-CKT0MS1x.js → dext-number-input-rac-YKzZS2ZG.js} +1 -1
- package/dist/component/{dext-phone-rac-DM2E7zW_.js → dext-phone-rac-CFZlEH2a.js} +1 -1
- package/dist/component/dext-radio-group-rac-DiH0wIIl.js +18 -0
- package/dist/component/{dext-rating-input-rac-CKWNpFuu.js → dext-rating-input-rac-D0s-i0qO.js} +1 -1
- package/dist/component/{dext-tags-rac-6AskGGTp.js → dext-tags-rac-Br48OQQ5.js} +2 -2
- package/dist/component/{dext-text-area-rac-ClGLD7sD.js → dext-text-area-rac-6jG8gJ7i.js} +1 -1
- package/dist/component/{dext-text-input-rac-Blbk53d4.js → dext-text-input-rac-FAJTCXuf.js} +1 -1
- package/dist/component/{dext-url-input-rac-BuitmJU0.js → dext-url-input-rac-BoMP8sQB.js} +1 -1
- package/dist/component/{donation-rac-DOifFCD7.js → donation-rac-DNi4p-v5.js} +69 -69
- package/dist/component/{dropdown-field-headless-m2P6s7X5.js → dropdown-field-headless-7SCC-xOC.js} +27 -27
- package/dist/component/{dropdown-field-rac-5e6wWJBl.js → dropdown-field-rac-CMzZh6J6.js} +8 -9
- package/dist/component/{dropdown-rac-BGxE9pJB.js → dropdown-rac-qeugpHXY.js} +1 -1
- package/dist/component/{ecom-address-rac-kbD9qW5Y.js → ecom-address-rac-D8b_L5md.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CE-Yixnj.js → ecom-subscription-checkbox-rac-BnAuR9La.js} +5 -5
- package/dist/component/{email-input-field-rac-CbwcB33o.js → email-input-field-rac-CunXRyc5.js} +64 -62
- package/dist/component/{events-repeater-rac-CGhUscBr.js → events-repeater-rac-DMjyIOkB.js} +17 -17
- package/dist/component/{events-rsvp-rac-AQ33zPTe.js → events-rsvp-rac-BsuDPq2K.js} +8 -8
- package/dist/component/{field-error-headless-ClPQ03Jc.js → field-error-headless-E8WjFr_n.js} +6 -6
- package/dist/component/{field-label-headless-DhN8Lkuq.js → field-label-headless-BakLOu5E.js} +15 -15
- package/dist/component/{file-upload-rac-yTx1ZRhZ.js → file-upload-rac-Clu_c--0.js} +43 -43
- package/dist/component/{fixed-payment-rac-nlyxa9nB.js → fixed-payment-rac-CzAXxsb-.js} +12 -12
- package/dist/component/{form-D3iU18lh.js → form-DHAKwnLt.js} +3850 -3872
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +2 -2
- package/dist/component/{header-field-rac-DAEzcleV.js → header-field-rac-CwmVpz3r.js} +4 -4
- package/dist/component/{header-rac-CJZ4qMFg.js → header-rac-ahkGRjSy.js} +1 -1
- package/dist/component/{image-choice-rac-BFAMHwPh.js → image-choice-rac-BwxkkdUu.js} +17 -17
- package/dist/component/{index-DQW26cnX.js → index-BFi_n6B7.js} +2 -2
- package/dist/component/{index-W7GOFnq8.js → index-BQf23zZi.js} +91 -91
- package/dist/component/{isObjectLike-CE8eaxSI.js → isObjectLike-DHcMRYYH.js} +15 -15
- package/dist/component/{multiline-address-field-rac-FbJO0HFf.js → multiline-address-field-rac-C6xaqNOk.js} +68 -60
- package/dist/component/{multiline-address-rac-CI-vt6Pm.js → multiline-address-rac-DF4TFuDx.js} +1 -1
- package/dist/component/{number-input-field-rac-BRVAr7LL.js → number-input-field-rac-uVJ3SBv2.js} +27 -27
- package/dist/component/{number-input-rac-C8hCiJiu.js → number-input-rac-D6ERhrSM.js} +1 -1
- package/dist/component/{password-rac-Baslr6Ga.js → password-rac-CAiC0ZKl.js} +47 -46
- package/dist/component/{payment-input-rac-CfJSKxYz.js → payment-input-rac-Bu25xvby.js} +33 -32
- package/dist/component/{phone-input-field-rac-Dqh4CXdC.js → phone-input-field-rac-32qUvCsC.js} +46 -45
- package/dist/component/{phone-rac-DaLuGuxd.js → phone-rac-mNrpj30q.js} +1 -1
- package/dist/component/{product-list-rac-PNMwRBtL.js → product-list-rac-zHdM9rHw.js} +53 -53
- package/dist/component/{quiz-radio-group-rac-DN8vY-oM.js → quiz-radio-group-rac-BaSlT8w3.js} +1 -1
- package/dist/component/{radio-button-module-classes-DlJi9a2f.js → radio-button-module-classes-BdWjkBlX.js} +9 -9
- package/dist/component/{radio-group-field-rac-C0tLXhl5.js → radio-group-field-rac-DI0UgTBr.js} +12 -12
- package/dist/component/{radio-group-rac-FAk7PYgP.js → radio-group-rac-D2ESG8J4.js} +1 -1
- package/dist/component/{rating-input-field-rac-Cl1kH_uu.js → rating-input-field-rac-BYT2XqOK.js} +26 -26
- package/dist/component/{rating-input-rac-D9p-0pkI.js → rating-input-rac-D-5CmVAX.js} +1 -1
- package/dist/component/{rich-content-rac.module-Dkr46kPC.js → rich-content-rac.module-Dp9Advo9.js} +8 -8
- package/dist/component/{rich-text-field-rac-DthhTvTp.js → rich-text-field-rac-COEUwoXQ.js} +4 -4
- package/dist/component/{rich-text-rac-DqZX4NeB.js → rich-text-rac-CQZLjBQ0.js} +1 -1
- package/dist/component/{service-dropdown-rac-BMOGLU2Z.js → service-dropdown-rac-BTtJVFv8.js} +44 -45
- package/dist/component/{services-multi-choice-rac-DcdUewzJ.js → services-multi-choice-rac-hbY3g0Kb.js} +11 -11
- package/dist/component/{signature-rac-BRvN6kUW.js → signature-rac-CTCNclwL.js} +67 -67
- package/dist/component/{submit-button-rac-B70UC8eS.js → submit-button-rac-kKGeVgsG.js} +25 -25
- package/dist/component/{tags-field-rac-NpYyV8X4.js → tags-field-rac-CVf7oQr_.js} +35 -35
- package/dist/component/{tags-rac-BMEbpJ-z.js → tags-rac-DiX1_nTT.js} +1 -1
- package/dist/component/{text-area-field-rac-BLSrNwJ6.js → text-area-field-rac-IhBNXiDl.js} +22 -22
- package/dist/component/{text-area-rac-Cm7aAfIz.js → text-area-rac-DHevCtFF.js} +1 -1
- package/dist/component/{text-input-field-rac-BDqV7s0M.js → text-input-field-rac-Da3_wTdh.js} +5 -5
- package/dist/component/text-input-headless-DcZRRXCp.js +45 -0
- package/dist/component/{text-input-rac-Cc_SkCCS.js → text-input-rac-564LIZ1_.js} +1 -1
- package/dist/component/{time-input-rac-DDCiAFe2.js → time-input-rac-p-Nnsxp_.js} +54 -54
- package/dist/component/{url-input-field-rac-jen6pbz7.js → url-input-field-rac-DjrcpRtm.js} +27 -26
- package/dist/component/{url-input-rac-BWh6udtS.js → url-input-rac-B3brpyop.js} +1 -1
- package/dist/component/use-dropdown-trigger-class-name-BWTT7ltv.js +117 -0
- package/dist/component/{use-element-state-class-name-B1r_nXW1.js → use-element-state-class-name-CUZuhFvZ.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-B-FhrcyQ.js → use-hoverable-input-class-name-ugX8-g4E.js} +6 -6
- package/dist/component/use-is-forced-open-dropdown-DUZMvWpk.js +48 -0
- package/dist/component/{use-service-options-base-CTA_43F3.js → use-service-options-base-hqO9Ev38.js} +6 -6
- package/dist/component/use-text-input-class-name-wp9dzpEy.js +6 -0
- package/dist/form.d.ts +5 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-BnlAOn12.js +0 -290
- package/dist/component/dext-radio-group-rac-Czr5yY3K.js +0 -18
- package/dist/component/text-input-headless-B0jcwDev.js +0 -44
- package/dist/component/use-dropdown-option-class-name-OD8brKoy.js +0 -115
- package/dist/component/use-dropdown-trigger-class-name-BrkmG0ad.js +0 -40
- package/dist/component/use-text-input-class-name-BXuk3TK7.js +0 -6
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as ee } from "@wix/ricos/viewer";
|
|
2
|
-
import h from "classnames";
|
|
3
|
-
import t, { useMemo as O, useState as k, useCallback as v, useRef as w } from "react";
|
|
4
|
-
import { UNSAFE_PortalProvider as te } from "react-aria";
|
|
5
|
-
import { ListBoxItem as ae, Select as ne, TextField as $, SelectValue as re, Input as q } from "react-aria-components";
|
|
6
|
-
import { bn as D, bk as z, bf as V, aU as G, b5 as K, aH as m, bx as S, aO as se, aV as oe, bc as le, bp as H, R as P, $ as ce, x as ie, G as me, u as de } from "./form-D3iU18lh.js";
|
|
7
|
-
import { f as u, a as x } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { g as ue } from "./helpers-HmkkXrh2.js";
|
|
9
|
-
import { D as pe, E as Ee } from "./field-error-headless-ClPQ03Jc.js";
|
|
10
|
-
import { L as fe } from "./field-label-headless-DhN8Lkuq.js";
|
|
11
|
-
import { F as be } from "./fieldset-headless-CD3fds9J.js";
|
|
12
|
-
import { N as he, E as ye, S as De } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
-
import { a as Ie, u as ge } from "./use-dropdown-trigger-class-name-BrkmG0ad.js";
|
|
14
|
-
import { V as Oe, u as Ne } from "./use-dropdown-option-class-name-OD8brKoy.js";
|
|
15
|
-
import { C as Le } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
|
-
import { E as _e } from "./error-icon-hZxQ6DEy.js";
|
|
17
|
-
import { H as Ce } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
-
import { s as E } from "./field-rac.module-DfEb7pBp.js";
|
|
19
|
-
import { u as U } from "./use-text-input-class-name-BXuk3TK7.js";
|
|
20
|
-
const n = ({ children: e, className: a }) => {
|
|
21
|
-
const { id: r, required: s, onBlur: o, onFocus: l, FieldLayout: c } = D(), { inputId: d, labelId: i, ariaDescribedBy: f } = z(), { regionalFormat: p } = V(), b = O(() => G(p).filter(K).map((Y) => Y.toUpperCase()), [
|
|
22
|
-
p
|
|
23
|
-
]), L = u(e, n.Label), T = u(e, n.Description), _ = u(e, n.Error), C = {
|
|
24
|
-
[m.MONTH]: u(e, n.Month),
|
|
25
|
-
[m.DAY]: u(e, n.Day),
|
|
26
|
-
[m.YEAR]: u(e, n.Year)
|
|
27
|
-
};
|
|
28
|
-
return /* @__PURE__ */ t.createElement(c, {
|
|
29
|
-
fieldId: r,
|
|
30
|
-
renderLabel: () => x(L, {
|
|
31
|
-
as: "div"
|
|
32
|
-
}),
|
|
33
|
-
renderInput: () => /* @__PURE__ */ t.createElement(be, {
|
|
34
|
-
id: d,
|
|
35
|
-
ariaLabelledBy: i,
|
|
36
|
-
ariaDescribedBy: f,
|
|
37
|
-
required: s,
|
|
38
|
-
onBlur: o,
|
|
39
|
-
onFocus: l,
|
|
40
|
-
className: a
|
|
41
|
-
}, C[b[0]], C[b[1]], C[b[2]]),
|
|
42
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, _, T)
|
|
43
|
-
});
|
|
44
|
-
}, I = ({ children: e, className: a }) => {
|
|
45
|
-
const { id: r, disabled: s, readOnly: o, showDateLabels: l, hidePlaceholder: c } = D(), { labelId: d } = g(m.MONTH), { partValue: i, partError: f, onPartChange: p } = N(m.MONTH), { t: b } = S(), [L, T] = k(!1), _ = Ie(r), [C, Y] = k(null), Q = c ? ye : b("field.date.placeholder.month"), W = v((M) => {
|
|
46
|
-
o || p(typeof M == "string" ? M : "");
|
|
47
|
-
}, [
|
|
48
|
-
p,
|
|
49
|
-
o
|
|
50
|
-
]), j = v((M) => {
|
|
51
|
-
T(M && !o);
|
|
52
|
-
}, [
|
|
53
|
-
o
|
|
54
|
-
]), J = u(e, I.Label), X = u(e, I.Trigger), Z = u(e, I.Options);
|
|
55
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
56
|
-
className: a,
|
|
57
|
-
"data-date-field": !0
|
|
58
|
-
}, l ? J : null, /* @__PURE__ */ t.createElement("div", {
|
|
59
|
-
ref: Y,
|
|
60
|
-
style: {
|
|
61
|
-
display: "contents"
|
|
62
|
-
}
|
|
63
|
-
}), /* @__PURE__ */ t.createElement(te, {
|
|
64
|
-
getContainer: () => C
|
|
65
|
-
}, /* @__PURE__ */ t.createElement(ne, {
|
|
66
|
-
"aria-labelledby": l ? d : void 0,
|
|
67
|
-
value: i || null,
|
|
68
|
-
onChange: W,
|
|
69
|
-
isDisabled: s,
|
|
70
|
-
isInvalid: f,
|
|
71
|
-
placeholder: Q,
|
|
72
|
-
isOpen: _ || L,
|
|
73
|
-
onOpenChange: _ ? void 0 : j
|
|
74
|
-
}, X, x(Z, {
|
|
75
|
-
isForcedOpen: _
|
|
76
|
-
}))));
|
|
77
|
-
}, Fe = ({ className: e }) => /* @__PURE__ */ t.createElement(B, {
|
|
78
|
-
datePart: m.MONTH,
|
|
79
|
-
className: e
|
|
80
|
-
}), Re = ({ children: e, className: a }) => {
|
|
81
|
-
const { id: r, readOnly: s } = D(), { inputId: o } = g(m.MONTH), { partError: l, isFirstPart: c } = N(m.MONTH), d = w(null);
|
|
82
|
-
return H(() => {
|
|
83
|
-
var i;
|
|
84
|
-
c && ((i = d.current) == null || i.focus());
|
|
85
|
-
}, r), /* @__PURE__ */ t.createElement(De, {
|
|
86
|
-
ref: d,
|
|
87
|
-
id: o,
|
|
88
|
-
className: a,
|
|
89
|
-
"data-hook": m.MONTH,
|
|
90
|
-
"data-invalid": l || void 0,
|
|
91
|
-
"data-readonly": s || void 0
|
|
92
|
-
}, /* @__PURE__ */ t.createElement(re, null), e);
|
|
93
|
-
}, A = ({ children: e, className: a, ...r }) => {
|
|
94
|
-
const { isForcedOpen: s } = r, { language: o } = V(), l = O(() => ue(o), [
|
|
95
|
-
o
|
|
96
|
-
]), c = u(e, A.Option) ?? /* @__PURE__ */ t.createElement(A.Option, null);
|
|
97
|
-
return /* @__PURE__ */ t.createElement(he, {
|
|
98
|
-
className: a,
|
|
99
|
-
containerPadding: 0,
|
|
100
|
-
offset: 0
|
|
101
|
-
}, /* @__PURE__ */ t.createElement(Oe, {
|
|
102
|
-
isForcedOpen: s,
|
|
103
|
-
autoFocus: s ? !1 : void 0
|
|
104
|
-
}, l.map((d, i) => x(c, {
|
|
105
|
-
key: String(i + 1),
|
|
106
|
-
value: String(i + 1),
|
|
107
|
-
label: d
|
|
108
|
-
}))));
|
|
109
|
-
}, Me = ({ className: e, ...a }) => {
|
|
110
|
-
const { value: r, label: s } = a;
|
|
111
|
-
return /* @__PURE__ */ t.createElement(ae, {
|
|
112
|
-
className: e,
|
|
113
|
-
id: r,
|
|
114
|
-
textValue: s
|
|
115
|
-
}, s);
|
|
116
|
-
};
|
|
117
|
-
I.Label = Fe;
|
|
118
|
-
I.Trigger = Re;
|
|
119
|
-
I.Options = A;
|
|
120
|
-
A.Option = Me;
|
|
121
|
-
const F = ({ children: e, className: a }) => {
|
|
122
|
-
const { disabled: r, readOnly: s, showDateLabels: o } = D(), { labelId: l } = g(m.DAY), { partValue: c, partError: d, onPartChange: i } = N(m.DAY), f = u(e, F.Label), p = u(e, F.Input);
|
|
123
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
124
|
-
className: a,
|
|
125
|
-
"data-date-field": !0
|
|
126
|
-
}, o && f, /* @__PURE__ */ t.createElement($, {
|
|
127
|
-
"aria-labelledby": o ? l : void 0,
|
|
128
|
-
value: c,
|
|
129
|
-
onChange: i,
|
|
130
|
-
isDisabled: r,
|
|
131
|
-
isReadOnly: s,
|
|
132
|
-
isInvalid: d
|
|
133
|
-
}, p));
|
|
134
|
-
}, Pe = ({ className: e }) => /* @__PURE__ */ t.createElement(B, {
|
|
135
|
-
datePart: m.DAY,
|
|
136
|
-
className: e
|
|
137
|
-
}), Ae = ({ className: e }) => {
|
|
138
|
-
const { id: a, hidePlaceholder: r } = D(), { inputId: s } = g(m.DAY), { isFirstPart: o } = N(m.DAY), { t: l } = S(), c = w(null), d = r ? void 0 : l("field.date.placeholder.day");
|
|
139
|
-
return H(() => {
|
|
140
|
-
var i;
|
|
141
|
-
o && ((i = c.current) == null || i.focus());
|
|
142
|
-
}, a), /* @__PURE__ */ t.createElement(q, {
|
|
143
|
-
ref: c,
|
|
144
|
-
id: s,
|
|
145
|
-
className: e,
|
|
146
|
-
placeholder: d,
|
|
147
|
-
maxLength: 2,
|
|
148
|
-
inputMode: "numeric",
|
|
149
|
-
"data-hook": m.DAY
|
|
150
|
-
});
|
|
151
|
-
};
|
|
152
|
-
F.Label = Pe;
|
|
153
|
-
F.Input = Ae;
|
|
154
|
-
const R = ({ children: e, className: a }) => {
|
|
155
|
-
const { disabled: r, readOnly: s, showDateLabels: o } = D(), { labelId: l } = g(m.YEAR), { partValue: c, partError: d, onPartChange: i } = N(m.YEAR), f = u(e, R.Label), p = u(e, R.Input);
|
|
156
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
157
|
-
className: a,
|
|
158
|
-
"data-date-field": !0
|
|
159
|
-
}, o && f, /* @__PURE__ */ t.createElement($, {
|
|
160
|
-
"aria-labelledby": o ? l : void 0,
|
|
161
|
-
value: c,
|
|
162
|
-
onChange: i,
|
|
163
|
-
isDisabled: r,
|
|
164
|
-
isReadOnly: s,
|
|
165
|
-
isInvalid: d
|
|
166
|
-
}, p));
|
|
167
|
-
}, Se = ({ className: e }) => /* @__PURE__ */ t.createElement(B, {
|
|
168
|
-
datePart: m.YEAR,
|
|
169
|
-
className: e
|
|
170
|
-
}), Te = ({ className: e }) => {
|
|
171
|
-
const { id: a, hidePlaceholder: r } = D(), { inputId: s } = g(m.YEAR), { isFirstPart: o } = N(m.YEAR), { t: l } = S(), c = w(null), d = r ? void 0 : l("field.date.placeholder.year");
|
|
172
|
-
return H(() => {
|
|
173
|
-
var i;
|
|
174
|
-
o && ((i = c.current) == null || i.focus());
|
|
175
|
-
}, a), /* @__PURE__ */ t.createElement(q, {
|
|
176
|
-
ref: c,
|
|
177
|
-
id: s,
|
|
178
|
-
className: e,
|
|
179
|
-
placeholder: d,
|
|
180
|
-
maxLength: 4,
|
|
181
|
-
inputMode: "numeric",
|
|
182
|
-
"data-hook": m.YEAR
|
|
183
|
-
});
|
|
184
|
-
};
|
|
185
|
-
R.Label = Se;
|
|
186
|
-
R.Input = Te;
|
|
187
|
-
n.Label = fe;
|
|
188
|
-
n.Month = I;
|
|
189
|
-
n.Day = F;
|
|
190
|
-
n.Year = R;
|
|
191
|
-
n.Description = pe;
|
|
192
|
-
n.Error = Ee;
|
|
193
|
-
function g(e) {
|
|
194
|
-
const { inputId: a } = z();
|
|
195
|
-
return O(() => {
|
|
196
|
-
const r = e.toLowerCase();
|
|
197
|
-
return {
|
|
198
|
-
inputId: `${a}-${r}-input`,
|
|
199
|
-
labelId: `${a}-${r}-label`
|
|
200
|
-
};
|
|
201
|
-
}, [
|
|
202
|
-
a,
|
|
203
|
-
e
|
|
204
|
-
]);
|
|
205
|
-
}
|
|
206
|
-
function N(e) {
|
|
207
|
-
const { value: a, onChange: r, hasError: s = !1 } = D(), { regionalFormat: o } = V(), l = O(() => se(a ?? ""), [
|
|
208
|
-
a
|
|
209
|
-
]), c = O(() => oe(s, a ?? ""), [
|
|
210
|
-
a,
|
|
211
|
-
s
|
|
212
|
-
]), d = l[e] || "", i = v((p) => {
|
|
213
|
-
const b = le(p, e, l);
|
|
214
|
-
r(b);
|
|
215
|
-
}, [
|
|
216
|
-
r,
|
|
217
|
-
l,
|
|
218
|
-
e
|
|
219
|
-
]), f = O(() => G(o).filter(K).map((L) => L.toUpperCase())[0] === e, [
|
|
220
|
-
o,
|
|
221
|
-
e
|
|
222
|
-
]);
|
|
223
|
-
return {
|
|
224
|
-
partValue: d,
|
|
225
|
-
partError: c[e],
|
|
226
|
-
onPartChange: i,
|
|
227
|
-
isFirstPart: f
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
function B({ datePart: e, className: a }) {
|
|
231
|
-
const { inputId: r, labelId: s } = g(e), { t: o } = S(), l = `field.date.label.${e.toLowerCase()}`, c = o(l);
|
|
232
|
-
return /* @__PURE__ */ t.createElement("label", {
|
|
233
|
-
id: s,
|
|
234
|
-
htmlFor: r,
|
|
235
|
-
className: a
|
|
236
|
-
}, c);
|
|
237
|
-
}
|
|
238
|
-
const Ye = "_fields_fw9my_1", ve = "_month_fw9my_10", we = "_day_fw9my_11", Ve = "_year_fw9my_12", He = "_dayInput_fw9my_28", xe = "_yearInput_fw9my_29", Be = "_monthTrigger_fw9my_33", ke = "_monthOption_fw9my_53", y = {
|
|
239
|
-
fields: Ye,
|
|
240
|
-
month: ve,
|
|
241
|
-
day: we,
|
|
242
|
-
year: Ve,
|
|
243
|
-
dayInput: He,
|
|
244
|
-
yearInput: xe,
|
|
245
|
-
monthTrigger: Be,
|
|
246
|
-
monthOption: ke
|
|
247
|
-
}, Ue = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ee, {
|
|
248
|
-
content: e,
|
|
249
|
-
locale: a
|
|
250
|
-
}), ct = () => {
|
|
251
|
-
const e = ge(y.monthTrigger), a = Ne(y.monthOption, Ce), r = U(y.dayInput), s = U(y.yearInput);
|
|
252
|
-
return /* @__PURE__ */ t.createElement(n, {
|
|
253
|
-
className: y.fields
|
|
254
|
-
}, /* @__PURE__ */ t.createElement(n.Label, {
|
|
255
|
-
className: h(P, E.label)
|
|
256
|
-
}, /* @__PURE__ */ t.createElement(n.Label.Required, {
|
|
257
|
-
className: h(ce, E.requiredMark)
|
|
258
|
-
})), /* @__PURE__ */ t.createElement(n.Month, {
|
|
259
|
-
className: y.month
|
|
260
|
-
}, /* @__PURE__ */ t.createElement(n.Month.Label, {
|
|
261
|
-
className: h(P, E.label)
|
|
262
|
-
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
263
|
-
className: e
|
|
264
|
-
}, /* @__PURE__ */ t.createElement(Le, {
|
|
265
|
-
className: E.dropdownIcon
|
|
266
|
-
})), /* @__PURE__ */ t.createElement(n.Month.Options, {
|
|
267
|
-
className: h(ie, E.selectPopover, E.dropdownPopover)
|
|
268
|
-
}, /* @__PURE__ */ t.createElement(n.Month.Options.Option, {
|
|
269
|
-
className: a
|
|
270
|
-
}))), /* @__PURE__ */ t.createElement(n.Day, {
|
|
271
|
-
className: y.day
|
|
272
|
-
}, /* @__PURE__ */ t.createElement(n.Day.Label, {
|
|
273
|
-
className: h(P, E.label)
|
|
274
|
-
}), /* @__PURE__ */ t.createElement(n.Day.Input, {
|
|
275
|
-
className: r
|
|
276
|
-
})), /* @__PURE__ */ t.createElement(n.Year, {
|
|
277
|
-
className: y.year
|
|
278
|
-
}, /* @__PURE__ */ t.createElement(n.Year.Label, {
|
|
279
|
-
className: h(P, E.label)
|
|
280
|
-
}), /* @__PURE__ */ t.createElement(n.Year.Input, {
|
|
281
|
-
className: s
|
|
282
|
-
})), /* @__PURE__ */ t.createElement(n.Error, {
|
|
283
|
-
className: h(me, E.error)
|
|
284
|
-
}, /* @__PURE__ */ t.createElement(_e, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
285
|
-
className: h(de, E.description)
|
|
286
|
-
}, Ue));
|
|
287
|
-
};
|
|
288
|
-
export {
|
|
289
|
-
ct as D
|
|
290
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import r from "react";
|
|
2
|
-
import { bn as e, ap as t } from "./form-D3iU18lh.js";
|
|
3
|
-
import { R as p } from "./radio-group-field-rac-C0tLXhl5.js";
|
|
4
|
-
import { a } from "./default-limits-D7qVv_Hv.js";
|
|
5
|
-
const l = () => {
|
|
6
|
-
const o = {
|
|
7
|
-
...e(),
|
|
8
|
-
otherInputCharacterLimit: a
|
|
9
|
-
};
|
|
10
|
-
return /* @__PURE__ */ r.createElement(t.Provider, {
|
|
11
|
-
value: {
|
|
12
|
-
v2: o
|
|
13
|
-
}
|
|
14
|
-
}, /* @__PURE__ */ r.createElement(p, null));
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
l as DextRadioGroupRAC
|
|
18
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import t, { useRef as L } from "react";
|
|
2
|
-
import { TextField as R, Input as v } from "react-aria-components";
|
|
3
|
-
import { bn as d, bk as c, bp as T } from "./form-D3iU18lh.js";
|
|
4
|
-
import { f as s } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as g, E as h } from "./field-error-headless-ClPQ03Jc.js";
|
|
6
|
-
import { L as x } from "./field-label-headless-DhN8Lkuq.js";
|
|
7
|
-
const e = ({ children: r }) => {
|
|
8
|
-
const { id: a, value: i, onChange: l, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: b, FieldLayout: f } = d(), { labelId: E } = c(), I = s(r, e.Label), F = s(r, e.Input), y = s(r, e.Description), D = s(r, e.Error);
|
|
9
|
-
return /* @__PURE__ */ t.createElement(f, {
|
|
10
|
-
fieldId: a,
|
|
11
|
-
renderLabel: () => I,
|
|
12
|
-
renderInput: () => /* @__PURE__ */ t.createElement(R, {
|
|
13
|
-
"aria-labelledby": E,
|
|
14
|
-
value: i ?? "",
|
|
15
|
-
onChange: l,
|
|
16
|
-
isDisabled: u,
|
|
17
|
-
isReadOnly: n,
|
|
18
|
-
isRequired: o,
|
|
19
|
-
isInvalid: p,
|
|
20
|
-
onBlur: m,
|
|
21
|
-
onFocus: b
|
|
22
|
-
}, F),
|
|
23
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, D, y)
|
|
24
|
-
});
|
|
25
|
-
}, B = ({ className: r }) => {
|
|
26
|
-
const { id: a, placeholder: i } = d(), { inputId: l, ariaDescribedBy: u } = c(), n = L(null);
|
|
27
|
-
return T(() => {
|
|
28
|
-
var o;
|
|
29
|
-
(o = n.current) == null || o.focus();
|
|
30
|
-
}, a), /* @__PURE__ */ t.createElement(v, {
|
|
31
|
-
ref: n,
|
|
32
|
-
id: l,
|
|
33
|
-
"aria-describedby": u,
|
|
34
|
-
className: r,
|
|
35
|
-
placeholder: i
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
e.Label = x;
|
|
39
|
-
e.Input = B;
|
|
40
|
-
e.Description = g;
|
|
41
|
-
e.Error = h;
|
|
42
|
-
export {
|
|
43
|
-
e as T
|
|
44
|
-
};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import d, { useContext as _, useRef as D, useState as m, Children as L, useLayoutEffect as p, useMemo as M } from "react";
|
|
2
|
-
import { CollectionRendererContext as g, DefaultCollectionRenderer as E, ListBox as N } from "react-aria-components";
|
|
3
|
-
import P from "classnames";
|
|
4
|
-
import { s as h } from "./field-rac.module-DfEb7pBp.js";
|
|
5
|
-
import { y as T } from "./form-D3iU18lh.js";
|
|
6
|
-
import { u as H } from "./use-element-state-class-name-B1r_nXW1.js";
|
|
7
|
-
const R = 1 / 0, I = {
|
|
8
|
-
position: "absolute",
|
|
9
|
-
width: 0,
|
|
10
|
-
height: "var(--popoverMaxHeight, 240px)",
|
|
11
|
-
visibility: "hidden",
|
|
12
|
-
pointerEvents: "none"
|
|
13
|
-
}, B = (e, o) => Object.create(e, {
|
|
14
|
-
[Symbol.iterator]: {
|
|
15
|
-
value: function* () {
|
|
16
|
-
let n = 0;
|
|
17
|
-
for (const s of e) {
|
|
18
|
-
if (n >= o)
|
|
19
|
-
return;
|
|
20
|
-
n += 1, yield s;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}), S = (e) => e.querySelector('[role="option"]') !== null, A = (e, o) => {
|
|
25
|
-
const n = e.getBoundingClientRect().top - e.scrollTop;
|
|
26
|
-
let s = 0;
|
|
27
|
-
for (const r of e.querySelectorAll('[role="option"]')) {
|
|
28
|
-
const f = r.getBoundingClientRect().top - n;
|
|
29
|
-
if (s > 0 && f >= o)
|
|
30
|
-
break;
|
|
31
|
-
s += 1;
|
|
32
|
-
}
|
|
33
|
-
return s;
|
|
34
|
-
}, X = ({ isForcedOpen: e, ...o }) => {
|
|
35
|
-
const n = _(g), s = D(null), [r, f] = m(null), [c, b] = m(R), [O, w] = m(0), y = L.count(o.children);
|
|
36
|
-
p(() => {
|
|
37
|
-
b(R);
|
|
38
|
-
}, [
|
|
39
|
-
r,
|
|
40
|
-
y,
|
|
41
|
-
O
|
|
42
|
-
]), p(() => {
|
|
43
|
-
const t = s.current;
|
|
44
|
-
if (!r || !t || c !== R)
|
|
45
|
-
return;
|
|
46
|
-
const a = () => {
|
|
47
|
-
const l = r.getBoundingClientRect().height;
|
|
48
|
-
l > 0 && b(A(t, l));
|
|
49
|
-
};
|
|
50
|
-
if (S(t)) {
|
|
51
|
-
a();
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
const i = new MutationObserver(() => {
|
|
55
|
-
S(t) && (i.disconnect(), a());
|
|
56
|
-
});
|
|
57
|
-
return i.observe(t, {
|
|
58
|
-
childList: !0,
|
|
59
|
-
subtree: !0
|
|
60
|
-
}), () => i.disconnect();
|
|
61
|
-
}, [
|
|
62
|
-
r,
|
|
63
|
-
c,
|
|
64
|
-
O
|
|
65
|
-
]), p(() => {
|
|
66
|
-
const t = s.current;
|
|
67
|
-
if (!r || !t || typeof ResizeObserver > "u")
|
|
68
|
-
return;
|
|
69
|
-
const a = /* @__PURE__ */ new Map(), i = new ResizeObserver((l) => {
|
|
70
|
-
l.some(({ target: u, contentRect: v }) => {
|
|
71
|
-
const C = a.get(u);
|
|
72
|
-
return a.set(u, v.height), C !== void 0 && C !== v.height;
|
|
73
|
-
}) && w((u) => u + 1);
|
|
74
|
-
});
|
|
75
|
-
return i.observe(r), t.querySelectorAll('[role="option"]').forEach((l) => i.observe(l)), () => i.disconnect();
|
|
76
|
-
}, [
|
|
77
|
-
r,
|
|
78
|
-
c
|
|
79
|
-
]);
|
|
80
|
-
const x = M(() => ({
|
|
81
|
-
...E,
|
|
82
|
-
CollectionRoot: (t) => /* @__PURE__ */ d.createElement(E.CollectionRoot, {
|
|
83
|
-
...t,
|
|
84
|
-
collection: B(t.collection, c)
|
|
85
|
-
})
|
|
86
|
-
}), [
|
|
87
|
-
c
|
|
88
|
-
]);
|
|
89
|
-
return /* @__PURE__ */ d.createElement(g.Provider, {
|
|
90
|
-
value: e ? x : n
|
|
91
|
-
}, /* @__PURE__ */ d.createElement(N, {
|
|
92
|
-
ref: s,
|
|
93
|
-
...o
|
|
94
|
-
}), e && /* @__PURE__ */ d.createElement("div", {
|
|
95
|
-
ref: f,
|
|
96
|
-
style: I
|
|
97
|
-
}));
|
|
98
|
-
}, V = {
|
|
99
|
-
base: h.selectOption,
|
|
100
|
-
selected: h.selectOptionSelected,
|
|
101
|
-
hover: h.selectOptionHover
|
|
102
|
-
}, q = ({ isSelected: e, isHovered: o, isFocused: n }) => ({
|
|
103
|
-
isSelected: e,
|
|
104
|
-
isHovered: (o || n) && !e
|
|
105
|
-
}), Y = (...e) => {
|
|
106
|
-
const o = H({
|
|
107
|
-
globalClasses: T,
|
|
108
|
-
moduleClasses: V
|
|
109
|
-
});
|
|
110
|
-
return (n) => P(o(q(n)), e);
|
|
111
|
-
};
|
|
112
|
-
export {
|
|
113
|
-
X as V,
|
|
114
|
-
Y as u
|
|
115
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { useContext as T, useMemo as a } from "react";
|
|
2
|
-
import { bh as p, at as O, bf as _, F as s, z as i } from "./form-D3iU18lh.js";
|
|
3
|
-
import { u } from "./use-hoverable-input-class-name-B-FhrcyQ.js";
|
|
4
|
-
const I = [
|
|
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
|
-
], N = [
|
|
20
|
-
s.MULTILINE_ADDRESS,
|
|
21
|
-
s.BOOKINGS_ADDRESS,
|
|
22
|
-
s.ECOM_ADDRESS
|
|
23
|
-
], P = ({ 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
|
-
}, S = ({ properties: o }) => {
|
|
27
|
-
var e, n;
|
|
28
|
-
return ((n = (e = o.fieldSettings) == null ? void 0 : e.country) == null ? void 0 : n.show) !== !1;
|
|
29
|
-
}, c = (o, e) => d.includes(o.fieldType) ? !e && P(o) : N.includes(o.fieldType) ? S(o) : I.includes(o.fieldType), l = (o, e) => c(o, e) && !o.properties.disabled && !o.properties.readOnly, A = (o) => {
|
|
30
|
-
var E;
|
|
31
|
-
const e = ((E = p().dropdown) == null ? void 0 : E.open) === !0, n = T(O), { isMobile: t = !1 } = _(), r = a(() => n && !n.parentId ? n.fields.filter((D) => l(D, t)).map((D) => D.id) : [], [
|
|
32
|
-
n,
|
|
33
|
-
t
|
|
34
|
-
]);
|
|
35
|
-
return e && r.includes(o);
|
|
36
|
-
}, w = (...o) => u(i, o);
|
|
37
|
-
export {
|
|
38
|
-
A as a,
|
|
39
|
-
w as u
|
|
40
|
-
};
|