lambda-ui-components 1.0.0 → 1.0.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.
Files changed (4) hide show
  1. package/README.md +98 -111
  2. package/dist/main.mjs +144 -146
  3. package/dist/main.umd.js +4 -4
  4. package/package.json +102 -102
package/README.md CHANGED
@@ -7,148 +7,135 @@
7
7
  [![React 18+](https://img.shields.io/badge/react-18%2B-blue.svg)](https://react.dev/)
8
8
  [![Build Status](https://github.com/AletzMan/lambda-ui-components/actions/workflows/main.yml/badge.svg)](https://github.com/AletzMan/lambda-ui-components/actions)
9
9
 
10
- Component library for React built with TypeScript, Framer Motion, and Vite. Includes a modern, themeable, and accessible set of UI primitives for rapid product development.
10
+ **Lambda UI Components** is a modern, accessible, and flexible React component library designed to help you build beautiful, consistent, and scalable user interfaces with ease. Every component is crafted with precision and attention to detail.
11
11
 
12
- ## ✨ Características
12
+ ## ✨ Features
13
13
 
14
- - Componentes accesibles, tipados y listos para producción
15
- - Soporte para dark mode y personalización por CSS variables
16
- - Animaciones fluidas con Framer Motion
17
- - Fácil integración con React 18+
18
- - Incluye Skeleton, Button, Card, Input, Table, Modal, y más
14
+ - **Accessible by default:** Components follow WAI-ARIA guidelines and are keyboard-friendly.
15
+ - **Modern design:** Built-in dark mode, theming, and responsive layouts.
16
+ - **Developer experience:** TypeScript-first, clear props, and Storybook demos.
17
+ - **Flexible & composable:** Extend, override, or compose components as you need.
19
18
 
20
- ## 🚀 Instalación
19
+ ## 🚀 Installation
21
20
 
22
- ```sh
21
+ Lambda UI Components is published as an npm package. You can install it using your favorite package manager:
22
+
23
+ ```bash
23
24
  pnpm add lambda-ui-components
24
- # o
25
+ # or
25
26
  npm install lambda-ui-components
27
+ # or
28
+ yarn add lambda-ui-components
26
29
  ```
27
30
 
28
- > **Nota:** Debes tener React 18+ y ReactDOM como peerDependencies en tu proyecto.
31
+ > **Tip:** For best results, use `pnpm` or `yarn` in monorepo setups.
29
32
 
30
- ## 🎨 Estilos globales recomendados
33
+ ## Peer Dependencies
31
34
 
32
- Para que los componentes de `lambda-ui-components` funcionen correctamente y evitar flashes de color al usar dark mode, agrega este snippet a tu CSS global (por ejemplo, en `globals.css` o el archivo global de tu proyecto):
35
+ Lambda UI Components requires **React 18+** and **ReactDOM** as peer dependencies. Make sure they are installed in your project.
33
36
 
34
- ```css
35
- body {
36
- background-color: var(--background-color);
37
- }
37
+ ```bash
38
+ pnpm add react react-dom
38
39
  ```
39
40
 
40
- Si quieres máxima compatibilidad con dark/light mode y variables:
41
+ For syntax highlighting in `CodeBlock`, install `prismjs`:
41
42
 
42
- ```css
43
- html,
44
- body {
45
- background: #09090b;
46
- color-scheme: dark;
47
- }
48
- html.light,
49
- body.light {
50
- background: #fff !important;
51
- color-scheme: light;
43
+ ```bash
44
+ pnpm add prismjs
45
+ ```
46
+
47
+ ## 🎨 Importing CSS
48
+
49
+ Import the Lambda UI CSS in your main entry file (usually `src/index.tsx` or `_app.tsx` in Next.js):
50
+
51
+ ```tsx
52
+ import "lambda-ui-components/dist/main.css";
53
+ ```
54
+
55
+ This ensures all components are styled correctly out of the box.
56
+
57
+ ## 🛠️ Theme & Configuration Providers
58
+
59
+ For advanced theming, localization, and consistent UI configuration, wrap your app with `LambdaConfigProvider` and `ThemeProvider` at the root of your component tree:
60
+
61
+ ```tsx
62
+ import { LambdaConfigProvider, ThemeProvider } from "lambda-ui-components";
63
+
64
+ export default function App({ children }) {
65
+ return (
66
+ <LambdaConfigProvider lang="en">
67
+ <ThemeProvider defaultTheme="dark">
68
+ {children}
69
+ </ThemeProvider>
70
+ </LambdaConfigProvider>
71
+ );
52
72
  }
53
73
  ```
54
74
 
55
- > **Nota:**
56
- > No forzamos estos estilos desde la librería para no interferir con el diseño de tu app.
57
- > Si usas un ThemeProvider, asegúrate de que sincroniza la clase `dark`/`light` en `<html>`.
58
-
59
- ## 📦 Uso Básico
60
-
61
- 1. **Importa los estilos globales una vez en tu entrypoint:**
62
- ```js
63
- import "lambda-ui-components/dist/index.css";
64
- ```
65
- 2. **Importa componentes individuales:**
66
- ```jsx
67
- import { Skeleton, Button, Card } from "lambda-ui-components";
68
- ```
69
-
70
- ### Ejemplo de uso
71
-
72
- ```jsx
73
- import "lambda-ui-components/dist/index.css";
74
- import { Skeleton, Button, Card } from "lambda-ui-components";
75
-
76
- function Demo() {
77
- return (
78
- <Card style={{ width: 320 }}>
79
- <Skeleton width={80} height={16} animationType="wave" />
80
- <Button variant="primary">Acción</Button>
81
- </Card>
82
- );
75
+ ## 📦 Basic Usage
76
+
77
+ Import and use components in your React app:
78
+
79
+ ```tsx
80
+ import { Button, Card } from "lambda-ui-components";
81
+
82
+ export default function Example() {
83
+ return (
84
+ <Card>
85
+ <Button color="primary">Hello Lambda UI</Button>
86
+ </Card>
87
+ );
83
88
  }
84
89
  ```
85
90
 
86
- ## 🧩 Componentes incluidos
91
+ All components are fully typed and support both controlled and uncontrolled usage patterns.
92
+
93
+ ### Next.js & RSC
94
+
95
+ If you use **Next.js App Router**, add `"use client"` at the top of your page or component file whenever you use interactive components:
96
+
97
+ ```tsx
98
+ "use client";
99
+ import { Button } from "lambda-ui-components";
100
+ // ...
101
+ ```
102
+
103
+ This is only necessary in Next.js App Router. In Vite, Astro, Remix, or CRA, you do **not** need this directive.
104
+
105
+ ## 🧩 Components Included
106
+
107
+ Lambda UI offers a comprehensive set of UI primitives and advanced components, including:
87
108
 
88
- - Accordion
89
- - Alert
90
- - Avatar
91
- - Badge
92
- - Breadcrumb
93
109
  - Button
94
- - Calendar
95
- - Card
96
- - Carousel
97
- - Checkbox
98
- - CodeBlock
99
- - ColorPicker
100
- - DatePicker
101
- - Dialog
102
- - Divider
103
- - Drawer
104
- - Dropdown
105
- - FileUpload
106
- - Flex
107
- - Input
108
- - InputNumber
109
- - Join
110
- - Link
111
- - NavigationMenu
110
+ - Input & TextArea
111
+ - Select & Dropdown
112
+ - Checkbox & Radio
113
+ - Switch
114
+ - Dialog & Drawer
112
115
  - Notification
113
- - Pagination
116
+ - Table & Pagination
117
+ - Card
118
+ - Tabs
119
+ - Slider
120
+ - Avatar
114
121
  - Progress
115
- - Radio/RadioGroup
116
- - Rating
117
- - Select
118
122
  - Skeleton
119
- - Slider
120
- - Splitter
121
- - Stepper
122
- - Switch
123
- - Tab
124
- - Table
125
- - Tag
126
- - TextArea
127
- - Tooltip
128
- - TreeView
123
+ - And many more…
129
124
 
130
- ## 🎨 Temas y Personalización
125
+ ## 🎨 Theming & Customization
131
126
 
132
- - Usa CSS variables para sobrescribir colores y estilos globales.
133
- - Soporte nativo para dark mode (`[data-theme="dark"]` y `[data-theme="light"]`).
127
+ - **CSS Variables:** Lambda UI Components uses CSS variables for theming. You can globally override the theme by changing variables in your CSS or using `data-theme` for dark mode and custom themes.
128
+ - **Unstyled Prop:** To customize the style of specific components, many support the `unstyled` prop, which removes default styles so you can apply your own.
134
129
 
135
- ## Peer Dependencies
136
-
137
- - `react` >= 18
138
- - `react-dom` >= 18
139
- - (Opcional) `prismjs` para CodeBlock
130
+ ## 🤝 Contribution
140
131
 
141
- ## 🤝 Contribuir
142
-
143
- - Haz un fork y un PR con tu mejora o bugfix.
144
- - Sigue la convención de componentes y estilos.
132
+ - Fork the repo and create a PR with your improvement or bugfix.
133
+ - Follow the component and style conventions.
145
134
 
146
135
  ---
147
136
 
148
- ¡Disfruta construyendo con Lambda UI Components!
149
-
150
- ## 📝 Licencia
137
+ ## 📝 License
151
138
 
152
- Este proyecto está licenciado bajo la licencia MIT. Puedes usarlo libremente en proyectos personales y comerciales. Consulta el archivo LICENSE para más detalles.
139
+ This project is licensed under the MIT License. You can freely use it in personal and commercial projects. See the LICENSE file for more details.
153
140
 
154
- Desarrollado por [BitCoder\_\_](https://alejandro-garcia.dev)
141
+ Developed by [BitCoder__](https://alejandro-garcia.dev)