@situaction/traq-ui-ste 1.2.19 → 1.2.23
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/Carousel.module-RC3aC2Nl.mjs +22 -0
- package/dist/components/carousel/Carousel.js +204 -208
- package/dist/components/carousel/FadeCarousel.d.ts +29 -0
- package/dist/components/carousel/FadeCarousel.js +195 -0
- package/dist/components/list/list-controls/ListControls.js +11 -10
- package/dist/components/list/nested-list/NestedList.js +7 -6
- package/dist/components/list/nested-list/item/NestedListItem.js +3 -2
- package/dist/components/menu/Menu.js +5 -4
- package/dist/components/panel/side-panel-header/SidePanelHeader.js +3 -2
- package/dist/components/select/Select.js +3 -2
- package/dist/components/select-filter-input-tags/SelectFilterInputTags.js +6 -5
- package/dist/components/select-multi-items/SelectMultiItems.js +3 -2
- package/dist/components/switch/Switch.js +12 -11
- package/dist/main.d.ts +1 -0
- package/dist/main.js +19 -17
- package/dist/styles/Carousel.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import './styles/Carousel.css';const n = "_root_vqc19_6", t = "_viewport_vqc19_11", e = "_dragEnabled_vqc19_31", _ = "_dragging_vqc19_36", a = "_slide_vqc19_43", c = "_navButtonCtn_vqc19_50", o = "_navButton_vqc19_50", v = "_defaultBtn_vqc19_68", d = "_navPrev_vqc19_85", i = "_navNext_vqc19_90", s = "_fadeViewport_vqc19_95", f = "_fadeSlide_vqc19_102", g = "_fadeActive_vqc19_110", r = "_fadeOutgoing_vqc19_115", q = "_fadeIncoming_vqc19_119", u = "_fadeRunning_vqc19_123", l = "_fadeInteractive_vqc19_131", B = {
|
|
2
|
+
root: n,
|
|
3
|
+
viewport: t,
|
|
4
|
+
dragEnabled: e,
|
|
5
|
+
dragging: _,
|
|
6
|
+
slide: a,
|
|
7
|
+
navButtonCtn: c,
|
|
8
|
+
navButton: o,
|
|
9
|
+
defaultBtn: v,
|
|
10
|
+
navPrev: d,
|
|
11
|
+
navNext: i,
|
|
12
|
+
fadeViewport: s,
|
|
13
|
+
fadeSlide: f,
|
|
14
|
+
fadeActive: g,
|
|
15
|
+
fadeOutgoing: r,
|
|
16
|
+
fadeIncoming: q,
|
|
17
|
+
fadeRunning: u,
|
|
18
|
+
fadeInteractive: l
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
B as s
|
|
22
|
+
};
|
|
@@ -1,323 +1,319 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
viewport: qe,
|
|
6
|
-
dragEnabled: He,
|
|
7
|
-
dragging: Oe,
|
|
8
|
-
slide: Xe,
|
|
9
|
-
navButtonCtn: Ve,
|
|
10
|
-
navButton: Ke,
|
|
11
|
-
defaultBtn: Ue,
|
|
12
|
-
navPrev: Ye,
|
|
13
|
-
navNext: Ge
|
|
14
|
-
}, k = (...P) => P.filter(Boolean).join(" "), Ze = We(
|
|
1
|
+
import { jsxs as fe, jsx as v, Fragment as qe } from "react/jsx-runtime";
|
|
2
|
+
import He, { forwardRef as je, useMemo as de, useRef as a, useState as X, useCallback as u, useEffect as A, useImperativeHandle as Oe } from "react";
|
|
3
|
+
import { s as f } from "../../Carousel.module-RC3aC2Nl.mjs";
|
|
4
|
+
const P = (...D) => D.filter(Boolean).join(" "), Ve = je(
|
|
15
5
|
({
|
|
16
|
-
children:
|
|
17
|
-
className:
|
|
18
|
-
viewportClassName:
|
|
19
|
-
slideClassName:
|
|
20
|
-
style:
|
|
21
|
-
slideSize:
|
|
22
|
-
gap:
|
|
6
|
+
children: D,
|
|
7
|
+
className: me,
|
|
8
|
+
viewportClassName: pe,
|
|
9
|
+
slideClassName: ve,
|
|
10
|
+
style: we,
|
|
11
|
+
slideSize: he = "30%",
|
|
12
|
+
gap: ge = 12,
|
|
23
13
|
align: h = "center",
|
|
24
|
-
showArrows:
|
|
25
|
-
dragEnabled:
|
|
26
|
-
snapOnRelease:
|
|
27
|
-
keyboardNavigation:
|
|
28
|
-
btnGradientColor:
|
|
29
|
-
step:
|
|
30
|
-
initialIndex:
|
|
31
|
-
loop:
|
|
32
|
-
ariaLabel:
|
|
33
|
-
iconLeft:
|
|
34
|
-
iconRight:
|
|
35
|
-
onIndexChange:
|
|
36
|
-
},
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
39
|
-
return
|
|
14
|
+
showArrows: xe = !0,
|
|
15
|
+
dragEnabled: C = !0,
|
|
16
|
+
snapOnRelease: ee = !0,
|
|
17
|
+
keyboardNavigation: Ie = !0,
|
|
18
|
+
btnGradientColor: Le,
|
|
19
|
+
step: Re = 1,
|
|
20
|
+
initialIndex: te = 0,
|
|
21
|
+
loop: N = !1,
|
|
22
|
+
ariaLabel: re = "Carousel",
|
|
23
|
+
iconLeft: ye,
|
|
24
|
+
iconRight: be,
|
|
25
|
+
onIndexChange: _
|
|
26
|
+
}, ke) => {
|
|
27
|
+
const g = de(() => He.Children.toArray(D), [D]), c = g.length, s = N && c > 1, $ = Math.max(1, Math.min(Re, Math.max(1, c))), m = s ? c : 0, x = de(() => {
|
|
28
|
+
if (!s)
|
|
29
|
+
return g.map((n, o) => ({
|
|
40
30
|
key: `real-${o}`,
|
|
41
31
|
node: n,
|
|
42
32
|
realIndex: o,
|
|
43
33
|
isClone: !1
|
|
44
34
|
}));
|
|
45
|
-
const e =
|
|
35
|
+
const e = g.map((n, o) => ({
|
|
46
36
|
key: `clone-head-${o}`,
|
|
47
37
|
node: n,
|
|
48
38
|
realIndex: o,
|
|
49
39
|
isClone: !0
|
|
50
|
-
})), t =
|
|
40
|
+
})), t = g.map((n, o) => ({
|
|
51
41
|
key: `real-${o}`,
|
|
52
42
|
node: n,
|
|
53
43
|
realIndex: o,
|
|
54
44
|
isClone: !1
|
|
55
|
-
})), r =
|
|
45
|
+
})), r = g.map((n, o) => ({
|
|
56
46
|
key: `clone-tail-${o}`,
|
|
57
47
|
node: n,
|
|
58
48
|
realIndex: o,
|
|
59
49
|
isClone: !0
|
|
60
50
|
}));
|
|
61
51
|
return [...e, ...t, ...r];
|
|
62
|
-
}, [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
52
|
+
}, [s, g]), U = x.length, i = a(null), I = a([]), [Se, Ce] = X(0), L = a(0), [Ne, ne] = X(!1), [Te, oe] = X(!1), R = a(!1), ce = a(0), V = a(0), K = a(!1), Y = a(!1), [Me, se] = X(!1), W = a(_), z = a(!1), y = a(null), G = u(() => {
|
|
53
|
+
z.current = !0, y.current != null && window.clearTimeout(y.current), y.current = window.setTimeout(() => {
|
|
54
|
+
z.current = !1, y.current = null;
|
|
55
|
+
}, 120);
|
|
56
|
+
}, []);
|
|
57
|
+
A(() => () => {
|
|
58
|
+
y.current != null && window.clearTimeout(y.current);
|
|
59
|
+
}, []), A(() => {
|
|
60
|
+
W.current = _;
|
|
61
|
+
}, [_]);
|
|
62
|
+
const p = u((e) => {
|
|
67
63
|
var t;
|
|
68
|
-
|
|
69
|
-
}, []),
|
|
70
|
-
const t =
|
|
64
|
+
e !== L.current && (L.current = e, Ce(e), (t = W.current) == null || t.call(W, e));
|
|
65
|
+
}, []), ie = u((e) => {
|
|
66
|
+
const t = i.current;
|
|
71
67
|
t && (t.style.scrollSnapType = e ? "x mandatory" : "none", t.style.scrollBehavior = e ? "smooth" : "auto");
|
|
72
|
-
}, []),
|
|
68
|
+
}, []), T = u(
|
|
73
69
|
(e, t) => h === "center" ? t.offsetLeft - (e.clientWidth - t.offsetWidth) / 2 : t.offsetLeft,
|
|
74
70
|
[h]
|
|
75
|
-
),
|
|
71
|
+
), b = u(
|
|
76
72
|
(e, t = "smooth") => {
|
|
77
|
-
const r =
|
|
73
|
+
const r = i.current, n = I.current[e];
|
|
78
74
|
if (!r || !n) return;
|
|
79
|
-
const o =
|
|
75
|
+
const o = T(r, n);
|
|
80
76
|
r.scrollTo({ left: o, behavior: t });
|
|
81
77
|
},
|
|
82
|
-
[
|
|
83
|
-
),
|
|
84
|
-
(e) =>
|
|
85
|
-
[
|
|
86
|
-
),
|
|
87
|
-
(e) =>
|
|
88
|
-
[
|
|
89
|
-
),
|
|
78
|
+
[T]
|
|
79
|
+
), B = u(
|
|
80
|
+
(e) => c === 0 ? 0 : N ? (e % c + c) % c : Math.max(0, Math.min(c - 1, e)),
|
|
81
|
+
[N, c]
|
|
82
|
+
), F = u(
|
|
83
|
+
(e) => s ? m + e : e,
|
|
84
|
+
[s, m]
|
|
85
|
+
), k = u(
|
|
90
86
|
(e, t = "smooth") => {
|
|
91
|
-
const r =
|
|
92
|
-
|
|
87
|
+
const r = B(e), n = F(r);
|
|
88
|
+
t === "smooth" && G(), b(n, t), p(r);
|
|
93
89
|
},
|
|
94
|
-
[
|
|
95
|
-
),
|
|
96
|
-
const e =
|
|
97
|
-
if (!e ||
|
|
90
|
+
[B, F, b, p, G]
|
|
91
|
+
), E = u(() => {
|
|
92
|
+
const e = i.current;
|
|
93
|
+
if (!e || U === 0) return 0;
|
|
98
94
|
const t = e.scrollLeft, r = h === "center" ? t + e.clientWidth / 2 : t;
|
|
99
95
|
let n = 0, o = Number.POSITIVE_INFINITY;
|
|
100
|
-
for (let d = 0; d <
|
|
101
|
-
const
|
|
102
|
-
if (!
|
|
103
|
-
const
|
|
104
|
-
|
|
96
|
+
for (let d = 0; d < U; d++) {
|
|
97
|
+
const l = I.current[d];
|
|
98
|
+
if (!l) continue;
|
|
99
|
+
const w = h === "center" ? l.offsetLeft + l.offsetWidth / 2 : l.offsetLeft, O = Math.abs(w - r);
|
|
100
|
+
O < o && (o = O, n = d);
|
|
105
101
|
}
|
|
106
102
|
return n;
|
|
107
|
-
}, [h,
|
|
108
|
-
(e) =>
|
|
109
|
-
[
|
|
110
|
-
),
|
|
103
|
+
}, [h, U]), q = u(
|
|
104
|
+
(e) => s ? e < m ? e + c : e >= m + c ? e - c : e : e,
|
|
105
|
+
[s, m, c]
|
|
106
|
+
), ue = a({
|
|
111
107
|
middleStart: 0,
|
|
112
108
|
groupWidth: 0
|
|
113
|
-
}),
|
|
114
|
-
if (!
|
|
115
|
-
const e =
|
|
109
|
+
}), S = u(() => {
|
|
110
|
+
if (!s) return;
|
|
111
|
+
const e = i.current;
|
|
116
112
|
if (!e) return;
|
|
117
|
-
const t =
|
|
113
|
+
const t = I.current[m], r = I.current[m + c];
|
|
118
114
|
if (!t || !r) return;
|
|
119
|
-
const n =
|
|
120
|
-
|
|
115
|
+
const n = T(e, t), o = T(e, r);
|
|
116
|
+
ue.current = {
|
|
121
117
|
middleStart: n,
|
|
122
118
|
groupWidth: o - n
|
|
123
119
|
};
|
|
124
|
-
}, [
|
|
120
|
+
}, [s, m, c, T]), J = a(!1), Q = u(
|
|
125
121
|
(e) => {
|
|
126
|
-
if (!
|
|
127
|
-
const t =
|
|
122
|
+
if (!s) return;
|
|
123
|
+
const t = i.current;
|
|
128
124
|
if (!t) return;
|
|
129
|
-
const { middleStart: r, groupWidth: n } =
|
|
125
|
+
const { middleStart: r, groupWidth: n } = ue.current;
|
|
130
126
|
if (n <= 0) return;
|
|
131
127
|
const o = r, d = r + n;
|
|
132
|
-
let
|
|
133
|
-
|
|
128
|
+
let l = t.scrollLeft, w = 0;
|
|
129
|
+
l < o ? w = Math.ceil((o - l) / n) * n : l > d && (w = -Math.ceil((l - d) / n) * n), w !== 0 && (J.current = !0, t.scrollLeft = l + w, e === "drag" && (V.current += w), J.current = !1);
|
|
134
130
|
},
|
|
135
|
-
[
|
|
136
|
-
),
|
|
137
|
-
if (
|
|
138
|
-
|
|
131
|
+
[s]
|
|
132
|
+
), M = u(() => {
|
|
133
|
+
if (N) {
|
|
134
|
+
ne(c > 1), oe(c > 1);
|
|
139
135
|
return;
|
|
140
136
|
}
|
|
141
|
-
const e =
|
|
137
|
+
const e = i.current;
|
|
142
138
|
if (!e) return;
|
|
143
139
|
const t = e.scrollWidth - e.clientWidth, r = 1;
|
|
144
|
-
|
|
145
|
-
}, [
|
|
146
|
-
|
|
147
|
-
}, [
|
|
148
|
-
|
|
149
|
-
}, [
|
|
140
|
+
ne(t > r && e.scrollLeft > r), oe(t > r && e.scrollLeft < t - r);
|
|
141
|
+
}, [N, c]), H = u(() => {
|
|
142
|
+
c <= 1 || k(L.current + $);
|
|
143
|
+
}, [k, c, $]), j = u(() => {
|
|
144
|
+
c <= 1 || k(L.current - $);
|
|
145
|
+
}, [k, c, $]), Ae = u(() => {
|
|
150
146
|
var n;
|
|
151
|
-
if (!
|
|
152
|
-
const e =
|
|
153
|
-
|
|
154
|
-
const r = ((n =
|
|
155
|
-
|
|
147
|
+
if (!ee) return;
|
|
148
|
+
const e = E(), t = q(e);
|
|
149
|
+
b(t, "smooth");
|
|
150
|
+
const r = ((n = x[t]) == null ? void 0 : n.realIndex) ?? 0;
|
|
151
|
+
p(r);
|
|
156
152
|
}, [
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
153
|
+
ee,
|
|
154
|
+
E,
|
|
155
|
+
q,
|
|
156
|
+
b,
|
|
157
|
+
x,
|
|
158
|
+
p
|
|
163
159
|
]);
|
|
164
|
-
|
|
165
|
-
|
|
160
|
+
Oe(
|
|
161
|
+
ke,
|
|
166
162
|
() => ({
|
|
167
|
-
next:
|
|
168
|
-
prev:
|
|
169
|
-
goTo:
|
|
170
|
-
getIndex: () =>
|
|
171
|
-
getLength: () =>
|
|
163
|
+
next: H,
|
|
164
|
+
prev: j,
|
|
165
|
+
goTo: k,
|
|
166
|
+
getIndex: () => L.current,
|
|
167
|
+
getLength: () => c
|
|
172
168
|
}),
|
|
173
|
-
[
|
|
174
|
-
),
|
|
175
|
-
if (
|
|
176
|
-
const e =
|
|
177
|
-
|
|
169
|
+
[k, H, j, c]
|
|
170
|
+
), A(() => {
|
|
171
|
+
if (c === 0) return;
|
|
172
|
+
const e = B(te), t = F(e), r = window.requestAnimationFrame(() => {
|
|
173
|
+
S(), b(t, "auto"), p(e), M();
|
|
178
174
|
});
|
|
179
175
|
return () => window.cancelAnimationFrame(r);
|
|
180
176
|
}, [
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
j,
|
|
184
|
-
A,
|
|
185
|
-
L,
|
|
186
|
-
m,
|
|
177
|
+
c,
|
|
178
|
+
te,
|
|
187
179
|
B,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
180
|
+
F,
|
|
181
|
+
b,
|
|
182
|
+
p,
|
|
183
|
+
M,
|
|
184
|
+
S
|
|
185
|
+
]), A(() => {
|
|
186
|
+
if (!s) return;
|
|
187
|
+
const e = i.current;
|
|
192
188
|
if (!e) return;
|
|
193
189
|
const t = typeof ResizeObserver < "u" ? new ResizeObserver(() => {
|
|
194
|
-
|
|
190
|
+
S();
|
|
195
191
|
}) : null;
|
|
196
|
-
t == null || t.observe(e),
|
|
197
|
-
const r = () =>
|
|
192
|
+
t == null || t.observe(e), I.current.forEach((o) => o && (t == null ? void 0 : t.observe(o)));
|
|
193
|
+
const r = () => S();
|
|
198
194
|
window.addEventListener("resize", r);
|
|
199
|
-
const n = window.requestAnimationFrame(() =>
|
|
195
|
+
const n = window.requestAnimationFrame(() => S());
|
|
200
196
|
return () => {
|
|
201
197
|
window.removeEventListener("resize", r), window.cancelAnimationFrame(n), t == null || t.disconnect();
|
|
202
198
|
};
|
|
203
|
-
}, [
|
|
204
|
-
const e =
|
|
199
|
+
}, [s, S]), A(() => {
|
|
200
|
+
const e = i.current;
|
|
205
201
|
if (!e) return;
|
|
206
202
|
const t = { current: 0 }, r = () => {
|
|
207
|
-
|
|
208
|
-
var
|
|
203
|
+
J.current || (s && !R.current && Q("scroll"), M(), !t.current && (z.current && G(), t.current = window.requestAnimationFrame(() => {
|
|
204
|
+
var l;
|
|
209
205
|
t.current = 0;
|
|
210
|
-
const n =
|
|
211
|
-
d !==
|
|
206
|
+
const n = E(), o = q(n), d = ((l = x[o]) == null ? void 0 : l.realIndex) ?? 0;
|
|
207
|
+
z.current || d !== L.current && p(d);
|
|
212
208
|
})));
|
|
213
209
|
};
|
|
214
210
|
return e.addEventListener("scroll", r, { passive: !0 }), () => {
|
|
215
211
|
e.removeEventListener("scroll", r), t.current && window.cancelAnimationFrame(t.current);
|
|
216
212
|
};
|
|
217
213
|
}, [
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
214
|
+
s,
|
|
215
|
+
Q,
|
|
216
|
+
M,
|
|
217
|
+
E,
|
|
218
|
+
q,
|
|
219
|
+
x,
|
|
220
|
+
p
|
|
225
221
|
]);
|
|
226
|
-
const
|
|
222
|
+
const Pe = (e) => e instanceof HTMLElement ? !!e.closest(
|
|
227
223
|
'button, a, input, textarea, select, option, [role="button"], [data-carousel-no-drag="true"]'
|
|
228
|
-
) : !1,
|
|
224
|
+
) : !1, Z = a(null), ae = a(0), De = (e) => {
|
|
229
225
|
var t, r, n, o;
|
|
230
|
-
|
|
231
|
-
},
|
|
232
|
-
if (!
|
|
233
|
-
const r = e.clientX -
|
|
234
|
-
Math.abs(r) > 4 && (
|
|
235
|
-
const n =
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
const o =
|
|
239
|
-
o && (o.scrollLeft =
|
|
226
|
+
C && i.current && (Pe(e.target) || e.pointerType === "mouse" && e.button !== 0 || (e.preventDefault(), ie(!1), R.current = !0, K.current = !1, ce.current = e.clientX, V.current = i.current.scrollLeft, se(!0), (r = (t = i.current).focus) == null || r.call(t), (o = (n = i.current).setPointerCapture) == null || o.call(n, e.pointerId)));
|
|
227
|
+
}, $e = (e) => {
|
|
228
|
+
if (!C || !R.current || (e.preventDefault(), !i.current)) return;
|
|
229
|
+
const r = e.clientX - ce.current;
|
|
230
|
+
Math.abs(r) > 4 && (K.current = !0);
|
|
231
|
+
const n = V.current - r;
|
|
232
|
+
ae.current = n, Z.current == null && (Z.current = window.requestAnimationFrame(() => {
|
|
233
|
+
Z.current = null;
|
|
234
|
+
const o = i.current;
|
|
235
|
+
o && (o.scrollLeft = ae.current, s && Q("drag"));
|
|
240
236
|
}));
|
|
241
|
-
},
|
|
237
|
+
}, le = (e) => {
|
|
242
238
|
var r;
|
|
243
|
-
const t =
|
|
244
|
-
if (
|
|
239
|
+
const t = i.current;
|
|
240
|
+
if (R.current = !1, se(!1), t && e != null)
|
|
245
241
|
try {
|
|
246
242
|
(r = t.releasePointerCapture) == null || r.call(t, e);
|
|
247
243
|
} catch {
|
|
248
244
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}, 0)),
|
|
252
|
-
},
|
|
253
|
-
|
|
254
|
-
},
|
|
255
|
-
|
|
256
|
-
},
|
|
257
|
-
|
|
258
|
-
},
|
|
259
|
-
|
|
260
|
-
},
|
|
261
|
-
...
|
|
262
|
-
"--carousel-gap": `${
|
|
263
|
-
"--carousel-slide-size":
|
|
245
|
+
K.current && (Y.current = !0, window.setTimeout(() => {
|
|
246
|
+
Y.current = !1;
|
|
247
|
+
}, 0)), ie(!0), Ae(), M();
|
|
248
|
+
}, We = (e) => {
|
|
249
|
+
C && R.current && le(e.pointerId);
|
|
250
|
+
}, ze = (e) => {
|
|
251
|
+
C && R.current && le(e.pointerId);
|
|
252
|
+
}, Be = (e) => {
|
|
253
|
+
Y.current && (e.preventDefault(), e.stopPropagation());
|
|
254
|
+
}, Fe = (e) => {
|
|
255
|
+
Ie && (e.key === "ArrowLeft" ? (e.preventDefault(), j()) : e.key === "ArrowRight" && (e.preventDefault(), H()));
|
|
256
|
+
}, Ee = {
|
|
257
|
+
...we ?? {},
|
|
258
|
+
"--carousel-gap": `${ge}px`,
|
|
259
|
+
"--carousel-slide-size": he,
|
|
264
260
|
"--carousel-snap-align": h,
|
|
265
|
-
"--carousel-button-gradient":
|
|
261
|
+
"--carousel-button-gradient": Le
|
|
266
262
|
};
|
|
267
|
-
return /* @__PURE__ */
|
|
268
|
-
|
|
269
|
-
Ne && /* @__PURE__ */
|
|
263
|
+
return /* @__PURE__ */ fe("div", { className: P(f.root, me), style: Ee, "aria-label": re, children: [
|
|
264
|
+
xe && c > 1 && /* @__PURE__ */ fe(qe, { children: [
|
|
265
|
+
Ne && /* @__PURE__ */ v("div", { className: `fullHeight ${f.navButtonCtn} ${f.navPrev}`, children: /* @__PURE__ */ v(
|
|
270
266
|
"button",
|
|
271
267
|
{
|
|
272
268
|
type: "button",
|
|
273
|
-
className:
|
|
274
|
-
onClick:
|
|
269
|
+
className: P(f.navButton),
|
|
270
|
+
onClick: j,
|
|
275
271
|
"aria-label": "Précédent",
|
|
276
|
-
children:
|
|
272
|
+
children: ye ?? /* @__PURE__ */ v("div", { className: f.defaultBtn, "aria-hidden": !0, children: "‹" })
|
|
277
273
|
}
|
|
278
274
|
) }),
|
|
279
|
-
|
|
275
|
+
Te && /* @__PURE__ */ v("div", { className: `fullHeight ${f.navButtonCtn} ${f.navNext}`, children: /* @__PURE__ */ v(
|
|
280
276
|
"button",
|
|
281
277
|
{
|
|
282
278
|
type: "button",
|
|
283
|
-
className:
|
|
284
|
-
onClick:
|
|
279
|
+
className: P(f.navButton),
|
|
280
|
+
onClick: H,
|
|
285
281
|
"aria-label": "Suivant",
|
|
286
|
-
children:
|
|
282
|
+
children: be ?? /* @__PURE__ */ v("div", { className: f.defaultBtn, "aria-hidden": !0, children: "›" })
|
|
287
283
|
}
|
|
288
284
|
) })
|
|
289
285
|
] }),
|
|
290
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ v(
|
|
291
287
|
"div",
|
|
292
288
|
{
|
|
293
|
-
ref:
|
|
294
|
-
className:
|
|
289
|
+
ref: i,
|
|
290
|
+
className: P(
|
|
295
291
|
f.viewport,
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
292
|
+
C && f.dragEnabled,
|
|
293
|
+
Me && f.dragging,
|
|
294
|
+
pe
|
|
299
295
|
),
|
|
300
296
|
tabIndex: 0,
|
|
301
297
|
role: "region",
|
|
302
298
|
"aria-roledescription": "carousel",
|
|
303
|
-
"aria-label":
|
|
304
|
-
onKeyDown:
|
|
305
|
-
onPointerDown:
|
|
306
|
-
onPointerMove:
|
|
307
|
-
onPointerUp:
|
|
308
|
-
onPointerCancel:
|
|
309
|
-
onClickCapture:
|
|
310
|
-
children:
|
|
299
|
+
"aria-label": re,
|
|
300
|
+
onKeyDown: Fe,
|
|
301
|
+
onPointerDown: De,
|
|
302
|
+
onPointerMove: $e,
|
|
303
|
+
onPointerUp: We,
|
|
304
|
+
onPointerCancel: ze,
|
|
305
|
+
onClickCapture: Be,
|
|
306
|
+
children: x.map((e, t) => /* @__PURE__ */ v(
|
|
311
307
|
"div",
|
|
312
308
|
{
|
|
313
309
|
ref: (r) => {
|
|
314
|
-
|
|
310
|
+
I.current[t] = r;
|
|
315
311
|
},
|
|
316
|
-
className:
|
|
312
|
+
className: P(f.slide, ve),
|
|
317
313
|
"data-carousel-slide": !0,
|
|
318
314
|
"data-carousel-clone": e.isClone ? "true" : "false",
|
|
319
|
-
"aria-label": `Item ${e.realIndex + 1} sur ${
|
|
320
|
-
"aria-current": e.realIndex ===
|
|
315
|
+
"aria-label": `Item ${e.realIndex + 1} sur ${c}`,
|
|
316
|
+
"aria-current": e.realIndex === Se,
|
|
321
317
|
children: e.node
|
|
322
318
|
},
|
|
323
319
|
e.key
|
|
@@ -328,5 +324,5 @@ import '../../styles/Carousel.css';const Fe = "_root_zgsjf_6", qe = "_viewport_z
|
|
|
328
324
|
}
|
|
329
325
|
);
|
|
330
326
|
export {
|
|
331
|
-
|
|
327
|
+
Ve as Carousel
|
|
332
328
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React, CSSProperties, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CarouselRef {
|
|
4
|
+
next: () => void;
|
|
5
|
+
prev: () => void;
|
|
6
|
+
goTo: (index: number, behavior?: ScrollBehavior) => void;
|
|
7
|
+
getIndex: () => number;
|
|
8
|
+
getLength: () => number;
|
|
9
|
+
}
|
|
10
|
+
export interface FadeCarouselProps {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
viewportClassName?: string;
|
|
14
|
+
slideClassName?: string;
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
showArrows?: boolean;
|
|
17
|
+
iconLeft?: ReactNode;
|
|
18
|
+
iconRight?: ReactNode;
|
|
19
|
+
dragEnabled?: boolean;
|
|
20
|
+
keyboardNavigation?: boolean;
|
|
21
|
+
step?: number;
|
|
22
|
+
initialIndex?: number;
|
|
23
|
+
loop?: boolean;
|
|
24
|
+
ariaLabel?: string;
|
|
25
|
+
onIndexChange?: (index: number) => void;
|
|
26
|
+
/** Durée du fondu (ms) */
|
|
27
|
+
fadeDurationMs?: number;
|
|
28
|
+
}
|
|
29
|
+
export declare const FadeCarousel: React.ForwardRefExoticComponent<FadeCarouselProps & React.RefAttributes<CarouselRef>>;
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { jsxs as y, Fragment as U, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import ve, { forwardRef as we, useMemo as xe, useRef as o, useState as N, useEffect as S, useCallback as f, useImperativeHandle as be } from "react";
|
|
3
|
+
import { s as n } from "../../Carousel.module-RC3aC2Nl.mjs";
|
|
4
|
+
const d = (...R) => R.filter(Boolean).join(" "), Ie = we(
|
|
5
|
+
({
|
|
6
|
+
children: R,
|
|
7
|
+
className: W,
|
|
8
|
+
viewportClassName: z,
|
|
9
|
+
slideClassName: G,
|
|
10
|
+
style: J,
|
|
11
|
+
showArrows: Q = !0,
|
|
12
|
+
iconLeft: Y,
|
|
13
|
+
iconRight: Z,
|
|
14
|
+
dragEnabled: h = !0,
|
|
15
|
+
keyboardNavigation: ee = !0,
|
|
16
|
+
step: te = 1,
|
|
17
|
+
initialIndex: re = 0,
|
|
18
|
+
loop: I = !1,
|
|
19
|
+
ariaLabel: H = "FadeCarousel",
|
|
20
|
+
onIndexChange: k,
|
|
21
|
+
fadeDurationMs: B = 220
|
|
22
|
+
}, ne) => {
|
|
23
|
+
const L = xe(() => ve.Children.toArray(R), [R]), t = L.length, P = Math.max(1, Math.min(te, Math.max(1, t))), p = o(null), [j, ue] = N(0), s = o(0), [ae, O] = N(!1), [ce, X] = N(!1), T = o(k);
|
|
24
|
+
S(() => {
|
|
25
|
+
T.current = k;
|
|
26
|
+
}, [k]);
|
|
27
|
+
const g = f((e) => {
|
|
28
|
+
var r;
|
|
29
|
+
e !== s.current && (s.current = e, ue(e), (r = T.current) == null || r.call(T, e));
|
|
30
|
+
}, []), v = f(
|
|
31
|
+
(e) => t === 0 ? 0 : I ? (e % t + t) % t : Math.max(0, Math.min(t - 1, e)),
|
|
32
|
+
[t, I]
|
|
33
|
+
), [i, w] = N(null), c = o(null);
|
|
34
|
+
S(() => () => {
|
|
35
|
+
c.current != null && (window.clearTimeout(c.current), c.current = null);
|
|
36
|
+
}, []);
|
|
37
|
+
const _ = f(
|
|
38
|
+
(e) => {
|
|
39
|
+
if (t <= 1) return;
|
|
40
|
+
c.current != null && (window.clearTimeout(c.current), c.current = null);
|
|
41
|
+
const r = s.current, a = v(e);
|
|
42
|
+
a !== r && (w({ from: r, to: a, phase: "prep" }), g(a), window.requestAnimationFrame(() => {
|
|
43
|
+
w((u) => !u || u.from !== r || u.to !== a ? u : { ...u, phase: "run" });
|
|
44
|
+
}), c.current = window.setTimeout(() => {
|
|
45
|
+
w(null), c.current = null;
|
|
46
|
+
}, B));
|
|
47
|
+
},
|
|
48
|
+
[v, B, t, g]
|
|
49
|
+
), m = f(
|
|
50
|
+
(e, r = "smooth") => {
|
|
51
|
+
const a = v(e);
|
|
52
|
+
if (r === "auto") {
|
|
53
|
+
c.current != null && (window.clearTimeout(c.current), c.current = null), w(null), g(a);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
_(a);
|
|
57
|
+
},
|
|
58
|
+
[v, g, _]
|
|
59
|
+
), x = f(() => {
|
|
60
|
+
t <= 1 || m(s.current + P, "smooth");
|
|
61
|
+
}, [m, t, P]), b = f(() => {
|
|
62
|
+
t <= 1 || m(s.current - P, "smooth");
|
|
63
|
+
}, [m, t, P]);
|
|
64
|
+
be(
|
|
65
|
+
ne,
|
|
66
|
+
() => ({
|
|
67
|
+
next: x,
|
|
68
|
+
prev: b,
|
|
69
|
+
goTo: m,
|
|
70
|
+
getIndex: () => s.current,
|
|
71
|
+
getLength: () => t
|
|
72
|
+
}),
|
|
73
|
+
[m, x, b, t]
|
|
74
|
+
);
|
|
75
|
+
const D = f(() => {
|
|
76
|
+
if (I) {
|
|
77
|
+
O(t > 1), X(t > 1);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const e = s.current;
|
|
81
|
+
O(t > 1 && e > 0), X(t > 1 && e < t - 1);
|
|
82
|
+
}, [t, I]);
|
|
83
|
+
S(() => {
|
|
84
|
+
D();
|
|
85
|
+
}, [j, D]), S(() => {
|
|
86
|
+
if (t === 0) return;
|
|
87
|
+
const e = v(re);
|
|
88
|
+
g(e), w(null), D();
|
|
89
|
+
}, [t]);
|
|
90
|
+
const oe = (e) => e instanceof HTMLElement ? !!e.closest(
|
|
91
|
+
'button, a, input, textarea, select, option, [role="button"], [data-carousel-no-drag="true"]'
|
|
92
|
+
) : !1, [se, V] = N(!1), C = o(!1), q = o(0), M = o(0), A = o(!1), $ = o(!1), ie = 40, le = (e) => {
|
|
93
|
+
var r, a, u, K;
|
|
94
|
+
h && (oe(e.target) || e.pointerType === "mouse" && e.button !== 0 || (C.current = !0, A.current = !1, q.current = e.clientX, M.current = 0, V(!0), (a = (r = p.current) == null ? void 0 : r.focus) == null || a.call(r), (K = (u = p.current) == null ? void 0 : u.setPointerCapture) == null || K.call(u, e.pointerId)));
|
|
95
|
+
}, fe = (e) => {
|
|
96
|
+
if (!h || !C.current) return;
|
|
97
|
+
const r = e.clientX - q.current;
|
|
98
|
+
M.current = r, Math.abs(r) > 4 && (A.current = !0);
|
|
99
|
+
}, E = (e) => {
|
|
100
|
+
var a, u;
|
|
101
|
+
if (C.current = !1, V(!1), p.current && e != null)
|
|
102
|
+
try {
|
|
103
|
+
(u = (a = p.current).releasePointerCapture) == null || u.call(a, e);
|
|
104
|
+
} catch {
|
|
105
|
+
}
|
|
106
|
+
A.current && ($.current = !0, window.setTimeout(() => {
|
|
107
|
+
$.current = !1;
|
|
108
|
+
}, 0));
|
|
109
|
+
const r = M.current;
|
|
110
|
+
Math.abs(r) >= ie && (r > 0 ? b() : x());
|
|
111
|
+
}, de = (e) => {
|
|
112
|
+
h && C.current && E(e.pointerId);
|
|
113
|
+
}, me = (e) => {
|
|
114
|
+
h && C.current && E(e.pointerId);
|
|
115
|
+
}, he = (e) => {
|
|
116
|
+
$.current && (e.preventDefault(), e.stopPropagation());
|
|
117
|
+
}, pe = (e) => {
|
|
118
|
+
ee && (e.key === "ArrowLeft" ? (e.preventDefault(), b()) : e.key === "ArrowRight" && (e.preventDefault(), x()));
|
|
119
|
+
}, ge = {
|
|
120
|
+
...J ?? {},
|
|
121
|
+
"--carousel-fade-duration": `${B}ms`
|
|
122
|
+
}, F = (e, r, a) => {
|
|
123
|
+
const u = L[e];
|
|
124
|
+
return u == null ? null : /* @__PURE__ */ l(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
className: d(n.fadeSlide, G, r),
|
|
128
|
+
"aria-label": `Item ${e + 1} sur ${t}`,
|
|
129
|
+
"aria-current": a ? "true" : void 0,
|
|
130
|
+
children: u
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
};
|
|
134
|
+
return /* @__PURE__ */ y("div", { className: d(n.root, W), style: ge, "aria-label": H, children: [
|
|
135
|
+
Q && t > 1 && /* @__PURE__ */ y(U, { children: [
|
|
136
|
+
ae && /* @__PURE__ */ l("div", { className: `fullHeight ${n.navButtonCtn} ${n.navPrev}`, children: /* @__PURE__ */ l(
|
|
137
|
+
"button",
|
|
138
|
+
{
|
|
139
|
+
type: "button",
|
|
140
|
+
className: d(n.navButton),
|
|
141
|
+
onClick: b,
|
|
142
|
+
"aria-label": "Précédent",
|
|
143
|
+
children: Y ?? /* @__PURE__ */ l("div", { className: n.defaultBtn, "aria-hidden": !0, children: "‹" })
|
|
144
|
+
}
|
|
145
|
+
) }),
|
|
146
|
+
ce && /* @__PURE__ */ l("div", { className: `fullHeight ${n.navButtonCtn} ${n.navNext}`, children: /* @__PURE__ */ l(
|
|
147
|
+
"button",
|
|
148
|
+
{
|
|
149
|
+
type: "button",
|
|
150
|
+
className: d(n.navButton),
|
|
151
|
+
onClick: x,
|
|
152
|
+
"aria-label": "Suivant",
|
|
153
|
+
children: Z ?? /* @__PURE__ */ l("div", { className: n.defaultBtn, "aria-hidden": !0, children: "›" })
|
|
154
|
+
}
|
|
155
|
+
) })
|
|
156
|
+
] }),
|
|
157
|
+
/* @__PURE__ */ y(
|
|
158
|
+
"div",
|
|
159
|
+
{
|
|
160
|
+
ref: p,
|
|
161
|
+
className: d(
|
|
162
|
+
n.fadeViewport,
|
|
163
|
+
h && n.dragEnabled,
|
|
164
|
+
se && n.dragging,
|
|
165
|
+
z
|
|
166
|
+
),
|
|
167
|
+
tabIndex: 0,
|
|
168
|
+
role: "region",
|
|
169
|
+
"aria-roledescription": "carousel",
|
|
170
|
+
"aria-label": H,
|
|
171
|
+
onKeyDown: pe,
|
|
172
|
+
onPointerDown: le,
|
|
173
|
+
onPointerMove: fe,
|
|
174
|
+
onPointerUp: de,
|
|
175
|
+
onPointerCancel: me,
|
|
176
|
+
onClickCapture: he,
|
|
177
|
+
children: [
|
|
178
|
+
!i && F(j, n.fadeActive, !0),
|
|
179
|
+
i && /* @__PURE__ */ y(U, { children: [
|
|
180
|
+
F(i.from, d(n.fadeOutgoing, i.phase === "run" && n.fadeRunning)),
|
|
181
|
+
F(
|
|
182
|
+
i.to,
|
|
183
|
+
d(n.fadeIncoming, i.phase === "run" && n.fadeRunning, i.phase === "run" && n.fadeInteractive),
|
|
184
|
+
!0
|
|
185
|
+
)
|
|
186
|
+
] })
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
)
|
|
190
|
+
] });
|
|
191
|
+
}
|
|
192
|
+
);
|
|
193
|
+
export {
|
|
194
|
+
Ie as FadeCarousel
|
|
195
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Button as p } from "../../button/Button.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../../icon-button/IconButton.js";
|
|
@@ -6,6 +6,7 @@ import { Checkbox as _ } from "../../checkbox/Checkbox.js";
|
|
|
6
6
|
import { Icon as a } from "../../icon/Icon.js";
|
|
7
7
|
import "../../modal/Modal.js";
|
|
8
8
|
import "../../carousel/Carousel.js";
|
|
9
|
+
import "../../carousel/FadeCarousel.js";
|
|
9
10
|
import "../../theme/ThemeContext.js";
|
|
10
11
|
import '../../../styles/Size.css';import '../../../styles/ListControls.css';/* empty css */
|
|
11
12
|
const u = "_list_1nihg_6", f = "_children_1nihg_29", g = "_selected_1nihg_43", k = "_reset_1nihg_47", i = {
|
|
@@ -13,11 +14,11 @@ const u = "_list_1nihg_6", f = "_children_1nihg_29", g = "_selected_1nihg_43", k
|
|
|
13
14
|
children: f,
|
|
14
15
|
selected: g,
|
|
15
16
|
reset: k
|
|
16
|
-
},
|
|
17
|
-
/* @__PURE__ */ e("div", { children:
|
|
17
|
+
}, K = ({ listChildren: l, handleItemClick: d, selectedItems: m, onReset: r, labelButtonReset: n }) => /* @__PURE__ */ o("div", { className: i.list, children: [
|
|
18
|
+
/* @__PURE__ */ e("div", { children: l.map((t, h) => {
|
|
18
19
|
if (t.key == null) return null;
|
|
19
|
-
const s = t.key, c =
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
const s = t.key, c = m.includes(s);
|
|
21
|
+
return /* @__PURE__ */ o(
|
|
21
22
|
"div",
|
|
22
23
|
{
|
|
23
24
|
className: `${c ? i.selected : ""} ${i.children}`,
|
|
@@ -32,19 +33,19 @@ const u = "_list_1nihg_6", f = "_children_1nihg_29", g = "_selected_1nihg_43", k
|
|
|
32
33
|
/* @__PURE__ */ e("span", { children: t })
|
|
33
34
|
]
|
|
34
35
|
},
|
|
35
|
-
|
|
36
|
+
h
|
|
36
37
|
);
|
|
37
38
|
}) }),
|
|
38
|
-
|
|
39
|
+
r && n && /* @__PURE__ */ e("div", { className: i.reset, children: /* @__PURE__ */ e(
|
|
39
40
|
p,
|
|
40
41
|
{
|
|
41
42
|
mode: "ghost",
|
|
42
|
-
label:
|
|
43
|
-
onClick:
|
|
43
|
+
label: n,
|
|
44
|
+
onClick: r,
|
|
44
45
|
childrenLeft: /* @__PURE__ */ e(a, { icon: "FunnelX" })
|
|
45
46
|
}
|
|
46
47
|
) })
|
|
47
48
|
] });
|
|
48
49
|
export {
|
|
49
|
-
|
|
50
|
+
K as ListControls
|
|
50
51
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { NestedListItem as
|
|
3
|
-
import { Button as
|
|
2
|
+
import { NestedListItem as p } from "./item/NestedListItem.js";
|
|
3
|
+
import { Button as c } from "../../button/Button.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../../icon-button/IconButton.js";
|
|
6
6
|
import { Icon as a } from "../../icon/Icon.js";
|
|
7
7
|
import "../../modal/Modal.js";
|
|
8
8
|
import "../../carousel/Carousel.js";
|
|
9
|
+
import "../../carousel/FadeCarousel.js";
|
|
9
10
|
import "../../theme/ThemeContext.js";
|
|
10
11
|
import '../../../styles/Size.css';import '../../../styles/NestedList.css';/* empty css */
|
|
11
12
|
const h = "_nestedlist_7rnd3_6", _ = "_reset_7rnd3_18", s = {
|
|
12
13
|
nestedlist: h,
|
|
13
14
|
reset: _
|
|
14
|
-
},
|
|
15
|
-
i.map((n, d) => /* @__PURE__ */ t(
|
|
16
|
-
|
|
15
|
+
}, C = ({ items: i, align: o = "right", onReset: r, children: m, labelButtonReset: e }) => /* @__PURE__ */ l("div", { className: s.nestedlist, children: [
|
|
16
|
+
i.map((n, d) => /* @__PURE__ */ t(p, { ...n, align: o ?? "right", children: m }, d)),
|
|
17
|
+
r && e && /* @__PURE__ */ t("div", { className: s.reset, children: /* @__PURE__ */ t(c, { mode: "ghost", label: e, onClick: r, childrenLeft: /* @__PURE__ */ t(a, { icon: "FunnelX" }) }) })
|
|
17
18
|
] });
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
C as NestedList
|
|
20
21
|
};
|
|
@@ -6,6 +6,7 @@ import { TagCounter as B } from "../../../tag-counter/TagCounter.js";
|
|
|
6
6
|
import { Icon as l } from "../../../icon/Icon.js";
|
|
7
7
|
import { Modal as L } from "../../../modal/Modal.js";
|
|
8
8
|
import "../../../carousel/Carousel.js";
|
|
9
|
+
import "../../../carousel/FadeCarousel.js";
|
|
9
10
|
import "../../../theme/ThemeContext.js";
|
|
10
11
|
import '../../../../styles/Size.css';import '../../../../styles/NestedListItem.css';/* empty css */
|
|
11
12
|
const S = "_nestedlist_2r2ga_6", $ = "_items_2r2ga_21", j = "_textSmall_2r2ga_28", v = "_modal_2r2ga_34", s = {
|
|
@@ -13,7 +14,7 @@ const S = "_nestedlist_2r2ga_6", $ = "_items_2r2ga_21", j = "_textSmall_2r2ga_28
|
|
|
13
14
|
items: $,
|
|
14
15
|
textSmall: j,
|
|
15
16
|
modal: v
|
|
16
|
-
},
|
|
17
|
+
}, A = ({
|
|
17
18
|
icon: a,
|
|
18
19
|
title: h,
|
|
19
20
|
numberSelect: i,
|
|
@@ -69,5 +70,5 @@ const S = "_nestedlist_2r2ga_6", $ = "_items_2r2ga_21", j = "_textSmall_2r2ga_28
|
|
|
69
70
|
] });
|
|
70
71
|
};
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
+
A as NestedListItem
|
|
73
74
|
};
|
|
@@ -5,6 +5,7 @@ import { IconButton as f } from "../icon-button/IconButton.js";
|
|
|
5
5
|
import { Icon as N } from "../icon/Icon.js";
|
|
6
6
|
import { Modal as W } from "../modal/Modal.js";
|
|
7
7
|
import "../carousel/Carousel.js";
|
|
8
|
+
import "../carousel/FadeCarousel.js";
|
|
8
9
|
import "../theme/ThemeContext.js";
|
|
9
10
|
import '../../styles/Size.css';import '../../styles/Menu.css';/* empty css */
|
|
10
11
|
const y = "_fullHeight_11eub_15", O = "_fullWidth_11eub_18", j = "_open_11eub_21", D = "_close_11eub_25", q = "_menuButton_11eub_29", A = "_closeIcon_11eub_37", F = "_textEllipsis_11eub_47", G = "_pointer_11eub_52", J = "_fullImg_11eub_55", K = "_menuParams_11eub_61", Q = "_line_11eub_67", T = "_borderRadiusM_11eub_74", U = "_menuItem_11eub_78", X = "_longLogo_11eub_87", Y = "_flexVerticalBetweenStart_11eub_92", Z = "_flexHorizontalCenter_11eub_106", ee = "_flexVerticalBetweenCenter_11eub_121", e = {
|
|
@@ -25,7 +26,7 @@ const y = "_fullHeight_11eub_15", O = "_fullWidth_11eub_18", j = "_open_11eub_21
|
|
|
25
26
|
flexVerticalBetweenStart: Y,
|
|
26
27
|
flexHorizontalCenter: Z,
|
|
27
28
|
flexVerticalBetweenCenter: ee
|
|
28
|
-
},
|
|
29
|
+
}, de = ({ menuItems: s = [], menuParams: a = [], shortLogo: m, logo: p, isOpen: h, defaultOpen: I = !1, selectedId: u }) => {
|
|
29
30
|
const [t, g] = c(I ?? !1), [b, x] = c(u ?? (s.length > 0 ? s[0].id : null)), w = M(null), [H, _] = c(!1), [L, C] = c(!1), [k, E] = c(null), [z, R] = c({}), V = M(null);
|
|
30
31
|
B(() => {
|
|
31
32
|
u != null && x(u);
|
|
@@ -50,7 +51,7 @@ const y = "_fullHeight_11eub_15", O = "_fullWidth_11eub_18", j = "_open_11eub_21
|
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
53
|
return B(() => {
|
|
53
|
-
|
|
54
|
+
h && h(t);
|
|
54
55
|
}, [t]), /* @__PURE__ */ n("nav", { ref: w, children: /* @__PURE__ */ d("div", { className: `${e.flexVerticalBetweenStart} ${e.fullHeight} ${t ? e.open : e.close}`, children: [
|
|
55
56
|
/* @__PURE__ */ d("div", { className: e.fullWidth, children: [
|
|
56
57
|
/* @__PURE__ */ n(
|
|
@@ -59,7 +60,7 @@ const y = "_fullHeight_11eub_15", O = "_fullWidth_11eub_18", j = "_open_11eub_21
|
|
|
59
60
|
className: `${e.flexHorizontalCenter} ${e.pointer} ${e.textEllipsis}`,
|
|
60
61
|
onClick: () => S(),
|
|
61
62
|
children: t ? /* @__PURE__ */ d("div", { className: e.fullImg, children: [
|
|
62
|
-
|
|
63
|
+
p && /* @__PURE__ */ n("img", { className: e.longLogo, src: p, alt: "Logo situaction" }),
|
|
63
64
|
/* @__PURE__ */ n(f, { mode: "ghost", size: "menu", children: /* @__PURE__ */ n(N, { icon: "CaretDoubleLeft", size: 16, weight: "duotone" }) })
|
|
64
65
|
] }) : /* @__PURE__ */ n(
|
|
65
66
|
"div",
|
|
@@ -116,5 +117,5 @@ const y = "_fullHeight_11eub_15", O = "_fullWidth_11eub_18", j = "_open_11eub_21
|
|
|
116
117
|
] }) });
|
|
117
118
|
};
|
|
118
119
|
export {
|
|
119
|
-
|
|
120
|
+
de as Menu
|
|
120
121
|
};
|
|
@@ -5,13 +5,14 @@ import { IconButton as i } from "../../icon-button/IconButton.js";
|
|
|
5
5
|
import { Icon as t } from "../../icon/Icon.js";
|
|
6
6
|
import "../../modal/Modal.js";
|
|
7
7
|
import "../../carousel/Carousel.js";
|
|
8
|
+
import "../../carousel/FadeCarousel.js";
|
|
8
9
|
import "../../theme/ThemeContext.js";
|
|
9
10
|
import '../../../styles/Size.css';import '../../../styles/SidePanelHeader.css';/* empty css */
|
|
10
11
|
const c = "_sidePanelHeader_72g7b_6", m = "_buttonArrow_72g7b_13", h = "_title_72g7b_20", r = {
|
|
11
12
|
sidePanelHeader: c,
|
|
12
13
|
buttonArrow: m,
|
|
13
14
|
title: h
|
|
14
|
-
},
|
|
15
|
+
}, x = ({
|
|
15
16
|
title: s,
|
|
16
17
|
icon: o,
|
|
17
18
|
onClickBack: L,
|
|
@@ -73,5 +74,5 @@ const c = "_sidePanelHeader_72g7b_6", m = "_buttonArrow_72g7b_13", h = "_title_7
|
|
|
73
74
|
)
|
|
74
75
|
] });
|
|
75
76
|
export {
|
|
76
|
-
|
|
77
|
+
x as SidePanelHeader
|
|
77
78
|
};
|
|
@@ -6,6 +6,7 @@ import { IconButton as H } from "../icon-button/IconButton.js";
|
|
|
6
6
|
import { Icon as _ } from "../icon/Icon.js";
|
|
7
7
|
import { Modal as J } from "../modal/Modal.js";
|
|
8
8
|
import "../carousel/Carousel.js";
|
|
9
|
+
import "../carousel/FadeCarousel.js";
|
|
9
10
|
import "../theme/ThemeContext.js";
|
|
10
11
|
import '../../styles/Size.css';import '../../styles/Select.css';/* empty css */
|
|
11
12
|
const Q = "_selectContainer_133eb_54", X = "_children_133eb_61", Y = "_active_133eb_78", Z = "_selectList_133eb_82", O = "_modal_133eb_91", I = "_itemLabel_133eb_98", ee = "_searchWrapper_133eb_103", te = "_noResults_133eb_109", f = {
|
|
@@ -17,7 +18,7 @@ const Q = "_selectContainer_133eb_54", X = "_children_133eb_61", Y = "_active_13
|
|
|
17
18
|
itemLabel: I,
|
|
18
19
|
searchWrapper: ee,
|
|
19
20
|
noResults: te
|
|
20
|
-
},
|
|
21
|
+
}, he = ({
|
|
21
22
|
selected: k,
|
|
22
23
|
size: g = "m",
|
|
23
24
|
listItem: h,
|
|
@@ -212,5 +213,5 @@ const Q = "_selectContainer_133eb_54", X = "_children_133eb_61", Y = "_active_13
|
|
|
212
213
|
] });
|
|
213
214
|
};
|
|
214
215
|
export {
|
|
215
|
-
|
|
216
|
+
he as Select
|
|
216
217
|
};
|
|
@@ -5,21 +5,22 @@ import { Input as a } from "../input/Input.js";
|
|
|
5
5
|
import "../icon-button/IconButton.js";
|
|
6
6
|
import "../modal/Modal.js";
|
|
7
7
|
import "../carousel/Carousel.js";
|
|
8
|
+
import "../carousel/FadeCarousel.js";
|
|
8
9
|
import "../theme/ThemeContext.js";
|
|
9
10
|
import '../../styles/Size.css';import '../../styles/SelectFilterInputTags.css';/* empty css */
|
|
10
11
|
const c = "_listTagSelect_2v3fb_6", p = {
|
|
11
12
|
listTagSelect: c
|
|
12
|
-
},
|
|
13
|
-
|
|
13
|
+
}, T = ({ children: o, inputValue: r, handleInputChange: s, handleKeyDown: i }) => /* @__PURE__ */ e("div", { className: p.listTagSelect, children: /* @__PURE__ */ l("div", { children: [
|
|
14
|
+
o,
|
|
14
15
|
/* @__PURE__ */ e("div", { className: "flexAutoSize", children: /* @__PURE__ */ e(
|
|
15
16
|
a,
|
|
16
17
|
{
|
|
17
18
|
type: "text",
|
|
18
|
-
value:
|
|
19
|
+
value: r,
|
|
19
20
|
onKeyDown: (t) => {
|
|
20
21
|
t.key === "Enter" && i && i(t);
|
|
21
22
|
},
|
|
22
|
-
onChange: (t) =>
|
|
23
|
+
onChange: (t) => s(t.target.value),
|
|
23
24
|
autoFocus: !0,
|
|
24
25
|
placeholder: "",
|
|
25
26
|
status: "ghost",
|
|
@@ -28,5 +29,5 @@ const c = "_listTagSelect_2v3fb_6", p = {
|
|
|
28
29
|
) })
|
|
29
30
|
] }) });
|
|
30
31
|
export {
|
|
31
|
-
|
|
32
|
+
T as SelectFilterInputTags
|
|
32
33
|
};
|
|
@@ -6,13 +6,14 @@ import "../icon-button/IconButton.js";
|
|
|
6
6
|
import { TagCounter as w } from "../tag-counter/TagCounter.js";
|
|
7
7
|
import { Modal as y } from "../modal/Modal.js";
|
|
8
8
|
import "../carousel/Carousel.js";
|
|
9
|
+
import "../carousel/FadeCarousel.js";
|
|
9
10
|
import "../theme/ThemeContext.js";
|
|
10
11
|
import '../../styles/Size.css';import '../../styles/SelectMultiItems.css';/* empty css */
|
|
11
12
|
const N = "_relative_w7e9a_6", R = "_tagCounter_w7e9a_10", b = "_modal_w7e9a_18", r = {
|
|
12
13
|
relative: N,
|
|
13
14
|
tagCounter: R,
|
|
14
15
|
modal: b
|
|
15
|
-
},
|
|
16
|
+
}, A = ({
|
|
16
17
|
label: i,
|
|
17
18
|
iconButton: l,
|
|
18
19
|
selectedCount: t = 0,
|
|
@@ -41,5 +42,5 @@ const N = "_relative_w7e9a_6", R = "_tagCounter_w7e9a_10", b = "_modal_w7e9a_18"
|
|
|
41
42
|
] });
|
|
42
43
|
};
|
|
43
44
|
export {
|
|
44
|
-
|
|
45
|
+
A as SelectMultiItems
|
|
45
46
|
};
|
|
@@ -5,6 +5,7 @@ import { IconButton as k } from "../icon-button/IconButton.js";
|
|
|
5
5
|
import { Icon as g } from "../icon/Icon.js";
|
|
6
6
|
import "../modal/Modal.js";
|
|
7
7
|
import "../carousel/Carousel.js";
|
|
8
|
+
import "../carousel/FadeCarousel.js";
|
|
8
9
|
import "../theme/ThemeContext.js";
|
|
9
10
|
import '../../styles/Size.css';import '../../styles/Switch.css';/* empty css */
|
|
10
11
|
const y = "_slider_1mxgk_21", I = "_s_1mxgk_6", N = "_m_1mxgk_58", S = "_l_1mxgk_75", j = "_xl_1mxgk_92", B = "_disabled_1mxgk_110", E = "_wrapper_1mxgk_121", R = "_button_1mxgk_136", T = "_active_1mxgk_145", t = {
|
|
@@ -18,21 +19,21 @@ const y = "_slider_1mxgk_21", I = "_s_1mxgk_6", N = "_m_1mxgk_58", S = "_l_1mxgk
|
|
|
18
19
|
wrapper: E,
|
|
19
20
|
button: R,
|
|
20
21
|
active: T
|
|
21
|
-
},
|
|
22
|
+
}, M = ({
|
|
22
23
|
size: i = "m",
|
|
23
24
|
variant: w = "classic",
|
|
24
25
|
checked: l,
|
|
25
|
-
onChange:
|
|
26
|
+
onChange: r,
|
|
26
27
|
children: _,
|
|
27
|
-
disabled:
|
|
28
|
+
disabled: s = !1,
|
|
28
29
|
defaultChecked: h = !1,
|
|
29
30
|
icons: a = { left: "Table", right: "Rows" }
|
|
30
31
|
}) => {
|
|
31
32
|
const o = l !== void 0, [p, m] = $(h), u = o ? l : p, d = (e) => {
|
|
32
|
-
o || m(e),
|
|
33
|
+
o || m(e), r == null || r(e);
|
|
33
34
|
}, v = (e) => {
|
|
34
35
|
const f = e.target.checked;
|
|
35
|
-
|
|
36
|
+
s || (o || m(f), r == null || r(f));
|
|
36
37
|
};
|
|
37
38
|
b(() => {
|
|
38
39
|
o && m(l);
|
|
@@ -52,14 +53,14 @@ const y = "_slider_1mxgk_21", I = "_s_1mxgk_6", N = "_m_1mxgk_58", S = "_l_1mxgk
|
|
|
52
53
|
}
|
|
53
54
|
};
|
|
54
55
|
return w === "icon" ? /* @__PURE__ */ n("div", { className: `${t.switch} ${t[i]}`, children: [
|
|
55
|
-
/* @__PURE__ */ n("div", { className: `${t.wrapper} ${
|
|
56
|
+
/* @__PURE__ */ n("div", { className: `${t.wrapper} ${s ? t.disabled : ""}`, children: [
|
|
56
57
|
/* @__PURE__ */ c(
|
|
57
58
|
k,
|
|
58
59
|
{
|
|
59
60
|
mode: u ? "ghost" : "tertiary",
|
|
60
61
|
size: i,
|
|
61
62
|
onClick: () => d(!1),
|
|
62
|
-
disabled:
|
|
63
|
+
disabled: s,
|
|
63
64
|
children: /* @__PURE__ */ c(g, { icon: a.left, size: x() })
|
|
64
65
|
}
|
|
65
66
|
),
|
|
@@ -69,20 +70,20 @@ const y = "_slider_1mxgk_21", I = "_s_1mxgk_6", N = "_m_1mxgk_58", S = "_l_1mxgk
|
|
|
69
70
|
mode: u ? "tertiary" : "ghost",
|
|
70
71
|
size: i,
|
|
71
72
|
onClick: () => d(!0),
|
|
72
|
-
disabled:
|
|
73
|
+
disabled: s,
|
|
73
74
|
children: /* @__PURE__ */ c(g, { icon: a.right, size: x() })
|
|
74
75
|
}
|
|
75
76
|
)
|
|
76
77
|
] }),
|
|
77
78
|
_
|
|
78
|
-
] }) : /* @__PURE__ */ n("div", { className: `${t.switch} ${t[i]} ${
|
|
79
|
+
] }) : /* @__PURE__ */ n("div", { className: `${t.switch} ${t[i]} ${s ? t.disabled : ""}`, children: [
|
|
79
80
|
/* @__PURE__ */ c(
|
|
80
81
|
"input",
|
|
81
82
|
{
|
|
82
83
|
type: "checkbox",
|
|
83
84
|
checked: p,
|
|
84
85
|
onChange: (e) => v(e),
|
|
85
|
-
disabled:
|
|
86
|
+
disabled: s
|
|
86
87
|
}
|
|
87
88
|
),
|
|
88
89
|
/* @__PURE__ */ c("span", { className: t.slider }),
|
|
@@ -90,5 +91,5 @@ const y = "_slider_1mxgk_21", I = "_s_1mxgk_6", N = "_m_1mxgk_58", S = "_l_1mxgk
|
|
|
90
91
|
] });
|
|
91
92
|
};
|
|
92
93
|
export {
|
|
93
|
-
|
|
94
|
+
M as Switch
|
|
94
95
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -32,4 +32,5 @@ export { Toast } from './components/toast/Toast';
|
|
|
32
32
|
export { DragAndDrop } from './components/drag-and-drop/DragAndDrop';
|
|
33
33
|
export { Loading } from './components/loading/Loading';
|
|
34
34
|
export { Carousel } from './components/carousel/Carousel';
|
|
35
|
+
export { FadeCarousel } from './components/carousel/FadeCarousel';
|
|
35
36
|
export { ThemeProvider, useTheme } from './components/theme/ThemeContext';
|
package/dist/main.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Button as t } from "./components/button/Button.js";
|
|
2
2
|
import { ButtonControlledScroll as p } from "./components/buttonControledScroll/ButtonControlledScroll.js";
|
|
3
3
|
import { Input as f } from "./components/input/Input.js";
|
|
4
|
-
import { Tabs as
|
|
5
|
-
import { IconButton as
|
|
4
|
+
import { Tabs as a } from "./components/tabs/Tabs.js";
|
|
5
|
+
import { IconButton as d } from "./components/icon-button/IconButton.js";
|
|
6
6
|
import { Tag as c } from "./components/tag/Tag.js";
|
|
7
7
|
import { Title as u } from "./components/title/Title.js";
|
|
8
|
-
import { TagCounter as
|
|
9
|
-
import { Checkbox as
|
|
8
|
+
import { TagCounter as C } from "./components/tag-counter/TagCounter.js";
|
|
9
|
+
import { Checkbox as S } from "./components/checkbox/Checkbox.js";
|
|
10
10
|
import { Tooltip as g } from "./components/tooltip/Tooltip.js";
|
|
11
11
|
import { Select as h } from "./components/select/Select.js";
|
|
12
12
|
import { Calendar as B } from "./components/calendar/Calendar.js";
|
|
13
|
-
import { Accordion as
|
|
14
|
-
import { AccordionItem as
|
|
13
|
+
import { Accordion as M } from "./components/accordion/Accordion.js";
|
|
14
|
+
import { AccordionItem as D } from "./components/accordion/item/AccordionItem.js";
|
|
15
15
|
import { Card as N } from "./components/card/Card.js";
|
|
16
16
|
import { Icon as v } from "./components/icon/Icon.js";
|
|
17
17
|
import { Menu as H } from "./components/menu/Menu.js";
|
|
@@ -28,25 +28,27 @@ import { InputLabel as ro } from "./components/input-label/InputLabel.js";
|
|
|
28
28
|
import { EditableField as to } from "./components/editable-field/EditableField.js";
|
|
29
29
|
import { EditableSelect as po } from "./components/editable-select/EditableSelect.js";
|
|
30
30
|
import { Toast as fo } from "./components/toast/Toast.js";
|
|
31
|
-
import { DragAndDrop as
|
|
31
|
+
import { DragAndDrop as ao } from "./components/drag-and-drop/DragAndDrop.js";
|
|
32
32
|
import { Loading as io } from "./components/loading/Loading.js";
|
|
33
33
|
import { Carousel as so } from "./components/carousel/Carousel.js";
|
|
34
|
-
import {
|
|
34
|
+
import { FadeCarousel as To } from "./components/carousel/FadeCarousel.js";
|
|
35
|
+
import { ThemeProvider as Io, useTheme as So } from "./components/theme/ThemeContext.js";
|
|
35
36
|
import './styles/Size.css';/* empty css */
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
M as Accordion,
|
|
39
|
+
D as AccordionItem,
|
|
39
40
|
t as Button,
|
|
40
41
|
p as ButtonControlledScroll,
|
|
41
42
|
B as Calendar,
|
|
42
43
|
N as Card,
|
|
43
44
|
so as Carousel,
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
S as Checkbox,
|
|
46
|
+
ao as DragAndDrop,
|
|
46
47
|
to as EditableField,
|
|
47
48
|
po as EditableSelect,
|
|
49
|
+
To as FadeCarousel,
|
|
48
50
|
v as Icon,
|
|
49
|
-
|
|
51
|
+
d as IconButton,
|
|
50
52
|
f as Input,
|
|
51
53
|
ro as InputLabel,
|
|
52
54
|
O as ListControls,
|
|
@@ -61,12 +63,12 @@ export {
|
|
|
61
63
|
Z as SidePanel,
|
|
62
64
|
$ as SidePanelHeader,
|
|
63
65
|
X as Switch,
|
|
64
|
-
|
|
66
|
+
a as Tabs,
|
|
65
67
|
c as Tag,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
C as TagCounter,
|
|
69
|
+
Io as ThemeProvider,
|
|
68
70
|
u as Title,
|
|
69
71
|
fo as Toast,
|
|
70
72
|
g as Tooltip,
|
|
71
|
-
|
|
73
|
+
So as useTheme
|
|
72
74
|
};
|
package/dist/styles/Carousel.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._root_vqc19_6{position:relative;width:100%}._viewport_vqc19_11{display:flex;gap:var(--carousel-gap, 12px);overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;padding:4px;scrollbar-width:none}._viewerViewport_vqc19_23{overflow-x:hidden}._viewport_vqc19_11::-webkit-scrollbar{display:none}._dragEnabled_vqc19_31{cursor:grab;touch-action:pan-y}._dragging_vqc19_36{cursor:grabbing;scroll-behavior:auto;scroll-snap-type:none;-webkit-user-select:none;user-select:none}._slide_vqc19_43{flex:0 0 var(--carousel-slide-size, 280px);width:var(--carousel-slide-size, 280px);scroll-snap-align:var(--carousel-snap-align, start);min-width:0}._navButtonCtn_vqc19_50{z-index:2;display:flex;justify-content:center;align-items:center;position:absolute;height:100%;width:54px}._navButton_vqc19_50{z-index:2;background:none;border:none;cursor:pointer;-webkit-user-select:none;user-select:none}._defaultBtn_vqc19_68{z-index:2;width:36px;height:36px;color:var(--button-tertiary-default-border);font-size:18px;border:1px solid var(--button-tertiary-default-border);border-radius:999px;display:flex;align-items:center;justify-content:center;background:var(--carousel-button-background, var(--background-primary));box-shadow:0 2px 8px #00000026;cursor:pointer;-webkit-user-select:none;user-select:none}._navPrev_vqc19_85{background:linear-gradient(90deg,var(--carousel-button-gradient) 0%,rgba(255,255,255,0) 100%);left:0}._navNext_vqc19_90{background:linear-gradient(90deg,rgba(255,255,255,0) 0%,var(--carousel-button-gradient) 100%);right:0}._fadeViewport_vqc19_95{display:grid;overflow:hidden;outline:none;touch-action:pan-y}._fadeSlide_vqc19_102{grid-row:1;grid-column:1;opacity:0;transition:opacity var(--carousel-fade-duration) ease;pointer-events:none}._fadeActive_vqc19_110{opacity:1;pointer-events:auto}._fadeOutgoing_vqc19_115{opacity:1}._fadeIncoming_vqc19_119,._fadeRunning_vqc19_123._fadeOutgoing_vqc19_115{opacity:0}._fadeRunning_vqc19_123._fadeIncoming_vqc19_119{opacity:1}._fadeInteractive_vqc19_131{pointer-events:auto}
|