@wix/form-elements 1.145.0 → 1.147.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 (113) hide show
  1. package/dist/component/{appointment-rac-De-uH9rz.js → appointment-rac-BG5-bIZU.js} +98 -98
  2. package/dist/component/{bookings-address-rac-DB6QCMQJ.js → bookings-address-rac-8e8PqKsp.js} +1 -1
  3. package/dist/component/{bookings-email-rac-g6ZdB_BO.js → bookings-email-rac-CtlnU8ws.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-DQgL_VHl.js → bookings-first-name-rac-CrivNlXM.js} +1 -1
  5. package/dist/component/{bookings-header-rac-DAnIm-Oq.js → bookings-header-rac-DWDAjfqq.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-D62jNdDb.js → bookings-last-name-rac-qAthWem2.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-5z8HfBhU.js → bookings-login-bar-rac-BNyUDqlM.js} +6 -6
  8. package/dist/component/{bookings-phone-rac-D0gu-_wy.js → bookings-phone-rac-Tc39XLr7.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-b4J1HcdI.js → bookings-rich-text-rac-CPNaPtFK.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-CmRRc9Dz.js → checkbox-field-rac-DEa78Tpf.js} +4 -4
  11. package/dist/component/{checkbox-group-field-headless-CB8yAfMe.js → checkbox-group-field-headless-BxBaMg29.js} +68 -68
  12. package/dist/component/{checkbox-group-field-rac-C5gRZRTd.js → checkbox-group-field-rac-CRRP03Qk.js} +7 -7
  13. package/dist/component/{checkbox-group-rac-DNDF1Irh.js → checkbox-group-rac-TOofMGl3.js} +1 -1
  14. package/dist/component/{checkbox-rac-B9vztGBU.js → checkbox-rac-CHMHr8Ry.js} +1 -1
  15. package/dist/component/{contacts-address-rac-CKZeSncj.js → contacts-address-rac-Bc5yDvTL.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-BbpNNQgF.js → contacts-birthdate-rac-Ubtg5ncv.js} +1 -1
  17. package/dist/component/{contacts-company-rac-BX2KT201.js → contacts-company-rac-BksH9IoV.js} +1 -1
  18. package/dist/component/{contacts-email-rac-5Irzx1mA.js → contacts-email-rac-DDPEtMAm.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-CxKp8_2u.js → contacts-first-name-rac-DUlCvEdx.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-BDCbSv5I.js → contacts-last-name-rac-BikqNgUr.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-BM_PV_uH.js → contacts-phone-rac-B4OEgM_8.js} +1 -1
  22. package/dist/component/{contacts-position-rac-1aqthQSi.js → contacts-position-rac-BfybzySV.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-CdqXs4kp.js → contacts-subscribe-rac-CMHb33v1.js} +1 -1
  24. package/dist/component/{contacts-tax-id-rac-BKHpcDb6.js → contacts-tax-id-rac-C-qEqwO5.js} +1 -1
  25. package/dist/component/{date-availability-DmFFTX8p.js → date-availability-DZ3J3LLm.js} +1 -1
  26. package/dist/component/date-input-field-rac-DeL5vuE7.js +297 -0
  27. package/dist/component/{date-input-rac-BB6qZ16w.js → date-input-rac-Di6TQvFf.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-Ckwu2vD6.js → date-picker-field-rac-BcdpTkjV.js} +107 -103
  29. package/dist/component/{date-picker-rac-DSqzUAaH.js → date-picker-rac-Brne65gr.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-DO-iRdkW.js → date-time-input-field-rac-BtQfAxRp.js} +49 -49
  31. package/dist/component/{date-time-input-rac-smVCCxdY.js → date-time-input-rac-DM_HXiqV.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-B8bx3rT2.js → dext-checkbox-group-rac-WTVwhGG0.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-x8VLGRbc.js → dext-checkbox-rac-BR5YwmLQ.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-D2a9NXap.js → dext-date-picker-rac-DvDuRGYi.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-Cp5XjpGv.js → dext-date-time-input-rac-C6RgbaVv.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-nWgEvyxt.js → dext-dropdown-rac-CWjSdcZx.js} +1 -1
  37. package/dist/component/{dext-email-rac-CkX6ya8p.js → dext-email-rac-D-C1gVTq.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-CKT0MS1x.js → dext-number-input-rac-YKzZS2ZG.js} +1 -1
  39. package/dist/component/{dext-phone-rac-DM2E7zW_.js → dext-phone-rac-CFZlEH2a.js} +1 -1
  40. package/dist/component/dext-radio-group-rac-DiH0wIIl.js +18 -0
  41. package/dist/component/{dext-rating-input-rac-CKWNpFuu.js → dext-rating-input-rac-D0s-i0qO.js} +1 -1
  42. package/dist/component/{dext-tags-rac-6AskGGTp.js → dext-tags-rac-Br48OQQ5.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-ClGLD7sD.js → dext-text-area-rac-6jG8gJ7i.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-Blbk53d4.js → dext-text-input-rac-FAJTCXuf.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-BuitmJU0.js → dext-url-input-rac-BoMP8sQB.js} +1 -1
  46. package/dist/component/{donation-rac-DOifFCD7.js → donation-rac-DNi4p-v5.js} +69 -69
  47. package/dist/component/{dropdown-field-headless-m2P6s7X5.js → dropdown-field-headless-7SCC-xOC.js} +27 -27
  48. package/dist/component/{dropdown-field-rac-5e6wWJBl.js → dropdown-field-rac-CMzZh6J6.js} +8 -9
  49. package/dist/component/{dropdown-rac-BGxE9pJB.js → dropdown-rac-qeugpHXY.js} +1 -1
  50. package/dist/component/{ecom-address-rac-kbD9qW5Y.js → ecom-address-rac-D8b_L5md.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-CE-Yixnj.js → ecom-subscription-checkbox-rac-BnAuR9La.js} +5 -5
  52. package/dist/component/{email-input-field-rac-CbwcB33o.js → email-input-field-rac-CunXRyc5.js} +64 -62
  53. package/dist/component/{events-repeater-rac-CGhUscBr.js → events-repeater-rac-DMjyIOkB.js} +17 -17
  54. package/dist/component/{events-rsvp-rac-AQ33zPTe.js → events-rsvp-rac-BsuDPq2K.js} +8 -8
  55. package/dist/component/{field-error-headless-ClPQ03Jc.js → field-error-headless-E8WjFr_n.js} +6 -6
  56. package/dist/component/{field-label-headless-DhN8Lkuq.js → field-label-headless-BakLOu5E.js} +15 -15
  57. package/dist/component/{file-upload-rac-yTx1ZRhZ.js → file-upload-rac-Clu_c--0.js} +43 -43
  58. package/dist/component/{fixed-payment-rac-nlyxa9nB.js → fixed-payment-rac-CzAXxsb-.js} +12 -12
  59. package/dist/component/{form-D3iU18lh.js → form-DHAKwnLt.js} +3850 -3872
  60. package/dist/component/form.css +1 -1
  61. package/dist/component/form.js +2 -2
  62. package/dist/component/{header-field-rac-DAEzcleV.js → header-field-rac-CwmVpz3r.js} +4 -4
  63. package/dist/component/{header-rac-CJZ4qMFg.js → header-rac-ahkGRjSy.js} +1 -1
  64. package/dist/component/{image-choice-rac-BFAMHwPh.js → image-choice-rac-BwxkkdUu.js} +17 -17
  65. package/dist/component/{index-DQW26cnX.js → index-BFi_n6B7.js} +2 -2
  66. package/dist/component/{index-W7GOFnq8.js → index-BQf23zZi.js} +91 -91
  67. package/dist/component/{isObjectLike-CE8eaxSI.js → isObjectLike-DHcMRYYH.js} +15 -15
  68. package/dist/component/{multiline-address-field-rac-FbJO0HFf.js → multiline-address-field-rac-C6xaqNOk.js} +68 -60
  69. package/dist/component/{multiline-address-rac-CI-vt6Pm.js → multiline-address-rac-DF4TFuDx.js} +1 -1
  70. package/dist/component/{number-input-field-rac-BRVAr7LL.js → number-input-field-rac-uVJ3SBv2.js} +27 -27
  71. package/dist/component/{number-input-rac-C8hCiJiu.js → number-input-rac-D6ERhrSM.js} +1 -1
  72. package/dist/component/{password-rac-Baslr6Ga.js → password-rac-CAiC0ZKl.js} +47 -46
  73. package/dist/component/{payment-input-rac-CfJSKxYz.js → payment-input-rac-Bu25xvby.js} +33 -32
  74. package/dist/component/{phone-input-field-rac-Dqh4CXdC.js → phone-input-field-rac-32qUvCsC.js} +46 -45
  75. package/dist/component/{phone-rac-DaLuGuxd.js → phone-rac-mNrpj30q.js} +1 -1
  76. package/dist/component/{product-list-rac-PNMwRBtL.js → product-list-rac-zHdM9rHw.js} +53 -53
  77. package/dist/component/{quiz-radio-group-rac-DN8vY-oM.js → quiz-radio-group-rac-BaSlT8w3.js} +1 -1
  78. package/dist/component/{radio-button-module-classes-DlJi9a2f.js → radio-button-module-classes-BdWjkBlX.js} +9 -9
  79. package/dist/component/{radio-group-field-rac-C0tLXhl5.js → radio-group-field-rac-DI0UgTBr.js} +12 -12
  80. package/dist/component/{radio-group-rac-FAk7PYgP.js → radio-group-rac-D2ESG8J4.js} +1 -1
  81. package/dist/component/{rating-input-field-rac-Cl1kH_uu.js → rating-input-field-rac-BYT2XqOK.js} +26 -26
  82. package/dist/component/{rating-input-rac-D9p-0pkI.js → rating-input-rac-D-5CmVAX.js} +1 -1
  83. package/dist/component/{rich-content-rac.module-Dkr46kPC.js → rich-content-rac.module-Dp9Advo9.js} +8 -8
  84. package/dist/component/{rich-text-field-rac-DthhTvTp.js → rich-text-field-rac-COEUwoXQ.js} +4 -4
  85. package/dist/component/{rich-text-rac-DqZX4NeB.js → rich-text-rac-CQZLjBQ0.js} +1 -1
  86. package/dist/component/{service-dropdown-rac-BMOGLU2Z.js → service-dropdown-rac-BTtJVFv8.js} +44 -45
  87. package/dist/component/{services-multi-choice-rac-DcdUewzJ.js → services-multi-choice-rac-hbY3g0Kb.js} +11 -11
  88. package/dist/component/{signature-rac-BRvN6kUW.js → signature-rac-CTCNclwL.js} +67 -67
  89. package/dist/component/{submit-button-rac-B70UC8eS.js → submit-button-rac-kKGeVgsG.js} +25 -25
  90. package/dist/component/{tags-field-rac-NpYyV8X4.js → tags-field-rac-CVf7oQr_.js} +35 -35
  91. package/dist/component/{tags-rac-BMEbpJ-z.js → tags-rac-DiX1_nTT.js} +1 -1
  92. package/dist/component/{text-area-field-rac-BLSrNwJ6.js → text-area-field-rac-IhBNXiDl.js} +22 -22
  93. package/dist/component/{text-area-rac-Cm7aAfIz.js → text-area-rac-DHevCtFF.js} +1 -1
  94. package/dist/component/{text-input-field-rac-BDqV7s0M.js → text-input-field-rac-Da3_wTdh.js} +5 -5
  95. package/dist/component/text-input-headless-DcZRRXCp.js +45 -0
  96. package/dist/component/{text-input-rac-Cc_SkCCS.js → text-input-rac-564LIZ1_.js} +1 -1
  97. package/dist/component/{time-input-rac-DDCiAFe2.js → time-input-rac-p-Nnsxp_.js} +54 -54
  98. package/dist/component/{url-input-field-rac-jen6pbz7.js → url-input-field-rac-DjrcpRtm.js} +27 -26
  99. package/dist/component/{url-input-rac-BWh6udtS.js → url-input-rac-B3brpyop.js} +1 -1
  100. package/dist/component/use-dropdown-trigger-class-name-BWTT7ltv.js +117 -0
  101. package/dist/component/{use-element-state-class-name-B1r_nXW1.js → use-element-state-class-name-CUZuhFvZ.js} +3 -3
  102. package/dist/component/{use-hoverable-input-class-name-B-FhrcyQ.js → use-hoverable-input-class-name-ugX8-g4E.js} +6 -6
  103. package/dist/component/use-is-forced-open-dropdown-DUZMvWpk.js +48 -0
  104. package/dist/component/{use-service-options-base-CTA_43F3.js → use-service-options-base-hqO9Ev38.js} +6 -6
  105. package/dist/component/use-text-input-class-name-wp9dzpEy.js +6 -0
  106. package/dist/form.d.ts +5 -0
  107. package/package.json +2 -2
  108. package/dist/component/date-input-field-rac-BnlAOn12.js +0 -290
  109. package/dist/component/dext-radio-group-rac-Czr5yY3K.js +0 -18
  110. package/dist/component/text-input-headless-B0jcwDev.js +0 -44
  111. package/dist/component/use-dropdown-option-class-name-OD8brKoy.js +0 -115
  112. package/dist/component/use-dropdown-trigger-class-name-BrkmG0ad.js +0 -40
  113. package/dist/component/use-text-input-class-name-BXuk3TK7.js +0 -6
@@ -1,87 +1,87 @@
1
- import e, { useCallback as H, useRef as x, useContext as V } from "react";
2
- import { RicosViewer as j } from "@wix/ricos/viewer";
1
+ import e, { useCallback as k, useRef as V, useContext as j } from "react";
2
+ import { RicosViewer as q } from "@wix/ricos/viewer";
3
3
  import m from "classnames";
4
- import { parseTime as q } from "@internationalized/date";
5
- import { TimeField as v, DateInput as z, DateSegment as _, TimeFieldStateContext as B } from "react-aria-components";
6
- import { bn as p, bk as U, bx as S, bp as w, R as G, $ as Q, G as $, u as J } from "./form-D3iU18lh.js";
4
+ import { parseTime as v } from "@internationalized/date";
5
+ import { TimeField as x, DateInput as z, DateSegment as _, TimeFieldStateContext as B } from "react-aria-components";
6
+ import { bo as p, bl as U, by as T, bq as w, S as Q, a0 as G, H as J, v as K } from "./form-DHAKwnLt.js";
7
7
  import { f as u, a as F } from "./find-child-C60k4CxG.js";
8
- import { D as K, E as W } from "./field-error-headless-ClPQ03Jc.js";
9
- import { L as X } from "./field-label-headless-DhN8Lkuq.js";
10
- import { E as Y } from "./error-icon-hZxQ6DEy.js";
11
- import { H as T } from "./custom-focus-class-_483Pkwp.js";
8
+ import { D as W, E as X } from "./field-error-headless-E8WjFr_n.js";
9
+ import { L as Y } from "./field-label-headless-BakLOu5E.js";
10
+ import { E as Z } from "./error-icon-hZxQ6DEy.js";
11
+ import { H as S } from "./custom-focus-class-_483Pkwp.js";
12
12
  import { s as f } from "./field-rac.module-DfEb7pBp.js";
13
- import { u as Z } from "./use-text-input-class-name-BXuk3TK7.js";
13
+ import { u as $ } from "./use-text-input-class-name-wp9dzpEy.js";
14
14
  const r = ({ children: t }) => {
15
- const { id: n, value: l, onChange: a, disabled: i, readOnly: o, required: c, onBlur: s, onFocus: E, use24HourFormat: b, FieldLayout: C, hasError: g } = p(), { inputId: I, ariaDescribedBy: R, labelId: D } = U(), L = H((M) => {
16
- const k = ae(M);
17
- a(k);
15
+ const { id: n, value: s, onChange: a, disabled: i, readOnly: o, required: c, onBlur: l, onFocus: E, use24HourFormat: b, FieldLayout: C, hasError: g } = p(), { inputId: I, ariaDescribedBy: D, labelId: L } = U(), R = k((M) => {
16
+ const H = ae(M);
17
+ a(H);
18
18
  }, [
19
19
  a
20
- ]), N = u(t, r.Label), y = u(t, r.Time), P = u(t, r.Description), A = u(t, r.Error), O = ne(l);
20
+ ]), N = u(t, r.Label), y = u(t, r.Time), P = u(t, r.Description), A = u(t, r.Error), O = ne(s);
21
21
  return /* @__PURE__ */ e.createElement(C, {
22
22
  fieldId: n,
23
23
  renderLabel: () => N,
24
- renderInput: () => /* @__PURE__ */ e.createElement(v, {
25
- "aria-labelledby": D,
24
+ renderInput: () => /* @__PURE__ */ e.createElement(x, {
25
+ "aria-labelledby": L,
26
26
  id: I,
27
- "aria-describedby": R,
27
+ "aria-describedby": D,
28
28
  value: O,
29
- onChange: L,
29
+ onChange: R,
30
30
  isDisabled: i,
31
31
  isReadOnly: o,
32
32
  isInvalid: g,
33
33
  isRequired: c,
34
- onBlur: s,
34
+ onBlur: l,
35
35
  onFocus: E,
36
36
  hourCycle: b ? 24 : 12
37
37
  }, y),
38
38
  renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, A, P)
39
39
  });
40
40
  }, d = ({ children: t, className: n }) => {
41
- const { hasError: l, hidePlaceholder: a } = p(), i = u(t, d.Hour), o = u(t, d.Minute), c = u(t, d.Period);
41
+ const { hasError: s, hidePlaceholder: a } = p(), i = u(t, d.Hour), o = u(t, d.Minute), c = u(t, d.Period);
42
42
  return /* @__PURE__ */ e.createElement(z, {
43
43
  className: n,
44
- "data-invalid": l || void 0,
44
+ "data-invalid": s || void 0,
45
45
  "data-placeholder-hidden": a || void 0
46
- }, (s) => {
47
- switch (s.type) {
46
+ }, (l) => {
47
+ switch (l.type) {
48
48
  case "hour":
49
49
  return F(i, {
50
- segment: s
50
+ segment: l
51
51
  }) || /* @__PURE__ */ e.createElement(e.Fragment, null);
52
52
  case "minute":
53
53
  return F(o, {
54
- segment: s
54
+ segment: l
55
55
  }) || /* @__PURE__ */ e.createElement(e.Fragment, null);
56
56
  case "dayPeriod":
57
57
  return F(c, {
58
- segment: s
58
+ segment: l
59
59
  }) || /* @__PURE__ */ e.createElement(e.Fragment, null);
60
60
  case "literal":
61
61
  return /* @__PURE__ */ e.createElement(_, {
62
- segment: s
62
+ segment: l
63
63
  });
64
64
  default:
65
65
  return /* @__PURE__ */ e.createElement(e.Fragment, null);
66
66
  }
67
67
  });
68
68
  }, ee = ({ className: t, ...n }) => {
69
- const { id: l, hidePlaceholder: a } = p(), { segment: i } = n, { t: o } = S(), c = x(null);
69
+ const { id: s, hidePlaceholder: a } = p(), { segment: i } = n, { t: o } = T(), c = V(null);
70
70
  w(() => {
71
71
  var E;
72
72
  (E = c.current) == null || E.focus();
73
- }, l);
74
- const s = a ? void 0 : o("field.date.placeholder.hour");
73
+ }, s);
74
+ const l = a ? void 0 : o("field.date.placeholder.hour");
75
75
  return /* @__PURE__ */ e.createElement(_, {
76
76
  ref: c,
77
77
  segment: i,
78
78
  className: t,
79
- ...s && {
80
- placeholder: s
79
+ ...l && {
80
+ placeholder: l
81
81
  }
82
82
  });
83
83
  }, te = ({ className: t, ...n }) => {
84
- const { hidePlaceholder: l } = p(), { segment: a } = n, { t: i } = S(), o = l ? void 0 : i("field.date.placeholder.minute");
84
+ const { hidePlaceholder: s } = p(), { segment: a } = n, { t: i } = T(), o = s ? void 0 : i("field.date.placeholder.minute");
85
85
  return /* @__PURE__ */ e.createElement(_, {
86
86
  segment: a,
87
87
  className: t,
@@ -90,11 +90,11 @@ const r = ({ children: t }) => {
90
90
  }
91
91
  });
92
92
  }, re = ({ className: t, ...n }) => {
93
- const { hidePlaceholder: l } = p(), { segment: a } = n, { t: i } = S(), o = V(B), c = l ? void 0 : i("field.date.placeholder.period"), s = () => o == null ? void 0 : o.increment("dayPeriod");
93
+ const { hidePlaceholder: s } = p(), { segment: a } = n, { t: i } = T(), o = j(B), c = s ? void 0 : i("field.date.placeholder.period"), l = () => o == null ? void 0 : o.increment("dayPeriod");
94
94
  return /* @__PURE__ */ e.createElement(_, {
95
95
  segment: a,
96
96
  className: t,
97
- onClick: s,
97
+ onClick: l,
98
98
  ...c && {
99
99
  placeholder: c
100
100
  }
@@ -103,15 +103,15 @@ const r = ({ children: t }) => {
103
103
  d.Hour = ee;
104
104
  d.Minute = te;
105
105
  d.Period = re;
106
- r.Label = X;
106
+ r.Label = Y;
107
107
  r.Time = d;
108
- r.Description = K;
109
- r.Error = W;
108
+ r.Description = W;
109
+ r.Error = X;
110
110
  function ne(t) {
111
111
  if (!t)
112
112
  return null;
113
113
  try {
114
- return q(t);
114
+ return v(t);
115
115
  } catch {
116
116
  return null;
117
117
  }
@@ -119,39 +119,39 @@ function ne(t) {
119
119
  function ae(t) {
120
120
  if (!t)
121
121
  return null;
122
- const n = String(t.hour).padStart(2, "0"), l = String(t.minute).padStart(2, "0"), a = String(t.second).padStart(2, "0");
122
+ const n = String(t.hour).padStart(2, "0"), s = String(t.minute).padStart(2, "0"), a = String(t.second).padStart(2, "0");
123
123
  return [
124
124
  n,
125
- l,
125
+ s,
126
126
  a
127
127
  ].join(":");
128
128
  }
129
- const oe = "_time_rzj2k_1", se = "_hour_rzj2k_14", le = "_minute_rzj2k_15", ie = "_period_rzj2k_16", h = {
129
+ const oe = "_time_rzj2k_1", le = "_hour_rzj2k_14", se = "_minute_rzj2k_15", ie = "_period_rzj2k_16", h = {
130
130
  time: oe,
131
- hour: se,
132
- minute: le,
131
+ hour: le,
132
+ minute: se,
133
133
  period: ie
134
- }, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(j, {
134
+ }, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(q, {
135
135
  content: t,
136
136
  locale: n
137
137
  }), me = () => {
138
- const t = Z(h.time);
138
+ const t = $(h.time);
139
139
  return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
140
- className: m(G, f.label)
140
+ className: m(Q, f.label)
141
141
  }, /* @__PURE__ */ e.createElement(r.Label.Required, {
142
- className: m(Q, f.requiredMark)
142
+ className: m(G, f.requiredMark)
143
143
  })), /* @__PURE__ */ e.createElement(r.Time, {
144
144
  className: t
145
145
  }, /* @__PURE__ */ e.createElement(r.Time.Hour, {
146
- className: m(h.hour, T)
146
+ className: m(h.hour, S)
147
147
  }), /* @__PURE__ */ e.createElement(r.Time.Minute, {
148
- className: m(h.minute, T)
148
+ className: m(h.minute, S)
149
149
  }), /* @__PURE__ */ e.createElement(r.Time.Period, {
150
- className: m(h.period, T)
150
+ className: m(h.period, S)
151
151
  })), /* @__PURE__ */ e.createElement(r.Error, {
152
- className: m($, f.error)
153
- }, /* @__PURE__ */ e.createElement(Y, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
154
- className: m(J, f.description)
152
+ className: m(J, f.error)
153
+ }, /* @__PURE__ */ e.createElement(Z, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
154
+ className: m(K, f.description)
155
155
  }, ce));
156
156
  }, Ie = () => /* @__PURE__ */ e.createElement(me, null);
157
157
  export {
@@ -1,62 +1,63 @@
1
- import { RicosViewer as S } from "@wix/ricos/viewer";
1
+ import { RicosViewer as N } from "@wix/ricos/viewer";
2
2
  import i from "classnames";
3
3
  import r, { useCallback as h, useRef as O } from "react";
4
4
  import { TextField as y, Input as A } from "react-aria-components";
5
- import { bn as d, bk as E, bp as k, R as B, $ as T, G as g, u as v } from "./form-D3iU18lh.js";
5
+ import { bo as d, bl as E, bq as v, S as B, a0 as T, H as g, v as k } from "./form-DHAKwnLt.js";
6
6
  import { f as c } from "./find-child-C60k4CxG.js";
7
- import { D as M, E as P } from "./field-error-headless-ClPQ03Jc.js";
8
- import { L as q } from "./field-label-headless-DhN8Lkuq.js";
7
+ import { D as q, E as M } from "./field-error-headless-E8WjFr_n.js";
8
+ import { L as P } from "./field-label-headless-BakLOu5E.js";
9
9
  import { u as x } from "./use-invoke-callback-UH73A_J3.js";
10
10
  import { E as U } from "./error-icon-hZxQ6DEy.js";
11
11
  import { s as u } from "./field-rac.module-DfEb7pBp.js";
12
- import { u as $ } from "./use-text-input-class-name-BXuk3TK7.js";
13
- const w = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
14
- const { id: n, value: o, onChange: s, disabled: m, readOnly: a, required: l, hasError: I, onBlur: b, onFocus: f, FieldLayout: R } = d(), { labelId: F } = E(), p = x(b), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), N = h(() => {
15
- s(w(o)), p();
12
+ import { u as w } from "./use-text-input-class-name-wp9dzpEy.js";
13
+ const H = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
14
+ const { id: o, value: l, onChange: s, disabled: m, readOnly: a, required: n, hasError: I, onBlur: b, onFocus: f, FieldLayout: R } = d(), { labelId: F } = E(), p = x(b), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), S = h(() => {
15
+ s(H(l)), p();
16
16
  }, [
17
17
  p,
18
18
  s,
19
- o
19
+ l
20
20
  ]);
21
21
  return /* @__PURE__ */ r.createElement(R, {
22
- fieldId: n,
22
+ fieldId: o,
23
23
  renderLabel: () => L,
24
24
  renderInput: () => /* @__PURE__ */ r.createElement(y, {
25
25
  "aria-labelledby": F,
26
- value: o ?? "",
26
+ value: l ?? "",
27
27
  onChange: s,
28
28
  isDisabled: m,
29
29
  isReadOnly: a,
30
- isRequired: l,
30
+ isRequired: n,
31
31
  isInvalid: I,
32
- onBlur: N,
32
+ onBlur: S,
33
33
  onFocus: f
34
34
  }, D),
35
35
  renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, C)
36
36
  });
37
37
  }, V = ({ className: t }) => {
38
- const { id: n, placeholder: o } = d(), { inputId: s, ariaDescribedBy: m } = E(), a = O(null);
39
- return k(() => {
40
- var l;
41
- (l = a.current) == null || l.focus();
42
- }, n), /* @__PURE__ */ r.createElement(A, {
38
+ const { id: o, placeholder: l } = d(), { inputId: s, ariaDescribedBy: m } = E(), a = O(null);
39
+ return v(() => {
40
+ var n;
41
+ (n = a.current) == null || n.focus();
42
+ }, o), /* @__PURE__ */ r.createElement(A, {
43
43
  ref: a,
44
44
  id: s,
45
45
  type: "url",
46
+ autoComplete: "url",
46
47
  "aria-describedby": m,
47
48
  className: t,
48
- placeholder: o
49
+ placeholder: l
49
50
  });
50
51
  };
51
- e.Label = q;
52
+ e.Label = P;
52
53
  e.Input = V;
53
- e.Description = M;
54
- e.Error = P;
55
- const W = ({ content: t, locale: n }) => /* @__PURE__ */ r.createElement(S, {
54
+ e.Description = q;
55
+ e.Error = M;
56
+ const W = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(N, {
56
57
  content: t,
57
- locale: n
58
+ locale: o
58
59
  }), te = () => {
59
- const t = $();
60
+ const t = w();
60
61
  return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
61
62
  className: i(B, u.label)
62
63
  }, /* @__PURE__ */ r.createElement(e.Label.Required, {
@@ -66,7 +67,7 @@ const W = ({ content: t, locale: n }) => /* @__PURE__ */ r.createElement(S, {
66
67
  }), /* @__PURE__ */ r.createElement(e.Error, {
67
68
  className: i(g, u.error)
68
69
  }, /* @__PURE__ */ r.createElement(U, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
69
- className: i(v, u.description)
70
+ className: i(k, u.description)
70
71
  }, W));
71
72
  };
72
73
  export {
@@ -1,5 +1,5 @@
1
1
  import r from "react";
2
- import { U as t } from "./url-input-field-rac-jen6pbz7.js";
2
+ import { U as t } from "./url-input-field-rac-DjrcpRtm.js";
3
3
  const n = () => /* @__PURE__ */ r.createElement(t, null);
4
4
  export {
5
5
  n as UrlInputRAC
@@ -0,0 +1,117 @@
1
+ import d, { useContext as N, useRef as x, useState as f, Children as y, useLayoutEffect as p, useMemo as I } from "react";
2
+ import { CollectionRendererContext as g, DefaultCollectionRenderer as E, ListBox as L } from "react-aria-components";
3
+ import M from "classnames";
4
+ import { s as R } from "./field-rac.module-DfEb7pBp.js";
5
+ import { z as T, G as P } from "./form-DHAKwnLt.js";
6
+ import { u as H } from "./use-element-state-class-name-CUZuhFvZ.js";
7
+ import { u as B } from "./use-hoverable-input-class-name-ugX8-g4E.js";
8
+ const h = 1 / 0, A = {
9
+ position: "absolute",
10
+ width: 0,
11
+ height: "var(--popoverMaxHeight, 240px)",
12
+ visibility: "hidden",
13
+ pointerEvents: "none"
14
+ }, G = (e, o) => Object.create(e, {
15
+ [Symbol.iterator]: {
16
+ value: function* () {
17
+ let s = 0;
18
+ for (const n of e) {
19
+ if (s >= o)
20
+ return;
21
+ s += 1, yield n;
22
+ }
23
+ }
24
+ }
25
+ }), S = (e) => e.querySelector('[role="option"]') !== null, V = (e, o) => {
26
+ const s = e.getBoundingClientRect().top - e.scrollTop;
27
+ let n = 0;
28
+ for (const r of e.querySelectorAll('[role="option"]')) {
29
+ const m = r.getBoundingClientRect().top - s;
30
+ if (n > 0 && m >= o)
31
+ break;
32
+ n += 1;
33
+ }
34
+ return n;
35
+ }, K = ({ isForcedOpen: e, ...o }) => {
36
+ const s = N(g), n = x(null), [r, m] = f(null), [c, O] = f(h), [b, _] = f(0), w = y.count(o.children);
37
+ p(() => {
38
+ O(h);
39
+ }, [
40
+ r,
41
+ w,
42
+ b
43
+ ]), p(() => {
44
+ const t = n.current;
45
+ if (!r || !t || c !== h)
46
+ return;
47
+ const a = () => {
48
+ const l = r.getBoundingClientRect().height;
49
+ l > 0 && O(V(t, l));
50
+ };
51
+ if (S(t)) {
52
+ a();
53
+ return;
54
+ }
55
+ const i = new MutationObserver(() => {
56
+ S(t) && (i.disconnect(), a());
57
+ });
58
+ return i.observe(t, {
59
+ childList: !0,
60
+ subtree: !0
61
+ }), () => i.disconnect();
62
+ }, [
63
+ r,
64
+ c,
65
+ b
66
+ ]), p(() => {
67
+ const t = n.current;
68
+ if (!r || !t || typeof ResizeObserver > "u")
69
+ return;
70
+ const a = /* @__PURE__ */ new Map(), i = new ResizeObserver((l) => {
71
+ l.some(({ target: u, contentRect: v }) => {
72
+ const C = a.get(u);
73
+ return a.set(u, v.height), C !== void 0 && C !== v.height;
74
+ }) && _((u) => u + 1);
75
+ });
76
+ return i.observe(r), t.querySelectorAll('[role="option"]').forEach((l) => i.observe(l)), () => i.disconnect();
77
+ }, [
78
+ r,
79
+ c
80
+ ]);
81
+ const D = I(() => ({
82
+ ...E,
83
+ CollectionRoot: (t) => /* @__PURE__ */ d.createElement(E.CollectionRoot, {
84
+ ...t,
85
+ collection: G(t.collection, c)
86
+ })
87
+ }), [
88
+ c
89
+ ]);
90
+ return /* @__PURE__ */ d.createElement(g.Provider, {
91
+ value: e ? D : s
92
+ }, /* @__PURE__ */ d.createElement(L, {
93
+ ref: n,
94
+ ...o
95
+ }), e && /* @__PURE__ */ d.createElement("div", {
96
+ ref: m,
97
+ style: A
98
+ }));
99
+ }, W = {
100
+ base: R.selectOption,
101
+ selected: R.selectOptionSelected,
102
+ hover: R.selectOptionHover
103
+ }, q = ({ isSelected: e, isHovered: o, isFocused: s }) => ({
104
+ isSelected: e,
105
+ isHovered: (o || s) && !e
106
+ }), Q = (...e) => {
107
+ const o = H({
108
+ globalClasses: T,
109
+ moduleClasses: W
110
+ });
111
+ return (s) => M(o(q(s)), e);
112
+ }, Z = (...e) => B(P, e);
113
+ export {
114
+ K as V,
115
+ Z as a,
116
+ Q as u
117
+ };
@@ -1,6 +1,6 @@
1
1
  import i from "classnames";
2
- import { bg as s, aP as v } from "./form-D3iU18lh.js";
3
- const S = ({ globalClasses: e, moduleClasses: r }) => {
2
+ import { bh as s, aQ as v } from "./form-DHAKwnLt.js";
3
+ const x = ({ globalClasses: e, moduleClasses: r }) => {
4
4
  var d;
5
5
  const c = ((d = s(...v(e))) == null ? void 0 : d.split(/\s+/)) ?? [], o = [
6
6
  e.selected,
@@ -19,5 +19,5 @@ const S = ({ globalClasses: e, moduleClasses: r }) => {
19
19
  };
20
20
  };
21
21
  export {
22
- S as u
22
+ x as u
23
23
  };
@@ -1,8 +1,8 @@
1
- import { bn as m } from "./form-D3iU18lh.js";
1
+ import { bo as n } from "./form-DHAKwnLt.js";
2
2
  import { s as e } from "./field-rac.module-DfEb7pBp.js";
3
- import { u } from "./use-element-state-class-name-B1r_nXW1.js";
3
+ import { u } from "./use-element-state-class-name-CUZuhFvZ.js";
4
4
  const b = (s, a) => {
5
- const { disabled: t, readOnly: o } = m(), r = u({
5
+ const { disabled: t, readOnly: o } = n(), r = u({
6
6
  globalClasses: s,
7
7
  moduleClasses: {
8
8
  base: [
@@ -12,11 +12,11 @@ const b = (s, a) => {
12
12
  hover: e.inputHover
13
13
  }
14
14
  });
15
- return ({ isHovered: l, isFocused: n, isFocusWithin: i }) => r({
15
+ return ({ isHovered: l, isFocused: i, isFocusWithin: m }) => r({
16
16
  isSelected: !1,
17
17
  isHovered: l,
18
- isFocused: n,
19
- isFocusWithin: i,
18
+ isFocused: i,
19
+ isFocusWithin: m,
20
20
  isInteractive: !t && !o
21
21
  });
22
22
  };
@@ -0,0 +1,48 @@
1
+ import { useContext as i, useMemo as c } from "react";
2
+ import { bi as E, au as T, bg as a, F as s } from "./form-DHAKwnLt.js";
3
+ const u = [
4
+ s.DROPDOWN,
5
+ s.DEXT_DROPDOWN,
6
+ s.SERVICES_DROPDOWN,
7
+ s.DATE_INPUT,
8
+ s.CONTACTS_BIRTHDATE,
9
+ s.DATE_TIME_INPUT,
10
+ s.DEXT_DATE_TIME_INPUT
11
+ ], d = [
12
+ s.DATE_PICKER,
13
+ s.DEXT_DATE_PICKER
14
+ ], O = [
15
+ s.PHONE,
16
+ s.CONTACTS_PHONE,
17
+ s.BOOKINGS_PHONE,
18
+ s.DEXT_PHONE
19
+ ], _ = [
20
+ s.MULTILINE_ADDRESS,
21
+ s.BOOKINGS_ADDRESS,
22
+ s.ECOM_ADDRESS
23
+ ], I = ({ properties: e }) => {
24
+ var n, o, t, r;
25
+ return ((r = (t = (o = (n = e.validation) == null ? void 0 : n.string) == null ? void 0 : o.phoneOptions) == null ? void 0 : t.allowedCountryCodes) == null ? void 0 : r.length) !== 1;
26
+ }, P = ({ properties: e }) => {
27
+ var n, o;
28
+ return ((o = (n = e.fieldSettings) == null ? void 0 : n.country) == null ? void 0 : o.show) !== !1;
29
+ }, l = (e, n) => O.includes(e.fieldType) ? !n && I(e) : _.includes(e.fieldType) ? P(e) : u.includes(e.fieldType), p = (e) => d.includes(e.fieldType), S = ({ properties: e }) => !e.disabled && !e.readOnly, D = (e) => {
30
+ const n = i(T), { isMobile: o = !1 } = a();
31
+ return c(() => !n || n.parentId ? [] : n.fields.filter((t) => e(t, o) && S(t)).map((t) => t.id), [
32
+ n,
33
+ o,
34
+ e
35
+ ]);
36
+ }, A = (e) => {
37
+ var t;
38
+ const n = ((t = E().dropdown) == null ? void 0 : t.open) === !0, o = D(l);
39
+ return n && o.includes(e);
40
+ }, R = (e) => {
41
+ var t;
42
+ const n = ((t = E().datePicker) == null ? void 0 : t.open) === !0, o = D(p);
43
+ return n && o.includes(e);
44
+ };
45
+ export {
46
+ A as a,
47
+ R as u
48
+ };
@@ -1,7 +1,7 @@
1
1
  import { useState as o, useCallback as y, useEffect as m, useMemo as D } from "react";
2
- import { bm as v } from "./form-D3iU18lh.js";
2
+ import { bn as v } from "./form-DHAKwnLt.js";
3
3
  const k = (I) => {
4
- const { fieldType: L, isEditor: t = !1, postProcessOptions: i, customFetchLogic: a, onInitialDataLoaded: n } = I, [O, h] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(L), r = y((e) => {
4
+ const { fieldType: L, isEditor: t = !1, postProcessOptions: i, customFetchLogic: n, onInitialDataLoaded: a } = I, [O, h] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(L), r = y((e) => {
5
5
  let d = e.map((l) => ({
6
6
  value: l.id ?? "",
7
7
  label: l.name ?? "",
@@ -14,16 +14,16 @@ const k = (I) => {
14
14
  m(() => {
15
15
  if (s != null && s.services) {
16
16
  const e = r(s.services);
17
- p(e), u(e.length === 0), f(!0), n && n(e);
17
+ p(e), u(e.length === 0), f(!0), a && a(e);
18
18
  }
19
19
  }, [
20
20
  s,
21
21
  r,
22
- n
22
+ a
23
23
  ]), m(() => {
24
- a && !t && a();
24
+ n && !t && n();
25
25
  }, [
26
- a,
26
+ n,
27
27
  t
28
28
  ]);
29
29
  const b = D(() => t || c, [
@@ -0,0 +1,6 @@
1
+ import { ac as a } from "./form-DHAKwnLt.js";
2
+ import { u as e } from "./use-hoverable-input-class-name-ugX8-g4E.js";
3
+ const m = (...s) => e(a, s);
4
+ export {
5
+ m as u
6
+ };
package/dist/form.d.ts CHANGED
@@ -6987,6 +6987,11 @@ type ElementProps = ElementTree & {
6987
6987
  }> & {
6988
6988
  open?: boolean;
6989
6989
  };
6990
+ datePicker?: ElementEntry<{
6991
+ calendar?: LeafEntry;
6992
+ }> & {
6993
+ open?: boolean;
6994
+ };
6990
6995
  signatureContainer?: ElementEntry<ElementTree & {
6991
6996
  signatureDropZone?: ElementEntry<{
6992
6997
  signatureUploadButton?: ElementEntry<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/form-elements",
3
- "version": "1.145.0",
3
+ "version": "1.147.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": "5fdf705c85d0a8048b3baf1d8fb6da636a2a6835970b5eccbf04785e"
159
+ "falconPackageHash": "dcde916fdec9c1773c083248f6cc45a6b733ed0fb4d29edda6c57445"
160
160
  }