@versini/ui-panel 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Panel/Panel.js +178 -715
- package/dist/index.d.ts +9 -4
- package/dist/index.js +3 -3
- package/package.json +6 -6
|
@@ -1,590 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
switch (e) {
|
|
16
|
-
case ee:
|
|
17
|
-
case D:
|
|
18
|
-
return n({
|
|
19
|
-
[l]: r === "small",
|
|
20
|
-
[d]: r === "medium",
|
|
21
|
-
[c]: r === "large"
|
|
22
|
-
});
|
|
23
|
-
case V:
|
|
24
|
-
return n("flex items-center", {
|
|
25
|
-
"justify-center": i === "center",
|
|
26
|
-
"justify-start": i === "left",
|
|
27
|
-
"justify-end": i === "right",
|
|
28
|
-
"h-6 w-6 p-0": r === "small" && !o && !(t || a),
|
|
29
|
-
"h-6 px-1 sm:px-2": r === "small" && !o && (t || a),
|
|
30
|
-
"h-8 w-8 p-1": r === "medium" && !o && !(t || a),
|
|
31
|
-
"h-8 px-3": r === "medium" && !o && (t || a),
|
|
32
|
-
"h-12 w-12 p-2": r === "large" && !o && !(t || a),
|
|
33
|
-
"h-12 px-4": r === "large" && !o && (t || a),
|
|
34
|
-
"h-6 py-0": r === "small" && o && !(t || a),
|
|
35
|
-
"h-6": r === "small" && o && (t || a),
|
|
36
|
-
"h-8 py-1": r === "medium" && o && !(t || a),
|
|
37
|
-
"h-8": r === "medium" && o && (t || a),
|
|
38
|
-
"h-12 py-2": r === "large" && o && !(t || a),
|
|
39
|
-
"h-12": r === "large" && o && (t || a)
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}, we = ({
|
|
43
|
-
type: e,
|
|
44
|
-
size: r,
|
|
45
|
-
labelRight: t,
|
|
46
|
-
labelLeft: a
|
|
47
|
-
}) => {
|
|
48
|
-
const i = "text-sm font-medium", o = "text-base font-medium", l = "text-lg font-medium";
|
|
49
|
-
switch (e) {
|
|
50
|
-
case ee:
|
|
51
|
-
case D:
|
|
52
|
-
return n({
|
|
53
|
-
"text-center": e === D,
|
|
54
|
-
[i]: r === "small",
|
|
55
|
-
[o]: r === "medium",
|
|
56
|
-
[l]: r === "large"
|
|
57
|
-
});
|
|
58
|
-
case V:
|
|
59
|
-
return n({
|
|
60
|
-
[i]: r === "small" && (t || a),
|
|
61
|
-
[o]: r === "medium" && (t || a),
|
|
62
|
-
[l]: r === "large" && (t || a)
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
}, Ie = ({
|
|
66
|
-
mode: e,
|
|
67
|
-
noBackground: r,
|
|
68
|
-
truncate: t,
|
|
69
|
-
variant: a
|
|
70
|
-
}) => {
|
|
71
|
-
if (r)
|
|
72
|
-
return "not-prose";
|
|
73
|
-
if (a === "primary")
|
|
74
|
-
return n("not-prose", {
|
|
75
|
-
truncate: t,
|
|
76
|
-
"text-copy-dark": e === "dark" || e === "system",
|
|
77
|
-
"text-copy-light": e === "light" || e === "alt-system",
|
|
78
|
-
"dark:text-copy-light": e === "system",
|
|
79
|
-
"dark:text-copy-dark": e === "alt-system"
|
|
80
|
-
});
|
|
81
|
-
if (a === "secondary")
|
|
82
|
-
return n("not-prose", {
|
|
83
|
-
truncate: t,
|
|
84
|
-
"text-copy-light": e === "dark" || e === "system",
|
|
85
|
-
"text-copy-dark": e === "light" || e === "alt-system",
|
|
86
|
-
"dark:text-copy-dark": e === "system",
|
|
87
|
-
"dark:text-copy-light": e === "alt-system"
|
|
88
|
-
});
|
|
89
|
-
if (a === "danger")
|
|
90
|
-
return n("not-prose", {
|
|
91
|
-
truncate: t,
|
|
92
|
-
"text-copy-light": e === "dark" || e === "system",
|
|
93
|
-
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
94
|
-
"dark:text-copy-lighter": e === "system",
|
|
95
|
-
"dark:text-copy-light": e === "alt-system"
|
|
96
|
-
});
|
|
97
|
-
if (a === "selected")
|
|
98
|
-
return n("not-prose text-copy-lighter", {
|
|
99
|
-
truncate: t
|
|
100
|
-
});
|
|
101
|
-
}, _e = ({
|
|
102
|
-
mode: e,
|
|
103
|
-
noBackground: r,
|
|
104
|
-
variant: t
|
|
105
|
-
}) => {
|
|
106
|
-
if (!r) {
|
|
107
|
-
if (t === "primary")
|
|
108
|
-
return n({
|
|
109
|
-
"bg-action-light": e === "dark",
|
|
110
|
-
"bg-action-dark": e === "light",
|
|
111
|
-
"bg-action-light dark:bg-action-dark": e === "system",
|
|
112
|
-
"bg-action-dark dark:bg-action-light": e === "alt-system"
|
|
113
|
-
});
|
|
114
|
-
if (t === "secondary")
|
|
115
|
-
return n({
|
|
116
|
-
"bg-action-light": e === "light",
|
|
117
|
-
"bg-action-dark": e === "dark",
|
|
118
|
-
"bg-action-light dark:bg-action-dark": e === "alt-system",
|
|
119
|
-
"bg-action-dark dark:bg-action-light": e === "system"
|
|
120
|
-
});
|
|
121
|
-
if (t === "danger")
|
|
122
|
-
return n({
|
|
123
|
-
"bg-action-danger-dark": e === "dark",
|
|
124
|
-
"bg-action-danger-light": e === "light",
|
|
125
|
-
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
126
|
-
"bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
|
|
127
|
-
});
|
|
128
|
-
if (t === "selected")
|
|
129
|
-
return "bg-action-selected-dark";
|
|
130
|
-
}
|
|
131
|
-
}, Ne = ({
|
|
132
|
-
radius: e
|
|
133
|
-
}) => n({
|
|
134
|
-
"rounded-full": e === "large",
|
|
135
|
-
"rounded-md": e === "medium",
|
|
136
|
-
"rounded-xs": e === "small"
|
|
137
|
-
}), Ee = ({
|
|
138
|
-
mode: e,
|
|
139
|
-
disabled: r,
|
|
140
|
-
variant: t
|
|
141
|
-
}) => {
|
|
142
|
-
if (r)
|
|
143
|
-
return "";
|
|
144
|
-
if (t === "primary")
|
|
145
|
-
return n({
|
|
146
|
-
"hover:text-copy-dark-hover": e === "dark" || e === "system",
|
|
147
|
-
"hover:text-copy-light-hover": e === "light" || e === "alt-system",
|
|
148
|
-
"dark:hover:text-copy-light-hover": e === "system",
|
|
149
|
-
"dark:hover:text-copy-dark-hover": e === "alt-system",
|
|
150
|
-
"hover:bg-action-light-hover": e === "dark",
|
|
151
|
-
"hover:bg-action-dark-hover": e === "light",
|
|
152
|
-
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system",
|
|
153
|
-
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system"
|
|
154
|
-
});
|
|
155
|
-
if (t === "secondary")
|
|
156
|
-
return n({
|
|
157
|
-
"hover:text-copy-light-hover": e === "dark" || e === "system",
|
|
158
|
-
"hover:text-copy-dark-hover": e === "light" || e === "alt-system",
|
|
159
|
-
"dark:hover:text-copy-dark-hover": e === "system",
|
|
160
|
-
"dark:hover:text-copy-light-hover": e === "alt-system",
|
|
161
|
-
"hover:bg-action-light-hover": e === "light",
|
|
162
|
-
"hover:bg-action-dark-hover": e === "dark",
|
|
163
|
-
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system",
|
|
164
|
-
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system"
|
|
165
|
-
});
|
|
166
|
-
if (t === "danger")
|
|
167
|
-
return n("hover:text-copy-light-hover", {
|
|
168
|
-
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
169
|
-
"hover:bg-action-danger-light-hover": e === "light",
|
|
170
|
-
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
171
|
-
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
172
|
-
});
|
|
173
|
-
if (t === "selected")
|
|
174
|
-
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
175
|
-
}, Ce = ({
|
|
176
|
-
mode: e,
|
|
177
|
-
disabled: r,
|
|
178
|
-
variant: t
|
|
179
|
-
}) => {
|
|
180
|
-
if (r)
|
|
181
|
-
return "";
|
|
182
|
-
if (t === "primary")
|
|
183
|
-
return n({
|
|
184
|
-
"active:text-copy-dark-active": e === "dark" || e === "system",
|
|
185
|
-
"active:text-copy-light-active": e === "light" || e === "alt-system",
|
|
186
|
-
"dark:active:text-copy-light-active": e === "system",
|
|
187
|
-
"dark:active:text-copy-dark-active": e === "alt-system",
|
|
188
|
-
"active:bg-action-light-active": e === "dark",
|
|
189
|
-
"active:bg-action-dark-active": e === "light",
|
|
190
|
-
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system",
|
|
191
|
-
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system"
|
|
192
|
-
});
|
|
193
|
-
if (t === "secondary")
|
|
194
|
-
return n({
|
|
195
|
-
"active:text-copy-light-active": e === "dark" || e === "system",
|
|
196
|
-
"active:text-copy-dark-active": e === "light" || e === "alt-system",
|
|
197
|
-
"dark:active:text-copy-dark-active": e === "system",
|
|
198
|
-
"dark:active:text-copy-light-active": e === "alt-system",
|
|
199
|
-
"active:bg-action-light-active": e === "light",
|
|
200
|
-
"active:bg-action-dark-active": e === "dark",
|
|
201
|
-
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system",
|
|
202
|
-
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system"
|
|
203
|
-
});
|
|
204
|
-
if (t === "danger")
|
|
205
|
-
return n("active:text-copy-lighter-active", {
|
|
206
|
-
"active:bg-action-danger-dark-active": e === "dark",
|
|
207
|
-
"active:bg-action-danger-light-active": e === "light",
|
|
208
|
-
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
209
|
-
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
210
|
-
});
|
|
211
|
-
if (t === "selected")
|
|
212
|
-
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
213
|
-
}, Be = ({
|
|
214
|
-
mode: e,
|
|
215
|
-
noBorder: r,
|
|
216
|
-
variant: t
|
|
217
|
-
}) => {
|
|
218
|
-
if (r)
|
|
219
|
-
return "border border-transparent";
|
|
220
|
-
if (t === "primary")
|
|
221
|
-
return n("border", {
|
|
222
|
-
"border-border-medium": e === "dark",
|
|
223
|
-
"border-border-accent": e === "light",
|
|
224
|
-
"border-border-medium dark:border-border-accent": e === "system",
|
|
225
|
-
"border-border-accent dark:border-border-medium": e === "alt-system"
|
|
226
|
-
});
|
|
227
|
-
if (t === "secondary")
|
|
228
|
-
return n("border", {
|
|
229
|
-
"border-border-medium": e === "light",
|
|
230
|
-
"border-border-accent": e === "dark",
|
|
231
|
-
"border-border-medium dark:border-border-accent": e === "alt-system",
|
|
232
|
-
"border-border-accent dark:border-border-medium": e === "system"
|
|
233
|
-
});
|
|
234
|
-
if (t === "danger")
|
|
235
|
-
return n("border", {
|
|
236
|
-
"border-border-danger-dark": e === "dark",
|
|
237
|
-
"border-border-danger-medium": e === "light",
|
|
238
|
-
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
239
|
-
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
240
|
-
});
|
|
241
|
-
if (t === "selected")
|
|
242
|
-
return "border border-border-selected-dark";
|
|
243
|
-
}, Se = ({
|
|
244
|
-
focusMode: e
|
|
245
|
-
}) => n("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
246
|
-
"focus:outline-focus-dark": e === "dark",
|
|
247
|
-
"focus:outline-focus-light": e === "light",
|
|
248
|
-
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
249
|
-
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
250
|
-
}), Re = ({
|
|
251
|
-
mode: e,
|
|
252
|
-
raw: r,
|
|
253
|
-
iconClassName: t,
|
|
254
|
-
variant: a = "primary"
|
|
255
|
-
}) => {
|
|
256
|
-
if (r)
|
|
257
|
-
return "";
|
|
258
|
-
let i = {};
|
|
259
|
-
return a === "primary" ? i = {
|
|
260
|
-
"text-copy-dark": e === "dark" || e === "system",
|
|
261
|
-
"text-copy-light": e === "light" || e === "alt-system",
|
|
262
|
-
"dark:text-copy-light": e === "system",
|
|
263
|
-
"dark:text-copy-dark": e === "alt-system"
|
|
264
|
-
} : a === "secondary" ? i = {
|
|
265
|
-
"text-copy-light": e === "dark" || e === "system",
|
|
266
|
-
"text-copy-dark": e === "light" || e === "alt-system",
|
|
267
|
-
"dark:text-copy-dark": e === "system",
|
|
268
|
-
"dark:text-copy-light": e === "alt-system"
|
|
269
|
-
} : a === "danger" ? i = {
|
|
270
|
-
"text-copy-light": e === "dark" || e === "system",
|
|
271
|
-
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
272
|
-
"dark:text-copy-lighter": e === "system",
|
|
273
|
-
"dark:text-copy-light": e === "alt-system"
|
|
274
|
-
} : a === "selected" && (i = {
|
|
275
|
-
"text-copy-lighter": !0
|
|
276
|
-
}), n(i, t);
|
|
277
|
-
}, Me = ({
|
|
278
|
-
animated: e
|
|
279
|
-
}) => n({
|
|
280
|
-
"transition-opacity duration-300 ease-in-out": e
|
|
281
|
-
}), Te = ({
|
|
282
|
-
type: e,
|
|
283
|
-
className: r,
|
|
284
|
-
raw: t,
|
|
285
|
-
mode: a,
|
|
286
|
-
focusMode: i,
|
|
287
|
-
disabled: o,
|
|
288
|
-
fullWidth: l,
|
|
289
|
-
size: d,
|
|
290
|
-
noBorder: c,
|
|
291
|
-
labelRight: g,
|
|
292
|
-
labelLeft: y,
|
|
293
|
-
noBackground: m,
|
|
294
|
-
variant: u,
|
|
295
|
-
truncate: f,
|
|
296
|
-
align: b,
|
|
297
|
-
radius: w,
|
|
298
|
-
animated: I
|
|
299
|
-
}) => (u || (u = "primary"), t ? n(X, r) : n(
|
|
300
|
-
X,
|
|
301
|
-
Ie({
|
|
302
|
-
mode: a,
|
|
303
|
-
variant: u,
|
|
304
|
-
noBackground: m,
|
|
305
|
-
truncate: f
|
|
306
|
-
}),
|
|
307
|
-
_e({ mode: a, noBackground: m, variant: u }),
|
|
308
|
-
Ne({ radius: w }),
|
|
309
|
-
xe({
|
|
310
|
-
type: e,
|
|
311
|
-
size: d,
|
|
312
|
-
labelRight: g,
|
|
313
|
-
labelLeft: y,
|
|
314
|
-
align: b,
|
|
315
|
-
animated: I
|
|
316
|
-
}),
|
|
317
|
-
we({ type: e, size: d, labelRight: g, labelLeft: y }),
|
|
318
|
-
Be({ mode: a, variant: u, noBorder: c }),
|
|
319
|
-
Se({ focusMode: i }),
|
|
320
|
-
Ee({ mode: a, variant: u, disabled: o }),
|
|
321
|
-
Ce({ mode: a, variant: u, disabled: o }),
|
|
322
|
-
{
|
|
323
|
-
"w-full": l,
|
|
324
|
-
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
325
|
-
},
|
|
326
|
-
n({
|
|
327
|
-
"transition-[width] duration-300 ease-in": I
|
|
328
|
-
}),
|
|
329
|
-
r
|
|
330
|
-
)), Le = (e, r, t) => {
|
|
331
|
-
!r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof e?.currentTarget?.focus == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
|
|
332
|
-
}, te = F.forwardRef((e, r) => {
|
|
333
|
-
const { onClick: t, noInternalClick: a = !1, ...i } = e;
|
|
334
|
-
return /* @__PURE__ */ s(
|
|
335
|
-
"button",
|
|
336
|
-
{
|
|
337
|
-
ref: r,
|
|
338
|
-
onClick: (o) => {
|
|
339
|
-
Le(o, a, t);
|
|
340
|
-
},
|
|
341
|
-
...i
|
|
342
|
-
}
|
|
343
|
-
);
|
|
344
|
-
});
|
|
345
|
-
te.displayName = "BaseButton";
|
|
346
|
-
function $e() {
|
|
347
|
-
const e = N(!1);
|
|
348
|
-
return B(() => (e.current = !0, () => {
|
|
349
|
-
e.current = !1;
|
|
350
|
-
}), []), me(() => e.current, []);
|
|
351
|
-
}
|
|
352
|
-
function Ae(e) {
|
|
353
|
-
return Q(() => e.every((r) => r == null) ? () => {
|
|
354
|
-
} : (r) => {
|
|
355
|
-
e.forEach((t) => {
|
|
356
|
-
typeof t == "function" ? t(r) : t != null && (t.current = r);
|
|
357
|
-
});
|
|
358
|
-
}, [...e]);
|
|
359
|
-
}
|
|
360
|
-
const Oe = {
|
|
361
|
-
x: 0,
|
|
362
|
-
y: 0,
|
|
363
|
-
width: 0,
|
|
364
|
-
height: 0,
|
|
365
|
-
top: 0,
|
|
366
|
-
left: 0,
|
|
367
|
-
bottom: 0,
|
|
368
|
-
right: 0
|
|
369
|
-
};
|
|
370
|
-
function P(e) {
|
|
371
|
-
const r = $e(), t = N(0), a = N(null), [i, o] = K(Oe), l = Q(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
|
|
372
|
-
const c = d[0];
|
|
373
|
-
c && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
|
|
374
|
-
a.current && r() && o(c.contentRect);
|
|
375
|
-
}));
|
|
376
|
-
}), [r]);
|
|
377
|
-
return B(() => (a.current && l?.observe(a.current, e), () => {
|
|
378
|
-
l?.disconnect(), t.current && cancelAnimationFrame(t.current);
|
|
379
|
-
}), [l, e]), [a, i];
|
|
380
|
-
}
|
|
381
|
-
const M = {
|
|
382
|
-
small: 24,
|
|
383
|
-
// w-6
|
|
384
|
-
medium: 32,
|
|
385
|
-
// w-8
|
|
386
|
-
large: 48
|
|
387
|
-
// w-12
|
|
388
|
-
}, ze = {
|
|
389
|
-
small: 16,
|
|
390
|
-
// px-2 x 2
|
|
391
|
-
medium: 24,
|
|
392
|
-
// px-3 x 2
|
|
393
|
-
large: 32
|
|
394
|
-
// px-4 x 2
|
|
395
|
-
}, Pe = 2, De = 300, U = F.forwardRef(
|
|
396
|
-
({
|
|
397
|
-
children: e,
|
|
398
|
-
disabled: r = !1,
|
|
399
|
-
mode: t = "system",
|
|
400
|
-
focusMode: a = "system",
|
|
401
|
-
fullWidth: i = !1,
|
|
402
|
-
className: o,
|
|
403
|
-
type: l = "button",
|
|
404
|
-
raw: d = !1,
|
|
405
|
-
noBorder: c = !1,
|
|
406
|
-
"aria-label": g,
|
|
407
|
-
label: y,
|
|
408
|
-
size: m = "medium",
|
|
409
|
-
labelRight: u,
|
|
410
|
-
labelLeft: f,
|
|
411
|
-
noBackground: b = !1,
|
|
412
|
-
align: w = "center",
|
|
413
|
-
radius: I = "large",
|
|
414
|
-
variant: j = "secondary",
|
|
415
|
-
iconClassName: ae,
|
|
416
|
-
animated: k = !1,
|
|
417
|
-
...ie
|
|
418
|
-
}, oe) => {
|
|
419
|
-
const ne = Te({
|
|
420
|
-
type: V,
|
|
421
|
-
mode: t,
|
|
422
|
-
focusMode: a,
|
|
423
|
-
fullWidth: i,
|
|
424
|
-
disabled: r,
|
|
425
|
-
raw: d,
|
|
426
|
-
className: o,
|
|
427
|
-
noBorder: c,
|
|
428
|
-
size: m,
|
|
429
|
-
labelRight: u,
|
|
430
|
-
labelLeft: f,
|
|
431
|
-
noBackground: b,
|
|
432
|
-
align: w,
|
|
433
|
-
radius: I,
|
|
434
|
-
variant: j,
|
|
435
|
-
animated: k
|
|
436
|
-
}), se = Re({ mode: t, raw: d, iconClassName: ae, variant: j }), G = Me({ animated: k }), le = "flex items-center justify-center relative w-full h-full overflow-hidden", [v, A] = P(), [p, O] = P(), [S, Y] = P(), z = N(0), x = N(null), E = N(null), ce = Ae([oe, x]);
|
|
437
|
-
return H(() => {
|
|
438
|
-
S && S.current && k && (z.current = Y.width + ze[m] + (c ? 0 : Pe), x.current && !x.current.style.width && (x.current.style.width = `${M[m]}px`));
|
|
439
|
-
}, [Y, S, m, c, k]), H(() => {
|
|
440
|
-
if (x && x.current && k) {
|
|
441
|
-
let C = M[m];
|
|
442
|
-
u && v && A.width > 0 ? C = A.width + z.current : f && p && O.width > 0 && (C = O.width + z.current), E.current && clearTimeout(E.current), C !== parseInt(x.current.style.width || "0", 10) && (v.current && (v.current.style.opacity = "0"), p.current && (p.current.style.opacity = "0"), x.current.style.width = `${C}px`, C > M[m] && (E.current = setTimeout(() => {
|
|
443
|
-
v.current && u && (v.current.style.opacity = "1"), p.current && f && (p.current.style.opacity = "1"), E.current = null;
|
|
444
|
-
}, De * 0.8))), C === M[m] && (v.current && (v.current.style.opacity = "0"), p.current && (p.current.style.opacity = "0"));
|
|
445
|
-
}
|
|
446
|
-
}, [
|
|
447
|
-
A,
|
|
448
|
-
u,
|
|
449
|
-
v,
|
|
450
|
-
O,
|
|
451
|
-
f,
|
|
452
|
-
p,
|
|
453
|
-
m,
|
|
454
|
-
k
|
|
455
|
-
]), B(() => () => {
|
|
456
|
-
E.current && clearTimeout(E.current);
|
|
457
|
-
}, []), /* @__PURE__ */ s(
|
|
458
|
-
te,
|
|
459
|
-
{
|
|
460
|
-
ref: ce,
|
|
461
|
-
className: ne,
|
|
462
|
-
disabled: r,
|
|
463
|
-
type: l,
|
|
464
|
-
"aria-label": g || y,
|
|
465
|
-
...ie,
|
|
466
|
-
children: /* @__PURE__ */ L("div", { className: le, children: [
|
|
467
|
-
/* @__PURE__ */ s(
|
|
468
|
-
W,
|
|
469
|
-
{
|
|
470
|
-
label: f,
|
|
471
|
-
labelRef: p,
|
|
472
|
-
labelClass: G,
|
|
473
|
-
labelInnerClass: "pr-2",
|
|
474
|
-
initiallyHidden: k
|
|
475
|
-
}
|
|
476
|
-
),
|
|
477
|
-
/* @__PURE__ */ s("span", { ref: S, className: se, children: e }),
|
|
478
|
-
/* @__PURE__ */ s(
|
|
479
|
-
W,
|
|
480
|
-
{
|
|
481
|
-
label: u,
|
|
482
|
-
labelRef: v,
|
|
483
|
-
labelClass: G,
|
|
484
|
-
labelInnerClass: "pl-2",
|
|
485
|
-
initiallyHidden: k
|
|
486
|
-
}
|
|
487
|
-
)
|
|
488
|
-
] })
|
|
489
|
-
}
|
|
490
|
-
);
|
|
491
|
-
}
|
|
492
|
-
), W = ({
|
|
493
|
-
labelRef: e,
|
|
494
|
-
labelClass: r,
|
|
495
|
-
label: t,
|
|
496
|
-
labelInnerClass: a,
|
|
497
|
-
initiallyHidden: i = !1
|
|
498
|
-
}) => /* @__PURE__ */ s(
|
|
499
|
-
"span",
|
|
500
|
-
{
|
|
501
|
-
ref: e,
|
|
502
|
-
className: r,
|
|
503
|
-
style: i ? { opacity: 0 } : void 0,
|
|
504
|
-
children: t && /* @__PURE__ */ s("span", { className: a, children: t })
|
|
505
|
-
}
|
|
506
|
-
);
|
|
507
|
-
U.displayName = "ButtonIcon";
|
|
508
|
-
/*!
|
|
509
|
-
@versini/ui-button v8.0.0
|
|
510
|
-
© 2025 gizmette.com
|
|
511
|
-
*/
|
|
512
|
-
try {
|
|
513
|
-
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
514
|
-
version: "8.0.0",
|
|
515
|
-
buildTime: "09/01/2025 03:17 PM EDT",
|
|
516
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
517
|
-
license: "MIT"
|
|
518
|
-
});
|
|
519
|
-
} catch {
|
|
520
|
-
}
|
|
521
|
-
const Fe = F.forwardRef(
|
|
522
|
-
({
|
|
523
|
-
children: e,
|
|
524
|
-
mode: r = "system",
|
|
525
|
-
className: t,
|
|
526
|
-
active: a = !1,
|
|
527
|
-
...i
|
|
528
|
-
}, o) => {
|
|
529
|
-
const l = a ? n(
|
|
530
|
-
"relative",
|
|
531
|
-
"focus-within:static",
|
|
532
|
-
"focus-within:after:border-transparent",
|
|
533
|
-
"after:absolute",
|
|
534
|
-
"after:content-['']",
|
|
535
|
-
"after:border-b-2",
|
|
536
|
-
"after:bottom-[-4px]",
|
|
537
|
-
"after:left-0",
|
|
538
|
-
"after:right-0",
|
|
539
|
-
{
|
|
540
|
-
"after:border-table-dark": r === "dark",
|
|
541
|
-
"after:border-table-light": r === "light",
|
|
542
|
-
"after:border-table-dark dark:after:border-table-light": r === "system",
|
|
543
|
-
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
544
|
-
}
|
|
545
|
-
) : "";
|
|
546
|
-
return /* @__PURE__ */ s("div", { className: l, children: /* @__PURE__ */ s(
|
|
547
|
-
U,
|
|
548
|
-
{
|
|
549
|
-
className: t,
|
|
550
|
-
ref: o,
|
|
551
|
-
mode: r,
|
|
552
|
-
radius: "small",
|
|
553
|
-
size: "small",
|
|
554
|
-
align: "center",
|
|
555
|
-
...i,
|
|
556
|
-
children: e
|
|
557
|
-
}
|
|
558
|
-
) });
|
|
559
|
-
}
|
|
560
|
-
);
|
|
561
|
-
Fe.displayName = "ButtonSort";
|
|
562
|
-
const Ve = ({
|
|
563
|
-
children: e,
|
|
564
|
-
fill: r,
|
|
565
|
-
viewBox: t,
|
|
566
|
-
className: a,
|
|
567
|
-
defaultViewBox: i,
|
|
568
|
-
size: o,
|
|
569
|
-
title: l,
|
|
1
|
+
import { jsxs as E, jsx as l, Fragment as L } from "react/jsx-runtime";
|
|
2
|
+
import { ButtonIcon as O } from "@versini/ui-button";
|
|
3
|
+
import * as c from "react";
|
|
4
|
+
import { useId as A, useRef as $, useState as R, useEffect as S } from "react";
|
|
5
|
+
import N from "clsx";
|
|
6
|
+
import { useFloating as T, useClick as D, useDismiss as P, useRole as B, useInteractions as V, useMergeRefs as F, FloatingPortal as U, FloatingOverlay as Y, FloatingFocusManager as z } from "@floating-ui/react";
|
|
7
|
+
const M = "av-messagebox", _ = "av-panel", G = ({
|
|
8
|
+
children: t,
|
|
9
|
+
fill: e,
|
|
10
|
+
viewBox: r,
|
|
11
|
+
className: s,
|
|
12
|
+
defaultViewBox: o,
|
|
13
|
+
size: a,
|
|
14
|
+
title: n,
|
|
570
15
|
semantic: d = !1,
|
|
571
|
-
...
|
|
16
|
+
...m
|
|
572
17
|
}) => {
|
|
573
|
-
const
|
|
574
|
-
return /* @__PURE__ */
|
|
18
|
+
const u = N(a, s);
|
|
19
|
+
return /* @__PURE__ */ E(
|
|
575
20
|
"svg",
|
|
576
21
|
{
|
|
577
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
578
|
-
className:
|
|
579
|
-
viewBox:
|
|
580
|
-
fill:
|
|
23
|
+
className: u,
|
|
24
|
+
viewBox: r || o,
|
|
25
|
+
fill: e || "currentColor",
|
|
581
26
|
role: "img",
|
|
582
27
|
"aria-hidden": !d,
|
|
583
28
|
focusable: !1,
|
|
584
|
-
...
|
|
29
|
+
...m,
|
|
585
30
|
children: [
|
|
586
|
-
|
|
587
|
-
|
|
31
|
+
n && d && /* @__PURE__ */ l("title", { children: n }),
|
|
32
|
+
t
|
|
588
33
|
]
|
|
589
34
|
}
|
|
590
35
|
);
|
|
@@ -602,26 +47,26 @@ try {
|
|
|
602
47
|
});
|
|
603
48
|
} catch {
|
|
604
49
|
}
|
|
605
|
-
const
|
|
606
|
-
className:
|
|
607
|
-
viewBox:
|
|
608
|
-
title:
|
|
609
|
-
monotone:
|
|
610
|
-
...
|
|
611
|
-
}) => /* @__PURE__ */
|
|
612
|
-
|
|
50
|
+
const j = ({
|
|
51
|
+
className: t,
|
|
52
|
+
viewBox: e,
|
|
53
|
+
title: r,
|
|
54
|
+
monotone: s,
|
|
55
|
+
...o
|
|
56
|
+
}) => /* @__PURE__ */ l(
|
|
57
|
+
G,
|
|
613
58
|
{
|
|
614
59
|
defaultViewBox: "0 0 384 512",
|
|
615
60
|
size: "size-5",
|
|
616
|
-
viewBox:
|
|
617
|
-
className:
|
|
618
|
-
title:
|
|
619
|
-
...
|
|
620
|
-
children: /* @__PURE__ */
|
|
61
|
+
viewBox: e,
|
|
62
|
+
className: t,
|
|
63
|
+
title: r || "Close",
|
|
64
|
+
...o,
|
|
65
|
+
children: /* @__PURE__ */ l(
|
|
621
66
|
"path",
|
|
622
67
|
{
|
|
623
68
|
d: "M297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3z",
|
|
624
|
-
opacity:
|
|
69
|
+
opacity: s ? "1" : "0.4"
|
|
625
70
|
}
|
|
626
71
|
)
|
|
627
72
|
}
|
|
@@ -639,186 +84,204 @@ try {
|
|
|
639
84
|
});
|
|
640
85
|
} catch {
|
|
641
86
|
}
|
|
642
|
-
const
|
|
643
|
-
function
|
|
644
|
-
initialOpen:
|
|
645
|
-
open:
|
|
646
|
-
onOpenChange:
|
|
87
|
+
const y = c.createContext(null);
|
|
88
|
+
function X({
|
|
89
|
+
initialOpen: t = !1,
|
|
90
|
+
open: e,
|
|
91
|
+
onOpenChange: r
|
|
647
92
|
} = {}) {
|
|
648
|
-
const [
|
|
649
|
-
open:
|
|
650
|
-
onOpenChange:
|
|
651
|
-
}),
|
|
652
|
-
enabled:
|
|
653
|
-
}),
|
|
93
|
+
const [s, o] = c.useState(t), [a, n] = c.useState(), [d, m] = c.useState(), u = e ?? s, w = r ?? o, p = T({
|
|
94
|
+
open: u,
|
|
95
|
+
onOpenChange: w
|
|
96
|
+
}), f = p.context, v = D(f, {
|
|
97
|
+
enabled: e == null
|
|
98
|
+
}), x = P(f, {
|
|
654
99
|
outsidePress: !1,
|
|
655
100
|
outsidePressEvent: "mousedown"
|
|
656
|
-
}),
|
|
657
|
-
return
|
|
101
|
+
}), h = B(f), I = V([v, x, h]);
|
|
102
|
+
return c.useMemo(
|
|
658
103
|
() => ({
|
|
659
|
-
open:
|
|
660
|
-
setOpen:
|
|
104
|
+
open: u,
|
|
105
|
+
setOpen: w,
|
|
661
106
|
...I,
|
|
662
|
-
...
|
|
663
|
-
labelId:
|
|
107
|
+
...p,
|
|
108
|
+
labelId: a,
|
|
664
109
|
descriptionId: d,
|
|
665
|
-
setLabelId:
|
|
666
|
-
setDescriptionId:
|
|
110
|
+
setLabelId: n,
|
|
111
|
+
setDescriptionId: m
|
|
667
112
|
}),
|
|
668
|
-
[
|
|
113
|
+
[u, w, I, p, a, d]
|
|
669
114
|
);
|
|
670
115
|
}
|
|
671
|
-
const
|
|
672
|
-
const
|
|
673
|
-
if (
|
|
116
|
+
const b = () => {
|
|
117
|
+
const t = c.useContext(y);
|
|
118
|
+
if (t == null)
|
|
674
119
|
throw new Error("Modal components must be wrapped in <Modal />");
|
|
675
|
-
return
|
|
120
|
+
return t;
|
|
676
121
|
};
|
|
677
|
-
function
|
|
678
|
-
children:
|
|
679
|
-
...
|
|
122
|
+
function H({
|
|
123
|
+
children: t,
|
|
124
|
+
...e
|
|
680
125
|
}) {
|
|
681
|
-
const
|
|
682
|
-
return /* @__PURE__ */
|
|
126
|
+
const r = X(e);
|
|
127
|
+
return /* @__PURE__ */ l(y.Provider, { value: r, children: t });
|
|
683
128
|
}
|
|
684
|
-
const
|
|
685
|
-
const { context:
|
|
686
|
-
if (!
|
|
129
|
+
const q = c.forwardRef(function(t, e) {
|
|
130
|
+
const { context: r, ...s } = b(), o = F([s.refs.setFloating, e]);
|
|
131
|
+
if (!r.open)
|
|
687
132
|
return null;
|
|
688
|
-
const { overlayBackground:
|
|
689
|
-
[`${
|
|
690
|
-
"bg-black sm:bg-black/[.8]": !
|
|
133
|
+
const { overlayBackground: a, ...n } = t, d = N("grid place-items-center", {
|
|
134
|
+
[`${a}`]: a,
|
|
135
|
+
"bg-black sm:bg-black/[.8]": !a
|
|
691
136
|
});
|
|
692
|
-
return /* @__PURE__ */
|
|
137
|
+
return /* @__PURE__ */ l(U, { children: /* @__PURE__ */ l(Y, { className: d, lockScroll: !0, children: /* @__PURE__ */ l(z, { context: r, children: /* @__PURE__ */ l(
|
|
693
138
|
"div",
|
|
694
139
|
{
|
|
695
|
-
ref:
|
|
696
|
-
"aria-labelledby":
|
|
697
|
-
"aria-describedby":
|
|
698
|
-
...
|
|
699
|
-
children:
|
|
140
|
+
ref: o,
|
|
141
|
+
"aria-labelledby": s.labelId,
|
|
142
|
+
"aria-describedby": s.descriptionId,
|
|
143
|
+
...s.getFloatingProps(n),
|
|
144
|
+
children: n.children
|
|
700
145
|
}
|
|
701
146
|
) }) }) });
|
|
702
|
-
}),
|
|
703
|
-
const { setLabelId:
|
|
704
|
-
return
|
|
705
|
-
}),
|
|
706
|
-
const { setDescriptionId:
|
|
707
|
-
return
|
|
708
|
-
}),
|
|
709
|
-
const { setOpen:
|
|
710
|
-
return /* @__PURE__ */
|
|
711
|
-
ref:
|
|
712
|
-
onClick:
|
|
713
|
-
...
|
|
147
|
+
}), J = c.forwardRef(function({ children: t, ...e }, r) {
|
|
148
|
+
const { setLabelId: s } = b(), o = A();
|
|
149
|
+
return c.useLayoutEffect(() => (s(o), () => s(void 0)), [o, s]), /* @__PURE__ */ l("h1", { ...e, ref: r, id: o, children: t });
|
|
150
|
+
}), K = c.forwardRef(function({ children: t, ...e }, r) {
|
|
151
|
+
const { setDescriptionId: s } = b(), o = A();
|
|
152
|
+
return c.useLayoutEffect(() => (s(o), () => s(void 0)), [o, s]), /* @__PURE__ */ l("div", { ...e, ref: r, id: o, children: t });
|
|
153
|
+
}), Q = c.forwardRef(function(t, e) {
|
|
154
|
+
const { setOpen: r } = b(), { trigger: s, className: o, ...a } = t, n = c.useCallback(() => r(!1), [r]);
|
|
155
|
+
return /* @__PURE__ */ l("div", { className: o, children: c.cloneElement(s, {
|
|
156
|
+
ref: e,
|
|
157
|
+
onClick: n,
|
|
158
|
+
...a
|
|
714
159
|
}) });
|
|
715
160
|
});
|
|
716
161
|
/*!
|
|
717
|
-
@versini/ui-modal v3.0.
|
|
162
|
+
@versini/ui-modal v3.0.1
|
|
718
163
|
© 2025 gizmette.com
|
|
719
164
|
*/
|
|
720
165
|
try {
|
|
721
166
|
window.__VERSINI_UI_MODAL__ || (window.__VERSINI_UI_MODAL__ = {
|
|
722
|
-
version: "3.0.
|
|
723
|
-
buildTime: "
|
|
167
|
+
version: "3.0.1",
|
|
168
|
+
buildTime: "10/11/2025 12:41 PM EDT",
|
|
724
169
|
homepage: "https://github.com/aversini/ui-components",
|
|
725
170
|
license: "MIT"
|
|
726
171
|
});
|
|
727
172
|
} catch {
|
|
728
173
|
}
|
|
729
|
-
const
|
|
730
|
-
className:
|
|
731
|
-
kind:
|
|
732
|
-
borderMode:
|
|
733
|
-
animation:
|
|
734
|
-
maxWidth:
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
174
|
+
const i = "panel", g = "messagebox", Z = ({
|
|
175
|
+
className: t,
|
|
176
|
+
kind: e,
|
|
177
|
+
borderMode: r,
|
|
178
|
+
animation: s,
|
|
179
|
+
maxWidth: o = "medium",
|
|
180
|
+
maxHeight: a
|
|
181
|
+
}) => {
|
|
182
|
+
const n = a ?? (e === i ? "large" : void 0);
|
|
183
|
+
return {
|
|
184
|
+
main: N("prose prose-lighter flex flex-col bg-surface-dark", {
|
|
185
|
+
"duration-200 ease-out": s,
|
|
186
|
+
/**
|
|
187
|
+
* Panel styles
|
|
188
|
+
*/
|
|
189
|
+
[`${_} min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: e === i,
|
|
190
|
+
[`${_} w-full sm:w-[95%] md:max-w-2xl`]: e === i && !t && o === "small",
|
|
191
|
+
[`${_} w-full sm:w-[95%] md:max-w-3xl`]: e === i && !t && o === "medium",
|
|
192
|
+
[`${_} w-full sm:w-[95%] md:max-w-4xl`]: e === i && !t && o === "large",
|
|
193
|
+
"max-h-full sm:max-h-[75%]": e === i && n === "small",
|
|
194
|
+
"max-h-full sm:max-h-[85%]": e === i && n === "medium",
|
|
195
|
+
"max-h-full sm:max-h-[95%]": e === i && n === "large",
|
|
196
|
+
"sm:border-border-dark": r === "dark" && e === i,
|
|
197
|
+
"sm:border-border-accent": r === "light" && e === i,
|
|
198
|
+
/**
|
|
199
|
+
* Messagebox styles
|
|
200
|
+
*/
|
|
201
|
+
[`${M} rounded-lg border-2`]: e === g,
|
|
202
|
+
[`${M} w-[95%] sm:w-[50%] md:max-w-2xl`]: e === g && !t,
|
|
203
|
+
"max-h-[75%]": e === g && n === "small",
|
|
204
|
+
"max-h-[85%]": e === g && n === "medium",
|
|
205
|
+
"max-h-[95%]": e === g && n === "large",
|
|
206
|
+
"border-border-dark": r === "dark" && e === g,
|
|
207
|
+
"border-border-accent": r === "light" && e === g,
|
|
208
|
+
[`${t}`]: !!t
|
|
209
|
+
}),
|
|
210
|
+
content: "flex flex-col py-2 sm:py-4 sm:px-4 px-2 overflow-y-auto",
|
|
211
|
+
footer: "flex grow flex-col sm:p-4 p-2",
|
|
212
|
+
header: "sm:p-4 mb-0 p-2",
|
|
213
|
+
close: "sm:p-4 p-2"
|
|
214
|
+
};
|
|
215
|
+
}, W = "slide", C = "fade", oe = ({
|
|
216
|
+
open: t,
|
|
217
|
+
onOpenChange: e,
|
|
218
|
+
title: r,
|
|
219
|
+
children: s,
|
|
220
|
+
footer: o,
|
|
221
|
+
borderMode: a = "light",
|
|
222
|
+
kind: n = i,
|
|
762
223
|
className: d,
|
|
763
|
-
animation:
|
|
764
|
-
animationType:
|
|
765
|
-
maxWidth:
|
|
224
|
+
animation: m = !1,
|
|
225
|
+
animationType: u = W,
|
|
226
|
+
maxWidth: w = "medium",
|
|
227
|
+
maxHeight: p
|
|
766
228
|
}) => {
|
|
767
|
-
const
|
|
768
|
-
|
|
229
|
+
const f = $(""), [v, x] = R(
|
|
230
|
+
m ? u === C ? { opacity: 0 } : {
|
|
769
231
|
transform: "translateY(-100vh)"
|
|
770
232
|
} : {}
|
|
771
|
-
),
|
|
233
|
+
), h = Z({
|
|
772
234
|
className: d,
|
|
773
|
-
kind:
|
|
774
|
-
borderMode:
|
|
775
|
-
animation:
|
|
776
|
-
maxWidth:
|
|
235
|
+
kind: n,
|
|
236
|
+
borderMode: a,
|
|
237
|
+
animation: m,
|
|
238
|
+
maxWidth: w,
|
|
239
|
+
maxHeight: p
|
|
777
240
|
});
|
|
778
|
-
return
|
|
779
|
-
|
|
780
|
-
}), [
|
|
781
|
-
if (
|
|
782
|
-
|
|
783
|
-
|
|
241
|
+
return S(() => (t && (f.current = document.title, document.title = `${r} | ${f.current}`), () => {
|
|
242
|
+
t && (document.title = f.current);
|
|
243
|
+
}), [r, t]), S(() => {
|
|
244
|
+
if (m && t) {
|
|
245
|
+
x(
|
|
246
|
+
m ? u === C ? { opacity: 0 } : {
|
|
784
247
|
transform: "translateY(-666vh)"
|
|
785
248
|
} : {}
|
|
786
249
|
);
|
|
787
|
-
const
|
|
788
|
-
|
|
789
|
-
|
|
250
|
+
const I = setTimeout(() => {
|
|
251
|
+
x(
|
|
252
|
+
m ? u === "fade" ? { opacity: 1 } : {
|
|
790
253
|
transform: "translateY(0)"
|
|
791
254
|
} : {}
|
|
792
255
|
);
|
|
793
256
|
}, 100);
|
|
794
|
-
return () => clearTimeout(
|
|
257
|
+
return () => clearTimeout(I);
|
|
795
258
|
}
|
|
796
|
-
}, [
|
|
797
|
-
/* @__PURE__ */
|
|
798
|
-
/* @__PURE__ */
|
|
799
|
-
|
|
259
|
+
}, [t, m, u]), /* @__PURE__ */ l(L, { children: t && /* @__PURE__ */ l(H, { open: t, onOpenChange: e, children: /* @__PURE__ */ E(q, { className: h.main, style: v, children: [
|
|
260
|
+
/* @__PURE__ */ E("div", { className: "flex flex-row-reverse items-center justify-between", children: [
|
|
261
|
+
/* @__PURE__ */ l(
|
|
262
|
+
Q,
|
|
800
263
|
{
|
|
801
|
-
className:
|
|
802
|
-
trigger: /* @__PURE__ */
|
|
803
|
-
|
|
264
|
+
className: h.close,
|
|
265
|
+
trigger: /* @__PURE__ */ l(
|
|
266
|
+
O,
|
|
804
267
|
{
|
|
805
268
|
mode: "dark",
|
|
806
269
|
focusMode: "light",
|
|
807
270
|
noBorder: !0,
|
|
808
271
|
label: "Close",
|
|
809
|
-
children: /* @__PURE__ */
|
|
272
|
+
children: /* @__PURE__ */ l(j, { monotone: !0 })
|
|
810
273
|
}
|
|
811
274
|
)
|
|
812
275
|
}
|
|
813
276
|
),
|
|
814
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ l(J, { className: h.header, children: r })
|
|
815
278
|
] }),
|
|
816
|
-
/* @__PURE__ */
|
|
817
|
-
|
|
279
|
+
/* @__PURE__ */ l(K, { className: h.content, children: s }),
|
|
280
|
+
o && /* @__PURE__ */ l("div", { className: h.footer, children: o })
|
|
818
281
|
] }) }) });
|
|
819
282
|
};
|
|
820
283
|
export {
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
284
|
+
M as MESSAGEBOX_CLASSNAME,
|
|
285
|
+
_ as PANEL_CLASSNAME,
|
|
286
|
+
oe as Panel
|
|
824
287
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -50,14 +50,19 @@ type PanelProps = {
|
|
|
50
50
|
animationType?: "slide" | "fade";
|
|
51
51
|
/**
|
|
52
52
|
* The maximum width of the Panel when kind is "panel".
|
|
53
|
-
* NOTE: This
|
|
54
|
-
* NOTE: The max-width only takes effect at the medium breakpoint and above (768px+).
|
|
55
|
-
* At smaller viewports, the panel will take the full screen width.
|
|
53
|
+
* NOTE: This does not affect messageboxes, which have a fixed width.
|
|
56
54
|
* @default "medium"
|
|
57
55
|
*/
|
|
58
56
|
maxWidth?: "small" | "medium" | "large";
|
|
57
|
+
/**
|
|
58
|
+
* The maximum height of the Panel or Messagebox.
|
|
59
|
+
* For panels: defaults to "large" (95%) if not specified.
|
|
60
|
+
* For messageboxes: no max-height is applied unless explicitly set.
|
|
61
|
+
* @default "large" (for panels only)
|
|
62
|
+
*/
|
|
63
|
+
maxHeight?: "small" | "medium" | "large";
|
|
59
64
|
};
|
|
60
65
|
|
|
61
|
-
declare const Panel: ({ open, onOpenChange, title, children, footer, borderMode, kind, className, animation, animationType, maxWidth, }: PanelProps) => react_jsx_runtime.JSX.Element;
|
|
66
|
+
declare const Panel: ({ open, onOpenChange, title, children, footer, borderMode, kind, className, animation, animationType, maxWidth, maxHeight, }: PanelProps) => react_jsx_runtime.JSX.Element;
|
|
62
67
|
|
|
63
68
|
export { MESSAGEBOX_CLASSNAME, PANEL_CLASSNAME, Panel };
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { MESSAGEBOX_CLASSNAME as o, PANEL_CLASSNAME as E, Panel as n } from "./components/Panel/Panel.js";
|
|
2
2
|
/*!
|
|
3
|
-
@versini/ui-panel v3.
|
|
3
|
+
@versini/ui-panel v3.1.0
|
|
4
4
|
© 2025 gizmette.com
|
|
5
5
|
*/
|
|
6
6
|
try {
|
|
7
7
|
window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
|
|
8
|
-
version: "3.
|
|
9
|
-
buildTime: "
|
|
8
|
+
version: "3.1.0",
|
|
9
|
+
buildTime: "10/11/2025 12:42 PM EDT",
|
|
10
10
|
homepage: "https://github.com/aversini/ui-components",
|
|
11
11
|
license: "MIT"
|
|
12
12
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-panel",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -37,22 +37,22 @@
|
|
|
37
37
|
"test": "vitest run"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"react": "^19.
|
|
41
|
-
"react-dom": "^19.
|
|
40
|
+
"react": "^19.1.0",
|
|
41
|
+
"react-dom": "^19.1.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@testing-library/jest-dom": "6.8.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@tailwindcss/typography": "0.5.16",
|
|
48
|
-
"@versini/ui-button": "8.0.
|
|
48
|
+
"@versini/ui-button": "8.0.1",
|
|
49
49
|
"@versini/ui-icons": "4.11.0",
|
|
50
|
-
"@versini/ui-modal": "3.0.
|
|
50
|
+
"@versini/ui-modal": "3.0.1",
|
|
51
51
|
"clsx": "2.1.1",
|
|
52
52
|
"tailwindcss": "4.1.12"
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": [
|
|
55
55
|
"**/*.css"
|
|
56
56
|
],
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "731554d2c2fc2ae1c3c62ffbe09eba2b77308a70"
|
|
58
58
|
}
|