@wix/form-elements 1.146.0 → 1.147.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-scUix9QX.js → appointment-rac-BG5-bIZU.js} +98 -98
- package/dist/component/{bookings-address-rac-CKemkJOO.js → bookings-address-rac-8e8PqKsp.js} +1 -1
- package/dist/component/{bookings-email-rac-CDqdhPAB.js → bookings-email-rac-CtlnU8ws.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DEy_7Hjb.js → bookings-first-name-rac-CrivNlXM.js} +1 -1
- package/dist/component/{bookings-header-rac-Bl4xy9lB.js → bookings-header-rac-DWDAjfqq.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CsL9xQ1W.js → bookings-last-name-rac-qAthWem2.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DkHYQ4No.js → bookings-login-bar-rac-BNyUDqlM.js} +6 -6
- package/dist/component/{bookings-phone-rac-BoBiFwbV.js → bookings-phone-rac-Tc39XLr7.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DZZnPKWA.js → bookings-rich-text-rac-CPNaPtFK.js} +1 -1
- package/dist/component/{checkbox-field-rac-UgLmJxB-.js → checkbox-field-rac-DEa78Tpf.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-C809nB0Q.js → checkbox-group-field-headless-BxBaMg29.js} +68 -68
- package/dist/component/{checkbox-group-field-rac-u4i4wG21.js → checkbox-group-field-rac-CRRP03Qk.js} +7 -7
- package/dist/component/{checkbox-group-rac-DBAQhSo3.js → checkbox-group-rac-TOofMGl3.js} +1 -1
- package/dist/component/{checkbox-rac-FDQVsI5-.js → checkbox-rac-CHMHr8Ry.js} +1 -1
- package/dist/component/{contacts-address-rac-DnArylPa.js → contacts-address-rac-Bc5yDvTL.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-C19jhGEO.js → contacts-birthdate-rac-Ubtg5ncv.js} +1 -1
- package/dist/component/{contacts-company-rac-Dxs0hs_i.js → contacts-company-rac-BksH9IoV.js} +1 -1
- package/dist/component/{contacts-email-rac-D-H43L8r.js → contacts-email-rac-DDPEtMAm.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DwV5NESk.js → contacts-first-name-rac-DUlCvEdx.js} +1 -1
- package/dist/component/{contacts-last-name-rac-C5v2xurf.js → contacts-last-name-rac-BikqNgUr.js} +1 -1
- package/dist/component/{contacts-phone-rac-D9a5x-xl.js → contacts-phone-rac-B4OEgM_8.js} +1 -1
- package/dist/component/{contacts-position-rac-DfsgOv-k.js → contacts-position-rac-BfybzySV.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-B-Hho0Kb.js → contacts-subscribe-rac-CMHb33v1.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-q6TQkB4b.js → contacts-tax-id-rac-C-qEqwO5.js} +1 -1
- package/dist/component/{date-availability-CMDvf5VU.js → date-availability-DZ3J3LLm.js} +1 -1
- package/dist/component/{date-input-field-rac-C1WLUct3.js → date-input-field-rac-DeL5vuE7.js} +39 -39
- package/dist/component/{date-input-rac-cNQ-nr4D.js → date-input-rac-Di6TQvFf.js} +1 -1
- package/dist/component/{date-picker-field-rac-mx11z-MO.js → date-picker-field-rac-BcdpTkjV.js} +107 -103
- package/dist/component/{date-picker-rac-DeTz17zC.js → date-picker-rac-Brne65gr.js} +1 -1
- package/dist/component/{date-time-input-field-rac-feQ2E1eU.js → date-time-input-field-rac-BtQfAxRp.js} +49 -49
- package/dist/component/{date-time-input-rac-G0s0xP4v.js → date-time-input-rac-DM_HXiqV.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BcTN1nJb.js → dext-checkbox-group-rac-WTVwhGG0.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DX0TOrCO.js → dext-checkbox-rac-BR5YwmLQ.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CpDp11oa.js → dext-date-picker-rac-DvDuRGYi.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BRvO8izU.js → dext-date-time-input-rac-C6RgbaVv.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DGZ4Yi_X.js → dext-dropdown-rac-CWjSdcZx.js} +1 -1
- package/dist/component/{dext-email-rac-B9YCFHB4.js → dext-email-rac-D-C1gVTq.js} +1 -1
- package/dist/component/{dext-number-input-rac-D890dBZf.js → dext-number-input-rac-YKzZS2ZG.js} +1 -1
- package/dist/component/{dext-phone-rac-BAQftbXo.js → dext-phone-rac-CFZlEH2a.js} +1 -1
- package/dist/component/dext-radio-group-rac-DiH0wIIl.js +18 -0
- package/dist/component/{dext-rating-input-rac-BqQKVaHo.js → dext-rating-input-rac-D0s-i0qO.js} +1 -1
- package/dist/component/{dext-tags-rac-zxxKcNUe.js → dext-tags-rac-Br48OQQ5.js} +2 -2
- package/dist/component/{dext-text-area-rac-Ctp9SwPg.js → dext-text-area-rac-6jG8gJ7i.js} +1 -1
- package/dist/component/{dext-text-input-rac-c_QMlyjr.js → dext-text-input-rac-FAJTCXuf.js} +1 -1
- package/dist/component/{dext-url-input-rac-96pv15aC.js → dext-url-input-rac-BoMP8sQB.js} +1 -1
- package/dist/component/{donation-rac-GEWKSLJY.js → donation-rac-DNi4p-v5.js} +69 -69
- package/dist/component/{dropdown-field-headless-C3OxMhLE.js → dropdown-field-headless-7SCC-xOC.js} +27 -27
- package/dist/component/{dropdown-field-rac-CCXfBmSc.js → dropdown-field-rac-CMzZh6J6.js} +8 -9
- package/dist/component/{dropdown-rac-CR7hswXE.js → dropdown-rac-qeugpHXY.js} +1 -1
- package/dist/component/{ecom-address-rac-khMuxEFD.js → ecom-address-rac-D8b_L5md.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CAi_AHpb.js → ecom-subscription-checkbox-rac-BnAuR9La.js} +5 -5
- package/dist/component/{email-input-field-rac-B83mY2lg.js → email-input-field-rac-CunXRyc5.js} +62 -62
- package/dist/component/{events-repeater-rac-ClEwXgmb.js → events-repeater-rac-DMjyIOkB.js} +17 -17
- package/dist/component/{events-rsvp-rac-BJ5q2SVR.js → events-rsvp-rac-BsuDPq2K.js} +8 -8
- package/dist/component/{field-error-headless-CsYQCsiT.js → field-error-headless-E8WjFr_n.js} +6 -6
- package/dist/component/{field-label-headless-Yg_1PMSg.js → field-label-headless-BakLOu5E.js} +15 -15
- package/dist/component/{file-upload-rac-DJsuI_lR.js → file-upload-rac-Clu_c--0.js} +43 -43
- package/dist/component/{fixed-payment-rac-BMFe9wxU.js → fixed-payment-rac-CzAXxsb-.js} +12 -12
- package/dist/component/{form-Bed4Kfz8.js → form-DHAKwnLt.js} +311 -305
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +2 -2
- package/dist/component/{header-field-rac-DPQTrOSZ.js → header-field-rac-CwmVpz3r.js} +4 -4
- package/dist/component/{header-rac-CzXsuLmE.js → header-rac-ahkGRjSy.js} +1 -1
- package/dist/component/{image-choice-rac-R_4pbOSr.js → image-choice-rac-BwxkkdUu.js} +17 -17
- package/dist/component/{index-qSZCe_WC.js → index-BFi_n6B7.js} +2 -2
- package/dist/component/{index-DZxHlvzt.js → index-BQf23zZi.js} +91 -91
- package/dist/component/{isObjectLike-B-a5uaU-.js → isObjectLike-DHcMRYYH.js} +15 -15
- package/dist/component/{multiline-address-field-rac-rv4IZZy_.js → multiline-address-field-rac-C6xaqNOk.js} +60 -60
- package/dist/component/{multiline-address-rac-DZ7cYtgn.js → multiline-address-rac-DF4TFuDx.js} +1 -1
- package/dist/component/{number-input-field-rac-CL9iXKIf.js → number-input-field-rac-uVJ3SBv2.js} +27 -27
- package/dist/component/{number-input-rac-BeGn6qJR.js → number-input-rac-D6ERhrSM.js} +1 -1
- package/dist/component/{password-rac-DfvhdsKG.js → password-rac-CAiC0ZKl.js} +23 -23
- package/dist/component/{payment-input-rac-BmMfi5rf.js → payment-input-rac-Bu25xvby.js} +26 -26
- package/dist/component/{phone-input-field-rac-DW0a1pXs.js → phone-input-field-rac-32qUvCsC.js} +45 -45
- package/dist/component/{phone-rac-quZjJ08H.js → phone-rac-mNrpj30q.js} +1 -1
- package/dist/component/{product-list-rac-Ci0KB7sN.js → product-list-rac-zHdM9rHw.js} +53 -53
- package/dist/component/{quiz-radio-group-rac--UUtGx2t.js → quiz-radio-group-rac-BaSlT8w3.js} +1 -1
- package/dist/component/{radio-button-module-classes-CqdBGknT.js → radio-button-module-classes-BdWjkBlX.js} +9 -9
- package/dist/component/{radio-group-field-rac-w8fHpFKJ.js → radio-group-field-rac-DI0UgTBr.js} +12 -12
- package/dist/component/{radio-group-rac-jO8aghii.js → radio-group-rac-D2ESG8J4.js} +1 -1
- package/dist/component/{rating-input-field-rac-BRc2PtqE.js → rating-input-field-rac-BYT2XqOK.js} +26 -26
- package/dist/component/{rating-input-rac-D9zs06xR.js → rating-input-rac-D-5CmVAX.js} +1 -1
- package/dist/component/{rich-content-rac.module-Cv3ZmD00.js → rich-content-rac.module-Dp9Advo9.js} +8 -8
- package/dist/component/{rich-text-field-rac-BmWuIfA8.js → rich-text-field-rac-COEUwoXQ.js} +4 -4
- package/dist/component/{rich-text-rac-BnqnrvB1.js → rich-text-rac-CQZLjBQ0.js} +1 -1
- package/dist/component/{service-dropdown-rac-Cl81KfJU.js → service-dropdown-rac-BTtJVFv8.js} +44 -45
- package/dist/component/{services-multi-choice-rac-sQ1NF9hY.js → services-multi-choice-rac-hbY3g0Kb.js} +11 -11
- package/dist/component/{signature-rac-Huairu7V.js → signature-rac-CTCNclwL.js} +67 -67
- package/dist/component/{submit-button-rac-Dpg7N0TG.js → submit-button-rac-kKGeVgsG.js} +25 -25
- package/dist/component/{tags-field-rac-BQ8TEqXH.js → tags-field-rac-CVf7oQr_.js} +35 -35
- package/dist/component/{tags-rac-CFOmyCCc.js → tags-rac-DiX1_nTT.js} +1 -1
- package/dist/component/{text-area-field-rac-DNiMa7d3.js → text-area-field-rac-IhBNXiDl.js} +22 -22
- package/dist/component/{text-area-rac-kLFe-KbZ.js → text-area-rac-DHevCtFF.js} +1 -1
- package/dist/component/{text-input-field-rac-CqENSUUX.js → text-input-field-rac-Da3_wTdh.js} +5 -5
- package/dist/component/{text-input-headless-BdPkEeK2.js → text-input-headless-DcZRRXCp.js} +9 -9
- package/dist/component/{text-input-rac-uYQEfOtE.js → text-input-rac-564LIZ1_.js} +1 -1
- package/dist/component/{time-input-rac-BYoojlJ9.js → time-input-rac-p-Nnsxp_.js} +54 -54
- package/dist/component/{url-input-field-rac-BioH7kuz.js → url-input-field-rac-DjrcpRtm.js} +25 -25
- package/dist/component/{url-input-rac-D2VSSyqW.js → url-input-rac-B3brpyop.js} +1 -1
- package/dist/component/use-dropdown-trigger-class-name-BWTT7ltv.js +117 -0
- package/dist/component/{use-element-state-class-name-oiKCauK-.js → use-element-state-class-name-CUZuhFvZ.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-BW3nCyhG.js → use-hoverable-input-class-name-ugX8-g4E.js} +6 -6
- package/dist/component/use-is-forced-open-dropdown-DUZMvWpk.js +48 -0
- package/dist/component/{use-service-options-base-DXG60hA5.js → use-service-options-base-hqO9Ev38.js} +6 -6
- package/dist/component/use-text-input-class-name-wp9dzpEy.js +6 -0
- package/dist/form.d.ts +5 -0
- package/package.json +2 -2
- package/dist/component/dext-radio-group-rac-CtEjnu_X.js +0 -18
- package/dist/component/use-dropdown-option-class-name-BEmvU-Gg.js +0 -115
- package/dist/component/use-dropdown-trigger-class-name-qj9skLWZ.js +0 -40
- package/dist/component/use-text-input-class-name-BhQFcXYH.js +0 -6
|
@@ -3,20 +3,20 @@ import { RicosViewer as ne } from "@wix/ricos/viewer";
|
|
|
3
3
|
import L from "classnames";
|
|
4
4
|
import { ToggleButtonGroup as oe, TextField as re, Group as se, ToggleButton as ae, Input as le } from "react-aria-components";
|
|
5
5
|
import { debounce as ce } from "ts-debounce";
|
|
6
|
-
import {
|
|
7
|
-
import { f as O, a as
|
|
6
|
+
import { aE as K, bo as T, bl as P, by as ie, bg as x, bq as ue, S as me, a0 as pe, w as de, H as Ie, v as Ce, x as Ee } from "./form-DHAKwnLt.js";
|
|
7
|
+
import { f as O, a as F } from "./find-child-C60k4CxG.js";
|
|
8
8
|
import { a as Q } from "./format-currency-BwShJ9vM.js";
|
|
9
|
-
import { D as fe, E as Oe } from "./field-error-headless-
|
|
10
|
-
import { L as
|
|
11
|
-
import { F as
|
|
9
|
+
import { D as fe, E as Oe } from "./field-error-headless-E8WjFr_n.js";
|
|
10
|
+
import { L as ye } from "./field-label-headless-BakLOu5E.js";
|
|
11
|
+
import { F as be } from "./fieldset-headless-CD3fds9J.js";
|
|
12
12
|
import { a as _e, b as he } from "./numeric-input-utils-CuBMi4-a.js";
|
|
13
13
|
import { g as Ne } from "./payment-field-utils-DobiK5Xh.js";
|
|
14
14
|
import { u as ge } from "./use-synced-display-value-DcAxdn3M.js";
|
|
15
|
-
import { E as
|
|
15
|
+
import { E as Fe } from "./error-icon-hZxQ6DEy.js";
|
|
16
16
|
import { s as v } from "./field-rac.module-DfEb7pBp.js";
|
|
17
|
-
import { o as
|
|
18
|
-
import { u as Se } from "./use-element-state-class-name-
|
|
19
|
-
import { u as Le } from "./use-text-input-class-name-
|
|
17
|
+
import { o as De } from "./options-rac.module-_THNq6Qq.js";
|
|
18
|
+
import { u as Se } from "./use-element-state-class-name-CUZuhFvZ.js";
|
|
19
|
+
import { u as Le } from "./use-text-input-class-name-wp9dzpEy.js";
|
|
20
20
|
function ve(e, t) {
|
|
21
21
|
return e.reduce((o, r) => (o[r[t]] = r, o), {});
|
|
22
22
|
}
|
|
@@ -43,21 +43,21 @@ function Be(e, t) {
|
|
|
43
43
|
return (e == null ? void 0 : e.productId) === (t == null ? void 0 : t.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
|
|
44
44
|
}
|
|
45
45
|
const s = ({ children: e }) => {
|
|
46
|
-
const { id: t, value: o, onChange: r, required: l, onBlur: i, onFocus: C, validation: u, addOther: E, addOtherPlaceholder: p, FieldLayout: f } = T(), { inputId: c, labelId: d, ariaDescribedBy:
|
|
46
|
+
const { id: t, value: o, onChange: r, required: l, onBlur: i, onFocus: C, validation: u, addOther: E, addOtherPlaceholder: p, FieldLayout: f } = T(), { inputId: c, labelId: d, ariaDescribedBy: b } = P(), { t: m } = ie(), { currency: g, regionalFormat: _ } = x(), y = o == null ? void 0 : o[0], D = q(() => {
|
|
47
47
|
var I, h;
|
|
48
48
|
return ((h = (I = u == null ? void 0 : u.predefined) == null ? void 0 : I.paymentOptions) == null ? void 0 : h.products) || [];
|
|
49
49
|
}, [
|
|
50
50
|
u
|
|
51
|
-
]), B = q(() => Re(
|
|
52
|
-
|
|
53
|
-
]), a = q(() => E ? Pe(
|
|
54
|
-
|
|
51
|
+
]), B = q(() => Re(D), [
|
|
52
|
+
D
|
|
53
|
+
]), a = q(() => E ? Pe(D) : void 0, [
|
|
54
|
+
D,
|
|
55
55
|
E
|
|
56
|
-
]), W = Be(
|
|
56
|
+
]), W = Be(y, a), [H, M] = ge({
|
|
57
57
|
sourceValue: W,
|
|
58
58
|
format: (I) => he(String(I ?? ""), _),
|
|
59
59
|
regionalFormat: _
|
|
60
|
-
}),
|
|
60
|
+
}), V = S((I) => {
|
|
61
61
|
const h = I === void 0 ? void 0 : B[I];
|
|
62
62
|
r(h ? [
|
|
63
63
|
Y(h, Te(h))
|
|
@@ -66,50 +66,50 @@ const s = ({ children: e }) => {
|
|
|
66
66
|
r,
|
|
67
67
|
B,
|
|
68
68
|
M
|
|
69
|
-
]),
|
|
69
|
+
]), k = S((I) => {
|
|
70
70
|
a && r(typeof I == "number" ? [
|
|
71
71
|
Y(a, String(I))
|
|
72
72
|
] : []);
|
|
73
73
|
}, [
|
|
74
74
|
r,
|
|
75
75
|
a
|
|
76
|
-
]),
|
|
77
|
-
|
|
76
|
+
]), w = q(() => ce(k, 500), [
|
|
77
|
+
k
|
|
78
78
|
]), j = S((I) => {
|
|
79
|
-
(
|
|
80
|
-
const { validInput: h, validNumber: ee } = _e(I.target.value, Ae,
|
|
81
|
-
M(h),
|
|
79
|
+
(y == null ? void 0 : y.productId) !== (a == null ? void 0 : a.id) && r(void 0);
|
|
80
|
+
const { validInput: h, validNumber: ee } = _e(I.target.value, Ae, H, _);
|
|
81
|
+
M(h), w(ee);
|
|
82
82
|
}, [
|
|
83
83
|
_,
|
|
84
84
|
r,
|
|
85
|
-
|
|
85
|
+
y,
|
|
86
86
|
a,
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
H,
|
|
88
|
+
w,
|
|
89
89
|
M
|
|
90
|
-
]),
|
|
91
|
-
a != null && a.id &&
|
|
90
|
+
]), U = (y == null ? void 0 : y.productId) || null, z = S(() => {
|
|
91
|
+
a != null && a.id && U !== a.id && V(a.id);
|
|
92
92
|
}, [
|
|
93
93
|
a == null ? void 0 : a.id,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
]), J = O(e, s.Label),
|
|
94
|
+
U,
|
|
95
|
+
V
|
|
96
|
+
]), J = O(e, s.Label), G = O(e, s.Control), X = O(e, s.Description), Z = O(e, s.Error);
|
|
97
97
|
return /* @__PURE__ */ n.createElement(f, {
|
|
98
98
|
fieldId: t,
|
|
99
99
|
renderLabel: () => J,
|
|
100
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
100
|
+
renderInput: () => /* @__PURE__ */ n.createElement(be, {
|
|
101
101
|
id: c,
|
|
102
102
|
ariaLabelledBy: d,
|
|
103
|
-
ariaDescribedBy:
|
|
103
|
+
ariaDescribedBy: b,
|
|
104
104
|
required: l,
|
|
105
105
|
onBlur: i,
|
|
106
106
|
onFocus: C
|
|
107
|
-
},
|
|
107
|
+
}, G ? F(G, {
|
|
108
108
|
productsById: B,
|
|
109
|
-
selectedValue:
|
|
110
|
-
onSelectProduct:
|
|
109
|
+
selectedValue: U,
|
|
110
|
+
onSelectProduct: V,
|
|
111
111
|
addOther: E,
|
|
112
|
-
customAmount:
|
|
112
|
+
customAmount: H,
|
|
113
113
|
onCustomAmountInputChange: j,
|
|
114
114
|
currency: g,
|
|
115
115
|
t: m,
|
|
@@ -120,25 +120,25 @@ const s = ({ children: e }) => {
|
|
|
120
120
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, Z, X)
|
|
121
121
|
});
|
|
122
122
|
}, Me = ({ children: e, className: t, ...o }) => {
|
|
123
|
-
const { productsById: r, selectedValue: l, onSelectProduct: i, addOther: C, customAmount: u, onCustomAmountInputChange: E, currency: p, t: f, placeholder: c, customAmountProductId: d, onFocusCustomInput:
|
|
123
|
+
const { productsById: r, selectedValue: l, onSelectProduct: i, addOther: C, customAmount: u, onCustomAmountInputChange: E, currency: p, t: f, placeholder: c, customAmountProductId: d, onFocusCustomInput: b } = o, { hasError: m } = T(), g = O(e, s.Options), _ = O(e, s.OtherInput);
|
|
124
124
|
return /* @__PURE__ */ n.createElement("div", {
|
|
125
125
|
className: t,
|
|
126
126
|
"data-invalid": m
|
|
127
|
-
}, g ?
|
|
127
|
+
}, g ? F(g, {
|
|
128
128
|
productsById: r,
|
|
129
129
|
selectedValue: l,
|
|
130
130
|
onSelectProduct: i
|
|
131
|
-
}) : null, _ && C ?
|
|
131
|
+
}) : null, _ && C ? F(_, {
|
|
132
132
|
customAmount: u,
|
|
133
133
|
onCustomAmountInputChange: E,
|
|
134
134
|
currency: p,
|
|
135
135
|
t: f,
|
|
136
136
|
placeholder: c,
|
|
137
137
|
customAmountProductId: d,
|
|
138
|
-
onFocusCustomInput:
|
|
138
|
+
onFocusCustomInput: b
|
|
139
139
|
}) : null);
|
|
140
|
-
},
|
|
141
|
-
const { productsById: r, selectedValue: l, onSelectProduct: i } = o, { options: C, numberOfColumns: u, disabled: E } = T(), { labelId: p } = P(), f = O(e,
|
|
140
|
+
}, $ = ({ children: e, className: t, ...o }) => {
|
|
141
|
+
const { productsById: r, selectedValue: l, onSelectProduct: i } = o, { options: C, numberOfColumns: u, disabled: E } = T(), { labelId: p } = P(), f = O(e, $.Option);
|
|
142
142
|
return /* @__PURE__ */ n.createElement(oe, {
|
|
143
143
|
className: t,
|
|
144
144
|
"data-columns": u,
|
|
@@ -153,11 +153,11 @@ const s = ({ children: e }) => {
|
|
|
153
153
|
isDisabled: E
|
|
154
154
|
}, C.map((c) => {
|
|
155
155
|
var m;
|
|
156
|
-
const d = r[c.value],
|
|
157
|
-
return
|
|
156
|
+
const d = r[c.value], b = (m = d == null ? void 0 : d.fixedPriceOptions) == null ? void 0 : m.price;
|
|
157
|
+
return F(f, {
|
|
158
158
|
key: c.value,
|
|
159
159
|
value: c.value,
|
|
160
|
-
price:
|
|
160
|
+
price: b || "0"
|
|
161
161
|
});
|
|
162
162
|
}));
|
|
163
163
|
}, R = ({ children: e, className: t, ...o }) => {
|
|
@@ -170,7 +170,7 @@ const s = ({ children: e }) => {
|
|
|
170
170
|
var m;
|
|
171
171
|
(m = d.current) == null || m.focus();
|
|
172
172
|
}, i);
|
|
173
|
-
const
|
|
173
|
+
const b = p ? F(p, {
|
|
174
174
|
price: l
|
|
175
175
|
}) : null;
|
|
176
176
|
return /* @__PURE__ */ n.createElement(ae, {
|
|
@@ -178,7 +178,7 @@ const s = ({ children: e }) => {
|
|
|
178
178
|
className: t,
|
|
179
179
|
ref: d,
|
|
180
180
|
"data-invalid": C || void 0
|
|
181
|
-
}, /* @__PURE__ */ n.createElement(n.Fragment, null, c && f,
|
|
181
|
+
}, /* @__PURE__ */ n.createElement(n.Fragment, null, c && f, b, !c && f));
|
|
182
182
|
}, qe = ({ className: e, ...t }) => {
|
|
183
183
|
const { price: o } = t, { currency: r, regionalFormat: l } = x(), { value: i } = Q({
|
|
184
184
|
amount: o,
|
|
@@ -197,38 +197,38 @@ const s = ({ children: e }) => {
|
|
|
197
197
|
R.Value = qe;
|
|
198
198
|
R.Currency = xe;
|
|
199
199
|
const A = ({ children: e, className: t, ...o }) => {
|
|
200
|
-
const { customAmount: r, onCustomAmountInputChange: l, currency: i, t: C, placeholder: u, customAmountProductId: E, onFocusCustomInput: p } = o, { disabled: f, hasError: c } = T(), { labelId: d, prefixId:
|
|
200
|
+
const { customAmount: r, onCustomAmountInputChange: l, currency: i, t: C, placeholder: u, customAmountProductId: E, onFocusCustomInput: p } = o, { disabled: f, hasError: c } = T(), { labelId: d, prefixId: b } = P(), m = O(e, A.Currency), g = O(e, A.Value), _ = S((D) => {
|
|
201
201
|
l({
|
|
202
202
|
target: {
|
|
203
|
-
value:
|
|
203
|
+
value: D
|
|
204
204
|
}
|
|
205
205
|
});
|
|
206
206
|
}, [
|
|
207
207
|
l
|
|
208
|
-
]),
|
|
208
|
+
]), y = S(() => {
|
|
209
209
|
p();
|
|
210
210
|
}, [
|
|
211
211
|
p
|
|
212
212
|
]);
|
|
213
213
|
return /* @__PURE__ */ n.createElement(re, {
|
|
214
|
-
"aria-labelledby": `${d} ${
|
|
214
|
+
"aria-labelledby": `${d} ${b}`,
|
|
215
215
|
value: r,
|
|
216
216
|
onChange: _,
|
|
217
|
-
onFocus:
|
|
217
|
+
onFocus: y,
|
|
218
218
|
isDisabled: f,
|
|
219
219
|
isInvalid: c
|
|
220
220
|
}, /* @__PURE__ */ n.createElement(se, {
|
|
221
221
|
className: t,
|
|
222
222
|
isDisabled: f,
|
|
223
223
|
isInvalid: c
|
|
224
|
-
}, r && i && m ?
|
|
224
|
+
}, r && i && m ? F(m, {
|
|
225
225
|
currency: i,
|
|
226
226
|
t: C
|
|
227
|
-
}) : null, g ?
|
|
227
|
+
}) : null, g ? F(g, {
|
|
228
228
|
placeholder: u,
|
|
229
229
|
customAmountProductId: E
|
|
230
230
|
}) : null));
|
|
231
|
-
},
|
|
231
|
+
}, He = ({ className: e, ...t }) => {
|
|
232
232
|
const { currency: o, t: r } = t, { prefixId: l } = P();
|
|
233
233
|
return /* @__PURE__ */ n.createElement("span", {
|
|
234
234
|
id: l,
|
|
@@ -236,7 +236,7 @@ const A = ({ children: e, className: t, ...o }) => {
|
|
|
236
236
|
"aria-label": Ne(r, o),
|
|
237
237
|
className: e
|
|
238
238
|
}, (o == null ? void 0 : o.sign) || (o == null ? void 0 : o.code) || "");
|
|
239
|
-
},
|
|
239
|
+
}, Ve = ({ className: e, ...t }) => {
|
|
240
240
|
const { placeholder: o, customAmountProductId: r } = t, { ariaDescribedBy: l, labelId: i, prefixId: C } = P();
|
|
241
241
|
return /* @__PURE__ */ n.createElement(le, {
|
|
242
242
|
id: r,
|
|
@@ -248,21 +248,21 @@ const A = ({ children: e, className: t, ...o }) => {
|
|
|
248
248
|
className: e
|
|
249
249
|
});
|
|
250
250
|
};
|
|
251
|
-
A.Currency =
|
|
252
|
-
A.Value =
|
|
253
|
-
|
|
254
|
-
s.Label =
|
|
251
|
+
A.Currency = He;
|
|
252
|
+
A.Value = Ve;
|
|
253
|
+
$.Option = R;
|
|
254
|
+
s.Label = ye;
|
|
255
255
|
s.Control = Me;
|
|
256
|
-
s.Options =
|
|
256
|
+
s.Options = $;
|
|
257
257
|
s.OtherInput = A;
|
|
258
258
|
s.Description = fe;
|
|
259
259
|
s.Error = Oe;
|
|
260
|
-
const
|
|
261
|
-
control:
|
|
262
|
-
option:
|
|
263
|
-
optionHover:
|
|
264
|
-
optionSelected:
|
|
265
|
-
optionCurrency:
|
|
260
|
+
const Ue = "_control_n5tqu_1", $e = "_option_n5tqu_7", ke = "_optionHover_n5tqu_37", we = "_optionSelected_n5tqu_37", Ge = "_optionCurrency_n5tqu_87", Ye = "_otherInput_n5tqu_91", Ke = "_otherInputCurrency_n5tqu_110", N = {
|
|
261
|
+
control: Ue,
|
|
262
|
+
option: $e,
|
|
263
|
+
optionHover: ke,
|
|
264
|
+
optionSelected: we,
|
|
265
|
+
optionCurrency: Ge,
|
|
266
266
|
otherInput: Ye,
|
|
267
267
|
otherInputCurrency: Ke
|
|
268
268
|
}, Qe = ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(ne, {
|
|
@@ -284,7 +284,7 @@ const $e = "_control_n5tqu_1", ke = "_option_n5tqu_7", Ue = "_optionHover_n5tqu_
|
|
|
284
284
|
})), /* @__PURE__ */ n.createElement(s.Control, {
|
|
285
285
|
className: N.control
|
|
286
286
|
}, /* @__PURE__ */ n.createElement(s.Options, {
|
|
287
|
-
className: L(de,
|
|
287
|
+
className: L(de, De.options, N.options)
|
|
288
288
|
}, /* @__PURE__ */ n.createElement(s.Options.Option, {
|
|
289
289
|
className: t
|
|
290
290
|
}, /* @__PURE__ */ n.createElement(s.Options.Option.Value, null), /* @__PURE__ */ n.createElement(s.Options.Option.Currency, {
|
|
@@ -297,7 +297,7 @@ const $e = "_control_n5tqu_1", ke = "_option_n5tqu_7", Ue = "_optionHover_n5tqu_
|
|
|
297
297
|
className: v.innerInput
|
|
298
298
|
}))), /* @__PURE__ */ n.createElement(s.Error, {
|
|
299
299
|
className: L(Ie, v.error)
|
|
300
|
-
}, /* @__PURE__ */ n.createElement(
|
|
300
|
+
}, /* @__PURE__ */ n.createElement(Fe, null), /* @__PURE__ */ n.createElement(s.Error.Text, null)), /* @__PURE__ */ n.createElement(s.Description, {
|
|
301
301
|
className: L(Ce, v.description)
|
|
302
302
|
}, Qe));
|
|
303
303
|
}, Ct = () => /* @__PURE__ */ n.createElement(je, null);
|
package/dist/component/{dropdown-field-headless-C3OxMhLE.js → dropdown-field-headless-7SCC-xOC.js}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import e, { useState as b, useCallback as g, useRef as _ } from "react";
|
|
2
|
-
import { UNSAFE_PortalProvider as
|
|
2
|
+
import { UNSAFE_PortalProvider as k } from "react-aria";
|
|
3
3
|
import { Select as M, SelectValue as H, ListBoxItem as U } from "react-aria-components";
|
|
4
|
-
import {
|
|
4
|
+
import { bo as E, bl as O, bq as Y } from "./form-DHAKwnLt.js";
|
|
5
5
|
import { f as d, a as F } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { D as j, E as z } from "./field-error-headless-
|
|
7
|
-
import { L as G } from "./field-label-headless-
|
|
6
|
+
import { D as j, E as z } from "./field-error-headless-E8WjFr_n.js";
|
|
7
|
+
import { L as G } from "./field-label-headless-BakLOu5E.js";
|
|
8
8
|
import { E as J, S as K, N as Q } from "./non-modal-popover-D-u13tmp.js";
|
|
9
|
-
import { a as W } from "./use-
|
|
10
|
-
import { V as X } from "./use-dropdown-
|
|
9
|
+
import { a as W } from "./use-is-forced-open-dropdown-DUZMvWpk.js";
|
|
10
|
+
import { V as X } from "./use-dropdown-trigger-class-name-BWTT7ltv.js";
|
|
11
11
|
const r = ({ children: n }) => {
|
|
12
|
-
const { id: l, value:
|
|
12
|
+
const { id: l, value: o, defaultValue: a, options: u = [], readOnly: s, onChange: t, placeholder: m, disabled: i, required: v, onBlur: L, onFocus: y, FieldLayout: C, hasError: D } = E(), [I, h] = b(!1), p = W(l), [P, S] = b(null), T = o && u.some((c) => (c.value ?? c.label) === o) ? o : a || null, { labelId: B } = O(), N = g((c) => {
|
|
13
13
|
s || t(typeof c == "string" ? c : null);
|
|
14
14
|
}, [
|
|
15
15
|
t,
|
|
@@ -17,7 +17,7 @@ const r = ({ children: n }) => {
|
|
|
17
17
|
]), V = g((c) => h(c && !i && !s), [
|
|
18
18
|
i,
|
|
19
19
|
s
|
|
20
|
-
]), R = d(n, r.Label), x = d(n, r.Trigger),
|
|
20
|
+
]), R = d(n, r.Label), x = d(n, r.Trigger), q = d(n, r.Options), w = d(n, r.Description), A = d(n, r.Error);
|
|
21
21
|
return /* @__PURE__ */ e.createElement(C, {
|
|
22
22
|
fieldId: l,
|
|
23
23
|
renderLabel: () => R,
|
|
@@ -26,59 +26,59 @@ const r = ({ children: n }) => {
|
|
|
26
26
|
style: {
|
|
27
27
|
display: "contents"
|
|
28
28
|
}
|
|
29
|
-
}), /* @__PURE__ */ e.createElement(
|
|
29
|
+
}), /* @__PURE__ */ e.createElement(k, {
|
|
30
30
|
getContainer: () => P
|
|
31
31
|
}, /* @__PURE__ */ e.createElement(M, {
|
|
32
32
|
"aria-labelledby": B,
|
|
33
33
|
value: T,
|
|
34
|
-
isOpen:
|
|
35
|
-
onOpenChange:
|
|
34
|
+
isOpen: p || I && !i && !s,
|
|
35
|
+
onOpenChange: p ? void 0 : V,
|
|
36
36
|
onChange: N,
|
|
37
37
|
isDisabled: i,
|
|
38
38
|
isInvalid: D,
|
|
39
39
|
isRequired: v,
|
|
40
|
-
placeholder:
|
|
40
|
+
placeholder: m || J,
|
|
41
41
|
onBlur: L,
|
|
42
42
|
onFocus: y
|
|
43
|
-
}, x, F(
|
|
44
|
-
isForcedOpen:
|
|
43
|
+
}, x, F(q, {
|
|
44
|
+
isForcedOpen: p
|
|
45
45
|
})))),
|
|
46
46
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, A, w)
|
|
47
47
|
});
|
|
48
48
|
}, Z = ({ children: n, className: l }) => {
|
|
49
|
-
const { inputId:
|
|
49
|
+
const { inputId: o, ariaDescribedBy: a } = O(), { id: u, hasError: s, isLoading: t } = E(), m = _(null);
|
|
50
50
|
return Y(() => {
|
|
51
51
|
var i;
|
|
52
|
-
(i =
|
|
52
|
+
(i = m.current) == null || i.focus();
|
|
53
53
|
}, u), /* @__PURE__ */ e.createElement(K, {
|
|
54
|
-
ref:
|
|
55
|
-
id:
|
|
56
|
-
"aria-describedby":
|
|
54
|
+
ref: m,
|
|
55
|
+
id: o,
|
|
56
|
+
"aria-describedby": a,
|
|
57
57
|
className: l,
|
|
58
58
|
"data-invalid": s || void 0,
|
|
59
59
|
"data-loading": t || void 0
|
|
60
60
|
}, /* @__PURE__ */ e.createElement(H, null), n);
|
|
61
|
-
}, f = ({ children: n, className: l, ...
|
|
62
|
-
const { isForcedOpen:
|
|
61
|
+
}, f = ({ children: n, className: l, ...o }) => {
|
|
62
|
+
const { isForcedOpen: a } = o, { options: u = [] } = E(), s = d(n, f.Option);
|
|
63
63
|
return /* @__PURE__ */ e.createElement(Q, {
|
|
64
64
|
className: l,
|
|
65
65
|
containerPadding: 0,
|
|
66
66
|
offset: 0
|
|
67
67
|
}, /* @__PURE__ */ e.createElement(X, {
|
|
68
|
-
isForcedOpen:
|
|
69
|
-
autoFocus:
|
|
68
|
+
isForcedOpen: a,
|
|
69
|
+
autoFocus: a ? !1 : void 0
|
|
70
70
|
}, u.map((t) => F(s, {
|
|
71
71
|
key: t.value ?? t.label,
|
|
72
72
|
value: t.value ?? t.label,
|
|
73
73
|
label: t.label
|
|
74
74
|
}))));
|
|
75
75
|
}, $ = ({ className: n, ...l }) => {
|
|
76
|
-
const { value:
|
|
76
|
+
const { value: o, label: a } = l;
|
|
77
77
|
return /* @__PURE__ */ e.createElement(U, {
|
|
78
78
|
className: n,
|
|
79
|
-
id:
|
|
80
|
-
textValue:
|
|
81
|
-
},
|
|
79
|
+
id: o,
|
|
80
|
+
textValue: a
|
|
81
|
+
}, a);
|
|
82
82
|
};
|
|
83
83
|
f.Option = $;
|
|
84
84
|
r.Label = G;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
2
|
import a from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { D as r } from "./dropdown-field-headless-
|
|
4
|
+
import { D as r } from "./dropdown-field-headless-7SCC-xOC.js";
|
|
5
5
|
import { C as n } from "./chevron-down-icon-CcpVm6B-.js";
|
|
6
6
|
import { E as l } from "./error-icon-hZxQ6DEy.js";
|
|
7
7
|
import { H as c } from "./custom-focus-class-_483Pkwp.js";
|
|
8
8
|
import { s as o } from "./field-rac.module-DfEb7pBp.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
const C = ({ content: t, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
9
|
+
import { S as i, a0 as p, y as E, H as D, v as _ } from "./form-DHAKwnLt.js";
|
|
10
|
+
import { a as O, u as R } from "./use-dropdown-trigger-class-name-BWTT7ltv.js";
|
|
11
|
+
const S = ({ content: t, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
13
12
|
content: t,
|
|
14
13
|
locale: s
|
|
15
|
-
}),
|
|
16
|
-
const t =
|
|
14
|
+
}), w = () => {
|
|
15
|
+
const t = O(o.dropdownTrigger), s = R(c);
|
|
17
16
|
return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
18
17
|
className: a(i, o.label)
|
|
19
18
|
}, /* @__PURE__ */ e.createElement(r.Label.Required, {
|
|
@@ -30,8 +29,8 @@ const C = ({ content: t, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
|
30
29
|
className: a(D, o.error)
|
|
31
30
|
}, /* @__PURE__ */ e.createElement(l, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
32
31
|
className: a(_, o.description)
|
|
33
|
-
},
|
|
32
|
+
}, S));
|
|
34
33
|
};
|
|
35
34
|
export {
|
|
36
|
-
|
|
35
|
+
w as D
|
|
37
36
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o, { useMemo as n } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { C as
|
|
4
|
-
const
|
|
2
|
+
import { bo as a, by as c, aq as i } from "./form-DHAKwnLt.js";
|
|
3
|
+
import { C as l } from "./checkbox-field-rac-DEa78Tpf.js";
|
|
4
|
+
const p = (e) => ({
|
|
5
5
|
nodes: [
|
|
6
6
|
{
|
|
7
7
|
paragraphData: {
|
|
@@ -25,7 +25,7 @@ const l = (e) => ({
|
|
|
25
25
|
}
|
|
26
26
|
]
|
|
27
27
|
}), u = () => {
|
|
28
|
-
const e = a(), { t } = c(), r = n(() =>
|
|
28
|
+
const e = a(), { t } = c(), r = n(() => p(t), [
|
|
29
29
|
t
|
|
30
30
|
]), s = {
|
|
31
31
|
...e,
|
|
@@ -35,7 +35,7 @@ const l = (e) => ({
|
|
|
35
35
|
value: {
|
|
36
36
|
v2: s
|
|
37
37
|
}
|
|
38
|
-
}, /* @__PURE__ */ o.createElement(
|
|
38
|
+
}, /* @__PURE__ */ o.createElement(l, null));
|
|
39
39
|
};
|
|
40
40
|
export {
|
|
41
41
|
u as EcomSubscriptionCheckboxRAC
|