ywana-core8 0.0.784 → 0.0.786
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 +14 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +14 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +14 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/incubator/password.js +3 -3
- package/src/site/dialog.js +8 -2
package/package.json
CHANGED
@@ -10,7 +10,7 @@ import './password.css'
|
|
10
10
|
export const PasswordEditor = (props) => {
|
11
11
|
|
12
12
|
const site = useContext(SiteContext)
|
13
|
-
const { id, label = "Change Password", labelPosition = "left", className, value, onChange } = props
|
13
|
+
const { id, label = "Change Password", lang="ES", labelPosition = "left", className, value, onChange } = props
|
14
14
|
|
15
15
|
function onOK(form) {
|
16
16
|
if (onChange) onChange(id, form.password1)
|
@@ -22,13 +22,13 @@ export const PasswordEditor = (props) => {
|
|
22
22
|
}
|
23
23
|
|
24
24
|
const openDialog = () => {
|
25
|
-
site.openDialog(<ChangePasswordDialog label={label} onOK={onOK} onClose={onClose} />)
|
25
|
+
site.openDialog(<ChangePasswordDialog lang={lang} label={label} onOK={onOK} onClose={onClose} />)
|
26
26
|
}
|
27
27
|
|
28
28
|
return (
|
29
29
|
<div className={`password-editor ${className}`}>
|
30
30
|
<TextField label={label} labelPosition={labelPosition} type="password" value={value} readOnly={true} />
|
31
|
-
<Icon icon="edit" action={openDialog} size="small"/>
|
31
|
+
<Icon icon="edit" clickable action={openDialog} size="small"/>
|
32
32
|
</div>
|
33
33
|
)
|
34
34
|
}
|
package/src/site/dialog.js
CHANGED
@@ -11,7 +11,13 @@ import './dialog.css'
|
|
11
11
|
export const Dialog = (props) => {
|
12
12
|
|
13
13
|
const site = useContext(SiteContext)
|
14
|
-
const { icon, title = "Dialog", toolbar, children, actions, className, onClose } = props
|
14
|
+
const { icon, title = "Dialog", toolbar, children, actions, className, onClose, overlayCanClose=true } = props
|
15
|
+
|
16
|
+
function overlayClose() {
|
17
|
+
if (overlayCanClose) {
|
18
|
+
close()
|
19
|
+
}
|
20
|
+
}
|
15
21
|
|
16
22
|
function close() {
|
17
23
|
if (onClose) onClose()
|
@@ -24,7 +30,7 @@ export const Dialog = (props) => {
|
|
24
30
|
|
25
31
|
return (
|
26
32
|
<Fragment>
|
27
|
-
<div className={`overlay ${className}`} onMouseDown={
|
33
|
+
<div className={`overlay ${className}`} onMouseDown={overlayClose} />
|
28
34
|
<dialog className={`dialog-panel ${className}`}>
|
29
35
|
<header>
|
30
36
|
{icon ? <MenuIcon icon={icon} /> : null}
|