@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
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ai as l } from "./form-B3KiRFhB.js";
|
|
2
|
+
import { s } from "./field-rac.module-D06m9T9x.js";
|
|
3
|
+
import { a0 as i } from "./form-element-classes-Ct1UaxuQ.js";
|
|
4
|
+
import { u as m } from "./use-element-state-class-name-CBjBYCW5.js";
|
|
5
|
+
const c = (...e) => {
|
|
6
|
+
const { disabled: a, readOnly: t } = l(), o = m({
|
|
7
|
+
globalClasses: i,
|
|
8
|
+
moduleClasses: {
|
|
9
|
+
base: [
|
|
10
|
+
s.input,
|
|
11
|
+
...e
|
|
12
|
+
].join(" "),
|
|
13
|
+
hover: s.inputHover
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
return ({ isHovered: r }) => o({
|
|
17
|
+
isSelected: !1,
|
|
18
|
+
isHovered: r,
|
|
19
|
+
isInteractive: !a && !t
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
c as u
|
|
24
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/form-elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.84.0",
|
|
4
4
|
"description": "The Wix Forms rendering element for Builder apps, loaded at runtime as @wix/form-elements/Form",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -151,5 +151,5 @@
|
|
|
151
151
|
]
|
|
152
152
|
}
|
|
153
153
|
},
|
|
154
|
-
"falconPackageHash": "
|
|
154
|
+
"falconPackageHash": "8169705a7c26cdc634e6c8f975f73267ca14c8ed077e9ff74e0c351c"
|
|
155
155
|
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as n } from "@wix/ricos/viewer";
|
|
2
|
-
import a from "classnames";
|
|
3
|
-
import e from "react";
|
|
4
|
-
import { C as t } from "./checkbox-group-field-headless-Bx5Y-RMP.js";
|
|
5
|
-
import { E as m } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
-
import { C as c } from "./checkbox-indicator-module-classes-DqzGZQRQ.js";
|
|
7
|
-
import { s } from "./field-rac.module-ColNPUt0.js";
|
|
8
|
-
import { y as i, O as E, c as O, e as p, x as C, o as _, i as L, d as R } from "./form-element-classes-jC8D0LnK.js";
|
|
9
|
-
import { o as r } from "./options-rac.module-KM-VT_KY.js";
|
|
10
|
-
import { u as I } from "./use-element-state-class-name-BqmaTba3.js";
|
|
11
|
-
const S = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(n, {
|
|
12
|
-
content: o,
|
|
13
|
-
locale: l
|
|
14
|
-
}), h = () => {
|
|
15
|
-
const o = I({
|
|
16
|
-
globalClasses: R,
|
|
17
|
-
moduleClasses: c
|
|
18
|
-
});
|
|
19
|
-
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
20
|
-
className: a(i, s.label)
|
|
21
|
-
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
22
|
-
className: a(E, s.requiredMark)
|
|
23
|
-
})), /* @__PURE__ */ e.createElement(t.Options, {
|
|
24
|
-
className: a(O, r.options)
|
|
25
|
-
}, /* @__PURE__ */ e.createElement(t.Options.Option, null, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox, {
|
|
26
|
-
className: s.checkbox
|
|
27
|
-
}, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Input, {
|
|
28
|
-
className: o
|
|
29
|
-
}), /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Label, {
|
|
30
|
-
className: a(p, r.optionLabel)
|
|
31
|
-
})), /* @__PURE__ */ e.createElement(t.Options.Option.OtherInput, {
|
|
32
|
-
inputClassName: a(C, s.input)
|
|
33
|
-
}))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
34
|
-
className: a(_, s.error)
|
|
35
|
-
}, /* @__PURE__ */ e.createElement(m, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
36
|
-
className: a(L, s.description)
|
|
37
|
-
}, S));
|
|
38
|
-
};
|
|
39
|
-
export {
|
|
40
|
-
h as C
|
|
41
|
-
};
|
|
@@ -1,422 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as ne } from "@wix/ricos/viewer";
|
|
2
|
-
import p from "classnames";
|
|
3
|
-
import t, { useMemo as O, useState as G, useCallback as w, useRef as z, useContext as re } from "react";
|
|
4
|
-
import { ai as g, af as K, ab as B, J as Q, a1 as W, r as d, as as T, a5 as j, O as oe, x as le, a8 as se, y as J, ak as $ } from "./form-f0tqdMye.js";
|
|
5
|
-
import { parseTime as ie } from "@internationalized/date";
|
|
6
|
-
import { UNSAFE_PortalProvider as ce } from "react-aria";
|
|
7
|
-
import { ListBoxItem as me, ListBox as de, Select as ue, TextField as X, TimeField as pe, SelectValue as Ee, Input as Z, DateInput as he, DateSegment as U, TimeFieldStateContext as fe } from "react-aria-components";
|
|
8
|
-
import { f as u, a as R } from "./find-child-C60k4CxG.js";
|
|
9
|
-
import { g as be } from "./helpers-HmkkXrh2.js";
|
|
10
|
-
import { D as ge, E as Ie } from "./field-error-headless-BErhh9GG.js";
|
|
11
|
-
import { L as _e } from "./field-label-headless-BGyK-5xW.js";
|
|
12
|
-
import { F as ye } from "./fieldset-headless-CD3fds9J.js";
|
|
13
|
-
import { N as De, S as Ne } from "./non-modal-popover-DtIMXHbe.js";
|
|
14
|
-
import { C as Le } from "./chevron-down-icon-CcpVm6B-.js";
|
|
15
|
-
import { E as Oe } from "./error-icon-hZxQ6DEy.js";
|
|
16
|
-
import { H as Y } from "./custom-focus-class-_483Pkwp.js";
|
|
17
|
-
import { s as E } from "./field-rac.module-ColNPUt0.js";
|
|
18
|
-
import { y as S, O as Te, x as H, A as Fe, o as Pe, i as Ce } from "./form-element-classes-jC8D0LnK.js";
|
|
19
|
-
const l = ({ children: e, className: a }) => {
|
|
20
|
-
const { id: n, required: o, onBlur: s, onFocus: r, FieldLayout: i } = g(), { inputId: m, labelId: c, ariaDescribedBy: f } = K(), { regionalFormat: b } = B(), y = O(() => Q(b).filter(W).map((M) => M.toUpperCase()), [
|
|
21
|
-
b
|
|
22
|
-
]), C = u(e, l.Label), v = u(e, l.Description), L = u(e, l.Error), _ = {
|
|
23
|
-
[d.MONTH]: u(e, l.Month),
|
|
24
|
-
[d.DAY]: u(e, l.Day),
|
|
25
|
-
[d.YEAR]: u(e, l.Year)
|
|
26
|
-
}, D = u(e, l.Time);
|
|
27
|
-
return /* @__PURE__ */ t.createElement(i, {
|
|
28
|
-
fieldId: n,
|
|
29
|
-
renderLabel: () => R(C, {
|
|
30
|
-
as: "div"
|
|
31
|
-
}),
|
|
32
|
-
renderInput: () => /* @__PURE__ */ t.createElement(ye, {
|
|
33
|
-
id: m,
|
|
34
|
-
ariaLabelledBy: c,
|
|
35
|
-
ariaDescribedBy: f,
|
|
36
|
-
required: o,
|
|
37
|
-
onBlur: s,
|
|
38
|
-
onFocus: r,
|
|
39
|
-
className: a
|
|
40
|
-
}, _[y[0]], _[y[1]], _[y[2]], D),
|
|
41
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, L, v)
|
|
42
|
-
});
|
|
43
|
-
}, F = ({ children: e, className: a }) => {
|
|
44
|
-
const { disabled: n, readOnly: o, showDateLabels: s, hidePlaceholder: r } = g(), { labelId: i } = N(d.MONTH), { partValue: m, partError: c, onPartChange: f } = P(d.MONTH), { t: b } = T(), [y, C] = G(!1), [v, L] = G(null), _ = r ? void 0 : b("field.date.placeholder.month"), D = w((V) => {
|
|
45
|
-
o || f(typeof V == "string" ? V : "");
|
|
46
|
-
}, [
|
|
47
|
-
f,
|
|
48
|
-
o
|
|
49
|
-
]), M = w((V) => {
|
|
50
|
-
C(V && !o);
|
|
51
|
-
}, [
|
|
52
|
-
o
|
|
53
|
-
]), ee = u(e, F.Label), te = u(e, F.Trigger), ae = u(e, F.Options);
|
|
54
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
55
|
-
className: a,
|
|
56
|
-
"data-date-field": !0
|
|
57
|
-
}, s ? ee : null, /* @__PURE__ */ t.createElement("div", {
|
|
58
|
-
ref: L,
|
|
59
|
-
style: {
|
|
60
|
-
display: "contents"
|
|
61
|
-
}
|
|
62
|
-
}), /* @__PURE__ */ t.createElement(ce, {
|
|
63
|
-
getContainer: () => v
|
|
64
|
-
}, /* @__PURE__ */ t.createElement(ue, {
|
|
65
|
-
"aria-labelledby": s ? i : void 0,
|
|
66
|
-
value: m || null,
|
|
67
|
-
onChange: D,
|
|
68
|
-
isDisabled: n,
|
|
69
|
-
isInvalid: c,
|
|
70
|
-
placeholder: _,
|
|
71
|
-
isOpen: y,
|
|
72
|
-
onOpenChange: M
|
|
73
|
-
}, te, ae)));
|
|
74
|
-
}, Me = ({ className: e }) => /* @__PURE__ */ t.createElement(q, {
|
|
75
|
-
datePart: d.MONTH,
|
|
76
|
-
className: e
|
|
77
|
-
}), Se = ({ children: e, className: a }) => {
|
|
78
|
-
const { id: n, readOnly: o } = g(), { inputId: s } = N(d.MONTH), { partError: r, isFirstPart: i } = P(d.MONTH), m = z(null);
|
|
79
|
-
return $(() => {
|
|
80
|
-
var c;
|
|
81
|
-
i && ((c = m.current) == null || c.focus());
|
|
82
|
-
}, n), /* @__PURE__ */ t.createElement(Ne, {
|
|
83
|
-
ref: m,
|
|
84
|
-
id: s,
|
|
85
|
-
className: a,
|
|
86
|
-
"data-hook": d.MONTH,
|
|
87
|
-
"data-invalid": r || void 0,
|
|
88
|
-
"data-readonly": o || void 0
|
|
89
|
-
}, /* @__PURE__ */ t.createElement(Ee, null), e);
|
|
90
|
-
}, x = ({ children: e, className: a }) => {
|
|
91
|
-
const { language: n } = B(), o = O(() => be(n), [
|
|
92
|
-
n
|
|
93
|
-
]), s = u(e, x.Option) ?? /* @__PURE__ */ t.createElement(x.Option, null);
|
|
94
|
-
return /* @__PURE__ */ t.createElement(De, {
|
|
95
|
-
className: a,
|
|
96
|
-
containerPadding: 0,
|
|
97
|
-
offset: 0
|
|
98
|
-
}, /* @__PURE__ */ t.createElement(de, null, o.map((r, i) => R(s, {
|
|
99
|
-
key: String(i + 1),
|
|
100
|
-
value: String(i + 1),
|
|
101
|
-
label: r
|
|
102
|
-
}))));
|
|
103
|
-
}, Re = ({ className: e, ...a }) => {
|
|
104
|
-
const { value: n, label: o } = a;
|
|
105
|
-
return /* @__PURE__ */ t.createElement(me, {
|
|
106
|
-
className: e,
|
|
107
|
-
id: n,
|
|
108
|
-
textValue: o
|
|
109
|
-
}, o);
|
|
110
|
-
};
|
|
111
|
-
F.Label = Me;
|
|
112
|
-
F.Trigger = Se;
|
|
113
|
-
F.Options = x;
|
|
114
|
-
x.Option = Re;
|
|
115
|
-
const A = ({ children: e, className: a }) => {
|
|
116
|
-
const { disabled: n, readOnly: o, showDateLabels: s } = g(), { labelId: r } = N(d.DAY), { partValue: i, partError: m, onPartChange: c } = P(d.DAY), f = u(e, A.Label), b = u(e, A.Input);
|
|
117
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
118
|
-
className: a,
|
|
119
|
-
"data-date-field": !0
|
|
120
|
-
}, s && f, /* @__PURE__ */ t.createElement(X, {
|
|
121
|
-
"aria-labelledby": s ? r : void 0,
|
|
122
|
-
value: i,
|
|
123
|
-
onChange: c,
|
|
124
|
-
isDisabled: n,
|
|
125
|
-
isReadOnly: o,
|
|
126
|
-
isInvalid: m
|
|
127
|
-
}, b));
|
|
128
|
-
}, Ae = ({ className: e }) => /* @__PURE__ */ t.createElement(q, {
|
|
129
|
-
datePart: d.DAY,
|
|
130
|
-
className: e
|
|
131
|
-
}), ke = ({ className: e }) => {
|
|
132
|
-
const { id: a, hidePlaceholder: n } = g(), { inputId: o } = N(d.DAY), { isFirstPart: s } = P(d.DAY), { t: r } = T(), i = z(null), m = n ? void 0 : r("field.date.placeholder.day");
|
|
133
|
-
return $(() => {
|
|
134
|
-
var c;
|
|
135
|
-
s && ((c = i.current) == null || c.focus());
|
|
136
|
-
}, a), /* @__PURE__ */ t.createElement(Z, {
|
|
137
|
-
ref: i,
|
|
138
|
-
id: o,
|
|
139
|
-
className: e,
|
|
140
|
-
placeholder: m,
|
|
141
|
-
maxLength: 2,
|
|
142
|
-
inputMode: "numeric",
|
|
143
|
-
"data-hook": d.DAY
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
A.Label = Ae;
|
|
147
|
-
A.Input = ke;
|
|
148
|
-
const k = ({ children: e, className: a }) => {
|
|
149
|
-
const { disabled: n, readOnly: o, showDateLabels: s } = g(), { labelId: r } = N(d.YEAR), { partValue: i, partError: m, onPartChange: c } = P(d.YEAR), f = u(e, k.Label), b = u(e, k.Input);
|
|
150
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
151
|
-
className: a,
|
|
152
|
-
"data-date-field": !0
|
|
153
|
-
}, s && f, /* @__PURE__ */ t.createElement(X, {
|
|
154
|
-
"aria-labelledby": s ? r : void 0,
|
|
155
|
-
value: i,
|
|
156
|
-
onChange: c,
|
|
157
|
-
isDisabled: n,
|
|
158
|
-
isReadOnly: o,
|
|
159
|
-
isInvalid: m
|
|
160
|
-
}, b));
|
|
161
|
-
}, ve = ({ className: e }) => /* @__PURE__ */ t.createElement(q, {
|
|
162
|
-
datePart: d.YEAR,
|
|
163
|
-
className: e
|
|
164
|
-
}), Ve = ({ className: e }) => {
|
|
165
|
-
const { id: a, hidePlaceholder: n } = g(), { inputId: o } = N(d.YEAR), { isFirstPart: s } = P(d.YEAR), { t: r } = T(), i = z(null), m = n ? void 0 : r("field.date.placeholder.year");
|
|
166
|
-
return $(() => {
|
|
167
|
-
var c;
|
|
168
|
-
s && ((c = i.current) == null || c.focus());
|
|
169
|
-
}, a), /* @__PURE__ */ t.createElement(Z, {
|
|
170
|
-
ref: i,
|
|
171
|
-
id: o,
|
|
172
|
-
className: e,
|
|
173
|
-
placeholder: m,
|
|
174
|
-
maxLength: 4,
|
|
175
|
-
inputMode: "numeric",
|
|
176
|
-
"data-hook": d.YEAR
|
|
177
|
-
});
|
|
178
|
-
};
|
|
179
|
-
k.Label = ve;
|
|
180
|
-
k.Input = Ve;
|
|
181
|
-
const I = ({ children: e, className: a }) => {
|
|
182
|
-
const { disabled: n, readOnly: o, use24HourFormat: s, showDateLabels: r } = g(), { labelId: i } = N("time"), { partValue: m, partError: c, onPartChange: f } = P("time"), b = u(e, I.Label), y = u(e, I.Input);
|
|
183
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
184
|
-
className: a,
|
|
185
|
-
"data-date-field": !0
|
|
186
|
-
}, r && b, /* @__PURE__ */ t.createElement(pe, {
|
|
187
|
-
"aria-labelledby": r ? i : void 0,
|
|
188
|
-
value: m,
|
|
189
|
-
onChange: f,
|
|
190
|
-
isDisabled: n,
|
|
191
|
-
isReadOnly: o,
|
|
192
|
-
isInvalid: c,
|
|
193
|
-
hourCycle: s ? 24 : 12
|
|
194
|
-
}, y));
|
|
195
|
-
}, Ye = ({ className: e }) => {
|
|
196
|
-
const { inputId: a, labelId: n } = N("time"), { t: o } = T(), s = o("field.date.label.time");
|
|
197
|
-
return /* @__PURE__ */ t.createElement("label", {
|
|
198
|
-
id: n,
|
|
199
|
-
htmlFor: a,
|
|
200
|
-
className: e
|
|
201
|
-
}, s);
|
|
202
|
-
}, He = ({ children: e, className: a }) => {
|
|
203
|
-
const n = u(e, I.Hour), o = u(e, I.Minute), s = u(e, I.Period);
|
|
204
|
-
return /* @__PURE__ */ t.createElement(he, {
|
|
205
|
-
className: a,
|
|
206
|
-
"data-hook": "time"
|
|
207
|
-
}, (r) => {
|
|
208
|
-
switch (r.type) {
|
|
209
|
-
case "hour":
|
|
210
|
-
return R(n, {
|
|
211
|
-
segment: r
|
|
212
|
-
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
213
|
-
case "minute":
|
|
214
|
-
return R(o, {
|
|
215
|
-
segment: r
|
|
216
|
-
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
217
|
-
case "dayPeriod":
|
|
218
|
-
return R(s, {
|
|
219
|
-
segment: r
|
|
220
|
-
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
221
|
-
case "literal":
|
|
222
|
-
return /* @__PURE__ */ t.createElement(U, {
|
|
223
|
-
segment: r
|
|
224
|
-
});
|
|
225
|
-
default:
|
|
226
|
-
return /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
}, we = ({ className: e, ...a }) => {
|
|
230
|
-
const { hidePlaceholder: n } = g(), { segment: o } = a, { t: s } = T(), r = n ? void 0 : s("field.date.placeholder.hour");
|
|
231
|
-
return /* @__PURE__ */ t.createElement(U, {
|
|
232
|
-
segment: o,
|
|
233
|
-
className: e,
|
|
234
|
-
...r && {
|
|
235
|
-
placeholder: r
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
}, xe = ({ className: e, ...a }) => {
|
|
239
|
-
const { hidePlaceholder: n } = g(), { segment: o } = a, { t: s } = T(), r = n ? void 0 : s("field.date.placeholder.minute");
|
|
240
|
-
return /* @__PURE__ */ t.createElement(U, {
|
|
241
|
-
segment: o,
|
|
242
|
-
className: e,
|
|
243
|
-
...r && {
|
|
244
|
-
placeholder: r
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
}, Be = ({ className: e, ...a }) => {
|
|
248
|
-
const { hidePlaceholder: n } = g(), { segment: o } = a, { t: s } = T(), r = re(fe), i = n ? void 0 : s("field.date.placeholder.period"), m = () => r == null ? void 0 : r.increment("dayPeriod");
|
|
249
|
-
return /* @__PURE__ */ t.createElement(U, {
|
|
250
|
-
segment: o,
|
|
251
|
-
className: e,
|
|
252
|
-
onClick: m,
|
|
253
|
-
...i && {
|
|
254
|
-
placeholder: i
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
};
|
|
258
|
-
I.Label = Ye;
|
|
259
|
-
I.Input = He;
|
|
260
|
-
I.Hour = we;
|
|
261
|
-
I.Minute = xe;
|
|
262
|
-
I.Period = Be;
|
|
263
|
-
l.Label = _e;
|
|
264
|
-
l.Month = F;
|
|
265
|
-
l.Day = A;
|
|
266
|
-
l.Year = k;
|
|
267
|
-
l.Time = I;
|
|
268
|
-
l.Description = ge;
|
|
269
|
-
l.Error = Ie;
|
|
270
|
-
function N(e) {
|
|
271
|
-
const { inputId: a } = K();
|
|
272
|
-
return O(() => {
|
|
273
|
-
const n = e.toLowerCase();
|
|
274
|
-
return {
|
|
275
|
-
inputId: `${a}-${n}-input`,
|
|
276
|
-
labelId: `${a}-${n}-label`
|
|
277
|
-
};
|
|
278
|
-
}, [
|
|
279
|
-
a,
|
|
280
|
-
e
|
|
281
|
-
]);
|
|
282
|
-
}
|
|
283
|
-
function P(e) {
|
|
284
|
-
const { value: a, onChange: n, hasError: o = !1 } = g(), { regionalFormat: s } = B(), [r, i] = O(() => j(a ?? ""), [
|
|
285
|
-
a
|
|
286
|
-
]), m = O(() => oe(o, a ?? ""), [
|
|
287
|
-
a,
|
|
288
|
-
o
|
|
289
|
-
]), c = O(() => le(r), [
|
|
290
|
-
r
|
|
291
|
-
]), f = O(() => Ue(i), [
|
|
292
|
-
i
|
|
293
|
-
]), b = w((L) => {
|
|
294
|
-
const _ = ze(L), D = J(r, _);
|
|
295
|
-
n(D);
|
|
296
|
-
}, [
|
|
297
|
-
n,
|
|
298
|
-
r
|
|
299
|
-
]), y = w((L) => {
|
|
300
|
-
const [, _] = j(a ?? ""), D = se(L, e, c), M = J(D, _);
|
|
301
|
-
n(M);
|
|
302
|
-
}, [
|
|
303
|
-
n,
|
|
304
|
-
a,
|
|
305
|
-
c,
|
|
306
|
-
e
|
|
307
|
-
]), C = O(() => e === "time" ? !1 : Q(s).filter(W).map((D) => D.toUpperCase())[0] === e, [
|
|
308
|
-
s,
|
|
309
|
-
e
|
|
310
|
-
]);
|
|
311
|
-
return e === "time" ? {
|
|
312
|
-
partValue: f,
|
|
313
|
-
partError: m.TIME,
|
|
314
|
-
onPartChange: b,
|
|
315
|
-
isFirstPart: !1
|
|
316
|
-
} : {
|
|
317
|
-
partValue: c[e] || "",
|
|
318
|
-
partError: m[e],
|
|
319
|
-
onPartChange: y,
|
|
320
|
-
isFirstPart: C
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
function q({ datePart: e, className: a }) {
|
|
324
|
-
const { inputId: n, labelId: o } = N(e), { t: s } = T(), r = `field.date.label.${e.toLowerCase()}`, i = s(r);
|
|
325
|
-
return /* @__PURE__ */ t.createElement("label", {
|
|
326
|
-
id: o,
|
|
327
|
-
htmlFor: n,
|
|
328
|
-
className: a
|
|
329
|
-
}, i);
|
|
330
|
-
}
|
|
331
|
-
function Ue(e) {
|
|
332
|
-
if (!e)
|
|
333
|
-
return null;
|
|
334
|
-
try {
|
|
335
|
-
return ie(e);
|
|
336
|
-
} catch {
|
|
337
|
-
return null;
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
function ze(e) {
|
|
341
|
-
if (!e)
|
|
342
|
-
return null;
|
|
343
|
-
const a = String(e.hour).padStart(2, "0"), n = String(e.minute).padStart(2, "0"), o = String(e.second).padStart(2, "0");
|
|
344
|
-
return [
|
|
345
|
-
a,
|
|
346
|
-
n,
|
|
347
|
-
o
|
|
348
|
-
].join(":");
|
|
349
|
-
}
|
|
350
|
-
const $e = "_fields_1khoa_1", qe = "_month_1khoa_10", Ge = "_day_1khoa_11", je = "_year_1khoa_12", Je = "_timeGroup_1khoa_13", Ke = "_mobile_1khoa_32", Qe = "_dayInput_1khoa_45", We = "_yearInput_1khoa_46", Xe = "_monthTrigger_1khoa_50", Ze = "_monthOption_1khoa_70", et = "_time_1khoa_13", tt = "_hour_1khoa_89", at = "_minute_1khoa_90", nt = "_period_1khoa_91", h = {
|
|
351
|
-
fields: $e,
|
|
352
|
-
month: qe,
|
|
353
|
-
day: Ge,
|
|
354
|
-
year: je,
|
|
355
|
-
timeGroup: Je,
|
|
356
|
-
mobile: Ke,
|
|
357
|
-
dayInput: Qe,
|
|
358
|
-
yearInput: We,
|
|
359
|
-
monthTrigger: Xe,
|
|
360
|
-
monthOption: Ze,
|
|
361
|
-
time: et,
|
|
362
|
-
hour: tt,
|
|
363
|
-
minute: at,
|
|
364
|
-
period: nt
|
|
365
|
-
}, rt = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ne, {
|
|
366
|
-
content: e,
|
|
367
|
-
locale: a
|
|
368
|
-
}), Nt = () => {
|
|
369
|
-
const { isMobile: e } = B();
|
|
370
|
-
return /* @__PURE__ */ t.createElement(l, {
|
|
371
|
-
className: p(h.fields, {
|
|
372
|
-
[h.mobile]: e
|
|
373
|
-
})
|
|
374
|
-
}, /* @__PURE__ */ t.createElement(l.Label, {
|
|
375
|
-
className: p(S, E.label)
|
|
376
|
-
}, /* @__PURE__ */ t.createElement(l.Label.Required, {
|
|
377
|
-
className: p(Te, E.requiredMark)
|
|
378
|
-
})), /* @__PURE__ */ t.createElement(l.Month, {
|
|
379
|
-
className: h.month
|
|
380
|
-
}, /* @__PURE__ */ t.createElement(l.Month.Label, {
|
|
381
|
-
className: p(S, E.label)
|
|
382
|
-
}), /* @__PURE__ */ t.createElement(l.Month.Trigger, {
|
|
383
|
-
className: p(H, E.input, h.monthTrigger)
|
|
384
|
-
}, /* @__PURE__ */ t.createElement(Le, {
|
|
385
|
-
className: E.dropdownIcon
|
|
386
|
-
})), /* @__PURE__ */ t.createElement(l.Month.Options, {
|
|
387
|
-
className: p(Fe, E.selectPopover, E.dropdownPopover)
|
|
388
|
-
}, /* @__PURE__ */ t.createElement(l.Month.Options.Option, {
|
|
389
|
-
className: p(E.selectOption, h.monthOption, Y)
|
|
390
|
-
}))), /* @__PURE__ */ t.createElement(l.Day, {
|
|
391
|
-
className: h.day
|
|
392
|
-
}, /* @__PURE__ */ t.createElement(l.Day.Label, {
|
|
393
|
-
className: p(S, E.label)
|
|
394
|
-
}), /* @__PURE__ */ t.createElement(l.Day.Input, {
|
|
395
|
-
className: p(H, E.input, h.dayInput)
|
|
396
|
-
})), /* @__PURE__ */ t.createElement(l.Year, {
|
|
397
|
-
className: h.year
|
|
398
|
-
}, /* @__PURE__ */ t.createElement(l.Year.Label, {
|
|
399
|
-
className: p(S, E.label)
|
|
400
|
-
}), /* @__PURE__ */ t.createElement(l.Year.Input, {
|
|
401
|
-
className: p(H, E.input, h.yearInput)
|
|
402
|
-
})), /* @__PURE__ */ t.createElement(l.Time, {
|
|
403
|
-
className: h.timeGroup
|
|
404
|
-
}, /* @__PURE__ */ t.createElement(l.Time.Label, {
|
|
405
|
-
className: p(S, E.label)
|
|
406
|
-
}), /* @__PURE__ */ t.createElement(l.Time.Input, {
|
|
407
|
-
className: p(H, E.input, h.time)
|
|
408
|
-
}, /* @__PURE__ */ t.createElement(l.Time.Hour, {
|
|
409
|
-
className: p(h.hour, Y)
|
|
410
|
-
}), /* @__PURE__ */ t.createElement(l.Time.Minute, {
|
|
411
|
-
className: p(h.minute, Y)
|
|
412
|
-
}), /* @__PURE__ */ t.createElement(l.Time.Period, {
|
|
413
|
-
className: p(h.period, Y)
|
|
414
|
-
}))), /* @__PURE__ */ t.createElement(l.Error, {
|
|
415
|
-
className: p(Pe, E.error)
|
|
416
|
-
}, /* @__PURE__ */ t.createElement(Oe, null), /* @__PURE__ */ t.createElement(l.Error.Text, null)), /* @__PURE__ */ t.createElement(l.Description, {
|
|
417
|
-
className: p(Ce, E.description)
|
|
418
|
-
}, rt));
|
|
419
|
-
};
|
|
420
|
-
export {
|
|
421
|
-
Nt as D
|
|
422
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
const o = "_label_yhtg3_1", t = "_requiredMark_yhtg3_11", e = "_input_yhtg3_16", n = "_inputGroup_yhtg3_17", c = "_innerInput_yhtg3_129", _ = "_dropdownTrigger_yhtg3_177", r = "_dropdownIcon_yhtg3_187", p = "_dropdownPopover_yhtg3_206", s = "_selectPopover_yhtg3_210", u = "_selectOption_yhtg3_237", h = "_selectOptionWithoutFocusRing_yhtg3_261", i = "_description_yhtg3_267", d = "_error_yhtg3_283", g = "_checkbox_yhtg3_302", l = "_checkboxInput_yhtg3_325", y = "_checkboxInputSelected_yhtg3_364", b = "_checkboxInputHover_yhtg3_368", k = "_uploadButton_yhtg3_415", I = {
|
|
2
|
-
label: o,
|
|
3
|
-
requiredMark: t,
|
|
4
|
-
input: e,
|
|
5
|
-
inputGroup: n,
|
|
6
|
-
innerInput: c,
|
|
7
|
-
dropdownTrigger: _,
|
|
8
|
-
dropdownIcon: r,
|
|
9
|
-
dropdownPopover: p,
|
|
10
|
-
selectPopover: s,
|
|
11
|
-
selectOption: u,
|
|
12
|
-
selectOptionWithoutFocusRing: h,
|
|
13
|
-
description: i,
|
|
14
|
-
error: d,
|
|
15
|
-
checkbox: g,
|
|
16
|
-
checkboxInput: l,
|
|
17
|
-
checkboxInputSelected: y,
|
|
18
|
-
checkboxInputHover: b,
|
|
19
|
-
uploadButton: k
|
|
20
|
-
};
|
|
21
|
-
export {
|
|
22
|
-
I as s
|
|
23
|
-
};
|