@wix/form-elements 1.107.0 → 1.108.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 (113) hide show
  1. package/dist/component/{appointment-rac-D2F4vgf1.js → appointment-rac-ZAp8oWbK.js} +289 -290
  2. package/dist/component/{bookings-address-rac-_5S8J8_i.js → bookings-address-rac-x-Az7vHf.js} +1 -1
  3. package/dist/component/{bookings-email-rac-6vmDR9nS.js → bookings-email-rac-MoF_CaqB.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-DtTJ4T2K.js → bookings-first-name-rac-CWh3Rb0M.js} +1 -1
  5. package/dist/component/{bookings-header-rac-B3dsEwzR.js → bookings-header-rac-BVTiXUWk.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-B3idkbi8.js → bookings-last-name-rac-kXRRlyHl.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-CrRBcQwT.js → bookings-login-bar-rac-C4Zr6kXE.js} +23 -24
  8. package/dist/component/{bookings-phone-rac-BE0yWNnj.js → bookings-phone-rac-2rz1m_xi.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-CYo1l0-6.js → bookings-rich-text-rac-BEjGypQw.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-boTtXVEt.js → checkbox-field-rac-DwEQLIaz.js} +66 -67
  11. package/dist/component/{checkbox-group-field-headless-DnkUvDm8.js → checkbox-group-field-headless-BsOww_QB.js} +37 -37
  12. package/dist/component/{checkbox-group-field-rac-DrDTgHMg.js → checkbox-group-field-rac-DTcZcVS6.js} +6 -6
  13. package/dist/component/{checkbox-group-rac-v3ozUBpo.js → checkbox-group-rac-DQsML-pW.js} +1 -1
  14. package/dist/component/{checkbox-rac-YSLE-RnG.js → checkbox-rac-irEBBOxP.js} +1 -1
  15. package/dist/component/{contacts-address-rac-C653yaHZ.js → contacts-address-rac-B5bSAYrm.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-BeAQ6shx.js → contacts-birthdate-rac-DyScj8f4.js} +1 -1
  17. package/dist/component/{contacts-company-rac-BglKOoTG.js → contacts-company-rac-C5X9-jXa.js} +1 -1
  18. package/dist/component/{contacts-email-rac-D6m7ynfc.js → contacts-email-rac-B0vkfmrS.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-Dgxn0tUJ.js → contacts-first-name-rac-Cfil3U_e.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-1UyIuRKH.js → contacts-last-name-rac-CtPLE-7-.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-BQ77BlW4.js → contacts-phone-rac-YkzsAoBZ.js} +1 -1
  22. package/dist/component/{contacts-position-rac-BUDUv7lv.js → contacts-position-rac-BS4j8QC-.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-DdtA0qKW.js → contacts-subscribe-rac-z_9VsEZL.js} +1 -1
  24. package/dist/component/{contacts-tax-id-rac-WUaKcNl0.js → contacts-tax-id-rac-WFkmKyZv.js} +1 -1
  25. package/dist/component/{date-availability-XjBFq8jt.js → date-availability-NN3rxosk.js} +1 -1
  26. package/dist/component/{date-input-field-rac-aY2zuuKs.js → date-input-field-rac-mdhEC3oq.js} +88 -89
  27. package/dist/component/{date-input-rac-DRiP2_97.js → date-input-rac-CGciuoTx.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-Bzl-d3Uj.js → date-picker-field-rac-CRZVODfF.js} +90 -91
  29. package/dist/component/{date-picker-rac-DHHUh8vn.js → date-picker-rac-Bfbvjy8W.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-DP_StuLr.js → date-time-input-field-rac-TDWBXZ44.js} +76 -77
  31. package/dist/component/{date-time-input-rac-B11KIxsf.js → date-time-input-rac-DY0qdSix.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-BHZBqyWv.js → dext-checkbox-group-rac-BFGM7SOt.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-BIlAqEvV.js → dext-checkbox-rac-DPZvTeUZ.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-CHBXNrZi.js → dext-date-picker-rac-Xd5kojsQ.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-BYtliKry.js → dext-date-time-input-rac-C0RIdxJW.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-C2VPSFV5.js → dext-dropdown-rac-D1m8vJvm.js} +1 -1
  37. package/dist/component/{dext-email-rac-Fnb0Ggcs.js → dext-email-rac-BC81RFYY.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-DopfSyFi.js → dext-number-input-rac-Z_ih9FfX.js} +1 -1
  39. package/dist/component/{dext-phone-rac-Rn4i_2rc.js → dext-phone-rac-s3BOnXuI.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-bNaskJpK.js → dext-radio-group-rac-CL3jcezs.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-DL6ZZd7d.js → dext-rating-input-rac-wz1EyP5b.js} +1 -1
  42. package/dist/component/{dext-tags-rac-TsUPoImO.js → dext-tags-rac-BY4Rf2BP.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-BIuY7LTd.js → dext-text-area-rac-DRJzlsq8.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-CSYPW0Qi.js → dext-text-input-rac-BGcRNNAi.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-_g0lqGfW.js → dext-url-input-rac-CRAIm8yp.js} +1 -1
  46. package/dist/component/{donation-rac-BYKFtsyR.js → donation-rac-BlTfOIlE.js} +83 -84
  47. package/dist/component/{dropdown-field-headless-CBaqlNZi.js → dropdown-field-headless-DhzRAMcM.js} +12 -12
  48. package/dist/component/{dropdown-field-rac-CCAGSMm3.js → dropdown-field-rac-DXyY5we-.js} +5 -5
  49. package/dist/component/{dropdown-rac-C_EqUsZ1.js → dropdown-rac-C6YM6qxm.js} +1 -1
  50. package/dist/component/{ecom-address-rac-Bw9eH0iF.js → ecom-address-rac-CAdr7wya.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-B5PVOO2a.js → ecom-subscription-checkbox-rac-Z2VMuCbt.js} +6 -6
  52. package/dist/component/{email-input-field-rac-B2kqQ6yo.js → email-input-field-rac-DpkfunVK.js} +53 -54
  53. package/dist/component/{events-repeater-rac--4OnUxWE.js → events-repeater-rac-CuJkdrPo.js} +61 -62
  54. package/dist/component/{events-rsvp-rac-CczCoo3T.js → events-rsvp-rac-BKWlSeQ9.js} +8 -8
  55. package/dist/component/{field-error-headless-D3-1L5sf.js → field-error-headless-tsg9FQ-_.js} +12 -12
  56. package/dist/component/{field-label-headless-Du4ckIVy.js → field-label-headless-CB8dEat8.js} +11 -11
  57. package/dist/component/{file-upload-rac-DbdkUbWM.js → file-upload-rac-ZdgYt646.js} +67 -68
  58. package/dist/component/{fixed-payment-rac-f9-01iDN.js → fixed-payment-rac-CuIQEeHh.js} +20 -21
  59. package/dist/component/{form-DQauhsho.js → form-0jt4L5xo.js} +3045 -2896
  60. package/dist/component/form.css +1 -1
  61. package/dist/component/form.js +1 -1
  62. package/dist/component/header-field-rac-CWVGzxKb.js +24 -0
  63. package/dist/component/{header-rac-CR9T3Pnu.js → header-rac-D6KsV-ko.js} +1 -1
  64. package/dist/component/{image-choice-rac-DJ_8v467.js → image-choice-rac-CUCyVS8c.js} +29 -30
  65. package/dist/component/{index-BB7d_9Dv.js → index-TJSnVtCO.js} +72 -72
  66. package/dist/component/{index-CcUTIUWM.js → index-iOqQidgV.js} +12 -12
  67. package/dist/component/{isObjectLike-xvPa_08X.js → isObjectLike-DQbx8r1c.js} +1 -1
  68. package/dist/component/{multiline-address-field-rac-CyaFOloE.js → multiline-address-field-rac-DtZ1NTfD.js} +186 -187
  69. package/dist/component/{multiline-address-rac-CaHGUN_f.js → multiline-address-rac-ub-_XzHU.js} +1 -1
  70. package/dist/component/number-input-field-rac-DLItn4DK.js +92 -0
  71. package/dist/component/{number-input-rac-DMKX6nhk.js → number-input-rac-UuxJzqEx.js} +1 -1
  72. package/dist/component/{password-rac-0RUXPAn6.js → password-rac-Di6q96Rn.js} +37 -38
  73. package/dist/component/{payment-input-rac-CHSZ3-Lt.js → payment-input-rac-CG6c4-Ge.js} +52 -53
  74. package/dist/component/{phone-input-field-rac-JmIFcP1e.js → phone-input-field-rac-D4JphCuT.js} +75 -76
  75. package/dist/component/{phone-rac-BLRnAPXP.js → phone-rac-_vDw2usa.js} +1 -1
  76. package/dist/component/{product-list-rac-BkF5tDwt.js → product-list-rac-CgxRlj1f.js} +73 -74
  77. package/dist/component/{quiz-radio-group-rac-32cCMTUS.js → quiz-radio-group-rac-bi26aGxN.js} +1 -1
  78. package/dist/component/{radio-button-module-classes-IOulhuSH.js → radio-button-module-classes-DDJq2ESf.js} +33 -33
  79. package/dist/component/{radio-group-field-rac-CJwku6e0.js → radio-group-field-rac-D1aMVO6l.js} +4 -4
  80. package/dist/component/{radio-group-rac-BiW-9Abj.js → radio-group-rac-HKC85M6t.js} +1 -1
  81. package/dist/component/{rating-input-field-rac-B9cwaROK.js → rating-input-field-rac-CpRehxFB.js} +42 -43
  82. package/dist/component/{rating-input-rac-BpwlNvzQ.js → rating-input-rac-BMuCZ3oj.js} +1 -1
  83. package/dist/component/{rich-content-rac.module-B1uyPmtK.js → rich-content-rac.module-mZ6xoAOd.js} +4 -4
  84. package/dist/component/rich-text-field-rac-CUK8V8Kf.js +21 -0
  85. package/dist/component/{rich-text-rac-VfeZxS27.js → rich-text-rac-B-7sR2FJ.js} +1 -1
  86. package/dist/component/{service-dropdown-rac-BCfs8IhW.js → service-dropdown-rac-1DDNT5bn.js} +43 -44
  87. package/dist/component/{services-multi-choice-rac-CCqdF_7P.js → services-multi-choice-rac-CB-6dwxz.js} +21 -22
  88. package/dist/component/{signature-rac-DOyMo3u0.js → signature-rac-7XBci6P2.js} +35 -36
  89. package/dist/component/{submit-button-rac-C2uA5DeE.js → submit-button-rac-B1-Mk8Gg.js} +21 -22
  90. package/dist/component/{tags-field-rac-C_uIw2by.js → tags-field-rac-CQ9Y7mq-.js} +49 -50
  91. package/dist/component/{tags-rac-1pQ-fpe_.js → tags-rac-Visic-Ml.js} +1 -1
  92. package/dist/component/{text-area-field-rac-DqlOkm7e.js → text-area-field-rac-C8fP1g-w.js} +31 -32
  93. package/dist/component/{text-area-rac-DPdkrFcH.js → text-area-rac-B6yZxzxm.js} +1 -1
  94. package/dist/component/{text-input-field-rac-CmXm6r1w.js → text-input-field-rac-CNjbOxD1.js} +5 -5
  95. package/dist/component/{text-input-headless-DD__2DFf.js → text-input-headless-Bm8PJGep.js} +12 -12
  96. package/dist/component/{text-input-rac-DRHyQEH7.js → text-input-rac-BEPC1Z-4.js} +1 -1
  97. package/dist/component/{time-input-rac-BJPIymQY.js → time-input-rac-3m6C_Jp5.js} +41 -42
  98. package/dist/component/url-input-field-rac-CIk_6Lf6.js +74 -0
  99. package/dist/component/{url-input-rac-C0ChQUzq.js → url-input-rac-DyVoygXH.js} +1 -1
  100. package/dist/component/use-dropdown-option-class-name-McG3ayOT.js +21 -0
  101. package/dist/component/{use-element-state-class-name-BatTc2bw.js → use-element-state-class-name-B9MBWX44.js} +1 -1
  102. package/dist/component/{use-is-forced-open-dropdown-B0jiPTmS.js → use-is-forced-open-dropdown-r5G_sZsO.js} +7 -7
  103. package/dist/component/{use-service-options-base-oeE7xszw.js → use-service-options-base-hcbkvhpw.js} +7 -7
  104. package/dist/component/use-text-input-class-name-SnurFqAr.js +23 -0
  105. package/dist/form.d.ts +3 -1
  106. package/package.json +2 -2
  107. package/dist/component/form-element-classes-bLFmhsKw.js +0 -137
  108. package/dist/component/header-field-rac-DamDk5BR.js +0 -25
  109. package/dist/component/number-input-field-rac-BuYUzDWV.js +0 -93
  110. package/dist/component/rich-text-field-rac-C_qE7Ykg.js +0 -22
  111. package/dist/component/url-input-field-rac-CFDYkZ6I.js +0 -75
  112. package/dist/component/use-dropdown-option-class-name-3L5ZmNLK.js +0 -21
  113. package/dist/component/use-text-input-class-name-LQ5S-NLh.js +0 -24
@@ -1,12 +1,12 @@
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-DD__2DFf.js";
4
+ import { T as r } from "./text-input-headless-Bm8PJGep.js";
5
5
  import { E as o } from "./error-icon-hZxQ6DEy.js";
6
6
  import { s as a } from "./field-rac.module-B4l_0KRU.js";
7
- import { v as n, J as c, o as E, j as i } from "./form-element-classes-bLFmhsKw.js";
8
- import { u as p } from "./use-text-input-class-name-LQ5S-NLh.js";
9
- const I = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
7
+ import { H as n, T as c, u as E, p as i } from "./form-0jt4L5xo.js";
8
+ import { u as p } from "./use-text-input-class-name-SnurFqAr.js";
9
+ const u = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
10
10
  content: s,
11
11
  locale: m
12
12
  }), C = () => {
@@ -21,7 +21,7 @@ const I = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
21
21
  className: t(E, a.error)
22
22
  }, /* @__PURE__ */ e.createElement(o, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
23
23
  className: t(i, a.description)
24
- }, I));
24
+ }, u));
25
25
  };
26
26
  export {
27
27
  C as T
@@ -1,13 +1,13 @@
1
1
  import t, { useRef as L } from "react";
2
- import { TextField as R, Input as h } from "react-aria-components";
3
- import { ak as d, ah as c, am as v } from "./form-DQauhsho.js";
4
- import { f as a } from "./find-child-C60k4CxG.js";
5
- import { D as T, E as g } from "./field-error-headless-D3-1L5sf.js";
6
- import { L as x } from "./field-label-headless-Du4ckIVy.js";
2
+ import { TextField as R, Input as v } from "react-aria-components";
3
+ import { b5 as d, b2 as c, b7 as T } from "./form-0jt4L5xo.js";
4
+ import { f as s } from "./find-child-C60k4CxG.js";
5
+ import { D as g, E as h } from "./field-error-headless-tsg9FQ-_.js";
6
+ import { L as x } from "./field-label-headless-CB8dEat8.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: 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);
8
+ const { id: a, value: i, onChange: l, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: b, FieldLayout: f } = d(), { labelId: E } = c(), I = s(r, e.Label), F = s(r, e.Input), y = s(r, e.Description), D = s(r, e.Error);
9
9
  return /* @__PURE__ */ t.createElement(f, {
10
- fieldId: s,
10
+ fieldId: a,
11
11
  renderLabel: () => I,
12
12
  renderInput: () => /* @__PURE__ */ t.createElement(R, {
13
13
  "aria-labelledby": E,
@@ -23,11 +23,11 @@ const e = ({ children: r }) => {
23
23
  renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, D, y)
24
24
  });
25
25
  }, B = ({ className: r }) => {
26
- const { id: s, placeholder: i } = d(), { inputId: l, ariaDescribedBy: u } = c(), n = L(null);
27
- return v(() => {
26
+ const { id: a, placeholder: i } = d(), { inputId: l, ariaDescribedBy: u } = c(), n = L(null);
27
+ return T(() => {
28
28
  var o;
29
29
  (o = n.current) == null || o.focus();
30
- }, s), /* @__PURE__ */ t.createElement(h, {
30
+ }, a), /* @__PURE__ */ t.createElement(v, {
31
31
  ref: n,
32
32
  id: l,
33
33
  "aria-describedby": u,
@@ -37,8 +37,8 @@ const e = ({ children: r }) => {
37
37
  };
38
38
  e.Label = x;
39
39
  e.Input = B;
40
- e.Description = T;
41
- e.Error = g;
40
+ e.Description = g;
41
+ e.Error = h;
42
42
  export {
43
43
  e as T
44
44
  };
@@ -1,5 +1,5 @@
1
1
  import t from "react";
2
- import { T as e } from "./text-input-field-rac-CmXm6r1w.js";
2
+ import { T as e } from "./text-input-field-rac-CNjbOxD1.js";
3
3
  const o = () => /* @__PURE__ */ t.createElement(e, null);
4
4
  export {
5
5
  o as TextInputRAC
@@ -1,40 +1,39 @@
1
- import e, { useCallback as V, useRef as v, useContext as x } from "react";
2
- import { RicosViewer as k } 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 q } from "@internationalized/date";
5
- import { TimeField as B, DateInput as U, DateSegment as _, TimeFieldStateContext as j } from "react-aria-components";
6
- import { ak as p, ah as w, au as S, am as J } from "./form-DQauhsho.js";
7
- import { f as m, a as F } from "./find-child-C60k4CxG.js";
8
- import { D as Q, E as z } from "./field-error-headless-D3-1L5sf.js";
9
- import { L as G } from "./field-label-headless-Du4ckIVy.js";
10
- import { E as K } from "./error-icon-hZxQ6DEy.js";
11
- import { H as T } from "./custom-focus-class-_483Pkwp.js";
4
+ import { parseTime as B } from "@internationalized/date";
5
+ import { TimeField as k, DateInput as U, DateSegment as _, TimeFieldStateContext as w } from "react-aria-components";
6
+ import { b5 as p, b2 as j, bf as S, b7 as Q, H as z, T as G, u as J, p as K } from "./form-0jt4L5xo.js";
7
+ import { f as m, a as T } from "./find-child-C60k4CxG.js";
8
+ import { D as W, E as X } from "./field-error-headless-tsg9FQ-_.js";
9
+ import { L as Y } from "./field-label-headless-CB8dEat8.js";
10
+ import { E as Z } from "./error-icon-hZxQ6DEy.js";
11
+ import { H as F } from "./custom-focus-class-_483Pkwp.js";
12
12
  import { s as f } from "./field-rac.module-B4l_0KRU.js";
13
- import { v as W, J as X, o as Y, j as Z } from "./form-element-classes-bLFmhsKw.js";
14
- import { u as $ } from "./use-text-input-class-name-LQ5S-NLh.js";
13
+ import { u as $ } from "./use-text-input-class-name-SnurFqAr.js";
15
14
  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 } = w(), b = V((M) => {
15
+ const { id: n, value: l, onChange: o, disabled: i, readOnly: s, required: a, onBlur: d, onFocus: E, use24HourFormat: b, FieldLayout: C, hasError: g } = p(), { inputId: I, ariaDescribedBy: D, labelId: L } = j(), R = V((M) => {
17
16
  const H = ae(M);
18
17
  o(H);
19
18
  }, [
20
19
  o
21
20
  ]), 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(g, {
21
+ return /* @__PURE__ */ e.createElement(C, {
23
22
  fieldId: n,
24
23
  renderLabel: () => N,
25
- renderInput: () => /* @__PURE__ */ e.createElement(B, {
26
- "aria-labelledby": R,
27
- id: D,
28
- "aria-describedby": L,
24
+ renderInput: () => /* @__PURE__ */ e.createElement(k, {
25
+ "aria-labelledby": L,
26
+ id: I,
27
+ "aria-describedby": D,
29
28
  value: O,
30
- onChange: b,
29
+ onChange: R,
31
30
  isDisabled: i,
32
31
  isReadOnly: s,
33
- isInvalid: I,
32
+ isInvalid: g,
34
33
  isRequired: a,
35
34
  onBlur: d,
36
35
  onFocus: E,
37
- hourCycle: C ? 24 : 12
36
+ hourCycle: b ? 24 : 12
38
37
  }, y),
39
38
  renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, A, P)
40
39
  });
@@ -46,15 +45,15 @@ const r = ({ children: t }) => {
46
45
  }, (a) => {
47
46
  switch (a.type) {
48
47
  case "hour":
49
- return F(o, {
48
+ return T(o, {
50
49
  segment: a
51
50
  }) || /* @__PURE__ */ e.createElement(e.Fragment, null);
52
51
  case "minute":
53
- return F(i, {
52
+ return T(i, {
54
53
  segment: a
55
54
  }) || /* @__PURE__ */ e.createElement(e.Fragment, null);
56
55
  case "dayPeriod":
57
- return F(s, {
56
+ return T(s, {
58
57
  segment: a
59
58
  }) || /* @__PURE__ */ e.createElement(e.Fragment, null);
60
59
  case "literal":
@@ -66,8 +65,8 @@ const r = ({ children: t }) => {
66
65
  }
67
66
  });
68
67
  }, ee = ({ className: t, ...n }) => {
69
- const { id: l, hidePlaceholder: o } = p(), { segment: i } = n, { t: s } = S(), a = v(null);
70
- J(() => {
68
+ const { id: l, hidePlaceholder: o } = p(), { segment: i } = n, { t: s } = S(), a = x(null);
69
+ Q(() => {
71
70
  var E;
72
71
  (E = a.current) == null || E.focus();
73
72
  }, l);
@@ -90,7 +89,7 @@ const r = ({ children: t }) => {
90
89
  }
91
90
  });
92
91
  }, re = ({ className: t, ...n }) => {
93
- const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = S(), s = x(j), a = l ? void 0 : i("field.date.placeholder.period"), d = () => s == null ? void 0 : s.increment("dayPeriod");
92
+ const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = S(), s = q(w), a = l ? void 0 : i("field.date.placeholder.period"), d = () => s == null ? void 0 : s.increment("dayPeriod");
94
93
  return /* @__PURE__ */ e.createElement(_, {
95
94
  segment: o,
96
95
  className: t,
@@ -103,15 +102,15 @@ const r = ({ children: t }) => {
103
102
  u.Hour = ee;
104
103
  u.Minute = te;
105
104
  u.Period = re;
106
- r.Label = G;
105
+ r.Label = Y;
107
106
  r.Time = u;
108
- r.Description = Q;
109
- r.Error = z;
107
+ r.Description = W;
108
+ r.Error = X;
110
109
  function ne(t) {
111
110
  if (!t)
112
111
  return null;
113
112
  try {
114
- return q(t);
113
+ return B(t);
115
114
  } catch {
116
115
  return null;
117
116
  }
@@ -131,29 +130,29 @@ const oe = "_time_10p0h_1", se = "_hour_10p0h_14", le = "_minute_10p0h_15", ie =
131
130
  hour: se,
132
131
  minute: le,
133
132
  period: ie
134
- }, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(k, {
133
+ }, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(v, {
135
134
  content: t,
136
135
  locale: n
137
136
  }), me = () => {
138
137
  const t = $(h.time);
139
138
  return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
140
- className: c(W, f.label)
139
+ className: c(z, f.label)
141
140
  }, /* @__PURE__ */ e.createElement(r.Label.Required, {
142
- className: c(X, f.requiredMark)
141
+ className: c(G, f.requiredMark)
143
142
  })), /* @__PURE__ */ e.createElement(r.Time, {
144
143
  className: t
145
144
  }, /* @__PURE__ */ e.createElement(r.Time.Hour, {
146
- className: c(h.hour, T)
145
+ className: c(h.hour, F)
147
146
  }), /* @__PURE__ */ e.createElement(r.Time.Minute, {
148
- className: c(h.minute, T)
147
+ className: c(h.minute, F)
149
148
  }), /* @__PURE__ */ e.createElement(r.Time.Period, {
150
- className: c(h.period, T)
149
+ className: c(h.period, F)
151
150
  })), /* @__PURE__ */ e.createElement(r.Error, {
152
- className: c(Y, f.error)
153
- }, /* @__PURE__ */ e.createElement(K, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
154
- className: c(Z, f.description)
151
+ className: c(J, f.error)
152
+ }, /* @__PURE__ */ e.createElement(Z, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
153
+ className: c(K, f.description)
155
154
  }, ce));
156
- }, Le = () => /* @__PURE__ */ e.createElement(me, null);
155
+ }, Ie = () => /* @__PURE__ */ e.createElement(me, null);
157
156
  export {
158
- Le as TimeInputRAC
157
+ Ie as TimeInputRAC
159
158
  };
@@ -0,0 +1,74 @@
1
+ import { RicosViewer as S } from "@wix/ricos/viewer";
2
+ import i from "classnames";
3
+ import r, { useCallback as h, useRef as O } from "react";
4
+ import { TextField as y, Input as A } from "react-aria-components";
5
+ import { b5 as d, b2 as E, b7 as T, H as B, T as g, u as k, p as v } from "./form-0jt4L5xo.js";
6
+ import { f as c } from "./find-child-C60k4CxG.js";
7
+ import { D as M, E as P } from "./field-error-headless-tsg9FQ-_.js";
8
+ import { L as q } from "./field-label-headless-CB8dEat8.js";
9
+ import { u as x } from "./use-invoke-callback-UH73A_J3.js";
10
+ import { E as U } from "./error-icon-hZxQ6DEy.js";
11
+ import { s as u } from "./field-rac.module-B4l_0KRU.js";
12
+ import { u as w } from "./use-text-input-class-name-SnurFqAr.js";
13
+ const H = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
14
+ const { id: o, value: s, onChange: n, disabled: m, readOnly: a, required: l, hasError: I, onBlur: b, onFocus: f, FieldLayout: R } = d(), { labelId: F } = E(), p = x(b), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), N = h(() => {
15
+ n(H(s)), p();
16
+ }, [
17
+ p,
18
+ n,
19
+ s
20
+ ]);
21
+ return /* @__PURE__ */ r.createElement(R, {
22
+ fieldId: o,
23
+ renderLabel: () => L,
24
+ renderInput: () => /* @__PURE__ */ r.createElement(y, {
25
+ "aria-labelledby": F,
26
+ value: s ?? "",
27
+ onChange: n,
28
+ isDisabled: m,
29
+ isReadOnly: a,
30
+ isRequired: l,
31
+ isInvalid: I,
32
+ onBlur: N,
33
+ onFocus: f
34
+ }, D),
35
+ renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, C)
36
+ });
37
+ }, V = ({ className: t }) => {
38
+ const { id: o, placeholder: s } = d(), { inputId: n, ariaDescribedBy: m } = E(), a = O(null);
39
+ return T(() => {
40
+ var l;
41
+ (l = a.current) == null || l.focus();
42
+ }, o), /* @__PURE__ */ r.createElement(A, {
43
+ ref: a,
44
+ id: n,
45
+ type: "url",
46
+ "aria-describedby": m,
47
+ className: t,
48
+ placeholder: s
49
+ });
50
+ };
51
+ e.Label = q;
52
+ e.Input = V;
53
+ e.Description = M;
54
+ e.Error = P;
55
+ const W = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(S, {
56
+ content: t,
57
+ locale: o
58
+ }), te = () => {
59
+ const t = w();
60
+ return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
61
+ className: i(B, u.label)
62
+ }, /* @__PURE__ */ r.createElement(e.Label.Required, {
63
+ className: i(g, u.requiredMark)
64
+ })), /* @__PURE__ */ r.createElement(e.Input, {
65
+ className: t
66
+ }), /* @__PURE__ */ r.createElement(e.Error, {
67
+ className: i(k, u.error)
68
+ }, /* @__PURE__ */ r.createElement(U, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
69
+ className: i(v, u.description)
70
+ }, W));
71
+ };
72
+ export {
73
+ te as U
74
+ };
@@ -1,5 +1,5 @@
1
1
  import r from "react";
2
- import { U as t } from "./url-input-field-rac-CFDYkZ6I.js";
2
+ import { U as t } from "./url-input-field-rac-CIk_6Lf6.js";
3
3
  const n = () => /* @__PURE__ */ r.createElement(t, null);
4
4
  export {
5
5
  n as UrlInputRAC
@@ -0,0 +1,21 @@
1
+ import a from "classnames";
2
+ import { s as o } from "./field-rac.module-B4l_0KRU.js";
3
+ import { s as r } from "./form-0jt4L5xo.js";
4
+ import { u as l } from "./use-element-state-class-name-B9MBWX44.js";
5
+ const O = {
6
+ base: o.selectOption,
7
+ selected: o.selectOptionSelected,
8
+ hover: o.selectOptionHover
9
+ }, m = ({ isSelected: s, isHovered: e, isFocused: t }) => ({
10
+ isSelected: s,
11
+ isHovered: (e || t) && !s
12
+ }), N = (...s) => {
13
+ const e = l({
14
+ globalClasses: r,
15
+ moduleClasses: O
16
+ });
17
+ return (t) => a(e(m(t)), s);
18
+ };
19
+ export {
20
+ N as u
21
+ };
@@ -1,5 +1,5 @@
1
1
  import E from "classnames";
2
- import { ad as f } from "./form-DQauhsho.js";
2
+ import { a_ as f } from "./form-0jt4L5xo.js";
3
3
  const k = ({ globalClasses: e, moduleClasses: r }) => {
4
4
  var d;
5
5
  const c = ((d = f(...e.parent ? [
@@ -1,6 +1,6 @@
1
1
  import { useContext as T, useMemo as p } from "react";
2
- import { ae as u, l as O, ac as _, F as n } from "./form-DQauhsho.js";
3
- const a = [
2
+ import { a$ as u, ac as O, aZ as a, F as n } from "./form-0jt4L5xo.js";
3
+ const _ = [
4
4
  n.DROPDOWN,
5
5
  n.DEXT_DROPDOWN,
6
6
  n.SERVICES_DROPDOWN,
@@ -19,17 +19,17 @@ const a = [
19
19
  n.MULTILINE_ADDRESS,
20
20
  n.BOOKINGS_ADDRESS,
21
21
  n.ECOM_ADDRESS
22
- ], l = ({ properties: o }) => {
22
+ ], I = ({ properties: o }) => {
23
23
  var t, e, s, r;
24
24
  return ((r = (s = (e = (t = o.validation) == null ? void 0 : t.string) == null ? void 0 : e.phoneOptions) == null ? void 0 : s.allowedCountryCodes) == null ? void 0 : r.length) !== 1;
25
- }, I = ({ properties: o }) => {
25
+ }, P = ({ properties: o }) => {
26
26
  var t, e;
27
27
  return ((e = (t = o.fieldSettings) == null ? void 0 : t.country) == null ? void 0 : e.show) !== !1;
28
- }, P = (o, t) => c.includes(o.fieldType) ? !t && l(o) : d.includes(o.fieldType) ? I(o) : a.includes(o.fieldType), S = (o, t) => P(o, t) && !o.properties.hidden && !o.properties.disabled && !o.properties.readOnly, N = (o, t) => o.layout.row - t.layout.row || o.layout.column - t.layout.column, w = (o) => {
28
+ }, S = (o, t) => c.includes(o.fieldType) ? !t && I(o) : d.includes(o.fieldType) ? P(o) : _.includes(o.fieldType), l = (o, t) => S(o, t) && !o.properties.hidden && !o.properties.disabled && !o.properties.readOnly, N = (o, t) => o.layout.row - t.layout.row || o.layout.column - t.layout.column, w = (o) => {
29
29
  var E;
30
- const t = ((E = u().dropdown) == null ? void 0 : E.open) === !0, e = T(O), { isMobile: s = !1 } = _(), r = p(() => {
30
+ const t = ((E = u().dropdown) == null ? void 0 : E.open) === !0, e = T(O), { isMobile: s = !1 } = a(), r = p(() => {
31
31
  var D;
32
- return e && !e.parentId ? (D = e.fields.filter((i) => S(i, s)).sort(N)[0]) == null ? void 0 : D.id : void 0;
32
+ return e && !e.parentId ? (D = e.fields.filter((i) => l(i, s)).sort(N)[0]) == null ? void 0 : D.id : void 0;
33
33
  }, [
34
34
  e,
35
35
  s
@@ -1,7 +1,7 @@
1
- import { useState as o, useCallback as D, useEffect as m, useMemo as b } from "react";
2
- import { aj as v } from "./form-DQauhsho.js";
3
- const j = (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) => {
1
+ import { useState as o, useCallback as y, useEffect as m, useMemo as D } from "react";
2
+ import { b4 as v } from "./form-0jt4L5xo.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 = y((e) => {
5
5
  let d = e.map((l) => ({
6
6
  value: l.id ?? "",
7
7
  label: l.name ?? "",
@@ -26,7 +26,7 @@ const j = (I) => {
26
26
  a,
27
27
  t
28
28
  ]);
29
- const y = b(() => t || c, [
29
+ const b = D(() => t || c, [
30
30
  t,
31
31
  c
32
32
  ]);
@@ -35,7 +35,7 @@ const j = (I) => {
35
35
  options: g,
36
36
  isEmpty: E,
37
37
  hasInitialDataLoaded: c,
38
- shouldRender: y,
38
+ shouldRender: b,
39
39
  setIsLoading: h,
40
40
  setOptions: p,
41
41
  setIsEmpty: u,
@@ -44,5 +44,5 @@ const j = (I) => {
44
44
  };
45
45
  };
46
46
  export {
47
- j as u
47
+ k as u
48
48
  };
@@ -0,0 +1,23 @@
1
+ import { b5 as r, Y as i } from "./form-0jt4L5xo.js";
2
+ import { s } from "./field-rac.module-B4l_0KRU.js";
3
+ import { u as m } from "./use-element-state-class-name-B9MBWX44.js";
4
+ const d = (...e) => {
5
+ const { disabled: a, readOnly: t } = r(), o = m({
6
+ globalClasses: i,
7
+ moduleClasses: {
8
+ base: [
9
+ s.input,
10
+ ...e
11
+ ].join(" "),
12
+ hover: s.inputHover
13
+ }
14
+ });
15
+ return ({ isHovered: l }) => o({
16
+ isSelected: !1,
17
+ isHovered: l,
18
+ isInteractive: !a && !t
19
+ });
20
+ };
21
+ export {
22
+ d as u
23
+ };
package/dist/form.d.ts CHANGED
@@ -7004,6 +7004,7 @@ type FormHandle = {
7004
7004
  validateStep?: (stepId: string) => Promise<boolean>;
7005
7005
  getValues?: () => FormValues;
7006
7006
  };
7007
+ type FormState = 'success';
7007
7008
  type FormProps = {
7008
7009
  id?: string;
7009
7010
  className?: string;
@@ -7011,6 +7012,7 @@ type FormProps = {
7011
7012
  form?: FormSchema;
7012
7013
  wix?: Wix;
7013
7014
  elementProps?: ElementProps;
7015
+ state?: FormState;
7014
7016
  values: FormValues;
7015
7017
  onChange: (values: FormValues) => void;
7016
7018
  errors: ValidationError[];
@@ -7043,4 +7045,4 @@ declare const defaultProps: {
7043
7045
  declare const Form: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<FormHandle>>;
7044
7046
 
7045
7047
  export { Form as default, defaultProps };
7046
- export type { ElementProps, FormHandle, FormProps, FormSchema, FormSubmission, FormValue, FormValues, ValidationError };
7048
+ export type { ElementProps, FormHandle, FormProps, FormSchema, FormState, FormSubmission, FormValue, FormValues, ValidationError };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/form-elements",
3
- "version": "1.107.0",
3
+ "version": "1.108.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": [
@@ -156,5 +156,5 @@
156
156
  ]
157
157
  }
158
158
  },
159
- "falconPackageHash": "4dda8adc6b1e6b6c2843c62201566779244ac2e0462b68c11d5d50ef"
159
+ "falconPackageHash": "2ff7f14ac81ec0354d8104e138a9f9f5f79cb50513bbbb3d8d4b3f70"
160
160
  }
@@ -1,137 +0,0 @@
1
- const o = {
2
- RADIO_GROUP: "radioGroup",
3
- CHECKBOX_GROUP: "checkboxGroup",
4
- CHECKBOX: "checkbox",
5
- PRODUCT_LIST: "productList",
6
- TAGS: "tags",
7
- DONATION: "donation",
8
- IMAGE_CHOICE: "imageChoice",
9
- RATINGS: "ratings",
10
- RADIO_GROUP_RADIO_BUTTON: "radioGroupRadioButton",
11
- CHECKBOX_GROUP_INDICATOR: "checkboxGroupIndicator",
12
- CHECKBOX_INDICATOR: "checkboxIndicator",
13
- PRODUCT_LIST_INDICATOR: "productListIndicator",
14
- TAGS_OPTION: "tagsOption",
15
- DONATION_OPTION: "donationOption",
16
- IMAGE_CHOICE_OPTION: "imageChoiceOption",
17
- IMAGE_CHOICE_OPTION_IMAGE: "imageChoiceOptionImage",
18
- RATING_OPTION: "ratingOption",
19
- TIME_SLOT: "timeSlot",
20
- TEXT_INPUT: "textInput",
21
- POPOVER: "popover",
22
- DROPDOWN_OPTION: "dropdownOption"
23
- }, e = "form-field-label", _ = "form-field-required-indicator", O = "form-field-description", t = "form-field-error", i = "form-field-input", r = "form-field-upload-button", I = "form-field-popover", s = "form-field-dropdown-trigger", n = {
24
- key: o.DROPDOWN_OPTION,
25
- parent: o.POPOVER,
26
- base: "form-field-dropdown-option",
27
- selected: "form-field-dropdown-option--selected",
28
- hover: "form-field-dropdown-option--hover"
29
- }, c = "form-field-suggestion", d = "form-field-option-label", a = "form-field-radio-group", f = "form-field-radio-group-option-label", R = {
30
- key: o.RADIO_GROUP_RADIO_BUTTON,
31
- parent: o.RADIO_GROUP,
32
- base: "form-field-radio-group-radio-button",
33
- selected: "form-field-radio-group-radio-button--selected",
34
- hover: "form-field-radio-group-radio-button--hover"
35
- }, T = "form-field-checkbox-group", E = "form-field-checkbox-group-option-label", C = {
36
- key: o.CHECKBOX_GROUP_INDICATOR,
37
- parent: o.CHECKBOX_GROUP,
38
- base: "form-field-checkbox-group-indicator",
39
- selected: "form-field-checkbox-group-indicator--selected",
40
- hover: "form-field-checkbox-group-indicator--hover"
41
- }, l = "form-field-checkbox", L = "form-field-checkbox-label", S = {
42
- key: o.CHECKBOX_INDICATOR,
43
- parent: o.CHECKBOX,
44
- base: "form-field-checkbox-indicator",
45
- selected: "form-field-checkbox-indicator--selected",
46
- hover: "form-field-checkbox-indicator--hover"
47
- }, A = "form-field-product-list", D = "form-field-product-list-product-name", F = "form-field-product-list-price", m = {
48
- key: o.PRODUCT_LIST_INDICATOR,
49
- parent: o.PRODUCT_LIST,
50
- base: "form-field-product-list-indicator",
51
- selected: "form-field-product-list-indicator--selected",
52
- hover: "form-field-product-list-indicator--hover"
53
- }, N = "form-field-tags", p = {
54
- key: o.TAGS_OPTION,
55
- parent: o.TAGS,
56
- base: "form-field-tags-option",
57
- selected: "form-field-tags-option--selected",
58
- hover: "form-field-tags-option--hover"
59
- }, M = "form-field-donation", P = {
60
- key: o.DONATION_OPTION,
61
- parent: o.DONATION,
62
- base: "form-field-donation-option",
63
- selected: "form-field-donation-option--selected",
64
- hover: "form-field-donation-option--hover"
65
- }, h = "form-field-image-choice", b = {
66
- key: o.IMAGE_CHOICE_OPTION,
67
- parent: o.IMAGE_CHOICE,
68
- base: "form-field-image-choice-option",
69
- selected: "form-field-image-choice-option--selected",
70
- hover: "form-field-image-choice-option--hover"
71
- }, u = "form-field-image-choice-option-image", G = {
72
- key: o.TIME_SLOT,
73
- base: "form-field-time-slot",
74
- selected: "form-field-time-slot--selected",
75
- hover: "form-field-time-slot--hover"
76
- }, U = {
77
- key: o.TEXT_INPUT,
78
- base: "form-field-text-input",
79
- hover: "form-field-text-input--hover"
80
- }, g = "form-field-info-banner", B = "form-field-calendar", k = "form-field-date-picker-calendar", v = "form-field-date-title", H = "form-field-info-text", x = "form-field-ratings", X = {
81
- key: o.RATING_OPTION,
82
- parent: o.RATINGS,
83
- base: "form-field-rating-option",
84
- selected: "form-field-rating-option--selected",
85
- hover: "form-field-rating-option--hover"
86
- }, K = "form-field-show-more-button", y = "form-rich-content", w = "form-submit-button", W = "form-submit-button-label", V = "animated-icon", q = "form-submit-button-icon", Q = "form-next-button", j = "form-previous-button";
87
- export {
88
- V as A,
89
- F as B,
90
- D as C,
91
- a as D,
92
- f as E,
93
- o as F,
94
- R as G,
95
- x as H,
96
- X as I,
97
- _ as J,
98
- K,
99
- c as L,
100
- N as M,
101
- p as N,
102
- U as O,
103
- G as P,
104
- r as Q,
105
- Q as R,
106
- j as S,
107
- y as T,
108
- w as U,
109
- q as V,
110
- W,
111
- B as a,
112
- l as b,
113
- T as c,
114
- C as d,
115
- E as e,
116
- S as f,
117
- L as g,
118
- k as h,
119
- v as i,
120
- O as j,
121
- M as k,
122
- P as l,
123
- n as m,
124
- s as n,
125
- t as o,
126
- h as p,
127
- b as q,
128
- u as r,
129
- g as s,
130
- H as t,
131
- i as u,
132
- e as v,
133
- d as w,
134
- I as x,
135
- A as y,
136
- m as z
137
- };
@@ -1,25 +0,0 @@
1
- import m from "classnames";
2
- import e from "react";
3
- import { ak as u, Y as i, X as C, _ as R, L as T } from "./form-DQauhsho.js";
4
- import { u as d, R as g, s as p, T as S } from "./rich-content-rac.module-B1uyPmtK.js";
5
- import { T as h } from "./form-element-classes-bLFmhsKw.js";
6
- const P = ({ truncate: t = !0 } = {}) => {
7
- const { content: a, maxShownParagraphs: s } = u(), o = e.useMemo(() => ({
8
- colorPalette: R(),
9
- customStyles: {
10
- ...C(),
11
- ...i()
12
- }
13
- }), []), { displayedContent: n, isTruncated: r, isTruncateButtonShown: c, toggleTruncate: l } = d(a, t ? s : void 0);
14
- return /* @__PURE__ */ e.createElement(g, null, () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(T, {
15
- className: m(h, p.richContent),
16
- content: n,
17
- customTheme: o
18
- }), c && /* @__PURE__ */ e.createElement(S, {
19
- isTruncated: r,
20
- onClick: l
21
- })));
22
- };
23
- export {
24
- P as H
25
- };