impact-nova 2.2.5 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.d.ts +2 -1
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +12 -11
- package/dist/components/data/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +109 -87
- package/dist/components/data/ag-grid-react/index.d.ts +2 -0
- package/dist/components/data/ag-grid-react/index.js +41 -36
- package/dist/components/data/data-table/data-table-saved-views.js +216 -191
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +44 -30
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.js +158 -184
- package/dist/components/data-display/statistics-card/statistics-card.js +138 -111
- package/dist/components/feedback/tooltip/index.d.ts +3 -0
- package/dist/components/feedback/tooltip/index.js +13 -9
- package/dist/components/feedback/tooltip/overflow-tooltip.d.ts +2 -0
- package/dist/components/feedback/tooltip/overflow-tooltip.js +69 -0
- package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +37 -0
- package/dist/components/feedback/tooltip/use-overflow-tooltip.d.ts +3 -0
- package/dist/components/feedback/tooltip/use-overflow-tooltip.js +55 -0
- package/dist/components/flows/command-palette/shortcut-settings.js +85 -66
- package/dist/components/flows/filter-panel/filter-panel.js +76 -69
- package/dist/components/flows/filter-strip/filter-summary.js +184 -163
- package/dist/components/flows/filter-strip/filter-tag-list.js +121 -105
- package/dist/components/forms/select/components/SelectOptionRow.js +35 -27
- package/dist/components/forms/select/components/SelectTriggerValue.js +49 -20
- package/dist/components/forms/select/components/Submenu.js +40 -31
- package/dist/components/layout/horizontal-scroller/index.d.ts +4 -0
- package/dist/components/layout/horizontal-scroller/index.js +6 -2
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.d.ts +10 -0
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.js +124 -0
- package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.d.ts +13 -0
- package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.js +40 -0
- package/dist/components/primitives/stepper/stepper.js +61 -42
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +468 -460
- package/dist/lib/overflow/is-text-overflowing.d.ts +3 -0
- package/dist/lib/overflow/is-text-overflowing.js +6 -0
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/best-practices.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/llms/rules/troubleshooting.js +1 -1
- package/package.json +1 -1
|
@@ -1,28 +1,47 @@
|
|
|
1
|
-
import { jsx as r, jsxs as h, Fragment as
|
|
2
|
-
import * as
|
|
3
|
-
import { Person as
|
|
1
|
+
import { jsx as r, jsxs as h, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { Person as G, Monitor as U, PriorityAlert as q, Locked as O, Reset as B } from "impact-nova-icons";
|
|
4
4
|
import { cn as p } from "../../../lib/utils.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { Kbd as $ } from "../../primitives/kbd/kbd.js";
|
|
6
|
+
import { keybindingToString as H } from "../../primitives/kbd/keybinding-display.js";
|
|
7
|
+
import { OverflowTooltip as A } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
8
|
+
import { ModuleRegistry as V, AllCommunityModule as J } from "ag-grid-community";
|
|
9
|
+
import { AllEnterpriseModule as Q } from "ag-grid-enterprise";
|
|
10
|
+
import { DataTable as X, DataTableContent as Y } from "../../data/data-table/data-table.js";
|
|
8
11
|
import { AG_CELL_NO_PADDING as F } from "../../data/ag-grid-react/cell-renderers/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
B.registerModules([$, H]);
|
|
15
|
-
function te(a) {
|
|
12
|
+
import { useCommandPalette as Z } from "./use-command-palette.js";
|
|
13
|
+
import { COMMAND_SOURCE_LABELS as m, keybindingFromEvent as W, isReservedShortcut as ee } from "./utils.js";
|
|
14
|
+
import { BadgeCellRenderer as te } from "../../data/ag-grid-react/cell-renderers/badge-cell-renderer.js";
|
|
15
|
+
V.registerModules([J, Q]);
|
|
16
|
+
function re(a) {
|
|
16
17
|
const t = a.data;
|
|
17
18
|
return t ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
|
|
18
|
-
!t.customisable && /* @__PURE__ */ r(
|
|
19
|
+
!t.customisable && /* @__PURE__ */ r(O, { className: "h-3 w-3 text-secondary-foreground shrink-0" }),
|
|
19
20
|
/* @__PURE__ */ h("div", { className: "flex flex-col min-w-0 gap-0", children: [
|
|
20
|
-
/* @__PURE__ */ r(
|
|
21
|
-
|
|
21
|
+
/* @__PURE__ */ r(
|
|
22
|
+
A,
|
|
23
|
+
{
|
|
24
|
+
triggerClassName: "truncate font-medium text-content-charcoal text-xs leading-tight block min-w-0",
|
|
25
|
+
content: t.command,
|
|
26
|
+
side: "top",
|
|
27
|
+
variant: "tertiary",
|
|
28
|
+
children: t.command
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
t.description && /* @__PURE__ */ r(
|
|
32
|
+
A,
|
|
33
|
+
{
|
|
34
|
+
triggerClassName: "truncate text-[10px] text-secondary-foreground leading-tight block min-w-0",
|
|
35
|
+
content: t.description,
|
|
36
|
+
side: "top",
|
|
37
|
+
variant: "tertiary",
|
|
38
|
+
children: t.description
|
|
39
|
+
}
|
|
40
|
+
)
|
|
22
41
|
] })
|
|
23
42
|
] }) : null;
|
|
24
43
|
}
|
|
25
|
-
function
|
|
44
|
+
function ne(a) {
|
|
26
45
|
const t = a.data;
|
|
27
46
|
if (!t) return null;
|
|
28
47
|
const d = a.recordingCommandId === t.id;
|
|
@@ -37,27 +56,27 @@ function re(a) {
|
|
|
37
56
|
t.customisable ? "bg-canvas-elevated" : "bg-transparent",
|
|
38
57
|
d && "ring-1 ring-brand border border-brand"
|
|
39
58
|
),
|
|
40
|
-
children: d ? /* @__PURE__ */ r("span", { className: "text-xs text-brand font-medium animate-pulse motion-reduce:animate-none", children: a.recordingLabel ?? "Press desired shortcut..." }) : /* @__PURE__ */ h(
|
|
59
|
+
children: d ? /* @__PURE__ */ r("span", { className: "text-xs text-brand font-medium animate-pulse motion-reduce:animate-none", children: a.recordingLabel ?? "Press desired shortcut..." }) : /* @__PURE__ */ h(z, { children: [
|
|
41
60
|
t.keybinding ? /* @__PURE__ */ r(
|
|
42
61
|
"button",
|
|
43
62
|
{
|
|
44
63
|
type: "button",
|
|
45
|
-
onClick: (
|
|
46
|
-
|
|
64
|
+
onClick: (s) => {
|
|
65
|
+
s.stopPropagation(), t.customisable && a.onStartRecording(t.id);
|
|
47
66
|
},
|
|
48
67
|
disabled: !t.customisable,
|
|
49
68
|
className: p(
|
|
50
69
|
"flex items-center justify-end h-full w-full text-end",
|
|
51
70
|
t.customisable ? "cursor-pointer" : "cursor-default opacity-70"
|
|
52
71
|
),
|
|
53
|
-
children: /* @__PURE__ */ r(
|
|
72
|
+
children: /* @__PURE__ */ r($, { keybinding: t.keybinding, size: "sm" })
|
|
54
73
|
}
|
|
55
74
|
) : t.customisable ? /* @__PURE__ */ r(
|
|
56
75
|
"button",
|
|
57
76
|
{
|
|
58
77
|
type: "button",
|
|
59
|
-
onClick: (
|
|
60
|
-
|
|
78
|
+
onClick: (s) => {
|
|
79
|
+
s.stopPropagation(), a.onStartRecording(t.id);
|
|
61
80
|
},
|
|
62
81
|
className: "flex items-center justify-end h-full w-full text-xs text-secondary-foreground hover:text-brand transition-colors cursor-pointer text-end",
|
|
63
82
|
children: a.addShortcutLabel ?? "Add shortcut"
|
|
@@ -67,28 +86,28 @@ function re(a) {
|
|
|
67
86
|
"button",
|
|
68
87
|
{
|
|
69
88
|
type: "button",
|
|
70
|
-
onClick: (
|
|
71
|
-
|
|
89
|
+
onClick: (s) => {
|
|
90
|
+
s.stopPropagation(), a.onReset(t.id);
|
|
72
91
|
},
|
|
73
92
|
className: "absolute end-1.5 p-0.5 rounded bg-canvas-elevated hover:bg-canvas-muted hover:text-destructive cursor-pointer opacity-0 group-hover/row:opacity-100 transition-opacity z-10",
|
|
74
93
|
title: "Reset to default",
|
|
75
|
-
children: /* @__PURE__ */ r(
|
|
94
|
+
children: /* @__PURE__ */ r(B, { className: "!h-3 !w-3" })
|
|
76
95
|
}
|
|
77
96
|
)
|
|
78
97
|
] })
|
|
79
98
|
}
|
|
80
99
|
) });
|
|
81
100
|
}
|
|
82
|
-
function
|
|
101
|
+
function ae(a) {
|
|
83
102
|
const t = a.data;
|
|
84
103
|
return t ? /* @__PURE__ */ r("div", { className: "flex items-center h-full", children: /* @__PURE__ */ r("span", { className: "text-xs text-secondary-foreground capitalize", children: t.scope }) }) : null;
|
|
85
104
|
}
|
|
86
|
-
function
|
|
105
|
+
function le({
|
|
87
106
|
className: a,
|
|
88
107
|
scopes: t,
|
|
89
108
|
sources: d,
|
|
90
|
-
renderStatus:
|
|
91
|
-
recordingLabel:
|
|
109
|
+
renderStatus: s,
|
|
110
|
+
recordingLabel: ie,
|
|
92
111
|
pressShortcutLabel: x,
|
|
93
112
|
addShortcutLabel: v,
|
|
94
113
|
conflictWarnLabel: w = "Conflicts with other shortcuts",
|
|
@@ -99,51 +118,51 @@ function ae({
|
|
|
99
118
|
getSettingsCommands: C,
|
|
100
119
|
getEffectiveKeybinding: S,
|
|
101
120
|
updateKeybinding: N,
|
|
102
|
-
resetKeybinding:
|
|
103
|
-
version:
|
|
104
|
-
} =
|
|
121
|
+
resetKeybinding: k,
|
|
122
|
+
version: _
|
|
123
|
+
} = Z(), [c, f] = o.useState(null), [u, l] = o.useState(null), y = o.useMemo(() => {
|
|
105
124
|
let n = C();
|
|
106
125
|
return n = n.filter((e) => {
|
|
107
|
-
const
|
|
108
|
-
return
|
|
126
|
+
const i = e.source ?? "user";
|
|
127
|
+
return i === "user" || i === "ag-grid";
|
|
109
128
|
}), t && (n = n.filter((e) => t.includes(e.scope))), d && (n = n.filter((e) => e.source && d.includes(e.source))), n.map((e) => {
|
|
110
|
-
const
|
|
129
|
+
const i = S(e.id), g = e.source ?? "user", D = m[g] ?? g ?? "User", T = D.toLowerCase() === "user";
|
|
111
130
|
return {
|
|
112
131
|
id: e.id,
|
|
113
132
|
command: e.label,
|
|
114
133
|
description: e.description || "",
|
|
115
134
|
category: e.category || "General",
|
|
116
|
-
keybinding:
|
|
117
|
-
keybindingDisplay:
|
|
135
|
+
keybinding: i,
|
|
136
|
+
keybindingDisplay: i ? H(i) : "",
|
|
118
137
|
scope: e.scope,
|
|
119
138
|
source: D,
|
|
120
|
-
sourceColor:
|
|
121
|
-
sourceIcon:
|
|
139
|
+
sourceColor: T ? "primary" : "neutral",
|
|
140
|
+
sourceIcon: T ? /* @__PURE__ */ r(G, { className: "h-3 w-3" }) : /* @__PURE__ */ r(U, { className: "h-3 w-3" }),
|
|
122
141
|
customisable: e.customisable !== !1,
|
|
123
142
|
passive: e.passive === !0,
|
|
124
143
|
hasOverride: e.keybinding !== void 0,
|
|
125
144
|
_def: e
|
|
126
145
|
};
|
|
127
146
|
});
|
|
128
|
-
}, [
|
|
147
|
+
}, [_, t, d, C, S]), R = o.useCallback((n) => {
|
|
129
148
|
f(n), l(null);
|
|
130
|
-
}, []), M =
|
|
131
|
-
|
|
132
|
-
}, [
|
|
133
|
-
|
|
149
|
+
}, []), M = o.useCallback((n) => {
|
|
150
|
+
k(n), l(null);
|
|
151
|
+
}, [k]);
|
|
152
|
+
o.useEffect(() => {
|
|
134
153
|
if (!c) return;
|
|
135
154
|
const n = (e) => {
|
|
136
155
|
if (e.preventDefault(), e.stopPropagation(), e.key === "Escape") {
|
|
137
156
|
f(null), l(null);
|
|
138
157
|
return;
|
|
139
158
|
}
|
|
140
|
-
const
|
|
141
|
-
if (!
|
|
142
|
-
if (
|
|
159
|
+
const i = W(e);
|
|
160
|
+
if (!i) return;
|
|
161
|
+
if (ee(i)) {
|
|
143
162
|
l({ type: "reserved", text: b }), f(null), setTimeout(() => l(null), 3e3);
|
|
144
163
|
return;
|
|
145
164
|
}
|
|
146
|
-
const g = N(c,
|
|
165
|
+
const g = N(c, i);
|
|
147
166
|
g.success ? (f(null), l(null)) : g.conflict ? (l({
|
|
148
167
|
type: "conflict",
|
|
149
168
|
text: w
|
|
@@ -151,14 +170,14 @@ function ae({
|
|
|
151
170
|
};
|
|
152
171
|
return window.addEventListener("keydown", n, !0), () => window.removeEventListener("keydown", n, !0);
|
|
153
172
|
}, [c, N, b, w]);
|
|
154
|
-
const P =
|
|
173
|
+
const P = o.useMemo(() => Array.from(new Set(y.map((e) => e.category))).sort().map((e) => ({ label: e, value: e })), [y]), I = o.useMemo(() => [
|
|
155
174
|
{
|
|
156
175
|
field: "command",
|
|
157
176
|
headerName: "Command",
|
|
158
177
|
flex: 1,
|
|
159
178
|
minWidth: 200,
|
|
160
179
|
filter: "agTextColumnFilter",
|
|
161
|
-
cellRenderer:
|
|
180
|
+
cellRenderer: re,
|
|
162
181
|
filterValueGetter: (n) => {
|
|
163
182
|
const e = n.data;
|
|
164
183
|
return e ? `${e.command} ${e.description}` : "";
|
|
@@ -182,11 +201,11 @@ function ae({
|
|
|
182
201
|
width: 180,
|
|
183
202
|
type: "rightAligned",
|
|
184
203
|
filter: "agTextColumnFilter",
|
|
185
|
-
cellRenderer:
|
|
204
|
+
cellRenderer: ne,
|
|
186
205
|
cellClass: F,
|
|
187
206
|
cellRendererParams: {
|
|
188
207
|
recordingCommandId: c,
|
|
189
|
-
onStartRecording:
|
|
208
|
+
onStartRecording: R,
|
|
190
209
|
onReset: M,
|
|
191
210
|
recordingLabel: x,
|
|
192
211
|
addShortcutLabel: v
|
|
@@ -198,7 +217,7 @@ function ae({
|
|
|
198
217
|
headerName: "Scope",
|
|
199
218
|
width: 100,
|
|
200
219
|
filter: "agSetColumnFilter",
|
|
201
|
-
cellRenderer:
|
|
220
|
+
cellRenderer: ae,
|
|
202
221
|
headerComponentParams: {
|
|
203
222
|
isSearchable: !0,
|
|
204
223
|
advanceSearchEnabled: !0,
|
|
@@ -217,7 +236,7 @@ function ae({
|
|
|
217
236
|
width: 130,
|
|
218
237
|
filter: "agSetColumnFilter",
|
|
219
238
|
cellClass: F,
|
|
220
|
-
cellRenderer:
|
|
239
|
+
cellRenderer: te,
|
|
221
240
|
cellRendererParams: {
|
|
222
241
|
variant: "subtle",
|
|
223
242
|
colorField: "sourceColor",
|
|
@@ -235,7 +254,7 @@ function ae({
|
|
|
235
254
|
isMultiSelect: !0
|
|
236
255
|
}
|
|
237
256
|
}
|
|
238
|
-
], [c,
|
|
257
|
+
], [c, R, M, x, v, P]), K = o.useMemo(() => ({
|
|
239
258
|
filter: {
|
|
240
259
|
filterModel: {
|
|
241
260
|
source: {
|
|
@@ -244,7 +263,7 @@ function ae({
|
|
|
244
263
|
}
|
|
245
264
|
}
|
|
246
265
|
}
|
|
247
|
-
}), []),
|
|
266
|
+
}), []), j = o.useMemo(() => ({
|
|
248
267
|
sortable: !0,
|
|
249
268
|
resizable: !0,
|
|
250
269
|
filter: !0,
|
|
@@ -256,18 +275,18 @@ function ae({
|
|
|
256
275
|
"px-3 py-1.5 text-[10px] md:text-sm font-medium rounded-md whitespace-nowrap flex items-center gap-2",
|
|
257
276
|
u?.type === "conflict" ? "bg-feedback-warning-surface text-content" : u?.type === "reserved" ? "bg-feedback-error-surface text-destructive" : c ? "bg-feedback-info-surface text-brand animate-[pulse_1.5s_ease-in-out_infinite] motion-reduce:animate-none" : ""
|
|
258
277
|
), children: [
|
|
259
|
-
u?.type === "conflict" ? /* @__PURE__ */ r(
|
|
278
|
+
u?.type === "conflict" ? /* @__PURE__ */ r(q, { className: "h-3.5 w-3.5 shrink-0" }) : u?.type === "reserved" ? /* @__PURE__ */ r(O, { className: "h-3.5 w-3.5 shrink-0" }) : c ? /* @__PURE__ */ r("span", { className: "shrink-0 text-base", children: "⌨️" }) : null,
|
|
260
279
|
/* @__PURE__ */ r("span", { children: u ? u.text : L })
|
|
261
280
|
] }) : null;
|
|
262
|
-
return /* @__PURE__ */ h(
|
|
263
|
-
|
|
281
|
+
return /* @__PURE__ */ h(X, { className: p("flex flex-col w-full h-full border-t-0", a), children: [
|
|
282
|
+
s ? s(E) : E,
|
|
264
283
|
/* @__PURE__ */ r(
|
|
265
|
-
|
|
284
|
+
Y,
|
|
266
285
|
{
|
|
267
286
|
rowData: y,
|
|
268
|
-
columnDefs:
|
|
269
|
-
defaultColDef:
|
|
270
|
-
initialState:
|
|
287
|
+
columnDefs: I,
|
|
288
|
+
defaultColDef: j,
|
|
289
|
+
initialState: K,
|
|
271
290
|
rowHeight: 44,
|
|
272
291
|
animateRows: !1,
|
|
273
292
|
rowSelection: "single",
|
|
@@ -279,7 +298,7 @@ function ae({
|
|
|
279
298
|
)
|
|
280
299
|
] });
|
|
281
300
|
}
|
|
282
|
-
|
|
301
|
+
le.displayName = "ShortcutSettings";
|
|
283
302
|
export {
|
|
284
|
-
|
|
303
|
+
le as ShortcutSettings
|
|
285
304
|
};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import v from "react";
|
|
3
3
|
import { Sheet as b, SheetContent as g, SheetDescription as N, SheetTitle as y, SheetClose as w } from "../../feedback/sheet/sheet.js";
|
|
4
4
|
import { createCompoundPart as k } from "../../../lib/primitives/create-compound.js";
|
|
5
5
|
import { cn as o } from "../../../lib/utils.js";
|
|
6
6
|
import { MultiColorFilter as C, Cross as F, InfoBadge as u } from "impact-nova-icons";
|
|
7
7
|
import { Button as P } from "../../primitives/button/button.js";
|
|
8
|
-
import { Tooltip as d, TooltipTrigger as
|
|
8
|
+
import { Tooltip as d, TooltipTrigger as f, TooltipContent as h } from "../../feedback/tooltip/tooltip.js";
|
|
9
9
|
import { Kbd as S } from "../../primitives/kbd/kbd.js";
|
|
10
|
+
import { OverflowTooltip as j } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
10
11
|
import { useImpactNovaI18n as x } from "../../../i18n/use-impact-nova-i18n.js";
|
|
11
|
-
import { useOverlayHostDismissNestedLayersOnNavigation as
|
|
12
|
-
const
|
|
12
|
+
import { useOverlayHostDismissNestedLayersOnNavigation as I } from "../../../lib/overlay/overlay-portal-context.js";
|
|
13
|
+
const T = ({
|
|
13
14
|
title: i,
|
|
14
15
|
children: n,
|
|
15
16
|
className: l
|
|
16
17
|
}) => {
|
|
17
18
|
const { t: c } = x();
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ a(
|
|
19
20
|
"div",
|
|
20
21
|
{
|
|
21
22
|
"data-component": "filter-panel-header",
|
|
@@ -24,7 +25,7 @@ const I = ({
|
|
|
24
25
|
l
|
|
25
26
|
),
|
|
26
27
|
children: [
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
|
|
28
29
|
/* @__PURE__ */ e(
|
|
29
30
|
"div",
|
|
30
31
|
{
|
|
@@ -35,7 +36,7 @@ const I = ({
|
|
|
35
36
|
),
|
|
36
37
|
/* @__PURE__ */ e(y, { className: "text-lg font-bold text-content", children: i })
|
|
37
38
|
] }),
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
39
40
|
n,
|
|
40
41
|
/* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e(
|
|
41
42
|
P,
|
|
@@ -52,7 +53,7 @@ const I = ({
|
|
|
52
53
|
]
|
|
53
54
|
}
|
|
54
55
|
);
|
|
55
|
-
},
|
|
56
|
+
}, _ = ({
|
|
56
57
|
open: i,
|
|
57
58
|
onOpenChange: n,
|
|
58
59
|
title: l = "Filter panel",
|
|
@@ -60,8 +61,8 @@ const I = ({
|
|
|
60
61
|
header: s,
|
|
61
62
|
sidebar: p,
|
|
62
63
|
className: m,
|
|
63
|
-
preventClose:
|
|
64
|
-
}) => /* @__PURE__ */ e(b, { open: i, onOpenChange: n, children: /* @__PURE__ */
|
|
64
|
+
preventClose: t = !1
|
|
65
|
+
}) => /* @__PURE__ */ e(b, { open: i, onOpenChange: n, children: /* @__PURE__ */ a(
|
|
65
66
|
g,
|
|
66
67
|
{
|
|
67
68
|
side: "right",
|
|
@@ -70,30 +71,30 @@ const I = ({
|
|
|
70
71
|
m
|
|
71
72
|
),
|
|
72
73
|
onInteractOutside: (r) => {
|
|
73
|
-
|
|
74
|
+
t && r.preventDefault();
|
|
74
75
|
},
|
|
75
76
|
onEscapeKeyDown: (r) => {
|
|
76
|
-
|
|
77
|
+
t && r.preventDefault();
|
|
77
78
|
},
|
|
78
79
|
children: [
|
|
79
80
|
/* @__PURE__ */ e(N, { className: "sr-only", children: "Select filters to apply to the current view." }),
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
s || /* @__PURE__ */ e(
|
|
82
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ a("div", { className: "flex h-full flex-col bg-canvas-elevated", "data-component": "filter-panel", children: [
|
|
82
|
+
s || /* @__PURE__ */ e(T, { title: l }),
|
|
83
|
+
/* @__PURE__ */ a("div", { className: "flex flex-1 overflow-hidden", children: [
|
|
83
84
|
p,
|
|
84
85
|
/* @__PURE__ */ e("div", { className: "flex flex-col flex-1 overflow-hidden", children: c })
|
|
85
86
|
] })
|
|
86
87
|
] })
|
|
87
88
|
]
|
|
88
89
|
}
|
|
89
|
-
) }),
|
|
90
|
+
) }), q = ({
|
|
90
91
|
items: i,
|
|
91
92
|
activeTab: n,
|
|
92
93
|
onTabChange: l,
|
|
93
94
|
className: c
|
|
94
95
|
}) => {
|
|
95
|
-
const { t: s } = x(), p =
|
|
96
|
-
|
|
96
|
+
const { t: s } = x(), p = I(), m = (t) => {
|
|
97
|
+
t !== n && p(), l(t);
|
|
97
98
|
};
|
|
98
99
|
return /* @__PURE__ */ e(
|
|
99
100
|
"div",
|
|
@@ -103,26 +104,26 @@ const I = ({
|
|
|
103
104
|
"flex w-[200px] shrink-0 flex-col border-r bg-navigation-canvas",
|
|
104
105
|
c
|
|
105
106
|
),
|
|
106
|
-
children: /* @__PURE__ */ e("div", { className: "flex flex-1 flex-col py-2 gap-1 overflow-y-auto", children: i.map((
|
|
107
|
-
const r = n ===
|
|
108
|
-
return /* @__PURE__ */
|
|
109
|
-
|
|
110
|
-
/* @__PURE__ */
|
|
107
|
+
children: /* @__PURE__ */ e("div", { className: "flex flex-1 flex-col py-2 gap-1 overflow-y-auto", children: i.map((t) => {
|
|
108
|
+
const r = n === t.id;
|
|
109
|
+
return /* @__PURE__ */ a(v.Fragment, { children: [
|
|
110
|
+
t.separator && /* @__PURE__ */ e("div", { className: "my-2 h-px bg-stroke-hairline" }),
|
|
111
|
+
/* @__PURE__ */ a(
|
|
111
112
|
"button",
|
|
112
113
|
{
|
|
113
114
|
type: "button",
|
|
114
115
|
autoFocus: r,
|
|
115
|
-
onClick: () => m(
|
|
116
|
+
onClick: () => m(t.id),
|
|
116
117
|
"data-component": "filter-panel-sidebar-item",
|
|
117
118
|
"data-active": r ? "true" : "false",
|
|
118
|
-
"data-tab":
|
|
119
|
-
"data-shortcut-id":
|
|
119
|
+
"data-tab": t.id,
|
|
120
|
+
"data-shortcut-id": t.shortcutId,
|
|
120
121
|
className: o(
|
|
121
122
|
"group flex items-center justify-between px-3 py-[6px] mx-2 rounded-lg text-left text-sm font-medium transition-colors",
|
|
122
123
|
r ? "bg-canvas-accent text-brand" : "text-content-secondary hover:bg-canvas-accent"
|
|
123
124
|
),
|
|
124
125
|
children: [
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: [
|
|
126
127
|
/* @__PURE__ */ e(
|
|
127
128
|
"span",
|
|
128
129
|
{
|
|
@@ -130,74 +131,80 @@ const I = ({
|
|
|
130
131
|
"shrink-0",
|
|
131
132
|
r ? "text-brand" : "text-content-secondary"
|
|
132
133
|
),
|
|
133
|
-
children:
|
|
134
|
+
children: t.icon
|
|
134
135
|
}
|
|
135
136
|
),
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
" ",
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
137
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-1 min-w-0", children: [
|
|
138
|
+
/* @__PURE__ */ e(
|
|
139
|
+
j,
|
|
140
|
+
{
|
|
141
|
+
triggerClassName: "truncate font-['Manrope'] block min-w-0",
|
|
142
|
+
content: t.tooltipKeybinding ? /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
|
|
143
|
+
t.label,
|
|
144
|
+
" ",
|
|
145
|
+
/* @__PURE__ */ e(
|
|
146
|
+
S,
|
|
147
|
+
{
|
|
148
|
+
keybinding: t.tooltipKeybinding,
|
|
149
|
+
size: "sm"
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
] }) : t.label,
|
|
153
|
+
side: "right",
|
|
154
|
+
variant: "tertiary",
|
|
155
|
+
children: t.label
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
t.isRequired && /* @__PURE__ */ e("span", { className: "shrink-0 text-danger", children: "*" })
|
|
152
159
|
] })
|
|
153
160
|
] }),
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
|
|
156
|
-
/* @__PURE__ */ e(
|
|
161
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-1 shrink-0 ml-1", children: [
|
|
162
|
+
t.count !== void 0 && t.count > 0 && /* @__PURE__ */ a(d, { children: [
|
|
163
|
+
/* @__PURE__ */ e(f, { asChild: !0, children: /* @__PURE__ */ e(
|
|
157
164
|
"span",
|
|
158
165
|
{
|
|
159
166
|
className: o(
|
|
160
167
|
"inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-[11px] font-medium tabular-nums leading-none shrink-0",
|
|
161
168
|
r ? "bg-canvas-elevated text-brand border border-stroke-subtle" : "bg-brand-tint border border-stroke-subtle"
|
|
162
169
|
),
|
|
163
|
-
children:
|
|
170
|
+
children: t.count
|
|
164
171
|
}
|
|
165
172
|
) }),
|
|
166
|
-
/* @__PURE__ */ e(
|
|
167
|
-
|
|
168
|
-
{ count:
|
|
173
|
+
/* @__PURE__ */ e(h, { variant: "tertiary", side: "top", children: s(
|
|
174
|
+
t.countBadgeContext === "savedFiltersTotal" ? "filterPanel.savedFiltersAvailableCount" : "filterPanel.filtersAppliedCount",
|
|
175
|
+
{ count: t.count }
|
|
169
176
|
) })
|
|
170
177
|
] }),
|
|
171
|
-
|
|
172
|
-
/* @__PURE__ */ e(
|
|
173
|
-
/* @__PURE__ */ e(
|
|
178
|
+
t.hasError && /* @__PURE__ */ a(d, { children: [
|
|
179
|
+
/* @__PURE__ */ e(f, { asChild: !0, children: /* @__PURE__ */ e(u, { className: "h-5 w-5 shrink-0 text-danger" }) }),
|
|
180
|
+
/* @__PURE__ */ e(h, { variant: "tertiary", children: s("filterPanel.tabContainsErrors") })
|
|
174
181
|
] }),
|
|
175
|
-
|
|
176
|
-
/* @__PURE__ */ e(
|
|
177
|
-
/* @__PURE__ */ e(
|
|
182
|
+
t.hasWarning && /* @__PURE__ */ a(d, { children: [
|
|
183
|
+
/* @__PURE__ */ e(f, { asChild: !0, children: /* @__PURE__ */ e(u, { className: "h-5 w-5 shrink-0 text-warning" }) }),
|
|
184
|
+
/* @__PURE__ */ e(h, { variant: "tertiary", children: s("filterPanel.tabHasWarnings") })
|
|
178
185
|
] }),
|
|
179
|
-
|
|
180
|
-
/* @__PURE__ */ e(
|
|
181
|
-
/* @__PURE__ */ e(
|
|
186
|
+
t.hasInfo && /* @__PURE__ */ a(d, { children: [
|
|
187
|
+
/* @__PURE__ */ e(f, { asChild: !0, children: /* @__PURE__ */ e(u, { className: "h-5 w-5 shrink-0 text-content-icon" }) }),
|
|
188
|
+
/* @__PURE__ */ e(h, { variant: "tertiary", children: s("filterPanel.additionalInfoAvailable") })
|
|
182
189
|
] })
|
|
183
190
|
] })
|
|
184
191
|
]
|
|
185
192
|
}
|
|
186
193
|
)
|
|
187
|
-
] },
|
|
194
|
+
] }, t.id);
|
|
188
195
|
}) })
|
|
189
196
|
}
|
|
190
197
|
);
|
|
191
|
-
},
|
|
198
|
+
}, G = k("filter-panel", {
|
|
192
199
|
part: "body",
|
|
193
200
|
displayName: "FilterPanelBody",
|
|
194
201
|
className: "flex flex-1 flex-col overflow-auto bg-canvas-elevated p-4",
|
|
195
202
|
scrollSurface: !0
|
|
196
|
-
}),
|
|
203
|
+
}), J = ({
|
|
197
204
|
children: i,
|
|
198
205
|
className: n,
|
|
199
206
|
leftAction: l
|
|
200
|
-
}) => /* @__PURE__ */
|
|
207
|
+
}) => /* @__PURE__ */ a(
|
|
201
208
|
"div",
|
|
202
209
|
{
|
|
203
210
|
"data-component": "filter-panel-footer",
|
|
@@ -212,9 +219,9 @@ const I = ({
|
|
|
212
219
|
}
|
|
213
220
|
);
|
|
214
221
|
export {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
222
|
+
_ as FilterPanel,
|
|
223
|
+
G as FilterPanelBody,
|
|
224
|
+
J as FilterPanelFooter,
|
|
225
|
+
T as FilterPanelHeader,
|
|
226
|
+
q as FilterPanelSidebar
|
|
220
227
|
};
|