@stackvibe-studio/ui 0.3.0 → 0.3.1
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/dist/components/accordion.d.ts +7 -1
- package/dist/components/alert.d.ts +8 -3
- package/dist/components/avatar.d.ts +7 -2
- package/dist/components/badge.d.ts +10 -3
- package/dist/components/button.d.ts +11 -3
- package/dist/components/card.d.ts +8 -1
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/drawer.d.ts +1 -1
- package/dist/components/input.d.ts +13 -3
- package/dist/components/progress.d.ts +8 -2
- package/dist/components/select.d.ts +11 -3
- package/dist/components/skeleton.d.ts +5 -2
- package/dist/components/switch.d.ts +7 -1
- package/dist/components/tabs.d.ts +8 -1
- package/dist/components/textarea.d.ts +10 -1
- package/dist/components/toast.d.ts +5 -1
- package/dist/components/tooltip.d.ts +8 -2
- package/dist/index.cjs +750 -184
- package/dist/index.js +765 -199
- package/package.json +31 -1
|
@@ -3,11 +3,17 @@ export interface AccordionItemData {
|
|
|
3
3
|
id: string;
|
|
4
4
|
title: ReactNode;
|
|
5
5
|
content: ReactNode;
|
|
6
|
+
icon?: ReactNode;
|
|
6
7
|
}
|
|
8
|
+
export type AccordionVariant = 'bordered' | 'separated' | 'ghost';
|
|
9
|
+
export type AccordionRadius = 'sm' | 'md' | 'lg' | 'xl';
|
|
7
10
|
export interface AccordionProps {
|
|
8
11
|
items: AccordionItemData[];
|
|
9
12
|
type?: 'single' | 'multiple';
|
|
13
|
+
variant?: AccordionVariant;
|
|
14
|
+
radius?: AccordionRadius;
|
|
10
15
|
defaultOpen?: string[];
|
|
11
16
|
className?: string;
|
|
17
|
+
customIcon?: (isOpen: boolean) => ReactNode;
|
|
12
18
|
}
|
|
13
|
-
export declare function Accordion({ items, type, defaultOpen, className, }: AccordionProps): import("react").JSX.Element;
|
|
19
|
+
export declare function Accordion({ items, type, variant, radius, defaultOpen, className, customIcon, }: AccordionProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export type AlertVariant = 'info' | 'success' | 'warning' | '
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
export type AlertVariant = 'info' | 'success' | 'warning' | 'destructive' | 'primary';
|
|
3
|
+
export type AlertRadius = 'sm' | 'md' | 'lg' | 'xl';
|
|
3
4
|
export interface AlertProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
5
|
title?: string;
|
|
5
6
|
variant?: AlertVariant;
|
|
7
|
+
radius?: AlertRadius;
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
dismissible?: boolean;
|
|
10
|
+
onDismiss?: () => void;
|
|
6
11
|
}
|
|
7
|
-
export declare function Alert({ title, variant, className, children, ...props }: AlertProps): import("react").JSX.Element;
|
|
12
|
+
export declare function Alert({ title, variant, radius, icon, dismissible, onDismiss, className, children, ...props }: AlertProps): import("react").JSX.Element | null;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { ImgHTMLAttributes } from 'react';
|
|
2
|
+
export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
3
|
+
export type AvatarShape = 'circle' | 'rounded' | 'square';
|
|
4
|
+
export type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
|
|
2
5
|
export interface AvatarProps extends ImgHTMLAttributes<HTMLImageElement> {
|
|
3
6
|
fallback?: string;
|
|
4
|
-
size?:
|
|
7
|
+
size?: AvatarSize;
|
|
8
|
+
shape?: AvatarShape;
|
|
9
|
+
status?: AvatarStatus;
|
|
5
10
|
}
|
|
6
|
-
export declare function Avatar({ src, alt, fallback, size, className, ...props }: AvatarProps): import("react").JSX.Element;
|
|
11
|
+
export declare function Avatar({ src, alt, fallback, size, shape, status, className, ...props }: AvatarProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import type { HTMLAttributes } from 'react';
|
|
2
|
-
export type BadgeVariant = 'primary' | 'secondary' | 'outline';
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type BadgeVariant = 'primary' | 'secondary' | 'outline' | 'destructive' | 'success' | 'warning' | 'glass';
|
|
3
|
+
export type BadgeSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type BadgeRadius = 'sm' | 'md' | 'lg' | 'full';
|
|
3
5
|
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
6
|
variant?: BadgeVariant;
|
|
7
|
+
size?: BadgeSize;
|
|
8
|
+
radius?: BadgeRadius;
|
|
9
|
+
dot?: boolean;
|
|
10
|
+
leftIcon?: ReactNode;
|
|
11
|
+
rightIcon?: ReactNode;
|
|
5
12
|
}
|
|
6
|
-
export declare function Badge({ variant, className, ...props }: BadgeProps): import("react").JSX.Element;
|
|
13
|
+
export declare function Badge({ variant, size, radius, dot, leftIcon, rightIcon, children, className, ...props }: BadgeProps): import("react").JSX.Element;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import type { AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
2
|
-
export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'outline';
|
|
3
|
-
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
1
|
+
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'outline' | 'destructive' | 'glass' | 'gradient';
|
|
3
|
+
export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
export type ButtonRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
4
5
|
interface BaseButtonProps {
|
|
5
6
|
variant?: ButtonVariant;
|
|
6
7
|
size?: ButtonSize;
|
|
8
|
+
radius?: ButtonRadius;
|
|
9
|
+
fullWidth?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
loadingText?: string;
|
|
12
|
+
leftIcon?: ReactNode;
|
|
13
|
+
rightIcon?: ReactNode;
|
|
14
|
+
disabled?: boolean;
|
|
7
15
|
className?: string;
|
|
8
16
|
}
|
|
9
17
|
type ButtonAsButtonProps = BaseButtonProps & ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { ElementType, HTMLAttributes } from 'react';
|
|
2
|
+
export type CardVariant = 'default' | 'glass' | 'gradient' | 'bordered' | 'interactive' | 'elevated';
|
|
3
|
+
export type CardRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
4
|
+
export type CardPadding = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2
5
|
export interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
6
|
as?: ElementType;
|
|
7
|
+
variant?: CardVariant;
|
|
8
|
+
radius?: CardRadius;
|
|
9
|
+
padding?: CardPadding;
|
|
10
|
+
glow?: boolean;
|
|
4
11
|
}
|
|
5
|
-
export declare function Card({ as: Component, className, ...props }: CardProps): import("react").JSX.Element;
|
|
12
|
+
export declare function Card({ as: Component, variant, radius, padding, glow, className, style, ...props }: CardProps): import("react").JSX.Element;
|
|
@@ -5,7 +5,7 @@ export interface DialogProps {
|
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
className?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare function Dialog({ open, onOpenChange, children, className }: DialogProps): import("react").
|
|
8
|
+
export declare function Dialog({ open, onOpenChange, children, className }: DialogProps): import("react").ReactPortal | null;
|
|
9
9
|
export declare function DialogHeader({ children, className }: {
|
|
10
10
|
children: ReactNode;
|
|
11
11
|
className?: string;
|
|
@@ -6,7 +6,7 @@ export interface DrawerProps {
|
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function Drawer({ open, onOpenChange, position, children, className, }: DrawerProps): import("react").
|
|
9
|
+
export declare function Drawer({ open, onOpenChange, position, children, className, }: DrawerProps): import("react").ReactPortal | null;
|
|
10
10
|
export declare function DrawerHeader({ children, className }: {
|
|
11
11
|
children: ReactNode;
|
|
12
12
|
className?: string;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import type { InputHTMLAttributes } from 'react';
|
|
2
|
-
export
|
|
1
|
+
import type { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type InputVariant = 'default' | 'filled' | 'flushed';
|
|
3
|
+
export type InputSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type InputRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
5
|
+
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
6
|
+
variant?: InputVariant;
|
|
7
|
+
size?: InputSize;
|
|
8
|
+
radius?: InputRadius;
|
|
9
|
+
leftElement?: ReactNode;
|
|
10
|
+
rightElement?: ReactNode;
|
|
11
|
+
error?: boolean | string;
|
|
12
|
+
fullWidth?: boolean;
|
|
3
13
|
}
|
|
4
|
-
export declare function Input({ className, ...props }: InputProps): import("react").JSX.Element;
|
|
14
|
+
export declare function Input({ variant, size, radius, leftElement, rightElement, error, fullWidth, className, disabled, ...props }: InputProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type ProgressVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'destructive' | 'gradient';
|
|
3
|
+
export type ProgressSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2
4
|
export interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
5
|
value?: number;
|
|
4
6
|
max?: number;
|
|
5
|
-
variant?:
|
|
7
|
+
variant?: ProgressVariant;
|
|
8
|
+
size?: ProgressSize;
|
|
9
|
+
striped?: boolean;
|
|
10
|
+
animated?: boolean;
|
|
6
11
|
showLabel?: boolean;
|
|
12
|
+
label?: string;
|
|
7
13
|
}
|
|
8
|
-
export declare function Progress({ value, max, variant, showLabel, className, ...props }: ProgressProps): import("react").JSX.Element;
|
|
14
|
+
export declare function Progress({ value, max, variant, size, striped, animated, showLabel, label, className, ...props }: ProgressProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import type { SelectHTMLAttributes } from 'react';
|
|
2
|
-
export
|
|
1
|
+
import type { ReactNode, SelectHTMLAttributes } from 'react';
|
|
2
|
+
export type SelectVariant = 'default' | 'filled';
|
|
3
|
+
export type SelectSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type SelectRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
5
|
+
export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
6
|
+
variant?: SelectVariant;
|
|
7
|
+
size?: SelectSize;
|
|
8
|
+
radius?: SelectRadius;
|
|
9
|
+
error?: boolean | string;
|
|
10
|
+
icon?: ReactNode;
|
|
3
11
|
}
|
|
4
|
-
export declare function Select({ className, children, ...props }: SelectProps): import("react").JSX.Element;
|
|
12
|
+
export declare function Select({ variant, size, radius, error, icon, className, children, disabled, ...props }: SelectProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type SkeletonRounded = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
3
|
+
export type SkeletonAnimation = 'pulse' | 'shimmer' | 'none';
|
|
2
4
|
export interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
rounded?:
|
|
5
|
+
rounded?: SkeletonRounded;
|
|
6
|
+
animation?: SkeletonAnimation;
|
|
4
7
|
}
|
|
5
|
-
export declare function Skeleton({ className, rounded, ...props }: SkeletonProps): import("react").JSX.Element;
|
|
8
|
+
export declare function Skeleton({ className, rounded, animation, ...props }: SkeletonProps): import("react").JSX.Element;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type SwitchSize = 'sm' | 'md' | 'lg';
|
|
1
3
|
export interface SwitchProps {
|
|
2
4
|
checked?: boolean;
|
|
3
5
|
defaultChecked?: boolean;
|
|
4
6
|
onCheckedChange?: (checked: boolean) => void;
|
|
7
|
+
size?: SwitchSize;
|
|
8
|
+
color?: string;
|
|
9
|
+
checkedIcon?: ReactNode;
|
|
10
|
+
uncheckedIcon?: ReactNode;
|
|
5
11
|
disabled?: boolean;
|
|
6
12
|
className?: string;
|
|
7
13
|
id?: string;
|
|
8
14
|
'aria-label'?: string;
|
|
9
15
|
}
|
|
10
|
-
export declare function Switch({ checked, defaultChecked, onCheckedChange, disabled, className, id, 'aria-label': ariaLabel, }: SwitchProps): import("react").JSX.Element;
|
|
16
|
+
export declare function Switch({ checked, defaultChecked, onCheckedChange, size, color, checkedIcon, uncheckedIcon, disabled, className, id, 'aria-label': ariaLabel, }: SwitchProps): import("react").JSX.Element;
|
|
@@ -2,11 +2,18 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
export type TabItem = {
|
|
3
3
|
id: string;
|
|
4
4
|
label: string;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
badge?: ReactNode;
|
|
5
7
|
content: ReactNode;
|
|
6
8
|
};
|
|
9
|
+
export type TabsVariant = 'pills' | 'underline' | 'bordered' | 'segmented';
|
|
10
|
+
export type TabsSize = 'sm' | 'md' | 'lg';
|
|
7
11
|
export interface TabsProps {
|
|
8
12
|
items: TabItem[];
|
|
9
13
|
defaultTab?: string;
|
|
14
|
+
variant?: TabsVariant;
|
|
15
|
+
size?: TabsSize;
|
|
16
|
+
fullWidth?: boolean;
|
|
10
17
|
className?: string;
|
|
11
18
|
}
|
|
12
|
-
export declare function Tabs({ items, defaultTab, className }: TabsProps): import("react").JSX.Element;
|
|
19
|
+
export declare function Tabs({ items, defaultTab, variant, size, fullWidth, className, }: TabsProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import type { TextareaHTMLAttributes } from 'react';
|
|
2
|
+
export type TextareaVariant = 'default' | 'filled';
|
|
3
|
+
export type TextareaSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type TextareaRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
export type TextareaResize = 'none' | 'vertical' | 'horizontal' | 'both';
|
|
2
6
|
export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
7
|
+
variant?: TextareaVariant;
|
|
8
|
+
size?: TextareaSize;
|
|
9
|
+
radius?: TextareaRadius;
|
|
10
|
+
resize?: TextareaResize;
|
|
11
|
+
error?: boolean | string;
|
|
3
12
|
}
|
|
4
|
-
export declare function Textarea({ className, ...props }: TextareaProps): import("react").JSX.Element;
|
|
13
|
+
export declare function Textarea({ variant, size, radius, resize, error, className, disabled, ...props }: TextareaProps): import("react").JSX.Element;
|
|
@@ -10,6 +10,10 @@ export declare const toast: {
|
|
|
10
10
|
success(message: string, title?: string): string;
|
|
11
11
|
error(message: string, title?: string): string;
|
|
12
12
|
info(message: string, title?: string): string;
|
|
13
|
+
warning(message: string, title?: string): string;
|
|
13
14
|
dismiss(id: string): void;
|
|
14
15
|
};
|
|
15
|
-
export
|
|
16
|
+
export type ToasterPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'top-center' | 'bottom-center';
|
|
17
|
+
export declare function Toaster({ position }: {
|
|
18
|
+
position?: ToasterPosition;
|
|
19
|
+
}): import("react").ReactPortal | null;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
+
export type TooltipSide = 'top' | 'bottom' | 'left' | 'right';
|
|
3
|
+
export type TooltipTheme = 'dark' | 'light' | 'primary';
|
|
2
4
|
export interface TooltipProps {
|
|
3
5
|
content: ReactNode;
|
|
4
6
|
children: ReactNode;
|
|
5
|
-
side?:
|
|
7
|
+
side?: TooltipSide;
|
|
8
|
+
position?: TooltipSide;
|
|
9
|
+
theme?: TooltipTheme;
|
|
10
|
+
arrow?: boolean;
|
|
11
|
+
delay?: number;
|
|
6
12
|
className?: string;
|
|
7
13
|
}
|
|
8
|
-
export declare function Tooltip({ content, children, side, className, }: TooltipProps): import("react").JSX.Element;
|
|
14
|
+
export declare function Tooltip({ content, children, side, position, theme, arrow, delay, className, }: TooltipProps): import("react").JSX.Element;
|