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