karsten-design-system 1.0.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/README.md +50 -0
- package/dist/assets/icons/bell.d.ts +1 -0
- package/dist/assets/icons/cart.d.ts +1 -0
- package/dist/assets/icons/check.d.ts +1 -0
- package/dist/assets/icons/circleCheck.d.ts +1 -0
- package/dist/assets/icons/clock.d.ts +1 -0
- package/dist/assets/icons/close.d.ts +1 -0
- package/dist/assets/icons/dashboard.d.ts +1 -0
- package/dist/assets/icons/error.d.ts +1 -0
- package/dist/assets/icons/filter.d.ts +5 -0
- package/dist/assets/icons/grayInfo.d.ts +1 -0
- package/dist/assets/icons/home/account.d.ts +1 -0
- package/dist/assets/icons/home/accountsReceivable.d.ts +1 -0
- package/dist/assets/icons/home/box.d.ts +1 -0
- package/dist/assets/icons/home/circleWithDollarSign.d.ts +1 -0
- package/dist/assets/icons/home/computer.d.ts +1 -0
- package/dist/assets/icons/home/credit.d.ts +1 -0
- package/dist/assets/icons/home/payments.d.ts +1 -0
- package/dist/assets/icons/home/pieChart.d.ts +1 -0
- package/dist/assets/icons/home/profitability.d.ts +1 -0
- package/dist/assets/icons/home.d.ts +1 -0
- package/dist/assets/icons/info.d.ts +1 -0
- package/dist/assets/icons/menu.d.ts +1 -0
- package/dist/assets/icons/success.d.ts +1 -0
- package/dist/assets/icons/text.d.ts +1 -0
- package/dist/assets/icons/trash.d.ts +1 -0
- package/dist/assets/logo.d.ts +1 -0
- package/dist/assets/logoSmall.d.ts +1 -0
- package/dist/hook/useToast.d.ts +5 -0
- package/dist/index.esm.js +8150 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +8170 -0
- package/dist/index.js.map +1 -0
- package/dist/mock/internalMenu.d.ts +2 -0
- package/dist/mock/mockedComponente/mockedChart.d.ts +5 -0
- package/dist/mock/mockedComponente/notificationMocked.d.ts +5 -0
- package/dist/mock/notifications.d.ts +2 -0
- package/dist/mock/tableItems.d.ts +8 -0
- package/dist/stories/components/accordion.d.ts +10 -0
- package/dist/stories/components/autoComplete.d.ts +8 -0
- package/dist/stories/components/breadcrumb.d.ts +6 -0
- package/dist/stories/components/breadcrumb.stories.d.ts +25 -0
- package/dist/stories/components/button.d.ts +17 -0
- package/dist/stories/components/button.stories.d.ts +82 -0
- package/dist/stories/components/card.d.ts +6 -0
- package/dist/stories/components/chart.d.ts +3 -0
- package/dist/stories/components/dateInput.d.ts +6 -0
- package/dist/stories/components/dialog.d.ts +9 -0
- package/dist/stories/components/divider.d.ts +2 -0
- package/dist/stories/components/filterButton.d.ts +18 -0
- package/dist/stories/components/header.d.ts +9 -0
- package/dist/stories/components/iconButton.d.ts +11 -0
- package/dist/stories/components/iconButton.stories.d.ts +44 -0
- package/dist/stories/components/icons.d.ts +1 -0
- package/dist/stories/components/infoCard.d.ts +8 -0
- package/dist/stories/components/input.d.ts +17 -0
- package/dist/stories/components/internalMenu.d.ts +6 -0
- package/dist/stories/components/link.d.ts +7 -0
- package/dist/stories/components/megaMenu.d.ts +6 -0
- package/dist/stories/components/megaMenu.stories.d.ts +25 -0
- package/dist/stories/components/notification.d.ts +16 -0
- package/dist/stories/components/notificationItem.d.ts +8 -0
- package/dist/stories/components/paginator.d.ts +2 -0
- package/dist/stories/components/radioButton.d.ts +15 -0
- package/dist/stories/components/select.d.ts +11 -0
- package/dist/stories/components/sidebar.d.ts +7 -0
- package/dist/stories/components/skeleton.d.ts +2 -0
- package/dist/stories/components/spinner.d.ts +15 -0
- package/dist/stories/components/spinner.stories.d.ts +41 -0
- package/dist/stories/components/table.d.ts +11 -0
- package/dist/stories/components/toast.d.ts +11 -0
- package/dist/stories/screens/dashboard.d.ts +2 -0
- package/dist/stories/screens/home.d.ts +1 -0
- package/dist/stories/screens/sign-in.d.ts +2 -0
- package/dist/stories/screens/table.d.ts +1 -0
- package/dist/types/breadcrumbItems.d.ts +4 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/internalMenu.d.ts +11 -0
- package/dist/types/megaMenuItems.d.ts +6 -0
- package/dist/types/notification.d.ts +7 -0
- package/dist/types/options.d.ts +4 -0
- package/dist/types/table.d.ts +10 -0
- package/dist/utils/sortData.d.ts +2 -0
- package/package.json +75 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type AccordionProps = {
|
|
3
|
+
tabsChindren: ReactNode[];
|
|
4
|
+
headers: string[];
|
|
5
|
+
multiple?: boolean;
|
|
6
|
+
activeIndex?: number | number[];
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
export default function Accordion({ tabsChindren, headers, multiple, activeIndex, className, }: AccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InputTextProps } from 'primereact/inputtext';
|
|
2
|
+
type AutoCompleteProps = {
|
|
3
|
+
items: string[];
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
error?: string;
|
|
6
|
+
} & Omit<InputTextProps, 'onChange'>;
|
|
7
|
+
export default function AutoComplete({ items, onChange, error, ...props }: AutoCompleteProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import Breadcrumb from './breadcrumb';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Breadcrumb;
|
|
6
|
+
parameters: {
|
|
7
|
+
componentSubtitle: string;
|
|
8
|
+
layout: string;
|
|
9
|
+
docs: {
|
|
10
|
+
source: {
|
|
11
|
+
language: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
tags: string[];
|
|
16
|
+
argTypes: {
|
|
17
|
+
items: {
|
|
18
|
+
control: "object";
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ButtonProps as PrimeButtonProps } from 'primereact/button';
|
|
2
|
+
declare const variants: {
|
|
3
|
+
primary: string;
|
|
4
|
+
outline: string;
|
|
5
|
+
secondary: string;
|
|
6
|
+
secondaryOutline: string;
|
|
7
|
+
gray: string;
|
|
8
|
+
grayOutline: string;
|
|
9
|
+
tab: string;
|
|
10
|
+
};
|
|
11
|
+
type ButtonProps = {
|
|
12
|
+
variant: keyof typeof variants;
|
|
13
|
+
selected?: boolean;
|
|
14
|
+
rightIcon?: string;
|
|
15
|
+
} & PrimeButtonProps;
|
|
16
|
+
export default function Button({ variant, selected, rightIcon, className, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import Button from './button';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Button;
|
|
6
|
+
parameters: {
|
|
7
|
+
componentSubtitle: string;
|
|
8
|
+
layout: string;
|
|
9
|
+
docs: {
|
|
10
|
+
source: {
|
|
11
|
+
language: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
tags: string[];
|
|
16
|
+
argTypes: {
|
|
17
|
+
variant: {
|
|
18
|
+
type: {
|
|
19
|
+
name: "string";
|
|
20
|
+
};
|
|
21
|
+
control: "select";
|
|
22
|
+
options: string[];
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
size: {
|
|
26
|
+
type: {
|
|
27
|
+
name: "string";
|
|
28
|
+
};
|
|
29
|
+
control: "select";
|
|
30
|
+
options: string[];
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
selected: {
|
|
34
|
+
control: "boolean";
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
label: {
|
|
38
|
+
control: "text";
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
onClick: {
|
|
42
|
+
action: string;
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
45
|
+
icon: {
|
|
46
|
+
control: string[];
|
|
47
|
+
description: string;
|
|
48
|
+
};
|
|
49
|
+
rightIcon: {
|
|
50
|
+
control: string[];
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
disabled: {
|
|
54
|
+
control: "boolean";
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
loading: {
|
|
58
|
+
control: "boolean";
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
className: {
|
|
62
|
+
control: string[];
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export default meta;
|
|
68
|
+
type Story = StoryObj<typeof meta>;
|
|
69
|
+
export declare const Primary: Story;
|
|
70
|
+
export declare const Outline: Story;
|
|
71
|
+
export declare const Secondary: Story;
|
|
72
|
+
export declare const SecondaryOutline: Story;
|
|
73
|
+
export declare const Gray: Story;
|
|
74
|
+
export declare const GrayOutline: Story;
|
|
75
|
+
export declare const Tab: Story;
|
|
76
|
+
export declare const Icon: Story;
|
|
77
|
+
export declare const TwoIcon: Story;
|
|
78
|
+
export declare const Small: Story;
|
|
79
|
+
export declare const Medium: Story;
|
|
80
|
+
export declare const Large: Story;
|
|
81
|
+
export declare const Disabled: Story;
|
|
82
|
+
export declare const Loading: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type DialogProps = {
|
|
2
|
+
title: string | undefined;
|
|
3
|
+
description: string | undefined;
|
|
4
|
+
labelConfirmButton: string | undefined;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
};
|
|
8
|
+
export default function Dialog({ title, description, labelConfirmButton, onClose, onClick, }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ButtonProps as PrimeButtonProps } from 'primereact/button';
|
|
2
|
+
import { Option } from '../../types';
|
|
3
|
+
declare const variants: {
|
|
4
|
+
green: {
|
|
5
|
+
text: string;
|
|
6
|
+
button: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
type FilterButtonProps = {
|
|
10
|
+
filterOptions: Option[];
|
|
11
|
+
setOption: (option: Option | null) => void;
|
|
12
|
+
option: Option | null;
|
|
13
|
+
variant: keyof typeof variants;
|
|
14
|
+
icon: React.ReactNode | string;
|
|
15
|
+
label: string;
|
|
16
|
+
} & Omit<PrimeButtonProps, 'icon'>;
|
|
17
|
+
export default function FilterButton({ filterOptions, setOption, option, variant, icon, label, ...props }: FilterButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InternalMenuItems } from '../../types/internalMenu';
|
|
2
|
+
type MenubarProps = {
|
|
3
|
+
sidebarItems: InternalMenuItems[];
|
|
4
|
+
userConfigItems: InternalMenuItems[];
|
|
5
|
+
username: string;
|
|
6
|
+
setOpenNotifications: (value: boolean) => void;
|
|
7
|
+
};
|
|
8
|
+
export default function Header({ sidebarItems, username, userConfigItems, setOpenNotifications, }: MenubarProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ButtonProps as PrimeButtonProps } from 'primereact/button';
|
|
2
|
+
declare const variants: {
|
|
3
|
+
border: string;
|
|
4
|
+
shadow: string;
|
|
5
|
+
};
|
|
6
|
+
type ButtonProps = {
|
|
7
|
+
variant: keyof typeof variants;
|
|
8
|
+
icon: string;
|
|
9
|
+
} & PrimeButtonProps;
|
|
10
|
+
export default function IconButton({ variant, icon, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import IconButton from './iconButton';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof IconButton;
|
|
6
|
+
parameters: {
|
|
7
|
+
componentSubtitle: string;
|
|
8
|
+
layout: string;
|
|
9
|
+
docs: {
|
|
10
|
+
source: {
|
|
11
|
+
language: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
tags: string[];
|
|
16
|
+
argTypes: {
|
|
17
|
+
variant: {
|
|
18
|
+
type: {
|
|
19
|
+
name: "string";
|
|
20
|
+
};
|
|
21
|
+
control: "select";
|
|
22
|
+
options: string[];
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
icon: {
|
|
26
|
+
control: string[];
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
onClick: {
|
|
30
|
+
action: string;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
disabled: {
|
|
34
|
+
control: "boolean";
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export default meta;
|
|
40
|
+
type Story = StoryObj<typeof meta>;
|
|
41
|
+
export declare const Border: Story;
|
|
42
|
+
export declare const BorderDisable: Story;
|
|
43
|
+
export declare const Shadow: Story;
|
|
44
|
+
export declare const ShadowDisable: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function IconCatalog(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { InputTextProps } from 'primereact/inputtext';
|
|
2
|
+
export type InputProps = {
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
error?: string;
|
|
7
|
+
onClickIcon?: () => void;
|
|
8
|
+
icon?: string;
|
|
9
|
+
iconColor?: keyof typeof variants;
|
|
10
|
+
label?: string;
|
|
11
|
+
} & Omit<InputTextProps, 'onChange'>;
|
|
12
|
+
declare const variants: {
|
|
13
|
+
green: string;
|
|
14
|
+
gray: string;
|
|
15
|
+
};
|
|
16
|
+
export default function Input({ onChange, placeholder, disabled, error, icon, onClickIcon, iconColor, label, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import MegaMenu from './megaMenu';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof MegaMenu;
|
|
6
|
+
parameters: {
|
|
7
|
+
componentSubtitle: string;
|
|
8
|
+
layout: string;
|
|
9
|
+
docs: {
|
|
10
|
+
source: {
|
|
11
|
+
language: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
tags: string[];
|
|
16
|
+
argTypes: {
|
|
17
|
+
items: {
|
|
18
|
+
control: "object";
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Option } from '../../types';
|
|
2
|
+
import { NotificationType } from '../../types/notification';
|
|
3
|
+
type NotificationProps = {
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onReadAll: () => void;
|
|
6
|
+
onDeleteNotificationbyId: (id: string) => void;
|
|
7
|
+
onClickNotification: (id: string) => void;
|
|
8
|
+
notifications: NotificationType[];
|
|
9
|
+
setFilter: (value: Option) => void;
|
|
10
|
+
filter: Option | null;
|
|
11
|
+
setInputValue: (value: string) => void;
|
|
12
|
+
inputValue: string;
|
|
13
|
+
filterOptions: Option[];
|
|
14
|
+
};
|
|
15
|
+
export default function Notification({ onClose, onReadAll, onDeleteNotificationbyId, onClickNotification, notifications, setFilter, filter, setInputValue, inputValue, filterOptions, }: NotificationProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NotificationType } from '../../types/notification';
|
|
2
|
+
type NotificationItemProps = {
|
|
3
|
+
notification: NotificationType;
|
|
4
|
+
onDelete: (id: string) => void;
|
|
5
|
+
onClick: (id: string) => void;
|
|
6
|
+
};
|
|
7
|
+
export default function NotificationItem({ notification, onDelete, onClick, }: NotificationItemProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const variants: {
|
|
2
|
+
white: string;
|
|
3
|
+
secondary: string;
|
|
4
|
+
};
|
|
5
|
+
interface RadioButtonProps {
|
|
6
|
+
variant?: keyof typeof variants;
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
checked?: boolean;
|
|
10
|
+
onChange: () => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
error?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export default function RadioButton({ label, value, checked, onChange, disabled, error, variant, }: RadioButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Option } from '../../types';
|
|
2
|
+
type SelectProps = {
|
|
3
|
+
options: Option[];
|
|
4
|
+
value: Option | null;
|
|
5
|
+
onChange: (option: Option) => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
error?: string;
|
|
9
|
+
};
|
|
10
|
+
export default function Select({ options, value, onChange, placeholder, disabled, error, }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type SpinnerProps = {
|
|
2
|
+
size?: keyof typeof sizeVariants;
|
|
3
|
+
color?: keyof typeof colorVariants;
|
|
4
|
+
};
|
|
5
|
+
declare const colorVariants: {
|
|
6
|
+
primary: string;
|
|
7
|
+
secondary: string;
|
|
8
|
+
};
|
|
9
|
+
declare const sizeVariants: {
|
|
10
|
+
sm: string;
|
|
11
|
+
md: string;
|
|
12
|
+
lg: string;
|
|
13
|
+
};
|
|
14
|
+
export default function Spinner({ size, color, }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import Spinner from './spinner';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Spinner;
|
|
6
|
+
parameters: {
|
|
7
|
+
componentSubtitle: string;
|
|
8
|
+
layout: string;
|
|
9
|
+
docs: {
|
|
10
|
+
source: {
|
|
11
|
+
language: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
tags: string[];
|
|
16
|
+
argTypes: {
|
|
17
|
+
color: {
|
|
18
|
+
type: {
|
|
19
|
+
name: "string";
|
|
20
|
+
};
|
|
21
|
+
control: "select";
|
|
22
|
+
options: string[];
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
size: {
|
|
26
|
+
type: {
|
|
27
|
+
name: "string";
|
|
28
|
+
};
|
|
29
|
+
control: "select";
|
|
30
|
+
options: string[];
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default meta;
|
|
36
|
+
type Story = StoryObj<typeof meta>;
|
|
37
|
+
export declare const Primary: Story;
|
|
38
|
+
export declare const Secondary: Story;
|
|
39
|
+
export declare const Small: Story;
|
|
40
|
+
export declare const Medium: Story;
|
|
41
|
+
export declare const Large: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ColumnStyle, TableData } from '../../types/table';
|
|
2
|
+
type tableProps = {
|
|
3
|
+
columns: string[];
|
|
4
|
+
columnStyles?: ColumnStyle[];
|
|
5
|
+
data: TableData[];
|
|
6
|
+
onDelete: (index: number) => void;
|
|
7
|
+
onEdit: (index: number) => void;
|
|
8
|
+
onExport: (index: number) => void;
|
|
9
|
+
};
|
|
10
|
+
export default function Table({ columns, data, onDelete, onEdit, onExport, columnStyles, }: tableProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ToastProps = {
|
|
2
|
+
severity?: 'success' | 'info' | 'error';
|
|
3
|
+
summary?: string;
|
|
4
|
+
detail?: string;
|
|
5
|
+
onShow?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export type ToastRef = {
|
|
8
|
+
show: (props?: ToastProps) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const Toast: import("react").ForwardRefExoticComponent<ToastProps & import("react").RefAttributes<ToastRef>>;
|
|
11
|
+
export default Toast;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Home(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function InvoiceTable(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type anyType = string | number | boolean | ReactNode;
|
|
3
|
+
export type SortDirection = 'ASC' | 'DEC';
|
|
4
|
+
export type ColumnStyle = {
|
|
5
|
+
[key: string]: string | ((value: anyType) => string);
|
|
6
|
+
};
|
|
7
|
+
export type TableData = {
|
|
8
|
+
[key: string]: anyType;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|