rharuow-ds 1.1.0 → 1.1.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 +91 -40
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# rharuo## 🌟 Características
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
- ⚛️ **React 18+** com TypeScript
|
|
4
|
+
- 🧩 **9 componentes** prontos para uso (Input, Textarea, Select, AsyncSelect, MultiSelect, MultiAsyncSelect, RadioGroup, Button, Card)
|
|
5
|
+
- 🔗 **Integração nativa** com React Hook Form
|
|
6
|
+
- 🎨 **Customização via CSS Variables** - Mude o tema facilmente
|
|
7
|
+
- 🎯 **Componentes acessíveis** (ARIA)
|
|
8
|
+
- 📱 **Responsivo** por padrão
|
|
9
|
+
- 🎭 **Animações suaves** e modernas
|
|
10
|
+
- 📚 **Documentação interativa** com StorybookNPM Version](https://img.shields.io/npm/v/rharuow-ds)](https://www.npmjs.com/package/rharuow-ds)
|
|
4
11
|
[](https://opensource.org/licenses/MIT)
|
|
5
12
|
[](https://github.com/Rharuow/rharuow-ds-docs/actions)
|
|
6
13
|
|
|
@@ -63,6 +70,7 @@ npm install react-hook-form
|
|
|
63
70
|
|
|
64
71
|
```tsx
|
|
65
72
|
import {
|
|
73
|
+
Card,
|
|
66
74
|
Button,
|
|
67
75
|
Input,
|
|
68
76
|
Textarea,
|
|
@@ -75,6 +83,21 @@ npm install react-hook-form
|
|
|
75
83
|
function App() {
|
|
76
84
|
return (
|
|
77
85
|
<div>
|
|
86
|
+
{/* Exemplo básico do Card */}
|
|
87
|
+
<Card variant="default">
|
|
88
|
+
<Card.Header>
|
|
89
|
+
<h3>Título do Card</h3>
|
|
90
|
+
<p>Subtítulo ou descrição</p>
|
|
91
|
+
</Card.Header>
|
|
92
|
+
<Card.Body>
|
|
93
|
+
<p>Conteúdo principal do card</p>
|
|
94
|
+
</Card.Body>
|
|
95
|
+
<Card.Footer>
|
|
96
|
+
<Button>Ação Principal</Button>
|
|
97
|
+
</Card.Footer>
|
|
98
|
+
</Card>
|
|
99
|
+
|
|
100
|
+
{/* Outros componentes */}
|
|
78
101
|
<Input label="E-mail" name="email" type="email" />
|
|
79
102
|
<Input label="Senha" name="password" type="password" />
|
|
80
103
|
<Textarea label="Comentários" name="comments" rows={4} />
|
|
@@ -106,12 +129,14 @@ npm install react-hook-form
|
|
|
106
129
|
```tsx
|
|
107
130
|
import { useForm, FormProvider } from "react-hook-form";
|
|
108
131
|
import {
|
|
132
|
+
Card,
|
|
109
133
|
Input,
|
|
110
134
|
Textarea,
|
|
111
135
|
Select,
|
|
112
136
|
AsyncSelect,
|
|
113
137
|
MultiAsyncSelect,
|
|
114
138
|
RadioGroup,
|
|
139
|
+
Button,
|
|
115
140
|
} from "rharuow-ds";
|
|
116
141
|
|
|
117
142
|
function FormExample() {
|
|
@@ -134,43 +159,57 @@ npm install react-hook-form
|
|
|
134
159
|
};
|
|
135
160
|
|
|
136
161
|
return (
|
|
137
|
-
<
|
|
138
|
-
<
|
|
139
|
-
<
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
<
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
162
|
+
<Card variant="default" size="lg">
|
|
163
|
+
<Card.Header>
|
|
164
|
+
<h2>Formulário de Cadastro</h2>
|
|
165
|
+
<p>Preencha os dados abaixo</p>
|
|
166
|
+
</Card.Header>
|
|
167
|
+
|
|
168
|
+
<Card.Body>
|
|
169
|
+
<FormProvider {...methods}>
|
|
170
|
+
<form onSubmit={methods.handleSubmit(console.log)}>
|
|
171
|
+
<Input label="Nome" name="name" />
|
|
172
|
+
<Input label="E-mail" name="email" type="email" />
|
|
173
|
+
<Input label="Senha" name="password" type="password" />
|
|
174
|
+
<Textarea label="Observações" name="notes" rows={3} />
|
|
175
|
+
|
|
176
|
+
<AsyncSelect
|
|
177
|
+
label="País"
|
|
178
|
+
name="country"
|
|
179
|
+
loadOptions={loadCountries}
|
|
180
|
+
searchable
|
|
181
|
+
isClearable
|
|
182
|
+
/>
|
|
183
|
+
|
|
184
|
+
<MultiAsyncSelect
|
|
185
|
+
label="Países favoritos"
|
|
186
|
+
name="favoriteCountries"
|
|
187
|
+
loadOptions={loadCountries}
|
|
188
|
+
searchable
|
|
189
|
+
isClearable
|
|
190
|
+
maxVisibleItems={2}
|
|
191
|
+
/>
|
|
192
|
+
|
|
193
|
+
<RadioGroup
|
|
194
|
+
label="Tamanho"
|
|
195
|
+
name="size"
|
|
196
|
+
options={[
|
|
197
|
+
{ label: "Pequeno", value: "sm" },
|
|
198
|
+
{ label: "Médio", value: "md" },
|
|
199
|
+
{ label: "Grande", value: "lg" },
|
|
200
|
+
]}
|
|
201
|
+
/>
|
|
202
|
+
</form>
|
|
203
|
+
</FormProvider>
|
|
204
|
+
</Card.Body>
|
|
205
|
+
|
|
206
|
+
<Card.Footer>
|
|
207
|
+
<div className="flex space-x-2">
|
|
208
|
+
<Button variant="outline">Cancelar</Button>
|
|
209
|
+
<Button type="submit">Enviar</Button>
|
|
210
|
+
</div>
|
|
211
|
+
</Card.Footer>
|
|
212
|
+
</Card>
|
|
174
213
|
);
|
|
175
214
|
}
|
|
176
215
|
```
|
|
@@ -179,7 +218,19 @@ npm install react-hook-form
|
|
|
179
218
|
|
|
180
219
|
## Componentes Disponíveis
|
|
181
220
|
|
|
182
|
-
###
|
|
221
|
+
### � **Card**
|
|
222
|
+
|
|
223
|
+
Componente flexível para exibir conteúdo organizado em seções:
|
|
224
|
+
|
|
225
|
+
- ✅ **Estrutura modular**: Header, Body e Footer independentes
|
|
226
|
+
- ✅ **Múltiplas variantes**: default, outlined, elevated, flat
|
|
227
|
+
- ✅ **Tamanhos configuráveis**: sm, md, lg
|
|
228
|
+
- ✅ **Suporte ao tema dark**: Variáveis CSS para light/dark mode
|
|
229
|
+
- ✅ **Elementos semânticos**: Props `as` para acessibilidade (header, main, footer)
|
|
230
|
+
- ✅ **Flexibilidade total**: Use apenas as seções necessárias
|
|
231
|
+
- ✅ **Customização completa**: Padding, bordas arredondadas e estilos
|
|
232
|
+
|
|
233
|
+
### �🎯 **Button**
|
|
183
234
|
|
|
184
235
|
Botão customizável com diferentes variantes e tamanhos.
|
|
185
236
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rharuow-ds",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Modern React Design System with 9 components: Card (Header, Body, Footer), Button, Input (with password support), Textarea, Select, AsyncSelect, MultiSelect, MultiAsyncSelect, and RadioGroup. Full React Hook Form integration, Tailwind CSS styling, CSS Variables for theme customization and dark mode support.",
|
|
5
5
|
"main": "dist/rharuow-ds.cjs.js",
|
|
6
6
|
"module": "dist/rharuow-ds.es.js",
|