impact-nova 1.5.14 → 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/calendar.js +3 -2
- 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.js +244 -254
- 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 +102 -108
- 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 +276 -233
- 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",
|
|
@@ -4,12 +4,13 @@ import { ChevronLeftIcon as we, ChevronRightIcon as ye } from "lucide-react";
|
|
|
4
4
|
import { getDefaultClassNames as Fe, DayPicker as He } from "react-day-picker";
|
|
5
5
|
import { cn as f } from "../../lib/utils.js";
|
|
6
6
|
import { Button as A } from "./button.js";
|
|
7
|
+
import "./button-variants.js";
|
|
7
8
|
import ce from "./select/select.js";
|
|
8
9
|
import { FISCAL_PATTERNS as Be, resolveWeekSelection as Te } from "../../lib/fiscal-calendar.js";
|
|
9
10
|
import { getIntlLocale as We, getDateFnsLocale as qe } from "../../i18n/getDateFnsLocale.js";
|
|
10
11
|
import { useImpactNovaI18n as Ge } from "../../i18n/ImpactNovaI18nContext.js";
|
|
11
12
|
const fe = u.createContext(0);
|
|
12
|
-
function
|
|
13
|
+
function st({
|
|
13
14
|
className: ae,
|
|
14
15
|
classNames: J,
|
|
15
16
|
showOutsideDays: D = !1,
|
|
@@ -750,6 +751,6 @@ function Je({
|
|
|
750
751
|
);
|
|
751
752
|
}
|
|
752
753
|
export {
|
|
753
|
-
|
|
754
|
+
st as Calendar,
|
|
754
755
|
Je as CalendarDayButton
|
|
755
756
|
};
|
|
@@ -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
|
+
};
|