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
package/src/html/tree.js
CHANGED
@@ -240,6 +240,7 @@ export const TreeNode = (props) => {
|
|
240
240
|
if (disabled || !expandable) return
|
241
241
|
|
242
242
|
event.preventDefault()
|
243
|
+
event.stopPropagation()
|
243
244
|
setIsOpen(prev => !prev)
|
244
245
|
}, [disabled, expandable])
|
245
246
|
|
@@ -337,14 +338,26 @@ export const TreeNode = (props) => {
|
|
337
338
|
>
|
338
339
|
<summary
|
339
340
|
className="tree-item"
|
340
|
-
onClick={
|
341
|
+
onClick={(event) => {
|
342
|
+
// Si se hace click en el área general del nodo (no en el label), toggle
|
343
|
+
if (event.target === event.currentTarget ||
|
344
|
+
event.target.closest('.tree-node__toggle')) {
|
345
|
+
handleToggle(event)
|
346
|
+
}
|
347
|
+
}}
|
341
348
|
onKeyDown={handleKeyDown}
|
342
349
|
{...ariaAttributes}
|
343
350
|
title={tooltip}
|
344
351
|
>
|
345
352
|
{/* Expand/collapse indicator */}
|
346
353
|
{hasChildren && expandable && (
|
347
|
-
<div
|
354
|
+
<div
|
355
|
+
className="tree-node__toggle"
|
356
|
+
onClick={(event) => {
|
357
|
+
event.stopPropagation()
|
358
|
+
handleToggle(event)
|
359
|
+
}}
|
360
|
+
>
|
348
361
|
<Icon
|
349
362
|
icon={isOpen ? 'expand_less' : 'expand_more'}
|
350
363
|
size="small"
|
@@ -374,7 +387,10 @@ export const TreeNode = (props) => {
|
|
374
387
|
{/* Label with badge */}
|
375
388
|
<div
|
376
389
|
className={`label ${clickable}`}
|
377
|
-
onClick={
|
390
|
+
onClick={(event) => {
|
391
|
+
event.stopPropagation()
|
392
|
+
handleSelect(event)
|
393
|
+
}}
|
378
394
|
>
|
379
395
|
<span className="tree-node__label-text">
|
380
396
|
{labelTxt}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { useState } from 'react'
|
2
|
-
import { Icon , Button, Text, TextField } from '../../html'
|
2
|
+
import { Icon , Button, Text, TextField2 as TextField } from '../../html'
|
3
3
|
import './LoginBox.css'
|
4
4
|
|
5
5
|
/**
|
@@ -24,23 +24,46 @@ export const LoginBox = ({
|
|
24
24
|
if (onOK && canOK()) onOK(user, forcedPwd || password)
|
25
25
|
}
|
26
26
|
|
27
|
+
// Helper function for backward compatibility
|
28
|
+
// TextField2 now supports both strings and React elements
|
27
29
|
function tx(txt) {
|
30
|
+
// For TextField2, we can pass strings directly for better performance
|
31
|
+
// But keep this function for backward compatibility with other components
|
28
32
|
return <Text>{txt}</Text>
|
29
33
|
}
|
30
34
|
|
31
|
-
function changeUser(
|
35
|
+
function changeUser(_, value) {
|
32
36
|
setUser(value)
|
33
37
|
}
|
34
|
-
|
35
|
-
function changePassword(
|
38
|
+
|
39
|
+
function changePassword(_, value) {
|
36
40
|
setPassword(value)
|
37
41
|
}
|
38
42
|
|
39
43
|
return (
|
40
44
|
<div className="login-box">
|
41
45
|
<main>
|
42
|
-
<TextField
|
43
|
-
|
46
|
+
<TextField
|
47
|
+
id="loginbox-user"
|
48
|
+
label={tx(userLabel)}
|
49
|
+
value={user}
|
50
|
+
onChange={changeUser}
|
51
|
+
onEnter={ok}
|
52
|
+
outlined
|
53
|
+
autoComplete="username"
|
54
|
+
required
|
55
|
+
/>
|
56
|
+
<TextField
|
57
|
+
id="loginbox-password"
|
58
|
+
label={tx(passwordLabel)}
|
59
|
+
value={password}
|
60
|
+
onChange={changePassword}
|
61
|
+
onEnter={ok}
|
62
|
+
type="password"
|
63
|
+
outlined
|
64
|
+
autoComplete="current-password"
|
65
|
+
required
|
66
|
+
/>
|
44
67
|
</main>
|
45
68
|
<footer>
|
46
69
|
{ loading ? <div className="load-box"><Icon icon="refresh" /></div> : null }
|