@wix/form-elements 1.90.0 → 1.92.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 (111) hide show
  1. package/dist/component/{appointment-rac-DtPa-JZ9.js → appointment-rac-bw0pvoxP.js} +4 -4
  2. package/dist/component/{bookings-address-rac-4l8kqoLi.js → bookings-address-rac-DECq7eWR.js} +1 -1
  3. package/dist/component/{bookings-email-rac-76vUcGtU.js → bookings-email-rac-DTLjh6Zw.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-IS7LUMxg.js → bookings-first-name-rac-DObRe-Gq.js} +1 -1
  5. package/dist/component/{bookings-header-rac-2wTzY64_.js → bookings-header-rac-DjpmYRJG.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-nxA75igv.js → bookings-last-name-rac-Ds3o0ABM.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-CRi1nntD.js → bookings-login-bar-rac-DPUL2jWj.js} +1 -1
  8. package/dist/component/{bookings-phone-rac-DZjvHly0.js → bookings-phone-rac-DIIHPxEP.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-CYn1wwYQ.js → bookings-rich-text-rac-BrcQO9xx.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-DAcFLQNT.js → checkbox-field-rac-CD1MP1LT.js} +4 -4
  11. package/dist/component/{checkbox-group-field-headless-BJmS0Ce5.js → checkbox-group-field-headless-C0V6zq0u.js} +3 -3
  12. package/dist/component/{checkbox-group-field-rac-CeFUt2Nr.js → checkbox-group-field-rac-B-MYpz53.js} +3 -3
  13. package/dist/component/{checkbox-group-rac-eDChVoVP.js → checkbox-group-rac-BejQjiO2.js} +1 -1
  14. package/dist/component/{checkbox-rac-DGmZdPnl.js → checkbox-rac-B0YgCj29.js} +1 -1
  15. package/dist/component/{contacts-address-rac-CGS83PMu.js → contacts-address-rac-B1QNl3Lb.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-DkP-7tZ9.js → contacts-birthdate-rac-Cp-gh3P-.js} +1 -1
  17. package/dist/component/{contacts-company-rac-D_KYvkYe.js → contacts-company-rac-CSCU7JGm.js} +1 -1
  18. package/dist/component/{contacts-email-rac-4lGD56E8.js → contacts-email-rac-B1Oov6-3.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-C5L3U9QV.js → contacts-first-name-rac-rsHIOcjr.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-SL3FSAhE.js → contacts-last-name-rac-Csgq53Wm.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-DkUwJ56_.js → contacts-phone-rac-r9SwjDZ4.js} +1 -1
  22. package/dist/component/{contacts-position-rac-CeKJ5oJh.js → contacts-position-rac-D7VcCM7v.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-Bjldz7ed.js → contacts-subscribe-rac-8Nu9ncZW.js} +1 -1
  24. package/dist/component/{contacts-tax-id-rac-D8QxyDiU.js → contacts-tax-id-rac-CL_JSl_W.js} +1 -1
  25. package/dist/component/{date-availability-DdMI-zNj.js → date-availability-DLOKY9C4.js} +1 -1
  26. package/dist/component/date-input-field-rac-D23Al-Mr.js +292 -0
  27. package/dist/component/{date-input-rac-tlmhXr4A.js → date-input-rac-B6zgkw-L.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-ClNfMoR1.js → date-picker-field-rac-BqdzPPzK.js} +4 -4
  29. package/dist/component/{date-picker-rac-BV3TGjsx.js → date-picker-rac-C7g6aceb.js} +1 -1
  30. package/dist/component/date-time-input-field-rac-BENzf6gc.js +428 -0
  31. package/dist/component/{date-time-input-rac-DQk2ylbE.js → date-time-input-rac-CVpK3mgw.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-CBj9Y7Tp.js → dext-checkbox-group-rac-CbEFDD3H.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-C1KI5I2J.js → dext-checkbox-rac-BdtZvn6I.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-D-8Ss0bx.js → dext-date-picker-rac-BAhFvUEx.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-CRnwLBSZ.js → dext-date-time-input-rac-iXMKMwQY.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-BVTEMS0W.js → dext-dropdown-rac-D-NPziZS.js} +1 -1
  37. package/dist/component/{dext-email-rac-CXeM4iQj.js → dext-email-rac-DYSwyB80.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-DMh08cy5.js → dext-number-input-rac-DXx8hgFg.js} +1 -1
  39. package/dist/component/{dext-phone-rac-E1fFjkVW.js → dext-phone-rac-BtuLROzm.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-_BhRzFAr.js → dext-radio-group-rac-MdKNiJ2i.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-BRYVQOYw.js → dext-rating-input-rac-d998xond.js} +1 -1
  42. package/dist/component/{dext-tags-rac-C4iwtRcw.js → dext-tags-rac-DnSpOM9T.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-CQ1KAhkU.js → dext-text-area-rac-KqjeDDWe.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-xCoKhEt3.js → dext-text-input-rac-CtCnClfX.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-DyoEEa_v.js → dext-url-input-rac-DSJQcLLr.js} +1 -1
  46. package/dist/component/{donation-rac-CSDVxWUj.js → donation-rac-B_KGkBgo.js} +5 -5
  47. package/dist/component/dropdown-field-headless-BUilB8wZ.js +89 -0
  48. package/dist/component/{dropdown-field-rac-D1Z_Jbzd.js → dropdown-field-rac-COupYC1a.js} +2 -2
  49. package/dist/component/{dropdown-rac-BEi7CMKT.js → dropdown-rac-Dj0UZrE0.js} +1 -1
  50. package/dist/component/{ecom-address-rac-DGl7rlwa.js → ecom-address-rac-C0xnn86e.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-D5HzzRQk.js → ecom-subscription-checkbox-rac-D-ekxwUE.js} +2 -2
  52. package/dist/component/{email-input-field-rac-DHAK2K8E.js → email-input-field-rac-DVj1qz_R.js} +3 -3
  53. package/dist/component/{events-repeater-rac-N1mGqD4R.js → events-repeater-rac-U0aq9Z4Q.js} +3 -3
  54. package/dist/component/{events-rsvp-rac-Ds9PnqHG.js → events-rsvp-rac-C7J58_5q.js} +2 -2
  55. package/dist/component/{field-error-headless-9MKScovg.js → field-error-headless-2nYJ2792.js} +1 -1
  56. package/dist/component/{field-label-headless-BaoLrUWJ.js → field-label-headless-D97ACnmc.js} +1 -1
  57. package/dist/component/{file-upload-rac-CNbLRxUz.js → file-upload-rac-BR7QpuPW.js} +3 -3
  58. package/dist/component/{fixed-payment-rac-BFnvUksR.js → fixed-payment-rac-COl18wW1.js} +3 -3
  59. package/dist/component/{form-B3YjGh0T.js → form-DKKTSAj1.js} +1110 -1109
  60. package/dist/component/form.css +1 -1
  61. package/dist/component/form.js +1 -1
  62. package/dist/component/{header-field-rac-64pYqszP.js → header-field-rac-B6DyMG3U.js} +2 -2
  63. package/dist/component/{header-rac-BtPQVL59.js → header-rac-x4H2qMky.js} +1 -1
  64. package/dist/component/{image-choice-rac-BsojUR1h.js → image-choice-rac-BVgmKTKk.js} +4 -4
  65. package/dist/component/{index-CtiBRBqZ.js → index-C47UMGhd.js} +4 -4
  66. package/dist/component/{index-f2JBxCTd.js → index-DnpqBcg5.js} +2 -2
  67. package/dist/component/{isObjectLike-BgqHLNgn.js → isObjectLike-BrrFBP4f.js} +1 -1
  68. package/dist/component/multiline-address-field-rac-B6ka-2Wy.js +1630 -0
  69. package/dist/component/{multiline-address-rac-CkOPWXfI.js → multiline-address-rac-Bh58qUEe.js} +1 -1
  70. package/dist/component/{number-input-field-rac-B7U_08UK.js → number-input-field-rac-pAmxvk3A.js} +4 -4
  71. package/dist/component/{number-input-rac-1jcchySg.js → number-input-rac-mKA2njIU.js} +1 -1
  72. package/dist/component/{password-rac-CAaV8OrL.js → password-rac-BbD7PQXO.js} +4 -4
  73. package/dist/component/{payment-input-rac-B3Knhzrz.js → payment-input-rac-UdkwC1ek.js} +4 -4
  74. package/dist/component/phone-input-field-rac-BVLVVDTq.js +487 -0
  75. package/dist/component/{phone-rac-BUAW-44w.js → phone-rac-LixcB9WV.js} +1 -1
  76. package/dist/component/{product-list-rac-C7Nq3ZG4.js → product-list-rac-B_dL1Ov-.js} +4 -4
  77. package/dist/component/{quiz-radio-group-rac-CRa3I_NR.js → quiz-radio-group-rac-Bj5XfqNf.js} +1 -1
  78. package/dist/component/{radio-button-module-classes-BEvf741q.js → radio-button-module-classes-y_PtsZPP.js} +3 -3
  79. package/dist/component/{radio-group-field-rac-BYTXrpnE.js → radio-group-field-rac-C8OElNAQ.js} +3 -3
  80. package/dist/component/{radio-group-rac-138JrIhm.js → radio-group-rac-BqJFboHE.js} +1 -1
  81. package/dist/component/{rating-input-field-rac-D5pOVdFJ.js → rating-input-field-rac-C9_ITvEh.js} +4 -4
  82. package/dist/component/{rating-input-rac-DuK1q9JB.js → rating-input-rac-CvTpEUoU.js} +1 -1
  83. package/dist/component/{rich-content-rac.module-H3hPgDtD.js → rich-content-rac.module-D4pEN-TY.js} +1 -1
  84. package/dist/component/{rich-text-field-rac-Btwqm4wb.js → rich-text-field-rac-B8cqCmaf.js} +2 -2
  85. package/dist/component/{rich-text-rac-DIu8StCg.js → rich-text-rac-C1o-tfXG.js} +1 -1
  86. package/dist/component/{service-dropdown-rac-N8jqoUC_.js → service-dropdown-rac-BOXqB2aq.js} +4 -4
  87. package/dist/component/{services-multi-choice-rac-DlP0tB9d.js → services-multi-choice-rac-Dk4rz-fw.js} +5 -5
  88. package/dist/component/{signature-rac-DuRzxIkO.js → signature-rac-h9GWVdez.js} +3 -3
  89. package/dist/component/{submit-button-rac-DFmPp4jT.js → submit-button-rac-qNaTyCxd.js} +1 -1
  90. package/dist/component/{tags-field-rac-DIgyn5P9.js → tags-field-rac-NMRn0YnW.js} +5 -5
  91. package/dist/component/{tags-rac-C6R6RHl2.js → tags-rac-DGx4KxEn.js} +1 -1
  92. package/dist/component/{text-area-field-rac-opBEx_8s.js → text-area-field-rac-C7u0D4l3.js} +4 -4
  93. package/dist/component/{text-area-rac-D4iKhAqc.js → text-area-rac-Yo-RIyLm.js} +1 -1
  94. package/dist/component/{text-input-field-rac-Ckp8Ierz.js → text-input-field-rac-CvU-1clq.js} +2 -2
  95. package/dist/component/{text-input-headless-D-LXpqS3.js → text-input-headless-DLRwVmwf.js} +3 -3
  96. package/dist/component/{text-input-rac-ChxuJj-q.js → text-input-rac-CWh5xjZA.js} +1 -1
  97. package/dist/component/{time-input-rac-C5_rEy7W.js → time-input-rac-BZlso9qK.js} +4 -4
  98. package/dist/component/{url-input-field-rac-CBOnhquz.js → url-input-field-rac-Bax0TB4Q.js} +4 -4
  99. package/dist/component/{url-input-rac-BY-BVg6r.js → url-input-rac-Bw2nfybR.js} +1 -1
  100. package/dist/component/use-dropdown-option-class-name-vKSagp3b.js +57 -0
  101. package/dist/component/{use-element-state-class-name--YLulmsU.js → use-element-state-class-name-C0zLrsDR.js} +1 -1
  102. package/dist/component/{use-service-options-base-BNLFmnHJ.js → use-service-options-base-Bkj6BSQL.js} +1 -1
  103. package/dist/component/{use-text-input-class-name-3Xp-hNDT.js → use-text-input-class-name-Biu89Ma7.js} +2 -2
  104. package/dist/form.d.ts +15 -7
  105. package/package.json +23 -22
  106. package/dist/component/date-input-field-rac-Da6j7OP2.js +0 -288
  107. package/dist/component/date-time-input-field-rac-5eHyKry0.js +0 -424
  108. package/dist/component/dropdown-field-headless-BXyP9KYi.js +0 -101
  109. package/dist/component/multiline-address-field-rac-CH1hCUTf.js +0 -1618
  110. package/dist/component/phone-input-field-rac-BGsvxtXz.js +0 -474
  111. package/dist/component/use-dropdown-option-class-name-C1iEE28P.js +0 -28
@@ -0,0 +1,428 @@
1
+ import { RicosViewer as se } from "@wix/ricos/viewer";
2
+ import p from "classnames";
3
+ import t, { useMemo as T, useState as $, useCallback as w, useRef as G, useContext as oe } from "react";
4
+ import { ak as b, ah as j, ac as x, K as W, a2 as J, s as d, au as L, a6 as K, Q as le, y as ie, a9 as ce, z as Q, am as U } from "./form-DKKTSAj1.js";
5
+ import { parseTime as me } from "@internationalized/date";
6
+ import { UNSAFE_PortalProvider as de } from "react-aria";
7
+ import { ListBoxItem as ue, ListBox as pe, Select as Ee, TextField as X, TimeField as fe, SelectValue as he, Input as Z, DateInput as be, DateSegment as k, TimeFieldStateContext as ge } from "react-aria-components";
8
+ import { f as u, a as P } from "./find-child-C60k4CxG.js";
9
+ import { g as Ie } from "./helpers-HmkkXrh2.js";
10
+ import { D as _e, E as De } from "./field-error-headless-2nYJ2792.js";
11
+ import { L as Ne } from "./field-label-headless-D97ACnmc.js";
12
+ import { F as ye } from "./fieldset-headless-CD3fds9J.js";
13
+ import { N as Oe, S as Te } from "./non-modal-popover-DtIMXHbe.js";
14
+ import { a as Le, u as Fe } from "./use-dropdown-option-class-name-vKSagp3b.js";
15
+ import { C as Ce } from "./chevron-down-icon-CcpVm6B-.js";
16
+ import { E as Pe } from "./error-icon-hZxQ6DEy.js";
17
+ import { H } from "./custom-focus-class-_483Pkwp.js";
18
+ import { s as h } from "./field-rac.module-BUvPquav.js";
19
+ import { B as S, R as Me, m as ve, D as Se, q as Re, i as Ae } from "./form-element-classes-CLZXu-91.js";
20
+ import { u as z } from "./use-text-input-class-name-Biu89Ma7.js";
21
+ const l = ({ children: e, className: a }) => {
22
+ const { id: n, required: o, onBlur: s, onFocus: r, FieldLayout: i } = b(), { inputId: m, labelId: c, ariaDescribedBy: g } = j(), { regionalFormat: f } = x(), N = T(() => W(f).filter(J).map((v) => v.toUpperCase()), [
23
+ f
24
+ ]), M = u(e, l.Label), V = u(e, l.Description), _ = 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(ye, {
35
+ id: m,
36
+ ariaLabelledBy: c,
37
+ ariaDescribedBy: g,
38
+ required: o,
39
+ onBlur: s,
40
+ onFocus: r,
41
+ className: a
42
+ }, D[N[0]], D[N[1]], D[N[2]], y),
43
+ renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, _, V)
44
+ });
45
+ }, F = ({ children: e, className: a }) => {
46
+ const { id: n, disabled: o, readOnly: s, showDateLabels: r, hidePlaceholder: i } = b(), { labelId: m } = O(d.MONTH), { partValue: c, partError: g, onPartChange: f } = C(d.MONTH), { t: N } = L(), [M, V] = $(!1), _ = Le(n), [D, y] = $(null), v = i ? void 0 : N("field.date.placeholder.month"), ee = w((Y) => {
47
+ s || f(typeof Y == "string" ? Y : "");
48
+ }, [
49
+ f,
50
+ s
51
+ ]), te = w((Y) => {
52
+ V(Y && !s);
53
+ }, [
54
+ s
55
+ ]), ae = u(e, F.Label), ne = u(e, F.Trigger), re = u(e, F.Options);
56
+ return /* @__PURE__ */ t.createElement("div", {
57
+ className: a,
58
+ "data-date-field": !0
59
+ }, r ? ae : null, /* @__PURE__ */ t.createElement("div", {
60
+ ref: y,
61
+ style: {
62
+ display: "contents"
63
+ }
64
+ }), /* @__PURE__ */ t.createElement(de, {
65
+ getContainer: () => D
66
+ }, /* @__PURE__ */ t.createElement(Ee, {
67
+ "aria-labelledby": r ? m : void 0,
68
+ value: c || null,
69
+ onChange: ee,
70
+ isDisabled: o,
71
+ isInvalid: g,
72
+ placeholder: v,
73
+ isOpen: _ || M,
74
+ onOpenChange: _ ? void 0 : te
75
+ }, ne, P(re, {
76
+ isForcedOpen: _
77
+ }))));
78
+ }, Ve = ({ className: e }) => /* @__PURE__ */ t.createElement(q, {
79
+ datePart: d.MONTH,
80
+ className: e
81
+ }), Ye = ({ children: e, className: a }) => {
82
+ const { id: n, readOnly: o } = b(), { inputId: s } = O(d.MONTH), { partError: r, isFirstPart: i } = C(d.MONTH), m = G(null);
83
+ return U(() => {
84
+ var c;
85
+ i && ((c = m.current) == null || c.focus());
86
+ }, n), /* @__PURE__ */ t.createElement(Te, {
87
+ ref: m,
88
+ id: s,
89
+ className: a,
90
+ "data-hook": d.MONTH,
91
+ "data-invalid": r || void 0,
92
+ "data-readonly": o || void 0
93
+ }, /* @__PURE__ */ t.createElement(he, null), e);
94
+ }, B = ({ children: e, className: a, ...n }) => {
95
+ const { isForcedOpen: o } = n, { language: s } = x(), r = T(() => Ie(s), [
96
+ s
97
+ ]), i = u(e, B.Option) ?? /* @__PURE__ */ t.createElement(B.Option, null);
98
+ return /* @__PURE__ */ t.createElement(Oe, {
99
+ className: a,
100
+ containerPadding: 0,
101
+ offset: 0
102
+ }, /* @__PURE__ */ t.createElement(pe, {
103
+ autoFocus: o ? !1 : void 0
104
+ }, r.map((m, c) => P(i, {
105
+ key: String(c + 1),
106
+ value: String(c + 1),
107
+ label: m
108
+ }))));
109
+ }, He = ({ className: e, ...a }) => {
110
+ const { value: n, label: o } = a;
111
+ return /* @__PURE__ */ t.createElement(ue, {
112
+ className: e,
113
+ id: n,
114
+ textValue: o
115
+ }, o);
116
+ };
117
+ F.Label = Ve;
118
+ F.Trigger = Ye;
119
+ F.Options = B;
120
+ B.Option = He;
121
+ const R = ({ children: e, className: a }) => {
122
+ const { disabled: n, readOnly: o, showDateLabels: s } = b(), { labelId: r } = O(d.DAY), { partValue: i, partError: m, onPartChange: c } = C(d.DAY), g = u(e, R.Label), f = u(e, R.Input);
123
+ return /* @__PURE__ */ t.createElement("div", {
124
+ className: a,
125
+ "data-date-field": !0
126
+ }, s && g, /* @__PURE__ */ t.createElement(X, {
127
+ "aria-labelledby": s ? r : void 0,
128
+ value: i,
129
+ onChange: c,
130
+ isDisabled: n,
131
+ isReadOnly: o,
132
+ isInvalid: m
133
+ }, f));
134
+ }, we = ({ className: e }) => /* @__PURE__ */ t.createElement(q, {
135
+ datePart: d.DAY,
136
+ className: e
137
+ }), Be = ({ className: e }) => {
138
+ const { id: a, hidePlaceholder: n } = b(), { inputId: o } = O(d.DAY), { isFirstPart: s } = C(d.DAY), { t: r } = L(), i = G(null), m = n ? void 0 : r("field.date.placeholder.day");
139
+ return U(() => {
140
+ var c;
141
+ s && ((c = i.current) == null || c.focus());
142
+ }, a), /* @__PURE__ */ t.createElement(Z, {
143
+ ref: i,
144
+ id: o,
145
+ className: e,
146
+ placeholder: m,
147
+ maxLength: 2,
148
+ inputMode: "numeric",
149
+ "data-hook": d.DAY
150
+ });
151
+ };
152
+ R.Label = we;
153
+ R.Input = Be;
154
+ const A = ({ children: e, className: a }) => {
155
+ const { disabled: n, readOnly: o, showDateLabels: s } = b(), { labelId: r } = O(d.YEAR), { partValue: i, partError: m, onPartChange: c } = C(d.YEAR), g = u(e, A.Label), f = u(e, A.Input);
156
+ return /* @__PURE__ */ t.createElement("div", {
157
+ className: a,
158
+ "data-date-field": !0
159
+ }, s && g, /* @__PURE__ */ t.createElement(X, {
160
+ "aria-labelledby": s ? r : void 0,
161
+ value: i,
162
+ onChange: c,
163
+ isDisabled: n,
164
+ isReadOnly: o,
165
+ isInvalid: m
166
+ }, f));
167
+ }, xe = ({ className: e }) => /* @__PURE__ */ t.createElement(q, {
168
+ datePart: d.YEAR,
169
+ className: e
170
+ }), ke = ({ className: e }) => {
171
+ const { id: a, hidePlaceholder: n } = b(), { inputId: o } = O(d.YEAR), { isFirstPart: s } = C(d.YEAR), { t: r } = L(), i = G(null), m = n ? void 0 : r("field.date.placeholder.year");
172
+ return U(() => {
173
+ var c;
174
+ s && ((c = i.current) == null || c.focus());
175
+ }, a), /* @__PURE__ */ t.createElement(Z, {
176
+ ref: i,
177
+ id: o,
178
+ className: e,
179
+ placeholder: m,
180
+ maxLength: 4,
181
+ inputMode: "numeric",
182
+ "data-hook": d.YEAR
183
+ });
184
+ };
185
+ A.Label = xe;
186
+ A.Input = ke;
187
+ const I = ({ children: e, className: a }) => {
188
+ const { disabled: n, readOnly: o, use24HourFormat: s, showDateLabels: r } = b(), { labelId: i } = O("time"), { partValue: m, partError: c, onPartChange: g } = C("time"), f = u(e, I.Label), N = u(e, I.Input);
189
+ return /* @__PURE__ */ t.createElement("div", {
190
+ className: a,
191
+ "data-date-field": !0
192
+ }, r && f, /* @__PURE__ */ t.createElement(fe, {
193
+ "aria-labelledby": r ? i : void 0,
194
+ value: m,
195
+ onChange: g,
196
+ isDisabled: n,
197
+ isReadOnly: o,
198
+ isInvalid: c,
199
+ hourCycle: s ? 24 : 12
200
+ }, N));
201
+ }, ze = ({ className: e }) => {
202
+ const { inputId: a, labelId: n } = O("time"), { t: o } = L(), s = o("field.date.label.time");
203
+ return /* @__PURE__ */ t.createElement("label", {
204
+ id: n,
205
+ htmlFor: a,
206
+ className: e
207
+ }, s);
208
+ }, Ge = ({ children: e, className: a }) => {
209
+ const n = u(e, I.Hour), o = u(e, I.Minute), s = u(e, I.Period);
210
+ return /* @__PURE__ */ t.createElement(be, {
211
+ className: a,
212
+ "data-hook": "time"
213
+ }, (r) => {
214
+ switch (r.type) {
215
+ case "hour":
216
+ return P(n, {
217
+ segment: r
218
+ }) || /* @__PURE__ */ t.createElement(t.Fragment, null);
219
+ case "minute":
220
+ return P(o, {
221
+ segment: r
222
+ }) || /* @__PURE__ */ t.createElement(t.Fragment, null);
223
+ case "dayPeriod":
224
+ return P(s, {
225
+ segment: r
226
+ }) || /* @__PURE__ */ t.createElement(t.Fragment, null);
227
+ case "literal":
228
+ return /* @__PURE__ */ t.createElement(k, {
229
+ segment: r
230
+ });
231
+ default:
232
+ return /* @__PURE__ */ t.createElement(t.Fragment, null);
233
+ }
234
+ });
235
+ }, Ue = ({ className: e, ...a }) => {
236
+ const { hidePlaceholder: n } = b(), { segment: o } = a, { t: s } = L(), r = n ? void 0 : s("field.date.placeholder.hour");
237
+ return /* @__PURE__ */ t.createElement(k, {
238
+ segment: o,
239
+ className: e,
240
+ ...r && {
241
+ placeholder: r
242
+ }
243
+ });
244
+ }, qe = ({ className: e, ...a }) => {
245
+ const { hidePlaceholder: n } = b(), { segment: o } = a, { t: s } = L(), r = n ? void 0 : s("field.date.placeholder.minute");
246
+ return /* @__PURE__ */ t.createElement(k, {
247
+ segment: o,
248
+ className: e,
249
+ ...r && {
250
+ placeholder: r
251
+ }
252
+ });
253
+ }, $e = ({ className: e, ...a }) => {
254
+ const { hidePlaceholder: n } = b(), { segment: o } = a, { t: s } = L(), r = oe(ge), i = n ? void 0 : s("field.date.placeholder.period"), m = () => r == null ? void 0 : r.increment("dayPeriod");
255
+ return /* @__PURE__ */ t.createElement(k, {
256
+ segment: o,
257
+ className: e,
258
+ onClick: m,
259
+ ...i && {
260
+ placeholder: i
261
+ }
262
+ });
263
+ };
264
+ I.Label = ze;
265
+ I.Input = Ge;
266
+ I.Hour = Ue;
267
+ I.Minute = qe;
268
+ I.Period = $e;
269
+ l.Label = Ne;
270
+ l.Month = F;
271
+ l.Day = R;
272
+ l.Year = A;
273
+ l.Time = I;
274
+ l.Description = _e;
275
+ l.Error = De;
276
+ function O(e) {
277
+ const { inputId: a } = j();
278
+ return T(() => {
279
+ const n = e.toLowerCase();
280
+ return {
281
+ inputId: `${a}-${n}-input`,
282
+ labelId: `${a}-${n}-label`
283
+ };
284
+ }, [
285
+ a,
286
+ e
287
+ ]);
288
+ }
289
+ function C(e) {
290
+ const { value: a, onChange: n, hasError: o = !1 } = b(), { regionalFormat: s } = x(), [r, i] = T(() => K(a ?? ""), [
291
+ a
292
+ ]), m = T(() => le(o, a ?? ""), [
293
+ a,
294
+ o
295
+ ]), c = T(() => ie(r), [
296
+ r
297
+ ]), g = T(() => Ke(i), [
298
+ i
299
+ ]), f = w((_) => {
300
+ const D = Qe(_), y = Q(r, D);
301
+ n(y);
302
+ }, [
303
+ n,
304
+ r
305
+ ]), N = w((_) => {
306
+ const [, D] = K(a ?? ""), y = ce(_, e, c), v = Q(y, D);
307
+ n(v);
308
+ }, [
309
+ n,
310
+ a,
311
+ c,
312
+ e
313
+ ]), M = T(() => e === "time" ? !1 : W(s).filter(J).map((y) => y.toUpperCase())[0] === e, [
314
+ s,
315
+ e
316
+ ]);
317
+ return e === "time" ? {
318
+ partValue: g,
319
+ partError: m.TIME,
320
+ onPartChange: f,
321
+ isFirstPart: !1
322
+ } : {
323
+ partValue: c[e] || "",
324
+ partError: m[e],
325
+ onPartChange: N,
326
+ isFirstPart: M
327
+ };
328
+ }
329
+ function q({ datePart: e, className: a }) {
330
+ const { inputId: n, labelId: o } = O(e), { t: s } = L(), r = `field.date.label.${e.toLowerCase()}`, i = s(r);
331
+ return /* @__PURE__ */ t.createElement("label", {
332
+ id: o,
333
+ htmlFor: n,
334
+ className: a
335
+ }, i);
336
+ }
337
+ function Ke(e) {
338
+ if (!e)
339
+ return null;
340
+ try {
341
+ return me(e);
342
+ } catch {
343
+ return null;
344
+ }
345
+ }
346
+ function Qe(e) {
347
+ if (!e)
348
+ return null;
349
+ const a = String(e.hour).padStart(2, "0"), n = String(e.minute).padStart(2, "0"), o = String(e.second).padStart(2, "0");
350
+ return [
351
+ a,
352
+ n,
353
+ o
354
+ ].join(":");
355
+ }
356
+ const je = "_fields_1svr5_1", We = "_month_1svr5_10", Je = "_day_1svr5_11", Xe = "_year_1svr5_12", Ze = "_timeGroup_1svr5_13", et = "_mobile_1svr5_32", tt = "_dayInput_1svr5_45", at = "_yearInput_1svr5_46", nt = "_monthTrigger_1svr5_50", rt = "_monthOption_1svr5_70", st = "_time_1svr5_13", ot = "_hour_1svr5_89", lt = "_minute_1svr5_90", it = "_period_1svr5_91", E = {
357
+ fields: je,
358
+ month: We,
359
+ day: Je,
360
+ year: Xe,
361
+ timeGroup: Ze,
362
+ mobile: et,
363
+ dayInput: tt,
364
+ yearInput: at,
365
+ monthTrigger: nt,
366
+ monthOption: rt,
367
+ time: st,
368
+ hour: ot,
369
+ minute: lt,
370
+ period: it
371
+ }, ct = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(se, {
372
+ content: e,
373
+ locale: a
374
+ }), Mt = () => {
375
+ const e = Fe(E.monthOption, H), { isMobile: a } = x(), n = z(E.dayInput), o = z(E.yearInput), s = z(E.time);
376
+ return /* @__PURE__ */ t.createElement(l, {
377
+ className: p(E.fields, {
378
+ [E.mobile]: a
379
+ })
380
+ }, /* @__PURE__ */ t.createElement(l.Label, {
381
+ className: p(S, h.label)
382
+ }, /* @__PURE__ */ t.createElement(l.Label.Required, {
383
+ className: p(Me, h.requiredMark)
384
+ })), /* @__PURE__ */ t.createElement(l.Month, {
385
+ className: E.month
386
+ }, /* @__PURE__ */ t.createElement(l.Month.Label, {
387
+ className: p(S, h.label)
388
+ }), /* @__PURE__ */ t.createElement(l.Month.Trigger, {
389
+ className: p(ve, h.input, E.monthTrigger)
390
+ }, /* @__PURE__ */ t.createElement(Ce, {
391
+ className: h.dropdownIcon
392
+ })), /* @__PURE__ */ t.createElement(l.Month.Options, {
393
+ className: p(Se, h.selectPopover, h.dropdownPopover)
394
+ }, /* @__PURE__ */ t.createElement(l.Month.Options.Option, {
395
+ className: e
396
+ }))), /* @__PURE__ */ t.createElement(l.Day, {
397
+ className: E.day
398
+ }, /* @__PURE__ */ t.createElement(l.Day.Label, {
399
+ className: p(S, h.label)
400
+ }), /* @__PURE__ */ t.createElement(l.Day.Input, {
401
+ className: n
402
+ })), /* @__PURE__ */ t.createElement(l.Year, {
403
+ className: E.year
404
+ }, /* @__PURE__ */ t.createElement(l.Year.Label, {
405
+ className: p(S, h.label)
406
+ }), /* @__PURE__ */ t.createElement(l.Year.Input, {
407
+ className: o
408
+ })), /* @__PURE__ */ t.createElement(l.Time, {
409
+ className: E.timeGroup
410
+ }, /* @__PURE__ */ t.createElement(l.Time.Label, {
411
+ className: p(S, h.label)
412
+ }), /* @__PURE__ */ t.createElement(l.Time.Input, {
413
+ className: s
414
+ }, /* @__PURE__ */ t.createElement(l.Time.Hour, {
415
+ className: p(E.hour, H)
416
+ }), /* @__PURE__ */ t.createElement(l.Time.Minute, {
417
+ className: p(E.minute, H)
418
+ }), /* @__PURE__ */ t.createElement(l.Time.Period, {
419
+ className: p(E.period, H)
420
+ }))), /* @__PURE__ */ t.createElement(l.Error, {
421
+ className: p(Re, h.error)
422
+ }, /* @__PURE__ */ t.createElement(Pe, null), /* @__PURE__ */ t.createElement(l.Error.Text, null)), /* @__PURE__ */ t.createElement(l.Description, {
423
+ className: p(Ae, h.description)
424
+ }, ct));
425
+ };
426
+ export {
427
+ Mt as D
428
+ };
@@ -1,5 +1,5 @@
1
1
  import e from "react";
2
- import { D as t } from "./date-time-input-field-rac-5eHyKry0.js";
2
+ import { D as t } from "./date-time-input-field-rac-BENzf6gc.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 { ak as e, h as t } from "./form-B3YjGh0T.js";
3
- import { C as p } from "./checkbox-group-field-rac-CeFUt2Nr.js";
2
+ import { ak as e, h as t } from "./form-DKKTSAj1.js";
3
+ import { C as p } from "./checkbox-group-field-rac-B-MYpz53.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-DAcFLQNT.js";
2
+ import { C as t } from "./checkbox-field-rac-CD1MP1LT.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-ClNfMoR1.js";
2
+ import { D as t } from "./date-picker-field-rac-BqdzPPzK.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-5eHyKry0.js";
2
+ import { D as t } from "./date-time-input-field-rac-BENzf6gc.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-D1Z_Jbzd.js";
2
+ import { D as r } from "./dropdown-field-rac-COupYC1a.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-DHAK2K8E.js";
2
+ import { E as e } from "./email-input-field-rac-DVj1qz_R.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-B7U_08UK.js";
2
+ import { N as t } from "./number-input-field-rac-pAmxvk3A.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-BGsvxtXz.js";
2
+ import { P as t } from "./phone-input-field-rac-BVLVVDTq.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 { ak as e, h as t } from "./form-B3YjGh0T.js";
3
- import { R as p } from "./radio-group-field-rac-BYTXrpnE.js";
2
+ import { ak as e, h as t } from "./form-DKKTSAj1.js";
3
+ import { R as p } from "./radio-group-field-rac-C8OElNAQ.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-D5pOVdFJ.js";
2
+ import { R as e } from "./rating-input-field-rac-C9_ITvEh.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 { ak as e, h as o } from "./form-B3YjGh0T.js";
3
- import { T as s } from "./tags-field-rac-DIgyn5P9.js";
2
+ import { ak as e, h as o } from "./form-DKKTSAj1.js";
3
+ import { T as s } from "./tags-field-rac-NMRn0YnW.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-opBEx_8s.js";
2
+ import { T as t } from "./text-area-field-rac-C7u0D4l3.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-Ckp8Ierz.js";
2
+ import { T as e } from "./text-input-field-rac-CvU-1clq.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-CBOnhquz.js";
2
+ import { U as r } from "./url-input-field-rac-Bax0TB4Q.js";
3
3
  const n = () => /* @__PURE__ */ t.createElement(r, null);
4
4
  export {
5
5
  n as DextUrlInputRAC
@@ -3,11 +3,11 @@ 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 { P as Q, ak as L, ah as B, au as ue, ac as A, am as me } from "./form-B3YjGh0T.js";
6
+ import { P as Q, ak as L, ah as B, au as ue, ac as A, am as me } from "./form-DKKTSAj1.js";
7
7
  import { f, a as y } from "./find-child-C60k4CxG.js";
8
8
  import { a as W } from "./format-currency-BwShJ9vM.js";
9
- import { D as pe, E as de } from "./field-error-headless-9MKScovg.js";
10
- import { L as Ce } from "./field-label-headless-BaoLrUWJ.js";
9
+ import { D as pe, E as de } from "./field-error-headless-2nYJ2792.js";
10
+ import { L as Ce } from "./field-label-headless-D97ACnmc.js";
11
11
  import { N as Ie } from "./options-layout-constants-DEfIEJWD.js";
12
12
  import { a as Ee, b as fe } from "./numeric-input-utils-CuBMi4-a.js";
13
13
  import { g as Oe } from "./payment-field-utils-DobiK5Xh.js";
@@ -16,8 +16,8 @@ import { E as _e } from "./error-icon-hZxQ6DEy.js";
16
16
  import { s as R } from "./field-rac.module-BUvPquav.js";
17
17
  import { B as be, R as ye, j as Ne, q as ge, i as Fe, k as De } from "./form-element-classes-CLZXu-91.js";
18
18
  import { o as Re } from "./options-rac.module-KM-VT_KY.js";
19
- import { u as Se } from "./use-element-state-class-name--YLulmsU.js";
20
- import { u as ve } from "./use-text-input-class-name-3Xp-hNDT.js";
19
+ import { u as Se } from "./use-element-state-class-name-C0zLrsDR.js";
20
+ import { u as ve } from "./use-text-input-class-name-Biu89Ma7.js";
21
21
  function Le(e, t) {
22
22
  return e.reduce((o, r) => (o[r[t]] = r, o), {});
23
23
  }
@@ -0,0 +1,89 @@
1
+ import e, { useState as g, useCallback as b, useRef as A } from "react";
2
+ import { UNSAFE_PortalProvider as M } from "react-aria";
3
+ import { Select as U, SelectValue as _, ListBox as j, ListBoxItem as z } from "react-aria-components";
4
+ import { ak as f, ah as O, am as G } from "./form-DKKTSAj1.js";
5
+ import { f as d, a as F } from "./find-child-C60k4CxG.js";
6
+ import { D as H, E as J } from "./field-error-headless-2nYJ2792.js";
7
+ import { L as K } from "./field-label-headless-D97ACnmc.js";
8
+ import { S as Q, N as W } from "./non-modal-popover-DtIMXHbe.js";
9
+ import { a as X } from "./use-dropdown-option-class-name-vKSagp3b.js";
10
+ const r = ({ children: n }) => {
11
+ const { id: l, value: a, defaultValue: s, options: u = [], readOnly: o, onChange: t, placeholder: m, disabled: i, required: v, onBlur: y, onFocus: D, FieldLayout: h, hasError: C } = f(), [I, L] = g(!1), p = X(l), [B, N] = g(null), P = a && u.some((c) => (c.value ?? c.label) === a) ? a : s || null, { labelId: S } = O(), T = b((c) => {
12
+ o || t(typeof c == "string" ? c : null);
13
+ }, [
14
+ t,
15
+ o
16
+ ]), x = b((c) => L(c && !i && !o), [
17
+ i,
18
+ o
19
+ ]), V = d(n, r.Label), k = d(n, r.Trigger), R = d(n, r.Options), q = d(n, r.Description), w = d(n, r.Error);
20
+ return /* @__PURE__ */ e.createElement(h, {
21
+ fieldId: l,
22
+ renderLabel: () => V,
23
+ renderInput: () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", {
24
+ ref: N,
25
+ style: {
26
+ display: "contents"
27
+ }
28
+ }), /* @__PURE__ */ e.createElement(M, {
29
+ getContainer: () => B
30
+ }, /* @__PURE__ */ e.createElement(U, {
31
+ "aria-labelledby": S,
32
+ value: P,
33
+ isOpen: p || I && !i && !o,
34
+ onOpenChange: p ? void 0 : x,
35
+ onChange: T,
36
+ isDisabled: i,
37
+ isInvalid: C,
38
+ isRequired: v,
39
+ placeholder: m,
40
+ onBlur: y,
41
+ onFocus: D
42
+ }, k, F(R, {
43
+ isForcedOpen: p
44
+ })))),
45
+ renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, w, q)
46
+ });
47
+ }, Y = ({ children: n, className: l }) => {
48
+ const { inputId: a, ariaDescribedBy: s } = O(), { id: u, hasError: o, isLoading: t } = f(), m = A(null);
49
+ return G(() => {
50
+ var i;
51
+ (i = m.current) == null || i.focus();
52
+ }, u), /* @__PURE__ */ e.createElement(Q, {
53
+ ref: m,
54
+ id: a,
55
+ "aria-describedby": s,
56
+ className: l,
57
+ "data-invalid": o || void 0,
58
+ "data-loading": t || void 0
59
+ }, /* @__PURE__ */ e.createElement(_, null), n);
60
+ }, E = ({ children: n, className: l, ...a }) => {
61
+ const { isForcedOpen: s } = a, { options: u = [] } = f(), o = d(n, E.Option);
62
+ return /* @__PURE__ */ e.createElement(W, {
63
+ className: l,
64
+ containerPadding: 0,
65
+ offset: 0
66
+ }, /* @__PURE__ */ e.createElement(j, {
67
+ autoFocus: s ? !1 : void 0
68
+ }, u.map((t) => F(o, {
69
+ key: t.value ?? t.label,
70
+ value: t.value ?? t.label,
71
+ label: t.label
72
+ }))));
73
+ }, Z = ({ className: n, ...l }) => {
74
+ const { value: a, label: s } = l;
75
+ return /* @__PURE__ */ e.createElement(z, {
76
+ className: n,
77
+ id: a,
78
+ textValue: s
79
+ }, s);
80
+ };
81
+ E.Option = Z;
82
+ r.Label = K;
83
+ r.Trigger = Y;
84
+ r.Options = E;
85
+ r.Description = H;
86
+ r.Error = J;
87
+ export {
88
+ r as D
89
+ };