@yamada-ui/autocomplete 2.0.0-next-20240619220221 → 2.0.0-next-20240701004015

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  AutocompleteCreate
4
- } from "./chunk-W7B7WEFQ.mjs";
4
+ } from "./chunk-DQV3VPJ3.mjs";
5
5
  export {
6
6
  AutocompleteCreate
7
7
  };
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  AutocompleteEmpty
4
- } from "./chunk-W7B7WEFQ.mjs";
4
+ } from "./chunk-DQV3VPJ3.mjs";
5
5
  export {
6
6
  AutocompleteEmpty
7
7
  };
@@ -3,7 +3,7 @@ import {
3
3
  AutocompleteClearIcon,
4
4
  AutocompleteIcon,
5
5
  AutocompleteItemIcon
6
- } from "./chunk-W7B7WEFQ.mjs";
6
+ } from "./chunk-DQV3VPJ3.mjs";
7
7
  export {
8
8
  AutocompleteClearIcon,
9
9
  AutocompleteIcon,
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  AutocompleteList
4
- } from "./chunk-W7B7WEFQ.mjs";
4
+ } from "./chunk-DQV3VPJ3.mjs";
5
5
  export {
6
6
  AutocompleteList
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-h3CQff1L.mjs';
3
+ import { U as UseAutocompleteOptionGroupProps } from './use-autocomplete-D30tMc5q.mjs';
4
4
  import 'react/jsx-runtime';
5
5
  import 'react';
6
6
  import '@yamada-ui/use-descendant';
@@ -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-h3CQff1L.js';
3
+ import { U as UseAutocompleteOptionGroupProps } from './use-autocomplete-D30tMc5q.js';
4
4
  import 'react/jsx-runtime';
5
5
  import 'react';
6
6
  import '@yamada-ui/use-descendant';
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  AutocompleteOptionGroup
4
- } from "./chunk-W7B7WEFQ.mjs";
4
+ } from "./chunk-DQV3VPJ3.mjs";
5
5
  export {
6
6
  AutocompleteOptionGroup
7
7
  };
@@ -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-h3CQff1L.mjs';
3
+ export { A as AutocompleteOption, a as AutocompleteOptionProps } from './use-autocomplete-D30tMc5q.mjs';
4
4
  import 'react/jsx-runtime';
5
5
  import '@yamada-ui/use-descendant';
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-h3CQff1L.js';
3
+ export { A as AutocompleteOption, a as AutocompleteOptionProps } from './use-autocomplete-D30tMc5q.js';
4
4
  import 'react/jsx-runtime';
5
5
  import '@yamada-ui/use-descendant';
6
6
  import '@yamada-ui/form-control';
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  AutocompleteOption
4
- } from "./chunk-W7B7WEFQ.mjs";
4
+ } from "./chunk-DQV3VPJ3.mjs";
5
5
  export {
6
6
  AutocompleteOption
7
7
  };
@@ -1,9 +1,11 @@
1
1
  import * as _yamada_ui_core from '@yamada-ui/core';
2
2
  import { ThemeProps, HTMLUIProps } from '@yamada-ui/core';
3
3
  import { PortalProps } from '@yamada-ui/portal';
4
+ import { AutocompleteCreateProps } from './autocomplete-create.mjs';
5
+ import { AutocompleteEmptyProps } from './autocomplete-empty.mjs';
4
6
  import { AutocompleteIconProps } from './autocomplete-icon.mjs';
5
7
  import { AutocompleteListProps } from './autocomplete-list.mjs';
6
- import { c as UseAutocompleteProps } from './use-autocomplete-h3CQff1L.mjs';
8
+ import { c as UseAutocompleteProps } from './use-autocomplete-D30tMc5q.mjs';
7
9
  import 'react';
8
10
  import '@yamada-ui/motion';
9
11
  import 'react/jsx-runtime';
@@ -44,6 +46,14 @@ type AutocompleteOptions = {
44
46
  *
45
47
  */
46
48
  portalProps?: Omit<PortalProps, "children">;
49
+ /**
50
+ * Props for autocomplete create element.
51
+ */
52
+ createProps?: Omit<AutocompleteCreateProps, "children">;
53
+ /**
54
+ * Props for autocomplete empty element.
55
+ */
56
+ emptyProps?: Omit<AutocompleteEmptyProps, "children">;
47
57
  };
48
58
  type AutocompleteProps = ThemeProps<"Autocomplete"> & Omit<UseAutocompleteProps<string>, "maxSelectValues" | "omitSelectedValues"> & AutocompleteOptions;
49
59
  /**
@@ -1,9 +1,11 @@
1
1
  import * as _yamada_ui_core from '@yamada-ui/core';
2
2
  import { ThemeProps, HTMLUIProps } from '@yamada-ui/core';
3
3
  import { PortalProps } from '@yamada-ui/portal';
4
+ import { AutocompleteCreateProps } from './autocomplete-create.js';
5
+ import { AutocompleteEmptyProps } from './autocomplete-empty.js';
4
6
  import { AutocompleteIconProps } from './autocomplete-icon.js';
5
7
  import { AutocompleteListProps } from './autocomplete-list.js';
6
- import { c as UseAutocompleteProps } from './use-autocomplete-h3CQff1L.js';
8
+ import { c as UseAutocompleteProps } from './use-autocomplete-D30tMc5q.js';
7
9
  import 'react';
8
10
  import '@yamada-ui/motion';
9
11
  import 'react/jsx-runtime';
@@ -44,6 +46,14 @@ type AutocompleteOptions = {
44
46
  *
45
47
  */
46
48
  portalProps?: Omit<PortalProps, "children">;
49
+ /**
50
+ * Props for autocomplete create element.
51
+ */
52
+ createProps?: Omit<AutocompleteCreateProps, "children">;
53
+ /**
54
+ * Props for autocomplete empty element.
55
+ */
56
+ emptyProps?: Omit<AutocompleteEmptyProps, "children">;
47
57
  };
48
58
  type AutocompleteProps = ThemeProps<"Autocomplete"> & Omit<UseAutocompleteProps<string>, "maxSelectValues" | "omitSelectedValues"> & AutocompleteOptions;
49
59
  /**
@@ -1446,6 +1446,8 @@ var Autocomplete = (0, import_core8.forwardRef)(
1446
1446
  inputProps,
1447
1447
  iconProps,
1448
1448
  portalProps = { isDisabled: true },
1449
+ createProps,
1450
+ emptyProps,
1449
1451
  children,
1450
1452
  ...computedProps
1451
1453
  } = (0, import_core8.omitThemeProps)(mergedProps);
@@ -1505,9 +1507,9 @@ var Autocomplete = (0, import_core8.forwardRef)(
1505
1507
  }
1506
1508
  ),
1507
1509
  !isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_portal.Portal, { ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(AutocompleteList, { ...listProps, children: [
1508
- allowCreate ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AutocompleteCreate, {}) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AutocompleteEmpty, {}),
1510
+ allowCreate ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AutocompleteCreate, { ...createProps }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AutocompleteEmpty, { ...emptyProps }),
1509
1511
  children != null ? children : computedChildren
1510
- ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_portal.Portal, { ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AutocompleteList, { ...listProps, children: allowCreate && inputValue ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AutocompleteCreate, {}) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AutocompleteEmpty, {}) }) })
1512
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_portal.Portal, { ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AutocompleteList, { ...listProps, children: allowCreate && inputValue ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AutocompleteCreate, { ...createProps }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AutocompleteEmpty, { ...emptyProps }) }) })
1511
1513
  ]
1512
1514
  }
1513
1515
  ) })