@wix/form-elements 1.166.0 → 1.167.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-BXpWILhi.js → appointment-rac-BbXyKTd7.js} +72 -72
- package/dist/component/{bookings-address-rac-Cf--TgsR.js → bookings-address-rac-VJkR_U9L.js} +1 -1
- package/dist/component/{bookings-email-rac-BtB8owOl.js → bookings-email-rac-_EupwXpQ.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CBFDjB_k.js → bookings-first-name-rac-DTZixHYj.js} +1 -1
- package/dist/component/{bookings-header-rac-CrJORcuL.js → bookings-header-rac-BKbKTv5g.js} +1 -1
- package/dist/component/{bookings-last-name-rac-erG4ldFt.js → bookings-last-name-rac-BDy860-C.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-Di4qLQUH.js → bookings-login-bar-rac-DgNP-YNZ.js} +5 -5
- package/dist/component/{bookings-phone-rac-DdM48Obh.js → bookings-phone-rac-B_I6n96b.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-Cl8zOiU1.js → bookings-rich-text-rac-prYPbIiz.js} +1 -1
- package/dist/component/{checkbox-field-rac-CzIDF6aj.js → checkbox-field-rac-C-4PXuxG.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-B8tsQCwV.js → checkbox-group-field-headless-D16bAcaq.js} +35 -35
- package/dist/component/{checkbox-group-field-rac-h02K8CPA.js → checkbox-group-field-rac-GUQ5dO_s.js} +4 -4
- package/dist/component/{checkbox-group-rac-GfebLnuS.js → checkbox-group-rac-Bl6xL5-H.js} +1 -1
- package/dist/component/{checkbox-rac-Dn24U4oG.js → checkbox-rac-Blg0KVyP.js} +1 -1
- package/dist/component/{contacts-address-rac-CtVtIwOV.js → contacts-address-rac-BfOhCAj8.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-CK2odpbJ.js → contacts-birthdate-rac-DYBvDh62.js} +1 -1
- package/dist/component/{contacts-company-rac-ue8vAn9A.js → contacts-company-rac-DIJr7zjA.js} +1 -1
- package/dist/component/{contacts-email-rac-lleErjYl.js → contacts-email-rac-DjmqELhC.js} +1 -1
- package/dist/component/{contacts-first-name-rac-D5wtz4Z1.js → contacts-first-name-rac-DGNll7gw.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Cj9GKWBY.js → contacts-last-name-rac-BJ8AZYQN.js} +1 -1
- package/dist/component/{contacts-phone-rac-BP6unckw.js → contacts-phone-rac-BC-QtpEN.js} +1 -1
- package/dist/component/{contacts-position-rac-XjUdZglr.js → contacts-position-rac-BQia__74.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-Dnpbgw5C.js → contacts-subscribe-rac-CTFptz01.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-pNFMOZl6.js → contacts-tax-id-rac-Cy72Jouc.js} +1 -1
- package/dist/component/{date-availability-BRA7k6ep.js → date-availability-BC6updcS.js} +1 -1
- package/dist/component/{date-input-field-rac-B15XH-D_.js → date-input-field-rac-b_T1yf8D.js} +38 -38
- package/dist/component/{date-input-rac-B7XvsFeB.js → date-input-rac-KkRyWRP_.js} +1 -1
- package/dist/component/{date-picker-field-rac-BNgKcgVi.js → date-picker-field-rac-BLWVJbTJ.js} +6 -6
- package/dist/component/{date-picker-rac-P54cHP86.js → date-picker-rac-DKCQza7v.js} +1 -1
- package/dist/component/{date-time-input-field-rac-Dt-jUznP.js → date-time-input-field-rac-CZxZW6fz.js} +45 -45
- package/dist/component/{date-time-input-rac-DHmOLCvg.js → date-time-input-rac-DQ-iBwmr.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-Bo2ZRcJc.js → dext-checkbox-group-rac-kp1Jbwt-.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BdA2i9PR.js → dext-checkbox-rac-CBm9cRUz.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BME9ZDFy.js → dext-date-picker-rac-DsVKWsRy.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-owEU8r5-.js → dext-date-time-input-rac-CO26-8Qo.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BAeN43fo.js → dext-dropdown-rac-eRzu2C-y.js} +1 -1
- package/dist/component/{dext-email-rac-D7HBfCis.js → dext-email-rac-DDrZzE_G.js} +1 -1
- package/dist/component/{dext-number-input-rac-DEB2ji5S.js → dext-number-input-rac-Dj7sInLk.js} +1 -1
- package/dist/component/{dext-phone-rac-TOfFCmhD.js → dext-phone-rac-g8M77F7m.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DGsQLres.js → dext-radio-group-rac-BjhygC0R.js} +2 -2
- package/dist/component/{dext-rating-input-rac-CFcRQeE7.js → dext-rating-input-rac-BraNjvyA.js} +1 -1
- package/dist/component/{dext-tags-rac-CGsaKVfb.js → dext-tags-rac-B5mAIuDi.js} +2 -2
- package/dist/component/{dext-text-area-rac-BqbLXOdt.js → dext-text-area-rac-D_YBnaWi.js} +1 -1
- package/dist/component/{dext-text-input-rac-CpXfQV53.js → dext-text-input-rac-BzeWH1jv.js} +1 -1
- package/dist/component/{dext-url-input-rac-Bbm3_OG9.js → dext-url-input-rac-Cn0h_vx3.js} +1 -1
- package/dist/component/{donation-rac-DvBAOz6H.js → donation-rac-CQRdHxWh.js} +46 -46
- package/dist/component/{dropdown-field-rac-BW0UDoBO.js → dropdown-field-rac-C7LL0W5Z.js} +3 -3
- package/dist/component/{dropdown-rac-B6ZD6Qgb.js → dropdown-rac-Nb2VyJ0x.js} +1 -1
- package/dist/component/{ecom-address-rac-Dnv9Yswd.js → ecom-address-rac-_c2YIIwg.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BVqvUwn4.js → ecom-subscription-checkbox-rac-Bma7TAVj.js} +2 -2
- package/dist/component/{email-input-field-rac-CuaMcfZR.js → email-input-field-rac-2E2tEaS5.js} +47 -47
- package/dist/component/events-repeater-rac-COWHYBFD.js +280 -0
- package/dist/component/{events-rsvp-rac-D4hSrIsE.js → events-rsvp-rac-CXp8j19Y.js} +3 -3
- package/dist/component/{field-error-headless-NGaTm3dF.js → field-error-headless-S-ugOQQX.js} +7 -7
- package/dist/component/{field-label-headless-Bx1UjEcp.js → field-label-headless-_n4I0_tX.js} +14 -14
- package/dist/component/{file-upload-rac-oOnemmUg.js → file-upload-rac-DCH_iwDg.js} +79 -79
- package/dist/component/{fixed-payment-rac-C9YkIvQO.js → fixed-payment-rac-CYkKJUfM.js} +14 -14
- package/dist/component/{form-sH9m0ReT.js → form-jK8ezTss.js} +1110 -1109
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-N5Oclne_.js → header-field-rac-DnbjI6W5.js} +6 -6
- package/dist/component/{header-rac-CTmSJdoY.js → header-rac-DKUICrni.js} +1 -1
- package/dist/component/{image-choice-rac-BYZ61yof.js → image-choice-rac-B_9ponST.js} +4 -4
- package/dist/component/{index-B56GTN_5.js → index-BxdMzOvN.js} +68 -68
- package/dist/component/{index-SHZx7XzS.js → index-ZYnsxY-a.js} +2 -2
- package/dist/component/{isObjectLike-BFpR7Q-o.js → isObjectLike-BW-9QEQl.js} +9 -9
- package/dist/component/{multiline-address-field-rac-DvMyN2gF.js → multiline-address-field-rac-k-P0ijWG.js} +40 -40
- package/dist/component/{multiline-address-rac-Cfv0QzzV.js → multiline-address-rac-Bbn9mNDa.js} +1 -1
- package/dist/component/{number-input-field-rac-CWQw7p2k.js → number-input-field-rac--lom-B_X.js} +7 -7
- package/dist/component/{number-input-rac-DJ2Nh9Vm.js → number-input-rac-Bhbd6T9S.js} +1 -1
- package/dist/component/{password-rac-ayoa5FQV.js → password-rac-BV_uTHb3.js} +14 -14
- package/dist/component/{payment-input-rac-CBjP_xjz.js → payment-input-rac-cawyGN_t.js} +28 -28
- package/dist/component/{phone-input-field-rac-BWOEiUK7.js → phone-input-field-rac-CsElHRto.js} +67 -67
- package/dist/component/{phone-rac-Dp7FouV3.js → phone-rac-XrHN5Nko.js} +1 -1
- package/dist/component/{product-list-rac-D_EoPXl-.js → product-list-rac-cxv_xz7K.js} +30 -30
- package/dist/component/{quiz-radio-group-rac-RWM0riuU.js → quiz-radio-group-rac-DGaxOPE1.js} +1 -1
- package/dist/component/{radio-button-module-classes-nK-xhmxh.js → radio-button-module-classes-Xv2Jn01x.js} +21 -21
- package/dist/component/{radio-group-field-rac-Cc-pvwZn.js → radio-group-field-rac-DgGqgTql.js} +4 -4
- package/dist/component/{radio-group-rac-xvesuLSn.js → radio-group-rac-Bh0E-oe1.js} +1 -1
- package/dist/component/{rating-input-field-rac-BgMRUXQy.js → rating-input-field-rac-C3YLV971.js} +10 -10
- package/dist/component/{rating-input-rac-CeZtJR2S.js → rating-input-rac-CfcC5EUh.js} +1 -1
- package/dist/component/{rich-content-rac.module-Cv7PIbmM.js → rich-content-rac.module-DUjzLGtX.js} +5 -5
- package/dist/component/{rich-text-field-rac-CmbNBe2u.js → rich-text-field-rac-BmguoJhk.js} +5 -5
- package/dist/component/{rich-text-rac-9hwPCQXl.js → rich-text-rac-BWhHcq25.js} +1 -1
- package/dist/component/{service-dropdown-rac-2Wjgmo75.js → service-dropdown-rac-C5oX-ql7.js} +30 -30
- package/dist/component/{services-multi-choice-rac-cZ7elBhc.js → services-multi-choice-rac-C1fem9NB.js} +12 -12
- package/dist/component/{signature-rac-BfE2328G.js → signature-rac-BtHqiWj1.js} +62 -62
- package/dist/component/{submit-button-rac-oYO7pska.js → submit-button-rac-OYeKJFF8.js} +39 -39
- package/dist/component/{tags-field-rac-B-_LzCFU.js → tags-field-rac-kA2RSijL.js} +37 -37
- package/dist/component/{tags-rac-D5bRM462.js → tags-rac-B_2qCZGu.js} +1 -1
- package/dist/component/{text-area-field-rac-fwtICvjX.js → text-area-field-rac-DeO609Mv.js} +17 -17
- package/dist/component/{text-area-rac-C4EkhfB5.js → text-area-rac-BAQFBOZd.js} +1 -1
- package/dist/component/{text-input-field-rac-CxZYUtxX.js → text-input-field-rac-CCcKwuLZ.js} +3 -3
- package/dist/component/{text-input-headless-DK5wBGBb.js → text-input-headless-D8-jkaYm.js} +8 -8
- package/dist/component/{text-input-rac-FS49SxCK.js → text-input-rac-BVcgjj8g.js} +1 -1
- package/dist/component/{time-input-rac-CDUVS7kp.js → time-input-rac-BYctyHgU.js} +11 -11
- package/dist/component/{url-input-field-rac-B2ypvh7T.js → url-input-field-rac-COC9qgcs.js} +23 -23
- package/dist/component/{url-input-rac-DbJx2T1R.js → url-input-rac-BZXLh0Ej.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-0ZlT4g7h.js → use-dropdown-option-class-name-BTltqRl1.js} +2 -2
- package/dist/component/use-dropdown-trigger-class-name-BjJZfl3i.js +98 -0
- package/dist/component/{use-element-state-class-name-DCAoZgWT.js → use-element-state-class-name-CkT6Ga8t.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-BvP8fzTQ.js → use-hoverable-input-class-name-BkoSr6tr.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-B-eR29aQ.js → use-is-forced-open-dropdown-fo_NCnSk.js} +1 -1
- package/dist/component/{use-service-options-base-BF_peAsS.js → use-service-options-base-Wp8RZ4Z8.js} +1 -1
- package/dist/component/use-text-input-class-name-DS7i03Gk.js +6 -0
- package/package.json +2 -2
- package/dist/component/events-repeater-rac-CNsh8NRh.js +0 -271
- package/dist/component/use-dropdown-trigger-class-name-PItHRYWo.js +0 -96
- package/dist/component/use-text-input-class-name-CQf8yep5.js +0 -6
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { RicosViewer as j } from "@wix/ricos/viewer";
|
|
2
|
-
import
|
|
3
|
-
import t, { useMemo as I, useState as w, useRef as V, useLayoutEffect as z, useCallback as
|
|
2
|
+
import _ from "classnames";
|
|
3
|
+
import t, { useMemo as I, useState as w, useRef as V, useLayoutEffect as z, useCallback as N } from "react";
|
|
4
4
|
import { CheckboxGroup as B, TextField as J, Input as X, CheckboxField as Y, CheckboxButton as Z } from "react-aria-components";
|
|
5
|
-
import {
|
|
6
|
-
import { f as O, a as
|
|
7
|
-
import { E as W, D as H } from "./field-error-headless-
|
|
8
|
-
import { L as $ } from "./field-label-headless-
|
|
5
|
+
import { bD as v, bA as M, bN as S, bF as U, U as ee, af as te, ap as oe, K as ne, G as ae, aq as re } from "./form-jK8ezTss.js";
|
|
6
|
+
import { f as O, a as k } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { E as W, D as H } from "./field-error-headless-S-ugOQQX.js";
|
|
8
|
+
import { L as $ } from "./field-label-headless-_n4I0_tX.js";
|
|
9
9
|
import { F as se } from "./fieldset-headless-CD3fds9J.js";
|
|
10
10
|
import { E as le } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s as y } from "./field-rac.module-ts2t4WUO.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-CkT6Ga8t.js";
|
|
13
|
+
import { u as ce } from "./use-text-input-class-name-DS7i03Gk.js";
|
|
14
14
|
var ue = /* @__PURE__ */ (function(e) {
|
|
15
15
|
return e[e.FREE_FLOW = 0] = "FREE_FLOW", e[e.ONE = 1] = "ONE", e[e.TWO = 2] = "TWO", e[e.THREE = 3] = "THREE", e;
|
|
16
16
|
})({});
|
|
17
17
|
const R = "Other", de = (e, o) => {
|
|
18
18
|
const i = o.length + 2;
|
|
19
19
|
return (e.find((l) => l.startsWith(`${o}: `)) || "").slice(i);
|
|
20
|
-
}, me = (e) => e.map((o) => o.value ?? o.label),
|
|
20
|
+
}, me = (e) => e.map((o) => o.value ?? o.label), q = ({ className: e, ...o }) => {
|
|
21
21
|
const { label: r } = o;
|
|
22
22
|
return /* @__PURE__ */ t.createElement("span", {
|
|
23
23
|
className: e
|
|
24
24
|
}, r);
|
|
25
|
-
},
|
|
26
|
-
const { value: o, onChange: r, addOtherLabel: i, addOtherPlaceholder: s, otherInputCharacterLimit: l, disabled: u, readOnly: m, hasError: d } =
|
|
25
|
+
}, P = ({ className: e }) => {
|
|
26
|
+
const { value: o, onChange: r, addOtherLabel: i, addOtherPlaceholder: s, otherInputCharacterLimit: l, disabled: u, readOnly: m, hasError: d } = v(), { t: p } = S(), n = i || p("add-other.default-other-option-label") || R, b = I(() => de(o || [], n), [
|
|
27
27
|
o,
|
|
28
28
|
n
|
|
29
29
|
]), [c, L] = w(b), f = V(r);
|
|
30
30
|
z(() => {
|
|
31
31
|
f.current = r;
|
|
32
32
|
});
|
|
33
|
-
const g =
|
|
33
|
+
const g = N((h) => {
|
|
34
34
|
L(h);
|
|
35
|
-
const C = (o || []).filter((E) => !E.startsWith(`${n}:`) && E !== n),
|
|
35
|
+
const C = (o || []).filter((E) => !E.startsWith(`${n}:`) && E !== n), F = h ? `${n}: ${h}` : n;
|
|
36
36
|
f.current([
|
|
37
37
|
...C,
|
|
38
|
-
|
|
38
|
+
F
|
|
39
39
|
]);
|
|
40
40
|
}, [
|
|
41
41
|
o,
|
|
@@ -56,21 +56,21 @@ const R = "Other", de = (e, o) => {
|
|
|
56
56
|
className: e
|
|
57
57
|
}));
|
|
58
58
|
}, T = ({ children: e, className: o, ...r }) => {
|
|
59
|
-
const { value: i, label: s, isOther: l, isFirstOption: u } = r, { id: m, value: d, onChange: p, options: n, disabled: b, readOnly: c, hasError: L } =
|
|
59
|
+
const { value: i, label: s, isOther: l, isFirstOption: u } = r, { id: m, value: d, onChange: p, options: n, disabled: b, readOnly: c, hasError: L } = v(), f = V(null);
|
|
60
60
|
U(() => {
|
|
61
61
|
var E;
|
|
62
62
|
u && ((E = f.current) == null || E.focus({
|
|
63
63
|
preventScroll: !0
|
|
64
64
|
}));
|
|
65
65
|
}, m);
|
|
66
|
-
const g = O(e,
|
|
66
|
+
const g = O(e, q), h = I(() => d || [], [
|
|
67
67
|
d
|
|
68
68
|
]), C = I(() => l ? h.find((E) => E === s || E.startsWith(`${s}: `)) || s : i, [
|
|
69
69
|
l,
|
|
70
70
|
h,
|
|
71
71
|
s,
|
|
72
72
|
i
|
|
73
|
-
]),
|
|
73
|
+
]), F = N((E) => {
|
|
74
74
|
const K = me(n || []), A = h.filter((Q) => K.includes(Q));
|
|
75
75
|
p(E ? [
|
|
76
76
|
...A,
|
|
@@ -85,21 +85,21 @@ const R = "Other", de = (e, o) => {
|
|
|
85
85
|
return /* @__PURE__ */ t.createElement(Y, {
|
|
86
86
|
inputRef: f,
|
|
87
87
|
value: C,
|
|
88
|
-
onChange: l ?
|
|
88
|
+
onChange: l ? F : void 0,
|
|
89
89
|
isDisabled: b,
|
|
90
90
|
isReadOnly: c,
|
|
91
91
|
isInvalid: L
|
|
92
92
|
}, /* @__PURE__ */ t.createElement(Z, {
|
|
93
93
|
className: o,
|
|
94
94
|
"data-hook": `tags-${l ? R : i}`
|
|
95
|
-
},
|
|
95
|
+
}, k(g, {
|
|
96
96
|
value: i,
|
|
97
97
|
label: s,
|
|
98
98
|
isOther: l,
|
|
99
99
|
isFirstOption: u
|
|
100
100
|
})));
|
|
101
101
|
}, x = ({ children: e, className: o }) => {
|
|
102
|
-
const { options: r, addOther: i, addOtherLabel: s, numberOfColumns: l = ue.FREE_FLOW } =
|
|
102
|
+
const { options: r, addOther: i, addOtherLabel: s, numberOfColumns: l = ue.FREE_FLOW } = v(), { t: u } = S(), m = s || u("add-other.default-other-option-label") || R, d = O(e, T), p = I(() => {
|
|
103
103
|
const n = r || [];
|
|
104
104
|
return i ? [
|
|
105
105
|
...n,
|
|
@@ -119,7 +119,7 @@ const R = "Other", de = (e, o) => {
|
|
|
119
119
|
"data-columns": l
|
|
120
120
|
}, p.map((n, b) => {
|
|
121
121
|
const c = n.value ?? n.label;
|
|
122
|
-
return
|
|
122
|
+
return k(d, {
|
|
123
123
|
key: n.isOther ? R : c,
|
|
124
124
|
value: c,
|
|
125
125
|
label: n.label,
|
|
@@ -128,7 +128,7 @@ const R = "Other", de = (e, o) => {
|
|
|
128
128
|
});
|
|
129
129
|
}));
|
|
130
130
|
}, G = ({ children: e, className: o }) => {
|
|
131
|
-
const { addOther: r, addOtherLabel: i, hasError: s, readOnly: l, value: u } =
|
|
131
|
+
const { addOther: r, addOtherLabel: i, hasError: s, readOnly: l, value: u } = v(), { t: m } = S(), d = i || m("add-other.default-other-option-label") || R, p = O(e, x), n = O(e, P), b = I(() => !r || !u ? !1 : u.some((c) => c === d || c.startsWith(`${d}:`)), [
|
|
132
132
|
r,
|
|
133
133
|
u,
|
|
134
134
|
d
|
|
@@ -139,9 +139,9 @@ const R = "Other", de = (e, o) => {
|
|
|
139
139
|
"data-readonly": l
|
|
140
140
|
}, p, b && n);
|
|
141
141
|
}, a = ({ children: e }) => {
|
|
142
|
-
const { id: o, value: r, onChange: i, FieldLayout: s, required: l, disabled: u, readOnly: m, hasError: d, onBlur: p, onFocus: n } =
|
|
142
|
+
const { id: o, value: r, onChange: i, FieldLayout: s, required: l, disabled: u, readOnly: m, hasError: d, onBlur: p, onFocus: n } = v(), { inputId: b, labelId: c, ariaDescribedBy: L } = M(), f = I(() => r || [], [
|
|
143
143
|
r
|
|
144
|
-
]), g = O(e, $), h = O(e, G), C = O(e, H),
|
|
144
|
+
]), g = O(e, $), h = O(e, G), C = O(e, H), F = O(e, W);
|
|
145
145
|
return /* @__PURE__ */ t.createElement(s, {
|
|
146
146
|
fieldId: o,
|
|
147
147
|
renderLabel: () => g,
|
|
@@ -161,18 +161,18 @@ const R = "Other", de = (e, o) => {
|
|
|
161
161
|
isRequired: l,
|
|
162
162
|
isInvalid: d
|
|
163
163
|
}, h)),
|
|
164
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null,
|
|
164
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, F, C)
|
|
165
165
|
});
|
|
166
166
|
};
|
|
167
167
|
x.Option = T;
|
|
168
|
-
T.Label =
|
|
168
|
+
T.Label = q;
|
|
169
169
|
a.Label = $;
|
|
170
170
|
a.Control = G;
|
|
171
171
|
a.Options = x;
|
|
172
|
-
a.OtherInput =
|
|
172
|
+
a.OtherInput = P;
|
|
173
173
|
a.Description = H;
|
|
174
174
|
a.Error = W;
|
|
175
|
-
const pe = "_control_hoxuh_1", he = "_options_hoxuh_7", Ee = "_option_hoxuh_7", be = "_optionHover_hoxuh_76", Oe = "_optionSelected_hoxuh_76",
|
|
175
|
+
const pe = "_control_hoxuh_1", he = "_options_hoxuh_7", Ee = "_option_hoxuh_7", be = "_optionHover_hoxuh_76", Oe = "_optionSelected_hoxuh_76", D = {
|
|
176
176
|
control: pe,
|
|
177
177
|
options: he,
|
|
178
178
|
option: Ee,
|
|
@@ -182,30 +182,30 @@ const pe = "_control_hoxuh_1", he = "_options_hoxuh_7", Ee = "_option_hoxuh_7",
|
|
|
182
182
|
content: e,
|
|
183
183
|
locale: o
|
|
184
184
|
}), Ie = {
|
|
185
|
-
base:
|
|
186
|
-
selected:
|
|
187
|
-
hover:
|
|
185
|
+
base: D.option,
|
|
186
|
+
selected: D.optionSelected,
|
|
187
|
+
hover: D.optionHover
|
|
188
188
|
}, Ve = () => {
|
|
189
189
|
const e = ie({
|
|
190
190
|
globalClasses: re,
|
|
191
191
|
moduleClasses: Ie
|
|
192
192
|
}), o = ce();
|
|
193
193
|
return /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
|
|
194
|
-
className:
|
|
194
|
+
className: _(ee, y.label)
|
|
195
195
|
}, /* @__PURE__ */ t.createElement(a.Label.Required, {
|
|
196
|
-
className:
|
|
196
|
+
className: _(te, y.requiredMark)
|
|
197
197
|
})), /* @__PURE__ */ t.createElement(a.Control, {
|
|
198
|
-
className:
|
|
198
|
+
className: D.control
|
|
199
199
|
}, /* @__PURE__ */ t.createElement(a.Options, {
|
|
200
|
-
className:
|
|
200
|
+
className: _(oe, D.options)
|
|
201
201
|
}, /* @__PURE__ */ t.createElement(a.Options.Option, {
|
|
202
202
|
className: e
|
|
203
203
|
}, /* @__PURE__ */ t.createElement(a.Options.Option.Label, null))), /* @__PURE__ */ t.createElement(a.OtherInput, {
|
|
204
204
|
className: o
|
|
205
205
|
})), /* @__PURE__ */ t.createElement(a.Error, {
|
|
206
|
-
className:
|
|
206
|
+
className: _(ne, y.error)
|
|
207
207
|
}, /* @__PURE__ */ t.createElement(le, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)), /* @__PURE__ */ t.createElement(a.Description, {
|
|
208
|
-
className:
|
|
208
|
+
className: _(ae, y.description)
|
|
209
209
|
}, fe));
|
|
210
210
|
};
|
|
211
211
|
export {
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
2
2
|
import o from "classnames";
|
|
3
3
|
import r, { useCallback as S, useRef as T } from "react";
|
|
4
|
-
import { TextField as
|
|
5
|
-
import {
|
|
4
|
+
import { TextField as O, TextArea as y } from "react-aria-components";
|
|
5
|
+
import { bD as p, bA as d, bF as x, U as g, af as h, K as v, G as M } from "./form-jK8ezTss.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-S-ugOQQX.js";
|
|
8
|
+
import { L as k } from "./field-label-headless-_n4I0_tX.js";
|
|
9
9
|
import { E as P } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { s as c } from "./field-rac.module-ts2t4WUO.js";
|
|
11
|
-
import { u as U } from "./use-text-input-class-name-
|
|
11
|
+
import { u as U } from "./use-text-input-class-name-DS7i03Gk.js";
|
|
12
12
|
const e = ({ children: t }) => {
|
|
13
|
-
const { id: a, value: m, onChange: s, disabled: u, required: n, readOnly: l, onBlur: E, onFocus: b, FieldLayout:
|
|
13
|
+
const { id: a, value: m, onChange: s, disabled: u, required: n, readOnly: l, onBlur: E, onFocus: b, FieldLayout: f, hasError: I } = p(), { labelId: F } = d(), D = S((A) => {
|
|
14
14
|
s(A);
|
|
15
15
|
}, [
|
|
16
16
|
s
|
|
17
|
-
]),
|
|
18
|
-
return /* @__PURE__ */ r.createElement(
|
|
17
|
+
]), L = i(t, e.Label), R = i(t, e.Input), _ = i(t, e.Description), C = i(t, e.Error);
|
|
18
|
+
return /* @__PURE__ */ r.createElement(f, {
|
|
19
19
|
fieldId: a,
|
|
20
|
-
renderLabel: () =>
|
|
21
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
20
|
+
renderLabel: () => L,
|
|
21
|
+
renderInput: () => /* @__PURE__ */ r.createElement(O, {
|
|
22
22
|
"aria-labelledby": F,
|
|
23
23
|
value: m ?? "",
|
|
24
|
-
onChange:
|
|
24
|
+
onChange: D,
|
|
25
25
|
isDisabled: u,
|
|
26
26
|
isReadOnly: l,
|
|
27
27
|
isRequired: n,
|
|
28
|
-
isInvalid:
|
|
28
|
+
isInvalid: I,
|
|
29
29
|
onBlur: E,
|
|
30
30
|
onFocus: b
|
|
31
|
-
},
|
|
31
|
+
}, R),
|
|
32
32
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, C, _)
|
|
33
33
|
});
|
|
34
34
|
}, V = ({ className: t }) => {
|
|
@@ -38,7 +38,7 @@ const e = ({ children: t }) => {
|
|
|
38
38
|
(l = n.current) == null || l.focus({
|
|
39
39
|
preventScroll: !0
|
|
40
40
|
});
|
|
41
|
-
}, s), /* @__PURE__ */ r.createElement(
|
|
41
|
+
}, s), /* @__PURE__ */ r.createElement(y, {
|
|
42
42
|
ref: n,
|
|
43
43
|
id: a,
|
|
44
44
|
"aria-describedby": m,
|
|
@@ -58,13 +58,13 @@ const w = "_input_ug5v8_1", G = {
|
|
|
58
58
|
}), re = () => {
|
|
59
59
|
const t = U(G.input);
|
|
60
60
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
61
|
-
className: o(
|
|
61
|
+
className: o(g, c.label)
|
|
62
62
|
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
63
|
-
className: o(
|
|
63
|
+
className: o(h, c.requiredMark)
|
|
64
64
|
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
65
65
|
className: t
|
|
66
66
|
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
67
|
-
className: o(
|
|
67
|
+
className: o(v, c.error)
|
|
68
68
|
}, /* @__PURE__ */ r.createElement(P, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
69
69
|
className: o(M, c.description)
|
|
70
70
|
}, K));
|
package/dist/component/{text-input-field-rac-CxZYUtxX.js → text-input-field-rac-CCcKwuLZ.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-D8-jkaYm.js";
|
|
5
5
|
import { E as o } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as a } from "./field-rac.module-ts2t4WUO.js";
|
|
7
|
-
import { U as n,
|
|
8
|
-
import { u as p } from "./use-text-input-class-name-
|
|
7
|
+
import { U as n, af as c, K as E, G as i } from "./form-jK8ezTss.js";
|
|
8
|
+
import { u as p } from "./use-text-input-class-name-DS7i03Gk.js";
|
|
9
9
|
const I = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
|
|
10
10
|
content: s,
|
|
11
11
|
locale: m
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import t, { useRef as
|
|
1
|
+
import t, { useRef as v } from "react";
|
|
2
2
|
import { TextField as C, Input as R } from "react-aria-components";
|
|
3
|
-
import {
|
|
3
|
+
import { bD as c, bA as d, bF as T } from "./form-jK8ezTss.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-S-ugOQQX.js";
|
|
6
|
+
import { L as x } from "./field-label-headless-_n4I0_tX.js";
|
|
7
7
|
const e = ({ children: r }) => {
|
|
8
|
-
const { id: a, value: l, onChange: i, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: b, autoComplete: f, FieldLayout: E } = c(), { labelId: I } = d(), F = s(r, e.Label),
|
|
8
|
+
const { id: a, value: l, onChange: i, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: b, autoComplete: f, FieldLayout: E } = c(), { labelId: I } = d(), F = s(r, e.Label), D = s(r, e.Input), y = s(r, e.Description), L = s(r, e.Error);
|
|
9
9
|
return /* @__PURE__ */ t.createElement(E, {
|
|
10
10
|
fieldId: a,
|
|
11
11
|
renderLabel: () => F,
|
|
@@ -20,11 +20,11 @@ const e = ({ children: r }) => {
|
|
|
20
20
|
isInvalid: p,
|
|
21
21
|
onBlur: m,
|
|
22
22
|
onFocus: b
|
|
23
|
-
},
|
|
24
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null,
|
|
23
|
+
}, D),
|
|
24
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, L, y)
|
|
25
25
|
});
|
|
26
26
|
}, B = ({ className: r }) => {
|
|
27
|
-
const { id: a, placeholder: l } = c(), { inputId: i, ariaDescribedBy: u } = d(), n =
|
|
27
|
+
const { id: a, placeholder: l } = c(), { inputId: i, ariaDescribedBy: u } = d(), n = v(null);
|
|
28
28
|
return T(() => {
|
|
29
29
|
var o;
|
|
30
30
|
(o = n.current) == null || o.focus({
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import e, { useCallback as
|
|
1
|
+
import e, { useCallback as V, useRef as v, useContext as x } from "react";
|
|
2
2
|
import { RicosViewer as q } from "@wix/ricos/viewer";
|
|
3
3
|
import m from "classnames";
|
|
4
4
|
import { parseTime as B } from "@internationalized/date";
|
|
5
5
|
import { TimeField as U, DateInput as k, DateSegment as _, TimeFieldStateContext as w } from "react-aria-components";
|
|
6
|
-
import {
|
|
6
|
+
import { bD as p, bA as j, bN as T, bF as G, U as K, af as Q, K as z, G as J } from "./form-jK8ezTss.js";
|
|
7
7
|
import { f as u, a as F } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { D as W, E as X } from "./field-error-headless-
|
|
9
|
-
import { L as Y } from "./field-label-headless-
|
|
8
|
+
import { D as W, E as X } from "./field-error-headless-S-ugOQQX.js";
|
|
9
|
+
import { L as Y } from "./field-label-headless-_n4I0_tX.js";
|
|
10
10
|
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { H as S } from "./custom-focus-class-_483Pkwp.js";
|
|
12
12
|
import { s as f } from "./field-rac.module-ts2t4WUO.js";
|
|
13
|
-
import { u as $ } from "./use-text-input-class-name-
|
|
13
|
+
import { u as $ } from "./use-text-input-class-name-DS7i03Gk.js";
|
|
14
14
|
const r = ({ children: t }) => {
|
|
15
|
-
const { id: n, value: s, onChange: a, disabled: i, readOnly: o, required: c, onBlur: l, onFocus: E, use24HourFormat: b, FieldLayout: C, hasError:
|
|
15
|
+
const { id: n, value: s, onChange: a, disabled: i, readOnly: o, required: c, onBlur: l, onFocus: E, use24HourFormat: b, FieldLayout: C, hasError: g } = p(), { inputId: I, ariaDescribedBy: D, labelId: L } = j(), R = V((M) => {
|
|
16
16
|
const H = ae(M);
|
|
17
17
|
a(H);
|
|
18
18
|
}, [
|
|
@@ -23,13 +23,13 @@ const r = ({ children: t }) => {
|
|
|
23
23
|
renderLabel: () => N,
|
|
24
24
|
renderInput: () => /* @__PURE__ */ e.createElement(U, {
|
|
25
25
|
"aria-labelledby": L,
|
|
26
|
-
id:
|
|
26
|
+
id: I,
|
|
27
27
|
"aria-describedby": D,
|
|
28
28
|
value: O,
|
|
29
29
|
onChange: R,
|
|
30
30
|
isDisabled: i,
|
|
31
31
|
isReadOnly: o,
|
|
32
|
-
isInvalid:
|
|
32
|
+
isInvalid: g,
|
|
33
33
|
isRequired: c,
|
|
34
34
|
onBlur: l,
|
|
35
35
|
onFocus: E,
|
|
@@ -66,7 +66,7 @@ const r = ({ children: t }) => {
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
}, ee = ({ className: t, ...n }) => {
|
|
69
|
-
const { id: s, hidePlaceholder: a } = p(), { segment: i } = n, { t: o } = T(), c =
|
|
69
|
+
const { id: s, hidePlaceholder: a } = p(), { segment: i } = n, { t: o } = T(), c = v(null);
|
|
70
70
|
G(() => {
|
|
71
71
|
var E;
|
|
72
72
|
(E = c.current) == null || E.focus({
|
|
@@ -155,7 +155,7 @@ const oe = "_time_5p151_1", le = "_hour_5p151_17", se = "_minute_5p151_18", ie =
|
|
|
155
155
|
}, /* @__PURE__ */ e.createElement(Z, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
156
156
|
className: m(J, f.description)
|
|
157
157
|
}, ce));
|
|
158
|
-
},
|
|
158
|
+
}, Ie = () => /* @__PURE__ */ e.createElement(me, null);
|
|
159
159
|
export {
|
|
160
|
-
|
|
160
|
+
Ie as TimeInputRAC
|
|
161
161
|
};
|
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
2
2
|
import i from "classnames";
|
|
3
|
-
import r, { useCallback as h, useRef as
|
|
4
|
-
import { TextField as
|
|
5
|
-
import {
|
|
3
|
+
import r, { useCallback as h, useRef as O } from "react";
|
|
4
|
+
import { TextField as y, Input as A } from "react-aria-components";
|
|
5
|
+
import { bD as d, bA as E, bF as v, U as B, af as T, K as g, G as k } from "./form-jK8ezTss.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-S-ugOQQX.js";
|
|
8
|
+
import { L as U } from "./field-label-headless-_n4I0_tX.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-ts2t4WUO.js";
|
|
12
|
-
import { u as w } from "./use-text-input-class-name-
|
|
12
|
+
import { u as w } from "./use-text-input-class-name-DS7i03Gk.js";
|
|
13
13
|
const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
|
|
14
|
-
const { id: o, value: l, onChange:
|
|
15
|
-
|
|
14
|
+
const { id: o, value: l, onChange: n, disabled: m, readOnly: s, required: a, hasError: I, onBlur: f, onFocus: b, FieldLayout: F } = d(), { labelId: R } = E(), p = q(f), D = c(t, e.Label), L = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), S = h(() => {
|
|
15
|
+
n(V(l)), p();
|
|
16
16
|
}, [
|
|
17
17
|
p,
|
|
18
|
-
|
|
18
|
+
n,
|
|
19
19
|
l
|
|
20
20
|
]);
|
|
21
|
-
return /* @__PURE__ */ r.createElement(
|
|
21
|
+
return /* @__PURE__ */ r.createElement(F, {
|
|
22
22
|
fieldId: o,
|
|
23
|
-
renderLabel: () =>
|
|
24
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
25
|
-
"aria-labelledby":
|
|
23
|
+
renderLabel: () => D,
|
|
24
|
+
renderInput: () => /* @__PURE__ */ r.createElement(y, {
|
|
25
|
+
"aria-labelledby": R,
|
|
26
26
|
value: l ?? "",
|
|
27
|
-
onChange:
|
|
27
|
+
onChange: n,
|
|
28
28
|
isDisabled: m,
|
|
29
|
-
isReadOnly:
|
|
30
|
-
isRequired:
|
|
29
|
+
isReadOnly: s,
|
|
30
|
+
isRequired: a,
|
|
31
31
|
isInvalid: I,
|
|
32
32
|
onBlur: S,
|
|
33
|
-
onFocus:
|
|
34
|
-
},
|
|
33
|
+
onFocus: b
|
|
34
|
+
}, L),
|
|
35
35
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, C)
|
|
36
36
|
});
|
|
37
37
|
}, W = ({ className: t }) => {
|
|
38
|
-
const { id: o, placeholder: l } = d(), { inputId:
|
|
38
|
+
const { id: o, placeholder: l } = d(), { inputId: n, ariaDescribedBy: m } = E(), s = O(null);
|
|
39
39
|
return v(() => {
|
|
40
|
-
var
|
|
41
|
-
(
|
|
40
|
+
var a;
|
|
41
|
+
(a = s.current) == null || a.focus({
|
|
42
42
|
preventScroll: !0
|
|
43
43
|
});
|
|
44
44
|
}, o), /* @__PURE__ */ r.createElement(A, {
|
|
45
|
-
ref:
|
|
46
|
-
id:
|
|
45
|
+
ref: s,
|
|
46
|
+
id: n,
|
|
47
47
|
type: "url",
|
|
48
48
|
autoComplete: "url",
|
|
49
49
|
"aria-describedby": m,
|
|
@@ -2,8 +2,8 @@ import d, { useContext as _, useRef as L, useState as m, Children as N, useLayou
|
|
|
2
2
|
import { CollectionRendererContext as g, DefaultCollectionRenderer as E, ListBox as M } from "react-aria-components";
|
|
3
3
|
import I from "classnames";
|
|
4
4
|
import { s as h } from "./field-rac.module-ts2t4WUO.js";
|
|
5
|
-
import { I as P } from "./form-
|
|
6
|
-
import { u as T } from "./use-element-state-class-name-
|
|
5
|
+
import { I as P } from "./form-jK8ezTss.js";
|
|
6
|
+
import { u as T } from "./use-element-state-class-name-CkT6Ga8t.js";
|
|
7
7
|
const R = 1 / 0, H = {
|
|
8
8
|
position: "absolute",
|
|
9
9
|
width: 0,
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import e, { useState as F, useCallback as D, useRef as M } from "react";
|
|
2
|
+
import { UNSAFE_PortalProvider as $ } from "react-aria";
|
|
3
|
+
import { VisuallyHidden as k, Select as G, SelectValue as J, ListBoxItem as U } from "react-aria-components";
|
|
4
|
+
import { bD as b, bA as v, bN as W, bF as Y, J as j } from "./form-jK8ezTss.js";
|
|
5
|
+
import { f as d, a as L } from "./find-child-C60k4CxG.js";
|
|
6
|
+
import { D as z, E as K } from "./field-error-headless-S-ugOQQX.js";
|
|
7
|
+
import { L as Q } from "./field-label-headless-_n4I0_tX.js";
|
|
8
|
+
import { E as X, S as Z, N as ee } from "./non-modal-popover-D-u13tmp.js";
|
|
9
|
+
import { a as te } from "./use-is-forced-open-dropdown-fo_NCnSk.js";
|
|
10
|
+
import { V as ne } from "./use-dropdown-option-class-name-BTltqRl1.js";
|
|
11
|
+
import { u as re } from "./use-hoverable-input-class-name-BkoSr6tr.js";
|
|
12
|
+
const r = ({ children: t }) => {
|
|
13
|
+
const { id: l, value: a, defaultValue: s, options: u = [], readOnly: o, onChange: n, placeholder: m, disabled: i, required: p, onBlur: C, onFocus: I, FieldLayout: y, hasError: N } = b(), [T, P] = F(!1), E = te(l), [R, h] = F(null), S = a && u.some((c) => (c.value ?? c.label) === a) ? a : s || null, { labelId: f } = v(), { t: V } = W(), O = `${f}-required`, B = D((c) => {
|
|
14
|
+
o || n(typeof c == "string" ? c : null);
|
|
15
|
+
}, [
|
|
16
|
+
n,
|
|
17
|
+
o
|
|
18
|
+
]), _ = D((c) => P(c && !i && !o), [
|
|
19
|
+
i,
|
|
20
|
+
o
|
|
21
|
+
]), q = d(t, r.Label), x = d(t, r.Trigger), w = d(t, r.Options), A = d(t, r.Description), H = d(t, r.Error);
|
|
22
|
+
return /* @__PURE__ */ e.createElement(y, {
|
|
23
|
+
fieldId: l,
|
|
24
|
+
renderLabel: () => q,
|
|
25
|
+
renderInput: () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", {
|
|
26
|
+
ref: h,
|
|
27
|
+
style: {
|
|
28
|
+
display: "contents"
|
|
29
|
+
}
|
|
30
|
+
}), p ? /* @__PURE__ */ e.createElement(k, {
|
|
31
|
+
id: O
|
|
32
|
+
}, V("settings.required-indicator-text")) : null, /* @__PURE__ */ e.createElement($, {
|
|
33
|
+
getContainer: () => R
|
|
34
|
+
}, /* @__PURE__ */ e.createElement(G, {
|
|
35
|
+
"aria-labelledby": p ? `${f} ${O}` : f,
|
|
36
|
+
value: S,
|
|
37
|
+
isOpen: E || T && !i && !o,
|
|
38
|
+
onOpenChange: E ? void 0 : _,
|
|
39
|
+
onChange: B,
|
|
40
|
+
isDisabled: i,
|
|
41
|
+
isInvalid: N,
|
|
42
|
+
isRequired: p,
|
|
43
|
+
placeholder: m || X,
|
|
44
|
+
onBlur: C,
|
|
45
|
+
onFocus: I
|
|
46
|
+
}, x, L(w, {
|
|
47
|
+
isForcedOpen: E
|
|
48
|
+
})))),
|
|
49
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, H, A)
|
|
50
|
+
});
|
|
51
|
+
}, ae = ({ children: t, className: l }) => {
|
|
52
|
+
const { inputId: a, ariaDescribedBy: s } = v(), { id: u, hasError: o, isLoading: n } = b(), m = M(null);
|
|
53
|
+
return Y(() => {
|
|
54
|
+
var i;
|
|
55
|
+
(i = m.current) == null || i.focus({
|
|
56
|
+
preventScroll: !0
|
|
57
|
+
});
|
|
58
|
+
}, u), /* @__PURE__ */ e.createElement(Z, {
|
|
59
|
+
ref: m,
|
|
60
|
+
id: a,
|
|
61
|
+
"aria-describedby": s,
|
|
62
|
+
className: l,
|
|
63
|
+
"data-invalid": o || void 0,
|
|
64
|
+
"data-loading": n || void 0
|
|
65
|
+
}, /* @__PURE__ */ e.createElement(J, null), t);
|
|
66
|
+
}, g = ({ children: t, className: l, ...a }) => {
|
|
67
|
+
const { isForcedOpen: s } = a, { options: u = [] } = b(), o = d(t, g.Option);
|
|
68
|
+
return /* @__PURE__ */ e.createElement(ee, {
|
|
69
|
+
className: l,
|
|
70
|
+
containerPadding: 0,
|
|
71
|
+
offset: 0
|
|
72
|
+
}, /* @__PURE__ */ e.createElement(ne, {
|
|
73
|
+
isForcedOpen: s,
|
|
74
|
+
autoFocus: s ? !1 : void 0
|
|
75
|
+
}, u.map((n) => L(o, {
|
|
76
|
+
key: n.value ?? n.label,
|
|
77
|
+
value: n.value ?? n.label,
|
|
78
|
+
label: n.label
|
|
79
|
+
}))));
|
|
80
|
+
}, se = ({ className: t, ...l }) => {
|
|
81
|
+
const { value: a, label: s } = l;
|
|
82
|
+
return /* @__PURE__ */ e.createElement(U, {
|
|
83
|
+
className: t,
|
|
84
|
+
id: a,
|
|
85
|
+
textValue: s
|
|
86
|
+
}, s);
|
|
87
|
+
};
|
|
88
|
+
g.Option = se;
|
|
89
|
+
r.Label = Q;
|
|
90
|
+
r.Trigger = ae;
|
|
91
|
+
r.Options = g;
|
|
92
|
+
r.Description = z;
|
|
93
|
+
r.Error = K;
|
|
94
|
+
const ge = (...t) => re(j, t);
|
|
95
|
+
export {
|
|
96
|
+
r as D,
|
|
97
|
+
ge as u
|
|
98
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import i from "classnames";
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
2
|
+
import { bw as s, b3 as v } from "./form-jK8ezTss.js";
|
|
3
|
+
const w = ({ 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
|
+
w as u
|
|
23
23
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bD as n } from "./form-jK8ezTss.js";
|
|
2
2
|
import { s as e } from "./field-rac.module-ts2t4WUO.js";
|
|
3
|
-
import { u } from "./use-element-state-class-name-
|
|
3
|
+
import { u } from "./use-element-state-class-name-CkT6Ga8t.js";
|
|
4
4
|
const b = (s, a) => {
|
|
5
5
|
const { disabled: t, readOnly: o } = n(), r = u({
|
|
6
6
|
globalClasses: s,
|
package/dist/component/{use-service-options-base-BF_peAsS.js → use-service-options-base-Wp8RZ4Z8.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 { bC as v } from "./form-jK8ezTss.js";
|
|
3
3
|
const S = (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) => ({
|