@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.
- package/dist/components/forms/field-renderer.cjs +120 -69
- package/dist/components/forms/field-renderer.js +120 -69
- package/dist/components/forms/form-designer.cjs +2352 -1488
- package/dist/components/forms/form-designer.js +2353 -1489
- package/dist/components/forms/form-examples.cjs +10 -10
- package/dist/components/forms/form-examples.js +10 -10
- package/dist/components/forms/form-state-viewer.cjs +988 -433
- package/dist/components/forms/form-state-viewer.js +988 -433
- package/dist/components/forms/metadata-form.cjs +446 -170
- package/dist/components/forms/metadata-form.js +446 -170
- package/dist/components/forms/schema-viewer.cjs +173 -80
- package/dist/components/forms/schema-viewer.js +173 -80
- package/dist/components/ui/accordion.cjs +131 -27
- package/dist/components/ui/accordion.js +131 -27
- package/dist/components/ui/alert-dialog.cjs +273 -45
- package/dist/components/ui/alert-dialog.js +273 -45
- package/dist/components/ui/alert.cjs +106 -17
- package/dist/components/ui/alert.js +106 -17
- package/dist/components/ui/avatar.cjs +100 -15
- package/dist/components/ui/avatar.js +100 -15
- package/dist/components/ui/badge.cjs +36 -6
- package/dist/components/ui/badge.js +36 -6
- package/dist/components/ui/breadcrumb.cjs +258 -52
- package/dist/components/ui/breadcrumb.js +258 -52
- package/dist/components/ui/button-group.cjs +119 -19
- package/dist/components/ui/button-group.js +119 -19
- package/dist/components/ui/button.cjs +48 -8
- package/dist/components/ui/button.js +48 -8
- package/dist/components/ui/calendar.cjs +88 -30
- package/dist/components/ui/calendar.js +88 -30
- package/dist/components/ui/card.cjs +199 -30
- package/dist/components/ui/card.js +199 -30
- package/dist/components/ui/checkbox.cjs +42 -8
- package/dist/components/ui/checkbox.js +42 -8
- package/dist/components/ui/combobox.cjs +150 -53
- package/dist/components/ui/combobox.js +150 -53
- package/dist/components/ui/command.cjs +291 -53
- package/dist/components/ui/command.js +291 -53
- package/dist/components/ui/context-menu.cjs +370 -72
- package/dist/components/ui/context-menu.js +370 -72
- package/dist/components/ui/data-table.cjs +76 -39
- package/dist/components/ui/data-table.js +76 -39
- package/dist/components/ui/date-picker.cjs +179 -68
- package/dist/components/ui/date-picker.js +179 -68
- package/dist/components/ui/datetime-picker.cjs +225 -104
- package/dist/components/ui/datetime-picker.js +225 -104
- package/dist/components/ui/dialog.cjs +290 -78
- package/dist/components/ui/dialog.js +290 -78
- package/dist/components/ui/drawer.cjs +220 -39
- package/dist/components/ui/drawer.js +220 -39
- package/dist/components/ui/dropdown-menu.cjs +376 -73
- package/dist/components/ui/dropdown-menu.js +376 -73
- package/dist/components/ui/editable-cell.cjs +106 -42
- package/dist/components/ui/editable-cell.js +106 -42
- package/dist/components/ui/empty-state.cjs +106 -33
- package/dist/components/ui/empty-state.js +106 -33
- package/dist/components/ui/file-upload.cjs +405 -187
- package/dist/components/ui/file-upload.d.ts +3 -1
- package/dist/components/ui/file-upload.js +405 -187
- package/dist/components/ui/hover-card.cjs +46 -7
- package/dist/components/ui/hover-card.js +46 -7
- package/dist/components/ui/index.cjs +4 -4
- package/dist/components/ui/input.cjs +39 -6
- package/dist/components/ui/input.js +39 -6
- package/dist/components/ui/label.cjs +34 -5
- package/dist/components/ui/label.js +34 -5
- package/dist/components/ui/layout/column.cjs +209 -41
- package/dist/components/ui/layout/column.js +209 -41
- package/dist/components/ui/layout/grid.cjs +275 -60
- package/dist/components/ui/layout/grid.js +275 -60
- package/dist/components/ui/layout/row.cjs +209 -41
- package/dist/components/ui/layout/row.js +209 -41
- package/dist/components/ui/menubar.cjs +540 -106
- package/dist/components/ui/menubar.js +540 -106
- package/dist/components/ui/multi-select.cjs +289 -135
- package/dist/components/ui/multi-select.js +289 -135
- package/dist/components/ui/navigation-menu.cjs +244 -47
- package/dist/components/ui/navigation-menu.js +244 -47
- package/dist/components/ui/pagination.cjs +301 -65
- package/dist/components/ui/pagination.js +301 -65
- package/dist/components/ui/popover.cjs +48 -9
- package/dist/components/ui/popover.js +48 -9
- package/dist/components/ui/progress.cjs +48 -8
- package/dist/components/ui/progress.js +48 -8
- package/dist/components/ui/radio-group.cjs +74 -12
- package/dist/components/ui/radio-group.js +74 -12
- package/dist/components/ui/resizable.cjs +75 -10
- package/dist/components/ui/resizable.js +75 -10
- package/dist/components/ui/scroll-area.cjs +113 -21
- package/dist/components/ui/scroll-area.js +113 -21
- package/dist/components/ui/search.cjs +280 -98
- package/dist/components/ui/search.js +280 -98
- package/dist/components/ui/select.cjs +334 -68
- package/dist/components/ui/select.js +334 -68
- package/dist/components/ui/separator.cjs +48 -7
- package/dist/components/ui/separator.js +48 -7
- package/dist/components/ui/sheet.cjs +236 -50
- package/dist/components/ui/sheet.js +236 -50
- package/dist/components/ui/skeleton.cjs +31 -5
- package/dist/components/ui/skeleton.js +31 -5
- package/dist/components/ui/slider.cjs +71 -21
- package/dist/components/ui/slider.js +71 -21
- package/dist/components/ui/sonner.cjs +43 -15
- package/dist/components/ui/sonner.js +43 -15
- package/dist/components/ui/spinner.cjs +83 -21
- package/dist/components/ui/spinner.js +83 -21
- package/dist/components/ui/stats-card.cjs +169 -60
- package/dist/components/ui/stats-card.js +169 -60
- package/dist/components/ui/stepper.cjs +126 -57
- package/dist/components/ui/stepper.js +126 -57
- package/dist/components/ui/switch.cjs +42 -8
- package/dist/components/ui/switch.js +42 -8
- package/dist/components/ui/table.cjs +267 -42
- package/dist/components/ui/table.js +267 -42
- package/dist/components/ui/tabs.cjs +100 -15
- package/dist/components/ui/tabs.js +100 -15
- package/dist/components/ui/textarea.cjs +34 -5
- package/dist/components/ui/textarea.js +34 -5
- package/dist/components/ui/toggle-group.cjs +112 -19
- package/dist/components/ui/toggle-group.js +112 -19
- package/dist/components/ui/toggle.cjs +43 -6
- package/dist/components/ui/toggle.js +43 -6
- package/dist/components/ui/tooltip.cjs +40 -6
- package/dist/components/ui/tooltip.js +40 -6
- package/dist/examples/admin-layout-example.cjs +879 -347
- package/dist/examples/admin-layout-example.js +879 -347
- package/dist/examples/app-shell-example.cjs +14 -14
- package/dist/examples/app-shell-example.js +14 -14
- package/dist/examples/dashboard-example.cjs +495 -334
- package/dist/examples/dashboard-example.js +495 -334
- package/dist/examples/data-management-example.cjs +501 -303
- package/dist/examples/data-management-example.js +502 -304
- package/dist/examples/flow-editor-layout-example.cjs +435 -231
- package/dist/examples/flow-editor-layout-example.js +436 -232
- package/dist/examples/flow-start-example.cjs +508 -251
- package/dist/examples/flow-start-example.js +509 -252
- package/dist/examples/form-builder-example.cjs +1006 -602
- package/dist/examples/form-builder-example.js +1007 -603
- package/dist/examples/new-project-example.cjs +806 -474
- package/dist/examples/new-project-example.js +807 -475
- package/dist/examples/settings-example.cjs +792 -704
- package/dist/examples/settings-example.js +792 -704
- package/dist/examples/vscode-example.cjs +731 -236
- package/dist/examples/vscode-example.js +731 -236
- 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((
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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((
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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(
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
66
|
-
|
|
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(
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
38
|
-
|
|
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 };
|