@wix/form-elements 1.150.0 → 1.152.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-CeJ6tmgt.js → appointment-rac-CjDsESxp.js} +4 -4
- package/dist/component/{bookings-address-rac-CEObYEbj.js → bookings-address-rac-BWDAieZC.js} +1 -1
- package/dist/component/{bookings-email-rac-DmW99D5W.js → bookings-email-rac-DoMJ0Cq2.js} +1 -1
- package/dist/component/{bookings-first-name-rac-GmKet4hL.js → bookings-first-name-rac-Bb0TrNKq.js} +1 -1
- package/dist/component/{bookings-header-rac-C_J1YzAq.js → bookings-header-rac-DvXXEmRp.js} +1 -1
- package/dist/component/{bookings-last-name-rac-Bj-gwK0F.js → bookings-last-name-rac-q_zzV8ZS.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-ol4QLAP6.js → bookings-login-bar-rac-USocDYyR.js} +1 -1
- package/dist/component/{bookings-phone-rac-oaCG294y.js → bookings-phone-rac-D4JHCrYc.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-sMiikQgk.js → bookings-rich-text-rac-D5ScrRTy.js} +1 -1
- package/dist/component/{checkbox-field-rac-DxGaRbDj.js → checkbox-field-rac-g9tefDjj.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-C3ZaCvQz.js → checkbox-group-field-headless-KeJlwm_s.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CMj-kfFN.js → checkbox-group-field-rac-C10zjFrB.js} +7 -7
- package/dist/component/{checkbox-group-rac-DpOT4H7g.js → checkbox-group-rac-xrqoPwH0.js} +1 -1
- package/dist/component/{checkbox-rac-CwdOkW8r.js → checkbox-rac-DnUqY4X0.js} +1 -1
- package/dist/component/{contacts-address-rac-CQvt1Epy.js → contacts-address-rac-CrJJt8Lm.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-VRGtjIMf.js → contacts-birthdate-rac-Dj0Z5Dq4.js} +1 -1
- package/dist/component/{contacts-company-rac-B_XDJTL9.js → contacts-company-rac-CfAzWpsO.js} +1 -1
- package/dist/component/{contacts-email-rac-BJ0EdzZo.js → contacts-email-rac-DEt_W-OY.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DzBzJXj7.js → contacts-first-name-rac-5cge4OTl.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DAHlHpW7.js → contacts-last-name-rac-WCJRmxoK.js} +1 -1
- package/dist/component/{contacts-phone-rac-C4D1TMqv.js → contacts-phone-rac-9cJ-XZYq.js} +1 -1
- package/dist/component/{contacts-position-rac-g0CJQJLc.js → contacts-position-rac-CFoAC1v-.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-C54jQIum.js → contacts-subscribe-rac-CbqxvKnO.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-D_JlmKJb.js → contacts-tax-id-rac-Cpy8M_0G.js} +1 -1
- package/dist/component/{date-availability-CFp_AHpE.js → date-availability-DpP0-dxh.js} +1 -1
- package/dist/component/{date-input-field-rac-CxOU5_P5.js → date-input-field-rac-DNP0Db4K.js} +6 -6
- package/dist/component/{date-input-rac-CEuyvgIp.js → date-input-rac-5H7z1Sjy.js} +1 -1
- package/dist/component/{date-picker-field-rac-DC8gw2Qe.js → date-picker-field-rac-DviFddKc.js} +6 -6
- package/dist/component/{date-picker-rac-B8prCy1F.js → date-picker-rac-CxXpSPGD.js} +1 -1
- package/dist/component/{date-time-input-field-rac-FwScqIVQ.js → date-time-input-field-rac-CRapaca2.js} +6 -6
- package/dist/component/{date-time-input-rac-gdstXM2G.js → date-time-input-rac-DOMqIa4d.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DdEAXUYC.js → dext-checkbox-group-rac-CQPyapQG.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DYgl82IR.js → dext-checkbox-rac-CW4wF36k.js} +1 -1
- package/dist/component/{dext-date-picker-rac-SaO61461.js → dext-date-picker-rac-DFcrP0ZR.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-CQ2klkyf.js → dext-date-time-input-rac-Cs1Df2AX.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CYINWMm2.js → dext-dropdown-rac-D0ujCY8A.js} +1 -1
- package/dist/component/{dext-email-rac-7e49-L1S.js → dext-email-rac-Bh86O-fJ.js} +1 -1
- package/dist/component/{dext-number-input-rac-BxECUZaK.js → dext-number-input-rac-CkPDXgxl.js} +1 -1
- package/dist/component/{dext-phone-rac-BCUCWcrF.js → dext-phone-rac-CGHDBW0d.js} +1 -1
- package/dist/component/{dext-radio-group-rac-Bs_64hFW.js → dext-radio-group-rac-qhuKzhbR.js} +2 -2
- package/dist/component/{dext-rating-input-rac-Bl-MBjGQ.js → dext-rating-input-rac-05wft4wI.js} +1 -1
- package/dist/component/{dext-tags-rac-D98sEqwj.js → dext-tags-rac-Ch28_kSN.js} +2 -2
- package/dist/component/{dext-text-area-rac-Dsbsk2z4.js → dext-text-area-rac-BpPh9q1K.js} +1 -1
- package/dist/component/{dext-text-input-rac-vYtTnV5G.js → dext-text-input-rac-v7pE3sIs.js} +1 -1
- package/dist/component/{dext-url-input-rac-tJJZOvtn.js → dext-url-input-rac-BUyNTatI.js} +1 -1
- package/dist/component/{donation-rac-CPPSHRbF.js → donation-rac-lw-dkvAY.js} +5 -5
- package/dist/component/{dropdown-field-headless-BWbsB155.js → dropdown-field-headless-ttDyqdqW.js} +5 -5
- package/dist/component/{dropdown-field-rac-BYyLHTVV.js → dropdown-field-rac-D4Fvsn8C.js} +5 -5
- package/dist/component/{dropdown-rac-CyWVQHvW.js → dropdown-rac-BvNeMUaH.js} +1 -1
- package/dist/component/{ecom-address-rac-DLWEUZg7.js → ecom-address-rac-CeBuZKF4.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DY-Vzmr5.js → ecom-subscription-checkbox-rac-DvLt1LmK.js} +2 -2
- package/dist/component/{email-input-field-rac-00Q0cH3p.js → email-input-field-rac-Dl_USWLL.js} +3 -3
- package/dist/component/{events-repeater-rac-C_TDB0VL.js → events-repeater-rac-QJ04thEZ.js} +4 -4
- package/dist/component/{events-rsvp-rac-Cly4TgEv.js → events-rsvp-rac-Ch4lfvZv.js} +3 -3
- package/dist/component/{field-error-headless-sUpR20_V.js → field-error-headless-CgZAs65K.js} +1 -1
- package/dist/component/{field-label-headless-xEHyxl62.js → field-label-headless-CRYxe-vx.js} +1 -1
- package/dist/component/{file-upload-rac-BLTYhgrR.js → file-upload-rac-BvjGAd5T.js} +30 -30
- package/dist/component/{fixed-payment-rac-BBSzAU8U.js → fixed-payment-rac-DWNNpt-4.js} +8 -8
- package/dist/component/{form-DbRjIc40.js → form-DnpFCulG.js} +378 -377
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DdF0EtGw.js → header-field-rac-WSnI3a0s.js} +2 -2
- package/dist/component/{header-rac-CQzVj2se.js → header-rac-BLEwF0wr.js} +1 -1
- package/dist/component/{image-choice-rac-F4il5nrs.js → image-choice-rac-CH_bPal9.js} +4 -4
- package/dist/component/{index-3lV2ezGk.js → index-YBIt9TAJ.js} +2 -2
- package/dist/component/{index-ClGqqyFk.js → index-euOuJTY1.js} +4 -4
- package/dist/component/{isObjectLike-CbFuWC1b.js → isObjectLike-YcoeiSLm.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Bhkmy-UH.js → multiline-address-field-rac-CpmwYA8Q.js} +7 -7
- package/dist/component/{multiline-address-rac-CH6ZAJ_l.js → multiline-address-rac-dp2LSRyG.js} +1 -1
- package/dist/component/{number-input-field-rac-DEBHQQqw.js → number-input-field-rac-CfurrJkz.js} +9 -9
- package/dist/component/{number-input-rac-DL3ReqMc.js → number-input-rac-BFMTZwmv.js} +1 -1
- package/dist/component/{password-rac-Bo7Va46-.js → password-rac-Wqs-85Q8.js} +6 -6
- package/dist/component/{payment-input-rac-CyT2kcLF.js → payment-input-rac-DyY_Wj8U.js} +16 -16
- package/dist/component/{phone-input-field-rac-CKCkS2mG.js → phone-input-field-rac-C7KFjyig.js} +202 -202
- package/dist/component/{phone-rac-BcW_3aA5.js → phone-rac-Bhl7AZcj.js} +1 -1
- package/dist/component/{product-list-rac-Cxu5KYQ1.js → product-list-rac-B4oybHWH.js} +25 -25
- package/dist/component/{quiz-radio-group-rac-Bam3nw3m.js → quiz-radio-group-rac-oDweLSYP.js} +1 -1
- package/dist/component/{radio-button-module-classes-D6cil49f.js → radio-button-module-classes-CUkou54P.js} +3 -3
- package/dist/component/{radio-group-field-rac-BgWnXO5Q.js → radio-group-field-rac-BmR0H0UO.js} +8 -8
- package/dist/component/{radio-group-rac-BMepx9xD.js → radio-group-rac-DY2mnw30.js} +1 -1
- package/dist/component/{rating-input-field-rac-BmdQzQ1t.js → rating-input-field-rac-DRbFC_V7.js} +15 -15
- package/dist/component/{rating-input-rac-BuNTgro2.js → rating-input-rac-MtNlX53V.js} +1 -1
- package/dist/component/{rich-content-rac.module-DIShgYK1.js → rich-content-rac.module-B4fFSQ6R.js} +1 -1
- package/dist/component/{rich-text-field-rac-CfcWsMcr.js → rich-text-field-rac-Dew-awSN.js} +2 -2
- package/dist/component/{rich-text-rac-CbpbC1i1.js → rich-text-rac-4G6WBtds.js} +1 -1
- package/dist/component/{service-dropdown-rac-_ph-8eMR.js → service-dropdown-rac-DrKwsL6p.js} +11 -11
- package/dist/component/{services-multi-choice-rac-VS-18f_N.js → services-multi-choice-rac-C5pN_Zck.js} +8 -8
- package/dist/component/{signature-rac-CgCdt4im.js → signature-rac-8wj8b_im.js} +53 -53
- package/dist/component/{submit-button-rac-CAnahSZG.js → submit-button-rac-C9tR2MGH.js} +2 -2
- package/dist/component/{tags-field-rac-TdxHJoT1.js → tags-field-rac-CEKtxEMx.js} +17 -17
- package/dist/component/{tags-rac-ivZy_kqq.js → tags-rac-fGDFocqq.js} +1 -1
- package/dist/component/{text-area-field-rac-C4dg7l8s.js → text-area-field-rac-dRdFY5LY.js} +12 -12
- package/dist/component/{text-area-rac-Dqcg7ApJ.js → text-area-rac-uv8JLQ3Z.js} +1 -1
- package/dist/component/{text-input-field-rac-C6VjmvWa.js → text-input-field-rac--VebbXxr.js} +5 -5
- package/dist/component/{text-input-headless-CUsCjQmX.js → text-input-headless-CtdPYLHv.js} +3 -3
- package/dist/component/{text-input-rac-CMFWBJKG.js → text-input-rac-Wa1Ou8a5.js} +1 -1
- package/dist/component/{time-input-rac-cbG7WRTS.js → time-input-rac-KYSuxO5P.js} +16 -16
- package/dist/component/{url-input-field-rac-7yh9eqH3.js → url-input-field-rac-Bn6cCoo4.js} +7 -7
- package/dist/component/{url-input-rac-D_rkLxU0.js → url-input-rac-BPtRMinM.js} +1 -1
- package/dist/component/{use-dropdown-trigger-class-name-B53A0SXh.js → use-dropdown-trigger-class-name-0AI0_olG.js} +3 -3
- package/dist/component/{use-element-state-class-name-glM9I1ZZ.js → use-element-state-class-name-nqBrsuxl.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-DpOCZ2hg.js → use-hoverable-input-class-name-KQp9yOph.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-B0M0FaQ-.js → use-is-forced-open-dropdown-xB31vrZi.js} +1 -1
- package/dist/component/{use-service-options-base-CqZd8Yl3.js → use-service-options-base-SETfl9JT.js} +1 -1
- package/dist/component/use-text-input-class-name-BwCLUlxr.js +6 -0
- package/package.json +3 -3
- package/dist/component/use-text-input-class-name-DPUN9lls.js +0 -6
|
@@ -2,17 +2,17 @@ import r, { useRef as V, useContext as Ne, useMemo as be, useCallback as _, useS
|
|
|
2
2
|
import we from "@wix/editor-react-components/AnimatedIcon";
|
|
3
3
|
import { RicosViewer as xe } from "@wix/ricos/viewer";
|
|
4
4
|
import F from "classnames";
|
|
5
|
-
import { aS as Ue, bi as Te, au as Be, F as Oe, bk as Pe, bg as Me, bw as Ce, E as me, ak as oe, bo as x, bl as W, bq as Ie, by as He, bh as We,
|
|
5
|
+
import { aS as Ue, bi as Te, au as Be, F as Oe, bk as Pe, bg as Me, bw as Ce, E as me, ak as oe, bo as x, bl as W, bq as Ie, by as He, bh as We, R as Ye, a0 as qe, a1 as ke, v as pe, b as Ze, a7 as Ge, a8 as fe, H as Ve, a2 as $e, a5 as ze, a3 as Xe, a6 as je, f as ne, a4 as Je } from "./form-DnpFCulG.js";
|
|
6
6
|
import { useHover as Ke, useFocusRing as Qe, mergeProps as et } from "react-aria";
|
|
7
7
|
import { RadioGroup as tt, Button as ye, TextField as nt, DropZone as at, Input as ot, FileTrigger as st, RadioField as rt, RadioButton as lt } from "react-aria-components";
|
|
8
8
|
import _e from "signature_pad";
|
|
9
9
|
import { f as I, a as N } from "./find-child-C60k4CxG.js";
|
|
10
|
-
import { D as it, E as ct } from "./field-error-headless-
|
|
11
|
-
import { L as ut } from "./field-label-headless-
|
|
10
|
+
import { D as it, E as ct } from "./field-error-headless-CgZAs65K.js";
|
|
11
|
+
import { L as ut } from "./field-label-headless-CRYxe-vx.js";
|
|
12
12
|
import { D as dt } from "./data-hooks-Dkw1pbRj.js";
|
|
13
13
|
import { E as mt } from "./error-icon-hZxQ6DEy.js";
|
|
14
14
|
import { s as ae } from "./field-rac.module-DP0lkkEv.js";
|
|
15
|
-
import { u as z } from "./use-element-state-class-name-
|
|
15
|
+
import { u as z } from "./use-element-state-class-name-nqBrsuxl.js";
|
|
16
16
|
const pt = typeof r.useId == "function" ? r.useId : () => V(Ue()).current, ft = ({ properties: e }) => e.uploadEnabled === !0, ht = (e, t) => e.fieldType === Oe.SIGNATURE && !e.properties.hidden && !e.properties.disabled && !e.properties.readOnly && (t !== "upload" || ft(e)), Et = (e, t) => e.layout.row - t.layout.row || e.layout.column - t.layout.column, gt = (e) => {
|
|
17
17
|
var o;
|
|
18
18
|
const t = (o = Te().signature) == null ? void 0 : o.signatureMode, a = Ne(Be);
|
|
@@ -24,11 +24,11 @@ const pt = typeof r.useId == "function" ? r.useId : () => V(Ue()).current, ft =
|
|
|
24
24
|
t
|
|
25
25
|
]) === e ? t : void 0;
|
|
26
26
|
};
|
|
27
|
-
var
|
|
27
|
+
var R = /* @__PURE__ */ (function(e) {
|
|
28
28
|
return e.TEXT = "text/plain", e.POINTS = "points/json", e;
|
|
29
29
|
})({}), C = /* @__PURE__ */ (function(e) {
|
|
30
30
|
return e.DRAW = "draw", e.TYPE = "type", e.UPLOAD = "upload", e;
|
|
31
|
-
})({}),
|
|
31
|
+
})({}), S = /* @__PURE__ */ (function(e) {
|
|
32
32
|
return e.DRAW = "draw", e.TYPE = "type", e.IMAGE = "image", e.UPLOAD = "upload", e;
|
|
33
33
|
})({});
|
|
34
34
|
const bt = (e) => {
|
|
@@ -112,12 +112,12 @@ function Ee(e, t) {
|
|
|
112
112
|
const a = e.getContext("2d"), n = e.offsetWidth, o = e.offsetHeight, s = Math.max(window.devicePixelRatio || 1, 1), l = n * s, i = o * s;
|
|
113
113
|
return (e.width !== l || e.height !== i) && a ? (e.width = l, e.height = i, a.scale(s, s), t == null || t.redraw(), !0) : !1;
|
|
114
114
|
}
|
|
115
|
-
const G = 480, yt = (e) =>
|
|
115
|
+
const G = 480, yt = (e) => Ae({
|
|
116
116
|
data: JSON.stringify(e),
|
|
117
|
-
mimeType:
|
|
117
|
+
mimeType: R.POINTS
|
|
118
118
|
}), ve = (e) => {
|
|
119
119
|
const t = Y(e);
|
|
120
|
-
if ((t == null ? void 0 : t.mimeType) ===
|
|
120
|
+
if ((t == null ? void 0 : t.mimeType) === R.POINTS)
|
|
121
121
|
try {
|
|
122
122
|
return JSON.parse(t.data);
|
|
123
123
|
} catch {
|
|
@@ -125,7 +125,7 @@ const G = 480, yt = (e) => Re({
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
}, ge = 0.8, De = "Madefor";
|
|
128
|
-
function
|
|
128
|
+
function Re(e, t) {
|
|
129
129
|
const { width: a, actualBoundingBoxAscent: n, actualBoundingBoxDescent: o } = t.measureText(e);
|
|
130
130
|
return {
|
|
131
131
|
width: a,
|
|
@@ -136,25 +136,25 @@ function Se(e, t) {
|
|
|
136
136
|
function _t(e, t) {
|
|
137
137
|
const a = t.getContext("2d"), n = t.offsetWidth || t.width, s = (t.offsetHeight || t.height) * ge, l = n * ge;
|
|
138
138
|
a.font = `${s}px ${De}`;
|
|
139
|
-
const { width: i, height: c } =
|
|
139
|
+
const { width: i, height: c } = Re(e, a), u = s / (i / l), d = s / (c / s);
|
|
140
140
|
return Math.min(u, d);
|
|
141
141
|
}
|
|
142
142
|
function vt(e, t, a = "black", n = !1, o) {
|
|
143
143
|
const s = e.getContext("2d"), l = _t(t, e);
|
|
144
144
|
s.font = `${l}px ${De}`, s.textBaseline = "top";
|
|
145
|
-
const i = e.offsetWidth || e.width, c = e.offsetHeight || e.height, { width: u, height: d, offsetY: f } =
|
|
145
|
+
const i = e.offsetWidth || e.width, c = e.offsetHeight || e.height, { width: u, height: d, offsetY: f } = Re(t, s);
|
|
146
146
|
s.fillStyle = o, s.fillRect(0, 0, i, c), s.fillStyle = a;
|
|
147
147
|
const m = (i - u) / 2;
|
|
148
148
|
s.fillText(t, n ? i - m : m, (c - d) / 2 + f);
|
|
149
149
|
}
|
|
150
|
-
const
|
|
150
|
+
const Se = /^data:([^;,]+)(?:;([^,]+))?,(.+)$/;
|
|
151
151
|
function Dt(e) {
|
|
152
|
-
return
|
|
152
|
+
return Se.test(e);
|
|
153
153
|
}
|
|
154
154
|
function Y(e) {
|
|
155
155
|
if (!e)
|
|
156
156
|
return;
|
|
157
|
-
const t = e.match(
|
|
157
|
+
const t = e.match(Se);
|
|
158
158
|
if (!t)
|
|
159
159
|
return;
|
|
160
160
|
const [, a, n, o] = t;
|
|
@@ -164,11 +164,11 @@ function Y(e) {
|
|
|
164
164
|
encoding: n
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Ae({ data: e, mimeType: t, encoding: a = "text" }) {
|
|
168
168
|
const n = a === "base64" ? btoa(e) : encodeURI(e);
|
|
169
169
|
return `data:${a === "base64" ? `${t};base64` : t},${n}`;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Rt(e, t) {
|
|
172
172
|
const a = Y(e);
|
|
173
173
|
if (!a)
|
|
174
174
|
return;
|
|
@@ -192,18 +192,18 @@ function ie(e, t = "temp") {
|
|
|
192
192
|
fileType: (a == null ? void 0 : a.mimeType) ?? ""
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
async function
|
|
195
|
+
async function St(e, t) {
|
|
196
196
|
const a = Y(e);
|
|
197
197
|
if (!a)
|
|
198
198
|
return e;
|
|
199
199
|
const n = a.mimeType;
|
|
200
|
-
if (n ===
|
|
200
|
+
if (n === R.TEXT) {
|
|
201
201
|
const o = j(G * 20, G, 1);
|
|
202
202
|
vt(o, a.data, "black", t, "white");
|
|
203
203
|
const s = re(o, "white");
|
|
204
204
|
return (s == null ? void 0 : s.toDataURL("image/jpeg", 0.7)) ?? null;
|
|
205
205
|
}
|
|
206
|
-
if (n ===
|
|
206
|
+
if (n === R.POINTS) {
|
|
207
207
|
const o = ve(e);
|
|
208
208
|
if (!o)
|
|
209
209
|
return null;
|
|
@@ -221,10 +221,10 @@ async function At(e, t) {
|
|
|
221
221
|
}
|
|
222
222
|
return e;
|
|
223
223
|
}
|
|
224
|
-
async function
|
|
225
|
-
const a = await
|
|
224
|
+
async function At(e, t) {
|
|
225
|
+
const a = await St(e, t);
|
|
226
226
|
if (a)
|
|
227
|
-
return
|
|
227
|
+
return Rt(a, "signature");
|
|
228
228
|
}
|
|
229
229
|
const Nt = ({ value: e, onChange: t, target: a }) => {
|
|
230
230
|
const [n, o] = X(e), { isRTL: s } = Me(), l = bt(a), { setFormStatus: i } = Ce(), c = V();
|
|
@@ -239,7 +239,7 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
|
|
|
239
239
|
try {
|
|
240
240
|
const p = (g == null ? void 0 : g.url) ?? "";
|
|
241
241
|
if (Dt(p)) {
|
|
242
|
-
const E = await
|
|
242
|
+
const E = await At(p, s);
|
|
243
243
|
if (E) {
|
|
244
244
|
const h = await l(E);
|
|
245
245
|
t([
|
|
@@ -286,9 +286,9 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
|
|
|
286
286
|
if (s == null)
|
|
287
287
|
return C.DRAW;
|
|
288
288
|
switch (l == null ? void 0 : l.mimeType) {
|
|
289
|
-
case
|
|
289
|
+
case R.POINTS:
|
|
290
290
|
return C.DRAW;
|
|
291
|
-
case
|
|
291
|
+
case R.TEXT:
|
|
292
292
|
return C.TYPE;
|
|
293
293
|
default:
|
|
294
294
|
return C.UPLOAD;
|
|
@@ -309,13 +309,13 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
|
|
|
309
309
|
]), m = s != null, L = xt(i, s, l), g = (() => {
|
|
310
310
|
switch (i) {
|
|
311
311
|
case C.DRAW:
|
|
312
|
-
return
|
|
312
|
+
return S.DRAW;
|
|
313
313
|
case C.TYPE:
|
|
314
|
-
return
|
|
314
|
+
return S.TYPE;
|
|
315
315
|
case C.UPLOAD:
|
|
316
|
-
return L != null ?
|
|
316
|
+
return L != null ? S.IMAGE : S.UPLOAD;
|
|
317
317
|
default:
|
|
318
|
-
return
|
|
318
|
+
return S.DRAW;
|
|
319
319
|
}
|
|
320
320
|
})();
|
|
321
321
|
return {
|
|
@@ -331,16 +331,16 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
|
|
|
331
331
|
handleClear: f
|
|
332
332
|
};
|
|
333
333
|
}, wt = {
|
|
334
|
-
[C.DRAW]: (e) => (e == null ? void 0 : e.mimeType) ===
|
|
335
|
-
[C.TYPE]: (e) => (e == null ? void 0 : e.mimeType) ===
|
|
336
|
-
[C.UPLOAD]: (e) => (e == null ? void 0 : e.mimeType) !==
|
|
334
|
+
[C.DRAW]: (e) => (e == null ? void 0 : e.mimeType) === R.POINTS,
|
|
335
|
+
[C.TYPE]: (e) => (e == null ? void 0 : e.mimeType) === R.TEXT,
|
|
336
|
+
[C.UPLOAD]: (e) => (e == null ? void 0 : e.mimeType) !== R.POINTS && (e == null ? void 0 : e.mimeType) !== R.TEXT
|
|
337
337
|
};
|
|
338
338
|
function xt(e, t, a) {
|
|
339
339
|
return t && wt[e](a) ? t : void 0;
|
|
340
340
|
}
|
|
341
341
|
const Ut = (e) => {
|
|
342
342
|
const t = e.url ? Y(e.url) : void 0;
|
|
343
|
-
return t ? t.mimeType !==
|
|
343
|
+
return t ? t.mimeType !== R.POINTS && t.mimeType !== R.TEXT : !0;
|
|
344
344
|
}, ce = () => {
|
|
345
345
|
const { hoverProps: e, isHovered: t } = Ke({}), { focusProps: a, isFocused: n, isFocusVisible: o } = Qe({
|
|
346
346
|
within: !0
|
|
@@ -360,15 +360,15 @@ const Ut = (e) => {
|
|
|
360
360
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, l, s)
|
|
361
361
|
});
|
|
362
362
|
}, Bt = {
|
|
363
|
-
[C.DRAW]:
|
|
364
|
-
[C.TYPE]:
|
|
365
|
-
[C.UPLOAD]:
|
|
363
|
+
[C.DRAW]: S.DRAW,
|
|
364
|
+
[C.TYPE]: S.TYPE,
|
|
365
|
+
[C.UPLOAD]: S.UPLOAD
|
|
366
366
|
}, J = ({ children: e, className: t }) => {
|
|
367
367
|
const { id: a, value: n, onChange: o, target: s, readOnly: l } = x(), i = gt(a), { signatureMode: c, setSignatureMode: u, handleClear: d, clearable: f, signatureView: m, signatureValueForView: L, handleChange: g, handleBeforeChange: p } = Ft({
|
|
368
368
|
target: s,
|
|
369
369
|
value: n,
|
|
370
370
|
onChange: o
|
|
371
|
-
}), E = I(e, J.Header), h = I(e, J.Value),
|
|
371
|
+
}), E = I(e, J.Header), h = I(e, J.Value), A = {
|
|
372
372
|
signatureMode: i ?? c,
|
|
373
373
|
setSignatureMode: u,
|
|
374
374
|
handleClear: d,
|
|
@@ -381,7 +381,7 @@ const Ut = (e) => {
|
|
|
381
381
|
return /* @__PURE__ */ r.createElement("div", {
|
|
382
382
|
className: t,
|
|
383
383
|
"data-hook": "signature-container"
|
|
384
|
-
}, !l && N(E,
|
|
384
|
+
}, !l && N(E, A), N(h, A));
|
|
385
385
|
}, K = ({ children: e, className: t, ...a }) => {
|
|
386
386
|
const { signatureMode: n, setSignatureMode: o, clearable: s, handleClear: l } = a, { uploadEnabled: i } = x(), c = I(e, K.Tabs), u = I(e, K.Clear);
|
|
387
387
|
return /* @__PURE__ */ r.createElement("div", {
|
|
@@ -455,7 +455,7 @@ const Ut = (e) => {
|
|
|
455
455
|
"data-invalid": f,
|
|
456
456
|
"data-disabled": i,
|
|
457
457
|
"data-readonly": c
|
|
458
|
-
}, n ===
|
|
458
|
+
}, n === S.DRAW && N(m, {
|
|
459
459
|
value: o,
|
|
460
460
|
onChange: s,
|
|
461
461
|
onBeforeChange: l,
|
|
@@ -463,7 +463,7 @@ const Ut = (e) => {
|
|
|
463
463
|
readOnly: c,
|
|
464
464
|
onBlur: u,
|
|
465
465
|
onFocus: d
|
|
466
|
-
}), n ===
|
|
466
|
+
}), n === S.TYPE && N(L, {
|
|
467
467
|
value: o,
|
|
468
468
|
onChange: s,
|
|
469
469
|
onBeforeChange: l,
|
|
@@ -471,7 +471,7 @@ const Ut = (e) => {
|
|
|
471
471
|
readOnly: c,
|
|
472
472
|
onBlur: u,
|
|
473
473
|
onFocus: d
|
|
474
|
-
}), (n ===
|
|
474
|
+
}), (n === S.UPLOAD || n === S.IMAGE) && N(g, {
|
|
475
475
|
value: o,
|
|
476
476
|
onChange: s,
|
|
477
477
|
onBeforeChange: l,
|
|
@@ -481,7 +481,7 @@ const Ut = (e) => {
|
|
|
481
481
|
onFocus: d
|
|
482
482
|
}));
|
|
483
483
|
}, Yt = ({ className: e, emptyLabel: t, signedLabel: a, ...n }) => {
|
|
484
|
-
const { value: o, onChange: s, onBeforeChange: l, disabled: i, readOnly: c, onBlur: u, onFocus: d } = n, { id: f } = x(), { inputId: m, ariaDescribedBy: L } = W(), g = ce(), p = V(), E = V(), h = V(null),
|
|
484
|
+
const { value: o, onChange: s, onBeforeChange: l, disabled: i, readOnly: c, onBlur: u, onFocus: d } = n, { id: f } = x(), { inputId: m, ariaDescribedBy: L } = W(), g = ce(), p = V(), E = V(), h = V(null), A = o == null ? void 0 : o.url, [q, P] = X(!1);
|
|
485
485
|
Ie(() => {
|
|
486
486
|
var y;
|
|
487
487
|
(y = E.current) == null || y.focus({
|
|
@@ -517,8 +517,8 @@ const Ut = (e) => {
|
|
|
517
517
|
if (E.current = y, p.current = new _e(y, {
|
|
518
518
|
...v,
|
|
519
519
|
penColor: getComputedStyle(y).color || void 0
|
|
520
|
-
}), Ee(E.current, p.current),
|
|
521
|
-
const Z = ve(
|
|
520
|
+
}), Ee(E.current, p.current), A) {
|
|
521
|
+
const Z = ve(A);
|
|
522
522
|
Z && (p.current.fromData(Z), P(!0));
|
|
523
523
|
} else
|
|
524
524
|
p.current.clear(), P(!1);
|
|
@@ -529,7 +529,7 @@ const Ut = (e) => {
|
|
|
529
529
|
(B = h.current) == null || B.disconnect(), (D = p.current) == null || D.removeEventListener("endStroke", $), (O = p.current) == null || O.removeEventListener("beginStroke", k);
|
|
530
530
|
}, [
|
|
531
531
|
v,
|
|
532
|
-
|
|
532
|
+
A,
|
|
533
533
|
k,
|
|
534
534
|
$
|
|
535
535
|
]);
|
|
@@ -546,7 +546,7 @@ const Ut = (e) => {
|
|
|
546
546
|
id: m,
|
|
547
547
|
"data-hook": "signature-canvas",
|
|
548
548
|
"data-input-id": m,
|
|
549
|
-
"data-has-value": !!
|
|
549
|
+
"data-has-value": !!A,
|
|
550
550
|
onFocus: d,
|
|
551
551
|
onBlur: u,
|
|
552
552
|
role: "img",
|
|
@@ -554,7 +554,7 @@ const Ut = (e) => {
|
|
|
554
554
|
"aria-describedby": L
|
|
555
555
|
}));
|
|
556
556
|
}, de = ({ children: e, className: t, ...a }) => {
|
|
557
|
-
const { value: n, onChange: o, onBeforeChange: s, disabled: l, readOnly: i, onBlur: c, onFocus: u } = a, { id: d, required: f, hasError: m } = x(), { inputId: L, ariaDescribedBy: g, labelId: p } = W(), E = ce(), h = n != null && n.url ? Y(n.url) : void 0, { data:
|
|
557
|
+
const { value: n, onChange: o, onBeforeChange: s, disabled: l, readOnly: i, onBlur: c, onFocus: u } = a, { id: d, required: f, hasError: m } = x(), { inputId: L, ariaDescribedBy: g, labelId: p } = W(), E = ce(), h = n != null && n.url ? Y(n.url) : void 0, { data: A = "" } = h ?? {
|
|
558
558
|
data: ""
|
|
559
559
|
};
|
|
560
560
|
Ie(() => {
|
|
@@ -572,9 +572,9 @@ const Ut = (e) => {
|
|
|
572
572
|
L
|
|
573
573
|
]);
|
|
574
574
|
const q = _((v) => {
|
|
575
|
-
s == null || s(), v.trim() ? o(ie(
|
|
575
|
+
s == null || s(), v.trim() ? o(ie(Ae({
|
|
576
576
|
data: v,
|
|
577
|
-
mimeType:
|
|
577
|
+
mimeType: R.TEXT
|
|
578
578
|
}))) : o(null);
|
|
579
579
|
}, [
|
|
580
580
|
s,
|
|
@@ -582,7 +582,7 @@ const Ut = (e) => {
|
|
|
582
582
|
]), P = I(e, de.Value);
|
|
583
583
|
return /* @__PURE__ */ r.createElement(nt, {
|
|
584
584
|
"aria-labelledby": p,
|
|
585
|
-
value:
|
|
585
|
+
value: A,
|
|
586
586
|
onChange: q,
|
|
587
587
|
onBlur: c,
|
|
588
588
|
onFocus: u,
|
|
@@ -838,7 +838,7 @@ const Gt = () => {
|
|
|
838
838
|
base: T.uploadButton,
|
|
839
839
|
hover: T.uploadButtonHover
|
|
840
840
|
}
|
|
841
|
-
}), m = (B = (U = (w = (y = (te = (k = Te().signature) == null ? void 0 : k.elementProps) == null ? void 0 : te.dropZone) == null ? void 0 : y.elementProps) == null ? void 0 : w.uploadButton) == null ? void 0 : U.elementProps) == null ? void 0 : B.icon, { wix: L, className: g, ...p } = m ?? {}, E = We(ne.SIGNATURE, ne.SIGNATURE_DROP_ZONE, ne.SIGNATURE_UPLOAD_BUTTON, ne.UPLOAD_BUTTON_LABEL), h = V(null), [
|
|
841
|
+
}), m = (B = (U = (w = (y = (te = (k = Te().signature) == null ? void 0 : k.elementProps) == null ? void 0 : te.dropZone) == null ? void 0 : y.elementProps) == null ? void 0 : w.uploadButton) == null ? void 0 : U.elementProps) == null ? void 0 : B.icon, { wix: L, className: g, ...p } = m ?? {}, E = We(ne.SIGNATURE, ne.SIGNATURE_DROP_ZONE, ne.SIGNATURE_UPLOAD_BUTTON, ne.UPLOAD_BUTTON_LABEL), h = V(null), [A, q] = X(!1), [P, v] = X(!1), ee = _(() => {
|
|
842
842
|
var D;
|
|
843
843
|
q(!0), (D = h.current) == null || D.runAnimationForward();
|
|
844
844
|
}, []), $ = _(() => {
|
|
@@ -913,7 +913,7 @@ const Gt = () => {
|
|
|
913
913
|
className: F(Ze, Ge, g)
|
|
914
914
|
}) : null, /* @__PURE__ */ r.createElement(b.Input.Value.Upload.Button.Text, {
|
|
915
915
|
className: F(fe.base, T.uploadButtonLabel, E, {
|
|
916
|
-
[fe.hover]: n && (
|
|
916
|
+
[fe.hover]: n && (A || P)
|
|
917
917
|
})
|
|
918
918
|
}, e.uploadLabel))))), /* @__PURE__ */ r.createElement(b.Error, {
|
|
919
919
|
className: F(Ve, ae.error)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import t, { useRef as X, useCallback as y } from "react";
|
|
2
2
|
import $ from "@wix/editor-react-components/AnimatedIcon";
|
|
3
3
|
import p from "classnames";
|
|
4
|
-
import { bo as b, bi as j, ai as q, ah as z, af as G, ae as J, an as K, am as Q, ag as Y, b as Z, ad as tt, al as et } from "./form-
|
|
4
|
+
import { bo as b, bi as j, ai as q, ah as z, af as G, ae as J, an as K, am as Q, ag as Y, b as Z, ad as tt, al as et } from "./form-DnpFCulG.js";
|
|
5
5
|
import { ProgressBar as nt, Button as R } from "react-aria-components";
|
|
6
6
|
import { f as l } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { u as x } from "./use-element-state-class-name-
|
|
7
|
+
import { u as x } from "./use-element-state-class-name-nqBrsuxl.js";
|
|
8
8
|
function ot(e) {
|
|
9
9
|
const s = "calc(50% - 2px)";
|
|
10
10
|
return /* @__PURE__ */ t.createElement(nt, {
|
|
@@ -2,19 +2,19 @@ import { RicosViewer as w } from "@wix/ricos/viewer";
|
|
|
2
2
|
import F from "classnames";
|
|
3
3
|
import t, { useMemo as I, useState as z, useRef as q, useLayoutEffect as B, useCallback as N } from "react";
|
|
4
4
|
import { CheckboxGroup as J, TextField as K, Input as X, CheckboxField as Y, CheckboxButton as Z } from "react-aria-components";
|
|
5
|
-
import { bo as D, bl as M, by as S, bq as U,
|
|
5
|
+
import { bo as D, bl as M, by as S, bq as U, R as ee, a0 as te, aa as ae, H as ne, v as oe, ab as re } from "./form-DnpFCulG.js";
|
|
6
6
|
import { f as O, a as k } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { E as x, D as H } from "./field-error-headless-
|
|
8
|
-
import { L as W } from "./field-label-headless-
|
|
7
|
+
import { E as x, D as H } from "./field-error-headless-CgZAs65K.js";
|
|
8
|
+
import { L as W } from "./field-label-headless-CRYxe-vx.js";
|
|
9
9
|
import { F as se } from "./fieldset-headless-CD3fds9J.js";
|
|
10
10
|
import { E as le } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s as y } from "./field-rac.module-DP0lkkEv.js";
|
|
12
|
-
import { u as ie } from "./use-element-state-class-name-
|
|
13
|
-
import { u as ce } from "./use-text-input-class-name-
|
|
12
|
+
import { u as ie } from "./use-element-state-class-name-nqBrsuxl.js";
|
|
13
|
+
import { u as ce } from "./use-text-input-class-name-BwCLUlxr.js";
|
|
14
14
|
var ue = /* @__PURE__ */ (function(e) {
|
|
15
15
|
return e[e.FREE_FLOW = 0] = "FREE_FLOW", e[e.ONE = 1] = "ONE", e[e.TWO = 2] = "TWO", e[e.THREE = 3] = "THREE", e;
|
|
16
16
|
})({});
|
|
17
|
-
const
|
|
17
|
+
const v = "Other", de = (e, a) => {
|
|
18
18
|
const i = a.length + 2;
|
|
19
19
|
return (e.find((l) => l.startsWith(`${a}: `)) || "").slice(i);
|
|
20
20
|
}, me = (e) => e.map((a) => a.value ?? a.label), $ = ({ className: e, ...a }) => {
|
|
@@ -23,7 +23,7 @@ const R = "Other", de = (e, a) => {
|
|
|
23
23
|
className: e
|
|
24
24
|
}, r);
|
|
25
25
|
}, P = ({ className: e }) => {
|
|
26
|
-
const { value: a, onChange: r, addOtherLabel: i, addOtherPlaceholder: s, otherInputCharacterLimit: l, disabled: u, readOnly: m, hasError: d } = D(), { t: p } = S(), n = i || p("add-other.default-other-option-label") ||
|
|
26
|
+
const { value: a, onChange: r, addOtherLabel: i, addOtherPlaceholder: s, otherInputCharacterLimit: l, disabled: u, readOnly: m, hasError: d } = D(), { t: p } = S(), n = i || p("add-other.default-other-option-label") || v, b = I(() => de(a || [], n), [
|
|
27
27
|
a,
|
|
28
28
|
n
|
|
29
29
|
]), [c, L] = z(b), f = q(r);
|
|
@@ -91,7 +91,7 @@ const R = "Other", de = (e, a) => {
|
|
|
91
91
|
isInvalid: L
|
|
92
92
|
}, /* @__PURE__ */ t.createElement(Z, {
|
|
93
93
|
className: a,
|
|
94
|
-
"data-hook": `tags-${l ?
|
|
94
|
+
"data-hook": `tags-${l ? v : i}`
|
|
95
95
|
}, k(g, {
|
|
96
96
|
value: i,
|
|
97
97
|
label: s,
|
|
@@ -99,7 +99,7 @@ const R = "Other", de = (e, a) => {
|
|
|
99
99
|
isFirstOption: u
|
|
100
100
|
})));
|
|
101
101
|
}, V = ({ children: e, className: a }) => {
|
|
102
|
-
const { options: r, addOther: i, addOtherLabel: s, numberOfColumns: l = ue.FREE_FLOW } = D(), { t: u } = S(), m = s || u("add-other.default-other-option-label") ||
|
|
102
|
+
const { options: r, addOther: i, addOtherLabel: s, numberOfColumns: l = ue.FREE_FLOW } = D(), { t: u } = S(), m = s || u("add-other.default-other-option-label") || v, d = O(e, T), p = I(() => {
|
|
103
103
|
const n = r || [];
|
|
104
104
|
return i ? [
|
|
105
105
|
...n,
|
|
@@ -120,7 +120,7 @@ const R = "Other", de = (e, a) => {
|
|
|
120
120
|
}, p.map((n, b) => {
|
|
121
121
|
const c = n.value ?? n.label;
|
|
122
122
|
return k(d, {
|
|
123
|
-
key: n.isOther ?
|
|
123
|
+
key: n.isOther ? v : c,
|
|
124
124
|
value: c,
|
|
125
125
|
label: n.label,
|
|
126
126
|
isOther: n.isOther,
|
|
@@ -128,7 +128,7 @@ const R = "Other", de = (e, a) => {
|
|
|
128
128
|
});
|
|
129
129
|
}));
|
|
130
130
|
}, j = ({ children: e, className: a }) => {
|
|
131
|
-
const { addOther: r, addOtherLabel: i, hasError: s, readOnly: l, value: u } = D(), { t: m } = S(), d = i || m("add-other.default-other-option-label") ||
|
|
131
|
+
const { addOther: r, addOtherLabel: i, hasError: s, readOnly: l, value: u } = D(), { t: m } = S(), d = i || m("add-other.default-other-option-label") || v, p = O(e, V), n = O(e, P), b = I(() => !r || !u ? !1 : u.some((c) => c === d || c.startsWith(`${d}:`)), [
|
|
132
132
|
r,
|
|
133
133
|
u,
|
|
134
134
|
d
|
|
@@ -172,7 +172,7 @@ o.Options = V;
|
|
|
172
172
|
o.OtherInput = P;
|
|
173
173
|
o.Description = H;
|
|
174
174
|
o.Error = x;
|
|
175
|
-
const pe = "_control_tjqha_1", he = "_options_tjqha_7", Ee = "_option_tjqha_7", be = "_optionHover_tjqha_74", Oe = "_optionSelected_tjqha_74",
|
|
175
|
+
const pe = "_control_tjqha_1", he = "_options_tjqha_7", Ee = "_option_tjqha_7", be = "_optionHover_tjqha_74", Oe = "_optionSelected_tjqha_74", R = {
|
|
176
176
|
control: pe,
|
|
177
177
|
options: he,
|
|
178
178
|
option: Ee,
|
|
@@ -182,9 +182,9 @@ const pe = "_control_tjqha_1", he = "_options_tjqha_7", Ee = "_option_tjqha_7",
|
|
|
182
182
|
content: e,
|
|
183
183
|
locale: a
|
|
184
184
|
}), Ie = {
|
|
185
|
-
base:
|
|
186
|
-
selected:
|
|
187
|
-
hover:
|
|
185
|
+
base: R.option,
|
|
186
|
+
selected: R.optionSelected,
|
|
187
|
+
hover: R.optionHover
|
|
188
188
|
}, qe = () => {
|
|
189
189
|
const e = ie({
|
|
190
190
|
globalClasses: re,
|
|
@@ -195,9 +195,9 @@ const pe = "_control_tjqha_1", he = "_options_tjqha_7", Ee = "_option_tjqha_7",
|
|
|
195
195
|
}, /* @__PURE__ */ t.createElement(o.Label.Required, {
|
|
196
196
|
className: F(te, y.requiredMark)
|
|
197
197
|
})), /* @__PURE__ */ t.createElement(o.Control, {
|
|
198
|
-
className:
|
|
198
|
+
className: R.control
|
|
199
199
|
}, /* @__PURE__ */ t.createElement(o.Options, {
|
|
200
|
-
className: F(ae,
|
|
200
|
+
className: F(ae, R.options)
|
|
201
201
|
}, /* @__PURE__ */ t.createElement(o.Options.Option, {
|
|
202
202
|
className: e
|
|
203
203
|
}, /* @__PURE__ */ t.createElement(o.Options.Option.Label, null))), /* @__PURE__ */ t.createElement(o.OtherInput, {
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
2
2
|
import o from "classnames";
|
|
3
|
-
import r, { useCallback as
|
|
3
|
+
import r, { useCallback as S, useRef as T } from "react";
|
|
4
4
|
import { TextField as O, TextArea as y } from "react-aria-components";
|
|
5
|
-
import { bo as p, bl as d, bq as x,
|
|
5
|
+
import { bo as p, bl as d, bq as x, R as v, a0 as g, H as h, v as q } from "./form-DnpFCulG.js";
|
|
6
6
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as M, E as B } from "./field-error-headless-
|
|
8
|
-
import { L as k } from "./field-label-headless-
|
|
7
|
+
import { D as M, E as B } from "./field-error-headless-CgZAs65K.js";
|
|
8
|
+
import { L as k } from "./field-label-headless-CRYxe-vx.js";
|
|
9
9
|
import { E as P } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { s as c } from "./field-rac.module-DP0lkkEv.js";
|
|
11
|
-
import { u as V } from "./use-text-input-class-name-
|
|
11
|
+
import { u as V } from "./use-text-input-class-name-BwCLUlxr.js";
|
|
12
12
|
const e = ({ children: t }) => {
|
|
13
|
-
const { id: a, value: m, onChange: s, disabled: u, required: n, readOnly: l, onBlur: E, onFocus: b, FieldLayout: I, hasError: f } = p(), { labelId:
|
|
13
|
+
const { id: a, value: m, onChange: s, disabled: u, required: n, readOnly: l, onBlur: E, onFocus: b, FieldLayout: I, hasError: f } = p(), { labelId: R } = d(), F = S((A) => {
|
|
14
14
|
s(A);
|
|
15
15
|
}, [
|
|
16
16
|
s
|
|
17
|
-
]),
|
|
17
|
+
]), L = i(t, e.Label), D = i(t, e.Input), _ = i(t, e.Description), C = i(t, e.Error);
|
|
18
18
|
return /* @__PURE__ */ r.createElement(I, {
|
|
19
19
|
fieldId: a,
|
|
20
|
-
renderLabel: () =>
|
|
20
|
+
renderLabel: () => L,
|
|
21
21
|
renderInput: () => /* @__PURE__ */ r.createElement(O, {
|
|
22
|
-
"aria-labelledby":
|
|
22
|
+
"aria-labelledby": R,
|
|
23
23
|
value: m ?? "",
|
|
24
|
-
onChange:
|
|
24
|
+
onChange: F,
|
|
25
25
|
isDisabled: u,
|
|
26
26
|
isReadOnly: l,
|
|
27
27
|
isRequired: n,
|
|
@@ -52,7 +52,7 @@ e.Description = M;
|
|
|
52
52
|
e.Error = B;
|
|
53
53
|
const H = "_input_ug5v8_1", Q = {
|
|
54
54
|
input: H
|
|
55
|
-
}, U = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(
|
|
55
|
+
}, U = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(N, {
|
|
56
56
|
content: t,
|
|
57
57
|
locale: a
|
|
58
58
|
}), re = () => {
|
package/dist/component/{text-input-field-rac-C6VjmvWa.js → text-input-field-rac--VebbXxr.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RicosViewer as l } from "@wix/ricos/viewer";
|
|
2
2
|
import t from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { T as r } from "./text-input-headless-
|
|
4
|
+
import { T as r } from "./text-input-headless-CtdPYLHv.js";
|
|
5
5
|
import { E as o } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as a } from "./field-rac.module-DP0lkkEv.js";
|
|
7
|
-
import {
|
|
8
|
-
import { u as p } from "./use-text-input-class-name-
|
|
9
|
-
const
|
|
7
|
+
import { R as n, a0 as c, H as E, v as i } from "./form-DnpFCulG.js";
|
|
8
|
+
import { u as p } from "./use-text-input-class-name-BwCLUlxr.js";
|
|
9
|
+
const R = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
|
|
10
10
|
content: s,
|
|
11
11
|
locale: m
|
|
12
12
|
}), C = () => {
|
|
@@ -21,7 +21,7 @@ const I = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
|
|
|
21
21
|
className: t(E, a.error)
|
|
22
22
|
}, /* @__PURE__ */ e.createElement(o, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
23
23
|
className: t(i, a.description)
|
|
24
|
-
},
|
|
24
|
+
}, R));
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
27
27
|
C as T
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import t, { useRef as v } from "react";
|
|
2
2
|
import { TextField as C, Input as R } from "react-aria-components";
|
|
3
|
-
import { bo as c, bl as d, bq as T } from "./form-
|
|
3
|
+
import { bo as c, bl as d, bq as T } from "./form-DnpFCulG.js";
|
|
4
4
|
import { f as l } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as g, E as h } from "./field-error-headless-
|
|
6
|
-
import { L as q } from "./field-label-headless-
|
|
5
|
+
import { D as g, E as h } from "./field-error-headless-CgZAs65K.js";
|
|
6
|
+
import { L as q } from "./field-label-headless-CRYxe-vx.js";
|
|
7
7
|
const e = ({ children: r }) => {
|
|
8
8
|
const { id: s, value: a, onChange: i, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: b, autoComplete: f, FieldLayout: E } = c(), { labelId: I } = d(), F = l(r, e.Label), y = l(r, e.Input), D = l(r, e.Description), L = l(r, e.Error);
|
|
9
9
|
return /* @__PURE__ */ t.createElement(E, {
|
|
@@ -3,16 +3,16 @@ import { RicosViewer as x } from "@wix/ricos/viewer";
|
|
|
3
3
|
import m from "classnames";
|
|
4
4
|
import { parseTime as B } from "@internationalized/date";
|
|
5
5
|
import { TimeField as k, DateInput as U, DateSegment as _, TimeFieldStateContext as w } from "react-aria-components";
|
|
6
|
-
import { bo as p, bl as j, by as T, bq as Q,
|
|
7
|
-
import { f as u, a as
|
|
8
|
-
import { D as W, E as X } from "./field-error-headless-
|
|
9
|
-
import { L as Y } from "./field-label-headless-
|
|
6
|
+
import { bo as p, bl as j, by as T, bq as Q, R as z, a0 as G, H as J, v as K } from "./form-DnpFCulG.js";
|
|
7
|
+
import { f as u, a as F } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { D as W, E as X } from "./field-error-headless-CgZAs65K.js";
|
|
9
|
+
import { L as Y } from "./field-label-headless-CRYxe-vx.js";
|
|
10
10
|
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
-
import { H as
|
|
11
|
+
import { H as S } from "./custom-focus-class-_483Pkwp.js";
|
|
12
12
|
import { s as f } from "./field-rac.module-DP0lkkEv.js";
|
|
13
|
-
import { u as $ } from "./use-text-input-class-name-
|
|
13
|
+
import { u as $ } from "./use-text-input-class-name-BwCLUlxr.js";
|
|
14
14
|
const r = ({ children: t }) => {
|
|
15
|
-
const { id: n, value: s, onChange: a, disabled: i, readOnly: o, required: c, onBlur: l, onFocus: E, use24HourFormat: b, FieldLayout: C, hasError: g } = p(), { inputId: I, ariaDescribedBy:
|
|
15
|
+
const { id: n, value: s, onChange: a, disabled: i, readOnly: o, required: c, onBlur: l, onFocus: E, use24HourFormat: b, FieldLayout: C, hasError: g } = p(), { inputId: I, ariaDescribedBy: R, labelId: D } = j(), L = v((M) => {
|
|
16
16
|
const H = ae(M);
|
|
17
17
|
a(H);
|
|
18
18
|
}, [
|
|
@@ -22,11 +22,11 @@ const r = ({ children: t }) => {
|
|
|
22
22
|
fieldId: n,
|
|
23
23
|
renderLabel: () => N,
|
|
24
24
|
renderInput: () => /* @__PURE__ */ e.createElement(k, {
|
|
25
|
-
"aria-labelledby":
|
|
25
|
+
"aria-labelledby": D,
|
|
26
26
|
id: I,
|
|
27
|
-
"aria-describedby":
|
|
27
|
+
"aria-describedby": R,
|
|
28
28
|
value: O,
|
|
29
|
-
onChange:
|
|
29
|
+
onChange: L,
|
|
30
30
|
isDisabled: i,
|
|
31
31
|
isReadOnly: o,
|
|
32
32
|
isInvalid: g,
|
|
@@ -46,15 +46,15 @@ const r = ({ children: t }) => {
|
|
|
46
46
|
}, (l) => {
|
|
47
47
|
switch (l.type) {
|
|
48
48
|
case "hour":
|
|
49
|
-
return
|
|
49
|
+
return F(i, {
|
|
50
50
|
segment: l
|
|
51
51
|
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
52
52
|
case "minute":
|
|
53
|
-
return
|
|
53
|
+
return F(o, {
|
|
54
54
|
segment: l
|
|
55
55
|
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
56
56
|
case "dayPeriod":
|
|
57
|
-
return
|
|
57
|
+
return F(c, {
|
|
58
58
|
segment: l
|
|
59
59
|
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
60
60
|
case "literal":
|
|
@@ -145,11 +145,11 @@ const oe = "_time_5p151_1", le = "_hour_5p151_17", se = "_minute_5p151_18", ie =
|
|
|
145
145
|
})), /* @__PURE__ */ e.createElement(r.Time, {
|
|
146
146
|
className: t
|
|
147
147
|
}, /* @__PURE__ */ e.createElement(r.Time.Hour, {
|
|
148
|
-
className: m(h.hour,
|
|
148
|
+
className: m(h.hour, S)
|
|
149
149
|
}), /* @__PURE__ */ e.createElement(r.Time.Minute, {
|
|
150
|
-
className: m(h.minute,
|
|
150
|
+
className: m(h.minute, S)
|
|
151
151
|
}), /* @__PURE__ */ e.createElement(r.Time.Period, {
|
|
152
|
-
className: m(h.period,
|
|
152
|
+
className: m(h.period, S)
|
|
153
153
|
})), /* @__PURE__ */ e.createElement(r.Error, {
|
|
154
154
|
className: m(J, f.error)
|
|
155
155
|
}, /* @__PURE__ */ e.createElement(Z, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|