@umbraco-ui/uui-toast-notification 0.0.2 → 0.1.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.
package/README.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  Umbraco style toast-notification component.
6
6
 
7
+ ### See it in action
8
+
9
+ Preview the component on [Storybook](https://uui.umbraco.com/?path=/story/uui-toast-notification)
10
+
7
11
  ## Installation
8
12
 
9
13
  ### ES imports
@@ -73,7 +73,7 @@
73
73
  "slots": [
74
74
  {
75
75
  "name": "",
76
- "description": "for dialog layout/content"
76
+ "description": "slot for dialog layout/content"
77
77
  }
78
78
  ]
79
79
  }
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 { demandCustomElement, Timer } from '@umbraco-ui/uui-base/lib/utils';
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, 0, 0, 0.21);
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: -7px;
248
+ margin-top: -6px;
246
249
  margin-left: var(--uui-size-space-1,3px);
247
- margin-bottom: calc(var(--uui-size-space-2,6px) * -1);
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.2",
3
+ "version": "0.1.1",
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.16",
34
- "@umbraco-ui/uui-css": "0.0.3"
33
+ "@umbraco-ui/uui-base": "0.1.1",
34
+ "@umbraco-ui/uui-button": "0.2.1",
35
+ "@umbraco-ui/uui-css": "0.1.1",
36
+ "@umbraco-ui/uui-icon": "0.1.1",
37
+ "@umbraco-ui/uui-icon-registry-essential": "0.1.1"
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": "6fbddfc1295e2ea00a532d4f9eb798165b2d39ac"
48
+ "gitHead": "d91d346a0659f52de2a3c4746065c554f95e6328"
46
49
  }