@tecsinapse/cortex-react 1.0.2 → 1.2.0
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/LICENSE.md +21 -0
- package/dist/cjs/components/Badge.js +27 -0
- package/dist/cjs/components/Button.js +11 -0
- package/dist/cjs/components/Card.js +19 -0
- package/dist/cjs/components/Hint.js +21 -0
- package/dist/cjs/components/Input.js +79 -0
- package/dist/cjs/components/Modal.js +25 -0
- package/dist/cjs/components/SearchInput.js +70 -0
- package/dist/cjs/components/Select.js +101 -0
- package/dist/cjs/components/Snackbar.js +18 -0
- package/dist/cjs/components/Table.js +53 -0
- package/dist/cjs/components/Tag.js +18 -0
- package/dist/cjs/components/TextArea.js +81 -0
- package/dist/cjs/components/Toggle.js +18 -0
- package/dist/cjs/hooks/useDebouncedState.js +16 -0
- package/dist/cjs/index.js +42 -0
- package/dist/esm/components/Badge.js +24 -0
- package/dist/esm/components/Button.js +9 -0
- package/dist/esm/components/Card.js +17 -0
- package/dist/esm/components/Hint.js +19 -0
- package/dist/esm/components/Input.js +72 -0
- package/dist/esm/components/Modal.js +23 -0
- package/dist/esm/components/SearchInput.js +68 -0
- package/dist/esm/components/Select.js +96 -0
- package/dist/esm/components/Snackbar.js +16 -0
- package/dist/esm/components/Table.js +44 -0
- package/dist/esm/components/Tag.js +16 -0
- package/dist/esm/components/TextArea.js +79 -0
- package/dist/esm/components/Toggle.js +16 -0
- package/dist/esm/hooks/useDebouncedState.js +14 -0
- package/dist/esm/index.js +12 -0
- package/dist/types/components/Badge.d.ts +12 -0
- package/dist/types/components/Button.d.ts +8 -0
- package/dist/types/components/Card.d.ts +6 -0
- package/dist/types/components/Hint.d.ts +14 -0
- package/dist/types/components/Input.d.ts +34 -0
- package/dist/types/components/Modal.d.ts +8 -0
- package/dist/types/components/SearchInput.d.ts +11 -0
- package/dist/types/components/Select.d.ts +28 -0
- package/dist/types/components/Snackbar.d.ts +9 -0
- package/dist/types/components/Table.d.ts +13 -0
- package/dist/types/components/Tag.d.ts +8 -0
- package/dist/types/components/TextArea.d.ts +24 -0
- package/dist/types/components/Toggle.d.ts +2 -0
- package/{src/components/index.ts → dist/types/components/index.d.ts} +1 -0
- package/dist/types/docs/badge-anchor.stories.d.ts +29 -0
- package/dist/types/docs/badge.stories.d.ts +27 -0
- package/dist/types/docs/button.stories.d.ts +30 -0
- package/dist/types/docs/card.stories.d.ts +10 -0
- package/dist/types/docs/hint.stories.d.ts +27 -0
- package/dist/types/docs/input-custom.stories.d.ts +33 -0
- package/dist/types/docs/input.stories.d.ts +33 -0
- package/dist/types/docs/modal.stories.d.ts +10 -0
- package/dist/types/docs/select-grouped.stories.d.ts +32 -0
- package/dist/types/docs/select.stories.d.ts +32 -0
- package/dist/types/docs/snackbar.stories.d.ts +21 -0
- package/dist/types/docs/table.stories.d.ts +10 -0
- package/dist/types/docs/tag.stories.d.ts +21 -0
- package/dist/types/docs/text-area.stories.d.ts +39 -0
- package/dist/types/docs/toggle.stories.d.ts +10 -0
- package/dist/types/docs/utils.d.ts +1 -0
- package/dist/types/hooks/useDebouncedState.d.ts +2 -0
- package/package.json +19 -14
- package/src/components/Badge.tsx +0 -45
- package/src/components/Button.tsx +0 -19
- package/src/components/Card.tsx +0 -18
- package/src/components/Hint.tsx +0 -31
- package/src/components/Input.tsx +0 -110
- package/src/components/Modal.tsx +0 -24
- package/src/components/SearchInput.tsx +0 -86
- package/src/components/Select.tsx +0 -170
- package/src/components/Snackbar.tsx +0 -26
- package/src/components/Tag.tsx +0 -19
- package/src/components/TextArea.tsx +0 -121
- package/src/components/Toggle.tsx +0 -25
- package/src/docs/badge-anchor.stories.tsx +0 -42
- package/src/docs/badge.stories.tsx +0 -31
- package/src/docs/button.stories.tsx +0 -37
- package/src/docs/card.stories.tsx +0 -29
- package/src/docs/hint.stories.tsx +0 -32
- package/src/docs/input-custom.stories.tsx +0 -45
- package/src/docs/input.stories.tsx +0 -40
- package/src/docs/modal.stories.tsx +0 -48
- package/src/docs/select-grouped.stories.tsx +0 -79
- package/src/docs/select.stories.tsx +0 -70
- package/src/docs/snackbar.stories.tsx +0 -31
- package/src/docs/tag.stories.tsx +0 -37
- package/src/docs/text-area.stories.tsx +0 -50
- package/src/docs/toggle.stories.tsx +0 -18
- package/src/docs/utils.ts +0 -8
- package/src/hooks/useDebouncedState.ts +0 -24
- /package/{src/hooks/index.ts → dist/types/hooks/index.d.ts} +0 -0
- /package/{src/index.ts → dist/types/index.d.ts} +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TagVariants } from '@tecsinapse/cortex-core';
|
|
3
|
+
interface TagProps {
|
|
4
|
+
variants?: TagVariants;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const Tag: React.ForwardRefExoticComponent<Omit<TagProps & React.HTMLProps<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputBaseVariants } from '@tecsinapse/cortex-core';
|
|
3
|
+
interface TextAreaPropsBase {
|
|
4
|
+
variants?: InputBaseVariants;
|
|
5
|
+
label?: string;
|
|
6
|
+
rows?: number;
|
|
7
|
+
}
|
|
8
|
+
interface TextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, TextAreaPropsBase {
|
|
9
|
+
}
|
|
10
|
+
type DivBaseProps = React.HTMLAttributes<HTMLDivElement>;
|
|
11
|
+
export declare const TextArea: {
|
|
12
|
+
Root: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
13
|
+
Face: React.ForwardRefExoticComponent<DivBaseProps & Pick<TextAreaPropsBase, "variants"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Box: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
15
|
+
Left: React.ForwardRefExoticComponent<DivBaseProps & {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
className?: string | undefined;
|
|
18
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
Right: React.ForwardRefExoticComponent<DivBaseProps & {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
className?: string | undefined;
|
|
22
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: JSX.Element;
|
|
5
|
+
args: {
|
|
6
|
+
value: number;
|
|
7
|
+
intent: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
intent: {
|
|
11
|
+
options: string[];
|
|
12
|
+
control: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
value: {
|
|
17
|
+
control: {
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
min: number;
|
|
21
|
+
max: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
26
|
+
export declare const Base: {
|
|
27
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
28
|
+
args: {};
|
|
29
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: JSX.Element;
|
|
5
|
+
args: {
|
|
6
|
+
value: string;
|
|
7
|
+
intent: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
intent: {
|
|
11
|
+
options: string[];
|
|
12
|
+
control: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
value: {
|
|
17
|
+
control: {
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
24
|
+
export declare const Base: {
|
|
25
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
26
|
+
args: {};
|
|
27
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: JSX.Element;
|
|
5
|
+
argTypes: {
|
|
6
|
+
intent: {
|
|
7
|
+
options: string[];
|
|
8
|
+
control: {
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
variant: {
|
|
13
|
+
options: string[];
|
|
14
|
+
control: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
size: {
|
|
19
|
+
options: string[];
|
|
20
|
+
control: {
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export default _default;
|
|
27
|
+
export declare const Base: {
|
|
28
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
29
|
+
args: {};
|
|
30
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Base: {
|
|
8
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
9
|
+
args: {};
|
|
10
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: JSX.Element;
|
|
5
|
+
args: {
|
|
6
|
+
intent: string;
|
|
7
|
+
description: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
intent: {
|
|
11
|
+
options: string[];
|
|
12
|
+
control: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
description: {
|
|
17
|
+
control: {
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
24
|
+
export declare const Base: {
|
|
25
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
26
|
+
args: {};
|
|
27
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: JSX.Element;
|
|
5
|
+
args: {
|
|
6
|
+
label: string;
|
|
7
|
+
placeholder: string;
|
|
8
|
+
intent: string;
|
|
9
|
+
};
|
|
10
|
+
argTypes: {
|
|
11
|
+
intent: {
|
|
12
|
+
options: string[];
|
|
13
|
+
control: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
label: {
|
|
18
|
+
control: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
placeholder: {
|
|
23
|
+
control: {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export default _default;
|
|
30
|
+
export declare const Base: {
|
|
31
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
32
|
+
args: {};
|
|
33
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: JSX.Element;
|
|
5
|
+
args: {
|
|
6
|
+
label: string;
|
|
7
|
+
placeholder: string;
|
|
8
|
+
intent: string;
|
|
9
|
+
};
|
|
10
|
+
argTypes: {
|
|
11
|
+
intent: {
|
|
12
|
+
options: string[];
|
|
13
|
+
control: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
label: {
|
|
18
|
+
control: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
placeholder: {
|
|
23
|
+
control: {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export default _default;
|
|
30
|
+
export declare const Base: {
|
|
31
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
32
|
+
args: {};
|
|
33
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Base: {
|
|
8
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
9
|
+
args: {};
|
|
10
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: JSX.Element;
|
|
5
|
+
argTypes: {
|
|
6
|
+
variant: {
|
|
7
|
+
options: string[];
|
|
8
|
+
control: {
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
label: {
|
|
13
|
+
control: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
placeholderSearchInput: {
|
|
18
|
+
control: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
25
|
+
export declare const Base: {
|
|
26
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
27
|
+
args: {
|
|
28
|
+
variant: string;
|
|
29
|
+
label: string;
|
|
30
|
+
placeholderSearchInput: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: JSX.Element;
|
|
5
|
+
argTypes: {
|
|
6
|
+
variant: {
|
|
7
|
+
options: string[];
|
|
8
|
+
control: {
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
label: {
|
|
13
|
+
control: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
placeholderSearchInput: {
|
|
18
|
+
control: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
25
|
+
export declare const Base: {
|
|
26
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
27
|
+
args: {
|
|
28
|
+
variant: string;
|
|
29
|
+
label: string;
|
|
30
|
+
placeholderSearchInput: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: JSX.Element;
|
|
5
|
+
args: {
|
|
6
|
+
intent: string;
|
|
7
|
+
};
|
|
8
|
+
argTypes: {
|
|
9
|
+
intent: {
|
|
10
|
+
options: string[];
|
|
11
|
+
control: {
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
18
|
+
export declare const Base: {
|
|
19
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
20
|
+
args: {};
|
|
21
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Base: {
|
|
8
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
9
|
+
args: {};
|
|
10
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: JSX.Element;
|
|
5
|
+
args: {
|
|
6
|
+
intent: string;
|
|
7
|
+
};
|
|
8
|
+
argTypes: {
|
|
9
|
+
intent: {
|
|
10
|
+
options: string[];
|
|
11
|
+
control: {
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
18
|
+
export declare const Base: {
|
|
19
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
20
|
+
args: {};
|
|
21
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: JSX.Element;
|
|
5
|
+
args: {
|
|
6
|
+
rows: number;
|
|
7
|
+
intent: string;
|
|
8
|
+
label: string;
|
|
9
|
+
placeholder: string;
|
|
10
|
+
};
|
|
11
|
+
argTypes: {
|
|
12
|
+
intent: {
|
|
13
|
+
options: string[];
|
|
14
|
+
control: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
rows: {
|
|
19
|
+
control: {
|
|
20
|
+
type: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
label: {
|
|
24
|
+
control: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
placeholder: {
|
|
29
|
+
control: {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default _default;
|
|
36
|
+
export declare const Base: {
|
|
37
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
38
|
+
args: {};
|
|
39
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Base: {
|
|
8
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
|
|
9
|
+
args: {};
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const defaultIntents: string[];
|
package/package.json
CHANGED
|
@@ -1,33 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tecsinapse/cortex-react",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "React components based in @tecsinapse/cortex-core",
|
|
5
|
-
"author": "ryancarloscorrea <ryancarlos38@gmail.com>",
|
|
6
|
-
"homepage": "https://github.com/tecsinapse/design-system#readme",
|
|
7
5
|
"license": "MIT",
|
|
8
|
-
"main": "
|
|
6
|
+
"main": "dist/esm/index.js",
|
|
7
|
+
"module": "dist/esm/index.js",
|
|
8
|
+
"types": "dist/types/index.d.ts",
|
|
9
9
|
"files": [
|
|
10
|
-
"
|
|
10
|
+
"dist"
|
|
11
11
|
],
|
|
12
|
-
"repository": {
|
|
13
|
-
"type": "git",
|
|
14
|
-
"url": "git+https://github.com/tecsinapse/design-system.git"
|
|
15
|
-
},
|
|
16
12
|
"scripts": {
|
|
17
13
|
"dev": "rollup --config --watch",
|
|
18
14
|
"dev:dts": "tsc --project tsconfig.build.json --watch",
|
|
19
15
|
"build:es": "rollup --config",
|
|
20
16
|
"build:dts": "tsc --project tsconfig.build.json"
|
|
21
17
|
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@tecsinapse/cortex-core": "0.2.0",
|
|
20
|
+
"clsx": "*",
|
|
21
|
+
"react-icons": "^5.2.1"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"directory": "packages/cortex-react",
|
|
26
|
+
"url": "git+https://github.com/tecsinapse/design-system.git"
|
|
27
|
+
},
|
|
22
28
|
"bugs": {
|
|
23
29
|
"url": "https://github.com/tecsinapse/design-system/issues"
|
|
24
30
|
},
|
|
31
|
+
"homepage": "https://tecsinapse.github.io/design-system/",
|
|
25
32
|
"peerDependencies": {
|
|
33
|
+
"react": ">=18.0.0",
|
|
34
|
+
"react-dom": ">=18.0.0",
|
|
26
35
|
"tailwind": ">=3.3.0"
|
|
27
36
|
},
|
|
28
|
-
"
|
|
29
|
-
"@tecsinapse/cortex-core": "0.1.10",
|
|
30
|
-
"clsx": "*",
|
|
31
|
-
"react-icons": "^5.2.1"
|
|
32
|
-
}
|
|
37
|
+
"gitHead": "5fdf13313937b667682216c4f86b6b84fa4612a4"
|
|
33
38
|
}
|
package/src/components/Badge.tsx
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef, HTMLProps } from 'react';
|
|
2
|
-
import { badge, BadgeVariants, containerBadge } from '@tecsinapse/cortex-core';
|
|
3
|
-
|
|
4
|
-
interface BadgeProps {
|
|
5
|
-
value: string | number;
|
|
6
|
-
variants?: BadgeVariants;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface BadgeAnchorProps extends BadgeProps {
|
|
10
|
-
children: JSX.Element;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const Badge = forwardRef<
|
|
14
|
-
HTMLDivElement,
|
|
15
|
-
BadgeProps & Omit<HTMLProps<HTMLDivElement>, 'className'>
|
|
16
|
-
>((props, ref) => {
|
|
17
|
-
const { value, variants, ...rest } = props;
|
|
18
|
-
return (
|
|
19
|
-
<div
|
|
20
|
-
ref={ref}
|
|
21
|
-
className={badge({
|
|
22
|
-
className: `relative ${variants?.className}`,
|
|
23
|
-
intent: variants?.intent,
|
|
24
|
-
})}
|
|
25
|
-
{...rest}
|
|
26
|
-
>
|
|
27
|
-
{value}
|
|
28
|
-
</div>
|
|
29
|
-
);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
export const BadgeAnchor = forwardRef<
|
|
33
|
-
HTMLDivElement,
|
|
34
|
-
BadgeAnchorProps & Omit<HTMLProps<HTMLDivElement>, 'className'>
|
|
35
|
-
>((props, ref) => {
|
|
36
|
-
const { value, variants, children, ...rest } = props;
|
|
37
|
-
return (
|
|
38
|
-
<div className={containerBadge()}>
|
|
39
|
-
{children}
|
|
40
|
-
<div ref={ref} className={badge(variants)} {...rest}>
|
|
41
|
-
{value}
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
);
|
|
45
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from 'react';
|
|
2
|
-
import { button, ButtonVariants } from '@tecsinapse/cortex-core';
|
|
3
|
-
|
|
4
|
-
interface ButtonProps {
|
|
5
|
-
variants?: ButtonVariants;
|
|
6
|
-
children?: JSX.Element;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const Button = forwardRef<
|
|
10
|
-
HTMLButtonElement,
|
|
11
|
-
ButtonProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'className'>
|
|
12
|
-
>((props, ref) => {
|
|
13
|
-
const { variants, children, ...rest } = props;
|
|
14
|
-
return (
|
|
15
|
-
<button className={button(variants)} ref={ref} {...rest}>
|
|
16
|
-
{children}
|
|
17
|
-
</button>
|
|
18
|
-
);
|
|
19
|
-
});
|
package/src/components/Card.tsx
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef, HTMLProps } from 'react'
|
|
2
|
-
import { card } from '@tecsinapse/cortex-core'
|
|
3
|
-
|
|
4
|
-
interface CardProps {
|
|
5
|
-
children: JSX.Element
|
|
6
|
-
}
|
|
7
|
-
export const Card = forwardRef<HTMLDivElement, CardProps & HTMLProps<HTMLDivElement>>((props, ref) => {
|
|
8
|
-
const { children, className, ...rest } = props
|
|
9
|
-
return (
|
|
10
|
-
<div
|
|
11
|
-
className={card({ className })}
|
|
12
|
-
ref={ref}
|
|
13
|
-
{...rest}
|
|
14
|
-
>
|
|
15
|
-
{children}
|
|
16
|
-
</div>
|
|
17
|
-
)
|
|
18
|
-
})
|
package/src/components/Hint.tsx
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef, HTMLProps } from 'react'
|
|
2
|
-
import { hint, HintVariants } from '@tecsinapse/cortex-core'
|
|
3
|
-
|
|
4
|
-
interface HintProps {
|
|
5
|
-
children?: never
|
|
6
|
-
description: string
|
|
7
|
-
variants?: HintVariants
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface HintPropsWithChildrenProps {
|
|
11
|
-
children: JSX.Element
|
|
12
|
-
description?: never
|
|
13
|
-
variants?: HintVariants
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
type HintPropsUnion = HintProps | HintPropsWithChildrenProps
|
|
17
|
-
|
|
18
|
-
export const Hint = forwardRef<HTMLDivElement, HintPropsUnion & Omit<HTMLProps<HTMLDivElement>, 'className'>>(
|
|
19
|
-
(props, ref) => {
|
|
20
|
-
const { description, children, variants } = props
|
|
21
|
-
return (
|
|
22
|
-
<div
|
|
23
|
-
className={hint(variants)}
|
|
24
|
-
ref={ref}
|
|
25
|
-
>
|
|
26
|
-
{description ? <p>{description}</p> : <></>}
|
|
27
|
-
{children}
|
|
28
|
-
</div>
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
)
|