impact-nova 1.6.6 → 1.7.0
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/README.md +50 -20
- package/dist/components/ui/command-palette/command-palette.d.ts +3 -3
- package/dist/components/ui/command-palette/command-palette.js +193 -145
- package/dist/components/ui/data-table/data-table-column-list.js +107 -103
- package/dist/components/ui/data-table/data-table-column-state.d.ts +16 -0
- package/dist/components/ui/data-table/data-table-column-state.js +29 -0
- package/dist/components/ui/data-table/data-table-constants.d.ts +6 -3
- package/dist/components/ui/data-table/data-table-constants.js +3 -2
- package/dist/components/ui/data-table/data-table-view-menu.d.ts +16 -0
- package/dist/components/ui/data-table/data-table-view-menu.js +133 -0
- package/dist/components/ui/data-table/data-table.js +36 -27
- package/dist/components/ui/data-table/index.d.ts +1 -1
- package/dist/components/ui/data-table/index.js +24 -19
- package/dist/components/ui/dropdown-menu.js +10 -4
- package/dist/components/ui/filter-strip/filter-summary.js +198 -118
- package/dist/components/ui/sheet.js +57 -34
- package/dist/components/ui/tooltip.js +37 -26
- package/dist/i18n/defaultMessages.d.ts +2 -0
- package/dist/i18n/defaultMessages.js +6 -4
- package/dist/i18n/locales/de.js +2 -0
- package/dist/i18n/locales/es.js +2 -0
- package/dist/i18n/locales/hi.js +2 -0
- package/dist/i18n/locales/kn.js +2 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +287 -282
- package/package.json +1 -1
- package/dist/components/ui/data-table/data-table-view-options.d.ts +0 -8
- package/dist/components/ui/data-table/data-table-view-options.js +0 -97
package/README.md
CHANGED
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
[](https://www.typescriptlang.org/)
|
|
12
12
|
[](https://tailwindcss.com/)
|
|
13
13
|
[](https://www.radix-ui.com/)
|
|
14
|
+
[](#internationalization-i18n)
|
|
15
|
+
[](https://impact-nova.iaproducts.ai/)
|
|
16
|
+
[](https://www.npmjs.com/package/impact-nova-mcp)
|
|
14
17
|
|
|
15
18
|
</div>
|
|
16
19
|
|
|
@@ -38,6 +41,20 @@ Impact Nova is built upon four core pillars that guide every component applicati
|
|
|
38
41
|
|
|
39
42
|
---
|
|
40
43
|
|
|
44
|
+
## 📚 Documentation
|
|
45
|
+
|
|
46
|
+
Visit **[https://impact-nova.iaproducts.ai/](https://impact-nova.iaproducts.ai/)** to view the full documentation: component reference, interactive **React** examples, props and controls, and usage notes—all in the browser, with no local checkout required.
|
|
47
|
+
|
|
48
|
+
That documentation site is published with **Storybook** ([storybook.js.org](https://storybook.js.org/)), the same format many design systems use; you can treat the URL like any other docs hub even if you are not familiar with Storybook.
|
|
49
|
+
|
|
50
|
+
### MCP server (`impact-nova-mcp`)
|
|
51
|
+
|
|
52
|
+
Use **[impact-nova-mcp on npm](https://www.npmjs.com/package/impact-nova-mcp)** if you want a **Model Context Protocol** (MCP) server for Impact Nova in **Cursor**, **Windsurf**, **Claude**, **Antigravity**, or other MCP-capable clients—component lists, specs, design tokens, codegen, and conventions wired for assistants.
|
|
53
|
+
|
|
54
|
+
What MCP is, what this server exposes, and how to install and configure your editor are documented in **[packages/mcp/README.md](packages/mcp/README.md)** in this repository.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
41
58
|
## 🚀 Getting Started
|
|
42
59
|
|
|
43
60
|
Everything you need to install, configure, and start building with **Impact Nova**.
|
|
@@ -54,7 +71,7 @@ pnpm add impact-nova
|
|
|
54
71
|
yarn add impact-nova
|
|
55
72
|
```
|
|
56
73
|
|
|
57
|
-
> **Note on Peer Dependencies**:
|
|
74
|
+
> **Note on Peer Dependencies**:
|
|
58
75
|
> You must also ensure `react`, `react-dom`, `ag-grid-react`, `ag-grid-enterprise`, and `highcharts` (if used) are installed in your project, as these are peer dependencies.
|
|
59
76
|
|
|
60
77
|
### Styles & Configuration
|
|
@@ -62,17 +79,15 @@ yarn add impact-nova
|
|
|
62
79
|
Import the bundled CSS in your root entry file (e.g., `main.tsx`, `App.tsx`, or `layout.tsx`).
|
|
63
80
|
|
|
64
81
|
```tsx
|
|
65
|
-
import React from
|
|
66
|
-
import ReactDOM from
|
|
82
|
+
import React from "react";
|
|
83
|
+
import ReactDOM from "react-dom/client";
|
|
67
84
|
|
|
68
85
|
// ⚠️ Import styles before your App
|
|
69
|
-
import
|
|
86
|
+
import "impact-nova/dist/impact-nova.css";
|
|
70
87
|
|
|
71
|
-
import App from
|
|
88
|
+
import App from "./App";
|
|
72
89
|
|
|
73
|
-
ReactDOM.createRoot(document.getElementById(
|
|
74
|
-
<App />
|
|
75
|
-
);
|
|
90
|
+
ReactDOM.createRoot(document.getElementById("root")!).render(<App />);
|
|
76
91
|
```
|
|
77
92
|
|
|
78
93
|
### Typography
|
|
@@ -80,15 +95,19 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
|
80
95
|
Impact Nova looks best with **Manrope**. We recommend adding it to your project:
|
|
81
96
|
|
|
82
97
|
1. **Import Font**:
|
|
98
|
+
|
|
83
99
|
```html
|
|
84
|
-
<link
|
|
100
|
+
<link
|
|
101
|
+
href="https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap"
|
|
102
|
+
rel="stylesheet"
|
|
103
|
+
/>
|
|
85
104
|
```
|
|
86
105
|
|
|
87
106
|
2. **Configure Tailwind**:
|
|
88
107
|
```css
|
|
89
108
|
@layer base {
|
|
90
109
|
body {
|
|
91
|
-
font-family:
|
|
110
|
+
font-family: "Manrope", sans-serif;
|
|
92
111
|
}
|
|
93
112
|
}
|
|
94
113
|
```
|
|
@@ -102,7 +121,7 @@ Import components directly from the package. All components export strong TypeSc
|
|
|
102
121
|
### Core Components
|
|
103
122
|
|
|
104
123
|
```tsx
|
|
105
|
-
import { Button, Card, DatePicker } from
|
|
124
|
+
import { Button, Card, DatePicker } from "impact-nova";
|
|
106
125
|
|
|
107
126
|
export default function MyPage() {
|
|
108
127
|
return (
|
|
@@ -122,7 +141,7 @@ export default function MyPage() {
|
|
|
122
141
|
Impact Nova includes a custom-built icon library. Icons are treeshakeable and accept standard SVG props.
|
|
123
142
|
|
|
124
143
|
```tsx
|
|
125
|
-
import { Icons } from
|
|
144
|
+
import { Icons } from "impact-nova";
|
|
126
145
|
|
|
127
146
|
export function StatusBadge() {
|
|
128
147
|
return (
|
|
@@ -139,7 +158,7 @@ export function StatusBadge() {
|
|
|
139
158
|
You can import component props to ensure type safety in your own interfaces.
|
|
140
159
|
|
|
141
160
|
```tsx
|
|
142
|
-
import { Button, type ButtonProps } from
|
|
161
|
+
import { Button, type ButtonProps } from "impact-nova";
|
|
143
162
|
|
|
144
163
|
interface CustomActionProps extends ButtonProps {
|
|
145
164
|
analyticsId: string;
|
|
@@ -157,7 +176,7 @@ Impact Nova supports multiple languages via a provider and message overrides. Wr
|
|
|
157
176
|
**Locale packs** (German, Spanish, Hindi, Kannada) are exported so you can use them as-is or override only the strings you need:
|
|
158
177
|
|
|
159
178
|
```tsx
|
|
160
|
-
import { ImpactNovaI18nProvider, de, defaultMessages } from
|
|
179
|
+
import { ImpactNovaI18nProvider, de, defaultMessages } from "impact-nova";
|
|
161
180
|
|
|
162
181
|
// Use a full locale pack as-is
|
|
163
182
|
function App() {
|
|
@@ -172,25 +191,25 @@ function App() {
|
|
|
172
191
|
**Override only a few keys** by spreading a locale pack and then overriding specific sections or keys. The provider merges your `messages` over the built-in English defaults (or over the pack you pass), so you only need to provide the keys you want to change:
|
|
173
192
|
|
|
174
193
|
```tsx
|
|
175
|
-
import { ImpactNovaI18nProvider, de } from
|
|
194
|
+
import { ImpactNovaI18nProvider, de } from "impact-nova";
|
|
176
195
|
|
|
177
196
|
// German with custom labels for calendar only
|
|
178
197
|
const messages = {
|
|
179
198
|
...de,
|
|
180
|
-
calendar: { ...de.calendar, apply:
|
|
199
|
+
calendar: { ...de.calendar, apply: "Übernehmen", cancel: "Schließen" },
|
|
181
200
|
};
|
|
182
201
|
|
|
183
202
|
<ImpactNovaI18nProvider locale="de" messages={messages}>
|
|
184
203
|
<MyApp />
|
|
185
|
-
</ImpactNovaI18nProvider
|
|
204
|
+
</ImpactNovaI18nProvider>;
|
|
186
205
|
```
|
|
187
206
|
|
|
188
207
|
**Tree-shakeable locale imports** (if you only need one language and want to avoid pulling others into your bundle):
|
|
189
208
|
|
|
190
209
|
```tsx
|
|
191
|
-
import { de } from
|
|
210
|
+
import { de } from "impact-nova/locale/de";
|
|
192
211
|
// or
|
|
193
|
-
import { de, es, hi, kn } from
|
|
212
|
+
import { de, es, hi, kn } from "impact-nova/locale";
|
|
194
213
|
```
|
|
195
214
|
|
|
196
215
|
- **`locale`**: BCP 47 code (e.g. `'en'`, `'de'`) used for date/number formatting. Supported: `en`, `en-US`, `en-GB`, `de`, `es`, `hi`, `kn`.
|
|
@@ -216,6 +235,7 @@ The library utilizes a modern, headless architecture pattern:
|
|
|
216
235
|
Impact Nova provides a rich set of components structured for any enterprise use-case.
|
|
217
236
|
|
|
218
237
|
### 📝 Forms & Inputs
|
|
238
|
+
|
|
219
239
|
- Button, Button Group
|
|
220
240
|
- Checkbox, Radio Group, Switch
|
|
221
241
|
- Input, Smart Input, Textarea
|
|
@@ -226,6 +246,7 @@ Impact Nova provides a rich set of components structured for any enterprise use-
|
|
|
226
246
|
- Prompt, Form Group
|
|
227
247
|
|
|
228
248
|
### 🧭 Navigation
|
|
249
|
+
|
|
229
250
|
- Sidebar, Navigation Bar
|
|
230
251
|
- Tabs, Breadcrumb, Stepper
|
|
231
252
|
- Card, Accordion, Nested List
|
|
@@ -233,6 +254,7 @@ Impact Nova provides a rich set of components structured for any enterprise use-
|
|
|
233
254
|
- Dynamic Layout
|
|
234
255
|
|
|
235
256
|
### 💬 Feedback & Overlay
|
|
257
|
+
|
|
236
258
|
- Alert, Alert Dialog, Dialog
|
|
237
259
|
- Sheet, Drawer, Modal
|
|
238
260
|
- Toast, Tooltip, Popover
|
|
@@ -240,6 +262,7 @@ Impact Nova provides a rich set of components structured for any enterprise use-
|
|
|
240
262
|
- Loader, Skeleton, Progress Bar
|
|
241
263
|
|
|
242
264
|
### 📊 Data Display
|
|
265
|
+
|
|
243
266
|
- Avatar, Badge, Tag, Chips
|
|
244
267
|
- Calendar, Chart
|
|
245
268
|
- Empty Container, Notification Panel
|
|
@@ -258,22 +281,30 @@ Impact Nova provides a rich set of components structured for any enterprise use-
|
|
|
258
281
|
## ✨ Credits & Contributors
|
|
259
282
|
|
|
260
283
|
**Core Development**
|
|
284
|
+
|
|
261
285
|
- Anil M
|
|
262
286
|
- Ritesh Ranjan
|
|
287
|
+
- Manohar R
|
|
288
|
+
- Pratik Pradhan
|
|
289
|
+
- Balaji Utukuri
|
|
263
290
|
|
|
264
291
|
**Design Architecture**
|
|
292
|
+
|
|
265
293
|
- Jaymin Pancholi
|
|
266
294
|
- Sudip Sarkar
|
|
267
295
|
|
|
268
296
|
**UX & Product UI**
|
|
297
|
+
|
|
269
298
|
- Kalyan
|
|
270
299
|
- Vikram
|
|
271
300
|
- Aditi Chaudhary
|
|
272
301
|
|
|
273
302
|
**Inspiration**
|
|
303
|
+
|
|
274
304
|
- Impact UI
|
|
275
305
|
|
|
276
306
|
**Special Thanks**
|
|
307
|
+
|
|
277
308
|
- Girish Pattana Setty
|
|
278
309
|
- Himanshu K
|
|
279
310
|
- Harish V
|
|
@@ -283,4 +314,3 @@ Impact Nova provides a rich set of components structured for any enterprise use-
|
|
|
283
314
|
## 📄 License
|
|
284
315
|
|
|
285
316
|
Impact Nova is licensed under the [MIT License](LICENSE).
|
|
286
|
-
|
|
@@ -11,7 +11,7 @@ import { CommandDefinition, KeyBinding } from './utils';
|
|
|
11
11
|
* CommandPaletteGroup, CommandPaletteItem, CommandPaletteShortcut,
|
|
12
12
|
* CommandPaletteEmpty, CommandPaletteSeparator, CommandPaletteFooter
|
|
13
13
|
*/
|
|
14
|
-
import * as React from
|
|
14
|
+
import * as React from "react";
|
|
15
15
|
interface CommandPaletteLabels {
|
|
16
16
|
/** Placeholder text for the search input */
|
|
17
17
|
placeholder?: string;
|
|
@@ -46,7 +46,7 @@ declare function CommandPalette({ className, children, commands: externalCommand
|
|
|
46
46
|
declare namespace CommandPalette {
|
|
47
47
|
var displayName: string;
|
|
48
48
|
}
|
|
49
|
-
export interface CommandPaletteInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>,
|
|
49
|
+
export interface CommandPaletteInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> {
|
|
50
50
|
onValueChange?: (value: string) => void;
|
|
51
51
|
}
|
|
52
52
|
declare const CommandPaletteInput: React.ForwardRefExoticComponent<CommandPaletteInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -55,7 +55,7 @@ export interface CommandPaletteGroupProps extends React.HTMLAttributes<HTMLDivEl
|
|
|
55
55
|
heading?: string;
|
|
56
56
|
}
|
|
57
57
|
declare const CommandPaletteGroup: React.ForwardRefExoticComponent<CommandPaletteGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
58
|
-
export interface CommandPaletteItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
58
|
+
export interface CommandPaletteItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
59
59
|
command: CommandDefinition;
|
|
60
60
|
isSelected?: boolean;
|
|
61
61
|
onSelect?: () => void;
|
|
@@ -38,7 +38,13 @@ function fe({
|
|
|
38
38
|
onCommandExecute: O,
|
|
39
39
|
onOpenChange: W
|
|
40
40
|
}) {
|
|
41
|
-
const {
|
|
41
|
+
const {
|
|
42
|
+
open: E,
|
|
43
|
+
setOpen: Y,
|
|
44
|
+
getPaletteCommands: Z,
|
|
45
|
+
getEffectiveKeybinding: G,
|
|
46
|
+
registry: k
|
|
47
|
+
} = ie(), [y, $] = r.useState(""), [N, g] = r.useState(0), A = r.useRef(null), F = r.useRef(null), j = r.useMemo(() => (n ?? Z()).filter((s) => {
|
|
42
48
|
const u = s.source ?? "user";
|
|
43
49
|
return u === "user" || u === "ag-grid";
|
|
44
50
|
}), [n, E]), q = r.useMemo(() => {
|
|
@@ -51,7 +57,9 @@ function fe({
|
|
|
51
57
|
const s = k.getRecentCommandIds(), u = new Set(s), x = [], C = [];
|
|
52
58
|
for (const h of t)
|
|
53
59
|
u.has(h.item.id) ? x.push(h) : C.push(h);
|
|
54
|
-
return x.sort(
|
|
60
|
+
return x.sort(
|
|
61
|
+
(h, oe) => s.indexOf(h.item.id) - s.indexOf(oe.item.id)
|
|
62
|
+
), [...x, ...C];
|
|
55
63
|
}
|
|
56
64
|
return t;
|
|
57
65
|
}, [j, y, k]), T = r.useMemo(
|
|
@@ -66,7 +74,10 @@ function fe({
|
|
|
66
74
|
defaultGroupLabel: d
|
|
67
75
|
}),
|
|
68
76
|
[T, y, k, f, d]
|
|
69
|
-
), { groups: te, orderedCommands: b } = ee, S = r.useRef({
|
|
77
|
+
), { groups: te, orderedCommands: b } = ee, S = r.useRef({
|
|
78
|
+
ordered: b,
|
|
79
|
+
index: N
|
|
80
|
+
});
|
|
70
81
|
S.current = { ordered: b, index: N }, r.useEffect(() => {
|
|
71
82
|
E && ($(""), g(0), requestAnimationFrame(() => {
|
|
72
83
|
A.current?.focus();
|
|
@@ -74,9 +85,12 @@ function fe({
|
|
|
74
85
|
}, [E]);
|
|
75
86
|
const K = (t) => {
|
|
76
87
|
Y(t), W?.(t);
|
|
77
|
-
}, w = r.useCallback(
|
|
78
|
-
|
|
79
|
-
|
|
88
|
+
}, w = r.useCallback(
|
|
89
|
+
(t) => {
|
|
90
|
+
t.handler(), k.addRecentCommand(t.id), O?.(t), K(!1);
|
|
91
|
+
},
|
|
92
|
+
[k, O]
|
|
93
|
+
), ae = r.useCallback(
|
|
80
94
|
(t) => {
|
|
81
95
|
const { ordered: s } = S.current, u = Math.max(s.length - 1, 0);
|
|
82
96
|
switch (t.key) {
|
|
@@ -114,7 +128,9 @@ function fe({
|
|
|
114
128
|
}, [b.length]), r.useLayoutEffect(() => {
|
|
115
129
|
const t = F.current;
|
|
116
130
|
if (!t) return;
|
|
117
|
-
const s = t.querySelector(
|
|
131
|
+
const s = t.querySelector(
|
|
132
|
+
'[data-selected="true"]'
|
|
133
|
+
);
|
|
118
134
|
s && s.scrollIntoView({
|
|
119
135
|
block: "nearest",
|
|
120
136
|
inline: "nearest",
|
|
@@ -156,12 +172,7 @@ function fe({
|
|
|
156
172
|
]
|
|
157
173
|
), re = r.Children.count(a) > 0;
|
|
158
174
|
return /* @__PURE__ */ e(P.Root, { open: E, onOpenChange: K, children: /* @__PURE__ */ c(P.Portal, { children: [
|
|
159
|
-
/* @__PURE__ */ e(
|
|
160
|
-
P.Overlay,
|
|
161
|
-
{
|
|
162
|
-
className: "fixed inset-0 z-50 bg-scrim data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
|
163
|
-
}
|
|
164
|
-
),
|
|
175
|
+
/* @__PURE__ */ e(P.Overlay, { className: "fixed inset-0 z-50 bg-scrim data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" }),
|
|
165
176
|
/* @__PURE__ */ c(
|
|
166
177
|
P.Content,
|
|
167
178
|
{
|
|
@@ -184,30 +195,30 @@ function fe({
|
|
|
184
195
|
children: [
|
|
185
196
|
/* @__PURE__ */ e(P.Title, { className: "sr-only", children: "Command Palette" }),
|
|
186
197
|
/* @__PURE__ */ e(R.Provider, { value: ne, children: re ? a : /* @__PURE__ */ c(se, { children: [
|
|
187
|
-
/* @__PURE__ */ e(
|
|
188
|
-
|
|
198
|
+
/* @__PURE__ */ e(U, { ref: A, placeholder: i }),
|
|
199
|
+
/* @__PURE__ */ e(_, { ref: F, children: b.length === 0 ? /* @__PURE__ */ e(V, {}) : te.map((t, s) => /* @__PURE__ */ c(
|
|
200
|
+
r.Fragment,
|
|
189
201
|
{
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
] }, `${t.heading}-${t.rowStart}`)) }),
|
|
202
|
+
children: [
|
|
203
|
+
s > 0 && /* @__PURE__ */ e(X, {}),
|
|
204
|
+
/* @__PURE__ */ e(B, { heading: t.heading, children: t.items.map((u, x) => {
|
|
205
|
+
const C = t.rowStart + x, h = G(u.id);
|
|
206
|
+
return /* @__PURE__ */ e(
|
|
207
|
+
H,
|
|
208
|
+
{
|
|
209
|
+
command: u,
|
|
210
|
+
isSelected: C === N,
|
|
211
|
+
onSelect: () => w(u),
|
|
212
|
+
onMouseEnter: () => g(C),
|
|
213
|
+
keybinding: h
|
|
214
|
+
},
|
|
215
|
+
u.id
|
|
216
|
+
);
|
|
217
|
+
}) })
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
`${t.heading}-${t.rowStart}`
|
|
221
|
+
)) }),
|
|
211
222
|
/* @__PURE__ */ e(J, {})
|
|
212
223
|
] }) })
|
|
213
224
|
]
|
|
@@ -216,52 +227,50 @@ function fe({
|
|
|
216
227
|
] }) });
|
|
217
228
|
}
|
|
218
229
|
fe.displayName = "CommandPalette";
|
|
219
|
-
const U = r.forwardRef(
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
230
|
+
const U = r.forwardRef(({ className: o, placeholder: a, onValueChange: n, ...i }, m) => {
|
|
231
|
+
const { query: p, setQuery: f } = r.useContext(R);
|
|
232
|
+
return /* @__PURE__ */ c(
|
|
233
|
+
"div",
|
|
234
|
+
{
|
|
235
|
+
className: l(
|
|
236
|
+
"flex items-center gap-3 border-b border-stroke-hairline px-4",
|
|
237
|
+
o
|
|
238
|
+
),
|
|
239
|
+
"data-command-palette-input": !0,
|
|
240
|
+
children: [
|
|
241
|
+
/* @__PURE__ */ e(Q, { className: "h-4 w-4 shrink-0 text-content-muted" }),
|
|
242
|
+
/* @__PURE__ */ e(
|
|
243
|
+
"input",
|
|
244
|
+
{
|
|
245
|
+
ref: m,
|
|
246
|
+
value: p,
|
|
247
|
+
onChange: (d) => {
|
|
248
|
+
f(d.target.value), n?.(d.target.value);
|
|
249
|
+
},
|
|
250
|
+
placeholder: a,
|
|
251
|
+
autoComplete: "off",
|
|
252
|
+
autoCorrect: "off",
|
|
253
|
+
spellCheck: !1,
|
|
254
|
+
className: l(
|
|
255
|
+
"flex h-12 w-full bg-transparent py-3 text-sm font-medium outline-none",
|
|
256
|
+
"placeholder:text-content-muted"
|
|
257
|
+
),
|
|
258
|
+
...i
|
|
259
|
+
}
|
|
228
260
|
),
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
"
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
autoCorrect: "off",
|
|
243
|
-
spellCheck: !1,
|
|
244
|
-
className: l(
|
|
245
|
-
"flex h-12 w-full bg-transparent py-3 text-sm font-medium outline-none",
|
|
246
|
-
"placeholder:text-content-muted"
|
|
247
|
-
),
|
|
248
|
-
...i
|
|
249
|
-
}
|
|
250
|
-
),
|
|
251
|
-
/* @__PURE__ */ e(
|
|
252
|
-
v,
|
|
253
|
-
{
|
|
254
|
-
keybinding: { key: "Escape" },
|
|
255
|
-
size: "sm",
|
|
256
|
-
variant: "muted",
|
|
257
|
-
className: "shrink-0"
|
|
258
|
-
}
|
|
259
|
-
)
|
|
260
|
-
]
|
|
261
|
-
}
|
|
262
|
-
);
|
|
263
|
-
}
|
|
264
|
-
);
|
|
261
|
+
/* @__PURE__ */ e(
|
|
262
|
+
v,
|
|
263
|
+
{
|
|
264
|
+
keybinding: { key: "Escape" },
|
|
265
|
+
size: "sm",
|
|
266
|
+
variant: "muted",
|
|
267
|
+
className: "shrink-0"
|
|
268
|
+
}
|
|
269
|
+
)
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
);
|
|
273
|
+
});
|
|
265
274
|
U.displayName = "CommandPaletteInput";
|
|
266
275
|
const _ = r.forwardRef(({ className: o, children: a, ...n }, i) => /* @__PURE__ */ e(
|
|
267
276
|
"div",
|
|
@@ -278,25 +287,26 @@ const _ = r.forwardRef(({ className: o, children: a, ...n }, i) => /* @__PURE__
|
|
|
278
287
|
}
|
|
279
288
|
));
|
|
280
289
|
_.displayName = "CommandPaletteList";
|
|
281
|
-
const B = r.forwardRef(
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
children:
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
)
|
|
297
|
-
);
|
|
290
|
+
const B = r.forwardRef(({ className: o, heading: a, children: n, ...i }, m) => /* @__PURE__ */ c(
|
|
291
|
+
"div",
|
|
292
|
+
{
|
|
293
|
+
ref: m,
|
|
294
|
+
role: "group",
|
|
295
|
+
"aria-label": a,
|
|
296
|
+
"data-command-palette-group": !0,
|
|
297
|
+
className: l("py-1", o),
|
|
298
|
+
...i,
|
|
299
|
+
children: [
|
|
300
|
+
a && /* @__PURE__ */ e("div", { className: "px-4 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-content-muted", children: a }),
|
|
301
|
+
n
|
|
302
|
+
]
|
|
303
|
+
}
|
|
304
|
+
));
|
|
298
305
|
B.displayName = "CommandPaletteGroup";
|
|
299
|
-
function xe({
|
|
306
|
+
function xe({
|
|
307
|
+
source: o,
|
|
308
|
+
isSelected: a
|
|
309
|
+
}) {
|
|
300
310
|
if (!o || o === "user") return null;
|
|
301
311
|
const n = me[o];
|
|
302
312
|
return n ? /* @__PURE__ */ e(
|
|
@@ -310,51 +320,80 @@ function xe({ source: o, isSelected: a }) {
|
|
|
310
320
|
}
|
|
311
321
|
) : null;
|
|
312
322
|
}
|
|
313
|
-
const H = r.forwardRef(
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
323
|
+
const H = r.forwardRef(({ className: o, command: a, isSelected: n, onSelect: i, keybinding: m, ...p }, f) => {
|
|
324
|
+
const d = pe(a.source);
|
|
325
|
+
return /* @__PURE__ */ c(
|
|
326
|
+
"div",
|
|
327
|
+
{
|
|
328
|
+
ref: f,
|
|
329
|
+
role: "option",
|
|
330
|
+
"aria-selected": n,
|
|
331
|
+
"data-selected": n,
|
|
332
|
+
"data-command-palette-item": !0,
|
|
333
|
+
"data-command-id": a.id,
|
|
334
|
+
onClick: i,
|
|
335
|
+
className: l(
|
|
336
|
+
"flex items-center gap-3 cursor-pointer px-4 py-2 text-sm",
|
|
337
|
+
// Smooth selection shift; scroll-margin keeps row clear of list edges when scrolling into view
|
|
338
|
+
"transition-[color,background-color] duration-150 ease-out [scroll-margin-block:6px]",
|
|
339
|
+
n ? "bg-brand text-brand-foreground" : d ? "text-content-muted hover:bg-canvas-muted" : "text-content-charcoal hover:bg-canvas-muted",
|
|
340
|
+
o
|
|
341
|
+
),
|
|
342
|
+
...p,
|
|
343
|
+
children: [
|
|
344
|
+
a.icon && /* @__PURE__ */ e(
|
|
345
|
+
"span",
|
|
346
|
+
{
|
|
347
|
+
className: l(
|
|
348
|
+
"flex h-4 w-4 shrink-0 items-center justify-center",
|
|
349
|
+
n ? "text-brand-foreground" : d ? "text-stroke-hairline" : "text-content-muted"
|
|
350
|
+
),
|
|
351
|
+
children: a.icon
|
|
352
|
+
}
|
|
332
353
|
),
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
)
|
|
354
|
+
/* @__PURE__ */ c("div", { className: "flex flex-1 flex-col min-w-0", children: [
|
|
355
|
+
/* @__PURE__ */ e(
|
|
356
|
+
"span",
|
|
357
|
+
{
|
|
358
|
+
className: l(
|
|
359
|
+
"truncate",
|
|
360
|
+
d && !n ? "font-normal" : "font-medium"
|
|
361
|
+
),
|
|
362
|
+
children: a.label
|
|
363
|
+
}
|
|
364
|
+
),
|
|
365
|
+
a.description && /* @__PURE__ */ e(
|
|
366
|
+
"span",
|
|
367
|
+
{
|
|
368
|
+
className: l(
|
|
369
|
+
"truncate text-xs",
|
|
370
|
+
n ? "text-brand-foreground/70" : d ? "text-stroke-hairline" : "text-content-muted"
|
|
371
|
+
),
|
|
372
|
+
children: a.description
|
|
373
|
+
}
|
|
374
|
+
)
|
|
375
|
+
] }),
|
|
376
|
+
/* @__PURE__ */ e(xe, { source: a.source, isSelected: n }),
|
|
377
|
+
m && /* @__PURE__ */ e(
|
|
378
|
+
L,
|
|
379
|
+
{
|
|
380
|
+
keybinding: m,
|
|
381
|
+
isSelected: n,
|
|
382
|
+
external: d
|
|
383
|
+
}
|
|
384
|
+
)
|
|
385
|
+
]
|
|
386
|
+
}
|
|
387
|
+
);
|
|
388
|
+
});
|
|
356
389
|
H.displayName = "CommandPaletteItem";
|
|
357
|
-
function L({
|
|
390
|
+
function L({
|
|
391
|
+
keybinding: o,
|
|
392
|
+
isSelected: a,
|
|
393
|
+
external: n,
|
|
394
|
+
className: i,
|
|
395
|
+
...m
|
|
396
|
+
}) {
|
|
358
397
|
const p = ce(o);
|
|
359
398
|
return /* @__PURE__ */ e(
|
|
360
399
|
"span",
|
|
@@ -378,7 +417,10 @@ function L({ keybinding: o, isSelected: a, external: n, className: i, ...m }) {
|
|
|
378
417
|
);
|
|
379
418
|
}
|
|
380
419
|
L.displayName = "CommandPaletteShortcut";
|
|
381
|
-
function V({
|
|
420
|
+
function V({
|
|
421
|
+
className: o,
|
|
422
|
+
...a
|
|
423
|
+
}) {
|
|
382
424
|
const { emptyTitle: n, emptyDescription: i } = r.useContext(R);
|
|
383
425
|
return /* @__PURE__ */ c(
|
|
384
426
|
"div",
|
|
@@ -398,7 +440,10 @@ function V({ className: o, ...a }) {
|
|
|
398
440
|
);
|
|
399
441
|
}
|
|
400
442
|
V.displayName = "CommandPaletteEmpty";
|
|
401
|
-
function X({
|
|
443
|
+
function X({
|
|
444
|
+
className: o,
|
|
445
|
+
...a
|
|
446
|
+
}) {
|
|
402
447
|
return /* @__PURE__ */ e(
|
|
403
448
|
"div",
|
|
404
449
|
{
|
|
@@ -409,7 +454,10 @@ function X({ className: o, ...a }) {
|
|
|
409
454
|
);
|
|
410
455
|
}
|
|
411
456
|
X.displayName = "CommandPaletteSeparator";
|
|
412
|
-
function J({
|
|
457
|
+
function J({
|
|
458
|
+
className: o,
|
|
459
|
+
...a
|
|
460
|
+
}) {
|
|
413
461
|
const { navigateLabel: n, runLabel: i, closeLabel: m, configureShortcutsLabel: p } = r.useContext(R);
|
|
414
462
|
return /* @__PURE__ */ c(
|
|
415
463
|
"div",
|