@uipath/apollo-wind 0.9.1 → 0.10.0-pr219.61d64eb

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 (158) hide show
  1. package/dist/components/custom/canvas.cjs +44 -0
  2. package/dist/components/custom/canvas.d.ts +14 -0
  3. package/dist/components/custom/canvas.js +10 -0
  4. package/dist/components/custom/chat-composer.cjs +105 -0
  5. package/dist/components/custom/chat-composer.d.ts +15 -0
  6. package/dist/components/custom/chat-composer.js +71 -0
  7. package/dist/components/custom/chat-first-experience.cjs +87 -0
  8. package/dist/components/custom/chat-first-experience.d.ts +24 -0
  9. package/dist/components/custom/chat-first-experience.js +53 -0
  10. package/dist/components/custom/chat-prompt-suggestions.cjs +48 -0
  11. package/dist/components/custom/chat-prompt-suggestions.d.ts +18 -0
  12. package/dist/components/custom/chat-prompt-suggestions.js +14 -0
  13. package/dist/components/custom/chat-steps-view.cjs +307 -0
  14. package/dist/components/custom/chat-steps-view.d.ts +38 -0
  15. package/dist/components/custom/chat-steps-view.js +273 -0
  16. package/dist/components/custom/flow-node.cjs +76 -0
  17. package/dist/components/custom/flow-node.d.ts +20 -0
  18. package/dist/components/custom/flow-node.js +42 -0
  19. package/dist/components/custom/flow-properties-bar.cjs +101 -0
  20. package/dist/components/custom/flow-properties-bar.d.ts +21 -0
  21. package/dist/components/custom/flow-properties-bar.js +67 -0
  22. package/dist/components/custom/flow-properties-expanded.cjs +324 -0
  23. package/dist/components/custom/flow-properties-expanded.d.ts +19 -0
  24. package/dist/components/custom/flow-properties-expanded.js +290 -0
  25. package/dist/components/custom/flow-properties-simple.cjs +357 -0
  26. package/dist/components/custom/flow-properties-simple.d.ts +62 -0
  27. package/dist/components/custom/flow-properties-simple.js +323 -0
  28. package/dist/components/custom/flow-properties.cjs +56 -0
  29. package/dist/components/custom/flow-properties.d.ts +28 -0
  30. package/dist/components/custom/flow-properties.js +22 -0
  31. package/dist/components/custom/global-header.cjs +415 -0
  32. package/dist/components/custom/global-header.d.ts +38 -0
  33. package/dist/components/custom/global-header.js +381 -0
  34. package/dist/components/custom/grid-maestro.cjs +62 -0
  35. package/dist/components/custom/grid-maestro.d.ts +19 -0
  36. package/dist/components/custom/grid-maestro.js +22 -0
  37. package/dist/components/custom/panel-delegate.cjs +280 -0
  38. package/dist/components/custom/panel-delegate.d.ts +34 -0
  39. package/dist/components/custom/panel-delegate.js +246 -0
  40. package/dist/components/custom/panel-flow.cjs +260 -0
  41. package/dist/components/custom/panel-flow.d.ts +38 -0
  42. package/dist/components/custom/panel-flow.js +223 -0
  43. package/dist/components/custom/panel-maestro.cjs +73 -0
  44. package/dist/components/custom/panel-maestro.d.ts +30 -0
  45. package/dist/components/custom/panel-maestro.js +39 -0
  46. package/dist/components/custom/toolbar-canvas.cjs +121 -0
  47. package/dist/components/custom/toolbar-canvas.d.ts +15 -0
  48. package/dist/components/custom/toolbar-canvas.js +87 -0
  49. package/dist/components/custom/toolbar-view.cjs +119 -0
  50. package/dist/components/custom/toolbar-view.d.ts +14 -0
  51. package/dist/components/custom/toolbar-view.js +85 -0
  52. package/dist/components/custom/viewport-guard.cjs +92 -0
  53. package/dist/components/custom/viewport-guard.d.ts +23 -0
  54. package/dist/components/custom/viewport-guard.js +55 -0
  55. package/dist/components/ui/button.cjs +3 -3
  56. package/dist/components/ui/button.js +3 -3
  57. package/dist/components/ui/chart.cjs +218 -0
  58. package/dist/components/ui/chart.d.ts +40 -0
  59. package/dist/components/ui/chart.js +169 -0
  60. package/dist/components/ui/data-table.cjs +14 -2
  61. package/dist/components/ui/data-table.d.ts +4 -1
  62. package/dist/components/ui/data-table.js +15 -3
  63. package/dist/components/ui/empty-state.cjs +17 -6
  64. package/dist/components/ui/empty-state.d.ts +7 -0
  65. package/dist/components/ui/empty-state.js +17 -6
  66. package/dist/components/ui/file-upload.cjs +82 -42
  67. package/dist/components/ui/file-upload.d.ts +3 -1
  68. package/dist/components/ui/file-upload.js +82 -42
  69. package/dist/components/ui/index.cjs +289 -149
  70. package/dist/components/ui/index.d.ts +2 -3
  71. package/dist/components/ui/index.js +2 -3
  72. package/dist/components/ui/tree-view.cjs +1101 -0
  73. package/dist/components/ui/tree-view.d.ts +95 -0
  74. package/dist/components/ui/tree-view.js +1067 -0
  75. package/dist/foundation/Future/colors.cjs +92 -0
  76. package/dist/foundation/Future/colors.d.ts +132 -0
  77. package/dist/foundation/Future/colors.js +43 -0
  78. package/dist/foundation/Future/radius.cjs +46 -0
  79. package/dist/foundation/Future/radius.d.ts +33 -0
  80. package/dist/foundation/Future/radius.js +12 -0
  81. package/dist/foundation/Future/responsive.cjs +49 -0
  82. package/dist/foundation/Future/responsive.d.ts +40 -0
  83. package/dist/foundation/Future/responsive.js +12 -0
  84. package/dist/foundation/Future/shadows.cjs +48 -0
  85. package/dist/foundation/Future/shadows.d.ts +29 -0
  86. package/dist/foundation/Future/shadows.js +11 -0
  87. package/dist/foundation/Future/spacing.cjs +71 -0
  88. package/dist/foundation/Future/spacing.d.ts +80 -0
  89. package/dist/foundation/Future/spacing.js +31 -0
  90. package/dist/foundation/Future/strokes.cjs +59 -0
  91. package/dist/foundation/Future/strokes.d.ts +49 -0
  92. package/dist/foundation/Future/strokes.js +19 -0
  93. package/dist/foundation/Future/types.cjs +18 -0
  94. package/dist/foundation/Future/types.d.ts +18 -0
  95. package/dist/foundation/Future/types.js +0 -0
  96. package/dist/foundation/Future/typography.cjs +79 -0
  97. package/dist/foundation/Future/typography.d.ts +86 -0
  98. package/dist/foundation/Future/typography.js +33 -0
  99. package/dist/index.cjs +125 -219
  100. package/dist/index.d.ts +2 -3
  101. package/dist/index.js +2 -4
  102. package/dist/src/foundation/Future/themes.css +371 -0
  103. package/dist/styles.css +1704 -582
  104. package/dist/tailwind.css +4 -0
  105. package/dist/templates/Admin/settings-admin.d.ts +5 -0
  106. package/dist/templates/Admin/template-admin.d.ts +105 -0
  107. package/dist/templates/Delegate/template-delegate.d.ts +26 -0
  108. package/dist/templates/EmptyErrors/error-components.d.ts +3 -0
  109. package/dist/templates/Experiments/ideas-AnimatedGradientText.d.ts +23 -0
  110. package/dist/templates/Flow/template-flow.d.ts +52 -0
  111. package/dist/templates/Maestro/template-maestro.d.ts +52 -0
  112. package/dist/templates/{vscode-example.d.ts → VisualStudio/shell.d.ts} +1 -1
  113. package/package.json +10 -1
  114. package/dist/components/ui/menubar.cjs +0 -210
  115. package/dist/components/ui/menubar.d.ts +0 -28
  116. package/dist/components/ui/menubar.js +0 -131
  117. package/dist/components/ui/navigation-menu.cjs +0 -122
  118. package/dist/components/ui/navigation-menu.d.ts +0 -12
  119. package/dist/components/ui/navigation-menu.js +0 -64
  120. package/dist/examples/admin-layout-example.cjs +0 -490
  121. package/dist/examples/admin-layout-example.d.ts +0 -92
  122. package/dist/examples/admin-layout-example.js +0 -411
  123. package/dist/examples/app-shell-example.cjs +0 -452
  124. package/dist/examples/app-shell-example.d.ts +0 -52
  125. package/dist/examples/app-shell-example.js +0 -418
  126. package/dist/examples/dashboard-example.cjs +0 -590
  127. package/dist/examples/dashboard-example.d.ts +0 -11
  128. package/dist/examples/dashboard-example.js +0 -556
  129. package/dist/examples/data-management-example.cjs +0 -584
  130. package/dist/examples/data-management-example.d.ts +0 -1
  131. package/dist/examples/data-management-example.js +0 -550
  132. package/dist/examples/flow-editor-layout-example.cjs +0 -309
  133. package/dist/examples/flow-editor-layout-example.d.ts +0 -22
  134. package/dist/examples/flow-editor-layout-example.js +0 -269
  135. package/dist/examples/flow-start-example.cjs +0 -467
  136. package/dist/examples/flow-start-example.d.ts +0 -30
  137. package/dist/examples/flow-start-example.js +0 -433
  138. package/dist/examples/form-builder-example.cjs +0 -674
  139. package/dist/examples/form-builder-example.js +0 -640
  140. package/dist/examples/new-project-example.cjs +0 -550
  141. package/dist/examples/new-project-example.d.ts +0 -30
  142. package/dist/examples/new-project-example.js +0 -516
  143. package/dist/examples/settings-example.cjs +0 -864
  144. package/dist/examples/settings-example.d.ts +0 -1
  145. package/dist/examples/settings-example.js +0 -830
  146. package/dist/examples/vscode-example.cjs +0 -340
  147. package/dist/examples/vscode-example.d.ts +0 -80
  148. package/dist/examples/vscode-example.js +0 -270
  149. package/dist/templates/admin-layout-example.d.ts +0 -92
  150. package/dist/templates/app-shell-example.d.ts +0 -52
  151. package/dist/templates/dashboard-example.d.ts +0 -11
  152. package/dist/templates/data-management-example.d.ts +0 -1
  153. package/dist/templates/flow-editor-layout-example.d.ts +0 -22
  154. package/dist/templates/flow-start-example.d.ts +0 -30
  155. package/dist/templates/form-builder-example.d.ts +0 -1
  156. package/dist/templates/new-project-example.d.ts +0 -30
  157. package/dist/templates/settings-example.d.ts +0 -1
  158. /package/dist/{examples → templates/Forms}/form-builder-example.d.ts +0 -0
@@ -1,550 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { useMemo, useState } from "react";
3
- import { Download, Filter, MoreHorizontal, Plus, RefreshCw, Upload } from "lucide-react";
4
- import { Badge } from "../components/ui/badge.js";
5
- import { Button } from "../components/ui/button.js";
6
- import { DataTable, DataTableColumnHeader, DataTableSelectColumn } from "../components/ui/data-table.js";
7
- import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "../components/ui/dialog.js";
8
- import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "../components/ui/dropdown-menu.js";
9
- import { Input } from "../components/ui/input.js";
10
- import { Label } from "../components/ui/label.js";
11
- import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../components/ui/select.js";
12
- import { Tabs, TabsList, TabsTrigger } from "../components/ui/tabs.js";
13
- import { Column, Grid, Row } from "../components/ui/layout/index.js";
14
- const products = [
15
- {
16
- id: '1',
17
- name: 'Wireless Headphones',
18
- sku: 'WH-001',
19
- category: 'Electronics',
20
- price: 99.99,
21
- stock: 150,
22
- status: 'active',
23
- createdAt: '2024-01-10'
24
- },
25
- {
26
- id: '2',
27
- name: 'USB-C Cable',
28
- sku: 'UC-002',
29
- category: 'Accessories',
30
- price: 12.99,
31
- stock: 500,
32
- status: 'active',
33
- createdAt: '2024-01-09'
34
- },
35
- {
36
- id: '3',
37
- name: 'Laptop Stand',
38
- sku: 'LS-003',
39
- category: 'Accessories',
40
- price: 49.99,
41
- stock: 75,
42
- status: 'active',
43
- createdAt: '2024-01-08'
44
- },
45
- {
46
- id: '4',
47
- name: 'Mechanical Keyboard',
48
- sku: 'MK-004',
49
- category: 'Electronics',
50
- price: 149.99,
51
- stock: 0,
52
- status: 'draft',
53
- createdAt: '2024-01-07'
54
- },
55
- {
56
- id: '5',
57
- name: 'Monitor Light Bar',
58
- sku: 'ML-005',
59
- category: 'Electronics',
60
- price: 59.99,
61
- stock: 200,
62
- status: 'active',
63
- createdAt: '2024-01-06'
64
- },
65
- {
66
- id: '6',
67
- name: 'Webcam HD',
68
- sku: 'WC-006',
69
- category: 'Electronics',
70
- price: 79.99,
71
- stock: 45,
72
- status: 'active',
73
- createdAt: '2024-01-05'
74
- },
75
- {
76
- id: '7',
77
- name: 'Mouse Pad XL',
78
- sku: 'MP-007',
79
- category: 'Accessories',
80
- price: 24.99,
81
- stock: 300,
82
- status: 'active',
83
- createdAt: '2024-01-04'
84
- },
85
- {
86
- id: '8',
87
- name: 'Phone Holder',
88
- sku: 'PH-008',
89
- category: 'Accessories',
90
- price: 19.99,
91
- stock: 0,
92
- status: 'archived',
93
- createdAt: '2024-01-03'
94
- },
95
- {
96
- id: '9',
97
- name: 'Bluetooth Speaker',
98
- sku: 'BS-009',
99
- category: 'Electronics',
100
- price: 39.99,
101
- stock: 120,
102
- status: 'active',
103
- createdAt: '2024-01-02'
104
- },
105
- {
106
- id: '10',
107
- name: 'Screen Protector',
108
- sku: 'SP-010',
109
- category: 'Accessories',
110
- price: 9.99,
111
- stock: 1000,
112
- status: 'active',
113
- createdAt: '2024-01-01'
114
- }
115
- ];
116
- const columns = [
117
- DataTableSelectColumn(),
118
- {
119
- accessorKey: 'name',
120
- header: ({ column })=>/*#__PURE__*/ jsx(DataTableColumnHeader, {
121
- column: column,
122
- title: "Product"
123
- }),
124
- cell: ({ row })=>/*#__PURE__*/ jsxs("div", {
125
- children: [
126
- /*#__PURE__*/ jsx("div", {
127
- className: "font-medium",
128
- children: row.original.name
129
- }),
130
- /*#__PURE__*/ jsx("div", {
131
- className: "text-xs text-muted-foreground",
132
- children: row.original.sku
133
- })
134
- ]
135
- })
136
- },
137
- {
138
- accessorKey: 'category',
139
- header: ({ column })=>/*#__PURE__*/ jsx(DataTableColumnHeader, {
140
- column: column,
141
- title: "Category"
142
- })
143
- },
144
- {
145
- accessorKey: 'price',
146
- header: ({ column })=>/*#__PURE__*/ jsx(DataTableColumnHeader, {
147
- column: column,
148
- title: "Price"
149
- }),
150
- cell: ({ row })=>{
151
- const price = parseFloat(row.getValue('price'));
152
- return new Intl.NumberFormat('en-US', {
153
- style: 'currency',
154
- currency: 'USD'
155
- }).format(price);
156
- }
157
- },
158
- {
159
- accessorKey: 'stock',
160
- header: ({ column })=>/*#__PURE__*/ jsx(DataTableColumnHeader, {
161
- column: column,
162
- title: "Stock"
163
- }),
164
- cell: ({ row })=>{
165
- const stock = row.getValue('stock');
166
- return /*#__PURE__*/ jsx("span", {
167
- className: 0 === stock ? 'text-destructive font-medium' : '',
168
- children: 0 === stock ? 'Out of stock' : stock
169
- });
170
- }
171
- },
172
- {
173
- accessorKey: 'status',
174
- header: ({ column })=>/*#__PURE__*/ jsx(DataTableColumnHeader, {
175
- column: column,
176
- title: "Status"
177
- }),
178
- cell: ({ row })=>{
179
- const status = row.getValue('status');
180
- return /*#__PURE__*/ jsx(Badge, {
181
- variant: 'active' === status ? 'default' : 'draft' === status ? 'secondary' : 'outline',
182
- children: status
183
- });
184
- }
185
- },
186
- {
187
- accessorKey: 'createdAt',
188
- header: ({ column })=>/*#__PURE__*/ jsx(DataTableColumnHeader, {
189
- column: column,
190
- title: "Created"
191
- })
192
- },
193
- {
194
- id: 'actions',
195
- cell: ()=>/*#__PURE__*/ jsxs(DropdownMenu, {
196
- children: [
197
- /*#__PURE__*/ jsx(DropdownMenuTrigger, {
198
- asChild: true,
199
- children: /*#__PURE__*/ jsx(Button, {
200
- variant: "ghost",
201
- size: "icon",
202
- className: "h-8 w-8",
203
- children: /*#__PURE__*/ jsx(MoreHorizontal, {
204
- className: "h-4 w-4"
205
- })
206
- })
207
- }),
208
- /*#__PURE__*/ jsxs(DropdownMenuContent, {
209
- align: "end",
210
- children: [
211
- /*#__PURE__*/ jsx(DropdownMenuItem, {
212
- children: "Edit"
213
- }),
214
- /*#__PURE__*/ jsx(DropdownMenuItem, {
215
- children: "Duplicate"
216
- }),
217
- /*#__PURE__*/ jsx(DropdownMenuSeparator, {}),
218
- /*#__PURE__*/ jsx(DropdownMenuItem, {
219
- className: "text-destructive",
220
- children: "Delete"
221
- })
222
- ]
223
- })
224
- ]
225
- })
226
- }
227
- ];
228
- function DataManagementExample() {
229
- const [activeTab, setActiveTab] = useState('all');
230
- const [categoryFilter, setCategoryFilter] = useState('all');
231
- const [isCreateDialogOpen, setIsCreateDialogOpen] = useState(false);
232
- const filteredProducts = useMemo(()=>{
233
- let filtered = products;
234
- if ('all' !== activeTab) filtered = filtered.filter((p)=>p.status === activeTab);
235
- if ('all' !== categoryFilter) filtered = filtered.filter((p)=>p.category === categoryFilter);
236
- return filtered;
237
- }, [
238
- activeTab,
239
- categoryFilter
240
- ]);
241
- const categories = [
242
- ...new Set(products.map((p)=>p.category))
243
- ];
244
- return /*#__PURE__*/ jsxs(Column, {
245
- minH: "screen",
246
- className: "bg-background",
247
- children: [
248
- /*#__PURE__*/ jsx("header", {
249
- className: "border-b",
250
- children: /*#__PURE__*/ jsxs(Row, {
251
- h: 14,
252
- justify: "between",
253
- align: "center",
254
- className: "container mx-auto px-4",
255
- children: [
256
- /*#__PURE__*/ jsx(Column, {
257
- gap: 0,
258
- children: /*#__PURE__*/ jsx("h1", {
259
- className: "text-lg font-semibold",
260
- children: "Products"
261
- })
262
- }),
263
- /*#__PURE__*/ jsxs(Row, {
264
- gap: 2,
265
- align: "center",
266
- children: [
267
- /*#__PURE__*/ jsxs(Button, {
268
- variant: "outline",
269
- size: "sm",
270
- children: [
271
- /*#__PURE__*/ jsx(Upload, {
272
- className: "mr-2 h-4 w-4"
273
- }),
274
- "Import"
275
- ]
276
- }),
277
- /*#__PURE__*/ jsxs(Button, {
278
- variant: "outline",
279
- size: "sm",
280
- children: [
281
- /*#__PURE__*/ jsx(Download, {
282
- className: "mr-2 h-4 w-4"
283
- }),
284
- "Export"
285
- ]
286
- }),
287
- /*#__PURE__*/ jsxs(Dialog, {
288
- open: isCreateDialogOpen,
289
- onOpenChange: setIsCreateDialogOpen,
290
- children: [
291
- /*#__PURE__*/ jsx(DialogTrigger, {
292
- asChild: true,
293
- children: /*#__PURE__*/ jsxs(Button, {
294
- size: "sm",
295
- children: [
296
- /*#__PURE__*/ jsx(Plus, {
297
- className: "mr-2 h-4 w-4"
298
- }),
299
- "Add Product"
300
- ]
301
- })
302
- }),
303
- /*#__PURE__*/ jsxs(DialogContent, {
304
- children: [
305
- /*#__PURE__*/ jsxs(DialogHeader, {
306
- children: [
307
- /*#__PURE__*/ jsx(DialogTitle, {
308
- children: "Add New Product"
309
- }),
310
- /*#__PURE__*/ jsx(DialogDescription, {
311
- children: "Enter the details for the new product."
312
- })
313
- ]
314
- }),
315
- /*#__PURE__*/ jsxs(Column, {
316
- gap: 4,
317
- className: "py-4",
318
- children: [
319
- /*#__PURE__*/ jsxs(Column, {
320
- gap: 2,
321
- children: [
322
- /*#__PURE__*/ jsx(Label, {
323
- htmlFor: "productName",
324
- children: "Product name"
325
- }),
326
- /*#__PURE__*/ jsx(Input, {
327
- id: "productName",
328
- placeholder: "Enter product name"
329
- })
330
- ]
331
- }),
332
- /*#__PURE__*/ jsxs(Grid, {
333
- cols: 2,
334
- gap: 4,
335
- children: [
336
- /*#__PURE__*/ jsxs(Column, {
337
- gap: 2,
338
- children: [
339
- /*#__PURE__*/ jsx(Label, {
340
- htmlFor: "sku",
341
- children: "SKU"
342
- }),
343
- /*#__PURE__*/ jsx(Input, {
344
- id: "sku",
345
- placeholder: "XX-000"
346
- })
347
- ]
348
- }),
349
- /*#__PURE__*/ jsxs(Column, {
350
- gap: 2,
351
- children: [
352
- /*#__PURE__*/ jsx(Label, {
353
- htmlFor: "price",
354
- children: "Price"
355
- }),
356
- /*#__PURE__*/ jsx(Input, {
357
- id: "price",
358
- type: "number",
359
- placeholder: "0.00"
360
- })
361
- ]
362
- })
363
- ]
364
- }),
365
- /*#__PURE__*/ jsxs(Column, {
366
- gap: 2,
367
- children: [
368
- /*#__PURE__*/ jsx(Label, {
369
- htmlFor: "category",
370
- children: "Category"
371
- }),
372
- /*#__PURE__*/ jsxs(Select, {
373
- children: [
374
- /*#__PURE__*/ jsx(SelectTrigger, {
375
- id: "category",
376
- children: /*#__PURE__*/ jsx(SelectValue, {
377
- placeholder: "Select category"
378
- })
379
- }),
380
- /*#__PURE__*/ jsx(SelectContent, {
381
- children: categories.map((cat)=>/*#__PURE__*/ jsx(SelectItem, {
382
- value: cat,
383
- children: cat
384
- }, cat))
385
- })
386
- ]
387
- })
388
- ]
389
- }),
390
- /*#__PURE__*/ jsxs(Column, {
391
- gap: 2,
392
- children: [
393
- /*#__PURE__*/ jsx(Label, {
394
- htmlFor: "stock",
395
- children: "Initial stock"
396
- }),
397
- /*#__PURE__*/ jsx(Input, {
398
- id: "stock",
399
- type: "number",
400
- placeholder: "0"
401
- })
402
- ]
403
- })
404
- ]
405
- }),
406
- /*#__PURE__*/ jsxs(DialogFooter, {
407
- children: [
408
- /*#__PURE__*/ jsx(Button, {
409
- variant: "outline",
410
- onClick: ()=>setIsCreateDialogOpen(false),
411
- children: "Cancel"
412
- }),
413
- /*#__PURE__*/ jsx(Button, {
414
- onClick: ()=>setIsCreateDialogOpen(false),
415
- children: "Create product"
416
- })
417
- ]
418
- })
419
- ]
420
- })
421
- ]
422
- })
423
- ]
424
- })
425
- ]
426
- })
427
- }),
428
- /*#__PURE__*/ jsxs("main", {
429
- className: "container mx-auto p-4 md:p-6",
430
- children: [
431
- /*#__PURE__*/ jsxs(Row, {
432
- gap: 4,
433
- justify: "between",
434
- align: "center",
435
- className: "mb-4 flex-col sm:flex-row sm:items-center",
436
- children: [
437
- /*#__PURE__*/ jsx(Tabs, {
438
- value: activeTab,
439
- onValueChange: setActiveTab,
440
- children: /*#__PURE__*/ jsxs(TabsList, {
441
- children: [
442
- /*#__PURE__*/ jsxs(TabsTrigger, {
443
- value: "all",
444
- children: [
445
- "All",
446
- ' ',
447
- /*#__PURE__*/ jsx(Badge, {
448
- variant: "secondary",
449
- className: "ml-2",
450
- children: products.length
451
- })
452
- ]
453
- }),
454
- /*#__PURE__*/ jsxs(TabsTrigger, {
455
- value: "active",
456
- children: [
457
- "Active",
458
- ' ',
459
- /*#__PURE__*/ jsx(Badge, {
460
- variant: "secondary",
461
- className: "ml-2",
462
- children: products.filter((p)=>'active' === p.status).length
463
- })
464
- ]
465
- }),
466
- /*#__PURE__*/ jsxs(TabsTrigger, {
467
- value: "draft",
468
- children: [
469
- "Draft",
470
- ' ',
471
- /*#__PURE__*/ jsx(Badge, {
472
- variant: "secondary",
473
- className: "ml-2",
474
- children: products.filter((p)=>'draft' === p.status).length
475
- })
476
- ]
477
- }),
478
- /*#__PURE__*/ jsxs(TabsTrigger, {
479
- value: "archived",
480
- children: [
481
- "Archived",
482
- ' ',
483
- /*#__PURE__*/ jsx(Badge, {
484
- variant: "secondary",
485
- className: "ml-2",
486
- children: products.filter((p)=>'archived' === p.status).length
487
- })
488
- ]
489
- })
490
- ]
491
- })
492
- }),
493
- /*#__PURE__*/ jsxs(Row, {
494
- gap: 2,
495
- align: "center",
496
- children: [
497
- /*#__PURE__*/ jsxs(Select, {
498
- value: categoryFilter,
499
- onValueChange: setCategoryFilter,
500
- children: [
501
- /*#__PURE__*/ jsxs(SelectTrigger, {
502
- className: "w-[150px]",
503
- children: [
504
- /*#__PURE__*/ jsx(Filter, {
505
- className: "mr-2 h-4 w-4"
506
- }),
507
- /*#__PURE__*/ jsx(SelectValue, {
508
- placeholder: "Category"
509
- })
510
- ]
511
- }),
512
- /*#__PURE__*/ jsxs(SelectContent, {
513
- children: [
514
- /*#__PURE__*/ jsx(SelectItem, {
515
- value: "all",
516
- children: "All categories"
517
- }),
518
- categories.map((cat)=>/*#__PURE__*/ jsx(SelectItem, {
519
- value: cat,
520
- children: cat
521
- }, cat))
522
- ]
523
- })
524
- ]
525
- }),
526
- /*#__PURE__*/ jsx(Button, {
527
- variant: "outline",
528
- size: "icon",
529
- children: /*#__PURE__*/ jsx(RefreshCw, {
530
- className: "h-4 w-4"
531
- })
532
- })
533
- ]
534
- })
535
- ]
536
- }),
537
- /*#__PURE__*/ jsx(DataTable, {
538
- columns: columns,
539
- data: filteredProducts,
540
- searchKey: "name",
541
- searchPlaceholder: "Search products...",
542
- resizable: true,
543
- compact: true
544
- })
545
- ]
546
- })
547
- ]
548
- });
549
- }
550
- export { DataManagementExample };