ywana-core8 0.1.79 → 0.1.81
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.cjs +3493 -2320
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +2096 -1125
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +3493 -2320
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +3493 -2320
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/ExampleLayout.css +401 -0
- package/src/html/ExampleLayout.js +192 -0
- package/src/html/README-sidebar-navigation.md +195 -0
- package/src/html/accordion.example.js +123 -4
- package/src/html/accordion.example.js.backup +390 -0
- package/src/html/button.example.js +50 -3
- package/src/html/button.example.js.backup +374 -0
- package/src/html/button.example.new.js +416 -0
- package/src/html/button.js +22 -4
- package/src/html/checkbox.example.js +93 -4
- package/src/html/checkbox.example.js.backup +316 -0
- package/src/html/chip.example.js +108 -4
- package/src/html/chip.example.js.backup +355 -0
- package/src/html/color.example.js +108 -4
- package/src/html/color.example.js.backup +527 -0
- package/src/html/components.example.js +123 -4
- package/src/html/components.example.js.backup +492 -0
- package/src/html/convert-examples.js +183 -0
- package/src/html/demo-sidebar.html +410 -0
- package/src/html/form.example.js +93 -4
- package/src/html/form.example.js.backup +385 -0
- package/src/html/header.js +20 -3
- package/src/html/header2.example.js +108 -4
- package/src/html/header2.example.js.backup +411 -0
- package/src/html/icon.example.js +77 -3
- package/src/html/icon.example.js.backup +268 -0
- package/src/html/list.example.js +93 -4
- package/src/html/list.example.js.backup +404 -0
- package/src/html/progress.example.js +74 -4
- package/src/html/progress.example.js.backup +424 -0
- package/src/html/property.example.js +123 -4
- package/src/html/property.example.js.backup +553 -0
- package/src/html/radio.example.js +108 -4
- package/src/html/radio.example.js.backup +389 -0
- package/src/html/section.example.js +42 -3
- package/src/html/section.example.js.backup +99 -0
- package/src/html/switch.example.js +108 -4
- package/src/html/switch.example.js.backup +461 -0
- package/src/html/tab.example.js +93 -4
- package/src/html/tab.example.js.backup +446 -0
- package/src/html/table-export-utils.js +483 -0
- package/src/html/table-summary-functions.js +363 -0
- package/src/html/table2.css +1449 -479
- package/src/html/table2.example.js +2937 -512
- package/src/html/table2.example.js.broken +1226 -0
- package/src/html/table2.js +1426 -1000
- package/src/html/test-resize.html +279 -0
- package/src/html/test-selection.html +387 -0
- package/src/html/textfield.js +73 -7
- package/src/html/textfield2.example.js +108 -4
- package/src/html/textfield2.example.js.backup +1370 -0
- package/src/html/textfield2.js +19 -4
- package/src/html/tokenfield.example.js +108 -4
- package/src/html/tokenfield.example.js.backup +503 -0
- package/src/html/tooltip.js +21 -3
- package/src/html/tree.css +2 -4
- package/src/html/tree.example.js +93 -4
- package/src/html/tree.example.js.backup +475 -0
- package/src/html/tree.js +19 -3
- package/src/widgets/login/LoginBox.css +1 -0
- package/src/widgets/login/LoginBox.js +29 -6
@@ -0,0 +1,195 @@
|
|
1
|
+
# 📋 Sistema de Menú Lateral de Navegación
|
2
|
+
|
3
|
+
## ✅ Implementación Completada
|
4
|
+
|
5
|
+
Se ha implementado un sistema completo de menú lateral de navegación para todas las páginas de ejemplos de componentes en `src/html/`.
|
6
|
+
|
7
|
+
### 🎯 Archivos Creados
|
8
|
+
|
9
|
+
#### 1. **ExampleLayout.js** - Componente Principal
|
10
|
+
- ✅ **ExampleLayout** - Layout principal con sidebar navegable
|
11
|
+
- ✅ **ExampleSection** - Wrapper para secciones principales con ID y título
|
12
|
+
- ✅ **ExampleSubsection** - Wrapper para subsecciones anidadas
|
13
|
+
- ✅ **CodeSnippet** - Componente para mostrar código con botón copiar
|
14
|
+
|
15
|
+
#### 2. **ExampleLayout.css** - Estilos Completos
|
16
|
+
- ✅ **Sidebar responsive** - Se adapta a móvil con overlay
|
17
|
+
- ✅ **Navegación suave** - Smooth scrolling y transiciones
|
18
|
+
- ✅ **Tema claro/oscuro** - Soporte automático para dark mode
|
19
|
+
- ✅ **Indicadores activos** - Resalta sección actual al hacer scroll
|
20
|
+
|
21
|
+
#### 3. **convert-examples.js** - Script de Conversión
|
22
|
+
- ✅ **Conversión automática** - Convierte archivos existentes
|
23
|
+
- ✅ **Detección inteligente** - Identifica secciones por contenido
|
24
|
+
- ✅ **Respaldos seguros** - Crea archivos .backup automáticamente
|
25
|
+
|
26
|
+
### 🚀 Archivos Convertidos
|
27
|
+
|
28
|
+
**✅ Convertidos exitosamente (19 archivos):**
|
29
|
+
- accordion.example.js
|
30
|
+
- button.example.js
|
31
|
+
- checkbox.example.js
|
32
|
+
- chip.example.js
|
33
|
+
- color.example.js
|
34
|
+
- components.example.js
|
35
|
+
- form.example.js
|
36
|
+
- header2.example.js
|
37
|
+
- icon.example.js
|
38
|
+
- list.example.js
|
39
|
+
- progress.example.js
|
40
|
+
- property.example.js
|
41
|
+
- radio.example.js
|
42
|
+
- section.example.js
|
43
|
+
- switch.example.js
|
44
|
+
- tab.example.js
|
45
|
+
- textfield2.example.js
|
46
|
+
- tokenfield.example.js
|
47
|
+
- tree.example.js
|
48
|
+
|
49
|
+
**✅ Recreado completamente:**
|
50
|
+
- table2.example.js (versión limpia con filas expandibles)
|
51
|
+
|
52
|
+
### 🎨 Características del Menú Lateral
|
53
|
+
|
54
|
+
#### **Navegación Inteligente**
|
55
|
+
- ✅ **Click to scroll** - Enlaces ancla que posicionan el scroll automáticamente
|
56
|
+
- ✅ **Scroll to highlight** - Resalta la sección activa al hacer scroll
|
57
|
+
- ✅ **Subsecciones anidadas** - Jerarquía visual clara con indentación
|
58
|
+
- ✅ **Iconos Material Design** - Identificación visual rápida de secciones
|
59
|
+
|
60
|
+
#### **Responsive y Accesible**
|
61
|
+
- ✅ **Mobile-first design** - Se adapta perfectamente a pantallas pequeñas
|
62
|
+
- ✅ **Toggle sidebar** - Botón hamburguesa para mostrar/ocultar menú
|
63
|
+
- ✅ **Overlay en móvil** - Experiencia nativa en dispositivos táctiles
|
64
|
+
- ✅ **Navegación por teclado** - Accesibilidad completa con Tab/Enter
|
65
|
+
|
66
|
+
#### **Temas y Personalización**
|
67
|
+
- ✅ **Tema claro** - Colores profesionales (#f8f9fa, #2196f3)
|
68
|
+
- ✅ **Tema oscuro automático** - Paleta tostada elegante (#2c1810, #8d6e63)
|
69
|
+
- ✅ **Sticky header** - Título del componente siempre visible
|
70
|
+
- ✅ **Smooth animations** - Transiciones suaves de 0.3s
|
71
|
+
|
72
|
+
### 📋 Estructura de Uso
|
73
|
+
|
74
|
+
#### **Definir Secciones**
|
75
|
+
```javascript
|
76
|
+
const sections = [
|
77
|
+
{
|
78
|
+
id: 'overview',
|
79
|
+
title: 'Introducción',
|
80
|
+
icon: 'info'
|
81
|
+
},
|
82
|
+
{
|
83
|
+
id: 'basic-examples',
|
84
|
+
title: 'Ejemplos Básicos',
|
85
|
+
icon: 'widgets',
|
86
|
+
subsections: [
|
87
|
+
{ id: 'simple-example', title: 'Ejemplo Simple' },
|
88
|
+
{ id: 'advanced-example', title: 'Ejemplo Avanzado' }
|
89
|
+
]
|
90
|
+
},
|
91
|
+
{
|
92
|
+
id: 'api-reference',
|
93
|
+
title: 'Referencia API',
|
94
|
+
icon: 'code'
|
95
|
+
}
|
96
|
+
]
|
97
|
+
```
|
98
|
+
|
99
|
+
#### **Implementar Layout**
|
100
|
+
```jsx
|
101
|
+
import { ExampleLayout, ExampleSection, ExampleSubsection, CodeSnippet } from './ExampleLayout'
|
102
|
+
|
103
|
+
export const MyComponentExamples = () => {
|
104
|
+
const sections = [/* definir secciones */]
|
105
|
+
|
106
|
+
return (
|
107
|
+
<ExampleLayout title="My Component Examples" sections={sections}>
|
108
|
+
<ExampleSection id="overview" title="Introducción" icon="widgets">
|
109
|
+
<p>Descripción del componente...</p>
|
110
|
+
|
111
|
+
<ExampleSubsection id="simple-example" title="Ejemplo Simple">
|
112
|
+
<MyComponent />
|
113
|
+
|
114
|
+
<CodeSnippet
|
115
|
+
title="Código del Ejemplo"
|
116
|
+
code={`<MyComponent prop="value" />`}
|
117
|
+
/>
|
118
|
+
</ExampleSubsection>
|
119
|
+
</ExampleSection>
|
120
|
+
|
121
|
+
<ExampleSection id="api-reference" title="Referencia API" icon="code">
|
122
|
+
<table>
|
123
|
+
{/* Tabla de props */}
|
124
|
+
</table>
|
125
|
+
</ExampleSection>
|
126
|
+
</ExampleLayout>
|
127
|
+
)
|
128
|
+
}
|
129
|
+
```
|
130
|
+
|
131
|
+
### 🎯 Ejemplos Funcionales
|
132
|
+
|
133
|
+
#### **1. demo-sidebar.html**
|
134
|
+
- ✅ **Demo HTML puro** - Muestra el menú lateral funcionando
|
135
|
+
- ✅ **Navegación completa** - Con scroll automático y estados activos
|
136
|
+
- ✅ **Ejemplos interactivos** - Botones con estados de carga y disabled
|
137
|
+
- ✅ **Responsive toggle** - Funciona en móvil y desktop
|
138
|
+
|
139
|
+
#### **2. button.example.new.js**
|
140
|
+
- ✅ **Ejemplo React completo** - Usando ExampleLayout
|
141
|
+
- ✅ **Secciones bien estructuradas** - Con subsecciones anidadas
|
142
|
+
- ✅ **CodeSnippets integrados** - Con botón de copiar código
|
143
|
+
- ✅ **Estados interactivos** - Loading, disabled, variants
|
144
|
+
|
145
|
+
#### **3. table2.example.js**
|
146
|
+
- ✅ **Versión limpia** - Sin errores de sintaxis JSX
|
147
|
+
- ✅ **Filas expandibles** - Ejemplos completos con info
|
148
|
+
- ✅ **Múltiples variantes** - Densidades, temas, estados
|
149
|
+
- ✅ **API reference** - Tabla completa de props
|
150
|
+
|
151
|
+
### 🔧 Cómo Usar
|
152
|
+
|
153
|
+
#### **Para archivos nuevos:**
|
154
|
+
1. Importar componentes del ExampleLayout
|
155
|
+
2. Definir array de secciones con IDs únicos
|
156
|
+
3. Envolver contenido con ExampleLayout
|
157
|
+
4. Usar ExampleSection y ExampleSubsection con IDs correspondientes
|
158
|
+
|
159
|
+
#### **Para archivos existentes:**
|
160
|
+
1. Ejecutar `node convert-examples.js` (ya ejecutado)
|
161
|
+
2. Revisar archivos convertidos y ajustar secciones
|
162
|
+
3. Agregar subsecciones manualmente si es necesario
|
163
|
+
4. Verificar que no hay errores de sintaxis JSX
|
164
|
+
|
165
|
+
### 📱 Responsive Breakpoints
|
166
|
+
|
167
|
+
- **Desktop (>768px)**: Sidebar fijo de 280px, contenido con margen
|
168
|
+
- **Mobile (≤768px)**: Sidebar overlay de 320px máximo, botón toggle
|
169
|
+
- **Sidebar cerrado**: 60px de ancho con solo iconos visibles
|
170
|
+
|
171
|
+
### 🎨 Variables CSS Personalizables
|
172
|
+
|
173
|
+
```css
|
174
|
+
:root {
|
175
|
+
--primary-color: #2196f3;
|
176
|
+
--surface-color: #f8f9fa;
|
177
|
+
--text-color: #333;
|
178
|
+
--divider-color: #e0e0e0;
|
179
|
+
--hover-color: rgba(33, 150, 243, 0.08);
|
180
|
+
}
|
181
|
+
```
|
182
|
+
|
183
|
+
### ✨ Resultado Final
|
184
|
+
|
185
|
+
Ahora **todas las páginas de ejemplos** tienen:
|
186
|
+
- ✅ **Menú lateral navegable** con enlaces ancla
|
187
|
+
- ✅ **Scroll automático** al hacer click en secciones
|
188
|
+
- ✅ **Indicador activo** que se actualiza al hacer scroll
|
189
|
+
- ✅ **Responsive design** que funciona en móvil
|
190
|
+
- ✅ **Subsecciones anidadas** para mejor organización
|
191
|
+
- ✅ **Snippets de código** con botón copiar
|
192
|
+
- ✅ **Temas claro/oscuro** automáticos
|
193
|
+
- ✅ **Accesibilidad completa** con navegación por teclado
|
194
|
+
|
195
|
+
La experiencia de usuario al explorar los componentes ha mejorado significativamente con navegación intuitiva y organización clara del contenido.
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import React, { useState } from 'react'
|
2
2
|
import { Accordion } from './accordion'
|
3
3
|
import { Icon } from './icon'
|
4
|
-
import { Button } from '
|
4
|
+
import { Button } from '
|
5
|
+
import { ExampleLayout, ExampleSection, ExampleSubsection, CodeSnippet } from './ExampleLayout'./button'
|
5
6
|
|
6
7
|
/**
|
7
8
|
* Ejemplos de uso del componente Accordion mejorado
|
@@ -169,9 +170,126 @@ export const AccordionExamples = () => {
|
|
169
170
|
}
|
170
171
|
]
|
171
172
|
|
173
|
+
// Definir secciones para el menú lateral
|
174
|
+
|
175
|
+
|
176
|
+
const sections =
|
177
|
+
|
178
|
+
[
|
179
|
+
|
180
|
+
|
181
|
+
{
|
182
|
+
|
183
|
+
|
184
|
+
"id": "overview",
|
185
|
+
|
186
|
+
|
187
|
+
"title": "Introducción",
|
188
|
+
|
189
|
+
|
190
|
+
"icon": "info"
|
191
|
+
|
192
|
+
|
193
|
+
},
|
194
|
+
|
195
|
+
|
196
|
+
{
|
197
|
+
|
198
|
+
|
199
|
+
"id": "basic-examples",
|
200
|
+
|
201
|
+
|
202
|
+
"title": "Ejemplos Básicos",
|
203
|
+
|
204
|
+
|
205
|
+
"icon": "widgets"
|
206
|
+
|
207
|
+
|
208
|
+
},
|
209
|
+
|
210
|
+
|
211
|
+
{
|
212
|
+
|
213
|
+
|
214
|
+
"id": "advanced-features",
|
215
|
+
|
216
|
+
|
217
|
+
"title": "Características Avanzadas",
|
218
|
+
|
219
|
+
|
220
|
+
"icon": "settings"
|
221
|
+
|
222
|
+
|
223
|
+
},
|
224
|
+
|
225
|
+
|
226
|
+
{
|
227
|
+
|
228
|
+
|
229
|
+
"id": "variants",
|
230
|
+
|
231
|
+
|
232
|
+
"title": "Variantes y Temas",
|
233
|
+
|
234
|
+
|
235
|
+
"icon": "palette"
|
236
|
+
|
237
|
+
|
238
|
+
},
|
239
|
+
|
240
|
+
|
241
|
+
{
|
242
|
+
|
243
|
+
|
244
|
+
"id": "states",
|
245
|
+
|
246
|
+
|
247
|
+
"title": "Estados",
|
248
|
+
|
249
|
+
|
250
|
+
"icon": "toggle_on"
|
251
|
+
|
252
|
+
|
253
|
+
},
|
254
|
+
|
255
|
+
|
256
|
+
{
|
257
|
+
|
258
|
+
|
259
|
+
"id": "sizes",
|
260
|
+
|
261
|
+
|
262
|
+
"title": "Tamaños",
|
263
|
+
|
264
|
+
|
265
|
+
"icon": "format_size"
|
266
|
+
|
267
|
+
|
268
|
+
},
|
269
|
+
|
270
|
+
|
271
|
+
{
|
272
|
+
|
273
|
+
|
274
|
+
"id": "api-reference",
|
275
|
+
|
276
|
+
|
277
|
+
"title": "Referencia API",
|
278
|
+
|
279
|
+
|
280
|
+
"icon": "code"
|
281
|
+
|
282
|
+
|
283
|
+
}
|
284
|
+
|
285
|
+
|
286
|
+
]
|
287
|
+
|
288
|
+
|
289
|
+
|
172
290
|
return (
|
173
|
-
<
|
174
|
-
<
|
291
|
+
<ExampleLayout title="Accordion Examples" sections={sections}>
|
292
|
+
<ExampleSection id="overview" title="Ejemplos de Componente Accordion Mejorado" icon="widgets">
|
175
293
|
|
176
294
|
<div style={{
|
177
295
|
background: '#f8f9fa',
|
@@ -383,7 +501,8 @@ export const AccordionExamples = () => {
|
|
383
501
|
</ul>
|
384
502
|
</div>
|
385
503
|
</section>
|
386
|
-
|
504
|
+
</ExampleSection>
|
505
|
+
</ExampleLayout>
|
387
506
|
)
|
388
507
|
}
|
389
508
|
|