@situaction/traq-ui-ste 1.2.12 → 1.2.15
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/X.es-BEJ-zMPl.mjs +146 -0
- package/dist/components/button/Button.js +36 -36
- package/dist/components/buttonControledScroll/ButtonControlledScroll.js +43 -23
- package/dist/components/calendar/Calendar.js +268 -272
- package/dist/components/drag-and-drop/DragAndDrop.d.ts +31 -0
- package/dist/components/drag-and-drop/DragAndDrop.js +143 -0
- package/dist/components/icon/Icon.js +23729 -46405
- package/dist/components/icon-button/IconButton.js +27 -27
- package/dist/components/input/Input.js +49 -49
- package/dist/components/loading/Loading.d.ts +38 -0
- package/dist/components/loading/Loading.js +87 -0
- package/dist/components/menu/Menu.js +60 -63
- package/dist/components/panel/side-panel/SidePanel.js +18 -19
- package/dist/components/select/Select.js +67 -69
- package/dist/components/select-filter-input-tags/SelectFilterInputTags.js +8 -9
- package/dist/components/select-multi-items/SelectMultiItems.js +18 -18
- package/dist/components/tabs/Tabs.d.ts +2 -2
- package/dist/components/tabs/Tabs.js +82 -88
- package/dist/components/tag/Tag.js +25 -25
- package/dist/components/theme/variables_dark.d.ts +11 -0
- package/dist/components/theme/variables_dark.js +12 -1
- package/dist/components/theme/variables_light.d.ts +11 -0
- package/dist/components/theme/variables_light.js +12 -1
- package/dist/components/toast/Toast.js +38 -38
- package/dist/main.d.ts +2 -0
- package/dist/main.js +29 -25
- package/dist/styles/Button.css +1 -1
- package/dist/styles/ButtonControlledScroll.css +1 -1
- package/dist/styles/Calendar.css +1 -1
- package/dist/styles/DragAndDrop.css +1 -0
- package/dist/styles/IconButton.css +1 -1
- package/dist/styles/Input.css +1 -1
- package/dist/styles/Loading.css +1 -0
- package/dist/styles/Tag.css +1 -1
- package/dist/styles/Toast.css +1 -1
- package/package.json +1 -1
- package/dist/X-Bd1VjKAF.mjs +0 -190
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { createContext as f } from "react";
|
|
3
|
+
const w = /* @__PURE__ */ new Map([
|
|
4
|
+
[
|
|
5
|
+
"bold",
|
|
6
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z" }))
|
|
7
|
+
],
|
|
8
|
+
[
|
|
9
|
+
"duotone",
|
|
10
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M208,96l-80,80L48,96Z", opacity: "0.2" }), /* @__PURE__ */ e.createElement("path", { d: "M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z" }))
|
|
11
|
+
],
|
|
12
|
+
[
|
|
13
|
+
"fill",
|
|
14
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z" }))
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"light",
|
|
18
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z" }))
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
"regular",
|
|
22
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z" }))
|
|
23
|
+
],
|
|
24
|
+
[
|
|
25
|
+
"thin",
|
|
26
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z" }))
|
|
27
|
+
]
|
|
28
|
+
]), A = /* @__PURE__ */ new Map([
|
|
29
|
+
[
|
|
30
|
+
"bold",
|
|
31
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z" }))
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
"duotone",
|
|
35
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M208,160H48l80-80Z", opacity: "0.2" }), /* @__PURE__ */ e.createElement("path", { d: "M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z" }))
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
"fill",
|
|
39
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z" }))
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"light",
|
|
43
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z" }))
|
|
44
|
+
],
|
|
45
|
+
[
|
|
46
|
+
"regular",
|
|
47
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z" }))
|
|
48
|
+
],
|
|
49
|
+
[
|
|
50
|
+
"thin",
|
|
51
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z" }))
|
|
52
|
+
]
|
|
53
|
+
]), F = /* @__PURE__ */ new Map([
|
|
54
|
+
[
|
|
55
|
+
"bold",
|
|
56
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z" }))
|
|
57
|
+
],
|
|
58
|
+
[
|
|
59
|
+
"duotone",
|
|
60
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
61
|
+
"path",
|
|
62
|
+
{
|
|
63
|
+
d: "M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",
|
|
64
|
+
opacity: "0.2"
|
|
65
|
+
}
|
|
66
|
+
), /* @__PURE__ */ e.createElement("path", { d: "M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }))
|
|
67
|
+
],
|
|
68
|
+
[
|
|
69
|
+
"fill",
|
|
70
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }))
|
|
71
|
+
],
|
|
72
|
+
[
|
|
73
|
+
"light",
|
|
74
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z" }))
|
|
75
|
+
],
|
|
76
|
+
[
|
|
77
|
+
"regular",
|
|
78
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }))
|
|
79
|
+
],
|
|
80
|
+
[
|
|
81
|
+
"thin",
|
|
82
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z" }))
|
|
83
|
+
]
|
|
84
|
+
]), H = f({
|
|
85
|
+
color: "currentColor",
|
|
86
|
+
size: "1em",
|
|
87
|
+
weight: "regular",
|
|
88
|
+
mirrored: !1
|
|
89
|
+
}), n = e.forwardRef(
|
|
90
|
+
(a, t) => {
|
|
91
|
+
const {
|
|
92
|
+
alt: r,
|
|
93
|
+
color: m,
|
|
94
|
+
size: l,
|
|
95
|
+
weight: c,
|
|
96
|
+
mirrored: g,
|
|
97
|
+
children: h,
|
|
98
|
+
weights: i,
|
|
99
|
+
...p
|
|
100
|
+
} = a, {
|
|
101
|
+
color: u = "currentColor",
|
|
102
|
+
size: o,
|
|
103
|
+
weight: L = "regular",
|
|
104
|
+
mirrored: M = !1,
|
|
105
|
+
...Z
|
|
106
|
+
} = e.useContext(H);
|
|
107
|
+
return /* @__PURE__ */ e.createElement(
|
|
108
|
+
"svg",
|
|
109
|
+
{
|
|
110
|
+
ref: t,
|
|
111
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
112
|
+
width: l ?? o,
|
|
113
|
+
height: l ?? o,
|
|
114
|
+
fill: m ?? u,
|
|
115
|
+
viewBox: "0 0 256 256",
|
|
116
|
+
transform: g || M ? "scale(-1, 1)" : void 0,
|
|
117
|
+
...Z,
|
|
118
|
+
...p
|
|
119
|
+
},
|
|
120
|
+
!!r && /* @__PURE__ */ e.createElement("title", null, r),
|
|
121
|
+
h,
|
|
122
|
+
i.get(c ?? L)
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
n.displayName = "IconBase";
|
|
127
|
+
const E = e.forwardRef((a, t) => /* @__PURE__ */ e.createElement(n, { ref: t, ...a, weights: w }));
|
|
128
|
+
E.displayName = "CaretDownIcon";
|
|
129
|
+
const x = E, d = e.forwardRef((a, t) => /* @__PURE__ */ e.createElement(n, { ref: t, ...a, weights: A }));
|
|
130
|
+
d.displayName = "CaretUpIcon";
|
|
131
|
+
const C = d, s = e.forwardRef((a, t) => /* @__PURE__ */ e.createElement(n, { ref: t, ...a, weights: F }));
|
|
132
|
+
s.displayName = "XIcon";
|
|
133
|
+
const $ = s;
|
|
134
|
+
export {
|
|
135
|
+
x as a,
|
|
136
|
+
A as b,
|
|
137
|
+
F as c,
|
|
138
|
+
H as d,
|
|
139
|
+
E as e,
|
|
140
|
+
s as f,
|
|
141
|
+
$ as n,
|
|
142
|
+
d as o,
|
|
143
|
+
n as p,
|
|
144
|
+
C as s,
|
|
145
|
+
w as t
|
|
146
|
+
};
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import '../../styles/Button.css';const
|
|
4
|
-
button:
|
|
5
|
-
"button-primary": "_button-
|
|
6
|
-
"button-secondary": "_button-
|
|
7
|
-
"button-tertiary": "_button-
|
|
8
|
-
"button-ghost": "_button-
|
|
9
|
-
"button-text": "_button-
|
|
10
|
-
"button-text-selected": "_button-text-
|
|
11
|
-
"button-error": "_button-
|
|
12
|
-
"button-size-xl": "_button-size-
|
|
13
|
-
"button-size-l": "_button-size-
|
|
14
|
-
"button-size-m": "_button-size-
|
|
15
|
-
"button-size-s": "_button-size-
|
|
16
|
-
"button-size-menu": "_button-size-
|
|
17
|
-
"button-gap-menu": "_button-gap-
|
|
18
|
-
"button-gap-xl": "_button-gap-
|
|
19
|
-
"button-gap-l": "_button-gap-
|
|
20
|
-
"button-gap-m": "_button-gap-
|
|
21
|
-
"button-gap-s": "_button-gap-
|
|
22
|
-
fullWidth:
|
|
23
|
-
flexHorizontalCenter:
|
|
24
|
-
flexHorizontalBetween:
|
|
25
|
-
},
|
|
1
|
+
import { jsxs as x, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import '../../styles/Button.css';const z = "_button_11huw_30", m = "_fullWidth_11huw_194", c = "_flexHorizontalCenter_11huw_198", f = "_flexHorizontalBetween_11huw_205", t = {
|
|
4
|
+
button: z,
|
|
5
|
+
"button-primary": "_button-primary_11huw_53",
|
|
6
|
+
"button-secondary": "_button-secondary_11huw_67",
|
|
7
|
+
"button-tertiary": "_button-tertiary_11huw_83",
|
|
8
|
+
"button-ghost": "_button-ghost_11huw_99",
|
|
9
|
+
"button-text": "_button-text_11huw_116",
|
|
10
|
+
"button-text-selected": "_button-text-selected_11huw_129",
|
|
11
|
+
"button-error": "_button-error_11huw_135",
|
|
12
|
+
"button-size-xl": "_button-size-xl_11huw_151",
|
|
13
|
+
"button-size-l": "_button-size-l_11huw_157",
|
|
14
|
+
"button-size-m": "_button-size-m_11huw_163",
|
|
15
|
+
"button-size-s": "_button-size-s_11huw_169",
|
|
16
|
+
"button-size-menu": "_button-size-menu_11huw_175",
|
|
17
|
+
"button-gap-menu": "_button-gap-menu_11huw_181",
|
|
18
|
+
"button-gap-xl": "_button-gap-xl_11huw_184",
|
|
19
|
+
"button-gap-l": "_button-gap-l_11huw_187",
|
|
20
|
+
"button-gap-m": "_button-gap-m_11huw_181",
|
|
21
|
+
"button-gap-s": "_button-gap-s_11huw_190",
|
|
22
|
+
fullWidth: m,
|
|
23
|
+
flexHorizontalCenter: c,
|
|
24
|
+
flexHorizontalBetween: f
|
|
25
|
+
}, y = p(
|
|
26
26
|
({
|
|
27
27
|
mode: n = "primary",
|
|
28
28
|
size: e = "m",
|
|
29
29
|
label: l,
|
|
30
30
|
error: s,
|
|
31
31
|
selected: b,
|
|
32
|
-
childrenLeft:
|
|
33
|
-
childrenRight:
|
|
32
|
+
childrenLeft: u,
|
|
33
|
+
childrenRight: _,
|
|
34
34
|
fullWidth: r = !1,
|
|
35
35
|
...a
|
|
36
|
-
},
|
|
37
|
-
const
|
|
36
|
+
}, i) => {
|
|
37
|
+
const h = () => s ? "error" : n, w = [
|
|
38
38
|
t.button,
|
|
39
|
-
t[`button-${
|
|
39
|
+
t[`button-${h()}`],
|
|
40
40
|
t[`button-size-${e}`],
|
|
41
41
|
t[`button-gap-${e}`],
|
|
42
42
|
b && n === "text" && t["button-text-selected"],
|
|
43
43
|
r ? t.flexHorizontalBetween : t.flexHorizontalCenter,
|
|
44
44
|
r && t.fullWidth
|
|
45
45
|
].filter(Boolean).join(" ");
|
|
46
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ x(
|
|
47
47
|
"button",
|
|
48
48
|
{
|
|
49
|
-
ref:
|
|
49
|
+
ref: i,
|
|
50
50
|
type: "button",
|
|
51
|
-
className:
|
|
51
|
+
className: w,
|
|
52
52
|
...a,
|
|
53
53
|
children: [
|
|
54
|
-
|
|
54
|
+
u && /* @__PURE__ */ o("span", { className: t.flexHorizontalCenter, children: u }),
|
|
55
55
|
/* @__PURE__ */ o("span", { children: l }),
|
|
56
|
-
|
|
56
|
+
_ && /* @__PURE__ */ o("span", { className: t.flexHorizontalCenter, children: _ })
|
|
57
57
|
]
|
|
58
58
|
}
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
62
|
export {
|
|
63
|
-
|
|
63
|
+
y as Button
|
|
64
64
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as D, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as a, useState as h, useEffect as k } from "react";
|
|
3
|
-
import '../../styles/ButtonControlledScroll.css';const y = "
|
|
3
|
+
import '../../styles/ButtonControlledScroll.css';const y = "_wrapper_1fnz9_6", E = "_container_1fnz9_18", T = "_btn_1fnz9_27", U = "_grab_1fnz9_47", X = "_grabbing_1fnz9_51", j = "_btnLeft_1fnz9_57", B = "_btnRight_1fnz9_62", e = {
|
|
4
4
|
wrapper: y,
|
|
5
5
|
container: E,
|
|
6
6
|
btn: T,
|
|
@@ -8,25 +8,33 @@ import '../../styles/ButtonControlledScroll.css';const y = "_wrapper_lqv42_6", E
|
|
|
8
8
|
grabbing: X,
|
|
9
9
|
btnLeft: j,
|
|
10
10
|
btnRight: B
|
|
11
|
-
}, A = ({
|
|
12
|
-
|
|
11
|
+
}, A = ({
|
|
12
|
+
gap: L = 10,
|
|
13
|
+
items: i,
|
|
14
|
+
iconLeft: b,
|
|
15
|
+
iconRight: m,
|
|
16
|
+
scrollAmount: v = 150,
|
|
17
|
+
grabSpeed: M = 1.5,
|
|
18
|
+
grabbable: o = !0
|
|
19
|
+
}) => {
|
|
20
|
+
const f = v, r = a(null), [S, R] = h(!1), [x, $] = h(!1), s = a(!1), u = a(0), d = a(0), w = (t) => {
|
|
13
21
|
if (o) {
|
|
14
|
-
const
|
|
15
|
-
if (!
|
|
16
|
-
s.current = !0,
|
|
22
|
+
const n = r.current;
|
|
23
|
+
if (!n) return;
|
|
24
|
+
s.current = !0, u.current = t.pageX - n.offsetLeft, d.current = n.scrollLeft, n.classList.add(e.grabbing);
|
|
17
25
|
}
|
|
18
|
-
},
|
|
26
|
+
}, z = (t) => {
|
|
19
27
|
if (o) {
|
|
20
|
-
const
|
|
21
|
-
if (!
|
|
28
|
+
const n = r.current;
|
|
29
|
+
if (!n || !s.current) return;
|
|
22
30
|
t.preventDefault();
|
|
23
|
-
const N = (t.pageX -
|
|
24
|
-
|
|
31
|
+
const N = (t.pageX - n.offsetLeft - u.current) * M;
|
|
32
|
+
n.scrollLeft = d.current + N;
|
|
25
33
|
}
|
|
26
34
|
}, g = () => {
|
|
27
35
|
if (o) {
|
|
28
36
|
const t = r.current;
|
|
29
|
-
s.current = !1, t == null || t.classList.remove(
|
|
37
|
+
s.current = !1, t == null || t.classList.remove(e.grabbing);
|
|
30
38
|
}
|
|
31
39
|
}, C = () => {
|
|
32
40
|
s.current && o && g();
|
|
@@ -34,26 +42,38 @@ import '../../styles/ButtonControlledScroll.css';const y = "_wrapper_lqv42_6", E
|
|
|
34
42
|
const t = r.current;
|
|
35
43
|
t && (R(t.scrollLeft > 0), $(t.scrollLeft + t.clientWidth < t.scrollWidth));
|
|
36
44
|
}, _ = (t) => {
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
39
|
-
const c = t === "left" ? -
|
|
40
|
-
|
|
45
|
+
const n = r.current;
|
|
46
|
+
if (!n) return;
|
|
47
|
+
const c = t === "left" ? -f : f;
|
|
48
|
+
n.scrollBy({ left: c, behavior: "smooth" });
|
|
41
49
|
};
|
|
42
50
|
return k(() => {
|
|
43
51
|
const t = r.current;
|
|
44
52
|
if (!t) return;
|
|
45
|
-
const
|
|
46
|
-
t.addEventListener("scroll",
|
|
53
|
+
const n = () => p();
|
|
54
|
+
t.addEventListener("scroll", n);
|
|
47
55
|
const c = setTimeout(() => {
|
|
48
56
|
p();
|
|
49
57
|
}, 0);
|
|
50
58
|
return () => {
|
|
51
|
-
clearTimeout(c), t.removeEventListener("scroll",
|
|
59
|
+
clearTimeout(c), t.removeEventListener("scroll", n);
|
|
52
60
|
};
|
|
53
|
-
}, [i]), /* @__PURE__ */ D("div", { className: `${
|
|
54
|
-
S && /* @__PURE__ */ l("button", { className: `${
|
|
55
|
-
/* @__PURE__ */ l(
|
|
56
|
-
|
|
61
|
+
}, [i]), /* @__PURE__ */ D("div", { className: `${e.wrapper}`, children: [
|
|
62
|
+
S && /* @__PURE__ */ l("button", { className: `${e.btn} ${e.btnLeft} padding-xs-5`, onClick: () => _("left"), children: b }),
|
|
63
|
+
/* @__PURE__ */ l(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
onMouseDown: w,
|
|
67
|
+
onMouseLeave: C,
|
|
68
|
+
onMouseMove: z,
|
|
69
|
+
onMouseUp: g,
|
|
70
|
+
className: `${e.container} ${o && e.grab}`,
|
|
71
|
+
style: { gap: `${L}px` },
|
|
72
|
+
ref: r,
|
|
73
|
+
children: i.map((t, n) => /* @__PURE__ */ l("div", { className: e.item, children: t }, n))
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
x && /* @__PURE__ */ l("button", { className: `${e.btn} ${e.btnRight} padding-xs-5`, onClick: () => _("right"), children: m })
|
|
57
77
|
] });
|
|
58
78
|
};
|
|
59
79
|
export {
|