@wix/form-elements 1.142.0 → 1.144.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-BAwonF75.js → appointment-rac-BxrHjvGM.js} +93 -93
- package/dist/component/{bookings-address-rac-xhj2n7jK.js → bookings-address-rac-CLWQa4ND.js} +1 -1
- package/dist/component/{bookings-email-rac-BGjeAwgm.js → bookings-email-rac-DZemUnFy.js} +1 -1
- package/dist/component/{bookings-first-name-rac-l392yYAU.js → bookings-first-name-rac-DyGMqRWi.js} +1 -1
- package/dist/component/{bookings-header-rac-JwIo7hsJ.js → bookings-header-rac-DmUeRhWl.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CJp81BPl.js → bookings-last-name-rac-DOuCYe0Q.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BiPklGE_.js → bookings-login-bar-rac-BnmS1sak.js} +1 -1
- package/dist/component/{bookings-phone-rac-mQfDJGkK.js → bookings-phone-rac-F5YJaXHy.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BOfHn2EU.js → bookings-rich-text-rac-DAuqLM8j.js} +1 -1
- package/dist/component/{checkbox-field-rac-CA6SeM0c.js → checkbox-field-rac-DsQrwgzd.js} +83 -83
- package/dist/component/{checkbox-group-field-headless-ChLT0zKA.js → checkbox-group-field-headless-oPw2miey.js} +61 -61
- package/dist/component/{checkbox-group-field-rac-_Fkre79S.js → checkbox-group-field-rac-hPscGPkW.js} +4 -4
- package/dist/component/{checkbox-group-rac-esBLJZ6Y.js → checkbox-group-rac-DuIn-RKl.js} +1 -1
- package/dist/component/{checkbox-rac-C3vXtbJh.js → checkbox-rac-C_-b9_8s.js} +1 -1
- package/dist/component/{contacts-address-rac-BuBBBt19.js → contacts-address-rac-CbIN1ubI.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BMBJeVOK.js → contacts-birthdate-rac-B-ek4Puf.js} +1 -1
- package/dist/component/{contacts-company-rac-CZl168-E.js → contacts-company-rac-D2xGgOC0.js} +1 -1
- package/dist/component/{contacts-email-rac-CJgVzCns.js → contacts-email-rac-CpbAyHUl.js} +1 -1
- package/dist/component/{contacts-first-name-rac-9ZNYKQeb.js → contacts-first-name-rac-DM0Uki6x.js} +1 -1
- package/dist/component/{contacts-last-name-rac-KgylQwHW.js → contacts-last-name-rac-DV9wrigX.js} +1 -1
- package/dist/component/{contacts-phone-rac-DYr30FLP.js → contacts-phone-rac-mIYYC0y2.js} +1 -1
- package/dist/component/{contacts-position-rac-B9BZZ3K9.js → contacts-position-rac-fYTx4IXC.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DOQb2GLm.js → contacts-subscribe-rac-nm5CFJHt.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-cYE1ehXN.js → contacts-tax-id-rac-D4RFJf-S.js} +1 -1
- package/dist/component/{date-availability-BOKvA8w-.js → date-availability-DKQ4Swlg.js} +1 -1
- package/dist/component/{date-input-field-rac-BwY53gNr.js → date-input-field-rac-DKZ-7UN1.js} +45 -45
- package/dist/component/{date-input-rac-Cgg4QJbB.js → date-input-rac-BbpWo9w0.js} +1 -1
- package/dist/component/{date-picker-field-rac-0Ue6uiCM.js → date-picker-field-rac-Bza70SYg.js} +11 -11
- package/dist/component/{date-picker-rac-CgICj33f.js → date-picker-rac-Ck7bd17y.js} +1 -1
- package/dist/component/{date-time-input-field-rac-ChRCMk7_.js → date-time-input-field-rac-DpAx183s.js} +21 -21
- package/dist/component/{date-time-input-rac-B8tRZrri.js → date-time-input-rac-CAL-qDqR.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-B_qjx1QD.js → dext-checkbox-group-rac-DLk1zE8Z.js} +4 -4
- package/dist/component/{dext-checkbox-rac-Bw9SyhHA.js → dext-checkbox-rac-K0JY8ypt.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Bzn28zNq.js → dext-date-picker-rac-BIkqhNQ0.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-7Cuk3PoA.js → dext-date-time-input-rac-heYLj9qT.js} +1 -1
- package/dist/component/{dext-dropdown-rac-Md1VI5pc.js → dext-dropdown-rac-CE-hsE0g.js} +1 -1
- package/dist/component/{dext-email-rac-DbHwHGKz.js → dext-email-rac-Djui3aGr.js} +1 -1
- package/dist/component/{dext-number-input-rac-DIVk3zXL.js → dext-number-input-rac-Up-zsZwY.js} +1 -1
- package/dist/component/{dext-phone-rac-ZIya63UJ.js → dext-phone-rac-BnBq1KKf.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DV1xHkOD.js → dext-radio-group-rac-D8EsvhLV.js} +4 -4
- package/dist/component/{dext-rating-input-rac-YRIYgeT4.js → dext-rating-input-rac-BW6NPU1S.js} +1 -1
- package/dist/component/{dext-tags-rac-DTJ6Pz_x.js → dext-tags-rac--c_tiq-o.js} +4 -4
- package/dist/component/{dext-text-area-rac-V-d9i95A.js → dext-text-area-rac-CKFhfgDq.js} +1 -1
- package/dist/component/{dext-text-input-rac-ccrundX-.js → dext-text-input-rac-CEcBfKSe.js} +1 -1
- package/dist/component/{dext-url-input-rac-Bd5SZ2U4.js → dext-url-input-rac-C4tT1NeS.js} +1 -1
- package/dist/component/{donation-rac-BFmpW-3b.js → donation-rac-Bqo7AUci.js} +52 -52
- package/dist/component/{dropdown-field-headless-C2qgeReH.js → dropdown-field-headless-DMQSalL1.js} +22 -22
- package/dist/component/{dropdown-field-rac-Bj1YSgpT.js → dropdown-field-rac-C31YjVhV.js} +4 -4
- package/dist/component/{dropdown-rac-DfdvX5I5.js → dropdown-rac-B6AZlzZ8.js} +1 -1
- package/dist/component/{ecom-address-rac-DOWNQhhX.js → ecom-address-rac-3pW-jse0.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-2ELdC1ql.js → ecom-subscription-checkbox-rac-Ms4JDivZ.js} +5 -5
- package/dist/component/{email-input-field-rac-CY0U6vEM.js → email-input-field-rac-UJOSd8si.js} +46 -46
- package/dist/component/{events-repeater-rac-C2oo_RZt.js → events-repeater-rac-fs9cQREp.js} +4 -4
- package/dist/component/{events-rsvp-rac-BrimIo0r.js → events-rsvp-rac-DRLspNfK.js} +3 -3
- package/dist/component/{field-error-headless-r0fX50xw.js → field-error-headless-CyoNrDMA.js} +9 -9
- package/dist/component/field-label-headless-vs578Vt6.js +52 -0
- package/dist/component/{file-upload-rac-Beb2BcFK.js → file-upload-rac-DDAMgm1b.js} +53 -53
- package/dist/component/{fixed-payment-rac-DGFWYMZG.js → fixed-payment-rac-DRs5yPZ8.js} +12 -12
- package/dist/component/{form-DtzwuBIo.js → form-D-pcluMZ.js} +373 -341
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +2 -2
- package/dist/component/{header-field-rac-CVmGSa0E.js → header-field-rac-BtLFBccj.js} +4 -4
- package/dist/component/{header-rac-C3AEJmYN.js → header-rac-CNx4qpAR.js} +1 -1
- package/dist/component/{image-choice-rac-Ch-mxLgP.js → image-choice-rac-D-PsWyfU.js} +10 -10
- package/dist/component/{index-CmqLlW8X.js → index-B7rRv0cm.js} +43 -43
- package/dist/component/{index-CTn6AQ3A.js → index-D4Jdw7jg.js} +2 -2
- package/dist/component/{isObjectLike-iyypwAQL.js → isObjectLike-DyNk-Hsj.js} +7 -7
- package/dist/component/{multiline-address-field-rac-DJXcb6NG.js → multiline-address-field-rac-CowUg4Dk.js} +94 -94
- package/dist/component/{multiline-address-rac-DcZgTx1c.js → multiline-address-rac-CHLN9iqR.js} +1 -1
- package/dist/component/{number-input-field-rac-W3TqQGhC.js → number-input-field-rac-Clow9sWB.js} +21 -21
- package/dist/component/{number-input-rac-CdXigsba.js → number-input-rac-CeUW4WGL.js} +1 -1
- package/dist/component/{password-rac-Dph6984u.js → password-rac-_FBw3XON.js} +7 -7
- package/dist/component/{payment-input-rac-D5ARk1lF.js → payment-input-rac-CmeiCGKm.js} +17 -17
- package/dist/component/{phone-input-field-rac-BUfe-B2i.js → phone-input-field-rac-PIpEcS6h.js} +24 -24
- package/dist/component/{phone-rac-DTiWT1uy.js → phone-rac-D-RF_Dc1.js} +1 -1
- package/dist/component/{product-list-rac-1_Q2JYwH.js → product-list-rac-CveI0FCQ.js} +31 -31
- package/dist/component/{quiz-radio-group-rac-iyBhi0wJ.js → quiz-radio-group-rac-DmL5sv4m.js} +1 -1
- package/dist/component/{radio-button-module-classes-DwfobXBe.js → radio-button-module-classes-D6eJdPov.js} +11 -11
- package/dist/component/{radio-group-field-rac-BkKNVwMi.js → radio-group-field-rac-CuTxslBP.js} +4 -4
- package/dist/component/{radio-group-rac-CH0nkJ8V.js → radio-group-rac-D1N9mKdI.js} +1 -1
- package/dist/component/{rating-input-field-rac-CUUUlgZi.js → rating-input-field-rac-tPHYwerw.js} +12 -12
- package/dist/component/{rating-input-rac-8yEiqBR5.js → rating-input-rac-BoYlGaYG.js} +1 -1
- package/dist/component/{rich-content-rac.module-DeKU0pwh.js → rich-content-rac.module-BEpM1wGw.js} +3 -3
- package/dist/component/{rich-text-field-rac-Cwd-RWTi.js → rich-text-field-rac-DIBDp9fN.js} +4 -4
- package/dist/component/{rich-text-rac-C5-jPNYP.js → rich-text-rac-QNvqlXOl.js} +1 -1
- package/dist/component/{service-dropdown-rac-DBGAnsut.js → service-dropdown-rac-BUka_sF2.js} +30 -30
- package/dist/component/{services-multi-choice-rac-CqEoGsuw.js → services-multi-choice-rac-Dsy5tWby.js} +5 -5
- package/dist/component/{signature-rac-Cq3y66Cr.js → signature-rac-K1d_jHlU.js} +37 -37
- package/dist/component/submit-button-rac-BRJtuej2.js +228 -0
- package/dist/component/{tags-field-rac-CpJ0O9f_.js → tags-field-rac-BaBbtHcw.js} +16 -16
- package/dist/component/{tags-rac-BPjw67Po.js → tags-rac-DDg6W18e.js} +1 -1
- package/dist/component/{text-area-field-rac-BG6MJuIW.js → text-area-field-rac-CB97Y6o1.js} +9 -9
- package/dist/component/{text-area-rac-BAS4F4VC.js → text-area-rac-E091fvmB.js} +1 -1
- package/dist/component/{text-input-field-rac-BhMktcEd.js → text-input-field-rac-BiSQ4pDp.js} +3 -3
- package/dist/component/{text-input-headless-Bpjd70nh.js → text-input-headless-BKxooAsH.js} +7 -7
- package/dist/component/{text-input-rac-Bj21XKGA.js → text-input-rac-N2D8bqU4.js} +1 -1
- package/dist/component/{time-input-rac-DBpRHdnX.js → time-input-rac-CMVYeoxi.js} +33 -33
- package/dist/component/{url-input-field-rac-B_EMXVWh.js → url-input-field-rac-BWpn4TfK.js} +24 -24
- package/dist/component/{url-input-rac-D0Ck-9KV.js → url-input-rac-U19lGKwd.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-CkpHwC6t.js → use-dropdown-option-class-name-DK1HCEOC.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-DmDwpAVn.js → use-dropdown-trigger-class-name-XS469pt3.js} +4 -4
- package/dist/component/{use-element-state-class-name-BrgdwHYP.js → use-element-state-class-name-BdjEjAk1.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-qVo45l-t.js → use-hoverable-input-class-name-7nSuBlNd.js} +6 -6
- package/dist/component/{use-service-options-base-Dlqs4p0Z.js → use-service-options-base-Bxw3_pyC.js} +1 -1
- package/dist/component/use-text-input-class-name-BB5fT5S6.js +6 -0
- package/dist/form.d.ts +36 -0
- package/package.json +2 -2
- package/dist/component/field-label-headless-D-kCfg8j.js +0 -52
- package/dist/component/submit-button-rac-CKM7yUL4.js +0 -172
- package/dist/component/use-text-input-class-name-CP2VJOso.js +0 -6
|
@@ -2,32 +2,32 @@ import { RicosViewer as S } from "@wix/ricos/viewer";
|
|
|
2
2
|
import i from "classnames";
|
|
3
3
|
import r, { useCallback as h, useRef as O } from "react";
|
|
4
4
|
import { TextField as y, Input as A } from "react-aria-components";
|
|
5
|
-
import {
|
|
5
|
+
import { bn as d, bk as E, bp as k, R as B, $ as T, G as g, u as v } from "./form-D-pcluMZ.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as M, E as P } from "./field-error-headless-
|
|
8
|
-
import { L as q } from "./field-label-headless-
|
|
7
|
+
import { D as M, E as P } from "./field-error-headless-CyoNrDMA.js";
|
|
8
|
+
import { L as q } from "./field-label-headless-vs578Vt6.js";
|
|
9
9
|
import { u as x } from "./use-invoke-callback-UH73A_J3.js";
|
|
10
10
|
import { E as U } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s as u } from "./field-rac.module-DfEb7pBp.js";
|
|
12
|
-
import { u as $ } from "./use-text-input-class-name-
|
|
12
|
+
import { u as $ } from "./use-text-input-class-name-BB5fT5S6.js";
|
|
13
13
|
const w = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
|
|
14
|
-
const { id:
|
|
15
|
-
|
|
14
|
+
const { id: n, value: o, onChange: s, disabled: m, readOnly: a, required: l, hasError: I, onBlur: b, onFocus: f, FieldLayout: R } = d(), { labelId: F } = E(), p = x(b), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), N = h(() => {
|
|
15
|
+
s(w(o)), p();
|
|
16
16
|
}, [
|
|
17
17
|
p,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
s,
|
|
19
|
+
o
|
|
20
20
|
]);
|
|
21
21
|
return /* @__PURE__ */ r.createElement(R, {
|
|
22
|
-
fieldId:
|
|
22
|
+
fieldId: n,
|
|
23
23
|
renderLabel: () => L,
|
|
24
24
|
renderInput: () => /* @__PURE__ */ r.createElement(y, {
|
|
25
25
|
"aria-labelledby": F,
|
|
26
|
-
value:
|
|
27
|
-
onChange:
|
|
26
|
+
value: o ?? "",
|
|
27
|
+
onChange: s,
|
|
28
28
|
isDisabled: m,
|
|
29
|
-
isReadOnly:
|
|
30
|
-
isRequired:
|
|
29
|
+
isReadOnly: a,
|
|
30
|
+
isRequired: l,
|
|
31
31
|
isInvalid: I,
|
|
32
32
|
onBlur: N,
|
|
33
33
|
onFocus: f
|
|
@@ -35,26 +35,26 @@ const w = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
|
|
|
35
35
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, C)
|
|
36
36
|
});
|
|
37
37
|
}, V = ({ className: t }) => {
|
|
38
|
-
const { id:
|
|
39
|
-
return
|
|
40
|
-
var
|
|
41
|
-
(
|
|
42
|
-
},
|
|
43
|
-
ref:
|
|
44
|
-
id:
|
|
38
|
+
const { id: n, placeholder: o } = d(), { inputId: s, ariaDescribedBy: m } = E(), a = O(null);
|
|
39
|
+
return k(() => {
|
|
40
|
+
var l;
|
|
41
|
+
(l = a.current) == null || l.focus();
|
|
42
|
+
}, n), /* @__PURE__ */ r.createElement(A, {
|
|
43
|
+
ref: a,
|
|
44
|
+
id: s,
|
|
45
45
|
type: "url",
|
|
46
46
|
"aria-describedby": m,
|
|
47
47
|
className: t,
|
|
48
|
-
placeholder:
|
|
48
|
+
placeholder: o
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
51
|
e.Label = q;
|
|
52
52
|
e.Input = V;
|
|
53
53
|
e.Description = M;
|
|
54
54
|
e.Error = P;
|
|
55
|
-
const W = ({ content: t, locale:
|
|
55
|
+
const W = ({ content: t, locale: n }) => /* @__PURE__ */ r.createElement(S, {
|
|
56
56
|
content: t,
|
|
57
|
-
locale:
|
|
57
|
+
locale: n
|
|
58
58
|
}), te = () => {
|
|
59
59
|
const t = $();
|
|
60
60
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
@@ -64,7 +64,7 @@ const W = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(S, {
|
|
|
64
64
|
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
65
65
|
className: t
|
|
66
66
|
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
67
|
-
className: i(
|
|
67
|
+
className: i(g, u.error)
|
|
68
68
|
}, /* @__PURE__ */ r.createElement(U, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
69
69
|
className: i(v, u.description)
|
|
70
70
|
}, W));
|
|
@@ -2,8 +2,8 @@ import d, { useContext as _, useRef as D, useState as m, Children as L, useLayou
|
|
|
2
2
|
import { CollectionRendererContext as g, DefaultCollectionRenderer as E, ListBox as N } from "react-aria-components";
|
|
3
3
|
import P from "classnames";
|
|
4
4
|
import { s as h } from "./field-rac.module-DfEb7pBp.js";
|
|
5
|
-
import { y as T } from "./form-
|
|
6
|
-
import { u as H } from "./use-element-state-class-name-
|
|
5
|
+
import { y as T } from "./form-D-pcluMZ.js";
|
|
6
|
+
import { u as H } from "./use-element-state-class-name-BdjEjAk1.js";
|
|
7
7
|
const R = 1 / 0, I = {
|
|
8
8
|
position: "absolute",
|
|
9
9
|
width: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useContext as
|
|
2
|
-
import {
|
|
3
|
-
import { u } from "./use-hoverable-input-class-name-
|
|
1
|
+
import { useContext as T, useMemo as a } from "react";
|
|
2
|
+
import { bh as p, at as O, bf as _, F as s, z as i } from "./form-D-pcluMZ.js";
|
|
3
|
+
import { u } from "./use-hoverable-input-class-name-7nSuBlNd.js";
|
|
4
4
|
const I = [
|
|
5
5
|
s.DROPDOWN,
|
|
6
6
|
s.DEXT_DROPDOWN,
|
|
@@ -28,7 +28,7 @@ const I = [
|
|
|
28
28
|
return ((n = (e = o.fieldSettings) == null ? void 0 : e.country) == null ? void 0 : n.show) !== !1;
|
|
29
29
|
}, c = (o, e) => d.includes(o.fieldType) ? !e && P(o) : N.includes(o.fieldType) ? S(o) : I.includes(o.fieldType), l = (o, e) => c(o, e) && !o.properties.disabled && !o.properties.readOnly, A = (o) => {
|
|
30
30
|
var E;
|
|
31
|
-
const e = ((E =
|
|
31
|
+
const e = ((E = p().dropdown) == null ? void 0 : E.open) === !0, n = T(O), { isMobile: t = !1 } = _(), r = a(() => n && !n.parentId ? n.fields.filter((D) => l(D, t)).map((D) => D.id) : [], [
|
|
32
32
|
n,
|
|
33
33
|
t
|
|
34
34
|
]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import i from "classnames";
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
2
|
+
import { bg as s, aP as v } from "./form-D-pcluMZ.js";
|
|
3
|
+
const S = ({ globalClasses: e, moduleClasses: r }) => {
|
|
4
4
|
var d;
|
|
5
5
|
const c = ((d = s(...v(e))) == null ? void 0 : d.split(/\s+/)) ?? [], o = [
|
|
6
6
|
e.selected,
|
|
@@ -19,5 +19,5 @@ const x = ({ globalClasses: e, moduleClasses: r }) => {
|
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
S as u
|
|
23
23
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bn as m } from "./form-D-pcluMZ.js";
|
|
2
2
|
import { s as e } from "./field-rac.module-DfEb7pBp.js";
|
|
3
|
-
import { u } from "./use-element-state-class-name-
|
|
3
|
+
import { u } from "./use-element-state-class-name-BdjEjAk1.js";
|
|
4
4
|
const b = (s, a) => {
|
|
5
|
-
const { disabled: t, readOnly: o } =
|
|
5
|
+
const { disabled: t, readOnly: o } = m(), r = u({
|
|
6
6
|
globalClasses: s,
|
|
7
7
|
moduleClasses: {
|
|
8
8
|
base: [
|
|
@@ -12,11 +12,11 @@ const b = (s, a) => {
|
|
|
12
12
|
hover: e.inputHover
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
|
-
return ({ isHovered: l, isFocused:
|
|
15
|
+
return ({ isHovered: l, isFocused: n, isFocusWithin: i }) => r({
|
|
16
16
|
isSelected: !1,
|
|
17
17
|
isHovered: l,
|
|
18
|
-
isFocused:
|
|
19
|
-
isFocusWithin:
|
|
18
|
+
isFocused: n,
|
|
19
|
+
isFocusWithin: i,
|
|
20
20
|
isInteractive: !t && !o
|
|
21
21
|
});
|
|
22
22
|
};
|
package/dist/component/{use-service-options-base-Dlqs4p0Z.js → use-service-options-base-Bxw3_pyC.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState as o, useCallback as y, useEffect as m, useMemo as D } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { bm as v } from "./form-D-pcluMZ.js";
|
|
3
3
|
const k = (I) => {
|
|
4
4
|
const { fieldType: L, isEditor: t = !1, postProcessOptions: i, customFetchLogic: a, onInitialDataLoaded: n } = I, [O, h] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(L), r = y((e) => {
|
|
5
5
|
let d = e.map((l) => ({
|
package/dist/form.d.ts
CHANGED
|
@@ -7001,6 +7001,14 @@ type ElementProps = ElementTree & {
|
|
|
7001
7001
|
icon?: IconEntry;
|
|
7002
7002
|
label?: LeafEntry;
|
|
7003
7003
|
}>;
|
|
7004
|
+
nextButton?: ElementEntry<{
|
|
7005
|
+
icon?: IconEntry;
|
|
7006
|
+
label?: LeafEntry;
|
|
7007
|
+
}>;
|
|
7008
|
+
previousButton?: ElementEntry<{
|
|
7009
|
+
icon?: IconEntry;
|
|
7010
|
+
label?: LeafEntry;
|
|
7011
|
+
}>;
|
|
7004
7012
|
fileUpload?: ElementEntry<{
|
|
7005
7013
|
uploadButton?: ElementEntry<{
|
|
7006
7014
|
icon?: IconEntry;
|
|
@@ -7059,6 +7067,34 @@ declare const defaultProps: {
|
|
|
7059
7067
|
};
|
|
7060
7068
|
};
|
|
7061
7069
|
};
|
|
7070
|
+
readonly nextButton: {
|
|
7071
|
+
readonly elementProps: {
|
|
7072
|
+
readonly icon: {
|
|
7073
|
+
readonly svg: {
|
|
7074
|
+
readonly uri: '11062b_d61f9ce4f6fb46a881e3f715059fe1ee.svg';
|
|
7075
|
+
readonly viewBox: '0 0 200 200';
|
|
7076
|
+
readonly contentBox: '0 0 200 200';
|
|
7077
|
+
readonly colors: {};
|
|
7078
|
+
readonly contentType: 'shape';
|
|
7079
|
+
readonly svgContent: '<svg data-bbox="20 51.5 160 97" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" data-type="shape"><g><path d="m131.5 51.5-8.1 8.1L158.1 95H20v11h138.1l-34.7 34.4 8.1 8.1L180 100l-48.5-48.5z" fill-rule="evenodd" clip-rule="evenodd"/></g></svg>';
|
|
7080
|
+
};
|
|
7081
|
+
};
|
|
7082
|
+
};
|
|
7083
|
+
};
|
|
7084
|
+
readonly previousButton: {
|
|
7085
|
+
readonly elementProps: {
|
|
7086
|
+
readonly icon: {
|
|
7087
|
+
readonly svg: {
|
|
7088
|
+
readonly uri: '';
|
|
7089
|
+
readonly viewBox: '0 0 200 200';
|
|
7090
|
+
readonly contentBox: '0 0 200 200';
|
|
7091
|
+
readonly colors: {};
|
|
7092
|
+
readonly contentType: 'shape';
|
|
7093
|
+
readonly svgContent: '<svg data-bbox="20 51.5 160 97" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" data-type="shape"><g><path d="m68.5 51.5 8.1 8.1L41.9 95H180v11H41.9l34.7 34.4-8.1 8.1L20 100l48.5-48.5z" fill-rule="evenodd" clip-rule="evenodd"/></g></svg>';
|
|
7094
|
+
};
|
|
7095
|
+
};
|
|
7096
|
+
};
|
|
7097
|
+
};
|
|
7062
7098
|
readonly fileUpload: {
|
|
7063
7099
|
readonly elementProps: {
|
|
7064
7100
|
readonly uploadButton: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/form-elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.144.0",
|
|
4
4
|
"description": "The Wix Forms rendering element for Builder apps, loaded at runtime as @wix/form-elements/Form",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -156,5 +156,5 @@
|
|
|
156
156
|
]
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
|
-
"falconPackageHash": "
|
|
159
|
+
"falconPackageHash": "635514f0112b4e60963527dd94e3b04655f74d1bff09e9ea2214391c"
|
|
160
160
|
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { bj as m, aA as d, aB as p, bg as B, bt as D } from "./form-DtzwuBIo.js";
|
|
2
|
-
import l from "react";
|
|
3
|
-
import { f as g } from "./find-child-C60k4CxG.js";
|
|
4
|
-
import { sdk as L } from "@wix/image-kit";
|
|
5
|
-
function N({ id: e, width: t, height: n }, a, r, o = "fill") {
|
|
6
|
-
return (o === "fit" ? L.getScaleToFitImageURL : L.getScaleToFillImageURL)(e, t, n, typeof a == "number" ? a : parseInt(a, 10), typeof r == "number" ? r : parseInt(r, 10));
|
|
7
|
-
}
|
|
8
|
-
var u = /* @__PURE__ */ (function(e) {
|
|
9
|
-
return e.TOP = "top", e.BOTTOM = "bottom", e;
|
|
10
|
-
})({});
|
|
11
|
-
const S = {
|
|
12
|
-
visibility: "hidden",
|
|
13
|
-
display: "block",
|
|
14
|
-
height: 0,
|
|
15
|
-
margin: 0,
|
|
16
|
-
padding: 0
|
|
17
|
-
}, U = "", i = ({ children: e, className: t, ...n }) => {
|
|
18
|
-
const { as: a = "label", requiredIndicatorHidden: r = !1, label: o } = n, { label: T, required: R = !1, hideLabel: F = !1, requiredIndicatorType: q = d.ASTERISK, requiredIndicatorPlacement: O = p.AFTER_FIELD_TITLE, media: A, mediaSettings: s } = m(), { labelId: y, inputId: P } = B(), _ = a, b = R && !r ? g(e, i.Required) : null, c = A ? g(e, i.Image) : null, E = (s == null ? void 0 : s.imagePosition) ?? u.TOP, h = q === d.ASTERISK && O === p.BEFORE_FIELD_TITLE, f = (o ?? T) || U, I = /* @__PURE__ */ l.createElement(_, {
|
|
19
|
-
id: y,
|
|
20
|
-
htmlFor: a === "label" ? P : void 0,
|
|
21
|
-
className: t,
|
|
22
|
-
style: F ? S : void 0
|
|
23
|
-
}, h ? /* @__PURE__ */ l.createElement(l.Fragment, null, b, f) : /* @__PURE__ */ l.createElement(l.Fragment, null, f, b));
|
|
24
|
-
return c ? /* @__PURE__ */ l.createElement("div", null, E === u.TOP ? c : null, I, E === u.BOTTOM ? c : null) : I;
|
|
25
|
-
}, v = ({ className: e }) => {
|
|
26
|
-
const { t } = D(), { requiredIndicatorType: n } = m();
|
|
27
|
-
return n === d.TEXT ? /* @__PURE__ */ l.createElement("span", {
|
|
28
|
-
className: e,
|
|
29
|
-
"aria-hidden": "true"
|
|
30
|
-
}, t("settings.required-indicator-text")) : /* @__PURE__ */ l.createElement("span", {
|
|
31
|
-
className: e,
|
|
32
|
-
"aria-hidden": "true"
|
|
33
|
-
}, "*");
|
|
34
|
-
}, x = ({ className: e }) => {
|
|
35
|
-
const { media: t, mediaSettings: n } = m();
|
|
36
|
-
if (!t)
|
|
37
|
-
return null;
|
|
38
|
-
const a = N(t, t.width, t.height);
|
|
39
|
-
return a ? /* @__PURE__ */ l.createElement("img", {
|
|
40
|
-
className: e,
|
|
41
|
-
src: a,
|
|
42
|
-
alt: t.altText || "",
|
|
43
|
-
"data-fit": n == null ? void 0 : n.imageFit,
|
|
44
|
-
"data-alignment": n == null ? void 0 : n.imageAlignment
|
|
45
|
-
}) : null;
|
|
46
|
-
};
|
|
47
|
-
i.Required = v;
|
|
48
|
-
i.Image = x;
|
|
49
|
-
export {
|
|
50
|
-
i as L,
|
|
51
|
-
N as g
|
|
52
|
-
};
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import t, { useRef as F, useCallback as P } from "react";
|
|
2
|
-
import q from "@wix/editor-react-components/AnimatedIcon";
|
|
3
|
-
import v from "classnames";
|
|
4
|
-
import { bj as B, bd as A, ai as R, b as k, ah as y, ad as M, ac as U, ag as D } from "./form-DtzwuBIo.js";
|
|
5
|
-
import { ProgressBar as W, Button as C } from "react-aria-components";
|
|
6
|
-
import { f as m } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { u as N } from "./use-element-state-class-name-BrgdwHYP.js";
|
|
8
|
-
function V(e) {
|
|
9
|
-
const s = "calc(50% - 2px)";
|
|
10
|
-
return /* @__PURE__ */ t.createElement(W, {
|
|
11
|
-
...e,
|
|
12
|
-
isIndeterminate: !0
|
|
13
|
-
}, ({ percentage: n, isIndeterminate: i }) => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("svg", {
|
|
14
|
-
fill: "none",
|
|
15
|
-
width: "100%",
|
|
16
|
-
height: "100%",
|
|
17
|
-
viewBox: "0 0 32 32"
|
|
18
|
-
}, /* @__PURE__ */ t.createElement("circle", {
|
|
19
|
-
cx: "50%",
|
|
20
|
-
cy: "50%",
|
|
21
|
-
r: s
|
|
22
|
-
}), /* @__PURE__ */ t.createElement("circle", {
|
|
23
|
-
cx: "50%",
|
|
24
|
-
cy: "50%",
|
|
25
|
-
r: s,
|
|
26
|
-
// Normalize the path length to 100 so we can easily set stroke-dasharray/-offset to a percentage.
|
|
27
|
-
pathLength: "100",
|
|
28
|
-
strokeDasharray: i || n == null ? "25 100" : "100 100",
|
|
29
|
-
strokeDashoffset: i || n == null ? 0 : 100 - n,
|
|
30
|
-
strokeLinecap: "round"
|
|
31
|
-
}, i && /* @__PURE__ */ t.createElement("animateTransform", {
|
|
32
|
-
attributeName: "transform",
|
|
33
|
-
type: "rotate",
|
|
34
|
-
// Rotate around the circle's own center (viewBox is 32x32), not the SVG origin.
|
|
35
|
-
values: "0 16 16;360 16 16",
|
|
36
|
-
dur: "0.75s",
|
|
37
|
-
repeatCount: "indefinite"
|
|
38
|
-
})))));
|
|
39
|
-
}
|
|
40
|
-
const u = ({ children: e }) => {
|
|
41
|
-
const { id: o, FieldLayout: s } = B(), n = m(e, u.SubmitButton);
|
|
42
|
-
return /* @__PURE__ */ t.createElement(s, {
|
|
43
|
-
fieldId: o,
|
|
44
|
-
renderLabel: () => null,
|
|
45
|
-
renderInput: () => /* @__PURE__ */ t.createElement(t.Fragment, null, n),
|
|
46
|
-
renderDescription: () => null
|
|
47
|
-
});
|
|
48
|
-
}, _ = ({ className: e, children: o }) => {
|
|
49
|
-
const s = m(o, L), n = m(o, I), i = m(o, l);
|
|
50
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
51
|
-
className: e
|
|
52
|
-
}, s, n, i);
|
|
53
|
-
}, L = ({ className: e }) => {
|
|
54
|
-
const { showPreviousButton: o, onPreviousClick: s, previousText: n } = B();
|
|
55
|
-
return o ? /* @__PURE__ */ t.createElement(C, {
|
|
56
|
-
className: e,
|
|
57
|
-
onPress: s
|
|
58
|
-
}, n) : null;
|
|
59
|
-
}, I = ({ className: e }) => {
|
|
60
|
-
const { showNextButton: o, onNextClick: s, nextText: n } = B();
|
|
61
|
-
return o ? /* @__PURE__ */ t.createElement(C, {
|
|
62
|
-
className: e,
|
|
63
|
-
onPress: s
|
|
64
|
-
}, n) : null;
|
|
65
|
-
}, l = ({ className: e, onHoverStart: o, onHoverEnd: s, children: n }) => {
|
|
66
|
-
const { showSubmitButton: i, onSubmitClick: f, submitText: p, isDisabled: x, isInProgress: b, isSubmitting: g } = B();
|
|
67
|
-
if (!i)
|
|
68
|
-
return null;
|
|
69
|
-
const E = m(n, l.Label), d = m(n, l.Icon), S = m(n, l.Loader), c = g || b;
|
|
70
|
-
return /* @__PURE__ */ t.createElement(C, {
|
|
71
|
-
className: e,
|
|
72
|
-
"aria-label": p,
|
|
73
|
-
onPress: c ? void 0 : f,
|
|
74
|
-
onHoverStart: o,
|
|
75
|
-
onHoverEnd: s,
|
|
76
|
-
isDisabled: x && !c,
|
|
77
|
-
"aria-disabled": c || void 0,
|
|
78
|
-
"data-in-progress": b
|
|
79
|
-
}, b && S ? S : /* @__PURE__ */ t.createElement(t.Fragment, null, E ?? /* @__PURE__ */ t.createElement(H, null), d));
|
|
80
|
-
}, H = ({ className: e }) => {
|
|
81
|
-
const { submitText: o } = B();
|
|
82
|
-
return /* @__PURE__ */ t.createElement("span", {
|
|
83
|
-
className: e
|
|
84
|
-
}, o);
|
|
85
|
-
}, j = ({ children: e }) => /* @__PURE__ */ t.createElement(t.Fragment, null, e), X = ({ className: e }) => /* @__PURE__ */ t.createElement("span", {
|
|
86
|
-
className: e
|
|
87
|
-
}, /* @__PURE__ */ t.createElement(V, null));
|
|
88
|
-
l.Label = H;
|
|
89
|
-
l.Icon = j;
|
|
90
|
-
l.Loader = X;
|
|
91
|
-
_.PreviousButton = L;
|
|
92
|
-
_.NextButton = I;
|
|
93
|
-
_.SubmitButton = l;
|
|
94
|
-
u.SubmitButton = _;
|
|
95
|
-
const $ = "_navigationContainer_1vqug_1", z = "_rowSpacing_1vqug_6", G = "_navigationButton_1vqug_10", J = "_nextButton_1vqug_29", K = "_previousButton_1vqug_55", Q = "_navigationButtonHover_1vqug_85", Y = "_button_1vqug_101", Z = "_buttonNoSteps_1vqug_149", tt = "_buttonWithSteps_1vqug_153", et = "_buttonHover_1vqug_157", nt = "_progress_1vqug_181", a = {
|
|
96
|
-
navigationContainer: $,
|
|
97
|
-
rowSpacing: z,
|
|
98
|
-
navigationButton: G,
|
|
99
|
-
nextButton: J,
|
|
100
|
-
previousButton: K,
|
|
101
|
-
navigationButtonHover: Q,
|
|
102
|
-
button: Y,
|
|
103
|
-
buttonNoSteps: Z,
|
|
104
|
-
buttonWithSteps: tt,
|
|
105
|
-
buttonHover: et,
|
|
106
|
-
progress: nt
|
|
107
|
-
}, ot = () => {
|
|
108
|
-
var T, h;
|
|
109
|
-
const { hasSteps: e, showPreviousButton: o, isDisabled: s, isInProgress: n, isSubmitting: i } = B(), p = !s && !(i || n), { wix: x, className: b, ...g } = ((h = (T = A().submitButton) == null ? void 0 : T.elementProps) == null ? void 0 : h.icon) ?? {}, E = N({
|
|
110
|
-
globalClasses: M,
|
|
111
|
-
moduleClasses: {
|
|
112
|
-
base: v(a.navigationButton, a.previousButton),
|
|
113
|
-
hover: a.navigationButtonHover
|
|
114
|
-
}
|
|
115
|
-
}), d = N({
|
|
116
|
-
globalClasses: U,
|
|
117
|
-
moduleClasses: {
|
|
118
|
-
base: v(a.navigationButton, a.nextButton),
|
|
119
|
-
hover: a.navigationButtonHover
|
|
120
|
-
}
|
|
121
|
-
}), S = N({
|
|
122
|
-
globalClasses: D,
|
|
123
|
-
moduleClasses: {
|
|
124
|
-
base: v(a.button, {
|
|
125
|
-
[a.buttonNoSteps]: !e,
|
|
126
|
-
[a.buttonWithSteps]: e
|
|
127
|
-
}),
|
|
128
|
-
hover: a.buttonHover
|
|
129
|
-
}
|
|
130
|
-
}), c = F(null), O = P(() => {
|
|
131
|
-
var r;
|
|
132
|
-
return (r = c.current) == null ? void 0 : r.runAnimationForward();
|
|
133
|
-
}, []), w = P(() => {
|
|
134
|
-
var r;
|
|
135
|
-
return (r = c.current) == null ? void 0 : r.runAnimationBackward();
|
|
136
|
-
}, []);
|
|
137
|
-
return /* @__PURE__ */ t.createElement(u, null, /* @__PURE__ */ t.createElement(u.SubmitButton, {
|
|
138
|
-
className: v({
|
|
139
|
-
[a.navigationContainer]: e,
|
|
140
|
-
[a.rowSpacing]: o
|
|
141
|
-
})
|
|
142
|
-
}, /* @__PURE__ */ t.createElement(u.SubmitButton.PreviousButton, {
|
|
143
|
-
className: ({ isHovered: r }) => E({
|
|
144
|
-
isSelected: !1,
|
|
145
|
-
isHovered: r
|
|
146
|
-
})
|
|
147
|
-
}), /* @__PURE__ */ t.createElement(u.SubmitButton.NextButton, {
|
|
148
|
-
className: ({ isHovered: r }) => d({
|
|
149
|
-
isSelected: !1,
|
|
150
|
-
isHovered: r
|
|
151
|
-
})
|
|
152
|
-
}), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton, {
|
|
153
|
-
className: ({ isHovered: r }) => S({
|
|
154
|
-
isSelected: !1,
|
|
155
|
-
isHovered: r,
|
|
156
|
-
isInteractive: p
|
|
157
|
-
}),
|
|
158
|
-
onHoverStart: O,
|
|
159
|
-
onHoverEnd: w
|
|
160
|
-
}, /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton.Label, {
|
|
161
|
-
className: R
|
|
162
|
-
}), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton.Icon, null, g.svg ? /* @__PURE__ */ t.createElement(q, {
|
|
163
|
-
...g,
|
|
164
|
-
ref: c,
|
|
165
|
-
className: v(k, y, b)
|
|
166
|
-
}) : null), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton.Loader, {
|
|
167
|
-
className: a.progress
|
|
168
|
-
}))));
|
|
169
|
-
}, mt = () => /* @__PURE__ */ t.createElement(ot, null);
|
|
170
|
-
export {
|
|
171
|
-
mt as SubmitButtonRAC
|
|
172
|
-
};
|