@wix/form-elements 1.168.0 → 1.170.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-BbXyKTd7.js → appointment-rac-DZ0SFXmL.js} +83 -83
- package/dist/component/{bookings-address-rac-VJkR_U9L.js → bookings-address-rac-BW9grc77.js} +1 -1
- package/dist/component/{bookings-email-rac-_EupwXpQ.js → bookings-email-rac-D8gMaAfB.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DTZixHYj.js → bookings-first-name-rac-CAjcs7b6.js} +1 -1
- package/dist/component/{bookings-header-rac-BKbKTv5g.js → bookings-header-rac-BhKZ1kku.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BDy860-C.js → bookings-last-name-rac-DpsMDuU0.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DgNP-YNZ.js → bookings-login-bar-rac-BVdWmKS8.js} +3 -3
- package/dist/component/{bookings-phone-rac-B_I6n96b.js → bookings-phone-rac-DsqNi2mI.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-prYPbIiz.js → bookings-rich-text-rac-elM4Ne3f.js} +1 -1
- package/dist/component/{checkbox-field-rac-C-4PXuxG.js → checkbox-field-rac-BU4E73fD.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-D16bAcaq.js → checkbox-group-field-headless-6yJdIbP2.js} +41 -41
- package/dist/component/{checkbox-group-field-rac-GUQ5dO_s.js → checkbox-group-field-rac-CojbCWSF.js} +4 -4
- package/dist/component/{checkbox-group-rac-Bl6xL5-H.js → checkbox-group-rac-3qUVUc-C.js} +1 -1
- package/dist/component/{checkbox-rac-Blg0KVyP.js → checkbox-rac-DwbTapd_.js} +1 -1
- package/dist/component/{contacts-address-rac-BfOhCAj8.js → contacts-address-rac-BL7XDZuP.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DYBvDh62.js → contacts-birthdate-rac-DeJYIHAg.js} +1 -1
- package/dist/component/{contacts-company-rac-DIJr7zjA.js → contacts-company-rac-BeImf5uc.js} +1 -1
- package/dist/component/{contacts-email-rac-DjmqELhC.js → contacts-email-rac-CtacwrZ0.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DGNll7gw.js → contacts-first-name-rac-CAdOqOOA.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BJ8AZYQN.js → contacts-last-name-rac-Db9mHzCW.js} +1 -1
- package/dist/component/{contacts-phone-rac-BC-QtpEN.js → contacts-phone-rac-W0OLEbzL.js} +1 -1
- package/dist/component/{contacts-position-rac-BQia__74.js → contacts-position-rac-CV4Ibt4Z.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CTFptz01.js → contacts-subscribe-rac-CQ3Q1pjZ.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-Cy72Jouc.js → contacts-tax-id-rac-Dux-pk6r.js} +1 -1
- package/dist/component/{date-availability-BC6updcS.js → date-availability-RkX-Qw7G.js} +1 -1
- package/dist/component/date-input-field-rac-CYCT6qoa.js +309 -0
- package/dist/component/{date-input-rac-KkRyWRP_.js → date-input-rac-BkYZ7q_o.js} +1 -1
- package/dist/component/{date-picker-field-rac-BLWVJbTJ.js → date-picker-field-rac-eMidYtsl.js} +31 -31
- package/dist/component/{date-picker-rac-DKCQza7v.js → date-picker-rac-D23rxZcF.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CZxZW6fz.js → date-time-input-field-rac-BjIj4dXQ.js} +111 -111
- package/dist/component/{date-time-input-rac-DQ-iBwmr.js → date-time-input-rac-BSGAdk9L.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-kp1Jbwt-.js → dext-checkbox-group-rac-Xmb5IKrb.js} +2 -2
- package/dist/component/{dext-checkbox-rac-CBm9cRUz.js → dext-checkbox-rac-2eA7y0ld.js} +1 -1
- package/dist/component/{dext-date-picker-rac-DsVKWsRy.js → dext-date-picker-rac-CmLxVGGT.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-CO26-8Qo.js → dext-date-time-input-rac-Cd9nwSjb.js} +1 -1
- package/dist/component/{dext-dropdown-rac-eRzu2C-y.js → dext-dropdown-rac-BKdQ0nGS.js} +1 -1
- package/dist/component/{dext-email-rac-DDrZzE_G.js → dext-email-rac-07zDPxyf.js} +1 -1
- package/dist/component/{dext-number-input-rac-Dj7sInLk.js → dext-number-input-rac-DRvGuppY.js} +1 -1
- package/dist/component/{dext-phone-rac-g8M77F7m.js → dext-phone-rac-CKtTVjFg.js} +1 -1
- package/dist/component/{dext-radio-group-rac-BjhygC0R.js → dext-radio-group-rac-BsBmMufq.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BraNjvyA.js → dext-rating-input-rac-CcFSTAIh.js} +1 -1
- package/dist/component/{dext-tags-rac-B5mAIuDi.js → dext-tags-rac-CCTDlCvX.js} +2 -2
- package/dist/component/{dext-text-area-rac-D_YBnaWi.js → dext-text-area-rac-Cif8po9h.js} +1 -1
- package/dist/component/{dext-text-input-rac-BzeWH1jv.js → dext-text-input-rac-2118X4iF.js} +1 -1
- package/dist/component/{dext-url-input-rac-Cn0h_vx3.js → dext-url-input-rac-DDImGkQe.js} +1 -1
- package/dist/component/{donation-rac-CQRdHxWh.js → donation-rac-Dnylss1d.js} +103 -103
- package/dist/component/{dropdown-field-rac-C7LL0W5Z.js → dropdown-field-rac-DDI4ZgZH.js} +3 -3
- package/dist/component/{dropdown-rac-Nb2VyJ0x.js → dropdown-rac-DX0Z3R_8.js} +1 -1
- package/dist/component/{ecom-address-rac-_c2YIIwg.js → ecom-address-rac-D9MeEQsk.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-Bma7TAVj.js → ecom-subscription-checkbox-rac-DKJ9j5dj.js} +2 -2
- package/dist/component/{email-input-field-rac-2E2tEaS5.js → email-input-field-rac-DaKrmlwe.js} +55 -55
- package/dist/component/{events-repeater-rac-COWHYBFD.js → events-repeater-rac-DWrOLT0Y.js} +45 -45
- package/dist/component/{events-rsvp-rac-CXp8j19Y.js → events-rsvp-rac-YBTR1tR0.js} +6 -6
- package/dist/component/{field-error-headless-S-ugOQQX.js → field-error-headless-jksFrezt.js} +10 -10
- package/dist/component/{field-label-headless-_n4I0_tX.js → field-label-headless-BBvJAVxI.js} +10 -10
- package/dist/component/{file-upload-rac-DCH_iwDg.js → file-upload-rac-CgdmfUZG.js} +168 -168
- package/dist/component/{fixed-payment-rac-CYkKJUfM.js → fixed-payment-rac-v6rKwzFs.js} +13 -13
- package/dist/component/{form-jK8ezTss.js → form-BsiK682r.js} +530 -502
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DnbjI6W5.js → header-field-rac-BuXybl7K.js} +6 -6
- package/dist/component/{header-rac-DKUICrni.js → header-rac-CDyaLosW.js} +1 -1
- package/dist/component/{image-choice-rac-B_9ponST.js → image-choice-rac-BRlMroBw.js} +41 -41
- package/dist/component/{index-BxdMzOvN.js → index-BanOeCAF.js} +242 -236
- package/dist/component/{index-ZYnsxY-a.js → index-y9URYGEE.js} +6 -6
- package/dist/component/{isObjectLike-BW-9QEQl.js → isObjectLike-BG9nJ-rx.js} +7 -7
- package/dist/component/{multiline-address-field-rac-k-P0ijWG.js → multiline-address-field-rac-DRAkxI1l.js} +342 -342
- package/dist/component/{multiline-address-rac-Bbn9mNDa.js → multiline-address-rac-JjTzWsEb.js} +1 -1
- package/dist/component/{number-input-field-rac--lom-B_X.js → number-input-field-rac-QrouG7Hv.js} +22 -22
- package/dist/component/{number-input-rac-Bhbd6T9S.js → number-input-rac-DGmE7cLv.js} +1 -1
- package/dist/component/{password-rac-BV_uTHb3.js → password-rac-DeyY228m.js} +28 -28
- package/dist/component/{payment-input-rac-cawyGN_t.js → payment-input-rac-DmIennLi.js} +45 -45
- package/dist/component/{phone-input-field-rac-CsElHRto.js → phone-input-field-rac-F7e74TGA.js} +76 -76
- package/dist/component/{phone-rac-XrHN5Nko.js → phone-rac-CQfB2CQD.js} +1 -1
- package/dist/component/{product-list-rac-cxv_xz7K.js → product-list-rac--GGG8vvO.js} +62 -62
- package/dist/component/{quiz-radio-group-rac-DGaxOPE1.js → quiz-radio-group-rac-DF2C2vNq.js} +1 -1
- package/dist/component/{radio-button-module-classes-Xv2Jn01x.js → radio-button-module-classes-DmpNo6F2.js} +17 -17
- package/dist/component/{radio-group-field-rac-DgGqgTql.js → radio-group-field-rac-BGcPYfKO.js} +6 -6
- package/dist/component/{radio-group-rac-Bh0E-oe1.js → radio-group-rac-CqysUMCE.js} +1 -1
- package/dist/component/{rating-input-field-rac-C3YLV971.js → rating-input-field-rac-D-ei917Y.js} +24 -24
- package/dist/component/{rating-input-rac-CfcC5EUh.js → rating-input-rac-a9zJ74fw.js} +1 -1
- package/dist/component/{rich-content-rac.module-DUjzLGtX.js → rich-content-rac.module-CvyLVlXL.js} +5 -5
- package/dist/component/{rich-text-field-rac-BmguoJhk.js → rich-text-field-rac-vf19nvyw.js} +7 -7
- package/dist/component/{rich-text-rac-BWhHcq25.js → rich-text-rac-Cx_wpoxC.js} +1 -1
- package/dist/component/{service-dropdown-rac-C5oX-ql7.js → service-dropdown-rac-DITzKQxd.js} +26 -26
- package/dist/component/{services-multi-choice-rac-C1fem9NB.js → services-multi-choice-rac-BtisN0Aq.js} +11 -11
- package/dist/component/{signature-rac-BtHqiWj1.js → signature-rac-DUeIoS5O.js} +226 -226
- package/dist/component/{submit-button-rac-OYeKJFF8.js → submit-button-rac-C8h6zeTw.js} +36 -36
- package/dist/component/{tags-field-rac-kA2RSijL.js → tags-field-rac-CjFuiB0n.js} +51 -51
- package/dist/component/{tags-rac-B_2qCZGu.js → tags-rac-BO7rwyLl.js} +1 -1
- package/dist/component/{text-area-field-rac-DeO609Mv.js → text-area-field-rac-CgUx3nQ0.js} +23 -23
- package/dist/component/{text-area-rac-BAQFBOZd.js → text-area-rac-WgXYXIaf.js} +1 -1
- package/dist/component/{text-input-field-rac-CCcKwuLZ.js → text-input-field-rac-DaxWFha-.js} +6 -6
- package/dist/component/{text-input-headless-D8-jkaYm.js → text-input-headless-hjuRJTZN.js} +6 -6
- package/dist/component/{text-input-rac-BVcgjj8g.js → text-input-rac-BzumrJBj.js} +1 -1
- package/dist/component/{time-input-rac-BYctyHgU.js → time-input-rac-2FEkpQ7M.js} +18 -18
- package/dist/component/{url-input-field-rac-COC9qgcs.js → url-input-field-rac-BZ9f8D8I.js} +26 -26
- package/dist/component/{url-input-rac-BZXLh0Ej.js → url-input-rac-D-AVlxkD.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-BTltqRl1.js → use-dropdown-option-class-name-DwAAtzgX.js} +11 -11
- package/dist/component/{use-dropdown-trigger-class-name-BjJZfl3i.js → use-dropdown-trigger-class-name-D-6n9YVG.js} +18 -18
- package/dist/component/{use-element-state-class-name-CkT6Ga8t.js → use-element-state-class-name-C5auxwhj.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-BkoSr6tr.js → use-hoverable-input-class-name-Nd2jqfz4.js} +2 -2
- package/dist/component/use-is-forced-open-dropdown-CKaHhCqp.js +64 -0
- package/dist/component/{use-service-options-base-Wp8RZ4Z8.js → use-service-options-base-CvluFheT.js} +3 -3
- package/dist/component/use-text-input-class-name-DGTlYJxC.js +6 -0
- package/dist/form.d.ts +19 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-b_T1yf8D.js +0 -309
- package/dist/component/use-is-forced-open-dropdown-fo_NCnSk.js +0 -53
- package/dist/component/use-text-input-class-name-DS7i03Gk.js +0 -6
|
@@ -3,33 +3,33 @@ import { RicosViewer as q } from "@wix/ricos/viewer";
|
|
|
3
3
|
import m from "classnames";
|
|
4
4
|
import { parseTime as B } from "@internationalized/date";
|
|
5
5
|
import { TimeField as U, DateInput as k, DateSegment as _, TimeFieldStateContext as w } from "react-aria-components";
|
|
6
|
-
import {
|
|
6
|
+
import { bK as p, bH as j, bU as T, bM as K, X as Q, al as X, M as z, I as G } from "./form-BsiK682r.js";
|
|
7
7
|
import { f as u, a as F } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { D as
|
|
9
|
-
import { L as Y } from "./field-label-headless-
|
|
8
|
+
import { D as J, E as W } from "./field-error-headless-jksFrezt.js";
|
|
9
|
+
import { L as Y } from "./field-label-headless-BBvJAVxI.js";
|
|
10
10
|
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { H as S } from "./custom-focus-class-_483Pkwp.js";
|
|
12
12
|
import { s as f } from "./field-rac.module-ts2t4WUO.js";
|
|
13
|
-
import { u as $ } from "./use-text-input-class-name-
|
|
13
|
+
import { u as $ } from "./use-text-input-class-name-DGTlYJxC.js";
|
|
14
14
|
const r = ({ children: t }) => {
|
|
15
|
-
const { id: n, value: s, onChange: a, disabled: i, readOnly: o, required: c, onBlur: l, onFocus: E, use24HourFormat: b, FieldLayout: C, hasError:
|
|
16
|
-
const H = ae(
|
|
15
|
+
const { id: n, value: s, onChange: a, disabled: i, readOnly: o, required: c, onBlur: l, onFocus: E, use24HourFormat: b, FieldLayout: C, hasError: I } = p(), { inputId: g, ariaDescribedBy: D, labelId: L } = j(), R = V((O) => {
|
|
16
|
+
const H = ae(O);
|
|
17
17
|
a(H);
|
|
18
18
|
}, [
|
|
19
19
|
a
|
|
20
|
-
]), N = u(t, r.Label), y = u(t, r.Time), P = u(t, r.Description), A = u(t, r.Error),
|
|
20
|
+
]), N = u(t, r.Label), y = u(t, r.Time), P = u(t, r.Description), A = u(t, r.Error), M = ne(s);
|
|
21
21
|
return /* @__PURE__ */ e.createElement(C, {
|
|
22
22
|
fieldId: n,
|
|
23
23
|
renderLabel: () => N,
|
|
24
24
|
renderInput: () => /* @__PURE__ */ e.createElement(U, {
|
|
25
25
|
"aria-labelledby": L,
|
|
26
|
-
id:
|
|
26
|
+
id: g,
|
|
27
27
|
"aria-describedby": D,
|
|
28
|
-
value:
|
|
28
|
+
value: M,
|
|
29
29
|
onChange: R,
|
|
30
30
|
isDisabled: i,
|
|
31
31
|
isReadOnly: o,
|
|
32
|
-
isInvalid:
|
|
32
|
+
isInvalid: I,
|
|
33
33
|
isRequired: c,
|
|
34
34
|
onBlur: l,
|
|
35
35
|
onFocus: E,
|
|
@@ -67,7 +67,7 @@ const r = ({ children: t }) => {
|
|
|
67
67
|
});
|
|
68
68
|
}, ee = ({ className: t, ...n }) => {
|
|
69
69
|
const { id: s, hidePlaceholder: a } = p(), { segment: i } = n, { t: o } = T(), c = v(null);
|
|
70
|
-
|
|
70
|
+
K(() => {
|
|
71
71
|
var E;
|
|
72
72
|
(E = c.current) == null || E.focus({
|
|
73
73
|
preventScroll: !0
|
|
@@ -107,8 +107,8 @@ d.Minute = te;
|
|
|
107
107
|
d.Period = re;
|
|
108
108
|
r.Label = Y;
|
|
109
109
|
r.Time = d;
|
|
110
|
-
r.Description =
|
|
111
|
-
r.Error =
|
|
110
|
+
r.Description = J;
|
|
111
|
+
r.Error = W;
|
|
112
112
|
function ne(t) {
|
|
113
113
|
if (!t)
|
|
114
114
|
return null;
|
|
@@ -139,9 +139,9 @@ const oe = "_time_5p151_1", le = "_hour_5p151_17", se = "_minute_5p151_18", ie =
|
|
|
139
139
|
}), me = () => {
|
|
140
140
|
const t = $(h.time);
|
|
141
141
|
return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
142
|
-
className: m(
|
|
142
|
+
className: m(Q, f.label)
|
|
143
143
|
}, /* @__PURE__ */ e.createElement(r.Label.Required, {
|
|
144
|
-
className: m(
|
|
144
|
+
className: m(X, f.requiredMark)
|
|
145
145
|
})), /* @__PURE__ */ e.createElement(r.Time, {
|
|
146
146
|
className: t
|
|
147
147
|
}, /* @__PURE__ */ e.createElement(r.Time.Hour, {
|
|
@@ -153,9 +153,9 @@ const oe = "_time_5p151_1", le = "_hour_5p151_17", se = "_minute_5p151_18", ie =
|
|
|
153
153
|
})), /* @__PURE__ */ e.createElement(r.Error, {
|
|
154
154
|
className: m(z, f.error)
|
|
155
155
|
}, /* @__PURE__ */ e.createElement(Z, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
156
|
-
className: m(
|
|
156
|
+
className: m(G, f.description)
|
|
157
157
|
}, ce));
|
|
158
|
-
},
|
|
158
|
+
}, ge = () => /* @__PURE__ */ e.createElement(me, null);
|
|
159
159
|
export {
|
|
160
|
-
|
|
160
|
+
ge as TimeInputRAC
|
|
161
161
|
};
|
|
@@ -2,27 +2,27 @@ import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
|
2
2
|
import i from "classnames";
|
|
3
3
|
import r, { useCallback as h, useRef as O } from "react";
|
|
4
4
|
import { TextField as y, Input as A } from "react-aria-components";
|
|
5
|
-
import {
|
|
5
|
+
import { bK as d, bH as E, bM as M, X as v, al as B, M as T, I as g } from "./form-BsiK682r.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as
|
|
8
|
-
import { L as
|
|
9
|
-
import { u as
|
|
10
|
-
import { E as
|
|
7
|
+
import { D as k, E as P } from "./field-error-headless-jksFrezt.js";
|
|
8
|
+
import { L as q } from "./field-label-headless-BBvJAVxI.js";
|
|
9
|
+
import { u as x } from "./use-invoke-callback-UH73A_J3.js";
|
|
10
|
+
import { E as U } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s as u } from "./field-rac.module-ts2t4WUO.js";
|
|
12
|
-
import { u as w } from "./use-text-input-class-name-
|
|
13
|
-
const
|
|
14
|
-
const { id: o, value: l, onChange: n, disabled: m, readOnly: s, required: a, hasError: I, onBlur:
|
|
15
|
-
n(
|
|
12
|
+
import { u as w } from "./use-text-input-class-name-DGTlYJxC.js";
|
|
13
|
+
const H = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
|
|
14
|
+
const { id: o, value: l, onChange: n, disabled: m, readOnly: s, required: a, hasError: I, onBlur: b, onFocus: f, FieldLayout: R } = d(), { labelId: F } = E(), p = x(b), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), S = h(() => {
|
|
15
|
+
n(H(l)), p();
|
|
16
16
|
}, [
|
|
17
17
|
p,
|
|
18
18
|
n,
|
|
19
19
|
l
|
|
20
20
|
]);
|
|
21
|
-
return /* @__PURE__ */ r.createElement(
|
|
21
|
+
return /* @__PURE__ */ r.createElement(R, {
|
|
22
22
|
fieldId: o,
|
|
23
|
-
renderLabel: () =>
|
|
23
|
+
renderLabel: () => L,
|
|
24
24
|
renderInput: () => /* @__PURE__ */ r.createElement(y, {
|
|
25
|
-
"aria-labelledby":
|
|
25
|
+
"aria-labelledby": F,
|
|
26
26
|
value: l ?? "",
|
|
27
27
|
onChange: n,
|
|
28
28
|
isDisabled: m,
|
|
@@ -30,13 +30,13 @@ const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
|
|
|
30
30
|
isRequired: a,
|
|
31
31
|
isInvalid: I,
|
|
32
32
|
onBlur: S,
|
|
33
|
-
onFocus:
|
|
34
|
-
},
|
|
33
|
+
onFocus: f
|
|
34
|
+
}, D),
|
|
35
35
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, C)
|
|
36
36
|
});
|
|
37
|
-
},
|
|
37
|
+
}, V = ({ className: t }) => {
|
|
38
38
|
const { id: o, placeholder: l } = d(), { inputId: n, ariaDescribedBy: m } = E(), s = O(null);
|
|
39
|
-
return
|
|
39
|
+
return M(() => {
|
|
40
40
|
var a;
|
|
41
41
|
(a = s.current) == null || a.focus({
|
|
42
42
|
preventScroll: !0
|
|
@@ -51,26 +51,26 @@ const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
|
|
|
51
51
|
placeholder: l
|
|
52
52
|
});
|
|
53
53
|
};
|
|
54
|
-
e.Label =
|
|
55
|
-
e.Input =
|
|
56
|
-
e.Description =
|
|
54
|
+
e.Label = q;
|
|
55
|
+
e.Input = V;
|
|
56
|
+
e.Description = k;
|
|
57
57
|
e.Error = P;
|
|
58
|
-
const
|
|
58
|
+
const W = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(N, {
|
|
59
59
|
content: t,
|
|
60
60
|
locale: o
|
|
61
61
|
}), te = () => {
|
|
62
62
|
const t = w();
|
|
63
63
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
64
|
-
className: i(
|
|
64
|
+
className: i(v, u.label)
|
|
65
65
|
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
66
|
-
className: i(
|
|
66
|
+
className: i(B, u.requiredMark)
|
|
67
67
|
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
68
68
|
className: t
|
|
69
69
|
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
70
|
-
className: i(
|
|
71
|
-
}, /* @__PURE__ */ r.createElement(
|
|
72
|
-
className: i(
|
|
73
|
-
},
|
|
70
|
+
className: i(T, u.error)
|
|
71
|
+
}, /* @__PURE__ */ r.createElement(U, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
72
|
+
className: i(g, u.description)
|
|
73
|
+
}, W));
|
|
74
74
|
};
|
|
75
75
|
export {
|
|
76
76
|
te as U
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import d, { useContext as _, useRef as L, useState as m, Children as N, useLayoutEffect as p, useMemo as D } from "react";
|
|
2
2
|
import { CollectionRendererContext as g, DefaultCollectionRenderer as E, ListBox as M } from "react-aria-components";
|
|
3
|
-
import
|
|
3
|
+
import P from "classnames";
|
|
4
4
|
import { s as h } from "./field-rac.module-ts2t4WUO.js";
|
|
5
|
-
import {
|
|
6
|
-
import { u as
|
|
7
|
-
const R = 1 / 0,
|
|
5
|
+
import { K as T } from "./form-BsiK682r.js";
|
|
6
|
+
import { u as H } from "./use-element-state-class-name-C5auxwhj.js";
|
|
7
|
+
const R = 1 / 0, I = {
|
|
8
8
|
position: "absolute",
|
|
9
9
|
width: 0,
|
|
10
10
|
height: "var(--popoverMaxHeight, 240px)",
|
|
@@ -31,7 +31,7 @@ const R = 1 / 0, H = {
|
|
|
31
31
|
t += 1;
|
|
32
32
|
}
|
|
33
33
|
return t;
|
|
34
|
-
},
|
|
34
|
+
}, X = ({ isForcedOpen: e, ...n }) => {
|
|
35
35
|
const s = _(g), t = L(null), [r, f] = m(null), [l, O] = m(R), [b, w] = m(0), x = N.count(n.children);
|
|
36
36
|
p(() => {
|
|
37
37
|
O(R);
|
|
@@ -93,7 +93,7 @@ const R = 1 / 0, H = {
|
|
|
93
93
|
...n
|
|
94
94
|
}), e && /* @__PURE__ */ d.createElement("div", {
|
|
95
95
|
ref: f,
|
|
96
|
-
style:
|
|
96
|
+
style: I
|
|
97
97
|
}));
|
|
98
98
|
}, V = {
|
|
99
99
|
base: h.selectOption,
|
|
@@ -103,14 +103,14 @@ const R = 1 / 0, H = {
|
|
|
103
103
|
isSelected: e,
|
|
104
104
|
isHovered: (n || s) && !e
|
|
105
105
|
}), W = (e, ...n) => {
|
|
106
|
-
const s =
|
|
106
|
+
const s = H({
|
|
107
107
|
globalClasses: e,
|
|
108
108
|
moduleClasses: V
|
|
109
109
|
});
|
|
110
|
-
return (t) =>
|
|
111
|
-
},
|
|
110
|
+
return (t) => P(s(q(t)), n);
|
|
111
|
+
}, Y = (...e) => W(T, ...e);
|
|
112
112
|
export {
|
|
113
|
-
|
|
113
|
+
X as V,
|
|
114
114
|
W as a,
|
|
115
|
-
|
|
115
|
+
Y as u
|
|
116
116
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import e, { useState as F, useCallback as
|
|
1
|
+
import e, { useState as F, useCallback as v, useRef as A } from "react";
|
|
2
2
|
import { UNSAFE_PortalProvider as $ } from "react-aria";
|
|
3
|
-
import { VisuallyHidden as k, Select as G, SelectValue as
|
|
4
|
-
import {
|
|
3
|
+
import { VisuallyHidden as k, Select as G, SelectValue as U, ListBoxItem as K } from "react-aria-components";
|
|
4
|
+
import { bK as b, bH as D, bU as W, bM as Y, L as j } from "./form-BsiK682r.js";
|
|
5
5
|
import { f as d, a as L } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { D as z, E as
|
|
7
|
-
import { L as Q } from "./field-label-headless-
|
|
6
|
+
import { D as z, E as J } from "./field-error-headless-jksFrezt.js";
|
|
7
|
+
import { L as Q } from "./field-label-headless-BBvJAVxI.js";
|
|
8
8
|
import { E as X, S as Z, N as ee } from "./non-modal-popover-D-u13tmp.js";
|
|
9
|
-
import {
|
|
10
|
-
import { V as ne } from "./use-dropdown-option-class-name-
|
|
11
|
-
import { u as re } from "./use-hoverable-input-class-name-
|
|
9
|
+
import { b as te } from "./use-is-forced-open-dropdown-CKaHhCqp.js";
|
|
10
|
+
import { V as ne } from "./use-dropdown-option-class-name-DwAAtzgX.js";
|
|
11
|
+
import { u as re } from "./use-hoverable-input-class-name-Nd2jqfz4.js";
|
|
12
12
|
const r = ({ children: t }) => {
|
|
13
|
-
const { id: l, value: a, defaultValue: s, options: u = [], readOnly: o, onChange: n, placeholder: m, disabled: i, required: p, onBlur: C, onFocus: I, FieldLayout: y, hasError:
|
|
13
|
+
const { id: l, value: a, defaultValue: s, options: u = [], readOnly: o, onChange: n, placeholder: m, disabled: i, required: p, onBlur: C, onFocus: I, FieldLayout: y, hasError: T } = b(), [N, P] = F(!1), E = te(l), [R, h] = F(null), S = a && u.some((c) => (c.value ?? c.label) === a) ? a : s || null, { labelId: f } = D(), { t: V } = W(), O = `${f}-required`, B = v((c) => {
|
|
14
14
|
o || n(typeof c == "string" ? c : null);
|
|
15
15
|
}, [
|
|
16
16
|
n,
|
|
17
17
|
o
|
|
18
|
-
]), _ =
|
|
18
|
+
]), _ = v((c) => P(c && !i && !o), [
|
|
19
19
|
i,
|
|
20
20
|
o
|
|
21
|
-
]), q = d(t, r.Label), x = d(t, r.Trigger), w = d(t, r.Options),
|
|
21
|
+
]), q = d(t, r.Label), x = d(t, r.Trigger), w = d(t, r.Options), H = d(t, r.Description), M = d(t, r.Error);
|
|
22
22
|
return /* @__PURE__ */ e.createElement(y, {
|
|
23
23
|
fieldId: l,
|
|
24
24
|
renderLabel: () => q,
|
|
@@ -34,11 +34,11 @@ const r = ({ children: t }) => {
|
|
|
34
34
|
}, /* @__PURE__ */ e.createElement(G, {
|
|
35
35
|
"aria-labelledby": p ? `${f} ${O}` : f,
|
|
36
36
|
value: S,
|
|
37
|
-
isOpen: E ||
|
|
37
|
+
isOpen: E || N && !i && !o,
|
|
38
38
|
onOpenChange: E ? void 0 : _,
|
|
39
39
|
onChange: B,
|
|
40
40
|
isDisabled: i,
|
|
41
|
-
isInvalid:
|
|
41
|
+
isInvalid: T,
|
|
42
42
|
isRequired: p,
|
|
43
43
|
placeholder: m || X,
|
|
44
44
|
onBlur: C,
|
|
@@ -46,10 +46,10 @@ const r = ({ children: t }) => {
|
|
|
46
46
|
}, x, L(w, {
|
|
47
47
|
isForcedOpen: E
|
|
48
48
|
})))),
|
|
49
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
49
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, M, H)
|
|
50
50
|
});
|
|
51
51
|
}, ae = ({ children: t, className: l }) => {
|
|
52
|
-
const { inputId: a, ariaDescribedBy: s } =
|
|
52
|
+
const { inputId: a, ariaDescribedBy: s } = D(), { id: u, hasError: o, isLoading: n } = b(), m = A(null);
|
|
53
53
|
return Y(() => {
|
|
54
54
|
var i;
|
|
55
55
|
(i = m.current) == null || i.focus({
|
|
@@ -62,7 +62,7 @@ const r = ({ children: t }) => {
|
|
|
62
62
|
className: l,
|
|
63
63
|
"data-invalid": o || void 0,
|
|
64
64
|
"data-loading": n || void 0
|
|
65
|
-
}, /* @__PURE__ */ e.createElement(
|
|
65
|
+
}, /* @__PURE__ */ e.createElement(U, null), t);
|
|
66
66
|
}, g = ({ children: t, className: l, ...a }) => {
|
|
67
67
|
const { isForcedOpen: s } = a, { options: u = [] } = b(), o = d(t, g.Option);
|
|
68
68
|
return /* @__PURE__ */ e.createElement(ee, {
|
|
@@ -79,7 +79,7 @@ const r = ({ children: t }) => {
|
|
|
79
79
|
}))));
|
|
80
80
|
}, se = ({ className: t, ...l }) => {
|
|
81
81
|
const { value: a, label: s } = l;
|
|
82
|
-
return /* @__PURE__ */ e.createElement(
|
|
82
|
+
return /* @__PURE__ */ e.createElement(K, {
|
|
83
83
|
className: t,
|
|
84
84
|
id: a,
|
|
85
85
|
textValue: s
|
|
@@ -90,7 +90,7 @@ r.Label = Q;
|
|
|
90
90
|
r.Trigger = ae;
|
|
91
91
|
r.Options = g;
|
|
92
92
|
r.Description = z;
|
|
93
|
-
r.Error =
|
|
93
|
+
r.Error = J;
|
|
94
94
|
const ge = (...t) => re(j, t);
|
|
95
95
|
export {
|
|
96
96
|
r as D,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import i from "classnames";
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
2
|
+
import { bD as s, ba as v } from "./form-BsiK682r.js";
|
|
3
|
+
const x = ({ globalClasses: e, moduleClasses: r }) => {
|
|
4
4
|
var d;
|
|
5
5
|
const c = ((d = s(...v(e))) == null ? void 0 : d.split(/\s+/)) ?? [], o = [
|
|
6
6
|
e.selected,
|
|
@@ -19,5 +19,5 @@ const w = ({ globalClasses: e, moduleClasses: r }) => {
|
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
x as u
|
|
23
23
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bK as n } from "./form-BsiK682r.js";
|
|
2
2
|
import { s as e } from "./field-rac.module-ts2t4WUO.js";
|
|
3
|
-
import { u } from "./use-element-state-class-name-
|
|
3
|
+
import { u } from "./use-element-state-class-name-C5auxwhj.js";
|
|
4
4
|
const b = (s, a) => {
|
|
5
5
|
const { disabled: t, readOnly: o } = n(), r = u({
|
|
6
6
|
globalClasses: s,
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { useContext as u, useMemo as a } from "react";
|
|
2
|
+
import { bE as c, aQ as p, bC as E, F as o } from "./form-BsiK682r.js";
|
|
3
|
+
const D = [
|
|
4
|
+
o.DROPDOWN,
|
|
5
|
+
o.DEXT_DROPDOWN,
|
|
6
|
+
o.SERVICES_DROPDOWN
|
|
7
|
+
], l = [
|
|
8
|
+
o.DATE_INPUT,
|
|
9
|
+
o.CONTACTS_BIRTHDATE,
|
|
10
|
+
o.DATE_TIME_INPUT,
|
|
11
|
+
o.DEXT_DATE_TIME_INPUT
|
|
12
|
+
], I = [
|
|
13
|
+
o.DATE_PICKER,
|
|
14
|
+
o.DEXT_DATE_PICKER
|
|
15
|
+
], T = [
|
|
16
|
+
o.PHONE,
|
|
17
|
+
o.CONTACTS_PHONE,
|
|
18
|
+
o.BOOKINGS_PHONE,
|
|
19
|
+
o.DEXT_PHONE
|
|
20
|
+
], O = [
|
|
21
|
+
o.MULTILINE_ADDRESS,
|
|
22
|
+
o.BOOKINGS_ADDRESS,
|
|
23
|
+
o.ECOM_ADDRESS
|
|
24
|
+
], P = ({ properties: e }) => {
|
|
25
|
+
var n, t, s, r;
|
|
26
|
+
return ((r = (s = (t = (n = e.validation) == null ? void 0 : n.string) == null ? void 0 : t.phoneOptions) == null ? void 0 : s.allowedCountryCodes) == null ? void 0 : r.length) !== 1;
|
|
27
|
+
}, _ = ({ properties: e }) => {
|
|
28
|
+
var n, t;
|
|
29
|
+
return ((t = (n = e.fieldSettings) == null ? void 0 : n.country) == null ? void 0 : t.show) !== !1;
|
|
30
|
+
}, S = (e, n) => T.includes(e.fieldType) && !n && P(e), C = (e) => D.includes(e.fieldType), A = (e) => l.includes(e.fieldType), N = (e) => O.includes(e.fieldType) && _(e), h = (e) => I.includes(e.fieldType), F = ({ properties: e }) => !e.disabled && !e.readOnly, i = (e) => {
|
|
31
|
+
const n = u(p), { isMobile: t = !1 } = E();
|
|
32
|
+
return a(() => !n || n.parentId ? [] : n.fields.filter((s) => e(s, t) && F(s)).map((s) => s.id), [
|
|
33
|
+
n,
|
|
34
|
+
t,
|
|
35
|
+
e
|
|
36
|
+
]);
|
|
37
|
+
}, f = (e) => {
|
|
38
|
+
var s;
|
|
39
|
+
const n = ((s = c().dropdown) == null ? void 0 : s.open) === !0, t = i(C);
|
|
40
|
+
return n && t.includes(e);
|
|
41
|
+
}, m = (e) => {
|
|
42
|
+
var s, r, d;
|
|
43
|
+
const n = ((d = (r = (s = c().dateInput) == null ? void 0 : s.elementProps) == null ? void 0 : r.dropdown) == null ? void 0 : d.open) === !0, t = i(A);
|
|
44
|
+
return n && t.includes(e);
|
|
45
|
+
}, y = (e) => {
|
|
46
|
+
var s, r, d;
|
|
47
|
+
const n = ((d = (r = (s = c().multilineAddress) == null ? void 0 : s.elementProps) == null ? void 0 : r.dropdown) == null ? void 0 : d.open) === !0, t = i(N);
|
|
48
|
+
return n && t.includes(e);
|
|
49
|
+
}, w = (e) => {
|
|
50
|
+
var s;
|
|
51
|
+
const n = ((s = c().phone) == null ? void 0 : s.open) === !0, t = i(S);
|
|
52
|
+
return n && t.includes(e);
|
|
53
|
+
}, L = (e) => {
|
|
54
|
+
var s;
|
|
55
|
+
const n = ((s = c().datePicker) == null ? void 0 : s.open) === !0, t = i(h);
|
|
56
|
+
return n && t.includes(e);
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
L as a,
|
|
60
|
+
f as b,
|
|
61
|
+
y as c,
|
|
62
|
+
w as d,
|
|
63
|
+
m as u
|
|
64
|
+
};
|
package/dist/component/{use-service-options-base-Wp8RZ4Z8.js → use-service-options-base-CvluFheT.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState as o, useCallback as y, useEffect as m, useMemo as D } from "react";
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
2
|
+
import { bJ as v } from "./form-BsiK682r.js";
|
|
3
|
+
const k = (I) => {
|
|
4
4
|
const { fieldType: L, isEditor: t = !1, postProcessOptions: i, customFetchLogic: a, onInitialDataLoaded: n } = I, [O, h] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(L), r = y((e) => {
|
|
5
5
|
let d = e.map((l) => ({
|
|
6
6
|
value: l.id ?? "",
|
|
@@ -44,5 +44,5 @@ const S = (I) => {
|
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
export {
|
|
47
|
-
|
|
47
|
+
k as u
|
|
48
48
|
};
|
package/dist/form.d.ts
CHANGED
|
@@ -6992,6 +6992,24 @@ type ElementProps = ElementTree & {
|
|
|
6992
6992
|
}> & {
|
|
6993
6993
|
open?: boolean;
|
|
6994
6994
|
};
|
|
6995
|
+
dateInput?: ElementEntry<ElementTree & {
|
|
6996
|
+
dropdown?: ElementEntry<{
|
|
6997
|
+
popover?: ElementEntry<{
|
|
6998
|
+
option?: LeafEntry;
|
|
6999
|
+
}>;
|
|
7000
|
+
}> & {
|
|
7001
|
+
open?: boolean;
|
|
7002
|
+
};
|
|
7003
|
+
}>;
|
|
7004
|
+
multilineAddress?: ElementEntry<ElementTree & {
|
|
7005
|
+
dropdown?: ElementEntry<{
|
|
7006
|
+
popover?: ElementEntry<{
|
|
7007
|
+
option?: LeafEntry;
|
|
7008
|
+
}>;
|
|
7009
|
+
}> & {
|
|
7010
|
+
open?: boolean;
|
|
7011
|
+
};
|
|
7012
|
+
}>;
|
|
6995
7013
|
phone?: ElementEntry<{
|
|
6996
7014
|
popover?: ElementEntry<{
|
|
6997
7015
|
option?: LeafEntry;
|
|
@@ -7030,6 +7048,7 @@ type ElementProps = ElementTree & {
|
|
|
7030
7048
|
icon?: IconEntry;
|
|
7031
7049
|
label?: LeafEntry;
|
|
7032
7050
|
}>;
|
|
7051
|
+
uploadStatus?: LeafEntry;
|
|
7033
7052
|
}>;
|
|
7034
7053
|
};
|
|
7035
7054
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/form-elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.170.0",
|
|
4
4
|
"description": "The Wix Forms rendering element for Builder apps, loaded at runtime as @wix/form-elements/Form",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -156,5 +156,5 @@
|
|
|
156
156
|
]
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
|
-
"falconPackageHash": "
|
|
159
|
+
"falconPackageHash": "2af8cd57399b998f2266582508be7b93ca7347b41c9751e38dcfbca7"
|
|
160
160
|
}
|