@adamosuiteservices/ui 2.10.6 → 2.10.7

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./jsx-runtime-BB_1_6y_.cjs"),o=require("./index-CjyiloO7.cjs"),i=require("./index-DoxiiusW.cjs"),m=require("./index-BTzZJcis.cjs"),x=m.cva("adm:text-neutrals-700",{variants:{variant:{sm:"adm:text-sm",md:"adm:text-base",lg:"adm:text-lg",xs:"adm:text-xs",caption:"adm:text-[11px]"}},defaultVariants:{variant:"sm"}});function p({className:t,variant:a,asChild:e=!1,...s}){const r=e?o.Slot:"p";return n.jsxRuntimeExports.jsx(r,{"data-slot":"typography",className:i.cn(x({variant:a,className:t})),...s})}exports.Typography=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./jsx-runtime-BB_1_6y_.cjs"),i=require("./index-CjyiloO7.cjs"),d=require("./index-DoxiiusW.cjs"),l=require("./index-BTzZJcis.cjs"),m=l.cva("",{variants:{variant:{sm:"adm:text-sm",md:"adm:text-base",lg:"adm:text-lg",xs:"adm:text-xs",caption:"adm:text-[11px]"},color:{default:"adm:text-neutrals-700",muted:"adm:text-neutrals-500"}},defaultVariants:{variant:"sm",color:"default"}});function u({className:t,variant:a,color:e,asChild:r=!1,...s}){const n=r?i.Slot:"p";return o.jsxRuntimeExports.jsx(n,{"data-slot":"typography",className:d.cn(m({variant:a,color:e,className:t})),...s})}exports.Typography=u;
@@ -1,8 +1,8 @@
1
- import { j as o } from "./jsx-runtime-BzflLqGi.js";
1
+ import { j as e } from "./jsx-runtime-BzflLqGi.js";
2
2
  import { S as p } from "./index-BvLQnI56.js";
3
- import { c as e } from "./index-CRiPKpXj.js";
4
- import { c as n } from "./index-BqtVL8d-.js";
5
- const x = n("adm:text-neutrals-700", {
3
+ import { c as n } from "./index-CRiPKpXj.js";
4
+ import { c as x } from "./index-BqtVL8d-.js";
5
+ const d = x("", {
6
6
  variants: {
7
7
  variant: {
8
8
  sm: "adm:text-sm",
@@ -10,28 +10,34 @@ const x = n("adm:text-neutrals-700", {
10
10
  lg: "adm:text-lg",
11
11
  xs: "adm:text-xs",
12
12
  caption: "adm:text-[11px]"
13
+ },
14
+ color: {
15
+ default: "adm:text-neutrals-700",
16
+ muted: "adm:text-neutrals-500"
13
17
  }
14
18
  },
15
19
  defaultVariants: {
16
- variant: "sm"
20
+ variant: "sm",
21
+ color: "default"
17
22
  }
18
23
  });
19
- function f({
24
+ function u({
20
25
  className: t,
21
26
  variant: a,
22
- asChild: s = !1,
23
- ...m
27
+ color: o,
28
+ asChild: r = !1,
29
+ ...s
24
30
  }) {
25
- const r = s ? p : "p";
26
- return /* @__PURE__ */ o.jsx(
27
- r,
31
+ const m = r ? p : "p";
32
+ return /* @__PURE__ */ e.jsx(
33
+ m,
28
34
  {
29
35
  "data-slot": "typography",
30
- className: e(x({ variant: a, className: t })),
31
- ...m
36
+ className: n(d({ variant: a, color: o, className: t })),
37
+ ...s
32
38
  }
33
39
  );
34
40
  }
35
41
  export {
36
- f as Typography
42
+ u as Typography
37
43
  };
@@ -18,23 +18,33 @@ import { Typography } from "@adamosuiteservices/ui/typography";
18
18
 
19
19
  ## Props
20
20
 
21
- | Prop | Tipo | Descripción |
22
- | ----------- | ------------------------------------------- | --------------------------------------- |
23
- | `variant` | `"lg" \| "md" \| "sm" \| "xs" \| "caption"` | Tamaño del texto |
24
- | `asChild` | `boolean` | Renderiza como child element (usa Slot) |
25
- | `className` | `string` | Clases CSS adicionales |
21
+ | Prop | Tipo | Default | Descripción |
22
+ | ----------- | ------------------------------------------- | ----------- | --------------------------------------- |
23
+ | `variant` | `"lg" \| "md" \| "sm" \| "xs" \| "caption"` | `"sm"` | Tamaño del texto |
24
+ | `color` | `"default" \| "muted"` | `"default"` | Color del texto |
25
+ | `asChild` | `boolean` | `false` | Renderiza como child element (usa Slot) |
26
+ | `className` | `string` | - | Clases CSS adicionales |
26
27
 
27
28
  **Nota**: Acepta todas las props de `<p>` cuando `asChild=false`
28
29
 
29
30
  ## Variantes
30
31
 
31
- | Variante | Font Size | Line Height | Uso |
32
- | --------- | ------------- | ---------------- | -------------------------- |
33
- | `lg` | `text-lg` | `leading-1` | Headings, texto enfatizado |
34
- | `md` | `text-base` | `leading-0.5` | Body text default |
35
- | `sm` | `text-sm` | `leading` | Secondary text, labels |
36
- | `xs` | `text-xs` | `leading-[20px]` | Fine print, detalles |
37
- | `caption` | `text-[11px]` | `leading-[18px]` | Captions, metadata |
32
+ ### Tamaños
33
+
34
+ | Variante | Font Size | Uso |
35
+ | --------- | ------------- | -------------------------- |
36
+ | `lg` | `text-lg` | Headings, texto enfatizado |
37
+ | `md` | `text-base` | Body text |
38
+ | `sm` | `text-sm` | Secondary text, labels (default) |
39
+ | `xs` | `text-xs` | Fine print, detalles |
40
+ | `caption` | `text-[11px]` | Captions, metadata |
41
+
42
+ ### Colores
43
+
44
+ | Color | Clase CSS | Uso |
45
+ | --------- | -------------------- | -------------------------- |
46
+ | `default` | `text-neutrals-700` | Texto principal (default) |
47
+ | `muted` | `text-neutrals-500` | Texto secundario |
38
48
 
39
49
  ## Patrones de Uso
40
50
 
@@ -146,6 +156,29 @@ import { Typography } from "@adamosuiteservices/ui/typography";
146
156
  </Typography>
147
157
  ```
148
158
 
159
+ ### Color Variants
160
+
161
+ ```tsx
162
+ {/* Default color - Primary text */}
163
+ <Typography variant="md" color="default">
164
+ This is primary text with default color (neutrals-700).
165
+ </Typography>
166
+
167
+ {/* Muted color - Secondary text */}
168
+ <Typography variant="md" color="muted">
169
+ This is secondary text with muted color (neutrals-500).
170
+ </Typography>
171
+
172
+ {/* Combining with sizes */}
173
+ <Typography variant="lg" color="default">
174
+ Large heading text
175
+ </Typography>
176
+
177
+ <Typography variant="sm" color="muted">
178
+ Small secondary information
179
+ </Typography>
180
+ ```
181
+
149
182
  ## Casos de Uso
150
183
 
151
184
  **Headings**: H1-H6 con tamaños consistentes
@@ -153,15 +186,69 @@ import { Typography } from "@adamosuiteservices/ui/typography";
153
186
  **Labels**: Etiquetas de formularios
154
187
  **Captions**: Descripciones de imágenes, metadata
155
188
  **Fine print**: Términos, condiciones, notas
156
- **Quotes**: Citas y testimonios
189
+ **Quotes**: Citas y testimonios
190
+ **Secondary text**: Información complementaria con `color="muted"`
191
+
192
+ ## Mejores Prácticas
193
+
194
+ ### Uso de Colores
195
+
196
+ ```tsx
197
+ {/* ✅ Correcto - Color default para contenido principal */}
198
+ <Typography variant="md" color="default">
199
+ This is the main content that users should read.
200
+ </Typography>
201
+
202
+ {/* ✅ Correcto - Color muted para información secundaria */}
203
+ <Typography variant="sm" color="muted">
204
+ Optional description or helper text.
205
+ </Typography>
206
+
207
+ {/* ✅ Correcto - Combinar tamaño y color apropiadamente */}
208
+ <div>
209
+ <Typography variant="lg" color="default">Main Heading</Typography>
210
+ <Typography variant="sm" color="muted">Subtitle or description</Typography>
211
+ </div>
212
+
213
+ {/* ⚠️ Evitar - Color muted en contenido principal */}
214
+ <Typography variant="md" color="muted">
215
+ Important information that should be easily readable
216
+ </Typography>
217
+ ```
218
+
219
+ ### Jerarquía Visual
220
+
221
+ ```tsx
222
+ {/* ✅ Correcto - Jerarquía clara con tamaño y color */}
223
+ <article>
224
+ <Typography variant="lg" color="default">Article Title</Typography>
225
+ <Typography variant="sm" color="muted">Published 2 hours ago</Typography>
226
+ <Typography variant="md" color="default">
227
+ Article content goes here with proper emphasis.
228
+ </Typography>
229
+ </article>
230
+
231
+ {/* ✅ Correcto - Lista con estados */}
232
+ <div>
233
+ <Typography variant="md" color="default">Active item</Typography>
234
+ <Typography variant="md" color="muted">Inactive item</Typography>
235
+ </div>
236
+ ```
157
237
 
158
238
  ## Estilos Base
159
239
 
160
- - **lg**: 18px, line-height: leading-1
161
- - **md**: 16px, line-height: leading-0.5 (default)
162
- - **sm**: 14px, line-height: leading
163
- - **xs**: 12px, line-height: 20px
164
- - **caption**: 11px, line-height: 18px
240
+ ### Tamaños de Texto
241
+
242
+ - **lg**: 18px (text-lg)
243
+ - **md**: 16px (text-base)
244
+ - **sm**: 14px (text-sm) - **default**
245
+ - **xs**: 12px (text-xs)
246
+ - **caption**: 11px (text-[11px])
247
+
248
+ ### Colores de Texto
249
+
250
+ - **default**: neutrals-700 (text-neutrals-700) - **default**
251
+ - **muted**: neutrals-500 (text-neutrals-500)
165
252
 
166
253
  ## Accesibilidad
167
254
 
@@ -175,8 +262,10 @@ import { Typography } from "@adamosuiteservices/ui/typography";
175
262
  - **CVA**: Variantes con class-variance-authority
176
263
  - **Slot**: Usa `@radix-ui/react-slot` para `asChild`
177
264
  - **Default element**: `<p>` cuando `asChild=false`
265
+ - **Default variants**: `variant="sm"` y `color="default"`
178
266
  - **Data attribute**: `data-slot="typography"` para identificación
179
- - **No estilos de color**: Typography solo define tamaño/line-height, combina con utility classes para color/weight
267
+ - **Color variants**: Incluye colores default (neutrals-700) y muted (neutrals-500)
268
+ - **Extensibilidad**: Combina con utility classes para estilos adicionales (weight, spacing, etc.)
180
269
 
181
270
  ## Troubleshooting
182
271
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamosuiteservices/ui",
3
- "version": "2.10.6",
3
+ "version": "2.10.7",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",