advi-ui 0.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.
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1 @@
1
+ export declare const PageNotFound: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { default as React, ButtonHTMLAttributes } from 'react';
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
+ asChild?: boolean;
9
+ }
10
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export { Button, buttonVariants };
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
5
+ direction?: "row" | "column" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
7
+ declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
10
+ declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
11
+ export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
@@ -0,0 +1,19 @@
1
+ import { default as React, HTMLAttributes } from 'react';
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DialogHeader: {
10
+ ({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
11
+ displayName: string;
12
+ };
13
+ declare const DialogFooter: {
14
+ ({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
15
+ displayName: string;
16
+ };
17
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
18
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
19
+ export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
@@ -0,0 +1,9 @@
1
+ import { Link } from './link';
2
+ export interface Header {
3
+ logo_link: Link;
4
+ nav_items: Link[];
5
+ login_link: Link;
6
+ }
7
+ export declare const Header: ({ content }: {
8
+ content: Header;
9
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { ComponentProps } from 'react';
2
+ interface InputProps extends ComponentProps<"input"> {
3
+ label?: string;
4
+ description?: string;
5
+ validate?: (value: string) => string | null;
6
+ onValueChange?: (valid: string) => void;
7
+ }
8
+ export declare const Input: import('react').ForwardRefExoticComponent<Omit<InputProps, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
9
+ export {};
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import * as LabelPrimitive from "@radix-ui/react-label";
4
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import('class-variance-authority/types').ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
5
+ export { Label };
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ export interface Link {
3
+ url: string;
4
+ text?: string;
5
+ is_external_link?: boolean;
6
+ }
7
+ type LinkProps = {
8
+ link: Link;
9
+ className?: string;
10
+ noBaseClass?: boolean;
11
+ children?: ReactNode;
12
+ };
13
+ export declare const Link: ({ link, className, noBaseClass, children }: LinkProps) => import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,9 @@
1
+ import { HTMLAttributes } from 'react';
2
+ interface LoadingProps extends HTMLAttributes<HTMLDivElement> {
3
+ text?: string;
4
+ }
5
+ export declare const Loading: {
6
+ ({ text, className, ...props }: LoadingProps): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
9
+ export {};
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ interface ModalProps {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ trigger: ReactNode;
6
+ title?: string;
7
+ description?: string;
8
+ children?: ReactNode;
9
+ footer?: ReactNode;
10
+ }
11
+ export declare const Modal: ({ open, onOpenChange, trigger, title, description, children, footer }: ModalProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ interface PageAsideProps {
3
+ children?: React.ReactNode;
4
+ title?: React.ReactNode;
5
+ userName?: string;
6
+ onLogout?: () => void;
7
+ }
8
+ export declare const PageAside: ({ children, title, userName, onLogout }: PageAsideProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,11 @@
1
+ import { ComponentProps } from 'react';
2
+ interface TextareaProps extends ComponentProps<"textarea"> {
3
+ label?: string;
4
+ description?: string;
5
+ maskedLength?: number;
6
+ hidden?: boolean;
7
+ validate?: (value: string) => string | null;
8
+ onValidationChange?: (valid: boolean) => void;
9
+ }
10
+ export declare const Textarea: import('react').ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & import('react').RefAttributes<HTMLTextAreaElement>>;
11
+ export {};
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const ToastProvider: ({ children }: {
3
+ children: ReactNode;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const toast: {
6
+ success: (titleOrDescription: string, description?: string) => void;
7
+ error: (titleOrDescription: string, description?: string) => void;
8
+ warning: (titleOrDescription: string, description?: string) => void;
9
+ info: (titleOrDescription: string, description?: string) => void;
10
+ default: (titleOrDescription: string, description?: string) => void;
11
+ };
@@ -0,0 +1,14 @@
1
+ export * from './components/ui/button';
2
+ export * from './components/ui/card';
3
+ export * from './components/ui/dialog';
4
+ export * from './components/ui/header';
5
+ export * from './components/ui/input';
6
+ export * from './components/ui/label';
7
+ export * from './components/ui/link';
8
+ export * from './components/ui/loading';
9
+ export * from './components/ui/modal';
10
+ export * from './components/ui/page-aside';
11
+ export * from './components/ui/textarea';
12
+ export * from './components/ui/toast';
13
+ export * from './components/PageNotFound';
14
+ export * from './lib/utils';
@@ -0,0 +1,2 @@
1
+ import { ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
File without changes
package/package.json ADDED
@@ -0,0 +1,98 @@
1
+ {
2
+ "name": "advi-ui",
3
+ "version": "0.1.0",
4
+ "description": "Personal React component library built with Tailwind CSS, SCSS, and Storybook",
5
+ "license": "MIT",
6
+ "author": "Atharva Devasthali",
7
+ "keywords": [
8
+ "react",
9
+ "component-library",
10
+ "tailwind",
11
+ "ui",
12
+ "typescript",
13
+ "storybook"
14
+ ],
15
+ "homepage": "https://github.com/atharvad/advi-ui#readme",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/atharvad/advi-ui.git"
19
+ },
20
+ "type": "module",
21
+ "main": "./dist/advi-ui.cjs.js",
22
+ "module": "./dist/advi-ui.es.js",
23
+ "types": "./dist/index.d.ts",
24
+ "exports": {
25
+ ".": {
26
+ "import": "./dist/advi-ui.es.js",
27
+ "require": "./dist/advi-ui.cjs.js",
28
+ "types": "./dist/index.d.ts"
29
+ },
30
+ "./styles": "./dist/advi-ui.css"
31
+ },
32
+ "files": [
33
+ "dist"
34
+ ],
35
+ "sideEffects": [
36
+ "**/*.css"
37
+ ],
38
+ "scripts": {
39
+ "dev": "vite",
40
+ "build": "tsc -b && vite build",
41
+ "build:lib": "tsc -b && vite build --mode production",
42
+ "prepublishOnly": "npm run build:lib",
43
+ "lint": "eslint .",
44
+ "preview": "vite preview",
45
+ "storybook": "storybook dev -p 6006",
46
+ "build-storybook": "storybook build",
47
+ "test": "vitest"
48
+ },
49
+ "peerDependencies": {
50
+ "react": ">=18",
51
+ "react-dom": ">=18"
52
+ },
53
+ "dependencies": {
54
+ "@base-ui/react": "^1.4.0",
55
+ "@fontsource-variable/geist": "^5.2.8",
56
+ "@radix-ui/react-dialog": "^1.1.15",
57
+ "@radix-ui/react-label": "^2.1.8",
58
+ "@radix-ui/react-slot": "^1.2.4",
59
+ "class-variance-authority": "^0.7.1",
60
+ "clsx": "^2.1.1",
61
+ "lucide-react": "^1.8.0",
62
+ "sass": "^1.99.0",
63
+ "tailwind-merge": "^3.5.0"
64
+ },
65
+ "devDependencies": {
66
+ "@chromatic-com/storybook": "^5.1.2",
67
+ "@eslint/js": "^9.39.4",
68
+ "@storybook/addon-a11y": "^10.3.5",
69
+ "@storybook/addon-docs": "^10.3.5",
70
+ "@storybook/addon-onboarding": "^10.3.5",
71
+ "@storybook/addon-vitest": "^10.3.5",
72
+ "@storybook/react-vite": "^10.3.5",
73
+ "@types/node": "^24.12.2",
74
+ "@types/react": "^19.2.14",
75
+ "@types/react-dom": "^19.2.3",
76
+ "@vitejs/plugin-react": "^6.0.1",
77
+ "@vitest/browser-playwright": "^4.1.4",
78
+ "@vitest/coverage-v8": "^4.1.4",
79
+ "autoprefixer": "^10.5.0",
80
+ "eslint": "^9.39.4",
81
+ "eslint-plugin-react-hooks": "^7.0.1",
82
+ "eslint-plugin-react-refresh": "^0.5.2",
83
+ "eslint-plugin-storybook": "^10.3.5",
84
+ "globals": "^17.4.0",
85
+ "playwright": "^1.59.1",
86
+ "postcss": "^8.5.10",
87
+ "react": "^19.2.4",
88
+ "react-dom": "^19.2.4",
89
+ "storybook": "^10.3.5",
90
+ "tailwindcss": "^3.4.19",
91
+ "tailwindcss-animate": "^1.0.7",
92
+ "typescript": "~6.0.2",
93
+ "typescript-eslint": "^8.58.0",
94
+ "vite": "^8.0.4",
95
+ "vite-plugin-dts": "^4.5.4",
96
+ "vitest": "^4.1.4"
97
+ }
98
+ }