@versini/ui-panel 1.2.2 → 1.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/index.js +289 -204
- package/package.json +2 -2
- package/dist/chunks/index.DaIz2ggm.js +0 -99
package/dist/index.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsx as i, jsxs as _, Fragment as L } from "react/jsx-runtime";
|
|
2
|
+
import d from "clsx";
|
|
3
|
+
import * as u from "react";
|
|
4
|
+
import T, { useId as P, useRef as j, useEffect as F } from "react";
|
|
5
|
+
import { useFloating as G, useClick as D, useDismiss as W, useRole as X, useInteractions as Y, useMergeRefs as q, FloatingPortal as H, FloatingOverlay as J, FloatingFocusManager as K } from "@floating-ui/react";
|
|
4
6
|
/*!
|
|
5
|
-
@versini/ui-panel v1.2.
|
|
7
|
+
@versini/ui-panel v1.2.3
|
|
6
8
|
© 2024 gizmette.com
|
|
7
9
|
*/
|
|
8
10
|
try {
|
|
9
11
|
window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
|
|
10
|
-
version: "1.2.
|
|
11
|
-
buildTime: "12/
|
|
12
|
+
version: "1.2.3",
|
|
13
|
+
buildTime: "12/27/2024 07:18 PM EST",
|
|
12
14
|
homepage: "https://github.com/aversini/ui-components",
|
|
13
15
|
license: "MIT"
|
|
14
16
|
});
|
|
15
17
|
} catch {
|
|
16
18
|
}
|
|
17
|
-
const
|
|
19
|
+
const R = "av-messagebox", C = "av-panel", $ = "av-button";
|
|
18
20
|
/*!
|
|
19
21
|
@versini/ui-spacing v1.1.0
|
|
20
22
|
© 2024 gizmette.com
|
|
@@ -22,13 +24,13 @@ const M = "av-messagebox", C = "av-panel", R = "av-button";
|
|
|
22
24
|
try {
|
|
23
25
|
window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
|
|
24
26
|
version: "1.1.0",
|
|
25
|
-
buildTime: "12/
|
|
27
|
+
buildTime: "12/27/2024 07:18 PM EST",
|
|
26
28
|
homepage: "https://github.com/aversini/ui-components",
|
|
27
29
|
license: "MIT"
|
|
28
30
|
});
|
|
29
31
|
} catch {
|
|
30
32
|
}
|
|
31
|
-
const
|
|
33
|
+
const Q = (e) => {
|
|
32
34
|
let r = "";
|
|
33
35
|
if (typeof e == "number" || typeof e == "string")
|
|
34
36
|
r = "m-" + e;
|
|
@@ -37,32 +39,32 @@ const G = (e) => {
|
|
|
37
39
|
(e == null ? void 0 : e.t) !== void 0 && t.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && t.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && t.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && t.push(`ml-${e.l}`), r = t.join(" ");
|
|
38
40
|
}
|
|
39
41
|
return r;
|
|
40
|
-
},
|
|
42
|
+
}, B = "icon", Z = "button", ee = "link", te = ({
|
|
41
43
|
type: e,
|
|
42
44
|
size: r,
|
|
43
45
|
labelRight: t,
|
|
44
46
|
labelLeft: a,
|
|
45
|
-
align:
|
|
47
|
+
align: o
|
|
46
48
|
}) => {
|
|
47
|
-
const
|
|
49
|
+
const n = "text-sm font-medium max-h-8 py-0", c = "text-base font-medium max-h-9 py-1", l = "text-lg font-medium max-h-12 py-2";
|
|
48
50
|
switch (e) {
|
|
49
|
-
case
|
|
50
|
-
return
|
|
51
|
-
[
|
|
52
|
-
[
|
|
53
|
-
[
|
|
51
|
+
case Z:
|
|
52
|
+
return d("px-4", {
|
|
53
|
+
[n]: r === "small",
|
|
54
|
+
[c]: r === "medium",
|
|
55
|
+
[l]: r === "large"
|
|
54
56
|
});
|
|
55
|
-
case
|
|
56
|
-
return
|
|
57
|
-
[
|
|
58
|
-
[
|
|
59
|
-
[
|
|
57
|
+
case ee:
|
|
58
|
+
return d("px-4 text-center", {
|
|
59
|
+
[n]: r === "small",
|
|
60
|
+
[c]: r === "medium",
|
|
61
|
+
[l]: r === "large"
|
|
60
62
|
});
|
|
61
|
-
case
|
|
62
|
-
return
|
|
63
|
-
"justify-center":
|
|
64
|
-
"justify-start":
|
|
65
|
-
"justify-end":
|
|
63
|
+
case B:
|
|
64
|
+
return d("inline-flex items-center", {
|
|
65
|
+
"justify-center": o === "center",
|
|
66
|
+
"justify-start": o === "left",
|
|
67
|
+
"justify-end": o === "right",
|
|
66
68
|
"h-6 w-6 p-0": r === "small" && !(t || a),
|
|
67
69
|
"h-6 px-4 text-sm font-medium": r === "small" && (t || a),
|
|
68
70
|
"h-8 w-8 p-1": r === "medium" && !(t || a),
|
|
@@ -71,7 +73,7 @@ const G = (e) => {
|
|
|
71
73
|
"h-12 px-4 text-lg font-medium": r === "large" && (t || a)
|
|
72
74
|
});
|
|
73
75
|
}
|
|
74
|
-
},
|
|
76
|
+
}, re = ({
|
|
75
77
|
mode: e,
|
|
76
78
|
noBackground: r,
|
|
77
79
|
noTruncate: t,
|
|
@@ -80,7 +82,7 @@ const G = (e) => {
|
|
|
80
82
|
if (r)
|
|
81
83
|
return "not-prose rounded-full";
|
|
82
84
|
if (a === "primary")
|
|
83
|
-
return
|
|
85
|
+
return d("not-prose rounded-full", {
|
|
84
86
|
truncate: !t,
|
|
85
87
|
"bg-action-dark text-copy-light": e === "dark",
|
|
86
88
|
"bg-action-light text-copy-lighter": e === "light",
|
|
@@ -88,7 +90,7 @@ const G = (e) => {
|
|
|
88
90
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
|
|
89
91
|
});
|
|
90
92
|
if (a === "secondary")
|
|
91
|
-
return
|
|
93
|
+
return d("not-prose rounded-full", {
|
|
92
94
|
truncate: !t,
|
|
93
95
|
"bg-action-dark text-copy-light": e === "light",
|
|
94
96
|
"bg-action-light text-copy-lighter": e === "dark",
|
|
@@ -96,14 +98,14 @@ const G = (e) => {
|
|
|
96
98
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
|
|
97
99
|
});
|
|
98
100
|
if (a === "danger")
|
|
99
|
-
return
|
|
101
|
+
return d("not-prose rounded-full", {
|
|
100
102
|
truncate: !t,
|
|
101
103
|
"bg-action-danger-dark text-copy-light": e === "dark",
|
|
102
104
|
"bg-action-danger-light text-copy-lighter": e === "light",
|
|
103
105
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
104
106
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
105
107
|
});
|
|
106
|
-
},
|
|
108
|
+
}, ae = ({
|
|
107
109
|
mode: e,
|
|
108
110
|
disabled: r,
|
|
109
111
|
variant: t
|
|
@@ -111,27 +113,27 @@ const G = (e) => {
|
|
|
111
113
|
if (r)
|
|
112
114
|
return "";
|
|
113
115
|
if (t === "primary")
|
|
114
|
-
return
|
|
116
|
+
return d("hover:text-copy-light-hover", {
|
|
115
117
|
"hover:bg-action-dark-hover": e === "dark",
|
|
116
118
|
"hover:bg-action-light-hover": e === "light",
|
|
117
119
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
118
120
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
119
121
|
});
|
|
120
122
|
if (t === "secondary")
|
|
121
|
-
return
|
|
123
|
+
return d("hover:text-copy-light-hover", {
|
|
122
124
|
"hover:bg-action-dark-hover": e === "light",
|
|
123
125
|
"hover:bg-action-light-hover": e === "dark",
|
|
124
126
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
125
127
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
126
128
|
});
|
|
127
129
|
if (t === "danger")
|
|
128
|
-
return
|
|
130
|
+
return d("hover:text-copy-light-hover", {
|
|
129
131
|
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
130
132
|
"hover:bg-action-danger-light-hover": e === "light",
|
|
131
133
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
132
134
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
133
135
|
});
|
|
134
|
-
},
|
|
136
|
+
}, oe = ({
|
|
135
137
|
mode: e,
|
|
136
138
|
disabled: r,
|
|
137
139
|
variant: t
|
|
@@ -139,27 +141,27 @@ const G = (e) => {
|
|
|
139
141
|
if (r)
|
|
140
142
|
return "";
|
|
141
143
|
if (t === "primary")
|
|
142
|
-
return
|
|
144
|
+
return d("active:text-copy-light-active", {
|
|
143
145
|
"active:bg-action-dark-active": e === "dark",
|
|
144
146
|
"active:bg-action-light-active": e === "light",
|
|
145
147
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
146
148
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
147
149
|
});
|
|
148
150
|
if (t === "secondary")
|
|
149
|
-
return
|
|
151
|
+
return d("active:text-copy-light-active", {
|
|
150
152
|
"active:bg-action-dark-active": e === "light",
|
|
151
153
|
"active:bg-action-light-active": e === "dark",
|
|
152
154
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
153
155
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
154
156
|
});
|
|
155
157
|
if (t === "danger")
|
|
156
|
-
return
|
|
158
|
+
return d("active:text-copy-lighter-active", {
|
|
157
159
|
"active:bg-action-danger-dark-active": e === "dark",
|
|
158
160
|
"active:bg-action-danger-light-active": e === "light",
|
|
159
161
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
160
162
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
161
163
|
});
|
|
162
|
-
},
|
|
164
|
+
}, ie = ({
|
|
163
165
|
mode: e,
|
|
164
166
|
noBorder: r,
|
|
165
167
|
variant: t
|
|
@@ -167,140 +169,140 @@ const G = (e) => {
|
|
|
167
169
|
if (r)
|
|
168
170
|
return "border border-transparent";
|
|
169
171
|
if (t === "primary")
|
|
170
|
-
return
|
|
172
|
+
return d("border", {
|
|
171
173
|
"border-border-dark": e === "dark",
|
|
172
174
|
"border-border-accent": e === "light",
|
|
173
175
|
"border-border-dark dark:border-border-accent": e === "system",
|
|
174
176
|
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
175
177
|
});
|
|
176
178
|
if (t === "secondary")
|
|
177
|
-
return
|
|
179
|
+
return d("border", {
|
|
178
180
|
"border-border-dark": e === "light",
|
|
179
181
|
"border-border-accent": e === "dark",
|
|
180
182
|
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
181
183
|
"border-border-accent dark:border-border-dark": e === "system"
|
|
182
184
|
});
|
|
183
185
|
if (t === "danger")
|
|
184
|
-
return
|
|
186
|
+
return d("border", {
|
|
185
187
|
"border-border-danger-dark": e === "dark",
|
|
186
188
|
"border-border-danger-medium": e === "light",
|
|
187
189
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
188
190
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
189
191
|
});
|
|
190
|
-
},
|
|
192
|
+
}, ne = ({ focusMode: e }) => d("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
191
193
|
"focus:outline-focus-dark": e === "dark",
|
|
192
194
|
"focus:outline-focus-light": e === "light",
|
|
193
195
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
194
196
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
195
|
-
}),
|
|
197
|
+
}), V = ({
|
|
196
198
|
type: e,
|
|
197
199
|
className: r,
|
|
198
200
|
raw: t,
|
|
199
201
|
mode: a,
|
|
200
|
-
focusMode:
|
|
201
|
-
disabled:
|
|
202
|
-
fullWidth:
|
|
203
|
-
size:
|
|
202
|
+
focusMode: o,
|
|
203
|
+
disabled: n,
|
|
204
|
+
fullWidth: c,
|
|
205
|
+
size: l,
|
|
204
206
|
noBorder: h,
|
|
205
207
|
labelRight: s,
|
|
206
|
-
labelLeft:
|
|
207
|
-
spacing:
|
|
208
|
+
labelLeft: b,
|
|
209
|
+
spacing: f,
|
|
208
210
|
noBackground: m,
|
|
209
|
-
variant:
|
|
210
|
-
noTruncate:
|
|
211
|
-
align:
|
|
212
|
-
}) => (
|
|
213
|
-
|
|
211
|
+
variant: g,
|
|
212
|
+
noTruncate: p,
|
|
213
|
+
align: v
|
|
214
|
+
}) => (g || (g = "primary"), t ? d($, r) : d(
|
|
215
|
+
$,
|
|
214
216
|
r,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
217
|
+
Q(f),
|
|
218
|
+
re({ mode: a, variant: g, noBackground: m, noTruncate: p }),
|
|
219
|
+
te({ type: e, size: l, labelRight: s, labelLeft: b, align: v }),
|
|
220
|
+
ie({ mode: a, variant: g, noBorder: h }),
|
|
221
|
+
ne({ focusMode: o }),
|
|
222
|
+
ae({ mode: a, variant: g, disabled: n }),
|
|
223
|
+
oe({ mode: a, variant: g, disabled: n }),
|
|
222
224
|
{
|
|
223
|
-
"w-full":
|
|
224
|
-
"disabled:cursor-not-allowed disabled:opacity-50":
|
|
225
|
+
"w-full": c,
|
|
226
|
+
"disabled:cursor-not-allowed disabled:opacity-50": n
|
|
225
227
|
}
|
|
226
|
-
)),
|
|
228
|
+
)), le = (e, r, t) => {
|
|
227
229
|
var a;
|
|
228
230
|
!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);
|
|
229
|
-
},
|
|
230
|
-
const { onClick: t, noInternalClick: a = !1, ...
|
|
231
|
-
return /* @__PURE__ */
|
|
231
|
+
}, M = T.forwardRef((e, r) => {
|
|
232
|
+
const { onClick: t, noInternalClick: a = !1, ...o } = e;
|
|
233
|
+
return /* @__PURE__ */ i(
|
|
232
234
|
"button",
|
|
233
235
|
{
|
|
234
236
|
ref: r,
|
|
235
|
-
onClick: (
|
|
236
|
-
|
|
237
|
+
onClick: (n) => {
|
|
238
|
+
le(n, a, t);
|
|
237
239
|
},
|
|
238
|
-
...
|
|
240
|
+
...o
|
|
239
241
|
}
|
|
240
242
|
);
|
|
241
243
|
});
|
|
242
|
-
|
|
243
|
-
const
|
|
244
|
+
M.displayName = "BaseButton";
|
|
245
|
+
const O = T.forwardRef(
|
|
244
246
|
({
|
|
245
247
|
children: e,
|
|
246
248
|
disabled: r = !1,
|
|
247
249
|
mode: t = "system",
|
|
248
250
|
focusMode: a = "system",
|
|
249
|
-
fullWidth:
|
|
250
|
-
className:
|
|
251
|
-
type:
|
|
252
|
-
raw:
|
|
251
|
+
fullWidth: o = !1,
|
|
252
|
+
className: n,
|
|
253
|
+
type: c = "button",
|
|
254
|
+
raw: l = !1,
|
|
253
255
|
noBorder: h = !1,
|
|
254
256
|
"aria-label": s,
|
|
255
|
-
label:
|
|
256
|
-
size:
|
|
257
|
+
label: b,
|
|
258
|
+
size: f = "medium",
|
|
257
259
|
labelRight: m,
|
|
258
|
-
labelLeft:
|
|
259
|
-
spacing:
|
|
260
|
-
noBackground:
|
|
261
|
-
align:
|
|
262
|
-
...
|
|
260
|
+
labelLeft: g,
|
|
261
|
+
spacing: p,
|
|
262
|
+
noBackground: v = !1,
|
|
263
|
+
align: y = "center",
|
|
264
|
+
...I
|
|
263
265
|
}, N) => {
|
|
264
|
-
const
|
|
265
|
-
type:
|
|
266
|
+
const E = V({
|
|
267
|
+
type: B,
|
|
266
268
|
mode: t,
|
|
267
269
|
focusMode: a,
|
|
268
|
-
fullWidth:
|
|
270
|
+
fullWidth: o,
|
|
269
271
|
disabled: r,
|
|
270
|
-
raw:
|
|
271
|
-
className:
|
|
272
|
+
raw: l,
|
|
273
|
+
className: n,
|
|
272
274
|
noBorder: h,
|
|
273
|
-
size:
|
|
275
|
+
size: f,
|
|
274
276
|
labelRight: m,
|
|
275
|
-
labelLeft:
|
|
276
|
-
spacing:
|
|
277
|
-
noBackground:
|
|
278
|
-
align:
|
|
279
|
-
}), S =
|
|
280
|
-
"text-copy-accent-dark": t === "light" && !
|
|
281
|
-
"text-copy-light": t === "dark" && !
|
|
282
|
-
"text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !
|
|
283
|
-
"text-copy-light dark:text-copy-accent-dark": t === "system" && !
|
|
277
|
+
labelLeft: g,
|
|
278
|
+
spacing: p,
|
|
279
|
+
noBackground: v,
|
|
280
|
+
align: y
|
|
281
|
+
}), S = d({
|
|
282
|
+
"text-copy-accent-dark": t === "light" && !l,
|
|
283
|
+
"text-copy-light": t === "dark" && !l,
|
|
284
|
+
"text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !l,
|
|
285
|
+
"text-copy-light dark:text-copy-accent-dark": t === "system" && !l
|
|
284
286
|
});
|
|
285
|
-
return /* @__PURE__ */
|
|
286
|
-
|
|
287
|
+
return /* @__PURE__ */ _(
|
|
288
|
+
M,
|
|
287
289
|
{
|
|
288
290
|
ref: N,
|
|
289
|
-
className:
|
|
291
|
+
className: E,
|
|
290
292
|
disabled: r,
|
|
291
|
-
type:
|
|
292
|
-
"aria-label": s ||
|
|
293
|
-
...
|
|
293
|
+
type: c,
|
|
294
|
+
"aria-label": s || b,
|
|
295
|
+
...I,
|
|
294
296
|
children: [
|
|
295
|
-
|
|
296
|
-
/* @__PURE__ */
|
|
297
|
-
m && /* @__PURE__ */
|
|
297
|
+
g && /* @__PURE__ */ i("span", { className: "pr-2", children: g }),
|
|
298
|
+
/* @__PURE__ */ i("div", { className: S, children: e }),
|
|
299
|
+
m && /* @__PURE__ */ i("span", { className: "pl-2", children: m })
|
|
298
300
|
]
|
|
299
301
|
}
|
|
300
302
|
);
|
|
301
303
|
}
|
|
302
304
|
);
|
|
303
|
-
|
|
305
|
+
O.displayName = "ButtonIcon";
|
|
304
306
|
/*!
|
|
305
307
|
@versini/ui-button v1.6.0
|
|
306
308
|
© 2024 gizmette.com
|
|
@@ -308,55 +310,55 @@ L.displayName = "ButtonIcon";
|
|
|
308
310
|
try {
|
|
309
311
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
310
312
|
version: "1.6.0",
|
|
311
|
-
buildTime: "12/
|
|
313
|
+
buildTime: "12/27/2024 07:18 PM EST",
|
|
312
314
|
homepage: "https://github.com/aversini/ui-components",
|
|
313
315
|
license: "MIT"
|
|
314
316
|
});
|
|
315
317
|
} catch {
|
|
316
318
|
}
|
|
317
|
-
const
|
|
319
|
+
const de = T.forwardRef(
|
|
318
320
|
({
|
|
319
321
|
children: e,
|
|
320
322
|
disabled: r = !1,
|
|
321
323
|
mode: t = "system",
|
|
322
324
|
focusMode: a = "system",
|
|
323
|
-
fullWidth:
|
|
324
|
-
className:
|
|
325
|
-
type:
|
|
326
|
-
raw:
|
|
325
|
+
fullWidth: o = !1,
|
|
326
|
+
className: n,
|
|
327
|
+
type: c = "button",
|
|
328
|
+
raw: l = !1,
|
|
327
329
|
noBorder: h = !1,
|
|
328
330
|
"aria-label": s,
|
|
329
|
-
label:
|
|
330
|
-
size:
|
|
331
|
+
label: b,
|
|
332
|
+
size: f = "medium",
|
|
331
333
|
labelRight: m,
|
|
332
|
-
labelLeft:
|
|
333
|
-
spacing:
|
|
334
|
-
noBackground:
|
|
335
|
-
align:
|
|
336
|
-
active:
|
|
334
|
+
labelLeft: g,
|
|
335
|
+
spacing: p,
|
|
336
|
+
noBackground: v = !1,
|
|
337
|
+
align: y = "center",
|
|
338
|
+
active: I = !1,
|
|
337
339
|
...N
|
|
338
|
-
},
|
|
339
|
-
const S =
|
|
340
|
-
type:
|
|
340
|
+
}, E) => {
|
|
341
|
+
const S = V({
|
|
342
|
+
type: B,
|
|
341
343
|
mode: t,
|
|
342
344
|
focusMode: a,
|
|
343
|
-
fullWidth:
|
|
345
|
+
fullWidth: o,
|
|
344
346
|
disabled: r,
|
|
345
|
-
raw:
|
|
346
|
-
className:
|
|
347
|
+
raw: l,
|
|
348
|
+
className: n,
|
|
347
349
|
noBorder: h,
|
|
348
|
-
size:
|
|
350
|
+
size: f,
|
|
349
351
|
labelRight: m,
|
|
350
|
-
labelLeft:
|
|
351
|
-
spacing:
|
|
352
|
-
noBackground:
|
|
353
|
-
align:
|
|
354
|
-
}),
|
|
355
|
-
"text-copy-accent-dark": t === "light" && !
|
|
356
|
-
"text-copy-light": t === "dark" && !
|
|
357
|
-
"text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !
|
|
358
|
-
"text-copy-light dark:text-copy-accent-dark": t === "system" && !
|
|
359
|
-
}),
|
|
352
|
+
labelLeft: g,
|
|
353
|
+
spacing: p,
|
|
354
|
+
noBackground: v,
|
|
355
|
+
align: y
|
|
356
|
+
}), A = d({
|
|
357
|
+
"text-copy-accent-dark": t === "light" && !l,
|
|
358
|
+
"text-copy-light": t === "dark" && !l,
|
|
359
|
+
"text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !l,
|
|
360
|
+
"text-copy-light dark:text-copy-accent-dark": t === "system" && !l
|
|
361
|
+
}), z = I ? d(
|
|
360
362
|
"relative",
|
|
361
363
|
"focus-within:static",
|
|
362
364
|
"focus-within:after:border-transparent",
|
|
@@ -373,25 +375,25 @@ const Q = E.forwardRef(
|
|
|
373
375
|
"after:border-table-light dark:after:border-table-dark": t === "alt-system"
|
|
374
376
|
}
|
|
375
377
|
) : "";
|
|
376
|
-
return /* @__PURE__ */
|
|
377
|
-
|
|
378
|
+
return /* @__PURE__ */ i("div", { className: z, children: /* @__PURE__ */ _(
|
|
379
|
+
M,
|
|
378
380
|
{
|
|
379
|
-
ref:
|
|
381
|
+
ref: E,
|
|
380
382
|
className: S,
|
|
381
383
|
disabled: r,
|
|
382
|
-
type:
|
|
383
|
-
"aria-label": s ||
|
|
384
|
+
type: c,
|
|
385
|
+
"aria-label": s || b,
|
|
384
386
|
...N,
|
|
385
387
|
children: [
|
|
386
|
-
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
-
m && /* @__PURE__ */
|
|
388
|
+
g && /* @__PURE__ */ i("span", { className: "pr-2", children: g }),
|
|
389
|
+
/* @__PURE__ */ i("div", { className: A, children: e }),
|
|
390
|
+
m && /* @__PURE__ */ i("span", { className: "pl-2", children: m })
|
|
389
391
|
]
|
|
390
392
|
}
|
|
391
393
|
) });
|
|
392
394
|
}
|
|
393
395
|
);
|
|
394
|
-
|
|
396
|
+
de.displayName = "ButtonSort";
|
|
395
397
|
/*!
|
|
396
398
|
@versini/ui-spacing v1.1.0
|
|
397
399
|
© 2024 gizmette.com
|
|
@@ -399,13 +401,13 @@ Q.displayName = "ButtonSort";
|
|
|
399
401
|
try {
|
|
400
402
|
window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
|
|
401
403
|
version: "1.1.0",
|
|
402
|
-
buildTime: "12/
|
|
404
|
+
buildTime: "12/27/2024 07:18 PM EST",
|
|
403
405
|
homepage: "https://github.com/aversini/ui-components",
|
|
404
406
|
license: "MIT"
|
|
405
407
|
});
|
|
406
408
|
} catch {
|
|
407
409
|
}
|
|
408
|
-
const
|
|
410
|
+
const ce = (e) => {
|
|
409
411
|
let r = "";
|
|
410
412
|
if (typeof e == "number" || typeof e == "string")
|
|
411
413
|
r = "m-" + e;
|
|
@@ -414,29 +416,29 @@ const Z = (e) => {
|
|
|
414
416
|
(e == null ? void 0 : e.t) !== void 0 && t.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && t.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && t.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && t.push(`ml-${e.l}`), r = t.join(" ");
|
|
415
417
|
}
|
|
416
418
|
return r;
|
|
417
|
-
},
|
|
419
|
+
}, se = ({
|
|
418
420
|
children: e,
|
|
419
421
|
fill: r,
|
|
420
422
|
viewBox: t,
|
|
421
423
|
className: a,
|
|
422
|
-
defaultViewBox:
|
|
423
|
-
defaultClassName:
|
|
424
|
-
spacing:
|
|
425
|
-
title:
|
|
424
|
+
defaultViewBox: o,
|
|
425
|
+
defaultClassName: n,
|
|
426
|
+
spacing: c,
|
|
427
|
+
title: l,
|
|
426
428
|
semantic: h = !1,
|
|
427
429
|
...s
|
|
428
430
|
}) => {
|
|
429
|
-
const
|
|
430
|
-
|
|
431
|
-
a ||
|
|
431
|
+
const b = ce(c), f = d(
|
|
432
|
+
b,
|
|
433
|
+
a || n
|
|
432
434
|
);
|
|
433
|
-
return /* @__PURE__ */
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
+
return /* @__PURE__ */ _(L, { children: [
|
|
436
|
+
/* @__PURE__ */ i(
|
|
435
437
|
"svg",
|
|
436
438
|
{
|
|
437
439
|
xmlns: "http://www.w3.org/2000/svg",
|
|
438
|
-
className:
|
|
439
|
-
viewBox: t ||
|
|
440
|
+
className: f,
|
|
441
|
+
viewBox: t || o,
|
|
440
442
|
fill: r || "currentColor",
|
|
441
443
|
role: "img",
|
|
442
444
|
"aria-hidden": !h,
|
|
@@ -445,7 +447,7 @@ const Z = (e) => {
|
|
|
445
447
|
children: e
|
|
446
448
|
}
|
|
447
449
|
),
|
|
448
|
-
|
|
450
|
+
l && h && /* @__PURE__ */ i("span", { className: "sr-only", children: l })
|
|
449
451
|
] });
|
|
450
452
|
};
|
|
451
453
|
/*!
|
|
@@ -455,21 +457,21 @@ const Z = (e) => {
|
|
|
455
457
|
try {
|
|
456
458
|
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
457
459
|
version: "1.1.0",
|
|
458
|
-
buildTime: "12/
|
|
460
|
+
buildTime: "12/27/2024 07:18 PM EST",
|
|
459
461
|
homepage: "https://github.com/aversini/ui-components",
|
|
460
462
|
license: "MIT"
|
|
461
463
|
});
|
|
462
464
|
} catch {
|
|
463
465
|
}
|
|
464
|
-
const
|
|
466
|
+
const ge = ({
|
|
465
467
|
className: e,
|
|
466
468
|
viewBox: r,
|
|
467
469
|
spacing: t,
|
|
468
470
|
title: a,
|
|
469
|
-
monotone:
|
|
470
|
-
...
|
|
471
|
-
}) => /* @__PURE__ */
|
|
472
|
-
|
|
471
|
+
monotone: o,
|
|
472
|
+
...n
|
|
473
|
+
}) => /* @__PURE__ */ i(
|
|
474
|
+
se,
|
|
473
475
|
{
|
|
474
476
|
defaultViewBox: "0 0 384 512",
|
|
475
477
|
defaultClassName: "size-5",
|
|
@@ -477,8 +479,8 @@ const te = ({
|
|
|
477
479
|
className: e,
|
|
478
480
|
spacing: t,
|
|
479
481
|
title: a || "Close",
|
|
480
|
-
...
|
|
481
|
-
children: /* @__PURE__ */
|
|
482
|
+
...n,
|
|
483
|
+
children: /* @__PURE__ */ i("path", { d: "M342.6 150.6c12.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.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z" })
|
|
482
484
|
}
|
|
483
485
|
);
|
|
484
486
|
/*!
|
|
@@ -488,25 +490,112 @@ const te = ({
|
|
|
488
490
|
try {
|
|
489
491
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
490
492
|
version: "1.19.0",
|
|
491
|
-
buildTime: "12/
|
|
493
|
+
buildTime: "12/27/2024 07:18 PM EST",
|
|
492
494
|
homepage: "https://github.com/aversini/ui-components",
|
|
493
495
|
license: "MIT"
|
|
494
496
|
});
|
|
495
497
|
} catch {
|
|
496
498
|
}
|
|
497
|
-
const
|
|
499
|
+
const U = u.createContext(null);
|
|
500
|
+
function he({
|
|
501
|
+
initialOpen: e = !1,
|
|
502
|
+
open: r,
|
|
503
|
+
onOpenChange: t
|
|
504
|
+
} = {}) {
|
|
505
|
+
const [a, o] = u.useState(e), [n, c] = u.useState(), [l, h] = u.useState(), s = r ?? a, b = t ?? o, f = G({
|
|
506
|
+
open: s,
|
|
507
|
+
onOpenChange: b
|
|
508
|
+
}), m = f.context, g = D(m, {
|
|
509
|
+
enabled: r == null
|
|
510
|
+
}), p = W(m, {
|
|
511
|
+
outsidePress: !1,
|
|
512
|
+
outsidePressEvent: "mousedown"
|
|
513
|
+
}), v = X(m), y = Y([g, p, v]);
|
|
514
|
+
return u.useMemo(
|
|
515
|
+
() => ({
|
|
516
|
+
open: s,
|
|
517
|
+
setOpen: b,
|
|
518
|
+
...y,
|
|
519
|
+
...f,
|
|
520
|
+
labelId: n,
|
|
521
|
+
descriptionId: l,
|
|
522
|
+
setLabelId: c,
|
|
523
|
+
setDescriptionId: h
|
|
524
|
+
}),
|
|
525
|
+
[s, b, y, f, n, l]
|
|
526
|
+
);
|
|
527
|
+
}
|
|
528
|
+
const w = () => {
|
|
529
|
+
const e = u.useContext(U);
|
|
530
|
+
if (e == null)
|
|
531
|
+
throw new Error("Modal components must be wrapped in <Modal />");
|
|
532
|
+
return e;
|
|
533
|
+
};
|
|
534
|
+
function ue({
|
|
535
|
+
children: e,
|
|
536
|
+
...r
|
|
537
|
+
}) {
|
|
538
|
+
const t = he(r);
|
|
539
|
+
return /* @__PURE__ */ i(U.Provider, { value: t, children: e });
|
|
540
|
+
}
|
|
541
|
+
const me = u.forwardRef(function(e, r) {
|
|
542
|
+
const { context: t, ...a } = w(), o = q([a.refs.setFloating, r]);
|
|
543
|
+
if (!t.open)
|
|
544
|
+
return null;
|
|
545
|
+
const { overlayBackground: n, ...c } = e, l = d("grid place-items-center", {
|
|
546
|
+
[`${n}`]: n,
|
|
547
|
+
"bg-black sm:bg-black/[.8]": !n
|
|
548
|
+
});
|
|
549
|
+
return /* @__PURE__ */ i(H, { children: /* @__PURE__ */ i(J, { className: l, lockScroll: !0, children: /* @__PURE__ */ i(K, { context: t, children: /* @__PURE__ */ i(
|
|
550
|
+
"div",
|
|
551
|
+
{
|
|
552
|
+
ref: o,
|
|
553
|
+
"aria-labelledby": a.labelId,
|
|
554
|
+
"aria-describedby": a.descriptionId,
|
|
555
|
+
...a.getFloatingProps(c),
|
|
556
|
+
children: c.children
|
|
557
|
+
}
|
|
558
|
+
) }) }) });
|
|
559
|
+
}), be = u.forwardRef(function({ children: e, ...r }, t) {
|
|
560
|
+
const { setLabelId: a } = w(), o = P();
|
|
561
|
+
return u.useLayoutEffect(() => (a(o), () => a(void 0)), [o, a]), /* @__PURE__ */ i("h1", { ...r, ref: t, id: o, children: e });
|
|
562
|
+
}), fe = u.forwardRef(function({ children: e, ...r }, t) {
|
|
563
|
+
const { setDescriptionId: a } = w(), o = P();
|
|
564
|
+
return u.useLayoutEffect(() => (a(o), () => a(void 0)), [o, a]), /* @__PURE__ */ i("div", { ...r, ref: t, id: o, children: e });
|
|
565
|
+
}), pe = u.forwardRef(function(e, r) {
|
|
566
|
+
const { setOpen: t } = w(), { trigger: a, className: o, ...n } = e, c = u.useCallback(() => t(!1), [t]);
|
|
567
|
+
return /* @__PURE__ */ i("div", { className: o, children: u.cloneElement(a, {
|
|
568
|
+
ref: r,
|
|
569
|
+
onClick: c,
|
|
570
|
+
...n
|
|
571
|
+
}) });
|
|
572
|
+
});
|
|
573
|
+
/*!
|
|
574
|
+
@versini/ui-modal v1.1.0
|
|
575
|
+
© 2024 gizmette.com
|
|
576
|
+
*/
|
|
577
|
+
try {
|
|
578
|
+
window.__VERSINI_UI_MODAL__ || (window.__VERSINI_UI_MODAL__ = {
|
|
579
|
+
version: "1.1.0",
|
|
580
|
+
buildTime: "12/27/2024 07:18 PM EST",
|
|
581
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
582
|
+
license: "MIT"
|
|
583
|
+
});
|
|
584
|
+
} catch {
|
|
585
|
+
}
|
|
586
|
+
const k = "panel", x = "messagebox", ve = ({
|
|
498
587
|
className: e,
|
|
499
588
|
kind: r,
|
|
500
589
|
borderMode: t
|
|
501
590
|
}) => ({
|
|
502
|
-
main:
|
|
503
|
-
[`${C} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: r ===
|
|
504
|
-
[`${C} w-full sm:w-[95%] md:max-w-2xl`]: r ===
|
|
505
|
-
[`${
|
|
506
|
-
[`${
|
|
591
|
+
main: d("prose prose-lighter flex flex-col bg-surface-medium", {
|
|
592
|
+
[`${C} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: r === k,
|
|
593
|
+
[`${C} w-full sm:w-[95%] md:max-w-2xl`]: r === k && !e,
|
|
594
|
+
[`${R} rounded-lg border-2`]: r === x,
|
|
595
|
+
[`${R} w-[95%] sm:w-[50%] md:max-w-2xl`]: r === x && !e,
|
|
507
596
|
[`${e}`]: !!e,
|
|
508
|
-
"sm:border-border-dark": t === "dark" && r ===
|
|
509
|
-
"sm:border-border-accent": t === "light" && r ===
|
|
597
|
+
"sm:border-border-dark": t === "dark" && r === k,
|
|
598
|
+
"sm:border-border-accent": t === "light" && r === k,
|
|
510
599
|
"border-border-dark": t === "dark" && r === x,
|
|
511
600
|
"border-border-accent": t === "light" && r === x
|
|
512
601
|
}),
|
|
@@ -514,49 +603,45 @@ const p = "panel", x = "messagebox", re = ({
|
|
|
514
603
|
footer: "flex flex-grow flex-col sm:p-4 p-2",
|
|
515
604
|
header: "sm:p-4 mb-0 p-2",
|
|
516
605
|
close: "sm:p-4 p-2"
|
|
517
|
-
}),
|
|
518
|
-
() => import("./chunks/index.DaIz2ggm.js").then((r) => ({
|
|
519
|
-
default: r[e]
|
|
520
|
-
}))
|
|
521
|
-
), ae = k("Modal"), oe = k("ModalClose"), ie = k("ModalContent"), ne = k("ModalDescription"), le = k("ModalHeading"), ge = ({
|
|
606
|
+
}), we = ({
|
|
522
607
|
open: e,
|
|
523
608
|
onOpenChange: r,
|
|
524
609
|
title: t,
|
|
525
610
|
children: a,
|
|
526
|
-
footer:
|
|
527
|
-
borderMode:
|
|
528
|
-
kind:
|
|
529
|
-
className:
|
|
611
|
+
footer: o,
|
|
612
|
+
borderMode: n = "light",
|
|
613
|
+
kind: c = k,
|
|
614
|
+
className: l
|
|
530
615
|
}) => {
|
|
531
|
-
const h =
|
|
532
|
-
return
|
|
616
|
+
const h = j(""), s = ve({ className: l, kind: c, borderMode: n });
|
|
617
|
+
return F(() => (e && (h.current = document.title, document.title = `${t} | ${h.current}`), () => {
|
|
533
618
|
e && (document.title = h.current);
|
|
534
|
-
}), [t, e]), /* @__PURE__ */
|
|
535
|
-
/* @__PURE__ */
|
|
536
|
-
/* @__PURE__ */
|
|
537
|
-
|
|
619
|
+
}), [t, e]), /* @__PURE__ */ i(L, { children: e && /* @__PURE__ */ i(ue, { open: e, onOpenChange: r, children: /* @__PURE__ */ _(me, { className: s.main, children: [
|
|
620
|
+
/* @__PURE__ */ _("div", { className: "flex flex-row-reverse items-center justify-between", children: [
|
|
621
|
+
/* @__PURE__ */ i(
|
|
622
|
+
pe,
|
|
538
623
|
{
|
|
539
624
|
className: s.close,
|
|
540
|
-
trigger: /* @__PURE__ */
|
|
541
|
-
|
|
625
|
+
trigger: /* @__PURE__ */ i(
|
|
626
|
+
O,
|
|
542
627
|
{
|
|
543
628
|
mode: "dark",
|
|
544
629
|
focusMode: "light",
|
|
545
630
|
noBorder: !0,
|
|
546
631
|
label: "Close",
|
|
547
|
-
children: /* @__PURE__ */
|
|
632
|
+
children: /* @__PURE__ */ i(ge, {})
|
|
548
633
|
}
|
|
549
634
|
)
|
|
550
635
|
}
|
|
551
636
|
),
|
|
552
|
-
/* @__PURE__ */
|
|
637
|
+
/* @__PURE__ */ i(be, { className: s.header, children: t })
|
|
553
638
|
] }),
|
|
554
|
-
/* @__PURE__ */
|
|
555
|
-
|
|
639
|
+
/* @__PURE__ */ i(fe, { className: s.content, children: a }),
|
|
640
|
+
o && /* @__PURE__ */ i("div", { className: s.footer, children: o })
|
|
556
641
|
] }) }) });
|
|
557
642
|
};
|
|
558
643
|
export {
|
|
559
|
-
|
|
644
|
+
R as MESSAGEBOX_CLASSNAME,
|
|
560
645
|
C as PANEL_CLASSNAME,
|
|
561
|
-
|
|
646
|
+
we as Panel
|
|
562
647
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-panel",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"sideEffects": [
|
|
49
49
|
"**/*.css"
|
|
50
50
|
],
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "29ca97023df61f090d2e994c0fee52521a7a7791"
|
|
52
52
|
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useFloating as _, useClick as C, useDismiss as E, useRole as x, useInteractions as D, useMergeRefs as O, FloatingPortal as R, FloatingOverlay as k, FloatingFocusManager as y } from "@floating-ui/react";
|
|
3
|
-
import F from "clsx";
|
|
4
|
-
import * as o from "react";
|
|
5
|
-
import { useId as h } from "react";
|
|
6
|
-
const I = o.createContext(null);
|
|
7
|
-
function L({
|
|
8
|
-
initialOpen: n = !1,
|
|
9
|
-
open: i,
|
|
10
|
-
onOpenChange: t
|
|
11
|
-
} = {}) {
|
|
12
|
-
const [e, r] = o.useState(n), [s, l] = o.useState(), [c, b] = o.useState(), u = i ?? e, f = t ?? r, p = _({
|
|
13
|
-
open: u,
|
|
14
|
-
onOpenChange: f
|
|
15
|
-
}), m = p.context, M = C(m, {
|
|
16
|
-
enabled: i == null
|
|
17
|
-
}), w = E(m, {
|
|
18
|
-
outsidePress: !1,
|
|
19
|
-
outsidePressEvent: "mousedown"
|
|
20
|
-
}), v = x(m), g = D([M, w, v]);
|
|
21
|
-
return o.useMemo(
|
|
22
|
-
() => ({
|
|
23
|
-
open: u,
|
|
24
|
-
setOpen: f,
|
|
25
|
-
...g,
|
|
26
|
-
...p,
|
|
27
|
-
labelId: s,
|
|
28
|
-
descriptionId: c,
|
|
29
|
-
setLabelId: l,
|
|
30
|
-
setDescriptionId: b
|
|
31
|
-
}),
|
|
32
|
-
[u, f, g, p, s, c]
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
const d = () => {
|
|
36
|
-
const n = o.useContext(I);
|
|
37
|
-
if (n == null)
|
|
38
|
-
throw new Error("Modal components must be wrapped in <Modal />");
|
|
39
|
-
return n;
|
|
40
|
-
};
|
|
41
|
-
function T({
|
|
42
|
-
children: n,
|
|
43
|
-
...i
|
|
44
|
-
}) {
|
|
45
|
-
const t = L(i);
|
|
46
|
-
return /* @__PURE__ */ a(I.Provider, { value: t, children: n });
|
|
47
|
-
}
|
|
48
|
-
const A = o.forwardRef(function(n, i) {
|
|
49
|
-
const { context: t, ...e } = d(), r = O([e.refs.setFloating, i]);
|
|
50
|
-
if (!t.open)
|
|
51
|
-
return null;
|
|
52
|
-
const { overlayBackground: s, ...l } = n, c = F("grid place-items-center", {
|
|
53
|
-
[`${s}`]: s,
|
|
54
|
-
"bg-black sm:bg-black/[.8]": !s
|
|
55
|
-
});
|
|
56
|
-
return /* @__PURE__ */ a(R, { children: /* @__PURE__ */ a(k, { className: c, lockScroll: !0, children: /* @__PURE__ */ a(y, { context: t, children: /* @__PURE__ */ a(
|
|
57
|
-
"div",
|
|
58
|
-
{
|
|
59
|
-
ref: r,
|
|
60
|
-
"aria-labelledby": e.labelId,
|
|
61
|
-
"aria-describedby": e.descriptionId,
|
|
62
|
-
...e.getFloatingProps(l),
|
|
63
|
-
children: l.children
|
|
64
|
-
}
|
|
65
|
-
) }) }) });
|
|
66
|
-
}), U = o.forwardRef(function({ children: n, ...i }, t) {
|
|
67
|
-
const { setLabelId: e } = d(), r = h();
|
|
68
|
-
return o.useLayoutEffect(() => (e(r), () => e(void 0)), [r, e]), /* @__PURE__ */ a("h1", { ...i, ref: t, id: r, children: n });
|
|
69
|
-
}), V = o.forwardRef(function({ children: n, ...i }, t) {
|
|
70
|
-
const { setDescriptionId: e } = d(), r = h();
|
|
71
|
-
return o.useLayoutEffect(() => (e(r), () => e(void 0)), [r, e]), /* @__PURE__ */ a("div", { ...i, ref: t, id: r, children: n });
|
|
72
|
-
}), j = o.forwardRef(function(n, i) {
|
|
73
|
-
const { setOpen: t } = d(), { trigger: e, className: r, ...s } = n, l = o.useCallback(() => t(!1), [t]);
|
|
74
|
-
return /* @__PURE__ */ a("div", { className: r, children: o.cloneElement(e, {
|
|
75
|
-
ref: i,
|
|
76
|
-
onClick: l,
|
|
77
|
-
...s
|
|
78
|
-
}) });
|
|
79
|
-
});
|
|
80
|
-
/*!
|
|
81
|
-
@versini/ui-modal v1.1.0
|
|
82
|
-
© 2024 gizmette.com
|
|
83
|
-
*/
|
|
84
|
-
try {
|
|
85
|
-
window.__VERSINI_UI_MODAL__ || (window.__VERSINI_UI_MODAL__ = {
|
|
86
|
-
version: "1.1.0",
|
|
87
|
-
buildTime: "12/26/2024 06:05 PM EST",
|
|
88
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
89
|
-
license: "MIT"
|
|
90
|
-
});
|
|
91
|
-
} catch {
|
|
92
|
-
}
|
|
93
|
-
export {
|
|
94
|
-
T as Modal,
|
|
95
|
-
j as ModalClose,
|
|
96
|
-
A as ModalContent,
|
|
97
|
-
V as ModalDescription,
|
|
98
|
-
U as ModalHeading
|
|
99
|
-
};
|