@wix/form-elements 1.135.0 → 1.136.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-DsD7xLmb.js +1010 -0
- package/dist/component/{bookings-address-rac-BK-sU26E.js → bookings-address-rac-ByaFu51U.js} +1 -1
- package/dist/component/{bookings-email-rac-DZ3HVkyn.js → bookings-email-rac-CxuvkcYw.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Ci4PHqOr.js → bookings-first-name-rac-JXLJa_7E.js} +1 -1
- package/dist/component/{bookings-header-rac-C_MYNrDA.js → bookings-header-rac-CIQTbf9d.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CdNlwyjm.js → bookings-last-name-rac-_2Xt4BPe.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CP2JcaVr.js → bookings-login-bar-rac-BUjys5i9.js} +6 -6
- package/dist/component/{bookings-phone-rac-BV8sqxil.js → bookings-phone-rac-DlsdGmOt.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DQtcYRsh.js → bookings-rich-text-rac-BvRdhL7M.js} +1 -1
- package/dist/component/{checkbox-field-rac-DPNqHTNc.js → checkbox-field-rac-Be6wicaA.js} +121 -121
- package/dist/component/{checkbox-group-field-headless-DhhynlgN.js → checkbox-group-field-headless-BJ0pGvXi.js} +19 -19
- package/dist/component/{checkbox-group-field-rac-B3zOW7qr.js → checkbox-group-field-rac-D7xqqVf6.js} +4 -4
- package/dist/component/{checkbox-group-rac-Qy03hO31.js → checkbox-group-rac-DtCS-gEH.js} +1 -1
- package/dist/component/{checkbox-rac-DYr3RaHj.js → checkbox-rac-ub7MFwY-.js} +1 -1
- package/dist/component/{contacts-address-rac-Bi-etpfX.js → contacts-address-rac-Bwsdpg11.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-D2LLjX9P.js → contacts-birthdate-rac-D54hibhb.js} +1 -1
- package/dist/component/{contacts-company-rac-C9ImoG_i.js → contacts-company-rac-CKqzgKio.js} +1 -1
- package/dist/component/{contacts-email-rac-DeGblC9V.js → contacts-email-rac-Dxm31wuY.js} +1 -1
- package/dist/component/{contacts-first-name-rac-Xk3m57jK.js → contacts-first-name-rac-CXHsx6Vy.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BKE-1IYB.js → contacts-last-name-rac-B0S268f3.js} +1 -1
- package/dist/component/{contacts-phone-rac-CHmtTutD.js → contacts-phone-rac-DEbgIiEj.js} +1 -1
- package/dist/component/{contacts-position-rac-BS3TySLG.js → contacts-position-rac-D31uoOlR.js} +1 -1
- package/dist/component/{contacts-subscribe-rac--fpczJiB.js → contacts-subscribe-rac-DJ8NtoxZ.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-CHkn8vkL.js → contacts-tax-id-rac-DTQffHAo.js} +1 -1
- package/dist/component/{date-availability-70Vb-dlb.js → date-availability-DmhJ9apH.js} +1 -1
- package/dist/component/{date-input-field-rac-BlkYEYM_.js → date-input-field-rac-BwM_q4FW.js} +52 -52
- package/dist/component/{date-input-rac-JdNFk07Q.js → date-input-rac-C93pgocp.js} +1 -1
- package/dist/component/{date-picker-field-rac-DHu11mY1.js → date-picker-field-rac-CtZL368W.js} +5 -5
- package/dist/component/{date-picker-rac-CZtWhFzM.js → date-picker-rac-4DNe6hOX.js} +1 -1
- package/dist/component/{date-time-input-field-rac-cHAALqS5.js → date-time-input-field-rac-MlCVy3Oz.js} +58 -58
- package/dist/component/{date-time-input-rac-Dz7GfoJO.js → date-time-input-rac-ByyBvFgo.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-ZNKzyWda.js → dext-checkbox-group-rac-BP76Xwiq.js} +4 -4
- package/dist/component/{dext-checkbox-rac-DfPFXrKu.js → dext-checkbox-rac-DGaKSh4Z.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BPbl65qK.js → dext-date-picker-rac-UEXbMSlL.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-D5ywbLtW.js → dext-date-time-input-rac-CsJcGK4I.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BuVsPZOU.js → dext-dropdown-rac-BzbRzloh.js} +1 -1
- package/dist/component/{dext-email-rac-DRjt3lqT.js → dext-email-rac-DufFAnTi.js} +1 -1
- package/dist/component/{dext-number-input-rac-Bzrl87fo.js → dext-number-input-rac-D6xXi7B2.js} +1 -1
- package/dist/component/{dext-phone-rac-LibvQb8h.js → dext-phone-rac-svy9CDHW.js} +1 -1
- package/dist/component/{dext-radio-group-rac-BTWnIvwW.js → dext-radio-group-rac-C4p9NuQS.js} +4 -4
- package/dist/component/{dext-rating-input-rac-DTlnOcC8.js → dext-rating-input-rac-wJ7-RFFN.js} +1 -1
- package/dist/component/{dext-tags-rac-YdeijviH.js → dext-tags-rac-D2myHrSZ.js} +4 -4
- package/dist/component/{dext-text-area-rac-CdCzQYey.js → dext-text-area-rac-B4Fw_9mF.js} +1 -1
- package/dist/component/{dext-text-input-rac-B28RTezm.js → dext-text-input-rac-DlZanFMT.js} +1 -1
- package/dist/component/{dext-url-input-rac-B0ZBPbAb.js → dext-url-input-rac-DYjl3wuk.js} +1 -1
- package/dist/component/{donation-rac-_0cwsIAq.js → donation-rac-B6LwJxik.js} +72 -72
- package/dist/component/{dropdown-field-headless-DVZnbZAM.js → dropdown-field-headless-BAt2RoAH.js} +8 -8
- package/dist/component/{dropdown-field-rac-DWCj_Grt.js → dropdown-field-rac-DFjn3ecV.js} +7 -7
- package/dist/component/{dropdown-rac-Bpo-F5sc.js → dropdown-rac-DQ6keNRI.js} +1 -1
- package/dist/component/{ecom-address-rac-vJ0ku_Ld.js → ecom-address-rac-j1T2zp0k.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DgVReM6c.js → ecom-subscription-checkbox-rac-viTaRZsk.js} +2 -2
- package/dist/component/{email-input-field-rac-BXJGOBg-.js → email-input-field-rac-5eb-1w7B.js} +46 -46
- package/dist/component/{events-repeater-rac-CrXE_ppd.js → events-repeater-rac-BtcoN_Ra.js} +23 -23
- package/dist/component/{events-rsvp-rac-BGg3P1CQ.js → events-rsvp-rac-DSzFEmty.js} +10 -10
- package/dist/component/{field-error-headless-C3eOy1_l.js → field-error-headless-Bpe041x2.js} +6 -6
- package/dist/component/{field-label-headless-BMmR_IeF.js → field-label-headless-BUuK1Ftv.js} +7 -7
- package/dist/component/{file-upload-rac-Umix6wXx.js → file-upload-rac-CfU8Ygwq.js} +50 -50
- package/dist/component/{fixed-payment-rac-CfIJCBjb.js → fixed-payment-rac-CYp7zNq8.js} +12 -12
- package/dist/component/{form-CYPNOMwk.js → form-C6lnbh2O.js} +831 -823
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-oxHUTKYV.js → header-field-rac-B7YfrhId.js} +4 -4
- package/dist/component/{header-rac-DTGV923r.js → header-rac-BtJKAKAz.js} +1 -1
- package/dist/component/{image-choice-rac-B9JGl_h7.js → image-choice-rac-Bmq7Pyg6.js} +32 -32
- package/dist/component/{index-BOKSOnDK.js → index-BjPSeVyh.js} +107 -107
- package/dist/component/{index-C_ktc-yO.js → index-CQdUOkIN.js} +5 -5
- package/dist/component/{isObjectLike-Di8V7txC.js → isObjectLike-CxNqKfU5.js} +7 -7
- package/dist/component/{multiline-address-field-rac-zgmTbXlg.js → multiline-address-field-rac-BeiUJWKd.js} +115 -115
- package/dist/component/{multiline-address-rac-Cyb3dvBf.js → multiline-address-rac-B2mocF6M.js} +1 -1
- package/dist/component/{number-input-field-rac-DquqqRy_.js → number-input-field-rac-CQX7_S2O.js} +24 -24
- package/dist/component/{number-input-rac-G2DdTbk2.js → number-input-rac-BZri-E8P.js} +1 -1
- package/dist/component/{password-rac-DJCU0F38.js → password-rac-CdwrtDJU.js} +50 -50
- package/dist/component/{payment-input-rac-DlIYza6N.js → payment-input-rac-ClQiqmjm.js} +38 -38
- package/dist/component/{phone-input-field-rac-B10TInMa.js → phone-input-field-rac-BtG_Rado.js} +56 -56
- package/dist/component/{phone-rac-BuyttJpM.js → phone-rac-CdcAMa5E.js} +1 -1
- package/dist/component/{product-list-rac-WrSJwQ_g.js → product-list-rac-Dp_YK6mo.js} +61 -61
- package/dist/component/{quiz-radio-group-rac-CHxZ_pK_.js → quiz-radio-group-rac-CorojxKD.js} +1 -1
- package/dist/component/{radio-button-module-classes-DjJU-8ZB.js → radio-button-module-classes-ZX12Fyj4.js} +3 -3
- package/dist/component/{radio-group-field-rac-BImiqcKa.js → radio-group-field-rac-BifCDpE4.js} +10 -10
- package/dist/component/{radio-group-rac-CDkJeGpN.js → radio-group-rac-CJ2fzqnY.js} +1 -1
- package/dist/component/{rating-input-field-rac-Dsr_S5qN.js → rating-input-field-rac-Dg1T0DZW.js} +28 -28
- package/dist/component/{rating-input-rac-BJUW8U93.js → rating-input-rac-Ba4YK13i.js} +1 -1
- package/dist/component/{rich-content-rac.module-BfQJqA-x.js → rich-content-rac.module-BehwBL3L.js} +3 -3
- package/dist/component/{rich-text-field-rac-DIuZbu_u.js → rich-text-field-rac-DtIWdB-S.js} +7 -7
- package/dist/component/{rich-text-rac-C39fpEiP.js → rich-text-rac-BX4eDDFw.js} +1 -1
- package/dist/component/service-dropdown-rac-68WLBlsa.js +146 -0
- package/dist/component/{services-multi-choice-rac-GVb4qA7g.js → services-multi-choice-rac-8yNdAHfS.js} +7 -7
- package/dist/component/{signature-rac-nC5pr6nB.js → signature-rac-DeVOyl5O.js} +73 -73
- package/dist/component/{submit-button-rac-eUjgrx9Q.js → submit-button-rac-IOr1g-G-.js} +12 -12
- package/dist/component/{tags-field-rac-zv30chSd.js → tags-field-rac-DaiMlAxt.js} +27 -27
- package/dist/component/{tags-rac-PnS2SxVP.js → tags-rac-BgrUkY0A.js} +1 -1
- package/dist/component/{text-area-field-rac-DLeOMD4g.js → text-area-field-rac-CLPZEY93.js} +16 -16
- package/dist/component/{text-area-rac-jZ_mh45C.js → text-area-rac-C8PdPSzX.js} +1 -1
- package/dist/component/{text-input-field-rac-DifV7Erd.js → text-input-field-rac-Dm-xU8Rg.js} +5 -5
- package/dist/component/{text-input-headless-DhVEjorY.js → text-input-headless-BEmRjL8Z.js} +6 -6
- package/dist/component/{text-input-rac-Ce4qKN9M.js → text-input-rac-C-FnaOXT.js} +1 -1
- package/dist/component/{time-input-rac-1kW3aDIo.js → time-input-rac-VmTURkiK.js} +46 -46
- package/dist/component/{url-input-field-rac-D9xXAQCq.js → url-input-field-rac-CnnS0tVx.js} +23 -23
- package/dist/component/{url-input-rac-SaAybDdN.js → url-input-rac-6nd_ccoP.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-C_MO_0JS.js → use-dropdown-option-class-name-CcZl1qrj.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-D7EMiD-M.js → use-dropdown-trigger-class-name-BNc0mkdK.js} +4 -4
- package/dist/component/{use-element-state-class-name-DZFi3Z42.js → use-element-state-class-name-BU6RXqBy.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-JAZ1mif0.js → use-hoverable-input-class-name-CkXPkbiP.js} +2 -2
- package/dist/component/{use-service-options-base-ZX4iaxzr.js → use-service-options-base-B5afDbnr.js} +4 -4
- package/dist/component/use-text-input-class-name-BB3V6Q0b.js +6 -0
- package/package.json +2 -2
- package/dist/component/appointment-rac-CYCddSl9.js +0 -1010
- package/dist/component/service-dropdown-rac-Bc9hEpx3.js +0 -146
- package/dist/component/use-text-input-class-name-XFjQX8q1.js +0 -6
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import o, { useMemo as F, useCallback as $, useRef as w, useState as W, useEffect as j } from "react";
|
|
2
2
|
import { CheckboxGroup as A, CheckboxField as M, CheckboxButton as z, TextField as J, Input as K } from "react-aria-components";
|
|
3
3
|
import { debounce as Q } from "ts-debounce";
|
|
4
|
-
import {
|
|
4
|
+
import { bj as R, bg as U, bt as X, bl as Y } from "./form-C6lnbh2O.js";
|
|
5
5
|
import { f as I, a as k } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { D as Z, E as ee } from "./field-error-headless-
|
|
7
|
-
import { L as te } from "./field-label-headless-
|
|
6
|
+
import { D as Z, E as ee } from "./field-error-headless-Bpe041x2.js";
|
|
7
|
+
import { L as te } from "./field-label-headless-BUuK1Ftv.js";
|
|
8
8
|
import { F as ae } from "./fieldset-headless-CD3fds9J.js";
|
|
9
9
|
import { S as ne } from "./selection-indicator-XQ8MYHUQ.js";
|
|
10
10
|
const B = "Other", le = (e, t) => e.some((r) => !t.includes(r)), N = (e, t) => e.length > 0 && le(e, t), se = (e, t) => {
|
|
@@ -14,7 +14,7 @@ const B = "Other", le = (e, t) => e.some((r) => !t.includes(r)), N = (e, t) => e
|
|
|
14
14
|
const a = t ? t.length + 2 : 0;
|
|
15
15
|
return (e.find((s) => s.startsWith(`${t}: `)) || "").slice(a);
|
|
16
16
|
}, S = (e) => e.map((t) => t.value ?? t.label), v = ({ children: e, className: t }) => {
|
|
17
|
-
const r = R(), { id: a, value: n, onChange: s, disabled: d, required: p, onBlur: f, onFocus: m, hasError: c, FieldLayout: i } = r, { inputId: h, labelId: u, ariaDescribedBy:
|
|
17
|
+
const r = R(), { id: a, value: n, onChange: s, disabled: d, required: p, onBlur: f, onFocus: m, hasError: c, FieldLayout: i } = r, { inputId: h, labelId: u, ariaDescribedBy: g } = U(), E = I(e, v.Label), L = I(e, v.Options), C = I(e, v.Description), l = I(e, v.Error), O = F(() => n || [], [
|
|
18
18
|
n
|
|
19
19
|
]), V = $((b) => {
|
|
20
20
|
s == null || s(b);
|
|
@@ -27,7 +27,7 @@ const B = "Other", le = (e, t) => e.some((r) => !t.includes(r)), N = (e, t) => e
|
|
|
27
27
|
renderInput: () => /* @__PURE__ */ o.createElement(ae, {
|
|
28
28
|
id: h,
|
|
29
29
|
ariaLabelledBy: u,
|
|
30
|
-
ariaDescribedBy:
|
|
30
|
+
ariaDescribedBy: g,
|
|
31
31
|
required: p,
|
|
32
32
|
onBlur: f,
|
|
33
33
|
onFocus: m
|
|
@@ -39,7 +39,7 @@ const B = "Other", le = (e, t) => e.some((r) => !t.includes(r)), N = (e, t) => e
|
|
|
39
39
|
isDisabled: d,
|
|
40
40
|
isRequired: p,
|
|
41
41
|
isInvalid: c
|
|
42
|
-
},
|
|
42
|
+
}, L)),
|
|
43
43
|
renderDescription: () => /* @__PURE__ */ o.createElement(o.Fragment, null, l, C)
|
|
44
44
|
});
|
|
45
45
|
}, _ = ({ children: e, className: t }) => {
|
|
@@ -68,14 +68,14 @@ const B = "Other", le = (e, t) => e.some((r) => !t.includes(r)), N = (e, t) => e
|
|
|
68
68
|
className: e
|
|
69
69
|
}, r);
|
|
70
70
|
}, y = ({ children: e, className: t, ...r }) => {
|
|
71
|
-
const { value: a, label: n, isFirst: s = !1, isOther: d = !1, fieldId: p } = r, f = R(), { value: m, onChange: c, disabled: i, readOnly: h, hasError: u, options:
|
|
71
|
+
const { value: a, label: n, isFirst: s = !1, isOther: d = !1, fieldId: p } = r, f = R(), { value: m, onChange: c, disabled: i, readOnly: h, hasError: u, options: g } = f, E = w(null);
|
|
72
72
|
Y(() => {
|
|
73
73
|
var b;
|
|
74
74
|
s && ((b = E.current) == null || b.focus({
|
|
75
75
|
preventScroll: !0
|
|
76
76
|
}));
|
|
77
77
|
}, p);
|
|
78
|
-
const
|
|
78
|
+
const L = I(e, y.Label), C = I(e, y.Input), l = F(() => m || [], [
|
|
79
79
|
m
|
|
80
80
|
]), O = F(() => d ? l.find((b) => b === n || b.startsWith(`${n}: `)) || n : a, [
|
|
81
81
|
d,
|
|
@@ -85,7 +85,7 @@ const B = "Other", le = (e, t) => e.some((r) => !t.includes(r)), N = (e, t) => e
|
|
|
85
85
|
]), V = $((b) => {
|
|
86
86
|
if (!d)
|
|
87
87
|
return;
|
|
88
|
-
const D = S(
|
|
88
|
+
const D = S(g || []), x = l.filter((P) => D.includes(P)), H = b ? [
|
|
89
89
|
...x,
|
|
90
90
|
n
|
|
91
91
|
] : x;
|
|
@@ -94,7 +94,7 @@ const B = "Other", le = (e, t) => e.some((r) => !t.includes(r)), N = (e, t) => e
|
|
|
94
94
|
d,
|
|
95
95
|
n,
|
|
96
96
|
c,
|
|
97
|
-
|
|
97
|
+
g,
|
|
98
98
|
l
|
|
99
99
|
]);
|
|
100
100
|
return /* @__PURE__ */ o.createElement(M, {
|
|
@@ -111,14 +111,14 @@ const B = "Other", le = (e, t) => e.some((r) => !t.includes(r)), N = (e, t) => e
|
|
|
111
111
|
isSelected: b,
|
|
112
112
|
isHovered: D,
|
|
113
113
|
isFocused: x
|
|
114
|
-
}), k(
|
|
114
|
+
}), k(L, {
|
|
115
115
|
label: n
|
|
116
116
|
}))));
|
|
117
117
|
};
|
|
118
118
|
y.Label = re;
|
|
119
119
|
y.Input = ne;
|
|
120
120
|
const T = ({ children: e, ...t }) => {
|
|
121
|
-
const { value: r, label: a, isFirst: n = !1, isOther: s = !1, fieldId: d } = t, p = R(), { value: f, onChange: m, options: c, addOtherPlaceholder: i, otherInputCharacterLimit: h, disabled: u, readOnly:
|
|
121
|
+
const { value: r, label: a, isFirst: n = !1, isOther: s = !1, fieldId: d } = t, p = R(), { value: f, onChange: m, options: c, addOtherPlaceholder: i, otherInputCharacterLimit: h, disabled: u, readOnly: g, hasError: E } = p, L = I(e, y), C = I(e, G), l = F(() => f || [], [
|
|
122
122
|
f
|
|
123
123
|
]), O = F(() => {
|
|
124
124
|
if (!s)
|
|
@@ -130,7 +130,7 @@ const T = ({ children: e, ...t }) => {
|
|
|
130
130
|
l,
|
|
131
131
|
c
|
|
132
132
|
]);
|
|
133
|
-
return /* @__PURE__ */ o.createElement(o.Fragment, null, k(
|
|
133
|
+
return /* @__PURE__ */ o.createElement(o.Fragment, null, k(L, {
|
|
134
134
|
value: r,
|
|
135
135
|
label: a,
|
|
136
136
|
isFirst: n,
|
|
@@ -143,14 +143,14 @@ const T = ({ children: e, ...t }) => {
|
|
|
143
143
|
placeholder: i,
|
|
144
144
|
maxLength: h,
|
|
145
145
|
disabled: u,
|
|
146
|
-
readOnly:
|
|
146
|
+
readOnly: g,
|
|
147
147
|
hasError: E,
|
|
148
148
|
ariaLabel: a,
|
|
149
149
|
addOtherLabel: a,
|
|
150
150
|
options: c
|
|
151
151
|
}));
|
|
152
152
|
}, G = ({ className: e, inputClassName: t, ...r }) => {
|
|
153
|
-
const { fieldValue: a, onChange: n, label: s, placeholder: d, maxLength: p, disabled: f, readOnly: m, hasError: c, ariaLabel: i, addOtherLabel: h, options: u } = r, [
|
|
153
|
+
const { fieldValue: a, onChange: n, label: s, placeholder: d, maxLength: p, disabled: f, readOnly: m, hasError: c, ariaLabel: i, addOtherLabel: h, options: u } = r, [g, E] = W(() => {
|
|
154
154
|
const l = S(u || []);
|
|
155
155
|
return N(a, l) ? q(a, h) : "";
|
|
156
156
|
});
|
|
@@ -162,7 +162,7 @@ const T = ({ children: e, ...t }) => {
|
|
|
162
162
|
u,
|
|
163
163
|
h
|
|
164
164
|
]);
|
|
165
|
-
const
|
|
165
|
+
const L = F(() => Q((l) => {
|
|
166
166
|
const O = S(u || []), V = a.filter((x) => O.includes(x)), b = l ? `${h}: ${l}` : s, D = [
|
|
167
167
|
...V,
|
|
168
168
|
b
|
|
@@ -175,13 +175,13 @@ const T = ({ children: e, ...t }) => {
|
|
|
175
175
|
h,
|
|
176
176
|
s
|
|
177
177
|
]), C = $((l) => {
|
|
178
|
-
E(l),
|
|
178
|
+
E(l), L(l);
|
|
179
179
|
}, [
|
|
180
|
-
|
|
180
|
+
L
|
|
181
181
|
]);
|
|
182
182
|
return /* @__PURE__ */ o.createElement(J, {
|
|
183
183
|
"aria-label": i,
|
|
184
|
-
value:
|
|
184
|
+
value: g,
|
|
185
185
|
onChange: C,
|
|
186
186
|
isDisabled: f,
|
|
187
187
|
isReadOnly: m,
|
package/dist/component/{checkbox-group-field-rac-B3zOW7qr.js → checkbox-group-field-rac-D7xqqVf6.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
2
|
import a from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { C as t } from "./checkbox-group-field-headless-
|
|
4
|
+
import { C as t } from "./checkbox-group-field-headless-BJ0pGvXi.js";
|
|
5
5
|
import { E as n } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { C as c } from "./checkbox-indicator-module-classes-6173wvuW.js";
|
|
7
7
|
import { s } from "./field-rac.module-DfEb7pBp.js";
|
|
8
|
-
import {
|
|
8
|
+
import { M as i, Y as E, o as p, q as C, G as O, u as _, p as I } from "./form-C6lnbh2O.js";
|
|
9
9
|
import { o as l } from "./options-rac.module-_THNq6Qq.js";
|
|
10
|
-
import { u as L } from "./use-element-state-class-name-
|
|
11
|
-
import { u as R } from "./use-text-input-class-name-
|
|
10
|
+
import { u as L } from "./use-element-state-class-name-BU6RXqBy.js";
|
|
11
|
+
import { u as R } from "./use-text-input-class-name-BB3V6Q0b.js";
|
|
12
12
|
const u = ({ content: o, locale: r }) => /* @__PURE__ */ e.createElement(m, {
|
|
13
13
|
content: o,
|
|
14
14
|
locale: r
|
package/dist/component/{date-input-field-rac-BlkYEYM_.js → date-input-field-rac-BwM_q4FW.js}
RENAMED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { RicosViewer as ee } from "@wix/ricos/viewer";
|
|
2
2
|
import h from "classnames";
|
|
3
|
-
import t, { useMemo as O, useState as
|
|
3
|
+
import t, { useMemo as O, useState as k, useCallback as v, useRef as w } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as te } from "react-aria";
|
|
5
5
|
import { ListBoxItem as ae, Select as ne, TextField as $, SelectValue as re, Input as q } from "react-aria-components";
|
|
6
|
-
import {
|
|
7
|
-
import { f as u, a as
|
|
6
|
+
import { bj as D, bg as z, bb as V, aQ as K, b1 as Q, aD as m, bt as S, aK as se, aR as oe, b8 as le, bl as H, M as A, Y as ce, O as ie, G as me, u as de } from "./form-C6lnbh2O.js";
|
|
7
|
+
import { f as u, a as B } from "./find-child-C60k4CxG.js";
|
|
8
8
|
import { g as ue } from "./helpers-HmkkXrh2.js";
|
|
9
|
-
import { D as pe, E as Ee } from "./field-error-headless-
|
|
10
|
-
import { L as fe } from "./field-label-headless-
|
|
9
|
+
import { D as pe, E as Ee } from "./field-error-headless-Bpe041x2.js";
|
|
10
|
+
import { L as fe } from "./field-label-headless-BUuK1Ftv.js";
|
|
11
11
|
import { F as be } from "./fieldset-headless-CD3fds9J.js";
|
|
12
|
-
import { N as he, E as ye, S as
|
|
13
|
-
import { a as
|
|
14
|
-
import { V as Oe, u as Ne } from "./use-dropdown-option-class-name-
|
|
12
|
+
import { N as he, E as ye, S as De } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
+
import { a as ge, u as Ie } from "./use-dropdown-trigger-class-name-BNc0mkdK.js";
|
|
14
|
+
import { V as Oe, u as Ne } from "./use-dropdown-option-class-name-CcZl1qrj.js";
|
|
15
15
|
import { C as Le } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as _e } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as Ce } from "./custom-focus-class-_483Pkwp.js";
|
|
18
18
|
import { s as E } from "./field-rac.module-DfEb7pBp.js";
|
|
19
|
-
import { u as
|
|
19
|
+
import { u as U } from "./use-text-input-class-name-BB3V6Q0b.js";
|
|
20
20
|
const n = ({ children: e, className: a }) => {
|
|
21
|
-
const { id: r, required: s, onBlur: o, onFocus: l, FieldLayout: c } =
|
|
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(() => K(p).filter(Q).map((Y) => Y.toUpperCase()), [
|
|
22
22
|
p
|
|
23
23
|
]), L = u(e, n.Label), T = u(e, n.Description), _ = u(e, n.Error), C = {
|
|
24
24
|
[m.MONTH]: u(e, n.Month),
|
|
@@ -27,7 +27,7 @@ const n = ({ children: e, className: a }) => {
|
|
|
27
27
|
};
|
|
28
28
|
return /* @__PURE__ */ t.createElement(c, {
|
|
29
29
|
fieldId: r,
|
|
30
|
-
renderLabel: () =>
|
|
30
|
+
renderLabel: () => B(L, {
|
|
31
31
|
as: "div"
|
|
32
32
|
}),
|
|
33
33
|
renderInput: () => /* @__PURE__ */ t.createElement(be, {
|
|
@@ -41,8 +41,8 @@ const n = ({ children: e, className: a }) => {
|
|
|
41
41
|
}, C[b[0]], C[b[1]], C[b[2]]),
|
|
42
42
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, _, T)
|
|
43
43
|
});
|
|
44
|
-
},
|
|
45
|
-
const { id: r, disabled: s, readOnly: o, showDateLabels: l, hidePlaceholder: c } =
|
|
44
|
+
}, g = ({ children: e, className: a }) => {
|
|
45
|
+
const { id: r, disabled: s, readOnly: o, showDateLabels: l, hidePlaceholder: c } = D(), { labelId: d } = I(m.MONTH), { partValue: i, partError: f, onPartChange: p } = N(m.MONTH), { t: b } = S(), [L, T] = k(!1), _ = ge(r), [C, Y] = k(null), j = c ? ye : b("field.date.placeholder.month"), G = v((R) => {
|
|
46
46
|
o || p(typeof R == "string" ? R : "");
|
|
47
47
|
}, [
|
|
48
48
|
p,
|
|
@@ -51,7 +51,7 @@ const n = ({ children: e, className: a }) => {
|
|
|
51
51
|
T(R && !o);
|
|
52
52
|
}, [
|
|
53
53
|
o
|
|
54
|
-
]), W = u(e,
|
|
54
|
+
]), W = u(e, g.Label), X = u(e, g.Trigger), Z = u(e, g.Options);
|
|
55
55
|
return /* @__PURE__ */ t.createElement("div", {
|
|
56
56
|
className: a,
|
|
57
57
|
"data-date-field": !0
|
|
@@ -68,21 +68,21 @@ const n = ({ children: e, className: a }) => {
|
|
|
68
68
|
onChange: G,
|
|
69
69
|
isDisabled: s,
|
|
70
70
|
isInvalid: f,
|
|
71
|
-
placeholder:
|
|
71
|
+
placeholder: j,
|
|
72
72
|
isOpen: _ || L,
|
|
73
73
|
onOpenChange: _ ? void 0 : J
|
|
74
|
-
}, X,
|
|
74
|
+
}, X, B(Z, {
|
|
75
75
|
isForcedOpen: _
|
|
76
76
|
}))));
|
|
77
77
|
}, Fe = ({ className: e }) => /* @__PURE__ */ t.createElement(x, {
|
|
78
78
|
datePart: m.MONTH,
|
|
79
79
|
className: e
|
|
80
80
|
}), Me = ({ children: e, className: a }) => {
|
|
81
|
-
const { id: r, readOnly: s } =
|
|
82
|
-
return
|
|
81
|
+
const { id: r, readOnly: s } = D(), { inputId: o } = I(m.MONTH), { partError: l, isFirstPart: c } = N(m.MONTH), d = w(null);
|
|
82
|
+
return H(() => {
|
|
83
83
|
var i;
|
|
84
84
|
c && ((i = d.current) == null || i.focus());
|
|
85
|
-
}, r), /* @__PURE__ */ t.createElement(
|
|
85
|
+
}, r), /* @__PURE__ */ t.createElement(De, {
|
|
86
86
|
ref: d,
|
|
87
87
|
id: o,
|
|
88
88
|
className: a,
|
|
@@ -90,10 +90,10 @@ const n = ({ children: e, className: a }) => {
|
|
|
90
90
|
"data-invalid": l || void 0,
|
|
91
91
|
"data-readonly": s || void 0
|
|
92
92
|
}, /* @__PURE__ */ t.createElement(re, null), e);
|
|
93
|
-
},
|
|
93
|
+
}, P = ({ children: e, className: a, ...r }) => {
|
|
94
94
|
const { isForcedOpen: s } = r, { language: o } = V(), l = O(() => ue(o), [
|
|
95
95
|
o
|
|
96
|
-
]), c = u(e,
|
|
96
|
+
]), c = u(e, P.Option) ?? /* @__PURE__ */ t.createElement(P.Option, null);
|
|
97
97
|
return /* @__PURE__ */ t.createElement(he, {
|
|
98
98
|
className: a,
|
|
99
99
|
containerPadding: 0,
|
|
@@ -101,7 +101,7 @@ const n = ({ children: e, className: a }) => {
|
|
|
101
101
|
}, /* @__PURE__ */ t.createElement(Oe, {
|
|
102
102
|
isForcedOpen: s,
|
|
103
103
|
autoFocus: s ? !1 : void 0
|
|
104
|
-
}, l.map((d, i) =>
|
|
104
|
+
}, l.map((d, i) => B(c, {
|
|
105
105
|
key: String(i + 1),
|
|
106
106
|
value: String(i + 1),
|
|
107
107
|
label: d
|
|
@@ -114,12 +114,12 @@ const n = ({ children: e, className: a }) => {
|
|
|
114
114
|
textValue: s
|
|
115
115
|
}, s);
|
|
116
116
|
};
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
g.Label = Fe;
|
|
118
|
+
g.Trigger = Me;
|
|
119
|
+
g.Options = P;
|
|
120
|
+
P.Option = Re;
|
|
121
121
|
const F = ({ children: e, className: a }) => {
|
|
122
|
-
const { disabled: r, readOnly: s, showDateLabels: o } =
|
|
122
|
+
const { disabled: r, readOnly: s, showDateLabels: o } = D(), { labelId: l } = I(m.DAY), { partValue: c, partError: d, onPartChange: i } = N(m.DAY), f = u(e, F.Label), p = u(e, F.Input);
|
|
123
123
|
return /* @__PURE__ */ t.createElement("div", {
|
|
124
124
|
className: a,
|
|
125
125
|
"data-date-field": !0
|
|
@@ -131,12 +131,12 @@ const F = ({ children: e, className: a }) => {
|
|
|
131
131
|
isReadOnly: s,
|
|
132
132
|
isInvalid: d
|
|
133
133
|
}, p));
|
|
134
|
-
},
|
|
134
|
+
}, Ae = ({ className: e }) => /* @__PURE__ */ t.createElement(x, {
|
|
135
135
|
datePart: m.DAY,
|
|
136
136
|
className: e
|
|
137
|
-
}),
|
|
138
|
-
const { id: a, hidePlaceholder: r } =
|
|
139
|
-
return
|
|
137
|
+
}), Pe = ({ className: e }) => {
|
|
138
|
+
const { id: a, hidePlaceholder: r } = D(), { inputId: s } = I(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
140
|
var i;
|
|
141
141
|
o && ((i = c.current) == null || i.focus());
|
|
142
142
|
}, a), /* @__PURE__ */ t.createElement(q, {
|
|
@@ -149,10 +149,10 @@ const F = ({ children: e, className: a }) => {
|
|
|
149
149
|
"data-hook": m.DAY
|
|
150
150
|
});
|
|
151
151
|
};
|
|
152
|
-
F.Label =
|
|
153
|
-
F.Input =
|
|
152
|
+
F.Label = Ae;
|
|
153
|
+
F.Input = Pe;
|
|
154
154
|
const M = ({ children: e, className: a }) => {
|
|
155
|
-
const { disabled: r, readOnly: s, showDateLabels: o } =
|
|
155
|
+
const { disabled: r, readOnly: s, showDateLabels: o } = D(), { labelId: l } = I(m.YEAR), { partValue: c, partError: d, onPartChange: i } = N(m.YEAR), f = u(e, M.Label), p = u(e, M.Input);
|
|
156
156
|
return /* @__PURE__ */ t.createElement("div", {
|
|
157
157
|
className: a,
|
|
158
158
|
"data-date-field": !0
|
|
@@ -168,8 +168,8 @@ const M = ({ children: e, className: a }) => {
|
|
|
168
168
|
datePart: m.YEAR,
|
|
169
169
|
className: e
|
|
170
170
|
}), Te = ({ className: e }) => {
|
|
171
|
-
const { id: a, hidePlaceholder: r } =
|
|
172
|
-
return
|
|
171
|
+
const { id: a, hidePlaceholder: r } = D(), { inputId: s } = I(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
173
|
var i;
|
|
174
174
|
o && ((i = c.current) == null || i.focus());
|
|
175
175
|
}, a), /* @__PURE__ */ t.createElement(q, {
|
|
@@ -185,12 +185,12 @@ const M = ({ children: e, className: a }) => {
|
|
|
185
185
|
M.Label = Se;
|
|
186
186
|
M.Input = Te;
|
|
187
187
|
n.Label = fe;
|
|
188
|
-
n.Month =
|
|
188
|
+
n.Month = g;
|
|
189
189
|
n.Day = F;
|
|
190
190
|
n.Year = M;
|
|
191
191
|
n.Description = pe;
|
|
192
192
|
n.Error = Ee;
|
|
193
|
-
function
|
|
193
|
+
function I(e) {
|
|
194
194
|
const { inputId: a } = z();
|
|
195
195
|
return O(() => {
|
|
196
196
|
const r = e.toLowerCase();
|
|
@@ -204,7 +204,7 @@ function g(e) {
|
|
|
204
204
|
]);
|
|
205
205
|
}
|
|
206
206
|
function N(e) {
|
|
207
|
-
const { value: a, onChange: r, hasError: s = !1 } =
|
|
207
|
+
const { value: a, onChange: r, hasError: s = !1 } = D(), { regionalFormat: o } = V(), l = O(() => se(a ?? ""), [
|
|
208
208
|
a
|
|
209
209
|
]), c = O(() => oe(s, a ?? ""), [
|
|
210
210
|
a,
|
|
@@ -216,7 +216,7 @@ function N(e) {
|
|
|
216
216
|
r,
|
|
217
217
|
l,
|
|
218
218
|
e
|
|
219
|
-
]), f = O(() => K(o).filter(
|
|
219
|
+
]), f = O(() => K(o).filter(Q).map((L) => L.toUpperCase())[0] === e, [
|
|
220
220
|
o,
|
|
221
221
|
e
|
|
222
222
|
]);
|
|
@@ -228,37 +228,37 @@ function N(e) {
|
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
230
|
function x({ datePart: e, className: a }) {
|
|
231
|
-
const { inputId: r, labelId: s } =
|
|
231
|
+
const { inputId: r, labelId: s } = I(e), { t: o } = S(), l = `field.date.label.${e.toLowerCase()}`, c = o(l);
|
|
232
232
|
return /* @__PURE__ */ t.createElement("label", {
|
|
233
233
|
id: s,
|
|
234
234
|
htmlFor: r,
|
|
235
235
|
className: a
|
|
236
236
|
}, c);
|
|
237
237
|
}
|
|
238
|
-
const Ye = "_fields_fw9my_1", ve = "_month_fw9my_10", we = "_day_fw9my_11", Ve = "_year_fw9my_12",
|
|
238
|
+
const Ye = "_fields_fw9my_1", ve = "_month_fw9my_10", we = "_day_fw9my_11", Ve = "_year_fw9my_12", He = "_dayInput_fw9my_28", Be = "_yearInput_fw9my_29", xe = "_monthTrigger_fw9my_33", ke = "_monthOption_fw9my_53", y = {
|
|
239
239
|
fields: Ye,
|
|
240
240
|
month: ve,
|
|
241
241
|
day: we,
|
|
242
242
|
year: Ve,
|
|
243
|
-
dayInput:
|
|
244
|
-
yearInput:
|
|
243
|
+
dayInput: He,
|
|
244
|
+
yearInput: Be,
|
|
245
245
|
monthTrigger: xe,
|
|
246
|
-
monthOption:
|
|
247
|
-
},
|
|
246
|
+
monthOption: ke
|
|
247
|
+
}, Ue = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ee, {
|
|
248
248
|
content: e,
|
|
249
249
|
locale: a
|
|
250
250
|
}), ct = () => {
|
|
251
|
-
const e =
|
|
251
|
+
const e = Ie(y.monthTrigger), a = Ne(y.monthOption, Ce), r = U(y.dayInput), s = U(y.yearInput);
|
|
252
252
|
return /* @__PURE__ */ t.createElement(n, {
|
|
253
253
|
className: y.fields
|
|
254
254
|
}, /* @__PURE__ */ t.createElement(n.Label, {
|
|
255
|
-
className: h(
|
|
255
|
+
className: h(A, E.label)
|
|
256
256
|
}, /* @__PURE__ */ t.createElement(n.Label.Required, {
|
|
257
257
|
className: h(ce, E.requiredMark)
|
|
258
258
|
})), /* @__PURE__ */ t.createElement(n.Month, {
|
|
259
259
|
className: y.month
|
|
260
260
|
}, /* @__PURE__ */ t.createElement(n.Month.Label, {
|
|
261
|
-
className: h(
|
|
261
|
+
className: h(A, E.label)
|
|
262
262
|
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
263
263
|
className: e
|
|
264
264
|
}, /* @__PURE__ */ t.createElement(Le, {
|
|
@@ -270,20 +270,20 @@ const Ye = "_fields_fw9my_1", ve = "_month_fw9my_10", we = "_day_fw9my_11", Ve =
|
|
|
270
270
|
}))), /* @__PURE__ */ t.createElement(n.Day, {
|
|
271
271
|
className: y.day
|
|
272
272
|
}, /* @__PURE__ */ t.createElement(n.Day.Label, {
|
|
273
|
-
className: h(
|
|
273
|
+
className: h(A, E.label)
|
|
274
274
|
}), /* @__PURE__ */ t.createElement(n.Day.Input, {
|
|
275
275
|
className: r
|
|
276
276
|
})), /* @__PURE__ */ t.createElement(n.Year, {
|
|
277
277
|
className: y.year
|
|
278
278
|
}, /* @__PURE__ */ t.createElement(n.Year.Label, {
|
|
279
|
-
className: h(
|
|
279
|
+
className: h(A, E.label)
|
|
280
280
|
}), /* @__PURE__ */ t.createElement(n.Year.Input, {
|
|
281
281
|
className: s
|
|
282
282
|
})), /* @__PURE__ */ t.createElement(n.Error, {
|
|
283
283
|
className: h(me, E.error)
|
|
284
284
|
}, /* @__PURE__ */ t.createElement(_e, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
285
285
|
className: h(de, E.description)
|
|
286
|
-
},
|
|
286
|
+
}, Ue));
|
|
287
287
|
};
|
|
288
288
|
export {
|
|
289
289
|
ct as D
|
package/dist/component/{date-picker-field-rac-DHu11mY1.js → date-picker-field-rac-CtZL368W.js}
RENAMED
|
@@ -4,14 +4,14 @@ import e, { useState as A, useCallback as k, useContext as ee, useRef as O, useM
|
|
|
4
4
|
import { parseDate as te } from "@internationalized/date";
|
|
5
5
|
import { UNSAFE_PortalProvider as re } from "react-aria";
|
|
6
6
|
import { I18nProvider as ae, DatePicker as ne, DatePickerStateContext as oe, Group as le, DateInput as se, DateSegment as ce, Calendar as ie, CalendarMonthPicker as me, CalendarYearPicker as de, CalendarGrid as ue, Dialog as ge, CalendarCell as Ee, Button as M, Select as w, SelectValue as x, ListBox as Y, ListBoxItem as B } from "react-aria-components";
|
|
7
|
-
import { D as p,
|
|
7
|
+
import { D as p, bj as T, bg as U, bb as F, bl as pe, M as fe, Y as De, t as Ce, G as ye, u as Se } from "./form-C6lnbh2O.js";
|
|
8
8
|
import { g as he, c as P } from "./calendar.module-CKCBG_Pg.js";
|
|
9
9
|
import { f as E, a as h } from "./find-child-C60k4CxG.js";
|
|
10
|
-
import { D as Te, E as be } from "./field-error-headless-
|
|
11
|
-
import { L as Ne } from "./field-label-headless-
|
|
10
|
+
import { D as Te, E as be } from "./field-error-headless-Bpe041x2.js";
|
|
11
|
+
import { L as Ne } from "./field-label-headless-BUuK1Ftv.js";
|
|
12
12
|
import { D as ve, N as L, S as V } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
-
import { a as _e, u as Ie } from "./use-dropdown-trigger-class-name-
|
|
14
|
-
import { i as Fe } from "./date-availability-
|
|
13
|
+
import { a as _e, u as Ie } from "./use-dropdown-trigger-class-name-BNc0mkdK.js";
|
|
14
|
+
import { i as Fe } from "./date-availability-DmhJ9apH.js";
|
|
15
15
|
import { C as I } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as Le } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as Ae } from "./custom-focus-class-_483Pkwp.js";
|