impact-nova 3.0.0-alpha.16 → 3.0.0-alpha.18
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.types.d.ts +9 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.d.ts +2 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.js +15 -14
- package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.d.ts +10 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.js +17 -0
- package/dist/components/data/ag-grid-react/cell-renderers/index.d.ts +45 -7
- package/dist/components/data/ag-grid-react/cell-renderers/index.js +70 -58
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.d.ts +5 -11
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.js +127 -51
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +150 -147
- package/dist/components/data/ag-grid-react/list-drag-grid-options.d.ts +14 -1
- package/dist/components/data/ag-grid-react/list-drag-grid-options.js +95 -31
- package/dist/components/data/ag-grid-react/list-drag-preview-card.d.ts +4 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-card.js +14 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.d.ts +20 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.js +42 -0
- package/dist/components/data/ag-grid-react/list-find-highlight.d.ts +6 -0
- package/dist/components/data/ag-grid-react/list-find-highlight.js +7 -0
- package/dist/components/data/ag-grid-react/process-backend-columndefs.d.ts +4 -0
- package/dist/components/data/ag-grid-react/process-backend-columndefs.js +78 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.d.ts +10 -2
- package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.js +130 -107
- package/dist/components/data/ag-grid-react/use-list-drag-preview.d.ts +4 -1
- package/dist/components/data/ag-grid-react/use-list-drag-preview.js +131 -32
- package/dist/components/data/ag-grid-react/use-list-find.d.ts +36 -0
- package/dist/components/data/ag-grid-react/use-list-row-drop-zones.d.ts +2 -0
- package/dist/components/data/ag-grid-react/use-list-row-drop-zones.js +60 -41
- package/dist/components/data/data-table/data-table-list-header.js +1 -1
- package/dist/components/data/data-table/data-table-overlay.d.ts +6 -0
- package/dist/components/data/data-table/data-table-overlay.js +18 -0
- package/dist/components/data/data-table/data-table.types.d.ts +1 -0
- package/dist/components/data/data-table/index.d.ts +3 -0
- package/dist/components/data/data-table/index.js +67 -63
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
- package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.d.ts +2 -0
- package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.js +16 -0
- package/dist/components/data/scenario-comparison/index.d.ts +3 -0
- package/dist/components/data/scenario-comparison/index.js +6 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-column.d.ts +12 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-column.js +172 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-label.d.ts +6 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-label.js +64 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.d.ts +5 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.js +127 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.types.d.ts +56 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.variants.d.ts +7 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.variants.js +29 -0
- package/dist/components/data-display/badge/index.d.ts +2 -0
- package/dist/components/data-display/badge/index.js +4 -2
- package/dist/components/data-display/badge/trophy-icon.d.ts +6 -0
- package/dist/components/data-display/badge/trophy-icon.js +28 -0
- package/dist/components/feedback/find-bar/collect-find-matches.d.ts +35 -0
- package/dist/components/feedback/find-bar/collect-find-matches.js +68 -0
- package/dist/components/feedback/find-bar/find-bar-shortcuts.d.ts +5 -0
- package/dist/components/feedback/find-bar/find-bar-shortcuts.js +27 -0
- package/dist/components/feedback/find-bar/find-bar.d.ts +7 -0
- package/dist/components/feedback/find-bar/find-bar.js +266 -0
- package/dist/components/feedback/find-bar/find-bar.types.d.ts +32 -0
- package/dist/components/feedback/find-bar/index.d.ts +4 -0
- package/dist/components/feedback/find-bar/index.js +11 -0
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/forms/choice-card/choice-card-compare-scroll.d.ts +4 -0
- package/dist/components/forms/choice-card/choice-card-compare-scroll.js +6 -0
- package/dist/components/forms/choice-card/choice-card.d.ts +13 -2
- package/dist/components/forms/choice-card/choice-card.js +432 -342
- package/dist/components/forms/choice-card/choice-card.types.d.ts +9 -2
- package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
- package/dist/components/forms/select/components/Submenu.js +3 -2
- package/dist/components/primitives/tabs/folder-tab-path.d.ts +6 -0
- package/dist/components/primitives/tabs/folder-tab-path.js +16 -0
- package/dist/components/primitives/tabs/tabs.js +164 -111
- package/dist/components/primitives/tabs/tabs.types.d.ts +1 -1
- package/dist/i18n/defaultMessages.d.ts +17 -0
- package/dist/i18n/defaultMessages.js +52 -38
- package/dist/i18n/impact-nova-i18n-defaults.d.ts +5 -0
- package/dist/i18n/impact-nova-i18n-defaults.js +4 -9
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +15 -1
- package/dist/i18n/locales/es.js +15 -1
- package/dist/i18n/locales/hi.js +15 -1
- package/dist/i18n/locales/kn.js +15 -1
- package/dist/impact-nova-components.css +189 -14
- package/dist/impact-nova-tokens.scss +2 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +621 -607
- package/dist/lib/virtualized/index.d.ts +2 -0
- package/dist/lib/virtualized/index.js +35 -31
- package/dist/lib/virtualized/list-index.d.ts +5 -0
- package/dist/lib/virtualized/list-index.js +13 -0
- package/dist/lib/virtualized/read-infinite-query-list.d.ts +14 -0
- package/dist/lib/virtualized/read-infinite-query-list.js +12 -0
- package/dist/lib/virtualized/types.d.ts +4 -2
- package/dist/lib/virtualized/useRowState.js +60 -56
- package/dist/lib/virtualized/useVirtualizedList.d.ts +5 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +16 -3
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const r = [];
|
|
2
|
+
let t = null;
|
|
3
|
+
function e() {
|
|
4
|
+
return /* @__PURE__ */ Symbol("find-bar");
|
|
5
|
+
}
|
|
6
|
+
function c(n) {
|
|
7
|
+
return r.push(n), () => {
|
|
8
|
+
const u = r.lastIndexOf(n);
|
|
9
|
+
u >= 0 && r.splice(u, 1), t === n && (t = null);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function i(n, u) {
|
|
13
|
+
if (u) {
|
|
14
|
+
t = n;
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
t === n && (t = null);
|
|
18
|
+
}
|
|
19
|
+
function l(n) {
|
|
20
|
+
return r.includes(n) ? t != null && r.includes(t) ? t === n : r[r.length - 1] === n : !1;
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
e as createFindBarShortcutId,
|
|
24
|
+
l as isFindBarShortcutOwner,
|
|
25
|
+
c as registerFindBarShortcutCapture,
|
|
26
|
+
i as setFindBarShortcutFocus
|
|
27
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FindBarProps } from './find-bar.types';
|
|
2
|
+
/**
|
|
3
|
+
* Compact in-view find chrome (⌘F / Ctrl+F). Host owns matching and navigation.
|
|
4
|
+
*/
|
|
5
|
+
declare const FindBar: import('react').ForwardRefExoticComponent<FindBarProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { FindBar };
|
|
7
|
+
export type { FindBarProps } from './find-bar.types';
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { jsxs as C, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as w, useId as Z, useState as $, useEffect as m } from "react";
|
|
3
|
+
import { Search as q, ArrowUp as ee, ArrowDown as te, Cross as re } from "impact-nova-icons";
|
|
4
|
+
import { createComponent as ne } from "../../../lib/primitives/create-component.js";
|
|
5
|
+
import { cn as R } from "../../../lib/utils.js";
|
|
6
|
+
import { useImpactNovaI18n as ie } from "../../../i18n/use-impact-nova-i18n.js";
|
|
7
|
+
import { getFindCounterState as oe } from "./collect-find-matches.js";
|
|
8
|
+
import { createFindBarShortcutId as ae, setFindBarShortcutFocus as K, registerFindBarShortcutCapture as se, isFindBarShortcutOwner as ce } from "./find-bar-shortcuts.js";
|
|
9
|
+
function M(e) {
|
|
10
|
+
return e.metaKey || e.ctrlKey;
|
|
11
|
+
}
|
|
12
|
+
function le(e) {
|
|
13
|
+
if (e.key === "Enter" || e.key === "F3" || M(e) && e.key.toLowerCase() === "g")
|
|
14
|
+
return e.shiftKey ? "previous" : "next";
|
|
15
|
+
}
|
|
16
|
+
const ue = 500;
|
|
17
|
+
function de(e, t, i) {
|
|
18
|
+
const [o, l] = $(e), c = w(t), s = w(e);
|
|
19
|
+
m(() => {
|
|
20
|
+
c.current = t;
|
|
21
|
+
}, [t]), m(() => {
|
|
22
|
+
e !== s.current && (s.current = e, l(e));
|
|
23
|
+
}, [e]), m(() => {
|
|
24
|
+
if (i <= 0 || o === s.current) return;
|
|
25
|
+
const u = window.setTimeout(() => {
|
|
26
|
+
s.current = o, c.current(o);
|
|
27
|
+
}, i);
|
|
28
|
+
return () => window.clearTimeout(u);
|
|
29
|
+
}, [o, i]);
|
|
30
|
+
function d(u) {
|
|
31
|
+
l(u), i <= 0 && (s.current = u, c.current(u));
|
|
32
|
+
}
|
|
33
|
+
function f() {
|
|
34
|
+
o !== s.current && (s.current = o, c.current(o));
|
|
35
|
+
}
|
|
36
|
+
return { draft: o, emitDraft: d, commitDraft: f };
|
|
37
|
+
}
|
|
38
|
+
function fe(e) {
|
|
39
|
+
const {
|
|
40
|
+
inputRef: t,
|
|
41
|
+
query: i,
|
|
42
|
+
autoFocus: o,
|
|
43
|
+
captureShortcuts: l,
|
|
44
|
+
ownerId: c,
|
|
45
|
+
commitDraft: s,
|
|
46
|
+
onPrevious: d,
|
|
47
|
+
onNext: f,
|
|
48
|
+
onClose: u,
|
|
49
|
+
onKeyDown: h
|
|
50
|
+
} = e;
|
|
51
|
+
return m(() => {
|
|
52
|
+
o && (t.current?.focus(), t.current?.select());
|
|
53
|
+
}, [o, t]), m(() => {
|
|
54
|
+
if (l)
|
|
55
|
+
return se(c);
|
|
56
|
+
}, [l, c]), m(() => {
|
|
57
|
+
if (!l) return;
|
|
58
|
+
function p(r) {
|
|
59
|
+
if (!ce(c)) return;
|
|
60
|
+
if (M(r) && r.key.toLowerCase() === "f") {
|
|
61
|
+
r.preventDefault(), t.current?.focus(), t.current?.select();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const v = le(r);
|
|
65
|
+
!v || r.key === "Enter" || !i.trim() || (r.preventDefault(), v === "previous" ? d?.() : f?.());
|
|
66
|
+
}
|
|
67
|
+
return window.addEventListener("keydown", p), () => window.removeEventListener("keydown", p);
|
|
68
|
+
}, [l, t, f, d, c, i]), function(r) {
|
|
69
|
+
if (h?.(r), !r.defaultPrevented) {
|
|
70
|
+
if (r.key === "Escape") {
|
|
71
|
+
r.preventDefault(), u?.();
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
r.key === "Enter" && (r.target instanceof HTMLButtonElement || (s(), !(!i.trim() && !t.current?.value.trim()) && (r.preventDefault(), r.shiftKey ? d?.() : f?.())));
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function me(e) {
|
|
79
|
+
const { counter: t } = e, i = !t.visible || t.noMatch;
|
|
80
|
+
return e.idle ? /* @__PURE__ */ a("span", { id: e.statusId, className: "sr-only", "aria-live": "polite", children: t.status }) : /* @__PURE__ */ C("div", { className: "flex shrink-0 items-center gap-2", "data-component": "find-bar-trail", children: [
|
|
81
|
+
t.visible ? /* @__PURE__ */ C(
|
|
82
|
+
"p",
|
|
83
|
+
{
|
|
84
|
+
className: R(
|
|
85
|
+
"whitespace-nowrap text-xs font-semibold leading-5",
|
|
86
|
+
t.noMatch ? "text-destructive" : "text-content-icon"
|
|
87
|
+
),
|
|
88
|
+
"aria-hidden": !0,
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ a("span", { className: t.noMatch ? "text-destructive" : "text-content-secondary", children: t.currentDisplay }),
|
|
91
|
+
"/",
|
|
92
|
+
t.matchCount
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
) : null,
|
|
96
|
+
/* @__PURE__ */ a("span", { id: e.statusId, className: "sr-only", "aria-live": "polite", children: t.status }),
|
|
97
|
+
/* @__PURE__ */ a("span", { className: "h-3 w-px shrink-0 bg-stroke", "aria-hidden": !0 }),
|
|
98
|
+
/* @__PURE__ */ C("div", { className: "flex items-center gap-2", children: [
|
|
99
|
+
/* @__PURE__ */ a(
|
|
100
|
+
"button",
|
|
101
|
+
{
|
|
102
|
+
type: "button",
|
|
103
|
+
"aria-label": e.previousLabel,
|
|
104
|
+
disabled: i,
|
|
105
|
+
className: "inline-flex size-4 shrink-0 items-center justify-center text-content-icon hover:text-content disabled:opacity-40",
|
|
106
|
+
onClick: e.onPrevious,
|
|
107
|
+
children: /* @__PURE__ */ a(ee, { size: 16, "aria-hidden": !0 })
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
/* @__PURE__ */ a(
|
|
111
|
+
"button",
|
|
112
|
+
{
|
|
113
|
+
type: "button",
|
|
114
|
+
"aria-label": e.nextLabel,
|
|
115
|
+
disabled: i,
|
|
116
|
+
className: "inline-flex size-4 shrink-0 items-center justify-center text-content-icon hover:text-content disabled:opacity-40",
|
|
117
|
+
onClick: e.onNext,
|
|
118
|
+
children: /* @__PURE__ */ a(te, { size: 16, "aria-hidden": !0 })
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
] }),
|
|
122
|
+
e.onClose ? /* @__PURE__ */ a(
|
|
123
|
+
"button",
|
|
124
|
+
{
|
|
125
|
+
type: "button",
|
|
126
|
+
"aria-label": e.closeLabel,
|
|
127
|
+
className: "inline-flex size-3.5 shrink-0 items-center justify-center text-content-icon hover:text-content",
|
|
128
|
+
onClick: e.onClose,
|
|
129
|
+
children: /* @__PURE__ */ a(re, { size: 14, "aria-hidden": !0 })
|
|
130
|
+
}
|
|
131
|
+
) : null
|
|
132
|
+
] });
|
|
133
|
+
}
|
|
134
|
+
const De = ne(
|
|
135
|
+
"FindBar",
|
|
136
|
+
({
|
|
137
|
+
className: e,
|
|
138
|
+
query: t,
|
|
139
|
+
onQueryChange: i,
|
|
140
|
+
debounceMs: o = ue,
|
|
141
|
+
activeIndex: l = 0,
|
|
142
|
+
matchCount: c = 0,
|
|
143
|
+
onPrevious: s,
|
|
144
|
+
onNext: d,
|
|
145
|
+
onClose: f,
|
|
146
|
+
autoFocus: u = !0,
|
|
147
|
+
captureShortcuts: h = !0,
|
|
148
|
+
placeholder: p,
|
|
149
|
+
findLabel: r,
|
|
150
|
+
previousLabel: v,
|
|
151
|
+
nextLabel: S,
|
|
152
|
+
closeLabel: T,
|
|
153
|
+
noResultsLabel: z,
|
|
154
|
+
onKeyDown: j,
|
|
155
|
+
onFocus: _,
|
|
156
|
+
onBlur: A,
|
|
157
|
+
...O
|
|
158
|
+
}, P) => {
|
|
159
|
+
const { t: b } = ie(), k = r ?? b("findBar.find"), U = v ?? b("findBar.previousMatch"), H = S ?? b("findBar.nextMatch"), W = T ?? b("findBar.closeFind"), Y = z ?? b("findBar.noResults"), D = w(null), g = w(ae()), F = Z(), y = oe({
|
|
160
|
+
query: t,
|
|
161
|
+
activeIndex: l,
|
|
162
|
+
matchCount: c,
|
|
163
|
+
noResultsLabel: Y
|
|
164
|
+
}), B = w(!1), { draft: N, emitDraft: L, commitDraft: E } = de(
|
|
165
|
+
t,
|
|
166
|
+
i,
|
|
167
|
+
o
|
|
168
|
+
);
|
|
169
|
+
function I() {
|
|
170
|
+
E(), f?.();
|
|
171
|
+
}
|
|
172
|
+
const G = fe({
|
|
173
|
+
inputRef: D,
|
|
174
|
+
query: t,
|
|
175
|
+
autoFocus: u,
|
|
176
|
+
captureShortcuts: h,
|
|
177
|
+
ownerId: g.current,
|
|
178
|
+
commitDraft: E,
|
|
179
|
+
onPrevious: s,
|
|
180
|
+
onNext: d,
|
|
181
|
+
onClose: I,
|
|
182
|
+
onKeyDown: j
|
|
183
|
+
});
|
|
184
|
+
function J(n) {
|
|
185
|
+
n.target instanceof Element && n.target.closest("button, input") || (n.preventDefault(), D.current?.focus());
|
|
186
|
+
}
|
|
187
|
+
function Q() {
|
|
188
|
+
h && K(g.current, !0);
|
|
189
|
+
}
|
|
190
|
+
function V(n) {
|
|
191
|
+
if (!h) return;
|
|
192
|
+
const x = n.relatedTarget;
|
|
193
|
+
x instanceof Node && n.currentTarget.contains(x) || K(g.current, !1);
|
|
194
|
+
}
|
|
195
|
+
function X(n) {
|
|
196
|
+
const x = n.nativeEvent;
|
|
197
|
+
B.current || "isComposing" in x && x.isComposing || L(n.currentTarget.value);
|
|
198
|
+
}
|
|
199
|
+
return /* @__PURE__ */ C(
|
|
200
|
+
"div",
|
|
201
|
+
{
|
|
202
|
+
ref: P,
|
|
203
|
+
role: "search",
|
|
204
|
+
"data-component": "find-bar",
|
|
205
|
+
"data-no-match": y.noMatch ? "true" : void 0,
|
|
206
|
+
className: R(
|
|
207
|
+
"inline-flex h-8 w-[200px] max-w-full shrink-0 items-center gap-2 overflow-hidden rounded-md border bg-canvas px-2 transition-colors focus-within:outline-none",
|
|
208
|
+
y.noMatch ? "border-destructive hover:border-destructive" : "border-stroke-field hover:border-brand focus-within:border-brand",
|
|
209
|
+
e
|
|
210
|
+
),
|
|
211
|
+
...O,
|
|
212
|
+
onKeyDown: G,
|
|
213
|
+
onMouseDown: J,
|
|
214
|
+
onFocus: (n) => {
|
|
215
|
+
_?.(n), Q();
|
|
216
|
+
},
|
|
217
|
+
onBlur: (n) => {
|
|
218
|
+
A?.(n), V(n);
|
|
219
|
+
},
|
|
220
|
+
children: [
|
|
221
|
+
/* @__PURE__ */ a(q, { size: 16, className: "shrink-0 text-content-icon", "aria-hidden": !0 }),
|
|
222
|
+
/* @__PURE__ */ a(
|
|
223
|
+
"input",
|
|
224
|
+
{
|
|
225
|
+
ref: D,
|
|
226
|
+
type: "text",
|
|
227
|
+
value: N,
|
|
228
|
+
placeholder: p ?? k,
|
|
229
|
+
"aria-label": k,
|
|
230
|
+
"aria-invalid": y.noMatch || void 0,
|
|
231
|
+
"aria-describedby": F,
|
|
232
|
+
autoComplete: "off",
|
|
233
|
+
autoCorrect: "off",
|
|
234
|
+
spellCheck: !1,
|
|
235
|
+
className: "min-w-0 flex-1 truncate bg-transparent p-0 text-sm font-medium leading-5 text-content-title outline-none placeholder:font-normal placeholder:leading-4 placeholder:text-content-placeholder",
|
|
236
|
+
onCompositionStart: () => {
|
|
237
|
+
B.current = !0;
|
|
238
|
+
},
|
|
239
|
+
onCompositionEnd: (n) => {
|
|
240
|
+
B.current = !1, L(n.currentTarget.value);
|
|
241
|
+
},
|
|
242
|
+
onChange: X
|
|
243
|
+
}
|
|
244
|
+
),
|
|
245
|
+
/* @__PURE__ */ a(
|
|
246
|
+
me,
|
|
247
|
+
{
|
|
248
|
+
counter: y,
|
|
249
|
+
statusId: F,
|
|
250
|
+
previousLabel: U,
|
|
251
|
+
nextLabel: H,
|
|
252
|
+
closeLabel: W,
|
|
253
|
+
onPrevious: s,
|
|
254
|
+
onNext: d,
|
|
255
|
+
onClose: f ? I : void 0,
|
|
256
|
+
idle: N.trim() === ""
|
|
257
|
+
}
|
|
258
|
+
)
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
);
|
|
264
|
+
export {
|
|
265
|
+
De as FindBar
|
|
266
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export interface FindBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
3
|
+
/** Current find query. */
|
|
4
|
+
query: string;
|
|
5
|
+
onQueryChange: (query: string) => void;
|
|
6
|
+
/**
|
|
7
|
+
* Delay before `onQueryChange` while typing. The field still updates immediately.
|
|
8
|
+
* Escape / close / Enter flush. Pass `0` to emit on every keystroke.
|
|
9
|
+
*/
|
|
10
|
+
debounceMs?: number;
|
|
11
|
+
/** 0-based index of the current match. */
|
|
12
|
+
activeIndex?: number;
|
|
13
|
+
/** Number of matches for `query`. */
|
|
14
|
+
matchCount?: number;
|
|
15
|
+
onPrevious?: () => void;
|
|
16
|
+
onNext?: () => void;
|
|
17
|
+
onClose?: () => void;
|
|
18
|
+
/** Focus the field on mount. Overlay find should leave this on; persistent bars should pass false. */
|
|
19
|
+
autoFocus?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* When true (default), this instance may own window ⌘F / Ctrl+F, ⌘G / Ctrl+G, and F3.
|
|
22
|
+
* Only the focused capturing bar — or the most recently mounted one if none is focused —
|
|
23
|
+
* actually handles those keys. Persistent bars that must leave browser find alone pass false.
|
|
24
|
+
*/
|
|
25
|
+
captureShortcuts?: boolean;
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
findLabel?: string;
|
|
28
|
+
previousLabel?: string;
|
|
29
|
+
nextLabel?: string;
|
|
30
|
+
closeLabel?: string;
|
|
31
|
+
noResultsLabel?: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { FindBar } from './find-bar';
|
|
2
|
+
export type { FindBarProps } from './find-bar.types';
|
|
3
|
+
export { clampFindMatchIndex, collectFindMatches, collectFindMatchOccurrences, getFindCounterState, splitFindHighlight, stepFindMatchIndex, } from './collect-find-matches';
|
|
4
|
+
export type { FindCounterState, FindHighlightPart, FindTextOccurrence, } from './collect-find-matches';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FindBar as c } from "./find-bar.js";
|
|
2
|
+
import { clampFindMatchIndex as i, collectFindMatchOccurrences as d, collectFindMatches as r, getFindCounterState as a, splitFindHighlight as l, stepFindMatchIndex as o } from "./collect-find-matches.js";
|
|
3
|
+
export {
|
|
4
|
+
c as FindBar,
|
|
5
|
+
i as clampFindMatchIndex,
|
|
6
|
+
d as collectFindMatchOccurrences,
|
|
7
|
+
r as collectFindMatches,
|
|
8
|
+
a as getFindCounterState,
|
|
9
|
+
l as splitFindHighlight,
|
|
10
|
+
o as stepFindMatchIndex
|
|
11
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Tooltip as l, TooltipTrigger as n, TooltipContent as o } from "./tooltip.js";
|
|
3
|
-
|
|
3
|
+
import "react";
|
|
4
|
+
const p = (i, r, a) => /* @__PURE__ */ t(l, { children: [
|
|
4
5
|
/* @__PURE__ */ e(n, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "inline-flex items-center justify-center h-full w-full", children: i }) }),
|
|
5
6
|
/* @__PURE__ */ e(o, { variant: "tertiary", className: a, children: r })
|
|
6
7
|
] }), h = (i, r) => /* @__PURE__ */ t(l, { children: [
|
|
@@ -9,5 +10,5 @@ const d = (i, r, a) => /* @__PURE__ */ t(l, { children: [
|
|
|
9
10
|
] });
|
|
10
11
|
export {
|
|
11
12
|
h as defaultAccordionTooltipRender,
|
|
12
|
-
|
|
13
|
+
p as defaultTabTooltipRender
|
|
13
14
|
};
|
|
@@ -2,17 +2,17 @@ import { jsx as r, jsxs as h, Fragment as z } from "react/jsx-runtime";
|
|
|
2
2
|
import * as o from "react";
|
|
3
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 { Kbd as $ } from "../../primitives/kbd/kbd.js";
|
|
6
|
+
import { keybindingToString as H } from "../../primitives/kbd/keybinding-display.js";
|
|
5
7
|
import { OverflowTooltip as A } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
6
|
-
import { ModuleRegistry as
|
|
7
|
-
import { AllEnterpriseModule as
|
|
8
|
-
import { DataTable as
|
|
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";
|
|
9
11
|
import { AG_CELL_NO_PADDING as F } from "../../data/ag-grid-react/cell-renderers/index.js";
|
|
10
|
-
import { Kbd as X } from "../../primitives/kbd/kbd.js";
|
|
11
|
-
import { keybindingToString as Y } from "../../primitives/kbd/keybinding-display.js";
|
|
12
12
|
import { useCommandPalette as Z } from "./use-command-palette.js";
|
|
13
13
|
import { COMMAND_SOURCE_LABELS as m, keybindingFromEvent as W, isReservedShortcut as ee } from "./utils.js";
|
|
14
14
|
import { BadgeCellRenderer as te } from "../../data/ag-grid-react/cell-renderers/badge-cell-renderer.js";
|
|
15
|
-
|
|
15
|
+
V.registerModules([J, Q]);
|
|
16
16
|
function re(a) {
|
|
17
17
|
const t = a.data;
|
|
18
18
|
return t ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
|
|
@@ -69,7 +69,7 @@ function ne(a) {
|
|
|
69
69
|
"flex items-center justify-end h-full w-full text-end",
|
|
70
70
|
t.customisable ? "cursor-pointer" : "cursor-default opacity-70"
|
|
71
71
|
),
|
|
72
|
-
children: /* @__PURE__ */ r(
|
|
72
|
+
children: /* @__PURE__ */ r($, { keybinding: t.keybinding, size: "sm" })
|
|
73
73
|
}
|
|
74
74
|
) : t.customisable ? /* @__PURE__ */ r(
|
|
75
75
|
"button",
|
|
@@ -133,7 +133,7 @@ function le({
|
|
|
133
133
|
description: e.description || "",
|
|
134
134
|
category: e.category || "General",
|
|
135
135
|
keybinding: i,
|
|
136
|
-
keybindingDisplay: i ?
|
|
136
|
+
keybindingDisplay: i ? H(i) : "",
|
|
137
137
|
scope: e.scope,
|
|
138
138
|
source: D,
|
|
139
139
|
sourceColor: T ? "primary" : "neutral",
|
|
@@ -278,10 +278,10 @@ function le({
|
|
|
278
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,
|
|
279
279
|
/* @__PURE__ */ r("span", { children: u ? u.text : L })
|
|
280
280
|
] }) : null;
|
|
281
|
-
return /* @__PURE__ */ h(
|
|
281
|
+
return /* @__PURE__ */ h(X, { className: p("flex flex-col w-full h-full border-t-0", a), children: [
|
|
282
282
|
s ? s(E) : E,
|
|
283
283
|
/* @__PURE__ */ r(
|
|
284
|
-
|
|
284
|
+
Y,
|
|
285
285
|
{
|
|
286
286
|
rowData: y,
|
|
287
287
|
columnDefs: I,
|
|
@@ -6,8 +6,8 @@ import { cn as o } from "../../../lib/utils.js";
|
|
|
6
6
|
import { MultiColorFilter as F, Cross as P, InfoBadge as u } from "impact-nova-icons";
|
|
7
7
|
import { Button as D } from "../../primitives/button/button.js";
|
|
8
8
|
import { Tooltip as c, TooltipTrigger as f, TooltipContent as h } from "../../feedback/tooltip/tooltip.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { Kbd as S } from "../../primitives/kbd/kbd.js";
|
|
10
|
+
import { OverflowTooltip as j } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
11
11
|
import { useImpactNovaI18n as v } from "../../../i18n/use-impact-nova-i18n.js";
|
|
12
12
|
import { useOverlayHostDismissNestedLayersOnNavigation as I } from "../../../lib/overlay/overlay-portal-context.js";
|
|
13
13
|
import { preventDismissOnTooltipOutside as x } from "../../../lib/overlay/prevent-dismiss-on-tooltip-outside.js";
|
|
@@ -145,14 +145,14 @@ const O = ({
|
|
|
145
145
|
),
|
|
146
146
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-1 min-w-0", children: [
|
|
147
147
|
/* @__PURE__ */ e(
|
|
148
|
-
|
|
148
|
+
j,
|
|
149
149
|
{
|
|
150
150
|
triggerClassName: "truncate font-['Manrope'] block min-w-0",
|
|
151
151
|
content: t.tooltipKeybinding ? /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
|
|
152
152
|
t.label,
|
|
153
153
|
" ",
|
|
154
154
|
/* @__PURE__ */ e(
|
|
155
|
-
|
|
155
|
+
S,
|
|
156
156
|
{
|
|
157
157
|
keybinding: t.tooltipKeybinding,
|
|
158
158
|
size: "sm"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChoiceCardGroupProps, ChoiceCardProps, ChoiceCardContentProps, ChoiceCardHeaderProps, ChoiceCardFooterProps, ChoiceCardBackgroundProps, ChoiceCardIndexProps, ChoiceCardStatsProps, ChoiceCardCompareLabelsProps, ChoiceCardCompareLabelProps, ChoiceCardCompareLeadProps, ChoiceCardCompareRowProps, ChoiceCardVariant } from './choice-card.types';
|
|
1
|
+
import { ChoiceCardGroupProps, ChoiceCardProps, ChoiceCardContentProps, ChoiceCardHeaderProps, ChoiceCardFooterProps, ChoiceCardBackgroundProps, ChoiceCardIndexProps, ChoiceCardStatsProps, ChoiceCardCompareFit, ChoiceCardCompareLabelsProps, ChoiceCardCompareLabelProps, ChoiceCardCompareLeadProps, ChoiceCardCompareRowProps, ChoiceCardVariant } from './choice-card.types';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
export type { ChoiceCardGroupProps, ChoiceCardGroupMultipleProps, ChoiceCardGroupSingleProps, ChoiceCardProps, ChoiceCardContentProps, ChoiceCardHeaderProps, ChoiceCardRibbonProps, ChoiceCardFooterProps, ChoiceCardBackgroundProps, ChoiceCardStatusProps, ChoiceCardIndexProps, ChoiceCardStatsProps, ChoiceCardStatProps, ChoiceCardCompareProps, ChoiceCardCompareFit, ChoiceCardCompareLabelsProps, ChoiceCardCompareLabelProps, ChoiceCardCompareLeadProps, ChoiceCardCompareRowProps, ChoiceCardPercentProps, ChoiceCardVariant, } from './choice-card.types';
|
|
4
4
|
export { ChoiceCardPercent } from './choice-card-percent';
|
|
@@ -13,6 +13,15 @@ interface ChoiceCardItemContextValue {
|
|
|
13
13
|
labelIsExplicit: boolean;
|
|
14
14
|
setAccessibleName: (name: string) => void;
|
|
15
15
|
}
|
|
16
|
+
type ChoiceCardCompareContextValue = {
|
|
17
|
+
inCompare: boolean;
|
|
18
|
+
rows: number;
|
|
19
|
+
fit: ChoiceCardCompareFit;
|
|
20
|
+
scrollRows: boolean;
|
|
21
|
+
rowMinHeight: string;
|
|
22
|
+
syncRowsScroll: (event: React.UIEvent<HTMLDivElement>) => void;
|
|
23
|
+
};
|
|
24
|
+
export declare function useChoiceCardCompare(): ChoiceCardCompareContextValue;
|
|
16
25
|
export declare function useChoiceCardGroup(): {
|
|
17
26
|
value: string | string[] | undefined;
|
|
18
27
|
type: "single" | "multiple";
|
|
@@ -52,7 +61,9 @@ declare const ChoiceCardCompareLabel: React.ForwardRefExoticComponent<ChoiceCard
|
|
|
52
61
|
declare const ChoiceCardCompareLead: React.ForwardRefExoticComponent<ChoiceCardCompareLeadProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
62
|
declare const ChoiceCardCompareRow: React.ForwardRefExoticComponent<ChoiceCardCompareRowProps & React.RefAttributes<HTMLDivElement>>;
|
|
54
63
|
declare const ChoiceCardCompare: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
55
|
-
fit?:
|
|
64
|
+
fit?: ChoiceCardCompareFit;
|
|
65
|
+
rowMinHeight?: string;
|
|
66
|
+
scrollRows?: boolean;
|
|
56
67
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
57
68
|
export { ChoiceCardFeaturedBackdrop } from './choice-card-featured-backdrop';
|
|
58
69
|
export { ChoiceCardGroup, ChoiceCard, ChoiceCardIndicator, ChoiceCardBackground, ChoiceCardRibbon, ChoiceCardFooter, ChoiceCardContent, ChoiceCardMedia, ChoiceCardTitle, ChoiceCardHeader, ChoiceCardDescription, ChoiceCardStatus, ChoiceCardIndex, ChoiceCardStats, ChoiceCardStat, ChoiceCardCompare, ChoiceCardCompareLabels, ChoiceCardCompareLabel, ChoiceCardCompareLead, ChoiceCardCompareRow, };
|