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.
Files changed (172) hide show
  1. package/dist/index.css +4941 -324
  2. package/dist/index.js +42338 -0
  3. package/dist/index.js.map +1 -0
  4. package/dist/index.modern.js +37458 -31678
  5. package/dist/index.modern.js.map +1 -1
  6. package/dist/index.umd.js +39634 -34010
  7. package/dist/index.umd.js.map +1 -1
  8. package/package.json +26 -29
  9. package/src/Test.stories.jsx +28 -0
  10. package/src/desktop/Desktop.stories.jsx +110 -0
  11. package/src/desktop/WindowContext.js +135 -0
  12. package/src/desktop/WindowManager.js +355 -0
  13. package/src/desktop/desktop.css +55 -4
  14. package/src/desktop/desktop.js +312 -6
  15. package/src/desktop/index.js +7 -0
  16. package/src/desktop/window.css +229 -36
  17. package/src/desktop/window.js +254 -20
  18. package/src/desktop.backup/desktop.css +6 -0
  19. package/src/desktop.backup/desktop.js +13 -0
  20. package/src/desktop.backup/window.css +58 -0
  21. package/src/desktop.backup/window.js +27 -0
  22. package/src/html/Accordion.stories.jsx +178 -0
  23. package/src/html/Button.stories.jsx +175 -0
  24. package/src/html/Checkbox.stories.jsx +131 -0
  25. package/src/html/Chip.stories.jsx +189 -0
  26. package/src/html/Color.stories.jsx +234 -0
  27. package/src/html/Form.stories.jsx +271 -0
  28. package/src/html/Icon.stories.jsx +233 -0
  29. package/src/html/Progress.stories.jsx +247 -0
  30. package/src/html/Radio.stories.jsx +289 -0
  31. package/src/html/StyleTest.stories.jsx +81 -0
  32. package/src/html/Switch.stories.jsx +329 -0
  33. package/src/html/Tab.stories.jsx +239 -0
  34. package/src/html/Table.stories.jsx +188 -0
  35. package/src/html/Table2.stories.jsx +238 -0
  36. package/src/html/TextField2.stories.jsx +337 -0
  37. package/src/html/Tree.stories.jsx +285 -0
  38. package/src/html/accordion.example.js +0 -74
  39. package/src/html/accordion.js +1 -6
  40. package/src/html/button.js +2 -13
  41. package/src/html/checkbox.js +1 -9
  42. package/src/html/chip.js +2 -19
  43. package/src/html/color.js +1 -14
  44. package/src/html/form.js +4 -15
  45. package/src/html/header2.js +1 -12
  46. package/src/html/icon.js +1 -7
  47. package/src/html/index.js +1 -1
  48. package/src/html/list.js +1 -19
  49. package/src/html/menu.js +9 -5
  50. package/src/html/progress.js +5 -53
  51. package/src/html/property.js +9 -25
  52. package/src/html/radio.js +2 -16
  53. package/src/html/section.js +1 -6
  54. package/src/html/selector.js +2 -19
  55. package/src/html/switch.css +134 -100
  56. package/src/html/switch.example.js +46 -36
  57. package/src/html/switch.js +43 -192
  58. package/src/html/tab.js +3 -24
  59. package/src/html/text.js +1 -12
  60. package/src/html/textfield2.js +5 -42
  61. package/src/html/thumbnail.js +1 -12
  62. package/src/html/tokenfield.js +2 -21
  63. package/src/html/tree.js +3 -35
  64. package/src/index.js +1 -0
  65. package/__previewjs__/Wrapper.tsx +0 -14
  66. package/build-doc.sh +0 -10
  67. package/db/db.json +0 -89
  68. package/db/routes.json +0 -0
  69. package/dist/index.cjs +0 -36722
  70. package/dist/index.cjs.map +0 -1
  71. package/dist/index.css.map +0 -1
  72. package/doc/README.md +0 -196
  73. package/doc/evalulations/ACCORDION_EVALUATION.md +0 -583
  74. package/doc/evalulations/CHECKBOX_EVALUATION.md +0 -273
  75. package/doc/evalulations/CHIP_EVALUATION.md +0 -542
  76. package/doc/evalulations/COLOR_EVALUATION.md +0 -524
  77. package/doc/evalulations/COMPONENTS_EVALUATION.md +0 -477
  78. package/doc/evalulations/FORM_EVALUATION.md +0 -459
  79. package/doc/evalulations/HEADER_EVALUATION.md +0 -436
  80. package/doc/evalulations/ICON_EVALUATION.md +0 -254
  81. package/doc/evalulations/LIST_EVALUATION.md +0 -574
  82. package/doc/evalulations/PROGRESS_EVALUATION.md +0 -450
  83. package/doc/evalulations/RADIO_EVALUATION.md +0 -439
  84. package/doc/evalulations/RADIO_VISUAL_FIX.md +0 -183
  85. package/doc/evalulations/SECTION_IMPROVEMENTS.md +0 -153
  86. package/doc/evalulations/SWITCH_EVALUATION.md +0 -335
  87. package/doc/evalulations/SWITCH_VISUAL_FIX.md +0 -232
  88. package/doc/evalulations/TAB_EVALUATION.md +0 -626
  89. package/doc/evalulations/TEXTFIELD_EVALUATION.md +0 -747
  90. package/doc/evalulations/TOOLTIP_FIX.md +0 -157
  91. package/doc/evalulations/TREE_EVALUATION.md +0 -708
  92. package/doc/index.html +0 -0
  93. package/doc/package-lock.json +0 -17298
  94. package/doc/package.json +0 -34
  95. package/doc/public/index.html +0 -24
  96. package/doc/scripts/generate-examples.js +0 -129
  97. package/doc/src/App.css +0 -171
  98. package/doc/src/App.js +0 -114
  99. package/doc/src/components/ExamplePage.js +0 -129
  100. package/doc/src/components/WelcomePage.js +0 -84
  101. package/doc/src/index.css +0 -246
  102. package/doc/src/index.js +0 -17
  103. package/doc/src/theme.css +0 -256
  104. package/jest.config.js +0 -24
  105. package/preview.config.js +0 -38
  106. package/publish.sh +0 -6
  107. package/src/desktop/dektop.test.js +0 -11
  108. package/src/domain/CollectionAPI.test.js +0 -19
  109. package/src/domain/ContentEditor.test.js +0 -52
  110. package/src/domain2/CollectionAPI.test.js +0 -19
  111. package/src/domain2/CollectionContext.test.js +0 -71
  112. package/src/domain2/CollectionPage.test.js +0 -112
  113. package/src/domain2/DynamicForm.test.js +0 -47
  114. package/src/html/accordion.test.js +0 -37
  115. package/src/html/accordion.unit.test.js +0 -334
  116. package/src/html/button.example.new.js +0 -416
  117. package/src/html/button.test.js +0 -422
  118. package/src/html/checkbox.test.js +0 -285
  119. package/src/html/chip.test.js +0 -425
  120. package/src/html/color.example.js.backup +0 -527
  121. package/src/html/color.test.js +0 -377
  122. package/src/html/components.example.js.backup +0 -492
  123. package/src/html/components_enhanced.test.js +0 -581
  124. package/src/html/form.example.js.backup +0 -385
  125. package/src/html/form.test.js +0 -369
  126. package/src/html/header2.example.js.backup +0 -411
  127. package/src/html/header2.test.js +0 -377
  128. package/src/html/icon.example.js.backup +0 -268
  129. package/src/html/icon.test.js +0 -231
  130. package/src/html/label.test.js +0 -0
  131. package/src/html/list.example.js.backup +0 -404
  132. package/src/html/list.test.js +0 -383
  133. package/src/html/progress.example.js.backup +0 -424
  134. package/src/html/progress.test.js +0 -313
  135. package/src/html/property.example.js.backup +0 -553
  136. package/src/html/property.test.js +0 -371
  137. package/src/html/radio.example.js.backup +0 -389
  138. package/src/html/radio.test.js +0 -318
  139. package/src/html/section.example.js.backup +0 -99
  140. package/src/html/section.test.js +0 -131
  141. package/src/html/selector.test.js +0 -20
  142. package/src/html/switch.example.js.backup +0 -461
  143. package/src/html/switch.test.js +0 -355
  144. package/src/html/tab.example.js.backup +0 -446
  145. package/src/html/tab.test.js +0 -25
  146. package/src/html/tab_enhanced.test.js +0 -504
  147. package/src/html/table.test.js +0 -70
  148. package/src/html/table2.test.js +0 -582
  149. package/src/html/text.test.js +0 -15
  150. package/src/html/textfield.test.js +0 -51
  151. package/src/html/textfield2.example.js.backup +0 -1370
  152. package/src/html/textfield2.test.js +0 -950
  153. package/src/html/tokenfield.example.js.backup +0 -503
  154. package/src/html/tokenfield.test.js +0 -423
  155. package/src/html/tree.example.js.backup +0 -475
  156. package/src/html/tree.test.js +0 -43
  157. package/src/html/tree_enhanced.test.js +0 -495
  158. package/src/http/token.test.js +0 -50
  159. package/src/incubator/pdfViewer.js +0 -33
  160. package/src/incubator/wizard.test.js +0 -127
  161. package/src/site/site.test.js +0 -230
  162. package/src/site/view.test.js +0 -41
  163. package/src/widgets/calendar/Calendar.test.js +0 -28
  164. package/src/widgets/explorer/Explorer.test.js +0 -121
  165. package/src/widgets/ide/editor.test.js +0 -33
  166. package/src/widgets/kanban/Kanban.test.js +0 -78
  167. package/src/widgets/login/LoginBox.test.js +0 -12
  168. package/src/widgets/login/ResetPasswordBox.test.js +0 -34
  169. package/src/widgets/login/validations.test.js +0 -51
  170. package/src/widgets/planner/Planner.test.js +0 -60
  171. package/src/widgets/upload/Upload.test.js +0 -32
  172. package/table2.test.js +0 -454
@@ -1,424 +0,0 @@
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