impact-nova 2.1.0-alpha.7 → 2.1.0-alpha.8

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.
Files changed (106) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +6 -0
  2. package/dist/components/data/ag-grid-react/build-ag-grid-theme.d.ts +3 -0
  3. package/dist/components/data/ag-grid-react/cell-renderers/editors/input-cell-editor.js +58 -58
  4. package/dist/components/data/ag-grid-react/column-indicator-sync-bus.d.ts +9 -0
  5. package/dist/components/data/ag-grid-react/column-indicator-sync-bus.js +15 -0
  6. package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +78 -73
  7. package/dist/components/data/ag-grid-react/headers/custom-header.js +3 -1
  8. package/dist/components/data/ag-grid-react/headers/header-search-input.js +87 -91
  9. package/dist/components/data/ag-grid-react/index.d.ts +1 -1
  10. package/dist/components/data/ag-grid-react/index.js +109 -100
  11. package/dist/components/data/ag-grid-react/notify-column-indicator-sync.d.ts +3 -2
  12. package/dist/components/data/ag-grid-react/notify-column-indicator-sync.js +4 -3
  13. package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.d.ts +3 -0
  14. package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.js +10 -0
  15. package/dist/components/data/ag-grid-react/theme.d.ts +1 -0
  16. package/dist/components/data/ag-grid-react/theme.js +93 -21
  17. package/dist/components/data/data-table/column-indicator.d.ts +1 -1
  18. package/dist/components/data/data-table/column-indicator.js +15 -11
  19. package/dist/components/data/data-table/data-table-column-def-pin.d.ts +9 -4
  20. package/dist/components/data/data-table/data-table-column-def-pin.js +38 -38
  21. package/dist/components/data/data-table/data-table-saved-views.js +37 -37
  22. package/dist/components/data/data-table/data-table.js +78 -73
  23. package/dist/components/data/data-table/data-table.types.d.ts +7 -1
  24. package/dist/components/data/data-table/indicator-legend.d.ts +13 -2
  25. package/dist/components/data/data-table/indicator-legend.js +20 -17
  26. package/dist/components/data/data-table/pin-switch.js +9 -9
  27. package/dist/components/data/data-table/use-data-table-column-list-sync.js +92 -89
  28. package/dist/components/data/nested-list/nested-list-change-detection.d.ts +11 -0
  29. package/dist/components/data/nested-list/nested-list-change-detection.js +13 -0
  30. package/dist/components/data/nested-list/nested-list.js +107 -97
  31. package/dist/components/data-display/calendar/calendar.d.ts +1 -1
  32. package/dist/components/data-display/calendar/calendar.js +194 -189
  33. package/dist/components/data-display/chart/chart-palette.d.ts +16 -0
  34. package/dist/components/data-display/chart/chart-palette.js +28 -0
  35. package/dist/components/data-display/chart/chart.js +121 -115
  36. package/dist/components/data-display/chart/chart.utils.js +9 -6
  37. package/dist/components/data-display/chart/index.d.ts +1 -0
  38. package/dist/components/data-display/chart/index.js +15 -9
  39. package/dist/components/data-display/chart/resolve-highcharts-options.d.ts +3 -0
  40. package/dist/components/data-display/chart/resolve-highcharts-options.js +35 -0
  41. package/dist/components/data-display/statistics-card/statistics-card.color.d.ts +6 -0
  42. package/dist/components/data-display/statistics-card/statistics-card.color.js +19 -0
  43. package/dist/components/data-display/statistics-card/statistics-card.hooks.js +50 -48
  44. package/dist/components/data-display/statistics-card/statistics-card.js +127 -146
  45. package/dist/components/feedback/alert-dialog/alert-dialog.js +15 -15
  46. package/dist/components/feedback/dialog/dialog.js +3 -3
  47. package/dist/components/feedback/drawer/drawer.js +32 -32
  48. package/dist/components/feedback/sheet/sheet.js +8 -8
  49. package/dist/components/feedback/sheet/sheet.variants.js +1 -1
  50. package/dist/components/feedback/toast/toast.js +83 -92
  51. package/dist/components/flows/command-palette/command-palette-context.types.d.ts +5 -0
  52. package/dist/components/flows/command-palette/command-palette.d.ts +4 -16
  53. package/dist/components/flows/command-palette/command-palette.js +245 -258
  54. package/dist/components/flows/command-palette/command-palette.types.d.ts +9 -0
  55. package/dist/components/flows/command-palette/shortcut-overlay.js +6 -6
  56. package/dist/components/flows/filter-panel/filter-panel.d.ts +3 -2
  57. package/dist/components/flows/filter-panel/filter-panel.js +99 -104
  58. package/dist/components/flows/filter-strip/filter-summary.js +41 -41
  59. package/dist/components/flows/filter-strip/filter-tag-list.js +48 -48
  60. package/dist/components/flows/wizard/wizard.js +32 -32
  61. package/dist/components/forms/choice-card/choice-card.d.ts +2 -2
  62. package/dist/components/forms/choice-card/choice-card.js +156 -166
  63. package/dist/components/forms/combobox/combobox.js +70 -70
  64. package/dist/components/forms/date-picker/date-picker.js +31 -30
  65. package/dist/components/forms/file-upload/file-upload.js +146 -168
  66. package/dist/components/forms/prompt/prompt.js +47 -48
  67. package/dist/components/forms/select/components/SelectAllRow.js +14 -14
  68. package/dist/components/forms/select/components/SelectMenuFooter.js +12 -12
  69. package/dist/components/forms/select/components/SelectMenuHeader.js +44 -44
  70. package/dist/components/forms/select/components/SelectMenuListBody.js +22 -22
  71. package/dist/components/forms/select/components/SelectMenuPanel.js +8 -8
  72. package/dist/components/forms/select/components/SelectOptionRow.js +62 -62
  73. package/dist/components/forms/select/select.d.ts +5 -4
  74. package/dist/components/forms/select/select.js +123 -120
  75. package/dist/components/forms/select/select.types.d.ts +95 -204
  76. package/dist/components/forms/slider/slider.js +17 -17
  77. package/dist/components/forms/smart-input/smart-input.js +49 -49
  78. package/dist/components/forms/textarea/textarea.js +25 -25
  79. package/dist/components/layout/breadcrumb/breadcrumb.js +112 -118
  80. package/dist/components/layout/header/header.d.ts +5 -17
  81. package/dist/components/layout/header/header.js +113 -116
  82. package/dist/components/layout/header/header.types.d.ts +3 -0
  83. package/dist/components/layout/sidebar/sidebar.js +5 -5
  84. package/dist/components/layout/sidebar/sidebar.variants.js +1 -1
  85. package/dist/components/primitives/accordion/accordion.js +38 -41
  86. package/dist/components/primitives/kbd/kbd.variants.js +1 -1
  87. package/dist/i18n/defaultMessages.d.ts +2 -0
  88. package/dist/i18n/defaultMessages.js +6 -4
  89. package/dist/i18n/locales/de.js +2 -0
  90. package/dist/i18n/locales/es.js +2 -0
  91. package/dist/i18n/locales/hi.js +2 -0
  92. package/dist/i18n/locales/kn.js +2 -0
  93. package/dist/impact-nova-base.scss +8 -5
  94. package/dist/impact-nova-components.css +2 -2
  95. package/dist/impact-nova-tokens.scss +346 -189
  96. package/dist/impact-nova.css +1 -1
  97. package/dist/index.js +505 -499
  98. package/dist/lib/resolve-design-token-color.d.ts +5 -0
  99. package/dist/lib/resolve-design-token-color.js +12 -0
  100. package/dist/llms/rules/ag-grid.js +1 -1
  101. package/dist/llms/rules/installation.js +1 -1
  102. package/dist/llms/rules/requirements.js +1 -1
  103. package/dist/theme/tokens/chart-series-palette.json.d.ts +53 -0
  104. package/dist/theme/tokens/chart-series-palette.json.js +7 -0
  105. package/package.json +22 -254
  106. package/tailwind.config.js +10 -229
@@ -1,18 +1,20 @@
1
- import { jsxs as c, jsx as e, Fragment as se } from "react/jsx-runtime";
2
- import * as n from "react";
3
- import * as P from "@radix-ui/react-dialog";
4
- import { Search as _ } from "impact-nova-icons";
5
- import { cn as l } from "../../../lib/utils.js";
6
- import { useCommandPalette as ie } from "./use-command-palette.js";
7
- import { Kbd as v } from "../../primitives/kbd/kbd.js";
8
- import { keybindingToSymbols as de } from "../../primitives/kbd/keybinding-display.js";
9
- import { buildCommandPaletteLayout as le } from "./command-palette-layout.js";
10
- import { COMMAND_SOURCE_LABELS as ce, fuzzyFilter as me } from "./utils.js";
11
- const ue = /* @__PURE__ */ new Set(["browser", "system", "ag-grid"]);
12
- function fe(o) {
13
- return !!o && ue.has(o);
1
+ import { jsxs as m, jsx as e, Fragment as ee } from "react/jsx-runtime";
2
+ import * as o from "react";
3
+ import * as E from "@radix-ui/react-dialog";
4
+ import { Search as B } from "impact-nova-icons";
5
+ import { cn as c } from "../../../lib/utils.js";
6
+ import { createComponent as b } from "../../../lib/primitives/create-component.js";
7
+ import { wrapRadixPart as H } from "../../../lib/primitives/create-compound.js";
8
+ import { useCommandPalette as te } from "./use-command-palette.js";
9
+ import { Kbd as P } from "../../primitives/kbd/kbd.js";
10
+ import { keybindingToSymbols as ne } from "../../primitives/kbd/keybinding-display.js";
11
+ import { buildCommandPaletteLayout as ae } from "./command-palette-layout.js";
12
+ import { COMMAND_SOURCE_LABELS as re, fuzzyFilter as oe } from "./utils.js";
13
+ const se = /* @__PURE__ */ new Set(["browser", "system", "ag-grid"]);
14
+ function ie(r) {
15
+ return !!r && se.has(r);
14
16
  }
15
- const R = n.createContext({
17
+ const I = o.createContext({
16
18
  query: "",
17
19
  setQuery: () => {
18
20
  },
@@ -22,93 +24,105 @@ const R = n.createContext({
22
24
  orderedCommands: [],
23
25
  onExecute: () => {
24
26
  }
25
- });
26
- function pe({
27
- className: o,
28
- children: a,
29
- commands: r,
27
+ }), de = H(
28
+ "command-palette",
29
+ "overlay",
30
+ "CommandPaletteOverlay",
31
+ E.Overlay,
32
+ "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 motion-reduce:animate-none motion-reduce:transition-none"
33
+ ), le = H(
34
+ "command-palette",
35
+ "title",
36
+ "CommandPaletteTitle",
37
+ E.Title,
38
+ "sr-only"
39
+ );
40
+ function ce({
41
+ className: r,
42
+ children: n,
43
+ commands: a,
30
44
  placeholder: i = "Type a command or search...",
31
- emptyTitle: m = "No results found",
32
- emptyDescription: f = "Try a different search term",
33
- recentGroupLabel: p = "Recently Used",
45
+ emptyTitle: l = "No results found",
46
+ emptyDescription: x = "Try a different search term",
47
+ recentGroupLabel: u = "Recently Used",
34
48
  defaultGroupLabel: d = "Commands",
35
- navigateLabel: z = "Navigate",
36
- runLabel: M = "Run",
37
- closeLabel: D = "Close",
38
- configureShortcutsLabel: O = "Configure Shortcuts",
49
+ navigateLabel: S = "Navigate",
50
+ runLabel: D = "Run",
51
+ closeLabel: O = "Close",
52
+ configureShortcutsLabel: T = "Configure Shortcuts",
39
53
  onCommandExecute: $,
40
54
  onOpenChange: A
41
55
  }) {
42
56
  const {
43
- open: E,
57
+ open: R,
44
58
  setOpen: F,
45
- getPaletteCommands: Z,
46
- getEffectiveKeybinding: G,
47
- registry: k
48
- } = ie(), [y, j] = n.useState(""), [N, g] = n.useState(0), q = n.useRef(null), T = n.useRef(null), K = n.useMemo(() => (r ?? Z()).filter((s) => {
49
- const u = s.source ?? "user";
50
- return u === "user" || u === "ag-grid";
51
- }), [r, E]), Q = n.useMemo(() => {
52
- const t = me(
53
- K,
59
+ getPaletteCommands: L,
60
+ getEffectiveKeybinding: V,
61
+ registry: v
62
+ } = te(), [y, j] = o.useState(""), [N, g] = o.useState(0), q = o.useRef(null), K = o.useRef(null), Q = o.useMemo(() => (a ?? L()).filter((s) => {
63
+ const p = s.source ?? "user";
64
+ return p === "user" || p === "ag-grid";
65
+ }), [a, R]), U = o.useMemo(() => {
66
+ const t = oe(
67
+ Q,
54
68
  y,
55
69
  (s) => `${s.category ? s.category + ": " : ""}${s.label}${s.description ? " " + s.description : ""}`
56
70
  );
57
71
  if (!y.trim()) {
58
- const s = k.getRecentCommandIds(), u = new Set(s), x = [], C = [];
72
+ const s = v.getRecentCommandIds(), p = new Set(s), f = [], k = [];
59
73
  for (const h of t)
60
- u.has(h.item.id) ? x.push(h) : C.push(h);
61
- return x.sort(
62
- (h, oe) => s.indexOf(h.item.id) - s.indexOf(oe.item.id)
63
- ), [...x, ...C];
74
+ p.has(h.item.id) ? f.push(h) : k.push(h);
75
+ return f.sort(
76
+ (h, G) => s.indexOf(h.item.id) - s.indexOf(G.item.id)
77
+ ), [...f, ...k];
64
78
  }
65
79
  return t;
66
- }, [K, y, k]), U = n.useMemo(
67
- () => Q.map((t) => t.item),
68
- [Q]
69
- ), ee = n.useMemo(
70
- () => le({
71
- filteredCommands: U,
80
+ }, [Q, y, v]), _ = o.useMemo(
81
+ () => U.map((t) => t.item),
82
+ [U]
83
+ ), X = o.useMemo(
84
+ () => ae({
85
+ filteredCommands: _,
72
86
  emptyQuery: !y.trim(),
73
- recentCommandIds: k.getRecentCommandIds(),
74
- recentGroupLabel: p,
87
+ recentCommandIds: v.getRecentCommandIds(),
88
+ recentGroupLabel: u,
75
89
  defaultGroupLabel: d
76
90
  }),
77
- [U, y, k, p, d]
78
- ), { groups: te, orderedCommands: b } = ee, S = n.useRef({
79
- ordered: b,
91
+ [_, y, v, u, d]
92
+ ), { groups: J, orderedCommands: C } = X, z = o.useRef({
93
+ ordered: C,
80
94
  index: N
81
95
  });
82
- S.current = { ordered: b, index: N }, n.useEffect(() => {
83
- E && (j(""), g(0), requestAnimationFrame(() => {
96
+ z.current = { ordered: C, index: N }, o.useEffect(() => {
97
+ R && (j(""), g(0), requestAnimationFrame(() => {
84
98
  q.current?.focus();
85
99
  }));
86
- }, [E]);
87
- const I = n.useCallback(
100
+ }, [R]);
101
+ const M = o.useCallback(
88
102
  (t) => {
89
103
  F(t), A?.(t);
90
104
  },
91
105
  [A, F]
92
- ), w = n.useCallback(
106
+ ), w = o.useCallback(
93
107
  (t) => {
94
- t.handler(), k.addRecentCommand(t.id), $?.(t), I(!1);
108
+ t.handler(), v.addRecentCommand(t.id), $?.(t), M(!1);
95
109
  },
96
- [k, $, I]
97
- ), ae = n.useCallback(
110
+ [v, $, M]
111
+ ), W = o.useCallback(
98
112
  (t) => {
99
- const { ordered: s } = S.current, u = Math.max(s.length - 1, 0);
113
+ const { ordered: s } = z.current, p = Math.max(s.length - 1, 0);
100
114
  switch (t.key) {
101
115
  case "ArrowDown": {
102
- t.preventDefault(), g((x) => Math.min(x + 1, u));
116
+ t.preventDefault(), g((f) => Math.min(f + 1, p));
103
117
  break;
104
118
  }
105
119
  case "ArrowUp": {
106
- t.preventDefault(), g((x) => Math.max(x - 1, 0));
120
+ t.preventDefault(), g((f) => Math.max(f - 1, 0));
107
121
  break;
108
122
  }
109
123
  case "Enter": {
110
124
  t.preventDefault();
111
- const { ordered: x, index: C } = S.current, h = x[C];
125
+ const { ordered: f, index: k } = z.current, h = f[k];
112
126
  h && w(h);
113
127
  break;
114
128
  }
@@ -117,20 +131,20 @@ function pe({
117
131
  break;
118
132
  }
119
133
  case "End": {
120
- t.preventDefault(), g(u);
134
+ t.preventDefault(), g(p);
121
135
  break;
122
136
  }
123
137
  }
124
138
  },
125
139
  [w]
126
140
  );
127
- n.useEffect(() => {
141
+ o.useEffect(() => {
128
142
  g(0);
129
- }, [y]), n.useEffect(() => {
130
- const t = b.length;
143
+ }, [y]), o.useEffect(() => {
144
+ const t = C.length;
131
145
  g((s) => t === 0 ? 0 : Math.min(s, t - 1));
132
- }, [b.length]), n.useLayoutEffect(() => {
133
- const t = T.current;
146
+ }, [C.length]), o.useLayoutEffect(() => {
147
+ const t = K.current;
134
148
  if (!t) return;
135
149
  const s = t.querySelector(
136
150
  '[data-selected="true"]'
@@ -141,50 +155,50 @@ function pe({
141
155
  behavior: "auto"
142
156
  });
143
157
  }, [N]);
144
- const ne = n.useMemo(
158
+ const Y = o.useMemo(
145
159
  () => ({
146
160
  query: y,
147
161
  setQuery: j,
148
162
  selectedIndex: N,
149
163
  setSelectedIndex: g,
150
- orderedCommands: b,
164
+ orderedCommands: C,
151
165
  onExecute: w,
152
166
  placeholder: i,
153
- emptyTitle: m,
154
- emptyDescription: f,
155
- recentGroupLabel: p,
167
+ emptyTitle: l,
168
+ emptyDescription: x,
169
+ recentGroupLabel: u,
156
170
  defaultGroupLabel: d,
157
- navigateLabel: z,
158
- runLabel: M,
159
- closeLabel: D,
160
- configureShortcutsLabel: O
171
+ navigateLabel: S,
172
+ runLabel: D,
173
+ closeLabel: O,
174
+ configureShortcutsLabel: T
161
175
  }),
162
176
  [
163
177
  y,
164
178
  N,
165
- b,
179
+ C,
166
180
  w,
167
181
  i,
168
- m,
169
- f,
170
- p,
182
+ l,
183
+ x,
184
+ u,
171
185
  d,
172
- z,
173
- M,
186
+ S,
174
187
  D,
175
- O
188
+ O,
189
+ T
176
190
  ]
177
- ), re = n.Children.count(a) > 0;
178
- return /* @__PURE__ */ e(P.Root, { open: E, onOpenChange: I, children: /* @__PURE__ */ c(P.Portal, { children: [
179
- /* @__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 motion-reduce:animate-none motion-reduce:transition-none" }),
180
- /* @__PURE__ */ c(
181
- P.Content,
191
+ ), Z = o.Children.count(n) > 0;
192
+ return /* @__PURE__ */ e(E.Root, { open: R, onOpenChange: M, children: /* @__PURE__ */ m(E.Portal, { children: [
193
+ /* @__PURE__ */ e(de, {}),
194
+ /* @__PURE__ */ m(
195
+ E.Content,
182
196
  {
183
197
  "aria-describedby": void 0,
184
198
  "data-command-palette": !0,
185
199
  "data-component": "command-palette",
186
- onKeyDown: ae,
187
- className: l(
200
+ onKeyDown: W,
201
+ className: c(
188
202
  "fixed left-[50%] top-[20%] z-50 w-full max-w-[640px] -translate-x-1/2",
189
203
  "rounded-xl border border-stroke-hairline bg-canvas-elevated shadow-2xl overflow-hidden",
190
204
  "data-[state=open]:animate-in data-[state=closed]:animate-out",
@@ -194,69 +208,69 @@ function pe({
194
208
  // Pin translate-x at -50% during animation so it stays centered (no horizontal slide)
195
209
  "data-[state=open]:slide-in-from-left-1/2 data-[state=closed]:slide-out-to-left-1/2",
196
210
  "duration-150",
197
- o
211
+ r
198
212
  ),
199
213
  style: { transformOrigin: "top center" },
200
214
  children: [
201
- /* @__PURE__ */ e(P.Title, { className: "sr-only", children: "Command Palette" }),
202
- /* @__PURE__ */ e(R.Provider, { value: ne, children: re ? a : /* @__PURE__ */ c(se, { children: [
203
- /* @__PURE__ */ e(B, { ref: q, placeholder: i }),
204
- /* @__PURE__ */ e(H, { ref: T, children: b.length === 0 ? /* @__PURE__ */ e(J, {}) : te.map((t, s) => /* @__PURE__ */ c(
205
- n.Fragment,
215
+ /* @__PURE__ */ e(le, { children: "Command Palette" }),
216
+ /* @__PURE__ */ e(I.Provider, { value: Y, children: Z ? n : /* @__PURE__ */ m(ee, { children: [
217
+ /* @__PURE__ */ e(me, { ref: q, placeholder: i }),
218
+ /* @__PURE__ */ e(ue, { ref: K, children: C.length === 0 ? /* @__PURE__ */ e(ge, {}) : J.map((t, s) => /* @__PURE__ */ m(
219
+ o.Fragment,
206
220
  {
207
221
  children: [
208
- s > 0 && /* @__PURE__ */ e(W, {}),
209
- /* @__PURE__ */ e(L, { heading: t.heading, children: t.items.map((u, x) => {
210
- const C = t.rowStart + x, h = G(u.id);
222
+ s > 0 && /* @__PURE__ */ e(ye, {}),
223
+ /* @__PURE__ */ e(pe, { heading: t.heading, children: t.items.map((p, f) => {
224
+ const k = t.rowStart + f, h = V(p.id);
211
225
  return /* @__PURE__ */ e(
212
- V,
226
+ xe,
213
227
  {
214
- command: u,
215
- isSelected: C === N,
216
- onSelect: () => w(u),
217
- onMouseEnter: () => g(C),
228
+ command: p,
229
+ isSelected: k === N,
230
+ onSelect: () => w(p),
231
+ onMouseEnter: () => g(k),
218
232
  keybinding: h
219
233
  },
220
- u.id
234
+ p.id
221
235
  );
222
236
  }) })
223
237
  ]
224
238
  },
225
239
  `${t.heading}-${t.rowStart}`
226
240
  )) }),
227
- /* @__PURE__ */ e(Y, {})
241
+ /* @__PURE__ */ e(be, {})
228
242
  ] }) })
229
243
  ]
230
244
  }
231
245
  )
232
246
  ] }) });
233
247
  }
234
- pe.displayName = "CommandPalette";
235
- const B = n.forwardRef(({ className: o, placeholder: a, onValueChange: r, ...i }, m) => {
236
- const { query: f, setQuery: p } = n.useContext(R);
237
- return /* @__PURE__ */ c(
248
+ ce.displayName = "CommandPalette";
249
+ const me = b("CommandPaletteInput", ({ className: r, placeholder: n, onValueChange: a, ...i }, l) => {
250
+ const { query: x, setQuery: u } = o.useContext(I);
251
+ return /* @__PURE__ */ m(
238
252
  "div",
239
253
  {
240
- className: l(
254
+ className: c(
241
255
  "flex items-center gap-3 border-b border-stroke-hairline px-4",
242
- o
256
+ r
243
257
  ),
244
258
  "data-command-palette-input": !0,
245
259
  children: [
246
- /* @__PURE__ */ e(_, { className: "h-4 w-4 shrink-0 text-content-icon" }),
260
+ /* @__PURE__ */ e(B, { className: "h-4 w-4 shrink-0 text-content-icon" }),
247
261
  /* @__PURE__ */ e(
248
262
  "input",
249
263
  {
250
- ref: m,
251
- value: f,
264
+ ref: l,
265
+ value: x,
252
266
  onChange: (d) => {
253
- p(d.target.value), r?.(d.target.value);
267
+ u(d.target.value), a?.(d.target.value);
254
268
  },
255
- placeholder: a,
269
+ placeholder: n,
256
270
  autoComplete: "off",
257
271
  autoCorrect: "off",
258
272
  spellCheck: !1,
259
- className: l(
273
+ className: c(
260
274
  "flex h-12 w-full bg-transparent py-3 text-sm font-medium outline-none",
261
275
  "placeholder:text-content-placeholder"
262
276
  ),
@@ -264,7 +278,7 @@ const B = n.forwardRef(({ className: o, placeholder: a, onValueChange: r, ...i }
264
278
  }
265
279
  ),
266
280
  /* @__PURE__ */ e(
267
- v,
281
+ P,
268
282
  {
269
283
  keybinding: { key: "Escape" },
270
284
  size: "sm",
@@ -275,117 +289,112 @@ const B = n.forwardRef(({ className: o, placeholder: a, onValueChange: r, ...i }
275
289
  ]
276
290
  }
277
291
  );
278
- });
279
- B.displayName = "CommandPaletteInput";
280
- const H = n.forwardRef(({ className: o, children: a, ...r }, i) => /* @__PURE__ */ e(
292
+ }), ue = b("CommandPaletteList", ({ className: r, children: n, ...a }, i) => /* @__PURE__ */ e(
281
293
  "div",
282
294
  {
283
295
  ref: i,
284
296
  role: "listbox",
285
297
  "data-command-palette-list": !0,
286
- className: l(
298
+ className: c(
287
299
  "max-h-[360px] overflow-y-auto overscroll-contain py-1",
288
- o
300
+ r
289
301
  ),
290
- ...r,
291
- children: a
302
+ ...a,
303
+ children: n
292
304
  }
293
- ));
294
- H.displayName = "CommandPaletteList";
295
- const L = n.forwardRef(({ className: o, heading: a, children: r, ...i }, m) => /* @__PURE__ */ c(
305
+ )), pe = b("CommandPaletteGroup", ({ className: r, heading: n, children: a, ...i }, l) => /* @__PURE__ */ m(
296
306
  "div",
297
307
  {
298
- ref: m,
308
+ ref: l,
299
309
  role: "group",
300
- "aria-label": a,
310
+ "aria-label": n,
301
311
  "data-command-palette-group": !0,
302
- className: l("py-1", o),
312
+ className: c("py-1", r),
303
313
  ...i,
304
314
  children: [
305
- a && /* @__PURE__ */ e("div", { className: "px-4 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-secondary-foreground", children: a }),
306
- r
315
+ n && /* @__PURE__ */ e("div", { className: "px-4 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-secondary-foreground", children: n }),
316
+ a
307
317
  ]
308
318
  }
309
319
  ));
310
- L.displayName = "CommandPaletteGroup";
311
- function xe({
312
- source: o,
313
- isSelected: a
320
+ function fe({
321
+ source: r,
322
+ isSelected: n
314
323
  }) {
315
- if (!o || o === "user") return null;
316
- const r = ce[o];
317
- return r ? /* @__PURE__ */ e(
324
+ if (!r || r === "user") return null;
325
+ const a = re[r];
326
+ return a ? /* @__PURE__ */ e(
318
327
  "span",
319
328
  {
320
- className: l(
329
+ className: c(
321
330
  "shrink-0 rounded px-1.5 py-px text-[9px] font-medium leading-tight tracking-wide",
322
- a ? "text-brand-foreground/50" : "text-secondary-foreground border border-stroke-hairline"
331
+ n ? "text-brand-foreground/50" : "text-secondary-foreground border border-stroke-hairline"
323
332
  ),
324
- children: r
333
+ children: a
325
334
  }
326
335
  ) : null;
327
336
  }
328
- const V = n.memo(
329
- n.forwardRef(
330
- ({ className: o, command: a, isSelected: r, onSelect: i, keybinding: m, ...f }, p) => {
331
- const d = fe(a.source);
332
- return /* @__PURE__ */ c(
337
+ const xe = o.memo(
338
+ b(
339
+ "CommandPaletteItem",
340
+ ({ className: r, command: n, isSelected: a, onSelect: i, keybinding: l, ...x }, u) => {
341
+ const d = ie(n.source);
342
+ return /* @__PURE__ */ m(
333
343
  "div",
334
344
  {
335
- ref: p,
345
+ ref: u,
336
346
  role: "option",
337
- "aria-selected": r,
338
- "data-selected": r,
347
+ "aria-selected": a,
348
+ "data-selected": a,
339
349
  "data-command-palette-item": !0,
340
- "data-command-id": a.id,
350
+ "data-command-id": n.id,
341
351
  onClick: i,
342
- className: l(
352
+ className: c(
343
353
  "flex items-center gap-3 cursor-pointer px-4 py-2 text-sm",
344
- // Smooth selection shift; scroll-margin keeps row clear of list edges when scrolling into view
345
354
  "transition-[color,background-color] duration-150 ease-out [scroll-margin-block:6px]",
346
- r ? "bg-brand text-brand-foreground" : d ? "text-secondary-foreground hover:bg-canvas-muted" : "text-content-charcoal hover:bg-canvas-muted",
347
- o
355
+ a ? "bg-brand text-brand-foreground" : d ? "text-secondary-foreground hover:bg-canvas-muted" : "text-content-charcoal hover:bg-canvas-muted",
356
+ r
348
357
  ),
349
- ...f,
358
+ ...x,
350
359
  children: [
351
- a.icon && /* @__PURE__ */ e(
360
+ n.icon && /* @__PURE__ */ e(
352
361
  "span",
353
362
  {
354
- className: l(
363
+ className: c(
355
364
  "flex h-4 w-4 shrink-0 items-center justify-center",
356
- r ? "text-brand-foreground" : d ? "text-stroke-hairline" : "text-secondary-foreground"
365
+ a ? "text-brand-foreground" : d ? "text-stroke-hairline" : "text-secondary-foreground"
357
366
  ),
358
- children: a.icon
367
+ children: n.icon
359
368
  }
360
369
  ),
361
- /* @__PURE__ */ c("div", { className: "flex flex-1 flex-col min-w-0", children: [
370
+ /* @__PURE__ */ m("div", { className: "flex flex-1 flex-col min-w-0", children: [
362
371
  /* @__PURE__ */ e(
363
372
  "span",
364
373
  {
365
- className: l(
374
+ className: c(
366
375
  "truncate",
367
- d && !r ? "font-normal" : "font-medium"
376
+ d && !a ? "font-normal" : "font-medium"
368
377
  ),
369
- children: a.label
378
+ children: n.label
370
379
  }
371
380
  ),
372
- a.description && /* @__PURE__ */ e(
381
+ n.description && /* @__PURE__ */ e(
373
382
  "span",
374
383
  {
375
- className: l(
384
+ className: c(
376
385
  "truncate text-xs",
377
- r ? "text-brand-foreground/70" : d ? "text-stroke-hairline" : "text-secondary-foreground"
386
+ a ? "text-brand-foreground/70" : d ? "text-stroke-hairline" : "text-secondary-foreground"
378
387
  ),
379
- children: a.description
388
+ children: n.description
380
389
  }
381
390
  )
382
391
  ] }),
383
- /* @__PURE__ */ e(xe, { source: a.source, isSelected: r }),
384
- m && /* @__PURE__ */ e(
385
- X,
392
+ /* @__PURE__ */ e(fe, { source: n.source, isSelected: a }),
393
+ l && /* @__PURE__ */ e(
394
+ he,
386
395
  {
387
- keybinding: m,
388
- isSelected: r,
396
+ keybinding: l,
397
+ isSelected: a,
389
398
  external: d
390
399
  }
391
400
  )
@@ -394,120 +403,98 @@ const V = n.memo(
394
403
  );
395
404
  }
396
405
  )
397
- );
398
- V.displayName = "CommandPaletteItem";
399
- function X({
400
- keybinding: o,
401
- isSelected: a,
402
- external: r,
403
- className: i,
404
- ...m
405
- }) {
406
- const f = de(o);
406
+ ), he = b("CommandPaletteShortcut", ({ keybinding: r, isSelected: n, external: a, className: i, ...l }, x) => {
407
+ const u = ne(r);
407
408
  return /* @__PURE__ */ e(
408
409
  "span",
409
410
  {
410
- className: l("ms-auto flex items-center gap-0.5 shrink-0", i),
411
+ ref: x,
412
+ className: c("ms-auto flex items-center gap-0.5 shrink-0", i),
411
413
  "data-command-palette-shortcut": !0,
412
- ...m,
413
- children: f.map((p, d) => /* @__PURE__ */ e(
414
+ ...l,
415
+ children: u.map((d, S) => /* @__PURE__ */ e(
414
416
  "kbd",
415
417
  {
416
- className: l(
418
+ className: c(
417
419
  "inline-flex min-w-[20px] items-center justify-center rounded px-1 h-[20px] text-[10px] font-mono leading-none",
418
420
  "transition-[color,background-color,border-color] duration-150 ease-out",
419
- a ? "bg-canvas-elevated/20 text-brand-foreground border border-brand-foreground/30" : r ? "bg-canvas-muted text-stroke-hairline border border-stroke-hairline" : "bg-canvas-muted text-secondary-foreground border border-stroke-hairline"
421
+ n ? "bg-canvas-elevated/20 text-brand-foreground border border-brand-foreground/30" : a ? "bg-canvas-muted text-stroke-hairline border border-stroke-hairline" : "bg-canvas-muted text-secondary-foreground border border-stroke-hairline"
420
422
  ),
421
- children: p
423
+ children: d
422
424
  },
423
- `${p}-${d}`
425
+ `${d}-${S}`
424
426
  ))
425
427
  }
426
428
  );
427
- }
428
- X.displayName = "CommandPaletteShortcut";
429
- function J({
430
- className: o,
431
- ...a
432
- }) {
433
- const { emptyTitle: r, emptyDescription: i } = n.useContext(R);
434
- return /* @__PURE__ */ c(
429
+ }), ge = b("CommandPaletteEmpty", ({ className: r, ...n }, a) => {
430
+ const { emptyTitle: i, emptyDescription: l } = o.useContext(I);
431
+ return /* @__PURE__ */ m(
435
432
  "div",
436
433
  {
434
+ ref: a,
437
435
  "data-command-palette-empty": !0,
438
- className: l(
436
+ className: c(
439
437
  "flex flex-col items-center justify-center py-12 text-center text-sm text-secondary-foreground",
440
- o
438
+ r
441
439
  ),
442
- ...a,
440
+ ...n,
443
441
  children: [
444
- /* @__PURE__ */ e(_, { className: "h-8 w-8 mb-3 text-stroke-hairline" }),
445
- /* @__PURE__ */ e("p", { className: "font-medium", children: r }),
446
- /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: i })
442
+ /* @__PURE__ */ e(B, { className: "h-8 w-8 mb-3 text-stroke-hairline" }),
443
+ /* @__PURE__ */ e("p", { className: "font-medium", children: i }),
444
+ /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: l })
447
445
  ]
448
446
  }
449
447
  );
450
- }
451
- J.displayName = "CommandPaletteEmpty";
452
- function W({
453
- className: o,
454
- ...a
455
- }) {
456
- return /* @__PURE__ */ e(
457
- "div",
458
- {
459
- "data-command-palette-separator": !0,
460
- className: l("h-px bg-stroke-hairline mx-2", o),
461
- ...a
462
- }
463
- );
464
- }
465
- W.displayName = "CommandPaletteSeparator";
466
- function Y({
467
- className: o,
468
- ...a
469
- }) {
470
- const { navigateLabel: r, runLabel: i, closeLabel: m, configureShortcutsLabel: f } = n.useContext(R);
471
- return /* @__PURE__ */ c(
448
+ }), ye = b("CommandPaletteSeparator", ({ className: r, ...n }, a) => /* @__PURE__ */ e(
449
+ "div",
450
+ {
451
+ ref: a,
452
+ "data-command-palette-separator": !0,
453
+ className: c("h-px bg-stroke-hairline mx-2", r),
454
+ ...n
455
+ }
456
+ )), be = b("CommandPaletteFooter", ({ className: r, ...n }, a) => {
457
+ const { navigateLabel: i, runLabel: l, closeLabel: x, configureShortcutsLabel: u } = o.useContext(I);
458
+ return /* @__PURE__ */ m(
472
459
  "div",
473
460
  {
461
+ ref: a,
474
462
  "data-command-palette-footer": !0,
475
- className: l(
463
+ className: c(
476
464
  "flex items-center gap-4 border-t border-stroke-hairline px-4 py-2 text-[11px] text-secondary-foreground",
477
- o
465
+ r
478
466
  ),
479
- ...a,
467
+ ...n,
480
468
  children: [
481
- /* @__PURE__ */ c("span", { className: "inline-flex items-center gap-1", children: [
482
- /* @__PURE__ */ e(v, { keys: ["↑"], size: "sm", variant: "muted" }),
483
- /* @__PURE__ */ e(v, { keys: ["↓"], size: "sm", variant: "muted" }),
484
- /* @__PURE__ */ e("span", { children: r })
485
- ] }),
486
- /* @__PURE__ */ c("span", { className: "inline-flex items-center gap-1", children: [
487
- /* @__PURE__ */ e(v, { keys: ["↵"], size: "sm", variant: "muted" }),
469
+ /* @__PURE__ */ m("span", { className: "inline-flex items-center gap-1", children: [
470
+ /* @__PURE__ */ e(P, { keys: ["↑"], size: "sm", variant: "muted" }),
471
+ /* @__PURE__ */ e(P, { keys: ["↓"], size: "sm", variant: "muted" }),
488
472
  /* @__PURE__ */ e("span", { children: i })
489
473
  ] }),
490
- /* @__PURE__ */ c("span", { className: "inline-flex items-center gap-1", children: [
491
- /* @__PURE__ */ e(v, { keys: ["Escape"], size: "sm", variant: "muted" }),
492
- /* @__PURE__ */ e("span", { children: m })
474
+ /* @__PURE__ */ m("span", { className: "inline-flex items-center gap-1", children: [
475
+ /* @__PURE__ */ e(P, { keys: [""], size: "sm", variant: "muted" }),
476
+ /* @__PURE__ */ e("span", { children: l })
493
477
  ] }),
494
- f && /* @__PURE__ */ c("span", { className: "ms-auto inline-flex items-center gap-1", children: [
495
- /* @__PURE__ */ e(v, { keybinding: { key: "k", alt: !0 }, size: "sm", variant: "muted" }),
496
- /* @__PURE__ */ e("span", { children: f })
478
+ /* @__PURE__ */ m("span", { className: "inline-flex items-center gap-1", children: [
479
+ /* @__PURE__ */ e(P, { keys: ["Escape"], size: "sm", variant: "muted" }),
480
+ /* @__PURE__ */ e("span", { children: x })
481
+ ] }),
482
+ u && /* @__PURE__ */ m("span", { className: "ms-auto inline-flex items-center gap-1", children: [
483
+ /* @__PURE__ */ e(P, { keybinding: { key: "k", alt: !0 }, size: "sm", variant: "muted" }),
484
+ /* @__PURE__ */ e("span", { children: u })
497
485
  ] })
498
486
  ]
499
487
  }
500
488
  );
501
- }
502
- Y.displayName = "CommandPaletteFooter";
489
+ });
503
490
  export {
504
- pe as CommandPalette,
505
- J as CommandPaletteEmpty,
506
- Y as CommandPaletteFooter,
507
- L as CommandPaletteGroup,
508
- B as CommandPaletteInput,
509
- V as CommandPaletteItem,
510
- H as CommandPaletteList,
511
- W as CommandPaletteSeparator,
512
- X as CommandPaletteShortcut
491
+ ce as CommandPalette,
492
+ ge as CommandPaletteEmpty,
493
+ be as CommandPaletteFooter,
494
+ pe as CommandPaletteGroup,
495
+ me as CommandPaletteInput,
496
+ xe as CommandPaletteItem,
497
+ ue as CommandPaletteList,
498
+ ye as CommandPaletteSeparator,
499
+ he as CommandPaletteShortcut
513
500
  };