@wix/form-elements 1.88.0 → 1.90.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-DG8GUJpn.js → appointment-rac-DtPa-JZ9.js} +6 -6
- package/dist/component/{bookings-address-rac-cNBSx-Pr.js → bookings-address-rac-4l8kqoLi.js} +1 -1
- package/dist/component/{bookings-email-rac-CYdSoVWP.js → bookings-email-rac-76vUcGtU.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CQB2o8ww.js → bookings-first-name-rac-IS7LUMxg.js} +1 -1
- package/dist/component/{bookings-header-rac-CzKvQond.js → bookings-header-rac-2wTzY64_.js} +1 -1
- package/dist/component/{bookings-last-name-rac-oK1BC5Am.js → bookings-last-name-rac-nxA75igv.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CZNEy748.js → bookings-login-bar-rac-CRi1nntD.js} +21 -21
- package/dist/component/{bookings-phone-rac-D_4WfolC.js → bookings-phone-rac-DZjvHly0.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CrEfeL4P.js → bookings-rich-text-rac-CYn1wwYQ.js} +1 -1
- package/dist/component/{checkbox-field-rac-CGqshW45.js → checkbox-field-rac-DAcFLQNT.js} +49 -49
- package/dist/component/{checkbox-group-field-headless-C3_5IR-E.js → checkbox-group-field-headless-BJmS0Ce5.js} +30 -30
- package/dist/component/{checkbox-group-field-rac-DIzdgyAw.js → checkbox-group-field-rac-CeFUt2Nr.js} +9 -9
- package/dist/component/{checkbox-group-rac-EvWVfusV.js → checkbox-group-rac-eDChVoVP.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-Bb3xB1ve.js → checkbox-indicator-module-classes-mJ7hl_8K.js} +1 -1
- package/dist/component/{checkbox-rac-CT_69Jei.js → checkbox-rac-DGmZdPnl.js} +1 -1
- package/dist/component/{contacts-address-rac-M8MZd777.js → contacts-address-rac-CGS83PMu.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BS-8HeRD.js → contacts-birthdate-rac-DkP-7tZ9.js} +1 -1
- package/dist/component/{contacts-company-rac-gmgKLvic.js → contacts-company-rac-D_KYvkYe.js} +1 -1
- package/dist/component/{contacts-email-rac-QQ6E9VzX.js → contacts-email-rac-4lGD56E8.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DR7XheRo.js → contacts-first-name-rac-C5L3U9QV.js} +1 -1
- package/dist/component/{contacts-last-name-rac-CBJgTkj5.js → contacts-last-name-rac-SL3FSAhE.js} +1 -1
- package/dist/component/{contacts-phone-rac-CTl25HdK.js → contacts-phone-rac-DkUwJ56_.js} +1 -1
- package/dist/component/{contacts-position-rac-DBDOW7QR.js → contacts-position-rac-CeKJ5oJh.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-C0-uJ7fU.js → contacts-subscribe-rac-Bjldz7ed.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-BtXc0V1S.js → contacts-tax-id-rac-D8QxyDiU.js} +1 -1
- package/dist/component/{date-availability-IQtwk-aX.js → date-availability-DdMI-zNj.js} +1 -1
- package/dist/component/{date-input-field-rac-2rbZiSgo.js → date-input-field-rac-Da6j7OP2.js} +99 -98
- package/dist/component/{date-input-rac-j4--xZ8s.js → date-input-rac-tlmhXr4A.js} +1 -1
- package/dist/component/{date-picker-field-rac-Cl7ueVVn.js → date-picker-field-rac-ClNfMoR1.js} +43 -43
- package/dist/component/{date-picker-rac-BrObkuYv.js → date-picker-rac-BV3TGjsx.js} +1 -1
- package/dist/component/date-time-input-field-rac-5eHyKry0.js +424 -0
- package/dist/component/{date-time-input-rac-BShquR72.js → date-time-input-rac-DQk2ylbE.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DNXYnHDM.js → dext-checkbox-group-rac-CBj9Y7Tp.js} +2 -2
- package/dist/component/{dext-checkbox-rac-RBMWmgyT.js → dext-checkbox-rac-C1KI5I2J.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Dph_kV11.js → dext-date-picker-rac-D-8Ss0bx.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-C3_gQkBT.js → dext-date-time-input-rac-CRnwLBSZ.js} +1 -1
- package/dist/component/{dext-dropdown-rac-D34vhtST.js → dext-dropdown-rac-BVTEMS0W.js} +1 -1
- package/dist/component/{dext-email-rac-Yzf4-vSg.js → dext-email-rac-CXeM4iQj.js} +1 -1
- package/dist/component/{dext-number-input-rac-D0jZXKaI.js → dext-number-input-rac-DMh08cy5.js} +1 -1
- package/dist/component/{dext-phone-rac-bqTpmTa0.js → dext-phone-rac-E1fFjkVW.js} +1 -1
- package/dist/component/{dext-radio-group-rac-AYPAzpqZ.js → dext-radio-group-rac-_BhRzFAr.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DOSq-xVQ.js → dext-rating-input-rac-BRYVQOYw.js} +1 -1
- package/dist/component/{dext-tags-rac-BXtFTlL0.js → dext-tags-rac-C4iwtRcw.js} +2 -2
- package/dist/component/{dext-text-area-rac-46wwBQg_.js → dext-text-area-rac-CQ1KAhkU.js} +1 -1
- package/dist/component/{dext-text-input-rac-DVj6V1VG.js → dext-text-input-rac-xCoKhEt3.js} +1 -1
- package/dist/component/{dext-url-input-rac-B5zu9R5K.js → dext-url-input-rac-DyoEEa_v.js} +1 -1
- package/dist/component/{donation-rac-DeBMssGg.js → donation-rac-CSDVxWUj.js} +51 -51
- package/dist/component/dropdown-field-headless-BXyP9KYi.js +101 -0
- package/dist/component/dropdown-field-rac-D1Z_Jbzd.js +36 -0
- package/dist/component/{dropdown-rac-bUNYh49x.js → dropdown-rac-BEi7CMKT.js} +1 -1
- package/dist/component/{ecom-address-rac-CtrERV3f.js → ecom-address-rac-DGl7rlwa.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BrpwOSYM.js → ecom-subscription-checkbox-rac-D5HzzRQk.js} +6 -6
- package/dist/component/{email-input-field-rac-4yYxYc1a.js → email-input-field-rac-DHAK2K8E.js} +63 -63
- package/dist/component/{events-repeater-rac-B308C1JK.js → events-repeater-rac-N1mGqD4R.js} +35 -35
- package/dist/component/{events-rsvp-rac-C4_LJ3Wz.js → events-rsvp-rac-Ds9PnqHG.js} +6 -6
- package/dist/component/{field-error-headless-PMBWtb3Z.js → field-error-headless-9MKScovg.js} +12 -12
- package/dist/component/{field-label-headless-0racVfdo.js → field-label-headless-BaoLrUWJ.js} +12 -12
- package/dist/component/field-rac.module-BUvPquav.js +26 -0
- package/dist/component/{file-upload-rac-CZIHV2OL.js → file-upload-rac-CNbLRxUz.js} +116 -116
- package/dist/component/{fixed-payment-rac-COhRKeun.js → fixed-payment-rac-BFnvUksR.js} +15 -15
- package/dist/component/{form-UCnayEKT.js → form-B3YjGh0T.js} +129 -128
- package/dist/component/{form-element-classes--p2vz_Bm.js → form-element-classes-CLZXu-91.js} +79 -69
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CpXa-NlC.js → header-field-rac-64pYqszP.js} +3 -3
- package/dist/component/{header-rac-CCsguMlZ.js → header-rac-BtPQVL59.js} +1 -1
- package/dist/component/{image-choice-rac-j2UH4Q4I.js → image-choice-rac-BsojUR1h.js} +20 -20
- package/dist/component/{index-Bxa3IDHm.js → index-CtiBRBqZ.js} +4 -4
- package/dist/component/{index-jg8dn8po.js → index-f2JBxCTd.js} +2 -2
- package/dist/component/{isObjectLike-Zw6J9g91.js → isObjectLike-BgqHLNgn.js} +1 -1
- package/dist/component/{multiline-address-field-rac-BeFAYL7V.js → multiline-address-field-rac-CH1hCUTf.js} +575 -574
- package/dist/component/{multiline-address-rac-BYr5_DQd.js → multiline-address-rac-CkOPWXfI.js} +1 -1
- package/dist/component/{number-input-field-rac-BNdJecUL.js → number-input-field-rac-B7U_08UK.js} +24 -24
- package/dist/component/{number-input-rac-Cqkj4JAF.js → number-input-rac-1jcchySg.js} +1 -1
- package/dist/component/{password-rac-D4iSs1ds.js → password-rac-CAaV8OrL.js} +21 -21
- package/dist/component/{payment-input-rac-BvBP47HP.js → payment-input-rac-B3Knhzrz.js} +25 -25
- package/dist/component/{phone-input-field-rac-Cggx8IlY.js → phone-input-field-rac-BGsvxtXz.js} +185 -184
- package/dist/component/{phone-rac-BISmYt_n.js → phone-rac-BUAW-44w.js} +1 -1
- package/dist/component/{product-list-rac-C1bm-U2G.js → product-list-rac-C7Nq3ZG4.js} +43 -43
- package/dist/component/quiz-radio-group-rac-CRa3I_NR.js +13 -0
- package/dist/component/{radio-button-module-classes-blfiatlc.js → radio-button-module-classes-BEvf741q.js} +7 -7
- package/dist/component/{radio-group-field-rac-BiiPUxbQ.js → radio-group-field-rac-BYTXrpnE.js} +5 -5
- package/dist/component/{radio-group-rac-Bn_W-3xz.js → radio-group-rac-138JrIhm.js} +1 -1
- package/dist/component/{rating-input-field-rac-CjXIoNMc.js → rating-input-field-rac-D5pOVdFJ.js} +24 -24
- package/dist/component/{rating-input-rac-Ci4uPo22.js → rating-input-rac-DuK1q9JB.js} +1 -1
- package/dist/component/{rich-content-rac.module-CDZniyrZ.js → rich-content-rac.module-H3hPgDtD.js} +4 -4
- package/dist/component/{rich-text-field-rac-BBRE9_Kr.js → rich-text-field-rac-Btwqm4wb.js} +5 -5
- package/dist/component/{rich-text-rac-C3MfJK-H.js → rich-text-rac-DIu8StCg.js} +1 -1
- package/dist/component/service-dropdown-rac-N8jqoUC_.js +146 -0
- package/dist/component/{services-multi-choice-rac-FDHRjDLS.js → services-multi-choice-rac-DlP0tB9d.js} +18 -18
- package/dist/component/{signature-rac-DfGPV0Mw.js → signature-rac-DuRzxIkO.js} +53 -53
- package/dist/component/{submit-button-rac-DRsqyJcl.js → submit-button-rac-DFmPp4jT.js} +7 -7
- package/dist/component/{tags-field-rac-CZ4FBGG9.js → tags-field-rac-DIgyn5P9.js} +56 -56
- package/dist/component/{tags-rac-CMHMsiwv.js → tags-rac-C6R6RHl2.js} +1 -1
- package/dist/component/text-area-field-rac-opBEx_8s.js +73 -0
- package/dist/component/{text-area-rac-BKGDa4E3.js → text-area-rac-D4iKhAqc.js} +1 -1
- package/dist/component/{text-input-field-rac-CU8eBRM4.js → text-input-field-rac-Ckp8Ierz.js} +6 -6
- package/dist/component/{text-input-headless-C1eFy2gl.js → text-input-headless-D-LXpqS3.js} +6 -6
- package/dist/component/{text-input-rac-DO0eI3ty.js → text-input-rac-ChxuJj-q.js} +1 -1
- package/dist/component/{time-input-rac-BJ0AL2Be.js → time-input-rac-C5_rEy7W.js} +23 -23
- package/dist/component/{url-input-field-rac-BtpAuKfp.js → url-input-field-rac-CBOnhquz.js} +22 -22
- package/dist/component/{url-input-rac-CjnPbcHt.js → url-input-rac-BY-BVg6r.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-C1iEE28P.js +28 -0
- package/dist/component/{use-element-state-class-name-X08kIFhd.js → use-element-state-class-name--YLulmsU.js} +1 -1
- package/dist/component/{use-service-options-base-DfHhMveM.js → use-service-options-base-BNLFmnHJ.js} +3 -3
- package/dist/component/{use-text-input-class-name-BAuokapo.js → use-text-input-class-name-3Xp-hNDT.js} +4 -4
- package/dist/form.d.ts +3 -0
- package/package.json +3 -3
- package/dist/component/date-time-input-field-rac-mqea6CtW.js +0 -423
- package/dist/component/dropdown-field-headless-ShcoDfPa.js +0 -84
- package/dist/component/dropdown-field-rac-DruF_YdZ.js +0 -32
- package/dist/component/field-rac.module-D06m9T9x.js +0 -24
- package/dist/component/quiz-radio-group-rac-BhNhoOSI.js +0 -13
- package/dist/component/service-dropdown-rac-DQkk3SlS.js +0 -142
- package/dist/component/text-area-field-rac-BnRuG5y8.js +0 -73
package/dist/component/{dext-radio-group-rac-AYPAzpqZ.js → dext-radio-group-rac-_BhRzFAr.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import r from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { R as p } from "./radio-group-field-rac-
|
|
2
|
+
import { ak as e, h as t } from "./form-B3YjGh0T.js";
|
|
3
|
+
import { R as p } from "./radio-group-field-rac-BYTXrpnE.js";
|
|
4
4
|
import { a } from "./default-limits-D7qVv_Hv.js";
|
|
5
5
|
const l = () => {
|
|
6
6
|
const o = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import r from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { T as s } from "./tags-field-rac-
|
|
2
|
+
import { ak as e, h as o } from "./form-B3YjGh0T.js";
|
|
3
|
+
import { T as s } from "./tags-field-rac-DIgyn5P9.js";
|
|
4
4
|
import { b as a } from "./default-limits-D7qVv_Hv.js";
|
|
5
5
|
const l = () => {
|
|
6
6
|
const t = {
|
|
@@ -3,21 +3,21 @@ import { RicosViewer as re } from "@wix/ricos/viewer";
|
|
|
3
3
|
import D from "classnames";
|
|
4
4
|
import { RadioGroup as se, RadioField as G, RadioButton as Y, TextField as ae, Group as le, Input as ie } from "react-aria-components";
|
|
5
5
|
import { debounce as ce } from "ts-debounce";
|
|
6
|
-
import { P as Q,
|
|
6
|
+
import { P as Q, ak as L, ah as B, au as ue, ac as A, am as me } from "./form-B3YjGh0T.js";
|
|
7
7
|
import { f, a as y } from "./find-child-C60k4CxG.js";
|
|
8
8
|
import { a as W } from "./format-currency-BwShJ9vM.js";
|
|
9
|
-
import { D as pe, E as de } from "./field-error-headless-
|
|
10
|
-
import { L as Ce } from "./field-label-headless-
|
|
9
|
+
import { D as pe, E as de } from "./field-error-headless-9MKScovg.js";
|
|
10
|
+
import { L as Ce } from "./field-label-headless-BaoLrUWJ.js";
|
|
11
11
|
import { N as Ie } from "./options-layout-constants-DEfIEJWD.js";
|
|
12
12
|
import { a as Ee, b as fe } from "./numeric-input-utils-CuBMi4-a.js";
|
|
13
13
|
import { g as Oe } from "./payment-field-utils-DobiK5Xh.js";
|
|
14
14
|
import { u as he } from "./use-synced-display-value-DcAxdn3M.js";
|
|
15
15
|
import { E as _e } from "./error-icon-hZxQ6DEy.js";
|
|
16
|
-
import { s as
|
|
17
|
-
import {
|
|
18
|
-
import { o as
|
|
19
|
-
import { u as
|
|
20
|
-
import { u as ve } from "./use-text-input-class-name-
|
|
16
|
+
import { s as R } from "./field-rac.module-BUvPquav.js";
|
|
17
|
+
import { B as be, R as ye, j as Ne, q as ge, i as Fe, k as De } from "./form-element-classes-CLZXu-91.js";
|
|
18
|
+
import { o as Re } from "./options-rac.module-KM-VT_KY.js";
|
|
19
|
+
import { u as Se } from "./use-element-state-class-name--YLulmsU.js";
|
|
20
|
+
import { u as ve } from "./use-text-input-class-name-3Xp-hNDT.js";
|
|
21
21
|
function Le(e, t) {
|
|
22
22
|
return e.reduce((o, r) => (o[r[t]] = r, o), {});
|
|
23
23
|
}
|
|
@@ -25,7 +25,7 @@ function Ae(e) {
|
|
|
25
25
|
return Le(e, "id");
|
|
26
26
|
}
|
|
27
27
|
const je = 0.01;
|
|
28
|
-
function
|
|
28
|
+
function Te(e) {
|
|
29
29
|
var t;
|
|
30
30
|
return ((t = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : t.price) || "0";
|
|
31
31
|
}
|
|
@@ -37,40 +37,40 @@ function z(e, t) {
|
|
|
37
37
|
quantity: 1
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function Me(e) {
|
|
41
41
|
return e.find((t) => t.priceType === Q.DYNAMIC_PRICE);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function Pe(e, t) {
|
|
44
44
|
return (e == null ? void 0 : e.productId) === (t == null ? void 0 : t.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
|
|
45
45
|
}
|
|
46
46
|
function xe(e, t, o) {
|
|
47
47
|
const r = (t == null ? void 0 : t.productId) === e ? void 0 : e, a = r ? o[r] : void 0;
|
|
48
48
|
return a ? [
|
|
49
|
-
z(a,
|
|
49
|
+
z(a, Te(a))
|
|
50
50
|
] : [];
|
|
51
51
|
}
|
|
52
52
|
const s = ({ children: e }) => {
|
|
53
53
|
const { id: t, value: o, onChange: r, disabled: a, required: m, onBlur: p, onFocus: h, validation: c, addOther: u, addOtherPlaceholder: i, FieldLayout: C, hasError: O } = L(), { labelId: _ } = B(), { t: I } = ue(), { currency: j, regionalFormat: N } = A(), d = o == null ? void 0 : o[0], g = x(() => {
|
|
54
|
-
var E,
|
|
55
|
-
return ((
|
|
54
|
+
var E, P;
|
|
55
|
+
return ((P = (E = c == null ? void 0 : c.predefined) == null ? void 0 : E.paymentOptions) == null ? void 0 : P.products) || [];
|
|
56
56
|
}, [
|
|
57
57
|
c
|
|
58
|
-
]),
|
|
58
|
+
]), T = x(() => Ae(g), [
|
|
59
59
|
g
|
|
60
|
-
]), l = x(() => u ?
|
|
60
|
+
]), l = x(() => u ? Me(g) : void 0, [
|
|
61
61
|
g,
|
|
62
62
|
u
|
|
63
|
-
]), J =
|
|
63
|
+
]), J = Pe(d, l), [q, M] = he({
|
|
64
64
|
sourceValue: J,
|
|
65
65
|
format: (E) => fe(String(E ?? ""), N),
|
|
66
66
|
regionalFormat: N
|
|
67
|
-
}),
|
|
68
|
-
r(xe(E, d,
|
|
67
|
+
}), k = F((E) => {
|
|
68
|
+
r(xe(E, d, T)), M("");
|
|
69
69
|
}, [
|
|
70
70
|
r,
|
|
71
|
-
|
|
71
|
+
T,
|
|
72
72
|
d,
|
|
73
|
-
|
|
73
|
+
M
|
|
74
74
|
]), H = F((E) => {
|
|
75
75
|
l && r(typeof E == "number" ? [
|
|
76
76
|
z(l, String(E))
|
|
@@ -82,8 +82,8 @@ const s = ({ children: e }) => {
|
|
|
82
82
|
H
|
|
83
83
|
]), K = F((E) => {
|
|
84
84
|
(d == null ? void 0 : d.productId) !== (l == null ? void 0 : l.id) && r(void 0);
|
|
85
|
-
const { validInput:
|
|
86
|
-
|
|
85
|
+
const { validInput: P, validNumber: ne } = Ee(E.target.value, je, q, N);
|
|
86
|
+
M(P), $(ne);
|
|
87
87
|
}, [
|
|
88
88
|
N,
|
|
89
89
|
r,
|
|
@@ -91,28 +91,28 @@ const s = ({ children: e }) => {
|
|
|
91
91
|
l,
|
|
92
92
|
q,
|
|
93
93
|
$,
|
|
94
|
-
|
|
95
|
-
]),
|
|
96
|
-
l != null && l.id &&
|
|
94
|
+
M
|
|
95
|
+
]), w = (d == null ? void 0 : d.productId) || null, X = F(() => {
|
|
96
|
+
l != null && l.id && w !== l.id && k(l.id);
|
|
97
97
|
}, [
|
|
98
98
|
l == null ? void 0 : l.id,
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
w,
|
|
100
|
+
k
|
|
101
101
|
]), Z = f(e, s.Label), V = f(e, s.Control), ee = f(e, s.Description), te = f(e, s.Error);
|
|
102
102
|
return /* @__PURE__ */ n.createElement(C, {
|
|
103
103
|
fieldId: t,
|
|
104
104
|
renderLabel: () => Z,
|
|
105
105
|
renderInput: () => /* @__PURE__ */ n.createElement(se, {
|
|
106
106
|
"aria-labelledby": _,
|
|
107
|
-
value:
|
|
108
|
-
onChange:
|
|
107
|
+
value: w,
|
|
108
|
+
onChange: k,
|
|
109
109
|
isDisabled: a,
|
|
110
110
|
isInvalid: O,
|
|
111
111
|
isRequired: m,
|
|
112
112
|
onBlur: p,
|
|
113
113
|
onFocus: h
|
|
114
114
|
}, V ? y(V, {
|
|
115
|
-
productsById:
|
|
115
|
+
productsById: T,
|
|
116
116
|
addOther: u,
|
|
117
117
|
customAmount: q,
|
|
118
118
|
onCustomAmountInputChange: K,
|
|
@@ -155,8 +155,8 @@ const s = ({ children: e }) => {
|
|
|
155
155
|
customAmountProductId: i,
|
|
156
156
|
onFocusCustomInput: C
|
|
157
157
|
}) : null);
|
|
158
|
-
},
|
|
159
|
-
const { productsById: r } = o, { options: a, numberOfColumns: m } = L(), { isMobile: p } = A(), h = f(e,
|
|
158
|
+
}, U = ({ children: e, className: t, ...o }) => {
|
|
159
|
+
const { productsById: r } = o, { options: a, numberOfColumns: m } = L(), { isMobile: p } = A(), h = f(e, U.Option), c = p ? Ie.ONE : m;
|
|
160
160
|
return /* @__PURE__ */ n.createElement("div", {
|
|
161
161
|
className: t,
|
|
162
162
|
"data-columns": c
|
|
@@ -169,8 +169,8 @@ const s = ({ children: e }) => {
|
|
|
169
169
|
price: C || "0"
|
|
170
170
|
});
|
|
171
171
|
}));
|
|
172
|
-
},
|
|
173
|
-
const { value: r, price: a } = o, { id: m } = L(), { currency: p, regionalFormat: h } = A(), c = f(e,
|
|
172
|
+
}, S = ({ children: e, className: t, ...o }) => {
|
|
173
|
+
const { value: r, price: a } = o, { id: m } = L(), { currency: p, regionalFormat: h } = A(), c = f(e, S.Value), u = f(e, S.Currency), { isCurrencyPrefixed: i } = W({
|
|
174
174
|
amount: a,
|
|
175
175
|
currency: p == null ? void 0 : p.code,
|
|
176
176
|
locale: h
|
|
@@ -197,14 +197,14 @@ const s = ({ children: e }) => {
|
|
|
197
197
|
return /* @__PURE__ */ n.createElement("span", {
|
|
198
198
|
className: e
|
|
199
199
|
}, m);
|
|
200
|
-
},
|
|
200
|
+
}, ke = ({ className: e }) => {
|
|
201
201
|
const { currency: t } = A();
|
|
202
202
|
return /* @__PURE__ */ n.createElement("span", {
|
|
203
203
|
className: e
|
|
204
204
|
}, (t == null ? void 0 : t.sign) || (t == null ? void 0 : t.code) || "");
|
|
205
205
|
};
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
S.Value = qe;
|
|
207
|
+
S.Currency = ke;
|
|
208
208
|
const v = ({ children: e, className: t, ...o }) => {
|
|
209
209
|
const { customAmount: r, onCustomAmountInputChange: a, currency: m, t: p, placeholder: h, customAmountProductId: c, onFocusCustomInput: u } = o, { disabled: i, hasError: C } = L(), { labelId: O, prefixId: _ } = B(), I = f(e, v.Currency), j = f(e, v.Value), N = F((g) => {
|
|
210
210
|
a({
|
|
@@ -237,7 +237,7 @@ const v = ({ children: e, className: t, ...o }) => {
|
|
|
237
237
|
placeholder: h,
|
|
238
238
|
customAmountProductId: c
|
|
239
239
|
}) : null));
|
|
240
|
-
},
|
|
240
|
+
}, we = ({ className: e, ...t }) => {
|
|
241
241
|
const { currency: o, t: r } = t, { prefixId: a } = B();
|
|
242
242
|
return /* @__PURE__ */ n.createElement("span", {
|
|
243
243
|
id: a,
|
|
@@ -245,7 +245,7 @@ const v = ({ children: e, className: t, ...o }) => {
|
|
|
245
245
|
"aria-label": Oe(r, o),
|
|
246
246
|
className: e
|
|
247
247
|
}, (o == null ? void 0 : o.sign) || (o == null ? void 0 : o.code) || "");
|
|
248
|
-
},
|
|
248
|
+
}, Ue = ({ className: e, ...t }) => {
|
|
249
249
|
const { placeholder: o, customAmountProductId: r } = t, { ariaDescribedBy: a, labelId: m, prefixId: p } = B();
|
|
250
250
|
return /* @__PURE__ */ n.createElement(ie, {
|
|
251
251
|
id: r,
|
|
@@ -257,12 +257,12 @@ const v = ({ children: e, className: t, ...o }) => {
|
|
|
257
257
|
className: e
|
|
258
258
|
});
|
|
259
259
|
};
|
|
260
|
-
v.Currency =
|
|
261
|
-
v.Value =
|
|
262
|
-
|
|
260
|
+
v.Currency = we;
|
|
261
|
+
v.Value = Ue;
|
|
262
|
+
U.Option = S;
|
|
263
263
|
s.Label = Ce;
|
|
264
264
|
s.Control = Be;
|
|
265
|
-
s.Options =
|
|
265
|
+
s.Options = U;
|
|
266
266
|
s.OtherInput = v;
|
|
267
267
|
s.Description = pe;
|
|
268
268
|
s.Error = de;
|
|
@@ -283,18 +283,18 @@ const He = "_control_1jl2j_1", $e = "_options_1jl2j_7", Ve = "_option_1jl2j_7",
|
|
|
283
283
|
selected: b.optionSelected,
|
|
284
284
|
hover: b.optionHover
|
|
285
285
|
}, Xe = () => {
|
|
286
|
-
const e = ve(b.otherInput), t =
|
|
286
|
+
const e = ve(b.otherInput), t = Se({
|
|
287
287
|
globalClasses: De,
|
|
288
288
|
moduleClasses: Ke
|
|
289
289
|
});
|
|
290
290
|
return /* @__PURE__ */ n.createElement(s, null, /* @__PURE__ */ n.createElement(s.Label, {
|
|
291
|
-
className: D(be,
|
|
291
|
+
className: D(be, R.label)
|
|
292
292
|
}, /* @__PURE__ */ n.createElement(s.Label.Required, {
|
|
293
|
-
className: D(ye,
|
|
293
|
+
className: D(ye, R.requiredMark)
|
|
294
294
|
})), /* @__PURE__ */ n.createElement(s.Control, {
|
|
295
295
|
className: b.control
|
|
296
296
|
}, /* @__PURE__ */ n.createElement(s.Options, {
|
|
297
|
-
className: D(Ne,
|
|
297
|
+
className: D(Ne, Re.options, b.options)
|
|
298
298
|
}, /* @__PURE__ */ n.createElement(s.Options.Option, {
|
|
299
299
|
className: ({ isSelected: o, isHovered: r }) => t({
|
|
300
300
|
isSelected: o,
|
|
@@ -307,11 +307,11 @@ const He = "_control_1jl2j_1", $e = "_options_1jl2j_7", Ve = "_option_1jl2j_7",
|
|
|
307
307
|
}, /* @__PURE__ */ n.createElement(s.OtherInput.Currency, {
|
|
308
308
|
className: b.otherInputCurrency
|
|
309
309
|
}), /* @__PURE__ */ n.createElement(s.OtherInput.Value, {
|
|
310
|
-
className:
|
|
310
|
+
className: R.innerInput
|
|
311
311
|
}))), /* @__PURE__ */ n.createElement(s.Error, {
|
|
312
|
-
className: D(ge,
|
|
312
|
+
className: D(ge, R.error)
|
|
313
313
|
}, /* @__PURE__ */ n.createElement(_e, null), /* @__PURE__ */ n.createElement(s.Error.Text, null)), /* @__PURE__ */ n.createElement(s.Description, {
|
|
314
|
-
className: D(Fe,
|
|
314
|
+
className: D(Fe, R.description)
|
|
315
315
|
}, Je));
|
|
316
316
|
}, ht = () => /* @__PURE__ */ n.createElement(Xe, null);
|
|
317
317
|
export {
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import o, { useContext as q, useMemo as A, useState as b, useCallback as D, useRef as M } from "react";
|
|
2
|
+
import { UNSAFE_PortalProvider as Y } from "react-aria";
|
|
3
|
+
import { Select as U, SelectValue as X, ListBox as j, ListBoxItem as z } from "react-aria-components";
|
|
4
|
+
import { ae as G, l as H, F as E, ak as f, ah as g, am as J } from "./form-B3YjGh0T.js";
|
|
5
|
+
import { f as u, a as y } from "./find-child-C60k4CxG.js";
|
|
6
|
+
import { D as K, E as Q } from "./field-error-headless-9MKScovg.js";
|
|
7
|
+
import { L as Z } from "./field-label-headless-BaoLrUWJ.js";
|
|
8
|
+
import { S as $, N as ee } from "./non-modal-popover-DtIMXHbe.js";
|
|
9
|
+
const ne = [
|
|
10
|
+
E.DROPDOWN,
|
|
11
|
+
E.DEXT_DROPDOWN,
|
|
12
|
+
E.SERVICES_DROPDOWN
|
|
13
|
+
], te = ({ fieldType: e, properties: n }) => ne.includes(e) && !n.hidden && !n.disabled && !n.readOnly, oe = (e, n) => e.layout.row - n.layout.row || e.layout.column - n.layout.column, re = (e) => {
|
|
14
|
+
var i;
|
|
15
|
+
const n = ((i = G().dropdown) == null ? void 0 : i.open) === !0, t = q(H), a = A(() => {
|
|
16
|
+
var r;
|
|
17
|
+
return t && !t.parentId ? (r = t.fields.filter(te).sort(oe)[0]) == null ? void 0 : r.id : void 0;
|
|
18
|
+
}, [
|
|
19
|
+
t
|
|
20
|
+
]);
|
|
21
|
+
return n && a === e;
|
|
22
|
+
}, l = ({ children: e }) => {
|
|
23
|
+
const { id: n, value: t, defaultValue: a, options: i = [], readOnly: r, onChange: s, placeholder: m, disabled: c, required: F, onBlur: I, onFocus: P, FieldLayout: v, hasError: C } = f(), [L, S] = b(!1), p = re(n), [h, N] = b(null), w = t && i.some((d) => (d.value ?? d.label) === t) ? t : a || null, { labelId: R } = g(), T = D((d) => {
|
|
24
|
+
r || s(typeof d == "string" ? d : null);
|
|
25
|
+
}, [
|
|
26
|
+
s,
|
|
27
|
+
r
|
|
28
|
+
]), V = D((d) => S(d && !c && !r), [
|
|
29
|
+
c,
|
|
30
|
+
r
|
|
31
|
+
]), x = u(e, l.Label), B = u(e, l.Trigger), _ = u(e, l.Options), W = u(e, l.Description), k = u(e, l.Error);
|
|
32
|
+
return /* @__PURE__ */ o.createElement(v, {
|
|
33
|
+
fieldId: n,
|
|
34
|
+
renderLabel: () => x,
|
|
35
|
+
renderInput: () => /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("div", {
|
|
36
|
+
ref: N,
|
|
37
|
+
style: {
|
|
38
|
+
display: "contents"
|
|
39
|
+
}
|
|
40
|
+
}), /* @__PURE__ */ o.createElement(Y, {
|
|
41
|
+
getContainer: () => h
|
|
42
|
+
}, /* @__PURE__ */ o.createElement(U, {
|
|
43
|
+
"aria-labelledby": R,
|
|
44
|
+
value: w,
|
|
45
|
+
isOpen: p || L && !c && !r,
|
|
46
|
+
onOpenChange: p ? void 0 : V,
|
|
47
|
+
onChange: T,
|
|
48
|
+
isDisabled: c,
|
|
49
|
+
isInvalid: C,
|
|
50
|
+
isRequired: F,
|
|
51
|
+
placeholder: m,
|
|
52
|
+
onBlur: I,
|
|
53
|
+
onFocus: P
|
|
54
|
+
}, B, y(_, {
|
|
55
|
+
isForcedOpen: p
|
|
56
|
+
})))),
|
|
57
|
+
renderDescription: () => /* @__PURE__ */ o.createElement(o.Fragment, null, k, W)
|
|
58
|
+
});
|
|
59
|
+
}, ae = ({ children: e, className: n }) => {
|
|
60
|
+
const { inputId: t, ariaDescribedBy: a } = g(), { id: i, hasError: r, isLoading: s } = f(), m = M(null);
|
|
61
|
+
return J(() => {
|
|
62
|
+
var c;
|
|
63
|
+
(c = m.current) == null || c.focus();
|
|
64
|
+
}, i), /* @__PURE__ */ o.createElement($, {
|
|
65
|
+
ref: m,
|
|
66
|
+
id: t,
|
|
67
|
+
"aria-describedby": a,
|
|
68
|
+
className: n,
|
|
69
|
+
"data-invalid": r || void 0,
|
|
70
|
+
"data-loading": s || void 0
|
|
71
|
+
}, /* @__PURE__ */ o.createElement(X, null), e);
|
|
72
|
+
}, O = ({ children: e, className: n, ...t }) => {
|
|
73
|
+
const { isForcedOpen: a } = t, { options: i = [] } = f(), r = u(e, O.Option);
|
|
74
|
+
return /* @__PURE__ */ o.createElement(ee, {
|
|
75
|
+
className: n,
|
|
76
|
+
containerPadding: 0,
|
|
77
|
+
offset: 0
|
|
78
|
+
}, /* @__PURE__ */ o.createElement(j, {
|
|
79
|
+
autoFocus: a ? !1 : void 0
|
|
80
|
+
}, i.map((s) => y(r, {
|
|
81
|
+
key: s.value ?? s.label,
|
|
82
|
+
value: s.value ?? s.label,
|
|
83
|
+
label: s.label
|
|
84
|
+
}))));
|
|
85
|
+
}, se = ({ className: e, ...n }) => {
|
|
86
|
+
const { value: t, label: a } = n;
|
|
87
|
+
return /* @__PURE__ */ o.createElement(z, {
|
|
88
|
+
className: e,
|
|
89
|
+
id: t,
|
|
90
|
+
textValue: a
|
|
91
|
+
}, a);
|
|
92
|
+
};
|
|
93
|
+
O.Option = se;
|
|
94
|
+
l.Label = Z;
|
|
95
|
+
l.Trigger = ae;
|
|
96
|
+
l.Options = O;
|
|
97
|
+
l.Description = K;
|
|
98
|
+
l.Error = Q;
|
|
99
|
+
export {
|
|
100
|
+
l as D
|
|
101
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
|
+
import t from "classnames";
|
|
3
|
+
import e from "react";
|
|
4
|
+
import { D as r } from "./dropdown-field-headless-BXyP9KYi.js";
|
|
5
|
+
import { C as n } from "./chevron-down-icon-CcpVm6B-.js";
|
|
6
|
+
import { E as l } from "./error-icon-hZxQ6DEy.js";
|
|
7
|
+
import { H as c } from "./custom-focus-class-_483Pkwp.js";
|
|
8
|
+
import { s as o } from "./field-rac.module-BUvPquav.js";
|
|
9
|
+
import { B as i, R as E, m as p, D as _, q as R, i as D } from "./form-element-classes-CLZXu-91.js";
|
|
10
|
+
import { u as O } from "./use-dropdown-option-class-name-C1iEE28P.js";
|
|
11
|
+
const S = ({ content: a, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
12
|
+
content: a,
|
|
13
|
+
locale: s
|
|
14
|
+
}), M = () => {
|
|
15
|
+
const a = O(c);
|
|
16
|
+
return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
17
|
+
className: t(i, o.label)
|
|
18
|
+
}, /* @__PURE__ */ e.createElement(r.Label.Required, {
|
|
19
|
+
className: t(E, o.requiredMark)
|
|
20
|
+
})), /* @__PURE__ */ e.createElement(r.Trigger, {
|
|
21
|
+
className: t(p, o.input, o.dropdownTrigger)
|
|
22
|
+
}, /* @__PURE__ */ e.createElement(n, {
|
|
23
|
+
className: o.dropdownIcon
|
|
24
|
+
})), /* @__PURE__ */ e.createElement(r.Options, {
|
|
25
|
+
className: t(_, o.selectPopover, o.dropdownPopover)
|
|
26
|
+
}, /* @__PURE__ */ e.createElement(r.Options.Option, {
|
|
27
|
+
className: a
|
|
28
|
+
})), /* @__PURE__ */ e.createElement(r.Error, {
|
|
29
|
+
className: t(R, o.error)
|
|
30
|
+
}, /* @__PURE__ */ e.createElement(l, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
31
|
+
className: t(D, o.description)
|
|
32
|
+
}, S));
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
M as D
|
|
36
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o, { useMemo as a } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { C } from "./checkbox-field-rac-
|
|
4
|
-
import {
|
|
2
|
+
import { ak as n, au as c, h as i } from "./form-B3YjGh0T.js";
|
|
3
|
+
import { C } from "./checkbox-field-rac-DAcFLQNT.js";
|
|
4
|
+
import { o as p, p as l, n as m } from "./form-element-classes-CLZXu-91.js";
|
|
5
5
|
const _ = (e) => ({
|
|
6
6
|
nodes: [
|
|
7
7
|
{
|
|
@@ -38,9 +38,9 @@ const _ = (e) => ({
|
|
|
38
38
|
}
|
|
39
39
|
}, /* @__PURE__ */ o.createElement(C, {
|
|
40
40
|
classes: {
|
|
41
|
-
container:
|
|
42
|
-
label:
|
|
43
|
-
indicator:
|
|
41
|
+
container: m,
|
|
42
|
+
label: l,
|
|
43
|
+
indicator: p
|
|
44
44
|
}
|
|
45
45
|
}));
|
|
46
46
|
};
|