@wix/form-elements 1.64.0 → 1.65.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-DojiZqx9.js → appointment-rac-0kUk8XQJ.js} +35 -35
- package/dist/component/{bookings-address-rac-Bm_lQchD.js → bookings-address-rac-BUM0wpw0.js} +1 -1
- package/dist/component/{bookings-email-rac-vwuy0kW8.js → bookings-email-rac-BHlvupVS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-BbWuLoeg.js → bookings-first-name-rac-Bwn6xv1U.js} +1 -1
- package/dist/component/{bookings-header-rac-DVknNH29.js → bookings-header-rac-BkRvQMi4.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BnT3Cq0b.js → bookings-last-name-rac-DRTj4VdX.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DKi-VAXc.js → bookings-login-bar-rac-D-2Bt7Kx.js} +2 -2
- package/dist/component/{bookings-phone-rac-Bfy8rheB.js → bookings-phone-rac-CTcHHpDr.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DGiBDcXw.js → bookings-rich-text-rac-n-w9iWII.js} +1 -1
- package/dist/component/{checkbox-field-rac-CYADRY54.js → checkbox-field-rac-BamOJv3P.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-BDAFpX5F.js → checkbox-group-field-headless-BmKJbEi0.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-2YUsOmDI.js → checkbox-group-field-rac-CC8qfj0Y.js} +6 -6
- package/dist/component/{checkbox-group-rac-CQf1C9H5.js → checkbox-group-rac-CsrP7zD5.js} +1 -1
- package/dist/component/{checkbox-rac-Bjv8jZjs.js → checkbox-rac-X6E-fJ8k.js} +1 -1
- package/dist/component/{contacts-address-rac-BBTiEec9.js → contacts-address-rac-oYnkIZ6m.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-XReeFHVW.js → contacts-birthdate-rac-B7p8LgYA.js} +1 -1
- package/dist/component/{contacts-company-rac-B-fUQszu.js → contacts-company-rac-cjLRO5J-.js} +1 -1
- package/dist/component/{contacts-email-rac-DBtcCcsV.js → contacts-email-rac-BlJJSkGK.js} +1 -1
- package/dist/component/{contacts-first-name-rac-mkwU3706.js → contacts-first-name-rac-Nl-MDndn.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DY5N-AZx.js → contacts-last-name-rac-DhxAobRI.js} +1 -1
- package/dist/component/{contacts-phone-rac-Ce1rMz_z.js → contacts-phone-rac-CZLWlH0T.js} +1 -1
- package/dist/component/{contacts-position-rac-B65H8PDu.js → contacts-position-rac-DlKC0lCU.js} +1 -1
- package/dist/component/contacts-subscribe-rac-POSKh1Ta.js +13 -0
- package/dist/component/{contacts-tax-id-rac-Jtt0ySK2.js → contacts-tax-id-rac-uyBKxOJn.js} +1 -1
- package/dist/component/{date-availability-B8UwvTJa.js → date-availability-DnFJD1aS.js} +1 -1
- package/dist/component/{date-input-field-rac-RL2a0xoD.js → date-input-field-rac-DojzGm-i.js} +30 -30
- package/dist/component/{date-input-rac-ak3G7V07.js → date-input-rac-BaPKcAuU.js} +1 -1
- package/dist/component/{date-picker-field-rac-SL_Roltf.js → date-picker-field-rac-C1rzJMV8.js} +16 -16
- package/dist/component/{date-picker-rac-ByrM0YIX.js → date-picker-rac-BHsOfkYn.js} +1 -1
- package/dist/component/{date-time-input-field-rac-DOE7xcKi.js → date-time-input-field-rac-B4jAAxU8.js} +15 -15
- package/dist/component/{date-time-input-rac-BA-GyrAc.js → date-time-input-rac-XyL5z_ma.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-EwUnBO80.js → dext-checkbox-group-rac-DzpdOP3i.js} +2 -2
- package/dist/component/{dext-checkbox-rac-CIRKi4B5.js → dext-checkbox-rac-BUWkvW5s.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BYO_Q1zM.js → dext-date-picker-rac-CR0PUoOn.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BOahPeaH.js → dext-date-time-input-rac-D3WhLSKK.js} +1 -1
- package/dist/component/{dext-dropdown-rac-sTD_r-0H.js → dext-dropdown-rac-BJ1UfAIM.js} +1 -1
- package/dist/component/{dext-email-rac-e-2_h3he.js → dext-email-rac-xk_5C79-.js} +1 -1
- package/dist/component/{dext-number-input-rac-D6LACzWl.js → dext-number-input-rac-Cu1Sqoac.js} +1 -1
- package/dist/component/{dext-phone-rac-kUycy5Od.js → dext-phone-rac-S34qxXwg.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DPD2UkrV.js → dext-radio-group-rac-DXnAk_eU.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DUsnrl9W.js → dext-rating-input-rac-ewGpgB63.js} +1 -1
- package/dist/component/{dext-tags-rac-D6z69HuO.js → dext-tags-rac-BApZKGqP.js} +2 -2
- package/dist/component/{dext-text-area-rac-C-DVtFJ1.js → dext-text-area-rac-DBtuaiwM.js} +1 -1
- package/dist/component/{dext-text-input-rac-CIa2MdC6.js → dext-text-input-rac-qI8VECmA.js} +1 -1
- package/dist/component/{dext-url-input-rac-8rVVW5us.js → dext-url-input-rac-C6vzqNjn.js} +1 -1
- package/dist/component/donation-rac-BDVKvG4j.js +302 -0
- package/dist/component/{dropdown-field-headless-DReo519l.js → dropdown-field-headless-DBl8vGed.js} +3 -3
- package/dist/component/{dropdown-field-rac-DzrjA2O6.js → dropdown-field-rac-O6G7_kSn.js} +7 -7
- package/dist/component/{dropdown-rac-CS7oLTp_.js → dropdown-rac-BImZ5Jwe.js} +1 -1
- package/dist/component/{ecom-address-rac-EIb88J_6.js → ecom-address-rac-BU4XZ_Do.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CE0Ks6qS.js → ecom-subscription-checkbox-rac-DLzpoNYm.js} +5 -5
- package/dist/component/{email-input-field-rac-BScZxYHw.js → email-input-field-rac-Ui0p35z5.js} +59 -59
- package/dist/component/{events-repeater-rac-Y0rH2Jli.js → events-repeater-rac-bPKOOOit.js} +8 -8
- package/dist/component/{events-rsvp-rac-BiAYVv_b.js → events-rsvp-rac-lsRBBfPQ.js} +12 -12
- package/dist/component/{field-error-headless-DrnFrGun.js → field-error-headless-D6iejMQP.js} +1 -1
- package/dist/component/{field-label-headless-BIYf1BIh.js → field-label-headless-BWLfU3YB.js} +1 -1
- package/dist/component/field-rac.module-DnUIb9Oh.js +21 -0
- package/dist/component/{file-upload-rac-br--tZLp.js → file-upload-rac-DqKL8QQZ.js} +87 -87
- package/dist/component/{fixed-payment-rac-XEtrsaMy.js → fixed-payment-rac-BDtRB8w2.js} +9 -9
- package/dist/component/{form-9yjqDnxY.js → form-CtWkUmxc.js} +69 -69
- package/dist/component/form-element-classes-BSMjWijd.js +63 -0
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CLELgzqY.js → header-field-rac-BLM8RCDY.js} +3 -3
- package/dist/component/{header-rac-D8KGkVVp.js → header-rac-DViRwafg.js} +1 -1
- package/dist/component/image-choice-rac-D76t2y-b.js +141 -0
- package/dist/component/{index-PHkE0Ru4.js → index--iRBHLXJ.js} +4 -4
- package/dist/component/{index-C4y71e1i.js → index-pEItT2oo.js} +2 -2
- package/dist/component/{isObjectLike-srCDplej.js → isObjectLike-968AHV2b.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CsBLI9y-.js → multiline-address-field-rac-CObOc8KE.js} +98 -98
- package/dist/component/{multiline-address-rac-DFDPFfXh.js → multiline-address-rac-1qVZkN41.js} +1 -1
- package/dist/component/{number-input-field-rac-DZRR7gdt.js → number-input-field-rac-CPQ3u0N7.js} +20 -20
- package/dist/component/{number-input-rac-BCS5lkff.js → number-input-rac-Bq1UyUPZ.js} +1 -1
- package/dist/component/{password-rac-ClDGgR3E.js → password-rac-BZPK1VkN.js} +9 -9
- package/dist/component/{payment-input-rac-COydWmUE.js → payment-input-rac-CQrV0WmN.js} +11 -11
- package/dist/component/{phone-input-field-rac-DYCibqe1.js → phone-input-field-rac-DzUE1-RF.js} +56 -56
- package/dist/component/{phone-rac-BS-dmWkJ.js → phone-rac-BovOZ7V5.js} +1 -1
- package/dist/component/{product-list-rac-hxOhaA-r.js → product-list-rac-CeGm1_WN.js} +22 -22
- package/dist/component/quiz-radio-group-rac-Lw2thQqC.js +13 -0
- package/dist/component/{radio-group-field-rac-DKqWnMBJ.js → radio-group-field-rac-BSVmjEgZ.js} +8 -8
- package/dist/component/{radio-group-field-rac.module-BwUynK_5.js → radio-group-field-rac.module-Cb3mm0f2.js} +3 -3
- package/dist/component/{radio-group-rac-DHURQZKK.js → radio-group-rac-BHhOCSQ2.js} +1 -1
- package/dist/component/{rating-input-field-rac-CZRdSVrf.js → rating-input-field-rac-BvbBZZDO.js} +21 -21
- package/dist/component/{rating-input-rac-BaH52DYm.js → rating-input-rac-DDe1EBpt.js} +1 -1
- package/dist/component/{rich-content-rac.module-ILBfxEmN.js → rich-content-rac.module-BacYkzEv.js} +1 -1
- package/dist/component/{rich-text-field-rac-B58q8Is7.js → rich-text-field-rac-D1W0mUjr.js} +5 -5
- package/dist/component/{rich-text-rac-DGbZh1eX.js → rich-text-rac-B-cOn0RU.js} +1 -1
- package/dist/component/{service-dropdown-rac-DUiNIbdv.js → service-dropdown-rac-CebfMkGP.js} +22 -22
- package/dist/component/{services-multi-choice-rac-B7y9s2l8.js → services-multi-choice-rac-C4bF1xhB.js} +29 -29
- package/dist/component/{signature-rac-CydpvQJZ.js → signature-rac-DWWT65Ez.js} +46 -46
- package/dist/component/{submit-button-rac-OO53h4H8.js → submit-button-rac-_mgn4ChE.js} +2 -2
- package/dist/component/{tags-field-rac-eX3d3JEH.js → tags-field-rac-7coCWj0y.js} +59 -59
- package/dist/component/{tags-rac-CdIB_48Z.js → tags-rac-rgsn8Os0.js} +1 -1
- package/dist/component/{text-area-field-rac-Bir5Q7gz.js → text-area-field-rac-5lUQxnNM.js} +15 -15
- package/dist/component/{text-area-rac-Ct1UNU04.js → text-area-rac-DpGOBzN3.js} +1 -1
- package/dist/component/{text-input-field-rac-onGUXC9J.js → text-input-field-rac-CgWadDfM.js} +3 -3
- package/dist/component/{text-input-headless-Bs9m7QFg.js → text-input-headless-fhxuPytc.js} +3 -3
- package/dist/component/{text-input-rac-DK4nEw4D.js → text-input-rac-kgWS3UUV.js} +1 -1
- package/dist/component/{time-input-rac-BCG9ktFa.js → time-input-rac-CuLUJcBH.js} +15 -15
- package/dist/component/{url-input-field-rac-mUkrVTcL.js → url-input-field-rac-CAGHb2na.js} +18 -18
- package/dist/component/{url-input-rac-Cl7LFYlr.js → url-input-rac-s5_SVi0h.js} +1 -1
- package/dist/component/{use-service-options-base-BYVuKRj2.js → use-service-options-base-CYAEJ75H.js} +1 -1
- package/package.json +2 -2
- package/dist/component/contacts-subscribe-rac-BxO8rIyL.js +0 -13
- package/dist/component/donation-rac-BjmSBabc.js +0 -305
- package/dist/component/field-rac.module-CWkwwhq4.js +0 -21
- package/dist/component/form-element-classes-KRzHUNLu.js +0 -57
- package/dist/component/image-choice-rac-Cl09CLP4.js +0 -141
- package/dist/component/quiz-radio-group-rac-BT-YZO2Q.js +0 -13
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import e, { useState as h, useRef as N } from "react";
|
|
2
2
|
import { RicosViewer as O } from "@wix/ricos/viewer";
|
|
3
3
|
import d from "classnames";
|
|
4
|
-
import { ai as p, af as I, ak as x, as as A } from "./form-
|
|
4
|
+
import { ai as p, af as I, ak as x, as as A } from "./form-CtWkUmxc.js";
|
|
5
5
|
import { TextField as B, Group as P, Input as V, Button as v } from "react-aria-components";
|
|
6
6
|
import { f as E, a as g } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as M, E as k } from "./field-error-headless-
|
|
8
|
-
import { L as q } from "./field-label-headless-
|
|
7
|
+
import { D as M, E as k } from "./field-error-headless-D6iejMQP.js";
|
|
8
|
+
import { L as q } from "./field-label-headless-BWLfU3YB.js";
|
|
9
9
|
import { E as U } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { H as j } from "./custom-focus-class-_483Pkwp.js";
|
|
11
|
-
import { s as u } from "./field-rac.module-
|
|
12
|
-
import {
|
|
11
|
+
import { s as u } from "./field-rac.module-DnUIb9Oh.js";
|
|
12
|
+
import { z as H, P as W, y as Z, q as z, j as G } from "./form-element-classes-BSMjWijd.js";
|
|
13
13
|
const t = ({ children: r, className: o }) => {
|
|
14
14
|
const { id: i, value: s, onChange: c, disabled: l, readOnly: m, required: n, hasError: a, onBlur: f, onFocus: _, FieldLayout: y } = p(), { labelId: C } = I(), [F, L] = h(!1), R = E(r, t.Label), D = E(r, t.Control), T = E(r, t.Description), S = E(r, t.Error);
|
|
15
15
|
return /* @__PURE__ */ e.createElement(y, {
|
|
@@ -57,7 +57,7 @@ const t = ({ children: r, className: o }) => {
|
|
|
57
57
|
className: r,
|
|
58
58
|
placeholder: c
|
|
59
59
|
});
|
|
60
|
-
},
|
|
60
|
+
}, J = ({ className: r, showPasswordTooltipText: o, hidePasswordTooltipText: i, children: s, ...c }) => {
|
|
61
61
|
const { isVisible: l, onToggleVisibility: m } = c, { disabled: n } = p(), a = l ? i : o;
|
|
62
62
|
return /* @__PURE__ */ e.createElement(v, {
|
|
63
63
|
type: "button",
|
|
@@ -73,7 +73,7 @@ const t = ({ children: r, className: o }) => {
|
|
|
73
73
|
t.Label = q;
|
|
74
74
|
t.Control = Q;
|
|
75
75
|
t.Input = $;
|
|
76
|
-
t.Toggle =
|
|
76
|
+
t.Toggle = J;
|
|
77
77
|
t.Description = M;
|
|
78
78
|
t.Error = k;
|
|
79
79
|
const K = (r) => /* @__PURE__ */ e.createElement("svg", {
|
|
@@ -132,9 +132,9 @@ const K = (r) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
132
132
|
showPasswordTooltipText: r("forms.widget.modals.show-password-tooltip"),
|
|
133
133
|
hidePasswordTooltipText: r("forms.widget.modals.hide-password-tooltip")
|
|
134
134
|
}, ({ isVisible: o }) => o ? /* @__PURE__ */ e.createElement(X, null) : /* @__PURE__ */ e.createElement(K, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
135
|
-
className: d(
|
|
135
|
+
className: d(z, u.error)
|
|
136
136
|
}, /* @__PURE__ */ e.createElement(U, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
137
|
-
className: d(
|
|
137
|
+
className: d(G, u.description)
|
|
138
138
|
}, te));
|
|
139
139
|
}, ge = () => /* @__PURE__ */ e.createElement(re, null);
|
|
140
140
|
export {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import r, { useCallback as V, useRef as
|
|
1
|
+
import r, { useCallback as V, useRef as z } from "react";
|
|
2
2
|
import { RicosViewer as Q } from "@wix/ricos/viewer";
|
|
3
3
|
import i from "classnames";
|
|
4
|
-
import { TextField as w, Group as
|
|
5
|
-
import { ai as D, af as S, ab as x, as as W, ak as X } from "./form-
|
|
4
|
+
import { TextField as w, Group as J, Input as K } from "react-aria-components";
|
|
5
|
+
import { ai as D, af as S, ab as x, as as W, ak as X } from "./form-CtWkUmxc.js";
|
|
6
6
|
import { f as m } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as Y, E as Z } from "./field-error-headless-
|
|
8
|
-
import { L as ee } from "./field-label-headless-
|
|
7
|
+
import { D as Y, E as Z } from "./field-error-headless-D6iejMQP.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-BWLfU3YB.js";
|
|
9
9
|
import { f as R, g as re } from "./payment-field-utils-DobiK5Xh.js";
|
|
10
10
|
import { u as te } from "./use-synced-display-value-DcAxdn3M.js";
|
|
11
11
|
import { E as ne } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { H as ae } from "./custom-focus-class-_483Pkwp.js";
|
|
13
|
-
import { s as u } from "./field-rac.module-
|
|
14
|
-
import {
|
|
13
|
+
import { s as u } from "./field-rac.module-DnUIb9Oh.js";
|
|
14
|
+
import { z as se, P as oe, y as le, q as ce, j as ie } from "./form-element-classes-BSMjWijd.js";
|
|
15
15
|
function ue(e, t) {
|
|
16
16
|
return {
|
|
17
17
|
productId: e.id,
|
|
@@ -26,8 +26,8 @@ function h(e) {
|
|
|
26
26
|
return Number.isNaN(t) ? void 0 : t;
|
|
27
27
|
}
|
|
28
28
|
const n = ({ children: e }) => {
|
|
29
|
-
var O, A,
|
|
30
|
-
const { id: t, value: a, onChange: s, disabled: p, readOnly: d, required: y, hasError: b, onBlur: o, onFocus: E, FieldLayout: M, validation: _ } = D(), { labelId: q, prefixId: G } = S(), { regionalFormat: c } = x(), N = (
|
|
29
|
+
var O, A, P, g;
|
|
30
|
+
const { id: t, value: a, onChange: s, disabled: p, readOnly: d, required: y, hasError: b, onBlur: o, onFocus: E, FieldLayout: M, validation: _ } = D(), { labelId: q, prefixId: G } = S(), { regionalFormat: c } = x(), N = (P = (A = (O = _ == null ? void 0 : _.predefined) == null ? void 0 : O.paymentOptions) == null ? void 0 : A.products) == null ? void 0 : P[0], C = (g = a == null ? void 0 : a.at(0)) == null ? void 0 : g.price, [F, I] = te({
|
|
31
31
|
sourceValue: C,
|
|
32
32
|
format: (l) => R(String(l ?? ""), c),
|
|
33
33
|
regionalFormat: c
|
|
@@ -76,7 +76,7 @@ const n = ({ children: e }) => {
|
|
|
76
76
|
});
|
|
77
77
|
}, f = ({ children: e, className: t }) => {
|
|
78
78
|
const { disabled: a, hasError: s } = D(), p = m(e, f.Currency), d = m(e, f.Value);
|
|
79
|
-
return /* @__PURE__ */ r.createElement(
|
|
79
|
+
return /* @__PURE__ */ r.createElement(J, {
|
|
80
80
|
className: t,
|
|
81
81
|
isDisabled: a,
|
|
82
82
|
isInvalid: s
|
|
@@ -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 } = D(), { inputId: p, labelId: d, prefixId: y, ariaDescribedBy: b } = S(), o =
|
|
93
|
+
const { id: t, placeholder: a, label: s } = D(), { inputId: p, labelId: d, prefixId: y, ariaDescribedBy: b } = S(), o = z(null);
|
|
94
94
|
return X(() => {
|
|
95
95
|
var E;
|
|
96
96
|
(E = o.current) == null || E.focus();
|
package/dist/component/{phone-input-field-rac-DYCibqe1.js → phone-input-field-rac-DzUE1-RF.js}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { RicosViewer as ye } from "@wix/ricos/viewer";
|
|
2
2
|
import b from "classnames";
|
|
3
|
-
import t, { useMemo as B, useState as
|
|
4
|
-
import { a2 as Ee, as as
|
|
3
|
+
import t, { useMemo as B, useState as q, useRef as P, useEffect as w, useCallback as Z, createContext as te, useContext as V } from "react";
|
|
4
|
+
import { a2 as Ee, as as v, ab as ne, ar as fe, ai as M, af as oe, ak as he } from "./form-CtWkUmxc.js";
|
|
5
5
|
import { UNSAFE_PortalProvider as ge } from "react-aria";
|
|
6
|
-
import { Dialog as re, OverlayTriggerStateContext as be, ModalOverlay as _e, Modal as Ne, SearchField as Oe, ListBoxItem as Se, Group as
|
|
6
|
+
import { Dialog as re, OverlayTriggerStateContext as be, ModalOverlay as _e, Modal as Ne, SearchField as Oe, ListBoxItem as Se, Group as Q, DialogTrigger as Le, Select as Ie, Input as ae, ListBox as Pe, Autocomplete as ve } from "react-aria-components";
|
|
7
7
|
import { f as h, a as ce } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { D as Fe, E as De } from "./field-error-headless-
|
|
9
|
-
import { L as Re } from "./field-label-headless-
|
|
8
|
+
import { D as Fe, E as De } from "./field-error-headless-D6iejMQP.js";
|
|
9
|
+
import { L as Re } from "./field-label-headless-BWLfU3YB.js";
|
|
10
10
|
import { N as xe, S as Be } from "./non-modal-popover-DtIMXHbe.js";
|
|
11
11
|
import { u as Me } from "./use-invoke-callback-UH73A_J3.js";
|
|
12
12
|
import se, { AsYouType as $e, isValidPhoneNumber as Ae, isSupportedCountry as Te } from "libphonenumber-js";
|
|
13
13
|
import "libphonenumber-js/metadata.min.json";
|
|
14
|
-
import { C as
|
|
14
|
+
import { C as W } from "./calling-country-codes-PyWuOTmF.js";
|
|
15
15
|
import { C as we } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as Ue } from "./error-icon-hZxQ6DEy.js";
|
|
17
|
-
import { H as
|
|
18
|
-
import { s as _ } from "./field-rac.module-
|
|
19
|
-
import {
|
|
17
|
+
import { H as J } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
+
import { s as _ } from "./field-rac.module-DnUIb9Oh.js";
|
|
19
|
+
import { z as ke, P as qe, y as Ve, C as ze, q as Ge, j as He } from "./form-element-classes-BSMjWijd.js";
|
|
20
20
|
function X(e) {
|
|
21
21
|
const n = e ? se(e) : void 0, r = n == null ? void 0 : n.country;
|
|
22
22
|
if (r)
|
|
@@ -24,7 +24,7 @@ function X(e) {
|
|
|
24
24
|
const o = new $e();
|
|
25
25
|
return e && o.input(e), o.getCountry();
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function z(e) {
|
|
28
28
|
var n;
|
|
29
29
|
return e && ((n = Ee.getCountryByKey(e)) == null ? void 0 : n.dialCode);
|
|
30
30
|
}
|
|
@@ -41,10 +41,10 @@ function ee(e, n) {
|
|
|
41
41
|
}
|
|
42
42
|
return e;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
const { t: e } =
|
|
46
|
-
return B(() => Object.keys(
|
|
47
|
-
const c =
|
|
44
|
+
function Ye() {
|
|
45
|
+
const { t: e } = v(), { language: n } = ne();
|
|
46
|
+
return B(() => Object.keys(W).reduce((o, a) => {
|
|
47
|
+
const c = W[a], l = z(c), u = e(`locale-dataset.countries.${c.toUpperCase()}`);
|
|
48
48
|
return l && Te(a) && o.push({
|
|
49
49
|
countryName: u,
|
|
50
50
|
longCountryCode: c,
|
|
@@ -56,7 +56,7 @@ function je() {
|
|
|
56
56
|
n
|
|
57
57
|
]);
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function je(e, n) {
|
|
60
60
|
return e.filter((r) => n && n.length > 0 ? n.includes(r.shortCountryCode) : !0);
|
|
61
61
|
}
|
|
62
62
|
function Ke(e, n) {
|
|
@@ -67,7 +67,7 @@ function k(e, n) {
|
|
|
67
67
|
return e.toLowerCase().includes(n.toLowerCase());
|
|
68
68
|
}
|
|
69
69
|
function Ze({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange: o }) {
|
|
70
|
-
const [a, c] =
|
|
70
|
+
const [a, c] = q(e || ""), l = P(U(e ?? null) ?? ""), [u, i] = q(n);
|
|
71
71
|
fe(() => {
|
|
72
72
|
c(""), l.current = "", i(n), o("");
|
|
73
73
|
});
|
|
@@ -119,16 +119,16 @@ function Ze({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange:
|
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
121
|
const le = /* @__PURE__ */ te(null), N = () => {
|
|
122
|
-
const e =
|
|
122
|
+
const e = V(le);
|
|
123
123
|
if (!e)
|
|
124
124
|
throw new Error("Phone input components must be used within PhoneInput component");
|
|
125
125
|
return e;
|
|
126
|
-
}, ue = /* @__PURE__ */ te(null),
|
|
127
|
-
const e =
|
|
126
|
+
}, ue = /* @__PURE__ */ te(null), G = () => {
|
|
127
|
+
const e = V(ue);
|
|
128
128
|
if (!e)
|
|
129
129
|
throw new Error("Option sub-components must be used within Option component");
|
|
130
130
|
return e;
|
|
131
|
-
},
|
|
131
|
+
}, H = ({ longCountryCode: e, className: n }) => {
|
|
132
132
|
function r(c, l) {
|
|
133
133
|
const u = "https://static.parastorage.com/services/linguist-flags/1.1005.0/assets/flags/square/", m = `${c}${l === "2x" ? "_2x" : ""}.png`;
|
|
134
134
|
return `${u}${m}`;
|
|
@@ -144,7 +144,7 @@ const le = /* @__PURE__ */ te(null), N = () => {
|
|
|
144
144
|
});
|
|
145
145
|
}, s = ({ children: e }) => {
|
|
146
146
|
var I, L;
|
|
147
|
-
const { id: n, value: r, onChange: o, FieldLayout: a, defaultCountry: c, validation: l } = M(), [u, i] =
|
|
147
|
+
const { id: n, value: r, onChange: o, FieldLayout: a, defaultCountry: c, validation: l } = M(), [u, i] = q(null), m = (L = (I = l == null ? void 0 : l.string) == null ? void 0 : I.phoneOptions) == null ? void 0 : L.allowedCountryCodes, C = Ye(), p = B(() => je(C, m), [
|
|
148
148
|
C,
|
|
149
149
|
m
|
|
150
150
|
]), d = B(() => p.map((x) => x.shortCountryCode), [
|
|
@@ -176,8 +176,8 @@ const le = /* @__PURE__ */ te(null), N = () => {
|
|
|
176
176
|
}), F),
|
|
177
177
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, D, T)
|
|
178
178
|
}));
|
|
179
|
-
},
|
|
180
|
-
const { inputId: r, labelId: o } = oe(), { hasError: a, disabled: c, readOnly: l } = M(), { t: u } =
|
|
179
|
+
}, Y = ({ children: e, className: n }) => {
|
|
180
|
+
const { inputId: r, labelId: o } = oe(), { hasError: a, disabled: c, readOnly: l } = M(), { t: u } = v(), { selectedCountryCode: i, countries: m } = N(), C = `${r}-country`, p = i ? m.find((O) => O.shortCountryCode === i) : void 0, d = p && z(p.longCountryCode) || "", f = u("field.phone.country-code.aria-label"), y = p ? `${f}, ${p.countryName}, ${d}` : f;
|
|
181
181
|
return /* @__PURE__ */ t.createElement(Be, {
|
|
182
182
|
isDisabled: c || l,
|
|
183
183
|
id: C,
|
|
@@ -186,20 +186,20 @@ const le = /* @__PURE__ */ te(null), N = () => {
|
|
|
186
186
|
className: n,
|
|
187
187
|
"data-invalid": a || void 0
|
|
188
188
|
}, e);
|
|
189
|
-
},
|
|
189
|
+
}, Qe = ({ className: e }) => {
|
|
190
190
|
const { selectedCountryCode: n, countries: r } = N(), o = r.find((a) => a.shortCountryCode === n);
|
|
191
|
-
return o ? /* @__PURE__ */ t.createElement(
|
|
191
|
+
return o ? /* @__PURE__ */ t.createElement(H, {
|
|
192
192
|
className: e,
|
|
193
193
|
longCountryCode: o.longCountryCode
|
|
194
194
|
}) : null;
|
|
195
|
-
},
|
|
195
|
+
}, We = ({ children: e, className: n }) => {
|
|
196
196
|
const { selectedCountryCode: r, countries: o } = N();
|
|
197
197
|
return o.some((c) => c.shortCountryCode === r) ? null : /* @__PURE__ */ t.createElement("span", {
|
|
198
198
|
className: n
|
|
199
199
|
}, e);
|
|
200
200
|
};
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
Y.Flag = Qe;
|
|
202
|
+
Y.EmptyState = We;
|
|
203
203
|
const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a, ...c }) => {
|
|
204
204
|
const { triggerRef: l, optionsRef: u } = c, { popoverContainer: i } = N(), m = h(e, g.Search), C = /* @__PURE__ */ t.createElement(ie, null, e);
|
|
205
205
|
return /* @__PURE__ */ t.createElement(ge, {
|
|
@@ -214,8 +214,8 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
214
214
|
}, m ? /* @__PURE__ */ t.createElement(re, {
|
|
215
215
|
"aria-label": r
|
|
216
216
|
}, C) : C));
|
|
217
|
-
},
|
|
218
|
-
const { optionsRef: l } = c, { selectedCountryCode: u, handleCountryCodeChange: i } = N(), m =
|
|
217
|
+
}, Je = ({ children: e, className: n, overlayClassName: r, "aria-label": o, portalContainer: a = t.Fragment, ...c }) => {
|
|
218
|
+
const { optionsRef: l } = c, { selectedCountryCode: u, handleCountryCodeChange: i } = N(), m = V(be);
|
|
219
219
|
return /* @__PURE__ */ t.createElement(_e, {
|
|
220
220
|
className: r,
|
|
221
221
|
isDismissable: !0
|
|
@@ -237,11 +237,11 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
237
237
|
}
|
|
238
238
|
}, e)))));
|
|
239
239
|
}, ie = ({ children: e, listBoxProps: n }) => {
|
|
240
|
-
const { countries: r } = N(), o = h(e, g.Option), a = h(e, g.Search), c = h(e, g.EmptyState), l = /* @__PURE__ */ t.createElement(
|
|
240
|
+
const { countries: r } = N(), o = h(e, g.Option), a = h(e, g.Search), c = h(e, g.EmptyState), l = /* @__PURE__ */ t.createElement(Pe, {
|
|
241
241
|
...n,
|
|
242
242
|
renderEmptyState: c ? () => c : void 0
|
|
243
243
|
}, r.map((u) => {
|
|
244
|
-
const i =
|
|
244
|
+
const i = z(u.longCountryCode) || "";
|
|
245
245
|
return ce(o, {
|
|
246
246
|
key: u.shortCountryCode,
|
|
247
247
|
countryCode: u.shortCountryCode,
|
|
@@ -250,7 +250,7 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
250
250
|
longCountryCode: u.longCountryCode
|
|
251
251
|
});
|
|
252
252
|
}));
|
|
253
|
-
return a ? /* @__PURE__ */ t.createElement(
|
|
253
|
+
return a ? /* @__PURE__ */ t.createElement(ve, {
|
|
254
254
|
filter: (u, i, m) => {
|
|
255
255
|
const C = r.find((p) => p.shortCountryCode === m.key);
|
|
256
256
|
return !!C && Ke(C, i);
|
|
@@ -258,7 +258,7 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
258
258
|
}, a, l) : l;
|
|
259
259
|
};
|
|
260
260
|
g.Popover = g;
|
|
261
|
-
g.Modal =
|
|
261
|
+
g.Modal = Je;
|
|
262
262
|
const me = ({ className: e, children: n, "aria-label": r }) => /* @__PURE__ */ t.createElement(Oe, {
|
|
263
263
|
className: e,
|
|
264
264
|
"aria-label": r,
|
|
@@ -288,18 +288,18 @@ const $ = ({ children: e, className: n, ...r }) => {
|
|
|
288
288
|
value: u
|
|
289
289
|
}, i));
|
|
290
290
|
}, Ce = ({ className: e }) => {
|
|
291
|
-
const { longCountryCode: n } =
|
|
292
|
-
return /* @__PURE__ */ t.createElement(
|
|
291
|
+
const { longCountryCode: n } = G();
|
|
292
|
+
return /* @__PURE__ */ t.createElement(H, {
|
|
293
293
|
className: e,
|
|
294
294
|
longCountryCode: n
|
|
295
295
|
});
|
|
296
296
|
}, de = ({ className: e }) => {
|
|
297
|
-
const { countryName: n } =
|
|
297
|
+
const { countryName: n } = G();
|
|
298
298
|
return /* @__PURE__ */ t.createElement("span", {
|
|
299
299
|
className: e
|
|
300
300
|
}, n);
|
|
301
301
|
}, pe = ({ className: e }) => {
|
|
302
|
-
const { dialingCode: n } =
|
|
302
|
+
const { dialingCode: n } = G();
|
|
303
303
|
return /* @__PURE__ */ t.createElement("span", {
|
|
304
304
|
className: e
|
|
305
305
|
}, n);
|
|
@@ -309,7 +309,7 @@ $.Name = de;
|
|
|
309
309
|
$.Code = pe;
|
|
310
310
|
g.Option = $;
|
|
311
311
|
const tt = ({ className: e }) => {
|
|
312
|
-
const { t: n } =
|
|
312
|
+
const { t: n } = v(), { inputId: r, ariaDescribedBy: o } = oe(), { id: a, placeholder: c, disabled: l, readOnly: u, required: i, label: m, hasError: C } = M(), { currentValue: p, handlePhoneChange: d } = N(), f = P(null);
|
|
313
313
|
return he(() => {
|
|
314
314
|
var y;
|
|
315
315
|
(y = f.current) == null || y.focus({
|
|
@@ -331,31 +331,31 @@ const tt = ({ className: e }) => {
|
|
|
331
331
|
className: e
|
|
332
332
|
});
|
|
333
333
|
}, nt = ({ children: e, className: n }) => {
|
|
334
|
-
const r =
|
|
334
|
+
const r = P(null), o = P(null), a = P(!1), { disabled: c, readOnly: l, required: u, hasError: i, showFlag: m, onFocus: C, onBlur: p } = M(), d = Me(p), { t: f } = v(), { selectedCountryCode: y, handleCountryCodeChange: O, countries: S } = N(), A = h(e, s.CountryButton), F = h(e, s.CountryOptions.Modal), T = F ?? h(e, s.CountryOptions.Popover), D = h(e, s.PhoneNumber), R = {
|
|
335
335
|
onFocus: () => {
|
|
336
336
|
a.current || (a.current = !0, C == null || C());
|
|
337
337
|
},
|
|
338
338
|
onBlur: (L) => {
|
|
339
|
-
var
|
|
339
|
+
var j, K;
|
|
340
340
|
const x = L.relatedTarget;
|
|
341
|
-
!((
|
|
341
|
+
!((j = r.current) != null && j.contains(x)) && !((K = o.current) != null && K.contains(x)) && (a.current = !1, d());
|
|
342
342
|
}
|
|
343
343
|
};
|
|
344
344
|
if (S.length === 1)
|
|
345
|
-
return /* @__PURE__ */ t.createElement(
|
|
345
|
+
return /* @__PURE__ */ t.createElement(Q, {
|
|
346
346
|
ref: r,
|
|
347
347
|
className: n,
|
|
348
348
|
isDisabled: c,
|
|
349
349
|
isInvalid: i,
|
|
350
350
|
...R
|
|
351
|
-
}, m && /* @__PURE__ */ t.createElement(
|
|
351
|
+
}, m && /* @__PURE__ */ t.createElement(H, {
|
|
352
352
|
longCountryCode: S[0].longCountryCode
|
|
353
353
|
}), D);
|
|
354
354
|
const I = /* @__PURE__ */ t.createElement(t.Fragment, null, A, ce(T, {
|
|
355
355
|
triggerRef: r,
|
|
356
356
|
optionsRef: o
|
|
357
357
|
}));
|
|
358
|
-
return /* @__PURE__ */ t.createElement(
|
|
358
|
+
return /* @__PURE__ */ t.createElement(Q, {
|
|
359
359
|
ref: r,
|
|
360
360
|
className: n,
|
|
361
361
|
isDisabled: c,
|
|
@@ -373,7 +373,7 @@ const tt = ({ className: e }) => {
|
|
|
373
373
|
};
|
|
374
374
|
s.Label = Re;
|
|
375
375
|
s.Control = nt;
|
|
376
|
-
s.CountryButton =
|
|
376
|
+
s.CountryButton = Y;
|
|
377
377
|
s.CountryOptions = g;
|
|
378
378
|
s.PhoneNumber = tt;
|
|
379
379
|
s.Description = Fe;
|
|
@@ -420,17 +420,17 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
420
420
|
}), _t = () => /* @__PURE__ */ t.createElement("span", {
|
|
421
421
|
className: E.chevron,
|
|
422
422
|
"aria-hidden": "true"
|
|
423
|
-
}, /* @__PURE__ */ t.createElement(we, null)),
|
|
424
|
-
const { t: e } =
|
|
423
|
+
}, /* @__PURE__ */ t.createElement(we, null)), qt = () => {
|
|
424
|
+
const { t: e } = v(), { isMobile: n, PortalContainer: r } = ne(), o = /* @__PURE__ */ t.createElement(s.CountryOptions.Search, {
|
|
425
425
|
className: E.countrySearchContainer,
|
|
426
426
|
"aria-label": e("field.phone.country-search-input.aria-label")
|
|
427
427
|
}, /* @__PURE__ */ t.createElement(rt, {
|
|
428
428
|
className: E.searchIcon
|
|
429
429
|
}), /* @__PURE__ */ t.createElement(s.CountryOptions.Search.Input, {
|
|
430
|
-
className: b(E.countrySearch,
|
|
430
|
+
className: b(E.countrySearch, J),
|
|
431
431
|
placeholder: e("field.phone.country-search-input.placeholder")
|
|
432
432
|
})), a = /* @__PURE__ */ t.createElement(s.CountryOptions.EmptyState, null, e("field.phone.country-selector-dropdown.no-result")), c = /* @__PURE__ */ t.createElement(s.CountryOptions.Option, {
|
|
433
|
-
className: b(_.selectOption, _.selectOptionWithoutFocusRing, E.option,
|
|
433
|
+
className: b(_.selectOption, _.selectOptionWithoutFocusRing, E.option, J)
|
|
434
434
|
}, /* @__PURE__ */ t.createElement(s.CountryOptions.Option.Flag, {
|
|
435
435
|
className: E.flag
|
|
436
436
|
}), /* @__PURE__ */ t.createElement(s.CountryOptions.Option.Name, {
|
|
@@ -441,9 +441,9 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
441
441
|
return /* @__PURE__ */ t.createElement(s, null, /* @__PURE__ */ t.createElement(s.Label, {
|
|
442
442
|
className: b(ke, _.label)
|
|
443
443
|
}, /* @__PURE__ */ t.createElement(s.Label.Required, {
|
|
444
|
-
className: b(
|
|
444
|
+
className: b(qe, _.requiredMark)
|
|
445
445
|
})), /* @__PURE__ */ t.createElement(s.Control, {
|
|
446
|
-
className: b(
|
|
446
|
+
className: b(Ve, _.input, E.control)
|
|
447
447
|
}, /* @__PURE__ */ t.createElement(s.CountryButton, {
|
|
448
448
|
className: E.countryButton
|
|
449
449
|
}, /* @__PURE__ */ t.createElement(s.CountryButton.Flag, {
|
|
@@ -458,16 +458,16 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
458
458
|
portalContainer: r,
|
|
459
459
|
"aria-label": e("field.phone.country-code.aria-label")
|
|
460
460
|
}, o, a, c) : /* @__PURE__ */ t.createElement(s.CountryOptions.Popover, {
|
|
461
|
-
className: b(
|
|
461
|
+
className: b(ze, _.selectPopover, E.countryOptions),
|
|
462
462
|
placement: "bottom start",
|
|
463
463
|
offset: 0,
|
|
464
464
|
"aria-label": e("field.phone.country-code.aria-label")
|
|
465
465
|
}, o, a, c)), /* @__PURE__ */ t.createElement(s.Error, {
|
|
466
|
-
className: b(
|
|
466
|
+
className: b(Ge, _.error)
|
|
467
467
|
}, /* @__PURE__ */ t.createElement(Ue, null), /* @__PURE__ */ t.createElement(s.Error.Text, null)), /* @__PURE__ */ t.createElement(s.Description, {
|
|
468
|
-
className: b(
|
|
468
|
+
className: b(He, _.description)
|
|
469
469
|
}, bt));
|
|
470
470
|
};
|
|
471
471
|
export {
|
|
472
|
-
|
|
472
|
+
qt as P
|
|
473
473
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import t, { useMemo as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import t, { useMemo as H, useCallback as x, useRef as B } from "react";
|
|
2
|
+
import { RicosViewer as $ } from "@wix/ricos/viewer";
|
|
3
3
|
import _ from "classnames";
|
|
4
4
|
import { CheckboxField as K, CheckboxButton as j, NumberField as J, Group as W, Button as U, Input as X } from "react-aria-components";
|
|
5
|
-
import { ai as M, af as Y, ab as w, as as Z, ak as ee } from "./form-
|
|
5
|
+
import { ai as M, af as Y, ab as w, as as Z, ak as ee } from "./form-CtWkUmxc.js";
|
|
6
6
|
import { f as b, a as L } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { L as te, g as ne } from "./field-label-headless-
|
|
7
|
+
import { L as te, g as ne } from "./field-label-headless-BWLfU3YB.js";
|
|
8
8
|
import { f as ae } from "./format-currency-BwShJ9vM.js";
|
|
9
|
-
import { D as oe, E as re } from "./field-error-headless-
|
|
9
|
+
import { D as oe, E as re } from "./field-error-headless-D6iejMQP.js";
|
|
10
10
|
import { F as ie } from "./fieldset-headless-CD3fds9J.js";
|
|
11
11
|
import { g as le } from "./payment-field-utils-DobiK5Xh.js";
|
|
12
12
|
import { E as se } from "./error-icon-hZxQ6DEy.js";
|
|
13
|
-
import { s as S } from "./field-rac.module-
|
|
14
|
-
import {
|
|
13
|
+
import { s as S } from "./field-rac.module-DnUIb9Oh.js";
|
|
14
|
+
import { z as ce, P as ue, D as me, H as pe, G as de, E as Ee, y as ye, q as fe, j as _e } from "./form-element-classes-BSMjWijd.js";
|
|
15
15
|
import { o as Q } from "./options-rac.module-KM-VT_KY.js";
|
|
16
16
|
var be = /* @__PURE__ */ (function(e) {
|
|
17
17
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
@@ -26,10 +26,10 @@ function Ie({ maxItems: e, products: o } = {}) {
|
|
|
26
26
|
}
|
|
27
27
|
const a = ({ children: e }) => {
|
|
28
28
|
var D;
|
|
29
|
-
const { id: o, value: i, onChange: n, disabled: r, readOnly: c, required: E, onBlur: I, onFocus: l, hasError: u, validation: m, FieldLayout: p } = M(), { inputId: T, labelId: v, ariaDescribedBy: N } = Y(), y = b(e, a.Label), g = b(e, a.Options), A = b(e, a.Description), O = b(e, a.Error), s =
|
|
29
|
+
const { id: o, value: i, onChange: n, disabled: r, readOnly: c, required: E, onBlur: I, onFocus: l, hasError: u, validation: m, FieldLayout: p } = M(), { inputId: T, labelId: v, ariaDescribedBy: N } = Y(), y = b(e, a.Label), g = b(e, a.Options), A = b(e, a.Description), O = b(e, a.Error), s = H(() => i || [], [
|
|
30
30
|
i
|
|
31
|
-
]),
|
|
32
|
-
const f = s.filter((
|
|
31
|
+
]), q = Ie((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) === k.many, F = x((P, C) => {
|
|
32
|
+
const f = s.filter((G) => G.productId !== P.productId), z = C ? [
|
|
33
33
|
...f,
|
|
34
34
|
P
|
|
35
35
|
] : f;
|
|
@@ -49,7 +49,7 @@ const a = ({ children: e }) => {
|
|
|
49
49
|
onBlur: I,
|
|
50
50
|
onFocus: l
|
|
51
51
|
}, g ? L(g, {
|
|
52
|
-
allowMany:
|
|
52
|
+
allowMany: q,
|
|
53
53
|
productValues: s,
|
|
54
54
|
onProductChange: F,
|
|
55
55
|
disabled: r,
|
|
@@ -63,8 +63,8 @@ const a = ({ children: e }) => {
|
|
|
63
63
|
return /* @__PURE__ */ t.createElement("div", {
|
|
64
64
|
className: o
|
|
65
65
|
}, u == null ? void 0 : u.map((y, g) => {
|
|
66
|
-
var R,
|
|
67
|
-
const A = ((P = (D = (F = (
|
|
66
|
+
var R, q, F, D, P;
|
|
67
|
+
const A = ((P = (D = (F = (q = (R = m == null ? void 0 : m.predefined) == null ? void 0 : R.paymentOptions) == null ? void 0 : q.products) == null ? void 0 : F.find((C) => C.id === y.value)) == null ? void 0 : D.fixedPriceOptions) == null ? void 0 : P.price) || "0", O = le(v, T), s = r.find((C) => C.productId === y.value);
|
|
68
68
|
return L(N, {
|
|
69
69
|
key: y.id || y.value || y.label,
|
|
70
70
|
option: y,
|
|
@@ -82,14 +82,14 @@ const a = ({ children: e }) => {
|
|
|
82
82
|
});
|
|
83
83
|
}));
|
|
84
84
|
}, d = ({ children: e, className: o, ...i }) => {
|
|
85
|
-
const { option: n, price: r, quantity: c = 0, isSelected: E, allowMany: I, onProductChange: l, disabled: u, readOnly: m, hasError: p, currencyAriaLabel: T, imageResize: v, isFirst: N } = i, { id: y } = M(), g = B(null), A = B(null), O = b(e, d.Image), s = b(e, d.Label), R = b(e, d.Price),
|
|
85
|
+
const { option: n, price: r, quantity: c = 0, isSelected: E, allowMany: I, onProductChange: l, disabled: u, readOnly: m, hasError: p, currencyAriaLabel: T, imageResize: v, isFirst: N } = i, { id: y } = M(), g = B(null), A = B(null), O = b(e, d.Image), s = b(e, d.Label), R = b(e, d.Price), q = b(e, d.Input), F = b(e, d.Quantity);
|
|
86
86
|
ee(() => {
|
|
87
87
|
var f;
|
|
88
88
|
N && ((f = g.current ?? A.current) == null || f.focus({
|
|
89
89
|
preventScroll: !0
|
|
90
90
|
}));
|
|
91
91
|
}, y);
|
|
92
|
-
const D =
|
|
92
|
+
const D = x((f) => {
|
|
93
93
|
l({
|
|
94
94
|
productId: n.value,
|
|
95
95
|
price: r,
|
|
@@ -99,7 +99,7 @@ const a = ({ children: e }) => {
|
|
|
99
99
|
l,
|
|
100
100
|
n.value,
|
|
101
101
|
r
|
|
102
|
-
]), P =
|
|
102
|
+
]), P = x((f) => {
|
|
103
103
|
l({
|
|
104
104
|
productId: n.value,
|
|
105
105
|
price: r,
|
|
@@ -146,7 +146,7 @@ const a = ({ children: e }) => {
|
|
|
146
146
|
label: n.label
|
|
147
147
|
}) : null, R ? L(R, {
|
|
148
148
|
price: r
|
|
149
|
-
}) : null,
|
|
149
|
+
}) : null, q));
|
|
150
150
|
}, Le = ({ className: e, ...o }) => {
|
|
151
151
|
var l;
|
|
152
152
|
const { option: i, imageResize: n } = o, r = (l = i.media) == null ? void 0 : l.image;
|
|
@@ -183,11 +183,11 @@ const a = ({ children: e }) => {
|
|
|
183
183
|
"aria-hidden": "true",
|
|
184
184
|
className: e
|
|
185
185
|
}), ge = ({ className: e, ...o }) => {
|
|
186
|
-
const { quantity: i, onQuantityChange: n, disabled: r, readOnly: c, hasError: E, ariaLabel: I, inputRef: l } = o, u =
|
|
186
|
+
const { quantity: i, onQuantityChange: n, disabled: r, readOnly: c, hasError: E, ariaLabel: I, inputRef: l } = o, u = x((p) => {
|
|
187
187
|
n(p < 0 ? 0 : p);
|
|
188
188
|
}, [
|
|
189
189
|
n
|
|
190
|
-
]), m =
|
|
190
|
+
]), m = x((p) => {
|
|
191
191
|
p.key === "Home" && (p.preventDefault(), u(0));
|
|
192
192
|
}, [
|
|
193
193
|
u
|
|
@@ -232,10 +232,10 @@ const Fe = "_options_11x4v_1", De = "_option_11x4v_1", Pe = "_optionInput_11x4v_
|
|
|
232
232
|
optionLabel: he,
|
|
233
233
|
optionPrice: ve,
|
|
234
234
|
quantity: Ne
|
|
235
|
-
}, Ae = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement(
|
|
235
|
+
}, Ae = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement($, {
|
|
236
236
|
content: e,
|
|
237
237
|
locale: o
|
|
238
|
-
}),
|
|
238
|
+
}), qe = () => /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
|
|
239
239
|
className: _(ce, S.label)
|
|
240
240
|
}, /* @__PURE__ */ t.createElement(a.Label.Required, {
|
|
241
241
|
className: _(ue, S.requiredMark)
|
|
@@ -257,7 +257,7 @@ const Fe = "_options_11x4v_1", De = "_option_11x4v_1", Pe = "_optionInput_11x4v_
|
|
|
257
257
|
className: _(fe, S.error)
|
|
258
258
|
}, /* @__PURE__ */ t.createElement(se, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)), /* @__PURE__ */ t.createElement(a.Description, {
|
|
259
259
|
className: _(_e, S.description)
|
|
260
|
-
}, Ae)), Je = () => /* @__PURE__ */ t.createElement(
|
|
260
|
+
}, Ae)), Je = () => /* @__PURE__ */ t.createElement(qe, null);
|
|
261
261
|
export {
|
|
262
262
|
Je as ProductListRAC
|
|
263
263
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _ from "react";
|
|
2
|
+
import { R } from "./radio-group-field-rac-BSVmjEgZ.js";
|
|
3
|
+
import { K as o, J as r, I as O } from "./form-element-classes-BSMjWijd.js";
|
|
4
|
+
const t = () => /* @__PURE__ */ _.createElement(R, {
|
|
5
|
+
classes: {
|
|
6
|
+
container: O,
|
|
7
|
+
label: r,
|
|
8
|
+
control: o
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
t as QuizRadioGroupRAC
|
|
13
|
+
};
|
package/dist/component/{radio-group-field-rac-DKqWnMBJ.js → radio-group-field-rac-BSVmjEgZ.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { RicosViewer as s } from "@wix/ricos/viewer";
|
|
2
2
|
import a from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { R as t, s as r } from "./radio-group-field-rac.module-
|
|
4
|
+
import { R as t, s as r } from "./radio-group-field-rac.module-Cb3mm0f2.js";
|
|
5
5
|
import { E as m } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
-
import { s as l } from "./field-rac.module-
|
|
7
|
-
import {
|
|
8
|
-
const
|
|
6
|
+
import { s as l } from "./field-rac.module-DnUIb9Oh.js";
|
|
7
|
+
import { z as c, P as i, N as E, M as _, L as R, y as p, q as O, j as L } from "./form-element-classes-BSMjWijd.js";
|
|
8
|
+
const I = ({ content: o, locale: n }) => /* @__PURE__ */ e.createElement(s, {
|
|
9
9
|
content: o,
|
|
10
10
|
locale: n
|
|
11
|
-
}),
|
|
11
|
+
}), M = ({ classes: o = {
|
|
12
12
|
container: R,
|
|
13
13
|
label: _,
|
|
14
14
|
control: E
|
|
@@ -33,8 +33,8 @@ const L = ({ content: o, locale: n }) => /* @__PURE__ */ e.createElement(s, {
|
|
|
33
33
|
}))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
34
34
|
className: a(O, l.error)
|
|
35
35
|
}, /* @__PURE__ */ e.createElement(m, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
36
|
-
className: a(
|
|
37
|
-
},
|
|
36
|
+
className: a(L, l.description)
|
|
37
|
+
}, I));
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
M as R
|
|
40
40
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import s, { useRef as y, useState as V, useEffect as S, useCallback as B } from "react";
|
|
2
2
|
import { RadioGroup as T, RadioField as k, RadioButton as G, TextField as M, Input as P } from "react-aria-components";
|
|
3
|
-
import { ai as C, af as $, as as F, ab as q, ak as x } from "./form-
|
|
3
|
+
import { ai as C, af as $, as as F, ab as q, ak as x } from "./form-CtWkUmxc.js";
|
|
4
4
|
import { f as d, a as g } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as U, E as A } from "./field-error-headless-
|
|
6
|
-
import { L as H } from "./field-label-headless-
|
|
5
|
+
import { D as U, E as A } from "./field-error-headless-D6iejMQP.js";
|
|
6
|
+
import { L as H } from "./field-label-headless-BWLfU3YB.js";
|
|
7
7
|
import { N as j } from "./options-layout-constants-DEfIEJWD.js";
|
|
8
8
|
const L = "Other", w = (e, t) => e == null ? void 0 : e.find((o) => (o.value ?? o.label) === t), R = (e, t) => !!t && !w(e, t), z = (e, t) => {
|
|
9
9
|
const a = t ? t.length + 2 : 0;
|