@yamada-ui/autocomplete 0.7.0 → 0.7.2
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.d.mts +1 -1
- package/dist/autocomplete-create.d.ts +1 -1
- package/dist/autocomplete-create.mjs +1 -1
- package/dist/autocomplete-empty.d.mts +1 -1
- package/dist/autocomplete-empty.d.ts +1 -1
- package/dist/autocomplete-empty.mjs +1 -1
- package/dist/autocomplete-icon.d.mts +1 -1
- package/dist/autocomplete-icon.d.ts +1 -1
- package/dist/autocomplete-icon.mjs +1 -1
- package/dist/autocomplete-list.d.mts +1 -1
- package/dist/autocomplete-list.d.ts +1 -1
- package/dist/autocomplete-list.mjs +1 -1
- package/dist/autocomplete-option-group.d.mts +2 -2
- package/dist/autocomplete-option-group.d.ts +2 -2
- package/dist/autocomplete-option-group.js +2 -2
- 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 +2 -2
- package/dist/autocomplete.d.ts +2 -2
- package/dist/autocomplete.js +6 -6
- package/dist/autocomplete.mjs +1 -1
- package/dist/{chunk-HGHCA4LW.mjs → chunk-CIFWQ6SD.mjs} +6 -6
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/index.mjs +1 -1
- package/dist/multi-autocomplete.d.mts +2 -2
- package/dist/multi-autocomplete.d.ts +2 -2
- package/dist/multi-autocomplete.js +6 -6
- package/dist/multi-autocomplete.mjs +1 -1
- package/dist/{use-autocomplete-3c0916c6.d.ts → use-autocomplete-292DXnK-.d.mts} +11 -11
- package/dist/use-autocomplete-292DXnK-.d.ts +4140 -0
- package/dist/use-autocomplete.d.mts +1 -1
- package/dist/use-autocomplete.d.ts +1 -1
- package/dist/use-autocomplete.js +6 -6
- package/dist/use-autocomplete.mjs +1 -1
- package/package.json +7 -7
|
@@ -15,4 +15,4 @@ type AutocompleteCreateOptions = {
|
|
|
15
15
|
type AutocompleteCreateProps = Omit<HTMLUIProps<"li">, "children"> & AutocompleteCreateOptions;
|
|
16
16
|
declare const AutocompleteCreate: _yamada_ui_core.Component<"li", AutocompleteCreateProps>;
|
|
17
17
|
|
|
18
|
-
export { AutocompleteCreate, AutocompleteCreateProps };
|
|
18
|
+
export { AutocompleteCreate, type AutocompleteCreateProps };
|
|
@@ -15,4 +15,4 @@ type AutocompleteCreateOptions = {
|
|
|
15
15
|
type AutocompleteCreateProps = Omit<HTMLUIProps<"li">, "children"> & AutocompleteCreateOptions;
|
|
16
16
|
declare const AutocompleteCreate: _yamada_ui_core.Component<"li", AutocompleteCreateProps>;
|
|
17
17
|
|
|
18
|
-
export { AutocompleteCreate, AutocompleteCreateProps };
|
|
18
|
+
export { AutocompleteCreate, type AutocompleteCreateProps };
|
|
@@ -15,4 +15,4 @@ type AutocompleteEmptyOptions = {
|
|
|
15
15
|
type AutocompleteEmptyProps = Omit<HTMLUIProps<"li">, "children"> & AutocompleteEmptyOptions;
|
|
16
16
|
declare const AutocompleteEmpty: _yamada_ui_core.Component<"li", AutocompleteEmptyProps>;
|
|
17
17
|
|
|
18
|
-
export { AutocompleteEmpty, AutocompleteEmptyProps };
|
|
18
|
+
export { AutocompleteEmpty, type AutocompleteEmptyProps };
|
|
@@ -15,4 +15,4 @@ type AutocompleteEmptyOptions = {
|
|
|
15
15
|
type AutocompleteEmptyProps = Omit<HTMLUIProps<"li">, "children"> & AutocompleteEmptyOptions;
|
|
16
16
|
declare const AutocompleteEmpty: _yamada_ui_core.Component<"li", AutocompleteEmptyProps>;
|
|
17
17
|
|
|
18
|
-
export { AutocompleteEmpty, AutocompleteEmptyProps };
|
|
18
|
+
export { AutocompleteEmpty, type AutocompleteEmptyProps };
|
|
@@ -11,4 +11,4 @@ declare const AutocompleteClearIcon: FC<AutocompleteClearIconProps>;
|
|
|
11
11
|
type AutocompleteItemIconProps = HTMLUIProps<"span">;
|
|
12
12
|
declare const AutocompleteItemIcon: _yamada_ui_core.Component<"span", AutocompleteItemIconProps>;
|
|
13
13
|
|
|
14
|
-
export { AutocompleteClearIcon, AutocompleteClearIconProps, AutocompleteIcon, AutocompleteIconProps, AutocompleteItemIcon, AutocompleteItemIconProps };
|
|
14
|
+
export { AutocompleteClearIcon, type AutocompleteClearIconProps, AutocompleteIcon, type AutocompleteIconProps, AutocompleteItemIcon, type AutocompleteItemIconProps };
|
|
@@ -11,4 +11,4 @@ declare const AutocompleteClearIcon: FC<AutocompleteClearIconProps>;
|
|
|
11
11
|
type AutocompleteItemIconProps = HTMLUIProps<"span">;
|
|
12
12
|
declare const AutocompleteItemIcon: _yamada_ui_core.Component<"span", AutocompleteItemIconProps>;
|
|
13
13
|
|
|
14
|
-
export { AutocompleteClearIcon, AutocompleteClearIconProps, AutocompleteIcon, AutocompleteIconProps, AutocompleteItemIcon, AutocompleteItemIconProps };
|
|
14
|
+
export { AutocompleteClearIcon, type AutocompleteClearIconProps, AutocompleteIcon, type AutocompleteIconProps, AutocompleteItemIcon, type AutocompleteItemIconProps };
|
|
@@ -4,4 +4,4 @@ import { HTMLUIProps } from '@yamada-ui/core';
|
|
|
4
4
|
type AutocompleteListProps = HTMLUIProps<"ul">;
|
|
5
5
|
declare const AutocompleteList: _yamada_ui_core.Component<"ul", AutocompleteListProps>;
|
|
6
6
|
|
|
7
|
-
export { AutocompleteList, AutocompleteListProps };
|
|
7
|
+
export { AutocompleteList, type AutocompleteListProps };
|
|
@@ -4,4 +4,4 @@ import { HTMLUIProps } from '@yamada-ui/core';
|
|
|
4
4
|
type AutocompleteListProps = HTMLUIProps<"ul">;
|
|
5
5
|
declare const AutocompleteList: _yamada_ui_core.Component<"ul", AutocompleteListProps>;
|
|
6
6
|
|
|
7
|
-
export { AutocompleteList, AutocompleteListProps };
|
|
7
|
+
export { AutocompleteList, type AutocompleteListProps };
|
|
@@ -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-292DXnK-.mjs';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@yamada-ui/form-control';
|
|
@@ -11,4 +11,4 @@ type AutocompleteOptionGroupOptions = UseAutocompleteOptionGroupProps;
|
|
|
11
11
|
type AutocompleteOptionGroupProps = HTMLUIProps<"ul"> & AutocompleteOptionGroupOptions;
|
|
12
12
|
declare const AutocompleteOptionGroup: _yamada_ui_core.Component<"ul", AutocompleteOptionGroupProps>;
|
|
13
13
|
|
|
14
|
-
export { AutocompleteOptionGroup, AutocompleteOptionGroupProps };
|
|
14
|
+
export { AutocompleteOptionGroup, type AutocompleteOptionGroupProps };
|
|
@@ -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-292DXnK-.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@yamada-ui/form-control';
|
|
@@ -11,4 +11,4 @@ type AutocompleteOptionGroupOptions = UseAutocompleteOptionGroupProps;
|
|
|
11
11
|
type AutocompleteOptionGroupProps = HTMLUIProps<"ul"> & AutocompleteOptionGroupOptions;
|
|
12
12
|
declare const AutocompleteOptionGroup: _yamada_ui_core.Component<"ul", AutocompleteOptionGroupProps>;
|
|
13
13
|
|
|
14
|
-
export { AutocompleteOptionGroup, AutocompleteOptionGroupProps };
|
|
14
|
+
export { AutocompleteOptionGroup, type AutocompleteOptionGroupProps };
|
|
@@ -133,7 +133,7 @@ var AutocompleteOptionGroup = (0, import_core2.forwardRef)(
|
|
|
133
133
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
134
134
|
import_core2.ui.span,
|
|
135
135
|
{
|
|
136
|
-
className:
|
|
136
|
+
className: "ui-autocomplete__item__group-label",
|
|
137
137
|
__css: styles.groupLabel,
|
|
138
138
|
noOfLines: 1,
|
|
139
139
|
children: label
|
|
@@ -143,7 +143,7 @@ var AutocompleteOptionGroup = (0, import_core2.forwardRef)(
|
|
|
143
143
|
import_core2.ui.ul,
|
|
144
144
|
{
|
|
145
145
|
...getGroupProps({}, ref),
|
|
146
|
-
className:
|
|
146
|
+
className: "ui-autocomplete__item__group",
|
|
147
147
|
__css: { h, minH, ...styles.group },
|
|
148
148
|
children
|
|
149
149
|
}
|
|
@@ -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-292DXnK-.mjs';
|
|
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-292DXnK-.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-292DXnK-.mjs';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import '@yamada-ui/form-control';
|
|
@@ -38,4 +38,4 @@ type AutocompleteOptions = {
|
|
|
38
38
|
type AutocompleteProps = ThemeProps<"Select"> & Omit<UseAutocompleteProps<string>, "maxSelectedValues" | "omitSelectedValues"> & AutocompleteOptions;
|
|
39
39
|
declare const Autocomplete: _yamada_ui_core.Component<"input", AutocompleteProps>;
|
|
40
40
|
|
|
41
|
-
export { Autocomplete, AutocompleteProps };
|
|
41
|
+
export { Autocomplete, type AutocompleteProps };
|
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-292DXnK-.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import '@yamada-ui/form-control';
|
|
@@ -38,4 +38,4 @@ type AutocompleteOptions = {
|
|
|
38
38
|
type AutocompleteProps = ThemeProps<"Select"> & Omit<UseAutocompleteProps<string>, "maxSelectedValues" | "omitSelectedValues"> & AutocompleteOptions;
|
|
39
39
|
declare const Autocomplete: _yamada_ui_core.Component<"input", AutocompleteProps>;
|
|
40
40
|
|
|
41
|
-
export { Autocomplete, AutocompleteProps };
|
|
41
|
+
export { Autocomplete, type AutocompleteProps };
|
package/dist/autocomplete.js
CHANGED
|
@@ -69,7 +69,7 @@ var AutocompleteOptionGroup = (0, import_core.forwardRef)(
|
|
|
69
69
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
70
70
|
import_core.ui.span,
|
|
71
71
|
{
|
|
72
|
-
className:
|
|
72
|
+
className: "ui-autocomplete__item__group-label",
|
|
73
73
|
__css: styles.groupLabel,
|
|
74
74
|
noOfLines: 1,
|
|
75
75
|
children: label
|
|
@@ -79,7 +79,7 @@ var AutocompleteOptionGroup = (0, import_core.forwardRef)(
|
|
|
79
79
|
import_core.ui.ul,
|
|
80
80
|
{
|
|
81
81
|
...getGroupProps({}, ref),
|
|
82
|
-
className:
|
|
82
|
+
className: "ui-autocomplete__item__group",
|
|
83
83
|
__css: { h, minH, ...styles.group },
|
|
84
84
|
children
|
|
85
85
|
}
|
|
@@ -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
|
@@ -285,7 +285,7 @@ var AutocompleteOptionGroup = forwardRef3(
|
|
|
285
285
|
/* @__PURE__ */ jsx3(
|
|
286
286
|
ui3.span,
|
|
287
287
|
{
|
|
288
|
-
className:
|
|
288
|
+
className: "ui-autocomplete__item__group-label",
|
|
289
289
|
__css: styles.groupLabel,
|
|
290
290
|
noOfLines: 1,
|
|
291
291
|
children: label
|
|
@@ -295,7 +295,7 @@ var AutocompleteOptionGroup = forwardRef3(
|
|
|
295
295
|
ui3.ul,
|
|
296
296
|
{
|
|
297
297
|
...getGroupProps({}, ref),
|
|
298
|
-
className:
|
|
298
|
+
className: "ui-autocomplete__item__group",
|
|
299
299
|
__css: { h, minH, ...styles.group },
|
|
300
300
|
children
|
|
301
301
|
}
|
|
@@ -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-292DXnK-.mjs';
|
|
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-292DXnK-.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
|
}
|
|
@@ -1469,7 +1469,7 @@ var AutocompleteOptionGroup = (0, import_core5.forwardRef)(
|
|
|
1469
1469
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1470
1470
|
import_core5.ui.span,
|
|
1471
1471
|
{
|
|
1472
|
-
className:
|
|
1472
|
+
className: "ui-autocomplete__item__group-label",
|
|
1473
1473
|
__css: styles.groupLabel,
|
|
1474
1474
|
noOfLines: 1,
|
|
1475
1475
|
children: label
|
|
@@ -1479,7 +1479,7 @@ var AutocompleteOptionGroup = (0, import_core5.forwardRef)(
|
|
|
1479
1479
|
import_core5.ui.ul,
|
|
1480
1480
|
{
|
|
1481
1481
|
...getGroupProps({}, ref),
|
|
1482
|
-
className:
|
|
1482
|
+
className: "ui-autocomplete__item__group",
|
|
1483
1483
|
__css: { h, minH, ...styles.group },
|
|
1484
1484
|
children
|
|
1485
1485
|
}
|
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-292DXnK-.mjs';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import '@yamada-ui/form-control';
|
|
9
9
|
import '@yamada-ui/popover';
|
|
@@ -69,4 +69,4 @@ type MultiAutocompleteOptions = {
|
|
|
69
69
|
type MultiAutocompleteProps = ThemeProps<"Select"> & UseAutocompleteProps<string[]> & MultiAutocompleteOptions;
|
|
70
70
|
declare const MultiAutocomplete: _yamada_ui_core.Component<"div", MultiAutocompleteProps>;
|
|
71
71
|
|
|
72
|
-
export { MultiAutocomplete, MultiAutocompleteProps };
|
|
72
|
+
export { MultiAutocomplete, type MultiAutocompleteProps };
|
|
@@ -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-292DXnK-.js';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import '@yamada-ui/form-control';
|
|
9
9
|
import '@yamada-ui/popover';
|
|
@@ -69,4 +69,4 @@ type MultiAutocompleteOptions = {
|
|
|
69
69
|
type MultiAutocompleteProps = ThemeProps<"Select"> & UseAutocompleteProps<string[]> & MultiAutocompleteOptions;
|
|
70
70
|
declare const MultiAutocomplete: _yamada_ui_core.Component<"div", MultiAutocompleteProps>;
|
|
71
71
|
|
|
72
|
-
export { MultiAutocomplete, MultiAutocompleteProps };
|
|
72
|
+
export { MultiAutocomplete, type MultiAutocompleteProps };
|
|
@@ -96,7 +96,7 @@ var AutocompleteOptionGroup = (0, import_core2.forwardRef)(
|
|
|
96
96
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
97
97
|
import_core2.ui.span,
|
|
98
98
|
{
|
|
99
|
-
className:
|
|
99
|
+
className: "ui-autocomplete__item__group-label",
|
|
100
100
|
__css: styles.groupLabel,
|
|
101
101
|
noOfLines: 1,
|
|
102
102
|
children: label
|
|
@@ -106,7 +106,7 @@ var AutocompleteOptionGroup = (0, import_core2.forwardRef)(
|
|
|
106
106
|
import_core2.ui.ul,
|
|
107
107
|
{
|
|
108
108
|
...getGroupProps({}, ref),
|
|
109
|
-
className:
|
|
109
|
+
className: "ui-autocomplete__item__group",
|
|
110
110
|
__css: { h, minH, ...styles.group },
|
|
111
111
|
children
|
|
112
112
|
}
|
|
@@ -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 & {
|
|
@@ -4137,4 +4137,4 @@ declare const useAutocompleteEmpty: () => {
|
|
|
4137
4137
|
};
|
|
4138
4138
|
type UseAutocompleteEmptyReturn = ReturnType<typeof useAutocompleteEmpty>;
|
|
4139
4139
|
|
|
4140
|
-
export { AutocompleteOption as A, UseAutocompleteOptionGroupProps as U, AutocompleteOptionProps as a, AutocompleteItem as b, UseAutocompleteProps as c, AutocompleteDescendantsContextProvider as d, useAutocompleteDescendants as e, useAutocompleteDescendant as f, AutocompleteProvider as g, useAutocompleteContext as h, useAutocomplete as i, UseAutocompleteReturn as j, useAutocompleteInput as k, UseAutocompleteInputReturn as l, useAutocompleteList as m, useAutocompleteOptionGroup as n, UseAutocompleteOptionGroupReturn as o, UseAutocompleteOptionProps as p, useAutocompleteOption as q, UseAutocompleteOptionReturn as r, useAutocompleteCreate as s, UseAutocompleteCreateReturn as t, useAutocompleteDescendantsContext as u, useAutocompleteEmpty as v, UseAutocompleteEmptyReturn as w };
|
|
4140
|
+
export { AutocompleteOption as A, type UseAutocompleteOptionGroupProps as U, type AutocompleteOptionProps as a, type AutocompleteItem as b, type UseAutocompleteProps as c, AutocompleteDescendantsContextProvider as d, useAutocompleteDescendants as e, useAutocompleteDescendant as f, AutocompleteProvider as g, useAutocompleteContext as h, useAutocomplete as i, type UseAutocompleteReturn as j, useAutocompleteInput as k, type UseAutocompleteInputReturn as l, useAutocompleteList as m, useAutocompleteOptionGroup as n, type UseAutocompleteOptionGroupReturn as o, type UseAutocompleteOptionProps as p, useAutocompleteOption as q, type UseAutocompleteOptionReturn as r, useAutocompleteCreate as s, type UseAutocompleteCreateReturn as t, useAutocompleteDescendantsContext as u, useAutocompleteEmpty as v, type UseAutocompleteEmptyReturn as w };
|