@companix/uikit 0.0.33 → 0.0.34
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/dist/Avatar/Avatar.scss +64 -0
- package/dist/Avatar/helpers.d.ts +10 -0
- package/dist/Avatar/index.d.ts +8 -0
- package/dist/Avatar/types.d.ts +2 -0
- package/dist/Icon/index.d.ts +2 -3
- package/dist/Segments/Segments.scss +57 -0
- package/dist/Segments/index.d.ts +11 -0
- package/dist/bundle.es.js +86 -80
- package/dist/bundle.es10.js +78 -39
- package/dist/bundle.es11.js +26 -36
- package/dist/bundle.es12.js +75 -56
- package/dist/bundle.es13.js +39 -19
- package/dist/bundle.es14.js +36 -33
- package/dist/bundle.es15.js +54 -23
- package/dist/bundle.es16.js +21 -45
- package/dist/bundle.es17.js +29 -19
- package/dist/bundle.es18.js +21 -25
- package/dist/bundle.es19.js +45 -38
- package/dist/bundle.es2.js +42 -45
- package/dist/bundle.es20.js +21 -14
- package/dist/bundle.es21.js +28 -33
- package/dist/bundle.es22.js +38 -21
- package/dist/bundle.es23.js +12 -38
- package/dist/bundle.es24.js +32 -114
- package/dist/bundle.es25.js +20 -120
- package/dist/bundle.es26.js +40 -72
- package/dist/bundle.es27.js +115 -32
- package/dist/bundle.es28.js +120 -11
- package/dist/bundle.es29.js +71 -83
- package/dist/bundle.es3.js +2 -8
- package/dist/bundle.es30.js +31 -20
- package/dist/bundle.es31.js +11 -6
- package/dist/bundle.es32.js +83 -32
- package/dist/bundle.es33.js +21 -21
- package/dist/bundle.es34.js +6 -10
- package/dist/bundle.es35.js +33 -23
- package/dist/bundle.es36.js +20 -37
- package/dist/bundle.es37.js +10 -50
- package/dist/bundle.es38.js +22 -40
- package/dist/bundle.es39.js +38 -8
- package/dist/bundle.es4.js +44 -10
- package/dist/bundle.es40.js +48 -21
- package/dist/bundle.es41.js +42 -86
- package/dist/bundle.es42.js +8 -17
- package/dist/bundle.es43.js +24 -19
- package/dist/bundle.es44.js +24 -24
- package/dist/bundle.es45.js +77 -29
- package/dist/bundle.es46.js +18 -3
- package/dist/bundle.es47.js +20 -5
- package/dist/bundle.es48.js +24 -14
- package/dist/bundle.es49.js +39 -14
- package/dist/bundle.es5.js +8 -85
- package/dist/bundle.es50.js +3 -3
- package/dist/bundle.es51.js +5 -3
- package/dist/bundle.es52.js +13 -69
- package/dist/bundle.es53.js +13 -67
- package/dist/bundle.es54.js +3 -70
- package/dist/bundle.es55.js +3 -12
- package/dist/bundle.es56.js +68 -41
- package/dist/bundle.es57.js +67 -14
- package/dist/bundle.es58.js +69 -31
- package/dist/bundle.es59.js +12 -70
- package/dist/bundle.es6.js +11 -85
- package/dist/bundle.es60.js +43 -20
- package/dist/bundle.es61.js +15 -2
- package/dist/bundle.es62.js +32 -14
- package/dist/bundle.es63.js +69 -19
- package/dist/bundle.es64.js +76 -2
- package/dist/bundle.es65.js +49 -21
- package/dist/bundle.es66.js +14 -2
- package/dist/bundle.es67.js +9 -9
- package/dist/bundle.es68.js +2 -76
- package/dist/bundle.es69.js +20 -49
- package/dist/bundle.es7.js +84 -79
- package/dist/bundle.es70.js +2 -2
- package/dist/bundle.es71.js +21 -14
- package/dist/bundle.es72.js +2 -3
- package/dist/bundle.es73.js +20 -3
- package/dist/bundle.es74.js +3 -20
- package/dist/bundle.es75.js +3 -2
- package/dist/bundle.es76.js +14 -20
- package/dist/bundle.es77.js +2 -2
- package/dist/bundle.es78.js +22 -0
- package/dist/bundle.es79.js +4 -0
- package/dist/bundle.es8.js +83 -24
- package/dist/bundle.es80.js +22 -0
- package/dist/bundle.es81.js +4 -0
- package/dist/bundle.es9.js +20 -73
- package/dist/index.d.ts +6 -0
- package/dist/index.scss +2 -0
- package/package.json +1 -1
package/dist/bundle.es69.js
CHANGED
|
@@ -1,51 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
minDateTime: l,
|
|
21
|
-
maxDateTime: s
|
|
22
|
-
}), k = M(
|
|
23
|
-
(o, t) => {
|
|
24
|
-
const n = /* @__PURE__ */ new Date();
|
|
25
|
-
t = t || e.getFullYear();
|
|
26
|
-
const h = l ? l.getMonth() : 0, Y = s ? s.getMonth() : 11, F = l?.getFullYear() || w, f = s?.getFullYear() || A;
|
|
27
|
-
let g = t >= F && t <= f ? t === F && h > o || t === f && o > Y : !0;
|
|
28
|
-
return c && (g = g || (t === n.getFullYear() ? o > n.getMonth() : t > n.getFullYear())), r && (g = g || (t === n.getFullYear() ? o < n.getMonth() : t < n.getFullYear())), g;
|
|
29
|
-
},
|
|
30
|
-
[c, r, e, l, s]
|
|
31
|
-
), v = M(
|
|
32
|
-
(o) => {
|
|
33
|
-
const t = /* @__PURE__ */ new Date(), n = l?.getFullYear() || w, h = s?.getFullYear() || A;
|
|
34
|
-
let Y = n > o || o > h;
|
|
35
|
-
return c && (Y = Y || o > t.getFullYear()), r && (Y = Y || o < t.getFullYear()), Y;
|
|
36
|
-
},
|
|
37
|
-
[c, r, l, s]
|
|
38
|
-
);
|
|
39
|
-
return {
|
|
40
|
-
viewDate: e,
|
|
41
|
-
setViewDate: u,
|
|
42
|
-
setPrevMonth: _,
|
|
43
|
-
setNextMonth: C,
|
|
44
|
-
isDayDisabled: D,
|
|
45
|
-
isMonthDisabled: k,
|
|
46
|
-
isYearDisabled: v
|
|
47
|
-
};
|
|
48
|
-
};
|
|
1
|
+
import { __exports as e } from "./bundle.es70.js";
|
|
2
|
+
var c;
|
|
3
|
+
function d() {
|
|
4
|
+
return c ? e : (c = 1, (function(a) {
|
|
5
|
+
Object.defineProperty(a, "__esModule", { value: !0 });
|
|
6
|
+
var n = "fas", r = "chevron-down", v = 448, o = 512, i = [], f = "f078", h = "M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z";
|
|
7
|
+
a.definition = {
|
|
8
|
+
prefix: n,
|
|
9
|
+
iconName: r,
|
|
10
|
+
icon: [
|
|
11
|
+
v,
|
|
12
|
+
o,
|
|
13
|
+
i,
|
|
14
|
+
f,
|
|
15
|
+
h
|
|
16
|
+
]
|
|
17
|
+
}, a.faChevronDown = a.definition, a.prefix = n, a.iconName = r, a.width = v, a.height = o, a.ligatures = i, a.unicode = f, a.svgPathData = h, a.aliases = i;
|
|
18
|
+
})(e), e);
|
|
19
|
+
}
|
|
49
20
|
export {
|
|
50
|
-
|
|
21
|
+
d as __require
|
|
51
22
|
};
|
package/dist/bundle.es7.js
CHANGED
|
@@ -1,82 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
1
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
2
|
+
import S from "classnames";
|
|
3
|
+
import { forwardRef as I } from "react";
|
|
4
|
+
import { customCSS as r, px as i } from "@companix/utils-browser";
|
|
5
|
+
const $ = I((t, c) => {
|
|
6
|
+
let {
|
|
7
|
+
interactionKind: m = "static",
|
|
8
|
+
thumbPos: g = "center",
|
|
9
|
+
thumbPadding: l = 4,
|
|
10
|
+
heightAuto: s,
|
|
11
|
+
scrollX: h,
|
|
12
|
+
className: u,
|
|
13
|
+
scrollY: n,
|
|
14
|
+
onWheel: b,
|
|
15
|
+
maxHeight: d,
|
|
16
|
+
onScroll: f,
|
|
17
|
+
thumbColor: p,
|
|
18
|
+
children: w
|
|
19
|
+
} = t;
|
|
20
|
+
const x = (() => {
|
|
21
|
+
if (t.implementation === "edge") {
|
|
22
|
+
l = 0;
|
|
23
|
+
const { padding: o, scrollbarWidth: e } = t;
|
|
24
|
+
return {
|
|
25
|
+
...r({ "--scrollbar-width": i(e) }),
|
|
26
|
+
padding: `0px ${o - e}px 0px ${o}px`
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
if (t.implementation === "outer") {
|
|
30
|
+
const { shadowPadding: o = 0, noneCorrect: e, scrollbarWidth: a } = t;
|
|
31
|
+
return window.IS_MOBILE ? {
|
|
32
|
+
padding: o,
|
|
33
|
+
margin: -o
|
|
34
|
+
} : {
|
|
35
|
+
...r({ "--scrollbar-width": i(a) }),
|
|
36
|
+
padding: o,
|
|
37
|
+
margin: -o,
|
|
38
|
+
marginRight: e ? void 0 : `calc(-${a}px - ${o}px)`,
|
|
39
|
+
marginBottom: 0
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
if (t.implementation === "inner") {
|
|
43
|
+
const { padding: o } = t;
|
|
44
|
+
return window.IS_MOBILE ? {
|
|
45
|
+
[n ? "paddingLeft" : "paddingTop"]: o,
|
|
46
|
+
[n ? "paddingRight" : "paddingBottom"]: o
|
|
47
|
+
} : {
|
|
48
|
+
[n ? "paddingLeft" : "paddingTop"]: o,
|
|
49
|
+
...r({ "--scrollbar-width": i(o) })
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
return {};
|
|
53
|
+
})();
|
|
54
|
+
return /* @__PURE__ */ v(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
ref: c,
|
|
58
|
+
onWheel: b,
|
|
59
|
+
onScroll: f,
|
|
60
|
+
onMouseDown: (o) => {
|
|
61
|
+
o.preventDefault();
|
|
62
|
+
},
|
|
63
|
+
style: {
|
|
64
|
+
...x,
|
|
65
|
+
...t.style,
|
|
66
|
+
maxHeight: d ? i(d) : void 0,
|
|
67
|
+
...r({ "--thumb-padding": i(l) }),
|
|
68
|
+
...r({ "--thumb-color": p ?? "#c1c2c8bd" })
|
|
69
|
+
},
|
|
70
|
+
className: S(
|
|
71
|
+
!window.IS_MOBILE && "scrollable",
|
|
72
|
+
u,
|
|
73
|
+
s ? "" : "h-full",
|
|
74
|
+
{
|
|
75
|
+
"overflow-y-scroll": n,
|
|
76
|
+
"overflow-x-scroll": h,
|
|
77
|
+
"scrollable-hover-interaction": m === "hover",
|
|
78
|
+
"scrollable-border-position": g === "border"
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
children: w
|
|
82
|
+
}
|
|
83
|
+
);
|
|
79
84
|
});
|
|
80
85
|
export {
|
|
81
|
-
|
|
86
|
+
$ as Scrollable
|
|
82
87
|
};
|
package/dist/bundle.es70.js
CHANGED
package/dist/bundle.es71.js
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { __exports as a } from "./bundle.es72.js";
|
|
2
|
+
import { __require as n } from "./bundle.es73.js";
|
|
3
|
+
var r;
|
|
4
|
+
function f() {
|
|
5
|
+
return r ? a : (r = 1, (function(e) {
|
|
6
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
7
|
+
var i = /* @__PURE__ */ n();
|
|
8
|
+
e.definition = {
|
|
9
|
+
prefix: i.prefix,
|
|
10
|
+
iconName: i.iconName,
|
|
11
|
+
icon: [
|
|
12
|
+
i.width,
|
|
13
|
+
i.height,
|
|
14
|
+
i.aliases,
|
|
15
|
+
i.unicode,
|
|
16
|
+
i.svgPathData
|
|
17
|
+
]
|
|
18
|
+
}, e.faClose = e.definition, e.prefix = i.prefix, e.iconName = i.iconName, e.width = i.width, e.height = i.height, e.ligatures = i.aliases, e.unicode = i.unicode, e.svgPathData = i.svgPathData, e.aliases = i.aliases;
|
|
19
|
+
})(a), a);
|
|
20
|
+
}
|
|
14
21
|
export {
|
|
15
|
-
|
|
22
|
+
f as __require
|
|
16
23
|
};
|
package/dist/bundle.es72.js
CHANGED
package/dist/bundle.es73.js
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var
|
|
1
|
+
import { __exports as e } from "./bundle.es77.js";
|
|
2
|
+
var t;
|
|
3
|
+
function d() {
|
|
4
|
+
return t ? e : (t = 1, (function(a) {
|
|
5
|
+
Object.defineProperty(a, "__esModule", { value: !0 });
|
|
6
|
+
var r = "fas", n = "xmark", c = 384, f = 512, i = [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], u = "f00d", m = "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z";
|
|
7
|
+
a.definition = {
|
|
8
|
+
prefix: r,
|
|
9
|
+
iconName: n,
|
|
10
|
+
icon: [
|
|
11
|
+
c,
|
|
12
|
+
f,
|
|
13
|
+
i,
|
|
14
|
+
u,
|
|
15
|
+
m
|
|
16
|
+
]
|
|
17
|
+
}, a.faXmark = a.definition, a.prefix = r, a.iconName = n, a.width = c, a.height = f, a.ligatures = i, a.unicode = u, a.svgPathData = m, a.aliases = i;
|
|
18
|
+
})(e), e);
|
|
19
|
+
}
|
|
3
20
|
export {
|
|
4
|
-
|
|
21
|
+
d as __require
|
|
5
22
|
};
|
package/dist/bundle.es74.js
CHANGED
|
@@ -1,22 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var
|
|
3
|
-
function g() {
|
|
4
|
-
return c ? e : (c = 1, (function(i) {
|
|
5
|
-
Object.defineProperty(i, "__esModule", { value: !0 });
|
|
6
|
-
var r = "fas", n = "chevron-right", h = 320, v = 512, a = [9002], t = "f054", f = "M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z";
|
|
7
|
-
i.definition = {
|
|
8
|
-
prefix: r,
|
|
9
|
-
iconName: n,
|
|
10
|
-
icon: [
|
|
11
|
-
h,
|
|
12
|
-
v,
|
|
13
|
-
a,
|
|
14
|
-
t,
|
|
15
|
-
f
|
|
16
|
-
]
|
|
17
|
-
}, i.faChevronRight = i.definition, i.prefix = r, i.iconName = n, i.width = h, i.height = v, i.ligatures = a, i.unicode = t, i.svgPathData = f, i.aliases = a;
|
|
18
|
-
})(e), e);
|
|
19
|
-
}
|
|
1
|
+
import { __require as r } from "./bundle.es78.js";
|
|
2
|
+
var o = /* @__PURE__ */ r();
|
|
20
3
|
export {
|
|
21
|
-
|
|
4
|
+
o as f
|
|
22
5
|
};
|
package/dist/bundle.es75.js
CHANGED
package/dist/bundle.es76.js
CHANGED
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
e.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
t,
|
|
15
|
-
h
|
|
16
|
-
]
|
|
17
|
-
}, e.faChevronLeft = e.definition, e.prefix = n, e.iconName = r, e.width = f, e.height = v, e.ligatures = a, e.unicode = t, e.svgPathData = h, e.aliases = a;
|
|
18
|
-
})(i), i);
|
|
19
|
-
}
|
|
1
|
+
import { useRef as f, useLayoutEffect as u, useEffect as s } from "react";
|
|
2
|
+
const o = (t, r) => {
|
|
3
|
+
const e = f(!1);
|
|
4
|
+
u(() => {
|
|
5
|
+
e.current = !0, t();
|
|
6
|
+
}, []), s(() => {
|
|
7
|
+
if (e.current) {
|
|
8
|
+
e.current = !1;
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
t();
|
|
12
|
+
}, r);
|
|
13
|
+
};
|
|
20
14
|
export {
|
|
21
|
-
o as
|
|
15
|
+
o as useEffectWithLayout
|
|
22
16
|
};
|
package/dist/bundle.es77.js
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __exports as e } from "./bundle.es79.js";
|
|
2
|
+
var c;
|
|
3
|
+
function g() {
|
|
4
|
+
return c ? e : (c = 1, (function(i) {
|
|
5
|
+
Object.defineProperty(i, "__esModule", { value: !0 });
|
|
6
|
+
var r = "fas", n = "chevron-right", h = 320, v = 512, a = [9002], t = "f054", f = "M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z";
|
|
7
|
+
i.definition = {
|
|
8
|
+
prefix: r,
|
|
9
|
+
iconName: n,
|
|
10
|
+
icon: [
|
|
11
|
+
h,
|
|
12
|
+
v,
|
|
13
|
+
a,
|
|
14
|
+
t,
|
|
15
|
+
f
|
|
16
|
+
]
|
|
17
|
+
}, i.faChevronRight = i.definition, i.prefix = r, i.iconName = n, i.width = h, i.height = v, i.ligatures = a, i.unicode = t, i.svgPathData = f, i.aliases = a;
|
|
18
|
+
})(e), e);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
g as __require
|
|
22
|
+
};
|
package/dist/bundle.es8.js
CHANGED
|
@@ -1,28 +1,87 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
onMouseLeave: () => {
|
|
19
|
-
o(!1);
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
children: e
|
|
1
|
+
import { jsxs as x, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import L from "classnames";
|
|
3
|
+
import { useRef as d, useMemo as f, useCallback as n, useEffect as T, useLayoutEffect as H } from "react";
|
|
4
|
+
import { getContainers as p, pc as h, px as v } from "@companix/utils-browser";
|
|
5
|
+
const C = ({
|
|
6
|
+
children: b,
|
|
7
|
+
thumbClassName: y,
|
|
8
|
+
scrollableClassName: g,
|
|
9
|
+
thumbMargin: R = 0,
|
|
10
|
+
trackWidth: w = 20
|
|
11
|
+
}) => {
|
|
12
|
+
const l = d(null), t = d(null), r = f(() => ({ positons: { top: 0, y: 0 }, scrollRatio: 0 }), []), i = f(() => ({
|
|
13
|
+
start() {
|
|
14
|
+
document.addEventListener("mousemove", a), document.addEventListener("mouseup", m);
|
|
15
|
+
},
|
|
16
|
+
clear() {
|
|
17
|
+
document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", m);
|
|
23
18
|
}
|
|
24
|
-
);
|
|
19
|
+
}), []);
|
|
20
|
+
T(() => {
|
|
21
|
+
const o = new ResizeObserver(u);
|
|
22
|
+
return t.current && p(t.current, (e) => {
|
|
23
|
+
o.observe(e);
|
|
24
|
+
}), () => {
|
|
25
|
+
t.current && p(t.current, (e) => {
|
|
26
|
+
o.unobserve(e);
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
}, []), H(() => {
|
|
30
|
+
u();
|
|
31
|
+
}, []);
|
|
32
|
+
const u = n(() => {
|
|
33
|
+
const { current: o } = t, { current: e } = l;
|
|
34
|
+
if (e && o) {
|
|
35
|
+
const s = o.clientHeight / o.scrollHeight;
|
|
36
|
+
e.style.height = h(s * 100), e.style.display = s === 1 ? "none" : "block", r.scrollRatio = s;
|
|
37
|
+
}
|
|
38
|
+
}, []), a = n(({ clientY: o }) => {
|
|
39
|
+
const { current: e } = t;
|
|
40
|
+
if (e) {
|
|
41
|
+
const s = o - r.positons.y;
|
|
42
|
+
e.scrollTop = r.positons.top + s / r.scrollRatio;
|
|
43
|
+
}
|
|
44
|
+
}, []), m = n(() => {
|
|
45
|
+
i.clear();
|
|
46
|
+
}, []), E = n(({ clientY: o }) => {
|
|
47
|
+
const { current: e } = t;
|
|
48
|
+
e && (r.positons = {
|
|
49
|
+
top: e.scrollTop,
|
|
50
|
+
y: o
|
|
51
|
+
}), i.start();
|
|
52
|
+
}, []), M = () => {
|
|
53
|
+
requestAnimationFrame(() => {
|
|
54
|
+
const { current: o } = t, { current: e } = l;
|
|
55
|
+
e && o && (e.style.top = h(o.scrollTop * 100 / o.scrollHeight));
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
return /* @__PURE__ */ x("div", { className: "relative h-full overflow-hidden", children: [
|
|
59
|
+
/* @__PURE__ */ c(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
className: L("hidden-scroll h-full overflow-y-scroll", g),
|
|
63
|
+
onScroll: M,
|
|
64
|
+
ref: t,
|
|
65
|
+
children: b
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ c(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
className: "absolute right-0 top-0 box-border h-full",
|
|
72
|
+
style: { width: v(w), padding: v(R) },
|
|
73
|
+
children: /* @__PURE__ */ c(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
onMouseDown: E,
|
|
77
|
+
className: `${y} relative w-full rounded-full`,
|
|
78
|
+
ref: l
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
] });
|
|
25
84
|
};
|
|
26
85
|
export {
|
|
27
|
-
|
|
86
|
+
C as ImitateScroll
|
|
28
87
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __exports as i } from "./bundle.es81.js";
|
|
2
|
+
var c;
|
|
3
|
+
function o() {
|
|
4
|
+
return c ? i : (c = 1, (function(e) {
|
|
5
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
6
|
+
var n = "fas", r = "chevron-left", f = 320, v = 512, a = [9001], t = "f053", h = "M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z";
|
|
7
|
+
e.definition = {
|
|
8
|
+
prefix: n,
|
|
9
|
+
iconName: r,
|
|
10
|
+
icon: [
|
|
11
|
+
f,
|
|
12
|
+
v,
|
|
13
|
+
a,
|
|
14
|
+
t,
|
|
15
|
+
h
|
|
16
|
+
]
|
|
17
|
+
}, e.faChevronLeft = e.definition, e.prefix = n, e.iconName = r, e.width = f, e.height = v, e.ligatures = a, e.unicode = t, e.svgPathData = h, e.aliases = a;
|
|
18
|
+
})(i), i);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
o as __require
|
|
22
|
+
};
|