@wix/form-elements 1.193.0 → 1.194.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-7eD_yW7i.js → appointment-rac-BOlB-nhK.js} +4 -4
- package/dist/component/{bookings-address-rac-Bpt7DrEs.js → bookings-address-rac-CMSkssTG.js} +1 -1
- package/dist/component/{bookings-email-rac-BYgeQczn.js → bookings-email-rac-BV32ot0w.js} +1 -1
- package/dist/component/{bookings-first-name-rac-N7cvqHVh.js → bookings-first-name-rac-C9RwXivg.js} +1 -1
- package/dist/component/{bookings-header-rac-TCezj9Ur.js → bookings-header-rac-DDQvjR-4.js} +1 -1
- package/dist/component/{bookings-last-name-rac-t4O2yMDP.js → bookings-last-name-rac-DXuhrAI5.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CJSoMvyZ.js → bookings-login-bar-rac-DnKkBwS6.js} +1 -1
- package/dist/component/{bookings-phone-rac-D9DS7Vkl.js → bookings-phone-rac-Cu9TBbiw.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-9SxwdW6F.js → bookings-rich-text-rac-BCzyg13x.js} +1 -1
- package/dist/component/{checkbox-field-rac-BBccyPVf.js → checkbox-field-rac-Bv2WFAgt.js} +141 -141
- package/dist/component/{checkbox-group-field-headless-Dwnolboz.js → checkbox-group-field-headless-CU6Q8J3c.js} +79 -76
- package/dist/component/{checkbox-group-field-rac-BqcHS2rI.js → checkbox-group-field-rac-9AmcX9Y9.js} +4 -4
- package/dist/component/{checkbox-group-rac-D1eH4xRZ.js → checkbox-group-rac-BG2OEZiT.js} +1 -1
- package/dist/component/{checkbox-rac-D8KBjt2N.js → checkbox-rac-CeUFeQHr.js} +1 -1
- package/dist/component/{contacts-address-rac-Cl-McrL_.js → contacts-address-rac-V-D7xNOr.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-tD574IDc.js → contacts-birthdate-rac-BXUo5-QN.js} +1 -1
- package/dist/component/{contacts-company-rac-p09ntN6y.js → contacts-company-rac-BHDvioep.js} +1 -1
- package/dist/component/{contacts-email-rac-hFxe_vYm.js → contacts-email-rac-CHp2NL68.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CRQalepX.js → contacts-first-name-rac-BXPTCsGX.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BxWC_dQK.js → contacts-last-name-rac-uZTOHcsZ.js} +1 -1
- package/dist/component/{contacts-phone-rac-BoESpvX4.js → contacts-phone-rac-CRkQ-XTE.js} +1 -1
- package/dist/component/{contacts-position-rac-C-dEH79x.js → contacts-position-rac-CxVEsR18.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-Wevw2yIs.js → contacts-subscribe-rac-B-ZpI_vj.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-C_YoCoUk.js → contacts-tax-id-rac-BmNl9Uwc.js} +1 -1
- package/dist/component/{date-availability-zeRtXneN.js → date-availability-preR1uDm.js} +1 -1
- package/dist/component/{date-input-field-rac-wl1J79Lm.js → date-input-field-rac-BZWKkoQc.js} +6 -6
- package/dist/component/{date-input-rac-DZG0E4dR.js → date-input-rac-zc0FomDx.js} +1 -1
- package/dist/component/{date-picker-field-rac-BgVpHr0x.js → date-picker-field-rac-B0bkFPKW.js} +6 -6
- package/dist/component/{date-picker-rac-Cxncpp-S.js → date-picker-rac-C65qDHnd.js} +1 -1
- package/dist/component/{date-time-input-field-rac-BybKpDmr.js → date-time-input-field-rac-DQg7hTT_.js} +6 -6
- package/dist/component/{date-time-input-rac-BV45ahu6.js → date-time-input-rac-rM7o1P1a.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-CcnOnG3r.js → dext-checkbox-group-rac-LGvagnTA.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DZMbVP-v.js → dext-checkbox-rac-DzJrBfoG.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Ch7gU188.js → dext-date-picker-rac-Cg9jRzyp.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DUssq9pN.js → dext-date-time-input-rac-CNmUZ9Ui.js} +1 -1
- package/dist/component/{dext-dropdown-rac-MZNHRD4Y.js → dext-dropdown-rac-D4z-cBEl.js} +1 -1
- package/dist/component/{dext-email-rac-bzMikfP7.js → dext-email-rac-DaX9oxBu.js} +1 -1
- package/dist/component/{dext-number-input-rac-BDx2sZKk.js → dext-number-input-rac-CI3CwEyq.js} +1 -1
- package/dist/component/{dext-phone-rac-DBiQKWp5.js → dext-phone-rac-BmQkPsc6.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DQ0cJ_AF.js → dext-radio-group-rac-CcKxMXMf.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DB8BVtRj.js → dext-rating-input-rac-DnkSbHsG.js} +1 -1
- package/dist/component/{dext-tags-rac-BlwcMf4S.js → dext-tags-rac-Ct036T_Q.js} +2 -2
- package/dist/component/{dext-text-area-rac-RAxzXAFv.js → dext-text-area-rac-ChOJhY72.js} +1 -1
- package/dist/component/{dext-text-input-rac-bCmpx20f.js → dext-text-input-rac-DxKFoTBa.js} +1 -1
- package/dist/component/{dext-url-input-rac-CF9E7GBh.js → dext-url-input-rac-DB4mFEnJ.js} +1 -1
- package/dist/component/{donation-rac-CVWZE3yz.js → donation-rac-DQ-bH8mJ.js} +5 -5
- package/dist/component/{dropdown-field-rac-BnxTiejT.js → dropdown-field-rac-eJs-ORuZ.js} +3 -3
- package/dist/component/{dropdown-rac-BSj6tud_.js → dropdown-rac-ClU5tIv1.js} +1 -1
- package/dist/component/{ecom-address-rac-Dsht1oXo.js → ecom-address-rac-BeLuT2lt.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-NdMstAuc.js → ecom-subscription-checkbox-rac-DXdhucxN.js} +2 -2
- package/dist/component/{email-input-field-rac-BCxurSsa.js → email-input-field-rac-b7DnYb-Q.js} +3 -3
- package/dist/component/{events-repeater-rac-Dz59WhGX.js → events-repeater-rac-B8423fSN.js} +4 -4
- package/dist/component/{events-rsvp-rac-M4068R7R.js → events-rsvp-rac-lIJScRxo.js} +3 -3
- package/dist/component/{field-error-headless-DQ-jwMtX.js → field-error-headless-DA6AMthK.js} +1 -1
- package/dist/component/{field-label-headless-D0N5zbDh.js → field-label-headless-1OrR7YHQ.js} +1 -1
- package/dist/component/{file-upload-rac-Cy9ymgFI.js → file-upload-rac-Dxhfcc5F.js} +4 -4
- package/dist/component/{fixed-payment-rac-DHL9zRaN.js → fixed-payment-rac-C3weOBaO.js} +3 -3
- package/dist/component/{form-ur8Cb2nw.js → form-Btp89piS.js} +2907 -2885
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DmRHkStT.js → header-field-rac-BZlZ0uk2.js} +2 -2
- package/dist/component/{header-rac-BMxv-FJ_.js → header-rac-CzB6pQZo.js} +1 -1
- package/dist/component/{image-choice-rac-Bj54Ms5f.js → image-choice-rac-B8-lOxCL.js} +71 -68
- package/dist/component/{index-D1Nkz9Je.js → index-Cyutja6W.js} +4 -4
- package/dist/component/{index-DwxUwvfW.js → index-gp3tjYJR.js} +2 -2
- package/dist/component/{isObjectLike-CA05Trvx.js → isObjectLike-DVQDteBM.js} +1 -1
- package/dist/component/{multiline-address-field-rac-O10IwOCo.js → multiline-address-field-rac-Bk14yixn.js} +7 -7
- package/dist/component/{multiline-address-rac-BHsYqS8U.js → multiline-address-rac-BtbyfXx9.js} +1 -1
- package/dist/component/{number-input-field-rac-Dv6mIcWK.js → number-input-field-rac-BW_Kdtif.js} +4 -4
- package/dist/component/{number-input-rac-DB4aCeZ3.js → number-input-rac-CxV_r8xX.js} +1 -1
- package/dist/component/{password-rac-Bzyoy7Ue.js → password-rac-CdqVsV2r.js} +4 -4
- package/dist/component/{payment-input-rac-d3XhrKDL.js → payment-input-rac-BoXfBGcr.js} +4 -4
- package/dist/component/{phone-input-field-rac-B1fOUnoX.js → phone-input-field-rac-Cbqj1mRX.js} +6 -6
- package/dist/component/{phone-rac-CIourqo0.js → phone-rac-B5KOqC4s.js} +1 -1
- package/dist/component/{product-list-rac-2b6ZKst8.js → product-list-rac-eDk2c6Tj.js} +4 -4
- package/dist/component/{quiz-radio-group-rac-UzeDK6Fb.js → quiz-radio-group-rac-BO1HH4qV.js} +1 -1
- package/dist/component/{radio-button-module-classes-BQiTZl4N.js → radio-button-module-classes-B0aJa-nf.js} +48 -45
- package/dist/component/{radio-group-field-rac-DMly0YyR.js → radio-group-field-rac-CxkaF2XW.js} +4 -4
- package/dist/component/{radio-group-rac-DWnKmLpT.js → radio-group-rac-Zi_UbGPv.js} +1 -1
- package/dist/component/{rating-input-field-rac-B8b5CdR7.js → rating-input-field-rac-CC6Wg28j.js} +45 -43
- package/dist/component/{rating-input-rac-BqRJ0so2.js → rating-input-rac-DLuqhhor.js} +1 -1
- package/dist/component/{rich-content-rac.module-BgjdfUpM.js → rich-content-rac.module-CL7YjLhM.js} +1 -1
- package/dist/component/{rich-text-field-rac-Drh-o9ma.js → rich-text-field-rac-VJjUGfvh.js} +2 -2
- package/dist/component/{rich-text-rac-BhUjaWGI.js → rich-text-rac-DJLy7AzE.js} +1 -1
- package/dist/component/{service-dropdown-rac-Cj4BuLCe.js → service-dropdown-rac-BZAGh6sc.js} +4 -4
- package/dist/component/{services-multi-choice-rac-BWgmoaGp.js → services-multi-choice-rac-CMX1MLyY.js} +5 -5
- package/dist/component/{signature-rac-DEFLilBW.js → signature-rac-DCamCLQL.js} +4 -4
- package/dist/component/{submit-button-rac-_Lluhrls.js → submit-button-rac-B2oeA5CE.js} +2 -2
- package/dist/component/tags-field-rac-BVPowgp5.js +216 -0
- package/dist/component/{tags-rac-DsBzlrwA.js → tags-rac-D9BRw5rq.js} +1 -1
- package/dist/component/{text-area-field-rac-COU0UfH0.js → text-area-field-rac-Dw7ywVk3.js} +4 -4
- package/dist/component/{text-area-rac-DY2np20s.js → text-area-rac-CAG91hMP.js} +1 -1
- package/dist/component/{text-input-field-rac-Jl4gKN4D.js → text-input-field-rac-BQCwdi0a.js} +3 -3
- package/dist/component/{text-input-headless-DsIKhwwK.js → text-input-headless-ByTB_SoB.js} +3 -3
- package/dist/component/{text-input-rac-Dwoai7Y2.js → text-input-rac-DQMaPy6q.js} +1 -1
- package/dist/component/{time-input-rac-CeUzBpvQ.js → time-input-rac-DlaA4b2y.js} +4 -4
- package/dist/component/{url-input-field-rac-D5dK0qXo.js → url-input-field-rac-BO7WSxf-.js} +4 -4
- package/dist/component/{url-input-rac-DGC2_VVy.js → url-input-rac-BWRXlB6g.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-DCf8o4bn.js → use-dropdown-option-class-name-CofwyYPw.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-VcbNtj9H.js → use-dropdown-trigger-class-name-BQq79FWu.js} +6 -6
- package/dist/component/{use-element-state-class-name-Dc9b8x0t.js → use-element-state-class-name-DV-k6djy.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-BNb7P_5E.js → use-hoverable-input-class-name-CwCi7XA4.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-BlG9NkCS.js → use-is-forced-open-dropdown-DEAhUhvR.js} +1 -1
- package/dist/component/{use-service-options-base-DB4bYGFa.js → use-service-options-base-BUY3SFfK.js} +1 -1
- package/dist/component/use-text-input-class-name-DusXY0Ou.js +6 -0
- package/package.json +3 -3
- package/dist/component/tags-field-rac-C7nXKUBj.js +0 -213
- package/dist/component/use-text-input-class-name-BxX9CE3F.js +0 -6
|
@@ -2,8 +2,8 @@ import d, { useContext as _, useRef as L, useState as m, Children as N, useLayou
|
|
|
2
2
|
import { CollectionRendererContext as g, DefaultCollectionRenderer as E, ListBox as M } from "react-aria-components";
|
|
3
3
|
import P from "classnames";
|
|
4
4
|
import { s as h } from "./field-rac.module-DcyJyi2B.js";
|
|
5
|
-
import { K as T } from "./form-
|
|
6
|
-
import { u as H } from "./use-element-state-class-name-
|
|
5
|
+
import { K as T } from "./form-Btp89piS.js";
|
|
6
|
+
import { u as H } from "./use-element-state-class-name-DV-k6djy.js";
|
|
7
7
|
const R = 1 / 0, I = {
|
|
8
8
|
position: "absolute",
|
|
9
9
|
width: 0,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import e, { useState as F, useCallback as v, useRef as H } from "react";
|
|
2
2
|
import { UNSAFE_PortalProvider as $ } from "react-aria";
|
|
3
3
|
import { VisuallyHidden as k, Select as G, SelectValue as J, ListBoxItem as U } from "react-aria-components";
|
|
4
|
-
import { bM as b, bJ as D, bX as W, bO as X, L as Y } from "./form-
|
|
4
|
+
import { bM as b, bJ as D, bX as W, bO as X, L as Y } from "./form-Btp89piS.js";
|
|
5
5
|
import { f as d, a as L } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { D as j, E as z } from "./field-error-headless-
|
|
7
|
-
import { L as K } from "./field-label-headless-
|
|
6
|
+
import { D as j, E as z } from "./field-error-headless-DA6AMthK.js";
|
|
7
|
+
import { L as K } from "./field-label-headless-1OrR7YHQ.js";
|
|
8
8
|
import { E as Q, S as Z, N as ee } from "./non-modal-popover-D-u13tmp.js";
|
|
9
|
-
import { b as te } from "./use-is-forced-open-dropdown-
|
|
10
|
-
import { V as ne } from "./use-dropdown-option-class-name-
|
|
11
|
-
import { u as re } from "./use-hoverable-input-class-name-
|
|
9
|
+
import { b as te } from "./use-is-forced-open-dropdown-DEAhUhvR.js";
|
|
10
|
+
import { V as ne } from "./use-dropdown-option-class-name-CofwyYPw.js";
|
|
11
|
+
import { u as re } from "./use-hoverable-input-class-name-CwCi7XA4.js";
|
|
12
12
|
const r = ({ children: t }) => {
|
|
13
13
|
const { id: l, value: a, defaultValue: s, options: u = [], readOnly: o, onChange: n, placeholder: m, disabled: i, required: p, onBlur: C, onFocus: I, FieldLayout: y, hasError: T } = b(), [N, P] = F(!1), E = te(l), [R, h] = F(null), S = a && u.some((c) => (c.value ?? c.label) === a) ? a : s || null, { labelId: f } = D(), { t: V } = W(), O = `${f}-required`, B = v((c) => {
|
|
14
14
|
o || n(typeof c == "string" ? c : null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import i from "classnames";
|
|
2
|
-
import { bF as s, bc as v } from "./form-
|
|
2
|
+
import { bF as s, bc as v } from "./form-Btp89piS.js";
|
|
3
3
|
const x = ({ globalClasses: e, moduleClasses: r }) => {
|
|
4
4
|
var d;
|
|
5
5
|
const c = ((d = s(...v(e))) == null ? void 0 : d.split(/\s+/)) ?? [], o = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { bM as n } from "./form-
|
|
1
|
+
import { bM as n } from "./form-Btp89piS.js";
|
|
2
2
|
import { s as e } from "./field-rac.module-DcyJyi2B.js";
|
|
3
|
-
import { u } from "./use-element-state-class-name-
|
|
3
|
+
import { u } from "./use-element-state-class-name-DV-k6djy.js";
|
|
4
4
|
const b = (s, a) => {
|
|
5
5
|
const { disabled: t, readOnly: o } = n(), r = u({
|
|
6
6
|
globalClasses: s,
|
package/dist/component/{use-service-options-base-DB4bYGFa.js → use-service-options-base-BUY3SFfK.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState as o, useCallback as y, useEffect as m, useMemo as D } from "react";
|
|
2
|
-
import { bL as v } from "./form-
|
|
2
|
+
import { bL as v } from "./form-Btp89piS.js";
|
|
3
3
|
const k = (L) => {
|
|
4
4
|
const { fieldType: I, isEditor: t = !1, postProcessOptions: i, customFetchLogic: a, onInitialDataLoaded: n } = L, [O, h] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(I), r = y((e) => {
|
|
5
5
|
let d = e.map((l) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/form-elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.194.0",
|
|
4
4
|
"description": "The Wix Forms rendering element for Builder apps, loaded at runtime as @wix/form-elements/Form",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@wix/services-definitions": "^1.0.5",
|
|
59
59
|
"@wix/site-service-captcha": "^1.0.1",
|
|
60
60
|
"@wix/site-service-editor-context": "^1.0.7",
|
|
61
|
-
"@wix/site-service-lightbox": "^1.0
|
|
61
|
+
"@wix/site-service-lightbox": "^2.1.0",
|
|
62
62
|
"@wix/site-service-locale": "^1.0.10",
|
|
63
63
|
"@wix/site-service-pages": "^1.10.0",
|
|
64
64
|
"@wix/site-service-renderer-configuration": "^1.0.11",
|
|
@@ -158,5 +158,5 @@
|
|
|
158
158
|
]
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
|
-
"falconPackageHash": "
|
|
161
|
+
"falconPackageHash": "68e3ff3f36cb98fde4e5280236e4056f6d6a1125c537bc942f9fe548"
|
|
162
162
|
}
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as J } from "@wix/ricos/viewer";
|
|
2
|
-
import F from "classnames";
|
|
3
|
-
import t, { useMemo as I, useState as Q, useRef as x, useLayoutEffect as w, useCallback as N } from "react";
|
|
4
|
-
import { CheckboxGroup as z, TextField as B, Input as K, CheckboxField as Y, CheckboxButton as Z } from "react-aria-components";
|
|
5
|
-
import { bM as D, bJ as M, bX as S, bO as U, X as ee, am as te, ax as oe, M as ne, I as ae, ay as se } from "./form-ur8Cb2nw.js";
|
|
6
|
-
import { f as O, a as k } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { E as W, D as H } from "./field-error-headless-DQ-jwMtX.js";
|
|
8
|
-
import { L as $ } from "./field-label-headless-D0N5zbDh.js";
|
|
9
|
-
import { F as re } from "./fieldset-headless-CD3fds9J.js";
|
|
10
|
-
import { E as le } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
-
import { s as y } from "./field-rac.module-DcyJyi2B.js";
|
|
12
|
-
import { u as ie } from "./use-element-state-class-name-Dc9b8x0t.js";
|
|
13
|
-
import { u as ce } from "./use-text-input-class-name-BxX9CE3F.js";
|
|
14
|
-
var ue = /* @__PURE__ */ (function(e) {
|
|
15
|
-
return e[e.FREE_FLOW = 0] = "FREE_FLOW", e[e.ONE = 1] = "ONE", e[e.TWO = 2] = "TWO", e[e.THREE = 3] = "THREE", e;
|
|
16
|
-
})({});
|
|
17
|
-
const v = "Other", de = (e, o) => {
|
|
18
|
-
const i = o.length + 2;
|
|
19
|
-
return (e.find((l) => l.startsWith(`${o}: `)) || "").slice(i);
|
|
20
|
-
}, me = (e) => e.map((o) => o.value ?? o.label), P = ({ className: e, ...o }) => {
|
|
21
|
-
const { label: s } = o;
|
|
22
|
-
return /* @__PURE__ */ t.createElement("span", {
|
|
23
|
-
className: e
|
|
24
|
-
}, s);
|
|
25
|
-
}, j = ({ className: e }) => {
|
|
26
|
-
const { value: o, onChange: s, addOtherLabel: i, addOtherPlaceholder: r, otherInputCharacterLimit: l, disabled: u, readOnly: m, hasError: d } = D(), { t: p } = S(), n = i || p("add-other.default-other-option-label") || v, b = I(() => de(o || [], n), [
|
|
27
|
-
o,
|
|
28
|
-
n
|
|
29
|
-
]), [c, L] = Q(b), f = x(s);
|
|
30
|
-
w(() => {
|
|
31
|
-
f.current = s;
|
|
32
|
-
});
|
|
33
|
-
const g = N((h) => {
|
|
34
|
-
L(h);
|
|
35
|
-
const C = (o || []).filter((E) => !E.startsWith(`${n}:`) && E !== n), _ = h ? `${n}: ${h}` : n;
|
|
36
|
-
f.current([
|
|
37
|
-
...C,
|
|
38
|
-
_
|
|
39
|
-
]);
|
|
40
|
-
}, [
|
|
41
|
-
o,
|
|
42
|
-
n
|
|
43
|
-
]);
|
|
44
|
-
return /* @__PURE__ */ t.createElement(B, {
|
|
45
|
-
value: c,
|
|
46
|
-
onChange: g,
|
|
47
|
-
isDisabled: u,
|
|
48
|
-
isReadOnly: m,
|
|
49
|
-
isInvalid: d,
|
|
50
|
-
"aria-label": n
|
|
51
|
-
}, /* @__PURE__ */ t.createElement(K, {
|
|
52
|
-
"data-hook": "tags-other-input",
|
|
53
|
-
"data-filled": c ? !0 : void 0,
|
|
54
|
-
placeholder: r,
|
|
55
|
-
maxLength: l,
|
|
56
|
-
className: e
|
|
57
|
-
}));
|
|
58
|
-
}, T = ({ children: e, className: o, ...s }) => {
|
|
59
|
-
const { value: i, label: r, isOther: l, isFirstOption: u } = s, { id: m, value: d, onChange: p, options: n, disabled: b, readOnly: c, hasError: L } = D(), f = x(null);
|
|
60
|
-
U(() => {
|
|
61
|
-
var E;
|
|
62
|
-
u && ((E = f.current) == null || E.focus({
|
|
63
|
-
preventScroll: !0
|
|
64
|
-
}));
|
|
65
|
-
}, m);
|
|
66
|
-
const g = O(e, P), h = I(() => d || [], [
|
|
67
|
-
d
|
|
68
|
-
]), C = I(() => l ? h.find((E) => E === r || E.startsWith(`${r}: `)) || r : i, [
|
|
69
|
-
l,
|
|
70
|
-
h,
|
|
71
|
-
r,
|
|
72
|
-
i
|
|
73
|
-
]), _ = N((E) => {
|
|
74
|
-
const G = me(n || []), A = h.filter((X) => G.includes(X));
|
|
75
|
-
p(E ? [
|
|
76
|
-
...A,
|
|
77
|
-
r
|
|
78
|
-
] : A);
|
|
79
|
-
}, [
|
|
80
|
-
r,
|
|
81
|
-
p,
|
|
82
|
-
n,
|
|
83
|
-
h
|
|
84
|
-
]);
|
|
85
|
-
return /* @__PURE__ */ t.createElement(Y, {
|
|
86
|
-
inputRef: f,
|
|
87
|
-
value: C,
|
|
88
|
-
onChange: l ? _ : void 0,
|
|
89
|
-
isDisabled: b,
|
|
90
|
-
isReadOnly: c,
|
|
91
|
-
isInvalid: L
|
|
92
|
-
}, /* @__PURE__ */ t.createElement(Z, {
|
|
93
|
-
className: o,
|
|
94
|
-
"data-hook": `tags-${l ? v : i}`
|
|
95
|
-
}, k(g, {
|
|
96
|
-
value: i,
|
|
97
|
-
label: r,
|
|
98
|
-
isOther: l,
|
|
99
|
-
isFirstOption: u
|
|
100
|
-
})));
|
|
101
|
-
}, V = ({ children: e, className: o }) => {
|
|
102
|
-
const { options: s, addOther: i, addOtherLabel: r, numberOfColumns: l = ue.FREE_FLOW } = D(), { t: u } = S(), m = r || u("add-other.default-other-option-label") || v, d = O(e, T), p = I(() => {
|
|
103
|
-
const n = s || [];
|
|
104
|
-
return i ? [
|
|
105
|
-
...n,
|
|
106
|
-
{
|
|
107
|
-
label: m,
|
|
108
|
-
value: m,
|
|
109
|
-
isOther: !0
|
|
110
|
-
}
|
|
111
|
-
] : n;
|
|
112
|
-
}, [
|
|
113
|
-
s,
|
|
114
|
-
i,
|
|
115
|
-
m
|
|
116
|
-
]);
|
|
117
|
-
return p.length === 0 ? null : /* @__PURE__ */ t.createElement("div", {
|
|
118
|
-
className: o,
|
|
119
|
-
"data-columns": l
|
|
120
|
-
}, p.map((n, b) => {
|
|
121
|
-
const c = n.value ?? n.label;
|
|
122
|
-
return k(d, {
|
|
123
|
-
key: n.isOther ? v : c,
|
|
124
|
-
value: c,
|
|
125
|
-
label: n.label,
|
|
126
|
-
isOther: n.isOther,
|
|
127
|
-
isFirstOption: b === 0
|
|
128
|
-
});
|
|
129
|
-
}));
|
|
130
|
-
}, q = ({ children: e, className: o }) => {
|
|
131
|
-
const { addOther: s, addOtherLabel: i, hasError: r, readOnly: l, value: u } = D(), { t: m } = S(), d = i || m("add-other.default-other-option-label") || v, p = O(e, V), n = O(e, j), b = I(() => !s || !u ? !1 : u.some((c) => c === d || c.startsWith(`${d}:`)), [
|
|
132
|
-
s,
|
|
133
|
-
u,
|
|
134
|
-
d
|
|
135
|
-
]);
|
|
136
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
137
|
-
className: o,
|
|
138
|
-
"data-invalid": r,
|
|
139
|
-
"data-readonly": l
|
|
140
|
-
}, p, b && n);
|
|
141
|
-
}, a = ({ children: e }) => {
|
|
142
|
-
const { id: o, value: s, onChange: i, FieldLayout: r, required: l, disabled: u, readOnly: m, hasError: d, onBlur: p, onFocus: n } = D(), { inputId: b, labelId: c, ariaDescribedBy: L } = M(), f = I(() => s || [], [
|
|
143
|
-
s
|
|
144
|
-
]), g = O(e, $), h = O(e, q), C = O(e, H), _ = O(e, W);
|
|
145
|
-
return /* @__PURE__ */ t.createElement(r, {
|
|
146
|
-
fieldId: o,
|
|
147
|
-
renderLabel: () => g,
|
|
148
|
-
renderInput: () => /* @__PURE__ */ t.createElement(re, {
|
|
149
|
-
id: b,
|
|
150
|
-
ariaLabelledBy: c,
|
|
151
|
-
ariaDescribedBy: L,
|
|
152
|
-
required: l,
|
|
153
|
-
onBlur: p,
|
|
154
|
-
onFocus: n
|
|
155
|
-
}, /* @__PURE__ */ t.createElement(z, {
|
|
156
|
-
"aria-labelledby": c,
|
|
157
|
-
value: f,
|
|
158
|
-
onChange: i,
|
|
159
|
-
isDisabled: u,
|
|
160
|
-
isReadOnly: m,
|
|
161
|
-
isRequired: l,
|
|
162
|
-
isInvalid: d
|
|
163
|
-
}, h)),
|
|
164
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, _, C)
|
|
165
|
-
});
|
|
166
|
-
};
|
|
167
|
-
V.Option = T;
|
|
168
|
-
T.Label = P;
|
|
169
|
-
a.Label = $;
|
|
170
|
-
a.Control = q;
|
|
171
|
-
a.Options = V;
|
|
172
|
-
a.OtherInput = j;
|
|
173
|
-
a.Description = H;
|
|
174
|
-
a.Error = W;
|
|
175
|
-
const pe = "_control_oshjt_1", he = "_options_oshjt_7", Ee = "_option_oshjt_7", be = "_optionHover_oshjt_76", Oe = "_optionSelected_oshjt_76", R = {
|
|
176
|
-
control: pe,
|
|
177
|
-
options: he,
|
|
178
|
-
option: Ee,
|
|
179
|
-
optionHover: be,
|
|
180
|
-
optionSelected: Oe
|
|
181
|
-
}, fe = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement(J, {
|
|
182
|
-
content: e,
|
|
183
|
-
locale: o
|
|
184
|
-
}), Ie = {
|
|
185
|
-
base: R.option,
|
|
186
|
-
selected: R.optionSelected,
|
|
187
|
-
hover: R.optionHover
|
|
188
|
-
}, xe = () => {
|
|
189
|
-
const e = ie({
|
|
190
|
-
globalClasses: se,
|
|
191
|
-
moduleClasses: Ie
|
|
192
|
-
}), o = ce();
|
|
193
|
-
return /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
|
|
194
|
-
className: F(ee, y.label)
|
|
195
|
-
}, /* @__PURE__ */ t.createElement(a.Label.Required, {
|
|
196
|
-
className: F(te, y.requiredMark)
|
|
197
|
-
})), /* @__PURE__ */ t.createElement(a.Control, {
|
|
198
|
-
className: R.control
|
|
199
|
-
}, /* @__PURE__ */ t.createElement(a.Options, {
|
|
200
|
-
className: F(oe, R.options)
|
|
201
|
-
}, /* @__PURE__ */ t.createElement(a.Options.Option, {
|
|
202
|
-
className: e
|
|
203
|
-
}, /* @__PURE__ */ t.createElement(a.Options.Option.Label, null))), /* @__PURE__ */ t.createElement(a.OtherInput, {
|
|
204
|
-
className: o
|
|
205
|
-
})), /* @__PURE__ */ t.createElement(a.Error, {
|
|
206
|
-
className: F(ne, y.error)
|
|
207
|
-
}, /* @__PURE__ */ t.createElement(le, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)), /* @__PURE__ */ t.createElement(a.Description, {
|
|
208
|
-
className: F(ae, y.description)
|
|
209
|
-
}, fe));
|
|
210
|
-
};
|
|
211
|
-
export {
|
|
212
|
-
xe as T
|
|
213
|
-
};
|