@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
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as O } from "@wix/ricos/viewer";
|
|
2
|
-
import n from "classnames";
|
|
3
|
-
import r, { useCallback as S, useRef as T } from "react";
|
|
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-f0tqdMye.js";
|
|
6
|
-
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as h, E as M } from "./field-error-headless-BErhh9GG.js";
|
|
8
|
-
import { L as g } from "./field-label-headless-BGyK-5xW.js";
|
|
9
|
-
import { E as v } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
-
import { s } from "./field-rac.module-ColNPUt0.js";
|
|
11
|
-
import { y as q, O as B, x as k, o as P, i as U } from "./form-element-classes-jC8D0LnK.js";
|
|
12
|
-
const e = ({ children: t }) => {
|
|
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 = S((C) => {
|
|
14
|
-
l(C);
|
|
15
|
-
}, [
|
|
16
|
-
l
|
|
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(I, {
|
|
19
|
-
fieldId: a,
|
|
20
|
-
renderLabel: () => _,
|
|
21
|
-
renderInput: () => /* @__PURE__ */ r.createElement(y, {
|
|
22
|
-
"aria-labelledby": L,
|
|
23
|
-
value: m ?? "",
|
|
24
|
-
onChange: R,
|
|
25
|
-
isDisabled: u,
|
|
26
|
-
isReadOnly: i,
|
|
27
|
-
isRequired: o,
|
|
28
|
-
isInvalid: F,
|
|
29
|
-
onBlur: p,
|
|
30
|
-
onFocus: f
|
|
31
|
-
}, b),
|
|
32
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, D)
|
|
33
|
-
});
|
|
34
|
-
}, V = ({ className: t }) => {
|
|
35
|
-
const { inputId: a, ariaDescribedBy: m } = d(), { id: l, placeholder: u } = E(), o = T(null);
|
|
36
|
-
return x(() => {
|
|
37
|
-
var i;
|
|
38
|
-
(i = o.current) == null || i.focus();
|
|
39
|
-
}, l), /* @__PURE__ */ r.createElement(N, {
|
|
40
|
-
ref: o,
|
|
41
|
-
id: a,
|
|
42
|
-
"aria-describedby": m,
|
|
43
|
-
placeholder: u,
|
|
44
|
-
className: t
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
e.Label = g;
|
|
48
|
-
e.Input = V;
|
|
49
|
-
e.Description = h;
|
|
50
|
-
e.Error = M;
|
|
51
|
-
const w = "_input_ug5v8_1", Q = {
|
|
52
|
-
input: w
|
|
53
|
-
}, $ = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(O, {
|
|
54
|
-
content: t,
|
|
55
|
-
locale: a
|
|
56
|
-
}), re = () => /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
57
|
-
className: n(q, s.label)
|
|
58
|
-
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
59
|
-
className: n(B, s.requiredMark)
|
|
60
|
-
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
61
|
-
className: n(k, s.input, Q.input)
|
|
62
|
-
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
63
|
-
className: n(P, s.error)
|
|
64
|
-
}, /* @__PURE__ */ r.createElement(v, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
65
|
-
className: n(U, s.description)
|
|
66
|
-
}, $));
|
|
67
|
-
export {
|
|
68
|
-
re as T
|
|
69
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
|
-
import t from "classnames";
|
|
3
|
-
import e from "react";
|
|
4
|
-
import { T as r } from "./text-input-headless-BwVLU9cp.js";
|
|
5
|
-
import { E as o } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
-
import { s as a } from "./field-rac.module-ColNPUt0.js";
|
|
7
|
-
import { y as n, O as c, x as E, o as i, i as R } from "./form-element-classes-jC8D0LnK.js";
|
|
8
|
-
const _ = ({ content: s, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
9
|
-
content: s,
|
|
10
|
-
locale: l
|
|
11
|
-
}), N = () => /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
12
|
-
className: t(n, a.label)
|
|
13
|
-
}, /* @__PURE__ */ e.createElement(r.Label.Required, {
|
|
14
|
-
className: t(c, a.requiredMark)
|
|
15
|
-
})), /* @__PURE__ */ e.createElement(r.Input, {
|
|
16
|
-
className: t(E, a.input)
|
|
17
|
-
}), /* @__PURE__ */ e.createElement(r.Error, {
|
|
18
|
-
className: t(i, a.error)
|
|
19
|
-
}, /* @__PURE__ */ e.createElement(o, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
20
|
-
className: t(R, a.description)
|
|
21
|
-
}, _));
|
|
22
|
-
export {
|
|
23
|
-
N as T
|
|
24
|
-
};
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import e, { useCallback as H, useRef as V, useContext as x } from "react";
|
|
2
|
-
import { RicosViewer as k } from "@wix/ricos/viewer";
|
|
3
|
-
import c from "classnames";
|
|
4
|
-
import { parseTime as q } from "@internationalized/date";
|
|
5
|
-
import { TimeField as v, 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 Q } from "./form-f0tqdMye.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-BErhh9GG.js";
|
|
9
|
-
import { L as J } from "./field-label-headless-BGyK-5xW.js";
|
|
10
|
-
import { E as K } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
-
import { H as S } from "./custom-focus-class-_483Pkwp.js";
|
|
12
|
-
import { s as E } from "./field-rac.module-ColNPUt0.js";
|
|
13
|
-
import { y as W, O as X, x as Y, o as Z, i as $ } from "./form-element-classes-jC8D0LnK.js";
|
|
14
|
-
const r = ({ children: t }) => {
|
|
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
|
-
const w = ae(M);
|
|
17
|
-
o(w);
|
|
18
|
-
}, [
|
|
19
|
-
o
|
|
20
|
-
]), y = m(t, r.Label), N = m(t, r.Time), O = m(t, r.Description), P = m(t, r.Error), A = ne(l);
|
|
21
|
-
return /* @__PURE__ */ e.createElement(I, {
|
|
22
|
-
fieldId: n,
|
|
23
|
-
renderLabel: () => y,
|
|
24
|
-
renderInput: () => /* @__PURE__ */ e.createElement(v, {
|
|
25
|
-
"aria-labelledby": D,
|
|
26
|
-
id: L,
|
|
27
|
-
"aria-describedby": g,
|
|
28
|
-
value: A,
|
|
29
|
-
onChange: R,
|
|
30
|
-
isDisabled: i,
|
|
31
|
-
isReadOnly: s,
|
|
32
|
-
isInvalid: C,
|
|
33
|
-
isRequired: a,
|
|
34
|
-
onBlur: d,
|
|
35
|
-
onFocus: f,
|
|
36
|
-
hourCycle: b ? 24 : 12
|
|
37
|
-
}, N),
|
|
38
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, P, O)
|
|
39
|
-
});
|
|
40
|
-
}, u = ({ children: t, className: n }) => {
|
|
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
|
-
className: n,
|
|
44
|
-
"data-invalid": l || void 0
|
|
45
|
-
}, (a) => {
|
|
46
|
-
switch (a.type) {
|
|
47
|
-
case "hour":
|
|
48
|
-
return F(o, {
|
|
49
|
-
segment: a
|
|
50
|
-
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
51
|
-
case "minute":
|
|
52
|
-
return F(i, {
|
|
53
|
-
segment: a
|
|
54
|
-
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
55
|
-
case "dayPeriod":
|
|
56
|
-
return F(s, {
|
|
57
|
-
segment: a
|
|
58
|
-
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
59
|
-
case "literal":
|
|
60
|
-
return /* @__PURE__ */ e.createElement(h, {
|
|
61
|
-
segment: a
|
|
62
|
-
});
|
|
63
|
-
default:
|
|
64
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}, ee = ({ className: t, ...n }) => {
|
|
68
|
-
const { id: l, hidePlaceholder: o } = p(), { segment: i } = n, { t: s } = T(), a = V(null);
|
|
69
|
-
Q(() => {
|
|
70
|
-
var f;
|
|
71
|
-
(f = a.current) == null || f.focus();
|
|
72
|
-
}, l);
|
|
73
|
-
const d = o ? void 0 : s("field.date.placeholder.hour");
|
|
74
|
-
return /* @__PURE__ */ e.createElement(h, {
|
|
75
|
-
ref: a,
|
|
76
|
-
segment: i,
|
|
77
|
-
className: t,
|
|
78
|
-
...d && {
|
|
79
|
-
placeholder: d
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
}, te = ({ className: t, ...n }) => {
|
|
83
|
-
const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = T(), s = l ? void 0 : i("field.date.placeholder.minute");
|
|
84
|
-
return /* @__PURE__ */ e.createElement(h, {
|
|
85
|
-
segment: o,
|
|
86
|
-
className: t,
|
|
87
|
-
...s && {
|
|
88
|
-
placeholder: s
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
}, re = ({ className: t, ...n }) => {
|
|
92
|
-
const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = T(), s = x(U), a = l ? void 0 : i("field.date.placeholder.period"), d = () => s == null ? void 0 : s.increment("dayPeriod");
|
|
93
|
-
return /* @__PURE__ */ e.createElement(h, {
|
|
94
|
-
segment: o,
|
|
95
|
-
className: t,
|
|
96
|
-
onClick: d,
|
|
97
|
-
...a && {
|
|
98
|
-
placeholder: a
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
u.Hour = ee;
|
|
103
|
-
u.Minute = te;
|
|
104
|
-
u.Period = re;
|
|
105
|
-
r.Label = J;
|
|
106
|
-
r.Time = u;
|
|
107
|
-
r.Description = z;
|
|
108
|
-
r.Error = G;
|
|
109
|
-
function ne(t) {
|
|
110
|
-
if (!t)
|
|
111
|
-
return null;
|
|
112
|
-
try {
|
|
113
|
-
return q(t);
|
|
114
|
-
} catch {
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
function ae(t) {
|
|
119
|
-
if (!t)
|
|
120
|
-
return null;
|
|
121
|
-
const n = String(t.hour).padStart(2, "0"), l = String(t.minute).padStart(2, "0"), o = String(t.second).padStart(2, "0");
|
|
122
|
-
return [
|
|
123
|
-
n,
|
|
124
|
-
l,
|
|
125
|
-
o
|
|
126
|
-
].join(":");
|
|
127
|
-
}
|
|
128
|
-
const oe = "_time_1wbmw_1", se = "_hour_1wbmw_14", le = "_minute_1wbmw_15", ie = "_period_1wbmw_16", _ = {
|
|
129
|
-
time: oe,
|
|
130
|
-
hour: se,
|
|
131
|
-
minute: le,
|
|
132
|
-
period: ie
|
|
133
|
-
}, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(k, {
|
|
134
|
-
content: t,
|
|
135
|
-
locale: n
|
|
136
|
-
}), me = () => /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
137
|
-
className: c(W, E.label)
|
|
138
|
-
}, /* @__PURE__ */ e.createElement(r.Label.Required, {
|
|
139
|
-
className: c(X, E.requiredMark)
|
|
140
|
-
})), /* @__PURE__ */ e.createElement(r.Time, {
|
|
141
|
-
className: c(Y, E.input, _.time)
|
|
142
|
-
}, /* @__PURE__ */ e.createElement(r.Time.Hour, {
|
|
143
|
-
className: c(_.hour, S)
|
|
144
|
-
}), /* @__PURE__ */ e.createElement(r.Time.Minute, {
|
|
145
|
-
className: c(_.minute, S)
|
|
146
|
-
}), /* @__PURE__ */ e.createElement(r.Time.Period, {
|
|
147
|
-
className: c(_.period, S)
|
|
148
|
-
})), /* @__PURE__ */ e.createElement(r.Error, {
|
|
149
|
-
className: c(Z, E.error)
|
|
150
|
-
}, /* @__PURE__ */ e.createElement(K, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
151
|
-
className: c($, E.description)
|
|
152
|
-
}, ce)), Le = () => /* @__PURE__ */ e.createElement(me, null);
|
|
153
|
-
export {
|
|
154
|
-
Le as TimeInputRAC
|
|
155
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as O } from "@wix/ricos/viewer";
|
|
2
|
-
import l from "classnames";
|
|
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 k } from "./form-f0tqdMye.js";
|
|
6
|
-
import { f as u } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as B, E as M } from "./field-error-headless-BErhh9GG.js";
|
|
8
|
-
import { L as P } from "./field-label-headless-BGyK-5xW.js";
|
|
9
|
-
import { u as T } from "./use-invoke-callback-UH73A_J3.js";
|
|
10
|
-
import { E as v } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
-
import { s } from "./field-rac.module-ColNPUt0.js";
|
|
12
|
-
import { y as U, O as g, x as q, o as x, i as w } from "./form-element-classes-jC8D0LnK.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
|
-
}, [
|
|
17
|
-
p,
|
|
18
|
-
a,
|
|
19
|
-
n
|
|
20
|
-
]);
|
|
21
|
-
return /* @__PURE__ */ r.createElement(L, {
|
|
22
|
-
fieldId: o,
|
|
23
|
-
renderLabel: () => b,
|
|
24
|
-
renderInput: () => /* @__PURE__ */ r.createElement(N, {
|
|
25
|
-
"aria-labelledby": R,
|
|
26
|
-
value: n ?? "",
|
|
27
|
-
onChange: a,
|
|
28
|
-
isDisabled: m,
|
|
29
|
-
isReadOnly: i,
|
|
30
|
-
isRequired: c,
|
|
31
|
-
isInvalid: I,
|
|
32
|
-
onBlur: S,
|
|
33
|
-
onFocus: F
|
|
34
|
-
}, D),
|
|
35
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, C, _)
|
|
36
|
-
});
|
|
37
|
-
}, W = ({ className: t }) => {
|
|
38
|
-
const { id: o, placeholder: n } = E(), { inputId: a, ariaDescribedBy: m } = d(), i = y(null);
|
|
39
|
-
return k(() => {
|
|
40
|
-
var c;
|
|
41
|
-
(c = i.current) == null || c.focus();
|
|
42
|
-
}, o), /* @__PURE__ */ r.createElement(A, {
|
|
43
|
-
ref: i,
|
|
44
|
-
id: a,
|
|
45
|
-
type: "url",
|
|
46
|
-
"aria-describedby": m,
|
|
47
|
-
className: t,
|
|
48
|
-
placeholder: n
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
e.Label = P;
|
|
52
|
-
e.Input = W;
|
|
53
|
-
e.Description = B;
|
|
54
|
-
e.Error = M;
|
|
55
|
-
const $ = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(O, {
|
|
56
|
-
content: t,
|
|
57
|
-
locale: o
|
|
58
|
-
}), te = () => /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
59
|
-
className: l(U, s.label)
|
|
60
|
-
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
61
|
-
className: l(g, s.requiredMark)
|
|
62
|
-
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
63
|
-
className: l(q, s.input)
|
|
64
|
-
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
65
|
-
className: l(x, s.error)
|
|
66
|
-
}, /* @__PURE__ */ r.createElement(v, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
67
|
-
className: l(w, s.description)
|
|
68
|
-
}, $));
|
|
69
|
-
export {
|
|
70
|
-
te as U
|
|
71
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import d from "classnames";
|
|
2
|
-
import { ac as s } from "./form-f0tqdMye.js";
|
|
3
|
-
const E = ({ globalClasses: e, moduleClasses: t }) => {
|
|
4
|
-
var c;
|
|
5
|
-
const r = ((c = s(e.key)) == null ? void 0 : c.split(/\s+/)) ?? [], m = r.includes(e.selected), o = r.includes(e.hover);
|
|
6
|
-
return ({ isSelected: n, isHovered: i }) => d(e.base, t.base, r, {
|
|
7
|
-
[e.selected]: n,
|
|
8
|
-
[e.hover]: i,
|
|
9
|
-
[t.selected]: n || m,
|
|
10
|
-
[t.hover]: i || o
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
E as u
|
|
15
|
-
};
|