@konstructio/ui 0.1.0-alpha.5 → 0.1.0-alpha.7
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/{Combination-Cvr3uETz.js → Combination-VYaRRJBZ.js} +104 -106
- package/dist/Modal-CrG0m703.js +98 -0
- package/dist/{chevron-up-DgLBQCKD.js → chevron-up-RLP4nX7V.js} +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.js +1 -1
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +2 -2
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Dropdown/components/List/List.js +40 -36
- package/dist/components/Dropdown/components/List/List.variants.js +3 -3
- package/dist/components/Dropdown/components/ListItem/ListItem.js +18 -16
- package/dist/components/Dropdown/components/Wrapper.js +110 -94
- package/dist/components/Dropdown/contexts/dropdown.context.js +6 -2
- package/dist/components/Dropdown/contexts/dropdown.provider.js +18 -11
- package/dist/components/Input/Input.js +9 -9
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +4 -6
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{index-BuxebbOg.js → index-BNU3RH-3.js} +1 -1
- package/dist/{index-1RDo-S_f.js → index-DLYwlPRZ.js} +1 -1
- package/dist/{index-Cz09twLl.js → index-Dkt8F6CZ.js} +1 -1
- package/dist/{index-C5psggHV.js → index-h-Ul0anl.js} +1 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/package.json +21 -24
- package/dist/styles.css +1 -1
- package/dist/{x-DU-Zw-L_.js → x-BPcqkRZd.js} +1 -1
- package/package.json +20 -23
- package/dist/Modal-DXYBiafI.js +0 -926
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as l from "react";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as q } from "react";
|
|
3
3
|
var b = function() {
|
|
4
4
|
return b = Object.assign || function(t) {
|
|
5
5
|
for (var n, r = 1, a = arguments.length; r < a; r++) {
|
|
@@ -17,17 +17,17 @@ function Z(e, t) {
|
|
|
17
17
|
t.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (n[r[a]] = e[r[a]]);
|
|
18
18
|
return n;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function J(e, t, n) {
|
|
21
21
|
if (n || arguments.length === 2) for (var r = 0, a = t.length, c; r < a; r++)
|
|
22
22
|
(c || !(r in t)) && (c || (c = Array.prototype.slice.call(t, 0, r)), c[r] = t[r]);
|
|
23
23
|
return e.concat(c || Array.prototype.slice.call(t));
|
|
24
24
|
}
|
|
25
|
-
var x = "right-scroll-bar-position", O = "width-before-scroll-bar",
|
|
25
|
+
var x = "right-scroll-bar-position", O = "width-before-scroll-bar", ee = "with-scroll-bars-hidden", te = "--removed-body-scroll-bar-size";
|
|
26
26
|
function I(e, t) {
|
|
27
27
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
var n =
|
|
29
|
+
function re(e, t) {
|
|
30
|
+
var n = q(function() {
|
|
31
31
|
return {
|
|
32
32
|
// value
|
|
33
33
|
value: e,
|
|
@@ -47,15 +47,15 @@ function ae(e, t) {
|
|
|
47
47
|
})[0];
|
|
48
48
|
return n.callback = t, n.facade;
|
|
49
49
|
}
|
|
50
|
-
var
|
|
51
|
-
function
|
|
52
|
-
var n =
|
|
50
|
+
var ne = typeof window < "u" ? l.useLayoutEffect : l.useEffect, j = /* @__PURE__ */ new WeakMap();
|
|
51
|
+
function ae(e, t) {
|
|
52
|
+
var n = re(null, function(r) {
|
|
53
53
|
return e.forEach(function(a) {
|
|
54
54
|
return I(a, r);
|
|
55
55
|
});
|
|
56
56
|
});
|
|
57
|
-
return
|
|
58
|
-
var r =
|
|
57
|
+
return ne(function() {
|
|
58
|
+
var r = j.get(n);
|
|
59
59
|
if (r) {
|
|
60
60
|
var a = new Set(r), c = new Set(e), u = n.current;
|
|
61
61
|
a.forEach(function(i) {
|
|
@@ -64,14 +64,14 @@ function ce(e, t) {
|
|
|
64
64
|
a.has(i) || I(i, u);
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
j.set(n, e);
|
|
68
68
|
}, [e]), n;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function oe(e) {
|
|
71
71
|
return e;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
t === void 0 && (t =
|
|
73
|
+
function ce(e, t) {
|
|
74
|
+
t === void 0 && (t = oe);
|
|
75
75
|
var n = [], r = !1, a = {
|
|
76
76
|
read: function() {
|
|
77
77
|
if (r)
|
|
@@ -107,30 +107,27 @@ function Q(e, t) {
|
|
|
107
107
|
var i = n;
|
|
108
108
|
n = [], i.forEach(c), u = n;
|
|
109
109
|
}
|
|
110
|
-
var
|
|
111
|
-
var
|
|
112
|
-
u = [],
|
|
113
|
-
},
|
|
114
|
-
return Promise.resolve().then(
|
|
110
|
+
var m = function() {
|
|
111
|
+
var v = u;
|
|
112
|
+
u = [], v.forEach(c);
|
|
113
|
+
}, g = function() {
|
|
114
|
+
return Promise.resolve().then(m);
|
|
115
115
|
};
|
|
116
|
-
|
|
117
|
-
push: function(
|
|
118
|
-
u.push(
|
|
116
|
+
g(), n = {
|
|
117
|
+
push: function(v) {
|
|
118
|
+
u.push(v), g();
|
|
119
119
|
},
|
|
120
|
-
filter: function(
|
|
121
|
-
return u = u.filter(
|
|
120
|
+
filter: function(v) {
|
|
121
|
+
return u = u.filter(v), n;
|
|
122
122
|
}
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
return a;
|
|
127
127
|
}
|
|
128
|
-
function Xe(e, t) {
|
|
129
|
-
return t === void 0 && (t = _), Q(e, t);
|
|
130
|
-
}
|
|
131
128
|
function ie(e) {
|
|
132
129
|
e === void 0 && (e = {});
|
|
133
|
-
var t =
|
|
130
|
+
var t = ce(null);
|
|
134
131
|
return t.options = b({ async: !0, ssr: !1 }, e), t;
|
|
135
132
|
}
|
|
136
133
|
var G = function(e) {
|
|
@@ -146,18 +143,18 @@ G.isSideCarExport = !0;
|
|
|
146
143
|
function le(e, t) {
|
|
147
144
|
return e.useMedium(t), G;
|
|
148
145
|
}
|
|
149
|
-
var
|
|
146
|
+
var Q = ie(), W = function() {
|
|
150
147
|
}, A = l.forwardRef(function(e, t) {
|
|
151
148
|
var n = l.useRef(null), r = l.useState({
|
|
152
149
|
onScrollCapture: W,
|
|
153
150
|
onWheelCapture: W,
|
|
154
151
|
onTouchMoveCapture: W
|
|
155
|
-
}), a = r[0], c = r[1], u = e.forwardProps, i = e.children,
|
|
152
|
+
}), a = r[0], c = r[1], u = e.forwardProps, i = e.children, m = e.className, g = e.removeScrollBar, v = e.enabled, p = e.shards, R = e.sideCar, C = e.noRelative, E = e.noIsolation, o = e.inert, f = e.allowPinchZoom, h = e.as, s = h === void 0 ? "div" : h, y = e.gapMode, S = Z(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), d = R, k = ae([n, t]), w = b(b({}, S), a);
|
|
156
153
|
return l.createElement(
|
|
157
154
|
l.Fragment,
|
|
158
155
|
null,
|
|
159
|
-
|
|
160
|
-
u ? l.cloneElement(l.Children.only(i), b(b({}, w), { ref: k })) : l.createElement(
|
|
156
|
+
v && l.createElement(d, { sideCar: Q, removeScrollBar: g, shards: p, noRelative: C, noIsolation: E, inert: o, setCallbacks: c, allowPinchZoom: !!f, lockRef: n, gapMode: y }),
|
|
157
|
+
u ? l.cloneElement(l.Children.only(i), b(b({}, w), { ref: k })) : l.createElement(s, b({}, w, { className: m, ref: k }), i)
|
|
161
158
|
);
|
|
162
159
|
});
|
|
163
160
|
A.defaultProps = {
|
|
@@ -207,7 +204,7 @@ var ve = function() {
|
|
|
207
204
|
};
|
|
208
205
|
}, [t && n]);
|
|
209
206
|
};
|
|
210
|
-
},
|
|
207
|
+
}, _ = function() {
|
|
211
208
|
var e = he(), t = function(n) {
|
|
212
209
|
var r = n.styles, a = n.dynamic;
|
|
213
210
|
return e(r, a), null;
|
|
@@ -218,11 +215,11 @@ var ve = function() {
|
|
|
218
215
|
top: 0,
|
|
219
216
|
right: 0,
|
|
220
217
|
gap: 0
|
|
221
|
-
},
|
|
218
|
+
}, D = function(e) {
|
|
222
219
|
return parseInt(e || "", 10) || 0;
|
|
223
220
|
}, ge = function(e) {
|
|
224
221
|
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], a = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
225
|
-
return [
|
|
222
|
+
return [D(n), D(r), D(a)];
|
|
226
223
|
}, ye = function(e) {
|
|
227
224
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
228
225
|
return me;
|
|
@@ -233,14 +230,14 @@ var ve = function() {
|
|
|
233
230
|
right: t[2],
|
|
234
231
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
235
232
|
};
|
|
236
|
-
}, be =
|
|
233
|
+
}, be = _(), M = "data-scroll-locked", Se = function(e, t, n, r) {
|
|
237
234
|
var a = e.left, c = e.top, u = e.right, i = e.gap;
|
|
238
235
|
return n === void 0 && (n = "margin"), `
|
|
239
|
-
.`.concat(
|
|
236
|
+
.`.concat(ee, ` {
|
|
240
237
|
overflow: hidden `).concat(r, `;
|
|
241
238
|
padding-right: `).concat(i, "px ").concat(r, `;
|
|
242
239
|
}
|
|
243
|
-
body[`).concat(
|
|
240
|
+
body[`).concat(M, `] {
|
|
244
241
|
overflow: hidden `).concat(r, `;
|
|
245
242
|
overscroll-behavior: contain;
|
|
246
243
|
`).concat([
|
|
@@ -273,18 +270,18 @@ var ve = function() {
|
|
|
273
270
|
margin-right: 0 `).concat(r, `;
|
|
274
271
|
}
|
|
275
272
|
|
|
276
|
-
body[`).concat(
|
|
277
|
-
`).concat(
|
|
273
|
+
body[`).concat(M, `] {
|
|
274
|
+
`).concat(te, ": ").concat(i, `px;
|
|
278
275
|
}
|
|
279
276
|
`);
|
|
280
277
|
}, V = function() {
|
|
281
|
-
var e = parseInt(document.body.getAttribute(
|
|
278
|
+
var e = parseInt(document.body.getAttribute(M) || "0", 10);
|
|
282
279
|
return isFinite(e) ? e : 0;
|
|
283
280
|
}, we = function() {
|
|
284
281
|
l.useEffect(function() {
|
|
285
|
-
return document.body.setAttribute(
|
|
282
|
+
return document.body.setAttribute(M, (V() + 1).toString()), function() {
|
|
286
283
|
var e = V() - 1;
|
|
287
|
-
e <= 0 ? document.body.removeAttribute(
|
|
284
|
+
e <= 0 ? document.body.removeAttribute(M) : document.body.setAttribute(M, e.toString());
|
|
288
285
|
};
|
|
289
286
|
}, []);
|
|
290
287
|
}, pe = function(e) {
|
|
@@ -294,21 +291,21 @@ var ve = function() {
|
|
|
294
291
|
return ye(a);
|
|
295
292
|
}, [a]);
|
|
296
293
|
return l.createElement(be, { styles: Se(c, !t, a, n ? "" : "!important") });
|
|
297
|
-
},
|
|
294
|
+
}, X = !1;
|
|
298
295
|
if (typeof window < "u")
|
|
299
296
|
try {
|
|
300
|
-
var
|
|
297
|
+
var L = Object.defineProperty({}, "passive", {
|
|
301
298
|
get: function() {
|
|
302
|
-
return
|
|
299
|
+
return X = !0, !0;
|
|
303
300
|
}
|
|
304
301
|
});
|
|
305
|
-
window.addEventListener("test",
|
|
302
|
+
window.addEventListener("test", L, L), window.removeEventListener("test", L, L);
|
|
306
303
|
} catch {
|
|
307
|
-
|
|
304
|
+
X = !1;
|
|
308
305
|
}
|
|
309
|
-
var P =
|
|
306
|
+
var P = X ? { passive: !1 } : !1, Ce = function(e) {
|
|
310
307
|
return e.tagName === "TEXTAREA";
|
|
311
|
-
},
|
|
308
|
+
}, U = function(e, t) {
|
|
312
309
|
if (!(e instanceof Element))
|
|
313
310
|
return !1;
|
|
314
311
|
var n = window.getComputedStyle(e);
|
|
@@ -318,16 +315,16 @@ var P = Y ? { passive: !1 } : !1, Ce = function(e) {
|
|
|
318
315
|
!(n.overflowY === n.overflowX && !Ce(e) && n[t] === "visible")
|
|
319
316
|
);
|
|
320
317
|
}, Ee = function(e) {
|
|
321
|
-
return
|
|
318
|
+
return U(e, "overflowY");
|
|
322
319
|
}, Re = function(e) {
|
|
323
|
-
return
|
|
320
|
+
return U(e, "overflowX");
|
|
324
321
|
}, H = function(e, t) {
|
|
325
322
|
var n = t.ownerDocument, r = t;
|
|
326
323
|
do {
|
|
327
324
|
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
328
|
-
var a =
|
|
325
|
+
var a = K(e, r);
|
|
329
326
|
if (a) {
|
|
330
|
-
var c =
|
|
327
|
+
var c = $(e, r), u = c[1], i = c[2];
|
|
331
328
|
if (u > i)
|
|
332
329
|
return !0;
|
|
333
330
|
}
|
|
@@ -348,45 +345,49 @@ var P = Y ? { passive: !1 } : !1, Ce = function(e) {
|
|
|
348
345
|
n,
|
|
349
346
|
r
|
|
350
347
|
];
|
|
351
|
-
},
|
|
348
|
+
}, K = function(e, t) {
|
|
352
349
|
return e === "v" ? Ee(t) : Re(t);
|
|
353
|
-
},
|
|
350
|
+
}, $ = function(e, t) {
|
|
354
351
|
return e === "v" ? ke(t) : Pe(t);
|
|
355
|
-
},
|
|
352
|
+
}, Te = function(e, t) {
|
|
356
353
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
357
|
-
},
|
|
358
|
-
var c =
|
|
354
|
+
}, Me = function(e, t, n, r, a) {
|
|
355
|
+
var c = Te(e, window.getComputedStyle(t).direction), u = c * r, i = n.target, m = t.contains(i), g = !1, v = u > 0, p = 0, R = 0;
|
|
359
356
|
do {
|
|
360
|
-
|
|
361
|
-
|
|
357
|
+
if (!i)
|
|
358
|
+
break;
|
|
359
|
+
var C = $(e, i), E = C[0], o = C[1], f = C[2], h = o - f - c * E;
|
|
360
|
+
(E || h) && K(e, i) && (p += h, R += E);
|
|
361
|
+
var s = i.parentNode;
|
|
362
|
+
i = s && s.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? s.host : s;
|
|
362
363
|
} while (
|
|
363
364
|
// portaled content
|
|
364
|
-
!
|
|
365
|
-
|
|
365
|
+
!m && i !== document.body || // self content
|
|
366
|
+
m && (t.contains(i) || t === i)
|
|
366
367
|
);
|
|
367
|
-
return (
|
|
368
|
-
},
|
|
368
|
+
return (v && Math.abs(p) < 1 || !v && Math.abs(R) < 1) && (g = !0), g;
|
|
369
|
+
}, B = function(e) {
|
|
369
370
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
370
|
-
}, z = function(e) {
|
|
371
|
-
return [e.deltaX, e.deltaY];
|
|
372
371
|
}, F = function(e) {
|
|
372
|
+
return [e.deltaX, e.deltaY];
|
|
373
|
+
}, z = function(e) {
|
|
373
374
|
return e && "current" in e ? e.current : e;
|
|
374
|
-
},
|
|
375
|
+
}, Ne = function(e, t) {
|
|
375
376
|
return e[0] === t[0] && e[1] === t[1];
|
|
376
|
-
},
|
|
377
|
+
}, Le = function(e) {
|
|
377
378
|
return `
|
|
378
379
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
379
380
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
380
381
|
`);
|
|
381
|
-
},
|
|
382
|
+
}, Be = 0, T = [];
|
|
382
383
|
function xe(e) {
|
|
383
|
-
var t = l.useRef([]), n = l.useRef([0, 0]), r = l.useRef(), a = l.useState(
|
|
384
|
+
var t = l.useRef([]), n = l.useRef([0, 0]), r = l.useRef(), a = l.useState(Be++)[0], c = l.useState(_)[0], u = l.useRef(e);
|
|
384
385
|
l.useEffect(function() {
|
|
385
386
|
u.current = e;
|
|
386
387
|
}, [e]), l.useEffect(function() {
|
|
387
388
|
if (e.inert) {
|
|
388
389
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
389
|
-
var o =
|
|
390
|
+
var o = J([e.lockRef.current], (e.shards || []).map(z), !0).filter(Boolean);
|
|
390
391
|
return o.forEach(function(f) {
|
|
391
392
|
return f.classList.add("allow-interactivity-".concat(a));
|
|
392
393
|
}), function() {
|
|
@@ -399,65 +400,65 @@ function xe(e) {
|
|
|
399
400
|
var i = l.useCallback(function(o, f) {
|
|
400
401
|
if ("touches" in o && o.touches.length === 2 || o.type === "wheel" && o.ctrlKey)
|
|
401
402
|
return !u.current.allowPinchZoom;
|
|
402
|
-
var
|
|
403
|
+
var h = B(o), s = n.current, y = "deltaX" in o ? o.deltaX : s[0] - h[0], S = "deltaY" in o ? o.deltaY : s[1] - h[1], d, k = o.target, w = Math.abs(y) > Math.abs(S) ? "h" : "v";
|
|
403
404
|
if ("touches" in o && w === "h" && k.type === "range")
|
|
404
405
|
return !1;
|
|
405
|
-
var
|
|
406
|
-
if (!
|
|
406
|
+
var N = H(w, k);
|
|
407
|
+
if (!N)
|
|
407
408
|
return !0;
|
|
408
|
-
if (
|
|
409
|
+
if (N ? d = w : (d = w === "v" ? "h" : "v", N = H(w, k)), !N)
|
|
409
410
|
return !1;
|
|
410
|
-
if (!r.current && "changedTouches" in o && (
|
|
411
|
+
if (!r.current && "changedTouches" in o && (y || S) && (r.current = d), !d)
|
|
411
412
|
return !0;
|
|
412
|
-
var
|
|
413
|
-
return
|
|
414
|
-
}, []),
|
|
413
|
+
var Y = r.current || d;
|
|
414
|
+
return Me(Y, f, o, Y === "h" ? y : S);
|
|
415
|
+
}, []), m = l.useCallback(function(o) {
|
|
415
416
|
var f = o;
|
|
416
|
-
if (!(!
|
|
417
|
-
var
|
|
418
|
-
return
|
|
417
|
+
if (!(!T.length || T[T.length - 1] !== c)) {
|
|
418
|
+
var h = "deltaY" in f ? F(f) : B(f), s = t.current.filter(function(d) {
|
|
419
|
+
return d.name === f.type && (d.target === f.target || f.target === d.shadowParent) && Ne(d.delta, h);
|
|
419
420
|
})[0];
|
|
420
|
-
if (
|
|
421
|
+
if (s && s.should) {
|
|
421
422
|
f.cancelable && f.preventDefault();
|
|
422
423
|
return;
|
|
423
424
|
}
|
|
424
|
-
if (!
|
|
425
|
-
var
|
|
426
|
-
return
|
|
427
|
-
}), S =
|
|
425
|
+
if (!s) {
|
|
426
|
+
var y = (u.current.shards || []).map(z).filter(Boolean).filter(function(d) {
|
|
427
|
+
return d.contains(f.target);
|
|
428
|
+
}), S = y.length > 0 ? i(f, y[0]) : !u.current.noIsolation;
|
|
428
429
|
S && f.cancelable && f.preventDefault();
|
|
429
430
|
}
|
|
430
431
|
}
|
|
431
|
-
}, []),
|
|
432
|
-
var
|
|
433
|
-
t.current.push(
|
|
432
|
+
}, []), g = l.useCallback(function(o, f, h, s) {
|
|
433
|
+
var y = { name: o, delta: f, target: h, should: s, shadowParent: Oe(h) };
|
|
434
|
+
t.current.push(y), setTimeout(function() {
|
|
434
435
|
t.current = t.current.filter(function(S) {
|
|
435
|
-
return S !==
|
|
436
|
+
return S !== y;
|
|
436
437
|
});
|
|
437
438
|
}, 1);
|
|
438
|
-
}, []),
|
|
439
|
-
n.current =
|
|
439
|
+
}, []), v = l.useCallback(function(o) {
|
|
440
|
+
n.current = B(o), r.current = void 0;
|
|
440
441
|
}, []), p = l.useCallback(function(o) {
|
|
441
|
-
|
|
442
|
+
g(o.type, F(o), o.target, i(o, e.lockRef.current));
|
|
442
443
|
}, []), R = l.useCallback(function(o) {
|
|
443
|
-
|
|
444
|
+
g(o.type, B(o), o.target, i(o, e.lockRef.current));
|
|
444
445
|
}, []);
|
|
445
446
|
l.useEffect(function() {
|
|
446
|
-
return
|
|
447
|
+
return T.push(c), e.setCallbacks({
|
|
447
448
|
onScrollCapture: p,
|
|
448
449
|
onWheelCapture: p,
|
|
449
450
|
onTouchMoveCapture: R
|
|
450
|
-
}), document.addEventListener("wheel",
|
|
451
|
-
|
|
451
|
+
}), document.addEventListener("wheel", m, P), document.addEventListener("touchmove", m, P), document.addEventListener("touchstart", v, P), function() {
|
|
452
|
+
T = T.filter(function(o) {
|
|
452
453
|
return o !== c;
|
|
453
|
-
}), document.removeEventListener("wheel",
|
|
454
|
+
}), document.removeEventListener("wheel", m, P), document.removeEventListener("touchmove", m, P), document.removeEventListener("touchstart", v, P);
|
|
454
455
|
};
|
|
455
456
|
}, []);
|
|
456
457
|
var C = e.removeScrollBar, E = e.inert;
|
|
457
458
|
return l.createElement(
|
|
458
459
|
l.Fragment,
|
|
459
460
|
null,
|
|
460
|
-
E ? l.createElement(c, { styles:
|
|
461
|
+
E ? l.createElement(c, { styles: Le(a) }) : null,
|
|
461
462
|
C ? l.createElement(pe, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
462
463
|
);
|
|
463
464
|
}
|
|
@@ -466,14 +467,11 @@ function Oe(e) {
|
|
|
466
467
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
467
468
|
return t;
|
|
468
469
|
}
|
|
469
|
-
const Ae = le(
|
|
470
|
+
const Ae = le(Q, xe);
|
|
470
471
|
var Ie = l.forwardRef(function(e, t) {
|
|
471
472
|
return l.createElement(A, b({}, e, { ref: t, sideCar: Ae }));
|
|
472
473
|
});
|
|
473
474
|
Ie.classNames = A.classNames;
|
|
474
475
|
export {
|
|
475
|
-
Ie as R
|
|
476
|
-
ie as a,
|
|
477
|
-
Xe as c,
|
|
478
|
-
ce as u
|
|
476
|
+
Ie as R
|
|
479
477
|
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Body as b } from "./components/Modal/components/Body/Body.js";
|
|
2
|
+
import { Footer as g } from "./components/Modal/components/Footer/Footer.js";
|
|
3
|
+
import { Header as v } from "./components/Modal/components/Header/Header.js";
|
|
4
|
+
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
5
|
+
import { Children as s, isValidElement as m, useEffect as w } from "react";
|
|
6
|
+
import { r as x } from "./index-BCGvACM9.js";
|
|
7
|
+
import { R as A } from "./index--EmNlyHx.js";
|
|
8
|
+
import { R as E } from "./Combination-VYaRRJBZ.js";
|
|
9
|
+
import { cn as p } from "./utils/index.js";
|
|
10
|
+
import { buttonCloseVariants as N, modalVariants as R } from "./components/Modal/components/Wrapper/Wrapper.variants.js";
|
|
11
|
+
import { X as k } from "./x-BPcqkRZd.js";
|
|
12
|
+
const B = ({
|
|
13
|
+
children: e,
|
|
14
|
+
theme: o,
|
|
15
|
+
className: d,
|
|
16
|
+
buttonCloseClassName: i,
|
|
17
|
+
onClose: n
|
|
18
|
+
}) => {
|
|
19
|
+
const c = s.toArray(e).find(
|
|
20
|
+
(r) => m(r) && r.type === t.Header
|
|
21
|
+
), f = s.toArray(e).find(
|
|
22
|
+
(r) => m(r) && r.type === t.Body
|
|
23
|
+
), y = s.toArray(e).find(
|
|
24
|
+
(r) => m(r) && r.type === t.Footer
|
|
25
|
+
), u = s.toArray(e).filter(
|
|
26
|
+
(r) => !m(r) || ![t.Header, t.Body, t.Footer].includes(
|
|
27
|
+
r.type
|
|
28
|
+
)
|
|
29
|
+
);
|
|
30
|
+
return /* @__PURE__ */ a(E, { children: /* @__PURE__ */ l(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
className: "fixed inset-0 grid place-content-center",
|
|
34
|
+
"data-theme": o,
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ a(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: "absolute inset-0 bg-black opacity-75 animate-in fade-in-0",
|
|
40
|
+
onClick: n,
|
|
41
|
+
role: "presentation"
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ l(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: p(
|
|
48
|
+
R({
|
|
49
|
+
className: d
|
|
50
|
+
})
|
|
51
|
+
),
|
|
52
|
+
role: "dialog",
|
|
53
|
+
"aria-modal": "true",
|
|
54
|
+
children: [
|
|
55
|
+
c,
|
|
56
|
+
/* @__PURE__ */ l(
|
|
57
|
+
"button",
|
|
58
|
+
{
|
|
59
|
+
className: p(
|
|
60
|
+
N({
|
|
61
|
+
className: i
|
|
62
|
+
})
|
|
63
|
+
),
|
|
64
|
+
onClick: n,
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ a(k, {}),
|
|
67
|
+
/* @__PURE__ */ a(A, { children: "Dismiss modal" })
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
f ?? u,
|
|
72
|
+
y
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
) });
|
|
79
|
+
}, t = ({ isOpen: e, onClose: o, ...d }) => (w(() => {
|
|
80
|
+
const i = new AbortController(), n = (c) => {
|
|
81
|
+
c.code === "Escape" && (o == null || o());
|
|
82
|
+
};
|
|
83
|
+
return window.addEventListener("keydown", n, {
|
|
84
|
+
signal: i.signal
|
|
85
|
+
}), () => {
|
|
86
|
+
i.abort();
|
|
87
|
+
};
|
|
88
|
+
}, [o]), e ? x.createPortal(
|
|
89
|
+
/* @__PURE__ */ a(B, { ...d, onClose: o }),
|
|
90
|
+
document.body
|
|
91
|
+
) : null);
|
|
92
|
+
t.Header = v;
|
|
93
|
+
t.Body = b;
|
|
94
|
+
t.Footer = g;
|
|
95
|
+
export {
|
|
96
|
+
t as M,
|
|
97
|
+
B as W
|
|
98
|
+
};
|
|
@@ -3,7 +3,7 @@ import { useRef as b, useState as C, useMemo as V, isValidElement as v, useCallb
|
|
|
3
3
|
import { V as x } from "../../index--EmNlyHx.js";
|
|
4
4
|
import { cn as m } from "../../utils/index.js";
|
|
5
5
|
import { closeButtonVariants as y, alertVariants as A } from "./Alert.variants.js";
|
|
6
|
-
import { X as E } from "../../x-
|
|
6
|
+
import { X as E } from "../../x-BPcqkRZd.js";
|
|
7
7
|
const B = ({
|
|
8
8
|
theme: c,
|
|
9
9
|
type: o,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { R as A, A as D, P as v, O as j, C as k, T, D as w, a as P, b as R } from "../../index-
|
|
2
|
+
import { R as A, A as D, P as v, O as j, C as k, T, D as w, a as P, b as R } from "../../index-BNU3RH-3.js";
|
|
3
3
|
import { Button as l } from "../Button/Button.js";
|
|
4
4
|
import { cn as t } from "../../utils/index.js";
|
|
5
5
|
import { useAlertDialog as z } from "./hooks/useAlertDialog.js";
|
|
@@ -3,7 +3,7 @@ import u, { forwardRef as b, useId as v, Fragment as y } from "react";
|
|
|
3
3
|
import { cn as h } from "../../utils/index.js";
|
|
4
4
|
import { breadcrumbVariants as O, breadcrumbWrapperVariants as j } from "./Breadcrumb.variants.js";
|
|
5
5
|
import { Item as w } from "./components/Item/Item.js";
|
|
6
|
-
import { P as l } from "../../index-
|
|
6
|
+
import { P as l } from "../../index-h-Ul0anl.js";
|
|
7
7
|
function m() {
|
|
8
8
|
return m = Object.assign || function(r) {
|
|
9
9
|
for (var o = 1; o < arguments.length; o++) {
|
|
@@ -9,7 +9,7 @@ import { P as w } from "../../index-BCGvACM9.js";
|
|
|
9
9
|
import { cn as T } from "../../utils/index.js";
|
|
10
10
|
import { checkboxVariants as te, labelVariants as re } from "./Checkbox.variants.js";
|
|
11
11
|
import { useToggle as oe } from "../../hooks/useToggle.js";
|
|
12
|
-
import { P as y } from "../../index-
|
|
12
|
+
import { P as y } from "../../index-h-Ul0anl.js";
|
|
13
13
|
function R() {
|
|
14
14
|
return R = Object.assign || function(e) {
|
|
15
15
|
for (var c = 1; c < arguments.length; c++) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { R as s, D as p } from "../../index-
|
|
2
|
+
import { R as s, D as p } from "../../index-DLYwlPRZ.js";
|
|
3
3
|
import { V as l } from "../../index--EmNlyHx.js";
|
|
4
4
|
import { cn as m } from "../../utils/index.js";
|
|
5
5
|
import { wrapperVariants as f } from "./Command.variants.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as p } from "react";
|
|
3
|
-
import { _ as o } from "../../../index-
|
|
3
|
+
import { _ as o } from "../../../index-Dkt8F6CZ.js";
|
|
4
4
|
const s = p(({ className: r, children: a, ...e }, i) => /* @__PURE__ */ m(o, { ref: i, className: r, ...e, children: /* @__PURE__ */ m("div", { className: "w-[500px]", children: a }) }));
|
|
5
5
|
s.displayName = o.displayName;
|
|
6
6
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as p } from "react";
|
|
3
|
-
import { _ as o } from "../../../index-
|
|
3
|
+
import { _ as o } from "../../../index-Dkt8F6CZ.js";
|
|
4
4
|
import { cn as a } from "../../../utils/index.js";
|
|
5
5
|
const t = p(({ className: r, ...m }, d) => /* @__PURE__ */ e(
|
|
6
6
|
o.Group,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as y, jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { _ as m } from "../../../index-
|
|
2
|
+
import { _ as m } from "../../../index-Dkt8F6CZ.js";
|
|
3
3
|
import s, { forwardRef as u } from "react";
|
|
4
4
|
import { cn as f } from "../../../utils/index.js";
|
|
5
5
|
import { searchInconInputVariants as v, inputVariants as g } from "../Command.variants.js";
|
|
6
|
-
import { P as a } from "../../../index-
|
|
6
|
+
import { P as a } from "../../../index-h-Ul0anl.js";
|
|
7
7
|
function p() {
|
|
8
8
|
return p = Object.assign || function(r) {
|
|
9
9
|
for (var n = 1; n < arguments.length; n++) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as i, useContext as p, useCallback as c } from "react";
|
|
3
|
-
import { _ as r } from "../../../index-
|
|
3
|
+
import { _ as r } from "../../../index-Dkt8F6CZ.js";
|
|
4
4
|
import { cn as l } from "../../../utils/index.js";
|
|
5
5
|
import { CommandContext as u } from "../contexts/Command.context.js";
|
|
6
6
|
const f = i(({ className: a, onSelect: e, ...s }, o) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as s } from "react";
|
|
3
|
-
import { _ as o } from "../../../index-
|
|
3
|
+
import { _ as o } from "../../../index-Dkt8F6CZ.js";
|
|
4
4
|
import { cn as t } from "../../../utils/index.js";
|
|
5
5
|
const e = s(({ className: m, ...r }, a) => /* @__PURE__ */ i(
|
|
6
6
|
o.List,
|