@wix/form-elements 1.89.0 → 1.91.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-CDZ0Gdin.js} +6 -6
- package/dist/component/{bookings-address-rac-cNBSx-Pr.js → bookings-address-rac-pmQyMw-1.js} +1 -1
- package/dist/component/{bookings-email-rac-CYdSoVWP.js → bookings-email-rac-CzDEYpBV.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CQB2o8ww.js → bookings-first-name-rac-qg7T37FZ.js} +1 -1
- package/dist/component/{bookings-header-rac-CzKvQond.js → bookings-header-rac-Dmwmt_Cp.js} +1 -1
- package/dist/component/{bookings-last-name-rac-oK1BC5Am.js → bookings-last-name-rac-CXTtlnYI.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CZNEy748.js → bookings-login-bar-rac-DTs9s6hU.js} +21 -21
- package/dist/component/{bookings-phone-rac-D_4WfolC.js → bookings-phone-rac-C7AEVZA-.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CrEfeL4P.js → bookings-rich-text-rac-CBGVMqOn.js} +1 -1
- package/dist/component/{checkbox-field-rac-CGqshW45.js → checkbox-field-rac-BggtF6cZ.js} +49 -49
- package/dist/component/{checkbox-group-field-headless-C3_5IR-E.js → checkbox-group-field-headless-O2ZsF7An.js} +30 -30
- package/dist/component/{checkbox-group-field-rac-DIzdgyAw.js → checkbox-group-field-rac-OC3W4Taz.js} +9 -9
- package/dist/component/{checkbox-group-rac-EvWVfusV.js → checkbox-group-rac-CZuEXWgx.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-W-a8Z0ht.js} +1 -1
- package/dist/component/{contacts-address-rac-M8MZd777.js → contacts-address-rac-DtG9NDgw.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BS-8HeRD.js → contacts-birthdate-rac-DS7uNjKO.js} +1 -1
- package/dist/component/{contacts-company-rac-gmgKLvic.js → contacts-company-rac-CQX5azvs.js} +1 -1
- package/dist/component/{contacts-email-rac-QQ6E9VzX.js → contacts-email-rac-QgYLfH6e.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DR7XheRo.js → contacts-first-name-rac-BrlHl2Uj.js} +1 -1
- package/dist/component/{contacts-last-name-rac-CBJgTkj5.js → contacts-last-name-rac-ieDtRIbl.js} +1 -1
- package/dist/component/{contacts-phone-rac-CTl25HdK.js → contacts-phone-rac-LTjC8k7e.js} +1 -1
- package/dist/component/{contacts-position-rac-DBDOW7QR.js → contacts-position-rac-CxbAUzIc.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-C0-uJ7fU.js → contacts-subscribe-rac-H0dNjYV8.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-BtXc0V1S.js → contacts-tax-id-rac-uhTEMEwl.js} +1 -1
- package/dist/component/{date-availability-IQtwk-aX.js → date-availability-eRjWauCz.js} +1 -1
- package/dist/component/{date-input-field-rac-2rbZiSgo.js → date-input-field-rac-BKb019gB.js} +99 -98
- package/dist/component/{date-input-rac-j4--xZ8s.js → date-input-rac-BBllT9pM.js} +1 -1
- package/dist/component/{date-picker-field-rac-Cl7ueVVn.js → date-picker-field-rac-CSXVWmGL.js} +43 -43
- package/dist/component/{date-picker-rac-BrObkuYv.js → date-picker-rac-CwEFOSSe.js} +1 -1
- package/dist/component/date-time-input-field-rac-C4yIIebr.js +424 -0
- package/dist/component/{date-time-input-rac-BShquR72.js → date-time-input-rac-DsGlyO8x.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DNXYnHDM.js → dext-checkbox-group-rac-Bs9tVVXo.js} +2 -2
- package/dist/component/{dext-checkbox-rac-RBMWmgyT.js → dext-checkbox-rac-FEjZejl7.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Dph_kV11.js → dext-date-picker-rac-Mdbuq1mu.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-C3_gQkBT.js → dext-date-time-input-rac-B4dRBObU.js} +1 -1
- package/dist/component/{dext-dropdown-rac-D34vhtST.js → dext-dropdown-rac-QVngfb7K.js} +1 -1
- package/dist/component/{dext-email-rac-Yzf4-vSg.js → dext-email-rac-cURI3VuR.js} +1 -1
- package/dist/component/{dext-number-input-rac-D0jZXKaI.js → dext-number-input-rac-CovkZ8Ey.js} +1 -1
- package/dist/component/{dext-phone-rac-bqTpmTa0.js → dext-phone-rac-C8GjKZnH.js} +1 -1
- package/dist/component/{dext-radio-group-rac-AYPAzpqZ.js → dext-radio-group-rac-BlrJmIH3.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DOSq-xVQ.js → dext-rating-input-rac-jIJisfdp.js} +1 -1
- package/dist/component/{dext-tags-rac-BXtFTlL0.js → dext-tags-rac-BXjCLX6y.js} +2 -2
- package/dist/component/{dext-text-area-rac-46wwBQg_.js → dext-text-area-rac-CD_x4meg.js} +1 -1
- package/dist/component/{dext-text-input-rac-DVj6V1VG.js → dext-text-input-rac-Du51Nj6q.js} +1 -1
- package/dist/component/{dext-url-input-rac-B5zu9R5K.js → dext-url-input-rac-_W6CW5hp.js} +1 -1
- package/dist/component/{donation-rac-DeBMssGg.js → donation-rac-9njvq8HE.js} +51 -51
- package/dist/component/dropdown-field-headless-BBc5oicg.js +101 -0
- package/dist/component/dropdown-field-rac-BYRb3VEI.js +36 -0
- package/dist/component/{dropdown-rac-bUNYh49x.js → dropdown-rac-BBrPWiSg.js} +1 -1
- package/dist/component/{ecom-address-rac-CtrERV3f.js → ecom-address-rac-CDJ46mdt.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BrpwOSYM.js → ecom-subscription-checkbox-rac-DItvmxzX.js} +6 -6
- package/dist/component/{email-input-field-rac-4yYxYc1a.js → email-input-field-rac-aeRdkPOh.js} +63 -63
- package/dist/component/{events-repeater-rac-B308C1JK.js → events-repeater-rac-CzVycetd.js} +35 -35
- package/dist/component/{events-rsvp-rac-C4_LJ3Wz.js → events-rsvp-rac-BhLYlH1V.js} +6 -6
- package/dist/component/{field-error-headless-PMBWtb3Z.js → field-error-headless-T9JfqiMS.js} +12 -12
- package/dist/component/{field-label-headless-0racVfdo.js → field-label-headless-bDWQszAb.js} +12 -12
- package/dist/component/field-rac.module-BUvPquav.js +26 -0
- package/dist/component/{file-upload-rac-CZIHV2OL.js → file-upload-rac-Dk-delp2.js} +116 -116
- package/dist/component/{fixed-payment-rac-COhRKeun.js → fixed-payment-rac-Bj8RMj1w.js} +15 -15
- package/dist/component/{form-UCnayEKT.js → form-C7cB75mm.js} +1130 -1128
- 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-RzI5owwx.js} +3 -3
- package/dist/component/{header-rac-CCsguMlZ.js → header-rac-DQgyaMDA.js} +1 -1
- package/dist/component/{image-choice-rac-j2UH4Q4I.js → image-choice-rac-DOs1eI0_.js} +20 -20
- package/dist/component/{index-jg8dn8po.js → index-C90Q2rfK.js} +2 -2
- package/dist/component/{index-Bxa3IDHm.js → index-DlPclNOa.js} +4 -4
- package/dist/component/{isObjectLike-Zw6J9g91.js → isObjectLike-DLz0WtlZ.js} +1 -1
- package/dist/component/{multiline-address-field-rac-BeFAYL7V.js → multiline-address-field-rac-DHYRZxtJ.js} +575 -574
- package/dist/component/{multiline-address-rac-BYr5_DQd.js → multiline-address-rac-7sUhPDFM.js} +1 -1
- package/dist/component/{number-input-field-rac-BNdJecUL.js → number-input-field-rac-DMHSUbYN.js} +24 -24
- package/dist/component/{number-input-rac-Cqkj4JAF.js → number-input-rac-CF5271QD.js} +1 -1
- package/dist/component/{password-rac-D4iSs1ds.js → password-rac-CxQRcSEb.js} +21 -21
- package/dist/component/{payment-input-rac-BvBP47HP.js → payment-input-rac-C20HS9QN.js} +25 -25
- package/dist/component/{phone-input-field-rac-Cggx8IlY.js → phone-input-field-rac-BDF_4RJE.js} +185 -184
- package/dist/component/{phone-rac-BISmYt_n.js → phone-rac-pGbG3Cu0.js} +1 -1
- package/dist/component/{product-list-rac-C1bm-U2G.js → product-list-rac-CxyJaRQ6.js} +43 -43
- package/dist/component/quiz-radio-group-rac-CCddKnuf.js +13 -0
- package/dist/component/{radio-button-module-classes-blfiatlc.js → radio-button-module-classes-uyJAJMZn.js} +7 -7
- package/dist/component/{radio-group-field-rac-BiiPUxbQ.js → radio-group-field-rac-VwR2FlNg.js} +5 -5
- package/dist/component/{radio-group-rac-Bn_W-3xz.js → radio-group-rac-D8pzwSCS.js} +1 -1
- package/dist/component/{rating-input-field-rac-CjXIoNMc.js → rating-input-field-rac-C4ohOgX0.js} +24 -24
- package/dist/component/{rating-input-rac-Ci4uPo22.js → rating-input-rac-NpCggSGK.js} +1 -1
- package/dist/component/{rich-content-rac.module-CDZniyrZ.js → rich-content-rac.module-B9HHqJL4.js} +4 -4
- package/dist/component/{rich-text-field-rac-BBRE9_Kr.js → rich-text-field-rac-C3qKHitl.js} +5 -5
- package/dist/component/{rich-text-rac-C3MfJK-H.js → rich-text-rac-BJkS9CGE.js} +1 -1
- package/dist/component/service-dropdown-rac-BTdBTfeg.js +146 -0
- package/dist/component/{services-multi-choice-rac-FDHRjDLS.js → services-multi-choice-rac-Nl74A8jo.js} +18 -18
- package/dist/component/{signature-rac-DfGPV0Mw.js → signature-rac-BAVXA-5Q.js} +53 -53
- package/dist/component/{submit-button-rac-DRsqyJcl.js → submit-button-rac-DlmeZjy_.js} +7 -7
- package/dist/component/{tags-field-rac-CZ4FBGG9.js → tags-field-rac-BFBSf5mt.js} +56 -56
- package/dist/component/{tags-rac-CMHMsiwv.js → tags-rac-S_GJQpwJ.js} +1 -1
- package/dist/component/text-area-field-rac-D1qLXh4K.js +73 -0
- package/dist/component/{text-area-rac-BKGDa4E3.js → text-area-rac-DejqDYR0.js} +1 -1
- package/dist/component/{text-input-field-rac-CU8eBRM4.js → text-input-field-rac-DwPTWyiR.js} +6 -6
- package/dist/component/{text-input-headless-C1eFy2gl.js → text-input-headless-BUljrxVJ.js} +6 -6
- package/dist/component/{text-input-rac-DO0eI3ty.js → text-input-rac-CCWkAOVG.js} +1 -1
- package/dist/component/{time-input-rac-BJ0AL2Be.js → time-input-rac-b09-o8Uw.js} +23 -23
- package/dist/component/{url-input-field-rac-BtpAuKfp.js → url-input-field-rac-DYGAFldc.js} +22 -22
- package/dist/component/{url-input-rac-CjnPbcHt.js → url-input-rac-CsAWnWt5.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-CruN_y12.js +28 -0
- package/dist/component/{use-element-state-class-name-X08kIFhd.js → use-element-state-class-name-DZhlOoWK.js} +1 -1
- package/dist/component/{use-service-options-base-DfHhMveM.js → use-service-options-base-JNSCsxxz.js} +3 -3
- package/dist/component/{use-text-input-class-name-BAuokapo.js → use-text-input-class-name-CgCYHOMw.js} +4 -4
- package/dist/form.d.ts +18 -7
- package/package.json +23 -22
- 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
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import t, { useMemo as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import t, { useMemo as G, useCallback as x, useRef as B } from "react";
|
|
2
|
+
import { RicosViewer as K } from "@wix/ricos/viewer";
|
|
3
3
|
import _ from "classnames";
|
|
4
|
-
import { CheckboxField as
|
|
5
|
-
import {
|
|
6
|
-
import { f as
|
|
7
|
-
import { L as te, g as ne } from "./field-label-headless-
|
|
4
|
+
import { CheckboxField as $, CheckboxButton as X, NumberField as j, Group as J, Button as U, Input as W } from "react-aria-components";
|
|
5
|
+
import { ak as k, ah as Y, ac as w, au as Z, am as ee } from "./form-C7cB75mm.js";
|
|
6
|
+
import { f as O, a as I } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { L as te, g as ne } from "./field-label-headless-bDWQszAb.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-T9JfqiMS.js";
|
|
10
10
|
import { F as le } from "./fieldset-headless-CD3fds9J.js";
|
|
11
11
|
import { g as se } from "./payment-field-utils-DobiK5Xh.js";
|
|
12
12
|
import { S as ie } from "./selection-indicator-XQ8MYHUQ.js";
|
|
13
13
|
import { E as ce } from "./error-icon-hZxQ6DEy.js";
|
|
14
|
-
import { C as ue } from "./checkbox-indicator-module-classes-
|
|
15
|
-
import { s as T } from "./field-rac.module-
|
|
16
|
-
import {
|
|
14
|
+
import { C as ue } from "./checkbox-indicator-module-classes-mJ7hl_8K.js";
|
|
15
|
+
import { s as T } from "./field-rac.module-BUvPquav.js";
|
|
16
|
+
import { B as me, R as pe, E as de, I as Ee, H as ye, z as fe, q as _e, i as Ie, G as Oe } from "./form-element-classes-CLZXu-91.js";
|
|
17
17
|
import { o as Q } from "./options-rac.module-KM-VT_KY.js";
|
|
18
|
-
import { u as
|
|
18
|
+
import { u as be } from "./use-element-state-class-name-DZhlOoWK.js";
|
|
19
19
|
var Le = /* @__PURE__ */ (function(e) {
|
|
20
20
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
21
21
|
})({}), M = /* @__PURE__ */ (function(e) {
|
|
@@ -29,14 +29,14 @@ function Ce({ maxItems: e, products: a } = {}) {
|
|
|
29
29
|
}
|
|
30
30
|
const o = ({ children: e }) => {
|
|
31
31
|
var D;
|
|
32
|
-
const { id: a, value: l, onChange: n, disabled: r, readOnly: c, required: y, onBlur:
|
|
32
|
+
const { id: a, value: l, onChange: n, disabled: r, readOnly: c, required: y, onBlur: b, onFocus: s, hasError: u, validation: m, FieldLayout: p } = k(), { inputId: q, labelId: N, ariaDescribedBy: h } = Y(), f = O(e, o.Label), g = O(e, o.Options), v = O(e, o.Description), L = O(e, o.Error), i = G(() => l || [], [
|
|
33
33
|
l
|
|
34
|
-
]), A = Ce((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) === M.many, F = x((S,
|
|
35
|
-
const d = i.filter((
|
|
34
|
+
]), A = Ce((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) === M.many, F = x((S, R) => {
|
|
35
|
+
const d = i.filter((z) => z.productId !== S.productId), H = R ? [
|
|
36
36
|
...d,
|
|
37
37
|
S
|
|
38
38
|
] : d;
|
|
39
|
-
n == null || n(
|
|
39
|
+
n == null || n(H);
|
|
40
40
|
}, [
|
|
41
41
|
i,
|
|
42
42
|
n
|
|
@@ -49,9 +49,9 @@ const o = ({ children: e }) => {
|
|
|
49
49
|
ariaLabelledBy: N,
|
|
50
50
|
ariaDescribedBy: h,
|
|
51
51
|
required: y,
|
|
52
|
-
onBlur:
|
|
52
|
+
onBlur: b,
|
|
53
53
|
onFocus: s
|
|
54
|
-
},
|
|
54
|
+
}, g ? I(g, {
|
|
55
55
|
allowMany: A,
|
|
56
56
|
productValues: i,
|
|
57
57
|
onProductChange: F,
|
|
@@ -62,12 +62,12 @@ const o = ({ children: e }) => {
|
|
|
62
62
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, L, v)
|
|
63
63
|
});
|
|
64
64
|
}, V = ({ children: e, className: a, ...l }) => {
|
|
65
|
-
const { allowMany: n, productValues: r, onProductChange: c, disabled: y, readOnly:
|
|
65
|
+
const { allowMany: n, productValues: r, onProductChange: c, disabled: y, readOnly: b, hasError: s } = l, { options: u, validation: m, imageResize: p } = k(), { currency: q } = w(), { t: N } = Z(), h = O(e, o.Option);
|
|
66
66
|
return /* @__PURE__ */ t.createElement("div", {
|
|
67
67
|
className: a
|
|
68
|
-
}, u == null ? void 0 : u.map((f,
|
|
68
|
+
}, u == null ? void 0 : u.map((f, g) => {
|
|
69
69
|
var C, A, F, D, S;
|
|
70
|
-
const v = ((S = (D = (F = (A = (C = m == null ? void 0 : m.predefined) == null ? void 0 : C.paymentOptions) == null ? void 0 : A.products) == null ? void 0 : F.find((
|
|
70
|
+
const v = ((S = (D = (F = (A = (C = m == null ? void 0 : m.predefined) == null ? void 0 : C.paymentOptions) == null ? void 0 : A.products) == null ? void 0 : F.find((R) => R.id === f.value)) == null ? void 0 : D.fixedPriceOptions) == null ? void 0 : S.price) || "0", L = se(N, q), i = r.find((R) => R.productId === f.value);
|
|
71
71
|
return I(h, {
|
|
72
72
|
key: f.id || f.value || f.label,
|
|
73
73
|
option: f,
|
|
@@ -77,18 +77,18 @@ const o = ({ children: e }) => {
|
|
|
77
77
|
allowMany: n,
|
|
78
78
|
onProductChange: c,
|
|
79
79
|
disabled: y,
|
|
80
|
-
readOnly:
|
|
80
|
+
readOnly: b,
|
|
81
81
|
hasError: s,
|
|
82
82
|
currencyAriaLabel: L,
|
|
83
83
|
imageResize: p,
|
|
84
|
-
isFirst:
|
|
84
|
+
isFirst: g === 0
|
|
85
85
|
});
|
|
86
86
|
}));
|
|
87
87
|
}, E = ({ children: e, className: a, ...l }) => {
|
|
88
|
-
const { option: n, price: r, quantity: c = 0, isSelected: y, allowMany:
|
|
88
|
+
const { option: n, price: r, quantity: c = 0, isSelected: y, allowMany: b, onProductChange: s, disabled: u, readOnly: m, hasError: p, currencyAriaLabel: q, imageResize: N, isFirst: h } = l, { id: f } = k(), g = B(null), v = B(null), L = O(e, E.Image), i = O(e, E.Label), C = O(e, E.Price), A = O(e, E.Input), F = O(e, E.Quantity);
|
|
89
89
|
ee(() => {
|
|
90
90
|
var d;
|
|
91
|
-
h && ((d =
|
|
91
|
+
h && ((d = g.current ?? v.current) == null || d.focus({
|
|
92
92
|
preventScroll: !0
|
|
93
93
|
}));
|
|
94
94
|
}, f);
|
|
@@ -112,8 +112,8 @@ const o = ({ children: e }) => {
|
|
|
112
112
|
s,
|
|
113
113
|
n.value,
|
|
114
114
|
r
|
|
115
|
-
]),
|
|
116
|
-
return
|
|
115
|
+
]), R = `${n.label} ${q} ${r}`;
|
|
116
|
+
return b ? /* @__PURE__ */ t.createElement("div", {
|
|
117
117
|
className: a,
|
|
118
118
|
"data-hook": "product"
|
|
119
119
|
}, L ? I(L, {
|
|
@@ -129,17 +129,17 @@ const o = ({ children: e }) => {
|
|
|
129
129
|
disabled: u,
|
|
130
130
|
readOnly: m,
|
|
131
131
|
hasError: p,
|
|
132
|
-
ariaLabel:
|
|
132
|
+
ariaLabel: R,
|
|
133
133
|
inputRef: h ? v : void 0
|
|
134
|
-
}) : null) : /* @__PURE__ */ t.createElement(
|
|
134
|
+
}) : null) : /* @__PURE__ */ t.createElement($, {
|
|
135
135
|
isSelected: y,
|
|
136
136
|
onChange: D,
|
|
137
137
|
isDisabled: u,
|
|
138
138
|
isReadOnly: m,
|
|
139
139
|
isInvalid: p,
|
|
140
|
-
"aria-label":
|
|
141
|
-
}, /* @__PURE__ */ t.createElement(
|
|
142
|
-
ref:
|
|
140
|
+
"aria-label": R
|
|
141
|
+
}, /* @__PURE__ */ t.createElement(X, {
|
|
142
|
+
ref: g,
|
|
143
143
|
className: a,
|
|
144
144
|
"data-hook": "product"
|
|
145
145
|
}, ({ isHovered: d }) => /* @__PURE__ */ t.createElement(t.Fragment, null, L ? I(L, {
|
|
@@ -153,7 +153,7 @@ const o = ({ children: e }) => {
|
|
|
153
153
|
isSelected: y,
|
|
154
154
|
isHovered: d
|
|
155
155
|
}))));
|
|
156
|
-
},
|
|
156
|
+
}, Re = ({ className: e, ...a }) => {
|
|
157
157
|
var s;
|
|
158
158
|
const { option: l, imageResize: n } = a, r = (s = l.media) == null ? void 0 : s.image;
|
|
159
159
|
if (!r)
|
|
@@ -161,15 +161,15 @@ const o = ({ children: e }) => {
|
|
|
161
161
|
const c = n === Le.fit, y = ne(r, 96, 96, c ? "fit" : "fill");
|
|
162
162
|
if (!y)
|
|
163
163
|
return null;
|
|
164
|
-
const
|
|
164
|
+
const b = r.altText || l.label || "";
|
|
165
165
|
return /* @__PURE__ */ t.createElement("img", {
|
|
166
166
|
className: e,
|
|
167
167
|
src: y,
|
|
168
|
-
alt:
|
|
168
|
+
alt: b,
|
|
169
169
|
"data-fit": c ? "contain" : "cover",
|
|
170
170
|
"data-hook": "product-image"
|
|
171
171
|
});
|
|
172
|
-
},
|
|
172
|
+
}, ge = ({ className: e, ...a }) => {
|
|
173
173
|
const { label: l } = a;
|
|
174
174
|
return /* @__PURE__ */ t.createElement("span", {
|
|
175
175
|
className: e,
|
|
@@ -186,7 +186,7 @@ const o = ({ children: e }) => {
|
|
|
186
186
|
"data-hook": "product-price"
|
|
187
187
|
}, c);
|
|
188
188
|
}, De = ({ className: e, ...a }) => {
|
|
189
|
-
const { quantity: l, onQuantityChange: n, disabled: r, readOnly: c, hasError: y, ariaLabel:
|
|
189
|
+
const { quantity: l, onQuantityChange: n, disabled: r, readOnly: c, hasError: y, ariaLabel: b, inputRef: s } = a, u = x((p) => {
|
|
190
190
|
n(p < 0 ? 0 : p);
|
|
191
191
|
}, [
|
|
192
192
|
n
|
|
@@ -195,7 +195,7 @@ const o = ({ children: e }) => {
|
|
|
195
195
|
}, [
|
|
196
196
|
u
|
|
197
197
|
]);
|
|
198
|
-
return /* @__PURE__ */ t.createElement(
|
|
198
|
+
return /* @__PURE__ */ t.createElement(j, {
|
|
199
199
|
value: l,
|
|
200
200
|
onChange: u,
|
|
201
201
|
minValue: 0,
|
|
@@ -203,7 +203,7 @@ const o = ({ children: e }) => {
|
|
|
203
203
|
isDisabled: r,
|
|
204
204
|
isReadOnly: c,
|
|
205
205
|
isInvalid: y,
|
|
206
|
-
"aria-label":
|
|
206
|
+
"aria-label": b,
|
|
207
207
|
className: e,
|
|
208
208
|
"data-hook": "product-quantity"
|
|
209
209
|
}, /* @__PURE__ */ t.createElement(J, {
|
|
@@ -216,8 +216,8 @@ const o = ({ children: e }) => {
|
|
|
216
216
|
slot: "increment"
|
|
217
217
|
}, "+")));
|
|
218
218
|
};
|
|
219
|
-
E.Image =
|
|
220
|
-
E.Label =
|
|
219
|
+
E.Image = Re;
|
|
220
|
+
E.Label = ge;
|
|
221
221
|
E.Price = Fe;
|
|
222
222
|
E.Input = ie;
|
|
223
223
|
E.Quantity = De;
|
|
@@ -235,12 +235,12 @@ const Se = "_options_11x4v_1", Pe = "_option_11x4v_1", Ne = "_optionInput_11x4v_
|
|
|
235
235
|
optionLabel: ve,
|
|
236
236
|
optionPrice: Ae,
|
|
237
237
|
quantity: Te
|
|
238
|
-
}, qe = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(
|
|
238
|
+
}, qe = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(K, {
|
|
239
239
|
content: e,
|
|
240
240
|
locale: a
|
|
241
241
|
}), xe = () => {
|
|
242
|
-
const e =
|
|
243
|
-
globalClasses:
|
|
242
|
+
const e = be({
|
|
243
|
+
globalClasses: Oe,
|
|
244
244
|
moduleClasses: ue
|
|
245
245
|
});
|
|
246
246
|
return /* @__PURE__ */ t.createElement(o, null, /* @__PURE__ */ t.createElement(o.Label, {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _ from "react";
|
|
2
|
+
import { R } from "./radio-group-field-rac-VwR2FlNg.js";
|
|
3
|
+
import { L as o, K as r, J as O } from "./form-element-classes-CLZXu-91.js";
|
|
4
|
+
const I = () => /* @__PURE__ */ _.createElement(R, {
|
|
5
|
+
classes: {
|
|
6
|
+
container: O,
|
|
7
|
+
label: r,
|
|
8
|
+
radioButton: o
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
I as QuizRadioGroupRAC
|
|
13
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import l, { useRef as S, useState as V, useEffect as B, useCallback as T } from "react";
|
|
2
|
-
import { RadioGroup as H, RadioField as
|
|
3
|
-
import {
|
|
2
|
+
import { RadioGroup as H, RadioField as k, RadioButton as M, TextField as U, Input as A } from "react-aria-components";
|
|
3
|
+
import { ak as v, ah as G, au as F, ac as P, am as $ } from "./form-C7cB75mm.js";
|
|
4
4
|
import { f as p, a as y } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as q, E as x } from "./field-error-headless-
|
|
6
|
-
import { L as j } from "./field-label-headless-
|
|
5
|
+
import { D as q, E as x } from "./field-error-headless-T9JfqiMS.js";
|
|
6
|
+
import { L as j } from "./field-label-headless-bDWQszAb.js";
|
|
7
7
|
import { N as w } from "./options-layout-constants-DEfIEJWD.js";
|
|
8
8
|
import { S as z } from "./selection-indicator-XQ8MYHUQ.js";
|
|
9
9
|
const L = "Other", J = (e, t) => e == null ? void 0 : e.find((o) => (o.value ?? o.label) === t), R = (e, t) => !!t && !J(e, t), K = (e, t) => {
|
|
@@ -57,9 +57,9 @@ const L = "Other", J = (e, t) => e == null ? void 0 : e.find((o) => (o.value ??
|
|
|
57
57
|
const { value: a, label: O, isOther: b = !1, radioRef: h } = o, { value: f, options: _ } = v(), E = p(e, m.Label), r = p(e, m.Input), s = p(e, m.Control), u = p(e, m.OtherInput), C = b ? R(_, f) : f === a, n = (d = r == null ? void 0 : r.props) == null ? void 0 : d.className;
|
|
58
58
|
return /* @__PURE__ */ l.createElement("div", {
|
|
59
59
|
className: t
|
|
60
|
-
}, /* @__PURE__ */ l.createElement(
|
|
60
|
+
}, /* @__PURE__ */ l.createElement(k, {
|
|
61
61
|
value: a
|
|
62
|
-
}, /* @__PURE__ */ l.createElement(
|
|
62
|
+
}, /* @__PURE__ */ l.createElement(M, {
|
|
63
63
|
ref: h,
|
|
64
64
|
className: n
|
|
65
65
|
}, ({ isSelected: i, isHovered: I }) => /* @__PURE__ */ l.createElement(l.Fragment, null, y(s, {
|
|
@@ -89,7 +89,7 @@ const L = "Other", J = (e, t) => e == null ? void 0 : e.find((o) => (o.value ??
|
|
|
89
89
|
a,
|
|
90
90
|
u
|
|
91
91
|
]);
|
|
92
|
-
return /* @__PURE__ */ l.createElement(
|
|
92
|
+
return /* @__PURE__ */ l.createElement(U, {
|
|
93
93
|
"aria-label": u,
|
|
94
94
|
value: C,
|
|
95
95
|
onChange: d,
|
package/dist/component/{radio-group-field-rac-BiiPUxbQ.js → radio-group-field-rac-VwR2FlNg.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
2
|
import t from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { a, s, R as c } from "./radio-button-module-classes-
|
|
4
|
+
import { a, s, R as c } from "./radio-button-module-classes-uyJAJMZn.js";
|
|
5
5
|
import { E as i } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
-
import { s as o } from "./field-rac.module-
|
|
7
|
-
import {
|
|
8
|
-
import { u } from "./use-element-state-class-name-
|
|
9
|
-
import { u as N } from "./use-text-input-class-name-
|
|
6
|
+
import { s as o } from "./field-rac.module-BUvPquav.js";
|
|
7
|
+
import { O as E, N as O, M as R, B as _, R as p, q as I, i as L } from "./form-element-classes-CLZXu-91.js";
|
|
8
|
+
import { u } from "./use-element-state-class-name-DZhlOoWK.js";
|
|
9
|
+
import { u as N } from "./use-text-input-class-name-CgCYHOMw.js";
|
|
10
10
|
const D = ({ content: r, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
11
11
|
content: r,
|
|
12
12
|
locale: l
|
package/dist/component/{rating-input-field-rac-CjXIoNMc.js → rating-input-field-rac-C4ohOgX0.js}
RENAMED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as y } from "@wix/ricos/viewer";
|
|
2
2
|
import m from "classnames";
|
|
3
3
|
import e, { useCallback as N, useState as O, useRef as A } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { ak as b, ah as v, au as T } from "./form-C7cB75mm.js";
|
|
5
5
|
import { RadioGroup as H, RadioField as M, RadioButton as w } from "react-aria-components";
|
|
6
|
-
import { f as u, a as
|
|
7
|
-
import { D as
|
|
8
|
-
import { L as
|
|
9
|
-
import { E as
|
|
10
|
-
import { s as g } from "./field-rac.module-
|
|
11
|
-
import {
|
|
12
|
-
import { u as J } from "./use-element-state-class-name-
|
|
6
|
+
import { f as u, a as B } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { D as P, E as q } from "./field-error-headless-T9JfqiMS.js";
|
|
8
|
+
import { L as k } from "./field-label-headless-bDWQszAb.js";
|
|
9
|
+
import { E as G } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
+
import { s as g } from "./field-rac.module-BUvPquav.js";
|
|
11
|
+
import { B as x, R as Q, P as U, q as z, i as Z, Q as j } from "./form-element-classes-CLZXu-91.js";
|
|
12
|
+
import { u as J } from "./use-element-state-class-name-DZhlOoWK.js";
|
|
13
13
|
const t = ({ children: a }) => {
|
|
14
|
-
const { id: n, value: r, onChange: l, disabled: o, readOnly: d, required: c, hasError: i, onBlur: E, onFocus:
|
|
14
|
+
const { id: n, value: r, onChange: l, disabled: o, readOnly: d, required: c, hasError: i, onBlur: E, onFocus: R, FieldLayout: C } = b(), { labelId: _ } = v(), L = N((D) => l(Number(D)), [
|
|
15
15
|
l
|
|
16
16
|
]), f = u(a, t.Label), s = u(a, t.Ratings), S = u(a, t.Description), h = u(a, t.Error);
|
|
17
|
-
return /* @__PURE__ */ e.createElement(
|
|
17
|
+
return /* @__PURE__ */ e.createElement(C, {
|
|
18
18
|
fieldId: n,
|
|
19
19
|
renderLabel: () => f,
|
|
20
20
|
renderInput: () => /* @__PURE__ */ e.createElement(H, {
|
|
@@ -26,13 +26,13 @@ const t = ({ children: a }) => {
|
|
|
26
26
|
isRequired: c,
|
|
27
27
|
isInvalid: i,
|
|
28
28
|
onBlur: E,
|
|
29
|
-
onFocus:
|
|
29
|
+
onFocus: R,
|
|
30
30
|
orientation: "horizontal"
|
|
31
31
|
}, s),
|
|
32
32
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, h, S)
|
|
33
33
|
});
|
|
34
34
|
}, I = ({ children: a, className: n, getReactionLabel: r }) => {
|
|
35
|
-
const { value: l, readOnly: o, hasError: d } = b(), { inputId: c, ariaDescribedBy: i } = v(), [E,
|
|
35
|
+
const { value: l, readOnly: o, hasError: d } = b(), { inputId: c, ariaDescribedBy: i } = v(), [E, R] = O(), C = A(null), _ = u(a, I.Rating), L = [
|
|
36
36
|
"1",
|
|
37
37
|
"2",
|
|
38
38
|
"3",
|
|
@@ -40,17 +40,17 @@ const t = ({ children: a }) => {
|
|
|
40
40
|
"5"
|
|
41
41
|
], f = (s) => E && !o ? E >= s : !!l && l >= Number(s);
|
|
42
42
|
return /* @__PURE__ */ e.createElement("div", {
|
|
43
|
-
ref:
|
|
43
|
+
ref: C,
|
|
44
44
|
id: c,
|
|
45
45
|
"aria-describedby": i,
|
|
46
46
|
className: n,
|
|
47
47
|
"data-invalid": d,
|
|
48
48
|
"data-readonly": o
|
|
49
|
-
}, L.map((s) =>
|
|
49
|
+
}, L.map((s) => B(_, {
|
|
50
50
|
key: s,
|
|
51
51
|
value: s,
|
|
52
52
|
isSelected: f(s),
|
|
53
|
-
onHoverChange: (S) =>
|
|
53
|
+
onHoverChange: (S) => R(S ? s : void 0),
|
|
54
54
|
label: r == null ? void 0 : r(Number(s))
|
|
55
55
|
})));
|
|
56
56
|
}, K = {
|
|
@@ -82,10 +82,10 @@ const t = ({ children: a }) => {
|
|
|
82
82
|
}, c) : null)));
|
|
83
83
|
};
|
|
84
84
|
I.Rating = F;
|
|
85
|
-
t.Label =
|
|
85
|
+
t.Label = k;
|
|
86
86
|
t.Ratings = I;
|
|
87
87
|
t.Rating = F;
|
|
88
|
-
t.Description =
|
|
88
|
+
t.Description = P;
|
|
89
89
|
t.Error = q;
|
|
90
90
|
const W = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
91
91
|
viewBox: "0 0 32 32",
|
|
@@ -102,7 +102,7 @@ const W = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
102
102
|
rating: Y,
|
|
103
103
|
ratingSelected: $,
|
|
104
104
|
ratingHover: V
|
|
105
|
-
}, ee = ({ content: a, locale: n }) => /* @__PURE__ */ e.createElement(
|
|
105
|
+
}, ee = ({ content: a, locale: n }) => /* @__PURE__ */ e.createElement(y, {
|
|
106
106
|
content: a,
|
|
107
107
|
locale: n
|
|
108
108
|
}), te = {
|
|
@@ -111,15 +111,15 @@ const W = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
111
111
|
hover: p.ratingHover
|
|
112
112
|
}, ge = () => {
|
|
113
113
|
const { t: a } = T(), n = J({
|
|
114
|
-
globalClasses:
|
|
114
|
+
globalClasses: j,
|
|
115
115
|
moduleClasses: te
|
|
116
116
|
});
|
|
117
117
|
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
118
118
|
className: m(x, g.label)
|
|
119
119
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
120
|
-
className: m(
|
|
120
|
+
className: m(Q, g.requiredMark)
|
|
121
121
|
})), /* @__PURE__ */ e.createElement(t.Ratings, {
|
|
122
|
-
className: m(
|
|
122
|
+
className: m(U, p.ratings),
|
|
123
123
|
getReactionLabel: (r) => a("rating-input.a11y.reaction-label", {
|
|
124
124
|
count: r
|
|
125
125
|
})
|
|
@@ -127,8 +127,8 @@ const W = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
127
127
|
className: n
|
|
128
128
|
}, /* @__PURE__ */ e.createElement(W, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
129
129
|
className: m(z, g.error)
|
|
130
|
-
}, /* @__PURE__ */ e.createElement(
|
|
131
|
-
className: m(
|
|
130
|
+
}, /* @__PURE__ */ e.createElement(G, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
131
|
+
className: m(Z, g.description)
|
|
132
132
|
}, ee));
|
|
133
133
|
};
|
|
134
134
|
export {
|
package/dist/component/{rich-content-rac.module-CDZniyrZ.js → rich-content-rac.module-B9HHqJL4.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import c, { useState as
|
|
2
|
-
import {
|
|
1
|
+
import c, { useState as l } from "react";
|
|
2
|
+
import { ak as a, ac as i, au as T } from "./form-C7cB75mm.js";
|
|
3
3
|
import { Button as d } from "react-aria-components";
|
|
4
4
|
import { D as r } from "./data-hooks-Dkw1pbRj.js";
|
|
5
5
|
import { truncateRichContent as _ } from "@wix/ricos/content";
|
|
@@ -25,9 +25,9 @@ const O = ({ children: e }) => {
|
|
|
25
25
|
}, o);
|
|
26
26
|
};
|
|
27
27
|
function B(e, t) {
|
|
28
|
-
const [n, o] =
|
|
28
|
+
const [n, o] = l(!0);
|
|
29
29
|
function s() {
|
|
30
|
-
o((
|
|
30
|
+
o((u) => !u);
|
|
31
31
|
}
|
|
32
32
|
return {
|
|
33
33
|
displayedContent: t && n ? _(e, {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import l from "classnames";
|
|
2
2
|
import e from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { u as T, R as C, s as d, T as p } from "./rich-content-rac.module-
|
|
5
|
-
import {
|
|
3
|
+
import { ak as m, L as i, X as u, _ as R } from "./form-C7cB75mm.js";
|
|
4
|
+
import { u as T, R as C, s as d, T as p } from "./rich-content-rac.module-B9HHqJL4.js";
|
|
5
|
+
import { a5 as g } from "./form-element-classes-CLZXu-91.js";
|
|
6
6
|
const h = {
|
|
7
7
|
colorPalette: R(),
|
|
8
8
|
customStyles: u()
|
|
9
|
-
},
|
|
9
|
+
}, _ = ({ truncate: t = !0 } = {}) => {
|
|
10
10
|
const { content: a, maxShownParagraphs: s } = m(), { displayedContent: n, isTruncated: o, isTruncateButtonShown: r, toggleTruncate: c } = T(a, t ? s : void 0);
|
|
11
11
|
return /* @__PURE__ */ e.createElement(C, null, () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(i, {
|
|
12
12
|
className: l(g, d.richContent),
|
|
@@ -18,5 +18,5 @@ const h = {
|
|
|
18
18
|
})));
|
|
19
19
|
};
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
_ as R
|
|
22
22
|
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import t, { useRef as P, useMemo as L, useCallback as S, useEffect as T } from "react";
|
|
2
|
+
import { RicosViewer as w } from "@wix/ricos/viewer";
|
|
3
|
+
import u from "classnames";
|
|
4
|
+
import { ag as A, au as b, F as M, ak as y, ac as V, h as k } from "./form-C7cB75mm.js";
|
|
5
|
+
import { u as q } from "./use-service-options-base-JNSCsxxz.js";
|
|
6
|
+
import { D as d } from "./dropdown-field-headless-BBc5oicg.js";
|
|
7
|
+
import { C as x } from "./chevron-down-icon-CcpVm6B-.js";
|
|
8
|
+
import { E as B } from "./error-icon-hZxQ6DEy.js";
|
|
9
|
+
import { H } from "./custom-focus-class-_483Pkwp.js";
|
|
10
|
+
import { s as i } from "./field-rac.module-BUvPquav.js";
|
|
11
|
+
import { B as U, R as W, m as G, D as Q, q as Y, i as j } from "./form-element-classes-CLZXu-91.js";
|
|
12
|
+
import { u as z } from "./use-dropdown-option-class-name-CruN_y12.js";
|
|
13
|
+
const J = "00000000-0000-0000-0000-000000000000", K = (e) => {
|
|
14
|
+
const { actions: r } = A(), { t: h } = b(), { addOther: n, addOtherLabel: p } = e, c = p || h("add-other.default-other-option-label"), a = P(!0), E = L(() => {
|
|
15
|
+
var s;
|
|
16
|
+
return ((s = e.options) == null ? void 0 : s.map((m) => m.id ?? "")) ?? [];
|
|
17
|
+
}, [
|
|
18
|
+
e.options
|
|
19
|
+
]), O = S((s) => n ? [
|
|
20
|
+
...s,
|
|
21
|
+
{
|
|
22
|
+
value: c,
|
|
23
|
+
label: c,
|
|
24
|
+
id: J
|
|
25
|
+
}
|
|
26
|
+
] : s, [
|
|
27
|
+
n,
|
|
28
|
+
c
|
|
29
|
+
]), { isLoading: f, options: l, isEmpty: R, shouldRender: I, setIsLoading: C, setOptions: _, setIsEmpty: D, processOptions: g } = q({
|
|
30
|
+
fieldType: M.SERVICES_DROPDOWN,
|
|
31
|
+
isEditor: e.isEditor,
|
|
32
|
+
postProcessOptions: O
|
|
33
|
+
}), F = S(async () => {
|
|
34
|
+
if (a.current && (r != null && r.fetchServices) && E.length > 0) {
|
|
35
|
+
a.current = !1, C(!0);
|
|
36
|
+
let s;
|
|
37
|
+
try {
|
|
38
|
+
s = await r.fetchServices({
|
|
39
|
+
serviceIds: E
|
|
40
|
+
});
|
|
41
|
+
} catch (m) {
|
|
42
|
+
console.error(m);
|
|
43
|
+
}
|
|
44
|
+
if (s) {
|
|
45
|
+
const m = g(s);
|
|
46
|
+
D(!n && m.length === 0), _(m);
|
|
47
|
+
} else
|
|
48
|
+
a.current = !0;
|
|
49
|
+
C(!1);
|
|
50
|
+
}
|
|
51
|
+
}, [
|
|
52
|
+
r,
|
|
53
|
+
E,
|
|
54
|
+
g,
|
|
55
|
+
n,
|
|
56
|
+
C,
|
|
57
|
+
_,
|
|
58
|
+
D
|
|
59
|
+
]);
|
|
60
|
+
T(() => {
|
|
61
|
+
if (!e.isEditor && l.length > 0) {
|
|
62
|
+
const s = n ? l.length - 1 : l.length;
|
|
63
|
+
D(s === 0);
|
|
64
|
+
}
|
|
65
|
+
}, [
|
|
66
|
+
l,
|
|
67
|
+
n,
|
|
68
|
+
D,
|
|
69
|
+
e.isEditor
|
|
70
|
+
]);
|
|
71
|
+
const v = S(() => {
|
|
72
|
+
e.onFocus && e.onFocus(), a.current && F();
|
|
73
|
+
}, [
|
|
74
|
+
F,
|
|
75
|
+
e.onFocus
|
|
76
|
+
]), N = S(
|
|
77
|
+
(s) => {
|
|
78
|
+
e.onChange && e.onChange(s), a.current = !0;
|
|
79
|
+
},
|
|
80
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
81
|
+
[
|
|
82
|
+
e.onChange
|
|
83
|
+
]
|
|
84
|
+
);
|
|
85
|
+
return {
|
|
86
|
+
isLoading: f,
|
|
87
|
+
options: l,
|
|
88
|
+
isEmpty: R,
|
|
89
|
+
onFocus: v,
|
|
90
|
+
onChange: N,
|
|
91
|
+
shouldRender: I
|
|
92
|
+
};
|
|
93
|
+
}, o = ({ children: e }) => {
|
|
94
|
+
const r = y(), { addOther: h } = r, n = V(), p = r.isEditor || n.isEditor || n.isComposer, { isLoading: c, options: a, isEmpty: E, onFocus: O, onChange: f, shouldRender: l } = K({
|
|
95
|
+
...r,
|
|
96
|
+
isEditor: p
|
|
97
|
+
}), R = L(() => ({
|
|
98
|
+
...r,
|
|
99
|
+
options: c ? [] : a,
|
|
100
|
+
isLoading: c,
|
|
101
|
+
onFocus: O,
|
|
102
|
+
onChange: f
|
|
103
|
+
}), [
|
|
104
|
+
r,
|
|
105
|
+
a,
|
|
106
|
+
c,
|
|
107
|
+
O,
|
|
108
|
+
f
|
|
109
|
+
]);
|
|
110
|
+
return !p && E && !h || !l ? null : /* @__PURE__ */ t.createElement(k.Provider, {
|
|
111
|
+
value: {
|
|
112
|
+
v2: R
|
|
113
|
+
}
|
|
114
|
+
}, /* @__PURE__ */ t.createElement(d, null, e));
|
|
115
|
+
};
|
|
116
|
+
o.Label = d.Label;
|
|
117
|
+
o.Trigger = d.Trigger;
|
|
118
|
+
o.Options = d.Options;
|
|
119
|
+
o.Description = d.Description;
|
|
120
|
+
o.Error = d.Error;
|
|
121
|
+
const X = ({ content: e, locale: r }) => /* @__PURE__ */ t.createElement(w, {
|
|
122
|
+
content: e,
|
|
123
|
+
locale: r
|
|
124
|
+
}), Z = () => {
|
|
125
|
+
const e = z(H);
|
|
126
|
+
return /* @__PURE__ */ t.createElement(o, null, /* @__PURE__ */ t.createElement(o.Label, {
|
|
127
|
+
className: u(U, i.label)
|
|
128
|
+
}, /* @__PURE__ */ t.createElement(o.Label.Required, {
|
|
129
|
+
className: u(W, i.requiredMark)
|
|
130
|
+
})), /* @__PURE__ */ t.createElement(o.Trigger, {
|
|
131
|
+
className: u(G, i.input, i.dropdownTrigger)
|
|
132
|
+
}, /* @__PURE__ */ t.createElement(x, {
|
|
133
|
+
className: i.dropdownIcon
|
|
134
|
+
})), /* @__PURE__ */ t.createElement(o.Options, {
|
|
135
|
+
className: u(Q, i.selectPopover, i.dropdownPopover)
|
|
136
|
+
}, /* @__PURE__ */ t.createElement(o.Options.Option, {
|
|
137
|
+
className: e
|
|
138
|
+
})), /* @__PURE__ */ t.createElement(o.Error, {
|
|
139
|
+
className: u(Y, i.error)
|
|
140
|
+
}, /* @__PURE__ */ t.createElement(B, null), /* @__PURE__ */ t.createElement(o.Error.Text, null)), /* @__PURE__ */ t.createElement(o.Description, {
|
|
141
|
+
className: u(j, i.description)
|
|
142
|
+
}, X));
|
|
143
|
+
}, ue = () => /* @__PURE__ */ t.createElement(Z, null);
|
|
144
|
+
export {
|
|
145
|
+
ue as ServiceDropdownRAC
|
|
146
|
+
};
|