@adamosuiteservices/ui 2.9.15 → 2.10.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/accordion-rounded.cjs +12 -17
- package/dist/accordion-rounded.js +37 -46
- package/dist/accordion.cjs +8 -7
- package/dist/accordion.js +19 -17
- package/dist/alert.cjs +7 -3
- package/dist/alert.js +14 -10
- package/dist/avatar.cjs +2 -0
- package/dist/avatar.js +42 -40
- package/dist/badge.cjs +9 -2
- package/dist/badge.js +19 -12
- package/dist/breadcrumb.cjs +7 -3
- package/dist/breadcrumb.js +30 -24
- package/dist/{button-B7ZP4LZN.js → button-CUNnLccZ.js} +11 -6
- package/dist/{button-D-qFRXiM.cjs → button-CxGyLoeN.cjs} +7 -2
- package/dist/button-group.cjs +2 -0
- package/dist/button-group.js +15 -13
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar.cjs +8 -6
- package/dist/calendar.js +507 -492
- package/dist/card.cjs +9 -4
- package/dist/card.js +8 -3
- package/dist/checkbox-CFGlO5wt.cjs +22 -0
- package/dist/{checkbox-DhBcmKze.js → checkbox-DsN1IQGA.js} +70 -68
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/combobox.cjs +10 -13
- package/dist/combobox.js +90 -99
- package/dist/components/ui/icon/icon.d.ts +1 -3
- package/dist/components/ui/icon/icon.stories.d.ts +0 -5
- package/dist/components/ui/spinner/spinner.d.ts +1 -1
- package/dist/components/ui/tooltip/tooltip.stories.d.ts +0 -1
- package/dist/context-menu.cjs +10 -8
- package/dist/context-menu.js +126 -120
- package/dist/custom-layered-styles.css +1 -1
- package/dist/dialog.cjs +10 -7
- package/dist/dialog.js +43 -40
- package/dist/dropdown-menu.cjs +25 -10
- package/dist/dropdown-menu.js +179 -166
- package/dist/icon-D0vVkV-A.js +35 -0
- package/dist/icon-SWksUOv5.cjs +6 -0
- package/dist/icon.cjs +1 -1
- package/dist/icon.js +1 -1
- package/dist/icons.css +1 -1
- package/dist/input-group.cjs +14 -6
- package/dist/input-group.js +25 -17
- package/dist/kbd.cjs +3 -3
- package/dist/kbd.js +1 -0
- package/dist/pagination.cjs +4 -4
- package/dist/pagination.js +41 -43
- package/dist/radio-group.cjs +5 -5
- package/dist/radio-group.js +44 -42
- package/dist/radius.css +1 -1
- package/dist/select.cjs +12 -13
- package/dist/select.js +182 -187
- package/dist/{sheet-Q3dBOQG-.js → sheet-DM7b3ckK.js} +18 -18
- package/dist/{sheet-CGahUP7F.cjs → sheet-DfRu4ByS.cjs} +4 -4
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/sidebar.cjs +6 -11
- package/dist/sidebar.js +38 -49
- package/dist/spinner.cjs +1 -6
- package/dist/spinner.js +10 -16
- package/dist/styles.css +1 -1
- package/dist/tabs-underline.cjs +6 -3
- package/dist/tabs-underline.js +8 -5
- package/dist/tabs.cjs +6 -3
- package/dist/tabs.js +8 -5
- package/dist/toggle.cjs +5 -2
- package/dist/toggle.js +14 -11
- package/docs/components/layout/sidebar.md +18 -23
- package/docs/components/ui/accordion-rounded.md +584 -583
- package/docs/components/ui/accordion.md +3 -1
- package/docs/components/ui/alert.md +650 -671
- package/docs/components/ui/avatar.md +587 -588
- package/docs/components/ui/badge.md +1019 -1024
- package/docs/components/ui/breadcrumb.md +14 -14
- package/docs/components/ui/button-group.md +69 -87
- package/docs/components/ui/button.md +17 -17
- package/docs/components/ui/calendar.md +6 -6
- package/docs/components/ui/card.md +21 -27
- package/docs/components/ui/collapsible.md +16 -13
- package/docs/components/ui/combobox.md +14 -14
- package/docs/components/ui/command.md +6 -6
- package/docs/components/ui/context-menu.md +23 -23
- package/docs/components/ui/dialog.md +16 -16
- package/docs/components/ui/dropdown-menu.md +44 -66
- package/docs/components/ui/hover-card.md +5 -5
- package/docs/components/ui/icon.md +87 -88
- package/docs/components/ui/input-group.md +523 -509
- package/docs/components/ui/kbd.md +8 -8
- package/docs/components/ui/label.md +5 -5
- package/docs/components/ui/pagination.md +5 -5
- package/docs/components/ui/popover.md +14 -14
- package/docs/components/ui/progress.md +2 -2
- package/docs/components/ui/radio-group.md +2 -2
- package/docs/components/ui/select.md +6 -6
- package/docs/components/ui/spinner.md +15 -15
- package/docs/components/ui/switch.md +15 -9
- package/docs/components/ui/tabs-underline.md +4 -4
- package/docs/components/ui/tabs.md +5 -5
- package/docs/components/ui/toggle.md +17 -23
- package/docs/components/ui/tooltip.md +7 -10
- package/package.json +1 -1
- package/dist/check-CLxNVljQ.cjs +0 -6
- package/dist/check-Ci0GjV-B.js +0 -11
- package/dist/checkbox-CdnZ8VFJ.cjs +0 -21
- package/dist/chevron-down-BqEHzml5.cjs +0 -6
- package/dist/chevron-down-CpVS2Z7w.js +0 -11
- package/dist/chevron-left-B8QsBNvc.cjs +0 -6
- package/dist/chevron-left-Eal-WYLp.js +0 -11
- package/dist/chevron-right-BpzggHsr.cjs +0 -6
- package/dist/chevron-right-Cnc2tB4-.js +0 -11
- package/dist/circle-CX7JIirj.cjs +0 -6
- package/dist/circle-DYv-7Qb9.js +0 -11
- package/dist/createLucideIcon-B_8CJpcQ.js +0 -94
- package/dist/createLucideIcon-CAtnV-yz.cjs +0 -21
- package/dist/ellipsis-CryjZKZn.js +0 -15
- package/dist/ellipsis-Ct9VTDOG.cjs +0 -6
- package/dist/icon-DTx6Y_mx.cjs +0 -6
- package/dist/icon-DmU_SEHC.js +0 -36
- package/dist/minus-C0pHPx21.cjs +0 -6
- package/dist/minus-DE-onYs2.js +0 -11
- package/dist/x-CBKgg4YL.cjs +0 -6
- package/dist/x-Dl66o_vF.js +0 -14
|
@@ -33,10 +33,10 @@ import { Button } from "@adamosuiteservices/ui/button";
|
|
|
33
33
|
### Con Icono
|
|
34
34
|
|
|
35
35
|
```tsx
|
|
36
|
-
import {
|
|
36
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
37
37
|
|
|
38
38
|
<Button>
|
|
39
|
-
<
|
|
39
|
+
<Icon symbol="add" />
|
|
40
40
|
Add Item
|
|
41
41
|
</Button>;
|
|
42
42
|
```
|
|
@@ -349,10 +349,10 @@ Desactiva el botón y reduce opacidad.
|
|
|
349
349
|
Muestra spinner y desactiva interacciones.
|
|
350
350
|
|
|
351
351
|
```tsx
|
|
352
|
-
import {
|
|
352
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
353
353
|
|
|
354
354
|
<Button disabled>
|
|
355
|
-
<
|
|
355
|
+
<Icon symbol="progress_activity" className="animate-spin" />
|
|
356
356
|
Loading...
|
|
357
357
|
</Button>;
|
|
358
358
|
```
|
|
@@ -363,7 +363,7 @@ import { Loader2Icon } from "lucide-react";
|
|
|
363
363
|
const [isLoading, setIsLoading] = useState(false);
|
|
364
364
|
|
|
365
365
|
<Button disabled={isLoading} onClick={handleSubmit}>
|
|
366
|
-
{isLoading && <
|
|
366
|
+
{isLoading && <Icon symbol="progress_activity" className="animate-spin" />}
|
|
367
367
|
{isLoading ? "Saving..." : "Save Changes"}
|
|
368
368
|
</Button>;
|
|
369
369
|
```
|
|
@@ -410,13 +410,13 @@ Para formularios con validación.
|
|
|
410
410
|
### Botón con Icono (Text + Icon)
|
|
411
411
|
|
|
412
412
|
```tsx
|
|
413
|
-
import {
|
|
413
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
414
414
|
|
|
415
415
|
{
|
|
416
416
|
/* Icono a la izquierda */
|
|
417
417
|
}
|
|
418
418
|
<Button>
|
|
419
|
-
<
|
|
419
|
+
<Icon symbol="save" />
|
|
420
420
|
Save Changes
|
|
421
421
|
</Button>;
|
|
422
422
|
|
|
@@ -425,14 +425,14 @@ import { SaveIcon, DownloadIcon, TrashIcon } from "lucide-react";
|
|
|
425
425
|
}
|
|
426
426
|
<Button>
|
|
427
427
|
Download
|
|
428
|
-
<
|
|
428
|
+
<Icon symbol="download" />
|
|
429
429
|
</Button>;
|
|
430
430
|
|
|
431
431
|
{
|
|
432
432
|
/* Múltiples iconos */
|
|
433
433
|
}
|
|
434
434
|
<Button variant="destructive">
|
|
435
|
-
<
|
|
435
|
+
<Icon symbol="delete" />
|
|
436
436
|
Delete All
|
|
437
437
|
<span className="ml-auto text-xs">(5)</span>
|
|
438
438
|
</Button>;
|
|
@@ -468,7 +468,7 @@ import { SaveIcon, DownloadIcon, TrashIcon } from "lucide-react";
|
|
|
468
468
|
|
|
469
469
|
```tsx
|
|
470
470
|
import { useState } from "react";
|
|
471
|
-
import {
|
|
471
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
472
472
|
|
|
473
473
|
function LikeButton() {
|
|
474
474
|
const [liked, setLiked] = useState(false);
|
|
@@ -478,7 +478,7 @@ function LikeButton() {
|
|
|
478
478
|
variant={liked ? "default" : "outline"}
|
|
479
479
|
onClick={() => setLiked(!liked)}
|
|
480
480
|
>
|
|
481
|
-
<
|
|
481
|
+
<Icon symbol="favorite" className={liked ? "fill-current" : ""} />
|
|
482
482
|
{liked ? "Liked" : "Like"}
|
|
483
483
|
</Button>
|
|
484
484
|
);
|
|
@@ -492,7 +492,7 @@ function SaveButton() {
|
|
|
492
492
|
variant={saved ? "secondary" : "outline"}
|
|
493
493
|
onClick={() => setSaved(!saved)}
|
|
494
494
|
>
|
|
495
|
-
<
|
|
495
|
+
<Icon symbol="star" className={saved ? "fill-current" : ""} />
|
|
496
496
|
{saved ? "Saved" : "Save"}
|
|
497
497
|
</Button>
|
|
498
498
|
);
|
|
@@ -503,7 +503,7 @@ function PlayButton() {
|
|
|
503
503
|
|
|
504
504
|
return (
|
|
505
505
|
<Button variant="outline" onClick={() => setPlaying(!playing)}>
|
|
506
|
-
{playing ? <
|
|
506
|
+
{playing ? <Icon symbol="pause" /> : <Icon symbol="play_arrow" />}
|
|
507
507
|
{playing ? "Pause" : "Play"}
|
|
508
508
|
</Button>
|
|
509
509
|
);
|
|
@@ -514,7 +514,7 @@ function PlayButton() {
|
|
|
514
514
|
|
|
515
515
|
```tsx
|
|
516
516
|
import Link from "next/link";
|
|
517
|
-
import {
|
|
517
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
518
518
|
|
|
519
519
|
<Button asChild>
|
|
520
520
|
<Link href="/dashboard">
|
|
@@ -524,7 +524,7 @@ import { ExternalLinkIcon } from "lucide-react";
|
|
|
524
524
|
|
|
525
525
|
<Button asChild variant="outline">
|
|
526
526
|
<a href="https://example.com" target="_blank" rel="noopener noreferrer">
|
|
527
|
-
<
|
|
527
|
+
<Icon symbol="open_in_new" />
|
|
528
528
|
External Link
|
|
529
529
|
</a>
|
|
530
530
|
</Button>
|
|
@@ -559,11 +559,11 @@ import { Badge } from "@adamosuiteservices/ui/badge";
|
|
|
559
559
|
### Botón Dropdown Trigger
|
|
560
560
|
|
|
561
561
|
```tsx
|
|
562
|
-
import {
|
|
562
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
563
563
|
|
|
564
564
|
<Button>
|
|
565
565
|
Options
|
|
566
|
-
<
|
|
566
|
+
<Icon symbol="keyboard_arrow_down" className="ml-auto -mr-1" />
|
|
567
567
|
</Button>;
|
|
568
568
|
```
|
|
569
569
|
|
|
@@ -408,7 +408,7 @@ import {
|
|
|
408
408
|
PopoverTrigger,
|
|
409
409
|
} from "@adamosuiteservices/ui/popover";
|
|
410
410
|
import { Button } from "@adamosuiteservices/ui/button";
|
|
411
|
-
import {
|
|
411
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
412
412
|
import { format } from "date-fns";
|
|
413
413
|
|
|
414
414
|
function DatePickerPopover() {
|
|
@@ -418,7 +418,7 @@ function DatePickerPopover() {
|
|
|
418
418
|
<Popover>
|
|
419
419
|
<PopoverTrigger asChild>
|
|
420
420
|
<Button variant="outline">
|
|
421
|
-
<
|
|
421
|
+
<Icon symbol="calendar_today" />
|
|
422
422
|
{date ? format(date, "PPP") : "Pick a date"}
|
|
423
423
|
</Button>
|
|
424
424
|
</PopoverTrigger>
|
|
@@ -690,13 +690,13 @@ import {
|
|
|
690
690
|
PopoverTrigger,
|
|
691
691
|
} from "@adamosuiteservices/ui/popover";
|
|
692
692
|
import { Button } from "@adamosuiteservices/ui/button";
|
|
693
|
-
import {
|
|
693
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
694
694
|
import { format } from "date-fns";
|
|
695
695
|
|
|
696
696
|
<Popover>
|
|
697
697
|
<PopoverTrigger asChild>
|
|
698
698
|
<Button variant="outline">
|
|
699
|
-
<
|
|
699
|
+
<Icon symbol="calendar_today" />
|
|
700
700
|
{date ? format(date, "PPP") : "Pick a date"}
|
|
701
701
|
</Button>
|
|
702
702
|
</PopoverTrigger>
|
|
@@ -712,7 +712,7 @@ import { format } from "date-fns";
|
|
|
712
712
|
<Popover>
|
|
713
713
|
<PopoverTrigger asChild>
|
|
714
714
|
<Button variant="outline">
|
|
715
|
-
<
|
|
715
|
+
<Icon symbol="calendar_today" />
|
|
716
716
|
{range?.from
|
|
717
717
|
? range.to
|
|
718
718
|
? `${format(range.from, "LLL dd")} - ${format(range.to, "LLL dd, y")}`
|
|
@@ -1130,7 +1130,7 @@ function DatePickerWithControl() {
|
|
|
1130
1130
|
<Popover open={open} onOpenChange={setOpen}>
|
|
1131
1131
|
<PopoverTrigger asChild>
|
|
1132
1132
|
<Button variant="outline">
|
|
1133
|
-
<
|
|
1133
|
+
<Icon symbol="calendar_today" />
|
|
1134
1134
|
{date ? format(date, "PPP") : "Pick a date"}
|
|
1135
1135
|
</Button>
|
|
1136
1136
|
</PopoverTrigger>
|
|
@@ -78,7 +78,7 @@ Para contenedores minimalistas sin header/footer.
|
|
|
78
78
|
Botón de acción que se alinea automáticamente a la derecha.
|
|
79
79
|
|
|
80
80
|
```tsx
|
|
81
|
-
import {
|
|
81
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
82
82
|
|
|
83
83
|
<Card className="w-[400px]">
|
|
84
84
|
<CardHeader>
|
|
@@ -86,7 +86,7 @@ import { MoreHorizontalIcon } from "lucide-react";
|
|
|
86
86
|
<CardDescription>You have 3 unread messages.</CardDescription>
|
|
87
87
|
<CardAction>
|
|
88
88
|
<Button variant="outline" size="sm">
|
|
89
|
-
<
|
|
89
|
+
<Icon symbol="more_horiz" />
|
|
90
90
|
</Button>
|
|
91
91
|
</CardAction>
|
|
92
92
|
</CardHeader>
|
|
@@ -394,19 +394,13 @@ Card con avatar, stats y acciones múltiples.
|
|
|
394
394
|
|
|
395
395
|
```tsx
|
|
396
396
|
import { Avatar } from "@adamosuiteservices/ui/avatar";
|
|
397
|
-
import {
|
|
398
|
-
HeartIcon,
|
|
399
|
-
StarIcon,
|
|
400
|
-
ShareIcon,
|
|
401
|
-
ExternalLinkIcon,
|
|
402
|
-
UserIcon,
|
|
403
|
-
} from "lucide-react";
|
|
397
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
404
398
|
|
|
405
399
|
<Card className="w-[380px]">
|
|
406
400
|
<CardHeader>
|
|
407
401
|
<div className="flex items-center space-x-4">
|
|
408
402
|
<Avatar className="h-12 w-12">
|
|
409
|
-
<
|
|
403
|
+
<Icon symbol="person" />
|
|
410
404
|
</Avatar>
|
|
411
405
|
<div>
|
|
412
406
|
<CardTitle>Sofia Davis</CardTitle>
|
|
@@ -427,20 +421,20 @@ import {
|
|
|
427
421
|
<CardFooter className="flex justify-between">
|
|
428
422
|
<div className="flex space-x-4 text-sm text-muted-foreground">
|
|
429
423
|
<div className="flex items-center">
|
|
430
|
-
<
|
|
424
|
+
<Icon symbol="favorite" className="mr-1 text-sm" />
|
|
431
425
|
256
|
|
432
426
|
</div>
|
|
433
427
|
<div className="flex items-center">
|
|
434
|
-
<
|
|
428
|
+
<Icon symbol="star" className="mr-1 text-sm" />
|
|
435
429
|
98
|
|
436
430
|
</div>
|
|
437
431
|
</div>
|
|
438
432
|
<div className="flex space-x-1">
|
|
439
433
|
<Button variant="ghost" size="sm">
|
|
440
|
-
<
|
|
434
|
+
<Icon symbol="share" />
|
|
441
435
|
</Button>
|
|
442
436
|
<Button variant="ghost" size="sm">
|
|
443
|
-
<
|
|
437
|
+
<Icon symbol="open_in_new" />
|
|
444
438
|
</Button>
|
|
445
439
|
</div>
|
|
446
440
|
</CardFooter>
|
|
@@ -453,7 +447,7 @@ E-commerce card con imagen, badge, precio y acciones.
|
|
|
453
447
|
|
|
454
448
|
```tsx
|
|
455
449
|
import { Badge } from "@adamosuiteservices/ui/badge";
|
|
456
|
-
import {
|
|
450
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
457
451
|
|
|
458
452
|
<Card className="w-[350px]">
|
|
459
453
|
<CardHeader>
|
|
@@ -469,7 +463,7 @@ import { StarIcon, CreditCardIcon, HeartIcon } from "lucide-react";
|
|
|
469
463
|
<div className="flex items-center justify-between">
|
|
470
464
|
<div className="text-2xl font-bold">$299.99</div>
|
|
471
465
|
<div className="flex items-center text-sm text-muted-foreground">
|
|
472
|
-
<
|
|
466
|
+
<Icon symbol="star" className="mr-1 text-lg fill-current" />
|
|
473
467
|
4.5 (128)
|
|
474
468
|
</div>
|
|
475
469
|
</div>
|
|
@@ -477,11 +471,11 @@ import { StarIcon, CreditCardIcon, HeartIcon } from "lucide-react";
|
|
|
477
471
|
</CardContent>
|
|
478
472
|
<CardFooter className="flex gap-2">
|
|
479
473
|
<Button className="flex-1">
|
|
480
|
-
<
|
|
474
|
+
<Icon symbol="credit_card" />
|
|
481
475
|
Add to Cart
|
|
482
476
|
</Button>
|
|
483
477
|
<Button variant="outline" size="sm">
|
|
484
|
-
<
|
|
478
|
+
<Icon symbol="favorite" />
|
|
485
479
|
</Button>
|
|
486
480
|
</CardFooter>
|
|
487
481
|
</Card>;
|
|
@@ -492,13 +486,13 @@ import { StarIcon, CreditCardIcon, HeartIcon } from "lucide-react";
|
|
|
492
486
|
Grid de cards para métricas con iconos y tendencias.
|
|
493
487
|
|
|
494
488
|
```tsx
|
|
495
|
-
import {
|
|
489
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
496
490
|
|
|
497
491
|
<div className="grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-4">
|
|
498
492
|
<Card>
|
|
499
493
|
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
500
494
|
<CardTitle className="text-sm font-medium">Total Revenue</CardTitle>
|
|
501
|
-
<
|
|
495
|
+
<Icon symbol="payments" className="text-lg text-muted-foreground" />
|
|
502
496
|
</CardHeader>
|
|
503
497
|
<CardContent>
|
|
504
498
|
<div className="text-2xl font-bold">$45,231.89</div>
|
|
@@ -509,7 +503,7 @@ import { DollarSignIcon, UserIcon, CreditCardIcon } from "lucide-react";
|
|
|
509
503
|
<Card>
|
|
510
504
|
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
511
505
|
<CardTitle className="text-sm font-medium">Subscriptions</CardTitle>
|
|
512
|
-
<
|
|
506
|
+
<Icon symbol="person" className="text-lg text-muted-foreground" />
|
|
513
507
|
</CardHeader>
|
|
514
508
|
<CardContent>
|
|
515
509
|
<div className="text-2xl font-bold">+2350</div>
|
|
@@ -520,7 +514,7 @@ import { DollarSignIcon, UserIcon, CreditCardIcon } from "lucide-react";
|
|
|
520
514
|
<Card>
|
|
521
515
|
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
522
516
|
<CardTitle className="text-sm font-medium">Sales</CardTitle>
|
|
523
|
-
<
|
|
517
|
+
<Icon symbol="credit_card" className="text-lg text-muted-foreground" />
|
|
524
518
|
</CardHeader>
|
|
525
519
|
<CardContent>
|
|
526
520
|
<div className="text-2xl font-bold">+12,234</div>
|
|
@@ -531,7 +525,7 @@ import { DollarSignIcon, UserIcon, CreditCardIcon } from "lucide-react";
|
|
|
531
525
|
<Card>
|
|
532
526
|
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
533
527
|
<CardTitle className="text-sm font-medium">Active Now</CardTitle>
|
|
534
|
-
<
|
|
528
|
+
<Icon symbol="person" className="text-lg text-muted-foreground" />
|
|
535
529
|
</CardHeader>
|
|
536
530
|
<CardContent>
|
|
537
531
|
<div className="text-2xl font-bold">+573</div>
|
|
@@ -546,7 +540,7 @@ import { DollarSignIcon, UserIcon, CreditCardIcon } from "lucide-react";
|
|
|
546
540
|
Lista de notificaciones con items y acción de marcar leído.
|
|
547
541
|
|
|
548
542
|
```tsx
|
|
549
|
-
import {
|
|
543
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
550
544
|
|
|
551
545
|
<Card className="w-[380px]">
|
|
552
546
|
<CardHeader>
|
|
@@ -555,7 +549,7 @@ import { BellIcon, MailIcon, CheckIcon } from "lucide-react";
|
|
|
555
549
|
</CardHeader>
|
|
556
550
|
<CardContent className="grid gap-4">
|
|
557
551
|
<div className="flex items-center space-x-4 rounded-md border p-4">
|
|
558
|
-
<
|
|
552
|
+
<Icon symbol="notifications" className="text-lg" />
|
|
559
553
|
<div className="flex-1 space-y-1">
|
|
560
554
|
<p className="text-sm font-medium leading-none">Push Notifications</p>
|
|
561
555
|
<p className="text-sm text-muted-foreground">
|
|
@@ -564,7 +558,7 @@ import { BellIcon, MailIcon, CheckIcon } from "lucide-react";
|
|
|
564
558
|
</div>
|
|
565
559
|
</div>
|
|
566
560
|
<div className="flex items-center space-x-4 rounded-md border p-4">
|
|
567
|
-
<
|
|
561
|
+
<Icon symbol="mail" className="text-lg" />
|
|
568
562
|
<div className="flex-1 space-y-1">
|
|
569
563
|
<p className="text-sm font-medium leading-none">Email Notifications</p>
|
|
570
564
|
<p className="text-sm text-muted-foreground">
|
|
@@ -575,7 +569,7 @@ import { BellIcon, MailIcon, CheckIcon } from "lucide-react";
|
|
|
575
569
|
</CardContent>
|
|
576
570
|
<CardFooter>
|
|
577
571
|
<Button className="w-full">
|
|
578
|
-
<
|
|
572
|
+
<Icon symbol="check" />
|
|
579
573
|
Mark all as read
|
|
580
574
|
</Button>
|
|
581
575
|
</CardFooter>
|
|
@@ -79,12 +79,12 @@ const [isOpen, setIsOpen] = useState(false);
|
|
|
79
79
|
|
|
80
80
|
```tsx
|
|
81
81
|
import { Button } from "@adamosuiteservices/ui/button";
|
|
82
|
-
import {
|
|
82
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
83
83
|
|
|
84
84
|
<Collapsible>
|
|
85
85
|
<CollapsibleTrigger asChild>
|
|
86
86
|
<Button variant="outline" size="sm">
|
|
87
|
-
<
|
|
87
|
+
<Icon symbol="unfold_more" className="text-base" />
|
|
88
88
|
Toggle
|
|
89
89
|
</Button>
|
|
90
90
|
</CollapsibleTrigger>
|
|
@@ -102,8 +102,9 @@ const [isOpen, setIsOpen] = useState(false);
|
|
|
102
102
|
<Collapsible open={isOpen} onOpenChange={setIsOpen}>
|
|
103
103
|
<CollapsibleTrigger className="flex w-full items-center justify-between p-4 border rounded-lg hover:bg-muted">
|
|
104
104
|
<span>Section Title</span>
|
|
105
|
-
<
|
|
106
|
-
|
|
105
|
+
<Icon
|
|
106
|
+
symbol="expand_more"
|
|
107
|
+
className={`text-lg transition-transform ${isOpen ? "rotate-180" : ""}`}
|
|
107
108
|
/>
|
|
108
109
|
</CollapsibleTrigger>
|
|
109
110
|
<CollapsibleContent className="p-4">
|
|
@@ -119,7 +120,7 @@ const [isOpen, setIsOpen] = useState(false);
|
|
|
119
120
|
<Collapsible>
|
|
120
121
|
<CollapsibleTrigger className="flex w-full items-center justify-between border p-4 rounded-lg hover:bg-muted">
|
|
121
122
|
<span className="font-medium">What is this?</span>
|
|
122
|
-
<
|
|
123
|
+
<Icon symbol="chevron_right" className="text-lg" />
|
|
123
124
|
</CollapsibleTrigger>
|
|
124
125
|
<CollapsibleContent className="px-4 pb-4">
|
|
125
126
|
<p className="text-sm text-muted-foreground">
|
|
@@ -131,7 +132,7 @@ const [isOpen, setIsOpen] = useState(false);
|
|
|
131
132
|
<Collapsible>
|
|
132
133
|
<CollapsibleTrigger className="flex w-full items-center justify-between border p-4 rounded-lg hover:bg-muted">
|
|
133
134
|
<span className="font-medium">How to install?</span>
|
|
134
|
-
<
|
|
135
|
+
<Icon symbol="chevron_right" className="text-lg" />
|
|
135
136
|
</CollapsibleTrigger>
|
|
136
137
|
<CollapsibleContent className="px-4 pb-4">
|
|
137
138
|
<p className="text-sm text-muted-foreground">
|
|
@@ -159,10 +160,11 @@ const toggleSection = (id: string) => {
|
|
|
159
160
|
onOpenChange={() => toggleSection("settings")}
|
|
160
161
|
>
|
|
161
162
|
<CollapsibleTrigger className="flex w-full items-center gap-2 p-3 rounded-lg hover:bg-muted">
|
|
162
|
-
<
|
|
163
|
+
<Icon symbol="settings" className="text-lg" />
|
|
163
164
|
<span className="flex-1 font-medium">Settings</span>
|
|
164
|
-
<
|
|
165
|
-
|
|
165
|
+
<Icon
|
|
166
|
+
symbol="expand_more"
|
|
167
|
+
className={`text-lg transition-transform ${
|
|
166
168
|
openSections.includes("settings") ? "rotate-180" : ""
|
|
167
169
|
}`}
|
|
168
170
|
/>
|
|
@@ -182,10 +184,11 @@ const toggleSection = (id: string) => {
|
|
|
182
184
|
onOpenChange={() => toggleSection("account")}
|
|
183
185
|
>
|
|
184
186
|
<CollapsibleTrigger className="flex w-full items-center gap-2 p-3 rounded-lg hover:bg-muted">
|
|
185
|
-
<
|
|
187
|
+
<Icon symbol="person" className="text-lg" />
|
|
186
188
|
<span className="flex-1 font-medium">Account</span>
|
|
187
|
-
<
|
|
188
|
-
|
|
189
|
+
<Icon
|
|
190
|
+
symbol="expand_more"
|
|
191
|
+
className={`text-lg transition-transform ${
|
|
189
192
|
openSections.includes("account") ? "rotate-180" : ""
|
|
190
193
|
}`}
|
|
191
194
|
/>
|
|
@@ -238,7 +241,7 @@ const toggleSection = (id: string) => {
|
|
|
238
241
|
<h4 className="font-semibold">@user starred 3 repos</h4>
|
|
239
242
|
<CollapsibleTrigger asChild>
|
|
240
243
|
<Button variant="outline" size="sm">
|
|
241
|
-
<
|
|
244
|
+
<Icon symbol="unfold_more" className="text-base" />
|
|
242
245
|
</Button>
|
|
243
246
|
</CollapsibleTrigger>
|
|
244
247
|
</div>
|
|
@@ -25,20 +25,20 @@ import { Combobox } from "@adamosuiteservices/ui/combobox";
|
|
|
25
25
|
|
|
26
26
|
## Props Principales
|
|
27
27
|
|
|
28
|
-
| Prop | Tipo
|
|
29
|
-
| ----------------------- |
|
|
30
|
-
| `options` | `ComboboxOption[]`
|
|
31
|
-
| `value` | `string \| string[]`
|
|
32
|
-
| `onValueChange` | `(value: string \| string[]) => void`
|
|
33
|
-
| `searchable` | `boolean`
|
|
34
|
-
| `multiple` | `boolean`
|
|
35
|
-
| `selectedFeedback` | `"checkbox" \| "check"`
|
|
36
|
-
| `icon` | `string`
|
|
37
|
-
| `alwaysShowPlaceholder` | `boolean`
|
|
38
|
-
| `valuePosition` | `"left" \| "right"`
|
|
39
|
-
| `labels` | `ComboboxLabels`
|
|
40
|
-
| `classNames` | `ComboboxClassNames`
|
|
41
|
-
| `renders` | `ComboboxRenderProps`
|
|
28
|
+
| Prop | Tipo | Default | Descripción |
|
|
29
|
+
| ----------------------- | ------------------------------------- | ------------ | ----------------------------------------------------------- |
|
|
30
|
+
| `options` | `ComboboxOption[]` | **required** | Array de opciones `{ value, label, disabled? }` |
|
|
31
|
+
| `value` | `string \| string[]` | - | Valor controlado (string para single, array para multiple) |
|
|
32
|
+
| `onValueChange` | `(value: string \| string[]) => void` | - | Callback al cambiar selección |
|
|
33
|
+
| `searchable` | `boolean` | `false` | Habilita input de búsqueda |
|
|
34
|
+
| `multiple` | `boolean` | `false` | Permite selección múltiple |
|
|
35
|
+
| `selectedFeedback` | `"checkbox" \| "check"` | `"checkbox"` | Tipo de indicador visual |
|
|
36
|
+
| `icon` | `string` | - | Icono Material Symbol opcional para mostrar en el trigger |
|
|
37
|
+
| `alwaysShowPlaceholder` | `boolean` | `false` | Mantiene el placeholder visible junto al valor seleccionado |
|
|
38
|
+
| `valuePosition` | `"left" \| "right"` | `"right"` | Posición del valor cuando alwaysShowPlaceholder es true |
|
|
39
|
+
| `labels` | `ComboboxLabels` | - | Textos personalizables (ver tabla abajo) |
|
|
40
|
+
| `classNames` | `ComboboxClassNames` | - | Clases CSS por sección (ver tabla abajo) |
|
|
41
|
+
| `renders` | `ComboboxRenderProps` | - | Funciones de renderizado personalizadas (ver tabla abajo) |
|
|
42
42
|
|
|
43
43
|
### ComboboxLabels
|
|
44
44
|
|
|
@@ -156,22 +156,22 @@ function CommandMenu() {
|
|
|
156
156
|
### Con Iconos
|
|
157
157
|
|
|
158
158
|
```tsx
|
|
159
|
-
import {
|
|
159
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
160
160
|
|
|
161
161
|
<Command>
|
|
162
162
|
<CommandInput placeholder="Search..." />
|
|
163
163
|
<CommandList>
|
|
164
164
|
<CommandGroup heading="Suggestions">
|
|
165
165
|
<CommandItem>
|
|
166
|
-
<
|
|
166
|
+
<Icon symbol="calendar_month" />
|
|
167
167
|
Calendar
|
|
168
168
|
</CommandItem>
|
|
169
169
|
<CommandItem>
|
|
170
|
-
<
|
|
170
|
+
<Icon symbol="sentiment_satisfied" />
|
|
171
171
|
Search Emoji
|
|
172
172
|
</CommandItem>
|
|
173
173
|
<CommandItem>
|
|
174
|
-
<
|
|
174
|
+
<Icon symbol="rocket_launch" />
|
|
175
175
|
Launch
|
|
176
176
|
</CommandItem>
|
|
177
177
|
</CommandGroup>
|
|
@@ -421,10 +421,10 @@ function CustomFilter() {
|
|
|
421
421
|
- **Basado en cmdk**: Librería `cmdk` de Paco Coursey
|
|
422
422
|
- **Fuzzy search**: Búsqueda difusa por defecto (typo-tolerant)
|
|
423
423
|
- **Performance**: Virtualización automática con muchos items
|
|
424
|
-
- **
|
|
424
|
+
- **Search icon**: Incluido automáticamente en CommandInput (Material Symbol "search")
|
|
425
425
|
- **CommandDialog**: Wrapper de Command + Dialog con estilos predefinidos
|
|
426
426
|
- **Data slots**: Cada componente tiene `data-slot` para CSS targeting
|
|
427
|
-
- **
|
|
427
|
+
- **Icon sizing**: Material Symbol icons automáticamente `text-lg` (18px) con shrink-0 y opacity-50
|
|
428
428
|
- **CommandShortcut**: Elemento visual para shortcuts (no ejecuta código)
|
|
429
429
|
- **Max height**: CommandList tiene `max-h-[300px]` default
|
|
430
430
|
- **Scroll behavior**: `scroll-py-1` para padding al scrollear
|