@wix/form-elements 1.85.0 → 1.87.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 (106) hide show
  1. package/dist/component/{appointment-rac-CCaJ6P5r.js → appointment-rac-DiPF4326.js} +5 -5
  2. package/dist/component/{bookings-address-rac-DEt9SGPG.js → bookings-address-rac-DuqMUPYH.js} +1 -1
  3. package/dist/component/{bookings-email-rac-BydOvOUZ.js → bookings-email-rac-C4uKdWr-.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-BoQki0Pb.js → bookings-first-name-rac-D8Iu-SNH.js} +1 -1
  5. package/dist/component/{bookings-header-rac-DK-EcXrk.js → bookings-header-rac-Df7inEbP.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-BuGIyd43.js → bookings-last-name-rac-3GrFylkJ.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-Cr500ehb.js → bookings-login-bar-rac-Cmm93hGY.js} +2 -2
  8. package/dist/component/{bookings-phone-rac-Bq2zdMxo.js → bookings-phone-rac-CfdQ5qR1.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-DRmfusX9.js → bookings-rich-text-rac-CAFLGrDr.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-b9mcZlMP.js → checkbox-field-rac-D4TSHtYp.js} +5 -5
  11. package/dist/component/{checkbox-group-field-headless-BSNhdCfs.js → checkbox-group-field-headless-BtorRj0k.js} +3 -3
  12. package/dist/component/{checkbox-group-field-rac-BObfui8r.js → checkbox-group-field-rac-CSZjtiTd.js} +4 -4
  13. package/dist/component/{checkbox-group-rac-CBNMgBHU.js → checkbox-group-rac-DVa2KhXh.js} +1 -1
  14. package/dist/component/{checkbox-rac-DXh-i6Ot.js → checkbox-rac-BEAyFkKn.js} +1 -1
  15. package/dist/component/{contacts-address-rac-BDQLFakc.js → contacts-address-rac-DRiJ7oWN.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-BUMVVVfb.js → contacts-birthdate-rac-pFthm4vI.js} +1 -1
  17. package/dist/component/{contacts-company-rac-CidGcaA3.js → contacts-company-rac-Bkf19ZXI.js} +1 -1
  18. package/dist/component/{contacts-email-rac-GePAhKDQ.js → contacts-email-rac-eG6dMktK.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-kw5sIBEE.js → contacts-first-name-rac-BGM8vurp.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-DzoZKs1n.js → contacts-last-name-rac-CB3YwF_-.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-CxVW4Zp0.js → contacts-phone-rac-C-k6Np0j.js} +1 -1
  22. package/dist/component/{contacts-position-rac-CXFxlSty.js → contacts-position-rac-DbBwVhvF.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-kpRGeELB.js → contacts-subscribe-rac-DPFEKv8D.js} +2 -2
  24. package/dist/component/{contacts-tax-id-rac-B5qw-rtP.js → contacts-tax-id-rac-DUe69xy2.js} +1 -1
  25. package/dist/component/{date-availability-BCDMem-_.js → date-availability-LsRBBF2w.js} +1 -1
  26. package/dist/component/{date-input-field-rac-BLDZ4_Mw.js → date-input-field-rac-8tT_tvxK.js} +5 -5
  27. package/dist/component/{date-input-rac-B1WGYKOp.js → date-input-rac-XNgfU9bx.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-BNd8aZ0c.js → date-picker-field-rac-BrVIS9sI.js} +5 -5
  29. package/dist/component/{date-picker-rac-ItWxSngw.js → date-picker-rac-ldp-6ccS.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-Ch8z0NRT.js → date-time-input-field-rac-CoHc9hOG.js} +5 -5
  31. package/dist/component/{date-time-input-rac-FebIovNN.js → date-time-input-rac-BaCayitG.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-BXYHMQ3R.js → dext-checkbox-group-rac-Zhmol3mv.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-C78ScIGY.js → dext-checkbox-rac-ByYJS2iR.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-BptT4fhe.js → dext-date-picker-rac-DsKWfvPj.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-RWJ51IjA.js → dext-date-time-input-rac-BEinQWMz.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-DZDOtSIG.js → dext-dropdown-rac-FuoCb4hK.js} +1 -1
  37. package/dist/component/{dext-email-rac-CJceqZsw.js → dext-email-rac-CfTAbFH5.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-buSXk49E.js → dext-number-input-rac-CwGC_pv7.js} +1 -1
  39. package/dist/component/{dext-phone-rac-CeHUOWck.js → dext-phone-rac-CgMCLDYK.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-CNyNSfeP.js → dext-radio-group-rac-XB40HDWO.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-mmdh9tYT.js → dext-rating-input-rac-BeoGv6No.js} +1 -1
  42. package/dist/component/{dext-tags-rac-CqJ4iv-V.js → dext-tags-rac-DJ0DWl1v.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-P1EzLNDE.js → dext-text-area-rac-3X-i3Lf_.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-Dtz4ZLj7.js → dext-text-input-rac-DJa5OTo5.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-DUVbW2yl.js → dext-url-input-rac-DgsZYkzF.js} +1 -1
  46. package/dist/component/{donation-rac-Nn7z8_to.js → donation-rac-DvklUsO9.js} +6 -6
  47. package/dist/component/{dropdown-field-headless-CT4uSCPR.js → dropdown-field-headless-CMvvmkUR.js} +3 -3
  48. package/dist/component/{dropdown-field-rac-CUiyFJi_.js → dropdown-field-rac-Dogcbl1j.js} +2 -2
  49. package/dist/component/{dropdown-rac-Bs_PVy1q.js → dropdown-rac-CMCVoUmd.js} +1 -1
  50. package/dist/component/{ecom-address-rac-BTXwDlMM.js → ecom-address-rac-B-x688-1.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-CGI84A37.js → ecom-subscription-checkbox-rac-2SO8p_Mh.js} +3 -3
  52. package/dist/component/{email-input-field-rac-DKD7FsQX.js → email-input-field-rac-CWVqDqUg.js} +4 -4
  53. package/dist/component/{events-repeater-rac-B7yIRlyt.js → events-repeater-rac-Br-ida6_.js} +4 -4
  54. package/dist/component/{events-rsvp-rac-C7FOuFmH.js → events-rsvp-rac-BwABDdyN.js} +3 -3
  55. package/dist/component/{field-error-headless-BHTkMu35.js → field-error-headless-D4iJBghM.js} +1 -1
  56. package/dist/component/{field-label-headless-D3DwX65k.js → field-label-headless-CzJhv-wS.js} +1 -1
  57. package/dist/component/{file-upload-rac-B3n_LYYK.js → file-upload-rac-DU6INU4J.js} +4 -4
  58. package/dist/component/{fixed-payment-rac-C6jsiS4-.js → fixed-payment-rac-DEn6L3zu.js} +4 -4
  59. package/dist/component/{form-BkmOXzqo.js → form-Dt3W_RUv.js} +875 -872
  60. package/dist/component/{form-element-classes-BsXkFtp2.js → form-element-classes-BhFk9Jrj.js} +18 -20
  61. package/dist/component/form.css +1 -1
  62. package/dist/component/form.js +1 -1
  63. package/dist/component/{header-field-rac-FG9EP9--.js → header-field-rac-D0K0BqUG.js} +3 -3
  64. package/dist/component/{header-rac-DZZgqFjW.js → header-rac-DyIg-Ltz.js} +1 -1
  65. package/dist/component/{image-choice-rac-CXgE6z_f.js → image-choice-rac-DMjIkxUy.js} +5 -5
  66. package/dist/component/{index-DKV2sNhD.js → index-BovDughA.js} +4 -4
  67. package/dist/component/{index-CSwTHDCX.js → index-DiFa7GGa.js} +2 -2
  68. package/dist/component/{isObjectLike-DYfHbEQ3.js → isObjectLike-CUZBx88n.js} +1 -1
  69. package/dist/component/{multiline-address-field-rac-DnCOKW8F.js → multiline-address-field-rac-CK5u9I0i.js} +6 -6
  70. package/dist/component/{multiline-address-rac-BZRlzLZq.js → multiline-address-rac-w0tpyTzt.js} +1 -1
  71. package/dist/component/{number-input-field-rac-BOJNJ50c.js → number-input-field-rac-CVOSoBnw.js} +5 -5
  72. package/dist/component/{number-input-rac-D8ZcIPwq.js → number-input-rac-DXEMqaqN.js} +1 -1
  73. package/dist/component/{password-rac-T9PR5j2v.js → password-rac-9pZro4oK.js} +5 -5
  74. package/dist/component/{payment-input-rac-C9N3LZOZ.js → payment-input-rac-D9oGt1IQ.js} +5 -5
  75. package/dist/component/{phone-input-field-rac-BxUiCV5Z.js → phone-input-field-rac-B_MnDM0g.js} +4 -4
  76. package/dist/component/{phone-rac-BjKFrr86.js → phone-rac-BqoY5RbY.js} +1 -1
  77. package/dist/component/{product-list-rac-BG-VK_Hz.js → product-list-rac-B_ZzTsCB.js} +5 -5
  78. package/dist/component/{quiz-radio-group-rac-B1x7Yatu.js → quiz-radio-group-rac-Ct2fFqIn.js} +2 -2
  79. package/dist/component/{radio-button-module-classes-BXWANbga.js → radio-button-module-classes-PHiNEQN2.js} +3 -3
  80. package/dist/component/{radio-group-field-rac-DmEOydAr.js → radio-group-field-rac-Dfs4JSH_.js} +4 -4
  81. package/dist/component/{radio-group-rac-DAcU_lkj.js → radio-group-rac-D9SSPWcI.js} +1 -1
  82. package/dist/component/{rating-input-field-rac-Cazqeqzw.js → rating-input-field-rac-BFdsvsk2.js} +5 -5
  83. package/dist/component/{rating-input-rac-KJ8FnJTj.js → rating-input-rac-hG1mVqe-.js} +1 -1
  84. package/dist/component/{rich-content-rac.module-PZgMV2M7.js → rich-content-rac.module-BnJHWZW_.js} +1 -1
  85. package/dist/component/{rich-text-field-rac-DNEeY_m8.js → rich-text-field-rac-CYRioe4F.js} +3 -3
  86. package/dist/component/{rich-text-rac-g9upYD25.js → rich-text-rac-BVFGMc9w.js} +1 -1
  87. package/dist/component/{service-dropdown-rac-CmmWetDa.js → service-dropdown-rac-BDrEc7Zb.js} +4 -4
  88. package/dist/component/{services-multi-choice-rac-D0PJNlq2.js → services-multi-choice-rac-RauhMlXM.js} +5 -5
  89. package/dist/component/{signature-rac-Q4G3uEhw.js → signature-rac-eZQzl11r.js} +4 -4
  90. package/dist/component/submit-button-rac-DeGY6ugG.js +142 -0
  91. package/dist/component/{tags-field-rac-PZ8Vfmsn.js → tags-field-rac-CZ5TvoyT.js} +6 -6
  92. package/dist/component/{tags-rac-DLjeR5G1.js → tags-rac-DXznht8H.js} +1 -1
  93. package/dist/component/{text-area-field-rac-BNVK0R0Z.js → text-area-field-rac-B5qohjUV.js} +5 -5
  94. package/dist/component/{text-area-rac-CNOLe3Vx.js → text-area-rac-B1KlbayF.js} +1 -1
  95. package/dist/component/{text-input-field-rac-DjdW6TCf.js → text-input-field-rac-CHQcR47F.js} +3 -3
  96. package/dist/component/{text-input-headless-DFWQwZAN.js → text-input-headless-CRm8bo7P.js} +3 -3
  97. package/dist/component/{text-input-rac-GXPtQEjT.js → text-input-rac-BfQViUSp.js} +1 -1
  98. package/dist/component/{time-input-rac-B_g-erqu.js → time-input-rac-BhhojlSG.js} +5 -5
  99. package/dist/component/{url-input-field-rac-CXWYeQLf.js → url-input-field-rac-cvzCBb8W.js} +5 -5
  100. package/dist/component/{url-input-rac-DX-vjyXj.js → url-input-rac-C_sH1Z5C.js} +1 -1
  101. package/dist/component/{use-element-state-class-name-lZnP6sE6.js → use-element-state-class-name-CeL6xkSj.js} +1 -1
  102. package/dist/component/{use-service-options-base-BJE86Rzo.js → use-service-options-base-_vksQyAH.js} +1 -1
  103. package/dist/component/{use-text-input-class-name-B-GYaltW.js → use-text-input-class-name-DLHJl2sm.js} +3 -3
  104. package/dist/form.d.ts +55 -8
  105. package/package.json +4 -3
  106. package/dist/component/submit-button-rac-DdLPGJ6v.js +0 -141
@@ -3,15 +3,15 @@ import { RicosViewer as v } from "@wix/ricos/viewer";
3
3
  import c from "classnames";
4
4
  import { parseTime as B } from "@internationalized/date";
5
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-BkmOXzqo.js";
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-BHTkMu35.js";
9
- import { L as J } from "./field-label-headless-D3DwX65k.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, P as X, o as Y, i as Z } from "./form-element-classes-BsXkFtp2.js";
14
- import { u as $ } from "./use-text-input-class-name-B-GYaltW.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
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);
@@ -2,15 +2,15 @@ import { RicosViewer as S } from "@wix/ricos/viewer";
2
2
  import i from "classnames";
3
3
  import r, { useCallback as h, useRef as y } from "react";
4
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-BkmOXzqo.js";
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 P } from "./field-error-headless-BHTkMu35.js";
8
- import { L as T } from "./field-label-headless-D3DwX65k.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
9
  import { u as k } from "./use-invoke-callback-UH73A_J3.js";
10
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 M, P as q, o as x, i as U } from "./form-element-classes-BsXkFtp2.js";
13
- import { u as w } from "./use-text-input-class-name-B-GYaltW.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
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();
@@ -1,5 +1,5 @@
1
1
  import r from "react";
2
- import { U as t } from "./url-input-field-rac-CXWYeQLf.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
@@ -1,5 +1,5 @@
1
1
  import E from "classnames";
2
- import { ac as f } from "./form-BkmOXzqo.js";
2
+ import { ac as f } from "./form-Dt3W_RUv.js";
3
3
  const k = ({ globalClasses: e, moduleClasses: r }) => {
4
4
  var d;
5
5
  const c = ((d = f(...e.parent ? [
@@ -1,5 +1,5 @@
1
1
  import { useState as o, useCallback as D, useEffect as m, useMemo as b } from "react";
2
- import { ai as v } from "./form-BkmOXzqo.js";
2
+ import { ai as v } from "./form-Dt3W_RUv.js";
3
3
  const k = (I) => {
4
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) => ({
@@ -1,7 +1,7 @@
1
- import { aj as l } from "./form-BkmOXzqo.js";
1
+ import { aj as l } from "./form-Dt3W_RUv.js";
2
2
  import { s } from "./field-rac.module-D06m9T9x.js";
3
- import { a1 as m } from "./form-element-classes-BsXkFtp2.js";
4
- import { u as i } from "./use-element-state-class-name-lZnP6sE6.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
6
  const { disabled: a, readOnly: t } = l(), o = i({
7
7
  globalClasses: m,
package/dist/form.d.ts CHANGED
@@ -6586,6 +6586,40 @@ 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
+
6589
6623
  type REMOVED = 'REMOVED';
6590
6624
  /**
6591
6625
  * Wix framework props.
@@ -6926,6 +6960,23 @@ declare enum ErrorType {
6926
6960
  }
6927
6961
 
6928
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
+ };
6929
6980
 
6930
6981
  type FormValue = string | number | boolean | object | null | undefined;
6931
6982
  type FormValues = Record<string, FormValue>;
@@ -6942,13 +6993,6 @@ type FormHandle = {
6942
6993
  validateStep?: (stepId: string) => Promise<boolean>;
6943
6994
  getValues?: () => FormValues;
6944
6995
  };
6945
- type ElementEntry = {
6946
- [field: string]: unknown;
6947
- wix?: Wix;
6948
- className?: string;
6949
- elementProps?: ElementProps;
6950
- };
6951
- type ElementProps<Element extends string = string> = Partial<Record<Element, ElementEntry>>;
6952
6996
  type FormProps = {
6953
6997
  id?: string;
6954
6998
  className?: string;
@@ -6972,8 +7016,11 @@ declare const defaultProps: {
6972
7016
  readonly elementProps: {
6973
7017
  readonly icon: {
6974
7018
  readonly svg: {
6975
- readonly type: 'shape';
6976
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';
6977
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>';
6978
7025
  };
6979
7026
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/form-elements",
3
- "version": "1.85.0",
3
+ "version": "1.87.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": [
@@ -41,7 +41,7 @@
41
41
  "storybook": "storybook dev -p 6006",
42
42
  "storybook:build": "storybook build",
43
43
  "generate-translation-keys": "babel-cli",
44
- "generate-preset-thumbnails": "node scripts/generate-preset-thumbnails.mjs"
44
+ "generate-preset-thumbnails": "node scripts/generate-preset-thumbnails.mts"
45
45
  },
46
46
  "dependencies": {
47
47
  "@babel/runtime": "^7.28.4",
@@ -114,6 +114,7 @@
114
114
  "@wix/sled-playwright": "^1.394.0",
115
115
  "oxfmt": "^0.62.0",
116
116
  "oxlint": "^1.77.0",
117
+ "playwright": "~1.63.0",
117
118
  "publint": "^0.3.24",
118
119
  "react": "^18.3.1",
119
120
  "react-dom": "^18.3.1",
@@ -153,5 +154,5 @@
153
154
  ]
154
155
  }
155
156
  },
156
- "falconPackageHash": "4c58de9df602169fca19edb6ae08477a69551dd149111483bff68a73"
157
+ "falconPackageHash": "f55bd2bf7bcd500b5ad71df6beabf0c852106ca31ee3b7f1a0f6f594"
157
158
  }
@@ -1,141 +0,0 @@
1
- import t, { useRef as O, useCallback as d } from "react";
2
- import I from "@wix/editor-react-components/AnimatedIcon";
3
- import B from "classnames";
4
- import { aj as m, ad as A } from "./form-BkmOXzqo.js";
5
- import { ProgressBar as h, Button as p } from "react-aria-components";
6
- import { f as c } from "./find-child-C60k4CxG.js";
7
- import { a5 as F, a4 as P, a7 as M, a9 as U, A as w, a8 as R, F as v } from "./form-element-classes-BsXkFtp2.js";
8
- function j(e) {
9
- const s = "calc(50% - 2px)";
10
- return /* @__PURE__ */ t.createElement(h, {
11
- ...e,
12
- isIndeterminate: !0
13
- }, ({ percentage: n, isIndeterminate: u }) => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("svg", {
14
- fill: "none",
15
- width: "100%",
16
- height: "100%",
17
- viewBox: "0 0 32 32"
18
- }, /* @__PURE__ */ t.createElement("circle", {
19
- cx: "50%",
20
- cy: "50%",
21
- r: s
22
- }), /* @__PURE__ */ t.createElement("circle", {
23
- cx: "50%",
24
- cy: "50%",
25
- r: s,
26
- // Normalize the path length to 100 so we can easily set stroke-dasharray/-offset to a percentage.
27
- pathLength: "100",
28
- strokeDasharray: u || n == null ? "25 100" : "100 100",
29
- strokeDashoffset: u || n == null ? 0 : 100 - n,
30
- strokeLinecap: "round"
31
- }, u && /* @__PURE__ */ t.createElement("animateTransform", {
32
- attributeName: "transform",
33
- type: "rotate",
34
- // Rotate around the circle's own center (viewBox is 32x32), not the SVG origin.
35
- values: "0 16 16;360 16 16",
36
- dur: "0.75s",
37
- repeatCount: "indefinite"
38
- })))));
39
- }
40
- const a = ({ children: e }) => {
41
- const { id: o, FieldLayout: s } = m(), n = c(e, a.SubmitButton);
42
- return /* @__PURE__ */ t.createElement(s, {
43
- fieldId: o,
44
- renderLabel: () => null,
45
- renderInput: () => /* @__PURE__ */ t.createElement(t.Fragment, null, n),
46
- renderDescription: () => null
47
- });
48
- }, S = ({ className: e, children: o }) => {
49
- const s = c(o, g), n = c(o, T), u = c(o, i);
50
- return /* @__PURE__ */ t.createElement("div", {
51
- className: e
52
- }, s, n, u);
53
- }, g = ({ className: e }) => {
54
- const { showPreviousButton: o, onPreviousClick: s, previousText: n } = m();
55
- return o ? /* @__PURE__ */ t.createElement(p, {
56
- className: e,
57
- onPress: s
58
- }, n) : null;
59
- }, T = ({ className: e }) => {
60
- const { showNextButton: o, onNextClick: s, nextText: n } = m();
61
- return o ? /* @__PURE__ */ t.createElement(p, {
62
- className: e,
63
- onPress: s
64
- }, n) : null;
65
- }, i = ({ className: e, onHoverStart: o, onHoverEnd: s, children: n }) => {
66
- const { showSubmitButton: u, onSubmitClick: _, submitText: l, isDisabled: C, isInProgress: b, isSubmitting: L } = m();
67
- if (!u)
68
- return null;
69
- const x = c(n, i.Label), k = c(n, i.Icon), N = c(n, i.Loader), E = L || b;
70
- return /* @__PURE__ */ t.createElement(p, {
71
- className: e,
72
- "aria-label": l,
73
- onPress: E ? void 0 : _,
74
- onHoverStart: o,
75
- onHoverEnd: s,
76
- isDisabled: C && !E,
77
- "aria-disabled": E || void 0,
78
- "data-in-progress": b
79
- }, b && N ? N : /* @__PURE__ */ t.createElement(t.Fragment, null, x ?? /* @__PURE__ */ t.createElement(f, null), k));
80
- }, f = ({ className: e }) => {
81
- const { submitText: o } = m();
82
- return /* @__PURE__ */ t.createElement("span", {
83
- className: e
84
- }, o);
85
- }, y = ({ children: e }) => /* @__PURE__ */ t.createElement(t.Fragment, null, e), D = ({ className: e }) => /* @__PURE__ */ t.createElement("span", {
86
- className: e
87
- }, /* @__PURE__ */ t.createElement(j, null));
88
- i.Label = f;
89
- i.Icon = y;
90
- i.Loader = D;
91
- S.PreviousButton = g;
92
- S.NextButton = T;
93
- S.SubmitButton = i;
94
- a.SubmitButton = S;
95
- const H = "_navigationContainer_17jkm_1", W = "_rowSpacing_17jkm_6", V = "_navigationButton_17jkm_10", K = "_nextButton_17jkm_24", X = "_previousButton_17jkm_47", Y = "_button_17jkm_90", $ = "_buttonNoSteps_17jkm_129", q = "_buttonWithSteps_17jkm_133", z = "_progress_17jkm_161", r = {
96
- navigationContainer: H,
97
- rowSpacing: W,
98
- navigationButton: V,
99
- nextButton: K,
100
- previousButton: X,
101
- button: Y,
102
- buttonNoSteps: $,
103
- buttonWithSteps: q,
104
- progress: z
105
- }, G = () => {
106
- const { hasSteps: e, showPreviousButton: o } = m(), s = A(v.SUBMIT_BUTTON, v.SUBMIT_BUTTON_ICON), n = O(null), u = d(() => {
107
- var l;
108
- return (l = n.current) == null ? void 0 : l.runAnimationForward();
109
- }, []), _ = d(() => {
110
- var l;
111
- return (l = n.current) == null ? void 0 : l.runAnimationBackward();
112
- }, []);
113
- return /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.SubmitButton, {
114
- className: B({
115
- [r.navigationContainer]: e,
116
- [r.rowSpacing]: o
117
- })
118
- }, /* @__PURE__ */ t.createElement(a.SubmitButton.PreviousButton, {
119
- className: B(F, r.navigationButton, r.previousButton)
120
- }), /* @__PURE__ */ t.createElement(a.SubmitButton.NextButton, {
121
- className: B(P, r.navigationButton, r.nextButton)
122
- }), /* @__PURE__ */ t.createElement(a.SubmitButton.SubmitButton, {
123
- className: B(M, r.button, {
124
- [r.buttonNoSteps]: !e,
125
- [r.buttonWithSteps]: e
126
- }),
127
- onHoverStart: u,
128
- onHoverEnd: _
129
- }, /* @__PURE__ */ t.createElement(a.SubmitButton.SubmitButton.Label, {
130
- className: U
131
- }), /* @__PURE__ */ t.createElement(a.SubmitButton.SubmitButton.Icon, null, s.svg ? /* @__PURE__ */ t.createElement(I, {
132
- ...s,
133
- ref: n,
134
- className: B(w, R, s.className)
135
- }) : null), /* @__PURE__ */ t.createElement(a.SubmitButton.SubmitButton.Loader, {
136
- className: r.progress
137
- }))));
138
- }, st = () => /* @__PURE__ */ t.createElement(G, null);
139
- export {
140
- st as SubmitButtonRAC
141
- };