@adamosuiteservices/ui 2.13.4 → 2.14.1
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/colors.css +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/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/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/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
|
@@ -1,182 +1,182 @@
|
|
|
1
|
-
# Progress
|
|
2
|
-
|
|
3
|
-
Indicador de progreso basado en Radix UI. Muestra el avance de una tarea con barra animada y variantes de color.
|
|
4
|
-
|
|
5
|
-
## Descripción
|
|
6
|
-
|
|
7
|
-
El componente `Progress` muestra una barra de progreso para indicar el estado de una tarea.
|
|
8
|
-
|
|
9
|
-
## Importación
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
import { Progress } from "@adamosuiteservices/ui/progress";
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Anatomía
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
<Progress value={33} />
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
**Componentes**: 1 (Progress)
|
|
22
|
-
|
|
23
|
-
## Props
|
|
24
|
-
|
|
25
|
-
| Prop | Tipo | Default | Descripción |
|
|
26
|
-
| ----------- | ------------------------------------------------------ | ----------- | ---------------------- |
|
|
27
|
-
| `value` | `number` | `0` | Progreso (0-100) |
|
|
28
|
-
| `variant` | `"default" \| "destructive" \| "success" \| "warning"` | `"default"` | Variante de color |
|
|
29
|
-
| `max` | `number` | `100` | Valor máximo |
|
|
30
|
-
| `className` | `string` | - | Clases CSS adicionales |
|
|
31
|
-
|
|
32
|
-
## Patrones de Uso
|
|
33
|
-
|
|
34
|
-
### Básico
|
|
35
|
-
|
|
36
|
-
```tsx
|
|
37
|
-
<Progress value={33} />
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Con Label
|
|
41
|
-
|
|
42
|
-
```tsx
|
|
43
|
-
<div className="space-y-2">
|
|
44
|
-
<div className="flex items-center justify-between">
|
|
45
|
-
<Label>File Upload</Label>
|
|
46
|
-
<span className="text-sm text-muted-foreground">45%</span>
|
|
47
|
-
</div>
|
|
48
|
-
<Progress value={45} />
|
|
49
|
-
<p className="text-xs text-muted-foreground">
|
|
50
|
-
Uploading document.pdf (2.3 MB of 5.1 MB)
|
|
51
|
-
</p>
|
|
52
|
-
</div>
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Variantes
|
|
56
|
-
|
|
57
|
-
```tsx
|
|
58
|
-
<Progress value={70} variant="default" />
|
|
59
|
-
<Progress value={100} variant="success" />
|
|
60
|
-
<Progress value={40} variant="warning" />
|
|
61
|
-
<Progress value={90} variant="destructive" />
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### Animado
|
|
65
|
-
|
|
66
|
-
```tsx
|
|
67
|
-
import { useState, useEffect } from "react";
|
|
68
|
-
|
|
69
|
-
function App() {
|
|
70
|
-
const [progress, setProgress] = useState(13);
|
|
71
|
-
|
|
72
|
-
useEffect(() => {
|
|
73
|
-
const timer = setTimeout(() => setProgress(66), 500);
|
|
74
|
-
return () => clearTimeout(timer);
|
|
75
|
-
}, []);
|
|
76
|
-
|
|
77
|
-
return (
|
|
78
|
-
<div className="space-y-2">
|
|
79
|
-
<div className="flex items-center justify-between">
|
|
80
|
-
<Label>Loading...</Label>
|
|
81
|
-
<span className="text-sm text-muted-foreground">{progress}%</span>
|
|
82
|
-
</div>
|
|
83
|
-
<Progress value={progress} />
|
|
84
|
-
</div>
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Tamaños Custom
|
|
90
|
-
|
|
91
|
-
```tsx
|
|
92
|
-
<Progress value={60} className="h-1" /> {/* Small */}
|
|
93
|
-
<Progress value={60} /> {/* Default h-2 */}
|
|
94
|
-
<Progress value={60} className="h-4" /> {/* Large */}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Con Iconos
|
|
98
|
-
|
|
99
|
-
```tsx
|
|
100
|
-
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
101
|
-
|
|
102
|
-
<div className="space-y-2">
|
|
103
|
-
<div className="flex items-center gap-2">
|
|
104
|
-
<Icon symbol="download" className="text-lg" />
|
|
105
|
-
<Label>Download</Label>
|
|
106
|
-
<span className="ml-auto text-sm text-muted-foreground">65%</span>
|
|
107
|
-
</div>
|
|
108
|
-
<Progress value={65} />
|
|
109
|
-
</div>;
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Multi-Step
|
|
113
|
-
|
|
114
|
-
```tsx
|
|
115
|
-
import { useState } from "react";
|
|
116
|
-
|
|
117
|
-
function App() {
|
|
118
|
-
const [currentStep, setCurrentStep] = useState(2);
|
|
119
|
-
const totalSteps = 5;
|
|
120
|
-
const progress = (currentStep / totalSteps) * 100;
|
|
121
|
-
|
|
122
|
-
return (
|
|
123
|
-
<div className="space-y-2">
|
|
124
|
-
<div className="flex items-center justify-between">
|
|
125
|
-
<Label>Setup Progress</Label>
|
|
126
|
-
<span className="text-sm text-muted-foreground">
|
|
127
|
-
Step {currentStep} of {totalSteps}
|
|
128
|
-
</span>
|
|
129
|
-
</div>
|
|
130
|
-
<Progress value={progress} />
|
|
131
|
-
</div>
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## Casos de Uso
|
|
137
|
-
|
|
138
|
-
**File uploads**: Progreso de subida de archivos
|
|
139
|
-
**Downloads**: Descarga de contenido
|
|
140
|
-
**Multi-step forms**: Wizards con pasos
|
|
141
|
-
**System resources**: CPU, memoria, disco
|
|
142
|
-
**Installation**: Instalación de paquetes/apps
|
|
143
|
-
**Processing**: Tareas de procesamiento
|
|
144
|
-
|
|
145
|
-
## Estilos Base
|
|
146
|
-
|
|
147
|
-
- **Height**: `h-2` default
|
|
148
|
-
- **Border radius**: `rounded-full`
|
|
149
|
-
- **Transition**: `transition-all` en indicator
|
|
150
|
-
- **Transform**: `translateX` para animación
|
|
151
|
-
|
|
152
|
-
### Estilos de Variantes
|
|
153
|
-
|
|
154
|
-
- **default**: `bg-primary/20` → `bg-primary`
|
|
155
|
-
- **destructive**: `bg-destructive/20` → `bg-destructive`
|
|
156
|
-
- **success**: `bg-success/20` → `bg-success`
|
|
157
|
-
- **warning**: `bg-warning/20` → `bg-warning`
|
|
158
|
-
|
|
159
|
-
## Accesibilidad
|
|
160
|
-
|
|
161
|
-
- ✅ **ARIA**: `role="progressbar"`, `aria-valuenow`, `aria-valuemin`, `aria-valuemax`
|
|
162
|
-
- ✅ **Screen readers**: Anuncia progreso automáticamente
|
|
163
|
-
- ✅ **Live region**: Actualizaciones en tiempo real
|
|
164
|
-
|
|
165
|
-
## Notas de Implementación
|
|
166
|
-
|
|
167
|
-
- **Radix UI**: Basado en `@radix-ui/react-progress`
|
|
168
|
-
- **CVA**: Variantes con class-variance-authority
|
|
169
|
-
- **Animation**: CSS transform para transición suave
|
|
170
|
-
- **Value clamp**: Valor se limita entre 0-100 automáticamente
|
|
171
|
-
|
|
172
|
-
## Troubleshooting
|
|
173
|
-
|
|
174
|
-
**No se ve progreso**: Verifica que `value` esté entre 0-100
|
|
175
|
-
**No anima**: Asegúrate de que value cambie, usa `transition-all`
|
|
176
|
-
**Variante no cambia color**: Verifica prop `variant` correcta
|
|
177
|
-
**Muy fino**: Ajusta `className="h-3"` o mayor
|
|
178
|
-
|
|
179
|
-
## Referencias
|
|
180
|
-
|
|
181
|
-
- **Radix UI Progress**: <https://www.radix-ui.com/primitives/docs/components/progress>
|
|
182
|
-
- **shadcn/ui Progress**: <https://ui.shadcn.com/docs/components/progress>
|
|
1
|
+
# Progress
|
|
2
|
+
|
|
3
|
+
Indicador de progreso basado en Radix UI. Muestra el avance de una tarea con barra animada y variantes de color.
|
|
4
|
+
|
|
5
|
+
## Descripción
|
|
6
|
+
|
|
7
|
+
El componente `Progress` muestra una barra de progreso para indicar el estado de una tarea.
|
|
8
|
+
|
|
9
|
+
## Importación
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Progress } from "@adamosuiteservices/ui/progress";
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Anatomía
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
<Progress value={33} />
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Componentes**: 1 (Progress)
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
| Prop | Tipo | Default | Descripción |
|
|
26
|
+
| ----------- | ------------------------------------------------------ | ----------- | ---------------------- |
|
|
27
|
+
| `value` | `number` | `0` | Progreso (0-100) |
|
|
28
|
+
| `variant` | `"default" \| "destructive" \| "success" \| "warning"` | `"default"` | Variante de color |
|
|
29
|
+
| `max` | `number` | `100` | Valor máximo |
|
|
30
|
+
| `className` | `string` | - | Clases CSS adicionales |
|
|
31
|
+
|
|
32
|
+
## Patrones de Uso
|
|
33
|
+
|
|
34
|
+
### Básico
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
<Progress value={33} />
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Con Label
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
<div className="space-y-2">
|
|
44
|
+
<div className="flex items-center justify-between">
|
|
45
|
+
<Label>File Upload</Label>
|
|
46
|
+
<span className="text-sm text-muted-foreground">45%</span>
|
|
47
|
+
</div>
|
|
48
|
+
<Progress value={45} />
|
|
49
|
+
<p className="text-xs text-muted-foreground">
|
|
50
|
+
Uploading document.pdf (2.3 MB of 5.1 MB)
|
|
51
|
+
</p>
|
|
52
|
+
</div>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Variantes
|
|
56
|
+
|
|
57
|
+
```tsx
|
|
58
|
+
<Progress value={70} variant="default" />
|
|
59
|
+
<Progress value={100} variant="success" />
|
|
60
|
+
<Progress value={40} variant="warning" />
|
|
61
|
+
<Progress value={90} variant="destructive" />
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Animado
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
import { useState, useEffect } from "react";
|
|
68
|
+
|
|
69
|
+
function App() {
|
|
70
|
+
const [progress, setProgress] = useState(13);
|
|
71
|
+
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
const timer = setTimeout(() => setProgress(66), 500);
|
|
74
|
+
return () => clearTimeout(timer);
|
|
75
|
+
}, []);
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<div className="space-y-2">
|
|
79
|
+
<div className="flex items-center justify-between">
|
|
80
|
+
<Label>Loading...</Label>
|
|
81
|
+
<span className="text-sm text-muted-foreground">{progress}%</span>
|
|
82
|
+
</div>
|
|
83
|
+
<Progress value={progress} />
|
|
84
|
+
</div>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Tamaños Custom
|
|
90
|
+
|
|
91
|
+
```tsx
|
|
92
|
+
<Progress value={60} className="h-1" /> {/* Small */}
|
|
93
|
+
<Progress value={60} /> {/* Default h-2 */}
|
|
94
|
+
<Progress value={60} className="h-4" /> {/* Large */}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Con Iconos
|
|
98
|
+
|
|
99
|
+
```tsx
|
|
100
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
101
|
+
|
|
102
|
+
<div className="space-y-2">
|
|
103
|
+
<div className="flex items-center gap-2">
|
|
104
|
+
<Icon symbol="download" className="text-lg" />
|
|
105
|
+
<Label>Download</Label>
|
|
106
|
+
<span className="ml-auto text-sm text-muted-foreground">65%</span>
|
|
107
|
+
</div>
|
|
108
|
+
<Progress value={65} />
|
|
109
|
+
</div>;
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Multi-Step
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
import { useState } from "react";
|
|
116
|
+
|
|
117
|
+
function App() {
|
|
118
|
+
const [currentStep, setCurrentStep] = useState(2);
|
|
119
|
+
const totalSteps = 5;
|
|
120
|
+
const progress = (currentStep / totalSteps) * 100;
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<div className="space-y-2">
|
|
124
|
+
<div className="flex items-center justify-between">
|
|
125
|
+
<Label>Setup Progress</Label>
|
|
126
|
+
<span className="text-sm text-muted-foreground">
|
|
127
|
+
Step {currentStep} of {totalSteps}
|
|
128
|
+
</span>
|
|
129
|
+
</div>
|
|
130
|
+
<Progress value={progress} />
|
|
131
|
+
</div>
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Casos de Uso
|
|
137
|
+
|
|
138
|
+
**File uploads**: Progreso de subida de archivos
|
|
139
|
+
**Downloads**: Descarga de contenido
|
|
140
|
+
**Multi-step forms**: Wizards con pasos
|
|
141
|
+
**System resources**: CPU, memoria, disco
|
|
142
|
+
**Installation**: Instalación de paquetes/apps
|
|
143
|
+
**Processing**: Tareas de procesamiento
|
|
144
|
+
|
|
145
|
+
## Estilos Base
|
|
146
|
+
|
|
147
|
+
- **Height**: `h-2` default
|
|
148
|
+
- **Border radius**: `rounded-full`
|
|
149
|
+
- **Transition**: `transition-all` en indicator
|
|
150
|
+
- **Transform**: `translateX` para animación
|
|
151
|
+
|
|
152
|
+
### Estilos de Variantes
|
|
153
|
+
|
|
154
|
+
- **default**: `bg-primary/20` → `bg-primary`
|
|
155
|
+
- **destructive**: `bg-destructive/20` → `bg-destructive`
|
|
156
|
+
- **success**: `bg-success/20` → `bg-success`
|
|
157
|
+
- **warning**: `bg-warning/20` → `bg-warning`
|
|
158
|
+
|
|
159
|
+
## Accesibilidad
|
|
160
|
+
|
|
161
|
+
- ✅ **ARIA**: `role="progressbar"`, `aria-valuenow`, `aria-valuemin`, `aria-valuemax`
|
|
162
|
+
- ✅ **Screen readers**: Anuncia progreso automáticamente
|
|
163
|
+
- ✅ **Live region**: Actualizaciones en tiempo real
|
|
164
|
+
|
|
165
|
+
## Notas de Implementación
|
|
166
|
+
|
|
167
|
+
- **Radix UI**: Basado en `@radix-ui/react-progress`
|
|
168
|
+
- **CVA**: Variantes con class-variance-authority
|
|
169
|
+
- **Animation**: CSS transform para transición suave
|
|
170
|
+
- **Value clamp**: Valor se limita entre 0-100 automáticamente
|
|
171
|
+
|
|
172
|
+
## Troubleshooting
|
|
173
|
+
|
|
174
|
+
**No se ve progreso**: Verifica que `value` esté entre 0-100
|
|
175
|
+
**No anima**: Asegúrate de que value cambie, usa `transition-all`
|
|
176
|
+
**Variante no cambia color**: Verifica prop `variant` correcta
|
|
177
|
+
**Muy fino**: Ajusta `className="h-3"` o mayor
|
|
178
|
+
|
|
179
|
+
## Referencias
|
|
180
|
+
|
|
181
|
+
- **Radix UI Progress**: <https://www.radix-ui.com/primitives/docs/components/progress>
|
|
182
|
+
- **shadcn/ui Progress**: <https://ui.shadcn.com/docs/components/progress>
|