cortex-react-ui 0.1.4 → 0.1.5
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/lib/cjs/types/TagInput/{Tag.d.ts → TagItem.d.ts} +3 -2
- package/lib/cjs/types/TagInput/types.d.ts +12 -0
- package/lib/typings/typings/index.d.ts +31 -0
- package/lib/typings/typings/tagInput.d.ts +13 -0
- package/package.json +1 -1
- package/lib/cjs/types/TagInput/TagInput.d.ts +0 -9
- package/lib/cjs/types/TagInput/TagSuggestion.d.ts +0 -10
- package/lib/cjs/types/TagInput/TagSuggestionGroup.d.ts +0 -7
- package/lib/cjs/types/TagInput/TagSuggestionItem.d.ts +0 -7
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { Cortex } from './types';
|
|
2
3
|
export interface TooltipProps {
|
|
3
4
|
tag: Cortex.Tag;
|
|
4
5
|
className?: string;
|
|
5
6
|
onDelete?: () => void;
|
|
6
7
|
}
|
|
7
|
-
declare const
|
|
8
|
-
export default
|
|
8
|
+
declare const TagItem: React.FC<TooltipProps>;
|
|
9
|
+
export default TagItem;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare module '*.module.scss' {
|
|
2
|
+
const classes: { readonly [key: string]: string };
|
|
3
|
+
export default classes;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
** Mapped types
|
|
8
|
+
*/
|
|
9
|
+
type Nullable<T> = T | null;
|
|
10
|
+
type Writeable<T> = { -readonly [P in keyof T]: T[P] };
|
|
11
|
+
type DeepWriteable<T> = { -readonly [P in keyof T]: DeepWriteable<T[P]> };
|
|
12
|
+
type Required<T> = { [P in keyof T]-?: T[P] };
|
|
13
|
+
type ValuesOf<T extends readonly any[]> = T[number];
|
|
14
|
+
type ObjectValues<T> = T[keyof T];
|
|
15
|
+
type IndexableProperties<T> = keyof T extends string | number ? keyof T extends infer P ? P : never : never;
|
|
16
|
+
type AssertPropDefined<T, K extends keyof T = never> = {
|
|
17
|
+
[P in keyof T]: P extends K ? NonNullable<T[P]> : T[P];
|
|
18
|
+
};
|
|
19
|
+
type NonEmptyArray<T> = [T, ...T[]];
|
|
20
|
+
type ArrayType<T extends Array<any>> = T extends (infer U)[] ? U : never;
|
|
21
|
+
type NameOfProp<T, P> = P extends keyof T ? P : never;
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
** Common Types
|
|
25
|
+
*/
|
|
26
|
+
type CustomRange<S = any, E = any> = { start: S, end: E };
|
|
27
|
+
|
|
28
|
+
type RefLabel<T = number> = {
|
|
29
|
+
id: T;
|
|
30
|
+
label: string;
|
|
31
|
+
};
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface TooltipProps {
|
|
3
|
-
tags?: Cortex.Tag[];
|
|
4
|
-
className?: string;
|
|
5
|
-
suggestions?: Cortex.TagSuggestion[];
|
|
6
|
-
onChange?: (tags: Cortex.Tag[]) => void;
|
|
7
|
-
}
|
|
8
|
-
declare const TagInput: React.FC<TooltipProps>;
|
|
9
|
-
export default TagInput;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface TagSuggestionProps {
|
|
3
|
-
open: boolean;
|
|
4
|
-
suggestions?: Cortex.TagSuggestion[];
|
|
5
|
-
anchorEl?: React.RefObject<HTMLElement>;
|
|
6
|
-
filter?: string;
|
|
7
|
-
onSuggestionClick?: (suggestion: Cortex.TagSuggestion) => void;
|
|
8
|
-
}
|
|
9
|
-
declare const TagSuggestion: React.ForwardRefExoticComponent<TagSuggestionProps & React.RefAttributes<HTMLElement>>;
|
|
10
|
-
export default TagSuggestion;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface TagSuggestionGroupProps {
|
|
3
|
-
group: Cortex.TagSuggestion;
|
|
4
|
-
onClick?: (suggestion: Cortex.TagSuggestion, event: React.MouseEvent<HTMLDivElement>) => void;
|
|
5
|
-
}
|
|
6
|
-
declare const TagSuggestionGroup: React.FC<TagSuggestionGroupProps>;
|
|
7
|
-
export default TagSuggestionGroup;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface TagSuggestionItemProps {
|
|
3
|
-
suggestion: Cortex.TagSuggestion;
|
|
4
|
-
onClick?: (suggestion: Cortex.TagSuggestion, event: React.MouseEvent<HTMLDivElement>) => void;
|
|
5
|
-
}
|
|
6
|
-
declare const TagSuggestionItem: React.FC<TagSuggestionItemProps>;
|
|
7
|
-
export default TagSuggestionItem;
|