@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.
- package/dist/{button-CxGyLoeN.cjs → button-D7hVwtUK.cjs} +3 -2
- package/dist/{button-CUNnLccZ.js → button-qnFw4fZd.js} +12 -11
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.js +1 -1
- package/dist/card.cjs +4 -4
- package/dist/card.js +1 -1
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.js +1 -1
- package/dist/components/ui/typography/typography.d.ts +2 -1
- package/dist/components/ui/typography/typography.stories.d.ts +2 -0
- package/dist/custom-layered-styles.css +1 -1
- package/dist/dialog.cjs +2 -2
- package/dist/dialog.js +2 -2
- package/dist/field.cjs +1 -1
- package/dist/field.js +1 -1
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.js +1 -1
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.js +1 -1
- package/dist/sidebar.cjs +1 -1
- package/dist/sidebar.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +20 -14
- package/docs/components/ui/typography.md +108 -19
- package/package.json +1 -1
package/dist/typography.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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;
|
package/dist/typography.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as e } from "./jsx-runtime-BzflLqGi.js";
|
|
2
2
|
import { S as p } from "./index-BvLQnI56.js";
|
|
3
|
-
import { c as
|
|
4
|
-
import { c as
|
|
5
|
-
const
|
|
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
|
|
24
|
+
function u({
|
|
20
25
|
className: t,
|
|
21
26
|
variant: a,
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
color: o,
|
|
28
|
+
asChild: r = !1,
|
|
29
|
+
...s
|
|
24
30
|
}) {
|
|
25
|
-
const
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
|
|
31
|
+
const m = r ? p : "p";
|
|
32
|
+
return /* @__PURE__ */ e.jsx(
|
|
33
|
+
m,
|
|
28
34
|
{
|
|
29
35
|
"data-slot": "typography",
|
|
30
|
-
className:
|
|
31
|
-
...
|
|
36
|
+
className: n(d({ variant: a, color: o, className: t })),
|
|
37
|
+
...s
|
|
32
38
|
}
|
|
33
39
|
);
|
|
34
40
|
}
|
|
35
41
|
export {
|
|
36
|
-
|
|
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
|
-
| `
|
|
25
|
-
| `
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
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
|
-
|
|
161
|
-
|
|
162
|
-
- **
|
|
163
|
-
- **
|
|
164
|
-
- **
|
|
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
|
-
- **
|
|
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
|
|