@wix/form-elements 1.90.0 → 1.92.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-DtPa-JZ9.js → appointment-rac-bw0pvoxP.js} +4 -4
- package/dist/component/{bookings-address-rac-4l8kqoLi.js → bookings-address-rac-DECq7eWR.js} +1 -1
- package/dist/component/{bookings-email-rac-76vUcGtU.js → bookings-email-rac-DTLjh6Zw.js} +1 -1
- package/dist/component/{bookings-first-name-rac-IS7LUMxg.js → bookings-first-name-rac-DObRe-Gq.js} +1 -1
- package/dist/component/{bookings-header-rac-2wTzY64_.js → bookings-header-rac-DjpmYRJG.js} +1 -1
- package/dist/component/{bookings-last-name-rac-nxA75igv.js → bookings-last-name-rac-Ds3o0ABM.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CRi1nntD.js → bookings-login-bar-rac-DPUL2jWj.js} +1 -1
- package/dist/component/{bookings-phone-rac-DZjvHly0.js → bookings-phone-rac-DIIHPxEP.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CYn1wwYQ.js → bookings-rich-text-rac-BrcQO9xx.js} +1 -1
- package/dist/component/{checkbox-field-rac-DAcFLQNT.js → checkbox-field-rac-CD1MP1LT.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-BJmS0Ce5.js → checkbox-group-field-headless-C0V6zq0u.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CeFUt2Nr.js → checkbox-group-field-rac-B-MYpz53.js} +3 -3
- package/dist/component/{checkbox-group-rac-eDChVoVP.js → checkbox-group-rac-BejQjiO2.js} +1 -1
- package/dist/component/{checkbox-rac-DGmZdPnl.js → checkbox-rac-B0YgCj29.js} +1 -1
- package/dist/component/{contacts-address-rac-CGS83PMu.js → contacts-address-rac-B1QNl3Lb.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DkP-7tZ9.js → contacts-birthdate-rac-Cp-gh3P-.js} +1 -1
- package/dist/component/{contacts-company-rac-D_KYvkYe.js → contacts-company-rac-CSCU7JGm.js} +1 -1
- package/dist/component/{contacts-email-rac-4lGD56E8.js → contacts-email-rac-B1Oov6-3.js} +1 -1
- package/dist/component/{contacts-first-name-rac-C5L3U9QV.js → contacts-first-name-rac-rsHIOcjr.js} +1 -1
- package/dist/component/{contacts-last-name-rac-SL3FSAhE.js → contacts-last-name-rac-Csgq53Wm.js} +1 -1
- package/dist/component/{contacts-phone-rac-DkUwJ56_.js → contacts-phone-rac-r9SwjDZ4.js} +1 -1
- package/dist/component/{contacts-position-rac-CeKJ5oJh.js → contacts-position-rac-D7VcCM7v.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-Bjldz7ed.js → contacts-subscribe-rac-8Nu9ncZW.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-D8QxyDiU.js → contacts-tax-id-rac-CL_JSl_W.js} +1 -1
- package/dist/component/{date-availability-DdMI-zNj.js → date-availability-DLOKY9C4.js} +1 -1
- package/dist/component/date-input-field-rac-D23Al-Mr.js +292 -0
- package/dist/component/{date-input-rac-tlmhXr4A.js → date-input-rac-B6zgkw-L.js} +1 -1
- package/dist/component/{date-picker-field-rac-ClNfMoR1.js → date-picker-field-rac-BqdzPPzK.js} +4 -4
- package/dist/component/{date-picker-rac-BV3TGjsx.js → date-picker-rac-C7g6aceb.js} +1 -1
- package/dist/component/date-time-input-field-rac-BENzf6gc.js +428 -0
- package/dist/component/{date-time-input-rac-DQk2ylbE.js → date-time-input-rac-CVpK3mgw.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-CBj9Y7Tp.js → dext-checkbox-group-rac-CbEFDD3H.js} +2 -2
- package/dist/component/{dext-checkbox-rac-C1KI5I2J.js → dext-checkbox-rac-BdtZvn6I.js} +1 -1
- package/dist/component/{dext-date-picker-rac-D-8Ss0bx.js → dext-date-picker-rac-BAhFvUEx.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-CRnwLBSZ.js → dext-date-time-input-rac-iXMKMwQY.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BVTEMS0W.js → dext-dropdown-rac-D-NPziZS.js} +1 -1
- package/dist/component/{dext-email-rac-CXeM4iQj.js → dext-email-rac-DYSwyB80.js} +1 -1
- package/dist/component/{dext-number-input-rac-DMh08cy5.js → dext-number-input-rac-DXx8hgFg.js} +1 -1
- package/dist/component/{dext-phone-rac-E1fFjkVW.js → dext-phone-rac-BtuLROzm.js} +1 -1
- package/dist/component/{dext-radio-group-rac-_BhRzFAr.js → dext-radio-group-rac-MdKNiJ2i.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BRYVQOYw.js → dext-rating-input-rac-d998xond.js} +1 -1
- package/dist/component/{dext-tags-rac-C4iwtRcw.js → dext-tags-rac-DnSpOM9T.js} +2 -2
- package/dist/component/{dext-text-area-rac-CQ1KAhkU.js → dext-text-area-rac-KqjeDDWe.js} +1 -1
- package/dist/component/{dext-text-input-rac-xCoKhEt3.js → dext-text-input-rac-CtCnClfX.js} +1 -1
- package/dist/component/{dext-url-input-rac-DyoEEa_v.js → dext-url-input-rac-DSJQcLLr.js} +1 -1
- package/dist/component/{donation-rac-CSDVxWUj.js → donation-rac-B_KGkBgo.js} +5 -5
- package/dist/component/dropdown-field-headless-BUilB8wZ.js +89 -0
- package/dist/component/{dropdown-field-rac-D1Z_Jbzd.js → dropdown-field-rac-COupYC1a.js} +2 -2
- package/dist/component/{dropdown-rac-BEi7CMKT.js → dropdown-rac-Dj0UZrE0.js} +1 -1
- package/dist/component/{ecom-address-rac-DGl7rlwa.js → ecom-address-rac-C0xnn86e.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-D5HzzRQk.js → ecom-subscription-checkbox-rac-D-ekxwUE.js} +2 -2
- package/dist/component/{email-input-field-rac-DHAK2K8E.js → email-input-field-rac-DVj1qz_R.js} +3 -3
- package/dist/component/{events-repeater-rac-N1mGqD4R.js → events-repeater-rac-U0aq9Z4Q.js} +3 -3
- package/dist/component/{events-rsvp-rac-Ds9PnqHG.js → events-rsvp-rac-C7J58_5q.js} +2 -2
- package/dist/component/{field-error-headless-9MKScovg.js → field-error-headless-2nYJ2792.js} +1 -1
- package/dist/component/{field-label-headless-BaoLrUWJ.js → field-label-headless-D97ACnmc.js} +1 -1
- package/dist/component/{file-upload-rac-CNbLRxUz.js → file-upload-rac-BR7QpuPW.js} +3 -3
- package/dist/component/{fixed-payment-rac-BFnvUksR.js → fixed-payment-rac-COl18wW1.js} +3 -3
- package/dist/component/{form-B3YjGh0T.js → form-DKKTSAj1.js} +1110 -1109
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-64pYqszP.js → header-field-rac-B6DyMG3U.js} +2 -2
- package/dist/component/{header-rac-BtPQVL59.js → header-rac-x4H2qMky.js} +1 -1
- package/dist/component/{image-choice-rac-BsojUR1h.js → image-choice-rac-BVgmKTKk.js} +4 -4
- package/dist/component/{index-CtiBRBqZ.js → index-C47UMGhd.js} +4 -4
- package/dist/component/{index-f2JBxCTd.js → index-DnpqBcg5.js} +2 -2
- package/dist/component/{isObjectLike-BgqHLNgn.js → isObjectLike-BrrFBP4f.js} +1 -1
- package/dist/component/multiline-address-field-rac-B6ka-2Wy.js +1630 -0
- package/dist/component/{multiline-address-rac-CkOPWXfI.js → multiline-address-rac-Bh58qUEe.js} +1 -1
- package/dist/component/{number-input-field-rac-B7U_08UK.js → number-input-field-rac-pAmxvk3A.js} +4 -4
- package/dist/component/{number-input-rac-1jcchySg.js → number-input-rac-mKA2njIU.js} +1 -1
- package/dist/component/{password-rac-CAaV8OrL.js → password-rac-BbD7PQXO.js} +4 -4
- package/dist/component/{payment-input-rac-B3Knhzrz.js → payment-input-rac-UdkwC1ek.js} +4 -4
- package/dist/component/phone-input-field-rac-BVLVVDTq.js +487 -0
- package/dist/component/{phone-rac-BUAW-44w.js → phone-rac-LixcB9WV.js} +1 -1
- package/dist/component/{product-list-rac-C7Nq3ZG4.js → product-list-rac-B_dL1Ov-.js} +4 -4
- package/dist/component/{quiz-radio-group-rac-CRa3I_NR.js → quiz-radio-group-rac-Bj5XfqNf.js} +1 -1
- package/dist/component/{radio-button-module-classes-BEvf741q.js → radio-button-module-classes-y_PtsZPP.js} +3 -3
- package/dist/component/{radio-group-field-rac-BYTXrpnE.js → radio-group-field-rac-C8OElNAQ.js} +3 -3
- package/dist/component/{radio-group-rac-138JrIhm.js → radio-group-rac-BqJFboHE.js} +1 -1
- package/dist/component/{rating-input-field-rac-D5pOVdFJ.js → rating-input-field-rac-C9_ITvEh.js} +4 -4
- package/dist/component/{rating-input-rac-DuK1q9JB.js → rating-input-rac-CvTpEUoU.js} +1 -1
- package/dist/component/{rich-content-rac.module-H3hPgDtD.js → rich-content-rac.module-D4pEN-TY.js} +1 -1
- package/dist/component/{rich-text-field-rac-Btwqm4wb.js → rich-text-field-rac-B8cqCmaf.js} +2 -2
- package/dist/component/{rich-text-rac-DIu8StCg.js → rich-text-rac-C1o-tfXG.js} +1 -1
- package/dist/component/{service-dropdown-rac-N8jqoUC_.js → service-dropdown-rac-BOXqB2aq.js} +4 -4
- package/dist/component/{services-multi-choice-rac-DlP0tB9d.js → services-multi-choice-rac-Dk4rz-fw.js} +5 -5
- package/dist/component/{signature-rac-DuRzxIkO.js → signature-rac-h9GWVdez.js} +3 -3
- package/dist/component/{submit-button-rac-DFmPp4jT.js → submit-button-rac-qNaTyCxd.js} +1 -1
- package/dist/component/{tags-field-rac-DIgyn5P9.js → tags-field-rac-NMRn0YnW.js} +5 -5
- package/dist/component/{tags-rac-C6R6RHl2.js → tags-rac-DGx4KxEn.js} +1 -1
- package/dist/component/{text-area-field-rac-opBEx_8s.js → text-area-field-rac-C7u0D4l3.js} +4 -4
- package/dist/component/{text-area-rac-D4iKhAqc.js → text-area-rac-Yo-RIyLm.js} +1 -1
- package/dist/component/{text-input-field-rac-Ckp8Ierz.js → text-input-field-rac-CvU-1clq.js} +2 -2
- package/dist/component/{text-input-headless-D-LXpqS3.js → text-input-headless-DLRwVmwf.js} +3 -3
- package/dist/component/{text-input-rac-ChxuJj-q.js → text-input-rac-CWh5xjZA.js} +1 -1
- package/dist/component/{time-input-rac-C5_rEy7W.js → time-input-rac-BZlso9qK.js} +4 -4
- package/dist/component/{url-input-field-rac-CBOnhquz.js → url-input-field-rac-Bax0TB4Q.js} +4 -4
- package/dist/component/{url-input-rac-BY-BVg6r.js → url-input-rac-Bw2nfybR.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-vKSagp3b.js +57 -0
- package/dist/component/{use-element-state-class-name--YLulmsU.js → use-element-state-class-name-C0zLrsDR.js} +1 -1
- package/dist/component/{use-service-options-base-BNLFmnHJ.js → use-service-options-base-Bkj6BSQL.js} +1 -1
- package/dist/component/{use-text-input-class-name-3Xp-hNDT.js → use-text-input-class-name-Biu89Ma7.js} +2 -2
- package/dist/form.d.ts +15 -7
- package/package.json +23 -22
- package/dist/component/date-input-field-rac-Da6j7OP2.js +0 -288
- package/dist/component/date-time-input-field-rac-5eHyKry0.js +0 -424
- package/dist/component/dropdown-field-headless-BXyP9KYi.js +0 -101
- package/dist/component/multiline-address-field-rac-CH1hCUTf.js +0 -1618
- package/dist/component/phone-input-field-rac-BGsvxtXz.js +0 -474
- package/dist/component/use-dropdown-option-class-name-C1iEE28P.js +0 -28
package/dist/component/{number-input-field-rac-B7U_08UK.js → number-input-field-rac-pAmxvk3A.js}
RENAMED
|
@@ -2,16 +2,16 @@ import { RicosViewer as P } from "@wix/ricos/viewer";
|
|
|
2
2
|
import i from "classnames";
|
|
3
3
|
import r, { useState as Q, useCallback as U, useEffect as $, useRef as j } from "react";
|
|
4
4
|
import { NumberField as z, Input as G } from "react-aria-components";
|
|
5
|
-
import { ak as _, ah as S, au as H, am as J } from "./form-
|
|
5
|
+
import { ak as _, ah as S, au as H, am as J } from "./form-DKKTSAj1.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as K, E as W } from "./field-error-headless-
|
|
8
|
-
import { L as X } from "./field-label-headless-
|
|
7
|
+
import { D as K, E as W } from "./field-error-headless-2nYJ2792.js";
|
|
8
|
+
import { L as X } from "./field-label-headless-D97ACnmc.js";
|
|
9
9
|
import { g as Y, c as Z } from "./numeric-input-utils-CuBMi4-a.js";
|
|
10
10
|
import { u as w } from "./use-invoke-callback-UH73A_J3.js";
|
|
11
11
|
import { E as ee } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { s as p } from "./field-rac.module-BUvPquav.js";
|
|
13
13
|
import { B as re, R as te, q as ae, i as ne } from "./form-element-classes-CLZXu-91.js";
|
|
14
|
-
import { u as se } from "./use-text-input-class-name-
|
|
14
|
+
import { u as se } from "./use-text-input-class-name-Biu89Ma7.js";
|
|
15
15
|
const e = ({ children: t }) => {
|
|
16
16
|
var F, R, L;
|
|
17
17
|
const { id: n, value: s, onChange: l, disabled: d, required: E, readOnly: o, onBlur: b, onFocus: f, FieldLayout: m, hasError: u, validation: a } = _(), { labelId: y } = S(), D = ((F = a == null ? void 0 : a.number) == null ? void 0 : F.multipleOf) || 1, A = (R = a == null ? void 0 : a.number) == null ? void 0 : R.maximum, g = (L = a == null ? void 0 : a.number) == null ? void 0 : L.minimum, h = O(s), [q, I] = Q(h), x = w(b), T = c(t, e.Label), V = c(t, e.Input), k = c(t, e.Description), B = c(t, e.Error), M = U((N) => {
|
|
@@ -1,16 +1,16 @@
|
|
|
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 { ak as E, ah as I, am as O, au as B } from "./form-
|
|
4
|
+
import { ak as E, ah as I, am as O, au as B } from "./form-DKKTSAj1.js";
|
|
5
5
|
import { TextField as A, Group as V, Input as v, Button as P } from "react-aria-components";
|
|
6
6
|
import { f as u, a as g } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as M, E as k } from "./field-error-headless-
|
|
8
|
-
import { L as q } from "./field-label-headless-
|
|
7
|
+
import { D as M, E as k } from "./field-error-headless-2nYJ2792.js";
|
|
8
|
+
import { L as q } from "./field-label-headless-D97ACnmc.js";
|
|
9
9
|
import { E as U } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { H as j } from "./custom-focus-class-_483Pkwp.js";
|
|
11
11
|
import { s as p } from "./field-rac.module-BUvPquav.js";
|
|
12
12
|
import { B as H, R as W, q as Z, i as G } from "./form-element-classes-CLZXu-91.js";
|
|
13
|
-
import { u as Q } from "./use-text-input-class-name-
|
|
13
|
+
import { u as Q } from "./use-text-input-class-name-Biu89Ma7.js";
|
|
14
14
|
const t = ({ children: o, className: r }) => {
|
|
15
15
|
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), h = u(o, t.Error);
|
|
16
16
|
return /* @__PURE__ */ e.createElement(_, {
|
|
@@ -2,17 +2,17 @@ import r, { useCallback as P, useRef as j } 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 { ak as N, ah as D, ac as T, au as W, am as X } from "./form-
|
|
5
|
+
import { ak as N, ah as D, ac as T, au as W, am as X } from "./form-DKKTSAj1.js";
|
|
6
6
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as Y, E as Z } from "./field-error-headless-
|
|
8
|
-
import { L as ee } from "./field-label-headless-
|
|
7
|
+
import { D as Y, E as Z } from "./field-error-headless-2nYJ2792.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-D97ACnmc.js";
|
|
9
9
|
import { f as L, g as re } from "./payment-field-utils-DobiK5Xh.js";
|
|
10
10
|
import { u as te } from "./use-synced-display-value-DcAxdn3M.js";
|
|
11
11
|
import { E as ne } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { H as ae } from "./custom-focus-class-_483Pkwp.js";
|
|
13
13
|
import { s as d } from "./field-rac.module-BUvPquav.js";
|
|
14
14
|
import { B as se, R as oe, q as le, i as ce } from "./form-element-classes-CLZXu-91.js";
|
|
15
|
-
import { u as ie } from "./use-text-input-class-name-
|
|
15
|
+
import { u as ie } from "./use-text-input-class-name-Biu89Ma7.js";
|
|
16
16
|
function ue(e, t) {
|
|
17
17
|
return {
|
|
18
18
|
productId: e.id,
|
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
import { RicosViewer as Oe } from "@wix/ricos/viewer";
|
|
2
|
+
import O from "classnames";
|
|
3
|
+
import t, { useMemo as x, useState as B, useRef as P, useEffect as U, useCallback as oe, createContext as le, useContext as H } from "react";
|
|
4
|
+
import { a3 as _e, au as v, ac as ue, at as Ne, ak as M, ah as ie, am as Se } from "./form-DKKTSAj1.js";
|
|
5
|
+
import { UNSAFE_PortalProvider as Le } from "react-aria";
|
|
6
|
+
import { Dialog as me, OverlayTriggerStateContext as Ie, ModalOverlay as Fe, Modal as Pe, SearchField as ve, Group as G, ListBoxItem as De, DialogTrigger as Re, Select as xe, Input as Ce, ListBox as Be, Autocomplete as Me } from "react-aria-components";
|
|
7
|
+
import { f as h, a as z } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { D as qe, E as Ae } from "./field-error-headless-2nYJ2792.js";
|
|
9
|
+
import { L as Te } from "./field-label-headless-D97ACnmc.js";
|
|
10
|
+
import { N as $e, S as je } from "./non-modal-popover-DtIMXHbe.js";
|
|
11
|
+
import { u as we } from "./use-invoke-callback-UH73A_J3.js";
|
|
12
|
+
import { a as Ue, u as ke } from "./use-dropdown-option-class-name-vKSagp3b.js";
|
|
13
|
+
import de, { AsYouType as Ve, isValidPhoneNumber as Ge, isSupportedCountry as ze } from "libphonenumber-js";
|
|
14
|
+
import "libphonenumber-js/metadata.min.json";
|
|
15
|
+
import { C as re } from "./calling-country-codes-PyWuOTmF.js";
|
|
16
|
+
import { C as He } from "./chevron-down-icon-CcpVm6B-.js";
|
|
17
|
+
import { E as Ye } from "./error-icon-hZxQ6DEy.js";
|
|
18
|
+
import { H as ae } from "./custom-focus-class-_483Pkwp.js";
|
|
19
|
+
import { s as b } from "./field-rac.module-BUvPquav.js";
|
|
20
|
+
import { B as Ke, R as We, m as Ze, z as Qe, D as Je, q as Xe, i as et } from "./form-element-classes-CLZXu-91.js";
|
|
21
|
+
import { u as tt } from "./use-text-input-class-name-Biu89Ma7.js";
|
|
22
|
+
function se(e) {
|
|
23
|
+
const n = e ? de(e) : void 0, r = n == null ? void 0 : n.country;
|
|
24
|
+
if (r)
|
|
25
|
+
return r;
|
|
26
|
+
const o = new Ve();
|
|
27
|
+
return e && o.input(e), o.getCountry();
|
|
28
|
+
}
|
|
29
|
+
function Y(e) {
|
|
30
|
+
var n;
|
|
31
|
+
return e && ((n = _e.getCountryByKey(e)) == null ? void 0 : n.dialCode);
|
|
32
|
+
}
|
|
33
|
+
function k(e) {
|
|
34
|
+
return e === null ? null : e.replace(/[^0-9+]/g, "") || e;
|
|
35
|
+
}
|
|
36
|
+
function ce(e, n) {
|
|
37
|
+
if (e && n)
|
|
38
|
+
try {
|
|
39
|
+
const r = de(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 nt() {
|
|
47
|
+
const { t: e } = v(), { language: n } = ue();
|
|
48
|
+
return x(() => Object.keys(re).reduce((o, a) => {
|
|
49
|
+
const l = re[a], s = Y(l), i = e(`locale-dataset.countries.${l.toUpperCase()}`);
|
|
50
|
+
return s && ze(a) && o.push({
|
|
51
|
+
countryName: i,
|
|
52
|
+
longCountryCode: l,
|
|
53
|
+
shortCountryCode: a,
|
|
54
|
+
callingCode: s
|
|
55
|
+
}), o;
|
|
56
|
+
}, []).sort((o, a) => o.countryName.localeCompare(a.countryName, n)), [
|
|
57
|
+
e,
|
|
58
|
+
n
|
|
59
|
+
]);
|
|
60
|
+
}
|
|
61
|
+
function ot(e, n) {
|
|
62
|
+
return e.filter((r) => n && n.length > 0 ? n.includes(r.shortCountryCode) : !0);
|
|
63
|
+
}
|
|
64
|
+
function rt(e, n) {
|
|
65
|
+
const { countryName: r, callingCode: o, shortCountryCode: a } = e;
|
|
66
|
+
return !!(V(r, n) || V(o, n) || V(a, n));
|
|
67
|
+
}
|
|
68
|
+
function V(e, n) {
|
|
69
|
+
return e.toLowerCase().includes(n.toLowerCase());
|
|
70
|
+
}
|
|
71
|
+
function at({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange: o }) {
|
|
72
|
+
const [a, l] = B(e || ""), s = P(k(e ?? null) ?? ""), [i, u] = B(n);
|
|
73
|
+
Ne(() => {
|
|
74
|
+
l(""), s.current = "", u(n), o("");
|
|
75
|
+
});
|
|
76
|
+
const m = x(() => se(a), [
|
|
77
|
+
a
|
|
78
|
+
]);
|
|
79
|
+
U(() => {
|
|
80
|
+
const d = e ?? "";
|
|
81
|
+
d !== s.current && (l(d), s.current = d);
|
|
82
|
+
}, [
|
|
83
|
+
e
|
|
84
|
+
]), U(() => {
|
|
85
|
+
n && !i && u(n);
|
|
86
|
+
}, [
|
|
87
|
+
n,
|
|
88
|
+
i
|
|
89
|
+
]), U(() => {
|
|
90
|
+
u(n ?? m);
|
|
91
|
+
}, [
|
|
92
|
+
m,
|
|
93
|
+
n
|
|
94
|
+
]);
|
|
95
|
+
const p = oe((d) => {
|
|
96
|
+
if (l(d), !d) {
|
|
97
|
+
s.current = "", o(null);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const E = se(d);
|
|
101
|
+
u((y) => {
|
|
102
|
+
const N = E || y || ((r == null ? void 0 : r.length) === 1 ? r[0] : void 0), S = k(ce(d, N));
|
|
103
|
+
return s.current = S ?? "", o(S), E || y;
|
|
104
|
+
});
|
|
105
|
+
}, [
|
|
106
|
+
r,
|
|
107
|
+
o
|
|
108
|
+
]), C = oe((d) => {
|
|
109
|
+
u(d), l((E) => {
|
|
110
|
+
const y = k(ce(E, d));
|
|
111
|
+
return s.current = y ?? "", o(y), E;
|
|
112
|
+
});
|
|
113
|
+
}, [
|
|
114
|
+
o
|
|
115
|
+
]);
|
|
116
|
+
return {
|
|
117
|
+
currentValue: a,
|
|
118
|
+
selectedCountryCode: i,
|
|
119
|
+
handlePhoneChange: p,
|
|
120
|
+
handleCountryCodeChange: C
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
const pe = /* @__PURE__ */ le(null), _ = () => {
|
|
124
|
+
const e = H(pe);
|
|
125
|
+
if (!e)
|
|
126
|
+
throw new Error("Phone input components must be used within PhoneInput component");
|
|
127
|
+
return e;
|
|
128
|
+
}, ye = /* @__PURE__ */ le(null), K = () => {
|
|
129
|
+
const e = H(ye);
|
|
130
|
+
if (!e)
|
|
131
|
+
throw new Error("Option sub-components must be used within Option component");
|
|
132
|
+
return e;
|
|
133
|
+
}, W = ({ longCountryCode: e, className: n }) => {
|
|
134
|
+
function r(l, s) {
|
|
135
|
+
const i = "https://static.parastorage.com/services/linguist-flags/1.1005.0/assets/flags/square/", m = `${l}${s === "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
|
+
}, c = ({ children: e }) => {
|
|
148
|
+
var D, F;
|
|
149
|
+
const { id: n, value: r, onChange: o, FieldLayout: a, defaultCountry: l, validation: s } = M(), [i, u] = B(null), m = (F = (D = s == null ? void 0 : s.string) == null ? void 0 : D.phoneOptions) == null ? void 0 : F.allowedCountryCodes, p = nt(), C = x(() => ot(p, m), [
|
|
150
|
+
p,
|
|
151
|
+
m
|
|
152
|
+
]), d = x(() => C.map((R) => R.shortCountryCode), [
|
|
153
|
+
C
|
|
154
|
+
]), { currentValue: E, selectedCountryCode: y, handlePhoneChange: N, handleCountryCodeChange: S } = at({
|
|
155
|
+
value: r,
|
|
156
|
+
defaultCountryCode: l,
|
|
157
|
+
allowedCountryCodes: d,
|
|
158
|
+
onChange: o
|
|
159
|
+
}), A = h(e, c.Label), T = h(e, c.Control), L = h(e, c.Description), $ = h(e, c.Error), I = {
|
|
160
|
+
currentValue: E,
|
|
161
|
+
selectedCountryCode: y,
|
|
162
|
+
handlePhoneChange: N,
|
|
163
|
+
handleCountryCodeChange: S,
|
|
164
|
+
countryCodes: d,
|
|
165
|
+
countries: C,
|
|
166
|
+
popoverContainer: i
|
|
167
|
+
};
|
|
168
|
+
return /* @__PURE__ */ t.createElement(pe.Provider, {
|
|
169
|
+
value: I
|
|
170
|
+
}, /* @__PURE__ */ t.createElement(a, {
|
|
171
|
+
fieldId: n,
|
|
172
|
+
renderLabel: () => A,
|
|
173
|
+
renderInput: () => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
174
|
+
ref: u,
|
|
175
|
+
style: {
|
|
176
|
+
display: "contents"
|
|
177
|
+
}
|
|
178
|
+
}), T),
|
|
179
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, $, L)
|
|
180
|
+
}));
|
|
181
|
+
}, Z = ({ children: e, className: n }) => {
|
|
182
|
+
const { inputId: r, labelId: o } = ie(), { hasError: a, disabled: l, readOnly: s } = M(), { t: i } = v(), { selectedCountryCode: u, countries: m } = _(), p = `${r}-country`, C = u ? m.find((N) => N.shortCountryCode === u) : void 0, d = C && Y(C.longCountryCode) || "", E = i("field.phone.country-code.aria-label"), y = C ? `${E}, ${C.countryName}, ${d}` : E;
|
|
183
|
+
return /* @__PURE__ */ t.createElement(je, {
|
|
184
|
+
isDisabled: l || s,
|
|
185
|
+
id: p,
|
|
186
|
+
"aria-label": y,
|
|
187
|
+
"aria-labelledby": o ? `${o} ${p}` : void 0,
|
|
188
|
+
className: n,
|
|
189
|
+
"data-invalid": a || void 0
|
|
190
|
+
}, e);
|
|
191
|
+
}, st = ({ className: e }) => {
|
|
192
|
+
const { selectedCountryCode: n, countries: r } = _(), o = r.find((a) => a.shortCountryCode === n);
|
|
193
|
+
return o ? /* @__PURE__ */ t.createElement(W, {
|
|
194
|
+
className: e,
|
|
195
|
+
longCountryCode: o.longCountryCode
|
|
196
|
+
}) : null;
|
|
197
|
+
}, ct = ({ children: e, className: n }) => {
|
|
198
|
+
const { selectedCountryCode: r, countries: o } = _();
|
|
199
|
+
return o.some((l) => l.shortCountryCode === r) ? null : /* @__PURE__ */ t.createElement("span", {
|
|
200
|
+
className: n
|
|
201
|
+
}, e);
|
|
202
|
+
};
|
|
203
|
+
Z.Flag = st;
|
|
204
|
+
Z.EmptyState = ct;
|
|
205
|
+
const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a, ...l }) => {
|
|
206
|
+
const { triggerRef: s, optionsRef: i, isForcedOpen: u } = l, { popoverContainer: m } = _(), p = h(e, g.Search), C = /* @__PURE__ */ t.createElement(Ee, {
|
|
207
|
+
isForcedOpen: u
|
|
208
|
+
}, e);
|
|
209
|
+
return /* @__PURE__ */ t.createElement(Le, {
|
|
210
|
+
getContainer: () => m
|
|
211
|
+
}, /* @__PURE__ */ t.createElement($e, {
|
|
212
|
+
ref: i,
|
|
213
|
+
triggerRef: s,
|
|
214
|
+
className: n,
|
|
215
|
+
placement: o,
|
|
216
|
+
offset: a,
|
|
217
|
+
containerPadding: 0
|
|
218
|
+
}, p && !u ? /* @__PURE__ */ t.createElement(me, {
|
|
219
|
+
"aria-label": r
|
|
220
|
+
}, C) : C));
|
|
221
|
+
}, lt = ({ children: e, className: n, overlayClassName: r, "aria-label": o, portalContainer: a = t.Fragment, ...l }) => {
|
|
222
|
+
const { optionsRef: s } = l, { selectedCountryCode: i, handleCountryCodeChange: u } = _(), m = H(Ie);
|
|
223
|
+
return /* @__PURE__ */ t.createElement(Fe, {
|
|
224
|
+
className: r,
|
|
225
|
+
isDismissable: !0
|
|
226
|
+
}, /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(Pe, {
|
|
227
|
+
ref: s,
|
|
228
|
+
className: n
|
|
229
|
+
}, /* @__PURE__ */ t.createElement(me, {
|
|
230
|
+
"aria-label": o
|
|
231
|
+
}, /* @__PURE__ */ t.createElement(Ee, {
|
|
232
|
+
listBoxProps: {
|
|
233
|
+
"aria-label": o,
|
|
234
|
+
selectionMode: "single",
|
|
235
|
+
selectedKeys: i ? [
|
|
236
|
+
i
|
|
237
|
+
] : [],
|
|
238
|
+
onAction: (p) => {
|
|
239
|
+
u(p), m == null || m.close();
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}, e)))));
|
|
243
|
+
}, Ee = ({ children: e, listBoxProps: n, isForcedOpen: r }) => {
|
|
244
|
+
const { countries: o } = _(), a = h(e, g.Option), l = h(e, g.Search), s = h(e, g.EmptyState), i = /* @__PURE__ */ t.createElement(Be, {
|
|
245
|
+
...n,
|
|
246
|
+
renderEmptyState: s ? () => s : void 0
|
|
247
|
+
}, o.map((u) => {
|
|
248
|
+
const m = Y(u.longCountryCode) || "";
|
|
249
|
+
return z(a, {
|
|
250
|
+
key: u.shortCountryCode,
|
|
251
|
+
countryCode: u.shortCountryCode,
|
|
252
|
+
dialingCode: m,
|
|
253
|
+
countryName: u.countryName,
|
|
254
|
+
longCountryCode: u.longCountryCode
|
|
255
|
+
});
|
|
256
|
+
}));
|
|
257
|
+
return l ? /* @__PURE__ */ t.createElement(Me, {
|
|
258
|
+
filter: (u, m, p) => {
|
|
259
|
+
const C = o.find((d) => d.shortCountryCode === p.key);
|
|
260
|
+
return !!C && rt(C, m);
|
|
261
|
+
}
|
|
262
|
+
}, r ? z(l, {
|
|
263
|
+
autoFocus: !1
|
|
264
|
+
}) : l, i) : i;
|
|
265
|
+
};
|
|
266
|
+
g.Popover = g;
|
|
267
|
+
g.Modal = lt;
|
|
268
|
+
const fe = ({ className: e, children: n, "aria-label": r, ...o }) => {
|
|
269
|
+
const { autoFocus: a = !0 } = o;
|
|
270
|
+
return /* @__PURE__ */ t.createElement(ve, {
|
|
271
|
+
"aria-label": r,
|
|
272
|
+
autoFocus: a
|
|
273
|
+
}, /* @__PURE__ */ t.createElement(G, {
|
|
274
|
+
className: e
|
|
275
|
+
}, n));
|
|
276
|
+
}, ut = ({ className: e, placeholder: n }) => /* @__PURE__ */ t.createElement(Ce, {
|
|
277
|
+
className: e,
|
|
278
|
+
placeholder: n
|
|
279
|
+
});
|
|
280
|
+
fe.Input = ut;
|
|
281
|
+
g.Search = fe;
|
|
282
|
+
const it = ({ children: e, className: n }) => /* @__PURE__ */ t.createElement("div", {
|
|
283
|
+
className: n
|
|
284
|
+
}, e);
|
|
285
|
+
g.EmptyState = it;
|
|
286
|
+
const q = ({ children: e, className: n, ...r }) => {
|
|
287
|
+
const { countryCode: o, dialingCode: a, countryName: l, longCountryCode: s } = r, i = {
|
|
288
|
+
countryCode: o,
|
|
289
|
+
dialingCode: a,
|
|
290
|
+
countryName: l,
|
|
291
|
+
longCountryCode: s
|
|
292
|
+
}, u = e || /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(he, null), /* @__PURE__ */ t.createElement(ge, null), /* @__PURE__ */ t.createElement(be, null));
|
|
293
|
+
return /* @__PURE__ */ t.createElement(De, {
|
|
294
|
+
className: n,
|
|
295
|
+
id: o,
|
|
296
|
+
textValue: `${l} ${a}`
|
|
297
|
+
}, /* @__PURE__ */ t.createElement(ye.Provider, {
|
|
298
|
+
value: i
|
|
299
|
+
}, u));
|
|
300
|
+
}, he = ({ className: e }) => {
|
|
301
|
+
const { longCountryCode: n } = K();
|
|
302
|
+
return /* @__PURE__ */ t.createElement(W, {
|
|
303
|
+
className: e,
|
|
304
|
+
longCountryCode: n
|
|
305
|
+
});
|
|
306
|
+
}, ge = ({ className: e }) => {
|
|
307
|
+
const { countryName: n } = K();
|
|
308
|
+
return /* @__PURE__ */ t.createElement("span", {
|
|
309
|
+
className: e
|
|
310
|
+
}, n);
|
|
311
|
+
}, be = ({ className: e }) => {
|
|
312
|
+
const { dialingCode: n } = K();
|
|
313
|
+
return /* @__PURE__ */ t.createElement("span", {
|
|
314
|
+
className: e
|
|
315
|
+
}, n);
|
|
316
|
+
};
|
|
317
|
+
q.Flag = he;
|
|
318
|
+
q.Name = ge;
|
|
319
|
+
q.Code = be;
|
|
320
|
+
g.Option = q;
|
|
321
|
+
const mt = ({ className: e }) => {
|
|
322
|
+
const { t: n } = v(), { inputId: r, ariaDescribedBy: o } = ie(), { id: a, placeholder: l, disabled: s, readOnly: i, required: u, label: m, hasError: p } = M(), { currentValue: C, handlePhoneChange: d } = _(), E = P(null);
|
|
323
|
+
return Se(() => {
|
|
324
|
+
var y;
|
|
325
|
+
(y = E.current) == null || y.focus({
|
|
326
|
+
preventScroll: !0
|
|
327
|
+
});
|
|
328
|
+
}, a), /* @__PURE__ */ t.createElement(Ce, {
|
|
329
|
+
ref: E,
|
|
330
|
+
id: r,
|
|
331
|
+
type: "tel",
|
|
332
|
+
value: C,
|
|
333
|
+
onChange: (y) => d(y.target.value),
|
|
334
|
+
disabled: s,
|
|
335
|
+
readOnly: i,
|
|
336
|
+
required: u,
|
|
337
|
+
"aria-label": `${m}. ${n("field.phone.aria-label")}`,
|
|
338
|
+
"aria-describedby": o,
|
|
339
|
+
"aria-invalid": p,
|
|
340
|
+
placeholder: l,
|
|
341
|
+
className: e
|
|
342
|
+
});
|
|
343
|
+
}, Ct = ({ children: e, className: n }) => {
|
|
344
|
+
const r = P(null), o = P(null), a = P(!1), { id: l, disabled: s, readOnly: i, required: u, hasError: m, showFlag: p, onFocus: C, onBlur: d } = M(), [E, y] = B(!1), N = we(d), { t: S } = v(), { selectedCountryCode: A, handleCountryCodeChange: T, countries: L } = _(), $ = h(e, c.CountryButton), I = h(e, c.CountryOptions.Modal), D = I ?? h(e, c.CountryOptions.Popover), F = h(e, c.PhoneNumber), R = L.length > 1, j = Ue(l) && !I && R, Q = typeof n == "function" ? n({
|
|
345
|
+
hasCountryOptions: R
|
|
346
|
+
}) : n, J = {
|
|
347
|
+
onFocus: () => {
|
|
348
|
+
a.current || (a.current = !0, C == null || C());
|
|
349
|
+
},
|
|
350
|
+
onBlur: (w) => {
|
|
351
|
+
var te, ne;
|
|
352
|
+
const ee = w.relatedTarget;
|
|
353
|
+
!((te = r.current) != null && te.contains(ee)) && !((ne = o.current) != null && ne.contains(ee)) && (a.current = !1, N());
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
if (L.length === 1)
|
|
357
|
+
return /* @__PURE__ */ t.createElement(G, {
|
|
358
|
+
ref: r,
|
|
359
|
+
className: Q,
|
|
360
|
+
isDisabled: s,
|
|
361
|
+
isInvalid: m,
|
|
362
|
+
...J
|
|
363
|
+
}, p && /* @__PURE__ */ t.createElement(W, {
|
|
364
|
+
longCountryCode: L[0].longCountryCode
|
|
365
|
+
}), F);
|
|
366
|
+
const X = /* @__PURE__ */ t.createElement(t.Fragment, null, $, z(D, {
|
|
367
|
+
triggerRef: r,
|
|
368
|
+
optionsRef: o,
|
|
369
|
+
isForcedOpen: j
|
|
370
|
+
}));
|
|
371
|
+
return /* @__PURE__ */ t.createElement(G, {
|
|
372
|
+
ref: r,
|
|
373
|
+
className: Q,
|
|
374
|
+
isDisabled: s,
|
|
375
|
+
isInvalid: m,
|
|
376
|
+
...J
|
|
377
|
+
}, I ? /* @__PURE__ */ t.createElement(Re, null, X) : /* @__PURE__ */ t.createElement(xe, {
|
|
378
|
+
"aria-label": S("field.phone.country-code.aria-label"),
|
|
379
|
+
value: A ?? null,
|
|
380
|
+
onChange: (w) => T(w),
|
|
381
|
+
isDisabled: s || i,
|
|
382
|
+
isInvalid: m,
|
|
383
|
+
isRequired: u,
|
|
384
|
+
placeholder: "",
|
|
385
|
+
isOpen: j || E && !s && !i,
|
|
386
|
+
onOpenChange: j ? void 0 : y
|
|
387
|
+
}, X), F);
|
|
388
|
+
};
|
|
389
|
+
c.Label = Te;
|
|
390
|
+
c.Control = Ct;
|
|
391
|
+
c.CountryButton = Z;
|
|
392
|
+
c.CountryOptions = g;
|
|
393
|
+
c.PhoneNumber = mt;
|
|
394
|
+
c.Description = qe;
|
|
395
|
+
c.Error = Ae;
|
|
396
|
+
const dt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
397
|
+
width: 24,
|
|
398
|
+
height: 24,
|
|
399
|
+
viewBox: "0 0 24 24",
|
|
400
|
+
fill: "currentColor",
|
|
401
|
+
"aria-hidden": "true",
|
|
402
|
+
...e
|
|
403
|
+
}, /* @__PURE__ */ t.createElement("path", {
|
|
404
|
+
fillRule: "evenodd",
|
|
405
|
+
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"
|
|
406
|
+
})), pt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
407
|
+
width: 24,
|
|
408
|
+
height: 24,
|
|
409
|
+
viewBox: "0 0 24 24",
|
|
410
|
+
fill: "currentColor",
|
|
411
|
+
"aria-hidden": "true",
|
|
412
|
+
...e
|
|
413
|
+
}, /* @__PURE__ */ t.createElement("path", {
|
|
414
|
+
fillRule: "evenodd",
|
|
415
|
+
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"
|
|
416
|
+
})), yt = "_control_124jq_1", Et = "_countryButton_124jq_9", ft = "_chevron_124jq_25", ht = "_globeIcon_124jq_34", gt = "_searchIcon_124jq_35", bt = "_flag_124jq_44", Ot = "_phoneNumber_124jq_59", _t = "_countryOptions_124jq_85", Nt = "_option_124jq_93", St = "_countrySearch_124jq_102", Lt = "_mobileDrawer_124jq_110", It = "_name_124jq_119", Ft = "_code_124jq_123", Pt = "_mobileOverlay_124jq_140", f = {
|
|
417
|
+
control: yt,
|
|
418
|
+
countryButton: Et,
|
|
419
|
+
chevron: ft,
|
|
420
|
+
globeIcon: ht,
|
|
421
|
+
searchIcon: gt,
|
|
422
|
+
flag: bt,
|
|
423
|
+
phoneNumber: Ot,
|
|
424
|
+
countryOptions: _t,
|
|
425
|
+
option: Nt,
|
|
426
|
+
countrySearch: St,
|
|
427
|
+
mobileDrawer: Lt,
|
|
428
|
+
name: It,
|
|
429
|
+
code: Ft,
|
|
430
|
+
mobileOverlay: Pt
|
|
431
|
+
}, vt = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(Oe, {
|
|
432
|
+
content: e,
|
|
433
|
+
locale: n
|
|
434
|
+
}), Dt = () => /* @__PURE__ */ t.createElement("span", {
|
|
435
|
+
className: f.chevron,
|
|
436
|
+
"aria-hidden": "true"
|
|
437
|
+
}, /* @__PURE__ */ t.createElement(He, null)), Jt = () => {
|
|
438
|
+
const e = ke(b.selectOptionWithoutFocusRing, f.option, ae), n = tt(f.countrySearch), { t: r } = v(), { isMobile: o, PortalContainer: a } = ue(), l = /* @__PURE__ */ t.createElement(c.CountryOptions.Search, {
|
|
439
|
+
className: n,
|
|
440
|
+
"aria-label": r("field.phone.country-search-input.aria-label")
|
|
441
|
+
}, /* @__PURE__ */ t.createElement(pt, {
|
|
442
|
+
className: f.searchIcon
|
|
443
|
+
}), /* @__PURE__ */ t.createElement(c.CountryOptions.Search.Input, {
|
|
444
|
+
className: O(b.innerInput, ae),
|
|
445
|
+
placeholder: r("field.phone.country-search-input.placeholder")
|
|
446
|
+
})), s = /* @__PURE__ */ t.createElement(c.CountryOptions.EmptyState, null, r("field.phone.country-selector-dropdown.no-result")), i = /* @__PURE__ */ t.createElement(c.CountryOptions.Option, {
|
|
447
|
+
className: e
|
|
448
|
+
}, /* @__PURE__ */ t.createElement(c.CountryOptions.Option.Flag, {
|
|
449
|
+
className: f.flag
|
|
450
|
+
}), /* @__PURE__ */ t.createElement(c.CountryOptions.Option.Name, {
|
|
451
|
+
className: f.name
|
|
452
|
+
}), /* @__PURE__ */ t.createElement(c.CountryOptions.Option.Code, {
|
|
453
|
+
className: f.code
|
|
454
|
+
}));
|
|
455
|
+
return /* @__PURE__ */ t.createElement(c, null, /* @__PURE__ */ t.createElement(c.Label, {
|
|
456
|
+
className: O(Ke, b.label)
|
|
457
|
+
}, /* @__PURE__ */ t.createElement(c.Label.Required, {
|
|
458
|
+
className: O(We, b.requiredMark)
|
|
459
|
+
})), /* @__PURE__ */ t.createElement(c.Control, {
|
|
460
|
+
className: ({ hasCountryOptions: u }) => O(u ? Ze : Qe, b.input, f.control)
|
|
461
|
+
}, /* @__PURE__ */ t.createElement(c.CountryButton, {
|
|
462
|
+
className: f.countryButton
|
|
463
|
+
}, /* @__PURE__ */ t.createElement(c.CountryButton.Flag, {
|
|
464
|
+
className: f.flag
|
|
465
|
+
}), /* @__PURE__ */ t.createElement(c.CountryButton.EmptyState, null, /* @__PURE__ */ t.createElement(dt, {
|
|
466
|
+
className: f.globeIcon
|
|
467
|
+
})), /* @__PURE__ */ t.createElement(Dt, null)), /* @__PURE__ */ t.createElement(c.PhoneNumber, {
|
|
468
|
+
className: O(b.innerInput, f.phoneNumber)
|
|
469
|
+
}), o ? /* @__PURE__ */ t.createElement(c.CountryOptions.Modal, {
|
|
470
|
+
className: O(b.selectPopover, f.mobileDrawer),
|
|
471
|
+
overlayClassName: f.mobileOverlay,
|
|
472
|
+
portalContainer: a,
|
|
473
|
+
"aria-label": r("field.phone.country-code.aria-label")
|
|
474
|
+
}, l, s, i) : /* @__PURE__ */ t.createElement(c.CountryOptions.Popover, {
|
|
475
|
+
className: O(Je, b.selectPopover, f.countryOptions),
|
|
476
|
+
placement: "bottom start",
|
|
477
|
+
offset: 0,
|
|
478
|
+
"aria-label": r("field.phone.country-code.aria-label")
|
|
479
|
+
}, l, s, i)), /* @__PURE__ */ t.createElement(c.Error, {
|
|
480
|
+
className: O(Xe, b.error)
|
|
481
|
+
}, /* @__PURE__ */ t.createElement(Ye, null), /* @__PURE__ */ t.createElement(c.Error.Text, null)), /* @__PURE__ */ t.createElement(c.Description, {
|
|
482
|
+
className: O(et, b.description)
|
|
483
|
+
}, vt));
|
|
484
|
+
};
|
|
485
|
+
export {
|
|
486
|
+
Jt as P
|
|
487
|
+
};
|
|
@@ -2,11 +2,11 @@ import t, { useMemo as G, useCallback as x, useRef as B } from "react";
|
|
|
2
2
|
import { RicosViewer as K } from "@wix/ricos/viewer";
|
|
3
3
|
import _ from "classnames";
|
|
4
4
|
import { CheckboxField as $, CheckboxButton as X, NumberField as j, Group as J, Button as U, Input as W } from "react-aria-components";
|
|
5
|
-
import { ak as k, ah as Y, ac as w, au as Z, am as ee } from "./form-
|
|
5
|
+
import { ak as k, ah as Y, ac as w, au as Z, am as ee } from "./form-DKKTSAj1.js";
|
|
6
6
|
import { f as O, a as I } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { L as te, g as ne } from "./field-label-headless-
|
|
7
|
+
import { L as te, g as ne } from "./field-label-headless-D97ACnmc.js";
|
|
8
8
|
import { f as ae } from "./format-currency-BwShJ9vM.js";
|
|
9
|
-
import { D as oe, E as re } from "./field-error-headless-
|
|
9
|
+
import { D as oe, E as re } from "./field-error-headless-2nYJ2792.js";
|
|
10
10
|
import { F as le } from "./fieldset-headless-CD3fds9J.js";
|
|
11
11
|
import { g as se } from "./payment-field-utils-DobiK5Xh.js";
|
|
12
12
|
import { S as ie } from "./selection-indicator-XQ8MYHUQ.js";
|
|
@@ -15,7 +15,7 @@ import { C as ue } from "./checkbox-indicator-module-classes-mJ7hl_8K.js";
|
|
|
15
15
|
import { s as T } from "./field-rac.module-BUvPquav.js";
|
|
16
16
|
import { B as me, R as pe, E as de, I as Ee, H as ye, z as fe, q as _e, i as Ie, G as Oe } from "./form-element-classes-CLZXu-91.js";
|
|
17
17
|
import { o as Q } from "./options-rac.module-KM-VT_KY.js";
|
|
18
|
-
import { u as be } from "./use-element-state-class-name
|
|
18
|
+
import { u as be } from "./use-element-state-class-name-C0zLrsDR.js";
|
|
19
19
|
var Le = /* @__PURE__ */ (function(e) {
|
|
20
20
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
21
21
|
})({}), M = /* @__PURE__ */ (function(e) {
|
package/dist/component/{quiz-radio-group-rac-CRa3I_NR.js → quiz-radio-group-rac-Bj5XfqNf.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "react";
|
|
2
|
-
import { R } from "./radio-group-field-rac-
|
|
2
|
+
import { R } from "./radio-group-field-rac-C8OElNAQ.js";
|
|
3
3
|
import { L as o, K as r, J as O } from "./form-element-classes-CLZXu-91.js";
|
|
4
4
|
const I = () => /* @__PURE__ */ _.createElement(R, {
|
|
5
5
|
classes: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import l, { useRef as S, useState as V, useEffect as B, useCallback as T } from "react";
|
|
2
2
|
import { RadioGroup as H, RadioField as k, RadioButton as M, TextField as U, Input as A } from "react-aria-components";
|
|
3
|
-
import { ak as v, ah as G, au as F, ac as P, am as $ } from "./form-
|
|
3
|
+
import { ak as v, ah as G, au as F, ac as P, am as $ } from "./form-DKKTSAj1.js";
|
|
4
4
|
import { f as p, a as y } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as q, E as x } from "./field-error-headless-
|
|
6
|
-
import { L as j } from "./field-label-headless-
|
|
5
|
+
import { D as q, E as x } from "./field-error-headless-2nYJ2792.js";
|
|
6
|
+
import { L as j } from "./field-label-headless-D97ACnmc.js";
|
|
7
7
|
import { N as w } from "./options-layout-constants-DEfIEJWD.js";
|
|
8
8
|
import { S as z } from "./selection-indicator-XQ8MYHUQ.js";
|
|
9
9
|
const L = "Other", J = (e, t) => e == null ? void 0 : e.find((o) => (o.value ?? o.label) === t), R = (e, t) => !!t && !J(e, t), K = (e, t) => {
|
package/dist/component/{radio-group-field-rac-BYTXrpnE.js → radio-group-field-rac-C8OElNAQ.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
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 c } from "./radio-button-module-classes-
|
|
4
|
+
import { a, s, R as c } from "./radio-button-module-classes-y_PtsZPP.js";
|
|
5
5
|
import { E as i } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as o } from "./field-rac.module-BUvPquav.js";
|
|
7
7
|
import { O as E, N as O, M as R, B as _, R as p, q as I, i as L } from "./form-element-classes-CLZXu-91.js";
|
|
8
|
-
import { u } from "./use-element-state-class-name
|
|
9
|
-
import { u as N } from "./use-text-input-class-name-
|
|
8
|
+
import { u } from "./use-element-state-class-name-C0zLrsDR.js";
|
|
9
|
+
import { u as N } from "./use-text-input-class-name-Biu89Ma7.js";
|
|
10
10
|
const D = ({ content: r, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
11
11
|
content: r,
|
|
12
12
|
locale: l
|