@choc-ui/chakra-autocomplete 5.3.1 → 5.4.1
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 +0 -10
- package/dist/autocomplete-context.d.ts +3 -3
- package/dist/autocomplete-creatable.d.ts +3 -2
- package/dist/autocomplete-group.d.ts +5 -4
- package/dist/autocomplete-group.d.ts.map +1 -1
- package/dist/autocomplete-input.d.ts +6 -5
- package/dist/autocomplete-input.d.ts.map +1 -1
- package/dist/autocomplete-item.d.ts +3 -2
- package/dist/autocomplete-item.d.ts.map +1 -1
- package/dist/autocomplete-list.d.ts +4 -3
- package/dist/autocomplete-list.d.ts.map +1 -1
- package/dist/autocomplete-tag.d.ts +3 -2
- package/dist/autocomplete.d.ts +5 -4
- package/dist/autocomplete.d.ts.map +1 -1
- package/dist/components/empty-state.d.ts +2 -1
- package/dist/helpers/group.d.ts +2 -1
- package/dist/helpers/items.d.ts +5 -4
- package/dist/helpers/list.d.ts +2 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.es.js +1510 -1504
- package/dist/index.js +18 -15
- package/dist/types.d.ts +8 -7
- package/dist/use-autocomplete.d.ts +3 -2
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -34,16 +34,6 @@
|
|
|
34
34
|
AutoComplete Component for the <a href="https://chakra-ui.com">Chakra UI</a> Library.</em>
|
|
35
35
|
|
|
36
36
|
</sup>
|
|
37
|
-
<br />
|
|
38
|
-
<br />
|
|
39
|
-
<br />
|
|
40
|
-
<br />
|
|
41
|
-
<pre>npm i <a href="https://www.npmjs.com/package/@choc-ui/chakra-autocomplete">@choc-ui/chakra-autocomplete</a></pre>
|
|
42
|
-
<br />
|
|
43
|
-
<br />
|
|
44
|
-
<br />
|
|
45
|
-
<br />
|
|
46
|
-
<br />
|
|
47
37
|
</div>
|
|
48
38
|
|
|
49
39
|
## Install
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare const AutoCompleteProvider: import(
|
|
1
|
+
import { UseAutoCompleteReturn } from './types';
|
|
2
|
+
|
|
3
|
+
export declare const AutoCompleteProvider: import('react').Provider<UseAutoCompleteReturn>, useAutoCompleteContext: () => UseAutoCompleteReturn;
|
|
4
4
|
//# sourceMappingURL=autocomplete-context.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FlexProps } from
|
|
2
|
-
import { MaybeRenderProp } from
|
|
1
|
+
import { FlexProps } from '@chakra-ui/react';
|
|
2
|
+
import { MaybeRenderProp } from '@chakra-ui/react-utils';
|
|
3
|
+
|
|
3
4
|
interface AutoCompleteCreatableProps extends Omit<FlexProps, "children"> {
|
|
4
5
|
children?: MaybeRenderProp<{
|
|
5
6
|
value: any;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { BoxProps, FlexProps } from
|
|
2
|
-
import React from
|
|
1
|
+
import { BoxProps, FlexProps } from '@chakra-ui/react';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
3
4
|
export interface AutoCompleteGroupProps extends BoxProps {
|
|
4
5
|
children?: React.ReactNode;
|
|
5
6
|
showDivider?: boolean;
|
|
6
7
|
dividerColor?: string;
|
|
7
8
|
}
|
|
8
|
-
export declare const AutoCompleteGroup: import(
|
|
9
|
-
export declare const AutoCompleteGroupTitle: import(
|
|
9
|
+
export declare const AutoCompleteGroup: import('@chakra-ui/react').ComponentWithAs<"div", AutoCompleteGroupProps>;
|
|
10
|
+
export declare const AutoCompleteGroupTitle: import('@chakra-ui/react').ComponentWithAs<"div", FlexProps>;
|
|
10
11
|
//# sourceMappingURL=autocomplete-group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete-group.d.ts","sourceRoot":"","sources":["../src/autocomplete-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAIR,SAAS,EAEV,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,sBAAuB,SAAQ,QAAQ;IACtD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"autocomplete-group.d.ts","sourceRoot":"","sources":["../src/autocomplete-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAIR,SAAS,EAEV,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,sBAAuB,SAAQ,QAAQ;IACtD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,iBAAiB,2EAmB7B,CAAC;AAEF,eAAO,MAAM,sBAAsB,8DAIlC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { InputProps, SystemStyleObject } from
|
|
2
|
-
import { MaybeRenderProp } from
|
|
3
|
-
import React from
|
|
4
|
-
import { UseAutoCompleteReturn } from
|
|
1
|
+
import { InputProps, SystemStyleObject } from '@chakra-ui/react';
|
|
2
|
+
import { MaybeRenderProp } from '@chakra-ui/react-utils';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
import { UseAutoCompleteReturn } from './types';
|
|
5
|
+
|
|
5
6
|
export interface AutoCompleteInputProps extends Omit<InputProps, "children"> {
|
|
6
7
|
children?: MaybeRenderProp<{
|
|
7
8
|
tags: UseAutoCompleteReturn["tags"];
|
|
@@ -10,5 +11,5 @@ export interface AutoCompleteInputProps extends Omit<InputProps, "children"> {
|
|
|
10
11
|
hidePlaceholder?: boolean;
|
|
11
12
|
loadingIcon?: React.ReactNode;
|
|
12
13
|
}
|
|
13
|
-
export declare const AutoCompleteInput: import(
|
|
14
|
+
export declare const AutoCompleteInput: import('@chakra-ui/react').ComponentWithAs<"input", AutoCompleteInputProps>;
|
|
14
15
|
//# sourceMappingURL=autocomplete-input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete-input.d.ts","sourceRoot":"","sources":["../src/autocomplete-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EAIV,iBAAiB,EAMlB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAoB,MAAM,OAAO,CAAC;AAGzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;IAC1E,QAAQ,CAAC,EAAE,eAAe,CAAC;QAAE,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC,CAAC;IACpE,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC9B;AAgBD,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"autocomplete-input.d.ts","sourceRoot":"","sources":["../src/autocomplete-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EAIV,iBAAiB,EAMlB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAoB,MAAM,OAAO,CAAC;AAGzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;IAC1E,QAAQ,CAAC,EAAE,eAAe,CAAC;QAAE,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC,CAAC;IACpE,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC9B;AAgBD,eAAO,MAAM,iBAAiB,6EAqE7B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { SystemStyleObject, FlexProps } from
|
|
1
|
+
import { SystemStyleObject, FlexProps } from '@chakra-ui/react';
|
|
2
|
+
|
|
2
3
|
export interface AutoCompleteItemProps extends FlexProps {
|
|
3
4
|
value: any;
|
|
4
5
|
label?: string;
|
|
@@ -8,6 +9,6 @@ export interface AutoCompleteItemProps extends FlexProps {
|
|
|
8
9
|
_fixed?: SystemStyleObject;
|
|
9
10
|
getValue?: (item: AutoCompleteItemProps["value"]) => any;
|
|
10
11
|
}
|
|
11
|
-
export declare const AutoCompleteItem: import(
|
|
12
|
+
export declare const AutoCompleteItem: import('@chakra-ui/react').ComponentWithAs<"div", AutoCompleteItemProps>;
|
|
12
13
|
export declare const baseItemStyles: FlexProps;
|
|
13
14
|
//# sourceMappingURL=autocomplete-item.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete-item.d.ts","sourceRoot":"","sources":["../src/autocomplete-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAEjB,SAAS,EAGV,MAAM,kBAAkB,CAAC;AAM1B,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD,KAAK,EAAE,GAAG,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,iBAAiB,GAAG,GAAG,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC;CAC1D;AAED,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"autocomplete-item.d.ts","sourceRoot":"","sources":["../src/autocomplete-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAEjB,SAAS,EAGV,MAAM,kBAAkB,CAAC;AAM1B,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD,KAAK,EAAE,GAAG,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,iBAAiB,GAAG,GAAG,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC;CAC1D;AAED,eAAO,MAAM,gBAAgB,0EA6C5B,CAAC;AAIF,eAAO,MAAM,cAAc,EAAE,SAM5B,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { PopoverContentProps } from
|
|
2
|
-
import React from
|
|
1
|
+
import { PopoverContentProps } from '@chakra-ui/react';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
3
4
|
export interface AutoCompleteListProps extends PopoverContentProps {
|
|
4
5
|
loadingState?: React.ReactNode;
|
|
5
6
|
}
|
|
6
|
-
export declare const AutoCompleteList: import(
|
|
7
|
+
export declare const AutoCompleteList: import('@chakra-ui/react').ComponentWithAs<"div", AutoCompleteListProps>;
|
|
7
8
|
//# sourceMappingURL=autocomplete-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete-list.d.ts","sourceRoot":"","sources":["../src/autocomplete-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,mBAAmB,EAGpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC/B;AAED,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"autocomplete-list.d.ts","sourceRoot":"","sources":["../src/autocomplete-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,mBAAmB,EAGpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC/B;AAED,eAAO,MAAM,gBAAgB,0EAwB5B,CAAC"}
|
package/dist/autocomplete.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { MaybeRenderProp } from
|
|
3
|
-
import { AutoCompleteRefMethods, UseAutoCompleteProps } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MaybeRenderProp } from '@chakra-ui/react-utils';
|
|
3
|
+
import { AutoCompleteRefMethods, UseAutoCompleteProps } from './types';
|
|
4
|
+
|
|
4
5
|
export type AutoCompleteChildProps = {
|
|
5
6
|
isOpen: boolean;
|
|
6
7
|
onClose: () => void;
|
|
@@ -10,5 +11,5 @@ export interface AutoCompleteProps extends UseAutoCompleteProps {
|
|
|
10
11
|
children: MaybeRenderProp<AutoCompleteChildProps>;
|
|
11
12
|
ref?: React.RefObject<AutoCompleteRefMethods>;
|
|
12
13
|
}
|
|
13
|
-
export declare const AutoComplete: import(
|
|
14
|
+
export declare const AutoComplete: import('@chakra-ui/react').ComponentWithAs<"div", AutoCompleteProps>;
|
|
14
15
|
//# sourceMappingURL=autocomplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../src/autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAKzD,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEvE,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AACF,MAAM,WAAW,iBAAkB,SAAQ,oBAAoB;IAC7D,QAAQ,EAAE,eAAe,CAAC,sBAAsB,CAAC,CAAC;IAClD,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAAC;CAC/C;AAED,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../src/autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAKzD,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEvE,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AACF,MAAM,WAAW,iBAAkB,SAAQ,oBAAoB;IAC7D,QAAQ,EAAE,eAAe,CAAC,sBAAsB,CAAC,CAAC;IAClD,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAAC;CAC/C;AAED,eAAO,MAAM,YAAY,sEAwCxB,CAAC"}
|
package/dist/helpers/group.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
2
3
|
export declare const hasFirstItem: (children: ReactNode, firstItem: any) => any;
|
|
3
4
|
export declare const hasLastItem: (children: ReactNode, lastItem: any) => any;
|
|
4
5
|
export declare const hasChildren: (children: any, filteredList: any[]) => boolean;
|
package/dist/helpers/items.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { FlexProps } from
|
|
3
|
-
import { Item } from
|
|
4
|
-
import { AutoCompleteItemProps } from
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FlexProps } from '@chakra-ui/react';
|
|
3
|
+
import { Item } from '../types';
|
|
4
|
+
import { AutoCompleteItemProps } from '../autocomplete-item';
|
|
5
|
+
|
|
5
6
|
export declare const getDefItemValue: (item: AutoCompleteItemProps["value"]) => any;
|
|
6
7
|
export declare const setEmphasis: (children: any, query: string) => any;
|
|
7
8
|
export declare const getItemList: (children: ReactNode) => Item[];
|
package/dist/helpers/list.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
2
3
|
export declare const siblingInfo: (children: React.ReactNode) => readonly [(string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal)[], (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal)[]];
|
|
3
4
|
//# sourceMappingURL=list.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
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';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|