@wix/form-elements 1.107.0 → 1.109.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-D2F4vgf1.js → appointment-rac-C9-XwsPI.js} +295 -296
- package/dist/component/{bookings-address-rac-_5S8J8_i.js → bookings-address-rac-jrrCPWjw.js} +1 -1
- package/dist/component/{bookings-email-rac-6vmDR9nS.js → bookings-email-rac-J9-RMEbf.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DtTJ4T2K.js → bookings-first-name-rac-CH7-6JmA.js} +1 -1
- package/dist/component/{bookings-header-rac-B3dsEwzR.js → bookings-header-rac-C2JV-ciN.js} +1 -1
- package/dist/component/{bookings-last-name-rac-B3idkbi8.js → bookings-last-name-rac-0a9CwiaV.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CrRBcQwT.js → bookings-login-bar-rac-4Mb7MQYe.js} +21 -22
- package/dist/component/{bookings-phone-rac-BE0yWNnj.js → bookings-phone-rac-vYx5r5jn.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CYo1l0-6.js → bookings-rich-text-rac-CWg1FgUp.js} +1 -1
- package/dist/component/{checkbox-field-rac-boTtXVEt.js → checkbox-field-rac-Dwx1leKA.js} +27 -28
- package/dist/component/{checkbox-group-field-headless-DnkUvDm8.js → checkbox-group-field-headless-AFWgXzx_.js} +41 -41
- package/dist/component/{checkbox-group-field-rac-DrDTgHMg.js → checkbox-group-field-rac-CO8kmWJp.js} +6 -6
- package/dist/component/{checkbox-group-rac-v3ozUBpo.js → checkbox-group-rac-_79HsFF4.js} +1 -1
- package/dist/component/{checkbox-rac-YSLE-RnG.js → checkbox-rac-B_tbMfjo.js} +1 -1
- package/dist/component/{contacts-address-rac-C653yaHZ.js → contacts-address-rac-SJ5Tvzd0.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BeAQ6shx.js → contacts-birthdate-rac-BU1L3sbW.js} +1 -1
- package/dist/component/{contacts-company-rac-BglKOoTG.js → contacts-company-rac-Y4B8KhDa.js} +1 -1
- package/dist/component/{contacts-email-rac-D6m7ynfc.js → contacts-email-rac-CQW84o7C.js} +1 -1
- package/dist/component/{contacts-first-name-rac-Dgxn0tUJ.js → contacts-first-name-rac-Dtai-wtH.js} +1 -1
- package/dist/component/{contacts-last-name-rac-1UyIuRKH.js → contacts-last-name-rac--ixuu3ri.js} +1 -1
- package/dist/component/{contacts-phone-rac-BQ77BlW4.js → contacts-phone-rac-HOHfSvT-.js} +1 -1
- package/dist/component/{contacts-position-rac-BUDUv7lv.js → contacts-position-rac-BPMkh6yf.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DdtA0qKW.js → contacts-subscribe-rac-D0_RMwJb.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-WUaKcNl0.js → contacts-tax-id-rac-CZJmMiVf.js} +1 -1
- package/dist/component/{date-availability-XjBFq8jt.js → date-availability-C4dDHvuc.js} +1 -1
- package/dist/component/{date-input-field-rac-aY2zuuKs.js → date-input-field-rac-8oERZcqh.js} +79 -80
- package/dist/component/{date-input-rac-DRiP2_97.js → date-input-rac-CYRojmW6.js} +1 -1
- package/dist/component/{date-picker-field-rac-Bzl-d3Uj.js → date-picker-field-rac-CIspU7No.js} +87 -88
- package/dist/component/{date-picker-rac-DHHUh8vn.js → date-picker-rac-D0Y0zf2J.js} +1 -1
- package/dist/component/{date-time-input-field-rac-DP_StuLr.js → date-time-input-field-rac-0daWK65I.js} +73 -74
- package/dist/component/{date-time-input-rac-B11KIxsf.js → date-time-input-rac-BemKPk1j.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BHZBqyWv.js → dext-checkbox-group-rac-BpFNn56W.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BIlAqEvV.js → dext-checkbox-rac-DOISgubJ.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CHBXNrZi.js → dext-date-picker-rac-CNGhFg_g.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BYtliKry.js → dext-date-time-input-rac-BuUIvJRr.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C2VPSFV5.js → dext-dropdown-rac-DtND-Dbo.js} +1 -1
- package/dist/component/{dext-email-rac-Fnb0Ggcs.js → dext-email-rac-CmjLFOi8.js} +1 -1
- package/dist/component/{dext-number-input-rac-DopfSyFi.js → dext-number-input-rac-DHTNg1dh.js} +1 -1
- package/dist/component/{dext-phone-rac-Rn4i_2rc.js → dext-phone-rac-BrrU5qH_.js} +1 -1
- package/dist/component/{dext-radio-group-rac-bNaskJpK.js → dext-radio-group-rac-CD3MGfAM.js} +4 -4
- package/dist/component/{dext-rating-input-rac-DL6ZZd7d.js → dext-rating-input-rac-BETGJZmt.js} +1 -1
- package/dist/component/{dext-tags-rac-TsUPoImO.js → dext-tags-rac-Coo9jN-T.js} +4 -4
- package/dist/component/{dext-text-area-rac-BIuY7LTd.js → dext-text-area-rac-CNWjqhUT.js} +1 -1
- package/dist/component/{dext-text-input-rac-CSYPW0Qi.js → dext-text-input-rac-CCWyDexv.js} +1 -1
- package/dist/component/{dext-url-input-rac-_g0lqGfW.js → dext-url-input-rac-Dtakkgmk.js} +1 -1
- package/dist/component/{donation-rac-BYKFtsyR.js → donation-rac-BboGm_k_.js} +101 -102
- package/dist/component/{dropdown-field-headless-CBaqlNZi.js → dropdown-field-headless-BTMJGUwY.js} +16 -16
- package/dist/component/{dropdown-field-rac-CCAGSMm3.js → dropdown-field-rac-CDRV8ckB.js} +5 -5
- package/dist/component/{dropdown-rac-C_EqUsZ1.js → dropdown-rac-kEuU2pXW.js} +1 -1
- package/dist/component/{ecom-address-rac-Bw9eH0iF.js → ecom-address-rac-BgKL9ElH.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-B5PVOO2a.js → ecom-subscription-checkbox-rac-CDhJsNPD.js} +6 -6
- package/dist/component/{email-input-field-rac-B2kqQ6yo.js → email-input-field-rac-DdOd86NX.js} +54 -55
- package/dist/component/{events-repeater-rac--4OnUxWE.js → events-repeater-rac-_VJ30dpB.js} +62 -63
- package/dist/component/{events-rsvp-rac-CczCoo3T.js → events-rsvp-rac-DA-261bq.js} +5 -5
- package/dist/component/{field-error-headless-D3-1L5sf.js → field-error-headless-CovyN0GI.js} +8 -8
- package/dist/component/{field-label-headless-Du4ckIVy.js → field-label-headless-DVvX2QaH.js} +11 -11
- package/dist/component/file-upload-rac-bhEPUJPs.js +561 -0
- package/dist/component/fixed-payment-rac-DmI6MeKc.js +61 -0
- package/dist/component/{form-DQauhsho.js → form-BTDgyr54.js} +3430 -3244
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +3 -3
- package/dist/component/header-field-rac-C0rUjmo0.js +24 -0
- package/dist/component/{header-rac-CR9T3Pnu.js → header-rac-DRMO22PV.js} +1 -1
- package/dist/component/{image-choice-rac-DJ_8v467.js → image-choice-rac-CQDQ7AlD.js} +32 -33
- package/dist/component/{index-CcUTIUWM.js → index-B9QlosT1.js} +12 -12
- package/dist/component/{index-BB7d_9Dv.js → index-CNWT9t6j.js} +66 -66
- package/dist/component/{isObjectLike-xvPa_08X.js → isObjectLike-c0td2WCR.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CyaFOloE.js → multiline-address-field-rac-D8bVxRsD.js} +124 -125
- package/dist/component/{multiline-address-rac-CaHGUN_f.js → multiline-address-rac-g-6RB7o8.js} +1 -1
- package/dist/component/number-input-field-rac-BaOwQ5Ya.js +92 -0
- package/dist/component/{number-input-rac-DMKX6nhk.js → number-input-rac-BXv8-Pnj.js} +1 -1
- package/dist/component/{password-rac-0RUXPAn6.js → password-rac-BB9XeSSZ.js} +36 -37
- package/dist/component/{payment-input-rac-CHSZ3-Lt.js → payment-input-rac-DwnSV9rM.js} +41 -42
- package/dist/component/{phone-input-field-rac-JmIFcP1e.js → phone-input-field-rac-CC3C4ToW.js} +56 -57
- package/dist/component/{phone-rac-BLRnAPXP.js → phone-rac-DpNhSaE0.js} +1 -1
- package/dist/component/{product-list-rac-BkF5tDwt.js → product-list-rac-BAESk3B6.js} +74 -75
- package/dist/component/{quiz-radio-group-rac-32cCMTUS.js → quiz-radio-group-rac-PS6AZr63.js} +1 -1
- package/dist/component/{radio-button-module-classes-IOulhuSH.js → radio-button-module-classes-CXcn5unY.js} +30 -30
- package/dist/component/{radio-group-field-rac-CJwku6e0.js → radio-group-field-rac-pt8xbDfS.js} +6 -6
- package/dist/component/{radio-group-rac-BiW-9Abj.js → radio-group-rac-DkzkM6N_.js} +1 -1
- package/dist/component/{rating-input-field-rac-B9cwaROK.js → rating-input-field-rac-DDHBkR4x.js} +43 -44
- package/dist/component/{rating-input-rac-BpwlNvzQ.js → rating-input-rac-CcsDmLus.js} +1 -1
- package/dist/component/{rich-content-rac.module-B1uyPmtK.js → rich-content-rac.module-B2vsO6fj.js} +4 -4
- package/dist/component/rich-text-field-rac-CvKht2eC.js +21 -0
- package/dist/component/{rich-text-rac-VfeZxS27.js → rich-text-rac-CRpSffQB.js} +1 -1
- package/dist/component/{service-dropdown-rac-BCfs8IhW.js → service-dropdown-rac-BOpdXNjG.js} +36 -37
- package/dist/component/{services-multi-choice-rac-CCqdF_7P.js → services-multi-choice-rac-t0wdSt_T.js} +20 -21
- package/dist/component/{signature-rac-DOyMo3u0.js → signature-rac-2LsIYYIX.js} +141 -142
- package/dist/component/{submit-button-rac-C2uA5DeE.js → submit-button-rac-BbE8dS35.js} +26 -27
- package/dist/component/{tags-field-rac-C_uIw2by.js → tags-field-rac-BnsBxReU.js} +44 -45
- package/dist/component/{tags-rac-1pQ-fpe_.js → tags-rac-BFH4RINA.js} +1 -1
- package/dist/component/{text-area-field-rac-DqlOkm7e.js → text-area-field-rac-Ag7_gniM.js} +28 -29
- package/dist/component/{text-area-rac-DPdkrFcH.js → text-area-rac-ByUX0p2O.js} +1 -1
- package/dist/component/{text-input-field-rac-CmXm6r1w.js → text-input-field-rac-D3MZ8teu.js} +3 -3
- package/dist/component/{text-input-headless-DD__2DFf.js → text-input-headless-CwONErsY.js} +12 -12
- package/dist/component/{text-input-rac-DRHyQEH7.js → text-input-rac-DLXdAhkK.js} +1 -1
- package/dist/component/{time-input-rac-BJPIymQY.js → time-input-rac-Bs55lTON.js} +33 -34
- package/dist/component/url-input-field-rac-FG-bCh-E.js +74 -0
- package/dist/component/{url-input-rac-C0ChQUzq.js → url-input-rac-BOKuCMTe.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-DjV7FW5y.js +21 -0
- package/dist/component/{use-element-state-class-name-BatTc2bw.js → use-element-state-class-name-DB1AzkvF.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-B0jiPTmS.js → use-is-forced-open-dropdown-ifUIpuwL.js} +7 -7
- package/dist/component/{use-service-options-base-oeE7xszw.js → use-service-options-base-B11cq0HH.js} +7 -7
- package/dist/component/use-text-input-class-name-va1PzWFg.js +23 -0
- package/dist/form.d.ts +21 -1
- package/package.json +2 -2
- package/dist/component/file-upload-rac-DbdkUbWM.js +0 -484
- package/dist/component/fixed-payment-rac-f9-01iDN.js +0 -62
- package/dist/component/form-element-classes-bLFmhsKw.js +0 -137
- package/dist/component/header-field-rac-DamDk5BR.js +0 -25
- package/dist/component/number-input-field-rac-BuYUzDWV.js +0 -93
- package/dist/component/rich-text-field-rac-C_qE7Ykg.js +0 -22
- package/dist/component/url-input-field-rac-CFDYkZ6I.js +0 -75
- package/dist/component/use-dropdown-option-class-name-3L5ZmNLK.js +0 -21
- package/dist/component/use-text-input-class-name-LQ5S-NLh.js +0 -24
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import m from "classnames";
|
|
2
|
-
import e from "react";
|
|
3
|
-
import { ak as u, Y as i, X as C, _ as R, L as T } from "./form-DQauhsho.js";
|
|
4
|
-
import { u as d, R as g, s as p, T as S } from "./rich-content-rac.module-B1uyPmtK.js";
|
|
5
|
-
import { T as h } from "./form-element-classes-bLFmhsKw.js";
|
|
6
|
-
const P = ({ truncate: t = !0 } = {}) => {
|
|
7
|
-
const { content: a, maxShownParagraphs: s } = u(), o = e.useMemo(() => ({
|
|
8
|
-
colorPalette: R(),
|
|
9
|
-
customStyles: {
|
|
10
|
-
...C(),
|
|
11
|
-
...i()
|
|
12
|
-
}
|
|
13
|
-
}), []), { displayedContent: n, isTruncated: r, isTruncateButtonShown: c, toggleTruncate: l } = d(a, t ? s : void 0);
|
|
14
|
-
return /* @__PURE__ */ e.createElement(g, null, () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(T, {
|
|
15
|
-
className: m(h, p.richContent),
|
|
16
|
-
content: n,
|
|
17
|
-
customTheme: o
|
|
18
|
-
}), c && /* @__PURE__ */ e.createElement(S, {
|
|
19
|
-
isTruncated: r,
|
|
20
|
-
onClick: l
|
|
21
|
-
})));
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
P as H
|
|
25
|
-
};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as P } from "@wix/ricos/viewer";
|
|
2
|
-
import i from "classnames";
|
|
3
|
-
import r, { useState as j, useCallback as J, useEffect as Q, useRef as U } from "react";
|
|
4
|
-
import { NumberField as $, Input as z } from "react-aria-components";
|
|
5
|
-
import { ak as _, ah as S, au as G, am as H } from "./form-DQauhsho.js";
|
|
6
|
-
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as K, E as W } from "./field-error-headless-D3-1L5sf.js";
|
|
8
|
-
import { L as X } from "./field-label-headless-Du4ckIVy.js";
|
|
9
|
-
import { g as Y, c as Z } from "./numeric-input-utils-CuBMi4-a.js";
|
|
10
|
-
import { u as w } from "./use-invoke-callback-UH73A_J3.js";
|
|
11
|
-
import { E as ee } from "./error-icon-hZxQ6DEy.js";
|
|
12
|
-
import { s as p } from "./field-rac.module-B4l_0KRU.js";
|
|
13
|
-
import { v as re, J as te, o as ae, j as ne } from "./form-element-classes-bLFmhsKw.js";
|
|
14
|
-
import { u as se } from "./use-text-input-class-name-LQ5S-NLh.js";
|
|
15
|
-
const e = ({ children: t }) => {
|
|
16
|
-
var F, L, R;
|
|
17
|
-
const { id: n, value: s, onChange: l, disabled: d, required: E, readOnly: o, onBlur: b, onFocus: f, FieldLayout: m, hasError: u, validation: a } = _(), { labelId: y } = S(), D = ((F = a == null ? void 0 : a.number) == null ? void 0 : F.multipleOf) || 1, A = (L = a == null ? void 0 : a.number) == null ? void 0 : L.maximum, g = (R = a == null ? void 0 : a.number) == null ? void 0 : R.minimum, h = O(s), [x, I] = j(h), T = w(b), V = c(t, e.Label), k = c(t, e.Input), q = c(t, e.Description), M = c(t, e.Error), B = J((N) => {
|
|
18
|
-
if (N === void 0 || Number.isNaN(N)) {
|
|
19
|
-
l(""), I(NaN);
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const v = Y(D), C = Number(N.toFixed(v));
|
|
23
|
-
l(C), I(C);
|
|
24
|
-
}, [
|
|
25
|
-
D,
|
|
26
|
-
l
|
|
27
|
-
]);
|
|
28
|
-
return Q(() => {
|
|
29
|
-
I(O(s));
|
|
30
|
-
}, [
|
|
31
|
-
s
|
|
32
|
-
]), /* @__PURE__ */ r.createElement(m, {
|
|
33
|
-
fieldId: n,
|
|
34
|
-
renderLabel: () => V,
|
|
35
|
-
renderInput: () => /* @__PURE__ */ r.createElement($, {
|
|
36
|
-
"aria-labelledby": y,
|
|
37
|
-
value: x,
|
|
38
|
-
onChange: B,
|
|
39
|
-
isDisabled: d,
|
|
40
|
-
isRequired: E,
|
|
41
|
-
isReadOnly: o,
|
|
42
|
-
isInvalid: u,
|
|
43
|
-
onBlur: T,
|
|
44
|
-
onFocus: f,
|
|
45
|
-
minValue: g ?? void 0,
|
|
46
|
-
maxValue: A ?? void 0
|
|
47
|
-
}, k),
|
|
48
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, M, q)
|
|
49
|
-
});
|
|
50
|
-
}, le = ({ className: t }) => {
|
|
51
|
-
var u;
|
|
52
|
-
const { t: n } = G(), { inputId: s, ariaDescribedBy: l } = S(), { id: d, placeholder: E, validation: o, label: b, required: f } = _();
|
|
53
|
-
(u = o == null ? void 0 : o.number) != null && u.multipleOf;
|
|
54
|
-
const m = U(null);
|
|
55
|
-
return H(() => {
|
|
56
|
-
var a;
|
|
57
|
-
(a = m.current) == null || a.focus();
|
|
58
|
-
}, d), /* @__PURE__ */ r.createElement(z, {
|
|
59
|
-
ref: m,
|
|
60
|
-
id: s,
|
|
61
|
-
"aria-describedby": l,
|
|
62
|
-
"aria-label": b,
|
|
63
|
-
"aria-roledescription": n("field.number.aria-role-description"),
|
|
64
|
-
className: t,
|
|
65
|
-
inputMode: "decimal",
|
|
66
|
-
placeholder: E,
|
|
67
|
-
required: f
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
|
-
e.Label = X;
|
|
71
|
-
e.Input = le;
|
|
72
|
-
e.Description = K;
|
|
73
|
-
e.Error = W;
|
|
74
|
-
const O = (t) => Z(t) ?? NaN, oe = ({ content: t, locale: n }) => /* @__PURE__ */ r.createElement(P, {
|
|
75
|
-
content: t,
|
|
76
|
-
locale: n
|
|
77
|
-
}), Re = () => {
|
|
78
|
-
const t = se();
|
|
79
|
-
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
80
|
-
className: i(re, p.label)
|
|
81
|
-
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
82
|
-
className: i(te, p.requiredMark)
|
|
83
|
-
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
84
|
-
className: t
|
|
85
|
-
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
86
|
-
className: i(ae, p.error)
|
|
87
|
-
}, /* @__PURE__ */ r.createElement(ee, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
88
|
-
className: i(ne, p.description)
|
|
89
|
-
}, oe));
|
|
90
|
-
};
|
|
91
|
-
export {
|
|
92
|
-
Re as N
|
|
93
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import l from "classnames";
|
|
2
|
-
import e from "react";
|
|
3
|
-
import { ak as m, L as i, X as u, _ as R } from "./form-DQauhsho.js";
|
|
4
|
-
import { u as T, R as C, s as d, T as p } from "./rich-content-rac.module-B1uyPmtK.js";
|
|
5
|
-
import { T as g } from "./form-element-classes-bLFmhsKw.js";
|
|
6
|
-
const h = {
|
|
7
|
-
colorPalette: R(),
|
|
8
|
-
customStyles: u()
|
|
9
|
-
}, _ = ({ truncate: t = !0 } = {}) => {
|
|
10
|
-
const { content: a, maxShownParagraphs: s } = m(), { displayedContent: n, isTruncated: o, isTruncateButtonShown: r, toggleTruncate: c } = T(a, t ? s : void 0);
|
|
11
|
-
return /* @__PURE__ */ e.createElement(C, null, () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(i, {
|
|
12
|
-
className: l(g, d.richContent),
|
|
13
|
-
content: n,
|
|
14
|
-
customTheme: h
|
|
15
|
-
}), r && /* @__PURE__ */ e.createElement(p, {
|
|
16
|
-
isTruncated: o,
|
|
17
|
-
onClick: c
|
|
18
|
-
})));
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
_ as R
|
|
22
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
2
|
-
import i from "classnames";
|
|
3
|
-
import r, { useCallback as S, useRef as O } from "react";
|
|
4
|
-
import { TextField as y, Input as A } from "react-aria-components";
|
|
5
|
-
import { ak as d, ah as E, am as k } from "./form-DQauhsho.js";
|
|
6
|
-
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as v, E as B } from "./field-error-headless-D3-1L5sf.js";
|
|
8
|
-
import { L as T } from "./field-label-headless-Du4ckIVy.js";
|
|
9
|
-
import { u as g } from "./use-invoke-callback-UH73A_J3.js";
|
|
10
|
-
import { E as M } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
-
import { s as u } from "./field-rac.module-B4l_0KRU.js";
|
|
12
|
-
import { v as P, J as q, o as x, j as U } from "./form-element-classes-bLFmhsKw.js";
|
|
13
|
-
import { u as w } from "./use-text-input-class-name-LQ5S-NLh.js";
|
|
14
|
-
const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
|
|
15
|
-
const { id: o, value: a, onChange: s, disabled: m, readOnly: n, required: l, hasError: I, onBlur: f, onFocus: b, FieldLayout: R } = d(), { labelId: F } = E(), p = g(f), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), h = S(() => {
|
|
16
|
-
s(V(a)), p();
|
|
17
|
-
}, [
|
|
18
|
-
p,
|
|
19
|
-
s,
|
|
20
|
-
a
|
|
21
|
-
]);
|
|
22
|
-
return /* @__PURE__ */ r.createElement(R, {
|
|
23
|
-
fieldId: o,
|
|
24
|
-
renderLabel: () => L,
|
|
25
|
-
renderInput: () => /* @__PURE__ */ r.createElement(y, {
|
|
26
|
-
"aria-labelledby": F,
|
|
27
|
-
value: a ?? "",
|
|
28
|
-
onChange: s,
|
|
29
|
-
isDisabled: m,
|
|
30
|
-
isReadOnly: n,
|
|
31
|
-
isRequired: l,
|
|
32
|
-
isInvalid: I,
|
|
33
|
-
onBlur: h,
|
|
34
|
-
onFocus: b
|
|
35
|
-
}, D),
|
|
36
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, C)
|
|
37
|
-
});
|
|
38
|
-
}, W = ({ className: t }) => {
|
|
39
|
-
const { id: o, placeholder: a } = d(), { inputId: s, ariaDescribedBy: m } = E(), n = O(null);
|
|
40
|
-
return k(() => {
|
|
41
|
-
var l;
|
|
42
|
-
(l = n.current) == null || l.focus();
|
|
43
|
-
}, o), /* @__PURE__ */ r.createElement(A, {
|
|
44
|
-
ref: n,
|
|
45
|
-
id: s,
|
|
46
|
-
type: "url",
|
|
47
|
-
"aria-describedby": m,
|
|
48
|
-
className: t,
|
|
49
|
-
placeholder: a
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
e.Label = T;
|
|
53
|
-
e.Input = W;
|
|
54
|
-
e.Description = v;
|
|
55
|
-
e.Error = B;
|
|
56
|
-
const $ = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(N, {
|
|
57
|
-
content: t,
|
|
58
|
-
locale: o
|
|
59
|
-
}), oe = () => {
|
|
60
|
-
const t = w();
|
|
61
|
-
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
62
|
-
className: i(P, u.label)
|
|
63
|
-
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
64
|
-
className: i(q, u.requiredMark)
|
|
65
|
-
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
66
|
-
className: t
|
|
67
|
-
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
68
|
-
className: i(x, u.error)
|
|
69
|
-
}, /* @__PURE__ */ r.createElement(M, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
70
|
-
className: i(U, u.description)
|
|
71
|
-
}, $));
|
|
72
|
-
};
|
|
73
|
-
export {
|
|
74
|
-
oe as U
|
|
75
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import a from "classnames";
|
|
2
|
-
import { s as o } from "./field-rac.module-B4l_0KRU.js";
|
|
3
|
-
import { m as r } from "./form-element-classes-bLFmhsKw.js";
|
|
4
|
-
import { u as l } from "./use-element-state-class-name-BatTc2bw.js";
|
|
5
|
-
const m = {
|
|
6
|
-
base: o.selectOption,
|
|
7
|
-
selected: o.selectOptionSelected,
|
|
8
|
-
hover: o.selectOptionHover
|
|
9
|
-
}, O = ({ isSelected: e, isHovered: s, isFocused: t }) => ({
|
|
10
|
-
isSelected: e,
|
|
11
|
-
isHovered: (s || t) && !e
|
|
12
|
-
}), N = (...e) => {
|
|
13
|
-
const s = l({
|
|
14
|
-
globalClasses: r,
|
|
15
|
-
moduleClasses: m
|
|
16
|
-
});
|
|
17
|
-
return (t) => a(s(O(t)), e);
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
N as u
|
|
21
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ak as l } from "./form-DQauhsho.js";
|
|
2
|
-
import { s } from "./field-rac.module-B4l_0KRU.js";
|
|
3
|
-
import { O as m } from "./form-element-classes-bLFmhsKw.js";
|
|
4
|
-
import { u as i } from "./use-element-state-class-name-BatTc2bw.js";
|
|
5
|
-
const c = (...e) => {
|
|
6
|
-
const { disabled: a, readOnly: t } = l(), o = i({
|
|
7
|
-
globalClasses: m,
|
|
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
|
-
};
|