@okam/stack-ui 1.27.0 → 1.27.2
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.
- package/components/Carousel/components/CarouselNavigationButton.d.ts +1 -1
- package/index.d.ts +2 -0
- package/index.js +1 -1
- package/index.mjs +158 -151
- package/index10.js +1 -1
- package/index10.mjs +2 -2
- package/index100.js +1 -2
- package/index100.mjs +17 -12
- package/index101.js +2 -1
- package/index101.mjs +22 -45
- package/index102.js +1 -1
- package/index102.mjs +1 -1
- package/index103.js +1 -1
- package/index103.mjs +1 -1
- package/index107.js +1 -1
- package/index107.mjs +1 -1
- package/index108.js +1 -1
- package/index108.mjs +1 -1
- package/index11.js +1 -1
- package/index11.mjs +3 -3
- package/index112.js +1 -1
- package/index112.mjs +1 -1
- package/index113.js +1 -1
- package/index113.mjs +1 -1
- package/index114.js +1 -1
- package/index114.mjs +2 -2
- package/index116.js +1 -1
- package/index116.mjs +3 -3
- package/index118.js +1 -1
- package/index118.mjs +1 -1
- package/index119.js +1 -1
- package/index119.mjs +1 -1
- package/index12.js +1 -1
- package/index12.mjs +44 -15
- package/index121.js +1 -1
- package/index121.mjs +1 -1
- package/index122.js +1 -1
- package/index122.mjs +3 -3
- package/index124.js +1 -1
- package/index124.mjs +2 -2
- package/index125.js +1 -1
- package/index125.mjs +2 -2
- package/index126.js +1 -1
- package/index126.mjs +1 -1
- package/index128.js +1 -1
- package/index128.mjs +1 -1
- package/index13.js +1 -2
- package/index13.mjs +17 -20
- package/index131.js +1 -1
- package/index131.mjs +1 -1
- package/index132.js +1 -1
- package/index132.mjs +1 -1
- package/index133.js +1 -1
- package/index133.mjs +19 -49
- package/index134.js +1 -1
- package/index134.mjs +49 -25
- package/index135.js +1 -1
- package/index135.mjs +25 -19
- package/index137.js +1 -1
- package/index137.mjs +14 -14
- package/index138.js +1 -1
- package/index138.mjs +1 -1
- package/index139.js +1 -1
- package/index139.mjs +3 -3
- package/index14.js +1 -1
- package/index14.mjs +18 -17
- package/index140.js +1 -1
- package/index140.mjs +2 -2
- package/index143.js +1 -1
- package/index143.mjs +1 -1
- package/index147.js +1 -1
- package/index147.mjs +1 -1
- package/index15.js +1 -1
- package/index15.mjs +16 -83
- package/index159.js +11 -1
- package/index159.mjs +116 -2
- package/index16.js +1 -1
- package/index16.mjs +81 -28
- package/index160.js +1 -1
- package/index160.mjs +2 -6
- package/index161.js +1 -1
- package/index161.mjs +5 -64
- package/index162.js +1 -1
- package/index162.mjs +54 -16
- package/index163.js +1 -1
- package/index163.mjs +21 -49
- package/index164.js +1 -1
- package/index164.mjs +42 -143
- package/index165.js +1 -1
- package/index165.mjs +151 -18
- package/index166.js +1 -1
- package/index166.mjs +17 -14
- package/index167.js +1 -1
- package/index167.mjs +14 -34
- package/index168.js +1 -1
- package/index168.mjs +36 -79
- package/index169.js +1 -1
- package/index169.mjs +75 -23
- package/index17.js +1 -1
- package/index17.mjs +30 -32
- package/index170.js +1 -1
- package/index170.mjs +22 -13
- package/index171.js +1 -1
- package/index171.mjs +16 -48
- package/index172.js +1 -1
- package/index172.mjs +54 -2
- package/index173.js +1 -11
- package/index173.mjs +2 -116
- package/index174.js +1 -1
- package/index174.mjs +2 -2
- package/index175.js +1 -1
- package/index175.mjs +2 -2
- package/index176.js +1 -1
- package/index176.mjs +2 -2
- package/index177.js +1 -1
- package/index177.mjs +2 -2
- package/index178.js +1 -1
- package/index178.mjs +3 -3
- package/index179.js +1 -1
- package/index179.mjs +4 -4
- package/index18.js +1 -1
- package/index18.mjs +33 -31
- package/index180.js +1 -1
- package/index180.mjs +1 -1
- package/index181.js +1 -1
- package/index181.mjs +2 -2
- package/index182.js +1 -1
- package/index182.mjs +1 -1
- package/index183.js +1 -1
- package/index183.mjs +2 -2
- package/index184.js +1 -1
- package/index184.mjs +1 -1
- package/index185.js +1 -1
- package/index185.mjs +2 -2
- package/index186.js +1 -1
- package/index186.mjs +1 -1
- package/index187.js +1 -1
- package/index187.mjs +2 -2
- package/index188.js +1 -1
- package/index188.mjs +1 -1
- package/index19.js +1 -1
- package/index19.mjs +30 -33
- package/index191.js +1 -1
- package/index191.mjs +4 -4
- package/index192.js +1 -1
- package/index192.mjs +2 -2
- package/index193.js +1 -1
- package/index193.mjs +5 -5
- package/index194.js +1 -1
- package/index194.mjs +4 -4
- package/index195.js +1 -1
- package/index195.mjs +5 -5
- package/index196.js +1 -1
- package/index196.mjs +5 -5
- package/index197.js +1 -1
- package/index197.mjs +2 -2
- package/index2.js +1 -1
- package/index2.mjs +20 -20
- package/index20.js +1 -1
- package/index20.mjs +32 -67
- package/index21.js +1 -1
- package/index21.mjs +61 -58
- package/index22.js +1 -1
- package/index22.mjs +66 -52
- package/index224.js +1 -1
- package/index224.mjs +123 -306
- package/index225.js +1 -1
- package/index225.mjs +173 -186
- package/index226.js +1 -1
- package/index226.mjs +9 -8
- package/index227.js +1 -1
- package/index227.mjs +3 -26
- package/index228.js +1 -1
- package/index228.mjs +34 -53
- package/index229.js +1 -1
- package/index229.mjs +5 -46
- package/index23.js +1 -1
- package/index23.mjs +37 -41
- package/index230.js +1 -1
- package/index230.mjs +28 -123
- package/index231.js +1 -1
- package/index231.mjs +6 -130
- package/index232.js +1 -1
- package/index232.mjs +293 -159
- package/index233.js +1 -1
- package/index233.mjs +192 -9
- package/index234.js +1 -1
- package/index234.mjs +8 -3
- package/index235.js +1 -1
- package/index235.mjs +25 -35
- package/index236.js +1 -1
- package/index236.mjs +55 -5
- package/index237.js +1 -1
- package/index237.mjs +44 -27
- package/index238.js +1 -1
- package/index238.mjs +124 -6
- package/index24.js +1 -1
- package/index24.mjs +57 -20
- package/index242.js +1 -1
- package/index242.mjs +1 -1
- package/index243.js +1 -1
- package/index243.mjs +1 -1
- package/index245.js +1 -1
- package/index245.mjs +1 -1
- package/index246.js +1 -1
- package/index246.mjs +2 -2
- package/index248.js +1 -1
- package/index248.mjs +2 -2
- package/index249.js +1 -1
- package/index249.mjs +3 -3
- package/index25.js +1 -1
- package/index25.mjs +20 -50
- package/index251.js +1 -1
- package/index251.mjs +1 -1
- package/index26.js +1 -1
- package/index26.mjs +50 -17
- package/index260.js +1 -1
- package/index260.mjs +6 -2
- package/index261.mjs +2 -2
- package/index262.mjs +2 -2
- package/index263.mjs +2 -2
- package/index264.js +1 -1
- package/index264.mjs +2 -72
- package/index265.js +1 -1
- package/index265.mjs +72 -2
- package/index266.mjs +2 -2
- package/index267.js +1 -1
- package/index267.mjs +2 -19
- package/index268.js +1 -1
- package/index268.mjs +19 -2
- package/index269.js +1 -1
- package/index269.mjs +2 -6
- package/index27.js +1 -1
- package/index27.mjs +16 -32
- package/index28.js +1 -1
- package/index28.mjs +32 -23
- package/index29.js +1 -1
- package/index29.mjs +24 -8
- package/index3.js +1 -1
- package/index3.mjs +1 -1
- package/index30.js +1 -1
- package/index30.mjs +8 -32
- package/index31.js +1 -1
- package/index31.mjs +29 -30
- package/index32.js +1 -1
- package/index32.mjs +28 -98
- package/index33.js +1 -1
- package/index33.mjs +102 -8
- package/index34.js +1 -1
- package/index34.mjs +8 -46
- package/index35.js +1 -1
- package/index35.mjs +46 -18
- package/index36.js +2 -1
- package/index36.mjs +19 -6
- package/index37.js +1 -1
- package/index37.mjs +6 -46
- package/index38.js +1 -1
- package/index38.mjs +45 -23
- package/index39.js +2 -1
- package/index39.mjs +26 -5
- package/index4.js +1 -1
- package/index4.mjs +5 -5
- package/index40.js +1 -1
- package/index40.mjs +4 -7
- package/index41.js +1 -1
- package/index41.mjs +5 -5
- package/index42.js +1 -1
- package/index42.mjs +8 -5
- package/index43.js +1 -1
- package/index43.mjs +2 -2
- package/index44.js +1 -1
- package/index44.mjs +1 -1
- package/index45.js +1 -1
- package/index45.mjs +4 -4
- package/index46.js +1 -1
- package/index46.mjs +3 -9
- package/index47.js +1 -1
- package/index47.mjs +7 -9
- package/index48.js +1 -1
- package/index48.mjs +9 -9
- package/index49.js +1 -1
- package/index49.mjs +13 -46
- package/index50.js +1 -1
- package/index50.mjs +46 -8
- package/index51.js +1 -1
- package/index51.mjs +6 -69
- package/index52.js +1 -1
- package/index52.mjs +71 -8
- package/index53.js +1 -1
- package/index53.mjs +7 -12
- package/index54.js +1 -1
- package/index54.mjs +12 -9
- package/index55.js +1 -1
- package/index55.mjs +10 -17
- package/index56.js +1 -1
- package/index56.mjs +17 -13
- package/index57.js +1 -1
- package/index57.mjs +5 -5
- package/index58.js +1 -1
- package/index58.mjs +6 -6
- package/index59.js +1 -1
- package/index59.mjs +10 -8
- package/index6.js +1 -1
- package/index6.mjs +1 -1
- package/index60.js +1 -1
- package/index60.mjs +5 -5
- package/index61.js +1 -1
- package/index61.mjs +6 -8
- package/index62.js +1 -1
- package/index62.mjs +13 -14
- package/index63.js +1 -2
- package/index63.mjs +14 -23
- package/index64.js +1 -1
- package/index64.mjs +21 -15
- package/index65.js +1 -1
- package/index65.mjs +16 -14
- package/index66.js +1 -1
- package/index66.mjs +13 -40
- package/index67.js +1 -1
- package/index67.mjs +39 -36
- package/index68.js +1 -1
- package/index68.mjs +37 -11
- package/index69.js +1 -1
- package/index69.mjs +11 -10
- package/index7.js +1 -1
- package/index7.mjs +2 -2
- package/index70.js +1 -1
- package/index70.mjs +10 -13
- package/index71.js +2 -1
- package/index71.mjs +15 -2
- package/index72.js +1 -1
- package/index72.mjs +11 -8
- package/index73.js +1 -2
- package/index73.mjs +1 -7
- package/index74.js +1 -1
- package/index74.mjs +7 -6
- package/index75.js +1 -1
- package/index75.mjs +6 -6
- package/index76.js +2 -1
- package/index76.mjs +8 -25
- package/index77.js +2 -1
- package/index77.mjs +8 -2
- package/index78.js +1 -6
- package/index78.mjs +25 -94
- package/index79.js +1 -1
- package/index79.mjs +2 -69
- package/index8.js +1 -1
- package/index8.mjs +5 -5
- package/index80.js +6 -1
- package/index80.mjs +82 -29
- package/index81.js +1 -42
- package/index81.mjs +64 -65
- package/index82.js +1 -1
- package/index82.mjs +32 -150
- package/index83.js +42 -9
- package/index83.mjs +65 -52
- package/index84.js +1 -1
- package/index84.mjs +145 -31
- package/index85.js +9 -1
- package/index85.mjs +54 -10
- package/index86.js +1 -1
- package/index86.mjs +38 -28
- package/index87.js +1 -1
- package/index87.mjs +12 -5
- package/index88.js +1 -12
- package/index88.mjs +31 -36
- package/index89.js +1 -1
- package/index89.mjs +6 -29
- package/index9.js +1 -1
- package/index9.mjs +4 -4
- package/index90.js +12 -1
- package/index90.mjs +39 -12
- package/index91.js +1 -7
- package/index91.mjs +23 -13
- package/index92.js +1 -15
- package/index92.mjs +9 -67
- package/index93.js +7 -1
- package/index93.mjs +17 -5
- package/index94.js +13 -14
- package/index94.mjs +63 -17
- package/index95.js +1 -1
- package/index95.mjs +7 -42
- package/index96.js +16 -1
- package/index96.mjs +24 -44
- package/index97.js +1 -1
- package/index97.mjs +42 -48
- package/index98.js +1 -1
- package/index98.mjs +45 -17
- package/index99.js +1 -2
- package/index99.mjs +47 -21
- package/package.json +1 -1
package/index23.mjs
CHANGED
|
@@ -1,60 +1,56 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useRef as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { Dialog as
|
|
10
|
-
import
|
|
2
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { useDatePicker as C } from "@react-aria/datepicker";
|
|
4
|
+
import { useDatePickerState as F } from "@react-stately/datepicker";
|
|
5
|
+
import { useRef as S } from "react";
|
|
6
|
+
import l from "./index65.mjs";
|
|
7
|
+
import j from "./index6.mjs";
|
|
8
|
+
import k from "./index26.mjs";
|
|
9
|
+
import { Dialog as w } from "./index111.mjs";
|
|
10
|
+
import R from "./index14.mjs";
|
|
11
11
|
import { CalendarPopover as y } from "./index112.mjs";
|
|
12
|
-
import
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
p && /* @__PURE__ */ e("span", { ...
|
|
26
|
-
|
|
27
|
-
/* @__PURE__ */ e("div", { ...
|
|
28
|
-
|
|
12
|
+
import f from "./index113.mjs";
|
|
13
|
+
function M({
|
|
14
|
+
popoverPlacement: h = "bottom start",
|
|
15
|
+
tokens: r,
|
|
16
|
+
customTheme: A,
|
|
17
|
+
themeName: o = "datePicker",
|
|
18
|
+
icon: P = "ArrowDown",
|
|
19
|
+
description: s,
|
|
20
|
+
buttonLabel: c,
|
|
21
|
+
...n
|
|
22
|
+
}) {
|
|
23
|
+
const t = F({ ...n }), a = S(null), { groupProps: u, fieldProps: d, labelProps: v, descriptionProps: D, buttonProps: m, dialogProps: b, calendarProps: g } = C({ ...n }, t, a), { label: p } = { ...n }, T = l(`${o}.container`, r), $ = l(`${o}.dateField`, r), x = l(`${o}.label`, r);
|
|
24
|
+
return /* @__PURE__ */ i("div", { className: T, children: [
|
|
25
|
+
p && /* @__PURE__ */ e("span", { ...v, children: p }),
|
|
26
|
+
s && /* @__PURE__ */ e("div", { ...D, children: s }),
|
|
27
|
+
/* @__PURE__ */ e("div", { ...u, ref: a, children: /* @__PURE__ */ i(
|
|
28
|
+
j,
|
|
29
29
|
{
|
|
30
30
|
themeName: `${o}.button`,
|
|
31
31
|
tokens: { ...r },
|
|
32
32
|
type: "button",
|
|
33
|
-
...
|
|
34
|
-
handlePress:
|
|
33
|
+
...m,
|
|
34
|
+
handlePress: m.onPress,
|
|
35
35
|
children: [
|
|
36
|
-
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */ e(
|
|
39
|
-
" -",
|
|
40
|
-
/* @__PURE__ */ e(i, { ...m }),
|
|
36
|
+
c && /* @__PURE__ */ e("p", { className: x, children: c }),
|
|
37
|
+
/* @__PURE__ */ i("div", { className: $, children: [
|
|
38
|
+
/* @__PURE__ */ e(f, { ...d }),
|
|
41
39
|
t.validationState === "invalid" && "❌"
|
|
42
40
|
] }),
|
|
43
|
-
/* @__PURE__ */ e(
|
|
41
|
+
/* @__PURE__ */ e(R, { themeName: `${o}.icon`, tokens: { ...r }, icon: P })
|
|
44
42
|
]
|
|
45
43
|
}
|
|
46
44
|
) }),
|
|
47
|
-
t.isOpen && /* @__PURE__ */ e(y, { triggerRef:
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
/* @__PURE__ */ e(
|
|
50
|
-
" -",
|
|
51
|
-
/* @__PURE__ */ e(i, { ...m }),
|
|
45
|
+
t.isOpen && /* @__PURE__ */ e(y, { triggerRef: a, state: t, placement: h, children: /* @__PURE__ */ i(w, { ...b, children: [
|
|
46
|
+
/* @__PURE__ */ i("div", { children: [
|
|
47
|
+
/* @__PURE__ */ e(f, { ...d }),
|
|
52
48
|
t.validationState === "invalid" && "❌"
|
|
53
49
|
] }),
|
|
54
|
-
/* @__PURE__ */ e(
|
|
50
|
+
/* @__PURE__ */ e(k, { ...g })
|
|
55
51
|
] }) })
|
|
56
52
|
] });
|
|
57
53
|
}
|
|
58
54
|
export {
|
|
59
|
-
|
|
55
|
+
M as default
|
|
60
56
|
};
|
package/index230.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index225.js");function f(a){let{swiper:e,duration:l,transformElements:s,allSlides:o}=a;const{activeIndex:d}=e,u=n=>n.parentElement?n.parentElement:e.slides.filter(t=>t.shadowRoot&&t.shadowRoot===n.parentNode)[0];if(e.params.virtualTranslate&&l!==0){let n=!1,r;o?r=s:r=s.filter(t=>{const i=t.classList.contains("swiper-slide-transform")?u(t):t;return e.getSlideIndex(i)===d}),r.forEach(t=>{c.j(t,()=>{if(n||!e||e.destroyed)return;n=!0,e.animating=!1;const i=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});e.wrapperEl.dispatchEvent(i)})})}}exports.e=f;
|
package/index230.mjs
CHANGED
|
@@ -1,127 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
t = e(t), n = this.getItem(t);
|
|
29
|
-
while (n && i(l, n.getBoundingClientRect()));
|
|
30
|
-
return t;
|
|
31
|
-
}
|
|
32
|
-
isSameRow(t, e) {
|
|
33
|
-
return t.top === e.top || t.left !== e.left;
|
|
34
|
-
}
|
|
35
|
-
isSameColumn(t, e) {
|
|
36
|
-
return t.left === e.left || t.top !== e.top;
|
|
37
|
-
}
|
|
38
|
-
getKeyBelow(t) {
|
|
39
|
-
return this.layout === "grid" && this.orientation === "vertical" ? this.findKey(t, (e) => this.getNextKey(e), this.isSameRow) : this.getNextKey(t);
|
|
40
|
-
}
|
|
41
|
-
getKeyAbove(t) {
|
|
42
|
-
return this.layout === "grid" && this.orientation === "vertical" ? this.findKey(t, (e) => this.getPreviousKey(e), this.isSameRow) : this.getPreviousKey(t);
|
|
43
|
-
}
|
|
44
|
-
getNextColumn(t, e) {
|
|
45
|
-
return e ? this.getPreviousKey(t) : this.getNextKey(t);
|
|
46
|
-
}
|
|
47
|
-
getKeyRightOf(t) {
|
|
48
|
-
return this.layout === "grid" ? this.orientation === "vertical" ? this.getNextColumn(t, this.direction === "rtl") : this.findKey(t, (e) => this.getNextColumn(e, this.direction === "rtl"), this.isSameColumn) : this.orientation === "horizontal" ? this.getNextColumn(t, this.direction === "rtl") : null;
|
|
49
|
-
}
|
|
50
|
-
getKeyLeftOf(t) {
|
|
51
|
-
return this.layout === "grid" ? this.orientation === "vertical" ? this.getNextColumn(t, this.direction === "ltr") : this.findKey(t, (e) => this.getNextColumn(e, this.direction === "ltr"), this.isSameColumn) : this.orientation === "horizontal" ? this.getNextColumn(t, this.direction === "ltr") : null;
|
|
52
|
-
}
|
|
53
|
-
getFirstKey() {
|
|
54
|
-
let t = this.collection.getFirstKey();
|
|
55
|
-
for (; t != null; ) {
|
|
56
|
-
let e = this.collection.getItem(t);
|
|
57
|
-
if ((e == null ? void 0 : e.type) === "item" && !this.isDisabled(e)) return t;
|
|
58
|
-
t = this.collection.getKeyAfter(t);
|
|
59
|
-
}
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
getLastKey() {
|
|
63
|
-
let t = this.collection.getLastKey();
|
|
64
|
-
for (; t != null; ) {
|
|
65
|
-
let e = this.collection.getItem(t);
|
|
66
|
-
if (e.type === "item" && !this.isDisabled(e)) return t;
|
|
67
|
-
t = this.collection.getKeyBefore(t);
|
|
68
|
-
}
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
getItem(t) {
|
|
72
|
-
return t !== null ? this.ref.current.querySelector(`[data-key="${CSS.escape(t.toString())}"]`) : null;
|
|
73
|
-
}
|
|
74
|
-
getKeyPageAbove(t) {
|
|
75
|
-
let e = this.ref.current, i = this.getItem(t);
|
|
76
|
-
if (!i) return null;
|
|
77
|
-
if (!s(e)) return this.getFirstKey();
|
|
78
|
-
let n = e.getBoundingClientRect(), l = i.getBoundingClientRect();
|
|
79
|
-
if (this.orientation === "horizontal") {
|
|
80
|
-
let o = n.x - e.scrollLeft, r = Math.max(0, l.x - o + l.width - n.width);
|
|
81
|
-
for (; i && l.x - o > r; )
|
|
82
|
-
t = this.getKeyAbove(t), i = t == null ? null : this.getItem(t), l = i == null ? void 0 : i.getBoundingClientRect();
|
|
83
|
-
} else {
|
|
84
|
-
let o = n.y - e.scrollTop, r = Math.max(0, l.y - o + l.height - n.height);
|
|
85
|
-
for (; i && l.y - o > r; )
|
|
86
|
-
t = this.getKeyAbove(t), i = t == null ? null : this.getItem(t), l = i == null ? void 0 : i.getBoundingClientRect();
|
|
87
|
-
}
|
|
88
|
-
return t ?? this.getFirstKey();
|
|
89
|
-
}
|
|
90
|
-
getKeyPageBelow(t) {
|
|
91
|
-
let e = this.ref.current, i = this.getItem(t);
|
|
92
|
-
if (!i) return null;
|
|
93
|
-
if (!s(e)) return this.getLastKey();
|
|
94
|
-
let n = e.getBoundingClientRect(), l = i.getBoundingClientRect();
|
|
95
|
-
if (this.orientation === "horizontal") {
|
|
96
|
-
let o = n.x - e.scrollLeft, r = Math.min(e.scrollWidth, l.x - o - l.width + n.width);
|
|
97
|
-
for (; i && l.x - o < r; )
|
|
98
|
-
t = this.getKeyBelow(t), i = t == null ? null : this.getItem(t), l = i == null ? void 0 : i.getBoundingClientRect();
|
|
99
|
-
} else {
|
|
100
|
-
let o = n.y - e.scrollTop, r = Math.min(e.scrollHeight, l.y - o - l.height + n.height);
|
|
101
|
-
for (; i && l.y - o < r; )
|
|
102
|
-
t = this.getKeyBelow(t), i = t == null ? null : this.getItem(t), l = i == null ? void 0 : i.getBoundingClientRect();
|
|
103
|
-
}
|
|
104
|
-
return t ?? this.getLastKey();
|
|
105
|
-
}
|
|
106
|
-
getKeyForSearch(t, e) {
|
|
107
|
-
if (!this.collator) return null;
|
|
108
|
-
let i = this.collection, n = e || this.getFirstKey();
|
|
109
|
-
for (; n != null; ) {
|
|
110
|
-
let l = i.getItem(n), o = l.textValue.slice(0, t.length);
|
|
111
|
-
if (l.textValue && this.collator.compare(o, t) === 0) return n;
|
|
112
|
-
n = this.getKeyBelow(n);
|
|
113
|
-
}
|
|
114
|
-
return null;
|
|
115
|
-
}
|
|
116
|
-
constructor(...t) {
|
|
117
|
-
if (t.length === 1) {
|
|
118
|
-
let e = t[0];
|
|
119
|
-
this.collection = e.collection, this.ref = e.ref, this.collator = e.collator, this.disabledKeys = e.disabledKeys || /* @__PURE__ */ new Set(), this.disabledBehavior = e.disabledBehavior || "all", this.orientation = e.orientation, this.direction = e.direction, this.layout = e.layout || "stack";
|
|
120
|
-
} else
|
|
121
|
-
this.collection = t[0], this.disabledKeys = t[1], this.ref = t[2], this.collator = t[3], this.layout = "stack", this.orientation = "vertical", this.disabledBehavior = "all";
|
|
122
|
-
this.layout === "stack" && this.orientation === "vertical" && (this.getKeyLeftOf = void 0, this.getKeyRightOf = void 0);
|
|
1
|
+
import { j as f } from "./index225.mjs";
|
|
2
|
+
function p(a) {
|
|
3
|
+
let {
|
|
4
|
+
swiper: e,
|
|
5
|
+
duration: o,
|
|
6
|
+
transformElements: s,
|
|
7
|
+
allSlides: l
|
|
8
|
+
} = a;
|
|
9
|
+
const {
|
|
10
|
+
activeIndex: d
|
|
11
|
+
} = e, c = (n) => n.parentElement ? n.parentElement : e.slides.filter((t) => t.shadowRoot && t.shadowRoot === n.parentNode)[0];
|
|
12
|
+
if (e.params.virtualTranslate && o !== 0) {
|
|
13
|
+
let n = !1, r;
|
|
14
|
+
l ? r = s : r = s.filter((t) => {
|
|
15
|
+
const i = t.classList.contains("swiper-slide-transform") ? c(t) : t;
|
|
16
|
+
return e.getSlideIndex(i) === d;
|
|
17
|
+
}), r.forEach((t) => {
|
|
18
|
+
f(t, () => {
|
|
19
|
+
if (n || !e || e.destroyed) return;
|
|
20
|
+
n = !0, e.animating = !1;
|
|
21
|
+
const i = new window.CustomEvent("transitionend", {
|
|
22
|
+
bubbles: !0,
|
|
23
|
+
cancelable: !0
|
|
24
|
+
});
|
|
25
|
+
e.wrapperEl.dispatchEvent(i);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
123
28
|
}
|
|
124
29
|
}
|
|
125
30
|
export {
|
|
126
|
-
|
|
31
|
+
p as e
|
|
127
32
|
};
|
package/index231.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index225.js");function a(t,l,o){const s=`swiper-slide-shadow${o?`-${o}`:""}${t?` swiper-slide-shadow-${t}`:""}`,i=r.l(l);let e=i.querySelector(`.${s.split(" ").join(".")}`);return e||(e=r.c("div",s.split(" ")),i.append(e)),e}exports.c=a;
|
package/index231.mjs
CHANGED
|
@@ -1,133 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
e
|
|
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
|
-
});
|
|
8
|
-
}
|
|
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() {
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
createElement() {
|
|
36
|
-
return {
|
|
37
|
-
children: [],
|
|
38
|
-
childNodes: [],
|
|
39
|
-
style: {},
|
|
40
|
-
setAttribute() {
|
|
41
|
-
},
|
|
42
|
-
getElementsByTagName() {
|
|
43
|
-
return [];
|
|
44
|
-
}
|
|
45
|
-
};
|
|
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: ""
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
function c() {
|
|
65
|
-
const e = typeof document < "u" ? document : {};
|
|
66
|
-
return o(e, u), e;
|
|
67
|
-
}
|
|
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;
|
|
1
|
+
import { l, c as i } from "./index225.mjs";
|
|
2
|
+
function d(s, r, o) {
|
|
3
|
+
const a = `swiper-slide-shadow${o ? `-${o}` : ""}${s ? ` swiper-slide-shadow-${s}` : ""}`, t = l(r);
|
|
4
|
+
let e = t.querySelector(`.${a.split(" ").join(".")}`);
|
|
5
|
+
return e || (e = i("div", a.split(" ")), t.append(e)), e;
|
|
129
6
|
}
|
|
130
7
|
export {
|
|
131
|
-
|
|
132
|
-
c as g
|
|
8
|
+
d as c
|
|
133
9
|
};
|
package/index232.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index231.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;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index272.js"),B=require("./index273.js"),N=require("./index274.js"),j=require("./index148.js"),U=require("./index275.js"),o=require("@react-aria/utils"),w=require("react");function z(i){let s=w.useContext(B.PressResponderContext);if(s){let{register:u,...c}=s;i=o.mergeProps(c,i),u()}return o.useSyncRef(s,i.ref),i}var x=new WeakMap;class C{continuePropagation(){U._class_private_field_set(this,x,!1)}get shouldStopPropagation(){return N._class_private_field_get(this,x)}constructor(s,u,c){j._class_private_field_init(this,x,{writable:!0,value:void 0}),U._class_private_field_set(this,x,!0),this.type=s,this.pointerType=u,this.target=c.currentTarget,this.shiftKey=c.shiftKey,this.metaKey=c.metaKey,this.ctrlKey=c.ctrlKey,this.altKey=c.altKey}}const R=Symbol("linkClicked");function J(i){let{onPress:s,onPressChange:u,onPressStart:c,onPressEnd:g,onPressUp:M,isDisabled:v,isPressed:H,preventFocusOnPress:k,shouldCancelOnPointerExit:G,allowTextSelectionOnPress:y,ref:re,...V}=z(i),[X,A]=w.useState(!1),S=w.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:h,removeAllGlobalListeners:$}=o.useGlobalListeners(),T=o.useEffectEvent((e,a)=>{let d=S.current;if(v||d.didFirePressStart)return!1;let n=!0;if(d.isTriggeringEvent=!0,c){let l=new C("pressstart",a,e);c(l),n=l.shouldStopPropagation}return u&&u(!0),d.isTriggeringEvent=!1,d.didFirePressStart=!0,A(!0),n}),p=o.useEffectEvent((e,a,d=!0)=>{let n=S.current;if(!n.didFirePressStart)return!1;n.ignoreClickAfterPress=!0,n.didFirePressStart=!1,n.isTriggeringEvent=!0;let l=!0;if(g){let t=new C("pressend",a,e);g(t),l=t.shouldStopPropagation}if(u&&u(!1),A(!1),s&&d&&!v){let t=new C("press",a,e);s(t),l&&(l=t.shouldStopPropagation)}return n.isTriggeringEvent=!1,l}),m=o.useEffectEvent((e,a)=>{let d=S.current;if(v)return!1;if(M){d.isTriggeringEvent=!0;let n=new C("pressup",a,e);return M(n),d.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),E=o.useEffectEvent(e=>{let a=S.current;a.isPressed&&a.target&&(a.isOverTarget&&a.pointerType!=null&&p(P(a.target,e),a.pointerType,!1),a.isPressed=!1,a.isOverTarget=!1,a.activePointerId=null,a.pointerType=null,$(),y||b.restoreTextSelection(a.target))}),_=o.useEffectEvent(e=>{G&&E(e)}),Y=w.useMemo(()=>{let e=S.current,a={onKeyDown(n){if(D(n.nativeEvent,n.currentTarget)&&n.currentTarget.contains(n.target)){var l;W(n.target,n.key)&&n.preventDefault();let t=!0;if(!e.isPressed&&!n.repeat){e.target=n.currentTarget,e.isPressed=!0,t=T(n,"keyboard");let r=n.currentTarget,f=O=>{D(O,r)&&!O.repeat&&r.contains(O.target)&&e.target&&m(P(e.target,O),"keyboard")};h(o.getOwnerDocument(n.currentTarget),"keyup",o.chain(f,d),!0)}t&&n.stopPropagation(),n.metaKey&&o.isMac()&&((l=e.metaKeyEvents)===null||l===void 0||l.set(n.key,n.nativeEvent))}else n.key==="Meta"&&(e.metaKeyEvents=new Map)},onClick(n){if(!(n&&!n.currentTarget.contains(n.target))&&n&&n.button===0&&!e.isTriggeringEvent&&!o.openLink.isOpening){let l=!0;if(v&&n.preventDefault(),!e.ignoreClickAfterPress&&!e.ignoreEmulatedMouseEvents&&!e.isPressed&&(e.pointerType==="virtual"||o.isVirtualClick(n.nativeEvent))){!v&&!k&&o.focusWithoutScrolling(n.currentTarget);let t=T(n,"virtual"),r=m(n,"virtual"),f=p(n,"virtual");l=t&&r&&f}e.ignoreEmulatedMouseEvents=!1,e.ignoreClickAfterPress=!1,l&&n.stopPropagation()}}},d=n=>{var l;if(e.isPressed&&e.target&&D(n,e.target)){var t;W(n.target,n.key)&&n.preventDefault();let f=n.target;p(P(e.target,n),"keyboard",e.target.contains(f)),$(),n.key!=="Enter"&&L(e.target)&&e.target.contains(f)&&!n[R]&&(n[R]=!0,o.openLink(e.target,n,!1)),e.isPressed=!1,(t=e.metaKeyEvents)===null||t===void 0||t.delete(n.key)}else if(n.key==="Meta"&&(!((l=e.metaKeyEvents)===null||l===void 0)&&l.size)){var r;let f=e.metaKeyEvents;e.metaKeyEvents=void 0;for(let O of f.values())(r=e.target)===null||r===void 0||r.dispatchEvent(new KeyboardEvent("keyup",O))}};if(typeof PointerEvent<"u"){a.onPointerDown=r=>{if(r.button!==0||!r.currentTarget.contains(r.target))return;if(o.isVirtualPointerEvent(r.nativeEvent)){e.pointerType="virtual";return}I(r.currentTarget)&&r.preventDefault(),e.pointerType=r.pointerType;let f=!0;e.isPressed||(e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=r.pointerId,e.target=r.currentTarget,!v&&!k&&o.focusWithoutScrolling(r.currentTarget),y||b.disableTextSelection(e.target),f=T(r,e.pointerType),h(o.getOwnerDocument(r.currentTarget),"pointermove",n,!1),h(o.getOwnerDocument(r.currentTarget),"pointerup",l,!1),h(o.getOwnerDocument(r.currentTarget),"pointercancel",t,!1)),f&&r.stopPropagation()},a.onMouseDown=r=>{r.currentTarget.contains(r.target)&&r.button===0&&(I(r.currentTarget)&&r.preventDefault(),r.stopPropagation())},a.onPointerUp=r=>{!r.currentTarget.contains(r.target)||e.pointerType==="virtual"||r.button===0&&K(r,r.currentTarget)&&m(r,e.pointerType||r.pointerType)};let n=r=>{r.pointerId===e.activePointerId&&(e.target&&K(r,e.target)?!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,T(P(e.target,r),e.pointerType)):e.target&&e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,p(P(e.target,r),e.pointerType,!1),_(r)))},l=r=>{r.pointerId===e.activePointerId&&e.isPressed&&r.button===0&&e.target&&(K(r,e.target)&&e.pointerType!=null?p(P(e.target,r),e.pointerType):e.isOverTarget&&e.pointerType!=null&&p(P(e.target,r),e.pointerType,!1),e.isPressed=!1,e.isOverTarget=!1,e.activePointerId=null,e.pointerType=null,$(),y||b.restoreTextSelection(e.target))},t=r=>{E(r)};a.onDragStart=r=>{r.currentTarget.contains(r.target)&&E(r)}}else{a.onMouseDown=t=>{if(t.button!==0||!t.currentTarget.contains(t.target))return;if(I(t.currentTarget)&&t.preventDefault(),e.ignoreEmulatedMouseEvents){t.stopPropagation();return}e.isPressed=!0,e.isOverTarget=!0,e.target=t.currentTarget,e.pointerType=o.isVirtualClick(t.nativeEvent)?"virtual":"mouse",!v&&!k&&o.focusWithoutScrolling(t.currentTarget),T(t,e.pointerType)&&t.stopPropagation(),h(o.getOwnerDocument(t.currentTarget),"mouseup",n,!1)},a.onMouseEnter=t=>{if(!t.currentTarget.contains(t.target))return;let r=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&e.pointerType!=null&&(e.isOverTarget=!0,r=T(t,e.pointerType)),r&&t.stopPropagation()},a.onMouseLeave=t=>{if(!t.currentTarget.contains(t.target))return;let r=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&e.pointerType!=null&&(e.isOverTarget=!1,r=p(t,e.pointerType,!1),_(t)),r&&t.stopPropagation()},a.onMouseUp=t=>{t.currentTarget.contains(t.target)&&!e.ignoreEmulatedMouseEvents&&t.button===0&&m(t,e.pointerType||"mouse")};let n=t=>{if(t.button===0){if(e.isPressed=!1,$(),e.ignoreEmulatedMouseEvents){e.ignoreEmulatedMouseEvents=!1;return}e.target&&K(t,e.target)&&e.pointerType!=null?p(P(e.target,t),e.pointerType):e.target&&e.isOverTarget&&e.pointerType!=null&&p(P(e.target,t),e.pointerType,!1),e.isOverTarget=!1}};a.onTouchStart=t=>{if(!t.currentTarget.contains(t.target))return;let r=Q(t.nativeEvent);if(!r)return;e.activePointerId=r.identifier,e.ignoreEmulatedMouseEvents=!0,e.isOverTarget=!0,e.isPressed=!0,e.target=t.currentTarget,e.pointerType="touch",!v&&!k&&o.focusWithoutScrolling(t.currentTarget),y||b.disableTextSelection(e.target),T(t,e.pointerType)&&t.stopPropagation(),h(o.getOwnerWindow(t.currentTarget),"scroll",l,!0)},a.onTouchMove=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.isPressed){t.stopPropagation();return}let r=F(t.nativeEvent,e.activePointerId),f=!0;r&&K(r,t.currentTarget)?!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,f=T(t,e.pointerType)):e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,f=p(t,e.pointerType,!1),_(t)),f&&t.stopPropagation()},a.onTouchEnd=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.isPressed){t.stopPropagation();return}let r=F(t.nativeEvent,e.activePointerId),f=!0;r&&K(r,t.currentTarget)&&e.pointerType!=null?(m(t,e.pointerType),f=p(t,e.pointerType)):e.isOverTarget&&e.pointerType!=null&&(f=p(t,e.pointerType,!1)),f&&t.stopPropagation(),e.isPressed=!1,e.activePointerId=null,e.isOverTarget=!1,e.ignoreEmulatedMouseEvents=!0,e.target&&!y&&b.restoreTextSelection(e.target),$()},a.onTouchCancel=t=>{t.currentTarget.contains(t.target)&&(t.stopPropagation(),e.isPressed&&E(t))};let l=t=>{e.isPressed&&t.target.contains(e.target)&&E({currentTarget:e.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};a.onDragStart=t=>{t.currentTarget.contains(t.target)&&E(t)}}return a},[h,v,k,$,y,E,_,p,T,m]);return w.useEffect(()=>()=>{var e;y||b.restoreTextSelection((e=S.current.target)!==null&&e!==void 0?e:void 0)},[y]),{isPressed:H||X,pressProps:o.mergeProps(V,Y)}}function L(i){return i.tagName==="A"&&i.hasAttribute("href")}function D(i,s){const{key:u,code:c}=i,g=s,M=g.getAttribute("role");return(u==="Enter"||u===" "||u==="Spacebar"||c==="Space")&&!(g instanceof o.getOwnerWindow(g).HTMLInputElement&&!q(g,u)||g instanceof o.getOwnerWindow(g).HTMLTextAreaElement||g.isContentEditable)&&!((M==="link"||!M&&L(g))&&u!=="Enter")}function Q(i){const{targetTouches:s}=i;return s.length>0?s[0]:null}function F(i,s){const u=i.changedTouches;for(let c=0;c<u.length;c++){const g=u[c];if(g.identifier===s)return g}return null}function P(i,s){return{currentTarget:i,shiftKey:s.shiftKey,ctrlKey:s.ctrlKey,metaKey:s.metaKey,altKey:s.altKey}}function Z(i){let s=0,u=0;return i.width!==void 0?s=i.width/2:i.radiusX!==void 0&&(s=i.radiusX),i.height!==void 0?u=i.height/2:i.radiusY!==void 0&&(u=i.radiusY),{top:i.clientY-u,right:i.clientX+s,bottom:i.clientY+u,left:i.clientX-s}}function ee(i,s){return!(i.left>s.right||s.left>i.right||i.top>s.bottom||s.top>i.bottom)}function K(i,s){let u=s.getBoundingClientRect(),c=Z(i);return ee(u,c)}function I(i){return!(i instanceof HTMLElement)||!i.hasAttribute("draggable")}function W(i,s){return i instanceof HTMLInputElement?!q(i,s):i instanceof HTMLButtonElement?i.type!=="submit"&&i.type!=="reset":!L(i)}const te=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function q(i,s){return i.type==="checkbox"||i.type==="radio"?s===" ":te.has(i.type)}exports.usePress=J;
|