prometeo-design-system 4.2.5 → 4.3.1

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.
Files changed (58) hide show
  1. package/dist/Avatar.es.js +41 -40
  2. package/dist/CardProfile-C1F83KJV.js +280 -0
  3. package/dist/CardProfile.es.js +3 -291
  4. package/dist/CheckBox.es.js +21 -24
  5. package/dist/DialogModal.es.js +46 -52
  6. package/dist/Icons/UserAvatar.es.js +4 -4
  7. package/dist/Input.es.js +72 -73
  8. package/dist/NotificationCard.es.js +21 -27
  9. package/dist/PlainTooltip.es.js +19 -19
  10. package/dist/PyrionLayout.es.js +786 -879
  11. package/dist/Scrollable.es.js +127 -201
  12. package/dist/Select.es.js +47 -47
  13. package/dist/SelectSearch.es.js +83 -85
  14. package/dist/TabLinks.es.js +121 -2
  15. package/dist/TicketCard.es.js +2 -2
  16. package/dist/badge-CbqYNrl4.js +87 -0
  17. package/dist/components/Avatar/Avatar.d.ts +4 -2
  18. package/dist/components/CardProfile/CardProfile.d.ts +4 -7
  19. package/dist/components/DropZone/useFileDropzone.d.ts +1 -9
  20. package/dist/components/Layout/LayoutGeneric.d.ts +6 -0
  21. package/dist/components/NotificationCard/NotificationCard.d.ts +2 -3
  22. package/dist/components/PyrionNavigationDrawer/PLNotificationsList.d.ts +2 -5
  23. package/dist/components/PyrionNavigationDrawer/PLSidebar.d.ts +1 -3
  24. package/dist/components/PyrionNavigationDrawer/PLSidebarContent.d.ts +0 -2
  25. package/dist/components/PyrionNavigationDrawer/PLayoutBase.d.ts +0 -2
  26. package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +1 -3
  27. package/dist/components/Scrollable/Scrollable.d.ts +0 -19
  28. package/dist/components/Sidebar/SecondaryBar/SecondaryBar.d.ts +32 -0
  29. package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.d.ts +2 -0
  30. package/dist/components/Sidebar/SecondaryBar/index.d.ts +1 -0
  31. package/dist/components/Sidebar/SidebarComposable.d.ts +43 -0
  32. package/dist/components/Sidebar/components/NavigationLink.d.ts +11 -0
  33. package/dist/components/Sidebar/components/company-logo.d.ts +5 -0
  34. package/dist/components/Sidebar/components/nav-actions.d.ts +7 -0
  35. package/dist/components/Sidebar/components/nav-links.d.ts +7 -0
  36. package/dist/components/Sidebar/context/SidebarContext.d.ts +13 -0
  37. package/dist/components/Sidebar/hooks/SidebarProvider.d.ts +3 -0
  38. package/dist/components/Sidebar/hooks/useNavBarActions.d.ts +9 -0
  39. package/dist/components/Sidebar/hooks/useNavBarCollapse.d.ts +4 -0
  40. package/dist/components/Sidebar/hooks/useNavLinks.d.ts +32 -0
  41. package/dist/components/Sidebar/hooks/useSidebarHook.d.ts +13 -0
  42. package/dist/components/Sidebar/index.d.ts +12 -0
  43. package/dist/components/Sidebar/ui/useNavbarAnimation.d.ts +2 -0
  44. package/dist/components/TabLinks/TabLinks.d.ts +0 -19
  45. package/dist/components/UserCard/UserCard.d.ts +2 -3
  46. package/dist/hooks/useLabelBackground.d.ts +0 -1
  47. package/dist/index.d.ts +16 -0
  48. package/dist/prometeo-design-system.es.js +2906 -119
  49. package/dist/styles.css +1 -1
  50. package/dist/useLabelBackground-BDIHUdND.js +26 -0
  51. package/package.json +2 -2
  52. package/src/styles/base.css +46 -0
  53. package/dist/TabLinks-DxqprStp.js +0 -147
  54. package/dist/UserCard.d.ts +0 -6
  55. package/dist/UserCard.es.js +0 -28
  56. package/dist/badge-BEx-0Q-K.js +0 -35
  57. package/dist/exports/UserCard.d.ts +0 -2
  58. package/dist/useLabelBackground-D5SzHhl_.js +0 -32
@@ -1,11 +1,11 @@
1
- import { j as m } from "./jsx-runtime-GkKLlHH4.js";
2
- import { u as St } from "./useDevice-vwn4GLwK.js";
3
- import { g as ct, r as H } from "./useLabelBackground-D5SzHhl_.js";
4
- import { c as E } from "./cn-B6yFEsav.js";
5
- import { c as U } from "./index-BOQuZ0gG.js";
6
- import at, { useRef as a, useCallback as P, useImperativeHandle as Mt, useLayoutEffect as Et, useEffect as Nt } from "react";
7
- import { CrevronLeft as kt } from "./Icons/CrevronLeft.es.js";
8
- const it = U(
1
+ import { j as h } from "./jsx-runtime-GkKLlHH4.js";
2
+ import { u as st } from "./useDevice-vwn4GLwK.js";
3
+ import { g as nt } from "./useLabelBackground-BDIHUdND.js";
4
+ import { c as m } from "./cn-B6yFEsav.js";
5
+ import { c as j } from "./index-BOQuZ0gG.js";
6
+ import F, { useRef as a, useLayoutEffect as lt, useEffect as ct } from "react";
7
+ import { CrevronLeft as at } from "./Icons/CrevronLeft.es.js";
8
+ const P = j(
9
9
  "",
10
10
  {
11
11
  variants: {
@@ -16,7 +16,7 @@ const it = U(
16
16
  }
17
17
  }
18
18
  }
19
- ), ut = U("", {
19
+ ), J = j("", {
20
20
  variants: {
21
21
  position: {
22
22
  top: "",
@@ -26,7 +26,7 @@ const it = U(
26
26
  },
27
27
  type: {
28
28
  icon: " absolute z-100 rounded-full hover:scale-125 transition-all duration-300 ease-in-out shadow-xs rounded-full shadow-white/10 text-neutral-default-pressed",
29
- shadow: "absolute z-100 transition-all duration-300 ease-in-out"
29
+ shadow: "absolute z-100 transition-all duration-400 ease-in-out"
30
30
  }
31
31
  },
32
32
  compoundVariants: [
@@ -39,7 +39,7 @@ const it = U(
39
39
  { type: "shadow", position: "left", className: "left-0 top-0 h-full w-5" },
40
40
  { type: "shadow", position: "right", className: "right-0 top-0 h-full w-5 rotate-180" }
41
41
  ]
42
- }), Ct = U("", {
42
+ }), it = j("", {
43
43
  variants: {
44
44
  hide: {
45
45
  true: " prometeo-scrollbar-none",
@@ -50,116 +50,51 @@ const it = U(
50
50
  medium: ""
51
51
  }
52
52
  }
53
- }), Ot = (V) => {
54
- const { defaultBehavior: I = "scroll-on-click" } = V, ft = St(), dt = {
55
- top: { show: !0, type: "shadow", behavior: I },
56
- bottom: { show: !0, type: "shadow", behavior: I },
57
- left: { show: !0, type: "icon", behavior: I },
58
- right: { show: !0, type: "icon", behavior: I }
59
- }, ht = {
53
+ }), bt = (R) => {
54
+ const { defaultBehavior: w = "scroll-on-click" } = R, K = st(), G = {
55
+ top: { show: !0, type: "shadow", behavior: w },
56
+ bottom: { show: !0, type: "shadow", behavior: w },
57
+ left: { show: !0, type: "icon", behavior: w },
58
+ right: { show: !0, type: "icon", behavior: w }
59
+ }, Q = {
60
60
  hide: !1,
61
61
  size: "medium"
62
62
  }, {
63
- debugMode: pt = !1,
64
- className: _,
65
- axis: u = "both",
66
- children: gt,
67
- indicators: N = dt,
68
- scrollbarProps: F = ht,
69
- disableMouseScroll: J = !1,
70
- persistScroll: D = !1,
71
- controls: bt
72
- } = V, n = a({}), l = a(null), v = a(null), k = a(null), p = a(null), g = a(5), b = a({}), z = a(null), y = a(!1), X = a(!1), j = a(null), C = a(null), A = a([]), Y = a({ scrollTop: 0, scrollLeft: 0 }), mt = (e) => {
63
+ debugMode: X = !1,
64
+ className: k,
65
+ axis: z = "both",
66
+ children: Y,
67
+ indicators: v = G,
68
+ scrollbarProps: A = Q,
69
+ disableMouseScroll: D = !1,
70
+ persistScroll: L = !1
71
+ } = R, s = a({}), l = a(null), d = a(null), b = a(null), i = a(null), u = a(5), f = a({}), x = a(null), p = a(!1), O = a(!1), T = a(null), g = a(null), Z = (e) => {
73
72
  if (!l.current) return 0;
74
- const { scrollTop: t, scrollLeft: r, scrollHeight: o, clientHeight: s, scrollWidth: c, clientWidth: f } = l.current;
73
+ const { scrollTop: t, scrollLeft: r, scrollHeight: o, clientHeight: n, scrollWidth: c, clientWidth: y } = l.current;
75
74
  switch (e) {
76
75
  case "top":
77
76
  return Math.max(0, t);
78
77
  case "bottom":
79
- return Math.max(0, o - (t + s));
78
+ return Math.max(0, o - (t + n));
80
79
  case "left":
81
80
  return Math.max(0, r);
82
81
  case "right":
83
- return Math.max(0, c - (r + f));
82
+ return Math.max(0, c - (r + y));
84
83
  default:
85
84
  return 0;
86
85
  }
87
- }, K = P(() => {
88
- if (!l.current) return { x: 0, y: 0 };
89
- const { scrollTop: e, scrollLeft: t, scrollHeight: r, scrollWidth: o, clientHeight: s, clientWidth: c } = l.current, f = Math.max(0, r - s), d = Math.max(0, o - c), w = f > 0 ? e / f * 100 : 0;
90
- return { x: d > 0 ? t / d * 100 : 0, y: w };
91
- }, []), G = P((e) => {
92
- const t = Y.current;
93
- let r = null;
94
- return e.scrollTop > t.scrollTop ? r = "down" : e.scrollTop < t.scrollTop ? r = "up" : e.scrollLeft > t.scrollLeft ? r = "right" : e.scrollLeft < t.scrollLeft && (r = "left"), Y.current = e, r;
95
- }, []), vt = P((e) => {
86
+ }, E = (e, t = 100, r = !0) => {
96
87
  if (!l.current) return;
97
- const { scrollTop: t, scrollLeft: r, scrollHeight: o, scrollWidth: s, clientHeight: c, clientWidth: f } = l.current, d = G(e), { x: w, y: L } = K(), T = {
98
- percentage: L,
99
- direction: d,
100
- scrollTop: t,
101
- scrollLeft: r,
102
- scrollHeight: o,
103
- scrollWidth: s,
104
- clientHeight: c,
105
- clientWidth: f
106
- }, B = {
107
- percentage: w,
108
- direction: d,
109
- scrollTop: t,
110
- scrollLeft: r,
111
- scrollHeight: o,
112
- scrollWidth: s,
113
- clientHeight: c,
114
- clientWidth: f
115
- };
116
- A.current.forEach((i) => {
117
- const { config: h, triggered: R } = i;
118
- if (!h) {
119
- (u === "y" || u === "both") && i.callback(T), (u === "x" || u === "both") && i.callback(B);
120
- return;
121
- }
122
- const q = (h.direction === "y" || h.direction === "both") && (u === "y" || u === "both"), nt = (h.direction === "x" || h.direction === "both") && (u === "x" || u === "both");
123
- if (!q && !nt) return;
124
- const x = (q ? T : B).percentage, S = h.target * 100;
125
- let M = !1;
126
- if (h.trip === "forth")
127
- M = !R && x >= S, M && (i.triggered = !0), R && x < S && (i.triggered = !1);
128
- else if (h.trip === "back")
129
- M = R && x < S, M && (i.triggered = !1), !R && x >= S && (i.triggered = !0);
130
- else if (h.trip === "round-trip") {
131
- const xt = x >= S;
132
- M = i.triggered !== xt;
133
- }
134
- M && (h.trip === "round-trip" && (i.triggered = x >= S, i.lastDirection = d || void 0), q && i.callback(T), nt && i.callback(B));
135
- });
136
- }, [u, G, K]), Q = P((e, t) => {
137
- const r = {
138
- callback: e,
139
- config: t,
140
- triggered: !1,
141
- lastDirection: void 0
142
- };
143
- return A.current.push(r), () => {
144
- const o = A.current.indexOf(r);
145
- o > -1 && A.current.splice(o, 1);
146
- };
147
- }, []);
148
- Mt(bt, () => ({
149
- subscribeToScrollTarget: Q
150
- }), [Q]);
151
- const W = (e, t = 100, r = !0) => {
152
- if (!l.current) return;
153
- const o = mt(e), s = Math.min(Math.abs(t), o);
154
- if (s === 0) return;
155
- const c = e === "top" || e === "left" ? -s : s, f = {
88
+ const o = Z(e), n = Math.min(Math.abs(t), o);
89
+ if (n === 0) return;
90
+ const c = e === "top" || e === "left" ? -n : n, y = {
156
91
  top: { top: c, left: 0 },
157
92
  bottom: { top: c, left: 0 },
158
93
  left: { top: 0, left: c },
159
94
  right: { top: 0, left: c }
160
95
  };
161
- l.current.scrollBy({ ...f[e], behavior: r ? "smooth" : "auto" });
162
- }, yt = (e) => {
96
+ l.current.scrollBy({ ...y[e], behavior: r ? "smooth" : "auto" });
97
+ }, tt = (e) => {
163
98
  if (!l.current) return;
164
99
  const t = l.current, r = {
165
100
  top: { top: 0, left: t.scrollLeft },
@@ -168,193 +103,184 @@ const it = U(
168
103
  right: { top: t.scrollTop, left: t.scrollWidth }
169
104
  };
170
105
  t.scrollTo({ ...r[e], behavior: "smooth" });
171
- }, wt = (e, t) => {
172
- const r = n.current[e];
106
+ }, et = (e, t) => {
107
+ const r = s.current[e];
173
108
  if (r) {
174
109
  if (r.style.cursor = "pointer", t === "icon") {
175
110
  const o = r.querySelector("svg");
176
111
  o && (o.style.transition = "all 0.3s ease-in-out", o.style.transform = "scale(1.3)", o.style.backgroundColor = "rgba(255, 255, 255, 0.2)", o.style.borderRadius = "100%");
177
112
  } else if (t === "shadow") {
178
- const o = r.querySelector("span"), s = ct(l.current);
179
- o && (e === "top" || e === "bottom" ? (o.style.height = "110px", o.style.background = `linear-gradient(to bottom, ${s} 5%, ${H(s, -2)} 10%, ${H(s, -5, 30)} 70%, transparent)`) : o.style.width = "40px");
113
+ const o = r.querySelector("span");
114
+ o && (e === "top" || e === "bottom" ? o.style.height = "90px" : o.style.width = "40px");
180
115
  }
181
116
  }
182
- }, O = (e) => {
183
- const t = n.current[e];
117
+ }, M = (e) => {
118
+ const t = s.current[e];
184
119
  if (!t) return;
185
120
  t.style.cursor = "";
186
121
  const r = t.querySelector("svg");
187
122
  r && (r.style.transform = "", r.style.backgroundColor = "", r.style.borderRadius = "");
188
123
  const o = t.querySelector("span");
189
124
  o && (o.style.height = "", o.style.width = "");
190
- }, Z = (e, t) => {
191
- if (t === "scroll-on-click" && y.current) {
192
- y.current = !1;
125
+ }, B = (e, t) => {
126
+ if (t === "scroll-on-click" && p.current) {
127
+ p.current = !1;
193
128
  return;
194
129
  }
195
- if (b.current[e]) {
196
- p.current && (clearTimeout(p.current), p.current = null), v.current && (clearInterval(v.current), v.current = null), O(e), b.current[e] = !1, yt(e);
130
+ if (f.current[e]) {
131
+ i.current && (clearTimeout(i.current), i.current = null), d.current && (clearInterval(d.current), d.current = null), M(e), f.current[e] = !1, tt(e);
197
132
  return;
198
133
  }
199
134
  if (t === "scroll-on-click") {
200
135
  if (!l.current) return;
201
- const { clientHeight: r, clientWidth: o } = l.current, s = e === "top" || e === "bottom" ? r * 0.8 : o * 0.8;
202
- W(e, s);
136
+ const { clientHeight: r, clientWidth: o } = l.current, n = e === "top" || e === "bottom" ? r * 0.8 : o * 0.8;
137
+ E(e, n);
203
138
  }
204
- }, tt = (e, t) => {
205
- p.current && (clearTimeout(p.current), p.current = null), y.current = !0, g.current = 3;
139
+ }, W = (e, t) => {
140
+ i.current && (clearTimeout(i.current), i.current = null), p.current = !0, u.current = 3;
206
141
  let r = 0;
207
- z.current = e, b.current[e] = !1, W(e, g.current, !1), v.current = setInterval(() => {
142
+ x.current = e, f.current[e] = !1, E(e, u.current, !1), d.current = setInterval(() => {
208
143
  r += 16;
209
144
  const o = r / 1e3;
210
- if (o >= 2 && !b.current[e] && (b.current[e] = !0, wt(e, t)), o <= 2)
211
- g.current = 5 + o * 0.4;
145
+ if (o >= 2 && !f.current[e] && (f.current[e] = !0, et(e, t)), o <= 2)
146
+ u.current = 5 + o * 0.4;
212
147
  else {
213
- const s = o - 2;
214
- g.current += Math.pow(s, 1.1) * 2;
148
+ const n = o - 2;
149
+ u.current += Math.pow(n, 1.1) * 2;
215
150
  }
216
- g.current = Math.min(g.current, 100), W(e, g.current, !1);
151
+ u.current = Math.min(u.current, 100), E(e, u.current, !1);
217
152
  }, 16);
218
- }, et = (e) => {
219
- k.current && (clearTimeout(k.current), k.current = null), v.current && (clearInterval(v.current), v.current = null), g.current = 5;
220
- const t = e || z.current;
221
- t ? b.current[t] ? (p.current && clearTimeout(p.current), p.current = setTimeout(() => {
222
- O(t), b.current[t] = !1, y.current = !1;
223
- }, 1e3)) : (O(t), b.current[t] = !1, y.current = !1) : y.current = !1, z.current = null;
224
- }, rt = (e, t, r) => {
225
- ft || t === "scroll-on-hover" && (k.current = setTimeout(() => {
226
- tt(e, r);
153
+ }, q = (e) => {
154
+ b.current && (clearTimeout(b.current), b.current = null), d.current && (clearInterval(d.current), d.current = null), u.current = 5;
155
+ const t = e || x.current;
156
+ t ? f.current[t] ? (i.current && clearTimeout(i.current), i.current = setTimeout(() => {
157
+ M(t), f.current[t] = !1, p.current = !1;
158
+ }, 1e3)) : (M(t), f.current[t] = !1, p.current = !1) : p.current = !1, x.current = null;
159
+ }, H = (e, t, r) => {
160
+ K || t === "scroll-on-hover" && (b.current = setTimeout(() => {
161
+ W(e, r);
227
162
  }, 200));
228
- }, ot = (e, t) => {
229
- t === "scroll-on-hover" && et(e);
230
- }, st = (e, t, r) => {
231
- t === "scroll-on-click" && (y.current = !1, k.current = setTimeout(() => {
232
- tt(e, r);
163
+ }, $ = (e, t) => {
164
+ t === "scroll-on-hover" && q(e);
165
+ }, U = (e, t, r) => {
166
+ t === "scroll-on-click" && (p.current = !1, b.current = setTimeout(() => {
167
+ W(e, r);
233
168
  }, 200));
234
- }, lt = (e, t) => {
235
- t === "scroll-on-click" && et(e);
236
- }, $ = () => {
169
+ }, V = (e, t) => {
170
+ t === "scroll-on-click" && q(e);
171
+ }, _ = () => {
237
172
  if (!l.current) return;
238
- const e = l.current, { scrollTop: t, scrollLeft: r, scrollHeight: o, scrollWidth: s, clientHeight: c, clientWidth: f } = e, d = t <= 10, w = t + c >= o - 10, L = r <= 10, T = r + f >= s - 10;
239
- n.current.top?.classList.toggle("opacity-0", d), n.current.top?.classList.toggle("pointer-events-none", d), n.current.top?.classList.toggle("pointer-events-auto", !d), n.current.bottom?.classList.toggle("opacity-0", w), n.current.bottom?.classList.toggle("pointer-events-none", w), n.current.bottom?.classList.toggle("pointer-events-auto", !w), n.current.left?.classList.toggle("opacity-0", L), n.current.left?.classList.toggle("pointer-events-none", L), n.current.left?.classList.toggle("pointer-events-auto", !L), n.current.right?.classList.toggle("opacity-0", T), n.current.right?.classList.toggle("pointer-events-none", T), n.current.right?.classList.toggle("pointer-events-auto", !T);
173
+ const e = l.current, { scrollTop: t, scrollLeft: r, scrollHeight: o, scrollWidth: n, clientHeight: c, clientWidth: y } = e, S = t <= 10, N = t + c >= o - 10, I = r <= 10, C = r + y >= n - 10;
174
+ s.current.top?.classList.toggle("opacity-0", S), s.current.top?.classList.toggle("pointer-events-none", S), s.current.top?.classList.toggle("pointer-events-auto", !S), s.current.bottom?.classList.toggle("opacity-0", N), s.current.bottom?.classList.toggle("pointer-events-none", N), s.current.bottom?.classList.toggle("pointer-events-auto", !N), s.current.left?.classList.toggle("opacity-0", I), s.current.left?.classList.toggle("pointer-events-none", I), s.current.left?.classList.toggle("pointer-events-auto", !I), s.current.right?.classList.toggle("opacity-0", C), s.current.right?.classList.toggle("pointer-events-none", C), s.current.right?.classList.toggle("pointer-events-auto", !C);
240
175
  };
241
- Et(() => {
176
+ lt(() => {
242
177
  if (!l.current) return;
243
178
  const e = l.current;
244
- if (D) {
245
- j.current = typeof D == "string" ? `scrollable-${D}` : `scrollable-${Math.random().toString(36).substr(2, 9)}`;
179
+ if (L) {
180
+ T.current = typeof L == "string" ? `scrollable-${L}` : `scrollable-${Math.random().toString(36).substr(2, 9)}`;
246
181
  try {
247
- const o = sessionStorage.getItem(j.current);
182
+ const o = sessionStorage.getItem(T.current);
248
183
  if (o) {
249
- const { scrollTop: s, scrollLeft: c } = JSON.parse(o);
250
- e.scrollTop = s, e.scrollLeft = c;
184
+ const { scrollTop: n, scrollLeft: c } = JSON.parse(o);
185
+ e.scrollTop = n, e.scrollLeft = c;
251
186
  }
252
187
  } catch {
253
188
  }
254
189
  }
255
- $(), X.current || (X.current = !0, requestAnimationFrame(() => {
256
- Object.values(n.current).forEach((o) => {
257
- o?.classList.add("transition-all", "duration-300");
258
- }), setTimeout(() => {
259
- $();
260
- }, 0);
190
+ _(), O.current || (O.current = !0, requestAnimationFrame(() => {
191
+ Object.values(s.current).forEach((o) => {
192
+ o?.classList.add("transition-all", "duration-500");
193
+ });
261
194
  }));
262
195
  const t = () => {
263
- if ($(), l.current) {
264
- const o = {
265
- scrollTop: l.current.scrollTop,
266
- scrollLeft: l.current.scrollLeft
267
- };
268
- vt(o);
269
- }
270
- D && j.current && (C.current && clearTimeout(C.current), C.current = setTimeout(() => {
196
+ _(), L && T.current && (g.current && clearTimeout(g.current), g.current = setTimeout(() => {
271
197
  try {
272
198
  const o = {
273
199
  scrollTop: e.scrollTop,
274
200
  scrollLeft: e.scrollLeft
275
201
  };
276
- sessionStorage.setItem(j.current, JSON.stringify(o));
202
+ sessionStorage.setItem(T.current, JSON.stringify(o));
277
203
  } catch {
278
204
  }
279
205
  }, 150));
280
206
  };
281
207
  e.addEventListener("scroll", t);
282
208
  const r = (o) => {
283
- J && o.preventDefault();
209
+ D && o.preventDefault();
284
210
  };
285
211
  return e.addEventListener("wheel", r, { passive: !1 }), () => {
286
- e.removeEventListener("scroll", t), e.removeEventListener("wheel", r), C.current && clearTimeout(C.current);
212
+ e.removeEventListener("scroll", t), e.removeEventListener("wheel", r), g.current && clearTimeout(g.current);
287
213
  };
288
- }, [J]), Nt(() => {
214
+ }, [D]), ct(() => {
289
215
  if (!l.current) return;
290
- let e = ct(l.current);
291
- Object.entries(N).forEach(([t, r]) => {
216
+ const e = nt(l.current);
217
+ Object.entries(v).forEach(([t, r]) => {
292
218
  if (r?.show && r.type === "shadow") {
293
- const s = n.current[t]?.querySelector("span");
294
- if (s) {
295
- s.dataset.bgColor = e;
219
+ const n = s.current[t]?.querySelector("span");
220
+ if (n) {
221
+ n.dataset.bgColor = e;
296
222
  const c = t === "left" || t === "right" ? "to right" : "to bottom";
297
- s.style.background = `linear-gradient(${c}, ${e} 5%, ${H(e, -2)} 10%, ${H(e, -5, 30)} 70%, transparent)`;
223
+ n.style.background = `linear-gradient(${c}, ${e} 40%, transparent)`, n.style.background = `linear-gradient(${c}, ${e} 40%, transparent)`;
298
224
  }
299
225
  }
300
226
  });
301
- }, [N]);
302
- const Tt = at.Children.toArray(gt), Lt = Object.values(N).some((e) => e?.show && e?.type === "icon");
303
- return /* @__PURE__ */ m.jsxs("div", { className: E("relative p-0", _, it({ axis: u }), "scrolleable", Lt ? "overflow-visible" : "overflow-hidden!"), children: [
304
- /* @__PURE__ */ m.jsx(
227
+ }, [v]);
228
+ const rt = F.Children.toArray(Y), ot = Object.values(v).some((e) => e?.show && e?.type === "icon");
229
+ return /* @__PURE__ */ h.jsxs("div", { className: m("relative p-0", k, P({ axis: z }), "scrolleable", ot ? "overflow-visible" : "overflow-hidden!"), children: [
230
+ /* @__PURE__ */ h.jsx(
305
231
  "div",
306
232
  {
307
233
  ref: l,
308
- className: E(
309
- pt && "border border-red-900 border-dashed",
310
- _,
234
+ className: m(
235
+ X && "border border-red-900 border-dashed",
236
+ k,
311
237
  "py-2 relative w-full h-full min-h-full",
312
- it({ axis: u }),
313
- Ct({ hide: F?.hide, size: F?.size }),
238
+ P({ axis: z }),
239
+ it({ hide: A?.hide, size: A?.size }),
314
240
  ""
315
241
  ),
316
- children: Tt?.map((e) => at.cloneElement(e, { className: E(e?.props?.className, "shrink-0! pointer-events-auto") }))
242
+ children: rt?.map((e) => F.cloneElement(e, { className: m(e?.props?.className, "shrink-0! pointer-events-auto") }))
317
243
  }
318
244
  ),
319
- /* @__PURE__ */ m.jsx("div", { className: "h-full w-full z-10 absolute inset-0 pointer-events-none overflow-hidden rounded-[inherit]", children: Object.entries(N).map(([e, t]) => {
245
+ /* @__PURE__ */ h.jsx("div", { className: "h-full w-full z-10 absolute inset-0 pointer-events-none overflow-hidden rounded-[inherit]", children: Object.entries(v).map(([e, t]) => {
320
246
  if (!t?.show || t.type !== "shadow") return null;
321
247
  const r = e;
322
- return /* @__PURE__ */ m.jsx(
248
+ return /* @__PURE__ */ h.jsx(
323
249
  "span",
324
250
  {
325
251
  ref: (o) => {
326
- n.current[e] = o;
252
+ s.current[e] = o;
327
253
  },
328
- className: E(
254
+ className: m(
329
255
  "cursor-default ease-in-out z-100",
330
256
  "opacity-0 pointer-events-none"
331
257
  ),
332
- onClick: () => Z(r, t.behavior),
333
- onMouseEnter: () => rt(r, t.behavior, t.type),
334
- onMouseLeave: () => ot(r, t.behavior),
335
- onMouseDown: () => st(r, t.behavior, t.type),
336
- onMouseUp: () => lt(r, t.behavior),
337
- children: /* @__PURE__ */ m.jsx("span", { className: E(ut({ position: r, type: "shadow" }), t.className) })
258
+ onClick: () => B(r, t.behavior),
259
+ onMouseEnter: () => H(r, t.behavior, t.type),
260
+ onMouseLeave: () => $(r, t.behavior),
261
+ onMouseDown: () => U(r, t.behavior, t.type),
262
+ onMouseUp: () => V(r, t.behavior),
263
+ children: /* @__PURE__ */ h.jsx("span", { className: m(J({ position: r, type: "shadow" }), t.className) })
338
264
  },
339
265
  e
340
266
  );
341
267
  }) }),
342
- /* @__PURE__ */ m.jsx("div", { className: "h-full w-full z-20 absolute inset-0 pointer-events-none", children: Object.entries(N).map(([e, t]) => {
268
+ /* @__PURE__ */ h.jsx("div", { className: "h-full w-full z-20 absolute inset-0 pointer-events-none", children: Object.entries(v).map(([e, t]) => {
343
269
  if (!t?.show || t.type !== "icon") return null;
344
270
  const r = e;
345
- return /* @__PURE__ */ m.jsx(
271
+ return /* @__PURE__ */ h.jsx(
346
272
  "span",
347
273
  {
348
274
  ref: (o) => {
349
- n.current[e] = o;
275
+ s.current[e] = o;
350
276
  },
351
277
  className: "pointer-events-auto cursor-default transition-all duration-300 opacity-0",
352
- onClick: () => Z(r, t.behavior),
353
- onMouseEnter: () => rt(r, t.behavior, t.type),
354
- onMouseLeave: () => ot(r, t.behavior),
355
- onMouseDown: () => st(r, t.behavior, t.type),
356
- onMouseUp: () => lt(r, t.behavior),
357
- children: /* @__PURE__ */ m.jsx(kt, { size: 20, className: E(ut({ position: r, type: "icon" }), t.className) })
278
+ onClick: () => B(r, t.behavior),
279
+ onMouseEnter: () => H(r, t.behavior, t.type),
280
+ onMouseLeave: () => $(r, t.behavior),
281
+ onMouseDown: () => U(r, t.behavior, t.type),
282
+ onMouseUp: () => V(r, t.behavior),
283
+ children: /* @__PURE__ */ h.jsx(at, { size: 20, className: m(J({ position: r, type: "icon" }), t.className) })
358
284
  },
359
285
  e
360
286
  );
@@ -362,5 +288,5 @@ const it = U(
362
288
  ] });
363
289
  };
364
290
  export {
365
- Ot as Scrollable
291
+ bt as Scrollable
366
292
  };