@velocityuikit/velocityui 0.1.10
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 +85 -0
- package/dist/components/Accordion/Accordion.d.ts +18 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/Alert/Alert.d.ts +11 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.d.ts +14 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Badge/Badge.d.ts +12 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +11 -0
- package/dist/components/Breadcrumb/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +14 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Card/Card.d.ts +29 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +10 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Dialog/Dialog.d.ts +32 -0
- package/dist/components/Dialog/index.d.ts +2 -0
- package/dist/components/Divider/Divider.d.ts +8 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Dropdown/Dropdown.d.ts +26 -0
- package/dist/components/Dropdown/index.d.ts +2 -0
- package/dist/components/EmptyState/EmptyState.d.ts +9 -0
- package/dist/components/EmptyState/index.d.ts +2 -0
- package/dist/components/FileUpload/FileUpload.d.ts +15 -0
- package/dist/components/FileUpload/index.d.ts +2 -0
- package/dist/components/Input/Input.d.ts +21 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/NumberInput/NumberInput.d.ts +15 -0
- package/dist/components/NumberInput/index.d.ts +2 -0
- package/dist/components/Pagination/Pagination.d.ts +10 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Popover/Popover.d.ts +12 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Progress/Progress.d.ts +12 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +24 -0
- package/dist/components/RadioGroup/index.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +19 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.d.ts +10 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Slider/Slider.d.ts +14 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Spinner/Spinner.d.ts +10 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Stepper/Stepper.d.ts +15 -0
- package/dist/components/Stepper/index.d.ts +2 -0
- package/dist/components/Switch/Switch.d.ts +9 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Table/Table.d.ts +21 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Tabs/Tabs.d.ts +17 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tag/Tag.d.ts +12 -0
- package/dist/components/Tag/index.d.ts +2 -0
- package/dist/components/Textarea/Textarea.d.ts +14 -0
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Title/Title.d.ts +17 -0
- package/dist/components/Title/index.d.ts +2 -0
- package/dist/components/Toast/Toast.d.ts +17 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +10 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.js +2259 -0
- package/dist/style.css +1 -0
- package/package.json +59 -0
package/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# @clow99/velocityui
|
|
2
|
+
|
|
3
|
+
Modern, accessible React UI components with scoped styles and TypeScript support.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @clow99/velocityui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Peer dependencies:
|
|
12
|
+
|
|
13
|
+
- `react` >= 18
|
|
14
|
+
- `react-dom` >= 18
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
Import the stylesheet once at your app root:
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import '@clow99/velocityui/dist/style.css'
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Use components in your app:
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import { Button, Card, Input, Title } from '@clow99/velocityui'
|
|
28
|
+
|
|
29
|
+
export function Example() {
|
|
30
|
+
return (
|
|
31
|
+
<Card variant="shadow">
|
|
32
|
+
<Card.Header>
|
|
33
|
+
<Title level="h2">Welcome</Title>
|
|
34
|
+
</Card.Header>
|
|
35
|
+
<Card.Body>
|
|
36
|
+
<Input label="Email" placeholder="you@example.com" />
|
|
37
|
+
<Button>Continue</Button>
|
|
38
|
+
</Card.Body>
|
|
39
|
+
</Card>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Available Exports
|
|
45
|
+
|
|
46
|
+
The library exports all components from `src/index.ts`, including:
|
|
47
|
+
|
|
48
|
+
- Form/input: `Input`, `Textarea`, `Select`, `Checkbox`, `RadioGroup`, `Switch`, `Slider`, `NumberInput`, `FileUpload`
|
|
49
|
+
- Layout/content: `Card`, `Title`, `Badge`, `Alert`, `Divider`, `Accordion`, `Tabs`, `Table`
|
|
50
|
+
- Feedback/overlay: `Tooltip`, `Dialog`, `Popover`, `Dropdown`, `Spinner`, `Skeleton`, `Progress`, `ToastProvider`, `useToast`
|
|
51
|
+
- Navigation/misc: `Avatar`, `Tag`, `EmptyState`, `Breadcrumb`, `Pagination`, `Stepper`
|
|
52
|
+
|
|
53
|
+
## Local Development
|
|
54
|
+
|
|
55
|
+
From the workspace root:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pnpm --filter velocityui build
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Build output is written to `dist/`:
|
|
62
|
+
|
|
63
|
+
- `dist/index.js` (ESM)
|
|
64
|
+
- `dist/index.cjs` (CJS)
|
|
65
|
+
- `dist/index.d.ts` (types)
|
|
66
|
+
- `dist/style.css` (bundled styles)
|
|
67
|
+
|
|
68
|
+
Watch mode:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pnpm --filter velocityui dev
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Typecheck:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pnpm --filter velocityui lint
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Run tests:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pnpm --filter velocityui test
|
|
84
|
+
pnpm --filter velocityui test:run
|
|
85
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type AccordionVariant = 'bordered' | 'flush' | 'separated';
|
|
4
|
+
export interface AccordionItem {
|
|
5
|
+
value: string;
|
|
6
|
+
title: string;
|
|
7
|
+
content: React.ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface AccordionProps {
|
|
11
|
+
items: AccordionItem[];
|
|
12
|
+
defaultValue?: string | string[];
|
|
13
|
+
value?: string | string[];
|
|
14
|
+
onChange?: (value: string | string[]) => void;
|
|
15
|
+
multiple?: boolean;
|
|
16
|
+
variant?: AccordionVariant;
|
|
17
|
+
}
|
|
18
|
+
export declare const Accordion: React.FC<AccordionProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type AlertVariant = 'info' | 'success' | 'warning' | 'danger';
|
|
4
|
+
export interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
variant?: AlertVariant;
|
|
6
|
+
title?: string;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const Alert: React.FC<AlertProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
export type AvatarShape = 'circle' | 'square';
|
|
5
|
+
export type AvatarStatus = 'online' | 'away' | 'offline';
|
|
6
|
+
export interface AvatarProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
7
|
+
src?: string;
|
|
8
|
+
alt?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
size?: AvatarSize;
|
|
11
|
+
shape?: AvatarShape;
|
|
12
|
+
status?: AvatarStatus;
|
|
13
|
+
}
|
|
14
|
+
export declare const Avatar: React.FC<AvatarProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type BadgeVariant = 'default' | 'info' | 'success' | 'warning' | 'danger' | 'primary';
|
|
4
|
+
export type BadgeSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
6
|
+
variant?: BadgeVariant;
|
|
7
|
+
size?: BadgeSize;
|
|
8
|
+
dot?: boolean;
|
|
9
|
+
leftIcon?: React.ReactNode;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const Badge: React.FC<BadgeProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface BreadcrumbItem {
|
|
4
|
+
label: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface BreadcrumbProps extends React.HTMLAttributes<HTMLElement> {
|
|
8
|
+
items: BreadcrumbItem[];
|
|
9
|
+
separator?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const Breadcrumb: React.FC<BreadcrumbProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';
|
|
4
|
+
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
fullWidth?: boolean;
|
|
10
|
+
leftIcon?: React.ReactNode;
|
|
11
|
+
rightIcon?: React.ReactNode;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type CardVariant = 'bordered' | 'shadow' | 'elevated' | 'ghost';
|
|
4
|
+
export type CardSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
variant?: CardVariant;
|
|
7
|
+
size?: CardSize;
|
|
8
|
+
hoverable?: boolean;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export interface CardBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export interface CardFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
declare const CardHeader: React.FC<CardHeaderProps>;
|
|
21
|
+
declare const CardBody: React.FC<CardBodyProps>;
|
|
22
|
+
declare const CardFooter: React.FC<CardFooterProps>;
|
|
23
|
+
interface CardComponent extends React.FC<CardProps> {
|
|
24
|
+
Header: typeof CardHeader;
|
|
25
|
+
Body: typeof CardBody;
|
|
26
|
+
Footer: typeof CardFooter;
|
|
27
|
+
}
|
|
28
|
+
export declare const Card: CardComponent;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type CheckboxSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
5
|
+
label?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
error?: string;
|
|
8
|
+
size?: CheckboxSize;
|
|
9
|
+
}
|
|
10
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type DialogSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
export interface DialogProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
size?: DialogSize;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
closeOnOverlayClick?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface DialogHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export interface DialogBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export interface DialogFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
declare const DialogHeader: React.FC<DialogHeaderProps>;
|
|
24
|
+
declare const DialogBody: React.FC<DialogBodyProps>;
|
|
25
|
+
declare const DialogFooter: React.FC<DialogFooterProps>;
|
|
26
|
+
interface DialogComponent extends React.FC<DialogProps> {
|
|
27
|
+
Header: typeof DialogHeader;
|
|
28
|
+
Body: typeof DialogBody;
|
|
29
|
+
Footer: typeof DialogFooter;
|
|
30
|
+
}
|
|
31
|
+
export declare const Dialog: DialogComponent;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type DividerOrientation = 'horizontal' | 'vertical';
|
|
4
|
+
export interface DividerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
orientation?: DividerOrientation;
|
|
6
|
+
label?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const Divider: React.FC<DividerProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type DropdownPlacement = 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
|
|
4
|
+
type DropdownActionItem = {
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
separator?: false;
|
|
10
|
+
};
|
|
11
|
+
type DropdownSeparatorItem = {
|
|
12
|
+
separator: true;
|
|
13
|
+
label?: never;
|
|
14
|
+
icon?: never;
|
|
15
|
+
onClick?: never;
|
|
16
|
+
disabled?: never;
|
|
17
|
+
};
|
|
18
|
+
export type DropdownItem = DropdownActionItem | DropdownSeparatorItem;
|
|
19
|
+
export interface DropdownProps {
|
|
20
|
+
trigger: React.ReactNode;
|
|
21
|
+
items: DropdownItem[];
|
|
22
|
+
placement?: DropdownPlacement;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const Dropdown: React.FC<DropdownProps>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface EmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
icon?: React.ReactNode;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
action?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const EmptyState: React.FC<EmptyStateProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface FileUploadProps {
|
|
4
|
+
accept?: string;
|
|
5
|
+
multiple?: boolean;
|
|
6
|
+
maxSize?: number;
|
|
7
|
+
onChange?: (files: File[]) => void;
|
|
8
|
+
label?: string;
|
|
9
|
+
hint?: string;
|
|
10
|
+
error?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
id?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const FileUpload: React.FC<FileUploadProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type InputSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type InputIconPosition = 'left' | 'right';
|
|
5
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
6
|
+
label?: string;
|
|
7
|
+
size?: InputSize;
|
|
8
|
+
error?: string;
|
|
9
|
+
hint?: string;
|
|
10
|
+
leftIcon?: React.ReactNode;
|
|
11
|
+
rightIcon?: React.ReactNode;
|
|
12
|
+
search?: boolean;
|
|
13
|
+
searchIcon?: React.ReactNode;
|
|
14
|
+
searchIconPosition?: InputIconPosition;
|
|
15
|
+
leftIconClassName?: string;
|
|
16
|
+
rightIconClassName?: string;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
fullWidth?: boolean;
|
|
19
|
+
floatingLabel?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type NumberInputSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface NumberInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size' | 'onChange'> {
|
|
5
|
+
value?: number;
|
|
6
|
+
onChange?: (value: number) => void;
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
step?: number;
|
|
10
|
+
label?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
hint?: string;
|
|
13
|
+
size?: NumberInputSize;
|
|
14
|
+
}
|
|
15
|
+
export declare const NumberInput: React.FC<NumberInputProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> {
|
|
4
|
+
page: number;
|
|
5
|
+
totalPages: number;
|
|
6
|
+
onChange: (page: number) => void;
|
|
7
|
+
siblingCount?: number;
|
|
8
|
+
showFirstLast?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const Pagination: React.FC<PaginationProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
4
|
+
export interface PopoverProps {
|
|
5
|
+
trigger: React.ReactNode;
|
|
6
|
+
content: React.ReactNode;
|
|
7
|
+
placement?: PopoverPlacement;
|
|
8
|
+
open?: boolean;
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const Popover: React.FC<PopoverProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type ProgressVariant = 'primary' | 'success' | 'warning' | 'danger';
|
|
4
|
+
export type ProgressSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
value: number;
|
|
7
|
+
variant?: ProgressVariant;
|
|
8
|
+
size?: ProgressSize;
|
|
9
|
+
label?: string;
|
|
10
|
+
showValue?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const Progress: React.FC<ProgressProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type RadioGroupSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type RadioGroupOrientation = 'vertical' | 'horizontal';
|
|
5
|
+
export interface RadioOption {
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface RadioGroupProps {
|
|
12
|
+
name: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
options: RadioOption[];
|
|
15
|
+
value?: string;
|
|
16
|
+
defaultValue?: string;
|
|
17
|
+
onChange?: (value: string) => void;
|
|
18
|
+
size?: RadioGroupSize;
|
|
19
|
+
orientation?: RadioGroupOrientation;
|
|
20
|
+
error?: string;
|
|
21
|
+
hint?: string;
|
|
22
|
+
required?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const RadioGroup: React.FC<RadioGroupProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type SelectSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface SelectOption {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
10
|
+
label?: string;
|
|
11
|
+
size?: SelectSize;
|
|
12
|
+
error?: string;
|
|
13
|
+
hint?: string;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
fullWidth?: boolean;
|
|
16
|
+
options?: SelectOption[];
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SkeletonProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
width?: string | number;
|
|
5
|
+
height?: string | number;
|
|
6
|
+
radius?: string | number;
|
|
7
|
+
lines?: number;
|
|
8
|
+
gap?: string | number;
|
|
9
|
+
}
|
|
10
|
+
export declare const Skeleton: React.FC<SkeletonProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type SliderSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface SliderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size' | 'onChange'> {
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
value?: number;
|
|
9
|
+
onChange?: (value: number) => void;
|
|
10
|
+
label?: string;
|
|
11
|
+
showValue?: boolean;
|
|
12
|
+
size?: SliderSize;
|
|
13
|
+
}
|
|
14
|
+
export declare const Slider: React.FC<SliderProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type SpinnerSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type SpinnerColor = 'primary' | 'muted' | 'white';
|
|
5
|
+
export interface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
6
|
+
size?: SpinnerSize;
|
|
7
|
+
color?: SpinnerColor;
|
|
8
|
+
label?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const Spinner: React.FC<SpinnerProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type StepperOrientation = 'horizontal' | 'vertical';
|
|
4
|
+
export type StepperVariant = 'default' | 'compact';
|
|
5
|
+
export interface StepItem {
|
|
6
|
+
label: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
steps: StepItem[];
|
|
11
|
+
currentStep: number;
|
|
12
|
+
orientation?: StepperOrientation;
|
|
13
|
+
variant?: StepperVariant;
|
|
14
|
+
}
|
|
15
|
+
export declare const Stepper: React.FC<StepperProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type SwitchSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
5
|
+
label?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
size?: SwitchSize;
|
|
8
|
+
}
|
|
9
|
+
export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type TableSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type SortDirection = 'asc' | 'desc';
|
|
5
|
+
export interface TableColumn<T = Record<string, unknown>> {
|
|
6
|
+
key: string;
|
|
7
|
+
header: string;
|
|
8
|
+
sortable?: boolean;
|
|
9
|
+
render?: (value: unknown, row: T, index: number) => React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface TableProps<T = Record<string, unknown>> extends React.HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
columns: TableColumn<T>[];
|
|
13
|
+
data: T[];
|
|
14
|
+
sortKey?: string;
|
|
15
|
+
sortDir?: SortDirection;
|
|
16
|
+
onSort?: (key: string, dir: SortDirection) => void;
|
|
17
|
+
striped?: boolean;
|
|
18
|
+
bordered?: boolean;
|
|
19
|
+
size?: TableSize;
|
|
20
|
+
}
|
|
21
|
+
export declare function Table<T = Record<string, unknown>>({ columns, data, sortKey, sortDir, onSort, striped, bordered, size, className, ...props }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|