@adamosuiteservices/ui 2.10.6 → 2.10.8
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/alert.cjs +18 -19
- package/dist/alert.js +32 -27
- package/dist/{button-CUNnLccZ.js → button-BXTNbWAk.js} +10 -5
- package/dist/{button-CxGyLoeN.cjs → button-r2Y2aX25.cjs} +5 -1
- 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/alert/alert.d.ts +2 -1
- package/dist/components/ui/alert/alert.stories.d.ts +1 -0
- package/dist/components/ui/button/button.d.ts +1 -1
- package/dist/components/ui/button/button.stories.d.ts +1 -0
- 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 +2 -2
- package/dist/field.js +2 -2
- package/dist/input-group.cjs +2 -2
- package/dist/input-group.js +5 -5
- package/dist/{label-BQhv4uCu.cjs → label-BPyIEopy.cjs} +1 -1
- package/dist/{label-mzFeN5wI.js → label-CRkCfcdF.js} +1 -1
- package/dist/label.cjs +1 -1
- package/dist/label.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/button.md +66 -7
- 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
|
};
|
|
@@ -6,7 +6,7 @@ Componente fundamental para **acciones e interacciones del usuario**. Ofrece 11
|
|
|
6
6
|
|
|
7
7
|
## Características
|
|
8
8
|
|
|
9
|
-
- ✅
|
|
9
|
+
- ✅ 12 variantes: default, success (2), warning (2), destructive (2), secondary, outline, ghost, ghost-neutral, link
|
|
10
10
|
- ✅ 6 tamaños: sm, default, lg, icon, icon-sm, icon-lg
|
|
11
11
|
- ✅ Iconos auto-dimensionados (16px) con ajuste automático de padding
|
|
12
12
|
- ✅ Estados automáticos: hover, focus-visible, disabled, loading
|
|
@@ -199,7 +199,7 @@ Botón con borde y fondo transparente para acciones secundarias.
|
|
|
199
199
|
|
|
200
200
|
### ghost
|
|
201
201
|
|
|
202
|
-
Botón mínimo sin borde que solo aparece en hover.
|
|
202
|
+
Botón mínimo sin borde con color primario que solo aparece en hover.
|
|
203
203
|
|
|
204
204
|
```tsx
|
|
205
205
|
<Button variant="ghost">Ghost</Button>
|
|
@@ -208,9 +208,26 @@ Botón mínimo sin borde que solo aparece en hover.
|
|
|
208
208
|
**Estilos**:
|
|
209
209
|
|
|
210
210
|
- Fondo: Transparente
|
|
211
|
-
-
|
|
211
|
+
- Texto: `text-primary`
|
|
212
|
+
- Hover: `bg-primary-50`, `text-primary`
|
|
213
|
+
- Dark mode: `hover:bg-primary-50/20`
|
|
214
|
+
- Uso: Acciones terciarias con énfasis primario, iconos de herramientas, menús
|
|
215
|
+
|
|
216
|
+
### ghost-neutral
|
|
217
|
+
|
|
218
|
+
Botón mínimo sin borde con color neutral que solo aparece en hover.
|
|
219
|
+
|
|
220
|
+
```tsx
|
|
221
|
+
<Button variant="ghost-neutral">Ghost Neutral</Button>
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Estilos**:
|
|
225
|
+
|
|
226
|
+
- Fondo: Transparente
|
|
227
|
+
- Texto: Color heredado del contexto
|
|
228
|
+
- Hover: `bg-accent`, `text-accent-foreground`
|
|
212
229
|
- Dark mode: `hover:bg-accent/50`
|
|
213
|
-
- Uso: Acciones terciarias, iconos de herramientas,
|
|
230
|
+
- Uso: Acciones terciarias neutras, iconos de herramientas sin énfasis, controles de interfaz
|
|
214
231
|
|
|
215
232
|
### link
|
|
216
233
|
|
|
@@ -569,9 +586,9 @@ import { Icon } from "@adamosuiteservices/ui/icon";
|
|
|
569
586
|
|
|
570
587
|
## Props
|
|
571
588
|
|
|
572
|
-
| Prop | Tipo
|
|
573
|
-
| --------- |
|
|
574
|
-
| variant | `"default" \| "success" \| "success-medium" \| "warning" \| "warning-medium" \| "destructive" \| "destructive-medium" \| "secondary" \| "outline" \| "ghost" \| "link"` | `"default"` | Variante visual del botón |
|
|
589
|
+
| Prop | Tipo | Default | Descripción |
|
|
590
|
+
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | -------------------------------------------------------------- |
|
|
591
|
+
| variant | `"default" \| "success" \| "success-medium" \| "warning" \| "warning-medium" \| "destructive" \| "destructive-medium" \| "secondary" \| "outline" \| "ghost" \| "ghost-neutral" \| "link"` | `"default"` | Variante visual del botón |
|
|
575
592
|
| size | `"default" \| "sm" \| "lg" \| "icon" \| "icon-sm" \| "icon-lg"` | `"default"` | Tamaño del botón |
|
|
576
593
|
| asChild | `boolean` | `false` | Renderiza el hijo en lugar de un `<button>`. Usa Radix UI Slot |
|
|
577
594
|
| disabled | `boolean` | `false` | Desactiva el botón (opacity 50%, pointer-events none) |
|
|
@@ -732,6 +749,7 @@ Acciones en footer de dialogs.
|
|
|
732
749
|
Botones de herramientas con iconos.
|
|
733
750
|
|
|
734
751
|
```tsx
|
|
752
|
+
{/* Toolbar con ghost para acciones primarias */}
|
|
735
753
|
<div className="flex gap-1 p-2 border rounded-lg">
|
|
736
754
|
<Button size="icon-sm" variant="ghost" aria-label="Bold">
|
|
737
755
|
<BoldIcon />
|
|
@@ -750,6 +768,19 @@ Botones de herramientas con iconos.
|
|
|
750
768
|
<AlignCenterIcon />
|
|
751
769
|
</Button>
|
|
752
770
|
</div>
|
|
771
|
+
|
|
772
|
+
{/* Toolbar con ghost-neutral para apariencia más sutil */}
|
|
773
|
+
<div className="flex gap-1 p-2 border rounded-lg">
|
|
774
|
+
<Button size="icon-sm" variant="ghost-neutral" aria-label="Bold">
|
|
775
|
+
<BoldIcon />
|
|
776
|
+
</Button>
|
|
777
|
+
<Button size="icon-sm" variant="ghost-neutral" aria-label="Italic">
|
|
778
|
+
<ItalicIcon />
|
|
779
|
+
</Button>
|
|
780
|
+
<Button size="icon-sm" variant="ghost-neutral" aria-label="Underline">
|
|
781
|
+
<UnderlineIcon />
|
|
782
|
+
</Button>
|
|
783
|
+
</div>
|
|
753
784
|
```
|
|
754
785
|
|
|
755
786
|
### Call to Action (CTA)
|
|
@@ -890,6 +921,34 @@ function Navigation() {
|
|
|
890
921
|
<Button>Delete All Data</Button> {/* Debería ser destructive */}
|
|
891
922
|
```
|
|
892
923
|
|
|
924
|
+
### Ghost vs Ghost-Neutral
|
|
925
|
+
|
|
926
|
+
```tsx
|
|
927
|
+
{/* ✅ Correcto - Ghost para acciones con énfasis primario */}
|
|
928
|
+
<Button variant="ghost">
|
|
929
|
+
<Icon symbol="add" />
|
|
930
|
+
Add Item
|
|
931
|
+
</Button>
|
|
932
|
+
|
|
933
|
+
{/* ✅ Correcto - Ghost-neutral para controles sin énfasis */}
|
|
934
|
+
<Button variant="ghost-neutral" size="icon" aria-label="Settings">
|
|
935
|
+
<Icon symbol="settings" />
|
|
936
|
+
</Button>
|
|
937
|
+
|
|
938
|
+
{/* ✅ Correcto - Ghost-neutral en toolbars y paneles */}
|
|
939
|
+
<div className="flex gap-1">
|
|
940
|
+
<Button variant="ghost-neutral" size="icon-sm" aria-label="Edit">
|
|
941
|
+
<Icon symbol="edit" />
|
|
942
|
+
</Button>
|
|
943
|
+
<Button variant="ghost-neutral" size="icon-sm" aria-label="Delete">
|
|
944
|
+
<Icon symbol="delete" />
|
|
945
|
+
</Button>
|
|
946
|
+
</div>
|
|
947
|
+
|
|
948
|
+
{/* ⚠️ Considerar - Ghost puede ser muy prominente en algunos contextos */}
|
|
949
|
+
<Button variant="ghost">Close</Button> {/* Mejor usar ghost-neutral */}
|
|
950
|
+
```
|
|
951
|
+
|
|
893
952
|
### Espaciado Consistente
|
|
894
953
|
|
|
895
954
|
```tsx
|
|
@@ -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
|
|