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,141 +1,32 @@
1
1
  import React, { useState, useEffect } from 'react'
2
2
  import PropTypes from 'prop-types'
3
- import RSwitch from 'react-switch'
4
- import { Icon } from './icon'
5
3
  import { Text } from './text'
6
4
  import './switch.css'
7
5
 
8
6
  /**
9
- * Switch component using react-switch library with enhanced features
7
+ * Switch component with traditional switch appearance and full functionality
10
8
  */
11
- export const Switch = (props) => {
12
- const {
13
- id,
14
- label,
15
- checked = false,
16
- disabled = false,
17
- readOnly = false,
18
- error = false,
19
- required = false,
20
- size = 'normal',
21
- className,
22
- ariaLabel,
23
- onChange,
24
- onColor,
25
- offColor,
26
- ...restProps
27
- } = props
28
-
29
- // Validate required props
30
- if (onChange && typeof onChange !== 'function') {
31
- console.warn('Switch component: onChange prop should be a function')
32
- }
33
-
34
- // Size configurations
35
- const sizeConfig = {
36
- small: { height: 16, width: 32, handleDiameter: 14 },
37
- normal: { height: 20, width: 48, handleDiameter: 18 },
38
- large: { height: 24, width: 56, handleDiameter: 22 }
39
- }
40
-
41
- const currentSize = sizeConfig[size] || sizeConfig.normal
42
- const safeClassName = className || ''
43
-
44
- // Theme-aware colors with proper fallbacks
45
- const defaultOnColor = onColor || '#007bff' // Bootstrap primary blue
46
- const defaultOffColor = offColor || '#6c757d' // Bootstrap secondary gray
47
-
48
- // Handle change with validation
49
- const handleChange = (nextChecked, event, id) => {
50
- if (!disabled && !readOnly && onChange) {
51
- onChange(id || 'switch', nextChecked, event)
52
- }
53
- }
54
-
55
- // Accessibility attributes
56
- const ariaAttributes = {
57
- 'aria-label': ariaLabel || label || 'Toggle switch',
58
- 'aria-required': required,
59
- 'aria-invalid': error,
60
- 'aria-describedby': error && typeof error === 'string' ? `${id}-error` : undefined
61
- }
62
-
63
- const switchElement = (
64
- <RSwitch
65
- id={id}
66
- checked={checked}
67
- onChange={handleChange}
68
- disabled={disabled || readOnly}
69
- onColor={defaultOnColor}
70
- offColor={defaultOffColor}
71
- onHandleColor="#ffffff"
72
- offHandleColor="#f8f9fa"
73
- handleDiameter={currentSize.handleDiameter}
74
- uncheckedIcon={false}
75
- checkedIcon={false}
76
- boxShadow="0px 1px 3px rgba(0, 0, 0, 0.3)"
77
- activeBoxShadow="0px 0px 0px 2px rgba(0, 123, 255, 0.25)"
78
- height={currentSize.height}
79
- width={currentSize.width}
80
- className={`react-switch ${safeClassName} ${error ? 'error' : ''}`}
81
- {...ariaAttributes}
82
- {...restProps}
83
- />
84
- )
85
-
86
- // If no label, return just the switch
87
- if (!label) {
88
- return (
89
- <div className={`switch-wrapper ${disabled ? 'disabled' : ''} ${error ? 'error' : ''}`}>
90
- {switchElement}
91
- {error && typeof error === 'string' && error.length > 0 && (
92
- <span id={`${id}-error`} className="error-message" role="alert">
93
- {error}
94
- </span>
95
- )}
96
- </div>
97
- )
98
- }
99
-
100
- // Return switch with label
101
- return (
102
- <div className={`switch-container ${disabled ? 'disabled' : ''} ${error ? 'error' : ''}`}>
103
- <label htmlFor={id} className="switch-label">
104
- <Text>{label}</Text>
105
- {switchElement}
106
- </label>
107
- {error && typeof error === 'string' && error.length > 0 && (
108
- <span id={`${id}-error`} className="error-message" role="alert">
109
- {error}
110
- </span>
111
- )}
112
- </div>
113
- )
114
- }
115
-
116
- /**
117
- * Switch2 component using Material Icons for a lightweight alternative
118
- */
119
- export const Switch2 = (props) => {
120
- const {
121
- id,
122
- label,
123
- checked = false,
124
- disabled = false,
125
- readOnly = false,
126
- error = false,
127
- required = false,
128
- size = 'normal',
129
- className,
130
- ariaLabel,
131
- onChange
132
- } = props
9
+ export const Switch = ({
10
+ id,
11
+ label,
12
+ checked = false,
13
+ disabled = false,
14
+ readOnly = false,
15
+ error = false,
16
+ required = false,
17
+ size = 'normal',
18
+ onColor = '#007bff',
19
+ offColor = '#ccc',
20
+ className = '',
21
+ ariaLabel,
22
+ onChange
23
+ }) => {
133
24
 
134
25
  const [internalChecked, setInternalChecked] = useState(checked)
135
26
 
136
27
  // Validate required props
137
28
  if (onChange && typeof onChange !== 'function') {
138
- console.warn('Switch2 component: onChange prop should be a function')
29
+ console.warn('Switch component: onChange prop should be a function')
139
30
  }
140
31
 
141
32
  // Sync with external value
@@ -149,7 +40,7 @@ export const Switch2 = (props) => {
149
40
  const nextValue = !internalChecked
150
41
  setInternalChecked(nextValue)
151
42
  if (onChange) {
152
- onChange(id || 'switch2', nextValue)
43
+ onChange(id || 'switch', nextValue)
153
44
  }
154
45
  }
155
46
  }
@@ -162,16 +53,15 @@ export const Switch2 = (props) => {
162
53
  }
163
54
  }
164
55
 
165
- const icon = internalChecked ? "toggle_on" : "toggle_off"
166
- const safeClassName = className || ''
167
-
168
56
  // Generate CSS classes
169
57
  const cssClasses = [
170
- 'switch2',
171
- disabled && 'disabled',
172
- readOnly && 'readonly',
173
- error && 'error',
174
- safeClassName
58
+ 'switch',
59
+ `switch--${size}`,
60
+ internalChecked && 'switch--checked',
61
+ disabled && 'switch--disabled',
62
+ readOnly && 'switch--readonly',
63
+ error && 'switch--error',
64
+ className
175
65
  ].filter(Boolean).join(' ')
176
66
 
177
67
  // Accessibility attributes for the container
@@ -187,22 +77,25 @@ export const Switch2 = (props) => {
187
77
  }
188
78
 
189
79
  const switchElement = (
190
- <div className={cssClasses} {...containerAttributes}>
191
- <Icon
192
- icon={icon}
193
- size={size}
194
- clickable={!disabled && !readOnly}
195
- disabled={disabled}
196
- action={toggle}
197
- ariaLabel={`${internalChecked ? 'Enabled' : 'Disabled'} toggle switch`}
198
- />
80
+ <div
81
+ className={cssClasses}
82
+ onClick={toggle}
83
+ {...containerAttributes}
84
+ style={{
85
+ '--switch-on-color': onColor,
86
+ '--switch-off-color': offColor
87
+ }}
88
+ >
89
+ <div className="switch__track">
90
+ <div className="switch__handle"></div>
91
+ </div>
199
92
  </div>
200
93
  )
201
94
 
202
95
  // If no label, return just the switch
203
96
  if (!label) {
204
97
  return (
205
- <div className="switch2-wrapper">
98
+ <div className="switch-wrapper">
206
99
  {switchElement}
207
100
  {error && typeof error === 'string' && error.length > 0 && (
208
101
  <span id={`${id}-error`} className="error-message" role="alert">
@@ -215,8 +108,8 @@ export const Switch2 = (props) => {
215
108
 
216
109
  // Return switch with label
217
110
  return (
218
- <div className="switch2-container">
219
- <label className="switch2-label">
111
+ <div className="switch-container">
112
+ <label className="switch-label">
220
113
  <Text>{label}</Text>
221
114
  {switchElement}
222
115
  </label>
@@ -229,6 +122,8 @@ export const Switch2 = (props) => {
229
122
  )
230
123
  }
231
124
 
125
+ // Switch2 removed - now using unified Switch component
126
+
232
127
  // PropTypes para Switch
233
128
  Switch.propTypes = {
234
129
  /** Unique identifier for the switch */
@@ -259,48 +154,4 @@ Switch.propTypes = {
259
154
  offColor: PropTypes.string
260
155
  }
261
156
 
262
- Switch.defaultProps = {
263
- checked: false,
264
- disabled: false,
265
- readOnly: false,
266
- error: false,
267
- required: false,
268
- size: 'normal',
269
- className: ''
270
- }
271
-
272
- // PropTypes para Switch2
273
- Switch2.propTypes = {
274
- /** Unique identifier for the switch */
275
- id: PropTypes.string,
276
- /** Label text for the switch */
277
- label: PropTypes.string,
278
- /** Current checked state */
279
- checked: PropTypes.bool,
280
- /** Whether the switch is disabled */
281
- disabled: PropTypes.bool,
282
- /** Whether the switch is read-only */
283
- readOnly: PropTypes.bool,
284
- /** Error state - boolean or error message string */
285
- error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
286
- /** Whether the switch is required */
287
- required: PropTypes.bool,
288
- /** Size variant of the switch */
289
- size: PropTypes.oneOf(['small', 'normal', 'large']),
290
- /** Additional CSS classes */
291
- className: PropTypes.string,
292
- /** Accessibility label for screen readers */
293
- ariaLabel: PropTypes.string,
294
- /** Change handler function */
295
- onChange: PropTypes.func
296
- }
297
-
298
- Switch2.defaultProps = {
299
- checked: false,
300
- disabled: false,
301
- readOnly: false,
302
- error: false,
303
- required: false,
304
- size: 'normal',
305
- className: ''
306
- }
157
+ // defaultProps removed - using JavaScript default parameters instead
package/src/html/tab.js CHANGED
@@ -356,17 +356,7 @@ Tabs.propTypes = {
356
356
  ariaLabel: PropTypes.string
357
357
  }
358
358
 
359
- Tabs.defaultProps = {
360
- fillLeft: false,
361
- fillRight: true,
362
- orientation: 'horizontal',
363
- variant: 'standard',
364
- scrollable: false,
365
- centered: false,
366
- disabled: false,
367
- animated: true,
368
- persistent: false
369
- }
359
+ // defaultProps removed - using JavaScript default parameters instead
370
360
 
371
361
  // PropTypes for Tab component
372
362
  Tab.propTypes = {
@@ -404,13 +394,7 @@ Tab.propTypes = {
404
394
  style: PropTypes.object
405
395
  }
406
396
 
407
- Tab.defaultProps = {
408
- disabled: false,
409
- closeable: false,
410
- orientation: 'horizontal',
411
- variant: 'standard',
412
- animated: true
413
- }
397
+ // defaultProps removed - using JavaScript default parameters instead
414
398
 
415
399
  // PropTypes for Stack component
416
400
  Stack.propTypes = {
@@ -430,11 +414,6 @@ Stack.propTypes = {
430
414
  style: PropTypes.object
431
415
  }
432
416
 
433
- Stack.defaultProps = {
434
- selected: 0,
435
- lazy: false,
436
- keepMounted: false,
437
- animated: true
438
- }
417
+ // defaultProps removed - using JavaScript default parameters instead
439
418
 
440
419
  export default Tabs
package/src/html/text.js CHANGED
@@ -322,18 +322,7 @@ Text.propTypes = {
322
322
  onClick: PropTypes.func
323
323
  }
324
324
 
325
- Text.defaultProps = {
326
- format: TEXTFORMATS.HTML,
327
- currency: 'USD',
328
- dateStyle: 'medium',
329
- timeStyle: 'medium',
330
- fallback: '',
331
- loading: false,
332
- skeleton: false,
333
- copyable: false,
334
- selectable: true,
335
- as: 'span'
336
- }
325
+ // defaultProps removed - using JavaScript default parameters instead
337
326
 
338
327
  export default Text
339
328
 
@@ -400,40 +400,21 @@ TextField2.propTypes = {
400
400
  onValidation: PropTypes.func
401
401
  }
402
402
 
403
- TextField2.defaultProps = {
404
- type: 'text',
405
- labelPosition: 'top',
406
- outlined: false,
407
- readOnly: false,
408
- disabled: false,
409
- required: false,
410
- canClear: true,
411
- showPasswordToggle: true,
412
- autoComplete: 'off',
413
- rows: 3,
414
- debounceMs: 0,
415
- className: ''
416
- }
403
+ // defaultProps removed - using JavaScript default parameters instead
417
404
 
418
405
  // PropTypes for TextArea2
419
406
  TextArea2.propTypes = {
420
407
  ...TextField2.propTypes
421
408
  }
422
409
 
423
- TextArea2.defaultProps = {
424
- ...TextField2.defaultProps,
425
- type: 'textarea'
426
- }
410
+ // defaultProps removed - using JavaScript default parameters instead
427
411
 
428
412
  // PropTypes for PasswordField2
429
413
  PasswordField2.propTypes = {
430
414
  ...TextField2.propTypes
431
415
  }
432
416
 
433
- PasswordField2.defaultProps = {
434
- ...TextField2.defaultProps,
435
- type: 'password'
436
- }
417
+ // defaultProps removed - using JavaScript default parameters instead
437
418
 
438
419
  /**
439
420
  * Enhanced DropDown component with improved accessibility and functionality
@@ -927,19 +908,7 @@ DropDown2.propTypes = {
927
908
  onSearch: PropTypes.func
928
909
  }
929
910
 
930
- DropDown2.defaultProps = {
931
- options: [],
932
- outlined: false,
933
- disabled: false,
934
- readOnly: false,
935
- required: false,
936
- searchable: false,
937
- clearable: false,
938
- multiple: false,
939
- position: 'bottom',
940
- maxHeight: '200px',
941
- className: ''
942
- }
911
+ // defaultProps removed - using JavaScript default parameters instead
943
912
 
944
913
  /**
945
914
  * Enhanced DateRange component with improved validation and accessibility
@@ -1166,12 +1135,6 @@ DateRange2.propTypes = {
1166
1135
  onValidation: PropTypes.func
1167
1136
  }
1168
1137
 
1169
- DateRange2.defaultProps = {
1170
- outlined: false,
1171
- disabled: false,
1172
- readOnly: false,
1173
- required: false,
1174
- className: ''
1175
- }
1138
+ // defaultProps removed - using JavaScript default parameters instead
1176
1139
 
1177
1140
  export default TextField2
@@ -211,17 +211,6 @@ Thumbnail.propTypes = {
211
211
  style: PropTypes.object
212
212
  }
213
213
 
214
- Thumbnail.defaultProps = {
215
- src: "https://www.w3schools.com/howto/img_forest.jpg",
216
- empty: "",
217
- objectFit: "cover",
218
- loading: "lazy",
219
- size: "medium",
220
- shape: "square",
221
- bordered: false,
222
- shadow: false,
223
- clickable: false,
224
- disabled: false
225
- }
214
+ // defaultProps removed - using JavaScript default parameters instead
226
215
 
227
216
  export default Thumbnail
@@ -558,21 +558,7 @@ TokenField.propTypes = {
558
558
  style: PropTypes.object
559
559
  }
560
560
 
561
- TokenField.defaultProps = {
562
- tokens: [],
563
- predictive: true,
564
- disabled: false,
565
- required: false,
566
- placeholder: "Add token...",
567
- minTokens: 0,
568
- allowDuplicates: true,
569
- tokenSeparators: [',', ';', '\n'],
570
- size: 'medium',
571
- variant: 'default',
572
- clearable: false,
573
- searchable: false,
574
- sortable: false
575
- }
561
+ // defaultProps removed - using JavaScript default parameters instead
576
562
 
577
563
  // PropTypes for Token
578
564
  Token.propTypes = {
@@ -596,11 +582,6 @@ Token.propTypes = {
596
582
  style: PropTypes.object
597
583
  }
598
584
 
599
- Token.defaultProps = {
600
- disabled: false,
601
- error: false,
602
- size: 'medium',
603
- variant: 'default'
604
- }
585
+ // defaultProps removed - using JavaScript default parameters instead
605
586
 
606
587
  export default TokenField
package/src/html/tree.js CHANGED
@@ -767,23 +767,7 @@ Tree.propTypes = {
767
767
  ariaLabel: PropTypes.string
768
768
  }
769
769
 
770
- Tree.defaultProps = {
771
- nodes: [],
772
- searchable: false,
773
- searchPlaceholder: "Search...",
774
- searchBy: ['label'],
775
- filterable: false,
776
- sortable: false,
777
- sortDirection: 'asc',
778
- multiSelect: false,
779
- expandAll: false,
780
- collapseAll: false,
781
- disabled: false,
782
- loading: false,
783
- empty: false,
784
- emptyMessage: "No items found",
785
- emptyIcon: "folder_open"
786
- }
770
+ // defaultProps removed - using JavaScript default parameters instead
787
771
 
788
772
  // PropTypes for TreeNode component
789
773
  TreeNode.propTypes = {
@@ -829,16 +813,7 @@ TreeNode.propTypes = {
829
813
  style: PropTypes.object
830
814
  }
831
815
 
832
- TreeNode.defaultProps = {
833
- icon: 'folder',
834
- open: false,
835
- disabled: false,
836
- draggable: false,
837
- expandable: true,
838
- level: 0,
839
- hasChildren: true,
840
- loading: false
841
- }
816
+ // defaultProps removed - using JavaScript default parameters instead
842
817
 
843
818
  // PropTypes for TreeItem component
844
819
  TreeItem.propTypes = {
@@ -880,13 +855,6 @@ TreeItem.propTypes = {
880
855
  style: PropTypes.object
881
856
  }
882
857
 
883
- TreeItem.defaultProps = {
884
- icon: 'description',
885
- selected: false,
886
- checked: false,
887
- disabled: false,
888
- draggable: false,
889
- level: 0
890
- }
858
+ // defaultProps removed - using JavaScript default parameters instead
891
859
 
892
860
  export default Tree
package/src/index.js CHANGED
@@ -7,6 +7,7 @@ export * from './http'
7
7
  export * from './html'
8
8
  export * from './widgets'
9
9
  export * from './site'
10
+ export * from './desktop'
10
11
  export * from './domain'
11
12
 
12
13
  export * from './domain2'
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import "../src/css/html.css";
3
- import "../src/css/theme.css";
4
- import "material-design-icons-iconfont/dist/material-design-icons.css";
5
-
6
- export const Wrapper: React.FC<{ children: React.ReactNode }> = ({ children }) => (
7
- <div style={{
8
- padding: '16px',
9
- fontFamily: 'Arial, sans-serif',
10
- fontSize: '14px'
11
- }}>
12
- {children}
13
- </div>
14
- );
package/build-doc.sh DELETED
@@ -1,10 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Copiar todo el contenido de src/html a doc/lib
4
- cp -r src/html/* doc/lib/
5
-
6
- # Copiar React y ReactDOM desde node_modules a doc/lib
7
- cp node_modules/react/umd/react.development.js doc/lib/
8
- cp node_modules/react-dom/umd/react-dom.development.js doc/lib/
9
-
10
- # ...puedes añadir aquí otras dependencias si lo necesitas...
package/db/db.json DELETED
@@ -1,89 +0,0 @@
1
- {
2
- "tasks": [
3
- {
4
- "name": "TEST",
5
- "description": "Test Task 1680001300290",
6
- "result": "OK",
7
- "percentage": 100,
8
- "id": 1,
9
- "state": "COMPPLETED"
10
- }
11
- ],
12
- "references": [
13
- {
14
- "id": 1,
15
- "field6": [
16
- {
17
- "name": "aaa",
18
- "field1": "aaa",
19
- "field2": "aaa",
20
- "field3": "aaa"
21
- },
22
- {
23
- "name": "aaa",
24
- "field1": "bbb",
25
- "field2": "bbb",
26
- "field3": "bbb"
27
- }
28
- ],
29
- "name": "111111",
30
- "state": "NOT_CLASSIFIED",
31
- "field1": "1111114444",
32
- "field2": "111111",
33
- "field4": "#ce1212",
34
- "field5": {
35
- "name": "xxx"
36
- }
37
- },
38
- {
39
- "name": "2222",
40
- "state": "NOT_CLASSIFIED",
41
- "field1": "xxxxx",
42
- "field2": "zzzzz",
43
- "field4": "#c91d1d",
44
- "field5": {},
45
- "id": 2
46
- },
47
- {
48
- "name": "333",
49
- "field4": "#ab3636",
50
- "field5": {},
51
- "id": 3
52
- },
53
- {
54
- "name": "444",
55
- "field5": {},
56
- "id": 4
57
- },
58
- {
59
- "name": "555",
60
- "field5": {},
61
- "id": 5
62
- },
63
- {
64
- "name": "666",
65
- "field5": {},
66
- "id": 6
67
- },
68
- {
69
- "name": "777",
70
- "field5": {},
71
- "id": 7
72
- },
73
- {
74
- "name": "888",
75
- "field5": {},
76
- "id": 8
77
- },
78
- {
79
- "name": "999",
80
- "field5": {},
81
- "id": 9
82
- },
83
- {
84
- "name": "100000",
85
- "field5": {},
86
- "id": 10
87
- }
88
- ]
89
- }
package/db/routes.json DELETED
File without changes