ywana-core8 0.0.876 → 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/dist/index.cjs +62 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +63 -57
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +62 -56
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/checkbox.js +3 -2
- package/src/html/property.js +2 -1
- package/src/html/textfield.js +10 -4
- package/src/html/tooltip.js +2 -1
- package/src/incubator/task.js +2 -2
- package/src/site/site.js +3 -3
package/package.json
CHANGED
package/src/html/checkbox.js
CHANGED
@@ -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={
|
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={
|
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>
|
package/src/html/property.js
CHANGED
@@ -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 }
|
package/src/html/textfield.js
CHANGED
@@ -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={
|
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={
|
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>{
|
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={
|
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
|
)
|
package/src/html/tooltip.js
CHANGED
@@ -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
|
)
|
package/src/incubator/task.js
CHANGED
@@ -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,
|
package/src/site/site.js
CHANGED
@@ -109,7 +109,7 @@ export const Site = ({ icon, iconSrc, logo, title, toolbar, footer, children, in
|
|
109
109
|
<div className="site6">
|
110
110
|
<SiteHeader icon={icon} iconSrc={iconSrc} title={title} />
|
111
111
|
<SiteToolBar >{toolbar}</SiteToolBar>
|
112
|
-
<SiteMenu
|
112
|
+
<SiteMenu iconSrc={iconSrc} title={title} min={min} >{children}</SiteMenu>
|
113
113
|
<SitePage init={init}>
|
114
114
|
{children}
|
115
115
|
<Page id="EMPTY">EMPTY</Page>
|
@@ -179,7 +179,7 @@ const SiteAside = () => {
|
|
179
179
|
/**
|
180
180
|
* SiteMenu
|
181
181
|
*/
|
182
|
-
const SiteMenu = ({
|
182
|
+
const SiteMenu = ({ iconSrc, title, children, min }) => {
|
183
183
|
|
184
184
|
const context = useContext(SiteContext)
|
185
185
|
const { page, sideNav, setSideNav, showNav } = context
|
@@ -212,7 +212,7 @@ const SiteMenu = ({ logo, title, children, min }) => {
|
|
212
212
|
const menutTitle = sideNav === 'max' ? title : ''
|
213
213
|
return (
|
214
214
|
<menu className={`${style} ${showNav ? 'show' : ''}`}>
|
215
|
-
<Header title={menutTitle} />
|
215
|
+
<Header title={menutTitle} iconSrc={iconSrc} />
|
216
216
|
<main >
|
217
217
|
{Object.keys(sections).map(title => (
|
218
218
|
<Fragment key={title}>
|