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