@konstructio/ui 0.1.0-alpha.5 → 0.1.0-alpha.6
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-Dyw3lLGQ.js} +49 -55
- package/dist/Modal-CdsrVAoM.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 +1 -1
- 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-CI55pdPK.js} +1 -1
- package/dist/{index-Cz09twLl.js → index-Cj4IZ4ka.js} +1 -1
- package/dist/{index-1RDo-S_f.js → index-Cod3awtw.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 +1 -1
- package/dist/styles.css +1 -1
- package/dist/{x-DU-Zw-L_.js → x-BPcqkRZd.js} +1 -1
- package/package.json +1 -1
- 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,14 +47,14 @@ 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, D = /* @__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
|
|
57
|
+
return ne(function() {
|
|
58
58
|
var r = D.get(n);
|
|
59
59
|
if (r) {
|
|
60
60
|
var a = new Set(r), c = new Set(e), u = n.current;
|
|
@@ -67,11 +67,11 @@ function ce(e, t) {
|
|
|
67
67
|
D.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)
|
|
@@ -125,15 +125,12 @@ function Q(e, t) {
|
|
|
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
|
-
var
|
|
133
|
+
var _ = function(e) {
|
|
137
134
|
var t = e.sideCar, n = Z(e, ["sideCar"]);
|
|
138
135
|
if (!t)
|
|
139
136
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
@@ -142,21 +139,21 @@ var G = function(e) {
|
|
|
142
139
|
throw new Error("Sidecar medium not found");
|
|
143
140
|
return l.createElement(r, b({}, n));
|
|
144
141
|
};
|
|
145
|
-
|
|
142
|
+
_.isSideCarExport = !0;
|
|
146
143
|
function le(e, t) {
|
|
147
|
-
return e.useMedium(t),
|
|
144
|
+
return e.useMedium(t), _;
|
|
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, h = e.className, m = e.removeScrollBar, d = e.enabled, p = e.shards, R = e.sideCar, C = e.noRelative, E = e.noIsolation, o = e.inert, f = e.allowPinchZoom, v = e.as, y = v === void 0 ? "div" : v, g = e.gapMode, S = Z(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), s = R, k =
|
|
152
|
+
}), a = r[0], c = r[1], u = e.forwardProps, i = e.children, h = e.className, m = e.removeScrollBar, d = e.enabled, p = e.shards, R = e.sideCar, C = e.noRelative, E = e.noIsolation, o = e.inert, f = e.allowPinchZoom, v = e.as, y = v === void 0 ? "div" : v, g = e.gapMode, S = Z(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), s = R, k = ae([n, t]), w = b(b({}, S), a);
|
|
156
153
|
return l.createElement(
|
|
157
154
|
l.Fragment,
|
|
158
155
|
null,
|
|
159
|
-
d && l.createElement(s, { sideCar:
|
|
156
|
+
d && l.createElement(s, { sideCar: Q, removeScrollBar: m, shards: p, noRelative: C, noIsolation: E, inert: o, setCallbacks: c, allowPinchZoom: !!f, lockRef: n, gapMode: g }),
|
|
160
157
|
u ? l.cloneElement(l.Children.only(i), b(b({}, w), { ref: k })) : l.createElement(y, b({}, w, { className: h, ref: k }), i)
|
|
161
158
|
);
|
|
162
159
|
});
|
|
@@ -207,7 +204,7 @@ var ve = function() {
|
|
|
207
204
|
};
|
|
208
205
|
}, [t && n]);
|
|
209
206
|
};
|
|
210
|
-
},
|
|
207
|
+
}, G = 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;
|
|
@@ -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 = G(), 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) {
|
|
@@ -308,7 +305,7 @@ if (typeof window < "u")
|
|
|
308
305
|
}
|
|
309
306
|
var P = Y ? { passive: !1 } : !1, Ce = function(e) {
|
|
310
307
|
return e.tagName === "TEXTAREA";
|
|
311
|
-
},
|
|
308
|
+
}, K = 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 K(e, "overflowY");
|
|
322
319
|
}, Re = function(e) {
|
|
323
|
-
return
|
|
320
|
+
return K(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 = U(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,17 +345,17 @@ var P = Y ? { passive: !1 } : !1, Ce = function(e) {
|
|
|
348
345
|
n,
|
|
349
346
|
r
|
|
350
347
|
];
|
|
351
|
-
},
|
|
348
|
+
}, U = 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
|
+
}, Le = 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 = Le(e, window.getComputedStyle(t).direction), u = c * r, i = n.target, h = t.contains(i), m = !1, d = u > 0, p = 0, R = 0;
|
|
359
356
|
do {
|
|
360
|
-
var C =
|
|
361
|
-
(E || v) &&
|
|
357
|
+
var C = $(e, i), E = C[0], o = C[1], f = C[2], v = o - f - c * E;
|
|
358
|
+
(E || v) && U(e, i) && (p += v, R += E), i = i.parentNode.host || i.parentNode;
|
|
362
359
|
} while (
|
|
363
360
|
// portaled content
|
|
364
361
|
!h && i !== document.body || // self content
|
|
@@ -378,15 +375,15 @@ var P = Y ? { passive: !1 } : !1, Ce = function(e) {
|
|
|
378
375
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
379
376
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
380
377
|
`);
|
|
381
|
-
}, Ne = 0,
|
|
378
|
+
}, Ne = 0, L = [];
|
|
382
379
|
function xe(e) {
|
|
383
|
-
var t = l.useRef([]), n = l.useRef([0, 0]), r = l.useRef(), a = l.useState(Ne++)[0], c = l.useState(
|
|
380
|
+
var t = l.useRef([]), n = l.useRef([0, 0]), r = l.useRef(), a = l.useState(Ne++)[0], c = l.useState(G)[0], u = l.useRef(e);
|
|
384
381
|
l.useEffect(function() {
|
|
385
382
|
u.current = e;
|
|
386
383
|
}, [e]), l.useEffect(function() {
|
|
387
384
|
if (e.inert) {
|
|
388
385
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
389
|
-
var o =
|
|
386
|
+
var o = J([e.lockRef.current], (e.shards || []).map(F), !0).filter(Boolean);
|
|
390
387
|
return o.forEach(function(f) {
|
|
391
388
|
return f.classList.add("allow-interactivity-".concat(a));
|
|
392
389
|
}), function() {
|
|
@@ -410,10 +407,10 @@ function xe(e) {
|
|
|
410
407
|
if (!r.current && "changedTouches" in o && (g || S) && (r.current = s), !s)
|
|
411
408
|
return !0;
|
|
412
409
|
var j = r.current || s;
|
|
413
|
-
return
|
|
410
|
+
return Me(j, f, o, j === "h" ? g : S);
|
|
414
411
|
}, []), h = l.useCallback(function(o) {
|
|
415
412
|
var f = o;
|
|
416
|
-
if (!(!
|
|
413
|
+
if (!(!L.length || L[L.length - 1] !== c)) {
|
|
417
414
|
var v = "deltaY" in f ? z(f) : N(f), y = t.current.filter(function(s) {
|
|
418
415
|
return s.name === f.type && (s.target === f.target || f.target === s.shadowParent) && Te(s.delta, v);
|
|
419
416
|
})[0];
|
|
@@ -443,12 +440,12 @@ function xe(e) {
|
|
|
443
440
|
m(o.type, N(o), o.target, i(o, e.lockRef.current));
|
|
444
441
|
}, []);
|
|
445
442
|
l.useEffect(function() {
|
|
446
|
-
return
|
|
443
|
+
return L.push(c), e.setCallbacks({
|
|
447
444
|
onScrollCapture: p,
|
|
448
445
|
onWheelCapture: p,
|
|
449
446
|
onTouchMoveCapture: R
|
|
450
447
|
}), document.addEventListener("wheel", h, P), document.addEventListener("touchmove", h, P), document.addEventListener("touchstart", d, P), function() {
|
|
451
|
-
|
|
448
|
+
L = L.filter(function(o) {
|
|
452
449
|
return o !== c;
|
|
453
450
|
}), document.removeEventListener("wheel", h, P), document.removeEventListener("touchmove", h, P), document.removeEventListener("touchstart", d, P);
|
|
454
451
|
};
|
|
@@ -466,14 +463,11 @@ function Oe(e) {
|
|
|
466
463
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
467
464
|
return t;
|
|
468
465
|
}
|
|
469
|
-
const Ae = le(
|
|
466
|
+
const Ae = le(Q, xe);
|
|
470
467
|
var Ie = l.forwardRef(function(e, t) {
|
|
471
468
|
return l.createElement(A, b({}, e, { ref: t, sideCar: Ae }));
|
|
472
469
|
});
|
|
473
470
|
Ie.classNames = A.classNames;
|
|
474
471
|
export {
|
|
475
|
-
Ie as R
|
|
476
|
-
ie as a,
|
|
477
|
-
Xe as c,
|
|
478
|
-
ce as u
|
|
472
|
+
Ie as R
|
|
479
473
|
};
|
|
@@ -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-Dyw3lLGQ.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-CI55pdPK.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-Cod3awtw.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-Cj4IZ4ka.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-Cj4IZ4ka.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-Cj4IZ4ka.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-Cj4IZ4ka.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-Cj4IZ4ka.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,
|
|
@@ -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 r } from "../../../index-
|
|
3
|
+
import { _ as r } from "../../../index-Cj4IZ4ka.js";
|
|
4
4
|
import { cn as t } from "../../../utils/index.js";
|
|
5
5
|
const s = p(({ className: o, ...a }, m) => /* @__PURE__ */ e(
|
|
6
6
|
r.Separator,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as t, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as i } from "react";
|
|
3
|
-
import { a as r, C as o, b as l } from "../../../index-
|
|
3
|
+
import { a as r, C as o, b as l } from "../../../index-Cod3awtw.js";
|
|
4
4
|
import { cn as m } from "../../../utils/index.js";
|
|
5
5
|
import { DialogOverlay as p } from "./DialogOverlay.js";
|
|
6
|
-
import { X as c } from "../../../x-
|
|
6
|
+
import { X as c } from "../../../x-BPcqkRZd.js";
|
|
7
7
|
const f = i(({ className: e, children: s, ...n }, d) => /* @__PURE__ */ t(r, { children: [
|
|
8
8
|
/* @__PURE__ */ a(p, {}),
|
|
9
9
|
/* @__PURE__ */ t(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as d } from "react";
|
|
3
|
-
import { O as a } from "../../../index-
|
|
3
|
+
import { O as a } from "../../../index-Cod3awtw.js";
|
|
4
4
|
import { cn as i } from "../../../utils/index.js";
|
|
5
5
|
const m = d(({ className: t, ...e }, o) => /* @__PURE__ */ s(
|
|
6
6
|
a,
|
|
@@ -1,60 +1,64 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { useNavigationUlList as
|
|
5
|
-
import { ListItem as
|
|
6
|
-
import { listVariants as
|
|
7
|
-
import { useDropdownContext as
|
|
8
|
-
const
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as v, useRef as w, useImperativeHandle as N } from "react";
|
|
3
|
+
import { cn as h } from "../../../../utils/index.js";
|
|
4
|
+
import { useNavigationUlList as x } from "../../hooks/useNavigationList.js";
|
|
5
|
+
import { ListItem as s } from "../ListItem/ListItem.js";
|
|
6
|
+
import { listVariants as C } from "./List.variants.js";
|
|
7
|
+
import { useDropdownContext as k } from "../../contexts/dropdown.hook.js";
|
|
8
|
+
const T = v(
|
|
9
9
|
({
|
|
10
|
-
className:
|
|
11
|
-
isLoading:
|
|
12
|
-
itemClassName:
|
|
13
|
-
name:
|
|
14
|
-
options:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
className: i,
|
|
11
|
+
isLoading: n,
|
|
12
|
+
itemClassName: o,
|
|
13
|
+
name: c,
|
|
14
|
+
options: r,
|
|
15
|
+
searchable: m = !1,
|
|
16
|
+
wrapperInputRef: f,
|
|
17
|
+
wrapperRef: p
|
|
18
|
+
}, u) => {
|
|
19
|
+
const l = w(null), { isOpen: b, searchTerm: d } = k();
|
|
20
|
+
N(u, () => l.current, [l]), x({ ulRef: l, wrapperRef: p, wrapperInputRef: f });
|
|
21
|
+
const a = m ? r.filter((e) => {
|
|
22
|
+
const g = d.toLowerCase();
|
|
23
|
+
return (typeof e.label == "string" ? e.label.toLowerCase() : "").includes(g);
|
|
24
|
+
}) : r, L = a.length === 0;
|
|
25
|
+
return /* @__PURE__ */ t(
|
|
22
26
|
"ul",
|
|
23
27
|
{
|
|
24
|
-
ref:
|
|
25
|
-
title:
|
|
28
|
+
ref: l,
|
|
29
|
+
title: c,
|
|
26
30
|
role: "listbox",
|
|
27
|
-
className:
|
|
28
|
-
"data-state":
|
|
29
|
-
children:
|
|
30
|
-
|
|
31
|
+
className: h(C({ className: i })),
|
|
32
|
+
"data-state": b ? "open" : "closed",
|
|
33
|
+
children: n ? /* @__PURE__ */ t(
|
|
34
|
+
s,
|
|
31
35
|
{
|
|
32
|
-
className:
|
|
36
|
+
className: o,
|
|
33
37
|
isClickable: !1,
|
|
34
38
|
value: "Loading...",
|
|
35
39
|
label: "Loading..."
|
|
36
40
|
}
|
|
37
|
-
) :
|
|
38
|
-
|
|
41
|
+
) : L ? /* @__PURE__ */ t(
|
|
42
|
+
s,
|
|
39
43
|
{
|
|
40
|
-
className:
|
|
44
|
+
className: o,
|
|
41
45
|
isClickable: !1,
|
|
42
46
|
value: "No options",
|
|
43
47
|
label: "No options"
|
|
44
48
|
}
|
|
45
|
-
) :
|
|
46
|
-
|
|
49
|
+
) : a.map((e) => /* @__PURE__ */ t(
|
|
50
|
+
s,
|
|
47
51
|
{
|
|
48
|
-
className:
|
|
52
|
+
className: o,
|
|
49
53
|
isClickable: !0,
|
|
50
|
-
...
|
|
54
|
+
...e
|
|
51
55
|
},
|
|
52
|
-
|
|
56
|
+
e.value
|
|
53
57
|
))
|
|
54
58
|
}
|
|
55
59
|
);
|
|
56
60
|
}
|
|
57
61
|
);
|
|
58
62
|
export {
|
|
59
|
-
|
|
63
|
+
T as List
|
|
60
64
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
const a =
|
|
1
|
+
import { c as o } from "../../../../index-BNmRGtA6.js";
|
|
2
|
+
const a = o([
|
|
3
3
|
"absolute",
|
|
4
4
|
"bg-white",
|
|
5
5
|
"border",
|
|
@@ -18,7 +18,7 @@ const a = t([
|
|
|
18
18
|
"overflow-y-auto",
|
|
19
19
|
"border-gray-200",
|
|
20
20
|
"text-zinc-700",
|
|
21
|
-
"data-[state=open]:
|
|
21
|
+
"data-[state=open]:block",
|
|
22
22
|
"data-[state=closed]:hidden"
|
|
23
23
|
]);
|
|
24
24
|
export {
|