@uipath/apollo-wind 0.9.0 → 0.10.0-pr257.2a4b17b

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 (145) hide show
  1. package/dist/components/forms/field-renderer.cjs +120 -69
  2. package/dist/components/forms/field-renderer.js +120 -69
  3. package/dist/components/forms/form-designer.cjs +2352 -1488
  4. package/dist/components/forms/form-designer.js +2353 -1489
  5. package/dist/components/forms/form-examples.cjs +10 -10
  6. package/dist/components/forms/form-examples.js +10 -10
  7. package/dist/components/forms/form-state-viewer.cjs +988 -433
  8. package/dist/components/forms/form-state-viewer.js +988 -433
  9. package/dist/components/forms/metadata-form.cjs +446 -170
  10. package/dist/components/forms/metadata-form.js +446 -170
  11. package/dist/components/forms/schema-viewer.cjs +173 -80
  12. package/dist/components/forms/schema-viewer.js +173 -80
  13. package/dist/components/ui/accordion.cjs +131 -27
  14. package/dist/components/ui/accordion.js +131 -27
  15. package/dist/components/ui/alert-dialog.cjs +273 -45
  16. package/dist/components/ui/alert-dialog.js +273 -45
  17. package/dist/components/ui/alert.cjs +106 -17
  18. package/dist/components/ui/alert.js +106 -17
  19. package/dist/components/ui/avatar.cjs +100 -15
  20. package/dist/components/ui/avatar.js +100 -15
  21. package/dist/components/ui/badge.cjs +36 -6
  22. package/dist/components/ui/badge.js +36 -6
  23. package/dist/components/ui/breadcrumb.cjs +258 -52
  24. package/dist/components/ui/breadcrumb.js +258 -52
  25. package/dist/components/ui/button-group.cjs +119 -19
  26. package/dist/components/ui/button-group.js +119 -19
  27. package/dist/components/ui/button.cjs +48 -8
  28. package/dist/components/ui/button.js +48 -8
  29. package/dist/components/ui/calendar.cjs +88 -30
  30. package/dist/components/ui/calendar.js +88 -30
  31. package/dist/components/ui/card.cjs +199 -30
  32. package/dist/components/ui/card.js +199 -30
  33. package/dist/components/ui/checkbox.cjs +42 -8
  34. package/dist/components/ui/checkbox.js +42 -8
  35. package/dist/components/ui/combobox.cjs +150 -53
  36. package/dist/components/ui/combobox.js +150 -53
  37. package/dist/components/ui/command.cjs +291 -53
  38. package/dist/components/ui/command.js +291 -53
  39. package/dist/components/ui/context-menu.cjs +370 -72
  40. package/dist/components/ui/context-menu.js +370 -72
  41. package/dist/components/ui/data-table.cjs +76 -39
  42. package/dist/components/ui/data-table.js +76 -39
  43. package/dist/components/ui/date-picker.cjs +179 -68
  44. package/dist/components/ui/date-picker.js +179 -68
  45. package/dist/components/ui/datetime-picker.cjs +225 -104
  46. package/dist/components/ui/datetime-picker.js +225 -104
  47. package/dist/components/ui/dialog.cjs +290 -78
  48. package/dist/components/ui/dialog.js +290 -78
  49. package/dist/components/ui/drawer.cjs +220 -39
  50. package/dist/components/ui/drawer.js +220 -39
  51. package/dist/components/ui/dropdown-menu.cjs +376 -73
  52. package/dist/components/ui/dropdown-menu.js +376 -73
  53. package/dist/components/ui/editable-cell.cjs +106 -42
  54. package/dist/components/ui/editable-cell.js +106 -42
  55. package/dist/components/ui/empty-state.cjs +106 -33
  56. package/dist/components/ui/empty-state.js +106 -33
  57. package/dist/components/ui/file-upload.cjs +405 -187
  58. package/dist/components/ui/file-upload.d.ts +3 -1
  59. package/dist/components/ui/file-upload.js +405 -187
  60. package/dist/components/ui/hover-card.cjs +46 -7
  61. package/dist/components/ui/hover-card.js +46 -7
  62. package/dist/components/ui/index.cjs +4 -4
  63. package/dist/components/ui/input.cjs +39 -6
  64. package/dist/components/ui/input.js +39 -6
  65. package/dist/components/ui/label.cjs +34 -5
  66. package/dist/components/ui/label.js +34 -5
  67. package/dist/components/ui/layout/column.cjs +209 -41
  68. package/dist/components/ui/layout/column.js +209 -41
  69. package/dist/components/ui/layout/grid.cjs +275 -60
  70. package/dist/components/ui/layout/grid.js +275 -60
  71. package/dist/components/ui/layout/row.cjs +209 -41
  72. package/dist/components/ui/layout/row.js +209 -41
  73. package/dist/components/ui/menubar.cjs +540 -106
  74. package/dist/components/ui/menubar.js +540 -106
  75. package/dist/components/ui/multi-select.cjs +289 -135
  76. package/dist/components/ui/multi-select.js +289 -135
  77. package/dist/components/ui/navigation-menu.cjs +244 -47
  78. package/dist/components/ui/navigation-menu.js +244 -47
  79. package/dist/components/ui/pagination.cjs +301 -65
  80. package/dist/components/ui/pagination.js +301 -65
  81. package/dist/components/ui/popover.cjs +48 -9
  82. package/dist/components/ui/popover.js +48 -9
  83. package/dist/components/ui/progress.cjs +48 -8
  84. package/dist/components/ui/progress.js +48 -8
  85. package/dist/components/ui/radio-group.cjs +74 -12
  86. package/dist/components/ui/radio-group.js +74 -12
  87. package/dist/components/ui/resizable.cjs +75 -10
  88. package/dist/components/ui/resizable.js +75 -10
  89. package/dist/components/ui/scroll-area.cjs +113 -21
  90. package/dist/components/ui/scroll-area.js +113 -21
  91. package/dist/components/ui/search.cjs +280 -98
  92. package/dist/components/ui/search.js +280 -98
  93. package/dist/components/ui/select.cjs +334 -68
  94. package/dist/components/ui/select.js +334 -68
  95. package/dist/components/ui/separator.cjs +48 -7
  96. package/dist/components/ui/separator.js +48 -7
  97. package/dist/components/ui/sheet.cjs +236 -50
  98. package/dist/components/ui/sheet.js +236 -50
  99. package/dist/components/ui/skeleton.cjs +31 -5
  100. package/dist/components/ui/skeleton.js +31 -5
  101. package/dist/components/ui/slider.cjs +71 -21
  102. package/dist/components/ui/slider.js +71 -21
  103. package/dist/components/ui/sonner.cjs +43 -15
  104. package/dist/components/ui/sonner.js +43 -15
  105. package/dist/components/ui/spinner.cjs +83 -21
  106. package/dist/components/ui/spinner.js +83 -21
  107. package/dist/components/ui/stats-card.cjs +169 -60
  108. package/dist/components/ui/stats-card.js +169 -60
  109. package/dist/components/ui/stepper.cjs +126 -57
  110. package/dist/components/ui/stepper.js +126 -57
  111. package/dist/components/ui/switch.cjs +42 -8
  112. package/dist/components/ui/switch.js +42 -8
  113. package/dist/components/ui/table.cjs +267 -42
  114. package/dist/components/ui/table.js +267 -42
  115. package/dist/components/ui/tabs.cjs +100 -15
  116. package/dist/components/ui/tabs.js +100 -15
  117. package/dist/components/ui/textarea.cjs +34 -5
  118. package/dist/components/ui/textarea.js +34 -5
  119. package/dist/components/ui/toggle-group.cjs +112 -19
  120. package/dist/components/ui/toggle-group.js +112 -19
  121. package/dist/components/ui/toggle.cjs +43 -6
  122. package/dist/components/ui/toggle.js +43 -6
  123. package/dist/components/ui/tooltip.cjs +40 -6
  124. package/dist/components/ui/tooltip.js +40 -6
  125. package/dist/examples/admin-layout-example.cjs +879 -347
  126. package/dist/examples/admin-layout-example.js +879 -347
  127. package/dist/examples/app-shell-example.cjs +14 -14
  128. package/dist/examples/app-shell-example.js +14 -14
  129. package/dist/examples/dashboard-example.cjs +495 -334
  130. package/dist/examples/dashboard-example.js +495 -334
  131. package/dist/examples/data-management-example.cjs +501 -303
  132. package/dist/examples/data-management-example.js +502 -304
  133. package/dist/examples/flow-editor-layout-example.cjs +435 -231
  134. package/dist/examples/flow-editor-layout-example.js +436 -232
  135. package/dist/examples/flow-start-example.cjs +508 -251
  136. package/dist/examples/flow-start-example.js +509 -252
  137. package/dist/examples/form-builder-example.cjs +1006 -602
  138. package/dist/examples/form-builder-example.js +1007 -603
  139. package/dist/examples/new-project-example.cjs +806 -474
  140. package/dist/examples/new-project-example.js +807 -475
  141. package/dist/examples/settings-example.cjs +792 -704
  142. package/dist/examples/settings-example.js +792 -704
  143. package/dist/examples/vscode-example.cjs +731 -236
  144. package/dist/examples/vscode-example.js +731 -236
  145. package/package.json +4 -1
@@ -1,5 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { useMemo, useState } from "react";
2
+ import { c } from "react/compiler-runtime";
3
+ import { useState } from "react";
3
4
  import { Download, Filter, MoreHorizontal, Plus, RefreshCw, Upload } from "lucide-react";
4
5
  import { Badge } from "../components/ui/badge.js";
5
6
  import { Button } from "../components/ui/button.js";
@@ -226,325 +227,522 @@ const columns = [
226
227
  }
227
228
  ];
228
229
  function DataManagementExample() {
229
- const [activeTab, setActiveTab] = useState('all');
230
- const [categoryFilter, setCategoryFilter] = useState('all');
230
+ const $ = c(48);
231
+ const [activeTab, setActiveTab] = useState("all");
232
+ const [categoryFilter, setCategoryFilter] = useState("all");
231
233
  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",
234
+ let filtered;
235
+ if ($[0] !== activeTab || $[1] !== categoryFilter) {
236
+ filtered = products;
237
+ if ("all" !== activeTab) {
238
+ let t0;
239
+ if ($[3] !== activeTab) {
240
+ t0 = (p)=>p.status === activeTab;
241
+ $[3] = activeTab;
242
+ $[4] = t0;
243
+ } else t0 = $[4];
244
+ filtered = products.filter(t0);
245
+ }
246
+ if ("all" !== categoryFilter) {
247
+ let t0;
248
+ if ($[5] !== categoryFilter) {
249
+ t0 = (p_0)=>p_0.category === categoryFilter;
250
+ $[5] = categoryFilter;
251
+ $[6] = t0;
252
+ } else t0 = $[6];
253
+ filtered = filtered.filter(t0);
254
+ }
255
+ $[0] = activeTab;
256
+ $[1] = categoryFilter;
257
+ $[2] = filtered;
258
+ } else filtered = $[2];
259
+ const filteredProducts = filtered;
260
+ let t0;
261
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
262
+ t0 = [
263
+ ...new Set(products.map(_temp))
264
+ ];
265
+ $[7] = t0;
266
+ } else t0 = $[7];
267
+ const categories = t0;
268
+ let t1;
269
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
270
+ t1 = /*#__PURE__*/ jsx(Column, {
271
+ gap: 0,
272
+ children: /*#__PURE__*/ jsx("h1", {
273
+ className: "text-lg font-semibold",
274
+ children: "Products"
275
+ })
276
+ });
277
+ $[8] = t1;
278
+ } else t1 = $[8];
279
+ let t2;
280
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
281
+ t2 = /*#__PURE__*/ jsxs(Button, {
282
+ variant: "outline",
283
+ size: "sm",
284
+ children: [
285
+ /*#__PURE__*/ jsx(Upload, {
286
+ className: "mr-2 h-4 w-4"
287
+ }),
288
+ "Import"
289
+ ]
290
+ });
291
+ $[9] = t2;
292
+ } else t2 = $[9];
293
+ let t3;
294
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
295
+ t3 = /*#__PURE__*/ jsxs(Button, {
296
+ variant: "outline",
297
+ size: "sm",
298
+ children: [
299
+ /*#__PURE__*/ jsx(Download, {
300
+ className: "mr-2 h-4 w-4"
301
+ }),
302
+ "Export"
303
+ ]
304
+ });
305
+ $[10] = t3;
306
+ } else t3 = $[10];
307
+ let t4;
308
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
309
+ t4 = /*#__PURE__*/ jsx(DialogTrigger, {
310
+ asChild: true,
311
+ children: /*#__PURE__*/ jsxs(Button, {
312
+ size: "sm",
313
+ children: [
314
+ /*#__PURE__*/ jsx(Plus, {
315
+ className: "mr-2 h-4 w-4"
316
+ }),
317
+ "Add Product"
318
+ ]
319
+ })
320
+ });
321
+ $[11] = t4;
322
+ } else t4 = $[11];
323
+ let t5;
324
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
325
+ t5 = /*#__PURE__*/ jsxs(DialogHeader, {
326
+ children: [
327
+ /*#__PURE__*/ jsx(DialogTitle, {
328
+ children: "Add New Product"
329
+ }),
330
+ /*#__PURE__*/ jsx(DialogDescription, {
331
+ children: "Enter the details for the new product."
332
+ })
333
+ ]
334
+ });
335
+ $[12] = t5;
336
+ } else t5 = $[12];
337
+ let t6;
338
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
339
+ t6 = /*#__PURE__*/ jsxs(Column, {
340
+ gap: 2,
341
+ children: [
342
+ /*#__PURE__*/ jsx(Label, {
343
+ htmlFor: "productName",
344
+ children: "Product name"
345
+ }),
346
+ /*#__PURE__*/ jsx(Input, {
347
+ id: "productName",
348
+ placeholder: "Enter product name"
349
+ })
350
+ ]
351
+ });
352
+ $[13] = t6;
353
+ } else t6 = $[13];
354
+ let t7;
355
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
356
+ t7 = /*#__PURE__*/ jsxs(Column, {
357
+ gap: 2,
358
+ children: [
359
+ /*#__PURE__*/ jsx(Label, {
360
+ htmlFor: "sku",
361
+ children: "SKU"
362
+ }),
363
+ /*#__PURE__*/ jsx(Input, {
364
+ id: "sku",
365
+ placeholder: "XX-000"
366
+ })
367
+ ]
368
+ });
369
+ $[14] = t7;
370
+ } else t7 = $[14];
371
+ let t8;
372
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
373
+ t8 = /*#__PURE__*/ jsxs(Grid, {
374
+ cols: 2,
375
+ gap: 4,
376
+ children: [
377
+ t7,
378
+ /*#__PURE__*/ jsxs(Column, {
379
+ gap: 2,
255
380
  children: [
256
- /*#__PURE__*/ jsx(Column, {
257
- gap: 0,
258
- children: /*#__PURE__*/ jsx("h1", {
259
- className: "text-lg font-semibold",
260
- children: "Products"
261
- })
381
+ /*#__PURE__*/ jsx(Label, {
382
+ htmlFor: "price",
383
+ children: "Price"
262
384
  }),
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
- ]
385
+ /*#__PURE__*/ jsx(Input, {
386
+ id: "price",
387
+ type: "number",
388
+ placeholder: "0.00"
424
389
  })
425
390
  ]
426
391
  })
427
- }),
428
- /*#__PURE__*/ jsxs("main", {
429
- className: "container mx-auto p-4 md:p-6",
392
+ ]
393
+ });
394
+ $[15] = t8;
395
+ } else t8 = $[15];
396
+ let t9;
397
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
398
+ t9 = /*#__PURE__*/ jsx(Label, {
399
+ htmlFor: "category",
400
+ children: "Category"
401
+ });
402
+ $[16] = t9;
403
+ } else t9 = $[16];
404
+ let t10;
405
+ if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
406
+ t10 = /*#__PURE__*/ jsx(SelectTrigger, {
407
+ id: "category",
408
+ children: /*#__PURE__*/ jsx(SelectValue, {
409
+ placeholder: "Select category"
410
+ })
411
+ });
412
+ $[17] = t10;
413
+ } else t10 = $[17];
414
+ let t11;
415
+ if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
416
+ t11 = /*#__PURE__*/ jsxs(Column, {
417
+ gap: 2,
418
+ children: [
419
+ t9,
420
+ /*#__PURE__*/ jsxs(Select, {
421
+ children: [
422
+ t10,
423
+ /*#__PURE__*/ jsx(SelectContent, {
424
+ children: categories.map(_temp2)
425
+ })
426
+ ]
427
+ })
428
+ ]
429
+ });
430
+ $[18] = t11;
431
+ } else t11 = $[18];
432
+ let t12;
433
+ if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
434
+ t12 = /*#__PURE__*/ jsxs(Column, {
435
+ gap: 4,
436
+ className: "py-4",
437
+ children: [
438
+ t6,
439
+ t8,
440
+ t11,
441
+ /*#__PURE__*/ jsxs(Column, {
442
+ gap: 2,
443
+ children: [
444
+ /*#__PURE__*/ jsx(Label, {
445
+ htmlFor: "stock",
446
+ children: "Initial stock"
447
+ }),
448
+ /*#__PURE__*/ jsx(Input, {
449
+ id: "stock",
450
+ type: "number",
451
+ placeholder: "0"
452
+ })
453
+ ]
454
+ })
455
+ ]
456
+ });
457
+ $[19] = t12;
458
+ } else t12 = $[19];
459
+ let t13;
460
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
461
+ t13 = /*#__PURE__*/ jsx(Button, {
462
+ variant: "outline",
463
+ onClick: ()=>setIsCreateDialogOpen(false),
464
+ children: "Cancel"
465
+ });
466
+ $[20] = t13;
467
+ } else t13 = $[20];
468
+ let t14;
469
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
470
+ t14 = /*#__PURE__*/ jsxs(DialogContent, {
471
+ children: [
472
+ t5,
473
+ t12,
474
+ /*#__PURE__*/ jsxs(DialogFooter, {
475
+ children: [
476
+ t13,
477
+ /*#__PURE__*/ jsx(Button, {
478
+ onClick: ()=>setIsCreateDialogOpen(false),
479
+ children: "Create product"
480
+ })
481
+ ]
482
+ })
483
+ ]
484
+ });
485
+ $[21] = t14;
486
+ } else t14 = $[21];
487
+ let t15;
488
+ if ($[22] !== isCreateDialogOpen) {
489
+ t15 = /*#__PURE__*/ jsx("header", {
490
+ className: "border-b",
491
+ children: /*#__PURE__*/ jsxs(Row, {
492
+ h: 14,
493
+ justify: "between",
494
+ align: "center",
495
+ className: "container mx-auto px-4",
430
496
  children: [
497
+ t1,
431
498
  /*#__PURE__*/ jsxs(Row, {
432
- gap: 4,
433
- justify: "between",
499
+ gap: 2,
434
500
  align: "center",
435
- className: "mb-4 flex-col sm:flex-row sm:items-center",
436
501
  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",
502
+ t2,
503
+ t3,
504
+ /*#__PURE__*/ jsxs(Dialog, {
505
+ open: isCreateDialogOpen,
506
+ onOpenChange: setIsCreateDialogOpen,
496
507
  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
- })
508
+ t4,
509
+ t14
533
510
  ]
534
511
  })
535
512
  ]
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
513
  })
545
514
  ]
546
515
  })
547
- ]
548
- });
516
+ });
517
+ $[22] = isCreateDialogOpen;
518
+ $[23] = t15;
519
+ } else t15 = $[23];
520
+ let t16;
521
+ if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
522
+ t16 = /*#__PURE__*/ jsxs(TabsTrigger, {
523
+ value: "all",
524
+ children: [
525
+ "All",
526
+ " ",
527
+ /*#__PURE__*/ jsx(Badge, {
528
+ variant: "secondary",
529
+ className: "ml-2",
530
+ children: products.length
531
+ })
532
+ ]
533
+ });
534
+ $[24] = t16;
535
+ } else t16 = $[24];
536
+ let t17;
537
+ if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
538
+ t17 = /*#__PURE__*/ jsxs(TabsTrigger, {
539
+ value: "active",
540
+ children: [
541
+ "Active",
542
+ " ",
543
+ /*#__PURE__*/ jsx(Badge, {
544
+ variant: "secondary",
545
+ className: "ml-2",
546
+ children: products.filter(_temp3).length
547
+ })
548
+ ]
549
+ });
550
+ $[25] = t17;
551
+ } else t17 = $[25];
552
+ let t18;
553
+ if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
554
+ t18 = /*#__PURE__*/ jsxs(TabsTrigger, {
555
+ value: "draft",
556
+ children: [
557
+ "Draft",
558
+ " ",
559
+ /*#__PURE__*/ jsx(Badge, {
560
+ variant: "secondary",
561
+ className: "ml-2",
562
+ children: products.filter(_temp4).length
563
+ })
564
+ ]
565
+ });
566
+ $[26] = t18;
567
+ } else t18 = $[26];
568
+ let t19;
569
+ if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
570
+ t19 = /*#__PURE__*/ jsxs(TabsList, {
571
+ children: [
572
+ t16,
573
+ t17,
574
+ t18,
575
+ /*#__PURE__*/ jsxs(TabsTrigger, {
576
+ value: "archived",
577
+ children: [
578
+ "Archived",
579
+ " ",
580
+ /*#__PURE__*/ jsx(Badge, {
581
+ variant: "secondary",
582
+ className: "ml-2",
583
+ children: products.filter(_temp5).length
584
+ })
585
+ ]
586
+ })
587
+ ]
588
+ });
589
+ $[27] = t19;
590
+ } else t19 = $[27];
591
+ let t20;
592
+ if ($[28] !== activeTab) {
593
+ t20 = /*#__PURE__*/ jsx(Tabs, {
594
+ value: activeTab,
595
+ onValueChange: setActiveTab,
596
+ children: t19
597
+ });
598
+ $[28] = activeTab;
599
+ $[29] = t20;
600
+ } else t20 = $[29];
601
+ let t21;
602
+ if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
603
+ t21 = /*#__PURE__*/ jsxs(SelectTrigger, {
604
+ className: "w-[150px]",
605
+ children: [
606
+ /*#__PURE__*/ jsx(Filter, {
607
+ className: "mr-2 h-4 w-4"
608
+ }),
609
+ /*#__PURE__*/ jsx(SelectValue, {
610
+ placeholder: "Category"
611
+ })
612
+ ]
613
+ });
614
+ $[30] = t21;
615
+ } else t21 = $[30];
616
+ let t22;
617
+ if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
618
+ t22 = /*#__PURE__*/ jsxs(SelectContent, {
619
+ children: [
620
+ /*#__PURE__*/ jsx(SelectItem, {
621
+ value: "all",
622
+ children: "All categories"
623
+ }),
624
+ categories.map(_temp6)
625
+ ]
626
+ });
627
+ $[31] = t22;
628
+ } else t22 = $[31];
629
+ let t23;
630
+ if ($[32] !== categoryFilter) {
631
+ t23 = /*#__PURE__*/ jsxs(Select, {
632
+ value: categoryFilter,
633
+ onValueChange: setCategoryFilter,
634
+ children: [
635
+ t21,
636
+ t22
637
+ ]
638
+ });
639
+ $[32] = categoryFilter;
640
+ $[33] = t23;
641
+ } else t23 = $[33];
642
+ let t24;
643
+ if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
644
+ t24 = /*#__PURE__*/ jsx(Button, {
645
+ variant: "outline",
646
+ size: "icon",
647
+ children: /*#__PURE__*/ jsx(RefreshCw, {
648
+ className: "h-4 w-4"
649
+ })
650
+ });
651
+ $[34] = t24;
652
+ } else t24 = $[34];
653
+ let t25;
654
+ if ($[35] !== t23) {
655
+ t25 = /*#__PURE__*/ jsxs(Row, {
656
+ gap: 2,
657
+ align: "center",
658
+ children: [
659
+ t23,
660
+ t24
661
+ ]
662
+ });
663
+ $[35] = t23;
664
+ $[36] = t25;
665
+ } else t25 = $[36];
666
+ let t26;
667
+ if ($[37] !== t20 || $[38] !== t25) {
668
+ t26 = /*#__PURE__*/ jsxs(Row, {
669
+ gap: 4,
670
+ justify: "between",
671
+ align: "center",
672
+ className: "mb-4 flex-col sm:flex-row sm:items-center",
673
+ children: [
674
+ t20,
675
+ t25
676
+ ]
677
+ });
678
+ $[37] = t20;
679
+ $[38] = t25;
680
+ $[39] = t26;
681
+ } else t26 = $[39];
682
+ let t27;
683
+ if ($[40] !== filteredProducts) {
684
+ t27 = /*#__PURE__*/ jsx(DataTable, {
685
+ columns: columns,
686
+ data: filteredProducts,
687
+ searchKey: "name",
688
+ searchPlaceholder: "Search products...",
689
+ resizable: true,
690
+ compact: true
691
+ });
692
+ $[40] = filteredProducts;
693
+ $[41] = t27;
694
+ } else t27 = $[41];
695
+ let t28;
696
+ if ($[42] !== t26 || $[43] !== t27) {
697
+ t28 = /*#__PURE__*/ jsxs("main", {
698
+ className: "container mx-auto p-4 md:p-6",
699
+ children: [
700
+ t26,
701
+ t27
702
+ ]
703
+ });
704
+ $[42] = t26;
705
+ $[43] = t27;
706
+ $[44] = t28;
707
+ } else t28 = $[44];
708
+ let t29;
709
+ if ($[45] !== t15 || $[46] !== t28) {
710
+ t29 = /*#__PURE__*/ jsxs(Column, {
711
+ minH: "screen",
712
+ className: "bg-background",
713
+ children: [
714
+ t15,
715
+ t28
716
+ ]
717
+ });
718
+ $[45] = t15;
719
+ $[46] = t28;
720
+ $[47] = t29;
721
+ } else t29 = $[47];
722
+ return t29;
723
+ }
724
+ function _temp6(cat_0) {
725
+ return /*#__PURE__*/ jsx(SelectItem, {
726
+ value: cat_0,
727
+ children: cat_0
728
+ }, cat_0);
729
+ }
730
+ function _temp5(p_4) {
731
+ return "archived" === p_4.status;
732
+ }
733
+ function _temp4(p_3) {
734
+ return "draft" === p_3.status;
735
+ }
736
+ function _temp3(p_2) {
737
+ return "active" === p_2.status;
738
+ }
739
+ function _temp2(cat) {
740
+ return /*#__PURE__*/ jsx(SelectItem, {
741
+ value: cat,
742
+ children: cat
743
+ }, cat);
744
+ }
745
+ function _temp(p_1) {
746
+ return p_1.category;
549
747
  }
550
748
  export { DataManagementExample };