@situaction/traq-ui-ste 1.2.20 → 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.
@@ -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,220 +1,210 @@
1
- import { jsxs as fe, jsx as p, Fragment as Ee } from "react/jsx-runtime";
2
- import Fe, { forwardRef as qe, useMemo as de, useRef as u, useState as O, useCallback as i, useEffect as B, useImperativeHandle as He } from "react";
3
- import '../../styles/Carousel.css';const Oe = "_root_zgsjf_6", Xe = "_viewport_zgsjf_11", Ue = "_dragEnabled_zgsjf_27", Ve = "_dragging_zgsjf_32", Ke = "_slide_zgsjf_39", Ye = "_navButtonCtn_zgsjf_46", Ge = "_navButton_zgsjf_46", Je = "_defaultBtn_zgsjf_64", Qe = "_navPrev_zgsjf_81", Ze = "_navNext_zgsjf_86", f = {
4
- root: Oe,
5
- viewport: Xe,
6
- dragEnabled: Ue,
7
- dragging: Ve,
8
- slide: Ke,
9
- navButtonCtn: Ye,
10
- navButton: Ge,
11
- defaultBtn: Je,
12
- navPrev: Qe,
13
- navNext: Ze
14
- }, T = (...P) => P.filter(Boolean).join(" "), rt = qe(
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: P,
17
- className: ve,
18
- viewportClassName: me,
19
- slideClassName: pe,
20
- style: ge,
21
- slideSize: we = "30%",
22
- gap: he = 12,
23
- align: w = "center",
24
- showArrows: _e = !0,
25
- dragEnabled: N = !0,
6
+ children: D,
7
+ className: me,
8
+ viewportClassName: pe,
9
+ slideClassName: ve,
10
+ style: we,
11
+ slideSize: he = "30%",
12
+ gap: ge = 12,
13
+ align: h = "center",
14
+ showArrows: xe = !0,
15
+ dragEnabled: C = !0,
26
16
  snapOnRelease: ee = !0,
27
- keyboardNavigation: xe = !0,
28
- btnGradientColor: Ie,
29
- step: Le = 1,
17
+ keyboardNavigation: Ie = !0,
18
+ btnGradientColor: Le,
19
+ step: Re = 1,
30
20
  initialIndex: te = 0,
31
- loop: k = !1,
21
+ loop: N = !1,
32
22
  ariaLabel: re = "Carousel",
33
- iconLeft: Re,
23
+ iconLeft: ye,
34
24
  iconRight: be,
35
- onIndexChange: X
36
- }, ye) => {
37
- const h = de(() => Fe.Children.toArray(P), [P]), c = h.length, s = k && c > 1, M = Math.max(1, Math.min(Le, Math.max(1, c))), v = s ? c : 0, _ = de(() => {
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(() => {
38
28
  if (!s)
39
- return h.map((n, o) => ({
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 = h.map((n, o) => ({
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 = h.map((n, o) => ({
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 = h.map((n, o) => ({
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
- }, [s, h]), U = _.length, a = u(null), x = u([]), [Ce, Ne] = O(0), I = u(0), [ke, ne] = O(!1), [Se, oe] = O(!1), L = u(!1), ce = u(0), V = u(0), K = u(!1), Y = u(!1), [ze, se] = O(!1), j = u(X), A = u(!1), R = u(null), G = i(() => {
63
- A.current = !0, R.current != null && window.clearTimeout(R.current), R.current = window.setTimeout(() => {
64
- A.current = !1, R.current = null;
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;
65
55
  }, 120);
66
56
  }, []);
67
- B(() => () => {
68
- R.current != null && window.clearTimeout(R.current);
69
- }, []), B(() => {
70
- j.current = X;
71
- }, [X]);
72
- const m = i((e) => {
57
+ A(() => () => {
58
+ y.current != null && window.clearTimeout(y.current);
59
+ }, []), A(() => {
60
+ W.current = _;
61
+ }, [_]);
62
+ const p = u((e) => {
73
63
  var t;
74
- e !== I.current && (I.current = e, Ne(e), (t = j.current) == null || t.call(j, e));
75
- }, []), ae = i((e) => {
76
- const t = a.current;
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;
77
67
  t && (t.style.scrollSnapType = e ? "x mandatory" : "none", t.style.scrollBehavior = e ? "smooth" : "auto");
78
- }, []), S = i(
79
- (e, t) => w === "center" ? t.offsetLeft - (e.clientWidth - t.offsetWidth) / 2 : t.offsetLeft,
80
- [w]
81
- ), b = i(
68
+ }, []), T = u(
69
+ (e, t) => h === "center" ? t.offsetLeft - (e.clientWidth - t.offsetWidth) / 2 : t.offsetLeft,
70
+ [h]
71
+ ), b = u(
82
72
  (e, t = "smooth") => {
83
- const r = a.current, n = x.current[e];
73
+ const r = i.current, n = I.current[e];
84
74
  if (!r || !n) return;
85
- const o = S(r, n);
75
+ const o = T(r, n);
86
76
  r.scrollTo({ left: o, behavior: t });
87
77
  },
88
- [S]
89
- ), D = i(
90
- (e) => c === 0 ? 0 : k ? (e % c + c) % c : Math.max(0, Math.min(c - 1, e)),
91
- [k, c]
92
- ), $ = i(
93
- (e) => s ? v + e : e,
94
- [s, v]
95
- ), y = i(
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(
96
86
  (e, t = "smooth") => {
97
- const r = D(e), n = $(r);
98
- t === "smooth" && G(), b(n, t), m(r);
87
+ const r = B(e), n = F(r);
88
+ t === "smooth" && G(), b(n, t), p(r);
99
89
  },
100
- [D, $, b, m, G]
101
- ), W = i(() => {
102
- const e = a.current;
90
+ [B, F, b, p, G]
91
+ ), E = u(() => {
92
+ const e = i.current;
103
93
  if (!e || U === 0) return 0;
104
- const t = e.scrollLeft, r = w === "center" ? t + e.clientWidth / 2 : t;
94
+ const t = e.scrollLeft, r = h === "center" ? t + e.clientWidth / 2 : t;
105
95
  let n = 0, o = Number.POSITIVE_INFINITY;
106
96
  for (let d = 0; d < U; d++) {
107
- const l = x.current[d];
97
+ const l = I.current[d];
108
98
  if (!l) continue;
109
- const g = w === "center" ? l.offsetLeft + l.offsetWidth / 2 : l.offsetLeft, H = Math.abs(g - r);
110
- H < o && (o = H, n = d);
99
+ const w = h === "center" ? l.offsetLeft + l.offsetWidth / 2 : l.offsetLeft, O = Math.abs(w - r);
100
+ O < o && (o = O, n = d);
111
101
  }
112
102
  return n;
113
- }, [w, U]), E = i(
114
- (e) => s ? e < v ? e + c : e >= v + c ? e - c : e : e,
115
- [s, v, c]
116
- ), ie = u({
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({
117
107
  middleStart: 0,
118
108
  groupWidth: 0
119
- }), C = i(() => {
109
+ }), S = u(() => {
120
110
  if (!s) return;
121
- const e = a.current;
111
+ const e = i.current;
122
112
  if (!e) return;
123
- const t = x.current[v], r = x.current[v + c];
113
+ const t = I.current[m], r = I.current[m + c];
124
114
  if (!t || !r) return;
125
- const n = S(e, t), o = S(e, r);
126
- ie.current = {
115
+ const n = T(e, t), o = T(e, r);
116
+ ue.current = {
127
117
  middleStart: n,
128
118
  groupWidth: o - n
129
119
  };
130
- }, [s, v, c, S]), J = u(!1), Q = i(
120
+ }, [s, m, c, T]), J = a(!1), Q = u(
131
121
  (e) => {
132
122
  if (!s) return;
133
- const t = a.current;
123
+ const t = i.current;
134
124
  if (!t) return;
135
- const { middleStart: r, groupWidth: n } = ie.current;
125
+ const { middleStart: r, groupWidth: n } = ue.current;
136
126
  if (n <= 0) return;
137
127
  const o = r, d = r + n;
138
- let l = t.scrollLeft, g = 0;
139
- l < o ? g = Math.ceil((o - l) / n) * n : l > d && (g = -Math.ceil((l - d) / n) * n), g !== 0 && (J.current = !0, t.scrollLeft = l + g, e === "drag" && (V.current += g), J.current = !1);
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);
140
130
  },
141
131
  [s]
142
- ), z = i(() => {
143
- if (k) {
132
+ ), M = u(() => {
133
+ if (N) {
144
134
  ne(c > 1), oe(c > 1);
145
135
  return;
146
136
  }
147
- const e = a.current;
137
+ const e = i.current;
148
138
  if (!e) return;
149
139
  const t = e.scrollWidth - e.clientWidth, r = 1;
150
140
  ne(t > r && e.scrollLeft > r), oe(t > r && e.scrollLeft < t - r);
151
- }, [k, c]), F = i(() => {
152
- c <= 1 || y(I.current + M);
153
- }, [y, c, M]), q = i(() => {
154
- c <= 1 || y(I.current - M);
155
- }, [y, c, M]), Be = i(() => {
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(() => {
156
146
  var n;
157
147
  if (!ee) return;
158
- const e = W(), t = E(e);
148
+ const e = E(), t = q(e);
159
149
  b(t, "smooth");
160
- const r = ((n = _[t]) == null ? void 0 : n.realIndex) ?? 0;
161
- m(r);
150
+ const r = ((n = x[t]) == null ? void 0 : n.realIndex) ?? 0;
151
+ p(r);
162
152
  }, [
163
153
  ee,
164
- W,
165
154
  E,
155
+ q,
166
156
  b,
167
- _,
168
- m
157
+ x,
158
+ p
169
159
  ]);
170
- He(
171
- ye,
160
+ Oe(
161
+ ke,
172
162
  () => ({
173
- next: F,
174
- prev: q,
175
- goTo: y,
176
- getIndex: () => I.current,
163
+ next: H,
164
+ prev: j,
165
+ goTo: k,
166
+ getIndex: () => L.current,
177
167
  getLength: () => c
178
168
  }),
179
- [y, F, q, c]
180
- ), B(() => {
169
+ [k, H, j, c]
170
+ ), A(() => {
181
171
  if (c === 0) return;
182
- const e = D(te), t = $(e), r = window.requestAnimationFrame(() => {
183
- C(), b(t, "auto"), m(e), z();
172
+ const e = B(te), t = F(e), r = window.requestAnimationFrame(() => {
173
+ S(), b(t, "auto"), p(e), M();
184
174
  });
185
175
  return () => window.cancelAnimationFrame(r);
186
176
  }, [
187
177
  c,
188
178
  te,
189
- D,
190
- $,
179
+ B,
180
+ F,
191
181
  b,
192
- m,
193
- z,
194
- C
195
- ]), B(() => {
182
+ p,
183
+ M,
184
+ S
185
+ ]), A(() => {
196
186
  if (!s) return;
197
- const e = a.current;
187
+ const e = i.current;
198
188
  if (!e) return;
199
189
  const t = typeof ResizeObserver < "u" ? new ResizeObserver(() => {
200
- C();
190
+ S();
201
191
  }) : null;
202
- t == null || t.observe(e), x.current.forEach((o) => o && (t == null ? void 0 : t.observe(o)));
203
- const r = () => C();
192
+ t == null || t.observe(e), I.current.forEach((o) => o && (t == null ? void 0 : t.observe(o)));
193
+ const r = () => S();
204
194
  window.addEventListener("resize", r);
205
- const n = window.requestAnimationFrame(() => C());
195
+ const n = window.requestAnimationFrame(() => S());
206
196
  return () => {
207
197
  window.removeEventListener("resize", r), window.cancelAnimationFrame(n), t == null || t.disconnect();
208
198
  };
209
- }, [s, C]), B(() => {
210
- const e = a.current;
199
+ }, [s, S]), A(() => {
200
+ const e = i.current;
211
201
  if (!e) return;
212
202
  const t = { current: 0 }, r = () => {
213
- J.current || (s && !L.current && Q("scroll"), z(), !t.current && (A.current && G(), t.current = window.requestAnimationFrame(() => {
203
+ J.current || (s && !R.current && Q("scroll"), M(), !t.current && (z.current && G(), t.current = window.requestAnimationFrame(() => {
214
204
  var l;
215
205
  t.current = 0;
216
- const n = W(), o = E(n), d = ((l = _[o]) == null ? void 0 : l.realIndex) ?? 0;
217
- A.current || d !== I.current && m(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);
218
208
  })));
219
209
  };
220
210
  return e.addEventListener("scroll", r, { passive: !0 }), () => {
@@ -223,107 +213,107 @@ import '../../styles/Carousel.css';const Oe = "_root_zgsjf_6", Xe = "_viewport_z
223
213
  }, [
224
214
  s,
225
215
  Q,
226
- z,
227
- W,
216
+ M,
228
217
  E,
229
- _,
230
- m
218
+ q,
219
+ x,
220
+ p
231
221
  ]);
232
- const Te = (e) => e instanceof HTMLElement ? !!e.closest(
222
+ const Pe = (e) => e instanceof HTMLElement ? !!e.closest(
233
223
  'button, a, input, textarea, select, option, [role="button"], [data-carousel-no-drag="true"]'
234
- ) : !1, Z = u(null), ue = u(0), Pe = (e) => {
224
+ ) : !1, Z = a(null), ae = a(0), De = (e) => {
235
225
  var t, r, n, o;
236
- N && a.current && (Te(e.target) || e.pointerType === "mouse" && e.button !== 0 || (e.preventDefault(), ae(!1), L.current = !0, K.current = !1, ce.current = e.clientX, V.current = a.current.scrollLeft, se(!0), (r = (t = a.current).focus) == null || r.call(t), (o = (n = a.current).setPointerCapture) == null || o.call(n, e.pointerId)));
237
- }, Me = (e) => {
238
- if (!N || !L.current || (e.preventDefault(), !a.current)) return;
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;
239
229
  const r = e.clientX - ce.current;
240
230
  Math.abs(r) > 4 && (K.current = !0);
241
231
  const n = V.current - r;
242
- ue.current = n, Z.current == null && (Z.current = window.requestAnimationFrame(() => {
232
+ ae.current = n, Z.current == null && (Z.current = window.requestAnimationFrame(() => {
243
233
  Z.current = null;
244
- const o = a.current;
245
- o && (o.scrollLeft = ue.current, s && Q("drag"));
234
+ const o = i.current;
235
+ o && (o.scrollLeft = ae.current, s && Q("drag"));
246
236
  }));
247
237
  }, le = (e) => {
248
238
  var r;
249
- const t = a.current;
250
- if (L.current = !1, se(!1), t && e != null)
239
+ const t = i.current;
240
+ if (R.current = !1, se(!1), t && e != null)
251
241
  try {
252
242
  (r = t.releasePointerCapture) == null || r.call(t, e);
253
243
  } catch {
254
244
  }
255
245
  K.current && (Y.current = !0, window.setTimeout(() => {
256
246
  Y.current = !1;
257
- }, 0)), ae(!0), Be(), z();
258
- }, je = (e) => {
259
- N && L.current && le(e.pointerId);
260
- }, Ae = (e) => {
261
- N && L.current && le(e.pointerId);
262
- }, De = (e) => {
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) => {
263
253
  Y.current && (e.preventDefault(), e.stopPropagation());
264
- }, $e = (e) => {
265
- xe && (e.key === "ArrowLeft" ? (e.preventDefault(), q()) : e.key === "ArrowRight" && (e.preventDefault(), F()));
266
- }, We = {
267
- ...ge ?? {},
268
- "--carousel-gap": `${he}px`,
269
- "--carousel-slide-size": we,
270
- "--carousel-snap-align": w,
271
- "--carousel-button-gradient": Ie
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,
260
+ "--carousel-snap-align": h,
261
+ "--carousel-button-gradient": Le
272
262
  };
273
- return /* @__PURE__ */ fe("div", { className: T(f.root, ve), style: We, "aria-label": re, children: [
274
- _e && c > 1 && /* @__PURE__ */ fe(Ee, { children: [
275
- ke && /* @__PURE__ */ p("div", { className: `fullHeight ${f.navButtonCtn} ${f.navPrev}`, children: /* @__PURE__ */ p(
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(
276
266
  "button",
277
267
  {
278
268
  type: "button",
279
- className: T(f.navButton),
280
- onClick: q,
269
+ className: P(f.navButton),
270
+ onClick: j,
281
271
  "aria-label": "Précédent",
282
- children: Re ?? /* @__PURE__ */ p("div", { className: f.defaultBtn, "aria-hidden": !0, children: "‹" })
272
+ children: ye ?? /* @__PURE__ */ v("div", { className: f.defaultBtn, "aria-hidden": !0, children: "‹" })
283
273
  }
284
274
  ) }),
285
- Se && /* @__PURE__ */ p("div", { className: `fullHeight ${f.navButtonCtn} ${f.navNext}`, children: /* @__PURE__ */ p(
275
+ Te && /* @__PURE__ */ v("div", { className: `fullHeight ${f.navButtonCtn} ${f.navNext}`, children: /* @__PURE__ */ v(
286
276
  "button",
287
277
  {
288
278
  type: "button",
289
- className: T(f.navButton),
290
- onClick: F,
279
+ className: P(f.navButton),
280
+ onClick: H,
291
281
  "aria-label": "Suivant",
292
- children: be ?? /* @__PURE__ */ p("div", { className: f.defaultBtn, "aria-hidden": !0, children: "›" })
282
+ children: be ?? /* @__PURE__ */ v("div", { className: f.defaultBtn, "aria-hidden": !0, children: "›" })
293
283
  }
294
284
  ) })
295
285
  ] }),
296
- /* @__PURE__ */ p(
286
+ /* @__PURE__ */ v(
297
287
  "div",
298
288
  {
299
- ref: a,
300
- className: T(
289
+ ref: i,
290
+ className: P(
301
291
  f.viewport,
302
- N && f.dragEnabled,
303
- ze && f.dragging,
304
- me
292
+ C && f.dragEnabled,
293
+ Me && f.dragging,
294
+ pe
305
295
  ),
306
296
  tabIndex: 0,
307
297
  role: "region",
308
298
  "aria-roledescription": "carousel",
309
299
  "aria-label": re,
310
- onKeyDown: $e,
311
- onPointerDown: Pe,
312
- onPointerMove: Me,
313
- onPointerUp: je,
314
- onPointerCancel: Ae,
315
- onClickCapture: De,
316
- children: _.map((e, t) => /* @__PURE__ */ p(
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(
317
307
  "div",
318
308
  {
319
309
  ref: (r) => {
320
- x.current[t] = r;
310
+ I.current[t] = r;
321
311
  },
322
- className: T(f.slide, pe),
312
+ className: P(f.slide, ve),
323
313
  "data-carousel-slide": !0,
324
314
  "data-carousel-clone": e.isClone ? "true" : "false",
325
315
  "aria-label": `Item ${e.realIndex + 1} sur ${c}`,
326
- "aria-current": e.realIndex === Ce,
316
+ "aria-current": e.realIndex === Se,
327
317
  children: e.node
328
318
  },
329
319
  e.key
@@ -334,5 +324,5 @@ import '../../styles/Carousel.css';const Oe = "_root_zgsjf_6", Xe = "_viewport_z
334
324
  }
335
325
  );
336
326
  export {
337
- rt as Carousel
327
+ Ve as Carousel
338
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 l, jsx as e } from "react/jsx-runtime";
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
- }, 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) => {
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 = h.includes(s);
20
- return /* @__PURE__ */ l(
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
- m
36
+ h
36
37
  );
37
38
  }) }),
38
- n && r && /* @__PURE__ */ e("div", { className: i.reset, children: /* @__PURE__ */ e(
39
+ r && n && /* @__PURE__ */ e("div", { className: i.reset, children: /* @__PURE__ */ e(
39
40
  p,
40
41
  {
41
42
  mode: "ghost",
42
- label: r,
43
- onClick: n,
43
+ label: n,
44
+ onClick: r,
44
45
  childrenLeft: /* @__PURE__ */ e(a, { icon: "FunnelX" })
45
46
  }
46
47
  ) })
47
48
  ] });
48
49
  export {
49
- I as ListControls
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 c } from "./item/NestedListItem.js";
3
- import { Button as p } from "../../button/Button.js";
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
- }, 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" }) }) })
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
- y as NestedList
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
- }, q = ({
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
- q as NestedListItem
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
- }, ue = ({ menuItems: s = [], menuParams: a = [], shortLogo: m, logo: h, isOpen: p, defaultOpen: I = !1, selectedId: u }) => {
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
- p && p(t);
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
- h && /* @__PURE__ */ n("img", { className: e.longLogo, src: h, alt: "Logo situaction" }),
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
- ue as Menu
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
- }, z = ({
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
- z as SidePanelHeader
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
- }, fe = ({
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
- fe as Select
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
- }, x = ({ children: s, inputValue: o, handleInputChange: r, handleKeyDown: i }) => /* @__PURE__ */ e("div", { className: p.listTagSelect, children: /* @__PURE__ */ l("div", { children: [
13
- s,
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: o,
19
+ value: r,
19
20
  onKeyDown: (t) => {
20
21
  t.key === "Enter" && i && i(t);
21
22
  },
22
- onChange: (t) => r(t.target.value),
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
- x as SelectFilterInputTags
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
- }, q = ({
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
- q as SelectMultiItems
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
- }, L = ({
22
+ }, M = ({
22
23
  size: i = "m",
23
24
  variant: w = "classic",
24
25
  checked: l,
25
- onChange: s,
26
+ onChange: r,
26
27
  children: _,
27
- disabled: r = !1,
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), s == null || s(e);
33
+ o || m(e), r == null || r(e);
33
34
  }, v = (e) => {
34
35
  const f = e.target.checked;
35
- r || (o || m(f), s == null || s(f));
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} ${r ? t.disabled : ""}`, children: [
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: r,
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: r,
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]} ${r ? t.disabled : ""}`, children: [
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: r
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
- L as Switch
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 n } from "./components/tabs/Tabs.js";
5
- import { IconButton as i } from "./components/icon-button/IconButton.js";
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 I } from "./components/tag-counter/TagCounter.js";
9
- import { Checkbox as C } from "./components/checkbox/Checkbox.js";
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 P } from "./components/accordion/Accordion.js";
14
- import { AccordionItem as E } from "./components/accordion/item/AccordionItem.js";
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 no } from "./components/drag-and-drop/DragAndDrop.js";
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 { ThemeProvider as To, useTheme as Io } from "./components/theme/ThemeContext.js";
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
- P as Accordion,
38
- E as AccordionItem,
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
- C as Checkbox,
45
- no as DragAndDrop,
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
- i as IconButton,
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
- n as Tabs,
66
+ a as Tabs,
65
67
  c as Tag,
66
- I as TagCounter,
67
- To as ThemeProvider,
68
+ C as TagCounter,
69
+ Io as ThemeProvider,
68
70
  u as Title,
69
71
  fo as Toast,
70
72
  g as Tooltip,
71
- Io as useTheme
73
+ So as useTheme
72
74
  };
@@ -1 +1 @@
1
- ._root_zgsjf_6{position:relative;width:100%}._viewport_zgsjf_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}._viewport_zgsjf_11::-webkit-scrollbar{display:none}._dragEnabled_zgsjf_27{cursor:grab;touch-action:pan-y}._dragging_zgsjf_32{cursor:grabbing;scroll-behavior:auto;scroll-snap-type:none;-webkit-user-select:none;user-select:none}._slide_zgsjf_39{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_zgsjf_46{z-index:2;display:flex;justify-content:center;align-items:center;position:absolute;height:100%;width:54px}._navButton_zgsjf_46{z-index:2;background:none;border:none;cursor:pointer;-webkit-user-select:none;user-select:none}._defaultBtn_zgsjf_64{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_zgsjf_81{background:linear-gradient(90deg,var(--carousel-button-gradient) 0%,rgba(255,255,255,0) 100%);left:0}._navNext_zgsjf_86{background:linear-gradient(90deg,rgba(255,255,255,0) 0%,var(--carousel-button-gradient) 100%);right:0}
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}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@situaction/traq-ui-ste",
3
- "version": "1.2.20",
3
+ "version": "1.2.23",
4
4
  "description": "library react component Situaction",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",