@wix/form-elements 1.121.0 → 1.122.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-BmwzUTfZ.js → appointment-rac-Cj90bm7v.js} +4 -4
  2. package/dist/component/{bookings-address-rac-CDpBaBGi.js → bookings-address-rac-ta3UnLl8.js} +1 -1
  3. package/dist/component/{bookings-email-rac-8AonBAEP.js → bookings-email-rac-Ch2W4ucr.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-BAF3OLyL.js → bookings-first-name-rac-CvBNN0qW.js} +1 -1
  5. package/dist/component/{bookings-header-rac-DIXxOHe1.js → bookings-header-rac-BGn5xB-k.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-Cm-58BWq.js → bookings-last-name-rac-Dlu0RgZ0.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-DvaiFVqg.js → bookings-login-bar-rac-1htwH3kv.js} +1 -1
  8. package/dist/component/{bookings-phone-rac-znrjfRwm.js → bookings-phone-rac-U75qHO4B.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-DFPeWcrH.js → bookings-rich-text-rac-_j66QPCk.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-COvxqyF7.js → checkbox-field-rac-CjQeC7-Y.js} +4 -4
  11. package/dist/component/{checkbox-group-field-headless-DT1HX61N.js → checkbox-group-field-headless-BLZlefmT.js} +3 -3
  12. package/dist/component/{checkbox-group-field-rac-Db1w6Vzm.js → checkbox-group-field-rac-s_9nrnok.js} +4 -4
  13. package/dist/component/{checkbox-group-rac-BCgFQJ4P.js → checkbox-group-rac-DZgOprql.js} +1 -1
  14. package/dist/component/{checkbox-rac-C1dKq2AT.js → checkbox-rac-H0jZt4pG.js} +1 -1
  15. package/dist/component/{contacts-address-rac-BoZ2LExb.js → contacts-address-rac-QMPNicwV.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-CX-oJkwP.js → contacts-birthdate-rac-BubQqfVp.js} +1 -1
  17. package/dist/component/{contacts-company-rac-ByY9oaOX.js → contacts-company-rac-fVQn5dPH.js} +1 -1
  18. package/dist/component/{contacts-email-rac-DBnTEm82.js → contacts-email-rac-sJqycgjN.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-Jn-ubMoS.js → contacts-first-name-rac-DuHDHR2w.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-Wea7_JU-.js → contacts-last-name-rac-DV2g2QGF.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-POYGTwBr.js → contacts-phone-rac-e9o55Al-.js} +1 -1
  22. package/dist/component/{contacts-position-rac-DjDHNTfL.js → contacts-position-rac-Z6vDVuT7.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-C7vOLrLV.js → contacts-subscribe-rac-GiiBZhQ7.js} +1 -1
  24. package/dist/component/{contacts-tax-id-rac-C-CVis0b.js → contacts-tax-id-rac-KFIbfE1X.js} +1 -1
  25. package/dist/component/{date-availability-B3unFx4z.js → date-availability-BloJXrmD.js} +1 -1
  26. package/dist/component/date-input-field-rac-MT_m-Z3G.js +290 -0
  27. package/dist/component/{date-input-rac-BW_WuabB.js → date-input-rac-C2WNFEp-.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-DgBfvDRc.js → date-picker-field-rac-C9ewyabf.js} +117 -114
  29. package/dist/component/{date-picker-rac-B2v-E9tZ.js → date-picker-rac-BiDt00zO.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-DNxauQLv.js → date-time-input-field-rac-D1GNwPmZ.js} +111 -111
  31. package/dist/component/{date-time-input-rac-DZMQuMlD.js → date-time-input-rac-VMTzuAzt.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-B0u3i1v1.js → dext-checkbox-group-rac-CUG-FJj1.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-BngAFLbm.js → dext-checkbox-rac-DUC-rpQy.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-CyPtZQQp.js → dext-date-picker-rac-Bp1_5ZRF.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-DBm_ZVMr.js → dext-date-time-input-rac-D7BBsF1U.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-DBDOigJS.js → dext-dropdown-rac-GmP2v4Va.js} +1 -1
  37. package/dist/component/{dext-email-rac-Cj-eerfr.js → dext-email-rac-Dfu8MJjD.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-WdUIM6bV.js → dext-number-input-rac-C8ejJdHk.js} +1 -1
  39. package/dist/component/{dext-phone-rac-CH-UDDKr.js → dext-phone-rac-iaVcaxNr.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-umexCSNY.js → dext-radio-group-rac-yOH9UuWW.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-ukMPDLxU.js → dext-rating-input-rac-d_PyzTCP.js} +1 -1
  42. package/dist/component/{dext-tags-rac-BE8aqyRm.js → dext-tags-rac-CjH32M87.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-GtNDPetb.js → dext-text-area-rac-BLcw2KMH.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-DQhaKaoe.js → dext-text-input-rac-2SLBKsBY.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-DogsntOO.js → dext-url-input-rac-BIh4KJw3.js} +1 -1
  46. package/dist/component/{donation-rac-C1Se3wmU.js → donation-rac-D1cY7dDX.js} +5 -5
  47. package/dist/component/{dropdown-field-headless-5vi45azS.js → dropdown-field-headless-DgpZtlSI.js} +5 -5
  48. package/dist/component/{dropdown-field-rac-B0PeCuG6.js → dropdown-field-rac-CUNtROoj.js} +18 -17
  49. package/dist/component/{dropdown-rac--ZgcFbpH.js → dropdown-rac-BdCYUN39.js} +1 -1
  50. package/dist/component/{ecom-address-rac-C1p-fN1j.js → ecom-address-rac-CRcfdrJ1.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-uplYmDWZ.js → ecom-subscription-checkbox-rac-CgePHF0U.js} +2 -2
  52. package/dist/component/{email-input-field-rac-C6nqydVv.js → email-input-field-rac-DvWj_fAr.js} +3 -3
  53. package/dist/component/{events-repeater-rac-CqKFo75H.js → events-repeater-rac-Cfth4URI.js} +4 -4
  54. package/dist/component/{events-rsvp-rac-BBQwW-Jk.js → events-rsvp-rac-PmNHKbSw.js} +3 -3
  55. package/dist/component/{field-error-headless-COObBNJG.js → field-error-headless-B8MijSrk.js} +1 -1
  56. package/dist/component/{field-label-headless-DhXceghb.js → field-label-headless-D3FPZC-x.js} +1 -1
  57. package/dist/component/{file-upload-rac-B5CnpgIo.js → file-upload-rac-BNqkSQ2b.js} +4 -4
  58. package/dist/component/{fixed-payment-rac-B8yKRpQV.js → fixed-payment-rac-CtNOKzeC.js} +3 -3
  59. package/dist/component/{form-CimhBiBc.js → form-AphBF-mQ.js} +691 -671
  60. package/dist/component/form.css +1 -1
  61. package/dist/component/form.js +1 -1
  62. package/dist/component/{header-field-rac-BHgFF-LG.js → header-field-rac-cJ2ZFy67.js} +2 -2
  63. package/dist/component/{header-rac-DJttTbow.js → header-rac-Dd7yRNC0.js} +1 -1
  64. package/dist/component/{image-choice-rac-C-qj1WBS.js → image-choice-rac-2Z_7AfHu.js} +4 -4
  65. package/dist/component/{index-Qe91Dgi2.js → index-A4jMKGCs.js} +2 -2
  66. package/dist/component/{index-9nfSsqJo.js → index-ERGpdqrG.js} +4 -4
  67. package/dist/component/{isObjectLike-VICRth8V.js → isObjectLike-wpJkrV5k.js} +1 -1
  68. package/dist/component/{multiline-address-field-rac-DMg6V-0L.js → multiline-address-field-rac-CGqF3dfq.js} +369 -369
  69. package/dist/component/{multiline-address-rac-DpvB5bX9.js → multiline-address-rac-Dy8_4emN.js} +1 -1
  70. package/dist/component/{number-input-field-rac-DQERdWaA.js → number-input-field-rac-BaTODjcx.js} +4 -4
  71. package/dist/component/{number-input-rac-DY9uyE-k.js → number-input-rac-CVpDhFz5.js} +1 -1
  72. package/dist/component/{password-rac-cSWH1LPy.js → password-rac-BNam3XdN.js} +4 -4
  73. package/dist/component/{payment-input-rac-BiUNnsQx.js → payment-input-rac-Czqho0fu.js} +4 -4
  74. package/dist/component/phone-input-field-rac-BM2SoA5b.js +507 -0
  75. package/dist/component/{phone-rac-CFeNcp2U.js → phone-rac-BuC_Yxb2.js} +1 -1
  76. package/dist/component/{product-list-rac-DzhnEmL_.js → product-list-rac-gfZUDEoh.js} +4 -4
  77. package/dist/component/{quiz-radio-group-rac-BpsPgebu.js → quiz-radio-group-rac-DswfVeX4.js} +1 -1
  78. package/dist/component/{radio-button-module-classes-NBKHsJH7.js → radio-button-module-classes-DmWrhFOe.js} +3 -3
  79. package/dist/component/{radio-group-field-rac-C2oTt1mT.js → radio-group-field-rac-CE67QNOZ.js} +4 -4
  80. package/dist/component/{radio-group-rac-oINHZ5yY.js → radio-group-rac-hMr6DTvG.js} +1 -1
  81. package/dist/component/{rating-input-field-rac-fnv2RdUA.js → rating-input-field-rac-bDVUjGJa.js} +4 -4
  82. package/dist/component/{rating-input-rac-BFofFzSX.js → rating-input-rac-ZNdJ7gjD.js} +1 -1
  83. package/dist/component/{rich-content-rac.module-BplXvCt6.js → rich-content-rac.module-CUYcnq1k.js} +1 -1
  84. package/dist/component/{rich-text-field-rac-Csi4_gCV.js → rich-text-field-rac-DjnSs-6W.js} +2 -2
  85. package/dist/component/{rich-text-rac-Btu1y3LR.js → rich-text-rac-BIZ9Yyb_.js} +1 -1
  86. package/dist/component/service-dropdown-rac-6cm9orLJ.js +146 -0
  87. package/dist/component/{services-multi-choice-rac-B2rAg7VN.js → services-multi-choice-rac-DkojlNhZ.js} +5 -5
  88. package/dist/component/{signature-rac-tznFgZ4j.js → signature-rac-BfDoEvbo.js} +3 -3
  89. package/dist/component/submit-button-rac-BDEQy_l_.js +172 -0
  90. package/dist/component/{tags-field-rac-DFm9o85s.js → tags-field-rac-DvmQ9U0Y.js} +5 -5
  91. package/dist/component/{tags-rac-CJFccYp5.js → tags-rac-DxkhHwfm.js} +1 -1
  92. package/dist/component/{text-area-field-rac-C4UEZOjz.js → text-area-field-rac-DngdDcia.js} +4 -4
  93. package/dist/component/{text-area-rac-Dhsq1l8f.js → text-area-rac-CXm7TYZV.js} +1 -1
  94. package/dist/component/{text-input-field-rac-DiW0Sqj_.js → text-input-field-rac-DyDgs_io.js} +3 -3
  95. package/dist/component/{text-input-headless-u1_aFnZ1.js → text-input-headless-C_feZwcp.js} +3 -3
  96. package/dist/component/{text-input-rac-COy-c4N_.js → text-input-rac-C5UxE1Zt.js} +1 -1
  97. package/dist/component/{time-input-rac-DipZQTZN.js → time-input-rac-cBIuRiEr.js} +4 -4
  98. package/dist/component/{url-input-field-rac-DhBCGvKd.js → url-input-field-rac-BUO9FUv6.js} +4 -4
  99. package/dist/component/{url-input-rac-kw4gCDbc.js → url-input-rac-D7Z-AQaq.js} +1 -1
  100. package/dist/component/{use-dropdown-option-class-name-Bes6rpX4.js → use-dropdown-option-class-name-Bm1SOTi8.js} +2 -2
  101. package/dist/component/use-dropdown-trigger-class-name-Dcy1VIqo.js +43 -0
  102. package/dist/component/{use-element-state-class-name-_GWfwpEf.js → use-element-state-class-name-B3vhm52Z.js} +1 -1
  103. package/dist/component/use-hoverable-input-class-name-nSoEwyiu.js +23 -0
  104. package/dist/component/{use-service-options-base-4yrjmSWU.js → use-service-options-base-Drse9uff.js} +1 -1
  105. package/dist/component/use-text-input-class-name-CZWGRiSQ.js +6 -0
  106. package/package.json +2 -2
  107. package/dist/component/date-input-field-rac-BW0c1-Kl.js +0 -290
  108. package/dist/component/phone-input-field-rac-CtPGbnw_.js +0 -504
  109. package/dist/component/service-dropdown-rac-CzZW7Bp1.js +0 -145
  110. package/dist/component/submit-button-rac-DnHWbtTC.js +0 -141
  111. package/dist/component/use-is-forced-open-dropdown-RE1Ml2A3.js +0 -41
  112. package/dist/component/use-text-input-class-name-uMLXv54u.js +0 -23
@@ -0,0 +1,6 @@
1
+ import { _ as a } from "./form-AphBF-mQ.js";
2
+ import { u as e } from "./use-hoverable-input-class-name-nSoEwyiu.js";
3
+ const m = (...s) => e(a, s);
4
+ export {
5
+ m as u
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/form-elements",
3
- "version": "1.121.0",
3
+ "version": "1.122.0",
4
4
  "description": "The Wix Forms rendering element for Builder apps, loaded at runtime as @wix/form-elements/Form",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -156,5 +156,5 @@
156
156
  ]
157
157
  }
158
158
  },
159
- "falconPackageHash": "d5472c6932f8080a2b95cb5548b54dd9b0ad6ce72ffb3beeae750fba"
159
+ "falconPackageHash": "dac4440162768353911db894440a1bba46d5bdb402c5a9c239af5867"
160
160
  }
@@ -1,290 +0,0 @@
1
- import { RicosViewer as ee } from "@wix/ricos/viewer";
2
- import b from "classnames";
3
- import t, { useMemo as y, useState as x, useCallback as v, useRef as w } from "react";
4
- import { UNSAFE_PortalProvider as te } from "react-aria";
5
- import { ListBoxItem as ae, Select as ne, TextField as k, SelectValue as re, Input as $ } from "react-aria-components";
6
- import { b9 as D, b6 as q, b1 as V, aG as G, aT as K, au as d, bj as P, aB as se, aH as oe, a_ as le, bb as z, I as S, U as ce, t as ie, K as de, v as me, p as ue } from "./form-CimhBiBc.js";
7
- import { f as u, a as B } from "./find-child-C60k4CxG.js";
8
- import { g as pe } from "./helpers-HmkkXrh2.js";
9
- import { D as Ee, E as fe } from "./field-error-headless-COObBNJG.js";
10
- import { L as be } from "./field-label-headless-DhXceghb.js";
11
- import { F as he } from "./fieldset-headless-CD3fds9J.js";
12
- import { N as Ie, S as De } from "./non-modal-popover-DtIMXHbe.js";
13
- import { u as Oe } from "./use-is-forced-open-dropdown-RE1Ml2A3.js";
14
- import { V as ge, u as ye } from "./use-dropdown-option-class-name-Bes6rpX4.js";
15
- import { C as Ne } from "./chevron-down-icon-CcpVm6B-.js";
16
- import { E as _e } from "./error-icon-hZxQ6DEy.js";
17
- import { H as Le } from "./custom-focus-class-_483Pkwp.js";
18
- import { s as E } from "./field-rac.module-B4l_0KRU.js";
19
- import { u as U } from "./use-text-input-class-name-uMLXv54u.js";
20
- const n = ({ children: e, className: a }) => {
21
- const { id: r, required: o, onBlur: s, onFocus: l, FieldLayout: c } = D(), { inputId: m, labelId: i, ariaDescribedBy: f } = q(), { regionalFormat: p } = V(), h = y(() => G(p).filter(K).map((Y) => Y.toUpperCase()), [
22
- p
23
- ]), _ = u(e, n.Label), T = u(e, n.Description), L = u(e, n.Error), F = {
24
- [d.MONTH]: u(e, n.Month),
25
- [d.DAY]: u(e, n.Day),
26
- [d.YEAR]: u(e, n.Year)
27
- };
28
- return /* @__PURE__ */ t.createElement(c, {
29
- fieldId: r,
30
- renderLabel: () => B(_, {
31
- as: "div"
32
- }),
33
- renderInput: () => /* @__PURE__ */ t.createElement(he, {
34
- id: m,
35
- ariaLabelledBy: i,
36
- ariaDescribedBy: f,
37
- required: o,
38
- onBlur: s,
39
- onFocus: l,
40
- className: a
41
- }, F[h[0]], F[h[1]], F[h[2]]),
42
- renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, L, T)
43
- });
44
- }, O = ({ children: e, className: a }) => {
45
- const { id: r, disabled: o, readOnly: s, showDateLabels: l, hidePlaceholder: c } = D(), { labelId: m } = g(d.MONTH), { partValue: i, partError: f, onPartChange: p } = N(d.MONTH), { t: h } = P(), [_, T] = x(!1), L = Oe(r), [F, Y] = x(null), j = c ? void 0 : h("field.date.placeholder.month"), Q = v((M) => {
46
- s || p(typeof M == "string" ? M : "");
47
- }, [
48
- p,
49
- s
50
- ]), W = v((M) => {
51
- T(M && !s);
52
- }, [
53
- s
54
- ]), J = u(e, O.Label), X = u(e, O.Trigger), Z = u(e, O.Options);
55
- return /* @__PURE__ */ t.createElement("div", {
56
- className: a,
57
- "data-date-field": !0
58
- }, l ? J : null, /* @__PURE__ */ t.createElement("div", {
59
- ref: Y,
60
- style: {
61
- display: "contents"
62
- }
63
- }), /* @__PURE__ */ t.createElement(te, {
64
- getContainer: () => F
65
- }, /* @__PURE__ */ t.createElement(ne, {
66
- "aria-labelledby": l ? m : void 0,
67
- value: i || null,
68
- onChange: Q,
69
- isDisabled: o,
70
- isInvalid: f,
71
- placeholder: j,
72
- isOpen: L || _,
73
- onOpenChange: L ? void 0 : W
74
- }, X, B(Z, {
75
- isForcedOpen: L
76
- }))));
77
- }, Fe = ({ className: e }) => /* @__PURE__ */ t.createElement(H, {
78
- datePart: d.MONTH,
79
- className: e
80
- }), Ce = ({ children: e, className: a }) => {
81
- const { id: r, readOnly: o } = D(), { inputId: s } = g(d.MONTH), { partError: l, isFirstPart: c } = N(d.MONTH), m = w(null);
82
- return z(() => {
83
- var i;
84
- c && ((i = m.current) == null || i.focus());
85
- }, r), /* @__PURE__ */ t.createElement(De, {
86
- ref: m,
87
- id: s,
88
- className: a,
89
- "data-hook": d.MONTH,
90
- "data-invalid": l || void 0,
91
- "data-readonly": o || void 0
92
- }, /* @__PURE__ */ t.createElement(re, null), e);
93
- }, A = ({ children: e, className: a, ...r }) => {
94
- const { isForcedOpen: o } = r, { language: s } = V(), l = y(() => pe(s), [
95
- s
96
- ]), c = u(e, A.Option) ?? /* @__PURE__ */ t.createElement(A.Option, null);
97
- return /* @__PURE__ */ t.createElement(Ie, {
98
- className: a,
99
- containerPadding: 0,
100
- offset: 0
101
- }, /* @__PURE__ */ t.createElement(ge, {
102
- isForcedOpen: o,
103
- autoFocus: o ? !1 : void 0
104
- }, l.map((m, i) => B(c, {
105
- key: String(i + 1),
106
- value: String(i + 1),
107
- label: m
108
- }))));
109
- }, Re = ({ className: e, ...a }) => {
110
- const { value: r, label: o } = a;
111
- return /* @__PURE__ */ t.createElement(ae, {
112
- className: e,
113
- id: r,
114
- textValue: o
115
- }, o);
116
- };
117
- O.Label = Fe;
118
- O.Trigger = Ce;
119
- O.Options = A;
120
- A.Option = Re;
121
- const C = ({ children: e, className: a }) => {
122
- const { disabled: r, readOnly: o, showDateLabels: s } = D(), { labelId: l } = g(d.DAY), { partValue: c, partError: m, onPartChange: i } = N(d.DAY), f = u(e, C.Label), p = u(e, C.Input);
123
- return /* @__PURE__ */ t.createElement("div", {
124
- className: a,
125
- "data-date-field": !0
126
- }, s && f, /* @__PURE__ */ t.createElement(k, {
127
- "aria-labelledby": s ? l : void 0,
128
- value: c,
129
- onChange: i,
130
- isDisabled: r,
131
- isReadOnly: o,
132
- isInvalid: m
133
- }, p));
134
- }, Me = ({ className: e }) => /* @__PURE__ */ t.createElement(H, {
135
- datePart: d.DAY,
136
- className: e
137
- }), Se = ({ className: e }) => {
138
- const { id: a, hidePlaceholder: r } = D(), { inputId: o } = g(d.DAY), { isFirstPart: s } = N(d.DAY), { t: l } = P(), c = w(null), m = r ? void 0 : l("field.date.placeholder.day");
139
- return z(() => {
140
- var i;
141
- s && ((i = c.current) == null || i.focus());
142
- }, a), /* @__PURE__ */ t.createElement($, {
143
- ref: c,
144
- id: o,
145
- className: e,
146
- placeholder: m,
147
- maxLength: 2,
148
- inputMode: "numeric",
149
- "data-hook": d.DAY
150
- });
151
- };
152
- C.Label = Me;
153
- C.Input = Se;
154
- const R = ({ children: e, className: a }) => {
155
- const { disabled: r, readOnly: o, showDateLabels: s } = D(), { labelId: l } = g(d.YEAR), { partValue: c, partError: m, onPartChange: i } = N(d.YEAR), f = u(e, R.Label), p = u(e, R.Input);
156
- return /* @__PURE__ */ t.createElement("div", {
157
- className: a,
158
- "data-date-field": !0
159
- }, s && f, /* @__PURE__ */ t.createElement(k, {
160
- "aria-labelledby": s ? l : void 0,
161
- value: c,
162
- onChange: i,
163
- isDisabled: r,
164
- isReadOnly: o,
165
- isInvalid: m
166
- }, p));
167
- }, Ae = ({ className: e }) => /* @__PURE__ */ t.createElement(H, {
168
- datePart: d.YEAR,
169
- className: e
170
- }), Pe = ({ className: e }) => {
171
- const { id: a, hidePlaceholder: r } = D(), { inputId: o } = g(d.YEAR), { isFirstPart: s } = N(d.YEAR), { t: l } = P(), c = w(null), m = r ? void 0 : l("field.date.placeholder.year");
172
- return z(() => {
173
- var i;
174
- s && ((i = c.current) == null || i.focus());
175
- }, a), /* @__PURE__ */ t.createElement($, {
176
- ref: c,
177
- id: o,
178
- className: e,
179
- placeholder: m,
180
- maxLength: 4,
181
- inputMode: "numeric",
182
- "data-hook": d.YEAR
183
- });
184
- };
185
- R.Label = Ae;
186
- R.Input = Pe;
187
- n.Label = be;
188
- n.Month = O;
189
- n.Day = C;
190
- n.Year = R;
191
- n.Description = Ee;
192
- n.Error = fe;
193
- function g(e) {
194
- const { inputId: a } = q();
195
- return y(() => {
196
- const r = e.toLowerCase();
197
- return {
198
- inputId: `${a}-${r}-input`,
199
- labelId: `${a}-${r}-label`
200
- };
201
- }, [
202
- a,
203
- e
204
- ]);
205
- }
206
- function N(e) {
207
- const { value: a, onChange: r, hasError: o = !1 } = D(), { regionalFormat: s } = V(), l = y(() => se(a ?? ""), [
208
- a
209
- ]), c = y(() => oe(o, a ?? ""), [
210
- a,
211
- o
212
- ]), m = l[e] || "", i = v((p) => {
213
- const h = le(p, e, l);
214
- r(h);
215
- }, [
216
- r,
217
- l,
218
- e
219
- ]), f = y(() => G(s).filter(K).map((_) => _.toUpperCase())[0] === e, [
220
- s,
221
- e
222
- ]);
223
- return {
224
- partValue: m,
225
- partError: c[e],
226
- onPartChange: i,
227
- isFirstPart: f
228
- };
229
- }
230
- function H({ datePart: e, className: a }) {
231
- const { inputId: r, labelId: o } = g(e), { t: s } = P(), l = `field.date.label.${e.toLowerCase()}`, c = s(l);
232
- return /* @__PURE__ */ t.createElement("label", {
233
- id: o,
234
- htmlFor: r,
235
- className: a
236
- }, c);
237
- }
238
- const Te = "_fields_16lz4_1", Ye = "_month_16lz4_10", ve = "_day_16lz4_11", we = "_year_16lz4_12", Ve = "_dayInput_16lz4_28", ze = "_yearInput_16lz4_29", Be = "_monthTrigger_16lz4_33", He = "_monthOption_16lz4_53", I = {
239
- fields: Te,
240
- month: Ye,
241
- day: ve,
242
- year: we,
243
- dayInput: Ve,
244
- yearInput: ze,
245
- monthTrigger: Be,
246
- monthOption: He
247
- }, xe = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ee, {
248
- content: e,
249
- locale: a
250
- }), lt = () => {
251
- const e = ye(I.monthOption, Le), a = U(I.dayInput), r = U(I.yearInput);
252
- return /* @__PURE__ */ t.createElement(n, {
253
- className: I.fields
254
- }, /* @__PURE__ */ t.createElement(n.Label, {
255
- className: b(S, E.label)
256
- }, /* @__PURE__ */ t.createElement(n.Label.Required, {
257
- className: b(ce, E.requiredMark)
258
- })), /* @__PURE__ */ t.createElement(n.Month, {
259
- className: I.month
260
- }, /* @__PURE__ */ t.createElement(n.Month.Label, {
261
- className: b(S, E.label)
262
- }), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
263
- className: b(ie, E.input, I.monthTrigger)
264
- }, /* @__PURE__ */ t.createElement(Ne, {
265
- className: E.dropdownIcon
266
- })), /* @__PURE__ */ t.createElement(n.Month.Options, {
267
- className: b(de, E.selectPopover, E.dropdownPopover)
268
- }, /* @__PURE__ */ t.createElement(n.Month.Options.Option, {
269
- className: e
270
- }))), /* @__PURE__ */ t.createElement(n.Day, {
271
- className: I.day
272
- }, /* @__PURE__ */ t.createElement(n.Day.Label, {
273
- className: b(S, E.label)
274
- }), /* @__PURE__ */ t.createElement(n.Day.Input, {
275
- className: a
276
- })), /* @__PURE__ */ t.createElement(n.Year, {
277
- className: I.year
278
- }, /* @__PURE__ */ t.createElement(n.Year.Label, {
279
- className: b(S, E.label)
280
- }), /* @__PURE__ */ t.createElement(n.Year.Input, {
281
- className: r
282
- })), /* @__PURE__ */ t.createElement(n.Error, {
283
- className: b(me, E.error)
284
- }, /* @__PURE__ */ t.createElement(_e, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
285
- className: b(ue, E.description)
286
- }, xe));
287
- };
288
- export {
289
- lt as D
290
- };