@stackvibe-studio/ui 0.2.0 → 0.3.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 CHANGED
@@ -1,55 +1,66 @@
1
1
  # @stackvibe-studio/ui
2
2
 
3
- Core React component library for product teams building premium SaaS experiences.
3
+ > Core accessible UI component library for StackVibe UI. Built for React 19, Tailwind CSS v4, and modern design systems.
4
4
 
5
- ## Highlights
5
+ [![npm version](https://img.shields.io/npm/v/@stackvibe-studio/ui.svg)](https://www.npmjs.com/package/@stackvibe-studio/ui)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
7
 
7
- - Accessible defaults for forms, cards, alerts, and calls to action
8
- - Flexible primitives with utility-friendly props
9
- - Tailwind-ready styling with a compact design language
10
- - New additions in v0.2.0: Tabs and Skeleton loaders
11
-
12
- ## Install
8
+ ## Installation
13
9
 
14
10
  ```bash
15
11
  npm install @stackvibe-studio/ui
12
+ # or
13
+ pnpm add @stackvibe-studio/ui
16
14
  ```
17
15
 
18
- ## Included components
16
+ ## Features
19
17
 
20
- - Button
21
- - Badge
22
- - Card
23
- - Input
24
- - Textarea
25
- - Select
26
- - Checkbox
27
- - Alert
28
- - Avatar
29
- - Tabs
30
- - Skeleton
18
+ - **19+ Production Primitives**: Dialog, Drawer, Tooltip, Accordion, Switch, Progress, Toast, DropdownMenu, Button, Input, Textarea, Select, Checkbox, Card, Alert, Badge, Avatar, Skeleton, Tabs.
19
+ - **Accessible (WAI-ARIA)**: Full keyboard navigation, focus management, and screen-reader support.
20
+ - **Tailwind Native**: Styled with modular tokens and high-contrast dark theme defaults.
21
+ - **Tree-shakeable**: Dual ESM and CJS bundle exports with zero unnecessary dependencies.
31
22
 
32
- ## Example
23
+ ## Usage
33
24
 
34
25
  ```tsx
35
- import { Button, Card, Tabs } from '@stackvibe-studio/ui';
26
+ import {
27
+ Button,
28
+ Dialog,
29
+ DialogHeader,
30
+ DialogTitle,
31
+ toast,
32
+ Toaster,
33
+ Switch,
34
+ Progress,
35
+ } from '@stackvibe-studio/ui';
36
+ import { useState } from 'react';
36
37
 
37
38
  export function Example() {
39
+ const [open, setOpen] = useState(false);
40
+
38
41
  return (
39
- <Card className="p-5">
40
- <Tabs
41
- items={[
42
- { id: 'overview', label: 'Overview', content: 'Overview content' },
43
- { id: 'activity', label: 'Activity', content: 'Activity content' },
44
- ]}
45
- />
46
- <Button className="mt-4">Launch</Button>
47
- </Card>
42
+ <div>
43
+ <Toaster />
44
+ <Button onClick={() => setOpen(true)}>Open Modal</Button>
45
+ <Switch defaultChecked onCheckedChange={(val) => toast.info(`Toggled: ${val}`)} />
46
+ <Progress value={80} variant="primary" showLabel />
47
+
48
+ <Dialog open={open} onOpenChange={setOpen}>
49
+ <DialogHeader>
50
+ <DialogTitle>Modal Dialog</DialogTitle>
51
+ </DialogHeader>
52
+ <p>Dialog body content</p>
53
+ </Dialog>
54
+ </div>
48
55
  );
49
56
  }
50
57
  ```
51
58
 
52
59
  ## Documentation
53
60
 
54
- - Docs: https://stackvibe-studio.github.io/stackvibe-ui/
55
- - Playground: https://stackvibe-studio.github.io/stackvibe-ui/playground/
61
+ Full documentation, props specifications, and live examples:
62
+ [https://stackvibe-studio.github.io/stackvibe-ui/docs](https://stackvibe-studio.github.io/stackvibe-ui/docs)
63
+
64
+ ## License
65
+
66
+ MIT © [StackVibe Studio](https://github.com/StackVibe-Studio)
@@ -0,0 +1,13 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface AccordionItemData {
3
+ id: string;
4
+ title: ReactNode;
5
+ content: ReactNode;
6
+ }
7
+ export interface AccordionProps {
8
+ items: AccordionItemData[];
9
+ type?: 'single' | 'multiple';
10
+ defaultOpen?: string[];
11
+ className?: string;
12
+ }
13
+ export declare function Accordion({ items, type, defaultOpen, className, }: AccordionProps): import("react").JSX.Element;
@@ -12,7 +12,7 @@ type ButtonAsButtonProps = BaseButtonProps & ButtonHTMLAttributes<HTMLButtonElem
12
12
  };
13
13
  type ButtonAsAnchorProps = BaseButtonProps & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'type'> & {
14
14
  as: 'a';
15
- href: string;
15
+ href?: string;
16
16
  };
17
17
  export type ButtonProps = ButtonAsButtonProps | ButtonAsAnchorProps;
18
18
  export declare function Button(props: ButtonProps): import("react").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface DialogProps {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ children: ReactNode;
6
+ className?: string;
7
+ }
8
+ export declare function Dialog({ open, onOpenChange, children, className }: DialogProps): import("react").JSX.Element | null;
9
+ export declare function DialogHeader({ children, className }: {
10
+ children: ReactNode;
11
+ className?: string;
12
+ }): import("react").JSX.Element;
13
+ export declare function DialogTitle({ children, className }: {
14
+ children: ReactNode;
15
+ className?: string;
16
+ }): import("react").JSX.Element;
17
+ export declare function DialogDescription({ children, className }: {
18
+ children: ReactNode;
19
+ className?: string;
20
+ }): import("react").JSX.Element;
21
+ export declare function DialogFooter({ children, className }: {
22
+ children: ReactNode;
23
+ className?: string;
24
+ }): import("react").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface DrawerProps {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ position?: 'left' | 'right' | 'bottom';
6
+ children: ReactNode;
7
+ className?: string;
8
+ }
9
+ export declare function Drawer({ open, onOpenChange, position, children, className, }: DrawerProps): import("react").JSX.Element | null;
10
+ export declare function DrawerHeader({ children, className }: {
11
+ children: ReactNode;
12
+ className?: string;
13
+ }): import("react").JSX.Element;
14
+ export declare function DrawerTitle({ children, className }: {
15
+ children: ReactNode;
16
+ className?: string;
17
+ }): import("react").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface DropdownMenuItem {
3
+ id: string;
4
+ label: ReactNode;
5
+ icon?: ReactNode;
6
+ onClick?: () => void;
7
+ disabled?: boolean;
8
+ destructive?: boolean;
9
+ }
10
+ export interface DropdownMenuProps {
11
+ trigger: ReactNode;
12
+ items: DropdownMenuItem[];
13
+ align?: 'left' | 'right';
14
+ className?: string;
15
+ }
16
+ export declare function DropdownMenu({ trigger, items, align, className, }: DropdownMenuProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ export interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
3
+ value?: number;
4
+ max?: number;
5
+ variant?: 'primary' | 'secondary' | 'success' | 'warning';
6
+ showLabel?: boolean;
7
+ }
8
+ export declare function Progress({ value, max, variant, showLabel, className, ...props }: ProgressProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ export interface SwitchProps {
2
+ checked?: boolean;
3
+ defaultChecked?: boolean;
4
+ onCheckedChange?: (checked: boolean) => void;
5
+ disabled?: boolean;
6
+ className?: string;
7
+ id?: string;
8
+ 'aria-label'?: string;
9
+ }
10
+ export declare function Switch({ checked, defaultChecked, onCheckedChange, disabled, className, id, 'aria-label': ariaLabel, }: SwitchProps): import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ export interface ToastMessage {
2
+ id: string;
3
+ title?: string;
4
+ message: string;
5
+ type?: 'success' | 'error' | 'info' | 'warning';
6
+ duration?: number;
7
+ }
8
+ export declare const toast: {
9
+ show(message: string, options?: Partial<Omit<ToastMessage, "id" | "message">>): string;
10
+ success(message: string, title?: string): string;
11
+ error(message: string, title?: string): string;
12
+ info(message: string, title?: string): string;
13
+ dismiss(id: string): void;
14
+ };
15
+ export declare function Toaster(): import("react").JSX.Element | null;
@@ -0,0 +1,8 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface TooltipProps {
3
+ content: ReactNode;
4
+ children: ReactNode;
5
+ side?: 'top' | 'bottom' | 'left' | 'right';
6
+ className?: string;
7
+ }
8
+ export declare function Tooltip({ content, children, side, className, }: TooltipProps): import("react").JSX.Element;