@yamada-ui/autocomplete 0.1.8 → 0.1.9
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.ts +1 -1
- package/dist/autocomplete-option-group.mjs +1 -1
- package/dist/autocomplete-option.d.ts +1 -1
- package/dist/autocomplete-option.mjs +1 -1
- package/dist/autocomplete.d.ts +1 -1
- package/dist/autocomplete.js +6 -9
- package/dist/autocomplete.mjs +1 -1
- package/dist/{chunk-MG2KF34Q.mjs → chunk-UJYX53L6.mjs} +7 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -11
- package/dist/index.mjs +1 -1
- package/dist/multi-autocomplete.d.ts +1 -1
- package/dist/multi-autocomplete.js +6 -9
- package/dist/multi-autocomplete.mjs +1 -1
- package/dist/{use-autocomplete-42515ffb.d.ts → use-autocomplete-2e4e8207.d.ts} +1 -1
- package/dist/use-autocomplete.d.ts +1 -1
- package/dist/use-autocomplete.js +5 -7
- 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-2e4e8207.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-2e4e8207.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import '@yamada-ui/form-control';
|
|
6
6
|
import '@yamada-ui/popover';
|
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 { b as UseAutocompleteProps } from './use-autocomplete-
|
|
5
|
+
import { b as UseAutocompleteProps } from './use-autocomplete-2e4e8207.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import '@yamada-ui/form-control';
|
package/dist/autocomplete.js
CHANGED
|
@@ -395,7 +395,7 @@ var useAutocomplete = ({
|
|
|
395
395
|
const { id } = rest;
|
|
396
396
|
const formControlProps = (0, import_utils6.pickObject)(rest, import_form_control.formControlProperties);
|
|
397
397
|
const [containerProps, inputProps] = (0, import_utils6.splitObject)(
|
|
398
|
-
(0, import_utils6.omitObject)(rest, ["id", "value", "onChange", "month", "onChangeMonth"]),
|
|
398
|
+
(0, import_utils6.omitObject)(rest, ["id", "value", "defaultValue", "onChange", "month", "onChangeMonth"]),
|
|
399
399
|
import_core6.layoutStylesProperties
|
|
400
400
|
);
|
|
401
401
|
const descendants = useAutocompleteDescendants();
|
|
@@ -742,10 +742,8 @@ var useAutocomplete = ({
|
|
|
742
742
|
setDisplayValue(void 0);
|
|
743
743
|
setInputValue("");
|
|
744
744
|
rebirthOptions();
|
|
745
|
-
if (inputRef.current)
|
|
746
|
-
inputRef.current.focus();
|
|
747
745
|
},
|
|
748
|
-
[setDisplayValue, setInputValue, setValue, rebirthOptions
|
|
746
|
+
[setDisplayValue, setInputValue, setValue, rebirthOptions]
|
|
749
747
|
);
|
|
750
748
|
const onClick = (0, import_react.useCallback)(() => {
|
|
751
749
|
if (isOpen) {
|
|
@@ -877,10 +875,9 @@ var useAutocomplete = ({
|
|
|
877
875
|
...props,
|
|
878
876
|
...formControlProps,
|
|
879
877
|
onClick: (0, import_utils6.handlerAll)(props.onClick, rest.onClick, onClick),
|
|
880
|
-
onFocus: (0, import_utils6.handlerAll)(props.onFocus, rest.onFocus, onFocus),
|
|
881
878
|
onBlur: (0, import_utils6.handlerAll)(props.onBlur, rest.onBlur, onBlur)
|
|
882
879
|
}),
|
|
883
|
-
[containerProps, formControlProps, onBlur, onClick,
|
|
880
|
+
[containerProps, formControlProps, onBlur, onClick, rest]
|
|
884
881
|
);
|
|
885
882
|
const getFieldProps = (0, import_react.useCallback)(
|
|
886
883
|
(props = {}, ref = null) => ({
|
|
@@ -891,9 +888,10 @@ var useAutocomplete = ({
|
|
|
891
888
|
placeholder,
|
|
892
889
|
"data-active": (0, import_utils6.dataAttr)(isOpen),
|
|
893
890
|
"aria-expanded": (0, import_utils6.dataAttr)(isOpen),
|
|
891
|
+
onFocus: (0, import_utils6.handlerAll)(props.onFocus, rest.onFocus, onFocus),
|
|
894
892
|
onKeyDown: (0, import_utils6.handlerAll)(props.onKeyDown, rest.onKeyDown, onKeyDown)
|
|
895
893
|
}),
|
|
896
|
-
[formControlProps, placeholder, isOpen, rest, onKeyDown]
|
|
894
|
+
[formControlProps, placeholder, isOpen, rest, onFocus, onKeyDown]
|
|
897
895
|
);
|
|
898
896
|
return {
|
|
899
897
|
id,
|
|
@@ -1430,8 +1428,7 @@ var AutocompleteField = (0, import_core8.forwardRef)(
|
|
|
1430
1428
|
display: "inline-block",
|
|
1431
1429
|
w: "full",
|
|
1432
1430
|
placeholder,
|
|
1433
|
-
...getInputProps(inputProps, ref)
|
|
1434
|
-
value: inputValue || displayValue || ""
|
|
1431
|
+
...getInputProps({ ...inputProps, value: inputValue || displayValue || "" }, ref)
|
|
1435
1432
|
}
|
|
1436
1433
|
) }) });
|
|
1437
1434
|
}
|
package/dist/autocomplete.mjs
CHANGED
|
@@ -222,8 +222,7 @@ var AutocompleteField = forwardRef2(
|
|
|
222
222
|
display: "inline-block",
|
|
223
223
|
w: "full",
|
|
224
224
|
placeholder,
|
|
225
|
-
...getInputProps(inputProps, ref)
|
|
226
|
-
value: inputValue || displayValue || ""
|
|
225
|
+
...getInputProps({ ...inputProps, value: inputValue || displayValue || "" }, ref)
|
|
227
226
|
}
|
|
228
227
|
) }) });
|
|
229
228
|
}
|
|
@@ -584,8 +583,7 @@ var MultiAutocompleteField = forwardRef7(
|
|
|
584
583
|
marginBlockStart: "0.125rem",
|
|
585
584
|
marginBlockEnd: "0.125rem",
|
|
586
585
|
placeholder: !displayValue || keepPlaceholder && isOpen ? placeholder : void 0,
|
|
587
|
-
...getInputProps(inputProps, ref)
|
|
588
|
-
value: inputValue
|
|
586
|
+
...getInputProps({ ...inputProps, value: inputValue != null ? inputValue : "" }, ref)
|
|
589
587
|
}
|
|
590
588
|
)
|
|
591
589
|
]
|
|
@@ -746,7 +744,7 @@ var useAutocomplete = ({
|
|
|
746
744
|
const { id } = rest;
|
|
747
745
|
const formControlProps = pickObject(rest, formControlProperties);
|
|
748
746
|
const [containerProps, inputProps] = splitObject(
|
|
749
|
-
omitObject(rest, ["id", "value", "onChange", "month", "onChangeMonth"]),
|
|
747
|
+
omitObject(rest, ["id", "value", "defaultValue", "onChange", "month", "onChangeMonth"]),
|
|
750
748
|
layoutStylesProperties
|
|
751
749
|
);
|
|
752
750
|
const descendants = useAutocompleteDescendants();
|
|
@@ -1093,10 +1091,8 @@ var useAutocomplete = ({
|
|
|
1093
1091
|
setDisplayValue(void 0);
|
|
1094
1092
|
setInputValue("");
|
|
1095
1093
|
rebirthOptions();
|
|
1096
|
-
if (inputRef.current)
|
|
1097
|
-
inputRef.current.focus();
|
|
1098
1094
|
},
|
|
1099
|
-
[setDisplayValue, setInputValue, setValue, rebirthOptions
|
|
1095
|
+
[setDisplayValue, setInputValue, setValue, rebirthOptions]
|
|
1100
1096
|
);
|
|
1101
1097
|
const onClick = useCallback(() => {
|
|
1102
1098
|
if (isOpen) {
|
|
@@ -1228,10 +1224,9 @@ var useAutocomplete = ({
|
|
|
1228
1224
|
...props,
|
|
1229
1225
|
...formControlProps,
|
|
1230
1226
|
onClick: handlerAll2(props.onClick, rest.onClick, onClick),
|
|
1231
|
-
onFocus: handlerAll2(props.onFocus, rest.onFocus, onFocus),
|
|
1232
1227
|
onBlur: handlerAll2(props.onBlur, rest.onBlur, onBlur)
|
|
1233
1228
|
}),
|
|
1234
|
-
[containerProps, formControlProps, onBlur, onClick,
|
|
1229
|
+
[containerProps, formControlProps, onBlur, onClick, rest]
|
|
1235
1230
|
);
|
|
1236
1231
|
const getFieldProps = useCallback(
|
|
1237
1232
|
(props = {}, ref = null) => ({
|
|
@@ -1242,9 +1237,10 @@ var useAutocomplete = ({
|
|
|
1242
1237
|
placeholder,
|
|
1243
1238
|
"data-active": dataAttr(isOpen),
|
|
1244
1239
|
"aria-expanded": dataAttr(isOpen),
|
|
1240
|
+
onFocus: handlerAll2(props.onFocus, rest.onFocus, onFocus),
|
|
1245
1241
|
onKeyDown: handlerAll2(props.onKeyDown, rest.onKeyDown, onKeyDown)
|
|
1246
1242
|
}),
|
|
1247
|
-
[formControlProps, placeholder, isOpen, rest, onKeyDown]
|
|
1243
|
+
[formControlProps, placeholder, isOpen, rest, onFocus, onKeyDown]
|
|
1248
1244
|
);
|
|
1249
1245
|
return {
|
|
1250
1246
|
id,
|
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 { a as AutocompleteOption, A as AutocompleteOptionProps } from './use-autocomplete-
|
|
3
|
+
export { a as AutocompleteOption, A as AutocompleteOptionProps } from './use-autocomplete-2e4e8207.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
|
@@ -200,7 +200,7 @@ var useAutocomplete = ({
|
|
|
200
200
|
const { id } = rest;
|
|
201
201
|
const formControlProps = (0, import_utils.pickObject)(rest, import_form_control.formControlProperties);
|
|
202
202
|
const [containerProps, inputProps] = (0, import_utils.splitObject)(
|
|
203
|
-
(0, import_utils.omitObject)(rest, ["id", "value", "onChange", "month", "onChangeMonth"]),
|
|
203
|
+
(0, import_utils.omitObject)(rest, ["id", "value", "defaultValue", "onChange", "month", "onChangeMonth"]),
|
|
204
204
|
import_core.layoutStylesProperties
|
|
205
205
|
);
|
|
206
206
|
const descendants = useAutocompleteDescendants();
|
|
@@ -547,10 +547,8 @@ var useAutocomplete = ({
|
|
|
547
547
|
setDisplayValue(void 0);
|
|
548
548
|
setInputValue("");
|
|
549
549
|
rebirthOptions();
|
|
550
|
-
if (inputRef.current)
|
|
551
|
-
inputRef.current.focus();
|
|
552
550
|
},
|
|
553
|
-
[setDisplayValue, setInputValue, setValue, rebirthOptions
|
|
551
|
+
[setDisplayValue, setInputValue, setValue, rebirthOptions]
|
|
554
552
|
);
|
|
555
553
|
const onClick = (0, import_react.useCallback)(() => {
|
|
556
554
|
if (isOpen) {
|
|
@@ -682,10 +680,9 @@ var useAutocomplete = ({
|
|
|
682
680
|
...props,
|
|
683
681
|
...formControlProps,
|
|
684
682
|
onClick: (0, import_utils.handlerAll)(props.onClick, rest.onClick, onClick),
|
|
685
|
-
onFocus: (0, import_utils.handlerAll)(props.onFocus, rest.onFocus, onFocus),
|
|
686
683
|
onBlur: (0, import_utils.handlerAll)(props.onBlur, rest.onBlur, onBlur)
|
|
687
684
|
}),
|
|
688
|
-
[containerProps, formControlProps, onBlur, onClick,
|
|
685
|
+
[containerProps, formControlProps, onBlur, onClick, rest]
|
|
689
686
|
);
|
|
690
687
|
const getFieldProps = (0, import_react.useCallback)(
|
|
691
688
|
(props = {}, ref = null) => ({
|
|
@@ -696,9 +693,10 @@ var useAutocomplete = ({
|
|
|
696
693
|
placeholder,
|
|
697
694
|
"data-active": (0, import_utils.dataAttr)(isOpen),
|
|
698
695
|
"aria-expanded": (0, import_utils.dataAttr)(isOpen),
|
|
696
|
+
onFocus: (0, import_utils.handlerAll)(props.onFocus, rest.onFocus, onFocus),
|
|
699
697
|
onKeyDown: (0, import_utils.handlerAll)(props.onKeyDown, rest.onKeyDown, onKeyDown)
|
|
700
698
|
}),
|
|
701
|
-
[formControlProps, placeholder, isOpen, rest, onKeyDown]
|
|
699
|
+
[formControlProps, placeholder, isOpen, rest, onFocus, onKeyDown]
|
|
702
700
|
);
|
|
703
701
|
return {
|
|
704
702
|
id,
|
|
@@ -1284,8 +1282,7 @@ var AutocompleteField = (0, import_core4.forwardRef)(
|
|
|
1284
1282
|
display: "inline-block",
|
|
1285
1283
|
w: "full",
|
|
1286
1284
|
placeholder,
|
|
1287
|
-
...getInputProps(inputProps, ref)
|
|
1288
|
-
value: inputValue || displayValue || ""
|
|
1285
|
+
...getInputProps({ ...inputProps, value: inputValue || displayValue || "" }, ref)
|
|
1289
1286
|
}
|
|
1290
1287
|
) }) });
|
|
1291
1288
|
}
|
|
@@ -1641,8 +1638,7 @@ var MultiAutocompleteField = (0, import_core9.forwardRef)(
|
|
|
1641
1638
|
marginBlockStart: "0.125rem",
|
|
1642
1639
|
marginBlockEnd: "0.125rem",
|
|
1643
1640
|
placeholder: !displayValue || keepPlaceholder && isOpen ? placeholder : void 0,
|
|
1644
|
-
...getInputProps(inputProps, ref)
|
|
1645
|
-
value: inputValue
|
|
1641
|
+
...getInputProps({ ...inputProps, value: inputValue != null ? inputValue : "" }, ref)
|
|
1646
1642
|
}
|
|
1647
1643
|
)
|
|
1648
1644
|
]
|
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.js';
|
|
5
5
|
import { AutocompleteListProps } from './autocomplete-list.js';
|
|
6
|
-
import { b as UseAutocompleteProps } from './use-autocomplete-
|
|
6
|
+
import { b as UseAutocompleteProps } from './use-autocomplete-2e4e8207.js';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import '@yamada-ui/form-control';
|
|
9
9
|
import '@yamada-ui/popover';
|
|
@@ -396,7 +396,7 @@ var useAutocomplete = ({
|
|
|
396
396
|
const { id } = rest;
|
|
397
397
|
const formControlProps = (0, import_utils6.pickObject)(rest, import_form_control.formControlProperties);
|
|
398
398
|
const [containerProps, inputProps] = (0, import_utils6.splitObject)(
|
|
399
|
-
(0, import_utils6.omitObject)(rest, ["id", "value", "onChange", "month", "onChangeMonth"]),
|
|
399
|
+
(0, import_utils6.omitObject)(rest, ["id", "value", "defaultValue", "onChange", "month", "onChangeMonth"]),
|
|
400
400
|
import_core6.layoutStylesProperties
|
|
401
401
|
);
|
|
402
402
|
const descendants = useAutocompleteDescendants();
|
|
@@ -743,10 +743,8 @@ var useAutocomplete = ({
|
|
|
743
743
|
setDisplayValue(void 0);
|
|
744
744
|
setInputValue("");
|
|
745
745
|
rebirthOptions();
|
|
746
|
-
if (inputRef.current)
|
|
747
|
-
inputRef.current.focus();
|
|
748
746
|
},
|
|
749
|
-
[setDisplayValue, setInputValue, setValue, rebirthOptions
|
|
747
|
+
[setDisplayValue, setInputValue, setValue, rebirthOptions]
|
|
750
748
|
);
|
|
751
749
|
const onClick = (0, import_react.useCallback)(() => {
|
|
752
750
|
if (isOpen) {
|
|
@@ -878,10 +876,9 @@ var useAutocomplete = ({
|
|
|
878
876
|
...props,
|
|
879
877
|
...formControlProps,
|
|
880
878
|
onClick: (0, import_utils6.handlerAll)(props.onClick, rest.onClick, onClick),
|
|
881
|
-
onFocus: (0, import_utils6.handlerAll)(props.onFocus, rest.onFocus, onFocus),
|
|
882
879
|
onBlur: (0, import_utils6.handlerAll)(props.onBlur, rest.onBlur, onBlur)
|
|
883
880
|
}),
|
|
884
|
-
[containerProps, formControlProps, onBlur, onClick,
|
|
881
|
+
[containerProps, formControlProps, onBlur, onClick, rest]
|
|
885
882
|
);
|
|
886
883
|
const getFieldProps = (0, import_react.useCallback)(
|
|
887
884
|
(props = {}, ref = null) => ({
|
|
@@ -892,9 +889,10 @@ var useAutocomplete = ({
|
|
|
892
889
|
placeholder,
|
|
893
890
|
"data-active": (0, import_utils6.dataAttr)(isOpen),
|
|
894
891
|
"aria-expanded": (0, import_utils6.dataAttr)(isOpen),
|
|
892
|
+
onFocus: (0, import_utils6.handlerAll)(props.onFocus, rest.onFocus, onFocus),
|
|
895
893
|
onKeyDown: (0, import_utils6.handlerAll)(props.onKeyDown, rest.onKeyDown, onKeyDown)
|
|
896
894
|
}),
|
|
897
|
-
[formControlProps, placeholder, isOpen, rest, onKeyDown]
|
|
895
|
+
[formControlProps, placeholder, isOpen, rest, onFocus, onKeyDown]
|
|
898
896
|
);
|
|
899
897
|
return {
|
|
900
898
|
id,
|
|
@@ -1535,8 +1533,7 @@ var MultiAutocompleteField = (0, import_core8.forwardRef)(
|
|
|
1535
1533
|
marginBlockStart: "0.125rem",
|
|
1536
1534
|
marginBlockEnd: "0.125rem",
|
|
1537
1535
|
placeholder: !displayValue || keepPlaceholder && isOpen ? placeholder : void 0,
|
|
1538
|
-
...getInputProps(inputProps, ref)
|
|
1539
|
-
value: inputValue
|
|
1536
|
+
...getInputProps({ ...inputProps, value: inputValue != null ? inputValue : "" }, ref)
|
|
1540
1537
|
}
|
|
1541
1538
|
)
|
|
1542
1539
|
]
|
|
@@ -4004,7 +4004,7 @@ declare const useAutocomplete: <T extends MaybeValue = string>({ defaultIsOpen,
|
|
|
4004
4004
|
getPopoverProps: (props?: PopoverProps) => PopoverProps;
|
|
4005
4005
|
getContainerProps: PropGetter;
|
|
4006
4006
|
getFieldProps: PropGetter;
|
|
4007
|
-
inputProps: Omit<Omit<Dict, "value" | "id" | "onChange" | "month" | "onChangeMonth">, any>;
|
|
4007
|
+
inputProps: Omit<Omit<Dict, "value" | "defaultValue" | "id" | "onChange" | "month" | "onChangeMonth">, any>;
|
|
4008
4008
|
};
|
|
4009
4009
|
type UseAutocompleteReturn = ReturnType<typeof useAutocomplete>;
|
|
4010
4010
|
declare const useAutocompleteInput: () => {
|
|
@@ -5,4 +5,4 @@ import '@yamada-ui/form-control';
|
|
|
5
5
|
import '@yamada-ui/popover';
|
|
6
6
|
import '@yamada-ui/select';
|
|
7
7
|
import '@yamada-ui/utils';
|
|
8
|
-
export { c as AutocompleteDescendantsContextProvider, f as AutocompleteProvider, M as MaybeValue, s as UseAutocompleteCreateReturn, v as UseAutocompleteEmptyReturn, k as UseAutocompleteInputReturn, U as UseAutocompleteOptionGroupProps, n as UseAutocompleteOptionGroupReturn, o as UseAutocompleteOptionProps, q as UseAutocompleteOptionReturn, b as UseAutocompleteProps, i as UseAutocompleteReturn, h as useAutocomplete, g as useAutocompleteContext, r as useAutocompleteCreate, e as useAutocompleteDescendant, d as useAutocompleteDescendants, u as useAutocompleteDescendantsContext, t as useAutocompleteEmpty, j as useAutocompleteInput, l as useAutocompleteList, p as useAutocompleteOption, m as useAutocompleteOptionGroup } from './use-autocomplete-
|
|
8
|
+
export { c as AutocompleteDescendantsContextProvider, f as AutocompleteProvider, M as MaybeValue, s as UseAutocompleteCreateReturn, v as UseAutocompleteEmptyReturn, k as UseAutocompleteInputReturn, U as UseAutocompleteOptionGroupProps, n as UseAutocompleteOptionGroupReturn, o as UseAutocompleteOptionProps, q as UseAutocompleteOptionReturn, b as UseAutocompleteProps, i as UseAutocompleteReturn, h as useAutocomplete, g as useAutocompleteContext, r as useAutocompleteCreate, e as useAutocompleteDescendant, d as useAutocompleteDescendants, u as useAutocompleteDescendantsContext, t as useAutocompleteEmpty, j as useAutocompleteInput, l as useAutocompleteList, p as useAutocompleteOption, m as useAutocompleteOptionGroup } from './use-autocomplete-2e4e8207.js';
|
package/dist/use-autocomplete.js
CHANGED
|
@@ -340,7 +340,7 @@ var useAutocomplete = ({
|
|
|
340
340
|
const { id } = rest;
|
|
341
341
|
const formControlProps = (0, import_utils4.pickObject)(rest, import_form_control.formControlProperties);
|
|
342
342
|
const [containerProps, inputProps] = (0, import_utils4.splitObject)(
|
|
343
|
-
(0, import_utils4.omitObject)(rest, ["id", "value", "onChange", "month", "onChangeMonth"]),
|
|
343
|
+
(0, import_utils4.omitObject)(rest, ["id", "value", "defaultValue", "onChange", "month", "onChangeMonth"]),
|
|
344
344
|
import_core4.layoutStylesProperties
|
|
345
345
|
);
|
|
346
346
|
const descendants = useAutocompleteDescendants();
|
|
@@ -687,10 +687,8 @@ var useAutocomplete = ({
|
|
|
687
687
|
setDisplayValue(void 0);
|
|
688
688
|
setInputValue("");
|
|
689
689
|
rebirthOptions();
|
|
690
|
-
if (inputRef.current)
|
|
691
|
-
inputRef.current.focus();
|
|
692
690
|
},
|
|
693
|
-
[setDisplayValue, setInputValue, setValue, rebirthOptions
|
|
691
|
+
[setDisplayValue, setInputValue, setValue, rebirthOptions]
|
|
694
692
|
);
|
|
695
693
|
const onClick = (0, import_react2.useCallback)(() => {
|
|
696
694
|
if (isOpen) {
|
|
@@ -822,10 +820,9 @@ var useAutocomplete = ({
|
|
|
822
820
|
...props,
|
|
823
821
|
...formControlProps,
|
|
824
822
|
onClick: (0, import_utils4.handlerAll)(props.onClick, rest.onClick, onClick),
|
|
825
|
-
onFocus: (0, import_utils4.handlerAll)(props.onFocus, rest.onFocus, onFocus),
|
|
826
823
|
onBlur: (0, import_utils4.handlerAll)(props.onBlur, rest.onBlur, onBlur)
|
|
827
824
|
}),
|
|
828
|
-
[containerProps, formControlProps, onBlur, onClick,
|
|
825
|
+
[containerProps, formControlProps, onBlur, onClick, rest]
|
|
829
826
|
);
|
|
830
827
|
const getFieldProps = (0, import_react2.useCallback)(
|
|
831
828
|
(props = {}, ref = null) => ({
|
|
@@ -836,9 +833,10 @@ var useAutocomplete = ({
|
|
|
836
833
|
placeholder,
|
|
837
834
|
"data-active": (0, import_utils4.dataAttr)(isOpen),
|
|
838
835
|
"aria-expanded": (0, import_utils4.dataAttr)(isOpen),
|
|
836
|
+
onFocus: (0, import_utils4.handlerAll)(props.onFocus, rest.onFocus, onFocus),
|
|
839
837
|
onKeyDown: (0, import_utils4.handlerAll)(props.onKeyDown, rest.onKeyDown, onKeyDown)
|
|
840
838
|
}),
|
|
841
|
-
[formControlProps, placeholder, isOpen, rest, onKeyDown]
|
|
839
|
+
[formControlProps, placeholder, isOpen, rest, onFocus, onKeyDown]
|
|
842
840
|
);
|
|
843
841
|
return {
|
|
844
842
|
id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/autocomplete",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Yamada UI autocomplete component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yamada",
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
"url": "https://github.com/hirotomoyamada/yamada-ui/issues"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@yamada-ui/core": "0.2.
|
|
39
|
+
"@yamada-ui/core": "0.2.2",
|
|
40
40
|
"@yamada-ui/utils": "0.1.1",
|
|
41
|
-
"@yamada-ui/icon": "0.1.
|
|
42
|
-
"@yamada-ui/select": "0.1.
|
|
43
|
-
"@yamada-ui/form-control": "0.1.
|
|
44
|
-
"@yamada-ui/popover": "0.1.
|
|
41
|
+
"@yamada-ui/icon": "0.1.9",
|
|
42
|
+
"@yamada-ui/select": "0.1.9",
|
|
43
|
+
"@yamada-ui/form-control": "0.1.9",
|
|
44
|
+
"@yamada-ui/popover": "0.1.9",
|
|
45
45
|
"@yamada-ui/use-descendant": "0.1.1",
|
|
46
46
|
"@yamada-ui/use-clickable": "0.1.1",
|
|
47
47
|
"@yamada-ui/use-outside-click": "0.1.1",
|
|
48
|
-
"@yamada-ui/use-controllable-state": "0.1.
|
|
48
|
+
"@yamada-ui/use-controllable-state": "0.1.2"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"react": "^18.0.0",
|