@wix/form-elements 1.224.0 → 1.226.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 (125) hide show
  1. package/dist/component/{appointment-rac-UcRjJTHp.js → appointment-rac-C2ClvRys.js} +5 -5
  2. package/dist/component/{bookings-address-rac-DDjZGEhk.js → bookings-address-rac-CPQjosbZ.js} +1 -1
  3. package/dist/component/{bookings-email-rac-Dy2vh3dy.js → bookings-email-rac-DWvVUcBN.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-fDHMNznn.js → bookings-first-name-rac-_iG2xJiA.js} +1 -1
  5. package/dist/component/{bookings-header-rac-DLOeNNQf.js → bookings-header-rac-BbGm_Z8W.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-Bx19ROVT.js → bookings-last-name-rac-77Z29aHO.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-8FbvPiv1.js → bookings-login-bar-rac-DfqRpARE.js} +1 -1
  8. package/dist/component/{bookings-phone-rac-CvPQgtvq.js → bookings-phone-rac-BKoU7X0X.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-CO8bHRpD.js → bookings-rich-text-rac-DgSN4_f0.js} +1 -1
  10. package/dist/component/calendar-icon-DOeHn3jt.js +19 -0
  11. package/dist/component/{checkbox-field-rac-tzsGw10P.js → checkbox-field-rac-BLJ3Xb7C.js} +6 -6
  12. package/dist/component/{checkbox-group-field-headless-CL18dpkq.js → checkbox-group-field-headless-BeU8DG0A.js} +3 -3
  13. package/dist/component/{checkbox-group-field-rac-BmbxaprJ.js → checkbox-group-field-rac-ClRi6Ljp.js} +6 -6
  14. package/dist/component/{checkbox-group-rac-shsbUvRc.js → checkbox-group-rac--cM57qqw.js} +1 -1
  15. package/dist/component/{checkbox-indicator-module-classes-DOxE4UQg.js → checkbox-indicator-module-classes-Cozvs_kk.js} +1 -1
  16. package/dist/component/{checkbox-rac-CobYYayd.js → checkbox-rac-DnslW6as.js} +1 -1
  17. package/dist/component/{contacts-address-rac-BoDqJCi1.js → contacts-address-rac-Bpq_0vvi.js} +1 -1
  18. package/dist/component/{contacts-birthdate-rac-GAujbm-z.js → contacts-birthdate-rac-CB1h6kRm.js} +1 -1
  19. package/dist/component/{contacts-company-rac-CLcEz04V.js → contacts-company-rac-DvYX4SLX.js} +1 -1
  20. package/dist/component/{contacts-email-rac-D9q7TJwy.js → contacts-email-rac-sxbgKBUR.js} +1 -1
  21. package/dist/component/{contacts-first-name-rac-BAecbeNQ.js → contacts-first-name-rac-C4_o2nwv.js} +1 -1
  22. package/dist/component/{contacts-last-name-rac-Ccrw8BDa.js → contacts-last-name-rac-B3s96wWt.js} +1 -1
  23. package/dist/component/{contacts-phone-rac-DA2N033V.js → contacts-phone-rac-B5NZeYaI.js} +1 -1
  24. package/dist/component/{contacts-position-rac-0lAd-nCW.js → contacts-position-rac-CO4Bo4jG.js} +1 -1
  25. package/dist/component/{contacts-subscribe-rac-DB2ssF-E.js → contacts-subscribe-rac-CWmo3C6c.js} +1 -1
  26. package/dist/component/{contacts-tax-id-rac-B-Sn92Ho.js → contacts-tax-id-rac-pi_bJeA7.js} +1 -1
  27. package/dist/component/{date-availability-CtfWLvii.js → date-availability-DL8Xboob.js} +1 -1
  28. package/dist/component/date-input-field-rac-Di2pwVW7.js +365 -0
  29. package/dist/component/{date-input-rac-BnWwBe2i.js → date-input-rac-C5xC7fbz.js} +1 -1
  30. package/dist/component/date-picker-field-rac-DyPkuVVe.js +386 -0
  31. package/dist/component/{date-picker-rac-BhI6jOQE.js → date-picker-rac-CKNlOGZG.js} +1 -1
  32. package/dist/component/date-time-input-field-rac-Dk15pWyb.js +507 -0
  33. package/dist/component/{date-time-input-rac-DAbopLQt.js → date-time-input-rac-oOUelldq.js} +1 -1
  34. package/dist/component/{dext-checkbox-group-rac-D_HLv0tP.js → dext-checkbox-group-rac--jmNDOV2.js} +2 -2
  35. package/dist/component/{dext-checkbox-rac-BnBTlqEI.js → dext-checkbox-rac-BOjbBRrg.js} +1 -1
  36. package/dist/component/{dext-date-picker-rac-Co_yfhuz.js → dext-date-picker-rac-CHi5TisB.js} +1 -1
  37. package/dist/component/{dext-date-time-input-rac-BSpUehb2.js → dext-date-time-input-rac-CcF4ocHx.js} +1 -1
  38. package/dist/component/{dext-dropdown-rac-DPApx74L.js → dext-dropdown-rac-LLYhuGt_.js} +1 -1
  39. package/dist/component/{dext-email-rac-Dns6jFl4.js → dext-email-rac-CbC1crzT.js} +1 -1
  40. package/dist/component/{dext-number-input-rac-DfN-xRID.js → dext-number-input-rac-3-U9Hxre.js} +1 -1
  41. package/dist/component/{dext-phone-rac-b5Ix3aTQ.js → dext-phone-rac-CdMFXUNf.js} +1 -1
  42. package/dist/component/{dext-radio-group-rac-BAwIkDsJ.js → dext-radio-group-rac-Bg33r95T.js} +2 -2
  43. package/dist/component/{dext-rating-input-rac-mwQpCQUI.js → dext-rating-input-rac-DV8jA90b.js} +1 -1
  44. package/dist/component/{dext-tags-rac-BGmElgw8.js → dext-tags-rac-B-hpvZgE.js} +2 -2
  45. package/dist/component/{dext-text-area-rac-DN5HPqdg.js → dext-text-area-rac-kBBc0Xjo.js} +1 -1
  46. package/dist/component/{dext-text-input-rac-DEyDRhQ2.js → dext-text-input-rac-CImXblhX.js} +1 -1
  47. package/dist/component/{dext-url-input-rac-B1o3BAZE.js → dext-url-input-rac-J-7QABnD.js} +1 -1
  48. package/dist/component/dismiss-icon-Bw_zbdk_.js +69 -0
  49. package/dist/component/{donation-rac-Dp6PmATz.js → donation-rac-CvWwng6S.js} +6 -6
  50. package/dist/component/dropdown-field-rac-Dm9Qs8bh.js +40 -0
  51. package/dist/component/{dropdown-rac-eqQW-Z9k.js → dropdown-rac-BHqeUIje.js} +1 -1
  52. package/dist/component/{ecom-address-rac-Q02N1v6i.js → ecom-address-rac-NtuG7Q_T.js} +1 -1
  53. package/dist/component/{ecom-subscription-checkbox-rac-CmqVje9n.js → ecom-subscription-checkbox-rac-DAJnX_RJ.js} +2 -2
  54. package/dist/component/{email-input-field-rac-HmrdF3g7.js → email-input-field-rac-ompvaCLM.js} +4 -4
  55. package/dist/component/{events-repeater-rac-BSML2My0.js → events-repeater-rac-kHEFBH7l.js} +6 -6
  56. package/dist/component/{events-rsvp-rac-0pI3cb2e.js → events-rsvp-rac-R4F9aw6y.js} +4 -4
  57. package/dist/component/{field-error-headless-B3U_Gymg.js → field-error-headless-o2u5ldAp.js} +1 -1
  58. package/dist/component/{field-label-headless-Cyy9_5qJ.js → field-label-headless-DvNWYzXc.js} +1 -1
  59. package/dist/component/field-rac.module-D0QzJXUv.js +32 -0
  60. package/dist/component/{file-upload-rac-hR9TZqk2.js → file-upload-rac-DlE4dp0D.js} +5 -5
  61. package/dist/component/{fixed-payment-rac-CghZp6bR.js → fixed-payment-rac-BxsFHhXP.js} +4 -4
  62. package/dist/component/{form-BmSV4tOz.js → form-Co7SkMqj.js} +1701 -1688
  63. package/dist/component/form.css +1 -1
  64. package/dist/component/form.js +1 -1
  65. package/dist/component/{header-field-rac-C7LDm89o.js → header-field-rac-D56CKAtM.js} +2 -2
  66. package/dist/component/{header-rac-BNNzF5wQ.js → header-rac-DdYSBcq1.js} +1 -1
  67. package/dist/component/{image-choice-rac-DLgxkKIZ.js → image-choice-rac-g23R5qLL.js} +5 -5
  68. package/dist/component/{index-Dg8Fefid.js → index-BmOwghzn.js} +2 -2
  69. package/dist/component/{index-B8ObIJtL.js → index-C0yPsVXz.js} +4 -4
  70. package/dist/component/{isObjectLike-oBQcCfqW.js → isObjectLike-mlNAmhLJ.js} +1 -1
  71. package/dist/component/multiline-address-field-rac-ApBLSWB_.js +1818 -0
  72. package/dist/component/{multiline-address-rac-8MZkKfqY.js → multiline-address-rac-tdENoXBT.js} +1 -1
  73. package/dist/component/native-select-BbxBpe3S.js +32 -0
  74. package/dist/component/{number-input-field-rac-Dmp8pNIq.js → number-input-field-rac-CCIuPPeP.js} +5 -5
  75. package/dist/component/{number-input-rac-2cN_bN_s.js → number-input-rac-DxodjaRb.js} +1 -1
  76. package/dist/component/{password-rac-CFdC1hoi.js → password-rac-h9U6siGg.js} +5 -5
  77. package/dist/component/{payment-input-rac-BWElGzuv.js → payment-input-rac-YFXgnLS6.js} +5 -5
  78. package/dist/component/phone-input-field-rac-B9PUQJUP.js +558 -0
  79. package/dist/component/{phone-rac-CE9-90C3.js → phone-rac-B1Q9HXAB.js} +1 -1
  80. package/dist/component/{product-list-rac-QU7Ocwvy.js → product-list-rac-D63k_IAW.js} +6 -6
  81. package/dist/component/{quiz-radio-group-rac-Hm7B7RlU.js → quiz-radio-group-rac-Bl6DYjmg.js} +1 -1
  82. package/dist/component/{radio-button-module-classes-CcGF7N_Y.js → radio-button-module-classes-BRHKk6XZ.js} +3 -3
  83. package/dist/component/{radio-group-field-rac-Bk1JBBts.js → radio-group-field-rac-B8yEmx79.js} +5 -5
  84. package/dist/component/{radio-group-rac-D_YZnpID.js → radio-group-rac-xX_sfxL0.js} +1 -1
  85. package/dist/component/{rating-input-field-rac-zvA6QBGo.js → rating-input-field-rac-_p1u5oCL.js} +5 -5
  86. package/dist/component/{rating-input-rac-CXVQUoi-.js → rating-input-rac-C_i6Nwdz.js} +1 -1
  87. package/dist/component/{rich-content-rac.module-CnZ4lMBG.js → rich-content-rac.module-BlHWoitq.js} +1 -1
  88. package/dist/component/{rich-text-field-rac-DYQgVXdV.js → rich-text-field-rac-EiH-NdJm.js} +2 -2
  89. package/dist/component/{rich-text-rac-Dk8396e-.js → rich-text-rac-eZvghmFV.js} +1 -1
  90. package/dist/component/service-dropdown-rac-bujnhWyl.js +150 -0
  91. package/dist/component/{services-multi-choice-rac-D1RiVaLW.js → services-multi-choice-rac-FXrJOBdY.js} +7 -7
  92. package/dist/component/{signature-rac-DcGKMX84.js → signature-rac-CoVHMOpK.js} +5 -5
  93. package/dist/component/{submit-button-rac-DbMxQlNH.js → submit-button-rac-B8w753Be.js} +36 -36
  94. package/dist/component/{tags-field-rac-Bi4lKutL.js → tags-field-rac-iitBlZ8l.js} +6 -6
  95. package/dist/component/{tags-rac-DDCPnT8M.js → tags-rac-DJSUQlkc.js} +1 -1
  96. package/dist/component/{text-area-field-rac-cre_K0MD.js → text-area-field-rac-CePWfCbx.js} +5 -5
  97. package/dist/component/{text-area-rac-61wsMj-j.js → text-area-rac-m18L6Zwk.js} +1 -1
  98. package/dist/component/{text-input-field-rac-CV5_ba0x.js → text-input-field-rac-BSo_dbkm.js} +4 -4
  99. package/dist/component/{text-input-headless-kRv3KpSL.js → text-input-headless-D-o9wyGb.js} +3 -3
  100. package/dist/component/{text-input-rac-CwqZ6NXO.js → text-input-rac-CcGgoWaF.js} +1 -1
  101. package/dist/component/time-input-rac-DRIFM107.js +212 -0
  102. package/dist/component/to-native-time-Co_gOLkc.js +9 -0
  103. package/dist/component/{url-input-field-rac-C1JL_m6D.js → url-input-field-rac-Dpn9-sDD.js} +5 -5
  104. package/dist/component/{url-input-rac-C1CiGrCn.js → url-input-rac-CDSl1LX1.js} +1 -1
  105. package/dist/component/{use-dropdown-option-class-name-COGEk5d6.js → use-dropdown-option-class-name-CHg44uaJ.js} +3 -3
  106. package/dist/component/use-dropdown-trigger-class-name-Dpwl6OCY.js +137 -0
  107. package/dist/component/{use-element-state-class-name-pSOX0Y0p.js → use-element-state-class-name-BUu6zq-d.js} +1 -1
  108. package/dist/component/{use-hoverable-input-class-name-DGEpOAdi.js → use-hoverable-input-class-name-B1V7zCNe.js} +3 -3
  109. package/dist/component/{use-is-forced-open-dropdown-DPG1e5E9.js → use-is-forced-open-dropdown-BbHOZTaj.js} +1 -1
  110. package/dist/component/use-native-mobile-input-Ct8ysLL3.js +31 -0
  111. package/dist/component/use-native-state-class-name-B0m2ghbS.js +18 -0
  112. package/dist/component/{use-service-options-base-BgIZ94V9.js → use-service-options-base-u-WCeJHQ.js} +1 -1
  113. package/dist/component/use-text-input-class-name-DfNU2oQf.js +6 -0
  114. package/package.json +3 -2
  115. package/dist/component/date-input-field-rac-CiAaOiYY.js +0 -309
  116. package/dist/component/date-picker-field-rac-Dg-chlTL.js +0 -320
  117. package/dist/component/date-time-input-field-rac-CbDvEPIp.js +0 -441
  118. package/dist/component/dropdown-field-rac-DY3GGJgP.js +0 -36
  119. package/dist/component/field-rac.module-DcyJyi2B.js +0 -25
  120. package/dist/component/multiline-address-field-rac-CgH7lDce.js +0 -1738
  121. package/dist/component/phone-input-field-rac-CsJGw_OE.js +0 -520
  122. package/dist/component/service-dropdown-rac-BSXYuBPJ.js +0 -145
  123. package/dist/component/time-input-rac-DuQar6zW.js +0 -161
  124. package/dist/component/use-dropdown-trigger-class-name-D6c-3Lyw.js +0 -98
  125. package/dist/component/use-text-input-class-name-BcbHdFV-.js +0 -6
@@ -0,0 +1,386 @@
1
+ import { RicosViewer as ce } from "@wix/ricos/viewer";
2
+ import N from "classnames";
3
+ import e, { useState as $, useCallback as J, useRef as A, useId as ie, Children as me, isValidElement as ue, useContext as de, useMemo as w } from "react";
4
+ import { D as v, bN as S, bK as W, bF as q, bP as Z, bY as ge, X as Ee, am as pe, H as fe, M as Ce, I as De, G } from "./form-Co7SkMqj.js";
5
+ import { parseDate as ye } from "@internationalized/date";
6
+ import { UNSAFE_PortalProvider as Ne, mergeProps as ve } from "react-aria";
7
+ import { I18nProvider as be, DatePicker as Ie, DatePickerStateContext as he, Group as Se, DateInput as _e, DateSegment as Te, Calendar as Pe, CalendarMonthPicker as Oe, CalendarYearPicker as Fe, CalendarGrid as Le, Dialog as Ae, CalendarCell as Re, Button as ee, Select as te, SelectValue as ae, ListBox as re, ListBoxItem as ne } from "react-aria-components";
8
+ import { g as ke, c as j } from "./calendar.module-BMUyMVja.js";
9
+ import { f as E, a as h } from "./find-child-C60k4CxG.js";
10
+ import { D as Me, E as xe } from "./field-error-headless-o2u5ldAp.js";
11
+ import { L as Be } from "./field-label-headless-DvNWYzXc.js";
12
+ import { u as Ye, a as Ve, N as Ue, D as we } from "./dismiss-icon-Bw_zbdk_.js";
13
+ import { u as Ke, N as We } from "./use-native-mobile-input-Ct8ysLL3.js";
14
+ import { D as qe, N as H, S as le } from "./non-modal-popover-D-u13tmp.js";
15
+ import { t as He, C as Q } from "./calendar-icon-DOeHn3jt.js";
16
+ import { a as $e } from "./use-is-forced-open-dropdown-BbHOZTaj.js";
17
+ import { u as Ge } from "./use-native-state-class-name-B0m2ghbS.js";
18
+ import { i as je } from "./date-availability-DL8Xboob.js";
19
+ import { C as K } from "./chevron-down-icon-CcpVm6B-.js";
20
+ import { E as Qe } from "./error-icon-hZxQ6DEy.js";
21
+ import { H as Xe } from "./custom-focus-class-_483Pkwp.js";
22
+ import { s as g } from "./field-rac.module-D0QzJXUv.js";
23
+ import { u as X } from "./use-hoverable-input-class-name-B1V7zCNe.js";
24
+ const oe = [
25
+ v.SUNDAY,
26
+ v.MONDAY,
27
+ v.TUESDAY,
28
+ v.WEDNESDAY,
29
+ v.THURSDAY,
30
+ v.FRIDAY,
31
+ v.SATURDAY
32
+ ], ze = {
33
+ availableDays: oe
34
+ }, Je = (t) => {
35
+ if (!t)
36
+ return !1;
37
+ const { availableDays: a, availableDates: l, unavailableDates: n } = t;
38
+ return !!a && !oe.every((s) => a.includes(s)) || !!(l != null && l.length) || !!(n != null && n.length);
39
+ }, Ze = ({ className: t, ...a }) => {
40
+ const { id: l, text: n } = a;
41
+ return /* @__PURE__ */ e.createElement("span", {
42
+ id: l,
43
+ className: t,
44
+ "aria-hidden": "true"
45
+ }, n);
46
+ }, et = () => {
47
+ const { availability: t } = S();
48
+ return Ke() && !Je(t);
49
+ }, r = ({ children: t }) => {
50
+ const { id: a, value: l, onChange: n, disabled: i, required: s, onBlur: d, onFocus: o, FieldLayout: m, hasError: u, readOnly: C } = S(), { labelId: D } = W(), { regionalFormat: _ } = q(), [c, T] = $(null), [P, F] = $(!1), y = $e(a), R = et(), k = J((f) => {
51
+ const se = ut(f);
52
+ n(se);
53
+ }, [
54
+ n
55
+ ]), M = E(t, r.Label), x = E(t, r.Control), B = E(t, r.Calendar), O = E(t, r.Description), L = E(t, r.Error), Y = E(t, r.NativeDate), V = mt(l), U = R ? Y : /* @__PURE__ */ e.createElement(be, {
56
+ locale: _
57
+ }, /* @__PURE__ */ e.createElement("div", {
58
+ ref: T,
59
+ style: {
60
+ display: "contents"
61
+ }
62
+ }), /* @__PURE__ */ e.createElement(Ne, {
63
+ getContainer: () => c
64
+ }, /* @__PURE__ */ e.createElement(Ie, {
65
+ "aria-labelledby": D,
66
+ value: V,
67
+ onChange: k,
68
+ isDisabled: i,
69
+ isInvalid: u,
70
+ isReadOnly: C,
71
+ isRequired: s,
72
+ onBlur: d,
73
+ onFocus: o,
74
+ isOpen: y || P,
75
+ onOpenChange: y ? void 0 : F
76
+ }, x, h(B, {
77
+ isForcedOpen: y
78
+ }))));
79
+ return /* @__PURE__ */ e.createElement(m, {
80
+ fieldId: a,
81
+ renderLabel: () => M,
82
+ renderInput: () => U,
83
+ renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, L, O)
84
+ });
85
+ }, tt = ({ children: t, className: a }) => {
86
+ const { inputId: l, ariaDescribedBy: n } = W(), { hasError: i, disabled: s, readOnly: d } = S(), o = de(he), m = J((u) => {
87
+ if (!o || o.isOpen || s || d)
88
+ return;
89
+ const C = u.target;
90
+ if (C.closest("button"))
91
+ return;
92
+ const D = C.closest("[data-type]");
93
+ D && D.getAttribute("data-type") !== "literal" || o.setOpen(!0);
94
+ }, [
95
+ o,
96
+ s,
97
+ d
98
+ ]);
99
+ return /* @__PURE__ */ e.createElement(Se, {
100
+ id: l,
101
+ "aria-describedby": n,
102
+ className: a,
103
+ "data-invalid": i,
104
+ onClick: m
105
+ }, t);
106
+ }, at = ({ className: t }) => {
107
+ const { id: a, placeholder: l } = S(), { regionalFormat: n } = q(), i = A(null), s = A(!1);
108
+ Z(() => {
109
+ var o;
110
+ (o = i.current) == null || o.focus({
111
+ preventScroll: !0
112
+ });
113
+ }, a);
114
+ const d = w(() => dt(n), [
115
+ n
116
+ ]);
117
+ return /* @__PURE__ */ e.createElement(_e, {
118
+ className: t,
119
+ "data-placeholder-hidden": !l || void 0
120
+ }, (o) => {
121
+ const m = o.type === d && o.isPlaceholder && !!l;
122
+ return /* @__PURE__ */ e.createElement(Te, {
123
+ segment: o,
124
+ "data-first-segment": m || void 0,
125
+ ref: (u) => {
126
+ if (!u && s.current) {
127
+ i.current = null, s.current = !1;
128
+ return;
129
+ }
130
+ if (u && !s.current) {
131
+ i.current = u, s.current = !0;
132
+ return;
133
+ }
134
+ }
135
+ }, (u) => !u.isPlaceholder || !l ? u.text : m ? l : u.text);
136
+ });
137
+ }, rt = ({ children: t, className: a }) => /* @__PURE__ */ e.createElement(qe, {
138
+ className: a
139
+ }, t), p = ({ children: t, className: a, ...l }) => {
140
+ const { isForcedOpen: n } = l, { regionalFormat: i } = q(), { availability: s } = S(), d = w(() => ke(i), [
141
+ i
142
+ ]), o = w(() => (c) => {
143
+ const T = new Date(c.year, c.month - 1, c.day);
144
+ return !je(T, s || ze);
145
+ }, [
146
+ s
147
+ ]), m = E(t, p.Day) ?? /* @__PURE__ */ e.createElement(p.Day, null), u = E(t, p.PreviousTrigger), C = E(t, p.NextTrigger), D = E(t, p.MonthTrigger), _ = E(t, p.YearTrigger);
148
+ return /* @__PURE__ */ e.createElement(H, {
149
+ className: a,
150
+ containerPadding: 0
151
+ }, /* @__PURE__ */ e.createElement(nt, {
152
+ isForcedOpen: n
153
+ }, /* @__PURE__ */ e.createElement(Pe, {
154
+ autoFocus: n ? !1 : void 0,
155
+ firstDayOfWeek: gt(d),
156
+ isDateUnavailable: o
157
+ }, /* @__PURE__ */ e.createElement("header", null, u, /* @__PURE__ */ e.createElement(Oe, null, (c) => h(D, {
158
+ ariaLabel: c["aria-label"],
159
+ selectedKey: c.value,
160
+ onSelectionChange: c.onChange,
161
+ items: c.items,
162
+ popoverClassName: a
163
+ })), /* @__PURE__ */ e.createElement(Fe, {
164
+ visibleYears: 100
165
+ }, (c) => h(_, {
166
+ ariaLabel: c["aria-label"],
167
+ selectedKey: c.value,
168
+ onSelectionChange: c.onChange,
169
+ items: c.items,
170
+ popoverClassName: a
171
+ })), C), /* @__PURE__ */ e.createElement(Le, {
172
+ weekdayStyle: "short"
173
+ }, (c) => h(m, {
174
+ date: c
175
+ })))));
176
+ }, nt = ({ isForcedOpen: t, children: a }) => t ? /* @__PURE__ */ e.createElement("div", {
177
+ role: "dialog"
178
+ }, a) : /* @__PURE__ */ e.createElement(Ae, null, a), lt = ({ children: t, className: a, ...l }) => {
179
+ const { date: n } = l;
180
+ return /* @__PURE__ */ e.createElement(Re, {
181
+ className: a,
182
+ date: n
183
+ }, t);
184
+ }, ot = ({ children: t, className: a }) => /* @__PURE__ */ e.createElement(ee, {
185
+ slot: "previous",
186
+ className: a
187
+ }, t), st = ({ children: t, className: a }) => /* @__PURE__ */ e.createElement(ee, {
188
+ slot: "next",
189
+ className: a
190
+ }, t), ct = ({ children: t, className: a, ...l }) => {
191
+ const { ariaLabel: n, selectedKey: i, onSelectionChange: s, items: d, popoverClassName: o } = l;
192
+ return /* @__PURE__ */ e.createElement(te, {
193
+ "aria-label": n,
194
+ selectedKey: i,
195
+ onSelectionChange: s
196
+ }, /* @__PURE__ */ e.createElement(le, {
197
+ className: a
198
+ }, /* @__PURE__ */ e.createElement(ae, null), t), /* @__PURE__ */ e.createElement(H, {
199
+ className: o,
200
+ containerPadding: 0
201
+ }, /* @__PURE__ */ e.createElement(re, {
202
+ items: d
203
+ }, (m) => /* @__PURE__ */ e.createElement(ne, {
204
+ id: m.id
205
+ }, m.formatted))));
206
+ }, it = ({ children: t, className: a, ...l }) => {
207
+ const { ariaLabel: n, selectedKey: i, onSelectionChange: s, items: d, popoverClassName: o } = l;
208
+ return /* @__PURE__ */ e.createElement(te, {
209
+ "aria-label": n,
210
+ selectedKey: i,
211
+ onSelectionChange: s
212
+ }, /* @__PURE__ */ e.createElement(le, {
213
+ className: a
214
+ }, /* @__PURE__ */ e.createElement(ae, null), t), /* @__PURE__ */ e.createElement(H, {
215
+ className: o,
216
+ containerPadding: 0
217
+ }, /* @__PURE__ */ e.createElement(re, {
218
+ items: d
219
+ }, (m) => /* @__PURE__ */ e.createElement(ne, {
220
+ id: m.id
221
+ }, m.formatted))));
222
+ };
223
+ p.Day = lt;
224
+ p.PreviousTrigger = ot;
225
+ p.NextTrigger = st;
226
+ p.MonthTrigger = ct;
227
+ p.YearTrigger = it;
228
+ const b = ({ className: t, children: a }) => {
229
+ const { id: l, value: n, onChange: i, required: s, disabled: d, readOnly: o, hasError: m, placeholder: u, onBlur: C, onFocus: D } = S(), { inputId: _, labelId: c, ariaDescribedBy: T } = W(), P = A(null), F = A(null);
230
+ Z(() => {
231
+ var f;
232
+ (f = P.current) == null || f.focus({
233
+ preventScroll: !0
234
+ });
235
+ }, l);
236
+ const y = He(n), { announcement: R, announceCleared: k } = Ye(!!y), M = !!y && !s && !d && !o, x = E(a, b.Clear), B = E(a, b.Placeholder), O = y ? "" : u, L = ie(), Y = me.map(a, (f) => /* @__PURE__ */ ue(f) && (f.type === b.Clear || f.type === b.Placeholder) ? null : f), { className: V, stateProps: U } = Ge(t);
237
+ return /* @__PURE__ */ e.createElement(We, {
238
+ ref: F,
239
+ groupLabelId: c,
240
+ announcement: R
241
+ }, /* @__PURE__ */ e.createElement(Ve, {
242
+ ref: P,
243
+ type: "date",
244
+ id: _,
245
+ className: V,
246
+ ...ve(U, {
247
+ onFocus: D,
248
+ onBlur: C
249
+ }),
250
+ "aria-labelledby": c,
251
+ "aria-describedby": [
252
+ T,
253
+ O && L
254
+ ].filter(Boolean).join(" ") || void 0,
255
+ "aria-invalid": m || void 0,
256
+ value: y,
257
+ onChange: (f) => i(f || null),
258
+ disabled: d,
259
+ readOnly: o,
260
+ required: s
261
+ }), Y, O ? h(B, {
262
+ id: L,
263
+ text: O
264
+ }) : null, M ? h(x, {
265
+ input: P,
266
+ control: F,
267
+ labelId: c,
268
+ onClear: () => {
269
+ i(null), k();
270
+ }
271
+ }) : null);
272
+ };
273
+ b.Clear = Ue;
274
+ b.Placeholder = Ze;
275
+ r.Label = Be;
276
+ r.NativeDate = b;
277
+ r.Control = tt;
278
+ r.Input = at;
279
+ r.Trigger = rt;
280
+ r.Calendar = p;
281
+ r.Description = Me;
282
+ r.Error = xe;
283
+ function mt(t) {
284
+ if (!t)
285
+ return null;
286
+ try {
287
+ return ye(t);
288
+ } catch {
289
+ return null;
290
+ }
291
+ }
292
+ function ut(t) {
293
+ if (!t)
294
+ return null;
295
+ const a = String(t.year).padStart(4, "0"), l = String(t.month).padStart(2, "0"), n = String(t.day).padStart(2, "0");
296
+ return `${a}-${l}-${n}`;
297
+ }
298
+ function dt(t) {
299
+ var a;
300
+ try {
301
+ return ((a = new Intl.DateTimeFormat(t, {
302
+ year: "numeric",
303
+ month: "2-digit",
304
+ day: "2-digit"
305
+ }).formatToParts(/* @__PURE__ */ new Date()).find((n) => n.type !== "literal")) == null ? void 0 : a.type) ?? "month";
306
+ } catch {
307
+ return "month";
308
+ }
309
+ }
310
+ function gt(t) {
311
+ return [
312
+ "sun",
313
+ "mon",
314
+ "tue",
315
+ "wed",
316
+ "thu",
317
+ "fri",
318
+ "sat"
319
+ ][t] || "mon";
320
+ }
321
+ const Et = "_control_1le52_1", pt = "_segments_1le52_14", ft = "_trigger_1le52_72", Ct = "_calendarPopover_1le52_103 _textOnFillOptions_vf5u1_8", Dt = "_calendarDay_1le52_246", yt = "_dayNumber_1le52_253", I = {
322
+ control: Et,
323
+ segments: pt,
324
+ trigger: ft,
325
+ calendarPopover: Ct,
326
+ calendarDay: Dt,
327
+ dayNumber: yt
328
+ }, Nt = ({ content: t, locale: a }) => /* @__PURE__ */ e.createElement(ce, {
329
+ content: t,
330
+ locale: a
331
+ }), vt = {
332
+ left: 90,
333
+ right: -90
334
+ }, z = ({ direction: t }) => /* @__PURE__ */ e.createElement(K, {
335
+ style: {
336
+ transform: `rotate(${vt[t]}deg)`
337
+ }
338
+ }), Ht = () => {
339
+ const { t } = ge(), a = X(G, [
340
+ I.control
341
+ ]), l = X(G, [
342
+ g.nativeInput,
343
+ g.nativeWithLeadingIcon
344
+ ]);
345
+ return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
346
+ className: N(Ee, g.label)
347
+ }, /* @__PURE__ */ e.createElement(r.Label.Required, {
348
+ className: N(pe, g.requiredMark)
349
+ })), /* @__PURE__ */ e.createElement(r.Control, {
350
+ className: a
351
+ }, /* @__PURE__ */ e.createElement(r.Trigger, {
352
+ className: I.trigger
353
+ }, /* @__PURE__ */ e.createElement(Q, null)), /* @__PURE__ */ e.createElement(r.Input, {
354
+ className: I.segments
355
+ })), /* @__PURE__ */ e.createElement(r.NativeDate, {
356
+ className: l
357
+ }, /* @__PURE__ */ e.createElement(Q, {
358
+ className: N(g.nativeDecoration, g.nativeLeadingIcon)
359
+ }), /* @__PURE__ */ e.createElement(r.NativeDate.Placeholder, {
360
+ className: g.nativePlaceholder
361
+ }), /* @__PURE__ */ e.createElement(r.NativeDate.Clear, {
362
+ className: g.nativeClearButton,
363
+ "aria-label": t("date-picker.a11y.clear-button")
364
+ }, /* @__PURE__ */ e.createElement(we, null))), /* @__PURE__ */ e.createElement(r.Calendar, {
365
+ className: N(fe, g.selectPopover, I.calendarPopover)
366
+ }, /* @__PURE__ */ e.createElement(r.Calendar.PreviousTrigger, null, /* @__PURE__ */ e.createElement(z, {
367
+ direction: "left"
368
+ })), /* @__PURE__ */ e.createElement(r.Calendar.MonthTrigger, null, /* @__PURE__ */ e.createElement(K, {
369
+ className: g.dropdownIcon
370
+ })), /* @__PURE__ */ e.createElement(r.Calendar.YearTrigger, null, /* @__PURE__ */ e.createElement(K, {
371
+ className: g.dropdownIcon
372
+ })), /* @__PURE__ */ e.createElement(r.Calendar.NextTrigger, null, /* @__PURE__ */ e.createElement(z, {
373
+ direction: "right"
374
+ })), /* @__PURE__ */ e.createElement(r.Calendar.Day, {
375
+ className: N(Xe, j.day, I.calendarDay)
376
+ }, ({ formattedDate: n }) => /* @__PURE__ */ e.createElement("span", {
377
+ className: N(j.dayNumber, I.dayNumber)
378
+ }, n))), /* @__PURE__ */ e.createElement(r.Error, {
379
+ className: N(Ce, g.error)
380
+ }, /* @__PURE__ */ e.createElement(Qe, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
381
+ className: N(De, g.description)
382
+ }, Nt));
383
+ };
384
+ export {
385
+ Ht as D
386
+ };
@@ -1,5 +1,5 @@
1
1
  import e from "react";
2
- import { D as r } from "./date-picker-field-rac-Dg-chlTL.js";
2
+ import { D as r } from "./date-picker-field-rac-DyPkuVVe.js";
3
3
  const a = () => /* @__PURE__ */ e.createElement(r, null);
4
4
  export {
5
5
  a as DatePickerRAC