@wix/form-elements 1.108.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-ZAp8oWbK.js → appointment-rac-C9-XwsPI.js} +60 -60
- package/dist/component/{bookings-address-rac-x-Az7vHf.js → bookings-address-rac-jrrCPWjw.js} +1 -1
- package/dist/component/{bookings-email-rac-MoF_CaqB.js → bookings-email-rac-J9-RMEbf.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CWh3Rb0M.js → bookings-first-name-rac-CH7-6JmA.js} +1 -1
- package/dist/component/{bookings-header-rac-BVTiXUWk.js → bookings-header-rac-C2JV-ciN.js} +1 -1
- package/dist/component/{bookings-last-name-rac-kXRRlyHl.js → bookings-last-name-rac-0a9CwiaV.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-C4Zr6kXE.js → bookings-login-bar-rac-4Mb7MQYe.js} +3 -3
- package/dist/component/{bookings-phone-rac-2rz1m_xi.js → bookings-phone-rac-vYx5r5jn.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BEjGypQw.js → bookings-rich-text-rac-CWg1FgUp.js} +1 -1
- package/dist/component/{checkbox-field-rac-DwEQLIaz.js → checkbox-field-rac-Dwx1leKA.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-BsOww_QB.js → checkbox-group-field-headless-AFWgXzx_.js} +8 -8
- package/dist/component/{checkbox-group-field-rac-DTcZcVS6.js → checkbox-group-field-rac-CO8kmWJp.js} +4 -4
- package/dist/component/{checkbox-group-rac-DQsML-pW.js → checkbox-group-rac-_79HsFF4.js} +1 -1
- package/dist/component/{checkbox-rac-irEBBOxP.js → checkbox-rac-B_tbMfjo.js} +1 -1
- package/dist/component/{contacts-address-rac-B5bSAYrm.js → contacts-address-rac-SJ5Tvzd0.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DyScj8f4.js → contacts-birthdate-rac-BU1L3sbW.js} +1 -1
- package/dist/component/{contacts-company-rac-C5X9-jXa.js → contacts-company-rac-Y4B8KhDa.js} +1 -1
- package/dist/component/{contacts-email-rac-B0vkfmrS.js → contacts-email-rac-CQW84o7C.js} +1 -1
- package/dist/component/{contacts-first-name-rac-Cfil3U_e.js → contacts-first-name-rac-Dtai-wtH.js} +1 -1
- package/dist/component/{contacts-last-name-rac-CtPLE-7-.js → contacts-last-name-rac--ixuu3ri.js} +1 -1
- package/dist/component/{contacts-phone-rac-YkzsAoBZ.js → contacts-phone-rac-HOHfSvT-.js} +1 -1
- package/dist/component/{contacts-position-rac-BS4j8QC-.js → contacts-position-rac-BPMkh6yf.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-z_9VsEZL.js → contacts-subscribe-rac-D0_RMwJb.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-WFkmKyZv.js → contacts-tax-id-rac-CZJmMiVf.js} +1 -1
- package/dist/component/{date-availability-NN3rxosk.js → date-availability-C4dDHvuc.js} +1 -1
- package/dist/component/{date-input-field-rac-mdhEC3oq.js → date-input-field-rac-8oERZcqh.js} +64 -64
- package/dist/component/{date-input-rac-CGciuoTx.js → date-input-rac-CYRojmW6.js} +1 -1
- package/dist/component/{date-picker-field-rac-CRZVODfF.js → date-picker-field-rac-CIspU7No.js} +31 -31
- package/dist/component/{date-picker-rac-Bfbvjy8W.js → date-picker-rac-D0Y0zf2J.js} +1 -1
- package/dist/component/{date-time-input-field-rac-TDWBXZ44.js → date-time-input-field-rac-0daWK65I.js} +70 -70
- package/dist/component/{date-time-input-rac-DY0qdSix.js → date-time-input-rac-BemKPk1j.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BFGM7SOt.js → dext-checkbox-group-rac-BpFNn56W.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DPZvTeUZ.js → dext-checkbox-rac-DOISgubJ.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Xd5kojsQ.js → dext-date-picker-rac-CNGhFg_g.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-C0RIdxJW.js → dext-date-time-input-rac-BuUIvJRr.js} +1 -1
- package/dist/component/{dext-dropdown-rac-D1m8vJvm.js → dext-dropdown-rac-DtND-Dbo.js} +1 -1
- package/dist/component/{dext-email-rac-BC81RFYY.js → dext-email-rac-CmjLFOi8.js} +1 -1
- package/dist/component/{dext-number-input-rac-Z_ih9FfX.js → dext-number-input-rac-DHTNg1dh.js} +1 -1
- package/dist/component/{dext-phone-rac-s3BOnXuI.js → dext-phone-rac-BrrU5qH_.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CL3jcezs.js → dext-radio-group-rac-CD3MGfAM.js} +4 -4
- package/dist/component/{dext-rating-input-rac-wz1EyP5b.js → dext-rating-input-rac-BETGJZmt.js} +1 -1
- package/dist/component/{dext-tags-rac-BY4Rf2BP.js → dext-tags-rac-Coo9jN-T.js} +4 -4
- package/dist/component/{dext-text-area-rac-DRJzlsq8.js → dext-text-area-rac-CNWjqhUT.js} +1 -1
- package/dist/component/{dext-text-input-rac-BGcRNNAi.js → dext-text-input-rac-CCWyDexv.js} +1 -1
- package/dist/component/{dext-url-input-rac-CRAIm8yp.js → dext-url-input-rac-Dtakkgmk.js} +1 -1
- package/dist/component/{donation-rac-BlTfOIlE.js → donation-rac-BboGm_k_.js} +74 -74
- package/dist/component/{dropdown-field-headless-DhzRAMcM.js → dropdown-field-headless-BTMJGUwY.js} +10 -10
- package/dist/component/{dropdown-field-rac-DXyY5we-.js → dropdown-field-rac-CDRV8ckB.js} +3 -3
- package/dist/component/{dropdown-rac-C6YM6qxm.js → dropdown-rac-kEuU2pXW.js} +1 -1
- package/dist/component/{ecom-address-rac-CAdr7wya.js → ecom-address-rac-BgKL9ElH.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-Z2VMuCbt.js → ecom-subscription-checkbox-rac-CDhJsNPD.js} +2 -2
- package/dist/component/{email-input-field-rac-DpkfunVK.js → email-input-field-rac-DdOd86NX.js} +47 -47
- package/dist/component/{events-repeater-rac-CuJkdrPo.js → events-repeater-rac-_VJ30dpB.js} +8 -8
- package/dist/component/{events-rsvp-rac-BKWlSeQ9.js → events-rsvp-rac-DA-261bq.js} +10 -10
- package/dist/component/{field-error-headless-tsg9FQ-_.js → field-error-headless-CovyN0GI.js} +11 -11
- package/dist/component/{field-label-headless-CB8dEat8.js → field-label-headless-DVvX2QaH.js} +4 -4
- package/dist/component/file-upload-rac-bhEPUJPs.js +561 -0
- package/dist/component/{fixed-payment-rac-CuIQEeHh.js → fixed-payment-rac-DmI6MeKc.js} +15 -15
- package/dist/component/{form-0jt4L5xo.js → form-BTDgyr54.js} +950 -913
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +3 -3
- package/dist/component/{header-field-rac-CWVGzxKb.js → header-field-rac-C0rUjmo0.js} +4 -4
- package/dist/component/{header-rac-D6KsV-ko.js → header-rac-DRMO22PV.js} +1 -1
- package/dist/component/{image-choice-rac-CUCyVS8c.js → image-choice-rac-CQDQ7AlD.js} +9 -9
- package/dist/component/{index-iOqQidgV.js → index-B9QlosT1.js} +2 -2
- package/dist/component/{index-TJSnVtCO.js → index-CNWT9t6j.js} +43 -43
- package/dist/component/{isObjectLike-DQbx8r1c.js → isObjectLike-c0td2WCR.js} +1 -1
- package/dist/component/{multiline-address-field-rac-DtZ1NTfD.js → multiline-address-field-rac-D8bVxRsD.js} +78 -78
- package/dist/component/{multiline-address-rac-ub-_XzHU.js → multiline-address-rac-g-6RB7o8.js} +1 -1
- package/dist/component/{number-input-field-rac-DLItn4DK.js → number-input-field-rac-BaOwQ5Ya.js} +13 -13
- package/dist/component/{number-input-rac-UuxJzqEx.js → number-input-rac-BXv8-Pnj.js} +1 -1
- package/dist/component/{password-rac-Di6q96Rn.js → password-rac-BB9XeSSZ.js} +15 -15
- package/dist/component/{payment-input-rac-CG6c4-Ge.js → payment-input-rac-DwnSV9rM.js} +44 -44
- package/dist/component/{phone-input-field-rac-D4JphCuT.js → phone-input-field-rac-CC3C4ToW.js} +50 -50
- package/dist/component/{phone-rac-_vDw2usa.js → phone-rac-DpNhSaE0.js} +1 -1
- package/dist/component/{product-list-rac-CgxRlj1f.js → product-list-rac-BAESk3B6.js} +50 -50
- package/dist/component/{quiz-radio-group-rac-bi26aGxN.js → quiz-radio-group-rac-PS6AZr63.js} +1 -1
- package/dist/component/{radio-button-module-classes-DDJq2ESf.js → radio-button-module-classes-CXcn5unY.js} +14 -14
- package/dist/component/{radio-group-field-rac-D1aMVO6l.js → radio-group-field-rac-pt8xbDfS.js} +6 -6
- package/dist/component/{radio-group-rac-HKC85M6t.js → radio-group-rac-DkzkM6N_.js} +1 -1
- package/dist/component/{rating-input-field-rac-CpRehxFB.js → rating-input-field-rac-DDHBkR4x.js} +20 -20
- package/dist/component/{rating-input-rac-BMuCZ3oj.js → rating-input-rac-CcsDmLus.js} +1 -1
- package/dist/component/{rich-content-rac.module-mZ6xoAOd.js → rich-content-rac.module-B2vsO6fj.js} +1 -1
- package/dist/component/{rich-text-field-rac-CUK8V8Kf.js → rich-text-field-rac-CvKht2eC.js} +4 -4
- package/dist/component/{rich-text-rac-B-7sR2FJ.js → rich-text-rac-CRpSffQB.js} +1 -1
- package/dist/component/{service-dropdown-rac-1DDNT5bn.js → service-dropdown-rac-BOpdXNjG.js} +33 -33
- package/dist/component/{services-multi-choice-rac-CB-6dwxz.js → services-multi-choice-rac-t0wdSt_T.js} +13 -13
- package/dist/component/{signature-rac-7XBci6P2.js → signature-rac-2LsIYYIX.js} +133 -133
- package/dist/component/{submit-button-rac-B1-Mk8Gg.js → submit-button-rac-BbE8dS35.js} +17 -17
- package/dist/component/{tags-field-rac-CQ9Y7mq-.js → tags-field-rac-BnsBxReU.js} +32 -32
- package/dist/component/{tags-rac-Visic-Ml.js → tags-rac-BFH4RINA.js} +1 -1
- package/dist/component/{text-area-field-rac-C8fP1g-w.js → text-area-field-rac-Ag7_gniM.js} +14 -14
- package/dist/component/{text-area-rac-B6yZxzxm.js → text-area-rac-ByUX0p2O.js} +1 -1
- package/dist/component/{text-input-field-rac-CNjbOxD1.js → text-input-field-rac-D3MZ8teu.js} +5 -5
- package/dist/component/{text-input-headless-Bm8PJGep.js → text-input-headless-CwONErsY.js} +3 -3
- package/dist/component/{text-input-rac-BEPC1Z-4.js → text-input-rac-DLXdAhkK.js} +1 -1
- package/dist/component/{time-input-rac-3m6C_Jp5.js → time-input-rac-Bs55lTON.js} +27 -27
- package/dist/component/{url-input-field-rac-CIk_6Lf6.js → url-input-field-rac-FG-bCh-E.js} +19 -19
- package/dist/component/{url-input-rac-DyVoygXH.js → url-input-rac-BOKuCMTe.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-McG3ayOT.js → use-dropdown-option-class-name-DjV7FW5y.js} +2 -2
- package/dist/component/{use-element-state-class-name-B9MBWX44.js → use-element-state-class-name-DB1AzkvF.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-r5G_sZsO.js → use-is-forced-open-dropdown-ifUIpuwL.js} +8 -8
- package/dist/component/{use-service-options-base-hcbkvhpw.js → use-service-options-base-B11cq0HH.js} +1 -1
- package/dist/component/{use-text-input-class-name-SnurFqAr.js → use-text-input-class-name-va1PzWFg.js} +2 -2
- package/dist/form.d.ts +18 -0
- package/package.json +2 -2
- package/dist/component/file-upload-rac-ZdgYt646.js +0 -483
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t, { useRef as y, useCallback as f } from "react";
|
|
2
2
|
import P from "@wix/editor-react-components/AnimatedIcon";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
3
|
+
import S from "classnames";
|
|
4
|
+
import { b9 as B, b3 as h, a4 as A, a3 as I, a7 as O, a9 as w, b as F, a8 as R } from "./form-BTDgyr54.js";
|
|
5
5
|
import { ProgressBar as k, Button as N } from "react-aria-components";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
7
|
function M(n) {
|
|
@@ -62,14 +62,14 @@ const u = ({ children: n }) => {
|
|
|
62
62
|
onPress: s
|
|
63
63
|
}, e) : null;
|
|
64
64
|
}, i = ({ className: n, onHoverStart: o, onHoverEnd: s, children: e }) => {
|
|
65
|
-
const { showSubmitButton: r, onSubmitClick:
|
|
65
|
+
const { showSubmitButton: r, onSubmitClick: b, submitText: p, isDisabled: E, isInProgress: m, isSubmitting: v } = B();
|
|
66
66
|
if (!r)
|
|
67
67
|
return null;
|
|
68
68
|
const l = c(e, i.Label), L = c(e, i.Icon), g = c(e, i.Loader), d = v || m;
|
|
69
69
|
return /* @__PURE__ */ t.createElement(N, {
|
|
70
70
|
className: n,
|
|
71
71
|
"aria-label": p,
|
|
72
|
-
onPress: d ? void 0 :
|
|
72
|
+
onPress: d ? void 0 : b,
|
|
73
73
|
onHoverStart: o,
|
|
74
74
|
onHoverEnd: s,
|
|
75
75
|
isDisabled: E && !d,
|
|
@@ -91,36 +91,36 @@ _.PreviousButton = C;
|
|
|
91
91
|
_.NextButton = x;
|
|
92
92
|
_.SubmitButton = i;
|
|
93
93
|
u.SubmitButton = _;
|
|
94
|
-
const H = "_navigationContainer_nvvyn_1", W = "_rowSpacing_nvvyn_6",
|
|
94
|
+
const H = "_navigationContainer_nvvyn_1", W = "_rowSpacing_nvvyn_6", V = "_navigationButton_nvvyn_10", X = "_nextButton_nvvyn_24", $ = "_previousButton_nvvyn_47", j = "_button_nvvyn_90", q = "_buttonNoSteps_nvvyn_133", z = "_buttonWithSteps_nvvyn_137", G = "_progress_nvvyn_165", a = {
|
|
95
95
|
navigationContainer: H,
|
|
96
96
|
rowSpacing: W,
|
|
97
|
-
navigationButton:
|
|
98
|
-
nextButton:
|
|
99
|
-
previousButton:
|
|
97
|
+
navigationButton: V,
|
|
98
|
+
nextButton: X,
|
|
99
|
+
previousButton: $,
|
|
100
100
|
button: j,
|
|
101
101
|
buttonNoSteps: q,
|
|
102
102
|
buttonWithSteps: z,
|
|
103
103
|
progress: G
|
|
104
104
|
}, J = () => {
|
|
105
105
|
var m, v;
|
|
106
|
-
const { hasSteps: n, showPreviousButton: o } = B(), { wix: s, className: e, ...r } = ((v = (m = h().submitButton) == null ? void 0 : m.elementProps) == null ? void 0 : v.icon) ?? {},
|
|
106
|
+
const { hasSteps: n, showPreviousButton: o } = B(), { wix: s, className: e, ...r } = ((v = (m = h().submitButton) == null ? void 0 : m.elementProps) == null ? void 0 : v.icon) ?? {}, b = y(null), p = f(() => {
|
|
107
107
|
var l;
|
|
108
|
-
return (l =
|
|
108
|
+
return (l = b.current) == null ? void 0 : l.runAnimationForward();
|
|
109
109
|
}, []), E = f(() => {
|
|
110
110
|
var l;
|
|
111
|
-
return (l =
|
|
111
|
+
return (l = b.current) == null ? void 0 : l.runAnimationBackward();
|
|
112
112
|
}, []);
|
|
113
113
|
return /* @__PURE__ */ t.createElement(u, null, /* @__PURE__ */ t.createElement(u.SubmitButton, {
|
|
114
|
-
className:
|
|
114
|
+
className: S({
|
|
115
115
|
[a.navigationContainer]: n,
|
|
116
116
|
[a.rowSpacing]: o
|
|
117
117
|
})
|
|
118
118
|
}, /* @__PURE__ */ t.createElement(u.SubmitButton.PreviousButton, {
|
|
119
|
-
className:
|
|
119
|
+
className: S(A, a.navigationButton, a.previousButton)
|
|
120
120
|
}), /* @__PURE__ */ t.createElement(u.SubmitButton.NextButton, {
|
|
121
|
-
className:
|
|
121
|
+
className: S(I, a.navigationButton, a.nextButton)
|
|
122
122
|
}), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton, {
|
|
123
|
-
className:
|
|
123
|
+
className: S(O, a.button, {
|
|
124
124
|
[a.buttonNoSteps]: !n,
|
|
125
125
|
[a.buttonWithSteps]: n
|
|
126
126
|
}),
|
|
@@ -130,8 +130,8 @@ const H = "_navigationContainer_nvvyn_1", W = "_rowSpacing_nvvyn_6", $ = "_navig
|
|
|
130
130
|
className: w
|
|
131
131
|
}), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton.Icon, null, r.svg ? /* @__PURE__ */ t.createElement(P, {
|
|
132
132
|
...r,
|
|
133
|
-
ref:
|
|
134
|
-
className:
|
|
133
|
+
ref: b,
|
|
134
|
+
className: S(F, R, e)
|
|
135
135
|
}) : null), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton.Loader, {
|
|
136
136
|
className: a.progress
|
|
137
137
|
}))));
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as Q } from "@wix/ricos/viewer";
|
|
2
2
|
import y from "classnames";
|
|
3
|
-
import t, { useMemo as I, useState as
|
|
4
|
-
import { CheckboxGroup as
|
|
5
|
-
import {
|
|
6
|
-
import { f as O, a as
|
|
7
|
-
import { E as
|
|
8
|
-
import { L as $ } from "./field-label-headless-
|
|
3
|
+
import t, { useMemo as I, useState as Y, useRef as N, useLayoutEffect as Z, useCallback as k } from "react";
|
|
4
|
+
import { CheckboxGroup as w, TextField as B, Input as J, CheckboxField as K, CheckboxButton as X } from "react-aria-components";
|
|
5
|
+
import { b9 as R, b6 as M, bj as S, bb as U, I as ee, U as te, Y as oe, v as ne, p as ae, Z as re } from "./form-BTDgyr54.js";
|
|
6
|
+
import { f as O, a as x } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { E as W, D as H } from "./field-error-headless-CovyN0GI.js";
|
|
8
|
+
import { L as $ } from "./field-label-headless-DVvX2QaH.js";
|
|
9
9
|
import { F as se } from "./fieldset-headless-CD3fds9J.js";
|
|
10
10
|
import { E as le } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s as D } from "./field-rac.module-B4l_0KRU.js";
|
|
12
|
-
import { u as ie } from "./use-element-state-class-name-
|
|
13
|
-
import { u as ce } from "./use-text-input-class-name-
|
|
12
|
+
import { u as ie } from "./use-element-state-class-name-DB1AzkvF.js";
|
|
13
|
+
import { u as ce } from "./use-text-input-class-name-va1PzWFg.js";
|
|
14
14
|
var ue = /* @__PURE__ */ (function(e) {
|
|
15
15
|
return e[e.FREE_FLOW = 0] = "FREE_FLOW", e[e.ONE = 1] = "ONE", e[e.TWO = 2] = "TWO", e[e.THREE = 3] = "THREE", e;
|
|
16
16
|
})({});
|
|
17
|
-
const
|
|
17
|
+
const v = "Other", de = (e, o) => {
|
|
18
18
|
const r = o.length + 2;
|
|
19
19
|
return (e.find((i) => i.startsWith(`${o}: `)) || "").slice(r);
|
|
20
20
|
}, me = (e) => e.map((o) => o.value ?? o.label), P = ({ className: e, ...o }) => {
|
|
@@ -23,14 +23,14 @@ const R = "Other", de = (e, o) => {
|
|
|
23
23
|
className: e
|
|
24
24
|
}, a);
|
|
25
25
|
}, q = ({ className: e }) => {
|
|
26
|
-
const { value: o, onChange: a, addOtherLabel: r, addOtherPlaceholder: l, otherInputCharacterLimit: i, disabled: u, readOnly: m, hasError: d } =
|
|
26
|
+
const { value: o, onChange: a, addOtherLabel: r, addOtherPlaceholder: l, otherInputCharacterLimit: i, disabled: u, readOnly: m, hasError: d } = R(), { t: p } = S(), n = r || p("add-other.default-other-option-label") || v, b = I(() => de(o || [], n), [
|
|
27
27
|
o,
|
|
28
28
|
n
|
|
29
|
-
]), [c, L] =
|
|
30
|
-
|
|
29
|
+
]), [c, L] = Y(b), f = N(a);
|
|
30
|
+
Z(() => {
|
|
31
31
|
f.current = a;
|
|
32
32
|
});
|
|
33
|
-
const g =
|
|
33
|
+
const g = k((h) => {
|
|
34
34
|
L(h);
|
|
35
35
|
const C = (o || []).filter((E) => !E.startsWith(`${n}:`) && E !== n), _ = h ? `${n}: ${h}` : n;
|
|
36
36
|
f.current([
|
|
@@ -41,14 +41,14 @@ const R = "Other", de = (e, o) => {
|
|
|
41
41
|
o,
|
|
42
42
|
n
|
|
43
43
|
]);
|
|
44
|
-
return /* @__PURE__ */ t.createElement(
|
|
44
|
+
return /* @__PURE__ */ t.createElement(B, {
|
|
45
45
|
value: c,
|
|
46
46
|
onChange: g,
|
|
47
47
|
isDisabled: u,
|
|
48
48
|
isReadOnly: m,
|
|
49
49
|
isInvalid: d,
|
|
50
50
|
"aria-label": n
|
|
51
|
-
}, /* @__PURE__ */ t.createElement(
|
|
51
|
+
}, /* @__PURE__ */ t.createElement(J, {
|
|
52
52
|
"data-hook": "tags-other-input",
|
|
53
53
|
"data-filled": c ? !0 : void 0,
|
|
54
54
|
placeholder: l,
|
|
@@ -56,7 +56,7 @@ const R = "Other", de = (e, o) => {
|
|
|
56
56
|
className: e
|
|
57
57
|
}));
|
|
58
58
|
}, T = ({ children: e, className: o, ...a }) => {
|
|
59
|
-
const { value: r, label: l, isOther: i, isFirstOption: u } = a, { id: m, value: d, onChange: p, options: n, disabled: b, readOnly: c, hasError: L } =
|
|
59
|
+
const { value: r, label: l, isOther: i, isFirstOption: u } = a, { id: m, value: d, onChange: p, options: n, disabled: b, readOnly: c, hasError: L } = R(), f = N(null);
|
|
60
60
|
U(() => {
|
|
61
61
|
var E;
|
|
62
62
|
u && ((E = f.current) == null || E.focus({
|
|
@@ -70,8 +70,8 @@ const R = "Other", de = (e, o) => {
|
|
|
70
70
|
h,
|
|
71
71
|
l,
|
|
72
72
|
r
|
|
73
|
-
]), _ =
|
|
74
|
-
const G = me(n || []), A = h.filter((
|
|
73
|
+
]), _ = k((E) => {
|
|
74
|
+
const G = me(n || []), A = h.filter((j) => G.includes(j));
|
|
75
75
|
p(E ? [
|
|
76
76
|
...A,
|
|
77
77
|
l
|
|
@@ -82,24 +82,24 @@ const R = "Other", de = (e, o) => {
|
|
|
82
82
|
n,
|
|
83
83
|
h
|
|
84
84
|
]);
|
|
85
|
-
return /* @__PURE__ */ t.createElement(
|
|
85
|
+
return /* @__PURE__ */ t.createElement(K, {
|
|
86
86
|
inputRef: f,
|
|
87
87
|
value: C,
|
|
88
88
|
onChange: i ? _ : void 0,
|
|
89
89
|
isDisabled: b,
|
|
90
90
|
isReadOnly: c,
|
|
91
91
|
isInvalid: L
|
|
92
|
-
}, /* @__PURE__ */ t.createElement(
|
|
92
|
+
}, /* @__PURE__ */ t.createElement(X, {
|
|
93
93
|
className: o,
|
|
94
|
-
"data-hook": `tags-${i ?
|
|
95
|
-
},
|
|
94
|
+
"data-hook": `tags-${i ? v : r}`
|
|
95
|
+
}, x(g, {
|
|
96
96
|
value: r,
|
|
97
97
|
label: l,
|
|
98
98
|
isOther: i,
|
|
99
99
|
isFirstOption: u
|
|
100
100
|
})));
|
|
101
101
|
}, V = ({ children: e, className: o }) => {
|
|
102
|
-
const { options: a, addOther: r, addOtherLabel: l, numberOfColumns: i = ue.FREE_FLOW } =
|
|
102
|
+
const { options: a, addOther: r, addOtherLabel: l, numberOfColumns: i = ue.FREE_FLOW } = R(), { t: u } = S(), m = l || u("add-other.default-other-option-label") || v, d = O(e, T), p = I(() => {
|
|
103
103
|
const n = a || [];
|
|
104
104
|
return r ? [
|
|
105
105
|
...n,
|
|
@@ -119,8 +119,8 @@ const R = "Other", de = (e, o) => {
|
|
|
119
119
|
"data-columns": i
|
|
120
120
|
}, p.map((n, b) => {
|
|
121
121
|
const c = n.value ?? n.label;
|
|
122
|
-
return
|
|
123
|
-
key: n.isOther ?
|
|
122
|
+
return x(d, {
|
|
123
|
+
key: n.isOther ? v : c,
|
|
124
124
|
value: c,
|
|
125
125
|
label: n.label,
|
|
126
126
|
isOther: n.isOther,
|
|
@@ -128,7 +128,7 @@ const R = "Other", de = (e, o) => {
|
|
|
128
128
|
});
|
|
129
129
|
}));
|
|
130
130
|
}, z = ({ children: e, className: o }) => {
|
|
131
|
-
const { addOther: a, addOtherLabel: r, hasError: l, readOnly: i, value: u } =
|
|
131
|
+
const { addOther: a, addOtherLabel: r, hasError: l, readOnly: i, value: u } = R(), { t: m } = S(), d = r || m("add-other.default-other-option-label") || v, p = O(e, V), n = O(e, q), b = I(() => !a || !u ? !1 : u.some((c) => c === d || c.startsWith(`${d}:`)), [
|
|
132
132
|
a,
|
|
133
133
|
u,
|
|
134
134
|
d
|
|
@@ -139,9 +139,9 @@ const R = "Other", de = (e, o) => {
|
|
|
139
139
|
"data-readonly": i
|
|
140
140
|
}, p, b && n);
|
|
141
141
|
}, s = ({ children: e }) => {
|
|
142
|
-
const { id: o, value: a, onChange: r, FieldLayout: l, required: i, disabled: u, readOnly: m, hasError: d, onBlur: p, onFocus: n } =
|
|
142
|
+
const { id: o, value: a, onChange: r, FieldLayout: l, required: i, disabled: u, readOnly: m, hasError: d, onBlur: p, onFocus: n } = R(), { inputId: b, labelId: c, ariaDescribedBy: L } = M(), f = I(() => a || [], [
|
|
143
143
|
a
|
|
144
|
-
]), g = O(e, $), h = O(e, z), C = O(e, H), _ = O(e,
|
|
144
|
+
]), g = O(e, $), h = O(e, z), C = O(e, H), _ = O(e, W);
|
|
145
145
|
return /* @__PURE__ */ t.createElement(l, {
|
|
146
146
|
fieldId: o,
|
|
147
147
|
renderLabel: () => g,
|
|
@@ -152,7 +152,7 @@ const R = "Other", de = (e, o) => {
|
|
|
152
152
|
required: i,
|
|
153
153
|
onBlur: p,
|
|
154
154
|
onFocus: n
|
|
155
|
-
}, /* @__PURE__ */ t.createElement(
|
|
155
|
+
}, /* @__PURE__ */ t.createElement(w, {
|
|
156
156
|
"aria-labelledby": c,
|
|
157
157
|
value: f,
|
|
158
158
|
onChange: r,
|
|
@@ -171,14 +171,14 @@ s.Control = z;
|
|
|
171
171
|
s.Options = V;
|
|
172
172
|
s.OtherInput = q;
|
|
173
173
|
s.Description = H;
|
|
174
|
-
s.Error =
|
|
174
|
+
s.Error = W;
|
|
175
175
|
const pe = "_control_11yzo_1", he = "_options_11yzo_8", Ee = "_option_11yzo_8", be = "_optionHover_11yzo_80", Oe = "_optionSelected_11yzo_80", F = {
|
|
176
176
|
control: pe,
|
|
177
177
|
options: he,
|
|
178
178
|
option: Ee,
|
|
179
179
|
optionHover: be,
|
|
180
180
|
optionSelected: Oe
|
|
181
|
-
}, fe = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement(
|
|
181
|
+
}, fe = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement(Q, {
|
|
182
182
|
content: e,
|
|
183
183
|
locale: o
|
|
184
184
|
}), Ie = {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
2
2
|
import o from "classnames";
|
|
3
|
-
import r, { useCallback as
|
|
3
|
+
import r, { useCallback as T, useRef as O } from "react";
|
|
4
4
|
import { TextField as S, TextArea as y } from "react-aria-components";
|
|
5
|
-
import {
|
|
5
|
+
import { b9 as p, b6 as d, bb as x, I as g, U as h, v, p as M } from "./form-BTDgyr54.js";
|
|
6
6
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as q, E as B } from "./field-error-headless-
|
|
8
|
-
import { L as k } from "./field-label-headless-
|
|
7
|
+
import { D as q, E as B } from "./field-error-headless-CovyN0GI.js";
|
|
8
|
+
import { L as k } from "./field-label-headless-DVvX2QaH.js";
|
|
9
9
|
import { E as P } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { s as c } from "./field-rac.module-B4l_0KRU.js";
|
|
11
|
-
import { u as
|
|
11
|
+
import { u as U } from "./use-text-input-class-name-va1PzWFg.js";
|
|
12
12
|
const e = ({ children: t }) => {
|
|
13
|
-
const { id: a, value: m, onChange: s, disabled: u, required: n, readOnly: l, onBlur: E, onFocus: b, FieldLayout: I, hasError: f } = p(), { labelId: F } = d(), L =
|
|
13
|
+
const { id: a, value: m, onChange: s, disabled: u, required: n, readOnly: l, onBlur: E, onFocus: b, FieldLayout: I, hasError: f } = p(), { labelId: F } = d(), L = T((A) => {
|
|
14
14
|
s(A);
|
|
15
15
|
}, [
|
|
16
16
|
s
|
|
@@ -31,7 +31,7 @@ const e = ({ children: t }) => {
|
|
|
31
31
|
}, D),
|
|
32
32
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, C, _)
|
|
33
33
|
});
|
|
34
|
-
},
|
|
34
|
+
}, V = ({ className: t }) => {
|
|
35
35
|
const { inputId: a, ariaDescribedBy: m } = d(), { id: s, placeholder: u } = p(), n = O(null);
|
|
36
36
|
return x(() => {
|
|
37
37
|
var l;
|
|
@@ -45,16 +45,16 @@ const e = ({ children: t }) => {
|
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
47
|
e.Label = k;
|
|
48
|
-
e.Input =
|
|
48
|
+
e.Input = V;
|
|
49
49
|
e.Description = q;
|
|
50
50
|
e.Error = B;
|
|
51
|
-
const
|
|
52
|
-
input:
|
|
53
|
-
},
|
|
51
|
+
const w = "_input_ug5v8_1", Q = {
|
|
52
|
+
input: w
|
|
53
|
+
}, $ = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(N, {
|
|
54
54
|
content: t,
|
|
55
55
|
locale: a
|
|
56
56
|
}), re = () => {
|
|
57
|
-
const t =
|
|
57
|
+
const t = U(Q.input);
|
|
58
58
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
59
59
|
className: o(g, c.label)
|
|
60
60
|
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
@@ -65,7 +65,7 @@ const H = "_input_ug5v8_1", Q = {
|
|
|
65
65
|
className: o(v, c.error)
|
|
66
66
|
}, /* @__PURE__ */ r.createElement(P, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
67
67
|
className: o(M, c.description)
|
|
68
|
-
},
|
|
68
|
+
}, $));
|
|
69
69
|
};
|
|
70
70
|
export {
|
|
71
71
|
re as T
|
package/dist/component/{text-input-field-rac-CNjbOxD1.js → text-input-field-rac-D3MZ8teu.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RicosViewer as l } from "@wix/ricos/viewer";
|
|
2
2
|
import t from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { T as r } from "./text-input-headless-
|
|
4
|
+
import { T as r } from "./text-input-headless-CwONErsY.js";
|
|
5
5
|
import { E as o } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as a } from "./field-rac.module-B4l_0KRU.js";
|
|
7
|
-
import {
|
|
8
|
-
import { u as p } from "./use-text-input-class-name-
|
|
9
|
-
const
|
|
7
|
+
import { I as n, U as c, v as E, p as i } from "./form-BTDgyr54.js";
|
|
8
|
+
import { u as p } from "./use-text-input-class-name-va1PzWFg.js";
|
|
9
|
+
const I = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
|
|
10
10
|
content: s,
|
|
11
11
|
locale: m
|
|
12
12
|
}), C = () => {
|
|
@@ -21,7 +21,7 @@ const u = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
|
|
|
21
21
|
className: t(E, a.error)
|
|
22
22
|
}, /* @__PURE__ */ e.createElement(o, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
23
23
|
className: t(i, a.description)
|
|
24
|
-
},
|
|
24
|
+
}, I));
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
27
27
|
C as T
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import t, { useRef as L } from "react";
|
|
2
2
|
import { TextField as R, Input as v } from "react-aria-components";
|
|
3
|
-
import {
|
|
3
|
+
import { b9 as d, b6 as c, bb as T } from "./form-BTDgyr54.js";
|
|
4
4
|
import { f as s } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as g, E as h } from "./field-error-headless-
|
|
6
|
-
import { L as x } from "./field-label-headless-
|
|
5
|
+
import { D as g, E as h } from "./field-error-headless-CovyN0GI.js";
|
|
6
|
+
import { L as x } from "./field-label-headless-DVvX2QaH.js";
|
|
7
7
|
const e = ({ children: r }) => {
|
|
8
8
|
const { id: a, value: i, onChange: l, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: b, FieldLayout: f } = d(), { labelId: E } = c(), I = s(r, e.Label), F = s(r, e.Input), y = s(r, e.Description), D = s(r, e.Error);
|
|
9
9
|
return /* @__PURE__ */ t.createElement(f, {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import e, { useCallback as V, useRef as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import e, { useCallback as V, useRef as v, useContext as x } from "react";
|
|
2
|
+
import { RicosViewer as q } from "@wix/ricos/viewer";
|
|
3
3
|
import c from "classnames";
|
|
4
4
|
import { parseTime as B } from "@internationalized/date";
|
|
5
|
-
import { TimeField as
|
|
6
|
-
import {
|
|
7
|
-
import { f as m, a as
|
|
8
|
-
import { D as W, E as X } from "./field-error-headless-
|
|
9
|
-
import { L as Y } from "./field-label-headless-
|
|
5
|
+
import { TimeField as U, DateInput as k, DateSegment as _, TimeFieldStateContext as j } from "react-aria-components";
|
|
6
|
+
import { b9 as p, b6 as w, bj as b, bb as Q, I as z, U as G, v as J, p as K } from "./form-BTDgyr54.js";
|
|
7
|
+
import { f as m, a as F } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { D as W, E as X } from "./field-error-headless-CovyN0GI.js";
|
|
9
|
+
import { L as Y } from "./field-label-headless-DVvX2QaH.js";
|
|
10
10
|
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
-
import { H as
|
|
11
|
+
import { H as T } from "./custom-focus-class-_483Pkwp.js";
|
|
12
12
|
import { s as f } from "./field-rac.module-B4l_0KRU.js";
|
|
13
|
-
import { u as $ } from "./use-text-input-class-name-
|
|
13
|
+
import { u as $ } from "./use-text-input-class-name-va1PzWFg.js";
|
|
14
14
|
const r = ({ children: t }) => {
|
|
15
|
-
const { id: n, value: l, onChange: o, disabled: i, readOnly: s, required: a, onBlur: d, onFocus: E, use24HourFormat:
|
|
15
|
+
const { id: n, value: l, onChange: o, disabled: i, readOnly: s, required: a, onBlur: d, onFocus: E, use24HourFormat: S, FieldLayout: C, hasError: I } = p(), { inputId: g, ariaDescribedBy: D, labelId: L } = w(), R = V((M) => {
|
|
16
16
|
const H = ae(M);
|
|
17
17
|
o(H);
|
|
18
18
|
}, [
|
|
@@ -21,39 +21,39 @@ const r = ({ children: t }) => {
|
|
|
21
21
|
return /* @__PURE__ */ e.createElement(C, {
|
|
22
22
|
fieldId: n,
|
|
23
23
|
renderLabel: () => N,
|
|
24
|
-
renderInput: () => /* @__PURE__ */ e.createElement(
|
|
24
|
+
renderInput: () => /* @__PURE__ */ e.createElement(U, {
|
|
25
25
|
"aria-labelledby": L,
|
|
26
|
-
id:
|
|
26
|
+
id: g,
|
|
27
27
|
"aria-describedby": D,
|
|
28
28
|
value: O,
|
|
29
29
|
onChange: R,
|
|
30
30
|
isDisabled: i,
|
|
31
31
|
isReadOnly: s,
|
|
32
|
-
isInvalid:
|
|
32
|
+
isInvalid: I,
|
|
33
33
|
isRequired: a,
|
|
34
34
|
onBlur: d,
|
|
35
35
|
onFocus: E,
|
|
36
|
-
hourCycle:
|
|
36
|
+
hourCycle: S ? 24 : 12
|
|
37
37
|
}, y),
|
|
38
38
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, A, P)
|
|
39
39
|
});
|
|
40
40
|
}, u = ({ children: t, className: n }) => {
|
|
41
41
|
const { hasError: l } = p(), o = m(t, u.Hour), i = m(t, u.Minute), s = m(t, u.Period);
|
|
42
|
-
return /* @__PURE__ */ e.createElement(
|
|
42
|
+
return /* @__PURE__ */ e.createElement(k, {
|
|
43
43
|
className: n,
|
|
44
44
|
"data-invalid": l || void 0
|
|
45
45
|
}, (a) => {
|
|
46
46
|
switch (a.type) {
|
|
47
47
|
case "hour":
|
|
48
|
-
return
|
|
48
|
+
return F(o, {
|
|
49
49
|
segment: a
|
|
50
50
|
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
51
51
|
case "minute":
|
|
52
|
-
return
|
|
52
|
+
return F(i, {
|
|
53
53
|
segment: a
|
|
54
54
|
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
55
55
|
case "dayPeriod":
|
|
56
|
-
return
|
|
56
|
+
return F(s, {
|
|
57
57
|
segment: a
|
|
58
58
|
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
59
59
|
case "literal":
|
|
@@ -65,7 +65,7 @@ const r = ({ children: t }) => {
|
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
}, ee = ({ className: t, ...n }) => {
|
|
68
|
-
const { id: l, hidePlaceholder: o } = p(), { segment: i } = n, { t: s } =
|
|
68
|
+
const { id: l, hidePlaceholder: o } = p(), { segment: i } = n, { t: s } = b(), a = v(null);
|
|
69
69
|
Q(() => {
|
|
70
70
|
var E;
|
|
71
71
|
(E = a.current) == null || E.focus();
|
|
@@ -80,7 +80,7 @@ const r = ({ children: t }) => {
|
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
}, te = ({ className: t, ...n }) => {
|
|
83
|
-
const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } =
|
|
83
|
+
const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = b(), s = l ? void 0 : i("field.date.placeholder.minute");
|
|
84
84
|
return /* @__PURE__ */ e.createElement(_, {
|
|
85
85
|
segment: o,
|
|
86
86
|
className: t,
|
|
@@ -89,7 +89,7 @@ const r = ({ children: t }) => {
|
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
}, re = ({ className: t, ...n }) => {
|
|
92
|
-
const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } =
|
|
92
|
+
const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = b(), s = x(j), a = l ? void 0 : i("field.date.placeholder.period"), d = () => s == null ? void 0 : s.increment("dayPeriod");
|
|
93
93
|
return /* @__PURE__ */ e.createElement(_, {
|
|
94
94
|
segment: o,
|
|
95
95
|
className: t,
|
|
@@ -130,7 +130,7 @@ const oe = "_time_10p0h_1", se = "_hour_10p0h_14", le = "_minute_10p0h_15", ie =
|
|
|
130
130
|
hour: se,
|
|
131
131
|
minute: le,
|
|
132
132
|
period: ie
|
|
133
|
-
}, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(
|
|
133
|
+
}, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(q, {
|
|
134
134
|
content: t,
|
|
135
135
|
locale: n
|
|
136
136
|
}), me = () => {
|
|
@@ -142,17 +142,17 @@ const oe = "_time_10p0h_1", se = "_hour_10p0h_14", le = "_minute_10p0h_15", ie =
|
|
|
142
142
|
})), /* @__PURE__ */ e.createElement(r.Time, {
|
|
143
143
|
className: t
|
|
144
144
|
}, /* @__PURE__ */ e.createElement(r.Time.Hour, {
|
|
145
|
-
className: c(h.hour,
|
|
145
|
+
className: c(h.hour, T)
|
|
146
146
|
}), /* @__PURE__ */ e.createElement(r.Time.Minute, {
|
|
147
|
-
className: c(h.minute,
|
|
147
|
+
className: c(h.minute, T)
|
|
148
148
|
}), /* @__PURE__ */ e.createElement(r.Time.Period, {
|
|
149
|
-
className: c(h.period,
|
|
149
|
+
className: c(h.period, T)
|
|
150
150
|
})), /* @__PURE__ */ e.createElement(r.Error, {
|
|
151
151
|
className: c(J, f.error)
|
|
152
152
|
}, /* @__PURE__ */ e.createElement(Z, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
153
153
|
className: c(K, f.description)
|
|
154
154
|
}, ce));
|
|
155
|
-
},
|
|
155
|
+
}, ge = () => /* @__PURE__ */ e.createElement(me, null);
|
|
156
156
|
export {
|
|
157
|
-
|
|
157
|
+
ge as TimeInputRAC
|
|
158
158
|
};
|
|
@@ -2,17 +2,17 @@ import { RicosViewer as S } from "@wix/ricos/viewer";
|
|
|
2
2
|
import i from "classnames";
|
|
3
3
|
import r, { useCallback as h, useRef as O } from "react";
|
|
4
4
|
import { TextField as y, Input as A } from "react-aria-components";
|
|
5
|
-
import {
|
|
5
|
+
import { b9 as d, b6 as E, bb as v, I as B, U as T, v as g, p as k } from "./form-BTDgyr54.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as M, E as P } from "./field-error-headless-
|
|
8
|
-
import { L as
|
|
9
|
-
import { u as
|
|
10
|
-
import { E as
|
|
7
|
+
import { D as M, E as P } from "./field-error-headless-CovyN0GI.js";
|
|
8
|
+
import { L as U } from "./field-label-headless-DVvX2QaH.js";
|
|
9
|
+
import { u as q } from "./use-invoke-callback-UH73A_J3.js";
|
|
10
|
+
import { E as x } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s as u } from "./field-rac.module-B4l_0KRU.js";
|
|
12
|
-
import { u as w } from "./use-text-input-class-name-
|
|
13
|
-
const
|
|
14
|
-
const { id: o, value: s, onChange: n, disabled: m, readOnly: a, required: l, hasError: I, onBlur: b, onFocus: f, FieldLayout: R } = d(), { labelId: F } = E(), p =
|
|
15
|
-
n(
|
|
12
|
+
import { u as w } from "./use-text-input-class-name-va1PzWFg.js";
|
|
13
|
+
const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
|
|
14
|
+
const { id: o, value: s, onChange: n, disabled: m, readOnly: a, required: l, hasError: I, onBlur: b, onFocus: f, FieldLayout: R } = d(), { labelId: F } = E(), p = q(b), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), N = h(() => {
|
|
15
|
+
n(V(s)), p();
|
|
16
16
|
}, [
|
|
17
17
|
p,
|
|
18
18
|
n,
|
|
@@ -34,9 +34,9 @@ const H = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
|
|
|
34
34
|
}, D),
|
|
35
35
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, C)
|
|
36
36
|
});
|
|
37
|
-
},
|
|
37
|
+
}, W = ({ className: t }) => {
|
|
38
38
|
const { id: o, placeholder: s } = d(), { inputId: n, ariaDescribedBy: m } = E(), a = O(null);
|
|
39
|
-
return
|
|
39
|
+
return v(() => {
|
|
40
40
|
var l;
|
|
41
41
|
(l = a.current) == null || l.focus();
|
|
42
42
|
}, o), /* @__PURE__ */ r.createElement(A, {
|
|
@@ -48,11 +48,11 @@ const H = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
|
|
|
48
48
|
placeholder: s
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
e.Label =
|
|
52
|
-
e.Input =
|
|
51
|
+
e.Label = U;
|
|
52
|
+
e.Input = W;
|
|
53
53
|
e.Description = M;
|
|
54
54
|
e.Error = P;
|
|
55
|
-
const
|
|
55
|
+
const $ = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(S, {
|
|
56
56
|
content: t,
|
|
57
57
|
locale: o
|
|
58
58
|
}), te = () => {
|
|
@@ -60,14 +60,14 @@ const W = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(S, {
|
|
|
60
60
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
61
61
|
className: i(B, u.label)
|
|
62
62
|
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
63
|
-
className: i(
|
|
63
|
+
className: i(T, u.requiredMark)
|
|
64
64
|
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
65
65
|
className: t
|
|
66
66
|
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
67
|
-
className: i(
|
|
68
|
-
}, /* @__PURE__ */ r.createElement(
|
|
69
|
-
className: i(
|
|
70
|
-
},
|
|
67
|
+
className: i(g, u.error)
|
|
68
|
+
}, /* @__PURE__ */ r.createElement(x, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
69
|
+
className: i(k, u.description)
|
|
70
|
+
}, $));
|
|
71
71
|
};
|
|
72
72
|
export {
|
|
73
73
|
te as U
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import a from "classnames";
|
|
2
2
|
import { s as o } from "./field-rac.module-B4l_0KRU.js";
|
|
3
|
-
import { s as r } from "./form-
|
|
4
|
-
import { u as l } from "./use-element-state-class-name-
|
|
3
|
+
import { s as r } from "./form-BTDgyr54.js";
|
|
4
|
+
import { u as l } from "./use-element-state-class-name-DB1AzkvF.js";
|
|
5
5
|
const O = {
|
|
6
6
|
base: o.selectOption,
|
|
7
7
|
selected: o.selectOptionSelected,
|