impact-nova 1.5.6 → 1.5.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/components/ui/ag-grid-react/cell-renderers/date-display-renderer.js +39 -32
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.js +47 -47
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/select-cell-editor.js +39 -36
- package/dist/components/ui/ag-grid-react/cell-renderers/select-display-renderer.js +18 -12
- package/dist/components/ui/badge.d.ts +2 -1
- package/dist/components/ui/badge.js +17 -12
- package/dist/components/ui/command-palette/command-palette.d.ts +20 -4
- package/dist/components/ui/command-palette/command-palette.js +210 -180
- package/dist/components/ui/command-palette/shortcut-settings.d.ts +14 -3
- package/dist/components/ui/command-palette/shortcut-settings.js +97 -90
- package/dist/components/ui/filter-strip/filter-strip.d.ts +1 -1
- package/dist/components/ui/filter-strip/filter-strip.js +24 -22
- package/dist/components/ui/filter-strip/filter-tag-list.js +4 -4
- package/dist/components/ui/select/select.js +41 -41
- package/dist/components/ui/tabs.js +46 -45
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +108 -107
- package/dist/impact-nova.css +1 -1
- package/package.json +1 -1
|
@@ -1,53 +1,60 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import "lucide-react";
|
|
3
|
-
const
|
|
4
|
-
if (
|
|
3
|
+
const w = (i, r) => {
|
|
4
|
+
if (i == null || i === "") return "";
|
|
5
5
|
try {
|
|
6
|
-
const
|
|
7
|
-
return isNaN(
|
|
6
|
+
const e = i instanceof Date ? i : new Date(String(i));
|
|
7
|
+
return isNaN(e.getTime()) ? String(i) : r === "time" ? e.toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit" }) : r === "datetime-local" ? e.toLocaleString(void 0, {
|
|
8
8
|
year: "numeric",
|
|
9
9
|
month: "short",
|
|
10
10
|
day: "numeric",
|
|
11
11
|
hour: "2-digit",
|
|
12
12
|
minute: "2-digit"
|
|
13
|
-
}) :
|
|
13
|
+
}) : e.toLocaleDateString(void 0, {
|
|
14
14
|
year: "numeric",
|
|
15
15
|
month: "short",
|
|
16
16
|
day: "numeric"
|
|
17
17
|
});
|
|
18
18
|
} catch {
|
|
19
|
-
return String(
|
|
19
|
+
return String(i);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, y = (i) => {
|
|
22
22
|
const {
|
|
23
23
|
valueFormatted: r,
|
|
24
|
-
value:
|
|
25
|
-
dateType:
|
|
26
|
-
placeholder:
|
|
27
|
-
disabled:
|
|
28
|
-
colDef:
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
value: e,
|
|
25
|
+
dateType: p = "date",
|
|
26
|
+
placeholder: m = "Select date...",
|
|
27
|
+
disabled: o,
|
|
28
|
+
colDef: n,
|
|
29
|
+
data: l
|
|
30
|
+
} = i, d = e && typeof e == "object" && "cellMetadata" in e ? e.cellMetadata?._isDisabled : void 0, s = l && typeof l == "object" && "rowMetadata" in l ? l.rowMetadata?._isDisabled : void 0;
|
|
31
|
+
let a = !1;
|
|
32
|
+
if (!o) {
|
|
33
|
+
const b = n?._originalEditable;
|
|
34
|
+
n?.editable === !1 ? a = !1 : d === !1 ? a = !0 : d === !0 ? a = !1 : s === !1 ? a = !0 : s === !0 ? a = !1 : a = b === !0 || n?.editable === !0;
|
|
35
|
+
}
|
|
36
|
+
const c = e && typeof e == "object" && "value" in e, g = c ? e.value : e, h = (c ? null : r) ?? w(g, p), u = !h;
|
|
37
|
+
return /* @__PURE__ */ t(
|
|
31
38
|
"div",
|
|
32
39
|
{
|
|
33
|
-
className: `w-full h-full flex items-center ag-cell-inner-padding ${
|
|
34
|
-
children: /* @__PURE__ */
|
|
40
|
+
className: `w-full h-full flex items-center ag-cell-inner-padding ${o ? "opacity-60 cursor-not-allowed" : a ? "in-ag-editable-cell-highlight" : ""}`,
|
|
41
|
+
children: /* @__PURE__ */ f(
|
|
35
42
|
"div",
|
|
36
43
|
{
|
|
37
|
-
className:
|
|
44
|
+
className: `flex w-full items-center justify-between rounded-[8px] px-1.5 h-7 ${a ? "bg-white cursor-pointer" : "bg-inherit"}`,
|
|
38
45
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ t("span", { className: `truncate text-sm font-medium text-[#1f2b4d] ${u ? "text-[#dfe2e7]" : ""}`, children: u ? m : h }),
|
|
47
|
+
a && /* @__PURE__ */ t("span", { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground", children: /* @__PURE__ */ f("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
48
|
+
/* @__PURE__ */ t("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
|
|
49
|
+
/* @__PURE__ */ t("path", { d: "M16 2v4" }),
|
|
50
|
+
/* @__PURE__ */ t("path", { d: "M8 2v4" }),
|
|
51
|
+
/* @__PURE__ */ t("path", { d: "M3 10h18" }),
|
|
52
|
+
/* @__PURE__ */ t("path", { d: "M8 14h.01" }),
|
|
53
|
+
/* @__PURE__ */ t("path", { d: "M12 14h.01" }),
|
|
54
|
+
/* @__PURE__ */ t("path", { d: "M16 14h.01" }),
|
|
55
|
+
/* @__PURE__ */ t("path", { d: "M8 18h.01" }),
|
|
56
|
+
/* @__PURE__ */ t("path", { d: "M12 18h.01" }),
|
|
57
|
+
/* @__PURE__ */ t("path", { d: "M16 18h.01" })
|
|
51
58
|
] }) })
|
|
52
59
|
]
|
|
53
60
|
}
|
|
@@ -55,7 +62,7 @@ const u = (t, r) => {
|
|
|
55
62
|
}
|
|
56
63
|
);
|
|
57
64
|
};
|
|
58
|
-
|
|
65
|
+
y.displayName = "DateDisplayRenderer";
|
|
59
66
|
export {
|
|
60
|
-
|
|
67
|
+
y as DateDisplayRenderer
|
|
61
68
|
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Calendar as
|
|
4
|
-
const
|
|
5
|
-
if (!(
|
|
1
|
+
import { jsx as C } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as N, useState as S, useImperativeHandle as P, useEffect as j, useCallback as u } from "react";
|
|
3
|
+
import { Calendar as I } from "../../../calendar.js";
|
|
4
|
+
const p = (o) => {
|
|
5
|
+
if (!(o == null || o === ""))
|
|
6
6
|
try {
|
|
7
|
-
const
|
|
8
|
-
return isNaN(
|
|
7
|
+
const r = o instanceof Date ? o : new Date(String(o));
|
|
8
|
+
return isNaN(r.getTime()) ? void 0 : r;
|
|
9
9
|
} catch {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
|
-
},
|
|
12
|
+
}, O = N((o, r) => {
|
|
13
13
|
const {
|
|
14
|
-
value:
|
|
15
|
-
min:
|
|
16
|
-
max:
|
|
17
|
-
node:
|
|
18
|
-
column:
|
|
19
|
-
stopEditing:
|
|
20
|
-
} =
|
|
21
|
-
|
|
14
|
+
value: a,
|
|
15
|
+
min: m,
|
|
16
|
+
max: f,
|
|
17
|
+
node: l,
|
|
18
|
+
column: g,
|
|
19
|
+
stopEditing: h
|
|
20
|
+
} = o, s = a && typeof a == "object" && "value" in a, d = s ? a.cellMetadata : void 0, D = s ? a.value : a, v = p(D), [w, b] = S(v), [M, E] = S(v || /* @__PURE__ */ new Date());
|
|
21
|
+
P(r, () => ({
|
|
22
22
|
getValue() {
|
|
23
|
-
return
|
|
23
|
+
return a;
|
|
24
24
|
},
|
|
25
25
|
isCancelBeforeStart() {
|
|
26
26
|
return !1;
|
|
@@ -31,45 +31,45 @@ const d = (t) => {
|
|
|
31
31
|
isPopup() {
|
|
32
32
|
return !0;
|
|
33
33
|
}
|
|
34
|
-
})),
|
|
35
|
-
const e = "ag-custom-component-popup",
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
for (const
|
|
39
|
-
|
|
34
|
+
})), j(() => {
|
|
35
|
+
const e = "ag-custom-component-popup", i = (t) => {
|
|
36
|
+
t instanceof HTMLElement && t.hasAttribute("data-radix-popper-content-wrapper") && t.classList.add(e);
|
|
37
|
+
}, n = new MutationObserver((t) => {
|
|
38
|
+
for (const V of t)
|
|
39
|
+
V.addedNodes.forEach(i);
|
|
40
40
|
});
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
}), () =>
|
|
41
|
+
return n.observe(document.body, { childList: !0, subtree: !0 }), document.querySelectorAll("[data-radix-popper-content-wrapper]").forEach((t) => {
|
|
42
|
+
t.classList.add(e);
|
|
43
|
+
}), () => n.disconnect();
|
|
44
44
|
}, []);
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
48
|
-
const
|
|
49
|
-
|
|
45
|
+
const c = u((e) => {
|
|
46
|
+
const i = g?.getColId();
|
|
47
|
+
if (i && l) {
|
|
48
|
+
const n = e ? `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}` : null, t = s ? { value: n, ...d !== void 0 && { cellMetadata: d } } : n;
|
|
49
|
+
l.setDataValue(i, t);
|
|
50
50
|
}
|
|
51
|
-
|
|
52
|
-
}, [
|
|
53
|
-
|
|
54
|
-
}, [
|
|
55
|
-
|
|
56
|
-
}, [
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
|
|
51
|
+
h();
|
|
52
|
+
}, [g, l, h, s, d]), A = u((e) => {
|
|
53
|
+
b(e), c(e);
|
|
54
|
+
}, [c]), x = u(() => {
|
|
55
|
+
b(void 0), c(void 0);
|
|
56
|
+
}, [c]), y = m ? p(m) : void 0, L = f ? p(f) : void 0;
|
|
57
|
+
return /* @__PURE__ */ C("div", { className: "ag-custom-component-popup bg-white border border-input rounded-md shadow-lg", children: /* @__PURE__ */ C(
|
|
58
|
+
I,
|
|
59
59
|
{
|
|
60
60
|
mode: "single",
|
|
61
|
-
selected:
|
|
62
|
-
onSelect:
|
|
63
|
-
month:
|
|
64
|
-
onMonthChange:
|
|
65
|
-
disabled: { before:
|
|
61
|
+
selected: w,
|
|
62
|
+
onSelect: A,
|
|
63
|
+
month: M,
|
|
64
|
+
onMonthChange: E,
|
|
65
|
+
disabled: { before: y, after: L },
|
|
66
66
|
showFooter: !1,
|
|
67
|
-
onClear:
|
|
67
|
+
onClear: x,
|
|
68
68
|
captionLayout: "dropdown"
|
|
69
69
|
}
|
|
70
70
|
) });
|
|
71
71
|
});
|
|
72
|
-
|
|
72
|
+
O.displayName = "DateCellEditor";
|
|
73
73
|
export {
|
|
74
|
-
|
|
74
|
+
O as DateCellEditor
|
|
75
75
|
};
|
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as x, useState as E, useRef as N, useImperativeHandle as O, useCallback as u } from "react";
|
|
3
|
+
import j from "../../../select/select.js";
|
|
4
|
+
const w = x((t, h) => {
|
|
5
5
|
const {
|
|
6
|
-
value:
|
|
7
|
-
options:
|
|
8
|
-
placeholder:
|
|
9
|
-
isSearchable:
|
|
10
|
-
isClearable:
|
|
11
|
-
stopEditing:
|
|
12
|
-
} = t, r =
|
|
6
|
+
value: l,
|
|
7
|
+
options: C = [],
|
|
8
|
+
placeholder: m = "Select...",
|
|
9
|
+
isSearchable: v = !0,
|
|
10
|
+
isClearable: b = !0,
|
|
11
|
+
stopEditing: o
|
|
12
|
+
} = t, n = l && typeof l == "object" && "value" in l, r = n ? l.cellMetadata : void 0, i = n ? l.value : l, c = C.map((e) => ({
|
|
13
13
|
value: e.value,
|
|
14
14
|
label: e.label,
|
|
15
15
|
isDisabled: e.isDisabled
|
|
16
|
-
})), [
|
|
17
|
-
|
|
18
|
-
),
|
|
19
|
-
|
|
16
|
+
})), [s, d] = E(
|
|
17
|
+
i != null ? String(i) : null
|
|
18
|
+
), f = N(!1);
|
|
19
|
+
O(h, () => ({
|
|
20
20
|
getValue() {
|
|
21
|
-
return
|
|
21
|
+
return n ? {
|
|
22
|
+
value: s,
|
|
23
|
+
...r !== void 0 && { cellMetadata: r }
|
|
24
|
+
} : s;
|
|
22
25
|
},
|
|
23
26
|
isCancelBeforeStart() {
|
|
24
27
|
return !1;
|
|
@@ -30,27 +33,27 @@ const N = v((t, f) => {
|
|
|
30
33
|
return !0;
|
|
31
34
|
}
|
|
32
35
|
}));
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
}, [
|
|
36
|
+
const S = c.find((e) => e.value === s) ?? null, a = u(() => {
|
|
37
|
+
f.current || (f.current = !0, o());
|
|
38
|
+
}, [o]), M = u(
|
|
36
39
|
(e) => {
|
|
37
|
-
const
|
|
38
|
-
|
|
40
|
+
const p = e ? e.value : null;
|
|
41
|
+
d(p), t.onValueChange?.(p), a();
|
|
39
42
|
},
|
|
40
|
-
[
|
|
41
|
-
),
|
|
42
|
-
|
|
43
|
-
}, [
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
|
|
43
|
+
[a, d, t.onValueChange]
|
|
44
|
+
), V = u(() => {
|
|
45
|
+
a();
|
|
46
|
+
}, [a]);
|
|
47
|
+
return /* @__PURE__ */ g("div", { className: "w-full h-full flex items-center ag-cell-inner-padding ag-editable-cell-highlight", children: /* @__PURE__ */ g(
|
|
48
|
+
j,
|
|
46
49
|
{
|
|
47
|
-
options:
|
|
48
|
-
value:
|
|
49
|
-
onChange:
|
|
50
|
-
onMenuClose:
|
|
51
|
-
placeholder:
|
|
52
|
-
isSearchable:
|
|
53
|
-
isClearable:
|
|
50
|
+
options: c,
|
|
51
|
+
value: S,
|
|
52
|
+
onChange: M,
|
|
53
|
+
onMenuClose: V,
|
|
54
|
+
placeholder: m,
|
|
55
|
+
isSearchable: v,
|
|
56
|
+
isClearable: b,
|
|
54
57
|
isMulti: !1,
|
|
55
58
|
defaultMenuIsOpen: !0,
|
|
56
59
|
className: "!border-none !shadow-none !ring-0 !h-7 !rounded-[8px] !px-1.5",
|
|
@@ -58,7 +61,7 @@ const N = v((t, f) => {
|
|
|
58
61
|
}
|
|
59
62
|
) });
|
|
60
63
|
});
|
|
61
|
-
|
|
64
|
+
w.displayName = "SelectCellEditor";
|
|
62
65
|
export {
|
|
63
|
-
|
|
66
|
+
w as SelectCellEditor
|
|
64
67
|
};
|
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { ChevronDown as
|
|
3
|
-
const
|
|
4
|
-
const { value: e, options:
|
|
5
|
-
|
|
1
|
+
import { jsx as n, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown as g } from "lucide-react";
|
|
3
|
+
const h = (u) => {
|
|
4
|
+
const { value: e, options: b = [], placeholder: p = "Select...", disabled: o, colDef: i, data: t } = u, r = e && typeof e == "object" && "cellMetadata" in e ? e.cellMetadata?._isDisabled : void 0, d = t && typeof t == "object" && "rowMetadata" in t ? t.rowMetadata?._isDisabled : void 0;
|
|
5
|
+
let l = !1;
|
|
6
|
+
if (!o) {
|
|
7
|
+
const s = i?._originalEditable;
|
|
8
|
+
i?.editable === !1 ? l = !1 : r === !1 ? l = !0 : r === !0 ? l = !1 : d === !1 ? l = !0 : d === !0 ? l = !1 : l = s === !0 || i?.editable === !0;
|
|
9
|
+
}
|
|
10
|
+
const a = e && typeof e == "object" && "value" in e ? e.value : e, c = b.find((s) => s.value === String(a ?? ""))?.label ?? (a != null && a !== "" ? String(a) : ""), f = !c;
|
|
11
|
+
return /* @__PURE__ */ n(
|
|
6
12
|
"div",
|
|
7
13
|
{
|
|
8
|
-
className: `w-full h-full flex items-center ag-cell-inner-padding ${
|
|
9
|
-
children: /* @__PURE__ */
|
|
14
|
+
className: `w-full h-full flex items-center ag-cell-inner-padding ${o ? "opacity-60 cursor-not-allowed" : l ? "in-ag-editable-cell-highlight" : ""}`,
|
|
15
|
+
children: /* @__PURE__ */ m(
|
|
10
16
|
"div",
|
|
11
17
|
{
|
|
12
|
-
className:
|
|
18
|
+
className: `flex w-full items-center justify-between rounded-[8px] px-1.5 h-7 ${l ? "bg-white cursor-pointer" : "bg-inherit"}`,
|
|
13
19
|
children: [
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ n("span", { className: `truncate text-sm font-medium text-[#1f2b4d] ${f ? "text-[#dfe2e7]" : ""}`, children: f ? p : c }),
|
|
21
|
+
l && /* @__PURE__ */ n(g, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" })
|
|
16
22
|
]
|
|
17
23
|
}
|
|
18
24
|
)
|
|
19
25
|
}
|
|
20
26
|
);
|
|
21
27
|
};
|
|
22
|
-
|
|
28
|
+
h.displayName = "SelectDisplayRenderer";
|
|
23
29
|
export {
|
|
24
|
-
|
|
30
|
+
h as SelectDisplayRenderer
|
|
25
31
|
};
|
|
@@ -3,8 +3,9 @@ import * as React from "react";
|
|
|
3
3
|
declare const badgeVariants: (props?: {
|
|
4
4
|
variant?: "solid" | "outline" | "subtle";
|
|
5
5
|
color?: "primary" | "destructive" | "warning" | "success" | "neutral";
|
|
6
|
+
shape?: "circle" | "square";
|
|
6
7
|
} & import('class-variance-authority/types').ClassProp) => string;
|
|
7
8
|
export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color">, VariantProps<typeof badgeVariants> {
|
|
8
9
|
}
|
|
9
|
-
declare function Badge({ className, variant, color, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function Badge({ className, variant, color, shape, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export { Badge, badgeVariants };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { cva as
|
|
4
|
-
import { cn as
|
|
5
|
-
const
|
|
6
|
-
"inline-flex items-center
|
|
3
|
+
import { cva as o } from "class-variance-authority";
|
|
4
|
+
import { cn as i } from "../../lib/utils.js";
|
|
5
|
+
const c = o(
|
|
6
|
+
"inline-flex items-center border px-2.5 py-0.5 text-sm leading-[18px] font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
@@ -17,6 +17,10 @@ const i = n(
|
|
|
17
17
|
warning: "",
|
|
18
18
|
destructive: "",
|
|
19
19
|
neutral: ""
|
|
20
|
+
},
|
|
21
|
+
shape: {
|
|
22
|
+
circle: "rounded-full",
|
|
23
|
+
square: "rounded"
|
|
20
24
|
}
|
|
21
25
|
},
|
|
22
26
|
compoundVariants: [
|
|
@@ -41,21 +45,22 @@ const i = n(
|
|
|
41
45
|
],
|
|
42
46
|
defaultVariants: {
|
|
43
47
|
variant: "solid",
|
|
44
|
-
color: "primary"
|
|
48
|
+
color: "primary",
|
|
49
|
+
shape: "circle"
|
|
45
50
|
}
|
|
46
51
|
}
|
|
47
52
|
);
|
|
48
|
-
function
|
|
49
|
-
return /* @__PURE__ */
|
|
53
|
+
function m({ className: r, variant: t, color: a, shape: e, ...s }) {
|
|
54
|
+
return /* @__PURE__ */ n(
|
|
50
55
|
"div",
|
|
51
56
|
{
|
|
52
|
-
className:
|
|
57
|
+
className: i(c({ variant: t, color: a, shape: e }), r),
|
|
53
58
|
"data-component": "badge",
|
|
54
|
-
...
|
|
59
|
+
...s
|
|
55
60
|
}
|
|
56
61
|
);
|
|
57
62
|
}
|
|
58
63
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
m as Badge,
|
|
65
|
+
c as badgeVariants
|
|
61
66
|
};
|
|
@@ -12,19 +12,35 @@ import { CommandDefinition, KeyBinding } from './utils';
|
|
|
12
12
|
* CommandPaletteEmpty, CommandPaletteSeparator, CommandPaletteFooter
|
|
13
13
|
*/
|
|
14
14
|
import * as React from 'react';
|
|
15
|
-
|
|
15
|
+
interface CommandPaletteLabels {
|
|
16
|
+
/** Placeholder text for the search input */
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
/** Title shown when no results are found */
|
|
19
|
+
emptyTitle?: string;
|
|
20
|
+
/** Description shown when no results are found */
|
|
21
|
+
emptyDescription?: string;
|
|
22
|
+
/** Group heading for recently used commands */
|
|
23
|
+
recentGroupLabel?: string;
|
|
24
|
+
/** Group heading for searched commands when no category is present */
|
|
25
|
+
defaultGroupLabel?: string;
|
|
26
|
+
/** Label for the navigation hint in the footer */
|
|
27
|
+
navigateLabel?: string;
|
|
28
|
+
/** Label for the execution hint in the footer */
|
|
29
|
+
runLabel?: string;
|
|
30
|
+
/** Label for the close hint in the footer */
|
|
31
|
+
closeLabel?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface CommandPaletteProps extends CommandPaletteLabels {
|
|
16
34
|
className?: string;
|
|
17
35
|
children?: React.ReactNode;
|
|
18
36
|
/** Custom list of commands (overrides automatic registry commands) */
|
|
19
37
|
commands?: CommandDefinition[];
|
|
20
|
-
/** Placeholder text for the search input */
|
|
21
|
-
placeholder?: string;
|
|
22
38
|
/** Called when a command is executed */
|
|
23
39
|
onCommandExecute?: (command: CommandDefinition) => void;
|
|
24
40
|
/** Called when the palette opens/closes */
|
|
25
41
|
onOpenChange?: (open: boolean) => void;
|
|
26
42
|
}
|
|
27
|
-
declare function CommandPalette({ className, children, commands: externalCommands, placeholder, onCommandExecute, onOpenChange, }: CommandPaletteProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
declare function CommandPalette({ className, children, commands: externalCommands, placeholder, emptyTitle, emptyDescription, recentGroupLabel, defaultGroupLabel, navigateLabel, runLabel, closeLabel, onCommandExecute, onOpenChange, }: CommandPaletteProps): import("react/jsx-runtime").JSX.Element;
|
|
28
44
|
declare namespace CommandPalette {
|
|
29
45
|
var displayName: string;
|
|
30
46
|
}
|