@uipath/apollo-wind 0.8.0 → 0.9.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.
Files changed (40) hide show
  1. package/dist/archived-ui-path.svg +3 -0
  2. package/dist/components/ui/index.cjs +10 -10
  3. package/dist/components/ui/input.cjs +1 -1
  4. package/dist/components/ui/input.js +1 -1
  5. package/dist/components/ui/select.cjs +1 -1
  6. package/dist/components/ui/select.js +1 -1
  7. package/dist/components/ui/textarea.cjs +1 -1
  8. package/dist/components/ui/textarea.js +1 -1
  9. package/dist/examples/admin-layout-example.cjs +490 -0
  10. package/dist/examples/admin-layout-example.js +411 -0
  11. package/dist/examples/app-shell-example.cjs +452 -0
  12. package/dist/examples/app-shell-example.js +418 -0
  13. package/dist/examples/dashboard-example.cjs +590 -0
  14. package/dist/examples/dashboard-example.js +556 -0
  15. package/dist/examples/data-management-example.cjs +584 -0
  16. package/dist/examples/data-management-example.js +550 -0
  17. package/dist/examples/flow-editor-layout-example.cjs +309 -0
  18. package/dist/examples/flow-editor-layout-example.js +269 -0
  19. package/dist/examples/flow-start-example.cjs +467 -0
  20. package/dist/examples/flow-start-example.js +433 -0
  21. package/dist/examples/form-builder-example.cjs +674 -0
  22. package/dist/examples/form-builder-example.js +640 -0
  23. package/dist/examples/new-project-example.cjs +550 -0
  24. package/dist/examples/new-project-example.js +516 -0
  25. package/dist/examples/settings-example.cjs +864 -0
  26. package/dist/examples/settings-example.js +830 -0
  27. package/dist/examples/vscode-example.cjs +340 -0
  28. package/dist/examples/vscode-example.js +270 -0
  29. package/dist/templates/admin-layout-example.d.ts +92 -0
  30. package/dist/templates/app-shell-example.d.ts +52 -0
  31. package/dist/templates/dashboard-example.d.ts +11 -0
  32. package/dist/templates/data-management-example.d.ts +1 -0
  33. package/dist/templates/flow-editor-layout-example.d.ts +22 -0
  34. package/dist/templates/flow-start-example.d.ts +30 -0
  35. package/dist/templates/form-builder-example.d.ts +1 -0
  36. package/dist/templates/new-project-example.d.ts +30 -0
  37. package/dist/templates/settings-example.d.ts +1 -0
  38. package/dist/templates/vscode-example.d.ts +80 -0
  39. package/dist/ui-path.svg +11 -0
  40. package/package.json +1 -1
@@ -0,0 +1,411 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Fragment } from "react";
3
+ import { cn } from "../lib/index.js";
4
+ import { Bell, ChevronsLeft, ChevronsRight, HelpCircle, Plus, Search } from "lucide-react";
5
+ import { Button } from "../components/ui/button.js";
6
+ import { ScrollArea } from "../components/ui/scroll-area.js";
7
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../components/ui/select.js";
8
+ import { Tabs, TabsList, TabsTrigger } from "../components/ui/tabs.js";
9
+ import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "../components/ui/breadcrumb.js";
10
+ import { DataTable, DataTableColumnHeader, DataTableSelectColumn } from "../components/ui/data-table.js";
11
+ import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "../components/ui/pagination.js";
12
+ import { Column, Row } from "../components/ui/layout/index.js";
13
+ function AdminLayout({ className, children, ...props }) {
14
+ return /*#__PURE__*/ jsx("div", {
15
+ className: cn('flex h-[700px] w-full flex-col overflow-hidden rounded-lg border bg-background', className),
16
+ ...props,
17
+ children: children
18
+ });
19
+ }
20
+ function AdminHeader({ className, logo, title, children, ...props }) {
21
+ return /*#__PURE__*/ jsxs("header", {
22
+ className: cn('flex h-14 items-center justify-between border-b bg-background px-4', className),
23
+ ...props,
24
+ children: [
25
+ /*#__PURE__*/ jsxs(Row, {
26
+ gap: 3,
27
+ align: "center",
28
+ children: [
29
+ logo,
30
+ title && /*#__PURE__*/ jsx("span", {
31
+ className: "text-lg font-semibold",
32
+ children: title
33
+ })
34
+ ]
35
+ }),
36
+ /*#__PURE__*/ jsx(Row, {
37
+ gap: 2,
38
+ align: "center",
39
+ children: children
40
+ })
41
+ ]
42
+ });
43
+ }
44
+ function AdminHeaderActions({ notifications, avatar }) {
45
+ return /*#__PURE__*/ jsxs(Row, {
46
+ gap: 1,
47
+ align: "center",
48
+ children: [
49
+ /*#__PURE__*/ jsxs(Button, {
50
+ variant: "ghost",
51
+ size: "icon",
52
+ className: "relative",
53
+ children: [
54
+ /*#__PURE__*/ jsx(Bell, {
55
+ className: "h-5 w-5"
56
+ }),
57
+ notifications && notifications > 0 && /*#__PURE__*/ jsx("span", {
58
+ className: "absolute -right-0.5 -top-0.5 flex h-4 w-4 items-center justify-center rounded-full bg-destructive text-[10px] text-destructive-foreground",
59
+ children: notifications
60
+ })
61
+ ]
62
+ }),
63
+ /*#__PURE__*/ jsx(Button, {
64
+ variant: "ghost",
65
+ size: "icon",
66
+ children: /*#__PURE__*/ jsx(HelpCircle, {
67
+ className: "h-5 w-5"
68
+ })
69
+ }),
70
+ avatar || /*#__PURE__*/ jsx("div", {
71
+ className: "ml-2 flex h-8 w-8 items-center justify-center rounded-full bg-primary text-xs font-medium text-primary-foreground",
72
+ children: "SN"
73
+ })
74
+ ]
75
+ });
76
+ }
77
+ function AdminContent({ className, children, ...props }) {
78
+ return /*#__PURE__*/ jsx(Row, {
79
+ flex: 1,
80
+ overflow: "hidden",
81
+ className: className,
82
+ ...props,
83
+ children: children
84
+ });
85
+ }
86
+ function AdminSidebar({ className, children, width = 280, ...props }) {
87
+ return /*#__PURE__*/ jsx(Column, {
88
+ className: cn('border-r bg-muted/30', className),
89
+ style: {
90
+ width
91
+ },
92
+ ...props,
93
+ children: children
94
+ });
95
+ }
96
+ function AdminSidebarHeader({ title, onSearch, onAdd }) {
97
+ return /*#__PURE__*/ jsxs(Row, {
98
+ justify: "between",
99
+ align: "center",
100
+ className: "border-b px-4 py-3",
101
+ children: [
102
+ /*#__PURE__*/ jsx("span", {
103
+ className: "text-sm font-medium",
104
+ children: title
105
+ }),
106
+ /*#__PURE__*/ jsxs(Row, {
107
+ gap: 1,
108
+ align: "center",
109
+ children: [
110
+ onSearch && /*#__PURE__*/ jsx(Button, {
111
+ variant: "ghost",
112
+ size: "icon",
113
+ className: "h-7 w-7",
114
+ onClick: onSearch,
115
+ children: /*#__PURE__*/ jsx(Search, {
116
+ className: "h-4 w-4"
117
+ })
118
+ }),
119
+ onAdd && /*#__PURE__*/ jsx(Button, {
120
+ variant: "ghost",
121
+ size: "icon",
122
+ className: "h-7 w-7",
123
+ onClick: onAdd,
124
+ children: /*#__PURE__*/ jsx(Plus, {
125
+ className: "h-4 w-4"
126
+ })
127
+ })
128
+ ]
129
+ })
130
+ ]
131
+ });
132
+ }
133
+ function AdminSidebarNav({ items, selectedId, onSelect }) {
134
+ return /*#__PURE__*/ jsx(ScrollArea, {
135
+ className: "flex-1",
136
+ children: /*#__PURE__*/ jsx("nav", {
137
+ className: "p-2",
138
+ children: items.map((item)=>/*#__PURE__*/ jsxs(Row, {
139
+ gap: 2,
140
+ align: "center",
141
+ className: cn('cursor-pointer rounded-md px-3 py-2 text-sm transition-colors', selectedId === item.id ? 'bg-primary/10 text-primary' : 'text-muted-foreground hover:bg-muted hover:text-foreground'),
142
+ onClick: ()=>onSelect?.(item.id),
143
+ children: [
144
+ item.icon,
145
+ /*#__PURE__*/ jsx("span", {
146
+ className: "flex-1 truncate",
147
+ children: item.label
148
+ }),
149
+ item.badge
150
+ ]
151
+ }, item.id))
152
+ })
153
+ });
154
+ }
155
+ function AdminMain({ className, children, ...props }) {
156
+ return /*#__PURE__*/ jsx(Column, {
157
+ flex: 1,
158
+ overflow: "hidden",
159
+ className: className,
160
+ ...props,
161
+ children: children
162
+ });
163
+ }
164
+ function AdminBreadcrumb({ items }) {
165
+ return /*#__PURE__*/ jsx(Breadcrumb, {
166
+ children: /*#__PURE__*/ jsx(BreadcrumbList, {
167
+ children: items.map((item, index)=>/*#__PURE__*/ jsxs(Fragment, {
168
+ children: [
169
+ index > 0 && /*#__PURE__*/ jsx(BreadcrumbSeparator, {}),
170
+ /*#__PURE__*/ jsx(BreadcrumbItem, {
171
+ children: index === items.length - 1 ? /*#__PURE__*/ jsx(BreadcrumbPage, {
172
+ children: item.label
173
+ }) : /*#__PURE__*/ jsx(BreadcrumbLink, {
174
+ href: item.href || '#',
175
+ children: item.label
176
+ })
177
+ })
178
+ ]
179
+ }, item.label))
180
+ })
181
+ });
182
+ }
183
+ function AdminPageHeader({ title, breadcrumb, actions, tabs, activeTab, onTabChange }) {
184
+ return /*#__PURE__*/ jsxs("div", {
185
+ className: "border-b px-6 py-4",
186
+ children: [
187
+ breadcrumb && /*#__PURE__*/ jsx("div", {
188
+ className: "mb-2",
189
+ children: /*#__PURE__*/ jsx(AdminBreadcrumb, {
190
+ items: breadcrumb
191
+ })
192
+ }),
193
+ /*#__PURE__*/ jsxs(Row, {
194
+ justify: "between",
195
+ align: "center",
196
+ children: [
197
+ /*#__PURE__*/ jsx("h1", {
198
+ className: "text-xl font-semibold",
199
+ children: title
200
+ }),
201
+ actions && /*#__PURE__*/ jsx(Row, {
202
+ gap: 2,
203
+ align: "center",
204
+ children: actions
205
+ })
206
+ ]
207
+ }),
208
+ tabs && /*#__PURE__*/ jsx(Tabs, {
209
+ value: activeTab,
210
+ onValueChange: onTabChange,
211
+ className: "mt-4",
212
+ children: /*#__PURE__*/ jsx(TabsList, {
213
+ className: "h-auto bg-transparent p-0",
214
+ children: tabs.map((tab)=>/*#__PURE__*/ jsx(TabsTrigger, {
215
+ value: tab.value,
216
+ className: "rounded-none border-b-2 border-transparent px-4 pb-2 pt-1 data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none",
217
+ children: tab.label
218
+ }, tab.value))
219
+ })
220
+ })
221
+ ]
222
+ });
223
+ }
224
+ function AdminToolbar({ children, actions }) {
225
+ return /*#__PURE__*/ jsxs(Row, {
226
+ justify: "between",
227
+ align: "center",
228
+ className: "border-b px-6 py-3",
229
+ children: [
230
+ /*#__PURE__*/ jsx(Row, {
231
+ gap: 3,
232
+ align: "center",
233
+ children: children
234
+ }),
235
+ /*#__PURE__*/ jsx(Row, {
236
+ gap: 2,
237
+ align: "center",
238
+ children: actions
239
+ })
240
+ ]
241
+ });
242
+ }
243
+ function AdminFilter({ label, value, options, onValueChange }) {
244
+ return /*#__PURE__*/ jsxs(Row, {
245
+ gap: 1.5,
246
+ align: "center",
247
+ className: "text-sm",
248
+ children: [
249
+ /*#__PURE__*/ jsxs("span", {
250
+ className: "text-muted-foreground",
251
+ children: [
252
+ label,
253
+ ":"
254
+ ]
255
+ }),
256
+ /*#__PURE__*/ jsxs(Select, {
257
+ value: value,
258
+ onValueChange: onValueChange,
259
+ children: [
260
+ /*#__PURE__*/ jsx(SelectTrigger, {
261
+ className: "h-7 w-auto gap-1 border-0 bg-transparent px-1 font-medium shadow-none",
262
+ children: /*#__PURE__*/ jsx(SelectValue, {})
263
+ }),
264
+ /*#__PURE__*/ jsx(SelectContent, {
265
+ children: options.map((option)=>/*#__PURE__*/ jsx(SelectItem, {
266
+ value: option.value,
267
+ children: option.label
268
+ }, option.value))
269
+ })
270
+ ]
271
+ })
272
+ ]
273
+ });
274
+ }
275
+ function AdminPagination({ total, page, pageSize, onPageChange, onPageSizeChange }) {
276
+ const totalPages = Math.ceil(total / pageSize);
277
+ const start = (page - 1) * pageSize + 1;
278
+ const end = Math.min(page * pageSize, total);
279
+ const getPageNumbers = ()=>{
280
+ const pages = [];
281
+ const delta = 1;
282
+ for(let i = 1; i <= totalPages; i++)if (1 === i || i === totalPages || i >= page - delta && i <= page + delta) pages.push(i);
283
+ return pages;
284
+ };
285
+ const pageNumbers = getPageNumbers();
286
+ return /*#__PURE__*/ jsxs(Row, {
287
+ justify: "between",
288
+ align: "center",
289
+ className: "border-t px-6 py-3",
290
+ children: [
291
+ /*#__PURE__*/ jsxs("span", {
292
+ className: "text-sm text-muted-foreground",
293
+ children: [
294
+ start,
295
+ " - ",
296
+ end,
297
+ " / ",
298
+ total
299
+ ]
300
+ }),
301
+ /*#__PURE__*/ jsxs(Row, {
302
+ gap: 4,
303
+ align: "center",
304
+ children: [
305
+ /*#__PURE__*/ jsx(Pagination, {
306
+ children: /*#__PURE__*/ jsxs(PaginationContent, {
307
+ children: [
308
+ /*#__PURE__*/ jsx(PaginationItem, {
309
+ children: /*#__PURE__*/ jsx(Button, {
310
+ variant: "ghost",
311
+ size: "icon",
312
+ className: "h-8 w-8",
313
+ disabled: 1 === page,
314
+ onClick: ()=>onPageChange?.(1),
315
+ children: /*#__PURE__*/ jsx(ChevronsLeft, {
316
+ className: "h-4 w-4"
317
+ })
318
+ })
319
+ }),
320
+ /*#__PURE__*/ jsx(PaginationItem, {
321
+ children: /*#__PURE__*/ jsx(PaginationPrevious, {
322
+ onClick: ()=>page > 1 && onPageChange?.(page - 1),
323
+ className: cn(1 === page && 'pointer-events-none opacity-50')
324
+ })
325
+ }),
326
+ pageNumbers.map((pageNum, index)=>{
327
+ const prevPage = pageNumbers[index - 1];
328
+ const showEllipsis = prevPage && pageNum - prevPage > 1;
329
+ return /*#__PURE__*/ jsxs(Fragment, {
330
+ children: [
331
+ showEllipsis && /*#__PURE__*/ jsx(PaginationItem, {
332
+ children: /*#__PURE__*/ jsx(PaginationEllipsis, {})
333
+ }),
334
+ /*#__PURE__*/ jsx(PaginationItem, {
335
+ children: /*#__PURE__*/ jsx(PaginationLink, {
336
+ onClick: ()=>onPageChange?.(pageNum),
337
+ isActive: page === pageNum,
338
+ children: pageNum
339
+ })
340
+ })
341
+ ]
342
+ }, pageNum);
343
+ }),
344
+ /*#__PURE__*/ jsx(PaginationItem, {
345
+ children: /*#__PURE__*/ jsx(PaginationNext, {
346
+ onClick: ()=>page < totalPages && onPageChange?.(page + 1),
347
+ className: cn(page === totalPages && 'pointer-events-none opacity-50')
348
+ })
349
+ }),
350
+ /*#__PURE__*/ jsx(PaginationItem, {
351
+ children: /*#__PURE__*/ jsx(Button, {
352
+ variant: "ghost",
353
+ size: "icon",
354
+ className: "h-8 w-8",
355
+ disabled: page === totalPages,
356
+ onClick: ()=>onPageChange?.(totalPages),
357
+ children: /*#__PURE__*/ jsx(ChevronsRight, {
358
+ className: "h-4 w-4"
359
+ })
360
+ })
361
+ })
362
+ ]
363
+ })
364
+ }),
365
+ onPageSizeChange && /*#__PURE__*/ jsxs(Row, {
366
+ gap: 2,
367
+ align: "center",
368
+ className: "text-sm",
369
+ children: [
370
+ /*#__PURE__*/ jsx("span", {
371
+ className: "text-muted-foreground",
372
+ children: "Items"
373
+ }),
374
+ /*#__PURE__*/ jsxs(Select, {
375
+ value: String(pageSize),
376
+ onValueChange: (v)=>onPageSizeChange(Number(v)),
377
+ children: [
378
+ /*#__PURE__*/ jsx(SelectTrigger, {
379
+ className: "h-8 w-16",
380
+ children: /*#__PURE__*/ jsx(SelectValue, {})
381
+ }),
382
+ /*#__PURE__*/ jsxs(SelectContent, {
383
+ children: [
384
+ /*#__PURE__*/ jsx(SelectItem, {
385
+ value: "10",
386
+ children: "10"
387
+ }),
388
+ /*#__PURE__*/ jsx(SelectItem, {
389
+ value: "25",
390
+ children: "25"
391
+ }),
392
+ /*#__PURE__*/ jsx(SelectItem, {
393
+ value: "50",
394
+ children: "50"
395
+ }),
396
+ /*#__PURE__*/ jsx(SelectItem, {
397
+ value: "100",
398
+ children: "100"
399
+ })
400
+ ]
401
+ })
402
+ ]
403
+ })
404
+ ]
405
+ })
406
+ ]
407
+ })
408
+ ]
409
+ });
410
+ }
411
+ export { AdminBreadcrumb, AdminContent, AdminFilter, AdminHeader, AdminHeaderActions, AdminLayout, AdminMain, AdminPageHeader, AdminPagination, AdminSidebar, AdminSidebarHeader, AdminSidebarNav, DataTable as AdminTable, AdminToolbar, DataTableColumnHeader, DataTableSelectColumn };