leira-ui 1.0.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 ADDED
@@ -0,0 +1,209 @@
1
+ # Leira UI
2
+
3
+ <p align="center">
4
+ <img src="./public/leira-ui.svg" alt="Leira UI Logo" width="200" />
5
+ </p>
6
+
7
+ <p align="center">
8
+ <strong>Biblioteca de componentes React + Tailwind CSS</strong>
9
+ </p>
10
+
11
+ <p align="center">
12
+ Componentes modernos, elegantes y listos para usar en tus proyectos.
13
+ </p>
14
+
15
+ <p align="center">
16
+ <a href="https://www.npmjs.com/package/leira-ui"><img src="https://img.shields.io/npm/v/leira-ui?color=violet" alt="npm version" /></a>
17
+ <a href="https://www.npmjs.com/package/leira-ui"><img src="https://img.shields.io/npm/dm/leira-ui?color=blue" alt="npm downloads" /></a>
18
+ <img src="https://img.shields.io/badge/React-19-61DAFB?logo=react" alt="React 19" />
19
+ <img src="https://img.shields.io/badge/Tailwind-4-38B2AC?logo=tailwindcss" alt="Tailwind CSS 4" />
20
+ <img src="https://img.shields.io/badge/TypeScript-5.9-3178C6?logo=typescript" alt="TypeScript" />
21
+ </p>
22
+
23
+ ---
24
+
25
+ ## 📸 Vista Previa
26
+
27
+ <p align="center">
28
+ <img src="./src/assets/image.png" alt="Leira UI Preview" width="100%" />
29
+ </p>
30
+
31
+ ---
32
+
33
+ ## ✨ Características
34
+
35
+ - 🎨 **Tema oscuro premium** por defecto
36
+ - ⚡ **React 19** compatible
37
+ - 🌊 **Tailwind CSS 4** optimizado
38
+ - 📦 **TypeScript** con tipos incluidos
39
+ - 🎭 **Animaciones suaves** y transiciones elegantes
40
+ - 📱 **Responsive** y accesible
41
+ - 📋 **Copy & Paste** - Copia el código directamente
42
+
43
+ ---
44
+
45
+ ## 📦 Instalación
46
+
47
+ ### Opción 1: Paquete NPM (Recomendado)
48
+
49
+ ```bash
50
+ npm install leira-ui
51
+ ```
52
+
53
+ ```bash
54
+ pnpm add leira-ui
55
+ ```
56
+
57
+ ```bash
58
+ yarn add leira-ui
59
+ ```
60
+
61
+ ### Opción 2: Copiar y Pegar
62
+
63
+ Visita la [documentación](https://leira-ui.vercel.app) y copia el código de cada componente directamente a tu proyecto.
64
+
65
+ ---
66
+
67
+ ## ⚡ Inicio Rápido
68
+
69
+ ### 1. Instala las dependencias
70
+
71
+ ```bash
72
+ npm install leira-ui lucide-react
73
+ ```
74
+
75
+ ### 2. Importa y usa los componentes
76
+
77
+ ```tsx
78
+ import { Button, Card, CardBody, Input, Alert } from 'leira-ui'
79
+
80
+ function App() {
81
+ return (
82
+ <Card hover>
83
+ <CardBody>
84
+ <Input label="Email" placeholder="tu@email.com" />
85
+ <Button variant="primary">Enviar</Button>
86
+ <Alert variant="success">¡Operación exitosa!</Alert>
87
+ </CardBody>
88
+ </Card>
89
+ )
90
+ }
91
+ ```
92
+
93
+ ---
94
+
95
+ ## 🧩 Componentes Disponibles
96
+
97
+ | Componente | Descripción | Requiere lucide-react |
98
+ |------------|-------------|:---------------------:|
99
+ | `Button` | Botones con variantes, tamaños y estados de carga | ❌ |
100
+ | `Card` | Tarjetas con header, body, footer y hover effects | ❌ |
101
+ | `Input` | Campos de entrada con validación e iconos | ❌ |
102
+ | `Textarea` | Área de texto con validación | ❌ |
103
+ | `Alert` | Alertas de notificación con variantes | ✅ |
104
+ | `Modal` | Modales con animaciones | ✅ |
105
+ | `Badge` | Etiquetas y badges con estilos | ❌ |
106
+ | `Tabs` | Pestañas con estilos pill y underline | ❌ |
107
+ | `Accordion` | Acordeones colapsables con animaciones | ✅ |
108
+ | `Tooltip` | Tooltips con posicionamiento flexible | ❌ |
109
+ | `Spinner` | Indicadores de carga y skeletons | ❌ |
110
+ | `Carousel` | Carruseles de imágenes, cards y testimonios | ✅ |
111
+
112
+ ---
113
+
114
+ ## 📖 Documentación
115
+
116
+ Visita nuestra documentación completa con ejemplos interactivos:
117
+
118
+ 🔗 **[leira-ui.vercel.app](https://leira-ui.vercel.app)**
119
+
120
+ En la documentación encontrarás:
121
+ - ✅ Ejemplos interactivos de cada componente
122
+ - ✅ Código completo para copiar
123
+ - ✅ Guía de instalación paso a paso
124
+ - ✅ Props y variantes de cada componente
125
+
126
+ ---
127
+
128
+ ## 🎨 Personalización
129
+
130
+ Los componentes usan variables CSS que puedes personalizar en tu proyecto:
131
+
132
+ ```css
133
+ :root {
134
+ --bg-primary: #0a0a0f;
135
+ --bg-secondary: #12121a;
136
+ --bg-card: #16161f;
137
+ --bg-hover: #1e1e2a;
138
+ --text-primary: #ffffff;
139
+ --text-secondary: #a0a0b0;
140
+ --text-muted: #666680;
141
+ --border-color: #2a2a3a;
142
+ }
143
+ ```
144
+
145
+ ---
146
+
147
+ ## 🛠️ Desarrollo Local
148
+
149
+ ```bash
150
+ # Clonar el repositorio
151
+ git clone https://github.com/tu-usuario/leira-ui.git
152
+ cd leira-ui
153
+
154
+ # Instalar dependencias
155
+ pnpm install
156
+
157
+ # Iniciar servidor de desarrollo
158
+ pnpm dev
159
+
160
+ # Build documentación (Vercel)
161
+ pnpm build
162
+
163
+ # Build paquete NPM
164
+ pnpm build:lib
165
+ ```
166
+
167
+ ---
168
+
169
+ ## 📁 Estructura del Proyecto
170
+
171
+ ```
172
+ leira-ui/
173
+ ├── src/
174
+ │ ├── components/
175
+ │ │ ├── ui/ # 📦 Componentes (NPM)
176
+ │ │ │ ├── Button.tsx
177
+ │ │ │ ├── Card.tsx
178
+ │ │ │ ├── Input.tsx
179
+ │ │ │ └── ...
180
+ │ │ └── docs/ # 🌐 Solo documentación
181
+ │ └── pages/ # 🌐 Páginas de docs
182
+ ├── dist/ # Build Vercel
183
+ ├── dist-lib/ # Build NPM
184
+ └── package.json
185
+ ```
186
+
187
+ ---
188
+
189
+ ## 🤝 Contribuir
190
+
191
+ ¡Las contribuciones son bienvenidas! Si tienes ideas para nuevos componentes o mejoras:
192
+
193
+ 1. Haz fork del repositorio
194
+ 2. Crea una rama (`git checkout -b feature/nuevo-componente`)
195
+ 3. Haz commit de tus cambios (`git commit -m 'Agregar nuevo componente'`)
196
+ 4. Push a la rama (`git push origin feature/nuevo-componente`)
197
+ 5. Abre un Pull Request
198
+
199
+ ---
200
+
201
+ ## 📄 Licencia
202
+
203
+ MIT © Leira UI
204
+
205
+ ---
206
+
207
+ <p align="center">
208
+ Hecho con 💜 para la comunidad React
209
+ </p>
@@ -0,0 +1,16 @@
1
+ import { type ReactNode } from 'react';
2
+ interface AccordionItem {
3
+ id: string;
4
+ title: string;
5
+ content: ReactNode;
6
+ icon?: ReactNode;
7
+ disabled?: boolean;
8
+ }
9
+ interface AccordionProps {
10
+ items: AccordionItem[];
11
+ allowMultiple?: boolean;
12
+ defaultOpenIds?: string[];
13
+ className?: string;
14
+ }
15
+ export declare function Accordion({ items, allowMultiple, defaultOpenIds, className }: AccordionProps): import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,12 @@
1
+ import { type ReactNode } from 'react';
2
+ type AlertVariant = 'success' | 'warning' | 'error' | 'info';
3
+ interface AlertProps {
4
+ children: ReactNode;
5
+ variant?: AlertVariant;
6
+ title?: string;
7
+ dismissible?: boolean;
8
+ onDismiss?: () => void;
9
+ className?: string;
10
+ }
11
+ export declare function Alert({ children, variant, title, dismissible, onDismiss, className }: AlertProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,12 @@
1
+ import { type ReactNode } from 'react';
2
+ type BadgeVariant = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'outline';
3
+ type BadgeSize = 'sm' | 'md' | 'lg';
4
+ interface BadgeProps {
5
+ children: ReactNode;
6
+ variant?: BadgeVariant;
7
+ size?: BadgeSize;
8
+ dot?: boolean;
9
+ className?: string;
10
+ }
11
+ export declare function Badge({ children, variant, size, dot, className }: BadgeProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,13 @@
1
+ import { type ButtonHTMLAttributes, type ReactNode } from 'react';
2
+ type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger' | 'success';
3
+ type ButtonSize = 'sm' | 'md' | 'lg';
4
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
5
+ children: ReactNode;
6
+ variant?: ButtonVariant;
7
+ size?: ButtonSize;
8
+ loading?: boolean;
9
+ icon?: ReactNode;
10
+ iconPosition?: 'left' | 'right';
11
+ }
12
+ export declare function Button({ children, variant, size, loading, icon, iconPosition, className, disabled, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,32 @@
1
+ import { type ReactNode } from 'react';
2
+ interface CardProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ hover?: boolean;
6
+ glow?: boolean;
7
+ }
8
+ interface CardHeaderProps {
9
+ children: ReactNode;
10
+ className?: string;
11
+ }
12
+ interface CardBodyProps {
13
+ children: ReactNode;
14
+ className?: string;
15
+ }
16
+ interface CardFooterProps {
17
+ children: ReactNode;
18
+ className?: string;
19
+ }
20
+ export declare function Card({ children, className, hover, glow }: CardProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function CardHeader({ children, className }: CardHeaderProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function CardBody({ children, className }: CardBodyProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function CardFooter({ children, className }: CardFooterProps): import("react/jsx-runtime").JSX.Element;
24
+ interface ImageCardProps {
25
+ image: string;
26
+ title: string;
27
+ description?: string;
28
+ children?: ReactNode;
29
+ className?: string;
30
+ }
31
+ export declare function ImageCard({ image, title, description, children, className }: ImageCardProps): import("react/jsx-runtime").JSX.Element;
32
+ export {};
@@ -0,0 +1,53 @@
1
+ import { type ReactNode } from 'react';
2
+ interface CarouselItem {
3
+ id: string;
4
+ content: ReactNode;
5
+ }
6
+ interface CarouselProps {
7
+ items: CarouselItem[];
8
+ autoPlay?: boolean;
9
+ interval?: number;
10
+ showArrows?: boolean;
11
+ showDots?: boolean;
12
+ variant?: 'default' | 'fade' | 'slide';
13
+ className?: string;
14
+ }
15
+ export declare function Carousel({ items, autoPlay, interval, showArrows, showDots, variant, className }: CarouselProps): import("react/jsx-runtime").JSX.Element;
16
+ interface ImageCarouselProps {
17
+ images: Array<{
18
+ src: string;
19
+ alt: string;
20
+ caption?: string;
21
+ }>;
22
+ autoPlay?: boolean;
23
+ interval?: number;
24
+ showArrows?: boolean;
25
+ showDots?: boolean;
26
+ showCaption?: boolean;
27
+ aspectRatio?: 'video' | 'square' | 'wide';
28
+ className?: string;
29
+ }
30
+ export declare function ImageCarousel({ images, autoPlay, interval, showArrows, showDots, showCaption, aspectRatio, className }: ImageCarouselProps): import("react/jsx-runtime").JSX.Element;
31
+ interface CardCarouselProps {
32
+ children: ReactNode[];
33
+ visibleCards?: number;
34
+ gap?: number;
35
+ showArrows?: boolean;
36
+ className?: string;
37
+ }
38
+ export declare function CardCarousel({ children, visibleCards, gap, showArrows, className }: CardCarouselProps): import("react/jsx-runtime").JSX.Element;
39
+ interface Testimonial {
40
+ id: string;
41
+ content: string;
42
+ author: string;
43
+ role?: string;
44
+ avatar?: string;
45
+ }
46
+ interface TestimonialCarouselProps {
47
+ testimonials: Testimonial[];
48
+ autoPlay?: boolean;
49
+ interval?: number;
50
+ className?: string;
51
+ }
52
+ export declare function TestimonialCarousel({ testimonials, autoPlay, interval, className }: TestimonialCarouselProps): import("react/jsx-runtime").JSX.Element;
53
+ export {};
@@ -0,0 +1,16 @@
1
+ import { type InputHTMLAttributes, type TextareaHTMLAttributes, type ReactNode } from 'react';
2
+ interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
3
+ label?: string;
4
+ error?: string;
5
+ hint?: string;
6
+ leftIcon?: ReactNode;
7
+ rightIcon?: ReactNode;
8
+ }
9
+ interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
10
+ label?: string;
11
+ error?: string;
12
+ hint?: string;
13
+ }
14
+ export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
15
+ export declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
16
+ export {};
@@ -0,0 +1,17 @@
1
+ import { type ReactNode } from 'react';
2
+ interface ModalProps {
3
+ isOpen: boolean;
4
+ onClose: () => void;
5
+ children: ReactNode;
6
+ title?: string;
7
+ size?: 'sm' | 'md' | 'lg' | 'xl';
8
+ closeOnOverlay?: boolean;
9
+ closeOnEscape?: boolean;
10
+ }
11
+ export declare function Modal({ isOpen, onClose, children, title, size, closeOnOverlay, closeOnEscape }: ModalProps): import("react/jsx-runtime").JSX.Element | null;
12
+ interface ModalFooterProps {
13
+ children: ReactNode;
14
+ className?: string;
15
+ }
16
+ export declare function ModalFooter({ children, className }: ModalFooterProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,16 @@
1
+ type SpinnerSize = 'sm' | 'md' | 'lg' | 'xl';
2
+ type SpinnerVariant = 'default' | 'primary' | 'dots' | 'pulse';
3
+ interface SpinnerProps {
4
+ size?: SpinnerSize;
5
+ variant?: SpinnerVariant;
6
+ className?: string;
7
+ }
8
+ export declare function Spinner({ size, variant, className }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
9
+ interface SkeletonProps {
10
+ width?: string | number;
11
+ height?: string | number;
12
+ rounded?: 'none' | 'sm' | 'md' | 'lg' | 'full';
13
+ className?: string;
14
+ }
15
+ export declare function Skeleton({ width, height, rounded, className }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,17 @@
1
+ import { type ReactNode } from 'react';
2
+ interface TabItem {
3
+ id: string;
4
+ label: string;
5
+ content: ReactNode;
6
+ icon?: ReactNode;
7
+ disabled?: boolean;
8
+ }
9
+ interface TabsProps {
10
+ items: TabItem[];
11
+ defaultActiveId?: string;
12
+ onChange?: (id: string) => void;
13
+ variant?: 'underline' | 'pills' | 'boxed';
14
+ className?: string;
15
+ }
16
+ export declare function Tabs({ items, defaultActiveId, onChange, variant, className }: TabsProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,11 @@
1
+ import { type ReactNode } from 'react';
2
+ type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
3
+ interface TooltipProps {
4
+ children: ReactNode;
5
+ content: ReactNode;
6
+ position?: TooltipPosition;
7
+ delay?: number;
8
+ className?: string;
9
+ }
10
+ export declare function Tooltip({ children, content, position, delay, className }: TooltipProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,12 @@
1
+ export { Card, CardHeader, CardBody, CardFooter, ImageCard } from './Card';
2
+ export { Button } from './Button';
3
+ export { Input, Textarea } from './Input';
4
+ export { Alert } from './Alert';
5
+ export { Modal, ModalFooter } from './Modal';
6
+ export { Spinner, Skeleton } from './Spinner';
7
+ export { Tooltip } from './Tooltip';
8
+ export { Tabs } from './Tabs';
9
+ export { Accordion } from './Accordion';
10
+ export { Badge } from './Badge';
11
+ export { Carousel, ImageCarousel, CardCarousel, TestimonialCarousel } from './Carousel';
12
+ export type { ButtonHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes } from 'react';