@wix/form-elements 1.128.0 → 1.130.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 (112) hide show
  1. package/dist/component/{appointment-rac-S9z3s23G.js → appointment-rac-BpZGi0ra.js} +4 -4
  2. package/dist/component/{bookings-address-rac-B7wL2TjQ.js → bookings-address-rac-IU28SJy5.js} +1 -1
  3. package/dist/component/{bookings-email-rac-T2lFRGpg.js → bookings-email-rac-BkhnLFKC.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-BBrENRBf.js → bookings-first-name-rac-CwMmkICM.js} +1 -1
  5. package/dist/component/{bookings-header-rac-CWGMiMQz.js → bookings-header-rac-BtGNPfsP.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-BQWvH_gm.js → bookings-last-name-rac-BmloqxX9.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-tFs0Vioz.js → bookings-login-bar-rac-QHUQz0Do.js} +1 -1
  8. package/dist/component/{bookings-phone-rac-BV_BTfAh.js → bookings-phone-rac-CBKcGM_o.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-8cD6QJBZ.js → bookings-rich-text-rac-DnazNxHe.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-YmG26i31.js → checkbox-field-rac-BSiNWGvO.js} +4 -4
  11. package/dist/component/{checkbox-group-field-headless-CE8sEjZj.js → checkbox-group-field-headless-Bl_gIm5X.js} +3 -3
  12. package/dist/component/{checkbox-group-field-rac-CSuJRyk1.js → checkbox-group-field-rac-_cpM6zrw.js} +4 -4
  13. package/dist/component/{checkbox-group-rac-VDezm9js.js → checkbox-group-rac-mZwI2tQ7.js} +1 -1
  14. package/dist/component/{checkbox-rac-DoC1ZqAq.js → checkbox-rac-rfO8Kefs.js} +1 -1
  15. package/dist/component/{contacts-address-rac-10AZNzhI.js → contacts-address-rac-CHthblox.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-C7YDiyg2.js → contacts-birthdate-rac-CuvwylkU.js} +1 -1
  17. package/dist/component/{contacts-company-rac-xQEtJ_-m.js → contacts-company-rac-D546Lq1s.js} +1 -1
  18. package/dist/component/{contacts-email-rac-Bryw_aCU.js → contacts-email-rac-DwXQ_wWS.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-BXmuuhfG.js → contacts-first-name-rac-C7bQDK9N.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-CVWVZO8I.js → contacts-last-name-rac-CQTkOyHY.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-C-KSwisV.js → contacts-phone-rac-5_KC_NgQ.js} +1 -1
  22. package/dist/component/{contacts-position-rac-od-5Gie5.js → contacts-position-rac-Y467YbGC.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-CCh9JcQx.js → contacts-subscribe-rac-By3IlB_r.js} +1 -1
  24. package/dist/component/{contacts-tax-id-rac-DOM7TPQz.js → contacts-tax-id-rac-Cz7LLBFg.js} +1 -1
  25. package/dist/component/{date-availability-G5IwqtRi.js → date-availability-2VUtbyz1.js} +1 -1
  26. package/dist/component/{date-input-field-rac-BpBqS7LG.js → date-input-field-rac-C0YZZ7d1.js} +86 -86
  27. package/dist/component/{date-input-rac-CQyqRqZK.js → date-input-rac-BIlIrfkK.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-BsR_0eAW.js → date-picker-field-rac-D96wqSQ2.js} +92 -91
  29. package/dist/component/{date-picker-rac-Bl2k363u.js → date-picker-rac-CgVftEAJ.js} +1 -1
  30. package/dist/component/date-time-input-field-rac-C4uP9wLp.js +427 -0
  31. package/dist/component/{date-time-input-rac-CInfYWxN.js → date-time-input-rac-BgHUANTP.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-E36LjEfn.js → dext-checkbox-group-rac-DjiWZ293.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-DkMAv7aY.js → dext-checkbox-rac-BmUjJHD_.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-BNkJPlYo.js → dext-date-picker-rac-BlrV70R7.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-BH3Q0pwI.js → dext-date-time-input-rac-JkFxwGgu.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-DkF_DD08.js → dext-dropdown-rac-Xbczi-Z0.js} +1 -1
  37. package/dist/component/{dext-email-rac-0x_DN0_O.js → dext-email-rac-DkMdn4ps.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-UiIENkK3.js → dext-number-input-rac-CNMiNuNi.js} +1 -1
  39. package/dist/component/{dext-phone-rac-BZFK4Uq7.js → dext-phone-rac-C8c-RKQv.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-CBAdO7kt.js → dext-radio-group-rac-BAJJSIKu.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-fqR1sriq.js → dext-rating-input-rac-BdnfHwl1.js} +1 -1
  42. package/dist/component/{dext-tags-rac-mDuiUs9L.js → dext-tags-rac-BjsYYa9X.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-C-8jKWpK.js → dext-text-area-rac-Aatrs0NK.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-CCBAM9YO.js → dext-text-input-rac-DgUfidRi.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-C4_8Yk0p.js → dext-url-input-rac-DQbUHNX7.js} +1 -1
  46. package/dist/component/{donation-rac-BwDHypVJ.js → donation-rac-BEbw90qi.js} +5 -5
  47. package/dist/component/dropdown-field-headless-Cg-_dZP4.js +91 -0
  48. package/dist/component/{dropdown-field-rac-DduQJ9rO.js → dropdown-field-rac-EjA-abC8.js} +4 -4
  49. package/dist/component/{dropdown-rac-BhhECLoH.js → dropdown-rac-zDidZ7dx.js} +1 -1
  50. package/dist/component/{ecom-address-rac-BJ1nnEVL.js → ecom-address-rac-Df9TvxEv.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-4m1XMTDY.js → ecom-subscription-checkbox-rac-B6ztLCEK.js} +2 -2
  52. package/dist/component/{email-input-field-rac-bPEcgidt.js → email-input-field-rac-CpPKmeC5.js} +3 -3
  53. package/dist/component/{events-repeater-rac-CujTGEHx.js → events-repeater-rac-C5VWlWG-.js} +4 -4
  54. package/dist/component/{events-rsvp-rac-BPqr_aY9.js → events-rsvp-rac-CLTyr98o.js} +3 -3
  55. package/dist/component/{field-error-headless-Bu_4Huhb.js → field-error-headless-Dgx4BHo5.js} +1 -1
  56. package/dist/component/{field-label-headless-DkDmQPFG.js → field-label-headless-CsqtNbNm.js} +1 -1
  57. package/dist/component/{file-upload-rac-DmOQrGe8.js → file-upload-rac-1SX9-51k.js} +4 -4
  58. package/dist/component/{fixed-payment-rac-CDsddKrV.js → fixed-payment-rac-C_zIu17t.js} +3 -3
  59. package/dist/component/{form-BpJ4Lqbe.js → form-BoHpaLjl.js} +69 -69
  60. package/dist/component/form.css +1 -1
  61. package/dist/component/form.js +1 -1
  62. package/dist/component/{header-field-rac-Cr1FVQdq.js → header-field-rac-DBw1TpEG.js} +2 -2
  63. package/dist/component/{header-rac-CvAZsqDL.js → header-rac-DAnTKW4z.js} +1 -1
  64. package/dist/component/{image-choice-rac-D_EKrD73.js → image-choice-rac-CqnAnKbc.js} +4 -4
  65. package/dist/component/{index-Tnke1N8m.js → index-Rqkz8Lrx.js} +2 -2
  66. package/dist/component/{index-DxsHfkik.js → index-g0wVTJHp.js} +4 -4
  67. package/dist/component/{isObjectLike-CMWsWjX8.js → isObjectLike-Dt08IFKQ.js} +1 -1
  68. package/dist/component/{multiline-address-field-rac-BMeMP7J6.js → multiline-address-field-rac-1zdTMnWs.js} +7 -7
  69. package/dist/component/{multiline-address-rac-CFprfFXm.js → multiline-address-rac-DI_2qWao.js} +1 -1
  70. package/dist/component/non-modal-popover-D-u13tmp.js +64 -0
  71. package/dist/component/{number-input-field-rac-CaHySxYH.js → number-input-field-rac-1EfxOkZP.js} +4 -4
  72. package/dist/component/{number-input-rac-BezfoU8h.js → number-input-rac-AG8ecaT6.js} +1 -1
  73. package/dist/component/{password-rac-_wwZFd67.js → password-rac-CGu6cCp2.js} +4 -4
  74. package/dist/component/{payment-input-rac-CWrSvBDp.js → payment-input-rac-CRMqRcWZ.js} +4 -4
  75. package/dist/component/{phone-input-field-rac-R3LYdPIs.js → phone-input-field-rac-Bpk1kirr.js} +7 -7
  76. package/dist/component/{phone-rac-D6uILVRw.js → phone-rac-w7Kiv6ru.js} +1 -1
  77. package/dist/component/{product-list-rac-D3WTfC9k.js → product-list-rac-WIshqJ3F.js} +4 -4
  78. package/dist/component/{quiz-radio-group-rac-B6T7eedk.js → quiz-radio-group-rac-BkB4fikl.js} +1 -1
  79. package/dist/component/{radio-button-module-classes-D8Jm-Q6u.js → radio-button-module-classes-D78goUwl.js} +3 -3
  80. package/dist/component/{radio-group-field-rac-R5onZzJd.js → radio-group-field-rac-Cx2nvCDW.js} +4 -4
  81. package/dist/component/{radio-group-rac-DUPHR4tK.js → radio-group-rac-46JW3dAH.js} +1 -1
  82. package/dist/component/{rating-input-field-rac-C9GpwuRO.js → rating-input-field-rac-D05VBUGw.js} +4 -4
  83. package/dist/component/{rating-input-rac-Iv_2PVqP.js → rating-input-rac-DtnpPnnU.js} +1 -1
  84. package/dist/component/{rich-content-rac.module-Det3BKrI.js → rich-content-rac.module-W8U6Eupl.js} +1 -1
  85. package/dist/component/{rich-text-field-rac-DnBtp2d_.js → rich-text-field-rac-BKMs8NOQ.js} +2 -2
  86. package/dist/component/{rich-text-rac-CXzxap1G.js → rich-text-rac-BJ4Jii81.js} +1 -1
  87. package/dist/component/{service-dropdown-rac-CVyd2HYC.js → service-dropdown-rac-CEDqWqhg.js} +5 -5
  88. package/dist/component/{services-multi-choice-rac-BY-W0xIt.js → services-multi-choice-rac-9qwSAT5T.js} +5 -5
  89. package/dist/component/{signature-rac-BojdPJhg.js → signature-rac-D6BMpTFh.js} +4 -4
  90. package/dist/component/{submit-button-rac-Q7KKQbiL.js → submit-button-rac-Bj3iEONs.js} +2 -2
  91. package/dist/component/{tags-field-rac-CbmR6gi4.js → tags-field-rac-DMD53JR4.js} +5 -5
  92. package/dist/component/{tags-rac-hJo0tMVR.js → tags-rac-BNL4fHg-.js} +1 -1
  93. package/dist/component/{text-area-field-rac-DHQqkqtu.js → text-area-field-rac-CHJzdEBE.js} +4 -4
  94. package/dist/component/{text-area-rac-BTXxfWyK.js → text-area-rac-CgoEe9Qh.js} +1 -1
  95. package/dist/component/{text-input-field-rac-BVTBYjMM.js → text-input-field-rac-DewYQNfK.js} +3 -3
  96. package/dist/component/{text-input-headless-Dk_0y9U-.js → text-input-headless-OayaIOMS.js} +3 -3
  97. package/dist/component/{text-input-rac-DIwGn0WI.js → text-input-rac-4SxpOILY.js} +1 -1
  98. package/dist/component/{time-input-rac-ClyPOKOH.js → time-input-rac-CivcOPuU.js} +65 -64
  99. package/dist/component/{url-input-field-rac-BhPzHWTI.js → url-input-field-rac-BK3WIP-A.js} +4 -4
  100. package/dist/component/{url-input-rac-COD7T5wo.js → url-input-rac-Dgn9n6w1.js} +1 -1
  101. package/dist/component/{use-dropdown-option-class-name-CTDQ4YIC.js → use-dropdown-option-class-name-BZu-Fese.js} +2 -2
  102. package/dist/component/use-dropdown-trigger-class-name-Dpk8_xn2.js +40 -0
  103. package/dist/component/{use-element-state-class-name-BU86oHkX.js → use-element-state-class-name-Cby7DA2T.js} +1 -1
  104. package/dist/component/{use-hoverable-input-class-name-DWkmQfPd.js → use-hoverable-input-class-name-CKBvA8Gx.js} +2 -2
  105. package/dist/component/{use-service-options-base-jkecu8jY.js → use-service-options-base-Px-Ey93X.js} +1 -1
  106. package/dist/component/use-text-input-class-name-D30YesHa.js +6 -0
  107. package/package.json +2 -2
  108. package/dist/component/date-time-input-field-rac-C5TC2nsm.js +0 -426
  109. package/dist/component/dropdown-field-headless-CspX2zV_.js +0 -91
  110. package/dist/component/non-modal-popover-DtIMXHbe.js +0 -63
  111. package/dist/component/use-dropdown-trigger-class-name-DapDPNX0.js +0 -43
  112. package/dist/component/use-text-input-class-name-CNTXVb7N.js +0 -6
@@ -0,0 +1,427 @@
1
+ import { RicosViewer as se } from "@wix/ricos/viewer";
2
+ import h from "classnames";
3
+ import t, { useMemo as O, useState as G, useCallback as H, useRef as U, useContext as oe } from "react";
4
+ import { parseTime as le } from "@internationalized/date";
5
+ import { UNSAFE_PortalProvider as ie } from "react-aria";
6
+ import { ListBoxItem as ce, Select as me, TextField as Q, TimeField as de, SelectValue as ue, Input as J, DateInput as pe, DateSegment as B, TimeFieldStateContext as Ee } from "react-aria-components";
7
+ import { bh as f, be as W, b9 as $, aO as X, a$ as Z, aB as d, br as L, b3 as K, aQ as fe, aI as he, b6 as be, aK as j, bj as z, I as R, U as ge, K as Ie, v as Ne, p as De } from "./form-BoHpaLjl.js";
8
+ import { f as u, a as P } from "./find-child-C60k4CxG.js";
9
+ import { g as _e } from "./helpers-HmkkXrh2.js";
10
+ import { D as ye, E as Te } from "./field-error-headless-Dgx4BHo5.js";
11
+ import { L as Oe } from "./field-label-headless-CsqtNbNm.js";
12
+ import { F as Le } from "./fieldset-headless-CD3fds9J.js";
13
+ import { N as Ce, E as Fe, S as Pe } from "./non-modal-popover-D-u13tmp.js";
14
+ import { a as Me, u as Se } from "./use-dropdown-trigger-class-name-Dpk8_xn2.js";
15
+ import { V as Re, u as Ae } from "./use-dropdown-option-class-name-BZu-Fese.js";
16
+ import { C as Ve } from "./chevron-down-icon-CcpVm6B-.js";
17
+ import { E as ve } from "./error-icon-hZxQ6DEy.js";
18
+ import { H as k } from "./custom-focus-class-_483Pkwp.js";
19
+ import { s as g } from "./field-rac.module-BIBNQEOK.js";
20
+ import { u as x } from "./use-text-input-class-name-D30YesHa.js";
21
+ const l = ({ children: e, className: a }) => {
22
+ const { id: n, required: r, onBlur: s, onFocus: o, FieldLayout: i } = f(), { inputId: m, labelId: c, ariaDescribedBy: b } = W(), { regionalFormat: p } = $(), _ = O(() => X(p).filter(Z).map((S) => S.toUpperCase()), [
23
+ p
24
+ ]), M = u(e, l.Label), v = u(e, l.Description), N = u(e, l.Error), D = {
25
+ [d.MONTH]: u(e, l.Month),
26
+ [d.DAY]: u(e, l.Day),
27
+ [d.YEAR]: u(e, l.Year)
28
+ }, y = u(e, l.Time);
29
+ return /* @__PURE__ */ t.createElement(i, {
30
+ fieldId: n,
31
+ renderLabel: () => P(M, {
32
+ as: "div"
33
+ }),
34
+ renderInput: () => /* @__PURE__ */ t.createElement(Le, {
35
+ id: m,
36
+ ariaLabelledBy: c,
37
+ ariaDescribedBy: b,
38
+ required: r,
39
+ onBlur: s,
40
+ onFocus: o,
41
+ className: a
42
+ }, D[_[0]], D[_[1]], D[_[2]], y),
43
+ renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, N, v)
44
+ });
45
+ }, C = ({ children: e, className: a }) => {
46
+ const { id: n, disabled: r, readOnly: s, showDateLabels: o, hidePlaceholder: i } = f(), { labelId: m } = T(d.MONTH), { partValue: c, partError: b, onPartChange: p } = F(d.MONTH), { t: _ } = L(), [M, v] = G(!1), N = Me(n), [D, y] = G(null), S = i ? Fe : _("field.date.placeholder.month"), ee = H((Y) => {
47
+ s || p(typeof Y == "string" ? Y : "");
48
+ }, [
49
+ p,
50
+ s
51
+ ]), te = H((Y) => {
52
+ v(Y && !s);
53
+ }, [
54
+ s
55
+ ]), ae = u(e, C.Label), ne = u(e, C.Trigger), re = u(e, C.Options);
56
+ return /* @__PURE__ */ t.createElement("div", {
57
+ className: a,
58
+ "data-date-field": !0
59
+ }, o ? ae : null, /* @__PURE__ */ t.createElement("div", {
60
+ ref: y,
61
+ style: {
62
+ display: "contents"
63
+ }
64
+ }), /* @__PURE__ */ t.createElement(ie, {
65
+ getContainer: () => D
66
+ }, /* @__PURE__ */ t.createElement(me, {
67
+ "aria-labelledby": o ? m : void 0,
68
+ value: c || null,
69
+ onChange: ee,
70
+ isDisabled: r,
71
+ isInvalid: b,
72
+ placeholder: S,
73
+ isOpen: N || M,
74
+ onOpenChange: N ? void 0 : te
75
+ }, ne, P(re, {
76
+ isForcedOpen: N
77
+ }))));
78
+ }, Ye = ({ className: e }) => /* @__PURE__ */ t.createElement(q, {
79
+ datePart: d.MONTH,
80
+ className: e
81
+ }), ke = ({ children: e, className: a }) => {
82
+ const { id: n, readOnly: r } = f(), { inputId: s } = T(d.MONTH), { partError: o, isFirstPart: i } = F(d.MONTH), m = U(null);
83
+ return z(() => {
84
+ var c;
85
+ i && ((c = m.current) == null || c.focus());
86
+ }, n), /* @__PURE__ */ t.createElement(Pe, {
87
+ ref: m,
88
+ id: s,
89
+ className: a,
90
+ "data-hook": d.MONTH,
91
+ "data-invalid": o || void 0,
92
+ "data-readonly": r || void 0
93
+ }, /* @__PURE__ */ t.createElement(ue, null), e);
94
+ }, w = ({ children: e, className: a, ...n }) => {
95
+ const { isForcedOpen: r } = n, { language: s } = $(), o = O(() => _e(s), [
96
+ s
97
+ ]), i = u(e, w.Option) ?? /* @__PURE__ */ t.createElement(w.Option, null);
98
+ return /* @__PURE__ */ t.createElement(Ce, {
99
+ className: a,
100
+ containerPadding: 0,
101
+ offset: 0
102
+ }, /* @__PURE__ */ t.createElement(Re, {
103
+ isForcedOpen: r,
104
+ autoFocus: r ? !1 : void 0
105
+ }, o.map((m, c) => P(i, {
106
+ key: String(c + 1),
107
+ value: String(c + 1),
108
+ label: m
109
+ }))));
110
+ }, He = ({ className: e, ...a }) => {
111
+ const { value: n, label: r } = a;
112
+ return /* @__PURE__ */ t.createElement(ce, {
113
+ className: e,
114
+ id: n,
115
+ textValue: r
116
+ }, r);
117
+ };
118
+ C.Label = Ye;
119
+ C.Trigger = ke;
120
+ C.Options = w;
121
+ w.Option = He;
122
+ const A = ({ children: e, className: a }) => {
123
+ const { disabled: n, readOnly: r, showDateLabels: s } = f(), { labelId: o } = T(d.DAY), { partValue: i, partError: m, onPartChange: c } = F(d.DAY), b = u(e, A.Label), p = u(e, A.Input);
124
+ return /* @__PURE__ */ t.createElement("div", {
125
+ className: a,
126
+ "data-date-field": !0
127
+ }, s && b, /* @__PURE__ */ t.createElement(Q, {
128
+ "aria-labelledby": s ? o : void 0,
129
+ value: i,
130
+ onChange: c,
131
+ isDisabled: n,
132
+ isReadOnly: r,
133
+ isInvalid: m
134
+ }, p));
135
+ }, we = ({ className: e }) => /* @__PURE__ */ t.createElement(q, {
136
+ datePart: d.DAY,
137
+ className: e
138
+ }), Be = ({ className: e }) => {
139
+ const { id: a, hidePlaceholder: n } = f(), { inputId: r } = T(d.DAY), { isFirstPart: s } = F(d.DAY), { t: o } = L(), i = U(null), m = n ? void 0 : o("field.date.placeholder.day");
140
+ return z(() => {
141
+ var c;
142
+ s && ((c = i.current) == null || c.focus());
143
+ }, a), /* @__PURE__ */ t.createElement(J, {
144
+ ref: i,
145
+ id: r,
146
+ className: e,
147
+ placeholder: m,
148
+ maxLength: 2,
149
+ inputMode: "numeric",
150
+ "data-hook": d.DAY
151
+ });
152
+ };
153
+ A.Label = we;
154
+ A.Input = Be;
155
+ const V = ({ children: e, className: a }) => {
156
+ const { disabled: n, readOnly: r, showDateLabels: s } = f(), { labelId: o } = T(d.YEAR), { partValue: i, partError: m, onPartChange: c } = F(d.YEAR), b = u(e, V.Label), p = u(e, V.Input);
157
+ return /* @__PURE__ */ t.createElement("div", {
158
+ className: a,
159
+ "data-date-field": !0
160
+ }, s && b, /* @__PURE__ */ t.createElement(Q, {
161
+ "aria-labelledby": s ? o : void 0,
162
+ value: i,
163
+ onChange: c,
164
+ isDisabled: n,
165
+ isReadOnly: r,
166
+ isInvalid: m
167
+ }, p));
168
+ }, xe = ({ className: e }) => /* @__PURE__ */ t.createElement(q, {
169
+ datePart: d.YEAR,
170
+ className: e
171
+ }), Ue = ({ className: e }) => {
172
+ const { id: a, hidePlaceholder: n } = f(), { inputId: r } = T(d.YEAR), { isFirstPart: s } = F(d.YEAR), { t: o } = L(), i = U(null), m = n ? void 0 : o("field.date.placeholder.year");
173
+ return z(() => {
174
+ var c;
175
+ s && ((c = i.current) == null || c.focus());
176
+ }, a), /* @__PURE__ */ t.createElement(J, {
177
+ ref: i,
178
+ id: r,
179
+ className: e,
180
+ placeholder: m,
181
+ maxLength: 4,
182
+ inputMode: "numeric",
183
+ "data-hook": d.YEAR
184
+ });
185
+ };
186
+ V.Label = xe;
187
+ V.Input = Ue;
188
+ const I = ({ children: e, className: a }) => {
189
+ const { disabled: n, readOnly: r, use24HourFormat: s, showDateLabels: o } = f(), { labelId: i } = T("time"), { partValue: m, partError: c, onPartChange: b } = F("time"), p = u(e, I.Label), _ = u(e, I.Input);
190
+ return /* @__PURE__ */ t.createElement("div", {
191
+ className: a,
192
+ "data-date-field": !0
193
+ }, o && p, /* @__PURE__ */ t.createElement(de, {
194
+ "aria-labelledby": o ? i : void 0,
195
+ value: m,
196
+ onChange: b,
197
+ isDisabled: n,
198
+ isReadOnly: r,
199
+ isInvalid: c,
200
+ hourCycle: s ? 24 : 12
201
+ }, _));
202
+ }, $e = ({ className: e }) => {
203
+ const { inputId: a, labelId: n } = T("time"), { t: r } = L(), s = r("field.date.label.time");
204
+ return /* @__PURE__ */ t.createElement("label", {
205
+ id: n,
206
+ htmlFor: a,
207
+ className: e
208
+ }, s);
209
+ }, ze = ({ children: e, className: a }) => {
210
+ const { hidePlaceholder: n } = f(), r = u(e, I.Hour), s = u(e, I.Minute), o = u(e, I.Period);
211
+ return /* @__PURE__ */ t.createElement(pe, {
212
+ className: a,
213
+ "data-hook": "time",
214
+ "data-placeholder-hidden": n || void 0
215
+ }, (i) => {
216
+ switch (i.type) {
217
+ case "hour":
218
+ return P(r, {
219
+ segment: i
220
+ }) || /* @__PURE__ */ t.createElement(t.Fragment, null);
221
+ case "minute":
222
+ return P(s, {
223
+ segment: i
224
+ }) || /* @__PURE__ */ t.createElement(t.Fragment, null);
225
+ case "dayPeriod":
226
+ return P(o, {
227
+ segment: i
228
+ }) || /* @__PURE__ */ t.createElement(t.Fragment, null);
229
+ case "literal":
230
+ return /* @__PURE__ */ t.createElement(B, {
231
+ segment: i
232
+ });
233
+ default:
234
+ return /* @__PURE__ */ t.createElement(t.Fragment, null);
235
+ }
236
+ });
237
+ }, qe = ({ className: e, ...a }) => {
238
+ const { hidePlaceholder: n } = f(), { segment: r } = a, { t: s } = L(), o = n ? void 0 : s("field.date.placeholder.hour");
239
+ return /* @__PURE__ */ t.createElement(B, {
240
+ segment: r,
241
+ className: e,
242
+ ...o && {
243
+ placeholder: o
244
+ }
245
+ });
246
+ }, Ge = ({ className: e, ...a }) => {
247
+ const { hidePlaceholder: n } = f(), { segment: r } = a, { t: s } = L(), o = n ? void 0 : s("field.date.placeholder.minute");
248
+ return /* @__PURE__ */ t.createElement(B, {
249
+ segment: r,
250
+ className: e,
251
+ ...o && {
252
+ placeholder: o
253
+ }
254
+ });
255
+ }, Ke = ({ className: e, ...a }) => {
256
+ const { hidePlaceholder: n } = f(), { segment: r } = a, { t: s } = L(), o = oe(Ee), i = n ? void 0 : s("field.date.placeholder.period"), m = () => o == null ? void 0 : o.increment("dayPeriod");
257
+ return /* @__PURE__ */ t.createElement(B, {
258
+ segment: r,
259
+ className: e,
260
+ onClick: m,
261
+ ...i && {
262
+ placeholder: i
263
+ }
264
+ });
265
+ };
266
+ I.Label = $e;
267
+ I.Input = ze;
268
+ I.Hour = qe;
269
+ I.Minute = Ge;
270
+ I.Period = Ke;
271
+ l.Label = Oe;
272
+ l.Month = C;
273
+ l.Day = A;
274
+ l.Year = V;
275
+ l.Time = I;
276
+ l.Description = ye;
277
+ l.Error = Te;
278
+ function T(e) {
279
+ const { inputId: a } = W();
280
+ return O(() => {
281
+ const n = e.toLowerCase();
282
+ return {
283
+ inputId: `${a}-${n}-input`,
284
+ labelId: `${a}-${n}-label`
285
+ };
286
+ }, [
287
+ a,
288
+ e
289
+ ]);
290
+ }
291
+ function F(e) {
292
+ const { value: a, onChange: n, hasError: r = !1 } = f(), { regionalFormat: s } = $(), [o, i] = O(() => K(a ?? ""), [
293
+ a
294
+ ]), m = O(() => fe(r, a ?? ""), [
295
+ a,
296
+ r
297
+ ]), c = O(() => he(o), [
298
+ o
299
+ ]), b = O(() => je(i), [
300
+ i
301
+ ]), p = H((N) => {
302
+ const D = Qe(N), y = j(o, D);
303
+ n(y);
304
+ }, [
305
+ n,
306
+ o
307
+ ]), _ = H((N) => {
308
+ const [, D] = K(a ?? ""), y = be(N, e, c), S = j(y, D);
309
+ n(S);
310
+ }, [
311
+ n,
312
+ a,
313
+ c,
314
+ e
315
+ ]), M = O(() => e === "time" ? !1 : X(s).filter(Z).map((y) => y.toUpperCase())[0] === e, [
316
+ s,
317
+ e
318
+ ]);
319
+ return e === "time" ? {
320
+ partValue: b,
321
+ partError: m.TIME,
322
+ onPartChange: p,
323
+ isFirstPart: !1
324
+ } : {
325
+ partValue: c[e] || "",
326
+ partError: m[e],
327
+ onPartChange: _,
328
+ isFirstPart: M
329
+ };
330
+ }
331
+ function q({ datePart: e, className: a }) {
332
+ const { inputId: n, labelId: r } = T(e), { t: s } = L(), o = `field.date.label.${e.toLowerCase()}`, i = s(o);
333
+ return /* @__PURE__ */ t.createElement("label", {
334
+ id: r,
335
+ htmlFor: n,
336
+ className: a
337
+ }, i);
338
+ }
339
+ function je(e) {
340
+ if (!e)
341
+ return null;
342
+ try {
343
+ return le(e);
344
+ } catch {
345
+ return null;
346
+ }
347
+ }
348
+ function Qe(e) {
349
+ if (!e)
350
+ return null;
351
+ const a = String(e.hour).padStart(2, "0"), n = String(e.minute).padStart(2, "0"), r = String(e.second).padStart(2, "0");
352
+ return [
353
+ a,
354
+ n,
355
+ r
356
+ ].join(":");
357
+ }
358
+ const Je = "_fields_1meki_1", We = "_month_1meki_10", Xe = "_day_1meki_11", Ze = "_year_1meki_12", et = "_timeGroup_1meki_13", tt = "_dayInput_1meki_34", at = "_yearInput_1meki_35", nt = "_monthTrigger_1meki_39", rt = "_monthOption_1meki_59", st = "_time_1meki_13", ot = "_hour_1meki_78", lt = "_minute_1meki_79", it = "_period_1meki_80", E = {
359
+ fields: Je,
360
+ month: We,
361
+ day: Xe,
362
+ year: Ze,
363
+ timeGroup: et,
364
+ dayInput: tt,
365
+ yearInput: at,
366
+ monthTrigger: nt,
367
+ monthOption: rt,
368
+ time: st,
369
+ hour: ot,
370
+ minute: lt,
371
+ period: it
372
+ }, ct = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(se, {
373
+ content: e,
374
+ locale: a
375
+ }), Mt = () => {
376
+ const e = Se(E.monthTrigger), a = Ae(E.monthOption, k), n = x(E.dayInput), r = x(E.yearInput), s = x(E.time);
377
+ return /* @__PURE__ */ t.createElement(l, {
378
+ className: E.fields
379
+ }, /* @__PURE__ */ t.createElement(l.Label, {
380
+ className: h(R, g.label)
381
+ }, /* @__PURE__ */ t.createElement(l.Label.Required, {
382
+ className: h(ge, g.requiredMark)
383
+ })), /* @__PURE__ */ t.createElement(l.Month, {
384
+ className: E.month
385
+ }, /* @__PURE__ */ t.createElement(l.Month.Label, {
386
+ className: h(R, g.label)
387
+ }), /* @__PURE__ */ t.createElement(l.Month.Trigger, {
388
+ className: e
389
+ }, /* @__PURE__ */ t.createElement(Ve, {
390
+ className: g.dropdownIcon
391
+ })), /* @__PURE__ */ t.createElement(l.Month.Options, {
392
+ className: h(Ie, g.selectPopover, g.dropdownPopover)
393
+ }, /* @__PURE__ */ t.createElement(l.Month.Options.Option, {
394
+ className: a
395
+ }))), /* @__PURE__ */ t.createElement(l.Day, {
396
+ className: E.day
397
+ }, /* @__PURE__ */ t.createElement(l.Day.Label, {
398
+ className: h(R, g.label)
399
+ }), /* @__PURE__ */ t.createElement(l.Day.Input, {
400
+ className: n
401
+ })), /* @__PURE__ */ t.createElement(l.Year, {
402
+ className: E.year
403
+ }, /* @__PURE__ */ t.createElement(l.Year.Label, {
404
+ className: h(R, g.label)
405
+ }), /* @__PURE__ */ t.createElement(l.Year.Input, {
406
+ className: r
407
+ })), /* @__PURE__ */ t.createElement(l.Time, {
408
+ className: E.timeGroup
409
+ }, /* @__PURE__ */ t.createElement(l.Time.Label, {
410
+ className: h(R, g.label)
411
+ }), /* @__PURE__ */ t.createElement(l.Time.Input, {
412
+ className: s
413
+ }, /* @__PURE__ */ t.createElement(l.Time.Hour, {
414
+ className: h(E.hour, k)
415
+ }), /* @__PURE__ */ t.createElement(l.Time.Minute, {
416
+ className: h(E.minute, k)
417
+ }), /* @__PURE__ */ t.createElement(l.Time.Period, {
418
+ className: h(E.period, k)
419
+ }))), /* @__PURE__ */ t.createElement(l.Error, {
420
+ className: h(Ne, g.error)
421
+ }, /* @__PURE__ */ t.createElement(ve, null), /* @__PURE__ */ t.createElement(l.Error.Text, null)), /* @__PURE__ */ t.createElement(l.Description, {
422
+ className: h(De, g.description)
423
+ }, ct));
424
+ };
425
+ export {
426
+ Mt as D
427
+ };
@@ -1,5 +1,5 @@
1
1
  import e from "react";
2
- import { D as t } from "./date-time-input-field-rac-C5TC2nsm.js";
2
+ import { D as t } from "./date-time-input-field-rac-C4uP9wLp.js";
3
3
  const n = () => /* @__PURE__ */ e.createElement(t, null);
4
4
  export {
5
5
  n as DateTimeInputRAC
@@ -1,6 +1,6 @@
1
1
  import o from "react";
2
- import { bh as e, aj as t } from "./form-BpJ4Lqbe.js";
3
- import { C as p } from "./checkbox-group-field-rac-CSuJRyk1.js";
2
+ import { bh as e, aj as t } from "./form-BoHpaLjl.js";
3
+ import { C as p } from "./checkbox-group-field-rac-_cpM6zrw.js";
4
4
  import { D as s } from "./default-limits-D7qVv_Hv.js";
5
5
  const C = () => {
6
6
  const r = {
@@ -1,5 +1,5 @@
1
1
  import e from "react";
2
- import { C as t } from "./checkbox-field-rac-YmG26i31.js";
2
+ import { C as t } from "./checkbox-field-rac-BSiNWGvO.js";
3
3
  const c = () => /* @__PURE__ */ e.createElement(t, null);
4
4
  export {
5
5
  c as DextCheckboxRAC
@@ -1,5 +1,5 @@
1
1
  import e from "react";
2
- import { D as t } from "./date-picker-field-rac-BsR_0eAW.js";
2
+ import { D as t } from "./date-picker-field-rac-D96wqSQ2.js";
3
3
  const a = () => /* @__PURE__ */ e.createElement(t, null);
4
4
  export {
5
5
  a as DextDatePickerRAC
@@ -1,5 +1,5 @@
1
1
  import e from "react";
2
- import { D as t } from "./date-time-input-field-rac-C5TC2nsm.js";
2
+ import { D as t } from "./date-time-input-field-rac-C4uP9wLp.js";
3
3
  const n = () => /* @__PURE__ */ e.createElement(t, null);
4
4
  export {
5
5
  n as DextDateTimeInputRAC
@@ -1,5 +1,5 @@
1
1
  import o from "react";
2
- import { D as r } from "./dropdown-field-rac-DduQJ9rO.js";
2
+ import { D as r } from "./dropdown-field-rac-EjA-abC8.js";
3
3
  const n = () => /* @__PURE__ */ o.createElement(r, null);
4
4
  export {
5
5
  n as DextDropdownRAC
@@ -1,5 +1,5 @@
1
1
  import t from "react";
2
- import { E as e } from "./email-input-field-rac-bPEcgidt.js";
2
+ import { E as e } from "./email-input-field-rac-CpPKmeC5.js";
3
3
  const l = () => /* @__PURE__ */ t.createElement(e, null);
4
4
  export {
5
5
  l as DextEmailRAC
@@ -1,5 +1,5 @@
1
1
  import e from "react";
2
- import { N as t } from "./number-input-field-rac-CaHySxYH.js";
2
+ import { N as t } from "./number-input-field-rac-1EfxOkZP.js";
3
3
  const n = () => /* @__PURE__ */ e.createElement(t, null);
4
4
  export {
5
5
  n as DextNumberInputRAC
@@ -1,5 +1,5 @@
1
1
  import e from "react";
2
- import { P as t } from "./phone-input-field-rac-R3LYdPIs.js";
2
+ import { P as t } from "./phone-input-field-rac-Bpk1kirr.js";
3
3
  const r = () => /* @__PURE__ */ e.createElement(t, null);
4
4
  export {
5
5
  r as DextPhoneRAC
@@ -1,6 +1,6 @@
1
1
  import r from "react";
2
- import { bh as e, aj as t } from "./form-BpJ4Lqbe.js";
3
- import { R as p } from "./radio-group-field-rac-R5onZzJd.js";
2
+ import { bh as e, aj as t } from "./form-BoHpaLjl.js";
3
+ import { R as p } from "./radio-group-field-rac-Cx2nvCDW.js";
4
4
  import { a } from "./default-limits-D7qVv_Hv.js";
5
5
  const l = () => {
6
6
  const o = {
@@ -1,5 +1,5 @@
1
1
  import t from "react";
2
- import { R as e } from "./rating-input-field-rac-C9GpwuRO.js";
2
+ import { R as e } from "./rating-input-field-rac-D05VBUGw.js";
3
3
  const o = () => /* @__PURE__ */ t.createElement(e, null);
4
4
  export {
5
5
  o as DextRatingInputRAC
@@ -1,6 +1,6 @@
1
1
  import r from "react";
2
- import { bh as e, aj as o } from "./form-BpJ4Lqbe.js";
3
- import { T as s } from "./tags-field-rac-CbmR6gi4.js";
2
+ import { bh as e, aj as o } from "./form-BoHpaLjl.js";
3
+ import { T as s } from "./tags-field-rac-DMD53JR4.js";
4
4
  import { b as a } from "./default-limits-D7qVv_Hv.js";
5
5
  const l = () => {
6
6
  const t = {
@@ -1,5 +1,5 @@
1
1
  import e from "react";
2
- import { T as t } from "./text-area-field-rac-DHQqkqtu.js";
2
+ import { T as t } from "./text-area-field-rac-CHJzdEBE.js";
3
3
  const a = () => /* @__PURE__ */ e.createElement(t, null);
4
4
  export {
5
5
  a as DextTextAreaRAC
@@ -1,5 +1,5 @@
1
1
  import t from "react";
2
- import { T as e } from "./text-input-field-rac-BVTBYjMM.js";
2
+ import { T as e } from "./text-input-field-rac-DewYQNfK.js";
3
3
  const o = () => /* @__PURE__ */ t.createElement(e, null);
4
4
  export {
5
5
  o as DextTextInputRAC
@@ -1,5 +1,5 @@
1
1
  import t from "react";
2
- import { U as r } from "./url-input-field-rac-BhPzHWTI.js";
2
+ import { U as r } from "./url-input-field-rac-BK3WIP-A.js";
3
3
  const n = () => /* @__PURE__ */ t.createElement(r, null);
4
4
  export {
5
5
  n as DextUrlInputRAC
@@ -3,19 +3,19 @@ import { RicosViewer as re } from "@wix/ricos/viewer";
3
3
  import D from "classnames";
4
4
  import { RadioGroup as se, RadioField as G, RadioButton as Y, TextField as ae, Group as le, Input as ie } from "react-aria-components";
5
5
  import { debounce as ce } from "ts-debounce";
6
- import { ax as Q, bh as L, be as B, br as ue, b9 as j, bj as me, I as pe, U as de, q as Ie, v as fe, p as Ce, r as Ee } from "./form-BpJ4Lqbe.js";
6
+ import { ax as Q, bh as L, be as B, br as ue, b9 as j, bj as me, I as pe, U as de, q as Ie, v as fe, p as Ce, r as Ee } from "./form-BoHpaLjl.js";
7
7
  import { f as E, a as y } from "./find-child-C60k4CxG.js";
8
8
  import { a as W } from "./format-currency-BwShJ9vM.js";
9
- import { D as he, E as Oe } from "./field-error-headless-Bu_4Huhb.js";
10
- import { L as _e } from "./field-label-headless-DkDmQPFG.js";
9
+ import { D as he, E as Oe } from "./field-error-headless-Dgx4BHo5.js";
10
+ import { L as _e } from "./field-label-headless-CsqtNbNm.js";
11
11
  import { a as be, b as ye } from "./numeric-input-utils-CuBMi4-a.js";
12
12
  import { g as Ne } from "./payment-field-utils-DobiK5Xh.js";
13
13
  import { u as ge } from "./use-synced-display-value-DcAxdn3M.js";
14
14
  import { E as Fe } from "./error-icon-hZxQ6DEy.js";
15
15
  import { s as v } from "./field-rac.module-BIBNQEOK.js";
16
16
  import { o as De } from "./options-rac.module-_THNq6Qq.js";
17
- import { u as ve } from "./use-element-state-class-name-BU86oHkX.js";
18
- import { u as Se } from "./use-text-input-class-name-CNTXVb7N.js";
17
+ import { u as ve } from "./use-element-state-class-name-Cby7DA2T.js";
18
+ import { u as Se } from "./use-text-input-class-name-D30YesHa.js";
19
19
  function Re(e, t) {
20
20
  return e.reduce((o, r) => (o[r[t]] = r, o), {});
21
21
  }
@@ -0,0 +1,91 @@
1
+ import e, { useState as b, useCallback as g, useRef as k } from "react";
2
+ import { UNSAFE_PortalProvider as q } from "react-aria";
3
+ import { Select as M, SelectValue as j, ListBoxItem as H } from "react-aria-components";
4
+ import { bh as E, be as O, bj as U } from "./form-BoHpaLjl.js";
5
+ import { f as d, a as F } from "./find-child-C60k4CxG.js";
6
+ import { D as Y, E as z } from "./field-error-headless-Dgx4BHo5.js";
7
+ import { L as G } from "./field-label-headless-CsqtNbNm.js";
8
+ import { E as J, S as K, N as Q } from "./non-modal-popover-D-u13tmp.js";
9
+ import { a as W } from "./use-dropdown-trigger-class-name-Dpk8_xn2.js";
10
+ import { V as X } from "./use-dropdown-option-class-name-BZu-Fese.js";
11
+ const r = ({ children: n }) => {
12
+ const { id: l, value: a, defaultValue: o, options: u = [], readOnly: s, onChange: t, placeholder: m, disabled: i, required: v, onBlur: L, onFocus: y, FieldLayout: C, hasError: D } = E(), [h, I] = b(!1), p = W(l), [P, S] = b(null), T = a && u.some((c) => (c.value ?? c.label) === a) ? a : o || null, { labelId: B } = O(), N = g((c) => {
13
+ s || t(typeof c == "string" ? c : null);
14
+ }, [
15
+ t,
16
+ s
17
+ ]), V = g((c) => I(c && !i && !s), [
18
+ i,
19
+ s
20
+ ]), R = d(n, r.Label), x = d(n, r.Trigger), w = d(n, r.Options), A = d(n, r.Description), _ = d(n, r.Error);
21
+ return /* @__PURE__ */ e.createElement(C, {
22
+ fieldId: l,
23
+ renderLabel: () => R,
24
+ renderInput: () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", {
25
+ ref: S,
26
+ style: {
27
+ display: "contents"
28
+ }
29
+ }), /* @__PURE__ */ e.createElement(q, {
30
+ getContainer: () => P
31
+ }, /* @__PURE__ */ e.createElement(M, {
32
+ "aria-labelledby": B,
33
+ value: T,
34
+ isOpen: p || h && !i && !s,
35
+ onOpenChange: p ? void 0 : V,
36
+ onChange: N,
37
+ isDisabled: i,
38
+ isInvalid: D,
39
+ isRequired: v,
40
+ placeholder: m || J,
41
+ onBlur: L,
42
+ onFocus: y
43
+ }, x, F(w, {
44
+ isForcedOpen: p
45
+ })))),
46
+ renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, _, A)
47
+ });
48
+ }, Z = ({ children: n, className: l }) => {
49
+ const { inputId: a, ariaDescribedBy: o } = O(), { id: u, hasError: s, isLoading: t } = E(), m = k(null);
50
+ return U(() => {
51
+ var i;
52
+ (i = m.current) == null || i.focus();
53
+ }, u), /* @__PURE__ */ e.createElement(K, {
54
+ ref: m,
55
+ id: a,
56
+ "aria-describedby": o,
57
+ className: l,
58
+ "data-invalid": s || void 0,
59
+ "data-loading": t || void 0
60
+ }, /* @__PURE__ */ e.createElement(j, null), n);
61
+ }, f = ({ children: n, className: l, ...a }) => {
62
+ const { isForcedOpen: o } = a, { options: u = [] } = E(), s = d(n, f.Option);
63
+ return /* @__PURE__ */ e.createElement(Q, {
64
+ className: l,
65
+ containerPadding: 0,
66
+ offset: 0
67
+ }, /* @__PURE__ */ e.createElement(X, {
68
+ isForcedOpen: o,
69
+ autoFocus: o ? !1 : void 0
70
+ }, u.map((t) => F(s, {
71
+ key: t.value ?? t.label,
72
+ value: t.value ?? t.label,
73
+ label: t.label
74
+ }))));
75
+ }, $ = ({ className: n, ...l }) => {
76
+ const { value: a, label: o } = l;
77
+ return /* @__PURE__ */ e.createElement(H, {
78
+ className: n,
79
+ id: a,
80
+ textValue: o
81
+ }, o);
82
+ };
83
+ f.Option = $;
84
+ r.Label = G;
85
+ r.Trigger = Z;
86
+ r.Options = f;
87
+ r.Description = Y;
88
+ r.Error = z;
89
+ export {
90
+ r as D
91
+ };