@tecsinapse/cortex-react 1.2.1 → 1.2.2-beta.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/dist/cjs/components/Avatar.js +34 -0
- package/dist/cjs/components/BaseSnackbar.js +13 -0
- package/dist/cjs/components/BreadcrumbItem.js +27 -0
- package/dist/cjs/components/Breadcrumbs.js +22 -0
- package/dist/cjs/components/Card.js +2 -10
- package/dist/cjs/components/DefaultSnack.js +27 -0
- package/dist/cjs/components/Drawer.js +32 -0
- package/dist/cjs/components/GroupButton.js +42 -0
- package/dist/cjs/components/Input.js +5 -3
- package/dist/cjs/components/Modal.js +6 -13
- package/dist/cjs/components/ProgressBar.js +70 -0
- package/dist/cjs/components/SearchInput.js +9 -3
- package/dist/cjs/components/Select.js +4 -4
- package/dist/cjs/components/Skeleton.js +22 -0
- package/dist/cjs/components/Table.js +11 -13
- package/dist/cjs/components/Toggle.js +17 -9
- package/dist/cjs/components/utils.js +12 -0
- package/dist/cjs/index.js +21 -3
- package/dist/cjs/service/SnackbarSonner.js +48 -0
- package/dist/cjs/styles/groupButton.js +16 -0
- package/dist/cjs/styles/progressBar.js +21 -0
- package/dist/esm/components/Avatar.js +32 -0
- package/dist/esm/components/BaseSnackbar.js +11 -0
- package/dist/esm/components/BreadcrumbItem.js +25 -0
- package/dist/esm/components/Breadcrumbs.js +20 -0
- package/dist/esm/components/Card.js +2 -10
- package/dist/esm/components/DefaultSnack.js +25 -0
- package/dist/esm/components/Drawer.js +30 -0
- package/dist/esm/components/GroupButton.js +40 -0
- package/dist/esm/components/Input.js +5 -3
- package/dist/esm/components/Modal.js +6 -13
- package/dist/esm/components/ProgressBar.js +68 -0
- package/dist/esm/components/SearchInput.js +9 -3
- package/dist/esm/components/Select.js +4 -4
- package/dist/esm/components/Skeleton.js +20 -0
- package/dist/esm/components/Table.js +12 -14
- package/dist/esm/components/Toggle.js +17 -9
- package/dist/esm/components/utils.js +10 -0
- package/dist/esm/index.js +11 -2
- package/dist/esm/service/SnackbarSonner.js +46 -0
- package/dist/esm/styles/groupButton.js +14 -0
- package/dist/esm/styles/progressBar.js +19 -0
- package/dist/types/components/Avatar.d.ts +7 -0
- package/dist/types/components/BaseSnackbar.d.ts +9 -0
- package/dist/types/components/BreadcrumbItem.d.ts +5 -0
- package/dist/types/components/Breadcrumbs.d.ts +10 -0
- package/dist/types/components/Card.d.ts +1 -1
- package/dist/types/components/DefaultSnack.d.ts +6 -0
- package/dist/types/components/Drawer.d.ts +9 -0
- package/dist/types/components/GroupButton.d.ts +19 -0
- package/dist/types/components/Input.d.ts +1 -1
- package/dist/types/components/Modal.d.ts +2 -2
- package/dist/types/components/ProgressBar.d.ts +9 -0
- package/dist/types/components/SearchInput.d.ts +0 -1
- package/dist/types/components/Select.d.ts +0 -1
- package/dist/types/components/Skeleton.d.ts +4 -0
- package/dist/types/components/Table.d.ts +1 -1
- package/dist/types/components/index.d.ts +8 -1
- package/dist/types/components/utils.d.ts +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/provider/SnackbarProvider.d.ts +10 -0
- package/dist/types/service/ISnackbar.d.ts +7 -0
- package/dist/types/service/SnackbarSonner.d.ts +7 -0
- package/dist/types/service/index.d.ts +2 -0
- package/dist/types/styles/groupButton.d.ts +77 -0
- package/dist/types/styles/index.d.ts +2 -0
- package/dist/types/styles/progressBar.d.ts +78 -0
- package/dist/types/tests/Avatar.test.d.ts +1 -0
- package/dist/types/tests/Badge.test.d.ts +1 -0
- package/dist/types/tests/BreadcrumbItem.test.d.ts +1 -0
- package/dist/types/tests/Breadcrumbs.test.d.ts +1 -0
- package/dist/types/tests/Card.test.d.ts +1 -0
- package/dist/types/tests/DefaultSnack.test.d.ts +1 -0
- package/dist/types/tests/Drawer.test.d.ts +1 -0
- package/dist/types/tests/GroupButton.test.d.ts +1 -0
- package/dist/types/tests/Hint.test.d.ts +1 -0
- package/dist/types/tests/Input.test.d.ts +1 -0
- package/dist/types/tests/Modal.test.d.ts +1 -0
- package/dist/types/tests/ProgressBar.test.d.ts +1 -0
- package/dist/types/tests/SearchInput.test.d.ts +1 -0
- package/dist/types/tests/Select.test.d.ts +1 -0
- package/dist/types/tests/Skeleton.test.d.ts +1 -0
- package/dist/types/tests/Snackbar.test.d.ts +1 -0
- package/dist/types/tests/Table.test.d.ts +1 -0
- package/dist/types/tests/Tag.test.d.ts +1 -0
- package/dist/types/tests/Toggle.test.d.ts +1 -0
- package/dist/types/tests/useDebouncedState.test.d.ts +1 -0
- package/dist/types/tests/utils.test.d.ts +1 -0
- package/package.json +8 -5
- package/dist/cjs/components/Snackbar.js +0 -18
- package/dist/esm/components/Snackbar.js +0 -16
- package/dist/types/components/Snackbar.d.ts +0 -9
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
|
|
3
|
+
const progressBarFilled = tv({
|
|
4
|
+
base: "h-full first:rounded-l-pill last:rounded-r-pill",
|
|
5
|
+
variants: {
|
|
6
|
+
intentProgress: {
|
|
7
|
+
default: "bg-primary-medium",
|
|
8
|
+
error: "bg-error-medium",
|
|
9
|
+
info: "bg-info-medium",
|
|
10
|
+
warning: "bg-warning-medium",
|
|
11
|
+
success: "bg-success-medium"
|
|
12
|
+
},
|
|
13
|
+
showAnimation: {
|
|
14
|
+
true: "transition-[width] duration-1000 ease-linear"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export { progressBarFilled };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { SnackbarVariants } from '@tecsinapse/cortex-core';
|
|
3
|
+
interface SnackbarProps {
|
|
4
|
+
variants?: SnackbarVariants;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
show: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const BaseSnackbar: React.ForwardRefExoticComponent<SnackbarProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { ElementType } from 'react';
|
|
2
|
+
export interface BreadcrumbType {
|
|
3
|
+
title: string;
|
|
4
|
+
Component: ElementType;
|
|
5
|
+
componentProps?: any;
|
|
6
|
+
}
|
|
7
|
+
export interface BreadcrumbsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
breadcrumbs: BreadcrumbType[];
|
|
9
|
+
}
|
|
10
|
+
export declare const Breadcrumbs: (props: BreadcrumbsProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface CardProps {
|
|
3
|
-
children
|
|
3
|
+
children?: React.ReactNode;
|
|
4
4
|
}
|
|
5
5
|
export declare const Card: React.ForwardRefExoticComponent<Omit<CardProps & React.HTMLProps<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface DrawerProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
position?: 'left' | 'right';
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const Drawer: ({ children, onClose, open, position, }: DrawerProps) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface GroupButtonValue<T> {
|
|
3
|
+
value: T;
|
|
4
|
+
}
|
|
5
|
+
export interface GroupButtonProps<T> {
|
|
6
|
+
value: T;
|
|
7
|
+
options: GroupButtonValue<T>[];
|
|
8
|
+
renderKey: (option?: T) => string | number;
|
|
9
|
+
renderOption: (option: T) => ReactNode;
|
|
10
|
+
onChange: (option: T) => void;
|
|
11
|
+
customStyles?: {
|
|
12
|
+
active?: string;
|
|
13
|
+
firstButton?: string;
|
|
14
|
+
lastButton?: string;
|
|
15
|
+
inactive?: string;
|
|
16
|
+
};
|
|
17
|
+
disableAllOptions?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const GroupButton: <T>(props: GroupButtonProps<T>) => JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
interface ModalProps {
|
|
3
3
|
open: boolean;
|
|
4
4
|
onClose: () => void;
|
|
5
|
-
children
|
|
5
|
+
children?: ReactNode;
|
|
6
6
|
}
|
|
7
7
|
export declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ProgressBarProps {
|
|
2
|
+
segments?: number;
|
|
3
|
+
valueMin?: number;
|
|
4
|
+
valueMax?: number;
|
|
5
|
+
valueCurrent: number;
|
|
6
|
+
intentProgress?: 'default' | 'success' | 'warning' | 'info' | 'error';
|
|
7
|
+
animated?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const ProgressBar: ({ segments: _segments, valueMin, valueMax, valueCurrent, intentProgress, animated, }: ProgressBarProps) => JSX.Element;
|
|
@@ -5,9 +5,9 @@ interface TableCommon {
|
|
|
5
5
|
export declare const THead: ({ children, className, ...rest }: TableCommon & HTMLAttributes<HTMLTableSectionElement>) => JSX.Element;
|
|
6
6
|
export declare const TRow: ({ children, className, ...rest }: TableCommon & React.HTMLAttributes<HTMLTableRowElement>) => JSX.Element;
|
|
7
7
|
export declare const THeadCell: ({ children, className, ...rest }: TableCommon & ThHTMLAttributes<HTMLTableCellElement>) => JSX.Element;
|
|
8
|
+
export declare const TRowHeader: ({ children, }: TableCommon & ThHTMLAttributes<HTMLTableCellElement>) => JSX.Element;
|
|
8
9
|
export declare const TCell: ({ children, className, ...rest }: TableCommon & TdHTMLAttributes<HTMLTableCellElement>) => JSX.Element;
|
|
9
10
|
export declare const TFoot: ({ children, className, ...rest }: TableCommon & HTMLAttributes<HTMLTableSectionElement>) => JSX.Element;
|
|
10
11
|
export declare const Table: ({ children, className, ...rest }: TableCommon & TableHTMLAttributes<HTMLTableElement>) => JSX.Element;
|
|
11
|
-
export declare const Hr: ({ children, className, ...rest }: TableCommon & HTMLAttributes<HTMLHRElement>) => JSX.Element;
|
|
12
12
|
export declare const Td: ({ children, ...rest }: TableCommon & TdHTMLAttributes<HTMLTableCellElement>) => JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -5,8 +5,15 @@ export * from './Hint';
|
|
|
5
5
|
export * from './Input';
|
|
6
6
|
export * from './Modal';
|
|
7
7
|
export { default as Select } from './Select';
|
|
8
|
-
export * from './
|
|
8
|
+
export * from './BaseSnackbar';
|
|
9
9
|
export * from './Tag';
|
|
10
10
|
export * from './Toggle';
|
|
11
11
|
export * from './TextArea';
|
|
12
12
|
export * from './Table';
|
|
13
|
+
export * from './Drawer';
|
|
14
|
+
export * from './Breadcrumbs';
|
|
15
|
+
export * from './Avatar';
|
|
16
|
+
export * from './Skeleton';
|
|
17
|
+
export * from './ProgressBar';
|
|
18
|
+
export * from './GroupButton';
|
|
19
|
+
export * from './DefaultSnack';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getNameInitials: (name: string) => string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SnackbarSonner } from '../service';
|
|
3
|
+
interface SnackbarProviderProps {
|
|
4
|
+
snackbar: SnackbarSonner;
|
|
5
|
+
}
|
|
6
|
+
export declare const SnackbarProvider: ({ children }: {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
export declare const useSnackbar: () => SnackbarProviderProps;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { SnackbarVariants } from '@tecsinapse/cortex-core';
|
|
3
|
+
export type TypeSnack = SnackbarVariants['intent'];
|
|
4
|
+
export interface ISnackbar<T> {
|
|
5
|
+
show(type: TypeSnack, message: string, options?: T): any;
|
|
6
|
+
custom(component: ReactElement, options?: T): any;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ExternalToast } from 'sonner';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ISnackbar, TypeSnack } from './ISnackbar';
|
|
4
|
+
export declare class SnackbarSonner implements ISnackbar<ExternalToast> {
|
|
5
|
+
custom(Component: React.ReactElement, options?: ExternalToast): string | number;
|
|
6
|
+
show(type: TypeSnack, message: string, options?: Omit<ExternalToast, 'className' | 'style'>): string | number;
|
|
7
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export declare const groupButton: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
[key: string]: {
|
|
3
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
4
|
+
button?: import("tailwind-merge").ClassNameValue;
|
|
5
|
+
inactive?: import("tailwind-merge").ClassNameValue;
|
|
6
|
+
firstButton?: import("tailwind-merge").ClassNameValue;
|
|
7
|
+
lastButton?: import("tailwind-merge").ClassNameValue;
|
|
8
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
9
|
+
active?: import("tailwind-merge").ClassNameValue;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
} | {
|
|
13
|
+
[x: string]: {
|
|
14
|
+
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
15
|
+
button?: import("tailwind-merge").ClassNameValue;
|
|
16
|
+
inactive?: import("tailwind-merge").ClassNameValue;
|
|
17
|
+
firstButton?: import("tailwind-merge").ClassNameValue;
|
|
18
|
+
lastButton?: import("tailwind-merge").ClassNameValue;
|
|
19
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
20
|
+
active?: import("tailwind-merge").ClassNameValue;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
} | {}, {
|
|
24
|
+
button: string;
|
|
25
|
+
inactive: string;
|
|
26
|
+
firstButton: string;
|
|
27
|
+
lastButton: string;
|
|
28
|
+
container: string;
|
|
29
|
+
active: string;
|
|
30
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
31
|
+
[key: string]: {
|
|
32
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
33
|
+
button?: import("tailwind-merge").ClassNameValue;
|
|
34
|
+
inactive?: import("tailwind-merge").ClassNameValue;
|
|
35
|
+
firstButton?: import("tailwind-merge").ClassNameValue;
|
|
36
|
+
lastButton?: import("tailwind-merge").ClassNameValue;
|
|
37
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
38
|
+
active?: import("tailwind-merge").ClassNameValue;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
} | {}>, {
|
|
42
|
+
[key: string]: {
|
|
43
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
44
|
+
button?: import("tailwind-merge").ClassNameValue;
|
|
45
|
+
inactive?: import("tailwind-merge").ClassNameValue;
|
|
46
|
+
firstButton?: import("tailwind-merge").ClassNameValue;
|
|
47
|
+
lastButton?: import("tailwind-merge").ClassNameValue;
|
|
48
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
49
|
+
active?: import("tailwind-merge").ClassNameValue;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
} | {}, {
|
|
53
|
+
button: string;
|
|
54
|
+
inactive: string;
|
|
55
|
+
firstButton: string;
|
|
56
|
+
lastButton: string;
|
|
57
|
+
container: string;
|
|
58
|
+
active: string;
|
|
59
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
60
|
+
button: string;
|
|
61
|
+
inactive: string;
|
|
62
|
+
firstButton: string;
|
|
63
|
+
lastButton: string;
|
|
64
|
+
container: string;
|
|
65
|
+
active: string;
|
|
66
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
67
|
+
[key: string]: {
|
|
68
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
69
|
+
button?: import("tailwind-merge").ClassNameValue;
|
|
70
|
+
inactive?: import("tailwind-merge").ClassNameValue;
|
|
71
|
+
firstButton?: import("tailwind-merge").ClassNameValue;
|
|
72
|
+
lastButton?: import("tailwind-merge").ClassNameValue;
|
|
73
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
74
|
+
active?: import("tailwind-merge").ClassNameValue;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export declare const progressBarFilled: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
intentProgress: {
|
|
3
|
+
default: string;
|
|
4
|
+
error: string;
|
|
5
|
+
info: string;
|
|
6
|
+
warning: string;
|
|
7
|
+
success: string;
|
|
8
|
+
};
|
|
9
|
+
showAnimation: {
|
|
10
|
+
true: string;
|
|
11
|
+
};
|
|
12
|
+
}, undefined, "h-full first:rounded-l-pill last:rounded-r-pill", import("tailwind-variants/dist/config").TVConfig<{
|
|
13
|
+
intentProgress: {
|
|
14
|
+
default: string;
|
|
15
|
+
error: string;
|
|
16
|
+
info: string;
|
|
17
|
+
warning: string;
|
|
18
|
+
success: string;
|
|
19
|
+
};
|
|
20
|
+
showAnimation: {
|
|
21
|
+
true: string;
|
|
22
|
+
};
|
|
23
|
+
}, {
|
|
24
|
+
intentProgress: {
|
|
25
|
+
default: string;
|
|
26
|
+
error: string;
|
|
27
|
+
info: string;
|
|
28
|
+
warning: string;
|
|
29
|
+
success: string;
|
|
30
|
+
};
|
|
31
|
+
showAnimation: {
|
|
32
|
+
true: string;
|
|
33
|
+
};
|
|
34
|
+
}>, {
|
|
35
|
+
intentProgress: {
|
|
36
|
+
default: string;
|
|
37
|
+
error: string;
|
|
38
|
+
info: string;
|
|
39
|
+
warning: string;
|
|
40
|
+
success: string;
|
|
41
|
+
};
|
|
42
|
+
showAnimation: {
|
|
43
|
+
true: string;
|
|
44
|
+
};
|
|
45
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
46
|
+
intentProgress: {
|
|
47
|
+
default: string;
|
|
48
|
+
error: string;
|
|
49
|
+
info: string;
|
|
50
|
+
warning: string;
|
|
51
|
+
success: string;
|
|
52
|
+
};
|
|
53
|
+
showAnimation: {
|
|
54
|
+
true: string;
|
|
55
|
+
};
|
|
56
|
+
}, undefined, "h-full first:rounded-l-pill last:rounded-r-pill", import("tailwind-variants/dist/config").TVConfig<{
|
|
57
|
+
intentProgress: {
|
|
58
|
+
default: string;
|
|
59
|
+
error: string;
|
|
60
|
+
info: string;
|
|
61
|
+
warning: string;
|
|
62
|
+
success: string;
|
|
63
|
+
};
|
|
64
|
+
showAnimation: {
|
|
65
|
+
true: string;
|
|
66
|
+
};
|
|
67
|
+
}, {
|
|
68
|
+
intentProgress: {
|
|
69
|
+
default: string;
|
|
70
|
+
error: string;
|
|
71
|
+
info: string;
|
|
72
|
+
warning: string;
|
|
73
|
+
success: string;
|
|
74
|
+
};
|
|
75
|
+
showAnimation: {
|
|
76
|
+
true: string;
|
|
77
|
+
};
|
|
78
|
+
}>, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tecsinapse/cortex-react",
|
|
3
|
-
"version": "1.2.1",
|
|
3
|
+
"version": "1.2.2-beta.1",
|
|
4
4
|
"description": "React components based in @tecsinapse/cortex-core",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -13,12 +13,15 @@
|
|
|
13
13
|
"dev": "rollup --config --watch",
|
|
14
14
|
"dev:dts": "tsc --project tsconfig.build.json --watch",
|
|
15
15
|
"build:es": "rollup --config",
|
|
16
|
-
"build:dts": "tsc --project tsconfig.build.json"
|
|
16
|
+
"build:dts": "tsc --project tsconfig.build.json",
|
|
17
|
+
"test": "jest",
|
|
18
|
+
"test:watch": "jest --watch"
|
|
17
19
|
},
|
|
18
20
|
"dependencies": {
|
|
19
|
-
"@tecsinapse/cortex-core": "0.2.1",
|
|
21
|
+
"@tecsinapse/cortex-core": "0.2.2-beta.1",
|
|
20
22
|
"clsx": "*",
|
|
21
|
-
"react-icons": "^5.2.1"
|
|
23
|
+
"react-icons": "^5.2.1",
|
|
24
|
+
"sonner": "^1.5.0"
|
|
22
25
|
},
|
|
23
26
|
"repository": {
|
|
24
27
|
"type": "git",
|
|
@@ -34,5 +37,5 @@
|
|
|
34
37
|
"react-dom": ">=18.0.0",
|
|
35
38
|
"tailwind": ">=3.3.0"
|
|
36
39
|
},
|
|
37
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "81e9de94c71206e059fd761b95cbe35196099e70"
|
|
38
41
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var cortexCore = require('@tecsinapse/cortex-core');
|
|
5
|
-
|
|
6
|
-
const Snackbar = React.forwardRef((props, ref) => {
|
|
7
|
-
const { children, show, variants } = props;
|
|
8
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, show ? /* @__PURE__ */ React.createElement(
|
|
9
|
-
"div",
|
|
10
|
-
{
|
|
11
|
-
className: cortexCore.snackbar(variants),
|
|
12
|
-
ref
|
|
13
|
-
},
|
|
14
|
-
children
|
|
15
|
-
) : /* @__PURE__ */ React.createElement(React.Fragment, null));
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
exports.Snackbar = Snackbar;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from 'react';
|
|
2
|
-
import { snackbar } from '@tecsinapse/cortex-core';
|
|
3
|
-
|
|
4
|
-
const Snackbar = forwardRef((props, ref) => {
|
|
5
|
-
const { children, show, variants } = props;
|
|
6
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, show ? /* @__PURE__ */ React.createElement(
|
|
7
|
-
"div",
|
|
8
|
-
{
|
|
9
|
-
className: snackbar(variants),
|
|
10
|
-
ref
|
|
11
|
-
},
|
|
12
|
-
children
|
|
13
|
-
) : /* @__PURE__ */ React.createElement(React.Fragment, null));
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
export { Snackbar };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SnackbarVariants } from '@tecsinapse/cortex-core';
|
|
3
|
-
interface SnackbarProps {
|
|
4
|
-
variants?: SnackbarVariants;
|
|
5
|
-
children: JSX.Element;
|
|
6
|
-
show: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const Snackbar: React.ForwardRefExoticComponent<SnackbarProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
export {};
|