@devalok/shilp-sutra 0.28.0 → 0.29.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/dist/_chunks/badge-group.js +299 -0
- package/dist/_chunks/framer.js +1915 -1980
- package/dist/_chunks/keybinding.js +4 -5
- package/dist/_chunks/primitives.js +3198 -3272
- package/dist/_chunks/sonner.js +29 -31
- package/dist/_chunks/stat-row.js +110 -131
- package/dist/_chunks/tiptap.js +42 -78
- package/dist/_chunks/tree-view.js +138 -149
- package/dist/_chunks/typing-indicator.js +565 -0
- package/dist/_chunks/use-calendar.js +416 -439
- package/dist/_chunks/vendor-client.js +5 -5
- package/dist/_chunks/vendor-utils.js +5 -5
- package/dist/ai/block-renderer.js +22 -22
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/command-bar.d.ts.map +1 -1
- package/dist/ai/command-bar.js +241 -263
- package/dist/ai/conversation.d.ts.map +1 -1
- package/dist/ai/conversation.js +87 -107
- package/dist/composed/activity-feed.d.ts +2 -0
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js +118 -90
- package/dist/composed/avatar-group.d.ts +1 -0
- package/dist/composed/avatar-group.d.ts.map +1 -1
- package/dist/composed/avatar-group.js +91 -67
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +29 -28
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +99 -113
- package/dist/composed/content-card.js +1 -1
- package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.js +29 -28
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js +30 -27
- package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
- package/dist/composed/file-preview.d.ts.map +1 -1
- package/dist/composed/file-preview.js +261 -271
- package/dist/composed/filter-bar.d.ts.map +1 -1
- package/dist/composed/filter-bar.js +49 -48
- package/dist/composed/form-section.d.ts.map +1 -1
- package/dist/composed/form-section.js +12 -11
- package/dist/composed/global-loading.js +1 -1
- package/dist/composed/index.js +63 -63
- package/dist/composed/inline-edit.d.ts.map +1 -1
- package/dist/composed/inline-edit.js +55 -54
- package/dist/composed/markdown-viewer.d.ts.map +1 -1
- package/dist/composed/markdown-viewer.js +44 -43
- package/dist/composed/master-detail.d.ts.map +1 -1
- package/dist/composed/master-detail.js +35 -34
- package/dist/composed/multi-select-popover.d.ts.map +1 -1
- package/dist/composed/multi-select-popover.js +73 -73
- package/dist/composed/page-header.d.ts.map +1 -1
- package/dist/composed/page-header.js +31 -37
- package/dist/composed/priority-indicator.d.ts.map +1 -1
- package/dist/composed/priority-indicator.js +37 -36
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +287 -306
- package/dist/composed/schedule-view.js +62 -62
- package/dist/composed/status-badge.d.ts +4 -2
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +58 -45
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +93 -93
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +21 -20
- package/dist/shell/index.js +18 -18
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +96 -95
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +82 -85
- package/dist/shell/sidebar.js +59 -60
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +103 -103
- package/dist/tailwind/index.cjs +37 -4
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +38 -5
- package/dist/tokens/primitives.css +10 -0
- package/dist/tokens/semantic.css +70 -7
- package/dist/ui/accordion.d.ts +5 -2
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +44 -39
- package/dist/ui/alert-dialog.js +57 -57
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +30 -29
- package/dist/ui/aspect-ratio.js +4 -4
- package/dist/ui/autocomplete.js +56 -56
- package/dist/ui/avatar.js +2 -2
- package/dist/ui/badge-group.d.ts +22 -0
- package/dist/ui/badge-group.d.ts.map +1 -0
- package/dist/ui/badge-group.js +8 -0
- package/dist/ui/badge-indicator.d.ts +32 -0
- package/dist/ui/badge-indicator.d.ts.map +1 -0
- package/dist/ui/badge-indicator.js +54 -0
- package/dist/ui/badge.d.ts +27 -24
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +13 -129
- package/dist/ui/banner.d.ts +1 -1
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +27 -26
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +37 -36
- package/dist/ui/button-group.d.ts +12 -6
- package/dist/ui/button-group.d.ts.map +1 -1
- package/dist/ui/button-group.js +18 -18
- package/dist/ui/button-processing.d.ts +15 -0
- package/dist/ui/button-processing.d.ts.map +1 -0
- package/dist/ui/button-processing.js +77 -0
- package/dist/ui/button.d.ts +50 -25
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +243 -127
- package/dist/ui/card.js +20 -21
- package/dist/ui/charts/index.js +499 -508
- package/dist/ui/chat/date-separator.d.ts +12 -0
- package/dist/ui/chat/date-separator.d.ts.map +1 -0
- package/dist/ui/chat/index.d.ts +9 -0
- package/dist/ui/chat/index.d.ts.map +1 -0
- package/dist/ui/chat/index.js +12 -0
- package/dist/ui/chat/message-input.d.ts +16 -0
- package/dist/ui/chat/message-input.d.ts.map +1 -0
- package/dist/ui/chat/message-list.d.ts +24 -0
- package/dist/ui/chat/message-list.d.ts.map +1 -0
- package/dist/ui/chat/message.d.ts +108 -0
- package/dist/ui/chat/message.d.ts.map +1 -0
- package/dist/ui/chat/system-message.d.ts +11 -0
- package/dist/ui/chat/system-message.d.ts.map +1 -0
- package/dist/ui/chat/typing-indicator.d.ts +14 -0
- package/dist/ui/chat/typing-indicator.d.ts.map +1 -0
- package/dist/ui/chat/unread-separator.d.ts +12 -0
- package/dist/ui/chat/unread-separator.d.ts.map +1 -0
- package/dist/ui/checkbox.js +18 -18
- package/dist/ui/chip.d.ts +13 -62
- package/dist/ui/chip.d.ts.map +1 -1
- package/dist/ui/chip.js +10 -109
- package/dist/ui/collapsible.js +4 -4
- package/dist/ui/color-input.js +134 -134
- package/dist/ui/color-swatch.js +11 -11
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +74 -80
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +86 -85
- package/dist/ui/data-table-toolbar.d.ts.map +1 -1
- package/dist/ui/data-table-toolbar.js +51 -57
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +268 -296
- package/dist/ui/devalok-grain.d.ts +81 -0
- package/dist/ui/devalok-grain.d.ts.map +1 -0
- package/dist/ui/devalok-grain.js +69 -0
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +73 -72
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +93 -92
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +82 -82
- package/dist/ui/hover-card.js +29 -29
- package/dist/ui/icon-button.d.ts +7 -7
- package/dist/ui/icon-button.d.ts.map +1 -1
- package/dist/ui/icon-context.d.ts +15 -0
- package/dist/ui/icon-context.d.ts.map +1 -0
- package/dist/ui/icon-context.js +20 -0
- package/dist/ui/icon-group.d.ts +22 -0
- package/dist/ui/icon-group.d.ts.map +1 -0
- package/dist/ui/icon-group.js +32 -0
- package/dist/ui/icon.d.ts +57 -0
- package/dist/ui/icon.d.ts.map +1 -0
- package/dist/ui/icon.js +122 -0
- package/dist/ui/index.d.ts +8 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +351 -329
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +21 -20
- package/dist/ui/input.d.ts +32 -11
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +149 -44
- package/dist/ui/lib/motion.d.ts +2 -0
- package/dist/ui/lib/motion.d.ts.map +1 -1
- package/dist/ui/lib/motion.js +13 -11
- package/dist/ui/lib/utils.js +1 -1
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +87 -86
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +23 -28
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +54 -53
- package/dist/ui/pagination.d.ts.map +1 -1
- package/dist/ui/pagination.js +45 -44
- package/dist/ui/popover.js +28 -28
- package/dist/ui/progress.d.ts +3 -1
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +43 -39
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +47 -60
- package/dist/ui/segmented-control.js +1 -1
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +54 -53
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +46 -45
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +196 -193
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/spinner.js +74 -74
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +85 -86
- package/dist/ui/switch.d.ts +3 -0
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +41 -27
- package/dist/ui/tabs.js +43 -43
- package/dist/ui/text.js +1 -1
- package/dist/ui/textarea.js +10 -10
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +169 -169
- package/dist/ui/toggle.js +4 -4
- package/dist/ui/tooltip.js +40 -40
- package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
- package/docs/components/_header.md +4 -4
- package/docs/components/composed/activity-feed.md +7 -0
- package/docs/components/composed/avatar-group.md +8 -5
- package/docs/components/composed/status-badge.md +14 -1
- package/docs/components/ui/accordion.md +5 -2
- package/docs/components/ui/badge-group.md +38 -0
- package/docs/components/ui/badge-indicator.md +40 -0
- package/docs/components/ui/badge.md +36 -5
- package/docs/components/ui/button-processing.md +15 -0
- package/docs/components/ui/button.md +40 -11
- package/docs/components/ui/chat.md +214 -0
- package/docs/components/ui/data-table.md +3 -0
- package/docs/components/ui/devalok-grain.md +55 -0
- package/docs/components/ui/icon-button.md +12 -5
- package/docs/components/ui/icon-context.md +38 -0
- package/docs/components/ui/icon-group.md +36 -0
- package/docs/components/ui/icon.md +47 -0
- package/docs/components/ui/input.md +32 -6
- package/docs/components/ui/progress.md +5 -0
- package/docs/components/ui/spinner.md +3 -0
- package/docs/components/ui/switch.md +13 -0
- package/llms-full.txt +666 -40
- package/llms.txt +37 -18
- package/package.json +7 -2
package/dist/ai/command-bar.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as r, jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { Dialog as
|
|
5
|
-
import { IconArrowUp as
|
|
2
|
+
import { jsxs as r, jsx as e, Fragment as De } from "react/jsx-runtime";
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
import { Dialog as _e, DialogPortal as Ae, DialogOverlay as Ee, DialogContentRaw as Me, DialogTitle as Re, DialogDescription as Se } from "../ui/dialog.js";
|
|
5
|
+
import { IconArrowUp as ze, IconArrowDown as Le, IconCornerDownLeft as le, IconSearch as Be, IconLoader2 as je, IconX as Fe } from "@tabler/icons-react";
|
|
6
|
+
import { Icon as v } from "../ui/icon.js";
|
|
6
7
|
import { cn as u } from "../ui/lib/utils.js";
|
|
7
|
-
import { springs as
|
|
8
|
-
import { VisuallyHidden as
|
|
9
|
-
import { u as
|
|
10
|
-
import { g as Pe, m as Ke, a as
|
|
8
|
+
import { springs as ue, tweens as Y } from "../ui/lib/motion.js";
|
|
9
|
+
import { VisuallyHidden as $e } from "../ui/visually-hidden.js";
|
|
10
|
+
import { u as fe } from "../_chunks/motion-provider.js";
|
|
11
|
+
import { g as Pe, m as Ke, a as Oe } from "../_chunks/keybinding.js";
|
|
11
12
|
import { m as x, A as Z } from "../_chunks/framer.js";
|
|
12
|
-
function
|
|
13
|
+
function Ve({
|
|
13
14
|
active: n,
|
|
14
|
-
rounded:
|
|
15
|
+
rounded: p,
|
|
15
16
|
reducedMotion: h,
|
|
16
|
-
children:
|
|
17
|
+
children: l
|
|
17
18
|
}) {
|
|
18
|
-
return n ? h ? /* @__PURE__ */
|
|
19
|
+
return n ? h ? /* @__PURE__ */ e("div", { className: u("p-[1.5px] bg-accent-9", p), children: l }) : /* @__PURE__ */ r(
|
|
19
20
|
x.div,
|
|
20
21
|
{
|
|
21
|
-
className: u("relative p-[1.5px]",
|
|
22
|
+
className: u("relative p-[1.5px]", p),
|
|
22
23
|
style: {
|
|
23
24
|
background: "linear-gradient(var(--gradient-angle, 0deg), #D33163, #9B5DE5, #C850C0, #D33163)",
|
|
24
25
|
backgroundSize: "300% 300%"
|
|
@@ -36,10 +37,10 @@ function qe({
|
|
|
36
37
|
}
|
|
37
38
|
},
|
|
38
39
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ e(
|
|
40
41
|
x.div,
|
|
41
42
|
{
|
|
42
|
-
className: u("absolute inset-0 -z-10",
|
|
43
|
+
className: u("absolute inset-0 -z-10", p),
|
|
43
44
|
style: {
|
|
44
45
|
background: "linear-gradient(var(--gradient-angle, 0deg), #D33163, #9B5DE5, #C850C0, #D33163)",
|
|
45
46
|
backgroundSize: "300% 300%",
|
|
@@ -55,30 +56,30 @@ function qe({
|
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
),
|
|
58
|
-
|
|
59
|
+
l
|
|
59
60
|
]
|
|
60
61
|
}
|
|
61
|
-
) : /* @__PURE__ */
|
|
62
|
+
) : /* @__PURE__ */ e(De, { children: l });
|
|
62
63
|
}
|
|
63
|
-
function
|
|
64
|
+
function qe(n) {
|
|
64
65
|
return n.filterValue ? n.filterValue : typeof n.label == "string" ? n.label : "";
|
|
65
66
|
}
|
|
66
|
-
function
|
|
67
|
+
function Qe(n) {
|
|
67
68
|
return typeof n.description == "string" ? n.description : "";
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
+
function Te({
|
|
70
71
|
placeholders: n,
|
|
71
|
-
interval:
|
|
72
|
+
interval: p,
|
|
72
73
|
paused: h
|
|
73
74
|
}) {
|
|
74
|
-
const [
|
|
75
|
-
return
|
|
75
|
+
const [l, z] = s.useState(0), { reducedMotion: K } = fe();
|
|
76
|
+
return s.useEffect(() => {
|
|
76
77
|
if (h || n.length <= 1) return;
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
return () => clearInterval(
|
|
81
|
-
}, [h, n.length,
|
|
78
|
+
const O = setInterval(() => {
|
|
79
|
+
z((d) => (d + 1) % n.length);
|
|
80
|
+
}, p);
|
|
81
|
+
return () => clearInterval(O);
|
|
82
|
+
}, [h, n.length, p]), K ? /* @__PURE__ */ e("span", { className: "pointer-events-none absolute text-surface-fg-subtle", children: n[l] }) : /* @__PURE__ */ e(Z, { mode: "wait", children: /* @__PURE__ */ e(
|
|
82
83
|
x.span,
|
|
83
84
|
{
|
|
84
85
|
initial: { opacity: 0, y: -4 },
|
|
@@ -86,137 +87,132 @@ function Ge({
|
|
|
86
87
|
exit: { opacity: 0, y: 4 },
|
|
87
88
|
transition: Y.fade,
|
|
88
89
|
className: "pointer-events-none absolute text-surface-fg-subtle",
|
|
89
|
-
children: n[
|
|
90
|
+
children: n[l]
|
|
90
91
|
},
|
|
91
|
-
n[
|
|
92
|
+
n[l]
|
|
92
93
|
) });
|
|
93
94
|
}
|
|
94
|
-
const
|
|
95
|
+
const Ge = s.forwardRef(
|
|
95
96
|
function({
|
|
96
|
-
onSubmit:
|
|
97
|
+
onSubmit: p,
|
|
97
98
|
state: h = "idle",
|
|
98
|
-
groups:
|
|
99
|
-
onSearch:
|
|
100
|
-
emptyMessage:
|
|
101
|
-
emptyState:
|
|
102
|
-
variant:
|
|
103
|
-
placeholder:
|
|
104
|
-
placeholderInterval:
|
|
99
|
+
groups: l = [],
|
|
100
|
+
onSearch: z,
|
|
101
|
+
emptyMessage: K = "No results found.",
|
|
102
|
+
emptyState: O,
|
|
103
|
+
variant: d = "hero",
|
|
104
|
+
placeholder: L = "Ask anything...",
|
|
105
|
+
placeholderInterval: me = 5e3,
|
|
105
106
|
greeting: ee,
|
|
106
|
-
hints:
|
|
107
|
+
hints: V,
|
|
107
108
|
agentName: te,
|
|
108
|
-
agentIcon:
|
|
109
|
+
agentIcon: Ue,
|
|
109
110
|
open: se,
|
|
110
|
-
defaultOpen:
|
|
111
|
-
onOpenChange:
|
|
112
|
-
keybinding:
|
|
113
|
-
disabled:
|
|
114
|
-
maxHeight:
|
|
115
|
-
children:
|
|
116
|
-
className:
|
|
117
|
-
...
|
|
118
|
-
},
|
|
119
|
-
const U = se !== void 0, [
|
|
120
|
-
|
|
121
|
-
const
|
|
122
|
-
(
|
|
123
|
-
const
|
|
124
|
-
U ||
|
|
111
|
+
defaultOpen: pe,
|
|
112
|
+
onOpenChange: ae,
|
|
113
|
+
keybinding: E = "mod+j",
|
|
114
|
+
disabled: B = !1,
|
|
115
|
+
maxHeight: q = "320px",
|
|
116
|
+
children: N,
|
|
117
|
+
className: Q,
|
|
118
|
+
...T
|
|
119
|
+
}, G) {
|
|
120
|
+
const U = se !== void 0, [be, ge] = s.useState(pe ?? !1), M = U ? se : be, re = s.useRef(M);
|
|
121
|
+
re.current = M;
|
|
122
|
+
const w = s.useCallback(
|
|
123
|
+
(t) => {
|
|
124
|
+
const a = typeof t == "function" ? t(re.current) : t;
|
|
125
|
+
U || ge(a), ae?.(a);
|
|
125
126
|
},
|
|
126
|
-
[U,
|
|
127
|
-
), [
|
|
128
|
-
() => Array.isArray(
|
|
129
|
-
[
|
|
130
|
-
),
|
|
131
|
-
if (!
|
|
132
|
-
if (!
|
|
133
|
-
const
|
|
134
|
-
return
|
|
135
|
-
...
|
|
136
|
-
items:
|
|
137
|
-
(
|
|
127
|
+
[U, ae]
|
|
128
|
+
), [o, k] = s.useState(""), [f, C] = s.useState(-1), [ne, xe] = s.useState(""), [I, oe] = s.useState(!1), [H, he] = s.useState(!1), R = s.useRef(null), ie = s.useRef(null), J = s.useId(), de = `command-bar-listbox-${J}`, { reducedMotion: b } = fe(), j = { duration: 0 }, ye = s.useMemo(() => Pe(), []), F = s.useMemo(
|
|
129
|
+
() => Array.isArray(L) ? L : [L],
|
|
130
|
+
[L]
|
|
131
|
+
), c = l.length > 0, y = s.useMemo(() => {
|
|
132
|
+
if (!c) return [];
|
|
133
|
+
if (!o.trim()) return l;
|
|
134
|
+
const t = o.toLowerCase();
|
|
135
|
+
return l.map((a) => ({
|
|
136
|
+
...a,
|
|
137
|
+
items: a.items.filter(
|
|
138
|
+
(g) => qe(g).toLowerCase().includes(t) || Qe(g).toLowerCase().includes(t)
|
|
138
139
|
)
|
|
139
|
-
})).filter((
|
|
140
|
-
}, [
|
|
141
|
-
() =>
|
|
142
|
-
[
|
|
143
|
-
),
|
|
144
|
-
const
|
|
145
|
-
let
|
|
146
|
-
for (const
|
|
147
|
-
for (const
|
|
148
|
-
|
|
149
|
-
return
|
|
150
|
-
}, [
|
|
151
|
-
|
|
152
|
-
if (
|
|
153
|
-
const
|
|
154
|
-
function
|
|
155
|
-
for (const
|
|
156
|
-
if (Ke(
|
|
157
|
-
|
|
140
|
+
})).filter((a) => a.items.length > 0);
|
|
141
|
+
}, [l, o, c]), m = s.useMemo(
|
|
142
|
+
() => y.flatMap((t) => t.items),
|
|
143
|
+
[y]
|
|
144
|
+
), ve = s.useMemo(() => {
|
|
145
|
+
const t = /* @__PURE__ */ new Map();
|
|
146
|
+
let a = 0;
|
|
147
|
+
for (const g of y)
|
|
148
|
+
for (const i of g.items)
|
|
149
|
+
t.set(i.id, a++);
|
|
150
|
+
return t;
|
|
151
|
+
}, [y]), Ne = typeof q == "number" ? `${q}px` : q;
|
|
152
|
+
s.useEffect(() => {
|
|
153
|
+
if (d !== "floating" || E === !1) return;
|
|
154
|
+
const t = Array.isArray(E) ? E : [E];
|
|
155
|
+
function a(g) {
|
|
156
|
+
for (const i of t)
|
|
157
|
+
if (Ke(g, i)) {
|
|
158
|
+
g.preventDefault(), w((A) => !A);
|
|
158
159
|
return;
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
|
-
return document.addEventListener("keydown",
|
|
162
|
-
}, [
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
(e = E.current) == null || e.focus();
|
|
162
|
+
return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
|
|
163
|
+
}, [d, E, w]), s.useEffect(() => {
|
|
164
|
+
d === "floating" && M && (k(""), C(-1), requestAnimationFrame(() => {
|
|
165
|
+
R.current?.focus();
|
|
166
166
|
}));
|
|
167
|
-
}, [
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
}, [i, F, m]), Ne = (e) => {
|
|
180
|
-
var s;
|
|
181
|
-
switch (e.key) {
|
|
167
|
+
}, [d, M]), s.useEffect(() => {
|
|
168
|
+
if (f < 0) return;
|
|
169
|
+
ie.current?.querySelector(
|
|
170
|
+
`[data-command-index="${f}"]`
|
|
171
|
+
)?.scrollIntoView({ block: "nearest" });
|
|
172
|
+
}, [f]);
|
|
173
|
+
const we = (t) => {
|
|
174
|
+
k(t), C(c && t.trim() ? 0 : -1), z?.(t);
|
|
175
|
+
}, ce = s.useCallback(() => {
|
|
176
|
+
!o.trim() || B || (xe(o), p?.(o));
|
|
177
|
+
}, [o, B, p]), ke = (t) => {
|
|
178
|
+
switch (t.key) {
|
|
182
179
|
case "ArrowDown": {
|
|
183
|
-
if (!
|
|
184
|
-
|
|
185
|
-
(
|
|
180
|
+
if (!c || m.length === 0) return;
|
|
181
|
+
t.preventDefault(), C(
|
|
182
|
+
(a) => a < m.length - 1 ? a + 1 : 0
|
|
186
183
|
);
|
|
187
184
|
break;
|
|
188
185
|
}
|
|
189
186
|
case "ArrowUp": {
|
|
190
|
-
|
|
191
|
-
(
|
|
192
|
-
)) : !
|
|
187
|
+
c && m.length > 0 ? (t.preventDefault(), C(
|
|
188
|
+
(a) => a > 0 ? a - 1 : m.length - 1
|
|
189
|
+
)) : !c && !o && ne && (t.preventDefault(), k(ne));
|
|
193
190
|
break;
|
|
194
191
|
}
|
|
195
192
|
case "Enter": {
|
|
196
|
-
|
|
193
|
+
t.preventDefault(), t.metaKey || t.ctrlKey ? ce() : c && f >= 0 && m[f] ? (m[f].onSelect(), d === "floating" && w(!1)) : ce();
|
|
197
194
|
break;
|
|
198
195
|
}
|
|
199
196
|
case "Escape": {
|
|
200
|
-
|
|
197
|
+
t.preventDefault(), h === "responded" ? k("") : d === "floating" ? w(!1) : R.current?.blur();
|
|
201
198
|
break;
|
|
202
199
|
}
|
|
203
200
|
}
|
|
204
|
-
},
|
|
205
|
-
|
|
206
|
-
k(""), C(-1), (e = E.current) == null || e.focus();
|
|
201
|
+
}, Ce = () => {
|
|
202
|
+
k(""), C(-1), R.current?.focus();
|
|
207
203
|
};
|
|
208
|
-
|
|
204
|
+
s.useEffect(() => {
|
|
209
205
|
if (H) {
|
|
210
|
-
const
|
|
211
|
-
return () => clearTimeout(
|
|
206
|
+
const t = setTimeout(() => he(!1), 500);
|
|
207
|
+
return () => clearTimeout(t);
|
|
212
208
|
}
|
|
213
|
-
}, [H]),
|
|
214
|
-
const
|
|
215
|
-
|
|
209
|
+
}, [H]), b || ue.snappy;
|
|
210
|
+
const $ = b ? j : Y.fade, S = b ? { opacity: 1, scale: 1, y: 0 } : void 0, D = d === "inline", _ = h === "processing", Ie = h === "responded", W = () => /* @__PURE__ */ e(
|
|
211
|
+
Ve,
|
|
216
212
|
{
|
|
217
213
|
active: _,
|
|
218
214
|
rounded: D ? "rounded-ds-md" : "rounded-ds-lg",
|
|
219
|
-
reducedMotion:
|
|
215
|
+
reducedMotion: b,
|
|
220
216
|
children: /* @__PURE__ */ r(
|
|
221
217
|
"div",
|
|
222
218
|
{
|
|
@@ -228,50 +224,51 @@ const Se = a.forwardRef(
|
|
|
228
224
|
H && "animate-shake"
|
|
229
225
|
),
|
|
230
226
|
children: [
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
|
|
227
|
+
/* @__PURE__ */ e(
|
|
228
|
+
v,
|
|
233
229
|
{
|
|
230
|
+
icon: Be,
|
|
231
|
+
size: D ? "xs" : "sm",
|
|
232
|
+
stroke: "light",
|
|
234
233
|
className: u(
|
|
235
234
|
"shrink-0 transition-colors duration-fast-02 ease-productive-standard",
|
|
236
|
-
D ? "h-ico-xs w-ico-xs" : "h-ico-sm w-ico-sm",
|
|
237
235
|
I ? "text-accent-9" : "text-surface-fg-subtle"
|
|
238
|
-
)
|
|
239
|
-
stroke: 1.5
|
|
236
|
+
)
|
|
240
237
|
}
|
|
241
238
|
),
|
|
242
239
|
/* @__PURE__ */ r("div", { className: "relative flex flex-1 items-center", children: [
|
|
243
|
-
!
|
|
244
|
-
|
|
240
|
+
!o && !I && F.length > 1 && /* @__PURE__ */ e(
|
|
241
|
+
Te,
|
|
245
242
|
{
|
|
246
|
-
placeholders:
|
|
247
|
-
interval:
|
|
248
|
-
paused: I || !!
|
|
243
|
+
placeholders: F,
|
|
244
|
+
interval: me,
|
|
245
|
+
paused: I || !!o
|
|
249
246
|
}
|
|
250
247
|
),
|
|
251
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ e(
|
|
252
249
|
"input",
|
|
253
250
|
{
|
|
254
|
-
ref:
|
|
255
|
-
value:
|
|
256
|
-
onChange: (
|
|
257
|
-
onFocus: () =>
|
|
258
|
-
onBlur: () =>
|
|
259
|
-
onKeyDown:
|
|
260
|
-
placeholder:
|
|
251
|
+
ref: R,
|
|
252
|
+
value: o,
|
|
253
|
+
onChange: (t) => we(t.target.value),
|
|
254
|
+
onFocus: () => oe(!0),
|
|
255
|
+
onBlur: () => oe(!1),
|
|
256
|
+
onKeyDown: ke,
|
|
257
|
+
placeholder: F.length === 1 || I ? F[0] : "",
|
|
261
258
|
readOnly: _,
|
|
262
|
-
disabled:
|
|
259
|
+
disabled: B,
|
|
263
260
|
role: "combobox",
|
|
264
|
-
"aria-expanded":
|
|
265
|
-
"aria-controls":
|
|
266
|
-
"aria-activedescendant":
|
|
267
|
-
"aria-autocomplete":
|
|
261
|
+
"aria-expanded": c && m.length > 0,
|
|
262
|
+
"aria-controls": c ? de : void 0,
|
|
263
|
+
"aria-activedescendant": c && f >= 0 && m[f] ? `command-bar-item-${J}-${m[f].id}` : void 0,
|
|
264
|
+
"aria-autocomplete": c ? "list" : void 0,
|
|
268
265
|
"aria-label": te ? `Ask ${te}` : "AI Command Bar",
|
|
269
266
|
className: u(
|
|
270
267
|
"flex-1 bg-transparent text-surface-fg outline-none",
|
|
271
268
|
"placeholder:text-surface-fg-subtle",
|
|
272
269
|
D ? "h-9 text-ds-sm" : "h-12 text-ds-base",
|
|
273
270
|
_ && "cursor-wait",
|
|
274
|
-
|
|
271
|
+
B && "cursor-not-allowed opacity-50"
|
|
275
272
|
),
|
|
276
273
|
autoComplete: "off",
|
|
277
274
|
autoCorrect: "off",
|
|
@@ -279,43 +276,41 @@ const Se = a.forwardRef(
|
|
|
279
276
|
}
|
|
280
277
|
)
|
|
281
278
|
] }),
|
|
282
|
-
_ ? /* @__PURE__ */
|
|
283
|
-
|
|
279
|
+
_ ? /* @__PURE__ */ e("span", { "data-testid": "command-bar-spinner", className: "shrink-0", children: /* @__PURE__ */ e(
|
|
280
|
+
v,
|
|
284
281
|
{
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
"data-testid": "command-bar-spinner"
|
|
282
|
+
icon: je,
|
|
283
|
+
size: D ? "xs" : "sm",
|
|
284
|
+
stroke: "light",
|
|
285
|
+
animate: "spin",
|
|
286
|
+
className: "text-accent-9"
|
|
291
287
|
}
|
|
292
|
-
) :
|
|
288
|
+
) }) : Ie ? /* @__PURE__ */ e(
|
|
293
289
|
"button",
|
|
294
290
|
{
|
|
295
291
|
type: "button",
|
|
296
|
-
onClick:
|
|
292
|
+
onClick: Ce,
|
|
297
293
|
className: "shrink-0 rounded-ds-sm p-ds-01 text-surface-fg-subtle transition-colors duration-fast-01 hover:bg-surface-raised-hover hover:text-surface-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9",
|
|
298
294
|
"aria-label": "Clear",
|
|
299
|
-
children: /* @__PURE__ */
|
|
300
|
-
|
|
295
|
+
children: /* @__PURE__ */ e(
|
|
296
|
+
v,
|
|
301
297
|
{
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
stroke: 1.5
|
|
298
|
+
icon: Fe,
|
|
299
|
+
size: D ? "xs" : "sm",
|
|
300
|
+
stroke: "light"
|
|
306
301
|
}
|
|
307
302
|
)
|
|
308
303
|
}
|
|
309
|
-
) :
|
|
304
|
+
) : d === "hero" ? /* @__PURE__ */ e(Z, { children: !I && /* @__PURE__ */ r(
|
|
310
305
|
x.kbd,
|
|
311
306
|
{
|
|
312
|
-
initial:
|
|
307
|
+
initial: S ?? { opacity: 0 },
|
|
313
308
|
animate: { opacity: 1 },
|
|
314
|
-
exit:
|
|
315
|
-
transition:
|
|
309
|
+
exit: b ? void 0 : { opacity: 0 },
|
|
310
|
+
transition: $,
|
|
316
311
|
className: "hidden shrink-0 select-none rounded-ds-md border border-surface-border-strong bg-surface-raised px-ds-02b py-ds-01 text-ds-sm font-medium text-surface-fg-subtle shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)] sm:inline-flex",
|
|
317
312
|
children: [
|
|
318
|
-
|
|
313
|
+
Oe(ye),
|
|
319
314
|
"J"
|
|
320
315
|
]
|
|
321
316
|
}
|
|
@@ -324,153 +319,154 @@ const Se = a.forwardRef(
|
|
|
324
319
|
}
|
|
325
320
|
)
|
|
326
321
|
}
|
|
327
|
-
), X = () => !
|
|
322
|
+
), X = () => !c || !(m.length > 0 || o.trim() && y.length === 0) && !o.trim() ? null : /* @__PURE__ */ r(
|
|
328
323
|
"div",
|
|
329
324
|
{
|
|
330
|
-
ref:
|
|
331
|
-
id:
|
|
325
|
+
ref: ie,
|
|
326
|
+
id: de,
|
|
332
327
|
role: "listbox",
|
|
333
328
|
"aria-label": "Command results",
|
|
334
329
|
className: "overflow-y-auto px-ds-03 py-ds-03",
|
|
335
|
-
style: { maxHeight:
|
|
330
|
+
style: { maxHeight: Ne },
|
|
336
331
|
children: [
|
|
337
|
-
|
|
332
|
+
y.length === 0 && o.trim() && /* @__PURE__ */ e(
|
|
338
333
|
x.div,
|
|
339
334
|
{
|
|
340
|
-
initial:
|
|
335
|
+
initial: S ?? { opacity: 0 },
|
|
341
336
|
animate: { opacity: 1 },
|
|
342
|
-
transition:
|
|
337
|
+
transition: $,
|
|
343
338
|
className: "flex items-center justify-center py-ds-07",
|
|
344
|
-
children:
|
|
339
|
+
children: O ?? /* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg-subtle", children: K })
|
|
345
340
|
}
|
|
346
341
|
),
|
|
347
|
-
|
|
342
|
+
y.map((a, g) => /* @__PURE__ */ r(
|
|
348
343
|
x.div,
|
|
349
344
|
{
|
|
350
|
-
initial:
|
|
345
|
+
initial: S ?? { opacity: 0 },
|
|
351
346
|
animate: { opacity: 1 },
|
|
352
|
-
transition:
|
|
347
|
+
transition: b ? j : { ...Y.fade, delay: g * 0.06 },
|
|
353
348
|
className: "mb-ds-02",
|
|
354
349
|
children: [
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
|
|
357
|
-
const A =
|
|
350
|
+
/* @__PURE__ */ e("div", { className: "px-ds-03 pb-ds-02 pt-ds-03", children: /* @__PURE__ */ e("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle", children: a.label }) }),
|
|
351
|
+
a.items.map((i) => {
|
|
352
|
+
const A = ve.get(i.id) ?? 0, P = A === f;
|
|
358
353
|
return /* @__PURE__ */ r(
|
|
359
354
|
x.button,
|
|
360
355
|
{
|
|
361
|
-
id: `command-bar-item-${J}-${
|
|
356
|
+
id: `command-bar-item-${J}-${i.id}`,
|
|
362
357
|
type: "button",
|
|
363
358
|
role: "option",
|
|
364
|
-
"aria-selected":
|
|
359
|
+
"aria-selected": P,
|
|
365
360
|
"data-command-index": A,
|
|
366
|
-
initial:
|
|
361
|
+
initial: S ?? { opacity: 0, y: 4 },
|
|
367
362
|
animate: { opacity: 1, y: 0 },
|
|
368
|
-
transition:
|
|
363
|
+
transition: b ? j : { ...ue.snappy, delay: A * 0.03 },
|
|
369
364
|
onClick: () => {
|
|
370
|
-
|
|
365
|
+
i.onSelect(), d === "floating" && w(!1);
|
|
371
366
|
},
|
|
372
367
|
onMouseEnter: () => C(A),
|
|
373
368
|
className: u(
|
|
374
369
|
"flex w-full items-center gap-ds-04 rounded-ds-lg px-ds-03 py-ds-03 text-left transition-[color,background-color] duration-fast-02 ease-productive-standard",
|
|
375
|
-
|
|
370
|
+
P ? "bg-surface-raised-hover text-surface-fg" : "text-surface-fg-muted hover:bg-surface-raised"
|
|
376
371
|
),
|
|
377
372
|
children: [
|
|
378
|
-
|
|
373
|
+
i.icon && /* @__PURE__ */ e(
|
|
379
374
|
"span",
|
|
380
375
|
{
|
|
381
376
|
className: u(
|
|
382
377
|
"[&>svg]:h-ico-sm [&>svg]:w-ico-sm shrink-0 transition-colors duration-fast-02 ease-productive-standard",
|
|
383
|
-
|
|
378
|
+
P ? "text-accent-11" : "text-surface-fg-subtle"
|
|
384
379
|
),
|
|
385
380
|
"aria-hidden": "true",
|
|
386
|
-
children:
|
|
381
|
+
children: i.icon
|
|
387
382
|
}
|
|
388
383
|
),
|
|
389
384
|
/* @__PURE__ */ r("div", { className: "flex flex-1 flex-col", children: [
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
|
|
385
|
+
/* @__PURE__ */ e("span", { className: "text-ds-md", children: i.renderLabel ? i.renderLabel(o) : i.label }),
|
|
386
|
+
i.description && /* @__PURE__ */ e("span", { className: "text-ds-sm text-surface-fg-subtle", children: i.description })
|
|
392
387
|
] }),
|
|
393
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ e(Z, { children: P && /* @__PURE__ */ e(
|
|
394
389
|
x.span,
|
|
395
390
|
{
|
|
396
|
-
initial:
|
|
391
|
+
initial: b ? void 0 : { opacity: 0 },
|
|
397
392
|
animate: { opacity: 1 },
|
|
398
|
-
exit:
|
|
399
|
-
transition:
|
|
393
|
+
exit: b ? void 0 : { opacity: 0 },
|
|
394
|
+
transition: $,
|
|
400
395
|
className: "inline-flex shrink-0",
|
|
401
|
-
children: /* @__PURE__ */
|
|
402
|
-
|
|
396
|
+
children: /* @__PURE__ */ e(
|
|
397
|
+
v,
|
|
403
398
|
{
|
|
404
|
-
|
|
405
|
-
|
|
399
|
+
icon: le,
|
|
400
|
+
size: "sm",
|
|
401
|
+
stroke: "light",
|
|
402
|
+
className: "text-surface-fg-subtle"
|
|
406
403
|
}
|
|
407
404
|
)
|
|
408
405
|
}
|
|
409
406
|
) })
|
|
410
407
|
]
|
|
411
408
|
},
|
|
412
|
-
|
|
409
|
+
i.id
|
|
413
410
|
);
|
|
414
411
|
})
|
|
415
412
|
]
|
|
416
413
|
},
|
|
417
|
-
|
|
414
|
+
a.label
|
|
418
415
|
))
|
|
419
416
|
]
|
|
420
417
|
}
|
|
421
418
|
);
|
|
422
|
-
return
|
|
419
|
+
return d === "hero" ? /* @__PURE__ */ r(
|
|
423
420
|
"div",
|
|
424
421
|
{
|
|
425
|
-
ref:
|
|
422
|
+
ref: G,
|
|
426
423
|
role: "search",
|
|
427
424
|
className: u(
|
|
428
425
|
"bg-surface-raised rounded-ds-xl shadow-raised p-ds-07",
|
|
429
|
-
|
|
426
|
+
Q
|
|
430
427
|
),
|
|
431
|
-
...
|
|
428
|
+
...T,
|
|
432
429
|
children: [
|
|
433
|
-
ee && /* @__PURE__ */
|
|
430
|
+
ee && /* @__PURE__ */ e("p", { className: "text-ds-lg text-surface-fg-muted mb-ds-04", children: ee }),
|
|
434
431
|
W(),
|
|
435
432
|
X(),
|
|
436
|
-
|
|
433
|
+
V && V.length > 0 && /* @__PURE__ */ e("div", { className: "mt-ds-04 flex flex-wrap gap-ds-02b", children: V.map((t) => /* @__PURE__ */ e(
|
|
437
434
|
"button",
|
|
438
435
|
{
|
|
439
436
|
type: "button",
|
|
440
437
|
onClick: () => {
|
|
441
|
-
|
|
442
|
-
k(e), y == null || y(e), (s = E.current) == null || s.focus();
|
|
438
|
+
k(t), z?.(t), R.current?.focus();
|
|
443
439
|
},
|
|
444
440
|
className: "rounded-ds-md border border-surface-border-strong bg-surface-overlay px-ds-03 py-ds-01 text-ds-sm text-surface-fg-subtle transition-colors duration-fast-02 ease-productive-standard hover:bg-surface-raised-hover hover:text-surface-fg-muted",
|
|
445
|
-
children:
|
|
441
|
+
children: t
|
|
446
442
|
},
|
|
447
|
-
|
|
443
|
+
t
|
|
448
444
|
)) }),
|
|
449
|
-
|
|
445
|
+
N && /* @__PURE__ */ e("div", { className: "mt-ds-05", children: N })
|
|
450
446
|
]
|
|
451
447
|
}
|
|
452
|
-
) :
|
|
448
|
+
) : d === "inline" ? /* @__PURE__ */ r(
|
|
453
449
|
"div",
|
|
454
450
|
{
|
|
455
|
-
ref:
|
|
451
|
+
ref: G,
|
|
456
452
|
role: "search",
|
|
457
|
-
className: u("w-full",
|
|
458
|
-
...
|
|
453
|
+
className: u("w-full", Q),
|
|
454
|
+
...T,
|
|
459
455
|
children: [
|
|
460
456
|
W(),
|
|
461
457
|
X(),
|
|
462
|
-
|
|
458
|
+
N && /* @__PURE__ */ e("div", { className: "mt-ds-03", children: N })
|
|
463
459
|
]
|
|
464
460
|
}
|
|
465
|
-
) : /* @__PURE__ */
|
|
466
|
-
|
|
467
|
-
}, children: /* @__PURE__ */ r(
|
|
468
|
-
/* @__PURE__ */
|
|
461
|
+
) : /* @__PURE__ */ e(_e, { open: M, onOpenChange: (t) => {
|
|
462
|
+
w(t);
|
|
463
|
+
}, children: /* @__PURE__ */ r(Ae, { children: [
|
|
464
|
+
/* @__PURE__ */ e(Ee, { className: "fixed inset-0 z-overlay bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" }),
|
|
469
465
|
/* @__PURE__ */ r(
|
|
470
466
|
Me,
|
|
471
467
|
{
|
|
472
|
-
ref:
|
|
473
|
-
...
|
|
468
|
+
ref: G,
|
|
469
|
+
...T,
|
|
474
470
|
className: u(
|
|
475
471
|
"fixed left-1/2 top-[20%] z-modal w-full max-w-[560px] -translate-x-1/2",
|
|
476
472
|
"overflow-hidden rounded-ds-xl border border-surface-border-strong bg-surface-overlay shadow-overlay",
|
|
@@ -479,56 +475,38 @@ const Se = a.forwardRef(
|
|
|
479
475
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
480
476
|
"data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2",
|
|
481
477
|
"data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2",
|
|
482
|
-
|
|
478
|
+
Q
|
|
483
479
|
),
|
|
484
480
|
children: [
|
|
485
|
-
/* @__PURE__ */ r(
|
|
486
|
-
/* @__PURE__ */
|
|
487
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ r($e, { children: [
|
|
482
|
+
/* @__PURE__ */ e(Re, { children: "AI Command Bar" }),
|
|
483
|
+
/* @__PURE__ */ e(Se, { children: "Search commands or ask a question" })
|
|
488
484
|
] }),
|
|
489
|
-
/* @__PURE__ */
|
|
485
|
+
/* @__PURE__ */ e("div", { className: "p-ds-04", children: W() }),
|
|
490
486
|
X(),
|
|
491
|
-
|
|
487
|
+
N && /* @__PURE__ */ e("div", { className: "border-t border-surface-border-strong p-ds-04", children: N }),
|
|
492
488
|
/* @__PURE__ */ r(
|
|
493
489
|
x.div,
|
|
494
490
|
{
|
|
495
|
-
initial:
|
|
491
|
+
initial: S ?? { opacity: 0 },
|
|
496
492
|
animate: { opacity: 1 },
|
|
497
|
-
transition:
|
|
493
|
+
transition: $,
|
|
498
494
|
className: "flex items-center gap-ds-05 border-t border-surface-border-strong px-ds-05 py-ds-03",
|
|
499
495
|
children: [
|
|
500
|
-
|
|
496
|
+
c && /* @__PURE__ */ r("div", { className: "flex items-center gap-ds-02b", children: [
|
|
501
497
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-ds-01", children: [
|
|
502
|
-
/* @__PURE__ */
|
|
503
|
-
|
|
504
|
-
{
|
|
505
|
-
className: "h-ds-03 w-ds-03 text-surface-fg-subtle",
|
|
506
|
-
stroke: 2
|
|
507
|
-
}
|
|
508
|
-
) }),
|
|
509
|
-
/* @__PURE__ */ t("kbd", { className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-surface-border-strong bg-surface-raised shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)]", children: /* @__PURE__ */ t(
|
|
510
|
-
Be,
|
|
511
|
-
{
|
|
512
|
-
className: "h-ds-03 w-ds-03 text-surface-fg-subtle",
|
|
513
|
-
stroke: 2
|
|
514
|
-
}
|
|
515
|
-
) })
|
|
498
|
+
/* @__PURE__ */ e("kbd", { className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-surface-border-strong bg-surface-raised shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)]", children: /* @__PURE__ */ e(v, { icon: ze, size: "xs", className: "text-surface-fg-subtle" }) }),
|
|
499
|
+
/* @__PURE__ */ e("kbd", { className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-surface-border-strong bg-surface-raised shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)]", children: /* @__PURE__ */ e(v, { icon: Le, size: "xs", className: "text-surface-fg-subtle" }) })
|
|
516
500
|
] }),
|
|
517
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ e("span", { className: "text-ds-xs text-surface-fg-subtle", children: "Navigate" })
|
|
518
502
|
] }),
|
|
519
503
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-ds-02b", children: [
|
|
520
|
-
/* @__PURE__ */
|
|
521
|
-
|
|
522
|
-
{
|
|
523
|
-
className: "h-ds-03 w-ds-03 text-surface-fg-subtle",
|
|
524
|
-
stroke: 2
|
|
525
|
-
}
|
|
526
|
-
) }),
|
|
527
|
-
/* @__PURE__ */ t("span", { className: "text-ds-xs text-surface-fg-subtle", children: "Submit" })
|
|
504
|
+
/* @__PURE__ */ e("kbd", { className: "inline-flex h-[20px] items-center justify-center rounded-ds-md border border-surface-border-strong bg-surface-raised px-ds-02b shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)]", children: /* @__PURE__ */ e(v, { icon: le, size: "xs", className: "text-surface-fg-subtle" }) }),
|
|
505
|
+
/* @__PURE__ */ e("span", { className: "text-ds-xs text-surface-fg-subtle", children: "Submit" })
|
|
528
506
|
] }),
|
|
529
507
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-ds-02b", children: [
|
|
530
|
-
/* @__PURE__ */
|
|
531
|
-
/* @__PURE__ */
|
|
508
|
+
/* @__PURE__ */ e("kbd", { className: "inline-flex h-[20px] items-center justify-center rounded-ds-md border border-surface-border-strong bg-surface-raised px-ds-02b text-ds-xs font-medium text-surface-fg-subtle shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)]", children: "Esc" }),
|
|
509
|
+
/* @__PURE__ */ e("span", { className: "text-ds-xs text-surface-fg-subtle", children: "Close" })
|
|
532
510
|
] })
|
|
533
511
|
]
|
|
534
512
|
}
|
|
@@ -539,7 +517,7 @@ const Se = a.forwardRef(
|
|
|
539
517
|
] }) });
|
|
540
518
|
}
|
|
541
519
|
);
|
|
542
|
-
|
|
520
|
+
Ge.displayName = "CommandBar";
|
|
543
521
|
export {
|
|
544
|
-
|
|
522
|
+
Ge as CommandBar
|
|
545
523
|
};
|