prometeo-design-system 4.2.3 → 4.2.5
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/Avatar.es.js +1 -1
- package/dist/DialogModal.es.js +52 -46
- package/dist/Input.es.js +1 -1
- package/dist/NotificationCard.es.js +27 -21
- package/dist/PyrionLayout.es.js +852 -789
- package/dist/Scrollable.es.js +201 -127
- package/dist/Select.es.js +1 -1
- package/dist/SelectSearch.es.js +85 -83
- package/dist/TabLinks-DxqprStp.js +147 -0
- package/dist/TabLinks.es.js +2 -121
- package/dist/TicketCard.es.js +1 -1
- package/dist/components/DropZone/useFileDropzone.d.ts +9 -1
- package/dist/components/NotificationCard/NotificationCard.d.ts +3 -2
- package/dist/components/PyrionNavigationDrawer/PLNotificationsList.d.ts +5 -2
- package/dist/components/PyrionNavigationDrawer/PLSidebar.d.ts +3 -1
- package/dist/components/PyrionNavigationDrawer/PLSidebarContent.d.ts +2 -0
- package/dist/components/PyrionNavigationDrawer/PLayoutBase.d.ts +2 -0
- package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +3 -1
- package/dist/components/Scrollable/Scrollable.d.ts +19 -0
- package/dist/components/TabLinks/TabLinks.d.ts +19 -0
- package/dist/hooks/useLabelBackground.d.ts +1 -0
- package/dist/prometeo-design-system.es.js +7 -7
- package/dist/styles.css +1 -1
- package/dist/useLabelBackground-D5SzHhl_.js +32 -0
- package/package.json +3 -2
- package/src/styles/base.css +8 -0
- package/src/styles/intellisense.css +1 -0
- package/src/styles/utilities.css +8 -0
- package/dist/useLabelBackground-BDIHUdND.js +0 -26
package/dist/Scrollable.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { u as
|
|
3
|
-
import { g as
|
|
4
|
-
import { c as
|
|
5
|
-
import { c as
|
|
6
|
-
import
|
|
7
|
-
import { CrevronLeft as
|
|
8
|
-
const
|
|
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(
|
|
9
9
|
"",
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
@@ -16,7 +16,7 @@ const P = j(
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
),
|
|
19
|
+
), ut = U("", {
|
|
20
20
|
variants: {
|
|
21
21
|
position: {
|
|
22
22
|
top: "",
|
|
@@ -26,7 +26,7 @@ const P = j(
|
|
|
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-
|
|
29
|
+
shadow: "absolute z-100 transition-all duration-300 ease-in-out"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
compoundVariants: [
|
|
@@ -39,7 +39,7 @@ const P = j(
|
|
|
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
|
-
}),
|
|
42
|
+
}), Ct = U("", {
|
|
43
43
|
variants: {
|
|
44
44
|
hide: {
|
|
45
45
|
true: " prometeo-scrollbar-none",
|
|
@@ -50,51 +50,116 @@ const P = j(
|
|
|
50
50
|
medium: ""
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
}),
|
|
54
|
-
const { defaultBehavior:
|
|
55
|
-
top: { show: !0, type: "shadow", behavior:
|
|
56
|
-
bottom: { show: !0, type: "shadow", behavior:
|
|
57
|
-
left: { show: !0, type: "icon", behavior:
|
|
58
|
-
right: { show: !0, type: "icon", behavior:
|
|
59
|
-
},
|
|
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 = {
|
|
60
60
|
hide: !1,
|
|
61
61
|
size: "medium"
|
|
62
62
|
}, {
|
|
63
|
-
debugMode:
|
|
64
|
-
className:
|
|
65
|
-
axis:
|
|
66
|
-
children:
|
|
67
|
-
indicators:
|
|
68
|
-
scrollbarProps:
|
|
69
|
-
disableMouseScroll:
|
|
70
|
-
persistScroll:
|
|
71
|
-
|
|
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) => {
|
|
72
73
|
if (!l.current) return 0;
|
|
73
|
-
const { scrollTop: t, scrollLeft: r, scrollHeight: o, clientHeight:
|
|
74
|
+
const { scrollTop: t, scrollLeft: r, scrollHeight: o, clientHeight: s, scrollWidth: c, clientWidth: f } = l.current;
|
|
74
75
|
switch (e) {
|
|
75
76
|
case "top":
|
|
76
77
|
return Math.max(0, t);
|
|
77
78
|
case "bottom":
|
|
78
|
-
return Math.max(0, o - (t +
|
|
79
|
+
return Math.max(0, o - (t + s));
|
|
79
80
|
case "left":
|
|
80
81
|
return Math.max(0, r);
|
|
81
82
|
case "right":
|
|
82
|
-
return Math.max(0, c - (r +
|
|
83
|
+
return Math.max(0, c - (r + f));
|
|
83
84
|
default:
|
|
84
85
|
return 0;
|
|
85
86
|
}
|
|
86
|
-
},
|
|
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) => {
|
|
87
96
|
if (!l.current) return;
|
|
88
|
-
const o =
|
|
89
|
-
|
|
90
|
-
|
|
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 = {
|
|
91
156
|
top: { top: c, left: 0 },
|
|
92
157
|
bottom: { top: c, left: 0 },
|
|
93
158
|
left: { top: 0, left: c },
|
|
94
159
|
right: { top: 0, left: c }
|
|
95
160
|
};
|
|
96
|
-
l.current.scrollBy({ ...
|
|
97
|
-
},
|
|
161
|
+
l.current.scrollBy({ ...f[e], behavior: r ? "smooth" : "auto" });
|
|
162
|
+
}, yt = (e) => {
|
|
98
163
|
if (!l.current) return;
|
|
99
164
|
const t = l.current, r = {
|
|
100
165
|
top: { top: 0, left: t.scrollLeft },
|
|
@@ -103,184 +168,193 @@ const P = j(
|
|
|
103
168
|
right: { top: t.scrollTop, left: t.scrollWidth }
|
|
104
169
|
};
|
|
105
170
|
t.scrollTo({ ...r[e], behavior: "smooth" });
|
|
106
|
-
},
|
|
107
|
-
const r =
|
|
171
|
+
}, wt = (e, t) => {
|
|
172
|
+
const r = n.current[e];
|
|
108
173
|
if (r) {
|
|
109
174
|
if (r.style.cursor = "pointer", t === "icon") {
|
|
110
175
|
const o = r.querySelector("svg");
|
|
111
176
|
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%");
|
|
112
177
|
} else if (t === "shadow") {
|
|
113
|
-
const o = r.querySelector("span");
|
|
114
|
-
o && (e === "top" || e === "bottom" ? o.style.height = "
|
|
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");
|
|
115
180
|
}
|
|
116
181
|
}
|
|
117
|
-
},
|
|
118
|
-
const t =
|
|
182
|
+
}, O = (e) => {
|
|
183
|
+
const t = n.current[e];
|
|
119
184
|
if (!t) return;
|
|
120
185
|
t.style.cursor = "";
|
|
121
186
|
const r = t.querySelector("svg");
|
|
122
187
|
r && (r.style.transform = "", r.style.backgroundColor = "", r.style.borderRadius = "");
|
|
123
188
|
const o = t.querySelector("span");
|
|
124
189
|
o && (o.style.height = "", o.style.width = "");
|
|
125
|
-
},
|
|
126
|
-
if (t === "scroll-on-click" &&
|
|
127
|
-
|
|
190
|
+
}, Z = (e, t) => {
|
|
191
|
+
if (t === "scroll-on-click" && y.current) {
|
|
192
|
+
y.current = !1;
|
|
128
193
|
return;
|
|
129
194
|
}
|
|
130
|
-
if (
|
|
131
|
-
|
|
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);
|
|
132
197
|
return;
|
|
133
198
|
}
|
|
134
199
|
if (t === "scroll-on-click") {
|
|
135
200
|
if (!l.current) return;
|
|
136
|
-
const { clientHeight: r, clientWidth: o } = l.current,
|
|
137
|
-
|
|
201
|
+
const { clientHeight: r, clientWidth: o } = l.current, s = e === "top" || e === "bottom" ? r * 0.8 : o * 0.8;
|
|
202
|
+
W(e, s);
|
|
138
203
|
}
|
|
139
|
-
},
|
|
140
|
-
|
|
204
|
+
}, tt = (e, t) => {
|
|
205
|
+
p.current && (clearTimeout(p.current), p.current = null), y.current = !0, g.current = 3;
|
|
141
206
|
let r = 0;
|
|
142
|
-
|
|
207
|
+
z.current = e, b.current[e] = !1, W(e, g.current, !1), v.current = setInterval(() => {
|
|
143
208
|
r += 16;
|
|
144
209
|
const o = r / 1e3;
|
|
145
|
-
if (o >= 2 && !
|
|
146
|
-
|
|
210
|
+
if (o >= 2 && !b.current[e] && (b.current[e] = !0, wt(e, t)), o <= 2)
|
|
211
|
+
g.current = 5 + o * 0.4;
|
|
147
212
|
else {
|
|
148
|
-
const
|
|
149
|
-
|
|
213
|
+
const s = o - 2;
|
|
214
|
+
g.current += Math.pow(s, 1.1) * 2;
|
|
150
215
|
}
|
|
151
|
-
|
|
216
|
+
g.current = Math.min(g.current, 100), W(e, g.current, !1);
|
|
152
217
|
}, 16);
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
const t = e ||
|
|
156
|
-
t ?
|
|
157
|
-
|
|
158
|
-
}, 1e3)) : (
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
|
|
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);
|
|
162
227
|
}, 200));
|
|
163
|
-
},
|
|
164
|
-
t === "scroll-on-hover" &&
|
|
165
|
-
},
|
|
166
|
-
t === "scroll-on-click" && (
|
|
167
|
-
|
|
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);
|
|
168
233
|
}, 200));
|
|
169
|
-
},
|
|
170
|
-
t === "scroll-on-click" &&
|
|
171
|
-
},
|
|
234
|
+
}, lt = (e, t) => {
|
|
235
|
+
t === "scroll-on-click" && et(e);
|
|
236
|
+
}, $ = () => {
|
|
172
237
|
if (!l.current) return;
|
|
173
|
-
const e = l.current, { scrollTop: t, scrollLeft: r, scrollHeight: o, scrollWidth:
|
|
174
|
-
|
|
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);
|
|
175
240
|
};
|
|
176
|
-
|
|
241
|
+
Et(() => {
|
|
177
242
|
if (!l.current) return;
|
|
178
243
|
const e = l.current;
|
|
179
|
-
if (
|
|
180
|
-
|
|
244
|
+
if (D) {
|
|
245
|
+
j.current = typeof D == "string" ? `scrollable-${D}` : `scrollable-${Math.random().toString(36).substr(2, 9)}`;
|
|
181
246
|
try {
|
|
182
|
-
const o = sessionStorage.getItem(
|
|
247
|
+
const o = sessionStorage.getItem(j.current);
|
|
183
248
|
if (o) {
|
|
184
|
-
const { scrollTop:
|
|
185
|
-
e.scrollTop =
|
|
249
|
+
const { scrollTop: s, scrollLeft: c } = JSON.parse(o);
|
|
250
|
+
e.scrollTop = s, e.scrollLeft = c;
|
|
186
251
|
}
|
|
187
252
|
} catch {
|
|
188
253
|
}
|
|
189
254
|
}
|
|
190
|
-
|
|
191
|
-
Object.values(
|
|
192
|
-
o?.classList.add("transition-all", "duration-
|
|
193
|
-
})
|
|
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);
|
|
194
261
|
}));
|
|
195
262
|
const t = () => {
|
|
196
|
-
|
|
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(() => {
|
|
197
271
|
try {
|
|
198
272
|
const o = {
|
|
199
273
|
scrollTop: e.scrollTop,
|
|
200
274
|
scrollLeft: e.scrollLeft
|
|
201
275
|
};
|
|
202
|
-
sessionStorage.setItem(
|
|
276
|
+
sessionStorage.setItem(j.current, JSON.stringify(o));
|
|
203
277
|
} catch {
|
|
204
278
|
}
|
|
205
279
|
}, 150));
|
|
206
280
|
};
|
|
207
281
|
e.addEventListener("scroll", t);
|
|
208
282
|
const r = (o) => {
|
|
209
|
-
|
|
283
|
+
J && o.preventDefault();
|
|
210
284
|
};
|
|
211
285
|
return e.addEventListener("wheel", r, { passive: !1 }), () => {
|
|
212
|
-
e.removeEventListener("scroll", t), e.removeEventListener("wheel", r),
|
|
286
|
+
e.removeEventListener("scroll", t), e.removeEventListener("wheel", r), C.current && clearTimeout(C.current);
|
|
213
287
|
};
|
|
214
|
-
}, [
|
|
288
|
+
}, [J]), Nt(() => {
|
|
215
289
|
if (!l.current) return;
|
|
216
|
-
|
|
217
|
-
Object.entries(
|
|
290
|
+
let e = ct(l.current);
|
|
291
|
+
Object.entries(N).forEach(([t, r]) => {
|
|
218
292
|
if (r?.show && r.type === "shadow") {
|
|
219
|
-
const
|
|
220
|
-
if (
|
|
221
|
-
|
|
293
|
+
const s = n.current[t]?.querySelector("span");
|
|
294
|
+
if (s) {
|
|
295
|
+
s.dataset.bgColor = e;
|
|
222
296
|
const c = t === "left" || t === "right" ? "to right" : "to bottom";
|
|
223
|
-
|
|
297
|
+
s.style.background = `linear-gradient(${c}, ${e} 5%, ${H(e, -2)} 10%, ${H(e, -5, 30)} 70%, transparent)`;
|
|
224
298
|
}
|
|
225
299
|
}
|
|
226
300
|
});
|
|
227
|
-
}, [
|
|
228
|
-
const
|
|
229
|
-
return /* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */
|
|
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(
|
|
231
305
|
"div",
|
|
232
306
|
{
|
|
233
307
|
ref: l,
|
|
234
|
-
className:
|
|
235
|
-
|
|
236
|
-
|
|
308
|
+
className: E(
|
|
309
|
+
pt && "border border-red-900 border-dashed",
|
|
310
|
+
_,
|
|
237
311
|
"py-2 relative w-full h-full min-h-full",
|
|
238
|
-
|
|
239
|
-
|
|
312
|
+
it({ axis: u }),
|
|
313
|
+
Ct({ hide: F?.hide, size: F?.size }),
|
|
240
314
|
""
|
|
241
315
|
),
|
|
242
|
-
children:
|
|
316
|
+
children: Tt?.map((e) => at.cloneElement(e, { className: E(e?.props?.className, "shrink-0! pointer-events-auto") }))
|
|
243
317
|
}
|
|
244
318
|
),
|
|
245
|
-
/* @__PURE__ */
|
|
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]) => {
|
|
246
320
|
if (!t?.show || t.type !== "shadow") return null;
|
|
247
321
|
const r = e;
|
|
248
|
-
return /* @__PURE__ */
|
|
322
|
+
return /* @__PURE__ */ m.jsx(
|
|
249
323
|
"span",
|
|
250
324
|
{
|
|
251
325
|
ref: (o) => {
|
|
252
|
-
|
|
326
|
+
n.current[e] = o;
|
|
253
327
|
},
|
|
254
|
-
className:
|
|
328
|
+
className: E(
|
|
255
329
|
"cursor-default ease-in-out z-100",
|
|
256
330
|
"opacity-0 pointer-events-none"
|
|
257
331
|
),
|
|
258
|
-
onClick: () =>
|
|
259
|
-
onMouseEnter: () =>
|
|
260
|
-
onMouseLeave: () =>
|
|
261
|
-
onMouseDown: () =>
|
|
262
|
-
onMouseUp: () =>
|
|
263
|
-
children: /* @__PURE__ */
|
|
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) })
|
|
264
338
|
},
|
|
265
339
|
e
|
|
266
340
|
);
|
|
267
341
|
}) }),
|
|
268
|
-
/* @__PURE__ */
|
|
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]) => {
|
|
269
343
|
if (!t?.show || t.type !== "icon") return null;
|
|
270
344
|
const r = e;
|
|
271
|
-
return /* @__PURE__ */
|
|
345
|
+
return /* @__PURE__ */ m.jsx(
|
|
272
346
|
"span",
|
|
273
347
|
{
|
|
274
348
|
ref: (o) => {
|
|
275
|
-
|
|
349
|
+
n.current[e] = o;
|
|
276
350
|
},
|
|
277
351
|
className: "pointer-events-auto cursor-default transition-all duration-300 opacity-0",
|
|
278
|
-
onClick: () =>
|
|
279
|
-
onMouseEnter: () =>
|
|
280
|
-
onMouseLeave: () =>
|
|
281
|
-
onMouseDown: () =>
|
|
282
|
-
onMouseUp: () =>
|
|
283
|
-
children: /* @__PURE__ */
|
|
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) })
|
|
284
358
|
},
|
|
285
359
|
e
|
|
286
360
|
);
|
|
@@ -288,5 +362,5 @@ const P = j(
|
|
|
288
362
|
] });
|
|
289
363
|
};
|
|
290
364
|
export {
|
|
291
|
-
|
|
365
|
+
Ot as Scrollable
|
|
292
366
|
};
|
package/dist/Select.es.js
CHANGED
|
@@ -4,7 +4,7 @@ import Se, { memo as J, useState as Ne, useRef as ae, useMemo as te, useCallback
|
|
|
4
4
|
import Xe from "./Spinner.es.js";
|
|
5
5
|
import { createPortal as Ye } from "react-dom";
|
|
6
6
|
import { u as Ze } from "./useDragScroll-CHN9OMwn.js";
|
|
7
|
-
import { u as et } from "./useLabelBackground-
|
|
7
|
+
import { u as et } from "./useLabelBackground-D5SzHhl_.js";
|
|
8
8
|
import { H as tt } from "./HelperComponent-ljsn0xD6.js";
|
|
9
9
|
import { Close as nt } from "./Icons/Close.es.js";
|
|
10
10
|
import rt from "./CheckBox.es.js";
|