@lowdefy/blocks-loaders 4.0.0-alpha.1 → 4.0.0-alpha.12
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/blocks/IconSpinner/IconSpinner.js +23 -19
- package/dist/blocks/IconSpinner/style.less +1 -1
- package/dist/blocks/ProgressBar/ProgressBar.js +46 -0
- package/dist/blocks/ProgressBar/schema.json +29 -0
- package/dist/blocks/{LogoSpinner → ProgressBar}/style.less +22 -22
- package/dist/blocks/Skeleton/Skeleton.js +9 -3
- package/dist/blocks/Skeleton/style.less +1 -1
- package/dist/blocks/SkeletonAvatar/SkeletonAvatar.js +10 -5
- package/dist/blocks/SkeletonAvatar/style.less +1 -1
- package/dist/blocks/SkeletonButton/SkeletonButton.js +10 -5
- package/dist/blocks/SkeletonButton/style.less +1 -1
- package/dist/blocks/SkeletonInput/SkeletonInput.js +28 -29
- package/dist/blocks/SkeletonInput/style.less +1 -1
- package/dist/blocks/SkeletonParagraph/SkeletonParagraph.js +24 -19
- package/dist/blocks/SkeletonParagraph/style.less +1 -1
- package/dist/blocks/Spinner/Spinner.js +24 -28
- package/dist/blocks/Spinner/style.less +1 -3
- package/dist/blocks.js +22 -0
- package/dist/{blocks/IconSpinner/index.js → types.js} +15 -12
- package/package.json +25 -17
- package/dist/blocks/LogoSpinner/LogoSpinner.js +0 -54
- package/dist/blocks/Skeleton/index.js +0 -26
- package/dist/blocks/SkeletonAvatar/index.js +0 -26
- package/dist/blocks/SkeletonButton/index.js +0 -26
- package/dist/blocks/SkeletonInput/index.js +0 -26
- package/dist/blocks/SkeletonParagraph/index.js +0 -26
- package/dist/blocks/Spinner/index.js +0 -26
- package/dist/index.js +0 -35
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
/*
|
|
3
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
4
3
|
|
|
5
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
you may not use this file except in compliance with the License.
|
|
@@ -30,7 +29,7 @@ const IconSpinner = ({ properties , methods })=>{
|
|
|
30
29
|
size = 24;
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
|
-
return(/*#__PURE__*/
|
|
32
|
+
return(/*#__PURE__*/ React.createElement("span", {
|
|
34
33
|
className: methods.makeCssClass([
|
|
35
34
|
{
|
|
36
35
|
height: size,
|
|
@@ -39,22 +38,27 @@ const IconSpinner = ({ properties , methods })=>{
|
|
|
39
38
|
justifyContent: 'center'
|
|
40
39
|
},
|
|
41
40
|
properties.style,
|
|
42
|
-
])
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
})
|
|
57
|
-
}));
|
|
41
|
+
])
|
|
42
|
+
}, /*#__PURE__*/ React.createElement("svg", {
|
|
43
|
+
viewBox: "0 0 1024 1024",
|
|
44
|
+
focusable: "false",
|
|
45
|
+
"data-icon": "loading-3-quarters",
|
|
46
|
+
width: size,
|
|
47
|
+
height: size,
|
|
48
|
+
fill: "currentColor",
|
|
49
|
+
"aria-hidden": "true",
|
|
50
|
+
className: "icon-spinner"
|
|
51
|
+
}, /*#__PURE__*/ React.createElement("path", {
|
|
52
|
+
fill: "#bfbfbf",
|
|
53
|
+
d: "M512 1024c-69.1 0-136.2-13.5-199.3-40.2C251.7 958 197 921 150 874c-47-47-84-101.7-109.8-162.7C13.5 648.2 0 581.1 0 512c0-19.9 16.1-36 36-36s36 16.1 36 36c0 59.4 11.6 117 34.6 171.3 22.2 52.4 53.9 99.5 94.3 139.9 40.4 40.4 87.5 72.2 139.9 94.3C395 940.4 452.6 952 512 952c59.4 0 117-11.6 171.3-34.6 52.4-22.2 99.5-53.9 139.9-94.3 40.4-40.4 72.2-87.5 94.3-139.9C940.4 629 952 571.4 952 512c0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.2C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3s-13.5 136.2-40.2 199.3C958 772.3 921 827 874 874c-47 47-101.8 83.9-162.7 109.7-63.1 26.8-130.2 40.3-199.3 40.3z"
|
|
54
|
+
}))));
|
|
58
55
|
};
|
|
59
56
|
IconSpinner.defaultProps = blockDefaultProps;
|
|
57
|
+
IconSpinner.meta = {
|
|
58
|
+
category: 'display',
|
|
59
|
+
icons: [],
|
|
60
|
+
styles: [
|
|
61
|
+
'blocks/IconSpinner/style.less'
|
|
62
|
+
]
|
|
63
|
+
};
|
|
60
64
|
export default IconSpinner;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import React from 'react';
|
|
16
|
+
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
17
|
+
const ProgressBar = ({ blockId , methods , style , properties })=>{
|
|
18
|
+
const { progress =30 , height =4 , transitionTime =1000 , // loaderSpeed = 500,
|
|
19
|
+
// waitingTime = 1000,
|
|
20
|
+
shadow =true , } = properties;
|
|
21
|
+
return(/*#__PURE__*/ React.createElement("div", {
|
|
22
|
+
id: blockId,
|
|
23
|
+
className: methods.makeCssClass(style),
|
|
24
|
+
style: {
|
|
25
|
+
'--height': height + 'px',
|
|
26
|
+
'--progress': progress + '%',
|
|
27
|
+
'--transition': 'all ' + transitionTime + 'ms ease',
|
|
28
|
+
'--opacity': progress < 100 ? 1 : 0
|
|
29
|
+
}
|
|
30
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
31
|
+
className: "progress-bar-container"
|
|
32
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
33
|
+
className: "progress-bar-loader"
|
|
34
|
+
}, shadow ? /*#__PURE__*/ React.createElement("div", {
|
|
35
|
+
className: "progress-bar-shadow"
|
|
36
|
+
}) : null))));
|
|
37
|
+
};
|
|
38
|
+
ProgressBar.defaultProps = blockDefaultProps;
|
|
39
|
+
ProgressBar.meta = {
|
|
40
|
+
category: 'display',
|
|
41
|
+
icons: [],
|
|
42
|
+
styles: [
|
|
43
|
+
'blocks/ProgressBar/style.less'
|
|
44
|
+
]
|
|
45
|
+
};
|
|
46
|
+
export default ProgressBar;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"properties": {
|
|
7
|
+
"style": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"description": "Css style object to apply to the skeleton.",
|
|
10
|
+
"docs": {
|
|
11
|
+
"displayType": "yaml"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"height": {
|
|
15
|
+
"type": ["number", "string"],
|
|
16
|
+
"description": "Height of the skeleton."
|
|
17
|
+
},
|
|
18
|
+
"width": {
|
|
19
|
+
"type": ["number", "string"],
|
|
20
|
+
"description": "Width of the skeleton."
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"events": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"properties": {}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -14,30 +14,30 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
.
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
.progress-bar-loader {
|
|
18
|
+
height: 100%;
|
|
19
|
+
width: var(--progress); // initial 0%
|
|
20
|
+
background: @primary-color;
|
|
21
|
+
transition: var(--transition);
|
|
22
|
+
opacity: var(--opacity);
|
|
20
23
|
}
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
.progress-bar-container {
|
|
26
|
+
position: fixed;
|
|
27
|
+
top: 0;
|
|
28
|
+
left: 0;
|
|
29
|
+
height: var(--height);
|
|
30
|
+
z-index: 99999999999;
|
|
31
|
+
width: 100%;
|
|
29
32
|
}
|
|
30
33
|
|
|
31
|
-
.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
100% {
|
|
41
|
-
transform: scaleY(0.9);
|
|
42
|
-
}
|
|
34
|
+
.progress-bar-shadow {
|
|
35
|
+
box-shadow: 0 0 10px @primary-color, 0 0 10px @primary-color;
|
|
36
|
+
width: 20px;
|
|
37
|
+
opacity: 1;
|
|
38
|
+
position: absolute;
|
|
39
|
+
height: 100%;
|
|
40
|
+
transition: var(--transition);
|
|
41
|
+
transform: rotate(3deg) translate(0px, -4px);
|
|
42
|
+
left: calc(var(--progress) - 20px); // initial -10rem
|
|
43
43
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
/*
|
|
3
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
4
3
|
|
|
5
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
you may not use this file except in compliance with the License.
|
|
@@ -16,7 +15,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
16
15
|
*/ import React from 'react';
|
|
17
16
|
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
18
17
|
const Skeleton = ({ properties , methods })=>{
|
|
19
|
-
return(/*#__PURE__*/
|
|
18
|
+
return(/*#__PURE__*/ React.createElement("div", {
|
|
20
19
|
className: 'skeleton ' + methods.makeCssClass(properties.style),
|
|
21
20
|
style: {
|
|
22
21
|
width: properties.width || '100%',
|
|
@@ -25,4 +24,11 @@ const Skeleton = ({ properties , methods })=>{
|
|
|
25
24
|
}));
|
|
26
25
|
};
|
|
27
26
|
Skeleton.defaultProps = blockDefaultProps;
|
|
27
|
+
Skeleton.meta = {
|
|
28
|
+
category: 'display',
|
|
29
|
+
icons: [],
|
|
30
|
+
styles: [
|
|
31
|
+
'blocks/Skeleton/style.less'
|
|
32
|
+
]
|
|
33
|
+
};
|
|
28
34
|
export default Skeleton;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
/*
|
|
3
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
4
3
|
|
|
5
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
you may not use this file except in compliance with the License.
|
|
@@ -31,15 +30,14 @@ const SkeletonAvatar = ({ properties , methods })=>{
|
|
|
31
30
|
size = 32;
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
|
-
return(/*#__PURE__*/
|
|
33
|
+
return(/*#__PURE__*/ React.createElement(Skeleton, {
|
|
35
34
|
methods: methods,
|
|
36
35
|
properties: {
|
|
37
36
|
style: {
|
|
38
37
|
...{
|
|
39
38
|
borderRadius: properties.shape === 'square' ? '0' : size / 2
|
|
40
39
|
},
|
|
41
|
-
...properties.style || {
|
|
42
|
-
}
|
|
40
|
+
...properties.style || {}
|
|
43
41
|
},
|
|
44
42
|
width: size,
|
|
45
43
|
height: size
|
|
@@ -47,4 +45,11 @@ const SkeletonAvatar = ({ properties , methods })=>{
|
|
|
47
45
|
}));
|
|
48
46
|
};
|
|
49
47
|
SkeletonAvatar.defaultProps = blockDefaultProps;
|
|
48
|
+
SkeletonAvatar.meta = {
|
|
49
|
+
category: 'display',
|
|
50
|
+
icons: [],
|
|
51
|
+
styles: [
|
|
52
|
+
'blocks/SkeletonAvatar/style.less'
|
|
53
|
+
]
|
|
54
|
+
};
|
|
50
55
|
export default SkeletonAvatar;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
/*
|
|
3
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
4
3
|
|
|
5
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
you may not use this file except in compliance with the License.
|
|
@@ -28,15 +27,14 @@ const SkeletonButton = ({ properties , methods })=>{
|
|
|
28
27
|
default:
|
|
29
28
|
height = 32;
|
|
30
29
|
}
|
|
31
|
-
return(/*#__PURE__*/
|
|
30
|
+
return(/*#__PURE__*/ React.createElement(Skeleton, {
|
|
32
31
|
methods: methods,
|
|
33
32
|
properties: {
|
|
34
33
|
style: {
|
|
35
34
|
...{
|
|
36
35
|
borderRadius: properties.shape === 'round' && height / 2
|
|
37
36
|
},
|
|
38
|
-
...properties.style || {
|
|
39
|
-
}
|
|
37
|
+
...properties.style || {}
|
|
40
38
|
},
|
|
41
39
|
width: properties.width || '100%',
|
|
42
40
|
height: height
|
|
@@ -44,4 +42,11 @@ const SkeletonButton = ({ properties , methods })=>{
|
|
|
44
42
|
}));
|
|
45
43
|
};
|
|
46
44
|
SkeletonButton.defaultProps = blockDefaultProps;
|
|
45
|
+
SkeletonButton.meta = {
|
|
46
|
+
category: 'display',
|
|
47
|
+
icons: [],
|
|
48
|
+
styles: [
|
|
49
|
+
'blocks/SkeletonButton/style.less'
|
|
50
|
+
]
|
|
51
|
+
};
|
|
47
52
|
export default SkeletonButton;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
/*
|
|
3
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
4
3
|
|
|
5
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
you may not use this file except in compliance with the License.
|
|
@@ -28,33 +27,33 @@ const SkeletonInput = ({ properties , methods })=>{
|
|
|
28
27
|
default:
|
|
29
28
|
inputHeight = 32;
|
|
30
29
|
}
|
|
31
|
-
return(/*#__PURE__*/
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
height: properties.inputHeight || inputHeight,
|
|
52
|
-
style: properties.inputStyle || {
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
})
|
|
56
|
-
]
|
|
57
|
-
}));
|
|
30
|
+
return(/*#__PURE__*/ React.createElement("div", null, properties.label !== false && /*#__PURE__*/ React.createElement(Skeleton, {
|
|
31
|
+
methods: methods,
|
|
32
|
+
properties: {
|
|
33
|
+
width: properties.labelWidth || properties.width || '30%',
|
|
34
|
+
height: properties.labelHeight || 20,
|
|
35
|
+
style: {
|
|
36
|
+
...{
|
|
37
|
+
marginBottom: 10
|
|
38
|
+
},
|
|
39
|
+
...properties.labelStyle || {}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}), /*#__PURE__*/ React.createElement(Skeleton, {
|
|
43
|
+
methods: methods,
|
|
44
|
+
properties: {
|
|
45
|
+
width: properties.width || '100%',
|
|
46
|
+
height: properties.inputHeight || inputHeight,
|
|
47
|
+
style: properties.inputStyle || {}
|
|
48
|
+
}
|
|
49
|
+
})));
|
|
58
50
|
};
|
|
59
51
|
SkeletonInput.defaultProps = blockDefaultProps;
|
|
52
|
+
SkeletonInput.meta = {
|
|
53
|
+
category: 'display',
|
|
54
|
+
icons: [],
|
|
55
|
+
styles: [
|
|
56
|
+
'blocks/SkeletonInput/style.less'
|
|
57
|
+
]
|
|
58
|
+
};
|
|
60
59
|
export default SkeletonInput;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
/*
|
|
3
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
4
3
|
|
|
5
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
you may not use this file except in compliance with the License.
|
|
@@ -20,26 +19,32 @@ const SkeletonParagraph = ({ properties , methods })=>{
|
|
|
20
19
|
const lines = [
|
|
21
20
|
...Array(properties.lines || 4).keys()
|
|
22
21
|
];
|
|
23
|
-
return(/*#__PURE__*/
|
|
22
|
+
return(/*#__PURE__*/ React.createElement("div", {
|
|
24
23
|
style: {
|
|
25
24
|
width: properties.width || '100%'
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
...properties.style || {
|
|
25
|
+
}
|
|
26
|
+
}, lines.map((key)=>/*#__PURE__*/ React.createElement(Skeleton, {
|
|
27
|
+
key: key,
|
|
28
|
+
methods: methods,
|
|
29
|
+
properties: {
|
|
30
|
+
...{
|
|
31
|
+
height: '1.25rem',
|
|
32
|
+
width: key === lines.length - 1 && key !== 0 ? '40%' : '100%',
|
|
33
|
+
style: {
|
|
34
|
+
marginBottom: '1rem'
|
|
38
35
|
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
},
|
|
37
|
+
...properties.style || {}
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
)));
|
|
43
41
|
};
|
|
44
42
|
SkeletonParagraph.defaultProps = blockDefaultProps;
|
|
43
|
+
SkeletonParagraph.meta = {
|
|
44
|
+
category: 'display',
|
|
45
|
+
icons: [],
|
|
46
|
+
styles: [
|
|
47
|
+
'blocks/SkeletonParagraph/style.less'
|
|
48
|
+
]
|
|
49
|
+
};
|
|
45
50
|
export default SkeletonParagraph;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
/*
|
|
3
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
4
3
|
|
|
5
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
you may not use this file except in compliance with the License.
|
|
@@ -15,40 +14,37 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
15
14
|
limitations under the License.
|
|
16
15
|
*/ import React from 'react';
|
|
17
16
|
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
18
|
-
import LogoSpinner from '../LogoSpinner/LogoSpinner.js';
|
|
19
17
|
const Spinner = ({ properties , methods })=>{
|
|
20
|
-
return(/*#__PURE__*/
|
|
18
|
+
return(/*#__PURE__*/ React.createElement("div", {
|
|
21
19
|
className: methods.makeCssClass({
|
|
22
20
|
height: properties.height || '100%',
|
|
23
21
|
display: 'flex',
|
|
24
22
|
alignItems: 'center',
|
|
25
23
|
justifyContent: 'center',
|
|
26
24
|
background: properties.shaded === true && '#f1f1f1'
|
|
27
|
-
}),
|
|
28
|
-
children: /*#__PURE__*/ _jsxs("div", {
|
|
29
|
-
style: {
|
|
30
|
-
width: properties.size || 50,
|
|
31
|
-
margin: 'auto',
|
|
32
|
-
height: properties.size || 50
|
|
33
|
-
},
|
|
34
|
-
children: [
|
|
35
|
-
/*#__PURE__*/ _jsx(LogoSpinner, {
|
|
36
|
-
color: properties.color,
|
|
37
|
-
barColor: properties.barColor || (properties.shaded === true ? '#f1f1f1' : '#fff')
|
|
38
|
-
}),
|
|
39
|
-
/*#__PURE__*/ _jsx("div", {
|
|
40
|
-
className: methods.makeCssClass({
|
|
41
|
-
textAlign: 'center',
|
|
42
|
-
color: '#bfbfbf',
|
|
43
|
-
fontSize: 12,
|
|
44
|
-
paddingTop: 2,
|
|
45
|
-
fontFamily: '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'
|
|
46
|
-
}),
|
|
47
|
-
children: "Lowdefy"
|
|
48
|
-
})
|
|
49
|
-
]
|
|
50
25
|
})
|
|
51
|
-
}
|
|
26
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
27
|
+
style: {
|
|
28
|
+
width: properties.size || 50,
|
|
29
|
+
margin: 'auto',
|
|
30
|
+
height: properties.size || 50
|
|
31
|
+
}
|
|
32
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
33
|
+
className: methods.makeCssClass({
|
|
34
|
+
textAlign: 'center',
|
|
35
|
+
color: '#bfbfbf',
|
|
36
|
+
fontSize: 12,
|
|
37
|
+
paddingTop: 2,
|
|
38
|
+
fontFamily: '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'
|
|
39
|
+
})
|
|
40
|
+
}, "Lowdefy"))));
|
|
52
41
|
};
|
|
53
42
|
Spinner.defaultProps = blockDefaultProps;
|
|
43
|
+
Spinner.meta = {
|
|
44
|
+
category: 'display',
|
|
45
|
+
icons: [],
|
|
46
|
+
styles: [
|
|
47
|
+
'blocks/Spinner/style.less'
|
|
48
|
+
]
|
|
49
|
+
};
|
|
54
50
|
export default Spinner;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -13,5 +13,3 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
@import '../LogoSpinner/style.less';
|
package/dist/blocks.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ export { default as IconSpinner } from './blocks/IconSpinner/IconSpinner.js';
|
|
16
|
+
export { default as ProgressBar } from './blocks/ProgressBar/ProgressBar.js';
|
|
17
|
+
export { default as Skeleton } from './blocks/Skeleton/Skeleton.js';
|
|
18
|
+
export { default as SkeletonAvatar } from './blocks/SkeletonAvatar/SkeletonAvatar.js';
|
|
19
|
+
export { default as SkeletonButton } from './blocks/SkeletonButton/SkeletonButton.js';
|
|
20
|
+
export { default as SkeletonInput } from './blocks/SkeletonInput/SkeletonInput.js';
|
|
21
|
+
export { default as SkeletonParagraph } from './blocks/SkeletonParagraph/SkeletonParagraph.js';
|
|
22
|
+
export { default as Spinner } from './blocks/Spinner/Spinner.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-
|
|
1
|
+
/* eslint-disable import/namespace */ /*
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -12,15 +12,18 @@
|
|
|
12
12
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
*/ import * as blocks from './blocks.js';
|
|
16
|
+
const icons = {};
|
|
17
|
+
const styles = {};
|
|
18
|
+
Object.keys(blocks).forEach((block)=>{
|
|
19
|
+
icons[block] = blocks[block].meta.icons || [];
|
|
20
|
+
styles[block] = blocks[block].meta.styles || [];
|
|
21
|
+
});
|
|
22
|
+
export default {
|
|
23
|
+
blocks: Object.keys(blocks),
|
|
24
|
+
icons,
|
|
25
|
+
styles: {
|
|
26
|
+
default: [],
|
|
27
|
+
...styles
|
|
25
28
|
}
|
|
26
29
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/blocks-loaders",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.12",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Lowdefy loader blocks.",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"lowdefy",
|
|
9
|
-
"lowdefy blocks"
|
|
9
|
+
"lowdefy blocks",
|
|
10
|
+
"lowdefy plugin"
|
|
10
11
|
],
|
|
11
12
|
"bugs": {
|
|
12
13
|
"url": "https://github.com/lowdefy/lowdefy/issues"
|
|
@@ -19,6 +20,10 @@
|
|
|
19
20
|
{
|
|
20
21
|
"name": "Gerrie van Wyk",
|
|
21
22
|
"url": "https://github.com/Gervwyk"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "Sandile Memela",
|
|
26
|
+
"url": "https://github.com/sah-memela"
|
|
22
27
|
}
|
|
23
28
|
],
|
|
24
29
|
"repository": {
|
|
@@ -26,7 +31,11 @@
|
|
|
26
31
|
"url": "https://github.com/lowdefy/lowdefy.git"
|
|
27
32
|
},
|
|
28
33
|
"type": "module",
|
|
29
|
-
"exports":
|
|
34
|
+
"exports": {
|
|
35
|
+
"./*": "./dist/*",
|
|
36
|
+
"./blocks": "./dist/blocks.js",
|
|
37
|
+
"./types": "./dist/types.js"
|
|
38
|
+
},
|
|
30
39
|
"files": [
|
|
31
40
|
"dist/*"
|
|
32
41
|
],
|
|
@@ -40,28 +49,27 @@
|
|
|
40
49
|
"test": "jest --coverage"
|
|
41
50
|
},
|
|
42
51
|
"dependencies": {
|
|
43
|
-
"@lowdefy/block-utils": "4.0.0-alpha.
|
|
44
|
-
"@lowdefy/helpers": "4.0.0-alpha.
|
|
45
|
-
"react": "
|
|
46
|
-
"react-dom": "
|
|
52
|
+
"@lowdefy/block-utils": "4.0.0-alpha.12",
|
|
53
|
+
"@lowdefy/helpers": "4.0.0-alpha.12",
|
|
54
|
+
"react": "17.0.2",
|
|
55
|
+
"react-dom": "17.0.2"
|
|
47
56
|
},
|
|
48
57
|
"devDependencies": {
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"@swc/
|
|
53
|
-
"@swc/
|
|
54
|
-
"@
|
|
55
|
-
"@testing-library/dom": "8.10.1",
|
|
58
|
+
"@emotion/jest": "11.7.1",
|
|
59
|
+
"@lowdefy/block-dev": "4.0.0-alpha.12",
|
|
60
|
+
"@swc/cli": "0.1.55",
|
|
61
|
+
"@swc/core": "1.2.135",
|
|
62
|
+
"@swc/jest": "0.2.17",
|
|
63
|
+
"@testing-library/dom": "8.11.3",
|
|
56
64
|
"@testing-library/react": "13.0.0-alpha.4",
|
|
57
65
|
"@testing-library/user-event": "14.0.0-alpha.14",
|
|
58
66
|
"copyfiles": "2.4.1",
|
|
59
|
-
"jest": "27.
|
|
67
|
+
"jest": "27.5.1",
|
|
60
68
|
"jest-serializer-html": "7.1.0",
|
|
61
|
-
"jest-transform-yaml": "0.
|
|
69
|
+
"jest-transform-yaml": "1.0.0"
|
|
62
70
|
},
|
|
63
71
|
"publishConfig": {
|
|
64
72
|
"access": "public"
|
|
65
73
|
},
|
|
66
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "41b6138a81bee7da362dad06345bc9f87b2c2133"
|
|
67
75
|
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
4
|
-
|
|
5
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
you may not use this file except in compliance with the License.
|
|
7
|
-
You may obtain a copy of the License at
|
|
8
|
-
|
|
9
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
|
|
11
|
-
Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
See the License for the specific language governing permissions and
|
|
15
|
-
limitations under the License.
|
|
16
|
-
*/ import React from 'react';
|
|
17
|
-
const LogoSpinner = ({ color , barColor })=>/*#__PURE__*/ _jsx("svg", {
|
|
18
|
-
width: "100%",
|
|
19
|
-
height: "100%",
|
|
20
|
-
viewBox: "0 0 94 91",
|
|
21
|
-
version: "1.1",
|
|
22
|
-
children: /*#__PURE__*/ _jsxs("g", {
|
|
23
|
-
children: [
|
|
24
|
-
/*#__PURE__*/ _jsx("path", {
|
|
25
|
-
d: "M94,18.634c0,-10.284 -8.35,-18.634 -18.634,-18.634l-56.732,0c-10.284,0 -18.634,8.35 -18.634,18.634l0,53.732c0,10.284 8.35,18.634 18.634,18.634l56.732,0c10.284,0 18.634,-8.35 18.634,-18.634l0,-53.732Z",
|
|
26
|
-
style: {
|
|
27
|
-
fill: color || '#bfbfbf'
|
|
28
|
-
}
|
|
29
|
-
}),
|
|
30
|
-
/*#__PURE__*/ _jsx("rect", {
|
|
31
|
-
className: "loading-bar",
|
|
32
|
-
x: 16,
|
|
33
|
-
y: 15,
|
|
34
|
-
width: 30,
|
|
35
|
-
height: 59,
|
|
36
|
-
style: {
|
|
37
|
-
fill: barColor || '#f1f1f1'
|
|
38
|
-
}
|
|
39
|
-
}),
|
|
40
|
-
/*#__PURE__*/ _jsx("rect", {
|
|
41
|
-
className: "loading-bar-sm",
|
|
42
|
-
x: 53,
|
|
43
|
-
y: 52,
|
|
44
|
-
width: 25,
|
|
45
|
-
height: 25,
|
|
46
|
-
style: {
|
|
47
|
-
fill: barColor || '#f1f1f1'
|
|
48
|
-
}
|
|
49
|
-
})
|
|
50
|
-
]
|
|
51
|
-
})
|
|
52
|
-
})
|
|
53
|
-
;
|
|
54
|
-
export default LogoSpinner;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ export default {
|
|
16
|
-
import: {
|
|
17
|
-
block: 'blocks/Skeleton/Skeleton.js',
|
|
18
|
-
styles: [
|
|
19
|
-
'blocks/Skeleton/style.less'
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
meta: {
|
|
23
|
-
category: 'display',
|
|
24
|
-
loading: false
|
|
25
|
-
}
|
|
26
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ export default {
|
|
16
|
-
import: {
|
|
17
|
-
block: 'blocks/SkeletonAvatar/SkeletonAvatar.js',
|
|
18
|
-
styles: [
|
|
19
|
-
'blocks/SkeletonAvatar/style.less'
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
meta: {
|
|
23
|
-
category: 'display',
|
|
24
|
-
loading: false
|
|
25
|
-
}
|
|
26
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ export default {
|
|
16
|
-
import: {
|
|
17
|
-
block: 'blocks/SkeletonButton/SkeletonButton.js',
|
|
18
|
-
styles: [
|
|
19
|
-
'blocks/SkeletonButton/style.less'
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
meta: {
|
|
23
|
-
category: 'display',
|
|
24
|
-
loading: false
|
|
25
|
-
}
|
|
26
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ export default {
|
|
16
|
-
import: {
|
|
17
|
-
block: 'blocks/SkeletonInput/SkeletonInput.js',
|
|
18
|
-
styles: [
|
|
19
|
-
'blocks/SkeletonInput/style.less'
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
meta: {
|
|
23
|
-
category: 'display',
|
|
24
|
-
loading: false
|
|
25
|
-
}
|
|
26
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ export default {
|
|
16
|
-
import: {
|
|
17
|
-
block: 'blocks/SkeletonParagraph/SkeletonParagraph.js',
|
|
18
|
-
styles: [
|
|
19
|
-
'blocks/SkeletonParagraph/style.less'
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
meta: {
|
|
23
|
-
category: 'display',
|
|
24
|
-
loading: false
|
|
25
|
-
}
|
|
26
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ export default {
|
|
16
|
-
import: {
|
|
17
|
-
block: 'blocks/Spinner/Spinner.js',
|
|
18
|
-
styles: [
|
|
19
|
-
'blocks/Spinner/style.less'
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
meta: {
|
|
23
|
-
category: 'display',
|
|
24
|
-
loading: false
|
|
25
|
-
}
|
|
26
|
-
};
|
package/dist/index.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ import IconSpinner from './blocks/IconSpinner/IconSpinner.js';
|
|
16
|
-
import Skeleton from './blocks/Skeleton/Skeleton.js';
|
|
17
|
-
import SkeletonAvatar from './blocks/SkeletonAvatar/SkeletonAvatar.js';
|
|
18
|
-
import SkeletonButton from './blocks/SkeletonButton/SkeletonButton.js';
|
|
19
|
-
import SkeletonInput from './blocks/SkeletonInput/SkeletonInput.js';
|
|
20
|
-
import SkeletonParagraph from './blocks/SkeletonParagraph/SkeletonParagraph.js';
|
|
21
|
-
import Spinner from './blocks/Spinner/Spinner.js';
|
|
22
|
-
export default {
|
|
23
|
-
blocks: {
|
|
24
|
-
IconSpinner,
|
|
25
|
-
Skeleton,
|
|
26
|
-
SkeletonAvatar,
|
|
27
|
-
SkeletonButton,
|
|
28
|
-
SkeletonInput,
|
|
29
|
-
SkeletonParagraph,
|
|
30
|
-
Spinner
|
|
31
|
-
},
|
|
32
|
-
import: {
|
|
33
|
-
styles: []
|
|
34
|
-
}
|
|
35
|
-
};
|