impact-nova 1.5.13 → 1.5.15
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/badge.d.ts +1 -1
- package/dist/components/ui/badge.js +12 -11
- package/dist/components/ui/breadcrumb.js +25 -20
- package/dist/components/ui/command-palette/command-palette-layout.d.ts +28 -0
- package/dist/components/ui/command-palette/command-palette-layout.js +59 -0
- package/dist/components/ui/command-palette/command-palette.d.ts +5 -2
- package/dist/components/ui/command-palette/command-palette.js +271 -264
- package/dist/components/ui/command-palette/index.d.ts +1 -1
- package/dist/components/ui/command-palette/index.js +42 -41
- package/dist/components/ui/command-palette/shortcut-settings.d.ts +3 -3
- package/dist/components/ui/command-palette/shortcut-settings.js +112 -107
- package/dist/components/ui/command-palette/utils.d.ts +6 -1
- package/dist/components/ui/command-palette/utils.js +81 -74
- package/dist/components/ui/data-table/data-table.js +51 -40
- package/dist/components/ui/dialog.js +2 -5
- package/dist/components/ui/empty-container.js +72 -65
- package/dist/components/ui/filter-panel/filter-panel.d.ts +2 -2
- package/dist/components/ui/filter-panel/filter-panel.js +154 -76
- package/dist/components/ui/filter-strip/filter-summary.js +30 -32
- package/dist/components/ui/header.d.ts +7 -3
- package/dist/components/ui/header.js +46 -44
- package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +1 -1
- package/dist/components/ui/select/select.js +84 -88
- package/dist/components/ui/sidebar.js +341 -305
- package/dist/components/ui/types/filter-panel.types.d.ts +3 -0
- package/dist/components/ui/types/horizontal-scroller.types.d.ts +1 -1
- package/dist/i18n/defaultMessages.d.ts +1 -0
- package/dist/i18n/defaultMessages.js +1 -0
- package/dist/i18n/locales/de.js +1 -0
- package/dist/i18n/locales/es.js +1 -0
- package/dist/i18n/locales/hi.js +1 -0
- package/dist/i18n/locales/kn.js +1 -0
- package/dist/icons/assets/clock.svg.js +5 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +159 -157
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +106 -105
- package/package.json +1 -1
- package/tailwind.config.js +14 -1
|
@@ -7,5 +7,5 @@ declare const badgeVariants: (props?: {
|
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) => string;
|
|
8
8
|
export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color">, VariantProps<typeof badgeVariants> {
|
|
9
9
|
}
|
|
10
|
-
declare function Badge({ className, variant, color, shape, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function Badge({ className, variant, color, shape, children, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export { Badge, badgeVariants };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { cva as
|
|
4
|
-
import { cn as
|
|
5
|
-
const
|
|
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",
|
|
3
|
+
import { cva as i } from "class-variance-authority";
|
|
4
|
+
import { cn as c } from "../../lib/utils.js";
|
|
5
|
+
const l = i(
|
|
6
|
+
"inline-flex min-w-0 max-w-full 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: {
|
|
@@ -50,17 +50,18 @@ const c = o(
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
|
-
function
|
|
54
|
-
return /* @__PURE__ */
|
|
53
|
+
function p({ className: a, variant: t, color: e, shape: s, children: n, ...o }) {
|
|
54
|
+
return /* @__PURE__ */ r(
|
|
55
55
|
"div",
|
|
56
56
|
{
|
|
57
|
-
className:
|
|
57
|
+
className: c(l({ variant: t, color: e, shape: s }), a),
|
|
58
58
|
"data-component": "badge",
|
|
59
|
-
...
|
|
59
|
+
...o,
|
|
60
|
+
children: /* @__PURE__ */ r("span", { className: "block min-w-0 flex-1 truncate", children: n })
|
|
60
61
|
}
|
|
61
62
|
);
|
|
62
63
|
}
|
|
63
64
|
export {
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
p as Badge,
|
|
66
|
+
l as badgeVariants
|
|
66
67
|
};
|
|
@@ -36,7 +36,7 @@ const W = s.forwardRef(({ className: e, maxWords: t, ...r }, o) => /* @__PURE__
|
|
|
36
36
|
{
|
|
37
37
|
ref: o,
|
|
38
38
|
className: n(
|
|
39
|
-
"flex flex-wrap items-center gap-
|
|
39
|
+
"flex flex-wrap items-center gap-1 text-[14px] font-medium text-secondary-foreground",
|
|
40
40
|
e
|
|
41
41
|
),
|
|
42
42
|
...r
|
|
@@ -52,24 +52,26 @@ const R = s.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
|
52
52
|
}
|
|
53
53
|
));
|
|
54
54
|
R.displayName = "BreadcrumbItem";
|
|
55
|
-
const V = s.forwardRef(
|
|
56
|
-
|
|
57
|
-
i,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
});
|
|
55
|
+
const V = s.forwardRef(
|
|
56
|
+
({ asChild: e, className: t, maxWords: r, children: o, ...p }, u) => {
|
|
57
|
+
const i = e ? y : "a", { maxWords: d } = s.useContext(x), c = r ?? d, l = typeof o == "string", m = l && c ? N(o, c) : o, B = l && c && o.split(/\s+/).length > c, C = /* @__PURE__ */ a(
|
|
58
|
+
i,
|
|
59
|
+
{
|
|
60
|
+
ref: u,
|
|
61
|
+
className: n(
|
|
62
|
+
"transition-colors text-primary hover:text-primary-700 font-medium",
|
|
63
|
+
t
|
|
64
|
+
),
|
|
65
|
+
...p,
|
|
66
|
+
children: m
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
return B ? /* @__PURE__ */ f(h, { children: [
|
|
70
|
+
/* @__PURE__ */ a(w, { asChild: !0, children: C }),
|
|
71
|
+
/* @__PURE__ */ a(b, { side: "top", variant: "tertiary", children: o })
|
|
72
|
+
] }) : C;
|
|
73
|
+
}
|
|
74
|
+
);
|
|
73
75
|
V.displayName = "BreadcrumbLink";
|
|
74
76
|
const M = s.forwardRef(({ className: e, maxWords: t, children: r, ...o }, p) => {
|
|
75
77
|
const { maxWords: u } = s.useContext(x), i = t ?? u, d = typeof r == "string", c = d && i ? N(r, i) : r, l = d && i && r.split(/\s+/).length > i, m = /* @__PURE__ */ a(
|
|
@@ -100,7 +102,10 @@ const S = ({
|
|
|
100
102
|
{
|
|
101
103
|
role: "presentation",
|
|
102
104
|
"aria-hidden": "true",
|
|
103
|
-
className: n(
|
|
105
|
+
className: n(
|
|
106
|
+
"[&>svg]:w-3.5 [&>svg]:h-3.5 text-secondary-foreground",
|
|
107
|
+
t
|
|
108
|
+
),
|
|
104
109
|
...r,
|
|
105
110
|
children: e ?? /* @__PURE__ */ a(
|
|
106
111
|
"svg",
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CommandDefinition } from './utils';
|
|
2
|
+
/** One visual section (heading + rows). `rowStart` is the index in `orderedCommands` of the first row. */
|
|
3
|
+
export type CommandPaletteLayoutGroup = {
|
|
4
|
+
heading: string;
|
|
5
|
+
items: CommandDefinition[];
|
|
6
|
+
rowStart: number;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Single model for the palette list: groups define structure; `orderedCommands` is the flat
|
|
10
|
+
* top-to-bottom order. Keyboard selection always indexes `orderedCommands`.
|
|
11
|
+
*/
|
|
12
|
+
export type CommandPaletteLayout = {
|
|
13
|
+
groups: CommandPaletteLayoutGroup[];
|
|
14
|
+
orderedCommands: CommandDefinition[];
|
|
15
|
+
};
|
|
16
|
+
export type BuildCommandPaletteLayoutInput = {
|
|
17
|
+
/** Commands after fuzzy filter and recency sort (palette pipeline output). */
|
|
18
|
+
filteredCommands: CommandDefinition[];
|
|
19
|
+
/** When true, “Recently Used” is split into its own group; when false, group only by category. */
|
|
20
|
+
emptyQuery: boolean;
|
|
21
|
+
recentCommandIds: readonly string[];
|
|
22
|
+
recentGroupLabel: string;
|
|
23
|
+
defaultGroupLabel: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Pure: filtered commands → visible groups + flat row list in screen order.
|
|
27
|
+
*/
|
|
28
|
+
export declare function buildCommandPaletteLayout(input: BuildCommandPaletteLayoutInput): CommandPaletteLayout;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const w = {
|
|
2
|
+
modal: 4,
|
|
3
|
+
page: 3,
|
|
4
|
+
module: 2,
|
|
5
|
+
global: 1
|
|
6
|
+
}, G = {
|
|
7
|
+
user: 2,
|
|
8
|
+
"ag-grid": 1,
|
|
9
|
+
browser: 0,
|
|
10
|
+
system: 0
|
|
11
|
+
};
|
|
12
|
+
function I(l) {
|
|
13
|
+
const {
|
|
14
|
+
filteredCommands: m,
|
|
15
|
+
emptyQuery: u,
|
|
16
|
+
recentCommandIds: p,
|
|
17
|
+
recentGroupLabel: n,
|
|
18
|
+
defaultGroupLabel: i
|
|
19
|
+
} = l, g = new Set(p), o = /* @__PURE__ */ new Map();
|
|
20
|
+
if (u) {
|
|
21
|
+
const t = m.filter((s) => g.has(s.id));
|
|
22
|
+
t.length > 0 && o.set(n, t);
|
|
23
|
+
const e = m.filter((s) => !g.has(s.id));
|
|
24
|
+
for (const s of e) {
|
|
25
|
+
const r = s.category || i;
|
|
26
|
+
o.has(r) || o.set(r, []), o.get(r).push(s);
|
|
27
|
+
}
|
|
28
|
+
} else
|
|
29
|
+
for (const t of m) {
|
|
30
|
+
const e = t.category || i;
|
|
31
|
+
o.has(e) || o.set(e, []), o.get(e).push(t);
|
|
32
|
+
}
|
|
33
|
+
const d = /* @__PURE__ */ new Map();
|
|
34
|
+
for (const [t, e] of o.entries()) {
|
|
35
|
+
let s = -1;
|
|
36
|
+
for (const r of e) {
|
|
37
|
+
const b = w[r.scope] ?? 1, C = G[r.source ?? "user"] ?? 0;
|
|
38
|
+
s = Math.max(s, b * 10 + C);
|
|
39
|
+
}
|
|
40
|
+
d.set(t, s);
|
|
41
|
+
}
|
|
42
|
+
const h = Array.from(o.entries()).filter(([t]) => t !== n).sort(
|
|
43
|
+
([t], [e]) => (d.get(e) ?? 0) - (d.get(t) ?? 0)
|
|
44
|
+
), c = [];
|
|
45
|
+
let a = 0;
|
|
46
|
+
const f = o.get(n);
|
|
47
|
+
f && (c.push({
|
|
48
|
+
heading: n,
|
|
49
|
+
items: f,
|
|
50
|
+
rowStart: a
|
|
51
|
+
}), a += f.length);
|
|
52
|
+
for (const [t, e] of h)
|
|
53
|
+
c.push({ heading: t, items: e, rowStart: a }), a += e.length;
|
|
54
|
+
const y = c.flatMap((t) => t.items);
|
|
55
|
+
return { groups: c, orderedCommands: y };
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
I as buildCommandPaletteLayout
|
|
59
|
+
};
|
|
@@ -29,6 +29,8 @@ interface CommandPaletteLabels {
|
|
|
29
29
|
runLabel?: string;
|
|
30
30
|
/** Label for the close hint in the footer */
|
|
31
31
|
closeLabel?: string;
|
|
32
|
+
/** Label for the configure shortcuts hint in the footer */
|
|
33
|
+
configureShortcutsLabel?: string;
|
|
32
34
|
}
|
|
33
35
|
export interface CommandPaletteProps extends CommandPaletteLabels {
|
|
34
36
|
className?: string;
|
|
@@ -40,7 +42,7 @@ export interface CommandPaletteProps extends CommandPaletteLabels {
|
|
|
40
42
|
/** Called when the palette opens/closes */
|
|
41
43
|
onOpenChange?: (open: boolean) => void;
|
|
42
44
|
}
|
|
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;
|
|
45
|
+
declare function CommandPalette({ className, children, commands: externalCommands, placeholder, emptyTitle, emptyDescription, recentGroupLabel, defaultGroupLabel, navigateLabel, runLabel, closeLabel, configureShortcutsLabel, onCommandExecute, onOpenChange, }: CommandPaletteProps): import("react/jsx-runtime").JSX.Element;
|
|
44
46
|
declare namespace CommandPalette {
|
|
45
47
|
var displayName: string;
|
|
46
48
|
}
|
|
@@ -63,8 +65,9 @@ declare const CommandPaletteItem: React.ForwardRefExoticComponent<CommandPalette
|
|
|
63
65
|
export interface CommandPaletteShortcutProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
64
66
|
keybinding: KeyBinding;
|
|
65
67
|
isSelected?: boolean;
|
|
68
|
+
external?: boolean;
|
|
66
69
|
}
|
|
67
|
-
declare function CommandPaletteShortcut({ keybinding, isSelected, className, ...props }: CommandPaletteShortcutProps): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
declare function CommandPaletteShortcut({ keybinding, isSelected, external, className, ...props }: CommandPaletteShortcutProps): import("react/jsx-runtime").JSX.Element;
|
|
68
71
|
declare namespace CommandPaletteShortcut {
|
|
69
72
|
var displayName: string;
|
|
70
73
|
}
|