@wix/form-elements 1.84.0 → 1.86.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 (107) hide show
  1. package/dist/component/{appointment-rac-BSy3u0GK.js → appointment-rac-DiPF4326.js} +78 -78
  2. package/dist/component/{bookings-address-rac-CL7Bh1yH.js → bookings-address-rac-DuqMUPYH.js} +1 -1
  3. package/dist/component/{bookings-email-rac-Bw9tj_tv.js → bookings-email-rac-C4uKdWr-.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-BOOu_AXM.js → bookings-first-name-rac-D8Iu-SNH.js} +1 -1
  5. package/dist/component/{bookings-header-rac-3kBei7GF.js → bookings-header-rac-Df7inEbP.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-CUKbu22q.js → bookings-last-name-rac-3GrFylkJ.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-CLrUhdX2.js → bookings-login-bar-rac-Cmm93hGY.js} +6 -6
  8. package/dist/component/{bookings-phone-rac-7DViellg.js → bookings-phone-rac-CfdQ5qR1.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-CIUZX--G.js → bookings-rich-text-rac-CAFLGrDr.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-C_jth3RK.js → checkbox-field-rac-D4TSHtYp.js} +5 -5
  11. package/dist/component/{checkbox-group-field-headless-D-c9Kyj8.js → checkbox-group-field-headless-BtorRj0k.js} +30 -30
  12. package/dist/component/{checkbox-group-field-rac-MgGUuYII.js → checkbox-group-field-rac-CSZjtiTd.js} +6 -6
  13. package/dist/component/{checkbox-group-rac-rr1mN2EJ.js → checkbox-group-rac-DVa2KhXh.js} +1 -1
  14. package/dist/component/{checkbox-rac-CRsLQKhN.js → checkbox-rac-BEAyFkKn.js} +1 -1
  15. package/dist/component/{contacts-address-rac-BFlNbQKh.js → contacts-address-rac-DRiJ7oWN.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-D7Ww3iAz.js → contacts-birthdate-rac-pFthm4vI.js} +1 -1
  17. package/dist/component/{contacts-company-rac-DLl4nqH-.js → contacts-company-rac-Bkf19ZXI.js} +1 -1
  18. package/dist/component/{contacts-email-rac-K8fCs8qS.js → contacts-email-rac-eG6dMktK.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-BOTxHl3m.js → contacts-first-name-rac-BGM8vurp.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-bFnG-7Hm.js → contacts-last-name-rac-CB3YwF_-.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-B4teqDIV.js → contacts-phone-rac-C-k6Np0j.js} +1 -1
  22. package/dist/component/{contacts-position-rac-CnWoXO5h.js → contacts-position-rac-DbBwVhvF.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-Bco722BU.js → contacts-subscribe-rac-DPFEKv8D.js} +2 -2
  24. package/dist/component/{contacts-tax-id-rac-QQsKhAx3.js → contacts-tax-id-rac-DUe69xy2.js} +1 -1
  25. package/dist/component/{date-availability-DMbyb1GZ.js → date-availability-LsRBBF2w.js} +1 -1
  26. package/dist/component/{date-input-field-rac-CVRjO19U.js → date-input-field-rac-8tT_tvxK.js} +43 -43
  27. package/dist/component/{date-input-rac-zi7AQ8Ai.js → date-input-rac-XNgfU9bx.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-5H10gH9D.js → date-picker-field-rac-BrVIS9sI.js} +20 -20
  29. package/dist/component/{date-picker-rac-CxWNDsyJ.js → date-picker-rac-ldp-6ccS.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-CDa-nyf8.js → date-time-input-field-rac-CoHc9hOG.js} +5 -5
  31. package/dist/component/{date-time-input-rac-DglwFYb0.js → date-time-input-rac-BaCayitG.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-BBB652Uy.js → dext-checkbox-group-rac-Zhmol3mv.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-BVtiGV3w.js → dext-checkbox-rac-ByYJS2iR.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-Di4x6sI_.js → dext-date-picker-rac-DsKWfvPj.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-agWHwUo7.js → dext-date-time-input-rac-BEinQWMz.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-U3FZTA2-.js → dext-dropdown-rac-FuoCb4hK.js} +1 -1
  37. package/dist/component/{dext-email-rac-CZ9AQw_k.js → dext-email-rac-CfTAbFH5.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-DFr_9ZX5.js → dext-number-input-rac-CwGC_pv7.js} +1 -1
  39. package/dist/component/{dext-phone-rac-BYsfNwXn.js → dext-phone-rac-CgMCLDYK.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-B_jm5YAT.js → dext-radio-group-rac-XB40HDWO.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-CNlhMKt-.js → dext-rating-input-rac-BeoGv6No.js} +1 -1
  42. package/dist/component/{dext-tags-rac-y9x8Fg54.js → dext-tags-rac-DJ0DWl1v.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-BgRxIpn9.js → dext-text-area-rac-3X-i3Lf_.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-CdzgUZ38.js → dext-text-input-rac-DJa5OTo5.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-Cg1TYyNV.js → dext-url-input-rac-DgsZYkzF.js} +1 -1
  46. package/dist/component/{donation-rac-Deiw7Tl9.js → donation-rac-DvklUsO9.js} +43 -43
  47. package/dist/component/{dropdown-field-headless-BKj2rdy9.js → dropdown-field-headless-CMvvmkUR.js} +11 -11
  48. package/dist/component/{dropdown-field-rac-CIdC2_O3.js → dropdown-field-rac-Dogcbl1j.js} +5 -5
  49. package/dist/component/{dropdown-rac-CYxaJrXP.js → dropdown-rac-CMCVoUmd.js} +1 -1
  50. package/dist/component/{ecom-address-rac-Crr3A_iU.js → ecom-address-rac-B-x688-1.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-DdXAex4c.js → ecom-subscription-checkbox-rac-2SO8p_Mh.js} +3 -3
  52. package/dist/component/{email-input-field-rac-C516Fm0v.js → email-input-field-rac-CWVqDqUg.js} +54 -54
  53. package/dist/component/{events-repeater-rac-DL49KaIU.js → events-repeater-rac-Br-ida6_.js} +30 -30
  54. package/dist/component/{events-rsvp-rac-B5EvAP8x.js → events-rsvp-rac-BwABDdyN.js} +3 -3
  55. package/dist/component/{field-error-headless-D2CJ4Qk7.js → field-error-headless-D4iJBghM.js} +1 -1
  56. package/dist/component/{field-label-headless-D2-WvVKT.js → field-label-headless-CzJhv-wS.js} +7 -7
  57. package/dist/component/{file-upload-rac-BG3msdbn.js → file-upload-rac-DU6INU4J.js} +85 -85
  58. package/dist/component/{fixed-payment-rac-3bI_h_W0.js → fixed-payment-rac-DEn6L3zu.js} +12 -12
  59. package/dist/component/{form-B3KiRFhB.js → form-Dt3W_RUv.js} +2229 -2203
  60. package/dist/component/{form-element-classes-Ct1UaxuQ.js → form-element-classes-BhFk9Jrj.js} +85 -54
  61. package/dist/component/form.css +1 -1
  62. package/dist/component/form.js +1 -1
  63. package/dist/component/{header-field-rac-Bp7hStrt.js → header-field-rac-D0K0BqUG.js} +5 -5
  64. package/dist/component/{header-rac-yVYId2B_.js → header-rac-DyIg-Ltz.js} +1 -1
  65. package/dist/component/{image-choice-rac-D1mqJfcn.js → image-choice-rac-DMjIkxUy.js} +42 -42
  66. package/dist/component/{index-B0PANcv8.js → index-BovDughA.js} +4 -4
  67. package/dist/component/{index-LrdDmlej.js → index-DiFa7GGa.js} +2 -2
  68. package/dist/component/{isObjectLike-DH7T0Txd.js → isObjectLike-CUZBx88n.js} +1 -1
  69. package/dist/component/{multiline-address-field-rac-C-gtuNCU.js → multiline-address-field-rac-CK5u9I0i.js} +128 -128
  70. package/dist/component/{multiline-address-rac-B3ixmNqi.js → multiline-address-rac-w0tpyTzt.js} +1 -1
  71. package/dist/component/{number-input-field-rac-BNPMYFay.js → number-input-field-rac-CVOSoBnw.js} +30 -30
  72. package/dist/component/{number-input-rac-BaEBt2uf.js → number-input-rac-DXEMqaqN.js} +1 -1
  73. package/dist/component/{password-rac-B0H_ILkt.js → password-rac-9pZro4oK.js} +19 -19
  74. package/dist/component/{payment-input-rac-LIk9MP5a.js → payment-input-rac-D9oGt1IQ.js} +17 -17
  75. package/dist/component/{phone-input-field-rac-CUUAacDK.js → phone-input-field-rac-B_MnDM0g.js} +40 -40
  76. package/dist/component/{phone-rac-BYqYOw60.js → phone-rac-BqoY5RbY.js} +1 -1
  77. package/dist/component/{product-list-rac-CvoI6ajr.js → product-list-rac-B_ZzTsCB.js} +41 -41
  78. package/dist/component/{quiz-radio-group-rac-D0IJGSh0.js → quiz-radio-group-rac-Ct2fFqIn.js} +2 -2
  79. package/dist/component/{radio-button-module-classes-CWfSY9kQ.js → radio-button-module-classes-PHiNEQN2.js} +7 -7
  80. package/dist/component/{radio-group-field-rac-DisEhh0b.js → radio-group-field-rac-Dfs4JSH_.js} +4 -4
  81. package/dist/component/{radio-group-rac-DrwjFNWh.js → radio-group-rac-D9SSPWcI.js} +1 -1
  82. package/dist/component/{rating-input-field-rac-BLMQWT7z.js → rating-input-field-rac-BFdsvsk2.js} +16 -16
  83. package/dist/component/{rating-input-rac-CGJY2HSO.js → rating-input-rac-hG1mVqe-.js} +1 -1
  84. package/dist/component/{rich-content-rac.module-C9cKdumu.js → rich-content-rac.module-BnJHWZW_.js} +1 -1
  85. package/dist/component/{rich-text-field-rac-DTSRvaTK.js → rich-text-field-rac-CYRioe4F.js} +3 -3
  86. package/dist/component/{rich-text-rac-Blk3neHN.js → rich-text-rac-BVFGMc9w.js} +1 -1
  87. package/dist/component/{service-dropdown-rac-C9P5IWrV.js → service-dropdown-rac-BDrEc7Zb.js} +20 -20
  88. package/dist/component/{services-multi-choice-rac-Cnhwy1a9.js → services-multi-choice-rac-RauhMlXM.js} +7 -7
  89. package/dist/component/{signature-rac-Benar-ci.js → signature-rac-eZQzl11r.js} +41 -41
  90. package/dist/component/submit-button-rac-DeGY6ugG.js +142 -0
  91. package/dist/component/{tags-field-rac-wA_0ZinI.js → tags-field-rac-CZ5TvoyT.js} +72 -72
  92. package/dist/component/{tags-rac-BcVGekA6.js → tags-rac-DXznht8H.js} +1 -1
  93. package/dist/component/{text-area-field-rac-VpuojNac.js → text-area-field-rac-B5qohjUV.js} +25 -25
  94. package/dist/component/{text-area-rac-DDvi8u5M.js → text-area-rac-B1KlbayF.js} +1 -1
  95. package/dist/component/{text-input-field-rac-C6LohBtn.js → text-input-field-rac-CHQcR47F.js} +3 -3
  96. package/dist/component/{text-input-headless-5yKhWpLD.js → text-input-headless-CRm8bo7P.js} +10 -10
  97. package/dist/component/{text-input-rac-C8hsNUp6.js → text-input-rac-BfQViUSp.js} +1 -1
  98. package/dist/component/{time-input-rac-fOT-pjju.js → time-input-rac-BhhojlSG.js} +19 -19
  99. package/dist/component/{url-input-field-rac-DxR6Hymf.js → url-input-field-rac-cvzCBb8W.js} +19 -19
  100. package/dist/component/{url-input-rac-B928R10o.js → url-input-rac-C_sH1Z5C.js} +1 -1
  101. package/dist/component/use-element-state-class-name-CeL6xkSj.js +22 -0
  102. package/dist/component/{use-service-options-base-UyJmT2P6.js → use-service-options-base-_vksQyAH.js} +5 -5
  103. package/dist/component/{use-text-input-class-name-Qk2v8a6-.js → use-text-input-class-name-DLHJl2sm.js} +5 -5
  104. package/dist/form.d.ts +105 -2
  105. package/package.json +6 -3
  106. package/dist/component/submit-button-rac-BDJQsZC3.js +0 -116
  107. package/dist/component/use-element-state-class-name-CBjBYCW5.js +0 -20
@@ -1,17 +1,17 @@
1
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-B3KiRFhB.js";
2
+ import o from "classnames";
3
+ import r, { useCallback as T, useRef as y } from "react";
4
+ import { TextField as O, TextArea as S } from "react-aria-components";
5
+ import { aj as p, ag as d, al as x } from "./form-Dt3W_RUv.js";
6
6
  import { f as i } from "./find-child-C60k4CxG.js";
7
- import { D as g, E as h } from "./field-error-headless-D2CJ4Qk7.js";
8
- import { L as v } from "./field-label-headless-D2-WvVKT.js";
7
+ import { D as g, E as h } from "./field-error-headless-D4iJBghM.js";
8
+ import { L as v } from "./field-label-headless-CzJhv-wS.js";
9
9
  import { E as M } from "./error-icon-hZxQ6DEy.js";
10
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-Qk2v8a6-.js";
11
+ import { y as q, P as B, o as P, i as k } from "./form-element-classes-BhFk9Jrj.js";
12
+ import { u as V } from "./use-text-input-class-name-DLHJl2sm.js";
13
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) => {
14
+ const { id: a, value: m, onChange: s, disabled: u, required: n, readOnly: l, onBlur: E, onFocus: f, FieldLayout: I, hasError: b } = p(), { labelId: F } = d(), L = T((A) => {
15
15
  s(A);
16
16
  }, [
17
17
  s
@@ -19,12 +19,12 @@ const e = ({ children: t }) => {
19
19
  return /* @__PURE__ */ r.createElement(I, {
20
20
  fieldId: a,
21
21
  renderLabel: () => R,
22
- renderInput: () => /* @__PURE__ */ r.createElement(y, {
22
+ renderInput: () => /* @__PURE__ */ r.createElement(O, {
23
23
  "aria-labelledby": F,
24
24
  value: m ?? "",
25
25
  onChange: L,
26
26
  isDisabled: u,
27
- isReadOnly: o,
27
+ isReadOnly: l,
28
28
  isRequired: n,
29
29
  isInvalid: b,
30
30
  onBlur: E,
@@ -32,11 +32,11 @@ const e = ({ children: t }) => {
32
32
  }, D),
33
33
  renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, C, _)
34
34
  });
35
- }, w = ({ className: t }) => {
36
- const { inputId: a, ariaDescribedBy: m } = d(), { id: s, placeholder: u } = p(), n = T(null);
35
+ }, j = ({ className: t }) => {
36
+ const { inputId: a, ariaDescribedBy: m } = d(), { id: s, placeholder: u } = p(), n = y(null);
37
37
  return x(() => {
38
- var o;
39
- (o = n.current) == null || o.focus();
38
+ var l;
39
+ (l = n.current) == null || l.focus();
40
40
  }, s), /* @__PURE__ */ r.createElement(S, {
41
41
  ref: n,
42
42
  id: a,
@@ -46,27 +46,27 @@ const e = ({ children: t }) => {
46
46
  });
47
47
  };
48
48
  e.Label = v;
49
- e.Input = w;
49
+ e.Input = j;
50
50
  e.Description = g;
51
51
  e.Error = h;
52
- const Q = "_input_ug5v8_1", U = {
53
- input: Q
54
- }, $ = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(N, {
52
+ const w = "_input_ug5v8_1", Q = {
53
+ input: w
54
+ }, U = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(N, {
55
55
  content: t,
56
56
  locale: a
57
57
  }), te = () => {
58
- const t = V(U.input);
58
+ const t = V(Q.input);
59
59
  return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
60
- className: l(q, c.label)
60
+ className: o(q, c.label)
61
61
  }, /* @__PURE__ */ r.createElement(e.Label.Required, {
62
- className: l(B, c.requiredMark)
62
+ className: o(B, c.requiredMark)
63
63
  })), /* @__PURE__ */ r.createElement(e.Input, {
64
64
  className: t
65
65
  }), /* @__PURE__ */ r.createElement(e.Error, {
66
- className: l(k, c.error)
66
+ className: o(P, c.error)
67
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
- }, $));
68
+ className: o(k, c.description)
69
+ }, U));
70
70
  };
71
71
  export {
72
72
  te as T
@@ -1,5 +1,5 @@
1
1
  import e from "react";
2
- import { T as r } from "./text-area-field-rac-VpuojNac.js";
2
+ import { T as r } from "./text-area-field-rac-B5qohjUV.js";
3
3
  const a = () => /* @__PURE__ */ e.createElement(r, null);
4
4
  export {
5
5
  a as TextAreaRAC
@@ -1,11 +1,11 @@
1
1
  import { RicosViewer as l } from "@wix/ricos/viewer";
2
2
  import t from "classnames";
3
3
  import e from "react";
4
- import { T as r } from "./text-input-headless-5yKhWpLD.js";
4
+ import { T as r } from "./text-input-headless-CRm8bo7P.js";
5
5
  import { E as o } from "./error-icon-hZxQ6DEy.js";
6
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-Qk2v8a6-.js";
7
+ import { y as n, P as c, o as E, i } from "./form-element-classes-BhFk9Jrj.js";
8
+ import { u as p } from "./use-text-input-class-name-DLHJl2sm.js";
9
9
  const I = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
10
10
  content: s,
11
11
  locale: m
@@ -1,12 +1,12 @@
1
1
  import t, { useRef as L } from "react";
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-B3KiRFhB.js";
2
+ import { TextField as R, Input as g } from "react-aria-components";
3
+ import { aj as d, ag as c, al as v } from "./form-Dt3W_RUv.js";
4
4
  import { f as a } from "./find-child-C60k4CxG.js";
5
- import { D as g, E as h } from "./field-error-headless-D2CJ4Qk7.js";
6
- import { L as x } from "./field-label-headless-D2-WvVKT.js";
5
+ import { D as T, E as h } from "./field-error-headless-D4iJBghM.js";
6
+ import { L as x } from "./field-label-headless-CzJhv-wS.js";
7
7
  const e = ({ children: r }) => {
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
- return /* @__PURE__ */ t.createElement(b, {
8
+ const { id: s, value: i, onChange: l, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: b, FieldLayout: f } = 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
+ return /* @__PURE__ */ t.createElement(f, {
10
10
  fieldId: s,
11
11
  renderLabel: () => I,
12
12
  renderInput: () => /* @__PURE__ */ t.createElement(R, {
@@ -18,16 +18,16 @@ const e = ({ children: r }) => {
18
18
  isRequired: o,
19
19
  isInvalid: p,
20
20
  onBlur: m,
21
- onFocus: f
21
+ onFocus: b
22
22
  }, F),
23
23
  renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, D, y)
24
24
  });
25
25
  }, B = ({ className: r }) => {
26
26
  const { id: s, placeholder: i } = d(), { inputId: l, ariaDescribedBy: u } = c(), n = L(null);
27
- return T(() => {
27
+ return v(() => {
28
28
  var o;
29
29
  (o = n.current) == null || o.focus();
30
- }, s), /* @__PURE__ */ t.createElement(v, {
30
+ }, s), /* @__PURE__ */ t.createElement(g, {
31
31
  ref: n,
32
32
  id: l,
33
33
  "aria-describedby": u,
@@ -37,7 +37,7 @@ const e = ({ children: r }) => {
37
37
  };
38
38
  e.Label = x;
39
39
  e.Input = B;
40
- e.Description = g;
40
+ e.Description = T;
41
41
  e.Error = h;
42
42
  export {
43
43
  e as T
@@ -1,5 +1,5 @@
1
1
  import t from "react";
2
- import { T as e } from "./text-input-field-rac-C6LohBtn.js";
2
+ import { T as e } from "./text-input-field-rac-CHQcR47F.js";
3
3
  const o = () => /* @__PURE__ */ t.createElement(e, null);
4
4
  export {
5
5
  o as TextInputRAC
@@ -1,32 +1,32 @@
1
- import e, { useCallback as V, useRef as x, useContext as k } from "react";
2
- import { RicosViewer as q } from "@wix/ricos/viewer";
1
+ import e, { useCallback as V, useRef as x, useContext as q } from "react";
2
+ import { RicosViewer as v } from "@wix/ricos/viewer";
3
3
  import c from "classnames";
4
- import { parseTime as v } from "@internationalized/date";
5
- import { TimeField as B, DateInput as U, DateSegment as _, TimeFieldStateContext as w } from "react-aria-components";
6
- import { ai as p, af as j, as as S, ak as Q } from "./form-B3KiRFhB.js";
4
+ import { parseTime as B } from "@internationalized/date";
5
+ import { TimeField as k, DateInput as U, DateSegment as _, TimeFieldStateContext as j } from "react-aria-components";
6
+ import { aj as p, ag as w, at as S, al as Q } from "./form-Dt3W_RUv.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-D2CJ4Qk7.js";
9
- import { L as J } from "./field-label-headless-D2-WvVKT.js";
8
+ import { D as z, E as G } from "./field-error-headless-D4iJBghM.js";
9
+ import { L as J } from "./field-label-headless-CzJhv-wS.js";
10
10
  import { E as K } from "./error-icon-hZxQ6DEy.js";
11
11
  import { H as T } from "./custom-focus-class-_483Pkwp.js";
12
12
  import { s as f } from "./field-rac.module-D06m9T9x.js";
13
- import { y as W, O as X, o as Y, i as Z } from "./form-element-classes-Ct1UaxuQ.js";
14
- import { u as $ } from "./use-text-input-class-name-Qk2v8a6-.js";
13
+ import { y as W, P as X, o as Y, i as Z } from "./form-element-classes-BhFk9Jrj.js";
14
+ import { u as $ } from "./use-text-input-class-name-DLHJl2sm.js";
15
15
  const r = ({ children: t }) => {
16
- const { id: n, value: l, onChange: o, disabled: i, readOnly: s, required: a, onBlur: d, onFocus: E, use24HourFormat: C, FieldLayout: g, hasError: I } = p(), { inputId: D, ariaDescribedBy: L, labelId: R } = j(), b = V((M) => {
16
+ const { id: n, value: l, onChange: o, disabled: i, readOnly: s, required: a, onBlur: d, onFocus: E, use24HourFormat: g, FieldLayout: C, hasError: I } = p(), { inputId: D, ariaDescribedBy: L, labelId: R } = w(), b = V((M) => {
17
17
  const H = ae(M);
18
18
  o(H);
19
19
  }, [
20
20
  o
21
- ]), N = m(t, r.Label), y = m(t, r.Time), O = m(t, r.Description), P = m(t, r.Error), A = ne(l);
22
- return /* @__PURE__ */ e.createElement(g, {
21
+ ]), N = m(t, r.Label), y = m(t, r.Time), P = m(t, r.Description), A = m(t, r.Error), O = ne(l);
22
+ return /* @__PURE__ */ e.createElement(C, {
23
23
  fieldId: n,
24
24
  renderLabel: () => N,
25
- renderInput: () => /* @__PURE__ */ e.createElement(B, {
25
+ renderInput: () => /* @__PURE__ */ e.createElement(k, {
26
26
  "aria-labelledby": R,
27
27
  id: D,
28
28
  "aria-describedby": L,
29
- value: A,
29
+ value: O,
30
30
  onChange: b,
31
31
  isDisabled: i,
32
32
  isReadOnly: s,
@@ -34,9 +34,9 @@ const r = ({ children: t }) => {
34
34
  isRequired: a,
35
35
  onBlur: d,
36
36
  onFocus: E,
37
- hourCycle: C ? 24 : 12
37
+ hourCycle: g ? 24 : 12
38
38
  }, y),
39
- renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, P, O)
39
+ renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, A, P)
40
40
  });
41
41
  }, u = ({ children: t, className: n }) => {
42
42
  const { hasError: l } = p(), o = m(t, u.Hour), i = m(t, u.Minute), s = m(t, u.Period);
@@ -90,7 +90,7 @@ const r = ({ children: t }) => {
90
90
  }
91
91
  });
92
92
  }, re = ({ className: t, ...n }) => {
93
- const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = S(), s = k(w), a = l ? void 0 : i("field.date.placeholder.period"), d = () => s == null ? void 0 : s.increment("dayPeriod");
93
+ const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = S(), s = q(j), a = l ? void 0 : i("field.date.placeholder.period"), d = () => s == null ? void 0 : s.increment("dayPeriod");
94
94
  return /* @__PURE__ */ e.createElement(_, {
95
95
  segment: o,
96
96
  className: t,
@@ -111,7 +111,7 @@ function ne(t) {
111
111
  if (!t)
112
112
  return null;
113
113
  try {
114
- return v(t);
114
+ return B(t);
115
115
  } catch {
116
116
  return null;
117
117
  }
@@ -131,7 +131,7 @@ const oe = "_time_10p0h_1", se = "_hour_10p0h_14", le = "_minute_10p0h_15", ie =
131
131
  hour: se,
132
132
  minute: le,
133
133
  period: ie
134
- }, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(q, {
134
+ }, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(v, {
135
135
  content: t,
136
136
  locale: n
137
137
  }), me = () => {
@@ -1,18 +1,18 @@
1
- import { RicosViewer as O } from "@wix/ricos/viewer";
1
+ import { RicosViewer as S } from "@wix/ricos/viewer";
2
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-B3KiRFhB.js";
3
+ import r, { useCallback as h, useRef as y } from "react";
4
+ import { TextField as O, Input as A } from "react-aria-components";
5
+ import { aj as d, ag as E, al as g } from "./form-Dt3W_RUv.js";
6
6
  import { f as c } from "./find-child-C60k4CxG.js";
7
- import { D as B, E as T } from "./field-error-headless-D2CJ4Qk7.js";
8
- import { L as g } from "./field-label-headless-D2-WvVKT.js";
9
- import { u as v } from "./use-invoke-callback-UH73A_J3.js";
10
- import { E as M } from "./error-icon-hZxQ6DEy.js";
7
+ import { D as B, E as P } from "./field-error-headless-D4iJBghM.js";
8
+ import { L as T } from "./field-label-headless-CzJhv-wS.js";
9
+ import { u as k } from "./use-invoke-callback-UH73A_J3.js";
10
+ import { E as v } from "./error-icon-hZxQ6DEy.js";
11
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-Qk2v8a6-.js";
12
+ import { y as M, P as q, o as x, i as U } from "./form-element-classes-BhFk9Jrj.js";
13
+ import { u as w } from "./use-text-input-class-name-DLHJl2sm.js";
14
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(() => {
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 = k(f), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), N = h(() => {
16
16
  s(V(a)), p();
17
17
  }, [
18
18
  p,
@@ -22,7 +22,7 @@ const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
22
22
  return /* @__PURE__ */ r.createElement(R, {
23
23
  fieldId: o,
24
24
  renderLabel: () => L,
25
- renderInput: () => /* @__PURE__ */ r.createElement(y, {
25
+ renderInput: () => /* @__PURE__ */ r.createElement(O, {
26
26
  "aria-labelledby": F,
27
27
  value: a ?? "",
28
28
  onChange: s,
@@ -36,8 +36,8 @@ const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
36
36
  renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, C)
37
37
  });
38
38
  }, W = ({ className: t }) => {
39
- const { id: o, placeholder: a } = d(), { inputId: s, ariaDescribedBy: m } = E(), n = h(null);
40
- return k(() => {
39
+ const { id: o, placeholder: a } = d(), { inputId: s, ariaDescribedBy: m } = E(), n = y(null);
40
+ return g(() => {
41
41
  var l;
42
42
  (l = n.current) == null || l.focus();
43
43
  }, o), /* @__PURE__ */ r.createElement(A, {
@@ -49,24 +49,24 @@ const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
49
49
  placeholder: a
50
50
  });
51
51
  };
52
- e.Label = g;
52
+ e.Label = T;
53
53
  e.Input = W;
54
54
  e.Description = B;
55
- e.Error = T;
56
- const $ = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(O, {
55
+ e.Error = P;
56
+ const $ = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(S, {
57
57
  content: t,
58
58
  locale: o
59
59
  }), oe = () => {
60
60
  const t = w();
61
61
  return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
62
- className: i(P, u.label)
62
+ className: i(M, u.label)
63
63
  }, /* @__PURE__ */ r.createElement(e.Label.Required, {
64
64
  className: i(q, u.requiredMark)
65
65
  })), /* @__PURE__ */ r.createElement(e.Input, {
66
66
  className: t
67
67
  }), /* @__PURE__ */ r.createElement(e.Error, {
68
68
  className: i(x, u.error)
69
- }, /* @__PURE__ */ r.createElement(M, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
69
+ }, /* @__PURE__ */ r.createElement(v, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
70
70
  className: i(U, u.description)
71
71
  }, $));
72
72
  };
@@ -1,5 +1,5 @@
1
1
  import r from "react";
2
- import { U as t } from "./url-input-field-rac-DxR6Hymf.js";
2
+ import { U as t } from "./url-input-field-rac-cvzCBb8W.js";
3
3
  const n = () => /* @__PURE__ */ r.createElement(t, null);
4
4
  export {
5
5
  n as UrlInputRAC
@@ -0,0 +1,22 @@
1
+ import E from "classnames";
2
+ import { ac as f } from "./form-Dt3W_RUv.js";
3
+ const k = ({ globalClasses: e, moduleClasses: r }) => {
4
+ var d;
5
+ const c = ((d = f(...e.parent ? [
6
+ e.parent
7
+ ] : [], e.key)) == null ? void 0 : d.split(/\s+/)) ?? [], p = [
8
+ e.selected,
9
+ e.hover
10
+ ], u = !!e.selected && c.includes(e.selected), N = c.includes(e.hover);
11
+ return ({ isSelected: n, isHovered: m, isInteractive: t = !0 }) => E(e.base, r.base, t ? c : c.filter((h) => !p.includes(h)), {
12
+ [e.hover]: t && m,
13
+ [r.hover]: t && (m || N)
14
+ }, e.selected && {
15
+ [e.selected]: t && n
16
+ }, r.selected && {
17
+ [r.selected]: t && (n || u)
18
+ });
19
+ };
20
+ export {
21
+ k as u
22
+ };
@@ -1,7 +1,7 @@
1
1
  import { useState as o, useCallback as D, useEffect as m, useMemo as b } from "react";
2
- import { ah as v } from "./form-B3KiRFhB.js";
3
- const k = (h) => {
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) => {
2
+ import { ai as v } from "./form-Dt3W_RUv.js";
3
+ const k = (I) => {
4
+ const { fieldType: L, isEditor: t = !1, postProcessOptions: i, customFetchLogic: a, onInitialDataLoaded: n } = I, [O, h] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(L), r = D((e) => {
5
5
  let d = e.map((l) => ({
6
6
  value: l.id ?? "",
7
7
  label: l.name ?? "",
@@ -31,12 +31,12 @@ const k = (h) => {
31
31
  c
32
32
  ]);
33
33
  return {
34
- isLoading: L,
34
+ isLoading: O,
35
35
  options: g,
36
36
  isEmpty: E,
37
37
  hasInitialDataLoaded: c,
38
38
  shouldRender: y,
39
- setIsLoading: O,
39
+ setIsLoading: h,
40
40
  setOptions: p,
41
41
  setIsEmpty: u,
42
42
  setHasInitialDataLoaded: f,
@@ -1,10 +1,10 @@
1
- import { ai as l } from "./form-B3KiRFhB.js";
1
+ import { aj as l } from "./form-Dt3W_RUv.js";
2
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-CBjBYCW5.js";
3
+ import { a1 as m } from "./form-element-classes-BhFk9Jrj.js";
4
+ import { u as i } from "./use-element-state-class-name-CeL6xkSj.js";
5
5
  const c = (...e) => {
6
- const { disabled: a, readOnly: t } = l(), o = m({
7
- globalClasses: i,
6
+ const { disabled: a, readOnly: t } = l(), o = i({
7
+ globalClasses: m,
8
8
  moduleClasses: {
9
9
  base: [
10
10
  s.input,
package/dist/form.d.ts CHANGED
@@ -6586,6 +6586,75 @@ interface VideoData {
6586
6586
  animation?: Animation;
6587
6587
  }
6588
6588
 
6589
+ /**
6590
+ * A vector art (SVG) asset from Wix Media.
6591
+ *
6592
+ * @example
6593
+ * ```tsx
6594
+ * import type { VectorArt } from '@wix/editor-react-types';
6595
+ *
6596
+ * interface MyComponentProps {
6597
+ * icon?: VectorArt;
6598
+ * }
6599
+ * ```
6600
+ */
6601
+ type VectorArt = {
6602
+ /** The SVG URI. */
6603
+ uri: string;
6604
+ /** The SVG `viewBox` attribute value. */
6605
+ viewBox: string;
6606
+ /** The SVG content box dimensions. */
6607
+ contentBox: string;
6608
+ /** A map of color IDs to their resolved color values, for themeable SVGs. */
6609
+ colors: Record<string, string>;
6610
+ /**
6611
+ * The SVG content type, which determines how colors and theming are applied.
6612
+ * - `'shape'` — a simple monochromatic shape.
6613
+ * - `'color'` — a multi-color SVG.
6614
+ * - `'tint'` — a single-color tintable SVG.
6615
+ * - `'ugc'` — user-generated content.
6616
+ * - `'textpath'` — text along a path.
6617
+ */
6618
+ contentType: 'shape' | 'color' | 'tint' | 'ugc' | 'textpath';
6619
+ /** The raw SVG markup. */
6620
+ svgContent: string;
6621
+ };
6622
+
6623
+ type REMOVED = 'REMOVED';
6624
+ /**
6625
+ * Wix framework props.
6626
+ *
6627
+ * @example
6628
+ * ```tsx
6629
+ * import type { Wix } from '@wix/editor-react-types';
6630
+ *
6631
+ * interface MyComponentProps {
6632
+ * className: string;
6633
+ * wix?: Wix;
6634
+ * }
6635
+ *
6636
+ * const MyComponent = ({ className, wix }: MyComponentProps) => (
6637
+ * <div {...wix?.presetsWrapperProps}>
6638
+ * <div className={className}>...</div>
6639
+ * </div>
6640
+ * );
6641
+ * ```
6642
+ */
6643
+ interface Wix {
6644
+ /**
6645
+ * Tracks which removable elements have been removed by the Wix user.
6646
+ * Keys are element keys (as defined in the manifest), values are `'REMOVED'`.
6647
+ */
6648
+ elementsRemovalState: Record<string, REMOVED>;
6649
+ /**
6650
+ * Props to spread onto the outermost wrapper element when using presets.
6651
+ * Required for the preset picker to work correctly in the editor.
6652
+ */
6653
+ presetsWrapperProps?: {
6654
+ className: string;
6655
+ };
6656
+ }
6657
+
6589
6658
  interface PublicTags {
6590
6659
  /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */
6591
6660
  tags?: TagList;
@@ -6891,6 +6960,23 @@ declare enum ErrorType {
6891
6960
  }
6892
6961
 
6893
6962
  type FormSchema = Form$1;
6963
+ type ElementEntry<Children = ElementTree> = {
6964
+ wix?: Wix;
6965
+ className?: string;
6966
+ elementProps?: Children;
6967
+ };
6968
+ type LeafEntry = Omit<ElementEntry, 'elementProps'>;
6969
+ type IconEntry = LeafEntry & {
6970
+ svg?: VectorArt;
6971
+ };
6972
+ interface ElementTree extends Partial<Record<string, ElementEntry | IconEntry>> {
6973
+ }
6974
+ type ElementProps = ElementTree & {
6975
+ submitButton?: ElementEntry<{
6976
+ icon?: IconEntry;
6977
+ label?: LeafEntry;
6978
+ }>;
6979
+ };
6894
6980
 
6895
6981
  type FormValue = string | number | boolean | object | null | undefined;
6896
6982
  type FormValues = Record<string, FormValue>;
@@ -6907,12 +6993,12 @@ type FormHandle = {
6907
6993
  validateStep?: (stepId: string) => Promise<boolean>;
6908
6994
  getValues?: () => FormValues;
6909
6995
  };
6910
- type ElementProps = Record<string, unknown>;
6911
6996
  type FormProps = {
6912
6997
  id?: string;
6913
6998
  className?: string;
6914
6999
  compId?: string;
6915
7000
  form?: FormSchema;
7001
+ wix?: Wix;
6916
7002
  elementProps?: ElementProps;
6917
7003
  values: FormValues;
6918
7004
  onChange: (values: FormValues) => void;
@@ -6924,7 +7010,24 @@ type FormProps = {
6924
7010
  onSubmitSuccess?: (submission: FormSubmission) => void;
6925
7011
  onSubmitFailure?: (error: unknown) => void;
6926
7012
  };
6927
- declare const defaultProps: {};
7013
+ declare const defaultProps: {
7014
+ readonly elementProps: {
7015
+ readonly submitButton: {
7016
+ readonly elementProps: {
7017
+ readonly icon: {
7018
+ readonly svg: {
7019
+ readonly uri: '11062b_d61f9ce4f6fb46a881e3f715059fe1ee.svg';
7020
+ readonly viewBox: '0 0 200 200';
7021
+ readonly contentBox: '0 0 200 200';
7022
+ readonly colors: {};
7023
+ readonly contentType: 'shape';
7024
+ readonly svgContent: '<svg data-bbox="20 51.5 160 97" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" data-type="shape"><g><path d="m131.5 51.5-8.1 8.1L158.1 95H20v11h138.1l-34.7 34.4 8.1 8.1L180 100l-48.5-48.5z" fill-rule="evenodd" clip-rule="evenodd"/></g></svg>';
7025
+ };
7026
+ };
7027
+ };
7028
+ };
7029
+ };
7030
+ };
6928
7031
 
6929
7032
  declare const Form: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<FormHandle>>;
6930
7033
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/form-elements",
3
- "version": "1.84.0",
3
+ "version": "1.86.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": [
@@ -40,7 +40,8 @@
40
40
  "builder-sandbox": "builder-sandbox",
41
41
  "storybook": "storybook dev -p 6006",
42
42
  "storybook:build": "storybook build",
43
- "generate-translation-keys": "babel-cli"
43
+ "generate-translation-keys": "babel-cli",
44
+ "generate-preset-thumbnails": "node scripts/generate-preset-thumbnails.mts"
44
45
  },
45
46
  "dependencies": {
46
47
  "@babel/runtime": "^7.28.4",
@@ -100,6 +101,7 @@
100
101
  "@wix/custom-extensions": "^0.2.22",
101
102
  "@wix/dashboard": "^1.3.48",
102
103
  "@wix/design-system": "^1.334.0",
104
+ "@wix/editor-react-types": "^1.0.106",
103
105
  "@wix/fed-cli-oxlint": "^1.0.6",
104
106
  "@wix/fed-cli-plugin": "^1.0.1",
105
107
  "@wix/fed-cli-sled": "^1.0.39",
@@ -112,6 +114,7 @@
112
114
  "@wix/sled-playwright": "^1.394.0",
113
115
  "oxfmt": "^0.62.0",
114
116
  "oxlint": "^1.77.0",
117
+ "playwright": "~1.63.0",
115
118
  "publint": "^0.3.24",
116
119
  "react": "^18.3.1",
117
120
  "react-dom": "^18.3.1",
@@ -151,5 +154,5 @@
151
154
  ]
152
155
  }
153
156
  },
154
- "falconPackageHash": "8169705a7c26cdc634e6c8f975f73267ca14c8ed077e9ff74e0c351c"
157
+ "falconPackageHash": "f55bd2bf7bcd500b5ad71df6beabf0c852106ca31ee3b7f1a0f6f594"
155
158
  }