@pk-design/react-tailwind 1.0.2

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.
Files changed (54) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/dist/react-tailwind.cjs.js +938 -0
  4. package/dist/react-tailwind.cjs.js.map +1 -0
  5. package/dist/react-tailwind.css +2 -0
  6. package/dist/react-tailwind.css.map +1 -0
  7. package/dist/react-tailwind.es.js +872 -0
  8. package/dist/react-tailwind.es.js.map +1 -0
  9. package/dist/types/components/Alert/index.d.ts +35 -0
  10. package/dist/types/components/Badge/index.d.ts +24 -0
  11. package/dist/types/components/Banner/index.d.ts +16 -0
  12. package/dist/types/components/BodyText/index.d.ts +28 -0
  13. package/dist/types/components/Breadcrumb/index.d.ts +30 -0
  14. package/dist/types/components/Button/Button.d.ts +3 -0
  15. package/dist/types/components/Button/index.d.ts +2 -0
  16. package/dist/types/components/Button/type.d.ts +58 -0
  17. package/dist/types/components/Card/index.d.ts +9 -0
  18. package/dist/types/components/Checkbox/index.d.ts +13 -0
  19. package/dist/types/components/CheckboxGroup/index.d.ts +56 -0
  20. package/dist/types/components/DetailedInformation/index.d.ts +63 -0
  21. package/dist/types/components/Dot/index.d.ts +4 -0
  22. package/dist/types/components/Drawer/Drawer.d.ts +3 -0
  23. package/dist/types/components/Drawer/index.d.ts +2 -0
  24. package/dist/types/components/Drawer/type.d.ts +71 -0
  25. package/dist/types/components/Dropdown/index.d.ts +62 -0
  26. package/dist/types/components/EmptyState/index.d.ts +8 -0
  27. package/dist/types/components/HeadingText/index.d.ts +12 -0
  28. package/dist/types/components/Input/index.d.ts +13 -0
  29. package/dist/types/components/Label/index.d.ts +5 -0
  30. package/dist/types/components/Loader/index.d.ts +9 -0
  31. package/dist/types/components/Pagination/Pagination.d.ts +33 -0
  32. package/dist/types/components/Pagination/index.d.ts +2 -0
  33. package/dist/types/components/Pagination/usePagination.d.ts +7 -0
  34. package/dist/types/components/PasswordInput/index.d.ts +6 -0
  35. package/dist/types/components/RadioButton/index.d.ts +7 -0
  36. package/dist/types/components/RadioButtonGroup/index.d.ts +19 -0
  37. package/dist/types/components/RadioSwtich/index.d.ts +14 -0
  38. package/dist/types/components/RangeInput/index.d.ts +10 -0
  39. package/dist/types/components/SelectBox/index.d.ts +40 -0
  40. package/dist/types/components/Table/index.d.ts +48 -0
  41. package/dist/types/components/Tabs/index.d.ts +2 -0
  42. package/dist/types/components/Tag/index.d.ts +12 -0
  43. package/dist/types/components/TextContent/index.d.ts +10 -0
  44. package/dist/types/components/Textarea/index.d.ts +7 -0
  45. package/dist/types/components/Toast/Toast.d.ts +9 -0
  46. package/dist/types/components/Toast/ToastProvider.d.ts +16 -0
  47. package/dist/types/components/Toast/index.d.ts +2 -0
  48. package/dist/types/components/common-type.d.ts +31 -0
  49. package/dist/types/components/hooks/use-debounce.d.ts +1 -0
  50. package/dist/types/index.d.ts +36 -0
  51. package/dist/types/utils/build-classname.d.ts +1 -0
  52. package/dist/types/utils/is-array.d.ts +5 -0
  53. package/dist/types/utils/is-empty.d.ts +6 -0
  54. package/package.json +89 -0
@@ -0,0 +1,13 @@
1
+ import React, { type InputHTMLAttributes } from 'react';
2
+ import { type InputCustomProps } from '../common-type';
3
+ export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement>, Omit<InputCustomProps, 'labelHint'> {
4
+ /**
5
+ * Type is constant 'checkbox'
6
+ */
7
+ type?: 'checkbox';
8
+ /**
9
+ * Input wrapper class
10
+ */
11
+ wrapperClass?: string;
12
+ }
13
+ export declare const Checkbox: React.FC<CheckboxProps>;
@@ -0,0 +1,56 @@
1
+ import React, { type ChangeEvent, type ReactNode } from 'react';
2
+ export type CheckboxGroupItem = {
3
+ /**
4
+ * Checkbox item label
5
+ */
6
+ label: string;
7
+ /**
8
+ * Checkbox item value
9
+ */
10
+ value: any;
11
+ };
12
+ export interface CheckboxGroupProps {
13
+ /**
14
+ * Group name
15
+ */
16
+ name?: string;
17
+ /**
18
+ * Selected value
19
+ */
20
+ value?: any;
21
+ /**
22
+ * Label of checkbox group field
23
+ */
24
+ label?: ReactNode;
25
+ /**
26
+ * Label class for checkbox group field
27
+ */
28
+ labelClass?: string;
29
+ /**
30
+ * Label wrapper class for checkbox group field
31
+ */
32
+ labelWrapperClass?: string;
33
+ /**
34
+ * Group field hint
35
+ */
36
+ labelHint?: ReactNode;
37
+ /**
38
+ * Group field container
39
+ */
40
+ containerClass?: string;
41
+ /**
42
+ * On change handler
43
+ * @param e ChangeEvent<HTMLInputElement>
44
+ * @returns void
45
+ */
46
+ onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
47
+ /**
48
+ * List of checkbox field option
49
+ */
50
+ options: string[] | CheckboxGroupItem[];
51
+ /**
52
+ * Defines whether to list the checkbox inline
53
+ */
54
+ inline?: boolean;
55
+ }
56
+ export declare const CheckboxGroup: React.FC<CheckboxGroupProps>;
@@ -0,0 +1,63 @@
1
+ import React, { type ReactNode, type JSX, type JSXElementConstructor } from 'react';
2
+ export type Detail = {
3
+ /**
4
+ * Label of the information to be displayed
5
+ */
6
+ label: string;
7
+ /**
8
+ * Information to be displayed
9
+ */
10
+ value?: ReactNode;
11
+ /**
12
+ * Classname of the value content sections
13
+ */
14
+ contentClass?: string;
15
+ /**
16
+ * Defines if the items should be hidden.
17
+ */
18
+ hidden?: boolean;
19
+ };
20
+ export interface DetailedInformationProps {
21
+ className?: string;
22
+ /**
23
+ * Title for the information section
24
+ */
25
+ title?: ReactNode;
26
+ /**
27
+ * Subtitle for the information section
28
+ */
29
+ subTitle?: ReactNode;
30
+ /**
31
+ * List of details / information to be displayed
32
+ */
33
+ details: Detail[];
34
+ /**
35
+ * Defines if the layout should be compact
36
+ */
37
+ compact?: boolean;
38
+ /**
39
+ * Defines if the section should have borders
40
+ */
41
+ bordered?: boolean;
42
+ /**
43
+ * Defines if each item in section should have divider
44
+ */
45
+ divider?: boolean;
46
+ /**
47
+ * Classname for title element
48
+ */
49
+ titleClass?: string;
50
+ /**
51
+ * Classname for details section
52
+ */
53
+ detailsClass?: string;
54
+ /**
55
+ * JSX element to be rendered as.
56
+ */
57
+ as?: keyof JSX.IntrinsicElements | JSXElementConstructor<any>;
58
+ /**
59
+ * When rendering as Link, use `to` prop for navigation
60
+ */
61
+ to?: string;
62
+ }
63
+ export declare const DetailedInformation: React.FC<DetailedInformationProps>;
@@ -0,0 +1,4 @@
1
+ import React, { type HTMLAttributes, type JSX, type JSXElementConstructor } from 'react';
2
+ export declare const Dot: React.FC<HTMLAttributes<HTMLElement> & {
3
+ as?: keyof JSX.IntrinsicElements | JSXElementConstructor<any>;
4
+ }>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { type DrawerProps } from './type';
3
+ export declare const Drawer: React.FC<DrawerProps>;
@@ -0,0 +1,2 @@
1
+ export * from './Drawer';
2
+ export * from './type';
@@ -0,0 +1,71 @@
1
+ import { type ReactNode } from 'react';
2
+ export type DrawerAlignment = 'center' | 'start' | 'end' | 'top' | 'bottom' | 'top-center';
3
+ export type DrawerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
4
+ export interface DrawerProps {
5
+ /**
6
+ * Controls if Drawer is open
7
+ */
8
+ isOpen: boolean;
9
+ /**
10
+ * Handler method that invokes on close attempt
11
+ * @returns void
12
+ */
13
+ onClose?: () => void;
14
+ /**
15
+ * Drawer alignment on the page
16
+ * @default "end"
17
+ */
18
+ align?: DrawerAlignment;
19
+ /**
20
+ * Whether to add backdrop, when drawer is open
21
+ * @default "true"
22
+ */
23
+ backdrop?: boolean;
24
+ /**
25
+ * Drawer title
26
+ */
27
+ title: ReactNode;
28
+ /**
29
+ * Controls if the title should be sticky on top
30
+ */
31
+ titleSticky?: boolean;
32
+ /**
33
+ * Drawer description section
34
+ */
35
+ description?: ReactNode;
36
+ /**
37
+ * Content of the drawer
38
+ */
39
+ children?: ReactNode;
40
+ /**
41
+ * Drawer size
42
+ * @default "md"
43
+ */
44
+ size?: DrawerSize;
45
+ /**
46
+ * Dialog Panel class
47
+ */
48
+ panelClass?: string;
49
+ /**
50
+ * Drawer content class
51
+ */
52
+ contentClass?: string;
53
+ /**
54
+ * Drawer title class
55
+ */
56
+ titleClass?: string;
57
+ /**
58
+ * Drawer description class
59
+ */
60
+ descriptionClass?: string;
61
+ /**
62
+ * Should show back button on Drawer
63
+ */
64
+ showBackButton?: boolean;
65
+ }
66
+ export type AlignmentMap = {
67
+ [key in DrawerAlignment]: string;
68
+ };
69
+ export type SizeMap = {
70
+ [key in DrawerSize]: string;
71
+ };
@@ -0,0 +1,62 @@
1
+ import React, { type ReactNode } from 'react';
2
+ type Align = 'start' | 'end';
3
+ type Placement = 'top' | 'right' | 'bottom' | 'left';
4
+ type AnchorTo = `${Placement}` | `${Placement} ${Align}`;
5
+ type BaseAnchorProps = {
6
+ /**
7
+ * The `gap` is the space between the trigger and the panel.
8
+ */
9
+ gap: number | string;
10
+ /**
11
+ * The `offset` is the amount the panel should be nudged from its original position.
12
+ */
13
+ offset: number | string;
14
+ /**
15
+ * The `padding` is the minimum space between the panel and the viewport.
16
+ */
17
+ padding: number | string;
18
+ };
19
+ export type DropdownItem = Record<string, any> & {
20
+ id: string;
21
+ divider?: boolean;
22
+ };
23
+ export type DropdownProps = {
24
+ /**
25
+ * Dropdown menu trigger button
26
+ */
27
+ triggerButton: ReactNode;
28
+ /**
29
+ * Dropdown menu item container class
30
+ */
31
+ itemsContainerClass?: string;
32
+ /**
33
+ * Controls animation of dropdown menu
34
+ * @default true
35
+ */
36
+ transition?: boolean;
37
+ /**
38
+ * Controls placement of the dropdown menu
39
+ * @default "bottom start"
40
+ */
41
+ anchor?: false | AnchorTo | Partial<BaseAnchorProps & {
42
+ /**
43
+ * The `to` value defines which side of the trigger the panel should be placed on and its
44
+ * alignment.
45
+ */
46
+ to: AnchorTo;
47
+ }>;
48
+ /**
49
+ * List of dropdown menu items
50
+ */
51
+ items: DropdownItem[];
52
+ /**
53
+ * Renderer function that returns react element to render dropdown item
54
+ * @param item DropdownItem
55
+ * @returns ReactNode
56
+ */
57
+ renderItem: (item: DropdownItem, options: {
58
+ className: string;
59
+ }) => ReactNode;
60
+ };
61
+ export declare const Dropdown: React.FC<DropdownProps>;
62
+ export {};
@@ -0,0 +1,8 @@
1
+ import React, { type ReactNode } from 'react';
2
+ export interface EmptyStateProps {
3
+ title: string;
4
+ description?: string;
5
+ action?: ReactNode;
6
+ className?: string;
7
+ }
8
+ export declare const EmptyState: React.FC<EmptyStateProps>;
@@ -0,0 +1,12 @@
1
+ import React, { type ReactNode } from 'react';
2
+ export interface HeadingTextProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ }
6
+ export declare const HeadingText: {
7
+ Title: React.FC<HeadingTextProps>;
8
+ SubTitle: React.FC<HeadingTextProps>;
9
+ SubTitle2: React.FC<HeadingTextProps>;
10
+ SubTitle3: React.FC<HeadingTextProps>;
11
+ SubTitle4: React.FC<HeadingTextProps>;
12
+ };
@@ -0,0 +1,13 @@
1
+ import React, { type InputHTMLAttributes, type ReactNode } from 'react';
2
+ import { type InputCustomProps } from '../common-type';
3
+ export interface InputProps extends InputHTMLAttributes<HTMLInputElement>, InputCustomProps {
4
+ /**
5
+ * Space for right icon
6
+ */
7
+ rightGroup?: ReactNode;
8
+ /**
9
+ * Space for left icon
10
+ */
11
+ leftGroup?: ReactNode;
12
+ }
13
+ export declare const Input: React.FC<InputProps>;
@@ -0,0 +1,5 @@
1
+ import React, { type LabelHTMLAttributes } from 'react';
2
+ interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
3
+ }
4
+ export declare const Label: React.FC<LabelProps>;
5
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import './loader.css';
3
+ export type LoaderSize = 'xs' | 'sm' | 'md' | 'lg';
4
+ interface LoaderProps {
5
+ size?: LoaderSize;
6
+ className?: string;
7
+ }
8
+ export declare const Loader: React.FC<LoaderProps>;
9
+ export {};
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ export interface TPagination {
3
+ /**
4
+ * Defines current page number
5
+ */
6
+ page: number;
7
+ /**
8
+ * Defines page limit
9
+ */
10
+ limit: number;
11
+ /**
12
+ * Defines totol items in the list to be paginated.
13
+ */
14
+ total: number;
15
+ }
16
+ export type PaginationProps = TPagination & {
17
+ /**
18
+ * Pagination component classname
19
+ */
20
+ className?: string;
21
+ /**
22
+ * Handler for page change
23
+ * @param pagination Partial<TPagination>
24
+ * @returns void
25
+ */
26
+ onChange: (pagination: Partial<TPagination>) => void;
27
+ /**
28
+ * Whether to show ellipsis for large page numbers
29
+ * @default true
30
+ */
31
+ ellipsis?: boolean;
32
+ };
33
+ export declare const Pagination: React.FC<PaginationProps>;
@@ -0,0 +1,2 @@
1
+ export * from './Pagination';
2
+ export * from './usePagination';
@@ -0,0 +1,7 @@
1
+ export declare const DOTS = "...";
2
+ export type UsePaginationProps = {
3
+ totalPages: number;
4
+ currentPage: number;
5
+ siblingCount?: number;
6
+ };
7
+ export declare const usePagination: ({ totalPages, currentPage, siblingCount, }: UsePaginationProps) => (number | string)[];
@@ -0,0 +1,6 @@
1
+ import { type InputProps } from '../Input';
2
+ export interface PasswordInputProps extends Omit<InputProps, 'rightGroup'> {
3
+ }
4
+ export declare const PASSWORD_TYPE = "password";
5
+ export declare const PASSWORD_PLACEHOLDER = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";
6
+ export declare const PasswordInput: React.FC<PasswordInputProps>;
@@ -0,0 +1,7 @@
1
+ import React, { type InputHTMLAttributes } from 'react';
2
+ import { type InputCustomProps } from '../common-type';
3
+ export interface RadioButtonProps extends InputHTMLAttributes<HTMLInputElement>, InputCustomProps {
4
+ type?: 'radio';
5
+ wrapperClass?: string;
6
+ }
7
+ export declare const RadioButton: React.FC<RadioButtonProps>;
@@ -0,0 +1,19 @@
1
+ import React, { type ChangeEvent, type ReactNode } from 'react';
2
+ type RadionButtonGroupItem = {
3
+ label: string;
4
+ value: any;
5
+ };
6
+ export interface RadioButtonGroupProps {
7
+ name: string;
8
+ label?: ReactNode;
9
+ labelClass?: string;
10
+ labelWrapperClass?: string;
11
+ labelHint?: ReactNode;
12
+ containerClass?: string;
13
+ value?: any;
14
+ options: string[] | RadionButtonGroupItem[];
15
+ row?: boolean;
16
+ onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
17
+ }
18
+ export declare const RadioButtonGroup: React.FC<RadioButtonGroupProps>;
19
+ export {};
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { type RadioGroupProps } from '@headlessui/react';
3
+ export type RadioSwitchItem = string | {
4
+ label: string;
5
+ value: string;
6
+ description?: string;
7
+ };
8
+ export type RadioSwitchProps = RadioGroupProps & {
9
+ label?: string;
10
+ selected: string;
11
+ onChange: (value: string) => void;
12
+ items: RadioSwitchItem[];
13
+ };
14
+ export declare const RadioSwitch: React.FC<RadioSwitchProps>;
@@ -0,0 +1,10 @@
1
+ import React, { type InputHTMLAttributes } from 'react';
2
+ import { type InputCustomProps } from '../common-type';
3
+ export type RangeValue = {
4
+ min: any;
5
+ max: any;
6
+ };
7
+ export interface RangeInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'value'>, InputCustomProps {
8
+ value?: RangeValue;
9
+ }
10
+ export declare const RangeInput: React.FC<RangeInputProps>;
@@ -0,0 +1,40 @@
1
+ import React, { type ReactNode } from 'react';
2
+ export type SelectOption = {
3
+ value: string;
4
+ label?: string;
5
+ disabled?: boolean;
6
+ [key: string]: any;
7
+ };
8
+ type Selected = SelectOption | string;
9
+ interface SelectBoxProps {
10
+ options: SelectOption[] | string[];
11
+ selected?: Selected | Selected[] | null;
12
+ labelKey?: string;
13
+ valueKey?: string;
14
+ id?: string;
15
+ name?: string;
16
+ label?: string;
17
+ labelWrapperClass?: string;
18
+ labelClass?: string;
19
+ labelHint?: string;
20
+ onChange?: (value: any) => void;
21
+ disabled?: boolean;
22
+ containerClass?: string;
23
+ placeholder?: string;
24
+ dropdownContainerClass?: string;
25
+ multiple?: boolean;
26
+ maxSelection?: number;
27
+ immediate?: boolean;
28
+ showErrorMessage?: boolean;
29
+ error?: string | ReactNode;
30
+ async?: boolean;
31
+ onSearch?: (query: string) => Promise<void>;
32
+ searchable?: boolean;
33
+ required?: boolean;
34
+ allowAdd?: boolean;
35
+ addNewText?: string;
36
+ onAdd?: (value: string) => void;
37
+ allowClear?: boolean;
38
+ }
39
+ export declare const SelectBox: React.FC<SelectBoxProps>;
40
+ export {};
@@ -0,0 +1,48 @@
1
+ import React, { type HTMLAttributes, type MouseEventHandler, type ReactNode, type TdHTMLAttributes, type ThHTMLAttributes } from 'react';
2
+ interface TableProps {
3
+ layout?: 'fixed' | 'auto';
4
+ wrapperClass?: string;
5
+ className?: string;
6
+ children: ReactNode;
7
+ }
8
+ interface TableHeadProps {
9
+ className?: string;
10
+ children: ReactNode;
11
+ onSort?: MouseEventHandler<HTMLElement>;
12
+ }
13
+ interface TableBodyProps {
14
+ className?: string;
15
+ loading?: boolean;
16
+ children: ReactNode;
17
+ colSize: number;
18
+ rowSize?: number;
19
+ }
20
+ interface TableFootProps {
21
+ children: ReactNode;
22
+ }
23
+ interface EmptyTableRow {
24
+ colSpan?: number;
25
+ children: ReactNode;
26
+ }
27
+ interface TableCellProps extends TdHTMLAttributes<HTMLTableCellElement> {
28
+ className?: string;
29
+ children: ReactNode;
30
+ align?: 'left' | 'center' | 'right';
31
+ }
32
+ interface TableRowProps extends ThHTMLAttributes<HTMLTableRowElement> {
33
+ hoverable?: boolean;
34
+ }
35
+ interface TableHeaderCellProps extends HTMLAttributes<HTMLTableCellElement> {
36
+ className?: string;
37
+ children: ReactNode;
38
+ align?: 'left' | 'center' | 'right';
39
+ }
40
+ export declare const Table: React.FC<TableProps>;
41
+ export declare const TabelHead: React.FC<TableHeadProps>;
42
+ export declare const TabelBody: React.FC<TableBodyProps>;
43
+ export declare const TabelFoot: React.FC<TableFootProps>;
44
+ export declare const TableRow: React.FC<TableRowProps>;
45
+ export declare const TableCell: React.FC<TableCellProps>;
46
+ export declare const TableHeaderCell: React.FC<TableHeaderCellProps>;
47
+ export declare const EmptyTableRow: React.FC<EmptyTableRow>;
48
+ export {};
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const Tabs: React.FC;
@@ -0,0 +1,12 @@
1
+ import React, { type HTMLAttributes, type JSX, type JSXElementConstructor } from 'react';
2
+ export type TagVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'error';
3
+ export interface TagProps extends HTMLAttributes<HTMLElement> {
4
+ as?: keyof JSX.IntrinsicElements | JSXElementConstructor<any>;
5
+ text: string;
6
+ onClose?: () => void;
7
+ variant?: TagVariant;
8
+ }
9
+ export type VariantMap = {
10
+ [k in TagVariant]: string;
11
+ };
12
+ export declare const Tag: React.FC<TagProps>;
@@ -0,0 +1,10 @@
1
+ import React, { type HTMLAttributes, type JSX, type JSXElementConstructor } from 'react';
2
+ export interface TextContentProps extends HTMLAttributes<HTMLSpanElement> {
3
+ xsmall?: boolean;
4
+ small?: boolean;
5
+ strong?: boolean;
6
+ muted?: boolean;
7
+ error?: boolean;
8
+ as?: keyof JSX.IntrinsicElements | JSXElementConstructor<any>;
9
+ }
10
+ export declare const TextContent: React.FC<TextContentProps>;
@@ -0,0 +1,7 @@
1
+ import React, { type TextareaHTMLAttributes, type ReactNode } from 'react';
2
+ import { type InputCustomProps } from '../common-type';
3
+ export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement>, InputCustomProps {
4
+ rightGroup?: ReactNode | null;
5
+ leftGroup?: ReactNode | null;
6
+ }
7
+ export declare const Textarea: React.FC<TextareaProps>;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface ToastProps {
3
+ id?: number;
4
+ message: string;
5
+ type: 'success' | 'error' | 'info' | 'warning';
6
+ onClose: () => void;
7
+ }
8
+ declare const Toast: React.FC<ToastProps>;
9
+ export default Toast;
@@ -0,0 +1,16 @@
1
+ import React, { type ReactNode } from 'react';
2
+ type ToastType = 'success' | 'error' | 'info' | 'warning';
3
+ interface ToastOptions {
4
+ type?: ToastType;
5
+ duration?: number;
6
+ autoClose?: boolean;
7
+ }
8
+ interface ToastContextType {
9
+ showToast: (message: string, options?: ToastOptions) => void;
10
+ closeToast: (id: number) => void;
11
+ }
12
+ export declare const useToast: () => ToastContextType;
13
+ export declare const ToastProvider: React.FC<{
14
+ children: ReactNode;
15
+ }>;
16
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './ToastProvider';
2
+ export * from './Toast';
@@ -0,0 +1,31 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface InputCustomProps {
3
+ /**
4
+ * Input field label
5
+ */
6
+ label?: string | ReactNode;
7
+ /**
8
+ * Any label hint for the input field
9
+ */
10
+ labelHint?: string | ReactNode;
11
+ /**
12
+ * Label classes
13
+ */
14
+ labelClass?: string;
15
+ /**
16
+ * Input field container class
17
+ */
18
+ containerClass?: string;
19
+ /**
20
+ * Input label wrapper class
21
+ */
22
+ labelWrapperClass?: string;
23
+ /**
24
+ * Input field error
25
+ */
26
+ error?: string | ReactNode;
27
+ /**
28
+ * Controls weather to show error message or not.
29
+ */
30
+ showErrorMessage?: boolean;
31
+ }
@@ -0,0 +1 @@
1
+ export declare const useDebounce: <T>(value: T, delay: number) => T;