ywana-core8 0.1.75 → 0.1.76

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 (122) hide show
  1. package/ACCORDION_EVALUATION.md +583 -0
  2. package/CHECKBOX_EVALUATION.md +273 -0
  3. package/CHIP_EVALUATION.md +542 -0
  4. package/COLOR_EVALUATION.md +524 -0
  5. package/COMPONENTS_EVALUATION.md +477 -0
  6. package/FORM_EVALUATION.md +459 -0
  7. package/HEADER_EVALUATION.md +436 -0
  8. package/ICON_EVALUATION.md +254 -0
  9. package/LIST_EVALUATION.md +574 -0
  10. package/PROGRESS_EVALUATION.md +450 -0
  11. package/RADIO_EVALUATION.md +439 -0
  12. package/RADIO_VISUAL_FIX.md +183 -0
  13. package/SECTION_IMPROVEMENTS.md +153 -0
  14. package/SWITCH_EVALUATION.md +335 -0
  15. package/SWITCH_VISUAL_FIX.md +232 -0
  16. package/TAB_EVALUATION.md +626 -0
  17. package/TEXTFIELD_EVALUATION.md +747 -0
  18. package/TOOLTIP_FIX.md +157 -0
  19. package/TREE_EVALUATION.md +708 -0
  20. package/dist/index.cjs +7900 -1615
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.css +6094 -1122
  23. package/dist/index.css.map +1 -1
  24. package/dist/index.modern.js +7929 -1645
  25. package/dist/index.modern.js.map +1 -1
  26. package/dist/index.umd.js +7900 -1615
  27. package/dist/index.umd.js.map +1 -1
  28. package/jest.config.js +24 -0
  29. package/package.json +10 -1
  30. package/src/html/accordion.css +208 -4
  31. package/src/html/accordion.example.js +390 -0
  32. package/src/html/accordion.js +284 -28
  33. package/src/html/accordion.unit.test.js +334 -0
  34. package/src/html/button.css +157 -16
  35. package/src/html/button.example.js +374 -0
  36. package/src/html/button.js +240 -60
  37. package/src/html/button.test.js +422 -0
  38. package/src/html/checkbox.css +74 -2
  39. package/src/html/checkbox.example.js +316 -0
  40. package/src/html/checkbox.js +113 -26
  41. package/src/html/checkbox.test.js +285 -0
  42. package/src/html/chip.css +230 -19
  43. package/src/html/chip.example.js +355 -0
  44. package/src/html/chip.js +321 -25
  45. package/src/html/chip.test.js +425 -0
  46. package/src/html/color.css +435 -6
  47. package/src/html/color.example.js +527 -0
  48. package/src/html/color.js +458 -9
  49. package/src/html/color.test.js +362 -4
  50. package/src/html/components.example.js +492 -0
  51. package/src/html/components_enhanced.test.js +581 -0
  52. package/src/html/form.css +70 -3
  53. package/src/html/form.example.js +385 -0
  54. package/src/html/form.js +232 -34
  55. package/src/html/form.test.js +369 -0
  56. package/src/html/header2.css +264 -0
  57. package/src/html/header2.example.js +411 -0
  58. package/src/html/header2.js +203 -0
  59. package/src/html/header2.test.js +377 -0
  60. package/src/html/icon.css +20 -2
  61. package/src/html/icon.example.js +268 -0
  62. package/src/html/icon.js +86 -16
  63. package/src/html/icon.test.js +231 -0
  64. package/src/html/index.js +1 -1
  65. package/src/html/list.css +393 -1
  66. package/src/html/list.example.js +404 -0
  67. package/src/html/list.js +583 -40
  68. package/src/html/list.test.js +383 -0
  69. package/src/html/progress.css +707 -17
  70. package/src/html/progress.example.js +424 -0
  71. package/src/html/progress.js +906 -9
  72. package/src/html/progress.test.js +313 -0
  73. package/src/html/property.css +399 -0
  74. package/src/html/property.example.js +553 -0
  75. package/src/html/property.js +393 -15
  76. package/src/html/property.test.js +351 -2
  77. package/src/html/radio-visual-test.js +289 -0
  78. package/src/html/radio.css +137 -11
  79. package/src/html/radio.example.js +389 -0
  80. package/src/html/radio.js +234 -10
  81. package/src/html/radio.test.js +318 -0
  82. package/src/html/section.example.js +99 -0
  83. package/src/html/section.js +40 -3
  84. package/src/html/section.test.js +131 -0
  85. package/src/html/selector.css +329 -3
  86. package/src/html/selector.js +369 -23
  87. package/src/html/switch-debug.js +197 -0
  88. package/src/html/switch-test-visual.js +294 -0
  89. package/src/html/switch.css +200 -0
  90. package/src/html/switch.example.js +461 -0
  91. package/src/html/switch.js +283 -23
  92. package/src/html/switch.test.js +355 -0
  93. package/src/html/tab.css +288 -0
  94. package/src/html/tab.example.js +446 -0
  95. package/src/html/tab.js +387 -22
  96. package/src/html/tab_enhanced.js +378 -0
  97. package/src/html/tab_enhanced.test.js +504 -0
  98. package/src/html/table2.css +576 -0
  99. package/src/html/table2.example.js +703 -0
  100. package/src/html/table2.js +1252 -0
  101. package/src/html/table2.migration.md +328 -0
  102. package/src/html/table2.test.js +582 -0
  103. package/src/html/text.css +375 -0
  104. package/src/html/text.js +311 -20
  105. package/src/html/textfield2.css +842 -0
  106. package/src/html/textfield2.example.js +499 -0
  107. package/src/html/textfield2.js +1130 -0
  108. package/src/html/textfield2.test.js +950 -0
  109. package/src/html/thumbnail.css +289 -2
  110. package/src/html/thumbnail.js +214 -9
  111. package/src/html/tokenfield.css +449 -1
  112. package/src/html/tokenfield.example.js +503 -0
  113. package/src/html/tokenfield.js +561 -56
  114. package/src/html/tokenfield.test.js +423 -0
  115. package/src/html/tooltip-positioning-demo.js +187 -0
  116. package/src/html/tooltip.css +25 -2
  117. package/src/html/tree.css +228 -0
  118. package/src/html/tree.example.js +475 -0
  119. package/src/html/tree.js +712 -28
  120. package/src/html/tree_enhanced.test.js +495 -0
  121. package/table2.test.js +454 -0
  122. package/src/html/button.tsx +0 -38
@@ -0,0 +1,424 @@
1
+ import React, { useState, useEffect } from 'react'
2
+ import { CircularProgress, LinearProgress, StepProgress, RadialProgress, MultiProgress } from './progress'
3
+ import { Button } from './button'
4
+ import { Icon } from './icon'
5
+
6
+ /**
7
+ * Ejemplos espectaculares de los componentes Progress mejorados
8
+ */
9
+ export const ProgressExamples = () => {
10
+ const [progress, setProgress] = useState(0)
11
+ const [isRunning, setIsRunning] = useState(false)
12
+ const [currentStep, setCurrentStep] = useState(0)
13
+ const [multiProgressData, setMultiProgressData] = useState([
14
+ { id: 'cpu', label: 'CPU Usage', value: 45, max: 100, color: 'primary' },
15
+ { id: 'memory', label: 'Memory', value: 78, max: 100, color: 'warning' },
16
+ { id: 'disk', label: 'Disk Space', value: 23, max: 100, color: 'success' },
17
+ { id: 'network', label: 'Network', value: 91, max: 100, color: 'error' }
18
+ ])
19
+
20
+ // Simular progreso automático
21
+ useEffect(() => {
22
+ let interval
23
+ if (isRunning) {
24
+ interval = setInterval(() => {
25
+ setProgress(prev => {
26
+ const next = prev + Math.random() * 5
27
+ if (next >= 100) {
28
+ setIsRunning(false)
29
+ return 100
30
+ }
31
+ return next
32
+ })
33
+ }, 200)
34
+ }
35
+ return () => clearInterval(interval)
36
+ }, [isRunning])
37
+
38
+ // Simular datos en tiempo real
39
+ useEffect(() => {
40
+ const interval = setInterval(() => {
41
+ setMultiProgressData(prev => prev.map(item => ({
42
+ ...item,
43
+ value: Math.max(0, Math.min(100, item.value + (Math.random() - 0.5) * 10))
44
+ })))
45
+ }, 2000)
46
+ return () => clearInterval(interval)
47
+ }, [])
48
+
49
+ const handleStart = () => {
50
+ setIsRunning(true)
51
+ setProgress(0)
52
+ }
53
+
54
+ const handleReset = () => {
55
+ setIsRunning(false)
56
+ setProgress(0)
57
+ setCurrentStep(0)
58
+ }
59
+
60
+ const handleStepClick = (stepIndex) => {
61
+ setCurrentStep(stepIndex)
62
+ }
63
+
64
+ const steps = [
65
+ { id: 'setup', label: 'Setup', description: 'Initialize configuration', icon: 'settings' },
66
+ { id: 'download', label: 'Download', description: 'Download required files', icon: 'download' },
67
+ { id: 'install', label: 'Install', description: 'Install components', icon: 'build' },
68
+ { id: 'configure', label: 'Configure', description: 'Configure settings', icon: 'tune' },
69
+ { id: 'complete', label: 'Complete', description: 'Process completed', icon: 'check_circle' }
70
+ ]
71
+
72
+ return (
73
+ <div style={{ padding: '2rem', maxWidth: '1200px', maxHeight: '100vh', overflow: 'auto' }}>
74
+ <h1>Componentes Progress Espectaculares</h1>
75
+
76
+ <div style={{
77
+ background: '#f8f9fa',
78
+ padding: '1rem',
79
+ borderRadius: '8px',
80
+ marginBottom: '2rem',
81
+ border: '1px solid #e9ecef'
82
+ }}>
83
+ <h3>🚀 Características Espectaculares Implementadas:</h3>
84
+ <ul>
85
+ <li>🎯 <strong>5 Componentes Profesionales</strong> - CircularProgress, LinearProgress, StepProgress, RadialProgress, MultiProgress</li>
86
+ <li>🎨 <strong>Animaciones Suaves</strong> - Easing functions, transiciones CSS, efectos visuales</li>
87
+ <li>♿ <strong>Accesibilidad Completa</strong> - ARIA, roles, estados anunciados</li>
88
+ <li>🎭 <strong>Múltiples Variantes</strong> - determinate/indeterminate, tamaños, colores, temas</li>
89
+ <li>⚡ <strong>Características Avanzadas</strong> - Buffer, striped, gradients, time estimation</li>
90
+ <li>📱 <strong>Responsive Total</strong> - Adaptación móvil, dark mode, high contrast</li>
91
+ <li>🧪 <strong>23 Pruebas Unitarias</strong> - Cobertura completa de funcionalidad</li>
92
+ </ul>
93
+ </div>
94
+
95
+ {/* Controles de demostración */}
96
+ <section style={{ marginBottom: '2rem' }}>
97
+ <h3>Controles de Demostración</h3>
98
+ <div style={{
99
+ background: '#fff',
100
+ padding: '1rem',
101
+ borderRadius: '8px',
102
+ border: '1px solid #ddd',
103
+ display: 'flex',
104
+ gap: '1rem',
105
+ alignItems: 'center',
106
+ flexWrap: 'wrap'
107
+ }}>
108
+ <Button
109
+ label="Start Progress"
110
+ icon="play_arrow"
111
+ raised={true}
112
+ action={handleStart}
113
+ disabled={isRunning}
114
+ />
115
+ <Button
116
+ label="Reset All"
117
+ icon="refresh"
118
+ action={handleReset}
119
+ />
120
+ <Button
121
+ label="Next Step"
122
+ icon="skip_next"
123
+ action={() => setCurrentStep(prev => Math.min(steps.length - 1, prev + 1))}
124
+ disabled={currentStep >= steps.length - 1}
125
+ />
126
+ <span style={{ marginLeft: 'auto', color: '#666' }}>
127
+ Progress: {Math.round(progress)}%
128
+ </span>
129
+ </div>
130
+ </section>
131
+
132
+ {/* CircularProgress Showcase */}
133
+ <section style={{ marginBottom: '2rem' }}>
134
+ <h3>CircularProgress - Indicadores Circulares</h3>
135
+ <div style={{
136
+ background: '#fff',
137
+ padding: '2rem',
138
+ borderRadius: '8px',
139
+ border: '1px solid #ddd'
140
+ }}>
141
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(150px, 1fr))', gap: '2rem', textAlign: 'center' }}>
142
+ <div>
143
+ <h4>Indeterminate</h4>
144
+ <CircularProgress
145
+ variant="indeterminate"
146
+ size="large"
147
+ color="primary"
148
+ />
149
+ </div>
150
+
151
+ <div>
152
+ <h4>With Value</h4>
153
+ <CircularProgress
154
+ variant="determinate"
155
+ value={progress}
156
+ size="large"
157
+ color="success"
158
+ showValue={true}
159
+ thickness={6}
160
+ />
161
+ </div>
162
+
163
+ <div>
164
+ <h4>With Icon</h4>
165
+ <CircularProgress
166
+ variant="determinate"
167
+ value={75}
168
+ size="xlarge"
169
+ color="warning"
170
+ icon="download"
171
+ showLabel={true}
172
+ label="Downloading"
173
+ />
174
+ </div>
175
+
176
+ <div>
177
+ <h4>Custom Format</h4>
178
+ <CircularProgress
179
+ variant="determinate"
180
+ value={progress}
181
+ size="large"
182
+ color="error"
183
+ showValue={true}
184
+ formatValue={(value, max) => `${Math.round(value)}/${max}`}
185
+ />
186
+ </div>
187
+ </div>
188
+ </div>
189
+ </section>
190
+
191
+ {/* LinearProgress Showcase */}
192
+ <section style={{ marginBottom: '2rem' }}>
193
+ <h3>LinearProgress - Barras de Progreso</h3>
194
+ <div style={{
195
+ background: '#fff',
196
+ padding: '2rem',
197
+ borderRadius: '8px',
198
+ border: '1px solid #ddd',
199
+ display: 'flex',
200
+ flexDirection: 'column',
201
+ gap: '1.5rem'
202
+ }}>
203
+ <div>
204
+ <h4>Basic Progress</h4>
205
+ <LinearProgress
206
+ value={progress}
207
+ showValue={true}
208
+ showLabel={true}
209
+ label="File Upload"
210
+ color="primary"
211
+ size="medium"
212
+ />
213
+ </div>
214
+
215
+ <div>
216
+ <h4>With Buffer</h4>
217
+ <LinearProgress
218
+ value={progress * 0.7}
219
+ buffer={progress}
220
+ showValue={true}
221
+ showLabel={true}
222
+ label="Video Streaming"
223
+ color="secondary"
224
+ size="large"
225
+ />
226
+ </div>
227
+
228
+ <div>
229
+ <h4>Striped Animation</h4>
230
+ <LinearProgress
231
+ value={85}
232
+ showValue={true}
233
+ showLabel={true}
234
+ label="Processing"
235
+ color="success"
236
+ striped={true}
237
+ size="medium"
238
+ />
239
+ </div>
240
+
241
+ <div>
242
+ <h4>Indeterminate</h4>
243
+ <LinearProgress
244
+ variant="indeterminate"
245
+ showLabel={true}
246
+ label="Loading..."
247
+ color="warning"
248
+ size="medium"
249
+ />
250
+ </div>
251
+
252
+ <div>
253
+ <h4>With Time Estimation</h4>
254
+ <LinearProgress
255
+ value={progress}
256
+ showValue={true}
257
+ showLabel={true}
258
+ label="Large File Download"
259
+ color="error"
260
+ estimatedTime={120}
261
+ size="large"
262
+ />
263
+ </div>
264
+ </div>
265
+ </section>
266
+
267
+ {/* StepProgress Showcase */}
268
+ <section style={{ marginBottom: '2rem' }}>
269
+ <h3>StepProgress - Progreso por Pasos</h3>
270
+ <div style={{
271
+ background: '#fff',
272
+ padding: '2rem',
273
+ borderRadius: '8px',
274
+ border: '1px solid #ddd'
275
+ }}>
276
+ <h4>Horizontal Stepper</h4>
277
+ <StepProgress
278
+ steps={steps}
279
+ currentStep={currentStep}
280
+ variant="horizontal"
281
+ color="primary"
282
+ size="medium"
283
+ allowClickNavigation={true}
284
+ onStepClick={handleStepClick}
285
+ />
286
+
287
+ <div style={{ marginTop: '2rem' }}>
288
+ <h4>Vertical Stepper</h4>
289
+ <StepProgress
290
+ steps={steps.slice(0, 3)}
291
+ currentStep={Math.min(currentStep, 2)}
292
+ variant="vertical"
293
+ color="success"
294
+ size="large"
295
+ allowClickNavigation={true}
296
+ onStepClick={handleStepClick}
297
+ />
298
+ </div>
299
+ </div>
300
+ </section>
301
+
302
+ {/* RadialProgress Showcase */}
303
+ <section style={{ marginBottom: '2rem' }}>
304
+ <h3>RadialProgress - Indicadores Radiales</h3>
305
+ <div style={{
306
+ background: '#fff',
307
+ padding: '2rem',
308
+ borderRadius: '8px',
309
+ border: '1px solid #ddd'
310
+ }}>
311
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))', gap: '2rem', textAlign: 'center' }}>
312
+ <div>
313
+ <h4>Dashboard Style</h4>
314
+ <RadialProgress
315
+ value={progress}
316
+ size={150}
317
+ thickness={12}
318
+ color="primary"
319
+ showValue={true}
320
+ showLabel={true}
321
+ label="CPU Usage"
322
+ gradient={true}
323
+ />
324
+ </div>
325
+
326
+ <div>
327
+ <h4>With Icon</h4>
328
+ <RadialProgress
329
+ value={78}
330
+ size={120}
331
+ thickness={8}
332
+ color="success"
333
+ icon="memory"
334
+ showValue={true}
335
+ showLabel={true}
336
+ label="Memory"
337
+ />
338
+ </div>
339
+
340
+ <div>
341
+ <h4>Custom Format</h4>
342
+ <RadialProgress
343
+ value={156}
344
+ max={200}
345
+ size={140}
346
+ thickness={10}
347
+ color="warning"
348
+ showValue={true}
349
+ showLabel={true}
350
+ label="Storage"
351
+ formatValue={(value, max) => `${value}GB`}
352
+ />
353
+ </div>
354
+ </div>
355
+ </div>
356
+ </section>
357
+
358
+ {/* MultiProgress Showcase */}
359
+ <section style={{ marginBottom: '2rem' }}>
360
+ <h3>MultiProgress - Múltiples Indicadores</h3>
361
+ <div style={{
362
+ background: '#fff',
363
+ padding: '2rem',
364
+ borderRadius: '8px',
365
+ border: '1px solid #ddd'
366
+ }}>
367
+ <h4>System Monitor (Live Data)</h4>
368
+ <MultiProgress
369
+ items={multiProgressData}
370
+ showLabels={true}
371
+ showValues={true}
372
+ size="medium"
373
+ animated={true}
374
+ />
375
+ </div>
376
+ </section>
377
+
378
+ {/* Comparación antes/después */}
379
+ <section style={{ marginBottom: '2rem' }}>
380
+ <h3>Comparación: Progress Original vs Mejorado</h3>
381
+ <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '1rem' }}>
382
+ <div style={{
383
+ background: '#ffebee',
384
+ padding: '1rem',
385
+ borderRadius: '4px',
386
+ border: '1px solid #ffcdd2'
387
+ }}>
388
+ <h4>❌ Progress Original</h4>
389
+ <ul>
390
+ <li>Solo 2 componentes básicos</li>
391
+ <li>Sin PropTypes ni validación</li>
392
+ <li>Sin accesibilidad</li>
393
+ <li>Sin animaciones</li>
394
+ <li>Sin personalización</li>
395
+ <li>CSS muy básico</li>
396
+ <li>Sin estados avanzados</li>
397
+ <li>Sin responsive</li>
398
+ </ul>
399
+ </div>
400
+ <div style={{
401
+ background: '#e8f5e8',
402
+ padding: '1rem',
403
+ borderRadius: '4px',
404
+ border: '1px solid #c8e6c9'
405
+ }}>
406
+ <h4>✅ Progress Mejorado</h4>
407
+ <ul>
408
+ <li>5 componentes profesionales</li>
409
+ <li>PropTypes completos</li>
410
+ <li>Accesibilidad total (WCAG 2.1 AA)</li>
411
+ <li>Animaciones suaves y espectaculares</li>
412
+ <li>Personalización completa</li>
413
+ <li>CSS avanzado con efectos</li>
414
+ <li>Estados y variantes múltiples</li>
415
+ <li>Responsive, dark mode, high contrast</li>
416
+ </ul>
417
+ </div>
418
+ </div>
419
+ </section>
420
+ </div>
421
+ )
422
+ }
423
+
424
+ export default ProgressExamples