@yamada-ui/autocomplete 0.7.0 → 0.7.1
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/autocomplete-create.mjs +1 -1
- package/dist/autocomplete-empty.mjs +1 -1
- package/dist/autocomplete-icon.mjs +1 -1
- package/dist/autocomplete-list.mjs +1 -1
- package/dist/autocomplete-option-group.d.mts +1 -1
- package/dist/autocomplete-option-group.d.ts +1 -1
- package/dist/autocomplete-option-group.mjs +1 -1
- package/dist/autocomplete-option.d.mts +1 -1
- package/dist/autocomplete-option.d.ts +1 -1
- package/dist/autocomplete-option.mjs +1 -1
- package/dist/autocomplete.d.mts +1 -1
- package/dist/autocomplete.d.ts +1 -1
- package/dist/autocomplete.js +4 -4
- package/dist/autocomplete.mjs +1 -1
- package/dist/{chunk-HGHCA4LW.mjs → chunk-YEVNKRYY.mjs} +4 -4
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +1 -1
- package/dist/multi-autocomplete.d.mts +1 -1
- package/dist/multi-autocomplete.d.ts +1 -1
- package/dist/multi-autocomplete.js +4 -4
- package/dist/multi-autocomplete.mjs +1 -1
- package/dist/{use-autocomplete-3c0916c6.d.ts → use-autocomplete-23014180.d.ts} +10 -10
- package/dist/use-autocomplete.d.mts +1 -1
- package/dist/use-autocomplete.d.ts +1 -1
- package/dist/use-autocomplete.js +4 -4
- package/dist/use-autocomplete.mjs +1 -1
- package/package.json +7 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _yamada_ui_core from '@yamada-ui/core';
|
|
2
2
|
import { HTMLUIProps } from '@yamada-ui/core';
|
|
3
|
-
import { U as UseAutocompleteOptionGroupProps } from './use-autocomplete-
|
|
3
|
+
import { U as UseAutocompleteOptionGroupProps } from './use-autocomplete-23014180.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@yamada-ui/form-control';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _yamada_ui_core from '@yamada-ui/core';
|
|
2
2
|
import { HTMLUIProps } from '@yamada-ui/core';
|
|
3
|
-
import { U as UseAutocompleteOptionGroupProps } from './use-autocomplete-
|
|
3
|
+
import { U as UseAutocompleteOptionGroupProps } from './use-autocomplete-23014180.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@yamada-ui/form-control';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@yamada-ui/core';
|
|
2
2
|
import 'react';
|
|
3
|
-
export { A as AutocompleteOption, a as AutocompleteOptionProps } from './use-autocomplete-
|
|
3
|
+
export { A as AutocompleteOption, a as AutocompleteOptionProps } from './use-autocomplete-23014180.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import '@yamada-ui/form-control';
|
|
6
6
|
import '@yamada-ui/popover';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@yamada-ui/core';
|
|
2
2
|
import 'react';
|
|
3
|
-
export { A as AutocompleteOption, a as AutocompleteOptionProps } from './use-autocomplete-
|
|
3
|
+
export { A as AutocompleteOption, a as AutocompleteOptionProps } from './use-autocomplete-23014180.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import '@yamada-ui/form-control';
|
|
6
6
|
import '@yamada-ui/popover';
|
package/dist/autocomplete.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _yamada_ui_core from '@yamada-ui/core';
|
|
|
2
2
|
import { ThemeProps, HTMLUIProps } from '@yamada-ui/core';
|
|
3
3
|
import { AutocompleteIconProps } from './autocomplete-icon.mjs';
|
|
4
4
|
import { AutocompleteListProps } from './autocomplete-list.mjs';
|
|
5
|
-
import { c as UseAutocompleteProps } from './use-autocomplete-
|
|
5
|
+
import { c as UseAutocompleteProps } from './use-autocomplete-23014180.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import '@yamada-ui/form-control';
|
package/dist/autocomplete.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _yamada_ui_core from '@yamada-ui/core';
|
|
|
2
2
|
import { ThemeProps, HTMLUIProps } from '@yamada-ui/core';
|
|
3
3
|
import { AutocompleteIconProps } from './autocomplete-icon.js';
|
|
4
4
|
import { AutocompleteListProps } from './autocomplete-list.js';
|
|
5
|
-
import { c as UseAutocompleteProps } from './use-autocomplete-
|
|
5
|
+
import { c as UseAutocompleteProps } from './use-autocomplete-23014180.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import '@yamada-ui/form-control';
|
package/dist/autocomplete.js
CHANGED
|
@@ -499,7 +499,7 @@ var useAutocomplete = ({
|
|
|
499
499
|
const id2 = setTimeout(() => {
|
|
500
500
|
if (isEmpty || isAllSelected)
|
|
501
501
|
return;
|
|
502
|
-
const first = descendants.
|
|
502
|
+
const first = descendants.enabledFirstValue(
|
|
503
503
|
({ node }) => "target" in node.dataset
|
|
504
504
|
);
|
|
505
505
|
if (!first)
|
|
@@ -529,7 +529,7 @@ var useAutocomplete = ({
|
|
|
529
529
|
const id2 = setTimeout(() => {
|
|
530
530
|
if (isEmpty || isAllSelected)
|
|
531
531
|
return;
|
|
532
|
-
const last = descendants.
|
|
532
|
+
const last = descendants.enabledLastValue(
|
|
533
533
|
({ node }) => "target" in node.dataset
|
|
534
534
|
);
|
|
535
535
|
if (!last)
|
|
@@ -538,8 +538,8 @@ var useAutocomplete = ({
|
|
|
538
538
|
setFocusedIndex(last.index);
|
|
539
539
|
} else {
|
|
540
540
|
if (selectedIndexes.includes(last.index)) {
|
|
541
|
-
const
|
|
542
|
-
setFocusedIndex(
|
|
541
|
+
const enabledLast = enabledValues.reverse()[0];
|
|
542
|
+
setFocusedIndex(enabledLast.index);
|
|
543
543
|
} else {
|
|
544
544
|
setFocusedIndex(last.index);
|
|
545
545
|
}
|
package/dist/autocomplete.mjs
CHANGED
|
@@ -900,7 +900,7 @@ var useAutocomplete = ({
|
|
|
900
900
|
const id2 = setTimeout(() => {
|
|
901
901
|
if (isEmpty || isAllSelected)
|
|
902
902
|
return;
|
|
903
|
-
const first = descendants.
|
|
903
|
+
const first = descendants.enabledFirstValue(
|
|
904
904
|
({ node }) => "target" in node.dataset
|
|
905
905
|
);
|
|
906
906
|
if (!first)
|
|
@@ -930,7 +930,7 @@ var useAutocomplete = ({
|
|
|
930
930
|
const id2 = setTimeout(() => {
|
|
931
931
|
if (isEmpty || isAllSelected)
|
|
932
932
|
return;
|
|
933
|
-
const last = descendants.
|
|
933
|
+
const last = descendants.enabledLastValue(
|
|
934
934
|
({ node }) => "target" in node.dataset
|
|
935
935
|
);
|
|
936
936
|
if (!last)
|
|
@@ -939,8 +939,8 @@ var useAutocomplete = ({
|
|
|
939
939
|
setFocusedIndex(last.index);
|
|
940
940
|
} else {
|
|
941
941
|
if (selectedIndexes.includes(last.index)) {
|
|
942
|
-
const
|
|
943
|
-
setFocusedIndex(
|
|
942
|
+
const enabledLast = enabledValues.reverse()[0];
|
|
943
|
+
setFocusedIndex(enabledLast.index);
|
|
944
944
|
} else {
|
|
945
945
|
setFocusedIndex(last.index);
|
|
946
946
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Autocomplete, AutocompleteProps } from './autocomplete.mjs';
|
|
2
2
|
export { AutocompleteOptionGroup, AutocompleteOptionGroupProps } from './autocomplete-option-group.mjs';
|
|
3
|
-
export { b as AutocompleteItem, A as AutocompleteOption, a as AutocompleteOptionProps } from './use-autocomplete-
|
|
3
|
+
export { b as AutocompleteItem, A as AutocompleteOption, a as AutocompleteOptionProps } from './use-autocomplete-23014180.js';
|
|
4
4
|
export { AutocompleteCreate, AutocompleteCreateProps } from './autocomplete-create.mjs';
|
|
5
5
|
export { AutocompleteEmpty, AutocompleteEmptyProps } from './autocomplete-empty.mjs';
|
|
6
6
|
export { MultiAutocomplete, MultiAutocompleteProps } from './multi-autocomplete.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Autocomplete, AutocompleteProps } from './autocomplete.js';
|
|
2
2
|
export { AutocompleteOptionGroup, AutocompleteOptionGroupProps } from './autocomplete-option-group.js';
|
|
3
|
-
export { b as AutocompleteItem, A as AutocompleteOption, a as AutocompleteOptionProps } from './use-autocomplete-
|
|
3
|
+
export { b as AutocompleteItem, A as AutocompleteOption, a as AutocompleteOptionProps } from './use-autocomplete-23014180.js';
|
|
4
4
|
export { AutocompleteCreate, AutocompleteCreateProps } from './autocomplete-create.js';
|
|
5
5
|
export { AutocompleteEmpty, AutocompleteEmptyProps } from './autocomplete-empty.js';
|
|
6
6
|
export { MultiAutocomplete, MultiAutocompleteProps } from './multi-autocomplete.js';
|
package/dist/index.js
CHANGED
|
@@ -300,7 +300,7 @@ var useAutocomplete = ({
|
|
|
300
300
|
const id2 = setTimeout(() => {
|
|
301
301
|
if (isEmpty || isAllSelected)
|
|
302
302
|
return;
|
|
303
|
-
const first = descendants.
|
|
303
|
+
const first = descendants.enabledFirstValue(
|
|
304
304
|
({ node }) => "target" in node.dataset
|
|
305
305
|
);
|
|
306
306
|
if (!first)
|
|
@@ -330,7 +330,7 @@ var useAutocomplete = ({
|
|
|
330
330
|
const id2 = setTimeout(() => {
|
|
331
331
|
if (isEmpty || isAllSelected)
|
|
332
332
|
return;
|
|
333
|
-
const last = descendants.
|
|
333
|
+
const last = descendants.enabledLastValue(
|
|
334
334
|
({ node }) => "target" in node.dataset
|
|
335
335
|
);
|
|
336
336
|
if (!last)
|
|
@@ -339,8 +339,8 @@ var useAutocomplete = ({
|
|
|
339
339
|
setFocusedIndex(last.index);
|
|
340
340
|
} else {
|
|
341
341
|
if (selectedIndexes.includes(last.index)) {
|
|
342
|
-
const
|
|
343
|
-
setFocusedIndex(
|
|
342
|
+
const enabledLast = enabledValues.reverse()[0];
|
|
343
|
+
setFocusedIndex(enabledLast.index);
|
|
344
344
|
} else {
|
|
345
345
|
setFocusedIndex(last.index);
|
|
346
346
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { ThemeProps, HTMLUIProps } from '@yamada-ui/core';
|
|
|
3
3
|
import { FC, MouseEventHandler } from 'react';
|
|
4
4
|
import { AutocompleteIconProps } from './autocomplete-icon.mjs';
|
|
5
5
|
import { AutocompleteListProps } from './autocomplete-list.mjs';
|
|
6
|
-
import { c as UseAutocompleteProps } from './use-autocomplete-
|
|
6
|
+
import { c as UseAutocompleteProps } from './use-autocomplete-23014180.js';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import '@yamada-ui/form-control';
|
|
9
9
|
import '@yamada-ui/popover';
|
|
@@ -3,7 +3,7 @@ import { ThemeProps, HTMLUIProps } from '@yamada-ui/core';
|
|
|
3
3
|
import { FC, MouseEventHandler } from 'react';
|
|
4
4
|
import { AutocompleteIconProps } from './autocomplete-icon.js';
|
|
5
5
|
import { AutocompleteListProps } from './autocomplete-list.js';
|
|
6
|
-
import { c as UseAutocompleteProps } from './use-autocomplete-
|
|
6
|
+
import { c as UseAutocompleteProps } from './use-autocomplete-23014180.js';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import '@yamada-ui/form-control';
|
|
9
9
|
import '@yamada-ui/popover';
|
|
@@ -500,7 +500,7 @@ var useAutocomplete = ({
|
|
|
500
500
|
const id2 = setTimeout(() => {
|
|
501
501
|
if (isEmpty || isAllSelected)
|
|
502
502
|
return;
|
|
503
|
-
const first = descendants.
|
|
503
|
+
const first = descendants.enabledFirstValue(
|
|
504
504
|
({ node }) => "target" in node.dataset
|
|
505
505
|
);
|
|
506
506
|
if (!first)
|
|
@@ -530,7 +530,7 @@ var useAutocomplete = ({
|
|
|
530
530
|
const id2 = setTimeout(() => {
|
|
531
531
|
if (isEmpty || isAllSelected)
|
|
532
532
|
return;
|
|
533
|
-
const last = descendants.
|
|
533
|
+
const last = descendants.enabledLastValue(
|
|
534
534
|
({ node }) => "target" in node.dataset
|
|
535
535
|
);
|
|
536
536
|
if (!last)
|
|
@@ -539,8 +539,8 @@ var useAutocomplete = ({
|
|
|
539
539
|
setFocusedIndex(last.index);
|
|
540
540
|
} else {
|
|
541
541
|
if (selectedIndexes.includes(last.index)) {
|
|
542
|
-
const
|
|
543
|
-
setFocusedIndex(
|
|
542
|
+
const enabledLast = enabledValues.reverse()[0];
|
|
543
|
+
setFocusedIndex(enabledLast.index);
|
|
544
544
|
} else {
|
|
545
545
|
setFocusedIndex(last.index);
|
|
546
546
|
}
|
|
@@ -462,7 +462,7 @@ declare const AutocompleteDescendantsContextProvider: react.Provider<{
|
|
|
462
462
|
node: HTMLElement;
|
|
463
463
|
index: number;
|
|
464
464
|
})[]) => boolean) | undefined) => number;
|
|
465
|
-
|
|
465
|
+
enabledFirstValue: (filter?: ((value: {
|
|
466
466
|
disabled?: boolean | undefined;
|
|
467
467
|
id?: string | undefined;
|
|
468
468
|
filter?: ((value: any & {
|
|
@@ -502,7 +502,7 @@ declare const AutocompleteDescendantsContextProvider: react.Provider<{
|
|
|
502
502
|
node: HTMLElement;
|
|
503
503
|
index: number;
|
|
504
504
|
}) | undefined;
|
|
505
|
-
|
|
505
|
+
enabledLastValue: (filter?: ((value: {
|
|
506
506
|
disabled?: boolean | undefined;
|
|
507
507
|
id?: string | undefined;
|
|
508
508
|
filter?: ((value: any & {
|
|
@@ -1059,7 +1059,7 @@ declare const useAutocompleteDescendantsContext: () => {
|
|
|
1059
1059
|
node: HTMLElement;
|
|
1060
1060
|
index: number;
|
|
1061
1061
|
})[]) => boolean) | undefined) => number;
|
|
1062
|
-
|
|
1062
|
+
enabledFirstValue: (filter?: ((value: {
|
|
1063
1063
|
disabled?: boolean | undefined;
|
|
1064
1064
|
id?: string | undefined;
|
|
1065
1065
|
filter?: ((value: any & {
|
|
@@ -1099,7 +1099,7 @@ declare const useAutocompleteDescendantsContext: () => {
|
|
|
1099
1099
|
node: HTMLElement;
|
|
1100
1100
|
index: number;
|
|
1101
1101
|
}) | undefined;
|
|
1102
|
-
|
|
1102
|
+
enabledLastValue: (filter?: ((value: {
|
|
1103
1103
|
disabled?: boolean | undefined;
|
|
1104
1104
|
id?: string | undefined;
|
|
1105
1105
|
filter?: ((value: any & {
|
|
@@ -1656,7 +1656,7 @@ declare const useAutocompleteDescendants: () => {
|
|
|
1656
1656
|
node: HTMLElement;
|
|
1657
1657
|
index: number;
|
|
1658
1658
|
})[]) => boolean) | undefined) => number;
|
|
1659
|
-
|
|
1659
|
+
enabledFirstValue: (filter?: ((value: {
|
|
1660
1660
|
disabled?: boolean | undefined;
|
|
1661
1661
|
id?: string | undefined;
|
|
1662
1662
|
filter?: ((value: any & {
|
|
@@ -1696,7 +1696,7 @@ declare const useAutocompleteDescendants: () => {
|
|
|
1696
1696
|
node: HTMLElement;
|
|
1697
1697
|
index: number;
|
|
1698
1698
|
}) | undefined;
|
|
1699
|
-
|
|
1699
|
+
enabledLastValue: (filter?: ((value: {
|
|
1700
1700
|
disabled?: boolean | undefined;
|
|
1701
1701
|
id?: string | undefined;
|
|
1702
1702
|
filter?: ((value: any & {
|
|
@@ -2924,7 +2924,7 @@ declare const useAutocompleteDescendant: (options?: {
|
|
|
2924
2924
|
node: HTMLElement;
|
|
2925
2925
|
index: number;
|
|
2926
2926
|
})[]) => boolean) | undefined) => number;
|
|
2927
|
-
|
|
2927
|
+
enabledFirstValue: (filter?: ((value: {
|
|
2928
2928
|
disabled?: boolean | undefined;
|
|
2929
2929
|
id?: string | undefined;
|
|
2930
2930
|
filter?: ((value: {
|
|
@@ -3024,7 +3024,7 @@ declare const useAutocompleteDescendant: (options?: {
|
|
|
3024
3024
|
node: HTMLElement;
|
|
3025
3025
|
index: number;
|
|
3026
3026
|
}) | undefined;
|
|
3027
|
-
|
|
3027
|
+
enabledLastValue: (filter?: ((value: {
|
|
3028
3028
|
disabled?: boolean | undefined;
|
|
3029
3029
|
id?: string | undefined;
|
|
3030
3030
|
filter?: ((value: {
|
|
@@ -3869,7 +3869,7 @@ declare const useAutocomplete: <T extends string | string[] = string>({ defaultI
|
|
|
3869
3869
|
node: HTMLElement;
|
|
3870
3870
|
index: number;
|
|
3871
3871
|
})[]) => boolean) | undefined) => number;
|
|
3872
|
-
|
|
3872
|
+
enabledFirstValue: (filter?: ((value: {
|
|
3873
3873
|
disabled?: boolean | undefined;
|
|
3874
3874
|
id?: string | undefined;
|
|
3875
3875
|
filter?: ((value: any & {
|
|
@@ -3909,7 +3909,7 @@ declare const useAutocomplete: <T extends string | string[] = string>({ defaultI
|
|
|
3909
3909
|
node: HTMLElement;
|
|
3910
3910
|
index: number;
|
|
3911
3911
|
}) | undefined;
|
|
3912
|
-
|
|
3912
|
+
enabledLastValue: (filter?: ((value: {
|
|
3913
3913
|
disabled?: boolean | undefined;
|
|
3914
3914
|
id?: string | undefined;
|
|
3915
3915
|
filter?: ((value: any & {
|
|
@@ -4,4 +4,4 @@ import '@yamada-ui/core';
|
|
|
4
4
|
import '@yamada-ui/form-control';
|
|
5
5
|
import '@yamada-ui/popover';
|
|
6
6
|
import '@yamada-ui/utils';
|
|
7
|
-
export { d as AutocompleteDescendantsContextProvider, b as AutocompleteItem, g as AutocompleteProvider, t as UseAutocompleteCreateReturn, w as UseAutocompleteEmptyReturn, l as UseAutocompleteInputReturn, U as UseAutocompleteOptionGroupProps, o as UseAutocompleteOptionGroupReturn, p as UseAutocompleteOptionProps, r as UseAutocompleteOptionReturn, c as UseAutocompleteProps, j as UseAutocompleteReturn, i as useAutocomplete, h as useAutocompleteContext, s as useAutocompleteCreate, f as useAutocompleteDescendant, e as useAutocompleteDescendants, u as useAutocompleteDescendantsContext, v as useAutocompleteEmpty, k as useAutocompleteInput, m as useAutocompleteList, q as useAutocompleteOption, n as useAutocompleteOptionGroup } from './use-autocomplete-
|
|
7
|
+
export { d as AutocompleteDescendantsContextProvider, b as AutocompleteItem, g as AutocompleteProvider, t as UseAutocompleteCreateReturn, w as UseAutocompleteEmptyReturn, l as UseAutocompleteInputReturn, U as UseAutocompleteOptionGroupProps, o as UseAutocompleteOptionGroupReturn, p as UseAutocompleteOptionProps, r as UseAutocompleteOptionReturn, c as UseAutocompleteProps, j as UseAutocompleteReturn, i as useAutocomplete, h as useAutocompleteContext, s as useAutocompleteCreate, f as useAutocompleteDescendant, e as useAutocompleteDescendants, u as useAutocompleteDescendantsContext, v as useAutocompleteEmpty, k as useAutocompleteInput, m as useAutocompleteList, q as useAutocompleteOption, n as useAutocompleteOptionGroup } from './use-autocomplete-23014180.js';
|
|
@@ -4,4 +4,4 @@ import '@yamada-ui/core';
|
|
|
4
4
|
import '@yamada-ui/form-control';
|
|
5
5
|
import '@yamada-ui/popover';
|
|
6
6
|
import '@yamada-ui/utils';
|
|
7
|
-
export { d as AutocompleteDescendantsContextProvider, b as AutocompleteItem, g as AutocompleteProvider, t as UseAutocompleteCreateReturn, w as UseAutocompleteEmptyReturn, l as UseAutocompleteInputReturn, U as UseAutocompleteOptionGroupProps, o as UseAutocompleteOptionGroupReturn, p as UseAutocompleteOptionProps, r as UseAutocompleteOptionReturn, c as UseAutocompleteProps, j as UseAutocompleteReturn, i as useAutocomplete, h as useAutocompleteContext, s as useAutocompleteCreate, f as useAutocompleteDescendant, e as useAutocompleteDescendants, u as useAutocompleteDescendantsContext, v as useAutocompleteEmpty, k as useAutocompleteInput, m as useAutocompleteList, q as useAutocompleteOption, n as useAutocompleteOptionGroup } from './use-autocomplete-
|
|
7
|
+
export { d as AutocompleteDescendantsContextProvider, b as AutocompleteItem, g as AutocompleteProvider, t as UseAutocompleteCreateReturn, w as UseAutocompleteEmptyReturn, l as UseAutocompleteInputReturn, U as UseAutocompleteOptionGroupProps, o as UseAutocompleteOptionGroupReturn, p as UseAutocompleteOptionProps, r as UseAutocompleteOptionReturn, c as UseAutocompleteProps, j as UseAutocompleteReturn, i as useAutocomplete, h as useAutocompleteContext, s as useAutocompleteCreate, f as useAutocompleteDescendant, e as useAutocompleteDescendants, u as useAutocompleteDescendantsContext, v as useAutocompleteEmpty, k as useAutocompleteInput, m as useAutocompleteList, q as useAutocompleteOption, n as useAutocompleteOptionGroup } from './use-autocomplete-23014180.js';
|
package/dist/use-autocomplete.js
CHANGED
|
@@ -451,7 +451,7 @@ var useAutocomplete = ({
|
|
|
451
451
|
const id2 = setTimeout(() => {
|
|
452
452
|
if (isEmpty || isAllSelected)
|
|
453
453
|
return;
|
|
454
|
-
const first = descendants.
|
|
454
|
+
const first = descendants.enabledFirstValue(
|
|
455
455
|
({ node }) => "target" in node.dataset
|
|
456
456
|
);
|
|
457
457
|
if (!first)
|
|
@@ -481,7 +481,7 @@ var useAutocomplete = ({
|
|
|
481
481
|
const id2 = setTimeout(() => {
|
|
482
482
|
if (isEmpty || isAllSelected)
|
|
483
483
|
return;
|
|
484
|
-
const last = descendants.
|
|
484
|
+
const last = descendants.enabledLastValue(
|
|
485
485
|
({ node }) => "target" in node.dataset
|
|
486
486
|
);
|
|
487
487
|
if (!last)
|
|
@@ -490,8 +490,8 @@ var useAutocomplete = ({
|
|
|
490
490
|
setFocusedIndex(last.index);
|
|
491
491
|
} else {
|
|
492
492
|
if (selectedIndexes.includes(last.index)) {
|
|
493
|
-
const
|
|
494
|
-
setFocusedIndex(
|
|
493
|
+
const enabledLast = enabledValues.reverse()[0];
|
|
494
|
+
setFocusedIndex(enabledLast.index);
|
|
495
495
|
} else {
|
|
496
496
|
setFocusedIndex(last.index);
|
|
497
497
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/autocomplete",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Yamada UI autocomplete component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yamada",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"url": "https://github.com/hirotomoyamada/yamada-ui/issues"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@yamada-ui/core": "0.12.
|
|
39
|
+
"@yamada-ui/core": "0.12.8",
|
|
40
40
|
"@yamada-ui/utils": "0.3.3",
|
|
41
|
-
"@yamada-ui/icon": "0.3.
|
|
42
|
-
"@yamada-ui/select": "0.5.
|
|
43
|
-
"@yamada-ui/form-control": "0.3.
|
|
44
|
-
"@yamada-ui/popover": "0.3.
|
|
45
|
-
"@yamada-ui/use-descendant": "0.2.
|
|
41
|
+
"@yamada-ui/icon": "0.3.18",
|
|
42
|
+
"@yamada-ui/select": "0.5.10",
|
|
43
|
+
"@yamada-ui/form-control": "0.3.21",
|
|
44
|
+
"@yamada-ui/popover": "0.3.25",
|
|
45
|
+
"@yamada-ui/use-descendant": "0.2.7",
|
|
46
46
|
"@yamada-ui/use-clickable": "0.3.6",
|
|
47
47
|
"@yamada-ui/use-outside-click": "0.2.6",
|
|
48
48
|
"@yamada-ui/use-controllable-state": "0.4.0"
|