@wix/form-elements 1.81.0 → 1.83.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/dist/component/{appointment-rac-DmwbqZse.js → appointment-rac-ky2cE6hE.js} +6 -6
  2. package/dist/component/{bookings-address-rac-RCzVU87c.js → bookings-address-rac-Bxc6H9Pb.js} +1 -1
  3. package/dist/component/{bookings-email-rac-Df_Wte1_.js → bookings-email-rac-Dw1Xttdx.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-BmdRGYxF.js → bookings-first-name-rac-dgHOrJaJ.js} +1 -1
  5. package/dist/component/{bookings-header-rac-DewQWtkZ.js → bookings-header-rac-Bl9RYGWo.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-DmmNBuqy.js → bookings-last-name-rac-BeqYpbZq.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-QskvFo0C.js → bookings-login-bar-rac-C1k6o0A5.js} +2 -2
  8. package/dist/component/{bookings-phone-rac-7wn8IXna.js → bookings-phone-rac-ByhaJrwE.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-B5nk0BlD.js → bookings-rich-text-rac-Mw5-ZiIn.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-BnVNfYWL.js → checkbox-field-rac-CMEI5t4Y.js} +7 -7
  11. package/dist/component/{checkbox-group-field-headless-Bx5Y-RMP.js → checkbox-group-field-headless-CP21R7_s.js} +3 -3
  12. package/dist/component/checkbox-group-field-rac-DGOZjSIY.js +42 -0
  13. package/dist/component/{checkbox-group-rac-B20t8dTB.js → checkbox-group-rac-CEGtshrl.js} +1 -1
  14. package/dist/component/{checkbox-indicator-module-classes-DqzGZQRQ.js → checkbox-indicator-module-classes-Bb3xB1ve.js} +1 -1
  15. package/dist/component/{checkbox-rac-ifC6qSE8.js → checkbox-rac-DCnRh1WF.js} +1 -1
  16. package/dist/component/{contacts-address-rac-XJRKvPlp.js → contacts-address-rac-CZb_5N5o.js} +1 -1
  17. package/dist/component/{contacts-birthdate-rac-CKYESrPO.js → contacts-birthdate-rac-DZlwSyp5.js} +1 -1
  18. package/dist/component/{contacts-company-rac-BXwEeb0p.js → contacts-company-rac-BNEF6LjB.js} +1 -1
  19. package/dist/component/{contacts-email-rac-D8Yspo_m.js → contacts-email-rac-CAgk_zfN.js} +1 -1
  20. package/dist/component/{contacts-first-name-rac-mvCGP1LJ.js → contacts-first-name-rac-DyTVcmrX.js} +1 -1
  21. package/dist/component/{contacts-last-name-rac-Clg9RXal.js → contacts-last-name-rac-DrFcDcGr.js} +1 -1
  22. package/dist/component/{contacts-phone-rac-qEwjhByI.js → contacts-phone-rac-UAPALlFx.js} +1 -1
  23. package/dist/component/{contacts-position-rac-Bh8fvf2M.js → contacts-position-rac-CJ1M4kJJ.js} +1 -1
  24. package/dist/component/{contacts-subscribe-rac-DEQ2XkZo.js → contacts-subscribe-rac-1cEd5s1l.js} +2 -2
  25. package/dist/component/{contacts-tax-id-rac-0DUZ4tJz.js → contacts-tax-id-rac-CqnO__fd.js} +1 -1
  26. package/dist/component/{date-availability-2ek2RtXx.js → date-availability-COM2EaRy.js} +1 -1
  27. package/dist/component/{date-input-field-rac-Bp4SQB-t.js → date-input-field-rac-CuuWbw42.js} +80 -79
  28. package/dist/component/{date-input-rac-CYsJcMe5.js → date-input-rac-DfVmj9Gc.js} +1 -1
  29. package/dist/component/{date-picker-field-rac-BGQvnSYI.js → date-picker-field-rac-BFCZik9T.js} +6 -6
  30. package/dist/component/{date-picker-rac-BVncggYR.js → date-picker-rac-C2vajJpb.js} +1 -1
  31. package/dist/component/{date-time-input-field-rac-B1mggelc.js → date-time-input-field-rac-B7ne2emo.js} +127 -126
  32. package/dist/component/{date-time-input-rac-DzdCno0L.js → date-time-input-rac-D4FEieQz.js} +1 -1
  33. package/dist/component/{dext-checkbox-group-rac-CNCpeolD.js → dext-checkbox-group-rac-BDBBTNNo.js} +2 -2
  34. package/dist/component/{dext-checkbox-rac-BYDQ58Mo.js → dext-checkbox-rac-DAAhNboR.js} +1 -1
  35. package/dist/component/{dext-date-picker-rac-aYYk8Nrl.js → dext-date-picker-rac-me7XbR5z.js} +1 -1
  36. package/dist/component/{dext-date-time-input-rac-v2v974p5.js → dext-date-time-input-rac-DLsUl2Eg.js} +1 -1
  37. package/dist/component/{dext-dropdown-rac-C846KZCe.js → dext-dropdown-rac-C3vVIRir.js} +1 -1
  38. package/dist/component/{dext-email-rac-izjbfME9.js → dext-email-rac-a8qXYTLP.js} +1 -1
  39. package/dist/component/{dext-number-input-rac-CnOFsD7l.js → dext-number-input-rac-DdDnL_fX.js} +1 -1
  40. package/dist/component/{dext-phone-rac-D8GMXD88.js → dext-phone-rac-ByaxbHpO.js} +1 -1
  41. package/dist/component/{dext-radio-group-rac-BtiyGCRh.js → dext-radio-group-rac-Bzubt7Uy.js} +2 -2
  42. package/dist/component/{dext-rating-input-rac-BHJ1kitb.js → dext-rating-input-rac-BZ1EvOkG.js} +1 -1
  43. package/dist/component/{dext-tags-rac-CvNjwS5R.js → dext-tags-rac-C_R89noV.js} +2 -2
  44. package/dist/component/{dext-text-area-rac-X5L0Q3sC.js → dext-text-area-rac-DRpYeQ-K.js} +1 -1
  45. package/dist/component/{dext-text-input-rac-swkyAJqC.js → dext-text-input-rac-D_RtbQQ-.js} +1 -1
  46. package/dist/component/{dext-url-input-rac-BYlXOAkz.js → dext-url-input-rac-BSSjSbIo.js} +1 -1
  47. package/dist/component/{donation-rac-CDWLBZZM.js → donation-rac-De0KyyGR.js} +92 -91
  48. package/dist/component/{dropdown-field-headless-JJzbZvps.js → dropdown-field-headless-DNhnTDlD.js} +3 -3
  49. package/dist/component/{dropdown-field-rac-BodpIQ9Q.js → dropdown-field-rac-Bq_FNv9a.js} +3 -3
  50. package/dist/component/{dropdown-rac-Bfbxxx9k.js → dropdown-rac-0UIyqF15.js} +1 -1
  51. package/dist/component/{ecom-address-rac-BCnsL5tr.js → ecom-address-rac-7IVbvs3J.js} +1 -1
  52. package/dist/component/{ecom-subscription-checkbox-rac-CNSdI_ty.js → ecom-subscription-checkbox-rac-DilgIpiG.js} +3 -3
  53. package/dist/component/{email-input-field-rac-Btaa4O5T.js → email-input-field-rac-CHJ6RSGy.js} +83 -79
  54. package/dist/component/{events-repeater-rac-xBwqJddt.js → events-repeater-rac-v18FFLC7.js} +6 -6
  55. package/dist/component/{events-rsvp-rac-D90PwkHd.js → events-rsvp-rac-BpGLrxsf.js} +4 -4
  56. package/dist/component/{field-error-headless-BErhh9GG.js → field-error-headless-DAy-1oAQ.js} +1 -1
  57. package/dist/component/{field-label-headless-BGyK-5xW.js → field-label-headless-BWxHmO0c.js} +1 -1
  58. package/dist/component/field-rac.module-D06m9T9x.js +24 -0
  59. package/dist/component/{file-upload-rac-MxH3CVml.js → file-upload-rac-BfWN27JT.js} +5 -5
  60. package/dist/component/{fixed-payment-rac-DpBA9irF.js → fixed-payment-rac-Bha61SB4.js} +5 -5
  61. package/dist/component/{form-f0tqdMye.js → form-D0eeH0lX.js} +69 -69
  62. package/dist/component/{form-element-classes-jC8D0LnK.js → form-element-classes-Ct1UaxuQ.js} +38 -32
  63. package/dist/component/form.css +1 -1
  64. package/dist/component/form.js +1 -1
  65. package/dist/component/{header-field-rac-BXxFqu9u.js → header-field-rac-uNzfDMbv.js} +3 -3
  66. package/dist/component/{header-rac-BN70esac.js → header-rac-B91q4fHl.js} +1 -1
  67. package/dist/component/{image-choice-rac-DLBGIBXL.js → image-choice-rac-BKcnNGPp.js} +6 -6
  68. package/dist/component/{index-BvB-uE1H.js → index-BWHymomM.js} +2 -2
  69. package/dist/component/{index-DXLEHYlA.js → index-BvzLLTKc.js} +4 -4
  70. package/dist/component/{isObjectLike-BYOX5XY4.js → isObjectLike-D7Mkqoju.js} +1 -1
  71. package/dist/component/multiline-address-field-rac-Avd9Vlv1.js +1617 -0
  72. package/dist/component/{multiline-address-rac-D82Gbj3n.js → multiline-address-rac-BwQOoejw.js} +1 -1
  73. package/dist/component/number-input-field-rac-CRqPXDl0.js +93 -0
  74. package/dist/component/{number-input-rac-Bnsvb-SO.js → number-input-rac-0Y8K4e6K.js} +1 -1
  75. package/dist/component/password-rac-C7F6sEB3.js +143 -0
  76. package/dist/component/payment-input-rac-CTJr4QTK.js +141 -0
  77. package/dist/component/{phone-input-field-rac-Ce_wuE46.js → phone-input-field-rac-jjSmYCI1.js} +5 -5
  78. package/dist/component/{phone-rac-DslINtcH.js → phone-rac-BwSnmgYF.js} +1 -1
  79. package/dist/component/{product-list-rac-C4P_SOyG.js → product-list-rac-CTN2wvHE.js} +7 -7
  80. package/dist/component/{quiz-radio-group-rac-noy4fmD8.js → quiz-radio-group-rac-CZHEDJxr.js} +2 -2
  81. package/dist/component/{radio-button-module-classes-DXQ1UlmI.js → radio-button-module-classes-DCz6XS1X.js} +3 -3
  82. package/dist/component/radio-group-field-rac-60MF_9DO.js +48 -0
  83. package/dist/component/{radio-group-rac-CGHQFyJY.js → radio-group-rac-Dqo-Earp.js} +1 -1
  84. package/dist/component/{rating-input-field-rac-elaferlI.js → rating-input-field-rac-CzWTwWT8.js} +6 -6
  85. package/dist/component/{rating-input-rac-fnOtTKN8.js → rating-input-rac-Nq4tll2Z.js} +1 -1
  86. package/dist/component/{rich-content-rac.module-DbwuwQeo.js → rich-content-rac.module-sUUSbcSy.js} +1 -1
  87. package/dist/component/{rich-text-field-rac-DtcQC8zU.js → rich-text-field-rac-BvLfS4I5.js} +3 -3
  88. package/dist/component/{rich-text-rac-CuT97sby.js → rich-text-rac-BWkTbWk3.js} +1 -1
  89. package/dist/component/{service-dropdown-rac-rk2tzikX.js → service-dropdown-rac-DZ3USe7_.js} +5 -5
  90. package/dist/component/{services-multi-choice-rac-BMQyF_xs.js → services-multi-choice-rac-D-og7fMo.js} +7 -7
  91. package/dist/component/{signature-rac-DeV9C6ta.js → signature-rac-D3c4fnvN.js} +5 -5
  92. package/dist/component/{submit-button-rac-BpN-FYtM.js → submit-button-rac-Dn_BGt1n.js} +2 -2
  93. package/dist/component/tags-field-rac-DXmZBcpO.js +218 -0
  94. package/dist/component/{tags-rac-Dabz4jHd.js → tags-rac-CoXWx42D.js} +1 -1
  95. package/dist/component/text-area-field-rac-Cy0Mr29Z.js +73 -0
  96. package/dist/component/{text-area-rac-CDLF-_56.js → text-area-rac-C3Mjmgpa.js} +1 -1
  97. package/dist/component/text-input-field-rac-D1TB9B_M.js +28 -0
  98. package/dist/component/{text-input-headless-BwVLU9cp.js → text-input-headless-BUa59Rgn.js} +3 -3
  99. package/dist/component/{text-input-rac-CoGTzfo1.js → text-input-rac-BQ3Z9ws4.js} +1 -1
  100. package/dist/component/{time-input-rac-DQDupKTA.js → time-input-rac-Wi0oD5YF.js} +5 -5
  101. package/dist/component/url-input-field-rac-DINXfZdf.js +75 -0
  102. package/dist/component/{url-input-rac-_d6XRdKX.js → url-input-rac-Ch9eTIF_.js} +1 -1
  103. package/dist/component/use-element-state-class-name-j8W1zbdG.js +20 -0
  104. package/dist/component/{use-service-options-base-CRgxxz7b.js → use-service-options-base-BJZhzDyO.js} +1 -1
  105. package/dist/component/use-text-input-class-name-8gMUWeCb.js +24 -0
  106. package/package.json +2 -2
  107. package/dist/component/checkbox-group-field-rac-CZW28rj5.js +0 -41
  108. package/dist/component/field-rac.module-ColNPUt0.js +0 -23
  109. package/dist/component/multiline-address-field-rac-fcQYnPlO.js +0 -1613
  110. package/dist/component/number-input-field-rac-B0-4Rz3w.js +0 -89
  111. package/dist/component/password-rac-BdBjFa8y.js +0 -142
  112. package/dist/component/payment-input-rac-DkAGOvaF.js +0 -137
  113. package/dist/component/radio-group-field-rac-CYBDq7R1.js +0 -47
  114. package/dist/component/tags-field-rac-ByC9DnyH.js +0 -217
  115. package/dist/component/text-area-field-rac-CtSa8XW_.js +0 -69
  116. package/dist/component/text-input-field-rac-C6fQYKhI.js +0 -24
  117. package/dist/component/url-input-field-rac-4T8gcMHH.js +0 -71
  118. package/dist/component/use-element-state-class-name-BqmaTba3.js +0 -15
@@ -1,89 +0,0 @@
1
- import { RicosViewer as v } from "@wix/ricos/viewer";
2
- import m from "classnames";
3
- import r, { useState as U, useCallback as Q, useEffect as $, useRef as j } from "react";
4
- import { NumberField as z, Input as G } from "react-aria-components";
5
- import { ai as C, af as S, as as H, ak as J } from "./form-f0tqdMye.js";
6
- import { f as d } from "./find-child-C60k4CxG.js";
7
- import { D as K, E as W } from "./field-error-headless-BErhh9GG.js";
8
- import { L as X } from "./field-label-headless-BGyK-5xW.js";
9
- import { g as Y, c as Z } from "./numeric-input-utils-CuBMi4-a.js";
10
- import { u as w } from "./use-invoke-callback-UH73A_J3.js";
11
- import { E as ee } from "./error-icon-hZxQ6DEy.js";
12
- import { s as i } from "./field-rac.module-ColNPUt0.js";
13
- import { y as re, O as te, x as ne, o as ae, i as se } from "./form-element-classes-jC8D0LnK.js";
14
- const e = ({ children: n }) => {
15
- var D, L, R;
16
- const { id: a, value: s, onChange: l, disabled: p, required: E, readOnly: o, onBlur: b, onFocus: f, FieldLayout: u, hasError: c, validation: t } = C(), { labelId: y } = S(), F = ((D = t == null ? void 0 : t.number) == null ? void 0 : D.multipleOf) || 1, A = (L = t == null ? void 0 : t.number) == null ? void 0 : L.maximum, x = (R = t == null ? void 0 : t.number) == null ? void 0 : R.minimum, M = _(s), [T, I] = U(M), V = w(b), g = d(n, e.Label), h = d(n, e.Input), k = d(n, e.Description), q = d(n, e.Error), B = Q((N) => {
17
- if (N === void 0 || Number.isNaN(N)) {
18
- l(""), I(NaN);
19
- return;
20
- }
21
- const P = Y(F), O = Number(N.toFixed(P));
22
- l(O), I(O);
23
- }, [
24
- F,
25
- l
26
- ]);
27
- return $(() => {
28
- I(_(s));
29
- }, [
30
- s
31
- ]), /* @__PURE__ */ r.createElement(u, {
32
- fieldId: a,
33
- renderLabel: () => g,
34
- renderInput: () => /* @__PURE__ */ r.createElement(z, {
35
- "aria-labelledby": y,
36
- value: T,
37
- onChange: B,
38
- isDisabled: p,
39
- isRequired: E,
40
- isReadOnly: o,
41
- isInvalid: c,
42
- onBlur: V,
43
- onFocus: f,
44
- minValue: x ?? void 0,
45
- maxValue: A ?? void 0
46
- }, h),
47
- renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, q, k)
48
- });
49
- }, le = ({ className: n }) => {
50
- var c;
51
- const { t: a } = H(), { inputId: s, ariaDescribedBy: l } = S(), { id: p, placeholder: E, validation: o, label: b, required: f } = C();
52
- (c = o == null ? void 0 : o.number) != null && c.multipleOf;
53
- const u = j(null);
54
- return J(() => {
55
- var t;
56
- (t = u.current) == null || t.focus();
57
- }, p), /* @__PURE__ */ r.createElement(G, {
58
- ref: u,
59
- id: s,
60
- "aria-describedby": l,
61
- "aria-label": b,
62
- "aria-roledescription": a("field.number.aria-role-description"),
63
- className: n,
64
- inputMode: "decimal",
65
- placeholder: E,
66
- required: f
67
- });
68
- };
69
- e.Label = X;
70
- e.Input = le;
71
- e.Description = K;
72
- e.Error = W;
73
- const _ = (n) => Z(n) ?? NaN, oe = ({ content: n, locale: a }) => /* @__PURE__ */ r.createElement(v, {
74
- content: n,
75
- locale: a
76
- }), Le = () => /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
77
- className: m(re, i.label)
78
- }, /* @__PURE__ */ r.createElement(e.Label.Required, {
79
- className: m(te, i.requiredMark)
80
- })), /* @__PURE__ */ r.createElement(e.Input, {
81
- className: m(ne, i.input)
82
- }), /* @__PURE__ */ r.createElement(e.Error, {
83
- className: m(ae, i.error)
84
- }, /* @__PURE__ */ r.createElement(ee, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
85
- className: m(se, i.description)
86
- }, oe));
87
- export {
88
- Le as N
89
- };
@@ -1,142 +0,0 @@
1
- import e, { useState as h, useRef as N } from "react";
2
- import { RicosViewer as O } from "@wix/ricos/viewer";
3
- import d from "classnames";
4
- import { ai as p, af as I, ak as x, as as A } from "./form-f0tqdMye.js";
5
- import { TextField as B, Group as P, Input as V, Button as v } from "react-aria-components";
6
- import { f as E, a as g } from "./find-child-C60k4CxG.js";
7
- import { D as M, E as k } from "./field-error-headless-BErhh9GG.js";
8
- import { L as q } from "./field-label-headless-BGyK-5xW.js";
9
- import { E as U } from "./error-icon-hZxQ6DEy.js";
10
- import { H as j } from "./custom-focus-class-_483Pkwp.js";
11
- import { s as u } from "./field-rac.module-ColNPUt0.js";
12
- import { y as H, O as W, x as Z, o as G, i as Q } from "./form-element-classes-jC8D0LnK.js";
13
- const t = ({ children: r, className: o }) => {
14
- const { id: i, value: s, onChange: c, disabled: l, readOnly: m, required: n, hasError: a, onBlur: f, onFocus: _, FieldLayout: y } = p(), { labelId: C } = I(), [F, L] = h(!1), R = E(r, t.Label), D = E(r, t.Control), T = E(r, t.Description), S = E(r, t.Error);
15
- return /* @__PURE__ */ e.createElement(y, {
16
- fieldId: i,
17
- renderLabel: () => R,
18
- renderInput: () => /* @__PURE__ */ e.createElement(B, {
19
- "aria-labelledby": C,
20
- value: s ?? "",
21
- onChange: c,
22
- isDisabled: l,
23
- isReadOnly: m,
24
- isRequired: n,
25
- isInvalid: a,
26
- onBlur: f,
27
- onFocus: _,
28
- className: o
29
- }, g(D, {
30
- isVisible: F,
31
- onToggleVisibility: () => L((w) => !w)
32
- })),
33
- renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, T, S)
34
- });
35
- }, $ = ({ children: r, className: o, ...i }) => {
36
- const { isVisible: s, onToggleVisibility: c } = i, { disabled: l, hasError: m } = p(), n = E(r, t.Input), a = E(r, t.Toggle);
37
- return /* @__PURE__ */ e.createElement(P, {
38
- className: o,
39
- isDisabled: l,
40
- isInvalid: m
41
- }, g(n, {
42
- isVisible: s
43
- }), g(a, {
44
- isVisible: s,
45
- onToggleVisibility: c
46
- }));
47
- }, z = ({ className: r, ...o }) => {
48
- const { isVisible: i } = o, { id: s, placeholder: c } = p(), { inputId: l, ariaDescribedBy: m } = I(), n = N(null);
49
- return x(() => {
50
- var a;
51
- (a = n.current) == null || a.focus();
52
- }, s), /* @__PURE__ */ e.createElement(V, {
53
- ref: n,
54
- id: l,
55
- type: i ? "text" : "password",
56
- "aria-describedby": m,
57
- className: r,
58
- placeholder: c
59
- });
60
- }, J = ({ className: r, showPasswordTooltipText: o, hidePasswordTooltipText: i, children: s, ...c }) => {
61
- const { isVisible: l, onToggleVisibility: m } = c, { disabled: n } = p(), a = l ? i : o;
62
- return /* @__PURE__ */ e.createElement(v, {
63
- type: "button",
64
- isDisabled: n,
65
- onPress: m,
66
- "aria-label": a,
67
- "aria-pressed": l,
68
- className: r
69
- }, s == null ? void 0 : s({
70
- isVisible: l
71
- }));
72
- };
73
- t.Label = q;
74
- t.Control = $;
75
- t.Input = z;
76
- t.Toggle = J;
77
- t.Description = M;
78
- t.Error = k;
79
- const K = (r) => /* @__PURE__ */ e.createElement("svg", {
80
- viewBox: "0 0 24 24",
81
- width: "20",
82
- height: "20",
83
- fill: "none",
84
- stroke: "currentColor",
85
- strokeWidth: "1.5",
86
- "aria-hidden": "true",
87
- ...r
88
- }, /* @__PURE__ */ e.createElement("path", {
89
- d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"
90
- }), /* @__PURE__ */ e.createElement("circle", {
91
- cx: "12",
92
- cy: "12",
93
- r: "3"
94
- })), X = (r) => /* @__PURE__ */ e.createElement("svg", {
95
- viewBox: "0 0 24 24",
96
- width: "20",
97
- height: "20",
98
- fill: "none",
99
- stroke: "currentColor",
100
- strokeWidth: "1.5",
101
- "aria-hidden": "true",
102
- ...r
103
- }, /* @__PURE__ */ e.createElement("path", {
104
- d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"
105
- }), /* @__PURE__ */ e.createElement("circle", {
106
- cx: "12",
107
- cy: "12",
108
- r: "3"
109
- }), /* @__PURE__ */ e.createElement("line", {
110
- x1: "3",
111
- y1: "21",
112
- x2: "21",
113
- y2: "3"
114
- })), Y = "_control_1malj_1", ee = "_toggleButton_1malj_15", b = {
115
- control: Y,
116
- toggleButton: ee
117
- }, te = ({ content: r, locale: o }) => /* @__PURE__ */ e.createElement(O, {
118
- content: r,
119
- locale: o
120
- }), re = () => {
121
- const { t: r } = A();
122
- return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
123
- className: d(H, u.label)
124
- }, /* @__PURE__ */ e.createElement(t.Label.Required, {
125
- className: d(W, u.requiredMark)
126
- })), /* @__PURE__ */ e.createElement(t.Control, {
127
- className: d(Z, u.input, b.control)
128
- }, /* @__PURE__ */ e.createElement(t.Input, {
129
- className: d(u.innerInput, j)
130
- }), /* @__PURE__ */ e.createElement(t.Toggle, {
131
- className: b.toggleButton,
132
- showPasswordTooltipText: r("forms.widget.modals.show-password-tooltip"),
133
- hidePasswordTooltipText: r("forms.widget.modals.hide-password-tooltip")
134
- }, ({ isVisible: o }) => o ? /* @__PURE__ */ e.createElement(X, null) : /* @__PURE__ */ e.createElement(K, null))), /* @__PURE__ */ e.createElement(t.Error, {
135
- className: d(G, u.error)
136
- }, /* @__PURE__ */ e.createElement(U, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
137
- className: d(Q, u.description)
138
- }, te));
139
- }, ge = () => /* @__PURE__ */ e.createElement(re, null);
140
- export {
141
- ge as PasswordRAC
142
- };
@@ -1,137 +0,0 @@
1
- import r, { useCallback as V, useRef as j } from "react";
2
- import { RicosViewer as w } from "@wix/ricos/viewer";
3
- import i from "classnames";
4
- import { TextField as z, Group as J, Input as K } from "react-aria-components";
5
- import { ai as D, af as S, ab as T, as as W, ak as X } from "./form-f0tqdMye.js";
6
- import { f as m } from "./find-child-C60k4CxG.js";
7
- import { D as Y, E as Z } from "./field-error-headless-BErhh9GG.js";
8
- import { L as ee } from "./field-label-headless-BGyK-5xW.js";
9
- import { f as R, g as re } from "./payment-field-utils-DobiK5Xh.js";
10
- import { u as te } from "./use-synced-display-value-DcAxdn3M.js";
11
- import { E as ne } from "./error-icon-hZxQ6DEy.js";
12
- import { H as ae } from "./custom-focus-class-_483Pkwp.js";
13
- import { s as u } from "./field-rac.module-ColNPUt0.js";
14
- import { y as se, O as oe, x as le, o as ce, i as ie } from "./form-element-classes-jC8D0LnK.js";
15
- function ue(e, t) {
16
- return {
17
- productId: e.id,
18
- price: t,
19
- quantity: 1
20
- };
21
- }
22
- function h(e) {
23
- if (e == null || e === "")
24
- return;
25
- const t = Number(String(e).replace(/,/g, "."));
26
- return Number.isNaN(t) ? void 0 : t;
27
- }
28
- const n = ({ children: e }) => {
29
- var O, A, g, P;
30
- const { id: t, value: a, onChange: s, disabled: p, readOnly: d, required: y, hasError: b, onBlur: o, onFocus: E, FieldLayout: M, validation: _ } = D(), { labelId: q, prefixId: G } = S(), { regionalFormat: c } = T(), N = (g = (A = (O = _ == null ? void 0 : _.predefined) == null ? void 0 : O.paymentOptions) == null ? void 0 : A.products) == null ? void 0 : g[0], C = (P = a == null ? void 0 : a.at(0)) == null ? void 0 : P.price, [F, I] = te({
31
- sourceValue: C,
32
- format: (l) => R(String(l ?? ""), c),
33
- regionalFormat: c
34
- }), $ = V(() => {
35
- const l = R(F, c);
36
- I(l || ""), o == null || o();
37
- }, [
38
- F,
39
- c,
40
- o,
41
- I
42
- ]), U = V((l) => {
43
- I(l);
44
- const L = h(R(l, c)), Q = h(C);
45
- if (L !== Q) {
46
- if (L === void 0) {
47
- s(null);
48
- return;
49
- }
50
- s([
51
- ue(N, L)
52
- ]);
53
- }
54
- }, [
55
- s,
56
- N,
57
- c,
58
- C,
59
- I
60
- ]), k = m(e, n.Label), B = m(e, n.Input), v = m(e, n.Description), H = m(e, n.Error);
61
- return /* @__PURE__ */ r.createElement(M, {
62
- fieldId: t,
63
- renderLabel: () => k,
64
- renderInput: () => /* @__PURE__ */ r.createElement(z, {
65
- "aria-labelledby": `${q} ${G}`,
66
- value: a ? F : "",
67
- onChange: U,
68
- isDisabled: p,
69
- isReadOnly: d,
70
- isRequired: y,
71
- isInvalid: b,
72
- onBlur: $,
73
- onFocus: E
74
- }, B),
75
- renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, H, v)
76
- });
77
- }, f = ({ children: e, className: t }) => {
78
- const { disabled: a, hasError: s } = D(), p = m(e, f.Currency), d = m(e, f.Value);
79
- return /* @__PURE__ */ r.createElement(J, {
80
- className: t,
81
- isDisabled: a,
82
- isInvalid: s
83
- }, p, d);
84
- }, me = ({ className: e }) => {
85
- const { currency: t } = T(), { t: a } = W(), { prefixId: s } = S();
86
- return t ? /* @__PURE__ */ r.createElement("span", {
87
- id: s,
88
- "aria-hidden": !1,
89
- "aria-label": re(a, t),
90
- className: e
91
- }, t.sign || t.code) : null;
92
- }, pe = ({ className: e }) => {
93
- const { id: t, placeholder: a, label: s } = D(), { inputId: p, labelId: d, prefixId: y, ariaDescribedBy: b } = S(), o = j(null);
94
- return X(() => {
95
- var E;
96
- (E = o.current) == null || E.focus();
97
- }, t), /* @__PURE__ */ r.createElement(K, {
98
- ref: o,
99
- id: p,
100
- className: e,
101
- placeholder: a,
102
- "aria-label": s,
103
- "aria-labelledby": `${d} ${y}`,
104
- "aria-describedby": b,
105
- autoComplete: "off"
106
- });
107
- };
108
- f.Currency = me;
109
- f.Value = pe;
110
- n.Label = ee;
111
- n.Input = f;
112
- n.Description = Y;
113
- n.Error = Z;
114
- const de = "_inputGroup_vuy4u_1", fe = "_currency_vuy4u_14", x = {
115
- inputGroup: de,
116
- currency: fe
117
- }, Ee = ({ content: e, locale: t }) => /* @__PURE__ */ r.createElement(w, {
118
- content: e,
119
- locale: t
120
- }), Ie = () => /* @__PURE__ */ r.createElement(n, null, /* @__PURE__ */ r.createElement(n.Label, {
121
- className: i(se, u.label)
122
- }, /* @__PURE__ */ r.createElement(n.Label.Required, {
123
- className: i(oe, u.requiredMark)
124
- })), /* @__PURE__ */ r.createElement(n.Input, {
125
- className: i(le, u.input, x.inputGroup)
126
- }, /* @__PURE__ */ r.createElement(n.Input.Currency, {
127
- className: x.currency
128
- }), /* @__PURE__ */ r.createElement(n.Input.Value, {
129
- className: i(u.innerInput, ae)
130
- })), /* @__PURE__ */ r.createElement(n.Error, {
131
- className: i(ce, u.error)
132
- }, /* @__PURE__ */ r.createElement(ne, null), /* @__PURE__ */ r.createElement(n.Error.Text, null)), /* @__PURE__ */ r.createElement(n.Description, {
133
- className: i(ie, u.description)
134
- }, Ee)), Ve = () => /* @__PURE__ */ r.createElement(Ie, null);
135
- export {
136
- Ve as PaymentInputRAC
137
- };
@@ -1,47 +0,0 @@
1
- import { RicosViewer as n } from "@wix/ricos/viewer";
2
- import t from "classnames";
3
- import e from "react";
4
- import { a, s as o, R as m } from "./radio-button-module-classes-DXQ1UlmI.js";
5
- import { E as c } from "./error-icon-hZxQ6DEy.js";
6
- import { s } from "./field-rac.module-ColNPUt0.js";
7
- import { L as i, K as E, J as _, y as O, O as R, x as p, o as L, i as I } from "./form-element-classes-jC8D0LnK.js";
8
- import { u as D } from "./use-element-state-class-name-BqmaTba3.js";
9
- const N = ({ content: r, locale: l }) => /* @__PURE__ */ e.createElement(n, {
10
- content: r,
11
- locale: l
12
- }), f = ({ classes: r = {
13
- container: _,
14
- label: E,
15
- radioButton: i
16
- } }) => {
17
- const l = D({
18
- globalClasses: r.radioButton,
19
- moduleClasses: m
20
- });
21
- return /* @__PURE__ */ e.createElement(a, null, /* @__PURE__ */ e.createElement(a.Label, {
22
- className: t(O, s.label)
23
- }, /* @__PURE__ */ e.createElement(a.Label.Required, {
24
- className: t(R, s.requiredMark)
25
- }), /* @__PURE__ */ e.createElement(a.Label.Image, {
26
- className: o.labelImage
27
- })), /* @__PURE__ */ e.createElement(a.Options, {
28
- className: t(r.container, o.options)
29
- }, /* @__PURE__ */ e.createElement(a.Option, {
30
- className: o.option
31
- }, /* @__PURE__ */ e.createElement(a.Option.Input, {
32
- className: o.optionInput
33
- }), /* @__PURE__ */ e.createElement(a.Option.Control, {
34
- className: l
35
- }), /* @__PURE__ */ e.createElement(a.Option.Label, {
36
- className: t(r.label, o.optionLabel)
37
- }), /* @__PURE__ */ e.createElement(a.Option.OtherInput, {
38
- className: t(p, s.input)
39
- }))), /* @__PURE__ */ e.createElement(a.Error, {
40
- className: t(L, s.error)
41
- }, /* @__PURE__ */ e.createElement(c, null), /* @__PURE__ */ e.createElement(a.Error.Text, null)), /* @__PURE__ */ e.createElement(a.Description, {
42
- className: t(I, s.description)
43
- }, N));
44
- };
45
- export {
46
- f as R
47
- };
@@ -1,217 +0,0 @@
1
- import { RicosViewer as Q } from "@wix/ricos/viewer";
2
- import L from "classnames";
3
- import e, { useMemo as C, useState as j, useRef as M, useLayoutEffect as w, useCallback as k } from "react";
4
- import { CheckboxGroup as z, TextField as J, Input as K, CheckboxField as X, CheckboxButton as Y } from "react-aria-components";
5
- import { ai as D, af as Z, as as v, ab as ee, ak as te } from "./form-f0tqdMye.js";
6
- import { f, a as x } from "./find-child-C60k4CxG.js";
7
- import { E as B, D as $ } from "./field-error-headless-BErhh9GG.js";
8
- import { L as P } from "./field-label-headless-BGyK-5xW.js";
9
- import { F as oe } from "./fieldset-headless-CD3fds9J.js";
10
- import { N as y } from "./options-layout-constants-DEfIEJWD.js";
11
- import { E as ne } from "./error-icon-hZxQ6DEy.js";
12
- import { s as R } from "./field-rac.module-ColNPUt0.js";
13
- import { y as ae, O as se, _ as re, x as le, o as ie, i as ce, $ as ue } from "./form-element-classes-jC8D0LnK.js";
14
- import { o as de } from "./options-rac.module-KM-VT_KY.js";
15
- import { u as me } from "./use-element-state-class-name-BqmaTba3.js";
16
- const N = "Other", pe = (o, t) => {
17
- const c = t.length + 2;
18
- return (o.find((s) => s.startsWith(`${t}: `)) || "").slice(c);
19
- }, he = (o) => o.map((t) => t.value ?? t.label), H = ({ className: o, ...t }) => {
20
- const { label: a } = t;
21
- return /* @__PURE__ */ e.createElement("span", {
22
- className: o
23
- }, a);
24
- }, W = ({ className: o }) => {
25
- const { value: t, onChange: a, addOtherLabel: c, addOtherPlaceholder: i, otherInputCharacterLimit: s, disabled: u, readOnly: b, hasError: d } = D(), { t: m } = v(), r = c || m("add-other.default-other-option-label") || N, p = C(() => pe(t || [], r), [
26
- t,
27
- r
28
- ]), [n, _] = j(p), h = M(a);
29
- w(() => {
30
- h.current = a;
31
- });
32
- const I = k((E) => {
33
- _(E);
34
- const F = (t || []).filter((O) => !O.startsWith(`${r}:`) && O !== r), S = E ? `${r}: ${E}` : r;
35
- h.current([
36
- ...F,
37
- S
38
- ]);
39
- }, [
40
- t,
41
- r
42
- ]);
43
- return /* @__PURE__ */ e.createElement(J, {
44
- value: n,
45
- onChange: I,
46
- isDisabled: u,
47
- isReadOnly: b,
48
- isInvalid: d,
49
- "aria-label": r
50
- }, /* @__PURE__ */ e.createElement(K, {
51
- "data-hook": "tags-other-input",
52
- "data-filled": n ? !0 : void 0,
53
- placeholder: i,
54
- maxLength: s,
55
- className: o
56
- }));
57
- }, T = ({ children: o, className: t, ...a }) => {
58
- const { value: c, label: i, isOther: s, isFirstOption: u } = a, { id: b, value: d, onChange: m, options: r, disabled: p, readOnly: n, hasError: _ } = D(), h = M(null);
59
- te(() => {
60
- var O;
61
- u && ((O = h.current) == null || O.focus({
62
- preventScroll: !0
63
- }));
64
- }, b);
65
- const I = f(o, H), E = C(() => d || [], [
66
- d
67
- ]), F = C(() => s ? E.find((O) => O === i || O.startsWith(`${i}: `)) || i : c, [
68
- s,
69
- E,
70
- i,
71
- c
72
- ]), S = k((O) => {
73
- const U = he(r || []), V = E.filter((G) => U.includes(G));
74
- m(O ? [
75
- ...V,
76
- i
77
- ] : V);
78
- }, [
79
- i,
80
- m,
81
- r,
82
- E
83
- ]);
84
- return /* @__PURE__ */ e.createElement(X, {
85
- inputRef: h,
86
- value: F,
87
- onChange: s ? S : void 0,
88
- isDisabled: p,
89
- isReadOnly: n,
90
- isInvalid: _
91
- }, /* @__PURE__ */ e.createElement(Y, {
92
- className: t,
93
- "data-hook": `tags-${s ? N : c}`
94
- }, x(I, {
95
- value: c,
96
- label: i,
97
- isOther: s,
98
- isFirstOption: u
99
- })));
100
- }, A = ({ children: o, className: t }) => {
101
- const { options: a, addOther: c, addOtherLabel: i, numberOfColumns: s = y.FREE_FLOW } = D(), { isMobile: u } = ee(), { t: b } = v(), d = u && s !== y.FREE_FLOW ? y.ONE : s, m = i || b("add-other.default-other-option-label") || N, r = f(o, T), p = C(() => {
102
- const n = a || [];
103
- return c ? [
104
- ...n,
105
- {
106
- label: m,
107
- value: m,
108
- isOther: !0
109
- }
110
- ] : n;
111
- }, [
112
- a,
113
- c,
114
- m
115
- ]);
116
- return p.length === 0 ? null : /* @__PURE__ */ e.createElement("div", {
117
- className: t,
118
- "data-columns": d
119
- }, p.map((n, _) => {
120
- const h = n.value ?? n.label;
121
- return x(r, {
122
- key: n.isOther ? N : h,
123
- value: h,
124
- label: n.label,
125
- isOther: n.isOther,
126
- isFirstOption: _ === 0
127
- });
128
- }));
129
- }, q = ({ children: o, className: t }) => {
130
- const { addOther: a, addOtherLabel: c, hasError: i, readOnly: s, value: u } = D(), { t: b } = v(), d = c || b("add-other.default-other-option-label") || N, m = f(o, A), r = f(o, W), p = C(() => !a || !u ? !1 : u.some((n) => n === d || n.startsWith(`${d}:`)), [
131
- a,
132
- u,
133
- d
134
- ]);
135
- return /* @__PURE__ */ e.createElement("div", {
136
- className: t,
137
- "data-invalid": i,
138
- "data-readonly": s
139
- }, m, p && r);
140
- }, l = ({ children: o }) => {
141
- const { id: t, value: a, onChange: c, FieldLayout: i, required: s, disabled: u, readOnly: b, hasError: d, onBlur: m, onFocus: r } = D(), { inputId: p, labelId: n, ariaDescribedBy: _ } = Z(), h = C(() => a || [], [
142
- a
143
- ]), I = f(o, P), E = f(o, q), F = f(o, $), S = f(o, B);
144
- return /* @__PURE__ */ e.createElement(i, {
145
- fieldId: t,
146
- renderLabel: () => I,
147
- renderInput: () => /* @__PURE__ */ e.createElement(oe, {
148
- id: p,
149
- ariaLabelledBy: n,
150
- ariaDescribedBy: _,
151
- required: s,
152
- onBlur: m,
153
- onFocus: r
154
- }, /* @__PURE__ */ e.createElement(z, {
155
- "aria-labelledby": n,
156
- value: h,
157
- onChange: c,
158
- isDisabled: u,
159
- isReadOnly: b,
160
- isRequired: s,
161
- isInvalid: d
162
- }, E)),
163
- renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, S, F)
164
- });
165
- };
166
- A.Option = T;
167
- T.Label = H;
168
- l.Label = P;
169
- l.Control = q;
170
- l.Options = A;
171
- l.OtherInput = W;
172
- l.Description = $;
173
- l.Error = B;
174
- const Ee = "_control_7oh59_1", Oe = "_options_7oh59_7", be = "_option_7oh59_7", fe = "_optionHover_7oh59_72", _e = "_optionSelected_7oh59_72", g = {
175
- control: Ee,
176
- options: Oe,
177
- option: be,
178
- optionHover: fe,
179
- optionSelected: _e
180
- }, Le = ({ content: o, locale: t }) => /* @__PURE__ */ e.createElement(Q, {
181
- content: o,
182
- locale: t
183
- }), Ce = {
184
- base: g.option,
185
- selected: g.optionSelected,
186
- hover: g.optionHover
187
- }, Be = () => {
188
- const o = me({
189
- globalClasses: ue,
190
- moduleClasses: Ce
191
- });
192
- return /* @__PURE__ */ e.createElement(l, null, /* @__PURE__ */ e.createElement(l.Label, {
193
- className: L(ae, R.label)
194
- }, /* @__PURE__ */ e.createElement(l.Label.Required, {
195
- className: L(se, R.requiredMark)
196
- })), /* @__PURE__ */ e.createElement(l.Control, {
197
- className: g.control
198
- }, /* @__PURE__ */ e.createElement(l.Options, {
199
- className: L(re, g.options)
200
- }, /* @__PURE__ */ e.createElement(l.Options.Option, {
201
- className: ({ isSelected: t, isHovered: a }) => o({
202
- isSelected: t,
203
- isHovered: a
204
- })
205
- }, /* @__PURE__ */ e.createElement(l.Options.Option.Label, {
206
- className: de.optionLabel
207
- }))), /* @__PURE__ */ e.createElement(l.OtherInput, {
208
- className: L(le, R.input)
209
- })), /* @__PURE__ */ e.createElement(l.Error, {
210
- className: L(ie, R.error)
211
- }, /* @__PURE__ */ e.createElement(ne, null), /* @__PURE__ */ e.createElement(l.Error.Text, null)), /* @__PURE__ */ e.createElement(l.Description, {
212
- className: L(ce, R.description)
213
- }, Le));
214
- };
215
- export {
216
- Be as T
217
- };