@umbraco-ui/uui-toast-notification-layout 0.0.3 → 0.1.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 +2 -4
- package/lib/index.js +11 -11
- package/lib/uui-toast-notification-layout.element.d.ts +2 -3
- package/package.json +4 -7
package/README.md
CHANGED
package/custom-elements.json
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
{
|
|
9
9
|
"name": "headline",
|
|
10
10
|
"description": "Headline for this notification, can also be set via the 'headline' slot.",
|
|
11
|
-
"type": "string
|
|
12
|
-
"default": "\"null\""
|
|
11
|
+
"type": "string"
|
|
13
12
|
}
|
|
14
13
|
],
|
|
15
14
|
"properties": [
|
|
@@ -22,8 +21,7 @@
|
|
|
22
21
|
"name": "headline",
|
|
23
22
|
"attribute": "headline",
|
|
24
23
|
"description": "Headline for this notification, can also be set via the 'headline' slot.",
|
|
25
|
-
"type": "string
|
|
26
|
-
"default": "\"null\""
|
|
24
|
+
"type": "string"
|
|
27
25
|
}
|
|
28
26
|
],
|
|
29
27
|
"slots": [
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
|
|
2
1
|
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
|
|
2
|
+
import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
|
|
3
3
|
import { css, LitElement, html } from 'lit';
|
|
4
4
|
import { property, state } from 'lit/decorators.js';
|
|
5
5
|
|
|
@@ -17,7 +17,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
17
17
|
let UUIToastNotificationLayoutElement = class extends LitElement {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments);
|
|
20
|
-
this.headline =
|
|
20
|
+
this.headline = "";
|
|
21
21
|
this._headlineSlotHasContent = false;
|
|
22
22
|
this._headlineSlotChanged = (e) => {
|
|
23
23
|
this._headlineSlotHasContent = e.target.assignedNodes({ flatten: true }).length > 0;
|
|
@@ -27,7 +27,7 @@ let UUIToastNotificationLayoutElement = class extends LitElement {
|
|
|
27
27
|
return html`
|
|
28
28
|
<div id="message" class="uui-text">
|
|
29
29
|
<h5
|
|
30
|
-
style=${this._headlineSlotHasContent || this.headline !==
|
|
30
|
+
style=${this._headlineSlotHasContent || this.headline && this.headline !== "" ? "" : "display: none"}>
|
|
31
31
|
${this.headline}
|
|
32
32
|
<slot name="headline" @slotchange=${this._headlineSlotChanged}></slot>
|
|
33
33
|
</h5>
|
|
@@ -40,7 +40,13 @@ let UUIToastNotificationLayoutElement = class extends LitElement {
|
|
|
40
40
|
UUIToastNotificationLayoutElement.styles = [
|
|
41
41
|
UUITextStyles,
|
|
42
42
|
css`
|
|
43
|
-
#message
|
|
43
|
+
#message {
|
|
44
|
+
margin-bottom: calc(var(--uui-size-space-1,3px) * -1);
|
|
45
|
+
}
|
|
46
|
+
#message::after {
|
|
47
|
+
content: '';
|
|
48
|
+
display: block;
|
|
49
|
+
clear: both;
|
|
44
50
|
}
|
|
45
51
|
#actions {
|
|
46
52
|
/*
|
|
@@ -51,15 +57,9 @@ UUIToastNotificationLayoutElement.styles = [
|
|
|
51
57
|
display: block;
|
|
52
58
|
float: right;
|
|
53
59
|
|
|
54
|
-
margin-top: var(--uui-size-space-
|
|
60
|
+
margin-top: var(--uui-size-space-4,12px);
|
|
55
61
|
margin-bottom: calc(var(--uui-size-space-2,6px) * -1);
|
|
56
62
|
}
|
|
57
|
-
|
|
58
|
-
#message::after {
|
|
59
|
-
content: '';
|
|
60
|
-
display: block;
|
|
61
|
-
clear: both;
|
|
62
|
-
}
|
|
63
63
|
`
|
|
64
64
|
];
|
|
65
65
|
__decorateClass([
|
|
@@ -10,11 +10,10 @@ export declare class UUIToastNotificationLayoutElement extends LitElement {
|
|
|
10
10
|
static styles: import("lit").CSSResult[];
|
|
11
11
|
/**
|
|
12
12
|
* Headline for this notification, can also be set via the 'headline' slot.
|
|
13
|
-
* @type string
|
|
14
13
|
* @attr
|
|
15
|
-
* @default
|
|
14
|
+
* @default
|
|
16
15
|
*/
|
|
17
|
-
headline: string
|
|
16
|
+
headline: string;
|
|
18
17
|
private _headlineSlotHasContent;
|
|
19
18
|
private _headlineSlotChanged;
|
|
20
19
|
render(): import("lit-html").TemplateResult<1>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-toast-notification-layout",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Umbraco",
|
|
@@ -30,11 +30,8 @@
|
|
|
30
30
|
"custom-elements.json"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@umbraco-ui/uui-base": "0.0
|
|
34
|
-
"@umbraco-ui/uui-
|
|
35
|
-
"@umbraco-ui/uui-css": "0.0.4",
|
|
36
|
-
"@umbraco-ui/uui-icon": "0.0.5",
|
|
37
|
-
"@umbraco-ui/uui-icon-registry-essential": "0.0.3"
|
|
33
|
+
"@umbraco-ui/uui-base": "0.1.0",
|
|
34
|
+
"@umbraco-ui/uui-css": "0.1.0"
|
|
38
35
|
},
|
|
39
36
|
"scripts": {
|
|
40
37
|
"build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",
|
|
@@ -45,5 +42,5 @@
|
|
|
45
42
|
"access": "public"
|
|
46
43
|
},
|
|
47
44
|
"homepage": "https://uui.umbraco.com/?path=/story/uui-toast-notification-layout",
|
|
48
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "9ed7860ce865d310b85bd1718f37b59db873aefd"
|
|
49
46
|
}
|