@wix/form-elements 1.169.0 → 1.171.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 (109) hide show
  1. package/dist/component/{appointment-rac-BbXyKTd7.js → appointment-rac-DZ0SFXmL.js} +83 -83
  2. package/dist/component/{bookings-address-rac-VJkR_U9L.js → bookings-address-rac-BW9grc77.js} +1 -1
  3. package/dist/component/{bookings-email-rac-_EupwXpQ.js → bookings-email-rac-D8gMaAfB.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-DTZixHYj.js → bookings-first-name-rac-CAjcs7b6.js} +1 -1
  5. package/dist/component/{bookings-header-rac-BKbKTv5g.js → bookings-header-rac-BhKZ1kku.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-BDy860-C.js → bookings-last-name-rac-DpsMDuU0.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-DgNP-YNZ.js → bookings-login-bar-rac-BVdWmKS8.js} +3 -3
  8. package/dist/component/{bookings-phone-rac-B_I6n96b.js → bookings-phone-rac-DsqNi2mI.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-prYPbIiz.js → bookings-rich-text-rac-elM4Ne3f.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-C-4PXuxG.js → checkbox-field-rac-BU4E73fD.js} +43 -43
  11. package/dist/component/{checkbox-group-field-headless-D16bAcaq.js → checkbox-group-field-headless-6yJdIbP2.js} +41 -41
  12. package/dist/component/{checkbox-group-field-rac-GUQ5dO_s.js → checkbox-group-field-rac-CojbCWSF.js} +4 -4
  13. package/dist/component/{checkbox-group-rac-Bl6xL5-H.js → checkbox-group-rac-3qUVUc-C.js} +1 -1
  14. package/dist/component/{checkbox-rac-Blg0KVyP.js → checkbox-rac-DwbTapd_.js} +1 -1
  15. package/dist/component/{contacts-address-rac-BfOhCAj8.js → contacts-address-rac-BL7XDZuP.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-DYBvDh62.js → contacts-birthdate-rac-DeJYIHAg.js} +1 -1
  17. package/dist/component/{contacts-company-rac-DIJr7zjA.js → contacts-company-rac-BeImf5uc.js} +1 -1
  18. package/dist/component/{contacts-email-rac-DjmqELhC.js → contacts-email-rac-CtacwrZ0.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-DGNll7gw.js → contacts-first-name-rac-CAdOqOOA.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-BJ8AZYQN.js → contacts-last-name-rac-Db9mHzCW.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-BC-QtpEN.js → contacts-phone-rac-W0OLEbzL.js} +1 -1
  22. package/dist/component/{contacts-position-rac-BQia__74.js → contacts-position-rac-CV4Ibt4Z.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-CTFptz01.js → contacts-subscribe-rac-CQ3Q1pjZ.js} +1 -1
  24. package/dist/component/{contacts-tax-id-rac-Cy72Jouc.js → contacts-tax-id-rac-Dux-pk6r.js} +1 -1
  25. package/dist/component/{date-availability-BC6updcS.js → date-availability-RkX-Qw7G.js} +1 -1
  26. package/dist/component/date-input-field-rac-CYCT6qoa.js +309 -0
  27. package/dist/component/{date-input-rac-KkRyWRP_.js → date-input-rac-BkYZ7q_o.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-BLWVJbTJ.js → date-picker-field-rac-eMidYtsl.js} +31 -31
  29. package/dist/component/{date-picker-rac-DKCQza7v.js → date-picker-rac-D23rxZcF.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-CZxZW6fz.js → date-time-input-field-rac-BjIj4dXQ.js} +111 -111
  31. package/dist/component/{date-time-input-rac-DQ-iBwmr.js → date-time-input-rac-BSGAdk9L.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-kp1Jbwt-.js → dext-checkbox-group-rac-Xmb5IKrb.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-CBm9cRUz.js → dext-checkbox-rac-2eA7y0ld.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-DsVKWsRy.js → dext-date-picker-rac-CmLxVGGT.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-CO26-8Qo.js → dext-date-time-input-rac-Cd9nwSjb.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-eRzu2C-y.js → dext-dropdown-rac-BKdQ0nGS.js} +1 -1
  37. package/dist/component/{dext-email-rac-DDrZzE_G.js → dext-email-rac-07zDPxyf.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-Dj7sInLk.js → dext-number-input-rac-DRvGuppY.js} +1 -1
  39. package/dist/component/{dext-phone-rac-g8M77F7m.js → dext-phone-rac-CKtTVjFg.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-BjhygC0R.js → dext-radio-group-rac-BsBmMufq.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-BraNjvyA.js → dext-rating-input-rac-CcFSTAIh.js} +1 -1
  42. package/dist/component/{dext-tags-rac-B5mAIuDi.js → dext-tags-rac-CCTDlCvX.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-D_YBnaWi.js → dext-text-area-rac-Cif8po9h.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-BzeWH1jv.js → dext-text-input-rac-2118X4iF.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-Cn0h_vx3.js → dext-url-input-rac-DDImGkQe.js} +1 -1
  46. package/dist/component/{donation-rac-CQRdHxWh.js → donation-rac-Dnylss1d.js} +103 -103
  47. package/dist/component/{dropdown-field-rac-C7LL0W5Z.js → dropdown-field-rac-DDI4ZgZH.js} +3 -3
  48. package/dist/component/{dropdown-rac-Nb2VyJ0x.js → dropdown-rac-DX0Z3R_8.js} +1 -1
  49. package/dist/component/{ecom-address-rac-_c2YIIwg.js → ecom-address-rac-D9MeEQsk.js} +1 -1
  50. package/dist/component/{ecom-subscription-checkbox-rac-Bma7TAVj.js → ecom-subscription-checkbox-rac-DKJ9j5dj.js} +2 -2
  51. package/dist/component/{email-input-field-rac-2E2tEaS5.js → email-input-field-rac-DaKrmlwe.js} +55 -55
  52. package/dist/component/{events-repeater-rac-COWHYBFD.js → events-repeater-rac-DWrOLT0Y.js} +45 -45
  53. package/dist/component/{events-rsvp-rac-CXp8j19Y.js → events-rsvp-rac-YBTR1tR0.js} +6 -6
  54. package/dist/component/{field-error-headless-S-ugOQQX.js → field-error-headless-jksFrezt.js} +10 -10
  55. package/dist/component/{field-label-headless-_n4I0_tX.js → field-label-headless-BBvJAVxI.js} +10 -10
  56. package/dist/component/{file-upload-rac-DCH_iwDg.js → file-upload-rac-CgdmfUZG.js} +168 -168
  57. package/dist/component/{fixed-payment-rac-CYkKJUfM.js → fixed-payment-rac-v6rKwzFs.js} +13 -13
  58. package/dist/component/{form-jK8ezTss.js → form-BsiK682r.js} +530 -502
  59. package/dist/component/form.js +1 -1
  60. package/dist/component/{header-field-rac-DnbjI6W5.js → header-field-rac-BuXybl7K.js} +6 -6
  61. package/dist/component/{header-rac-DKUICrni.js → header-rac-CDyaLosW.js} +1 -1
  62. package/dist/component/{image-choice-rac-B_9ponST.js → image-choice-rac-BRlMroBw.js} +41 -41
  63. package/dist/component/{index-BxdMzOvN.js → index-BanOeCAF.js} +242 -236
  64. package/dist/component/{index-ZYnsxY-a.js → index-y9URYGEE.js} +6 -6
  65. package/dist/component/{isObjectLike-BW-9QEQl.js → isObjectLike-BG9nJ-rx.js} +7 -7
  66. package/dist/component/{multiline-address-field-rac-k-P0ijWG.js → multiline-address-field-rac-DRAkxI1l.js} +342 -342
  67. package/dist/component/{multiline-address-rac-Bbn9mNDa.js → multiline-address-rac-JjTzWsEb.js} +1 -1
  68. package/dist/component/{number-input-field-rac--lom-B_X.js → number-input-field-rac-QrouG7Hv.js} +22 -22
  69. package/dist/component/{number-input-rac-Bhbd6T9S.js → number-input-rac-DGmE7cLv.js} +1 -1
  70. package/dist/component/{password-rac-BV_uTHb3.js → password-rac-DeyY228m.js} +28 -28
  71. package/dist/component/{payment-input-rac-cawyGN_t.js → payment-input-rac-DmIennLi.js} +45 -45
  72. package/dist/component/{phone-input-field-rac-CsElHRto.js → phone-input-field-rac-F7e74TGA.js} +76 -76
  73. package/dist/component/{phone-rac-XrHN5Nko.js → phone-rac-CQfB2CQD.js} +1 -1
  74. package/dist/component/{product-list-rac-cxv_xz7K.js → product-list-rac--GGG8vvO.js} +62 -62
  75. package/dist/component/{quiz-radio-group-rac-DGaxOPE1.js → quiz-radio-group-rac-DF2C2vNq.js} +1 -1
  76. package/dist/component/{radio-button-module-classes-Xv2Jn01x.js → radio-button-module-classes-DmpNo6F2.js} +17 -17
  77. package/dist/component/{radio-group-field-rac-DgGqgTql.js → radio-group-field-rac-BGcPYfKO.js} +6 -6
  78. package/dist/component/{radio-group-rac-Bh0E-oe1.js → radio-group-rac-CqysUMCE.js} +1 -1
  79. package/dist/component/{rating-input-field-rac-C3YLV971.js → rating-input-field-rac-D-ei917Y.js} +24 -24
  80. package/dist/component/{rating-input-rac-CfcC5EUh.js → rating-input-rac-a9zJ74fw.js} +1 -1
  81. package/dist/component/{rich-content-rac.module-DUjzLGtX.js → rich-content-rac.module-CvyLVlXL.js} +5 -5
  82. package/dist/component/{rich-text-field-rac-BmguoJhk.js → rich-text-field-rac-vf19nvyw.js} +7 -7
  83. package/dist/component/{rich-text-rac-BWhHcq25.js → rich-text-rac-Cx_wpoxC.js} +1 -1
  84. package/dist/component/{service-dropdown-rac-C5oX-ql7.js → service-dropdown-rac-DITzKQxd.js} +26 -26
  85. package/dist/component/{services-multi-choice-rac-C1fem9NB.js → services-multi-choice-rac-BtisN0Aq.js} +11 -11
  86. package/dist/component/{signature-rac-BtHqiWj1.js → signature-rac-DUeIoS5O.js} +226 -226
  87. package/dist/component/{submit-button-rac-OYeKJFF8.js → submit-button-rac-C8h6zeTw.js} +36 -36
  88. package/dist/component/{tags-field-rac-kA2RSijL.js → tags-field-rac-CjFuiB0n.js} +51 -51
  89. package/dist/component/{tags-rac-B_2qCZGu.js → tags-rac-BO7rwyLl.js} +1 -1
  90. package/dist/component/{text-area-field-rac-DeO609Mv.js → text-area-field-rac-CgUx3nQ0.js} +23 -23
  91. package/dist/component/{text-area-rac-BAQFBOZd.js → text-area-rac-WgXYXIaf.js} +1 -1
  92. package/dist/component/{text-input-field-rac-CCcKwuLZ.js → text-input-field-rac-DaxWFha-.js} +6 -6
  93. package/dist/component/{text-input-headless-D8-jkaYm.js → text-input-headless-hjuRJTZN.js} +6 -6
  94. package/dist/component/{text-input-rac-BVcgjj8g.js → text-input-rac-BzumrJBj.js} +1 -1
  95. package/dist/component/{time-input-rac-BYctyHgU.js → time-input-rac-2FEkpQ7M.js} +18 -18
  96. package/dist/component/{url-input-field-rac-COC9qgcs.js → url-input-field-rac-BZ9f8D8I.js} +26 -26
  97. package/dist/component/{url-input-rac-BZXLh0Ej.js → url-input-rac-D-AVlxkD.js} +1 -1
  98. package/dist/component/{use-dropdown-option-class-name-BTltqRl1.js → use-dropdown-option-class-name-DwAAtzgX.js} +11 -11
  99. package/dist/component/{use-dropdown-trigger-class-name-BjJZfl3i.js → use-dropdown-trigger-class-name-D-6n9YVG.js} +18 -18
  100. package/dist/component/{use-element-state-class-name-CkT6Ga8t.js → use-element-state-class-name-C5auxwhj.js} +3 -3
  101. package/dist/component/{use-hoverable-input-class-name-BkoSr6tr.js → use-hoverable-input-class-name-Nd2jqfz4.js} +2 -2
  102. package/dist/component/use-is-forced-open-dropdown-CKaHhCqp.js +64 -0
  103. package/dist/component/{use-service-options-base-Wp8RZ4Z8.js → use-service-options-base-CvluFheT.js} +3 -3
  104. package/dist/component/use-text-input-class-name-DGTlYJxC.js +6 -0
  105. package/dist/form.d.ts +19 -0
  106. package/package.json +2 -2
  107. package/dist/component/date-input-field-rac-b_T1yf8D.js +0 -309
  108. package/dist/component/use-is-forced-open-dropdown-fo_NCnSk.js +0 -53
  109. package/dist/component/use-text-input-class-name-DS7i03Gk.js +0 -6
@@ -1,309 +0,0 @@
1
- import { RicosViewer as ne } from "@wix/ricos/viewer";
2
- import D from "classnames";
3
- import t, { useMemo as N, useState as $, useCallback as x, useRef as H } from "react";
4
- import { UNSAFE_PortalProvider as re } from "react-aria";
5
- import { ListBoxItem as oe, Select as se, TextField as z, SelectValue as le, Input as K } from "react-aria-components";
6
- import { bD as I, bA as W, bv as w, b8 as X, bl as G, aX as o, bN as R, b2 as ce, b9 as ie, bs as me, bF as U, u as de, U as ue, af as pe, w as Y, H as Ee, K as be, G as fe, v as De, x as q } from "./form-jK8ezTss.js";
7
- import { f as p, a as B } from "./find-child-C60k4CxG.js";
8
- import { g as _e } from "./helpers-HmkkXrh2.js";
9
- import { D as Ie, E as Oe } from "./field-error-headless-S-ugOQQX.js";
10
- import { L as ge } from "./field-label-headless-_n4I0_tX.js";
11
- import { F as he } from "./fieldset-headless-CD3fds9J.js";
12
- import { N as Ne, E as ye, S as Le } from "./non-modal-popover-D-u13tmp.js";
13
- import { a as Ce } from "./use-is-forced-open-dropdown-fo_NCnSk.js";
14
- import { V as Fe, u as Ae } from "./use-dropdown-option-class-name-BTltqRl1.js";
15
- import { C as Te } from "./chevron-down-icon-CcpVm6B-.js";
16
- import { E as Re } from "./error-icon-hZxQ6DEy.js";
17
- import { H as Me } from "./custom-focus-class-_483Pkwp.js";
18
- import { s as b } from "./field-rac.module-ts2t4WUO.js";
19
- import { u as v } from "./use-hoverable-input-class-name-BkoSr6tr.js";
20
- const Pe = {
21
- [o.MONTH]: "bday-month",
22
- [o.DAY]: "bday-day",
23
- [o.YEAR]: "bday-year"
24
- }, V = (e, a) => e === "bday" ? Pe[a] : void 0, n = ({ children: e, className: a }) => {
25
- const { id: r, required: s, onBlur: l, onFocus: c, FieldLayout: m } = I(), { inputId: i, labelId: d, ariaDescribedBy: u } = W(), { regionalFormat: E } = w(), f = N(() => X(E).filter(G).map((S) => S.toUpperCase()), [
26
- E
27
- ]), L = p(e, n.Label), M = p(e, n.Description), P = p(e, n.Error), O = {
28
- [o.MONTH]: p(e, n.Month),
29
- [o.DAY]: p(e, n.Day),
30
- [o.YEAR]: p(e, n.Year)
31
- };
32
- return /* @__PURE__ */ t.createElement(m, {
33
- fieldId: r,
34
- renderLabel: () => B(L, {
35
- as: "div"
36
- }),
37
- renderInput: () => /* @__PURE__ */ t.createElement(he, {
38
- id: i,
39
- ariaLabelledBy: d,
40
- ariaDescribedBy: u,
41
- required: s,
42
- onBlur: l,
43
- onFocus: c,
44
- className: a
45
- }, O[f[0]], O[f[1]], O[f[2]]),
46
- renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, P, M)
47
- });
48
- }, g = ({ children: e, className: a }) => {
49
- const { id: r, disabled: s, readOnly: l, showDateLabels: c, hidePlaceholder: m, autoComplete: i } = I(), { labelId: d } = h(o.MONTH), { partValue: u, partError: E, onPartChange: f } = y(o.MONTH), { t: L } = R(), [M, P] = $(!1), O = Ce(r), [S, Q] = $(null), j = m ? ye : L("field.date.placeholder.month"), J = x((A) => {
50
- l || f(typeof A == "string" ? A : "");
51
- }, [
52
- f,
53
- l
54
- ]), Z = x((A) => {
55
- P(A && !l);
56
- }, [
57
- l
58
- ]), ee = p(e, g.Label), te = p(e, g.Trigger), ae = p(e, g.Options);
59
- return /* @__PURE__ */ t.createElement("div", {
60
- className: a,
61
- "data-date-field": !0
62
- }, c ? ee : null, /* @__PURE__ */ t.createElement("div", {
63
- ref: Q,
64
- style: {
65
- display: "contents"
66
- }
67
- }), /* @__PURE__ */ t.createElement(re, {
68
- getContainer: () => S
69
- }, /* @__PURE__ */ t.createElement(se, {
70
- autoComplete: V(i, o.MONTH),
71
- "aria-labelledby": c ? d : void 0,
72
- value: u || null,
73
- onChange: J,
74
- isDisabled: s,
75
- isInvalid: E,
76
- placeholder: j,
77
- isOpen: O || M,
78
- onOpenChange: O ? void 0 : Z
79
- }, te, B(ae, {
80
- isForcedOpen: O
81
- }))));
82
- }, Se = ({ className: e }) => /* @__PURE__ */ t.createElement(k, {
83
- datePart: o.MONTH,
84
- className: e
85
- }), Ye = ({ children: e, className: a }) => {
86
- const { id: r, readOnly: s } = I(), { inputId: l } = h(o.MONTH), { partError: c, isFirstPart: m } = y(o.MONTH), i = H(null);
87
- return U(() => {
88
- var d;
89
- m && ((d = i.current) == null || d.focus({
90
- preventScroll: !0
91
- }));
92
- }, r), /* @__PURE__ */ t.createElement(Le, {
93
- ref: i,
94
- id: l,
95
- className: a,
96
- "data-hook": o.MONTH,
97
- "data-invalid": c || void 0,
98
- "data-readonly": s || void 0
99
- }, /* @__PURE__ */ t.createElement(le, null), e);
100
- }, T = ({ children: e, className: a, ...r }) => {
101
- const { isForcedOpen: s } = r, { language: l } = w(), c = N(() => _e(l), [
102
- l
103
- ]), m = p(e, T.Option) ?? /* @__PURE__ */ t.createElement(T.Option, null);
104
- return /* @__PURE__ */ t.createElement(Ne, {
105
- className: a,
106
- containerPadding: 0,
107
- offset: 0
108
- }, /* @__PURE__ */ t.createElement(Fe, {
109
- isForcedOpen: s,
110
- autoFocus: s ? !1 : void 0
111
- }, c.map((i, d) => B(m, {
112
- key: String(d + 1),
113
- value: String(d + 1),
114
- label: i
115
- }))));
116
- }, ve = ({ className: e, ...a }) => {
117
- const { value: r, label: s } = a;
118
- return /* @__PURE__ */ t.createElement(oe, {
119
- className: e,
120
- id: r,
121
- textValue: s
122
- }, s);
123
- };
124
- g.Label = Se;
125
- g.Trigger = Ye;
126
- g.Options = T;
127
- T.Option = ve;
128
- const C = ({ children: e, className: a }) => {
129
- const { disabled: r, readOnly: s, showDateLabels: l } = I(), { labelId: c } = h(o.DAY), { partValue: m, partError: i, onPartChange: d } = y(o.DAY), u = p(e, C.Label), E = p(e, C.Input);
130
- return /* @__PURE__ */ t.createElement("div", {
131
- className: a,
132
- "data-date-field": !0
133
- }, l && u, /* @__PURE__ */ t.createElement(z, {
134
- "aria-labelledby": l ? c : void 0,
135
- value: m,
136
- onChange: d,
137
- isDisabled: r,
138
- isReadOnly: s,
139
- isInvalid: i
140
- }, E));
141
- }, xe = ({ className: e }) => /* @__PURE__ */ t.createElement(k, {
142
- datePart: o.DAY,
143
- className: e
144
- }), He = ({ className: e }) => {
145
- const { id: a, hidePlaceholder: r, autoComplete: s } = I(), { inputId: l } = h(o.DAY), { isFirstPart: c } = y(o.DAY), { t: m } = R(), i = H(null), d = r ? void 0 : m("field.date.placeholder.day");
146
- return U(() => {
147
- var u;
148
- c && ((u = i.current) == null || u.focus({
149
- preventScroll: !0
150
- }));
151
- }, a), /* @__PURE__ */ t.createElement(K, {
152
- ref: i,
153
- id: l,
154
- className: e,
155
- placeholder: d,
156
- autoComplete: V(s, o.DAY),
157
- maxLength: 2,
158
- inputMode: "numeric",
159
- "data-hook": o.DAY
160
- });
161
- };
162
- C.Label = xe;
163
- C.Input = He;
164
- const F = ({ children: e, className: a }) => {
165
- const { disabled: r, readOnly: s, showDateLabels: l } = I(), { labelId: c } = h(o.YEAR), { partValue: m, partError: i, onPartChange: d } = y(o.YEAR), u = p(e, F.Label), E = p(e, F.Input);
166
- return /* @__PURE__ */ t.createElement("div", {
167
- className: a,
168
- "data-date-field": !0
169
- }, l && u, /* @__PURE__ */ t.createElement(z, {
170
- "aria-labelledby": l ? c : void 0,
171
- value: m,
172
- onChange: d,
173
- isDisabled: r,
174
- isReadOnly: s,
175
- isInvalid: i
176
- }, E));
177
- }, we = ({ className: e }) => /* @__PURE__ */ t.createElement(k, {
178
- datePart: o.YEAR,
179
- className: e
180
- }), Ue = ({ className: e }) => {
181
- const { id: a, hidePlaceholder: r, autoComplete: s } = I(), { inputId: l } = h(o.YEAR), { isFirstPart: c } = y(o.YEAR), { t: m } = R(), i = H(null), d = r ? void 0 : m("field.date.placeholder.year");
182
- return U(() => {
183
- var u;
184
- c && ((u = i.current) == null || u.focus({
185
- preventScroll: !0
186
- }));
187
- }, a), /* @__PURE__ */ t.createElement(K, {
188
- ref: i,
189
- id: l,
190
- className: e,
191
- placeholder: d,
192
- autoComplete: V(s, o.YEAR),
193
- maxLength: 4,
194
- inputMode: "numeric",
195
- "data-hook": o.YEAR
196
- });
197
- };
198
- F.Label = we;
199
- F.Input = Ue;
200
- n.Label = ge;
201
- n.Month = g;
202
- n.Day = C;
203
- n.Year = F;
204
- n.Description = Ie;
205
- n.Error = Oe;
206
- function h(e) {
207
- const { inputId: a } = W();
208
- return N(() => {
209
- const r = e.toLowerCase();
210
- return {
211
- inputId: `${a}-${r}-input`,
212
- labelId: `${a}-${r}-label`
213
- };
214
- }, [
215
- a,
216
- e
217
- ]);
218
- }
219
- function y(e) {
220
- const { value: a, onChange: r, hasError: s = !1 } = I(), { regionalFormat: l } = w(), c = N(() => ce(a ?? ""), [
221
- a
222
- ]), m = N(() => ie(s, a ?? ""), [
223
- a,
224
- s
225
- ]), i = c[e] || "", d = x((E) => {
226
- const f = me(E, e, c);
227
- r(f);
228
- }, [
229
- r,
230
- c,
231
- e
232
- ]), u = N(() => X(l).filter(G).map((L) => L.toUpperCase())[0] === e, [
233
- l,
234
- e
235
- ]);
236
- return {
237
- partValue: i,
238
- partError: m[e],
239
- onPartChange: d,
240
- isFirstPart: u
241
- };
242
- }
243
- function k({ datePart: e, className: a }) {
244
- const { inputId: r, labelId: s } = h(e), { t: l } = R(), c = `field.date.label.${e.toLowerCase()}`, m = l(c);
245
- return /* @__PURE__ */ t.createElement("label", {
246
- id: s,
247
- htmlFor: r,
248
- className: a
249
- }, m);
250
- }
251
- const Be = "_fields_b2cgx_1", Ve = "_month_b2cgx_10", ke = "_day_b2cgx_11", $e = "_year_b2cgx_12", qe = "_dayInput_b2cgx_28", ze = "_yearInput_b2cgx_29", Ke = "_monthTrigger_b2cgx_33", We = "_monthOption_b2cgx_53", _ = {
252
- fields: Be,
253
- month: Ve,
254
- day: ke,
255
- year: $e,
256
- dayInput: qe,
257
- yearInput: ze,
258
- monthTrigger: Ke,
259
- monthOption: We
260
- }, Xe = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ne, {
261
- content: e,
262
- locale: a
263
- }), Et = () => {
264
- const e = v(De, [
265
- _.monthTrigger
266
- ]), a = Ae(_.monthOption, Me), r = v(q, [
267
- _.dayInput
268
- ]), s = v(q, [
269
- _.yearInput
270
- ]);
271
- return /* @__PURE__ */ t.createElement(n, {
272
- className: D(de, _.fields)
273
- }, /* @__PURE__ */ t.createElement(n.Label, {
274
- className: D(ue, b.label)
275
- }, /* @__PURE__ */ t.createElement(n.Label.Required, {
276
- className: D(pe, b.requiredMark)
277
- })), /* @__PURE__ */ t.createElement(n.Month, {
278
- className: _.month
279
- }, /* @__PURE__ */ t.createElement(n.Month.Label, {
280
- className: D(Y, b.label)
281
- }), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
282
- className: e
283
- }, /* @__PURE__ */ t.createElement(Te, {
284
- className: b.dropdownIcon
285
- })), /* @__PURE__ */ t.createElement(n.Month.Options, {
286
- className: D(Ee, b.selectPopover, b.dropdownPopover)
287
- }, /* @__PURE__ */ t.createElement(n.Month.Options.Option, {
288
- className: a
289
- }))), /* @__PURE__ */ t.createElement(n.Day, {
290
- className: _.day
291
- }, /* @__PURE__ */ t.createElement(n.Day.Label, {
292
- className: D(Y, b.label)
293
- }), /* @__PURE__ */ t.createElement(n.Day.Input, {
294
- className: r
295
- })), /* @__PURE__ */ t.createElement(n.Year, {
296
- className: _.year
297
- }, /* @__PURE__ */ t.createElement(n.Year.Label, {
298
- className: D(Y, b.label)
299
- }), /* @__PURE__ */ t.createElement(n.Year.Input, {
300
- className: s
301
- })), /* @__PURE__ */ t.createElement(n.Error, {
302
- className: D(be, b.error)
303
- }, /* @__PURE__ */ t.createElement(Re, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
304
- className: D(fe, b.description)
305
- }, Xe));
306
- };
307
- export {
308
- Et as D
309
- };
@@ -1,53 +0,0 @@
1
- import { useContext as c, useMemo as i } from "react";
2
- import { bx as r, aJ as a, bv as d, F as o } from "./form-jK8ezTss.js";
3
- const u = [
4
- o.DROPDOWN,
5
- o.DEXT_DROPDOWN,
6
- o.SERVICES_DROPDOWN,
7
- o.DATE_INPUT,
8
- o.CONTACTS_BIRTHDATE,
9
- o.DATE_TIME_INPUT,
10
- o.DEXT_DATE_TIME_INPUT
11
- ], T = [
12
- o.DATE_PICKER,
13
- o.DEXT_DATE_PICKER
14
- ], O = [
15
- o.PHONE,
16
- o.CONTACTS_PHONE,
17
- o.BOOKINGS_PHONE,
18
- o.DEXT_PHONE
19
- ], p = [
20
- o.MULTILINE_ADDRESS,
21
- o.BOOKINGS_ADDRESS,
22
- o.ECOM_ADDRESS
23
- ], _ = ({ properties: e }) => {
24
- var n, t, s, D;
25
- return ((D = (s = (t = (n = e.validation) == null ? void 0 : n.string) == null ? void 0 : t.phoneOptions) == null ? void 0 : s.allowedCountryCodes) == null ? void 0 : D.length) !== 1;
26
- }, I = ({ properties: e }) => {
27
- var n, t;
28
- return ((t = (n = e.fieldSettings) == null ? void 0 : n.country) == null ? void 0 : t.show) !== !1;
29
- }, P = (e, n) => O.includes(e.fieldType) && !n && _(e), l = (e) => p.includes(e.fieldType) ? I(e) : u.includes(e.fieldType), S = (e) => T.includes(e.fieldType), C = ({ properties: e }) => !e.disabled && !e.readOnly, E = (e) => {
30
- const n = c(a), { isMobile: t = !1 } = d();
31
- return i(() => !n || n.parentId ? [] : n.fields.filter((s) => e(s, t) && C(s)).map((s) => s.id), [
32
- n,
33
- t,
34
- e
35
- ]);
36
- }, R = (e) => {
37
- var s;
38
- const n = ((s = r().dropdown) == null ? void 0 : s.open) === !0, t = E(l);
39
- return n && t.includes(e);
40
- }, f = (e) => {
41
- var s;
42
- const n = ((s = r().phone) == null ? void 0 : s.open) === !0, t = E(P);
43
- return n && t.includes(e);
44
- }, h = (e) => {
45
- var s;
46
- const n = ((s = r().datePicker) == null ? void 0 : s.open) === !0, t = E(S);
47
- return n && t.includes(e);
48
- };
49
- export {
50
- R as a,
51
- f as b,
52
- h as u
53
- };
@@ -1,6 +0,0 @@
1
- import { ar as a } from "./form-jK8ezTss.js";
2
- import { u as e } from "./use-hoverable-input-class-name-BkoSr6tr.js";
3
- const t = (...s) => e(a, s);
4
- export {
5
- t as u
6
- };