@inspirare/design-system 0.0.9 → 0.0.10

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 (54) hide show
  1. package/dist/index.css +1 -1
  2. package/package.json +5 -3
  3. package/src/App.css +184 -0
  4. package/src/App.tsx +222 -0
  5. package/src/assets/hero.png +0 -0
  6. package/src/assets/react.svg +1 -0
  7. package/src/assets/vite.svg +1 -0
  8. package/src/components/ui/accessibility-improvements.tsx +117 -0
  9. package/src/components/ui/accordion.tsx +66 -0
  10. package/src/components/ui/alert-dialog.tsx +151 -0
  11. package/src/components/ui/avatar.tsx +53 -0
  12. package/src/components/ui/badge.tsx +46 -0
  13. package/src/components/ui/button.tsx +59 -0
  14. package/src/components/ui/calendar.tsx +220 -0
  15. package/src/components/ui/card.tsx +92 -0
  16. package/src/components/ui/checkbox.tsx +32 -0
  17. package/src/components/ui/collapsible.tsx +36 -0
  18. package/src/components/ui/color-picker.tsx +183 -0
  19. package/src/components/ui/command.tsx +184 -0
  20. package/src/components/ui/dialog.tsx +157 -0
  21. package/src/components/ui/drawer.tsx +149 -0
  22. package/src/components/ui/dropdown-menu.tsx +259 -0
  23. package/src/components/ui/form.tsx +168 -0
  24. package/src/components/ui/hover-card.tsx +49 -0
  25. package/src/components/ui/input.tsx +21 -0
  26. package/src/components/ui/label.tsx +24 -0
  27. package/src/components/ui/popover.tsx +55 -0
  28. package/src/components/ui/progress.tsx +31 -0
  29. package/src/components/ui/radio-group.tsx +43 -0
  30. package/src/components/ui/scroll-area.tsx +32 -0
  31. package/src/components/ui/select.tsx +185 -0
  32. package/src/components/ui/separator.tsx +28 -0
  33. package/src/components/ui/sheet.tsx +153 -0
  34. package/src/components/ui/skeleton.tsx +121 -0
  35. package/src/components/ui/slider.tsx +63 -0
  36. package/src/components/ui/sonner.tsx +25 -0
  37. package/src/components/ui/switch.tsx +35 -0
  38. package/src/components/ui/table.tsx +116 -0
  39. package/src/components/ui/tabs.tsx +66 -0
  40. package/src/components/ui/textarea.tsx +18 -0
  41. package/src/components/ui/theme-toggle.tsx +106 -0
  42. package/src/components/ui/toggle-group.tsx +73 -0
  43. package/src/components/ui/toggle.tsx +47 -0
  44. package/src/components/ui/tooltip.tsx +68 -0
  45. package/src/demo/ButtonsDemo.tsx +82 -0
  46. package/src/demo/CalendarDemo.tsx +25 -0
  47. package/src/demo/FeedbackDemo.tsx +113 -0
  48. package/src/demo/FormsDemo.tsx +100 -0
  49. package/src/demo/NavigationDemo.tsx +141 -0
  50. package/src/demo/OverlaysDemo.tsx +187 -0
  51. package/src/index.css +1434 -0
  52. package/src/index.ts +41 -0
  53. package/src/lib/utils.ts +6 -0
  54. package/src/main.tsx +13 -0
package/src/App.css ADDED
@@ -0,0 +1,184 @@
1
+ .counter {
2
+ font-size: 16px;
3
+ padding: 5px 10px;
4
+ border-radius: 5px;
5
+ color: var(--accent);
6
+ background: var(--accent-bg);
7
+ border: 2px solid transparent;
8
+ transition: border-color 0.3s;
9
+ margin-bottom: 24px;
10
+
11
+ &:hover {
12
+ border-color: var(--accent-border);
13
+ }
14
+ &:focus-visible {
15
+ outline: 2px solid var(--accent);
16
+ outline-offset: 2px;
17
+ }
18
+ }
19
+
20
+ .hero {
21
+ position: relative;
22
+
23
+ .base,
24
+ .framework,
25
+ .vite {
26
+ inset-inline: 0;
27
+ margin: 0 auto;
28
+ }
29
+
30
+ .base {
31
+ width: 170px;
32
+ position: relative;
33
+ z-index: 0;
34
+ }
35
+
36
+ .framework,
37
+ .vite {
38
+ position: absolute;
39
+ }
40
+
41
+ .framework {
42
+ z-index: 1;
43
+ top: 34px;
44
+ height: 28px;
45
+ transform: perspective(2000px) rotateZ(300deg) rotateX(44deg) rotateY(39deg)
46
+ scale(1.4);
47
+ }
48
+
49
+ .vite {
50
+ z-index: 0;
51
+ top: 107px;
52
+ height: 26px;
53
+ width: auto;
54
+ transform: perspective(2000px) rotateZ(300deg) rotateX(40deg) rotateY(39deg)
55
+ scale(0.8);
56
+ }
57
+ }
58
+
59
+ #center {
60
+ display: flex;
61
+ flex-direction: column;
62
+ gap: 25px;
63
+ place-content: center;
64
+ place-items: center;
65
+ flex-grow: 1;
66
+
67
+ @media (max-width: 1024px) {
68
+ padding: 32px 20px 24px;
69
+ gap: 18px;
70
+ }
71
+ }
72
+
73
+ #next-steps {
74
+ display: flex;
75
+ border-top: 1px solid var(--border);
76
+ text-align: left;
77
+
78
+ & > div {
79
+ flex: 1 1 0;
80
+ padding: 32px;
81
+ @media (max-width: 1024px) {
82
+ padding: 24px 20px;
83
+ }
84
+ }
85
+
86
+ .icon {
87
+ margin-bottom: 16px;
88
+ width: 22px;
89
+ height: 22px;
90
+ }
91
+
92
+ @media (max-width: 1024px) {
93
+ flex-direction: column;
94
+ text-align: center;
95
+ }
96
+ }
97
+
98
+ #docs {
99
+ border-right: 1px solid var(--border);
100
+
101
+ @media (max-width: 1024px) {
102
+ border-right: none;
103
+ border-bottom: 1px solid var(--border);
104
+ }
105
+ }
106
+
107
+ #next-steps ul {
108
+ list-style: none;
109
+ padding: 0;
110
+ display: flex;
111
+ gap: 8px;
112
+ margin: 32px 0 0;
113
+
114
+ .logo {
115
+ height: 18px;
116
+ }
117
+
118
+ a {
119
+ color: var(--text-h);
120
+ font-size: 16px;
121
+ border-radius: 6px;
122
+ background: var(--social-bg);
123
+ display: flex;
124
+ padding: 6px 12px;
125
+ align-items: center;
126
+ gap: 8px;
127
+ text-decoration: none;
128
+ transition: box-shadow 0.3s;
129
+
130
+ &:hover {
131
+ box-shadow: var(--shadow);
132
+ }
133
+ .button-icon {
134
+ height: 18px;
135
+ width: 18px;
136
+ }
137
+ }
138
+
139
+ @media (max-width: 1024px) {
140
+ margin-top: 20px;
141
+ flex-wrap: wrap;
142
+ justify-content: center;
143
+
144
+ li {
145
+ flex: 1 1 calc(50% - 8px);
146
+ }
147
+
148
+ a {
149
+ width: 100%;
150
+ justify-content: center;
151
+ box-sizing: border-box;
152
+ }
153
+ }
154
+ }
155
+
156
+ #spacer {
157
+ height: 88px;
158
+ border-top: 1px solid var(--border);
159
+ @media (max-width: 1024px) {
160
+ height: 48px;
161
+ }
162
+ }
163
+
164
+ .ticks {
165
+ position: relative;
166
+ width: 100%;
167
+
168
+ &::before,
169
+ &::after {
170
+ content: '';
171
+ position: absolute;
172
+ top: -4.5px;
173
+ border: 5px solid transparent;
174
+ }
175
+
176
+ &::before {
177
+ left: 0;
178
+ border-left-color: var(--border);
179
+ }
180
+ &::after {
181
+ right: 0;
182
+ border-right-color: var(--border);
183
+ }
184
+ }
package/src/App.tsx ADDED
@@ -0,0 +1,222 @@
1
+ import { useState } from "react";
2
+ import { ThemeToggle } from "./components/ui/theme-toggle";
3
+ import { Separator } from "./components/ui/separator";
4
+
5
+ // Demos
6
+ import { ButtonsDemo } from "./demo/ButtonsDemo";
7
+ import { FormsDemo } from "./demo/FormsDemo";
8
+ import { NavigationDemo } from "./demo/NavigationDemo";
9
+ import { FeedbackDemo } from "./demo/FeedbackDemo";
10
+ import { OverlaysDemo } from "./demo/OverlaysDemo";
11
+ import { CalendarDemo } from "./demo/CalendarDemo";
12
+
13
+ // Typography is directly here to avoid another file just for text blocks
14
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "./components/ui/card";
15
+
16
+ // Sonner setup
17
+ import { Toaster } from "./components/ui/sonner";
18
+ import { toast } from "sonner";
19
+ import { Button } from "./components/ui/button";
20
+
21
+ const SECTIONS = [
22
+ "Tipografia",
23
+ "Botões & Badges",
24
+ "Formulários",
25
+ "Navegação & Layout",
26
+ "Feedback & Dados",
27
+ "Modais & Menus",
28
+ "Calendário",
29
+ "Notificações",
30
+ ];
31
+
32
+ function App() {
33
+ const [activeSection, setActiveSection] = useState(SECTIONS[0]);
34
+
35
+ return (
36
+ <div className="min-h-screen bg-background font-body text-foreground flex">
37
+ <Toaster />
38
+
39
+ {/* Sidebar */}
40
+ <aside className="w-64 border-r border-border bg-card hidden md:flex flex-col h-screen sticky top-0">
41
+ <div className="p-6 border-b border-border">
42
+ <div className="flex items-center gap-3">
43
+ <div className="w-8 h-8 rounded-lg bg-primary flex items-center justify-center text-primary-foreground font-heading font-bold text-lg shadow-sm">
44
+ I
45
+ </div>
46
+ <span className="font-heading font-bold text-lg text-primary">
47
+ Inspirare
48
+ </span>
49
+ </div>
50
+ <p className="text-xs text-muted-foreground mt-2">Design System v1.0</p>
51
+ </div>
52
+
53
+ <div className="p-4 flex-1 overflow-y-auto">
54
+ <h4 className="mb-4 text-sm font-semibold text-muted-foreground uppercase tracking-wider">
55
+ Componentes
56
+ </h4>
57
+ <nav className="space-y-1">
58
+ {SECTIONS.map((section) => (
59
+ <button
60
+ key={section}
61
+ onClick={() => setActiveSection(section)}
62
+ className={`w-full flex items-center px-3 py-2 text-sm rounded-md transition-colors ${
63
+ activeSection === section
64
+ ? "bg-primary/10 text-primary font-medium"
65
+ : "text-muted-foreground hover:bg-muted hover:text-foreground"
66
+ }`}
67
+ >
68
+ {section}
69
+ </button>
70
+ ))}
71
+ </nav>
72
+ </div>
73
+
74
+ <div className="p-4 border-t border-border">
75
+ <ThemeToggle showLabel={true} />
76
+ </div>
77
+ </aside>
78
+
79
+ {/* Main Content */}
80
+ <main className="flex-1 min-w-0 overflow-y-auto bg-background">
81
+ {/* Mobile Header */}
82
+ <header className="md:hidden flex items-center justify-between p-4 border-b border-border bg-card">
83
+ <div className="flex items-center gap-2">
84
+ <div className="w-6 h-6 rounded-md bg-primary flex items-center justify-center text-primary-foreground font-heading font-bold text-sm">
85
+ I
86
+ </div>
87
+ <span className="font-heading font-bold">Inspirare</span>
88
+ </div>
89
+ <ThemeToggle />
90
+ </header>
91
+
92
+ <div className="p-8 md:p-12 max-w-5xl mx-auto space-y-12">
93
+
94
+ <div className="space-y-2">
95
+ <h1 className="text-4xl font-heading font-bold text-foreground">
96
+ {activeSection}
97
+ </h1>
98
+ <p className="text-lg text-muted-foreground">
99
+ Documentação e exemplos da seção de {activeSection.toLowerCase()}.
100
+ </p>
101
+ </div>
102
+
103
+ <Separator />
104
+
105
+ {/* Dynamic Content */}
106
+ <div className="space-y-12 pb-24">
107
+ {activeSection === "Tipografia" && (
108
+ <section className="space-y-8">
109
+ <Card>
110
+ <CardHeader>
111
+ <CardTitle>Títulos (Special Elite)</CardTitle>
112
+ <CardDescription>Utilizado para todos os títulos maiores e de seções.</CardDescription>
113
+ </CardHeader>
114
+ <CardContent className="space-y-6">
115
+ <div>
116
+ <h1 className="text-5xl font-heading font-bold">Cabeçalho 1</h1>
117
+ <span className="text-sm text-muted-foreground">text-5xl font-heading</span>
118
+ </div>
119
+ <Separator />
120
+ <div>
121
+ <h2 className="text-4xl font-heading font-bold">Cabeçalho 2</h2>
122
+ <span className="text-sm text-muted-foreground">text-4xl font-heading</span>
123
+ </div>
124
+ <Separator />
125
+ <div>
126
+ <h3 className="text-3xl font-heading font-bold">Cabeçalho 3</h3>
127
+ <span className="text-sm text-muted-foreground">text-3xl font-heading</span>
128
+ </div>
129
+ <Separator />
130
+ <div>
131
+ <h4 className="text-2xl font-heading font-bold">Cabeçalho 4</h4>
132
+ <span className="text-sm text-muted-foreground">text-2xl font-heading</span>
133
+ </div>
134
+ </CardContent>
135
+ </Card>
136
+
137
+ <Card>
138
+ <CardHeader>
139
+ <CardTitle>Corpo do Texto (Josefin Sans)</CardTitle>
140
+ <CardDescription>Utilizado para parágrafos gerais e elementos de UI menores.</CardDescription>
141
+ </CardHeader>
142
+ <CardContent className="space-y-6">
143
+ <div>
144
+ <p className="text-base leading-7">
145
+ Este é o corpo de texto padrão. É limpo, legível e perfeitamente equilibrado para longas sessões de leitura.
146
+ A rápida raposa marrom pula sobre o cão preguiçoso.
147
+ </p>
148
+ <span className="text-sm text-muted-foreground mt-2 block">text-base font-body</span>
149
+ </div>
150
+ <Separator />
151
+ <div>
152
+ <p className="text-sm text-muted-foreground">
153
+ Este é um texto secundário mutado, usado para informações extras ou dicas.
154
+ </p>
155
+ <span className="text-sm text-muted-foreground mt-2 block">text-sm text-muted-foreground</span>
156
+ </div>
157
+ </CardContent>
158
+ </Card>
159
+ </section>
160
+ )}
161
+
162
+ {activeSection === "Botões & Badges" && <ButtonsDemo />}
163
+ {activeSection === "Formulários" && <FormsDemo />}
164
+ {activeSection === "Navegação & Layout" && <NavigationDemo />}
165
+ {activeSection === "Feedback & Dados" && <FeedbackDemo />}
166
+ {activeSection === "Modais & Menus" && <OverlaysDemo />}
167
+ {activeSection === "Calendário" && <CalendarDemo />}
168
+
169
+ {activeSection === "Notificações" && (
170
+ <section className="space-y-8">
171
+ <Card>
172
+ <CardHeader>
173
+ <CardTitle>Notificações (Sonner)</CardTitle>
174
+ <CardDescription>Para feedback imediato de ações.</CardDescription>
175
+ </CardHeader>
176
+ <CardContent className="flex flex-wrap gap-4 items-center">
177
+ <Button
178
+ variant="outline"
179
+ onClick={() =>
180
+ toast("Evento foi criado", {
181
+ description: "Domingo, 3 de Dezembro às 09:00",
182
+ action: {
183
+ label: "Desfazer",
184
+ onClick: () => console.log("Desfazer"),
185
+ },
186
+ })
187
+ }
188
+ >
189
+ Mostrar Notificação Padrão
190
+ </Button>
191
+ <Button
192
+ variant="outline"
193
+ onClick={() =>
194
+ toast.success("Sucesso!", {
195
+ description: "Ação concluída perfeitamente.",
196
+ })
197
+ }
198
+ >
199
+ Sucesso
200
+ </Button>
201
+ <Button
202
+ variant="destructive"
203
+ onClick={() =>
204
+ toast.error("Erro", {
205
+ description: "Algo deu errado durante a requisição.",
206
+ })
207
+ }
208
+ >
209
+ Erro
210
+ </Button>
211
+ </CardContent>
212
+ </Card>
213
+ </section>
214
+ )}
215
+ </div>
216
+ </div>
217
+ </main>
218
+ </div>
219
+ );
220
+ }
221
+
222
+ export default App;
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="77" height="47" fill="none" aria-labelledby="vite-logo-title" viewBox="0 0 77 47"><title id="vite-logo-title">Vite</title><style>.parenthesis{fill:#000}@media (prefers-color-scheme:dark){.parenthesis{fill:#fff}}</style><path fill="#9135ff" d="M40.151 45.71c-.663.844-2.02.374-2.02-.699V34.708a2.26 2.26 0 0 0-2.262-2.262H24.493c-.92 0-1.457-1.04-.92-1.788l7.479-10.471c1.07-1.498 0-3.578-1.842-3.578H15.443c-.92 0-1.456-1.04-.92-1.788l9.696-13.576c.213-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.472c-1.07 1.497 0 3.578 1.842 3.578h11.376c.944 0 1.474 1.087.89 1.83L40.153 45.712z"/><mask id="a" width="48" height="47" x="14" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M40.047 45.71c-.663.843-2.02.374-2.02-.699V34.708a2.26 2.26 0 0 0-2.262-2.262H24.389c-.92 0-1.457-1.04-.92-1.788l7.479-10.472c1.07-1.497 0-3.578-1.842-3.578H15.34c-.92 0-1.456-1.04-.92-1.788l9.696-13.575c.213-.297.556-.474.92-.474H53.93c.92 0 1.456 1.04.92 1.788L47.37 13.03c-1.07 1.498 0 3.578 1.842 3.578h11.376c.944 0 1.474 1.088.89 1.831L40.049 45.712z"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#eee6ff" rx="5.508" ry="14.704" transform="rotate(269.814 20.96 11.29)scale(-1 1)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#eee6ff" rx="10.399" ry="29.851" transform="rotate(89.814 -16.902 -8.275)scale(1 -1)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#8900ff" rx="5.508" ry="30.487" transform="rotate(89.814 -19.197 -7.127)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#8900ff" rx="5.508" ry="30.599" transform="rotate(89.814 -25.928 4.177)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#8900ff" rx="5.508" ry="30.599" transform="rotate(89.814 -25.738 5.52)scale(1 -1)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#eee6ff" rx="14.072" ry="22.078" transform="rotate(93.35 31.245 55.578)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#8900ff" rx="3.47" ry="21.501" transform="rotate(89.009 35.419 55.202)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#8900ff" rx="3.47" ry="21.501" transform="rotate(89.009 35.419 55.202)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx="14.592" cy="9.743" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(39.51 14.592 9.743)"/></g><g filter="url(#k)"><ellipse cx="61.728" cy="-5.321" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 61.728 -5.32)"/></g><g filter="url(#l)"><ellipse cx="55.618" cy="7.104" fill="#00c2ff" rx="5.971" ry="9.665" transform="rotate(37.892 55.618 7.104)"/></g><g filter="url(#m)"><ellipse cx="12.326" cy="39.103" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 12.326 39.103)"/></g><g filter="url(#n)"><ellipse cx="12.326" cy="39.103" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 12.326 39.103)"/></g><g filter="url(#o)"><ellipse cx="49.857" cy="30.678" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 49.857 30.678)"/></g><g filter="url(#p)"><ellipse cx="52.623" cy="33.171" fill="#00c2ff" rx="5.971" ry="15.297" transform="rotate(37.892 52.623 33.17)"/></g></g><path d="M6.919 0c-9.198 13.166-9.252 33.575 0 46.789h6.215c-9.25-13.214-9.196-33.623 0-46.789zm62.424 0h-6.215c9.198 13.166 9.252 33.575 0 46.789h6.215c9.25-13.214 9.196-33.623 0-46.789" class="parenthesis"/><defs><filter id="b" width="60.045" height="41.654" x="-5.564" y="16.92" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-40.407" y="-6.762" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-35.435" y="2.801" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-30.84" y="20.8" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-29.307" y="21.949" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="29.961" y="-17.13" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="37.754" y="3.055" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="37.754" y="3.055" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-13.43" y="-22.082" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="34.321" y="-37.644" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="38.847" y="-10.552" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-15.081" y="6.78" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-15.081" y="6.78" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="22.45" y="-1.645" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="32.919" y="11.36" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter></defs></svg>
@@ -0,0 +1,117 @@
1
+ "use client";
2
+
3
+ import { useEffect } from "react";
4
+
5
+ /**
6
+ * Hook para melhorar a acessibilidade dos modais
7
+ * Gerencia foco, escape key e aria-labels
8
+ */
9
+ export function useModalAccessibility(isOpen: boolean, onClose: () => void) {
10
+ useEffect(() => {
11
+ if (!isOpen) return;
12
+
13
+ // Função para lidar com teclas
14
+ const handleKeyDown = (event: KeyboardEvent) => {
15
+ if (event.key === "Escape") {
16
+ onClose();
17
+ }
18
+ };
19
+
20
+ // Adicionar listener para ESC
21
+ document.addEventListener("keydown", handleKeyDown);
22
+
23
+ // Focar no primeiro elemento focável quando o modal abrir
24
+ const focusableElements = document.querySelectorAll(
25
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
26
+ );
27
+
28
+ if (focusableElements.length > 0) {
29
+ const firstElement = focusableElements[0] as HTMLElement;
30
+ firstElement.focus();
31
+ }
32
+
33
+ // Cleanup
34
+ return () => {
35
+ document.removeEventListener("keydown", handleKeyDown);
36
+ };
37
+ }, [isOpen, onClose]);
38
+ }
39
+
40
+ /**
41
+ * Hook para gerenciar navegação por teclado em tabs
42
+ */
43
+ export function useTabKeyboardNavigation(
44
+ activeTab: string,
45
+ tabs: Array<{ id: string }>,
46
+ onTabChange: (tabId: string) => void
47
+ ) {
48
+ useEffect(() => {
49
+ const handleKeyDown = (event: KeyboardEvent) => {
50
+ if (
51
+ event.target &&
52
+ (event.target as HTMLElement).getAttribute("role") === "tab"
53
+ ) {
54
+ const currentIndex = tabs.findIndex((tab) => tab.id === activeTab);
55
+
56
+ switch (event.key) {
57
+ case "ArrowRight":
58
+ case "ArrowDown":
59
+ event.preventDefault();
60
+ const nextIndex = (currentIndex + 1) % tabs.length;
61
+ onTabChange(tabs[nextIndex].id);
62
+ break;
63
+ case "ArrowLeft":
64
+ case "ArrowUp":
65
+ event.preventDefault();
66
+ const prevIndex =
67
+ currentIndex === 0 ? tabs.length - 1 : currentIndex - 1;
68
+ onTabChange(tabs[prevIndex].id);
69
+ break;
70
+ case "Home":
71
+ event.preventDefault();
72
+ onTabChange(tabs[0].id);
73
+ break;
74
+ case "End":
75
+ event.preventDefault();
76
+ onTabChange(tabs[tabs.length - 1].id);
77
+ break;
78
+ }
79
+ }
80
+ };
81
+
82
+ document.addEventListener("keydown", handleKeyDown);
83
+ return () => document.removeEventListener("keydown", handleKeyDown);
84
+ }, [activeTab, tabs, onTabChange]);
85
+ }
86
+
87
+ /**
88
+ * Componente para anunciar mudanças de estado para leitores de tela
89
+ */
90
+ interface ScreenReaderAnnouncementProps {
91
+ message: string;
92
+ priority?: "polite" | "assertive";
93
+ }
94
+
95
+ export function ScreenReaderAnnouncement({
96
+ message,
97
+ priority = "polite",
98
+ }: ScreenReaderAnnouncementProps) {
99
+ return (
100
+ <div aria-live={priority} aria-atomic="true" className="sr-only">
101
+ {message}
102
+ </div>
103
+ );
104
+ }
105
+
106
+ /**
107
+ * Hook para anunciar mudanças de progresso
108
+ */
109
+ export function useProgressAnnouncement(
110
+ completedTabs: Set<string>,
111
+ totalRequiredTabs: number
112
+ ) {
113
+ const completedCount = completedTabs.size;
114
+ const progressMessage = `${completedCount} de ${totalRequiredTabs} seções obrigatórias completas`;
115
+
116
+ return progressMessage;
117
+ }
@@ -0,0 +1,66 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import * as AccordionPrimitive from "@radix-ui/react-accordion"
5
+ import { ChevronDownIcon } from "lucide-react"
6
+
7
+ import { cn } from "@/lib/utils"
8
+
9
+ function Accordion({
10
+ ...props
11
+ }: React.ComponentProps<typeof AccordionPrimitive.Root>) {
12
+ return <AccordionPrimitive.Root data-slot="accordion" {...props} />
13
+ }
14
+
15
+ function AccordionItem({
16
+ className,
17
+ ...props
18
+ }: React.ComponentProps<typeof AccordionPrimitive.Item>) {
19
+ return (
20
+ <AccordionPrimitive.Item
21
+ data-slot="accordion-item"
22
+ className={cn("border-b last:border-b-0", className)}
23
+ {...props}
24
+ />
25
+ )
26
+ }
27
+
28
+ function AccordionTrigger({
29
+ className,
30
+ children,
31
+ ...props
32
+ }: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
33
+ return (
34
+ <AccordionPrimitive.Header className="flex">
35
+ <AccordionPrimitive.Trigger
36
+ data-slot="accordion-trigger"
37
+ className={cn(
38
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 cursor-pointer items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
39
+ className
40
+ )}
41
+ {...props}
42
+ >
43
+ {children}
44
+ <ChevronDownIcon className="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" />
45
+ </AccordionPrimitive.Trigger>
46
+ </AccordionPrimitive.Header>
47
+ )
48
+ }
49
+
50
+ function AccordionContent({
51
+ className,
52
+ children,
53
+ ...props
54
+ }: React.ComponentProps<typeof AccordionPrimitive.Content>) {
55
+ return (
56
+ <AccordionPrimitive.Content
57
+ data-slot="accordion-content"
58
+ className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
59
+ {...props}
60
+ >
61
+ <div className={cn("pt-0 pb-4", className)}>{children}</div>
62
+ </AccordionPrimitive.Content>
63
+ )
64
+ }
65
+
66
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }