@yamada-ui/autocomplete 1.5.3-dev-20240927170756 → 1.5.3-dev-20240927172557
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/autocomplete-create.js.map +1 -1
- package/dist/autocomplete-create.mjs +2 -2
- package/dist/autocomplete-empty.js.map +1 -1
- package/dist/autocomplete-empty.mjs +2 -2
- package/dist/autocomplete-list.js +14 -10
- package/dist/autocomplete-list.js.map +1 -1
- package/dist/autocomplete-list.mjs +2 -2
- package/dist/autocomplete-option.js +3 -1
- package/dist/autocomplete-option.js.map +1 -1
- package/dist/autocomplete-option.mjs +2 -2
- package/dist/autocomplete.js +17 -11
- package/dist/autocomplete.js.map +1 -1
- package/dist/autocomplete.mjs +8 -8
- package/dist/{chunk-OTVG42AD.mjs → chunk-2WVIW6HR.mjs} +2 -2
- package/dist/{chunk-2JAGPELI.mjs → chunk-5LPWFWE6.mjs} +4 -2
- package/dist/chunk-5LPWFWE6.mjs.map +1 -0
- package/dist/{chunk-K42L5QVM.mjs → chunk-7OWUOQZD.mjs} +5 -5
- package/dist/{chunk-ZTDA3B2B.mjs → chunk-CCOWDDFS.mjs} +2 -2
- package/dist/{chunk-2GOTGBRK.mjs → chunk-E3Y2E2TK.mjs} +2 -2
- package/dist/{chunk-YEFQMSJM.mjs → chunk-PCQMCEHL.mjs} +2 -2
- package/dist/{chunk-QGOCVO2C.mjs → chunk-R76HPAN4.mjs} +15 -11
- package/dist/chunk-R76HPAN4.mjs.map +1 -0
- package/dist/{chunk-5MMUZ2XQ.mjs → chunk-S53LMDD7.mjs} +2 -2
- package/dist/{chunk-ZZSGPNV3.mjs → chunk-UNGOVJSY.mjs} +5 -5
- package/dist/index.js +17 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/multi-autocomplete.js +17 -11
- package/dist/multi-autocomplete.js.map +1 -1
- package/dist/multi-autocomplete.mjs +8 -8
- package/dist/use-autocomplete-list.js +14 -10
- package/dist/use-autocomplete-list.js.map +1 -1
- package/dist/use-autocomplete-list.mjs +1 -1
- package/dist/use-autocomplete-option.js +3 -1
- package/dist/use-autocomplete-option.js.map +1 -1
- package/dist/use-autocomplete-option.mjs +1 -1
- package/dist/use-autocomplete.js +3 -1
- package/dist/use-autocomplete.js.map +1 -1
- package/dist/use-autocomplete.mjs +3 -3
- package/package.json +13 -13
- package/dist/chunk-2JAGPELI.mjs.map +0 -1
- package/dist/chunk-QGOCVO2C.mjs.map +0 -1
- /package/dist/{chunk-OTVG42AD.mjs.map → chunk-2WVIW6HR.mjs.map} +0 -0
- /package/dist/{chunk-K42L5QVM.mjs.map → chunk-7OWUOQZD.mjs.map} +0 -0
- /package/dist/{chunk-ZTDA3B2B.mjs.map → chunk-CCOWDDFS.mjs.map} +0 -0
- /package/dist/{chunk-2GOTGBRK.mjs.map → chunk-E3Y2E2TK.mjs.map} +0 -0
- /package/dist/{chunk-YEFQMSJM.mjs.map → chunk-PCQMCEHL.mjs.map} +0 -0
- /package/dist/{chunk-5MMUZ2XQ.mjs.map → chunk-S53LMDD7.mjs.map} +0 -0
- /package/dist/{chunk-ZZSGPNV3.mjs.map → chunk-UNGOVJSY.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
MultiAutocomplete
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-7OWUOQZD.mjs";
|
5
5
|
import {
|
6
6
|
Autocomplete
|
7
|
-
} from "./chunk-
|
8
|
-
import "./chunk-
|
7
|
+
} from "./chunk-UNGOVJSY.mjs";
|
8
|
+
import "./chunk-PCQMCEHL.mjs";
|
9
9
|
import {
|
10
10
|
AutocompleteCreate
|
11
|
-
} from "./chunk-
|
11
|
+
} from "./chunk-E3Y2E2TK.mjs";
|
12
12
|
import {
|
13
13
|
AutocompleteEmpty
|
14
|
-
} from "./chunk-
|
15
|
-
import "./chunk-
|
16
|
-
import "./chunk-
|
14
|
+
} from "./chunk-CCOWDDFS.mjs";
|
15
|
+
import "./chunk-S53LMDD7.mjs";
|
16
|
+
import "./chunk-R76HPAN4.mjs";
|
17
17
|
import {
|
18
18
|
AutocompleteOptionGroup
|
19
19
|
} from "./chunk-6F3LT7J6.mjs";
|
20
20
|
import "./chunk-JMX72TSD.mjs";
|
21
21
|
import {
|
22
22
|
AutocompleteOption
|
23
|
-
} from "./chunk-
|
24
|
-
import "./chunk-
|
23
|
+
} from "./chunk-2WVIW6HR.mjs";
|
24
|
+
import "./chunk-5LPWFWE6.mjs";
|
25
25
|
import "./chunk-7SWSKLSA.mjs";
|
26
26
|
import "./chunk-JPUKYLBW.mjs";
|
27
27
|
export {
|
@@ -167,6 +167,7 @@ var useAutocompleteOption = (props) => {
|
|
167
167
|
inputRef,
|
168
168
|
onFocusNext
|
169
169
|
} = useAutocompleteContext();
|
170
|
+
const id = (0, import_react2.useId)();
|
170
171
|
let {
|
171
172
|
icon: customIcon,
|
172
173
|
isDisabled,
|
@@ -237,7 +238,7 @@ var useAutocompleteOption = (props) => {
|
|
237
238
|
};
|
238
239
|
return {
|
239
240
|
ref: (0, import_utils3.mergeRefs)(itemRef, ref, register),
|
240
|
-
id
|
241
|
+
id,
|
241
242
|
role: "option",
|
242
243
|
...computedProps,
|
243
244
|
...props2,
|
@@ -253,6 +254,7 @@ var useAutocompleteOption = (props) => {
|
|
253
254
|
};
|
254
255
|
},
|
255
256
|
[
|
257
|
+
id,
|
256
258
|
optionValue,
|
257
259
|
computedProps,
|
258
260
|
isDisabled,
|
@@ -431,6 +433,7 @@ var import_utils7 = require("@yamada-ui/utils");
|
|
431
433
|
var import_utils6 = require("@yamada-ui/utils");
|
432
434
|
var import_react3 = require("react");
|
433
435
|
var useAutocompleteList = () => {
|
436
|
+
const uuid = (0, import_react3.useId)();
|
434
437
|
const { focusedIndex, isOpen, listRef, rebirthOptions } = useAutocompleteContext();
|
435
438
|
const descendants = useAutocompleteDescendantsContext();
|
436
439
|
const beforeFocusedIndex = (0, import_react3.useRef)(-1);
|
@@ -468,16 +471,19 @@ var useAutocompleteList = () => {
|
|
468
471
|
if (!isOpen) beforeFocusedIndex.current = -1;
|
469
472
|
}, [isOpen]);
|
470
473
|
const getListProps = (0, import_react3.useCallback)(
|
471
|
-
(props = {}, ref = null) =>
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
474
|
+
(props = {}, ref = null) => {
|
475
|
+
var _a;
|
476
|
+
return {
|
477
|
+
as: "ul",
|
478
|
+
ref: (0, import_utils6.mergeRefs)(listRef, ref),
|
479
|
+
role: "listbox",
|
480
|
+
tabIndex: -1,
|
481
|
+
position: "relative",
|
482
|
+
id: (_a = props.id) != null ? _a : uuid,
|
483
|
+
...props
|
484
|
+
};
|
485
|
+
},
|
486
|
+
[listRef, uuid]
|
481
487
|
);
|
482
488
|
return {
|
483
489
|
onAnimationComplete,
|