alope-ui 1.0.6

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.
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ type AccordionItem = {
3
+ label: string;
4
+ description: string;
5
+ };
6
+ export type AccordionProps = {
7
+ data: AccordionItem[];
8
+ openIndex?: number | number[] | null;
9
+ single?: boolean;
10
+ onToggleItem?: (index: number | number[] | null) => void;
11
+ icon?: React.ReactNode | ((isOpen: boolean) => React.ReactNode);
12
+ className?: string;
13
+ labelClassName?: string;
14
+ labelContainerClassName?: string;
15
+ descriptionClassName?: string;
16
+ } & React.HTMLAttributes<HTMLDivElement>;
17
+ export declare const Accordion: React.FC<AccordionProps>;
18
+ export {};
@@ -0,0 +1,34 @@
1
+ declare const AlertVariants: {
2
+ outline: string;
3
+ solid: string;
4
+ };
5
+ declare const IconColors: {
6
+ success: string;
7
+ info: string;
8
+ error: string;
9
+ warning: string;
10
+ primary: string;
11
+ default: string;
12
+ };
13
+ declare const AlertType: {
14
+ success: string;
15
+ info: string;
16
+ warning: string;
17
+ error: string;
18
+ primary: string;
19
+ default: string;
20
+ };
21
+ export type AlertProps = {
22
+ title: string;
23
+ description?: string;
24
+ type?: keyof typeof AlertType;
25
+ variant?: keyof typeof AlertVariants;
26
+ icon?: React.ReactNode;
27
+ withClose?: boolean;
28
+ titleClassName?: string;
29
+ descriptionClassName?: string;
30
+ action?: React.ReactNode | (() => React.ReactNode);
31
+ iconColor?: keyof typeof IconColors;
32
+ };
33
+ export declare const Alert: React.FC<AlertProps>;
34
+ export {};
@@ -0,0 +1,25 @@
1
+ import { default as React } from 'react';
2
+ declare const BadgeVariants: {
3
+ default: string;
4
+ secondary: string;
5
+ success: string;
6
+ error: string;
7
+ info: string;
8
+ warning: string;
9
+ };
10
+ declare const BadgePositions: {
11
+ 'top-right': string;
12
+ 'top-left': string;
13
+ 'bottom-right': string;
14
+ 'bottom-left': string;
15
+ };
16
+ export type BadgeProps = {
17
+ children?: React.ReactNode | string;
18
+ variant?: keyof typeof BadgeVariants;
19
+ position?: keyof typeof BadgePositions;
20
+ isAbsolute?: boolean;
21
+ className?: string;
22
+ icon?: React.ReactNode;
23
+ } & React.ButtonHTMLAttributes<HTMLSpanElement>;
24
+ export declare const Badge: React.FC<BadgeProps>;
25
+ export {};
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ type BreadcrumbItem = {
3
+ label: string;
4
+ path?: string;
5
+ icon?: React.ReactNode;
6
+ };
7
+ type BreadcrumbProps = {
8
+ data: BreadcrumbItem[];
9
+ labelClassName?: string;
10
+ linkClassName?: string;
11
+ currentLinkClassName?: string;
12
+ separatorClassName?: string;
13
+ separator?: React.ReactNode;
14
+ };
15
+ export declare const Breadcrumb: React.FC<BreadcrumbProps>;
16
+ export {};
@@ -0,0 +1,67 @@
1
+ import { default as React } from 'react';
2
+ declare const ButtonSizes: {
3
+ sm: string;
4
+ md: string;
5
+ lg: string;
6
+ };
7
+ declare const ButtonRadius: {
8
+ regular: string;
9
+ stadium: string;
10
+ };
11
+ export declare const ButtonVariantsMap: {
12
+ primary: {
13
+ solid: string;
14
+ outline: string;
15
+ ghost: string;
16
+ plain: string;
17
+ };
18
+ error: {
19
+ solid: string;
20
+ outline: string;
21
+ ghost: string;
22
+ plain: string;
23
+ };
24
+ warning: {
25
+ solid: string;
26
+ outline: string;
27
+ ghost: string;
28
+ plain: string;
29
+ };
30
+ success: {
31
+ solid: string;
32
+ outline: string;
33
+ ghost: string;
34
+ plain: string;
35
+ };
36
+ info: {
37
+ solid: string;
38
+ outline: string;
39
+ ghost: string;
40
+ plain: string;
41
+ };
42
+ secondary: {
43
+ solid: string;
44
+ outline: string;
45
+ ghost: string;
46
+ plain: string;
47
+ };
48
+ };
49
+ export type VariantType = keyof typeof ButtonVariantsMap;
50
+ export type Variant = keyof typeof ButtonVariantsMap[VariantType];
51
+ export type ButtonProps = {
52
+ children?: React.ReactNode | string;
53
+ onClick?: () => void;
54
+ size?: keyof typeof ButtonSizes;
55
+ to?: string;
56
+ variant?: Variant;
57
+ variantType?: VariantType;
58
+ borderType?: keyof typeof ButtonRadius;
59
+ type?: 'button' | 'submit' | 'reset';
60
+ disabled?: boolean;
61
+ fullWidth?: boolean;
62
+ prefixIcon?: React.ReactNode;
63
+ suffixIcon?: React.ReactNode;
64
+ className?: string;
65
+ } & React.ButtonHTMLAttributes<HTMLButtonElement>;
66
+ export declare const Button: React.FC<ButtonProps>;
67
+ export {};
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ type CardSize = 'sm' | 'md' | 'lg' | 'full';
3
+ type CardProps = {
4
+ title?: string;
5
+ description?: string;
6
+ image?: string | React.ReactNode;
7
+ onClick?: () => void;
8
+ horizontal?: boolean;
9
+ footer?: React.ReactNode;
10
+ size?: CardSize;
11
+ containerClassName?: string;
12
+ imageClassName?: string;
13
+ titleClassName?: string;
14
+ descriptionClassName?: string;
15
+ ribbon?: string;
16
+ children?: React.ReactNode;
17
+ };
18
+ export declare const Card: React.FC<CardProps>;
19
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ export interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
+ label?: React.ReactNode;
4
+ indeterminate?: boolean;
5
+ checkboxClassName?: string;
6
+ labelClassName?: string;
7
+ description?: string;
8
+ descriptionClassName?: string;
9
+ }
10
+ export declare const CheckboxInput: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,55 @@
1
+ import { default as React } from 'react';
2
+ export type CheckboxOptionType = {
3
+ label: string;
4
+ value: string;
5
+ };
6
+ declare const CheckboxSizes: {
7
+ sm: {
8
+ container: string;
9
+ checkbox: string;
10
+ label: string;
11
+ };
12
+ md: {
13
+ container: string;
14
+ checkbox: string;
15
+ label: string;
16
+ };
17
+ lg: {
18
+ container: string;
19
+ checkbox: string;
20
+ label: string;
21
+ };
22
+ };
23
+ declare const CheckboxVariants: {
24
+ solid: {
25
+ label: string;
26
+ checked: string;
27
+ checkbox: string;
28
+ checkedCheckbox: string;
29
+ };
30
+ subtle: {
31
+ label: string;
32
+ checked: string;
33
+ checkbox: string;
34
+ checkedCheckbox: string;
35
+ };
36
+ outline: {
37
+ label: string;
38
+ checked: string;
39
+ checkbox: string;
40
+ checkedCheckbox: string;
41
+ };
42
+ };
43
+ export type ListCheckBoxInputProps = {
44
+ options: CheckboxOptionType[];
45
+ selectedValues: CheckboxOptionType[] | undefined;
46
+ onValueChange: (value: CheckboxOptionType[]) => void;
47
+ containerClassName?: string;
48
+ inputLabelClassName?: (option: CheckboxOptionType, isChecked: boolean) => string;
49
+ inputGroupClassName?: (option: CheckboxOptionType, isChecked: boolean) => string;
50
+ inputCheckboxClassName?: (option: CheckboxOptionType, isChecked: boolean) => string;
51
+ variant?: keyof typeof CheckboxVariants;
52
+ checkboxSize?: keyof typeof CheckboxSizes;
53
+ } & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>;
54
+ export declare const ListCheckboxInput: React.FC<ListCheckBoxInputProps>;
55
+ export {};
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ type ModalProps = {
3
+ isOpen: boolean;
4
+ overlayClose?: boolean;
5
+ onClose: () => void;
6
+ title?: string;
7
+ children: React.ReactNode;
8
+ showCloseButton?: boolean;
9
+ size?: 'sm' | 'md' | 'lg' | 'xl';
10
+ className?: string;
11
+ };
12
+ export declare const Modal: React.FC<ModalProps>;
13
+ export {};
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ interface OffcanvasProps {
3
+ isOpen: boolean;
4
+ onClose: () => void;
5
+ title: string;
6
+ children: React.ReactNode;
7
+ position?: 'left' | 'right';
8
+ width?: 'sm' | 'md' | 'lg';
9
+ titleClassName?: string;
10
+ closeButtonClassName?: string;
11
+ className?: string;
12
+ }
13
+ export declare const Offcanvas: React.FC<OffcanvasProps>;
14
+ export {};
@@ -0,0 +1,55 @@
1
+ import { default as React } from 'react';
2
+ export type RadioOptionType = {
3
+ label: string;
4
+ value: string;
5
+ };
6
+ declare const RadioSizes: {
7
+ sm: {
8
+ container: string;
9
+ radio: string;
10
+ label: string;
11
+ };
12
+ md: {
13
+ container: string;
14
+ radio: string;
15
+ label: string;
16
+ };
17
+ lg: {
18
+ container: string;
19
+ radio: string;
20
+ label: string;
21
+ };
22
+ };
23
+ declare const RadioVariants: {
24
+ solid: {
25
+ label: string;
26
+ checked: string;
27
+ radio: string;
28
+ checkedRadio: string;
29
+ };
30
+ subtle: {
31
+ label: string;
32
+ checked: string;
33
+ radio: string;
34
+ checkedRadio: string;
35
+ };
36
+ outline: {
37
+ label: string;
38
+ checked: string;
39
+ radio: string;
40
+ checkedRadio: string;
41
+ };
42
+ };
43
+ export type RadioInputProps = {
44
+ options: RadioOptionType[];
45
+ selectedValue?: RadioOptionType;
46
+ onValueChange: (value: RadioOptionType) => void;
47
+ containerClassName?: string;
48
+ inputLabelClassName?: (isChecked: boolean, option: RadioOptionType) => string;
49
+ inputGroupClassName?: (isChecked: boolean, option: RadioOptionType) => string;
50
+ inputRadioClassName?: (isChecked: boolean, option: RadioOptionType) => string;
51
+ variant?: keyof typeof RadioVariants;
52
+ radioSize?: keyof typeof RadioSizes;
53
+ } & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>;
54
+ export declare const RadioInput: React.FC<RadioInputProps>;
55
+ export {};
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ import { Props as SelectProps, GroupBase, ClassNamesConfig } from 'react-select';
3
+ export interface SelectOptionType {
4
+ value: string;
5
+ label: string;
6
+ }
7
+ export type SelectInputProps = {
8
+ label?: string;
9
+ error?: string;
10
+ labelClassName?: string;
11
+ errorClassName?: string;
12
+ customClassNames?: ClassNamesConfig<SelectOptionType, boolean, GroupBase<SelectOptionType>>;
13
+ } & SelectProps<SelectOptionType, boolean, GroupBase<SelectOptionType>>;
14
+ export declare const SelectInput: React.FC<SelectInputProps>;
@@ -0,0 +1,6 @@
1
+ import { default as React, InputHTMLAttributes } from 'react';
2
+ export type TextInputProps = {
3
+ label?: string;
4
+ error?: string;
5
+ } & InputHTMLAttributes<HTMLInputElement>;
6
+ export declare const TextInput: React.FC<TextInputProps>;
@@ -0,0 +1,28 @@
1
+ import { default as React } from 'react';
2
+ export interface ToastProps {
3
+ title?: string;
4
+ message: string;
5
+ type: keyof typeof ToastTypes;
6
+ position?: keyof typeof ToastPositions;
7
+ variant?: keyof typeof ToastVariants;
8
+ icon?: React.ReactNode;
9
+ onClose?: () => void;
10
+ }
11
+ export declare const ToastVariants: {
12
+ outline: string;
13
+ solid: string;
14
+ };
15
+ export declare const ToastPositions: {
16
+ topLeft: string;
17
+ bottomLeft: string;
18
+ topRight: string;
19
+ bottomRight: string;
20
+ };
21
+ export declare const ToastTypes: {
22
+ success: string;
23
+ info: string;
24
+ warning: string;
25
+ error: string;
26
+ };
27
+ declare const Toast: React.FC<ToastProps>;
28
+ export default Toast;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { ToastProps } from './Toast';
3
+ interface ToastContextType {
4
+ addToast: ({ title, message, type, variant, icon, onClose }: ToastProps) => void;
5
+ }
6
+ export declare const useToast: () => ToastContextType;
7
+ interface ToastProviderProps {
8
+ children: React.ReactNode;
9
+ }
10
+ export declare const ToastProvider: React.FC<ToastProviderProps>;
11
+ export {};
@@ -0,0 +1,13 @@
1
+ export { Button } from './Button/Button';
2
+ export { Badge } from './Badge/Badge';
3
+ export { Accordion } from './Accordion/Accordion';
4
+ export { Alert } from './Alert/Alert';
5
+ export { Breadcrumb } from './Breadcrumb/Breadcrumb';
6
+ export { Card } from './Card/Card';
7
+ export { Modal } from './Modal/Modal';
8
+ export { Offcanvas } from './Offcanvas/Offcanvas';
9
+ export { TextInput } from './TextInput/TextInput';
10
+ export { SelectInput } from './SelectInput/SelectInput';
11
+ export { RadioInput } from './RadioInput/RadioInput';
12
+ export { CheckboxInput } from './CheckboxInput/CheckboxInput';
13
+ export { ListCheckboxInput } from './CheckboxInput/ListCheckboxInput';
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ @theme{ --color-success: #50C878; --color-info: #0096FF; --color-warning: #FFAC1C; --color-error: #F87171; --color-primary: #6366F1; --color-secondary: #D1D5DB; --color-primary-700: #4338CA; --color-success-700: #3C9C5A; --color-info-700: #0070C0; --color-warning-700: #CC8700; --color-error-700: #DC2626; --color-secondary-700: #9CA3AF; --color-success-30: #C2E6D3; --color-info-30: #B8DFFF; --color-warning-30: #FFE2B2; --color-error-30: #FECACA; --color-primary-30: #A6B8FF; --color-secondary-30: #E4E7EC; }@source "../dist";