@wix/form-elements 1.121.0 → 1.122.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-BmwzUTfZ.js → appointment-rac-Cj90bm7v.js} +4 -4
- package/dist/component/{bookings-address-rac-CDpBaBGi.js → bookings-address-rac-ta3UnLl8.js} +1 -1
- package/dist/component/{bookings-email-rac-8AonBAEP.js → bookings-email-rac-Ch2W4ucr.js} +1 -1
- package/dist/component/{bookings-first-name-rac-BAF3OLyL.js → bookings-first-name-rac-CvBNN0qW.js} +1 -1
- package/dist/component/{bookings-header-rac-DIXxOHe1.js → bookings-header-rac-BGn5xB-k.js} +1 -1
- package/dist/component/{bookings-last-name-rac-Cm-58BWq.js → bookings-last-name-rac-Dlu0RgZ0.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DvaiFVqg.js → bookings-login-bar-rac-1htwH3kv.js} +1 -1
- package/dist/component/{bookings-phone-rac-znrjfRwm.js → bookings-phone-rac-U75qHO4B.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DFPeWcrH.js → bookings-rich-text-rac-_j66QPCk.js} +1 -1
- package/dist/component/{checkbox-field-rac-COvxqyF7.js → checkbox-field-rac-CjQeC7-Y.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-DT1HX61N.js → checkbox-group-field-headless-BLZlefmT.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-Db1w6Vzm.js → checkbox-group-field-rac-s_9nrnok.js} +4 -4
- package/dist/component/{checkbox-group-rac-BCgFQJ4P.js → checkbox-group-rac-DZgOprql.js} +1 -1
- package/dist/component/{checkbox-rac-C1dKq2AT.js → checkbox-rac-H0jZt4pG.js} +1 -1
- package/dist/component/{contacts-address-rac-BoZ2LExb.js → contacts-address-rac-QMPNicwV.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-CX-oJkwP.js → contacts-birthdate-rac-BubQqfVp.js} +1 -1
- package/dist/component/{contacts-company-rac-ByY9oaOX.js → contacts-company-rac-fVQn5dPH.js} +1 -1
- package/dist/component/{contacts-email-rac-DBnTEm82.js → contacts-email-rac-sJqycgjN.js} +1 -1
- package/dist/component/{contacts-first-name-rac-Jn-ubMoS.js → contacts-first-name-rac-DuHDHR2w.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Wea7_JU-.js → contacts-last-name-rac-DV2g2QGF.js} +1 -1
- package/dist/component/{contacts-phone-rac-POYGTwBr.js → contacts-phone-rac-e9o55Al-.js} +1 -1
- package/dist/component/{contacts-position-rac-DjDHNTfL.js → contacts-position-rac-Z6vDVuT7.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-C7vOLrLV.js → contacts-subscribe-rac-GiiBZhQ7.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-C-CVis0b.js → contacts-tax-id-rac-KFIbfE1X.js} +1 -1
- package/dist/component/{date-availability-B3unFx4z.js → date-availability-BloJXrmD.js} +1 -1
- package/dist/component/date-input-field-rac-MT_m-Z3G.js +290 -0
- package/dist/component/{date-input-rac-BW_WuabB.js → date-input-rac-C2WNFEp-.js} +1 -1
- package/dist/component/{date-picker-field-rac-DgBfvDRc.js → date-picker-field-rac-C9ewyabf.js} +117 -114
- package/dist/component/{date-picker-rac-B2v-E9tZ.js → date-picker-rac-BiDt00zO.js} +1 -1
- package/dist/component/{date-time-input-field-rac-DNxauQLv.js → date-time-input-field-rac-D1GNwPmZ.js} +111 -111
- package/dist/component/{date-time-input-rac-DZMQuMlD.js → date-time-input-rac-VMTzuAzt.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-B0u3i1v1.js → dext-checkbox-group-rac-CUG-FJj1.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BngAFLbm.js → dext-checkbox-rac-DUC-rpQy.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CyPtZQQp.js → dext-date-picker-rac-Bp1_5ZRF.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DBm_ZVMr.js → dext-date-time-input-rac-D7BBsF1U.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DBDOigJS.js → dext-dropdown-rac-GmP2v4Va.js} +1 -1
- package/dist/component/{dext-email-rac-Cj-eerfr.js → dext-email-rac-Dfu8MJjD.js} +1 -1
- package/dist/component/{dext-number-input-rac-WdUIM6bV.js → dext-number-input-rac-C8ejJdHk.js} +1 -1
- package/dist/component/{dext-phone-rac-CH-UDDKr.js → dext-phone-rac-iaVcaxNr.js} +1 -1
- package/dist/component/{dext-radio-group-rac-umexCSNY.js → dext-radio-group-rac-yOH9UuWW.js} +2 -2
- package/dist/component/{dext-rating-input-rac-ukMPDLxU.js → dext-rating-input-rac-d_PyzTCP.js} +1 -1
- package/dist/component/{dext-tags-rac-BE8aqyRm.js → dext-tags-rac-CjH32M87.js} +2 -2
- package/dist/component/{dext-text-area-rac-GtNDPetb.js → dext-text-area-rac-BLcw2KMH.js} +1 -1
- package/dist/component/{dext-text-input-rac-DQhaKaoe.js → dext-text-input-rac-2SLBKsBY.js} +1 -1
- package/dist/component/{dext-url-input-rac-DogsntOO.js → dext-url-input-rac-BIh4KJw3.js} +1 -1
- package/dist/component/{donation-rac-C1Se3wmU.js → donation-rac-D1cY7dDX.js} +5 -5
- package/dist/component/{dropdown-field-headless-5vi45azS.js → dropdown-field-headless-DgpZtlSI.js} +5 -5
- package/dist/component/{dropdown-field-rac-B0PeCuG6.js → dropdown-field-rac-CUNtROoj.js} +18 -17
- package/dist/component/{dropdown-rac--ZgcFbpH.js → dropdown-rac-BdCYUN39.js} +1 -1
- package/dist/component/{ecom-address-rac-C1p-fN1j.js → ecom-address-rac-CRcfdrJ1.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-uplYmDWZ.js → ecom-subscription-checkbox-rac-CgePHF0U.js} +2 -2
- package/dist/component/{email-input-field-rac-C6nqydVv.js → email-input-field-rac-DvWj_fAr.js} +3 -3
- package/dist/component/{events-repeater-rac-CqKFo75H.js → events-repeater-rac-Cfth4URI.js} +4 -4
- package/dist/component/{events-rsvp-rac-BBQwW-Jk.js → events-rsvp-rac-PmNHKbSw.js} +3 -3
- package/dist/component/{field-error-headless-COObBNJG.js → field-error-headless-B8MijSrk.js} +1 -1
- package/dist/component/{field-label-headless-DhXceghb.js → field-label-headless-D3FPZC-x.js} +1 -1
- package/dist/component/{file-upload-rac-B5CnpgIo.js → file-upload-rac-BNqkSQ2b.js} +4 -4
- package/dist/component/{fixed-payment-rac-B8yKRpQV.js → fixed-payment-rac-CtNOKzeC.js} +3 -3
- package/dist/component/{form-CimhBiBc.js → form-AphBF-mQ.js} +691 -671
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BHgFF-LG.js → header-field-rac-cJ2ZFy67.js} +2 -2
- package/dist/component/{header-rac-DJttTbow.js → header-rac-Dd7yRNC0.js} +1 -1
- package/dist/component/{image-choice-rac-C-qj1WBS.js → image-choice-rac-2Z_7AfHu.js} +4 -4
- package/dist/component/{index-Qe91Dgi2.js → index-A4jMKGCs.js} +2 -2
- package/dist/component/{index-9nfSsqJo.js → index-ERGpdqrG.js} +4 -4
- package/dist/component/{isObjectLike-VICRth8V.js → isObjectLike-wpJkrV5k.js} +1 -1
- package/dist/component/{multiline-address-field-rac-DMg6V-0L.js → multiline-address-field-rac-CGqF3dfq.js} +369 -369
- package/dist/component/{multiline-address-rac-DpvB5bX9.js → multiline-address-rac-Dy8_4emN.js} +1 -1
- package/dist/component/{number-input-field-rac-DQERdWaA.js → number-input-field-rac-BaTODjcx.js} +4 -4
- package/dist/component/{number-input-rac-DY9uyE-k.js → number-input-rac-CVpDhFz5.js} +1 -1
- package/dist/component/{password-rac-cSWH1LPy.js → password-rac-BNam3XdN.js} +4 -4
- package/dist/component/{payment-input-rac-BiUNnsQx.js → payment-input-rac-Czqho0fu.js} +4 -4
- package/dist/component/phone-input-field-rac-BM2SoA5b.js +507 -0
- package/dist/component/{phone-rac-CFeNcp2U.js → phone-rac-BuC_Yxb2.js} +1 -1
- package/dist/component/{product-list-rac-DzhnEmL_.js → product-list-rac-gfZUDEoh.js} +4 -4
- package/dist/component/{quiz-radio-group-rac-BpsPgebu.js → quiz-radio-group-rac-DswfVeX4.js} +1 -1
- package/dist/component/{radio-button-module-classes-NBKHsJH7.js → radio-button-module-classes-DmWrhFOe.js} +3 -3
- package/dist/component/{radio-group-field-rac-C2oTt1mT.js → radio-group-field-rac-CE67QNOZ.js} +4 -4
- package/dist/component/{radio-group-rac-oINHZ5yY.js → radio-group-rac-hMr6DTvG.js} +1 -1
- package/dist/component/{rating-input-field-rac-fnv2RdUA.js → rating-input-field-rac-bDVUjGJa.js} +4 -4
- package/dist/component/{rating-input-rac-BFofFzSX.js → rating-input-rac-ZNdJ7gjD.js} +1 -1
- package/dist/component/{rich-content-rac.module-BplXvCt6.js → rich-content-rac.module-CUYcnq1k.js} +1 -1
- package/dist/component/{rich-text-field-rac-Csi4_gCV.js → rich-text-field-rac-DjnSs-6W.js} +2 -2
- package/dist/component/{rich-text-rac-Btu1y3LR.js → rich-text-rac-BIZ9Yyb_.js} +1 -1
- package/dist/component/service-dropdown-rac-6cm9orLJ.js +146 -0
- package/dist/component/{services-multi-choice-rac-B2rAg7VN.js → services-multi-choice-rac-DkojlNhZ.js} +5 -5
- package/dist/component/{signature-rac-tznFgZ4j.js → signature-rac-BfDoEvbo.js} +3 -3
- package/dist/component/submit-button-rac-BDEQy_l_.js +172 -0
- package/dist/component/{tags-field-rac-DFm9o85s.js → tags-field-rac-DvmQ9U0Y.js} +5 -5
- package/dist/component/{tags-rac-CJFccYp5.js → tags-rac-DxkhHwfm.js} +1 -1
- package/dist/component/{text-area-field-rac-C4UEZOjz.js → text-area-field-rac-DngdDcia.js} +4 -4
- package/dist/component/{text-area-rac-Dhsq1l8f.js → text-area-rac-CXm7TYZV.js} +1 -1
- package/dist/component/{text-input-field-rac-DiW0Sqj_.js → text-input-field-rac-DyDgs_io.js} +3 -3
- package/dist/component/{text-input-headless-u1_aFnZ1.js → text-input-headless-C_feZwcp.js} +3 -3
- package/dist/component/{text-input-rac-COy-c4N_.js → text-input-rac-C5UxE1Zt.js} +1 -1
- package/dist/component/{time-input-rac-DipZQTZN.js → time-input-rac-cBIuRiEr.js} +4 -4
- package/dist/component/{url-input-field-rac-DhBCGvKd.js → url-input-field-rac-BUO9FUv6.js} +4 -4
- package/dist/component/{url-input-rac-kw4gCDbc.js → url-input-rac-D7Z-AQaq.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-Bes6rpX4.js → use-dropdown-option-class-name-Bm1SOTi8.js} +2 -2
- package/dist/component/use-dropdown-trigger-class-name-Dcy1VIqo.js +43 -0
- package/dist/component/{use-element-state-class-name-_GWfwpEf.js → use-element-state-class-name-B3vhm52Z.js} +1 -1
- package/dist/component/use-hoverable-input-class-name-nSoEwyiu.js +23 -0
- package/dist/component/{use-service-options-base-4yrjmSWU.js → use-service-options-base-Drse9uff.js} +1 -1
- package/dist/component/use-text-input-class-name-CZWGRiSQ.js +6 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-BW0c1-Kl.js +0 -290
- package/dist/component/phone-input-field-rac-CtPGbnw_.js +0 -504
- package/dist/component/service-dropdown-rac-CzZW7Bp1.js +0 -145
- package/dist/component/submit-button-rac-DnHWbtTC.js +0 -141
- package/dist/component/use-is-forced-open-dropdown-RE1Ml2A3.js +0 -41
- package/dist/component/use-text-input-class-name-uMLXv54u.js +0 -23
package/dist/component/{number-input-field-rac-DQERdWaA.js → number-input-field-rac-BaTODjcx.js}
RENAMED
|
@@ -2,15 +2,15 @@ import { RicosViewer as P } from "@wix/ricos/viewer";
|
|
|
2
2
|
import i from "classnames";
|
|
3
3
|
import r, { useState as U, useCallback as j, useEffect as Q, useRef as $ } from "react";
|
|
4
4
|
import { NumberField as z, Input as G } from "react-aria-components";
|
|
5
|
-
import { b9 as _, b6 as S, bj as H, bb as J, I as K, U as W, v as X, p as Y } from "./form-
|
|
5
|
+
import { b9 as _, b6 as S, bj as H, bb as J, I as K, U as W, v as X, p as Y } from "./form-AphBF-mQ.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as Z, E as w } from "./field-error-headless-
|
|
8
|
-
import { L as ee } from "./field-label-headless-
|
|
7
|
+
import { D as Z, E as w } from "./field-error-headless-B8MijSrk.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-D3FPZC-x.js";
|
|
9
9
|
import { g as re, c as te } from "./numeric-input-utils-CuBMi4-a.js";
|
|
10
10
|
import { u as ne } from "./use-invoke-callback-UH73A_J3.js";
|
|
11
11
|
import { E as ae } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { s as p } from "./field-rac.module-B4l_0KRU.js";
|
|
13
|
-
import { u as se } from "./use-text-input-class-name-
|
|
13
|
+
import { u as se } from "./use-text-input-class-name-CZWGRiSQ.js";
|
|
14
14
|
const e = ({ children: t }) => {
|
|
15
15
|
var F, L, R;
|
|
16
16
|
const { id: a, value: s, onChange: l, disabled: d, required: b, readOnly: o, onBlur: E, onFocus: f, FieldLayout: m, hasError: u, validation: n } = _(), { labelId: y } = S(), D = ((F = n == null ? void 0 : n.number) == null ? void 0 : F.multipleOf) || 1, A = (L = n == null ? void 0 : n.number) == null ? void 0 : L.maximum, g = (R = n == null ? void 0 : n.number) == null ? void 0 : R.minimum, x = O(s), [T, I] = U(x), V = ne(E), h = c(t, e.Label), q = c(t, e.Input), M = c(t, e.Description), k = c(t, e.Error), B = j((N) => {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import e, { useState as N, useRef as S } from "react";
|
|
2
2
|
import { RicosViewer as x } from "@wix/ricos/viewer";
|
|
3
3
|
import d from "classnames";
|
|
4
|
-
import { b9 as E, b6 as I, bb as O, bj as A, I as B, U as v, v as V, p as P } from "./form-
|
|
4
|
+
import { b9 as E, b6 as I, bb as O, bj as A, I as B, U as v, v as V, p as P } from "./form-AphBF-mQ.js";
|
|
5
5
|
import { TextField as M, Group as k, Input as q, Button as U } from "react-aria-components";
|
|
6
6
|
import { f as u, a as b } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as j, E as H } from "./field-error-headless-
|
|
8
|
-
import { L as W } from "./field-label-headless-
|
|
7
|
+
import { D as j, E as H } from "./field-error-headless-B8MijSrk.js";
|
|
8
|
+
import { L as W } from "./field-label-headless-D3FPZC-x.js";
|
|
9
9
|
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { H as G } from "./custom-focus-class-_483Pkwp.js";
|
|
11
11
|
import { s as p } from "./field-rac.module-B4l_0KRU.js";
|
|
12
|
-
import { u as Q } from "./use-text-input-class-name-
|
|
12
|
+
import { u as Q } from "./use-text-input-class-name-CZWGRiSQ.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, FieldLayout: _ } = E(), { labelId: y } = I(), [R, D] = N(!1), F = u(o, t.Label), L = u(o, t.Control), T = u(o, t.Description), w = u(o, t.Error);
|
|
15
15
|
return /* @__PURE__ */ e.createElement(_, {
|
|
@@ -2,16 +2,16 @@ import r, { useCallback as P, useRef as Q } from "react";
|
|
|
2
2
|
import { RicosViewer as w } from "@wix/ricos/viewer";
|
|
3
3
|
import p from "classnames";
|
|
4
4
|
import { TextField as z, Group as J, Input as K } from "react-aria-components";
|
|
5
|
-
import { b9 as R, b6 as D, b1 as T, bj as W, bb as X, I as Y, U as Z, v as ee, p as re } from "./form-
|
|
5
|
+
import { b9 as R, b6 as D, b1 as T, bj as W, bb as X, I as Y, U as Z, v as ee, p as re } from "./form-AphBF-mQ.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-B8MijSrk.js";
|
|
8
|
+
import { L as ae } from "./field-label-headless-D3FPZC-x.js";
|
|
9
9
|
import { f as N, 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-B4l_0KRU.js";
|
|
14
|
-
import { u as ie } from "./use-text-input-class-name-
|
|
14
|
+
import { u as ie } from "./use-text-input-class-name-CZWGRiSQ.js";
|
|
15
15
|
function ue(e, t) {
|
|
16
16
|
return {
|
|
17
17
|
productId: e.id,
|
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
import { RicosViewer as Ce } from "@wix/ricos/viewer";
|
|
2
|
+
import h from "classnames";
|
|
3
|
+
import t, { useMemo as A, useState as $, useRef as F, useEffect as k, useCallback as Z, createContext as ee, useContext as G, useId as de } from "react";
|
|
4
|
+
import { aU as ye, bj as D, b1 as te, bi as Ee, b9 as B, b6 as ne, bb as fe, I as ge, U as he, H as be, K as Oe, v as _e, p as Ne } from "./form-AphBF-mQ.js";
|
|
5
|
+
import { UNSAFE_PortalProvider as Se } from "react-aria";
|
|
6
|
+
import { Dialog as oe, OverlayTriggerStateContext as Le, ModalOverlay as Ie, Modal as ve, SearchField as Pe, Group as H, ListBoxItem as Fe, DialogTrigger as De, Select as Be, Input as re, Autocomplete as Re } from "react-aria-components";
|
|
7
|
+
import { f as g, a as L } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { D as xe, E as we } from "./field-error-headless-B8MijSrk.js";
|
|
9
|
+
import { L as Me } from "./field-label-headless-D3FPZC-x.js";
|
|
10
|
+
import { N as Te, S as Ae } from "./non-modal-popover-DtIMXHbe.js";
|
|
11
|
+
import { u as $e } from "./use-invoke-callback-UH73A_J3.js";
|
|
12
|
+
import { a as Ue, u as ke } from "./use-dropdown-trigger-class-name-Dcy1VIqo.js";
|
|
13
|
+
import { V as Ve, u as qe } from "./use-dropdown-option-class-name-Bm1SOTi8.js";
|
|
14
|
+
import ae, { AsYouType as He, isValidPhoneNumber as Ge, isSupportedCountry as Ke } from "libphonenumber-js";
|
|
15
|
+
import "libphonenumber-js/metadata.min.json";
|
|
16
|
+
import { C as Q } from "./calling-country-codes-PyWuOTmF.js";
|
|
17
|
+
import { C as Ye } from "./chevron-down-icon-CcpVm6B-.js";
|
|
18
|
+
import { E as je } from "./error-icon-hZxQ6DEy.js";
|
|
19
|
+
import { H as W } from "./custom-focus-class-_483Pkwp.js";
|
|
20
|
+
import { s as O } from "./field-rac.module-B4l_0KRU.js";
|
|
21
|
+
import { u as ze } from "./use-text-input-class-name-CZWGRiSQ.js";
|
|
22
|
+
function J(e) {
|
|
23
|
+
const n = e ? ae(e) : void 0, r = n == null ? void 0 : n.country;
|
|
24
|
+
if (r)
|
|
25
|
+
return r;
|
|
26
|
+
const o = new He();
|
|
27
|
+
return e && o.input(e), o.getCountry();
|
|
28
|
+
}
|
|
29
|
+
function K(e) {
|
|
30
|
+
var n;
|
|
31
|
+
return e && ((n = ye.getCountryByKey(e)) == null ? void 0 : n.dialCode);
|
|
32
|
+
}
|
|
33
|
+
function V(e) {
|
|
34
|
+
return e === null ? null : e.replace(/[^0-9+]/g, "") || e;
|
|
35
|
+
}
|
|
36
|
+
function X(e, n) {
|
|
37
|
+
if (e && n)
|
|
38
|
+
try {
|
|
39
|
+
const r = ae(e, n), o = r == null ? void 0 : r.formatInternational();
|
|
40
|
+
if (o && Ge(o))
|
|
41
|
+
return o.replace(/\s+/g, "");
|
|
42
|
+
} catch {
|
|
43
|
+
}
|
|
44
|
+
return e;
|
|
45
|
+
}
|
|
46
|
+
function Ze() {
|
|
47
|
+
const { t: e } = D(), { language: n } = te();
|
|
48
|
+
return A(() => Object.keys(Q).reduce((o, a) => {
|
|
49
|
+
const c = Q[a], l = K(c), i = e(`locale-dataset.countries.${c.toUpperCase()}`);
|
|
50
|
+
return l && Ke(a) && o.push({
|
|
51
|
+
countryName: i,
|
|
52
|
+
longCountryCode: c,
|
|
53
|
+
shortCountryCode: a,
|
|
54
|
+
callingCode: l
|
|
55
|
+
}), o;
|
|
56
|
+
}, []).sort((o, a) => o.countryName.localeCompare(a.countryName, n)), [
|
|
57
|
+
e,
|
|
58
|
+
n
|
|
59
|
+
]);
|
|
60
|
+
}
|
|
61
|
+
function Qe(e, n) {
|
|
62
|
+
return e.filter((r) => n && n.length > 0 ? n.includes(r.shortCountryCode) : !0);
|
|
63
|
+
}
|
|
64
|
+
function We(e, n) {
|
|
65
|
+
const { countryName: r, callingCode: o, shortCountryCode: a } = e;
|
|
66
|
+
return !!(q(r, n) || q(o, n) || q(a, n));
|
|
67
|
+
}
|
|
68
|
+
function q(e, n) {
|
|
69
|
+
return e.toLowerCase().includes(n.toLowerCase());
|
|
70
|
+
}
|
|
71
|
+
function Je({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange: o }) {
|
|
72
|
+
const [a, c] = $(e || ""), l = F(V(e ?? null) ?? ""), [i, u] = $(n);
|
|
73
|
+
Ee(() => {
|
|
74
|
+
c(""), l.current = "", u(n), o("");
|
|
75
|
+
});
|
|
76
|
+
const m = A(() => J(a), [
|
|
77
|
+
a
|
|
78
|
+
]);
|
|
79
|
+
k(() => {
|
|
80
|
+
const p = e ?? "";
|
|
81
|
+
p !== l.current && (c(p), l.current = p);
|
|
82
|
+
}, [
|
|
83
|
+
e
|
|
84
|
+
]), k(() => {
|
|
85
|
+
n && !i && u(n);
|
|
86
|
+
}, [
|
|
87
|
+
n,
|
|
88
|
+
i
|
|
89
|
+
]), k(() => {
|
|
90
|
+
u(n ?? m);
|
|
91
|
+
}, [
|
|
92
|
+
m,
|
|
93
|
+
n
|
|
94
|
+
]);
|
|
95
|
+
const C = Z((p) => {
|
|
96
|
+
if (c(p), !p) {
|
|
97
|
+
l.current = "", o(null);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const f = J(p);
|
|
101
|
+
u((d) => {
|
|
102
|
+
const S = f || d || ((r == null ? void 0 : r.length) === 1 ? r[0] : void 0), N = V(X(p, S));
|
|
103
|
+
return l.current = N ?? "", o(N), f || d;
|
|
104
|
+
});
|
|
105
|
+
}, [
|
|
106
|
+
r,
|
|
107
|
+
o
|
|
108
|
+
]), E = Z((p) => {
|
|
109
|
+
u(p), c((f) => {
|
|
110
|
+
const d = V(X(f, p));
|
|
111
|
+
return l.current = d ?? "", o(d), f;
|
|
112
|
+
});
|
|
113
|
+
}, [
|
|
114
|
+
o
|
|
115
|
+
]);
|
|
116
|
+
return {
|
|
117
|
+
currentValue: a,
|
|
118
|
+
selectedCountryCode: i,
|
|
119
|
+
handlePhoneChange: C,
|
|
120
|
+
handleCountryCodeChange: E
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
const se = /* @__PURE__ */ ee(null), _ = () => {
|
|
124
|
+
const e = G(se);
|
|
125
|
+
if (!e)
|
|
126
|
+
throw new Error("Phone input components must be used within PhoneInput component");
|
|
127
|
+
return e;
|
|
128
|
+
}, ce = /* @__PURE__ */ ee(null), Y = () => {
|
|
129
|
+
const e = G(ce);
|
|
130
|
+
if (!e)
|
|
131
|
+
throw new Error("Option sub-components must be used within Option component");
|
|
132
|
+
return e;
|
|
133
|
+
}, j = ({ longCountryCode: e, className: n }) => {
|
|
134
|
+
function r(c, l) {
|
|
135
|
+
const i = "https://static.parastorage.com/services/linguist-flags/1.1005.0/assets/flags/square/", m = `${c}${l === "2x" ? "_2x" : ""}.png`;
|
|
136
|
+
return `${i}${m}`;
|
|
137
|
+
}
|
|
138
|
+
const o = r(e, "1x"), a = r(e, "2x");
|
|
139
|
+
return /* @__PURE__ */ t.createElement("img", {
|
|
140
|
+
src: o,
|
|
141
|
+
srcSet: `${o} 1x, ${a} 2x`,
|
|
142
|
+
alt: "",
|
|
143
|
+
"aria-hidden": "true",
|
|
144
|
+
loading: "lazy",
|
|
145
|
+
className: n
|
|
146
|
+
});
|
|
147
|
+
}, s = ({ children: e }) => {
|
|
148
|
+
var v, P;
|
|
149
|
+
const { id: n, value: r, onChange: o, FieldLayout: a, defaultCountry: c, validation: l } = B(), [i, u] = $(null), m = (P = (v = l == null ? void 0 : l.string) == null ? void 0 : v.phoneOptions) == null ? void 0 : P.allowedCountryCodes, C = Ze(), E = A(() => Qe(C, m), [
|
|
150
|
+
C,
|
|
151
|
+
m
|
|
152
|
+
]), p = A(() => E.map((T) => T.shortCountryCode), [
|
|
153
|
+
E
|
|
154
|
+
]), { currentValue: f, selectedCountryCode: d, handlePhoneChange: S, handleCountryCodeChange: N } = Je({
|
|
155
|
+
value: r,
|
|
156
|
+
defaultCountryCode: c,
|
|
157
|
+
allowedCountryCodes: p,
|
|
158
|
+
onChange: o
|
|
159
|
+
}), R = g(e, s.Label), x = g(e, s.Control), w = g(e, s.Description), M = g(e, s.Error), I = {
|
|
160
|
+
currentValue: f,
|
|
161
|
+
selectedCountryCode: d,
|
|
162
|
+
handlePhoneChange: S,
|
|
163
|
+
handleCountryCodeChange: N,
|
|
164
|
+
countryCodes: p,
|
|
165
|
+
countries: E,
|
|
166
|
+
popoverContainer: i
|
|
167
|
+
};
|
|
168
|
+
return /* @__PURE__ */ t.createElement(se.Provider, {
|
|
169
|
+
value: I
|
|
170
|
+
}, /* @__PURE__ */ t.createElement(a, {
|
|
171
|
+
fieldId: n,
|
|
172
|
+
renderLabel: () => R,
|
|
173
|
+
renderInput: () => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
174
|
+
ref: u,
|
|
175
|
+
style: {
|
|
176
|
+
display: "contents"
|
|
177
|
+
}
|
|
178
|
+
}), x),
|
|
179
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, M, w)
|
|
180
|
+
}));
|
|
181
|
+
}, z = ({ children: e, className: n }) => {
|
|
182
|
+
const { labelId: r } = ne(), { hasError: o, disabled: a, readOnly: c } = B(), { t: l } = D(), { selectedCountryCode: i, countries: u } = _(), m = de(), C = i ? u.find((d) => d.shortCountryCode === i) : void 0, E = C && K(C.longCountryCode) || "", p = l("field.phone.country-code.aria-label"), f = C ? `${p}, ${C.countryName}, ${E}` : p;
|
|
183
|
+
return /* @__PURE__ */ t.createElement(Ae, {
|
|
184
|
+
isDisabled: a || c,
|
|
185
|
+
id: m,
|
|
186
|
+
"aria-label": f,
|
|
187
|
+
"aria-labelledby": r ? `${r} ${m}` : void 0,
|
|
188
|
+
className: n,
|
|
189
|
+
"data-invalid": o || void 0
|
|
190
|
+
}, e);
|
|
191
|
+
}, Xe = ({ className: e }) => {
|
|
192
|
+
const { selectedCountryCode: n, countries: r } = _(), o = r.find((a) => a.shortCountryCode === n);
|
|
193
|
+
return o ? /* @__PURE__ */ t.createElement(j, {
|
|
194
|
+
className: e,
|
|
195
|
+
longCountryCode: o.longCountryCode
|
|
196
|
+
}) : null;
|
|
197
|
+
}, et = ({ children: e, className: n }) => {
|
|
198
|
+
const { selectedCountryCode: r, countries: o } = _();
|
|
199
|
+
return o.some((c) => c.shortCountryCode === r) ? null : /* @__PURE__ */ t.createElement("span", {
|
|
200
|
+
className: n
|
|
201
|
+
}, e);
|
|
202
|
+
};
|
|
203
|
+
z.Flag = Xe;
|
|
204
|
+
z.EmptyState = et;
|
|
205
|
+
const b = ({ children: e, className: n, "aria-label": r, placement: o, offset: a, ...c }) => {
|
|
206
|
+
const { triggerRef: l, optionsRef: i, isForcedOpen: u, isOpen: m } = c, { popoverContainer: C } = _(), E = g(e, b.Search);
|
|
207
|
+
if (!m)
|
|
208
|
+
return null;
|
|
209
|
+
const p = /* @__PURE__ */ t.createElement(le, {
|
|
210
|
+
isForcedOpen: u
|
|
211
|
+
}, e);
|
|
212
|
+
return /* @__PURE__ */ t.createElement(Se, {
|
|
213
|
+
getContainer: () => C
|
|
214
|
+
}, /* @__PURE__ */ t.createElement(Te, {
|
|
215
|
+
ref: i,
|
|
216
|
+
triggerRef: l,
|
|
217
|
+
className: n,
|
|
218
|
+
placement: o,
|
|
219
|
+
offset: a,
|
|
220
|
+
containerPadding: 0
|
|
221
|
+
}, E && !u ? /* @__PURE__ */ t.createElement(oe, {
|
|
222
|
+
"aria-label": r
|
|
223
|
+
}, p) : p));
|
|
224
|
+
}, tt = ({ children: e, className: n, overlayClassName: r, "aria-label": o, portalContainer: a = t.Fragment, ...c }) => {
|
|
225
|
+
const { optionsRef: l } = c, { selectedCountryCode: i, handleCountryCodeChange: u } = _(), m = G(Le);
|
|
226
|
+
return /* @__PURE__ */ t.createElement(Ie, {
|
|
227
|
+
className: r,
|
|
228
|
+
isDismissable: !0
|
|
229
|
+
}, /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(ve, {
|
|
230
|
+
ref: l,
|
|
231
|
+
className: n
|
|
232
|
+
}, /* @__PURE__ */ t.createElement(oe, {
|
|
233
|
+
"aria-label": o
|
|
234
|
+
}, /* @__PURE__ */ t.createElement(le, {
|
|
235
|
+
listBoxProps: {
|
|
236
|
+
"aria-label": o,
|
|
237
|
+
selectionMode: "single",
|
|
238
|
+
selectedKeys: i ? [
|
|
239
|
+
i
|
|
240
|
+
] : [],
|
|
241
|
+
onAction: (C) => {
|
|
242
|
+
u(C), m == null || m.close();
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}, e)))));
|
|
246
|
+
}, le = ({ children: e, listBoxProps: n, isForcedOpen: r }) => {
|
|
247
|
+
const { countries: o } = _(), a = g(e, b.Option), c = g(e, b.Search), l = g(e, b.EmptyState), i = /* @__PURE__ */ t.createElement(Ve, {
|
|
248
|
+
isForcedOpen: r === !0,
|
|
249
|
+
...n,
|
|
250
|
+
renderEmptyState: l ? () => l : void 0
|
|
251
|
+
}, o.map((u) => {
|
|
252
|
+
const m = K(u.longCountryCode) || "";
|
|
253
|
+
return L(a, {
|
|
254
|
+
key: u.shortCountryCode,
|
|
255
|
+
countryCode: u.shortCountryCode,
|
|
256
|
+
dialingCode: m,
|
|
257
|
+
countryName: u.countryName,
|
|
258
|
+
longCountryCode: u.longCountryCode
|
|
259
|
+
});
|
|
260
|
+
}));
|
|
261
|
+
return c ? /* @__PURE__ */ t.createElement(Re, {
|
|
262
|
+
filter: (u, m, C) => {
|
|
263
|
+
const E = o.find((p) => p.shortCountryCode === C.key);
|
|
264
|
+
return !!E && We(E, m);
|
|
265
|
+
}
|
|
266
|
+
}, r ? L(c, {
|
|
267
|
+
autoFocus: !1
|
|
268
|
+
}) : c, i) : i;
|
|
269
|
+
};
|
|
270
|
+
b.Popover = b;
|
|
271
|
+
b.Modal = tt;
|
|
272
|
+
const ue = ({ className: e, children: n, "aria-label": r, ...o }) => {
|
|
273
|
+
const { autoFocus: a = !0 } = o;
|
|
274
|
+
return /* @__PURE__ */ t.createElement(Pe, {
|
|
275
|
+
"aria-label": r,
|
|
276
|
+
autoFocus: a
|
|
277
|
+
}, /* @__PURE__ */ t.createElement(H, {
|
|
278
|
+
className: e
|
|
279
|
+
}, n));
|
|
280
|
+
}, nt = ({ className: e, placeholder: n }) => /* @__PURE__ */ t.createElement(re, {
|
|
281
|
+
className: e,
|
|
282
|
+
placeholder: n
|
|
283
|
+
});
|
|
284
|
+
ue.Input = nt;
|
|
285
|
+
b.Search = ue;
|
|
286
|
+
const ot = ({ children: e, className: n }) => /* @__PURE__ */ t.createElement("div", {
|
|
287
|
+
className: n
|
|
288
|
+
}, e);
|
|
289
|
+
b.EmptyState = ot;
|
|
290
|
+
const U = ({ children: e, className: n, ...r }) => {
|
|
291
|
+
const { countryCode: o, dialingCode: a, countryName: c, longCountryCode: l } = r, i = {
|
|
292
|
+
countryCode: o,
|
|
293
|
+
dialingCode: a,
|
|
294
|
+
countryName: c,
|
|
295
|
+
longCountryCode: l
|
|
296
|
+
}, u = e || /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(ie, null), /* @__PURE__ */ t.createElement(me, null), /* @__PURE__ */ t.createElement(pe, null));
|
|
297
|
+
return /* @__PURE__ */ t.createElement(Fe, {
|
|
298
|
+
className: n,
|
|
299
|
+
id: o,
|
|
300
|
+
textValue: `${c} ${a}`
|
|
301
|
+
}, /* @__PURE__ */ t.createElement(ce.Provider, {
|
|
302
|
+
value: i
|
|
303
|
+
}, u));
|
|
304
|
+
}, ie = ({ className: e }) => {
|
|
305
|
+
const { longCountryCode: n } = Y();
|
|
306
|
+
return /* @__PURE__ */ t.createElement(j, {
|
|
307
|
+
className: e,
|
|
308
|
+
longCountryCode: n
|
|
309
|
+
});
|
|
310
|
+
}, me = ({ className: e }) => {
|
|
311
|
+
const { countryName: n } = Y();
|
|
312
|
+
return /* @__PURE__ */ t.createElement("span", {
|
|
313
|
+
className: e
|
|
314
|
+
}, n);
|
|
315
|
+
}, pe = ({ className: e }) => {
|
|
316
|
+
const { dialingCode: n } = Y();
|
|
317
|
+
return /* @__PURE__ */ t.createElement("span", {
|
|
318
|
+
className: e
|
|
319
|
+
}, n);
|
|
320
|
+
};
|
|
321
|
+
U.Flag = ie;
|
|
322
|
+
U.Name = me;
|
|
323
|
+
U.Code = pe;
|
|
324
|
+
b.Option = U;
|
|
325
|
+
const rt = ({ className: e }) => {
|
|
326
|
+
const { t: n } = D(), { inputId: r, ariaDescribedBy: o } = ne(), { id: a, placeholder: c, disabled: l, readOnly: i, required: u, label: m, hasError: C } = B(), { currentValue: E, handlePhoneChange: p } = _(), f = F(null);
|
|
327
|
+
return fe(() => {
|
|
328
|
+
var d;
|
|
329
|
+
(d = f.current) == null || d.focus({
|
|
330
|
+
preventScroll: !0
|
|
331
|
+
});
|
|
332
|
+
}, a), /* @__PURE__ */ t.createElement(re, {
|
|
333
|
+
ref: f,
|
|
334
|
+
id: r,
|
|
335
|
+
type: "tel",
|
|
336
|
+
value: E,
|
|
337
|
+
onChange: (d) => p(d.target.value),
|
|
338
|
+
disabled: l,
|
|
339
|
+
readOnly: i,
|
|
340
|
+
required: u,
|
|
341
|
+
"aria-label": `${m}. ${n("field.phone.aria-label")}`,
|
|
342
|
+
"aria-describedby": o,
|
|
343
|
+
"aria-invalid": C,
|
|
344
|
+
placeholder: c,
|
|
345
|
+
className: e
|
|
346
|
+
});
|
|
347
|
+
}, at = ({ children: e, ...n }) => {
|
|
348
|
+
const r = n, { isForcedOpen: o } = r, { disabled: a, readOnly: c, required: l, hasError: i } = B(), [u, m] = $(!1), { t: C } = D(), { selectedCountryCode: E, handleCountryCodeChange: p } = _(), f = o || u && !a && !c;
|
|
349
|
+
return /* @__PURE__ */ t.createElement(Be, {
|
|
350
|
+
"aria-label": C("field.phone.country-code.aria-label"),
|
|
351
|
+
value: E ?? null,
|
|
352
|
+
onChange: (d) => p(d),
|
|
353
|
+
isDisabled: a || c,
|
|
354
|
+
isInvalid: i,
|
|
355
|
+
isRequired: l,
|
|
356
|
+
placeholder: "",
|
|
357
|
+
isOpen: f,
|
|
358
|
+
allowsEmptyCollection: !0,
|
|
359
|
+
onOpenChange: o ? void 0 : m
|
|
360
|
+
}, g(e, s.CountryButton), L(g(e, s.CountryOptions.Popover), {
|
|
361
|
+
...r,
|
|
362
|
+
isOpen: f
|
|
363
|
+
}));
|
|
364
|
+
}, st = ({ children: e, ...n }) => {
|
|
365
|
+
const r = n;
|
|
366
|
+
return /* @__PURE__ */ t.createElement(De, null, g(e, s.CountryButton), L(g(e, s.CountryOptions.Modal), r));
|
|
367
|
+
}, ct = ({ children: e, className: n }) => {
|
|
368
|
+
const r = F(null), o = F(null), a = F(!1), { id: c, disabled: l, hasError: i, showFlag: u, onFocus: m, onBlur: C } = B(), E = $e(C), { countries: p } = _(), f = g(e, s.CountryDrawer), d = g(e, s.CountryPopover), S = g(e, s.PhoneNumber), N = p.length > 1, R = Ue(c) && !!d && N, x = typeof n == "function" ? ({ isHovered: I }) => n({
|
|
369
|
+
hasCountryOptions: N,
|
|
370
|
+
isHovered: I
|
|
371
|
+
}) : n, w = {
|
|
372
|
+
triggerRef: r,
|
|
373
|
+
optionsRef: o,
|
|
374
|
+
isForcedOpen: R
|
|
375
|
+
}, M = {
|
|
376
|
+
onFocus: () => {
|
|
377
|
+
a.current || (a.current = !0, m == null || m());
|
|
378
|
+
},
|
|
379
|
+
onBlur: (I) => {
|
|
380
|
+
var P, T;
|
|
381
|
+
const v = I.relatedTarget;
|
|
382
|
+
!((P = r.current) != null && P.contains(v)) && !((T = o.current) != null && T.contains(v)) && (a.current = !1, E());
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
return p.length === 1 ? /* @__PURE__ */ t.createElement(H, {
|
|
386
|
+
ref: r,
|
|
387
|
+
className: x,
|
|
388
|
+
isDisabled: l,
|
|
389
|
+
isInvalid: i,
|
|
390
|
+
...M
|
|
391
|
+
}, u && /* @__PURE__ */ t.createElement(j, {
|
|
392
|
+
longCountryCode: p[0].longCountryCode
|
|
393
|
+
}), S) : /* @__PURE__ */ t.createElement(H, {
|
|
394
|
+
ref: r,
|
|
395
|
+
className: x,
|
|
396
|
+
isDisabled: l,
|
|
397
|
+
isInvalid: i,
|
|
398
|
+
...M
|
|
399
|
+
}, !R && L(f, w), L(d, w), S);
|
|
400
|
+
};
|
|
401
|
+
s.Label = Me;
|
|
402
|
+
s.Control = ct;
|
|
403
|
+
s.CountryButton = z;
|
|
404
|
+
s.CountryDrawer = st;
|
|
405
|
+
s.CountryPopover = at;
|
|
406
|
+
s.CountryOptions = b;
|
|
407
|
+
s.PhoneNumber = rt;
|
|
408
|
+
s.Description = xe;
|
|
409
|
+
s.Error = we;
|
|
410
|
+
const lt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
411
|
+
width: 24,
|
|
412
|
+
height: 24,
|
|
413
|
+
viewBox: "0 0 24 24",
|
|
414
|
+
fill: "currentColor",
|
|
415
|
+
"aria-hidden": "true",
|
|
416
|
+
...e
|
|
417
|
+
}, /* @__PURE__ */ t.createElement("path", {
|
|
418
|
+
fillRule: "evenodd",
|
|
419
|
+
d: "M11.5,19 C11.331,19 11.166,18.985 11,18.975 L11,16.5 C11,16.224 10.776,16 10.5,16 L9.5,16 C9.224,16 9,15.775 9,15.5 L9,12.5 C9,12.366 8.947,12.238 8.852,12.145 L4.804,8.14 C6.04,5.688 8.573,4 11.5,4 C12.76,4 13.946,4.315 14.989,4.866 L15,6.497 C15.001,6.631 14.949,6.757 14.855,6.853 C14.76,6.947 14.634,7 14.5,7 L12.339,7 C12.207,7 12.08,7.053 11.986,7.146 L10.146,8.983 C10.053,9.077 10,9.204 10,9.337 L10,10.5 C10,11.325 10.672,11.999 11.499,12 L15.293,12 L17,13.707 L17,16.582 C15.629,18.064 13.674,19 11.5,19 M4,11.5 C4,10.673 4.14,9.879 4.388,9.135 L8,12.709 L8,15.5 C8,16.327 8.673,17 9.5,17 L10,17 L10,18.849 C6.581,18.152 4,15.122 4,11.5 M19,11.5 C19,12.856 18.632,14.127 18,15.226 L18,13.5 C18,13.367 17.947,13.24 17.854,13.146 L15.854,11.146 C15.76,11.053 15.633,11 15.5,11 L11.5,11 C11.224,11 11,10.775 11,10.5 L11,9.544 L12.546,8 L14.5,8 C14.902,8 15.281,7.843 15.564,7.557 C15.848,7.271 16.003,6.892 16,6.49 L15.993,5.51 C17.814,6.879 19,9.051 19,11.5 M11.5,3 C6.813,3 3,6.813 3,11.5 C3,16.187 6.813,20 11.5,20 C16.187,20 20,16.187 20,11.5 C20,6.813 16.187,3 11.5,3"
|
|
420
|
+
})), ut = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
421
|
+
width: 24,
|
|
422
|
+
height: 24,
|
|
423
|
+
viewBox: "0 0 24 24",
|
|
424
|
+
fill: "currentColor",
|
|
425
|
+
"aria-hidden": "true",
|
|
426
|
+
...e
|
|
427
|
+
}, /* @__PURE__ */ t.createElement("path", {
|
|
428
|
+
fillRule: "evenodd",
|
|
429
|
+
d: "M6.6108,14.3887 C5.5718,13.3497 4.9998,11.9687 4.9998,10.4997 C4.9998,9.0317 5.5718,7.6507 6.6108,6.6117 C7.6498,5.5727 9.0308,4.9997 10.4998,4.9997 C11.9688,4.9997 13.3498,5.5727 14.3888,6.6117 C15.4278,7.6507 15.9998,9.0317 15.9998,10.4997 C15.9998,11.9687 15.4278,13.3497 14.3888,14.3887 C13.3498,15.4277 11.9688,15.9997 10.4998,15.9997 C9.0308,15.9997 7.6498,15.4277 6.6108,14.3887 L6.6108,14.3887 Z M20.0028,19.2957 L15.4328,14.7247 C16.4438,13.5477 16.9998,12.0687 16.9998,10.4997 C16.9998,8.7637 16.3238,7.1317 15.0958,5.9047 C13.8688,4.6767 12.2358,3.9997 10.4998,3.9997 C8.7638,3.9997 7.1318,4.6767 5.9038,5.9047 C4.6758,7.1317 3.9998,8.7637 3.9998,10.4997 C3.9998,12.2367 4.6758,13.8677 5.9038,15.0957 C7.1318,16.3237 8.7638,16.9997 10.4998,16.9997 C12.0688,16.9997 13.5478,16.4437 14.7258,15.4317 L19.2958,20.0027 L20.0028,19.2957 Z"
|
|
430
|
+
})), it = "_control_rc3mn_1", mt = "_countryButton_rc3mn_9", pt = "_drawerButton_rc3mn_25", Ct = "_popoverButton_rc3mn_34", dt = "_chevron_rc3mn_39", yt = "_globeIcon_rc3mn_48", Et = "_searchIcon_rc3mn_49", ft = "_flag_rc3mn_58", gt = "_phoneNumber_rc3mn_73", ht = "_countryOptions_rc3mn_99", bt = "_option_rc3mn_107", Ot = "_countrySearch_rc3mn_116", _t = "_mobileDrawer_rc3mn_124", Nt = "_name_rc3mn_133", St = "_code_rc3mn_137", Lt = "_mobileOverlay_rc3mn_154", y = {
|
|
431
|
+
control: it,
|
|
432
|
+
countryButton: mt,
|
|
433
|
+
drawerButton: pt,
|
|
434
|
+
popoverButton: Ct,
|
|
435
|
+
chevron: dt,
|
|
436
|
+
globeIcon: yt,
|
|
437
|
+
searchIcon: Et,
|
|
438
|
+
flag: ft,
|
|
439
|
+
phoneNumber: gt,
|
|
440
|
+
countryOptions: ht,
|
|
441
|
+
option: bt,
|
|
442
|
+
countrySearch: Ot,
|
|
443
|
+
mobileDrawer: _t,
|
|
444
|
+
name: Nt,
|
|
445
|
+
code: St,
|
|
446
|
+
mobileOverlay: Lt
|
|
447
|
+
}, It = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(Ce, {
|
|
448
|
+
content: e,
|
|
449
|
+
locale: n
|
|
450
|
+
}), vt = () => /* @__PURE__ */ t.createElement("span", {
|
|
451
|
+
className: y.chevron,
|
|
452
|
+
"aria-hidden": "true"
|
|
453
|
+
}, /* @__PURE__ */ t.createElement(Ye, null)), Zt = () => {
|
|
454
|
+
const e = qe(O.selectOptionWithoutFocusRing, y.option, W), n = ke(y.control), r = ze(y.countrySearch), { t: o } = D(), { PortalContainer: a } = te(), c = /* @__PURE__ */ t.createElement(s.CountryOptions.Search, {
|
|
455
|
+
className: r,
|
|
456
|
+
"aria-label": o("field.phone.country-search-input.aria-label")
|
|
457
|
+
}, /* @__PURE__ */ t.createElement(ut, {
|
|
458
|
+
className: y.searchIcon
|
|
459
|
+
}), /* @__PURE__ */ t.createElement(s.CountryOptions.Search.Input, {
|
|
460
|
+
className: h(O.innerInput, W),
|
|
461
|
+
placeholder: o("field.phone.country-search-input.placeholder")
|
|
462
|
+
})), l = /* @__PURE__ */ t.createElement(s.CountryOptions.EmptyState, null, o("field.phone.country-selector-dropdown.no-result")), i = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(s.CountryButton.Flag, {
|
|
463
|
+
className: y.flag
|
|
464
|
+
}), /* @__PURE__ */ t.createElement(s.CountryButton.EmptyState, null, /* @__PURE__ */ t.createElement(lt, {
|
|
465
|
+
className: y.globeIcon
|
|
466
|
+
})), /* @__PURE__ */ t.createElement(vt, null)), u = /* @__PURE__ */ t.createElement(s.CountryOptions.Option, {
|
|
467
|
+
className: e
|
|
468
|
+
}, /* @__PURE__ */ t.createElement(s.CountryOptions.Option.Flag, {
|
|
469
|
+
className: y.flag
|
|
470
|
+
}), /* @__PURE__ */ t.createElement(s.CountryOptions.Option.Name, {
|
|
471
|
+
className: y.name
|
|
472
|
+
}), /* @__PURE__ */ t.createElement(s.CountryOptions.Option.Code, {
|
|
473
|
+
className: y.code
|
|
474
|
+
}));
|
|
475
|
+
return /* @__PURE__ */ t.createElement(s, null, /* @__PURE__ */ t.createElement(s.Label, {
|
|
476
|
+
className: h(ge, O.label)
|
|
477
|
+
}, /* @__PURE__ */ t.createElement(s.Label.Required, {
|
|
478
|
+
className: h(he, O.requiredMark)
|
|
479
|
+
})), /* @__PURE__ */ t.createElement(s.Control, {
|
|
480
|
+
className: ({ hasCountryOptions: m, isHovered: C }) => m ? n({
|
|
481
|
+
isHovered: C
|
|
482
|
+
}) : h(be, O.input, y.control)
|
|
483
|
+
}, /* @__PURE__ */ t.createElement(s.CountryDrawer, null, /* @__PURE__ */ t.createElement(s.CountryButton, {
|
|
484
|
+
className: h(y.countryButton, y.drawerButton)
|
|
485
|
+
}, i), /* @__PURE__ */ t.createElement(s.CountryOptions.Modal, {
|
|
486
|
+
className: h(O.selectPopover, y.mobileDrawer),
|
|
487
|
+
overlayClassName: y.mobileOverlay,
|
|
488
|
+
portalContainer: a,
|
|
489
|
+
"aria-label": o("field.phone.country-code.aria-label")
|
|
490
|
+
}, c, l, u)), /* @__PURE__ */ t.createElement(s.CountryPopover, null, /* @__PURE__ */ t.createElement(s.CountryButton, {
|
|
491
|
+
className: h(y.countryButton, y.popoverButton)
|
|
492
|
+
}, i), /* @__PURE__ */ t.createElement(s.CountryOptions.Popover, {
|
|
493
|
+
className: h(Oe, O.selectPopover, y.countryOptions),
|
|
494
|
+
placement: "bottom start",
|
|
495
|
+
offset: 0,
|
|
496
|
+
"aria-label": o("field.phone.country-code.aria-label")
|
|
497
|
+
}, c, l, u)), /* @__PURE__ */ t.createElement(s.PhoneNumber, {
|
|
498
|
+
className: h(O.innerInput, y.phoneNumber)
|
|
499
|
+
})), /* @__PURE__ */ t.createElement(s.Error, {
|
|
500
|
+
className: h(_e, O.error)
|
|
501
|
+
}, /* @__PURE__ */ t.createElement(je, null), /* @__PURE__ */ t.createElement(s.Error.Text, null)), /* @__PURE__ */ t.createElement(s.Description, {
|
|
502
|
+
className: h(Ne, O.description)
|
|
503
|
+
}, It));
|
|
504
|
+
};
|
|
505
|
+
export {
|
|
506
|
+
Zt as P
|
|
507
|
+
};
|
|
@@ -2,11 +2,11 @@ import t, { useMemo as $, useCallback as M, useRef as B } from "react";
|
|
|
2
2
|
import { RicosViewer as z } from "@wix/ricos/viewer";
|
|
3
3
|
import _ from "classnames";
|
|
4
4
|
import { CheckboxField as G, CheckboxButton as j, NumberField as X, Group as J, Button as U, Input as W } from "react-aria-components";
|
|
5
|
-
import { b9 as k, b6 as Y, b1 as w, bj as Z, bb as ee, I as te, U as ne, L as ae, O as oe, N as re, H as le, v as se, p as ie, M as ce } from "./form-
|
|
5
|
+
import { b9 as k, b6 as Y, b1 as w, bj as Z, bb as ee, I as te, U as ne, L as ae, O as oe, N as re, H as le, v as se, p as ie, M as ce } from "./form-AphBF-mQ.js";
|
|
6
6
|
import { f as I, a as f } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { L as ue, g as me } from "./field-label-headless-
|
|
7
|
+
import { L as ue, g as me } from "./field-label-headless-D3FPZC-x.js";
|
|
8
8
|
import { f as pe } from "./format-currency-BwShJ9vM.js";
|
|
9
|
-
import { D as de, E as Ee } from "./field-error-headless-
|
|
9
|
+
import { D as de, E as Ee } from "./field-error-headless-B8MijSrk.js";
|
|
10
10
|
import { F as ye } from "./fieldset-headless-CD3fds9J.js";
|
|
11
11
|
import { g as be } from "./payment-field-utils-DobiK5Xh.js";
|
|
12
12
|
import { S as _e } from "./selection-indicator-XQ8MYHUQ.js";
|
|
@@ -14,7 +14,7 @@ import { E as fe } from "./error-icon-hZxQ6DEy.js";
|
|
|
14
14
|
import { C as Ie } from "./checkbox-indicator-module-classes-BpeSpGsW.js";
|
|
15
15
|
import { s as T } from "./field-rac.module-B4l_0KRU.js";
|
|
16
16
|
import { o as Q } 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-B3vhm52Z.js";
|
|
18
18
|
var Le = /* @__PURE__ */ (function(e) {
|
|
19
19
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
20
20
|
})({}), x = /* @__PURE__ */ (function(e) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import a, { useRef as S, useState as V, useEffect as T, useCallback as B } from "react";
|
|
2
2
|
import { RadioGroup as H, RadioField as k, RadioButton as A, TextField as G, Input as P } from "react-aria-components";
|
|
3
|
-
import { b9 as g, b6 as $, bj as F, bb as x } from "./form-
|
|
3
|
+
import { b9 as g, b6 as $, bj as F, bb as x } from "./form-AphBF-mQ.js";
|
|
4
4
|
import { f as d, a as v } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as U, E as j } from "./field-error-headless-
|
|
6
|
-
import { L as M } from "./field-label-headless-
|
|
5
|
+
import { D as U, E as j } from "./field-error-headless-B8MijSrk.js";
|
|
6
|
+
import { L as M } from "./field-label-headless-D3FPZC-x.js";
|
|
7
7
|
import { S as w } from "./selection-indicator-XQ8MYHUQ.js";
|
|
8
8
|
const L = "Other", z = (e, t) => e == null ? void 0 : e.find((n) => (n.value ?? n.label) === t), y = (e, t) => !!t && !z(e, t), J = (e, t) => {
|
|
9
9
|
const l = t ? t.length + 2 : 0;
|
package/dist/component/{radio-group-field-rac-C2oTt1mT.js → radio-group-field-rac-CE67QNOZ.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-DmWrhFOe.js";
|
|
5
5
|
import { E as c } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as r } from "./field-rac.module-B4l_0KRU.js";
|
|
7
|
-
import { I as i, U as E, P as p, Q as R, v as O, p as _, R as I } from "./form-
|
|
7
|
+
import { I as i, U as E, P as p, Q as R, v as O, p as _, R as I } from "./form-AphBF-mQ.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-B3vhm52Z.js";
|
|
10
|
+
import { u } from "./use-text-input-class-name-CZWGRiSQ.js";
|
|
11
11
|
const D = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
12
12
|
content: o,
|
|
13
13
|
locale: l
|