@yamada-ui/autocomplete 0.2.7 → 0.2.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.d.mts +18 -0
- package/dist/autocomplete-create.mjs +1 -1
- package/dist/autocomplete-empty.d.mts +18 -0
- package/dist/autocomplete-empty.mjs +1 -1
- package/dist/autocomplete-icon.d.mts +14 -0
- package/dist/autocomplete-icon.mjs +1 -1
- package/dist/autocomplete-list.d.mts +7 -0
- package/dist/autocomplete-list.mjs +1 -1
- package/dist/autocomplete-option-group.d.mts +15 -0
- package/dist/autocomplete-option-group.mjs +1 -1
- package/dist/autocomplete-option.d.mts +8 -0
- package/dist/autocomplete-option.mjs +1 -1
- package/dist/autocomplete.d.mts +42 -0
- package/dist/autocomplete.mjs +1 -1
- package/dist/{chunk-JDV5RP6W.mjs → chunk-5O3XEEJE.mjs} +34 -26
- package/dist/index.d.mts +15 -0
- package/dist/index.js +34 -26
- package/dist/index.mjs +1 -1
- package/dist/multi-autocomplete.d.mts +73 -0
- package/dist/multi-autocomplete.js +34 -26
- package/dist/multi-autocomplete.mjs +1 -1
- package/dist/use-autocomplete.d.mts +8 -0
- package/dist/use-autocomplete.mjs +1 -1
- package/package.json +11 -11
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as _yamada_ui_core from '@yamada-ui/core';
|
|
2
|
+
import { HTMLUIProps } from '@yamada-ui/core';
|
|
3
|
+
import { ReactElement } from 'react';
|
|
4
|
+
|
|
5
|
+
type AutocompleteCreateOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* The autocomplete create option icon to use.
|
|
8
|
+
*/
|
|
9
|
+
icon?: ReactElement;
|
|
10
|
+
/**
|
|
11
|
+
* The label of the autocomplete create option.
|
|
12
|
+
*/
|
|
13
|
+
children?: string | ((inputValue: string) => string);
|
|
14
|
+
};
|
|
15
|
+
type AutocompleteCreateProps = Omit<HTMLUIProps<'li'>, 'children'> & AutocompleteCreateOptions;
|
|
16
|
+
declare const AutocompleteCreate: _yamada_ui_core.Component<"li", AutocompleteCreateProps>;
|
|
17
|
+
|
|
18
|
+
export { AutocompleteCreate, AutocompleteCreateProps };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as _yamada_ui_core from '@yamada-ui/core';
|
|
2
|
+
import { HTMLUIProps } from '@yamada-ui/core';
|
|
3
|
+
import { ReactElement } from 'react';
|
|
4
|
+
|
|
5
|
+
type AutocompleteEmptyOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* The autocomplete empty option icon to use.
|
|
8
|
+
*/
|
|
9
|
+
icon?: ReactElement;
|
|
10
|
+
/**
|
|
11
|
+
* The label of the autocomplete empty option.
|
|
12
|
+
*/
|
|
13
|
+
children?: string;
|
|
14
|
+
};
|
|
15
|
+
type AutocompleteEmptyProps = Omit<HTMLUIProps<'li'>, 'children'> & AutocompleteEmptyOptions;
|
|
16
|
+
declare const AutocompleteEmpty: _yamada_ui_core.Component<"li", AutocompleteEmptyProps>;
|
|
17
|
+
|
|
18
|
+
export { AutocompleteEmpty, AutocompleteEmptyProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as _yamada_ui_core from '@yamada-ui/core';
|
|
2
|
+
import { HTMLUIProps } from '@yamada-ui/core';
|
|
3
|
+
import { FC } from 'react';
|
|
4
|
+
|
|
5
|
+
type AutocompleteIconProps = HTMLUIProps<'div'>;
|
|
6
|
+
declare const AutocompleteIcon: _yamada_ui_core.Component<"div", AutocompleteIconProps>;
|
|
7
|
+
type AutocompleteClearIconProps = AutocompleteIconProps & {
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const AutocompleteClearIcon: FC<AutocompleteClearIconProps>;
|
|
11
|
+
type AutocompleteItemIconProps = HTMLUIProps<'span'>;
|
|
12
|
+
declare const AutocompleteItemIcon: _yamada_ui_core.Component<"span", AutocompleteItemIconProps>;
|
|
13
|
+
|
|
14
|
+
export { AutocompleteClearIcon, AutocompleteClearIconProps, AutocompleteIcon, AutocompleteIconProps, AutocompleteItemIcon, AutocompleteItemIconProps };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as _yamada_ui_core from '@yamada-ui/core';
|
|
2
|
+
import { HTMLUIProps } from '@yamada-ui/core';
|
|
3
|
+
|
|
4
|
+
type AutocompleteListProps = HTMLUIProps<'ul'>;
|
|
5
|
+
declare const AutocompleteList: _yamada_ui_core.Component<"ul", AutocompleteListProps>;
|
|
6
|
+
|
|
7
|
+
export { AutocompleteList, AutocompleteListProps };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as _yamada_ui_core from '@yamada-ui/core';
|
|
2
|
+
import { HTMLUIProps } from '@yamada-ui/core';
|
|
3
|
+
import { U as UseAutocompleteOptionGroupProps } from './use-autocomplete-cbe9b443.js';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '@yamada-ui/form-control';
|
|
7
|
+
import '@yamada-ui/popover';
|
|
8
|
+
import '@yamada-ui/select';
|
|
9
|
+
import '@yamada-ui/utils';
|
|
10
|
+
|
|
11
|
+
type AutocompleteOptionGroupOptions = UseAutocompleteOptionGroupProps;
|
|
12
|
+
type AutocompleteOptionGroupProps = HTMLUIProps<'ul'> & AutocompleteOptionGroupOptions;
|
|
13
|
+
declare const AutocompleteOptionGroup: _yamada_ui_core.Component<"ul", AutocompleteOptionGroupProps>;
|
|
14
|
+
|
|
15
|
+
export { AutocompleteOptionGroup, AutocompleteOptionGroupProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import '@yamada-ui/core';
|
|
2
|
+
import 'react';
|
|
3
|
+
export { A as AutocompleteOption, a as AutocompleteOptionProps } from './use-autocomplete-cbe9b443.js';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import '@yamada-ui/form-control';
|
|
6
|
+
import '@yamada-ui/popover';
|
|
7
|
+
import '@yamada-ui/select';
|
|
8
|
+
import '@yamada-ui/utils';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as _yamada_ui_core from '@yamada-ui/core';
|
|
2
|
+
import { ThemeProps, HTMLUIProps } from '@yamada-ui/core';
|
|
3
|
+
import { AutocompleteIconProps } from './autocomplete-icon.mjs';
|
|
4
|
+
import { AutocompleteListProps } from './autocomplete-list.mjs';
|
|
5
|
+
import { b as UseAutocompleteProps } from './use-autocomplete-cbe9b443.js';
|
|
6
|
+
import 'react';
|
|
7
|
+
import 'react/jsx-runtime';
|
|
8
|
+
import '@yamada-ui/form-control';
|
|
9
|
+
import '@yamada-ui/popover';
|
|
10
|
+
import '@yamada-ui/select';
|
|
11
|
+
import '@yamada-ui/utils';
|
|
12
|
+
|
|
13
|
+
type AutocompleteOptions = {
|
|
14
|
+
/**
|
|
15
|
+
* The border color when the input is focused.
|
|
16
|
+
*/
|
|
17
|
+
focusBorderColor?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The border color when the input is invalid.
|
|
20
|
+
*/
|
|
21
|
+
errorBorderColor?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Props for autocomplete container element.
|
|
24
|
+
*/
|
|
25
|
+
containerProps?: Omit<HTMLUIProps<'div'>, 'children'>;
|
|
26
|
+
/**
|
|
27
|
+
* Props for autocomplete list element.
|
|
28
|
+
*/
|
|
29
|
+
listProps?: Omit<AutocompleteListProps, 'children'>;
|
|
30
|
+
/**
|
|
31
|
+
* Props for autocomplete input element.
|
|
32
|
+
*/
|
|
33
|
+
inputProps?: HTMLUIProps<'input'>;
|
|
34
|
+
/**
|
|
35
|
+
* Props for autocomplete icon element.
|
|
36
|
+
*/
|
|
37
|
+
iconProps?: AutocompleteIconProps;
|
|
38
|
+
};
|
|
39
|
+
type AutocompleteProps = ThemeProps<'Select'> & Omit<UseAutocompleteProps<string>, 'maxSelectedValues' | 'omitSelectedValues'> & AutocompleteOptions;
|
|
40
|
+
declare const Autocomplete: _yamada_ui_core.Component<"input", AutocompleteProps>;
|
|
41
|
+
|
|
42
|
+
export { Autocomplete, AutocompleteProps };
|
package/dist/autocomplete.mjs
CHANGED
|
@@ -477,32 +477,40 @@ var MultiAutocomplete = forwardRef7((props, ref) => {
|
|
|
477
477
|
isEmpty,
|
|
478
478
|
styles
|
|
479
479
|
},
|
|
480
|
-
children: /* @__PURE__ */ jsx7(Popover2, { ...getPopoverProps(), children: /* @__PURE__ */ jsxs6(
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
480
|
+
children: /* @__PURE__ */ jsx7(Popover2, { ...getPopoverProps(), children: /* @__PURE__ */ jsxs6(
|
|
481
|
+
ui7.div,
|
|
482
|
+
{
|
|
483
|
+
className: cx7("ui-autocomplete", className),
|
|
484
|
+
__css: css,
|
|
485
|
+
...getContainerProps(containerProps),
|
|
486
|
+
children: [
|
|
487
|
+
/* @__PURE__ */ jsx7(
|
|
488
|
+
MultiAutocompleteField,
|
|
489
|
+
{
|
|
490
|
+
component,
|
|
491
|
+
separator,
|
|
492
|
+
keepPlaceholder,
|
|
493
|
+
h,
|
|
494
|
+
minH,
|
|
495
|
+
inputProps,
|
|
496
|
+
...getFieldProps({}, ref)
|
|
497
|
+
}
|
|
498
|
+
),
|
|
499
|
+
isClearable && value.length ? /* @__PURE__ */ jsx7(
|
|
500
|
+
AutocompleteClearIcon,
|
|
501
|
+
{
|
|
502
|
+
...clearIconProps,
|
|
503
|
+
onClick: handlerAll(clearIconProps == null ? void 0 : clearIconProps.onClick, onClear),
|
|
504
|
+
...formControlProps
|
|
505
|
+
}
|
|
506
|
+
) : /* @__PURE__ */ jsx7(AutocompleteIcon, { ...iconProps, ...formControlProps }),
|
|
507
|
+
!isEmpty ? /* @__PURE__ */ jsxs6(AutocompleteList, { ...listProps, children: [
|
|
508
|
+
createOption ? /* @__PURE__ */ jsx7(AutocompleteCreate, {}) : /* @__PURE__ */ jsx7(AutocompleteEmpty, {}),
|
|
509
|
+
children != null ? children : computedChildren
|
|
510
|
+
] }) : /* @__PURE__ */ jsx7(AutocompleteList, { ...listProps, children: createOption && inputValue ? /* @__PURE__ */ jsx7(AutocompleteCreate, {}) : /* @__PURE__ */ jsx7(AutocompleteEmpty, {}) })
|
|
511
|
+
]
|
|
512
|
+
}
|
|
513
|
+
) })
|
|
506
514
|
}
|
|
507
515
|
) });
|
|
508
516
|
});
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { Autocomplete, AutocompleteProps } from './autocomplete.mjs';
|
|
2
|
+
export { AutocompleteOptionGroup, AutocompleteOptionGroupProps } from './autocomplete-option-group.mjs';
|
|
3
|
+
export { A as AutocompleteOption, a as AutocompleteOptionProps } from './use-autocomplete-cbe9b443.js';
|
|
4
|
+
export { AutocompleteCreate, AutocompleteCreateProps } from './autocomplete-create.mjs';
|
|
5
|
+
export { AutocompleteEmpty, AutocompleteEmptyProps } from './autocomplete-empty.mjs';
|
|
6
|
+
export { MultiAutocomplete, MultiAutocompleteProps } from './multi-autocomplete.mjs';
|
|
7
|
+
import '@yamada-ui/core';
|
|
8
|
+
import './autocomplete-icon.mjs';
|
|
9
|
+
import 'react';
|
|
10
|
+
import './autocomplete-list.mjs';
|
|
11
|
+
import 'react/jsx-runtime';
|
|
12
|
+
import '@yamada-ui/form-control';
|
|
13
|
+
import '@yamada-ui/popover';
|
|
14
|
+
import '@yamada-ui/select';
|
|
15
|
+
import '@yamada-ui/utils';
|
package/dist/index.js
CHANGED
|
@@ -1548,32 +1548,40 @@ var MultiAutocomplete = (0, import_core9.forwardRef)((props, ref) => {
|
|
|
1548
1548
|
isEmpty,
|
|
1549
1549
|
styles
|
|
1550
1550
|
},
|
|
1551
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_popover3.Popover, { ...getPopoverProps(), children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1551
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_popover3.Popover, { ...getPopoverProps(), children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1552
|
+
import_core9.ui.div,
|
|
1553
|
+
{
|
|
1554
|
+
className: (0, import_utils9.cx)("ui-autocomplete", className),
|
|
1555
|
+
__css: css,
|
|
1556
|
+
...getContainerProps(containerProps),
|
|
1557
|
+
children: [
|
|
1558
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1559
|
+
MultiAutocompleteField,
|
|
1560
|
+
{
|
|
1561
|
+
component,
|
|
1562
|
+
separator,
|
|
1563
|
+
keepPlaceholder,
|
|
1564
|
+
h,
|
|
1565
|
+
minH,
|
|
1566
|
+
inputProps,
|
|
1567
|
+
...getFieldProps({}, ref)
|
|
1568
|
+
}
|
|
1569
|
+
),
|
|
1570
|
+
isClearable && value.length ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1571
|
+
AutocompleteClearIcon,
|
|
1572
|
+
{
|
|
1573
|
+
...clearIconProps,
|
|
1574
|
+
onClick: (0, import_utils9.handlerAll)(clearIconProps == null ? void 0 : clearIconProps.onClick, onClear),
|
|
1575
|
+
...formControlProps
|
|
1576
|
+
}
|
|
1577
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AutocompleteIcon, { ...iconProps, ...formControlProps }),
|
|
1578
|
+
!isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(AutocompleteList, { ...listProps, children: [
|
|
1579
|
+
createOption ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AutocompleteCreate, {}) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AutocompleteEmpty, {}),
|
|
1580
|
+
children != null ? children : computedChildren
|
|
1581
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AutocompleteList, { ...listProps, children: createOption && inputValue ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AutocompleteCreate, {}) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AutocompleteEmpty, {}) })
|
|
1582
|
+
]
|
|
1583
|
+
}
|
|
1584
|
+
) })
|
|
1577
1585
|
}
|
|
1578
1586
|
) });
|
|
1579
1587
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as _yamada_ui_core from '@yamada-ui/core';
|
|
2
|
+
import { ThemeProps, HTMLUIProps } from '@yamada-ui/core';
|
|
3
|
+
import { FC, MouseEventHandler } from 'react';
|
|
4
|
+
import { AutocompleteIconProps } from './autocomplete-icon.mjs';
|
|
5
|
+
import { AutocompleteListProps } from './autocomplete-list.mjs';
|
|
6
|
+
import { b as UseAutocompleteProps } from './use-autocomplete-cbe9b443.js';
|
|
7
|
+
import 'react/jsx-runtime';
|
|
8
|
+
import '@yamada-ui/form-control';
|
|
9
|
+
import '@yamada-ui/popover';
|
|
10
|
+
import '@yamada-ui/select';
|
|
11
|
+
import '@yamada-ui/utils';
|
|
12
|
+
|
|
13
|
+
type MultiAutocompleteOptions = {
|
|
14
|
+
/**
|
|
15
|
+
* The visual separator between each value.
|
|
16
|
+
*
|
|
17
|
+
* @default ','
|
|
18
|
+
*/
|
|
19
|
+
separator?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The custom display value to use.
|
|
22
|
+
*/
|
|
23
|
+
component?: FC<{
|
|
24
|
+
value: string | number;
|
|
25
|
+
displayValue: string;
|
|
26
|
+
index: number;
|
|
27
|
+
onRemove: MouseEventHandler<HTMLElement>;
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* If `true`, keep the placeholder.
|
|
31
|
+
*
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
keepPlaceholder?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* If `true`, display the select clear icon.
|
|
37
|
+
*
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
isClearable?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The border color when the input is focused.
|
|
43
|
+
*/
|
|
44
|
+
focusBorderColor?: string;
|
|
45
|
+
/**
|
|
46
|
+
* The border color when the input is invalid.
|
|
47
|
+
*/
|
|
48
|
+
errorBorderColor?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Props for multi autocomplete container element.
|
|
51
|
+
*/
|
|
52
|
+
containerProps?: Omit<HTMLUIProps<'div'>, 'children'>;
|
|
53
|
+
/**
|
|
54
|
+
* Props for multi autocomplete list element.
|
|
55
|
+
*/
|
|
56
|
+
listProps?: Omit<AutocompleteListProps, 'children'>;
|
|
57
|
+
/**
|
|
58
|
+
* Props for multi autocomplete input element.
|
|
59
|
+
*/
|
|
60
|
+
inputProps?: HTMLUIProps<'input'>;
|
|
61
|
+
/**
|
|
62
|
+
* Props for multi autocomplete icon element.
|
|
63
|
+
*/
|
|
64
|
+
iconProps?: AutocompleteIconProps;
|
|
65
|
+
/**
|
|
66
|
+
* Props for multi autocomplete clear icon element.
|
|
67
|
+
*/
|
|
68
|
+
clearIconProps?: AutocompleteIconProps;
|
|
69
|
+
};
|
|
70
|
+
type MultiAutocompleteProps = ThemeProps<'Select'> & UseAutocompleteProps<string[]> & MultiAutocompleteOptions;
|
|
71
|
+
declare const MultiAutocomplete: _yamada_ui_core.Component<"div", MultiAutocompleteProps>;
|
|
72
|
+
|
|
73
|
+
export { MultiAutocomplete, MultiAutocompleteProps };
|
|
@@ -1443,32 +1443,40 @@ var MultiAutocomplete = (0, import_core8.forwardRef)((props, ref) => {
|
|
|
1443
1443
|
isEmpty,
|
|
1444
1444
|
styles
|
|
1445
1445
|
},
|
|
1446
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_popover2.Popover, { ...getPopoverProps(), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1446
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_popover2.Popover, { ...getPopoverProps(), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1447
|
+
import_core8.ui.div,
|
|
1448
|
+
{
|
|
1449
|
+
className: (0, import_utils8.cx)("ui-autocomplete", className),
|
|
1450
|
+
__css: css,
|
|
1451
|
+
...getContainerProps(containerProps),
|
|
1452
|
+
children: [
|
|
1453
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1454
|
+
MultiAutocompleteField,
|
|
1455
|
+
{
|
|
1456
|
+
component,
|
|
1457
|
+
separator,
|
|
1458
|
+
keepPlaceholder,
|
|
1459
|
+
h,
|
|
1460
|
+
minH,
|
|
1461
|
+
inputProps,
|
|
1462
|
+
...getFieldProps({}, ref)
|
|
1463
|
+
}
|
|
1464
|
+
),
|
|
1465
|
+
isClearable && value.length ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1466
|
+
AutocompleteClearIcon,
|
|
1467
|
+
{
|
|
1468
|
+
...clearIconProps,
|
|
1469
|
+
onClick: (0, import_utils8.handlerAll)(clearIconProps == null ? void 0 : clearIconProps.onClick, onClear),
|
|
1470
|
+
...formControlProps
|
|
1471
|
+
}
|
|
1472
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AutocompleteIcon, { ...iconProps, ...formControlProps }),
|
|
1473
|
+
!isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(AutocompleteList, { ...listProps, children: [
|
|
1474
|
+
createOption ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AutocompleteCreate, {}) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AutocompleteEmpty, {}),
|
|
1475
|
+
children != null ? children : computedChildren
|
|
1476
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AutocompleteList, { ...listProps, children: createOption && inputValue ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AutocompleteCreate, {}) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AutocompleteEmpty, {}) })
|
|
1477
|
+
]
|
|
1478
|
+
}
|
|
1479
|
+
) })
|
|
1472
1480
|
}
|
|
1473
1481
|
) });
|
|
1474
1482
|
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import 'react/jsx-runtime';
|
|
2
|
+
import 'react';
|
|
3
|
+
import '@yamada-ui/core';
|
|
4
|
+
import '@yamada-ui/form-control';
|
|
5
|
+
import '@yamada-ui/popover';
|
|
6
|
+
import '@yamada-ui/select';
|
|
7
|
+
import '@yamada-ui/utils';
|
|
8
|
+
export { c as AutocompleteDescendantsContextProvider, f as AutocompleteProvider, 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-cbe9b443.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/autocomplete",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.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.
|
|
40
|
-
"@yamada-ui/utils": "0.1.
|
|
41
|
-
"@yamada-ui/icon": "0.2.
|
|
42
|
-
"@yamada-ui/select": "0.2.
|
|
43
|
-
"@yamada-ui/form-control": "0.2.
|
|
44
|
-
"@yamada-ui/popover": "0.2.
|
|
45
|
-
"@yamada-ui/use-descendant": "0.1.
|
|
46
|
-
"@yamada-ui/use-clickable": "0.2.
|
|
47
|
-
"@yamada-ui/use-outside-click": "0.1.
|
|
48
|
-
"@yamada-ui/use-controllable-state": "0.1.
|
|
39
|
+
"@yamada-ui/core": "0.5.0",
|
|
40
|
+
"@yamada-ui/utils": "0.1.3",
|
|
41
|
+
"@yamada-ui/icon": "0.2.5",
|
|
42
|
+
"@yamada-ui/select": "0.2.9",
|
|
43
|
+
"@yamada-ui/form-control": "0.2.5",
|
|
44
|
+
"@yamada-ui/popover": "0.2.8",
|
|
45
|
+
"@yamada-ui/use-descendant": "0.1.4",
|
|
46
|
+
"@yamada-ui/use-clickable": "0.2.2",
|
|
47
|
+
"@yamada-ui/use-outside-click": "0.1.3",
|
|
48
|
+
"@yamada-ui/use-controllable-state": "0.1.4"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"react": "^18.0.0",
|