@momentum-design/components 0.141.1 → 0.141.2
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/browser/index.js +15 -7
- package/dist/browser/index.js.map +2 -2
- package/dist/components/skeleton/skeleton.component.d.ts +2 -0
- package/dist/components/skeleton/skeleton.component.js +2 -0
- package/dist/components/skeleton/skeleton.styles.js +15 -7
- package/dist/custom-elements.json +5 -1
- package/dist/react/skeleton/index.d.ts +2 -0
- package/dist/react/skeleton/index.js +2 -0
- package/package.json +1 -1
|
@@ -22,6 +22,8 @@ import type { SkeletonVariant } from './skeleton.types';
|
|
|
22
22
|
*
|
|
23
23
|
* @slot - Content to wrap (optional). When provided, skeleton takes dimensions of this content.
|
|
24
24
|
*
|
|
25
|
+
* @cssproperty --mdc-skeleton-animation-delay - Delay of the two-second shimmer cycle (default: 0s).
|
|
26
|
+
* Use a negative CSS time to start partway through the cycle and align instances with application-managed timing.
|
|
25
27
|
* @cssproperty --mdc-skeleton-background-color - background color of the skeleton
|
|
26
28
|
* @cssproperty --mdc-skeleton-height - height of the skeleton
|
|
27
29
|
* @cssproperty --mdc-skeleton-width - width of the skeleton
|
|
@@ -17,6 +17,8 @@ import styles from './skeleton.styles';
|
|
|
17
17
|
*
|
|
18
18
|
* @slot - Content to wrap (optional). When provided, skeleton takes dimensions of this content.
|
|
19
19
|
*
|
|
20
|
+
* @cssproperty --mdc-skeleton-animation-delay - Delay of the two-second shimmer cycle (default: 0s).
|
|
21
|
+
* Use a negative CSS time to start partway through the cycle and align instances with application-managed timing.
|
|
20
22
|
* @cssproperty --mdc-skeleton-background-color - background color of the skeleton
|
|
21
23
|
* @cssproperty --mdc-skeleton-height - height of the skeleton
|
|
22
24
|
* @cssproperty --mdc-skeleton-width - width of the skeleton
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
2
|
const styles = css `
|
|
3
3
|
:host {
|
|
4
|
+
--mdc-skeleton-animation-delay: 0s;
|
|
4
5
|
--mdc-skeleton-background-color: var(--mds-color-theme-background-skeleton-normal);
|
|
5
6
|
--mdc-skeleton-height: 100%;
|
|
6
7
|
--mdc-skeleton-width: 100%;
|
|
8
|
+
position: relative;
|
|
7
9
|
display: block;
|
|
8
10
|
overflow: hidden;
|
|
9
11
|
background-color: var(--mdc-skeleton-background-color);
|
|
@@ -11,32 +13,38 @@ const styles = css `
|
|
|
11
13
|
width: var(--mdc-skeleton-width);
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
:host([motion]) {
|
|
16
|
+
:host([motion])::before {
|
|
17
|
+
content: '';
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 0;
|
|
20
|
+
left: 0;
|
|
21
|
+
width: 200%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
pointer-events: none;
|
|
15
24
|
background-image: linear-gradient(
|
|
16
25
|
90deg,
|
|
17
26
|
var(--mds-color-theme-background-skeleton-shimmer-0) 0%,
|
|
18
27
|
var(--mds-color-theme-background-skeleton-shimmer-1) 50%,
|
|
19
28
|
var(--mds-color-theme-background-skeleton-shimmer-2) 100%
|
|
20
29
|
);
|
|
21
|
-
background-repeat: no-repeat;
|
|
22
|
-
background-size: 200% 100%;
|
|
23
30
|
animation: skeleton-shimmer 2s linear infinite;
|
|
31
|
+
animation-delay: var(--mdc-skeleton-animation-delay);
|
|
24
32
|
}
|
|
25
33
|
|
|
26
34
|
@media (prefers-reduced-motion: reduce) {
|
|
27
|
-
:host([motion]) {
|
|
35
|
+
:host([motion])::before {
|
|
28
36
|
animation: none;
|
|
29
|
-
|
|
37
|
+
transform: translateX(-25%);
|
|
30
38
|
}
|
|
31
39
|
}
|
|
32
40
|
|
|
33
41
|
@keyframes skeleton-shimmer {
|
|
34
42
|
0% {
|
|
35
|
-
|
|
43
|
+
transform: translateX(-100%);
|
|
36
44
|
}
|
|
37
45
|
|
|
38
46
|
100% {
|
|
39
|
-
|
|
47
|
+
transform: translateX(100%);
|
|
40
48
|
}
|
|
41
49
|
}
|
|
42
50
|
|
|
@@ -47338,6 +47338,10 @@
|
|
|
47338
47338
|
"description": "",
|
|
47339
47339
|
"name": "Skeleton",
|
|
47340
47340
|
"cssProperties": [
|
|
47341
|
+
{
|
|
47342
|
+
"description": "Delay of the two-second shimmer cycle (default: 0s). Use a negative CSS time to start partway through the cycle and align instances with application-managed timing.",
|
|
47343
|
+
"name": "--mdc-skeleton-animation-delay"
|
|
47344
|
+
},
|
|
47341
47345
|
{
|
|
47342
47346
|
"description": "background color of the skeleton",
|
|
47343
47347
|
"name": "--mdc-skeleton-background-color"
|
|
@@ -47416,7 +47420,7 @@
|
|
|
47416
47420
|
"module": "/src/models"
|
|
47417
47421
|
},
|
|
47418
47422
|
"tagName": "mdc-skeleton",
|
|
47419
|
-
"jsDoc": "/**\n * @tagname mdc-skeleton\n *\n * @slot - Content to wrap (optional). When provided, skeleton takes dimensions of this content.\n *\n * @cssproperty --mdc-skeleton-background-color - background color of the skeleton\n * @cssproperty --mdc-skeleton-height - height of the skeleton\n * @cssproperty --mdc-skeleton-width - width of the skeleton\n */",
|
|
47423
|
+
"jsDoc": "/**\n * @tagname mdc-skeleton\n *\n * @slot - Content to wrap (optional). When provided, skeleton takes dimensions of this content.\n *\n * @cssproperty --mdc-skeleton-animation-delay - Delay of the two-second shimmer cycle (default: 0s).\n * Use a negative CSS time to start partway through the cycle and align instances with application-managed timing.\n * @cssproperty --mdc-skeleton-background-color - background color of the skeleton\n * @cssproperty --mdc-skeleton-height - height of the skeleton\n * @cssproperty --mdc-skeleton-width - width of the skeleton\n */",
|
|
47420
47424
|
"customElement": true
|
|
47421
47425
|
}
|
|
47422
47426
|
],
|
|
@@ -19,6 +19,8 @@ import Component from '../../components/skeleton';
|
|
|
19
19
|
*
|
|
20
20
|
* @slot - Content to wrap (optional). When provided, skeleton takes dimensions of this content.
|
|
21
21
|
*
|
|
22
|
+
* @cssproperty --mdc-skeleton-animation-delay - Delay of the two-second shimmer cycle (default: 0s).
|
|
23
|
+
* Use a negative CSS time to start partway through the cycle and align instances with application-managed timing.
|
|
22
24
|
* @cssproperty --mdc-skeleton-background-color - background color of the skeleton
|
|
23
25
|
* @cssproperty --mdc-skeleton-height - height of the skeleton
|
|
24
26
|
* @cssproperty --mdc-skeleton-width - width of the skeleton
|
|
@@ -7,6 +7,8 @@ import { TAG_NAME } from '../../components/skeleton/skeleton.constants';
|
|
|
7
7
|
*
|
|
8
8
|
* @slot - Content to wrap (optional). When provided, skeleton takes dimensions of this content.
|
|
9
9
|
*
|
|
10
|
+
* @cssproperty --mdc-skeleton-animation-delay - Delay of the two-second shimmer cycle (default: 0s).
|
|
11
|
+
* Use a negative CSS time to start partway through the cycle and align instances with application-managed timing.
|
|
10
12
|
* @cssproperty --mdc-skeleton-background-color - background color of the skeleton
|
|
11
13
|
* @cssproperty --mdc-skeleton-height - height of the skeleton
|
|
12
14
|
* @cssproperty --mdc-skeleton-width - width of the skeleton
|