@datametria/vue-components 2.3.1 → 2.4.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.
Files changed (128) hide show
  1. package/README.md +625 -594
  2. package/dist/index.es.js +1962 -1887
  3. package/dist/index.umd.js +6 -6
  4. package/dist/src/components/DatametriaForm.vue.d.ts +1 -1
  5. package/dist/src/components/DatametriaInput.vue.d.ts +9 -1
  6. package/dist/src/components/DatametriaSelect.vue.d.ts +10 -1
  7. package/dist/vue-components.css +1 -1
  8. package/package.json +103 -102
  9. package/src/components/DatametriaAlert.vue +151 -133
  10. package/src/components/DatametriaAutocomplete.vue +250 -229
  11. package/src/components/DatametriaAvatar.vue +256 -238
  12. package/src/components/DatametriaBadge.vue +101 -96
  13. package/src/components/DatametriaBreadcrumb.vue +132 -128
  14. package/src/components/DatametriaButton.vue +191 -173
  15. package/src/components/DatametriaCard.vue +84 -66
  16. package/src/components/DatametriaCheckbox.vue +197 -193
  17. package/src/components/DatametriaCheckboxGroup.vue +56 -38
  18. package/src/components/DatametriaChip.vue +159 -141
  19. package/src/components/DatametriaContainer.vue +70 -52
  20. package/src/components/DatametriaDataTable.vue +318 -300
  21. package/src/components/DatametriaDatePicker.vue +396 -378
  22. package/src/components/DatametriaDialog.vue +297 -293
  23. package/src/components/DatametriaDivider.vue +105 -98
  24. package/src/components/DatametriaDropdown.vue +356 -350
  25. package/src/components/DatametriaEmpty.vue +155 -151
  26. package/src/components/DatametriaFileUpload.vue +413 -395
  27. package/src/components/DatametriaFloatingBar.vue +144 -126
  28. package/src/components/DatametriaForm.vue +174 -156
  29. package/src/components/DatametriaFormItem.vue +183 -179
  30. package/src/components/DatametriaGrid.vue +55 -37
  31. package/src/components/DatametriaInput.vue +314 -263
  32. package/src/components/DatametriaMenu.vue +618 -600
  33. package/src/components/DatametriaModal.vue +147 -129
  34. package/src/components/DatametriaNavbar.vue +277 -223
  35. package/src/components/DatametriaPagination.vue +375 -371
  36. package/src/components/DatametriaPasswordInput.vue +444 -426
  37. package/src/components/DatametriaPopconfirm.vue +240 -234
  38. package/src/components/DatametriaProgress.vue +228 -224
  39. package/src/components/DatametriaRadio.vue +151 -147
  40. package/src/components/DatametriaRadioGroup.vue +55 -37
  41. package/src/components/DatametriaResult.vue +135 -131
  42. package/src/components/DatametriaSelect.vue +311 -211
  43. package/src/components/DatametriaSidebar.vue +294 -222
  44. package/src/components/DatametriaSkeleton.vue +257 -234
  45. package/src/components/DatametriaSlider.vue +409 -391
  46. package/src/components/DatametriaSortableTable.vue +820 -802
  47. package/src/components/DatametriaSpinner.vue +114 -110
  48. package/src/components/DatametriaSteps.vue +318 -312
  49. package/src/components/DatametriaSwitch.vue +146 -142
  50. package/src/components/DatametriaTabPane.vue +94 -76
  51. package/src/components/DatametriaTable.vue +118 -100
  52. package/src/components/DatametriaTabs.vue +315 -297
  53. package/src/components/DatametriaTextarea.vue +213 -195
  54. package/src/components/DatametriaTimePicker.vue +317 -299
  55. package/src/components/DatametriaToast.vue +176 -176
  56. package/src/components/DatametriaTooltip.vue +421 -400
  57. package/src/components/DatametriaTree.vue +126 -122
  58. package/src/components/DatametriaTreeNode.vue +176 -172
  59. package/src/components/DatametriaUpload.vue +379 -361
  60. package/src/components/__tests__/DatametriaAlert.test.js +35 -35
  61. package/src/components/__tests__/DatametriaAlert.test.ts +190 -190
  62. package/src/components/__tests__/DatametriaAvatar.test.ts +151 -151
  63. package/src/components/__tests__/DatametriaBadge.test.js +29 -29
  64. package/src/components/__tests__/DatametriaBadge.test.ts +167 -167
  65. package/src/components/__tests__/DatametriaBreadcrumb.test.ts +187 -0
  66. package/src/components/__tests__/DatametriaButton.test.js +30 -30
  67. package/src/components/__tests__/DatametriaButton.test.ts +283 -283
  68. package/src/components/__tests__/DatametriaCard.test.ts +201 -201
  69. package/src/components/__tests__/DatametriaCheckbox.test.ts +204 -0
  70. package/src/components/__tests__/DatametriaChip.test.js +38 -38
  71. package/src/components/__tests__/DatametriaContainer.test.ts +52 -52
  72. package/src/components/__tests__/DatametriaDialog.test.ts +338 -0
  73. package/src/components/__tests__/DatametriaDivider.test.ts +54 -54
  74. package/src/components/__tests__/DatametriaDropdown.test.ts +357 -0
  75. package/src/components/__tests__/DatametriaEmpty.test.ts +261 -0
  76. package/src/components/__tests__/DatametriaFileUpload.test.ts +290 -290
  77. package/src/components/__tests__/DatametriaFloatingBar.test.ts +137 -137
  78. package/src/components/__tests__/DatametriaForm.test.ts +96 -0
  79. package/src/components/__tests__/DatametriaFormItem.test.ts +58 -0
  80. package/src/components/__tests__/DatametriaGrid.test.ts +31 -31
  81. package/src/components/__tests__/DatametriaInput.test.ts +72 -72
  82. package/src/components/__tests__/DatametriaMenu.test.ts +366 -366
  83. package/src/components/__tests__/DatametriaModal.test.ts +86 -86
  84. package/src/components/__tests__/DatametriaNavbar.test.js +48 -48
  85. package/src/components/__tests__/DatametriaNavbar.test.ts +203 -203
  86. package/src/components/__tests__/DatametriaPasswordInput.test.js +305 -305
  87. package/src/components/__tests__/DatametriaRadio.test.ts +195 -0
  88. package/src/components/__tests__/DatametriaSelect.test.ts +77 -77
  89. package/src/components/__tests__/DatametriaSidebar.test.ts +169 -169
  90. package/src/components/__tests__/DatametriaSlider.test.ts +261 -261
  91. package/src/components/__tests__/DatametriaSortableTable.test.js +168 -168
  92. package/src/components/__tests__/DatametriaSpinner.test.ts +156 -156
  93. package/src/components/__tests__/DatametriaSteps.test.ts +211 -0
  94. package/src/components/__tests__/DatametriaSwitch.test.ts +129 -0
  95. package/src/components/__tests__/DatametriaTabPane.test.ts +205 -0
  96. package/src/components/__tests__/DatametriaTable.test.ts +97 -97
  97. package/src/components/__tests__/DatametriaTabs.test.ts +232 -232
  98. package/src/components/__tests__/DatametriaToast.test.js +48 -48
  99. package/src/components/__tests__/DatametriaToast.test.ts +99 -99
  100. package/src/components/__tests__/DatametriaTree.test.ts +376 -0
  101. package/src/components/__tests__/index.test.ts +48 -0
  102. package/src/composables/useAccessibilityScale.ts +94 -94
  103. package/src/composables/useBreakpoints.ts +82 -82
  104. package/src/composables/useHapticFeedback.ts +439 -439
  105. package/src/composables/useRipple.ts +218 -218
  106. package/src/composables/useTheme.ts +5 -1
  107. package/src/index.ts +84 -84
  108. package/src/stories/Variants.stories.js +95 -95
  109. package/src/styles/design-tokens.css +623 -623
  110. package/src/theme/ThemeProvider.vue +96 -96
  111. package/src/theme/__tests__/ThemeProvider.test.ts +208 -208
  112. package/src/theme/__tests__/constants.test.ts +31 -31
  113. package/src/theme/__tests__/presets.test.ts +166 -166
  114. package/src/theme/__tests__/tokens.test.ts +155 -155
  115. package/src/theme/__tests__/types.test.ts +153 -153
  116. package/src/theme/__tests__/useTheme.test.ts +146 -146
  117. package/src/theme/constants.ts +14 -14
  118. package/src/theme/index.ts +12 -12
  119. package/src/theme/presets/datametria.ts +94 -94
  120. package/src/theme/presets/default.ts +94 -94
  121. package/src/theme/presets/index.ts +8 -8
  122. package/src/theme/tokens/colors.ts +28 -28
  123. package/src/theme/tokens/index.ts +47 -47
  124. package/src/theme/tokens/spacing.ts +21 -21
  125. package/src/theme/tokens/typography.ts +35 -35
  126. package/src/theme/types.ts +111 -111
  127. package/src/theme/useTheme.ts +28 -28
  128. package/src/types/index.ts +55 -55
package/README.md CHANGED
@@ -1,594 +1,625 @@
1
- # @datametria/vue-components
2
-
3
- <div align="center">
4
-
5
- ![DATAMETRIA Vue Components](../../assets/logo/datametria-logotipo.png)
6
-
7
- ## Vue.js Component Library com Sistema de Theming Multi-Brand/Multi-Tenant
8
-
9
- [![Build Status](https://img.shields.io/github/actions/workflow/status/datametria/DATAMETRIA-common-libraries/ci-cd-monorepo.yml?branch=main)](https://github.com/datametria/DATAMETRIA-common-libraries/actions)
10
- [![Coverage](https://img.shields.io/badge/coverage-98.2%25-brightgreen)](https://github.com/datametria/DATAMETRIA-common-libraries)
11
- [![License](https://img.shields.io/github/license/datametria/DATAMETRIA-common-libraries)](LICENSE)
12
- [![Version](https://img.shields.io/npm/v/@datametria/vue-components)](https://www.npmjs.com/package/@datametria/vue-components)
13
- [![Vue.js](https://img.shields.io/badge/Vue.js-3.3+-green)](https://vuejs.org/)
14
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.3+-blue)](https://www.typescriptlang.org/)
15
- [![DATAMETRIA](https://img.shields.io/badge/DATAMETRIA-Standards-blue)](https://github.com/datametria/DATAMETRIA-common-libraries)
16
- [![Amazon Q](https://img.shields.io/badge/Amazon%20Q-Ready-yellow)](https://aws.amazon.com/q/)
17
-
18
- [🚀 Demo](https://datametria.github.io/vue-components) • [📖 Documentação](../../docs/) • [🐛 Reportar Bug](https://github.com/datametria/DATAMETRIA-common-libraries/issues) •
19
- [💡 Solicitar Feature](https://github.com/datametria/DATAMETRIA-common-libraries/issues/new) • [🔄 Migration Guide](../../docs/theming/migration-guide.md)
20
-
21
- </div>
22
-
23
- **Versão**: 2.3.0
24
- **Data**: 27/11/2025
25
- **Autor**: Vander Loto - CTO DATAMETRIA
26
-
27
- ---
28
-
29
- ## 📋 Índice
30
-
31
- - [Sobre o Projeto](#sobre-o-projeto)
32
- - [Novidades v2.0](#novidades-v20)
33
- - [Instalação](#instalação)
34
- - [Uso Básico](#uso-básico)
35
- - [Sistema de Theming](#sistema-de-theming)
36
- - [Componentes Disponíveis](#componentes-disponíveis)
37
- - [Características](#características)
38
- - [Documentação](#documentação)
39
- - [Migração v1.x → v2.0](#migração-v1x--v20)
40
- - [Desenvolvimento](#desenvolvimento)
41
- - [Métricas](#métricas)
42
- - [Suporte](#suporte)
43
- - [Licença](#licença)
44
-
45
- ---
46
-
47
- ## 🎯 Sobre o Projeto
48
-
49
- ### Visão Geral
50
-
51
- Biblioteca completa de componentes Vue.js 3 com suporte a **theming multi-brand/multi-tenant**, design system DATAMETRIA e compliance WCAG 2.1 AA. Desenvolvida com foco em reutilização, qualidade e performance.
52
-
53
- ### Objetivos
54
-
55
- - **🎨 Theming Flexível**: Sistema multi-brand/multi-tenant com CSS Variables
56
- - **📱 Backward Compatible**: 100% compatível com v1.x
57
- - **⚡ Performance**: Zero overhead, bundle otimizado
58
- - **♿ Acessibilidade**: WCAG 2.1 AA compliant
59
- - **🧪 Qualidade**: 98.2% cobertura de testes
60
-
61
- ### Benefícios
62
-
63
- - ✅ **51 Componentes**: Com theming integrado
64
- - ✅ **10 Composables**: Hooks reutilizáveis
65
- - ✅ **TypeScript**: Type safety completo
66
- - ✅ **Responsive**: Mobile-first design
67
- - ✅ **Dark Mode**: Suporte nativo
68
- - ✅ **Tree Shaking**: Bundle otimizado
69
-
70
- ---
71
-
72
- ## 🌟 Novidades v2.0
73
-
74
- ### Sistema de Theming Multi-Brand/Multi-Tenant
75
-
76
- - 🎨 **ThemeProvider**: Componente para gerenciar temas
77
- - 🔄 **CSS Variables**: Tokens customizáveis com fallback automático
78
- - 🎯 **useTheme**: Composable para acessar tema
79
- - 🏢 **Multi-Tenant**: Suporte a múltiplas marcas simultaneamente
80
- - 📱 **Backward Compatible**: 100% compatível com v1.x
81
-
82
- ### Novidades v2.3.0
83
-
84
- - 🚀 **3 Novos Componentes de Feedback e Navegação**
85
- - DatametriaDropdown: Menu dropdown com triggers (click/hover/contextmenu) e nested menus
86
- - DatametriaEmpty: Estado vazio com 3 imagens SVG padrão (no-data, no-results, error)
87
- - DatametriaTree: Árvore hierárquica com expand/collapse e checkbox selection
88
- - 92 testes unitários (100% pass rate)
89
- - Coverage média: 94.72% statements, 88.86% branches
90
- - Sprint 19: 100% completo (4/4 componentes)
91
-
92
- ### Novidades v2.2.0
93
-
94
- - 🔍 **Filtros Avançados DatametriaSortableTable**
95
- - 4 tipos de filtro: text, date, select, multiselect
96
- - filterOptions: 'auto' para geração automática
97
- - Detecção automática de Date objects
98
- - Correção: espaços no filtro de texto
99
-
100
- ### Novidades v2.1.0
101
-
102
- - 🏗️ **Novos Componentes de Navegação**
103
- - DatametriaSidebar: Sidebar lateral com colapso
104
- - DatametriaFloatingBar: Barra flutuante para ações rápidas
105
- - ⬆️ **DatametriaTabs Melhorado**
106
- - Variantes: default, pills, underline
107
- - Orientação: horizontal e vertical
108
- - Ícones, badges e tabs desabilitáveis
109
- - 🧪 **Testes**: +62 testes (100% coverage)
110
- - 📚 **Documentação**: 3 novos guias completos
111
-
112
- ---
113
-
114
- ## 📦 Instalação
115
-
116
- ### NPM
117
-
118
- ```bash
119
- npm install @datametria/vue-components@latest
120
- ```
121
-
122
- ### Yarn
123
-
124
- ```bash
125
- yarn add @datametria/vue-components@latest
126
- ```
127
-
128
- ### PNPM
129
-
130
- ```bash
131
- pnpm add @datametria/vue-components@latest
132
- ```
133
-
134
- ### Pré-requisitos
135
-
136
- - **Vue.js**: 3.3+
137
- - **Node.js**: 18+
138
- - **TypeScript**: 5.3+ (opcional, mas recomendado)
139
-
140
- ---
141
-
142
- ## 🚀 Uso Básico
143
-
144
- ### Importar CSS
145
-
146
- ```typescript
147
- // main.ts ou main.js
148
- import '@datametria/vue-components/style.css'
149
- ```
150
-
151
- ### Sem Theming (v1.x compatível)
152
-
153
- ```vue
154
- <template>
155
- <div>
156
- <DatametriaButton variant="primary">Botão Padrão</DatametriaButton>
157
- <DatametriaCard>
158
- <h3>Card Padrão</h3>
159
- <p>Usando design system DATAMETRIA.</p>
160
- </DatametriaCard>
161
- </div>
162
- </template>
163
-
164
- <script setup lang="ts">
165
- import { DatametriaButton, DatametriaCard } from '@datametria/vue-components'
166
- import '@datametria/vue-components/style.css'
167
- </script>
168
- ```
169
-
170
- ### Com Theming (v2.0)
171
-
172
- ```vue
173
- <template>
174
- <ThemeProvider :theme="meuTema">
175
- <div>
176
- <DatametriaButton variant="primary">Botão Customizado</DatametriaButton>
177
- <DatametriaCard>
178
- <h3>Card Customizado</h3>
179
- <p>Usando tema personalizado.</p>
180
- </DatametriaCard>
181
- </div>
182
- </ThemeProvider>
183
- </template>
184
-
185
- <script setup lang="ts">
186
- import { ThemeProvider, DatametriaButton, DatametriaCard } from '@datametria/vue-components'
187
- import type { Theme } from '@datametria/vue-components'
188
-
189
- const meuTema: Theme = {
190
- name: 'Minha Empresa',
191
- tokens: {
192
- colors: {
193
- primary: '#ff6b35',
194
- secondary: '#004e89',
195
- success: '#22c55e',
196
- warning: '#eab308',
197
- error: '#ef4444',
198
- info: '#3b82f6',
199
- neutral: {
200
- 50: '#f8fafc',
201
- 100: '#f1f5f9',
202
- 200: '#e2e8f0',
203
- 300: '#cbd5e1',
204
- 400: '#94a3b8',
205
- 500: '#64748b',
206
- 600: '#475569',
207
- 700: '#334155',
208
- 800: '#1e293b',
209
- 900: '#0f172a'
210
- }
211
- },
212
- typography: {
213
- fontFamily: {
214
- sans: 'Inter, sans-serif',
215
- mono: 'JetBrains Mono, monospace'
216
- },
217
- fontSize: {
218
- xs: '0.75rem',
219
- sm: '0.875rem',
220
- base: '1rem',
221
- lg: '1.125rem',
222
- xl: '1.25rem',
223
- '2xl': '1.5rem'
224
- },
225
- fontWeight: {
226
- normal: 400,
227
- medium: 500,
228
- semibold: 600,
229
- bold: 700
230
- },
231
- lineHeight: {
232
- tight: 1.25,
233
- normal: 1.5,
234
- relaxed: 1.75
235
- }
236
- },
237
- spacing: {
238
- 0: '0',
239
- 1: '0.25rem',
240
- 2: '0.5rem',
241
- 3: '0.75rem',
242
- 4: '1rem',
243
- 6: '1.5rem',
244
- 8: '2rem',
245
- 12: '3rem',
246
- 16: '4rem'
247
- },
248
- radius: {
249
- none: '0',
250
- sm: '0.25rem',
251
- md: '0.375rem',
252
- lg: '0.5rem',
253
- full: '9999px'
254
- },
255
- shadows: {
256
- sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
257
- md: '0 4px 6px -1px rgba(0, 0, 0, 0.1)',
258
- lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1)',
259
- xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1)'
260
- },
261
- transitions: {
262
- fast: '150ms ease',
263
- base: '250ms ease',
264
- slow: '350ms ease'
265
- }
266
- }
267
- }
268
- </script>
269
- ```
270
-
271
- ---
272
-
273
- ## 🎨 Sistema de Theming
274
-
275
- ### useTheme Composable
276
-
277
- ```vue
278
- <template>
279
- <div>
280
- <h1 :style="{ color: theme.tokens.colors.primary }">
281
- Título com cor do tema
282
- </h1>
283
- <p>Tema atual: {{ theme.name }}</p>
284
- </div>
285
- </template>
286
-
287
- <script setup lang="ts">
288
- import { useTheme } from '@datametria/vue-components'
289
-
290
- const theme = useTheme()
291
- </script>
292
- ```
293
-
294
- ### Temas Pré-definidos
295
-
296
- ```vue
297
- <script setup lang="ts">
298
- import {
299
- ThemeProvider,
300
- datametriaTheme,
301
- defaultTheme
302
- } from '@datametria/vue-components'
303
-
304
- // Usar tema DATAMETRIA (padrão)
305
- const tema = datametriaTheme
306
-
307
- // Ou tema genérico
308
- const tema = defaultTheme
309
- </script>
310
- ```
311
-
312
- ### Multi-Tenant
313
-
314
- ```vue
315
- <template>
316
- <div>
317
- <select v-model="tenantAtual">
318
- <option value="datametria">DATAMETRIA</option>
319
- <option value="clienteA">Cliente A</option>
320
- <option value="clienteB">Cliente B</option>
321
- </select>
322
-
323
- <ThemeProvider :theme="temas[tenantAtual]">
324
- <MeuApp />
325
- </ThemeProvider>
326
- </div>
327
- </template>
328
-
329
- <script setup lang="ts">
330
- import { ref } from 'vue'
331
- import { datametriaTheme } from '@datametria/vue-components'
332
-
333
- const tenantAtual = ref('datametria')
334
- const temas = {
335
- datametria: datametriaTheme,
336
- clienteA: clienteATheme,
337
- clienteB: clienteBTheme
338
- }
339
- </script>
340
- ```
341
-
342
- ---
343
-
344
- ## 📚 Componentes Disponíveis
345
-
346
- ### Forms & Inputs (13 componentes)
347
- - `DatametriaButton` - Botão com múltiplas variações + theming
348
- - `DatametriaInput` - Input com validação + theming
349
- - `DatametriaPasswordInput` - Input de senha com força + theming
350
- - `DatametriaSelect` - Select customizável + theming
351
- - `DatametriaCheckbox` - Checkbox estilizado + theming
352
- - `DatametriaRadio` - Radio button + theming
353
- - `DatametriaSwitch` - Toggle switch + theming
354
- - `DatametriaTextarea` - Textarea redimensionável + theming
355
- - `DatametriaDatePicker` - Seletor de data + theming
356
- - `DatametriaTimePicker` - Seletor de hora + theming
357
- - `DatametriaSlider` - Slider de valores + theming
358
- - `DatametriaFileUpload` - Upload de arquivos + theming
359
- - `DatametriaAutocomplete` - Busca com autocomplete + theming
360
-
361
- ### Layout & Navigation (5 componentes)
362
- - `DatametriaCard` - Card container + theming
363
- - `DatametriaModal` - Modal dialog + theming
364
- - `DatametriaContainer` - Container responsivo + theming
365
- - `DatametriaGrid` - Sistema de grid + theming
366
- - `DatametriaDivider` - Divisor visual + theming
367
-
368
- ### Feedback (6 componentes)
369
- - `DatametriaAlert` - Alertas contextuais + theming
370
- - `DatametriaToast` - Notificações toast + theming
371
- - `DatametriaTooltip` - Tooltip informativo + theming
372
- - `DatametriaSkeleton` - Loading skeleton + theming
373
- - `DatametriaProgress` - Barra de progresso + theming
374
- - `DatametriaSpinner` - Loading spinner + theming
375
-
376
- ### Data Display (6 componentes)
377
- - `DatametriaTable` - Tabela básica + theming
378
- - `DatametriaSortableTable` - Tabela com ordenação e filtros avançados + theming ✨ **MELHORADO v2.2**
379
- - `DatametriaAvatar` - Avatar de usuário + theming
380
- - `DatametriaBadge` - Badge de status + theming
381
- - `DatametriaChip` - Chip removível + theming
382
- - `DatametriaTree` - Árvore hierárquica + theming ✨ **NOVO v2.3**
383
-
384
- ### Feedback & Empty States (2 componentes)
385
- - `DatametriaEmpty` - Estado vazio com imagens padrão + theming ✨ **NOVO v2.3**
386
- - `DatametriaResult` - Resultado de operações + theming
387
-
388
- ### Navigation (7 componentes)
389
- - `DatametriaNavbar` - Barra de navegação + theming
390
- - `DatametriaSidebar` - Sidebar lateral com colapso + theming ✨ **NOVO v2.1**
391
- - `DatametriaFloatingBar` - Barra flutuante para ações + theming ✨ **NOVO v2.1**
392
- - `DatametriaMenu` - Menu dropdown + theming
393
- - `DatametriaBreadcrumb` - Navegação breadcrumb + theming
394
- - `DatametriaTabs` - Abas navegáveis (melhorado v2.1) + theming
395
- - `DatametriaDropdown` - Menu dropdown com triggers + theming ✨ **NOVO v2.3**
396
-
397
- ### Theming System (3 componentes)
398
- - `ThemeProvider` - Provider de tema
399
- - `useTheme` - Composable para acessar tema
400
- - Presets: `datametriaTheme`, `defaultTheme`
401
-
402
- **Total: 51 componentes + 10 composables**
403
-
404
- ---
405
-
406
- ## 🎯 Características
407
-
408
- ### Theming v2.0
409
- - **Multi-Brand**: Suporte a múltiplas marcas
410
- - **Multi-Tenant**: Múltiplos tenants simultaneamente
411
- - **CSS Variables**: Tokens customizáveis
412
- - **Fallback Values**: Funciona sem ThemeProvider
413
- - **Performance**: Zero overhead
414
-
415
- ### Qualidade
416
- - **TypeScript**: Type safety completo
417
- - **WCAG 2.1 AA**: Compliance de acessibilidade
418
- - **Responsive**: Mobile-first design
419
- - **Dark Mode**: Suporte nativo
420
- - **98.2% Coverage**: Testes automatizados
421
-
422
- ### Developer Experience
423
- - **Composition API**: Vue 3 nativo
424
- - **Tree Shaking**: Bundle otimizado
425
- - **Hot Reload**: Desenvolvimento rápido
426
- - **Storybook**: Documentação interativa
427
-
428
- ---
429
-
430
- ## 📖 Documentação
431
-
432
- ### Guias de Theming
433
- - **[Getting Started](../../docs/theming/getting-started.md)** - Introdução ao sistema
434
- - **[Creating Themes](../../docs/theming/creating-themes.md)** - Criar temas customizados
435
- - **[Multi-Tenant](../../docs/theming/multi-tenant.md)** - Sistema multi-tenant
436
- - **[Migration Guide](../../docs/theming/migration-guide.md)** - Migração v1 → v2
437
-
438
- ### Exemplos
439
- - **[Multi-Tenant App](../../examples/multi-tenant/)** - Aplicação demo
440
- - **[Storybook Setup](../../docs/tools/storybook-setup.md)** - Configuração Storybook
441
-
442
- ### API Reference
443
- - **[Components API](../../docs/api/)** - Referência completa de componentes
444
- - **[Theming API](../../docs/api/theming.md)** - API do sistema de theming
445
- - **[Types](../../docs/api/types.md)** - Interfaces TypeScript
446
-
447
- ---
448
-
449
- ## 🔄 Migração v1.x v2.0
450
-
451
- ### Compatibilidade
452
- - ✅ **100% Backward Compatible**: Código v1.x funciona sem mudanças
453
- - **Opt-in Theming**: ThemeProvider é opcional
454
- - ✅ **Zero Breaking Changes**: Sem quebras de API
455
-
456
- ### Migração Gradual
457
-
458
- ```vue
459
- <!-- v1.x - Continua funcionando -->
460
- <DatametriaButton variant="primary">Botão</DatametriaButton>
461
-
462
- <!-- v2.0 - Com theming (opcional) -->
463
- <ThemeProvider :theme="meuTema">
464
- <DatametriaButton variant="primary">Botão</DatametriaButton>
465
- </ThemeProvider>
466
- ```
467
-
468
- Consulte o **[Migration Guide](../../docs/theming/migration-guide.md)** para instruções detalhadas.
469
-
470
- ---
471
-
472
- ## 🛠️ Desenvolvimento
473
-
474
- ### Scripts
475
-
476
- ```bash
477
- # Desenvolvimento
478
- npm run dev
479
-
480
- # Build
481
- npm run build
482
-
483
- # Testes
484
- npm run test
485
- npm run test:coverage
486
-
487
- # Linting
488
- npm run lint
489
- npm run type-check
490
- ```
491
-
492
- ### Estrutura
493
-
494
- ```
495
- src/
496
- ├── components/ # 32 componentes
497
- ├── composables/ # 10 composables
498
- ├── theme/ # Sistema de theming (novo!)
499
- │ ├── ThemeProvider.vue
500
- │ ├── useTheme.ts
501
- │ ├── types.ts
502
- │ ├── presets/
503
- │ └── tokens/
504
- ├── types/ # Tipos TypeScript
505
- └── index.ts # Exports principais
506
- ```
507
-
508
- ### Contribuindo
509
-
510
- 1. Fork o projeto
511
- 2. Crie uma branch para sua feature (`git checkout -b feature/AmazingFeature`)
512
- 3. Commit suas mudanças (`git commit -m 'Add some AmazingFeature'`)
513
- 4. Push para a branch (`git push origin feature/AmazingFeature`)
514
- 5. Abra um Pull Request
515
-
516
- ---
517
-
518
- ## 📊 Métricas
519
-
520
- ### Performance
521
- - **Bundle Size**: ~45KB (gzipped)
522
- - **Render Time**: < 100ms
523
- - **Theme Switch**: < 50ms
524
- - **Tree Shaking**: Suporte completo
525
-
526
- ### Qualidade
527
- - **Componentes**: 51 com theming
528
- - **Composables**: 10 hooks reutilizáveis
529
- - **Cobertura**: 98.2% testes
530
- - **TypeScript**: 100% tipado com arquivos .d.ts
531
- - **Acessibilidade**: WCAG 2.1 AA
532
-
533
- ### Compatibilidade
534
- - **Vue.js**: 3.3+
535
- - **Browsers**: Chrome 90+, Firefox 88+, Safari 14+
536
- - **Node.js**: 18+
537
- - **TypeScript**: 5.3+
538
-
539
- ---
540
-
541
- ## 📞 Suporte
542
-
543
- ### Canais de Suporte
544
-
545
- - **📧 Email**: suporte@datametria.io
546
- - **💬 Discord**: [discord.gg/kKYGmCC3](https://discord.gg/kKYGmCC3)
547
- - **🐛 Issues**: [GitHub Issues](https://github.com/datametria/DATAMETRIA-common-libraries/issues)
548
- - **📖 Docs**: [Documentação Completa](../../docs/)
549
-
550
- ### Recursos Úteis
551
-
552
- - **[Theming Documentation](../../docs/theming/getting-started.md)** - Documentação completa
553
- - **[Migration Guide](../../docs/theming/migration-guide.md)** - Guia de migração
554
- - **[Multi-Tenant Example](../../examples/multi-tenant/)** - Exemplo prático
555
- - **[Storybook Setup](../../docs/tools/storybook-setup.md)** - Configuração Storybook
556
-
557
- ---
558
-
559
- ## 📄 Licença
560
-
561
- Este projeto está licenciado sob a Licença MIT - veja o arquivo [LICENSE](LICENSE) para detalhes.
562
-
563
- ### Resumo da Licença
564
-
565
- - **Uso Comercial**: Permitido
566
- - **Modificação**: Permitida
567
- - **Distribuição**: Permitida
568
- - **Uso Privado**: Permitido
569
-
570
- ---
571
-
572
- ## 🙏 Agradecimentos
573
-
574
- ### Equipe DATAMETRIA
575
-
576
- - **Vander Loto** - CTO, Arquitetura e Implementação
577
- - **Marcelo Cunha** - CEO, Visão Estratégica
578
- - **Dalila Rodrigues** - Tech Lead, Qualidade e Supervisão
579
-
580
- ### Tecnologias
581
-
582
- - **Vue.js Team** - Framework incrível
583
- - **TypeScript Team** - Type safety excepcional
584
- - **Amazon Q Developer** - 90% da implementação automatizada
585
-
586
- ---
587
-
588
- <div align="center">
589
-
590
- **Desenvolvido com ❤️ pela equipe DATAMETRIA**
591
-
592
- **Se este projeto te ajudou, considere dar uma estrela!**
593
-
594
- </div>
1
+ # @datametria/vue-components
2
+
3
+ <div align="center">
4
+
5
+ ![DATAMETRIA Vue Components](../../assets/logo/datametria-logotipo.png)
6
+
7
+ ## Vue.js Component Library com Sistema de Theming Multi-Brand/Multi-Tenant
8
+
9
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/datametria/DATAMETRIA-common-libraries/ci-cd-monorepo.yml?branch=main)](https://github.com/datametria/DATAMETRIA-common-libraries/actions)
10
+ [![Coverage](https://img.shields.io/badge/coverage-98.2%25-brightgreen)](https://github.com/datametria/DATAMETRIA-common-libraries)
11
+ [![License](https://img.shields.io/github/license/datametria/DATAMETRIA-common-libraries)](LICENSE)
12
+ [![Version](https://img.shields.io/npm/v/@datametria/vue-components)](https://www.npmjs.com/package/@datametria/vue-components)
13
+ [![Vue.js](https://img.shields.io/badge/Vue.js-3.3+-green)](https://vuejs.org/)
14
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.3+-blue)](https://www.typescriptlang.org/)
15
+ [![DATAMETRIA](https://img.shields.io/badge/DATAMETRIA-Standards-blue)](https://github.com/datametria/DATAMETRIA-common-libraries)
16
+ [![Amazon Q](https://img.shields.io/badge/Amazon%20Q-Ready-yellow)](https://aws.amazon.com/q/)
17
+
18
+ [🚀 Demo](https://datametria.github.io/vue-components) • [📖 Documentação](../../docs/) • [🐛 Reportar Bug](https://github.com/datametria/DATAMETRIA-common-libraries/issues) •
19
+ [💡 Solicitar Feature](https://github.com/datametria/DATAMETRIA-common-libraries/issues/new) • [🔄 Migration Guide](../../docs/theming/migration-guide.md)
20
+
21
+ </div>
22
+
23
+ **Versão**: 2.4.0
24
+ **Data**: 22/12/2025
25
+ **Autor**: Vander Loto - CTO DATAMETRIA
26
+
27
+ ---
28
+
29
+ ## 📋 Índice
30
+
31
+ - [Sobre o Projeto](#sobre-o-projeto)
32
+ - [Novidades v2.0](#novidades-v20)
33
+ - [Instalação](#instalação)
34
+ - [Uso Básico](#uso-básico)
35
+ - [Sistema de Theming](#sistema-de-theming)
36
+ - [Componentes Disponíveis](#componentes-disponíveis)
37
+ - [Características](#características)
38
+ - [Documentação](#documentação)
39
+ - [Migração v1.x → v2.0](#migração-v1x--v20)
40
+ - [Desenvolvimento](#desenvolvimento)
41
+ - [Métricas](#métricas)
42
+ - [Suporte](#suporte)
43
+ - [Licença](#licença)
44
+
45
+ ---
46
+
47
+ ## 🎯 Sobre o Projeto
48
+
49
+ ### Visão Geral
50
+
51
+ Biblioteca completa de componentes Vue.js 3 com suporte a **theming multi-brand/multi-tenant**, design system DATAMETRIA e compliance WCAG 2.1 AA. Desenvolvida com foco em reutilização, qualidade e performance.
52
+
53
+ ### Objetivos
54
+
55
+ - **🎨 Theming Flexível**: Sistema multi-brand/multi-tenant com CSS Variables
56
+ - **📱 Backward Compatible**: 100% compatível com v1.x
57
+ - **⚡ Performance**: Zero overhead, bundle otimizado
58
+ - **♿ Acessibilidade**: WCAG 2.1 AA compliant
59
+ - **🧪 Qualidade**: 98.2% cobertura de testes
60
+
61
+ ### Benefícios
62
+
63
+ - ✅ **51 Componentes**: Com theming integrado
64
+ - ✅ **10 Composables**: Hooks reutilizáveis
65
+ - ✅ **TypeScript**: Type safety completo
66
+ - ✅ **Responsive**: Mobile-first design
67
+ - ✅ **Dark Mode**: Suporte nativo
68
+ - ✅ **Tree Shaking**: Bundle otimizado
69
+
70
+ ---
71
+
72
+ ## 🌟 Novidades v2.0
73
+
74
+ ### Sistema de Theming Multi-Brand/Multi-Tenant
75
+
76
+ - 🎨 **ThemeProvider**: Componente para gerenciar temas
77
+ - 🔄 **CSS Variables**: Tokens customizáveis com fallback automático
78
+ - 🎯 **useTheme**: Composable para acessar tema
79
+ - 🏢 **Multi-Tenant**: Suporte a múltiplas marcas simultaneamente
80
+ - 📱 **Backward Compatible**: 100% compatível com v1.x
81
+
82
+ ### Novidades v2.3.0
83
+
84
+ - 🌙 **Dark Mode Híbrido (50/50 componentes - 100%)**
85
+ - Suporte completo a dark mode em todos os componentes
86
+ - Controle manual via `useTheme()` composable
87
+ - Fallback automático via `@media (prefers-color-scheme: dark)`
88
+ - Sincronização entre tabs via `localStorage`
89
+ - Persistência de preferência do usuário
90
+ - Zero breaking changes
91
+ - **[📖 Guia Completo](./docs/theming/dark-mode-guide.md)**
92
+
93
+ - 🚀 **3 Novos Componentes de Feedback e Navegação**
94
+ - DatametriaDropdown: Menu dropdown com triggers (click/hover/contextmenu) e nested menus
95
+ - DatametriaEmpty: Estado vazio com 3 imagens SVG padrão (no-data, no-results, error)
96
+ - DatametriaTree: Árvore hierárquica com expand/collapse e checkbox selection
97
+ - 92 testes unitários (100% pass rate)
98
+ - Coverage média: 94.72% statements, 88.86% branches
99
+ - Sprint 19: 100% completo (4/4 componentes)
100
+
101
+ ### Novidades v2.2.0
102
+
103
+ - 🔍 **Filtros Avançados DatametriaSortableTable**
104
+ - 4 tipos de filtro: text, date, select, multiselect
105
+ - filterOptions: 'auto' para geração automática
106
+ - Detecção automática de Date objects
107
+ - Correção: espaços no filtro de texto
108
+
109
+ ### Novidades v2.1.0
110
+
111
+ - 🏗️ **Novos Componentes de Navegação**
112
+ - DatametriaSidebar: Sidebar lateral com colapso
113
+ - DatametriaFloatingBar: Barra flutuante para ações rápidas
114
+ - ⬆️ **DatametriaTabs Melhorado**
115
+ - Variantes: default, pills, underline
116
+ - Orientação: horizontal e vertical
117
+ - Ícones, badges e tabs desabilitáveis
118
+ - 🧪 **Testes**: +62 testes (100% coverage)
119
+ - 📚 **Documentação**: 3 novos guias completos
120
+
121
+ ---
122
+
123
+ ## 📦 Instalação
124
+
125
+ ### NPM
126
+
127
+ ```bash
128
+ npm install @datametria/vue-components@latest
129
+ ```
130
+
131
+ ### Yarn
132
+
133
+ ```bash
134
+ yarn add @datametria/vue-components@latest
135
+ ```
136
+
137
+ ### PNPM
138
+
139
+ ```bash
140
+ pnpm add @datametria/vue-components@latest
141
+ ```
142
+
143
+ ### Pré-requisitos
144
+
145
+ - **Vue.js**: 3.3+
146
+ - **Node.js**: 18+
147
+ - **TypeScript**: 5.3+ (opcional, mas recomendado)
148
+
149
+ ---
150
+
151
+ ## 🚀 Uso Básico
152
+
153
+ ### Importar CSS
154
+
155
+ ```typescript
156
+ // main.ts ou main.js
157
+ import '@datametria/vue-components/style.css'
158
+ ```
159
+
160
+ ### Sem Theming (v1.x compatível)
161
+
162
+ ```vue
163
+ <template>
164
+ <div>
165
+ <DatametriaButton variant="primary">Botão Padrão</DatametriaButton>
166
+ <DatametriaCard>
167
+ <h3>Card Padrão</h3>
168
+ <p>Usando design system DATAMETRIA.</p>
169
+ </DatametriaCard>
170
+ </div>
171
+ </template>
172
+
173
+ <script setup lang="ts">
174
+ import { DatametriaButton, DatametriaCard } from '@datametria/vue-components'
175
+ import '@datametria/vue-components/style.css'
176
+ </script>
177
+ ```
178
+
179
+ ### Com Theming (v2.0)
180
+
181
+ ```vue
182
+ <template>
183
+ <ThemeProvider :theme="meuTema">
184
+ <div>
185
+ <DatametriaButton variant="primary">Botão Customizado</DatametriaButton>
186
+ <DatametriaCard>
187
+ <h3>Card Customizado</h3>
188
+ <p>Usando tema personalizado.</p>
189
+ </DatametriaCard>
190
+ </div>
191
+ </ThemeProvider>
192
+ </template>
193
+
194
+ <script setup lang="ts">
195
+ import { ThemeProvider, DatametriaButton, DatametriaCard } from '@datametria/vue-components'
196
+ import type { Theme } from '@datametria/vue-components'
197
+
198
+ const meuTema: Theme = {
199
+ name: 'Minha Empresa',
200
+ tokens: {
201
+ colors: {
202
+ primary: '#ff6b35',
203
+ secondary: '#004e89',
204
+ success: '#22c55e',
205
+ warning: '#eab308',
206
+ error: '#ef4444',
207
+ info: '#3b82f6',
208
+ neutral: {
209
+ 50: '#f8fafc',
210
+ 100: '#f1f5f9',
211
+ 200: '#e2e8f0',
212
+ 300: '#cbd5e1',
213
+ 400: '#94a3b8',
214
+ 500: '#64748b',
215
+ 600: '#475569',
216
+ 700: '#334155',
217
+ 800: '#1e293b',
218
+ 900: '#0f172a'
219
+ }
220
+ },
221
+ typography: {
222
+ fontFamily: {
223
+ sans: 'Inter, sans-serif',
224
+ mono: 'JetBrains Mono, monospace'
225
+ },
226
+ fontSize: {
227
+ xs: '0.75rem',
228
+ sm: '0.875rem',
229
+ base: '1rem',
230
+ lg: '1.125rem',
231
+ xl: '1.25rem',
232
+ '2xl': '1.5rem'
233
+ },
234
+ fontWeight: {
235
+ normal: 400,
236
+ medium: 500,
237
+ semibold: 600,
238
+ bold: 700
239
+ },
240
+ lineHeight: {
241
+ tight: 1.25,
242
+ normal: 1.5,
243
+ relaxed: 1.75
244
+ }
245
+ },
246
+ spacing: {
247
+ 0: '0',
248
+ 1: '0.25rem',
249
+ 2: '0.5rem',
250
+ 3: '0.75rem',
251
+ 4: '1rem',
252
+ 6: '1.5rem',
253
+ 8: '2rem',
254
+ 12: '3rem',
255
+ 16: '4rem'
256
+ },
257
+ radius: {
258
+ none: '0',
259
+ sm: '0.25rem',
260
+ md: '0.375rem',
261
+ lg: '0.5rem',
262
+ full: '9999px'
263
+ },
264
+ shadows: {
265
+ sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
266
+ md: '0 4px 6px -1px rgba(0, 0, 0, 0.1)',
267
+ lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1)',
268
+ xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1)'
269
+ },
270
+ transitions: {
271
+ fast: '150ms ease',
272
+ base: '250ms ease',
273
+ slow: '350ms ease'
274
+ }
275
+ }
276
+ }
277
+ </script>
278
+ ```
279
+
280
+ ---
281
+
282
+ ## 🎨 Sistema de Theming
283
+
284
+ ### useTheme Composable
285
+
286
+ ```vue
287
+ <template>
288
+ <div>
289
+ <h1 :style="{ color: theme.tokens.colors.primary }">
290
+ Título com cor do tema
291
+ </h1>
292
+ <p>Tema atual: {{ theme.name }}</p>
293
+ </div>
294
+ </template>
295
+
296
+ <script setup lang="ts">
297
+ import { useTheme } from '@datametria/vue-components'
298
+
299
+ const theme = useTheme()
300
+ </script>
301
+ ```
302
+
303
+ ### Temas Pré-definidos
304
+
305
+ ```vue
306
+ <script setup lang="ts">
307
+ import {
308
+ ThemeProvider,
309
+ datametriaTheme,
310
+ defaultTheme
311
+ } from '@datametria/vue-components'
312
+
313
+ // Usar tema DATAMETRIA (padrão)
314
+ const tema = datametriaTheme
315
+
316
+ // Ou tema genérico
317
+ const tema = defaultTheme
318
+ </script>
319
+ ```
320
+
321
+ ### Multi-Tenant
322
+
323
+ ```vue
324
+ <template>
325
+ <div>
326
+ <select v-model="tenantAtual">
327
+ <option value="datametria">DATAMETRIA</option>
328
+ <option value="clienteA">Cliente A</option>
329
+ <option value="clienteB">Cliente B</option>
330
+ </select>
331
+
332
+ <ThemeProvider :theme="temas[tenantAtual]">
333
+ <MeuApp />
334
+ </ThemeProvider>
335
+ </div>
336
+ </template>
337
+
338
+ <script setup lang="ts">
339
+ import { ref } from 'vue'
340
+ import { datametriaTheme } from '@datametria/vue-components'
341
+
342
+ const tenantAtual = ref('datametria')
343
+ const temas = {
344
+ datametria: datametriaTheme,
345
+ clienteA: clienteATheme,
346
+ clienteB: clienteBTheme
347
+ }
348
+ </script>
349
+ ```
350
+
351
+ ---
352
+
353
+ ## 📚 Componentes Disponíveis
354
+
355
+ ### Forms & Inputs (13 componentes)
356
+ - `DatametriaButton` - Botão com múltiplas variações + theming
357
+ - `DatametriaInput` - Input com validação + theming
358
+ - `DatametriaPasswordInput` - Input de senha com força + theming
359
+ - `DatametriaSelect` - Select customizável + theming
360
+ - `DatametriaCheckbox` - Checkbox estilizado + theming
361
+ - `DatametriaRadio` - Radio button + theming
362
+ - `DatametriaSwitch` - Toggle switch + theming
363
+ - `DatametriaTextarea` - Textarea redimensionável + theming
364
+ - `DatametriaDatePicker` - Seletor de data + theming
365
+ - `DatametriaTimePicker` - Seletor de hora + theming
366
+ - `DatametriaSlider` - Slider de valores + theming
367
+ - `DatametriaFileUpload` - Upload de arquivos + theming
368
+ - `DatametriaAutocomplete` - Busca com autocomplete + theming
369
+
370
+ ### Layout & Navigation (5 componentes)
371
+ - `DatametriaCard` - Card container + theming
372
+ - `DatametriaModal` - Modal dialog + theming
373
+ - `DatametriaContainer` - Container responsivo + theming
374
+ - `DatametriaGrid` - Sistema de grid + theming
375
+ - `DatametriaDivider` - Divisor visual + theming
376
+
377
+ ### Feedback (6 componentes)
378
+ - `DatametriaAlert` - Alertas contextuais + theming
379
+ - `DatametriaToast` - Notificações toast + theming
380
+ - `DatametriaTooltip` - Tooltip informativo + theming
381
+ - `DatametriaSkeleton` - Loading skeleton + theming
382
+ - `DatametriaProgress` - Barra de progresso + theming
383
+ - `DatametriaSpinner` - Loading spinner + theming
384
+
385
+ ### Data Display (6 componentes)
386
+ - `DatametriaTable` - Tabela básica + theming
387
+ - `DatametriaSortableTable` - Tabela com ordenação e filtros avançados + theming ✨ **MELHORADO v2.2**
388
+ - `DatametriaAvatar` - Avatar de usuário + theming
389
+ - `DatametriaBadge` - Badge de status + theming
390
+ - `DatametriaChip` - Chip removível + theming
391
+ - `DatametriaTree` - Árvore hierárquica + theming ✨ **NOVO v2.3**
392
+
393
+ ### Feedback & Empty States (2 componentes)
394
+ - `DatametriaEmpty` - Estado vazio com imagens padrão + theming ✨ **NOVO v2.3**
395
+ - `DatametriaResult` - Resultado de operações + theming
396
+
397
+ ### Navigation (7 componentes)
398
+ - `DatametriaNavbar` - Barra de navegação + theming
399
+ - `DatametriaSidebar` - Sidebar lateral com colapso + theming ✨ **NOVO v2.1**
400
+ - `DatametriaFloatingBar` - Barra flutuante para ações + theming ✨ **NOVO v2.1**
401
+ - `DatametriaMenu` - Menu dropdown + theming
402
+ - `DatametriaBreadcrumb` - Navegação breadcrumb + theming
403
+ - `DatametriaTabs` - Abas navegáveis (melhorado v2.1) + theming
404
+ - `DatametriaDropdown` - Menu dropdown com triggers + theming ✨ **NOVO v2.3**
405
+
406
+ ### Theming System (3 componentes)
407
+ - `ThemeProvider` - Provider de tema
408
+ - `useTheme` - Composable para acessar tema
409
+ - Presets: `datametriaTheme`, `defaultTheme`
410
+
411
+ **Total: 51 componentes + 10 composables**
412
+
413
+ ---
414
+
415
+ ## 🎯 Características
416
+
417
+ ### Theming v2.0
418
+ - **Multi-Brand**: Suporte a múltiplas marcas
419
+ - **Multi-Tenant**: Múltiplos tenants simultaneamente
420
+ - **CSS Variables**: Tokens customizáveis
421
+ - **Fallback Values**: Funciona sem ThemeProvider
422
+ - **Performance**: Zero overhead
423
+
424
+ ### Qualidade
425
+ - **TypeScript**: Type safety completo
426
+ - **WCAG 2.1 AA**: Compliance de acessibilidade
427
+ - **Responsive**: Mobile-first design
428
+ - **Dark Mode**: Suporte nativo
429
+ - **98.2% Coverage**: Testes automatizados
430
+
431
+ ### ✅ Developer Experience
432
+ - **Composition API**: Vue 3 nativo
433
+ - **Tree Shaking**: Bundle otimizado
434
+ - **Hot Reload**: Desenvolvimento rápido
435
+ - **Storybook**: Documentação interativa
436
+
437
+ ---
438
+
439
+ ## 📖 Documentação
440
+
441
+ ### 📚 Documentação Completa
442
+
443
+ Toda a documentação está disponível em [`docs/`](./docs/):
444
+
445
+ #### Guias Gerais
446
+ - **[README](./docs/README.md)** - Visão geral da documentação
447
+ - **[ACCESSIBILITY](./docs/ACCESSIBILITY.md)** - Guia de acessibilidade WCAG 2.1 AA
448
+ - **[DESIGN-SYSTEM](./docs/DESIGN-SYSTEM.md)** - Design System DATAMETRIA
449
+ - **[PROGRESS](./docs/PROGRESS.md)** - Progresso de implementação
450
+
451
+ #### Documentação de Componentes
452
+
453
+ Documentação detalhada em [`docs/components/`](./docs/components/):
454
+
455
+ - **[DatametriaSelect](./docs/components/DatametriaSelect-v2.md)** - Select customizado v2.3.1 (dropdown, busca, múltipla seleção)
456
+ - **[DatametriaSortableTable](./docs/components/DatametriaSortableTable.md)** - Tabela com ordenação e filtros avançados
457
+ - **[DatametriaTabs](./docs/components/DatametriaTabs.md)** - Abas navegáveis com variantes
458
+ - **[DatametriaSidebar](./docs/components/DatametriaSidebar.md)** - Sidebar lateral com colapso
459
+ - **[DatametriaFloatingBar](./docs/components/DatametriaFloatingBar.md)** - Barra flutuante para ações
460
+ - **[DatametriaDatePicker](./docs/components/DatametriaDatePicker.md)** - Seletor de data
461
+ - **[DatametriaPasswordInput](./docs/components/DatametriaPasswordInput.md)** - Input de senha com força
462
+
463
+ #### Guias de Theming
464
+ - **[Getting Started](../../docs/theming/getting-started.md)** - Introdução ao sistema
465
+ - **[Creating Themes](../../docs/theming/creating-themes.md)** - Criar temas customizados
466
+ - **[Multi-Tenant](../../docs/theming/multi-tenant.md)** - Sistema multi-tenant
467
+ - **[Migration Guide](../../docs/theming/migration-guide.md)** - Migração v1 → v2
468
+
469
+ #### Exemplos
470
+ - **[Multi-Tenant App](../../examples/multi-tenant/)** - Aplicação demo
471
+ - **[Storybook Setup](../../docs/tools/storybook-setup.md)** - Configuração Storybook
472
+
473
+ #### API Reference
474
+ - **[Components API](../../docs/api/)** - Referência completa de componentes
475
+ - **[Theming API](../../docs/api/theming.md)** - API do sistema de theming
476
+ - **[Types](../../docs/api/types.md)** - Interfaces TypeScript
477
+
478
+ ---
479
+
480
+ ## 🔄 Migração v1.x → v2.0
481
+
482
+ ### Compatibilidade
483
+ - ✅ **100% Backward Compatible**: Código v1.x funciona sem mudanças
484
+ - **Opt-in Theming**: ThemeProvider é opcional
485
+ - **Zero Breaking Changes**: Sem quebras de API
486
+
487
+ ### Migração Gradual
488
+
489
+ ```vue
490
+ <!-- v1.x - Continua funcionando -->
491
+ <DatametriaButton variant="primary">Botão</DatametriaButton>
492
+
493
+ <!-- v2.0 - Com theming (opcional) -->
494
+ <ThemeProvider :theme="meuTema">
495
+ <DatametriaButton variant="primary">Botão</DatametriaButton>
496
+ </ThemeProvider>
497
+ ```
498
+
499
+ Consulte o **[Migration Guide](../../docs/theming/migration-guide.md)** para instruções detalhadas.
500
+
501
+ ---
502
+
503
+ ## 🛠️ Desenvolvimento
504
+
505
+ ### Scripts
506
+
507
+ ```bash
508
+ # Desenvolvimento
509
+ npm run dev
510
+
511
+ # Build
512
+ npm run build
513
+
514
+ # Testes
515
+ npm run test
516
+ npm run test:coverage
517
+
518
+ # Linting
519
+ npm run lint
520
+ npm run type-check
521
+ ```
522
+
523
+ ### Estrutura
524
+
525
+ ```
526
+ src/
527
+ ├── components/ # 32 componentes
528
+ ├── composables/ # 10 composables
529
+ ├── theme/ # Sistema de theming (novo!)
530
+ │ ├── ThemeProvider.vue
531
+ │ ├── useTheme.ts
532
+ │ ├── types.ts
533
+ │ ├── presets/
534
+ │ └── tokens/
535
+ ├── types/ # Tipos TypeScript
536
+ └── index.ts # Exports principais
537
+ ```
538
+
539
+ ### Contribuindo
540
+
541
+ 1. Fork o projeto
542
+ 2. Crie uma branch para sua feature (`git checkout -b feature/AmazingFeature`)
543
+ 3. Commit suas mudanças (`git commit -m 'Add some AmazingFeature'`)
544
+ 4. Push para a branch (`git push origin feature/AmazingFeature`)
545
+ 5. Abra um Pull Request
546
+
547
+ ---
548
+
549
+ ## 📊 Métricas
550
+
551
+ ### Performance
552
+ - **Bundle Size**: ~45KB (gzipped)
553
+ - **Render Time**: < 100ms
554
+ - **Theme Switch**: < 50ms
555
+ - **Tree Shaking**: Suporte completo
556
+
557
+ ### Qualidade
558
+ - **Componentes**: 51 com theming
559
+ - **Composables**: 10 hooks reutilizáveis
560
+ - **Cobertura**: 98.2% testes
561
+ - **TypeScript**: 100% tipado com arquivos .d.ts
562
+ - **Acessibilidade**: WCAG 2.1 AA
563
+
564
+ ### Compatibilidade
565
+ - **Vue.js**: 3.3+
566
+ - **Browsers**: Chrome 90+, Firefox 88+, Safari 14+
567
+ - **Node.js**: 18+
568
+ - **TypeScript**: 5.3+
569
+
570
+ ---
571
+
572
+ ## 📞 Suporte
573
+
574
+ ### Canais de Suporte
575
+
576
+ - **📧 Email**: suporte@datametria.io
577
+ - **💬 Discord**: [discord.gg/kKYGmCC3](https://discord.gg/kKYGmCC3)
578
+ - **🐛 Issues**: [GitHub Issues](https://github.com/datametria/DATAMETRIA-common-libraries/issues)
579
+ - **📖 Docs**: [Documentação Completa](../../docs/)
580
+
581
+ ### Recursos Úteis
582
+
583
+ - **[Theming Documentation](../../docs/theming/getting-started.md)** - Documentação completa
584
+ - **[Migration Guide](../../docs/theming/migration-guide.md)** - Guia de migração
585
+ - **[Multi-Tenant Example](../../examples/multi-tenant/)** - Exemplo prático
586
+ - **[Storybook Setup](../../docs/tools/storybook-setup.md)** - Configuração Storybook
587
+
588
+ ---
589
+
590
+ ## 📄 Licença
591
+
592
+ Este projeto está licenciado sob a Licença MIT - veja o arquivo [LICENSE](LICENSE) para detalhes.
593
+
594
+ ### Resumo da Licença
595
+
596
+ - ✅ **Uso Comercial**: Permitido
597
+ - ✅ **Modificação**: Permitida
598
+ - ✅ **Distribuição**: Permitida
599
+ - ✅ **Uso Privado**: Permitido
600
+
601
+ ---
602
+
603
+ ## 🙏 Agradecimentos
604
+
605
+ ### Equipe DATAMETRIA
606
+
607
+ - **Vander Loto** - CTO, Arquitetura e Implementação
608
+ - **Marcelo Cunha** - CEO, Visão Estratégica
609
+ - **Dalila Rodrigues** - Tech Lead, Qualidade e Supervisão
610
+
611
+ ### Tecnologias
612
+
613
+ - **Vue.js Team** - Framework incrível
614
+ - **TypeScript Team** - Type safety excepcional
615
+ - **Amazon Q Developer** - 90% da implementação automatizada
616
+
617
+ ---
618
+
619
+ <div align="center">
620
+
621
+ **Desenvolvido com ❤️ pela equipe DATAMETRIA**
622
+
623
+ ⭐ **Se este projeto te ajudou, considere dar uma estrela!** ⭐
624
+
625
+ </div>