@databricks/appkit-ui 0.12.1 → 0.13.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/CLAUDE.md +4 -3
- package/dist/react/charts/area/index.d.ts +2 -2
- package/dist/react/charts/bar/index.d.ts +2 -2
- package/dist/react/charts/base.d.ts +2 -2
- package/dist/react/charts/base.d.ts.map +1 -1
- package/dist/react/charts/create-chart.d.ts +2 -2
- package/dist/react/charts/create-chart.d.ts.map +1 -1
- package/dist/react/charts/heatmap/index.d.ts +2 -2
- package/dist/react/charts/line/index.d.ts +2 -2
- package/dist/react/charts/options.d.ts.map +1 -1
- package/dist/react/charts/pie/index.d.ts +3 -3
- package/dist/react/charts/radar/index.d.ts +2 -2
- package/dist/react/charts/scatter/index.d.ts +2 -2
- package/dist/react/charts/wrapper.d.ts +2 -2
- package/dist/react/ui/accordion.d.ts +5 -5
- package/dist/react/ui/alert-dialog.d.ts +12 -12
- package/dist/react/ui/alert.d.ts +4 -4
- package/dist/react/ui/aspect-ratio.d.ts +2 -2
- package/dist/react/ui/avatar.d.ts +4 -4
- package/dist/react/ui/badge.d.ts +4 -4
- package/dist/react/ui/breadcrumb.d.ts +8 -8
- package/dist/react/ui/button-group.d.ts +6 -6
- package/dist/react/ui/button.d.ts +4 -4
- package/dist/react/ui/calendar.d.ts +3 -3
- package/dist/react/ui/card.d.ts +8 -8
- package/dist/react/ui/carousel.d.ts +6 -6
- package/dist/react/ui/chart.d.ts +5 -5
- package/dist/react/ui/checkbox.d.ts +2 -2
- package/dist/react/ui/collapsible.d.ts +4 -4
- package/dist/react/ui/command.d.ts +10 -10
- package/dist/react/ui/context-menu.d.ts +16 -16
- package/dist/react/ui/dialog.d.ts +11 -11
- package/dist/react/ui/dialog.d.ts.map +1 -1
- package/dist/react/ui/drawer.d.ts +11 -11
- package/dist/react/ui/drawer.d.ts.map +1 -1
- package/dist/react/ui/dropdown-menu.d.ts +16 -16
- package/dist/react/ui/empty.d.ts +7 -7
- package/dist/react/ui/field.d.ts +11 -11
- package/dist/react/ui/form.d.ts +7 -7
- package/dist/react/ui/hover-card.d.ts +4 -4
- package/dist/react/ui/input-group.d.ts +7 -7
- package/dist/react/ui/input-otp.d.ts +5 -5
- package/dist/react/ui/input.d.ts +2 -2
- package/dist/react/ui/item.d.ts +11 -11
- package/dist/react/ui/kbd.d.ts +3 -3
- package/dist/react/ui/label.d.ts +2 -2
- package/dist/react/ui/menubar.d.ts +17 -17
- package/dist/react/ui/navigation-menu.d.ts +9 -9
- package/dist/react/ui/pagination.d.ts +8 -8
- package/dist/react/ui/popover.d.ts +5 -5
- package/dist/react/ui/progress.d.ts +2 -2
- package/dist/react/ui/radio-group.d.ts +3 -3
- package/dist/react/ui/resizable.d.ts +4 -4
- package/dist/react/ui/scroll-area.d.ts +3 -3
- package/dist/react/ui/select.d.ts +11 -11
- package/dist/react/ui/separator.d.ts +2 -2
- package/dist/react/ui/sheet.d.ts +9 -9
- package/dist/react/ui/sidebar.d.ts +41 -24
- package/dist/react/ui/sidebar.d.ts.map +1 -1
- package/dist/react/ui/sidebar.js.map +1 -1
- package/dist/react/ui/skeleton.d.ts +2 -2
- package/dist/react/ui/slider.d.ts +2 -2
- package/dist/react/ui/sonner.d.ts +2 -2
- package/dist/react/ui/spinner.d.ts +2 -2
- package/dist/react/ui/switch.d.ts +2 -2
- package/dist/react/ui/table.d.ts +9 -9
- package/dist/react/ui/tabs.d.ts +5 -5
- package/dist/react/ui/textarea.d.ts +2 -2
- package/dist/react/ui/toggle-group.d.ts +3 -3
- package/dist/react/ui/toggle.d.ts +2 -2
- package/dist/react/ui/tooltip.d.ts +5 -5
- package/dist/react/ui/tooltip.d.ts.map +1 -1
- package/docs/api/appkit/Class.Plugin.md +20 -0
- package/docs/api/appkit/Function.createApp.md +29 -0
- package/docs/api/appkit-ui/ui/Sidebar.md +304 -37
- package/docs/app-management.md +1 -1
- package/docs/development/ai-assisted-development.md +63 -3
- package/docs/development/llm-guide.md +1 -1
- package/docs/development/local-development.md +2 -2
- package/docs/development/project-setup.md +8 -8
- package/docs/development/remote-bridge.md +1 -1
- package/docs/development/type-generation.md +1 -1
- package/docs/development.md +3 -3
- package/docs/plugins/analytics.md +104 -1
- package/docs/plugins/genie.md +162 -0
- package/docs/plugins/server.md +1 -1
- package/docs/plugins.md +2 -1
- package/docs.md +32 -1
- package/llms.txt +4 -3
- package/package.json +1 -1
|
@@ -2,6 +2,271 @@
|
|
|
2
2
|
|
|
3
3
|
Collapsible navigation sidebar with mobile support
|
|
4
4
|
|
|
5
|
+
## Example[](#example "Direct link to Example")
|
|
6
|
+
|
|
7
|
+
<!-- -->
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import {
|
|
11
|
+
Button,
|
|
12
|
+
DropdownMenu,
|
|
13
|
+
DropdownMenuContent,
|
|
14
|
+
DropdownMenuGroup,
|
|
15
|
+
DropdownMenuItem,
|
|
16
|
+
DropdownMenuTrigger,
|
|
17
|
+
Sidebar,
|
|
18
|
+
SidebarContent,
|
|
19
|
+
SidebarGroup,
|
|
20
|
+
SidebarGroupContent,
|
|
21
|
+
SidebarGroupLabel,
|
|
22
|
+
SidebarHeader,
|
|
23
|
+
SidebarInput,
|
|
24
|
+
SidebarInset,
|
|
25
|
+
SidebarMenu,
|
|
26
|
+
SidebarMenuButton,
|
|
27
|
+
SidebarMenuItem,
|
|
28
|
+
SidebarProvider,
|
|
29
|
+
SidebarRail,
|
|
30
|
+
SidebarTrigger,
|
|
31
|
+
Item,
|
|
32
|
+
ItemActions,
|
|
33
|
+
ItemContent,
|
|
34
|
+
ItemDescription,
|
|
35
|
+
ItemTitle,
|
|
36
|
+
Label,
|
|
37
|
+
} from "@databricks/appkit-ui/react"
|
|
38
|
+
import { useState } from "react"
|
|
39
|
+
|
|
40
|
+
export default function SidebarExample() {
|
|
41
|
+
const data = {
|
|
42
|
+
versions: ["1.0.1", "1.1.0-alpha", "2.0.0-beta1"],
|
|
43
|
+
navMain: [
|
|
44
|
+
{
|
|
45
|
+
title: "Getting Started",
|
|
46
|
+
url: "#",
|
|
47
|
+
items: [
|
|
48
|
+
{
|
|
49
|
+
title: "Installation",
|
|
50
|
+
url: "#",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
title: "Project Structure",
|
|
54
|
+
url: "#",
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
title: "Build Your Application",
|
|
60
|
+
url: "#",
|
|
61
|
+
items: [
|
|
62
|
+
{
|
|
63
|
+
title: "Routing",
|
|
64
|
+
url: "#",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
title: "Data Fetching",
|
|
68
|
+
url: "#",
|
|
69
|
+
isActive: true,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
title: "Rendering",
|
|
73
|
+
url: "#",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: "Caching",
|
|
77
|
+
url: "#",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
title: "Styling",
|
|
81
|
+
url: "#",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
title: "Optimizing",
|
|
85
|
+
url: "#",
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
title: "Configuring",
|
|
89
|
+
url: "#",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
title: "Testing",
|
|
93
|
+
url: "#",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
title: "Authentication",
|
|
97
|
+
url: "#",
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
title: "Deploying",
|
|
101
|
+
url: "#",
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
title: "Upgrading",
|
|
105
|
+
url: "#",
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
title: "Examples",
|
|
109
|
+
url: "#",
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
title: "API Reference",
|
|
115
|
+
url: "#",
|
|
116
|
+
items: [
|
|
117
|
+
{
|
|
118
|
+
title: "Components",
|
|
119
|
+
url: "#",
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
title: "File Conventions",
|
|
123
|
+
url: "#",
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
title: "Functions",
|
|
127
|
+
url: "#",
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
title: "next.config.js Options",
|
|
131
|
+
url: "#",
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
title: "CLI",
|
|
135
|
+
url: "#",
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
title: "Edge Runtime",
|
|
139
|
+
url: "#",
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
title: "Architecture",
|
|
145
|
+
url: "#",
|
|
146
|
+
items: [
|
|
147
|
+
{
|
|
148
|
+
title: "Accessibility",
|
|
149
|
+
url: "#",
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
title: "Fast Refresh",
|
|
153
|
+
url: "#",
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
title: "Next.js Compiler",
|
|
157
|
+
url: "#",
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
title: "Supported Browsers",
|
|
161
|
+
url: "#",
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
title: "Turbopack",
|
|
165
|
+
url: "#",
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const [selectedVersion, setSelectedVersion] = useState(data.versions[0])
|
|
173
|
+
|
|
174
|
+
return (
|
|
175
|
+
<SidebarProvider>
|
|
176
|
+
<Sidebar>
|
|
177
|
+
<SidebarHeader>
|
|
178
|
+
<SidebarMenu>
|
|
179
|
+
<SidebarMenuItem>
|
|
180
|
+
<DropdownMenu>
|
|
181
|
+
<DropdownMenuTrigger asChild>
|
|
182
|
+
<SidebarMenuButton
|
|
183
|
+
size="lg"
|
|
184
|
+
className="data-open:bg-sidebar-accent data-open:text-sidebar-accent-foreground"
|
|
185
|
+
>
|
|
186
|
+
<Item className="p-0 w-full" size="sm">
|
|
187
|
+
<ItemContent>
|
|
188
|
+
<ItemTitle className="text-sm">Documentation</ItemTitle>
|
|
189
|
+
<ItemDescription>v{selectedVersion}</ItemDescription>
|
|
190
|
+
</ItemContent>
|
|
191
|
+
<ItemActions className="ml-auto">
|
|
192
|
+
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="size-4 shrink-0 opacity-50"><path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/></svg>
|
|
193
|
+
</ItemActions>
|
|
194
|
+
</Item>
|
|
195
|
+
</SidebarMenuButton>
|
|
196
|
+
</DropdownMenuTrigger>
|
|
197
|
+
<DropdownMenuContent>
|
|
198
|
+
<DropdownMenuGroup>
|
|
199
|
+
{data.versions.map((version) => (
|
|
200
|
+
<DropdownMenuItem
|
|
201
|
+
key={version}
|
|
202
|
+
onSelect={() => setSelectedVersion(version)}
|
|
203
|
+
>
|
|
204
|
+
v{version}{" "}
|
|
205
|
+
{version === selectedVersion && (
|
|
206
|
+
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="ml-auto size-4"><path d="M20 6 9 17l-5-5"/></svg>
|
|
207
|
+
)}
|
|
208
|
+
</DropdownMenuItem>
|
|
209
|
+
))}
|
|
210
|
+
</DropdownMenuGroup>
|
|
211
|
+
</DropdownMenuContent>
|
|
212
|
+
</DropdownMenu>
|
|
213
|
+
</SidebarMenuItem>
|
|
214
|
+
</SidebarMenu>
|
|
215
|
+
<form>
|
|
216
|
+
<SidebarGroup className="py-0">
|
|
217
|
+
<SidebarGroupContent className="relative">
|
|
218
|
+
<Label htmlFor="search" className="sr-only">
|
|
219
|
+
Search
|
|
220
|
+
</Label>
|
|
221
|
+
<SidebarInput
|
|
222
|
+
id="search"
|
|
223
|
+
placeholder="Search the docs..."
|
|
224
|
+
className="pl-8"
|
|
225
|
+
/>
|
|
226
|
+
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="pointer-events-none absolute top-1/2 left-2 size-4 -translate-y-1/2 opacity-50 select-none"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>
|
|
227
|
+
</SidebarGroupContent>
|
|
228
|
+
</SidebarGroup>
|
|
229
|
+
</form>
|
|
230
|
+
</SidebarHeader>
|
|
231
|
+
<SidebarContent>
|
|
232
|
+
{data.navMain.map((item) => (
|
|
233
|
+
<SidebarGroup key={item.title}>
|
|
234
|
+
<SidebarGroupLabel>{item.title}</SidebarGroupLabel>
|
|
235
|
+
<SidebarGroupContent>
|
|
236
|
+
<SidebarMenu>
|
|
237
|
+
{item.items.map((subItem) => (
|
|
238
|
+
<SidebarMenuItem key={subItem.title}>
|
|
239
|
+
<SidebarMenuButton asChild isActive={subItem.isActive}>
|
|
240
|
+
<a href={subItem.url}>{subItem.title}</a>
|
|
241
|
+
</SidebarMenuButton>
|
|
242
|
+
</SidebarMenuItem>
|
|
243
|
+
))}
|
|
244
|
+
</SidebarMenu>
|
|
245
|
+
</SidebarGroupContent>
|
|
246
|
+
</SidebarGroup>
|
|
247
|
+
))}
|
|
248
|
+
</SidebarContent>
|
|
249
|
+
<SidebarRail />
|
|
250
|
+
</Sidebar>
|
|
251
|
+
<SidebarInset>
|
|
252
|
+
<header className="flex h-16 shrink-0 items-center gap-2 border-b px-4">
|
|
253
|
+
<SidebarTrigger className="-ml-1" />
|
|
254
|
+
</header>
|
|
255
|
+
<div className="flex flex-1 flex-col gap-4 p-4">
|
|
256
|
+
<div className="grid auto-rows-min gap-4 md:grid-cols-3">
|
|
257
|
+
<div className="bg-muted/50 aspect-video rounded-xl" />
|
|
258
|
+
<div className="bg-muted/50 aspect-video rounded-xl" />
|
|
259
|
+
<div className="bg-muted/50 aspect-video rounded-xl" />
|
|
260
|
+
</div>
|
|
261
|
+
<div className="bg-muted/50 min-h-[100vh] flex-1 rounded-xl md:min-h-min" />
|
|
262
|
+
</div>
|
|
263
|
+
</SidebarInset>
|
|
264
|
+
</SidebarProvider>
|
|
265
|
+
)
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
|
|
5
270
|
## Sidebar[](#sidebar-1 "Direct link to Sidebar")
|
|
6
271
|
|
|
7
272
|
Collapsible navigation sidebar with mobile support
|
|
@@ -10,11 +275,11 @@ Collapsible navigation sidebar with mobile support
|
|
|
10
275
|
|
|
11
276
|
### Props[](#props "Direct link to Props")
|
|
12
277
|
|
|
13
|
-
| Prop | Type | Required | Default | Description
|
|
14
|
-
| ------------- | ------ | -------- | ----------- |
|
|
15
|
-
| `side` | `enum` | | `left` |
|
|
16
|
-
| `variant` | `enum` | | `sidebar` |
|
|
17
|
-
| `collapsible` | `enum` | | `offcanvas` | -
|
|
278
|
+
| Prop | Type | Required | Default | Description |
|
|
279
|
+
| ------------- | ------ | -------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
280
|
+
| `side` | `enum` | | `left` | Which side of the viewport the sidebar appears on |
|
|
281
|
+
| `variant` | `enum` | | `sidebar` | Visual style: `"sidebar"` (standard with border), `"floating"` (rounded with shadow), or `"inset"` (content area gets rounded margin) |
|
|
282
|
+
| `collapsible` | `enum` | | `offcanvas` | Collapse behavior: `"offcanvas"` (slides off-screen), `"icon"` (collapses to icon width), or `"none"` (always expanded) |
|
|
18
283
|
|
|
19
284
|
### Usage[](#usage "Direct link to Usage")
|
|
20
285
|
|
|
@@ -90,9 +355,9 @@ Action button displayed next to a sidebar group label
|
|
|
90
355
|
|
|
91
356
|
### Props[](#props-4 "Direct link to Props")
|
|
92
357
|
|
|
93
|
-
| Prop | Type | Required | Default | Description
|
|
94
|
-
| --------- | --------- | -------- | ------- |
|
|
95
|
-
| `asChild` | `boolean` | | `false` |
|
|
358
|
+
| Prop | Type | Required | Default | Description |
|
|
359
|
+
| --------- | --------- | -------- | ------- | ---------------------------------------------- |
|
|
360
|
+
| `asChild` | `boolean` | | `false` | Render as child element instead of default tag |
|
|
96
361
|
|
|
97
362
|
### Usage[](#usage-4 "Direct link to Usage")
|
|
98
363
|
|
|
@@ -130,9 +395,9 @@ Label heading for a sidebar group
|
|
|
130
395
|
|
|
131
396
|
### Props[](#props-6 "Direct link to Props")
|
|
132
397
|
|
|
133
|
-
| Prop | Type | Required | Default | Description
|
|
134
|
-
| --------- | --------- | -------- | ------- |
|
|
135
|
-
| `asChild` | `boolean` | | `false` |
|
|
398
|
+
| Prop | Type | Required | Default | Description |
|
|
399
|
+
| --------- | --------- | -------- | ------- | ---------------------------------------------- |
|
|
400
|
+
| `asChild` | `boolean` | | `false` | Render as child element instead of default tag |
|
|
136
401
|
|
|
137
402
|
### Usage[](#usage-6 "Direct link to Usage")
|
|
138
403
|
|
|
@@ -227,10 +492,10 @@ Action button displayed alongside a menu item
|
|
|
227
492
|
|
|
228
493
|
### Props[](#props-11 "Direct link to Props")
|
|
229
494
|
|
|
230
|
-
| Prop | Type | Required | Default | Description
|
|
231
|
-
| ------------- | --------- | -------- | ------- |
|
|
232
|
-
| `asChild` | `boolean` | | `false` |
|
|
233
|
-
| `showOnHover` | `boolean` | | `false` |
|
|
495
|
+
| Prop | Type | Required | Default | Description |
|
|
496
|
+
| ------------- | --------- | -------- | ------- | ---------------------------------------------- |
|
|
497
|
+
| `asChild` | `boolean` | | `false` | Render as child element instead of default tag |
|
|
498
|
+
| `showOnHover` | `boolean` | | `false` | Only show when parent menu item is hovered |
|
|
234
499
|
|
|
235
500
|
### Usage[](#usage-11 "Direct link to Usage")
|
|
236
501
|
|
|
@@ -266,13 +531,13 @@ import { SidebarMenuBadge } from '@databricks/appkit-ui';
|
|
|
266
531
|
|
|
267
532
|
### Props[](#props-13 "Direct link to Props")
|
|
268
533
|
|
|
269
|
-
| Prop | Type | Required | Default | Description
|
|
270
|
-
| ---------- | ----------------------------------------------------------------- | -------- | --------- |
|
|
271
|
-
| `asChild` | `boolean` | | `false` |
|
|
272
|
-
| `isActive` | `boolean` | | `false` |
|
|
273
|
-
| `tooltip` | `string \| (TooltipContentProps & RefAttributes<HTMLDivElement>)` | | - |
|
|
274
|
-
| `variant` | `"default" \| "outline" \| null` | | `default` | -
|
|
275
|
-
| `size` | `"default" \| "sm" \| "lg" \| null` | | `default` | -
|
|
534
|
+
| Prop | Type | Required | Default | Description |
|
|
535
|
+
| ---------- | ----------------------------------------------------------------- | -------- | --------- | ---------------------------------------------------- |
|
|
536
|
+
| `asChild` | `boolean` | | `false` | Render as child element instead of default tag |
|
|
537
|
+
| `isActive` | `boolean` | | `false` | Whether this item is currently active/selected |
|
|
538
|
+
| `tooltip` | `string \| (TooltipContentProps & RefAttributes<HTMLDivElement>)` | | - | Tooltip shown when sidebar is collapsed to icon mode |
|
|
539
|
+
| `variant` | `"default" \| "outline" \| null` | | `default` | - |
|
|
540
|
+
| `size` | `"default" \| "sm" \| "lg" \| null` | | `default` | - |
|
|
276
541
|
|
|
277
542
|
### Usage[](#usage-13 "Direct link to Usage")
|
|
278
543
|
|
|
@@ -310,9 +575,9 @@ Loading skeleton placeholder for menu items
|
|
|
310
575
|
|
|
311
576
|
### Props[](#props-15 "Direct link to Props")
|
|
312
577
|
|
|
313
|
-
| Prop | Type | Required | Default | Description
|
|
314
|
-
| ---------- | --------- | -------- | ------- |
|
|
315
|
-
| `showIcon` | `boolean` | | `false` |
|
|
578
|
+
| Prop | Type | Required | Default | Description |
|
|
579
|
+
| ---------- | --------- | -------- | ------- | ------------------------------------------------------------ |
|
|
580
|
+
| `showIcon` | `boolean` | | `false` | Show a circular icon placeholder alongside the text skeleton |
|
|
316
581
|
|
|
317
582
|
### Usage[](#usage-15 "Direct link to Usage")
|
|
318
583
|
|
|
@@ -350,11 +615,11 @@ Button for submenu items
|
|
|
350
615
|
|
|
351
616
|
### Props[](#props-17 "Direct link to Props")
|
|
352
617
|
|
|
353
|
-
| Prop | Type | Required | Default | Description
|
|
354
|
-
| ---------- | --------- | -------- | ------- |
|
|
355
|
-
| `asChild` | `boolean` | | `false` |
|
|
356
|
-
| `size` | `enum` | | `md` |
|
|
357
|
-
| `isActive` | `boolean` | | `false` |
|
|
618
|
+
| Prop | Type | Required | Default | Description |
|
|
619
|
+
| ---------- | --------- | -------- | ------- | ------------------------------------------------------ |
|
|
620
|
+
| `asChild` | `boolean` | | `false` | Render as child element instead of default tag |
|
|
621
|
+
| `size` | `enum` | | `md` | Text size of the submenu button |
|
|
622
|
+
| `isActive` | `boolean` | | `false` | Whether this submenu item is currently active/selected |
|
|
358
623
|
|
|
359
624
|
### Usage[](#usage-17 "Direct link to Usage")
|
|
360
625
|
|
|
@@ -390,11 +655,11 @@ import { SidebarMenuSubItem } from '@databricks/appkit-ui';
|
|
|
390
655
|
|
|
391
656
|
### Props[](#props-19 "Direct link to Props")
|
|
392
657
|
|
|
393
|
-
| Prop | Type | Required | Default | Description
|
|
394
|
-
| -------------- | --------------------------- | -------- | ------- |
|
|
395
|
-
| `defaultOpen` | `boolean` | | `true` |
|
|
396
|
-
| `open` | `boolean` | | - |
|
|
397
|
-
| `onOpenChange` | `((open: boolean) => void)` | | - |
|
|
658
|
+
| Prop | Type | Required | Default | Description |
|
|
659
|
+
| -------------- | --------------------------- | -------- | ------- | ----------------------------------------- |
|
|
660
|
+
| `defaultOpen` | `boolean` | | `true` | Initial open state for uncontrolled usage |
|
|
661
|
+
| `open` | `boolean` | | - | Controlled open state |
|
|
662
|
+
| `onOpenChange` | `((open: boolean) => void)` | | - | Callback when open state changes |
|
|
398
663
|
|
|
399
664
|
### Usage[](#usage-19 "Direct link to Usage")
|
|
400
665
|
|
|
@@ -478,13 +743,15 @@ Hook to access sidebar state and controls
|
|
|
478
743
|
|
|
479
744
|
### Props[](#props-23 "Direct link to Props")
|
|
480
745
|
|
|
481
|
-
This
|
|
746
|
+
This hook takes no parameters.
|
|
482
747
|
|
|
483
748
|
### Usage[](#usage-23 "Direct link to Usage")
|
|
484
749
|
|
|
485
750
|
```tsx
|
|
486
751
|
import { useSidebar } from '@databricks/appkit-ui';
|
|
487
752
|
|
|
488
|
-
|
|
753
|
+
function MyComponent() {
|
|
754
|
+
const sidebar = useSidebar();
|
|
755
|
+
}
|
|
489
756
|
|
|
490
757
|
```
|
package/docs/app-management.md
CHANGED
|
@@ -9,7 +9,7 @@ Manage your AppKit application throughout its lifecycle using the Databricks CLI
|
|
|
9
9
|
|
|
10
10
|
## Create app[](#create-app "Direct link to Create app")
|
|
11
11
|
|
|
12
|
-
See the [Quick start](./docs.md#quick-start) section to create a new Databricks app with AppKit installed.
|
|
12
|
+
See the [Quick start](./docs.md#quick-start-options) section to create a new Databricks app with AppKit installed.
|
|
13
13
|
|
|
14
14
|
## Configuration[](#configuration "Direct link to Configuration")
|
|
15
15
|
|
|
@@ -4,11 +4,60 @@
|
|
|
4
4
|
|
|
5
5
|
* [Node.js](https://nodejs.org) v22+ environment with `npm`
|
|
6
6
|
* Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
|
|
7
|
-
* A new Databricks app with AppKit installed. See
|
|
7
|
+
* A new Databricks app with AppKit installed. See [Bootstrap a new Databricks app](./docs.md#quick-start-options) for more details.
|
|
8
8
|
|
|
9
|
-
AppKit
|
|
9
|
+
AppKit integrates with AI coding assistants through the Agent Skills.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Installing Agent Skills[](#installing-agent-skills "Direct link to Installing Agent Skills")
|
|
12
|
+
|
|
13
|
+
To install the Databricks Agent Skills for your preferred AI assistant, run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
databricks experimental aitools skills install
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Skills capabilities[](#skills-capabilities "Direct link to Skills capabilities")
|
|
21
|
+
|
|
22
|
+
The Agent Skills expose the following capabilities for AI assistants:
|
|
23
|
+
|
|
24
|
+
* **Data exploration**: Query catalogs, schemas, tables, and execute SQL
|
|
25
|
+
* **CLI command execution**: Deploy and manage apps, and run other workspace operations
|
|
26
|
+
* **Workspace resource discovery**: Inspect and navigate workspace resources
|
|
27
|
+
|
|
28
|
+
## Example prompts[](#example-prompts "Direct link to Example prompts")
|
|
29
|
+
|
|
30
|
+
Here are some basic examples you can use to explore your app and workspace:
|
|
31
|
+
|
|
32
|
+
1. Creating a new basic app
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
Create a new Databricks app that displays a dashboard of the users table in main.default.
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
1. Introspecting a table schema
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
Show me the schema of the users table in main.default.
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
1. Creating a new query
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
Create a new query to find users created in the last 7 days.
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
1. Deploying an app
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
Deploy the app to Databricks with the name "my-app".
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Possibilities are virtually endless. Ask your AI assistant to help you with your app and workspace.
|
|
12
61
|
|
|
13
62
|
## LLM resources[](#llm-resources "Direct link to LLM resources")
|
|
14
63
|
|
|
@@ -21,8 +70,19 @@ If you're building applications using AppKit packages, reference the `llms.txt`
|
|
|
21
70
|
|
|
22
71
|
```bash
|
|
23
72
|
npx @databricks/appkit docs # documentation index with section overview
|
|
73
|
+
npx @databricks/appkit docs <query> # for specific documentation file or section
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Examples of documentation queries:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
24
80
|
npx @databricks/appkit docs "appkit-ui API reference" # view a specific section
|
|
25
81
|
npx @databricks/appkit docs --full # full index with all API entries
|
|
26
82
|
npx @databricks/appkit docs ./docs.md # view a specific documentation file
|
|
27
83
|
|
|
28
84
|
```
|
|
85
|
+
|
|
86
|
+
## See more[](#see-more "Direct link to See more")
|
|
87
|
+
|
|
88
|
+
To learn more about Agent Skills, see the [Agent Skills repository](https://github.com/databricks/databricks-agent-skills).
|
|
@@ -65,7 +65,7 @@ Examples:
|
|
|
65
65
|
|
|
66
66
|
* `package.json` has `"type": "module"`
|
|
67
67
|
* `tsx` is in devDependencies for dev server
|
|
68
|
-
* `dev` script uses `NODE_ENV=development tsx watch server/
|
|
68
|
+
* `dev` script uses `NODE_ENV=development tsx watch server/server.ts`
|
|
69
69
|
* `client/index.html` exists with `<div id="root"></div>` and script pointing to `client/src/main.tsx`
|
|
70
70
|
|
|
71
71
|
### Backend[](#backend "Direct link to Backend")
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
* [Node.js](https://nodejs.org) v22+ environment with `npm`
|
|
6
6
|
* Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
|
|
7
|
-
* A new Databricks app with AppKit installed. See
|
|
7
|
+
* A new Databricks app with AppKit installed. See [Bootstrap a new Databricks app](./docs.md#quick-start-options) for more details.
|
|
8
8
|
|
|
9
|
-
Once your app is bootstrapped according to the [
|
|
9
|
+
Once your app is bootstrapped according to the [Manual quick start](./docs.md#manual-quick-start) guide, you can start the development server with hot reload for both UI and backend code.
|
|
10
10
|
|
|
11
11
|
In the application root directory, run the following command to start the development server:
|
|
12
12
|
|
|
@@ -9,7 +9,7 @@ Recommended structure (client/server split):
|
|
|
9
9
|
```text
|
|
10
10
|
my-app/
|
|
11
11
|
├── server/
|
|
12
|
-
│ ├──
|
|
12
|
+
│ ├── server.ts # backend entry point (AppKit)
|
|
13
13
|
│ └── .env # optional local dev env vars (do not commit)
|
|
14
14
|
├── client/
|
|
15
15
|
│ ├── index.html
|
|
@@ -44,9 +44,9 @@ The AppKit `server()` plugin automatically serves:
|
|
|
44
44
|
"version": "0.0.0",
|
|
45
45
|
"type": "module",
|
|
46
46
|
"scripts": {
|
|
47
|
-
"dev": "NODE_ENV=development tsx watch server/
|
|
47
|
+
"dev": "NODE_ENV=development tsx watch server/server.ts",
|
|
48
48
|
"build": "npm run build:server && npm run build:client",
|
|
49
|
-
"build:server": "tsdown --out-dir build server/
|
|
49
|
+
"build:server": "tsdown --out-dir build server/server.ts",
|
|
50
50
|
"build:client": "tsc -b && vite build --config client/vite.config.ts",
|
|
51
51
|
"start": "node build/index.mjs"
|
|
52
52
|
},
|
|
@@ -149,7 +149,7 @@ export default defineConfig({
|
|
|
149
149
|
|
|
150
150
|
```
|
|
151
151
|
|
|
152
|
-
### `server/
|
|
152
|
+
### `server/server.ts`[](#serverserverts "Direct link to serverserverts")
|
|
153
153
|
|
|
154
154
|
```ts
|
|
155
155
|
import { createApp, server } from "@databricks/appkit";
|
|
@@ -193,7 +193,7 @@ If you don't already have a `client/` folder, create one and move your Vite app
|
|
|
193
193
|
* Move `vite.config.ts` → `client/vite.config.ts`
|
|
194
194
|
* Move `src/` → `client/src/`
|
|
195
195
|
|
|
196
|
-
### 2. Create `server/
|
|
196
|
+
### 2. Create `server/server.ts` (New File)[](#2-create-serverserverts-new-file "Direct link to 2-create-serverserverts-new-file")
|
|
197
197
|
|
|
198
198
|
```ts
|
|
199
199
|
import { createApp, server } from "@databricks/appkit";
|
|
@@ -209,9 +209,9 @@ await createApp({
|
|
|
209
209
|
```json
|
|
210
210
|
{
|
|
211
211
|
"scripts": {
|
|
212
|
-
"dev": "NODE_ENV=development tsx watch server/
|
|
212
|
+
"dev": "NODE_ENV=development tsx watch server/server.ts",
|
|
213
213
|
"build": "npm run build:server && npm run build:client",
|
|
214
|
-
"build:server": "tsdown --out-dir build server/
|
|
214
|
+
"build:server": "tsdown --out-dir build server/server.ts",
|
|
215
215
|
"build:client": "tsc -b && vite build --config client/vite.config.ts",
|
|
216
216
|
"start": "node build/index.mjs"
|
|
217
217
|
}
|
|
@@ -228,7 +228,7 @@ AppKit's server plugin will automatically serve your Vite app in dev mode and `c
|
|
|
228
228
|
To add SQL query execution capabilities:
|
|
229
229
|
|
|
230
230
|
```ts
|
|
231
|
-
// server/
|
|
231
|
+
// server/server.ts
|
|
232
232
|
import { createApp, server, analytics } from "@databricks/appkit";
|
|
233
233
|
|
|
234
234
|
await createApp({
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
* [Node.js](https://nodejs.org) v22+ environment with `npm`
|
|
6
6
|
* Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
|
|
7
|
-
* A new Databricks app with AppKit installed. See
|
|
7
|
+
* A new Databricks app with AppKit installed. See [Bootstrap a new Databricks app](./docs.md#quick-start-options) for more details.
|
|
8
8
|
|
|
9
9
|
Remote bridge allows you to develop against a deployed backend while keeping your UI and queries local. This is useful for testing against production data or debugging deployed backend code without redeploying your app.
|
|
10
10
|
|
|
@@ -106,5 +106,5 @@ data?.forEach(row => {
|
|
|
106
106
|
|
|
107
107
|
## See also[](#see-also "Direct link to See also")
|
|
108
108
|
|
|
109
|
-
* [Plugins](./docs/plugins.md) - Analytics plugin configuration
|
|
109
|
+
* [Plugins](./docs/plugins/analytics.md) - Analytics plugin configuration
|
|
110
110
|
* [API Reference](./docs/api/appkit-ui.md) - Complete UI components API documentation
|
package/docs/development.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# Development
|
|
2
2
|
|
|
3
|
-
AppKit provides multiple development workflows to suit different needs: local development with hot reload, AI-assisted development with
|
|
3
|
+
AppKit provides multiple development workflows to suit different needs: local development with hot reload, AI-assisted development with Agent Skills, and remote tunneling to deployed backends.
|
|
4
4
|
|
|
5
5
|
## Prerequisites[](#prerequisites "Direct link to Prerequisites")
|
|
6
6
|
|
|
7
7
|
* [Node.js](https://nodejs.org) v22+ environment with `npm`
|
|
8
8
|
* Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
|
|
9
|
-
* A new Databricks app with AppKit installed. See
|
|
9
|
+
* A new Databricks app with AppKit installed. See [Bootstrap a new Databricks app](./docs.md#quick-start-options) for more details.
|
|
10
10
|
|
|
11
11
|
## Development flows[](#development-flows "Direct link to Development flows")
|
|
12
12
|
|
|
13
13
|
There are multiple supported development flows available with AppKit:
|
|
14
14
|
|
|
15
15
|
1. **[Local development](./docs/development/local-development.md)**: Run the development server with hot reload for both UI and backend code. This is the default development flow and is suitable for most use cases.
|
|
16
|
-
2. **[AI-assisted development](./docs/development/ai-assisted-development.md)**: Use an AI coding assistant to explore data, run CLI commands, and scaffold your app interactively.
|
|
16
|
+
2. **[AI-assisted development](./docs/development/ai-assisted-development.md)**: Use an AI coding assistant with Agent Skills to explore data, run CLI commands, and scaffold your app interactively.
|
|
17
17
|
3. **[Remote Bridge](./docs/development/remote-bridge.md)**: Create a remote bridge to a deployed backend while keeping your queries and UI local. This is useful for testing against production data or debugging deployed backend code without redeploying your app.
|
|
18
18
|
|
|
19
19
|
## See also[](#see-also "Direct link to See also")
|