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,12 +1,12 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as m, Fragment as ae } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
|
-
import * as
|
|
4
|
-
import { Search as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { useCommandPalette as
|
|
7
|
-
import { Kbd as
|
|
8
|
-
import { fuzzyFilter as
|
|
9
|
-
const
|
|
3
|
+
import * as v from "@radix-ui/react-dialog";
|
|
4
|
+
import { Search as $ } from "lucide-react";
|
|
5
|
+
import { cn as d } from "../../../lib/utils.js";
|
|
6
|
+
import { useCommandPalette as ne } from "./command-palette-context.js";
|
|
7
|
+
import { Kbd as P } from "./kbd.js";
|
|
8
|
+
import { fuzzyFilter as se, keybindingToSymbols as re } from "./utils.js";
|
|
9
|
+
const E = r.createContext({
|
|
10
10
|
query: "",
|
|
11
11
|
setQuery: () => {
|
|
12
12
|
},
|
|
@@ -17,114 +17,142 @@ const O = r.createContext({
|
|
|
17
17
|
onExecute: () => {
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
function
|
|
21
|
-
className:
|
|
20
|
+
function oe({
|
|
21
|
+
className: o,
|
|
22
22
|
children: a,
|
|
23
|
-
commands:
|
|
24
|
-
placeholder:
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
commands: n,
|
|
24
|
+
placeholder: i = "Type a command or search...",
|
|
25
|
+
emptyTitle: c = "No results found",
|
|
26
|
+
emptyDescription: h = "Try a different search term",
|
|
27
|
+
recentGroupLabel: x = "Recently Used",
|
|
28
|
+
defaultGroupLabel: g = "Commands",
|
|
29
|
+
navigateLabel: R = "Navigate",
|
|
30
|
+
runLabel: S = "Run",
|
|
31
|
+
closeLabel: z = "Close",
|
|
32
|
+
onCommandExecute: M,
|
|
33
|
+
onOpenChange: J
|
|
27
34
|
}) {
|
|
28
|
-
const { open:
|
|
29
|
-
const t =
|
|
30
|
-
|
|
35
|
+
const { open: I, setOpen: W, getPaletteCommands: X, getEffectiveKeybinding: Y, registry: N } = ne(), [b, D] = r.useState(""), [w, C] = r.useState(0), O = r.useRef(null), A = r.useRef(null), F = r.useMemo(() => n ?? X(), [n, I]), j = r.useMemo(() => {
|
|
36
|
+
const t = se(
|
|
37
|
+
F,
|
|
31
38
|
b,
|
|
32
|
-
(
|
|
39
|
+
(s) => `${s.category ? s.category + ": " : ""}${s.label}${s.description ? " " + s.description : ""}`
|
|
33
40
|
);
|
|
34
41
|
if (!b.trim()) {
|
|
35
|
-
const
|
|
42
|
+
const s = N.getRecentCommandIds(), y = new Set(s), l = [], u = [];
|
|
36
43
|
for (const p of t)
|
|
37
|
-
|
|
38
|
-
return l.sort((p,
|
|
44
|
+
y.has(p.item.id) ? l.push(p) : u.push(p);
|
|
45
|
+
return l.sort((p, te) => s.indexOf(p.item.id) - s.indexOf(te.item.id)), [...l, ...u];
|
|
39
46
|
}
|
|
40
47
|
return t;
|
|
41
|
-
}, [
|
|
42
|
-
const t = /* @__PURE__ */ new Map(),
|
|
48
|
+
}, [F, b, N]), f = r.useMemo(() => j.map((t) => t.item), [j]), Z = r.useMemo(() => {
|
|
49
|
+
const t = /* @__PURE__ */ new Map(), s = new Set(N.getRecentCommandIds());
|
|
43
50
|
if (b.trim())
|
|
44
|
-
for (const
|
|
45
|
-
const l =
|
|
46
|
-
t.has(l) || t.set(l, []), t.get(l).push(
|
|
51
|
+
for (const y of f) {
|
|
52
|
+
const l = y.category || g;
|
|
53
|
+
t.has(l) || t.set(l, []), t.get(l).push(y);
|
|
47
54
|
}
|
|
48
55
|
else {
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
const l =
|
|
52
|
-
for (const
|
|
53
|
-
const p =
|
|
54
|
-
t.has(p) || t.set(p, []), t.get(p).push(
|
|
56
|
+
const y = f.filter((u) => s.has(u.id));
|
|
57
|
+
y.length > 0 && t.set(x, y);
|
|
58
|
+
const l = f.filter((u) => !s.has(u.id));
|
|
59
|
+
for (const u of l) {
|
|
60
|
+
const p = u.category || g;
|
|
61
|
+
t.has(p) || t.set(p, []), t.get(p).push(u);
|
|
55
62
|
}
|
|
56
63
|
}
|
|
57
64
|
return t;
|
|
58
|
-
}, [
|
|
65
|
+
}, [f, b, N, x, g]);
|
|
59
66
|
r.useEffect(() => {
|
|
60
|
-
|
|
61
|
-
|
|
67
|
+
I && (D(""), C(0), requestAnimationFrame(() => {
|
|
68
|
+
O.current?.focus();
|
|
62
69
|
}));
|
|
63
|
-
}, [
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
t.handler(),
|
|
68
|
-
}, [
|
|
70
|
+
}, [I]);
|
|
71
|
+
const q = (t) => {
|
|
72
|
+
W(t), J?.(t);
|
|
73
|
+
}, k = r.useCallback((t) => {
|
|
74
|
+
t.handler(), N.addRecentCommand(t.id), M?.(t), q(!1);
|
|
75
|
+
}, [N, M]), G = r.useCallback((t) => {
|
|
69
76
|
switch (t.key) {
|
|
70
77
|
case "ArrowDown": {
|
|
71
|
-
t.preventDefault(),
|
|
78
|
+
t.preventDefault(), C((s) => Math.min(s + 1, f.length - 1));
|
|
72
79
|
break;
|
|
73
80
|
}
|
|
74
81
|
case "ArrowUp": {
|
|
75
|
-
t.preventDefault(),
|
|
82
|
+
t.preventDefault(), C((s) => Math.max(s - 1, 0));
|
|
76
83
|
break;
|
|
77
84
|
}
|
|
78
85
|
case "Enter": {
|
|
79
86
|
t.preventDefault();
|
|
80
|
-
const
|
|
81
|
-
|
|
87
|
+
const s = f[w];
|
|
88
|
+
s && k(s);
|
|
82
89
|
break;
|
|
83
90
|
}
|
|
84
91
|
case "Home": {
|
|
85
|
-
t.preventDefault(),
|
|
92
|
+
t.preventDefault(), C(0);
|
|
86
93
|
break;
|
|
87
94
|
}
|
|
88
95
|
case "End": {
|
|
89
|
-
t.preventDefault(),
|
|
96
|
+
t.preventDefault(), C(Math.max(f.length - 1, 0));
|
|
90
97
|
break;
|
|
91
98
|
}
|
|
92
99
|
}
|
|
93
|
-
}, [
|
|
100
|
+
}, [f, w, k]);
|
|
94
101
|
r.useEffect(() => {
|
|
95
|
-
|
|
102
|
+
C(0);
|
|
96
103
|
}, [b]), r.useEffect(() => {
|
|
97
|
-
const t =
|
|
104
|
+
const t = A.current;
|
|
98
105
|
if (!t) return;
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
}, [
|
|
102
|
-
const
|
|
106
|
+
const s = t.querySelector('[data-selected="true"]');
|
|
107
|
+
s && s.scrollIntoView({ block: "nearest" });
|
|
108
|
+
}, [w]);
|
|
109
|
+
const L = r.useMemo(
|
|
103
110
|
() => ({
|
|
104
111
|
query: b,
|
|
105
|
-
setQuery:
|
|
106
|
-
selectedIndex:
|
|
107
|
-
setSelectedIndex:
|
|
108
|
-
flatItems:
|
|
109
|
-
onExecute:
|
|
112
|
+
setQuery: D,
|
|
113
|
+
selectedIndex: w,
|
|
114
|
+
setSelectedIndex: C,
|
|
115
|
+
flatItems: f,
|
|
116
|
+
onExecute: k,
|
|
117
|
+
placeholder: i,
|
|
118
|
+
emptyTitle: c,
|
|
119
|
+
emptyDescription: h,
|
|
120
|
+
recentGroupLabel: x,
|
|
121
|
+
defaultGroupLabel: g,
|
|
122
|
+
navigateLabel: R,
|
|
123
|
+
runLabel: S,
|
|
124
|
+
closeLabel: z
|
|
110
125
|
}),
|
|
111
|
-
[
|
|
112
|
-
|
|
113
|
-
|
|
126
|
+
[
|
|
127
|
+
b,
|
|
128
|
+
w,
|
|
129
|
+
f,
|
|
130
|
+
k,
|
|
131
|
+
i,
|
|
132
|
+
c,
|
|
133
|
+
h,
|
|
134
|
+
x,
|
|
135
|
+
g,
|
|
136
|
+
R,
|
|
137
|
+
S,
|
|
138
|
+
z
|
|
139
|
+
]
|
|
140
|
+
), ee = r.Children.count(a) > 0;
|
|
141
|
+
return /* @__PURE__ */ e(v.Root, { open: I, onOpenChange: q, children: /* @__PURE__ */ m(v.Portal, { children: [
|
|
114
142
|
/* @__PURE__ */ e(
|
|
115
|
-
|
|
143
|
+
v.Overlay,
|
|
116
144
|
{
|
|
117
145
|
className: "fixed inset-0 z-50 bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
|
118
146
|
}
|
|
119
147
|
),
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
|
|
148
|
+
/* @__PURE__ */ m(
|
|
149
|
+
v.Content,
|
|
122
150
|
{
|
|
123
151
|
"aria-describedby": void 0,
|
|
124
152
|
"data-command-palette": !0,
|
|
125
153
|
"data-component": "command-palette",
|
|
126
|
-
onKeyDown:
|
|
127
|
-
className:
|
|
154
|
+
onKeyDown: G,
|
|
155
|
+
className: d(
|
|
128
156
|
"fixed left-[50%] top-[20%] z-50 w-full max-w-[640px] -translate-x-1/2",
|
|
129
157
|
"rounded-xl border border-[#d1d5db] bg-white shadow-2xl overflow-hidden",
|
|
130
158
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
@@ -133,78 +161,78 @@ function Z({
|
|
|
133
161
|
// Pin translate-x at -50% during animation so it stays centered (no horizontal slide)
|
|
134
162
|
"data-[state=open]:slide-in-from-left-1/2 data-[state=closed]:slide-out-to-left-1/2",
|
|
135
163
|
"duration-150",
|
|
136
|
-
|
|
164
|
+
o
|
|
137
165
|
),
|
|
138
166
|
style: { transformOrigin: "top center" },
|
|
139
167
|
children: [
|
|
140
|
-
/* @__PURE__ */ e(
|
|
141
|
-
/* @__PURE__ */ e(
|
|
168
|
+
/* @__PURE__ */ e(v.Title, { className: "sr-only", children: "Command Palette" }),
|
|
169
|
+
/* @__PURE__ */ e(E.Provider, { value: L, children: ee ? a : /* @__PURE__ */ m(ae, { children: [
|
|
142
170
|
/* @__PURE__ */ e(
|
|
143
|
-
|
|
171
|
+
K,
|
|
144
172
|
{
|
|
145
|
-
ref:
|
|
146
|
-
placeholder:
|
|
173
|
+
ref: O,
|
|
174
|
+
placeholder: i
|
|
147
175
|
}
|
|
148
176
|
),
|
|
149
|
-
/* @__PURE__ */ e(
|
|
150
|
-
|
|
151
|
-
/* @__PURE__ */ e(
|
|
152
|
-
const
|
|
177
|
+
/* @__PURE__ */ e(T, { ref: A, children: f.length === 0 ? /* @__PURE__ */ e(H, {}) : Array.from(Z.entries()).map(([t, s], y) => /* @__PURE__ */ m(r.Fragment, { children: [
|
|
178
|
+
y > 0 && /* @__PURE__ */ e(V, {}),
|
|
179
|
+
/* @__PURE__ */ e(B, { heading: t, children: s.map((l) => {
|
|
180
|
+
const u = f.indexOf(l), p = Y(l.id);
|
|
153
181
|
return /* @__PURE__ */ e(
|
|
154
|
-
|
|
182
|
+
Q,
|
|
155
183
|
{
|
|
156
184
|
command: l,
|
|
157
|
-
isSelected:
|
|
158
|
-
onSelect: () =>
|
|
159
|
-
onMouseEnter: () =>
|
|
185
|
+
isSelected: u === w,
|
|
186
|
+
onSelect: () => k(l),
|
|
187
|
+
onMouseEnter: () => C(u),
|
|
160
188
|
keybinding: p
|
|
161
189
|
},
|
|
162
190
|
l.id
|
|
163
191
|
);
|
|
164
192
|
}) })
|
|
165
193
|
] }, t)) }),
|
|
166
|
-
/* @__PURE__ */ e(
|
|
194
|
+
/* @__PURE__ */ e(_, {})
|
|
167
195
|
] }) })
|
|
168
196
|
]
|
|
169
197
|
}
|
|
170
198
|
)
|
|
171
199
|
] }) });
|
|
172
200
|
}
|
|
173
|
-
|
|
174
|
-
const
|
|
175
|
-
({ className:
|
|
176
|
-
const { query:
|
|
177
|
-
return /* @__PURE__ */
|
|
201
|
+
oe.displayName = "CommandPalette";
|
|
202
|
+
const K = r.forwardRef(
|
|
203
|
+
({ className: o, placeholder: a, onValueChange: n, ...i }, c) => {
|
|
204
|
+
const { query: h, setQuery: x } = r.useContext(E);
|
|
205
|
+
return /* @__PURE__ */ m(
|
|
178
206
|
"div",
|
|
179
207
|
{
|
|
180
|
-
className:
|
|
208
|
+
className: d(
|
|
181
209
|
"flex items-center gap-3 border-b border-[#e5e7eb] px-4",
|
|
182
|
-
|
|
210
|
+
o
|
|
183
211
|
),
|
|
184
212
|
"data-command-palette-input": !0,
|
|
185
213
|
children: [
|
|
186
|
-
/* @__PURE__ */ e(
|
|
214
|
+
/* @__PURE__ */ e($, { className: "h-4 w-4 shrink-0 text-[#9ca3af]" }),
|
|
187
215
|
/* @__PURE__ */ e(
|
|
188
216
|
"input",
|
|
189
217
|
{
|
|
190
|
-
ref:
|
|
191
|
-
value:
|
|
192
|
-
onChange: (
|
|
193
|
-
|
|
218
|
+
ref: c,
|
|
219
|
+
value: h,
|
|
220
|
+
onChange: (g) => {
|
|
221
|
+
x(g.target.value), n?.(g.target.value);
|
|
194
222
|
},
|
|
195
223
|
placeholder: a,
|
|
196
224
|
autoComplete: "off",
|
|
197
225
|
autoCorrect: "off",
|
|
198
226
|
spellCheck: !1,
|
|
199
|
-
className:
|
|
227
|
+
className: d(
|
|
200
228
|
"flex h-12 w-full bg-transparent py-3 text-sm font-medium outline-none",
|
|
201
229
|
"placeholder:text-[#9ca3af]"
|
|
202
230
|
),
|
|
203
|
-
...
|
|
231
|
+
...i
|
|
204
232
|
}
|
|
205
233
|
),
|
|
206
234
|
/* @__PURE__ */ e(
|
|
207
|
-
|
|
235
|
+
P,
|
|
208
236
|
{
|
|
209
237
|
keybinding: { key: "Escape" },
|
|
210
238
|
size: "sm",
|
|
@@ -217,186 +245,188 @@ const A = r.forwardRef(
|
|
|
217
245
|
);
|
|
218
246
|
}
|
|
219
247
|
);
|
|
220
|
-
|
|
221
|
-
const
|
|
248
|
+
K.displayName = "CommandPaletteInput";
|
|
249
|
+
const T = r.forwardRef(({ className: o, children: a, ...n }, i) => /* @__PURE__ */ e(
|
|
222
250
|
"div",
|
|
223
251
|
{
|
|
224
|
-
ref:
|
|
252
|
+
ref: i,
|
|
225
253
|
role: "listbox",
|
|
226
254
|
"data-command-palette-list": !0,
|
|
227
|
-
className:
|
|
255
|
+
className: d(
|
|
228
256
|
"max-h-[360px] overflow-y-auto overscroll-contain py-1",
|
|
229
|
-
|
|
257
|
+
o
|
|
230
258
|
),
|
|
231
|
-
...
|
|
259
|
+
...n,
|
|
232
260
|
children: a
|
|
233
261
|
}
|
|
234
262
|
));
|
|
235
|
-
|
|
236
|
-
const
|
|
237
|
-
({ className:
|
|
263
|
+
T.displayName = "CommandPaletteList";
|
|
264
|
+
const B = r.forwardRef(
|
|
265
|
+
({ className: o, heading: a, children: n, ...i }, c) => /* @__PURE__ */ m(
|
|
238
266
|
"div",
|
|
239
267
|
{
|
|
240
|
-
ref:
|
|
268
|
+
ref: c,
|
|
241
269
|
role: "group",
|
|
242
270
|
"aria-label": a,
|
|
243
271
|
"data-command-palette-group": !0,
|
|
244
|
-
className:
|
|
245
|
-
...
|
|
272
|
+
className: d("py-1", o),
|
|
273
|
+
...i,
|
|
246
274
|
children: [
|
|
247
275
|
a && /* @__PURE__ */ e("div", { className: "px-4 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-[#9ca3af]", children: a }),
|
|
248
|
-
|
|
276
|
+
n
|
|
249
277
|
]
|
|
250
278
|
}
|
|
251
279
|
)
|
|
252
280
|
);
|
|
253
|
-
|
|
254
|
-
const
|
|
281
|
+
B.displayName = "CommandPaletteGroup";
|
|
282
|
+
const ie = {
|
|
255
283
|
browser: "Browser",
|
|
256
284
|
"ag-grid": "AG Grid",
|
|
257
285
|
system: "System"
|
|
258
286
|
};
|
|
259
|
-
function
|
|
260
|
-
if (!
|
|
261
|
-
const
|
|
262
|
-
return
|
|
287
|
+
function le({ source: o, isSelected: a }) {
|
|
288
|
+
if (!o || o === "user") return null;
|
|
289
|
+
const n = ie[o];
|
|
290
|
+
return n ? /* @__PURE__ */ e(
|
|
263
291
|
"span",
|
|
264
292
|
{
|
|
265
|
-
className:
|
|
293
|
+
className: d(
|
|
266
294
|
"shrink-0 rounded px-1.5 py-px text-[9px] font-medium leading-tight tracking-wide",
|
|
267
295
|
a ? "text-white/50" : "text-[#9ca3af] border border-[#e5e7eb]"
|
|
268
296
|
),
|
|
269
|
-
children:
|
|
297
|
+
children: n
|
|
270
298
|
}
|
|
271
299
|
) : null;
|
|
272
300
|
}
|
|
273
|
-
const
|
|
274
|
-
({ className:
|
|
301
|
+
const Q = r.forwardRef(
|
|
302
|
+
({ className: o, command: a, isSelected: n, onSelect: i, keybinding: c, ...h }, x) => /* @__PURE__ */ m(
|
|
275
303
|
"div",
|
|
276
304
|
{
|
|
277
|
-
ref:
|
|
305
|
+
ref: x,
|
|
278
306
|
role: "option",
|
|
279
|
-
"aria-selected":
|
|
280
|
-
"data-selected":
|
|
307
|
+
"aria-selected": n,
|
|
308
|
+
"data-selected": n,
|
|
281
309
|
"data-command-palette-item": !0,
|
|
282
310
|
"data-command-id": a.id,
|
|
283
|
-
onClick:
|
|
284
|
-
className:
|
|
311
|
+
onClick: i,
|
|
312
|
+
className: d(
|
|
285
313
|
"flex items-center gap-3 cursor-pointer px-4 py-2 text-sm",
|
|
286
314
|
"transition-colors duration-75",
|
|
287
|
-
|
|
288
|
-
|
|
315
|
+
n ? "bg-[#4259ee] text-white" : "text-[#374151] hover:bg-[#f3f4f6]",
|
|
316
|
+
o
|
|
289
317
|
),
|
|
290
|
-
...
|
|
318
|
+
...h,
|
|
291
319
|
children: [
|
|
292
|
-
a.icon && /* @__PURE__ */ e("span", { className:
|
|
320
|
+
a.icon && /* @__PURE__ */ e("span", { className: d(
|
|
293
321
|
"flex h-4 w-4 shrink-0 items-center justify-center",
|
|
294
|
-
|
|
322
|
+
n ? "text-white" : "text-[#6b7280]"
|
|
295
323
|
), children: a.icon }),
|
|
296
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ m("div", { className: "flex flex-1 flex-col min-w-0", children: [
|
|
297
325
|
/* @__PURE__ */ e("span", { className: "truncate font-medium", children: a.label }),
|
|
298
|
-
a.description && /* @__PURE__ */ e("span", { className:
|
|
326
|
+
a.description && /* @__PURE__ */ e("span", { className: d(
|
|
299
327
|
"truncate text-xs",
|
|
300
|
-
|
|
328
|
+
n ? "text-white/70" : "text-[#9ca3af]"
|
|
301
329
|
), children: a.description })
|
|
302
330
|
] }),
|
|
303
|
-
/* @__PURE__ */ e(
|
|
304
|
-
|
|
331
|
+
/* @__PURE__ */ e(le, { source: a.source, isSelected: n }),
|
|
332
|
+
c && /* @__PURE__ */ e(U, { keybinding: c, isSelected: n })
|
|
305
333
|
]
|
|
306
334
|
}
|
|
307
335
|
)
|
|
308
336
|
);
|
|
309
|
-
|
|
310
|
-
function
|
|
311
|
-
const
|
|
337
|
+
Q.displayName = "CommandPaletteItem";
|
|
338
|
+
function U({ keybinding: o, isSelected: a, className: n, ...i }) {
|
|
339
|
+
const c = re(o);
|
|
312
340
|
return /* @__PURE__ */ e(
|
|
313
341
|
"span",
|
|
314
342
|
{
|
|
315
|
-
className:
|
|
343
|
+
className: d("ml-auto flex items-center gap-0.5 shrink-0", n),
|
|
316
344
|
"data-command-palette-shortcut": !0,
|
|
317
|
-
...
|
|
318
|
-
children:
|
|
345
|
+
...i,
|
|
346
|
+
children: c.map((h, x) => /* @__PURE__ */ e(
|
|
319
347
|
"kbd",
|
|
320
348
|
{
|
|
321
|
-
className:
|
|
349
|
+
className: d(
|
|
322
350
|
"inline-flex min-w-[20px] items-center justify-center rounded px-1 h-[20px] text-[10px] font-mono leading-none",
|
|
323
351
|
a ? "bg-white/20 text-white border border-white/30" : "bg-[#f4f5f7] text-[#6b7280] border border-[#d1d5db]"
|
|
324
352
|
),
|
|
325
|
-
children:
|
|
353
|
+
children: h
|
|
326
354
|
},
|
|
327
|
-
`${
|
|
355
|
+
`${h}-${x}`
|
|
328
356
|
))
|
|
329
357
|
}
|
|
330
358
|
);
|
|
331
359
|
}
|
|
332
|
-
|
|
333
|
-
function
|
|
334
|
-
|
|
360
|
+
U.displayName = "CommandPaletteShortcut";
|
|
361
|
+
function H({ className: o, ...a }) {
|
|
362
|
+
const { emptyTitle: n, emptyDescription: i } = r.useContext(E);
|
|
363
|
+
return /* @__PURE__ */ m(
|
|
335
364
|
"div",
|
|
336
365
|
{
|
|
337
366
|
"data-command-palette-empty": !0,
|
|
338
|
-
className:
|
|
367
|
+
className: d(
|
|
339
368
|
"flex flex-col items-center justify-center py-12 text-center text-sm text-[#9ca3af]",
|
|
340
|
-
|
|
369
|
+
o
|
|
341
370
|
),
|
|
342
371
|
...a,
|
|
343
372
|
children: [
|
|
344
|
-
/* @__PURE__ */ e(
|
|
345
|
-
/* @__PURE__ */ e("p", { className: "font-medium", children:
|
|
346
|
-
/* @__PURE__ */ e("p", { className: "text-xs mt-1", children:
|
|
373
|
+
/* @__PURE__ */ e($, { className: "h-8 w-8 mb-3 text-[#d1d5db]" }),
|
|
374
|
+
/* @__PURE__ */ e("p", { className: "font-medium", children: n }),
|
|
375
|
+
/* @__PURE__ */ e("p", { className: "text-xs mt-1", children: i })
|
|
347
376
|
]
|
|
348
377
|
}
|
|
349
378
|
);
|
|
350
379
|
}
|
|
351
|
-
|
|
352
|
-
function
|
|
380
|
+
H.displayName = "CommandPaletteEmpty";
|
|
381
|
+
function V({ className: o, ...a }) {
|
|
353
382
|
return /* @__PURE__ */ e(
|
|
354
383
|
"div",
|
|
355
384
|
{
|
|
356
385
|
"data-command-palette-separator": !0,
|
|
357
|
-
className:
|
|
386
|
+
className: d("h-px bg-[#e5e7eb] mx-2", o),
|
|
358
387
|
...a
|
|
359
388
|
}
|
|
360
389
|
);
|
|
361
390
|
}
|
|
362
|
-
|
|
363
|
-
function
|
|
364
|
-
|
|
391
|
+
V.displayName = "CommandPaletteSeparator";
|
|
392
|
+
function _({ className: o, ...a }) {
|
|
393
|
+
const { navigateLabel: n, runLabel: i, closeLabel: c } = r.useContext(E);
|
|
394
|
+
return /* @__PURE__ */ m(
|
|
365
395
|
"div",
|
|
366
396
|
{
|
|
367
397
|
"data-command-palette-footer": !0,
|
|
368
|
-
className:
|
|
398
|
+
className: d(
|
|
369
399
|
"flex items-center gap-4 border-t border-[#e5e7eb] px-4 py-2 text-[11px] text-[#9ca3af]",
|
|
370
|
-
|
|
400
|
+
o
|
|
371
401
|
),
|
|
372
402
|
...a,
|
|
373
403
|
children: [
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
-
/* @__PURE__ */ e(
|
|
376
|
-
/* @__PURE__ */ e(
|
|
377
|
-
/* @__PURE__ */ e("span", { children:
|
|
404
|
+
/* @__PURE__ */ m("span", { className: "inline-flex items-center gap-1", children: [
|
|
405
|
+
/* @__PURE__ */ e(P, { keys: ["↑"], size: "sm", variant: "muted" }),
|
|
406
|
+
/* @__PURE__ */ e(P, { keys: ["↓"], size: "sm", variant: "muted" }),
|
|
407
|
+
/* @__PURE__ */ e("span", { children: n })
|
|
378
408
|
] }),
|
|
379
|
-
/* @__PURE__ */
|
|
380
|
-
/* @__PURE__ */ e(
|
|
381
|
-
/* @__PURE__ */ e("span", { children:
|
|
409
|
+
/* @__PURE__ */ m("span", { className: "inline-flex items-center gap-1", children: [
|
|
410
|
+
/* @__PURE__ */ e(P, { keys: ["↵"], size: "sm", variant: "muted" }),
|
|
411
|
+
/* @__PURE__ */ e("span", { children: i })
|
|
382
412
|
] }),
|
|
383
|
-
/* @__PURE__ */
|
|
384
|
-
/* @__PURE__ */ e(
|
|
385
|
-
/* @__PURE__ */ e("span", { children:
|
|
413
|
+
/* @__PURE__ */ m("span", { className: "inline-flex items-center gap-1", children: [
|
|
414
|
+
/* @__PURE__ */ e(P, { keys: ["Escape"], size: "sm", variant: "muted" }),
|
|
415
|
+
/* @__PURE__ */ e("span", { children: c })
|
|
386
416
|
] })
|
|
387
417
|
]
|
|
388
418
|
}
|
|
389
419
|
);
|
|
390
420
|
}
|
|
391
|
-
|
|
421
|
+
_.displayName = "CommandPaletteFooter";
|
|
392
422
|
export {
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
423
|
+
oe as CommandPalette,
|
|
424
|
+
H as CommandPaletteEmpty,
|
|
425
|
+
_ as CommandPaletteFooter,
|
|
426
|
+
B as CommandPaletteGroup,
|
|
427
|
+
K as CommandPaletteInput,
|
|
428
|
+
Q as CommandPaletteItem,
|
|
429
|
+
T as CommandPaletteList,
|
|
430
|
+
V as CommandPaletteSeparator,
|
|
431
|
+
U as CommandPaletteShortcut
|
|
402
432
|
};
|
|
@@ -19,9 +19,20 @@ export interface ShortcutSettingsProps extends Omit<React.HTMLAttributes<HTMLDiv
|
|
|
19
19
|
sources?: Array<'system' | 'user' | 'ag-grid' | 'browser'>;
|
|
20
20
|
/** Optional render prop to hoist the recording indicator/conflict message up to a parent toolbar */
|
|
21
21
|
renderStatus?: (node: React.ReactNode | null) => React.ReactNode;
|
|
22
|
+
/** Label shown during recording mode */
|
|
23
|
+
recordingLabel?: string;
|
|
24
|
+
/** Instruction for recording a shortcut */
|
|
25
|
+
pressShortcutLabel?: string;
|
|
26
|
+
/** Label for adding a new shortcut */
|
|
27
|
+
addShortcutLabel?: string;
|
|
28
|
+
/** Warning message for shortcut conflicts */
|
|
29
|
+
conflictWarnLabel?: string;
|
|
30
|
+
/** Warning message for browser-reserved shortcuts */
|
|
31
|
+
reservedWarnLabel?: string;
|
|
32
|
+
/** Detailed instruction for recording state */
|
|
33
|
+
recordingInstruction?: string;
|
|
22
34
|
}
|
|
23
|
-
declare function ShortcutSettings({ className, scopes, sources, renderStatus, ...props }: ShortcutSettingsProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
declare namespace ShortcutSettings {
|
|
35
|
+
export declare function ShortcutSettings({ className, scopes, sources, renderStatus, recordingLabel, pressShortcutLabel, addShortcutLabel, conflictWarnLabel, reservedWarnLabel, recordingInstruction, ...props }: ShortcutSettingsProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare namespace ShortcutSettings {
|
|
25
37
|
var displayName: string;
|
|
26
38
|
}
|
|
27
|
-
export { ShortcutSettings };
|