@umbraco-ui/uui-toast-notification 0.0.3 → 0.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/README.md +4 -0
- package/custom-elements.json +1 -1
- package/lib/index.js +9 -7
- package/lib/uui-toast-notification.element.d.ts +2 -1
- package/package.json +7 -4
package/README.md
CHANGED
package/custom-elements.json
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
|
|
2
2
|
import { InterfaceLookDefaultValue } from '@umbraco-ui/uui-base/lib/types';
|
|
3
|
-
import {
|
|
3
|
+
import { Timer, demandCustomElement } from '@umbraco-ui/uui-base/lib/utils';
|
|
4
4
|
import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
|
|
5
5
|
import { iconRemove } from '@umbraco-ui/uui-icon-registry-essential/lib/svgs';
|
|
6
6
|
import { css, LitElement, html } from 'lit';
|
|
@@ -46,8 +46,6 @@ let UUIToastNotificationElement = class extends LitElement {
|
|
|
46
46
|
this.open = false;
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
|
-
demandCustomElement(this, "uui-button");
|
|
50
|
-
demandCustomElement(this, "uui-icon");
|
|
51
49
|
}
|
|
52
50
|
get autoClose() {
|
|
53
51
|
return this._autoClose;
|
|
@@ -91,6 +89,11 @@ let UUIToastNotificationElement = class extends LitElement {
|
|
|
91
89
|
this._makeClose();
|
|
92
90
|
}
|
|
93
91
|
}
|
|
92
|
+
connectedCallback() {
|
|
93
|
+
super.connectedCallback();
|
|
94
|
+
demandCustomElement(this, "uui-button");
|
|
95
|
+
demandCustomElement(this, "uui-icon");
|
|
96
|
+
}
|
|
94
97
|
_getAnimationDuration() {
|
|
95
98
|
return parseInt(getComputedStyle(this).getPropertyValue("--uui-toast-notification-animation-duration"), 10) || 480;
|
|
96
99
|
}
|
|
@@ -225,7 +228,7 @@ UUIToastNotificationElement.styles = [
|
|
|
225
228
|
display: block;
|
|
226
229
|
|
|
227
230
|
box-sizing: border-box;
|
|
228
|
-
box-shadow: 0 1px 3px rgba(0,
|
|
231
|
+
box-shadow: var(--uui-shadow-depth-1,0 1px 3px rgba(0,0,0,0.12) , 0 1px 2px rgba(0,0,0,0.24));
|
|
229
232
|
background-color: var(--uui-interface-surface,#fefefe);
|
|
230
233
|
padding: var(--uui-size-layout-1,24px);
|
|
231
234
|
padding-right: var(--uui-size-layout-1,24px);
|
|
@@ -242,10 +245,9 @@ UUIToastNotificationElement.styles = [
|
|
|
242
245
|
|
|
243
246
|
#close {
|
|
244
247
|
float: right;
|
|
245
|
-
margin-top: -
|
|
248
|
+
margin-top: -6px;
|
|
246
249
|
margin-left: var(--uui-size-space-1,3px);
|
|
247
|
-
margin-bottom:
|
|
248
|
-
margin-bottom: var(--uui-size-space-1,3px);
|
|
250
|
+
margin-bottom: -4px;
|
|
249
251
|
}
|
|
250
252
|
|
|
251
253
|
#close > uui-button {
|
|
@@ -7,7 +7,7 @@ import { LitElement } from 'lit';
|
|
|
7
7
|
* @fires {UUIToastNotificationEvent} closing - fires when the toast is starting to close
|
|
8
8
|
* @fires {UUIToastNotificationEvent} closed - fires when the toast is closed
|
|
9
9
|
* @description - Component for displaying a toast notification, preferably used in toast-notification-container.
|
|
10
|
-
* @slot - for dialog layout/content
|
|
10
|
+
* @slot - slot for dialog layout/content
|
|
11
11
|
*/
|
|
12
12
|
export declare class UUIToastNotificationElement extends LitElement {
|
|
13
13
|
static styles: import("lit").CSSResult[];
|
|
@@ -52,6 +52,7 @@ export declare class UUIToastNotificationElement extends LitElement {
|
|
|
52
52
|
get open(): boolean;
|
|
53
53
|
set open(value: boolean);
|
|
54
54
|
constructor();
|
|
55
|
+
connectedCallback(): void;
|
|
55
56
|
private _getAnimationDuration;
|
|
56
57
|
private _requestAnimationUpdate;
|
|
57
58
|
private _makeOpen;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-toast-notification",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Umbraco",
|
|
@@ -30,8 +30,11 @@
|
|
|
30
30
|
"custom-elements.json"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@umbraco-ui/uui-base": "0.0
|
|
34
|
-
"@umbraco-ui/uui-
|
|
33
|
+
"@umbraco-ui/uui-base": "0.2.0",
|
|
34
|
+
"@umbraco-ui/uui-button": "0.3.0",
|
|
35
|
+
"@umbraco-ui/uui-css": "0.1.1",
|
|
36
|
+
"@umbraco-ui/uui-icon": "0.2.0",
|
|
37
|
+
"@umbraco-ui/uui-icon-registry-essential": "0.2.0"
|
|
35
38
|
},
|
|
36
39
|
"scripts": {
|
|
37
40
|
"build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",
|
|
@@ -42,5 +45,5 @@
|
|
|
42
45
|
"access": "public"
|
|
43
46
|
},
|
|
44
47
|
"homepage": "https://uui.umbraco.com/?path=/story/uui-toast-notification",
|
|
45
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "5494b55e03c9fb3ba8f160e693d3ce59c02d21cd"
|
|
46
49
|
}
|