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.
- package/README.md +168 -3
- package/esm2020/lib/components/button-group/button-group.component.mjs +211 -182
- package/esm2020/lib/components/combobox/combobox.component.mjs +136 -14
- package/esm2020/lib/components/context-menu/context-menu.component.mjs +121 -42
- package/esm2020/lib/components/data-table/data-table.component.mjs +3 -3
- package/esm2020/lib/components/date-picker/date-picker.component.mjs +66 -54
- package/esm2020/lib/components/dialog/dialog.component.mjs +111 -94
- package/esm2020/lib/components/hover-card/hover-card.component.mjs +185 -24
- package/esm2020/lib/components/input/input.component.mjs +15 -15
- package/esm2020/lib/components/input-group/input-group.component.mjs +14 -14
- package/esm2020/lib/components/menubar/menubar.component.mjs +105 -29
- package/esm2020/lib/components/popover/popover.component.mjs +107 -75
- package/esm2020/lib/components/select/select.component.mjs +23 -22
- package/esm2020/lib/components/table/table.component.mjs +77 -68
- package/esm2020/lib/components/tabs/tabs.component.mjs +6 -6
- package/esm2020/lib/components/toggle-group/toggle-group.component.mjs +6 -6
- package/esm2020/lib/components/tooltip/tooltip.component.mjs +162 -19
- package/esm2020/lib/overlay/z-index-helper.mjs +69 -0
- package/esm2020/lib/utils/z-index.mjs +25 -28
- package/esm2020/public-api.mjs +67 -66
- package/fesm2015/pdm-ui-kit.mjs +1379 -654
- package/fesm2015/pdm-ui-kit.mjs.map +1 -1
- package/fesm2020/pdm-ui-kit.mjs +1383 -654
- package/fesm2020/pdm-ui-kit.mjs.map +1 -1
- package/lib/components/button-group/button-group.component.d.ts +8 -2
- package/lib/components/combobox/combobox.component.d.ts +20 -3
- package/lib/components/context-menu/context-menu.component.d.ts +17 -8
- package/lib/components/date-picker/date-picker.component.d.ts +5 -6
- package/lib/components/dialog/dialog.component.d.ts +5 -5
- package/lib/components/hover-card/hover-card.component.d.ts +27 -4
- package/lib/components/input/input.component.d.ts +3 -3
- package/lib/components/input-group/input-group.component.d.ts +1 -1
- package/lib/components/menubar/menubar.component.d.ts +16 -8
- package/lib/components/popover/popover.component.d.ts +13 -12
- package/lib/components/select/select.component.d.ts +4 -5
- package/lib/components/table/table.component.d.ts +2 -2
- package/lib/components/tabs/tabs.component.d.ts +1 -1
- package/lib/components/toggle-group/toggle-group.component.d.ts +1 -1
- package/lib/components/tooltip/tooltip.component.d.ts +21 -3
- package/lib/overlay/z-index-helper.d.ts +36 -0
- package/lib/utils/z-index.d.ts +14 -18
- package/package.json +6 -6
- package/public-api.d.ts +66 -65
- package/src/lib/styles/tokens.css +182 -0
package/public-api.d.ts
CHANGED
|
@@ -1,65 +1,66 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
33
|
-
export * from
|
|
34
|
-
export * from
|
|
35
|
-
export * from
|
|
36
|
-
export * from
|
|
37
|
-
export * from
|
|
38
|
-
export * from
|
|
39
|
-
export * from
|
|
40
|
-
export * from
|
|
41
|
-
export * from
|
|
42
|
-
export * from
|
|
43
|
-
export * from
|
|
44
|
-
export * from
|
|
45
|
-
export * from
|
|
46
|
-
export * from
|
|
47
|
-
export * from
|
|
48
|
-
export * from
|
|
49
|
-
export * from
|
|
50
|
-
export * from
|
|
51
|
-
export * from
|
|
52
|
-
export * from
|
|
53
|
-
export * from
|
|
54
|
-
export * from
|
|
55
|
-
export * from
|
|
56
|
-
export * from
|
|
57
|
-
export * from
|
|
58
|
-
export * from
|
|
59
|
-
export * from
|
|
60
|
-
export * from
|
|
61
|
-
export * from
|
|
62
|
-
export * from
|
|
63
|
-
export * from
|
|
64
|
-
export * from
|
|
65
|
-
export * from
|
|
1
|
+
export * from "./lib/pdm-ui-kit.module";
|
|
2
|
+
export * from "./lib/overlay/pdm-overlay-options";
|
|
3
|
+
export * from "./lib/overlay/create-flexible-position-strategy";
|
|
4
|
+
export * from "./lib/overlay/pdm-outside-click.directive";
|
|
5
|
+
export * from "./lib/overlay/z-index-helper";
|
|
6
|
+
export * from "./lib/utils/responsive";
|
|
7
|
+
export * from "./lib/utils/z-index";
|
|
8
|
+
export * from "./lib/components/accordion/accordion.component";
|
|
9
|
+
export * from "./lib/components/alert/alert.component";
|
|
10
|
+
export * from "./lib/components/alert-dialog/alert-dialog.component";
|
|
11
|
+
export * from "./lib/components/aspect-ratio/aspect-ratio.component";
|
|
12
|
+
export * from "./lib/components/avatar/avatar.component";
|
|
13
|
+
export * from "./lib/components/badge/badge.component";
|
|
14
|
+
export * from "./lib/components/breadcrumb/breadcrumb.component";
|
|
15
|
+
export * from "./lib/components/button-group/button-group.component";
|
|
16
|
+
export * from "./lib/components/button/button.component";
|
|
17
|
+
export * from "./lib/components/calendar/calendar.component";
|
|
18
|
+
export * from "./lib/components/carousel/carousel.component";
|
|
19
|
+
export * from "./lib/components/card/card.component";
|
|
20
|
+
export * from "./lib/components/chart/chart.component";
|
|
21
|
+
export * from "./lib/components/checkbox/checkbox.component";
|
|
22
|
+
export * from "./lib/components/collapsible/collapsible.component";
|
|
23
|
+
export * from "./lib/components/combobox/combobox.component";
|
|
24
|
+
export * from "./lib/components/command/command.component";
|
|
25
|
+
export * from "./lib/components/context-menu/context-menu.component";
|
|
26
|
+
export * from "./lib/components/data-table/data-table.component";
|
|
27
|
+
export * from "./lib/components/date-picker/date-picker.component";
|
|
28
|
+
export * from "./lib/components/dialog/dialog.component";
|
|
29
|
+
export * from "./lib/components/draggable-table/draggable-table.component";
|
|
30
|
+
export * from "./lib/components/dropdown-menu/dropdown-menu.component";
|
|
31
|
+
export * from "./lib/components/drawer/drawer.component";
|
|
32
|
+
export * from "./lib/components/empty/empty.component";
|
|
33
|
+
export * from "./lib/components/field/field.component";
|
|
34
|
+
export * from "./lib/components/hover-card/hover-card.component";
|
|
35
|
+
export * from "./lib/components/icon/icon.component";
|
|
36
|
+
export * from "./lib/components/item/item.component";
|
|
37
|
+
export * from "./lib/components/input/input.component";
|
|
38
|
+
export * from "./lib/components/input-password/input-password.component";
|
|
39
|
+
export * from "./lib/components/input-group/input-group.component";
|
|
40
|
+
export * from "./lib/components/input-otp/input-otp.component";
|
|
41
|
+
export * from "./lib/components/kbd/kbd.component";
|
|
42
|
+
export * from "./lib/components/label/label.component";
|
|
43
|
+
export * from "./lib/components/menubar/menubar.component";
|
|
44
|
+
export * from "./lib/components/native-select/native-select.component";
|
|
45
|
+
export * from "./lib/components/navigation-menu/navigation-menu.component";
|
|
46
|
+
export * from "./lib/components/pagination/pagination.component";
|
|
47
|
+
export * from "./lib/components/popover/popover.component";
|
|
48
|
+
export * from "./lib/components/progress/progress.component";
|
|
49
|
+
export * from "./lib/components/radio-group/radio-group.component";
|
|
50
|
+
export * from "./lib/components/scroll-area/scroll-area.component";
|
|
51
|
+
export * from "./lib/components/select/select.component";
|
|
52
|
+
export * from "./lib/components/select/select-option.directive";
|
|
53
|
+
export * from "./lib/components/separator/separator.component";
|
|
54
|
+
export * from "./lib/components/sheet/sheet.component";
|
|
55
|
+
export * from "./lib/components/sidebar/sidebar.component";
|
|
56
|
+
export * from "./lib/components/skeleton/skeleton.component";
|
|
57
|
+
export * from "./lib/components/slider/slider.component";
|
|
58
|
+
export * from "./lib/components/sonner/sonner.component";
|
|
59
|
+
export * from "./lib/components/spinner/spinner.component";
|
|
60
|
+
export * from "./lib/components/switch/switch.component";
|
|
61
|
+
export * from "./lib/components/table/table.component";
|
|
62
|
+
export * from "./lib/components/tabs/tabs.component";
|
|
63
|
+
export * from "./lib/components/textarea/textarea.component";
|
|
64
|
+
export * from "./lib/components/toggle/toggle.component";
|
|
65
|
+
export * from "./lib/components/toggle-group/toggle-group.component";
|
|
66
|
+
export * from "./lib/components/tooltip/tooltip.component";
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PDM UI Kit - CSS Design Tokens
|
|
3
|
+
*
|
|
4
|
+
* Este archivo define los tokens de diseño centralizados que los componentes
|
|
5
|
+
* consumen via CSS custom properties (variables CSS).
|
|
6
|
+
*
|
|
7
|
+
* USO:
|
|
8
|
+
* 1. Importar en el proyecto consumidor: @import 'pdm-ui-kit/styles';
|
|
9
|
+
* 2. O copiar las variables al CSS base del consumidor
|
|
10
|
+
*
|
|
11
|
+
* TOKENS DEFINIDOS:
|
|
12
|
+
* - Colores: background, foreground, primary, secondary, muted, accent, destructive, etc.
|
|
13
|
+
* - Bordes: border, input, ring
|
|
14
|
+
* - Radio: radius
|
|
15
|
+
* - Charts: --chart-1 a --chart-4
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
:root {
|
|
19
|
+
/* ============================================
|
|
20
|
+
* COLORES BASE
|
|
21
|
+
* ============================================ */
|
|
22
|
+
|
|
23
|
+
/* Background - Color de fondo principal */
|
|
24
|
+
--background: 0 0% 100%;
|
|
25
|
+
|
|
26
|
+
/* Foreground - Color de texto principal */
|
|
27
|
+
--foreground: 222.2 84% 4.9%;
|
|
28
|
+
|
|
29
|
+
/* ============================================
|
|
30
|
+
* COLORES DE COMPONENTE
|
|
31
|
+
* ============================================ */
|
|
32
|
+
|
|
33
|
+
/* Card - Fondo para tarjetas y contenedores elevados */
|
|
34
|
+
--card: 0 0% 100%;
|
|
35
|
+
--card-foreground: 222.2 84% 4.9%;
|
|
36
|
+
|
|
37
|
+
/* Popover - Fondo para elementos flotantes */
|
|
38
|
+
--popover: 0 0% 100%;
|
|
39
|
+
--popover-foreground: 222.2 84% 4.9%;
|
|
40
|
+
|
|
41
|
+
/* Primary - Color primario de la marca */
|
|
42
|
+
--primary: 221.2 83.2% 53.3%;
|
|
43
|
+
--primary-foreground: 210 40% 98%;
|
|
44
|
+
|
|
45
|
+
/* Secondary - Color secundario */
|
|
46
|
+
--secondary: 210 40% 96.1%;
|
|
47
|
+
--secondary-foreground: 222.2 47.4% 11.2%;
|
|
48
|
+
|
|
49
|
+
/* Muted - Elementos discretos/silueteados */
|
|
50
|
+
--muted: 210 40% 96.1%;
|
|
51
|
+
--muted-foreground: 215.4 16.3% 46.9%;
|
|
52
|
+
|
|
53
|
+
/* Accent - Acentos y elementos destacados */
|
|
54
|
+
--accent: 210 40% 96.1%;
|
|
55
|
+
--accent-foreground: 222.2 47.4% 11.2%;
|
|
56
|
+
|
|
57
|
+
/* Destructive - Acciones destructivas (borrar, error) */
|
|
58
|
+
--destructive: 0 84.2% 60.2%;
|
|
59
|
+
--destructive-foreground: 210 40% 98%;
|
|
60
|
+
|
|
61
|
+
/* ============================================
|
|
62
|
+
* BORDES Y INPUTS
|
|
63
|
+
* ============================================ */
|
|
64
|
+
|
|
65
|
+
/* Border - Bordes de componentes */
|
|
66
|
+
--border: 214.3 31.8% 91.4%;
|
|
67
|
+
|
|
68
|
+
/* Input - Bordes de campos de entrada */
|
|
69
|
+
--input: 214.3 31.8% 91.4%;
|
|
70
|
+
|
|
71
|
+
/* Ring - Anillos de focus/accessibility */
|
|
72
|
+
--ring: 221.2 83.2% 53.3%;
|
|
73
|
+
|
|
74
|
+
/* ============================================
|
|
75
|
+
* RADIO DE BORDES
|
|
76
|
+
* ============================================ */
|
|
77
|
+
|
|
78
|
+
--radius: 0.5rem;
|
|
79
|
+
|
|
80
|
+
/* ============================================
|
|
81
|
+
* COLORES DE CHARTS (para pdm-chart)
|
|
82
|
+
* ============================================ */
|
|
83
|
+
|
|
84
|
+
--chart-1: 12 76% 61%;
|
|
85
|
+
--chart-2: 173 58% 39%;
|
|
86
|
+
--chart-3: 197 37% 24%;
|
|
87
|
+
--chart-4: 43 74% 66%;
|
|
88
|
+
--chart-5: 27 87% 67%;
|
|
89
|
+
|
|
90
|
+
/* ============================================
|
|
91
|
+
* VARIANTES DARK MODE (opcional)
|
|
92
|
+
* ============================================ */
|
|
93
|
+
|
|
94
|
+
/* Descomentar para dark mode:
|
|
95
|
+
.dark {
|
|
96
|
+
--background: 222.2 84% 4.9%;
|
|
97
|
+
--foreground: 210 40% 98%;
|
|
98
|
+
--card: 222.2 84% 4.9%;
|
|
99
|
+
--card-foreground: 210 40% 98%;
|
|
100
|
+
--popover: 222.2 84% 4.9%;
|
|
101
|
+
--popover-foreground: 210 40% 98%;
|
|
102
|
+
--primary: 217.2 91.2% 59.8%;
|
|
103
|
+
--primary-foreground: 222.2 47.4% 11.2%;
|
|
104
|
+
--secondary: 217.2 32.6% 17.5%;
|
|
105
|
+
--secondary-foreground: 210 40% 98%;
|
|
106
|
+
--muted: 217.2 32.6% 17.5%;
|
|
107
|
+
--muted-foreground: 215 20.2% 65.1%;
|
|
108
|
+
--accent: 217.2 32.6% 17.5%;
|
|
109
|
+
--accent-foreground: 210 40% 98%;
|
|
110
|
+
--destructive: 0 62.8% 30.6%;
|
|
111
|
+
--destructive-foreground: 210 40% 98%;
|
|
112
|
+
--border: 217.2 32.6% 17.5%;
|
|
113
|
+
--input: 217.2 32.6% 17.5%;
|
|
114
|
+
--ring: 224.3 76.3% 48%;
|
|
115
|
+
}
|
|
116
|
+
*/
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* CONFIGURACIÓN TAILWIND (para el proyecto consumidor)
|
|
121
|
+
*
|
|
122
|
+
* Agregar en tailwind.config.js:
|
|
123
|
+
*
|
|
124
|
+
* module.exports = {
|
|
125
|
+
* content: [
|
|
126
|
+
* // ... otros paths
|
|
127
|
+
* 'node_modules/pdm-ui-kit/**/*.{ts,html}',
|
|
128
|
+
* ],
|
|
129
|
+
* theme: {
|
|
130
|
+
* extend: {
|
|
131
|
+
* colors: {
|
|
132
|
+
* background: 'hsl(var(--background))',
|
|
133
|
+
* foreground: 'hsl(var(--foreground))',
|
|
134
|
+
* card: {
|
|
135
|
+
* DEFAULT: 'hsl(var(--card))',
|
|
136
|
+
* foreground: 'hsl(var(--card-foreground))'
|
|
137
|
+
* },
|
|
138
|
+
* popover: {
|
|
139
|
+
* DEFAULT: 'hsl(var(--popover))',
|
|
140
|
+
* foreground: 'hsl(var(--popover-foreground))'
|
|
141
|
+
* },
|
|
142
|
+
* primary: {
|
|
143
|
+
* DEFAULT: 'hsl(var(--primary))',
|
|
144
|
+
* foreground: 'hsl(var(--primary-foreground))'
|
|
145
|
+
* },
|
|
146
|
+
* secondary: {
|
|
147
|
+
* DEFAULT: 'hsl(var(--secondary))',
|
|
148
|
+
* foreground: 'hsl(var(--secondary-foreground))'
|
|
149
|
+
* },
|
|
150
|
+
* muted: {
|
|
151
|
+
* DEFAULT: 'hsl(var(--muted))',
|
|
152
|
+
* foreground: 'hsl(var(--muted-foreground))'
|
|
153
|
+
* },
|
|
154
|
+
* accent: {
|
|
155
|
+
* DEFAULT: 'hsl(var(--accent))',
|
|
156
|
+
* foreground: 'hsl(var(--accent-foreground))'
|
|
157
|
+
* },
|
|
158
|
+
* destructive: {
|
|
159
|
+
* DEFAULT: 'hsl(var(--destructive))',
|
|
160
|
+
* foreground: 'hsl(var(--destructive-foreground))'
|
|
161
|
+
* },
|
|
162
|
+
* border: 'hsl(var(--border))',
|
|
163
|
+
* input: 'hsl(var(--input))',
|
|
164
|
+
* ring: 'hsl(var(--ring))',
|
|
165
|
+
* chart: {
|
|
166
|
+
* '1': 'hsl(var(--chart-1))',
|
|
167
|
+
* '2': 'hsl(var(--chart-2))',
|
|
168
|
+
* '3': 'hsl(var(--chart-3))',
|
|
169
|
+
* '4': 'hsl(var(--chart-4))',
|
|
170
|
+
* '5': 'hsl(var(--chart-5))',
|
|
171
|
+
* }
|
|
172
|
+
* },
|
|
173
|
+
* borderRadius: {
|
|
174
|
+
* lg: 'var(--radius)',
|
|
175
|
+
* md: 'calc(var(--radius) - 2px)',
|
|
176
|
+
* sm: 'calc(var(--radius) - 4px)'
|
|
177
|
+
* }
|
|
178
|
+
* }
|
|
179
|
+
* },
|
|
180
|
+
* plugins: [require('tailwindcss-animate')]
|
|
181
|
+
* }
|
|
182
|
+
*/
|