@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
@@ -27,21 +27,55 @@ __webpack_require__.d(__webpack_exports__, {
27
27
  Checkbox: ()=>Checkbox
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
+ const compiler_runtime_namespaceObject = require("react/compiler-runtime");
30
31
  const react_checkbox_namespaceObject = require("@radix-ui/react-checkbox");
31
32
  const external_lucide_react_namespaceObject = require("lucide-react");
32
33
  const external_react_namespaceObject = require("react");
33
34
  const utils_cjs_namespaceObject = require("../../lib/utils.cjs");
34
- const Checkbox = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_checkbox_namespaceObject.Root, {
35
- ref: ref,
36
- className: (0, utils_cjs_namespaceObject.cn)('peer h-4 w-4 shrink-0 cursor-pointer rounded-sm border border-border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground', className),
37
- ...props,
38
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_checkbox_namespaceObject.Indicator, {
39
- className: (0, utils_cjs_namespaceObject.cn)('flex items-center justify-center text-current'),
35
+ const Checkbox = /*#__PURE__*/ external_react_namespaceObject.forwardRef((t0, ref)=>{
36
+ const $ = (0, compiler_runtime_namespaceObject.c)(10);
37
+ let className;
38
+ let props;
39
+ if ($[0] !== t0) {
40
+ ({ className, ...props } = t0);
41
+ $[0] = t0;
42
+ $[1] = className;
43
+ $[2] = props;
44
+ } else {
45
+ className = $[1];
46
+ props = $[2];
47
+ }
48
+ let t1;
49
+ if ($[3] !== className) {
50
+ t1 = (0, utils_cjs_namespaceObject.cn)("peer h-4 w-4 shrink-0 cursor-pointer rounded-sm border border-border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", className);
51
+ $[3] = className;
52
+ $[4] = t1;
53
+ } else t1 = $[4];
54
+ let t2;
55
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
56
+ t2 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_checkbox_namespaceObject.Indicator, {
57
+ className: (0, utils_cjs_namespaceObject.cn)("flex items-center justify-center text-current"),
40
58
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Check, {
41
59
  className: "h-4 w-4"
42
60
  })
43
- })
44
- }));
61
+ });
62
+ $[5] = t2;
63
+ } else t2 = $[5];
64
+ let t3;
65
+ if ($[6] !== props || $[7] !== ref || $[8] !== t1) {
66
+ t3 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_checkbox_namespaceObject.Root, {
67
+ ref: ref,
68
+ className: t1,
69
+ ...props,
70
+ children: t2
71
+ });
72
+ $[6] = props;
73
+ $[7] = ref;
74
+ $[8] = t1;
75
+ $[9] = t3;
76
+ } else t3 = $[9];
77
+ return t3;
78
+ });
45
79
  Checkbox.displayName = react_checkbox_namespaceObject.Root.displayName;
46
80
  exports.Checkbox = __webpack_exports__.Checkbox;
47
81
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
@@ -1,18 +1,52 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { Indicator, Root } from "@radix-ui/react-checkbox";
3
4
  import { Check } from "lucide-react";
4
5
  import { forwardRef } from "react";
5
6
  import { cn } from "../../lib/utils.js";
6
- const Checkbox = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Root, {
7
- ref: ref,
8
- className: cn('peer h-4 w-4 shrink-0 cursor-pointer rounded-sm border border-border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground', className),
9
- ...props,
10
- children: /*#__PURE__*/ jsx(Indicator, {
11
- className: cn('flex items-center justify-center text-current'),
7
+ const Checkbox = /*#__PURE__*/ forwardRef((t0, ref)=>{
8
+ const $ = c(10);
9
+ let className;
10
+ let props;
11
+ if ($[0] !== t0) {
12
+ ({ className, ...props } = t0);
13
+ $[0] = t0;
14
+ $[1] = className;
15
+ $[2] = props;
16
+ } else {
17
+ className = $[1];
18
+ props = $[2];
19
+ }
20
+ let t1;
21
+ if ($[3] !== className) {
22
+ t1 = cn("peer h-4 w-4 shrink-0 cursor-pointer rounded-sm border border-border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", className);
23
+ $[3] = className;
24
+ $[4] = t1;
25
+ } else t1 = $[4];
26
+ let t2;
27
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
28
+ t2 = /*#__PURE__*/ jsx(Indicator, {
29
+ className: cn("flex items-center justify-center text-current"),
12
30
  children: /*#__PURE__*/ jsx(Check, {
13
31
  className: "h-4 w-4"
14
32
  })
15
- })
16
- }));
33
+ });
34
+ $[5] = t2;
35
+ } else t2 = $[5];
36
+ let t3;
37
+ if ($[6] !== props || $[7] !== ref || $[8] !== t1) {
38
+ t3 = /*#__PURE__*/ jsx(Root, {
39
+ ref: ref,
40
+ className: t1,
41
+ ...props,
42
+ children: t2
43
+ });
44
+ $[6] = props;
45
+ $[7] = ref;
46
+ $[8] = t1;
47
+ $[9] = t3;
48
+ } else t3 = $[9];
49
+ return t3;
50
+ });
17
51
  Checkbox.displayName = Root.displayName;
18
52
  export { Checkbox };
@@ -28,70 +28,167 @@ __webpack_require__.d(__webpack_exports__, {
28
28
  Combobox: ()=>Combobox
29
29
  });
30
30
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
+ const compiler_runtime_namespaceObject = require("react/compiler-runtime");
31
32
  const external_lucide_react_namespaceObject = require("lucide-react");
32
33
  const external_react_namespaceObject = require("react");
33
34
  const external_button_cjs_namespaceObject = require("./button.cjs");
34
35
  const external_command_cjs_namespaceObject = require("./command.cjs");
35
36
  const external_popover_cjs_namespaceObject = require("./popover.cjs");
36
37
  const index_cjs_namespaceObject = require("../../lib/index.cjs");
37
- function Combobox({ items, value, onValueChange, placeholder = 'Select an option...', searchPlaceholder = 'Search...', emptyText = 'No results found.', disabled, className }) {
38
+ function Combobox(t0) {
39
+ const $ = (0, compiler_runtime_namespaceObject.c)(37);
40
+ const { items, value, onValueChange, placeholder: t1, searchPlaceholder: t2, emptyText: t3, disabled, className } = t0;
41
+ const placeholder = void 0 === t1 ? "Select an option..." : t1;
42
+ const searchPlaceholder = void 0 === t2 ? "Search..." : t2;
43
+ const emptyText = void 0 === t3 ? "No results found." : t3;
38
44
  const [open, setOpen] = external_react_namespaceObject.useState(false);
39
- const selectedItem = items.find((item)=>item.value === value);
40
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover, {
41
- open: open,
42
- onOpenChange: setOpen,
43
- children: [
44
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger, {
45
- asChild: true,
46
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
47
- variant: "outline",
48
- role: "combobox",
49
- "aria-expanded": open,
50
- "aria-label": selectedItem ? selectedItem.label : placeholder,
51
- className: (0, index_cjs_namespaceObject.cn)('w-[280px] justify-between', className),
52
- disabled: disabled,
53
- children: [
54
- selectedItem ? selectedItem.label : placeholder,
55
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronsUpDown, {
56
- className: "opacity-50"
57
- })
58
- ]
59
- })
60
- }),
61
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent, {
62
- className: "w-[280px] p-0",
63
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.Command, {
45
+ let t4;
46
+ if ($[0] !== items || $[1] !== value) {
47
+ let t5;
48
+ if ($[3] !== value) {
49
+ t5 = (item)=>item.value === value;
50
+ $[3] = value;
51
+ $[4] = t5;
52
+ } else t5 = $[4];
53
+ t4 = items.find(t5);
54
+ $[0] = items;
55
+ $[1] = value;
56
+ $[2] = t4;
57
+ } else t4 = $[2];
58
+ const selectedItem = t4;
59
+ const t5 = selectedItem ? selectedItem.label : placeholder;
60
+ let t6;
61
+ if ($[5] !== className) {
62
+ t6 = (0, index_cjs_namespaceObject.cn)("w-[280px] justify-between", className);
63
+ $[5] = className;
64
+ $[6] = t6;
65
+ } else t6 = $[6];
66
+ const t7 = selectedItem ? selectedItem.label : placeholder;
67
+ let t8;
68
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
69
+ t8 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronsUpDown, {
70
+ className: "opacity-50"
71
+ });
72
+ $[7] = t8;
73
+ } else t8 = $[7];
74
+ let t9;
75
+ if ($[8] !== disabled || $[9] !== open || $[10] !== t5 || $[11] !== t6 || $[12] !== t7) {
76
+ t9 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger, {
77
+ asChild: true,
78
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
79
+ variant: "outline",
80
+ role: "combobox",
81
+ "aria-expanded": open,
82
+ "aria-label": t5,
83
+ className: t6,
84
+ disabled: disabled,
85
+ children: [
86
+ t7,
87
+ t8
88
+ ]
89
+ })
90
+ });
91
+ $[8] = disabled;
92
+ $[9] = open;
93
+ $[10] = t5;
94
+ $[11] = t6;
95
+ $[12] = t7;
96
+ $[13] = t9;
97
+ } else t9 = $[13];
98
+ let t10;
99
+ if ($[14] !== searchPlaceholder) {
100
+ t10 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandInput, {
101
+ placeholder: searchPlaceholder
102
+ });
103
+ $[14] = searchPlaceholder;
104
+ $[15] = t10;
105
+ } else t10 = $[15];
106
+ let t11;
107
+ if ($[16] !== emptyText) {
108
+ t11 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandEmpty, {
109
+ children: emptyText
110
+ });
111
+ $[16] = emptyText;
112
+ $[17] = t11;
113
+ } else t11 = $[17];
114
+ let t12;
115
+ if ($[18] !== items || $[19] !== onValueChange || $[20] !== value) {
116
+ let t13;
117
+ if ($[22] !== onValueChange || $[23] !== value) {
118
+ t13 = (item_0)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.CommandItem, {
119
+ value: item_0.value,
120
+ onSelect: (currentValue)=>{
121
+ onValueChange?.(currentValue === value ? "" : currentValue);
122
+ setOpen(false);
123
+ },
64
124
  children: [
65
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandInput, {
66
- placeholder: searchPlaceholder
67
- }),
68
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.CommandList, {
69
- children: [
70
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandEmpty, {
71
- children: emptyText
72
- }),
73
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandGroup, {
74
- children: items.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.CommandItem, {
75
- value: item.value,
76
- onSelect: (currentValue)=>{
77
- onValueChange?.(currentValue === value ? '' : currentValue);
78
- setOpen(false);
79
- },
80
- children: [
81
- item.label,
82
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Check, {
83
- className: (0, index_cjs_namespaceObject.cn)('ml-auto', value === item.value ? 'opacity-100' : 'opacity-0')
84
- })
85
- ]
86
- }, item.value))
87
- })
88
- ]
125
+ item_0.label,
126
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Check, {
127
+ className: (0, index_cjs_namespaceObject.cn)("ml-auto", value === item_0.value ? "opacity-100" : "opacity-0")
89
128
  })
90
129
  ]
91
- })
130
+ }, item_0.value);
131
+ $[22] = onValueChange;
132
+ $[23] = value;
133
+ $[24] = t13;
134
+ } else t13 = $[24];
135
+ t12 = items.map(t13);
136
+ $[18] = items;
137
+ $[19] = onValueChange;
138
+ $[20] = value;
139
+ $[21] = t12;
140
+ } else t12 = $[21];
141
+ let t13;
142
+ if ($[25] !== t12) {
143
+ t13 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandGroup, {
144
+ children: t12
145
+ });
146
+ $[25] = t12;
147
+ $[26] = t13;
148
+ } else t13 = $[26];
149
+ let t14;
150
+ if ($[27] !== t11 || $[28] !== t13) {
151
+ t14 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.CommandList, {
152
+ children: [
153
+ t11,
154
+ t13
155
+ ]
156
+ });
157
+ $[27] = t11;
158
+ $[28] = t13;
159
+ $[29] = t14;
160
+ } else t14 = $[29];
161
+ let t15;
162
+ if ($[30] !== t10 || $[31] !== t14) {
163
+ t15 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent, {
164
+ className: "w-[280px] p-0",
165
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.Command, {
166
+ children: [
167
+ t10,
168
+ t14
169
+ ]
92
170
  })
93
- ]
94
- });
171
+ });
172
+ $[30] = t10;
173
+ $[31] = t14;
174
+ $[32] = t15;
175
+ } else t15 = $[32];
176
+ let t16;
177
+ if ($[33] !== open || $[34] !== t15 || $[35] !== t9) {
178
+ t16 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover, {
179
+ open: open,
180
+ onOpenChange: setOpen,
181
+ children: [
182
+ t9,
183
+ t15
184
+ ]
185
+ });
186
+ $[33] = open;
187
+ $[34] = t15;
188
+ $[35] = t9;
189
+ $[36] = t16;
190
+ } else t16 = $[36];
191
+ return t16;
95
192
  }
96
193
  exports.Combobox = __webpack_exports__.Combobox;
97
194
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
@@ -1,68 +1,165 @@
1
1
  'use client';
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { c } from "react/compiler-runtime";
3
4
  import { Check, ChevronsUpDown } from "lucide-react";
4
5
  import { useState } from "react";
5
6
  import { Button } from "./button.js";
6
7
  import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "./command.js";
7
8
  import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
8
9
  import { cn } from "../../lib/index.js";
9
- function Combobox({ items, value, onValueChange, placeholder = 'Select an option...', searchPlaceholder = 'Search...', emptyText = 'No results found.', disabled, className }) {
10
+ function Combobox(t0) {
11
+ const $ = c(37);
12
+ const { items, value, onValueChange, placeholder: t1, searchPlaceholder: t2, emptyText: t3, disabled, className } = t0;
13
+ const placeholder = void 0 === t1 ? "Select an option..." : t1;
14
+ const searchPlaceholder = void 0 === t2 ? "Search..." : t2;
15
+ const emptyText = void 0 === t3 ? "No results found." : t3;
10
16
  const [open, setOpen] = useState(false);
11
- const selectedItem = items.find((item)=>item.value === value);
12
- return /*#__PURE__*/ jsxs(Popover, {
13
- open: open,
14
- onOpenChange: setOpen,
15
- children: [
16
- /*#__PURE__*/ jsx(PopoverTrigger, {
17
- asChild: true,
18
- children: /*#__PURE__*/ jsxs(Button, {
19
- variant: "outline",
20
- role: "combobox",
21
- "aria-expanded": open,
22
- "aria-label": selectedItem ? selectedItem.label : placeholder,
23
- className: cn('w-[280px] justify-between', className),
24
- disabled: disabled,
25
- children: [
26
- selectedItem ? selectedItem.label : placeholder,
27
- /*#__PURE__*/ jsx(ChevronsUpDown, {
28
- className: "opacity-50"
29
- })
30
- ]
31
- })
32
- }),
33
- /*#__PURE__*/ jsx(PopoverContent, {
34
- className: "w-[280px] p-0",
35
- children: /*#__PURE__*/ jsxs(Command, {
17
+ let t4;
18
+ if ($[0] !== items || $[1] !== value) {
19
+ let t5;
20
+ if ($[3] !== value) {
21
+ t5 = (item)=>item.value === value;
22
+ $[3] = value;
23
+ $[4] = t5;
24
+ } else t5 = $[4];
25
+ t4 = items.find(t5);
26
+ $[0] = items;
27
+ $[1] = value;
28
+ $[2] = t4;
29
+ } else t4 = $[2];
30
+ const selectedItem = t4;
31
+ const t5 = selectedItem ? selectedItem.label : placeholder;
32
+ let t6;
33
+ if ($[5] !== className) {
34
+ t6 = cn("w-[280px] justify-between", className);
35
+ $[5] = className;
36
+ $[6] = t6;
37
+ } else t6 = $[6];
38
+ const t7 = selectedItem ? selectedItem.label : placeholder;
39
+ let t8;
40
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
41
+ t8 = /*#__PURE__*/ jsx(ChevronsUpDown, {
42
+ className: "opacity-50"
43
+ });
44
+ $[7] = t8;
45
+ } else t8 = $[7];
46
+ let t9;
47
+ if ($[8] !== disabled || $[9] !== open || $[10] !== t5 || $[11] !== t6 || $[12] !== t7) {
48
+ t9 = /*#__PURE__*/ jsx(PopoverTrigger, {
49
+ asChild: true,
50
+ children: /*#__PURE__*/ jsxs(Button, {
51
+ variant: "outline",
52
+ role: "combobox",
53
+ "aria-expanded": open,
54
+ "aria-label": t5,
55
+ className: t6,
56
+ disabled: disabled,
57
+ children: [
58
+ t7,
59
+ t8
60
+ ]
61
+ })
62
+ });
63
+ $[8] = disabled;
64
+ $[9] = open;
65
+ $[10] = t5;
66
+ $[11] = t6;
67
+ $[12] = t7;
68
+ $[13] = t9;
69
+ } else t9 = $[13];
70
+ let t10;
71
+ if ($[14] !== searchPlaceholder) {
72
+ t10 = /*#__PURE__*/ jsx(CommandInput, {
73
+ placeholder: searchPlaceholder
74
+ });
75
+ $[14] = searchPlaceholder;
76
+ $[15] = t10;
77
+ } else t10 = $[15];
78
+ let t11;
79
+ if ($[16] !== emptyText) {
80
+ t11 = /*#__PURE__*/ jsx(CommandEmpty, {
81
+ children: emptyText
82
+ });
83
+ $[16] = emptyText;
84
+ $[17] = t11;
85
+ } else t11 = $[17];
86
+ let t12;
87
+ if ($[18] !== items || $[19] !== onValueChange || $[20] !== value) {
88
+ let t13;
89
+ if ($[22] !== onValueChange || $[23] !== value) {
90
+ t13 = (item_0)=>/*#__PURE__*/ jsxs(CommandItem, {
91
+ value: item_0.value,
92
+ onSelect: (currentValue)=>{
93
+ onValueChange?.(currentValue === value ? "" : currentValue);
94
+ setOpen(false);
95
+ },
36
96
  children: [
37
- /*#__PURE__*/ jsx(CommandInput, {
38
- placeholder: searchPlaceholder
39
- }),
40
- /*#__PURE__*/ jsxs(CommandList, {
41
- children: [
42
- /*#__PURE__*/ jsx(CommandEmpty, {
43
- children: emptyText
44
- }),
45
- /*#__PURE__*/ jsx(CommandGroup, {
46
- children: items.map((item)=>/*#__PURE__*/ jsxs(CommandItem, {
47
- value: item.value,
48
- onSelect: (currentValue)=>{
49
- onValueChange?.(currentValue === value ? '' : currentValue);
50
- setOpen(false);
51
- },
52
- children: [
53
- item.label,
54
- /*#__PURE__*/ jsx(Check, {
55
- className: cn('ml-auto', value === item.value ? 'opacity-100' : 'opacity-0')
56
- })
57
- ]
58
- }, item.value))
59
- })
60
- ]
97
+ item_0.label,
98
+ /*#__PURE__*/ jsx(Check, {
99
+ className: cn("ml-auto", value === item_0.value ? "opacity-100" : "opacity-0")
61
100
  })
62
101
  ]
63
- })
102
+ }, item_0.value);
103
+ $[22] = onValueChange;
104
+ $[23] = value;
105
+ $[24] = t13;
106
+ } else t13 = $[24];
107
+ t12 = items.map(t13);
108
+ $[18] = items;
109
+ $[19] = onValueChange;
110
+ $[20] = value;
111
+ $[21] = t12;
112
+ } else t12 = $[21];
113
+ let t13;
114
+ if ($[25] !== t12) {
115
+ t13 = /*#__PURE__*/ jsx(CommandGroup, {
116
+ children: t12
117
+ });
118
+ $[25] = t12;
119
+ $[26] = t13;
120
+ } else t13 = $[26];
121
+ let t14;
122
+ if ($[27] !== t11 || $[28] !== t13) {
123
+ t14 = /*#__PURE__*/ jsxs(CommandList, {
124
+ children: [
125
+ t11,
126
+ t13
127
+ ]
128
+ });
129
+ $[27] = t11;
130
+ $[28] = t13;
131
+ $[29] = t14;
132
+ } else t14 = $[29];
133
+ let t15;
134
+ if ($[30] !== t10 || $[31] !== t14) {
135
+ t15 = /*#__PURE__*/ jsx(PopoverContent, {
136
+ className: "w-[280px] p-0",
137
+ children: /*#__PURE__*/ jsxs(Command, {
138
+ children: [
139
+ t10,
140
+ t14
141
+ ]
64
142
  })
65
- ]
66
- });
143
+ });
144
+ $[30] = t10;
145
+ $[31] = t14;
146
+ $[32] = t15;
147
+ } else t15 = $[32];
148
+ let t16;
149
+ if ($[33] !== open || $[34] !== t15 || $[35] !== t9) {
150
+ t16 = /*#__PURE__*/ jsxs(Popover, {
151
+ open: open,
152
+ onOpenChange: setOpen,
153
+ children: [
154
+ t9,
155
+ t15
156
+ ]
157
+ });
158
+ $[33] = open;
159
+ $[34] = t15;
160
+ $[35] = t9;
161
+ $[36] = t16;
162
+ } else t16 = $[36];
163
+ return t16;
67
164
  }
68
165
  export { Combobox };