ywana-core8 0.0.67 → 0.0.71

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.67",
3
+ "version": "0.0.71",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -143,7 +143,7 @@ export const TreededContentEditor = ({ content, filter, onChange }) => {
143
143
  </header>
144
144
  <Tree>
145
145
  {nodes.map((node, index) => (
146
- <TreeNode icon="folder" label={node.label} actions={[<Icon small icon="add" clickable action={add} />]}>
146
+ <TreeNode icon="folder" label={node.label} actions={[<Icon size="small" icon="add" clickable action={add} />]}>
147
147
  {
148
148
  value[node.id] ? value[node.id].map((field, index) => <TreeItem icon={field.icon || "description"} label={field.name || field.label} onSelect={() => select(index, field, node)} />) : null
149
149
  }
@@ -362,7 +362,7 @@ export const CollectionEditor = ({ field, value = [], onChange }) => {
362
362
  ...item,
363
363
  id: index,
364
364
  actions: [
365
- <Icon icon='delete' clickable action={() => remove(index)} small />
365
+ <Icon icon='delete' clickable action={() => remove(index)} size="small" />
366
366
  ]
367
367
  }))
368
368
 
@@ -376,7 +376,6 @@ const TableAPI = (url) => {
376
376
  param = param.concat(`${key}=${item}&`)
377
377
  return param
378
378
  }, "")
379
- console.log(param)
380
379
  return query.concat(param)
381
380
  } else {
382
381
  return query.concat(`${key}=%${filters[key]}%&`)
package/src/html/list.css CHANGED
@@ -13,7 +13,6 @@
13
13
  }
14
14
 
15
15
  .list > ul {
16
- flex: 1;
17
16
  overflow: auto;
18
17
  list-style: none;
19
18
  margin: 0;
@@ -24,7 +23,7 @@
24
23
  }
25
24
 
26
25
  .list > ul li {
27
- flex: 1;
26
+ flex: 0;
28
27
  overflow: hidden;
29
28
  min-height: 3rem;
30
29
  padding: .3rem 0.5rem;
package/src/html/tab.js CHANGED
@@ -22,7 +22,7 @@ export const Tabs = (props) => {
22
22
  })
23
23
 
24
24
  return (
25
- <div class="tabs">
25
+ <div className="tabs">
26
26
  {tabs}
27
27
  <div className="tab-filler" />
28
28
  </div>
package/src/html/tree.css CHANGED
@@ -10,7 +10,6 @@
10
10
 
11
11
  .tree-item{
12
12
  margin: 0;
13
- padding: .5rem 0;
14
13
  display: flex;
15
14
  align-items: center;
16
15
  font: 1rem;
@@ -0,0 +1,11 @@
1
+ .avatar {
2
+ background-color: rgba(200,200,200,.1);
3
+ border: solid 3px transparent;
4
+ border-radius: 100%;
5
+ overflow: hidden;
6
+ }
7
+
8
+ .avatar.small {
9
+ width: 3rem;
10
+ height: 3rem;
11
+ }
@@ -0,0 +1,24 @@
1
+ import React from 'react'
2
+ import './Avatar.css'
3
+
4
+ /**
5
+ * Avatar
6
+ */
7
+ export const Avatar = (props) => {
8
+
9
+ const { id, name, className, src, size="small", clickable=false, action} = props
10
+
11
+ function click() {
12
+ if (clickable) {
13
+ action(id)
14
+ }
15
+ }
16
+
17
+ const clickableStyle = clickable ? 'clickable' : ''
18
+ const style = `avatar ${size} ${clickableStyle} ${className}`
19
+ return (
20
+ <div className={style} onClick={click}>
21
+ { src ? <img src={src} /> : <span>{name}</span>}
22
+ </div>
23
+ )
24
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './login/LoginBox'
2
2
  export * from './login/ResetPasswordBox'
3
3
  export * from './viewer/Viewer'
4
- export * from './kanban/Kanban'
4
+ export * from './kanban/Kanban'
5
+ export * from './avatar/avatar'