@lowdefy/blocks-loaders 4.0.0-alpha.1
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/LICENSE +201 -0
- package/README.md +3 -0
- package/dist/blocks/IconSpinner/IconSpinner.js +60 -0
- package/dist/blocks/IconSpinner/index.js +26 -0
- package/dist/blocks/IconSpinner/schema.json +26 -0
- package/dist/blocks/IconSpinner/style.less +29 -0
- package/dist/blocks/LogoSpinner/LogoSpinner.js +54 -0
- package/dist/blocks/LogoSpinner/style.less +43 -0
- package/dist/blocks/Skeleton/Skeleton.js +28 -0
- package/dist/blocks/Skeleton/index.js +26 -0
- package/dist/blocks/Skeleton/schema.json +29 -0
- package/dist/blocks/Skeleton/style.less +45 -0
- package/dist/blocks/SkeletonAvatar/SkeletonAvatar.js +50 -0
- package/dist/blocks/SkeletonAvatar/index.js +26 -0
- package/dist/blocks/SkeletonAvatar/schema.json +41 -0
- package/dist/blocks/SkeletonAvatar/style.less +17 -0
- package/dist/blocks/SkeletonButton/SkeletonButton.js +47 -0
- package/dist/blocks/SkeletonButton/index.js +26 -0
- package/dist/blocks/SkeletonButton/schema.json +41 -0
- package/dist/blocks/SkeletonButton/style.less +17 -0
- package/dist/blocks/SkeletonInput/SkeletonInput.js +60 -0
- package/dist/blocks/SkeletonInput/index.js +26 -0
- package/dist/blocks/SkeletonInput/schema.json +60 -0
- package/dist/blocks/SkeletonInput/style.less +17 -0
- package/dist/blocks/SkeletonParagraph/SkeletonParagraph.js +45 -0
- package/dist/blocks/SkeletonParagraph/index.js +26 -0
- package/dist/blocks/SkeletonParagraph/schema.json +36 -0
- package/dist/blocks/SkeletonParagraph/style.less +17 -0
- package/dist/blocks/Spinner/Spinner.js +54 -0
- package/dist/blocks/Spinner/index.js +26 -0
- package/dist/blocks/Spinner/schema.json +32 -0
- package/dist/blocks/Spinner/style.less +17 -0
- package/dist/index.js +35 -0
- package/package.json +67 -0
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
@import '../Skeleton/style.less';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx } 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
|
+
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
18
|
+
import Skeleton from '../Skeleton/Skeleton.js';
|
|
19
|
+
const SkeletonButton = ({ properties , methods })=>{
|
|
20
|
+
let height;
|
|
21
|
+
switch(properties.size){
|
|
22
|
+
case 'small':
|
|
23
|
+
height = 24;
|
|
24
|
+
break;
|
|
25
|
+
case 'large':
|
|
26
|
+
height = 40;
|
|
27
|
+
break;
|
|
28
|
+
default:
|
|
29
|
+
height = 32;
|
|
30
|
+
}
|
|
31
|
+
return(/*#__PURE__*/ _jsx(Skeleton, {
|
|
32
|
+
methods: methods,
|
|
33
|
+
properties: {
|
|
34
|
+
style: {
|
|
35
|
+
...{
|
|
36
|
+
borderRadius: properties.shape === 'round' && height / 2
|
|
37
|
+
},
|
|
38
|
+
...properties.style || {
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
width: properties.width || '100%',
|
|
42
|
+
height: height
|
|
43
|
+
}
|
|
44
|
+
}));
|
|
45
|
+
};
|
|
46
|
+
SkeletonButton.defaultProps = blockDefaultProps;
|
|
47
|
+
export default SkeletonButton;
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
@import '../Skeleton/style.less';
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
18
|
+
import Skeleton from '../Skeleton/Skeleton.js';
|
|
19
|
+
const SkeletonInput = ({ properties , methods })=>{
|
|
20
|
+
let inputHeight;
|
|
21
|
+
switch(properties.size){
|
|
22
|
+
case 'small':
|
|
23
|
+
inputHeight = 24;
|
|
24
|
+
break;
|
|
25
|
+
case 'large':
|
|
26
|
+
inputHeight = 40;
|
|
27
|
+
break;
|
|
28
|
+
default:
|
|
29
|
+
inputHeight = 32;
|
|
30
|
+
}
|
|
31
|
+
return(/*#__PURE__*/ _jsxs("div", {
|
|
32
|
+
children: [
|
|
33
|
+
properties.label !== false && /*#__PURE__*/ _jsx(Skeleton, {
|
|
34
|
+
methods: methods,
|
|
35
|
+
properties: {
|
|
36
|
+
width: properties.labelWidth || properties.width || '30%',
|
|
37
|
+
height: properties.labelHeight || 20,
|
|
38
|
+
style: {
|
|
39
|
+
...{
|
|
40
|
+
marginBottom: 10
|
|
41
|
+
},
|
|
42
|
+
...properties.labelStyle || {
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}),
|
|
47
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
48
|
+
methods: methods,
|
|
49
|
+
properties: {
|
|
50
|
+
width: properties.width || '100%',
|
|
51
|
+
height: properties.inputHeight || inputHeight,
|
|
52
|
+
style: properties.inputStyle || {
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
}));
|
|
58
|
+
};
|
|
59
|
+
SkeletonInput.defaultProps = blockDefaultProps;
|
|
60
|
+
export default SkeletonInput;
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
@import '../Skeleton/style.less';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx } 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
|
+
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
18
|
+
import Skeleton from '../Skeleton/Skeleton.js';
|
|
19
|
+
const SkeletonParagraph = ({ properties , methods })=>{
|
|
20
|
+
const lines = [
|
|
21
|
+
...Array(properties.lines || 4).keys()
|
|
22
|
+
];
|
|
23
|
+
return(/*#__PURE__*/ _jsx("div", {
|
|
24
|
+
style: {
|
|
25
|
+
width: properties.width || '100%'
|
|
26
|
+
},
|
|
27
|
+
children: lines.map((key)=>/*#__PURE__*/ _jsx(Skeleton, {
|
|
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
|
+
}, key)
|
|
41
|
+
)
|
|
42
|
+
}));
|
|
43
|
+
};
|
|
44
|
+
SkeletonParagraph.defaultProps = blockDefaultProps;
|
|
45
|
+
export default SkeletonParagraph;
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
@import '../Skeleton/style.less';
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
18
|
+
import LogoSpinner from '../LogoSpinner/LogoSpinner.js';
|
|
19
|
+
const Spinner = ({ properties , methods })=>{
|
|
20
|
+
return(/*#__PURE__*/ _jsx("div", {
|
|
21
|
+
className: methods.makeCssClass({
|
|
22
|
+
height: properties.height || '100%',
|
|
23
|
+
display: 'flex',
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
justifyContent: 'center',
|
|
26
|
+
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
|
+
})
|
|
51
|
+
}));
|
|
52
|
+
};
|
|
53
|
+
Spinner.defaultProps = blockDefaultProps;
|
|
54
|
+
export default Spinner;
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
@import '../LogoSpinner/style.less';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
};
|