@dile/ui 2.22.1 → 2.23.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.
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { DileSpinner } from './src/DileSpinner.js';
|
|
1
|
+
export { DileSpinner } from './src/DileSpinner.js';
|
|
2
|
+
export { DileSpinnerBar } from './src/DileSpinnerBar.js';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LitElement, html, css } from 'lit';
|
|
2
|
+
import { DileSpinnerMixin } from './DileSpinnerMixin.js';
|
|
3
|
+
|
|
4
|
+
export class DileSpinnerBar extends DileSpinnerMixin(LitElement) {
|
|
5
|
+
static styles = [
|
|
6
|
+
css`
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
}
|
|
10
|
+
.bar {
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: var(--dile-spinner-bar-height, 4px);
|
|
13
|
+
border-radius: var(--dile-spinner-bar-border-radius, 0);
|
|
14
|
+
background: linear-gradient(
|
|
15
|
+
90deg,
|
|
16
|
+
var(--dile-spinner-bar-color-1, #1e3c72) 0%,
|
|
17
|
+
var(--dile-spinner-bar-color-2, #00d4ff) 50%,
|
|
18
|
+
var(--dile-spinner-bar-color-1, #1e3c72) 100%
|
|
19
|
+
);
|
|
20
|
+
background-size: 200% 100%;
|
|
21
|
+
animation: dile-bar-shimmer var(--dile-spinner-bar-animation-time, 1.8s) ease-in-out infinite;
|
|
22
|
+
}
|
|
23
|
+
@keyframes dile-bar-shimmer {
|
|
24
|
+
0% { background-position: 0% 50%; }
|
|
25
|
+
50% { background-position: 100% 50%; }
|
|
26
|
+
100% { background-position: 0% 50%; }
|
|
27
|
+
}
|
|
28
|
+
`
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
render() {
|
|
32
|
+
return html`
|
|
33
|
+
${this.active
|
|
34
|
+
? html`<div class="bar"></div>`
|
|
35
|
+
: ''
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -24,6 +24,10 @@ export class DileToastPersistent extends DileOverlay(LitElement) {
|
|
|
24
24
|
right: 0px;
|
|
25
25
|
left: auto;
|
|
26
26
|
}
|
|
27
|
+
:host([center]:not([right])) span {
|
|
28
|
+
left: 50%;
|
|
29
|
+
right: auto;
|
|
30
|
+
}
|
|
27
31
|
#overlay {
|
|
28
32
|
box-sizing: border-box;
|
|
29
33
|
color: var(--dile-toast-persistent-color, #fff);
|
|
@@ -34,6 +38,7 @@ export class DileToastPersistent extends DileOverlay(LitElement) {
|
|
|
34
38
|
max-width: var(--dile-toast-persistent-max-width, 300px);
|
|
35
39
|
box-shadow: var(--dile-toast-persistent-box-shadow, 0 0 2px rgba(200, 200, 200, 0.5));
|
|
36
40
|
padding: var(--dile-toast-persistent-padding, 1px);
|
|
41
|
+
overfloy: var(--dile-toast-persistent-overflow, visible);
|
|
37
42
|
display: none;
|
|
38
43
|
position: absolute;
|
|
39
44
|
opacity: 0;
|
|
@@ -53,7 +58,11 @@ export class DileToastPersistent extends DileOverlay(LitElement) {
|
|
|
53
58
|
|
|
54
59
|
static get properties() {
|
|
55
60
|
return {
|
|
56
|
-
right: {
|
|
61
|
+
right: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
reflect: true
|
|
64
|
+
},
|
|
65
|
+
center: {
|
|
57
66
|
type: Boolean,
|
|
58
67
|
reflect: true
|
|
59
68
|
},
|
|
@@ -79,8 +88,17 @@ export class DileToastPersistent extends DileOverlay(LitElement) {
|
|
|
79
88
|
}
|
|
80
89
|
|
|
81
90
|
updated(changedProperties) {
|
|
82
|
-
if(changedProperties.has('right')
|
|
83
|
-
|
|
91
|
+
if(changedProperties.has('right') || changedProperties.has('center')) {
|
|
92
|
+
if (this.right) {
|
|
93
|
+
this.horizontalAlign = 'left';
|
|
94
|
+
this.moveLeft = -10;
|
|
95
|
+
} else if (this.center) {
|
|
96
|
+
this.horizontalAlign = 'center';
|
|
97
|
+
this.moveLeft = 0;
|
|
98
|
+
} else {
|
|
99
|
+
this.horizontalAlign = 'right';
|
|
100
|
+
this.moveLeft = -10;
|
|
101
|
+
}
|
|
84
102
|
}
|
|
85
103
|
}
|
|
86
104
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dile/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.1",
|
|
4
4
|
"description": "UI Core components from dile-components.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "23bbf4bd601d3cd5941b46ca590ca090e18bdddc"
|
|
30
30
|
}
|