@versini/ui-bubble 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Bubble/Bubble.js +364 -346
- package/dist/index.js +3 -3
- package/package.json +6 -6
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as c, jsxs as B, Fragment as ae } from "react/jsx-runtime";
|
|
2
|
+
import j, { useRef as N, useLayoutEffect as F, useEffect as M, useState as G, useMemo as W, useCallback as oe } from "react";
|
|
3
3
|
import o from "clsx";
|
|
4
|
-
const
|
|
4
|
+
const R = "av-bubble", D = "av-button", H = "icon", Y = "button", U = "link", ie = ({
|
|
5
5
|
type: e,
|
|
6
|
-
size:
|
|
7
|
-
labelRight:
|
|
6
|
+
size: r,
|
|
7
|
+
labelRight: t,
|
|
8
8
|
labelLeft: a,
|
|
9
|
-
align:
|
|
10
|
-
animated:
|
|
9
|
+
align: i,
|
|
10
|
+
animated: l
|
|
11
11
|
}) => {
|
|
12
|
-
const n = "max-h-8 py-0 px-2",
|
|
12
|
+
const n = "max-h-8 py-0 px-2", d = "max-h-9 h-8 px-3", u = "max-h-12 py-2 px-4";
|
|
13
13
|
switch (e) {
|
|
14
|
-
case
|
|
15
|
-
case
|
|
14
|
+
case Y:
|
|
15
|
+
case U:
|
|
16
16
|
return o({
|
|
17
|
-
[n]:
|
|
18
|
-
[
|
|
19
|
-
[
|
|
17
|
+
[n]: r === "small",
|
|
18
|
+
[d]: r === "medium",
|
|
19
|
+
[u]: r === "large"
|
|
20
20
|
});
|
|
21
|
-
case
|
|
21
|
+
case H:
|
|
22
22
|
return o("flex items-center", {
|
|
23
|
-
"justify-center":
|
|
24
|
-
"justify-start":
|
|
25
|
-
"justify-end":
|
|
26
|
-
"h-6 w-6 p-0":
|
|
27
|
-
"h-6 px-2":
|
|
28
|
-
"h-8 w-8 p-1":
|
|
29
|
-
"h-8 px-3":
|
|
30
|
-
"h-12 w-12 p-2":
|
|
31
|
-
"h-12 px-4":
|
|
32
|
-
"h-6 py-0":
|
|
33
|
-
"h-6":
|
|
34
|
-
"h-8 py-1":
|
|
35
|
-
"h-8":
|
|
36
|
-
"h-12 py-2":
|
|
37
|
-
"h-12":
|
|
23
|
+
"justify-center": i === "center",
|
|
24
|
+
"justify-start": i === "left",
|
|
25
|
+
"justify-end": i === "right",
|
|
26
|
+
"h-6 w-6 p-0": r === "small" && !l && !(t || a),
|
|
27
|
+
"h-6 px-2": r === "small" && !l && (t || a),
|
|
28
|
+
"h-8 w-8 p-1": r === "medium" && !l && !(t || a),
|
|
29
|
+
"h-8 px-3": r === "medium" && !l && (t || a),
|
|
30
|
+
"h-12 w-12 p-2": r === "large" && !l && !(t || a),
|
|
31
|
+
"h-12 px-4": r === "large" && !l && (t || a),
|
|
32
|
+
"h-6 py-0": r === "small" && l && !(t || a),
|
|
33
|
+
"h-6": r === "small" && l && (t || a),
|
|
34
|
+
"h-8 py-1": r === "medium" && l && !(t || a),
|
|
35
|
+
"h-8": r === "medium" && l && (t || a),
|
|
36
|
+
"h-12 py-2": r === "large" && l && !(t || a),
|
|
37
|
+
"h-12": r === "large" && l && (t || a)
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
},
|
|
40
|
+
}, le = ({
|
|
41
41
|
type: e,
|
|
42
|
-
size:
|
|
43
|
-
labelRight:
|
|
42
|
+
size: r,
|
|
43
|
+
labelRight: t,
|
|
44
44
|
labelLeft: a
|
|
45
45
|
}) => {
|
|
46
|
-
const
|
|
46
|
+
const i = "text-sm font-medium", l = "text-base font-medium", n = "text-lg font-medium";
|
|
47
47
|
switch (e) {
|
|
48
|
-
case
|
|
49
|
-
case
|
|
48
|
+
case Y:
|
|
49
|
+
case U:
|
|
50
50
|
return o({
|
|
51
|
-
"text-center": e ===
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[n]:
|
|
51
|
+
"text-center": e === U,
|
|
52
|
+
[i]: r === "small",
|
|
53
|
+
[l]: r === "medium",
|
|
54
|
+
[n]: r === "large"
|
|
55
55
|
});
|
|
56
|
-
case
|
|
56
|
+
case H:
|
|
57
57
|
return o({
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
[n]:
|
|
58
|
+
[i]: r === "small" && (t || a),
|
|
59
|
+
[l]: r === "medium" && (t || a),
|
|
60
|
+
[n]: r === "large" && (t || a)
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
},
|
|
63
|
+
}, ne = ({
|
|
64
64
|
mode: e,
|
|
65
|
-
noBackground:
|
|
66
|
-
truncate:
|
|
65
|
+
noBackground: r,
|
|
66
|
+
truncate: t,
|
|
67
67
|
variant: a
|
|
68
68
|
}) => {
|
|
69
|
-
if (
|
|
69
|
+
if (r)
|
|
70
70
|
return "not-prose";
|
|
71
71
|
if (a === "primary")
|
|
72
72
|
return o("not-prose", {
|
|
73
|
-
truncate:
|
|
73
|
+
truncate: t,
|
|
74
74
|
"text-copy-light": e === "dark" || e === "system",
|
|
75
75
|
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
76
76
|
"dark:text-copy-lighter": e === "system",
|
|
@@ -78,7 +78,7 @@ const z = "av-bubble", A = "av-button", L = "icon", D = "button", V = "link", re
|
|
|
78
78
|
});
|
|
79
79
|
if (a === "secondary")
|
|
80
80
|
return o("not-prose", {
|
|
81
|
-
truncate:
|
|
81
|
+
truncate: t,
|
|
82
82
|
"text-copy-light": e === "light" || e === "system",
|
|
83
83
|
"text-copy-lighter": e === "dark" || e === "alt-system",
|
|
84
84
|
"dark:text-copy-lighter": e === "alt-system",
|
|
@@ -86,7 +86,7 @@ const z = "av-bubble", A = "av-button", L = "icon", D = "button", V = "link", re
|
|
|
86
86
|
});
|
|
87
87
|
if (a === "danger")
|
|
88
88
|
return o("not-prose", {
|
|
89
|
-
truncate:
|
|
89
|
+
truncate: t,
|
|
90
90
|
"text-copy-light": e === "dark" || e === "system",
|
|
91
91
|
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
92
92
|
"dark:text-copy-lighter": e === "system",
|
|
@@ -94,238 +94,238 @@ const z = "av-bubble", A = "av-button", L = "icon", D = "button", V = "link", re
|
|
|
94
94
|
});
|
|
95
95
|
if (a === "selected")
|
|
96
96
|
return o("not-prose text-copy-lighter", {
|
|
97
|
-
truncate:
|
|
97
|
+
truncate: t
|
|
98
98
|
});
|
|
99
|
-
},
|
|
99
|
+
}, ce = ({
|
|
100
100
|
mode: e,
|
|
101
|
-
noBackground:
|
|
102
|
-
variant:
|
|
101
|
+
noBackground: r,
|
|
102
|
+
variant: t
|
|
103
103
|
}) => {
|
|
104
|
-
if (!
|
|
105
|
-
if (
|
|
104
|
+
if (!r) {
|
|
105
|
+
if (t === "primary")
|
|
106
106
|
return o({
|
|
107
107
|
"bg-action-dark": e === "dark",
|
|
108
108
|
"bg-action-light": e === "light",
|
|
109
109
|
"bg-action-dark dark:bg-action-light": e === "system",
|
|
110
110
|
"bg-action-light dark:bg-action-dark": e === "alt-system"
|
|
111
111
|
});
|
|
112
|
-
if (
|
|
112
|
+
if (t === "secondary")
|
|
113
113
|
return o({
|
|
114
114
|
"bg-action-dark": e === "light",
|
|
115
115
|
"bg-action-light": e === "dark",
|
|
116
116
|
"bg-action-dark dark:bg-action-light": e === "alt-system",
|
|
117
117
|
"bg-action-light dark:bg-action-dark": e === "system"
|
|
118
118
|
});
|
|
119
|
-
if (
|
|
119
|
+
if (t === "danger")
|
|
120
120
|
return o({
|
|
121
121
|
"bg-action-danger-dark": e === "dark",
|
|
122
122
|
"bg-action-danger-light": e === "light",
|
|
123
123
|
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
124
124
|
"bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
|
|
125
125
|
});
|
|
126
|
-
if (
|
|
126
|
+
if (t === "selected")
|
|
127
127
|
return "bg-action-selected-dark";
|
|
128
128
|
}
|
|
129
|
-
},
|
|
129
|
+
}, se = ({
|
|
130
130
|
radius: e
|
|
131
131
|
}) => o({
|
|
132
132
|
"rounded-full": e === "large",
|
|
133
133
|
"rounded-md": e === "medium",
|
|
134
134
|
"rounded-xs": e === "small"
|
|
135
|
-
}),
|
|
135
|
+
}), de = ({
|
|
136
136
|
mode: e,
|
|
137
|
-
disabled:
|
|
138
|
-
variant:
|
|
137
|
+
disabled: r,
|
|
138
|
+
variant: t
|
|
139
139
|
}) => {
|
|
140
|
-
if (
|
|
140
|
+
if (r)
|
|
141
141
|
return "";
|
|
142
|
-
if (
|
|
142
|
+
if (t === "primary")
|
|
143
143
|
return o("hover:text-copy-light-hover", {
|
|
144
144
|
"hover:bg-action-dark-hover": e === "dark",
|
|
145
145
|
"hover:bg-action-light-hover": e === "light",
|
|
146
146
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
147
147
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
148
148
|
});
|
|
149
|
-
if (
|
|
149
|
+
if (t === "secondary")
|
|
150
150
|
return o("hover:text-copy-light-hover", {
|
|
151
151
|
"hover:bg-action-dark-hover": e === "light",
|
|
152
152
|
"hover:bg-action-light-hover": e === "dark",
|
|
153
153
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
154
154
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
155
155
|
});
|
|
156
|
-
if (
|
|
156
|
+
if (t === "danger")
|
|
157
157
|
return o("hover:text-copy-light-hover", {
|
|
158
158
|
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
159
159
|
"hover:bg-action-danger-light-hover": e === "light",
|
|
160
160
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
161
161
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
162
162
|
});
|
|
163
|
-
if (
|
|
163
|
+
if (t === "selected")
|
|
164
164
|
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
165
|
-
},
|
|
165
|
+
}, ue = ({
|
|
166
166
|
mode: e,
|
|
167
|
-
disabled:
|
|
168
|
-
variant:
|
|
167
|
+
disabled: r,
|
|
168
|
+
variant: t
|
|
169
169
|
}) => {
|
|
170
|
-
if (
|
|
170
|
+
if (r)
|
|
171
171
|
return "";
|
|
172
|
-
if (
|
|
172
|
+
if (t === "primary")
|
|
173
173
|
return o("active:text-copy-light-active", {
|
|
174
174
|
"active:bg-action-dark-active": e === "dark",
|
|
175
175
|
"active:bg-action-light-active": e === "light",
|
|
176
176
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
177
177
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
178
178
|
});
|
|
179
|
-
if (
|
|
179
|
+
if (t === "secondary")
|
|
180
180
|
return o("active:text-copy-light-active", {
|
|
181
181
|
"active:bg-action-dark-active": e === "light",
|
|
182
182
|
"active:bg-action-light-active": e === "dark",
|
|
183
183
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
184
184
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
185
185
|
});
|
|
186
|
-
if (
|
|
186
|
+
if (t === "danger")
|
|
187
187
|
return o("active:text-copy-lighter-active", {
|
|
188
188
|
"active:bg-action-danger-dark-active": e === "dark",
|
|
189
189
|
"active:bg-action-danger-light-active": e === "light",
|
|
190
190
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
191
191
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
192
192
|
});
|
|
193
|
-
if (
|
|
193
|
+
if (t === "selected")
|
|
194
194
|
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
195
|
-
},
|
|
195
|
+
}, be = ({
|
|
196
196
|
mode: e,
|
|
197
|
-
noBorder:
|
|
198
|
-
variant:
|
|
197
|
+
noBorder: r,
|
|
198
|
+
variant: t
|
|
199
199
|
}) => {
|
|
200
|
-
if (
|
|
200
|
+
if (r)
|
|
201
201
|
return "border border-transparent";
|
|
202
|
-
if (
|
|
202
|
+
if (t === "primary")
|
|
203
203
|
return o("border", {
|
|
204
204
|
"border-border-dark": e === "dark",
|
|
205
205
|
"border-border-accent": e === "light",
|
|
206
206
|
"border-border-dark dark:border-border-accent": e === "system",
|
|
207
207
|
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
208
208
|
});
|
|
209
|
-
if (
|
|
209
|
+
if (t === "secondary")
|
|
210
210
|
return o("border", {
|
|
211
211
|
"border-border-dark": e === "light",
|
|
212
212
|
"border-border-accent": e === "dark",
|
|
213
213
|
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
214
214
|
"border-border-accent dark:border-border-dark": e === "system"
|
|
215
215
|
});
|
|
216
|
-
if (
|
|
216
|
+
if (t === "danger")
|
|
217
217
|
return o("border", {
|
|
218
218
|
"border-border-danger-dark": e === "dark",
|
|
219
219
|
"border-border-danger-medium": e === "light",
|
|
220
220
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
221
221
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
222
222
|
});
|
|
223
|
-
if (
|
|
223
|
+
if (t === "selected")
|
|
224
224
|
return "border border-border-selected-dark";
|
|
225
|
-
},
|
|
225
|
+
}, ge = ({
|
|
226
226
|
focusMode: e
|
|
227
227
|
}) => o("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
228
228
|
"focus:outline-focus-dark": e === "dark",
|
|
229
229
|
"focus:outline-focus-light": e === "light",
|
|
230
230
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
231
231
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
232
|
-
}),
|
|
232
|
+
}), me = ({
|
|
233
233
|
mode: e,
|
|
234
|
-
raw:
|
|
235
|
-
iconClassName:
|
|
236
|
-
}) =>
|
|
234
|
+
raw: r,
|
|
235
|
+
iconClassName: t
|
|
236
|
+
}) => r ? "" : o(
|
|
237
237
|
{
|
|
238
238
|
"text-copy-accent-dark": e === "light" || e === "alt-system",
|
|
239
239
|
"text-copy-light": e === "dark" || e === "system",
|
|
240
240
|
"dark:text-copy-light": e === "alt-system",
|
|
241
241
|
"dark:text-copy-accent-dark": e === "system"
|
|
242
242
|
},
|
|
243
|
-
|
|
244
|
-
),
|
|
243
|
+
t
|
|
244
|
+
), he = ({
|
|
245
245
|
animated: e
|
|
246
246
|
}) => o({
|
|
247
|
-
"transition-opacity duration-300 ease-in": e
|
|
248
|
-
}),
|
|
247
|
+
"transition-opacity duration-300 ease-in-out": e
|
|
248
|
+
}), fe = ({
|
|
249
249
|
type: e,
|
|
250
|
-
className:
|
|
251
|
-
raw:
|
|
250
|
+
className: r,
|
|
251
|
+
raw: t,
|
|
252
252
|
mode: a,
|
|
253
|
-
focusMode:
|
|
254
|
-
disabled:
|
|
253
|
+
focusMode: i,
|
|
254
|
+
disabled: l,
|
|
255
255
|
fullWidth: n,
|
|
256
|
-
size:
|
|
257
|
-
noBorder:
|
|
258
|
-
labelRight:
|
|
259
|
-
labelLeft:
|
|
260
|
-
noBackground:
|
|
256
|
+
size: d,
|
|
257
|
+
noBorder: u,
|
|
258
|
+
labelRight: v,
|
|
259
|
+
labelLeft: k,
|
|
260
|
+
noBackground: s,
|
|
261
261
|
variant: b,
|
|
262
262
|
truncate: g,
|
|
263
|
-
align:
|
|
264
|
-
radius:
|
|
263
|
+
align: _,
|
|
264
|
+
radius: I,
|
|
265
265
|
animated: m
|
|
266
|
-
}) => (b || (b = "primary"),
|
|
267
|
-
|
|
268
|
-
|
|
266
|
+
}) => (b || (b = "primary"), t ? o(D, r) : o(
|
|
267
|
+
D,
|
|
268
|
+
ne({
|
|
269
269
|
mode: a,
|
|
270
270
|
variant: b,
|
|
271
|
-
noBackground:
|
|
271
|
+
noBackground: s,
|
|
272
272
|
truncate: g
|
|
273
273
|
}),
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
274
|
+
ce({ mode: a, noBackground: s, variant: b }),
|
|
275
|
+
se({ radius: I }),
|
|
276
|
+
ie({
|
|
277
277
|
type: e,
|
|
278
|
-
size:
|
|
279
|
-
labelRight:
|
|
280
|
-
labelLeft:
|
|
281
|
-
align:
|
|
278
|
+
size: d,
|
|
279
|
+
labelRight: v,
|
|
280
|
+
labelLeft: k,
|
|
281
|
+
align: _,
|
|
282
282
|
animated: m
|
|
283
283
|
}),
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
284
|
+
le({ type: e, size: d, labelRight: v, labelLeft: k }),
|
|
285
|
+
be({ mode: a, variant: b, noBorder: u }),
|
|
286
|
+
ge({ focusMode: i }),
|
|
287
|
+
de({ mode: a, variant: b, disabled: l }),
|
|
288
|
+
ue({ mode: a, variant: b, disabled: l }),
|
|
289
289
|
{
|
|
290
290
|
"w-full": n,
|
|
291
|
-
"disabled:cursor-not-allowed disabled:opacity-50":
|
|
291
|
+
"disabled:cursor-not-allowed disabled:opacity-50": l
|
|
292
292
|
},
|
|
293
293
|
o({
|
|
294
|
-
"transition-[width] duration-300 ease-in
|
|
294
|
+
"transition-[width] duration-300 ease-in": m
|
|
295
295
|
}),
|
|
296
|
-
|
|
297
|
-
)),
|
|
296
|
+
r
|
|
297
|
+
)), ve = (e, r, t) => {
|
|
298
298
|
var a;
|
|
299
|
-
!
|
|
300
|
-
},
|
|
301
|
-
const { onClick:
|
|
302
|
-
return /* @__PURE__ */
|
|
299
|
+
!r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
|
|
300
|
+
}, J = j.forwardRef((e, r) => {
|
|
301
|
+
const { onClick: t, noInternalClick: a = !1, ...i } = e;
|
|
302
|
+
return /* @__PURE__ */ c(
|
|
303
303
|
"button",
|
|
304
304
|
{
|
|
305
|
-
ref:
|
|
306
|
-
onClick: (
|
|
307
|
-
|
|
305
|
+
ref: r,
|
|
306
|
+
onClick: (l) => {
|
|
307
|
+
ve(l, a, t);
|
|
308
308
|
},
|
|
309
|
-
...
|
|
309
|
+
...i
|
|
310
310
|
}
|
|
311
311
|
);
|
|
312
312
|
});
|
|
313
|
-
|
|
314
|
-
function
|
|
315
|
-
const e =
|
|
316
|
-
return
|
|
313
|
+
J.displayName = "BaseButton";
|
|
314
|
+
function ye() {
|
|
315
|
+
const e = N(!1);
|
|
316
|
+
return M(() => (e.current = !0, () => {
|
|
317
317
|
e.current = !1;
|
|
318
|
-
}), []),
|
|
318
|
+
}), []), oe(() => e.current, []);
|
|
319
319
|
}
|
|
320
|
-
function
|
|
321
|
-
return
|
|
322
|
-
} : (
|
|
323
|
-
e.forEach((
|
|
324
|
-
typeof
|
|
320
|
+
function pe(e) {
|
|
321
|
+
return W(() => e.every((r) => r == null) ? () => {
|
|
322
|
+
} : (r) => {
|
|
323
|
+
e.forEach((t) => {
|
|
324
|
+
typeof t == "function" ? t(r) : t != null && (t.current = r);
|
|
325
325
|
});
|
|
326
326
|
}, e);
|
|
327
327
|
}
|
|
328
|
-
const
|
|
328
|
+
const ke = {
|
|
329
329
|
x: 0,
|
|
330
330
|
y: 0,
|
|
331
331
|
width: 0,
|
|
@@ -335,147 +335,165 @@ const fe = {
|
|
|
335
335
|
bottom: 0,
|
|
336
336
|
right: 0
|
|
337
337
|
};
|
|
338
|
-
function
|
|
339
|
-
const
|
|
340
|
-
const
|
|
341
|
-
|
|
342
|
-
a.current &&
|
|
338
|
+
function O(e) {
|
|
339
|
+
const r = ye(), t = N(0), a = N(null), [i, l] = G(ke), n = W(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
|
|
340
|
+
const u = d[0];
|
|
341
|
+
u && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
|
|
342
|
+
a.current && r() && l(u.contentRect);
|
|
343
343
|
}));
|
|
344
|
-
}), [
|
|
345
|
-
return
|
|
346
|
-
n == null || n.disconnect(),
|
|
347
|
-
}), [n, e]), [a,
|
|
344
|
+
}), [r]);
|
|
345
|
+
return M(() => (a.current && (n == null || n.observe(a.current, e)), () => {
|
|
346
|
+
n == null || n.disconnect(), t.current && cancelAnimationFrame(t.current);
|
|
347
|
+
}), [n, e]), [a, i];
|
|
348
348
|
}
|
|
349
|
-
const
|
|
349
|
+
const z = {
|
|
350
350
|
small: 24,
|
|
351
351
|
// w-6
|
|
352
352
|
medium: 32,
|
|
353
353
|
// w-8
|
|
354
354
|
large: 48
|
|
355
355
|
// w-12
|
|
356
|
-
},
|
|
356
|
+
}, xe = {
|
|
357
357
|
small: 8 * 2,
|
|
358
358
|
// px-2 x 2
|
|
359
359
|
medium: 12 * 2,
|
|
360
360
|
// px-3 x 2
|
|
361
361
|
large: 16 * 2
|
|
362
362
|
// px-4 x 2
|
|
363
|
-
},
|
|
363
|
+
}, we = 2, Be = 300, $ = j.forwardRef(
|
|
364
364
|
({
|
|
365
365
|
children: e,
|
|
366
|
-
disabled:
|
|
367
|
-
mode:
|
|
366
|
+
disabled: r = !1,
|
|
367
|
+
mode: t = "system",
|
|
368
368
|
focusMode: a = "system",
|
|
369
|
-
fullWidth:
|
|
370
|
-
className:
|
|
369
|
+
fullWidth: i = !1,
|
|
370
|
+
className: l,
|
|
371
371
|
type: n = "button",
|
|
372
|
-
raw:
|
|
373
|
-
noBorder:
|
|
374
|
-
"aria-label":
|
|
375
|
-
label:
|
|
376
|
-
size:
|
|
372
|
+
raw: d = !1,
|
|
373
|
+
noBorder: u = !1,
|
|
374
|
+
"aria-label": v,
|
|
375
|
+
label: k,
|
|
376
|
+
size: s = "medium",
|
|
377
377
|
labelRight: b,
|
|
378
378
|
labelLeft: g,
|
|
379
|
-
noBackground:
|
|
380
|
-
align:
|
|
379
|
+
noBackground: _ = !1,
|
|
380
|
+
align: I = "center",
|
|
381
381
|
radius: m = "large",
|
|
382
|
-
variant:
|
|
383
|
-
iconClassName:
|
|
384
|
-
animated:
|
|
385
|
-
...
|
|
382
|
+
variant: T = "primary",
|
|
383
|
+
iconClassName: C,
|
|
384
|
+
animated: y = !1,
|
|
385
|
+
...Q
|
|
386
386
|
}, X) => {
|
|
387
|
-
const Z =
|
|
388
|
-
type:
|
|
389
|
-
mode:
|
|
387
|
+
const Z = fe({
|
|
388
|
+
type: H,
|
|
389
|
+
mode: t,
|
|
390
390
|
focusMode: a,
|
|
391
|
-
fullWidth:
|
|
392
|
-
disabled:
|
|
393
|
-
raw:
|
|
394
|
-
className:
|
|
395
|
-
noBorder:
|
|
396
|
-
size:
|
|
391
|
+
fullWidth: i,
|
|
392
|
+
disabled: r,
|
|
393
|
+
raw: d,
|
|
394
|
+
className: l,
|
|
395
|
+
noBorder: u,
|
|
396
|
+
size: s,
|
|
397
397
|
labelRight: b,
|
|
398
398
|
labelLeft: g,
|
|
399
|
-
noBackground:
|
|
400
|
-
align:
|
|
399
|
+
noBackground: _,
|
|
400
|
+
align: I,
|
|
401
401
|
radius: m,
|
|
402
|
-
variant:
|
|
403
|
-
animated:
|
|
404
|
-
}),
|
|
405
|
-
return
|
|
406
|
-
|
|
407
|
-
}, [
|
|
408
|
-
|
|
402
|
+
variant: T,
|
|
403
|
+
animated: y
|
|
404
|
+
}), ee = me({ mode: t, raw: d, iconClassName: C }), A = he({ animated: y }), te = "flex items-center justify-center relative w-full h-full overflow-hidden", [h, S] = O(), [f, V] = O(), [E, P] = O(), L = N(0), p = N(null), x = N(null), re = pe([X, p]);
|
|
405
|
+
return F(() => {
|
|
406
|
+
E && E.current && y && (L.current = P.width + xe[s] + (u ? 0 : we), p.current && !p.current.style.width && (p.current.style.width = `${z[s]}px`));
|
|
407
|
+
}, [P, E, s, u, y]), F(() => {
|
|
408
|
+
if (p && p.current && y) {
|
|
409
|
+
let w = z[s];
|
|
410
|
+
b && h && S.width > 0 ? w = S.width + L.current : g && f && V.width > 0 && (w = V.width + L.current), x.current && clearTimeout(x.current), w !== parseInt(p.current.style.width || "0", 10) && (h.current && (h.current.style.opacity = "0"), f.current && (f.current.style.opacity = "0"), p.current.style.width = `${w}px`, w > z[s] && (x.current = setTimeout(() => {
|
|
411
|
+
h.current && b && (h.current.style.opacity = "1"), f.current && g && (f.current.style.opacity = "1"), x.current = null;
|
|
412
|
+
}, Be * 0.8))), w === z[s] && (h.current && (h.current.style.opacity = "0"), f.current && (f.current.style.opacity = "0"));
|
|
413
|
+
}
|
|
409
414
|
}, [
|
|
410
|
-
|
|
415
|
+
S,
|
|
411
416
|
b,
|
|
412
|
-
|
|
413
|
-
|
|
417
|
+
h,
|
|
418
|
+
V,
|
|
414
419
|
g,
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
]),
|
|
419
|
-
|
|
420
|
+
f,
|
|
421
|
+
s,
|
|
422
|
+
y
|
|
423
|
+
]), M(() => () => {
|
|
424
|
+
x.current && clearTimeout(x.current);
|
|
425
|
+
}, []), /* @__PURE__ */ c(
|
|
426
|
+
J,
|
|
420
427
|
{
|
|
421
|
-
ref:
|
|
428
|
+
ref: re,
|
|
422
429
|
className: Z,
|
|
423
|
-
disabled:
|
|
430
|
+
disabled: r,
|
|
424
431
|
type: n,
|
|
425
|
-
"aria-label":
|
|
426
|
-
...
|
|
427
|
-
children: [
|
|
428
|
-
/* @__PURE__ */
|
|
429
|
-
|
|
432
|
+
"aria-label": v || k,
|
|
433
|
+
...Q,
|
|
434
|
+
children: /* @__PURE__ */ B("div", { className: te, children: [
|
|
435
|
+
/* @__PURE__ */ c(
|
|
436
|
+
q,
|
|
430
437
|
{
|
|
431
438
|
label: g,
|
|
432
|
-
labelRef:
|
|
433
|
-
labelClass:
|
|
434
|
-
labelInnerClass: "pr-2"
|
|
439
|
+
labelRef: f,
|
|
440
|
+
labelClass: A,
|
|
441
|
+
labelInnerClass: "pr-2",
|
|
442
|
+
initiallyHidden: y
|
|
435
443
|
}
|
|
436
444
|
),
|
|
437
|
-
/* @__PURE__ */
|
|
438
|
-
/* @__PURE__ */
|
|
439
|
-
|
|
445
|
+
/* @__PURE__ */ c("span", { ref: E, className: ee, children: e }),
|
|
446
|
+
/* @__PURE__ */ c(
|
|
447
|
+
q,
|
|
440
448
|
{
|
|
441
449
|
label: b,
|
|
442
|
-
labelRef:
|
|
443
|
-
labelClass:
|
|
444
|
-
labelInnerClass: "pl-2"
|
|
450
|
+
labelRef: h,
|
|
451
|
+
labelClass: A,
|
|
452
|
+
labelInnerClass: "pl-2",
|
|
453
|
+
initiallyHidden: y
|
|
445
454
|
}
|
|
446
455
|
)
|
|
447
|
-
]
|
|
456
|
+
] })
|
|
448
457
|
}
|
|
449
458
|
);
|
|
450
459
|
}
|
|
451
|
-
),
|
|
460
|
+
), q = ({
|
|
452
461
|
labelRef: e,
|
|
453
|
-
labelClass:
|
|
454
|
-
label:
|
|
455
|
-
labelInnerClass: a
|
|
456
|
-
|
|
457
|
-
|
|
462
|
+
labelClass: r,
|
|
463
|
+
label: t,
|
|
464
|
+
labelInnerClass: a,
|
|
465
|
+
initiallyHidden: i = !1
|
|
466
|
+
}) => /* @__PURE__ */ c(
|
|
467
|
+
"span",
|
|
468
|
+
{
|
|
469
|
+
ref: e,
|
|
470
|
+
className: r,
|
|
471
|
+
style: i ? { opacity: 0 } : void 0,
|
|
472
|
+
children: t && /* @__PURE__ */ c("span", { className: a, children: t })
|
|
473
|
+
}
|
|
474
|
+
);
|
|
475
|
+
$.displayName = "ButtonIcon";
|
|
458
476
|
/*!
|
|
459
|
-
@versini/ui-button v6.0.
|
|
477
|
+
@versini/ui-button v6.0.6
|
|
460
478
|
© 2025 gizmette.com
|
|
461
479
|
*/
|
|
462
480
|
try {
|
|
463
481
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
464
|
-
version: "6.0.
|
|
465
|
-
buildTime: "
|
|
482
|
+
version: "6.0.6",
|
|
483
|
+
buildTime: "05/26/2025 03:48 PM EDT",
|
|
466
484
|
homepage: "https://github.com/aversini/ui-components",
|
|
467
485
|
license: "MIT"
|
|
468
486
|
});
|
|
469
487
|
} catch {
|
|
470
488
|
}
|
|
471
|
-
const
|
|
489
|
+
const Ne = j.forwardRef(
|
|
472
490
|
({
|
|
473
491
|
children: e,
|
|
474
|
-
mode:
|
|
475
|
-
className:
|
|
492
|
+
mode: r = "system",
|
|
493
|
+
className: t,
|
|
476
494
|
active: a = !1,
|
|
477
|
-
...
|
|
478
|
-
},
|
|
495
|
+
...i
|
|
496
|
+
}, l) => {
|
|
479
497
|
const n = a ? o(
|
|
480
498
|
"relative",
|
|
481
499
|
"focus-within:static",
|
|
@@ -487,51 +505,51 @@ const ke = S.forwardRef(
|
|
|
487
505
|
"after:left-0",
|
|
488
506
|
"after:right-0",
|
|
489
507
|
{
|
|
490
|
-
"after:border-table-dark":
|
|
491
|
-
"after:border-table-light":
|
|
492
|
-
"after:border-table-dark dark:after:border-table-light":
|
|
493
|
-
"after:border-table-light dark:after:border-table-dark":
|
|
508
|
+
"after:border-table-dark": r === "dark",
|
|
509
|
+
"after:border-table-light": r === "light",
|
|
510
|
+
"after:border-table-dark dark:after:border-table-light": r === "system",
|
|
511
|
+
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
494
512
|
}
|
|
495
513
|
) : "";
|
|
496
|
-
return /* @__PURE__ */
|
|
497
|
-
|
|
514
|
+
return /* @__PURE__ */ c("div", { className: n, children: /* @__PURE__ */ c(
|
|
515
|
+
$,
|
|
498
516
|
{
|
|
499
|
-
className: o("justify-center",
|
|
500
|
-
ref:
|
|
501
|
-
mode:
|
|
517
|
+
className: o("justify-center", t),
|
|
518
|
+
ref: l,
|
|
519
|
+
mode: r,
|
|
502
520
|
radius: "small",
|
|
503
|
-
...
|
|
521
|
+
...i,
|
|
504
522
|
children: e
|
|
505
523
|
}
|
|
506
524
|
) });
|
|
507
525
|
}
|
|
508
526
|
);
|
|
509
|
-
|
|
510
|
-
const
|
|
527
|
+
Ne.displayName = "ButtonSort";
|
|
528
|
+
const K = ({
|
|
511
529
|
children: e,
|
|
512
|
-
fill:
|
|
513
|
-
viewBox:
|
|
530
|
+
fill: r,
|
|
531
|
+
viewBox: t,
|
|
514
532
|
className: a,
|
|
515
|
-
defaultViewBox:
|
|
516
|
-
size:
|
|
533
|
+
defaultViewBox: i,
|
|
534
|
+
size: l,
|
|
517
535
|
title: n,
|
|
518
|
-
semantic:
|
|
519
|
-
...
|
|
536
|
+
semantic: d = !1,
|
|
537
|
+
...u
|
|
520
538
|
}) => {
|
|
521
|
-
const
|
|
522
|
-
return /* @__PURE__ */
|
|
539
|
+
const v = o(l, a);
|
|
540
|
+
return /* @__PURE__ */ c(ae, { children: /* @__PURE__ */ B(
|
|
523
541
|
"svg",
|
|
524
542
|
{
|
|
525
543
|
xmlns: "http://www.w3.org/2000/svg",
|
|
526
|
-
className:
|
|
527
|
-
viewBox:
|
|
528
|
-
fill:
|
|
544
|
+
className: v,
|
|
545
|
+
viewBox: t || i,
|
|
546
|
+
fill: r || "currentColor",
|
|
529
547
|
role: "img",
|
|
530
|
-
"aria-hidden": !
|
|
548
|
+
"aria-hidden": !d,
|
|
531
549
|
focusable: !1,
|
|
532
|
-
...
|
|
550
|
+
...u,
|
|
533
551
|
children: [
|
|
534
|
-
n &&
|
|
552
|
+
n && d && /* @__PURE__ */ c("title", { children: n }),
|
|
535
553
|
e
|
|
536
554
|
]
|
|
537
555
|
}
|
|
@@ -544,86 +562,86 @@ const W = ({
|
|
|
544
562
|
try {
|
|
545
563
|
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
546
564
|
version: "4.2.0",
|
|
547
|
-
buildTime: "
|
|
565
|
+
buildTime: "05/17/2025 06:18 PM EDT",
|
|
548
566
|
homepage: "https://github.com/aversini/ui-components",
|
|
549
567
|
license: "MIT"
|
|
550
568
|
});
|
|
551
569
|
} catch {
|
|
552
570
|
}
|
|
553
|
-
const
|
|
571
|
+
const _e = ({
|
|
554
572
|
className: e,
|
|
555
|
-
viewBox:
|
|
556
|
-
title:
|
|
573
|
+
viewBox: r,
|
|
574
|
+
title: t,
|
|
557
575
|
monotone: a,
|
|
558
|
-
...
|
|
559
|
-
}) => /* @__PURE__ */
|
|
560
|
-
|
|
576
|
+
...i
|
|
577
|
+
}) => /* @__PURE__ */ B(
|
|
578
|
+
K,
|
|
561
579
|
{
|
|
562
580
|
defaultViewBox: "0 0 448 512",
|
|
563
581
|
size: "size-5",
|
|
564
|
-
viewBox:
|
|
582
|
+
viewBox: r,
|
|
565
583
|
className: e,
|
|
566
|
-
title:
|
|
567
|
-
...
|
|
584
|
+
title: t || "Copied",
|
|
585
|
+
...i,
|
|
568
586
|
children: [
|
|
569
|
-
/* @__PURE__ */
|
|
587
|
+
/* @__PURE__ */ c(
|
|
570
588
|
"path",
|
|
571
589
|
{
|
|
572
590
|
d: "M0 96v320c0 35.3 28.7 64 64 64h320c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96m104 160c0-6.1 2.3-12.3 7-17 9.4-9.4 24.6-9.4 33.9 0l47 47 111-111c4.7-4.7 10.8-7 17-7s12.3 2.3 17 7c2.3 2.3 4.1 5 5.3 7.9.6 1.5 1 2.9 1.3 4.4.2 1.1.3 2.2.3 2.2.1 1.2.1 1.2.1 2.5-.1 1.5-.1 1.9-.1 2.3-.1.7-.2 1.5-.3 2.2-.3 1.5-.7 3-1.3 4.4-1.2 2.9-2.9 5.6-5.3 7.9l-128 128c-4.7 4.7-10.8 7-17 7s-12.3-2.3-17-7l-64-64c-4.7-4.7-7-10.8-7-17z",
|
|
573
591
|
opacity: ".4"
|
|
574
592
|
}
|
|
575
593
|
),
|
|
576
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ c("path", { d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z" })
|
|
577
595
|
]
|
|
578
596
|
}
|
|
579
|
-
),
|
|
597
|
+
), Ie = ({
|
|
580
598
|
className: e,
|
|
581
|
-
viewBox:
|
|
582
|
-
title:
|
|
599
|
+
viewBox: r,
|
|
600
|
+
title: t,
|
|
583
601
|
monotone: a,
|
|
584
|
-
...
|
|
585
|
-
}) => /* @__PURE__ */
|
|
586
|
-
|
|
602
|
+
...i
|
|
603
|
+
}) => /* @__PURE__ */ c(
|
|
604
|
+
K,
|
|
587
605
|
{
|
|
588
606
|
defaultViewBox: "0 0 512 512",
|
|
589
607
|
size: "size-5",
|
|
590
|
-
viewBox:
|
|
608
|
+
viewBox: r,
|
|
591
609
|
className: e,
|
|
592
|
-
title:
|
|
593
|
-
...
|
|
594
|
-
children: /* @__PURE__ */
|
|
610
|
+
title: t || "Copy",
|
|
611
|
+
...i,
|
|
612
|
+
children: /* @__PURE__ */ c("path", { d: "M64 464h224c8.8 0 16-7.2 16-16v-64h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16m160-160h224c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16m-64-16V64c0-35.3 28.7-64 64-64h224c35.3 0 64 28.7 64 64v224c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64" })
|
|
595
613
|
}
|
|
596
614
|
);
|
|
597
615
|
/*!
|
|
598
|
-
@versini/ui-icons v4.
|
|
616
|
+
@versini/ui-icons v4.10.0
|
|
599
617
|
© 2025 gizmette.com
|
|
600
618
|
*/
|
|
601
619
|
try {
|
|
602
620
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
603
|
-
version: "4.
|
|
604
|
-
buildTime: "
|
|
621
|
+
version: "4.10.0",
|
|
622
|
+
buildTime: "05/17/2025 06:18 PM EDT",
|
|
605
623
|
homepage: "https://github.com/aversini/ui-components",
|
|
606
624
|
license: "MIT"
|
|
607
625
|
});
|
|
608
626
|
} catch {
|
|
609
627
|
}
|
|
610
|
-
const
|
|
611
|
-
"max-w-xs sm:max-w-md md:max-w-2xl": !
|
|
612
|
-
"lg:max-w-3xl": e === "left" && !
|
|
613
|
-
}),
|
|
628
|
+
const Ce = ({ kind: e, noMaxWidth: r }) => o("px-4 py-2", {
|
|
629
|
+
"max-w-xs sm:max-w-md md:max-w-2xl": !r,
|
|
630
|
+
"lg:max-w-3xl": e === "left" && !r
|
|
631
|
+
}), Te = ({ kind: e }) => o({
|
|
614
632
|
"bg-surface-lighter dark:bg-surface-dark": e === "left",
|
|
615
633
|
"bg-surface-accent": e === "right"
|
|
616
|
-
}),
|
|
634
|
+
}), Ee = ({ kind: e }) => o(
|
|
617
635
|
"prose prose-dark dark:prose-lighter",
|
|
618
636
|
"prose-blockquote:my-1",
|
|
619
637
|
"prose-ol:my-1 prose-ul:my-1",
|
|
620
638
|
{
|
|
621
639
|
"text-copy-lighter": e === "right"
|
|
622
640
|
}
|
|
623
|
-
),
|
|
624
|
-
if (
|
|
641
|
+
), ze = ({ kind: e, tail: r }) => {
|
|
642
|
+
if (r)
|
|
625
643
|
return o(
|
|
626
|
-
`${
|
|
644
|
+
`${R}-${e}-tail`,
|
|
627
645
|
"rounded-3xl",
|
|
628
646
|
"relative",
|
|
629
647
|
"before:content-['']",
|
|
@@ -636,106 +654,106 @@ const Be = ({ kind: e, noMaxWidth: t }) => o("px-4 py-2", {
|
|
|
636
654
|
"last-bubble-left:before:left-[2px] last-bubble-left:before:border-r-[8px] last-bubble-left:before:border-r-surface-lighter last-bubble-left:dark:before:border-r-surface-dark last-bubble-left:before:rounded-br-[100%]": e === "left"
|
|
637
655
|
}
|
|
638
656
|
);
|
|
639
|
-
if (!
|
|
657
|
+
if (!r)
|
|
640
658
|
return o("rounded-b-xl", {
|
|
641
659
|
"rounded-tr-xl": e === "left",
|
|
642
660
|
"rounded-tl-xl": e === "right"
|
|
643
661
|
});
|
|
644
|
-
},
|
|
662
|
+
}, Re = ({
|
|
645
663
|
kind: e,
|
|
646
|
-
className:
|
|
647
|
-
contentClassName:
|
|
664
|
+
className: r,
|
|
665
|
+
contentClassName: t,
|
|
648
666
|
noMaxWidth: a,
|
|
649
|
-
tail:
|
|
667
|
+
tail: i
|
|
650
668
|
}) => {
|
|
651
|
-
const
|
|
652
|
-
|
|
653
|
-
`${
|
|
669
|
+
const l = o(
|
|
670
|
+
R,
|
|
671
|
+
`${R}-${e}`,
|
|
654
672
|
"flex items-start",
|
|
655
673
|
{
|
|
656
674
|
"flex-row-reverse": e === "right"
|
|
657
675
|
},
|
|
658
|
-
|
|
676
|
+
r
|
|
659
677
|
), n = o(
|
|
660
|
-
`${
|
|
678
|
+
`${R}-content`,
|
|
661
679
|
"flex flex-col empty:hidden",
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
),
|
|
668
|
-
"ml-2": e === "left" && !
|
|
669
|
-
"mr-2": e === "right" && !
|
|
670
|
-
"ml-1": e === "left" &&
|
|
671
|
-
"mr-1": e === "right" &&
|
|
680
|
+
Ce({ kind: e, noMaxWidth: a }),
|
|
681
|
+
Ee({ kind: e }),
|
|
682
|
+
Te({ kind: e }),
|
|
683
|
+
ze({ kind: e, tail: i }),
|
|
684
|
+
t
|
|
685
|
+
), d = "pr-2 pt-1 text-end text-xs text-copy-light", u = o("flex flex-col-reverse sm:flex-row", {
|
|
686
|
+
"ml-2": e === "left" && !i,
|
|
687
|
+
"mr-2": e === "right" && !i,
|
|
688
|
+
"ml-1": e === "left" && i,
|
|
689
|
+
"mr-1": e === "right" && i
|
|
672
690
|
});
|
|
673
691
|
return {
|
|
674
|
-
wrapper:
|
|
692
|
+
wrapper: l,
|
|
675
693
|
main: n,
|
|
676
|
-
footer:
|
|
677
|
-
copyButton:
|
|
694
|
+
footer: d,
|
|
695
|
+
copyButton: u
|
|
678
696
|
};
|
|
679
|
-
},
|
|
697
|
+
}, Me = "FOOTER_EMPTY", Oe = ({
|
|
680
698
|
children: e,
|
|
681
|
-
kind:
|
|
682
|
-
className:
|
|
699
|
+
kind: r = "left",
|
|
700
|
+
className: t,
|
|
683
701
|
contentClassName: a,
|
|
684
|
-
footer:
|
|
685
|
-
rawFooter:
|
|
702
|
+
footer: i,
|
|
703
|
+
rawFooter: l,
|
|
686
704
|
copyToClipboard: n,
|
|
687
|
-
copyToClipboardFocusMode:
|
|
688
|
-
copyToClipboardMode:
|
|
689
|
-
noMaxWidth:
|
|
690
|
-
tail:
|
|
705
|
+
copyToClipboardFocusMode: d = "system",
|
|
706
|
+
copyToClipboardMode: u = "system",
|
|
707
|
+
noMaxWidth: v = !1,
|
|
708
|
+
tail: k = !1
|
|
691
709
|
}) => {
|
|
692
|
-
const [
|
|
693
|
-
kind:
|
|
694
|
-
className:
|
|
710
|
+
const [s, b] = G(!1), g = Re({
|
|
711
|
+
kind: r,
|
|
712
|
+
className: t,
|
|
695
713
|
contentClassName: a,
|
|
696
|
-
noMaxWidth:
|
|
697
|
-
tail:
|
|
698
|
-
}),
|
|
714
|
+
noMaxWidth: v,
|
|
715
|
+
tail: k
|
|
716
|
+
}), _ = !!n && (typeof n == "function" || typeof n == "string" || typeof e == "string"), I = () => {
|
|
699
717
|
b(!0), typeof n == "function" ? n(e) : typeof n == "string" ? navigator.clipboard.writeText(n) : typeof e == "string" && navigator.clipboard.writeText(e);
|
|
700
718
|
};
|
|
701
|
-
return
|
|
719
|
+
return M(() => {
|
|
702
720
|
let m;
|
|
703
|
-
return
|
|
721
|
+
return s && (m = window.setTimeout(() => {
|
|
704
722
|
b(!1);
|
|
705
723
|
}, 3e3)), () => {
|
|
706
724
|
clearTimeout(m);
|
|
707
725
|
};
|
|
708
|
-
}, [
|
|
709
|
-
/* @__PURE__ */
|
|
710
|
-
/* @__PURE__ */
|
|
711
|
-
|
|
712
|
-
const
|
|
713
|
-
return
|
|
726
|
+
}, [s]), /* @__PURE__ */ B("div", { className: g.wrapper, children: [
|
|
727
|
+
/* @__PURE__ */ B("div", { children: [
|
|
728
|
+
/* @__PURE__ */ c("div", { className: g.main, children: e }),
|
|
729
|
+
i && Object.keys(i).map((m, T) => {
|
|
730
|
+
const C = i[m];
|
|
731
|
+
return C === Me ? /* @__PURE__ */ c("div", { className: "prose-p:m-0", children: /* @__PURE__ */ c("p", { className: g.footer, "aria-hidden": "true", children: /* @__PURE__ */ c("span", { className: "invisible", children: " " }) }) }, `${m}-${T}`) : C ? /* @__PURE__ */ c("div", { className: "prose-p:m-0", children: /* @__PURE__ */ B("p", { className: g.footer, children: [
|
|
714
732
|
m,
|
|
715
733
|
": ",
|
|
716
|
-
|
|
717
|
-
] }) }, `${m}-${
|
|
734
|
+
C
|
|
735
|
+
] }) }, `${m}-${T}`) : null;
|
|
718
736
|
}),
|
|
719
|
-
|
|
737
|
+
l && l
|
|
720
738
|
] }),
|
|
721
|
-
|
|
722
|
-
|
|
739
|
+
_ && /* @__PURE__ */ c("div", { className: g.copyButton, children: /* @__PURE__ */ c(
|
|
740
|
+
$,
|
|
723
741
|
{
|
|
724
742
|
noBorder: !0,
|
|
725
743
|
noBackground: !0,
|
|
726
744
|
size: "small",
|
|
727
|
-
mode:
|
|
728
|
-
focusMode:
|
|
729
|
-
label:
|
|
730
|
-
onClick:
|
|
731
|
-
disabled:
|
|
732
|
-
children:
|
|
745
|
+
mode: u,
|
|
746
|
+
focusMode: d,
|
|
747
|
+
label: s ? "Copied to clipboard" : "Copy to clipboard",
|
|
748
|
+
onClick: I,
|
|
749
|
+
disabled: s,
|
|
750
|
+
children: s ? /* @__PURE__ */ c(_e, { size: "size-3" }) : /* @__PURE__ */ c(Ie, { size: "size-3" })
|
|
733
751
|
}
|
|
734
752
|
) })
|
|
735
753
|
] });
|
|
736
754
|
};
|
|
737
755
|
export {
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
756
|
+
R as BUBBLE_CLASSNAME,
|
|
757
|
+
Me as BUBBLE_FOOTER_EMPTY,
|
|
758
|
+
Oe as Bubble
|
|
741
759
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BUBBLE_CLASSNAME as i, BUBBLE_FOOTER_EMPTY as o, Bubble as E } from "./components/Bubble/Bubble.js";
|
|
2
2
|
/*!
|
|
3
|
-
@versini/ui-bubble v4.1.
|
|
3
|
+
@versini/ui-bubble v4.1.1
|
|
4
4
|
© 2025 gizmette.com
|
|
5
5
|
*/
|
|
6
6
|
try {
|
|
7
7
|
window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
|
|
8
|
-
version: "4.1.
|
|
9
|
-
buildTime: "
|
|
8
|
+
version: "4.1.1",
|
|
9
|
+
buildTime: "05/26/2025 03:48 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-bubble",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -39,17 +39,17 @@
|
|
|
39
39
|
"react-dom": "^18.3.1 || ^19.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@versini/ui-types": "5.0.
|
|
42
|
+
"@versini/ui-types": "5.0.3"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@tailwindcss/typography": "0.5.16",
|
|
46
|
-
"@versini/ui-button": "6.0.
|
|
47
|
-
"@versini/ui-icons": "4.
|
|
46
|
+
"@versini/ui-button": "6.0.6",
|
|
47
|
+
"@versini/ui-icons": "4.10.0",
|
|
48
48
|
"clsx": "2.1.1",
|
|
49
|
-
"tailwindcss": "4.1.
|
|
49
|
+
"tailwindcss": "4.1.7"
|
|
50
50
|
},
|
|
51
51
|
"sideEffects": [
|
|
52
52
|
"**/*.css"
|
|
53
53
|
],
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "863a399128080a19f2668e458d495110aa0f68f8"
|
|
55
55
|
}
|