@salesforcedevs/dx-components 1.3.125 → 1.3.129
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dx-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.129",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"eventsourcemock": "^2.0.0",
|
|
41
41
|
"luxon": "^3.1.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "42056b3c6d9dc4e27d4cb8c24433e0b377579dde"
|
|
44
44
|
}
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
:host {
|
|
4
4
|
--padding: var(--dx-g-spacing-md);
|
|
5
|
-
|
|
6
|
-
display: inline-block;
|
|
7
5
|
}
|
|
8
6
|
|
|
9
7
|
@keyframes slideup {
|
|
@@ -19,6 +17,10 @@
|
|
|
19
17
|
}
|
|
20
18
|
|
|
21
19
|
.container {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.container.open {
|
|
22
24
|
position: fixed;
|
|
23
25
|
bottom: 0;
|
|
24
26
|
left: var(--padding);
|
|
@@ -43,15 +45,15 @@
|
|
|
43
45
|
width: 100%;
|
|
44
46
|
}
|
|
45
47
|
|
|
46
|
-
.
|
|
48
|
+
.status-warning .toast {
|
|
47
49
|
background-color: var(--dx-g-red-natural-95);
|
|
48
50
|
}
|
|
49
51
|
|
|
50
|
-
.
|
|
52
|
+
.status-success .toast {
|
|
51
53
|
background-color: var(--dx-g-green-natural-95);
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
.
|
|
56
|
+
.status-error .toast {
|
|
55
57
|
background-color: var(--dx-g-red-natural-95);
|
|
56
58
|
}
|
|
57
59
|
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<div class="
|
|
4
|
-
<div class=
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
></dx-button>
|
|
18
|
-
</div>
|
|
2
|
+
<div class={className}>
|
|
3
|
+
<div class="toast" role="status">
|
|
4
|
+
<div class="type-icon">
|
|
5
|
+
<dx-icon size="large" symbol={iconSymbol}></dx-icon>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="content dx-text-body-3">
|
|
8
|
+
<slot></slot>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="close">
|
|
11
|
+
<dx-button
|
|
12
|
+
onclick={close}
|
|
13
|
+
icon-symbol="close"
|
|
14
|
+
variant="inline"
|
|
15
|
+
aria-label="Dismiss Toast"
|
|
16
|
+
></dx-button>
|
|
19
17
|
</div>
|
|
20
18
|
</div>
|
|
21
|
-
</
|
|
19
|
+
</div>
|
|
22
20
|
</template>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { api, LightningElement } from "lwc";
|
|
2
|
+
import cx from "classnames";
|
|
2
3
|
|
|
3
4
|
type ToastVariant = "info" | "error" | "success";
|
|
4
5
|
|
|
@@ -18,6 +19,7 @@ export default class extends LightningElement {
|
|
|
18
19
|
connectedCallback() {
|
|
19
20
|
this.isOpen =
|
|
20
21
|
window.localStorage.getItem(this.localStorageKey) !== "false";
|
|
22
|
+
console.log(this.isOpen, "TOAST");
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
private get iconSymbol() {
|
|
@@ -25,7 +27,11 @@ export default class extends LightningElement {
|
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
private get className() {
|
|
28
|
-
return
|
|
30
|
+
return cx(
|
|
31
|
+
"container",
|
|
32
|
+
`status-${this.variant}`,
|
|
33
|
+
this.isOpen ? "open" : "closed"
|
|
34
|
+
);
|
|
29
35
|
}
|
|
30
36
|
|
|
31
37
|
close() {
|