@wix/form-elements 1.232.0 → 1.234.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-DZrjp-74.js → appointment-rac-DaJz8fBt.js} +4 -4
- package/dist/component/{bookings-address-rac-CLuYL50N.js → bookings-address-rac-lkvT2jFg.js} +1 -1
- package/dist/component/{bookings-email-rac-CioaP-uu.js → bookings-email-rac-B6yDIr7X.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CJy9O5nk.js → bookings-first-name-rac-BdwaASKa.js} +1 -1
- package/dist/component/{bookings-header-rac-BUV96R6-.js → bookings-header-rac-K_4D2edM.js} +1 -1
- package/dist/component/{bookings-last-name-rac-B8W2yQP5.js → bookings-last-name-rac-z1DsE6Te.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BWmdi_6g.js → bookings-login-bar-rac-DuDc27Sg.js} +1 -1
- package/dist/component/{bookings-phone-rac-BhP92OSM.js → bookings-phone-rac-D3I57XfO.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BK88FHYw.js → bookings-rich-text-rac-Dva_0eJC.js} +1 -1
- package/dist/component/{checkbox-field-rac-D-QGRnpL.js → checkbox-field-rac-CcVXm9fo.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-y0T5hMvW.js → checkbox-group-field-headless-DIwGr5_m.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-7CjF2Qcr.js → checkbox-group-field-rac-Di8eepGG.js} +4 -4
- package/dist/component/{checkbox-group-rac-BjOZpz4S.js → checkbox-group-rac-uA3X1M2J.js} +1 -1
- package/dist/component/{checkbox-rac-CTLufn00.js → checkbox-rac-BSYp2Yim.js} +1 -1
- package/dist/component/{contacts-address-rac-Ttn60Rdh.js → contacts-address-rac-BmITc1pA.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-vf0_Ur2J.js → contacts-birthdate-rac-BbiTr6cp.js} +1 -1
- package/dist/component/{contacts-company-rac-BL-zhq1g.js → contacts-company-rac-DUQ7fNTn.js} +1 -1
- package/dist/component/{contacts-email-rac-Czj5OZmy.js → contacts-email-rac-CVqqMJbq.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DnvMBFhA.js → contacts-first-name-rac-uv3ldXXw.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Cz9xFJ0k.js → contacts-last-name-rac-CimDHNgO.js} +1 -1
- package/dist/component/{contacts-phone-rac-CAMbTdYE.js → contacts-phone-rac-BShfAZ5U.js} +1 -1
- package/dist/component/{contacts-position-rac-DR6sJJhD.js → contacts-position-rac-BENXoFz5.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-D_00yDNl.js → contacts-subscribe-rac-CBBgFf9U.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-CWXAK15J.js → contacts-tax-id-rac-B4fcviNx.js} +1 -1
- package/dist/component/{date-availability-Cjf4BqKi.js → date-availability-BrxRBFHK.js} +1 -1
- package/dist/component/date-input-field-rac-BFDOSod0.js +382 -0
- package/dist/component/{date-input-rac-Sk0Tg4Zo.js → date-input-rac-Cd6SHUjO.js} +1 -1
- package/dist/component/{date-picker-field-rac-eFVX4JLG.js → date-picker-field-rac-BN2EjYXP.js} +8 -8
- package/dist/component/{date-picker-rac-D4nrjite.js → date-picker-rac-BQWpqtZJ.js} +1 -1
- package/dist/component/date-time-input-field-rac-BO_3H4NG.js +526 -0
- package/dist/component/{date-time-input-rac-DvYrTH9y.js → date-time-input-rac-wgKGtEcj.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DPEsxP61.js → dext-checkbox-group-rac-DM20MEtm.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BUxVzaRV.js → dext-checkbox-rac-DvzEyVhG.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CB4RronN.js → dext-date-picker-rac-cof0w9i_.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-73yz5e8w.js → dext-date-time-input-rac-BiJqwZ-5.js} +1 -1
- package/dist/component/{dext-dropdown-rac-0c1y5a_k.js → dext-dropdown-rac-DEq1gj7M.js} +1 -1
- package/dist/component/{dext-email-rac-C95wbHgf.js → dext-email-rac-BDg2wBuO.js} +1 -1
- package/dist/component/{dext-number-input-rac-C-Fifrgq.js → dext-number-input-rac-BBouksMP.js} +1 -1
- package/dist/component/{dext-phone-rac-BzsS4xZk.js → dext-phone-rac-DZASm4Ft.js} +1 -1
- package/dist/component/{dext-radio-group-rac-pDzG3eaw.js → dext-radio-group-rac-DqAZs7cq.js} +2 -2
- package/dist/component/{dext-rating-input-rac-1GpuV7f3.js → dext-rating-input-rac-BUB6w2g3.js} +1 -1
- package/dist/component/{dext-tags-rac-CIZe5dpF.js → dext-tags-rac-BH6azQiT.js} +2 -2
- package/dist/component/{dext-text-area-rac-V79GaZes.js → dext-text-area-rac-Bm1Oi7pi.js} +1 -1
- package/dist/component/{dext-text-input-rac-CtCszeOf.js → dext-text-input-rac-DBSxcYp8.js} +1 -1
- package/dist/component/{dext-url-input-rac-CKNF2NyL.js → dext-url-input-rac-gJ_-qrzY.js} +1 -1
- package/dist/component/{dismiss-icon-CADB0BrL.js → dismiss-icon-sdQDwRev.js} +1 -1
- package/dist/component/{donation-rac-CjYUGBuv.js → donation-rac-CJHcIOnk.js} +5 -5
- package/dist/component/{dropdown-field-rac-DPrKYVoM.js → dropdown-field-rac-D94vF6Um.js} +3 -3
- package/dist/component/{dropdown-rac-6tUtJGWL.js → dropdown-rac-EN7KMhtd.js} +1 -1
- package/dist/component/{ecom-address-rac-B5aSPKU9.js → ecom-address-rac-CYk1wXq3.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DD57dpQB.js → ecom-subscription-checkbox-rac--cLVBIUD.js} +2 -2
- package/dist/component/{email-input-field-rac-CYMgaeCk.js → email-input-field-rac-DWTQUl88.js} +3 -3
- package/dist/component/{events-repeater-rac-GG2dDNYv.js → events-repeater-rac-B-CAZJsO.js} +4 -4
- package/dist/component/{events-rsvp-rac-CbBMnSjD.js → events-rsvp-rac-CkLzjZe0.js} +3 -3
- package/dist/component/{field-error-headless-XwawW2mu.js → field-error-headless-Hpn7Cjyz.js} +1 -1
- package/dist/component/{field-label-headless-BmbcSnBj.js → field-label-headless-CZaQ-q22.js} +1 -1
- package/dist/component/{file-upload-rac-DcUpw9aC.js → file-upload-rac-DelhbRzX.js} +153 -150
- package/dist/component/{fixed-payment-rac-Diows5VQ.js → fixed-payment-rac-CGee8oWb.js} +3 -3
- package/dist/component/{form-Bv6Lr3i-.js → form-CKPfFL3D.js} +3203 -3192
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CSW_OWV2.js → header-field-rac-B6vzJnaW.js} +2 -2
- package/dist/component/{header-rac-DB_vcxpc.js → header-rac-Bc4WxzR1.js} +1 -1
- package/dist/component/hidden-part-label-Dc5eP4S0.js +18 -0
- package/dist/component/{image-choice-rac-BiAx1CZ1.js → image-choice-rac-BuArZj5n.js} +4 -4
- package/dist/component/{index-CC34Osx4.js → index-CmopQE1P.js} +2 -2
- package/dist/component/{index-BoEoX89O.js → index-yqi4FTyq.js} +4 -4
- package/dist/component/{isObjectLike-C77DZseS.js → isObjectLike-DO4jXs__.js} +1 -1
- package/dist/component/{multiline-address-field-rac-DNU9MavI.js → multiline-address-field-rac-CijPzBxU.js} +8 -8
- package/dist/component/{multiline-address-rac-Cji-_rN9.js → multiline-address-rac-CchEjTwl.js} +1 -1
- package/dist/component/{number-input-field-rac-JmzPosJF.js → number-input-field-rac-CdJstTE-.js} +4 -4
- package/dist/component/{number-input-rac-Bx08gVaU.js → number-input-rac-B0V7Xy0I.js} +1 -1
- package/dist/component/{password-rac-DKihWJ6e.js → password-rac-BipcyWPk.js} +4 -4
- package/dist/component/{payment-input-rac-0j0iDq-Y.js → payment-input-rac-ClhUNxdL.js} +4 -4
- package/dist/component/{phone-input-field-rac-BaTShdqB.js → phone-input-field-rac-CPNMdr70.js} +7 -7
- package/dist/component/{phone-rac-C3OH5Qma.js → phone-rac-DL5pW-cK.js} +1 -1
- package/dist/component/{product-list-rac-BDfNoNGx.js → product-list-rac-Ii0qlyiq.js} +4 -4
- package/dist/component/{quiz-radio-group-rac-DmhWBeCf.js → quiz-radio-group-rac-DtO0om99.js} +1 -1
- package/dist/component/radio-button-module-classes-CY-zH0im.js +152 -0
- package/dist/component/{radio-group-field-rac-C3ue9nHf.js → radio-group-field-rac-ViY8g4gL.js} +4 -4
- package/dist/component/{radio-group-rac-DO1neSVS.js → radio-group-rac-CjCoPD-w.js} +1 -1
- package/dist/component/rating-input-field-rac-BMFXLqfg.js +145 -0
- package/dist/component/{rating-input-rac-CD5dyy82.js → rating-input-rac-CWGGV3Fx.js} +1 -1
- package/dist/component/{rich-content-rac.module-CGyIf3s3.js → rich-content-rac.module-CTlkS2_O.js} +1 -1
- package/dist/component/{rich-text-field-rac-BXUXBkD2.js → rich-text-field-rac-2SQn_URM.js} +2 -2
- package/dist/component/{rich-text-rac-DQUHNdrW.js → rich-text-rac-L3m09cVp.js} +1 -1
- package/dist/component/{service-dropdown-rac-B9YDYCyv.js → service-dropdown-rac-uKz9PkBj.js} +4 -4
- package/dist/component/{services-multi-choice-rac-Con9gWLU.js → services-multi-choice-rac-sOJlp6_l.js} +5 -5
- package/dist/component/{signature-rac-DUWJh1fn.js → signature-rac-B1O7Ivtg.js} +4 -4
- package/dist/component/{submit-button-rac-B1OeMvNT.js → submit-button-rac-iYdJFSXy.js} +60 -60
- package/dist/component/{tags-field-rac-M7Y4SJAZ.js → tags-field-rac-CFSrsxw9.js} +5 -5
- package/dist/component/{tags-rac-CfbRTtMS.js → tags-rac-KW_c8m3p.js} +1 -1
- package/dist/component/{text-area-field-rac-DZojMD97.js → text-area-field-rac-BJEAvqCy.js} +4 -4
- package/dist/component/{text-area-rac-DaCKWCFc.js → text-area-rac-Bk9j2e4k.js} +1 -1
- package/dist/component/{text-input-field-rac-Hrb_iU01.js → text-input-field-rac-KlrY_3qp.js} +3 -3
- package/dist/component/{text-input-headless-CFidU1Rp.js → text-input-headless-B6gzsedE.js} +3 -3
- package/dist/component/{text-input-rac-Clx6h1XE.js → text-input-rac-CSO1g0rD.js} +1 -1
- package/dist/component/{time-input-rac-qE8sAHDN.js → time-input-rac-jaYI3_XV.js} +6 -6
- package/dist/component/{url-input-field-rac-DGDgJibI.js → url-input-field-rac-1t5d4VjM.js} +4 -4
- package/dist/component/{url-input-rac-Bdk3jG3N.js → url-input-rac-BTQOpun9.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-DwTLeZHg.js → use-dropdown-option-class-name-DEBN31l5.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-CXQiwe-i.js → use-dropdown-trigger-class-name-BpcEWMWj.js} +7 -7
- package/dist/component/{use-element-state-class-name-B5U4x2KM.js → use-element-state-class-name-B0muHOx4.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-CYpdsBId.js → use-hoverable-input-class-name-CL0sOlNu.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-Fjv2ky_D.js → use-is-forced-open-dropdown-BhQKJWNc.js} +1 -1
- package/dist/component/{use-native-mobile-input-4gSEXRvo.js → use-native-mobile-input-W9CS9U3u.js} +1 -1
- package/dist/component/{use-service-options-base-BGDvgdNm.js → use-service-options-base-DUgTjbHR.js} +1 -1
- package/dist/component/use-text-input-class-name-Mm_0ULVk.js +6 -0
- package/dist/form.d.ts +87 -6
- package/package.json +21 -21
- package/dist/component/date-input-field-rac-B2Q96FD-.js +0 -365
- package/dist/component/date-time-input-field-rac-BjhDUL-b.js +0 -507
- package/dist/component/helpers-HmkkXrh2.js +0 -12
- package/dist/component/radio-button-module-classes-ByFvbIqt.js +0 -137
- package/dist/component/rating-input-field-rac-D3t6G9Jk.js +0 -139
- package/dist/component/use-text-input-class-name-CA77201r.js +0 -6
package/dist/component/form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import m from "classnames";
|
|
2
2
|
import e from "react";
|
|
3
|
-
import { bN as u, bo as i, bn as C, bq as R, aY as T, aG as d } from "./form-
|
|
4
|
-
import { u as g, R as p, s as S, T as h } from "./rich-content-rac.module-
|
|
3
|
+
import { bN as u, bo as i, bn as C, bq as R, aY as T, aG as d } from "./form-CKPfFL3D.js";
|
|
4
|
+
import { u as g, R as p, s as S, T as h } from "./rich-content-rac.module-CTlkS2_O.js";
|
|
5
5
|
const f = ({ truncate: t = !0 } = {}) => {
|
|
6
6
|
const { content: a, maxShownParagraphs: s } = u(), n = e.useMemo(() => ({
|
|
7
7
|
colorPalette: R(),
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import a from "react";
|
|
2
|
+
function m(t) {
|
|
3
|
+
const e = new Intl.DateTimeFormat(t, {
|
|
4
|
+
month: "long"
|
|
5
|
+
});
|
|
6
|
+
return Array.from(Array(12).keys()).map(n);
|
|
7
|
+
function n(r) {
|
|
8
|
+
return e.format(new Date(2023, r));
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
const i = ({ id: t, children: e }) => /* @__PURE__ */ a.createElement("span", {
|
|
12
|
+
id: t,
|
|
13
|
+
hidden: !0
|
|
14
|
+
}, e);
|
|
15
|
+
export {
|
|
16
|
+
i as H,
|
|
17
|
+
m as g
|
|
18
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import e, { useRef as S, useMemo as G, useCallback as P } from "react";
|
|
2
2
|
import { RicosViewer as k } from "@wix/ricos/viewer";
|
|
3
3
|
import I from "classnames";
|
|
4
|
-
import { bN as b, bK as x, bW as j, bP as B, bG as q, X as U, am as V, T as K, V as w, M as z, I as Q, U as W, f } from "./form-
|
|
4
|
+
import { bN as b, bK as x, bW as j, bP as B, bG as q, X as U, am as V, T as K, V as w, M as z, I as Q, U as W, f } from "./form-CKPfFL3D.js";
|
|
5
5
|
import { CheckboxGroup as X, CheckboxField as Y, CheckboxButton as $ } from "react-aria-components";
|
|
6
6
|
import { f as m, a as F } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { L as J, g as Z } from "./field-label-headless-
|
|
8
|
-
import { D as ee, E as te } from "./field-error-headless-
|
|
7
|
+
import { L as J, g as Z } from "./field-label-headless-CZaQ-q22.js";
|
|
8
|
+
import { D as ee, E as te } from "./field-error-headless-Hpn7Cjyz.js";
|
|
9
9
|
import { F as oe } from "./fieldset-headless-CD3fds9J.js";
|
|
10
10
|
import { E as ae } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s as O } from "./field-rac.module-D0QzJXUv.js";
|
|
12
|
-
import { u as ne } from "./use-element-state-class-name-
|
|
12
|
+
import { u as ne } from "./use-element-state-class-name-B0muHOx4.js";
|
|
13
13
|
const o = ({ children: t, className: n }) => {
|
|
14
14
|
const { id: s, value: a, onChange: i, disabled: l, readOnly: r, required: c, onBlur: d, onFocus: p, hasError: C, FieldLayout: L } = b(), { inputId: g, labelId: _, ariaDescribedBy: A } = x(), R = S(null);
|
|
15
15
|
j(R);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { bv as n } from "./form-
|
|
2
|
-
import { A as S, a as g, C as p, aZ as N, bf as q, bg as D, bx as L } from "./form-
|
|
1
|
+
import { bv as n } from "./form-CKPfFL3D.js";
|
|
2
|
+
import { A as S, a as g, C as p, aZ as N, bf as q, bg as D, bx as L } from "./form-CKPfFL3D.js";
|
|
3
3
|
const l = (e = !1) => ({
|
|
4
4
|
country: {
|
|
5
5
|
required: e
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { e as R, b5 as _, bk as pe, b6 as O, aM as qe, B as He, a_ as je, aT as Xe, aS as I, b0 as Te, b9 as ne, b3 as Le, c as B, aU as M, bw as he, aW as ke, aV as Re, aX as q } from "./form-
|
|
2
|
-
import { br as $n } from "./form-
|
|
1
|
+
import { e as R, b5 as _, bk as pe, b6 as O, aM as qe, B as He, a_ as je, aT as Xe, aS as I, b0 as Te, b9 as ne, b3 as Le, c as B, aU as M, bw as he, aW as ke, aV as Re, aX as q } from "./form-CKPfFL3D.js";
|
|
2
|
+
import { br as $n } from "./form-CKPfFL3D.js";
|
|
3
3
|
import We from "ajv";
|
|
4
4
|
import Ke from "ajv-errors";
|
|
5
5
|
import ze from "ajv-formats";
|
|
6
6
|
import Ve from "fast-deep-equal";
|
|
7
7
|
import { parsePhoneNumber as Ze, parsePhoneNumberWithError as Je, ParseError as Qe } from "libphonenumber-js/max";
|
|
8
8
|
import et from "libphonenumber-js/metadata.max.json";
|
|
9
|
-
import { p as tt, i as rt } from "./date-availability-
|
|
10
|
-
import { a as wn } from "./date-availability-
|
|
9
|
+
import { p as tt, i as rt } from "./date-availability-BrxRBFHK.js";
|
|
10
|
+
import { a as wn } from "./date-availability-BrxRBFHK.js";
|
|
11
11
|
import { C as nt } from "./calling-country-codes-PyWuOTmF.js";
|
|
12
12
|
function J(e) {
|
|
13
13
|
const [t, r = "0"] = String(Math.abs(e)).split("e"), [n, s = ""] = t.split(".");
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { RicosViewer as ee } from "@wix/ricos/viewer";
|
|
2
2
|
import L from "classnames";
|
|
3
3
|
import n, { useMemo as x, createContext as je, useContext as ye, useState as fe, useRef as B, useCallback as A, useEffect as we } from "react";
|
|
4
|
-
import { bI as Je, d as Xe, bD as Wt, bF as gt, bf as Yt, bg as Ht, b8 as jt, be as X, F as z, bY as Me, bv as Et, bN as _, bK as P, bP as G, bW as Ce, bJ as Dt, bk as Jt, C as Se, bt as Xt, bx as Qt, bU as zt, bO as Gt, bT as Zt, bB as en, bA as tn, bp as nn, bz as rn, bQ as on, aP as sn, Y as an, _ as te, am as ne, $ as Oe, M as re, I as oe, Z as bt, a0 as ln, a1 as cn } from "./form-
|
|
4
|
+
import { bI as Je, d as Xe, bD as Wt, bF as gt, bf as Yt, bg as Ht, b8 as jt, be as X, F as z, bY as Me, bv as Et, bN as _, bK as P, bP as G, bW as Ce, bJ as Dt, bk as Jt, C as Se, bt as Xt, bx as Qt, bU as zt, bO as Gt, bT as Zt, bB as en, bA as tn, bp as nn, bz as rn, bQ as on, aP as sn, Y as an, _ as te, am as ne, $ as Oe, M as re, I as oe, Z as bt, a0 as ln, a1 as cn } from "./form-CKPfFL3D.js";
|
|
5
5
|
import { mergeProps as ht, UNSAFE_PortalProvider as dn } from "react-aria";
|
|
6
6
|
import { f as b, a as h } from "./find-child-C60k4CxG.js";
|
|
7
7
|
import { F as un, V as mn } from "./headless-styles-CmcyA_pi.js";
|
|
8
|
-
import { c as pn } from "./use-is-forced-open-dropdown-
|
|
8
|
+
import { c as pn } from "./use-is-forced-open-dropdown-BhQKJWNc.js";
|
|
9
9
|
import { TextField as Ie, Input as de, ComboBoxStateContext as Be, ComboBox as he, Popover as Fe, ListBox as qe, ListBoxItem as Ae, Group as Ft, Button as At } from "react-aria-components";
|
|
10
|
-
import { D as ue, E as me } from "./field-error-headless-
|
|
11
|
-
import { L as pe } from "./field-label-headless-
|
|
12
|
-
import { e as En, c as bn, a as fn, r as _t } from "./isObjectLike-
|
|
13
|
-
import { u as Rt, N as Pt } from "./use-native-mobile-input-
|
|
10
|
+
import { D as ue, E as me } from "./field-error-headless-Hpn7Cjyz.js";
|
|
11
|
+
import { L as pe } from "./field-label-headless-CZaQ-q22.js";
|
|
12
|
+
import { e as En, c as bn, a as fn, r as _t } from "./isObjectLike-DO4jXs__.js";
|
|
13
|
+
import { u as Rt, N as Pt } from "./use-native-mobile-input-W9CS9U3u.js";
|
|
14
14
|
import { N as Tt } from "./native-select-BbxBpe3S.js";
|
|
15
15
|
import { u as wt } from "./use-native-state-class-name-B0m2ghbS.js";
|
|
16
|
-
import { V as yn, a as Cn } from "./use-dropdown-option-class-name-
|
|
16
|
+
import { V as yn, a as Cn } from "./use-dropdown-option-class-name-DEBN31l5.js";
|
|
17
17
|
import { u as In } from "./use-invoke-callback-UH73A_J3.js";
|
|
18
18
|
import { C as Pe } from "./chevron-down-icon-CcpVm6B-.js";
|
|
19
19
|
import { E as se } from "./error-icon-hZxQ6DEy.js";
|
|
20
20
|
import { H as xe } from "./custom-focus-class-_483Pkwp.js";
|
|
21
21
|
import { s as I } from "./field-rac.module-D0QzJXUv.js";
|
|
22
|
-
import { u as ke } from "./use-hoverable-input-class-name-
|
|
22
|
+
import { u as ke } from "./use-hoverable-input-class-name-CL0sOlNu.js";
|
|
23
23
|
const Nn = (e, t, r) => {
|
|
24
24
|
var s, a, i, l;
|
|
25
25
|
const o = (s = e.steps) == null ? void 0 : s.map((u) => {
|
package/dist/component/{number-input-field-rac-JmzPosJF.js → number-input-field-rac-CdJstTE-.js}
RENAMED
|
@@ -2,15 +2,15 @@ import { RicosViewer as U } from "@wix/ricos/viewer";
|
|
|
2
2
|
import d from "classnames";
|
|
3
3
|
import t, { useState as W, useCallback as X, useEffect as Y, useRef as $ } from "react";
|
|
4
4
|
import { NumberField as j, Input as v } from "react-aria-components";
|
|
5
|
-
import { bN as _, bK as S, bY as z, bP as G, bW as H, X as J, am as Z, M as w, I as ee } from "./form-
|
|
5
|
+
import { bN as _, bK as S, bY as z, bP as G, bW as H, X as J, am as Z, M as w, I as ee } from "./form-CKPfFL3D.js";
|
|
6
6
|
import { c as y, g as x } from "./numeric-input-utils-CuBMi4-a.js";
|
|
7
7
|
import { f as p } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { D as re, E as te } from "./field-error-headless-
|
|
9
|
-
import { L as ne } from "./field-label-headless-
|
|
8
|
+
import { D as re, E as te } from "./field-error-headless-Hpn7Cjyz.js";
|
|
9
|
+
import { L as ne } from "./field-label-headless-CZaQ-q22.js";
|
|
10
10
|
import { u as se } from "./use-invoke-callback-UH73A_J3.js";
|
|
11
11
|
import { E as ae } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { s as b } from "./field-rac.module-D0QzJXUv.js";
|
|
13
|
-
import { u as me } from "./use-text-input-class-name-
|
|
13
|
+
import { u as me } from "./use-text-input-class-name-Mm_0ULVk.js";
|
|
14
14
|
const le = (r, { validation: s }) => {
|
|
15
15
|
const a = y(r.value.trim());
|
|
16
16
|
if (a === void 0)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import e, { useState as S, useRef as x } from "react";
|
|
2
2
|
import { RicosViewer as O } from "@wix/ricos/viewer";
|
|
3
3
|
import d from "classnames";
|
|
4
|
-
import { bN as E, bK as I, bP as A, bW as B, bY as P, X as V, am as v, M, I as k } from "./form-
|
|
4
|
+
import { bN as E, bK as I, bP as A, bW as B, bY as P, X as V, am as v, M, I as k } from "./form-CKPfFL3D.js";
|
|
5
5
|
import { TextField as q, Group as U, Input as W, Button as j } from "react-aria-components";
|
|
6
6
|
import { f as u, a as b } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as H, E as K } from "./field-error-headless-
|
|
8
|
-
import { L as Z } from "./field-label-headless-
|
|
7
|
+
import { D as H, E as K } from "./field-error-headless-Hpn7Cjyz.js";
|
|
8
|
+
import { L as Z } from "./field-label-headless-CZaQ-q22.js";
|
|
9
9
|
import { E as G } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { H as Q } from "./custom-focus-class-_483Pkwp.js";
|
|
11
11
|
import { s as p } from "./field-rac.module-D0QzJXUv.js";
|
|
12
|
-
import { u as X } from "./use-text-input-class-name-
|
|
12
|
+
import { u as X } from "./use-text-input-class-name-Mm_0ULVk.js";
|
|
13
13
|
const t = ({ children: o, className: r }) => {
|
|
14
14
|
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, autoComplete: y, FieldLayout: _ } = E(), { labelId: R } = I(), [D, F] = S(!1), L = u(o, t.Label), T = u(o, t.Control), h = u(o, t.Description), w = u(o, t.Error);
|
|
15
15
|
return /* @__PURE__ */ e.createElement(_, {
|
|
@@ -2,16 +2,16 @@ import r, { useCallback as V, useRef as Q } from "react";
|
|
|
2
2
|
import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
3
3
|
import p from "classnames";
|
|
4
4
|
import { TextField as Y, Group as j, Input as w } from "react-aria-components";
|
|
5
|
-
import { bN as R, bK as D, bF as M, bY as z, bP as J, X as W, am as Z, M as ee, I as re } from "./form-
|
|
5
|
+
import { bN as R, bK as D, bF as M, bY as z, bP as J, X as W, am as Z, M as ee, I as re } from "./form-CKPfFL3D.js";
|
|
6
6
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as te, E as ne } from "./field-error-headless-
|
|
8
|
-
import { L as ae } from "./field-label-headless-
|
|
7
|
+
import { D as te, E as ne } from "./field-error-headless-Hpn7Cjyz.js";
|
|
8
|
+
import { L as ae } from "./field-label-headless-CZaQ-q22.js";
|
|
9
9
|
import { f as L, g as se } from "./payment-field-utils-DobiK5Xh.js";
|
|
10
10
|
import { u as oe } from "./use-synced-display-value-DcAxdn3M.js";
|
|
11
11
|
import { E as le } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { H as ce } from "./custom-focus-class-_483Pkwp.js";
|
|
13
13
|
import { s as d } from "./field-rac.module-D0QzJXUv.js";
|
|
14
|
-
import { u as ie } from "./use-text-input-class-name-
|
|
14
|
+
import { u as ie } from "./use-text-input-class-name-Mm_0ULVk.js";
|
|
15
15
|
function ue(e, t) {
|
|
16
16
|
return {
|
|
17
17
|
productId: e.id,
|
package/dist/component/{phone-input-field-rac-BaTShdqB.js → phone-input-field-rac-CPNMdr70.js}
RENAMED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { RicosViewer as ge } from "@wix/ricos/viewer";
|
|
2
2
|
import g from "classnames";
|
|
3
3
|
import n, { useMemo as M, useState as w, useRef as S, useEffect as k, useCallback as U, createContext as ae, useContext as j, useId as se } from "react";
|
|
4
|
-
import { bv as be, bY as L, bF as ce, bX as Ne, bN as F, bK as Q, bP as Oe, bW as _e, X as ve, am as Se, a3 as ne, M as Le, I as Ie, a5 as Pe, a4 as Fe, a2 as De } from "./form-
|
|
4
|
+
import { bv as be, bY as L, bF as ce, bX as Ne, bN as F, bK as Q, bP as Oe, bW as _e, X as ve, am as Se, a3 as ne, M as Le, I as Ie, a5 as Pe, a4 as Fe, a2 as De } from "./form-CKPfFL3D.js";
|
|
5
5
|
import { UNSAFE_PortalProvider as Be } from "react-aria";
|
|
6
6
|
import { VisuallyHidden as le, Dialog as ue, OverlayTriggerStateContext as Re, ModalOverlay as xe, Modal as Me, SearchField as we, Group as H, ListBoxItem as Te, DialogTrigger as $e, Select as Ae, Input as ie, Autocomplete as Ve } from "react-aria-components";
|
|
7
7
|
import de, { AsYouType as ke, isValidPhoneNumber as He, isSupportedCountry as qe } from "libphonenumber-js";
|
|
8
8
|
import "libphonenumber-js/metadata.min.json";
|
|
9
9
|
import { f as E, a as P } from "./find-child-C60k4CxG.js";
|
|
10
|
-
import { D as Ue, E as Ke } from "./field-error-headless-
|
|
11
|
-
import { L as Ye } from "./field-label-headless-
|
|
12
|
-
import { N as Ge, u as ze } from "./use-native-mobile-input-
|
|
10
|
+
import { D as Ue, E as Ke } from "./field-error-headless-Hpn7Cjyz.js";
|
|
11
|
+
import { L as Ye } from "./field-label-headless-CZaQ-q22.js";
|
|
12
|
+
import { N as Ge, u as ze } from "./use-native-mobile-input-W9CS9U3u.js";
|
|
13
13
|
import { N as We } from "./native-select-BbxBpe3S.js";
|
|
14
14
|
import { N as Xe, S as Ze } from "./non-modal-popover-D-u13tmp.js";
|
|
15
15
|
import { u as je } from "./use-invoke-callback-UH73A_J3.js";
|
|
16
|
-
import { d as Qe } from "./use-is-forced-open-dropdown-
|
|
17
|
-
import { V as Je, a as et } from "./use-dropdown-option-class-name-
|
|
16
|
+
import { d as Qe } from "./use-is-forced-open-dropdown-BhQKJWNc.js";
|
|
17
|
+
import { V as Je, a as et } from "./use-dropdown-option-class-name-DEBN31l5.js";
|
|
18
18
|
import { C as oe } from "./calling-country-codes-PyWuOTmF.js";
|
|
19
19
|
import { C as tt } from "./chevron-down-icon-CcpVm6B-.js";
|
|
20
20
|
import { E as nt } from "./error-icon-hZxQ6DEy.js";
|
|
21
21
|
import { H as z } from "./custom-focus-class-_483Pkwp.js";
|
|
22
22
|
import { s as O } from "./field-rac.module-D0QzJXUv.js";
|
|
23
|
-
import { u as re } from "./use-hoverable-input-class-name-
|
|
23
|
+
import { u as re } from "./use-hoverable-input-class-name-CL0sOlNu.js";
|
|
24
24
|
function X(e) {
|
|
25
25
|
const t = e ? de(e) : void 0, r = t == null ? void 0 : t.country;
|
|
26
26
|
if (r)
|
|
@@ -2,11 +2,11 @@ import t, { useMemo as H, useCallback as v, useRef as x } from "react";
|
|
|
2
2
|
import { RicosViewer as $ } from "@wix/ricos/viewer";
|
|
3
3
|
import y from "classnames";
|
|
4
4
|
import { CheckboxField as z, CheckboxButton as X, NumberField as Y, Group as j, Button as Q, Input as J } from "react-aria-components";
|
|
5
|
-
import { bN as U, bK as W, bF as V, bY as Z, bP as ee, X as te, am as ne, a6 as ae, a7 as oe, aa as re, a9 as le, ab as se, M as ie, I as ce, a8 as ue } from "./form-
|
|
5
|
+
import { bN as U, bK as W, bF as V, bY as Z, bP as ee, X as te, am as ne, a6 as ae, a7 as oe, aa as re, a9 as le, ab as se, M as ie, I as ce, a8 as ue } from "./form-CKPfFL3D.js";
|
|
6
6
|
import { f, a as b } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { L as me, g as pe } from "./field-label-headless-
|
|
7
|
+
import { L as me, g as pe } from "./field-label-headless-CZaQ-q22.js";
|
|
8
8
|
import { f as de } from "./format-currency-BwShJ9vM.js";
|
|
9
|
-
import { D as Ee, E as _e } from "./field-error-headless-
|
|
9
|
+
import { D as Ee, E as _e } from "./field-error-headless-Hpn7Cjyz.js";
|
|
10
10
|
import { F as ye } from "./fieldset-headless-CD3fds9J.js";
|
|
11
11
|
import { g as Ie } from "./payment-field-utils-DobiK5Xh.js";
|
|
12
12
|
import { S as be } from "./selection-indicator-XQ8MYHUQ.js";
|
|
@@ -14,7 +14,7 @@ import { E as fe } from "./error-icon-hZxQ6DEy.js";
|
|
|
14
14
|
import { C as Le } from "./checkbox-indicator-module-classes-Cozvs_kk.js";
|
|
15
15
|
import { s as A } from "./field-rac.module-D0QzJXUv.js";
|
|
16
16
|
import { o as w } from "./options-rac.module-_THNq6Qq.js";
|
|
17
|
-
import { u as Oe } from "./use-element-state-class-name-
|
|
17
|
+
import { u as Oe } from "./use-element-state-class-name-B0muHOx4.js";
|
|
18
18
|
var Ce = /* @__PURE__ */ (function(e) {
|
|
19
19
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
20
20
|
})({}), k = /* @__PURE__ */ (function(e) {
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import l, { useRef as D, useEffect as V, useState as A, useCallback as H } from "react";
|
|
2
|
+
import { RadioGroup as w, RadioField as q, RadioButton as G, TextField as $, Input as x } from "react-aria-components";
|
|
3
|
+
import { bN as R, bK as K, bW as U, bY as P, bP as M } from "./form-CKPfFL3D.js";
|
|
4
|
+
import { f as d, a as L } from "./find-child-C60k4CxG.js";
|
|
5
|
+
import { D as W, E as Y } from "./field-error-headless-Hpn7Cjyz.js";
|
|
6
|
+
import { L as j } from "./field-label-headless-CZaQ-q22.js";
|
|
7
|
+
import { S as z } from "./selection-indicator-XQ8MYHUQ.js";
|
|
8
|
+
const C = "Other", J = (e, t) => e == null ? void 0 : e.find((a) => (a.value ?? a.label) === t), T = (e, t) => !!t && !J(e, t), Q = (e, t) => {
|
|
9
|
+
const r = t ? t.length + 2 : 0;
|
|
10
|
+
return e.slice(r);
|
|
11
|
+
}, c = ({ children: e, className: t }) => {
|
|
12
|
+
const { id: a, value: r, onChange: O, disabled: m, readOnly: E, required: b, onBlur: g, onFocus: f, hasError: s, FieldLayout: u, options: o } = R(), { inputId: h, labelId: v, ariaDescribedBy: _ } = K(), n = D(null);
|
|
13
|
+
U(n);
|
|
14
|
+
const i = d(e, c.Label), I = d(e, c.Options), y = d(e, c.Description), k = d(e, c.Error), B = T(o, r) ? C : r || null;
|
|
15
|
+
return /* @__PURE__ */ l.createElement(u, {
|
|
16
|
+
fieldId: a,
|
|
17
|
+
renderLabel: () => L(i, {
|
|
18
|
+
as: "div"
|
|
19
|
+
}),
|
|
20
|
+
renderInput: () => /* @__PURE__ */ l.createElement(w, {
|
|
21
|
+
ref: n,
|
|
22
|
+
id: h,
|
|
23
|
+
className: t,
|
|
24
|
+
"aria-labelledby": v,
|
|
25
|
+
"aria-describedby": _,
|
|
26
|
+
value: B,
|
|
27
|
+
onChange: O,
|
|
28
|
+
isDisabled: m,
|
|
29
|
+
isReadOnly: E,
|
|
30
|
+
isRequired: b,
|
|
31
|
+
isInvalid: s,
|
|
32
|
+
onBlur: g,
|
|
33
|
+
onFocus: f
|
|
34
|
+
}, I),
|
|
35
|
+
renderDescription: () => /* @__PURE__ */ l.createElement(l.Fragment, null, k, y)
|
|
36
|
+
});
|
|
37
|
+
}, X = ({ children: e, className: t }) => {
|
|
38
|
+
const { options: a, addOther: r, addOtherLabel: O, id: m, numberOfColumns: E, hasError: b } = R(), { t: g } = P(), f = d(e, c.Option), s = D(null);
|
|
39
|
+
te();
|
|
40
|
+
const u = O || g("add-other.default-other-option-label") || C;
|
|
41
|
+
return M(() => {
|
|
42
|
+
var o;
|
|
43
|
+
(o = s.current) == null || o.focus({
|
|
44
|
+
preventScroll: !0
|
|
45
|
+
});
|
|
46
|
+
}, m), /* @__PURE__ */ l.createElement("div", {
|
|
47
|
+
className: t,
|
|
48
|
+
"data-columns": E,
|
|
49
|
+
"data-invalid": b
|
|
50
|
+
}, a.map((o, h) => L(f, {
|
|
51
|
+
key: o.value ?? o.label,
|
|
52
|
+
value: o.value ?? o.label,
|
|
53
|
+
label: o.label,
|
|
54
|
+
index: h,
|
|
55
|
+
radioRef: h === 0 ? s : void 0
|
|
56
|
+
})), r && L(f, {
|
|
57
|
+
key: C,
|
|
58
|
+
value: C,
|
|
59
|
+
label: u,
|
|
60
|
+
isOther: !0
|
|
61
|
+
}));
|
|
62
|
+
}, p = ({ children: e, className: t, ...a }) => {
|
|
63
|
+
var _;
|
|
64
|
+
const { value: r, label: O, isOther: m = !1, radioRef: E } = a, { value: b, options: g } = R(), f = d(e, p.Label), s = d(e, p.Input), u = d(e, p.Control), o = d(e, p.OtherInput), h = m ? T(g, b) : b === r, v = (_ = s == null ? void 0 : s.props) == null ? void 0 : _.className;
|
|
65
|
+
return /* @__PURE__ */ l.createElement("div", {
|
|
66
|
+
className: t
|
|
67
|
+
}, /* @__PURE__ */ l.createElement(q, {
|
|
68
|
+
value: r
|
|
69
|
+
}, /* @__PURE__ */ l.createElement(G, {
|
|
70
|
+
ref: E,
|
|
71
|
+
className: v
|
|
72
|
+
}, ({ isSelected: n, isHovered: i, isFocused: I }) => /* @__PURE__ */ l.createElement(l.Fragment, null, L(u, {
|
|
73
|
+
isSelected: n,
|
|
74
|
+
isHovered: i,
|
|
75
|
+
isFocused: I
|
|
76
|
+
}), L(f, {
|
|
77
|
+
label: O
|
|
78
|
+
})))), m && h && o);
|
|
79
|
+
}, Z = ({ className: e, ...t }) => {
|
|
80
|
+
const { label: a } = t;
|
|
81
|
+
return /* @__PURE__ */ l.createElement("span", {
|
|
82
|
+
className: e
|
|
83
|
+
}, a);
|
|
84
|
+
}, ee = (e) => null;
|
|
85
|
+
let F = null, N = !1;
|
|
86
|
+
const te = () => {
|
|
87
|
+
V(() => {
|
|
88
|
+
N || (N = !0, document.addEventListener("pointerdown", (e) => {
|
|
89
|
+
F = e.target;
|
|
90
|
+
}, !0), document.addEventListener("keydown", () => {
|
|
91
|
+
F = null;
|
|
92
|
+
}, !0));
|
|
93
|
+
}, []);
|
|
94
|
+
}, oe = ({ className: e }) => {
|
|
95
|
+
const { value: t, onChange: a, addOtherLabel: r, addOtherPlaceholder: O, otherInputCharacterLimit: m, disabled: E, readOnly: b, options: g } = R(), { t: f } = P(), s = D(null), u = T(g, t), o = r || f("add-other.default-other-option-label") || C, [h, v] = A(u && t ? Q(t, r) : "");
|
|
96
|
+
V(() => {
|
|
97
|
+
const n = s.current, i = n == null ? void 0 : n.closest('[role="radiogroup"]'), I = F;
|
|
98
|
+
if (!u || !n || !i || !I || !i.contains(I) || n.contains(I))
|
|
99
|
+
return;
|
|
100
|
+
const y = requestAnimationFrame(() => n.focus());
|
|
101
|
+
return () => cancelAnimationFrame(y);
|
|
102
|
+
}, [
|
|
103
|
+
u
|
|
104
|
+
]);
|
|
105
|
+
const _ = H((n) => {
|
|
106
|
+
let i;
|
|
107
|
+
n ? i = `${r}: ${n}` : i = o, a(i), v(n);
|
|
108
|
+
}, [
|
|
109
|
+
a,
|
|
110
|
+
r,
|
|
111
|
+
o
|
|
112
|
+
]);
|
|
113
|
+
return /* @__PURE__ */ l.createElement($, {
|
|
114
|
+
"aria-label": o,
|
|
115
|
+
value: h,
|
|
116
|
+
onChange: _,
|
|
117
|
+
isDisabled: E,
|
|
118
|
+
isReadOnly: b
|
|
119
|
+
}, /* @__PURE__ */ l.createElement(x, {
|
|
120
|
+
ref: s,
|
|
121
|
+
className: e,
|
|
122
|
+
placeholder: O,
|
|
123
|
+
maxLength: m
|
|
124
|
+
}));
|
|
125
|
+
};
|
|
126
|
+
p.Label = Z;
|
|
127
|
+
p.Input = ee;
|
|
128
|
+
p.Control = z;
|
|
129
|
+
p.OtherInput = oe;
|
|
130
|
+
c.Label = j;
|
|
131
|
+
c.Options = X;
|
|
132
|
+
c.Option = p;
|
|
133
|
+
c.Description = W;
|
|
134
|
+
c.Error = Y;
|
|
135
|
+
const ne = "_labelImage_1u9f2_1", ae = "_option_1u9f2_26", re = "_optionInput_1u9f2_32", le = "_optionControl_1u9f2_50", se = "_optionControlHover_1u9f2_72", ie = "_optionControlSelected_1u9f2_90", ce = "_optionLabel_1u9f2_137", S = {
|
|
136
|
+
labelImage: ne,
|
|
137
|
+
option: ae,
|
|
138
|
+
optionInput: re,
|
|
139
|
+
optionControl: le,
|
|
140
|
+
optionControlHover: se,
|
|
141
|
+
optionControlSelected: ie,
|
|
142
|
+
optionLabel: ce
|
|
143
|
+
}, Oe = {
|
|
144
|
+
base: S.optionControl,
|
|
145
|
+
selected: S.optionControlSelected,
|
|
146
|
+
hover: S.optionControlHover
|
|
147
|
+
};
|
|
148
|
+
export {
|
|
149
|
+
Oe as R,
|
|
150
|
+
c as a,
|
|
151
|
+
S as s
|
|
152
|
+
};
|
package/dist/component/{radio-group-field-rac-C3ue9nHf.js → radio-group-field-rac-ViY8g4gL.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
2
|
import t from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { a, s, R as n } from "./radio-button-module-classes-
|
|
4
|
+
import { a, s, R as n } from "./radio-button-module-classes-CY-zH0im.js";
|
|
5
5
|
import { E as c } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as r } from "./field-rac.module-D0QzJXUv.js";
|
|
7
|
-
import { X as i, am as E, ac as p, ad as O, M as R, I as _, ae as I } from "./form-
|
|
7
|
+
import { X as i, am as E, ac as p, ad as O, M as R, I as _, ae as I } from "./form-CKPfFL3D.js";
|
|
8
8
|
import { o as L } from "./options-rac.module-_THNq6Qq.js";
|
|
9
|
-
import { u as N } from "./use-element-state-class-name-
|
|
10
|
-
import { u } from "./use-text-input-class-name-
|
|
9
|
+
import { u as N } from "./use-element-state-class-name-B0muHOx4.js";
|
|
10
|
+
import { u } from "./use-text-input-class-name-Mm_0ULVk.js";
|
|
11
11
|
const D = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
12
12
|
content: o,
|
|
13
13
|
locale: l
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
2
|
+
import p from "classnames";
|
|
3
|
+
import e, { useCallback as O, useState as A, useRef as M } from "react";
|
|
4
|
+
import { bN as F, bK as y, bW as T, bP as H, bY as P, X as w, am as B, af as q, M as k, I as G, ag as x } from "./form-CKPfFL3D.js";
|
|
5
|
+
import { RadioGroup as K, RadioField as U, RadioButton as z } from "react-aria-components";
|
|
6
|
+
import { f as g, a as Q } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { D as W, E as X } from "./field-error-headless-Hpn7Cjyz.js";
|
|
8
|
+
import { L as Y } from "./field-label-headless-CZaQ-q22.js";
|
|
9
|
+
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
+
import { s as R } from "./field-rac.module-D0QzJXUv.js";
|
|
11
|
+
import { u as j } from "./use-element-state-class-name-B0muHOx4.js";
|
|
12
|
+
const t = ({ children: a }) => {
|
|
13
|
+
const { id: n, value: s, onChange: d, disabled: l, readOnly: m, required: u, hasError: i, onBlur: o, onFocus: f, FieldLayout: E } = F(), { labelId: L, ariaDescribedBy: S } = y(), b = O((D) => d(Number(D)), [
|
|
14
|
+
d
|
|
15
|
+
]), r = g(a, t.Label), c = g(a, t.Ratings), C = g(a, t.Description), v = g(a, t.Error);
|
|
16
|
+
return /* @__PURE__ */ e.createElement(E, {
|
|
17
|
+
fieldId: n,
|
|
18
|
+
renderLabel: () => r,
|
|
19
|
+
renderInput: () => /* @__PURE__ */ e.createElement(K, {
|
|
20
|
+
"aria-labelledby": L,
|
|
21
|
+
"aria-describedby": S,
|
|
22
|
+
value: s ? String(s) : void 0,
|
|
23
|
+
onChange: b,
|
|
24
|
+
isDisabled: l,
|
|
25
|
+
isReadOnly: m,
|
|
26
|
+
isRequired: u,
|
|
27
|
+
isInvalid: i,
|
|
28
|
+
onBlur: o,
|
|
29
|
+
onFocus: f,
|
|
30
|
+
orientation: "horizontal"
|
|
31
|
+
}, c),
|
|
32
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, v, C)
|
|
33
|
+
});
|
|
34
|
+
}, I = ({ children: a, className: n, getReactionLabel: s }) => {
|
|
35
|
+
const { id: d, value: l, readOnly: m, hasError: u } = F(), { inputId: i } = y(), [o, f] = A(), E = M(null);
|
|
36
|
+
T(E), H(() => {
|
|
37
|
+
var C;
|
|
38
|
+
const r = (C = E.current) == null ? void 0 : C.querySelectorAll('input[type="radio"]'), c = Array.from(r ?? []).find((v) => v.checked) ?? (r == null ? void 0 : r[0]);
|
|
39
|
+
c == null || c.focus({
|
|
40
|
+
preventScroll: !0
|
|
41
|
+
});
|
|
42
|
+
}, d);
|
|
43
|
+
const L = g(a, I.Rating), S = [
|
|
44
|
+
"1",
|
|
45
|
+
"2",
|
|
46
|
+
"3",
|
|
47
|
+
"4",
|
|
48
|
+
"5"
|
|
49
|
+
], b = (r) => o && !m ? o >= r : !!l && l >= Number(r);
|
|
50
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
51
|
+
ref: E,
|
|
52
|
+
id: i,
|
|
53
|
+
className: n,
|
|
54
|
+
"data-invalid": u,
|
|
55
|
+
"data-readonly": m
|
|
56
|
+
}, S.map((r) => Q(L, {
|
|
57
|
+
key: r,
|
|
58
|
+
value: r,
|
|
59
|
+
isSelected: b(r),
|
|
60
|
+
onHoverChange: (c) => f(c ? r : void 0),
|
|
61
|
+
label: s == null ? void 0 : s(Number(r))
|
|
62
|
+
})));
|
|
63
|
+
}, J = {
|
|
64
|
+
border: 0,
|
|
65
|
+
clipPath: "inset(50%)",
|
|
66
|
+
height: 1,
|
|
67
|
+
margin: -1,
|
|
68
|
+
overflow: "hidden",
|
|
69
|
+
padding: 0,
|
|
70
|
+
position: "absolute",
|
|
71
|
+
width: 1,
|
|
72
|
+
whiteSpace: "nowrap"
|
|
73
|
+
}, h = ({ className: a, children: n, ...s }) => {
|
|
74
|
+
const { value: d, isSelected: l, onHoverChange: m, label: u } = s;
|
|
75
|
+
return /* @__PURE__ */ e.createElement(U, {
|
|
76
|
+
value: d
|
|
77
|
+
}, /* @__PURE__ */ e.createElement(z, {
|
|
78
|
+
className: ({ isHovered: i, isFocused: o }) => typeof a == "function" ? a({
|
|
79
|
+
isSelected: l,
|
|
80
|
+
isHovered: i,
|
|
81
|
+
isFocused: o
|
|
82
|
+
}) : a ?? "",
|
|
83
|
+
"data-active": l || void 0,
|
|
84
|
+
onHoverChange: m
|
|
85
|
+
}, ({ isHovered: i, isFocused: o }) => /* @__PURE__ */ e.createElement(e.Fragment, null, typeof n == "function" ? n({
|
|
86
|
+
isSelected: l,
|
|
87
|
+
isHovered: i,
|
|
88
|
+
isFocused: o
|
|
89
|
+
}) : n, u ? /* @__PURE__ */ e.createElement("span", {
|
|
90
|
+
style: J
|
|
91
|
+
}, u) : null)));
|
|
92
|
+
};
|
|
93
|
+
I.Rating = h;
|
|
94
|
+
t.Label = Y;
|
|
95
|
+
t.Ratings = I;
|
|
96
|
+
t.Rating = h;
|
|
97
|
+
t.Description = W;
|
|
98
|
+
t.Error = X;
|
|
99
|
+
const $ = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
100
|
+
viewBox: "0 0 32 32",
|
|
101
|
+
width: 32,
|
|
102
|
+
height: 32,
|
|
103
|
+
fill: "currentColor",
|
|
104
|
+
"aria-hidden": "true",
|
|
105
|
+
...a
|
|
106
|
+
}, /* @__PURE__ */ e.createElement("path", {
|
|
107
|
+
fillRule: "evenodd",
|
|
108
|
+
d: "M28.6265,13.6325 C28.9655,13.3015 29.0845,12.8175 28.9385,12.3665 C28.7925,11.9165 28.4105,11.5945 27.9415,11.5265 L20.5785,10.4565 C20.5015,10.4445 20.4345,10.3965 20.4005,10.3275 L17.1075,3.6545 L17.1075,3.6535 C16.8975,3.2295 16.4735,2.9655 16.0005,2.9655 L15.9995,2.9655 C15.5255,2.9655 15.1025,3.2295 14.8925,3.6545 L11.5985,10.3275 C11.5645,10.3965 11.4985,10.4445 11.4225,10.4565 L4.0575,11.5265 C3.5895,11.5945 3.2075,11.9165 3.0615,12.3665 C2.9155,12.8175 3.0345,13.3015 3.3735,13.6325 L8.7025,18.8265 C8.7575,18.8805 8.7835,18.9585 8.7705,19.0345 L7.5125,26.3695 C7.4325,26.8355 7.6205,27.2985 8.0035,27.5765 C8.2195,27.7345 8.4735,27.8145 8.7285,27.8145 C8.9245,27.8145 9.1215,27.7665 9.3045,27.6705 L15.8895,24.2085 C15.9595,24.1725 16.0415,24.1725 16.1085,24.2075 L22.6955,27.6705 C23.1155,27.8915 23.6135,27.8555 23.9965,27.5765 C24.3795,27.2985 24.5675,26.8355 24.4875,26.3695 L23.2305,19.0355 C23.2165,18.9585 23.2425,18.8805 23.2975,18.8265 L28.6265,13.6325 Z"
|
|
109
|
+
})), V = "_ratings_a5lgi_1", ee = "_rating_a5lgi_1", te = "_ratingSelected_a5lgi_37", ae = "_ratingHover_a5lgi_44", _ = {
|
|
110
|
+
ratings: V,
|
|
111
|
+
rating: ee,
|
|
112
|
+
ratingSelected: te,
|
|
113
|
+
ratingHover: ae
|
|
114
|
+
}, re = ({ content: a, locale: n }) => /* @__PURE__ */ e.createElement(N, {
|
|
115
|
+
content: a,
|
|
116
|
+
locale: n
|
|
117
|
+
}), ne = {
|
|
118
|
+
base: _.rating,
|
|
119
|
+
selected: _.ratingSelected,
|
|
120
|
+
hover: _.ratingHover
|
|
121
|
+
}, Ce = () => {
|
|
122
|
+
const { t: a } = P(), n = j({
|
|
123
|
+
globalClasses: x,
|
|
124
|
+
moduleClasses: ne
|
|
125
|
+
});
|
|
126
|
+
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
127
|
+
className: p(w, R.label)
|
|
128
|
+
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
129
|
+
className: p(B, R.requiredMark)
|
|
130
|
+
})), /* @__PURE__ */ e.createElement(t.Ratings, {
|
|
131
|
+
className: p(q, _.ratings),
|
|
132
|
+
getReactionLabel: (s) => a("rating-input.a11y.reaction-label", {
|
|
133
|
+
count: s
|
|
134
|
+
})
|
|
135
|
+
}, /* @__PURE__ */ e.createElement(t.Rating, {
|
|
136
|
+
className: n
|
|
137
|
+
}, /* @__PURE__ */ e.createElement($, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
138
|
+
className: p(k, R.error)
|
|
139
|
+
}, /* @__PURE__ */ e.createElement(Z, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
140
|
+
className: p(G, R.description)
|
|
141
|
+
}, re));
|
|
142
|
+
};
|
|
143
|
+
export {
|
|
144
|
+
Ce as R
|
|
145
|
+
};
|
package/dist/component/{rich-content-rac.module-CGyIf3s3.js → rich-content-rac.module-CTlkS2_O.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import c, { useState as u } from "react";
|
|
2
|
-
import { bN as a, bF as i, bY as T } from "./form-
|
|
2
|
+
import { bN as a, bF as i, bY as T } from "./form-CKPfFL3D.js";
|
|
3
3
|
import { Button as d } from "react-aria-components";
|
|
4
4
|
import { D as r } from "./data-hooks-Dkw1pbRj.js";
|
|
5
5
|
import { truncateRichContent as _ } from "@wix/ricos/content";
|