@wix/form-elements 1.89.0 → 1.90.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component/{appointment-rac-DG8GUJpn.js → appointment-rac-DtPa-JZ9.js} +6 -6
- package/dist/component/{bookings-address-rac-cNBSx-Pr.js → bookings-address-rac-4l8kqoLi.js} +1 -1
- package/dist/component/{bookings-email-rac-CYdSoVWP.js → bookings-email-rac-76vUcGtU.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CQB2o8ww.js → bookings-first-name-rac-IS7LUMxg.js} +1 -1
- package/dist/component/{bookings-header-rac-CzKvQond.js → bookings-header-rac-2wTzY64_.js} +1 -1
- package/dist/component/{bookings-last-name-rac-oK1BC5Am.js → bookings-last-name-rac-nxA75igv.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CZNEy748.js → bookings-login-bar-rac-CRi1nntD.js} +21 -21
- package/dist/component/{bookings-phone-rac-D_4WfolC.js → bookings-phone-rac-DZjvHly0.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CrEfeL4P.js → bookings-rich-text-rac-CYn1wwYQ.js} +1 -1
- package/dist/component/{checkbox-field-rac-CGqshW45.js → checkbox-field-rac-DAcFLQNT.js} +49 -49
- package/dist/component/{checkbox-group-field-headless-C3_5IR-E.js → checkbox-group-field-headless-BJmS0Ce5.js} +30 -30
- package/dist/component/{checkbox-group-field-rac-DIzdgyAw.js → checkbox-group-field-rac-CeFUt2Nr.js} +9 -9
- package/dist/component/{checkbox-group-rac-EvWVfusV.js → checkbox-group-rac-eDChVoVP.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-Bb3xB1ve.js → checkbox-indicator-module-classes-mJ7hl_8K.js} +1 -1
- package/dist/component/{checkbox-rac-CT_69Jei.js → checkbox-rac-DGmZdPnl.js} +1 -1
- package/dist/component/{contacts-address-rac-M8MZd777.js → contacts-address-rac-CGS83PMu.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BS-8HeRD.js → contacts-birthdate-rac-DkP-7tZ9.js} +1 -1
- package/dist/component/{contacts-company-rac-gmgKLvic.js → contacts-company-rac-D_KYvkYe.js} +1 -1
- package/dist/component/{contacts-email-rac-QQ6E9VzX.js → contacts-email-rac-4lGD56E8.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DR7XheRo.js → contacts-first-name-rac-C5L3U9QV.js} +1 -1
- package/dist/component/{contacts-last-name-rac-CBJgTkj5.js → contacts-last-name-rac-SL3FSAhE.js} +1 -1
- package/dist/component/{contacts-phone-rac-CTl25HdK.js → contacts-phone-rac-DkUwJ56_.js} +1 -1
- package/dist/component/{contacts-position-rac-DBDOW7QR.js → contacts-position-rac-CeKJ5oJh.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-C0-uJ7fU.js → contacts-subscribe-rac-Bjldz7ed.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-BtXc0V1S.js → contacts-tax-id-rac-D8QxyDiU.js} +1 -1
- package/dist/component/{date-availability-IQtwk-aX.js → date-availability-DdMI-zNj.js} +1 -1
- package/dist/component/{date-input-field-rac-2rbZiSgo.js → date-input-field-rac-Da6j7OP2.js} +99 -98
- package/dist/component/{date-input-rac-j4--xZ8s.js → date-input-rac-tlmhXr4A.js} +1 -1
- package/dist/component/{date-picker-field-rac-Cl7ueVVn.js → date-picker-field-rac-ClNfMoR1.js} +43 -43
- package/dist/component/{date-picker-rac-BrObkuYv.js → date-picker-rac-BV3TGjsx.js} +1 -1
- package/dist/component/date-time-input-field-rac-5eHyKry0.js +424 -0
- package/dist/component/{date-time-input-rac-BShquR72.js → date-time-input-rac-DQk2ylbE.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DNXYnHDM.js → dext-checkbox-group-rac-CBj9Y7Tp.js} +2 -2
- package/dist/component/{dext-checkbox-rac-RBMWmgyT.js → dext-checkbox-rac-C1KI5I2J.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Dph_kV11.js → dext-date-picker-rac-D-8Ss0bx.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-C3_gQkBT.js → dext-date-time-input-rac-CRnwLBSZ.js} +1 -1
- package/dist/component/{dext-dropdown-rac-D34vhtST.js → dext-dropdown-rac-BVTEMS0W.js} +1 -1
- package/dist/component/{dext-email-rac-Yzf4-vSg.js → dext-email-rac-CXeM4iQj.js} +1 -1
- package/dist/component/{dext-number-input-rac-D0jZXKaI.js → dext-number-input-rac-DMh08cy5.js} +1 -1
- package/dist/component/{dext-phone-rac-bqTpmTa0.js → dext-phone-rac-E1fFjkVW.js} +1 -1
- package/dist/component/{dext-radio-group-rac-AYPAzpqZ.js → dext-radio-group-rac-_BhRzFAr.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DOSq-xVQ.js → dext-rating-input-rac-BRYVQOYw.js} +1 -1
- package/dist/component/{dext-tags-rac-BXtFTlL0.js → dext-tags-rac-C4iwtRcw.js} +2 -2
- package/dist/component/{dext-text-area-rac-46wwBQg_.js → dext-text-area-rac-CQ1KAhkU.js} +1 -1
- package/dist/component/{dext-text-input-rac-DVj6V1VG.js → dext-text-input-rac-xCoKhEt3.js} +1 -1
- package/dist/component/{dext-url-input-rac-B5zu9R5K.js → dext-url-input-rac-DyoEEa_v.js} +1 -1
- package/dist/component/{donation-rac-DeBMssGg.js → donation-rac-CSDVxWUj.js} +51 -51
- package/dist/component/dropdown-field-headless-BXyP9KYi.js +101 -0
- package/dist/component/dropdown-field-rac-D1Z_Jbzd.js +36 -0
- package/dist/component/{dropdown-rac-bUNYh49x.js → dropdown-rac-BEi7CMKT.js} +1 -1
- package/dist/component/{ecom-address-rac-CtrERV3f.js → ecom-address-rac-DGl7rlwa.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BrpwOSYM.js → ecom-subscription-checkbox-rac-D5HzzRQk.js} +6 -6
- package/dist/component/{email-input-field-rac-4yYxYc1a.js → email-input-field-rac-DHAK2K8E.js} +63 -63
- package/dist/component/{events-repeater-rac-B308C1JK.js → events-repeater-rac-N1mGqD4R.js} +35 -35
- package/dist/component/{events-rsvp-rac-C4_LJ3Wz.js → events-rsvp-rac-Ds9PnqHG.js} +6 -6
- package/dist/component/{field-error-headless-PMBWtb3Z.js → field-error-headless-9MKScovg.js} +12 -12
- package/dist/component/{field-label-headless-0racVfdo.js → field-label-headless-BaoLrUWJ.js} +12 -12
- package/dist/component/field-rac.module-BUvPquav.js +26 -0
- package/dist/component/{file-upload-rac-CZIHV2OL.js → file-upload-rac-CNbLRxUz.js} +116 -116
- package/dist/component/{fixed-payment-rac-COhRKeun.js → fixed-payment-rac-BFnvUksR.js} +15 -15
- package/dist/component/{form-UCnayEKT.js → form-B3YjGh0T.js} +129 -128
- package/dist/component/{form-element-classes--p2vz_Bm.js → form-element-classes-CLZXu-91.js} +79 -69
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CpXa-NlC.js → header-field-rac-64pYqszP.js} +3 -3
- package/dist/component/{header-rac-CCsguMlZ.js → header-rac-BtPQVL59.js} +1 -1
- package/dist/component/{image-choice-rac-j2UH4Q4I.js → image-choice-rac-BsojUR1h.js} +20 -20
- package/dist/component/{index-Bxa3IDHm.js → index-CtiBRBqZ.js} +4 -4
- package/dist/component/{index-jg8dn8po.js → index-f2JBxCTd.js} +2 -2
- package/dist/component/{isObjectLike-Zw6J9g91.js → isObjectLike-BgqHLNgn.js} +1 -1
- package/dist/component/{multiline-address-field-rac-BeFAYL7V.js → multiline-address-field-rac-CH1hCUTf.js} +575 -574
- package/dist/component/{multiline-address-rac-BYr5_DQd.js → multiline-address-rac-CkOPWXfI.js} +1 -1
- package/dist/component/{number-input-field-rac-BNdJecUL.js → number-input-field-rac-B7U_08UK.js} +24 -24
- package/dist/component/{number-input-rac-Cqkj4JAF.js → number-input-rac-1jcchySg.js} +1 -1
- package/dist/component/{password-rac-D4iSs1ds.js → password-rac-CAaV8OrL.js} +21 -21
- package/dist/component/{payment-input-rac-BvBP47HP.js → payment-input-rac-B3Knhzrz.js} +25 -25
- package/dist/component/{phone-input-field-rac-Cggx8IlY.js → phone-input-field-rac-BGsvxtXz.js} +185 -184
- package/dist/component/{phone-rac-BISmYt_n.js → phone-rac-BUAW-44w.js} +1 -1
- package/dist/component/{product-list-rac-C1bm-U2G.js → product-list-rac-C7Nq3ZG4.js} +43 -43
- package/dist/component/quiz-radio-group-rac-CRa3I_NR.js +13 -0
- package/dist/component/{radio-button-module-classes-blfiatlc.js → radio-button-module-classes-BEvf741q.js} +7 -7
- package/dist/component/{radio-group-field-rac-BiiPUxbQ.js → radio-group-field-rac-BYTXrpnE.js} +5 -5
- package/dist/component/{radio-group-rac-Bn_W-3xz.js → radio-group-rac-138JrIhm.js} +1 -1
- package/dist/component/{rating-input-field-rac-CjXIoNMc.js → rating-input-field-rac-D5pOVdFJ.js} +24 -24
- package/dist/component/{rating-input-rac-Ci4uPo22.js → rating-input-rac-DuK1q9JB.js} +1 -1
- package/dist/component/{rich-content-rac.module-CDZniyrZ.js → rich-content-rac.module-H3hPgDtD.js} +4 -4
- package/dist/component/{rich-text-field-rac-BBRE9_Kr.js → rich-text-field-rac-Btwqm4wb.js} +5 -5
- package/dist/component/{rich-text-rac-C3MfJK-H.js → rich-text-rac-DIu8StCg.js} +1 -1
- package/dist/component/service-dropdown-rac-N8jqoUC_.js +146 -0
- package/dist/component/{services-multi-choice-rac-FDHRjDLS.js → services-multi-choice-rac-DlP0tB9d.js} +18 -18
- package/dist/component/{signature-rac-DfGPV0Mw.js → signature-rac-DuRzxIkO.js} +53 -53
- package/dist/component/{submit-button-rac-DRsqyJcl.js → submit-button-rac-DFmPp4jT.js} +7 -7
- package/dist/component/{tags-field-rac-CZ4FBGG9.js → tags-field-rac-DIgyn5P9.js} +56 -56
- package/dist/component/{tags-rac-CMHMsiwv.js → tags-rac-C6R6RHl2.js} +1 -1
- package/dist/component/text-area-field-rac-opBEx_8s.js +73 -0
- package/dist/component/{text-area-rac-BKGDa4E3.js → text-area-rac-D4iKhAqc.js} +1 -1
- package/dist/component/{text-input-field-rac-CU8eBRM4.js → text-input-field-rac-Ckp8Ierz.js} +6 -6
- package/dist/component/{text-input-headless-C1eFy2gl.js → text-input-headless-D-LXpqS3.js} +6 -6
- package/dist/component/{text-input-rac-DO0eI3ty.js → text-input-rac-ChxuJj-q.js} +1 -1
- package/dist/component/{time-input-rac-BJ0AL2Be.js → time-input-rac-C5_rEy7W.js} +23 -23
- package/dist/component/{url-input-field-rac-BtpAuKfp.js → url-input-field-rac-CBOnhquz.js} +22 -22
- package/dist/component/{url-input-rac-CjnPbcHt.js → url-input-rac-BY-BVg6r.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-C1iEE28P.js +28 -0
- package/dist/component/{use-element-state-class-name-X08kIFhd.js → use-element-state-class-name--YLulmsU.js} +1 -1
- package/dist/component/{use-service-options-base-DfHhMveM.js → use-service-options-base-BNLFmnHJ.js} +3 -3
- package/dist/component/{use-text-input-class-name-BAuokapo.js → use-text-input-class-name-3Xp-hNDT.js} +4 -4
- package/dist/form.d.ts +3 -0
- package/package.json +2 -2
- 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,20 +1,20 @@
|
|
|
1
1
|
import e, { useEffect as I, useMemo as L } from "react";
|
|
2
|
-
import { RicosViewer as
|
|
2
|
+
import { RicosViewer as R } from "@wix/ricos/viewer";
|
|
3
3
|
import r from "classnames";
|
|
4
|
-
import { F as
|
|
5
|
-
import { u as f } from "./use-service-options-base-
|
|
6
|
-
import { C as n } from "./checkbox-group-field-headless-
|
|
4
|
+
import { F as S, ak as d, h as D } from "./form-B3YjGh0T.js";
|
|
5
|
+
import { u as f } from "./use-service-options-base-BNLFmnHJ.js";
|
|
6
|
+
import { C as n } from "./checkbox-group-field-headless-BJmS0Ce5.js";
|
|
7
7
|
import { E as F } from "./error-icon-hZxQ6DEy.js";
|
|
8
|
-
import { C as N } from "./checkbox-indicator-module-classes-
|
|
9
|
-
import { s as a } from "./field-rac.module-
|
|
10
|
-
import {
|
|
8
|
+
import { C as N } from "./checkbox-indicator-module-classes-mJ7hl_8K.js";
|
|
9
|
+
import { s as a } from "./field-rac.module-BUvPquav.js";
|
|
10
|
+
import { B as h, R as b, c as M, e as A, q as v, i as x, d as P } from "./form-element-classes-CLZXu-91.js";
|
|
11
11
|
import { o as _ } from "./options-rac.module-KM-VT_KY.js";
|
|
12
|
-
import { u as T } from "./use-element-state-class-name
|
|
13
|
-
import { u as
|
|
14
|
-
const
|
|
12
|
+
import { u as T } from "./use-element-state-class-name--YLulmsU.js";
|
|
13
|
+
import { u as k } from "./use-text-input-class-name-3Xp-hNDT.js";
|
|
14
|
+
const B = (s) => {
|
|
15
15
|
var C;
|
|
16
16
|
const { isLoading: o, options: i, isEmpty: c, shouldRender: m, setOptions: l, setIsEmpty: E, setHasInitialDataLoaded: p } = f({
|
|
17
|
-
fieldType:
|
|
17
|
+
fieldType: S.SERVICES_MULTI_CHOICE,
|
|
18
18
|
isEditor: s.isEditor
|
|
19
19
|
}), u = (C = s.options) == null ? void 0 : C.every((O) => O.label && O.id);
|
|
20
20
|
return I(() => {
|
|
@@ -35,7 +35,7 @@ const k = (s) => {
|
|
|
35
35
|
shouldRender: m
|
|
36
36
|
};
|
|
37
37
|
}, t = ({ children: s }) => {
|
|
38
|
-
const o = d(), { options: i, isEmpty: c, shouldRender: m } =
|
|
38
|
+
const o = d(), { options: i, isEmpty: c, shouldRender: m } = B(o), l = L(() => ({
|
|
39
39
|
...o,
|
|
40
40
|
options: i
|
|
41
41
|
}), [
|
|
@@ -52,14 +52,14 @@ t.Label = n.Label;
|
|
|
52
52
|
t.Options = n.Options;
|
|
53
53
|
t.Description = n.Description;
|
|
54
54
|
t.Error = n.Error;
|
|
55
|
-
const
|
|
55
|
+
const y = ({ content: s, locale: o }) => /* @__PURE__ */ e.createElement(R, {
|
|
56
56
|
content: s,
|
|
57
57
|
locale: o
|
|
58
58
|
}), H = () => {
|
|
59
59
|
const s = T({
|
|
60
|
-
globalClasses:
|
|
60
|
+
globalClasses: P,
|
|
61
61
|
moduleClasses: N
|
|
62
|
-
}), o =
|
|
62
|
+
}), o = k();
|
|
63
63
|
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
64
64
|
className: r(h, a.label)
|
|
65
65
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
@@ -75,10 +75,10 @@ const B = ({ content: s, locale: o }) => /* @__PURE__ */ e.createElement(S, {
|
|
|
75
75
|
})), /* @__PURE__ */ e.createElement(t.Options.Option.OtherInput, {
|
|
76
76
|
inputClassName: o
|
|
77
77
|
}))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
78
|
-
className: r(
|
|
78
|
+
className: r(v, a.error)
|
|
79
79
|
}, /* @__PURE__ */ e.createElement(F, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
80
|
-
className: r(
|
|
81
|
-
},
|
|
80
|
+
className: r(x, a.description)
|
|
81
|
+
}, y));
|
|
82
82
|
}, W = () => /* @__PURE__ */ e.createElement(H, null);
|
|
83
83
|
export {
|
|
84
84
|
W as ServicesMultiChoiceRAC
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import s, { useRef as W, useCallback as I, useState as K, useEffect as Q, useMemo as De, isValidElement as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import s, { useRef as W, useCallback as I, useState as K, useEffect as Q, useMemo as De, isValidElement as Re } from "react";
|
|
2
|
+
import { RicosViewer as we } from "@wix/ricos/viewer";
|
|
3
3
|
import v from "classnames";
|
|
4
4
|
import { useHover as ve, useFocusRing as xe, mergeProps as Se } from "react-aria";
|
|
5
|
-
import { RadioGroup as Fe, Button as fe, TextField as Ae, Input as
|
|
5
|
+
import { RadioGroup as Fe, Button as fe, TextField as Ae, Input as _e, RadioField as Pe, RadioButton as Ne } from "react-aria-components";
|
|
6
6
|
import he from "signature_pad";
|
|
7
|
-
import {
|
|
7
|
+
import { G as Ue, ag as Oe, ac as Be, as as ge, E as ce, e as G, ak as A, ah as H, am as Ee, au as Me } from "./form-B3YjGh0T.js";
|
|
8
8
|
import { f as T, a as F } from "./find-child-C60k4CxG.js";
|
|
9
|
-
import { D as We, E as He } from "./field-error-headless-
|
|
10
|
-
import { L as Ye } from "./field-label-headless-
|
|
9
|
+
import { D as We, E as He } from "./field-error-headless-9MKScovg.js";
|
|
10
|
+
import { L as Ye } from "./field-label-headless-BaoLrUWJ.js";
|
|
11
11
|
import { D as ke } from "./data-hooks-Dkw1pbRj.js";
|
|
12
12
|
import { E as $e } from "./error-icon-hZxQ6DEy.js";
|
|
13
|
-
import { s as z } from "./field-rac.module-
|
|
14
|
-
import {
|
|
13
|
+
import { s as z } from "./field-rac.module-BUvPquav.js";
|
|
14
|
+
import { B as ue, R as ze, z as B, a2 as Ve, q as Ze, i as Xe } from "./form-element-classes-CLZXu-91.js";
|
|
15
15
|
const Ge = typeof s.useId == "function" ? s.useId : () => W(Ue()).current;
|
|
16
|
-
var
|
|
16
|
+
var R = /* @__PURE__ */ (function(e) {
|
|
17
17
|
return e.TEXT = "text/plain", e.POINTS = "points/json", e;
|
|
18
18
|
})({}), b = /* @__PURE__ */ (function(e) {
|
|
19
19
|
return e.DRAW = "draw", e.TYPE = "type", e.UPLOAD = "upload", e;
|
|
@@ -103,10 +103,10 @@ function me(e, t) {
|
|
|
103
103
|
}
|
|
104
104
|
const M = 480, et = (e) => Ce({
|
|
105
105
|
data: JSON.stringify(e),
|
|
106
|
-
mimeType:
|
|
106
|
+
mimeType: R.POINTS
|
|
107
107
|
}), Le = (e) => {
|
|
108
108
|
const t = N(e);
|
|
109
|
-
if ((t == null ? void 0 : t.mimeType) ===
|
|
109
|
+
if ((t == null ? void 0 : t.mimeType) === R.POINTS)
|
|
110
110
|
try {
|
|
111
111
|
return JSON.parse(t.data);
|
|
112
112
|
} catch {
|
|
@@ -186,13 +186,13 @@ async function ot(e, t) {
|
|
|
186
186
|
if (!a)
|
|
187
187
|
return e;
|
|
188
188
|
const n = a.mimeType;
|
|
189
|
-
if (n ===
|
|
189
|
+
if (n === R.TEXT) {
|
|
190
190
|
const r = V(M * 20, M, 1);
|
|
191
191
|
nt(r, a.data, "black", t, "white");
|
|
192
192
|
const o = J(r, "white");
|
|
193
193
|
return (o == null ? void 0 : o.toDataURL("image/jpeg", 0.7)) ?? null;
|
|
194
194
|
}
|
|
195
|
-
if (n ===
|
|
195
|
+
if (n === R.POINTS) {
|
|
196
196
|
const r = Le(e);
|
|
197
197
|
if (!r)
|
|
198
198
|
return null;
|
|
@@ -275,9 +275,9 @@ const it = ({ value: e, onChange: t, target: a }) => {
|
|
|
275
275
|
if (o == null)
|
|
276
276
|
return b.DRAW;
|
|
277
277
|
switch (i == null ? void 0 : i.mimeType) {
|
|
278
|
-
case
|
|
278
|
+
case R.POINTS:
|
|
279
279
|
return b.DRAW;
|
|
280
|
-
case
|
|
280
|
+
case R.TEXT:
|
|
281
281
|
return b.TYPE;
|
|
282
282
|
default:
|
|
283
283
|
return b.UPLOAD;
|
|
@@ -320,16 +320,16 @@ const it = ({ value: e, onChange: t, target: a }) => {
|
|
|
320
320
|
handleClear: f
|
|
321
321
|
};
|
|
322
322
|
}, ct = {
|
|
323
|
-
[b.DRAW]: (e) => (e == null ? void 0 : e.mimeType) ===
|
|
324
|
-
[b.TYPE]: (e) => (e == null ? void 0 : e.mimeType) ===
|
|
325
|
-
[b.UPLOAD]: (e) => (e == null ? void 0 : e.mimeType) !==
|
|
323
|
+
[b.DRAW]: (e) => (e == null ? void 0 : e.mimeType) === R.POINTS,
|
|
324
|
+
[b.TYPE]: (e) => (e == null ? void 0 : e.mimeType) === R.TEXT,
|
|
325
|
+
[b.UPLOAD]: (e) => (e == null ? void 0 : e.mimeType) !== R.POINTS && (e == null ? void 0 : e.mimeType) !== R.TEXT
|
|
326
326
|
};
|
|
327
327
|
function ut(e, t, a) {
|
|
328
328
|
return t && ct[e](a) ? t : void 0;
|
|
329
329
|
}
|
|
330
330
|
const dt = (e) => {
|
|
331
331
|
const t = e.url ? N(e.url) : void 0;
|
|
332
|
-
return t ? t.mimeType !==
|
|
332
|
+
return t ? t.mimeType !== R.POINTS && t.mimeType !== R.TEXT : !0;
|
|
333
333
|
}, te = () => {
|
|
334
334
|
const { hoverProps: e, isHovered: t } = ve({}), { focusProps: a, isFocused: n, isFocusVisible: r } = xe({
|
|
335
335
|
within: !0
|
|
@@ -375,15 +375,15 @@ const dt = (e) => {
|
|
|
375
375
|
}), o && F(d, {
|
|
376
376
|
handleClear: i
|
|
377
377
|
}));
|
|
378
|
-
},
|
|
378
|
+
}, _ = ({ children: e, className: t, ...a }) => {
|
|
379
379
|
const { signatureMode: n, setSignatureMode: r, uploadEnabled: o } = a, { disabled: i } = A(), { labelId: l, inputId: c } = H(), d = I((h) => {
|
|
380
380
|
r(h);
|
|
381
381
|
}, [
|
|
382
382
|
r
|
|
383
383
|
]), u = {
|
|
384
|
-
[b.DRAW]: T(e,
|
|
385
|
-
[b.TYPE]: T(e,
|
|
386
|
-
[b.UPLOAD]: o ? T(e,
|
|
384
|
+
[b.DRAW]: T(e, _.Draw),
|
|
385
|
+
[b.TYPE]: T(e, _.Type),
|
|
386
|
+
[b.UPLOAD]: o ? T(e, _.Upload) : null
|
|
387
387
|
}, f = u[n], m = mt(f) ? f.props.description : void 0;
|
|
388
388
|
return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("div", {
|
|
389
389
|
role: "status",
|
|
@@ -404,7 +404,7 @@ const dt = (e) => {
|
|
|
404
404
|
"data-hook": ke.SIGNATURE_FIELD_MODE_SELECT,
|
|
405
405
|
className: t
|
|
406
406
|
}, u[b.DRAW], u[b.TYPE], u[b.UPLOAD]));
|
|
407
|
-
}, mt = (e) => /* @__PURE__ */
|
|
407
|
+
}, mt = (e) => /* @__PURE__ */ Re(e), ne = ({ mode: e, children: t, className: a, "aria-label": n }) => /* @__PURE__ */ s.createElement(Pe, {
|
|
408
408
|
value: e,
|
|
409
409
|
"aria-label": n
|
|
410
410
|
}, /* @__PURE__ */ s.createElement(Ne, {
|
|
@@ -429,8 +429,8 @@ const dt = (e) => {
|
|
|
429
429
|
"data-hook": `clear-${i}`,
|
|
430
430
|
className: t
|
|
431
431
|
}, e);
|
|
432
|
-
},
|
|
433
|
-
const { signatureView: n, signatureValueForView: r, handleChange: o, handleBeforeChange: i } = a, { disabled: l, readOnly: c, onBlur: d, onFocus: u, hasError: f } = A(), m = T(e,
|
|
432
|
+
}, P = ({ children: e, className: t, ...a }) => {
|
|
433
|
+
const { signatureView: n, signatureValueForView: r, handleChange: o, handleBeforeChange: i } = a, { disabled: l, readOnly: c, onBlur: d, onFocus: u, hasError: f } = A(), m = T(e, P.Canvas), h = T(e, P.Type), E = T(e, P.Upload);
|
|
434
434
|
return /* @__PURE__ */ s.createElement("div", {
|
|
435
435
|
className: t,
|
|
436
436
|
"data-hook": "signature-input",
|
|
@@ -468,7 +468,7 @@ const dt = (e) => {
|
|
|
468
468
|
var D;
|
|
469
469
|
(D = L.current) == null || D.focus();
|
|
470
470
|
}, f);
|
|
471
|
-
const
|
|
471
|
+
const w = De(() => ({
|
|
472
472
|
throttle: 0,
|
|
473
473
|
dotSize: 2,
|
|
474
474
|
minWidth: 1,
|
|
@@ -495,7 +495,7 @@ const dt = (e) => {
|
|
|
495
495
|
var k, $, se, ie;
|
|
496
496
|
if (D != null) {
|
|
497
497
|
if (L.current = D, p.current = new he(D, {
|
|
498
|
-
...
|
|
498
|
+
...w,
|
|
499
499
|
penColor: getComputedStyle(D).color || void 0
|
|
500
500
|
}), me(L.current, p.current), x) {
|
|
501
501
|
const le = Le(x);
|
|
@@ -508,7 +508,7 @@ const dt = (e) => {
|
|
|
508
508
|
} else
|
|
509
509
|
($ = y.current) == null || $.disconnect(), (se = p.current) == null || se.removeEventListener("endStroke", q), (ie = p.current) == null || ie.removeEventListener("beginStroke", j);
|
|
510
510
|
}, [
|
|
511
|
-
|
|
511
|
+
w,
|
|
512
512
|
x,
|
|
513
513
|
j,
|
|
514
514
|
q
|
|
@@ -538,23 +538,23 @@ const dt = (e) => {
|
|
|
538
538
|
data: ""
|
|
539
539
|
};
|
|
540
540
|
Ee(() => {
|
|
541
|
-
const
|
|
542
|
-
|
|
541
|
+
const w = document.getElementById(h);
|
|
542
|
+
w == null || w.focus({
|
|
543
543
|
preventScroll: !0
|
|
544
544
|
});
|
|
545
545
|
}, u), Q(() => {
|
|
546
546
|
if (!n) {
|
|
547
|
-
const
|
|
548
|
-
|
|
547
|
+
const w = document.getElementById(h);
|
|
548
|
+
w && (w.value = "");
|
|
549
549
|
}
|
|
550
550
|
}, [
|
|
551
551
|
n,
|
|
552
552
|
h
|
|
553
553
|
]);
|
|
554
|
-
const U = I((
|
|
555
|
-
o == null || o(),
|
|
556
|
-
data:
|
|
557
|
-
mimeType:
|
|
554
|
+
const U = I((w) => {
|
|
555
|
+
o == null || o(), w.trim() ? r(ee(Ce({
|
|
556
|
+
data: w,
|
|
557
|
+
mimeType: R.TEXT
|
|
558
558
|
}))) : r(null);
|
|
559
559
|
}, [
|
|
560
560
|
o,
|
|
@@ -580,7 +580,7 @@ const dt = (e) => {
|
|
|
580
580
|
})));
|
|
581
581
|
}, Lt = ({ className: e, placeholder: t, ...a }) => {
|
|
582
582
|
const { inputId: n, ariaDescribedBy: r } = a;
|
|
583
|
-
return /* @__PURE__ */ s.createElement(
|
|
583
|
+
return /* @__PURE__ */ s.createElement(_e, {
|
|
584
584
|
id: n,
|
|
585
585
|
"data-hook": "signature-text",
|
|
586
586
|
"aria-describedby": r,
|
|
@@ -657,15 +657,15 @@ g.Input = Z;
|
|
|
657
657
|
g.Description = We;
|
|
658
658
|
g.Error = He;
|
|
659
659
|
Z.Header = X;
|
|
660
|
-
Z.Value =
|
|
661
|
-
X.Tabs =
|
|
660
|
+
Z.Value = P;
|
|
661
|
+
X.Tabs = _;
|
|
662
662
|
X.Clear = gt;
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
663
|
+
_.Draw = pt;
|
|
664
|
+
_.Type = ft;
|
|
665
|
+
_.Upload = ht;
|
|
666
|
+
P.Canvas = Et;
|
|
667
|
+
P.Type = ae;
|
|
668
|
+
P.Upload = re;
|
|
669
669
|
ae.Value = Lt;
|
|
670
670
|
re.Button = yt;
|
|
671
671
|
const Tt = () => {
|
|
@@ -714,7 +714,7 @@ const Tt = () => {
|
|
|
714
714
|
}, /* @__PURE__ */ s.createElement("path", {
|
|
715
715
|
fillRule: "evenodd",
|
|
716
716
|
d: "M18.8525,7.543 L17.7515,8.644 L15.3565,6.248 L16.4575,5.147 C16.5555,5.05 16.6835,5.001 16.8105,5.001 C16.9385,5.001 17.0665,5.05 17.1645,5.147 L18.8525,6.835 C19.0475,7.03 19.0475,7.348 18.8525,7.543 L18.8525,7.543 Z M8.1895,18.206 C8.1185,18.276 8.0275,18.324 7.9295,18.344 L5.1275,18.873 L5.6575,16.07 C5.6755,15.972 5.7225,15.882 5.7945,15.811 L14.6495,6.955 L17.0445,9.351 L8.1895,18.206 Z M19.5595,6.128 L17.8715,4.44 C17.2865,3.856 16.3355,3.856 15.7505,4.44 L5.0875,15.103 C4.8735,15.317 4.7295,15.588 4.6745,15.886 L4.0085,19.407 C3.9775,19.569 4.0295,19.736 4.1465,19.854 C4.2415,19.948 4.3685,20 4.4995,20 C4.5305,20 4.5615,19.997 4.5925,19.991 L8.1165,19.326 C8.4145,19.269 8.6855,19.125 8.8965,18.912 L19.5595,8.25 C20.1445,7.665 20.1445,6.713 19.5595,6.128 L19.5595,6.128 Z"
|
|
717
|
-
})),
|
|
717
|
+
})), Rt = (e) => /* @__PURE__ */ s.createElement("svg", {
|
|
718
718
|
viewBox: "0 0 20 20",
|
|
719
719
|
width: 24,
|
|
720
720
|
height: 24,
|
|
@@ -724,17 +724,17 @@ const Tt = () => {
|
|
|
724
724
|
}, /* @__PURE__ */ s.createElement("path", {
|
|
725
725
|
fillRule: "evenodd",
|
|
726
726
|
d: "M12,4 L12,5 L8,5 L8,16 L7,16 L7,5 L3,5 L3,4 L12,4 Z M18,8 L18,9 L15,9 L15,16 L14,16 L14,9 L11,9 L11,8 L18,8 Z"
|
|
727
|
-
})),
|
|
728
|
-
header:
|
|
727
|
+
})), wt = "_header_15ti0_1", vt = "_tabs_15ti0_8", xt = "_tab_15ti0_8", St = "_tabIcon_15ti0_74", Ft = "_clear_15ti0_81", At = "_value_15ti0_113", _t = "_box_15ti0_118", Pt = "_uploadBox_15ti0_119", Nt = "_typeInput_15ti0_230", C = {
|
|
728
|
+
header: wt,
|
|
729
729
|
tabs: vt,
|
|
730
730
|
tab: xt,
|
|
731
731
|
tabIcon: St,
|
|
732
732
|
clear: Ft,
|
|
733
733
|
value: At,
|
|
734
|
-
box:
|
|
735
|
-
uploadBox:
|
|
734
|
+
box: _t,
|
|
735
|
+
uploadBox: Pt,
|
|
736
736
|
typeInput: Nt
|
|
737
|
-
}, Ut = ({ content: e, locale: t }) => /* @__PURE__ */ s.createElement(
|
|
737
|
+
}, Ut = ({ content: e, locale: t }) => /* @__PURE__ */ s.createElement(we, {
|
|
738
738
|
content: e,
|
|
739
739
|
locale: t
|
|
740
740
|
}), Ot = () => {
|
|
@@ -757,7 +757,7 @@ const Tt = () => {
|
|
|
757
757
|
className: v(B, C.tab),
|
|
758
758
|
"aria-label": e.typeLabel,
|
|
759
759
|
description: e.typeDescription
|
|
760
|
-
}, /* @__PURE__ */ s.createElement(
|
|
760
|
+
}, /* @__PURE__ */ s.createElement(Rt, {
|
|
761
761
|
className: C.tabIcon
|
|
762
762
|
})), /* @__PURE__ */ s.createElement(g.Input.Header.Tabs.Upload, {
|
|
763
763
|
className: v(B, C.tab),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import t, { useRef as y, useCallback as f } from "react";
|
|
2
2
|
import P from "@wix/editor-react-components/AnimatedIcon";
|
|
3
3
|
import b from "classnames";
|
|
4
|
-
import {
|
|
4
|
+
import { ak as B, ae as h } from "./form-B3YjGh0T.js";
|
|
5
5
|
import { ProgressBar as A, Button as N } from "react-aria-components";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import {
|
|
7
|
+
import { a4 as I, a3 as O, a6 as w, a8 as F, A as k, a7 as R } from "./form-element-classes-CLZXu-91.js";
|
|
8
8
|
function M(n) {
|
|
9
9
|
const s = "calc(50% - 2px)";
|
|
10
10
|
return /* @__PURE__ */ t.createElement(A, {
|
|
@@ -92,13 +92,13 @@ _.PreviousButton = C;
|
|
|
92
92
|
_.NextButton = x;
|
|
93
93
|
_.SubmitButton = i;
|
|
94
94
|
u.SubmitButton = _;
|
|
95
|
-
const H = "_navigationContainer_nvvyn_1", W = "_rowSpacing_nvvyn_6", V = "_navigationButton_nvvyn_10",
|
|
95
|
+
const H = "_navigationContainer_nvvyn_1", W = "_rowSpacing_nvvyn_6", V = "_navigationButton_nvvyn_10", X = "_nextButton_nvvyn_24", $ = "_previousButton_nvvyn_47", j = "_button_nvvyn_90", q = "_buttonNoSteps_nvvyn_133", z = "_buttonWithSteps_nvvyn_137", G = "_progress_nvvyn_165", a = {
|
|
96
96
|
navigationContainer: H,
|
|
97
97
|
rowSpacing: W,
|
|
98
98
|
navigationButton: V,
|
|
99
|
-
nextButton:
|
|
100
|
-
previousButton:
|
|
101
|
-
button:
|
|
99
|
+
nextButton: X,
|
|
100
|
+
previousButton: $,
|
|
101
|
+
button: j,
|
|
102
102
|
buttonNoSteps: q,
|
|
103
103
|
buttonWithSteps: z,
|
|
104
104
|
progress: G
|
|
@@ -132,7 +132,7 @@ const H = "_navigationContainer_nvvyn_1", W = "_rowSpacing_nvvyn_6", V = "_navig
|
|
|
132
132
|
}), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton.Icon, null, r.svg ? /* @__PURE__ */ t.createElement(P, {
|
|
133
133
|
...r,
|
|
134
134
|
ref: S,
|
|
135
|
-
className: b(
|
|
135
|
+
className: b(k, R, e)
|
|
136
136
|
}) : null), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton.Loader, {
|
|
137
137
|
className: a.progress
|
|
138
138
|
}))));
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
2
|
-
import
|
|
3
|
-
import e, { useMemo as
|
|
4
|
-
import { CheckboxGroup as
|
|
5
|
-
import {
|
|
1
|
+
import { RicosViewer as Q } from "@wix/ricos/viewer";
|
|
2
|
+
import R from "classnames";
|
|
3
|
+
import e, { useMemo as L, useState as j, useRef as M, useLayoutEffect as w, useCallback as k } from "react";
|
|
4
|
+
import { CheckboxGroup as z, TextField as J, Input as K, CheckboxField as X, CheckboxButton as Y } from "react-aria-components";
|
|
5
|
+
import { ak as N, ah as Z, au as y, ac as ee, am as te } from "./form-B3YjGh0T.js";
|
|
6
6
|
import { f, a as x } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { E as B, D as
|
|
8
|
-
import { L as
|
|
7
|
+
import { E as B, D as $ } from "./field-error-headless-9MKScovg.js";
|
|
8
|
+
import { L as q } from "./field-label-headless-BaoLrUWJ.js";
|
|
9
9
|
import { F as oe } from "./fieldset-headless-CD3fds9J.js";
|
|
10
|
-
import { N as
|
|
10
|
+
import { N as v } from "./options-layout-constants-DEfIEJWD.js";
|
|
11
11
|
import { E as ne } from "./error-icon-hZxQ6DEy.js";
|
|
12
|
-
import { s as
|
|
13
|
-
import {
|
|
12
|
+
import { s as D } from "./field-rac.module-BUvPquav.js";
|
|
13
|
+
import { B as ae, R as se, _ as re, q as le, i as ie, $ as ce } from "./form-element-classes-CLZXu-91.js";
|
|
14
14
|
import { o as ue } from "./options-rac.module-KM-VT_KY.js";
|
|
15
|
-
import { u as de } from "./use-element-state-class-name
|
|
16
|
-
import { u as me } from "./use-text-input-class-name-
|
|
17
|
-
const
|
|
15
|
+
import { u as de } from "./use-element-state-class-name--YLulmsU.js";
|
|
16
|
+
import { u as me } from "./use-text-input-class-name-3Xp-hNDT.js";
|
|
17
|
+
const g = "Other", pe = (o, t) => {
|
|
18
18
|
const s = t.length + 2;
|
|
19
19
|
return (o.find((r) => r.startsWith(`${t}: `)) || "").slice(s);
|
|
20
20
|
}, he = (o) => o.map((t) => t.value ?? t.label), H = ({ className: o, ...t }) => {
|
|
@@ -22,16 +22,16 @@ const R = "Other", pe = (o, t) => {
|
|
|
22
22
|
return /* @__PURE__ */ e.createElement("span", {
|
|
23
23
|
className: o
|
|
24
24
|
}, a);
|
|
25
|
-
},
|
|
26
|
-
const { value: t, onChange: a, addOtherLabel: s, addOtherPlaceholder: c, otherInputCharacterLimit: r, disabled: u, readOnly: b, hasError: d } = N(), { t: m } =
|
|
25
|
+
}, P = ({ className: o }) => {
|
|
26
|
+
const { value: t, onChange: a, addOtherLabel: s, addOtherPlaceholder: c, otherInputCharacterLimit: r, disabled: u, readOnly: b, hasError: d } = N(), { t: m } = y(), l = s || m("add-other.default-other-option-label") || g, p = L(() => pe(t || [], l), [
|
|
27
27
|
t,
|
|
28
28
|
l
|
|
29
|
-
]), [n,
|
|
30
|
-
|
|
29
|
+
]), [n, _] = j(p), h = M(a);
|
|
30
|
+
w(() => {
|
|
31
31
|
h.current = a;
|
|
32
32
|
});
|
|
33
33
|
const C = k((E) => {
|
|
34
|
-
|
|
34
|
+
_(E);
|
|
35
35
|
const I = (t || []).filter((O) => !O.startsWith(`${l}:`) && O !== l), F = E ? `${l}: ${E}` : l;
|
|
36
36
|
h.current([
|
|
37
37
|
...I,
|
|
@@ -41,14 +41,14 @@ const R = "Other", pe = (o, t) => {
|
|
|
41
41
|
t,
|
|
42
42
|
l
|
|
43
43
|
]);
|
|
44
|
-
return /* @__PURE__ */ e.createElement(
|
|
44
|
+
return /* @__PURE__ */ e.createElement(J, {
|
|
45
45
|
value: n,
|
|
46
46
|
onChange: C,
|
|
47
47
|
isDisabled: u,
|
|
48
48
|
isReadOnly: b,
|
|
49
49
|
isInvalid: d,
|
|
50
50
|
"aria-label": l
|
|
51
|
-
}, /* @__PURE__ */ e.createElement(
|
|
51
|
+
}, /* @__PURE__ */ e.createElement(K, {
|
|
52
52
|
"data-hook": "tags-other-input",
|
|
53
53
|
"data-filled": n ? !0 : void 0,
|
|
54
54
|
placeholder: c,
|
|
@@ -56,16 +56,16 @@ const R = "Other", pe = (o, t) => {
|
|
|
56
56
|
className: o
|
|
57
57
|
}));
|
|
58
58
|
}, T = ({ children: o, className: t, ...a }) => {
|
|
59
|
-
const { value: s, label: c, isOther: r, isFirstOption: u } = a, { id: b, value: d, onChange: m, options: l, disabled: p, readOnly: n, hasError:
|
|
59
|
+
const { value: s, label: c, isOther: r, isFirstOption: u } = a, { id: b, value: d, onChange: m, options: l, disabled: p, readOnly: n, hasError: _ } = N(), h = M(null);
|
|
60
60
|
te(() => {
|
|
61
61
|
var O;
|
|
62
62
|
u && ((O = h.current) == null || O.focus({
|
|
63
63
|
preventScroll: !0
|
|
64
64
|
}));
|
|
65
65
|
}, b);
|
|
66
|
-
const C = f(o, H), E =
|
|
66
|
+
const C = f(o, H), E = L(() => d || [], [
|
|
67
67
|
d
|
|
68
|
-
]), I =
|
|
68
|
+
]), I = L(() => r ? E.find((O) => O === c || O.startsWith(`${c}: `)) || c : s, [
|
|
69
69
|
r,
|
|
70
70
|
E,
|
|
71
71
|
c,
|
|
@@ -82,16 +82,16 @@ const R = "Other", pe = (o, t) => {
|
|
|
82
82
|
l,
|
|
83
83
|
E
|
|
84
84
|
]);
|
|
85
|
-
return /* @__PURE__ */ e.createElement(
|
|
85
|
+
return /* @__PURE__ */ e.createElement(X, {
|
|
86
86
|
inputRef: h,
|
|
87
87
|
value: I,
|
|
88
88
|
onChange: r ? F : void 0,
|
|
89
89
|
isDisabled: p,
|
|
90
90
|
isReadOnly: n,
|
|
91
|
-
isInvalid:
|
|
92
|
-
}, /* @__PURE__ */ e.createElement(
|
|
91
|
+
isInvalid: _
|
|
92
|
+
}, /* @__PURE__ */ e.createElement(Y, {
|
|
93
93
|
className: t,
|
|
94
|
-
"data-hook": `tags-${r ?
|
|
94
|
+
"data-hook": `tags-${r ? g : s}`
|
|
95
95
|
}, x(C, {
|
|
96
96
|
value: s,
|
|
97
97
|
label: c,
|
|
@@ -99,7 +99,7 @@ const R = "Other", pe = (o, t) => {
|
|
|
99
99
|
isFirstOption: u
|
|
100
100
|
})));
|
|
101
101
|
}, V = ({ children: o, className: t }) => {
|
|
102
|
-
const { options: a, addOther: s, addOtherLabel: c, numberOfColumns: r =
|
|
102
|
+
const { options: a, addOther: s, addOtherLabel: c, numberOfColumns: r = v.FREE_FLOW } = N(), { isMobile: u } = ee(), { t: b } = y(), d = u && r !== v.FREE_FLOW ? v.ONE : r, m = c || b("add-other.default-other-option-label") || g, l = f(o, T), p = L(() => {
|
|
103
103
|
const n = a || [];
|
|
104
104
|
return s ? [
|
|
105
105
|
...n,
|
|
@@ -117,18 +117,18 @@ const R = "Other", pe = (o, t) => {
|
|
|
117
117
|
return p.length === 0 ? null : /* @__PURE__ */ e.createElement("div", {
|
|
118
118
|
className: t,
|
|
119
119
|
"data-columns": d
|
|
120
|
-
}, p.map((n,
|
|
120
|
+
}, p.map((n, _) => {
|
|
121
121
|
const h = n.value ?? n.label;
|
|
122
122
|
return x(l, {
|
|
123
|
-
key: n.isOther ?
|
|
123
|
+
key: n.isOther ? g : h,
|
|
124
124
|
value: h,
|
|
125
125
|
label: n.label,
|
|
126
126
|
isOther: n.isOther,
|
|
127
|
-
isFirstOption:
|
|
127
|
+
isFirstOption: _ === 0
|
|
128
128
|
});
|
|
129
129
|
}));
|
|
130
|
-
},
|
|
131
|
-
const { addOther: a, addOtherLabel: s, hasError: c, readOnly: r, value: u } = N(), { t: b } =
|
|
130
|
+
}, W = ({ children: o, className: t }) => {
|
|
131
|
+
const { addOther: a, addOtherLabel: s, hasError: c, readOnly: r, value: u } = N(), { t: b } = y(), d = s || b("add-other.default-other-option-label") || g, m = f(o, V), l = f(o, P), p = L(() => !a || !u ? !1 : u.some((n) => n === d || n.startsWith(`${d}:`)), [
|
|
132
132
|
a,
|
|
133
133
|
u,
|
|
134
134
|
d
|
|
@@ -139,20 +139,20 @@ const R = "Other", pe = (o, t) => {
|
|
|
139
139
|
"data-readonly": r
|
|
140
140
|
}, m, p && l);
|
|
141
141
|
}, i = ({ children: o }) => {
|
|
142
|
-
const { id: t, value: a, onChange: s, FieldLayout: c, required: r, disabled: u, readOnly: b, hasError: d, onBlur: m, onFocus: l } = N(), { inputId: p, labelId: n, ariaDescribedBy:
|
|
142
|
+
const { id: t, value: a, onChange: s, FieldLayout: c, required: r, disabled: u, readOnly: b, hasError: d, onBlur: m, onFocus: l } = N(), { inputId: p, labelId: n, ariaDescribedBy: _ } = Z(), h = L(() => a || [], [
|
|
143
143
|
a
|
|
144
|
-
]), C = f(o,
|
|
144
|
+
]), C = f(o, q), E = f(o, W), I = f(o, $), F = f(o, B);
|
|
145
145
|
return /* @__PURE__ */ e.createElement(c, {
|
|
146
146
|
fieldId: t,
|
|
147
147
|
renderLabel: () => C,
|
|
148
148
|
renderInput: () => /* @__PURE__ */ e.createElement(oe, {
|
|
149
149
|
id: p,
|
|
150
150
|
ariaLabelledBy: n,
|
|
151
|
-
ariaDescribedBy:
|
|
151
|
+
ariaDescribedBy: _,
|
|
152
152
|
required: r,
|
|
153
153
|
onBlur: m,
|
|
154
154
|
onFocus: l
|
|
155
|
-
}, /* @__PURE__ */ e.createElement(
|
|
155
|
+
}, /* @__PURE__ */ e.createElement(z, {
|
|
156
156
|
"aria-labelledby": n,
|
|
157
157
|
value: h,
|
|
158
158
|
onChange: s,
|
|
@@ -166,38 +166,38 @@ const R = "Other", pe = (o, t) => {
|
|
|
166
166
|
};
|
|
167
167
|
V.Option = T;
|
|
168
168
|
T.Label = H;
|
|
169
|
-
i.Label =
|
|
170
|
-
i.Control =
|
|
169
|
+
i.Label = q;
|
|
170
|
+
i.Control = W;
|
|
171
171
|
i.Options = V;
|
|
172
|
-
i.OtherInput =
|
|
173
|
-
i.Description =
|
|
172
|
+
i.OtherInput = P;
|
|
173
|
+
i.Description = $;
|
|
174
174
|
i.Error = B;
|
|
175
|
-
const Ee = "_control_7oh59_1", Oe = "_options_7oh59_7", be = "_option_7oh59_7", fe = "_optionHover_7oh59_72",
|
|
175
|
+
const Ee = "_control_7oh59_1", Oe = "_options_7oh59_7", be = "_option_7oh59_7", fe = "_optionHover_7oh59_72", _e = "_optionSelected_7oh59_72", S = {
|
|
176
176
|
control: Ee,
|
|
177
177
|
options: Oe,
|
|
178
178
|
option: be,
|
|
179
179
|
optionHover: fe,
|
|
180
|
-
optionSelected:
|
|
181
|
-
},
|
|
180
|
+
optionSelected: _e
|
|
181
|
+
}, Le = ({ content: o, locale: t }) => /* @__PURE__ */ e.createElement(Q, {
|
|
182
182
|
content: o,
|
|
183
183
|
locale: t
|
|
184
184
|
}), Ce = {
|
|
185
|
-
base:
|
|
186
|
-
selected:
|
|
187
|
-
hover:
|
|
188
|
-
},
|
|
185
|
+
base: S.option,
|
|
186
|
+
selected: S.optionSelected,
|
|
187
|
+
hover: S.optionHover
|
|
188
|
+
}, $e = () => {
|
|
189
189
|
const o = de({
|
|
190
190
|
globalClasses: ce,
|
|
191
191
|
moduleClasses: Ce
|
|
192
192
|
}), t = me();
|
|
193
193
|
return /* @__PURE__ */ e.createElement(i, null, /* @__PURE__ */ e.createElement(i.Label, {
|
|
194
|
-
className:
|
|
194
|
+
className: R(ae, D.label)
|
|
195
195
|
}, /* @__PURE__ */ e.createElement(i.Label.Required, {
|
|
196
|
-
className:
|
|
196
|
+
className: R(se, D.requiredMark)
|
|
197
197
|
})), /* @__PURE__ */ e.createElement(i.Control, {
|
|
198
|
-
className:
|
|
198
|
+
className: S.control
|
|
199
199
|
}, /* @__PURE__ */ e.createElement(i.Options, {
|
|
200
|
-
className:
|
|
200
|
+
className: R(re, S.options)
|
|
201
201
|
}, /* @__PURE__ */ e.createElement(i.Options.Option, {
|
|
202
202
|
className: ({ isSelected: a, isHovered: s }) => o({
|
|
203
203
|
isSelected: a,
|
|
@@ -208,11 +208,11 @@ const Ee = "_control_7oh59_1", Oe = "_options_7oh59_7", be = "_option_7oh59_7",
|
|
|
208
208
|
}))), /* @__PURE__ */ e.createElement(i.OtherInput, {
|
|
209
209
|
className: t
|
|
210
210
|
})), /* @__PURE__ */ e.createElement(i.Error, {
|
|
211
|
-
className:
|
|
211
|
+
className: R(le, D.error)
|
|
212
212
|
}, /* @__PURE__ */ e.createElement(ne, null), /* @__PURE__ */ e.createElement(i.Error.Text, null)), /* @__PURE__ */ e.createElement(i.Description, {
|
|
213
|
-
className:
|
|
214
|
-
},
|
|
213
|
+
className: R(ie, D.description)
|
|
214
|
+
}, Le));
|
|
215
215
|
};
|
|
216
216
|
export {
|
|
217
|
-
|
|
217
|
+
$e as T
|
|
218
218
|
};
|