@giro-ds/react 1.0.0 → 1.0.2
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 +123 -0
- package/dist/components/Table/TableHeader.d.ts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# @giro-ds/react
|
|
2
|
+
|
|
3
|
+
Biblioteca de componentes React do Zanthus Design System. Uma coleção completa de componentes acessíveis, responsivos e prontos para produção.
|
|
4
|
+
|
|
5
|
+
## 📦 Instalação
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @giro-ds/react
|
|
9
|
+
# ou
|
|
10
|
+
yarn add @giro-ds/react
|
|
11
|
+
# ou
|
|
12
|
+
pnpm add @giro-ds/react
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## 🚀 Uso
|
|
16
|
+
|
|
17
|
+
### Importação de Componentes
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
import { Button, Dialog, Avatar, Badge } from '@giro-ds/react';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### ⚠️ Importação dos Estilos (Obrigatório)
|
|
24
|
+
|
|
25
|
+
**É necessário importar os estilos globalmente no seu projeto:**
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import '@giro-ds/react/dist/styles.css';
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Recomendamos adicionar esta importação no arquivo principal da sua aplicação (ex: `App.tsx`, `main.tsx`, `index.tsx`, ou `_app.tsx`).
|
|
32
|
+
|
|
33
|
+
### Exemplo Completo
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
// App.tsx
|
|
37
|
+
import '@giro-ds/react/dist/styles.css'; // Importação obrigatória dos estilos
|
|
38
|
+
import { Button, Dialog } from '@giro-ds/react';
|
|
39
|
+
|
|
40
|
+
function App() {
|
|
41
|
+
return (
|
|
42
|
+
<div>
|
|
43
|
+
<Button variant="primary" size="md">
|
|
44
|
+
Clique aqui
|
|
45
|
+
</Button>
|
|
46
|
+
|
|
47
|
+
<Dialog
|
|
48
|
+
isOpen={true}
|
|
49
|
+
title="Meu Dialog"
|
|
50
|
+
onClose={() => console.log('Fechado')}
|
|
51
|
+
>
|
|
52
|
+
Conteúdo do dialog
|
|
53
|
+
</Dialog>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default App;
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## 📚 Componentes Disponíveis
|
|
62
|
+
|
|
63
|
+
### Formulários e Inputs
|
|
64
|
+
- **Checkbox** - Caixa de seleção padrão
|
|
65
|
+
- **CheckboxRadix** - Caixa de seleção com Radix UI
|
|
66
|
+
- **Radio** - Botão de opção padrão
|
|
67
|
+
- **RadioRadix** - Botão de opção com Radix UI
|
|
68
|
+
- **TextField** - Campo de texto
|
|
69
|
+
- **Select** - Seletor padrão
|
|
70
|
+
- **SelectField** - Campo de seleção
|
|
71
|
+
- **SelectRadix** - Seletor com Radix UI
|
|
72
|
+
- **DatePicker** - Seletor de data
|
|
73
|
+
- **Calendar** - Calendário
|
|
74
|
+
- **Search** - Campo de busca
|
|
75
|
+
- **Quantity** - Seletor de quantidade
|
|
76
|
+
- **VerificationCode** - Campo de código de verificação
|
|
77
|
+
|
|
78
|
+
### Navegação e Layout
|
|
79
|
+
- **Button** - Botão
|
|
80
|
+
- **Menu** - Menu padrão
|
|
81
|
+
- **MenuRadix** - Menu com Radix UI
|
|
82
|
+
- **Dropdown** - Menu suspenso
|
|
83
|
+
- **Container** - Container de layout
|
|
84
|
+
- **ListItem** - Item de lista
|
|
85
|
+
|
|
86
|
+
### Feedback e Informação
|
|
87
|
+
- **Dialog** - Caixa de diálogo/modal
|
|
88
|
+
- **Drawer** - Painel lateral
|
|
89
|
+
- **Toast** - Notificação toast
|
|
90
|
+
- **Tooltip** - Dica de ferramenta
|
|
91
|
+
- **Callout** - Caixa de destaque/alerta
|
|
92
|
+
- **Badge** - Etiqueta/selo
|
|
93
|
+
- **Avatar** - Avatar de usuário
|
|
94
|
+
|
|
95
|
+
### Dados e Tabelas
|
|
96
|
+
- **Table** - Tabela de dados
|
|
97
|
+
- **Filter** - Filtro de dados
|
|
98
|
+
- **Chips** - Chips/tags
|
|
99
|
+
|
|
100
|
+
## 🔧 Requisitos
|
|
101
|
+
|
|
102
|
+
- React ^18.0.0
|
|
103
|
+
- React DOM ^18.0.0
|
|
104
|
+
|
|
105
|
+
## 📖 Documentação
|
|
106
|
+
|
|
107
|
+
Para documentação completa, exemplos interativos e guias de uso, consulte o Storybook do projeto.
|
|
108
|
+
|
|
109
|
+
## 🎨 Integração com Tokens
|
|
110
|
+
|
|
111
|
+
Este pacote utiliza os design tokens do `@giro-ds/tokens`. Os estilos dos componentes já estão configurados com os tokens do sistema.
|
|
112
|
+
|
|
113
|
+
## 🌐 Internacionalização
|
|
114
|
+
|
|
115
|
+
Alguns componentes possuem suporte a i18n (internacionalização), especialmente o componente Calendar, que utiliza `i18next` e `react-i18next`.
|
|
116
|
+
|
|
117
|
+
## 📄 Licença
|
|
118
|
+
|
|
119
|
+
Consulte o arquivo LICENSE na raiz do projeto.
|
|
120
|
+
|
|
121
|
+
## 🤝 Contribuindo
|
|
122
|
+
|
|
123
|
+
Consulte o arquivo CONTRIBUTING.md na raiz do projeto para diretrizes de contribuição.
|
package/dist/index.cjs
CHANGED
|
@@ -6829,7 +6829,7 @@ const TableHeader = ({ searchValue = '', onSearchChange, onSearch, searchPlaceho
|
|
|
6829
6829
|
onClose: () => filterItem.onToggle?.(false),
|
|
6830
6830
|
};
|
|
6831
6831
|
if (isCalendarFilter(filterItem)) {
|
|
6832
|
-
return (jsxRuntime.jsx(Filter, { ...commonProps, type: "calendar", selectedDate: filterItem.selectedDate, onDateSelect: filterItem.onDateSelect, minDate: filterItem.minDate, maxDate: filterItem.maxDate, placeholder: filterItem.placeholder }));
|
|
6832
|
+
return (jsxRuntime.jsx(Filter, { ...commonProps, type: "calendar", selectedDate: filterItem.selectedDate, onDateSelect: filterItem.onDateSelect, onClearDate: filterItem.onClear, minDate: filterItem.minDate, maxDate: filterItem.maxDate, placeholder: filterItem.placeholder }));
|
|
6833
6833
|
}
|
|
6834
6834
|
if (isCheckboxFilter(filterItem)) {
|
|
6835
6835
|
return (jsxRuntime.jsx(Filter, { ...commonProps, type: filterItem.type, items: filterItem.items, selectedIds: filterItem.selectedIds, onApplyFilter: filterItem.onSelectionChange, placeholder: filterItem.placeholder, enableSearch: filterItem.enableSearch }));
|