@inspirare/design-system 0.0.23 → 0.0.25
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/README.md +82 -61
- package/dist/book-logo-filled.svg +55 -0
- package/dist/components/ui/accessibility-improvements.js +26 -23
- package/dist/components/ui/accordion.js +34 -24
- package/dist/components/ui/alert-dialog.js +91 -57
- package/dist/components/ui/alert.js +38 -26
- package/dist/components/ui/aspect-ratio.js +11 -3
- package/dist/components/ui/avatar.js +30 -8
- package/dist/components/ui/badge.js +20 -14
- package/dist/components/ui/breadcrumb.js +69 -56
- package/dist/components/ui/button-group.js +17 -13
- package/dist/components/ui/button.js +19 -15
- package/dist/components/ui/calendar.js +63 -59
- package/dist/components/ui/card.js +11 -9
- package/dist/components/ui/carousel.js +70 -75
- package/dist/components/ui/chart.js +75 -72
- package/dist/components/ui/checkbox.js +4 -5
- package/dist/components/ui/collapsible.js +12 -14
- package/dist/components/ui/color-picker.js +60 -80
- package/dist/components/ui/combobox.js +153 -33
- package/dist/components/ui/command.js +50 -48
- package/dist/components/ui/context-menu.js +129 -68
- package/dist/components/ui/dialog.js +65 -60
- package/dist/components/ui/drawer.js +81 -40
- package/dist/components/ui/dropdown-menu.js +100 -87
- package/dist/components/ui/empty.js +7 -6
- package/dist/components/ui/field.js +44 -47
- package/dist/components/ui/form.js +22 -23
- package/dist/components/ui/hover-card.js +14 -11
- package/dist/components/ui/input-group.js +16 -13
- package/dist/components/ui/input-otp.js +37 -32
- package/dist/components/ui/input.js +9 -7
- package/dist/components/ui/item.js +42 -36
- package/dist/components/ui/kbd.js +2 -1
- package/dist/components/ui/label.js +6 -7
- package/dist/components/ui/menubar.js +124 -93
- package/dist/components/ui/navigation-menu.js +79 -54
- package/dist/components/ui/pagination.js +78 -58
- package/dist/components/ui/popover.js +35 -16
- package/dist/components/ui/progress.js +37 -13
- package/dist/components/ui/radio-group.js +14 -14
- package/dist/components/ui/resizable.js +24 -15
- package/dist/components/ui/scroll-area.js +29 -11
- package/dist/components/ui/select.js +116 -56
- package/dist/components/ui/separator.js +5 -7
- package/dist/components/ui/sheet.js +47 -42
- package/dist/components/ui/sidebar.js +279 -248
- package/dist/components/ui/skeleton.js +4 -40
- package/dist/components/ui/slider.js +27 -29
- package/dist/components/ui/sonner.js +27 -10
- package/dist/components/ui/spinner.js +2 -0
- package/dist/components/ui/switch.js +3 -4
- package/dist/components/ui/table.js +6 -6
- package/dist/components/ui/tabs.js +45 -22
- package/dist/components/ui/textarea.js +3 -2
- package/dist/components/ui/theme-toggle.js +38 -41
- package/dist/components/ui/toggle-group.js +30 -21
- package/dist/components/ui/toggle.js +8 -9
- package/dist/components/ui/tooltip.js +28 -23
- package/dist/index.css +1 -1
- package/dist/index.d.ts +446 -468
- package/dist/index.js +58 -58
- package/package.json +38 -37
- package/src/App.tsx +28 -34
- package/src/components/branding/assets/book-logo-filled.svg +55 -0
- package/src/components/branding/logo/logo.tsx +56 -0
- package/src/components/ui/accessibility-improvements.stories.tsx +18 -0
- package/src/components/ui/accessibility-improvements.test.tsx +13 -0
- package/src/components/ui/accessibility-improvements.tsx +16 -6
- package/src/components/ui/accordion.stories.tsx +19 -0
- package/src/components/ui/accordion.test.tsx +14 -0
- package/src/components/ui/accordion.tsx +28 -20
- package/src/components/ui/alert-dialog.stories.tsx +19 -0
- package/src/components/ui/alert-dialog.test.tsx +14 -0
- package/src/components/ui/alert-dialog.tsx +159 -123
- package/src/components/ui/alert.stories.tsx +19 -0
- package/src/components/ui/alert.test.tsx +14 -0
- package/src/components/ui/alert.tsx +60 -41
- package/src/components/ui/aspect-ratio.stories.tsx +19 -0
- package/src/components/ui/aspect-ratio.test.tsx +14 -0
- package/src/components/ui/aspect-ratio.tsx +19 -2
- package/src/components/ui/attachment.stories.tsx +19 -0
- package/src/components/ui/attachment.test.tsx +14 -0
- package/src/components/ui/attachment.tsx +209 -0
- package/src/components/ui/avatar.stories.tsx +19 -0
- package/src/components/ui/avatar.test.tsx +14 -0
- package/src/components/ui/avatar.tsx +73 -17
- package/src/components/ui/badge.stories.tsx +19 -0
- package/src/components/ui/badge.test.tsx +14 -0
- package/src/components/ui/badge.tsx +33 -25
- package/src/components/ui/breadcrumb.stories.tsx +19 -0
- package/src/components/ui/breadcrumb.test.tsx +14 -0
- package/src/components/ui/breadcrumb.tsx +98 -86
- package/src/components/ui/bubble.stories.tsx +19 -0
- package/src/components/ui/bubble.test.tsx +14 -0
- package/src/components/ui/bubble.tsx +130 -0
- package/src/components/ui/button-group.stories.tsx +19 -0
- package/src/components/ui/button-group.test.tsx +14 -0
- package/src/components/ui/button-group.tsx +26 -20
- package/src/components/ui/button.stories.tsx +19 -0
- package/src/components/ui/button.test.tsx +14 -0
- package/src/components/ui/button.tsx +30 -31
- package/src/components/ui/calendar.stories.tsx +19 -0
- package/src/components/ui/calendar.test.tsx +14 -0
- package/src/components/ui/calendar.tsx +28 -26
- package/src/components/ui/card.stories.tsx +19 -0
- package/src/components/ui/card.test.tsx +14 -0
- package/src/components/ui/card.tsx +30 -17
- package/src/components/ui/carousel.stories.tsx +19 -0
- package/src/components/ui/carousel.test.tsx +14 -0
- package/src/components/ui/carousel.tsx +115 -135
- package/src/components/ui/chart.stories.tsx +18 -0
- package/src/components/ui/chart.test.tsx +13 -0
- package/src/components/ui/chart.tsx +220 -216
- package/src/components/ui/checkbox.stories.tsx +19 -0
- package/src/components/ui/checkbox.test.tsx +14 -0
- package/src/components/ui/checkbox.tsx +7 -10
- package/src/components/ui/collapsible.stories.tsx +19 -0
- package/src/components/ui/collapsible.test.tsx +14 -0
- package/src/components/ui/collapsible.tsx +11 -26
- package/src/components/ui/color-picker.stories.tsx +19 -0
- package/src/components/ui/color-picker.test.tsx +14 -0
- package/src/components/ui/color-picker.tsx +36 -26
- package/src/components/ui/combobox.stories.tsx +19 -0
- package/src/components/ui/combobox.test.tsx +14 -0
- package/src/components/ui/combobox.tsx +281 -96
- package/src/components/ui/command.stories.tsx +19 -0
- package/src/components/ui/command.test.tsx +14 -0
- package/src/components/ui/command.tsx +59 -47
- package/src/components/ui/context-menu.stories.tsx +19 -0
- package/src/components/ui/context-menu.test.tsx +14 -0
- package/src/components/ui/context-menu.tsx +231 -160
- package/src/components/ui/dialog.stories.tsx +19 -0
- package/src/components/ui/dialog.test.tsx +14 -0
- package/src/components/ui/dialog.tsx +81 -72
- package/src/components/ui/direction.stories.tsx +19 -0
- package/src/components/ui/direction.test.tsx +14 -0
- package/src/components/ui/direction.tsx +6 -0
- package/src/components/ui/drawer.stories.tsx +19 -0
- package/src/components/ui/drawer.test.tsx +14 -0
- package/src/components/ui/drawer.tsx +143 -64
- package/src/components/ui/dropdown-menu.stories.tsx +19 -0
- package/src/components/ui/dropdown-menu.test.tsx +14 -0
- package/src/components/ui/dropdown-menu.tsx +199 -153
- package/src/components/ui/empty.stories.tsx +18 -0
- package/src/components/ui/empty.test.tsx +13 -0
- package/src/components/ui/empty.tsx +11 -9
- package/src/components/ui/field.stories.tsx +18 -0
- package/src/components/ui/field.test.tsx +13 -0
- package/src/components/ui/field.tsx +26 -32
- package/src/components/ui/form.stories.tsx +22 -0
- package/src/components/ui/form.test.tsx +15 -0
- package/src/components/ui/form.tsx +1 -2
- package/src/components/ui/hover-card.stories.tsx +19 -0
- package/src/components/ui/hover-card.test.tsx +14 -0
- package/src/components/ui/hover-card.tsx +34 -32
- package/src/components/ui/input-group.stories.tsx +18 -0
- package/src/components/ui/input-group.test.tsx +13 -0
- package/src/components/ui/input-group.tsx +21 -28
- package/src/components/ui/input-otp.stories.tsx +19 -0
- package/src/components/ui/input-otp.test.tsx +14 -0
- package/src/components/ui/input-otp.tsx +58 -42
- package/src/components/ui/input.stories.tsx +19 -0
- package/src/components/ui/input.test.tsx +14 -0
- package/src/components/ui/input.tsx +9 -8
- package/src/components/ui/item.stories.tsx +18 -0
- package/src/components/ui/item.test.tsx +13 -0
- package/src/components/ui/item.tsx +38 -28
- package/src/components/ui/kbd.stories.tsx +18 -0
- package/src/components/ui/kbd.test.tsx +13 -0
- package/src/components/ui/kbd.tsx +3 -3
- package/src/components/ui/label.stories.tsx +18 -0
- package/src/components/ui/label.test.tsx +13 -0
- package/src/components/ui/label.tsx +7 -11
- package/src/components/ui/marker.stories.tsx +19 -0
- package/src/components/ui/marker.test.tsx +14 -0
- package/src/components/ui/marker.tsx +73 -0
- package/src/components/ui/menubar.stories.tsx +19 -0
- package/src/components/ui/menubar.test.tsx +14 -0
- package/src/components/ui/menubar.tsx +226 -202
- package/src/components/ui/message-scroller.stories.tsx +19 -0
- package/src/components/ui/message-scroller.test.tsx +14 -0
- package/src/components/ui/message-scroller.tsx +131 -0
- package/src/components/ui/message.stories.tsx +19 -0
- package/src/components/ui/message.test.tsx +14 -0
- package/src/components/ui/message.tsx +94 -0
- package/src/components/ui/native-select.stories.tsx +18 -0
- package/src/components/ui/native-select.test.tsx +13 -0
- package/src/components/ui/native-select.tsx +63 -0
- package/src/components/ui/navigation-menu.stories.tsx +19 -0
- package/src/components/ui/navigation-menu.test.tsx +14 -0
- package/src/components/ui/navigation-menu.tsx +145 -103
- package/src/components/ui/pagination.stories.tsx +19 -0
- package/src/components/ui/pagination.test.tsx +14 -0
- package/src/components/ui/pagination.tsx +114 -83
- package/src/components/ui/popover.stories.tsx +19 -0
- package/src/components/ui/popover.test.tsx +14 -0
- package/src/components/ui/popover.tsx +68 -33
- package/src/components/ui/progress.stories.tsx +19 -0
- package/src/components/ui/progress.test.tsx +14 -0
- package/src/components/ui/progress.tsx +67 -15
- package/src/components/ui/questionnaire.stories.tsx +19 -0
- package/src/components/ui/questionnaire.test.tsx +14 -0
- package/src/components/ui/questionnaire.tsx +324 -0
- package/src/components/ui/radio-group.stories.tsx +19 -0
- package/src/components/ui/radio-group.test.tsx +14 -0
- package/src/components/ui/radio-group.tsx +15 -20
- package/src/components/ui/resizable.stories.tsx +19 -0
- package/src/components/ui/resizable.test.tsx +14 -0
- package/src/components/ui/resizable.tsx +37 -30
- package/src/components/ui/scroll-area.stories.tsx +19 -0
- package/src/components/ui/scroll-area.test.tsx +14 -0
- package/src/components/ui/scroll-area.tsx +41 -19
- package/src/components/ui/select.stories.tsx +19 -0
- package/src/components/ui/select.test.tsx +32 -0
- package/src/components/ui/select.tsx +172 -78
- package/src/components/ui/separator.stories.tsx +19 -0
- package/src/components/ui/separator.test.tsx +14 -0
- package/src/components/ui/separator.tsx +8 -11
- package/src/components/ui/sheet.stories.tsx +19 -0
- package/src/components/ui/sheet.test.tsx +14 -0
- package/src/components/ui/sheet.tsx +56 -71
- package/src/components/ui/sidebar.stories.tsx +18 -0
- package/src/components/ui/sidebar.test.tsx +13 -0
- package/src/components/ui/sidebar.tsx +469 -513
- package/src/components/ui/skeleton.stories.tsx +19 -0
- package/src/components/ui/skeleton.test.tsx +14 -0
- package/src/components/ui/skeleton.tsx +8 -114
- package/src/components/ui/slider.stories.tsx +19 -0
- package/src/components/ui/slider.test.tsx +14 -0
- package/src/components/ui/slider.tsx +31 -40
- package/src/components/ui/sonner.stories.tsx +19 -0
- package/src/components/ui/sonner.test.tsx +14 -0
- package/src/components/ui/sonner.tsx +39 -7
- package/src/components/ui/spinner.stories.tsx +18 -0
- package/src/components/ui/spinner.test.tsx +13 -0
- package/src/components/ui/spinner.tsx +3 -7
- package/src/components/ui/switch.stories.tsx +19 -0
- package/src/components/ui/switch.test.tsx +14 -0
- package/src/components/ui/switch.tsx +4 -7
- package/src/components/ui/table.stories.tsx +19 -0
- package/src/components/ui/table.test.tsx +14 -0
- package/src/components/ui/table.tsx +17 -17
- package/src/components/ui/tabs.stories.tsx +19 -0
- package/src/components/ui/tabs.test.tsx +14 -0
- package/src/components/ui/tabs.tsx +71 -31
- package/src/components/ui/textarea.stories.tsx +19 -0
- package/src/components/ui/textarea.test.tsx +14 -0
- package/src/components/ui/textarea.tsx +7 -5
- package/src/components/ui/theme-toggle.stories.tsx +18 -0
- package/src/components/ui/theme-toggle.test.tsx +13 -0
- package/src/components/ui/theme-toggle.tsx +35 -37
- package/src/components/ui/toggle-group.stories.tsx +19 -0
- package/src/components/ui/toggle-group.test.tsx +14 -0
- package/src/components/ui/toggle-group.tsx +41 -25
- package/src/components/ui/toggle.stories.tsx +19 -0
- package/src/components/ui/toggle.test.tsx +14 -0
- package/src/components/ui/toggle.tsx +17 -19
- package/src/components/ui/tooltip.stories.tsx +19 -0
- package/src/components/ui/tooltip.test.tsx +14 -0
- package/src/components/ui/tooltip.tsx +53 -44
- package/src/demo/AIDemo.tsx +50 -0
- package/src/demo/ButtonsDemo.tsx +41 -18
- package/src/demo/CalendarDemo.tsx +1 -1
- package/src/demo/FeedbackDemo.tsx +4 -6
- package/src/demo/FormsDemo.tsx +34 -11
- package/src/demo/NavigationDemo.tsx +38 -13
- package/src/demo/OverlaysDemo.tsx +22 -36
- package/src/demo/update-demos.js +82 -0
- package/src/index.css +66 -46
- package/src/lib/utils.ts +3 -3
- package/src/stories/Button.stories.ts +54 -0
- package/src/stories/Button.tsx +36 -0
- package/src/stories/Configure.mdx +388 -0
- package/src/stories/Header.stories.ts +34 -0
- package/src/stories/Header.tsx +55 -0
- package/src/stories/Page.stories.ts +33 -0
- package/src/stories/Page.tsx +73 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +68 -0
|
@@ -5,22 +5,20 @@ import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, SheetTr
|
|
|
5
5
|
import { Popover, PopoverContent, PopoverTrigger } from "../components/ui/popover";
|
|
6
6
|
import { HoverCard, HoverCardContent, HoverCardTrigger } from "../components/ui/hover-card";
|
|
7
7
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "../components/ui/alert-dialog";
|
|
8
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "../components/ui/dropdown-menu";
|
|
8
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, DropdownMenuGroup } from "../components/ui/dropdown-menu";
|
|
9
9
|
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "../components/ui/command";
|
|
10
10
|
import { Button } from "../components/ui/button";
|
|
11
11
|
|
|
12
12
|
export function OverlaysDemo() {
|
|
13
13
|
return (
|
|
14
|
-
<div className="
|
|
14
|
+
<div className="flex flex-col gap-8">
|
|
15
15
|
<Card>
|
|
16
16
|
<CardHeader>
|
|
17
17
|
<CardTitle>Modais (Dialog, Alert Dialog, Sheet, Drawer)</CardTitle>
|
|
18
18
|
</CardHeader>
|
|
19
19
|
<CardContent className="flex flex-wrap gap-4">
|
|
20
20
|
<Dialog>
|
|
21
|
-
<DialogTrigger
|
|
22
|
-
<Button variant="outline">Abrir Dialog</Button>
|
|
23
|
-
</DialogTrigger>
|
|
21
|
+
<DialogTrigger render={<Button variant="outline" />}>Abrir Dialog</DialogTrigger>
|
|
24
22
|
<DialogContent className="sm:max-w-[425px]">
|
|
25
23
|
<DialogHeader>
|
|
26
24
|
<DialogTitle>Editar perfil</DialogTitle>
|
|
@@ -38,9 +36,7 @@ export function OverlaysDemo() {
|
|
|
38
36
|
</Dialog>
|
|
39
37
|
|
|
40
38
|
<AlertDialog>
|
|
41
|
-
<AlertDialogTrigger
|
|
42
|
-
<Button variant="destructive">Abrir Alert Dialog</Button>
|
|
43
|
-
</AlertDialogTrigger>
|
|
39
|
+
<AlertDialogTrigger render={<Button variant="destructive" />}>Abrir Alert Dialog</AlertDialogTrigger>
|
|
44
40
|
<AlertDialogContent>
|
|
45
41
|
<AlertDialogHeader>
|
|
46
42
|
<AlertDialogTitle>Você tem certeza absoluta?</AlertDialogTitle>
|
|
@@ -56,9 +52,7 @@ export function OverlaysDemo() {
|
|
|
56
52
|
</AlertDialog>
|
|
57
53
|
|
|
58
54
|
<Sheet>
|
|
59
|
-
<SheetTrigger
|
|
60
|
-
<Button variant="outline">Abrir Sheet (Painel)</Button>
|
|
61
|
-
</SheetTrigger>
|
|
55
|
+
<SheetTrigger render={<Button variant="outline" />}>Abrir Sheet (Painel)</SheetTrigger>
|
|
62
56
|
<SheetContent>
|
|
63
57
|
<SheetHeader>
|
|
64
58
|
<SheetTitle>Tem certeza que deseja continuar?</SheetTitle>
|
|
@@ -70,9 +64,7 @@ export function OverlaysDemo() {
|
|
|
70
64
|
</Sheet>
|
|
71
65
|
|
|
72
66
|
<Drawer>
|
|
73
|
-
<DrawerTrigger
|
|
74
|
-
<Button variant="outline">Abrir Drawer (Gaveta)</Button>
|
|
75
|
-
</DrawerTrigger>
|
|
67
|
+
<DrawerTrigger render={<Button variant="outline" />}>Abrir Drawer (Gaveta)</DrawerTrigger>
|
|
76
68
|
<DrawerContent>
|
|
77
69
|
<div className="mx-auto w-full max-w-sm">
|
|
78
70
|
<DrawerHeader>
|
|
@@ -80,15 +72,13 @@ export function OverlaysDemo() {
|
|
|
80
72
|
<DrawerDescription>Defina sua meta de atividade diária.</DrawerDescription>
|
|
81
73
|
</DrawerHeader>
|
|
82
74
|
<div className="p-4 pb-0">
|
|
83
|
-
<div className="flex items-center justify-center
|
|
75
|
+
<div className="flex items-center justify-center gap-2">
|
|
84
76
|
<p>Conteúdo da gaveta</p>
|
|
85
77
|
</div>
|
|
86
78
|
</div>
|
|
87
79
|
<DrawerFooter>
|
|
88
80
|
<Button>Salvar</Button>
|
|
89
|
-
<DrawerClose
|
|
90
|
-
<Button variant="outline">Cancelar</Button>
|
|
91
|
-
</DrawerClose>
|
|
81
|
+
<DrawerClose render={<Button variant="outline" />}>Cancelar</DrawerClose>
|
|
92
82
|
</DrawerFooter>
|
|
93
83
|
</div>
|
|
94
84
|
</DrawerContent>
|
|
@@ -102,26 +92,24 @@ export function OverlaysDemo() {
|
|
|
102
92
|
</CardHeader>
|
|
103
93
|
<CardContent className="flex flex-wrap gap-4">
|
|
104
94
|
<DropdownMenu>
|
|
105
|
-
<DropdownMenuTrigger
|
|
106
|
-
<Button variant="outline">Menu (Dropdown)</Button>
|
|
107
|
-
</DropdownMenuTrigger>
|
|
95
|
+
<DropdownMenuTrigger render={<Button variant="outline" />}>Menu (Dropdown)</DropdownMenuTrigger>
|
|
108
96
|
<DropdownMenuContent>
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
97
|
+
<DropdownMenuGroup>
|
|
98
|
+
<DropdownMenuLabel>Minha Conta</DropdownMenuLabel>
|
|
99
|
+
<DropdownMenuSeparator />
|
|
100
|
+
<DropdownMenuItem>Perfil</DropdownMenuItem>
|
|
101
|
+
<DropdownMenuItem>Faturamento</DropdownMenuItem>
|
|
102
|
+
<DropdownMenuItem>Equipe</DropdownMenuItem>
|
|
103
|
+
<DropdownMenuItem>Assinatura</DropdownMenuItem>
|
|
104
|
+
</DropdownMenuGroup>
|
|
115
105
|
</DropdownMenuContent>
|
|
116
106
|
</DropdownMenu>
|
|
117
107
|
|
|
118
108
|
<Popover>
|
|
119
|
-
<PopoverTrigger
|
|
120
|
-
<Button variant="outline">Abrir Popover</Button>
|
|
121
|
-
</PopoverTrigger>
|
|
109
|
+
<PopoverTrigger render={<Button variant="outline" />}>Abrir Popover</PopoverTrigger>
|
|
122
110
|
<PopoverContent className="w-80">
|
|
123
111
|
<div className="grid gap-4">
|
|
124
|
-
<div className="
|
|
112
|
+
<div className="flex flex-col gap-2">
|
|
125
113
|
<h4 className="font-medium leading-none">Dimensões</h4>
|
|
126
114
|
<p className="text-sm text-muted-foreground">
|
|
127
115
|
Defina as dimensões para a camada.
|
|
@@ -132,12 +120,10 @@ export function OverlaysDemo() {
|
|
|
132
120
|
</Popover>
|
|
133
121
|
|
|
134
122
|
<HoverCard>
|
|
135
|
-
<HoverCardTrigger
|
|
136
|
-
<Button variant="link">@nextjs</Button>
|
|
137
|
-
</HoverCardTrigger>
|
|
123
|
+
<HoverCardTrigger render={<Button variant="link" />}>@nextjs</HoverCardTrigger>
|
|
138
124
|
<HoverCardContent className="w-80">
|
|
139
|
-
<div className="flex justify-between
|
|
140
|
-
<div className="
|
|
125
|
+
<div className="flex justify-between gap-4">
|
|
126
|
+
<div className="flex flex-col gap-1">
|
|
141
127
|
<h4 className="text-sm font-semibold">@nextjs</h4>
|
|
142
128
|
<p className="text-sm">
|
|
143
129
|
The React Framework – created and maintained by @vercel.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
|
|
4
|
+
const demoDir = 'c:\\\\Users\\\\chris\\\\Desktop\\\\inspirare-design-system\\\\src\\\\demo';
|
|
5
|
+
|
|
6
|
+
// 1. Add Carousel to Navigation & Layout
|
|
7
|
+
const navPath = path.join(demoDir, 'NavigationDemo.tsx');
|
|
8
|
+
let navContent = fs.readFileSync(navPath, 'utf8');
|
|
9
|
+
if (!navContent.includes('Carousel')) {
|
|
10
|
+
navContent = navContent.replace(
|
|
11
|
+
'import { Accordion',
|
|
12
|
+
'import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "../components/ui/carousel";\nimport { Accordion'
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
const carouselDemo = `
|
|
16
|
+
<Card>
|
|
17
|
+
<CardHeader>
|
|
18
|
+
<CardTitle>Carousel</CardTitle>
|
|
19
|
+
<CardDescription>Carrossel de conteúdo.</CardDescription>
|
|
20
|
+
</CardHeader>
|
|
21
|
+
<CardContent className="flex justify-center">
|
|
22
|
+
<Carousel className="w-full max-w-xs">
|
|
23
|
+
<CarouselContent>
|
|
24
|
+
{Array.from({ length: 5 }).map((_, index) => (
|
|
25
|
+
<CarouselItem key={index}>
|
|
26
|
+
<div className="p-1">
|
|
27
|
+
<Card>
|
|
28
|
+
<CardContent className="flex aspect-square items-center justify-center p-6">
|
|
29
|
+
<span className="text-4xl font-semibold">{index + 1}</span>
|
|
30
|
+
</CardContent>
|
|
31
|
+
</Card>
|
|
32
|
+
</div>
|
|
33
|
+
</CarouselItem>
|
|
34
|
+
))}
|
|
35
|
+
</CarouselContent>
|
|
36
|
+
<CarouselPrevious />
|
|
37
|
+
<CarouselNext />
|
|
38
|
+
</Carousel>
|
|
39
|
+
</CardContent>
|
|
40
|
+
</Card>
|
|
41
|
+
`;
|
|
42
|
+
navContent = navContent.replace('</div>\n );\n}', carouselDemo + ' </div>\n );\n}');
|
|
43
|
+
fs.writeFileSync(navPath, navContent);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// 2. Add InputOTP to FormsDemo
|
|
47
|
+
const formsPath = path.join(demoDir, 'FormsDemo.tsx');
|
|
48
|
+
let formsContent = fs.readFileSync(formsPath, 'utf8');
|
|
49
|
+
if (!formsContent.includes('InputOTP')) {
|
|
50
|
+
formsContent = formsContent.replace(
|
|
51
|
+
'import { Input }',
|
|
52
|
+
'import { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator } from "../components/ui/input-otp";\nimport { Input }'
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
const otpDemo = `
|
|
56
|
+
<Card>
|
|
57
|
+
<CardHeader>
|
|
58
|
+
<CardTitle>One-Time Password (OTP)</CardTitle>
|
|
59
|
+
<CardDescription>Para códigos de verificação.</CardDescription>
|
|
60
|
+
</CardHeader>
|
|
61
|
+
<CardContent>
|
|
62
|
+
<InputOTP maxLength={6}>
|
|
63
|
+
<InputOTPGroup>
|
|
64
|
+
<InputOTPSlot index={0} />
|
|
65
|
+
<InputOTPSlot index={1} />
|
|
66
|
+
<InputOTPSlot index={2} />
|
|
67
|
+
</InputOTPGroup>
|
|
68
|
+
<InputOTPSeparator />
|
|
69
|
+
<InputOTPGroup>
|
|
70
|
+
<InputOTPSlot index={3} />
|
|
71
|
+
<InputOTPSlot index={4} />
|
|
72
|
+
<InputOTPSlot index={5} />
|
|
73
|
+
</InputOTPGroup>
|
|
74
|
+
</InputOTP>
|
|
75
|
+
</CardContent>
|
|
76
|
+
</Card>
|
|
77
|
+
`;
|
|
78
|
+
formsContent = formsContent.replace('</div>\n );\n}', otpDemo + ' </div>\n );\n}');
|
|
79
|
+
fs.writeFileSync(formsPath, formsContent);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
console.log('Added missing components to demo pages!');
|
package/src/index.css
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
@import "tailwindcss";
|
|
2
|
+
@import "tw-animate-css";
|
|
3
|
+
@import "shadcn/tailwind.css";
|
|
2
4
|
@custom-variant dark (&:is(.dark *));
|
|
3
5
|
|
|
4
6
|
/* Detecção de conteúdo restrita à BIBLIOTECA. O playground do Vite
|
|
@@ -25,27 +27,28 @@ html {
|
|
|
25
27
|
--icon-xs: 1rem; /* 16px — ícones inline em texto pequeno, badges */
|
|
26
28
|
--icon-sm: 1.5rem; /* 24px — padrão em botões e itens de lista */
|
|
27
29
|
--icon-md: 2rem; /* 32px — destaque em cards, headers de seção */
|
|
28
|
-
--icon-lg: 2.5rem;
|
|
29
|
-
|
|
30
|
+
--icon-lg: 2.5rem;
|
|
30
31
|
--background: #F9F5F2;
|
|
31
|
-
--foreground: #
|
|
32
|
-
--card: #
|
|
33
|
-
--card-foreground: #
|
|
34
|
-
--popover: #
|
|
35
|
-
--popover-foreground: #
|
|
36
|
-
--primary: #
|
|
37
|
-
--primary-foreground: #
|
|
38
|
-
--secondary: #
|
|
39
|
-
--secondary-foreground: #
|
|
40
|
-
--muted: #
|
|
41
|
-
--muted-foreground: #
|
|
42
|
-
--accent: #
|
|
43
|
-
--accent-foreground: #
|
|
44
|
-
--destructive: #
|
|
45
|
-
--destructive-foreground: #
|
|
46
|
-
--border: #
|
|
47
|
-
--input: #
|
|
48
|
-
--ring: #
|
|
32
|
+
--foreground: #2C2C2C;
|
|
33
|
+
--card: #FAF6F1;
|
|
34
|
+
--card-foreground: #2C2C2C;
|
|
35
|
+
--popover: #FAF6F1;
|
|
36
|
+
--popover-foreground: #2C2C2C;
|
|
37
|
+
--primary: #FF9876;
|
|
38
|
+
--primary-foreground: #2C2C2C;
|
|
39
|
+
--secondary: #E3AC8E;
|
|
40
|
+
--secondary-foreground: #2C2C2C;
|
|
41
|
+
--muted: #EADDCB;
|
|
42
|
+
--muted-foreground: #7A6E64;
|
|
43
|
+
--accent: #E3AC8E;
|
|
44
|
+
--accent-foreground: #2C2C2C;
|
|
45
|
+
--destructive: #DC663E;
|
|
46
|
+
--destructive-foreground: #FCEED7;
|
|
47
|
+
--border: #EADDCB;
|
|
48
|
+
--input: #EADDCB;
|
|
49
|
+
--ring: #FF9876;
|
|
50
|
+
--radius: 1rem;
|
|
51
|
+
|
|
49
52
|
--chart-1: #dc663e;
|
|
50
53
|
--chart-2: #e3ac8e;
|
|
51
54
|
--chart-3: #fceed7;
|
|
@@ -63,6 +66,10 @@ html {
|
|
|
63
66
|
--font-serif: Special Elite, ui-serif, serif;
|
|
64
67
|
--font-mono: Fira Code;
|
|
65
68
|
--radius: 0.5rem;
|
|
69
|
+
--radius-2xl: calc(var(--radius) * 1.8);
|
|
70
|
+
--radius-3xl: calc(var(--radius) * 2.2);
|
|
71
|
+
--radius-4xl: calc(var(--radius) * 2.6);
|
|
72
|
+
--font-heading: var(--font-sans);
|
|
66
73
|
/* 8px */
|
|
67
74
|
--shadow-2xs: 0px 4px 8px 0px hsl(0 0% 0% / 0.01);
|
|
68
75
|
--shadow-xs: 0px 4px 8px 0px hsl(0 0% 0% / 0.01);
|
|
@@ -100,26 +107,27 @@ html {
|
|
|
100
107
|
}
|
|
101
108
|
|
|
102
109
|
.dark {
|
|
103
|
-
--background: #
|
|
104
|
-
--foreground: #
|
|
110
|
+
--background: #2C2C2C;
|
|
111
|
+
--foreground: #FCEED7;
|
|
105
112
|
--card: #353535;
|
|
106
|
-
--card-foreground: #
|
|
107
|
-
--popover: #
|
|
108
|
-
--popover-foreground: #
|
|
109
|
-
--primary: #
|
|
110
|
-
--primary-
|
|
111
|
-
--
|
|
112
|
-
--secondary: #
|
|
113
|
-
--secondary-foreground: #2a2a2a;
|
|
113
|
+
--card-foreground: #FCEED7;
|
|
114
|
+
--popover: #2C2C2C;
|
|
115
|
+
--popover-foreground: #FCEED7;
|
|
116
|
+
--primary: #DC663E;
|
|
117
|
+
--primary-foreground: #FCEED7;
|
|
118
|
+
--secondary: #E3AC8E;
|
|
119
|
+
--secondary-foreground: #2C2C2C;
|
|
114
120
|
--muted: #404040;
|
|
115
|
-
--muted-foreground: #
|
|
116
|
-
--accent: #
|
|
117
|
-
--accent-foreground: #
|
|
118
|
-
--destructive: #
|
|
119
|
-
--destructive-foreground: #
|
|
121
|
+
--muted-foreground: #B3A897;
|
|
122
|
+
--accent: #404040;
|
|
123
|
+
--accent-foreground: #FCEED7;
|
|
124
|
+
--destructive: #FF9876;
|
|
125
|
+
--destructive-foreground: #2C2C2C;
|
|
120
126
|
--border: #454545;
|
|
121
127
|
--input: #404040;
|
|
122
|
-
--ring: #
|
|
128
|
+
--ring: #DC663E;
|
|
129
|
+
--radius: 0.75rem;
|
|
130
|
+
|
|
123
131
|
--chart-1: #dc663e;
|
|
124
132
|
--chart-2: #fceed7;
|
|
125
133
|
--chart-3: #e3ac8e;
|
|
@@ -247,6 +255,21 @@ html {
|
|
|
247
255
|
@apply bg-background text-foreground;
|
|
248
256
|
}
|
|
249
257
|
|
|
258
|
+
button,
|
|
259
|
+
[role="button"],
|
|
260
|
+
a[href],
|
|
261
|
+
input[type="button"],
|
|
262
|
+
input[type="submit"],
|
|
263
|
+
input[type="reset"] {
|
|
264
|
+
cursor: pointer;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
button:disabled,
|
|
268
|
+
[role="button"][aria-disabled="true"],
|
|
269
|
+
input:disabled {
|
|
270
|
+
cursor: not-allowed;
|
|
271
|
+
}
|
|
272
|
+
|
|
250
273
|
/* Fix for Radix Popper z-index auto issues in MFE / Host environments */
|
|
251
274
|
[data-radix-popper-content-wrapper] {
|
|
252
275
|
z-index: 99999 !important;
|
|
@@ -665,16 +688,13 @@ body {
|
|
|
665
688
|
--font-mono: var(--font-mono);
|
|
666
689
|
|
|
667
690
|
/* Inspirare Brand Colors */
|
|
668
|
-
--color-
|
|
669
|
-
--color-
|
|
670
|
-
--color-
|
|
671
|
-
--color-
|
|
672
|
-
--color-
|
|
673
|
-
--color-
|
|
674
|
-
--color-
|
|
675
|
-
--color-Inspirare-purple-700: oklch(0.5 0.24 270);
|
|
676
|
-
--color-Inspirare-purple-800: oklch(0.4 0.26 270);
|
|
677
|
-
--color-Inspirare-purple-900: oklch(0.3 0.28 270);
|
|
691
|
+
--color-inspirare-dark: #2C2C2C;
|
|
692
|
+
--color-inspirare-cream: #FCEED7;
|
|
693
|
+
--color-inspirare-gray: #F4F4F5;
|
|
694
|
+
--color-inspirare-peach: #E3AC8E;
|
|
695
|
+
--color-inspirare-orange-light: #FF9876;
|
|
696
|
+
--color-inspirare-orange: #DC663E;
|
|
697
|
+
--color-inspirare-orange-vivid: #FF7512;
|
|
678
698
|
|
|
679
699
|
--color-Inspirare-blue-50: oklch(0.95 0.05 200);
|
|
680
700
|
--color-Inspirare-blue-100: oklch(0.9 0.08 200);
|
package/src/lib/utils.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { clsx, type ClassValue } from "clsx"
|
|
2
|
-
import { twMerge } from "tailwind-merge"
|
|
1
|
+
import { clsx, type ClassValue } from "clsx"
|
|
2
|
+
import { twMerge } from "tailwind-merge"
|
|
3
3
|
|
|
4
4
|
export function cn(...inputs: ClassValue[]) {
|
|
5
|
-
return twMerge(clsx(inputs))
|
|
5
|
+
return twMerge(clsx(inputs))
|
|
6
6
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
import { fn } from 'storybook/test';
|
|
4
|
+
|
|
5
|
+
import { Button } from './Button';
|
|
6
|
+
|
|
7
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
|
|
8
|
+
const meta = {
|
|
9
|
+
title: 'Example/Button',
|
|
10
|
+
component: Button,
|
|
11
|
+
parameters: {
|
|
12
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
|
13
|
+
layout: 'centered',
|
|
14
|
+
},
|
|
15
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
16
|
+
tags: ['autodocs'],
|
|
17
|
+
// More on argTypes: https://storybook.js.org/docs/api/arg-types
|
|
18
|
+
argTypes: {
|
|
19
|
+
backgroundColor: { control: 'color' },
|
|
20
|
+
},
|
|
21
|
+
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#story-args
|
|
22
|
+
args: { onClick: fn() },
|
|
23
|
+
} satisfies Meta<typeof Button>;
|
|
24
|
+
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
|
|
28
|
+
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
|
29
|
+
export const Primary: Story = {
|
|
30
|
+
args: {
|
|
31
|
+
primary: true,
|
|
32
|
+
label: 'Button',
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const Secondary: Story = {
|
|
37
|
+
args: {
|
|
38
|
+
label: 'Button',
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const Large: Story = {
|
|
43
|
+
args: {
|
|
44
|
+
size: 'large',
|
|
45
|
+
label: 'Button',
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const Small: Story = {
|
|
50
|
+
args: {
|
|
51
|
+
size: 'small',
|
|
52
|
+
label: 'Button',
|
|
53
|
+
},
|
|
54
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
import './button.css';
|
|
3
|
+
|
|
4
|
+
export interface ButtonProps {
|
|
5
|
+
/** Is this the principal call to action on the page? */
|
|
6
|
+
primary?: boolean;
|
|
7
|
+
/** What background color to use */
|
|
8
|
+
backgroundColor?: string;
|
|
9
|
+
/** How large should the button be? */
|
|
10
|
+
size?: 'small' | 'medium' | 'large';
|
|
11
|
+
/** Button contents */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Optional click handler */
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Primary UI component for user interaction */
|
|
18
|
+
export const Button = ({
|
|
19
|
+
primary = false,
|
|
20
|
+
size = 'medium',
|
|
21
|
+
backgroundColor,
|
|
22
|
+
label,
|
|
23
|
+
...props
|
|
24
|
+
}: ButtonProps) => {
|
|
25
|
+
const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
|
|
26
|
+
return (
|
|
27
|
+
<button
|
|
28
|
+
type="button"
|
|
29
|
+
className={['storybook-button', `storybook-button--${size}`, mode].join(' ')}
|
|
30
|
+
style={{ backgroundColor }}
|
|
31
|
+
{...props}
|
|
32
|
+
>
|
|
33
|
+
{label}
|
|
34
|
+
</button>
|
|
35
|
+
);
|
|
36
|
+
};
|