@inspirare/design-system 0.0.23 → 0.0.24

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 (297) hide show
  1. package/README.md +82 -61
  2. package/dist/book-logo-filled.svg +55 -0
  3. package/dist/components/ui/accessibility-improvements.js +26 -23
  4. package/dist/components/ui/accordion.js +34 -24
  5. package/dist/components/ui/alert-dialog.js +91 -57
  6. package/dist/components/ui/alert.js +38 -26
  7. package/dist/components/ui/aspect-ratio.js +11 -3
  8. package/dist/components/ui/avatar.js +30 -8
  9. package/dist/components/ui/badge.js +20 -14
  10. package/dist/components/ui/breadcrumb.js +69 -56
  11. package/dist/components/ui/button-group.js +17 -13
  12. package/dist/components/ui/button.js +19 -15
  13. package/dist/components/ui/calendar.js +63 -59
  14. package/dist/components/ui/card.js +11 -9
  15. package/dist/components/ui/carousel.js +70 -75
  16. package/dist/components/ui/chart.js +75 -72
  17. package/dist/components/ui/checkbox.js +4 -5
  18. package/dist/components/ui/collapsible.js +12 -14
  19. package/dist/components/ui/color-picker.js +60 -80
  20. package/dist/components/ui/combobox.js +153 -33
  21. package/dist/components/ui/command.js +50 -48
  22. package/dist/components/ui/context-menu.js +129 -68
  23. package/dist/components/ui/dialog.js +65 -60
  24. package/dist/components/ui/drawer.js +81 -40
  25. package/dist/components/ui/dropdown-menu.js +100 -87
  26. package/dist/components/ui/empty.js +7 -6
  27. package/dist/components/ui/field.js +44 -47
  28. package/dist/components/ui/form.js +22 -23
  29. package/dist/components/ui/hover-card.js +14 -11
  30. package/dist/components/ui/input-group.js +16 -13
  31. package/dist/components/ui/input-otp.js +37 -32
  32. package/dist/components/ui/input.js +9 -7
  33. package/dist/components/ui/item.js +42 -36
  34. package/dist/components/ui/kbd.js +2 -1
  35. package/dist/components/ui/label.js +6 -7
  36. package/dist/components/ui/menubar.js +124 -93
  37. package/dist/components/ui/navigation-menu.js +79 -54
  38. package/dist/components/ui/pagination.js +78 -58
  39. package/dist/components/ui/popover.js +35 -16
  40. package/dist/components/ui/progress.js +37 -13
  41. package/dist/components/ui/radio-group.js +14 -14
  42. package/dist/components/ui/resizable.js +24 -15
  43. package/dist/components/ui/scroll-area.js +29 -11
  44. package/dist/components/ui/select.js +98 -56
  45. package/dist/components/ui/separator.js +5 -7
  46. package/dist/components/ui/sheet.js +47 -42
  47. package/dist/components/ui/sidebar.js +279 -248
  48. package/dist/components/ui/skeleton.js +4 -40
  49. package/dist/components/ui/slider.js +27 -29
  50. package/dist/components/ui/sonner.js +27 -10
  51. package/dist/components/ui/spinner.js +2 -0
  52. package/dist/components/ui/switch.js +3 -4
  53. package/dist/components/ui/table.js +6 -6
  54. package/dist/components/ui/tabs.js +45 -22
  55. package/dist/components/ui/textarea.js +3 -2
  56. package/dist/components/ui/theme-toggle.js +38 -41
  57. package/dist/components/ui/toggle-group.js +30 -21
  58. package/dist/components/ui/toggle.js +8 -9
  59. package/dist/components/ui/tooltip.js +28 -23
  60. package/dist/index.css +1 -1
  61. package/dist/index.d.ts +446 -468
  62. package/dist/index.js +58 -58
  63. package/package.json +38 -37
  64. package/src/App.tsx +28 -34
  65. package/src/components/branding/assets/book-logo-filled.svg +55 -0
  66. package/src/components/branding/logo/logo.tsx +56 -0
  67. package/src/components/ui/accessibility-improvements.stories.tsx +18 -0
  68. package/src/components/ui/accessibility-improvements.test.tsx +13 -0
  69. package/src/components/ui/accessibility-improvements.tsx +16 -6
  70. package/src/components/ui/accordion.stories.tsx +19 -0
  71. package/src/components/ui/accordion.test.tsx +14 -0
  72. package/src/components/ui/accordion.tsx +28 -20
  73. package/src/components/ui/alert-dialog.stories.tsx +19 -0
  74. package/src/components/ui/alert-dialog.test.tsx +14 -0
  75. package/src/components/ui/alert-dialog.tsx +159 -123
  76. package/src/components/ui/alert.stories.tsx +19 -0
  77. package/src/components/ui/alert.test.tsx +14 -0
  78. package/src/components/ui/alert.tsx +60 -41
  79. package/src/components/ui/aspect-ratio.stories.tsx +19 -0
  80. package/src/components/ui/aspect-ratio.test.tsx +14 -0
  81. package/src/components/ui/aspect-ratio.tsx +19 -2
  82. package/src/components/ui/attachment.stories.tsx +19 -0
  83. package/src/components/ui/attachment.test.tsx +14 -0
  84. package/src/components/ui/attachment.tsx +209 -0
  85. package/src/components/ui/avatar.stories.tsx +19 -0
  86. package/src/components/ui/avatar.test.tsx +14 -0
  87. package/src/components/ui/avatar.tsx +73 -17
  88. package/src/components/ui/badge.stories.tsx +19 -0
  89. package/src/components/ui/badge.test.tsx +14 -0
  90. package/src/components/ui/badge.tsx +33 -25
  91. package/src/components/ui/breadcrumb.stories.tsx +19 -0
  92. package/src/components/ui/breadcrumb.test.tsx +14 -0
  93. package/src/components/ui/breadcrumb.tsx +98 -86
  94. package/src/components/ui/bubble.stories.tsx +19 -0
  95. package/src/components/ui/bubble.test.tsx +14 -0
  96. package/src/components/ui/bubble.tsx +130 -0
  97. package/src/components/ui/button-group.stories.tsx +19 -0
  98. package/src/components/ui/button-group.test.tsx +14 -0
  99. package/src/components/ui/button-group.tsx +26 -20
  100. package/src/components/ui/button.stories.tsx +19 -0
  101. package/src/components/ui/button.test.tsx +14 -0
  102. package/src/components/ui/button.tsx +30 -31
  103. package/src/components/ui/calendar.stories.tsx +19 -0
  104. package/src/components/ui/calendar.test.tsx +14 -0
  105. package/src/components/ui/calendar.tsx +28 -26
  106. package/src/components/ui/card.stories.tsx +19 -0
  107. package/src/components/ui/card.test.tsx +14 -0
  108. package/src/components/ui/card.tsx +30 -17
  109. package/src/components/ui/carousel.stories.tsx +19 -0
  110. package/src/components/ui/carousel.test.tsx +14 -0
  111. package/src/components/ui/carousel.tsx +115 -135
  112. package/src/components/ui/chart.stories.tsx +18 -0
  113. package/src/components/ui/chart.test.tsx +13 -0
  114. package/src/components/ui/chart.tsx +220 -216
  115. package/src/components/ui/checkbox.stories.tsx +19 -0
  116. package/src/components/ui/checkbox.test.tsx +14 -0
  117. package/src/components/ui/checkbox.tsx +7 -10
  118. package/src/components/ui/collapsible.stories.tsx +19 -0
  119. package/src/components/ui/collapsible.test.tsx +14 -0
  120. package/src/components/ui/collapsible.tsx +11 -26
  121. package/src/components/ui/color-picker.stories.tsx +19 -0
  122. package/src/components/ui/color-picker.test.tsx +14 -0
  123. package/src/components/ui/color-picker.tsx +36 -26
  124. package/src/components/ui/combobox.stories.tsx +19 -0
  125. package/src/components/ui/combobox.test.tsx +14 -0
  126. package/src/components/ui/combobox.tsx +281 -96
  127. package/src/components/ui/command.stories.tsx +19 -0
  128. package/src/components/ui/command.test.tsx +14 -0
  129. package/src/components/ui/command.tsx +59 -47
  130. package/src/components/ui/context-menu.stories.tsx +19 -0
  131. package/src/components/ui/context-menu.test.tsx +14 -0
  132. package/src/components/ui/context-menu.tsx +231 -160
  133. package/src/components/ui/dialog.stories.tsx +19 -0
  134. package/src/components/ui/dialog.test.tsx +14 -0
  135. package/src/components/ui/dialog.tsx +81 -72
  136. package/src/components/ui/direction.stories.tsx +19 -0
  137. package/src/components/ui/direction.test.tsx +14 -0
  138. package/src/components/ui/direction.tsx +6 -0
  139. package/src/components/ui/drawer.stories.tsx +19 -0
  140. package/src/components/ui/drawer.test.tsx +14 -0
  141. package/src/components/ui/drawer.tsx +143 -64
  142. package/src/components/ui/dropdown-menu.stories.tsx +19 -0
  143. package/src/components/ui/dropdown-menu.test.tsx +14 -0
  144. package/src/components/ui/dropdown-menu.tsx +199 -153
  145. package/src/components/ui/empty.stories.tsx +18 -0
  146. package/src/components/ui/empty.test.tsx +13 -0
  147. package/src/components/ui/empty.tsx +11 -9
  148. package/src/components/ui/field.stories.tsx +18 -0
  149. package/src/components/ui/field.test.tsx +13 -0
  150. package/src/components/ui/field.tsx +26 -32
  151. package/src/components/ui/form.stories.tsx +22 -0
  152. package/src/components/ui/form.test.tsx +15 -0
  153. package/src/components/ui/form.tsx +1 -2
  154. package/src/components/ui/hover-card.stories.tsx +19 -0
  155. package/src/components/ui/hover-card.test.tsx +14 -0
  156. package/src/components/ui/hover-card.tsx +34 -32
  157. package/src/components/ui/input-group.stories.tsx +18 -0
  158. package/src/components/ui/input-group.test.tsx +13 -0
  159. package/src/components/ui/input-group.tsx +21 -28
  160. package/src/components/ui/input-otp.stories.tsx +19 -0
  161. package/src/components/ui/input-otp.test.tsx +14 -0
  162. package/src/components/ui/input-otp.tsx +58 -42
  163. package/src/components/ui/input.stories.tsx +19 -0
  164. package/src/components/ui/input.test.tsx +14 -0
  165. package/src/components/ui/input.tsx +9 -8
  166. package/src/components/ui/item.stories.tsx +18 -0
  167. package/src/components/ui/item.test.tsx +13 -0
  168. package/src/components/ui/item.tsx +38 -28
  169. package/src/components/ui/kbd.stories.tsx +18 -0
  170. package/src/components/ui/kbd.test.tsx +13 -0
  171. package/src/components/ui/kbd.tsx +3 -3
  172. package/src/components/ui/label.stories.tsx +18 -0
  173. package/src/components/ui/label.test.tsx +13 -0
  174. package/src/components/ui/label.tsx +7 -11
  175. package/src/components/ui/marker.stories.tsx +19 -0
  176. package/src/components/ui/marker.test.tsx +14 -0
  177. package/src/components/ui/marker.tsx +73 -0
  178. package/src/components/ui/menubar.stories.tsx +19 -0
  179. package/src/components/ui/menubar.test.tsx +14 -0
  180. package/src/components/ui/menubar.tsx +226 -202
  181. package/src/components/ui/message-scroller.stories.tsx +19 -0
  182. package/src/components/ui/message-scroller.test.tsx +14 -0
  183. package/src/components/ui/message-scroller.tsx +131 -0
  184. package/src/components/ui/message.stories.tsx +19 -0
  185. package/src/components/ui/message.test.tsx +14 -0
  186. package/src/components/ui/message.tsx +94 -0
  187. package/src/components/ui/native-select.stories.tsx +18 -0
  188. package/src/components/ui/native-select.test.tsx +13 -0
  189. package/src/components/ui/native-select.tsx +63 -0
  190. package/src/components/ui/navigation-menu.stories.tsx +19 -0
  191. package/src/components/ui/navigation-menu.test.tsx +14 -0
  192. package/src/components/ui/navigation-menu.tsx +145 -103
  193. package/src/components/ui/pagination.stories.tsx +19 -0
  194. package/src/components/ui/pagination.test.tsx +14 -0
  195. package/src/components/ui/pagination.tsx +114 -83
  196. package/src/components/ui/popover.stories.tsx +19 -0
  197. package/src/components/ui/popover.test.tsx +14 -0
  198. package/src/components/ui/popover.tsx +68 -33
  199. package/src/components/ui/progress.stories.tsx +19 -0
  200. package/src/components/ui/progress.test.tsx +14 -0
  201. package/src/components/ui/progress.tsx +67 -15
  202. package/src/components/ui/questionnaire.stories.tsx +19 -0
  203. package/src/components/ui/questionnaire.test.tsx +14 -0
  204. package/src/components/ui/questionnaire.tsx +324 -0
  205. package/src/components/ui/radio-group.stories.tsx +19 -0
  206. package/src/components/ui/radio-group.test.tsx +14 -0
  207. package/src/components/ui/radio-group.tsx +15 -20
  208. package/src/components/ui/resizable.stories.tsx +19 -0
  209. package/src/components/ui/resizable.test.tsx +14 -0
  210. package/src/components/ui/resizable.tsx +37 -30
  211. package/src/components/ui/scroll-area.stories.tsx +19 -0
  212. package/src/components/ui/scroll-area.test.tsx +14 -0
  213. package/src/components/ui/scroll-area.tsx +41 -19
  214. package/src/components/ui/select.stories.tsx +19 -0
  215. package/src/components/ui/select.test.tsx +14 -0
  216. package/src/components/ui/select.tsx +145 -78
  217. package/src/components/ui/separator.stories.tsx +19 -0
  218. package/src/components/ui/separator.test.tsx +14 -0
  219. package/src/components/ui/separator.tsx +8 -11
  220. package/src/components/ui/sheet.stories.tsx +19 -0
  221. package/src/components/ui/sheet.test.tsx +14 -0
  222. package/src/components/ui/sheet.tsx +56 -71
  223. package/src/components/ui/sidebar.stories.tsx +18 -0
  224. package/src/components/ui/sidebar.test.tsx +13 -0
  225. package/src/components/ui/sidebar.tsx +469 -513
  226. package/src/components/ui/skeleton.stories.tsx +19 -0
  227. package/src/components/ui/skeleton.test.tsx +14 -0
  228. package/src/components/ui/skeleton.tsx +8 -114
  229. package/src/components/ui/slider.stories.tsx +19 -0
  230. package/src/components/ui/slider.test.tsx +14 -0
  231. package/src/components/ui/slider.tsx +31 -40
  232. package/src/components/ui/sonner.stories.tsx +19 -0
  233. package/src/components/ui/sonner.test.tsx +14 -0
  234. package/src/components/ui/sonner.tsx +39 -7
  235. package/src/components/ui/spinner.stories.tsx +18 -0
  236. package/src/components/ui/spinner.test.tsx +13 -0
  237. package/src/components/ui/spinner.tsx +3 -7
  238. package/src/components/ui/switch.stories.tsx +19 -0
  239. package/src/components/ui/switch.test.tsx +14 -0
  240. package/src/components/ui/switch.tsx +4 -7
  241. package/src/components/ui/table.stories.tsx +19 -0
  242. package/src/components/ui/table.test.tsx +14 -0
  243. package/src/components/ui/table.tsx +17 -17
  244. package/src/components/ui/tabs.stories.tsx +19 -0
  245. package/src/components/ui/tabs.test.tsx +14 -0
  246. package/src/components/ui/tabs.tsx +71 -31
  247. package/src/components/ui/textarea.stories.tsx +19 -0
  248. package/src/components/ui/textarea.test.tsx +14 -0
  249. package/src/components/ui/textarea.tsx +7 -5
  250. package/src/components/ui/theme-toggle.stories.tsx +18 -0
  251. package/src/components/ui/theme-toggle.test.tsx +13 -0
  252. package/src/components/ui/theme-toggle.tsx +35 -37
  253. package/src/components/ui/toggle-group.stories.tsx +19 -0
  254. package/src/components/ui/toggle-group.test.tsx +14 -0
  255. package/src/components/ui/toggle-group.tsx +41 -25
  256. package/src/components/ui/toggle.stories.tsx +19 -0
  257. package/src/components/ui/toggle.test.tsx +14 -0
  258. package/src/components/ui/toggle.tsx +17 -19
  259. package/src/components/ui/tooltip.stories.tsx +19 -0
  260. package/src/components/ui/tooltip.test.tsx +14 -0
  261. package/src/components/ui/tooltip.tsx +53 -44
  262. package/src/demo/AIDemo.tsx +50 -0
  263. package/src/demo/ButtonsDemo.tsx +41 -18
  264. package/src/demo/CalendarDemo.tsx +1 -1
  265. package/src/demo/FeedbackDemo.tsx +4 -6
  266. package/src/demo/FormsDemo.tsx +34 -11
  267. package/src/demo/NavigationDemo.tsx +38 -13
  268. package/src/demo/OverlaysDemo.tsx +22 -36
  269. package/src/demo/update-demos.js +82 -0
  270. package/src/index.css +66 -46
  271. package/src/lib/utils.ts +3 -3
  272. package/src/stories/Button.stories.ts +54 -0
  273. package/src/stories/Button.tsx +36 -0
  274. package/src/stories/Configure.mdx +388 -0
  275. package/src/stories/Header.stories.ts +34 -0
  276. package/src/stories/Header.tsx +55 -0
  277. package/src/stories/Page.stories.ts +33 -0
  278. package/src/stories/Page.tsx +73 -0
  279. package/src/stories/assets/accessibility.png +0 -0
  280. package/src/stories/assets/accessibility.svg +1 -0
  281. package/src/stories/assets/addon-library.png +0 -0
  282. package/src/stories/assets/assets.png +0 -0
  283. package/src/stories/assets/avif-test-image.avif +0 -0
  284. package/src/stories/assets/context.png +0 -0
  285. package/src/stories/assets/discord.svg +1 -0
  286. package/src/stories/assets/docs.png +0 -0
  287. package/src/stories/assets/figma-plugin.png +0 -0
  288. package/src/stories/assets/github.svg +1 -0
  289. package/src/stories/assets/share.png +0 -0
  290. package/src/stories/assets/styling.png +0 -0
  291. package/src/stories/assets/testing.png +0 -0
  292. package/src/stories/assets/theming.png +0 -0
  293. package/src/stories/assets/tutorials.svg +1 -0
  294. package/src/stories/assets/youtube.svg +1 -0
  295. package/src/stories/button.css +30 -0
  296. package/src/stories/header.css +32 -0
  297. 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="space-y-8">
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 asChild>
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 asChild>
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 asChild>
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 asChild>
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 space-x-2">
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 asChild>
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 asChild>
106
- <Button variant="outline">Menu (Dropdown)</Button>
107
- </DropdownMenuTrigger>
95
+ <DropdownMenuTrigger render={<Button variant="outline" />}>Menu (Dropdown)</DropdownMenuTrigger>
108
96
  <DropdownMenuContent>
109
- <DropdownMenuLabel>Minha Conta</DropdownMenuLabel>
110
- <DropdownMenuSeparator />
111
- <DropdownMenuItem>Perfil</DropdownMenuItem>
112
- <DropdownMenuItem>Faturamento</DropdownMenuItem>
113
- <DropdownMenuItem>Equipe</DropdownMenuItem>
114
- <DropdownMenuItem>Assinatura</DropdownMenuItem>
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 asChild>
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="space-y-2">
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 asChild>
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 space-x-4">
140
- <div className="space-y-1">
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; /* 40px — ícones hero/empty state */
29
-
30
+ --icon-lg: 2.5rem;
30
31
  --background: #F9F5F2;
31
- --foreground: #1e1815;
32
- --card: #FDF7F1;
33
- --card-foreground: #1e1815;
34
- --popover: #FDF7F1;
35
- --popover-foreground: #1e1815;
36
- --primary: #dc663e;
37
- --primary-foreground: #fceed7;
38
- --secondary: #e3ac8e;
39
- --secondary-foreground: #2c2c2c;
40
- --muted: #F2EBE2;
41
- --muted-foreground: #7a6e64;
42
- --accent: #F2EBE2;
43
- --accent-foreground: #1e1815;
44
- --destructive: #ef4444;
45
- --destructive-foreground: #ffffff;
46
- --border: #E5DDD6;
47
- --input: #E5DDD6;
48
- --ring: #dc663e;
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: #2a2a2a;
104
- --foreground: #fceed7;
110
+ --background: #2C2C2C;
111
+ --foreground: #FCEED7;
105
112
  --card: #353535;
106
- --card-foreground: #fceed7;
107
- --popover: #303030;
108
- --popover-foreground: #fceed7;
109
- --primary: #dc663e;
110
- --primary-dark: #ff7512;
111
- --primary-foreground: #fceed7;
112
- --secondary: #fceed7;
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: #b8b8b8;
116
- --accent: #fceed7;
117
- --accent-foreground: #2a2a2a;
118
- --destructive: #ef4444;
119
- --destructive-foreground: #fceed7;
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: #dc663e;
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-Inspirare-purple-50: oklch(0.95 0.05 270);
669
- --color-Inspirare-purple-100: oklch(0.9 0.1 270);
670
- --color-Inspirare-purple-200: oklch(0.85 0.15 270);
671
- --color-Inspirare-purple-300: oklch(0.8 0.18 270);
672
- --color-Inspirare-purple-400: oklch(0.7 0.2 270);
673
- --color-Inspirare-purple-500: oklch(0.6 0.2 270);
674
- --color-Inspirare-purple-600: oklch(0.55 0.22 270);
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
+ };