ywana-core8 0.0.168 → 0.0.172
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 +17 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +22 -2
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +17 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +17 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentEditor.js +2 -0
- package/src/domain/TablePage.js +2 -3
- package/src/html/textfield-outlined.css +6 -0
- package/src/html/textfield.css +14 -0
- package/src/html/textfield.js +6 -1
- package/src/html/tree.css +2 -2
package/package.json
CHANGED
package/src/domain/TablePage.js
CHANGED
@@ -105,9 +105,8 @@ export const TablePage = (props) => {
|
|
105
105
|
|
106
106
|
function renderActions() {
|
107
107
|
return actions.map(element => {
|
108
|
-
const action = () => element.props.action(pageContext
|
109
|
-
const clone = React.cloneElement(element,
|
110
|
-
console.log("renderActions", clone)
|
108
|
+
const action = () => element.props.action(pageContext)
|
109
|
+
const clone = React.cloneElement(element, { action })
|
111
110
|
return clone
|
112
111
|
})
|
113
112
|
}
|
package/src/html/textfield.css
CHANGED
@@ -29,6 +29,12 @@
|
|
29
29
|
outline: none;
|
30
30
|
}
|
31
31
|
|
32
|
+
.textfield>.icon {
|
33
|
+
position: absolute;
|
34
|
+
top: 1.7rem;
|
35
|
+
right: .2rem;
|
36
|
+
}
|
37
|
+
|
32
38
|
.textfield > label {
|
33
39
|
color: var(--primary-color);
|
34
40
|
font-size: .9rem;
|
@@ -104,6 +110,14 @@ input:read-only ~ label,
|
|
104
110
|
right: .2rem;
|
105
111
|
}
|
106
112
|
|
113
|
+
.dropdown>.textfield>.icon,
|
114
|
+
.dropdown>.textfield-outlined>.icon {
|
115
|
+
position: absolute;
|
116
|
+
top: 1.7rem;
|
117
|
+
right: 2rem;
|
118
|
+
color: rgba(150,150,150,1);
|
119
|
+
}
|
120
|
+
|
107
121
|
.dropdown>menu {
|
108
122
|
z-index: 2;
|
109
123
|
position: absolute;
|
package/src/html/textfield.js
CHANGED
@@ -11,7 +11,7 @@ import './textfield.css'
|
|
11
11
|
export const TextField = (props) => {
|
12
12
|
|
13
13
|
const site = useContext(SiteContext)
|
14
|
-
const { id, type = 'text', label, placeholder, value, outlined, readOnly = false, onChange, onEnter, onClick } = props
|
14
|
+
const { id, type = 'text', label, placeholder, value, outlined, readOnly = false, canClear = true, onChange, onEnter, onClick } = props
|
15
15
|
|
16
16
|
function onKeyPress(event) {
|
17
17
|
var key = event.charCode ? event.charCode : event.keyCode ? event.keyCode : 0;
|
@@ -37,6 +37,10 @@ export const TextField = (props) => {
|
|
37
37
|
}
|
38
38
|
}
|
39
39
|
|
40
|
+
function clear() {
|
41
|
+
if (onChange) onChange(id, "")
|
42
|
+
}
|
43
|
+
|
40
44
|
const borderStyle = outlined ? "textfield-outlined" : "textfield"
|
41
45
|
const labelStyle = label ? "" : "no-label"
|
42
46
|
const style = `${labelStyle} ${borderStyle}`
|
@@ -44,6 +48,7 @@ export const TextField = (props) => {
|
|
44
48
|
return (
|
45
49
|
<div className={`${style}`} onClick={onClick}>
|
46
50
|
<input id={id} type={type} placeholder={placeholder} value={value} required onChange={change} onKeyDown={onKeyPress} onFocus={focus} readOnly={readOnly} />
|
51
|
+
{canClear ? <Icon icon="close" clickable size="small" action={clear} /> : null }
|
47
52
|
<span className="bar"></span>
|
48
53
|
{label ? <label>{labelTxt}</label> : null}
|
49
54
|
</div>
|
package/src/html/tree.css
CHANGED
@@ -13,12 +13,12 @@
|
|
13
13
|
display: flex;
|
14
14
|
align-items: center;
|
15
15
|
font: 1rem;
|
16
|
-
color:
|
16
|
+
color: var(--text-color-light);
|
17
17
|
}
|
18
18
|
|
19
19
|
.tree-item:hover {
|
20
20
|
cursor: pointer;
|
21
|
-
background-color:
|
21
|
+
background-color: var(--background-color);
|
22
22
|
font-weight: 500;
|
23
23
|
}
|
24
24
|
|