@okam/stack-ui 1.27.0 → 1.27.3

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 (361) hide show
  1. package/components/Carousel/components/CarouselNavigationButton.d.ts +1 -1
  2. package/index.d.ts +2 -0
  3. package/index.js +1 -1
  4. package/index.mjs +158 -151
  5. package/index10.js +1 -1
  6. package/index10.mjs +2 -2
  7. package/index100.js +1 -2
  8. package/index100.mjs +17 -12
  9. package/index101.js +2 -1
  10. package/index101.mjs +22 -45
  11. package/index102.js +1 -1
  12. package/index102.mjs +1 -1
  13. package/index103.js +1 -1
  14. package/index103.mjs +1 -1
  15. package/index107.js +1 -1
  16. package/index107.mjs +1 -1
  17. package/index108.js +1 -1
  18. package/index108.mjs +1 -1
  19. package/index11.js +1 -1
  20. package/index11.mjs +3 -3
  21. package/index112.js +1 -1
  22. package/index112.mjs +1 -1
  23. package/index113.js +1 -1
  24. package/index113.mjs +1 -1
  25. package/index114.js +1 -1
  26. package/index114.mjs +2 -2
  27. package/index116.js +1 -1
  28. package/index116.mjs +1 -1
  29. package/index118.js +1 -1
  30. package/index118.mjs +1 -1
  31. package/index119.js +1 -1
  32. package/index119.mjs +1 -1
  33. package/index12.js +2 -1
  34. package/index12.mjs +45 -15
  35. package/index121.js +1 -1
  36. package/index121.mjs +1 -1
  37. package/index122.js +1 -1
  38. package/index122.mjs +3 -3
  39. package/index124.js +1 -1
  40. package/index124.mjs +1 -1
  41. package/index125.js +1 -1
  42. package/index125.mjs +2 -2
  43. package/index128.js +1 -1
  44. package/index128.mjs +1 -1
  45. package/index13.js +1 -2
  46. package/index13.mjs +17 -20
  47. package/index131.js +1 -1
  48. package/index131.mjs +1 -1
  49. package/index132.js +1 -1
  50. package/index132.mjs +1 -1
  51. package/index134.js +1 -1
  52. package/index134.mjs +1 -1
  53. package/index135.js +1 -1
  54. package/index135.mjs +1 -1
  55. package/index138.js +1 -1
  56. package/index138.mjs +1 -1
  57. package/index139.js +1 -1
  58. package/index139.mjs +3 -3
  59. package/index14.js +1 -1
  60. package/index14.mjs +18 -17
  61. package/index140.js +1 -1
  62. package/index140.mjs +2 -2
  63. package/index15.js +1 -1
  64. package/index15.mjs +16 -83
  65. package/index16.js +1 -1
  66. package/index16.mjs +81 -28
  67. package/index17.js +1 -1
  68. package/index17.mjs +30 -32
  69. package/index174.js +1 -1
  70. package/index174.mjs +2 -2
  71. package/index175.js +1 -1
  72. package/index175.mjs +2 -2
  73. package/index176.js +1 -1
  74. package/index176.mjs +2 -2
  75. package/index177.js +1 -1
  76. package/index177.mjs +2 -2
  77. package/index178.js +1 -1
  78. package/index178.mjs +3 -3
  79. package/index179.js +1 -1
  80. package/index179.mjs +4 -4
  81. package/index18.js +1 -1
  82. package/index18.mjs +33 -31
  83. package/index180.js +1 -1
  84. package/index180.mjs +1 -1
  85. package/index181.js +1 -1
  86. package/index181.mjs +2 -2
  87. package/index182.js +1 -1
  88. package/index182.mjs +1 -1
  89. package/index183.js +1 -1
  90. package/index183.mjs +2 -2
  91. package/index184.js +1 -1
  92. package/index184.mjs +1 -1
  93. package/index185.js +1 -1
  94. package/index185.mjs +2 -2
  95. package/index186.js +1 -1
  96. package/index186.mjs +1 -1
  97. package/index187.js +1 -1
  98. package/index187.mjs +2 -2
  99. package/index188.js +1 -1
  100. package/index188.mjs +1 -1
  101. package/index19.js +1 -1
  102. package/index19.mjs +30 -33
  103. package/index191.js +1 -1
  104. package/index191.mjs +4 -4
  105. package/index192.js +1 -1
  106. package/index192.mjs +2 -2
  107. package/index193.js +1 -1
  108. package/index193.mjs +5 -5
  109. package/index194.js +1 -1
  110. package/index194.mjs +4 -4
  111. package/index195.js +1 -1
  112. package/index195.mjs +5 -5
  113. package/index196.js +1 -1
  114. package/index196.mjs +5 -5
  115. package/index197.js +1 -1
  116. package/index197.mjs +2 -2
  117. package/index2.js +1 -1
  118. package/index2.mjs +20 -20
  119. package/index20.js +1 -1
  120. package/index20.mjs +32 -67
  121. package/index208.js +1 -1
  122. package/index208.mjs +2 -2
  123. package/index21.js +1 -1
  124. package/index21.mjs +61 -58
  125. package/index210.js +1 -1
  126. package/index210.mjs +1 -1
  127. package/index213.js +1 -1
  128. package/index213.mjs +1 -1
  129. package/index22.js +1 -1
  130. package/index22.mjs +66 -52
  131. package/index224.js +1 -1
  132. package/index224.mjs +123 -306
  133. package/index225.js +1 -1
  134. package/index225.mjs +173 -186
  135. package/index226.js +1 -1
  136. package/index226.mjs +9 -8
  137. package/index227.js +1 -1
  138. package/index227.mjs +3 -26
  139. package/index228.js +1 -1
  140. package/index228.mjs +34 -53
  141. package/index229.js +1 -1
  142. package/index229.mjs +5 -46
  143. package/index23.js +1 -1
  144. package/index23.mjs +37 -41
  145. package/index230.js +1 -1
  146. package/index230.mjs +28 -123
  147. package/index231.js +1 -1
  148. package/index231.mjs +6 -130
  149. package/index232.js +1 -1
  150. package/index232.mjs +293 -159
  151. package/index233.js +1 -1
  152. package/index233.mjs +192 -9
  153. package/index234.js +1 -1
  154. package/index234.mjs +8 -3
  155. package/index235.js +1 -1
  156. package/index235.mjs +25 -35
  157. package/index236.js +1 -1
  158. package/index236.mjs +55 -5
  159. package/index237.js +1 -1
  160. package/index237.mjs +44 -27
  161. package/index238.js +1 -1
  162. package/index238.mjs +124 -6
  163. package/index24.js +1 -1
  164. package/index24.mjs +57 -20
  165. package/index242.js +1 -1
  166. package/index242.mjs +1 -1
  167. package/index243.js +1 -1
  168. package/index243.mjs +1 -1
  169. package/index245.js +1 -1
  170. package/index245.mjs +1 -1
  171. package/index246.js +1 -1
  172. package/index246.mjs +2 -2
  173. package/index248.js +1 -1
  174. package/index248.mjs +1 -1
  175. package/index249.js +1 -1
  176. package/index249.mjs +3 -3
  177. package/index25.js +1 -1
  178. package/index25.mjs +20 -50
  179. package/index250.js +1 -1
  180. package/index250.mjs +2 -2
  181. package/index251.js +1 -1
  182. package/index251.mjs +2 -23
  183. package/index252.js +1 -1
  184. package/index252.mjs +23 -2
  185. package/index26.js +1 -1
  186. package/index26.mjs +50 -17
  187. package/index260.js +1 -1
  188. package/index260.mjs +6 -2
  189. package/index261.mjs +2 -2
  190. package/index262.mjs +2 -2
  191. package/index263.mjs +2 -2
  192. package/index264.js +1 -1
  193. package/index264.mjs +2 -72
  194. package/index265.js +1 -1
  195. package/index265.mjs +72 -2
  196. package/index266.mjs +2 -2
  197. package/index267.js +1 -1
  198. package/index267.mjs +2 -19
  199. package/index268.js +1 -1
  200. package/index268.mjs +19 -2
  201. package/index269.js +1 -1
  202. package/index269.mjs +2 -6
  203. package/index27.js +1 -1
  204. package/index27.mjs +16 -32
  205. package/index28.js +1 -1
  206. package/index28.mjs +32 -23
  207. package/index29.js +1 -1
  208. package/index29.mjs +24 -8
  209. package/index3.js +1 -1
  210. package/index3.mjs +1 -1
  211. package/index30.js +1 -1
  212. package/index30.mjs +8 -32
  213. package/index31.js +1 -1
  214. package/index31.mjs +29 -30
  215. package/index32.js +1 -1
  216. package/index32.mjs +28 -98
  217. package/index33.js +1 -1
  218. package/index33.mjs +102 -8
  219. package/index34.js +1 -1
  220. package/index34.mjs +8 -46
  221. package/index35.js +1 -1
  222. package/index35.mjs +46 -18
  223. package/index36.js +2 -1
  224. package/index36.mjs +19 -6
  225. package/index37.js +1 -1
  226. package/index37.mjs +6 -46
  227. package/index38.js +1 -1
  228. package/index38.mjs +45 -23
  229. package/index39.js +2 -1
  230. package/index39.mjs +26 -5
  231. package/index4.js +1 -1
  232. package/index4.mjs +5 -5
  233. package/index40.js +1 -1
  234. package/index40.mjs +4 -7
  235. package/index41.js +1 -1
  236. package/index41.mjs +5 -5
  237. package/index42.js +1 -1
  238. package/index42.mjs +8 -5
  239. package/index43.js +1 -1
  240. package/index43.mjs +2 -2
  241. package/index44.js +1 -1
  242. package/index44.mjs +1 -1
  243. package/index45.js +1 -1
  244. package/index45.mjs +4 -4
  245. package/index46.js +1 -1
  246. package/index46.mjs +3 -9
  247. package/index47.js +1 -1
  248. package/index47.mjs +7 -9
  249. package/index48.js +1 -1
  250. package/index48.mjs +9 -9
  251. package/index49.js +1 -1
  252. package/index49.mjs +13 -46
  253. package/index50.js +1 -1
  254. package/index50.mjs +46 -8
  255. package/index51.js +1 -1
  256. package/index51.mjs +6 -69
  257. package/index52.js +1 -1
  258. package/index52.mjs +71 -8
  259. package/index53.js +1 -1
  260. package/index53.mjs +7 -12
  261. package/index54.js +1 -1
  262. package/index54.mjs +12 -9
  263. package/index55.js +1 -1
  264. package/index55.mjs +10 -17
  265. package/index56.js +1 -1
  266. package/index56.mjs +17 -13
  267. package/index57.js +1 -1
  268. package/index57.mjs +5 -5
  269. package/index58.js +1 -1
  270. package/index58.mjs +6 -6
  271. package/index59.js +1 -1
  272. package/index59.mjs +10 -8
  273. package/index6.js +1 -1
  274. package/index6.mjs +1 -1
  275. package/index60.js +1 -1
  276. package/index60.mjs +5 -5
  277. package/index61.js +1 -1
  278. package/index61.mjs +6 -8
  279. package/index62.js +1 -1
  280. package/index62.mjs +13 -14
  281. package/index63.js +1 -2
  282. package/index63.mjs +14 -23
  283. package/index64.js +1 -1
  284. package/index64.mjs +21 -15
  285. package/index65.js +1 -1
  286. package/index65.mjs +16 -14
  287. package/index66.js +1 -1
  288. package/index66.mjs +13 -40
  289. package/index67.js +1 -1
  290. package/index67.mjs +39 -36
  291. package/index68.js +1 -1
  292. package/index68.mjs +37 -11
  293. package/index69.js +1 -1
  294. package/index69.mjs +11 -10
  295. package/index7.js +1 -1
  296. package/index7.mjs +2 -2
  297. package/index70.js +1 -1
  298. package/index70.mjs +10 -13
  299. package/index71.js +2 -1
  300. package/index71.mjs +15 -2
  301. package/index72.js +1 -1
  302. package/index72.mjs +11 -8
  303. package/index73.js +1 -2
  304. package/index73.mjs +1 -7
  305. package/index74.js +1 -1
  306. package/index74.mjs +7 -6
  307. package/index75.js +1 -1
  308. package/index75.mjs +6 -6
  309. package/index76.js +2 -1
  310. package/index76.mjs +8 -25
  311. package/index77.js +2 -1
  312. package/index77.mjs +8 -2
  313. package/index78.js +1 -6
  314. package/index78.mjs +25 -94
  315. package/index79.js +1 -1
  316. package/index79.mjs +2 -69
  317. package/index8.js +1 -1
  318. package/index8.mjs +5 -5
  319. package/index80.js +6 -1
  320. package/index80.mjs +82 -29
  321. package/index81.js +1 -42
  322. package/index81.mjs +64 -65
  323. package/index82.js +1 -1
  324. package/index82.mjs +32 -150
  325. package/index83.js +42 -9
  326. package/index83.mjs +65 -52
  327. package/index84.js +1 -1
  328. package/index84.mjs +145 -31
  329. package/index85.js +9 -1
  330. package/index85.mjs +54 -10
  331. package/index86.js +1 -1
  332. package/index86.mjs +38 -28
  333. package/index87.js +1 -1
  334. package/index87.mjs +12 -5
  335. package/index88.js +1 -12
  336. package/index88.mjs +31 -36
  337. package/index89.js +1 -1
  338. package/index89.mjs +6 -29
  339. package/index9.js +1 -1
  340. package/index9.mjs +4 -4
  341. package/index90.js +12 -1
  342. package/index90.mjs +39 -12
  343. package/index91.js +1 -7
  344. package/index91.mjs +23 -13
  345. package/index92.js +1 -15
  346. package/index92.mjs +9 -67
  347. package/index93.js +7 -1
  348. package/index93.mjs +17 -5
  349. package/index94.js +13 -14
  350. package/index94.mjs +63 -17
  351. package/index95.js +1 -1
  352. package/index95.mjs +7 -42
  353. package/index96.js +16 -1
  354. package/index96.mjs +24 -44
  355. package/index97.js +1 -1
  356. package/index97.mjs +42 -48
  357. package/index98.js +1 -1
  358. package/index98.mjs +45 -17
  359. package/index99.js +1 -2
  360. package/index99.mjs +47 -21
  361. package/package.json +1 -1
package/index224.mjs CHANGED
@@ -1,316 +1,133 @@
1
- import { restoreTextSelection as C, disableTextSelection as _ } from "./index272.mjs";
2
- import { PressResponderContext as Z } from "./index273.mjs";
3
- import { _class_private_field_get as ee } from "./index274.mjs";
4
- import { _class_private_field_init as te } from "./index148.mjs";
5
- import { _class_private_field_set as H } from "./index275.mjs";
6
- import { useGlobalListeners as re, useEffectEvent as M, isVirtualPointerEvent as ne, focusWithoutScrolling as w, getOwnerDocument as k, isVirtualClick as G, getOwnerWindow as U, mergeProps as W, useSyncRef as ie, chain as ae, isMac as se, openLink as X } from "@react-aria/utils";
7
- import { useState as oe, useRef as ue, useMemo as le, useEffect as fe, useContext as ce } from "react";
8
- function ge(i) {
9
- let a = ce(Z);
10
- if (a) {
11
- let { register: o, ...f } = a;
12
- i = W(f, i), o();
13
- }
14
- return ie(a, i.ref), i;
1
+ function r(e) {
2
+ return e !== null && typeof e == "object" && "constructor" in e && e.constructor === Object;
15
3
  }
16
- var I = /* @__PURE__ */ new WeakMap();
17
- class D {
18
- continuePropagation() {
19
- H(this, I, !1);
20
- }
21
- get shouldStopPropagation() {
22
- return ee(this, I);
23
- }
24
- constructor(a, o, f) {
25
- te(this, I, {
26
- writable: !0,
27
- value: void 0
28
- }), H(this, I, !0), this.type = a, this.pointerType = o, this.target = f.currentTarget, this.shiftKey = f.shiftKey, this.metaKey = f.metaKey, this.ctrlKey = f.ctrlKey, this.altKey = f.altKey;
29
- }
4
+ function o(e, n) {
5
+ e === void 0 && (e = {}), n === void 0 && (n = {}), Object.keys(n).forEach((t) => {
6
+ typeof e[t] > "u" ? e[t] = n[t] : r(n[t]) && r(e[t]) && Object.keys(n[t]).length > 0 && o(e[t], n[t]);
7
+ });
30
8
  }
31
- const Y = Symbol("linkClicked");
32
- function Oe(i) {
33
- let {
34
- onPress: a,
35
- onPressChange: o,
36
- onPressStart: f,
37
- onPressEnd: c,
38
- onPressUp: O,
39
- isDisabled: d,
40
- isPressed: z,
41
- preventFocusOnPress: K,
42
- shouldCancelOnPointerExit: j,
43
- allowTextSelectionOnPress: P,
44
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
45
- ref: Pe,
46
- ...q
47
- } = ge(i), [J, R] = oe(!1), E = ue({
48
- isPressed: !1,
49
- ignoreEmulatedMouseEvents: !1,
50
- ignoreClickAfterPress: !1,
51
- didFirePressStart: !1,
52
- isTriggeringEvent: !1,
53
- activePointerId: null,
54
- target: null,
55
- isOverTarget: !1,
56
- pointerType: null
57
- }), { addGlobalListener: y, removeAllGlobalListeners: $ } = re(), v = M((e, s) => {
58
- let p = E.current;
59
- if (d || p.didFirePressStart) return !1;
60
- let n = !0;
61
- if (p.isTriggeringEvent = !0, f) {
62
- let u = new D("pressstart", s, e);
63
- f(u), n = u.shouldStopPropagation;
64
- }
65
- return o && o(!0), p.isTriggeringEvent = !1, p.didFirePressStart = !0, R(!0), n;
66
- }), g = M((e, s, p = !0) => {
67
- let n = E.current;
68
- if (!n.didFirePressStart) return !1;
69
- n.ignoreClickAfterPress = !0, n.didFirePressStart = !1, n.isTriggeringEvent = !0;
70
- let u = !0;
71
- if (c) {
72
- let t = new D("pressend", s, e);
73
- c(t), u = t.shouldStopPropagation;
74
- }
75
- if (o && o(!1), R(!1), a && p && !d) {
76
- let t = new D("press", s, e);
77
- a(t), u && (u = t.shouldStopPropagation);
78
- }
79
- return n.isTriggeringEvent = !1, u;
80
- }), m = M((e, s) => {
81
- let p = E.current;
82
- if (d) return !1;
83
- if (O) {
84
- p.isTriggeringEvent = !0;
85
- let n = new D("pressup", s, e);
86
- return O(n), p.isTriggeringEvent = !1, n.shouldStopPropagation;
87
- }
88
- return !0;
89
- }), h = M((e) => {
90
- let s = E.current;
91
- s.isPressed && s.target && (s.isOverTarget && s.pointerType != null && g(T(s.target, e), s.pointerType, !1), s.isPressed = !1, s.isOverTarget = !1, s.activePointerId = null, s.pointerType = null, $(), P || C(s.target));
92
- }), x = M((e) => {
93
- j && h(e);
94
- }), Q = le(() => {
95
- let e = E.current, s = {
96
- onKeyDown(n) {
97
- if (L(n.nativeEvent, n.currentTarget) && n.currentTarget.contains(n.target)) {
98
- var u;
99
- B(n.target, n.key) && n.preventDefault();
100
- let t = !0;
101
- if (!e.isPressed && !n.repeat) {
102
- e.target = n.currentTarget, e.isPressed = !0, t = v(n, "keyboard");
103
- let r = n.currentTarget, l = (b) => {
104
- L(b, r) && !b.repeat && r.contains(b.target) && e.target && m(T(e.target, b), "keyboard");
105
- };
106
- y(k(n.currentTarget), "keyup", ae(l, p), !0);
107
- }
108
- t && n.stopPropagation(), n.metaKey && se() && ((u = e.metaKeyEvents) === null || u === void 0 || u.set(n.key, n.nativeEvent));
109
- } else n.key === "Meta" && (e.metaKeyEvents = /* @__PURE__ */ new Map());
110
- },
111
- onClick(n) {
112
- if (!(n && !n.currentTarget.contains(n.target)) && n && n.button === 0 && !e.isTriggeringEvent && !X.isOpening) {
113
- let u = !0;
114
- if (d && n.preventDefault(), !e.ignoreClickAfterPress && !e.ignoreEmulatedMouseEvents && !e.isPressed && (e.pointerType === "virtual" || G(n.nativeEvent))) {
115
- !d && !K && w(n.currentTarget);
116
- let t = v(n, "virtual"), r = m(n, "virtual"), l = g(n, "virtual");
117
- u = t && r && l;
118
- }
119
- e.ignoreEmulatedMouseEvents = !1, e.ignoreClickAfterPress = !1, u && n.stopPropagation();
120
- }
9
+ const u = {
10
+ body: {},
11
+ addEventListener() {
12
+ },
13
+ removeEventListener() {
14
+ },
15
+ activeElement: {
16
+ blur() {
17
+ },
18
+ nodeName: ""
19
+ },
20
+ querySelector() {
21
+ return null;
22
+ },
23
+ querySelectorAll() {
24
+ return [];
25
+ },
26
+ getElementById() {
27
+ return null;
28
+ },
29
+ createEvent() {
30
+ return {
31
+ initEvent() {
121
32
  }
122
- }, p = (n) => {
123
- var u;
124
- if (e.isPressed && e.target && L(n, e.target)) {
125
- var t;
126
- B(n.target, n.key) && n.preventDefault();
127
- let l = n.target;
128
- g(T(e.target, n), "keyboard", e.target.contains(l)), $(), n.key !== "Enter" && F(e.target) && e.target.contains(l) && !n[Y] && (n[Y] = !0, X(e.target, n, !1)), e.isPressed = !1, (t = e.metaKeyEvents) === null || t === void 0 || t.delete(n.key);
129
- } else if (n.key === "Meta" && (!((u = e.metaKeyEvents) === null || u === void 0) && u.size)) {
130
- var r;
131
- let l = e.metaKeyEvents;
132
- e.metaKeyEvents = void 0;
133
- for (let b of l.values()) (r = e.target) === null || r === void 0 || r.dispatchEvent(new KeyboardEvent("keyup", b));
33
+ };
34
+ },
35
+ createElement() {
36
+ return {
37
+ children: [],
38
+ childNodes: [],
39
+ style: {},
40
+ setAttribute() {
41
+ },
42
+ getElementsByTagName() {
43
+ return [];
134
44
  }
135
45
  };
136
- if (typeof PointerEvent < "u") {
137
- s.onPointerDown = (r) => {
138
- if (r.button !== 0 || !r.currentTarget.contains(r.target)) return;
139
- if (ne(r.nativeEvent)) {
140
- e.pointerType = "virtual";
141
- return;
142
- }
143
- A(r.currentTarget) && r.preventDefault(), e.pointerType = r.pointerType;
144
- let l = !0;
145
- e.isPressed || (e.isPressed = !0, e.isOverTarget = !0, e.activePointerId = r.pointerId, e.target = r.currentTarget, !d && !K && w(r.currentTarget), P || _(e.target), l = v(r, e.pointerType), y(k(r.currentTarget), "pointermove", n, !1), y(k(r.currentTarget), "pointerup", u, !1), y(k(r.currentTarget), "pointercancel", t, !1)), l && r.stopPropagation();
146
- }, s.onMouseDown = (r) => {
147
- r.currentTarget.contains(r.target) && r.button === 0 && (A(r.currentTarget) && r.preventDefault(), r.stopPropagation());
148
- }, s.onPointerUp = (r) => {
149
- !r.currentTarget.contains(r.target) || e.pointerType === "virtual" || r.button === 0 && S(r, r.currentTarget) && m(r, e.pointerType || r.pointerType);
150
- };
151
- let n = (r) => {
152
- r.pointerId === e.activePointerId && (e.target && S(r, e.target) ? !e.isOverTarget && e.pointerType != null && (e.isOverTarget = !0, v(T(e.target, r), e.pointerType)) : e.target && e.isOverTarget && e.pointerType != null && (e.isOverTarget = !1, g(T(e.target, r), e.pointerType, !1), x(r)));
153
- }, u = (r) => {
154
- r.pointerId === e.activePointerId && e.isPressed && r.button === 0 && e.target && (S(r, e.target) && e.pointerType != null ? g(T(e.target, r), e.pointerType) : e.isOverTarget && e.pointerType != null && g(T(e.target, r), e.pointerType, !1), e.isPressed = !1, e.isOverTarget = !1, e.activePointerId = null, e.pointerType = null, $(), P || C(e.target));
155
- }, t = (r) => {
156
- h(r);
157
- };
158
- s.onDragStart = (r) => {
159
- r.currentTarget.contains(r.target) && h(r);
160
- };
161
- } else {
162
- s.onMouseDown = (t) => {
163
- if (t.button !== 0 || !t.currentTarget.contains(t.target)) return;
164
- if (A(t.currentTarget) && t.preventDefault(), e.ignoreEmulatedMouseEvents) {
165
- t.stopPropagation();
166
- return;
167
- }
168
- e.isPressed = !0, e.isOverTarget = !0, e.target = t.currentTarget, e.pointerType = G(t.nativeEvent) ? "virtual" : "mouse", !d && !K && w(t.currentTarget), v(t, e.pointerType) && t.stopPropagation(), y(k(t.currentTarget), "mouseup", n, !1);
169
- }, s.onMouseEnter = (t) => {
170
- if (!t.currentTarget.contains(t.target)) return;
171
- let r = !0;
172
- e.isPressed && !e.ignoreEmulatedMouseEvents && e.pointerType != null && (e.isOverTarget = !0, r = v(t, e.pointerType)), r && t.stopPropagation();
173
- }, s.onMouseLeave = (t) => {
174
- if (!t.currentTarget.contains(t.target)) return;
175
- let r = !0;
176
- e.isPressed && !e.ignoreEmulatedMouseEvents && e.pointerType != null && (e.isOverTarget = !1, r = g(t, e.pointerType, !1), x(t)), r && t.stopPropagation();
177
- }, s.onMouseUp = (t) => {
178
- t.currentTarget.contains(t.target) && !e.ignoreEmulatedMouseEvents && t.button === 0 && m(t, e.pointerType || "mouse");
179
- };
180
- let n = (t) => {
181
- if (t.button === 0) {
182
- if (e.isPressed = !1, $(), e.ignoreEmulatedMouseEvents) {
183
- e.ignoreEmulatedMouseEvents = !1;
184
- return;
185
- }
186
- e.target && S(t, e.target) && e.pointerType != null ? g(T(e.target, t), e.pointerType) : e.target && e.isOverTarget && e.pointerType != null && g(T(e.target, t), e.pointerType, !1), e.isOverTarget = !1;
187
- }
188
- };
189
- s.onTouchStart = (t) => {
190
- if (!t.currentTarget.contains(t.target)) return;
191
- let r = pe(t.nativeEvent);
192
- if (!r) return;
193
- e.activePointerId = r.identifier, e.ignoreEmulatedMouseEvents = !0, e.isOverTarget = !0, e.isPressed = !0, e.target = t.currentTarget, e.pointerType = "touch", !d && !K && w(t.currentTarget), P || _(e.target), v(t, e.pointerType) && t.stopPropagation(), y(U(t.currentTarget), "scroll", u, !0);
194
- }, s.onTouchMove = (t) => {
195
- if (!t.currentTarget.contains(t.target)) return;
196
- if (!e.isPressed) {
197
- t.stopPropagation();
198
- return;
199
- }
200
- let r = V(t.nativeEvent, e.activePointerId), l = !0;
201
- r && S(r, t.currentTarget) ? !e.isOverTarget && e.pointerType != null && (e.isOverTarget = !0, l = v(t, e.pointerType)) : e.isOverTarget && e.pointerType != null && (e.isOverTarget = !1, l = g(t, e.pointerType, !1), x(t)), l && t.stopPropagation();
202
- }, s.onTouchEnd = (t) => {
203
- if (!t.currentTarget.contains(t.target)) return;
204
- if (!e.isPressed) {
205
- t.stopPropagation();
206
- return;
207
- }
208
- let r = V(t.nativeEvent, e.activePointerId), l = !0;
209
- r && S(r, t.currentTarget) && e.pointerType != null ? (m(t, e.pointerType), l = g(t, e.pointerType)) : e.isOverTarget && e.pointerType != null && (l = g(t, e.pointerType, !1)), l && t.stopPropagation(), e.isPressed = !1, e.activePointerId = null, e.isOverTarget = !1, e.ignoreEmulatedMouseEvents = !0, e.target && !P && C(e.target), $();
210
- }, s.onTouchCancel = (t) => {
211
- t.currentTarget.contains(t.target) && (t.stopPropagation(), e.isPressed && h(t));
212
- };
213
- let u = (t) => {
214
- e.isPressed && t.target.contains(e.target) && h({
215
- currentTarget: e.target,
216
- shiftKey: !1,
217
- ctrlKey: !1,
218
- metaKey: !1,
219
- altKey: !1
220
- });
221
- };
222
- s.onDragStart = (t) => {
223
- t.currentTarget.contains(t.target) && h(t);
224
- };
225
- }
226
- return s;
227
- }, [
228
- y,
229
- d,
230
- K,
231
- $,
232
- P,
233
- h,
234
- x,
235
- g,
236
- v,
237
- m
238
- ]);
239
- return fe(() => () => {
240
- var e;
241
- P || C((e = E.current.target) !== null && e !== void 0 ? e : void 0);
242
- }, [
243
- P
244
- ]), {
245
- isPressed: z || J,
246
- pressProps: W(q, Q)
247
- };
248
- }
249
- function F(i) {
250
- return i.tagName === "A" && i.hasAttribute("href");
251
- }
252
- function L(i, a) {
253
- const { key: o, code: f } = i, c = a, O = c.getAttribute("role");
254
- return (o === "Enter" || o === " " || o === "Spacebar" || f === "Space") && !(c instanceof U(c).HTMLInputElement && !N(c, o) || c instanceof U(c).HTMLTextAreaElement || c.isContentEditable) && // Links should only trigger with Enter key
255
- !((O === "link" || !O && F(c)) && o !== "Enter");
256
- }
257
- function pe(i) {
258
- const { targetTouches: a } = i;
259
- return a.length > 0 ? a[0] : null;
260
- }
261
- function V(i, a) {
262
- const o = i.changedTouches;
263
- for (let f = 0; f < o.length; f++) {
264
- const c = o[f];
265
- if (c.identifier === a) return c;
46
+ },
47
+ createElementNS() {
48
+ return {};
49
+ },
50
+ importNode() {
51
+ return null;
52
+ },
53
+ location: {
54
+ hash: "",
55
+ host: "",
56
+ hostname: "",
57
+ href: "",
58
+ origin: "",
59
+ pathname: "",
60
+ protocol: "",
61
+ search: ""
266
62
  }
267
- return null;
268
- }
269
- function T(i, a) {
270
- return {
271
- currentTarget: i,
272
- shiftKey: a.shiftKey,
273
- ctrlKey: a.ctrlKey,
274
- metaKey: a.metaKey,
275
- altKey: a.altKey
276
- };
277
- }
278
- function de(i) {
279
- let a = 0, o = 0;
280
- return i.width !== void 0 ? a = i.width / 2 : i.radiusX !== void 0 && (a = i.radiusX), i.height !== void 0 ? o = i.height / 2 : i.radiusY !== void 0 && (o = i.radiusY), {
281
- top: i.clientY - o,
282
- right: i.clientX + a,
283
- bottom: i.clientY + o,
284
- left: i.clientX - a
285
- };
286
- }
287
- function ve(i, a) {
288
- return !(i.left > a.right || a.left > i.right || i.top > a.bottom || a.top > i.bottom);
289
- }
290
- function S(i, a) {
291
- let o = a.getBoundingClientRect(), f = de(i);
292
- return ve(o, f);
293
- }
294
- function A(i) {
295
- return !(i instanceof HTMLElement) || !i.hasAttribute("draggable");
296
- }
297
- function B(i, a) {
298
- return i instanceof HTMLInputElement ? !N(i, a) : i instanceof HTMLButtonElement ? i.type !== "submit" && i.type !== "reset" : !F(i);
63
+ };
64
+ function c() {
65
+ const e = typeof document < "u" ? document : {};
66
+ return o(e, u), e;
299
67
  }
300
- const Te = /* @__PURE__ */ new Set([
301
- "checkbox",
302
- "radio",
303
- "range",
304
- "color",
305
- "file",
306
- "image",
307
- "button",
308
- "submit",
309
- "reset"
310
- ]);
311
- function N(i, a) {
312
- return i.type === "checkbox" || i.type === "radio" ? a === " " : Te.has(i.type);
68
+ const i = {
69
+ document: u,
70
+ navigator: {
71
+ userAgent: ""
72
+ },
73
+ location: {
74
+ hash: "",
75
+ host: "",
76
+ hostname: "",
77
+ href: "",
78
+ origin: "",
79
+ pathname: "",
80
+ protocol: "",
81
+ search: ""
82
+ },
83
+ history: {
84
+ replaceState() {
85
+ },
86
+ pushState() {
87
+ },
88
+ go() {
89
+ },
90
+ back() {
91
+ }
92
+ },
93
+ CustomEvent: function() {
94
+ return this;
95
+ },
96
+ addEventListener() {
97
+ },
98
+ removeEventListener() {
99
+ },
100
+ getComputedStyle() {
101
+ return {
102
+ getPropertyValue() {
103
+ return "";
104
+ }
105
+ };
106
+ },
107
+ Image() {
108
+ },
109
+ Date() {
110
+ },
111
+ screen: {},
112
+ setTimeout() {
113
+ },
114
+ clearTimeout() {
115
+ },
116
+ matchMedia() {
117
+ return {};
118
+ },
119
+ requestAnimationFrame(e) {
120
+ return typeof setTimeout > "u" ? (e(), null) : setTimeout(e, 0);
121
+ },
122
+ cancelAnimationFrame(e) {
123
+ typeof setTimeout > "u" || clearTimeout(e);
124
+ }
125
+ };
126
+ function s() {
127
+ const e = typeof window < "u" ? window : {};
128
+ return o(e, i), e;
313
129
  }
314
130
  export {
315
- Oe as usePress
131
+ s as a,
132
+ c as g
316
133
  };
package/index225.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index226.js"),j=require("./index227.js"),G=require("react-dom"),g=require("react"),x=require("@react-aria/focus"),u=require("@react-aria/utils"),I=require("./index228.js"),H=require("@react-aria/i18n");function J(q){let{selectionManager:e,keyboardDelegate:o,ref:n,autoFocus:F=!1,shouldFocusWrap:S=!1,disallowEmptySelection:R=!1,disallowSelectAll:L=!1,selectOnFocus:p=e.selectionBehavior==="replace",disallowTypeAhead:B=!1,shouldUseVirtualFocus:A,allowsTabNavigation:N=!1,isVirtualized:v,scrollRef:s=n,linkBehavior:C="action"}=q,{direction:b}=H.useLocale(),V=u.useRouter(),$=t=>{if(t.altKey&&t.key==="Tab"&&t.preventDefault(),!n.current.contains(t.target))return;const r=(l,d)=>{if(l!=null){if(e.isLink(l)&&C==="selection"&&p&&!y.isNonContiguousSelectionModifier(t)){G.flushSync(()=>{e.setFocusedKey(l,d)});let K=s.current.querySelector(`[data-key="${CSS.escape(l.toString())}"]`),E=e.getItemProps(l);V.open(K,t,E.href,E.routerOptions);return}if(e.setFocusedKey(l,d),e.isLink(l)&&C==="override")return;t.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(l):p&&!y.isNonContiguousSelectionModifier(t)&&e.replaceSelection(l)}};switch(t.key){case"ArrowDown":if(o.getKeyBelow){var c,i;t.preventDefault();let l=e.focusedKey!=null?o.getKeyBelow(e.focusedKey):(c=o.getFirstKey)===null||c===void 0?void 0:c.call(o);l==null&&S&&(l=(i=o.getFirstKey)===null||i===void 0?void 0:i.call(o,e.focusedKey)),r(l)}break;case"ArrowUp":if(o.getKeyAbove){var a,f;t.preventDefault();let l=e.focusedKey!=null?o.getKeyAbove(e.focusedKey):(a=o.getLastKey)===null||a===void 0?void 0:a.call(o);l==null&&S&&(l=(f=o.getLastKey)===null||f===void 0?void 0:f.call(o,e.focusedKey)),r(l)}break;case"ArrowLeft":if(o.getKeyLeftOf){var T,D;t.preventDefault();let l=o.getKeyLeftOf(e.focusedKey);l==null&&S&&(l=b==="rtl"?(T=o.getFirstKey)===null||T===void 0?void 0:T.call(o,e.focusedKey):(D=o.getLastKey)===null||D===void 0?void 0:D.call(o,e.focusedKey)),r(l,b==="rtl"?"first":"last")}break;case"ArrowRight":if(o.getKeyRightOf){var P,k;t.preventDefault();let l=o.getKeyRightOf(e.focusedKey);l==null&&S&&(l=b==="rtl"?(P=o.getLastKey)===null||P===void 0?void 0:P.call(o,e.focusedKey):(k=o.getFirstKey)===null||k===void 0?void 0:k.call(o,e.focusedKey)),r(l,b==="rtl"?"last":"first")}break;case"Home":if(o.getFirstKey){t.preventDefault();let l=o.getFirstKey(e.focusedKey,y.isCtrlKeyPressed(t));e.setFocusedKey(l),y.isCtrlKeyPressed(t)&&t.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(l):p&&e.replaceSelection(l)}break;case"End":if(o.getLastKey){t.preventDefault();let l=o.getLastKey(e.focusedKey,y.isCtrlKeyPressed(t));e.setFocusedKey(l),y.isCtrlKeyPressed(t)&&t.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(l):p&&e.replaceSelection(l)}break;case"PageDown":if(o.getKeyPageBelow){t.preventDefault();let l=o.getKeyPageBelow(e.focusedKey);r(l)}break;case"PageUp":if(o.getKeyPageAbove){t.preventDefault();let l=o.getKeyPageAbove(e.focusedKey);r(l)}break;case"a":y.isCtrlKeyPressed(t)&&e.selectionMode==="multiple"&&L!==!0&&(t.preventDefault(),e.selectAll());break;case"Escape":!R&&e.selectedKeys.size!==0&&(t.stopPropagation(),t.preventDefault(),e.clearSelection());break;case"Tab":if(!N){if(t.shiftKey)n.current.focus();else{let l=x.getFocusableTreeWalker(n.current,{tabbable:!0}),d,K;do K=l.lastChild(),K&&(d=K);while(K);d&&!d.contains(document.activeElement)&&u.focusWithoutScrolling(d)}break}}},w=g.useRef({top:0,left:0});u.useEvent(s,"scroll",v?null:()=>{w.current={top:s.current.scrollTop,left:s.current.scrollLeft}});let W=t=>{if(e.isFocused){t.currentTarget.contains(t.target)||e.setFocused(!1);return}if(t.currentTarget.contains(t.target)){if(e.setFocused(!0),e.focusedKey==null){let i=f=>{f!=null&&(e.setFocusedKey(f),p&&e.replaceSelection(f))},a=t.relatedTarget;var r,c;a&&t.currentTarget.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?i((r=e.lastSelectedKey)!==null&&r!==void 0?r:o.getLastKey()):i((c=e.firstSelectedKey)!==null&&c!==void 0?c:o.getFirstKey())}else v||(s.current.scrollTop=w.current.top,s.current.scrollLeft=w.current.left);if(!v&&e.focusedKey!=null){let i=s.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);i&&(i.contains(document.activeElement)||u.focusWithoutScrolling(i),I.getInteractionModality()==="keyboard"&&u.scrollIntoViewport(i,{containingElement:n.current}))}}},U=t=>{t.currentTarget.contains(t.relatedTarget)||e.setFocused(!1)};const m=g.useRef(F);g.useEffect(()=>{if(m.current){let t=null;F==="first"&&(t=o.getFirstKey()),F==="last"&&(t=o.getLastKey());let r=e.selectedKeys;if(r.size){for(let c of r)if(e.canSelectItem(c)){t=c;break}}e.setFocused(!0),e.setFocusedKey(t),t==null&&!A&&x.focusSafely(n.current)}},[]);let M=g.useRef(e.focusedKey);g.useEffect(()=>{let t=I.getInteractionModality();if(e.isFocused&&e.focusedKey!=null&&(s!=null&&s.current)){let r=s.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);r&&(t==="keyboard"||m.current)&&(v||u.scrollIntoView(s.current,r),t!=="virtual"&&u.scrollIntoViewport(r,{containingElement:n.current}))}e.isFocused&&e.focusedKey==null&&M.current!=null&&x.focusSafely(n.current),M.current=e.focusedKey,m.current=!1},[v,s,e.focusedKey,e.isFocused,n]);let h={onKeyDown:$,onFocus:W,onBlur:U,onMouseDown(t){s.current===t.target&&t.preventDefault()}},{typeSelectProps:z}=j.useTypeSelect({keyboardDelegate:o,selectionManager:e});B||(h=u.mergeProps(z,h));let O;return A||(O=e.focusedKey==null?0:-1),{collectionProps:{...h,tabIndex:O}}}exports.useSelectableCollection=J;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index224.js");function h(e){return e===void 0&&(e=""),e.trim().split(" ").filter(t=>!!t.trim())}function S(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function T(e,t){return t===void 0&&(t=0),setTimeout(e,t)}function b(){return Date.now()}function x(e){const t=c.a();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function E(e,t){t===void 0&&(t="x");const n=c.a();let r,i,l;const s=x(e);return n.WebKitCSSMatrix?(i=s.transform||s.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(o=>o.replace(",",".")).join(", ")),l=new n.WebKitCSSMatrix(i==="none"?"":i)):(l=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=l.toString().split(",")),t==="x"&&(n.WebKitCSSMatrix?i=l.m41:r.length===16?i=parseFloat(r[12]):i=parseFloat(r[4])),t==="y"&&(n.WebKitCSSMatrix?i=l.m42:r.length===16?i=parseFloat(r[13]):i=parseFloat(r[5])),i||0}function f(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function v(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function d(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let n=1;n<arguments.length;n+=1){const r=n<0||arguments.length<=n?void 0:arguments[n];if(r!=null&&!v(r)){const i=Object.keys(Object(r)).filter(l=>t.indexOf(l)<0);for(let l=0,s=i.length;l<s;l+=1){const o=i[l],a=Object.getOwnPropertyDescriptor(r,o);a!==void 0&&a.enumerable&&(f(e[o])&&f(r[o])?r[o].__swiper__?e[o]=r[o]:d(e[o],r[o]):!f(e[o])&&f(r[o])?(e[o]={},r[o].__swiper__?e[o]=r[o]:d(e[o],r[o])):e[o]=r[o])}}}return e}function M(e,t,n){e.style.setProperty(t,n)}function O(e){let{swiper:t,targetPosition:n,side:r}=e;const i=c.a(),l=-t.translate;let s=null,o;const a=t.params.speed;t.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(t.cssModeFrameID);const y=n>l?"next":"prev",g=(p,m)=>y==="next"&&p>=m||y==="prev"&&p<=m,w=()=>{o=new Date().getTime(),s===null&&(s=o);const p=Math.max(Math.min((o-s)/a,1),0),m=.5-Math.cos(p*Math.PI)/2;let u=l+m*(n-l);if(g(u,n)&&(u=n),t.wrapperEl.scrollTo({[r]:u}),g(u,n)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:u})}),i.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=i.requestAnimationFrame(w)};w()}function P(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function C(e,t){return t===void 0&&(t=""),[...e.children].filter(n=>n.matches(t))}function j(e){try{console.warn(e);return}catch{}}function _(e,t){t===void 0&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:h(t)),n}function F(e){const t=c.a(),n=c.g(),r=e.getBoundingClientRect(),i=n.body,l=e.clientTop||i.clientTop||0,s=e.clientLeft||i.clientLeft||0,o=e===t?t.scrollY:e.scrollTop,a=e===t?t.scrollX:e.scrollLeft;return{top:r.top+o-l,left:r.left+a-s}}function A(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function L(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function k(e,t){return c.a().getComputedStyle(e,null).getPropertyValue(t)}function W(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function D(e,t){const n=[];let r=e.parentElement;for(;r;)t?r.matches(t)&&n.push(r):n.push(r),r=r.parentElement;return n}function I(e,t){function n(r){r.target===e&&(t.call(e,r),e.removeEventListener("transitionend",n))}t&&e.addEventListener("transitionend",n)}function q(e,t,n){const r=c.a();return e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom"))}function K(e){return(Array.isArray(e)?e:[e]).filter(t=>!!t)}exports.a=D;exports.b=F;exports.c=_;exports.d=b;exports.e=C;exports.f=q;exports.g=W;exports.h=h;exports.i=E;exports.j=I;exports.k=f;exports.l=P;exports.m=K;exports.n=T;exports.o=k;exports.p=L;exports.q=A;exports.r=O;exports.s=M;exports.t=j;exports.u=d;exports.v=S;