@wix/form-elements 1.88.0 → 1.90.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 (115) hide show
  1. package/dist/component/{appointment-rac-DG8GUJpn.js → appointment-rac-DtPa-JZ9.js} +6 -6
  2. package/dist/component/{bookings-address-rac-cNBSx-Pr.js → bookings-address-rac-4l8kqoLi.js} +1 -1
  3. package/dist/component/{bookings-email-rac-CYdSoVWP.js → bookings-email-rac-76vUcGtU.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-CQB2o8ww.js → bookings-first-name-rac-IS7LUMxg.js} +1 -1
  5. package/dist/component/{bookings-header-rac-CzKvQond.js → bookings-header-rac-2wTzY64_.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-oK1BC5Am.js → bookings-last-name-rac-nxA75igv.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-CZNEy748.js → bookings-login-bar-rac-CRi1nntD.js} +21 -21
  8. package/dist/component/{bookings-phone-rac-D_4WfolC.js → bookings-phone-rac-DZjvHly0.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-CrEfeL4P.js → bookings-rich-text-rac-CYn1wwYQ.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-CGqshW45.js → checkbox-field-rac-DAcFLQNT.js} +49 -49
  11. package/dist/component/{checkbox-group-field-headless-C3_5IR-E.js → checkbox-group-field-headless-BJmS0Ce5.js} +30 -30
  12. package/dist/component/{checkbox-group-field-rac-DIzdgyAw.js → checkbox-group-field-rac-CeFUt2Nr.js} +9 -9
  13. package/dist/component/{checkbox-group-rac-EvWVfusV.js → checkbox-group-rac-eDChVoVP.js} +1 -1
  14. package/dist/component/{checkbox-indicator-module-classes-Bb3xB1ve.js → checkbox-indicator-module-classes-mJ7hl_8K.js} +1 -1
  15. package/dist/component/{checkbox-rac-CT_69Jei.js → checkbox-rac-DGmZdPnl.js} +1 -1
  16. package/dist/component/{contacts-address-rac-M8MZd777.js → contacts-address-rac-CGS83PMu.js} +1 -1
  17. package/dist/component/{contacts-birthdate-rac-BS-8HeRD.js → contacts-birthdate-rac-DkP-7tZ9.js} +1 -1
  18. package/dist/component/{contacts-company-rac-gmgKLvic.js → contacts-company-rac-D_KYvkYe.js} +1 -1
  19. package/dist/component/{contacts-email-rac-QQ6E9VzX.js → contacts-email-rac-4lGD56E8.js} +1 -1
  20. package/dist/component/{contacts-first-name-rac-DR7XheRo.js → contacts-first-name-rac-C5L3U9QV.js} +1 -1
  21. package/dist/component/{contacts-last-name-rac-CBJgTkj5.js → contacts-last-name-rac-SL3FSAhE.js} +1 -1
  22. package/dist/component/{contacts-phone-rac-CTl25HdK.js → contacts-phone-rac-DkUwJ56_.js} +1 -1
  23. package/dist/component/{contacts-position-rac-DBDOW7QR.js → contacts-position-rac-CeKJ5oJh.js} +1 -1
  24. package/dist/component/{contacts-subscribe-rac-C0-uJ7fU.js → contacts-subscribe-rac-Bjldz7ed.js} +2 -2
  25. package/dist/component/{contacts-tax-id-rac-BtXc0V1S.js → contacts-tax-id-rac-D8QxyDiU.js} +1 -1
  26. package/dist/component/{date-availability-IQtwk-aX.js → date-availability-DdMI-zNj.js} +1 -1
  27. package/dist/component/{date-input-field-rac-2rbZiSgo.js → date-input-field-rac-Da6j7OP2.js} +99 -98
  28. package/dist/component/{date-input-rac-j4--xZ8s.js → date-input-rac-tlmhXr4A.js} +1 -1
  29. package/dist/component/{date-picker-field-rac-Cl7ueVVn.js → date-picker-field-rac-ClNfMoR1.js} +43 -43
  30. package/dist/component/{date-picker-rac-BrObkuYv.js → date-picker-rac-BV3TGjsx.js} +1 -1
  31. package/dist/component/date-time-input-field-rac-5eHyKry0.js +424 -0
  32. package/dist/component/{date-time-input-rac-BShquR72.js → date-time-input-rac-DQk2ylbE.js} +1 -1
  33. package/dist/component/{dext-checkbox-group-rac-DNXYnHDM.js → dext-checkbox-group-rac-CBj9Y7Tp.js} +2 -2
  34. package/dist/component/{dext-checkbox-rac-RBMWmgyT.js → dext-checkbox-rac-C1KI5I2J.js} +1 -1
  35. package/dist/component/{dext-date-picker-rac-Dph_kV11.js → dext-date-picker-rac-D-8Ss0bx.js} +1 -1
  36. package/dist/component/{dext-date-time-input-rac-C3_gQkBT.js → dext-date-time-input-rac-CRnwLBSZ.js} +1 -1
  37. package/dist/component/{dext-dropdown-rac-D34vhtST.js → dext-dropdown-rac-BVTEMS0W.js} +1 -1
  38. package/dist/component/{dext-email-rac-Yzf4-vSg.js → dext-email-rac-CXeM4iQj.js} +1 -1
  39. package/dist/component/{dext-number-input-rac-D0jZXKaI.js → dext-number-input-rac-DMh08cy5.js} +1 -1
  40. package/dist/component/{dext-phone-rac-bqTpmTa0.js → dext-phone-rac-E1fFjkVW.js} +1 -1
  41. package/dist/component/{dext-radio-group-rac-AYPAzpqZ.js → dext-radio-group-rac-_BhRzFAr.js} +2 -2
  42. package/dist/component/{dext-rating-input-rac-DOSq-xVQ.js → dext-rating-input-rac-BRYVQOYw.js} +1 -1
  43. package/dist/component/{dext-tags-rac-BXtFTlL0.js → dext-tags-rac-C4iwtRcw.js} +2 -2
  44. package/dist/component/{dext-text-area-rac-46wwBQg_.js → dext-text-area-rac-CQ1KAhkU.js} +1 -1
  45. package/dist/component/{dext-text-input-rac-DVj6V1VG.js → dext-text-input-rac-xCoKhEt3.js} +1 -1
  46. package/dist/component/{dext-url-input-rac-B5zu9R5K.js → dext-url-input-rac-DyoEEa_v.js} +1 -1
  47. package/dist/component/{donation-rac-DeBMssGg.js → donation-rac-CSDVxWUj.js} +51 -51
  48. package/dist/component/dropdown-field-headless-BXyP9KYi.js +101 -0
  49. package/dist/component/dropdown-field-rac-D1Z_Jbzd.js +36 -0
  50. package/dist/component/{dropdown-rac-bUNYh49x.js → dropdown-rac-BEi7CMKT.js} +1 -1
  51. package/dist/component/{ecom-address-rac-CtrERV3f.js → ecom-address-rac-DGl7rlwa.js} +1 -1
  52. package/dist/component/{ecom-subscription-checkbox-rac-BrpwOSYM.js → ecom-subscription-checkbox-rac-D5HzzRQk.js} +6 -6
  53. package/dist/component/{email-input-field-rac-4yYxYc1a.js → email-input-field-rac-DHAK2K8E.js} +63 -63
  54. package/dist/component/{events-repeater-rac-B308C1JK.js → events-repeater-rac-N1mGqD4R.js} +35 -35
  55. package/dist/component/{events-rsvp-rac-C4_LJ3Wz.js → events-rsvp-rac-Ds9PnqHG.js} +6 -6
  56. package/dist/component/{field-error-headless-PMBWtb3Z.js → field-error-headless-9MKScovg.js} +12 -12
  57. package/dist/component/{field-label-headless-0racVfdo.js → field-label-headless-BaoLrUWJ.js} +12 -12
  58. package/dist/component/field-rac.module-BUvPquav.js +26 -0
  59. package/dist/component/{file-upload-rac-CZIHV2OL.js → file-upload-rac-CNbLRxUz.js} +116 -116
  60. package/dist/component/{fixed-payment-rac-COhRKeun.js → fixed-payment-rac-BFnvUksR.js} +15 -15
  61. package/dist/component/{form-UCnayEKT.js → form-B3YjGh0T.js} +129 -128
  62. package/dist/component/{form-element-classes--p2vz_Bm.js → form-element-classes-CLZXu-91.js} +79 -69
  63. package/dist/component/form.css +1 -1
  64. package/dist/component/form.js +1 -1
  65. package/dist/component/{header-field-rac-CpXa-NlC.js → header-field-rac-64pYqszP.js} +3 -3
  66. package/dist/component/{header-rac-CCsguMlZ.js → header-rac-BtPQVL59.js} +1 -1
  67. package/dist/component/{image-choice-rac-j2UH4Q4I.js → image-choice-rac-BsojUR1h.js} +20 -20
  68. package/dist/component/{index-Bxa3IDHm.js → index-CtiBRBqZ.js} +4 -4
  69. package/dist/component/{index-jg8dn8po.js → index-f2JBxCTd.js} +2 -2
  70. package/dist/component/{isObjectLike-Zw6J9g91.js → isObjectLike-BgqHLNgn.js} +1 -1
  71. package/dist/component/{multiline-address-field-rac-BeFAYL7V.js → multiline-address-field-rac-CH1hCUTf.js} +575 -574
  72. package/dist/component/{multiline-address-rac-BYr5_DQd.js → multiline-address-rac-CkOPWXfI.js} +1 -1
  73. package/dist/component/{number-input-field-rac-BNdJecUL.js → number-input-field-rac-B7U_08UK.js} +24 -24
  74. package/dist/component/{number-input-rac-Cqkj4JAF.js → number-input-rac-1jcchySg.js} +1 -1
  75. package/dist/component/{password-rac-D4iSs1ds.js → password-rac-CAaV8OrL.js} +21 -21
  76. package/dist/component/{payment-input-rac-BvBP47HP.js → payment-input-rac-B3Knhzrz.js} +25 -25
  77. package/dist/component/{phone-input-field-rac-Cggx8IlY.js → phone-input-field-rac-BGsvxtXz.js} +185 -184
  78. package/dist/component/{phone-rac-BISmYt_n.js → phone-rac-BUAW-44w.js} +1 -1
  79. package/dist/component/{product-list-rac-C1bm-U2G.js → product-list-rac-C7Nq3ZG4.js} +43 -43
  80. package/dist/component/quiz-radio-group-rac-CRa3I_NR.js +13 -0
  81. package/dist/component/{radio-button-module-classes-blfiatlc.js → radio-button-module-classes-BEvf741q.js} +7 -7
  82. package/dist/component/{radio-group-field-rac-BiiPUxbQ.js → radio-group-field-rac-BYTXrpnE.js} +5 -5
  83. package/dist/component/{radio-group-rac-Bn_W-3xz.js → radio-group-rac-138JrIhm.js} +1 -1
  84. package/dist/component/{rating-input-field-rac-CjXIoNMc.js → rating-input-field-rac-D5pOVdFJ.js} +24 -24
  85. package/dist/component/{rating-input-rac-Ci4uPo22.js → rating-input-rac-DuK1q9JB.js} +1 -1
  86. package/dist/component/{rich-content-rac.module-CDZniyrZ.js → rich-content-rac.module-H3hPgDtD.js} +4 -4
  87. package/dist/component/{rich-text-field-rac-BBRE9_Kr.js → rich-text-field-rac-Btwqm4wb.js} +5 -5
  88. package/dist/component/{rich-text-rac-C3MfJK-H.js → rich-text-rac-DIu8StCg.js} +1 -1
  89. package/dist/component/service-dropdown-rac-N8jqoUC_.js +146 -0
  90. package/dist/component/{services-multi-choice-rac-FDHRjDLS.js → services-multi-choice-rac-DlP0tB9d.js} +18 -18
  91. package/dist/component/{signature-rac-DfGPV0Mw.js → signature-rac-DuRzxIkO.js} +53 -53
  92. package/dist/component/{submit-button-rac-DRsqyJcl.js → submit-button-rac-DFmPp4jT.js} +7 -7
  93. package/dist/component/{tags-field-rac-CZ4FBGG9.js → tags-field-rac-DIgyn5P9.js} +56 -56
  94. package/dist/component/{tags-rac-CMHMsiwv.js → tags-rac-C6R6RHl2.js} +1 -1
  95. package/dist/component/text-area-field-rac-opBEx_8s.js +73 -0
  96. package/dist/component/{text-area-rac-BKGDa4E3.js → text-area-rac-D4iKhAqc.js} +1 -1
  97. package/dist/component/{text-input-field-rac-CU8eBRM4.js → text-input-field-rac-Ckp8Ierz.js} +6 -6
  98. package/dist/component/{text-input-headless-C1eFy2gl.js → text-input-headless-D-LXpqS3.js} +6 -6
  99. package/dist/component/{text-input-rac-DO0eI3ty.js → text-input-rac-ChxuJj-q.js} +1 -1
  100. package/dist/component/{time-input-rac-BJ0AL2Be.js → time-input-rac-C5_rEy7W.js} +23 -23
  101. package/dist/component/{url-input-field-rac-BtpAuKfp.js → url-input-field-rac-CBOnhquz.js} +22 -22
  102. package/dist/component/{url-input-rac-CjnPbcHt.js → url-input-rac-BY-BVg6r.js} +1 -1
  103. package/dist/component/use-dropdown-option-class-name-C1iEE28P.js +28 -0
  104. package/dist/component/{use-element-state-class-name-X08kIFhd.js → use-element-state-class-name--YLulmsU.js} +1 -1
  105. package/dist/component/{use-service-options-base-DfHhMveM.js → use-service-options-base-BNLFmnHJ.js} +3 -3
  106. package/dist/component/{use-text-input-class-name-BAuokapo.js → use-text-input-class-name-3Xp-hNDT.js} +4 -4
  107. package/dist/form.d.ts +3 -0
  108. package/package.json +3 -3
  109. package/dist/component/date-time-input-field-rac-mqea6CtW.js +0 -423
  110. package/dist/component/dropdown-field-headless-ShcoDfPa.js +0 -84
  111. package/dist/component/dropdown-field-rac-DruF_YdZ.js +0 -32
  112. package/dist/component/field-rac.module-D06m9T9x.js +0 -24
  113. package/dist/component/quiz-radio-group-rac-BhNhoOSI.js +0 -13
  114. package/dist/component/service-dropdown-rac-DQkk3SlS.js +0 -142
  115. package/dist/component/text-area-field-rac-BnRuG5y8.js +0 -73
@@ -1,423 +0,0 @@
1
- import { RicosViewer as ne } from "@wix/ricos/viewer";
2
- import p from "classnames";
3
- import t, { useMemo as L, useState as G, useCallback as x, useRef as z, useContext as re } from "react";
4
- import { aj as g, ag as K, ab as B, J as Q, a1 as W, r as d, at as O, a5 as j, O as se, x as oe, a8 as le, y as J, al as $ } from "./form-UCnayEKT.js";
5
- import { parseTime as ie } from "@internationalized/date";
6
- import { UNSAFE_PortalProvider as ce } from "react-aria";
7
- import { ListBoxItem as me, ListBox as de, Select as ue, TextField as X, TimeField as pe, SelectValue as Ee, Input as Z, DateInput as fe, DateSegment as k, TimeFieldStateContext as he } from "react-aria-components";
8
- import { f as u, a as S } from "./find-child-C60k4CxG.js";
9
- import { g as be } from "./helpers-HmkkXrh2.js";
10
- import { D as ge, E as Ie } from "./field-error-headless-PMBWtb3Z.js";
11
- import { L as _e } from "./field-label-headless-0racVfdo.js";
12
- import { F as ye } from "./fieldset-headless-CD3fds9J.js";
13
- import { N as Ne, S as De } from "./non-modal-popover-DtIMXHbe.js";
14
- import { C as Te } from "./chevron-down-icon-CcpVm6B-.js";
15
- import { E as Le } from "./error-icon-hZxQ6DEy.js";
16
- import { H } from "./custom-focus-class-_483Pkwp.js";
17
- import { s as f } from "./field-rac.module-D06m9T9x.js";
18
- import { y as v, P as Oe, x as Ce, B as Fe, o as Pe, i as Me } from "./form-element-classes--p2vz_Bm.js";
19
- import { u as U } from "./use-text-input-class-name-BAuokapo.js";
20
- const o = ({ children: e, className: a }) => {
21
- const { id: n, required: r, onBlur: l, onFocus: s, FieldLayout: i } = g(), { inputId: m, labelId: c, ariaDescribedBy: h } = K(), { regionalFormat: b } = B(), y = L(() => Q(b).filter(W).map((M) => M.toUpperCase()), [
22
- b
23
- ]), P = u(e, o.Label), V = u(e, o.Description), T = u(e, o.Error), _ = {
24
- [d.MONTH]: u(e, o.Month),
25
- [d.DAY]: u(e, o.Day),
26
- [d.YEAR]: u(e, o.Year)
27
- }, N = u(e, o.Time);
28
- return /* @__PURE__ */ t.createElement(i, {
29
- fieldId: n,
30
- renderLabel: () => S(P, {
31
- as: "div"
32
- }),
33
- renderInput: () => /* @__PURE__ */ t.createElement(ye, {
34
- id: m,
35
- ariaLabelledBy: c,
36
- ariaDescribedBy: h,
37
- required: r,
38
- onBlur: l,
39
- onFocus: s,
40
- className: a
41
- }, _[y[0]], _[y[1]], _[y[2]], N),
42
- renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, T, V)
43
- });
44
- }, C = ({ children: e, className: a }) => {
45
- const { disabled: n, readOnly: r, showDateLabels: l, hidePlaceholder: s } = g(), { labelId: i } = D(d.MONTH), { partValue: m, partError: c, onPartChange: h } = F(d.MONTH), { t: b } = O(), [y, P] = G(!1), [V, T] = G(null), _ = s ? void 0 : b("field.date.placeholder.month"), N = x((Y) => {
46
- r || h(typeof Y == "string" ? Y : "");
47
- }, [
48
- h,
49
- r
50
- ]), M = x((Y) => {
51
- P(Y && !r);
52
- }, [
53
- r
54
- ]), ee = u(e, C.Label), te = u(e, C.Trigger), ae = u(e, C.Options);
55
- return /* @__PURE__ */ t.createElement("div", {
56
- className: a,
57
- "data-date-field": !0
58
- }, l ? ee : null, /* @__PURE__ */ t.createElement("div", {
59
- ref: T,
60
- style: {
61
- display: "contents"
62
- }
63
- }), /* @__PURE__ */ t.createElement(ce, {
64
- getContainer: () => V
65
- }, /* @__PURE__ */ t.createElement(ue, {
66
- "aria-labelledby": l ? i : void 0,
67
- value: m || null,
68
- onChange: N,
69
- isDisabled: n,
70
- isInvalid: c,
71
- placeholder: _,
72
- isOpen: y,
73
- onOpenChange: M
74
- }, te, ae)));
75
- }, ve = ({ className: e }) => /* @__PURE__ */ t.createElement(q, {
76
- datePart: d.MONTH,
77
- className: e
78
- }), Se = ({ children: e, className: a }) => {
79
- const { id: n, readOnly: r } = g(), { inputId: l } = D(d.MONTH), { partError: s, isFirstPart: i } = F(d.MONTH), m = z(null);
80
- return $(() => {
81
- var c;
82
- i && ((c = m.current) == null || c.focus());
83
- }, n), /* @__PURE__ */ t.createElement(De, {
84
- ref: m,
85
- id: l,
86
- className: a,
87
- "data-hook": d.MONTH,
88
- "data-invalid": s || void 0,
89
- "data-readonly": r || void 0
90
- }, /* @__PURE__ */ t.createElement(Ee, null), e);
91
- }, w = ({ children: e, className: a }) => {
92
- const { language: n } = B(), r = L(() => be(n), [
93
- n
94
- ]), l = u(e, w.Option) ?? /* @__PURE__ */ t.createElement(w.Option, null);
95
- return /* @__PURE__ */ t.createElement(Ne, {
96
- className: a,
97
- containerPadding: 0,
98
- offset: 0
99
- }, /* @__PURE__ */ t.createElement(de, null, r.map((s, i) => S(l, {
100
- key: String(i + 1),
101
- value: String(i + 1),
102
- label: s
103
- }))));
104
- }, Re = ({ className: e, ...a }) => {
105
- const { value: n, label: r } = a;
106
- return /* @__PURE__ */ t.createElement(me, {
107
- className: e,
108
- id: n,
109
- textValue: r
110
- }, r);
111
- };
112
- C.Label = ve;
113
- C.Trigger = Se;
114
- C.Options = w;
115
- w.Option = Re;
116
- const R = ({ children: e, className: a }) => {
117
- const { disabled: n, readOnly: r, showDateLabels: l } = g(), { labelId: s } = D(d.DAY), { partValue: i, partError: m, onPartChange: c } = F(d.DAY), h = u(e, R.Label), b = u(e, R.Input);
118
- return /* @__PURE__ */ t.createElement("div", {
119
- className: a,
120
- "data-date-field": !0
121
- }, l && h, /* @__PURE__ */ t.createElement(X, {
122
- "aria-labelledby": l ? s : void 0,
123
- value: i,
124
- onChange: c,
125
- isDisabled: n,
126
- isReadOnly: r,
127
- isInvalid: m
128
- }, b));
129
- }, Ae = ({ className: e }) => /* @__PURE__ */ t.createElement(q, {
130
- datePart: d.DAY,
131
- className: e
132
- }), Ve = ({ className: e }) => {
133
- const { id: a, hidePlaceholder: n } = g(), { inputId: r } = D(d.DAY), { isFirstPart: l } = F(d.DAY), { t: s } = O(), i = z(null), m = n ? void 0 : s("field.date.placeholder.day");
134
- return $(() => {
135
- var c;
136
- l && ((c = i.current) == null || c.focus());
137
- }, a), /* @__PURE__ */ t.createElement(Z, {
138
- ref: i,
139
- id: r,
140
- className: e,
141
- placeholder: m,
142
- maxLength: 2,
143
- inputMode: "numeric",
144
- "data-hook": d.DAY
145
- });
146
- };
147
- R.Label = Ae;
148
- R.Input = Ve;
149
- const A = ({ children: e, className: a }) => {
150
- const { disabled: n, readOnly: r, showDateLabels: l } = g(), { labelId: s } = D(d.YEAR), { partValue: i, partError: m, onPartChange: c } = F(d.YEAR), h = u(e, A.Label), b = u(e, A.Input);
151
- return /* @__PURE__ */ t.createElement("div", {
152
- className: a,
153
- "data-date-field": !0
154
- }, l && h, /* @__PURE__ */ t.createElement(X, {
155
- "aria-labelledby": l ? s : void 0,
156
- value: i,
157
- onChange: c,
158
- isDisabled: n,
159
- isReadOnly: r,
160
- isInvalid: m
161
- }, b));
162
- }, Ye = ({ className: e }) => /* @__PURE__ */ t.createElement(q, {
163
- datePart: d.YEAR,
164
- className: e
165
- }), He = ({ className: e }) => {
166
- const { id: a, hidePlaceholder: n } = g(), { inputId: r } = D(d.YEAR), { isFirstPart: l } = F(d.YEAR), { t: s } = O(), i = z(null), m = n ? void 0 : s("field.date.placeholder.year");
167
- return $(() => {
168
- var c;
169
- l && ((c = i.current) == null || c.focus());
170
- }, a), /* @__PURE__ */ t.createElement(Z, {
171
- ref: i,
172
- id: r,
173
- className: e,
174
- placeholder: m,
175
- maxLength: 4,
176
- inputMode: "numeric",
177
- "data-hook": d.YEAR
178
- });
179
- };
180
- A.Label = Ye;
181
- A.Input = He;
182
- const I = ({ children: e, className: a }) => {
183
- const { disabled: n, readOnly: r, use24HourFormat: l, showDateLabels: s } = g(), { labelId: i } = D("time"), { partValue: m, partError: c, onPartChange: h } = F("time"), b = u(e, I.Label), y = u(e, I.Input);
184
- return /* @__PURE__ */ t.createElement("div", {
185
- className: a,
186
- "data-date-field": !0
187
- }, s && b, /* @__PURE__ */ t.createElement(pe, {
188
- "aria-labelledby": s ? i : void 0,
189
- value: m,
190
- onChange: h,
191
- isDisabled: n,
192
- isReadOnly: r,
193
- isInvalid: c,
194
- hourCycle: l ? 24 : 12
195
- }, y));
196
- }, xe = ({ className: e }) => {
197
- const { inputId: a, labelId: n } = D("time"), { t: r } = O(), l = r("field.date.label.time");
198
- return /* @__PURE__ */ t.createElement("label", {
199
- id: n,
200
- htmlFor: a,
201
- className: e
202
- }, l);
203
- }, we = ({ children: e, className: a }) => {
204
- const n = u(e, I.Hour), r = u(e, I.Minute), l = u(e, I.Period);
205
- return /* @__PURE__ */ t.createElement(fe, {
206
- className: a,
207
- "data-hook": "time"
208
- }, (s) => {
209
- switch (s.type) {
210
- case "hour":
211
- return S(n, {
212
- segment: s
213
- }) || /* @__PURE__ */ t.createElement(t.Fragment, null);
214
- case "minute":
215
- return S(r, {
216
- segment: s
217
- }) || /* @__PURE__ */ t.createElement(t.Fragment, null);
218
- case "dayPeriod":
219
- return S(l, {
220
- segment: s
221
- }) || /* @__PURE__ */ t.createElement(t.Fragment, null);
222
- case "literal":
223
- return /* @__PURE__ */ t.createElement(k, {
224
- segment: s
225
- });
226
- default:
227
- return /* @__PURE__ */ t.createElement(t.Fragment, null);
228
- }
229
- });
230
- }, Be = ({ className: e, ...a }) => {
231
- const { hidePlaceholder: n } = g(), { segment: r } = a, { t: l } = O(), s = n ? void 0 : l("field.date.placeholder.hour");
232
- return /* @__PURE__ */ t.createElement(k, {
233
- segment: r,
234
- className: e,
235
- ...s && {
236
- placeholder: s
237
- }
238
- });
239
- }, ke = ({ className: e, ...a }) => {
240
- const { hidePlaceholder: n } = g(), { segment: r } = a, { t: l } = O(), s = n ? void 0 : l("field.date.placeholder.minute");
241
- return /* @__PURE__ */ t.createElement(k, {
242
- segment: r,
243
- className: e,
244
- ...s && {
245
- placeholder: s
246
- }
247
- });
248
- }, Ue = ({ className: e, ...a }) => {
249
- const { hidePlaceholder: n } = g(), { segment: r } = a, { t: l } = O(), s = re(he), i = n ? void 0 : l("field.date.placeholder.period"), m = () => s == null ? void 0 : s.increment("dayPeriod");
250
- return /* @__PURE__ */ t.createElement(k, {
251
- segment: r,
252
- className: e,
253
- onClick: m,
254
- ...i && {
255
- placeholder: i
256
- }
257
- });
258
- };
259
- I.Label = xe;
260
- I.Input = we;
261
- I.Hour = Be;
262
- I.Minute = ke;
263
- I.Period = Ue;
264
- o.Label = _e;
265
- o.Month = C;
266
- o.Day = R;
267
- o.Year = A;
268
- o.Time = I;
269
- o.Description = ge;
270
- o.Error = Ie;
271
- function D(e) {
272
- const { inputId: a } = K();
273
- return L(() => {
274
- const n = e.toLowerCase();
275
- return {
276
- inputId: `${a}-${n}-input`,
277
- labelId: `${a}-${n}-label`
278
- };
279
- }, [
280
- a,
281
- e
282
- ]);
283
- }
284
- function F(e) {
285
- const { value: a, onChange: n, hasError: r = !1 } = g(), { regionalFormat: l } = B(), [s, i] = L(() => j(a ?? ""), [
286
- a
287
- ]), m = L(() => se(r, a ?? ""), [
288
- a,
289
- r
290
- ]), c = L(() => oe(s), [
291
- s
292
- ]), h = L(() => ze(i), [
293
- i
294
- ]), b = x((T) => {
295
- const _ = $e(T), N = J(s, _);
296
- n(N);
297
- }, [
298
- n,
299
- s
300
- ]), y = x((T) => {
301
- const [, _] = j(a ?? ""), N = le(T, e, c), M = J(N, _);
302
- n(M);
303
- }, [
304
- n,
305
- a,
306
- c,
307
- e
308
- ]), P = L(() => e === "time" ? !1 : Q(l).filter(W).map((N) => N.toUpperCase())[0] === e, [
309
- l,
310
- e
311
- ]);
312
- return e === "time" ? {
313
- partValue: h,
314
- partError: m.TIME,
315
- onPartChange: b,
316
- isFirstPart: !1
317
- } : {
318
- partValue: c[e] || "",
319
- partError: m[e],
320
- onPartChange: y,
321
- isFirstPart: P
322
- };
323
- }
324
- function q({ datePart: e, className: a }) {
325
- const { inputId: n, labelId: r } = D(e), { t: l } = O(), s = `field.date.label.${e.toLowerCase()}`, i = l(s);
326
- return /* @__PURE__ */ t.createElement("label", {
327
- id: r,
328
- htmlFor: n,
329
- className: a
330
- }, i);
331
- }
332
- function ze(e) {
333
- if (!e)
334
- return null;
335
- try {
336
- return ie(e);
337
- } catch {
338
- return null;
339
- }
340
- }
341
- function $e(e) {
342
- if (!e)
343
- return null;
344
- const a = String(e.hour).padStart(2, "0"), n = String(e.minute).padStart(2, "0"), r = String(e.second).padStart(2, "0");
345
- return [
346
- a,
347
- n,
348
- r
349
- ].join(":");
350
- }
351
- const qe = "_fields_1svr5_1", Ge = "_month_1svr5_10", je = "_day_1svr5_11", Je = "_year_1svr5_12", Ke = "_timeGroup_1svr5_13", Qe = "_mobile_1svr5_32", We = "_dayInput_1svr5_45", Xe = "_yearInput_1svr5_46", Ze = "_monthTrigger_1svr5_50", et = "_monthOption_1svr5_70", tt = "_time_1svr5_13", at = "_hour_1svr5_89", nt = "_minute_1svr5_90", rt = "_period_1svr5_91", E = {
352
- fields: qe,
353
- month: Ge,
354
- day: je,
355
- year: Je,
356
- timeGroup: Ke,
357
- mobile: Qe,
358
- dayInput: We,
359
- yearInput: Xe,
360
- monthTrigger: Ze,
361
- monthOption: et,
362
- time: tt,
363
- hour: at,
364
- minute: nt,
365
- period: rt
366
- }, st = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ne, {
367
- content: e,
368
- locale: a
369
- }), Lt = () => {
370
- const { isMobile: e } = B(), a = U(E.dayInput), n = U(E.yearInput), r = U(E.time);
371
- return /* @__PURE__ */ t.createElement(o, {
372
- className: p(E.fields, {
373
- [E.mobile]: e
374
- })
375
- }, /* @__PURE__ */ t.createElement(o.Label, {
376
- className: p(v, f.label)
377
- }, /* @__PURE__ */ t.createElement(o.Label.Required, {
378
- className: p(Oe, f.requiredMark)
379
- })), /* @__PURE__ */ t.createElement(o.Month, {
380
- className: E.month
381
- }, /* @__PURE__ */ t.createElement(o.Month.Label, {
382
- className: p(v, f.label)
383
- }), /* @__PURE__ */ t.createElement(o.Month.Trigger, {
384
- className: p(Ce, f.input, E.monthTrigger)
385
- }, /* @__PURE__ */ t.createElement(Te, {
386
- className: f.dropdownIcon
387
- })), /* @__PURE__ */ t.createElement(o.Month.Options, {
388
- className: p(Fe, f.selectPopover, f.dropdownPopover)
389
- }, /* @__PURE__ */ t.createElement(o.Month.Options.Option, {
390
- className: p(f.selectOption, E.monthOption, H)
391
- }))), /* @__PURE__ */ t.createElement(o.Day, {
392
- className: E.day
393
- }, /* @__PURE__ */ t.createElement(o.Day.Label, {
394
- className: p(v, f.label)
395
- }), /* @__PURE__ */ t.createElement(o.Day.Input, {
396
- className: a
397
- })), /* @__PURE__ */ t.createElement(o.Year, {
398
- className: E.year
399
- }, /* @__PURE__ */ t.createElement(o.Year.Label, {
400
- className: p(v, f.label)
401
- }), /* @__PURE__ */ t.createElement(o.Year.Input, {
402
- className: n
403
- })), /* @__PURE__ */ t.createElement(o.Time, {
404
- className: E.timeGroup
405
- }, /* @__PURE__ */ t.createElement(o.Time.Label, {
406
- className: p(v, f.label)
407
- }), /* @__PURE__ */ t.createElement(o.Time.Input, {
408
- className: r
409
- }, /* @__PURE__ */ t.createElement(o.Time.Hour, {
410
- className: p(E.hour, H)
411
- }), /* @__PURE__ */ t.createElement(o.Time.Minute, {
412
- className: p(E.minute, H)
413
- }), /* @__PURE__ */ t.createElement(o.Time.Period, {
414
- className: p(E.period, H)
415
- }))), /* @__PURE__ */ t.createElement(o.Error, {
416
- className: p(Pe, f.error)
417
- }, /* @__PURE__ */ t.createElement(Le, null), /* @__PURE__ */ t.createElement(o.Error.Text, null)), /* @__PURE__ */ t.createElement(o.Description, {
418
- className: p(Me, f.description)
419
- }, st));
420
- };
421
- export {
422
- Lt as D
423
- };
@@ -1,84 +0,0 @@
1
- import e, { useState as E, useCallback as g, useRef as q } from "react";
2
- import { UNSAFE_PortalProvider as A } from "react-aria";
3
- import { Select as j, SelectValue as w, ListBox as M, ListBoxItem as U } from "react-aria-components";
4
- import { aj as p, ag as b, al as _ } from "./form-UCnayEKT.js";
5
- import { f as d, a as z } from "./find-child-C60k4CxG.js";
6
- import { D as G, E as H } from "./field-error-headless-PMBWtb3Z.js";
7
- import { L as J } from "./field-label-headless-0racVfdo.js";
8
- import { S as K, N as Q } from "./non-modal-popover-DtIMXHbe.js";
9
- const n = ({ children: t }) => {
10
- const { id: o, value: r, defaultValue: l, options: a = [], readOnly: s, onChange: u, placeholder: m, disabled: i, required: v, onBlur: O, onFocus: y, FieldLayout: F, hasError: C } = p(), [D, L] = E(!1), [h, I] = E(null), B = r && a.some((c) => (c.value ?? c.label) === r) ? r : l || null, { labelId: N } = b(), P = g((c) => {
11
- s || u(typeof c == "string" ? c : null);
12
- }, [
13
- u,
14
- s
15
- ]), S = g((c) => L(c && !i && !s), [
16
- i,
17
- s
18
- ]), T = d(t, n.Label), x = d(t, n.Trigger), V = d(t, n.Options), R = d(t, n.Description), k = d(t, n.Error);
19
- return /* @__PURE__ */ e.createElement(F, {
20
- fieldId: o,
21
- renderLabel: () => T,
22
- renderInput: () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", {
23
- ref: I,
24
- style: {
25
- display: "contents"
26
- }
27
- }), /* @__PURE__ */ e.createElement(A, {
28
- getContainer: () => h
29
- }, /* @__PURE__ */ e.createElement(j, {
30
- "aria-labelledby": N,
31
- value: B,
32
- isOpen: D && !i && !s,
33
- onOpenChange: S,
34
- onChange: P,
35
- isDisabled: i,
36
- isInvalid: C,
37
- isRequired: v,
38
- placeholder: m,
39
- onBlur: O,
40
- onFocus: y
41
- }, x, V))),
42
- renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, k, R)
43
- });
44
- }, W = ({ children: t, className: o }) => {
45
- const { inputId: r, ariaDescribedBy: l } = b(), { id: a, hasError: s, isLoading: u } = p(), m = q(null);
46
- return _(() => {
47
- var i;
48
- (i = m.current) == null || i.focus();
49
- }, a), /* @__PURE__ */ e.createElement(K, {
50
- ref: m,
51
- id: r,
52
- "aria-describedby": l,
53
- className: o,
54
- "data-invalid": s || void 0,
55
- "data-loading": u || void 0
56
- }, /* @__PURE__ */ e.createElement(w, null), t);
57
- }, f = ({ children: t, className: o }) => {
58
- const { options: r = [] } = p(), l = d(t, f.Option);
59
- return /* @__PURE__ */ e.createElement(Q, {
60
- className: o,
61
- containerPadding: 0,
62
- offset: 0
63
- }, /* @__PURE__ */ e.createElement(M, null, r.map((a) => z(l, {
64
- key: a.value ?? a.label,
65
- value: a.value ?? a.label,
66
- label: a.label
67
- }))));
68
- }, X = ({ className: t, ...o }) => {
69
- const { value: r, label: l } = o;
70
- return /* @__PURE__ */ e.createElement(U, {
71
- className: t,
72
- id: r,
73
- textValue: l
74
- }, l);
75
- };
76
- f.Option = X;
77
- n.Label = J;
78
- n.Trigger = W;
79
- n.Options = f;
80
- n.Description = G;
81
- n.Error = H;
82
- export {
83
- n as D
84
- };
@@ -1,32 +0,0 @@
1
- import { RicosViewer as m } from "@wix/ricos/viewer";
2
- import t from "classnames";
3
- import e from "react";
4
- import { D as o } from "./dropdown-field-headless-ShcoDfPa.js";
5
- import { C as n } from "./chevron-down-icon-CcpVm6B-.js";
6
- import { E as l } from "./error-icon-hZxQ6DEy.js";
7
- import { H as c } from "./custom-focus-class-_483Pkwp.js";
8
- import { s as r } from "./field-rac.module-D06m9T9x.js";
9
- import { y as i, P as E, x as p, B as _, o as S, i as R } from "./form-element-classes--p2vz_Bm.js";
10
- const D = ({ content: a, locale: s }) => /* @__PURE__ */ e.createElement(m, {
11
- content: a,
12
- locale: s
13
- }), u = () => /* @__PURE__ */ e.createElement(o, null, /* @__PURE__ */ e.createElement(o.Label, {
14
- className: t(i, r.label)
15
- }, /* @__PURE__ */ e.createElement(o.Label.Required, {
16
- className: t(E, r.requiredMark)
17
- })), /* @__PURE__ */ e.createElement(o.Trigger, {
18
- className: t(p, r.input, r.dropdownTrigger)
19
- }, /* @__PURE__ */ e.createElement(n, {
20
- className: r.dropdownIcon
21
- })), /* @__PURE__ */ e.createElement(o.Options, {
22
- className: t(_, r.selectPopover, r.dropdownPopover)
23
- }, /* @__PURE__ */ e.createElement(o.Options.Option, {
24
- className: t(r.selectOption, c)
25
- })), /* @__PURE__ */ e.createElement(o.Error, {
26
- className: t(S, r.error)
27
- }, /* @__PURE__ */ e.createElement(l, null), /* @__PURE__ */ e.createElement(o.Error.Text, null)), /* @__PURE__ */ e.createElement(o.Description, {
28
- className: t(R, r.description)
29
- }, D));
30
- export {
31
- u as D
32
- };
@@ -1,24 +0,0 @@
1
- const o = "_label_18pnh_1", n = "_requiredMark_18pnh_11", t = "_input_18pnh_16", e = "_inputGroup_18pnh_17", p = "_inputHover_18pnh_69", c = "_innerInput_18pnh_130", _ = "_dropdownTrigger_18pnh_178", r = "_dropdownIcon_18pnh_188", s = "_dropdownPopover_18pnh_207", u = "_selectPopover_18pnh_211", i = "_selectOption_18pnh_238", h = "_selectOptionWithoutFocusRing_18pnh_262", d = "_description_18pnh_268", l = "_error_18pnh_284", b = "_checkbox_18pnh_303", k = "_checkboxInput_18pnh_326", I = "_checkboxInputSelected_18pnh_365", x = "_checkboxInputHover_18pnh_369", v = "_uploadButton_18pnh_416", a = {
2
- label: o,
3
- requiredMark: n,
4
- input: t,
5
- inputGroup: e,
6
- inputHover: p,
7
- innerInput: c,
8
- dropdownTrigger: _,
9
- dropdownIcon: r,
10
- dropdownPopover: s,
11
- selectPopover: u,
12
- selectOption: i,
13
- selectOptionWithoutFocusRing: h,
14
- description: d,
15
- error: l,
16
- checkbox: b,
17
- checkboxInput: k,
18
- checkboxInputSelected: I,
19
- checkboxInputHover: x,
20
- uploadButton: v
21
- };
22
- export {
23
- a as s
24
- };
@@ -1,13 +0,0 @@
1
- import _ from "react";
2
- import { R } from "./radio-group-field-rac-BiiPUxbQ.js";
3
- import { J as o, I as r, H as O } from "./form-element-classes--p2vz_Bm.js";
4
- const e = () => /* @__PURE__ */ _.createElement(R, {
5
- classes: {
6
- container: O,
7
- label: r,
8
- radioButton: o
9
- }
10
- });
11
- export {
12
- e as QuizRadioGroupRAC
13
- };