@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
|
@@ -1,30 +1,122 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
3
4
|
import { Corner, Root, ScrollAreaScrollbar, ScrollAreaThumb, Viewport } from "@radix-ui/react-scroll-area";
|
|
4
5
|
import { forwardRef } from "react";
|
|
5
6
|
import { cn } from "../../lib/index.js";
|
|
6
|
-
const ScrollArea = /*#__PURE__*/ forwardRef((
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
const ScrollArea = /*#__PURE__*/ forwardRef((t0, ref)=>{
|
|
8
|
+
const $ = c(15);
|
|
9
|
+
let children;
|
|
10
|
+
let className;
|
|
11
|
+
let props;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({ className, children, ...props } = t0);
|
|
14
|
+
$[0] = t0;
|
|
15
|
+
$[1] = children;
|
|
16
|
+
$[2] = className;
|
|
17
|
+
$[3] = props;
|
|
18
|
+
} else {
|
|
19
|
+
children = $[1];
|
|
20
|
+
className = $[2];
|
|
21
|
+
props = $[3];
|
|
22
|
+
}
|
|
23
|
+
let t1;
|
|
24
|
+
if ($[4] !== className) {
|
|
25
|
+
t1 = cn("relative overflow-hidden", className);
|
|
26
|
+
$[4] = className;
|
|
27
|
+
$[5] = t1;
|
|
28
|
+
} else t1 = $[5];
|
|
29
|
+
let t2;
|
|
30
|
+
if ($[6] !== children) {
|
|
31
|
+
t2 = /*#__PURE__*/ jsx(Viewport, {
|
|
32
|
+
className: "h-full w-full rounded-[inherit]",
|
|
33
|
+
children: children
|
|
34
|
+
});
|
|
35
|
+
$[6] = children;
|
|
36
|
+
$[7] = t2;
|
|
37
|
+
} else t2 = $[7];
|
|
38
|
+
let t3;
|
|
39
|
+
let t4;
|
|
40
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
41
|
+
t3 = /*#__PURE__*/ jsx(ScrollBar, {});
|
|
42
|
+
t4 = /*#__PURE__*/ jsx(Corner, {});
|
|
43
|
+
$[8] = t3;
|
|
44
|
+
$[9] = t4;
|
|
45
|
+
} else {
|
|
46
|
+
t3 = $[8];
|
|
47
|
+
t4 = $[9];
|
|
48
|
+
}
|
|
49
|
+
let t5;
|
|
50
|
+
if ($[10] !== props || $[11] !== ref || $[12] !== t1 || $[13] !== t2) {
|
|
51
|
+
t5 = /*#__PURE__*/ jsxs(Root, {
|
|
52
|
+
ref: ref,
|
|
53
|
+
className: t1,
|
|
54
|
+
...props,
|
|
55
|
+
children: [
|
|
56
|
+
t2,
|
|
57
|
+
t3,
|
|
58
|
+
t4
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
$[10] = props;
|
|
62
|
+
$[11] = ref;
|
|
63
|
+
$[12] = t1;
|
|
64
|
+
$[13] = t2;
|
|
65
|
+
$[14] = t5;
|
|
66
|
+
} else t5 = $[14];
|
|
67
|
+
return t5;
|
|
68
|
+
});
|
|
19
69
|
ScrollArea.displayName = Root.displayName;
|
|
20
|
-
const ScrollBar = /*#__PURE__*/ forwardRef((
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
70
|
+
const ScrollBar = /*#__PURE__*/ forwardRef((t0, ref)=>{
|
|
71
|
+
const $ = c(14);
|
|
72
|
+
let className;
|
|
73
|
+
let props;
|
|
74
|
+
let t1;
|
|
75
|
+
if ($[0] !== t0) {
|
|
76
|
+
({ className, orientation: t1, ...props } = t0);
|
|
77
|
+
$[0] = t0;
|
|
78
|
+
$[1] = className;
|
|
79
|
+
$[2] = props;
|
|
80
|
+
$[3] = t1;
|
|
81
|
+
} else {
|
|
82
|
+
className = $[1];
|
|
83
|
+
props = $[2];
|
|
84
|
+
t1 = $[3];
|
|
85
|
+
}
|
|
86
|
+
const orientation = void 0 === t1 ? "vertical" : t1;
|
|
87
|
+
const t2 = "vertical" === orientation && "h-full w-2.5 border-l border-l-transparent p-[1px]";
|
|
88
|
+
const t3 = "horizontal" === orientation && "h-2.5 flex-col border-t border-t-transparent p-[1px]";
|
|
89
|
+
let t4;
|
|
90
|
+
if ($[4] !== className || $[5] !== t2 || $[6] !== t3) {
|
|
91
|
+
t4 = cn("flex touch-none select-none transition-colors", t2, t3, className);
|
|
92
|
+
$[4] = className;
|
|
93
|
+
$[5] = t2;
|
|
94
|
+
$[6] = t3;
|
|
95
|
+
$[7] = t4;
|
|
96
|
+
} else t4 = $[7];
|
|
97
|
+
let t5;
|
|
98
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
99
|
+
t5 = /*#__PURE__*/ jsx(ScrollAreaThumb, {
|
|
26
100
|
className: "relative flex-1 rounded-full bg-border"
|
|
27
|
-
})
|
|
28
|
-
|
|
101
|
+
});
|
|
102
|
+
$[8] = t5;
|
|
103
|
+
} else t5 = $[8];
|
|
104
|
+
let t6;
|
|
105
|
+
if ($[9] !== orientation || $[10] !== props || $[11] !== ref || $[12] !== t4) {
|
|
106
|
+
t6 = /*#__PURE__*/ jsx(ScrollAreaScrollbar, {
|
|
107
|
+
ref: ref,
|
|
108
|
+
orientation: orientation,
|
|
109
|
+
className: t4,
|
|
110
|
+
...props,
|
|
111
|
+
children: t5
|
|
112
|
+
});
|
|
113
|
+
$[9] = orientation;
|
|
114
|
+
$[10] = props;
|
|
115
|
+
$[11] = ref;
|
|
116
|
+
$[12] = t4;
|
|
117
|
+
$[13] = t6;
|
|
118
|
+
} else t6 = $[13];
|
|
119
|
+
return t6;
|
|
120
|
+
});
|
|
29
121
|
ScrollBar.displayName = ScrollAreaScrollbar.displayName;
|
|
30
122
|
export { ScrollArea, ScrollBar };
|
|
@@ -28,6 +28,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
Search: ()=>Search
|
|
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");
|
|
@@ -35,111 +36,292 @@ const external_command_cjs_namespaceObject = require("./command.cjs");
|
|
|
35
36
|
const external_input_cjs_namespaceObject = require("./input.cjs");
|
|
36
37
|
const external_popover_cjs_namespaceObject = require("./popover.cjs");
|
|
37
38
|
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
38
|
-
const Search = /*#__PURE__*/ external_react_namespaceObject.forwardRef((
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
39
|
+
const Search = /*#__PURE__*/ external_react_namespaceObject.forwardRef((t0, ref)=>{
|
|
40
|
+
const $ = (0, compiler_runtime_namespaceObject.c)(28);
|
|
41
|
+
let className;
|
|
42
|
+
let onChange;
|
|
43
|
+
let onClear;
|
|
44
|
+
let props;
|
|
45
|
+
let t1;
|
|
46
|
+
let value;
|
|
47
|
+
if ($[0] !== t0) {
|
|
48
|
+
({ className, value, onChange, onClear, showClearButton: t1, ...props } = t0);
|
|
49
|
+
$[0] = t0;
|
|
50
|
+
$[1] = className;
|
|
51
|
+
$[2] = onChange;
|
|
52
|
+
$[3] = onClear;
|
|
53
|
+
$[4] = props;
|
|
54
|
+
$[5] = t1;
|
|
55
|
+
$[6] = value;
|
|
56
|
+
} else {
|
|
57
|
+
className = $[1];
|
|
58
|
+
onChange = $[2];
|
|
59
|
+
onClear = $[3];
|
|
60
|
+
props = $[4];
|
|
61
|
+
t1 = $[5];
|
|
62
|
+
value = $[6];
|
|
63
|
+
}
|
|
64
|
+
const showClearButton = void 0 === t1 ? true : t1;
|
|
65
|
+
let t2;
|
|
66
|
+
if ($[7] !== onChange || $[8] !== onClear) {
|
|
67
|
+
t2 = ()=>{
|
|
68
|
+
onChange?.("");
|
|
69
|
+
onClear?.();
|
|
70
|
+
};
|
|
71
|
+
$[7] = onChange;
|
|
72
|
+
$[8] = onClear;
|
|
73
|
+
$[9] = t2;
|
|
74
|
+
} else t2 = $[9];
|
|
75
|
+
const handleClear = t2;
|
|
76
|
+
let t3;
|
|
77
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
78
|
+
t3 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Search, {
|
|
79
|
+
className: "absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"
|
|
80
|
+
});
|
|
81
|
+
$[10] = t3;
|
|
82
|
+
} else t3 = $[10];
|
|
83
|
+
let t4;
|
|
84
|
+
if ($[11] !== className) {
|
|
85
|
+
t4 = (0, index_cjs_namespaceObject.cn)("pl-8 pr-8", className);
|
|
86
|
+
$[11] = className;
|
|
87
|
+
$[12] = t4;
|
|
88
|
+
} else t4 = $[12];
|
|
89
|
+
let t5;
|
|
90
|
+
if ($[13] !== onChange) {
|
|
91
|
+
t5 = (e)=>onChange?.(e.target.value);
|
|
92
|
+
$[13] = onChange;
|
|
93
|
+
$[14] = t5;
|
|
94
|
+
} else t5 = $[14];
|
|
95
|
+
let t6;
|
|
96
|
+
if ($[15] !== props || $[16] !== ref || $[17] !== t4 || $[18] !== t5 || $[19] !== value) {
|
|
97
|
+
t6 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_cjs_namespaceObject.Input, {
|
|
98
|
+
ref: ref,
|
|
99
|
+
type: "search",
|
|
100
|
+
className: t4,
|
|
101
|
+
value: value,
|
|
102
|
+
onChange: t5,
|
|
103
|
+
...props
|
|
104
|
+
});
|
|
105
|
+
$[15] = props;
|
|
106
|
+
$[16] = ref;
|
|
107
|
+
$[17] = t4;
|
|
108
|
+
$[18] = t5;
|
|
109
|
+
$[19] = value;
|
|
110
|
+
$[20] = t6;
|
|
111
|
+
} else t6 = $[20];
|
|
112
|
+
let t7;
|
|
113
|
+
if ($[21] !== handleClear || $[22] !== showClearButton || $[23] !== value) {
|
|
114
|
+
t7 = showClearButton && value && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
|
|
115
|
+
type: "button",
|
|
116
|
+
variant: "ghost",
|
|
117
|
+
size: "icon",
|
|
118
|
+
className: "absolute right-0 top-0 h-full w-8 px-0 hover:bg-transparent",
|
|
119
|
+
onClick: handleClear,
|
|
120
|
+
children: [
|
|
121
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.X, {
|
|
122
|
+
className: "h-4 w-4"
|
|
123
|
+
}),
|
|
124
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
125
|
+
className: "sr-only",
|
|
126
|
+
children: "Clear"
|
|
127
|
+
})
|
|
128
|
+
]
|
|
129
|
+
});
|
|
130
|
+
$[21] = handleClear;
|
|
131
|
+
$[22] = showClearButton;
|
|
132
|
+
$[23] = value;
|
|
133
|
+
$[24] = t7;
|
|
134
|
+
} else t7 = $[24];
|
|
135
|
+
let t8;
|
|
136
|
+
if ($[25] !== t6 || $[26] !== t7) {
|
|
137
|
+
t8 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
138
|
+
className: "relative",
|
|
139
|
+
children: [
|
|
140
|
+
t3,
|
|
141
|
+
t6,
|
|
142
|
+
t7
|
|
143
|
+
]
|
|
144
|
+
});
|
|
145
|
+
$[25] = t6;
|
|
146
|
+
$[26] = t7;
|
|
147
|
+
$[27] = t8;
|
|
148
|
+
} else t8 = $[27];
|
|
149
|
+
return t8;
|
|
150
|
+
});
|
|
151
|
+
Search.displayName = 'Search';
|
|
152
|
+
const SearchWithSuggestions = /*#__PURE__*/ external_react_namespaceObject.forwardRef((t0, ref)=>{
|
|
153
|
+
const $ = (0, compiler_runtime_namespaceObject.c)(41);
|
|
154
|
+
const { value, onChange, placeholder: t1, suggestions: t2, onSelect, emptyMessage: t3, className } = t0;
|
|
155
|
+
const placeholder = void 0 === t1 ? "Search..." : t1;
|
|
156
|
+
const suggestions = void 0 === t2 ? [] : t2;
|
|
157
|
+
const emptyMessage = void 0 === t3 ? "No results found." : t3;
|
|
158
|
+
const [open, setOpen] = external_react_namespaceObject.useState(false);
|
|
159
|
+
const [searchValue, setSearchValue] = external_react_namespaceObject.useState(value || "");
|
|
160
|
+
let t4;
|
|
161
|
+
let t5;
|
|
162
|
+
if ($[0] !== value) {
|
|
163
|
+
t4 = ()=>{
|
|
164
|
+
if (void 0 !== value) setSearchValue(value);
|
|
165
|
+
};
|
|
166
|
+
t5 = [
|
|
167
|
+
value
|
|
168
|
+
];
|
|
169
|
+
$[0] = value;
|
|
170
|
+
$[1] = t4;
|
|
171
|
+
$[2] = t5;
|
|
172
|
+
} else {
|
|
173
|
+
t4 = $[1];
|
|
174
|
+
t5 = $[2];
|
|
175
|
+
}
|
|
176
|
+
external_react_namespaceObject.useEffect(t4, t5);
|
|
177
|
+
let t6;
|
|
178
|
+
if ($[3] !== searchValue) {
|
|
179
|
+
t6 = (suggestion)=>suggestion.toLowerCase().includes(searchValue.toLowerCase());
|
|
180
|
+
$[3] = searchValue;
|
|
181
|
+
$[4] = t6;
|
|
182
|
+
} else t6 = $[4];
|
|
183
|
+
const filteredSuggestions = suggestions.filter(t6);
|
|
184
|
+
let t7;
|
|
185
|
+
if ($[5] !== onChange || $[6] !== onSelect || $[7] !== setOpen) {
|
|
186
|
+
t7 = (selectedValue)=>{
|
|
187
|
+
setSearchValue(selectedValue);
|
|
188
|
+
onChange?.(selectedValue);
|
|
189
|
+
onSelect?.(selectedValue);
|
|
190
|
+
setOpen(false);
|
|
191
|
+
};
|
|
192
|
+
$[5] = onChange;
|
|
193
|
+
$[6] = onSelect;
|
|
194
|
+
$[7] = setOpen;
|
|
195
|
+
$[8] = t7;
|
|
196
|
+
} else t7 = $[8];
|
|
197
|
+
const handleSelect = t7;
|
|
198
|
+
let t8;
|
|
199
|
+
if ($[9] !== onChange || $[10] !== setOpen) {
|
|
200
|
+
t8 = (newValue)=>{
|
|
201
|
+
setSearchValue(newValue);
|
|
202
|
+
onChange?.(newValue);
|
|
203
|
+
setOpen(newValue.length > 0);
|
|
204
|
+
};
|
|
205
|
+
$[9] = onChange;
|
|
206
|
+
$[10] = setOpen;
|
|
207
|
+
$[11] = t8;
|
|
208
|
+
} else t8 = $[11];
|
|
209
|
+
const handleInputChange = t8;
|
|
210
|
+
let t9;
|
|
211
|
+
if ($[12] !== className) {
|
|
212
|
+
t9 = (0, index_cjs_namespaceObject.cn)("relative", className);
|
|
213
|
+
$[12] = className;
|
|
214
|
+
$[13] = t9;
|
|
215
|
+
} else t9 = $[13];
|
|
216
|
+
const T0 = external_popover_cjs_namespaceObject.Popover;
|
|
217
|
+
const t10 = open && filteredSuggestions.length > 0;
|
|
218
|
+
let t11;
|
|
219
|
+
if ($[14] !== onChange || $[15] !== setOpen) {
|
|
220
|
+
t11 = ()=>{
|
|
221
|
+
setSearchValue("");
|
|
222
|
+
onChange?.("");
|
|
223
|
+
setOpen(false);
|
|
224
|
+
};
|
|
225
|
+
$[14] = onChange;
|
|
226
|
+
$[15] = setOpen;
|
|
227
|
+
$[16] = t11;
|
|
228
|
+
} else t11 = $[16];
|
|
229
|
+
let t12;
|
|
230
|
+
if ($[17] !== handleInputChange || $[18] !== placeholder || $[19] !== searchValue || $[20] !== t11) {
|
|
231
|
+
t12 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger, {
|
|
232
|
+
asChild: true,
|
|
233
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
234
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Search, {
|
|
235
|
+
value: searchValue,
|
|
236
|
+
onChange: handleInputChange,
|
|
237
|
+
onClear: t11,
|
|
238
|
+
placeholder: placeholder
|
|
239
|
+
})
|
|
240
|
+
})
|
|
241
|
+
});
|
|
242
|
+
$[17] = handleInputChange;
|
|
243
|
+
$[18] = placeholder;
|
|
244
|
+
$[19] = searchValue;
|
|
245
|
+
$[20] = t11;
|
|
246
|
+
$[21] = t12;
|
|
247
|
+
} else t12 = $[21];
|
|
248
|
+
const T1 = external_popover_cjs_namespaceObject.PopoverContent;
|
|
249
|
+
const t13 = "w-[--radix-popover-trigger-width] p-0";
|
|
250
|
+
const t14 = "start";
|
|
251
|
+
const T2 = external_command_cjs_namespaceObject.Command;
|
|
252
|
+
const T3 = external_command_cjs_namespaceObject.CommandList;
|
|
253
|
+
const t15 = 0 === filteredSuggestions.length ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandEmpty, {
|
|
254
|
+
children: emptyMessage
|
|
255
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandGroup, {
|
|
256
|
+
children: filteredSuggestions.map((suggestion_0)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.CommandItem, {
|
|
257
|
+
onSelect: ()=>handleSelect(suggestion_0),
|
|
63
258
|
children: [
|
|
64
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.
|
|
65
|
-
className: "h-4 w-4"
|
|
259
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Search, {
|
|
260
|
+
className: "mr-2 h-4 w-4"
|
|
66
261
|
}),
|
|
67
|
-
|
|
68
|
-
className: "sr-only",
|
|
69
|
-
children: "Clear"
|
|
70
|
-
})
|
|
262
|
+
suggestion_0
|
|
71
263
|
]
|
|
72
|
-
})
|
|
73
|
-
]
|
|
264
|
+
}, suggestion_0))
|
|
74
265
|
});
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
266
|
+
let t16;
|
|
267
|
+
if ($[22] !== T3 || $[23] !== t15) {
|
|
268
|
+
t16 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(T3, {
|
|
269
|
+
children: t15
|
|
270
|
+
});
|
|
271
|
+
$[22] = T3;
|
|
272
|
+
$[23] = t15;
|
|
273
|
+
$[24] = t16;
|
|
274
|
+
} else t16 = $[24];
|
|
275
|
+
let t17;
|
|
276
|
+
if ($[25] !== T2 || $[26] !== t16) {
|
|
277
|
+
t17 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(T2, {
|
|
278
|
+
children: t16
|
|
279
|
+
});
|
|
280
|
+
$[25] = T2;
|
|
281
|
+
$[26] = t16;
|
|
282
|
+
$[27] = t17;
|
|
283
|
+
} else t17 = $[27];
|
|
284
|
+
let t18;
|
|
285
|
+
if ($[28] !== T1 || $[29] !== t17) {
|
|
286
|
+
t18 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(T1, {
|
|
287
|
+
className: t13,
|
|
288
|
+
align: t14,
|
|
289
|
+
children: t17
|
|
290
|
+
});
|
|
291
|
+
$[28] = T1;
|
|
292
|
+
$[29] = t17;
|
|
293
|
+
$[30] = t18;
|
|
294
|
+
} else t18 = $[30];
|
|
295
|
+
let t19;
|
|
296
|
+
if ($[31] !== T0 || $[32] !== setOpen || $[33] !== t10 || $[34] !== t12 || $[35] !== t18) {
|
|
297
|
+
t19 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(T0, {
|
|
298
|
+
open: t10,
|
|
102
299
|
onOpenChange: setOpen,
|
|
103
300
|
children: [
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
107
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Search, {
|
|
108
|
-
value: searchValue,
|
|
109
|
-
onChange: handleInputChange,
|
|
110
|
-
onClear: ()=>{
|
|
111
|
-
setSearchValue('');
|
|
112
|
-
onChange?.('');
|
|
113
|
-
setOpen(false);
|
|
114
|
-
},
|
|
115
|
-
placeholder: placeholder
|
|
116
|
-
})
|
|
117
|
-
})
|
|
118
|
-
}),
|
|
119
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent, {
|
|
120
|
-
className: "w-[--radix-popover-trigger-width] p-0",
|
|
121
|
-
align: "start",
|
|
122
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.Command, {
|
|
123
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandList, {
|
|
124
|
-
children: 0 === filteredSuggestions.length ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandEmpty, {
|
|
125
|
-
children: emptyMessage
|
|
126
|
-
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandGroup, {
|
|
127
|
-
children: filteredSuggestions.map((suggestion)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.CommandItem, {
|
|
128
|
-
onSelect: ()=>handleSelect(suggestion),
|
|
129
|
-
children: [
|
|
130
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Search, {
|
|
131
|
-
className: "mr-2 h-4 w-4"
|
|
132
|
-
}),
|
|
133
|
-
suggestion
|
|
134
|
-
]
|
|
135
|
-
}, suggestion))
|
|
136
|
-
})
|
|
137
|
-
})
|
|
138
|
-
})
|
|
139
|
-
})
|
|
301
|
+
t12,
|
|
302
|
+
t18
|
|
140
303
|
]
|
|
141
|
-
})
|
|
142
|
-
|
|
304
|
+
});
|
|
305
|
+
$[31] = T0;
|
|
306
|
+
$[32] = setOpen;
|
|
307
|
+
$[33] = t10;
|
|
308
|
+
$[34] = t12;
|
|
309
|
+
$[35] = t18;
|
|
310
|
+
$[36] = t19;
|
|
311
|
+
} else t19 = $[36];
|
|
312
|
+
let t20;
|
|
313
|
+
if ($[37] !== ref || $[38] !== t19 || $[39] !== t9) {
|
|
314
|
+
t20 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
315
|
+
ref: ref,
|
|
316
|
+
className: t9,
|
|
317
|
+
children: t19
|
|
318
|
+
});
|
|
319
|
+
$[37] = ref;
|
|
320
|
+
$[38] = t19;
|
|
321
|
+
$[39] = t9;
|
|
322
|
+
$[40] = t20;
|
|
323
|
+
} else t20 = $[40];
|
|
324
|
+
return t20;
|
|
143
325
|
});
|
|
144
326
|
SearchWithSuggestions.displayName = 'SearchWithSuggestions';
|
|
145
327
|
exports.Search = __webpack_exports__.Search;
|