@datametria/vue-components 1.1.3 → 1.2.0
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 +81 -14
- package/dist/index.es.js +843 -812
- package/dist/index.umd.js +6 -6
- package/dist/vue-components.css +1 -1
- package/package.json +3 -3
- package/src/components/DatametriaAlert.vue +137 -123
- package/src/components/DatametriaBadge.vue +98 -90
- package/src/components/DatametriaButton.vue +165 -157
- package/src/components/DatametriaChip.vue +149 -149
- package/src/components/DatametriaNavbar.vue +252 -227
- package/src/components/DatametriaToast.vue +176 -163
- package/src/components/__tests__/DatametriaAlert.test.js +36 -0
- package/src/components/__tests__/DatametriaBadge.test.js +30 -0
- package/src/components/__tests__/DatametriaButton.test.js +31 -0
- package/src/components/__tests__/DatametriaChip.test.js +39 -0
- package/src/components/__tests__/DatametriaNavbar.test.js +49 -0
- package/src/components/__tests__/DatametriaToast.test.js +49 -0
- package/src/stories/Variants.stories.js +96 -0
package/README.md
CHANGED
|
@@ -3,25 +3,29 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@datametria/vue-components)
|
|
4
4
|
[](https://www.npmjs.com/package/@datametria/vue-components)
|
|
5
5
|
[](https://github.com/datametria/DATAMETRIA-common-libraries/blob/main/LICENSE)
|
|
6
|
-
[](/docs/packages/vue-components/PROGRESS.md)
|
|
7
|
+
[](/docs/packages/vue-components/TEST-RESULTS.md)
|
|
8
|
+
[](/docs/operations/variant-migration-guide.md)
|
|
8
9
|
|
|
9
10
|
> **Biblioteca enterprise de componentes Vue.js 3 com 100% conformidade UX/UI DATAMETRIA**
|
|
10
11
|
>
|
|
11
|
-
> 40 módulos • Design System completo • WCAG 2.1 AA • Dark Mode nativo • Sistema responsivo avançado • Micro-interações modernas •
|
|
12
|
+
> 40 módulos • **Variants padronizados** • Design System completo • WCAG 2.1 AA • Dark Mode nativo • Sistema responsivo avançado • Micro-interações modernas • 514 testes
|
|
12
13
|
|
|
13
14
|
## 🏆 Features Enterprise (100% Conformidade UX/UI)
|
|
14
15
|
|
|
15
|
-
### ✅ **4 Sprints Implementados**
|
|
16
|
+
### ✅ **4 Sprints Implementados + Variants Padronizados**
|
|
16
17
|
- 🎨 **Sprint 1:** Design System Enhancement (gradientes, bordas, dark mode, escalabilidade)
|
|
17
18
|
- 🧩 **Sprint 2:** Componentes Críticos (TimePicker, Slider, Tooltip, Menu)
|
|
18
19
|
- ⚡ **Sprint 3:** Micro-interações (shimmer, ripple, haptic feedback)
|
|
19
20
|
- 📱 **Sprint 4:** Responsividade Avançada (6 breakpoints, typography fluida, container queries)
|
|
21
|
+
- 🎯 **Variants v1.2.0:** Padronização completa de variants com primary em todos os componentes
|
|
20
22
|
|
|
21
23
|
### 🎯 **Qualidade Enterprise**
|
|
22
24
|
- **40 módulos** (30 componentes + 10 composables)
|
|
23
|
-
- **
|
|
24
|
-
- **
|
|
25
|
+
- **514 testes** com 100% success rate
|
|
26
|
+
- **82%+ coverage** geral (100% nos componentes principais)
|
|
27
|
+
- **Variants padronizados** - Primary variant em todos os componentes
|
|
28
|
+
- **Validação runtime** - Warnings em desenvolvimento para variants inválidos
|
|
25
29
|
- **WCAG 2.1 AA** com escalabilidade controlada (0.8x-2.0x)
|
|
26
30
|
- **Performance otimizada** para produção
|
|
27
31
|
- **TypeScript completo** com inferência automática
|
|
@@ -93,6 +97,56 @@ const handleLogin = () => {
|
|
|
93
97
|
</template>
|
|
94
98
|
```
|
|
95
99
|
|
|
100
|
+
## 🎯 Guia Rápido de Variants
|
|
101
|
+
|
|
102
|
+
### ✅ **Todos os Componentes Suportam `primary`**
|
|
103
|
+
|
|
104
|
+
```vue
|
|
105
|
+
<!-- ✅ CORRETO - Primary variant disponível em todos -->
|
|
106
|
+
<DatametriaButton variant="primary">Botão Principal</DatametriaButton>
|
|
107
|
+
<DatametriaAlert variant="primary" message="Alerta importante" />
|
|
108
|
+
<DatametriaNavbar variant="primary" brand="DATAMETRIA" />
|
|
109
|
+
<DatametriaToast variant="primary" message="Notificação" />
|
|
110
|
+
<DatametriaBadge variant="primary" label="Novo" />
|
|
111
|
+
<DatametriaChip variant="primary" label="Tag" />
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### ⚠️ **Breaking Changes v1.2.0**
|
|
115
|
+
|
|
116
|
+
```vue
|
|
117
|
+
<!-- ❌ ANTES (v1.1.x) -->
|
|
118
|
+
<DatametriaChip variant="default">Chip</DatametriaChip>
|
|
119
|
+
<DatametriaToast variant="info" message="Azul" />
|
|
120
|
+
|
|
121
|
+
<!-- ✅ DEPOIS (v1.2.0) -->
|
|
122
|
+
<DatametriaChip variant="primary">Chip</DatametriaChip>
|
|
123
|
+
<DatametriaToast variant="primary" message="Azul" />
|
|
124
|
+
<DatametriaToast variant="info" message="Cinza" />
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### 🛡️ **Validação Automática**
|
|
128
|
+
|
|
129
|
+
```vue
|
|
130
|
+
<!-- ❌ Variant inválido -->
|
|
131
|
+
<DatametriaButton variant="invalid">Botão</DatametriaButton>
|
|
132
|
+
<!-- Console: [DatametriaButton] Invalid variant "invalid". Valid options: primary, secondary, outline, ghost -->
|
|
133
|
+
|
|
134
|
+
<!-- ✅ Variants válidos por componente -->
|
|
135
|
+
<DatametriaButton variant="primary | secondary | outline | ghost" />
|
|
136
|
+
<DatametriaAlert variant="primary | success | error | warning | info" />
|
|
137
|
+
<DatametriaNavbar variant="primary | light | dark | transparent" />
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 📚 **Migração Rápida**
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# Script automático de migração
|
|
144
|
+
curl -o migrate.sh https://raw.githubusercontent.com/datametria/vue-components/main/scripts/migrate-variants.sh
|
|
145
|
+
chmod +x migrate.sh && ./migrate.sh
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**📖 [Guia Completo de Migração](../operations/variant-migration-guide.md)**
|
|
149
|
+
|
|
96
150
|
## 🎨 Componentes (30 implementados)
|
|
97
151
|
|
|
98
152
|
### 🌟 **Novos Componentes dos Sprints**
|
|
@@ -105,10 +159,13 @@ const handleLogin = () => {
|
|
|
105
159
|
### 🔘 Form Components (10)
|
|
106
160
|
|
|
107
161
|
```vue
|
|
108
|
-
<!-- Button com 4 variants
|
|
162
|
+
<!-- Button com 4 variants padronizados -->
|
|
109
163
|
<DatametriaButton variant="primary" size="md" :loading="false">
|
|
110
|
-
|
|
164
|
+
Primary Button
|
|
111
165
|
</DatametriaButton>
|
|
166
|
+
<DatametriaButton variant="secondary">Secondary</DatametriaButton>
|
|
167
|
+
<DatametriaButton variant="outline">Outline</DatametriaButton>
|
|
168
|
+
<DatametriaButton variant="ghost">Ghost</DatametriaButton>
|
|
112
169
|
|
|
113
170
|
<!-- Input com validação -->
|
|
114
171
|
<DatametriaInput
|
|
@@ -185,19 +242,23 @@ const handleLogin = () => {
|
|
|
185
242
|
### 🔔 Feedback Components (4)
|
|
186
243
|
|
|
187
244
|
```vue
|
|
188
|
-
<!-- Alert -->
|
|
245
|
+
<!-- Alert com variant primary -->
|
|
246
|
+
<DatametriaAlert variant="primary" :closable="true">
|
|
247
|
+
Informação importante!
|
|
248
|
+
</DatametriaAlert>
|
|
189
249
|
<DatametriaAlert variant="success" :closable="true">
|
|
190
250
|
Operação realizada com sucesso!
|
|
191
251
|
</DatametriaAlert>
|
|
192
252
|
|
|
193
|
-
<!-- Toast -->
|
|
253
|
+
<!-- Toast com variant primary -->
|
|
194
254
|
<DatametriaToast
|
|
195
255
|
v-model="showToast"
|
|
196
|
-
variant="
|
|
256
|
+
variant="primary"
|
|
197
257
|
:duration="3000"
|
|
198
258
|
>
|
|
199
|
-
Notificação
|
|
259
|
+
Notificação importante
|
|
200
260
|
</DatametriaToast>
|
|
261
|
+
<DatametriaToast variant="info">Informação</DatametriaToast>
|
|
201
262
|
|
|
202
263
|
<!-- Progress -->
|
|
203
264
|
<DatametriaProgress :value="75" variant="primary" />
|
|
@@ -516,7 +577,9 @@ setScale(1.5) // 150% zoom
|
|
|
516
577
|
### 🎯 **Conquistas**
|
|
517
578
|
|
|
518
579
|
- ✅ **40 módulos** implementados e funcionais
|
|
519
|
-
- ✅ **
|
|
580
|
+
- ✅ **514 testes** com 100% success rate
|
|
581
|
+
- ✅ **Variants padronizados** - Primary variant em todos os componentes
|
|
582
|
+
- ✅ **Validação runtime** - Warnings automáticos para variants inválidos
|
|
520
583
|
- ✅ **Design System completo** com brand colors oficiais
|
|
521
584
|
- ✅ **Sistema responsivo avançado** com 6 breakpoints
|
|
522
585
|
- ✅ **Micro-interações modernas** (shimmer, ripple, haptic)
|
|
@@ -566,7 +629,11 @@ npm run build
|
|
|
566
629
|
|
|
567
630
|
## 📄 Licença
|
|
568
631
|
|
|
569
|
-
MIT © 2025 DATAMETRIA
|
|
632
|
+
MIT © 2025 DATAMETRIA - Vander Loto (CTO)
|
|
633
|
+
|
|
634
|
+
**Versão:** 1.2.0
|
|
635
|
+
**Última Atualização:** 05/11/2025
|
|
636
|
+
**Autor:** Vander Loto - CTO DATAMETRIA
|
|
570
637
|
|
|
571
638
|
## 👥 Equipe
|
|
572
639
|
|