@adamosuiteservices/ui 2.10.7 → 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-qnFw4fZd.js → button-BXTNbWAk.js} +12 -8
- package/dist/{button-D7hVwtUK.cjs → button-r2Y2aX25.cjs} +4 -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/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/custom-layered-styles.css +1 -1
- package/dist/field.cjs +1 -1
- package/dist/field.js +1 -1
- 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/docs/components/ui/button.md +66 -7
- package/package.json +1 -1
|
@@ -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
|