ywana-core8 0.0.167 → 0.0.171

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.167",
3
+ "version": "0.0.171",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -245,6 +245,8 @@ export const StringEditor = ({ field, value = '', onChange, content, outlined })
245
245
  return opts
246
246
  }
247
247
 
248
+ console.log('StringEditor: ', label, value, content )
249
+
248
250
  return (
249
251
  <div className='field-editor string-editor'>
250
252
  {
@@ -105,11 +105,8 @@ export const TablePage = (props) => {
105
105
 
106
106
  function renderActions() {
107
107
  return actions.map(element => {
108
-
109
- console.log("renderActions", element.props, pageContext)
110
-
111
- const action = () => element.props.action(pageContext, "a")
112
- const clone = React.cloneElement(element, [ action ])
108
+ const action = () => element.props.action(pageContext)
109
+ const clone = React.cloneElement(element, { action })
113
110
  return clone
114
111
  })
115
112
  }
@@ -26,6 +26,12 @@
26
26
  outline: none;
27
27
  }
28
28
 
29
+ .textfield-outlined>.icon {
30
+ position: absolute;
31
+ top: 1.7rem;
32
+ right: .2rem;
33
+ }
34
+
29
35
  .textfield-outlined > label {
30
36
  color: var(--primary-color);
31
37
  font-size: 1rem;
@@ -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;
@@ -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: rgba(0,0,0,.7);
16
+ color: var(--text-color-light);
17
17
  }
18
18
 
19
19
  .tree-item:hover {
20
20
  cursor: pointer;
21
- background-color: rgba(200,200,200,.7);
21
+ background-color: var(--background-color);
22
22
  font-weight: 500;
23
23
  }
24
24