@adamosuiteservices/ui 2.14.1 → 2.15.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.
Files changed (41) hide show
  1. package/dist/combobox-DGuQtXjP.js +608 -0
  2. package/dist/combobox-hTCtPMUL.cjs +40 -0
  3. package/dist/combobox.cjs +1 -1
  4. package/dist/combobox.js +1 -1
  5. package/dist/components/ui/combobox/combobox.d.ts +7 -1
  6. package/dist/components/ui/date-picker-selector/date-picker-selector.d.ts +75 -1
  7. package/dist/components/ui/file-upload/file-upload.d.ts +3 -1
  8. package/dist/components/ui/slider/slider.d.ts +1 -1
  9. package/dist/components/ui/switch/switch.d.ts +1 -1
  10. package/dist/date-picker-selector.cjs +1 -1
  11. package/dist/date-picker-selector.js +81 -78
  12. package/dist/field.cjs +2 -2
  13. package/dist/field.js +2 -2
  14. package/dist/file-upload.cjs +5 -3
  15. package/dist/file-upload.js +178 -149
  16. package/dist/slider.cjs +5 -5
  17. package/dist/slider.js +196 -177
  18. package/dist/styles.css +1 -1
  19. package/dist/switch.cjs +3 -3
  20. package/dist/switch.js +105 -85
  21. package/docs/components/ui/accordion-rounded.md +2 -6
  22. package/docs/components/ui/avatar.md +3 -1
  23. package/docs/components/ui/button.md +22 -16
  24. package/docs/components/ui/card.md +49 -31
  25. package/docs/components/ui/checkbox.md +44 -8
  26. package/docs/components/ui/combobox.md +100 -0
  27. package/docs/components/ui/date-picker-selector.md +147 -28
  28. package/docs/components/ui/file-upload.md +241 -94
  29. package/docs/components/ui/icon.md +1 -1
  30. package/docs/components/ui/input.md +4 -1
  31. package/docs/components/ui/radio-group.md +1 -1
  32. package/docs/components/ui/select.md +51 -34
  33. package/docs/components/ui/sheet.md +3 -9
  34. package/docs/components/ui/slider.md +120 -99
  35. package/docs/components/ui/switch.md +408 -408
  36. package/docs/components/ui/textarea.md +37 -22
  37. package/docs/components/ui/tooltip.md +5 -2
  38. package/docs/components/ui/typography.md +63 -39
  39. package/package.json +1 -1
  40. package/dist/combobox-B8HMlZy6.js +0 -601
  41. package/dist/combobox-Btj-hiBy.cjs +0 -40
@@ -50,12 +50,21 @@ import { Textarea } from "@adamosuiteservices/ui/textarea";
50
50
  ### Con Label
51
51
 
52
52
  ```tsx
53
- import { Label } from "@adamosuiteservices/ui/label";
54
-
55
- <div className="grid w-full gap-2">
56
- <Label htmlFor="message">Your message</Label>
57
- <Textarea placeholder="Type your message here." id="message" />
58
- </div>;
53
+ import {
54
+ Field,
55
+ FieldContent,
56
+ FieldGroup,
57
+ FieldLabel,
58
+ } from "@adamosuiteservices/ui/field";
59
+
60
+ <FieldGroup className="max-w-sm">
61
+ <Field>
62
+ <FieldLabel htmlFor="message">Your message</FieldLabel>
63
+ <FieldContent>
64
+ <Textarea placeholder="Type your message here." id="message" />
65
+ </FieldContent>
66
+ </Field>
67
+ </FieldGroup>;
59
68
  ```
60
69
 
61
70
  ### Controlado con Contador
@@ -67,22 +76,28 @@ function App() {
67
76
  const [value, setValue] = useState("");
68
77
 
69
78
  return (
70
- <div className="grid w-full gap-2">
71
- <Label htmlFor="feedback">
72
- Your feedback ({value.length}/500 characters)
73
- </Label>
74
- <Textarea
75
- id="feedback"
76
- placeholder="Share your thoughts..."
77
- value={value}
78
- onChange={(e) => setValue(e.target.value)}
79
- maxLength={500}
80
- />
81
- <div className="flex justify-between text-sm text-muted-foreground">
82
- <span>{value.length} characters</span>
83
- <span>{500 - value.length} remaining</span>
84
- </div>
85
- </div>
79
+ <FieldGroup className="max-w-sm">
80
+ <Field>
81
+ <FieldLabel htmlFor="feedback">
82
+ Your feedback ({value.length}/500 characters)
83
+ </FieldLabel>
84
+ <FieldContent>
85
+ <Textarea
86
+ id="feedback"
87
+ placeholder="Share your thoughts..."
88
+ value={value}
89
+ onChange={(e) => setValue(e.target.value)}
90
+ maxLength={500}
91
+ />
92
+ </FieldContent>
93
+ <FieldDescription>
94
+ <div className="flex justify-between text-xs">
95
+ <span>{value.length} characters</span>
96
+ <span>{500 - value.length} remaining</span>
97
+ </div>
98
+ </FieldDescription>
99
+ </Field>
100
+ </FieldGroup>
86
101
  );
87
102
  }
88
103
  ```
@@ -210,7 +210,7 @@ Para múltiples tooltips, usa TooltipProvider:
210
210
  <p>Delete permanently</p>
211
211
  </TooltipContent>
212
212
  </Tooltip>
213
- </div>;
213
+ </div>
214
214
  ```
215
215
 
216
216
  ### Form Help Icons
@@ -224,7 +224,10 @@ import { Input } from "@adamosuiteservices/ui/input";
224
224
  <Label htmlFor="username">Username</Label>
225
225
  <Tooltip>
226
226
  <TooltipTrigger asChild>
227
- <Icon symbol="help" className="cursor-help text-lg text-muted-foreground" />
227
+ <Icon
228
+ symbol="help"
229
+ className="cursor-help text-lg text-muted-foreground"
230
+ />
228
231
  </TooltipTrigger>
229
232
  <TooltipContent>
230
233
  <p>
@@ -18,12 +18,12 @@ import { Typography } from "@adamosuiteservices/ui/typography";
18
18
 
19
19
  ## Props
20
20
 
21
- | Prop | Tipo | Default | Descripción |
22
- | ----------- | ------------------------------------------- | ----------- | --------------------------------------- |
23
- | `variant` | `"lg" \| "md" \| "sm" \| "xs" \| "caption"` | `"sm"` | Tamaño del texto |
21
+ | Prop | Tipo | Default | Descripción |
22
+ | ----------- | ---------------------------------------------------------------------------------------------------------- | ----------- | --------------------------------------- |
23
+ | `variant` | `"lg" \| "md" \| "sm" \| "xs" \| "caption"` | `"sm"` | Tamaño del texto |
24
24
  | `color` | `"default" \| "muted" \| "primary" \| "success" \| "warning" \| "destructive" \| "waiting" \| "secondary"` | `"default"` | Color del texto |
25
- | `asChild` | `boolean` | `false` | Renderiza como child element (usa Slot) |
26
- | `className` | `string` | - | Clases CSS adicionales |
25
+ | `asChild` | `boolean` | `false` | Renderiza como child element (usa Slot) |
26
+ | `className` | `string` | - | Clases CSS adicionales |
27
27
 
28
28
  **Nota**: Acepta todas las props de `<p>` cuando `asChild=false`
29
29
 
@@ -31,26 +31,26 @@ import { Typography } from "@adamosuiteservices/ui/typography";
31
31
 
32
32
  ### Tamaños
33
33
 
34
- | Variante | Font Size | Uso |
35
- | --------- | ------------- | -------------------------- |
36
- | `lg` | `text-lg` | Headings, texto enfatizado |
37
- | `md` | `text-base` | Body text |
34
+ | Variante | Font Size | Uso |
35
+ | --------- | ------------- | -------------------------------- |
36
+ | `lg` | `text-lg` | Headings, texto enfatizado |
37
+ | `md` | `text-base` | Body text |
38
38
  | `sm` | `text-sm` | Secondary text, labels (default) |
39
- | `xs` | `text-xs` | Fine print, detalles |
40
- | `caption` | `text-[11px]` | Captions, metadata |
39
+ | `xs` | `text-xs` | Fine print, detalles |
40
+ | `caption` | `text-[11px]` | Captions, metadata |
41
41
 
42
42
  ### Colores
43
43
 
44
- | Color | Clase CSS | Uso |
45
- | ------------- | ------------------------- | -------------------------------------- |
46
- | `default` | `text-foreground` | Texto principal (default) |
47
- | `muted` | `text-muted-foreground` | Texto secundario |
48
- | `primary` | `text-primary` | Texto con color de marca |
49
- | `success` | `text-success` | Mensajes de éxito, confirmaciones |
50
- | `warning` | `text-warning` | Advertencias, precauciones |
51
- | `destructive` | `text-destructive` | Errores, acciones destructivas |
52
- | `waiting` | `text-waiting` | Estados pendientes, en progreso |
53
- | `secondary` | `text-secondary-foreground` | Texto secundario alternativo |
44
+ | Color | Clase CSS | Uso |
45
+ | ------------- | --------------------------- | --------------------------------- |
46
+ | `default` | `text-foreground` | Texto principal (default) |
47
+ | `muted` | `text-muted-foreground` | Texto secundario |
48
+ | `primary` | `text-primary` | Texto con color de marca |
49
+ | `success` | `text-success` | Mensajes de éxito, confirmaciones |
50
+ | `warning` | `text-warning` | Advertencias, precauciones |
51
+ | `destructive` | `text-destructive` | Errores, acciones destructivas |
52
+ | `waiting` | `text-waiting` | Estados pendientes, en progreso |
53
+ | `secondary` | `text-secondary-foreground` | Texto secundario alternativo |
54
54
 
55
55
  ## Patrones de Uso
56
56
 
@@ -225,45 +225,69 @@ import { Typography } from "@adamosuiteservices/ui/typography";
225
225
  ### Uso de Colores
226
226
 
227
227
  ```tsx
228
- {/* ✅ Correcto - Color default para contenido principal */}
228
+ {
229
+ /* ✅ Correcto - Color default para contenido principal */
230
+ }
229
231
  <Typography variant="md" color="default">
230
232
  This is the main content that users should read.
231
- </Typography>
233
+ </Typography>;
232
234
 
233
- {/* ✅ Correcto - Color muted para información secundaria */}
235
+ {
236
+ /* ✅ Correcto - Color muted para información secundaria */
237
+ }
234
238
  <Typography variant="sm" color="muted">
235
239
  Optional description or helper text.
236
- </Typography>
240
+ </Typography>;
237
241
 
238
- {/* ✅ Correcto - Combinar tamaño y color apropiadamente */}
242
+ {
243
+ /* ✅ Correcto - Combinar tamaño y color apropiadamente */
244
+ }
239
245
  <div>
240
- <Typography variant="lg" color="default">Main Heading</Typography>
241
- <Typography variant="sm" color="muted">Subtitle or description</Typography>
242
- </div>
246
+ <Typography variant="lg" color="default">
247
+ Main Heading
248
+ </Typography>
249
+ <Typography variant="sm" color="muted">
250
+ Subtitle or description
251
+ </Typography>
252
+ </div>;
243
253
 
244
- {/* ⚠️ Evitar - Color muted en contenido principal */}
254
+ {
255
+ /* ⚠️ Evitar - Color muted en contenido principal */
256
+ }
245
257
  <Typography variant="md" color="muted">
246
258
  Important information that should be easily readable
247
- </Typography>
259
+ </Typography>;
248
260
  ```
249
261
 
250
262
  ### Jerarquía Visual
251
263
 
252
264
  ```tsx
253
- {/* ✅ Correcto - Jerarquía clara con tamaño y color */}
265
+ {
266
+ /* ✅ Correcto - Jerarquía clara con tamaño y color */
267
+ }
254
268
  <article>
255
- <Typography variant="lg" color="default">Article Title</Typography>
256
- <Typography variant="sm" color="muted">Published 2 hours ago</Typography>
269
+ <Typography variant="lg" color="default">
270
+ Article Title
271
+ </Typography>
272
+ <Typography variant="sm" color="muted">
273
+ Published 2 hours ago
274
+ </Typography>
257
275
  <Typography variant="md" color="default">
258
276
  Article content goes here with proper emphasis.
259
277
  </Typography>
260
- </article>
278
+ </article>;
261
279
 
262
- {/* ✅ Correcto - Lista con estados */}
280
+ {
281
+ /* ✅ Correcto - Lista con estados */
282
+ }
263
283
  <div>
264
- <Typography variant="md" color="default">Active item</Typography>
265
- <Typography variant="md" color="muted">Inactive item</Typography>
266
- </div>
284
+ <Typography variant="md" color="default">
285
+ Active item
286
+ </Typography>
287
+ <Typography variant="md" color="muted">
288
+ Inactive item
289
+ </Typography>
290
+ </div>;
267
291
  ```
268
292
 
269
293
  ## Estilos Base
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamosuiteservices/ui",
3
- "version": "2.14.1",
3
+ "version": "2.15.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",