@umbraco-ui/uui-toast-notification 0.2.1 → 1.0.0-alpha.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.
@@ -6,7 +6,7 @@
6
6
  "path": "./lib/uui-toast-notification.element.ts",
7
7
  "attributes": [
8
8
  {
9
- "name": "look",
9
+ "name": "color",
10
10
  "description": "Changes the look of the notification to one of the predefined, symbolic looks. Example set this to danger for errors.",
11
11
  "type": "\"\"|\"primary\"|\"positive\"|\"warning\"|\"danger\"",
12
12
  "default": "\"\\\"\\\"\""
@@ -31,8 +31,8 @@
31
31
  "default": "[\"UUITextStyles\",null]"
32
32
  },
33
33
  {
34
- "name": "look",
35
- "attribute": "look",
34
+ "name": "color",
35
+ "attribute": "color",
36
36
  "description": "Changes the look of the notification to one of the predefined, symbolic looks. Example set this to danger for errors.",
37
37
  "type": "\"\"|\"primary\"|\"positive\"|\"warning\"|\"danger\"",
38
38
  "default": "\"\\\"\\\"\""
package/lib/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
2
- import { InterfaceLookDefaultValue } from '@umbraco-ui/uui-base/lib/types';
3
2
  import { Timer, demandCustomElement } from '@umbraco-ui/uui-base/lib/utils';
4
3
  import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
5
4
  import { iconRemove } from '@umbraco-ui/uui-icon-registry-essential/lib/svgs';
@@ -28,7 +27,7 @@ var __decorateClass = (decorators, target, key, kind) => {
28
27
  let UUIToastNotificationElement = class extends LitElement {
29
28
  constructor() {
30
29
  super();
31
- this.look = InterfaceLookDefaultValue;
30
+ this.color = "";
32
31
  this._autoClose = null;
33
32
  this._onOpenTimerComplete = () => {
34
33
  if (this._open) {
@@ -170,7 +169,8 @@ let UUIToastNotificationElement = class extends LitElement {
170
169
  <div id="close">
171
170
  <uui-button
172
171
  .label=${"close"}
173
- .look=${this.look}
172
+ ?color=${this.color}
173
+ .look=${this.color ? "primary" : "default"}
174
174
  @click=${() => this.open = false}>
175
175
  <uui-icon
176
176
  name="remove"
@@ -229,7 +229,7 @@ UUIToastNotificationElement.styles = [
229
229
 
230
230
  box-sizing: border-box;
231
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));
232
- background-color: var(--uui-interface-surface,#fefefe);
232
+ background-color: var(--uui-color-surface,#fff);
233
233
  padding: var(--uui-size-layout-1,24px);
234
234
  padding-right: var(--uui-size-layout-1,24px);
235
235
  padding-left: var(--uui-size-layout-3,42px);
@@ -256,29 +256,36 @@ UUIToastNotificationElement.styles = [
256
256
  --uui-button-padding-right-factor: 1.5;
257
257
  }
258
258
 
259
- :host([look='primary']) #toast > div {
260
- background-color: var(--uui-look-primary-surface,#1b264f);
261
- color: var(--uui-look-primary-contrast,#fefefe);
259
+ :host #toast > div {
260
+ background-color: var(--uui-color-surface,#fff);
261
+ color: var(--uui-color-text,#060606);
262
+ border-color: var(--uui-color-surface,#fff);
262
263
  }
263
- :host([look='positive']) #toast > div {
264
- background-color: var(--uui-look-positive-surface,#25aa60);
265
- color: var(--uui-look-positive-contrast,#fefefe);
264
+ :host([color='primary']) #toast > div {
265
+ background-color: var(--uui-color-default,#1b264f);
266
+ color: var(--uui-color-default-contrast,#fff);
267
+ border-color: var(--uui-color-default-standalone,rgb(28, 35, 59));
266
268
  }
267
- :host([look='warning']) #toast > div {
268
- background-color: var(--uui-look-warning-surface,#fad634);
269
- color: var(--uui-look-warning-contrast,#060606);
270
- border-color: var(--uui-look-warning-border,#fad634);
269
+ :host([color='positive']) #toast > div {
270
+ background-color: var(--uui-color-positive,#25aa60);
271
+ color: var(--uui-color-positive-contrast,#fff);
272
+ border-color: var(--uui-color-positive-standalone,rgb(38, 156, 91));
271
273
  }
272
- :host([look='danger']) #toast > div {
273
- background-color: var(--uui-look-danger-surface,#d42054);
274
- color: var(--uui-look-danger-contrast,#fefefe);
275
- border-color: var(--uui-look-danger-border,#d42054);
274
+ :host([color='warning']) #toast > div {
275
+ background-color: var(--uui-color-warning,#fad634);
276
+ color: var(--uui-color-warning-contrast,#000);
277
+ border-color: var(--uui-color-warning-standalone,rgb(224, 193, 51));
278
+ }
279
+ :host([color='danger']) #toast > div {
280
+ background-color: var(--uui-color-danger,#d42054);
281
+ color: var(--uui-color-danger-contrast,white);
282
+ border-color: var(--uui-color-danger-standalone,rgb(191, 33, 78));
276
283
  }
277
284
  `
278
285
  ];
279
286
  __decorateClass([
280
287
  property({ reflect: true })
281
- ], UUIToastNotificationElement.prototype, "look", 2);
288
+ ], UUIToastNotificationElement.prototype, "color", 2);
282
289
  __decorateClass([
283
290
  property({ type: Number })
284
291
  ], UUIToastNotificationElement.prototype, "autoClose", 1);
@@ -1,4 +1,3 @@
1
- import { InterfaceLookType } from '@umbraco-ui/uui-base/lib/types';
2
1
  import { LitElement } from 'lit';
3
2
  /**
4
3
  * @element uui-toast-notification
@@ -17,7 +16,7 @@ export declare class UUIToastNotificationElement extends LitElement {
17
16
  * @attr
18
17
  * @default ""
19
18
  */
20
- look: InterfaceLookType;
19
+ color: string;
21
20
  private _autoClose;
22
21
  /**
23
22
  * Set an auto-close timer.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-toast-notification",
3
- "version": "0.2.1",
3
+ "version": "1.0.0-alpha.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "Umbraco",
@@ -30,11 +30,11 @@
30
30
  "custom-elements.json"
31
31
  ],
32
32
  "dependencies": {
33
- "@umbraco-ui/uui-base": "0.2.1",
34
- "@umbraco-ui/uui-button": "0.3.1",
35
- "@umbraco-ui/uui-css": "0.1.1",
36
- "@umbraco-ui/uui-icon": "0.2.1",
37
- "@umbraco-ui/uui-icon-registry-essential": "0.2.1"
33
+ "@umbraco-ui/uui-base": "1.0.0-alpha.0",
34
+ "@umbraco-ui/uui-button": "1.0.0-alpha.0",
35
+ "@umbraco-ui/uui-css": "1.0.0-alpha.0",
36
+ "@umbraco-ui/uui-icon": "1.0.0-alpha.0",
37
+ "@umbraco-ui/uui-icon-registry-essential": "1.0.0-alpha.0"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",
@@ -45,5 +45,5 @@
45
45
  "access": "public"
46
46
  },
47
47
  "homepage": "https://uui.umbraco.com/?path=/story/uui-toast-notification",
48
- "gitHead": "cb61546f85d6c2f122fa8c130409507e8def4bd5"
48
+ "gitHead": "7d7608bf2fb63a8a077fcd8f0346dea73584b878"
49
49
  }