@wix/form-elements 1.121.0 → 1.123.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-BmwzUTfZ.js → appointment-rac-CDI1Uxdc.js} +4 -4
- package/dist/component/{bookings-address-rac-CDpBaBGi.js → bookings-address-rac-nVBEkg-l.js} +1 -1
- package/dist/component/{bookings-email-rac-8AonBAEP.js → bookings-email-rac-NusPqaqf.js} +1 -1
- package/dist/component/{bookings-first-name-rac-BAF3OLyL.js → bookings-first-name-rac-CYmrpEzR.js} +1 -1
- package/dist/component/{bookings-header-rac-DIXxOHe1.js → bookings-header-rac-TyM4Aoem.js} +1 -1
- package/dist/component/{bookings-last-name-rac-Cm-58BWq.js → bookings-last-name-rac-D70Nn82q.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DvaiFVqg.js → bookings-login-bar-rac-BW-5tCEV.js} +1 -1
- package/dist/component/{bookings-phone-rac-znrjfRwm.js → bookings-phone-rac-CgMUDGs7.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DFPeWcrH.js → bookings-rich-text-rac-CWXyJPhn.js} +1 -1
- package/dist/component/{checkbox-field-rac-COvxqyF7.js → checkbox-field-rac-CsHe-LVL.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-DT1HX61N.js → checkbox-group-field-headless-B-mHaxSW.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-Db1w6Vzm.js → checkbox-group-field-rac-BqZu8wit.js} +4 -4
- package/dist/component/{checkbox-group-rac-BCgFQJ4P.js → checkbox-group-rac-Blm4fyuE.js} +1 -1
- package/dist/component/{checkbox-rac-C1dKq2AT.js → checkbox-rac-tbwv1SXx.js} +1 -1
- package/dist/component/{contacts-address-rac-BoZ2LExb.js → contacts-address-rac-RHSnDiBQ.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-CX-oJkwP.js → contacts-birthdate-rac-DKrGrNiq.js} +1 -1
- package/dist/component/{contacts-company-rac-ByY9oaOX.js → contacts-company-rac-DvOfTEo2.js} +1 -1
- package/dist/component/{contacts-email-rac-DBnTEm82.js → contacts-email-rac-a8JC9eRP.js} +1 -1
- package/dist/component/{contacts-first-name-rac-Jn-ubMoS.js → contacts-first-name-rac-_AfphZiB.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Wea7_JU-.js → contacts-last-name-rac-BCmo1Jgg.js} +1 -1
- package/dist/component/{contacts-phone-rac-POYGTwBr.js → contacts-phone-rac-BXz4vG8P.js} +1 -1
- package/dist/component/{contacts-position-rac-DjDHNTfL.js → contacts-position-rac-DRaQJZaG.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-C7vOLrLV.js → contacts-subscribe-rac-7U0svfJD.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-C-CVis0b.js → contacts-tax-id-rac-CJqjUhmU.js} +1 -1
- package/dist/component/{date-availability-B3unFx4z.js → date-availability-CpS7yhir.js} +1 -1
- package/dist/component/date-input-field-rac-Dg2688SW.js +290 -0
- package/dist/component/{date-input-rac-BW_WuabB.js → date-input-rac-DzAp7gfu.js} +1 -1
- package/dist/component/{date-picker-field-rac-DgBfvDRc.js → date-picker-field-rac-FmAi7HRw.js} +117 -114
- package/dist/component/{date-picker-rac-B2v-E9tZ.js → date-picker-rac-BaI3r-CN.js} +1 -1
- package/dist/component/{date-time-input-field-rac-DNxauQLv.js → date-time-input-field-rac-DeeDxW2B.js} +111 -111
- package/dist/component/{date-time-input-rac-DZMQuMlD.js → date-time-input-rac-DZ7QstRD.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-B0u3i1v1.js → dext-checkbox-group-rac-BnAYHF94.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BngAFLbm.js → dext-checkbox-rac-BeZMCOBD.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CyPtZQQp.js → dext-date-picker-rac-BXUNloHW.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DBm_ZVMr.js → dext-date-time-input-rac-BKEQsTle.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DBDOigJS.js → dext-dropdown-rac-BSXZriDs.js} +1 -1
- package/dist/component/{dext-email-rac-Cj-eerfr.js → dext-email-rac-BGEEhLlh.js} +1 -1
- package/dist/component/{dext-number-input-rac-WdUIM6bV.js → dext-number-input-rac-D1S-fmne.js} +1 -1
- package/dist/component/{dext-phone-rac-CH-UDDKr.js → dext-phone-rac-DkPzLZJS.js} +1 -1
- package/dist/component/{dext-radio-group-rac-umexCSNY.js → dext-radio-group-rac-dje-ikGm.js} +2 -2
- package/dist/component/{dext-rating-input-rac-ukMPDLxU.js → dext-rating-input-rac-TMQudQVi.js} +1 -1
- package/dist/component/{dext-tags-rac-BE8aqyRm.js → dext-tags-rac-DxAn9OIc.js} +2 -2
- package/dist/component/{dext-text-area-rac-GtNDPetb.js → dext-text-area-rac-CqSmgEkA.js} +1 -1
- package/dist/component/{dext-text-input-rac-DQhaKaoe.js → dext-text-input-rac-Dufa7pEk.js} +1 -1
- package/dist/component/{dext-url-input-rac-DogsntOO.js → dext-url-input-rac-B-bq2rjx.js} +1 -1
- package/dist/component/{donation-rac-C1Se3wmU.js → donation-rac-RthojtHs.js} +5 -5
- package/dist/component/{dropdown-field-headless-5vi45azS.js → dropdown-field-headless-BjYVzoSD.js} +5 -5
- package/dist/component/{dropdown-field-rac-B0PeCuG6.js → dropdown-field-rac-BaVviXFZ.js} +18 -17
- package/dist/component/{dropdown-rac--ZgcFbpH.js → dropdown-rac-BG3WbzTb.js} +1 -1
- package/dist/component/{ecom-address-rac-C1p-fN1j.js → ecom-address-rac-DfmNtkCV.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-uplYmDWZ.js → ecom-subscription-checkbox-rac-CD8Dr0ne.js} +2 -2
- package/dist/component/{email-input-field-rac-C6nqydVv.js → email-input-field-rac-Cdu5shB9.js} +3 -3
- package/dist/component/{events-repeater-rac-CqKFo75H.js → events-repeater-rac-DAYVyB5v.js} +4 -4
- package/dist/component/{events-rsvp-rac-BBQwW-Jk.js → events-rsvp-rac-CahpGVaB.js} +3 -3
- package/dist/component/{field-error-headless-COObBNJG.js → field-error-headless-CiAAbUUq.js} +1 -1
- package/dist/component/{field-label-headless-DhXceghb.js → field-label-headless-__gDv8-J.js} +1 -1
- package/dist/component/{file-upload-rac-B5CnpgIo.js → file-upload-rac-D6CQpR7g.js} +4 -4
- package/dist/component/{fixed-payment-rac-B8yKRpQV.js → fixed-payment-rac-DG3yDYoQ.js} +3 -3
- package/dist/component/{form-CimhBiBc.js → form-DShmmziF.js} +691 -671
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BHgFF-LG.js → header-field-rac-hajh0rs_.js} +2 -2
- package/dist/component/{header-rac-DJttTbow.js → header-rac-BQ1xsvMj.js} +1 -1
- package/dist/component/{image-choice-rac-C-qj1WBS.js → image-choice-rac-CsfFQpHZ.js} +4 -4
- package/dist/component/{index-9nfSsqJo.js → index-BVG02INQ.js} +4 -4
- package/dist/component/{index-Qe91Dgi2.js → index-Cg67JISR.js} +2 -2
- package/dist/component/{isObjectLike-VICRth8V.js → isObjectLike-GeiErIiA.js} +1 -1
- package/dist/component/{multiline-address-field-rac-DMg6V-0L.js → multiline-address-field-rac-ClphN9RJ.js} +369 -369
- package/dist/component/{multiline-address-rac-DpvB5bX9.js → multiline-address-rac-DuOAo8Sh.js} +1 -1
- package/dist/component/{number-input-field-rac-DQERdWaA.js → number-input-field-rac-DFZLQFdZ.js} +4 -4
- package/dist/component/{number-input-rac-DY9uyE-k.js → number-input-rac-BVQNQLNa.js} +1 -1
- package/dist/component/{password-rac-cSWH1LPy.js → password-rac-rIV1Uzdk.js} +4 -4
- package/dist/component/{payment-input-rac-BiUNnsQx.js → payment-input-rac-wi5HH2BY.js} +4 -4
- package/dist/component/phone-input-field-rac-DDiS4Bgs.js +507 -0
- package/dist/component/{phone-rac-CFeNcp2U.js → phone-rac-B-uILQ30.js} +1 -1
- package/dist/component/{product-list-rac-DzhnEmL_.js → product-list-rac-DCb9VDEs.js} +4 -4
- package/dist/component/{quiz-radio-group-rac-BpsPgebu.js → quiz-radio-group-rac-kUUCW0-a.js} +1 -1
- package/dist/component/{radio-button-module-classes-NBKHsJH7.js → radio-button-module-classes-BXUuhtnh.js} +3 -3
- package/dist/component/{radio-group-field-rac-C2oTt1mT.js → radio-group-field-rac-UWL7EPPy.js} +4 -4
- package/dist/component/{radio-group-rac-oINHZ5yY.js → radio-group-rac-BFasnyaK.js} +1 -1
- package/dist/component/{rating-input-field-rac-fnv2RdUA.js → rating-input-field-rac-B4UUIk8Y.js} +4 -4
- package/dist/component/{rating-input-rac-BFofFzSX.js → rating-input-rac-wFswd01m.js} +1 -1
- package/dist/component/{rich-content-rac.module-BplXvCt6.js → rich-content-rac.module-BiksdLX3.js} +1 -1
- package/dist/component/{rich-text-field-rac-Csi4_gCV.js → rich-text-field-rac-Bfgj9VSa.js} +2 -2
- package/dist/component/{rich-text-rac-Btu1y3LR.js → rich-text-rac-DZLzNoGE.js} +1 -1
- package/dist/component/service-dropdown-rac-NouncKkn.js +146 -0
- package/dist/component/{services-multi-choice-rac-B2rAg7VN.js → services-multi-choice-rac-CokpcneC.js} +5 -5
- package/dist/component/{signature-rac-tznFgZ4j.js → signature-rac-BfnTVTGo.js} +3 -3
- package/dist/component/submit-button-rac-DzL9deH3.js +172 -0
- package/dist/component/{tags-field-rac-DFm9o85s.js → tags-field-rac-_nQTfOdL.js} +5 -5
- package/dist/component/{tags-rac-CJFccYp5.js → tags-rac-DBSE9BHd.js} +1 -1
- package/dist/component/{text-area-field-rac-C4UEZOjz.js → text-area-field-rac-qlOrVhaN.js} +4 -4
- package/dist/component/{text-area-rac-Dhsq1l8f.js → text-area-rac-WJklNHfd.js} +1 -1
- package/dist/component/{text-input-field-rac-DiW0Sqj_.js → text-input-field-rac-DdeVJ8WD.js} +3 -3
- package/dist/component/{text-input-headless-u1_aFnZ1.js → text-input-headless-BJk7hB4Y.js} +3 -3
- package/dist/component/{text-input-rac-COy-c4N_.js → text-input-rac-DfK9CdZa.js} +1 -1
- package/dist/component/{time-input-rac-DipZQTZN.js → time-input-rac-DmeLSDWa.js} +4 -4
- package/dist/component/{url-input-field-rac-DhBCGvKd.js → url-input-field-rac-CxBzFUZ6.js} +4 -4
- package/dist/component/{url-input-rac-kw4gCDbc.js → url-input-rac-Cn8ZUtiC.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-Bes6rpX4.js → use-dropdown-option-class-name-BbVXUebo.js} +2 -2
- package/dist/component/use-dropdown-trigger-class-name-CZrmTGE3.js +43 -0
- package/dist/component/{use-element-state-class-name-_GWfwpEf.js → use-element-state-class-name-B21H07XJ.js} +1 -1
- package/dist/component/use-hoverable-input-class-name-D_sATUQv.js +23 -0
- package/dist/component/{use-service-options-base-4yrjmSWU.js → use-service-options-base-DD6-_eVN.js} +1 -1
- package/dist/component/use-text-input-class-name-DNA3i28w.js +6 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-BW0c1-Kl.js +0 -290
- package/dist/component/phone-input-field-rac-CtPGbnw_.js +0 -504
- package/dist/component/service-dropdown-rac-CzZW7Bp1.js +0 -145
- package/dist/component/submit-button-rac-DnHWbtTC.js +0 -141
- package/dist/component/use-is-forced-open-dropdown-RE1Ml2A3.js +0 -41
- package/dist/component/use-text-input-class-name-uMLXv54u.js +0 -23
package/dist/component/{rating-input-field-rac-fnv2RdUA.js → rating-input-field-rac-B4UUIk8Y.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { RicosViewer as y } from "@wix/ricos/viewer";
|
|
2
2
|
import m from "classnames";
|
|
3
3
|
import e, { useCallback as N, useState as O, useRef as A } from "react";
|
|
4
|
-
import { b9 as I, b6 as v, bj as T, I as H, U as M, S as w, v as B, p as P, T as q } from "./form-
|
|
4
|
+
import { b9 as I, b6 as v, bj as T, I as H, U as M, S as w, v as B, p as P, T as q } from "./form-DShmmziF.js";
|
|
5
5
|
import { RadioGroup as G, RadioField as k, RadioButton as x } from "react-aria-components";
|
|
6
6
|
import { f as u, a as U } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as j, E as z } from "./field-error-headless-
|
|
8
|
-
import { L as Q } from "./field-label-headless-
|
|
7
|
+
import { D as j, E as z } from "./field-error-headless-CiAAbUUq.js";
|
|
8
|
+
import { L as Q } from "./field-label-headless-__gDv8-J.js";
|
|
9
9
|
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { s as g } from "./field-rac.module-B4l_0KRU.js";
|
|
11
|
-
import { u as J } from "./use-element-state-class-name-
|
|
11
|
+
import { u as J } from "./use-element-state-class-name-B21H07XJ.js";
|
|
12
12
|
const t = ({ children: a }) => {
|
|
13
13
|
const { id: n, value: r, onChange: o, disabled: l, readOnly: d, required: c, hasError: i, onBlur: E, onFocus: C, FieldLayout: R } = I(), { labelId: _ } = v(), L = N((D) => o(Number(D)), [
|
|
14
14
|
o
|
package/dist/component/{rich-content-rac.module-BplXvCt6.js → rich-content-rac.module-BiksdLX3.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import c, { useState as u } from "react";
|
|
2
|
-
import { b9 as a, b1 as i, bj as T } from "./form-
|
|
2
|
+
import { b9 as a, b1 as i, bj as T } from "./form-DShmmziF.js";
|
|
3
3
|
import { Button as d } from "react-aria-components";
|
|
4
4
|
import { D as r } from "./data-hooks-Dkw1pbRj.js";
|
|
5
5
|
import { truncateRichContent as _ } from "@wix/ricos/content";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import l from "classnames";
|
|
2
2
|
import e from "react";
|
|
3
|
-
import { b9 as m, an as i, a5 as u, aM as R, aP as T } from "./form-
|
|
4
|
-
import { u as C, R as d, s as g, T as p } from "./rich-content-rac.module-
|
|
3
|
+
import { b9 as m, an as i, a5 as u, aM as R, aP as T } from "./form-DShmmziF.js";
|
|
4
|
+
import { u as C, R as d, s as g, T as p } from "./rich-content-rac.module-BiksdLX3.js";
|
|
5
5
|
const h = {
|
|
6
6
|
colorPalette: T(),
|
|
7
7
|
customStyles: R()
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import t, { useRef as T, useMemo as _, useCallback as C, useEffect as b } from "react";
|
|
2
|
+
import { RicosViewer as w } from "@wix/ricos/viewer";
|
|
3
|
+
import E from "classnames";
|
|
4
|
+
import { b5 as P, bj as A, F as M, b9 as y, b1 as U, ac as V, I as x, U as H, K as k, v as q, p as B } from "./form-DShmmziF.js";
|
|
5
|
+
import { u as W } from "./use-service-options-base-DD6-_eVN.js";
|
|
6
|
+
import { D as u } from "./dropdown-field-headless-BjYVzoSD.js";
|
|
7
|
+
import { C as j } from "./chevron-down-icon-CcpVm6B-.js";
|
|
8
|
+
import { E as K } from "./error-icon-hZxQ6DEy.js";
|
|
9
|
+
import { H as Q } from "./custom-focus-class-_483Pkwp.js";
|
|
10
|
+
import { s as a } from "./field-rac.module-B4l_0KRU.js";
|
|
11
|
+
import { u as Y } from "./use-dropdown-option-class-name-BbVXUebo.js";
|
|
12
|
+
import { u as z } from "./use-dropdown-trigger-class-name-CZrmTGE3.js";
|
|
13
|
+
const G = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
14
|
+
const { actions: o } = P(), { t: h } = A(), { addOther: n, addOtherLabel: p } = e, c = p || h("add-other.default-other-option-label"), i = T(!0), d = _(() => {
|
|
15
|
+
var s;
|
|
16
|
+
return ((s = e.options) == null ? void 0 : s.map((m) => m.id ?? "")) ?? [];
|
|
17
|
+
}, [
|
|
18
|
+
e.options
|
|
19
|
+
]), O = C((s) => n ? [
|
|
20
|
+
...s,
|
|
21
|
+
{
|
|
22
|
+
value: c,
|
|
23
|
+
label: c,
|
|
24
|
+
id: G
|
|
25
|
+
}
|
|
26
|
+
] : s, [
|
|
27
|
+
n,
|
|
28
|
+
c
|
|
29
|
+
]), { isLoading: f, options: l, isEmpty: S, shouldRender: I, setIsLoading: D, setOptions: F, setIsEmpty: g, processOptions: L } = W({
|
|
30
|
+
fieldType: M.SERVICES_DROPDOWN,
|
|
31
|
+
isEditor: e.isEditor,
|
|
32
|
+
postProcessOptions: O
|
|
33
|
+
}), R = C(async () => {
|
|
34
|
+
if (i.current && (o != null && o.fetchServices) && d.length > 0) {
|
|
35
|
+
i.current = !1, D(!0);
|
|
36
|
+
let s;
|
|
37
|
+
try {
|
|
38
|
+
s = await o.fetchServices({
|
|
39
|
+
serviceIds: d
|
|
40
|
+
});
|
|
41
|
+
} catch (m) {
|
|
42
|
+
console.error(m);
|
|
43
|
+
}
|
|
44
|
+
if (s) {
|
|
45
|
+
const m = L(s);
|
|
46
|
+
g(!n && m.length === 0), F(m);
|
|
47
|
+
} else
|
|
48
|
+
i.current = !0;
|
|
49
|
+
D(!1);
|
|
50
|
+
}
|
|
51
|
+
}, [
|
|
52
|
+
o,
|
|
53
|
+
d,
|
|
54
|
+
L,
|
|
55
|
+
n,
|
|
56
|
+
D,
|
|
57
|
+
F,
|
|
58
|
+
g
|
|
59
|
+
]);
|
|
60
|
+
b(() => {
|
|
61
|
+
if (!e.isEditor && l.length > 0) {
|
|
62
|
+
const s = n ? l.length - 1 : l.length;
|
|
63
|
+
g(s === 0);
|
|
64
|
+
}
|
|
65
|
+
}, [
|
|
66
|
+
l,
|
|
67
|
+
n,
|
|
68
|
+
g,
|
|
69
|
+
e.isEditor
|
|
70
|
+
]);
|
|
71
|
+
const v = C(() => {
|
|
72
|
+
e.onFocus && e.onFocus(), i.current && R();
|
|
73
|
+
}, [
|
|
74
|
+
R,
|
|
75
|
+
e.onFocus
|
|
76
|
+
]), N = C(
|
|
77
|
+
(s) => {
|
|
78
|
+
e.onChange && e.onChange(s), i.current = !0;
|
|
79
|
+
},
|
|
80
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
81
|
+
[
|
|
82
|
+
e.onChange
|
|
83
|
+
]
|
|
84
|
+
);
|
|
85
|
+
return {
|
|
86
|
+
isLoading: f,
|
|
87
|
+
options: l,
|
|
88
|
+
isEmpty: S,
|
|
89
|
+
onFocus: v,
|
|
90
|
+
onChange: N,
|
|
91
|
+
shouldRender: I
|
|
92
|
+
};
|
|
93
|
+
}, r = ({ children: e }) => {
|
|
94
|
+
const o = y(), { addOther: h } = o, n = U(), p = o.isEditor || n.isEditor || n.isComposer, { isLoading: c, options: i, isEmpty: d, onFocus: O, onChange: f, shouldRender: l } = J({
|
|
95
|
+
...o,
|
|
96
|
+
isEditor: p
|
|
97
|
+
}), S = _(() => ({
|
|
98
|
+
...o,
|
|
99
|
+
options: c ? [] : i,
|
|
100
|
+
isLoading: c,
|
|
101
|
+
onFocus: O,
|
|
102
|
+
onChange: f
|
|
103
|
+
}), [
|
|
104
|
+
o,
|
|
105
|
+
i,
|
|
106
|
+
c,
|
|
107
|
+
O,
|
|
108
|
+
f
|
|
109
|
+
]);
|
|
110
|
+
return !p && d && !h || !l ? null : /* @__PURE__ */ t.createElement(V.Provider, {
|
|
111
|
+
value: {
|
|
112
|
+
v2: S
|
|
113
|
+
}
|
|
114
|
+
}, /* @__PURE__ */ t.createElement(u, null, e));
|
|
115
|
+
};
|
|
116
|
+
r.Label = u.Label;
|
|
117
|
+
r.Trigger = u.Trigger;
|
|
118
|
+
r.Options = u.Options;
|
|
119
|
+
r.Description = u.Description;
|
|
120
|
+
r.Error = u.Error;
|
|
121
|
+
const X = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement(w, {
|
|
122
|
+
content: e,
|
|
123
|
+
locale: o
|
|
124
|
+
}), Z = () => {
|
|
125
|
+
const e = z(a.dropdownTrigger), o = Y(Q);
|
|
126
|
+
return /* @__PURE__ */ t.createElement(r, null, /* @__PURE__ */ t.createElement(r.Label, {
|
|
127
|
+
className: E(x, a.label)
|
|
128
|
+
}, /* @__PURE__ */ t.createElement(r.Label.Required, {
|
|
129
|
+
className: E(H, a.requiredMark)
|
|
130
|
+
})), /* @__PURE__ */ t.createElement(r.Trigger, {
|
|
131
|
+
className: e
|
|
132
|
+
}, /* @__PURE__ */ t.createElement(j, {
|
|
133
|
+
className: a.dropdownIcon
|
|
134
|
+
})), /* @__PURE__ */ t.createElement(r.Options, {
|
|
135
|
+
className: E(k, a.selectPopover, a.dropdownPopover)
|
|
136
|
+
}, /* @__PURE__ */ t.createElement(r.Options.Option, {
|
|
137
|
+
className: o
|
|
138
|
+
})), /* @__PURE__ */ t.createElement(r.Error, {
|
|
139
|
+
className: E(q, a.error)
|
|
140
|
+
}, /* @__PURE__ */ t.createElement(K, null), /* @__PURE__ */ t.createElement(r.Error.Text, null)), /* @__PURE__ */ t.createElement(r.Description, {
|
|
141
|
+
className: E(B, a.description)
|
|
142
|
+
}, X));
|
|
143
|
+
}, ue = () => /* @__PURE__ */ t.createElement(Z, null);
|
|
144
|
+
export {
|
|
145
|
+
ue as ServiceDropdownRAC
|
|
146
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import e, { useEffect as I, useMemo as L } from "react";
|
|
2
2
|
import { RicosViewer as S } from "@wix/ricos/viewer";
|
|
3
3
|
import a from "classnames";
|
|
4
|
-
import { F as R, b9 as d, ac as D, I as F, U as N, i as f, k as h, v as b, p as M, j as A } from "./form-
|
|
5
|
-
import { u as v } from "./use-service-options-base-
|
|
6
|
-
import { C as i } from "./checkbox-group-field-headless-
|
|
4
|
+
import { F as R, b9 as d, ac as D, I as F, U as N, i as f, k as h, v as b, p as M, j as A } from "./form-DShmmziF.js";
|
|
5
|
+
import { u as v } from "./use-service-options-base-DD6-_eVN.js";
|
|
6
|
+
import { C as i } from "./checkbox-group-field-headless-B-mHaxSW.js";
|
|
7
7
|
import { E as x } from "./error-icon-hZxQ6DEy.js";
|
|
8
8
|
import { C as P } from "./checkbox-indicator-module-classes-BpeSpGsW.js";
|
|
9
9
|
import { s as n } from "./field-rac.module-B4l_0KRU.js";
|
|
10
10
|
import { o as _ } from "./options-rac.module-_THNq6Qq.js";
|
|
11
|
-
import { u as T } from "./use-element-state-class-name-
|
|
12
|
-
import { u as k } from "./use-text-input-class-name-
|
|
11
|
+
import { u as T } from "./use-element-state-class-name-B21H07XJ.js";
|
|
12
|
+
import { u as k } from "./use-text-input-class-name-DNA3i28w.js";
|
|
13
13
|
const y = (s) => {
|
|
14
14
|
var C;
|
|
15
15
|
const { isLoading: o, options: r, isEmpty: l, shouldRender: E, setOptions: c, setIsEmpty: m, setHasInitialDataLoaded: p } = v({
|
|
@@ -4,10 +4,10 @@ import v from "classnames";
|
|
|
4
4
|
import { useHover as ve, useFocusRing as Se, mergeProps as xe } from "react-aria";
|
|
5
5
|
import { RadioGroup as Fe, Button as fe, TextField as Ae, Input as _e, RadioField as Ne, RadioButton as Pe } from "react-aria-components";
|
|
6
6
|
import he from "signature_pad";
|
|
7
|
-
import { aD as Ue, b5 as Oe, b1 as Be, bh as ge, E as ce, a6 as G, b9 as A, b6 as H, bb as Ee, bj as Me, I as ue, U as We, H as B, W as He, v as Ye, p as ke } from "./form-
|
|
7
|
+
import { aD as Ue, b5 as Oe, b1 as Be, bh as ge, E as ce, a6 as G, b9 as A, b6 as H, bb as Ee, bj as Me, I as ue, U as We, H as B, W as He, v as Ye, p as ke } from "./form-DShmmziF.js";
|
|
8
8
|
import { f as I, a as F } from "./find-child-C60k4CxG.js";
|
|
9
|
-
import { D as $e, E as Ve } from "./field-error-headless-
|
|
10
|
-
import { L as ze } from "./field-label-headless-
|
|
9
|
+
import { D as $e, E as Ve } from "./field-error-headless-CiAAbUUq.js";
|
|
10
|
+
import { L as ze } from "./field-label-headless-__gDv8-J.js";
|
|
11
11
|
import { D as Ze } from "./data-hooks-Dkw1pbRj.js";
|
|
12
12
|
import { E as Xe } from "./error-icon-hZxQ6DEy.js";
|
|
13
13
|
import { s as V } from "./field-rac.module-B4l_0KRU.js";
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import t, { useRef as w, useCallback as h } from "react";
|
|
2
|
+
import F from "@wix/editor-react-components/AnimatedIcon";
|
|
3
|
+
import p from "classnames";
|
|
4
|
+
import { b9 as B, b3 as j, a9 as A, b as R, a8 as k, a4 as y, a3 as M, a7 as U } from "./form-DShmmziF.js";
|
|
5
|
+
import { ProgressBar as D, 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-B21H07XJ.js";
|
|
8
|
+
function W(e) {
|
|
9
|
+
const s = "calc(50% - 2px)";
|
|
10
|
+
return /* @__PURE__ */ t.createElement(D, {
|
|
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, P), n = m(o, L), i = m(o, l);
|
|
50
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
51
|
+
className: e
|
|
52
|
+
}, s, n, i);
|
|
53
|
+
}, P = ({ 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
|
+
}, L = ({ 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: E, isDisabled: x, isInProgress: b, isSubmitting: S } = B();
|
|
67
|
+
if (!i)
|
|
68
|
+
return null;
|
|
69
|
+
const d = m(n, l.Label), g = m(n, l.Icon), v = m(n, l.Loader), c = S || b;
|
|
70
|
+
return /* @__PURE__ */ t.createElement(C, {
|
|
71
|
+
className: e,
|
|
72
|
+
"aria-label": E,
|
|
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 && v ? v : /* @__PURE__ */ t.createElement(t.Fragment, null, d ?? /* @__PURE__ */ t.createElement(I, null), g));
|
|
80
|
+
}, I = ({ className: e }) => {
|
|
81
|
+
const { submitText: o } = B();
|
|
82
|
+
return /* @__PURE__ */ t.createElement("span", {
|
|
83
|
+
className: e
|
|
84
|
+
}, o);
|
|
85
|
+
}, V = ({ children: e }) => /* @__PURE__ */ t.createElement(t.Fragment, null, e), X = ({ className: e }) => /* @__PURE__ */ t.createElement("span", {
|
|
86
|
+
className: e
|
|
87
|
+
}, /* @__PURE__ */ t.createElement(W, null));
|
|
88
|
+
l.Label = I;
|
|
89
|
+
l.Icon = V;
|
|
90
|
+
l.Loader = X;
|
|
91
|
+
_.PreviousButton = P;
|
|
92
|
+
_.NextButton = L;
|
|
93
|
+
_.SubmitButton = l;
|
|
94
|
+
u.SubmitButton = _;
|
|
95
|
+
const $ = "_navigationContainer_zzjp6_1", q = "_rowSpacing_zzjp6_6", G = "_navigationButton_zzjp6_10", J = "_nextButton_zzjp6_24", K = "_previousButton_zzjp6_47", Q = "_navigationButtonHover_zzjp6_74", Y = "_button_zzjp6_90", Z = "_buttonNoSteps_zzjp6_133", tt = "_buttonWithSteps_zzjp6_137", et = "_buttonHover_zzjp6_141", nt = "_progress_zzjp6_165", a = {
|
|
96
|
+
navigationContainer: $,
|
|
97
|
+
rowSpacing: q,
|
|
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 z, T;
|
|
109
|
+
const { hasSteps: e, showPreviousButton: o, isDisabled: s, isInProgress: n, isSubmitting: i } = B(), E = !s && !(i || n), { wix: x, className: b, ...S } = ((T = (z = j().submitButton) == null ? void 0 : z.elementProps) == null ? void 0 : T.icon) ?? {}, d = N({
|
|
110
|
+
globalClasses: y,
|
|
111
|
+
moduleClasses: {
|
|
112
|
+
base: p(a.navigationButton, a.previousButton),
|
|
113
|
+
hover: a.navigationButtonHover
|
|
114
|
+
}
|
|
115
|
+
}), g = N({
|
|
116
|
+
globalClasses: M,
|
|
117
|
+
moduleClasses: {
|
|
118
|
+
base: p(a.navigationButton, a.nextButton),
|
|
119
|
+
hover: a.navigationButtonHover
|
|
120
|
+
}
|
|
121
|
+
}), v = N({
|
|
122
|
+
globalClasses: U,
|
|
123
|
+
moduleClasses: {
|
|
124
|
+
base: p(a.button, {
|
|
125
|
+
[a.buttonNoSteps]: !e,
|
|
126
|
+
[a.buttonWithSteps]: e
|
|
127
|
+
}),
|
|
128
|
+
hover: a.buttonHover
|
|
129
|
+
}
|
|
130
|
+
}), c = w(null), H = h(() => {
|
|
131
|
+
var r;
|
|
132
|
+
return (r = c.current) == null ? void 0 : r.runAnimationForward();
|
|
133
|
+
}, []), O = h(() => {
|
|
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: p({
|
|
139
|
+
[a.navigationContainer]: e,
|
|
140
|
+
[a.rowSpacing]: o
|
|
141
|
+
})
|
|
142
|
+
}, /* @__PURE__ */ t.createElement(u.SubmitButton.PreviousButton, {
|
|
143
|
+
className: ({ isHovered: r }) => d({
|
|
144
|
+
isSelected: !1,
|
|
145
|
+
isHovered: r
|
|
146
|
+
})
|
|
147
|
+
}), /* @__PURE__ */ t.createElement(u.SubmitButton.NextButton, {
|
|
148
|
+
className: ({ isHovered: r }) => g({
|
|
149
|
+
isSelected: !1,
|
|
150
|
+
isHovered: r
|
|
151
|
+
})
|
|
152
|
+
}), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton, {
|
|
153
|
+
className: ({ isHovered: r }) => v({
|
|
154
|
+
isSelected: !1,
|
|
155
|
+
isHovered: r,
|
|
156
|
+
isInteractive: E
|
|
157
|
+
}),
|
|
158
|
+
onHoverStart: H,
|
|
159
|
+
onHoverEnd: O
|
|
160
|
+
}, /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton.Label, {
|
|
161
|
+
className: A
|
|
162
|
+
}), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton.Icon, null, S.svg ? /* @__PURE__ */ t.createElement(F, {
|
|
163
|
+
...S,
|
|
164
|
+
ref: c,
|
|
165
|
+
className: p(R, k, 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
|
+
};
|
|
@@ -2,15 +2,15 @@ import { RicosViewer as Y } from "@wix/ricos/viewer";
|
|
|
2
2
|
import y from "classnames";
|
|
3
3
|
import t, { useMemo as I, useState as Z, useRef as N, useLayoutEffect as w, useCallback as k } from "react";
|
|
4
4
|
import { CheckboxGroup as z, TextField as B, Input as J, CheckboxField as K, CheckboxButton as X } from "react-aria-components";
|
|
5
|
-
import { b9 as R, b6 as M, bj as S, bb as U, I as ee, U as te, Y as ne, v as oe, p as ae, Z as re } from "./form-
|
|
5
|
+
import { b9 as R, b6 as M, bj as S, bb as U, I as ee, U as te, Y as ne, v as oe, p as ae, Z as re } from "./form-DShmmziF.js";
|
|
6
6
|
import { f as O, a as x } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { E as W, D as H } from "./field-error-headless-
|
|
8
|
-
import { L as $ } from "./field-label-headless-
|
|
7
|
+
import { E as W, D as H } from "./field-error-headless-CiAAbUUq.js";
|
|
8
|
+
import { L as $ } from "./field-label-headless-__gDv8-J.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 D } from "./field-rac.module-B4l_0KRU.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-B21H07XJ.js";
|
|
13
|
+
import { u as ce } from "./use-text-input-class-name-DNA3i28w.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
|
})({});
|
|
@@ -2,13 +2,13 @@ import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
|
2
2
|
import o from "classnames";
|
|
3
3
|
import r, { useCallback as T, useRef as O } from "react";
|
|
4
4
|
import { TextField as S, TextArea as y } from "react-aria-components";
|
|
5
|
-
import { b9 as p, b6 as d, bb as x, I as g, U as h, v, p as M } from "./form-
|
|
5
|
+
import { b9 as p, b6 as d, bb as x, I as g, U as h, v, p as M } from "./form-DShmmziF.js";
|
|
6
6
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as q, E as B } from "./field-error-headless-
|
|
8
|
-
import { L as k } from "./field-label-headless-
|
|
7
|
+
import { D as q, E as B } from "./field-error-headless-CiAAbUUq.js";
|
|
8
|
+
import { L as k } from "./field-label-headless-__gDv8-J.js";
|
|
9
9
|
import { E as P } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { s as c } from "./field-rac.module-B4l_0KRU.js";
|
|
11
|
-
import { u as U } from "./use-text-input-class-name-
|
|
11
|
+
import { u as U } from "./use-text-input-class-name-DNA3i28w.js";
|
|
12
12
|
const e = ({ children: t }) => {
|
|
13
13
|
const { id: a, value: m, onChange: s, disabled: u, required: n, readOnly: l, onBlur: E, onFocus: b, FieldLayout: I, hasError: f } = p(), { labelId: F } = d(), L = T((A) => {
|
|
14
14
|
s(A);
|
package/dist/component/{text-input-field-rac-DiW0Sqj_.js → text-input-field-rac-DdeVJ8WD.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
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-BJk7hB4Y.js";
|
|
5
5
|
import { E as o } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as a } from "./field-rac.module-B4l_0KRU.js";
|
|
7
|
-
import { I as n, U as c, v as E, p as i } from "./form-
|
|
8
|
-
import { u as p } from "./use-text-input-class-name-
|
|
7
|
+
import { I as n, U as c, v as E, p as i } from "./form-DShmmziF.js";
|
|
8
|
+
import { u as p } from "./use-text-input-class-name-DNA3i28w.js";
|
|
9
9
|
const I = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
|
|
10
10
|
content: s,
|
|
11
11
|
locale: m
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import t, { useRef as L } from "react";
|
|
2
2
|
import { TextField as R, Input as v } from "react-aria-components";
|
|
3
|
-
import { b9 as d, b6 as c, bb as T } from "./form-
|
|
3
|
+
import { b9 as d, b6 as c, bb as T } from "./form-DShmmziF.js";
|
|
4
4
|
import { f as s } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as g, E as h } from "./field-error-headless-
|
|
6
|
-
import { L as x } from "./field-label-headless-
|
|
5
|
+
import { D as g, E as h } from "./field-error-headless-CiAAbUUq.js";
|
|
6
|
+
import { L as x } from "./field-label-headless-__gDv8-J.js";
|
|
7
7
|
const e = ({ children: r }) => {
|
|
8
8
|
const { id: a, value: i, onChange: l, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: b, FieldLayout: f } = d(), { labelId: E } = c(), I = s(r, e.Label), F = s(r, e.Input), y = s(r, e.Description), D = s(r, e.Error);
|
|
9
9
|
return /* @__PURE__ */ t.createElement(f, {
|
|
@@ -3,14 +3,14 @@ import { RicosViewer as q } from "@wix/ricos/viewer";
|
|
|
3
3
|
import c from "classnames";
|
|
4
4
|
import { parseTime as B } from "@internationalized/date";
|
|
5
5
|
import { TimeField as U, DateInput as k, DateSegment as _, TimeFieldStateContext as j } from "react-aria-components";
|
|
6
|
-
import { b9 as p, b6 as w, bj as b, bb as Q, I as z, U as G, v as J, p as K } from "./form-
|
|
6
|
+
import { b9 as p, b6 as w, bj as b, bb as Q, I as z, U as G, v as J, p as K } from "./form-DShmmziF.js";
|
|
7
7
|
import { f as m, a as F } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { D as W, E as X } from "./field-error-headless-
|
|
9
|
-
import { L as Y } from "./field-label-headless-
|
|
8
|
+
import { D as W, E as X } from "./field-error-headless-CiAAbUUq.js";
|
|
9
|
+
import { L as Y } from "./field-label-headless-__gDv8-J.js";
|
|
10
10
|
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { H as T } from "./custom-focus-class-_483Pkwp.js";
|
|
12
12
|
import { s as f } from "./field-rac.module-B4l_0KRU.js";
|
|
13
|
-
import { u as $ } from "./use-text-input-class-name-
|
|
13
|
+
import { u as $ } from "./use-text-input-class-name-DNA3i28w.js";
|
|
14
14
|
const r = ({ children: t }) => {
|
|
15
15
|
const { id: n, value: l, onChange: o, disabled: i, readOnly: s, required: a, onBlur: d, onFocus: E, use24HourFormat: S, FieldLayout: C, hasError: I } = p(), { inputId: g, ariaDescribedBy: D, labelId: L } = w(), R = V((M) => {
|
|
16
16
|
const H = ae(M);
|
|
@@ -2,14 +2,14 @@ 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 { b9 as d, b6 as E, bb as v, I as B, U as T, v as g, p as k } from "./form-
|
|
5
|
+
import { b9 as d, b6 as E, bb as v, I as B, U as T, v as g, p as k } from "./form-DShmmziF.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 U } from "./field-label-headless-
|
|
7
|
+
import { D as M, E as P } from "./field-error-headless-CiAAbUUq.js";
|
|
8
|
+
import { L as U } from "./field-label-headless-__gDv8-J.js";
|
|
9
9
|
import { u as q } from "./use-invoke-callback-UH73A_J3.js";
|
|
10
10
|
import { E as x } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s as u } from "./field-rac.module-B4l_0KRU.js";
|
|
12
|
-
import { u as w } from "./use-text-input-class-name-
|
|
12
|
+
import { u as w } from "./use-text-input-class-name-DNA3i28w.js";
|
|
13
13
|
const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
|
|
14
14
|
const { id: o, value: s, onChange: n, disabled: m, readOnly: a, required: l, hasError: I, onBlur: b, onFocus: f, FieldLayout: R } = d(), { labelId: F } = E(), p = q(b), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), N = h(() => {
|
|
15
15
|
n(V(s)), p();
|
|
@@ -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 T from "classnames";
|
|
4
4
|
import { s as h } from "./field-rac.module-B4l_0KRU.js";
|
|
5
|
-
import { s as H } from "./form-
|
|
6
|
-
import { u as I } from "./use-element-state-class-name-
|
|
5
|
+
import { s as H } from "./form-DShmmziF.js";
|
|
6
|
+
import { u as I } from "./use-element-state-class-name-B21H07XJ.js";
|
|
7
7
|
const R = 1 / 0, B = {
|
|
8
8
|
position: "absolute",
|
|
9
9
|
width: 0,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useContext as i, useMemo as u } from "react";
|
|
2
|
+
import { b3 as T, ag as p, b1 as O, F as s, t as _ } from "./form-DShmmziF.js";
|
|
3
|
+
import { u as I } from "./use-hoverable-input-class-name-D_sATUQv.js";
|
|
4
|
+
const l = [
|
|
5
|
+
s.DROPDOWN,
|
|
6
|
+
s.DEXT_DROPDOWN,
|
|
7
|
+
s.SERVICES_DROPDOWN,
|
|
8
|
+
s.DATE_INPUT,
|
|
9
|
+
s.CONTACTS_BIRTHDATE,
|
|
10
|
+
s.DATE_TIME_INPUT,
|
|
11
|
+
s.DEXT_DATE_TIME_INPUT,
|
|
12
|
+
s.DATE_PICKER,
|
|
13
|
+
s.DEXT_DATE_PICKER
|
|
14
|
+
], d = [
|
|
15
|
+
s.PHONE,
|
|
16
|
+
s.CONTACTS_PHONE,
|
|
17
|
+
s.BOOKINGS_PHONE,
|
|
18
|
+
s.DEXT_PHONE
|
|
19
|
+
], P = [
|
|
20
|
+
s.MULTILINE_ADDRESS,
|
|
21
|
+
s.BOOKINGS_ADDRESS,
|
|
22
|
+
s.ECOM_ADDRESS
|
|
23
|
+
], c = ({ properties: o }) => {
|
|
24
|
+
var e, t, n, r;
|
|
25
|
+
return ((r = (n = (t = (e = o.validation) == null ? void 0 : e.string) == null ? void 0 : t.phoneOptions) == null ? void 0 : n.allowedCountryCodes) == null ? void 0 : r.length) !== 1;
|
|
26
|
+
}, N = ({ properties: o }) => {
|
|
27
|
+
var e, t;
|
|
28
|
+
return ((t = (e = o.fieldSettings) == null ? void 0 : e.country) == null ? void 0 : t.show) !== !1;
|
|
29
|
+
}, S = (o, e) => d.includes(o.fieldType) ? !e && c(o) : P.includes(o.fieldType) ? N(o) : l.includes(o.fieldType), C = (o, e) => S(o, e) && !o.properties.hidden && !o.properties.disabled && !o.properties.readOnly, R = (o, e) => o.layout.row - e.layout.row || o.layout.column - e.layout.column, A = (o) => {
|
|
30
|
+
var D;
|
|
31
|
+
const e = ((D = T().dropdown) == null ? void 0 : D.open) === !0, t = i(p), { isMobile: n = !1 } = O(), r = u(() => {
|
|
32
|
+
var E;
|
|
33
|
+
return t && !t.parentId ? (E = t.fields.filter((a) => C(a, n)).sort(R)[0]) == null ? void 0 : E.id : void 0;
|
|
34
|
+
}, [
|
|
35
|
+
t,
|
|
36
|
+
n
|
|
37
|
+
]);
|
|
38
|
+
return e && r === o;
|
|
39
|
+
}, f = (...o) => I(_, o);
|
|
40
|
+
export {
|
|
41
|
+
A as a,
|
|
42
|
+
f as u
|
|
43
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { b9 as i } from "./form-DShmmziF.js";
|
|
2
|
+
import { s as e } from "./field-rac.module-B4l_0KRU.js";
|
|
3
|
+
import { u as m } from "./use-element-state-class-name-B21H07XJ.js";
|
|
4
|
+
const d = (s, a) => {
|
|
5
|
+
const { disabled: t, readOnly: o } = i(), r = m({
|
|
6
|
+
globalClasses: s,
|
|
7
|
+
moduleClasses: {
|
|
8
|
+
base: [
|
|
9
|
+
e.input,
|
|
10
|
+
...a
|
|
11
|
+
].join(" "),
|
|
12
|
+
hover: e.inputHover
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return ({ isHovered: l }) => r({
|
|
16
|
+
isSelected: !1,
|
|
17
|
+
isHovered: l,
|
|
18
|
+
isInteractive: !t && !o
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
d as u
|
|
23
|
+
};
|
package/dist/component/{use-service-options-base-4yrjmSWU.js → use-service-options-base-DD6-_eVN.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 { b8 as v } from "./form-
|
|
2
|
+
import { b8 as v } from "./form-DShmmziF.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) => ({
|