@wix/form-elements 1.146.0 → 1.148.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-scUix9QX.js → appointment-rac-BNqXl3dq.js} +168 -164
  2. package/dist/component/{bookings-address-rac-CKemkJOO.js → bookings-address-rac-DzLf588z.js} +1 -1
  3. package/dist/component/{bookings-email-rac-CDqdhPAB.js → bookings-email-rac-BCNWH7ss.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-DEy_7Hjb.js → bookings-first-name-rac-D36aHUOJ.js} +1 -1
  5. package/dist/component/{bookings-header-rac-Bl4xy9lB.js → bookings-header-rac-CNr2y2ES.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-CsL9xQ1W.js → bookings-last-name-rac-yHE6ZIxr.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-DkHYQ4No.js → bookings-login-bar-rac-C3weOc1i.js} +6 -6
  8. package/dist/component/{bookings-phone-rac-BoBiFwbV.js → bookings-phone-rac-CIo_ApRf.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-DZZnPKWA.js → bookings-rich-text-rac-rgKnvt57.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-UgLmJxB-.js → checkbox-field-rac-CMaVxLNe.js} +9 -7
  11. package/dist/component/{checkbox-group-field-headless-C809nB0Q.js → checkbox-group-field-headless-XPtqS8Km.js} +68 -68
  12. package/dist/component/{checkbox-group-field-rac-u4i4wG21.js → checkbox-group-field-rac-C_58XfQt.js} +9 -9
  13. package/dist/component/{checkbox-group-rac-DBAQhSo3.js → checkbox-group-rac-FQrWViSh.js} +1 -1
  14. package/dist/component/{checkbox-indicator-module-classes-6173wvuW.js → checkbox-indicator-module-classes-akWZsZNn.js} +1 -1
  15. package/dist/component/{checkbox-rac-FDQVsI5-.js → checkbox-rac-C5Lj2b1N.js} +1 -1
  16. package/dist/component/{contacts-address-rac-DnArylPa.js → contacts-address-rac-OhpLzD0X.js} +1 -1
  17. package/dist/component/{contacts-birthdate-rac-C19jhGEO.js → contacts-birthdate-rac-Dnqq84ct.js} +1 -1
  18. package/dist/component/{contacts-company-rac-Dxs0hs_i.js → contacts-company-rac-DMnTF55t.js} +1 -1
  19. package/dist/component/{contacts-email-rac-D-H43L8r.js → contacts-email-rac-DmZhScW2.js} +1 -1
  20. package/dist/component/{contacts-first-name-rac-DwV5NESk.js → contacts-first-name-rac-B6A4fuzK.js} +1 -1
  21. package/dist/component/{contacts-last-name-rac-C5v2xurf.js → contacts-last-name-rac-DVz97lew.js} +1 -1
  22. package/dist/component/{contacts-phone-rac-D9a5x-xl.js → contacts-phone-rac-DV8aO0uS.js} +1 -1
  23. package/dist/component/{contacts-position-rac-DfsgOv-k.js → contacts-position-rac-BP_yBIE4.js} +1 -1
  24. package/dist/component/{contacts-subscribe-rac-B-Hho0Kb.js → contacts-subscribe-rac-wmTprtLf.js} +1 -1
  25. package/dist/component/{contacts-tax-id-rac-q6TQkB4b.js → contacts-tax-id-rac-CUEPBQye.js} +1 -1
  26. package/dist/component/{date-availability-CMDvf5VU.js → date-availability-BK_0gLRv.js} +1 -1
  27. package/dist/component/{date-input-field-rac-C1WLUct3.js → date-input-field-rac-BfWPvRnd.js} +84 -78
  28. package/dist/component/{date-input-rac-cNQ-nr4D.js → date-input-rac-B7vAMRBX.js} +1 -1
  29. package/dist/component/{date-picker-field-rac-mx11z-MO.js → date-picker-field-rac-CpDY4EkU.js} +111 -105
  30. package/dist/component/{date-picker-rac-DeTz17zC.js → date-picker-rac-BCswaZB1.js} +1 -1
  31. package/dist/component/{date-time-input-field-rac-feQ2E1eU.js → date-time-input-field-rac-D9w4eEa0.js} +135 -129
  32. package/dist/component/{date-time-input-rac-G0s0xP4v.js → date-time-input-rac-_im8-JRC.js} +1 -1
  33. package/dist/component/{dext-checkbox-group-rac-BcTN1nJb.js → dext-checkbox-group-rac-Di7B1Wzv.js} +2 -2
  34. package/dist/component/{dext-checkbox-rac-DX0TOrCO.js → dext-checkbox-rac-BPendOsP.js} +1 -1
  35. package/dist/component/{dext-date-picker-rac-CpDp11oa.js → dext-date-picker-rac-_-Ig9Qn6.js} +1 -1
  36. package/dist/component/{dext-date-time-input-rac-BRvO8izU.js → dext-date-time-input-rac-dKFW87yu.js} +1 -1
  37. package/dist/component/{dext-dropdown-rac-DGZ4Yi_X.js → dext-dropdown-rac-Cpdpps7P.js} +1 -1
  38. package/dist/component/{dext-email-rac-B9YCFHB4.js → dext-email-rac-D4UmYH5m.js} +1 -1
  39. package/dist/component/{dext-number-input-rac-D890dBZf.js → dext-number-input-rac-DUetGnYJ.js} +1 -1
  40. package/dist/component/{dext-phone-rac-BAQftbXo.js → dext-phone-rac-Bsz_DAT9.js} +1 -1
  41. package/dist/component/dext-radio-group-rac-B_soj2FD.js +18 -0
  42. package/dist/component/{dext-rating-input-rac-BqQKVaHo.js → dext-rating-input-rac-cm40qt4O.js} +1 -1
  43. package/dist/component/{dext-tags-rac-zxxKcNUe.js → dext-tags-rac-D1ULx6t1.js} +2 -2
  44. package/dist/component/{dext-text-area-rac-Ctp9SwPg.js → dext-text-area-rac-IkL67rHB.js} +1 -1
  45. package/dist/component/{dext-text-input-rac-c_QMlyjr.js → dext-text-input-rac-DsYSTEL2.js} +1 -1
  46. package/dist/component/{dext-url-input-rac-96pv15aC.js → dext-url-input-rac-BKvEkpYu.js} +1 -1
  47. package/dist/component/{donation-rac-GEWKSLJY.js → donation-rac-CaCXMa-H.js} +87 -85
  48. package/dist/component/{dropdown-field-headless-C3OxMhLE.js → dropdown-field-headless-DcrQK8mL.js} +36 -34
  49. package/dist/component/{dropdown-field-rac-CCXfBmSc.js → dropdown-field-rac-CuGoz_6I.js} +9 -10
  50. package/dist/component/{dropdown-rac-CR7hswXE.js → dropdown-rac-rIe6ZqaZ.js} +1 -1
  51. package/dist/component/{ecom-address-rac-khMuxEFD.js → ecom-address-rac-DT0rzvvp.js} +1 -1
  52. package/dist/component/{ecom-subscription-checkbox-rac-CAi_AHpb.js → ecom-subscription-checkbox-rac-ZfbiME6e.js} +5 -5
  53. package/dist/component/{email-input-field-rac-B83mY2lg.js → email-input-field-rac-8Qn3yskh.js} +62 -62
  54. package/dist/component/{events-repeater-rac-ClEwXgmb.js → events-repeater-rac-DyHrMd3y.js} +25 -21
  55. package/dist/component/{events-rsvp-rac-BJ5q2SVR.js → events-rsvp-rac-CoL-euuc.js} +9 -9
  56. package/dist/component/{field-error-headless-CsYQCsiT.js → field-error-headless-RylIeqXr.js} +6 -6
  57. package/dist/component/{field-label-headless-Yg_1PMSg.js → field-label-headless-d3hZxIEc.js} +15 -15
  58. package/dist/component/field-rac.module-DP0lkkEv.js +25 -0
  59. package/dist/component/{file-upload-rac-DJsuI_lR.js → file-upload-rac-rXbabrgc.js} +172 -168
  60. package/dist/component/{fixed-payment-rac-BMFe9wxU.js → fixed-payment-rac-CaR7pXXA.js} +13 -13
  61. package/dist/component/{form-Bed4Kfz8.js → form-DhIEC3nB.js} +2309 -2308
  62. package/dist/component/form.css +1 -1
  63. package/dist/component/form.js +2 -2
  64. package/dist/component/{header-field-rac-DPQTrOSZ.js → header-field-rac-nELbyGjP.js} +4 -4
  65. package/dist/component/{header-rac-CzXsuLmE.js → header-rac-q80EQNmM.js} +1 -1
  66. package/dist/component/{image-choice-rac-R_4pbOSr.js → image-choice-rac-CLMiTQK0.js} +42 -42
  67. package/dist/component/{index-DZxHlvzt.js → index-C-jVrv9Y.js} +91 -91
  68. package/dist/component/{index-qSZCe_WC.js → index-DnLJzPM-.js} +2 -2
  69. package/dist/component/{isObjectLike-B-a5uaU-.js → isObjectLike-Bf577MHV.js} +15 -15
  70. package/dist/component/{multiline-address-field-rac-rv4IZZy_.js → multiline-address-field-rac-BVAv1w9F.js} +155 -137
  71. package/dist/component/{multiline-address-rac-DZ7cYtgn.js → multiline-address-rac-qMuUHA9U.js} +1 -1
  72. package/dist/component/{number-input-field-rac-CL9iXKIf.js → number-input-field-rac-B_vnBWFG.js} +24 -22
  73. package/dist/component/{number-input-rac-BeGn6qJR.js → number-input-rac-BPCIW8Fz.js} +1 -1
  74. package/dist/component/{password-rac-DfvhdsKG.js → password-rac-D72HG72u.js} +28 -26
  75. package/dist/component/{payment-input-rac-BmMfi5rf.js → payment-input-rac-DthVgsAi.js} +32 -30
  76. package/dist/component/{phone-input-field-rac-DW0a1pXs.js → phone-input-field-rac-XIPkH8Fb.js} +46 -46
  77. package/dist/component/{phone-rac-quZjJ08H.js → phone-rac-U94fCfer.js} +1 -1
  78. package/dist/component/{product-list-rac-Ci0KB7sN.js → product-list-rac-BRMGPyhr.js} +78 -78
  79. package/dist/component/{quiz-radio-group-rac--UUtGx2t.js → quiz-radio-group-rac-DafNzzgX.js} +1 -1
  80. package/dist/component/radio-button-module-classes-DtFlHID_.js +134 -0
  81. package/dist/component/{radio-group-field-rac-w8fHpFKJ.js → radio-group-field-rac-BXrYWjew.js} +13 -13
  82. package/dist/component/{radio-group-rac-jO8aghii.js → radio-group-rac-BNyFfQYV.js} +1 -1
  83. package/dist/component/{rating-input-field-rac-BRc2PtqE.js → rating-input-field-rac-KbkiVCZ7.js} +27 -27
  84. package/dist/component/{rating-input-rac-D9zs06xR.js → rating-input-rac-zT4vPkwP.js} +1 -1
  85. package/dist/component/{rich-content-rac.module-Cv3ZmD00.js → rich-content-rac.module-C0OQetct.js} +8 -8
  86. package/dist/component/{rich-text-field-rac-BmWuIfA8.js → rich-text-field-rac-T4NoShC0.js} +4 -4
  87. package/dist/component/{rich-text-rac-BnqnrvB1.js → rich-text-rac-m6VRCRZu.js} +1 -1
  88. package/dist/component/{service-dropdown-rac-Cl81KfJU.js → service-dropdown-rac-BFwKhL1l.js} +44 -45
  89. package/dist/component/{services-multi-choice-rac-sQ1NF9hY.js → services-multi-choice-rac-DjzcuRWv.js} +13 -13
  90. package/dist/component/{signature-rac-Huairu7V.js → signature-rac-B1LPKnIw.js} +281 -279
  91. package/dist/component/{submit-button-rac-Dpg7N0TG.js → submit-button-rac-Cz3PVtW4.js} +25 -25
  92. package/dist/component/{tags-field-rac-BQ8TEqXH.js → tags-field-rac-DzSoL__s.js} +82 -82
  93. package/dist/component/{tags-rac-CFOmyCCc.js → tags-rac-DMYJDrm-.js} +1 -1
  94. package/dist/component/{text-area-field-rac-DNiMa7d3.js → text-area-field-rac-SuMzBm-Q.js} +30 -28
  95. package/dist/component/{text-area-rac-kLFe-KbZ.js → text-area-rac-C-zmnJgt.js} +1 -1
  96. package/dist/component/{text-input-field-rac-CqENSUUX.js → text-input-field-rac-BmQlXTK9.js} +6 -6
  97. package/dist/component/text-input-headless-BsrjGTK4.js +47 -0
  98. package/dist/component/{text-input-rac-uYQEfOtE.js → text-input-rac-DhQFKG4h.js} +1 -1
  99. package/dist/component/time-input-rac-CRZZdbTI.js +161 -0
  100. package/dist/component/{url-input-field-rac-BioH7kuz.js → url-input-field-rac-D617Pvsf.js} +30 -28
  101. package/dist/component/{url-input-rac-D2VSSyqW.js → url-input-rac-CLvxaWZz.js} +1 -1
  102. package/dist/component/use-dropdown-trigger-class-name-C4uqTKFP.js +117 -0
  103. package/dist/component/{use-element-state-class-name-oiKCauK-.js → use-element-state-class-name-DJx-T0zf.js} +3 -3
  104. package/dist/component/use-hoverable-input-class-name-pwVZXwrY.js +25 -0
  105. package/dist/component/use-is-forced-open-dropdown-DBpm1D-o.js +48 -0
  106. package/dist/component/{use-service-options-base-DXG60hA5.js → use-service-options-base-xHeVTve3.js} +6 -6
  107. package/dist/component/use-text-input-class-name-CrEjJ2Z8.js +6 -0
  108. package/dist/form.d.ts +5 -0
  109. package/package.json +2 -2
  110. package/dist/component/dext-radio-group-rac-CtEjnu_X.js +0 -18
  111. package/dist/component/field-rac.module-DfEb7pBp.js +0 -25
  112. package/dist/component/radio-button-module-classes-CqdBGknT.js +0 -132
  113. package/dist/component/text-input-headless-BdPkEeK2.js +0 -45
  114. package/dist/component/time-input-rac-BYoojlJ9.js +0 -159
  115. package/dist/component/use-dropdown-option-class-name-BEmvU-Gg.js +0 -115
  116. package/dist/component/use-dropdown-trigger-class-name-qj9skLWZ.js +0 -40
  117. package/dist/component/use-hoverable-input-class-name-BW3nCyhG.js +0 -25
  118. package/dist/component/use-text-input-class-name-BhQFcXYH.js +0 -6
@@ -1,132 +0,0 @@
1
- import a, { useRef as F, useState as V, useEffect as T, useCallback as B } from "react";
2
- import { RadioGroup as H, RadioField as k, RadioButton as x, TextField as A, Input as G } from "react-aria-components";
3
- import { bn as g, bk as P, bx as D, bp as $ } from "./form-Bed4Kfz8.js";
4
- import { f as d, a as v } from "./find-child-C60k4CxG.js";
5
- import { D as U, E as M } from "./field-error-headless-CsYQCsiT.js";
6
- import { L as j } from "./field-label-headless-Yg_1PMSg.js";
7
- import { S as w } from "./selection-indicator-XQ8MYHUQ.js";
8
- const L = "Other", z = (e, t) => e == null ? void 0 : e.find((n) => (n.value ?? n.label) === t), S = (e, t) => !!t && !z(e, t), J = (e, t) => {
9
- const l = t ? t.length + 2 : 0;
10
- return e.slice(l);
11
- }, i = ({ children: e, className: t }) => {
12
- const { id: n, value: l, onChange: O, disabled: p, readOnly: f, required: b, onBlur: E, onFocus: m, hasError: r, FieldLayout: c, options: o } = g(), { inputId: h, labelId: C, ariaDescribedBy: I } = P(), s = d(e, i.Label), _ = d(e, i.Options), R = d(e, i.Description), q = d(e, i.Error), N = S(o, l) ? L : l || null;
13
- return /* @__PURE__ */ a.createElement(c, {
14
- fieldId: n,
15
- renderLabel: () => v(s, {
16
- as: "div"
17
- }),
18
- renderInput: () => /* @__PURE__ */ a.createElement(H, {
19
- id: h,
20
- className: t,
21
- "aria-labelledby": C,
22
- "aria-describedby": I,
23
- value: N,
24
- onChange: O,
25
- isDisabled: p,
26
- isReadOnly: f,
27
- isRequired: b,
28
- isInvalid: r,
29
- onBlur: E,
30
- onFocus: m
31
- }, _),
32
- renderDescription: () => /* @__PURE__ */ a.createElement(a.Fragment, null, q, R)
33
- });
34
- }, K = ({ children: e, className: t }) => {
35
- const { options: n, addOther: l, addOtherLabel: O, id: p, numberOfColumns: f, hasError: b } = g(), { t: E } = D(), m = d(e, i.Option), r = F(null), c = O || E("add-other.default-other-option-label") || L;
36
- return $(() => {
37
- var o;
38
- (o = r.current) == null || o.focus();
39
- }, p), /* @__PURE__ */ a.createElement("div", {
40
- className: t,
41
- "data-columns": f,
42
- "data-invalid": b
43
- }, n.map((o, h) => v(m, {
44
- key: o.value ?? o.label,
45
- value: o.value ?? o.label,
46
- label: o.label,
47
- index: h,
48
- radioRef: h === 0 ? r : void 0
49
- })), l && v(m, {
50
- key: L,
51
- value: L,
52
- label: c,
53
- isOther: !0
54
- }));
55
- }, u = ({ children: e, className: t, ...n }) => {
56
- var I;
57
- const { value: l, label: O, isOther: p = !1, radioRef: f } = n, { value: b, options: E } = g(), m = d(e, u.Label), r = d(e, u.Input), c = d(e, u.Control), o = d(e, u.OtherInput), h = p ? S(E, b) : b === l, C = (I = r == null ? void 0 : r.props) == null ? void 0 : I.className;
58
- return /* @__PURE__ */ a.createElement("div", {
59
- className: t
60
- }, /* @__PURE__ */ a.createElement(k, {
61
- value: l
62
- }, /* @__PURE__ */ a.createElement(x, {
63
- ref: f,
64
- className: C
65
- }, ({ isSelected: s, isHovered: _, isFocused: R }) => /* @__PURE__ */ a.createElement(a.Fragment, null, v(c, {
66
- isSelected: s,
67
- isHovered: _,
68
- isFocused: R
69
- }), v(m, {
70
- label: O
71
- })))), p && h && o);
72
- }, Q = ({ className: e, ...t }) => {
73
- const { label: n } = t;
74
- return /* @__PURE__ */ a.createElement("span", {
75
- className: e
76
- }, n);
77
- }, W = (e) => null, X = ({ className: e }) => {
78
- const { value: t, onChange: n, addOtherLabel: l, addOtherPlaceholder: O, otherInputCharacterLimit: p, disabled: f, readOnly: b, options: E } = g(), { t: m } = D(), r = F(null), c = S(E, t), o = l || m("add-other.default-other-option-label") || L, [h, C] = V(c && t ? J(t, l) : "");
79
- T(() => {
80
- var s;
81
- c && r.current && ((s = r.current) == null || s.focus());
82
- }, [
83
- c
84
- ]);
85
- const I = B((s) => {
86
- let _;
87
- s ? _ = `${l}: ${s}` : _ = o, n(_), C(s);
88
- }, [
89
- n,
90
- l,
91
- o
92
- ]);
93
- return /* @__PURE__ */ a.createElement(A, {
94
- "aria-label": o,
95
- value: h,
96
- onChange: I,
97
- isDisabled: f,
98
- isReadOnly: b
99
- }, /* @__PURE__ */ a.createElement(G, {
100
- ref: r,
101
- className: e,
102
- placeholder: O,
103
- maxLength: p
104
- }));
105
- };
106
- u.Label = Q;
107
- u.Input = W;
108
- u.Control = w;
109
- u.OtherInput = X;
110
- i.Label = j;
111
- i.Options = K;
112
- i.Option = u;
113
- i.Description = U;
114
- i.Error = M;
115
- const Y = "_labelImage_1bq4s_1", Z = "_option_1bq4s_26", ee = "_optionInput_1bq4s_32", te = "_optionControl_1bq4s_50", oe = "_optionControlHover_1bq4s_72", ne = "_optionControlSelected_1bq4s_90", le = "_optionLabel_1bq4s_125", y = {
116
- labelImage: Y,
117
- option: Z,
118
- optionInput: ee,
119
- optionControl: te,
120
- optionControlHover: oe,
121
- optionControlSelected: ne,
122
- optionLabel: le
123
- }, pe = {
124
- base: y.optionControl,
125
- selected: y.optionControlSelected,
126
- hover: y.optionControlHover
127
- };
128
- export {
129
- pe as R,
130
- i as a,
131
- y as s
132
- };
@@ -1,45 +0,0 @@
1
- import t, { useRef as C } from "react";
2
- import { TextField as R, Input as v } from "react-aria-components";
3
- import { bn as d, bk as p, bp as T } from "./form-Bed4Kfz8.js";
4
- import { f as s } from "./find-child-C60k4CxG.js";
5
- import { D as g, E as h } from "./field-error-headless-CsYQCsiT.js";
6
- import { L as x } from "./field-label-headless-Yg_1PMSg.js";
7
- const e = ({ children: r }) => {
8
- const { id: a, value: l, onChange: i, disabled: u, readOnly: n, required: o, hasError: c, onBlur: m, onFocus: b, autoComplete: f, FieldLayout: E } = d(), { labelId: I } = p(), F = s(r, e.Label), y = s(r, e.Input), D = s(r, e.Description), L = s(r, e.Error);
9
- return /* @__PURE__ */ t.createElement(E, {
10
- fieldId: a,
11
- renderLabel: () => F,
12
- renderInput: () => /* @__PURE__ */ t.createElement(R, {
13
- autoComplete: f,
14
- "aria-labelledby": I,
15
- value: l ?? "",
16
- onChange: i,
17
- isDisabled: u,
18
- isReadOnly: n,
19
- isRequired: o,
20
- isInvalid: c,
21
- onBlur: m,
22
- onFocus: b
23
- }, y),
24
- renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, L, D)
25
- });
26
- }, B = ({ className: r }) => {
27
- const { id: a, placeholder: l } = d(), { inputId: i, ariaDescribedBy: u } = p(), n = C(null);
28
- return T(() => {
29
- var o;
30
- (o = n.current) == null || o.focus();
31
- }, a), /* @__PURE__ */ t.createElement(v, {
32
- ref: n,
33
- id: i,
34
- "aria-describedby": u,
35
- className: r,
36
- placeholder: l
37
- });
38
- };
39
- e.Label = x;
40
- e.Input = B;
41
- e.Description = g;
42
- e.Error = h;
43
- export {
44
- e as T
45
- };
@@ -1,159 +0,0 @@
1
- import e, { useCallback as H, useRef as x, useContext as V } from "react";
2
- import { RicosViewer as j } from "@wix/ricos/viewer";
3
- import m from "classnames";
4
- import { parseTime as q } from "@internationalized/date";
5
- import { TimeField as v, DateInput as z, DateSegment as _, TimeFieldStateContext as B } from "react-aria-components";
6
- import { bn as p, bk as U, bx as S, bp as w, R as G, $ as Q, G as $, u as J } from "./form-Bed4Kfz8.js";
7
- import { f as u, a as F } from "./find-child-C60k4CxG.js";
8
- import { D as K, E as W } from "./field-error-headless-CsYQCsiT.js";
9
- import { L as X } from "./field-label-headless-Yg_1PMSg.js";
10
- import { E as Y } from "./error-icon-hZxQ6DEy.js";
11
- import { H as T } from "./custom-focus-class-_483Pkwp.js";
12
- import { s as f } from "./field-rac.module-DfEb7pBp.js";
13
- import { u as Z } from "./use-text-input-class-name-BhQFcXYH.js";
14
- const r = ({ children: t }) => {
15
- const { id: n, value: l, onChange: a, disabled: i, readOnly: o, required: c, onBlur: s, onFocus: E, use24HourFormat: b, FieldLayout: C, hasError: g } = p(), { inputId: I, ariaDescribedBy: R, labelId: D } = U(), L = H((M) => {
16
- const k = ae(M);
17
- a(k);
18
- }, [
19
- a
20
- ]), N = u(t, r.Label), y = u(t, r.Time), P = u(t, r.Description), A = u(t, r.Error), O = ne(l);
21
- return /* @__PURE__ */ e.createElement(C, {
22
- fieldId: n,
23
- renderLabel: () => N,
24
- renderInput: () => /* @__PURE__ */ e.createElement(v, {
25
- "aria-labelledby": D,
26
- id: I,
27
- "aria-describedby": R,
28
- value: O,
29
- onChange: L,
30
- isDisabled: i,
31
- isReadOnly: o,
32
- isInvalid: g,
33
- isRequired: c,
34
- onBlur: s,
35
- onFocus: E,
36
- hourCycle: b ? 24 : 12
37
- }, y),
38
- renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, A, P)
39
- });
40
- }, d = ({ children: t, className: n }) => {
41
- const { hasError: l, hidePlaceholder: a } = p(), i = u(t, d.Hour), o = u(t, d.Minute), c = u(t, d.Period);
42
- return /* @__PURE__ */ e.createElement(z, {
43
- className: n,
44
- "data-invalid": l || void 0,
45
- "data-placeholder-hidden": a || void 0
46
- }, (s) => {
47
- switch (s.type) {
48
- case "hour":
49
- return F(i, {
50
- segment: s
51
- }) || /* @__PURE__ */ e.createElement(e.Fragment, null);
52
- case "minute":
53
- return F(o, {
54
- segment: s
55
- }) || /* @__PURE__ */ e.createElement(e.Fragment, null);
56
- case "dayPeriod":
57
- return F(c, {
58
- segment: s
59
- }) || /* @__PURE__ */ e.createElement(e.Fragment, null);
60
- case "literal":
61
- return /* @__PURE__ */ e.createElement(_, {
62
- segment: s
63
- });
64
- default:
65
- return /* @__PURE__ */ e.createElement(e.Fragment, null);
66
- }
67
- });
68
- }, ee = ({ className: t, ...n }) => {
69
- const { id: l, hidePlaceholder: a } = p(), { segment: i } = n, { t: o } = S(), c = x(null);
70
- w(() => {
71
- var E;
72
- (E = c.current) == null || E.focus();
73
- }, l);
74
- const s = a ? void 0 : o("field.date.placeholder.hour");
75
- return /* @__PURE__ */ e.createElement(_, {
76
- ref: c,
77
- segment: i,
78
- className: t,
79
- ...s && {
80
- placeholder: s
81
- }
82
- });
83
- }, te = ({ className: t, ...n }) => {
84
- const { hidePlaceholder: l } = p(), { segment: a } = n, { t: i } = S(), o = l ? void 0 : i("field.date.placeholder.minute");
85
- return /* @__PURE__ */ e.createElement(_, {
86
- segment: a,
87
- className: t,
88
- ...o && {
89
- placeholder: o
90
- }
91
- });
92
- }, re = ({ className: t, ...n }) => {
93
- const { hidePlaceholder: l } = p(), { segment: a } = n, { t: i } = S(), o = V(B), c = l ? void 0 : i("field.date.placeholder.period"), s = () => o == null ? void 0 : o.increment("dayPeriod");
94
- return /* @__PURE__ */ e.createElement(_, {
95
- segment: a,
96
- className: t,
97
- onClick: s,
98
- ...c && {
99
- placeholder: c
100
- }
101
- });
102
- };
103
- d.Hour = ee;
104
- d.Minute = te;
105
- d.Period = re;
106
- r.Label = X;
107
- r.Time = d;
108
- r.Description = K;
109
- r.Error = W;
110
- function ne(t) {
111
- if (!t)
112
- return null;
113
- try {
114
- return q(t);
115
- } catch {
116
- return null;
117
- }
118
- }
119
- function ae(t) {
120
- if (!t)
121
- return null;
122
- const n = String(t.hour).padStart(2, "0"), l = String(t.minute).padStart(2, "0"), a = String(t.second).padStart(2, "0");
123
- return [
124
- n,
125
- l,
126
- a
127
- ].join(":");
128
- }
129
- const oe = "_time_rzj2k_1", se = "_hour_rzj2k_14", le = "_minute_rzj2k_15", ie = "_period_rzj2k_16", h = {
130
- time: oe,
131
- hour: se,
132
- minute: le,
133
- period: ie
134
- }, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(j, {
135
- content: t,
136
- locale: n
137
- }), me = () => {
138
- const t = Z(h.time);
139
- return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
140
- className: m(G, f.label)
141
- }, /* @__PURE__ */ e.createElement(r.Label.Required, {
142
- className: m(Q, f.requiredMark)
143
- })), /* @__PURE__ */ e.createElement(r.Time, {
144
- className: t
145
- }, /* @__PURE__ */ e.createElement(r.Time.Hour, {
146
- className: m(h.hour, T)
147
- }), /* @__PURE__ */ e.createElement(r.Time.Minute, {
148
- className: m(h.minute, T)
149
- }), /* @__PURE__ */ e.createElement(r.Time.Period, {
150
- className: m(h.period, T)
151
- })), /* @__PURE__ */ e.createElement(r.Error, {
152
- className: m($, f.error)
153
- }, /* @__PURE__ */ e.createElement(Y, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
154
- className: m(J, f.description)
155
- }, ce));
156
- }, Ie = () => /* @__PURE__ */ e.createElement(me, null);
157
- export {
158
- Ie as TimeInputRAC
159
- };
@@ -1,115 +0,0 @@
1
- import d, { useContext as _, useRef as D, useState as m, Children as L, useLayoutEffect as p, useMemo as M } from "react";
2
- import { CollectionRendererContext as g, DefaultCollectionRenderer as E, ListBox as N } from "react-aria-components";
3
- import P from "classnames";
4
- import { s as h } from "./field-rac.module-DfEb7pBp.js";
5
- import { y as T } from "./form-Bed4Kfz8.js";
6
- import { u as H } from "./use-element-state-class-name-oiKCauK-.js";
7
- const R = 1 / 0, I = {
8
- position: "absolute",
9
- width: 0,
10
- height: "var(--popoverMaxHeight, 240px)",
11
- visibility: "hidden",
12
- pointerEvents: "none"
13
- }, B = (e, o) => Object.create(e, {
14
- [Symbol.iterator]: {
15
- value: function* () {
16
- let n = 0;
17
- for (const s of e) {
18
- if (n >= o)
19
- return;
20
- n += 1, yield s;
21
- }
22
- }
23
- }
24
- }), S = (e) => e.querySelector('[role="option"]') !== null, A = (e, o) => {
25
- const n = e.getBoundingClientRect().top - e.scrollTop;
26
- let s = 0;
27
- for (const r of e.querySelectorAll('[role="option"]')) {
28
- const f = r.getBoundingClientRect().top - n;
29
- if (s > 0 && f >= o)
30
- break;
31
- s += 1;
32
- }
33
- return s;
34
- }, X = ({ isForcedOpen: e, ...o }) => {
35
- const n = _(g), s = D(null), [r, f] = m(null), [c, b] = m(R), [O, w] = m(0), y = L.count(o.children);
36
- p(() => {
37
- b(R);
38
- }, [
39
- r,
40
- y,
41
- O
42
- ]), p(() => {
43
- const t = s.current;
44
- if (!r || !t || c !== R)
45
- return;
46
- const a = () => {
47
- const l = r.getBoundingClientRect().height;
48
- l > 0 && b(A(t, l));
49
- };
50
- if (S(t)) {
51
- a();
52
- return;
53
- }
54
- const i = new MutationObserver(() => {
55
- S(t) && (i.disconnect(), a());
56
- });
57
- return i.observe(t, {
58
- childList: !0,
59
- subtree: !0
60
- }), () => i.disconnect();
61
- }, [
62
- r,
63
- c,
64
- O
65
- ]), p(() => {
66
- const t = s.current;
67
- if (!r || !t || typeof ResizeObserver > "u")
68
- return;
69
- const a = /* @__PURE__ */ new Map(), i = new ResizeObserver((l) => {
70
- l.some(({ target: u, contentRect: v }) => {
71
- const C = a.get(u);
72
- return a.set(u, v.height), C !== void 0 && C !== v.height;
73
- }) && w((u) => u + 1);
74
- });
75
- return i.observe(r), t.querySelectorAll('[role="option"]').forEach((l) => i.observe(l)), () => i.disconnect();
76
- }, [
77
- r,
78
- c
79
- ]);
80
- const x = M(() => ({
81
- ...E,
82
- CollectionRoot: (t) => /* @__PURE__ */ d.createElement(E.CollectionRoot, {
83
- ...t,
84
- collection: B(t.collection, c)
85
- })
86
- }), [
87
- c
88
- ]);
89
- return /* @__PURE__ */ d.createElement(g.Provider, {
90
- value: e ? x : n
91
- }, /* @__PURE__ */ d.createElement(N, {
92
- ref: s,
93
- ...o
94
- }), e && /* @__PURE__ */ d.createElement("div", {
95
- ref: f,
96
- style: I
97
- }));
98
- }, V = {
99
- base: h.selectOption,
100
- selected: h.selectOptionSelected,
101
- hover: h.selectOptionHover
102
- }, q = ({ isSelected: e, isHovered: o, isFocused: n }) => ({
103
- isSelected: e,
104
- isHovered: (o || n) && !e
105
- }), Y = (...e) => {
106
- const o = H({
107
- globalClasses: T,
108
- moduleClasses: V
109
- });
110
- return (n) => P(o(q(n)), e);
111
- };
112
- export {
113
- X as V,
114
- Y as u
115
- };
@@ -1,40 +0,0 @@
1
- import { useContext as T, useMemo as a } from "react";
2
- import { bh as p, at as O, bf as _, F as s, z as i } from "./form-Bed4Kfz8.js";
3
- import { u } from "./use-hoverable-input-class-name-BW3nCyhG.js";
4
- const I = [
5
- s.DROPDOWN,
6
- s.DEXT_DROPDOWN,
7
- s.SERVICES_DROPDOWN,
8
- s.DATE_INPUT,
9
- s.CONTACTS_BIRTHDATE,
10
- s.DATE_TIME_INPUT,
11
- s.DEXT_DATE_TIME_INPUT,
12
- s.DATE_PICKER,
13
- s.DEXT_DATE_PICKER
14
- ], d = [
15
- s.PHONE,
16
- s.CONTACTS_PHONE,
17
- s.BOOKINGS_PHONE,
18
- s.DEXT_PHONE
19
- ], N = [
20
- s.MULTILINE_ADDRESS,
21
- s.BOOKINGS_ADDRESS,
22
- s.ECOM_ADDRESS
23
- ], P = ({ properties: o }) => {
24
- var e, n, t, r;
25
- return ((r = (t = (n = (e = o.validation) == null ? void 0 : e.string) == null ? void 0 : n.phoneOptions) == null ? void 0 : t.allowedCountryCodes) == null ? void 0 : r.length) !== 1;
26
- }, S = ({ properties: o }) => {
27
- var e, n;
28
- return ((n = (e = o.fieldSettings) == null ? void 0 : e.country) == null ? void 0 : n.show) !== !1;
29
- }, c = (o, e) => d.includes(o.fieldType) ? !e && P(o) : N.includes(o.fieldType) ? S(o) : I.includes(o.fieldType), l = (o, e) => c(o, e) && !o.properties.disabled && !o.properties.readOnly, A = (o) => {
30
- var E;
31
- const e = ((E = p().dropdown) == null ? void 0 : E.open) === !0, n = T(O), { isMobile: t = !1 } = _(), r = a(() => n && !n.parentId ? n.fields.filter((D) => l(D, t)).map((D) => D.id) : [], [
32
- n,
33
- t
34
- ]);
35
- return e && r.includes(o);
36
- }, w = (...o) => u(i, o);
37
- export {
38
- A as a,
39
- w as u
40
- };
@@ -1,25 +0,0 @@
1
- import { bn as m } from "./form-Bed4Kfz8.js";
2
- import { s as e } from "./field-rac.module-DfEb7pBp.js";
3
- import { u } from "./use-element-state-class-name-oiKCauK-.js";
4
- const b = (s, a) => {
5
- const { disabled: t, readOnly: o } = m(), r = u({
6
- globalClasses: s,
7
- moduleClasses: {
8
- base: [
9
- e.input,
10
- ...a
11
- ].join(" "),
12
- hover: e.inputHover
13
- }
14
- });
15
- return ({ isHovered: l, isFocused: n, isFocusWithin: i }) => r({
16
- isSelected: !1,
17
- isHovered: l,
18
- isFocused: n,
19
- isFocusWithin: i,
20
- isInteractive: !t && !o
21
- });
22
- };
23
- export {
24
- b as u
25
- };
@@ -1,6 +0,0 @@
1
- import { ab as a } from "./form-Bed4Kfz8.js";
2
- import { u as e } from "./use-hoverable-input-class-name-BW3nCyhG.js";
3
- const m = (...s) => e(a, s);
4
- export {
5
- m as u
6
- };