@a-ui/react 7.13.0-beta.4 → 7.13.0-beta.6

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 (269) hide show
  1. package/cjs/index10.js +1 -1
  2. package/cjs/index100.js +1 -1
  3. package/cjs/index101.js +1 -1
  4. package/cjs/index102.js +1 -1
  5. package/cjs/index103.js +1 -1
  6. package/cjs/index104.js +1 -1
  7. package/cjs/index105.js +1 -1
  8. package/cjs/index106.js +1 -1
  9. package/cjs/index107.js +1 -1
  10. package/cjs/index108.js +1 -1
  11. package/cjs/index109.js +1 -1
  12. package/cjs/index11.js +1 -1
  13. package/cjs/index110.js +1 -1
  14. package/cjs/index111.js +1 -1
  15. package/cjs/index112.js +1 -1
  16. package/cjs/index113.js +1 -1
  17. package/cjs/index114.js +2 -1
  18. package/cjs/index115.js +1 -1
  19. package/cjs/index116.js +1 -1
  20. package/cjs/index117.js +1 -1
  21. package/cjs/index118.js +1 -1
  22. package/cjs/index119.js +10 -1
  23. package/cjs/index12.js +1 -1
  24. package/cjs/index120.js +1 -1
  25. package/cjs/index121.js +1 -1
  26. package/cjs/index122.js +1 -1
  27. package/cjs/index123.js +1 -2
  28. package/cjs/index124.js +1 -1
  29. package/cjs/index125.js +1 -1
  30. package/cjs/index126.js +5 -1
  31. package/cjs/index127.js +9 -1
  32. package/cjs/index128.js +1 -10
  33. package/cjs/index129.js +1 -1
  34. package/cjs/index13.js +1 -1
  35. package/cjs/index130.js +1 -1
  36. package/cjs/index131.js +1 -1
  37. package/cjs/index132.js +1 -1
  38. package/cjs/index133.js +1 -1
  39. package/cjs/index134.js +1 -1
  40. package/cjs/index135.js +1 -5
  41. package/cjs/index136.js +1 -9
  42. package/cjs/index14.js +1 -1
  43. package/cjs/index144.js +1 -11
  44. package/cjs/index145.js +11 -1
  45. package/cjs/index146.js +1 -1
  46. package/cjs/index147.js +1 -1
  47. package/cjs/index16.js +1 -1
  48. package/cjs/index167.js +1 -1
  49. package/cjs/index17.js +1 -1
  50. package/cjs/index170.js +1 -1
  51. package/cjs/index171.js +1 -1
  52. package/cjs/index172.js +1 -1
  53. package/cjs/index176.js +1 -1
  54. package/cjs/index177.js +1 -1
  55. package/cjs/index18.js +1 -1
  56. package/cjs/index187.js +1 -1
  57. package/cjs/index194.js +1 -1
  58. package/cjs/index2.js +1 -1
  59. package/cjs/index20.js +1 -1
  60. package/cjs/index21.js +1 -1
  61. package/cjs/index22.js +1 -1
  62. package/cjs/index224.js +1 -1
  63. package/cjs/index225.js +1 -1
  64. package/cjs/index226.js +1 -1
  65. package/cjs/index227.js +1 -1
  66. package/cjs/index228.js +1 -1
  67. package/cjs/index229.js +1 -1
  68. package/cjs/index230.js +1 -1
  69. package/cjs/index231.js +1 -1
  70. package/cjs/index24.js +1 -1
  71. package/cjs/index25.js +1 -1
  72. package/cjs/index26.js +1 -1
  73. package/cjs/index27.js +1 -1
  74. package/cjs/index28.js +1 -1
  75. package/cjs/index3.js +1 -1
  76. package/cjs/index30.js +1 -1
  77. package/cjs/index31.js +1 -1
  78. package/cjs/index32.js +1 -1
  79. package/cjs/index33.js +1 -1
  80. package/cjs/index34.js +1 -1
  81. package/cjs/index36.js +1 -1
  82. package/cjs/index37.js +1 -1
  83. package/cjs/index38.js +1 -1
  84. package/cjs/index39.js +1 -1
  85. package/cjs/index4.js +1 -1
  86. package/cjs/index40.js +1 -1
  87. package/cjs/index41.js +1 -1
  88. package/cjs/index42.js +1 -1
  89. package/cjs/index43.js +1 -1
  90. package/cjs/index44.js +1 -1
  91. package/cjs/index45.js +1 -1
  92. package/cjs/index46.js +1 -1
  93. package/cjs/index47.js +1 -1
  94. package/cjs/index48.js +1 -1
  95. package/cjs/index49.js +1 -1
  96. package/cjs/index5.js +1 -1
  97. package/cjs/index50.js +1 -1
  98. package/cjs/index51.js +1 -1
  99. package/cjs/index52.js +1 -1
  100. package/cjs/index53.js +1 -1
  101. package/cjs/index54.js +1 -1
  102. package/cjs/index55.js +1 -7
  103. package/cjs/index56.js +1 -1
  104. package/cjs/index57.js +1 -1
  105. package/cjs/index58.js +1 -1
  106. package/cjs/index59.js +1 -1
  107. package/cjs/index6.js +1 -1
  108. package/cjs/index60.js +1 -1
  109. package/cjs/index61.js +7 -1
  110. package/cjs/index62.js +1 -1
  111. package/cjs/index63.js +1 -1
  112. package/cjs/index64.js +1 -1
  113. package/cjs/index65.js +1 -1
  114. package/cjs/index67.js +1 -1
  115. package/cjs/index68.js +1 -1
  116. package/cjs/index69.js +1 -1
  117. package/cjs/index71.js +1 -1
  118. package/cjs/index8.js +1 -1
  119. package/cjs/index82.js +1 -1
  120. package/cjs/index83.js +1 -1
  121. package/cjs/index85.js +1 -1
  122. package/cjs/index86.js +1 -1
  123. package/cjs/index87.js +1 -0
  124. package/cjs/index88.js +1 -0
  125. package/cjs/index89.js +1 -1
  126. package/cjs/index9.js +1 -1
  127. package/cjs/index90.js +1 -1
  128. package/cjs/index91.js +1 -1
  129. package/cjs/index94.js +1 -1
  130. package/cjs/index95.js +1 -1
  131. package/cjs/index96.js +1 -1
  132. package/cjs/index97.js +1 -1
  133. package/cjs/index98.js +1 -1
  134. package/cjs/index99.js +1 -1
  135. package/es/index10.mjs +4 -4
  136. package/es/index100.mjs +4 -66
  137. package/es/index101.mjs +11 -3
  138. package/es/index102.mjs +247 -5
  139. package/es/index103.mjs +88 -10
  140. package/es/index104.mjs +14 -6
  141. package/es/index105.mjs +4 -11
  142. package/es/index106.mjs +2 -247
  143. package/es/index107.mjs +2 -89
  144. package/es/index108.mjs +4 -15
  145. package/es/index109.mjs +391 -4
  146. package/es/index11.mjs +1 -1
  147. package/es/index110.mjs +125 -2
  148. package/es/index111.mjs +134 -2
  149. package/es/index112.mjs +2 -63
  150. package/es/index113.mjs +7 -13
  151. package/es/index114.mjs +326 -6
  152. package/es/index115.mjs +49 -6
  153. package/es/index116.mjs +2 -6
  154. package/es/index117.mjs +64 -5
  155. package/es/index118.mjs +43 -5
  156. package/es/index119.mjs +59 -6
  157. package/es/index12.mjs +2 -2
  158. package/es/index120.mjs +45 -6
  159. package/es/index121.mjs +40 -2
  160. package/es/index122.mjs +2 -8
  161. package/es/index123.mjs +2 -327
  162. package/es/index124.mjs +2 -50
  163. package/es/index125.mjs +31 -2
  164. package/es/index126.mjs +19 -65
  165. package/es/index127.mjs +58 -40
  166. package/es/index128.mjs +62 -59
  167. package/es/index129.mjs +15 -45
  168. package/es/index13.mjs +2 -2
  169. package/es/index130.mjs +6 -39
  170. package/es/index131.mjs +7 -2
  171. package/es/index132.mjs +6 -2
  172. package/es/index133.mjs +6 -2
  173. package/es/index134.mjs +4 -30
  174. package/es/index135.mjs +7 -19
  175. package/es/index136.mjs +4 -60
  176. package/es/index14.mjs +3 -3
  177. package/es/index144.mjs +2 -58
  178. package/es/index145.mjs +58 -2
  179. package/es/index146.mjs +2 -2
  180. package/es/index147.mjs +2 -2
  181. package/es/index16.mjs +1 -1
  182. package/es/index167.mjs +1 -1
  183. package/es/index17.mjs +2 -2
  184. package/es/index170.mjs +1 -1
  185. package/es/index171.mjs +1 -1
  186. package/es/index172.mjs +1 -1
  187. package/es/index176.mjs +1 -1
  188. package/es/index177.mjs +1 -1
  189. package/es/index18.mjs +3 -3
  190. package/es/index187.mjs +1 -1
  191. package/es/index194.mjs +1 -1
  192. package/es/index2.mjs +1 -1
  193. package/es/index20.mjs +2 -2
  194. package/es/index21.mjs +1 -1
  195. package/es/index22.mjs +1 -1
  196. package/es/index224.mjs +67 -58
  197. package/es/index225.mjs +31 -9
  198. package/es/index226.mjs +9 -20
  199. package/es/index227.mjs +104 -64
  200. package/es/index228.mjs +102 -26
  201. package/es/index229.mjs +59 -9
  202. package/es/index230.mjs +9 -108
  203. package/es/index231.mjs +19 -106
  204. package/es/index24.mjs +4 -4
  205. package/es/index25.mjs +2 -2
  206. package/es/index26.mjs +1 -1
  207. package/es/index27.mjs +1 -1
  208. package/es/index28.mjs +1 -1
  209. package/es/index3.mjs +1 -1
  210. package/es/index30.mjs +2 -2
  211. package/es/index31.mjs +2 -2
  212. package/es/index32.mjs +2 -2
  213. package/es/index33.mjs +3 -3
  214. package/es/index34.mjs +1 -1
  215. package/es/index36.mjs +3 -3
  216. package/es/index37.mjs +3 -3
  217. package/es/index38.mjs +3 -3
  218. package/es/index39.mjs +3 -3
  219. package/es/index4.mjs +2 -2
  220. package/es/index40.mjs +2 -2
  221. package/es/index41.mjs +1 -1
  222. package/es/index42.mjs +4 -4
  223. package/es/index43.mjs +1 -1
  224. package/es/index44.mjs +2 -2
  225. package/es/index45.mjs +3 -3
  226. package/es/index46.mjs +3 -3
  227. package/es/index47.mjs +2 -2
  228. package/es/index48.mjs +1 -1
  229. package/es/index49.mjs +2 -2
  230. package/es/index50.mjs +1 -1
  231. package/es/index51.mjs +11 -8
  232. package/es/index52.mjs +8 -11
  233. package/es/index53.mjs +21 -28
  234. package/es/index54.mjs +8 -47
  235. package/es/index55.mjs +28 -409
  236. package/es/index56.mjs +47 -21
  237. package/es/index57.mjs +47 -45
  238. package/es/index58.mjs +30 -8
  239. package/es/index59.mjs +17 -49
  240. package/es/index6.mjs +3 -3
  241. package/es/index60.mjs +28 -61
  242. package/es/index61.mjs +407 -58
  243. package/es/index62.mjs +27 -27
  244. package/es/index63.mjs +35 -20
  245. package/es/index64.mjs +3 -3
  246. package/es/index65.mjs +35 -30
  247. package/es/index67.mjs +9 -9
  248. package/es/index68.mjs +2 -2
  249. package/es/index69.mjs +2 -2
  250. package/es/index71.mjs +6 -6
  251. package/es/index8.mjs +3 -3
  252. package/es/index82.mjs +83 -60
  253. package/es/index83.mjs +1 -1
  254. package/es/index85.mjs +60 -12
  255. package/es/index86.mjs +57 -56
  256. package/es/index87.mjs +16 -0
  257. package/es/index88.mjs +61 -0
  258. package/es/index89.mjs +5 -5
  259. package/es/index9.mjs +1 -1
  260. package/es/index90.mjs +3 -3
  261. package/es/index91.mjs +1 -1
  262. package/es/index93.mjs +2 -2
  263. package/es/index94.mjs +224 -380
  264. package/es/index95.mjs +2 -125
  265. package/es/index96.mjs +63 -130
  266. package/es/index97.mjs +3 -2
  267. package/es/index98.mjs +5 -235
  268. package/es/index99.mjs +11 -2
  269. package/package.json +1 -1
package/es/index10.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import { jsxs as M, Fragment as S, jsx as h } from "react/jsx-runtime";
2
- import { classNames as T } from "./index51.mjs";
3
- import { DEFAULT_EMPHASIS as j, Emphasis as p, Theme as D, SIZE_MAP as H, DEFAULT_SIZE as _ } from "./index53.mjs";
4
- import { renderAddOn as $ } from "./index59.mjs";
2
+ import { classNames as T } from "./index52.mjs";
3
+ import { DEFAULT_EMPHASIS as j, Emphasis as p, Theme as D, SIZE_MAP as H, DEFAULT_SIZE as _ } from "./index55.mjs";
4
+ import { renderAddOn as $ } from "./index57.mjs";
5
5
  import { useEffect as w } from "react";
6
- import { logWarning as B } from "./index58.mjs";
6
+ import { logWarning as B } from "./index54.mjs";
7
7
  function q({
8
8
  addOn: t,
9
9
  ariaLabel: e,
package/es/index100.mjs CHANGED
@@ -1,69 +1,7 @@
1
- import { tzOffset as s } from "./index226.mjs";
2
- class n extends Date {
3
- //#region static
4
- constructor(...e) {
5
- super(), e.length > 1 && typeof e[e.length - 1] == "string" && (this.timeZone = e.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(s(this.timeZone, this)) ? this.setTime(NaN) : e.length ? typeof e[0] == "number" && (e.length === 1 || e.length === 2 && typeof e[1] != "number") ? this.setTime(e[0]) : typeof e[0] == "string" ? this.setTime(+new Date(e[0])) : e[0] instanceof Date ? this.setTime(+e[0]) : (this.setTime(+new Date(...e)), U(this), a(this)) : this.setTime(Date.now());
6
- }
7
- static tz(e, ...o) {
8
- return o.length ? new n(...o, e) : new n(Date.now(), e);
9
- }
10
- //#endregion
11
- //#region time zone
12
- withTimeZone(e) {
13
- return new n(+this, e);
14
- }
15
- getTimezoneOffset() {
16
- const e = -s(this.timeZone, this);
17
- return e > 0 ? Math.floor(e) : Math.ceil(e);
18
- }
19
- //#endregion
20
- //#region time
21
- setTime(e) {
22
- return Date.prototype.setTime.apply(this, arguments), a(this), +this;
23
- }
24
- //#endregion
25
- //#region date-fns integration
26
- [Symbol.for("constructDateFrom")](e) {
27
- return new n(+new Date(e), this.timeZone);
28
- }
29
- //#endregion
30
- }
31
- const D = /^(get|set)(?!UTC)/;
32
- Object.getOwnPropertyNames(Date.prototype).forEach((t) => {
33
- if (!D.test(t)) return;
34
- const e = t.replace(D, "$1UTC");
35
- n.prototype[e] && (t.startsWith("get") ? n.prototype[t] = function() {
36
- return this.internal[e]();
37
- } : (n.prototype[t] = function() {
38
- return Date.prototype[e].apply(this.internal, arguments), H(this), +this;
39
- }, n.prototype[e] = function() {
40
- return Date.prototype[e].apply(this, arguments), a(this), +this;
41
- }));
42
- });
43
- function a(t) {
44
- t.internal.setTime(+t), t.internal.setUTCSeconds(t.internal.getUTCSeconds() - Math.round(-s(t.timeZone, t) * 60));
45
- }
46
- function H(t) {
47
- Date.prototype.setFullYear.call(t, t.internal.getUTCFullYear(), t.internal.getUTCMonth(), t.internal.getUTCDate()), Date.prototype.setHours.call(t, t.internal.getUTCHours(), t.internal.getUTCMinutes(), t.internal.getUTCSeconds(), t.internal.getUTCMilliseconds()), U(t);
48
- }
49
- function U(t) {
50
- const e = s(t.timeZone, t), o = e > 0 ? Math.floor(e) : Math.ceil(e), i = /* @__PURE__ */ new Date(+t);
51
- i.setUTCHours(i.getUTCHours() - 1);
52
- const r = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset(), g = -(/* @__PURE__ */ new Date(+i)).getTimezoneOffset(), m = r - g, M = Date.prototype.getHours.apply(t) !== t.internal.getUTCHours();
53
- m && M && t.internal.setUTCMinutes(t.internal.getUTCMinutes() + m);
54
- const f = r - o;
55
- f && Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + f);
56
- const l = /* @__PURE__ */ new Date(+t);
57
- l.setUTCSeconds(0);
58
- const y = r > 0 ? l.getSeconds() : (l.getSeconds() - 60) % 60, c = Math.round(-(s(t.timeZone, t) * 60)) % 60;
59
- (c || y) && (t.internal.setUTCSeconds(t.internal.getUTCSeconds() + c), Date.prototype.setUTCSeconds.call(t, Date.prototype.getUTCSeconds.call(t) + c + y));
60
- const p = s(t.timeZone, t), u = p > 0 ? Math.floor(p) : Math.ceil(p), w = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset() - u, O = u !== o, C = w - f;
61
- if (O && C) {
62
- Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + C);
63
- const h = s(t.timeZone, t), S = h > 0 ? Math.floor(h) : Math.ceil(h), T = u - S;
64
- T && (t.internal.setUTCMinutes(t.internal.getUTCMinutes() + T), Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + T));
65
- }
1
+ import { toDate as t } from "./index149.mjs";
2
+ function f(r, o) {
3
+ return +t(r) > +t(o);
66
4
  }
67
5
  export {
68
- n as TZDateMini
6
+ f as isAfter
69
7
  };
package/es/index101.mjs CHANGED
@@ -1,5 +1,13 @@
1
- import { TZDate as o } from "./index224.mjs";
2
- const a = (t) => (e) => o.tz(t, +new Date(e));
1
+ import { __module as r } from "./index112.mjs";
2
+ import { __require as e } from "./index113.mjs";
3
+ import { __require as o } from "./index114.mjs";
4
+ import { __require as p } from "./index115.mjs";
5
+ if (process.env.NODE_ENV !== "production") {
6
+ var s = e(), i = !0;
7
+ r.exports = o()(s.isElement, i);
8
+ } else
9
+ r.exports = p()();
10
+ var _ = r.exports;
3
11
  export {
4
- a as tz
12
+ _ as p
5
13
  };
package/es/index102.mjs CHANGED
@@ -1,7 +1,249 @@
1
- import { toDate as o } from "./index149.mjs";
2
- function f(r, t) {
3
- return +o(r) < +o(t);
4
- }
1
+ import { __module as T } from "./index116.mjs";
2
+ import $ from "react";
3
+ import { p as V } from "./index101.mjs";
4
+ import "./index117.mjs";
5
+ import { s as z } from "./index118.mjs";
6
+ import "./index103.mjs";
7
+ import "./index119.mjs";
8
+ import "./index104.mjs";
9
+ import "./index120.mjs";
10
+ import "./index121.mjs";
11
+ import { __exports as G } from "./index106.mjs";
12
+ import { __exports as J } from "./index122.mjs";
13
+ import { __exports as Q } from "./index107.mjs";
14
+ import { __exports as X } from "./index123.mjs";
15
+ import { __exports as Y } from "./index124.mjs";
16
+ (function(E, O) {
17
+ Object.defineProperty(O, "__esModule", {
18
+ value: !0
19
+ });
20
+ var c = Object.assign || function(a) {
21
+ for (var n = 1; n < arguments.length; n++) {
22
+ var s = arguments[n];
23
+ for (var e in s)
24
+ Object.prototype.hasOwnProperty.call(s, e) && (a[e] = s[e]);
25
+ }
26
+ return a;
27
+ }, A = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
28
+ return typeof a;
29
+ } : function(a) {
30
+ return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
31
+ }, R = /* @__PURE__ */ function() {
32
+ function a(n, s) {
33
+ for (var e = 0; e < s.length; e++) {
34
+ var t = s[e];
35
+ t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(n, t.key, t);
36
+ }
37
+ }
38
+ return function(n, s, e) {
39
+ return s && a(n.prototype, s), e && a(n, e), n;
40
+ };
41
+ }(), w = $, g = V, o = m(g), D = Y, p = C(D), F = z, H = m(F), k = Q, N = C(k), x = J, d = C(x), v = G, S = m(v), L = X, M = m(L);
42
+ function C(a) {
43
+ if (a && a.__esModule)
44
+ return a;
45
+ var n = {};
46
+ if (a != null)
47
+ for (var s in a)
48
+ Object.prototype.hasOwnProperty.call(a, s) && (n[s] = a[s]);
49
+ return n.default = a, n;
50
+ }
51
+ function m(a) {
52
+ return a && a.__esModule ? a : { default: a };
53
+ }
54
+ function P(a, n) {
55
+ if (!(a instanceof n))
56
+ throw new TypeError("Cannot call a class as a function");
57
+ }
58
+ function q(a, n) {
59
+ if (!a)
60
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
61
+ return n && (typeof n == "object" || typeof n == "function") ? n : a;
62
+ }
63
+ function W(a, n) {
64
+ if (typeof n != "function" && n !== null)
65
+ throw new TypeError("Super expression must either be null or a function, not " + typeof n);
66
+ a.prototype = Object.create(n && n.prototype, { constructor: { value: a, enumerable: !1, writable: !0, configurable: !0 } }), n && (Object.setPrototypeOf ? Object.setPrototypeOf(a, n) : a.__proto__ = n);
67
+ }
68
+ var b = {
69
+ overlay: "ReactModal__Overlay",
70
+ content: "ReactModal__Content"
71
+ }, j = function(n) {
72
+ return n.code === "Tab" || n.keyCode === 9;
73
+ }, I = function(n) {
74
+ return n.code === "Escape" || n.keyCode === 27;
75
+ }, h = 0, _ = function(a) {
76
+ W(n, a);
77
+ function n(s) {
78
+ P(this, n);
79
+ var e = q(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, s));
80
+ return e.setOverlayRef = function(t) {
81
+ e.overlay = t, e.props.overlayRef && e.props.overlayRef(t);
82
+ }, e.setContentRef = function(t) {
83
+ e.content = t, e.props.contentRef && e.props.contentRef(t);
84
+ }, e.afterClose = function() {
85
+ var t = e.props, l = t.appElement, i = t.ariaHideApp, r = t.htmlOpenClassName, u = t.bodyOpenClassName, f = t.parentSelector, y = f && f().ownerDocument || document;
86
+ u && d.remove(y.body, u), r && d.remove(y.getElementsByTagName("html")[0], r), i && h > 0 && (h -= 1, h === 0 && N.show(l)), e.props.shouldFocusAfterRender && (e.props.shouldReturnFocusAfterClose ? (p.returnFocus(e.props.preventScroll), p.teardownScopedFocus()) : p.popWithoutFocus()), e.props.onAfterClose && e.props.onAfterClose(), M.default.deregister(e);
87
+ }, e.open = function() {
88
+ e.beforeOpen(), e.state.afterOpen && e.state.beforeClose ? (clearTimeout(e.closeTimer), e.setState({ beforeClose: !1 })) : (e.props.shouldFocusAfterRender && (p.setupScopedFocus(e.node), p.markForFocusLater()), e.setState({ isOpen: !0 }, function() {
89
+ e.openAnimationFrame = requestAnimationFrame(function() {
90
+ e.setState({ afterOpen: !0 }), e.props.isOpen && e.props.onAfterOpen && e.props.onAfterOpen({
91
+ overlayEl: e.overlay,
92
+ contentEl: e.content
93
+ });
94
+ });
95
+ }));
96
+ }, e.close = function() {
97
+ e.props.closeTimeoutMS > 0 ? e.closeWithTimeout() : e.closeWithoutTimeout();
98
+ }, e.focusContent = function() {
99
+ return e.content && !e.contentHasFocus() && e.content.focus({ preventScroll: !0 });
100
+ }, e.closeWithTimeout = function() {
101
+ var t = Date.now() + e.props.closeTimeoutMS;
102
+ e.setState({ beforeClose: !0, closesAt: t }, function() {
103
+ e.closeTimer = setTimeout(e.closeWithoutTimeout, e.state.closesAt - Date.now());
104
+ });
105
+ }, e.closeWithoutTimeout = function() {
106
+ e.setState({
107
+ beforeClose: !1,
108
+ isOpen: !1,
109
+ afterOpen: !1,
110
+ closesAt: null
111
+ }, e.afterClose);
112
+ }, e.handleKeyDown = function(t) {
113
+ j(t) && (0, H.default)(e.content, t), e.props.shouldCloseOnEsc && I(t) && (t.stopPropagation(), e.requestClose(t));
114
+ }, e.handleOverlayOnClick = function(t) {
115
+ e.shouldClose === null && (e.shouldClose = !0), e.shouldClose && e.props.shouldCloseOnOverlayClick && (e.ownerHandlesClose() ? e.requestClose(t) : e.focusContent()), e.shouldClose = null;
116
+ }, e.handleContentOnMouseUp = function() {
117
+ e.shouldClose = !1;
118
+ }, e.handleOverlayOnMouseDown = function(t) {
119
+ !e.props.shouldCloseOnOverlayClick && t.target == e.overlay && t.preventDefault();
120
+ }, e.handleContentOnClick = function() {
121
+ e.shouldClose = !1;
122
+ }, e.handleContentOnMouseDown = function() {
123
+ e.shouldClose = !1;
124
+ }, e.requestClose = function(t) {
125
+ return e.ownerHandlesClose() && e.props.onRequestClose(t);
126
+ }, e.ownerHandlesClose = function() {
127
+ return e.props.onRequestClose;
128
+ }, e.shouldBeClosed = function() {
129
+ return !e.state.isOpen && !e.state.beforeClose;
130
+ }, e.contentHasFocus = function() {
131
+ return document.activeElement === e.content || e.content.contains(document.activeElement);
132
+ }, e.buildClassName = function(t, l) {
133
+ var i = (typeof l > "u" ? "undefined" : A(l)) === "object" ? l : {
134
+ base: b[t],
135
+ afterOpen: b[t] + "--after-open",
136
+ beforeClose: b[t] + "--before-close"
137
+ }, r = i.base;
138
+ return e.state.afterOpen && (r = r + " " + i.afterOpen), e.state.beforeClose && (r = r + " " + i.beforeClose), typeof l == "string" && l ? r + " " + l : r;
139
+ }, e.attributesFromObject = function(t, l) {
140
+ return Object.keys(l).reduce(function(i, r) {
141
+ return i[t + "-" + r] = l[r], i;
142
+ }, {});
143
+ }, e.state = {
144
+ afterOpen: !1,
145
+ beforeClose: !1
146
+ }, e.shouldClose = null, e.moveFromContentToOverlay = null, e;
147
+ }
148
+ return R(n, [{
149
+ key: "componentDidMount",
150
+ value: function() {
151
+ this.props.isOpen && this.open();
152
+ }
153
+ }, {
154
+ key: "componentDidUpdate",
155
+ value: function(e, t) {
156
+ process.env.NODE_ENV !== "production" && (e.bodyOpenClassName !== this.props.bodyOpenClassName && console.warn('React-Modal: "bodyOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.'), e.htmlOpenClassName !== this.props.htmlOpenClassName && console.warn('React-Modal: "htmlOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.')), this.props.isOpen && !e.isOpen ? this.open() : !this.props.isOpen && e.isOpen && this.close(), this.props.shouldFocusAfterRender && this.state.isOpen && !t.isOpen && this.focusContent();
157
+ }
158
+ }, {
159
+ key: "componentWillUnmount",
160
+ value: function() {
161
+ this.state.isOpen && this.afterClose(), clearTimeout(this.closeTimer), cancelAnimationFrame(this.openAnimationFrame);
162
+ }
163
+ }, {
164
+ key: "beforeOpen",
165
+ value: function() {
166
+ var e = this.props, t = e.appElement, l = e.ariaHideApp, i = e.htmlOpenClassName, r = e.bodyOpenClassName, u = e.parentSelector, f = u && u().ownerDocument || document;
167
+ r && d.add(f.body, r), i && d.add(f.getElementsByTagName("html")[0], i), l && (h += 1, N.hide(t)), M.default.register(this);
168
+ }
169
+ // Don't steal focus from inner elements
170
+ }, {
171
+ key: "render",
172
+ value: function() {
173
+ var e = this.props, t = e.id, l = e.className, i = e.overlayClassName, r = e.defaultStyles, u = e.children, f = l ? {} : r.content, y = i ? {} : r.overlay;
174
+ if (this.shouldBeClosed())
175
+ return null;
176
+ var K = {
177
+ ref: this.setOverlayRef,
178
+ className: this.buildClassName("overlay", i),
179
+ style: c({}, y, this.props.style.overlay),
180
+ onClick: this.handleOverlayOnClick,
181
+ onMouseDown: this.handleOverlayOnMouseDown
182
+ }, U = c({
183
+ id: t,
184
+ ref: this.setContentRef,
185
+ style: c({}, f, this.props.style.content),
186
+ className: this.buildClassName("content", l),
187
+ tabIndex: "-1",
188
+ onKeyDown: this.handleKeyDown,
189
+ onMouseDown: this.handleContentOnMouseDown,
190
+ onMouseUp: this.handleContentOnMouseUp,
191
+ onClick: this.handleContentOnClick,
192
+ role: this.props.role,
193
+ "aria-label": this.props.contentLabel
194
+ }, this.attributesFromObject("aria", c({ modal: !0 }, this.props.aria)), this.attributesFromObject("data", this.props.data || {}), {
195
+ "data-testid": this.props.testId
196
+ }), B = this.props.contentElement(U, u);
197
+ return this.props.overlayElement(K, B);
198
+ }
199
+ }]), n;
200
+ }(w.Component);
201
+ _.defaultProps = {
202
+ style: {
203
+ overlay: {},
204
+ content: {}
205
+ },
206
+ defaultStyles: {}
207
+ }, _.propTypes = {
208
+ isOpen: o.default.bool.isRequired,
209
+ defaultStyles: o.default.shape({
210
+ content: o.default.object,
211
+ overlay: o.default.object
212
+ }),
213
+ style: o.default.shape({
214
+ content: o.default.object,
215
+ overlay: o.default.object
216
+ }),
217
+ className: o.default.oneOfType([o.default.string, o.default.object]),
218
+ overlayClassName: o.default.oneOfType([o.default.string, o.default.object]),
219
+ parentSelector: o.default.func,
220
+ bodyOpenClassName: o.default.string,
221
+ htmlOpenClassName: o.default.string,
222
+ ariaHideApp: o.default.bool,
223
+ appElement: o.default.oneOfType([o.default.instanceOf(S.default), o.default.instanceOf(v.SafeHTMLCollection), o.default.instanceOf(v.SafeNodeList), o.default.arrayOf(o.default.instanceOf(S.default))]),
224
+ onAfterOpen: o.default.func,
225
+ onAfterClose: o.default.func,
226
+ onRequestClose: o.default.func,
227
+ closeTimeoutMS: o.default.number,
228
+ shouldFocusAfterRender: o.default.bool,
229
+ shouldCloseOnOverlayClick: o.default.bool,
230
+ shouldReturnFocusAfterClose: o.default.bool,
231
+ preventScroll: o.default.bool,
232
+ role: o.default.string,
233
+ contentLabel: o.default.string,
234
+ aria: o.default.object,
235
+ data: o.default.object,
236
+ children: o.default.node,
237
+ shouldCloseOnEsc: o.default.bool,
238
+ overlayRef: o.default.func,
239
+ contentRef: o.default.func,
240
+ id: o.default.string,
241
+ overlayElement: o.default.func,
242
+ contentElement: o.default.func,
243
+ testId: o.default.string
244
+ }, O.default = _, E.exports = O.default;
245
+ })(T, T.exports);
246
+ var me = T.exports;
5
247
  export {
6
- f as isBefore
248
+ me as M
7
249
  };
package/es/index103.mjs CHANGED
@@ -1,13 +1,91 @@
1
- import { normalizeDates as m } from "./index153.mjs";
2
- import { startOfDay as t } from "./index154.mjs";
3
- function s(r, a, e) {
4
- const [o, i] = m(
5
- e?.in,
6
- r,
7
- a
8
- );
9
- return +t(o) == +t(i);
1
+ import { __exports as n } from "./index107.mjs";
2
+ import { w as m } from "./index125.mjs";
3
+ import "./index104.mjs";
4
+ import { __exports as c } from "./index106.mjs";
5
+ Object.defineProperty(n, "__esModule", {
6
+ value: !0
7
+ });
8
+ n.resetState = h;
9
+ n.log = A;
10
+ n.assertNodeList = f;
11
+ n.setElement = g;
12
+ n.validateElement = s;
13
+ n.hide = _;
14
+ n.show = w;
15
+ n.documentNotReadyOrSSRTesting = N;
16
+ var v = m, p = E(v), y = c;
17
+ function E(e) {
18
+ return e && e.__esModule ? e : { default: e };
19
+ }
20
+ var t = null;
21
+ function h() {
22
+ t && (t.removeAttribute ? t.removeAttribute("aria-hidden") : t.length != null ? t.forEach(function(e) {
23
+ return e.removeAttribute("aria-hidden");
24
+ }) : document.querySelectorAll(t).forEach(function(e) {
25
+ return e.removeAttribute("aria-hidden");
26
+ })), t = null;
27
+ }
28
+ function A() {
29
+ if (process.env.NODE_ENV !== "production") {
30
+ var e = t || {};
31
+ console.log("ariaAppHider ----------"), console.log(e.nodeName, e.className, e.id), console.log("end ariaAppHider ----------");
32
+ }
33
+ }
34
+ function f(e, r) {
35
+ if (!e || !e.length)
36
+ throw new Error("react-modal: No elements were found for selector " + r + ".");
37
+ }
38
+ function g(e) {
39
+ var r = e;
40
+ if (typeof r == "string" && y.canUseDOM) {
41
+ var o = document.querySelectorAll(r);
42
+ f(o, r), r = o;
43
+ }
44
+ return t = r || t, t;
45
+ }
46
+ function s(e) {
47
+ var r = e || t;
48
+ return r ? Array.isArray(r) || r instanceof HTMLCollection || r instanceof NodeList ? r : [r] : ((0, p.default)(!1, ["react-modal: App element is not defined.", "Please use `Modal.setAppElement(el)` or set `appElement={el}`.", "This is needed so screen readers don't see main content", "when modal is opened. It is not recommended, but you can opt-out", "by setting `ariaHideApp={false}`."].join(" ")), []);
49
+ }
50
+ function _(e) {
51
+ var r = !0, o = !1, i = void 0;
52
+ try {
53
+ for (var a = s(e)[Symbol.iterator](), l; !(r = (l = a.next()).done); r = !0) {
54
+ var u = l.value;
55
+ u.setAttribute("aria-hidden", "true");
56
+ }
57
+ } catch (d) {
58
+ o = !0, i = d;
59
+ } finally {
60
+ try {
61
+ !r && a.return && a.return();
62
+ } finally {
63
+ if (o)
64
+ throw i;
65
+ }
66
+ }
67
+ }
68
+ function w(e) {
69
+ var r = !0, o = !1, i = void 0;
70
+ try {
71
+ for (var a = s(e)[Symbol.iterator](), l; !(r = (l = a.next()).done); r = !0) {
72
+ var u = l.value;
73
+ u.removeAttribute("aria-hidden");
74
+ }
75
+ } catch (d) {
76
+ o = !0, i = d;
77
+ } finally {
78
+ try {
79
+ !r && a.return && a.return();
80
+ } finally {
81
+ if (o)
82
+ throw i;
83
+ }
84
+ }
85
+ }
86
+ function N() {
87
+ t = null;
10
88
  }
11
89
  export {
12
- s as isSameDay
90
+ n as default
13
91
  };
package/es/index104.mjs CHANGED
@@ -1,7 +1,15 @@
1
- import { toDate as t } from "./index149.mjs";
2
- function f(r, o) {
3
- return +t(r) > +t(o);
1
+ import { __exports as e } from "./index106.mjs";
2
+ import { e as t } from "./index126.mjs";
3
+ Object.defineProperty(e, "__esModule", {
4
+ value: !0
5
+ });
6
+ e.canUseDOM = e.SafeNodeList = e.SafeHTMLCollection = void 0;
7
+ var o = t, r = i(o);
8
+ function i(n) {
9
+ return n && n.__esModule ? n : { default: n };
4
10
  }
5
- export {
6
- f as isAfter
7
- };
11
+ var a = r.default, l = a.canUseDOM ? window.HTMLElement : {};
12
+ e.SafeHTMLCollection = a.canUseDOM ? window.HTMLCollection : {};
13
+ e.SafeNodeList = a.canUseDOM ? window.NodeList : {};
14
+ e.canUseDOM = a.canUseDOM;
15
+ e.default = l;
package/es/index105.mjs CHANGED
@@ -1,13 +1,6 @@
1
- import { __module as r } from "./index121.mjs";
2
- import { __require as e } from "./index122.mjs";
3
- import { __require as o } from "./index123.mjs";
4
- import { __require as p } from "./index124.mjs";
5
- if (process.env.NODE_ENV !== "production") {
6
- var s = e(), i = !0;
7
- r.exports = o()(s.isElement, i);
8
- } else
9
- r.exports = p()();
10
- var _ = r.exports;
1
+ import { getAugmentedNamespace as e } from "./index92.mjs";
2
+ import * as t from "./index127.mjs";
3
+ const a = /* @__PURE__ */ e(t);
11
4
  export {
12
- _ as p
5
+ a as default
13
6
  };