@adamosuiteservices/ui 2.13.3 → 2.14.0
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-Bn4LFAa9.js → button-B0lWuG-D.js} +27 -18
- package/dist/{button-Day6_fbu.cjs → button-DVrteFz9.cjs} +2 -2
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/{calendar-B1_ybTg0.js → calendar-CfqtuOWv.js} +1 -1
- package/dist/{calendar-CZkzHgYi.cjs → calendar-CpUN6BGK.cjs} +1 -1
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.js +1 -1
- package/dist/{combobox-BOi7QzmO.js → combobox-B8HMlZy6.js} +1 -1
- package/dist/{combobox-0ndFo07_.cjs → combobox-Btj-hiBy.cjs} +1 -1
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.js +1 -1
- package/dist/components/ui/alert/alert.d.ts +1 -1
- package/dist/components/ui/button/button.d.ts +3 -2
- package/dist/components/ui/card/card.d.ts +2 -2
- package/dist/components/ui/slider/slider.d.ts +2 -2
- package/dist/date-picker-selector.cjs +1 -1
- package/dist/date-picker-selector.js +3 -3
- package/dist/file-upload.cjs +1 -1
- package/dist/file-upload.js +1 -1
- package/dist/full-screen-loader.cjs +1 -1
- package/dist/full-screen-loader.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/slider.cjs +3 -3
- package/dist/slider.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/tabs.cjs +14 -16
- package/dist/tabs.js +17 -19
- package/docs/AI-GUIDE.md +321 -321
- package/docs/components/layout/full-screen-loader.md +2 -2
- package/docs/components/layout/sidebar.md +399 -399
- package/docs/components/layout/toaster.md +436 -436
- package/docs/components/ui/accordion-rounded.md +584 -584
- package/docs/components/ui/accordion.md +269 -269
- package/docs/components/ui/button.md +35 -23
- package/docs/components/ui/calendar.md +1159 -1159
- package/docs/components/ui/card.md +1455 -1455
- package/docs/components/ui/checkbox.md +292 -292
- package/docs/components/ui/collapsible.md +323 -323
- package/docs/components/ui/dialog.md +628 -628
- package/docs/components/ui/field.md +706 -706
- package/docs/components/ui/hover-card.md +446 -446
- package/docs/components/ui/kbd.md +434 -434
- package/docs/components/ui/label.md +359 -359
- package/docs/components/ui/pagination.md +650 -650
- package/docs/components/ui/popover.md +536 -536
- package/docs/components/ui/progress.md +182 -182
- package/docs/components/ui/radio-group.md +311 -311
- package/docs/components/ui/separator.md +214 -214
- package/docs/components/ui/sheet.md +174 -174
- package/docs/components/ui/skeleton.md +140 -140
- package/docs/components/ui/slider.md +8 -8
- package/docs/components/ui/spinner.md +170 -170
- package/docs/components/ui/switch.md +408 -408
- package/docs/components/ui/tabs-underline.md +106 -106
- package/docs/components/ui/tabs.md +125 -122
- package/docs/components/ui/textarea.md +243 -243
- package/docs/components/ui/toggle.md +237 -237
- package/docs/components/ui/tooltip.md +317 -317
- package/docs/components/ui/typography.md +320 -320
- package/package.json +1 -1
|
@@ -32,7 +32,7 @@ import { Slider } from "@adamosuiteservices/ui/slider";
|
|
|
32
32
|
| `step` | `number` | Incremento (default: 1) |
|
|
33
33
|
| `disabled` | `boolean` | Deshabilita el slider |
|
|
34
34
|
| `orientation` | `"horizontal" \| "vertical"` | Orientación (default: horizontal) |
|
|
35
|
-
| `
|
|
35
|
+
| `colorSlide` | `"full" \| [string, string]` | Gradiente de colores personalizado |
|
|
36
36
|
| `theme` | `Theme` | Tema personalizado |
|
|
37
37
|
| `className` | `string` | Clases CSS adicionales |
|
|
38
38
|
|
|
@@ -305,8 +305,8 @@ function RainbowSlider() {
|
|
|
305
305
|
## Estilos Base
|
|
306
306
|
|
|
307
307
|
- **Track height**: `h-1.5` (horizontal), `w-1.5` (vertical)
|
|
308
|
-
- **Track bg**: `bg-muted` (o gradiente personalizado con prop `
|
|
309
|
-
- **Range bg**: `bg-primary` (transparente cuando se usa `
|
|
308
|
+
- **Track bg**: `bg-muted` (o gradiente personalizado con prop `colorSlide`)
|
|
309
|
+
- **Range bg**: `bg-primary` (transparente cuando se usa `colorSlide`)
|
|
310
310
|
- **Thumb**: `size-4` con `border-primary`, `bg-white`, `shadow-sm`
|
|
311
311
|
- **Thumb hover/focus**: `ring-4` con `ring-ring/50`
|
|
312
312
|
- **Vertical**: `min-h-44` default, `flex-col`
|
|
@@ -324,7 +324,7 @@ function CustomColorSlider() {
|
|
|
324
324
|
<div className="space-y-2">
|
|
325
325
|
<Label>Purple to Pink: {value[0]}%</Label>
|
|
326
326
|
<Slider
|
|
327
|
-
|
|
327
|
+
colorSlide={["#8b5cf6", "#ec4899"]}
|
|
328
328
|
value={value}
|
|
329
329
|
onValueChange={setValue}
|
|
330
330
|
## Troubleshooting
|
|
@@ -335,11 +335,11 @@ function CustomColorSlider() {
|
|
|
335
335
|
**Vertical no funciona**: Agrega `className="h-[Xpx]"` para altura explícita
|
|
336
336
|
**Step no funciona**: `step` debe ser divisor válido del rango (max - min)
|
|
337
337
|
**Multiple thumbs**: `value={[10, 50, 90]}` crea 3 thumbs
|
|
338
|
-
**Color no se aplica**: Prop `
|
|
338
|
+
**Color no se aplica**: Prop `colorSlide` acepta `"full"` o array de 2 strings `["#color1", "#color2"]`
|
|
339
339
|
**Gradiente no visible**: Asegura que los colores sean válidos (hex, rgb, hsl, etc.)
|
|
340
340
|
<Label>Blue to Green</Label>
|
|
341
341
|
<Slider
|
|
342
|
-
|
|
342
|
+
colorSlide={["#3b82f6", "#10b981"]}
|
|
343
343
|
defaultValue={[40]}
|
|
344
344
|
max={100}
|
|
345
345
|
step={1}
|
|
@@ -351,7 +351,7 @@ function CustomColorSlider() {
|
|
|
351
351
|
<div className="space-y-2">
|
|
352
352
|
<Label>Orange to Red</Label>
|
|
353
353
|
<Slider
|
|
354
|
-
|
|
354
|
+
colorSlide={["#f97316", "#ef4444"]}
|
|
355
355
|
defaultValue={[75]}
|
|
356
356
|
max={100}
|
|
357
357
|
step={1}
|
|
@@ -386,7 +386,7 @@ function ColorfulTemperature() {
|
|
|
386
386
|
<div className="space-y-2">
|
|
387
387
|
<Label>Target Temperature</Label>
|
|
388
388
|
<Slider
|
|
389
|
-
|
|
389
|
+
colorSlide={["#3b82f6", "#ef4444"]}
|
|
390
390
|
value={temperature}
|
|
391
391
|
onValueChange={setTemperature}
|
|
392
392
|
min={50}
|
|
@@ -1,170 +1,170 @@
|
|
|
1
|
-
# Spinner
|
|
2
|
-
|
|
3
|
-
Indicador de carga animado usando Material Symbols. Icono giratorio para estados de loading.
|
|
4
|
-
|
|
5
|
-
## Descripción
|
|
6
|
-
|
|
7
|
-
El componente `Spinner` muestra un indicador de carga animado usando el ícono `progress_activity` de Material Symbols.
|
|
8
|
-
|
|
9
|
-
## Importación
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
import { Spinner } from "@adamosuiteservices/ui/spinner";
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Anatomía
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
<Spinner />
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
**Componentes**: 1 (Spinner)
|
|
22
|
-
|
|
23
|
-
## Props
|
|
24
|
-
|
|
25
|
-
| Prop | Tipo | Descripción |
|
|
26
|
-
| ----------- | -------- | ------------------------------ |
|
|
27
|
-
| `className` | `string` | Clases CSS para tamaño y color |
|
|
28
|
-
|
|
29
|
-
**Nota**: Acepta todas las props de `<span>` (Material Symbols es font-based)
|
|
30
|
-
|
|
31
|
-
## Patrones de Uso
|
|
32
|
-
|
|
33
|
-
### Básico
|
|
34
|
-
|
|
35
|
-
```tsx
|
|
36
|
-
<Spinner />
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### Tamaños
|
|
40
|
-
|
|
41
|
-
```tsx
|
|
42
|
-
<Spinner className="text-sm" />
|
|
43
|
-
<Spinner className="text-lg" /> {/* Default */}
|
|
44
|
-
<Spinner className="text-2xl" />
|
|
45
|
-
<Spinner className="text-3xl" />
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### Colores
|
|
49
|
-
|
|
50
|
-
```tsx
|
|
51
|
-
<Spinner className="text-primary" />
|
|
52
|
-
<Spinner className="text-destructive" />
|
|
53
|
-
<Spinner className="text-warning" />
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### En Botones
|
|
57
|
-
|
|
58
|
-
```tsx
|
|
59
|
-
import { Button } from "@adamosuiteservices/ui/button";
|
|
60
|
-
|
|
61
|
-
<Button disabled>
|
|
62
|
-
<Spinner />
|
|
63
|
-
Loading...
|
|
64
|
-
</Button>
|
|
65
|
-
|
|
66
|
-
<Button variant="outline" disabled>
|
|
67
|
-
<Spinner />
|
|
68
|
-
Please wait
|
|
69
|
-
</Button>
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### Con Estado
|
|
73
|
-
|
|
74
|
-
```tsx
|
|
75
|
-
import { useState } from "react";
|
|
76
|
-
import { Button } from "@adamosuiteservices/ui/button";
|
|
77
|
-
|
|
78
|
-
function App() {
|
|
79
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
80
|
-
|
|
81
|
-
const handleClick = () => {
|
|
82
|
-
setIsLoading(true);
|
|
83
|
-
setTimeout(() => setIsLoading(false), 2000);
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
return (
|
|
87
|
-
<Button onClick={handleClick} disabled={isLoading}>
|
|
88
|
-
{isLoading ? (
|
|
89
|
-
<>
|
|
90
|
-
<Spinner />
|
|
91
|
-
Submitting...
|
|
92
|
-
</>
|
|
93
|
-
) : (
|
|
94
|
-
"Submit Form"
|
|
95
|
-
)}
|
|
96
|
-
</Button>
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### En Badges
|
|
102
|
-
|
|
103
|
-
```tsx
|
|
104
|
-
import { Badge } from "@adamosuiteservices/ui/badge";
|
|
105
|
-
|
|
106
|
-
<Badge>
|
|
107
|
-
<Spinner />
|
|
108
|
-
Syncing
|
|
109
|
-
</Badge>;
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### En Cards
|
|
113
|
-
|
|
114
|
-
```tsx
|
|
115
|
-
import { Card, CardContent } from "@adamosuiteservices/ui/card";
|
|
116
|
-
|
|
117
|
-
<Card>
|
|
118
|
-
<CardContent className="flex items-center space-x-3 p-6">
|
|
119
|
-
<Spinner className="text-xl" />
|
|
120
|
-
<span>Processing your payment...</span>
|
|
121
|
-
</CardContent>
|
|
122
|
-
</Card>;
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### Inline
|
|
126
|
-
|
|
127
|
-
```tsx
|
|
128
|
-
<p>
|
|
129
|
-
Loading data <Spinner className="inline text-lg" />
|
|
130
|
-
</p>
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
## Casos de Uso
|
|
134
|
-
|
|
135
|
-
**Button loading**: Estados de carga en botones
|
|
136
|
-
**Badge status**: Indicador de sincronización/procesamiento
|
|
137
|
-
**Inline loading**: Texto con loading inline
|
|
138
|
-
**Cards**: Contenido de cards en proceso
|
|
139
|
-
**Global loading**: Indicadores globales de app
|
|
140
|
-
|
|
141
|
-
## Estilos Base
|
|
142
|
-
|
|
143
|
-
- **Size**: `text-lg` default (font-size based)
|
|
144
|
-
- **Animation**: `animate-spin`
|
|
145
|
-
- **Role**: `role="status"`
|
|
146
|
-
- **ARIA**: `aria-label="Loading"`
|
|
147
|
-
|
|
148
|
-
## Accesibilidad
|
|
149
|
-
|
|
150
|
-
- ✅ **Role**: `role="status"`
|
|
151
|
-
- ✅ **ARIA**: `aria-label="Loading"` para screen readers
|
|
152
|
-
- ✅ **Screen readers**: Anuncia estado de carga
|
|
153
|
-
|
|
154
|
-
## Notas de Implementación
|
|
155
|
-
|
|
156
|
-
- **Material Symbols**: Usa Icon component con symbol `progress_activity`
|
|
157
|
-
- **Spin animation**: Tailwind `animate-spin`
|
|
158
|
-
- **Font-based**: Material Symbol icon (span element)
|
|
159
|
-
- **Customizable**: Tamaño y color via className con font-size classes
|
|
160
|
-
|
|
161
|
-
## Troubleshooting
|
|
162
|
-
|
|
163
|
-
**No gira**: Verifica `animate-spin` aplicado
|
|
164
|
-
**Muy pequeño/grande**: Ajusta `text-*` en className (text-lg, text-xl, etc.)
|
|
165
|
-
**Color incorrecto**: Usa `text-*` para cambiar color
|
|
166
|
-
**No se ve en button**: Asegúrate de espaciado con gap
|
|
167
|
-
|
|
168
|
-
## Referencias
|
|
169
|
-
|
|
170
|
-
- **Material Symbols**: <https://fonts.google.com/icons>
|
|
1
|
+
# Spinner
|
|
2
|
+
|
|
3
|
+
Indicador de carga animado usando Material Symbols. Icono giratorio para estados de loading.
|
|
4
|
+
|
|
5
|
+
## Descripción
|
|
6
|
+
|
|
7
|
+
El componente `Spinner` muestra un indicador de carga animado usando el ícono `progress_activity` de Material Symbols.
|
|
8
|
+
|
|
9
|
+
## Importación
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Spinner } from "@adamosuiteservices/ui/spinner";
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Anatomía
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
<Spinner />
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Componentes**: 1 (Spinner)
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
| Prop | Tipo | Descripción |
|
|
26
|
+
| ----------- | -------- | ------------------------------ |
|
|
27
|
+
| `className` | `string` | Clases CSS para tamaño y color |
|
|
28
|
+
|
|
29
|
+
**Nota**: Acepta todas las props de `<span>` (Material Symbols es font-based)
|
|
30
|
+
|
|
31
|
+
## Patrones de Uso
|
|
32
|
+
|
|
33
|
+
### Básico
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
<Spinner />
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Tamaños
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
<Spinner className="text-sm" />
|
|
43
|
+
<Spinner className="text-lg" /> {/* Default */}
|
|
44
|
+
<Spinner className="text-2xl" />
|
|
45
|
+
<Spinner className="text-3xl" />
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Colores
|
|
49
|
+
|
|
50
|
+
```tsx
|
|
51
|
+
<Spinner className="text-primary" />
|
|
52
|
+
<Spinner className="text-destructive" />
|
|
53
|
+
<Spinner className="text-warning" />
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### En Botones
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
import { Button } from "@adamosuiteservices/ui/button";
|
|
60
|
+
|
|
61
|
+
<Button disabled>
|
|
62
|
+
<Spinner />
|
|
63
|
+
Loading...
|
|
64
|
+
</Button>
|
|
65
|
+
|
|
66
|
+
<Button variant="outline" disabled>
|
|
67
|
+
<Spinner />
|
|
68
|
+
Please wait
|
|
69
|
+
</Button>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Con Estado
|
|
73
|
+
|
|
74
|
+
```tsx
|
|
75
|
+
import { useState } from "react";
|
|
76
|
+
import { Button } from "@adamosuiteservices/ui/button";
|
|
77
|
+
|
|
78
|
+
function App() {
|
|
79
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
80
|
+
|
|
81
|
+
const handleClick = () => {
|
|
82
|
+
setIsLoading(true);
|
|
83
|
+
setTimeout(() => setIsLoading(false), 2000);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<Button onClick={handleClick} disabled={isLoading}>
|
|
88
|
+
{isLoading ? (
|
|
89
|
+
<>
|
|
90
|
+
<Spinner />
|
|
91
|
+
Submitting...
|
|
92
|
+
</>
|
|
93
|
+
) : (
|
|
94
|
+
"Submit Form"
|
|
95
|
+
)}
|
|
96
|
+
</Button>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### En Badges
|
|
102
|
+
|
|
103
|
+
```tsx
|
|
104
|
+
import { Badge } from "@adamosuiteservices/ui/badge";
|
|
105
|
+
|
|
106
|
+
<Badge>
|
|
107
|
+
<Spinner />
|
|
108
|
+
Syncing
|
|
109
|
+
</Badge>;
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### En Cards
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
import { Card, CardContent } from "@adamosuiteservices/ui/card";
|
|
116
|
+
|
|
117
|
+
<Card>
|
|
118
|
+
<CardContent className="flex items-center space-x-3 p-6">
|
|
119
|
+
<Spinner className="text-xl" />
|
|
120
|
+
<span>Processing your payment...</span>
|
|
121
|
+
</CardContent>
|
|
122
|
+
</Card>;
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Inline
|
|
126
|
+
|
|
127
|
+
```tsx
|
|
128
|
+
<p>
|
|
129
|
+
Loading data <Spinner className="inline text-lg" />
|
|
130
|
+
</p>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Casos de Uso
|
|
134
|
+
|
|
135
|
+
**Button loading**: Estados de carga en botones
|
|
136
|
+
**Badge status**: Indicador de sincronización/procesamiento
|
|
137
|
+
**Inline loading**: Texto con loading inline
|
|
138
|
+
**Cards**: Contenido de cards en proceso
|
|
139
|
+
**Global loading**: Indicadores globales de app
|
|
140
|
+
|
|
141
|
+
## Estilos Base
|
|
142
|
+
|
|
143
|
+
- **Size**: `text-lg` default (font-size based)
|
|
144
|
+
- **Animation**: `animate-spin`
|
|
145
|
+
- **Role**: `role="status"`
|
|
146
|
+
- **ARIA**: `aria-label="Loading"`
|
|
147
|
+
|
|
148
|
+
## Accesibilidad
|
|
149
|
+
|
|
150
|
+
- ✅ **Role**: `role="status"`
|
|
151
|
+
- ✅ **ARIA**: `aria-label="Loading"` para screen readers
|
|
152
|
+
- ✅ **Screen readers**: Anuncia estado de carga
|
|
153
|
+
|
|
154
|
+
## Notas de Implementación
|
|
155
|
+
|
|
156
|
+
- **Material Symbols**: Usa Icon component con symbol `progress_activity`
|
|
157
|
+
- **Spin animation**: Tailwind `animate-spin`
|
|
158
|
+
- **Font-based**: Material Symbol icon (span element)
|
|
159
|
+
- **Customizable**: Tamaño y color via className con font-size classes
|
|
160
|
+
|
|
161
|
+
## Troubleshooting
|
|
162
|
+
|
|
163
|
+
**No gira**: Verifica `animate-spin` aplicado
|
|
164
|
+
**Muy pequeño/grande**: Ajusta `text-*` en className (text-lg, text-xl, etc.)
|
|
165
|
+
**Color incorrecto**: Usa `text-*` para cambiar color
|
|
166
|
+
**No se ve en button**: Asegúrate de espaciado con gap
|
|
167
|
+
|
|
168
|
+
## Referencias
|
|
169
|
+
|
|
170
|
+
- **Material Symbols**: <https://fonts.google.com/icons>
|