@lowdefy/blocks-loaders 5.0.0 → 5.2.0
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/Skeleton/style.module.css +20 -18
- package/dist/blocks/SkeletonAvatar/SkeletonAvatar.js +2 -1
- package/dist/blocks/SkeletonButton/SkeletonButton.js +2 -1
- package/dist/blocks/SkeletonInput/SkeletonInput.js +11 -3
- package/dist/blocks/SkeletonParagraph/SkeletonParagraph.js +5 -7
- package/package.json +5 -5
|
@@ -18,34 +18,36 @@
|
|
|
18
18
|
.skeleton {
|
|
19
19
|
position: relative;
|
|
20
20
|
overflow: hidden;
|
|
21
|
-
background: var(--ant-color-fill-
|
|
21
|
+
background-color: var(--ant-color-fill-secondary);
|
|
22
|
+
border-radius: var(--ant-border-radius-sm, 4px);
|
|
23
|
+
isolation: isolate;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
|
-
.skeleton::
|
|
26
|
+
.skeleton::after {
|
|
25
27
|
content: '';
|
|
26
|
-
display: block;
|
|
27
28
|
position: absolute;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
width: 100%;
|
|
33
|
-
background: linear-gradient(
|
|
34
|
-
to right,
|
|
29
|
+
inset: 0;
|
|
30
|
+
transform: translateX(-100%);
|
|
31
|
+
background-image: linear-gradient(
|
|
32
|
+
90deg,
|
|
35
33
|
transparent 0%,
|
|
36
|
-
var(--ant-color-fill-
|
|
34
|
+
var(--ant-color-fill-quaternary) 20%,
|
|
35
|
+
var(--ant-color-fill) 60%,
|
|
37
36
|
transparent 100%
|
|
38
37
|
);
|
|
39
|
-
animation:
|
|
40
|
-
|
|
38
|
+
animation: skeleton-shimmer 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
39
|
+
will-change: transform;
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
@keyframes
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
@keyframes skeleton-shimmer {
|
|
43
|
+
100% {
|
|
44
|
+
transform: translateX(100%);
|
|
46
45
|
}
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (prefers-reduced-motion: reduce) {
|
|
49
|
+
.skeleton::after {
|
|
50
|
+
animation: none;
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
53
|
}
|
|
@@ -30,11 +30,12 @@ const SkeletonAvatar = ({ classNames, properties, styles })=>{
|
|
|
30
30
|
size = 32;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
+
const borderRadius = properties.shape === 'square' ? 'var(--ant-border-radius-lg, 8px)' : size / 2;
|
|
33
34
|
return /*#__PURE__*/ React.createElement(Skeleton, {
|
|
34
35
|
classNames: classNames,
|
|
35
36
|
styles: {
|
|
36
37
|
element: {
|
|
37
|
-
borderRadius
|
|
38
|
+
borderRadius,
|
|
38
39
|
...styles?.element
|
|
39
40
|
}
|
|
40
41
|
},
|
|
@@ -27,11 +27,12 @@ const SkeletonButton = ({ classNames, properties, styles })=>{
|
|
|
27
27
|
default:
|
|
28
28
|
height = 32;
|
|
29
29
|
}
|
|
30
|
+
const borderRadius = properties.shape === 'round' ? height / 2 : 'var(--ant-border-radius, 6px)';
|
|
30
31
|
return /*#__PURE__*/ React.createElement(Skeleton, {
|
|
31
32
|
classNames: classNames,
|
|
32
33
|
styles: {
|
|
33
34
|
element: {
|
|
34
|
-
borderRadius
|
|
35
|
+
borderRadius,
|
|
35
36
|
...styles?.element
|
|
36
37
|
}
|
|
37
38
|
},
|
|
@@ -29,11 +29,16 @@ const SkeletonInput = ({ classNames, properties, styles })=>{
|
|
|
29
29
|
}
|
|
30
30
|
return /*#__PURE__*/ React.createElement("div", {
|
|
31
31
|
className: classNames?.element,
|
|
32
|
-
style:
|
|
32
|
+
style: {
|
|
33
|
+
display: 'flex',
|
|
34
|
+
flexDirection: 'column',
|
|
35
|
+
gap: 10,
|
|
36
|
+
...styles?.element
|
|
37
|
+
}
|
|
33
38
|
}, properties.label !== false && /*#__PURE__*/ React.createElement(Skeleton, {
|
|
34
39
|
styles: {
|
|
35
40
|
element: {
|
|
36
|
-
|
|
41
|
+
borderRadius: 'var(--ant-border-radius-sm, 4px)'
|
|
37
42
|
}
|
|
38
43
|
},
|
|
39
44
|
properties: {
|
|
@@ -42,7 +47,10 @@ const SkeletonInput = ({ classNames, properties, styles })=>{
|
|
|
42
47
|
}
|
|
43
48
|
}), /*#__PURE__*/ React.createElement(Skeleton, {
|
|
44
49
|
styles: {
|
|
45
|
-
element:
|
|
50
|
+
element: {
|
|
51
|
+
borderRadius: 'var(--ant-border-radius, 6px)',
|
|
52
|
+
...styles?.input
|
|
53
|
+
}
|
|
46
54
|
},
|
|
47
55
|
properties: {
|
|
48
56
|
width: properties.width ?? '100%',
|
|
@@ -23,18 +23,16 @@ const SkeletonParagraph = ({ classNames, properties, styles })=>{
|
|
|
23
23
|
className: classNames?.element,
|
|
24
24
|
style: {
|
|
25
25
|
width: properties.width ?? '100%',
|
|
26
|
+
display: 'flex',
|
|
27
|
+
flexDirection: 'column',
|
|
28
|
+
gap: '0.75rem',
|
|
26
29
|
...styles?.element
|
|
27
30
|
}
|
|
28
31
|
}, lines.map((key)=>/*#__PURE__*/ React.createElement(Skeleton, {
|
|
29
32
|
key: key,
|
|
30
|
-
styles: {
|
|
31
|
-
element: {
|
|
32
|
-
marginBottom: '1rem'
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
33
|
properties: {
|
|
36
|
-
height: '
|
|
37
|
-
width: key === lines.length - 1 && key !== 0 ? '
|
|
34
|
+
height: '0.875rem',
|
|
35
|
+
width: key === lines.length - 1 && key !== 0 ? '60%' : '100%'
|
|
38
36
|
}
|
|
39
37
|
})));
|
|
40
38
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/blocks-loaders",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Lowdefy loader blocks.",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
"dist/*"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@lowdefy/block-utils": "5.
|
|
46
|
-
"@lowdefy/helpers": "5.
|
|
45
|
+
"@lowdefy/block-utils": "5.2.0",
|
|
46
|
+
"@lowdefy/helpers": "5.2.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": ">=18",
|
|
50
50
|
"react-dom": ">=18"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@lowdefy/block-dev-e2e": "5.
|
|
54
|
-
"@lowdefy/e2e-utils": "5.
|
|
53
|
+
"@lowdefy/block-dev-e2e": "5.2.0",
|
|
54
|
+
"@lowdefy/e2e-utils": "5.2.0",
|
|
55
55
|
"@playwright/test": "1.50.1",
|
|
56
56
|
"@swc/cli": "0.8.0",
|
|
57
57
|
"@swc/core": "1.15.18",
|