@choc-ui/chakra-autocomplete 5.1.5 → 5.1.7

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/README.md CHANGED
@@ -637,8 +637,8 @@ string[]
637
637
  ```
638
638
 
639
639
  </td>
640
- <td>show suggestions when input value is empty</td>
641
- <td>false</td>
640
+ <td>A list of <a href="https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values">KeyboardEvent: key values</a>, except for the "Enter" key, that trigger the click event of the currently selected Item.</td>
641
+ <td>&mdash;&mdash;&mdash;</td>
642
642
  </tr>
643
643
  <tr>
644
644
  <td>suggestWhenEmpty</td>
@@ -1080,6 +1080,16 @@ yarn start
1080
1080
  yarn dev
1081
1081
  ```
1082
1082
 
1083
+ ## Sponsors ✨
1084
+
1085
+ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
1086
+
1087
+ <p align="center">
1088
+ <a href="https://patreon.com/anubra266?utm_medium=clipboard_copy&utm_source=copyLink&utm_campaign=creatorshare_creator&utm_content=join_link">
1089
+ <img src='https://cdn.jsdelivr.net/gh/anubra266/static@main/sponsors.svg'/>
1090
+ </a>
1091
+ </p>
1092
+
1083
1093
  ## Contributors ✨
1084
1094
 
1085
1095
  Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
@@ -1089,7 +1099,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
1089
1099
  <!-- markdownlint-disable -->
1090
1100
  <table>
1091
1101
  <tr>
1092
- <td align="center"><a href="https://anubra266.tk"><img src="https://avatars.githubusercontent.com/u/30869823?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Abraham</b></sub></a><br /><a href="https://github.com/anubra266/choc-autocomplete/commits?author=anubra266" title="Code">💻</a></td>
1102
+ <td align="center"><a href="https://anubra266.tk"><img src="https://avatars.githubusercontent.com/u/30869823?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Maicon Carraro</b></sub></a><br /><a href="https://github.com/anubra266/choc-autocomplete/commits?author=anubra266" title="Code">💻</a></td>
1093
1103
  <td align="center"><a href="http://margalit.com.au"><img src="https://avatars.githubusercontent.com/u/2268424?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sam Margalit</b></sub></a><br /><a href="https://github.com/anubra266/choc-autocomplete/commits?author=margalit" title="Documentation">📖</a></td>
1094
1104
  <td align="center"><a href="https://github.com/gepd"><img src="https://avatars.githubusercontent.com/u/7091609?v=4?s=100" width="100px;" alt=""/><br /><sub><b>gepd</b></sub></a><br /><a href="https://github.com/anubra266/choc-autocomplete/commits?author=gepd" title="Code">💻</a> <a href="https://github.com/anubra266/choc-autocomplete/issues?q=author%3Agepd" title="Bug reports">🐛</a></td>
1095
1105
  <td align="center"><a href="https://www.linkedin.com/in/spencerkaiser"><img src="https://avatars.githubusercontent.com/u/6445731?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Spencer Kaiser</b></sub></a><br /><a href="https://github.com/anubra266/choc-autocomplete/commits?author=SpencerKaiser" title="Documentation">📖</a></td>
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- import { UseAutoCompleteReturn } from "./types";
3
- export declare const AutoCompleteProvider: import("react").Provider<UseAutoCompleteReturn>, useAutoCompleteContext: () => UseAutoCompleteReturn;
1
+ /// <reference types="react" />
2
+ import { UseAutoCompleteReturn } from "./types";
3
+ export declare const AutoCompleteProvider: import("react").Provider<UseAutoCompleteReturn>, useAutoCompleteContext: () => UseAutoCompleteReturn;
@@ -1,14 +1,14 @@
1
- /// <reference types="react" />
2
- import { FlexProps } from "@chakra-ui/react";
3
- import { MaybeRenderProp } from "@chakra-ui/react-utils";
4
- interface AutoCompleteCreatableProps extends Omit<FlexProps, 'children'> {
5
- children?: MaybeRenderProp<{
6
- value: any;
7
- }>;
8
- alwaysDisplay?: boolean;
9
- }
10
- export declare function AutoCompleteCreatable(props: AutoCompleteCreatableProps): JSX.Element | null;
11
- export declare namespace AutoCompleteCreatable {
12
- var displayName: string;
13
- }
14
- export {};
1
+ /// <reference types="react" />
2
+ import { FlexProps } from "@chakra-ui/react";
3
+ import { MaybeRenderProp } from "@chakra-ui/react-utils";
4
+ interface AutoCompleteCreatableProps extends Omit<FlexProps, "children"> {
5
+ children?: MaybeRenderProp<{
6
+ value: any;
7
+ }>;
8
+ alwaysDisplay?: boolean;
9
+ }
10
+ export declare function AutoCompleteCreatable(props: AutoCompleteCreatableProps): JSX.Element | null;
11
+ export declare namespace AutoCompleteCreatable {
12
+ var displayName: string;
13
+ }
14
+ export {};
@@ -1,9 +1,9 @@
1
- import { BoxProps, FlexProps } from "@chakra-ui/react";
2
- import React from "react";
3
- export interface AutoCompleteGroupProps extends BoxProps {
4
- children?: React.ReactNode;
5
- showDivider?: boolean;
6
- dividerColor?: string;
7
- }
8
- export declare const AutoCompleteGroup: import("@chakra-ui/system").ComponentWithAs<"div", AutoCompleteGroupProps>;
9
- export declare const AutoCompleteGroupTitle: import("@chakra-ui/system").ComponentWithAs<"div", FlexProps>;
1
+ import { BoxProps, FlexProps } from "@chakra-ui/react";
2
+ import React from "react";
3
+ export interface AutoCompleteGroupProps extends BoxProps {
4
+ children?: React.ReactNode;
5
+ showDivider?: boolean;
6
+ dividerColor?: string;
7
+ }
8
+ export declare const AutoCompleteGroup: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"div", AutoCompleteGroupProps>;
9
+ export declare const AutoCompleteGroupTitle: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"div", FlexProps>;
@@ -1,10 +1,11 @@
1
- import { InputProps, SystemStyleObject } from "@chakra-ui/react";
2
- import { MaybeRenderProp } from "@chakra-ui/react-utils";
3
- import { UseAutoCompleteReturn } from "./types";
4
- export interface AutoCompleteInputProps extends Omit<InputProps, 'children'> {
5
- children?: MaybeRenderProp<{
6
- tags: UseAutoCompleteReturn["tags"];
7
- }>;
8
- wrapStyles?: SystemStyleObject;
9
- }
10
- export declare const AutoCompleteInput: import("@chakra-ui/system").ComponentWithAs<"input", AutoCompleteInputProps>;
1
+ import { InputProps, SystemStyleObject } from "@chakra-ui/react";
2
+ import { MaybeRenderProp } from "@chakra-ui/react-utils";
3
+ import { UseAutoCompleteReturn } from "./types";
4
+ export interface AutoCompleteInputProps extends Omit<InputProps, "children"> {
5
+ children?: MaybeRenderProp<{
6
+ tags: UseAutoCompleteReturn["tags"];
7
+ }>;
8
+ wrapStyles?: SystemStyleObject;
9
+ hidePlaceholder?: boolean;
10
+ }
11
+ export declare const AutoCompleteInput: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"input", AutoCompleteInputProps>;
@@ -1,12 +1,12 @@
1
- import { CSSObject, FlexProps } from "@chakra-ui/react";
2
- export interface AutoCompleteItemProps extends FlexProps {
3
- value: any;
4
- label?: string;
5
- fixed?: boolean;
6
- _focus?: CSSObject | any;
7
- disabled?: boolean;
8
- _fixed?: CSSObject;
9
- getValue?: (item: AutoCompleteItemProps["value"]) => any;
10
- }
11
- export declare const AutoCompleteItem: import("@chakra-ui/system").ComponentWithAs<"div", AutoCompleteItemProps>;
12
- export declare const baseItemStyles: FlexProps;
1
+ import { CSSObject, FlexProps } from "@chakra-ui/react";
2
+ export interface AutoCompleteItemProps extends FlexProps {
3
+ value: any;
4
+ label?: string;
5
+ fixed?: boolean;
6
+ _focus?: CSSObject | any;
7
+ disabled?: boolean;
8
+ _fixed?: CSSObject;
9
+ getValue?: (item: AutoCompleteItemProps["value"]) => any;
10
+ }
11
+ export declare const AutoCompleteItem: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"div", AutoCompleteItemProps>;
12
+ export declare const baseItemStyles: FlexProps;
@@ -1,3 +1,3 @@
1
- import { PopoverContentProps } from "@chakra-ui/react";
2
- export declare type AutoCompleteListProps = PopoverContentProps;
3
- export declare const AutoCompleteList: import("@chakra-ui/system").ComponentWithAs<"div", PopoverContentProps>;
1
+ import { PopoverContentProps } from "@chakra-ui/react";
2
+ export declare type AutoCompleteListProps = PopoverContentProps;
3
+ export declare const AutoCompleteList: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"div", PopoverContentProps>;
@@ -1,9 +1,9 @@
1
- import { TagProps } from "@chakra-ui/tag";
2
- import React from "react";
3
- declare type AutoCompleteTagProps = {
4
- disabled?: boolean;
5
- label: string;
6
- onRemove?: () => void;
7
- } & TagProps;
8
- export declare const AutoCompleteTag: React.MemoExoticComponent<(props: AutoCompleteTagProps) => JSX.Element>;
9
- export {};
1
+ import { TagProps } from "@chakra-ui/tag";
2
+ import React from "react";
3
+ declare type AutoCompleteTagProps = {
4
+ disabled?: boolean;
5
+ label: string;
6
+ onRemove?: () => void;
7
+ } & TagProps;
8
+ export declare const AutoCompleteTag: React.MemoExoticComponent<(props: AutoCompleteTagProps) => JSX.Element>;
9
+ export {};
@@ -1,13 +1,13 @@
1
- import React from "react";
2
- import { MaybeRenderProp } from "@chakra-ui/react-utils";
3
- import { AutoCompleteRefMethods, UseAutoCompleteProps } from "./types";
4
- export declare type AutoCompleteChildProps = {
5
- isOpen: boolean;
6
- onClose: () => void;
7
- onOpen: () => void;
8
- };
9
- export interface AutoCompleteProps extends UseAutoCompleteProps {
10
- children: MaybeRenderProp<AutoCompleteChildProps>;
11
- ref?: React.RefObject<AutoCompleteRefMethods>;
12
- }
13
- export declare const AutoComplete: import("@chakra-ui/system").ComponentWithAs<"div", AutoCompleteProps>;
1
+ import React from "react";
2
+ import { MaybeRenderProp } from "@chakra-ui/react-utils";
3
+ import { AutoCompleteRefMethods, UseAutoCompleteProps } from "./types";
4
+ export declare type AutoCompleteChildProps = {
5
+ isOpen: boolean;
6
+ onClose: () => void;
7
+ onOpen: () => void;
8
+ };
9
+ export interface AutoCompleteProps extends UseAutoCompleteProps {
10
+ children: MaybeRenderProp<AutoCompleteChildProps>;
11
+ ref?: React.RefObject<AutoCompleteRefMethods>;
12
+ }
13
+ export declare const AutoComplete: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"div", AutoCompleteProps>;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- import { BoxProps } from "@chakra-ui/layout";
3
- export declare const EmptyState: (props: BoxProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { BoxProps } from "@chakra-ui/layout";
3
+ export declare const EmptyState: (props: BoxProps) => JSX.Element;
@@ -1 +1 @@
1
- export declare function fuzzyScore(str1: string, str2: string, gramSize?: number): number;
1
+ export declare function fuzzyScore(str1: string, str2: string, gramSize?: number): number;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
2
- export declare const hasFirstItem: (children: ReactNode, firstItem: any) => any;
3
- export declare const hasLastItem: (children: ReactNode, lastItem: any) => any;
4
- export declare const hasChildren: (children: any, filteredList: any[]) => boolean;
1
+ import { ReactNode } from "react";
2
+ export declare const hasFirstItem: (children: ReactNode, firstItem: any) => any;
3
+ export declare const hasLastItem: (children: ReactNode, lastItem: any) => any;
4
+ export declare const hasChildren: (children: any, filteredList: any[]) => boolean;
@@ -1 +1 @@
1
- export declare const getMultipleWrapStyles: (themeInput: any, multiple?: boolean | undefined) => any;
1
+ export declare const getMultipleWrapStyles: (themeInput: any, multiple?: boolean) => any;
@@ -1,9 +1,9 @@
1
- import { ReactNode } from "react";
2
- import { FlexProps } from "@chakra-ui/react";
3
- import { Item } from "../types";
4
- import { AutoCompleteItemProps } from "../autocomplete-item";
5
- export declare const getDefItemValue: (item: AutoCompleteItemProps["value"]) => any;
6
- export declare const setEmphasis: (children: any, query: string) => any;
7
- export declare const getItemList: (children: ReactNode) => Item[];
8
- export declare const getFocusedStyles: () => FlexProps;
9
- export declare const defaultFilterMethod: (query: string, itemValue: Item["value"], itemLabel: Item["label"]) => boolean;
1
+ import { ReactNode } from "react";
2
+ import { FlexProps } from "@chakra-ui/react";
3
+ import { Item } from "../types";
4
+ import { AutoCompleteItemProps } from "../autocomplete-item";
5
+ export declare const getDefItemValue: (item: AutoCompleteItemProps["value"]) => any;
6
+ export declare const setEmphasis: (children: any, query: string) => any;
7
+ export declare const getItemList: (children: ReactNode) => Item[];
8
+ export declare const getFocusedStyles: () => FlexProps;
9
+ export declare const defaultFilterMethod: (query: string, itemValue: Item["value"], itemLabel: Item["label"]) => boolean;
@@ -1,2 +1,2 @@
1
- import React from "react";
2
- export declare const siblingInfo: (children: React.ReactNode) => readonly [(string | number | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactFragment | React.ReactPortal)[], (string | number | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactFragment | React.ReactPortal)[]];
1
+ import React from "react";
2
+ export declare const siblingInfo: (children: React.ReactNode) => readonly [(string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment | React.ReactPortal)[], (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment | React.ReactPortal)[]];
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- export * from "./autocomplete";
2
- export * from "./autocomplete-context";
3
- export * from "./autocomplete-creatable";
4
- export * from "./autocomplete-group";
5
- export * from "./autocomplete-input";
6
- export * from "./autocomplete-item";
7
- export * from "./autocomplete-list";
8
- export * from "./autocomplete-tag";
9
- export * from "./use-autocomplete";
10
- export * from "./types";
1
+ export * from "./autocomplete";
2
+ export * from "./autocomplete-context";
3
+ export * from "./autocomplete-creatable";
4
+ export * from "./autocomplete-group";
5
+ export * from "./autocomplete-input";
6
+ export * from "./autocomplete-item";
7
+ export * from "./autocomplete-list";
8
+ export * from "./autocomplete-tag";
9
+ export * from "./use-autocomplete";
10
+ export * from "./types";