@wix/form-elements 1.166.0 → 1.167.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-BXpWILhi.js → appointment-rac-BbXyKTd7.js} +72 -72
- package/dist/component/{bookings-address-rac-Cf--TgsR.js → bookings-address-rac-VJkR_U9L.js} +1 -1
- package/dist/component/{bookings-email-rac-BtB8owOl.js → bookings-email-rac-_EupwXpQ.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CBFDjB_k.js → bookings-first-name-rac-DTZixHYj.js} +1 -1
- package/dist/component/{bookings-header-rac-CrJORcuL.js → bookings-header-rac-BKbKTv5g.js} +1 -1
- package/dist/component/{bookings-last-name-rac-erG4ldFt.js → bookings-last-name-rac-BDy860-C.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-Di4qLQUH.js → bookings-login-bar-rac-DgNP-YNZ.js} +5 -5
- package/dist/component/{bookings-phone-rac-DdM48Obh.js → bookings-phone-rac-B_I6n96b.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-Cl8zOiU1.js → bookings-rich-text-rac-prYPbIiz.js} +1 -1
- package/dist/component/{checkbox-field-rac-CzIDF6aj.js → checkbox-field-rac-C-4PXuxG.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-B8tsQCwV.js → checkbox-group-field-headless-D16bAcaq.js} +35 -35
- package/dist/component/{checkbox-group-field-rac-h02K8CPA.js → checkbox-group-field-rac-GUQ5dO_s.js} +4 -4
- package/dist/component/{checkbox-group-rac-GfebLnuS.js → checkbox-group-rac-Bl6xL5-H.js} +1 -1
- package/dist/component/{checkbox-rac-Dn24U4oG.js → checkbox-rac-Blg0KVyP.js} +1 -1
- package/dist/component/{contacts-address-rac-CtVtIwOV.js → contacts-address-rac-BfOhCAj8.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-CK2odpbJ.js → contacts-birthdate-rac-DYBvDh62.js} +1 -1
- package/dist/component/{contacts-company-rac-ue8vAn9A.js → contacts-company-rac-DIJr7zjA.js} +1 -1
- package/dist/component/{contacts-email-rac-lleErjYl.js → contacts-email-rac-DjmqELhC.js} +1 -1
- package/dist/component/{contacts-first-name-rac-D5wtz4Z1.js → contacts-first-name-rac-DGNll7gw.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Cj9GKWBY.js → contacts-last-name-rac-BJ8AZYQN.js} +1 -1
- package/dist/component/{contacts-phone-rac-BP6unckw.js → contacts-phone-rac-BC-QtpEN.js} +1 -1
- package/dist/component/{contacts-position-rac-XjUdZglr.js → contacts-position-rac-BQia__74.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-Dnpbgw5C.js → contacts-subscribe-rac-CTFptz01.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-pNFMOZl6.js → contacts-tax-id-rac-Cy72Jouc.js} +1 -1
- package/dist/component/{date-availability-BRA7k6ep.js → date-availability-BC6updcS.js} +1 -1
- package/dist/component/{date-input-field-rac-B15XH-D_.js → date-input-field-rac-b_T1yf8D.js} +38 -38
- package/dist/component/{date-input-rac-B7XvsFeB.js → date-input-rac-KkRyWRP_.js} +1 -1
- package/dist/component/{date-picker-field-rac-BNgKcgVi.js → date-picker-field-rac-BLWVJbTJ.js} +6 -6
- package/dist/component/{date-picker-rac-P54cHP86.js → date-picker-rac-DKCQza7v.js} +1 -1
- package/dist/component/{date-time-input-field-rac-Dt-jUznP.js → date-time-input-field-rac-CZxZW6fz.js} +45 -45
- package/dist/component/{date-time-input-rac-DHmOLCvg.js → date-time-input-rac-DQ-iBwmr.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-Bo2ZRcJc.js → dext-checkbox-group-rac-kp1Jbwt-.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BdA2i9PR.js → dext-checkbox-rac-CBm9cRUz.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BME9ZDFy.js → dext-date-picker-rac-DsVKWsRy.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-owEU8r5-.js → dext-date-time-input-rac-CO26-8Qo.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BAeN43fo.js → dext-dropdown-rac-eRzu2C-y.js} +1 -1
- package/dist/component/{dext-email-rac-D7HBfCis.js → dext-email-rac-DDrZzE_G.js} +1 -1
- package/dist/component/{dext-number-input-rac-DEB2ji5S.js → dext-number-input-rac-Dj7sInLk.js} +1 -1
- package/dist/component/{dext-phone-rac-TOfFCmhD.js → dext-phone-rac-g8M77F7m.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DGsQLres.js → dext-radio-group-rac-BjhygC0R.js} +2 -2
- package/dist/component/{dext-rating-input-rac-CFcRQeE7.js → dext-rating-input-rac-BraNjvyA.js} +1 -1
- package/dist/component/{dext-tags-rac-CGsaKVfb.js → dext-tags-rac-B5mAIuDi.js} +2 -2
- package/dist/component/{dext-text-area-rac-BqbLXOdt.js → dext-text-area-rac-D_YBnaWi.js} +1 -1
- package/dist/component/{dext-text-input-rac-CpXfQV53.js → dext-text-input-rac-BzeWH1jv.js} +1 -1
- package/dist/component/{dext-url-input-rac-Bbm3_OG9.js → dext-url-input-rac-Cn0h_vx3.js} +1 -1
- package/dist/component/{donation-rac-DvBAOz6H.js → donation-rac-CQRdHxWh.js} +46 -46
- package/dist/component/{dropdown-field-rac-BW0UDoBO.js → dropdown-field-rac-C7LL0W5Z.js} +3 -3
- package/dist/component/{dropdown-rac-B6ZD6Qgb.js → dropdown-rac-Nb2VyJ0x.js} +1 -1
- package/dist/component/{ecom-address-rac-Dnv9Yswd.js → ecom-address-rac-_c2YIIwg.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BVqvUwn4.js → ecom-subscription-checkbox-rac-Bma7TAVj.js} +2 -2
- package/dist/component/{email-input-field-rac-CuaMcfZR.js → email-input-field-rac-2E2tEaS5.js} +47 -47
- package/dist/component/events-repeater-rac-COWHYBFD.js +280 -0
- package/dist/component/{events-rsvp-rac-D4hSrIsE.js → events-rsvp-rac-CXp8j19Y.js} +3 -3
- package/dist/component/{field-error-headless-NGaTm3dF.js → field-error-headless-S-ugOQQX.js} +7 -7
- package/dist/component/{field-label-headless-Bx1UjEcp.js → field-label-headless-_n4I0_tX.js} +14 -14
- package/dist/component/{file-upload-rac-oOnemmUg.js → file-upload-rac-DCH_iwDg.js} +79 -79
- package/dist/component/{fixed-payment-rac-C9YkIvQO.js → fixed-payment-rac-CYkKJUfM.js} +14 -14
- package/dist/component/{form-sH9m0ReT.js → form-jK8ezTss.js} +1110 -1109
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-N5Oclne_.js → header-field-rac-DnbjI6W5.js} +6 -6
- package/dist/component/{header-rac-CTmSJdoY.js → header-rac-DKUICrni.js} +1 -1
- package/dist/component/{image-choice-rac-BYZ61yof.js → image-choice-rac-B_9ponST.js} +4 -4
- package/dist/component/{index-B56GTN_5.js → index-BxdMzOvN.js} +68 -68
- package/dist/component/{index-SHZx7XzS.js → index-ZYnsxY-a.js} +2 -2
- package/dist/component/{isObjectLike-BFpR7Q-o.js → isObjectLike-BW-9QEQl.js} +9 -9
- package/dist/component/{multiline-address-field-rac-DvMyN2gF.js → multiline-address-field-rac-k-P0ijWG.js} +40 -40
- package/dist/component/{multiline-address-rac-Cfv0QzzV.js → multiline-address-rac-Bbn9mNDa.js} +1 -1
- package/dist/component/{number-input-field-rac-CWQw7p2k.js → number-input-field-rac--lom-B_X.js} +7 -7
- package/dist/component/{number-input-rac-DJ2Nh9Vm.js → number-input-rac-Bhbd6T9S.js} +1 -1
- package/dist/component/{password-rac-ayoa5FQV.js → password-rac-BV_uTHb3.js} +14 -14
- package/dist/component/{payment-input-rac-CBjP_xjz.js → payment-input-rac-cawyGN_t.js} +28 -28
- package/dist/component/{phone-input-field-rac-BWOEiUK7.js → phone-input-field-rac-CsElHRto.js} +67 -67
- package/dist/component/{phone-rac-Dp7FouV3.js → phone-rac-XrHN5Nko.js} +1 -1
- package/dist/component/{product-list-rac-D_EoPXl-.js → product-list-rac-cxv_xz7K.js} +30 -30
- package/dist/component/{quiz-radio-group-rac-RWM0riuU.js → quiz-radio-group-rac-DGaxOPE1.js} +1 -1
- package/dist/component/{radio-button-module-classes-nK-xhmxh.js → radio-button-module-classes-Xv2Jn01x.js} +21 -21
- package/dist/component/{radio-group-field-rac-Cc-pvwZn.js → radio-group-field-rac-DgGqgTql.js} +4 -4
- package/dist/component/{radio-group-rac-xvesuLSn.js → radio-group-rac-Bh0E-oe1.js} +1 -1
- package/dist/component/{rating-input-field-rac-BgMRUXQy.js → rating-input-field-rac-C3YLV971.js} +10 -10
- package/dist/component/{rating-input-rac-CeZtJR2S.js → rating-input-rac-CfcC5EUh.js} +1 -1
- package/dist/component/{rich-content-rac.module-Cv7PIbmM.js → rich-content-rac.module-DUjzLGtX.js} +5 -5
- package/dist/component/{rich-text-field-rac-CmbNBe2u.js → rich-text-field-rac-BmguoJhk.js} +5 -5
- package/dist/component/{rich-text-rac-9hwPCQXl.js → rich-text-rac-BWhHcq25.js} +1 -1
- package/dist/component/{service-dropdown-rac-2Wjgmo75.js → service-dropdown-rac-C5oX-ql7.js} +30 -30
- package/dist/component/{services-multi-choice-rac-cZ7elBhc.js → services-multi-choice-rac-C1fem9NB.js} +12 -12
- package/dist/component/{signature-rac-BfE2328G.js → signature-rac-BtHqiWj1.js} +62 -62
- package/dist/component/{submit-button-rac-oYO7pska.js → submit-button-rac-OYeKJFF8.js} +39 -39
- package/dist/component/{tags-field-rac-B-_LzCFU.js → tags-field-rac-kA2RSijL.js} +37 -37
- package/dist/component/{tags-rac-D5bRM462.js → tags-rac-B_2qCZGu.js} +1 -1
- package/dist/component/{text-area-field-rac-fwtICvjX.js → text-area-field-rac-DeO609Mv.js} +17 -17
- package/dist/component/{text-area-rac-C4EkhfB5.js → text-area-rac-BAQFBOZd.js} +1 -1
- package/dist/component/{text-input-field-rac-CxZYUtxX.js → text-input-field-rac-CCcKwuLZ.js} +3 -3
- package/dist/component/{text-input-headless-DK5wBGBb.js → text-input-headless-D8-jkaYm.js} +8 -8
- package/dist/component/{text-input-rac-FS49SxCK.js → text-input-rac-BVcgjj8g.js} +1 -1
- package/dist/component/{time-input-rac-CDUVS7kp.js → time-input-rac-BYctyHgU.js} +11 -11
- package/dist/component/{url-input-field-rac-B2ypvh7T.js → url-input-field-rac-COC9qgcs.js} +23 -23
- package/dist/component/{url-input-rac-DbJx2T1R.js → url-input-rac-BZXLh0Ej.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-0ZlT4g7h.js → use-dropdown-option-class-name-BTltqRl1.js} +2 -2
- package/dist/component/use-dropdown-trigger-class-name-BjJZfl3i.js +98 -0
- package/dist/component/{use-element-state-class-name-DCAoZgWT.js → use-element-state-class-name-CkT6Ga8t.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-BvP8fzTQ.js → use-hoverable-input-class-name-BkoSr6tr.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-B-eR29aQ.js → use-is-forced-open-dropdown-fo_NCnSk.js} +1 -1
- package/dist/component/{use-service-options-base-BF_peAsS.js → use-service-options-base-Wp8RZ4Z8.js} +1 -1
- package/dist/component/use-text-input-class-name-DS7i03Gk.js +6 -0
- package/package.json +2 -2
- package/dist/component/events-repeater-rac-CNsh8NRh.js +0 -271
- package/dist/component/use-dropdown-trigger-class-name-PItHRYWo.js +0 -96
- package/dist/component/use-text-input-class-name-CQf8yep5.js +0 -6
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { RicosViewer as G } from "@wix/ricos/viewer";
|
|
2
2
|
import L from "classnames";
|
|
3
|
-
import n, { useMemo as q, createContext as
|
|
3
|
+
import n, { useMemo as q, createContext as $e, useContext as Ce, useState as Ee, useRef as x, useCallback as R, useEffect as Ae } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as Tt } from "react-aria";
|
|
5
|
-
import {
|
|
5
|
+
import { by as Ct, d as It, bt as Mt, bv as Lt, b6 as wt, b7 as qt, a$ as xt, b5 as V, F as K, bN as Pe, bm as it, bD as P, bA as M, bF as ae, bz as Nt, bb as Bt, C as Oe, bk as kt, bo as Ut, bK as Wt, bE as $t, bJ as Vt, br as Kt, bg as Yt, bq as Ht, bG as jt, aH as Jt, V as Xt, U as z, af as Q, H as Ne, K as Z, G as ee, W as Gt, X as zt } from "./form-jK8ezTss.js";
|
|
6
6
|
import { f as b, a as v } from "./find-child-C60k4CxG.js";
|
|
7
7
|
import { F as Qt, V as Zt } from "./headless-styles-CmcyA_pi.js";
|
|
8
|
-
import { a as en } from "./use-is-forced-open-dropdown-
|
|
9
|
-
import { TextField as be, Input as le, ComboBoxStateContext as
|
|
10
|
-
import { D as ie, E as ce } from "./field-error-headless-
|
|
11
|
-
import { L as de } from "./field-label-headless-
|
|
12
|
-
import { e as tn, c as nn, a as rn, r as vt } from "./isObjectLike-
|
|
13
|
-
import { V as on, u as sn } from "./use-dropdown-option-class-name-
|
|
8
|
+
import { a as en } from "./use-is-forced-open-dropdown-fo_NCnSk.js";
|
|
9
|
+
import { TextField as be, Input as le, ComboBoxStateContext as Ve, ComboBox as Fe, Popover as Se, ListBox as Te, ListBoxItem as he, Group as Ot, Button as gt } from "react-aria-components";
|
|
10
|
+
import { D as ie, E as ce } from "./field-error-headless-S-ugOQQX.js";
|
|
11
|
+
import { L as de } from "./field-label-headless-_n4I0_tX.js";
|
|
12
|
+
import { e as tn, c as nn, a as rn, r as vt } from "./isObjectLike-BW-9QEQl.js";
|
|
13
|
+
import { V as on, u as sn } from "./use-dropdown-option-class-name-BTltqRl1.js";
|
|
14
14
|
import { u as an } from "./use-invoke-callback-UH73A_J3.js";
|
|
15
15
|
import { C as ct } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as te } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as Me } from "./custom-focus-class-_483Pkwp.js";
|
|
18
18
|
import { s as C } from "./field-rac.module-ts2t4WUO.js";
|
|
19
|
-
import { u as dt } from "./use-hoverable-input-class-name-
|
|
19
|
+
import { u as dt } from "./use-hoverable-input-class-name-BkoSr6tr.js";
|
|
20
20
|
const ln = (e, t, o) => {
|
|
21
21
|
var s, l, i, a;
|
|
22
22
|
const r = (s = e.steps) == null ? void 0 : s.map((d) => {
|
|
@@ -51,7 +51,7 @@ function cn(e, t, o = !1) {
|
|
|
51
51
|
const { country: r, subdivision: s, city: l, addressLine: i, streetAddress: a, addressLine2: d, postalCode: m } = e, u = {};
|
|
52
52
|
return t ? (r && (u.country = r), s && (u.subdivision = s), l && (u.city = l), i ? u.addressLine = i : a != null && a.formattedAddressLine && (u.addressLine = a == null ? void 0 : a.formattedAddressLine), d && (u.addressLine = d), m && (u.postalCode = m), a != null && a.apt && (u.apartment = a == null ? void 0 : a.apt), a != null && a.name ? u.streetName = a == null ? void 0 : a.name : o && (a != null && a.formattedAddressLine) && (u.streetName = a == null ? void 0 : a.formattedAddressLine), a != null && a.number && (u.streetNumber = a.number)) : (r && (u.country = r), s && (u.subdivision = s), l && (u.city = l), i ? u.address_line = i : a != null && a.formattedAddressLine && (u.address_line = a == null ? void 0 : a.formattedAddressLine), d && (u.address_line = d), m && (u.postal_code = m), a != null && a.apt && (u.apartment = a == null ? void 0 : a.apt), a != null && a.name ? u.street_name = a == null ? void 0 : a.name : o && (a != null && a.formattedAddressLine) && (u.street_name = a == null ? void 0 : a.formattedAddressLine), a != null && a.number && (u.street_number = a.number)), u;
|
|
53
53
|
}
|
|
54
|
-
const Ft = /* @__PURE__ */
|
|
54
|
+
const Ft = /* @__PURE__ */ $e({
|
|
55
55
|
onAddressSelect: () => {
|
|
56
56
|
}
|
|
57
57
|
}), dn = ({ children: e, onAddressSelect: t, autocompleteEnabled: o }) => {
|
|
@@ -69,7 +69,7 @@ const Ft = /* @__PURE__ */ Ve({
|
|
|
69
69
|
function Ie() {
|
|
70
70
|
return Ce(Ft);
|
|
71
71
|
}
|
|
72
|
-
const St = /* @__PURE__ */
|
|
72
|
+
const St = /* @__PURE__ */ $e(void 0), un = ({ children: e, countryCode: t }) => {
|
|
73
73
|
const o = q(() => ({
|
|
74
74
|
countryCode: t
|
|
75
75
|
}), [
|
|
@@ -167,15 +167,15 @@ const pn = (e, t) => e.map((o) => ({
|
|
|
167
167
|
fields: i
|
|
168
168
|
};
|
|
169
169
|
}, Ln = () => ({
|
|
170
|
-
country:
|
|
171
|
-
subdivision:
|
|
172
|
-
city:
|
|
173
|
-
address_line:
|
|
174
|
-
address_line_2:
|
|
175
|
-
postal_code:
|
|
176
|
-
street_name:
|
|
177
|
-
street_number:
|
|
178
|
-
apartment:
|
|
170
|
+
country: V(),
|
|
171
|
+
subdivision: V(),
|
|
172
|
+
city: V(),
|
|
173
|
+
address_line: V(),
|
|
174
|
+
address_line_2: V(),
|
|
175
|
+
postal_code: V(),
|
|
176
|
+
street_name: V(),
|
|
177
|
+
street_number: V(),
|
|
178
|
+
apartment: V()
|
|
179
179
|
}), Nn = ({ id: e, target: t, fieldType: o, form: r, country: s, fieldSettings: l, validation: i, required: a }) => {
|
|
180
180
|
const [d] = Ee(Ln), { isExperimentEnabled: m } = Ct(), u = m(It.USE_FIELDS_V2), { getCountryAddressForm: y } = Mt(), { isMobile: I, breakpoint: p } = Lt(), E = y(s), f = o === K.MULTILINE_ADDRESS || o === K.BOOKINGS_ADDRESS, N = q(() => {
|
|
181
181
|
var g;
|
|
@@ -225,7 +225,7 @@ const pn = (e, t) => e.map((o) => ({
|
|
|
225
225
|
]),
|
|
226
226
|
isMultilineAddressField: f
|
|
227
227
|
};
|
|
228
|
-
}, Dt = /* @__PURE__ */
|
|
228
|
+
}, Dt = /* @__PURE__ */ $e(void 0), On = ({ children: e, fields: t }) => {
|
|
229
229
|
const o = q(() => ({
|
|
230
230
|
fields: t
|
|
231
231
|
}), [
|
|
@@ -286,7 +286,7 @@ ne.Input = gn;
|
|
|
286
286
|
ne.Description = ie;
|
|
287
287
|
ne.Error = ce;
|
|
288
288
|
const Ke = ({ enabled: e }) => {
|
|
289
|
-
const { actions: t } = Nt(), [o, r] = Ee(
|
|
289
|
+
const { actions: t } = Nt(), [o, r] = Ee(V()), s = R(() => r(V()), []);
|
|
290
290
|
return q(() => {
|
|
291
291
|
const { predict: l, getPlace: i, searchByPostalCode: a } = t ?? {};
|
|
292
292
|
if (!(!e || !l || !i || !a))
|
|
@@ -492,7 +492,7 @@ const An = /* @__PURE__ */ Bt(_n), Pn = (e, t, o = 200) => {
|
|
|
492
492
|
clearPredictions: d
|
|
493
493
|
};
|
|
494
494
|
}, Ye = ({ optionCount: e }) => {
|
|
495
|
-
const t = Ce(
|
|
495
|
+
const t = Ce(Ve), o = x(t);
|
|
496
496
|
o.current = t;
|
|
497
497
|
const r = x(e);
|
|
498
498
|
return Ae(() => {
|
|
@@ -727,7 +727,7 @@ oe.Input = Bn;
|
|
|
727
727
|
oe.Description = ie;
|
|
728
728
|
oe.Error = ce;
|
|
729
729
|
const kn = ({ isOpen: e }) => {
|
|
730
|
-
const t = Ce(
|
|
730
|
+
const t = Ce(Ve), o = x(!1);
|
|
731
731
|
return Ae(() => {
|
|
732
732
|
e && t && !t.isOpen && t.open(null, "manual"), e && (t == null ? void 0 : t.selectionManager.focusedKey) != null && t.selectionManager.setFocusedKey(null), !e && o.current && (t == null || t.close()), o.current = e;
|
|
733
733
|
}, [
|
|
@@ -735,7 +735,7 @@ const kn = ({ isOpen: e }) => {
|
|
|
735
735
|
t
|
|
736
736
|
]), null;
|
|
737
737
|
}, _t = ({ readOnly: e, disabled: t } = {}) => {
|
|
738
|
-
const o = Ce(
|
|
738
|
+
const o = Ce(Ve);
|
|
739
739
|
return R(() => {
|
|
740
740
|
!o || o.isOpen || e || t || o.open(null, "manual");
|
|
741
741
|
}, [
|
|
@@ -858,11 +858,11 @@ const kn = ({ isOpen: e }) => {
|
|
|
858
858
|
onClick: u,
|
|
859
859
|
onKeyDown: d
|
|
860
860
|
});
|
|
861
|
-
},
|
|
861
|
+
}, $n = ({ children: e, className: t }) => /* @__PURE__ */ n.createElement(gt, {
|
|
862
862
|
className: t
|
|
863
863
|
}, e);
|
|
864
864
|
ge.Input = Wn;
|
|
865
|
-
ge.Trigger =
|
|
865
|
+
ge.Trigger = $n;
|
|
866
866
|
const je = ({ children: e, className: t, ...o }) => {
|
|
867
867
|
const { options: r, isForcedOpen: s } = o, l = b(e, je.Option);
|
|
868
868
|
return /* @__PURE__ */ n.createElement(Se, {
|
|
@@ -876,7 +876,7 @@ const je = ({ children: e, className: t, ...o }) => {
|
|
|
876
876
|
value: i.value,
|
|
877
877
|
label: i.label
|
|
878
878
|
}))));
|
|
879
|
-
},
|
|
879
|
+
}, Vn = ({ className: e, ...t }) => {
|
|
880
880
|
const { value: o, label: r } = t;
|
|
881
881
|
return /* @__PURE__ */ n.createElement(he, {
|
|
882
882
|
className: e,
|
|
@@ -884,7 +884,7 @@ const je = ({ children: e, className: t, ...o }) => {
|
|
|
884
884
|
textValue: r
|
|
885
885
|
}, r);
|
|
886
886
|
};
|
|
887
|
-
je.Option =
|
|
887
|
+
je.Option = Vn;
|
|
888
888
|
Y.Label = de;
|
|
889
889
|
Y.Control = ge;
|
|
890
890
|
Y.Options = je;
|
|
@@ -968,7 +968,7 @@ const k = ({ children: e }) => {
|
|
|
968
968
|
isAutocompleteEnabled: y
|
|
969
969
|
}), [E, f] = Ee(), N = q(() => E ? [
|
|
970
970
|
{
|
|
971
|
-
id:
|
|
971
|
+
id: V(),
|
|
972
972
|
label: E.formattedAddress || ""
|
|
973
973
|
}
|
|
974
974
|
] : [], [
|
|
@@ -1366,7 +1366,7 @@ const rr = () => ue("country"), or = () => ue("subdivision"), sr = () => ue("cit
|
|
|
1366
1366
|
...mr
|
|
1367
1367
|
}), [
|
|
1368
1368
|
g
|
|
1369
|
-
]), { isExperimentEnabled: w } = Ct(), T = w(It.STREETLESS_LOCALITY_FALLBACK), { validateFields: O } =
|
|
1369
|
+
]), { isExperimentEnabled: w } = Ct(), T = w(It.STREETLESS_LOCALITY_FALLBACK), { validateFields: O } = $t(), D = Vt(), j = Nt(), fe = q(() => ({
|
|
1370
1370
|
...j,
|
|
1371
1371
|
actions: {
|
|
1372
1372
|
predict: Ht,
|
|
@@ -1385,10 +1385,10 @@ const rr = () => ue("country"), or = () => ue("subdivision"), sr = () => ue("cit
|
|
|
1385
1385
|
fieldSettings: u,
|
|
1386
1386
|
validation: I,
|
|
1387
1387
|
required: f
|
|
1388
|
-
}), F = R((
|
|
1388
|
+
}), F = R(($) => {
|
|
1389
1389
|
if (!s)
|
|
1390
1390
|
return;
|
|
1391
|
-
const X = cn(
|
|
1391
|
+
const X = cn($, A, T), Re = {
|
|
1392
1392
|
...X,
|
|
1393
1393
|
[ye.COUNTRY]: X[ye.COUNTRY] ?? s[ye.COUNTRY]
|
|
1394
1394
|
};
|
|
@@ -1398,8 +1398,8 @@ const rr = () => ue("country"), or = () => ue("subdivision"), sr = () => ue("cit
|
|
|
1398
1398
|
s,
|
|
1399
1399
|
A,
|
|
1400
1400
|
T
|
|
1401
|
-
]), J = R((
|
|
1402
|
-
if (A &&
|
|
1401
|
+
]), J = R(($, X) => {
|
|
1402
|
+
if (A && $ === ye.COUNTRY && (s == null ? void 0 : s[$]) !== X) {
|
|
1403
1403
|
l == null || l({
|
|
1404
1404
|
[ye.COUNTRY]: X
|
|
1405
1405
|
});
|
|
@@ -1407,19 +1407,19 @@ const rr = () => ue("country"), or = () => ue("subdivision"), sr = () => ue("cit
|
|
|
1407
1407
|
}
|
|
1408
1408
|
l == null || l({
|
|
1409
1409
|
...s,
|
|
1410
|
-
[
|
|
1410
|
+
[$]: X
|
|
1411
1411
|
});
|
|
1412
1412
|
}, [
|
|
1413
1413
|
l,
|
|
1414
1414
|
s,
|
|
1415
1415
|
A
|
|
1416
|
-
]), pe = R(async (
|
|
1417
|
-
|
|
1416
|
+
]), pe = R(async ($) => O(A ? [
|
|
1417
|
+
...$,
|
|
1418
1418
|
{
|
|
1419
1419
|
path: `${p}/${ye.COUNTRY}`,
|
|
1420
1420
|
value: s == null ? void 0 : s.country
|
|
1421
1421
|
}
|
|
1422
|
-
] :
|
|
1422
|
+
] : $), [
|
|
1423
1423
|
s,
|
|
1424
1424
|
p,
|
|
1425
1425
|
O,
|
|
@@ -1427,7 +1427,7 @@ const rr = () => ue("country"), or = () => ue("subdivision"), sr = () => ue("cit
|
|
|
1427
1427
|
]);
|
|
1428
1428
|
jt(o, () => {
|
|
1429
1429
|
var Re;
|
|
1430
|
-
const
|
|
1430
|
+
const $ = d == null ? void 0 : d[0], X = (Re = W == null ? void 0 : W.fields) == null ? void 0 : Re.find((lt) => "target" in lt && lt.target === ($ == null ? void 0 : $.errorPath));
|
|
1431
1431
|
return X == null ? void 0 : X.id;
|
|
1432
1432
|
});
|
|
1433
1433
|
const De = en(o), Qe = v(b(e, c.Country), {
|
package/dist/component/{number-input-field-rac-CWQw7p2k.js → number-input-field-rac--lom-B_X.js}
RENAMED
|
@@ -2,18 +2,18 @@ import { RicosViewer as P } from "@wix/ricos/viewer";
|
|
|
2
2
|
import i from "classnames";
|
|
3
3
|
import r, { useState as U, useCallback as G, useEffect as K, useRef as Q } from "react";
|
|
4
4
|
import { NumberField as $, Input as j } from "react-aria-components";
|
|
5
|
-
import {
|
|
5
|
+
import { bD as _, bA as S, bN as z, bF as H, U as J, af as W, K as X, G as Y } from "./form-jK8ezTss.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as Z, E as w } from "./field-error-headless-
|
|
8
|
-
import { L as ee } from "./field-label-headless-
|
|
7
|
+
import { D as Z, E as w } from "./field-error-headless-S-ugOQQX.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-_n4I0_tX.js";
|
|
9
9
|
import { g as re, c as te } from "./numeric-input-utils-CuBMi4-a.js";
|
|
10
10
|
import { u as ne } from "./use-invoke-callback-UH73A_J3.js";
|
|
11
11
|
import { E as ae } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { s as p } from "./field-rac.module-ts2t4WUO.js";
|
|
13
|
-
import { u as se } from "./use-text-input-class-name-
|
|
13
|
+
import { u as se } from "./use-text-input-class-name-DS7i03Gk.js";
|
|
14
14
|
const e = ({ children: t }) => {
|
|
15
15
|
var F, L, R;
|
|
16
|
-
const { id: a, value: s, onChange: l, disabled: d, required: b, readOnly: o, onBlur: E, onFocus: f, FieldLayout: m, hasError: u, validation: n } = _(), { labelId:
|
|
16
|
+
const { id: a, value: s, onChange: l, disabled: d, required: b, readOnly: o, onBlur: E, onFocus: f, FieldLayout: m, hasError: u, validation: n } = _(), { labelId: A } = S(), D = ((F = n == null ? void 0 : n.number) == null ? void 0 : F.multipleOf) || 1, y = (L = n == null ? void 0 : n.number) == null ? void 0 : L.maximum, g = (R = n == null ? void 0 : n.number) == null ? void 0 : R.minimum, x = O(s), [T, I] = U(x), V = ne(E), h = c(t, e.Label), q = c(t, e.Input), M = c(t, e.Description), k = c(t, e.Error), B = G((N) => {
|
|
17
17
|
if (N === void 0 || Number.isNaN(N)) {
|
|
18
18
|
l(""), I(NaN);
|
|
19
19
|
return;
|
|
@@ -32,7 +32,7 @@ const e = ({ children: t }) => {
|
|
|
32
32
|
fieldId: a,
|
|
33
33
|
renderLabel: () => h,
|
|
34
34
|
renderInput: () => /* @__PURE__ */ r.createElement($, {
|
|
35
|
-
"aria-labelledby":
|
|
35
|
+
"aria-labelledby": A,
|
|
36
36
|
value: T,
|
|
37
37
|
onChange: B,
|
|
38
38
|
isDisabled: d,
|
|
@@ -42,7 +42,7 @@ const e = ({ children: t }) => {
|
|
|
42
42
|
onBlur: V,
|
|
43
43
|
onFocus: f,
|
|
44
44
|
minValue: g ?? void 0,
|
|
45
|
-
maxValue:
|
|
45
|
+
maxValue: y ?? void 0
|
|
46
46
|
}, q),
|
|
47
47
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, k, M)
|
|
48
48
|
});
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import e, { useState as
|
|
1
|
+
import e, { useState as h, useRef as x } from "react";
|
|
2
2
|
import { RicosViewer as O } from "@wix/ricos/viewer";
|
|
3
3
|
import d from "classnames";
|
|
4
|
-
import {
|
|
4
|
+
import { bD as E, bA as I, bF as A, bN as B, U as v, af as V, K as P, G as M } from "./form-jK8ezTss.js";
|
|
5
5
|
import { TextField as k, Group as q, Input as U, Button as j } from "react-aria-components";
|
|
6
6
|
import { f as u, a as b } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as G, E as H } from "./field-error-headless-
|
|
8
|
-
import { L as W } from "./field-label-headless-
|
|
7
|
+
import { D as G, E as H } from "./field-error-headless-S-ugOQQX.js";
|
|
8
|
+
import { L as W } from "./field-label-headless-_n4I0_tX.js";
|
|
9
9
|
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { H as K } from "./custom-focus-class-_483Pkwp.js";
|
|
11
11
|
import { s as p } from "./field-rac.module-ts2t4WUO.js";
|
|
12
|
-
import { u as Q } from "./use-text-input-class-name-
|
|
12
|
+
import { u as Q } from "./use-text-input-class-name-DS7i03Gk.js";
|
|
13
13
|
const t = ({ children: o, className: r }) => {
|
|
14
|
-
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, autoComplete:
|
|
15
|
-
return /* @__PURE__ */ e.createElement(
|
|
14
|
+
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, autoComplete: _, FieldLayout: y } = E(), { labelId: D } = I(), [F, R] = h(!1), L = u(o, t.Label), T = u(o, t.Control), w = u(o, t.Description), N = u(o, t.Error);
|
|
15
|
+
return /* @__PURE__ */ e.createElement(y, {
|
|
16
16
|
fieldId: l,
|
|
17
17
|
renderLabel: () => L,
|
|
18
18
|
renderInput: () => /* @__PURE__ */ e.createElement(k, {
|
|
19
|
-
autoComplete:
|
|
20
|
-
"aria-labelledby":
|
|
19
|
+
autoComplete: _,
|
|
20
|
+
"aria-labelledby": D,
|
|
21
21
|
value: s ?? "",
|
|
22
22
|
onChange: c,
|
|
23
23
|
isDisabled: n,
|
|
@@ -28,10 +28,10 @@ const t = ({ children: o, className: r }) => {
|
|
|
28
28
|
onFocus: C,
|
|
29
29
|
className: r
|
|
30
30
|
}, b(T, {
|
|
31
|
-
isVisible:
|
|
32
|
-
onToggleVisibility: () =>
|
|
31
|
+
isVisible: F,
|
|
32
|
+
onToggleVisibility: () => R((S) => !S)
|
|
33
33
|
})),
|
|
34
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, w,
|
|
34
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, w, N)
|
|
35
35
|
});
|
|
36
36
|
}, $ = ({ children: o, className: r, ...l }) => {
|
|
37
37
|
const { isVisible: s, onToggleVisibility: c } = l, { disabled: n, hasError: m } = E(), a = u(o, t.Input), i = u(o, t.Toggle);
|
|
@@ -121,9 +121,9 @@ const X = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
121
121
|
content: o,
|
|
122
122
|
locale: r
|
|
123
123
|
}), re = () => {
|
|
124
|
-
const { t: o } =
|
|
124
|
+
const { t: o } = B(), r = Q(g.control);
|
|
125
125
|
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
126
|
-
className: d(
|
|
126
|
+
className: d(v, p.label)
|
|
127
127
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
128
128
|
className: d(V, p.requiredMark)
|
|
129
129
|
})), /* @__PURE__ */ e.createElement(t.Control, {
|
|
@@ -2,16 +2,16 @@ import r, { useCallback as P, useRef as Q } from "react";
|
|
|
2
2
|
import { RicosViewer as j } from "@wix/ricos/viewer";
|
|
3
3
|
import p from "classnames";
|
|
4
4
|
import { TextField as w, Group as z, Input as J } from "react-aria-components";
|
|
5
|
-
import {
|
|
5
|
+
import { bD as L, bA as R, bv as T, bN as W, bF as X, U as Y, af as Z, K as ee, G as re } from "./form-jK8ezTss.js";
|
|
6
6
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as te, E as ne } from "./field-error-headless-
|
|
8
|
-
import { L as ae } from "./field-label-headless-
|
|
9
|
-
import { f as
|
|
7
|
+
import { D as te, E as ne } from "./field-error-headless-S-ugOQQX.js";
|
|
8
|
+
import { L as ae } from "./field-label-headless-_n4I0_tX.js";
|
|
9
|
+
import { f as D, g as se } from "./payment-field-utils-DobiK5Xh.js";
|
|
10
10
|
import { u as oe } from "./use-synced-display-value-DcAxdn3M.js";
|
|
11
11
|
import { E as le } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { H as ce } from "./custom-focus-class-_483Pkwp.js";
|
|
13
13
|
import { s as d } from "./field-rac.module-ts2t4WUO.js";
|
|
14
|
-
import { u as ie } from "./use-text-input-class-name-
|
|
14
|
+
import { u as ie } from "./use-text-input-class-name-DS7i03Gk.js";
|
|
15
15
|
function ue(e, t) {
|
|
16
16
|
return {
|
|
17
17
|
productId: e.id,
|
|
@@ -27,47 +27,47 @@ function h(e) {
|
|
|
27
27
|
}
|
|
28
28
|
const n = ({ children: e }) => {
|
|
29
29
|
var O, g, A, V;
|
|
30
|
-
const { id: t, value: a, onChange: s, disabled: u, readOnly: m, required:
|
|
31
|
-
sourceValue:
|
|
32
|
-
format: (l) =>
|
|
30
|
+
const { id: t, value: a, onChange: s, disabled: u, readOnly: m, required: I, hasError: y, onBlur: o, onFocus: E, FieldLayout: M, validation: C } = L(), { labelId: G, prefixId: q } = R(), { regionalFormat: c } = T(), S = (A = (g = (O = C == null ? void 0 : C.predefined) == null ? void 0 : O.paymentOptions) == null ? void 0 : g.products) == null ? void 0 : A[0], F = (V = a == null ? void 0 : a.at(0)) == null ? void 0 : V.price, [_, b] = oe({
|
|
31
|
+
sourceValue: F,
|
|
32
|
+
format: (l) => D(String(l ?? ""), c),
|
|
33
33
|
regionalFormat: c
|
|
34
34
|
}), $ = P(() => {
|
|
35
|
-
const l =
|
|
36
|
-
|
|
35
|
+
const l = D(_, c);
|
|
36
|
+
b(l || ""), o == null || o();
|
|
37
37
|
}, [
|
|
38
|
-
|
|
38
|
+
_,
|
|
39
39
|
c,
|
|
40
40
|
o,
|
|
41
|
-
|
|
41
|
+
b
|
|
42
42
|
]), v = P((l) => {
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
if (
|
|
43
|
+
b(l);
|
|
44
|
+
const N = h(D(l, c)), K = h(F);
|
|
45
|
+
if (N !== K) {
|
|
46
|
+
if (N === void 0) {
|
|
47
47
|
s(null);
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
s([
|
|
51
|
-
ue(S,
|
|
51
|
+
ue(S, N)
|
|
52
52
|
]);
|
|
53
53
|
}
|
|
54
54
|
}, [
|
|
55
55
|
s,
|
|
56
56
|
S,
|
|
57
57
|
c,
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
F,
|
|
59
|
+
b
|
|
60
60
|
]), U = i(e, n.Label), B = i(e, n.Input), k = i(e, n.Description), H = i(e, n.Error);
|
|
61
61
|
return /* @__PURE__ */ r.createElement(M, {
|
|
62
62
|
fieldId: t,
|
|
63
63
|
renderLabel: () => U,
|
|
64
64
|
renderInput: () => /* @__PURE__ */ r.createElement(w, {
|
|
65
|
-
"aria-labelledby": `${
|
|
66
|
-
value: a ?
|
|
65
|
+
"aria-labelledby": `${G} ${q}`,
|
|
66
|
+
value: a ? _ : "",
|
|
67
67
|
onChange: v,
|
|
68
68
|
isDisabled: u,
|
|
69
69
|
isReadOnly: m,
|
|
70
|
-
isRequired:
|
|
70
|
+
isRequired: I,
|
|
71
71
|
isInvalid: y,
|
|
72
72
|
onBlur: $,
|
|
73
73
|
onFocus: E
|
|
@@ -75,14 +75,14 @@ const n = ({ children: e }) => {
|
|
|
75
75
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, H, k)
|
|
76
76
|
});
|
|
77
77
|
}, f = ({ children: e, className: t }) => {
|
|
78
|
-
const { disabled: a, hasError: s } =
|
|
78
|
+
const { disabled: a, hasError: s } = L(), u = i(e, f.Currency), m = i(e, f.Value);
|
|
79
79
|
return /* @__PURE__ */ r.createElement(z, {
|
|
80
80
|
className: t,
|
|
81
81
|
isDisabled: a,
|
|
82
82
|
isInvalid: s
|
|
83
83
|
}, u, m);
|
|
84
84
|
}, me = ({ className: e }) => {
|
|
85
|
-
const { currency: t } = T(), { t: a } = W(), { prefixId: s } =
|
|
85
|
+
const { currency: t } = T(), { t: a } = W(), { prefixId: s } = R();
|
|
86
86
|
return t ? /* @__PURE__ */ r.createElement("span", {
|
|
87
87
|
id: s,
|
|
88
88
|
"aria-hidden": !1,
|
|
@@ -90,7 +90,7 @@ const n = ({ children: e }) => {
|
|
|
90
90
|
className: e
|
|
91
91
|
}, t.sign || t.code) : null;
|
|
92
92
|
}, pe = ({ className: e }) => {
|
|
93
|
-
const { id: t, placeholder: a, label: s } =
|
|
93
|
+
const { id: t, placeholder: a, label: s } = L(), { inputId: u, labelId: m, prefixId: I, ariaDescribedBy: y } = R(), o = Q(null);
|
|
94
94
|
return X(() => {
|
|
95
95
|
var E;
|
|
96
96
|
(E = o.current) == null || E.focus({
|
|
@@ -102,7 +102,7 @@ const n = ({ children: e }) => {
|
|
|
102
102
|
className: e,
|
|
103
103
|
placeholder: a,
|
|
104
104
|
"aria-label": s,
|
|
105
|
-
"aria-labelledby": `${m} ${
|
|
105
|
+
"aria-labelledby": `${m} ${I}`,
|
|
106
106
|
"aria-describedby": y,
|
|
107
107
|
inputMode: "decimal",
|
|
108
108
|
autoComplete: "off"
|
|
@@ -120,7 +120,7 @@ const de = "_inputGroup_vuy4u_1", fe = "_currency_vuy4u_14", x = {
|
|
|
120
120
|
}, Ee = ({ content: e, locale: t }) => /* @__PURE__ */ r.createElement(j, {
|
|
121
121
|
content: e,
|
|
122
122
|
locale: t
|
|
123
|
-
}),
|
|
123
|
+
}), be = () => {
|
|
124
124
|
const e = ie(x.inputGroup);
|
|
125
125
|
return /* @__PURE__ */ r.createElement(n, null, /* @__PURE__ */ r.createElement(n.Label, {
|
|
126
126
|
className: p(Y, d.label)
|
|
@@ -137,7 +137,7 @@ const de = "_inputGroup_vuy4u_1", fe = "_currency_vuy4u_14", x = {
|
|
|
137
137
|
}, /* @__PURE__ */ r.createElement(le, null), /* @__PURE__ */ r.createElement(n.Error.Text, null)), /* @__PURE__ */ r.createElement(n.Description, {
|
|
138
138
|
className: p(re, d.description)
|
|
139
139
|
}, Ee));
|
|
140
|
-
}, Pe = () => /* @__PURE__ */ r.createElement(
|
|
140
|
+
}, Pe = () => /* @__PURE__ */ r.createElement(be, null);
|
|
141
141
|
export {
|
|
142
142
|
Pe as PaymentInputRAC
|
|
143
143
|
};
|