@exmg/exm-snackbar 1.1.36 → 1.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/.rollup.cache/root/repo/packages/exm-snackbar/dist/exm-snackbar.d.ts +18 -0
- package/.rollup.cache/root/repo/packages/exm-snackbar/dist/exm-snackbar.js +59 -0
- package/.rollup.cache/root/repo/packages/exm-snackbar/dist/index.d.ts +3 -0
- package/.rollup.cache/root/repo/packages/exm-snackbar/dist/index.js +3 -0
- package/.rollup.cache/root/repo/packages/exm-snackbar/dist/styles/exm-snackbar-css.d.ts +1 -0
- package/.rollup.cache/root/repo/packages/exm-snackbar/dist/styles/exm-snackbar-css.js +31 -0
- package/.rollup.cache/root/repo/packages/exm-snackbar/dist/types.d.ts +4 -0
- package/dist/exm-snackbar.js +7 -5
- package/dist/index.js +1 -1
- package/dist/styles/exm-snackbar-css.js +5 -2
- package/package.json +2 -2
- /package/{dist → .rollup.cache/root/repo/packages/exm-snackbar/dist}/types.js +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CSSResult } from 'lit';
|
|
2
|
+
import { SnackbarBase } from '@material/mwc-snackbar/mwc-snackbar-base.js';
|
|
3
|
+
export declare class ExmSnackbar extends SnackbarBase {
|
|
4
|
+
/**
|
|
5
|
+
* Sets the Snackbar variant, options from MWC
|
|
6
|
+
* @type {String}
|
|
7
|
+
*/
|
|
8
|
+
variant: 'positive' | 'negative' | 'info' | null;
|
|
9
|
+
xOffset: number;
|
|
10
|
+
yOffset: number;
|
|
11
|
+
static styles: CSSResult[];
|
|
12
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
13
|
+
}
|
|
14
|
+
declare global {
|
|
15
|
+
interface HTMLElementTagNameMap {
|
|
16
|
+
'exm-snackbar': ExmSnackbar;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html } from 'lit';
|
|
3
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
5
|
+
import { SnackbarBase } from '@material/mwc-snackbar/mwc-snackbar-base.js';
|
|
6
|
+
import { accessibleSnackbarLabel } from '@material/mwc-snackbar/accessible-snackbar-label-directive.js';
|
|
7
|
+
import { style as newStyles } from './styles/exm-snackbar-css.js';
|
|
8
|
+
import { styles } from '@material/mwc-snackbar/mwc-snackbar.css.js';
|
|
9
|
+
let ExmSnackbar = class ExmSnackbar extends SnackbarBase {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
/**
|
|
13
|
+
* Sets the Snackbar variant, options from MWC
|
|
14
|
+
* @type {String}
|
|
15
|
+
*/
|
|
16
|
+
this.variant = null;
|
|
17
|
+
this.xOffset = 0;
|
|
18
|
+
this.yOffset = 0;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
const classes = {
|
|
22
|
+
'mdc-snackbar--stacked': this.stacked,
|
|
23
|
+
'mdc-snackbar--leading': this.leading,
|
|
24
|
+
'mdc-snackbar--positive': this.variant === 'positive',
|
|
25
|
+
'mdc-snackbar--negative': this.variant === 'negative',
|
|
26
|
+
'mdc-snackbar--info': this.variant === 'info',
|
|
27
|
+
};
|
|
28
|
+
return html ` <div
|
|
29
|
+
class="mdc-snackbar ${classMap(classes)}"
|
|
30
|
+
style="left:${this.xOffset}px; bottom:${this.yOffset}px;"
|
|
31
|
+
@keydown="${this._handleKeydown}"
|
|
32
|
+
>
|
|
33
|
+
<div class="mdc-snackbar__surface">
|
|
34
|
+
<slot name="icon"></slot>
|
|
35
|
+
${accessibleSnackbarLabel(this.labelText, this.open)}
|
|
36
|
+
<div class="mdc-snackbar__actions">
|
|
37
|
+
<slot name="action" @click="${this._handleActionClick}"></slot>
|
|
38
|
+
<slot name="dismiss" @click="${this._handleDismissClick}"></slot>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>`;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
ExmSnackbar.styles = [styles, newStyles];
|
|
45
|
+
__decorate([
|
|
46
|
+
property({ type: String })
|
|
47
|
+
], ExmSnackbar.prototype, "variant", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
property({ type: Number })
|
|
50
|
+
], ExmSnackbar.prototype, "xOffset", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
property({ type: Number })
|
|
53
|
+
], ExmSnackbar.prototype, "yOffset", void 0);
|
|
54
|
+
ExmSnackbar = __decorate([
|
|
55
|
+
customElement('exm-snackbar')
|
|
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 };
|
|
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
|
package/dist/exm-snackbar.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { __decorate } from
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
2
|
import { html } from 'lit';
|
|
3
|
-
import {
|
|
3
|
+
import { property, customElement } 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
|
|
7
|
+
import { style } from './styles/exm-snackbar-css.js';
|
|
8
8
|
import { styles } from '@material/mwc-snackbar/mwc-snackbar.css.js';
|
|
9
|
+
|
|
9
10
|
let ExmSnackbar = class ExmSnackbar extends SnackbarBase {
|
|
10
11
|
constructor() {
|
|
11
12
|
super(...arguments);
|
|
@@ -41,7 +42,7 @@ let ExmSnackbar = class ExmSnackbar extends SnackbarBase {
|
|
|
41
42
|
</div>`;
|
|
42
43
|
}
|
|
43
44
|
};
|
|
44
|
-
ExmSnackbar.styles = [styles,
|
|
45
|
+
ExmSnackbar.styles = [styles, style];
|
|
45
46
|
__decorate([
|
|
46
47
|
property({ type: String })
|
|
47
48
|
], ExmSnackbar.prototype, "variant", void 0);
|
|
@@ -55,5 +56,6 @@ ExmSnackbar = __decorate([
|
|
|
55
56
|
customElement('exm-snackbar')
|
|
56
57
|
// @ts-ignore this due to a version conflict between the currently used lit and the version used bu mcw
|
|
57
58
|
], ExmSnackbar);
|
|
59
|
+
|
|
58
60
|
export { ExmSnackbar };
|
|
59
|
-
//# sourceMappingURL=exm-snackbar.js.map
|
|
61
|
+
//# sourceMappingURL=exm-snackbar.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
const style = css `
|
|
3
4
|
:host {
|
|
4
5
|
--exm-snackbar-positive-background-color: #12805c;
|
|
5
6
|
--exm-snackbar-negative-background-color: #c9252d;
|
|
@@ -28,4 +29,6 @@ export const style = css `
|
|
|
28
29
|
min-width: 24px;
|
|
29
30
|
}
|
|
30
31
|
`;
|
|
31
|
-
|
|
32
|
+
|
|
33
|
+
export { style };
|
|
34
|
+
//# sourceMappingURL=exm-snackbar-css.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exmg/exm-snackbar",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "b5f4ed4f41d79e3cce85dc0c44181ef4413d7458"
|
|
41
41
|
}
|
|
File without changes
|