@wix/form-elements 1.151.0 → 1.153.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-D5wp75zN.js → appointment-rac-D2bigw_H.js} +4 -4
- package/dist/component/{bookings-address-rac-CWtYXwpn.js → bookings-address-rac-Cf05RpIZ.js} +1 -1
- package/dist/component/{bookings-email-rac-BUpRXmbz.js → bookings-email-rac-CT-Kud-p.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CnHSxXFN.js → bookings-first-name-rac-Bs5OyaHY.js} +1 -1
- package/dist/component/{bookings-header-rac-BcD45Kgs.js → bookings-header-rac-Ru9_r2xR.js} +1 -1
- package/dist/component/{bookings-last-name-rac-VaqfK3bu.js → bookings-last-name-rac-DXMPd2Ps.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-Dv2quJRw.js → bookings-login-bar-rac-DnrhCv8K.js} +1 -1
- package/dist/component/{bookings-phone-rac-DVOu-9yX.js → bookings-phone-rac-EGAH9Sj5.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-SfsoQKeI.js → bookings-rich-text-rac-wvJv1HLp.js} +1 -1
- package/dist/component/{checkbox-field-rac-BHGWuGcT.js → checkbox-field-rac-LA2ynBpW.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-KVBLbjKE.js → checkbox-group-field-headless-Be3rHuBy.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-C-WNRuVW.js → checkbox-group-field-rac-cKVBp2Od.js} +7 -7
- package/dist/component/{checkbox-group-rac-BMeqtM9H.js → checkbox-group-rac-DSdh3fge.js} +1 -1
- package/dist/component/{checkbox-rac-WDBiwyvs.js → checkbox-rac-DMSneG1p.js} +1 -1
- package/dist/component/{contacts-address-rac-CUjhR8Nq.js → contacts-address-rac-BqzNSCJr.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BurJLd1V.js → contacts-birthdate-rac-CNPCgWV_.js} +1 -1
- package/dist/component/{contacts-company-rac-y94712hj.js → contacts-company-rac-DNLgFugB.js} +1 -1
- package/dist/component/{contacts-email-rac-BYzv5pJt.js → contacts-email-rac-DzYtj6U7.js} +1 -1
- package/dist/component/{contacts-first-name-rac-AabYYZTr.js → contacts-first-name-rac-_w-NCWhj.js} +1 -1
- package/dist/component/{contacts-last-name-rac-B6GTnMea.js → contacts-last-name-rac-MO5nwQUf.js} +1 -1
- package/dist/component/{contacts-phone-rac-BhGEdh5D.js → contacts-phone-rac-vp0CnlDj.js} +1 -1
- package/dist/component/{contacts-position-rac-BmbLuomW.js → contacts-position-rac-CNcaPpV5.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-B7SELom1.js → contacts-subscribe-rac-ChNW2GDr.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BewGatKM.js → contacts-tax-id-rac-BpxH95CB.js} +1 -1
- package/dist/component/{date-availability-Cpw7i5-L.js → date-availability-ZWzqCMNY.js} +1 -1
- package/dist/component/{date-input-field-rac-JbWzxDzZ.js → date-input-field-rac-Dd9a7PaB.js} +6 -6
- package/dist/component/{date-input-rac-v4pNWyuY.js → date-input-rac-InYREYth.js} +1 -1
- package/dist/component/{date-picker-field-rac-0eLcya58.js → date-picker-field-rac-unQuEVfi.js} +6 -6
- package/dist/component/{date-picker-rac-BP4BRWn4.js → date-picker-rac-DlLt-suC.js} +1 -1
- package/dist/component/{date-time-input-field-rac-Cj0RSJF9.js → date-time-input-field-rac-DN6FmYST.js} +6 -6
- package/dist/component/{date-time-input-rac-DyD0SpMV.js → date-time-input-rac-BM90MGg0.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BE9fK7wx.js → dext-checkbox-group-rac-BUMKcxmc.js} +2 -2
- package/dist/component/{dext-checkbox-rac-CpB-AVP1.js → dext-checkbox-rac-DGanqYnB.js} +1 -1
- package/dist/component/{dext-date-picker-rac-DkiWY5CE.js → dext-date-picker-rac-Vm5LqGKJ.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-CyGIs4uD.js → dext-date-time-input-rac-DPXuw9dZ.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C0GiCpWI.js → dext-dropdown-rac-Cofyuyfi.js} +1 -1
- package/dist/component/{dext-email-rac-Clngd9Lm.js → dext-email-rac-_y8wS7KV.js} +1 -1
- package/dist/component/{dext-number-input-rac-Boshfkc5.js → dext-number-input-rac-ZytCGJrW.js} +1 -1
- package/dist/component/{dext-phone-rac-AX8R0fDx.js → dext-phone-rac-C55xMFUD.js} +1 -1
- package/dist/component/{dext-radio-group-rac-VSwdnWPU.js → dext-radio-group-rac-BBPDyfmw.js} +2 -2
- package/dist/component/{dext-rating-input-rac-aspmLO_w.js → dext-rating-input-rac-BhdcK-GH.js} +1 -1
- package/dist/component/{dext-tags-rac-D4r4j1KZ.js → dext-tags-rac-CI2Xc03w.js} +2 -2
- package/dist/component/{dext-text-area-rac-D8vG4QTK.js → dext-text-area-rac-RuSovGlp.js} +1 -1
- package/dist/component/{dext-text-input-rac-D19SJhDG.js → dext-text-input-rac-DQd00cll.js} +1 -1
- package/dist/component/{dext-url-input-rac-BUAWZX7n.js → dext-url-input-rac-Bn2-Qudo.js} +1 -1
- package/dist/component/{donation-rac-C4NdOTts.js → donation-rac-XB0arMGx.js} +5 -5
- package/dist/component/{dropdown-field-headless-CtppkNv5.js → dropdown-field-headless-D0QHnQvI.js} +5 -5
- package/dist/component/{dropdown-field-rac-B6KCsR-j.js → dropdown-field-rac-Bwe73KgJ.js} +5 -5
- package/dist/component/{dropdown-rac-CkFLrcRV.js → dropdown-rac-CChdbmVW.js} +1 -1
- package/dist/component/{ecom-address-rac-D6asF2b7.js → ecom-address-rac-U0zYzmAk.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CFzMl_9G.js → ecom-subscription-checkbox-rac-Cd4fKnVJ.js} +2 -2
- package/dist/component/{email-input-field-rac-gCsspvxb.js → email-input-field-rac-FRlbfWr0.js} +3 -3
- package/dist/component/{events-repeater-rac-DSrjafwK.js → events-repeater-rac-CBjqu0d6.js} +4 -4
- package/dist/component/{events-rsvp-rac-CMQtNDqE.js → events-rsvp-rac-Ciezamm0.js} +3 -3
- package/dist/component/{field-error-headless-Bt2dslWu.js → field-error-headless-Bkstr7c4.js} +1 -1
- package/dist/component/{field-label-headless-ZBAhq8nF.js → field-label-headless-BQdzL3qy.js} +1 -1
- package/dist/component/{file-upload-rac-MzPreLKz.js → file-upload-rac-BKE1ducj.js} +30 -30
- package/dist/component/{fixed-payment-rac-CPWIOJSH.js → fixed-payment-rac-B01pKLTi.js} +8 -8
- package/dist/component/{form-BrXx-2qp.js → form-BBasotzg.js} +291 -294
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-5dkUDBLN.js → header-field-rac-CrhHOqXZ.js} +2 -2
- package/dist/component/{header-rac-eXnz2eEI.js → header-rac-Dp3WTqgX.js} +1 -1
- package/dist/component/{image-choice-rac-BxmirCog.js → image-choice-rac-DJxTewda.js} +4 -4
- package/dist/component/{index-CCz5mdOt.js → index-BQvyEQWT.js} +4 -4
- package/dist/component/{index-Be6_W-02.js → index-n_nFGyIF.js} +2 -2
- package/dist/component/{isObjectLike-DhFZRIZ5.js → isObjectLike-BVuF_W7V.js} +1 -1
- package/dist/component/{multiline-address-field-rac-C3Rz-qFR.js → multiline-address-field-rac-D8d0OxHJ.js} +7 -7
- package/dist/component/{multiline-address-rac-BFvxiD8l.js → multiline-address-rac-BVfMe6L4.js} +1 -1
- package/dist/component/{number-input-field-rac-CAuoAgAm.js → number-input-field-rac-CxEmmXKN.js} +9 -9
- package/dist/component/{number-input-rac-ZCBaL_D4.js → number-input-rac-QYnTwzd-.js} +1 -1
- package/dist/component/{password-rac-oAAB5Yek.js → password-rac-C-qGzwyr.js} +6 -6
- package/dist/component/{payment-input-rac-BkVImcPM.js → payment-input-rac-DmrwVntr.js} +16 -16
- package/dist/component/{phone-input-field-rac-LReDQaEl.js → phone-input-field-rac-COIVTDiA.js} +202 -202
- package/dist/component/{phone-rac-B4Rv_q9_.js → phone-rac-DKQE4q0-.js} +1 -1
- package/dist/component/{product-list-rac-CVoJPZH6.js → product-list-rac-MP1iV-ki.js} +25 -25
- package/dist/component/{quiz-radio-group-rac-CHXOBaWQ.js → quiz-radio-group-rac-D5SWxzie.js} +1 -1
- package/dist/component/{radio-button-module-classes-G3CPOqV_.js → radio-button-module-classes-DHbL55H_.js} +3 -3
- package/dist/component/{radio-group-field-rac-Di8f67l0.js → radio-group-field-rac-BgtFPmlJ.js} +8 -8
- package/dist/component/{radio-group-rac-BP4EdSWA.js → radio-group-rac-Ct-3Dxt9.js} +1 -1
- package/dist/component/{rating-input-field-rac-D6nHfXat.js → rating-input-field-rac-D2UWtvZ5.js} +15 -15
- package/dist/component/{rating-input-rac-BpTVbrOY.js → rating-input-rac-D31uJ5fp.js} +1 -1
- package/dist/component/{rich-content-rac.module-DfNKRJQl.js → rich-content-rac.module-CaJq2hem.js} +1 -1
- package/dist/component/{rich-text-field-rac-BZx7O1ln.js → rich-text-field-rac-Cozr8cKE.js} +2 -2
- package/dist/component/{rich-text-rac-Bie0rehR.js → rich-text-rac-BPDbHGDS.js} +1 -1
- package/dist/component/{service-dropdown-rac-DZgYoLs3.js → service-dropdown-rac-BmRx6WJk.js} +11 -11
- package/dist/component/{services-multi-choice-rac-os7W4s1g.js → services-multi-choice-rac-BWd7EnKj.js} +8 -8
- package/dist/component/{signature-rac-BMRvU0qg.js → signature-rac-GWN393X6.js} +53 -53
- package/dist/component/{submit-button-rac-BkXQF3FL.js → submit-button-rac-DkcJAQz4.js} +2 -2
- package/dist/component/{tags-field-rac-5GL81x5S.js → tags-field-rac-Crj2KkXI.js} +17 -17
- package/dist/component/{tags-rac-BG4eu5vf.js → tags-rac-BqTLqg6-.js} +1 -1
- package/dist/component/{text-area-field-rac-CGtt6YXJ.js → text-area-field-rac-DDNzZb6-.js} +12 -12
- package/dist/component/{text-area-rac-D6aJxM-f.js → text-area-rac-_GZpfhob.js} +1 -1
- package/dist/component/{text-input-field-rac-BUuVi4gl.js → text-input-field-rac-C8Oy01fr.js} +5 -5
- package/dist/component/{text-input-headless-DG-jyTVD.js → text-input-headless-CeUccQB2.js} +3 -3
- package/dist/component/{text-input-rac-LVE42SOJ.js → text-input-rac-quKzZGuN.js} +1 -1
- package/dist/component/{time-input-rac-jZ9v7Azv.js → time-input-rac-Cs6v7FWy.js} +16 -16
- package/dist/component/{url-input-field-rac-DQ9JerAM.js → url-input-field-rac-XKB-01MY.js} +7 -7
- package/dist/component/{url-input-rac-4k06IpF-.js → url-input-rac-CLy5V0JB.js} +1 -1
- package/dist/component/{use-dropdown-trigger-class-name-CgNFe8Eg.js → use-dropdown-trigger-class-name-BnXNxOw5.js} +3 -3
- package/dist/component/{use-element-state-class-name-B4a4SKmP.js → use-element-state-class-name-DXp0miT9.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-DZVkGZvs.js → use-hoverable-input-class-name-D2Y08f_R.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-ClP9MSlU.js → use-is-forced-open-dropdown-BG5bt8En.js} +1 -1
- package/dist/component/{use-service-options-base-Ch2bF4mk.js → use-service-options-base--io114bM.js} +1 -1
- package/dist/component/use-text-input-class-name-DGOkD9xM.js +6 -0
- package/package.json +3 -3
- package/dist/component/use-text-input-class-name-BQshbjqt.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-BBasotzg.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-Bkstr7c4.js";
|
|
11
|
+
import { L as ut } from "./field-label-headless-BQdzL3qy.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-DXp0miT9.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-BBasotzg.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-DXp0miT9.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-BBasotzg.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-Bkstr7c4.js";
|
|
8
|
+
import { L as W } from "./field-label-headless-BQdzL3qy.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-DXp0miT9.js";
|
|
13
|
+
import { u as ce } from "./use-text-input-class-name-DGOkD9xM.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-BBasotzg.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-Bkstr7c4.js";
|
|
8
|
+
import { L as k } from "./field-label-headless-BQdzL3qy.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-DGOkD9xM.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-BUuVi4gl.js → text-input-field-rac-C8Oy01fr.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-CeUccQB2.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-BBasotzg.js";
|
|
8
|
+
import { u as p } from "./use-text-input-class-name-DGOkD9xM.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-BBasotzg.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-Bkstr7c4.js";
|
|
6
|
+
import { L as q } from "./field-label-headless-BQdzL3qy.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-BBasotzg.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-Bkstr7c4.js";
|
|
9
|
+
import { L as Y } from "./field-label-headless-BQdzL3qy.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-DGOkD9xM.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, {
|