pdm-ui-kit 0.2.0 → 0.3.1

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 (44) hide show
  1. package/README.md +168 -3
  2. package/esm2020/lib/components/button-group/button-group.component.mjs +211 -182
  3. package/esm2020/lib/components/combobox/combobox.component.mjs +136 -14
  4. package/esm2020/lib/components/context-menu/context-menu.component.mjs +121 -42
  5. package/esm2020/lib/components/data-table/data-table.component.mjs +3 -3
  6. package/esm2020/lib/components/date-picker/date-picker.component.mjs +66 -54
  7. package/esm2020/lib/components/dialog/dialog.component.mjs +111 -94
  8. package/esm2020/lib/components/hover-card/hover-card.component.mjs +185 -24
  9. package/esm2020/lib/components/input/input.component.mjs +15 -15
  10. package/esm2020/lib/components/input-group/input-group.component.mjs +14 -14
  11. package/esm2020/lib/components/menubar/menubar.component.mjs +105 -29
  12. package/esm2020/lib/components/popover/popover.component.mjs +107 -75
  13. package/esm2020/lib/components/select/select.component.mjs +23 -22
  14. package/esm2020/lib/components/table/table.component.mjs +77 -68
  15. package/esm2020/lib/components/tabs/tabs.component.mjs +6 -6
  16. package/esm2020/lib/components/toggle-group/toggle-group.component.mjs +6 -6
  17. package/esm2020/lib/components/tooltip/tooltip.component.mjs +162 -19
  18. package/esm2020/lib/overlay/z-index-helper.mjs +69 -0
  19. package/esm2020/lib/utils/z-index.mjs +25 -28
  20. package/esm2020/public-api.mjs +67 -66
  21. package/fesm2015/pdm-ui-kit.mjs +1379 -654
  22. package/fesm2015/pdm-ui-kit.mjs.map +1 -1
  23. package/fesm2020/pdm-ui-kit.mjs +1383 -654
  24. package/fesm2020/pdm-ui-kit.mjs.map +1 -1
  25. package/lib/components/button-group/button-group.component.d.ts +8 -2
  26. package/lib/components/combobox/combobox.component.d.ts +20 -3
  27. package/lib/components/context-menu/context-menu.component.d.ts +17 -8
  28. package/lib/components/date-picker/date-picker.component.d.ts +5 -6
  29. package/lib/components/dialog/dialog.component.d.ts +5 -5
  30. package/lib/components/hover-card/hover-card.component.d.ts +27 -4
  31. package/lib/components/input/input.component.d.ts +3 -3
  32. package/lib/components/input-group/input-group.component.d.ts +1 -1
  33. package/lib/components/menubar/menubar.component.d.ts +16 -8
  34. package/lib/components/popover/popover.component.d.ts +13 -12
  35. package/lib/components/select/select.component.d.ts +4 -5
  36. package/lib/components/table/table.component.d.ts +2 -2
  37. package/lib/components/tabs/tabs.component.d.ts +1 -1
  38. package/lib/components/toggle-group/toggle-group.component.d.ts +1 -1
  39. package/lib/components/tooltip/tooltip.component.d.ts +21 -3
  40. package/lib/overlay/z-index-helper.d.ts +36 -0
  41. package/lib/utils/z-index.d.ts +14 -18
  42. package/package.json +6 -6
  43. package/public-api.d.ts +66 -65
  44. package/src/lib/styles/tokens.css +182 -0
package/README.md CHANGED
@@ -1,8 +1,173 @@
1
1
  # PDM UI Kit
2
2
 
3
- Librería de componentes UI para Angular (13, 14 y 15), construida sobre patrones visuales del **Figma de shadcn/ui** y adaptada para el ecosistema de Corelusa.
3
+ Librería de componentes UI para Angular 15+, construida sobre patrones visuales del **Figma de shadcn/ui** y adaptada para el ecosistema de Corelusa.
4
4
 
5
- ## What's New in v0.2.0
5
+ ## ⚠️ Consumer Setup - IMPORTANT
6
+
7
+ Para que los componentes funcionen correctamente, seguí estos pasos:
8
+
9
+ ### 1) Configurar Tailwind para escanear la librería
10
+
11
+ En tu `tailwind.config.js`, agregá el path de la librería:
12
+
13
+ ```js
14
+ module.exports = {
15
+ content: [
16
+ './src/**/*.{html,ts}',
17
+ // ... otros paths
18
+ 'node_modules/pdm-ui-kit/**/*.{ts,html}'
19
+ ],
20
+ // ... resto de tu config
21
+ };
22
+ ```
23
+
24
+ **Sin esto, las clases Tailwind no se generarán y la UI se verá sin estilos.**
25
+
26
+ ### 2) Definir los tokens CSS
27
+
28
+ Copiá las variables en tu CSS base (por ejemplo `styles.css`):
29
+
30
+ ```css
31
+ :root {
32
+ /* Colores base */
33
+ --background: 0 0% 100%;
34
+ --foreground: 222.2 84% 4.9%;
35
+
36
+ /* Colores de componente */
37
+ --card: 0 0% 100%;
38
+ --card-foreground: 222.2 84% 4.9%;
39
+ --popover: 0 0% 100%;
40
+ --popover-foreground: 222.2 84% 4.9%;
41
+ --primary: 221.2 83.2% 53.3%;
42
+ --primary-foreground: 210 40% 98%;
43
+ --secondary: 210 40% 96.1%;
44
+ --secondary-foreground: 222.2 47.4% 11.2%;
45
+ --muted: 210 40% 96.1%;
46
+ --muted-foreground: 215.4 16.3% 46.9%;
47
+ --accent: 210 40% 96.1%;
48
+ --accent-foreground: 222.2 47.4% 11.2%;
49
+ --destructive: 0 84.2% 60.2%;
50
+ --destructive-foreground: 210 40% 98%;
51
+
52
+ /* Bordes y inputs */
53
+ --border: 214.3 31.8% 91.4%;
54
+ --input: 214.3 31.8% 91.4%;
55
+ --ring: 221.2 83.2% 53.3%;
56
+
57
+ /* Radio */
58
+ --radius: 0.5rem;
59
+
60
+ /* Charts (para pdm-chart) */
61
+ --chart-1: 12 76% 61%;
62
+ --chart-2: 173 58% 39%;
63
+ --chart-3: 197 37% 24%;
64
+ --chart-4: 43 74% 66%;
65
+ --chart-5: 27 87% 67%;
66
+ }
67
+
68
+ /* Dark mode (opcional) */
69
+ .dark {
70
+ --background: 222.2 84% 4.9%;
71
+ --foreground: 210 40% 98%;
72
+ --card: 222.2 84% 4.9%;
73
+ --card-foreground: 210 40% 98%;
74
+ --popover: 222.2 84% 4.9%;
75
+ --popover-foreground: 210 40% 98%;
76
+ --primary: 217.2 91.2% 59.8%;
77
+ --primary-foreground: 222.2 47.4% 11.2%;
78
+ --secondary: 217.2 32.6% 17.5%;
79
+ --secondary-foreground: 210 40% 98%;
80
+ --muted: 217.2 32.6% 17.5%;
81
+ --muted-foreground: 215 20.2% 65.1%;
82
+ --accent: 217.2 32.6% 17.5%;
83
+ --accent-foreground: 210 40% 98%;
84
+ --destructive: 0 62.8% 30.6%;
85
+ --destructive-foreground: 210 40% 98%;
86
+ --border: 217.2 32.6% 17.5%;
87
+ --input: 217.2 32.6% 17.5%;
88
+ --ring: 224.3 76.3% 48%;
89
+ }
90
+ ```
91
+
92
+ ### 3) Configurar los colores en Tailwind
93
+
94
+ ```js
95
+ // tailwind.config.js
96
+ module.exports = {
97
+ theme: {
98
+ extend: {
99
+ colors: {
100
+ background: 'hsl(var(--background))',
101
+ foreground: 'hsl(var(--foreground))',
102
+ card: {
103
+ DEFAULT: 'hsl(var(--card))',
104
+ foreground: 'hsl(var(--card-foreground))'
105
+ },
106
+ popover: {
107
+ DEFAULT: 'hsl(var(--popover))',
108
+ foreground: 'hsl(var(--popover-foreground))'
109
+ },
110
+ primary: {
111
+ DEFAULT: 'hsl(var(--primary))',
112
+ foreground: 'hsl(var(--primary-foreground))'
113
+ },
114
+ secondary: {
115
+ DEFAULT: 'hsl(var(--secondary))',
116
+ foreground: 'hsl(var(--secondary-foreground))'
117
+ },
118
+ muted: {
119
+ DEFAULT: 'hsl(var(--muted))',
120
+ foreground: 'hsl(var(--muted-foreground))'
121
+ },
122
+ accent: {
123
+ DEFAULT: 'hsl(var(--accent))',
124
+ foreground: 'hsl(var(--accent-foreground))'
125
+ },
126
+ destructive: {
127
+ DEFAULT: 'hsl(var(--destructive))',
128
+ foreground: 'hsl(var(--destructive-foreground))'
129
+ },
130
+ border: 'hsl(var(--border))',
131
+ input: 'hsl(var(--input))',
132
+ ring: 'hsl(var(--ring))',
133
+ chart: {
134
+ '1': 'hsl(var(--chart-1))',
135
+ '2': 'hsl(var(--chart-2))',
136
+ '3': 'hsl(var(--chart-3))',
137
+ '4': 'hsl(var(--chart-4))',
138
+ '5': 'hsl(var(--chart-5))',
139
+ }
140
+ },
141
+ borderRadius: {
142
+ lg: 'var(--radius)',
143
+ md: 'calc(var(--radius) - 2px)',
144
+ sm: 'calc(var(--radius) - 4px)'
145
+ }
146
+ }
147
+ },
148
+ plugins: [require('tailwindcss-animate')]
149
+ };
150
+ ```
151
+
152
+ ### 4) Opcional: Importar tokens directamente
153
+
154
+ Si preferís importar los tokens desde el paquete:
155
+
156
+ ```css
157
+ @import 'pdm-ui-kit/styles';
158
+ ```
159
+
160
+ > **Nota:** Esta opción aún requiere la configuración de Tailwind content.
161
+
162
+ ---
163
+
164
+ ## ✨ What's New in v0.3.0
165
+
166
+ - 🐛 **Overlay robustness** — Tooltip, popover, hover-card ahora usan CDK Overlay y no se tapan
167
+ - 📱 **Responsive fixes** — Button-group, toggle-group, input-group ahora funcionan en mobile
168
+ - 📦 **CSS bundle** — Tokens exportados para consumo directo
169
+ - 🏷️ **Host display** — Componentes ahora responden correctamente a `w-full`, flex y grid
170
+ - 📜 **Dialog scroll** — Scroll interno ahora funciona correctamente en todos los navegadores
6
171
 
7
172
  - 🎯 **Responsive by default** — Todas las tablas y dialogs manejan mobile correctamente
8
173
  - 🔧 **Generic data-table** — Configurá columnas para cualquier tipo de dato
@@ -19,7 +184,7 @@ Este kit está **basado en el Figma de shadcn/ui** y mantiene una estructura de
19
184
 
20
185
  ## Compatibilidad
21
186
 
22
- - Angular: 13, 14, 15
187
+ - Angular: 15, 16, 17
23
188
  - Arquitectura: NgModules (no standalone)
24
189
  - Estilos: Tailwind CSS v3 + variables CSS del proyecto consumidor
25
190