@exmg/exm-snackbar 1.0.0 → 1.0.2

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
@@ -16,7 +16,7 @@ npm install @exmg/exm-snackbar
16
16
 
17
17
  ```html
18
18
  <exm-button unelevated @click=${() =>
19
- this.shadowRoot?.querySelector<ExmgSnackbar>('#default-snackbar')?.show()}>
19
+ this.shadowRoot?.querySelector<ExmSnackbar>('#default-snackbar')?.show()}>
20
20
  Open default
21
21
  </exm-button>
22
22
  <exm-snackbar id="default-snackbar" labelText="Default auto close"></exm-snackbar>
@@ -70,6 +70,6 @@ npm install @exmg/exm-snackbar
70
70
 
71
71
  ## Additional references
72
72
 
73
- - [Additional Documentation](https://exmg.github.io/exmachina-web-components/ExmgSnackbar.html)
73
+ - [Additional Documentation](https://exmg.github.io/exmachina-web-components/ExmSnackbar.html)
74
74
 
75
75
  - [Demo](https://exmg.github.io/exmachina-web-components/demo/?el=exm-snackbar)
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { ExmgSnackbar } from './src/exm-snackbar.js';
1
+ export { ExmSnackbar } from './src/exm-snackbar.js';
2
2
  export { SnackBarPayload } from './src/types.js';
3
- export { style as snackbarStyles } from './src/styles/exm-snackbar-styles-css.js';
3
+ export { style as snackbarStyles } from './src/styles/exm-snackbar-css.js';
package/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { ExmgSnackbar } from './src/exm-snackbar.js';
2
- export { style as snackbarStyles } from './src/styles/exm-snackbar-styles-css.js';
1
+ export { ExmSnackbar } from './src/exm-snackbar.js';
2
+ export { style as snackbarStyles } from './src/styles/exm-snackbar-css.js';
3
3
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exmg/exm-snackbar",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -39,5 +39,5 @@
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  },
42
- "gitHead": "0907b55c89325d59902b98a64c352bf6e1fc81ff"
42
+ "gitHead": "e7086831faea0bdfe8628b0de9b7ddcc45174558"
43
43
  }
@@ -1,5 +1,6 @@
1
+ import { CSSResult } from 'lit';
1
2
  import { SnackbarBase } from '@material/mwc-snackbar/mwc-snackbar-base.js';
2
- export declare class ExmgSnackbar extends SnackbarBase {
3
+ export declare class ExmSnackbar extends SnackbarBase {
3
4
  /**
4
5
  * Sets the Snackbar variant, options from MWC
5
6
  * @type {String}
@@ -7,11 +8,11 @@ export declare class ExmgSnackbar extends SnackbarBase {
7
8
  variant: 'positive' | 'negative' | 'info' | null;
8
9
  xOffset: number;
9
10
  yOffset: number;
10
- static styles: import("lit").CSSResult[];
11
+ static styles: CSSResult[];
11
12
  protected render(): import("lit-html").TemplateResult<1>;
12
13
  }
13
14
  declare global {
14
15
  interface HTMLElementTagNameMap {
15
- 'exm-snackbar': ExmgSnackbar;
16
+ 'exm-snackbar': ExmSnackbar;
16
17
  }
17
18
  }
@@ -4,9 +4,9 @@ import { customElement, property } from 'lit/decorators.js';
4
4
  import { classMap } from 'lit/directives/class-map.js';
5
5
  import { SnackbarBase } from '@material/mwc-snackbar/mwc-snackbar-base.js';
6
6
  import { accessibleSnackbarLabel } from '@material/mwc-snackbar/accessible-snackbar-label-directive.js';
7
- import { style as newStyles } from './styles/exm-snackbar-styles-css.js';
7
+ import { style as newStyles } from './styles/exm-snackbar-css.js';
8
8
  import { styles } from '@material/mwc-snackbar/mwc-snackbar.css.js';
9
- let ExmgSnackbar = class ExmgSnackbar extends SnackbarBase {
9
+ let ExmSnackbar = class ExmSnackbar extends SnackbarBase {
10
10
  constructor() {
11
11
  super(...arguments);
12
12
  /**
@@ -41,18 +41,19 @@ let ExmgSnackbar = class ExmgSnackbar extends SnackbarBase {
41
41
  </div>`;
42
42
  }
43
43
  };
44
- ExmgSnackbar.styles = [styles, newStyles];
44
+ ExmSnackbar.styles = [styles, newStyles];
45
45
  __decorate([
46
46
  property({ type: String })
47
- ], ExmgSnackbar.prototype, "variant", void 0);
47
+ ], ExmSnackbar.prototype, "variant", void 0);
48
48
  __decorate([
49
49
  property({ type: Number })
50
- ], ExmgSnackbar.prototype, "xOffset", void 0);
50
+ ], ExmSnackbar.prototype, "xOffset", void 0);
51
51
  __decorate([
52
52
  property({ type: Number })
53
- ], ExmgSnackbar.prototype, "yOffset", void 0);
54
- ExmgSnackbar = __decorate([
53
+ ], ExmSnackbar.prototype, "yOffset", void 0);
54
+ ExmSnackbar = __decorate([
55
55
  customElement('exm-snackbar')
56
- ], ExmgSnackbar);
57
- export { ExmgSnackbar };
56
+ // @ts-ignore this due to a version conflict between the currently used lit and the version used bu mcw
57
+ ], ExmSnackbar);
58
+ export { ExmSnackbar };
58
59
  //# sourceMappingURL=exm-snackbar.js.map
@@ -0,0 +1 @@
1
+ export declare const style: import("lit").CSSResult;
@@ -0,0 +1,31 @@
1
+ import { css } from 'lit';
2
+ export const style = css `
3
+ :host {
4
+ --exm-snackbar-positive-background-color: #12805c;
5
+ --exm-snackbar-negative-background-color: #c9252d;
6
+ --exm-snackbar-info-background-color: #0d66d0;
7
+ --exm-snackbar-text-color: #fff;
8
+ }
9
+
10
+ .mdc-snackbar--positive .mdc-snackbar__surface {
11
+ background-color: var(--exm-snackbar-positive-background-color) !important;
12
+ }
13
+
14
+ .mdc-snackbar--negative .mdc-snackbar__surface {
15
+ background-color: var(--exm-snackbar-negative-background-color) !important;
16
+ }
17
+
18
+ .mdc-snackbar--info .mdc-snackbar__surface {
19
+ background-color: var(--exm-snackbar-info-background-color) !important;
20
+ }
21
+
22
+ .mdc-snackbar__surface {
23
+ color: var(--exm-snackbar-text-color);
24
+ }
25
+
26
+ slot[name='icon']::slotted(*) {
27
+ margin-left: 12px;
28
+ min-width: 24px;
29
+ }
30
+ `;
31
+ //# sourceMappingURL=exm-snackbar-css.js.map
@@ -1,2 +1 @@
1
1
  export declare const style: import("lit").CSSResult;
2
- export default style;
@@ -1,4 +1,31 @@
1
1
  import { css } from 'lit';
2
- export const style = css `:host{--exm-snackbar-positive-background-color: #12805c;--exm-snackbar-negative-background-color: #c9252d;--exm-snackbar-info-background-color: #0d66d0;--exm-snackbar-text-color: #fff}.mdc-snackbar--positive .mdc-snackbar__surface{background-color:var(--exm-snackbar-positive-background-color) !important}.mdc-snackbar--negative .mdc-snackbar__surface{background-color:var(--exm-snackbar-negative-background-color) !important}.mdc-snackbar--info .mdc-snackbar__surface{background-color:var(--exm-snackbar-info-background-color) !important}.mdc-snackbar__surface{color:var(--exm-snackbar-text-color)}slot[name=icon]::slotted(*){margin-left:12px;min-width:24px}`;
3
- export default style;
2
+ export const style = css `
3
+ :host {
4
+ --exm-snackbar-positive-background-color: #12805c;
5
+ --exm-snackbar-negative-background-color: #c9252d;
6
+ --exm-snackbar-info-background-color: #0d66d0;
7
+ --exm-snackbar-text-color: #fff;
8
+ }
9
+
10
+ .mdc-snackbar--positive .mdc-snackbar__surface {
11
+ background-color: var(--exm-snackbar-positive-background-color) !important;
12
+ }
13
+
14
+ .mdc-snackbar--negative .mdc-snackbar__surface {
15
+ background-color: var(--exm-snackbar-negative-background-color) !important;
16
+ }
17
+
18
+ .mdc-snackbar--info .mdc-snackbar__surface {
19
+ background-color: var(--exm-snackbar-info-background-color) !important;
20
+ }
21
+
22
+ .mdc-snackbar__surface {
23
+ color: var(--exm-snackbar-text-color);
24
+ }
25
+
26
+ slot[name='icon']::slotted(*) {
27
+ margin-left: 12px;
28
+ min-width: 24px;
29
+ }
30
+ `;
4
31
  //# sourceMappingURL=exm-snackbar-styles-css.js.map
@@ -1,31 +0,0 @@
1
- :host {
2
- --exm-snackbar-positive-background-color: #12805c;
3
- --exm-snackbar-negative-background-color: #c9252d;
4
- --exm-snackbar-info-background-color: #0d66d0;
5
- --exm-snackbar-text-color: #fff;
6
- }
7
-
8
- .mdc-snackbar--positive {
9
- .mdc-snackbar__surface {
10
- background-color: var(--exm-snackbar-positive-background-color) !important;
11
- }
12
- }
13
- .mdc-snackbar--negative {
14
- .mdc-snackbar__surface {
15
- background-color: var(--exm-snackbar-negative-background-color) !important;
16
- }
17
- }
18
- .mdc-snackbar--info {
19
- .mdc-snackbar__surface {
20
- background-color: var(--exm-snackbar-info-background-color) !important;
21
- }
22
- }
23
-
24
- .mdc-snackbar__surface {
25
- color: var(--exm-snackbar-text-color);
26
- }
27
-
28
- slot[name='icon']::slotted(*) {
29
- margin-left: 12px;
30
- min-width: 24px;
31
- }