@clasing/ui 0.1.123 → 0.1.125
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/badge-BnerQ2lF.js +85 -0
- package/dist/badge-Czof3oqL.cjs +1 -0
- package/dist/button-Cegl49Yi.cjs +1 -0
- package/dist/button-DddHyyHa.js +504 -0
- package/dist/calendar-BAQkzm4v.js +117 -0
- package/dist/calendar-DL8gqdRp.cjs +1 -0
- package/dist/card-BCgtou88.cjs +1 -0
- package/dist/card-BfBXE5Kq.js +90 -0
- package/dist/chip-A32aAc-8.cjs +1 -0
- package/dist/chip-ZZHZ8i1Q.js +127 -0
- package/dist/command-BGCSJ9vX.js +506 -0
- package/dist/command-D9M8dk1M.cjs +1 -0
- package/dist/components/accordion.cjs.js +1 -0
- package/dist/components/accordion.d.ts +7 -0
- package/dist/components/accordion.es.js +70 -0
- package/dist/components/alert-dialog.cjs.js +1 -0
- package/dist/components/alert-dialog.d.ts +14 -0
- package/dist/components/alert-dialog.es.js +146 -0
- package/dist/components/alert.cjs.js +1 -0
- package/dist/components/alert.d.ts +15 -0
- package/dist/components/alert.es.js +97 -0
- package/dist/components/avatar.cjs.js +1 -0
- package/dist/components/avatar.d.ts +6 -0
- package/dist/components/avatar.es.js +53 -0
- package/dist/components/badge.cjs.js +1 -0
- package/dist/components/badge.d.ts +18 -0
- package/dist/components/badge.es.js +4 -0
- package/dist/components/blocks/date-picker.cjs.js +1 -0
- package/dist/components/blocks/date-picker.d.ts +30 -0
- package/dist/components/blocks/date-picker.es.js +181 -0
- package/dist/components/blocks/date-range-picker.cjs.js +1 -0
- package/dist/components/blocks/date-range-picker.d.ts +29 -0
- package/dist/components/blocks/date-range-picker.es.js +238 -0
- package/dist/components/blocks/interactive-card.cjs.js +1 -0
- package/dist/components/blocks/interactive-card.d.ts +26 -0
- package/dist/components/blocks/interactive-card.es.js +138 -0
- package/dist/components/blocks/selectable-chips.cjs.js +1 -0
- package/dist/components/blocks/selectable-chips.d.ts +16 -0
- package/dist/components/blocks/selectable-chips.es.js +57 -0
- package/dist/components/breadcrumb.cjs.js +1 -0
- package/dist/components/breadcrumb.d.ts +11 -0
- package/dist/components/breadcrumb.es.js +106 -0
- package/dist/components/button.cjs.js +1 -0
- package/dist/components/button.d.ts +39 -0
- package/dist/components/button.es.js +7 -0
- package/dist/components/calendar.cjs.js +1 -0
- package/dist/components/calendar.d.ts +15 -0
- package/dist/components/calendar.es.js +4 -0
- package/dist/components/card.cjs.js +1 -0
- package/dist/components/card.d.ts +9 -0
- package/dist/components/card.es.js +10 -0
- package/dist/components/chart.cjs.js +7 -0
- package/dist/components/chart.d.ts +43 -0
- package/dist/components/chart.es.js +213 -0
- package/dist/components/checkbox.cjs.js +1 -0
- package/dist/components/checkbox.d.ts +4 -0
- package/dist/components/checkbox.es.js +31 -0
- package/dist/components/chip.cjs.js +1 -0
- package/dist/components/chip.d.ts +25 -0
- package/dist/components/chip.es.js +5 -0
- package/dist/components/collapsible.cjs.js +1 -0
- package/dist/components/collapsible.d.ts +5 -0
- package/dist/components/collapsible.es.js +34 -0
- package/dist/components/command.cjs.js +1 -0
- package/dist/components/command.d.ts +18 -0
- package/dist/components/command.es.js +12 -0
- package/dist/components/context-menu.cjs.js +1 -0
- package/dist/components/context-menu.d.ts +25 -0
- package/dist/components/context-menu.es.js +229 -0
- package/dist/components/dialog.cjs.js +1 -0
- package/dist/components/dialog.d.ts +15 -0
- package/dist/components/dialog.es.js +13 -0
- package/dist/components/divider.cjs.js +1 -0
- package/dist/components/divider.d.ts +6 -0
- package/dist/components/divider.es.js +21 -0
- package/dist/components/drawer.cjs.js +3 -0
- package/dist/components/drawer.d.ts +13 -0
- package/dist/components/drawer.es.js +1161 -0
- package/dist/components/dropdown-menu.cjs.js +1 -0
- package/dist/components/dropdown-menu.d.ts +25 -0
- package/dist/components/dropdown-menu.es.js +237 -0
- package/dist/components/hover-card.cjs.js +1 -0
- package/dist/components/hover-card.d.ts +6 -0
- package/dist/components/hover-card.es.js +38 -0
- package/dist/components/icon-component.cjs.js +1 -0
- package/dist/components/icon-component.d.ts +12 -0
- package/dist/components/icon-component.es.js +4 -0
- package/dist/components/input-otp.cjs.js +20 -0
- package/dist/components/input-otp.d.ts +11 -0
- package/dist/components/input-otp.es.js +253 -0
- package/dist/components/input.cjs.js +1 -0
- package/dist/components/input.d.ts +32 -0
- package/dist/components/input.es.js +4 -0
- package/dist/components/label.cjs.js +1 -0
- package/dist/components/label.d.ts +4 -0
- package/dist/components/label.es.js +4 -0
- package/dist/components/menubar.cjs.js +1 -0
- package/dist/components/menubar.d.ts +26 -0
- package/dist/components/menubar.es.js +257 -0
- package/dist/components/multi-select.cjs.js +1 -0
- package/dist/components/multi-select.d.ts +32 -0
- package/dist/components/multi-select.es.js +233 -0
- package/dist/components/navigation-menu.cjs.js +1 -0
- package/dist/components/navigation-menu.d.ts +14 -0
- package/dist/components/navigation-menu.es.js +171 -0
- package/dist/components/phone-input.cjs.js +1 -0
- package/dist/components/phone-input.d.ts +14 -0
- package/dist/components/phone-input.es.js +253 -0
- package/dist/components/popover.cjs.js +1 -0
- package/dist/components/popover.d.ts +7 -0
- package/dist/components/popover.es.js +7 -0
- package/dist/components/progress.cjs.js +1 -0
- package/dist/components/progress.d.ts +4 -0
- package/dist/components/progress.es.js +31 -0
- package/dist/components/resizable.cjs.js +1 -0
- package/dist/components/resizable.d.ts +8 -0
- package/dist/components/resizable.es.js +1551 -0
- package/dist/components/scroll-area.cjs.js +1 -0
- package/dist/components/scroll-area.d.ts +5 -0
- package/dist/components/scroll-area.es.js +5 -0
- package/dist/components/select.cjs.js +1 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/select.es.js +179 -0
- package/dist/components/sheet.cjs.js +1 -0
- package/dist/components/sheet.d.ts +13 -0
- package/dist/components/sheet.es.js +126 -0
- package/dist/components/skeleton.cjs.js +1 -0
- package/dist/components/skeleton.d.ts +2 -0
- package/dist/components/skeleton.es.js +15 -0
- package/dist/components/slider.cjs.js +1 -0
- package/dist/components/slider.d.ts +4 -0
- package/dist/components/slider.es.js +63 -0
- package/dist/components/sonner.cjs.js +1 -0
- package/dist/components/sonner.d.ts +3 -0
- package/dist/components/sonner.es.js +68 -0
- package/dist/components/switch.cjs.js +1 -0
- package/dist/components/switch.d.ts +11 -0
- package/dist/components/switch.es.js +82 -0
- package/dist/components/table.cjs.js +1 -0
- package/dist/components/table.d.ts +10 -0
- package/dist/components/table.es.js +114 -0
- package/dist/components/toggle-group.cjs.js +1 -0
- package/dist/components/toggle-group.d.ts +7 -0
- package/dist/components/toggle-group.es.js +62 -0
- package/dist/components/toggle.cjs.js +1 -0
- package/dist/components/toggle.d.ts +9 -0
- package/dist/components/toggle.es.js +5 -0
- package/dist/components/tooltip.cjs.js +1 -0
- package/dist/components/tooltip.d.ts +7 -0
- package/dist/components/tooltip.es.js +7 -0
- package/dist/dialog-BKm2PZl2.cjs +1 -0
- package/dist/dialog-DZpF7OXg.js +136 -0
- package/dist/entries/accordion.d.ts +2 -0
- package/dist/entries/alert-dialog.d.ts +2 -0
- package/dist/entries/alert.d.ts +2 -0
- package/dist/entries/avatar.d.ts +2 -0
- package/dist/entries/badge.d.ts +2 -0
- package/dist/entries/blocks/date-picker.d.ts +2 -0
- package/dist/entries/blocks/date-range-picker.d.ts +2 -0
- package/dist/entries/blocks/interactive-card.d.ts +2 -0
- package/dist/entries/blocks/selectable-chips.d.ts +2 -0
- package/dist/entries/breadcrumb.d.ts +2 -0
- package/dist/entries/button.d.ts +2 -0
- package/dist/entries/calendar.d.ts +2 -0
- package/dist/entries/card.d.ts +2 -0
- package/dist/entries/chart.d.ts +2 -0
- package/dist/entries/checkbox.d.ts +2 -0
- package/dist/entries/chip.d.ts +2 -0
- package/dist/entries/collapsible.d.ts +2 -0
- package/dist/entries/command.d.ts +2 -0
- package/dist/entries/context-menu.d.ts +2 -0
- package/dist/entries/dialog.d.ts +2 -0
- package/dist/entries/divider.d.ts +2 -0
- package/dist/entries/drawer.d.ts +2 -0
- package/dist/entries/dropdown-menu.d.ts +2 -0
- package/dist/entries/hooks/useOutsideClick.d.ts +2 -0
- package/dist/entries/hover-card.d.ts +2 -0
- package/dist/entries/icon-component.d.ts +2 -0
- package/dist/entries/input-otp.d.ts +2 -0
- package/dist/entries/input.d.ts +2 -0
- package/dist/entries/label.d.ts +2 -0
- package/dist/entries/menubar.d.ts +2 -0
- package/dist/entries/multi-select.d.ts +2 -0
- package/dist/entries/navigation-menu.d.ts +2 -0
- package/dist/entries/phone-input.d.ts +2 -0
- package/dist/entries/popover.d.ts +2 -0
- package/dist/entries/progress.d.ts +2 -0
- package/dist/entries/resizable.d.ts +2 -0
- package/dist/entries/scroll-area.d.ts +2 -0
- package/dist/entries/select.d.ts +2 -0
- package/dist/entries/sheet.d.ts +2 -0
- package/dist/entries/skeleton.d.ts +2 -0
- package/dist/entries/slider.d.ts +2 -0
- package/dist/entries/sonner.d.ts +2 -0
- package/dist/entries/switch.d.ts +2 -0
- package/dist/entries/table.d.ts +2 -0
- package/dist/entries/toggle-group.d.ts +2 -0
- package/dist/entries/toggle.d.ts +2 -0
- package/dist/entries/tooltip.d.ts +2 -0
- package/dist/entries/utils/types.d.ts +2 -0
- package/dist/hooks/useOutsideClick.cjs.js +1 -0
- package/dist/hooks/useOutsideClick.d.ts +6 -0
- package/dist/hooks/useOutsideClick.es.js +14 -0
- package/dist/icon-component-BZ-4FDV6.js +49 -0
- package/dist/icon-component-LY_vGYHZ.cjs +1 -0
- package/dist/index-BqtVL8d-.js +34 -0
- package/dist/index-C8P6Mn4U.cjs +1 -0
- package/dist/index-CRiPKpXj.js +2743 -0
- package/dist/index-DoxiiusW.cjs +1 -0
- package/dist/input-DFPJ_mtM.cjs +1 -0
- package/dist/input-DwPDvbRE.js +174 -0
- package/dist/jsx-runtime-C5mzlN2N.js +284 -0
- package/dist/jsx-runtime-DUiatUiq.cjs +22 -0
- package/dist/label-BpDUqtrC.js +22 -0
- package/dist/label-CbzkBbPT.cjs +1 -0
- package/dist/popover-B8wp2cHF.cjs +1 -0
- package/dist/popover-BoDRCUh2.js +44 -0
- package/dist/scroll-area-CNsThIs_.js +60 -0
- package/dist/scroll-area-Dr-7opp_.cjs +1 -0
- package/dist/style-BNIXVvBA.js +1172 -0
- package/dist/style-CA5976Oh.cjs +1 -0
- package/dist/tests/setup.d.ts +1 -0
- package/dist/toggle-Dgd7L2Mq.cjs +1 -0
- package/dist/toggle-DjbiWYXD.js +44 -0
- package/dist/tooltip-Btr9ROSo.js +55 -0
- package/dist/tooltip-W9iE1O--.cjs +1 -0
- package/dist/ui.css +427 -16
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/types/index.d.ts +36 -0
- package/dist/utils/types.cjs.js +1 -0
- package/dist/utils/types.es.js +1 -0
- package/package.json +301 -38
- package/dist/index.d.ts +0 -566
- package/dist/index.es.js +0 -7538
- package/dist/index.umd.js +0 -22
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
import { j as k } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import * as G from "@radix-ui/react-dialog";
|
|
3
|
+
import * as l from "react";
|
|
4
|
+
import { Primitive as j } from "@radix-ui/react-primitive";
|
|
5
|
+
import { useId as P } from "@radix-ui/react-id";
|
|
6
|
+
import { D as Se, e as Re, h as je, c as De, b as Ae } from "./dialog-DZpF7OXg.js";
|
|
7
|
+
import { c as D } from "./index-CRiPKpXj.js";
|
|
8
|
+
import { I as _e } from "./icon-component-BZ-4FDV6.js";
|
|
9
|
+
var pe = 1, Me = 0.9, Ne = 0.8, $e = 0.17, te = 0.1, re = 0.999, Fe = 0.9999, Ke = 0.99, Pe = /[\\\/_+.#"@\[\(\{&]/, Le = /[\\\/_+.#"@\[\(\{&]/g, qe = /[\s-]/, be = /[\s-]/g;
|
|
10
|
+
function le(e, n, r, d, a, u, s) {
|
|
11
|
+
if (u === n.length) return a === e.length ? pe : Ke;
|
|
12
|
+
var f = `${a},${u}`;
|
|
13
|
+
if (s[f] !== void 0) return s[f];
|
|
14
|
+
for (var b = d.charAt(u), i = r.indexOf(b, a), v = 0, g, I, w, S; i >= 0; ) g = le(e, n, r, d, i + 1, u + 1, s), g > v && (i === a ? g *= pe : Pe.test(e.charAt(i - 1)) ? (g *= Ne, w = e.slice(a, i - 1).match(Le), w && a > 0 && (g *= Math.pow(re, w.length))) : qe.test(e.charAt(i - 1)) ? (g *= Me, S = e.slice(a, i - 1).match(be), S && a > 0 && (g *= Math.pow(re, S.length))) : (g *= $e, a > 0 && (g *= Math.pow(re, i - a))), e.charAt(i) !== n.charAt(u) && (g *= Fe)), (g < te && r.charAt(i - 1) === d.charAt(u + 1) || d.charAt(u + 1) === d.charAt(u) && r.charAt(i - 1) !== d.charAt(u)) && (I = le(e, n, r, d, i + 1, u + 2, s), I * te > g && (g = I * te)), g > v && (v = g), i = r.indexOf(b, i + 1);
|
|
15
|
+
return s[f] = v, v;
|
|
16
|
+
}
|
|
17
|
+
function ve(e) {
|
|
18
|
+
return e.toLowerCase().replace(be, " ");
|
|
19
|
+
}
|
|
20
|
+
function Ve(e, n, r) {
|
|
21
|
+
return e = r && r.length > 0 ? `${e + " " + r.join(" ")}` : e, le(e, n, ve(e), ve(n), 0, 0, {});
|
|
22
|
+
}
|
|
23
|
+
function ge(e, n) {
|
|
24
|
+
if (typeof e == "function")
|
|
25
|
+
return e(n);
|
|
26
|
+
e != null && (e.current = n);
|
|
27
|
+
}
|
|
28
|
+
function V(...e) {
|
|
29
|
+
return (n) => {
|
|
30
|
+
let r = !1;
|
|
31
|
+
const d = e.map((a) => {
|
|
32
|
+
const u = ge(a, n);
|
|
33
|
+
return !r && typeof u == "function" && (r = !0), u;
|
|
34
|
+
});
|
|
35
|
+
if (r)
|
|
36
|
+
return () => {
|
|
37
|
+
for (let a = 0; a < d.length; a++) {
|
|
38
|
+
const u = d[a];
|
|
39
|
+
typeof u == "function" ? u() : ge(e[a], null);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
var q = '[cmdk-group=""]', ne = '[cmdk-group-items=""]', ze = '[cmdk-group-heading=""]', xe = '[cmdk-item=""]', he = `${xe}:not([aria-disabled="true"])`, ae = "cmdk-item-select", F = "data-value", Oe = (e, n, r) => Ve(e, n, r), ke = l.createContext(void 0), z = () => l.useContext(ke), ye = l.createContext(void 0), oe = () => l.useContext(ye), we = l.createContext(void 0), Ee = l.forwardRef((e, n) => {
|
|
45
|
+
let r = K(() => {
|
|
46
|
+
var t, c;
|
|
47
|
+
return { search: "", value: (c = (t = e.value) != null ? t : e.defaultValue) != null ? c : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
48
|
+
}), d = K(() => /* @__PURE__ */ new Set()), a = K(() => /* @__PURE__ */ new Map()), u = K(() => /* @__PURE__ */ new Map()), s = K(() => /* @__PURE__ */ new Set()), f = Ce(e), { label: b, children: i, value: v, onValueChange: g, filter: I, shouldFilter: w, loop: S, disablePointerSelection: T = !1, vimBindings: A = !0, ...O } = e, U = P(), ue = P(), W = P(), _ = l.useRef(null), x = Ze();
|
|
49
|
+
M(() => {
|
|
50
|
+
if (v !== void 0) {
|
|
51
|
+
let t = v.trim();
|
|
52
|
+
r.current.value = t, E.emit();
|
|
53
|
+
}
|
|
54
|
+
}, [v]), M(() => {
|
|
55
|
+
x(6, ce);
|
|
56
|
+
}, []);
|
|
57
|
+
let E = l.useMemo(() => ({ subscribe: (t) => (s.current.add(t), () => s.current.delete(t)), snapshot: () => r.current, setState: (t, c, m) => {
|
|
58
|
+
var o, p, h, C;
|
|
59
|
+
if (!Object.is(r.current[t], c)) {
|
|
60
|
+
if (r.current[t] = c, t === "search") Q(), X(), x(1, Y);
|
|
61
|
+
else if (t === "value") {
|
|
62
|
+
if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
|
|
63
|
+
let y = document.getElementById(W);
|
|
64
|
+
y ? y.focus() : (o = document.getElementById(U)) == null || o.focus();
|
|
65
|
+
}
|
|
66
|
+
if (x(7, () => {
|
|
67
|
+
var y;
|
|
68
|
+
r.current.selectedItemId = (y = $()) == null ? void 0 : y.id, E.emit();
|
|
69
|
+
}), m || x(5, ce), ((p = f.current) == null ? void 0 : p.value) !== void 0) {
|
|
70
|
+
let y = c ?? "";
|
|
71
|
+
(C = (h = f.current).onValueChange) == null || C.call(h, y);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
E.emit();
|
|
76
|
+
}
|
|
77
|
+
}, emit: () => {
|
|
78
|
+
s.current.forEach((t) => t());
|
|
79
|
+
} }), []), J = l.useMemo(() => ({ value: (t, c, m) => {
|
|
80
|
+
var o;
|
|
81
|
+
c !== ((o = u.current.get(t)) == null ? void 0 : o.value) && (u.current.set(t, { value: c, keywords: m }), r.current.filtered.items.set(t, ie(c, m)), x(2, () => {
|
|
82
|
+
X(), E.emit();
|
|
83
|
+
}));
|
|
84
|
+
}, item: (t, c) => (d.current.add(t), c && (a.current.has(c) ? a.current.get(c).add(t) : a.current.set(c, /* @__PURE__ */ new Set([t]))), x(3, () => {
|
|
85
|
+
Q(), X(), r.current.value || Y(), E.emit();
|
|
86
|
+
}), () => {
|
|
87
|
+
u.current.delete(t), d.current.delete(t), r.current.filtered.items.delete(t);
|
|
88
|
+
let m = $();
|
|
89
|
+
x(4, () => {
|
|
90
|
+
Q(), m?.getAttribute("id") === t && Y(), E.emit();
|
|
91
|
+
});
|
|
92
|
+
}), group: (t) => (a.current.has(t) || a.current.set(t, /* @__PURE__ */ new Set()), () => {
|
|
93
|
+
u.current.delete(t), a.current.delete(t);
|
|
94
|
+
}), filter: () => f.current.shouldFilter, label: b || e["aria-label"], getDisablePointerSelection: () => f.current.disablePointerSelection, listId: U, inputId: W, labelId: ue, listInnerRef: _ }), []);
|
|
95
|
+
function ie(t, c) {
|
|
96
|
+
var m, o;
|
|
97
|
+
let p = (o = (m = f.current) == null ? void 0 : m.filter) != null ? o : Oe;
|
|
98
|
+
return t ? p(t, r.current.search, c) : 0;
|
|
99
|
+
}
|
|
100
|
+
function X() {
|
|
101
|
+
if (!r.current.search || f.current.shouldFilter === !1) return;
|
|
102
|
+
let t = r.current.filtered.items, c = [];
|
|
103
|
+
r.current.filtered.groups.forEach((o) => {
|
|
104
|
+
let p = a.current.get(o), h = 0;
|
|
105
|
+
p.forEach((C) => {
|
|
106
|
+
let y = t.get(C);
|
|
107
|
+
h = Math.max(y, h);
|
|
108
|
+
}), c.push([o, h]);
|
|
109
|
+
});
|
|
110
|
+
let m = _.current;
|
|
111
|
+
L().sort((o, p) => {
|
|
112
|
+
var h, C;
|
|
113
|
+
let y = o.getAttribute("id"), B = p.getAttribute("id");
|
|
114
|
+
return ((h = t.get(B)) != null ? h : 0) - ((C = t.get(y)) != null ? C : 0);
|
|
115
|
+
}).forEach((o) => {
|
|
116
|
+
let p = o.closest(ne);
|
|
117
|
+
p ? p.appendChild(o.parentElement === p ? o : o.closest(`${ne} > *`)) : m.appendChild(o.parentElement === m ? o : o.closest(`${ne} > *`));
|
|
118
|
+
}), c.sort((o, p) => p[1] - o[1]).forEach((o) => {
|
|
119
|
+
var p;
|
|
120
|
+
let h = (p = _.current) == null ? void 0 : p.querySelector(`${q}[${F}="${encodeURIComponent(o[0])}"]`);
|
|
121
|
+
h?.parentElement.appendChild(h);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
function Y() {
|
|
125
|
+
let t = L().find((m) => m.getAttribute("aria-disabled") !== "true"), c = t?.getAttribute(F);
|
|
126
|
+
E.setState("value", c || void 0);
|
|
127
|
+
}
|
|
128
|
+
function Q() {
|
|
129
|
+
var t, c, m, o;
|
|
130
|
+
if (!r.current.search || f.current.shouldFilter === !1) {
|
|
131
|
+
r.current.filtered.count = d.current.size;
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
r.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
135
|
+
let p = 0;
|
|
136
|
+
for (let h of d.current) {
|
|
137
|
+
let C = (c = (t = u.current.get(h)) == null ? void 0 : t.value) != null ? c : "", y = (o = (m = u.current.get(h)) == null ? void 0 : m.keywords) != null ? o : [], B = ie(C, y);
|
|
138
|
+
r.current.filtered.items.set(h, B), B > 0 && p++;
|
|
139
|
+
}
|
|
140
|
+
for (let [h, C] of a.current) for (let y of C) if (r.current.filtered.items.get(y) > 0) {
|
|
141
|
+
r.current.filtered.groups.add(h);
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
r.current.filtered.count = p;
|
|
145
|
+
}
|
|
146
|
+
function ce() {
|
|
147
|
+
var t, c, m;
|
|
148
|
+
let o = $();
|
|
149
|
+
o && (((t = o.parentElement) == null ? void 0 : t.firstChild) === o && ((m = (c = o.closest(q)) == null ? void 0 : c.querySelector(ze)) == null || m.scrollIntoView({ block: "nearest" })), o.scrollIntoView({ block: "nearest" }));
|
|
150
|
+
}
|
|
151
|
+
function $() {
|
|
152
|
+
var t;
|
|
153
|
+
return (t = _.current) == null ? void 0 : t.querySelector(`${xe}[aria-selected="true"]`);
|
|
154
|
+
}
|
|
155
|
+
function L() {
|
|
156
|
+
var t;
|
|
157
|
+
return Array.from(((t = _.current) == null ? void 0 : t.querySelectorAll(he)) || []);
|
|
158
|
+
}
|
|
159
|
+
function Z(t) {
|
|
160
|
+
let c = L()[t];
|
|
161
|
+
c && E.setState("value", c.getAttribute(F));
|
|
162
|
+
}
|
|
163
|
+
function ee(t) {
|
|
164
|
+
var c;
|
|
165
|
+
let m = $(), o = L(), p = o.findIndex((C) => C === m), h = o[p + t];
|
|
166
|
+
(c = f.current) != null && c.loop && (h = p + t < 0 ? o[o.length - 1] : p + t === o.length ? o[0] : o[p + t]), h && E.setState("value", h.getAttribute(F));
|
|
167
|
+
}
|
|
168
|
+
function de(t) {
|
|
169
|
+
let c = $(), m = c?.closest(q), o;
|
|
170
|
+
for (; m && !o; ) m = t > 0 ? Ye(m, q) : Qe(m, q), o = m?.querySelector(he);
|
|
171
|
+
o ? E.setState("value", o.getAttribute(F)) : ee(t);
|
|
172
|
+
}
|
|
173
|
+
let se = () => Z(L().length - 1), me = (t) => {
|
|
174
|
+
t.preventDefault(), t.metaKey ? se() : t.altKey ? de(1) : ee(1);
|
|
175
|
+
}, fe = (t) => {
|
|
176
|
+
t.preventDefault(), t.metaKey ? Z(0) : t.altKey ? de(-1) : ee(-1);
|
|
177
|
+
};
|
|
178
|
+
return l.createElement(j.div, { ref: n, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (t) => {
|
|
179
|
+
var c;
|
|
180
|
+
(c = O.onKeyDown) == null || c.call(O, t);
|
|
181
|
+
let m = t.nativeEvent.isComposing || t.keyCode === 229;
|
|
182
|
+
if (!(t.defaultPrevented || m)) switch (t.key) {
|
|
183
|
+
case "n":
|
|
184
|
+
case "j": {
|
|
185
|
+
A && t.ctrlKey && me(t);
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
case "ArrowDown": {
|
|
189
|
+
me(t);
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
case "p":
|
|
193
|
+
case "k": {
|
|
194
|
+
A && t.ctrlKey && fe(t);
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
case "ArrowUp": {
|
|
198
|
+
fe(t);
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
case "Home": {
|
|
202
|
+
t.preventDefault(), Z(0);
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
case "End": {
|
|
206
|
+
t.preventDefault(), se();
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
case "Enter": {
|
|
210
|
+
t.preventDefault();
|
|
211
|
+
let o = $();
|
|
212
|
+
if (o) {
|
|
213
|
+
let p = new Event(ae);
|
|
214
|
+
o.dispatchEvent(p);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
} }, l.createElement("label", { "cmdk-label": "", htmlFor: J.inputId, id: J.labelId, style: tt }, b), H(e, (t) => l.createElement(ye.Provider, { value: E }, l.createElement(ke.Provider, { value: J }, t))));
|
|
219
|
+
}), Be = l.forwardRef((e, n) => {
|
|
220
|
+
var r, d;
|
|
221
|
+
let a = P(), u = l.useRef(null), s = l.useContext(we), f = z(), b = Ce(e), i = (d = (r = b.current) == null ? void 0 : r.forceMount) != null ? d : s?.forceMount;
|
|
222
|
+
M(() => {
|
|
223
|
+
if (!i) return f.item(a, s?.id);
|
|
224
|
+
}, [i]);
|
|
225
|
+
let v = Ie(a, u, [e.value, e.children, u], e.keywords), g = oe(), I = R((x) => x.value && x.value === v.current), w = R((x) => i || f.filter() === !1 ? !0 : x.search ? x.filtered.items.get(a) > 0 : !0);
|
|
226
|
+
l.useEffect(() => {
|
|
227
|
+
let x = u.current;
|
|
228
|
+
if (!(!x || e.disabled)) return x.addEventListener(ae, S), () => x.removeEventListener(ae, S);
|
|
229
|
+
}, [w, e.onSelect, e.disabled]);
|
|
230
|
+
function S() {
|
|
231
|
+
var x, E;
|
|
232
|
+
T(), (E = (x = b.current).onSelect) == null || E.call(x, v.current);
|
|
233
|
+
}
|
|
234
|
+
function T() {
|
|
235
|
+
g.setState("value", v.current, !0);
|
|
236
|
+
}
|
|
237
|
+
if (!w) return null;
|
|
238
|
+
let { disabled: A, value: O, onSelect: U, forceMount: ue, keywords: W, ..._ } = e;
|
|
239
|
+
return l.createElement(j.div, { ref: V(u, n), ..._, id: a, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!I, "data-disabled": !!A, "data-selected": !!I, onPointerMove: A || f.getDisablePointerSelection() ? void 0 : T, onClick: A ? void 0 : S }, e.children);
|
|
240
|
+
}), Ge = l.forwardRef((e, n) => {
|
|
241
|
+
let { heading: r, children: d, forceMount: a, ...u } = e, s = P(), f = l.useRef(null), b = l.useRef(null), i = P(), v = z(), g = R((w) => a || v.filter() === !1 ? !0 : w.search ? w.filtered.groups.has(s) : !0);
|
|
242
|
+
M(() => v.group(s), []), Ie(s, f, [e.value, e.heading, b]);
|
|
243
|
+
let I = l.useMemo(() => ({ id: s, forceMount: a }), [a]);
|
|
244
|
+
return l.createElement(j.div, { ref: V(f, n), ...u, "cmdk-group": "", role: "presentation", hidden: g ? void 0 : !0 }, r && l.createElement("div", { ref: b, "cmdk-group-heading": "", "aria-hidden": !0, id: i }, r), H(e, (w) => l.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": r ? i : void 0 }, l.createElement(we.Provider, { value: I }, w))));
|
|
245
|
+
}), He = l.forwardRef((e, n) => {
|
|
246
|
+
let { alwaysRender: r, ...d } = e, a = l.useRef(null), u = R((s) => !s.search);
|
|
247
|
+
return !r && !u ? null : l.createElement(j.div, { ref: V(a, n), ...d, "cmdk-separator": "", role: "separator" });
|
|
248
|
+
}), Te = l.forwardRef((e, n) => {
|
|
249
|
+
let { onValueChange: r, ...d } = e, a = e.value != null, u = oe(), s = R((i) => i.search), f = R((i) => i.selectedItemId), b = z();
|
|
250
|
+
return l.useEffect(() => {
|
|
251
|
+
e.value != null && u.setState("search", e.value);
|
|
252
|
+
}, [e.value]), l.createElement(j.input, { ref: n, ...d, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": b.listId, "aria-labelledby": b.labelId, "aria-activedescendant": f, id: b.inputId, type: "text", value: a ? e.value : s, onChange: (i) => {
|
|
253
|
+
a || u.setState("search", i.target.value), r?.(i.target.value);
|
|
254
|
+
} });
|
|
255
|
+
}), Ue = l.forwardRef((e, n) => {
|
|
256
|
+
let { children: r, label: d = "Suggestions", ...a } = e, u = l.useRef(null), s = l.useRef(null), f = R((i) => i.selectedItemId), b = z();
|
|
257
|
+
return l.useEffect(() => {
|
|
258
|
+
if (s.current && u.current) {
|
|
259
|
+
let i = s.current, v = u.current, g, I = new ResizeObserver(() => {
|
|
260
|
+
g = requestAnimationFrame(() => {
|
|
261
|
+
let w = i.offsetHeight;
|
|
262
|
+
v.style.setProperty("--cmdk-list-height", w.toFixed(1) + "px");
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
return I.observe(i), () => {
|
|
266
|
+
cancelAnimationFrame(g), I.unobserve(i);
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
}, []), l.createElement(j.div, { ref: V(u, n), ...a, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": f, "aria-label": d, id: b.listId }, H(e, (i) => l.createElement("div", { ref: V(s, b.listInnerRef), "cmdk-list-sizer": "" }, i)));
|
|
270
|
+
}), We = l.forwardRef((e, n) => {
|
|
271
|
+
let { open: r, onOpenChange: d, overlayClassName: a, contentClassName: u, container: s, ...f } = e;
|
|
272
|
+
return l.createElement(G.Root, { open: r, onOpenChange: d }, l.createElement(G.Portal, { container: s }, l.createElement(G.Overlay, { "cmdk-overlay": "", className: a }), l.createElement(G.Content, { "aria-label": e.label, "cmdk-dialog": "", className: u }, l.createElement(Ee, { ref: n, ...f }))));
|
|
273
|
+
}), Je = l.forwardRef((e, n) => R((r) => r.filtered.count === 0) ? l.createElement(j.div, { ref: n, ...e, "cmdk-empty": "", role: "presentation" }) : null), Xe = l.forwardRef((e, n) => {
|
|
274
|
+
let { progress: r, children: d, label: a = "Loading...", ...u } = e;
|
|
275
|
+
return l.createElement(j.div, { ref: n, ...u, "cmdk-loading": "", role: "progressbar", "aria-valuenow": r, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": a }, H(e, (s) => l.createElement("div", { "aria-hidden": !0 }, s)));
|
|
276
|
+
}), N = Object.assign(Ee, { List: Ue, Item: Be, Input: Te, Group: Ge, Separator: He, Dialog: We, Empty: Je, Loading: Xe });
|
|
277
|
+
function Ye(e, n) {
|
|
278
|
+
let r = e.nextElementSibling;
|
|
279
|
+
for (; r; ) {
|
|
280
|
+
if (r.matches(n)) return r;
|
|
281
|
+
r = r.nextElementSibling;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
function Qe(e, n) {
|
|
285
|
+
let r = e.previousElementSibling;
|
|
286
|
+
for (; r; ) {
|
|
287
|
+
if (r.matches(n)) return r;
|
|
288
|
+
r = r.previousElementSibling;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
function Ce(e) {
|
|
292
|
+
let n = l.useRef(e);
|
|
293
|
+
return M(() => {
|
|
294
|
+
n.current = e;
|
|
295
|
+
}), n;
|
|
296
|
+
}
|
|
297
|
+
var M = typeof window > "u" ? l.useEffect : l.useLayoutEffect;
|
|
298
|
+
function K(e) {
|
|
299
|
+
let n = l.useRef();
|
|
300
|
+
return n.current === void 0 && (n.current = e()), n;
|
|
301
|
+
}
|
|
302
|
+
function R(e) {
|
|
303
|
+
let n = oe(), r = () => e(n.snapshot());
|
|
304
|
+
return l.useSyncExternalStore(n.subscribe, r, r);
|
|
305
|
+
}
|
|
306
|
+
function Ie(e, n, r, d = []) {
|
|
307
|
+
let a = l.useRef(), u = z();
|
|
308
|
+
return M(() => {
|
|
309
|
+
var s;
|
|
310
|
+
let f = (() => {
|
|
311
|
+
var i;
|
|
312
|
+
for (let v of r) {
|
|
313
|
+
if (typeof v == "string") return v.trim();
|
|
314
|
+
if (typeof v == "object" && "current" in v) return v.current ? (i = v.current.textContent) == null ? void 0 : i.trim() : a.current;
|
|
315
|
+
}
|
|
316
|
+
})(), b = d.map((i) => i.trim());
|
|
317
|
+
u.value(e, f, b), (s = n.current) == null || s.setAttribute(F, f), a.current = f;
|
|
318
|
+
}), a;
|
|
319
|
+
}
|
|
320
|
+
var Ze = () => {
|
|
321
|
+
let [e, n] = l.useState(), r = K(() => /* @__PURE__ */ new Map());
|
|
322
|
+
return M(() => {
|
|
323
|
+
r.current.forEach((d) => d()), r.current = /* @__PURE__ */ new Map();
|
|
324
|
+
}, [e]), (d, a) => {
|
|
325
|
+
r.current.set(d, a), n({});
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
function et(e) {
|
|
329
|
+
let n = e.type;
|
|
330
|
+
return typeof n == "function" ? n(e.props) : "render" in n ? n.render(e.props) : e;
|
|
331
|
+
}
|
|
332
|
+
function H({ asChild: e, children: n }, r) {
|
|
333
|
+
return e && l.isValidElement(n) ? l.cloneElement(et(n), { ref: n.ref }, r(n.props.children)) : r(n);
|
|
334
|
+
}
|
|
335
|
+
var tt = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
336
|
+
function rt({
|
|
337
|
+
className: e,
|
|
338
|
+
...n
|
|
339
|
+
}) {
|
|
340
|
+
return /* @__PURE__ */ k.jsx(
|
|
341
|
+
N,
|
|
342
|
+
{
|
|
343
|
+
"data-slot": "command",
|
|
344
|
+
className: D(
|
|
345
|
+
"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
346
|
+
e
|
|
347
|
+
),
|
|
348
|
+
...n
|
|
349
|
+
}
|
|
350
|
+
);
|
|
351
|
+
}
|
|
352
|
+
function ct({
|
|
353
|
+
title: e = "Command Palette",
|
|
354
|
+
description: n = "Search for a command to run...",
|
|
355
|
+
children: r,
|
|
356
|
+
className: d,
|
|
357
|
+
showCloseButton: a = !0,
|
|
358
|
+
...u
|
|
359
|
+
}) {
|
|
360
|
+
return /* @__PURE__ */ k.jsxs(Se, { ...u, children: [
|
|
361
|
+
/* @__PURE__ */ k.jsxs(Re, { className: "sr-only", children: [
|
|
362
|
+
/* @__PURE__ */ k.jsx(je, { children: e }),
|
|
363
|
+
/* @__PURE__ */ k.jsx(De, { children: n })
|
|
364
|
+
] }),
|
|
365
|
+
/* @__PURE__ */ k.jsx(
|
|
366
|
+
Ae,
|
|
367
|
+
{
|
|
368
|
+
className: D("overflow-hidden p-0", d),
|
|
369
|
+
showCloseButton: a,
|
|
370
|
+
children: /* @__PURE__ */ k.jsx(rt, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: r })
|
|
371
|
+
}
|
|
372
|
+
)
|
|
373
|
+
] });
|
|
374
|
+
}
|
|
375
|
+
function dt({
|
|
376
|
+
className: e,
|
|
377
|
+
...n
|
|
378
|
+
}) {
|
|
379
|
+
return /* @__PURE__ */ k.jsxs(
|
|
380
|
+
"div",
|
|
381
|
+
{
|
|
382
|
+
"data-slot": "command-input-wrapper",
|
|
383
|
+
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
384
|
+
children: [
|
|
385
|
+
/* @__PURE__ */ k.jsx(
|
|
386
|
+
_e,
|
|
387
|
+
{
|
|
388
|
+
iconName: "IconSearch",
|
|
389
|
+
className: "size-4 shrink-0 opacity-50"
|
|
390
|
+
}
|
|
391
|
+
),
|
|
392
|
+
/* @__PURE__ */ k.jsx(
|
|
393
|
+
N.Input,
|
|
394
|
+
{
|
|
395
|
+
"data-slot": "command-input",
|
|
396
|
+
className: D(
|
|
397
|
+
"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
398
|
+
e
|
|
399
|
+
),
|
|
400
|
+
...n
|
|
401
|
+
}
|
|
402
|
+
)
|
|
403
|
+
]
|
|
404
|
+
}
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
function st({
|
|
408
|
+
className: e,
|
|
409
|
+
...n
|
|
410
|
+
}) {
|
|
411
|
+
return /* @__PURE__ */ k.jsx(
|
|
412
|
+
N.List,
|
|
413
|
+
{
|
|
414
|
+
"data-slot": "command-list",
|
|
415
|
+
className: D(
|
|
416
|
+
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
417
|
+
e
|
|
418
|
+
),
|
|
419
|
+
...n
|
|
420
|
+
}
|
|
421
|
+
);
|
|
422
|
+
}
|
|
423
|
+
function mt({
|
|
424
|
+
...e
|
|
425
|
+
}) {
|
|
426
|
+
return /* @__PURE__ */ k.jsx(
|
|
427
|
+
N.Empty,
|
|
428
|
+
{
|
|
429
|
+
"data-slot": "command-empty",
|
|
430
|
+
className: "py-6 text-center text-sm",
|
|
431
|
+
...e
|
|
432
|
+
}
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
function ft({
|
|
436
|
+
className: e,
|
|
437
|
+
...n
|
|
438
|
+
}) {
|
|
439
|
+
return /* @__PURE__ */ k.jsx(
|
|
440
|
+
N.Group,
|
|
441
|
+
{
|
|
442
|
+
"data-slot": "command-group",
|
|
443
|
+
className: D(
|
|
444
|
+
"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold",
|
|
445
|
+
e
|
|
446
|
+
),
|
|
447
|
+
...n
|
|
448
|
+
}
|
|
449
|
+
);
|
|
450
|
+
}
|
|
451
|
+
function pt({
|
|
452
|
+
className: e,
|
|
453
|
+
...n
|
|
454
|
+
}) {
|
|
455
|
+
return /* @__PURE__ */ k.jsx(
|
|
456
|
+
N.Separator,
|
|
457
|
+
{
|
|
458
|
+
"data-slot": "command-separator",
|
|
459
|
+
className: D("bg-border -mx-1 h-px", e),
|
|
460
|
+
...n
|
|
461
|
+
}
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
function vt({
|
|
465
|
+
className: e,
|
|
466
|
+
...n
|
|
467
|
+
}) {
|
|
468
|
+
return /* @__PURE__ */ k.jsx(
|
|
469
|
+
N.Item,
|
|
470
|
+
{
|
|
471
|
+
"data-slot": "command-item",
|
|
472
|
+
className: D(
|
|
473
|
+
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
474
|
+
e
|
|
475
|
+
),
|
|
476
|
+
...n
|
|
477
|
+
}
|
|
478
|
+
);
|
|
479
|
+
}
|
|
480
|
+
function gt({
|
|
481
|
+
className: e,
|
|
482
|
+
...n
|
|
483
|
+
}) {
|
|
484
|
+
return /* @__PURE__ */ k.jsx(
|
|
485
|
+
"span",
|
|
486
|
+
{
|
|
487
|
+
"data-slot": "command-shortcut",
|
|
488
|
+
className: D(
|
|
489
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
490
|
+
e
|
|
491
|
+
),
|
|
492
|
+
...n
|
|
493
|
+
}
|
|
494
|
+
);
|
|
495
|
+
}
|
|
496
|
+
export {
|
|
497
|
+
rt as C,
|
|
498
|
+
ct as a,
|
|
499
|
+
mt as b,
|
|
500
|
+
ft as c,
|
|
501
|
+
dt as d,
|
|
502
|
+
vt as e,
|
|
503
|
+
st as f,
|
|
504
|
+
pt as g,
|
|
505
|
+
gt as h
|
|
506
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const y=require("./jsx-runtime-DUiatUiq.cjs"),De=require("@radix-ui/react-dialog"),_e=require("react"),S=require("@radix-ui/react-primitive"),O=require("@radix-ui/react-id"),K=require("./dialog-BKm2PZl2.cjs"),D=require("./index-DoxiiusW.cjs"),Ae=require("./icon-component-LY_vGYHZ.cjs");function be(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const d=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,d.get?d:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const T=be(De),l=be(_e);var ve=1,Pe=.9,Me=.8,Ne=.17,re=.1,ne=.999,$e=.9999,qe=.99,Oe=/[\\\/_+.#"@\[\(\{&]/,Fe=/[\\\/_+.#"@\[\(\{&]/g,Ke=/[\s-]/,ye=/[\s-]/g;function ae(e,n,r,d,a,i,s){if(i===n.length)return a===e.length?ve:qe;var f=`${a},${i}`;if(s[f]!==void 0)return s[f];for(var x=d.charAt(i),u=r.indexOf(x,a),v=0,g,R,w,I;u>=0;)g=ae(e,n,r,d,u+1,i+1,s),g>v&&(u===a?g*=ve:Oe.test(e.charAt(u-1))?(g*=Me,w=e.slice(a,u-1).match(Fe),w&&a>0&&(g*=Math.pow(ne,w.length))):Ke.test(e.charAt(u-1))?(g*=Pe,I=e.slice(a,u-1).match(ye),I&&a>0&&(g*=Math.pow(ne,I.length))):(g*=Ne,a>0&&(g*=Math.pow(ne,u-a))),e.charAt(u)!==n.charAt(i)&&(g*=$e)),(g<re&&r.charAt(u-1)===d.charAt(i+1)||d.charAt(i+1)===d.charAt(i)&&r.charAt(u-1)!==d.charAt(i))&&(R=ae(e,n,r,d,u+1,i+2,s),R*re>g&&(g=R*re)),g>v&&(v=g),u=r.indexOf(x,u+1);return s[f]=v,v}function ge(e){return e.toLowerCase().replace(ye," ")}function Le(e,n,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,ae(e,n,ge(e),ge(n),0,0,{})}function he(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function z(...e){return n=>{let r=!1;const d=e.map(a=>{const i=he(a,n);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let a=0;a<d.length;a++){const i=d[a];typeof i=="function"?i():he(e[a],null)}}}}var L='[cmdk-group=""]',le='[cmdk-group-items=""]',ze='[cmdk-group-heading=""]',ke='[cmdk-item=""]',xe=`${ke}:not([aria-disabled="true"])`,oe="cmdk-item-select",$="data-value",Ve=(e,n,r)=>Le(e,n,r),we=l.createContext(void 0),V=()=>l.useContext(we),Ee=l.createContext(void 0),ie=()=>l.useContext(Ee),Ce=l.createContext(void 0),Re=l.forwardRef((e,n)=>{let r=q(()=>{var t,c;return{search:"",value:(c=(t=e.value)!=null?t:e.defaultValue)!=null?c:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),d=q(()=>new Set),a=q(()=>new Map),i=q(()=>new Map),s=q(()=>new Set),f=Ie(e),{label:x,children:u,value:v,onValueChange:g,filter:R,shouldFilter:w,loop:I,disablePointerSelection:U=!1,vimBindings:_=!0,...B}=e,W=O.useId(),ue=O.useId(),J=O.useId(),A=l.useRef(null),b=Ze();P(()=>{if(v!==void 0){let t=v.trim();r.current.value=t,E.emit()}},[v]),P(()=>{b(6,de)},[]);let E=l.useMemo(()=>({subscribe:t=>(s.current.add(t),()=>s.current.delete(t)),snapshot:()=>r.current,setState:(t,c,m)=>{var o,p,h,C;if(!Object.is(r.current[t],c)){if(r.current[t]=c,t==="search")Z(),Y(),b(1,Q);else if(t==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let k=document.getElementById(J);k?k.focus():(o=document.getElementById(W))==null||o.focus()}if(b(7,()=>{var k;r.current.selectedItemId=(k=N())==null?void 0:k.id,E.emit()}),m||b(5,de),((p=f.current)==null?void 0:p.value)!==void 0){let k=c??"";(C=(h=f.current).onValueChange)==null||C.call(h,k);return}}E.emit()}},emit:()=>{s.current.forEach(t=>t())}}),[]),X=l.useMemo(()=>({value:(t,c,m)=>{var o;c!==((o=i.current.get(t))==null?void 0:o.value)&&(i.current.set(t,{value:c,keywords:m}),r.current.filtered.items.set(t,ce(c,m)),b(2,()=>{Y(),E.emit()}))},item:(t,c)=>(d.current.add(t),c&&(a.current.has(c)?a.current.get(c).add(t):a.current.set(c,new Set([t]))),b(3,()=>{Z(),Y(),r.current.value||Q(),E.emit()}),()=>{i.current.delete(t),d.current.delete(t),r.current.filtered.items.delete(t);let m=N();b(4,()=>{Z(),m?.getAttribute("id")===t&&Q(),E.emit()})}),group:t=>(a.current.has(t)||a.current.set(t,new Set),()=>{i.current.delete(t),a.current.delete(t)}),filter:()=>f.current.shouldFilter,label:x||e["aria-label"],getDisablePointerSelection:()=>f.current.disablePointerSelection,listId:W,inputId:J,labelId:ue,listInnerRef:A}),[]);function ce(t,c){var m,o;let p=(o=(m=f.current)==null?void 0:m.filter)!=null?o:Ve;return t?p(t,r.current.search,c):0}function Y(){if(!r.current.search||f.current.shouldFilter===!1)return;let t=r.current.filtered.items,c=[];r.current.filtered.groups.forEach(o=>{let p=a.current.get(o),h=0;p.forEach(C=>{let k=t.get(C);h=Math.max(k,h)}),c.push([o,h])});let m=A.current;F().sort((o,p)=>{var h,C;let k=o.getAttribute("id"),G=p.getAttribute("id");return((h=t.get(G))!=null?h:0)-((C=t.get(k))!=null?C:0)}).forEach(o=>{let p=o.closest(le);p?p.appendChild(o.parentElement===p?o:o.closest(`${le} > *`)):m.appendChild(o.parentElement===m?o:o.closest(`${le} > *`))}),c.sort((o,p)=>p[1]-o[1]).forEach(o=>{var p;let h=(p=A.current)==null?void 0:p.querySelector(`${L}[${$}="${encodeURIComponent(o[0])}"]`);h?.parentElement.appendChild(h)})}function Q(){let t=F().find(m=>m.getAttribute("aria-disabled")!=="true"),c=t?.getAttribute($);E.setState("value",c||void 0)}function Z(){var t,c,m,o;if(!r.current.search||f.current.shouldFilter===!1){r.current.filtered.count=d.current.size;return}r.current.filtered.groups=new Set;let p=0;for(let h of d.current){let C=(c=(t=i.current.get(h))==null?void 0:t.value)!=null?c:"",k=(o=(m=i.current.get(h))==null?void 0:m.keywords)!=null?o:[],G=ce(C,k);r.current.filtered.items.set(h,G),G>0&&p++}for(let[h,C]of a.current)for(let k of C)if(r.current.filtered.items.get(k)>0){r.current.filtered.groups.add(h);break}r.current.filtered.count=p}function de(){var t,c,m;let o=N();o&&(((t=o.parentElement)==null?void 0:t.firstChild)===o&&((m=(c=o.closest(L))==null?void 0:c.querySelector(ze))==null||m.scrollIntoView({block:"nearest"})),o.scrollIntoView({block:"nearest"}))}function N(){var t;return(t=A.current)==null?void 0:t.querySelector(`${ke}[aria-selected="true"]`)}function F(){var t;return Array.from(((t=A.current)==null?void 0:t.querySelectorAll(xe))||[])}function ee(t){let c=F()[t];c&&E.setState("value",c.getAttribute($))}function te(t){var c;let m=N(),o=F(),p=o.findIndex(C=>C===m),h=o[p+t];(c=f.current)!=null&&c.loop&&(h=p+t<0?o[o.length-1]:p+t===o.length?o[0]:o[p+t]),h&&E.setState("value",h.getAttribute($))}function se(t){let c=N(),m=c?.closest(L),o;for(;m&&!o;)m=t>0?Ye(m,L):Qe(m,L),o=m?.querySelector(xe);o?E.setState("value",o.getAttribute($)):te(t)}let me=()=>ee(F().length-1),fe=t=>{t.preventDefault(),t.metaKey?me():t.altKey?se(1):te(1)},pe=t=>{t.preventDefault(),t.metaKey?ee(0):t.altKey?se(-1):te(-1)};return l.createElement(S.Primitive.div,{ref:n,tabIndex:-1,...B,"cmdk-root":"",onKeyDown:t=>{var c;(c=B.onKeyDown)==null||c.call(B,t);let m=t.nativeEvent.isComposing||t.keyCode===229;if(!(t.defaultPrevented||m))switch(t.key){case"n":case"j":{_&&t.ctrlKey&&fe(t);break}case"ArrowDown":{fe(t);break}case"p":case"k":{_&&t.ctrlKey&&pe(t);break}case"ArrowUp":{pe(t);break}case"Home":{t.preventDefault(),ee(0);break}case"End":{t.preventDefault(),me();break}case"Enter":{t.preventDefault();let o=N();if(o){let p=new Event(oe);o.dispatchEvent(p)}}}}},l.createElement("label",{"cmdk-label":"",htmlFor:X.inputId,id:X.labelId,style:tt},x),H(e,t=>l.createElement(Ee.Provider,{value:E},l.createElement(we.Provider,{value:X},t))))}),Be=l.forwardRef((e,n)=>{var r,d;let a=O.useId(),i=l.useRef(null),s=l.useContext(Ce),f=V(),x=Ie(e),u=(d=(r=x.current)==null?void 0:r.forceMount)!=null?d:s?.forceMount;P(()=>{if(!u)return f.item(a,s?.id)},[u]);let v=je(a,i,[e.value,e.children,i],e.keywords),g=ie(),R=j(b=>b.value&&b.value===v.current),w=j(b=>u||f.filter()===!1?!0:b.search?b.filtered.items.get(a)>0:!0);l.useEffect(()=>{let b=i.current;if(!(!b||e.disabled))return b.addEventListener(oe,I),()=>b.removeEventListener(oe,I)},[w,e.onSelect,e.disabled]);function I(){var b,E;U(),(E=(b=x.current).onSelect)==null||E.call(b,v.current)}function U(){g.setState("value",v.current,!0)}if(!w)return null;let{disabled:_,value:B,onSelect:W,forceMount:ue,keywords:J,...A}=e;return l.createElement(S.Primitive.div,{ref:z(i,n),...A,id:a,"cmdk-item":"",role:"option","aria-disabled":!!_,"aria-selected":!!R,"data-disabled":!!_,"data-selected":!!R,onPointerMove:_||f.getDisablePointerSelection()?void 0:U,onClick:_?void 0:I},e.children)}),Ge=l.forwardRef((e,n)=>{let{heading:r,children:d,forceMount:a,...i}=e,s=O.useId(),f=l.useRef(null),x=l.useRef(null),u=O.useId(),v=V(),g=j(w=>a||v.filter()===!1?!0:w.search?w.filtered.groups.has(s):!0);P(()=>v.group(s),[]),je(s,f,[e.value,e.heading,x]);let R=l.useMemo(()=>({id:s,forceMount:a}),[a]);return l.createElement(S.Primitive.div,{ref:z(f,n),...i,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},r&&l.createElement("div",{ref:x,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),H(e,w=>l.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},l.createElement(Ce.Provider,{value:R},w))))}),Te=l.forwardRef((e,n)=>{let{alwaysRender:r,...d}=e,a=l.useRef(null),i=j(s=>!s.search);return!r&&!i?null:l.createElement(S.Primitive.div,{ref:z(a,n),...d,"cmdk-separator":"",role:"separator"})}),He=l.forwardRef((e,n)=>{let{onValueChange:r,...d}=e,a=e.value!=null,i=ie(),s=j(u=>u.search),f=j(u=>u.selectedItemId),x=V();return l.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),l.createElement(S.Primitive.input,{ref:n,...d,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":x.listId,"aria-labelledby":x.labelId,"aria-activedescendant":f,id:x.inputId,type:"text",value:a?e.value:s,onChange:u=>{a||i.setState("search",u.target.value),r?.(u.target.value)}})}),Ue=l.forwardRef((e,n)=>{let{children:r,label:d="Suggestions",...a}=e,i=l.useRef(null),s=l.useRef(null),f=j(u=>u.selectedItemId),x=V();return l.useEffect(()=>{if(s.current&&i.current){let u=s.current,v=i.current,g,R=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let w=u.offsetHeight;v.style.setProperty("--cmdk-list-height",w.toFixed(1)+"px")})});return R.observe(u),()=>{cancelAnimationFrame(g),R.unobserve(u)}}},[]),l.createElement(S.Primitive.div,{ref:z(i,n),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":f,"aria-label":d,id:x.listId},H(e,u=>l.createElement("div",{ref:z(s,x.listInnerRef),"cmdk-list-sizer":""},u)))}),We=l.forwardRef((e,n)=>{let{open:r,onOpenChange:d,overlayClassName:a,contentClassName:i,container:s,...f}=e;return l.createElement(T.Root,{open:r,onOpenChange:d},l.createElement(T.Portal,{container:s},l.createElement(T.Overlay,{"cmdk-overlay":"",className:a}),l.createElement(T.Content,{"aria-label":e.label,"cmdk-dialog":"",className:i},l.createElement(Re,{ref:n,...f}))))}),Je=l.forwardRef((e,n)=>j(r=>r.filtered.count===0)?l.createElement(S.Primitive.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),Xe=l.forwardRef((e,n)=>{let{progress:r,children:d,label:a="Loading...",...i}=e;return l.createElement(S.Primitive.div,{ref:n,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},H(e,s=>l.createElement("div",{"aria-hidden":!0},s)))}),M=Object.assign(Re,{List:Ue,Item:Be,Input:He,Group:Ge,Separator:Te,Dialog:We,Empty:Je,Loading:Xe});function Ye(e,n){let r=e.nextElementSibling;for(;r;){if(r.matches(n))return r;r=r.nextElementSibling}}function Qe(e,n){let r=e.previousElementSibling;for(;r;){if(r.matches(n))return r;r=r.previousElementSibling}}function Ie(e){let n=l.useRef(e);return P(()=>{n.current=e}),n}var P=typeof window>"u"?l.useEffect:l.useLayoutEffect;function q(e){let n=l.useRef();return n.current===void 0&&(n.current=e()),n}function j(e){let n=ie(),r=()=>e(n.snapshot());return l.useSyncExternalStore(n.subscribe,r,r)}function je(e,n,r,d=[]){let a=l.useRef(),i=V();return P(()=>{var s;let f=(()=>{var u;for(let v of r){if(typeof v=="string")return v.trim();if(typeof v=="object"&&"current"in v)return v.current?(u=v.current.textContent)==null?void 0:u.trim():a.current}})(),x=d.map(u=>u.trim());i.value(e,f,x),(s=n.current)==null||s.setAttribute($,f),a.current=f}),a}var Ze=()=>{let[e,n]=l.useState(),r=q(()=>new Map);return P(()=>{r.current.forEach(d=>d()),r.current=new Map},[e]),(d,a)=>{r.current.set(d,a),n({})}};function et(e){let n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function H({asChild:e,children:n},r){return e&&l.isValidElement(n)?l.cloneElement(et(n),{ref:n.ref},r(n.props.children)):r(n)}var tt={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Se({className:e,...n}){return y.jsxRuntimeExports.jsx(M,{"data-slot":"command",className:D.cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...n})}function rt({title:e="Command Palette",description:n="Search for a command to run...",children:r,className:d,showCloseButton:a=!0,...i}){return y.jsxRuntimeExports.jsxs(K.Dialog,{...i,children:[y.jsxRuntimeExports.jsxs(K.DialogHeader,{className:"sr-only",children:[y.jsxRuntimeExports.jsx(K.DialogTitle,{children:e}),y.jsxRuntimeExports.jsx(K.DialogDescription,{children:n})]}),y.jsxRuntimeExports.jsx(K.DialogContent,{className:D.cn("overflow-hidden p-0",d),showCloseButton:a,children:y.jsxRuntimeExports.jsx(Se,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:r})})]})}function nt({className:e,...n}){return y.jsxRuntimeExports.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[y.jsxRuntimeExports.jsx(Ae.IconComponent,{iconName:"IconSearch",className:"size-4 shrink-0 opacity-50"}),y.jsxRuntimeExports.jsx(M.Input,{"data-slot":"command-input",className:D.cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...n})]})}function lt({className:e,...n}){return y.jsxRuntimeExports.jsx(M.List,{"data-slot":"command-list",className:D.cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...n})}function at({...e}){return y.jsxRuntimeExports.jsx(M.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function ot({className:e,...n}){return y.jsxRuntimeExports.jsx(M.Group,{"data-slot":"command-group",className:D.cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold",e),...n})}function it({className:e,...n}){return y.jsxRuntimeExports.jsx(M.Separator,{"data-slot":"command-separator",className:D.cn("bg-border -mx-1 h-px",e),...n})}function ut({className:e,...n}){return y.jsxRuntimeExports.jsx(M.Item,{"data-slot":"command-item",className:D.cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n})}function ct({className:e,...n}){return y.jsxRuntimeExports.jsx("span",{"data-slot":"command-shortcut",className:D.cn("text-muted-foreground ml-auto text-xs tracking-widest",e),...n})}exports.Command=Se;exports.CommandDialog=rt;exports.CommandEmpty=at;exports.CommandGroup=ot;exports.CommandInput=nt;exports.CommandItem=ut;exports.CommandList=lt;exports.CommandSeparator=it;exports.CommandShortcut=ct;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../jsx-runtime-DUiatUiq.cjs"),c=require("@radix-ui/react-accordion"),i=require("../index-DoxiiusW.cjs"),a=require("../icon-component-LY_vGYHZ.cjs");function d(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const r=d(c);function u({...e}){return o.jsxRuntimeExports.jsx(r.Root,{"data-slot":"accordion",...e})}function l({className:e,...t}){return o.jsxRuntimeExports.jsx(r.Item,{"data-slot":"accordion-item",className:i.cn("border-b last:border-b-0",e),...t})}function m({className:e,children:t,...n}){return o.jsxRuntimeExports.jsx(r.Header,{className:"flex",children:o.jsxRuntimeExports.jsxs(r.Trigger,{"data-slot":"accordion-trigger",className:i.cn("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-semibold transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,o.jsxRuntimeExports.jsx(a.IconComponent,{iconName:"IconChevronDown",className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})}function x({className:e,children:t,...n}){return o.jsxRuntimeExports.jsx(r.Content,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...n,children:o.jsxRuntimeExports.jsx("div",{className:i.cn("pt-0 pb-4",e),children:t})})}exports.Accordion=u;exports.AccordionContent=x;exports.AccordionItem=l;exports.AccordionTrigger=m;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { j as t } from "../jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import * as n from "@radix-ui/react-accordion";
|
|
3
|
+
import { c as i } from "../index-CRiPKpXj.js";
|
|
4
|
+
import { I as a } from "../icon-component-BZ-4FDV6.js";
|
|
5
|
+
function l({
|
|
6
|
+
...o
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ t.jsx(n.Root, { "data-slot": "accordion", ...o });
|
|
9
|
+
}
|
|
10
|
+
function m({
|
|
11
|
+
className: o,
|
|
12
|
+
...e
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ t.jsx(
|
|
15
|
+
n.Item,
|
|
16
|
+
{
|
|
17
|
+
"data-slot": "accordion-item",
|
|
18
|
+
className: i("border-b last:border-b-0", o),
|
|
19
|
+
...e
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
function f({
|
|
24
|
+
className: o,
|
|
25
|
+
children: e,
|
|
26
|
+
...r
|
|
27
|
+
}) {
|
|
28
|
+
return /* @__PURE__ */ t.jsx(n.Header, { className: "flex", children: /* @__PURE__ */ t.jsxs(
|
|
29
|
+
n.Trigger,
|
|
30
|
+
{
|
|
31
|
+
"data-slot": "accordion-trigger",
|
|
32
|
+
className: i(
|
|
33
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-semibold transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
34
|
+
o
|
|
35
|
+
),
|
|
36
|
+
...r,
|
|
37
|
+
children: [
|
|
38
|
+
e,
|
|
39
|
+
/* @__PURE__ */ t.jsx(
|
|
40
|
+
a,
|
|
41
|
+
{
|
|
42
|
+
iconName: "IconChevronDown",
|
|
43
|
+
className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
) });
|
|
49
|
+
}
|
|
50
|
+
function u({
|
|
51
|
+
className: o,
|
|
52
|
+
children: e,
|
|
53
|
+
...r
|
|
54
|
+
}) {
|
|
55
|
+
return /* @__PURE__ */ t.jsx(
|
|
56
|
+
n.Content,
|
|
57
|
+
{
|
|
58
|
+
"data-slot": "accordion-content",
|
|
59
|
+
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
60
|
+
...r,
|
|
61
|
+
children: /* @__PURE__ */ t.jsx("div", { className: i("pt-0 pb-4", o), children: e })
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
l as Accordion,
|
|
67
|
+
u as AccordionContent,
|
|
68
|
+
m as AccordionItem,
|
|
69
|
+
f as AccordionTrigger
|
|
70
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../jsx-runtime-DUiatUiq.cjs"),u=require("@radix-ui/react-alert-dialog"),i=require("../button-Cegl49Yi.cjs"),r=require("../index-DoxiiusW.cjs");function d(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const l in t)if(l!=="default"){const n=Object.getOwnPropertyDescriptor(t,l);Object.defineProperty(e,l,n.get?n:{enumerable:!0,get:()=>t[l]})}}return e.default=t,Object.freeze(e)}const o=d(u);function g({...t}){return a.jsxRuntimeExports.jsx(o.Root,{"data-slot":"alert-dialog",...t})}function x({...t}){return a.jsxRuntimeExports.jsx(o.Trigger,{"data-slot":"alert-dialog-trigger",...t})}function s({...t}){return a.jsxRuntimeExports.jsx(o.Portal,{"data-slot":"alert-dialog-portal",...t})}function c({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Overlay,{"data-slot":"alert-dialog-overlay",className:r.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...e})}function m({className:t,...e}){return a.jsxRuntimeExports.jsxs(s,{children:[a.jsxRuntimeExports.jsx(c,{}),a.jsxRuntimeExports.jsx(o.Content,{"data-slot":"alert-dialog-content",className:r.cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...e})]})}function f({className:t,...e}){return a.jsxRuntimeExports.jsx("div",{"data-slot":"alert-dialog-header",className:r.cn("flex flex-col gap-2 text-center sm:text-left",t),...e})}function p({className:t,...e}){return a.jsxRuntimeExports.jsx("div",{"data-slot":"alert-dialog-footer",className:r.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}function j({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Title,{"data-slot":"alert-dialog-title",className:r.cn("text-lg font-semibold",t),...e})}function D({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Description,{"data-slot":"alert-dialog-description",className:r.cn("text-muted-foreground text-sm",t),...e})}function A({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Action,{className:r.cn(i.buttonStyles(),t),...e})}function b({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Cancel,{className:r.cn(i.buttonStyles({variant:"outline"}),t),...e})}exports.AlertDialog=g;exports.AlertDialogAction=A;exports.AlertDialogCancel=b;exports.AlertDialogContent=m;exports.AlertDialogDescription=D;exports.AlertDialogFooter=p;exports.AlertDialogHeader=f;exports.AlertDialogOverlay=c;exports.AlertDialogPortal=s;exports.AlertDialogTitle=j;exports.AlertDialogTrigger=x;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|