ywana-core8 0.0.877 → 0.0.878

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.877",
3
+ "version": "0.0.878",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -17,16 +17,17 @@ export const CheckBox = (props) => {
17
17
  }
18
18
 
19
19
  const labelTxt = <Text>{label}</Text>
20
+ const placeholderTxt = <Text>{placeholder}</Text>
20
21
 
21
22
  return value === true ? (
22
23
  <div className="checkbox" key={`${id}1`}>
23
- <input id={id} type="checkbox" placeholder={placeholder} checked value={value} onChange={change} />
24
+ <input id={id} type="checkbox" placeholder={placeholderTxt} checked value={value} onChange={change} />
24
25
  <span className="checkmark" />
25
26
  <label htmlFor={id}>{labelTxt}</label>
26
27
  </div>
27
28
  ) : (
28
29
  <div className="checkbox" key={`${id}0`}>
29
- <input id={id} type="checkbox" placeholder={placeholder} value={value} onChange={change} />
30
+ <input id={id} type="checkbox" placeholder={placeholderTxt} value={value} onChange={change} />
30
31
  <span className="checkmark" />
31
32
  <label htmlFor={id}>{labelTxt}</label>
32
33
  </div>
@@ -1,5 +1,6 @@
1
1
  import React from 'react'
2
2
  import { Icon } from './icon'
3
+ import { Text } from './text'
3
4
  import './property.css'
4
5
 
5
6
  /**
@@ -29,7 +30,7 @@ export const Property = (props) => {
29
30
 
30
31
  return (
31
32
  <div className={`property property-${id} ${className}`}>
32
- <div className="property-name">{name || label}</div>
33
+ <div className="property-name"><Text>{name || label}</Text></div>
33
34
  <div className="property-value">
34
35
  {editable ? <input type="text" value={value2} onChange={change}/> : value2}
35
36
  {editable && value2.length > 0 ? <Icon icon="close" size="small" clickable action={clear} /> : null }
@@ -45,10 +45,11 @@ export const TextField = (props) => {
45
45
  const labelPositionStyle = labelPosition == 'left' ? "label-left" : "label-top"
46
46
  const style = `${labelStyle} ${labelPositionStyle} ${borderStyle} textfield-${type}`
47
47
  const labelTxt = <Text>{label}</Text>
48
+ const placeholderTxt = <Text>{placeholder}</Text>
48
49
 
49
50
  return (
50
51
  <div className={`${style} ${id}`} onClick={onClick}>
51
- <input id={id} type={type} placeholder={placeholder} value={value} required onChange={change} onKeyDown={onKeyPress} onFocus={focus} onBlur={blur} readOnly={readOnly} step="any" />
52
+ <input id={id} type={type} placeholder={placeholderTxt} value={value} required onChange={change} onKeyDown={onKeyPress} onFocus={focus} onBlur={blur} readOnly={readOnly} step="any" />
52
53
  {readOnly === false && canClear && value && value.length > 0 ? <Icon icon="close" clickable size="small" action={clear} /> : null}
53
54
  <span className="bar"></span>
54
55
  {label ? <label>{labelTxt}</label> : null}
@@ -97,10 +98,11 @@ export const TextArea = (props) => {
97
98
  const labelStyle = label ? "" : "no-label"
98
99
  const style = `textarea ${labelStyle} textarea-${type}`
99
100
  const labelTxt = <Text>{label}</Text>
101
+ const placeholderTxt = <Text>{placeholder}</Text>
100
102
 
101
103
  return (
102
104
  <div className={`${style}`} onClick={onClick}>
103
- <textarea id={id} placeholder={placeholder} value={value} required onChange={change} onKeyDown={onKeyPress} onFocus={focus} readOnly={readOnly} />
105
+ <textarea id={id} placeholder={placeholderTxt} value={value} required onChange={change} onKeyDown={onKeyPress} onFocus={focus} readOnly={readOnly} />
104
106
  {canClear && value && value.length > 0 ? <Icon icon="close" clickable size="small" action={clear} /> : null}
105
107
  <span className="bar"></span>
106
108
  {label ? <label>{labelTxt}</label> : null}
@@ -217,9 +219,11 @@ export const DateRange = (props) => {
217
219
  setForm(next)
218
220
  }
219
221
 
222
+ const labelTxt = label ? <Text>{label}</Text> : null
223
+
220
224
  return (
221
225
  <div className="date-range">
222
- {label ? <label>{label}</label> : null}
226
+ {label ? <label>{labelTxt}</label> : null}
223
227
  <TextField id="from" type="date" label="From" value={form.from} onChange={change} />
224
228
  <TextField id="to" type="date" label="To" value={form.to} onChange={change} />
225
229
  </div>
@@ -235,9 +239,11 @@ export const PasswordField = (props) => {
235
239
  setShow(!show)
236
240
  }
237
241
 
242
+ const labelTxt = label ? <Text>{label}</Text> : null
243
+
238
244
  return (
239
245
  <div className="password-field">
240
- <TextField id={id} type={show ? "text" : "password"} label={label} value={value} onChange={onChange} />
246
+ <TextField id={id} type={show ? "text" : "password"} label={labelTxt} value={value} onChange={onChange} />
241
247
  <Icon icon={show ? "visibility" : "visibility_off"} clickable size="small" action={toggle} />
242
248
  </div>
243
249
  )
@@ -1,4 +1,5 @@
1
1
  import React from 'react'
2
+ import { Text } from './text'
2
3
  import './tooltip.css'
3
4
 
4
5
  /**
@@ -12,7 +13,7 @@ export const Tooltip = (props) => {
12
13
 
13
14
  return (
14
15
  <div className="tooltip" >
15
- <span className="tooltip-text" style={style}>{text}</span>
16
+ <span className="tooltip-text" style={style}><Text>{text}</Text></span>
16
17
  {props.children}
17
18
  </div>
18
19
  )
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useContext, useState } from 'react'
2
2
  import { CollectionAPI, FORMATS, TYPES } from '../domain'
3
- import { Icon, DataTable, Header, LinearProgress } from '../html'
3
+ import { Icon, DataTable, Header, LinearProgress, Text } from '../html'
4
4
  import "./task.css"
5
5
 
6
6
  /**
@@ -206,7 +206,7 @@ export const TaskMonitor = (props) => {
206
206
  .map(task => {
207
207
  return {
208
208
  id: task.id,
209
- state: task.state,
209
+ state: <Text>{task.state}</Text>,
210
210
  description: task.description,
211
211
  progress: <LinearProgress progress={task.percentage} />,
212
212
  percentage: task.percentage,