ywana-core8 0.1.103 → 0.2.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/dist/index.css +4941 -324
- package/dist/index.js +42338 -0
- package/dist/index.js.map +1 -0
- package/dist/index.modern.js +37458 -31678
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +39634 -34010
- package/dist/index.umd.js.map +1 -1
- package/package.json +26 -29
- package/src/Test.stories.jsx +28 -0
- package/src/desktop/Desktop.stories.jsx +110 -0
- package/src/desktop/WindowContext.js +135 -0
- package/src/desktop/WindowManager.js +355 -0
- package/src/desktop/desktop.css +55 -4
- package/src/desktop/desktop.js +312 -6
- package/src/desktop/index.js +7 -0
- package/src/desktop/window.css +229 -36
- package/src/desktop/window.js +254 -20
- package/src/desktop.backup/desktop.css +6 -0
- package/src/desktop.backup/desktop.js +13 -0
- package/src/desktop.backup/window.css +58 -0
- package/src/desktop.backup/window.js +27 -0
- package/src/html/Accordion.stories.jsx +178 -0
- package/src/html/Button.stories.jsx +175 -0
- package/src/html/Checkbox.stories.jsx +131 -0
- package/src/html/Chip.stories.jsx +189 -0
- package/src/html/Color.stories.jsx +234 -0
- package/src/html/Form.stories.jsx +271 -0
- package/src/html/Icon.stories.jsx +233 -0
- package/src/html/Progress.stories.jsx +247 -0
- package/src/html/Radio.stories.jsx +289 -0
- package/src/html/StyleTest.stories.jsx +81 -0
- package/src/html/Switch.stories.jsx +329 -0
- package/src/html/Tab.stories.jsx +239 -0
- package/src/html/Table.stories.jsx +188 -0
- package/src/html/Table2.stories.jsx +238 -0
- package/src/html/TextField2.stories.jsx +337 -0
- package/src/html/Tree.stories.jsx +285 -0
- package/src/html/accordion.example.js +0 -74
- package/src/html/accordion.js +1 -6
- package/src/html/button.js +2 -13
- package/src/html/checkbox.js +1 -9
- package/src/html/chip.js +2 -19
- package/src/html/color.js +1 -14
- package/src/html/form.js +4 -15
- package/src/html/header2.js +1 -12
- package/src/html/icon.js +1 -7
- package/src/html/index.js +1 -1
- package/src/html/list.js +1 -19
- package/src/html/menu.js +9 -5
- package/src/html/progress.js +5 -53
- package/src/html/property.js +9 -25
- package/src/html/radio.js +2 -16
- package/src/html/section.js +1 -6
- package/src/html/selector.js +2 -19
- package/src/html/switch.css +134 -100
- package/src/html/switch.example.js +46 -36
- package/src/html/switch.js +43 -192
- package/src/html/tab.js +3 -24
- package/src/html/text.js +1 -12
- package/src/html/textfield2.js +5 -42
- package/src/html/thumbnail.js +1 -12
- package/src/html/tokenfield.js +2 -21
- package/src/html/tree.js +3 -35
- package/src/index.js +1 -0
- package/__previewjs__/Wrapper.tsx +0 -14
- package/build-doc.sh +0 -10
- package/db/db.json +0 -89
- package/db/routes.json +0 -0
- package/dist/index.cjs +0 -36722
- package/dist/index.cjs.map +0 -1
- package/dist/index.css.map +0 -1
- package/doc/README.md +0 -196
- package/doc/evalulations/ACCORDION_EVALUATION.md +0 -583
- package/doc/evalulations/CHECKBOX_EVALUATION.md +0 -273
- package/doc/evalulations/CHIP_EVALUATION.md +0 -542
- package/doc/evalulations/COLOR_EVALUATION.md +0 -524
- package/doc/evalulations/COMPONENTS_EVALUATION.md +0 -477
- package/doc/evalulations/FORM_EVALUATION.md +0 -459
- package/doc/evalulations/HEADER_EVALUATION.md +0 -436
- package/doc/evalulations/ICON_EVALUATION.md +0 -254
- package/doc/evalulations/LIST_EVALUATION.md +0 -574
- package/doc/evalulations/PROGRESS_EVALUATION.md +0 -450
- package/doc/evalulations/RADIO_EVALUATION.md +0 -439
- package/doc/evalulations/RADIO_VISUAL_FIX.md +0 -183
- package/doc/evalulations/SECTION_IMPROVEMENTS.md +0 -153
- package/doc/evalulations/SWITCH_EVALUATION.md +0 -335
- package/doc/evalulations/SWITCH_VISUAL_FIX.md +0 -232
- package/doc/evalulations/TAB_EVALUATION.md +0 -626
- package/doc/evalulations/TEXTFIELD_EVALUATION.md +0 -747
- package/doc/evalulations/TOOLTIP_FIX.md +0 -157
- package/doc/evalulations/TREE_EVALUATION.md +0 -708
- package/doc/index.html +0 -0
- package/doc/package-lock.json +0 -17298
- package/doc/package.json +0 -34
- package/doc/public/index.html +0 -24
- package/doc/scripts/generate-examples.js +0 -129
- package/doc/src/App.css +0 -171
- package/doc/src/App.js +0 -114
- package/doc/src/components/ExamplePage.js +0 -129
- package/doc/src/components/WelcomePage.js +0 -84
- package/doc/src/index.css +0 -246
- package/doc/src/index.js +0 -17
- package/doc/src/theme.css +0 -256
- package/jest.config.js +0 -24
- package/preview.config.js +0 -38
- package/publish.sh +0 -6
- package/src/desktop/dektop.test.js +0 -11
- package/src/domain/CollectionAPI.test.js +0 -19
- package/src/domain/ContentEditor.test.js +0 -52
- package/src/domain2/CollectionAPI.test.js +0 -19
- package/src/domain2/CollectionContext.test.js +0 -71
- package/src/domain2/CollectionPage.test.js +0 -112
- package/src/domain2/DynamicForm.test.js +0 -47
- package/src/html/accordion.test.js +0 -37
- package/src/html/accordion.unit.test.js +0 -334
- package/src/html/button.example.new.js +0 -416
- package/src/html/button.test.js +0 -422
- package/src/html/checkbox.test.js +0 -285
- package/src/html/chip.test.js +0 -425
- package/src/html/color.example.js.backup +0 -527
- package/src/html/color.test.js +0 -377
- package/src/html/components.example.js.backup +0 -492
- package/src/html/components_enhanced.test.js +0 -581
- package/src/html/form.example.js.backup +0 -385
- package/src/html/form.test.js +0 -369
- package/src/html/header2.example.js.backup +0 -411
- package/src/html/header2.test.js +0 -377
- package/src/html/icon.example.js.backup +0 -268
- package/src/html/icon.test.js +0 -231
- package/src/html/label.test.js +0 -0
- package/src/html/list.example.js.backup +0 -404
- package/src/html/list.test.js +0 -383
- package/src/html/progress.example.js.backup +0 -424
- package/src/html/progress.test.js +0 -313
- package/src/html/property.example.js.backup +0 -553
- package/src/html/property.test.js +0 -371
- package/src/html/radio.example.js.backup +0 -389
- package/src/html/radio.test.js +0 -318
- package/src/html/section.example.js.backup +0 -99
- package/src/html/section.test.js +0 -131
- package/src/html/selector.test.js +0 -20
- package/src/html/switch.example.js.backup +0 -461
- package/src/html/switch.test.js +0 -355
- package/src/html/tab.example.js.backup +0 -446
- package/src/html/tab.test.js +0 -25
- package/src/html/tab_enhanced.test.js +0 -504
- package/src/html/table.test.js +0 -70
- package/src/html/table2.test.js +0 -582
- package/src/html/text.test.js +0 -15
- package/src/html/textfield.test.js +0 -51
- package/src/html/textfield2.example.js.backup +0 -1370
- package/src/html/textfield2.test.js +0 -950
- package/src/html/tokenfield.example.js.backup +0 -503
- package/src/html/tokenfield.test.js +0 -423
- package/src/html/tree.example.js.backup +0 -475
- package/src/html/tree.test.js +0 -43
- package/src/html/tree_enhanced.test.js +0 -495
- package/src/http/token.test.js +0 -50
- package/src/incubator/pdfViewer.js +0 -33
- package/src/incubator/wizard.test.js +0 -127
- package/src/site/site.test.js +0 -230
- package/src/site/view.test.js +0 -41
- package/src/widgets/calendar/Calendar.test.js +0 -28
- package/src/widgets/explorer/Explorer.test.js +0 -121
- package/src/widgets/ide/editor.test.js +0 -33
- package/src/widgets/kanban/Kanban.test.js +0 -78
- package/src/widgets/login/LoginBox.test.js +0 -12
- package/src/widgets/login/ResetPasswordBox.test.js +0 -34
- package/src/widgets/login/validations.test.js +0 -51
- package/src/widgets/planner/Planner.test.js +0 -60
- package/src/widgets/upload/Upload.test.js +0 -32
- package/table2.test.js +0 -454
@@ -1,157 +0,0 @@
|
|
1
|
-
# 🔧 Corrección del Problema de Posicionamiento de Tooltips
|
2
|
-
|
3
|
-
## 🐛 Problema Identificado
|
4
|
-
|
5
|
-
Los tooltips se posicionaban tapando el icono y dificultando hacer clic en él, causando una mala experiencia de usuario.
|
6
|
-
|
7
|
-
### Síntomas:
|
8
|
-
- Tooltip aparecía encima del icono de expansión/contracción
|
9
|
-
- Dificultad para hacer clic en el icono
|
10
|
-
- Interferencia con la interacción del usuario
|
11
|
-
- Posicionamiento por defecto inadecuado
|
12
|
-
|
13
|
-
## ✅ Solución Implementada
|
14
|
-
|
15
|
-
### 1. **Posicionamiento Específico en el Componente Section**
|
16
|
-
|
17
|
-
**Antes:**
|
18
|
-
```javascript
|
19
|
-
tooltip={{ text: isOpen ? 'Contraer sección' : 'Expandir sección' }}
|
20
|
-
```
|
21
|
-
|
22
|
-
**Después:**
|
23
|
-
```javascript
|
24
|
-
tooltip={{
|
25
|
-
text: isOpen ? 'Contraer sección' : 'Expandir sección',
|
26
|
-
top: '-3rem', // Posiciona arriba del icono
|
27
|
-
left: '-2rem' // Ligeramente a la izquierda
|
28
|
-
}}
|
29
|
-
```
|
30
|
-
|
31
|
-
### 2. **Mejoras en el CSS del Tooltip**
|
32
|
-
|
33
|
-
#### Cambios Principales:
|
34
|
-
|
35
|
-
```css
|
36
|
-
.tooltip-text {
|
37
|
-
pointer-events: none; /* Evita interferencia con clics */
|
38
|
-
z-index: 1000; /* Asegura visibilidad */
|
39
|
-
white-space: nowrap; /* Texto en una línea */
|
40
|
-
font-size: 0.8rem; /* Tamaño más compacto */
|
41
|
-
}
|
42
|
-
|
43
|
-
.tooltip:hover .tooltip-text {
|
44
|
-
padding: .4rem .6rem; /* Padding más compacto */
|
45
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* Sombra sutil */
|
46
|
-
animation: tooltip-fade-in 0.2s ease-in-out; /* Animación suave */
|
47
|
-
animation-delay: 0.5s; /* Evita tooltips accidentales */
|
48
|
-
}
|
49
|
-
```
|
50
|
-
|
51
|
-
#### Nueva Animación:
|
52
|
-
|
53
|
-
```css
|
54
|
-
@keyframes tooltip-fade-in {
|
55
|
-
from {
|
56
|
-
opacity: 0;
|
57
|
-
transform: translateY(4px);
|
58
|
-
}
|
59
|
-
to {
|
60
|
-
opacity: 1;
|
61
|
-
transform: translateY(0);
|
62
|
-
}
|
63
|
-
}
|
64
|
-
```
|
65
|
-
|
66
|
-
## 🎯 Beneficios de la Corrección
|
67
|
-
|
68
|
-
### Experiencia de Usuario:
|
69
|
-
- ✅ **Clics sin interferencia**: El tooltip no bloquea la interacción
|
70
|
-
- ✅ **Posicionamiento intuitivo**: Aparece arriba y a la izquierda del icono
|
71
|
-
- ✅ **Animación suave**: Transición elegante al aparecer/desaparecer
|
72
|
-
- ✅ **Delay inteligente**: Evita tooltips accidentales en movimientos rápidos
|
73
|
-
|
74
|
-
### Técnico:
|
75
|
-
- ✅ **pointer-events: none**: Elimina interferencia con eventos de clic
|
76
|
-
- ✅ **z-index optimizado**: Asegura que el tooltip sea visible
|
77
|
-
- ✅ **Tamaño compacto**: Menos intrusivo visualmente
|
78
|
-
- ✅ **Posicionamiento consistente**: Misma lógica aplicable a otros componentes
|
79
|
-
|
80
|
-
## 🧪 Pruebas Actualizadas
|
81
|
-
|
82
|
-
Se actualizó la prueba para verificar el posicionamiento correcto:
|
83
|
-
|
84
|
-
```javascript
|
85
|
-
test('tooltip text and positioning logic works correctly', () => {
|
86
|
-
const getTooltipConfig = (isOpen) => {
|
87
|
-
return {
|
88
|
-
text: isOpen ? 'Contraer sección' : 'Expandir sección',
|
89
|
-
top: '-3rem',
|
90
|
-
left: '-2rem'
|
91
|
-
}
|
92
|
-
}
|
93
|
-
|
94
|
-
const closedTooltip = getTooltipConfig(false)
|
95
|
-
const openTooltip = getTooltipConfig(true)
|
96
|
-
|
97
|
-
// Verificar texto
|
98
|
-
expect(closedTooltip.text).toBe('Expandir sección')
|
99
|
-
expect(openTooltip.text).toBe('Contraer sección')
|
100
|
-
|
101
|
-
// Verificar posicionamiento que evita superposición
|
102
|
-
expect(closedTooltip.top).toBe('-3rem')
|
103
|
-
expect(closedTooltip.left).toBe('-2rem')
|
104
|
-
})
|
105
|
-
```
|
106
|
-
|
107
|
-
## 📊 Impacto
|
108
|
-
|
109
|
-
### Antes de la Corrección:
|
110
|
-
- ❌ Tooltips interferían con la interacción
|
111
|
-
- ❌ Posicionamiento inconsistente
|
112
|
-
- ❌ Experiencia de usuario frustrante
|
113
|
-
|
114
|
-
### Después de la Corrección:
|
115
|
-
- ✅ Interacción fluida y sin obstáculos
|
116
|
-
- ✅ Posicionamiento predecible y consistente
|
117
|
-
- ✅ Experiencia de usuario mejorada significativamente
|
118
|
-
|
119
|
-
## 🚀 Aplicación a Otros Componentes
|
120
|
-
|
121
|
-
Esta corrección se puede aplicar a otros componentes que usen tooltips:
|
122
|
-
|
123
|
-
```javascript
|
124
|
-
// Ejemplo para otros iconos
|
125
|
-
<Icon
|
126
|
-
icon="settings"
|
127
|
-
clickable
|
128
|
-
tooltip={{
|
129
|
-
text: 'Configuración',
|
130
|
-
top: '-3rem',
|
131
|
-
left: '-2rem'
|
132
|
-
}}
|
133
|
-
/>
|
134
|
-
```
|
135
|
-
|
136
|
-
## 📁 Archivos Modificados
|
137
|
-
|
138
|
-
1. **`src/html/section.js`** - Posicionamiento específico del tooltip
|
139
|
-
2. **`src/html/tooltip.css`** - Mejoras en CSS y animaciones
|
140
|
-
3. **`src/html/section.test.js`** - Pruebas actualizadas
|
141
|
-
4. **`src/html/tooltip-positioning-demo.js`** - Demostración de la corrección
|
142
|
-
|
143
|
-
## ✅ Verificación
|
144
|
-
|
145
|
-
Para verificar que la corrección funciona:
|
146
|
-
|
147
|
-
1. **Ejecutar pruebas:**
|
148
|
-
```bash
|
149
|
-
npm test -- --testPathPattern=section.test.js --watchAll=false
|
150
|
-
```
|
151
|
-
|
152
|
-
2. **Probar visualmente:**
|
153
|
-
- Hacer hover sobre el icono de expansión/contracción
|
154
|
-
- Verificar que el tooltip aparece sin tapar el icono
|
155
|
-
- Confirmar que el clic funciona sin problemas
|
156
|
-
|
157
|
-
La corrección resuelve completamente el problema de posicionamiento de tooltips, mejorando significativamente la experiencia de usuario y la usabilidad del componente.
|