@uipath/apollo-wind 2.77.0 → 2.78.0
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.
|
@@ -39,7 +39,7 @@ var __webpack_modules__ = {
|
|
|
39
39
|
"@/components/ui/calendar" (module) {
|
|
40
40
|
module.exports = require("./calendar.cjs");
|
|
41
41
|
},
|
|
42
|
-
"
|
|
42
|
+
"./card" (module) {
|
|
43
43
|
module.exports = require("./card.cjs");
|
|
44
44
|
},
|
|
45
45
|
"./chart" (module) {
|
|
@@ -57,7 +57,7 @@ var __webpack_modules__ = {
|
|
|
57
57
|
"./citation" (module) {
|
|
58
58
|
module.exports = require("./citation.cjs");
|
|
59
59
|
},
|
|
60
|
-
"
|
|
60
|
+
"./code-block" (module) {
|
|
61
61
|
module.exports = require("./code-block.cjs");
|
|
62
62
|
},
|
|
63
63
|
"./collapsible" (module) {
|
|
@@ -96,7 +96,7 @@ var __webpack_modules__ = {
|
|
|
96
96
|
"./dropzone-overlay" (module) {
|
|
97
97
|
module.exports = require("./dropzone-overlay.cjs");
|
|
98
98
|
},
|
|
99
|
-
"
|
|
99
|
+
"./editable-cell" (module) {
|
|
100
100
|
module.exports = require("./editable-cell.cjs");
|
|
101
101
|
},
|
|
102
102
|
"./empty-state" (module) {
|
|
@@ -132,7 +132,7 @@ var __webpack_modules__ = {
|
|
|
132
132
|
"./json-tree-view" (module) {
|
|
133
133
|
module.exports = require("./json-tree-view/index.cjs");
|
|
134
134
|
},
|
|
135
|
-
"
|
|
135
|
+
"@/components/ui/label" (module) {
|
|
136
136
|
module.exports = require("./label.cjs");
|
|
137
137
|
},
|
|
138
138
|
"./layout" (module) {
|
|
@@ -201,7 +201,7 @@ var __webpack_modules__ = {
|
|
|
201
201
|
"./reference-chip-colors" (module) {
|
|
202
202
|
module.exports = require("./reference-chip-colors.cjs");
|
|
203
203
|
},
|
|
204
|
-
"
|
|
204
|
+
"./reference-chip" (module) {
|
|
205
205
|
module.exports = require("./reference-chip.cjs");
|
|
206
206
|
},
|
|
207
207
|
"./resizable" (module) {
|
|
@@ -255,7 +255,7 @@ var __webpack_modules__ = {
|
|
|
255
255
|
"./tabs" (module) {
|
|
256
256
|
module.exports = require("./tabs.cjs");
|
|
257
257
|
},
|
|
258
|
-
"
|
|
258
|
+
"./textarea" (module) {
|
|
259
259
|
module.exports = require("./textarea.cjs");
|
|
260
260
|
},
|
|
261
261
|
"./thinking-indicator" (module) {
|
|
@@ -276,7 +276,7 @@ var __webpack_modules__ = {
|
|
|
276
276
|
"./tree-view" (module) {
|
|
277
277
|
module.exports = require("./tree-view.cjs");
|
|
278
278
|
},
|
|
279
|
-
"
|
|
279
|
+
"./variable-picker" (module) {
|
|
280
280
|
module.exports = require("./variable-picker/index.cjs");
|
|
281
281
|
},
|
|
282
282
|
"./variable-value-control" (module) {
|
|
@@ -462,7 +462,7 @@ var __webpack_exports__ = {};
|
|
|
462
462
|
"ReferenceChip"
|
|
463
463
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_calendar__rspack_import_12[__rspack_import_key];
|
|
464
464
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
465
|
-
var _card__rspack_import_13 = __webpack_require__("
|
|
465
|
+
var _card__rspack_import_13 = __webpack_require__("./card");
|
|
466
466
|
var __rspack_reexport = {};
|
|
467
467
|
for(const __rspack_import_key in _card__rspack_import_13)if ([
|
|
468
468
|
"getReferenceChipColors",
|
|
@@ -522,7 +522,7 @@ var __webpack_exports__ = {};
|
|
|
522
522
|
"ReferenceChip"
|
|
523
523
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_citation__rspack_import_18[__rspack_import_key];
|
|
524
524
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
525
|
-
var _code_block__rspack_import_19 = __webpack_require__("
|
|
525
|
+
var _code_block__rspack_import_19 = __webpack_require__("./code-block");
|
|
526
526
|
var __rspack_reexport = {};
|
|
527
527
|
for(const __rspack_import_key in _code_block__rspack_import_19)if ([
|
|
528
528
|
"getReferenceChipColors",
|
|
@@ -652,7 +652,7 @@ var __webpack_exports__ = {};
|
|
|
652
652
|
"ReferenceChip"
|
|
653
653
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_dropzone_overlay__rspack_import_31[__rspack_import_key];
|
|
654
654
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
655
|
-
var _editable_cell__rspack_import_32 = __webpack_require__("
|
|
655
|
+
var _editable_cell__rspack_import_32 = __webpack_require__("./editable-cell");
|
|
656
656
|
var __rspack_reexport = {};
|
|
657
657
|
for(const __rspack_import_key in _editable_cell__rspack_import_32)if ([
|
|
658
658
|
"getReferenceChipColors",
|
|
@@ -772,7 +772,7 @@ var __webpack_exports__ = {};
|
|
|
772
772
|
"ReferenceChip"
|
|
773
773
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_json_tree_view__rspack_import_43[__rspack_import_key];
|
|
774
774
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
775
|
-
var _label__rspack_import_44 = __webpack_require__("
|
|
775
|
+
var _label__rspack_import_44 = __webpack_require__("@/components/ui/label");
|
|
776
776
|
var __rspack_reexport = {};
|
|
777
777
|
for(const __rspack_import_key in _label__rspack_import_44)if ([
|
|
778
778
|
"getReferenceChipColors",
|
|
@@ -992,7 +992,7 @@ var __webpack_exports__ = {};
|
|
|
992
992
|
"ReferenceChip"
|
|
993
993
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_radio_group__rspack_import_65[__rspack_import_key];
|
|
994
994
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
995
|
-
var _reference_chip__rspack_import_66 = __webpack_require__("
|
|
995
|
+
var _reference_chip__rspack_import_66 = __webpack_require__("./reference-chip");
|
|
996
996
|
var _reference_chip_colors__rspack_import_67 = __webpack_require__("./reference-chip-colors");
|
|
997
997
|
var _resizable__rspack_import_68 = __webpack_require__("./resizable");
|
|
998
998
|
var __rspack_reexport = {};
|
|
@@ -1164,7 +1164,7 @@ var __webpack_exports__ = {};
|
|
|
1164
1164
|
"ReferenceChip"
|
|
1165
1165
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_tabs__rspack_import_84[__rspack_import_key];
|
|
1166
1166
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
1167
|
-
var _textarea__rspack_import_85 = __webpack_require__("
|
|
1167
|
+
var _textarea__rspack_import_85 = __webpack_require__("./textarea");
|
|
1168
1168
|
var __rspack_reexport = {};
|
|
1169
1169
|
for(const __rspack_import_key in _textarea__rspack_import_85)if ([
|
|
1170
1170
|
"getReferenceChipColors",
|
|
@@ -1226,7 +1226,7 @@ var __webpack_exports__ = {};
|
|
|
1226
1226
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
1227
1227
|
var _tree_view__rspack_import_91 = __webpack_require__("./tree-view");
|
|
1228
1228
|
var _tree_view__rspack_import_91_default = /*#__PURE__*/ __webpack_require__.n(_tree_view__rspack_import_91);
|
|
1229
|
-
var _variable_picker__rspack_import_92 = __webpack_require__("
|
|
1229
|
+
var _variable_picker__rspack_import_92 = __webpack_require__("./variable-picker");
|
|
1230
1230
|
var __rspack_reexport = {};
|
|
1231
1231
|
for(const __rspack_import_key in _variable_picker__rspack_import_92)if ([
|
|
1232
1232
|
"getReferenceChipColors",
|
|
@@ -38,13 +38,30 @@ const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
|
38
38
|
const DEFAULT_SEARCH_STRINGS = {
|
|
39
39
|
clear: 'Clear'
|
|
40
40
|
};
|
|
41
|
-
const Search = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, value, onChange, onClear, showClearButton = true, variant, size, error, errorId, strings, ...props }, ref)=>{
|
|
41
|
+
const Search = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, value, onChange, onValueChange, onClear, showClearButton = true, variant, size, error, errorId, strings, ...props }, ref)=>{
|
|
42
42
|
const text = {
|
|
43
43
|
...DEFAULT_SEARCH_STRINGS,
|
|
44
44
|
...strings
|
|
45
45
|
};
|
|
46
|
+
const inputRef = external_react_namespaceObject.useRef(null);
|
|
47
|
+
const setRef = external_react_namespaceObject.useMemo(()=>(0, index_cjs_namespaceObject.composeRefs)(ref, inputRef), [
|
|
48
|
+
ref
|
|
49
|
+
]);
|
|
50
|
+
const handleChange = (e)=>{
|
|
51
|
+
if (onValueChange) {
|
|
52
|
+
onChange?.(e);
|
|
53
|
+
onValueChange(e.target.value);
|
|
54
|
+
} else onChange?.(e.target.value);
|
|
55
|
+
};
|
|
46
56
|
const handleClear = ()=>{
|
|
47
|
-
|
|
57
|
+
const input = inputRef.current;
|
|
58
|
+
if (input) {
|
|
59
|
+
Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value')?.set?.call(input, '');
|
|
60
|
+
input.dispatchEvent(new Event('input', {
|
|
61
|
+
bubbles: true
|
|
62
|
+
}));
|
|
63
|
+
input.focus();
|
|
64
|
+
}
|
|
48
65
|
onClear?.();
|
|
49
66
|
};
|
|
50
67
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_input_group_cjs_namespaceObject.InputGroup, {
|
|
@@ -61,11 +78,11 @@ const Search = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ classN
|
|
|
61
78
|
})
|
|
62
79
|
}),
|
|
63
80
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupInput, {
|
|
64
|
-
ref:
|
|
81
|
+
ref: setRef,
|
|
65
82
|
type: "search",
|
|
66
83
|
className: (0, index_cjs_namespaceObject.cn)('[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none', className),
|
|
67
84
|
value: value,
|
|
68
|
-
onChange:
|
|
85
|
+
onChange: handleChange,
|
|
69
86
|
...props
|
|
70
87
|
}),
|
|
71
88
|
showClearButton && value && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupAddon, {
|
|
@@ -84,6 +101,8 @@ const Search = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ classN
|
|
|
84
101
|
Search.displayName = 'Search';
|
|
85
102
|
const SearchWithSuggestions = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ value, onChange, placeholder = 'Search...', suggestions = [], onSelect, emptyMessage = 'No results found.', className, strings }, ref)=>{
|
|
86
103
|
const [open, setOpen] = external_react_namespaceObject.useState(false);
|
|
104
|
+
const anchorRef = external_react_namespaceObject.useRef(null);
|
|
105
|
+
const popupId = external_react_namespaceObject.useId();
|
|
87
106
|
const [searchValue, setSearchValue] = external_react_namespaceObject.useState(value || '');
|
|
88
107
|
external_react_namespaceObject.useEffect(()=>{
|
|
89
108
|
if (void 0 !== value) setSearchValue(value);
|
|
@@ -102,33 +121,39 @@ const SearchWithSuggestions = /*#__PURE__*/ external_react_namespaceObject.forwa
|
|
|
102
121
|
onChange?.(newValue);
|
|
103
122
|
setOpen(newValue.length > 0);
|
|
104
123
|
};
|
|
124
|
+
const isOpen = open && filteredSuggestions.length > 0;
|
|
105
125
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
106
126
|
ref: ref,
|
|
107
127
|
"data-slot": "search-with-suggestions",
|
|
108
128
|
className: (0, index_cjs_namespaceObject.cn)('relative', className),
|
|
109
129
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover, {
|
|
110
|
-
open:
|
|
130
|
+
open: isOpen,
|
|
111
131
|
onOpenChange: setOpen,
|
|
112
132
|
children: [
|
|
113
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.
|
|
133
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverAnchor, {
|
|
114
134
|
asChild: true,
|
|
115
135
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
136
|
+
ref: anchorRef,
|
|
116
137
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Search, {
|
|
117
138
|
value: searchValue,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
setSearchValue('');
|
|
121
|
-
onChange?.('');
|
|
122
|
-
setOpen(false);
|
|
123
|
-
},
|
|
139
|
+
onValueChange: handleInputChange,
|
|
140
|
+
onClick: ()=>setOpen(true),
|
|
124
141
|
placeholder: placeholder,
|
|
125
|
-
strings: strings
|
|
142
|
+
strings: strings,
|
|
143
|
+
"aria-haspopup": "dialog",
|
|
144
|
+
"aria-expanded": isOpen,
|
|
145
|
+
"aria-controls": isOpen ? popupId : void 0
|
|
126
146
|
})
|
|
127
147
|
})
|
|
128
148
|
}),
|
|
129
149
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent, {
|
|
150
|
+
id: popupId,
|
|
130
151
|
className: "w-[--radix-popover-trigger-width] p-0",
|
|
131
152
|
align: "start",
|
|
153
|
+
onOpenAutoFocus: (e)=>e.preventDefault(),
|
|
154
|
+
onInteractOutside: (e)=>{
|
|
155
|
+
if (anchorRef.current?.contains(e.target)) e.preventDefault();
|
|
156
|
+
},
|
|
132
157
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.Command, {
|
|
133
158
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandList, {
|
|
134
159
|
children: 0 === filteredSuggestions.length ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandEmpty, {
|
|
@@ -5,9 +5,8 @@ export interface SearchStrings {
|
|
|
5
5
|
clear: string;
|
|
6
6
|
}
|
|
7
7
|
export declare const DEFAULT_SEARCH_STRINGS: SearchStrings;
|
|
8
|
-
|
|
8
|
+
interface SearchBaseProps extends Omit<InputGroupInputProps, 'onChange'> {
|
|
9
9
|
value?: string;
|
|
10
|
-
onChange?: (value: string) => void;
|
|
11
10
|
onClear?: () => void;
|
|
12
11
|
showClearButton?: boolean;
|
|
13
12
|
variant?: InputGroupProps['variant'];
|
|
@@ -19,6 +18,22 @@ export interface SearchProps extends Omit<InputGroupInputProps, 'onChange'> {
|
|
|
19
18
|
/** Overrides for any subset of the built-in labels. */
|
|
20
19
|
strings?: Partial<SearchStrings>;
|
|
21
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Two modes:
|
|
23
|
+
* - Standard (new integrations; required with `asChild` wrappers like
|
|
24
|
+
* cmdk `Command.Input` or Radix Slot): pass `onValueChange` for the
|
|
25
|
+
* string value; `onChange` receives the native event.
|
|
26
|
+
* - Legacy (existing consumers): omit `onValueChange`;
|
|
27
|
+
* `onChange` receives the string value.
|
|
28
|
+
*/
|
|
29
|
+
export type SearchProps = SearchBaseProps & ({
|
|
30
|
+
onValueChange: (value: string) => void;
|
|
31
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
32
|
+
} | {
|
|
33
|
+
onValueChange?: undefined;
|
|
34
|
+
/** @deprecated Pass `onValueChange` instead; `onChange` will receive the native event. */
|
|
35
|
+
onChange?: (value: string) => void;
|
|
36
|
+
});
|
|
22
37
|
declare const Search: React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<HTMLInputElement>>;
|
|
23
38
|
export interface SearchWithSuggestionsProps {
|
|
24
39
|
value?: string;
|
|
@@ -1,20 +1,37 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Search, X } from "lucide-react";
|
|
3
|
-
import { forwardRef, useEffect, useState } from "react";
|
|
3
|
+
import { forwardRef, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { Command, CommandEmpty, CommandGroup, CommandItem, CommandList } from "./command.js";
|
|
5
5
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "./input-group.js";
|
|
6
|
-
import { Popover,
|
|
7
|
-
import { cn } from "../../lib/index.js";
|
|
6
|
+
import { Popover, PopoverAnchor, PopoverContent } from "./popover.js";
|
|
7
|
+
import { cn, composeRefs } from "../../lib/index.js";
|
|
8
8
|
const DEFAULT_SEARCH_STRINGS = {
|
|
9
9
|
clear: 'Clear'
|
|
10
10
|
};
|
|
11
|
-
const search_Search = /*#__PURE__*/ forwardRef(({ className, value, onChange, onClear, showClearButton = true, variant, size, error, errorId, strings, ...props }, ref)=>{
|
|
11
|
+
const search_Search = /*#__PURE__*/ forwardRef(({ className, value, onChange, onValueChange, onClear, showClearButton = true, variant, size, error, errorId, strings, ...props }, ref)=>{
|
|
12
12
|
const text = {
|
|
13
13
|
...DEFAULT_SEARCH_STRINGS,
|
|
14
14
|
...strings
|
|
15
15
|
};
|
|
16
|
+
const inputRef = useRef(null);
|
|
17
|
+
const setRef = useMemo(()=>composeRefs(ref, inputRef), [
|
|
18
|
+
ref
|
|
19
|
+
]);
|
|
20
|
+
const handleChange = (e)=>{
|
|
21
|
+
if (onValueChange) {
|
|
22
|
+
onChange?.(e);
|
|
23
|
+
onValueChange(e.target.value);
|
|
24
|
+
} else onChange?.(e.target.value);
|
|
25
|
+
};
|
|
16
26
|
const handleClear = ()=>{
|
|
17
|
-
|
|
27
|
+
const input = inputRef.current;
|
|
28
|
+
if (input) {
|
|
29
|
+
Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value')?.set?.call(input, '');
|
|
30
|
+
input.dispatchEvent(new Event('input', {
|
|
31
|
+
bubbles: true
|
|
32
|
+
}));
|
|
33
|
+
input.focus();
|
|
34
|
+
}
|
|
18
35
|
onClear?.();
|
|
19
36
|
};
|
|
20
37
|
return /*#__PURE__*/ jsxs(InputGroup, {
|
|
@@ -31,11 +48,11 @@ const search_Search = /*#__PURE__*/ forwardRef(({ className, value, onChange, on
|
|
|
31
48
|
})
|
|
32
49
|
}),
|
|
33
50
|
/*#__PURE__*/ jsx(InputGroupInput, {
|
|
34
|
-
ref:
|
|
51
|
+
ref: setRef,
|
|
35
52
|
type: "search",
|
|
36
53
|
className: cn('[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none', className),
|
|
37
54
|
value: value,
|
|
38
|
-
onChange:
|
|
55
|
+
onChange: handleChange,
|
|
39
56
|
...props
|
|
40
57
|
}),
|
|
41
58
|
showClearButton && value && /*#__PURE__*/ jsx(InputGroupAddon, {
|
|
@@ -54,6 +71,8 @@ const search_Search = /*#__PURE__*/ forwardRef(({ className, value, onChange, on
|
|
|
54
71
|
search_Search.displayName = 'Search';
|
|
55
72
|
const SearchWithSuggestions = /*#__PURE__*/ forwardRef(({ value, onChange, placeholder = 'Search...', suggestions = [], onSelect, emptyMessage = 'No results found.', className, strings }, ref)=>{
|
|
56
73
|
const [open, setOpen] = useState(false);
|
|
74
|
+
const anchorRef = useRef(null);
|
|
75
|
+
const popupId = useId();
|
|
57
76
|
const [searchValue, setSearchValue] = useState(value || '');
|
|
58
77
|
useEffect(()=>{
|
|
59
78
|
if (void 0 !== value) setSearchValue(value);
|
|
@@ -72,33 +91,39 @@ const SearchWithSuggestions = /*#__PURE__*/ forwardRef(({ value, onChange, place
|
|
|
72
91
|
onChange?.(newValue);
|
|
73
92
|
setOpen(newValue.length > 0);
|
|
74
93
|
};
|
|
94
|
+
const isOpen = open && filteredSuggestions.length > 0;
|
|
75
95
|
return /*#__PURE__*/ jsx("div", {
|
|
76
96
|
ref: ref,
|
|
77
97
|
"data-slot": "search-with-suggestions",
|
|
78
98
|
className: cn('relative', className),
|
|
79
99
|
children: /*#__PURE__*/ jsxs(Popover, {
|
|
80
|
-
open:
|
|
100
|
+
open: isOpen,
|
|
81
101
|
onOpenChange: setOpen,
|
|
82
102
|
children: [
|
|
83
|
-
/*#__PURE__*/ jsx(
|
|
103
|
+
/*#__PURE__*/ jsx(PopoverAnchor, {
|
|
84
104
|
asChild: true,
|
|
85
105
|
children: /*#__PURE__*/ jsx("div", {
|
|
106
|
+
ref: anchorRef,
|
|
86
107
|
children: /*#__PURE__*/ jsx(search_Search, {
|
|
87
108
|
value: searchValue,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
setSearchValue('');
|
|
91
|
-
onChange?.('');
|
|
92
|
-
setOpen(false);
|
|
93
|
-
},
|
|
109
|
+
onValueChange: handleInputChange,
|
|
110
|
+
onClick: ()=>setOpen(true),
|
|
94
111
|
placeholder: placeholder,
|
|
95
|
-
strings: strings
|
|
112
|
+
strings: strings,
|
|
113
|
+
"aria-haspopup": "dialog",
|
|
114
|
+
"aria-expanded": isOpen,
|
|
115
|
+
"aria-controls": isOpen ? popupId : void 0
|
|
96
116
|
})
|
|
97
117
|
})
|
|
98
118
|
}),
|
|
99
119
|
/*#__PURE__*/ jsx(PopoverContent, {
|
|
120
|
+
id: popupId,
|
|
100
121
|
className: "w-[--radix-popover-trigger-width] p-0",
|
|
101
122
|
align: "start",
|
|
123
|
+
onOpenAutoFocus: (e)=>e.preventDefault(),
|
|
124
|
+
onInteractOutside: (e)=>{
|
|
125
|
+
if (anchorRef.current?.contains(e.target)) e.preventDefault();
|
|
126
|
+
},
|
|
102
127
|
children: /*#__PURE__*/ jsx(Command, {
|
|
103
128
|
children: /*#__PURE__*/ jsx(CommandList, {
|
|
104
129
|
children: 0 === filteredSuggestions.length ? /*#__PURE__*/ jsx(CommandEmpty, {
|