@yamada-ui/autocomplete 1.5.4-next-20241005220055 → 1.6.0-dev-20241011151311
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/autocomplete-context.d.mts +115 -115
- package/dist/autocomplete-context.d.ts +115 -115
- package/dist/autocomplete-context.js +2 -2
- package/dist/autocomplete-context.js.map +1 -1
- package/dist/autocomplete-context.mjs +1 -1
- package/dist/autocomplete-create.d.mts +4 -4
- package/dist/autocomplete-create.d.ts +4 -4
- package/dist/autocomplete-create.js +32 -32
- package/dist/autocomplete-create.js.map +1 -1
- package/dist/autocomplete-create.mjs +4 -4
- package/dist/autocomplete-empty.d.mts +4 -4
- package/dist/autocomplete-empty.d.ts +4 -4
- package/dist/autocomplete-empty.js +34 -34
- package/dist/autocomplete-empty.js.map +1 -1
- package/dist/autocomplete-empty.mjs +4 -4
- package/dist/autocomplete-icon.js +17 -17
- package/dist/autocomplete-icon.js.map +1 -1
- package/dist/autocomplete-icon.mjs +2 -2
- package/dist/autocomplete-list.d.mts +2 -2
- package/dist/autocomplete-list.d.ts +2 -2
- package/dist/autocomplete-list.js +18 -18
- package/dist/autocomplete-list.js.map +1 -1
- package/dist/autocomplete-list.mjs +3 -3
- package/dist/autocomplete-option-group.js +10 -10
- package/dist/autocomplete-option-group.js.map +1 -1
- package/dist/autocomplete-option-group.mjs +3 -3
- package/dist/autocomplete-option.d.mts +1 -1
- package/dist/autocomplete-option.d.ts +1 -1
- package/dist/autocomplete-option.js +56 -47
- package/dist/autocomplete-option.js.map +1 -1
- package/dist/autocomplete-option.mjs +4 -4
- package/dist/autocomplete.d.mts +31 -31
- package/dist/autocomplete.d.ts +31 -31
- package/dist/autocomplete.js +303 -292
- package/dist/autocomplete.js.map +1 -1
- package/dist/autocomplete.mjs +12 -12
- package/dist/{chunk-5GKGL6BL.mjs → chunk-2HJUFFCU.mjs} +16 -16
- package/dist/chunk-2HJUFFCU.mjs.map +1 -0
- package/dist/{chunk-6F3LT7J6.mjs → chunk-4SBNPEK7.mjs} +7 -7
- package/dist/{chunk-6F3LT7J6.mjs.map → chunk-4SBNPEK7.mjs.map} +1 -1
- package/dist/{chunk-JMX72TSD.mjs → chunk-67X7JKWL.mjs} +7 -7
- package/dist/{chunk-JMX72TSD.mjs.map → chunk-67X7JKWL.mjs.map} +1 -1
- package/dist/{chunk-5LPWFWE6.mjs → chunk-6OLHNK7O.mjs} +46 -34
- package/dist/chunk-6OLHNK7O.mjs.map +1 -0
- package/dist/{chunk-QPIWG4ZF.mjs → chunk-7LZUXESV.mjs} +63 -61
- package/dist/chunk-7LZUXESV.mjs.map +1 -0
- package/dist/{chunk-S2HFYJVI.mjs → chunk-AIBJWPRA.mjs} +13 -13
- package/dist/chunk-AIBJWPRA.mjs.map +1 -0
- package/dist/{chunk-Q2HZVVOI.mjs → chunk-K5HCHHCJ.mjs} +16 -16
- package/dist/chunk-K5HCHHCJ.mjs.map +1 -0
- package/dist/{chunk-HZECQUHV.mjs → chunk-Q33EMTO2.mjs} +40 -40
- package/dist/{chunk-HZECQUHV.mjs.map → chunk-Q33EMTO2.mjs.map} +1 -1
- package/dist/{chunk-R76HPAN4.mjs → chunk-TR4X4EEG.mjs} +7 -7
- package/dist/{chunk-R76HPAN4.mjs.map → chunk-TR4X4EEG.mjs.map} +1 -1
- package/dist/{chunk-7SWSKLSA.mjs → chunk-V6YCG642.mjs} +18 -18
- package/dist/chunk-V6YCG642.mjs.map +1 -0
- package/dist/{chunk-S53LMDD7.mjs → chunk-VTBUO5SK.mjs} +15 -15
- package/dist/chunk-VTBUO5SK.mjs.map +1 -0
- package/dist/{chunk-JPUKYLBW.mjs → chunk-WDQYM4FP.mjs} +5 -5
- package/dist/chunk-WDQYM4FP.mjs.map +1 -0
- package/dist/{chunk-OLOU5HFC.mjs → chunk-WERCEZNJ.mjs} +168 -166
- package/dist/chunk-WERCEZNJ.mjs.map +1 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +356 -343
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -13
- package/dist/multi-autocomplete.d.mts +51 -51
- package/dist/multi-autocomplete.d.ts +51 -51
- package/dist/multi-autocomplete.js +326 -313
- package/dist/multi-autocomplete.js.map +1 -1
- package/dist/multi-autocomplete.mjs +12 -12
- package/dist/use-autocomplete-list.d.mts +1 -1
- package/dist/use-autocomplete-list.d.ts +1 -1
- package/dist/use-autocomplete-list.js +7 -7
- package/dist/use-autocomplete-list.js.map +1 -1
- package/dist/use-autocomplete-list.mjs +2 -2
- package/dist/use-autocomplete-option-group.js +7 -7
- package/dist/use-autocomplete-option-group.js.map +1 -1
- package/dist/use-autocomplete-option-group.mjs +2 -2
- package/dist/use-autocomplete-option.d.mts +12 -12
- package/dist/use-autocomplete-option.d.ts +12 -12
- package/dist/use-autocomplete-option.js +43 -34
- package/dist/use-autocomplete-option.js.map +1 -1
- package/dist/use-autocomplete-option.mjs +2 -2
- package/dist/use-autocomplete.d.mts +86 -86
- package/dist/use-autocomplete.d.ts +86 -86
- package/dist/use-autocomplete.js +225 -214
- package/dist/use-autocomplete.js.map +1 -1
- package/dist/use-autocomplete.mjs +7 -7
- package/package.json +13 -13
- package/dist/chunk-5GKGL6BL.mjs.map +0 -1
- package/dist/chunk-5LPWFWE6.mjs.map +0 -1
- package/dist/chunk-7SWSKLSA.mjs.map +0 -1
- package/dist/chunk-JPUKYLBW.mjs.map +0 -1
- package/dist/chunk-OLOU5HFC.mjs.map +0 -1
- package/dist/chunk-Q2HZVVOI.mjs.map +0 -1
- package/dist/chunk-QPIWG4ZF.mjs.map +0 -1
- package/dist/chunk-S2HFYJVI.mjs.map +0 -1
- package/dist/chunk-S53LMDD7.mjs.map +0 -1
package/dist/index.mjs
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
MultiAutocomplete
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-7LZUXESV.mjs";
|
5
5
|
import {
|
6
6
|
Autocomplete
|
7
|
-
} from "./chunk-
|
8
|
-
import "./chunk-
|
7
|
+
} from "./chunk-Q33EMTO2.mjs";
|
8
|
+
import "./chunk-WERCEZNJ.mjs";
|
9
9
|
import {
|
10
10
|
AutocompleteCreate
|
11
|
-
} from "./chunk-
|
11
|
+
} from "./chunk-K5HCHHCJ.mjs";
|
12
12
|
import {
|
13
13
|
AutocompleteEmpty
|
14
|
-
} from "./chunk-
|
15
|
-
import "./chunk-
|
16
|
-
import "./chunk-
|
14
|
+
} from "./chunk-2HJUFFCU.mjs";
|
15
|
+
import "./chunk-VTBUO5SK.mjs";
|
16
|
+
import "./chunk-TR4X4EEG.mjs";
|
17
17
|
import {
|
18
18
|
AutocompleteOptionGroup
|
19
|
-
} from "./chunk-
|
20
|
-
import "./chunk-
|
19
|
+
} from "./chunk-4SBNPEK7.mjs";
|
20
|
+
import "./chunk-67X7JKWL.mjs";
|
21
21
|
import {
|
22
22
|
AutocompleteOption
|
23
|
-
} from "./chunk-
|
24
|
-
import "./chunk-
|
25
|
-
import "./chunk-
|
26
|
-
import "./chunk-
|
23
|
+
} from "./chunk-AIBJWPRA.mjs";
|
24
|
+
import "./chunk-6OLHNK7O.mjs";
|
25
|
+
import "./chunk-V6YCG642.mjs";
|
26
|
+
import "./chunk-WDQYM4FP.mjs";
|
27
27
|
export {
|
28
28
|
Autocomplete,
|
29
29
|
AutocompleteCreate,
|
@@ -8,8 +8,8 @@ import { AutocompleteEmptyProps } from './autocomplete-empty.mjs';
|
|
8
8
|
import { AutocompleteIconProps } from './autocomplete-icon.mjs';
|
9
9
|
import { AutocompleteListProps } from './autocomplete-list.mjs';
|
10
10
|
import { UseAutocompleteProps } from './use-autocomplete.mjs';
|
11
|
-
import 'react/jsx-runtime';
|
12
11
|
import '@yamada-ui/use-descendant';
|
12
|
+
import 'react/jsx-runtime';
|
13
13
|
import '@yamada-ui/form-control';
|
14
14
|
import '@yamada-ui/popover';
|
15
15
|
import '@yamada-ui/utils';
|
@@ -20,26 +20,42 @@ import './use-autocomplete-option-group.mjs';
|
|
20
20
|
|
21
21
|
interface MultiAutocompleteOptions {
|
22
22
|
/**
|
23
|
-
*
|
23
|
+
* If `true`, the list element will be closed when value is selected.
|
24
24
|
*
|
25
|
-
* @default
|
25
|
+
* @default false
|
26
26
|
*/
|
27
|
-
|
27
|
+
closeOnSelect?: boolean;
|
28
28
|
/**
|
29
29
|
* The custom display value to use.
|
30
30
|
*/
|
31
31
|
component?: FC<{
|
32
|
-
value: string | number;
|
33
|
-
label: string;
|
34
32
|
index: number;
|
33
|
+
label: string;
|
34
|
+
value: number | string;
|
35
35
|
onRemove: MouseEventHandler<HTMLElement>;
|
36
36
|
}>;
|
37
37
|
/**
|
38
|
-
*
|
39
|
-
*
|
40
|
-
* @default false
|
38
|
+
* The border color when the input is invalid.
|
41
39
|
*/
|
42
|
-
|
40
|
+
errorBorderColor?: string;
|
41
|
+
/**
|
42
|
+
* The border color when the input is focused.
|
43
|
+
*/
|
44
|
+
focusBorderColor?: string;
|
45
|
+
/**
|
46
|
+
* The footer of the autocomplete content element.
|
47
|
+
*/
|
48
|
+
footer?: FC<{
|
49
|
+
value: string[] | undefined;
|
50
|
+
onClose: () => void;
|
51
|
+
}> | ReactNode;
|
52
|
+
/**
|
53
|
+
* The header of the autocomplete content element.
|
54
|
+
*/
|
55
|
+
header?: FC<{
|
56
|
+
value: string[] | undefined;
|
57
|
+
onClose: () => void;
|
58
|
+
}> | ReactNode;
|
43
59
|
/**
|
44
60
|
* If `true`, display the select clear icon.
|
45
61
|
*
|
@@ -47,13 +63,21 @@ interface MultiAutocompleteOptions {
|
|
47
63
|
*/
|
48
64
|
isClearable?: boolean;
|
49
65
|
/**
|
50
|
-
*
|
66
|
+
* If `true`, keep the placeholder.
|
67
|
+
*
|
68
|
+
* @default false
|
51
69
|
*/
|
52
|
-
|
70
|
+
keepPlaceholder?: boolean;
|
53
71
|
/**
|
54
|
-
* The
|
72
|
+
* The visual separator between each value.
|
73
|
+
*
|
74
|
+
* @default ','
|
55
75
|
*/
|
56
|
-
|
76
|
+
separator?: string;
|
77
|
+
/**
|
78
|
+
* Props for multi autocomplete clear icon element.
|
79
|
+
*/
|
80
|
+
clearIconProps?: AutocompleteIconProps;
|
57
81
|
/**
|
58
82
|
* Props for multi autocomplete container element.
|
59
83
|
*/
|
@@ -63,25 +87,29 @@ interface MultiAutocompleteOptions {
|
|
63
87
|
*/
|
64
88
|
contentProps?: Omit<MotionProps, "children">;
|
65
89
|
/**
|
66
|
-
* Props for
|
90
|
+
* Props for autocomplete create element.
|
67
91
|
*/
|
68
|
-
|
92
|
+
createProps?: Omit<AutocompleteCreateProps, "children">;
|
69
93
|
/**
|
70
|
-
* Props for
|
94
|
+
* Props for autocomplete empty element.
|
71
95
|
*/
|
72
|
-
|
96
|
+
emptyProps?: Omit<AutocompleteEmptyProps, "children">;
|
73
97
|
/**
|
74
|
-
* Props for multi autocomplete
|
98
|
+
* Props for multi autocomplete field element.
|
75
99
|
*/
|
76
|
-
|
100
|
+
fieldProps?: Omit<MultiAutocompleteFieldProps, "children" | "component" | "inputProps" | "keepPlaceholder" | "separator">;
|
77
101
|
/**
|
78
102
|
* Props for multi autocomplete icon element.
|
79
103
|
*/
|
80
104
|
iconProps?: AutocompleteIconProps;
|
81
105
|
/**
|
82
|
-
* Props for multi autocomplete
|
106
|
+
* Props for multi autocomplete input element.
|
83
107
|
*/
|
84
|
-
|
108
|
+
inputProps?: HTMLUIProps<"input">;
|
109
|
+
/**
|
110
|
+
* Props for multi autocomplete list element.
|
111
|
+
*/
|
112
|
+
listProps?: Omit<AutocompleteListProps, "children">;
|
85
113
|
/**
|
86
114
|
* Props to be forwarded to the portal component.
|
87
115
|
*
|
@@ -89,34 +117,6 @@ interface MultiAutocompleteOptions {
|
|
89
117
|
*
|
90
118
|
*/
|
91
119
|
portalProps?: Omit<PortalProps, "children">;
|
92
|
-
/**
|
93
|
-
* If `true`, the list element will be closed when value is selected.
|
94
|
-
*
|
95
|
-
* @default false
|
96
|
-
*/
|
97
|
-
closeOnSelect?: boolean;
|
98
|
-
/**
|
99
|
-
* Props for autocomplete create element.
|
100
|
-
*/
|
101
|
-
createProps?: Omit<AutocompleteCreateProps, "children">;
|
102
|
-
/**
|
103
|
-
* Props for autocomplete empty element.
|
104
|
-
*/
|
105
|
-
emptyProps?: Omit<AutocompleteEmptyProps, "children">;
|
106
|
-
/**
|
107
|
-
* The header of the autocomplete content element.
|
108
|
-
*/
|
109
|
-
header?: ReactNode | FC<{
|
110
|
-
value: string[] | undefined;
|
111
|
-
onClose: () => void;
|
112
|
-
}>;
|
113
|
-
/**
|
114
|
-
* The footer of the autocomplete content element.
|
115
|
-
*/
|
116
|
-
footer?: ReactNode | FC<{
|
117
|
-
value: string[] | undefined;
|
118
|
-
onClose: () => void;
|
119
|
-
}>;
|
120
120
|
}
|
121
121
|
interface MultiAutocompleteProps extends ThemeProps<"MultiAutocomplete">, Omit<UseAutocompleteProps<string[]>, "closeOnSelect">, MultiAutocompleteOptions {
|
122
122
|
}
|
@@ -126,7 +126,7 @@ interface MultiAutocompleteProps extends ThemeProps<"MultiAutocomplete">, Omit<U
|
|
126
126
|
* @see Docs https://yamada-ui.com/components/forms/multi-autocomplete
|
127
127
|
*/
|
128
128
|
declare const MultiAutocomplete: _yamada_ui_core.Component<"input", MultiAutocompleteProps>;
|
129
|
-
interface MultiAutocompleteFieldProps extends HTMLUIProps, Pick<MultiAutocompleteProps, "component" | "
|
129
|
+
interface MultiAutocompleteFieldProps extends HTMLUIProps, Pick<MultiAutocompleteProps, "component" | "inputProps" | "keepPlaceholder" | "separator"> {
|
130
130
|
}
|
131
131
|
|
132
132
|
export { MultiAutocomplete, type MultiAutocompleteProps };
|
@@ -8,8 +8,8 @@ import { AutocompleteEmptyProps } from './autocomplete-empty.js';
|
|
8
8
|
import { AutocompleteIconProps } from './autocomplete-icon.js';
|
9
9
|
import { AutocompleteListProps } from './autocomplete-list.js';
|
10
10
|
import { UseAutocompleteProps } from './use-autocomplete.js';
|
11
|
-
import 'react/jsx-runtime';
|
12
11
|
import '@yamada-ui/use-descendant';
|
12
|
+
import 'react/jsx-runtime';
|
13
13
|
import '@yamada-ui/form-control';
|
14
14
|
import '@yamada-ui/popover';
|
15
15
|
import '@yamada-ui/utils';
|
@@ -20,26 +20,42 @@ import './use-autocomplete-option-group.js';
|
|
20
20
|
|
21
21
|
interface MultiAutocompleteOptions {
|
22
22
|
/**
|
23
|
-
*
|
23
|
+
* If `true`, the list element will be closed when value is selected.
|
24
24
|
*
|
25
|
-
* @default
|
25
|
+
* @default false
|
26
26
|
*/
|
27
|
-
|
27
|
+
closeOnSelect?: boolean;
|
28
28
|
/**
|
29
29
|
* The custom display value to use.
|
30
30
|
*/
|
31
31
|
component?: FC<{
|
32
|
-
value: string | number;
|
33
|
-
label: string;
|
34
32
|
index: number;
|
33
|
+
label: string;
|
34
|
+
value: number | string;
|
35
35
|
onRemove: MouseEventHandler<HTMLElement>;
|
36
36
|
}>;
|
37
37
|
/**
|
38
|
-
*
|
39
|
-
*
|
40
|
-
* @default false
|
38
|
+
* The border color when the input is invalid.
|
41
39
|
*/
|
42
|
-
|
40
|
+
errorBorderColor?: string;
|
41
|
+
/**
|
42
|
+
* The border color when the input is focused.
|
43
|
+
*/
|
44
|
+
focusBorderColor?: string;
|
45
|
+
/**
|
46
|
+
* The footer of the autocomplete content element.
|
47
|
+
*/
|
48
|
+
footer?: FC<{
|
49
|
+
value: string[] | undefined;
|
50
|
+
onClose: () => void;
|
51
|
+
}> | ReactNode;
|
52
|
+
/**
|
53
|
+
* The header of the autocomplete content element.
|
54
|
+
*/
|
55
|
+
header?: FC<{
|
56
|
+
value: string[] | undefined;
|
57
|
+
onClose: () => void;
|
58
|
+
}> | ReactNode;
|
43
59
|
/**
|
44
60
|
* If `true`, display the select clear icon.
|
45
61
|
*
|
@@ -47,13 +63,21 @@ interface MultiAutocompleteOptions {
|
|
47
63
|
*/
|
48
64
|
isClearable?: boolean;
|
49
65
|
/**
|
50
|
-
*
|
66
|
+
* If `true`, keep the placeholder.
|
67
|
+
*
|
68
|
+
* @default false
|
51
69
|
*/
|
52
|
-
|
70
|
+
keepPlaceholder?: boolean;
|
53
71
|
/**
|
54
|
-
* The
|
72
|
+
* The visual separator between each value.
|
73
|
+
*
|
74
|
+
* @default ','
|
55
75
|
*/
|
56
|
-
|
76
|
+
separator?: string;
|
77
|
+
/**
|
78
|
+
* Props for multi autocomplete clear icon element.
|
79
|
+
*/
|
80
|
+
clearIconProps?: AutocompleteIconProps;
|
57
81
|
/**
|
58
82
|
* Props for multi autocomplete container element.
|
59
83
|
*/
|
@@ -63,25 +87,29 @@ interface MultiAutocompleteOptions {
|
|
63
87
|
*/
|
64
88
|
contentProps?: Omit<MotionProps, "children">;
|
65
89
|
/**
|
66
|
-
* Props for
|
90
|
+
* Props for autocomplete create element.
|
67
91
|
*/
|
68
|
-
|
92
|
+
createProps?: Omit<AutocompleteCreateProps, "children">;
|
69
93
|
/**
|
70
|
-
* Props for
|
94
|
+
* Props for autocomplete empty element.
|
71
95
|
*/
|
72
|
-
|
96
|
+
emptyProps?: Omit<AutocompleteEmptyProps, "children">;
|
73
97
|
/**
|
74
|
-
* Props for multi autocomplete
|
98
|
+
* Props for multi autocomplete field element.
|
75
99
|
*/
|
76
|
-
|
100
|
+
fieldProps?: Omit<MultiAutocompleteFieldProps, "children" | "component" | "inputProps" | "keepPlaceholder" | "separator">;
|
77
101
|
/**
|
78
102
|
* Props for multi autocomplete icon element.
|
79
103
|
*/
|
80
104
|
iconProps?: AutocompleteIconProps;
|
81
105
|
/**
|
82
|
-
* Props for multi autocomplete
|
106
|
+
* Props for multi autocomplete input element.
|
83
107
|
*/
|
84
|
-
|
108
|
+
inputProps?: HTMLUIProps<"input">;
|
109
|
+
/**
|
110
|
+
* Props for multi autocomplete list element.
|
111
|
+
*/
|
112
|
+
listProps?: Omit<AutocompleteListProps, "children">;
|
85
113
|
/**
|
86
114
|
* Props to be forwarded to the portal component.
|
87
115
|
*
|
@@ -89,34 +117,6 @@ interface MultiAutocompleteOptions {
|
|
89
117
|
*
|
90
118
|
*/
|
91
119
|
portalProps?: Omit<PortalProps, "children">;
|
92
|
-
/**
|
93
|
-
* If `true`, the list element will be closed when value is selected.
|
94
|
-
*
|
95
|
-
* @default false
|
96
|
-
*/
|
97
|
-
closeOnSelect?: boolean;
|
98
|
-
/**
|
99
|
-
* Props for autocomplete create element.
|
100
|
-
*/
|
101
|
-
createProps?: Omit<AutocompleteCreateProps, "children">;
|
102
|
-
/**
|
103
|
-
* Props for autocomplete empty element.
|
104
|
-
*/
|
105
|
-
emptyProps?: Omit<AutocompleteEmptyProps, "children">;
|
106
|
-
/**
|
107
|
-
* The header of the autocomplete content element.
|
108
|
-
*/
|
109
|
-
header?: ReactNode | FC<{
|
110
|
-
value: string[] | undefined;
|
111
|
-
onClose: () => void;
|
112
|
-
}>;
|
113
|
-
/**
|
114
|
-
* The footer of the autocomplete content element.
|
115
|
-
*/
|
116
|
-
footer?: ReactNode | FC<{
|
117
|
-
value: string[] | undefined;
|
118
|
-
onClose: () => void;
|
119
|
-
}>;
|
120
120
|
}
|
121
121
|
interface MultiAutocompleteProps extends ThemeProps<"MultiAutocomplete">, Omit<UseAutocompleteProps<string[]>, "closeOnSelect">, MultiAutocompleteOptions {
|
122
122
|
}
|
@@ -126,7 +126,7 @@ interface MultiAutocompleteProps extends ThemeProps<"MultiAutocomplete">, Omit<U
|
|
126
126
|
* @see Docs https://yamada-ui.com/components/forms/multi-autocomplete
|
127
127
|
*/
|
128
128
|
declare const MultiAutocomplete: _yamada_ui_core.Component<"input", MultiAutocompleteProps>;
|
129
|
-
interface MultiAutocompleteFieldProps extends HTMLUIProps, Pick<MultiAutocompleteProps, "component" | "
|
129
|
+
interface MultiAutocompleteFieldProps extends HTMLUIProps, Pick<MultiAutocompleteProps, "component" | "inputProps" | "keepPlaceholder" | "separator"> {
|
130
130
|
}
|
131
131
|
|
132
132
|
export { MultiAutocomplete, type MultiAutocompleteProps };
|