@wix/form-elements 1.63.0 → 1.65.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-B1VVk_Ui.js → appointment-rac-0kUk8XQJ.js} +5 -5
- package/dist/component/{bookings-address-rac-IQeHFdHT.js → bookings-address-rac-BUM0wpw0.js} +1 -1
- package/dist/component/{bookings-email-rac-z26A790r.js → bookings-email-rac-BHlvupVS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Djf0GPP4.js → bookings-first-name-rac-Bwn6xv1U.js} +1 -1
- package/dist/component/{bookings-header-rac-CXOzAOpz.js → bookings-header-rac-BkRvQMi4.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CbB8alM9.js → bookings-last-name-rac-DRTj4VdX.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CXrLx7Pn.js → bookings-login-bar-rac-D-2Bt7Kx.js} +5 -5
- package/dist/component/{bookings-phone-rac-DGYx7h5g.js → bookings-phone-rac-CTcHHpDr.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-viJG57XF.js → bookings-rich-text-rac-n-w9iWII.js} +1 -1
- package/dist/component/{checkbox-field-rac-e-RAmupX.js → checkbox-field-rac-BamOJv3P.js} +43 -43
- package/dist/component/checkbox-group-field-headless-BmKJbEi0.js +210 -0
- package/dist/component/checkbox-group-field-rac-CC8qfj0Y.js +40 -0
- package/dist/component/{checkbox-group-rac-CDfDTWqz.js → checkbox-group-rac-CsrP7zD5.js} +1 -1
- package/dist/component/{checkbox-rac-BRBKYD_5.js → checkbox-rac-X6E-fJ8k.js} +1 -1
- package/dist/component/{contacts-address-rac-BtWWQi77.js → contacts-address-rac-oYnkIZ6m.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DaEUXJTf.js → contacts-birthdate-rac-B7p8LgYA.js} +1 -1
- package/dist/component/{contacts-company-rac-IgRyjtcM.js → contacts-company-rac-cjLRO5J-.js} +1 -1
- package/dist/component/{contacts-email-rac-BS1MDrMk.js → contacts-email-rac-BlJJSkGK.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BAvXypDF.js → contacts-first-name-rac-Nl-MDndn.js} +1 -1
- package/dist/component/{contacts-last-name-rac-C289RYPl.js → contacts-last-name-rac-DhxAobRI.js} +1 -1
- package/dist/component/{contacts-phone-rac-DIpyskam.js → contacts-phone-rac-CZLWlH0T.js} +1 -1
- package/dist/component/{contacts-position-rac-nPeh3lKU.js → contacts-position-rac-DlKC0lCU.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-Ci5OLk68.js → contacts-subscribe-rac-POSKh1Ta.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-C4WB-SR0.js → contacts-tax-id-rac-uyBKxOJn.js} +1 -1
- package/dist/component/{date-availability-HHjPx4Uv.js → date-availability-DnFJD1aS.js} +1 -1
- package/dist/component/{date-input-field-rac-GFgFcpX2.js → date-input-field-rac-DojzGm-i.js} +22 -22
- package/dist/component/{date-input-rac-B9BUEIA-.js → date-input-rac-BaPKcAuU.js} +1 -1
- package/dist/component/{date-picker-field-rac-BfjYIIuY.js → date-picker-field-rac-C1rzJMV8.js} +24 -24
- package/dist/component/{date-picker-rac-Bd2UN0ZF.js → date-picker-rac-BHsOfkYn.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CAXnxLQP.js → date-time-input-field-rac-B4jAAxU8.js} +32 -32
- package/dist/component/{date-time-input-rac-BuJ3Awlh.js → date-time-input-rac-XyL5z_ma.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DKp4cBVa.js → dext-checkbox-group-rac-DzpdOP3i.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BMu_k06A.js → dext-checkbox-rac-BUWkvW5s.js} +1 -1
- package/dist/component/{dext-date-picker-rac-L3sdldhT.js → dext-date-picker-rac-CR0PUoOn.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-UmabFzDN.js → dext-date-time-input-rac-D3WhLSKK.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DbjgYaG-.js → dext-dropdown-rac-BJ1UfAIM.js} +1 -1
- package/dist/component/{dext-email-rac-rNudrOOK.js → dext-email-rac-xk_5C79-.js} +1 -1
- package/dist/component/{dext-number-input-rac-hw1FTrJL.js → dext-number-input-rac-Cu1Sqoac.js} +1 -1
- package/dist/component/{dext-phone-rac-DrZ_Vwv2.js → dext-phone-rac-S34qxXwg.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DAt2ax-I.js → dext-radio-group-rac-DXnAk_eU.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BW2Ike11.js → dext-rating-input-rac-ewGpgB63.js} +1 -1
- package/dist/component/{dext-tags-rac-DDzwlKrR.js → dext-tags-rac-BApZKGqP.js} +2 -2
- package/dist/component/{dext-text-area-rac-D0xf4z3z.js → dext-text-area-rac-DBtuaiwM.js} +1 -1
- package/dist/component/{dext-text-input-rac-Da04OLmq.js → dext-text-input-rac-qI8VECmA.js} +1 -1
- package/dist/component/{dext-url-input-rac-B-g4xTqh.js → dext-url-input-rac-C6vzqNjn.js} +1 -1
- package/dist/component/donation-rac-BDVKvG4j.js +302 -0
- package/dist/component/{dropdown-field-headless-Js5TxdU4.js → dropdown-field-headless-DBl8vGed.js} +16 -16
- package/dist/component/{dropdown-field-rac-BDxcvX00.js → dropdown-field-rac-O6G7_kSn.js} +9 -9
- package/dist/component/{dropdown-rac-B5UHNzV-.js → dropdown-rac-BImZ5Jwe.js} +1 -1
- package/dist/component/{ecom-address-rac-0zm4bX37.js → ecom-address-rac-BU4XZ_Do.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DCXoI33l.js → ecom-subscription-checkbox-rac-DLzpoNYm.js} +3 -3
- package/dist/component/{email-input-field-rac-svf6hUHF.js → email-input-field-rac-Ui0p35z5.js} +45 -45
- package/dist/component/{events-repeater-rac-DMIqzuVK.js → events-repeater-rac-bPKOOOit.js} +49 -49
- package/dist/component/{events-rsvp-rac-B_YD4ckO.js → events-rsvp-rac-lsRBBfPQ.js} +3 -3
- package/dist/component/{field-error-headless-DTKnr5Zx.js → field-error-headless-D6iejMQP.js} +3 -3
- package/dist/component/{field-label-headless-DV4aNd5Y.js → field-label-headless-BWLfU3YB.js} +4 -4
- package/dist/component/field-rac.module-DnUIb9Oh.js +21 -0
- package/dist/component/{file-upload-rac-lGKJjG3m.js → file-upload-rac-DqKL8QQZ.js} +116 -116
- package/dist/component/{fixed-payment-rac-BVS6glii.js → fixed-payment-rac-BDtRB8w2.js} +14 -14
- package/dist/component/{form-DzjdnO7t.js → form-CtWkUmxc.js} +1563 -1556
- package/dist/component/form-element-classes-BSMjWijd.js +63 -0
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-tzBH-8Yh.js → header-field-rac-BLM8RCDY.js} +7 -7
- package/dist/component/{header-rac-6thQAvVF.js → header-rac-DViRwafg.js} +1 -1
- package/dist/component/image-choice-rac-D76t2y-b.js +141 -0
- package/dist/component/{index-Lnx0829a.js → index--iRBHLXJ.js} +4 -4
- package/dist/component/{index-DIP7KB8P.js → index-pEItT2oo.js} +2 -2
- package/dist/component/{isObjectLike-B_1KizZV.js → isObjectLike-968AHV2b.js} +1 -1
- package/dist/component/{multiline-address-field-rac-BY2SUp2d.js → multiline-address-field-rac-CObOc8KE.js} +82 -82
- package/dist/component/{multiline-address-rac-BL8Yp4F0.js → multiline-address-rac-1qVZkN41.js} +1 -1
- package/dist/component/{number-input-field-rac-x0yFmXbe.js → number-input-field-rac-CPQ3u0N7.js} +19 -19
- package/dist/component/{number-input-rac-pJXc2YsD.js → number-input-rac-Bq1UyUPZ.js} +1 -1
- package/dist/component/{password-rac-B4XCP64b.js → password-rac-BZPK1VkN.js} +15 -15
- package/dist/component/{payment-input-rac-CZdOAjK4.js → payment-input-rac-CQrV0WmN.js} +28 -28
- package/dist/component/{phone-input-field-rac-DO_V5Z_T.js → phone-input-field-rac-DzUE1-RF.js} +39 -39
- package/dist/component/{phone-rac-D16nLDjP.js → phone-rac-BovOZ7V5.js} +1 -1
- package/dist/component/{product-list-rac-DER8gVqy.js → product-list-rac-CeGm1_WN.js} +71 -71
- package/dist/component/quiz-radio-group-rac-Lw2thQqC.js +13 -0
- package/dist/component/{radio-group-field-rac-Dt2pU0VV.js → radio-group-field-rac-BSVmjEgZ.js} +8 -8
- package/dist/component/{radio-group-field-rac.module--sO0VqCA.js → radio-group-field-rac.module-Cb3mm0f2.js} +7 -7
- package/dist/component/{radio-group-rac-CqCmtkNQ.js → radio-group-rac-BHhOCSQ2.js} +1 -1
- package/dist/component/{rating-input-field-rac-xDrHHcL2.js → rating-input-field-rac-BvbBZZDO.js} +31 -31
- package/dist/component/{rating-input-rac-Bo5E9N87.js → rating-input-rac-DDe1EBpt.js} +1 -1
- package/dist/component/{rich-content-rac.module-CJXbNca9.js → rich-content-rac.module-BacYkzEv.js} +1 -1
- package/dist/component/{rich-text-field-rac-CkV0Z9F-.js → rich-text-field-rac-D1W0mUjr.js} +3 -3
- package/dist/component/{rich-text-rac-59DbKpXz.js → rich-text-rac-B-cOn0RU.js} +1 -1
- package/dist/component/{service-dropdown-rac-BLnflnUr.js → service-dropdown-rac-CebfMkGP.js} +41 -41
- package/dist/component/services-multi-choice-rac-C4bF1xhB.js +76 -0
- package/dist/component/{signature-rac-Bb5IaS28.js → signature-rac-DWWT65Ez.js} +48 -48
- package/dist/component/{submit-button-rac-Bjyi8sUA.js → submit-button-rac-_mgn4ChE.js} +6 -6
- package/dist/component/{tags-field-rac-C_VO3_69.js → tags-field-rac-7coCWj0y.js} +39 -39
- package/dist/component/{tags-rac-CKiutCWe.js → tags-rac-rgsn8Os0.js} +1 -1
- package/dist/component/{text-area-field-rac-Cg-vIhFe.js → text-area-field-rac-5lUQxnNM.js} +15 -15
- package/dist/component/{text-area-rac-tMFx38UD.js → text-area-rac-DpGOBzN3.js} +1 -1
- package/dist/component/{text-input-field-rac-CgN_2hOD.js → text-input-field-rac-CgWadDfM.js} +6 -6
- package/dist/component/{text-input-headless-CkhvKrFp.js → text-input-headless-fhxuPytc.js} +11 -11
- package/dist/component/{text-input-rac-BsyBgd3b.js → text-input-rac-kgWS3UUV.js} +1 -1
- package/dist/component/{time-input-rac-BxRVJtHE.js → time-input-rac-CuLUJcBH.js} +34 -34
- package/dist/component/{url-input-field-rac-B_1yVniS.js → url-input-field-rac-CAGHb2na.js} +22 -22
- package/dist/component/{url-input-rac-D8VrKYVe.js → url-input-rac-s5_SVi0h.js} +1 -1
- package/dist/component/{use-service-options-base-Ci9gIluo.js → use-service-options-base-CYAEJ75H.js} +6 -6
- package/dist/form.d.ts +3 -1
- package/package.json +2 -2
- package/dist/component/checkbox-group-field-headless-Cvia4lL6.js +0 -204
- package/dist/component/checkbox-group-field-rac-BXxk90dk.js +0 -33
- package/dist/component/donation-rac-gKeq72jg.js +0 -305
- package/dist/component/field-rac.module-DtugsLiL.js +0 -21
- package/dist/component/form-element-classes-Bi-nNM8q.js +0 -55
- package/dist/component/image-choice-rac-Dx1b-saW.js +0 -141
- package/dist/component/quiz-radio-group-rac-BgTmHHi4.js +0 -13
- package/dist/component/services-multi-choice-rac-C-bFjwx8.js +0 -76
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as H } from "@wix/ricos/viewer";
|
|
2
2
|
import _ from "classnames";
|
|
3
|
-
import e, { useMemo as F, useState as
|
|
4
|
-
import { CheckboxGroup as
|
|
5
|
-
import {
|
|
6
|
-
import { f, a as
|
|
7
|
-
import { E as
|
|
8
|
-
import { L as
|
|
3
|
+
import e, { useMemo as F, useState as j, useRef as k, useLayoutEffect as z, useCallback as M } from "react";
|
|
4
|
+
import { CheckboxGroup as Q, TextField as J, Input as K, CheckboxField as X, CheckboxButton as Y } from "react-aria-components";
|
|
5
|
+
import { ai as D, af as Z, as as v, ab as ee, ak as te } from "./form-CtWkUmxc.js";
|
|
6
|
+
import { f, a as x } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { E as B, D as P } from "./field-error-headless-D6iejMQP.js";
|
|
8
|
+
import { L as $ } from "./field-label-headless-BWLfU3YB.js";
|
|
9
9
|
import { F as ae } from "./fieldset-headless-CD3fds9J.js";
|
|
10
|
-
import { N
|
|
10
|
+
import { N } from "./options-layout-constants-DEfIEJWD.js";
|
|
11
11
|
import { E as ne } from "./error-icon-hZxQ6DEy.js";
|
|
12
|
-
import { s as S } from "./field-rac.module-
|
|
13
|
-
import {
|
|
12
|
+
import { s as S } from "./field-rac.module-DnUIb9Oh.js";
|
|
13
|
+
import { z as re, P as oe, _ as se, $ as le, a0 as ie, y as ce, q as ue, j as de } from "./form-element-classes-BSMjWijd.js";
|
|
14
14
|
import { o as me } from "./options-rac.module-KM-VT_KY.js";
|
|
15
15
|
const g = "Other", pe = (t, a) => {
|
|
16
16
|
const c = a.length + 2;
|
|
17
17
|
return (t.find((r) => r.startsWith(`${a}: `)) || "").slice(c);
|
|
18
|
-
}, he = (t) => t.map((a) => a.value ?? a.label),
|
|
18
|
+
}, he = (t) => t.map((a) => a.value ?? a.label), q = ({ className: t, ...a }) => {
|
|
19
19
|
const { label: l } = a;
|
|
20
20
|
return /* @__PURE__ */ e.createElement("span", {
|
|
21
21
|
className: t
|
|
22
22
|
}, l);
|
|
23
23
|
}, W = ({ className: t }) => {
|
|
24
|
-
const { value: a, onChange: l, addOtherLabel: c, addOtherPlaceholder: i, otherInputCharacterLimit: r, disabled: u, readOnly: b, hasError: d } =
|
|
24
|
+
const { value: a, onChange: l, addOtherLabel: c, addOtherPlaceholder: i, otherInputCharacterLimit: r, disabled: u, readOnly: b, hasError: d } = D(), { t: m } = v(), o = c || m("add-other.default-other-option-label") || g, p = F(() => pe(a || [], o), [
|
|
25
25
|
a,
|
|
26
26
|
o
|
|
27
|
-
]), [n, L] =
|
|
28
|
-
|
|
27
|
+
]), [n, L] = j(p), h = k(l);
|
|
28
|
+
z(() => {
|
|
29
29
|
h.current = l;
|
|
30
30
|
});
|
|
31
|
-
const I =
|
|
31
|
+
const I = M((E) => {
|
|
32
32
|
L(E);
|
|
33
33
|
const C = (a || []).filter((O) => !O.startsWith(`${o}:`) && O !== o), R = E ? `${o}: ${E}` : o;
|
|
34
34
|
h.current([
|
|
@@ -53,23 +53,23 @@ const g = "Other", pe = (t, a) => {
|
|
|
53
53
|
maxLength: r,
|
|
54
54
|
className: t
|
|
55
55
|
}));
|
|
56
|
-
},
|
|
57
|
-
const { value: c, label: i, isOther: r, isFirstOption: u } = l, { id: b, value: d, onChange: m, options: o, disabled: p, readOnly: n, hasError: L } =
|
|
56
|
+
}, T = ({ children: t, className: a, ...l }) => {
|
|
57
|
+
const { value: c, label: i, isOther: r, isFirstOption: u } = l, { id: b, value: d, onChange: m, options: o, disabled: p, readOnly: n, hasError: L } = D(), h = k(null);
|
|
58
58
|
te(() => {
|
|
59
59
|
var O;
|
|
60
60
|
u && ((O = h.current) == null || O.focus({
|
|
61
61
|
preventScroll: !0
|
|
62
62
|
}));
|
|
63
63
|
}, b);
|
|
64
|
-
const I = f(t,
|
|
64
|
+
const I = f(t, q), E = F(() => d || [], [
|
|
65
65
|
d
|
|
66
66
|
]), C = F(() => r ? E.find((O) => O === i || O.startsWith(`${i}: `)) || i : c, [
|
|
67
67
|
r,
|
|
68
68
|
E,
|
|
69
69
|
i,
|
|
70
70
|
c
|
|
71
|
-
]), R =
|
|
72
|
-
const
|
|
71
|
+
]), R = M((O) => {
|
|
72
|
+
const U = he(o || []), V = E.filter((w) => U.includes(w));
|
|
73
73
|
m(O ? [
|
|
74
74
|
...V,
|
|
75
75
|
i
|
|
@@ -90,14 +90,14 @@ const g = "Other", pe = (t, a) => {
|
|
|
90
90
|
}, /* @__PURE__ */ e.createElement(Y, {
|
|
91
91
|
className: a,
|
|
92
92
|
"data-hook": `tags-${r ? g : c}`
|
|
93
|
-
},
|
|
93
|
+
}, x(I, {
|
|
94
94
|
value: c,
|
|
95
95
|
label: i,
|
|
96
96
|
isOther: r,
|
|
97
97
|
isFirstOption: u
|
|
98
98
|
})));
|
|
99
99
|
}, A = ({ children: t, className: a }) => {
|
|
100
|
-
const { options: l, addOther: c, addOtherLabel: i, numberOfColumns: r =
|
|
100
|
+
const { options: l, addOther: c, addOtherLabel: i, numberOfColumns: r = N.FREE_FLOW } = D(), { isMobile: u } = ee(), { t: b } = v(), d = u && r !== N.FREE_FLOW ? N.ONE : r, m = i || b("add-other.default-other-option-label") || g, o = f(t, T), p = F(() => {
|
|
101
101
|
const n = l || [];
|
|
102
102
|
return c ? [
|
|
103
103
|
...n,
|
|
@@ -117,7 +117,7 @@ const g = "Other", pe = (t, a) => {
|
|
|
117
117
|
"data-columns": d
|
|
118
118
|
}, p.map((n, L) => {
|
|
119
119
|
const h = n.value ?? n.label;
|
|
120
|
-
return
|
|
120
|
+
return x(o, {
|
|
121
121
|
key: n.isOther ? g : h,
|
|
122
122
|
value: h,
|
|
123
123
|
label: n.label,
|
|
@@ -125,8 +125,8 @@ const g = "Other", pe = (t, a) => {
|
|
|
125
125
|
isFirstOption: L === 0
|
|
126
126
|
});
|
|
127
127
|
}));
|
|
128
|
-
},
|
|
129
|
-
const { addOther: l, addOtherLabel: c, hasError: i, readOnly: r, value: u } =
|
|
128
|
+
}, G = ({ children: t, className: a }) => {
|
|
129
|
+
const { addOther: l, addOtherLabel: c, hasError: i, readOnly: r, value: u } = D(), { t: b } = v(), d = c || b("add-other.default-other-option-label") || g, m = f(t, A), o = f(t, W), p = F(() => !l || !u ? !1 : u.some((n) => n === d || n.startsWith(`${d}:`)), [
|
|
130
130
|
l,
|
|
131
131
|
u,
|
|
132
132
|
d
|
|
@@ -137,9 +137,9 @@ const g = "Other", pe = (t, a) => {
|
|
|
137
137
|
"data-readonly": r
|
|
138
138
|
}, m, p && o);
|
|
139
139
|
}, s = ({ children: t }) => {
|
|
140
|
-
const { id: a, value: l, onChange: c, FieldLayout: i, required: r, disabled: u, readOnly: b, hasError: d, onBlur: m, onFocus: o } =
|
|
140
|
+
const { id: a, value: l, onChange: c, FieldLayout: i, required: r, disabled: u, readOnly: b, hasError: d, onBlur: m, onFocus: o } = D(), { inputId: p, labelId: n, ariaDescribedBy: L } = Z(), h = F(() => l || [], [
|
|
141
141
|
l
|
|
142
|
-
]), I = f(t,
|
|
142
|
+
]), I = f(t, $), E = f(t, G), C = f(t, P), R = f(t, B);
|
|
143
143
|
return /* @__PURE__ */ e.createElement(i, {
|
|
144
144
|
fieldId: a,
|
|
145
145
|
renderLabel: () => I,
|
|
@@ -150,7 +150,7 @@ const g = "Other", pe = (t, a) => {
|
|
|
150
150
|
required: r,
|
|
151
151
|
onBlur: m,
|
|
152
152
|
onFocus: o
|
|
153
|
-
}, /* @__PURE__ */ e.createElement(
|
|
153
|
+
}, /* @__PURE__ */ e.createElement(Q, {
|
|
154
154
|
"aria-labelledby": n,
|
|
155
155
|
value: h,
|
|
156
156
|
onChange: c,
|
|
@@ -162,19 +162,19 @@ const g = "Other", pe = (t, a) => {
|
|
|
162
162
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, R, C)
|
|
163
163
|
});
|
|
164
164
|
};
|
|
165
|
-
A.Option =
|
|
166
|
-
|
|
167
|
-
s.Label =
|
|
168
|
-
s.Control =
|
|
165
|
+
A.Option = T;
|
|
166
|
+
T.Label = q;
|
|
167
|
+
s.Label = $;
|
|
168
|
+
s.Control = G;
|
|
169
169
|
s.Options = A;
|
|
170
170
|
s.OtherInput = W;
|
|
171
|
-
s.Description =
|
|
172
|
-
s.Error =
|
|
173
|
-
const Ee = "
|
|
171
|
+
s.Description = P;
|
|
172
|
+
s.Error = B;
|
|
173
|
+
const Ee = "_control_1kvnw_1", Oe = "_options_1kvnw_7", be = "_option_1kvnw_7", y = {
|
|
174
174
|
control: Ee,
|
|
175
175
|
options: Oe,
|
|
176
176
|
option: be
|
|
177
|
-
}, fe = ({ content: t, locale: a }) => /* @__PURE__ */ e.createElement(
|
|
177
|
+
}, fe = ({ content: t, locale: a }) => /* @__PURE__ */ e.createElement(H, {
|
|
178
178
|
content: t,
|
|
179
179
|
locale: a
|
|
180
180
|
}), Ve = () => /* @__PURE__ */ e.createElement(s, null, /* @__PURE__ */ e.createElement(s.Label, {
|
|
@@ -182,11 +182,11 @@ const Ee = "_control_lyoqm_1", Oe = "_options_lyoqm_7", be = "_option_lyoqm_7",
|
|
|
182
182
|
}, /* @__PURE__ */ e.createElement(s.Label.Required, {
|
|
183
183
|
className: _(oe, S.requiredMark)
|
|
184
184
|
})), /* @__PURE__ */ e.createElement(s.Control, {
|
|
185
|
-
className:
|
|
185
|
+
className: y.control
|
|
186
186
|
}, /* @__PURE__ */ e.createElement(s.Options, {
|
|
187
|
-
className: _(se,
|
|
187
|
+
className: _(se, y.options)
|
|
188
188
|
}, /* @__PURE__ */ e.createElement(s.Options.Option, {
|
|
189
|
-
className: ({ isSelected: t }) => _(le, t && ie,
|
|
189
|
+
className: ({ isSelected: t }) => _(le, t && ie, y.option)
|
|
190
190
|
}, /* @__PURE__ */ e.createElement(s.Options.Option.Label, {
|
|
191
191
|
className: me.optionLabel
|
|
192
192
|
}))), /* @__PURE__ */ e.createElement(s.OtherInput, {
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { RicosViewer as S } from "@wix/ricos/viewer";
|
|
2
2
|
import n from "classnames";
|
|
3
3
|
import r, { useCallback as O, useRef as T } from "react";
|
|
4
|
-
import { TextField as
|
|
5
|
-
import {
|
|
4
|
+
import { TextField as y, TextArea as N } from "react-aria-components";
|
|
5
|
+
import { ai as E, af as d, ak as x } from "./form-CtWkUmxc.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as
|
|
8
|
-
import { L as g } from "./field-label-headless-
|
|
7
|
+
import { D as h, E as M } from "./field-error-headless-D6iejMQP.js";
|
|
8
|
+
import { L as g } from "./field-label-headless-BWLfU3YB.js";
|
|
9
9
|
import { E as q } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
-
import { s } from "./field-rac.module-
|
|
11
|
-
import {
|
|
10
|
+
import { s } from "./field-rac.module-DnUIb9Oh.js";
|
|
11
|
+
import { z as v, P as B, y as P, q as k, j as U } from "./form-element-classes-BSMjWijd.js";
|
|
12
12
|
const e = ({ children: t }) => {
|
|
13
|
-
const { id: a, value: m, onChange: l, disabled: u, required: o, readOnly: i, onBlur: p, onFocus:
|
|
13
|
+
const { id: a, value: m, onChange: l, disabled: u, required: o, readOnly: i, onBlur: p, onFocus: f, FieldLayout: I, hasError: F } = E(), { labelId: L } = d(), R = O((C) => {
|
|
14
14
|
l(C);
|
|
15
15
|
}, [
|
|
16
16
|
l
|
|
17
17
|
]), _ = c(t, e.Label), b = c(t, e.Input), D = c(t, e.Description), A = c(t, e.Error);
|
|
18
|
-
return /* @__PURE__ */ r.createElement(
|
|
18
|
+
return /* @__PURE__ */ r.createElement(I, {
|
|
19
19
|
fieldId: a,
|
|
20
20
|
renderLabel: () => _,
|
|
21
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
21
|
+
renderInput: () => /* @__PURE__ */ r.createElement(y, {
|
|
22
22
|
"aria-labelledby": L,
|
|
23
23
|
value: m ?? "",
|
|
24
24
|
onChange: R,
|
|
@@ -27,16 +27,16 @@ const e = ({ children: t }) => {
|
|
|
27
27
|
isRequired: o,
|
|
28
28
|
isInvalid: F,
|
|
29
29
|
onBlur: p,
|
|
30
|
-
onFocus:
|
|
30
|
+
onFocus: f
|
|
31
31
|
}, b),
|
|
32
32
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, D)
|
|
33
33
|
});
|
|
34
34
|
}, V = ({ className: t }) => {
|
|
35
35
|
const { inputId: a, ariaDescribedBy: m } = d(), { id: l, placeholder: u } = E(), o = T(null);
|
|
36
|
-
return
|
|
36
|
+
return x(() => {
|
|
37
37
|
var i;
|
|
38
38
|
(i = o.current) == null || i.focus();
|
|
39
|
-
}, l), /* @__PURE__ */ r.createElement(
|
|
39
|
+
}, l), /* @__PURE__ */ r.createElement(N, {
|
|
40
40
|
ref: o,
|
|
41
41
|
id: a,
|
|
42
42
|
"aria-describedby": m,
|
|
@@ -46,11 +46,11 @@ const e = ({ children: t }) => {
|
|
|
46
46
|
};
|
|
47
47
|
e.Label = g;
|
|
48
48
|
e.Input = V;
|
|
49
|
-
e.Description =
|
|
49
|
+
e.Description = h;
|
|
50
50
|
e.Error = M;
|
|
51
51
|
const j = "_input_ug5v8_1", w = {
|
|
52
52
|
input: j
|
|
53
|
-
},
|
|
53
|
+
}, z = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(S, {
|
|
54
54
|
content: t,
|
|
55
55
|
locale: a
|
|
56
56
|
}), re = () => /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
@@ -63,7 +63,7 @@ const j = "_input_ug5v8_1", w = {
|
|
|
63
63
|
className: n(k, s.error)
|
|
64
64
|
}, /* @__PURE__ */ r.createElement(q, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
65
65
|
className: n(U, s.description)
|
|
66
|
-
},
|
|
66
|
+
}, z));
|
|
67
67
|
export {
|
|
68
68
|
re as T
|
|
69
69
|
};
|
package/dist/component/{text-input-field-rac-CgN_2hOD.js → text-input-field-rac-CgWadDfM.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { RicosViewer as m } 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-fhxuPytc.js";
|
|
5
5
|
import { E as o } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
-
import { s as a } from "./field-rac.module-
|
|
7
|
-
import {
|
|
8
|
-
const _ = ({ content:
|
|
9
|
-
content:
|
|
10
|
-
locale:
|
|
6
|
+
import { s as a } from "./field-rac.module-DnUIb9Oh.js";
|
|
7
|
+
import { z as n, P as c, y as E, q as i, j as R } from "./form-element-classes-BSMjWijd.js";
|
|
8
|
+
const _ = ({ content: s, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
9
|
+
content: s,
|
|
10
|
+
locale: l
|
|
11
11
|
}), N = () => /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
12
12
|
className: t(n, a.label)
|
|
13
13
|
}, /* @__PURE__ */ e.createElement(r.Label.Required, {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import t, { useRef as L } from "react";
|
|
2
|
-
import { TextField as R, Input as
|
|
3
|
-
import {
|
|
2
|
+
import { TextField as R, Input as v } from "react-aria-components";
|
|
3
|
+
import { ai as d, af as c, ak as T } from "./form-CtWkUmxc.js";
|
|
4
4
|
import { f as a } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as
|
|
6
|
-
import { L as x } from "./field-label-headless-
|
|
5
|
+
import { D as g, E as h } from "./field-error-headless-D6iejMQP.js";
|
|
6
|
+
import { L as x } from "./field-label-headless-BWLfU3YB.js";
|
|
7
7
|
const e = ({ children: r }) => {
|
|
8
|
-
const { id: s, value: i, onChange: l, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus:
|
|
9
|
-
return /* @__PURE__ */ t.createElement(
|
|
8
|
+
const { id: s, value: i, onChange: l, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: f, FieldLayout: b } = d(), { labelId: E } = c(), I = a(r, e.Label), F = a(r, e.Input), y = a(r, e.Description), D = a(r, e.Error);
|
|
9
|
+
return /* @__PURE__ */ t.createElement(b, {
|
|
10
10
|
fieldId: s,
|
|
11
11
|
renderLabel: () => I,
|
|
12
12
|
renderInput: () => /* @__PURE__ */ t.createElement(R, {
|
|
@@ -18,16 +18,16 @@ const e = ({ children: r }) => {
|
|
|
18
18
|
isRequired: o,
|
|
19
19
|
isInvalid: p,
|
|
20
20
|
onBlur: m,
|
|
21
|
-
onFocus:
|
|
21
|
+
onFocus: f
|
|
22
22
|
}, F),
|
|
23
23
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, D, y)
|
|
24
24
|
});
|
|
25
25
|
}, B = ({ className: r }) => {
|
|
26
26
|
const { id: s, placeholder: i } = d(), { inputId: l, ariaDescribedBy: u } = c(), n = L(null);
|
|
27
|
-
return
|
|
27
|
+
return T(() => {
|
|
28
28
|
var o;
|
|
29
29
|
(o = n.current) == null || o.focus();
|
|
30
|
-
}, s), /* @__PURE__ */ t.createElement(
|
|
30
|
+
}, s), /* @__PURE__ */ t.createElement(v, {
|
|
31
31
|
ref: n,
|
|
32
32
|
id: l,
|
|
33
33
|
"aria-describedby": u,
|
|
@@ -37,8 +37,8 @@ const e = ({ children: r }) => {
|
|
|
37
37
|
};
|
|
38
38
|
e.Label = x;
|
|
39
39
|
e.Input = B;
|
|
40
|
-
e.Description =
|
|
41
|
-
e.Error =
|
|
40
|
+
e.Description = g;
|
|
41
|
+
e.Error = h;
|
|
42
42
|
export {
|
|
43
43
|
e as T
|
|
44
44
|
};
|
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
import e, { useCallback as H, useRef as V, useContext as q } from "react";
|
|
2
|
-
import { RicosViewer as
|
|
2
|
+
import { RicosViewer as k } from "@wix/ricos/viewer";
|
|
3
3
|
import c from "classnames";
|
|
4
|
-
import { parseTime as
|
|
5
|
-
import { TimeField as
|
|
6
|
-
import {
|
|
4
|
+
import { parseTime as v } from "@internationalized/date";
|
|
5
|
+
import { TimeField as x, DateInput as B, DateSegment as h, TimeFieldStateContext as U } from "react-aria-components";
|
|
6
|
+
import { ai as p, af as j, as as T, ak as z } from "./form-CtWkUmxc.js";
|
|
7
7
|
import { f as m, a as F } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { D as
|
|
9
|
-
import { L as J } from "./field-label-headless-
|
|
8
|
+
import { D as Q, E as G } from "./field-error-headless-D6iejMQP.js";
|
|
9
|
+
import { L as J } from "./field-label-headless-BWLfU3YB.js";
|
|
10
10
|
import { E as K } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { H as S } from "./custom-focus-class-_483Pkwp.js";
|
|
12
|
-
import { s as E } from "./field-rac.module-
|
|
13
|
-
import {
|
|
12
|
+
import { s as E } from "./field-rac.module-DnUIb9Oh.js";
|
|
13
|
+
import { z as W, P as X, y as Y, q as Z, j as $ } from "./form-element-classes-BSMjWijd.js";
|
|
14
14
|
const r = ({ children: t }) => {
|
|
15
|
-
const { id: n, value:
|
|
15
|
+
const { id: n, value: l, onChange: o, disabled: i, readOnly: s, required: a, onBlur: d, onFocus: f, use24HourFormat: b, FieldLayout: I, hasError: C } = p(), { inputId: L, ariaDescribedBy: g, labelId: D } = j(), R = H((M) => {
|
|
16
16
|
const w = ae(M);
|
|
17
17
|
o(w);
|
|
18
18
|
}, [
|
|
19
19
|
o
|
|
20
|
-
]),
|
|
20
|
+
]), y = m(t, r.Label), N = m(t, r.Time), P = m(t, r.Description), A = m(t, r.Error), O = ne(l);
|
|
21
21
|
return /* @__PURE__ */ e.createElement(I, {
|
|
22
22
|
fieldId: n,
|
|
23
|
-
renderLabel: () =>
|
|
24
|
-
renderInput: () => /* @__PURE__ */ e.createElement(
|
|
23
|
+
renderLabel: () => y,
|
|
24
|
+
renderInput: () => /* @__PURE__ */ e.createElement(x, {
|
|
25
25
|
"aria-labelledby": D,
|
|
26
26
|
id: L,
|
|
27
27
|
"aria-describedby": g,
|
|
28
28
|
value: O,
|
|
29
29
|
onChange: R,
|
|
30
30
|
isDisabled: i,
|
|
31
|
-
isReadOnly:
|
|
31
|
+
isReadOnly: s,
|
|
32
32
|
isInvalid: C,
|
|
33
33
|
isRequired: a,
|
|
34
34
|
onBlur: d,
|
|
35
35
|
onFocus: f,
|
|
36
36
|
hourCycle: b ? 24 : 12
|
|
37
|
-
},
|
|
37
|
+
}, N),
|
|
38
38
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, A, P)
|
|
39
39
|
});
|
|
40
40
|
}, u = ({ children: t, className: n }) => {
|
|
41
|
-
const { hasError:
|
|
42
|
-
return /* @__PURE__ */ e.createElement(
|
|
41
|
+
const { hasError: l } = p(), o = m(t, u.Hour), i = m(t, u.Minute), s = m(t, u.Period);
|
|
42
|
+
return /* @__PURE__ */ e.createElement(B, {
|
|
43
43
|
className: n,
|
|
44
|
-
"data-invalid":
|
|
44
|
+
"data-invalid": l || void 0
|
|
45
45
|
}, (a) => {
|
|
46
46
|
switch (a.type) {
|
|
47
47
|
case "hour":
|
|
@@ -53,7 +53,7 @@ const r = ({ children: t }) => {
|
|
|
53
53
|
segment: a
|
|
54
54
|
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
55
55
|
case "dayPeriod":
|
|
56
|
-
return F(
|
|
56
|
+
return F(s, {
|
|
57
57
|
segment: a
|
|
58
58
|
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
59
59
|
case "literal":
|
|
@@ -65,12 +65,12 @@ const r = ({ children: t }) => {
|
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
}, ee = ({ className: t, ...n }) => {
|
|
68
|
-
const { id:
|
|
69
|
-
|
|
68
|
+
const { id: l, hidePlaceholder: o } = p(), { segment: i } = n, { t: s } = T(), a = V(null);
|
|
69
|
+
z(() => {
|
|
70
70
|
var f;
|
|
71
71
|
(f = a.current) == null || f.focus();
|
|
72
|
-
},
|
|
73
|
-
const d = o ? void 0 :
|
|
72
|
+
}, l);
|
|
73
|
+
const d = o ? void 0 : s("field.date.placeholder.hour");
|
|
74
74
|
return /* @__PURE__ */ e.createElement(h, {
|
|
75
75
|
ref: a,
|
|
76
76
|
segment: i,
|
|
@@ -80,16 +80,16 @@ const r = ({ children: t }) => {
|
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
}, te = ({ className: t, ...n }) => {
|
|
83
|
-
const { hidePlaceholder:
|
|
83
|
+
const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = T(), s = l ? void 0 : i("field.date.placeholder.minute");
|
|
84
84
|
return /* @__PURE__ */ e.createElement(h, {
|
|
85
85
|
segment: o,
|
|
86
86
|
className: t,
|
|
87
|
-
...
|
|
88
|
-
placeholder:
|
|
87
|
+
...s && {
|
|
88
|
+
placeholder: s
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
}, re = ({ className: t, ...n }) => {
|
|
92
|
-
const { hidePlaceholder:
|
|
92
|
+
const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = T(), s = q(U), a = l ? void 0 : i("field.date.placeholder.period"), d = () => s == null ? void 0 : s.increment("dayPeriod");
|
|
93
93
|
return /* @__PURE__ */ e.createElement(h, {
|
|
94
94
|
segment: o,
|
|
95
95
|
className: t,
|
|
@@ -104,13 +104,13 @@ u.Minute = te;
|
|
|
104
104
|
u.Period = re;
|
|
105
105
|
r.Label = J;
|
|
106
106
|
r.Time = u;
|
|
107
|
-
r.Description =
|
|
107
|
+
r.Description = Q;
|
|
108
108
|
r.Error = G;
|
|
109
109
|
function ne(t) {
|
|
110
110
|
if (!t)
|
|
111
111
|
return null;
|
|
112
112
|
try {
|
|
113
|
-
return
|
|
113
|
+
return v(t);
|
|
114
114
|
} catch {
|
|
115
115
|
return null;
|
|
116
116
|
}
|
|
@@ -118,19 +118,19 @@ function ne(t) {
|
|
|
118
118
|
function ae(t) {
|
|
119
119
|
if (!t)
|
|
120
120
|
return null;
|
|
121
|
-
const n = String(t.hour).padStart(2, "0"),
|
|
121
|
+
const n = String(t.hour).padStart(2, "0"), l = String(t.minute).padStart(2, "0"), o = String(t.second).padStart(2, "0");
|
|
122
122
|
return [
|
|
123
123
|
n,
|
|
124
|
-
|
|
124
|
+
l,
|
|
125
125
|
o
|
|
126
126
|
].join(":");
|
|
127
127
|
}
|
|
128
|
-
const oe = "_time_1wbmw_1",
|
|
128
|
+
const oe = "_time_1wbmw_1", se = "_hour_1wbmw_14", le = "_minute_1wbmw_15", ie = "_period_1wbmw_16", _ = {
|
|
129
129
|
time: oe,
|
|
130
|
-
hour:
|
|
131
|
-
minute:
|
|
130
|
+
hour: se,
|
|
131
|
+
minute: le,
|
|
132
132
|
period: ie
|
|
133
|
-
}, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(
|
|
133
|
+
}, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(k, {
|
|
134
134
|
content: t,
|
|
135
135
|
locale: n
|
|
136
136
|
}), me = () => /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as O } from "@wix/ricos/viewer";
|
|
2
2
|
import l from "classnames";
|
|
3
|
-
import r, { useCallback as
|
|
4
|
-
import { TextField as
|
|
5
|
-
import {
|
|
3
|
+
import r, { useCallback as h, useRef as y } from "react";
|
|
4
|
+
import { TextField as N, Input as A } from "react-aria-components";
|
|
5
|
+
import { ai as E, af as d, ak as P } from "./form-CtWkUmxc.js";
|
|
6
6
|
import { f as u } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as
|
|
8
|
-
import { L as
|
|
9
|
-
import { u as
|
|
7
|
+
import { D as k, E as B } from "./field-error-headless-D6iejMQP.js";
|
|
8
|
+
import { L as M } from "./field-label-headless-BWLfU3YB.js";
|
|
9
|
+
import { u as T } from "./use-invoke-callback-UH73A_J3.js";
|
|
10
10
|
import { E as q } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
-
import { s } from "./field-rac.module-
|
|
12
|
-
import {
|
|
13
|
-
const
|
|
14
|
-
const { id: o, value: n, onChange: a, disabled: m, readOnly: i, required: c, hasError: I, onBlur: f, onFocus: F, FieldLayout: L } = E(), { labelId: R } = d(), p =
|
|
15
|
-
a(
|
|
11
|
+
import { s } from "./field-rac.module-DnUIb9Oh.js";
|
|
12
|
+
import { z as v, P as U, y as g, q as x, j as w } from "./form-element-classes-BSMjWijd.js";
|
|
13
|
+
const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
|
|
14
|
+
const { id: o, value: n, onChange: a, disabled: m, readOnly: i, required: c, hasError: I, onBlur: f, onFocus: F, FieldLayout: L } = E(), { labelId: R } = d(), p = T(f), b = u(t, e.Label), D = u(t, e.Input), _ = u(t, e.Description), C = u(t, e.Error), S = h(() => {
|
|
15
|
+
a(V(n)), p();
|
|
16
16
|
}, [
|
|
17
17
|
p,
|
|
18
18
|
a,
|
|
@@ -21,7 +21,7 @@ const H = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
|
|
|
21
21
|
return /* @__PURE__ */ r.createElement(L, {
|
|
22
22
|
fieldId: o,
|
|
23
23
|
renderLabel: () => b,
|
|
24
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
24
|
+
renderInput: () => /* @__PURE__ */ r.createElement(N, {
|
|
25
25
|
"aria-labelledby": R,
|
|
26
26
|
value: n ?? "",
|
|
27
27
|
onChange: a,
|
|
@@ -34,9 +34,9 @@ const H = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
|
|
|
34
34
|
}, D),
|
|
35
35
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, C, _)
|
|
36
36
|
});
|
|
37
|
-
},
|
|
38
|
-
const { id: o, placeholder: n } = E(), { inputId: a, ariaDescribedBy: m } = d(), i =
|
|
39
|
-
return
|
|
37
|
+
}, W = ({ className: t }) => {
|
|
38
|
+
const { id: o, placeholder: n } = E(), { inputId: a, ariaDescribedBy: m } = d(), i = y(null);
|
|
39
|
+
return P(() => {
|
|
40
40
|
var c;
|
|
41
41
|
(c = i.current) == null || c.focus();
|
|
42
42
|
}, o), /* @__PURE__ */ r.createElement(A, {
|
|
@@ -48,11 +48,11 @@ const H = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
|
|
|
48
48
|
placeholder: n
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
e.Label =
|
|
52
|
-
e.Input =
|
|
53
|
-
e.Description =
|
|
54
|
-
e.Error =
|
|
55
|
-
const
|
|
51
|
+
e.Label = M;
|
|
52
|
+
e.Input = W;
|
|
53
|
+
e.Description = k;
|
|
54
|
+
e.Error = B;
|
|
55
|
+
const $ = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(O, {
|
|
56
56
|
content: t,
|
|
57
57
|
locale: o
|
|
58
58
|
}), te = () => /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
@@ -65,7 +65,7 @@ const W = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(h, {
|
|
|
65
65
|
className: l(x, s.error)
|
|
66
66
|
}, /* @__PURE__ */ r.createElement(q, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
67
67
|
className: l(w, s.description)
|
|
68
|
-
},
|
|
68
|
+
}, $));
|
|
69
69
|
export {
|
|
70
70
|
te as U
|
|
71
71
|
};
|
package/dist/component/{use-service-options-base-Ci9gIluo.js → use-service-options-base-CYAEJ75H.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState as o, useCallback as D, useEffect as m, useMemo as b } from "react";
|
|
2
|
-
import {
|
|
3
|
-
const k = (
|
|
4
|
-
const { fieldType:
|
|
2
|
+
import { ah as v } from "./form-CtWkUmxc.js";
|
|
3
|
+
const k = (h) => {
|
|
4
|
+
const { fieldType: I, isEditor: t = !1, postProcessOptions: i, customFetchLogic: a, onInitialDataLoaded: n } = h, [L, O] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(I), r = D((e) => {
|
|
5
5
|
let d = e.map((l) => ({
|
|
6
6
|
value: l.id ?? "",
|
|
7
7
|
label: l.name ?? "",
|
|
@@ -31,12 +31,12 @@ const k = (I) => {
|
|
|
31
31
|
c
|
|
32
32
|
]);
|
|
33
33
|
return {
|
|
34
|
-
isLoading:
|
|
35
|
-
options:
|
|
34
|
+
isLoading: L,
|
|
35
|
+
options: g,
|
|
36
36
|
isEmpty: E,
|
|
37
37
|
hasInitialDataLoaded: c,
|
|
38
38
|
shouldRender: y,
|
|
39
|
-
setIsLoading:
|
|
39
|
+
setIsLoading: O,
|
|
40
40
|
setOptions: p,
|
|
41
41
|
setIsEmpty: u,
|
|
42
42
|
setHasInitialDataLoaded: f,
|
package/dist/form.d.ts
CHANGED
|
@@ -6907,11 +6907,13 @@ type FormHandle = {
|
|
|
6907
6907
|
validateStep?: (stepId: string) => Promise<boolean>;
|
|
6908
6908
|
getValues?: () => FormValues;
|
|
6909
6909
|
};
|
|
6910
|
+
type ElementProps = Record<string, unknown>;
|
|
6910
6911
|
type FormProps = {
|
|
6911
6912
|
id?: string;
|
|
6912
6913
|
className?: string;
|
|
6913
6914
|
compId?: string;
|
|
6914
6915
|
form?: FormSchema;
|
|
6916
|
+
elementProps?: ElementProps;
|
|
6915
6917
|
values: FormValues;
|
|
6916
6918
|
onChange: (values: FormValues) => void;
|
|
6917
6919
|
errors: ValidationError[];
|
|
@@ -6927,4 +6929,4 @@ declare const defaultProps: {};
|
|
|
6927
6929
|
declare const Form: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<FormHandle>>;
|
|
6928
6930
|
|
|
6929
6931
|
export { Form as default, defaultProps };
|
|
6930
|
-
export type { FormHandle, FormProps, FormSchema, FormSubmission, FormValue, FormValues, ValidationError };
|
|
6932
|
+
export type { ElementProps, FormHandle, FormProps, FormSchema, FormSubmission, FormValue, FormValues, ValidationError };
|