@lowdefy/blocks-loaders 4.0.0-alpha.26 → 4.0.0-alpha.29
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 +8 -9
- package/dist/blocks/IconSpinner/IconSpinner.js +0 -64
- package/dist/blocks/IconSpinner/schema.json +0 -26
- package/dist/blocks/IconSpinner/style.less +0 -29
- package/dist/blocks/ProgressBar/ProgressBar.js +0 -46
- package/dist/blocks/ProgressBar/schema.json +0 -29
- package/dist/blocks/ProgressBar/style.less +0 -43
- package/dist/blocks/Skeleton/Skeleton.js +0 -34
- package/dist/blocks/Skeleton/schema.json +0 -29
- package/dist/blocks/Skeleton/style.less +0 -45
- package/dist/blocks/SkeletonAvatar/SkeletonAvatar.js +0 -55
- package/dist/blocks/SkeletonAvatar/schema.json +0 -41
- package/dist/blocks/SkeletonAvatar/style.less +0 -17
- package/dist/blocks/SkeletonButton/SkeletonButton.js +0 -52
- package/dist/blocks/SkeletonButton/schema.json +0 -41
- package/dist/blocks/SkeletonButton/style.less +0 -17
- package/dist/blocks/SkeletonInput/SkeletonInput.js +0 -59
- package/dist/blocks/SkeletonInput/schema.json +0 -60
- package/dist/blocks/SkeletonInput/style.less +0 -17
- package/dist/blocks/SkeletonParagraph/SkeletonParagraph.js +0 -49
- package/dist/blocks/SkeletonParagraph/schema.json +0 -36
- package/dist/blocks/SkeletonParagraph/style.less +0 -17
- package/dist/blocks/Spinner/Spinner.js +0 -50
- package/dist/blocks/Spinner/schema.json +0 -32
- package/dist/blocks/Spinner/style.less +0 -15
- package/dist/blocks.js +0 -22
- package/dist/types.js +0 -29
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/blocks-loaders",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.29",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Lowdefy loader blocks.",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -40,24 +40,23 @@
|
|
|
40
40
|
"dist/*"
|
|
41
41
|
],
|
|
42
42
|
"scripts": {
|
|
43
|
-
"build": "
|
|
43
|
+
"build": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start && pnpm copyfiles",
|
|
44
44
|
"clean": "rm -rf dist",
|
|
45
45
|
"copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\"",
|
|
46
|
-
"
|
|
47
|
-
"swc": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start && yarn copyfiles",
|
|
46
|
+
"prepublishOnly": "pnpm build",
|
|
48
47
|
"test:watch": "jest --coverage --watch",
|
|
49
48
|
"test": "jest --coverage"
|
|
50
49
|
},
|
|
51
50
|
"dependencies": {
|
|
52
|
-
"@lowdefy/block-utils": "4.0.0-alpha.
|
|
53
|
-
"@lowdefy/helpers": "4.0.0-alpha.
|
|
51
|
+
"@lowdefy/block-utils": "4.0.0-alpha.29",
|
|
52
|
+
"@lowdefy/helpers": "4.0.0-alpha.29",
|
|
54
53
|
"react": "18.1.0",
|
|
55
54
|
"react-dom": "18.1.0"
|
|
56
55
|
},
|
|
57
56
|
"devDependencies": {
|
|
58
57
|
"@emotion/jest": "11.9.1",
|
|
59
|
-
"@lowdefy/block-dev": "4.0.0-alpha.
|
|
60
|
-
"@lowdefy/jest-yaml-transform": "4.0.0-alpha.
|
|
58
|
+
"@lowdefy/block-dev": "4.0.0-alpha.29",
|
|
59
|
+
"@lowdefy/jest-yaml-transform": "4.0.0-alpha.29",
|
|
61
60
|
"@swc/cli": "0.1.57",
|
|
62
61
|
"@swc/core": "1.2.194",
|
|
63
62
|
"@swc/jest": "0.2.21",
|
|
@@ -72,5 +71,5 @@
|
|
|
72
71
|
"publishConfig": {
|
|
73
72
|
"access": "public"
|
|
74
73
|
},
|
|
75
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "621a191ebc0a1569ee6669dc74c12f8be5a8c7f3"
|
|
76
75
|
}
|
|
@@ -1,64 +0,0 @@
|
|
|
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
|
-
*/ import React from 'react';
|
|
16
|
-
import { type } from '@lowdefy/helpers';
|
|
17
|
-
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
18
|
-
const IconSpinner = ({ properties , methods })=>{
|
|
19
|
-
let size = properties.size || 20;
|
|
20
|
-
if (type.isString(size)) {
|
|
21
|
-
switch(properties.size){
|
|
22
|
-
case 'small':
|
|
23
|
-
size = 20;
|
|
24
|
-
break;
|
|
25
|
-
case 'large':
|
|
26
|
-
size = 32;
|
|
27
|
-
break;
|
|
28
|
-
default:
|
|
29
|
-
size = 24;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return /*#__PURE__*/ React.createElement("span", {
|
|
33
|
-
className: methods.makeCssClass([
|
|
34
|
-
{
|
|
35
|
-
height: size,
|
|
36
|
-
display: 'flex',
|
|
37
|
-
alignItems: 'center',
|
|
38
|
-
justifyContent: 'center'
|
|
39
|
-
},
|
|
40
|
-
properties.style,
|
|
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
|
-
})));
|
|
55
|
-
};
|
|
56
|
-
IconSpinner.defaultProps = blockDefaultProps;
|
|
57
|
-
IconSpinner.meta = {
|
|
58
|
-
category: 'display',
|
|
59
|
-
icons: [],
|
|
60
|
-
styles: [
|
|
61
|
-
'blocks/IconSpinner/style.less'
|
|
62
|
-
]
|
|
63
|
-
};
|
|
64
|
-
export default IconSpinner;
|
|
@@ -1,26 +0,0 @@
|
|
|
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 icon.",
|
|
10
|
-
"docs": {
|
|
11
|
-
"displayType": "yaml"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"size": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"description": "Size of the icon spinner.",
|
|
17
|
-
"enum": ["small", "medium", "large"]
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"events": {
|
|
22
|
-
"type": "object",
|
|
23
|
-
"additionalProperties": false,
|
|
24
|
-
"properties": {}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
*/
|
|
16
|
-
|
|
17
|
-
.icon-spinner {
|
|
18
|
-
animation: spin-animation 1s infinite linear;
|
|
19
|
-
display: inline-block;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@keyframes spin-animation {
|
|
23
|
-
0% {
|
|
24
|
-
transform: rotate(0deg);
|
|
25
|
-
}
|
|
26
|
-
100% {
|
|
27
|
-
transform: rotate(359deg);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,46 +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 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;
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,43 +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
|
-
*/
|
|
16
|
-
|
|
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);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.progress-bar-container {
|
|
26
|
-
position: fixed;
|
|
27
|
-
top: 0;
|
|
28
|
-
left: 0;
|
|
29
|
-
height: var(--height);
|
|
30
|
-
z-index: 99999999999;
|
|
31
|
-
width: 100%;
|
|
32
|
-
}
|
|
33
|
-
|
|
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
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|
-
*/ import React from 'react';
|
|
16
|
-
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
17
|
-
const Skeleton = ({ properties , methods })=>{
|
|
18
|
-
return /*#__PURE__*/ React.createElement("div", {
|
|
19
|
-
className: 'skeleton ' + methods.makeCssClass(properties.style),
|
|
20
|
-
style: {
|
|
21
|
-
width: properties.width || '100%',
|
|
22
|
-
height: properties.height || '100%'
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
Skeleton.defaultProps = blockDefaultProps;
|
|
27
|
-
Skeleton.meta = {
|
|
28
|
-
category: 'display',
|
|
29
|
-
icons: [],
|
|
30
|
-
styles: [
|
|
31
|
-
'blocks/Skeleton/style.less'
|
|
32
|
-
]
|
|
33
|
-
};
|
|
34
|
-
export default Skeleton;
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
-
*/
|
|
16
|
-
|
|
17
|
-
.skeleton {
|
|
18
|
-
position: relative;
|
|
19
|
-
overflow: hidden;
|
|
20
|
-
background: #f1f1f1;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.skeleton::before {
|
|
24
|
-
content: '';
|
|
25
|
-
display: block;
|
|
26
|
-
position: absolute;
|
|
27
|
-
left: -100%;
|
|
28
|
-
max-width: 600px;
|
|
29
|
-
top: 0;
|
|
30
|
-
height: 200%;
|
|
31
|
-
width: 100%;
|
|
32
|
-
background: linear-gradient(to right, transparent 0%, #eaeaea 50%, transparent 100%);
|
|
33
|
-
background: -webkit-linear-gradient(to right, transparent 0%, #eaeaea 50%, transparent 100%);
|
|
34
|
-
animation: load 1.8s infinite;
|
|
35
|
-
/* transform: rotate(45deg); */
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@keyframes load {
|
|
39
|
-
from {
|
|
40
|
-
left: -100%;
|
|
41
|
-
}
|
|
42
|
-
to {
|
|
43
|
-
left: 100%;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
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
|
-
*/ import React from 'react';
|
|
16
|
-
import { type } from '@lowdefy/helpers';
|
|
17
|
-
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
18
|
-
import Skeleton from '../Skeleton/Skeleton.js';
|
|
19
|
-
const SkeletonAvatar = ({ properties , methods })=>{
|
|
20
|
-
let size = properties.size || 32;
|
|
21
|
-
if (type.isString(size)) {
|
|
22
|
-
switch(properties.size){
|
|
23
|
-
case 'small':
|
|
24
|
-
size = 24;
|
|
25
|
-
break;
|
|
26
|
-
case 'large':
|
|
27
|
-
size = 40;
|
|
28
|
-
break;
|
|
29
|
-
default:
|
|
30
|
-
size = 32;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return /*#__PURE__*/ React.createElement(Skeleton, {
|
|
34
|
-
methods: methods,
|
|
35
|
-
properties: {
|
|
36
|
-
style: {
|
|
37
|
-
...{
|
|
38
|
-
borderRadius: properties.shape === 'square' ? '0' : size / 2
|
|
39
|
-
},
|
|
40
|
-
...properties.style || {}
|
|
41
|
-
},
|
|
42
|
-
width: size,
|
|
43
|
-
height: size
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
SkeletonAvatar.defaultProps = blockDefaultProps;
|
|
48
|
-
SkeletonAvatar.meta = {
|
|
49
|
-
category: 'display',
|
|
50
|
-
icons: [],
|
|
51
|
-
styles: [
|
|
52
|
-
'blocks/SkeletonAvatar/style.less'
|
|
53
|
-
]
|
|
54
|
-
};
|
|
55
|
-
export default SkeletonAvatar;
|
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
"size": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"default": "medium",
|
|
17
|
-
"description": "Size of the skeleton.",
|
|
18
|
-
"enum": ["small", "medium", "large"]
|
|
19
|
-
},
|
|
20
|
-
"shape": {
|
|
21
|
-
"type": "string",
|
|
22
|
-
"default": "round",
|
|
23
|
-
"description": "Size of the skeleton.",
|
|
24
|
-
"enum": ["square", "round"]
|
|
25
|
-
},
|
|
26
|
-
"height": {
|
|
27
|
-
"type": ["number", "string"],
|
|
28
|
-
"description": "Height of the skeleton."
|
|
29
|
-
},
|
|
30
|
-
"width": {
|
|
31
|
-
"type": ["number", "string"],
|
|
32
|
-
"description": "Width of the skeleton."
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"events": {
|
|
37
|
-
"type": "object",
|
|
38
|
-
"additionalProperties": false,
|
|
39
|
-
"properties": {}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
*/
|
|
16
|
-
|
|
17
|
-
@import '../Skeleton/style.less';
|
|
@@ -1,52 +0,0 @@
|
|
|
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
|
-
*/ import React from 'react';
|
|
16
|
-
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
17
|
-
import Skeleton from '../Skeleton/Skeleton.js';
|
|
18
|
-
const SkeletonButton = ({ properties , methods })=>{
|
|
19
|
-
let height;
|
|
20
|
-
switch(properties.size){
|
|
21
|
-
case 'small':
|
|
22
|
-
height = 24;
|
|
23
|
-
break;
|
|
24
|
-
case 'large':
|
|
25
|
-
height = 40;
|
|
26
|
-
break;
|
|
27
|
-
default:
|
|
28
|
-
height = 32;
|
|
29
|
-
}
|
|
30
|
-
return /*#__PURE__*/ React.createElement(Skeleton, {
|
|
31
|
-
methods: methods,
|
|
32
|
-
properties: {
|
|
33
|
-
style: {
|
|
34
|
-
...{
|
|
35
|
-
borderRadius: properties.shape === 'round' && height / 2
|
|
36
|
-
},
|
|
37
|
-
...properties.style || {}
|
|
38
|
-
},
|
|
39
|
-
width: properties.width || '100%',
|
|
40
|
-
height: height
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
SkeletonButton.defaultProps = blockDefaultProps;
|
|
45
|
-
SkeletonButton.meta = {
|
|
46
|
-
category: 'display',
|
|
47
|
-
icons: [],
|
|
48
|
-
styles: [
|
|
49
|
-
'blocks/SkeletonButton/style.less'
|
|
50
|
-
]
|
|
51
|
-
};
|
|
52
|
-
export default SkeletonButton;
|
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
"size": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"default": "medium",
|
|
17
|
-
"description": "Size of the skeleton.",
|
|
18
|
-
"enum": ["small", "medium", "large"]
|
|
19
|
-
},
|
|
20
|
-
"shape": {
|
|
21
|
-
"type": "string",
|
|
22
|
-
"default": "round",
|
|
23
|
-
"description": "Size of the skeleton.",
|
|
24
|
-
"enum": ["square", "round"]
|
|
25
|
-
},
|
|
26
|
-
"height": {
|
|
27
|
-
"type": ["number", "string"],
|
|
28
|
-
"description": "Height of the skeleton."
|
|
29
|
-
},
|
|
30
|
-
"width": {
|
|
31
|
-
"type": ["number", "string"],
|
|
32
|
-
"description": "Width of the skeleton."
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"events": {
|
|
37
|
-
"type": "object",
|
|
38
|
-
"additionalProperties": false,
|
|
39
|
-
"properties": {}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
*/
|
|
16
|
-
|
|
17
|
-
@import '../Skeleton/style.less';
|
|
@@ -1,59 +0,0 @@
|
|
|
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
|
-
*/ import React from 'react';
|
|
16
|
-
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
17
|
-
import Skeleton from '../Skeleton/Skeleton.js';
|
|
18
|
-
const SkeletonInput = ({ properties , methods })=>{
|
|
19
|
-
let inputHeight;
|
|
20
|
-
switch(properties.size){
|
|
21
|
-
case 'small':
|
|
22
|
-
inputHeight = 24;
|
|
23
|
-
break;
|
|
24
|
-
case 'large':
|
|
25
|
-
inputHeight = 40;
|
|
26
|
-
break;
|
|
27
|
-
default:
|
|
28
|
-
inputHeight = 32;
|
|
29
|
-
}
|
|
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
|
-
}));
|
|
50
|
-
};
|
|
51
|
-
SkeletonInput.defaultProps = blockDefaultProps;
|
|
52
|
-
SkeletonInput.meta = {
|
|
53
|
-
category: 'display',
|
|
54
|
-
icons: [],
|
|
55
|
-
styles: [
|
|
56
|
-
'blocks/SkeletonInput/style.less'
|
|
57
|
-
]
|
|
58
|
-
};
|
|
59
|
-
export default SkeletonInput;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "object",
|
|
3
|
-
"properties": {
|
|
4
|
-
"type": "object",
|
|
5
|
-
"additionalProperties": false,
|
|
6
|
-
"properties": {
|
|
7
|
-
"labelStyle": {
|
|
8
|
-
"type": "object",
|
|
9
|
-
"description": "Css style object to apply to the label skeleton.",
|
|
10
|
-
"docs": {
|
|
11
|
-
"displayType": "yaml"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"inputStyle": {
|
|
15
|
-
"type": "object",
|
|
16
|
-
"description": "Css style object to apply to the input skeleton.",
|
|
17
|
-
"docs": {
|
|
18
|
-
"displayType": "yaml"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"size": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"default": "medium",
|
|
24
|
-
"description": "Size of the skeleton.",
|
|
25
|
-
"enum": ["small", "medium", "large"]
|
|
26
|
-
},
|
|
27
|
-
"shape": {
|
|
28
|
-
"type": "string",
|
|
29
|
-
"default": "round",
|
|
30
|
-
"description": "Size of the skeleton.",
|
|
31
|
-
"enum": ["square", "round"]
|
|
32
|
-
},
|
|
33
|
-
"height": {
|
|
34
|
-
"type": ["number", "string"],
|
|
35
|
-
"description": "Height of the skeleton."
|
|
36
|
-
},
|
|
37
|
-
"width": {
|
|
38
|
-
"type": ["number", "string"],
|
|
39
|
-
"description": "Width of the skeleton."
|
|
40
|
-
},
|
|
41
|
-
"labelHeight": {
|
|
42
|
-
"type": ["number", "string"],
|
|
43
|
-
"description": "Height of the skeleton."
|
|
44
|
-
},
|
|
45
|
-
"labelWidth": {
|
|
46
|
-
"type": ["number", "string"],
|
|
47
|
-
"description": "Width of the skeleton."
|
|
48
|
-
},
|
|
49
|
-
"inputHeight": {
|
|
50
|
-
"type": ["number", "string"],
|
|
51
|
-
"description": "Height of the skeleton."
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"events": {
|
|
56
|
-
"type": "object",
|
|
57
|
-
"additionalProperties": false,
|
|
58
|
-
"properties": {}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
*/
|
|
16
|
-
|
|
17
|
-
@import '../Skeleton/style.less';
|
|
@@ -1,49 +0,0 @@
|
|
|
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
|
-
*/ import React from 'react';
|
|
16
|
-
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
17
|
-
import Skeleton from '../Skeleton/Skeleton.js';
|
|
18
|
-
const SkeletonParagraph = ({ properties , methods })=>{
|
|
19
|
-
const lines = [
|
|
20
|
-
...Array(properties.lines || 4).keys()
|
|
21
|
-
];
|
|
22
|
-
return /*#__PURE__*/ React.createElement("div", {
|
|
23
|
-
style: {
|
|
24
|
-
width: properties.width || '100%'
|
|
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'
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
...properties.style || {}
|
|
38
|
-
}
|
|
39
|
-
})));
|
|
40
|
-
};
|
|
41
|
-
SkeletonParagraph.defaultProps = blockDefaultProps;
|
|
42
|
-
SkeletonParagraph.meta = {
|
|
43
|
-
category: 'display',
|
|
44
|
-
icons: [],
|
|
45
|
-
styles: [
|
|
46
|
-
'blocks/SkeletonParagraph/style.less'
|
|
47
|
-
]
|
|
48
|
-
};
|
|
49
|
-
export default SkeletonParagraph;
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
"size": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"default": "medium",
|
|
17
|
-
"description": "Size of the skeleton.",
|
|
18
|
-
"enum": ["small", "medium", "large"]
|
|
19
|
-
},
|
|
20
|
-
"lines": {
|
|
21
|
-
"type": "number",
|
|
22
|
-
"default": 4,
|
|
23
|
-
"description": "Number of paragraph lines of the skeleton."
|
|
24
|
-
},
|
|
25
|
-
"width": {
|
|
26
|
-
"type": ["number", "string"],
|
|
27
|
-
"description": "Width of the skeleton."
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"events": {
|
|
32
|
-
"type": "object",
|
|
33
|
-
"additionalProperties": false,
|
|
34
|
-
"properties": {}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
*/
|
|
16
|
-
|
|
17
|
-
@import '../Skeleton/style.less';
|
|
@@ -1,50 +0,0 @@
|
|
|
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
|
-
*/ import React from 'react';
|
|
16
|
-
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
17
|
-
const Spinner = ({ properties , methods })=>{
|
|
18
|
-
return /*#__PURE__*/ React.createElement("div", {
|
|
19
|
-
className: methods.makeCssClass({
|
|
20
|
-
height: properties.height || '100%',
|
|
21
|
-
display: 'flex',
|
|
22
|
-
alignItems: 'center',
|
|
23
|
-
justifyContent: 'center',
|
|
24
|
-
background: properties.shaded === true && '#f1f1f1'
|
|
25
|
-
})
|
|
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")));
|
|
41
|
-
};
|
|
42
|
-
Spinner.defaultProps = blockDefaultProps;
|
|
43
|
-
Spinner.meta = {
|
|
44
|
-
category: 'display',
|
|
45
|
-
icons: [],
|
|
46
|
-
styles: [
|
|
47
|
-
'blocks/Spinner/style.less'
|
|
48
|
-
]
|
|
49
|
-
};
|
|
50
|
-
export default Spinner;
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
"size": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"default": "medium",
|
|
17
|
-
"description": "Size of the logo spinner.",
|
|
18
|
-
"enum": ["small", "medium", "large"]
|
|
19
|
-
},
|
|
20
|
-
"height": {
|
|
21
|
-
"type": ["string", "number"],
|
|
22
|
-
"default": "100%",
|
|
23
|
-
"description": "Height of the container."
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"events": {
|
|
28
|
-
"type": "object",
|
|
29
|
-
"additionalProperties": false,
|
|
30
|
-
"properties": {}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
*/
|
package/dist/blocks.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
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';
|
package/dist/types.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/* eslint-disable import/namespace */ /*
|
|
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
|
-
*/ 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
|
|
28
|
-
}
|
|
29
|
-
};
|