@wix/form-elements 1.82.0 → 1.84.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-DmwbqZse.js → appointment-rac-BSy3u0GK.js} +6 -6
- package/dist/component/{bookings-address-rac-RCzVU87c.js → bookings-address-rac-CL7Bh1yH.js} +1 -1
- package/dist/component/{bookings-email-rac-Df_Wte1_.js → bookings-email-rac-Bw9tj_tv.js} +1 -1
- package/dist/component/{bookings-first-name-rac-BmdRGYxF.js → bookings-first-name-rac-BOOu_AXM.js} +1 -1
- package/dist/component/{bookings-header-rac-DewQWtkZ.js → bookings-header-rac-3kBei7GF.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DmmNBuqy.js → bookings-last-name-rac-CUKbu22q.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-QskvFo0C.js → bookings-login-bar-rac-CLrUhdX2.js} +2 -2
- package/dist/component/{bookings-phone-rac-7wn8IXna.js → bookings-phone-rac-7DViellg.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-B5nk0BlD.js → bookings-rich-text-rac-CIUZX--G.js} +1 -1
- package/dist/component/{checkbox-field-rac-BnVNfYWL.js → checkbox-field-rac-C_jth3RK.js} +7 -7
- package/dist/component/{checkbox-group-field-headless-Bx5Y-RMP.js → checkbox-group-field-headless-D-c9Kyj8.js} +3 -3
- package/dist/component/checkbox-group-field-rac-MgGUuYII.js +42 -0
- package/dist/component/{checkbox-group-rac-B20t8dTB.js → checkbox-group-rac-rr1mN2EJ.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-DqzGZQRQ.js → checkbox-indicator-module-classes-Bb3xB1ve.js} +1 -1
- package/dist/component/{checkbox-rac-ifC6qSE8.js → checkbox-rac-CRsLQKhN.js} +1 -1
- package/dist/component/{contacts-address-rac-XJRKvPlp.js → contacts-address-rac-BFlNbQKh.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-CKYESrPO.js → contacts-birthdate-rac-D7Ww3iAz.js} +1 -1
- package/dist/component/{contacts-company-rac-BXwEeb0p.js → contacts-company-rac-DLl4nqH-.js} +1 -1
- package/dist/component/{contacts-email-rac-D8Yspo_m.js → contacts-email-rac-K8fCs8qS.js} +1 -1
- package/dist/component/{contacts-first-name-rac-mvCGP1LJ.js → contacts-first-name-rac-BOTxHl3m.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Clg9RXal.js → contacts-last-name-rac-bFnG-7Hm.js} +1 -1
- package/dist/component/{contacts-phone-rac-qEwjhByI.js → contacts-phone-rac-B4teqDIV.js} +1 -1
- package/dist/component/{contacts-position-rac-Bh8fvf2M.js → contacts-position-rac-CnWoXO5h.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DEQ2XkZo.js → contacts-subscribe-rac-Bco722BU.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-0DUZ4tJz.js → contacts-tax-id-rac-QQsKhAx3.js} +1 -1
- package/dist/component/{date-availability-2ek2RtXx.js → date-availability-DMbyb1GZ.js} +1 -1
- package/dist/component/{date-input-field-rac-Bp4SQB-t.js → date-input-field-rac-CVRjO19U.js} +80 -79
- package/dist/component/{date-input-rac-CYsJcMe5.js → date-input-rac-zi7AQ8Ai.js} +1 -1
- package/dist/component/{date-picker-field-rac-BGQvnSYI.js → date-picker-field-rac-5H10gH9D.js} +6 -6
- package/dist/component/{date-picker-rac-BVncggYR.js → date-picker-rac-CxWNDsyJ.js} +1 -1
- package/dist/component/date-time-input-field-rac-CDa-nyf8.js +423 -0
- package/dist/component/{date-time-input-rac-DzdCno0L.js → date-time-input-rac-DglwFYb0.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-CNCpeolD.js → dext-checkbox-group-rac-BBB652Uy.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BYDQ58Mo.js → dext-checkbox-rac-BVtiGV3w.js} +1 -1
- package/dist/component/{dext-date-picker-rac-aYYk8Nrl.js → dext-date-picker-rac-Di4x6sI_.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-v2v974p5.js → dext-date-time-input-rac-agWHwUo7.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C846KZCe.js → dext-dropdown-rac-U3FZTA2-.js} +1 -1
- package/dist/component/{dext-email-rac-izjbfME9.js → dext-email-rac-CZ9AQw_k.js} +1 -1
- package/dist/component/{dext-number-input-rac-CnOFsD7l.js → dext-number-input-rac-DFr_9ZX5.js} +1 -1
- package/dist/component/{dext-phone-rac-D8GMXD88.js → dext-phone-rac-BYsfNwXn.js} +1 -1
- package/dist/component/{dext-radio-group-rac-BtiyGCRh.js → dext-radio-group-rac-B_jm5YAT.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BHJ1kitb.js → dext-rating-input-rac-CNlhMKt-.js} +1 -1
- package/dist/component/{dext-tags-rac-CvNjwS5R.js → dext-tags-rac-y9x8Fg54.js} +2 -2
- package/dist/component/{dext-text-area-rac-X5L0Q3sC.js → dext-text-area-rac-BgRxIpn9.js} +1 -1
- package/dist/component/{dext-text-input-rac-swkyAJqC.js → dext-text-input-rac-CdzgUZ38.js} +1 -1
- package/dist/component/{dext-url-input-rac-BYlXOAkz.js → dext-url-input-rac-Cg1TYyNV.js} +1 -1
- package/dist/component/{donation-rac-CDWLBZZM.js → donation-rac-Deiw7Tl9.js} +92 -91
- package/dist/component/{dropdown-field-headless-JJzbZvps.js → dropdown-field-headless-BKj2rdy9.js} +3 -3
- package/dist/component/{dropdown-field-rac-BodpIQ9Q.js → dropdown-field-rac-CIdC2_O3.js} +3 -3
- package/dist/component/{dropdown-rac-Bfbxxx9k.js → dropdown-rac-CYxaJrXP.js} +1 -1
- package/dist/component/{ecom-address-rac-BCnsL5tr.js → ecom-address-rac-Crr3A_iU.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CNSdI_ty.js → ecom-subscription-checkbox-rac-DdXAex4c.js} +3 -3
- package/dist/component/{email-input-field-rac-Btaa4O5T.js → email-input-field-rac-C516Fm0v.js} +83 -79
- package/dist/component/{events-repeater-rac-xBwqJddt.js → events-repeater-rac-DL49KaIU.js} +6 -6
- package/dist/component/{events-rsvp-rac-D90PwkHd.js → events-rsvp-rac-B5EvAP8x.js} +4 -4
- package/dist/component/{field-error-headless-BErhh9GG.js → field-error-headless-D2CJ4Qk7.js} +1 -1
- package/dist/component/{field-label-headless-BGyK-5xW.js → field-label-headless-D2-WvVKT.js} +1 -1
- package/dist/component/field-rac.module-D06m9T9x.js +24 -0
- package/dist/component/{file-upload-rac-MxH3CVml.js → file-upload-rac-BG3msdbn.js} +5 -5
- package/dist/component/{fixed-payment-rac-DpBA9irF.js → fixed-payment-rac-3bI_h_W0.js} +5 -5
- package/dist/component/{form-f0tqdMye.js → form-B3KiRFhB.js} +69 -69
- package/dist/component/{form-element-classes-jC8D0LnK.js → form-element-classes-Ct1UaxuQ.js} +38 -32
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BXxFqu9u.js → header-field-rac-Bp7hStrt.js} +3 -3
- package/dist/component/{header-rac-BN70esac.js → header-rac-yVYId2B_.js} +1 -1
- package/dist/component/{image-choice-rac-DLBGIBXL.js → image-choice-rac-D1mqJfcn.js} +6 -6
- package/dist/component/{index-DXLEHYlA.js → index-B0PANcv8.js} +4 -4
- package/dist/component/{index-BvB-uE1H.js → index-LrdDmlej.js} +2 -2
- package/dist/component/{isObjectLike-BYOX5XY4.js → isObjectLike-DH7T0Txd.js} +1 -1
- package/dist/component/multiline-address-field-rac-C-gtuNCU.js +1617 -0
- package/dist/component/{multiline-address-rac-D82Gbj3n.js → multiline-address-rac-B3ixmNqi.js} +1 -1
- package/dist/component/number-input-field-rac-BNPMYFay.js +93 -0
- package/dist/component/{number-input-rac-Bnsvb-SO.js → number-input-rac-BaEBt2uf.js} +1 -1
- package/dist/component/password-rac-B0H_ILkt.js +143 -0
- package/dist/component/payment-input-rac-LIk9MP5a.js +141 -0
- package/dist/component/{phone-input-field-rac-Ce_wuE46.js → phone-input-field-rac-CUUAacDK.js} +5 -5
- package/dist/component/{phone-rac-DslINtcH.js → phone-rac-BYqYOw60.js} +1 -1
- package/dist/component/{product-list-rac-C4P_SOyG.js → product-list-rac-CvoI6ajr.js} +7 -7
- package/dist/component/{quiz-radio-group-rac-noy4fmD8.js → quiz-radio-group-rac-D0IJGSh0.js} +2 -2
- package/dist/component/{radio-button-module-classes-DXQ1UlmI.js → radio-button-module-classes-CWfSY9kQ.js} +3 -3
- package/dist/component/radio-group-field-rac-DisEhh0b.js +48 -0
- package/dist/component/{radio-group-rac-CGHQFyJY.js → radio-group-rac-DrwjFNWh.js} +1 -1
- package/dist/component/{rating-input-field-rac-elaferlI.js → rating-input-field-rac-BLMQWT7z.js} +6 -6
- package/dist/component/{rating-input-rac-fnOtTKN8.js → rating-input-rac-CGJY2HSO.js} +1 -1
- package/dist/component/{rich-content-rac.module-DbwuwQeo.js → rich-content-rac.module-C9cKdumu.js} +1 -1
- package/dist/component/{rich-text-field-rac-DtcQC8zU.js → rich-text-field-rac-DTSRvaTK.js} +3 -3
- package/dist/component/{rich-text-rac-CuT97sby.js → rich-text-rac-Blk3neHN.js} +1 -1
- package/dist/component/{service-dropdown-rac-rk2tzikX.js → service-dropdown-rac-C9P5IWrV.js} +5 -5
- package/dist/component/{services-multi-choice-rac-BMQyF_xs.js → services-multi-choice-rac-Cnhwy1a9.js} +7 -7
- package/dist/component/{signature-rac-DeV9C6ta.js → signature-rac-Benar-ci.js} +5 -5
- package/dist/component/{submit-button-rac-BpN-FYtM.js → submit-button-rac-BDJQsZC3.js} +2 -2
- package/dist/component/tags-field-rac-wA_0ZinI.js +218 -0
- package/dist/component/{tags-rac-Dabz4jHd.js → tags-rac-BcVGekA6.js} +1 -1
- package/dist/component/text-area-field-rac-VpuojNac.js +73 -0
- package/dist/component/{text-area-rac-CDLF-_56.js → text-area-rac-DDvi8u5M.js} +1 -1
- package/dist/component/text-input-field-rac-C6LohBtn.js +28 -0
- package/dist/component/{text-input-headless-BwVLU9cp.js → text-input-headless-5yKhWpLD.js} +3 -3
- package/dist/component/{text-input-rac-CoGTzfo1.js → text-input-rac-C8hsNUp6.js} +1 -1
- package/dist/component/time-input-rac-fOT-pjju.js +159 -0
- package/dist/component/url-input-field-rac-DxR6Hymf.js +75 -0
- package/dist/component/{url-input-rac-_d6XRdKX.js → url-input-rac-B928R10o.js} +1 -1
- package/dist/component/use-element-state-class-name-CBjBYCW5.js +20 -0
- package/dist/component/{use-service-options-base-CRgxxz7b.js → use-service-options-base-UyJmT2P6.js} +1 -1
- package/dist/component/use-text-input-class-name-Qk2v8a6-.js +24 -0
- package/package.json +2 -2
- package/dist/component/checkbox-group-field-rac-CZW28rj5.js +0 -41
- package/dist/component/date-time-input-field-rac-B1mggelc.js +0 -422
- package/dist/component/field-rac.module-ColNPUt0.js +0 -23
- package/dist/component/multiline-address-field-rac-fcQYnPlO.js +0 -1613
- package/dist/component/number-input-field-rac-B0-4Rz3w.js +0 -89
- package/dist/component/password-rac-BdBjFa8y.js +0 -142
- package/dist/component/payment-input-rac-DkAGOvaF.js +0 -137
- package/dist/component/radio-group-field-rac-CYBDq7R1.js +0 -47
- package/dist/component/tags-field-rac-ByC9DnyH.js +0 -217
- package/dist/component/text-area-field-rac-CtSa8XW_.js +0 -69
- package/dist/component/text-input-field-rac-C6fQYKhI.js +0 -24
- package/dist/component/time-input-rac-DQDupKTA.js +0 -155
- package/dist/component/url-input-field-rac-4T8gcMHH.js +0 -71
- package/dist/component/use-element-state-class-name-BqmaTba3.js +0 -15
|
@@ -4,14 +4,14 @@ import v from "classnames";
|
|
|
4
4
|
import { useHover as ve, useFocusRing as xe, mergeProps as Se } from "react-aria";
|
|
5
5
|
import { RadioGroup as Fe, Button as fe, TextField as Ae, Input as _e, RadioField as Pe, RadioButton as Ne } from "react-aria-components";
|
|
6
6
|
import he from "signature_pad";
|
|
7
|
-
import { z as Oe, ae as Ue, ab as Be, aq as ge, E as ce, e as G, ai as A, af as H, ak as Ee, as as Me } from "./form-
|
|
7
|
+
import { z as Oe, ae as Ue, ab as Be, aq as ge, E as ce, e as G, ai as A, af as H, ak as Ee, as as Me } from "./form-B3KiRFhB.js";
|
|
8
8
|
import { f as T, a as F } from "./find-child-C60k4CxG.js";
|
|
9
|
-
import { D as We, E as He } from "./field-error-headless-
|
|
10
|
-
import { L as Ye } from "./field-label-headless-
|
|
9
|
+
import { D as We, E as He } from "./field-error-headless-D2CJ4Qk7.js";
|
|
10
|
+
import { L as Ye } from "./field-label-headless-D2-WvVKT.js";
|
|
11
11
|
import { D as ke } from "./data-hooks-Dkw1pbRj.js";
|
|
12
12
|
import { E as $e } from "./error-icon-hZxQ6DEy.js";
|
|
13
|
-
import { s as z } from "./field-rac.module-
|
|
14
|
-
import { y as ue, O as ze, x as B,
|
|
13
|
+
import { s as z } from "./field-rac.module-D06m9T9x.js";
|
|
14
|
+
import { y as ue, O as ze, x as B, a2 as Ve, o as Ze, i as Xe } from "./form-element-classes-Ct1UaxuQ.js";
|
|
15
15
|
const Ge = typeof s.useId == "function" ? s.useId : () => W(Oe()).current;
|
|
16
16
|
var w = /* @__PURE__ */ (function(e) {
|
|
17
17
|
return e.TEXT = "text/plain", e.POINTS = "points/json", e;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import t from "react";
|
|
2
2
|
import l from "classnames";
|
|
3
|
-
import { ai as c } from "./form-
|
|
3
|
+
import { ai as c } from "./form-B3KiRFhB.js";
|
|
4
4
|
import { ProgressBar as g, Button as b } from "react-aria-components";
|
|
5
5
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import {
|
|
6
|
+
import { a4 as v, a3 as N, a6 as f } from "./form-element-classes-Ct1UaxuQ.js";
|
|
7
7
|
function C(e) {
|
|
8
8
|
const s = "calc(50% - 2px)";
|
|
9
9
|
return /* @__PURE__ */ t.createElement(g, {
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { RicosViewer as Q } from "@wix/ricos/viewer";
|
|
2
|
+
import S from "classnames";
|
|
3
|
+
import e, { useMemo as L, useState as j, useRef as M, useLayoutEffect as w, useCallback as k } from "react";
|
|
4
|
+
import { CheckboxGroup as z, TextField as J, Input as K, CheckboxField as X, CheckboxButton as Y } from "react-aria-components";
|
|
5
|
+
import { ai as N, af as Z, as as v, ab as ee, ak as te } from "./form-B3KiRFhB.js";
|
|
6
|
+
import { f, a as x } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { E as B, D as $ } from "./field-error-headless-D2CJ4Qk7.js";
|
|
8
|
+
import { L as H } from "./field-label-headless-D2-WvVKT.js";
|
|
9
|
+
import { F as oe } from "./fieldset-headless-CD3fds9J.js";
|
|
10
|
+
import { N as D } from "./options-layout-constants-DEfIEJWD.js";
|
|
11
|
+
import { E as ne } from "./error-icon-hZxQ6DEy.js";
|
|
12
|
+
import { s as y } from "./field-rac.module-D06m9T9x.js";
|
|
13
|
+
import { y as ae, O as se, _ as re, o as le, i as ie, $ as ce } from "./form-element-classes-Ct1UaxuQ.js";
|
|
14
|
+
import { o as ue } from "./options-rac.module-KM-VT_KY.js";
|
|
15
|
+
import { u as de } from "./use-element-state-class-name-CBjBYCW5.js";
|
|
16
|
+
import { u as me } from "./use-text-input-class-name-Qk2v8a6-.js";
|
|
17
|
+
const g = "Other", pe = (o, t) => {
|
|
18
|
+
const s = t.length + 2;
|
|
19
|
+
return (o.find((r) => r.startsWith(`${t}: `)) || "").slice(s);
|
|
20
|
+
}, he = (o) => o.map((t) => t.value ?? t.label), P = ({ className: o, ...t }) => {
|
|
21
|
+
const { label: a } = t;
|
|
22
|
+
return /* @__PURE__ */ e.createElement("span", {
|
|
23
|
+
className: o
|
|
24
|
+
}, a);
|
|
25
|
+
}, W = ({ className: o }) => {
|
|
26
|
+
const { value: t, onChange: a, addOtherLabel: s, addOtherPlaceholder: c, otherInputCharacterLimit: r, disabled: u, readOnly: b, hasError: d } = N(), { t: m } = v(), l = s || m("add-other.default-other-option-label") || g, p = L(() => pe(t || [], l), [
|
|
27
|
+
t,
|
|
28
|
+
l
|
|
29
|
+
]), [n, _] = j(p), h = M(a);
|
|
30
|
+
w(() => {
|
|
31
|
+
h.current = a;
|
|
32
|
+
});
|
|
33
|
+
const C = k((O) => {
|
|
34
|
+
_(O);
|
|
35
|
+
const I = (t || []).filter((E) => !E.startsWith(`${l}:`) && E !== l), F = O ? `${l}: ${O}` : l;
|
|
36
|
+
h.current([
|
|
37
|
+
...I,
|
|
38
|
+
F
|
|
39
|
+
]);
|
|
40
|
+
}, [
|
|
41
|
+
t,
|
|
42
|
+
l
|
|
43
|
+
]);
|
|
44
|
+
return /* @__PURE__ */ e.createElement(J, {
|
|
45
|
+
value: n,
|
|
46
|
+
onChange: C,
|
|
47
|
+
isDisabled: u,
|
|
48
|
+
isReadOnly: b,
|
|
49
|
+
isInvalid: d,
|
|
50
|
+
"aria-label": l
|
|
51
|
+
}, /* @__PURE__ */ e.createElement(K, {
|
|
52
|
+
"data-hook": "tags-other-input",
|
|
53
|
+
"data-filled": n ? !0 : void 0,
|
|
54
|
+
placeholder: c,
|
|
55
|
+
maxLength: r,
|
|
56
|
+
className: o
|
|
57
|
+
}));
|
|
58
|
+
}, T = ({ children: o, className: t, ...a }) => {
|
|
59
|
+
const { value: s, label: c, isOther: r, isFirstOption: u } = a, { id: b, value: d, onChange: m, options: l, disabled: p, readOnly: n, hasError: _ } = N(), h = M(null);
|
|
60
|
+
te(() => {
|
|
61
|
+
var E;
|
|
62
|
+
u && ((E = h.current) == null || E.focus({
|
|
63
|
+
preventScroll: !0
|
|
64
|
+
}));
|
|
65
|
+
}, b);
|
|
66
|
+
const C = f(o, P), O = L(() => d || [], [
|
|
67
|
+
d
|
|
68
|
+
]), I = L(() => r ? O.find((E) => E === c || E.startsWith(`${c}: `)) || c : s, [
|
|
69
|
+
r,
|
|
70
|
+
O,
|
|
71
|
+
c,
|
|
72
|
+
s
|
|
73
|
+
]), F = k((E) => {
|
|
74
|
+
const G = he(l || []), A = O.filter((U) => G.includes(U));
|
|
75
|
+
m(E ? [
|
|
76
|
+
...A,
|
|
77
|
+
c
|
|
78
|
+
] : A);
|
|
79
|
+
}, [
|
|
80
|
+
c,
|
|
81
|
+
m,
|
|
82
|
+
l,
|
|
83
|
+
O
|
|
84
|
+
]);
|
|
85
|
+
return /* @__PURE__ */ e.createElement(X, {
|
|
86
|
+
inputRef: h,
|
|
87
|
+
value: I,
|
|
88
|
+
onChange: r ? F : void 0,
|
|
89
|
+
isDisabled: p,
|
|
90
|
+
isReadOnly: n,
|
|
91
|
+
isInvalid: _
|
|
92
|
+
}, /* @__PURE__ */ e.createElement(Y, {
|
|
93
|
+
className: t,
|
|
94
|
+
"data-hook": `tags-${r ? g : s}`
|
|
95
|
+
}, x(C, {
|
|
96
|
+
value: s,
|
|
97
|
+
label: c,
|
|
98
|
+
isOther: r,
|
|
99
|
+
isFirstOption: u
|
|
100
|
+
})));
|
|
101
|
+
}, V = ({ children: o, className: t }) => {
|
|
102
|
+
const { options: a, addOther: s, addOtherLabel: c, numberOfColumns: r = D.FREE_FLOW } = N(), { isMobile: u } = ee(), { t: b } = v(), d = u && r !== D.FREE_FLOW ? D.ONE : r, m = c || b("add-other.default-other-option-label") || g, l = f(o, T), p = L(() => {
|
|
103
|
+
const n = a || [];
|
|
104
|
+
return s ? [
|
|
105
|
+
...n,
|
|
106
|
+
{
|
|
107
|
+
label: m,
|
|
108
|
+
value: m,
|
|
109
|
+
isOther: !0
|
|
110
|
+
}
|
|
111
|
+
] : n;
|
|
112
|
+
}, [
|
|
113
|
+
a,
|
|
114
|
+
s,
|
|
115
|
+
m
|
|
116
|
+
]);
|
|
117
|
+
return p.length === 0 ? null : /* @__PURE__ */ e.createElement("div", {
|
|
118
|
+
className: t,
|
|
119
|
+
"data-columns": d
|
|
120
|
+
}, p.map((n, _) => {
|
|
121
|
+
const h = n.value ?? n.label;
|
|
122
|
+
return x(l, {
|
|
123
|
+
key: n.isOther ? g : h,
|
|
124
|
+
value: h,
|
|
125
|
+
label: n.label,
|
|
126
|
+
isOther: n.isOther,
|
|
127
|
+
isFirstOption: _ === 0
|
|
128
|
+
});
|
|
129
|
+
}));
|
|
130
|
+
}, q = ({ children: o, className: t }) => {
|
|
131
|
+
const { addOther: a, addOtherLabel: s, hasError: c, readOnly: r, value: u } = N(), { t: b } = v(), d = s || b("add-other.default-other-option-label") || g, m = f(o, V), l = f(o, W), p = L(() => !a || !u ? !1 : u.some((n) => n === d || n.startsWith(`${d}:`)), [
|
|
132
|
+
a,
|
|
133
|
+
u,
|
|
134
|
+
d
|
|
135
|
+
]);
|
|
136
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
137
|
+
className: t,
|
|
138
|
+
"data-invalid": c,
|
|
139
|
+
"data-readonly": r
|
|
140
|
+
}, m, p && l);
|
|
141
|
+
}, i = ({ children: o }) => {
|
|
142
|
+
const { id: t, value: a, onChange: s, FieldLayout: c, required: r, disabled: u, readOnly: b, hasError: d, onBlur: m, onFocus: l } = N(), { inputId: p, labelId: n, ariaDescribedBy: _ } = Z(), h = L(() => a || [], [
|
|
143
|
+
a
|
|
144
|
+
]), C = f(o, H), O = f(o, q), I = f(o, $), F = f(o, B);
|
|
145
|
+
return /* @__PURE__ */ e.createElement(c, {
|
|
146
|
+
fieldId: t,
|
|
147
|
+
renderLabel: () => C,
|
|
148
|
+
renderInput: () => /* @__PURE__ */ e.createElement(oe, {
|
|
149
|
+
id: p,
|
|
150
|
+
ariaLabelledBy: n,
|
|
151
|
+
ariaDescribedBy: _,
|
|
152
|
+
required: r,
|
|
153
|
+
onBlur: m,
|
|
154
|
+
onFocus: l
|
|
155
|
+
}, /* @__PURE__ */ e.createElement(z, {
|
|
156
|
+
"aria-labelledby": n,
|
|
157
|
+
value: h,
|
|
158
|
+
onChange: s,
|
|
159
|
+
isDisabled: u,
|
|
160
|
+
isReadOnly: b,
|
|
161
|
+
isRequired: r,
|
|
162
|
+
isInvalid: d
|
|
163
|
+
}, O)),
|
|
164
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, F, I)
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
V.Option = T;
|
|
168
|
+
T.Label = P;
|
|
169
|
+
i.Label = H;
|
|
170
|
+
i.Control = q;
|
|
171
|
+
i.Options = V;
|
|
172
|
+
i.OtherInput = W;
|
|
173
|
+
i.Description = $;
|
|
174
|
+
i.Error = B;
|
|
175
|
+
const Oe = "_control_7oh59_1", Ee = "_options_7oh59_7", be = "_option_7oh59_7", fe = "_optionHover_7oh59_72", _e = "_optionSelected_7oh59_72", R = {
|
|
176
|
+
control: Oe,
|
|
177
|
+
options: Ee,
|
|
178
|
+
option: be,
|
|
179
|
+
optionHover: fe,
|
|
180
|
+
optionSelected: _e
|
|
181
|
+
}, Le = ({ content: o, locale: t }) => /* @__PURE__ */ e.createElement(Q, {
|
|
182
|
+
content: o,
|
|
183
|
+
locale: t
|
|
184
|
+
}), Ce = {
|
|
185
|
+
base: R.option,
|
|
186
|
+
selected: R.optionSelected,
|
|
187
|
+
hover: R.optionHover
|
|
188
|
+
}, $e = () => {
|
|
189
|
+
const o = de({
|
|
190
|
+
globalClasses: ce,
|
|
191
|
+
moduleClasses: Ce
|
|
192
|
+
}), t = me();
|
|
193
|
+
return /* @__PURE__ */ e.createElement(i, null, /* @__PURE__ */ e.createElement(i.Label, {
|
|
194
|
+
className: S(ae, y.label)
|
|
195
|
+
}, /* @__PURE__ */ e.createElement(i.Label.Required, {
|
|
196
|
+
className: S(se, y.requiredMark)
|
|
197
|
+
})), /* @__PURE__ */ e.createElement(i.Control, {
|
|
198
|
+
className: R.control
|
|
199
|
+
}, /* @__PURE__ */ e.createElement(i.Options, {
|
|
200
|
+
className: S(re, R.options)
|
|
201
|
+
}, /* @__PURE__ */ e.createElement(i.Options.Option, {
|
|
202
|
+
className: ({ isSelected: a, isHovered: s }) => o({
|
|
203
|
+
isSelected: a,
|
|
204
|
+
isHovered: s
|
|
205
|
+
})
|
|
206
|
+
}, /* @__PURE__ */ e.createElement(i.Options.Option.Label, {
|
|
207
|
+
className: ue.optionLabel
|
|
208
|
+
}))), /* @__PURE__ */ e.createElement(i.OtherInput, {
|
|
209
|
+
className: t
|
|
210
|
+
})), /* @__PURE__ */ e.createElement(i.Error, {
|
|
211
|
+
className: S(le, y.error)
|
|
212
|
+
}, /* @__PURE__ */ e.createElement(ne, null), /* @__PURE__ */ e.createElement(i.Error.Text, null)), /* @__PURE__ */ e.createElement(i.Description, {
|
|
213
|
+
className: S(ie, y.description)
|
|
214
|
+
}, Le));
|
|
215
|
+
};
|
|
216
|
+
export {
|
|
217
|
+
$e as T
|
|
218
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
2
|
+
import l from "classnames";
|
|
3
|
+
import r, { useCallback as O, useRef as T } from "react";
|
|
4
|
+
import { TextField as y, TextArea as S } from "react-aria-components";
|
|
5
|
+
import { ai as p, af as d, ak as x } from "./form-B3KiRFhB.js";
|
|
6
|
+
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { D as g, E as h } from "./field-error-headless-D2CJ4Qk7.js";
|
|
8
|
+
import { L as v } from "./field-label-headless-D2-WvVKT.js";
|
|
9
|
+
import { E as M } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
+
import { s as c } from "./field-rac.module-D06m9T9x.js";
|
|
11
|
+
import { y as q, O as B, o as k, i as P } from "./form-element-classes-Ct1UaxuQ.js";
|
|
12
|
+
import { u as V } from "./use-text-input-class-name-Qk2v8a6-.js";
|
|
13
|
+
const e = ({ children: t }) => {
|
|
14
|
+
const { id: a, value: m, onChange: s, disabled: u, required: n, readOnly: o, onBlur: E, onFocus: f, FieldLayout: I, hasError: b } = p(), { labelId: F } = d(), L = O((A) => {
|
|
15
|
+
s(A);
|
|
16
|
+
}, [
|
|
17
|
+
s
|
|
18
|
+
]), R = i(t, e.Label), D = i(t, e.Input), _ = i(t, e.Description), C = i(t, e.Error);
|
|
19
|
+
return /* @__PURE__ */ r.createElement(I, {
|
|
20
|
+
fieldId: a,
|
|
21
|
+
renderLabel: () => R,
|
|
22
|
+
renderInput: () => /* @__PURE__ */ r.createElement(y, {
|
|
23
|
+
"aria-labelledby": F,
|
|
24
|
+
value: m ?? "",
|
|
25
|
+
onChange: L,
|
|
26
|
+
isDisabled: u,
|
|
27
|
+
isReadOnly: o,
|
|
28
|
+
isRequired: n,
|
|
29
|
+
isInvalid: b,
|
|
30
|
+
onBlur: E,
|
|
31
|
+
onFocus: f
|
|
32
|
+
}, D),
|
|
33
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, C, _)
|
|
34
|
+
});
|
|
35
|
+
}, w = ({ className: t }) => {
|
|
36
|
+
const { inputId: a, ariaDescribedBy: m } = d(), { id: s, placeholder: u } = p(), n = T(null);
|
|
37
|
+
return x(() => {
|
|
38
|
+
var o;
|
|
39
|
+
(o = n.current) == null || o.focus();
|
|
40
|
+
}, s), /* @__PURE__ */ r.createElement(S, {
|
|
41
|
+
ref: n,
|
|
42
|
+
id: a,
|
|
43
|
+
"aria-describedby": m,
|
|
44
|
+
placeholder: u,
|
|
45
|
+
className: t
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
e.Label = v;
|
|
49
|
+
e.Input = w;
|
|
50
|
+
e.Description = g;
|
|
51
|
+
e.Error = h;
|
|
52
|
+
const Q = "_input_ug5v8_1", U = {
|
|
53
|
+
input: Q
|
|
54
|
+
}, $ = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(N, {
|
|
55
|
+
content: t,
|
|
56
|
+
locale: a
|
|
57
|
+
}), te = () => {
|
|
58
|
+
const t = V(U.input);
|
|
59
|
+
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
60
|
+
className: l(q, c.label)
|
|
61
|
+
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
62
|
+
className: l(B, c.requiredMark)
|
|
63
|
+
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
64
|
+
className: t
|
|
65
|
+
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
66
|
+
className: l(k, c.error)
|
|
67
|
+
}, /* @__PURE__ */ r.createElement(M, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
68
|
+
className: l(P, c.description)
|
|
69
|
+
}, $));
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
te as T
|
|
73
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { RicosViewer as l } from "@wix/ricos/viewer";
|
|
2
|
+
import t from "classnames";
|
|
3
|
+
import e from "react";
|
|
4
|
+
import { T as r } from "./text-input-headless-5yKhWpLD.js";
|
|
5
|
+
import { E as o } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
+
import { s as a } from "./field-rac.module-D06m9T9x.js";
|
|
7
|
+
import { y as n, O as c, o as E, i } from "./form-element-classes-Ct1UaxuQ.js";
|
|
8
|
+
import { u as p } from "./use-text-input-class-name-Qk2v8a6-.js";
|
|
9
|
+
const I = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
|
|
10
|
+
content: s,
|
|
11
|
+
locale: m
|
|
12
|
+
}), C = () => {
|
|
13
|
+
const s = p();
|
|
14
|
+
return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
15
|
+
className: t(n, a.label)
|
|
16
|
+
}, /* @__PURE__ */ e.createElement(r.Label.Required, {
|
|
17
|
+
className: t(c, a.requiredMark)
|
|
18
|
+
})), /* @__PURE__ */ e.createElement(r.Input, {
|
|
19
|
+
className: s
|
|
20
|
+
}), /* @__PURE__ */ e.createElement(r.Error, {
|
|
21
|
+
className: t(E, a.error)
|
|
22
|
+
}, /* @__PURE__ */ e.createElement(o, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
23
|
+
className: t(i, a.description)
|
|
24
|
+
}, I));
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
C as T
|
|
28
|
+
};
|
|
@@ -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 { ai as d, af as c, ak as T } from "./form-
|
|
3
|
+
import { ai as d, af as c, ak as T } from "./form-B3KiRFhB.js";
|
|
4
4
|
import { f as a } 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-D2CJ4Qk7.js";
|
|
6
|
+
import { L as x } from "./field-label-headless-D2-WvVKT.js";
|
|
7
7
|
const e = ({ children: r }) => {
|
|
8
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
9
|
return /* @__PURE__ */ t.createElement(b, {
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import e, { useCallback as V, useRef as x, useContext as k } from "react";
|
|
2
|
+
import { RicosViewer as q } from "@wix/ricos/viewer";
|
|
3
|
+
import c from "classnames";
|
|
4
|
+
import { parseTime as v } from "@internationalized/date";
|
|
5
|
+
import { TimeField as B, DateInput as U, DateSegment as _, TimeFieldStateContext as w } from "react-aria-components";
|
|
6
|
+
import { ai as p, af as j, as as S, ak as Q } from "./form-B3KiRFhB.js";
|
|
7
|
+
import { f as m, a as F } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { D as z, E as G } from "./field-error-headless-D2CJ4Qk7.js";
|
|
9
|
+
import { L as J } from "./field-label-headless-D2-WvVKT.js";
|
|
10
|
+
import { E as K } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
+
import { H as T } from "./custom-focus-class-_483Pkwp.js";
|
|
12
|
+
import { s as f } from "./field-rac.module-D06m9T9x.js";
|
|
13
|
+
import { y as W, O as X, o as Y, i as Z } from "./form-element-classes-Ct1UaxuQ.js";
|
|
14
|
+
import { u as $ } from "./use-text-input-class-name-Qk2v8a6-.js";
|
|
15
|
+
const r = ({ children: t }) => {
|
|
16
|
+
const { id: n, value: l, onChange: o, disabled: i, readOnly: s, required: a, onBlur: d, onFocus: E, use24HourFormat: C, FieldLayout: g, hasError: I } = p(), { inputId: D, ariaDescribedBy: L, labelId: R } = j(), b = V((M) => {
|
|
17
|
+
const H = ae(M);
|
|
18
|
+
o(H);
|
|
19
|
+
}, [
|
|
20
|
+
o
|
|
21
|
+
]), N = m(t, r.Label), y = m(t, r.Time), O = m(t, r.Description), P = m(t, r.Error), A = ne(l);
|
|
22
|
+
return /* @__PURE__ */ e.createElement(g, {
|
|
23
|
+
fieldId: n,
|
|
24
|
+
renderLabel: () => N,
|
|
25
|
+
renderInput: () => /* @__PURE__ */ e.createElement(B, {
|
|
26
|
+
"aria-labelledby": R,
|
|
27
|
+
id: D,
|
|
28
|
+
"aria-describedby": L,
|
|
29
|
+
value: A,
|
|
30
|
+
onChange: b,
|
|
31
|
+
isDisabled: i,
|
|
32
|
+
isReadOnly: s,
|
|
33
|
+
isInvalid: I,
|
|
34
|
+
isRequired: a,
|
|
35
|
+
onBlur: d,
|
|
36
|
+
onFocus: E,
|
|
37
|
+
hourCycle: C ? 24 : 12
|
|
38
|
+
}, y),
|
|
39
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, P, O)
|
|
40
|
+
});
|
|
41
|
+
}, u = ({ children: t, className: n }) => {
|
|
42
|
+
const { hasError: l } = p(), o = m(t, u.Hour), i = m(t, u.Minute), s = m(t, u.Period);
|
|
43
|
+
return /* @__PURE__ */ e.createElement(U, {
|
|
44
|
+
className: n,
|
|
45
|
+
"data-invalid": l || void 0
|
|
46
|
+
}, (a) => {
|
|
47
|
+
switch (a.type) {
|
|
48
|
+
case "hour":
|
|
49
|
+
return F(o, {
|
|
50
|
+
segment: a
|
|
51
|
+
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
52
|
+
case "minute":
|
|
53
|
+
return F(i, {
|
|
54
|
+
segment: a
|
|
55
|
+
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
56
|
+
case "dayPeriod":
|
|
57
|
+
return F(s, {
|
|
58
|
+
segment: a
|
|
59
|
+
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
60
|
+
case "literal":
|
|
61
|
+
return /* @__PURE__ */ e.createElement(_, {
|
|
62
|
+
segment: a
|
|
63
|
+
});
|
|
64
|
+
default:
|
|
65
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}, ee = ({ className: t, ...n }) => {
|
|
69
|
+
const { id: l, hidePlaceholder: o } = p(), { segment: i } = n, { t: s } = S(), a = x(null);
|
|
70
|
+
Q(() => {
|
|
71
|
+
var E;
|
|
72
|
+
(E = a.current) == null || E.focus();
|
|
73
|
+
}, l);
|
|
74
|
+
const d = o ? void 0 : s("field.date.placeholder.hour");
|
|
75
|
+
return /* @__PURE__ */ e.createElement(_, {
|
|
76
|
+
ref: a,
|
|
77
|
+
segment: i,
|
|
78
|
+
className: t,
|
|
79
|
+
...d && {
|
|
80
|
+
placeholder: d
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}, te = ({ className: t, ...n }) => {
|
|
84
|
+
const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = S(), s = l ? void 0 : i("field.date.placeholder.minute");
|
|
85
|
+
return /* @__PURE__ */ e.createElement(_, {
|
|
86
|
+
segment: o,
|
|
87
|
+
className: t,
|
|
88
|
+
...s && {
|
|
89
|
+
placeholder: s
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}, re = ({ className: t, ...n }) => {
|
|
93
|
+
const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = S(), s = k(w), a = l ? void 0 : i("field.date.placeholder.period"), d = () => s == null ? void 0 : s.increment("dayPeriod");
|
|
94
|
+
return /* @__PURE__ */ e.createElement(_, {
|
|
95
|
+
segment: o,
|
|
96
|
+
className: t,
|
|
97
|
+
onClick: d,
|
|
98
|
+
...a && {
|
|
99
|
+
placeholder: a
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
u.Hour = ee;
|
|
104
|
+
u.Minute = te;
|
|
105
|
+
u.Period = re;
|
|
106
|
+
r.Label = J;
|
|
107
|
+
r.Time = u;
|
|
108
|
+
r.Description = z;
|
|
109
|
+
r.Error = G;
|
|
110
|
+
function ne(t) {
|
|
111
|
+
if (!t)
|
|
112
|
+
return null;
|
|
113
|
+
try {
|
|
114
|
+
return v(t);
|
|
115
|
+
} catch {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function ae(t) {
|
|
120
|
+
if (!t)
|
|
121
|
+
return null;
|
|
122
|
+
const n = String(t.hour).padStart(2, "0"), l = String(t.minute).padStart(2, "0"), o = String(t.second).padStart(2, "0");
|
|
123
|
+
return [
|
|
124
|
+
n,
|
|
125
|
+
l,
|
|
126
|
+
o
|
|
127
|
+
].join(":");
|
|
128
|
+
}
|
|
129
|
+
const oe = "_time_10p0h_1", se = "_hour_10p0h_14", le = "_minute_10p0h_15", ie = "_period_10p0h_16", h = {
|
|
130
|
+
time: oe,
|
|
131
|
+
hour: se,
|
|
132
|
+
minute: le,
|
|
133
|
+
period: ie
|
|
134
|
+
}, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(q, {
|
|
135
|
+
content: t,
|
|
136
|
+
locale: n
|
|
137
|
+
}), me = () => {
|
|
138
|
+
const t = $(h.time);
|
|
139
|
+
return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
140
|
+
className: c(W, f.label)
|
|
141
|
+
}, /* @__PURE__ */ e.createElement(r.Label.Required, {
|
|
142
|
+
className: c(X, f.requiredMark)
|
|
143
|
+
})), /* @__PURE__ */ e.createElement(r.Time, {
|
|
144
|
+
className: t
|
|
145
|
+
}, /* @__PURE__ */ e.createElement(r.Time.Hour, {
|
|
146
|
+
className: c(h.hour, T)
|
|
147
|
+
}), /* @__PURE__ */ e.createElement(r.Time.Minute, {
|
|
148
|
+
className: c(h.minute, T)
|
|
149
|
+
}), /* @__PURE__ */ e.createElement(r.Time.Period, {
|
|
150
|
+
className: c(h.period, T)
|
|
151
|
+
})), /* @__PURE__ */ e.createElement(r.Error, {
|
|
152
|
+
className: c(Y, f.error)
|
|
153
|
+
}, /* @__PURE__ */ e.createElement(K, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
154
|
+
className: c(Z, f.description)
|
|
155
|
+
}, ce));
|
|
156
|
+
}, Le = () => /* @__PURE__ */ e.createElement(me, null);
|
|
157
|
+
export {
|
|
158
|
+
Le as TimeInputRAC
|
|
159
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { RicosViewer as O } from "@wix/ricos/viewer";
|
|
2
|
+
import i from "classnames";
|
|
3
|
+
import r, { useCallback as S, useRef as h } from "react";
|
|
4
|
+
import { TextField as y, Input as A } from "react-aria-components";
|
|
5
|
+
import { ai as d, af as E, ak as k } from "./form-B3KiRFhB.js";
|
|
6
|
+
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { D as B, E as T } from "./field-error-headless-D2CJ4Qk7.js";
|
|
8
|
+
import { L as g } from "./field-label-headless-D2-WvVKT.js";
|
|
9
|
+
import { u as v } from "./use-invoke-callback-UH73A_J3.js";
|
|
10
|
+
import { E as M } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
+
import { s as u } from "./field-rac.module-D06m9T9x.js";
|
|
12
|
+
import { y as P, O as q, o as x, i as U } from "./form-element-classes-Ct1UaxuQ.js";
|
|
13
|
+
import { u as w } from "./use-text-input-class-name-Qk2v8a6-.js";
|
|
14
|
+
const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
|
|
15
|
+
const { id: o, value: a, onChange: s, disabled: m, readOnly: n, required: l, hasError: I, onBlur: f, onFocus: b, FieldLayout: R } = d(), { labelId: F } = E(), p = v(f), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), N = S(() => {
|
|
16
|
+
s(V(a)), p();
|
|
17
|
+
}, [
|
|
18
|
+
p,
|
|
19
|
+
s,
|
|
20
|
+
a
|
|
21
|
+
]);
|
|
22
|
+
return /* @__PURE__ */ r.createElement(R, {
|
|
23
|
+
fieldId: o,
|
|
24
|
+
renderLabel: () => L,
|
|
25
|
+
renderInput: () => /* @__PURE__ */ r.createElement(y, {
|
|
26
|
+
"aria-labelledby": F,
|
|
27
|
+
value: a ?? "",
|
|
28
|
+
onChange: s,
|
|
29
|
+
isDisabled: m,
|
|
30
|
+
isReadOnly: n,
|
|
31
|
+
isRequired: l,
|
|
32
|
+
isInvalid: I,
|
|
33
|
+
onBlur: N,
|
|
34
|
+
onFocus: b
|
|
35
|
+
}, D),
|
|
36
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, C)
|
|
37
|
+
});
|
|
38
|
+
}, W = ({ className: t }) => {
|
|
39
|
+
const { id: o, placeholder: a } = d(), { inputId: s, ariaDescribedBy: m } = E(), n = h(null);
|
|
40
|
+
return k(() => {
|
|
41
|
+
var l;
|
|
42
|
+
(l = n.current) == null || l.focus();
|
|
43
|
+
}, o), /* @__PURE__ */ r.createElement(A, {
|
|
44
|
+
ref: n,
|
|
45
|
+
id: s,
|
|
46
|
+
type: "url",
|
|
47
|
+
"aria-describedby": m,
|
|
48
|
+
className: t,
|
|
49
|
+
placeholder: a
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
e.Label = g;
|
|
53
|
+
e.Input = W;
|
|
54
|
+
e.Description = B;
|
|
55
|
+
e.Error = T;
|
|
56
|
+
const $ = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(O, {
|
|
57
|
+
content: t,
|
|
58
|
+
locale: o
|
|
59
|
+
}), oe = () => {
|
|
60
|
+
const t = w();
|
|
61
|
+
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
62
|
+
className: i(P, u.label)
|
|
63
|
+
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
64
|
+
className: i(q, u.requiredMark)
|
|
65
|
+
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
66
|
+
className: t
|
|
67
|
+
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
68
|
+
className: i(x, u.error)
|
|
69
|
+
}, /* @__PURE__ */ r.createElement(M, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
70
|
+
className: i(U, u.description)
|
|
71
|
+
}, $));
|
|
72
|
+
};
|
|
73
|
+
export {
|
|
74
|
+
oe as U
|
|
75
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import p from "classnames";
|
|
2
|
+
import { ac as E } from "./form-B3KiRFhB.js";
|
|
3
|
+
const k = ({ globalClasses: e, moduleClasses: c }) => {
|
|
4
|
+
var d;
|
|
5
|
+
const r = ((d = E(e.key)) == null ? void 0 : d.split(/\s+/)) ?? [], o = [
|
|
6
|
+
e.selected,
|
|
7
|
+
e.hover
|
|
8
|
+
], u = !!e.selected && r.includes(e.selected), N = r.includes(e.hover);
|
|
9
|
+
return ({ isSelected: m, isHovered: n, isInteractive: t = !0 }) => p(e.base, c.base, t ? r : r.filter((h) => !o.includes(h)), {
|
|
10
|
+
[e.hover]: t && n,
|
|
11
|
+
[c.hover]: t && (n || N)
|
|
12
|
+
}, e.selected && {
|
|
13
|
+
[e.selected]: t && m
|
|
14
|
+
}, c.selected && {
|
|
15
|
+
[c.selected]: t && (m || u)
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
k as u
|
|
20
|
+
};
|
package/dist/component/{use-service-options-base-CRgxxz7b.js → use-service-options-base-UyJmT2P6.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState as o, useCallback as D, useEffect as m, useMemo as b } from "react";
|
|
2
|
-
import { ah as v } from "./form-
|
|
2
|
+
import { ah as v } from "./form-B3KiRFhB.js";
|
|
3
3
|
const k = (h) => {
|
|
4
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) => ({
|