@wix/form-elements 1.193.0 → 1.195.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.
Files changed (108) hide show
  1. package/dist/component/{appointment-rac-7eD_yW7i.js → appointment-rac-BDa88iTP.js} +4 -4
  2. package/dist/component/{bookings-address-rac-Bpt7DrEs.js → bookings-address-rac-B1gPV--H.js} +1 -1
  3. package/dist/component/{bookings-email-rac-BYgeQczn.js → bookings-email-rac-DX-W7Axd.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-N7cvqHVh.js → bookings-first-name-rac-DdCziNtq.js} +1 -1
  5. package/dist/component/{bookings-header-rac-TCezj9Ur.js → bookings-header-rac-lGTzfTNR.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-t4O2yMDP.js → bookings-last-name-rac-CSa6tpCc.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-CJSoMvyZ.js → bookings-login-bar-rac-BiVTmFCB.js} +1 -1
  8. package/dist/component/{bookings-phone-rac-D9DS7Vkl.js → bookings-phone-rac-By2drUcb.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-9SxwdW6F.js → bookings-rich-text-rac-D-Gz46J9.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-BBccyPVf.js → checkbox-field-rac-CKn8FeIB.js} +141 -141
  11. package/dist/component/{checkbox-group-field-headless-Dwnolboz.js → checkbox-group-field-headless-DbMidU6n.js} +79 -76
  12. package/dist/component/{checkbox-group-field-rac-BqcHS2rI.js → checkbox-group-field-rac-Czg7XNjP.js} +4 -4
  13. package/dist/component/{checkbox-group-rac-D1eH4xRZ.js → checkbox-group-rac-H23UY8V-.js} +1 -1
  14. package/dist/component/{checkbox-rac-D8KBjt2N.js → checkbox-rac-BViZUwuW.js} +1 -1
  15. package/dist/component/{contacts-address-rac-Cl-McrL_.js → contacts-address-rac-WxyYhD1V.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-tD574IDc.js → contacts-birthdate-rac-B2Sdyr45.js} +1 -1
  17. package/dist/component/{contacts-company-rac-p09ntN6y.js → contacts-company-rac-C8eUlCqT.js} +1 -1
  18. package/dist/component/{contacts-email-rac-hFxe_vYm.js → contacts-email-rac-BAmub2j_.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-CRQalepX.js → contacts-first-name-rac-C2bV0fls.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-BxWC_dQK.js → contacts-last-name-rac-D7kimOp8.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-BoESpvX4.js → contacts-phone-rac-DMOMf2Fj.js} +1 -1
  22. package/dist/component/{contacts-position-rac-C-dEH79x.js → contacts-position-rac-CMl8ykC1.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-Wevw2yIs.js → contacts-subscribe-rac-DyEimqfI.js} +1 -1
  24. package/dist/component/{contacts-tax-id-rac-C_YoCoUk.js → contacts-tax-id-rac-kOk59-rS.js} +1 -1
  25. package/dist/component/{date-availability-zeRtXneN.js → date-availability-D3-akuGp.js} +1 -1
  26. package/dist/component/{date-input-field-rac-wl1J79Lm.js → date-input-field-rac-D4mJM3Mi.js} +6 -6
  27. package/dist/component/{date-input-rac-DZG0E4dR.js → date-input-rac-DT28Xbno.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-BgVpHr0x.js → date-picker-field-rac-Cj4S9fCJ.js} +6 -6
  29. package/dist/component/{date-picker-rac-Cxncpp-S.js → date-picker-rac-CFaHMNd-.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-BybKpDmr.js → date-time-input-field-rac-D1nJaGDz.js} +6 -6
  31. package/dist/component/{date-time-input-rac-BV45ahu6.js → date-time-input-rac-B1X8e_8t.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-CcnOnG3r.js → dext-checkbox-group-rac-CZc0qwzc.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-DZMbVP-v.js → dext-checkbox-rac-CchrXQUN.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-Ch7gU188.js → dext-date-picker-rac-BAugBZ0Y.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-DUssq9pN.js → dext-date-time-input-rac-CfMKLLyb.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-MZNHRD4Y.js → dext-dropdown-rac-BnHpXwmg.js} +1 -1
  37. package/dist/component/{dext-email-rac-bzMikfP7.js → dext-email-rac-DTzTU7Yv.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-BDx2sZKk.js → dext-number-input-rac-4zxYCJ75.js} +1 -1
  39. package/dist/component/{dext-phone-rac-DBiQKWp5.js → dext-phone-rac-Cuy9Ong7.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-DQ0cJ_AF.js → dext-radio-group-rac-2_uzJUJC.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-DB8BVtRj.js → dext-rating-input-rac-Jq_Bjvuh.js} +1 -1
  42. package/dist/component/{dext-tags-rac-BlwcMf4S.js → dext-tags-rac-RlqgLji2.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-RAxzXAFv.js → dext-text-area-rac-BEgLinV6.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-bCmpx20f.js → dext-text-input-rac-tsXWti5j.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-CF9E7GBh.js → dext-url-input-rac-u8XEkC0e.js} +1 -1
  46. package/dist/component/{donation-rac-CVWZE3yz.js → donation-rac-D_Rv9dCb.js} +5 -5
  47. package/dist/component/{dropdown-field-rac-BnxTiejT.js → dropdown-field-rac-An-1mFG9.js} +3 -3
  48. package/dist/component/{dropdown-rac-BSj6tud_.js → dropdown-rac-Dej2LbdS.js} +1 -1
  49. package/dist/component/{ecom-address-rac-Dsht1oXo.js → ecom-address-rac-DgpIV9et.js} +1 -1
  50. package/dist/component/{ecom-subscription-checkbox-rac-NdMstAuc.js → ecom-subscription-checkbox-rac-B_vc4yei.js} +2 -2
  51. package/dist/component/{email-input-field-rac-BCxurSsa.js → email-input-field-rac-CCJAErTE.js} +3 -3
  52. package/dist/component/{events-repeater-rac-Dz59WhGX.js → events-repeater-rac-r6bYzbhi.js} +4 -4
  53. package/dist/component/{events-rsvp-rac-M4068R7R.js → events-rsvp-rac-CGIiANKI.js} +3 -3
  54. package/dist/component/{field-error-headless-DQ-jwMtX.js → field-error-headless-C-6U5jK5.js} +1 -1
  55. package/dist/component/{field-label-headless-D0N5zbDh.js → field-label-headless-CNe_Y93p.js} +1 -1
  56. package/dist/component/{file-upload-rac-Cy9ymgFI.js → file-upload-rac-Dj5MrGuQ.js} +4 -4
  57. package/dist/component/{fixed-payment-rac-DHL9zRaN.js → fixed-payment-rac-Dej4ZffG.js} +3 -3
  58. package/dist/component/{form-ur8Cb2nw.js → form-CrkZgddm.js} +3324 -3287
  59. package/dist/component/form.js +1 -1
  60. package/dist/component/{header-field-rac-DmRHkStT.js → header-field-rac-kKF5WFnm.js} +2 -2
  61. package/dist/component/{header-rac-BMxv-FJ_.js → header-rac-EnnJI00C.js} +1 -1
  62. package/dist/component/{image-choice-rac-Bj54Ms5f.js → image-choice-rac-BIjCtkqd.js} +71 -68
  63. package/dist/component/{index-D1Nkz9Je.js → index-CGcAAYLG.js} +4 -4
  64. package/dist/component/{index-DwxUwvfW.js → index-HyPWuLT4.js} +2 -2
  65. package/dist/component/{isObjectLike-CA05Trvx.js → isObjectLike-Km_2vWSW.js} +1 -1
  66. package/dist/component/{multiline-address-field-rac-O10IwOCo.js → multiline-address-field-rac-DDCVJWIi.js} +7 -7
  67. package/dist/component/{multiline-address-rac-BHsYqS8U.js → multiline-address-rac-1IlceJjh.js} +1 -1
  68. package/dist/component/{number-input-field-rac-Dv6mIcWK.js → number-input-field-rac-BXfUcSDN.js} +4 -4
  69. package/dist/component/{number-input-rac-DB4aCeZ3.js → number-input-rac-C5cpfylm.js} +1 -1
  70. package/dist/component/{password-rac-Bzyoy7Ue.js → password-rac-BbMYEuXh.js} +4 -4
  71. package/dist/component/{payment-input-rac-d3XhrKDL.js → payment-input-rac-Bwkl3Z5r.js} +4 -4
  72. package/dist/component/{phone-input-field-rac-B1fOUnoX.js → phone-input-field-rac-BzqbdcNA.js} +6 -6
  73. package/dist/component/{phone-rac-CIourqo0.js → phone-rac-6a2EYMIa.js} +1 -1
  74. package/dist/component/{product-list-rac-2b6ZKst8.js → product-list-rac-DRiQBACq.js} +4 -4
  75. package/dist/component/{quiz-radio-group-rac-UzeDK6Fb.js → quiz-radio-group-rac-D--2yt8z.js} +1 -1
  76. package/dist/component/{radio-button-module-classes-BQiTZl4N.js → radio-button-module-classes-DpairWHD.js} +48 -45
  77. package/dist/component/{radio-group-field-rac-DMly0YyR.js → radio-group-field-rac-DfB_u2vb.js} +4 -4
  78. package/dist/component/{radio-group-rac-DWnKmLpT.js → radio-group-rac-6nMarETU.js} +1 -1
  79. package/dist/component/{rating-input-field-rac-B8b5CdR7.js → rating-input-field-rac-CFJFtI5b.js} +45 -43
  80. package/dist/component/{rating-input-rac-BqRJ0so2.js → rating-input-rac-BDH7MaUi.js} +1 -1
  81. package/dist/component/{rich-content-rac.module-BgjdfUpM.js → rich-content-rac.module-CkqZCs-2.js} +1 -1
  82. package/dist/component/{rich-text-field-rac-Drh-o9ma.js → rich-text-field-rac-Ctym7hYF.js} +2 -2
  83. package/dist/component/{rich-text-rac-BhUjaWGI.js → rich-text-rac-C57HTjbQ.js} +1 -1
  84. package/dist/component/{service-dropdown-rac-Cj4BuLCe.js → service-dropdown-rac-ClHCanJy.js} +4 -4
  85. package/dist/component/{services-multi-choice-rac-BWgmoaGp.js → services-multi-choice-rac-Ca9MfRHt.js} +5 -5
  86. package/dist/component/{signature-rac-DEFLilBW.js → signature-rac-CyHmUNnC.js} +4 -4
  87. package/dist/component/{submit-button-rac-_Lluhrls.js → submit-button-rac-DuCxy8Dp.js} +2 -2
  88. package/dist/component/tags-field-rac-CR3t0sMl.js +216 -0
  89. package/dist/component/{tags-rac-DsBzlrwA.js → tags-rac-Bsjv-eAy.js} +1 -1
  90. package/dist/component/{text-area-field-rac-COU0UfH0.js → text-area-field-rac-D8NrZuYn.js} +4 -4
  91. package/dist/component/{text-area-rac-DY2np20s.js → text-area-rac-CePWkwsf.js} +1 -1
  92. package/dist/component/{text-input-field-rac-Jl4gKN4D.js → text-input-field-rac-CwAh7Rsq.js} +3 -3
  93. package/dist/component/{text-input-headless-DsIKhwwK.js → text-input-headless-B7-hkYK7.js} +3 -3
  94. package/dist/component/{text-input-rac-Dwoai7Y2.js → text-input-rac-B3lmF2k7.js} +1 -1
  95. package/dist/component/{time-input-rac-CeUzBpvQ.js → time-input-rac-DmtviG0W.js} +4 -4
  96. package/dist/component/{url-input-field-rac-D5dK0qXo.js → url-input-field-rac-D1c1qFA8.js} +4 -4
  97. package/dist/component/{url-input-rac-DGC2_VVy.js → url-input-rac-CVXiOK3x.js} +1 -1
  98. package/dist/component/{use-dropdown-option-class-name-DCf8o4bn.js → use-dropdown-option-class-name-CYe9j3TQ.js} +2 -2
  99. package/dist/component/{use-dropdown-trigger-class-name-VcbNtj9H.js → use-dropdown-trigger-class-name-DAXgQ97Y.js} +6 -6
  100. package/dist/component/{use-element-state-class-name-Dc9b8x0t.js → use-element-state-class-name-BgZPeBgR.js} +1 -1
  101. package/dist/component/{use-hoverable-input-class-name-BNb7P_5E.js → use-hoverable-input-class-name-DDWuNCH3.js} +2 -2
  102. package/dist/component/{use-is-forced-open-dropdown-BlG9NkCS.js → use-is-forced-open-dropdown-Dzt7p3CD.js} +1 -1
  103. package/dist/component/{use-service-options-base-DB4bYGFa.js → use-service-options-base-bKP2vFsb.js} +1 -1
  104. package/dist/component/use-text-input-class-name-w_3X2xFo.js +6 -0
  105. package/dist/form.d.ts +2 -1
  106. package/package.json +3 -3
  107. package/dist/component/tags-field-rac-C7nXKUBj.js +0 -213
  108. package/dist/component/use-text-input-class-name-BxX9CE3F.js +0 -6
@@ -1,5 +1,5 @@
1
1
  import r from "react";
2
- import { U as t } from "./url-input-field-rac-D5dK0qXo.js";
2
+ import { U as t } from "./url-input-field-rac-D1c1qFA8.js";
3
3
  const n = () => /* @__PURE__ */ r.createElement(t, null);
4
4
  export {
5
5
  n as UrlInputRAC
@@ -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-ur8Cb2nw.js";
6
- import { u as H } from "./use-element-state-class-name-Dc9b8x0t.js";
5
+ import { K as T } from "./form-CrkZgddm.js";
6
+ import { u as H } from "./use-element-state-class-name-BgZPeBgR.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-ur8Cb2nw.js";
4
+ import { bM as b, bJ as D, bX as W, bO as X, L as Y } from "./form-CrkZgddm.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-DQ-jwMtX.js";
7
- import { L as K } from "./field-label-headless-D0N5zbDh.js";
6
+ import { D as j, E as z } from "./field-error-headless-C-6U5jK5.js";
7
+ import { L as K } from "./field-label-headless-CNe_Y93p.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-BlG9NkCS.js";
10
- import { V as ne } from "./use-dropdown-option-class-name-DCf8o4bn.js";
11
- import { u as re } from "./use-hoverable-input-class-name-BNb7P_5E.js";
9
+ import { b as te } from "./use-is-forced-open-dropdown-Dzt7p3CD.js";
10
+ import { V as ne } from "./use-dropdown-option-class-name-CYe9j3TQ.js";
11
+ import { u as re } from "./use-hoverable-input-class-name-DDWuNCH3.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-ur8Cb2nw.js";
2
+ import { bF as s, bc as v } from "./form-CrkZgddm.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-ur8Cb2nw.js";
1
+ import { bM as n } from "./form-CrkZgddm.js";
2
2
  import { s as e } from "./field-rac.module-DcyJyi2B.js";
3
- import { u } from "./use-element-state-class-name-Dc9b8x0t.js";
3
+ import { u } from "./use-element-state-class-name-BgZPeBgR.js";
4
4
  const b = (s, a) => {
5
5
  const { disabled: t, readOnly: o } = n(), r = u({
6
6
  globalClasses: s,
@@ -1,5 +1,5 @@
1
1
  import { useContext as u, useMemo as a } from "react";
2
- import { bG as c, aR as p, bE as E, F as o } from "./form-ur8Cb2nw.js";
2
+ import { bG as c, aR as p, bE as E, F as o } from "./form-CrkZgddm.js";
3
3
  const D = [
4
4
  o.DROPDOWN,
5
5
  o.DEXT_DROPDOWN,
@@ -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-ur8Cb2nw.js";
2
+ import { bL as v } from "./form-CrkZgddm.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) => ({
@@ -0,0 +1,6 @@
1
+ import { az as a } from "./form-CrkZgddm.js";
2
+ import { u as e } from "./use-hoverable-input-class-name-DDWuNCH3.js";
3
+ const m = (...s) => e(a, s);
4
+ export {
5
+ m as u
6
+ };
package/dist/form.d.ts CHANGED
@@ -7107,6 +7107,7 @@ type FormProps = {
7107
7107
  id?: string;
7108
7108
  className?: string;
7109
7109
  compId?: string;
7110
+ ariaLabel?: string;
7110
7111
  form?: FormSchema;
7111
7112
  wix?: Wix;
7112
7113
  elementProps?: ElementProps;
@@ -7117,7 +7118,7 @@ type FormProps = {
7117
7118
  onValidate: (errors: ValidationError[]) => void;
7118
7119
  stepId?: string;
7119
7120
  onStepIdChange?: (stepId: string) => void;
7120
- onSubmit?: () => void;
7121
+ onSubmit?: (() => void) | (() => false);
7121
7122
  onSubmitSuccess?: (submission: FormSubmission) => void;
7122
7123
  onSubmitFailure?: (error: unknown) => void;
7123
7124
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/form-elements",
3
- "version": "1.193.0",
3
+ "version": "1.195.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.6",
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": "a79364b0a89526d5374d9db93e6db12f18bca8e4f672b4d0eed2e443"
161
+ "falconPackageHash": "bbd235f2eb814f43f1528050ab4ef134b52ecf1621bdb8f7948b9edf"
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
- };
@@ -1,6 +0,0 @@
1
- import { az as a } from "./form-ur8Cb2nw.js";
2
- import { u as e } from "./use-hoverable-input-class-name-BNb7P_5E.js";
3
- const m = (...s) => e(a, s);
4
- export {
5
- m as u
6
- };