alope-ui 1.0.7 → 1.1.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.
- package/README.md +455 -396
- package/dist/components/Avatar/Avatar.d.ts +38 -0
- package/dist/components/Avatar/AvatarGroup.d.ts +10 -0
- package/dist/components/FileUpload/FIleUpload.d.ts +14 -0
- package/dist/components/Pagination/Pagination.d.ts +22 -0
- package/dist/components/Skeleton/Skeleton.d.ts +10 -0
- package/dist/components/Spinner/Spinner.d.ts +23 -0
- package/dist/components/Table/Table.d.ts +34 -0
- package/dist/components/Tabs/Tabs.d.ts +57 -0
- package/dist/components/Textarea/Textarea.d.ts +8 -0
- package/dist/components/Toggle/Toggle.d.ts +27 -0
- package/dist/components/Tooltip/Tooltip.d.ts +14 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/index.css +1 -1
- package/dist/main.cjs +339 -287
- package/dist/main.d.ts +11 -0
- package/package.json +5 -2
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
declare const AvatarSize: {
|
|
3
|
+
sm: string;
|
|
4
|
+
md: string;
|
|
5
|
+
lg: string;
|
|
6
|
+
};
|
|
7
|
+
declare const AvatarVariant: {
|
|
8
|
+
solid: string;
|
|
9
|
+
outline: string;
|
|
10
|
+
};
|
|
11
|
+
declare const AvatarShape: {
|
|
12
|
+
sharp: string;
|
|
13
|
+
cornered: string;
|
|
14
|
+
rounded: string;
|
|
15
|
+
};
|
|
16
|
+
declare const AvatarFallbackColor: {
|
|
17
|
+
primary: string;
|
|
18
|
+
error: string;
|
|
19
|
+
warning: string;
|
|
20
|
+
success: string;
|
|
21
|
+
info: string;
|
|
22
|
+
secondary: string;
|
|
23
|
+
};
|
|
24
|
+
export type AvatarProps = {
|
|
25
|
+
imageSrc?: string;
|
|
26
|
+
shape?: keyof typeof AvatarShape;
|
|
27
|
+
variant?: keyof typeof AvatarVariant;
|
|
28
|
+
size?: keyof typeof AvatarSize;
|
|
29
|
+
ring?: boolean;
|
|
30
|
+
ringClassName?: string;
|
|
31
|
+
fallbackName?: string;
|
|
32
|
+
fallbackColor?: keyof typeof AvatarFallbackColor;
|
|
33
|
+
alt?: string;
|
|
34
|
+
status?: 'online' | 'offline';
|
|
35
|
+
className?: string;
|
|
36
|
+
};
|
|
37
|
+
export declare const Avatar: React.FC<AvatarProps>;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AvatarProps } from './Avatar';
|
|
3
|
+
export type AvatarGroupProps = {
|
|
4
|
+
avatars: AvatarProps[];
|
|
5
|
+
maxVisible?: number;
|
|
6
|
+
size?: AvatarProps['size'];
|
|
7
|
+
overlap?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const AvatarGroup: React.FC<AvatarGroupProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface FileUploadProps {
|
|
3
|
+
acceptedFiles?: string;
|
|
4
|
+
maxFiles?: number;
|
|
5
|
+
helperText?: string;
|
|
6
|
+
inputLabel?: string;
|
|
7
|
+
maxByte?: number;
|
|
8
|
+
mediaCapture?: 'user' | 'environment';
|
|
9
|
+
mode?: 'dropzone' | 'textinput';
|
|
10
|
+
clearable?: boolean;
|
|
11
|
+
onFilesChange: (files: File[]) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const FileUpload: React.FC<FileUploadProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type PaginationProps = {
|
|
2
|
+
currentPage: number;
|
|
3
|
+
format?: 'none' | 'long';
|
|
4
|
+
count?: number;
|
|
5
|
+
pageSize?: number;
|
|
6
|
+
simplified?: boolean;
|
|
7
|
+
asLink?: boolean;
|
|
8
|
+
getPageHref?: (page: number) => string;
|
|
9
|
+
totalPages?: number;
|
|
10
|
+
onPageChange: (page: number) => void;
|
|
11
|
+
siblingCount?: number;
|
|
12
|
+
prevIcon?: React.ReactNode;
|
|
13
|
+
nextIcon?: React.ReactNode;
|
|
14
|
+
size?: keyof typeof PaginationSizes;
|
|
15
|
+
};
|
|
16
|
+
declare const PaginationSizes: {
|
|
17
|
+
sm: string;
|
|
18
|
+
md: string;
|
|
19
|
+
lg: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const Pagination: React.FC<PaginationProps>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type SkeletonProps = {
|
|
3
|
+
width?: string;
|
|
4
|
+
height?: string;
|
|
5
|
+
rounded?: boolean;
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
animode?: "shimmer" | "flash";
|
|
9
|
+
};
|
|
10
|
+
export declare const Skeleton: React.FC<SkeletonProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
declare const SpinnerSize: {
|
|
3
|
+
sm: string;
|
|
4
|
+
md: string;
|
|
5
|
+
lg: string;
|
|
6
|
+
};
|
|
7
|
+
declare const SpinnerColor: {
|
|
8
|
+
primary: string;
|
|
9
|
+
error: string;
|
|
10
|
+
warning: string;
|
|
11
|
+
success: string;
|
|
12
|
+
info: string;
|
|
13
|
+
secondary: string;
|
|
14
|
+
};
|
|
15
|
+
export type SpinnerProps = {
|
|
16
|
+
size?: keyof typeof SpinnerSize;
|
|
17
|
+
color?: keyof typeof SpinnerColor;
|
|
18
|
+
className?: string;
|
|
19
|
+
duration?: number;
|
|
20
|
+
thickness?: number | undefined;
|
|
21
|
+
};
|
|
22
|
+
export declare const Spinner: React.FC<SpinnerProps>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type Column<T> = {
|
|
2
|
+
header: string;
|
|
3
|
+
accessor: keyof T;
|
|
4
|
+
render?: (value: T[keyof T], row: T) => React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
declare const TableSize: {
|
|
7
|
+
sm: string;
|
|
8
|
+
md: string;
|
|
9
|
+
lg: string;
|
|
10
|
+
};
|
|
11
|
+
export type TableType<T> = {
|
|
12
|
+
columns: Column<T>[];
|
|
13
|
+
data: T[];
|
|
14
|
+
striped?: boolean;
|
|
15
|
+
stripeColor?: string;
|
|
16
|
+
headerClassName?: string;
|
|
17
|
+
dataColumnClassName?: string;
|
|
18
|
+
dataRowClassName?: string;
|
|
19
|
+
tableClassName?: string;
|
|
20
|
+
captionClassName?: string;
|
|
21
|
+
containerClassName?: string;
|
|
22
|
+
customEmptyData?: React.ReactNode;
|
|
23
|
+
size?: keyof typeof TableSize;
|
|
24
|
+
caption?: string;
|
|
25
|
+
captionPosition?: 'top' | 'bottom';
|
|
26
|
+
stickyHeader?: boolean;
|
|
27
|
+
selectable?: boolean;
|
|
28
|
+
onSelectionChange?: (selected: T[]) => void;
|
|
29
|
+
selectedRows?: T[];
|
|
30
|
+
};
|
|
31
|
+
export declare function Table<T extends {
|
|
32
|
+
id: any;
|
|
33
|
+
}>({ columns, data, striped, stripeColor, headerClassName, dataColumnClassName, dataRowClassName, customEmptyData, tableClassName, captionClassName, containerClassName, size, caption, captionPosition, stickyHeader, selectable, onSelectionChange, selectedRows, }: TableType<T>): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
declare const TabsVariants: {
|
|
2
|
+
line: {
|
|
3
|
+
wrapper: string;
|
|
4
|
+
button: string;
|
|
5
|
+
active: string;
|
|
6
|
+
inactive: string;
|
|
7
|
+
};
|
|
8
|
+
solid: {
|
|
9
|
+
wrapper: string;
|
|
10
|
+
button: string;
|
|
11
|
+
active: string;
|
|
12
|
+
inactive: string;
|
|
13
|
+
};
|
|
14
|
+
subtle: {
|
|
15
|
+
wrapper: string;
|
|
16
|
+
button: string;
|
|
17
|
+
active: string;
|
|
18
|
+
inactive: string;
|
|
19
|
+
};
|
|
20
|
+
inline: {
|
|
21
|
+
wrapper: string;
|
|
22
|
+
button: string;
|
|
23
|
+
active: string;
|
|
24
|
+
inactive: string;
|
|
25
|
+
};
|
|
26
|
+
outline: {
|
|
27
|
+
wrapper: string;
|
|
28
|
+
button: string;
|
|
29
|
+
active: string;
|
|
30
|
+
inactive: string;
|
|
31
|
+
};
|
|
32
|
+
plain: {
|
|
33
|
+
wrapper: string;
|
|
34
|
+
button: string;
|
|
35
|
+
active: string;
|
|
36
|
+
inactive: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export type Tabs = {
|
|
40
|
+
label: string;
|
|
41
|
+
content: React.ReactNode;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
link?: string;
|
|
44
|
+
};
|
|
45
|
+
export type TabsProps = {
|
|
46
|
+
tabs: Tabs[];
|
|
47
|
+
variant?: keyof typeof TabsVariants;
|
|
48
|
+
fitted?: boolean;
|
|
49
|
+
wrapperClassName?: string;
|
|
50
|
+
buttonClassName?: string;
|
|
51
|
+
activeClassName?: string;
|
|
52
|
+
inactiveClassName?: string;
|
|
53
|
+
activeTab?: number;
|
|
54
|
+
onTabChange?: (index: number) => void;
|
|
55
|
+
};
|
|
56
|
+
export declare const Tabs: React.FC<TabsProps>;
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React, InputHTMLAttributes } from 'react';
|
|
2
|
+
export type TextareaType = {
|
|
3
|
+
label?: string;
|
|
4
|
+
error?: string;
|
|
5
|
+
autoResize?: boolean;
|
|
6
|
+
customClassName?: string;
|
|
7
|
+
} & InputHTMLAttributes<HTMLTextAreaElement>;
|
|
8
|
+
export declare const Textarea: React.FC<TextareaType>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
export declare const ToggleVariant: {
|
|
3
|
+
primary: string;
|
|
4
|
+
error: string;
|
|
5
|
+
warning: string;
|
|
6
|
+
success: string;
|
|
7
|
+
info: string;
|
|
8
|
+
secondary: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const ToggleThumbShape: {
|
|
11
|
+
stadium: string;
|
|
12
|
+
rounded: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const ToggleSize: {
|
|
15
|
+
sm: string;
|
|
16
|
+
md: string;
|
|
17
|
+
lg: string;
|
|
18
|
+
};
|
|
19
|
+
export type ToggleProps = {
|
|
20
|
+
customSize?: keyof typeof ToggleSize;
|
|
21
|
+
variant?: keyof typeof ToggleVariant;
|
|
22
|
+
thumbShape?: keyof typeof ToggleThumbShape;
|
|
23
|
+
label?: string;
|
|
24
|
+
wrapperClassName?: string;
|
|
25
|
+
labelClassName?: string;
|
|
26
|
+
} & InputHTMLAttributes<HTMLInputElement>;
|
|
27
|
+
export declare const Toggle: React.FC<ToggleProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type TooltipProps = {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
text: string;
|
|
4
|
+
showArrow?: boolean;
|
|
5
|
+
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
6
|
+
offset?: number;
|
|
7
|
+
bgColor?: string;
|
|
8
|
+
isOpen?: boolean;
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
animationDuration?: number;
|
|
12
|
+
delay?: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const Tooltip: React.FC<TooltipProps>;
|
|
@@ -11,3 +11,14 @@ export { SelectInput } from './SelectInput/SelectInput';
|
|
|
11
11
|
export { RadioInput } from './RadioInput/RadioInput';
|
|
12
12
|
export { CheckboxInput } from './CheckboxInput/CheckboxInput';
|
|
13
13
|
export { ListCheckboxInput } from './CheckboxInput/ListCheckboxInput';
|
|
14
|
+
export { Pagination } from './Pagination/Pagination';
|
|
15
|
+
export { Table } from './Table/Table';
|
|
16
|
+
export { Tooltip } from './Tooltip/Tooltip';
|
|
17
|
+
export { Spinner } from './Spinner/Spinner';
|
|
18
|
+
export { Skeleton } from './Skeleton/Skeleton';
|
|
19
|
+
export { Toggle } from './Toggle/Toggle';
|
|
20
|
+
export { Textarea } from './Textarea/Textarea';
|
|
21
|
+
export { Avatar } from './Avatar/Avatar';
|
|
22
|
+
export { AvatarGroup } from './Avatar/AvatarGroup';
|
|
23
|
+
export { FileUpload } from './FileUpload/FIleUpload';
|
|
24
|
+
export { Tabs } from './Tabs/Tabs';
|
package/dist/index.css
CHANGED
|
@@ -1 +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";
|
|
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; }@layer components{@keyframes flash-anim{0%{background-color:#a3b7c299}to{background-color:#d1dbe099}}.flash{animation:flash-anim .8s linear infinite alternate}@keyframes shimmer-anim{0%{background-position:-200% 0}to{background-position:200% 0}}.shimmer{position:relative;overflow:hidden;background:linear-gradient(90deg,#b3c3ccb3 25%,#e7ecefe6,#b3c3ccb3 75%);background-size:200% 100%;animation:shimmer-anim 2.5s infinite linear}}*{font-family:Inter,sans-serif;font-optical-sizing:auto;font-style:normal}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@source "../dist";
|