@cniot/android-pda-components 0.2.30 → 0.2.32

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.
Files changed (112) hide show
  1. package/build/assets/index.51a8714a.css +1 -0
  2. package/build/assets/{index.96f23a3d.js → index.7a87ca33.js} +16 -16
  3. package/build/index.html +2 -2
  4. package/doc/index.jsx +3 -2
  5. package/es/index.cjs.js +1 -1
  6. package/es/index.es.js +11 -5
  7. package/es/style.css +1 -1
  8. package/package.json +1 -1
  9. package/build/assets/index.248cb4f2.css +0 -1
  10. package/packages/AppList/doc.jsx +0 -138
  11. package/packages/AppList/index.jsx +0 -33
  12. package/packages/AppList/index.less +0 -52
  13. package/packages/BaseLayout/BarcodeScan.jsx +0 -88
  14. package/packages/BaseLayout/BaseLayoutContainer.jsx +0 -208
  15. package/packages/BaseLayout/RfidOnce.jsx +0 -106
  16. package/packages/BaseLayout/RfidScan.jsx +0 -118
  17. package/packages/BaseLayout/doc.jsx +0 -177
  18. package/packages/BaseLayout/index.jsx +0 -52
  19. package/packages/BaseLayout/index.less +0 -47
  20. package/packages/Button/doc.jsx +0 -62
  21. package/packages/Button/index.jsx +0 -27
  22. package/packages/Button/index.less +0 -62
  23. package/packages/Confirm/doc.jsx +0 -147
  24. package/packages/Confirm/index.jsx +0 -71
  25. package/packages/Confirm/index.less +0 -55
  26. package/packages/Header/doc.jsx +0 -155
  27. package/packages/Header/index.jsx +0 -184
  28. package/packages/Header/index.less +0 -68
  29. package/packages/InfoCard/doc.jsx +0 -244
  30. package/packages/InfoCard/index.jsx +0 -67
  31. package/packages/InfoCard/index.less +0 -111
  32. package/packages/List/doc.jsx +0 -89
  33. package/packages/List/index.jsx +0 -54
  34. package/packages/List/index.less +0 -43
  35. package/packages/Overlay/doc.jsx +0 -103
  36. package/packages/Overlay/index.jsx +0 -42
  37. package/packages/Overlay/index.less +0 -28
  38. package/packages/PdaActionSheet/doc.jsx +0 -193
  39. package/packages/PdaActionSheet/index.jsx +0 -44
  40. package/packages/PdaActionSheet/index.less +0 -65
  41. package/packages/PdaDistanceCard/doc.jsx +0 -62
  42. package/packages/PdaDistanceCard/index.jsx +0 -35
  43. package/packages/PdaDistanceCard/index.less +0 -42
  44. package/packages/PdaFinishCard/doc.jsx +0 -111
  45. package/packages/PdaFinishCard/index.jsx +0 -62
  46. package/packages/PdaFinishCard/index.less +0 -62
  47. package/packages/PdaInfiniteScroll/doc.jsx +0 -121
  48. package/packages/PdaInfiniteScroll/index.jsx +0 -114
  49. package/packages/PdaInfiniteScroll/index.less +0 -12
  50. package/packages/PdaInfiniteScroll/utils.jsx +0 -25
  51. package/packages/PdaSteps/PdaStep/index.jsx +0 -38
  52. package/packages/PdaSteps/PdaStep/index.less +0 -70
  53. package/packages/PdaSteps/PdaSteps/index.jsx +0 -33
  54. package/packages/PdaSteps/PdaSteps/index.less +0 -0
  55. package/packages/PdaSteps/doc.jsx +0 -131
  56. package/packages/PdaSteps/index.jsx +0 -5
  57. package/packages/PdaTitle/doc.jsx +0 -102
  58. package/packages/PdaTitle/index.jsx +0 -51
  59. package/packages/PdaTitle/index.less +0 -65
  60. package/packages/Presentation/doc.jsx +0 -72
  61. package/packages/Presentation/index.jsx +0 -25
  62. package/packages/Presentation/index.less +0 -31
  63. package/packages/SelectCard/doc.jsx +0 -57
  64. package/packages/SelectCard/index.jsx +0 -13
  65. package/packages/SelectCard/index.less +0 -30
  66. package/packages/SimpleCard/doc.jsx +0 -59
  67. package/packages/SimpleCard/index.jsx +0 -13
  68. package/packages/SimpleCard/index.less +0 -38
  69. package/packages/SimpleCardBlock/doc.jsx +0 -77
  70. package/packages/SimpleCardBlock/index.jsx +0 -43
  71. package/packages/SimpleCardBlock/index.less +0 -26
  72. package/packages/SubCard/doc.jsx +0 -63
  73. package/packages/SubCard/index.jsx +0 -28
  74. package/packages/SubCard/index.less +0 -64
  75. package/packages/Tag/doc.jsx +0 -47
  76. package/packages/Tag/index.jsx +0 -12
  77. package/packages/Tag/index.less +0 -22
  78. package/packages/TaskCard/doc.jsx +0 -151
  79. package/packages/TaskCard/index.jsx +0 -65
  80. package/packages/TaskCard/index.less +0 -101
  81. package/packages/Toast/doc.jsx +0 -112
  82. package/packages/Toast/index.jsx +0 -7
  83. package/packages/Toast/index.less +0 -23
  84. package/packages/Toast/methods.jsx +0 -77
  85. package/packages/Toast/toast.jsx +0 -96
  86. package/packages/WakeKeyborard/doc.jsx +0 -170
  87. package/packages/WakeKeyborard/index.jsx +0 -61
  88. package/packages/WakeKeyborard/index.less +0 -55
  89. package/packages/WakeKeyborard/keyborard.jsx +0 -61
  90. package/packages/doc.jsx +0 -19
  91. package/packages/global.less +0 -7
  92. package/packages/index.jsx +0 -60
  93. package/packages/index.less +0 -3
  94. package/packages/pageflow-system-pages/alert/doc.jsx +0 -70
  95. package/packages/pageflow-system-pages/alert/index.jsx +0 -22
  96. package/packages/pageflow-system-pages/confirm/doc.jsx +0 -118
  97. package/packages/pageflow-system-pages/confirm/index.jsx +0 -31
  98. package/packages/pageflow-system-pages/debug/index.jsx +0 -27
  99. package/packages/pageflow-system-pages/debug/index.less +0 -5
  100. package/packages/pageflow-system-pages/index.jsx +0 -38
  101. package/packages/pageflow-system-pages/loading/index.jsx +0 -37
  102. package/packages/pageflow-system-pages/not-found/index.jsx +0 -12
  103. package/packages/pageflow-system-pages/not-found/index.less +0 -26
  104. package/packages/pageflow-system-pages/prompt/doc.jsx +0 -95
  105. package/packages/pageflow-system-pages/prompt/index.jsx +0 -43
  106. package/packages/pageflow-system-pages/prompt/index.less +0 -44
  107. package/packages/pageflow-system-pages/start/index.jsx +0 -28
  108. package/packages/pageflow-system-pages/start/index.less +0 -12
  109. package/packages/pageflow-system-pages/toast/doc.jsx +0 -76
  110. package/packages/pageflow-system-pages/toast/index.jsx +0 -42
  111. package/packages/utils/index.js +0 -56
  112. package/packages/variable.less +0 -4
@@ -1,67 +0,0 @@
1
- import React from "react";
2
- // import OPInput from "../OPInput";
3
- import "./index.less";
4
- import classNames from "classnames";
5
-
6
- export default class PdaInfoCard extends React.Component {
7
- constructor(props) {
8
- super(props);
9
- }
10
-
11
- render() {
12
- const { className = '', title, highlightInfo, subTitle, subHighlightInfo, subHighlightSubInfo, infoImage, tagText, highlightInfoCN, highlightSubInfo, percentage, highlightSubInfoCN, boldInfo, infoList = [], style={}, theme='light' } = this.props;
13
- return (
14
- <div className={classNames({[className]: true, 'pda-info-card': true, 'pda-info-card-dark': theme === 'dark'})} style={style}>
15
- <div className="pda-info-card-title-section">
16
- <div className="pda-info-card-title">{title}</div>
17
- {
18
- tagText ? <div className="pda-info-card-tag">
19
- <div className="pda-info-card-tag-text">{tagText}</div>
20
- </div> : null
21
- }
22
- </div>
23
- <div className="pda-info-card-highlight-section">
24
- <div>
25
- <div className="pda-info-card-highlight">
26
- <span className="pda-info-card-highlight1">{highlightInfo}</span>
27
- <span className="pda-info-card-highlight1CN">{highlightInfoCN}</span>
28
- <span className="pda-info-card-highlight2">{highlightSubInfo}</span>
29
- <span className="pda-info-card-highlight2CN">{highlightSubInfoCN}</span>
30
- </div>
31
- {
32
- subTitle ? <div className="pda-info-card-title">{subTitle}</div> : null
33
- }
34
- {
35
- subHighlightInfo ? <div className="pda-info-card-highlight">
36
- <span className="pda-info-card-highlight1">{subHighlightInfo}</span>
37
- <span className="pda-info-card-highlight2">{subHighlightSubInfo}</span>
38
- </div> : null
39
- }
40
- </div>
41
- {
42
- infoImage ? <img src={infoImage} width={150} height={150} /> : null
43
- }
44
- </div>
45
- {
46
- percentage !== undefined ? <div className="pda-info-card-progress">
47
- <div className="pda-info-card-progress-inside" style={{width: `${percentage * 100}%`}}/>
48
- </div> : null
49
- }
50
- <div className="pda-info-card-bold">{boldInfo}</div>
51
- {
52
- infoList.map((item, index) => {
53
- return (
54
- <div key={index} className="pda-info-card-list">
55
- <span>{item.label || ''}</span>
56
- &nbsp;&nbsp;
57
- <span>{item.content || ''}</span>
58
- </div>
59
- )
60
- })
61
- }
62
- </div>
63
- )
64
- }
65
- }
66
-
67
- PdaInfoCard.IMAGE_1 = "https://img.alicdn.com/imgextra/i2/O1CN01qYuxip1ME9zhdL9XG_!!6000000001402-2-tps-150-150.png";
@@ -1,111 +0,0 @@
1
- .pda-info-card {
2
- border-radius: 16px;
3
- padding: 16px;
4
- background-color: white;
5
- word-break: break-word;
6
- .divda-info-card-title{
7
- font-size: 32px;
8
- line-height: 32px;
9
- }
10
- .pda-info-card-title-section {
11
- display: flex;
12
- flex-direction: row;
13
- justify-content: space-between;
14
- align-items: center;
15
- .pda-info-card-title {
16
- font-size: 32px;
17
- color: #666666;
18
- // margin: 0;
19
- // margin-bottom: 16px;
20
- }
21
- .pda-info-card-tag {
22
- display: flex;
23
- align-items: center;
24
- justify-content: center;
25
- height: 36px;
26
- padding: 0 8px;
27
- background-color: #FFCC00;
28
- border-radius: 8px;
29
- }
30
- }
31
-
32
- .pda-info-card-highlight-section{
33
- display: flex;
34
- flex-direction: row;
35
- justify-content: space-between;
36
- align-items: flex-start;
37
- .pda-info-card-title {
38
- font-size: 32px;
39
- color: #666666;
40
- margin-top: 20px;
41
- }
42
- .pda-info-card-highlight {
43
- font-size: 80px;
44
- line-height: 64px;
45
- color: #0091EA;
46
- font-weight: bold;
47
- // margin: 0;
48
- // vertical-align: text-bottom;
49
-
50
- display: flex;
51
- flex-direction: row;
52
- align-items: flex-end;
53
-
54
- .pda-info-card-highlight1CN {
55
- font-size: 64px;
56
- }
57
- .pda-info-card-highlight2 {
58
- font-size: 50px;
59
- line-height: 40px;
60
- }
61
- .pda-info-card-highlight2CN {
62
- font-size: 40px;
63
- line-height: 40px;
64
- }
65
- }
66
- }
67
- .pda-info-card-bold {
68
- font-weight: bold;
69
- font-size: 40px;
70
- line-height: 48px;
71
- // margin: 0;
72
- color: black;
73
- margin-top: 16px;
74
- }
75
- .pda-info-card-list {
76
- margin-top: 12px;
77
- color: #4A4A4A;
78
- font-size: 32px;
79
- line-height: 32px;
80
- word-break: break-all;
81
- }
82
- }
83
- .pda-info-card-progress {
84
- background-color: #F3F4F8;
85
- height: 12px;
86
- border-radius: 6px;
87
- margin-top: 16px;
88
- .pda-info-card-progress-inside {
89
- background-color: #0091EA;
90
- height: 12px;
91
- border-radius: 6px;
92
- }
93
- }
94
-
95
-
96
- .pda-info-card.pda-info-card-dark {
97
- background-color: black;
98
- .pda-info-card-title {
99
- color: #999999;
100
- }
101
-
102
- .pda-info-card-highlight {
103
- color: #FFFFFF;
104
- }
105
- .pda-info-card-bold {
106
- color: #FFFFFF;
107
- }
108
- .pda-info-card-list {
109
- color: #999999;
110
- }
111
- }
@@ -1,89 +0,0 @@
1
- import React from "react";
2
- import List from "./index";
3
- const dataSource = [{
4
- title: "hello world",
5
- subTitle:"sub title",
6
- extra:"11111",
7
- tags:[1,2,3,4]
8
- },{
9
- title: "hello world",
10
- subTitle:"sub title",
11
- extra:"",
12
- tags:[1,2,3,4]
13
- },{
14
- title: "hello world",
15
- subTitle:"sub title",
16
- },{
17
- title: "hello world",
18
- subTitle:"sub title",
19
- extra:"11111",
20
- }];
21
-
22
- export default function () {
23
- return (
24
- <div>
25
- <h1>List</h1>
26
- <p>列表组件,通常要配合不同的 List Item 来使用</p>
27
- <h2>示例</h2>
28
- <div className="light-block">
29
- <List
30
- onClickItem={console.log}
31
- dataSource={dataSource}
32
- >
33
- </List>
34
- </div>
35
- <code className="code">{`
36
- const dataSource = [{
37
- title: "hello world",
38
- subTitle:"sub title",
39
- extra:"11111",
40
- tags:[1,2,3,4]
41
- },{
42
- title: "hello world",
43
- subTitle:"sub title",
44
- extra:"",
45
- tags:[1,2,3,4]
46
- },{
47
- title: "hello world",
48
- subTitle:"sub title",
49
- },{
50
- title: "hello world",
51
- subTitle:"sub title",
52
- extra:"11111",
53
- }];
54
- <List
55
- onClickItem={console.log}
56
- tabIndex={0}
57
- dataSource={dataSource}
58
- >
59
- </List>
60
- `}</code>
61
-
62
- <h2>List</h2>
63
- <table className="pure-table pure-table-bordered">
64
- <thead>
65
- <tr>
66
- <th>属性</th>
67
- <th>说明</th>
68
- <th>类型</th>
69
- <th>默认值</th>
70
- </tr>
71
- </thead>
72
- <tbody>
73
- <tr>
74
- <td>onClickItem</td>
75
- <td>Item 点击回调,参数 dataSource[i]</td>
76
- <td>Function</td>
77
- <td>-</td>
78
- </tr>
79
- <tr>
80
- <td>dataSource</td>
81
- <td>{`Array({title, subTitle, extra, tags})`}</td>
82
- <td>Array</td>
83
- <td>-</td>
84
- </tr>
85
- </tbody>
86
- </table>
87
- </div>
88
- );
89
- }
@@ -1,54 +0,0 @@
1
- import React from "react";
2
- import "./index.less";
3
-
4
- function empty(){}
5
-
6
- export default function List(props) {
7
- // onItemClick 兼容老的方法
8
- const { dataSource=[], onClickItem, onItemClick=empty} = props;
9
- return (
10
- <div className="android-pda-list" >
11
- {
12
- dataSource.map((item, index)=>{
13
- return <DefaultItem key={item.key || index} dataSource={item} onClick={onClickItem || onItemClick} ></DefaultItem>
14
- })
15
- }
16
- {
17
- props.children
18
- }
19
- </div>
20
- );
21
- }
22
-
23
-
24
- // 默认 item
25
- function DefaultItem(props){
26
- // 兼容老的用法,直接用 List.Item
27
- const dataSource = props.dataSource || {
28
- title: props.title,
29
- subTitle: props.subTitle,
30
- extra: props.extra,
31
- tags: props.tags
32
- };
33
- const { title, subTitle, extra, tags=[], tabIndex} = dataSource;
34
- const { onClick } = props;
35
- return <div className="default-item" onClick={()=>{ onClick(props.dataSource) }} tabIndex={tabIndex} >
36
- <div className="text">
37
- <div>{title}</div>
38
- <div className="sub-text">
39
- {subTitle}
40
- </div>
41
- <div className="sub-tags">
42
- {
43
- tags.map((text)=>{
44
- return <div className="sub-tag-item" key={text} >{text}</div>
45
- })
46
- }
47
- </div>
48
- </div>
49
- <div className="extra">{extra}</div>
50
- </div>
51
- }
52
-
53
- //
54
- List.Item = DefaultItem;
@@ -1,43 +0,0 @@
1
- .android-pda-list{
2
- .default-item{
3
- background-color:#282828;
4
- font-size:36px;
5
- padding:10px 10px;
6
- border-radius: 6px;
7
- color:#ffffff;
8
- display: flex;
9
- justify-content: space-between;
10
- align-items:center;
11
- cursor: pointer;
12
- margin-bottom:10px;
13
- &:hover,&:active,&:focus{
14
- background-color:#686868;
15
- }
16
- .text{
17
- flex:1;
18
- }
19
- .sub-text{
20
- font-size:80%;
21
- opacity:0.7;
22
- }
23
- .sub-tags{
24
- display: flex;
25
- .sub-tag-item{
26
- background-color:#00FF00;
27
- padding:2px;
28
- font-size:60%;
29
- margin-right:3px;
30
- border-radius:2px;
31
- color:#000000;
32
- line-height:1em;
33
- }
34
- .sub-tag-item:first-child{
35
- margin-left:0;
36
- }
37
- }
38
- .extra{
39
- font-size:80%;
40
- opacity:0.7;
41
- }
42
- }
43
- }
@@ -1,103 +0,0 @@
1
- import React from "react";
2
- import Overlay from "./index";
3
- import Toast from '../Toast/index';
4
- import Confirm from '../Confirm/index';
5
- // import './doc.less';
6
-
7
- export default function () {
8
- return (
9
- <div>
10
- <h1>Overlay</h1>
11
- <p>统一处理模态遮罩样式</p>
12
- <h2>示例</h2>
13
- <div className="light-block light-block-overlay" >
14
- <Overlay verticalPosition="top">
15
- <Toast
16
- title="111111"
17
- message="22222"
18
- type="success"
19
- ></Toast>
20
- </Overlay>
21
- </div>
22
- <br />
23
- <div className="light-block light-block-overlay" >
24
- <Overlay verticalPosition="center" >
25
- <Toast
26
- title="111111"
27
- message="22222"
28
- type="warning"
29
- ></Toast>
30
- </Overlay>
31
- </div>
32
-
33
- <br />
34
- <div className="light-block light-block-overlay" >
35
- <Overlay verticalPosition="bottom" closable={true}>
36
- <Confirm
37
- title="111111"
38
- message="22222"
39
- type="error"
40
- ></Confirm>
41
- </Overlay>
42
- </div>
43
-
44
- <code className="code">{`
45
- <Overlay verticalPosition="top" >
46
- <Toast
47
- title="111111"
48
- message="22222"
49
- type="success"
50
- ></Toast>
51
- </Overlay>
52
-
53
- <Overlay verticalPosition="center" >
54
- <Toast
55
- title="111111"
56
- message="22222"
57
- type="success"
58
- ></Toast>
59
- </Overlay>
60
-
61
- <Overlay verticalPosition="bottom" >
62
- <Toast
63
- title="111111"
64
- message="22222"
65
- type="success"
66
- ></Toast>
67
- </Overlay>
68
-
69
- `}</code>
70
- <h2>参数</h2>
71
- <table className="pure-table pure-table-bordered">
72
- <thead>
73
- <tr>
74
- <th>属性</th>
75
- <th>说明</th>
76
- <th>类型</th>
77
- <th>默认值</th>
78
- </tr>
79
- </thead>
80
- <tbody>
81
- <tr>
82
- <td>verticalPosition</td>
83
- <td>垂直方向位置</td>
84
- <td>string</td>
85
- <td>top|center|bottom</td>
86
- </tr>
87
- <tr>
88
- <td>closable</td>
89
- <td>点击空白关闭</td>
90
- <td>boolean</td>
91
- <td>false</td>
92
- </tr>
93
- <tr>
94
- <td>visible</td>
95
- <td>可见</td>
96
- <td>boolean</td>
97
- <td>true</td>
98
- </tr>
99
- </tbody>
100
- </table>
101
- </div>
102
- );
103
- }
@@ -1,42 +0,0 @@
1
- import React, { useState, useEffect } from "react";
2
- import "./index.less";
3
-
4
- function getTypeClass(type){
5
- return {
6
- "center" : "op-overlay center",
7
- "top" : "op-overlay top",
8
- "bottom" : "op-overlay bottom",
9
- }[type] || "op-overlay"
10
- }
11
-
12
- export default function Overlay(props) {
13
- const {verticalPosition = "center", visible=true, closable = false, onClosed = () => {}} = props;
14
- const [hidden, setHidden] = useState(!visible);
15
-
16
- useEffect(() => {
17
- setHidden(!visible);
18
- // return () => {
19
- // cleanup
20
- // }
21
- }, [visible])
22
-
23
- const option = {};
24
- if(closable) {
25
- option.onClick = e => {
26
- setHidden(true);
27
- onClosed();
28
- };
29
- }
30
- useEffect(() => {
31
- setHidden(!visible);
32
- }, [visible])
33
-
34
- return !hidden ? (
35
- <div
36
- className={getTypeClass(verticalPosition)}
37
- {...option}
38
- >
39
- {props.children}
40
- </div>
41
- ) : null;
42
- }
@@ -1,28 +0,0 @@
1
- .op-overlay {
2
- top: 0;
3
- left: 0;
4
- position: fixed;
5
- right: 0;
6
- bottom: 0;
7
- // width: 100vw;
8
- // height: 100vh;
9
- display: flex;
10
- justify-content: center;
11
- align-items: center;
12
- background-color: rgba(0, 0, 0, 0.4);
13
- z-index: 100;
14
-
15
- &.center{
16
- align-items: center;
17
- justify-content: center;
18
- }
19
- &.top{
20
- align-items: flex-start;
21
- justify-content: center;
22
- }
23
- &.bottom{
24
- align-items: flex-end;
25
- justify-content: center;
26
- }
27
-
28
- }