karsten-design-system 1.1.71 → 1.1.73
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/{index.esm.js → index.js} +78 -46
- package/dist/index.js.map +1 -0
- package/dist/types/assets/icons/error.d.ts +1 -0
- package/dist/types/assets/icons/filter.d.ts +5 -0
- package/dist/types/assets/icons/info.d.ts +1 -0
- package/dist/types/assets/icons/success.d.ts +1 -0
- package/dist/types/assets/icons/text.d.ts +1 -0
- package/dist/types/assets/logoSmall.d.ts +1 -0
- package/dist/types/components/floating-label/index.d.ts +8 -0
- package/dist/types/index.d.ts +40 -4
- package/dist/types/stories/components/accordion.d.ts +15 -0
- package/dist/types/stories/components/autoComplete.d.ts +7 -0
- package/dist/types/stories/components/basicHeader.d.ts +1 -0
- package/dist/types/stories/components/breadcrumb.d.ts +5 -0
- package/dist/types/stories/components/button.d.ts +18 -0
- package/dist/types/stories/components/calendarInput.d.ts +8 -0
- package/dist/types/stories/components/card.d.ts +6 -0
- package/dist/types/stories/components/cardButton.d.ts +7 -0
- package/dist/types/stories/components/cardIconsButton.d.ts +8 -0
- package/dist/types/stories/components/chart.d.ts +3 -0
- package/dist/types/stories/components/dialog.d.ts +8 -0
- package/dist/types/stories/components/divider.d.ts +2 -0
- package/dist/types/stories/components/emptyContent.d.ts +5 -0
- package/dist/types/stories/components/expandablePanel.d.ts +8 -0
- package/dist/types/stories/components/fileUpload.d.ts +21 -0
- package/dist/types/stories/components/filterButton.d.ts +26 -0
- package/dist/types/stories/components/header.d.ts +10 -0
- package/dist/types/stories/components/iconButton.d.ts +11 -0
- package/dist/types/stories/components/infoCard.d.ts +9 -0
- package/dist/types/stories/components/input.d.ts +18 -0
- package/dist/types/stories/components/inputSwitch.d.ts +8 -0
- package/dist/types/stories/components/inputTextArea.d.ts +10 -0
- package/dist/types/stories/components/internalMenu.d.ts +6 -0
- package/dist/types/stories/components/link.d.ts +6 -0
- package/dist/types/stories/components/megaMenu.d.ts +5 -0
- package/dist/types/stories/components/modal.d.ts +13 -0
- package/dist/types/stories/components/multiselect.d.ts +15 -0
- package/dist/types/stories/components/notification.d.ts +15 -0
- package/dist/types/stories/components/notificationItem.d.ts +8 -0
- package/dist/types/stories/components/paginator.d.ts +2 -0
- package/dist/types/stories/components/radioButton.d.ts +16 -0
- package/dist/types/stories/components/select.d.ts +15 -0
- package/dist/types/stories/components/sidebar.d.ts +14 -0
- package/dist/types/stories/components/skeleton.d.ts +2 -0
- package/dist/types/stories/components/spinner.d.ts +15 -0
- package/dist/types/stories/components/table.d.ts +39 -0
- package/dist/types/stories/components/tabs.d.ts +14 -0
- package/dist/types/stories/components/tagStatus.d.ts +6 -0
- package/dist/types/stories/components/toast.d.ts +10 -0
- package/dist/types/stories/components/tooltip.d.ts +6 -0
- package/dist/types/types/breadcrumbItems.d.ts +4 -0
- package/dist/types/types/index.d.ts +4 -0
- package/dist/types/types/internalMenu.d.ts +15 -0
- package/dist/types/types/megaMenuItems.d.ts +6 -0
- package/dist/types/types/notification.d.ts +7 -0
- package/dist/types/types/options.d.ts +4 -0
- package/dist/types/types/table.d.ts +10 -0
- package/dist/types/utils/masks/index.d.ts +8 -0
- package/dist/types/utils/nestedValue.d.ts +1 -0
- package/dist/types/utils/sortData.d.ts +2 -0
- package/package.json +30 -7
- package/dist/index.cjs.css +0 -4
- package/dist/index.cjs.js +0 -4537
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.esm.css +0 -4
- package/dist/index.esm.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ErrorIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function InfoIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SuccessIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function TextIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function LogoSmall(): import("react/jsx-runtime").JSX.Element;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
import '../.storybook/index.css';
|
|
2
|
+
export * from './stories/components/accordion';
|
|
3
|
+
export * from './stories/components/autoComplete';
|
|
4
|
+
export * from './stories/components/basicHeader';
|
|
5
|
+
export * from './stories/components/breadcrumb';
|
|
6
|
+
export * from './stories/components/button';
|
|
7
|
+
export * from './stories/components/calendarInput';
|
|
8
|
+
export * from './stories/components/card';
|
|
9
|
+
export * from './stories/components/cardButton';
|
|
10
|
+
export * from './stories/components/cardIconsButton';
|
|
11
|
+
export * from './stories/components/chart';
|
|
12
|
+
export * from './stories/components/dialog';
|
|
13
|
+
export * from './stories/components/divider';
|
|
14
|
+
export * from './stories/components/emptyContent';
|
|
15
|
+
export * from './stories/components/expandablePanel';
|
|
16
|
+
export * from './stories/components/fileUpload';
|
|
17
|
+
export * from './stories/components/filterButton';
|
|
18
|
+
export * from './stories/components/header';
|
|
19
|
+
export * from './stories/components/iconButton';
|
|
20
|
+
export * from './stories/components/infoCard';
|
|
21
|
+
export * from './stories/components/input';
|
|
22
|
+
export * from './stories/components/inputSwitch';
|
|
23
|
+
export * from './stories/components/inputTextArea';
|
|
24
|
+
export * from './stories/components/internalMenu';
|
|
25
|
+
export * from './stories/components/link';
|
|
26
|
+
export * from './stories/components/megaMenu';
|
|
27
|
+
export * from './stories/components/modal';
|
|
28
|
+
export * from './stories/components/multiselect';
|
|
29
|
+
export * from './stories/components/notification';
|
|
30
|
+
export * from './stories/components/paginator';
|
|
31
|
+
export * from './stories/components/radioButton';
|
|
32
|
+
export * from './stories/components/select';
|
|
33
|
+
export * from './stories/components/sidebar';
|
|
34
|
+
export * from './stories/components/skeleton';
|
|
35
|
+
export * from './stories/components/spinner';
|
|
36
|
+
export * from './stories/components/table';
|
|
37
|
+
export * from './stories/components/tabs';
|
|
38
|
+
export * from './stories/components/tagStatus';
|
|
39
|
+
export * from './stories/components/toast';
|
|
40
|
+
export * from './stories/components/tooltip';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type AccordionHeader = {
|
|
3
|
+
label: string;
|
|
4
|
+
isFavorite?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type AccordionProps = {
|
|
7
|
+
tabsChildren: ReactNode[];
|
|
8
|
+
headers: AccordionHeader[];
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
activeIndex?: number | number[];
|
|
11
|
+
className?: string;
|
|
12
|
+
onClickFavorite?: (index: number) => void;
|
|
13
|
+
showFavorite?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare function Accordion({ tabsChildren, headers, multiple, activeIndex, className, onClickFavorite, showFavorite, }: AccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InputTextProps } from 'primereact/inputtext';
|
|
2
|
+
export type AutoCompleteProps = {
|
|
3
|
+
items: string[];
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
error?: string;
|
|
6
|
+
} & Omit<InputTextProps, 'onChange'>;
|
|
7
|
+
export declare function AutoComplete({ items, onChange, error, ...props }: AutoCompleteProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function BasicHeader(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
export type ButtonProps = {
|
|
12
|
+
variant: keyof typeof variants;
|
|
13
|
+
selected?: boolean;
|
|
14
|
+
rightIcon?: string;
|
|
15
|
+
width?: string;
|
|
16
|
+
} & PrimeButtonProps;
|
|
17
|
+
export declare function Button({ variant, selected, rightIcon, className, width, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CalendarProps } from 'primereact/calendar';
|
|
2
|
+
export type CalendarInputProps = {
|
|
3
|
+
error?: string;
|
|
4
|
+
placeholder: string;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
} & CalendarProps<any>;
|
|
8
|
+
export declare function CalendarInput({ error, placeholder, label, disabled, ...props }: CalendarInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type CardIconsButtonProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
leftIcon?: ReactNode;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
isLight?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function CardIconsButton({ label, leftIcon, onClick, isLight, }: CardIconsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type DialogProps = {
|
|
2
|
+
title: string | undefined;
|
|
3
|
+
description: string | undefined;
|
|
4
|
+
labelConfirmButton: string | undefined;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function Dialog({ title, description, labelConfirmButton, onClose, onClick, }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface ExpandablePanelProps {
|
|
2
|
+
title: string;
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
defaultOpen?: boolean;
|
|
5
|
+
isLight?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function ExpandablePanel({ title, children, defaultOpen, isLight, }: ExpandablePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type AllowedFileType = 'image' | 'pdf';
|
|
2
|
+
export type FileWithPreview = {
|
|
3
|
+
file?: File;
|
|
4
|
+
id?: string;
|
|
5
|
+
previewUrl?: string;
|
|
6
|
+
type: 'image' | 'pdf';
|
|
7
|
+
isDeleted?: boolean;
|
|
8
|
+
name?: string;
|
|
9
|
+
};
|
|
10
|
+
export interface FileUploadProps {
|
|
11
|
+
label?: string;
|
|
12
|
+
value?: FileWithPreview[];
|
|
13
|
+
onChange?: (files: FileWithPreview[]) => void;
|
|
14
|
+
multiple?: boolean;
|
|
15
|
+
fileTypes?: AllowedFileType[];
|
|
16
|
+
className?: string;
|
|
17
|
+
error?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare function FileUpload({ label, value, onChange, multiple, fileTypes, className, error, disabled, }: FileUploadProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
main: {
|
|
9
|
+
text: string;
|
|
10
|
+
button: string;
|
|
11
|
+
};
|
|
12
|
+
primary: {
|
|
13
|
+
text: string;
|
|
14
|
+
button: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type FilterButtonProps = {
|
|
18
|
+
filterOptions: Option[];
|
|
19
|
+
setOption: (option: Option | null) => void;
|
|
20
|
+
option: Option | null;
|
|
21
|
+
variant: keyof typeof variants;
|
|
22
|
+
icon: React.ReactNode | string;
|
|
23
|
+
label: string;
|
|
24
|
+
} & Omit<PrimeButtonProps, 'icon'>;
|
|
25
|
+
export declare function FilterButton({ filterOptions, setOption, option, variant, icon, label, ...props }: FilterButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InternalMenuItems } from '../../types/internalMenu';
|
|
2
|
+
import { TopItem } from './sidebar';
|
|
3
|
+
export type MenubarProps = {
|
|
4
|
+
sidebarItems: InternalMenuItems[];
|
|
5
|
+
sidebarTopItems?: TopItem[];
|
|
6
|
+
userConfigItems: InternalMenuItems[];
|
|
7
|
+
username: string;
|
|
8
|
+
setOpenNotifications: (value: boolean) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare function Header({ sidebarItems, sidebarTopItems, username, userConfigItems, setOpenNotifications, }: MenubarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ButtonProps as PrimeButtonProps } from 'primereact/button';
|
|
2
|
+
declare const variants: {
|
|
3
|
+
border: string;
|
|
4
|
+
shadow: string;
|
|
5
|
+
};
|
|
6
|
+
export type IconButtonProp = {
|
|
7
|
+
variant: keyof typeof variants;
|
|
8
|
+
icon: string;
|
|
9
|
+
} & PrimeButtonProps;
|
|
10
|
+
export declare function IconButton({ variant, icon, ...props }: IconButtonProp): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type InfoCardProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
titleClassName?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function InfoCard({ title, children, icon, className, titleClassName, }: InfoCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
mask?: 'cpf' | 'cnpj' | 'numbers' | 'cellphone' | 'cep' | 'decimal' | 'phone' | 'currency';
|
|
12
|
+
} & Omit<InputTextProps, 'onChange'>;
|
|
13
|
+
declare const variants: {
|
|
14
|
+
green: string;
|
|
15
|
+
gray: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function Input({ onChange, placeholder, disabled, error, icon, onClickIcon, iconColor, label, mask, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type InputSwitchProps = {
|
|
2
|
+
checked: boolean;
|
|
3
|
+
onChange: (value: boolean) => void;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
error?: string;
|
|
6
|
+
ariaLabel?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function InputSwitch({ checked, onChange, disabled, error, ariaLabel, }: InputSwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InputTextareaProps } from 'primereact/inputtextarea';
|
|
2
|
+
export type InputTextAreaProps = {
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
error?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
rows?: number;
|
|
9
|
+
} & Omit<InputTextareaProps, 'onChange'>;
|
|
10
|
+
export declare function InputTextArea({ onChange, placeholder, disabled, error, label, rows, ...props }: InputTextAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InternalMenuItems } from '../../types/internalMenu';
|
|
2
|
+
export type InternalMenuProp = {
|
|
3
|
+
item: InternalMenuItems[];
|
|
4
|
+
isFiltering: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function InternalMenu({ item, isFiltering }: InternalMenuProp): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type ModalProps = {
|
|
3
|
+
title?: string;
|
|
4
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
onConfirm?: () => void;
|
|
7
|
+
labelCloseButton?: string;
|
|
8
|
+
labelConfirmButton?: string;
|
|
9
|
+
isExpanded?: boolean;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export declare function Modal({ title, size, onClose, onConfirm, labelCloseButton, labelConfirmButton, isExpanded, ariaLabel, children, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Option } from '../../types';
|
|
2
|
+
export type MultiSelectProps = {
|
|
3
|
+
options: Option[];
|
|
4
|
+
placeholder: string;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
error?: string;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
value: Option[] | null;
|
|
10
|
+
onChange: (option: Option[] | null) => void;
|
|
11
|
+
isReadOnly?: boolean;
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
onInputChange?: (input: string) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare function MultiSelect(props: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Option } from '../../types';
|
|
2
|
+
import { NotificationType } from '../../types/notification';
|
|
3
|
+
export 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 | null) => void;
|
|
10
|
+
filter: Option | null;
|
|
11
|
+
setInputValue: (value: string) => void;
|
|
12
|
+
inputValue: string;
|
|
13
|
+
filterOptions: Option[];
|
|
14
|
+
};
|
|
15
|
+
export declare function Notification({ onClose, onReadAll, onDeleteNotificationbyId, onClickNotification, notifications, setFilter, filter, setInputValue, inputValue, filterOptions, }: NotificationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -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,16 @@
|
|
|
1
|
+
declare const variants: {
|
|
2
|
+
white: string;
|
|
3
|
+
secondary: string;
|
|
4
|
+
};
|
|
5
|
+
export type 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
|
+
ariaLabel?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function RadioButton({ label, value, checked, onChange, disabled, error, variant, ariaLabel, }: RadioButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Option } from '../../types';
|
|
2
|
+
export type SingleSelectProps = {
|
|
3
|
+
options: Option[];
|
|
4
|
+
placeholder: string;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
error?: string;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
value: Option | null;
|
|
10
|
+
onChange: (option: Option | null) => void;
|
|
11
|
+
isReadOnly?: boolean;
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
onInputChange?: (input: string) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare function Select(props: SingleSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InternalMenuItems } from '../../types/internalMenu';
|
|
2
|
+
export type TopItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
path?: string;
|
|
6
|
+
tooltipText?: string | null | undefined;
|
|
7
|
+
isWindowOpen?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type sidebarProps = {
|
|
10
|
+
item?: InternalMenuItems[];
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
topItem?: TopItem[];
|
|
13
|
+
};
|
|
14
|
+
export declare function Sidebar({ item, onClose, topItem }: sidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export 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 declare function Spinner({ size, color }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { SortDirection } from '../../types';
|
|
2
|
+
export type FilterType = 'text' | 'select' | 'multiSelect' | 'singleDate' | 'rangeDate';
|
|
3
|
+
export type Column<T> = {
|
|
4
|
+
label: string;
|
|
5
|
+
dataIndex: string;
|
|
6
|
+
style?: (value: T[keyof T], row: T) => string | string;
|
|
7
|
+
render?: (value: T[keyof T], row: T) => React.ReactNode;
|
|
8
|
+
filterable?: boolean;
|
|
9
|
+
tooltipText?: (value: T[keyof T], row: T) => string | null | undefined;
|
|
10
|
+
filterType?: FilterType;
|
|
11
|
+
filterOptions?: {
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}[];
|
|
15
|
+
mask?: 'cpf' | 'cnpj' | 'numbers' | 'cellphone' | 'cep' | 'decimal' | 'phone' | 'currency';
|
|
16
|
+
};
|
|
17
|
+
export type TableAction<T> = {
|
|
18
|
+
icon: React.ReactNode;
|
|
19
|
+
onClick: (item: T) => void;
|
|
20
|
+
label?: string;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
ariaLabel?: string;
|
|
23
|
+
};
|
|
24
|
+
export type TableProps<T> = {
|
|
25
|
+
columns: Column<T>[];
|
|
26
|
+
data: T[];
|
|
27
|
+
totalRecords?: number;
|
|
28
|
+
actions?: TableAction<T>[];
|
|
29
|
+
isOrdered?: boolean;
|
|
30
|
+
actionsHeaderClassName?: string;
|
|
31
|
+
actionsColumnsClassName?: string;
|
|
32
|
+
rowsPerPage?: number;
|
|
33
|
+
onPageChange: (page: number) => void;
|
|
34
|
+
isPaginated?: boolean;
|
|
35
|
+
isLoading?: boolean;
|
|
36
|
+
onFilterChange?: (filters: Record<string, string>) => void;
|
|
37
|
+
onSortChange?: (dataIndex: keyof T, direction: SortDirection) => void;
|
|
38
|
+
};
|
|
39
|
+
export declare function Table<T extends Record<string, any>>({ columns, data, totalRecords, actions, isOrdered, actionsHeaderClassName, actionsColumnsClassName, rowsPerPage, onPageChange, isPaginated, isLoading, onFilterChange, onSortChange, }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TabItem {
|
|
3
|
+
label: string;
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface TabsProps {
|
|
8
|
+
tabs: TabItem[];
|
|
9
|
+
activeIndex?: number;
|
|
10
|
+
onTabChange?: (index: number) => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function Tabs({ tabs, activeIndex, onTabChange, className, }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type TagStatusProps = {
|
|
2
|
+
value: string;
|
|
3
|
+
color?: TagColor;
|
|
4
|
+
};
|
|
5
|
+
export type TagColor = 'blue' | 'red' | 'green' | 'gray' | 'purple' | 'yellow' | 'orange' | 'pink' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'indigo' | 'violet' | 'fuchsia' | 'rose' | 'stone' | 'amber' | 'lime' | 'slate' | 'zinc' | 'neutral';
|
|
6
|
+
export declare function TagStatus({ value, color }: TagStatusProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ToastSeverity = 'success' | 'info' | 'error';
|
|
2
|
+
export type ToastMessage = {
|
|
3
|
+
id: number;
|
|
4
|
+
severity: ToastSeverity;
|
|
5
|
+
summary: string;
|
|
6
|
+
detail: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function Toast({ messages }: {
|
|
9
|
+
messages: ToastMessage[];
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type InternalMenuItems = {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
path?: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
isActive?: boolean;
|
|
7
|
+
tooltipText?: string | null | undefined;
|
|
8
|
+
subItem?: {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
path: string;
|
|
12
|
+
isActive?: boolean;
|
|
13
|
+
tooltipText?: string | null | undefined;
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type anyType = string | number | boolean | ReactNode;
|
|
3
|
+
export type SortDirection = 'ASC' | 'DESC' | null;
|
|
4
|
+
export type ColumnStyle = {
|
|
5
|
+
[key: string]: string | ((value: anyType) => string);
|
|
6
|
+
};
|
|
7
|
+
export type TableData = {
|
|
8
|
+
[key: string]: anyType;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|