@wix/form-elements 1.141.0 → 1.143.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-CBgveDfU.js → appointment-rac-BAwonF75.js} +85 -85
- package/dist/component/{bookings-address-rac-BJqKQGM7.js → bookings-address-rac-xhj2n7jK.js} +1 -1
- package/dist/component/{bookings-email-rac-BEBnQQtI.js → bookings-email-rac-BGjeAwgm.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CcLe5bPh.js → bookings-first-name-rac-l392yYAU.js} +1 -1
- package/dist/component/{bookings-header-rac-C2CRP5vX.js → bookings-header-rac-JwIo7hsJ.js} +1 -1
- package/dist/component/{bookings-last-name-rac-D9EPB2o-.js → bookings-last-name-rac-CJp81BPl.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DaDoExJQ.js → bookings-login-bar-rac-BiPklGE_.js} +4 -4
- package/dist/component/{bookings-phone-rac-C4rfNh9m.js → bookings-phone-rac-mQfDJGkK.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CHupwGUy.js → bookings-rich-text-rac-BOfHn2EU.js} +1 -1
- package/dist/component/{checkbox-field-rac-JA4-Un3S.js → checkbox-field-rac-CA6SeM0c.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-ikYtTUSV.js → checkbox-group-field-headless-ChLT0zKA.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CkkSPle4.js → checkbox-group-field-rac-_Fkre79S.js} +7 -7
- package/dist/component/{checkbox-group-rac-BYXab1TV.js → checkbox-group-rac-esBLJZ6Y.js} +1 -1
- package/dist/component/{checkbox-rac-MsaKpbsM.js → checkbox-rac-C3vXtbJh.js} +1 -1
- package/dist/component/{contacts-address-rac-BG5KM6Mu.js → contacts-address-rac-BuBBBt19.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-CIJtY0ml.js → contacts-birthdate-rac-BMBJeVOK.js} +1 -1
- package/dist/component/{contacts-company-rac-qQxsdn-g.js → contacts-company-rac-CZl168-E.js} +1 -1
- package/dist/component/{contacts-email-rac-Cb_zFMQd.js → contacts-email-rac-CJgVzCns.js} +1 -1
- package/dist/component/{contacts-first-name-rac-L0IsiQmM.js → contacts-first-name-rac-9ZNYKQeb.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BNgF4RBx.js → contacts-last-name-rac-KgylQwHW.js} +1 -1
- package/dist/component/{contacts-phone-rac-BhOsgxwZ.js → contacts-phone-rac-DYr30FLP.js} +1 -1
- package/dist/component/{contacts-position-rac-B2JM9fSY.js → contacts-position-rac-B9BZZ3K9.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CVSWNhBY.js → contacts-subscribe-rac-DOQb2GLm.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BtdNdxYS.js → contacts-tax-id-rac-cYE1ehXN.js} +1 -1
- package/dist/component/{date-availability-BVSO1Gbz.js → date-availability-BOKvA8w-.js} +1 -1
- package/dist/component/{date-input-field-rac-DFCPKpI2.js → date-input-field-rac-BwY53gNr.js} +47 -47
- package/dist/component/{date-input-rac-CcC5JdTU.js → date-input-rac-Cgg4QJbB.js} +1 -1
- package/dist/component/{date-picker-field-rac-CAr7r5k3.js → date-picker-field-rac-0Ue6uiCM.js} +5 -5
- package/dist/component/{date-picker-rac-0WEGa3ZQ.js → date-picker-rac-CgICj33f.js} +1 -1
- package/dist/component/{date-time-input-field-rac-DPlFlkrF.js → date-time-input-field-rac-ChRCMk7_.js} +60 -60
- package/dist/component/{date-time-input-rac-c0dm0pdf.js → date-time-input-rac-B8tRZrri.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-B1db5jv3.js → dext-checkbox-group-rac-B_qjx1QD.js} +2 -2
- package/dist/component/{dext-checkbox-rac-C03w68Ta.js → dext-checkbox-rac-Bw9SyhHA.js} +1 -1
- package/dist/component/{dext-date-picker-rac-DTjysj_k.js → dext-date-picker-rac-Bzn28zNq.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-CnL2o6YR.js → dext-date-time-input-rac-7Cuk3PoA.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CJxC-Wr0.js → dext-dropdown-rac-Md1VI5pc.js} +1 -1
- package/dist/component/{dext-email-rac-CewA7bXc.js → dext-email-rac-DbHwHGKz.js} +1 -1
- package/dist/component/{dext-number-input-rac--_aUE6C8.js → dext-number-input-rac-DIVk3zXL.js} +1 -1
- package/dist/component/{dext-phone-rac-_ObccrwR.js → dext-phone-rac-ZIya63UJ.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DXBCI2mT.js → dext-radio-group-rac-DV1xHkOD.js} +2 -2
- package/dist/component/{dext-rating-input-rac-CS3VY3B3.js → dext-rating-input-rac-YRIYgeT4.js} +1 -1
- package/dist/component/{dext-tags-rac-CyTea3vl.js → dext-tags-rac-DTJ6Pz_x.js} +2 -2
- package/dist/component/{dext-text-area-rac-C_qN16CX.js → dext-text-area-rac-V-d9i95A.js} +1 -1
- package/dist/component/{dext-text-input-rac-DhqfiI_U.js → dext-text-input-rac-ccrundX-.js} +1 -1
- package/dist/component/{dext-url-input-rac-CxI4MbMH.js → dext-url-input-rac-Bd5SZ2U4.js} +1 -1
- package/dist/component/{donation-rac-BZmT89_j.js → donation-rac-BFmpW-3b.js} +23 -23
- package/dist/component/{dropdown-field-headless-CO82AsyC.js → dropdown-field-headless-C2qgeReH.js} +5 -5
- package/dist/component/{dropdown-field-rac-BqPHSq7k.js → dropdown-field-rac-Bj1YSgpT.js} +9 -9
- package/dist/component/{dropdown-rac-pOLj9tRE.js → dropdown-rac-DfdvX5I5.js} +1 -1
- package/dist/component/{ecom-address-rac-DBQ0rVmy.js → ecom-address-rac-DOWNQhhX.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BJoMvht8.js → ecom-subscription-checkbox-rac-2ELdC1ql.js} +2 -2
- package/dist/component/{email-input-field-rac-DTqYXW-m.js → email-input-field-rac-CY0U6vEM.js} +34 -34
- package/dist/component/{events-repeater-rac-3gkcVOh6.js → events-repeater-rac-C2oo_RZt.js} +4 -4
- package/dist/component/{events-rsvp-rac-DYMvnjuz.js → events-rsvp-rac-BrimIo0r.js} +8 -8
- package/dist/component/{field-error-headless-CQ8PHjtA.js → field-error-headless-r0fX50xw.js} +1 -1
- package/dist/component/{field-label-headless-BgAx-Enb.js → field-label-headless-D-kCfg8j.js} +1 -1
- package/dist/component/{file-upload-rac-B8TgLoCU.js → file-upload-rac-Beb2BcFK.js} +160 -160
- package/dist/component/{fixed-payment-rac-CRupF7Fu.js → fixed-payment-rac-DGFWYMZG.js} +9 -9
- package/dist/component/{form-BzzldBcB.js → form-DtzwuBIo.js} +296 -293
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-iFuM4bGC.js → header-field-rac-CVmGSa0E.js} +2 -2
- package/dist/component/{header-rac-CLOeCzLk.js → header-rac-C3AEJmYN.js} +1 -1
- package/dist/component/{image-choice-rac-C6UBnrn3.js → image-choice-rac-Ch-mxLgP.js} +16 -16
- package/dist/component/{index-BHGQWZ7f.js → index-CTn6AQ3A.js} +2 -2
- package/dist/component/{index-CtMQ3oqe.js → index-CmqLlW8X.js} +4 -4
- package/dist/component/{isObjectLike-BVz2g6jF.js → isObjectLike-iyypwAQL.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CKBpkEET.js → multiline-address-field-rac-DJXcb6NG.js} +41 -41
- package/dist/component/{multiline-address-rac-DcGF1aWF.js → multiline-address-rac-DcZgTx1c.js} +1 -1
- package/dist/component/{number-input-field-rac-CODTSfX-.js → number-input-field-rac-W3TqQGhC.js} +20 -20
- package/dist/component/{number-input-rac-ByT6DN8A.js → number-input-rac-CdXigsba.js} +1 -1
- package/dist/component/{password-rac-Bwnpd70V.js → password-rac-Dph6984u.js} +19 -19
- package/dist/component/{payment-input-rac-DmfJZmgO.js → payment-input-rac-D5ARk1lF.js} +23 -23
- package/dist/component/{phone-input-field-rac-B2exX67y.js → phone-input-field-rac-BUfe-B2i.js} +55 -55
- package/dist/component/{phone-rac-9HksdhZY.js → phone-rac-DTiWT1uy.js} +1 -1
- package/dist/component/{product-list-rac-DnhtTpJC.js → product-list-rac-1_Q2JYwH.js} +32 -32
- package/dist/component/{quiz-radio-group-rac-BNVLQ2YS.js → quiz-radio-group-rac-iyBhi0wJ.js} +1 -1
- package/dist/component/{radio-button-module-classes-D2nPj405.js → radio-button-module-classes-DwfobXBe.js} +3 -3
- package/dist/component/{radio-group-field-rac-BT657aHX.js → radio-group-field-rac-BkKNVwMi.js} +8 -8
- package/dist/component/{radio-group-rac-yjr7rBFf.js → radio-group-rac-CH0nkJ8V.js} +1 -1
- package/dist/component/{rating-input-field-rac-DJzVLTkF.js → rating-input-field-rac-CUUUlgZi.js} +27 -27
- package/dist/component/{rating-input-rac-Cpzm_Rbk.js → rating-input-rac-8yEiqBR5.js} +1 -1
- package/dist/component/{rich-content-rac.module-B8WTFbve.js → rich-content-rac.module-DeKU0pwh.js} +1 -1
- package/dist/component/{rich-text-field-rac-DCiBRkow.js → rich-text-field-rac-Cwd-RWTi.js} +2 -2
- package/dist/component/{rich-text-rac-DiP1GwaU.js → rich-text-rac-C5-jPNYP.js} +1 -1
- package/dist/component/{service-dropdown-rac-D5YlC7mU.js → service-dropdown-rac-DBGAnsut.js} +37 -37
- package/dist/component/{services-multi-choice-rac-D5uwtGzk.js → services-multi-choice-rac-CqEoGsuw.js} +12 -12
- package/dist/component/{signature-rac-g7pBfp7A.js → signature-rac-Cq3y66Cr.js} +36 -36
- package/dist/component/{submit-button-rac-WVz4yWjl.js → submit-button-rac-CKM7yUL4.js} +2 -2
- package/dist/component/{tags-field-rac-BS7qlHyA.js → tags-field-rac-CpJ0O9f_.js} +15 -15
- package/dist/component/{tags-rac-CQGlk8GO.js → tags-rac-BPjw67Po.js} +1 -1
- package/dist/component/{text-area-field-rac-B2rsUGoZ.js → text-area-field-rac-BG6MJuIW.js} +16 -16
- package/dist/component/{text-area-rac-CwJXAFKH.js → text-area-rac-BAS4F4VC.js} +1 -1
- package/dist/component/{text-input-field-rac-CiZ83ULN.js → text-input-field-rac-BhMktcEd.js} +5 -5
- package/dist/component/{text-input-headless-C56J6s10.js → text-input-headless-Bpjd70nh.js} +3 -3
- package/dist/component/{text-input-rac-BMSWPbrZ.js → text-input-rac-Bj21XKGA.js} +1 -1
- package/dist/component/{time-input-rac-DrKC1wiN.js → time-input-rac-DBpRHdnX.js} +12 -12
- package/dist/component/{url-input-field-rac-HPvjYmsV.js → url-input-field-rac-B_EMXVWh.js} +11 -11
- package/dist/component/{url-input-rac-gQIszvK3.js → url-input-rac-D0Ck-9KV.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-nZCgStzg.js → use-dropdown-option-class-name-CkpHwC6t.js} +21 -21
- package/dist/component/{use-dropdown-trigger-class-name-Ba9Ej9xC.js → use-dropdown-trigger-class-name-DmDwpAVn.js} +2 -2
- package/dist/component/{use-element-state-class-name-CEMjabjh.js → use-element-state-class-name-BrgdwHYP.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-BSiPBu4i.js → use-hoverable-input-class-name-qVo45l-t.js} +2 -2
- package/dist/component/{use-service-options-base-DSkh5Ayp.js → use-service-options-base-Dlqs4p0Z.js} +1 -1
- package/dist/component/use-text-input-class-name-CP2VJOso.js +6 -0
- package/dist/form.d.ts +12 -2
- package/package.json +2 -2
- package/dist/component/use-text-input-class-name-B2pSCrTD.js +0 -6
package/dist/component/form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import m from "classnames";
|
|
2
2
|
import e from "react";
|
|
3
|
-
import { bj as u, aX as i, aW as C, aZ as R, aw as T, ae as d } from "./form-
|
|
4
|
-
import { u as g, R as p, s as S, T as h } from "./rich-content-rac.module-
|
|
3
|
+
import { bj as u, aX as i, aW as C, aZ as R, aw as T, ae as d } from "./form-DtzwuBIo.js";
|
|
4
|
+
import { u as g, R as p, s as S, T as h } from "./rich-content-rac.module-DeKU0pwh.js";
|
|
5
5
|
const y = ({ truncate: t = !0 } = {}) => {
|
|
6
6
|
const { content: a, maxShownParagraphs: s } = u(), n = e.useMemo(() => ({
|
|
7
7
|
colorPalette: R(),
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import e, { useMemo as H, useCallback as T, useRef as G } from "react";
|
|
2
2
|
import { RicosViewer as k } from "@wix/ricos/viewer";
|
|
3
3
|
import I from "classnames";
|
|
4
|
-
import { bj as b, bg as x, bl as P, bc as B,
|
|
5
|
-
import { CheckboxGroup as
|
|
4
|
+
import { bj as b, bg as x, bl as P, bc as B, R as q, $ as U, M as w, O as V, G as $, u as j, N as z, f } from "./form-DtzwuBIo.js";
|
|
5
|
+
import { CheckboxGroup as K, CheckboxField as Q, CheckboxButton as Y } from "react-aria-components";
|
|
6
6
|
import { f as m, a as F } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { L as
|
|
8
|
-
import { D as X, E as Z } from "./field-error-headless-
|
|
7
|
+
import { L as J, g as W } from "./field-label-headless-D-kCfg8j.js";
|
|
8
|
+
import { D as X, E as Z } from "./field-error-headless-r0fX50xw.js";
|
|
9
9
|
import { F as ee } from "./fieldset-headless-CD3fds9J.js";
|
|
10
10
|
import { E as te } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s as O } from "./field-rac.module-DfEb7pBp.js";
|
|
12
|
-
import { u as oe } from "./use-element-state-class-name-
|
|
12
|
+
import { u as oe } from "./use-element-state-class-name-BrgdwHYP.js";
|
|
13
13
|
const o = ({ children: t, className: n }) => {
|
|
14
|
-
const { id: s, value: a, onChange: i, disabled: l, readOnly: r, required: c, onBlur: u, onFocus: p, hasError: C, FieldLayout: L } = b(), { inputId: g, labelId: _, ariaDescribedBy: R } = x(), S = m(t, o.Label), A = m(t, o.Options), D = m(t, o.Description),
|
|
14
|
+
const { id: s, value: a, onChange: i, disabled: l, readOnly: r, required: c, onBlur: u, onFocus: p, hasError: C, FieldLayout: L } = b(), { inputId: g, labelId: _, ariaDescribedBy: R } = x(), S = m(t, o.Label), A = m(t, o.Options), D = m(t, o.Description), M = m(t, o.Error), h = H(() => a || [], [
|
|
15
15
|
a
|
|
16
16
|
]), v = T((y) => {
|
|
17
17
|
i == null || i(y);
|
|
@@ -28,17 +28,17 @@ const o = ({ children: t, className: n }) => {
|
|
|
28
28
|
required: c,
|
|
29
29
|
onBlur: u,
|
|
30
30
|
onFocus: p
|
|
31
|
-
}, /* @__PURE__ */ e.createElement(
|
|
31
|
+
}, /* @__PURE__ */ e.createElement(K, {
|
|
32
32
|
className: n,
|
|
33
33
|
"aria-labelledby": _,
|
|
34
|
-
value:
|
|
34
|
+
value: h,
|
|
35
35
|
onChange: v,
|
|
36
36
|
isDisabled: l,
|
|
37
37
|
isReadOnly: r,
|
|
38
38
|
isRequired: c,
|
|
39
39
|
isInvalid: C
|
|
40
40
|
}, A)),
|
|
41
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
41
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, M, D)
|
|
42
42
|
});
|
|
43
43
|
}, N = ({ children: t, className: n }) => {
|
|
44
44
|
const { id: s, options: a, numberOfColumns: i } = b(), l = m(t, N.Option);
|
|
@@ -86,12 +86,12 @@ const o = ({ children: t, className: n }) => {
|
|
|
86
86
|
}));
|
|
87
87
|
}, l);
|
|
88
88
|
const C = m(t, E.Input), L = m(t, E.Image), g = m(t, E.Label);
|
|
89
|
-
return /* @__PURE__ */ e.createElement(
|
|
89
|
+
return /* @__PURE__ */ e.createElement(Q, {
|
|
90
90
|
value: a.label,
|
|
91
91
|
isDisabled: r,
|
|
92
92
|
isReadOnly: c,
|
|
93
93
|
isInvalid: u
|
|
94
|
-
}, /* @__PURE__ */ e.createElement(
|
|
94
|
+
}, /* @__PURE__ */ e.createElement(Y, {
|
|
95
95
|
ref: p,
|
|
96
96
|
"aria-label": a.isLabelHidden ? a.label : void 0,
|
|
97
97
|
className: n,
|
|
@@ -105,7 +105,7 @@ const o = ({ children: t, className: n }) => {
|
|
|
105
105
|
E.Input = ae;
|
|
106
106
|
E.Image = ne;
|
|
107
107
|
E.Label = se;
|
|
108
|
-
o.Label =
|
|
108
|
+
o.Label = J;
|
|
109
109
|
o.Options = N;
|
|
110
110
|
N.Option = E;
|
|
111
111
|
o.Description = X;
|
|
@@ -127,7 +127,7 @@ const le = "_options_9rde9_1", ie = "_optionInput_9rde9_33", re = "_option_9rde9
|
|
|
127
127
|
hover: d.optionHover
|
|
128
128
|
}, Ie = () => {
|
|
129
129
|
const t = oe({
|
|
130
|
-
globalClasses:
|
|
130
|
+
globalClasses: z,
|
|
131
131
|
moduleClasses: ue
|
|
132
132
|
}), n = B(f.IMAGE_CHOICE, f.IMAGE_CHOICE_OPTION, f.IMAGE_CHOICE_OPTION_IMAGE);
|
|
133
133
|
return /* @__PURE__ */ e.createElement(o, null, /* @__PURE__ */ e.createElement(o.Label, {
|
|
@@ -141,13 +141,13 @@ const le = "_options_9rde9_1", ie = "_optionInput_9rde9_33", re = "_option_9rde9
|
|
|
141
141
|
}, /* @__PURE__ */ e.createElement(o.Options.Option.Input, {
|
|
142
142
|
className: d.optionInput
|
|
143
143
|
}), /* @__PURE__ */ e.createElement(o.Options.Option.Image, {
|
|
144
|
-
className: I(
|
|
144
|
+
className: I(V, d.optionImage, n)
|
|
145
145
|
}), /* @__PURE__ */ e.createElement(o.Options.Option.Label, {
|
|
146
146
|
className: d.optionLabel
|
|
147
147
|
}))), /* @__PURE__ */ e.createElement(o.Error, {
|
|
148
|
-
className: I(
|
|
148
|
+
className: I($, O.error)
|
|
149
149
|
}, /* @__PURE__ */ e.createElement(te, null), /* @__PURE__ */ e.createElement(o.Error.Text, null)), /* @__PURE__ */ e.createElement(o.Description, {
|
|
150
|
-
className: I(
|
|
150
|
+
className: I(j, O.description)
|
|
151
151
|
}, Ee));
|
|
152
152
|
}, De = () => /* @__PURE__ */ e.createElement(Ie, null);
|
|
153
153
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b2 as n } from "./form-
|
|
2
|
-
import { A as S, a as p, C as N, ax as g, aO as q, aP as D, b4 as L } from "./form-
|
|
1
|
+
import { b2 as n } from "./form-DtzwuBIo.js";
|
|
2
|
+
import { A as S, a as p, C as N, ax as g, aO as q, aP as D, b4 as L } from "./form-DtzwuBIo.js";
|
|
3
3
|
const l = (e = !1) => ({
|
|
4
4
|
country: {
|
|
5
5
|
required: e
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { e as R, aE as _, aT as de, aF as O, ak as Ge, B as Be, ay as qe, ar as He, aq as A, az as Ee, aI as re, aC as Fe, c as B, as as M, b3 as Te, au as je, at as he, av as q } from "./form-
|
|
2
|
-
import { a_ as Mn } from "./form-
|
|
1
|
+
import { e as R, aE as _, aT as de, aF as O, ak as Ge, B as Be, ay as qe, ar as He, aq as A, az as Ee, aI as re, aC as Fe, c as B, as as M, b3 as Te, au as je, at as he, av as q } from "./form-DtzwuBIo.js";
|
|
2
|
+
import { a_ as Mn } from "./form-DtzwuBIo.js";
|
|
3
3
|
import ke from "ajv";
|
|
4
4
|
import Xe from "ajv-errors";
|
|
5
5
|
import We from "ajv-formats";
|
|
6
6
|
import Ke from "fast-deep-equal";
|
|
7
7
|
import { parsePhoneNumber as ze, parsePhoneNumberWithError as Ve, ParseError as Ze } from "libphonenumber-js/max";
|
|
8
8
|
import Je from "libphonenumber-js/metadata.max.json";
|
|
9
|
-
import { p as Qe, i as et } from "./date-availability-
|
|
10
|
-
import { a as Sn } from "./date-availability-
|
|
9
|
+
import { p as Qe, i as et } from "./date-availability-BOKvA8w-.js";
|
|
10
|
+
import { a as Sn } from "./date-availability-BOKvA8w-.js";
|
|
11
11
|
import { C as tt } from "./calling-country-codes-PyWuOTmF.js";
|
|
12
12
|
function rt(e) {
|
|
13
13
|
var t, r;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
2
2
|
import L from "classnames";
|
|
3
|
-
import r, { useMemo as q, createContext as
|
|
3
|
+
import r, { useMemo as q, createContext as We, useContext as Ce, useState as be, useRef as x, useCallback as R, useEffect as Pe } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as Pt } from "react-aria";
|
|
5
|
-
import { be as ft, d as yt, b9 as _t, bb as Ct, aO as Tt, aP as wt, aH as Mt, aN as
|
|
5
|
+
import { be as ft, d as yt, b9 as _t, bb as Ct, aO as Tt, aP as wt, aH as Mt, aN as U, F as K, bt as _e, b2 as lt, bj as _, bg as T, bl as ae, bf as It, aT as qt, C as Oe, b0 as xt, b4 as Bt, bq as kt, bk as $t, bp as Vt, b7 as Wt, aY as Ut, b6 as Kt, bm as Yt, an as Ht, R as z, $ as Q, x as ge, G as Z, u as ee } from "./form-DtzwuBIo.js";
|
|
6
6
|
import { f as E, a as F } from "./find-child-C60k4CxG.js";
|
|
7
7
|
import { F as jt, V as Jt } from "./headless-styles-CmcyA_pi.js";
|
|
8
|
-
import { a as Gt, u as Xt } from "./use-dropdown-trigger-class-name-
|
|
9
|
-
import { TextField as fe, Input as le, ComboBoxStateContext as
|
|
10
|
-
import { D as ie, E as ce } from "./field-error-headless-
|
|
11
|
-
import { L as de } from "./field-label-headless-
|
|
12
|
-
import { e as zt, c as Qt, a as Zt, r as gt } from "./isObjectLike-
|
|
13
|
-
import { V as en, u as tn } from "./use-dropdown-option-class-name-
|
|
8
|
+
import { a as Gt, u as Xt } from "./use-dropdown-trigger-class-name-DmDwpAVn.js";
|
|
9
|
+
import { TextField as fe, Input as le, ComboBoxStateContext as Ue, ComboBox as he, Popover as De, ListBox as Te, ListBoxItem as Se, Group as Lt, Button as Nt } from "react-aria-components";
|
|
10
|
+
import { D as ie, E as ce } from "./field-error-headless-r0fX50xw.js";
|
|
11
|
+
import { L as de } from "./field-label-headless-D-kCfg8j.js";
|
|
12
|
+
import { e as zt, c as Qt, a as Zt, r as gt } from "./isObjectLike-iyypwAQL.js";
|
|
13
|
+
import { V as en, u as tn } from "./use-dropdown-option-class-name-CkpHwC6t.js";
|
|
14
14
|
import { u as nn } from "./use-invoke-callback-UH73A_J3.js";
|
|
15
15
|
import { C as it } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as te } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as we } from "./custom-focus-class-_483Pkwp.js";
|
|
18
18
|
import { s as I } from "./field-rac.module-DfEb7pBp.js";
|
|
19
|
-
import { u as rn } from "./use-text-input-class-name-
|
|
19
|
+
import { u as rn } from "./use-text-input-class-name-CP2VJOso.js";
|
|
20
20
|
const on = (e, t, o) => {
|
|
21
21
|
var a, l, i, s;
|
|
22
22
|
const n = (a = e.steps) == null ? void 0 : a.map((d) => {
|
|
@@ -51,7 +51,7 @@ function sn(e, t, o = !1) {
|
|
|
51
51
|
const { country: n, subdivision: a, city: l, addressLine: i, streetAddress: s, addressLine2: d, postalCode: m } = e, u = {};
|
|
52
52
|
return t ? (n && (u.country = n), a && (u.subdivision = a), l && (u.city = l), i ? u.addressLine = i : s != null && s.formattedAddressLine && (u.addressLine = s == null ? void 0 : s.formattedAddressLine), d && (u.addressLine = d), m && (u.postalCode = m), s != null && s.apt && (u.apartment = s == null ? void 0 : s.apt), s != null && s.name ? u.streetName = s == null ? void 0 : s.name : o && (s != null && s.formattedAddressLine) && (u.streetName = s == null ? void 0 : s.formattedAddressLine), s != null && s.number && (u.streetNumber = s.number)) : (n && (u.country = n), a && (u.subdivision = a), l && (u.city = l), i ? u.address_line = i : s != null && s.formattedAddressLine && (u.address_line = s == null ? void 0 : s.formattedAddressLine), d && (u.address_line = d), m && (u.postal_code = m), s != null && s.apt && (u.apartment = s == null ? void 0 : s.apt), s != null && s.name ? u.street_name = s == null ? void 0 : s.name : o && (s != null && s.formattedAddressLine) && (u.street_name = s == null ? void 0 : s.formattedAddressLine), s != null && s.number && (u.street_number = s.number)), u;
|
|
53
53
|
}
|
|
54
|
-
const Ot = /* @__PURE__ */
|
|
54
|
+
const Ot = /* @__PURE__ */ We({
|
|
55
55
|
onAddressSelect: () => {
|
|
56
56
|
}
|
|
57
57
|
}), an = ({ children: e, onAddressSelect: t, autocompleteEnabled: o }) => {
|
|
@@ -69,7 +69,7 @@ const Ot = /* @__PURE__ */ Ue({
|
|
|
69
69
|
function Ie() {
|
|
70
70
|
return Ce(Ot);
|
|
71
71
|
}
|
|
72
|
-
const vt = /* @__PURE__ */
|
|
72
|
+
const vt = /* @__PURE__ */ We(void 0), ln = ({ children: e, countryCode: t }) => {
|
|
73
73
|
const o = q(() => ({
|
|
74
74
|
countryCode: t
|
|
75
75
|
}), [
|
|
@@ -167,15 +167,15 @@ const dn = (e, t) => e.map((o) => ({
|
|
|
167
167
|
fields: i
|
|
168
168
|
};
|
|
169
169
|
}, yn = () => ({
|
|
170
|
-
country:
|
|
171
|
-
subdivision:
|
|
172
|
-
city:
|
|
173
|
-
address_line:
|
|
174
|
-
address_line_2:
|
|
175
|
-
postal_code:
|
|
176
|
-
street_name:
|
|
177
|
-
street_number:
|
|
178
|
-
apartment:
|
|
170
|
+
country: U(),
|
|
171
|
+
subdivision: U(),
|
|
172
|
+
city: U(),
|
|
173
|
+
address_line: U(),
|
|
174
|
+
address_line_2: U(),
|
|
175
|
+
postal_code: U(),
|
|
176
|
+
street_name: U(),
|
|
177
|
+
street_number: U(),
|
|
178
|
+
apartment: U()
|
|
179
179
|
}), Cn = ({ id: e, target: t, fieldType: o, form: n, country: a, fieldSettings: l, validation: i, required: s }) => {
|
|
180
180
|
const [d] = be(yn), { isExperimentEnabled: m } = ft(), u = m(yt.USE_FIELDS_V2), { getCountryAddressForm: y } = _t(), { isMobile: C, breakpoint: b } = Ct(), p = y(a), f = o === K.MULTILINE_ADDRESS || o === K.BOOKINGS_ADDRESS, N = q(() => {
|
|
181
181
|
var O;
|
|
@@ -225,7 +225,7 @@ const dn = (e, t) => e.map((o) => ({
|
|
|
225
225
|
]),
|
|
226
226
|
isMultilineAddressField: f
|
|
227
227
|
};
|
|
228
|
-
}, ht = /* @__PURE__ */
|
|
228
|
+
}, ht = /* @__PURE__ */ We(void 0), In = ({ children: e, fields: t }) => {
|
|
229
229
|
const o = q(() => ({
|
|
230
230
|
fields: t
|
|
231
231
|
}), [
|
|
@@ -283,7 +283,7 @@ ne.Input = Ln;
|
|
|
283
283
|
ne.Description = ie;
|
|
284
284
|
ne.Error = ce;
|
|
285
285
|
const Ke = ({ enabled: e }) => {
|
|
286
|
-
const { actions: t } = It(), [o, n] = be(
|
|
286
|
+
const { actions: t } = It(), [o, n] = be(U()), a = R(() => n(U()), []);
|
|
287
287
|
return q(() => {
|
|
288
288
|
const { predict: l, getPlace: i, searchByPostalCode: s } = t ?? {};
|
|
289
289
|
if (!(!e || !l || !i || !s))
|
|
@@ -489,7 +489,7 @@ const Sn = /* @__PURE__ */ qt(Dn), Rn = (e, t, o = 200) => {
|
|
|
489
489
|
clearPredictions: d
|
|
490
490
|
};
|
|
491
491
|
}, Ye = ({ optionCount: e }) => {
|
|
492
|
-
const t = Ce(
|
|
492
|
+
const t = Ce(Ue), o = x(t);
|
|
493
493
|
o.current = t;
|
|
494
494
|
const n = x(e);
|
|
495
495
|
return Pe(() => {
|
|
@@ -715,7 +715,7 @@ oe.Input = Mn;
|
|
|
715
715
|
oe.Description = ie;
|
|
716
716
|
oe.Error = ce;
|
|
717
717
|
const qn = ({ isOpen: e }) => {
|
|
718
|
-
const t = Ce(
|
|
718
|
+
const t = Ce(Ue), o = x(!1);
|
|
719
719
|
return Pe(() => {
|
|
720
720
|
e && t && !t.isOpen && t.open(null, "manual"), e && (t == null ? void 0 : t.selectionManager.focusedKey) != null && t.selectionManager.setFocusedKey(null), !e && o.current && (t == null || t.close()), o.current = e;
|
|
721
721
|
}, [
|
|
@@ -723,7 +723,7 @@ const qn = ({ isOpen: e }) => {
|
|
|
723
723
|
t
|
|
724
724
|
]), null;
|
|
725
725
|
}, St = ({ readOnly: e, disabled: t } = {}) => {
|
|
726
|
-
const o = Ce(
|
|
726
|
+
const o = Ce(Ue);
|
|
727
727
|
return R(() => {
|
|
728
728
|
!o || o.isOpen || e || t || o.open(null, "manual");
|
|
729
729
|
}, [
|
|
@@ -876,11 +876,11 @@ Y.Options = je;
|
|
|
876
876
|
Y.Description = ie;
|
|
877
877
|
Y.Error = ce;
|
|
878
878
|
const Vn = /(\d{7})|(\d{3}-\d{4})/;
|
|
879
|
-
function
|
|
879
|
+
function Wn(e) {
|
|
880
880
|
var t;
|
|
881
881
|
return (t = e.match(Vn)) == null ? void 0 : t[0];
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function Un({ isAutocompleteEnabled: e }) {
|
|
884
884
|
const t = x({
|
|
885
885
|
hasAddress: !1
|
|
886
886
|
}), o = Ke({
|
|
@@ -888,7 +888,7 @@ function Wn({ isAutocompleteEnabled: e }) {
|
|
|
888
888
|
});
|
|
889
889
|
return {
|
|
890
890
|
searchByPostalCode: R(async (a) => {
|
|
891
|
-
const l =
|
|
891
|
+
const l = Wn(a);
|
|
892
892
|
if (l) {
|
|
893
893
|
if (t.current.postalCode === l && t.current.hasAddress)
|
|
894
894
|
return t.current.address;
|
|
@@ -949,11 +949,11 @@ const $ = ({ children: e }) => {
|
|
|
949
949
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, P, w)
|
|
950
950
|
});
|
|
951
951
|
}, Kn = ({ children: e, value: t, onChange: o, disabled: n, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
|
|
952
|
-
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), [y, C] = be(!1), { searchByPostalCode: b } =
|
|
952
|
+
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), [y, C] = be(!1), { searchByPostalCode: b } = Un({
|
|
953
953
|
isAutocompleteEnabled: y
|
|
954
954
|
}), [p, f] = be(), N = q(() => p ? [
|
|
955
955
|
{
|
|
956
|
-
id:
|
|
956
|
+
id: U(),
|
|
957
957
|
label: p.formattedAddress || ""
|
|
958
958
|
}
|
|
959
959
|
] : [], [
|
|
@@ -1344,8 +1344,8 @@ const er = () => ue("country"), tr = () => ue("subdivision"), nr = () => ue("cit
|
|
|
1344
1344
|
...v,
|
|
1345
1345
|
actions: {
|
|
1346
1346
|
predict: Kt,
|
|
1347
|
-
getPlace:
|
|
1348
|
-
searchByPostalCode:
|
|
1347
|
+
getPlace: Ut,
|
|
1348
|
+
searchByPostalCode: Wt,
|
|
1349
1349
|
...v.actions
|
|
1350
1350
|
}
|
|
1351
1351
|
}), [
|
|
@@ -1359,10 +1359,10 @@ const er = () => ue("country"), tr = () => ue("subdivision"), nr = () => ue("cit
|
|
|
1359
1359
|
fieldSettings: m,
|
|
1360
1360
|
validation: y,
|
|
1361
1361
|
required: p
|
|
1362
|
-
}), M = R((
|
|
1362
|
+
}), M = R((W) => {
|
|
1363
1363
|
if (!n)
|
|
1364
1364
|
return;
|
|
1365
|
-
const G = sn(
|
|
1365
|
+
const G = sn(W, B, w), Re = {
|
|
1366
1366
|
...G,
|
|
1367
1367
|
[ye.COUNTRY]: G[ye.COUNTRY] ?? n[ye.COUNTRY]
|
|
1368
1368
|
};
|
|
@@ -1372,8 +1372,8 @@ const er = () => ue("country"), tr = () => ue("subdivision"), nr = () => ue("cit
|
|
|
1372
1372
|
n,
|
|
1373
1373
|
B,
|
|
1374
1374
|
w
|
|
1375
|
-
]), D = R((
|
|
1376
|
-
if (B &&
|
|
1375
|
+
]), D = R((W, G) => {
|
|
1376
|
+
if (B && W === ye.COUNTRY && (n == null ? void 0 : n[W]) !== G) {
|
|
1377
1377
|
a == null || a({
|
|
1378
1378
|
[ye.COUNTRY]: G
|
|
1379
1379
|
});
|
|
@@ -1381,19 +1381,19 @@ const er = () => ue("country"), tr = () => ue("subdivision"), nr = () => ue("cit
|
|
|
1381
1381
|
}
|
|
1382
1382
|
a == null || a({
|
|
1383
1383
|
...n,
|
|
1384
|
-
[
|
|
1384
|
+
[W]: G
|
|
1385
1385
|
});
|
|
1386
1386
|
}, [
|
|
1387
1387
|
a,
|
|
1388
1388
|
n,
|
|
1389
1389
|
B
|
|
1390
|
-
]), J = R(async (
|
|
1391
|
-
...
|
|
1390
|
+
]), J = R(async (W) => P(B ? [
|
|
1391
|
+
...W,
|
|
1392
1392
|
{
|
|
1393
1393
|
path: `${C}/${ye.COUNTRY}`,
|
|
1394
1394
|
value: n == null ? void 0 : n.country
|
|
1395
1395
|
}
|
|
1396
|
-
] :
|
|
1396
|
+
] : W), [
|
|
1397
1397
|
n,
|
|
1398
1398
|
C,
|
|
1399
1399
|
P,
|
|
@@ -1401,7 +1401,7 @@ const er = () => ue("country"), tr = () => ue("subdivision"), nr = () => ue("cit
|
|
|
1401
1401
|
]);
|
|
1402
1402
|
Yt(t, () => {
|
|
1403
1403
|
var Re;
|
|
1404
|
-
const
|
|
1404
|
+
const W = s == null ? void 0 : s[0], G = (Re = j == null ? void 0 : j.fields) == null ? void 0 : Re.find((at) => "target" in at && at.target === (W == null ? void 0 : W.errorPath));
|
|
1405
1405
|
return G == null ? void 0 : G.id;
|
|
1406
1406
|
});
|
|
1407
1407
|
const Ee = Gt(t), Ne = F(E(e, c.Country), {
|
package/dist/component/{number-input-field-rac-CODTSfX-.js → number-input-field-rac-W3TqQGhC.js}
RENAMED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { RicosViewer as P } from "@wix/ricos/viewer";
|
|
2
2
|
import i from "classnames";
|
|
3
|
-
import r, { useState as
|
|
4
|
-
import { NumberField as
|
|
5
|
-
import { bj as _, bg as S, bt as
|
|
3
|
+
import r, { useState as $, useCallback as j, useEffect as G, useRef as Q } from "react";
|
|
4
|
+
import { NumberField as U, Input as z } from "react-aria-components";
|
|
5
|
+
import { bj as _, bg as S, bt as H, bl as J, R as K, $ as W, G as X, u as Y } from "./form-DtzwuBIo.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as Z, E as w } from "./field-error-headless-
|
|
8
|
-
import { L as ee } from "./field-label-headless-
|
|
7
|
+
import { D as Z, E as w } from "./field-error-headless-r0fX50xw.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-D-kCfg8j.js";
|
|
9
9
|
import { g as re, c as te } from "./numeric-input-utils-CuBMi4-a.js";
|
|
10
10
|
import { u as ne } from "./use-invoke-callback-UH73A_J3.js";
|
|
11
11
|
import { E as ae } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { s as d } from "./field-rac.module-DfEb7pBp.js";
|
|
13
|
-
import { u as se } from "./use-text-input-class-name-
|
|
13
|
+
import { u as se } from "./use-text-input-class-name-CP2VJOso.js";
|
|
14
14
|
const e = ({ children: t }) => {
|
|
15
|
-
var F,
|
|
16
|
-
const { id: a, value: s, onChange: l, disabled: p, required: b, readOnly: o, onBlur: E, onFocus: f, FieldLayout: m, hasError: u, validation: n } = _(), { labelId: g } = S(), D = ((F = n == null ? void 0 : n.number) == null ? void 0 : F.multipleOf) || 1, y = (
|
|
15
|
+
var F, R, L;
|
|
16
|
+
const { id: a, value: s, onChange: l, disabled: p, required: b, readOnly: o, onBlur: E, onFocus: f, FieldLayout: m, hasError: u, validation: n } = _(), { labelId: g } = S(), D = ((F = n == null ? void 0 : n.number) == null ? void 0 : F.multipleOf) || 1, y = (R = n == null ? void 0 : n.number) == null ? void 0 : R.maximum, A = (L = n == null ? void 0 : n.number) == null ? void 0 : L.minimum, x = O(s), [T, I] = $(x), V = ne(E), h = c(t, e.Label), q = c(t, e.Input), M = c(t, e.Description), k = c(t, e.Error), B = j((N) => {
|
|
17
17
|
if (N === void 0 || Number.isNaN(N)) {
|
|
18
18
|
l(""), I(NaN);
|
|
19
19
|
return;
|
|
@@ -24,14 +24,14 @@ const e = ({ children: t }) => {
|
|
|
24
24
|
D,
|
|
25
25
|
l
|
|
26
26
|
]);
|
|
27
|
-
return
|
|
27
|
+
return G(() => {
|
|
28
28
|
I(O(s));
|
|
29
29
|
}, [
|
|
30
30
|
s
|
|
31
31
|
]), /* @__PURE__ */ r.createElement(m, {
|
|
32
32
|
fieldId: a,
|
|
33
33
|
renderLabel: () => h,
|
|
34
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
34
|
+
renderInput: () => /* @__PURE__ */ r.createElement(U, {
|
|
35
35
|
"aria-labelledby": g,
|
|
36
36
|
value: T,
|
|
37
37
|
onChange: B,
|
|
@@ -48,13 +48,13 @@ const e = ({ children: t }) => {
|
|
|
48
48
|
});
|
|
49
49
|
}, le = ({ className: t }) => {
|
|
50
50
|
var u;
|
|
51
|
-
const { t: a } =
|
|
51
|
+
const { t: a } = H(), { inputId: s, ariaDescribedBy: l } = S(), { id: p, placeholder: b, validation: o, label: E, required: f } = _();
|
|
52
52
|
(u = o == null ? void 0 : o.number) != null && u.multipleOf;
|
|
53
|
-
const m =
|
|
54
|
-
return
|
|
53
|
+
const m = Q(null);
|
|
54
|
+
return J(() => {
|
|
55
55
|
var n;
|
|
56
56
|
(n = m.current) == null || n.focus();
|
|
57
|
-
}, p), /* @__PURE__ */ r.createElement(
|
|
57
|
+
}, p), /* @__PURE__ */ r.createElement(z, {
|
|
58
58
|
ref: m,
|
|
59
59
|
id: s,
|
|
60
60
|
"aria-describedby": l,
|
|
@@ -73,20 +73,20 @@ e.Error = w;
|
|
|
73
73
|
const O = (t) => te(t) ?? NaN, oe = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(P, {
|
|
74
74
|
content: t,
|
|
75
75
|
locale: a
|
|
76
|
-
}),
|
|
76
|
+
}), Re = () => {
|
|
77
77
|
const t = se();
|
|
78
78
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
79
|
-
className: i(
|
|
79
|
+
className: i(K, d.label)
|
|
80
80
|
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
81
|
-
className: i(
|
|
81
|
+
className: i(W, d.requiredMark)
|
|
82
82
|
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
83
83
|
className: t
|
|
84
84
|
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
85
|
-
className: i(
|
|
85
|
+
className: i(X, d.error)
|
|
86
86
|
}, /* @__PURE__ */ r.createElement(ae, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
87
|
-
className: i(
|
|
87
|
+
className: i(Y, d.description)
|
|
88
88
|
}, oe));
|
|
89
89
|
};
|
|
90
90
|
export {
|
|
91
|
-
|
|
91
|
+
Re as N
|
|
92
92
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import e, { useState as
|
|
1
|
+
import e, { useState as N, useRef as S } from "react";
|
|
2
2
|
import { RicosViewer as x } from "@wix/ricos/viewer";
|
|
3
3
|
import d from "classnames";
|
|
4
|
-
import { bj as E, bg as I, bl as O, bt as A,
|
|
4
|
+
import { bj as E, bg as I, bl as O, bt as A, R as B, $ as V, G as v, u as P } from "./form-DtzwuBIo.js";
|
|
5
5
|
import { TextField as M, Group as k, Input as q, Button as j } from "react-aria-components";
|
|
6
6
|
import { f as u, a as b } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as U, E as G } from "./field-error-headless-
|
|
8
|
-
import { L as H } from "./field-label-headless-
|
|
7
|
+
import { D as U, E as G } from "./field-error-headless-r0fX50xw.js";
|
|
8
|
+
import { L as H } from "./field-label-headless-D-kCfg8j.js";
|
|
9
9
|
import { E as W } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { H as Z } from "./custom-focus-class-_483Pkwp.js";
|
|
11
11
|
import { s as p } from "./field-rac.module-DfEb7pBp.js";
|
|
12
|
-
import { u as
|
|
12
|
+
import { u as $ } from "./use-text-input-class-name-CP2VJOso.js";
|
|
13
13
|
const t = ({ children: o, className: r }) => {
|
|
14
|
-
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, FieldLayout: _ } = E(), { labelId: y } = I(), [R, D] =
|
|
14
|
+
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, FieldLayout: _ } = E(), { labelId: y } = I(), [R, D] = N(!1), F = u(o, t.Label), L = u(o, t.Control), T = u(o, t.Description), w = u(o, t.Error);
|
|
15
15
|
return /* @__PURE__ */ e.createElement(_, {
|
|
16
16
|
fieldId: l,
|
|
17
17
|
renderLabel: () => F,
|
|
@@ -28,11 +28,11 @@ const t = ({ children: o, className: r }) => {
|
|
|
28
28
|
className: r
|
|
29
29
|
}, b(L, {
|
|
30
30
|
isVisible: R,
|
|
31
|
-
onToggleVisibility: () => D((
|
|
31
|
+
onToggleVisibility: () => D((h) => !h)
|
|
32
32
|
})),
|
|
33
33
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, T, w)
|
|
34
34
|
});
|
|
35
|
-
},
|
|
35
|
+
}, Q = ({ children: o, className: r, ...l }) => {
|
|
36
36
|
const { isVisible: s, onToggleVisibility: c } = l, { disabled: n, hasError: m } = E(), a = u(o, t.Input), i = u(o, t.Toggle);
|
|
37
37
|
return /* @__PURE__ */ e.createElement(k, {
|
|
38
38
|
className: r,
|
|
@@ -44,7 +44,7 @@ const t = ({ children: o, className: r }) => {
|
|
|
44
44
|
isVisible: s,
|
|
45
45
|
onToggleVisibility: c
|
|
46
46
|
}));
|
|
47
|
-
},
|
|
47
|
+
}, z = ({ className: o, ...r }) => {
|
|
48
48
|
const { isVisible: l } = r, { id: s, placeholder: c } = E(), { inputId: n, ariaDescribedBy: m } = I(), a = S(null);
|
|
49
49
|
return O(() => {
|
|
50
50
|
var i;
|
|
@@ -57,7 +57,7 @@ const t = ({ children: o, className: r }) => {
|
|
|
57
57
|
className: o,
|
|
58
58
|
placeholder: c
|
|
59
59
|
});
|
|
60
|
-
},
|
|
60
|
+
}, J = ({ className: o, showPasswordTooltipText: r, hidePasswordTooltipText: l, children: s, ...c }) => {
|
|
61
61
|
const { isVisible: n, onToggleVisibility: m } = c, { disabled: a } = E(), i = n ? l : r;
|
|
62
62
|
return /* @__PURE__ */ e.createElement(j, {
|
|
63
63
|
type: "button",
|
|
@@ -71,12 +71,12 @@ const t = ({ children: o, className: r }) => {
|
|
|
71
71
|
}));
|
|
72
72
|
};
|
|
73
73
|
t.Label = H;
|
|
74
|
-
t.Control =
|
|
75
|
-
t.Input =
|
|
76
|
-
t.Toggle =
|
|
74
|
+
t.Control = Q;
|
|
75
|
+
t.Input = z;
|
|
76
|
+
t.Toggle = J;
|
|
77
77
|
t.Description = U;
|
|
78
78
|
t.Error = G;
|
|
79
|
-
const
|
|
79
|
+
const K = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
80
80
|
viewBox: "0 0 24 24",
|
|
81
81
|
width: "20",
|
|
82
82
|
height: "20",
|
|
@@ -91,7 +91,7 @@ const J = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
91
91
|
cx: "12",
|
|
92
92
|
cy: "12",
|
|
93
93
|
r: "3"
|
|
94
|
-
})),
|
|
94
|
+
})), X = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
95
95
|
viewBox: "0 0 24 24",
|
|
96
96
|
width: "20",
|
|
97
97
|
height: "20",
|
|
@@ -111,14 +111,14 @@ const J = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
111
111
|
y1: "21",
|
|
112
112
|
x2: "21",
|
|
113
113
|
y2: "3"
|
|
114
|
-
})),
|
|
115
|
-
control:
|
|
114
|
+
})), Y = "_control_1malj_1", ee = "_toggleButton_1malj_15", g = {
|
|
115
|
+
control: Y,
|
|
116
116
|
toggleButton: ee
|
|
117
117
|
}, te = ({ content: o, locale: r }) => /* @__PURE__ */ e.createElement(x, {
|
|
118
118
|
content: o,
|
|
119
119
|
locale: r
|
|
120
120
|
}), oe = () => {
|
|
121
|
-
const { t: o } = A(), r =
|
|
121
|
+
const { t: o } = A(), r = $(g.control);
|
|
122
122
|
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
123
123
|
className: d(B, p.label)
|
|
124
124
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
@@ -131,7 +131,7 @@ const J = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
131
131
|
className: g.toggleButton,
|
|
132
132
|
showPasswordTooltipText: o("forms.widget.modals.show-password-tooltip"),
|
|
133
133
|
hidePasswordTooltipText: o("forms.widget.modals.hide-password-tooltip")
|
|
134
|
-
}, ({ isVisible: l }) => l ? /* @__PURE__ */ e.createElement(
|
|
134
|
+
}, ({ isVisible: l }) => l ? /* @__PURE__ */ e.createElement(X, null) : /* @__PURE__ */ e.createElement(K, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
135
135
|
className: d(v, p.error)
|
|
136
136
|
}, /* @__PURE__ */ e.createElement(W, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
137
137
|
className: d(P, p.description)
|