@wix/form-elements 1.81.0 → 1.83.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 (118) hide show
  1. package/dist/component/{appointment-rac-DmwbqZse.js → appointment-rac-ky2cE6hE.js} +6 -6
  2. package/dist/component/{bookings-address-rac-RCzVU87c.js → bookings-address-rac-Bxc6H9Pb.js} +1 -1
  3. package/dist/component/{bookings-email-rac-Df_Wte1_.js → bookings-email-rac-Dw1Xttdx.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-BmdRGYxF.js → bookings-first-name-rac-dgHOrJaJ.js} +1 -1
  5. package/dist/component/{bookings-header-rac-DewQWtkZ.js → bookings-header-rac-Bl9RYGWo.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-DmmNBuqy.js → bookings-last-name-rac-BeqYpbZq.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-QskvFo0C.js → bookings-login-bar-rac-C1k6o0A5.js} +2 -2
  8. package/dist/component/{bookings-phone-rac-7wn8IXna.js → bookings-phone-rac-ByhaJrwE.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-B5nk0BlD.js → bookings-rich-text-rac-Mw5-ZiIn.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-BnVNfYWL.js → checkbox-field-rac-CMEI5t4Y.js} +7 -7
  11. package/dist/component/{checkbox-group-field-headless-Bx5Y-RMP.js → checkbox-group-field-headless-CP21R7_s.js} +3 -3
  12. package/dist/component/checkbox-group-field-rac-DGOZjSIY.js +42 -0
  13. package/dist/component/{checkbox-group-rac-B20t8dTB.js → checkbox-group-rac-CEGtshrl.js} +1 -1
  14. package/dist/component/{checkbox-indicator-module-classes-DqzGZQRQ.js → checkbox-indicator-module-classes-Bb3xB1ve.js} +1 -1
  15. package/dist/component/{checkbox-rac-ifC6qSE8.js → checkbox-rac-DCnRh1WF.js} +1 -1
  16. package/dist/component/{contacts-address-rac-XJRKvPlp.js → contacts-address-rac-CZb_5N5o.js} +1 -1
  17. package/dist/component/{contacts-birthdate-rac-CKYESrPO.js → contacts-birthdate-rac-DZlwSyp5.js} +1 -1
  18. package/dist/component/{contacts-company-rac-BXwEeb0p.js → contacts-company-rac-BNEF6LjB.js} +1 -1
  19. package/dist/component/{contacts-email-rac-D8Yspo_m.js → contacts-email-rac-CAgk_zfN.js} +1 -1
  20. package/dist/component/{contacts-first-name-rac-mvCGP1LJ.js → contacts-first-name-rac-DyTVcmrX.js} +1 -1
  21. package/dist/component/{contacts-last-name-rac-Clg9RXal.js → contacts-last-name-rac-DrFcDcGr.js} +1 -1
  22. package/dist/component/{contacts-phone-rac-qEwjhByI.js → contacts-phone-rac-UAPALlFx.js} +1 -1
  23. package/dist/component/{contacts-position-rac-Bh8fvf2M.js → contacts-position-rac-CJ1M4kJJ.js} +1 -1
  24. package/dist/component/{contacts-subscribe-rac-DEQ2XkZo.js → contacts-subscribe-rac-1cEd5s1l.js} +2 -2
  25. package/dist/component/{contacts-tax-id-rac-0DUZ4tJz.js → contacts-tax-id-rac-CqnO__fd.js} +1 -1
  26. package/dist/component/{date-availability-2ek2RtXx.js → date-availability-COM2EaRy.js} +1 -1
  27. package/dist/component/{date-input-field-rac-Bp4SQB-t.js → date-input-field-rac-CuuWbw42.js} +80 -79
  28. package/dist/component/{date-input-rac-CYsJcMe5.js → date-input-rac-DfVmj9Gc.js} +1 -1
  29. package/dist/component/{date-picker-field-rac-BGQvnSYI.js → date-picker-field-rac-BFCZik9T.js} +6 -6
  30. package/dist/component/{date-picker-rac-BVncggYR.js → date-picker-rac-C2vajJpb.js} +1 -1
  31. package/dist/component/{date-time-input-field-rac-B1mggelc.js → date-time-input-field-rac-B7ne2emo.js} +127 -126
  32. package/dist/component/{date-time-input-rac-DzdCno0L.js → date-time-input-rac-D4FEieQz.js} +1 -1
  33. package/dist/component/{dext-checkbox-group-rac-CNCpeolD.js → dext-checkbox-group-rac-BDBBTNNo.js} +2 -2
  34. package/dist/component/{dext-checkbox-rac-BYDQ58Mo.js → dext-checkbox-rac-DAAhNboR.js} +1 -1
  35. package/dist/component/{dext-date-picker-rac-aYYk8Nrl.js → dext-date-picker-rac-me7XbR5z.js} +1 -1
  36. package/dist/component/{dext-date-time-input-rac-v2v974p5.js → dext-date-time-input-rac-DLsUl2Eg.js} +1 -1
  37. package/dist/component/{dext-dropdown-rac-C846KZCe.js → dext-dropdown-rac-C3vVIRir.js} +1 -1
  38. package/dist/component/{dext-email-rac-izjbfME9.js → dext-email-rac-a8qXYTLP.js} +1 -1
  39. package/dist/component/{dext-number-input-rac-CnOFsD7l.js → dext-number-input-rac-DdDnL_fX.js} +1 -1
  40. package/dist/component/{dext-phone-rac-D8GMXD88.js → dext-phone-rac-ByaxbHpO.js} +1 -1
  41. package/dist/component/{dext-radio-group-rac-BtiyGCRh.js → dext-radio-group-rac-Bzubt7Uy.js} +2 -2
  42. package/dist/component/{dext-rating-input-rac-BHJ1kitb.js → dext-rating-input-rac-BZ1EvOkG.js} +1 -1
  43. package/dist/component/{dext-tags-rac-CvNjwS5R.js → dext-tags-rac-C_R89noV.js} +2 -2
  44. package/dist/component/{dext-text-area-rac-X5L0Q3sC.js → dext-text-area-rac-DRpYeQ-K.js} +1 -1
  45. package/dist/component/{dext-text-input-rac-swkyAJqC.js → dext-text-input-rac-D_RtbQQ-.js} +1 -1
  46. package/dist/component/{dext-url-input-rac-BYlXOAkz.js → dext-url-input-rac-BSSjSbIo.js} +1 -1
  47. package/dist/component/{donation-rac-CDWLBZZM.js → donation-rac-De0KyyGR.js} +92 -91
  48. package/dist/component/{dropdown-field-headless-JJzbZvps.js → dropdown-field-headless-DNhnTDlD.js} +3 -3
  49. package/dist/component/{dropdown-field-rac-BodpIQ9Q.js → dropdown-field-rac-Bq_FNv9a.js} +3 -3
  50. package/dist/component/{dropdown-rac-Bfbxxx9k.js → dropdown-rac-0UIyqF15.js} +1 -1
  51. package/dist/component/{ecom-address-rac-BCnsL5tr.js → ecom-address-rac-7IVbvs3J.js} +1 -1
  52. package/dist/component/{ecom-subscription-checkbox-rac-CNSdI_ty.js → ecom-subscription-checkbox-rac-DilgIpiG.js} +3 -3
  53. package/dist/component/{email-input-field-rac-Btaa4O5T.js → email-input-field-rac-CHJ6RSGy.js} +83 -79
  54. package/dist/component/{events-repeater-rac-xBwqJddt.js → events-repeater-rac-v18FFLC7.js} +6 -6
  55. package/dist/component/{events-rsvp-rac-D90PwkHd.js → events-rsvp-rac-BpGLrxsf.js} +4 -4
  56. package/dist/component/{field-error-headless-BErhh9GG.js → field-error-headless-DAy-1oAQ.js} +1 -1
  57. package/dist/component/{field-label-headless-BGyK-5xW.js → field-label-headless-BWxHmO0c.js} +1 -1
  58. package/dist/component/field-rac.module-D06m9T9x.js +24 -0
  59. package/dist/component/{file-upload-rac-MxH3CVml.js → file-upload-rac-BfWN27JT.js} +5 -5
  60. package/dist/component/{fixed-payment-rac-DpBA9irF.js → fixed-payment-rac-Bha61SB4.js} +5 -5
  61. package/dist/component/{form-f0tqdMye.js → form-D0eeH0lX.js} +69 -69
  62. package/dist/component/{form-element-classes-jC8D0LnK.js → form-element-classes-Ct1UaxuQ.js} +38 -32
  63. package/dist/component/form.css +1 -1
  64. package/dist/component/form.js +1 -1
  65. package/dist/component/{header-field-rac-BXxFqu9u.js → header-field-rac-uNzfDMbv.js} +3 -3
  66. package/dist/component/{header-rac-BN70esac.js → header-rac-B91q4fHl.js} +1 -1
  67. package/dist/component/{image-choice-rac-DLBGIBXL.js → image-choice-rac-BKcnNGPp.js} +6 -6
  68. package/dist/component/{index-BvB-uE1H.js → index-BWHymomM.js} +2 -2
  69. package/dist/component/{index-DXLEHYlA.js → index-BvzLLTKc.js} +4 -4
  70. package/dist/component/{isObjectLike-BYOX5XY4.js → isObjectLike-D7Mkqoju.js} +1 -1
  71. package/dist/component/multiline-address-field-rac-Avd9Vlv1.js +1617 -0
  72. package/dist/component/{multiline-address-rac-D82Gbj3n.js → multiline-address-rac-BwQOoejw.js} +1 -1
  73. package/dist/component/number-input-field-rac-CRqPXDl0.js +93 -0
  74. package/dist/component/{number-input-rac-Bnsvb-SO.js → number-input-rac-0Y8K4e6K.js} +1 -1
  75. package/dist/component/password-rac-C7F6sEB3.js +143 -0
  76. package/dist/component/payment-input-rac-CTJr4QTK.js +141 -0
  77. package/dist/component/{phone-input-field-rac-Ce_wuE46.js → phone-input-field-rac-jjSmYCI1.js} +5 -5
  78. package/dist/component/{phone-rac-DslINtcH.js → phone-rac-BwSnmgYF.js} +1 -1
  79. package/dist/component/{product-list-rac-C4P_SOyG.js → product-list-rac-CTN2wvHE.js} +7 -7
  80. package/dist/component/{quiz-radio-group-rac-noy4fmD8.js → quiz-radio-group-rac-CZHEDJxr.js} +2 -2
  81. package/dist/component/{radio-button-module-classes-DXQ1UlmI.js → radio-button-module-classes-DCz6XS1X.js} +3 -3
  82. package/dist/component/radio-group-field-rac-60MF_9DO.js +48 -0
  83. package/dist/component/{radio-group-rac-CGHQFyJY.js → radio-group-rac-Dqo-Earp.js} +1 -1
  84. package/dist/component/{rating-input-field-rac-elaferlI.js → rating-input-field-rac-CzWTwWT8.js} +6 -6
  85. package/dist/component/{rating-input-rac-fnOtTKN8.js → rating-input-rac-Nq4tll2Z.js} +1 -1
  86. package/dist/component/{rich-content-rac.module-DbwuwQeo.js → rich-content-rac.module-sUUSbcSy.js} +1 -1
  87. package/dist/component/{rich-text-field-rac-DtcQC8zU.js → rich-text-field-rac-BvLfS4I5.js} +3 -3
  88. package/dist/component/{rich-text-rac-CuT97sby.js → rich-text-rac-BWkTbWk3.js} +1 -1
  89. package/dist/component/{service-dropdown-rac-rk2tzikX.js → service-dropdown-rac-DZ3USe7_.js} +5 -5
  90. package/dist/component/{services-multi-choice-rac-BMQyF_xs.js → services-multi-choice-rac-D-og7fMo.js} +7 -7
  91. package/dist/component/{signature-rac-DeV9C6ta.js → signature-rac-D3c4fnvN.js} +5 -5
  92. package/dist/component/{submit-button-rac-BpN-FYtM.js → submit-button-rac-Dn_BGt1n.js} +2 -2
  93. package/dist/component/tags-field-rac-DXmZBcpO.js +218 -0
  94. package/dist/component/{tags-rac-Dabz4jHd.js → tags-rac-CoXWx42D.js} +1 -1
  95. package/dist/component/text-area-field-rac-Cy0Mr29Z.js +73 -0
  96. package/dist/component/{text-area-rac-CDLF-_56.js → text-area-rac-C3Mjmgpa.js} +1 -1
  97. package/dist/component/text-input-field-rac-D1TB9B_M.js +28 -0
  98. package/dist/component/{text-input-headless-BwVLU9cp.js → text-input-headless-BUa59Rgn.js} +3 -3
  99. package/dist/component/{text-input-rac-CoGTzfo1.js → text-input-rac-BQ3Z9ws4.js} +1 -1
  100. package/dist/component/{time-input-rac-DQDupKTA.js → time-input-rac-Wi0oD5YF.js} +5 -5
  101. package/dist/component/url-input-field-rac-DINXfZdf.js +75 -0
  102. package/dist/component/{url-input-rac-_d6XRdKX.js → url-input-rac-Ch9eTIF_.js} +1 -1
  103. package/dist/component/use-element-state-class-name-j8W1zbdG.js +20 -0
  104. package/dist/component/{use-service-options-base-CRgxxz7b.js → use-service-options-base-BJZhzDyO.js} +1 -1
  105. package/dist/component/use-text-input-class-name-8gMUWeCb.js +24 -0
  106. package/package.json +2 -2
  107. package/dist/component/checkbox-group-field-rac-CZW28rj5.js +0 -41
  108. package/dist/component/field-rac.module-ColNPUt0.js +0 -23
  109. package/dist/component/multiline-address-field-rac-fcQYnPlO.js +0 -1613
  110. package/dist/component/number-input-field-rac-B0-4Rz3w.js +0 -89
  111. package/dist/component/password-rac-BdBjFa8y.js +0 -142
  112. package/dist/component/payment-input-rac-DkAGOvaF.js +0 -137
  113. package/dist/component/radio-group-field-rac-CYBDq7R1.js +0 -47
  114. package/dist/component/tags-field-rac-ByC9DnyH.js +0 -217
  115. package/dist/component/text-area-field-rac-CtSa8XW_.js +0 -69
  116. package/dist/component/text-input-field-rac-C6fQYKhI.js +0 -24
  117. package/dist/component/url-input-field-rac-4T8gcMHH.js +0 -71
  118. package/dist/component/use-element-state-class-name-BqmaTba3.js +0 -15
@@ -4,14 +4,14 @@ import v from "classnames";
4
4
  import { useHover as ve, useFocusRing as xe, mergeProps as Se } from "react-aria";
5
5
  import { RadioGroup as Fe, Button as fe, TextField as Ae, Input as _e, RadioField as Pe, RadioButton as Ne } from "react-aria-components";
6
6
  import he from "signature_pad";
7
- import { z as Oe, ae as Ue, ab as Be, aq as ge, E as ce, e as G, ai as A, af as H, ak as Ee, as as Me } from "./form-f0tqdMye.js";
7
+ import { z as Oe, ae as Ue, ab as Be, aq as ge, E as ce, e as G, ai as A, af as H, ak as Ee, as as Me } from "./form-D0eeH0lX.js";
8
8
  import { f as T, a as F } from "./find-child-C60k4CxG.js";
9
- import { D as We, E as He } from "./field-error-headless-BErhh9GG.js";
10
- import { L as Ye } from "./field-label-headless-BGyK-5xW.js";
9
+ import { D as We, E as He } from "./field-error-headless-DAy-1oAQ.js";
10
+ import { L as Ye } from "./field-label-headless-BWxHmO0c.js";
11
11
  import { D as ke } from "./data-hooks-Dkw1pbRj.js";
12
12
  import { E as $e } from "./error-icon-hZxQ6DEy.js";
13
- import { s as z } from "./field-rac.module-ColNPUt0.js";
14
- import { y as ue, O as ze, x as B, a1 as Ve, o as Ze, i as Xe } from "./form-element-classes-jC8D0LnK.js";
13
+ import { s as z } from "./field-rac.module-D06m9T9x.js";
14
+ import { y as ue, O as ze, x as B, a2 as Ve, o as Ze, i as Xe } from "./form-element-classes-Ct1UaxuQ.js";
15
15
  const Ge = typeof s.useId == "function" ? s.useId : () => W(Oe()).current;
16
16
  var w = /* @__PURE__ */ (function(e) {
17
17
  return e.TEXT = "text/plain", e.POINTS = "points/json", e;
@@ -1,9 +1,9 @@
1
1
  import t from "react";
2
2
  import l from "classnames";
3
- import { ai as c } from "./form-f0tqdMye.js";
3
+ import { ai as c } from "./form-D0eeH0lX.js";
4
4
  import { ProgressBar as g, Button as b } from "react-aria-components";
5
5
  import { f as i } from "./find-child-C60k4CxG.js";
6
- import { a3 as v, a2 as N, a5 as f } from "./form-element-classes-jC8D0LnK.js";
6
+ import { a4 as v, a3 as N, a6 as f } from "./form-element-classes-Ct1UaxuQ.js";
7
7
  function C(e) {
8
8
  const s = "calc(50% - 2px)";
9
9
  return /* @__PURE__ */ t.createElement(g, {
@@ -0,0 +1,218 @@
1
+ import { RicosViewer as Q } from "@wix/ricos/viewer";
2
+ import S from "classnames";
3
+ import e, { useMemo as L, useState as j, useRef as M, useLayoutEffect as w, useCallback as k } from "react";
4
+ import { CheckboxGroup as z, TextField as J, Input as K, CheckboxField as X, CheckboxButton as Y } from "react-aria-components";
5
+ import { ai as N, af as Z, as as v, ab as ee, ak as te } from "./form-D0eeH0lX.js";
6
+ import { f, a as x } from "./find-child-C60k4CxG.js";
7
+ import { E as B, D as $ } from "./field-error-headless-DAy-1oAQ.js";
8
+ import { L as H } from "./field-label-headless-BWxHmO0c.js";
9
+ import { F as oe } from "./fieldset-headless-CD3fds9J.js";
10
+ import { N as D } from "./options-layout-constants-DEfIEJWD.js";
11
+ import { E as ne } from "./error-icon-hZxQ6DEy.js";
12
+ import { s as y } from "./field-rac.module-D06m9T9x.js";
13
+ import { y as ae, O as se, _ as re, o as le, i as ie, $ as ce } from "./form-element-classes-Ct1UaxuQ.js";
14
+ import { o as ue } from "./options-rac.module-KM-VT_KY.js";
15
+ import { u as de } from "./use-element-state-class-name-j8W1zbdG.js";
16
+ import { u as me } from "./use-text-input-class-name-8gMUWeCb.js";
17
+ const g = "Other", pe = (o, t) => {
18
+ const s = t.length + 2;
19
+ return (o.find((r) => r.startsWith(`${t}: `)) || "").slice(s);
20
+ }, he = (o) => o.map((t) => t.value ?? t.label), P = ({ className: o, ...t }) => {
21
+ const { label: a } = t;
22
+ return /* @__PURE__ */ e.createElement("span", {
23
+ className: o
24
+ }, a);
25
+ }, W = ({ className: o }) => {
26
+ const { value: t, onChange: a, addOtherLabel: s, addOtherPlaceholder: c, otherInputCharacterLimit: r, disabled: u, readOnly: b, hasError: d } = N(), { t: m } = v(), l = s || m("add-other.default-other-option-label") || g, p = L(() => pe(t || [], l), [
27
+ t,
28
+ l
29
+ ]), [n, _] = j(p), h = M(a);
30
+ w(() => {
31
+ h.current = a;
32
+ });
33
+ const C = k((O) => {
34
+ _(O);
35
+ const I = (t || []).filter((E) => !E.startsWith(`${l}:`) && E !== l), F = O ? `${l}: ${O}` : l;
36
+ h.current([
37
+ ...I,
38
+ F
39
+ ]);
40
+ }, [
41
+ t,
42
+ l
43
+ ]);
44
+ return /* @__PURE__ */ e.createElement(J, {
45
+ value: n,
46
+ onChange: C,
47
+ isDisabled: u,
48
+ isReadOnly: b,
49
+ isInvalid: d,
50
+ "aria-label": l
51
+ }, /* @__PURE__ */ e.createElement(K, {
52
+ "data-hook": "tags-other-input",
53
+ "data-filled": n ? !0 : void 0,
54
+ placeholder: c,
55
+ maxLength: r,
56
+ className: o
57
+ }));
58
+ }, T = ({ children: o, className: t, ...a }) => {
59
+ const { value: s, label: c, isOther: r, isFirstOption: u } = a, { id: b, value: d, onChange: m, options: l, disabled: p, readOnly: n, hasError: _ } = N(), h = M(null);
60
+ te(() => {
61
+ var E;
62
+ u && ((E = h.current) == null || E.focus({
63
+ preventScroll: !0
64
+ }));
65
+ }, b);
66
+ const C = f(o, P), O = L(() => d || [], [
67
+ d
68
+ ]), I = L(() => r ? O.find((E) => E === c || E.startsWith(`${c}: `)) || c : s, [
69
+ r,
70
+ O,
71
+ c,
72
+ s
73
+ ]), F = k((E) => {
74
+ const G = he(l || []), A = O.filter((U) => G.includes(U));
75
+ m(E ? [
76
+ ...A,
77
+ c
78
+ ] : A);
79
+ }, [
80
+ c,
81
+ m,
82
+ l,
83
+ O
84
+ ]);
85
+ return /* @__PURE__ */ e.createElement(X, {
86
+ inputRef: h,
87
+ value: I,
88
+ onChange: r ? F : void 0,
89
+ isDisabled: p,
90
+ isReadOnly: n,
91
+ isInvalid: _
92
+ }, /* @__PURE__ */ e.createElement(Y, {
93
+ className: t,
94
+ "data-hook": `tags-${r ? g : s}`
95
+ }, x(C, {
96
+ value: s,
97
+ label: c,
98
+ isOther: r,
99
+ isFirstOption: u
100
+ })));
101
+ }, V = ({ children: o, className: t }) => {
102
+ const { options: a, addOther: s, addOtherLabel: c, numberOfColumns: r = D.FREE_FLOW } = N(), { isMobile: u } = ee(), { t: b } = v(), d = u && r !== D.FREE_FLOW ? D.ONE : r, m = c || b("add-other.default-other-option-label") || g, l = f(o, T), p = L(() => {
103
+ const n = a || [];
104
+ return s ? [
105
+ ...n,
106
+ {
107
+ label: m,
108
+ value: m,
109
+ isOther: !0
110
+ }
111
+ ] : n;
112
+ }, [
113
+ a,
114
+ s,
115
+ m
116
+ ]);
117
+ return p.length === 0 ? null : /* @__PURE__ */ e.createElement("div", {
118
+ className: t,
119
+ "data-columns": d
120
+ }, p.map((n, _) => {
121
+ const h = n.value ?? n.label;
122
+ return x(l, {
123
+ key: n.isOther ? g : h,
124
+ value: h,
125
+ label: n.label,
126
+ isOther: n.isOther,
127
+ isFirstOption: _ === 0
128
+ });
129
+ }));
130
+ }, q = ({ children: o, className: t }) => {
131
+ const { addOther: a, addOtherLabel: s, hasError: c, readOnly: r, value: u } = N(), { t: b } = v(), d = s || b("add-other.default-other-option-label") || g, m = f(o, V), l = f(o, W), p = L(() => !a || !u ? !1 : u.some((n) => n === d || n.startsWith(`${d}:`)), [
132
+ a,
133
+ u,
134
+ d
135
+ ]);
136
+ return /* @__PURE__ */ e.createElement("div", {
137
+ className: t,
138
+ "data-invalid": c,
139
+ "data-readonly": r
140
+ }, m, p && l);
141
+ }, i = ({ children: o }) => {
142
+ const { id: t, value: a, onChange: s, FieldLayout: c, required: r, disabled: u, readOnly: b, hasError: d, onBlur: m, onFocus: l } = N(), { inputId: p, labelId: n, ariaDescribedBy: _ } = Z(), h = L(() => a || [], [
143
+ a
144
+ ]), C = f(o, H), O = f(o, q), I = f(o, $), F = f(o, B);
145
+ return /* @__PURE__ */ e.createElement(c, {
146
+ fieldId: t,
147
+ renderLabel: () => C,
148
+ renderInput: () => /* @__PURE__ */ e.createElement(oe, {
149
+ id: p,
150
+ ariaLabelledBy: n,
151
+ ariaDescribedBy: _,
152
+ required: r,
153
+ onBlur: m,
154
+ onFocus: l
155
+ }, /* @__PURE__ */ e.createElement(z, {
156
+ "aria-labelledby": n,
157
+ value: h,
158
+ onChange: s,
159
+ isDisabled: u,
160
+ isReadOnly: b,
161
+ isRequired: r,
162
+ isInvalid: d
163
+ }, O)),
164
+ renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, F, I)
165
+ });
166
+ };
167
+ V.Option = T;
168
+ T.Label = P;
169
+ i.Label = H;
170
+ i.Control = q;
171
+ i.Options = V;
172
+ i.OtherInput = W;
173
+ i.Description = $;
174
+ i.Error = B;
175
+ const Oe = "_control_7oh59_1", Ee = "_options_7oh59_7", be = "_option_7oh59_7", fe = "_optionHover_7oh59_72", _e = "_optionSelected_7oh59_72", R = {
176
+ control: Oe,
177
+ options: Ee,
178
+ option: be,
179
+ optionHover: fe,
180
+ optionSelected: _e
181
+ }, Le = ({ content: o, locale: t }) => /* @__PURE__ */ e.createElement(Q, {
182
+ content: o,
183
+ locale: t
184
+ }), Ce = {
185
+ base: R.option,
186
+ selected: R.optionSelected,
187
+ hover: R.optionHover
188
+ }, $e = () => {
189
+ const o = de({
190
+ globalClasses: ce,
191
+ moduleClasses: Ce
192
+ }), t = me();
193
+ return /* @__PURE__ */ e.createElement(i, null, /* @__PURE__ */ e.createElement(i.Label, {
194
+ className: S(ae, y.label)
195
+ }, /* @__PURE__ */ e.createElement(i.Label.Required, {
196
+ className: S(se, y.requiredMark)
197
+ })), /* @__PURE__ */ e.createElement(i.Control, {
198
+ className: R.control
199
+ }, /* @__PURE__ */ e.createElement(i.Options, {
200
+ className: S(re, R.options)
201
+ }, /* @__PURE__ */ e.createElement(i.Options.Option, {
202
+ className: ({ isSelected: a, isHovered: s }) => o({
203
+ isSelected: a,
204
+ isHovered: s
205
+ })
206
+ }, /* @__PURE__ */ e.createElement(i.Options.Option.Label, {
207
+ className: ue.optionLabel
208
+ }))), /* @__PURE__ */ e.createElement(i.OtherInput, {
209
+ className: t
210
+ })), /* @__PURE__ */ e.createElement(i.Error, {
211
+ className: S(le, y.error)
212
+ }, /* @__PURE__ */ e.createElement(ne, null), /* @__PURE__ */ e.createElement(i.Error.Text, null)), /* @__PURE__ */ e.createElement(i.Description, {
213
+ className: S(ie, y.description)
214
+ }, Le));
215
+ };
216
+ export {
217
+ $e as T
218
+ };
@@ -1,5 +1,5 @@
1
1
  import e from "react";
2
- import { T as r } from "./tags-field-rac-ByC9DnyH.js";
2
+ import { T as r } from "./tags-field-rac-DXmZBcpO.js";
3
3
  const a = () => /* @__PURE__ */ e.createElement(r, null);
4
4
  export {
5
5
  a as TagsRAC
@@ -0,0 +1,73 @@
1
+ import { RicosViewer as N } from "@wix/ricos/viewer";
2
+ import l from "classnames";
3
+ import r, { useCallback as O, useRef as T } from "react";
4
+ import { TextField as y, TextArea as S } from "react-aria-components";
5
+ import { ai as p, af as d, ak as x } from "./form-D0eeH0lX.js";
6
+ import { f as i } from "./find-child-C60k4CxG.js";
7
+ import { D as g, E as h } from "./field-error-headless-DAy-1oAQ.js";
8
+ import { L as v } from "./field-label-headless-BWxHmO0c.js";
9
+ import { E as M } from "./error-icon-hZxQ6DEy.js";
10
+ import { s as c } from "./field-rac.module-D06m9T9x.js";
11
+ import { y as q, O as B, o as k, i as P } from "./form-element-classes-Ct1UaxuQ.js";
12
+ import { u as V } from "./use-text-input-class-name-8gMUWeCb.js";
13
+ const e = ({ children: t }) => {
14
+ const { id: a, value: m, onChange: s, disabled: u, required: n, readOnly: o, onBlur: E, onFocus: f, FieldLayout: I, hasError: b } = p(), { labelId: F } = d(), L = O((A) => {
15
+ s(A);
16
+ }, [
17
+ s
18
+ ]), R = i(t, e.Label), D = i(t, e.Input), _ = i(t, e.Description), C = i(t, e.Error);
19
+ return /* @__PURE__ */ r.createElement(I, {
20
+ fieldId: a,
21
+ renderLabel: () => R,
22
+ renderInput: () => /* @__PURE__ */ r.createElement(y, {
23
+ "aria-labelledby": F,
24
+ value: m ?? "",
25
+ onChange: L,
26
+ isDisabled: u,
27
+ isReadOnly: o,
28
+ isRequired: n,
29
+ isInvalid: b,
30
+ onBlur: E,
31
+ onFocus: f
32
+ }, D),
33
+ renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, C, _)
34
+ });
35
+ }, w = ({ className: t }) => {
36
+ const { inputId: a, ariaDescribedBy: m } = d(), { id: s, placeholder: u } = p(), n = T(null);
37
+ return x(() => {
38
+ var o;
39
+ (o = n.current) == null || o.focus();
40
+ }, s), /* @__PURE__ */ r.createElement(S, {
41
+ ref: n,
42
+ id: a,
43
+ "aria-describedby": m,
44
+ placeholder: u,
45
+ className: t
46
+ });
47
+ };
48
+ e.Label = v;
49
+ e.Input = w;
50
+ e.Description = g;
51
+ e.Error = h;
52
+ const Q = "_input_ug5v8_1", U = {
53
+ input: Q
54
+ }, $ = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(N, {
55
+ content: t,
56
+ locale: a
57
+ }), te = () => {
58
+ const t = V(U.input);
59
+ return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
60
+ className: l(q, c.label)
61
+ }, /* @__PURE__ */ r.createElement(e.Label.Required, {
62
+ className: l(B, c.requiredMark)
63
+ })), /* @__PURE__ */ r.createElement(e.Input, {
64
+ className: t
65
+ }), /* @__PURE__ */ r.createElement(e.Error, {
66
+ className: l(k, c.error)
67
+ }, /* @__PURE__ */ r.createElement(M, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
68
+ className: l(P, c.description)
69
+ }, $));
70
+ };
71
+ export {
72
+ te as T
73
+ };
@@ -1,5 +1,5 @@
1
1
  import e from "react";
2
- import { T as r } from "./text-area-field-rac-CtSa8XW_.js";
2
+ import { T as r } from "./text-area-field-rac-Cy0Mr29Z.js";
3
3
  const a = () => /* @__PURE__ */ e.createElement(r, null);
4
4
  export {
5
5
  a as TextAreaRAC
@@ -0,0 +1,28 @@
1
+ import { RicosViewer as l } from "@wix/ricos/viewer";
2
+ import t from "classnames";
3
+ import e from "react";
4
+ import { T as r } from "./text-input-headless-BUa59Rgn.js";
5
+ import { E as o } from "./error-icon-hZxQ6DEy.js";
6
+ import { s as a } from "./field-rac.module-D06m9T9x.js";
7
+ import { y as n, O as c, o as E, i } from "./form-element-classes-Ct1UaxuQ.js";
8
+ import { u as p } from "./use-text-input-class-name-8gMUWeCb.js";
9
+ const I = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
10
+ content: s,
11
+ locale: m
12
+ }), C = () => {
13
+ const s = p();
14
+ return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
15
+ className: t(n, a.label)
16
+ }, /* @__PURE__ */ e.createElement(r.Label.Required, {
17
+ className: t(c, a.requiredMark)
18
+ })), /* @__PURE__ */ e.createElement(r.Input, {
19
+ className: s
20
+ }), /* @__PURE__ */ e.createElement(r.Error, {
21
+ className: t(E, a.error)
22
+ }, /* @__PURE__ */ e.createElement(o, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
23
+ className: t(i, a.description)
24
+ }, I));
25
+ };
26
+ export {
27
+ C as T
28
+ };
@@ -1,9 +1,9 @@
1
1
  import t, { useRef as L } from "react";
2
2
  import { TextField as R, Input as v } from "react-aria-components";
3
- import { ai as d, af as c, ak as T } from "./form-f0tqdMye.js";
3
+ import { ai as d, af as c, ak as T } from "./form-D0eeH0lX.js";
4
4
  import { f as a } from "./find-child-C60k4CxG.js";
5
- import { D as g, E as h } from "./field-error-headless-BErhh9GG.js";
6
- import { L as x } from "./field-label-headless-BGyK-5xW.js";
5
+ import { D as g, E as h } from "./field-error-headless-DAy-1oAQ.js";
6
+ import { L as x } from "./field-label-headless-BWxHmO0c.js";
7
7
  const e = ({ children: r }) => {
8
8
  const { id: s, value: i, onChange: l, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: f, FieldLayout: b } = d(), { labelId: E } = c(), I = a(r, e.Label), F = a(r, e.Input), y = a(r, e.Description), D = a(r, e.Error);
9
9
  return /* @__PURE__ */ t.createElement(b, {
@@ -1,5 +1,5 @@
1
1
  import t from "react";
2
- import { T as e } from "./text-input-field-rac-C6fQYKhI.js";
2
+ import { T as e } from "./text-input-field-rac-D1TB9B_M.js";
3
3
  const o = () => /* @__PURE__ */ t.createElement(e, null);
4
4
  export {
5
5
  o as TextInputRAC
@@ -3,14 +3,14 @@ import { RicosViewer as k } from "@wix/ricos/viewer";
3
3
  import c from "classnames";
4
4
  import { parseTime as q } from "@internationalized/date";
5
5
  import { TimeField as v, DateInput as B, DateSegment as h, TimeFieldStateContext as U } from "react-aria-components";
6
- import { ai as p, af as j, as as T, ak as Q } from "./form-f0tqdMye.js";
6
+ import { ai as p, af as j, as as T, ak as Q } from "./form-D0eeH0lX.js";
7
7
  import { f as m, a as F } from "./find-child-C60k4CxG.js";
8
- import { D as z, E as G } from "./field-error-headless-BErhh9GG.js";
9
- import { L as J } from "./field-label-headless-BGyK-5xW.js";
8
+ import { D as z, E as G } from "./field-error-headless-DAy-1oAQ.js";
9
+ import { L as J } from "./field-label-headless-BWxHmO0c.js";
10
10
  import { E as K } from "./error-icon-hZxQ6DEy.js";
11
11
  import { H as S } from "./custom-focus-class-_483Pkwp.js";
12
- import { s as E } from "./field-rac.module-ColNPUt0.js";
13
- import { y as W, O as X, x as Y, o as Z, i as $ } from "./form-element-classes-jC8D0LnK.js";
12
+ import { s as E } from "./field-rac.module-D06m9T9x.js";
13
+ import { y as W, O as X, x as Y, o as Z, i as $ } from "./form-element-classes-Ct1UaxuQ.js";
14
14
  const r = ({ children: t }) => {
15
15
  const { id: n, value: l, onChange: o, disabled: i, readOnly: s, required: a, onBlur: d, onFocus: f, use24HourFormat: b, FieldLayout: I, hasError: C } = p(), { inputId: L, ariaDescribedBy: g, labelId: D } = j(), R = H((M) => {
16
16
  const w = ae(M);
@@ -0,0 +1,75 @@
1
+ import { RicosViewer as O } from "@wix/ricos/viewer";
2
+ import i from "classnames";
3
+ import r, { useCallback as S, useRef as h } from "react";
4
+ import { TextField as y, Input as A } from "react-aria-components";
5
+ import { ai as d, af as E, ak as k } from "./form-D0eeH0lX.js";
6
+ import { f as c } from "./find-child-C60k4CxG.js";
7
+ import { D as B, E as T } from "./field-error-headless-DAy-1oAQ.js";
8
+ import { L as g } from "./field-label-headless-BWxHmO0c.js";
9
+ import { u as v } from "./use-invoke-callback-UH73A_J3.js";
10
+ import { E as M } from "./error-icon-hZxQ6DEy.js";
11
+ import { s as u } from "./field-rac.module-D06m9T9x.js";
12
+ import { y as P, O as q, o as x, i as U } from "./form-element-classes-Ct1UaxuQ.js";
13
+ import { u as w } from "./use-text-input-class-name-8gMUWeCb.js";
14
+ const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
15
+ const { id: o, value: a, onChange: s, disabled: m, readOnly: n, required: l, hasError: I, onBlur: f, onFocus: b, FieldLayout: R } = d(), { labelId: F } = E(), p = v(f), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), N = S(() => {
16
+ s(V(a)), p();
17
+ }, [
18
+ p,
19
+ s,
20
+ a
21
+ ]);
22
+ return /* @__PURE__ */ r.createElement(R, {
23
+ fieldId: o,
24
+ renderLabel: () => L,
25
+ renderInput: () => /* @__PURE__ */ r.createElement(y, {
26
+ "aria-labelledby": F,
27
+ value: a ?? "",
28
+ onChange: s,
29
+ isDisabled: m,
30
+ isReadOnly: n,
31
+ isRequired: l,
32
+ isInvalid: I,
33
+ onBlur: N,
34
+ onFocus: b
35
+ }, D),
36
+ renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, C)
37
+ });
38
+ }, W = ({ className: t }) => {
39
+ const { id: o, placeholder: a } = d(), { inputId: s, ariaDescribedBy: m } = E(), n = h(null);
40
+ return k(() => {
41
+ var l;
42
+ (l = n.current) == null || l.focus();
43
+ }, o), /* @__PURE__ */ r.createElement(A, {
44
+ ref: n,
45
+ id: s,
46
+ type: "url",
47
+ "aria-describedby": m,
48
+ className: t,
49
+ placeholder: a
50
+ });
51
+ };
52
+ e.Label = g;
53
+ e.Input = W;
54
+ e.Description = B;
55
+ e.Error = T;
56
+ const $ = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(O, {
57
+ content: t,
58
+ locale: o
59
+ }), oe = () => {
60
+ const t = w();
61
+ return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
62
+ className: i(P, u.label)
63
+ }, /* @__PURE__ */ r.createElement(e.Label.Required, {
64
+ className: i(q, u.requiredMark)
65
+ })), /* @__PURE__ */ r.createElement(e.Input, {
66
+ className: t
67
+ }), /* @__PURE__ */ r.createElement(e.Error, {
68
+ className: i(x, u.error)
69
+ }, /* @__PURE__ */ r.createElement(M, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
70
+ className: i(U, u.description)
71
+ }, $));
72
+ };
73
+ export {
74
+ oe as U
75
+ };
@@ -1,5 +1,5 @@
1
1
  import r from "react";
2
- import { U as t } from "./url-input-field-rac-4T8gcMHH.js";
2
+ import { U as t } from "./url-input-field-rac-DINXfZdf.js";
3
3
  const n = () => /* @__PURE__ */ r.createElement(t, null);
4
4
  export {
5
5
  n as UrlInputRAC
@@ -0,0 +1,20 @@
1
+ import p from "classnames";
2
+ import { ac as E } from "./form-D0eeH0lX.js";
3
+ const k = ({ globalClasses: e, moduleClasses: c }) => {
4
+ var d;
5
+ const r = ((d = E(e.key)) == null ? void 0 : d.split(/\s+/)) ?? [], o = [
6
+ e.selected,
7
+ e.hover
8
+ ], u = !!e.selected && r.includes(e.selected), N = r.includes(e.hover);
9
+ return ({ isSelected: m, isHovered: n, isInteractive: t = !0 }) => p(e.base, c.base, t ? r : r.filter((h) => !o.includes(h)), {
10
+ [e.hover]: t && n,
11
+ [c.hover]: t && (n || N)
12
+ }, e.selected && {
13
+ [e.selected]: t && m
14
+ }, c.selected && {
15
+ [c.selected]: t && (m || u)
16
+ });
17
+ };
18
+ export {
19
+ k as u
20
+ };
@@ -1,5 +1,5 @@
1
1
  import { useState as o, useCallback as D, useEffect as m, useMemo as b } from "react";
2
- import { ah as v } from "./form-f0tqdMye.js";
2
+ import { ah as v } from "./form-D0eeH0lX.js";
3
3
  const k = (h) => {
4
4
  const { fieldType: I, isEditor: t = !1, postProcessOptions: i, customFetchLogic: a, onInitialDataLoaded: n } = h, [L, O] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(I), r = D((e) => {
5
5
  let d = e.map((l) => ({
@@ -0,0 +1,24 @@
1
+ import { ai as l } from "./form-D0eeH0lX.js";
2
+ import { s } from "./field-rac.module-D06m9T9x.js";
3
+ import { a0 as i } from "./form-element-classes-Ct1UaxuQ.js";
4
+ import { u as m } from "./use-element-state-class-name-j8W1zbdG.js";
5
+ const c = (...e) => {
6
+ const { disabled: a, readOnly: t } = l(), o = m({
7
+ globalClasses: i,
8
+ moduleClasses: {
9
+ base: [
10
+ s.input,
11
+ ...e
12
+ ].join(" "),
13
+ hover: s.inputHover
14
+ }
15
+ });
16
+ return ({ isHovered: r }) => o({
17
+ isSelected: !1,
18
+ isHovered: r,
19
+ isInteractive: !a && !t
20
+ });
21
+ };
22
+ export {
23
+ c as u
24
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/form-elements",
3
- "version": "1.81.0",
3
+ "version": "1.83.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": [
@@ -151,5 +151,5 @@
151
151
  ]
152
152
  }
153
153
  },
154
- "falconPackageHash": "db40d7d28b6f8133fa23c3e988f9d61d091dd06ed55cb7ead11bf3a5"
154
+ "falconPackageHash": "8fedacaee7ad7b436b17b3900bbe971ea77e116c86c3ea714571e0ce"
155
155
  }
@@ -1,41 +0,0 @@
1
- import { RicosViewer as n } from "@wix/ricos/viewer";
2
- import a from "classnames";
3
- import e from "react";
4
- import { C as t } from "./checkbox-group-field-headless-Bx5Y-RMP.js";
5
- import { E as m } from "./error-icon-hZxQ6DEy.js";
6
- import { C as c } from "./checkbox-indicator-module-classes-DqzGZQRQ.js";
7
- import { s } from "./field-rac.module-ColNPUt0.js";
8
- import { y as i, O as E, c as O, e as p, x as C, o as _, i as L, d as R } from "./form-element-classes-jC8D0LnK.js";
9
- import { o as r } from "./options-rac.module-KM-VT_KY.js";
10
- import { u as I } from "./use-element-state-class-name-BqmaTba3.js";
11
- const S = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(n, {
12
- content: o,
13
- locale: l
14
- }), h = () => {
15
- const o = I({
16
- globalClasses: R,
17
- moduleClasses: c
18
- });
19
- return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
20
- className: a(i, s.label)
21
- }, /* @__PURE__ */ e.createElement(t.Label.Required, {
22
- className: a(E, s.requiredMark)
23
- })), /* @__PURE__ */ e.createElement(t.Options, {
24
- className: a(O, r.options)
25
- }, /* @__PURE__ */ e.createElement(t.Options.Option, null, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox, {
26
- className: s.checkbox
27
- }, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Input, {
28
- className: o
29
- }), /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Label, {
30
- className: a(p, r.optionLabel)
31
- })), /* @__PURE__ */ e.createElement(t.Options.Option.OtherInput, {
32
- inputClassName: a(C, s.input)
33
- }))), /* @__PURE__ */ e.createElement(t.Error, {
34
- className: a(_, s.error)
35
- }, /* @__PURE__ */ e.createElement(m, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
36
- className: a(L, s.description)
37
- }, S));
38
- };
39
- export {
40
- h as C
41
- };
@@ -1,23 +0,0 @@
1
- const o = "_label_yhtg3_1", t = "_requiredMark_yhtg3_11", e = "_input_yhtg3_16", n = "_inputGroup_yhtg3_17", c = "_innerInput_yhtg3_129", _ = "_dropdownTrigger_yhtg3_177", r = "_dropdownIcon_yhtg3_187", p = "_dropdownPopover_yhtg3_206", s = "_selectPopover_yhtg3_210", u = "_selectOption_yhtg3_237", h = "_selectOptionWithoutFocusRing_yhtg3_261", i = "_description_yhtg3_267", d = "_error_yhtg3_283", g = "_checkbox_yhtg3_302", l = "_checkboxInput_yhtg3_325", y = "_checkboxInputSelected_yhtg3_364", b = "_checkboxInputHover_yhtg3_368", k = "_uploadButton_yhtg3_415", I = {
2
- label: o,
3
- requiredMark: t,
4
- input: e,
5
- inputGroup: n,
6
- innerInput: c,
7
- dropdownTrigger: _,
8
- dropdownIcon: r,
9
- dropdownPopover: p,
10
- selectPopover: s,
11
- selectOption: u,
12
- selectOptionWithoutFocusRing: h,
13
- description: i,
14
- error: d,
15
- checkbox: g,
16
- checkboxInput: l,
17
- checkboxInputSelected: y,
18
- checkboxInputHover: b,
19
- uploadButton: k
20
- };
21
- export {
22
- I as s
23
- };