@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,13 +1,12 @@
|
|
|
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 {
|
|
5
|
-
import { ProgressBar as
|
|
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
|
+
import { ProgressBar as k, Button as N } from "react-aria-components";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
|
|
8
|
-
function U(n) {
|
|
7
|
+
function M(n) {
|
|
9
8
|
const s = "calc(50% - 2px)";
|
|
10
|
-
return /* @__PURE__ */ t.createElement(
|
|
9
|
+
return /* @__PURE__ */ t.createElement(k, {
|
|
11
10
|
...n,
|
|
12
11
|
isIndeterminate: !0
|
|
13
12
|
}, ({ percentage: e, isIndeterminate: r }) => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("svg", {
|
|
@@ -63,14 +62,14 @@ const u = ({ children: n }) => {
|
|
|
63
62
|
onPress: s
|
|
64
63
|
}, e) : null;
|
|
65
64
|
}, i = ({ className: n, onHoverStart: o, onHoverEnd: s, children: e }) => {
|
|
66
|
-
const { showSubmitButton: r, onSubmitClick:
|
|
65
|
+
const { showSubmitButton: r, onSubmitClick: b, submitText: p, isDisabled: E, isInProgress: m, isSubmitting: v } = B();
|
|
67
66
|
if (!r)
|
|
68
67
|
return null;
|
|
69
68
|
const l = c(e, i.Label), L = c(e, i.Icon), g = c(e, i.Loader), d = v || m;
|
|
70
69
|
return /* @__PURE__ */ t.createElement(N, {
|
|
71
70
|
className: n,
|
|
72
71
|
"aria-label": p,
|
|
73
|
-
onPress: d ? void 0 :
|
|
72
|
+
onPress: d ? void 0 : b,
|
|
74
73
|
onHoverStart: o,
|
|
75
74
|
onHoverEnd: s,
|
|
76
75
|
isDisabled: E && !d,
|
|
@@ -82,19 +81,19 @@ const u = ({ children: n }) => {
|
|
|
82
81
|
return /* @__PURE__ */ t.createElement("span", {
|
|
83
82
|
className: n
|
|
84
83
|
}, o);
|
|
85
|
-
},
|
|
84
|
+
}, U = ({ children: n }) => /* @__PURE__ */ t.createElement(t.Fragment, null, n), D = ({ className: n }) => /* @__PURE__ */ t.createElement("span", {
|
|
86
85
|
className: n
|
|
87
|
-
}, /* @__PURE__ */ t.createElement(
|
|
86
|
+
}, /* @__PURE__ */ t.createElement(M, null));
|
|
88
87
|
i.Label = T;
|
|
89
|
-
i.Icon =
|
|
90
|
-
i.Loader =
|
|
88
|
+
i.Icon = U;
|
|
89
|
+
i.Loader = D;
|
|
91
90
|
_.PreviousButton = C;
|
|
92
91
|
_.NextButton = x;
|
|
93
92
|
_.SubmitButton = i;
|
|
94
93
|
u.SubmitButton = _;
|
|
95
|
-
const
|
|
96
|
-
navigationContainer:
|
|
97
|
-
rowSpacing:
|
|
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
|
+
navigationContainer: H,
|
|
96
|
+
rowSpacing: W,
|
|
98
97
|
navigationButton: V,
|
|
99
98
|
nextButton: X,
|
|
100
99
|
previousButton: $,
|
|
@@ -104,39 +103,39 @@ const D = "_navigationContainer_nvvyn_1", H = "_rowSpacing_nvvyn_6", V = "_navig
|
|
|
104
103
|
progress: G
|
|
105
104
|
}, J = () => {
|
|
106
105
|
var m, v;
|
|
107
|
-
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(() => {
|
|
108
107
|
var l;
|
|
109
|
-
return (l =
|
|
108
|
+
return (l = b.current) == null ? void 0 : l.runAnimationForward();
|
|
110
109
|
}, []), E = f(() => {
|
|
111
110
|
var l;
|
|
112
|
-
return (l =
|
|
111
|
+
return (l = b.current) == null ? void 0 : l.runAnimationBackward();
|
|
113
112
|
}, []);
|
|
114
113
|
return /* @__PURE__ */ t.createElement(u, null, /* @__PURE__ */ t.createElement(u.SubmitButton, {
|
|
115
|
-
className:
|
|
114
|
+
className: S({
|
|
116
115
|
[a.navigationContainer]: n,
|
|
117
116
|
[a.rowSpacing]: o
|
|
118
117
|
})
|
|
119
118
|
}, /* @__PURE__ */ t.createElement(u.SubmitButton.PreviousButton, {
|
|
120
|
-
className:
|
|
119
|
+
className: S(A, a.navigationButton, a.previousButton)
|
|
121
120
|
}), /* @__PURE__ */ t.createElement(u.SubmitButton.NextButton, {
|
|
122
|
-
className:
|
|
121
|
+
className: S(I, a.navigationButton, a.nextButton)
|
|
123
122
|
}), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton, {
|
|
124
|
-
className:
|
|
123
|
+
className: S(O, a.button, {
|
|
125
124
|
[a.buttonNoSteps]: !n,
|
|
126
125
|
[a.buttonWithSteps]: n
|
|
127
126
|
}),
|
|
128
127
|
onHoverStart: p,
|
|
129
128
|
onHoverEnd: E
|
|
130
129
|
}, /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton.Label, {
|
|
131
|
-
className:
|
|
130
|
+
className: w
|
|
132
131
|
}), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton.Icon, null, r.svg ? /* @__PURE__ */ t.createElement(P, {
|
|
133
132
|
...r,
|
|
134
|
-
ref:
|
|
135
|
-
className:
|
|
133
|
+
ref: b,
|
|
134
|
+
className: S(F, R, e)
|
|
136
135
|
}) : null), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton.Loader, {
|
|
137
136
|
className: a.progress
|
|
138
137
|
}))));
|
|
139
|
-
},
|
|
138
|
+
}, et = () => /* @__PURE__ */ t.createElement(J, null);
|
|
140
139
|
export {
|
|
141
|
-
|
|
140
|
+
et as SubmitButtonRAC
|
|
142
141
|
};
|
|
@@ -1,17 +1,16 @@
|
|
|
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
|
|
7
|
-
import { E as W, D as H } from "./field-error-headless-
|
|
8
|
-
import { L as $ } from "./field-label-headless-
|
|
9
|
-
import { F as
|
|
10
|
-
import { E as
|
|
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
|
+
import { F as se } from "./fieldset-headless-CD3fds9J.js";
|
|
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 {
|
|
13
|
-
import { u as
|
|
14
|
-
import { u as ce } from "./use-text-input-class-name-LQ5S-NLh.js";
|
|
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";
|
|
15
14
|
var ue = /* @__PURE__ */ (function(e) {
|
|
16
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;
|
|
17
16
|
})({});
|
|
@@ -24,11 +23,11 @@ const v = "Other", de = (e, o) => {
|
|
|
24
23
|
className: e
|
|
25
24
|
}, a);
|
|
26
25
|
}, q = ({ className: e }) => {
|
|
27
|
-
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,
|
|
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), [
|
|
28
27
|
o,
|
|
29
28
|
n
|
|
30
|
-
]), [c, L] =
|
|
31
|
-
|
|
29
|
+
]), [c, L] = Y(b), f = N(a);
|
|
30
|
+
Z(() => {
|
|
32
31
|
f.current = a;
|
|
33
32
|
});
|
|
34
33
|
const g = k((h) => {
|
|
@@ -42,14 +41,14 @@ const v = "Other", de = (e, o) => {
|
|
|
42
41
|
o,
|
|
43
42
|
n
|
|
44
43
|
]);
|
|
45
|
-
return /* @__PURE__ */ t.createElement(
|
|
44
|
+
return /* @__PURE__ */ t.createElement(B, {
|
|
46
45
|
value: c,
|
|
47
46
|
onChange: g,
|
|
48
47
|
isDisabled: u,
|
|
49
48
|
isReadOnly: m,
|
|
50
49
|
isInvalid: d,
|
|
51
50
|
"aria-label": n
|
|
52
|
-
}, /* @__PURE__ */ t.createElement(
|
|
51
|
+
}, /* @__PURE__ */ t.createElement(J, {
|
|
53
52
|
"data-hook": "tags-other-input",
|
|
54
53
|
"data-filled": c ? !0 : void 0,
|
|
55
54
|
placeholder: l,
|
|
@@ -57,14 +56,14 @@ const v = "Other", de = (e, o) => {
|
|
|
57
56
|
className: e
|
|
58
57
|
}));
|
|
59
58
|
}, T = ({ children: e, className: o, ...a }) => {
|
|
60
|
-
const { value: r, label: l, isOther: i, isFirstOption: u } = a, { id: m, value: d, onChange: p, options: n, disabled:
|
|
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);
|
|
61
60
|
U(() => {
|
|
62
61
|
var E;
|
|
63
62
|
u && ((E = f.current) == null || E.focus({
|
|
64
63
|
preventScroll: !0
|
|
65
64
|
}));
|
|
66
65
|
}, m);
|
|
67
|
-
const g =
|
|
66
|
+
const g = O(e, P), h = I(() => d || [], [
|
|
68
67
|
d
|
|
69
68
|
]), C = I(() => i ? h.find((E) => E === l || E.startsWith(`${l}: `)) || l : r, [
|
|
70
69
|
i,
|
|
@@ -83,14 +82,14 @@ const v = "Other", de = (e, o) => {
|
|
|
83
82
|
n,
|
|
84
83
|
h
|
|
85
84
|
]);
|
|
86
|
-
return /* @__PURE__ */ t.createElement(
|
|
85
|
+
return /* @__PURE__ */ t.createElement(K, {
|
|
87
86
|
inputRef: f,
|
|
88
87
|
value: C,
|
|
89
88
|
onChange: i ? _ : void 0,
|
|
90
|
-
isDisabled:
|
|
89
|
+
isDisabled: b,
|
|
91
90
|
isReadOnly: c,
|
|
92
91
|
isInvalid: L
|
|
93
|
-
}, /* @__PURE__ */ t.createElement(
|
|
92
|
+
}, /* @__PURE__ */ t.createElement(X, {
|
|
94
93
|
className: o,
|
|
95
94
|
"data-hook": `tags-${i ? v : r}`
|
|
96
95
|
}, x(g, {
|
|
@@ -100,7 +99,7 @@ const v = "Other", de = (e, o) => {
|
|
|
100
99
|
isFirstOption: u
|
|
101
100
|
})));
|
|
102
101
|
}, V = ({ children: e, className: o }) => {
|
|
103
|
-
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 =
|
|
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(() => {
|
|
104
103
|
const n = a || [];
|
|
105
104
|
return r ? [
|
|
106
105
|
...n,
|
|
@@ -118,18 +117,18 @@ const v = "Other", de = (e, o) => {
|
|
|
118
117
|
return p.length === 0 ? null : /* @__PURE__ */ t.createElement("div", {
|
|
119
118
|
className: o,
|
|
120
119
|
"data-columns": i
|
|
121
|
-
}, p.map((n,
|
|
120
|
+
}, p.map((n, b) => {
|
|
122
121
|
const c = n.value ?? n.label;
|
|
123
122
|
return x(d, {
|
|
124
123
|
key: n.isOther ? v : c,
|
|
125
124
|
value: c,
|
|
126
125
|
label: n.label,
|
|
127
126
|
isOther: n.isOther,
|
|
128
|
-
isFirstOption:
|
|
127
|
+
isFirstOption: b === 0
|
|
129
128
|
});
|
|
130
129
|
}));
|
|
131
130
|
}, z = ({ children: e, className: o }) => {
|
|
132
|
-
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 =
|
|
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}:`)), [
|
|
133
132
|
a,
|
|
134
133
|
u,
|
|
135
134
|
d
|
|
@@ -138,22 +137,22 @@ const v = "Other", de = (e, o) => {
|
|
|
138
137
|
className: o,
|
|
139
138
|
"data-invalid": l,
|
|
140
139
|
"data-readonly": i
|
|
141
|
-
}, p,
|
|
140
|
+
}, p, b && n);
|
|
142
141
|
}, s = ({ children: e }) => {
|
|
143
|
-
const { id: o, value: a, onChange: r, FieldLayout: l, required: i, disabled: u, readOnly: m, hasError: d, onBlur: p, onFocus: n } = R(), { inputId:
|
|
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 || [], [
|
|
144
143
|
a
|
|
145
|
-
]), g =
|
|
144
|
+
]), g = O(e, $), h = O(e, z), C = O(e, H), _ = O(e, W);
|
|
146
145
|
return /* @__PURE__ */ t.createElement(l, {
|
|
147
146
|
fieldId: o,
|
|
148
147
|
renderLabel: () => g,
|
|
149
|
-
renderInput: () => /* @__PURE__ */ t.createElement(
|
|
150
|
-
id:
|
|
148
|
+
renderInput: () => /* @__PURE__ */ t.createElement(se, {
|
|
149
|
+
id: b,
|
|
151
150
|
ariaLabelledBy: c,
|
|
152
151
|
ariaDescribedBy: L,
|
|
153
152
|
required: i,
|
|
154
153
|
onBlur: p,
|
|
155
154
|
onFocus: n
|
|
156
|
-
}, /* @__PURE__ */ t.createElement(
|
|
155
|
+
}, /* @__PURE__ */ t.createElement(w, {
|
|
157
156
|
"aria-labelledby": c,
|
|
158
157
|
value: f,
|
|
159
158
|
onChange: r,
|
|
@@ -173,32 +172,32 @@ s.Options = V;
|
|
|
173
172
|
s.OtherInput = q;
|
|
174
173
|
s.Description = H;
|
|
175
174
|
s.Error = W;
|
|
176
|
-
const pe = "_control_11yzo_1", he = "_options_11yzo_8", Ee = "_option_11yzo_8",
|
|
175
|
+
const pe = "_control_11yzo_1", he = "_options_11yzo_8", Ee = "_option_11yzo_8", be = "_optionHover_11yzo_80", Oe = "_optionSelected_11yzo_80", F = {
|
|
177
176
|
control: pe,
|
|
178
177
|
options: he,
|
|
179
178
|
option: Ee,
|
|
180
|
-
optionHover:
|
|
181
|
-
optionSelected:
|
|
182
|
-
}, fe = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement(
|
|
179
|
+
optionHover: be,
|
|
180
|
+
optionSelected: Oe
|
|
181
|
+
}, fe = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement(Q, {
|
|
183
182
|
content: e,
|
|
184
183
|
locale: o
|
|
185
184
|
}), Ie = {
|
|
186
185
|
base: F.option,
|
|
187
186
|
selected: F.optionSelected,
|
|
188
187
|
hover: F.optionHover
|
|
189
|
-
},
|
|
188
|
+
}, Ne = () => {
|
|
190
189
|
const e = ie({
|
|
191
|
-
globalClasses:
|
|
190
|
+
globalClasses: re,
|
|
192
191
|
moduleClasses: Ie
|
|
193
192
|
}), o = ce();
|
|
194
193
|
return /* @__PURE__ */ t.createElement(s, null, /* @__PURE__ */ t.createElement(s.Label, {
|
|
195
|
-
className: y(
|
|
194
|
+
className: y(ee, D.label)
|
|
196
195
|
}, /* @__PURE__ */ t.createElement(s.Label.Required, {
|
|
197
|
-
className: y(
|
|
196
|
+
className: y(te, D.requiredMark)
|
|
198
197
|
})), /* @__PURE__ */ t.createElement(s.Control, {
|
|
199
198
|
className: F.control
|
|
200
199
|
}, /* @__PURE__ */ t.createElement(s.Options, {
|
|
201
|
-
className: y(
|
|
200
|
+
className: y(oe, F.options)
|
|
202
201
|
}, /* @__PURE__ */ t.createElement(s.Options.Option, {
|
|
203
202
|
className: ({ isSelected: a, isHovered: r }) => e({
|
|
204
203
|
isSelected: a,
|
|
@@ -207,11 +206,11 @@ const pe = "_control_11yzo_1", he = "_options_11yzo_8", Ee = "_option_11yzo_8",
|
|
|
207
206
|
}, /* @__PURE__ */ t.createElement(s.Options.Option.Label, null))), /* @__PURE__ */ t.createElement(s.OtherInput, {
|
|
208
207
|
className: o
|
|
209
208
|
})), /* @__PURE__ */ t.createElement(s.Error, {
|
|
210
|
-
className: y(
|
|
211
|
-
}, /* @__PURE__ */ t.createElement(
|
|
212
|
-
className: y(
|
|
209
|
+
className: y(ne, D.error)
|
|
210
|
+
}, /* @__PURE__ */ t.createElement(le, null), /* @__PURE__ */ t.createElement(s.Error.Text, null)), /* @__PURE__ */ t.createElement(s.Description, {
|
|
211
|
+
className: y(ae, D.description)
|
|
213
212
|
}, fe));
|
|
214
213
|
};
|
|
215
214
|
export {
|
|
216
|
-
|
|
215
|
+
Ne as T
|
|
217
216
|
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
2
|
-
import
|
|
2
|
+
import o from "classnames";
|
|
3
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
|
|
8
|
-
import { L as
|
|
9
|
-
import { E as
|
|
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
|
+
import { E as P } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { s as c } from "./field-rac.module-B4l_0KRU.js";
|
|
11
|
-
import {
|
|
12
|
-
import { u as V } from "./use-text-input-class-name-LQ5S-NLh.js";
|
|
11
|
+
import { u as U } from "./use-text-input-class-name-va1PzWFg.js";
|
|
13
12
|
const e = ({ children: t }) => {
|
|
14
|
-
const { id: a, value: m, onChange: s, disabled: u, required: n, readOnly:
|
|
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) => {
|
|
15
14
|
s(A);
|
|
16
15
|
}, [
|
|
17
16
|
s
|
|
@@ -24,19 +23,19 @@ const e = ({ children: t }) => {
|
|
|
24
23
|
value: m ?? "",
|
|
25
24
|
onChange: L,
|
|
26
25
|
isDisabled: u,
|
|
27
|
-
isReadOnly:
|
|
26
|
+
isReadOnly: l,
|
|
28
27
|
isRequired: n,
|
|
29
|
-
isInvalid:
|
|
28
|
+
isInvalid: f,
|
|
30
29
|
onBlur: E,
|
|
31
|
-
onFocus:
|
|
30
|
+
onFocus: b
|
|
32
31
|
}, D),
|
|
33
32
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, C, _)
|
|
34
33
|
});
|
|
35
|
-
},
|
|
34
|
+
}, V = ({ className: t }) => {
|
|
36
35
|
const { inputId: a, ariaDescribedBy: m } = d(), { id: s, placeholder: u } = p(), n = O(null);
|
|
37
36
|
return x(() => {
|
|
38
|
-
var
|
|
39
|
-
(
|
|
37
|
+
var l;
|
|
38
|
+
(l = n.current) == null || l.focus();
|
|
40
39
|
}, s), /* @__PURE__ */ r.createElement(y, {
|
|
41
40
|
ref: n,
|
|
42
41
|
id: a,
|
|
@@ -45,29 +44,29 @@ const e = ({ children: t }) => {
|
|
|
45
44
|
className: t
|
|
46
45
|
});
|
|
47
46
|
};
|
|
48
|
-
e.Label =
|
|
49
|
-
e.Input =
|
|
50
|
-
e.Description =
|
|
51
|
-
e.Error =
|
|
52
|
-
const w = "_input_ug5v8_1",
|
|
47
|
+
e.Label = k;
|
|
48
|
+
e.Input = V;
|
|
49
|
+
e.Description = q;
|
|
50
|
+
e.Error = B;
|
|
51
|
+
const w = "_input_ug5v8_1", Q = {
|
|
53
52
|
input: w
|
|
54
|
-
},
|
|
53
|
+
}, $ = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(N, {
|
|
55
54
|
content: t,
|
|
56
55
|
locale: a
|
|
57
|
-
}),
|
|
58
|
-
const t =
|
|
56
|
+
}), re = () => {
|
|
57
|
+
const t = U(Q.input);
|
|
59
58
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
60
|
-
className:
|
|
59
|
+
className: o(g, c.label)
|
|
61
60
|
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
62
|
-
className:
|
|
61
|
+
className: o(h, c.requiredMark)
|
|
63
62
|
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
64
63
|
className: t
|
|
65
64
|
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
66
|
-
className:
|
|
67
|
-
}, /* @__PURE__ */ r.createElement(
|
|
68
|
-
className:
|
|
69
|
-
},
|
|
65
|
+
className: o(v, c.error)
|
|
66
|
+
}, /* @__PURE__ */ r.createElement(P, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
67
|
+
className: o(M, c.description)
|
|
68
|
+
}, $));
|
|
70
69
|
};
|
|
71
70
|
export {
|
|
72
|
-
|
|
71
|
+
re as T
|
|
73
72
|
};
|
package/dist/component/{text-input-field-rac-CmXm6r1w.js → text-input-field-rac-D3MZ8teu.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
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-
|
|
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
9
|
const I = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
|
|
10
10
|
content: s,
|
|
11
11
|
locale: m
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import t, { useRef as L } from "react";
|
|
2
|
-
import { TextField as R, Input as
|
|
3
|
-
import {
|
|
4
|
-
import { f as
|
|
5
|
-
import { D as
|
|
6
|
-
import { L as x } from "./field-label-headless-
|
|
2
|
+
import { TextField as R, Input as v } from "react-aria-components";
|
|
3
|
+
import { b9 as d, b6 as c, bb as T } from "./form-BTDgyr54.js";
|
|
4
|
+
import { f as s } from "./find-child-C60k4CxG.js";
|
|
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
|
-
const { id:
|
|
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, {
|
|
10
|
-
fieldId:
|
|
10
|
+
fieldId: a,
|
|
11
11
|
renderLabel: () => I,
|
|
12
12
|
renderInput: () => /* @__PURE__ */ t.createElement(R, {
|
|
13
13
|
"aria-labelledby": E,
|
|
@@ -23,11 +23,11 @@ const e = ({ children: r }) => {
|
|
|
23
23
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, D, y)
|
|
24
24
|
});
|
|
25
25
|
}, B = ({ className: r }) => {
|
|
26
|
-
const { id:
|
|
27
|
-
return
|
|
26
|
+
const { id: a, placeholder: i } = d(), { inputId: l, ariaDescribedBy: u } = c(), n = L(null);
|
|
27
|
+
return T(() => {
|
|
28
28
|
var o;
|
|
29
29
|
(o = n.current) == null || o.focus();
|
|
30
|
-
},
|
|
30
|
+
}, a), /* @__PURE__ */ t.createElement(v, {
|
|
31
31
|
ref: n,
|
|
32
32
|
id: l,
|
|
33
33
|
"aria-describedby": u,
|
|
@@ -37,8 +37,8 @@ const e = ({ children: r }) => {
|
|
|
37
37
|
};
|
|
38
38
|
e.Label = x;
|
|
39
39
|
e.Input = B;
|
|
40
|
-
e.Description =
|
|
41
|
-
e.Error =
|
|
40
|
+
e.Description = g;
|
|
41
|
+
e.Error = h;
|
|
42
42
|
export {
|
|
43
43
|
e as T
|
|
44
44
|
};
|