@iclips/ui 1.0.6 → 1.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.
- package/dist/index.cjs +11 -8088
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -8973
- package/dist/index.d.ts +1 -1797
- package/dist/index.js +4760 -4512
- package/dist/index.js.map +1 -1
- package/package.json +119 -103
- package/LICENSE +0 -21
- package/README.md +0 -480
- package/dist/index.d.cts +0 -1797
package/README.md
DELETED
|
@@ -1,480 +0,0 @@
|
|
|
1
|
-
# 🎨 @iclips/ui - Design System
|
|
2
|
-
|
|
3
|
-
> Sistema de design completo e profissional com paleta personalizada (#7F26BF) e 47 componentes shadcn/ui prontos para uso.
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/@iclips/ui)
|
|
6
|
-
[](https://opensource.org/licenses/MIT)
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## 📦 Instalação
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
npm install @iclips/ui
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
**Peer Dependencies** (instale também):
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
npm install react react-dom tailwindcss lucide-react
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## 🚀 Quick Start
|
|
25
|
-
|
|
26
|
-
### 1. Importar CSS Global
|
|
27
|
-
|
|
28
|
-
```tsx
|
|
29
|
-
// main.tsx ou App.tsx
|
|
30
|
-
import "@iclips/ui/styles";
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
### 2. Configurar Tailwind
|
|
34
|
-
|
|
35
|
-
```js
|
|
36
|
-
// tailwind.config.js
|
|
37
|
-
export default {
|
|
38
|
-
content: [
|
|
39
|
-
"./src/**/*.{js,ts,jsx,tsx}",
|
|
40
|
-
"./node_modules/@iclips/ui/dist/**/*.js",
|
|
41
|
-
],
|
|
42
|
-
theme: {
|
|
43
|
-
extend: {},
|
|
44
|
-
},
|
|
45
|
-
plugins: [],
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### 3. Usar Componentes
|
|
50
|
-
|
|
51
|
-
```tsx
|
|
52
|
-
import { Button, Card, CardHeader, CardTitle, CardContent, Badge } from "@iclips/ui";
|
|
53
|
-
import { Mail } from "lucide-react";
|
|
54
|
-
|
|
55
|
-
export default function App() {
|
|
56
|
-
return (
|
|
57
|
-
<Card>
|
|
58
|
-
<CardHeader>
|
|
59
|
-
<CardTitle>Bem-vindo!</CardTitle>
|
|
60
|
-
</CardHeader>
|
|
61
|
-
<CardContent>
|
|
62
|
-
<Button>
|
|
63
|
-
<Mail className="w-4 h-4 mr-2" />
|
|
64
|
-
Entre em Contato
|
|
65
|
-
</Button>
|
|
66
|
-
<Badge variant="default">Novo</Badge>
|
|
67
|
-
</CardContent>
|
|
68
|
-
</Card>
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## 🧩 Componentes Disponíveis
|
|
76
|
-
|
|
77
|
-
Este design system inclui **47+ componentes shadcn/ui** + **6 componentes customizados**:
|
|
78
|
-
|
|
79
|
-
### 🎨 Custom Components (Além do shadcn/ui)
|
|
80
|
-
|
|
81
|
-
Componentes desenvolvidos especificamente para este design system:
|
|
82
|
-
|
|
83
|
-
- **`UnderlineTabs`**, `UnderlineTabsList`, `UnderlineTabsTrigger`, `UnderlineTabsContent` - Navegação estilo underline para páginas principais
|
|
84
|
-
- **`ColorPicker`** - Seletor de cores avançado com suporte a RGB, HEX e HSL
|
|
85
|
-
- **`DateTimePicker`** - Seletor de data e hora combinado
|
|
86
|
-
- **`DateRangePicker`** - Seletor de intervalo de datas
|
|
87
|
-
- **`TimePicker`** - Seletor de horário independente
|
|
88
|
-
- **`KanbanCard`** - Card profissional para boards Kanban com suporte a drag & drop
|
|
89
|
-
|
|
90
|
-
> 💡 **Diferença entre Tabs:** Use `<Tabs>` para switches inline (filtros, settings). Use `<UnderlineTabs>` para navegação de página (dashboard, seções principais).
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
### Layout
|
|
95
|
-
- `Card`, `CardContent`, `CardHeader`, `CardTitle`, `CardDescription`, `CardFooter`
|
|
96
|
-
- `Separator`
|
|
97
|
-
- `Tabs`, `TabsContent`, `TabsList`, `TabsTrigger`
|
|
98
|
-
- `Sheet`, `SheetContent`, `SheetHeader`, `SheetTitle`, `SheetTrigger`
|
|
99
|
-
- `Sidebar`, `SidebarContent`, `SidebarProvider`, `SidebarMenu`, `SidebarTrigger`
|
|
100
|
-
- `AspectRatio`
|
|
101
|
-
- `ScrollArea`, `ScrollBar`
|
|
102
|
-
- `Resizable`, `ResizablePanel`, `ResizablePanelGroup`
|
|
103
|
-
|
|
104
|
-
### Forms
|
|
105
|
-
- `Button`
|
|
106
|
-
- `Input`
|
|
107
|
-
- `Label`
|
|
108
|
-
- `Checkbox`
|
|
109
|
-
- `RadioGroup`, `RadioGroupItem`
|
|
110
|
-
- `Select`, `SelectContent`, `SelectItem`, `SelectTrigger`, `SelectValue`
|
|
111
|
-
- `Textarea`
|
|
112
|
-
- `Switch`
|
|
113
|
-
- `Slider`
|
|
114
|
-
- `Form`, `FormField`, `FormItem`, `FormLabel`, `FormControl`, `FormMessage`
|
|
115
|
-
- `InputOTP`, `InputOTPGroup`, `InputOTPSlot`
|
|
116
|
-
- `Calendar`
|
|
117
|
-
|
|
118
|
-
### Navigation
|
|
119
|
-
- `Breadcrumb`, `BreadcrumbItem`, `BreadcrumbLink`, `BreadcrumbList`
|
|
120
|
-
- `NavigationMenu`, `NavigationMenuItem`, `NavigationMenuList`, `NavigationMenuTrigger`
|
|
121
|
-
- `Menubar`, `MenubarMenu`, `MenubarTrigger`, `MenubarContent`, `MenubarItem`
|
|
122
|
-
- `ContextMenu`, `ContextMenuItem`, `ContextMenuTrigger`
|
|
123
|
-
- `DropdownMenu`, `DropdownMenuItem`, `DropdownMenuTrigger`, `DropdownMenuContent`
|
|
124
|
-
- `Command`, `CommandInput`, `CommandList`, `CommandItem`
|
|
125
|
-
- `Pagination`, `PaginationContent`, `PaginationItem`, `PaginationLink`
|
|
126
|
-
|
|
127
|
-
### Feedback
|
|
128
|
-
- `Alert`, `AlertTitle`, `AlertDescription`
|
|
129
|
-
- `AlertDialog`, `AlertDialogAction`, `AlertDialogCancel`, `AlertDialogContent`
|
|
130
|
-
- `Dialog`, `DialogContent`, `DialogHeader`, `DialogTitle`, `DialogTrigger`
|
|
131
|
-
- `Drawer`, `DrawerContent`, `DrawerHeader`, `DrawerTrigger`
|
|
132
|
-
- `Badge`
|
|
133
|
-
- `Progress`
|
|
134
|
-
- `Skeleton`
|
|
135
|
-
- `Sonner` (Toast), `toast`
|
|
136
|
-
- `Tooltip`, `TooltipContent`, `TooltipProvider`, `TooltipTrigger`
|
|
137
|
-
|
|
138
|
-
### Data Display
|
|
139
|
-
- `Table`, `TableBody`, `TableCaption`, `TableCell`, `TableHead`, `TableHeader`, `TableRow`
|
|
140
|
-
- `Avatar`, `AvatarFallback`, `AvatarImage`
|
|
141
|
-
- `HoverCard`, `HoverCardContent`, `HoverCardTrigger`
|
|
142
|
-
- `Accordion`, `AccordionContent`, `AccordionItem`, `AccordionTrigger`
|
|
143
|
-
- `Collapsible`, `CollapsibleContent`, `CollapsibleTrigger`
|
|
144
|
-
- `Carousel`, `CarouselContent`, `CarouselItem`, `CarouselNext`, `CarouselPrevious`
|
|
145
|
-
- `Chart` (Recharts)
|
|
146
|
-
|
|
147
|
-
### Utilities
|
|
148
|
-
- `Toggle`, `ToggleGroup`
|
|
149
|
-
- `Popover`, `PopoverContent`, `PopoverTrigger`
|
|
150
|
-
- `cn` (função para merge de classes)
|
|
151
|
-
- `useIsMobile` (hook para detecção mobile)
|
|
152
|
-
- `ImageWithFallback`
|
|
153
|
-
|
|
154
|
-
---
|
|
155
|
-
|
|
156
|
-
## 🎨 Paleta de Cores
|
|
157
|
-
|
|
158
|
-
O design system usa uma paleta customizada com a cor primária **#7F26BF** (roxo):
|
|
159
|
-
|
|
160
|
-
```css
|
|
161
|
-
/* Automaticamente incluído ao importar os estilos */
|
|
162
|
-
:root {
|
|
163
|
-
--color-primary: #7F26BF;
|
|
164
|
-
--color-primary-foreground: #FFFFFF;
|
|
165
|
-
/* + mais tokens de cor... */
|
|
166
|
-
}
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
**Usar em componentes**:
|
|
170
|
-
|
|
171
|
-
```tsx
|
|
172
|
-
<Button variant="default">Roxo Primário</Button>
|
|
173
|
-
<Badge variant="default">Badge Roxa</Badge>
|
|
174
|
-
<div className="bg-primary text-primary-foreground">Texto com fundo roxo</div>
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
## 📖 Variantes de Componentes
|
|
180
|
-
|
|
181
|
-
### Button
|
|
182
|
-
|
|
183
|
-
```tsx
|
|
184
|
-
import { Button } from "@iclips/ui";
|
|
185
|
-
|
|
186
|
-
<Button variant="default">Padrão</Button>
|
|
187
|
-
<Button variant="destructive">Destrutivo</Button>
|
|
188
|
-
<Button variant="outline">Contorno</Button>
|
|
189
|
-
<Button variant="secondary">Secundário</Button>
|
|
190
|
-
<Button variant="ghost">Fantasma</Button>
|
|
191
|
-
<Button variant="link">Link</Button>
|
|
192
|
-
|
|
193
|
-
// Tamanhos
|
|
194
|
-
<Button size="default">Padrão</Button>
|
|
195
|
-
<Button size="sm">Pequeno</Button>
|
|
196
|
-
<Button size="lg">Grande</Button>
|
|
197
|
-
<Button size="icon">Ícone</Button>
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### Badge
|
|
201
|
-
|
|
202
|
-
```tsx
|
|
203
|
-
import { Badge } from "@iclips/ui";
|
|
204
|
-
|
|
205
|
-
<Badge variant="default">Padrão</Badge>
|
|
206
|
-
<Badge variant="secondary">Secundário</Badge>
|
|
207
|
-
<Badge variant="destructive">Destrutivo</Badge>
|
|
208
|
-
<Badge variant="outline">Contorno</Badge>
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
### Alert
|
|
212
|
-
|
|
213
|
-
```tsx
|
|
214
|
-
import { Alert, AlertTitle, AlertDescription } from "@iclips/ui";
|
|
215
|
-
|
|
216
|
-
<Alert variant="default">
|
|
217
|
-
<AlertTitle>Info</AlertTitle>
|
|
218
|
-
<AlertDescription>Mensagem informativa</AlertDescription>
|
|
219
|
-
</Alert>
|
|
220
|
-
|
|
221
|
-
<Alert variant="destructive">
|
|
222
|
-
<AlertTitle>Erro</AlertTitle>
|
|
223
|
-
<AlertDescription>Algo deu errado</AlertDescription>
|
|
224
|
-
</Alert>
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
---
|
|
228
|
-
|
|
229
|
-
## 💡 Exemplos de Uso
|
|
230
|
-
|
|
231
|
-
### Dashboard com Sidebar
|
|
232
|
-
|
|
233
|
-
```tsx
|
|
234
|
-
import {
|
|
235
|
-
SidebarProvider,
|
|
236
|
-
Sidebar,
|
|
237
|
-
SidebarContent,
|
|
238
|
-
SidebarMenu,
|
|
239
|
-
SidebarMenuItem,
|
|
240
|
-
SidebarMenuButton,
|
|
241
|
-
Card,
|
|
242
|
-
CardHeader,
|
|
243
|
-
CardTitle,
|
|
244
|
-
CardContent,
|
|
245
|
-
} from "@iclips/ui";
|
|
246
|
-
import { Home, Users, Settings } from "lucide-react";
|
|
247
|
-
|
|
248
|
-
export default function Dashboard() {
|
|
249
|
-
return (
|
|
250
|
-
<SidebarProvider>
|
|
251
|
-
<div className="flex min-h-screen">
|
|
252
|
-
<Sidebar>
|
|
253
|
-
<SidebarContent>
|
|
254
|
-
<SidebarMenu>
|
|
255
|
-
<SidebarMenuItem>
|
|
256
|
-
<SidebarMenuButton>
|
|
257
|
-
<Home className="w-4 h-4" />
|
|
258
|
-
<span>Início</span>
|
|
259
|
-
</SidebarMenuButton>
|
|
260
|
-
</SidebarMenuItem>
|
|
261
|
-
<SidebarMenuItem>
|
|
262
|
-
<SidebarMenuButton>
|
|
263
|
-
<Users className="w-4 h-4" />
|
|
264
|
-
<span>Usuários</span>
|
|
265
|
-
</SidebarMenuButton>
|
|
266
|
-
</SidebarMenuItem>
|
|
267
|
-
<SidebarMenuItem>
|
|
268
|
-
<SidebarMenuButton>
|
|
269
|
-
<Settings className="w-4 h-4" />
|
|
270
|
-
<span>Configurações</span>
|
|
271
|
-
</SidebarMenuButton>
|
|
272
|
-
</SidebarMenuItem>
|
|
273
|
-
</SidebarMenu>
|
|
274
|
-
</SidebarContent>
|
|
275
|
-
</Sidebar>
|
|
276
|
-
|
|
277
|
-
<main className="flex-1 p-6">
|
|
278
|
-
<Card>
|
|
279
|
-
<CardHeader>
|
|
280
|
-
<CardTitle>Dashboard</CardTitle>
|
|
281
|
-
</CardHeader>
|
|
282
|
-
<CardContent>
|
|
283
|
-
<p>Conteúdo do dashboard aqui</p>
|
|
284
|
-
</CardContent>
|
|
285
|
-
</Card>
|
|
286
|
-
</main>
|
|
287
|
-
</div>
|
|
288
|
-
</SidebarProvider>
|
|
289
|
-
);
|
|
290
|
-
}
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
### Formulário com Validação
|
|
294
|
-
|
|
295
|
-
```tsx
|
|
296
|
-
import {
|
|
297
|
-
Form,
|
|
298
|
-
FormField,
|
|
299
|
-
FormItem,
|
|
300
|
-
FormLabel,
|
|
301
|
-
FormControl,
|
|
302
|
-
FormMessage,
|
|
303
|
-
Input,
|
|
304
|
-
Button,
|
|
305
|
-
Card,
|
|
306
|
-
CardHeader,
|
|
307
|
-
CardTitle,
|
|
308
|
-
CardContent,
|
|
309
|
-
} from "@iclips/ui";
|
|
310
|
-
import { useForm } from "react-hook-form";
|
|
311
|
-
|
|
312
|
-
export default function LoginForm() {
|
|
313
|
-
const form = useForm();
|
|
314
|
-
|
|
315
|
-
return (
|
|
316
|
-
<Card className="w-96">
|
|
317
|
-
<CardHeader>
|
|
318
|
-
<CardTitle>Login</CardTitle>
|
|
319
|
-
</CardHeader>
|
|
320
|
-
<CardContent>
|
|
321
|
-
<Form {...form}>
|
|
322
|
-
<form className="space-y-4">
|
|
323
|
-
<FormField
|
|
324
|
-
name="email"
|
|
325
|
-
render={({ field }) => (
|
|
326
|
-
<FormItem>
|
|
327
|
-
<FormLabel>Email</FormLabel>
|
|
328
|
-
<FormControl>
|
|
329
|
-
<Input placeholder="seu@email.com" {...field} />
|
|
330
|
-
</FormControl>
|
|
331
|
-
<FormMessage />
|
|
332
|
-
</FormItem>
|
|
333
|
-
)}
|
|
334
|
-
/>
|
|
335
|
-
<FormField
|
|
336
|
-
name="password"
|
|
337
|
-
render={({ field }) => (
|
|
338
|
-
<FormItem>
|
|
339
|
-
<FormLabel>Senha</FormLabel>
|
|
340
|
-
<FormControl>
|
|
341
|
-
<Input type="password" {...field} />
|
|
342
|
-
</FormControl>
|
|
343
|
-
<FormMessage />
|
|
344
|
-
</FormItem>
|
|
345
|
-
)}
|
|
346
|
-
/>
|
|
347
|
-
<Button type="submit" className="w-full">
|
|
348
|
-
Entrar
|
|
349
|
-
</Button>
|
|
350
|
-
</form>
|
|
351
|
-
</Form>
|
|
352
|
-
</CardContent>
|
|
353
|
-
</Card>
|
|
354
|
-
);
|
|
355
|
-
}
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
### Tabela de Dados
|
|
359
|
-
|
|
360
|
-
```tsx
|
|
361
|
-
import {
|
|
362
|
-
Table,
|
|
363
|
-
TableBody,
|
|
364
|
-
TableCaption,
|
|
365
|
-
TableCell,
|
|
366
|
-
TableHead,
|
|
367
|
-
TableHeader,
|
|
368
|
-
TableRow,
|
|
369
|
-
Card,
|
|
370
|
-
Badge,
|
|
371
|
-
Avatar,
|
|
372
|
-
AvatarFallback,
|
|
373
|
-
} from "@iclips/ui";
|
|
374
|
-
|
|
375
|
-
const users = [
|
|
376
|
-
{ id: 1, name: "João Silva", role: "Admin", status: "Ativo" },
|
|
377
|
-
{ id: 2, name: "Maria Santos", role: "Editor", status: "Ativo" },
|
|
378
|
-
{ id: 3, name: "Pedro Costa", role: "Viewer", status: "Inativo" },
|
|
379
|
-
];
|
|
380
|
-
|
|
381
|
-
export default function UsersTable() {
|
|
382
|
-
return (
|
|
383
|
-
<Card>
|
|
384
|
-
<Table>
|
|
385
|
-
<TableCaption>Lista de usuários do sistema</TableCaption>
|
|
386
|
-
<TableHeader>
|
|
387
|
-
<TableRow>
|
|
388
|
-
<TableHead>Usuário</TableHead>
|
|
389
|
-
<TableHead>Papel</TableHead>
|
|
390
|
-
<TableHead>Status</TableHead>
|
|
391
|
-
</TableRow>
|
|
392
|
-
</TableHeader>
|
|
393
|
-
<TableBody>
|
|
394
|
-
{users.map((user) => (
|
|
395
|
-
<TableRow key={user.id}>
|
|
396
|
-
<TableCell>
|
|
397
|
-
<div className="flex items-center gap-2">
|
|
398
|
-
<Avatar>
|
|
399
|
-
<AvatarFallback>{user.name.charAt(0)}</AvatarFallback>
|
|
400
|
-
</Avatar>
|
|
401
|
-
{user.name}
|
|
402
|
-
</div>
|
|
403
|
-
</TableCell>
|
|
404
|
-
<TableCell>{user.role}</TableCell>
|
|
405
|
-
<TableCell>
|
|
406
|
-
<Badge variant={user.status === "Ativo" ? "default" : "secondary"}>
|
|
407
|
-
{user.status}
|
|
408
|
-
</Badge>
|
|
409
|
-
</TableCell>
|
|
410
|
-
</TableRow>
|
|
411
|
-
))}
|
|
412
|
-
</TableBody>
|
|
413
|
-
</Table>
|
|
414
|
-
</Card>
|
|
415
|
-
);
|
|
416
|
-
}
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
---
|
|
420
|
-
|
|
421
|
-
## 🎯 TypeScript
|
|
422
|
-
|
|
423
|
-
Tipos completos incluídos:
|
|
424
|
-
|
|
425
|
-
```tsx
|
|
426
|
-
import { Button, type ButtonProps } from "@iclips/ui";
|
|
427
|
-
|
|
428
|
-
const CustomButton = (props: ButtonProps) => {
|
|
429
|
-
return <Button {...props} />;
|
|
430
|
-
};
|
|
431
|
-
```
|
|
432
|
-
|
|
433
|
-
---
|
|
434
|
-
|
|
435
|
-
## 🛠️ Desenvolvimento Local
|
|
436
|
-
|
|
437
|
-
Para testar o pacote localmente antes de publicar:
|
|
438
|
-
|
|
439
|
-
```bash
|
|
440
|
-
# No design-system/
|
|
441
|
-
npm link
|
|
442
|
-
|
|
443
|
-
# No projeto que vai consumir/
|
|
444
|
-
npm link @iclips/ui
|
|
445
|
-
```
|
|
446
|
-
|
|
447
|
-
---
|
|
448
|
-
|
|
449
|
-
## 📄 Licença
|
|
450
|
-
|
|
451
|
-
MIT © [Seu Nome]
|
|
452
|
-
|
|
453
|
-
---
|
|
454
|
-
|
|
455
|
-
## 🤝 Contribuindo
|
|
456
|
-
|
|
457
|
-
Contribuições são bem-vindas! Abra uma issue ou pull request.
|
|
458
|
-
|
|
459
|
-
---
|
|
460
|
-
|
|
461
|
-
## 📞 Suporte
|
|
462
|
-
|
|
463
|
-
- **Issues**: [GitHub Issues](https://github.com/seu-usuario/design-system/issues)
|
|
464
|
-
- **Documentação**: [Ver documentação completa](#)
|
|
465
|
-
- **Email**: seu@email.com
|
|
466
|
-
|
|
467
|
-
---
|
|
468
|
-
|
|
469
|
-
## 🎉 Créditos
|
|
470
|
-
|
|
471
|
-
Construído com:
|
|
472
|
-
- [React](https://react.dev/)
|
|
473
|
-
- [Tailwind CSS](https://tailwindcss.com/)
|
|
474
|
-
- [shadcn/ui](https://ui.shadcn.com/)
|
|
475
|
-
- [Radix UI](https://www.radix-ui.com/)
|
|
476
|
-
- [Lucide Icons](https://lucide.dev/)
|
|
477
|
-
|
|
478
|
-
---
|
|
479
|
-
|
|
480
|
-
**Desenvolvido com ❤️ para facilitar a criação de interfaces consistentes e profissionais.**
|