@kpf_/kiso 1.0.2 → 1.1.0
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 +29 -28
- package/dist/components/atoms/Card.d.ts +12 -0
- package/dist/components/atoms/FormControls.d.ts +26 -0
- package/dist/components/atoms/Layout.d.ts +39 -0
- package/dist/components/atoms/Media.d.ts +22 -0
- package/dist/components/atoms/Status.d.ts +34 -0
- package/dist/components/atoms/Typography.d.ts +34 -0
- package/dist/components/molecules/CardSections.d.ts +28 -0
- package/dist/components/molecules/Feedback.d.ts +26 -0
- package/dist/components/molecules/FormFields.d.ts +46 -0
- package/dist/components/molecules/Interaction.d.ts +17 -0
- package/dist/components/molecules/Navigation.d.ts +32 -0
- package/dist/components/motion/HotSlider.d.ts +2 -1
- package/dist/components/motion/Magnetic.d.ts +6 -0
- package/dist/components/motion/Spotlight.d.ts +8 -0
- package/dist/components/motion/StaggerText.d.ts +3 -9
- package/dist/components/motion/TextScramble.d.ts +9 -0
- package/dist/components/motion/Tilt.d.ts +7 -0
- package/dist/components/motion/ViewTransition.d.ts +2 -1
- package/dist/components/organisms/ContentOrganisms.d.ts +5 -0
- package/dist/components/organisms/DataOrganisms.d.ts +8 -0
- package/dist/components/organisms/FormOrganisms.d.ts +4 -0
- package/dist/components/organisms/NavigationOrganisms.d.ts +18 -0
- package/dist/components/organisms/OverlayOrganisms.d.ts +14 -0
- package/dist/index.d.ts +20 -0
- package/dist/kiso.js +9000 -3206
- package/dist/kiso.umd.cjs +52 -35
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,20 +36,20 @@ import '@kpf/kiso/dist/style.css';
|
|
|
36
36
|
The system requires a global context for feedback loops (Toasts). Wrap your application root:
|
|
37
37
|
|
|
38
38
|
```typescript
|
|
39
|
-
import {
|
|
39
|
+
import { ToastProvider } from '@kpf/kiso';
|
|
40
40
|
|
|
41
41
|
function App() {
|
|
42
42
|
return (
|
|
43
|
-
<
|
|
43
|
+
<ToastProvider>
|
|
44
44
|
<YourApplication />
|
|
45
|
-
</
|
|
45
|
+
</ToastProvider>
|
|
46
46
|
);
|
|
47
47
|
}
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
## Component Architecture
|
|
51
51
|
|
|
52
|
-
Kiso
|
|
52
|
+
Kiso favors **Compound Component** patterns for complex molecules to keep the API surface minimal.
|
|
53
53
|
|
|
54
54
|
### Atoms
|
|
55
55
|
|
|
@@ -57,25 +57,25 @@ Kiso uses a specific naming convention (`Kiso[Component]`) and favors **Compound
|
|
|
57
57
|
Utilizes tactile press physics (`scale-96`) and custom easing.
|
|
58
58
|
|
|
59
59
|
```typescript
|
|
60
|
-
import {
|
|
60
|
+
import { Button } from '@kpf/kiso';
|
|
61
61
|
|
|
62
|
-
<
|
|
62
|
+
<Button variant='primary' onClick={handleClick}>
|
|
63
63
|
Confirm Action
|
|
64
|
-
</
|
|
64
|
+
</Button>
|
|
65
65
|
|
|
66
|
-
<
|
|
66
|
+
<Button variant='destructive' isLoading={isDeleting}>
|
|
67
67
|
Delete Item
|
|
68
|
-
</
|
|
68
|
+
</Button>
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
#### Input
|
|
72
72
|
Includes slot support for icons and right-aligned actions.
|
|
73
73
|
|
|
74
74
|
```typescript
|
|
75
|
-
import {
|
|
75
|
+
import { Input } from '@kpf/kiso';
|
|
76
76
|
import { MagnifyingGlass } from '@phosphor-icons/react';
|
|
77
77
|
|
|
78
|
-
<
|
|
78
|
+
<Input
|
|
79
79
|
placeholder='Search...'
|
|
80
80
|
leftIcon={<MagnifyingGlass />}
|
|
81
81
|
error={hasError}
|
|
@@ -88,23 +88,23 @@ import { MagnifyingGlass } from '@phosphor-icons/react';
|
|
|
88
88
|
Uses a compound pattern. The `Content` component handles the entrance animation automatically based on the `variant` prop (`standard` | `sheet` | `bottom`).
|
|
89
89
|
|
|
90
90
|
```typescript
|
|
91
|
-
import {
|
|
91
|
+
import { Modal } from '@kpf/kiso';
|
|
92
92
|
|
|
93
|
-
<
|
|
94
|
-
<
|
|
95
|
-
<
|
|
93
|
+
<Modal.Root open={isOpen} onOpenChange={setIsOpen}>
|
|
94
|
+
<Modal.Content variant='sheet'>
|
|
95
|
+
<Modal.Header>
|
|
96
96
|
<h2>Transaction Details</h2>
|
|
97
|
-
</
|
|
97
|
+
</Modal.Header>
|
|
98
98
|
|
|
99
99
|
<div className='p-6'>
|
|
100
100
|
{/* Content */}
|
|
101
101
|
</div>
|
|
102
102
|
|
|
103
|
-
<
|
|
104
|
-
<
|
|
105
|
-
</
|
|
106
|
-
</
|
|
107
|
-
</
|
|
103
|
+
<Modal.Footer>
|
|
104
|
+
<Button variant='secondary' onClick={close}>Close</Button>
|
|
105
|
+
</Modal.Footer>
|
|
106
|
+
</Modal.Content>
|
|
107
|
+
</Modal.Root>
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
#### Toast Feedback
|
|
@@ -133,24 +133,25 @@ Kiso provides pre-configured motion primitives powered by Framer Motion. These u
|
|
|
133
133
|
Splits strings into characters and cascades them in.
|
|
134
134
|
|
|
135
135
|
```typescript
|
|
136
|
-
import {
|
|
136
|
+
import { StaggerText } from '@kpf/kiso';
|
|
137
137
|
|
|
138
|
-
<
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
<StaggerText
|
|
139
|
+
text='Welcome Back'
|
|
140
|
+
className='text-4xl font-bold text-kiso-forest'
|
|
141
|
+
/>
|
|
141
142
|
```
|
|
142
143
|
|
|
143
144
|
#### View Transition (Wizard)
|
|
144
145
|
Handles the exit/enter overlap logic for multi-step forms.
|
|
145
146
|
|
|
146
147
|
```typescript
|
|
147
|
-
import {
|
|
148
|
+
import { ViewTransition } from '@kpf/kiso';
|
|
148
149
|
|
|
149
150
|
// direction is 'forward' | 'backward'
|
|
150
|
-
<
|
|
151
|
+
<ViewTransition direction={navDirection}>
|
|
151
152
|
{step === 1 && <StepOne key='step1' />}
|
|
152
153
|
{step === 2 && <StepTwo key='step2' />}
|
|
153
|
-
</
|
|
154
|
+
</ViewTransition>
|
|
154
155
|
```
|
|
155
156
|
|
|
156
157
|
## Design Tokens
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const cardVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "flat" | "outline" | "glass" | null | undefined;
|
|
5
|
+
rounded?: "sm" | "md" | "lg" | "none" | "xl" | null | undefined;
|
|
6
|
+
hoverable?: boolean | null | undefined;
|
|
7
|
+
padding?: "sm" | "md" | "lg" | "none" | "xl" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className">, VariantProps<typeof cardVariants> {
|
|
10
|
+
}
|
|
11
|
+
export declare const Card: React.MemoExoticComponent<React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const textareaVariants: (props?: ({
|
|
4
|
+
status?: "default" | "error" | "success" | "warning" | null | undefined;
|
|
5
|
+
rounded?: "sm" | "md" | "lg" | "none" | "xl" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export type TextareaProps = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "className"> & VariantProps<typeof textareaVariants>;
|
|
8
|
+
export declare const Textarea: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "className"> & VariantProps<(props?: ({
|
|
9
|
+
status?: "default" | "error" | "success" | "warning" | null | undefined;
|
|
10
|
+
rounded?: "sm" | "md" | "lg" | "none" | "xl" | null | undefined;
|
|
11
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLTextAreaElement>>>;
|
|
12
|
+
export type CheckboxProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "className" | "type">;
|
|
13
|
+
export declare const Checkbox: React.MemoExoticComponent<React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>>;
|
|
14
|
+
export type RadioProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "className" | "type">;
|
|
15
|
+
export declare const Radio: React.MemoExoticComponent<React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>>;
|
|
16
|
+
declare const selectVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
17
|
+
export interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "className">, VariantProps<typeof selectVariants> {
|
|
18
|
+
}
|
|
19
|
+
export declare const Select: React.MemoExoticComponent<React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>>;
|
|
20
|
+
export interface OTPInputProps {
|
|
21
|
+
length?: number;
|
|
22
|
+
onChange?: (value: string) => void;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const OTPInput: React.MemoExoticComponent<({ length, onChange, disabled }: OTPInputProps) => import("react/jsx-runtime").JSX.Element>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const dividerVariants: (props?: ({
|
|
4
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface DividerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className">, VariantProps<typeof dividerVariants> {
|
|
7
|
+
}
|
|
8
|
+
export declare const Divider: React.MemoExoticComponent<React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLDivElement>>>;
|
|
9
|
+
export interface SpacerProps {
|
|
10
|
+
size?: number | string;
|
|
11
|
+
axis?: 'horizontal' | 'vertical';
|
|
12
|
+
}
|
|
13
|
+
export declare const Spacer: React.MemoExoticComponent<({ size, axis }: SpacerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
14
|
+
export interface ContainerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className"> {
|
|
15
|
+
center?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const Container: React.MemoExoticComponent<React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>>;
|
|
18
|
+
declare const stackVariants: (props?: ({
|
|
19
|
+
direction?: "row" | "column" | "row-reverse" | "column-reverse" | null | undefined;
|
|
20
|
+
align?: "center" | "end" | "start" | "baseline" | "stretch" | null | undefined;
|
|
21
|
+
justify?: "center" | "end" | "start" | "between" | "around" | "evenly" | null | undefined;
|
|
22
|
+
gap?: 0 | 1 | 2 | 3 | 16 | 4 | 5 | 6 | 8 | 10 | 12 | null | undefined;
|
|
23
|
+
wrap?: boolean | null | undefined;
|
|
24
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
25
|
+
export interface StackProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className">, VariantProps<typeof stackVariants> {
|
|
26
|
+
}
|
|
27
|
+
export declare const Stack: React.MemoExoticComponent<React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>>;
|
|
28
|
+
declare const gridVariants: (props?: ({
|
|
29
|
+
cols?: 1 | 2 | 3 | 4 | 5 | 6 | 12 | null | undefined;
|
|
30
|
+
gap?: 0 | 1 | 2 | 3 | 16 | 4 | 5 | 6 | 8 | 10 | 12 | null | undefined;
|
|
31
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
32
|
+
export interface GridProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className">, VariantProps<typeof gridVariants> {
|
|
33
|
+
}
|
|
34
|
+
export declare const Grid: React.MemoExoticComponent<React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>>;
|
|
35
|
+
export interface AspectRatioProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className"> {
|
|
36
|
+
ratio?: number;
|
|
37
|
+
}
|
|
38
|
+
export declare const AspectRatio: React.MemoExoticComponent<React.ForwardRefExoticComponent<AspectRatioProps & React.RefAttributes<HTMLDivElement>>>;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const avatarVariants: (props?: ({
|
|
4
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface AvatarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className">, VariantProps<typeof avatarVariants> {
|
|
7
|
+
src?: string;
|
|
8
|
+
alt?: string;
|
|
9
|
+
fallback?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const Avatar: React.MemoExoticComponent<React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>>;
|
|
12
|
+
export interface ImageProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, "className"> {
|
|
13
|
+
aspectRatio?: number;
|
|
14
|
+
rounded?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
15
|
+
}
|
|
16
|
+
export declare const Image: React.MemoExoticComponent<React.ForwardRefExoticComponent<ImageProps & React.RefAttributes<HTMLImageElement>>>;
|
|
17
|
+
export interface IconProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "className"> {
|
|
18
|
+
size?: number | string;
|
|
19
|
+
color?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const Icon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<HTMLSpanElement>>>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "secondary" | "destructive" | "default" | "success" | "outline" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className">, VariantProps<typeof badgeVariants> {
|
|
7
|
+
}
|
|
8
|
+
export declare const Badge: React.MemoExoticComponent<React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement>>>;
|
|
9
|
+
declare const tagVariants: (props?: ({
|
|
10
|
+
variant?: "primary" | "default" | "forest" | null | undefined;
|
|
11
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
|
+
export interface TagProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className">, VariantProps<typeof tagVariants> {
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const Tag: React.MemoExoticComponent<React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLDivElement>>>;
|
|
16
|
+
declare const spinnerVariants: (props?: ({
|
|
17
|
+
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
18
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
19
|
+
export interface SpinnerProps extends Omit<React.HTMLAttributes<SVGSVGElement>, "className">, VariantProps<typeof spinnerVariants> {
|
|
20
|
+
}
|
|
21
|
+
export declare const Spinner: React.MemoExoticComponent<React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<SVGSVGElement>>>;
|
|
22
|
+
export interface ProgressBarProps {
|
|
23
|
+
value?: number;
|
|
24
|
+
max?: number;
|
|
25
|
+
variant?: 'primary' | 'success' | 'destructive';
|
|
26
|
+
}
|
|
27
|
+
export declare const ProgressBar: React.MemoExoticComponent<({ value, max, variant }: ProgressBarProps) => import("react/jsx-runtime").JSX.Element>;
|
|
28
|
+
declare const skeletonVariants: (props?: ({
|
|
29
|
+
variant?: "default" | "circle" | null | undefined;
|
|
30
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
31
|
+
export interface SkeletonProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className">, VariantProps<typeof skeletonVariants> {
|
|
32
|
+
}
|
|
33
|
+
export declare const Skeleton: React.MemoExoticComponent<React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLDivElement>>>;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const textVariants: (props?: ({
|
|
4
|
+
variant?: "inverse" | "default" | "error" | "success" | "muted" | null | undefined;
|
|
5
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
|
|
6
|
+
weight?: "bold" | "normal" | "medium" | "semibold" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
export interface TextProps extends Omit<React.HTMLAttributes<HTMLParagraphElement>, "className">, VariantProps<typeof textVariants> {
|
|
9
|
+
as?: "p" | "span" | "div";
|
|
10
|
+
}
|
|
11
|
+
export declare const Text: React.MemoExoticComponent<React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLParagraphElement>>>;
|
|
12
|
+
declare const headingVariants: (props?: ({
|
|
13
|
+
level?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | null | undefined;
|
|
14
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
15
|
+
export type HeadingProps = Omit<React.HTMLAttributes<HTMLHeadingElement>, "className"> & VariantProps<typeof headingVariants>;
|
|
16
|
+
export declare const Heading: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "className"> & VariantProps<(props?: ({
|
|
17
|
+
level?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | null | undefined;
|
|
18
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLHeadingElement>>>;
|
|
19
|
+
declare const labelVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
20
|
+
export type LabelProps = Omit<React.LabelHTMLAttributes<HTMLLabelElement>, "className"> & VariantProps<typeof labelVariants>;
|
|
21
|
+
export declare const Label: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<React.LabelHTMLAttributes<HTMLLabelElement>, "className"> & VariantProps<(props?: import('class-variance-authority/types').ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>>;
|
|
22
|
+
export declare const Caption: React.MemoExoticComponent<React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>>;
|
|
23
|
+
export type CodeProps = Omit<React.HTMLAttributes<HTMLElement>, "className">;
|
|
24
|
+
export declare const Code: React.MemoExoticComponent<React.ForwardRefExoticComponent<CodeProps & React.RefAttributes<HTMLElement>>>;
|
|
25
|
+
declare const linkVariants: (props?: ({
|
|
26
|
+
variant?: "primary" | "default" | "muted" | null | undefined;
|
|
27
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
|
|
28
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
29
|
+
export type LinkProps = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "className"> & VariantProps<typeof linkVariants>;
|
|
30
|
+
export declare const Link: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "className"> & VariantProps<(props?: ({
|
|
31
|
+
variant?: "primary" | "default" | "muted" | null | undefined;
|
|
32
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
|
|
33
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLAnchorElement>>>;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CardProps } from '../atoms/Card';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export declare const CardHeader: React.MemoExoticComponent<({ children, ...props }: Omit<React.HTMLAttributes<HTMLDivElement>, "className">) => import("react/jsx-runtime").JSX.Element>;
|
|
4
|
+
export declare const CardTitle: React.MemoExoticComponent<({ children, ...props }: Omit<React.HTMLAttributes<HTMLHeadingElement>, "className">) => import("react/jsx-runtime").JSX.Element>;
|
|
5
|
+
export declare const CardDescription: React.MemoExoticComponent<({ children, ...props }: Omit<React.HTMLAttributes<HTMLParagraphElement>, "className">) => import("react/jsx-runtime").JSX.Element>;
|
|
6
|
+
export declare const CardContent: React.MemoExoticComponent<({ children, ...props }: Omit<React.HTMLAttributes<HTMLDivElement>, "className">) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
export declare const CardFooter: React.MemoExoticComponent<({ children, ...props }: Omit<React.HTMLAttributes<HTMLDivElement>, "className">) => import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
export interface StatCardProps extends CardProps {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string | number;
|
|
11
|
+
trend?: {
|
|
12
|
+
value: string | number;
|
|
13
|
+
positive?: boolean;
|
|
14
|
+
};
|
|
15
|
+
icon?: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export declare const StatCard: React.MemoExoticComponent<({ label, value, trend, icon, ...props }: StatCardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
18
|
+
export interface InfoRowProps {
|
|
19
|
+
label: string;
|
|
20
|
+
value: React.ReactNode;
|
|
21
|
+
horizontal?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare const InfoRow: React.MemoExoticComponent<({ label, value, horizontal }: InfoRowProps) => import("react/jsx-runtime").JSX.Element>;
|
|
24
|
+
export interface CopyToClipboardProps {
|
|
25
|
+
text: string;
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export declare const CopyToClipboard: React.MemoExoticComponent<({ text, children }: CopyToClipboardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "error" | "success" | "warning" | "info" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface AlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className">, VariantProps<typeof alertVariants> {
|
|
7
|
+
title?: string;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const Alert: React.MemoExoticComponent<React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>>;
|
|
11
|
+
export interface SnackbarProps {
|
|
12
|
+
open?: boolean;
|
|
13
|
+
message: string;
|
|
14
|
+
action?: React.ReactNode;
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
duration?: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const Snackbar: React.MemoExoticComponent<({ open, message, action, onClose, duration }: SnackbarProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
19
|
+
export interface EmptyStateProps {
|
|
20
|
+
icon?: React.ReactNode;
|
|
21
|
+
title: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
action?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
export declare const EmptyState: React.MemoExoticComponent<({ icon, title, description, action }: EmptyStateProps) => import("react/jsx-runtime").JSX.Element>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface FormFieldProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
error?: string;
|
|
5
|
+
hint?: string;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const FormField: React.MemoExoticComponent<({ label, error, hint, required, children }: FormFieldProps) => import("react/jsx-runtime").JSX.Element>;
|
|
10
|
+
export interface PasswordFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "className" | "type"> {
|
|
11
|
+
label?: string;
|
|
12
|
+
error?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const PasswordField: React.MemoExoticComponent<React.ForwardRefExoticComponent<PasswordFieldProps & React.RefAttributes<HTMLInputElement>>>;
|
|
15
|
+
export type SearchInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "className">;
|
|
16
|
+
export declare const SearchInput: React.MemoExoticComponent<React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>>;
|
|
17
|
+
export interface SelectFieldProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "className"> {
|
|
18
|
+
label?: string;
|
|
19
|
+
error?: string;
|
|
20
|
+
options?: {
|
|
21
|
+
label: string;
|
|
22
|
+
value: string;
|
|
23
|
+
}[];
|
|
24
|
+
}
|
|
25
|
+
export declare const SelectField: React.MemoExoticComponent<React.ForwardRefExoticComponent<SelectFieldProps & React.RefAttributes<HTMLSelectElement>>>;
|
|
26
|
+
export interface CheckboxGroupProps {
|
|
27
|
+
label?: string;
|
|
28
|
+
options: {
|
|
29
|
+
label: string;
|
|
30
|
+
value: string;
|
|
31
|
+
}[];
|
|
32
|
+
value?: string[];
|
|
33
|
+
onChange?: (value: string[]) => void;
|
|
34
|
+
}
|
|
35
|
+
export declare const CheckboxGroup: React.MemoExoticComponent<({ label, options, value, onChange }: CheckboxGroupProps) => import("react/jsx-runtime").JSX.Element>;
|
|
36
|
+
export interface RadioGroupProps {
|
|
37
|
+
label?: string;
|
|
38
|
+
name: string;
|
|
39
|
+
options: {
|
|
40
|
+
label: string;
|
|
41
|
+
value: string;
|
|
42
|
+
}[];
|
|
43
|
+
value?: string;
|
|
44
|
+
onChange?: (value: string) => void;
|
|
45
|
+
}
|
|
46
|
+
export declare const RadioGroup: React.MemoExoticComponent<({ label, name, options, value, onChange }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface PopoverProps {
|
|
3
|
+
trigger: React.ReactNode;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const Popover: React.MemoExoticComponent<({ trigger, children }: PopoverProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
export interface AccordionItemProps {
|
|
8
|
+
title: string;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const AccordionItem: React.MemoExoticComponent<({ title, children, defaultOpen }: AccordionItemProps) => import("react/jsx-runtime").JSX.Element>;
|
|
13
|
+
export interface TooltipProps {
|
|
14
|
+
content: string;
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export declare const Tooltip: React.MemoExoticComponent<({ content, children }: TooltipProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface DropdownProps {
|
|
3
|
+
trigger: React.ReactNode;
|
|
4
|
+
items: {
|
|
5
|
+
label: string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
destructive?: boolean;
|
|
9
|
+
}[];
|
|
10
|
+
}
|
|
11
|
+
export declare const Dropdown: React.MemoExoticComponent<({ trigger, items }: DropdownProps) => import("react/jsx-runtime").JSX.Element>;
|
|
12
|
+
export interface TabsProps {
|
|
13
|
+
tabs: {
|
|
14
|
+
label: string;
|
|
15
|
+
content: React.ReactNode;
|
|
16
|
+
}[];
|
|
17
|
+
}
|
|
18
|
+
export declare const Tabs: React.MemoExoticComponent<({ tabs }: TabsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
19
|
+
export interface BreadcrumbsProps {
|
|
20
|
+
items: {
|
|
21
|
+
label: string;
|
|
22
|
+
href?: string;
|
|
23
|
+
active?: boolean;
|
|
24
|
+
}[];
|
|
25
|
+
}
|
|
26
|
+
export declare const Breadcrumbs: React.MemoExoticComponent<({ items }: BreadcrumbsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
27
|
+
export interface PaginationProps {
|
|
28
|
+
currentPage: number;
|
|
29
|
+
totalPages: number;
|
|
30
|
+
onPageChange: (page: number) => void;
|
|
31
|
+
}
|
|
32
|
+
export declare const Pagination: React.MemoExoticComponent<({ currentPage, totalPages, onPageChange }: PaginationProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -5,6 +5,7 @@ interface HotSliderProps {
|
|
|
5
5
|
step?: number;
|
|
6
6
|
value: number;
|
|
7
7
|
onChange: (value: number) => void;
|
|
8
|
+
className?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare const HotSlider: React.MemoExoticComponent<({ min, max, step, value, onChange, }: HotSliderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
10
|
+
export declare const HotSlider: React.MemoExoticComponent<({ min, max, step, value, onChange, className, }: HotSliderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
10
11
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SpotlightProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
size?: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
opacity?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const Spotlight: React.MemoExoticComponent<({ children, size, color, opacity }: SpotlightProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | null | undefined;
|
|
5
|
-
weight?: "bold" | "medium" | "normal" | "semibold" | null | undefined;
|
|
6
|
-
tracking?: "normal" | "tight" | "wide" | null | undefined;
|
|
7
|
-
color?: "gray" | "green" | "white" | "forest" | null | undefined;
|
|
8
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
-
interface StaggerTextProps extends VariantProps<typeof textVariants> {
|
|
2
|
+
interface StaggerTextProps {
|
|
10
3
|
text: string;
|
|
4
|
+
className?: string;
|
|
11
5
|
}
|
|
12
|
-
export declare const StaggerText: React.MemoExoticComponent<({ text,
|
|
6
|
+
export declare const StaggerText: React.MemoExoticComponent<({ text, className }: StaggerTextProps) => import("react/jsx-runtime").JSX.Element>;
|
|
13
7
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface TextScrambleProps {
|
|
3
|
+
text: string;
|
|
4
|
+
speed?: number;
|
|
5
|
+
scrambleDuration?: number;
|
|
6
|
+
characterSet?: string;
|
|
7
|
+
revealOnInView?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const TextScramble: React.MemoExoticComponent<({ text, speed, scrambleDuration, characterSet, revealOnInView, }: TextScrambleProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface TiltProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
max?: number;
|
|
5
|
+
perspective?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const Tilt: React.MemoExoticComponent<({ children, max, perspective }: TiltProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -2,6 +2,7 @@ interface ViewTransitionProps {
|
|
|
2
2
|
children: React.ReactNode;
|
|
3
3
|
direction?: "forward" | "backward";
|
|
4
4
|
layoutId?: string;
|
|
5
|
+
className?: string;
|
|
5
6
|
}
|
|
6
|
-
export declare function ViewTransition({ children, direction, layoutId }: ViewTransitionProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function ViewTransition({ children, direction, layoutId, className }: ViewTransitionProps): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare const HeroSection: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
3
|
+
export declare const FeatureGrid: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
4
|
+
export declare const FAQSection: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
5
|
+
export declare const PricingTable: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface DataTableProps {
|
|
3
|
+
columns: string[];
|
|
4
|
+
data: Record<string, unknown>[];
|
|
5
|
+
}
|
|
6
|
+
export declare const DataTable: React.MemoExoticComponent<({ columns, data }: DataTableProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
export declare const DashboardStats: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
export declare const ActivityFeed: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare const LoginForm: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
3
|
+
export declare const SignupForm: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
4
|
+
export declare const ProfileForm: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface NavbarProps {
|
|
3
|
+
logo?: React.ReactNode;
|
|
4
|
+
links?: {
|
|
5
|
+
label: string;
|
|
6
|
+
href: string;
|
|
7
|
+
}[];
|
|
8
|
+
user?: {
|
|
9
|
+
name: string;
|
|
10
|
+
avatar?: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare const Navbar: React.MemoExoticComponent<({ logo, links, user }: NavbarProps) => import("react/jsx-runtime").JSX.Element>;
|
|
14
|
+
export interface SidebarProps {
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const Sidebar: React.MemoExoticComponent<({ className }: SidebarProps) => import("react/jsx-runtime").JSX.Element>;
|
|
18
|
+
export declare const Footer: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface ConfirmationDialogProps {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
onOpenChange?: (open: boolean) => void;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
confirmLabel?: string;
|
|
8
|
+
cancelLabel?: string;
|
|
9
|
+
onConfirm?: () => void;
|
|
10
|
+
onCancel?: () => void;
|
|
11
|
+
variant?: "destructive" | "primary";
|
|
12
|
+
trigger?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const ConfirmationDialog: React.MemoExoticComponent<({ open, onOpenChange, title, description, confirmLabel, cancelLabel, onConfirm, onCancel, variant, trigger }: ConfirmationDialogProps) => import("react/jsx-runtime").JSX.Element>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,30 @@
|
|
|
1
1
|
export { Button } from './components/atoms/Button';
|
|
2
2
|
export { Input } from './components/atoms/Input';
|
|
3
3
|
export { Toggle } from './components/atoms/Toggle';
|
|
4
|
+
export { Text, Heading, Label, Caption, Code, Link } from './components/atoms/Typography';
|
|
5
|
+
export { Divider, Spacer, Container, Stack, Grid, AspectRatio } from './components/atoms/Layout';
|
|
6
|
+
export { Badge, Tag, Spinner, ProgressBar, Skeleton } from './components/atoms/Status';
|
|
7
|
+
export { Avatar, Image, Icon } from './components/atoms/Media';
|
|
8
|
+
export { Card } from './components/atoms/Card';
|
|
9
|
+
export { Textarea, Checkbox, Radio, Select, OTPInput } from './components/atoms/FormControls';
|
|
4
10
|
export { Modal } from './components/molecules/Modal';
|
|
5
11
|
export { Toast, Toaster, Toaster as ToastProvider, useToast } from './components/molecules/Toast';
|
|
6
12
|
export { Stepper } from './components/molecules/Stepper';
|
|
7
13
|
export { Timeline } from './components/molecules/Timeline';
|
|
14
|
+
export { FormField, PasswordField, SearchInput, SelectField, CheckboxGroup, RadioGroup } from './components/molecules/FormFields';
|
|
15
|
+
export { Alert, Snackbar, EmptyState } from './components/molecules/Feedback';
|
|
16
|
+
export { Dropdown, Tabs, Breadcrumbs, Pagination } from './components/molecules/Navigation';
|
|
17
|
+
export { Popover, AccordionItem, Tooltip } from './components/molecules/Interaction';
|
|
18
|
+
export { CardHeader, CardTitle, CardDescription, CardContent, CardFooter, StatCard, InfoRow, CopyToClipboard } from './components/molecules/CardSections';
|
|
19
|
+
export { Navbar, Sidebar, Footer } from './components/organisms/NavigationOrganisms';
|
|
20
|
+
export { LoginForm, SignupForm, ProfileForm } from './components/organisms/FormOrganisms';
|
|
21
|
+
export { HeroSection, FeatureGrid, FAQSection, PricingTable } from './components/organisms/ContentOrganisms';
|
|
22
|
+
export { DataTable, DashboardStats, ActivityFeed } from './components/organisms/DataOrganisms';
|
|
23
|
+
export { ConfirmationDialog } from './components/organisms/OverlayOrganisms';
|
|
8
24
|
export { StaggerText } from './components/motion/StaggerText';
|
|
9
25
|
export { HotSlider } from './components/motion/HotSlider';
|
|
10
26
|
export { ViewTransition } from './components/motion/ViewTransition';
|
|
27
|
+
export { Magnetic } from './components/motion/Magnetic';
|
|
28
|
+
export { Tilt } from './components/motion/Tilt';
|
|
29
|
+
export { TextScramble } from './components/motion/TextScramble';
|
|
30
|
+
export { Spotlight } from './components/motion/Spotlight';
|