@vonage/vwc-snackbar 2.25.8 → 2.26.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/package.json +9 -9
- package/vwc-snackbar.css.js +1 -1
- package/vwc-snackbar.css.js.map +1 -1
- package/vwc-snackbar.d.ts +1 -0
- package/vwc-snackbar.js +8 -1
- package/vwc-snackbar.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonage/vwc-snackbar",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.26.0",
|
|
4
4
|
"description": "Snackbar component",
|
|
5
5
|
"homepage": "https://github.com/Vonage/vivid/tree/master/components/snackbar#readme",
|
|
6
6
|
"license": "ISC",
|
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@material/mwc-snackbar": "^0.22.1",
|
|
30
|
-
"@vonage/vvd-core": "2.
|
|
31
|
-
"@vonage/vvd-foundation": "2.
|
|
32
|
-
"@vonage/vwc-icon
|
|
33
|
-
"@vonage/vwc-
|
|
30
|
+
"@vonage/vvd-core": "2.26.0",
|
|
31
|
+
"@vonage/vvd-foundation": "2.26.0",
|
|
32
|
+
"@vonage/vwc-icon": "2.26.0",
|
|
33
|
+
"@vonage/vwc-icon-button": "2.26.0",
|
|
34
34
|
"lit-element": "^2.4.0",
|
|
35
35
|
"lit-html": "^1.3.0",
|
|
36
36
|
"tslib": "^2.3.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@vonage/vvd-design-tokens": "2.
|
|
40
|
-
"@vonage/vvd-typography": "2.
|
|
41
|
-
"@vonage/vvd-umbrella": "2.
|
|
39
|
+
"@vonage/vvd-design-tokens": "2.26.0",
|
|
40
|
+
"@vonage/vvd-typography": "2.26.0",
|
|
41
|
+
"@vonage/vvd-umbrella": "2.26.0",
|
|
42
42
|
"typescript": "^4.3.2"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "1218e3c7fed82e113d00f79adff58524550d26b6"
|
|
45
45
|
}
|
package/vwc-snackbar.css.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit-element';
|
|
2
|
-
export const style = css `.mdc-snackbar.connotation-success{--connotation:var(--vvd-color-success);--on-connotation:var(--vvd-color-on-success)}.mdc-snackbar.connotation-alert{--connotation:var(--vvd-color-alert);--on-connotation:var(--vvd-color-on-alert)}.mdc-snackbar.connotation-warning{--connotation:var(--vvd-color-warning);--on-connotation:var(--vvd-color-on-warning)}.mdc-snackbar.connotation-info{--connotation:var(--vvd-color-info);--on-connotation:var(--vvd-color-on-info)}.mdc-snackbar.connotation-announcement,.mdc-snackbar:not(.connotation-success):not(.connotation-alert):not(.connotation-warning):not(.connotation-info){--connotation:var(--vvd-color-announcement);--on-connotation:var(--vvd-color-on-announcement)}.mdc-snackbar[position^=TOP]{top:0;bottom:initial}.mdc-snackbar[position$=START]{justify-content:flex-start}.mdc-snackbar[position$=END]{justify-content:flex-end}.mdc-snackbar__surface{padding-right:initial;background-color:var(--vvd-color-canvas);border-radius:6px;box-shadow:0 6px 8px rgba(0,0,0,.05),0 12px 16px rgba(0,0,0,.05),0 4px 24px rgba(0,0,0,.1)}.mdc-snackbar__label{font:400 ultra-condensed
|
|
2
|
+
export const style = css `.mdc-snackbar.connotation-success{--connotation:var(--vvd-color-success);--on-connotation:var(--vvd-color-on-success)}.mdc-snackbar.connotation-alert{--connotation:var(--vvd-color-alert);--on-connotation:var(--vvd-color-on-alert)}.mdc-snackbar.connotation-warning{--connotation:var(--vvd-color-warning);--on-connotation:var(--vvd-color-on-warning)}.mdc-snackbar.connotation-info{--connotation:var(--vvd-color-info);--on-connotation:var(--vvd-color-on-info)}.mdc-snackbar.connotation-announcement,.mdc-snackbar:not(.connotation-success):not(.connotation-alert):not(.connotation-warning):not(.connotation-info){--connotation:var(--vvd-color-announcement);--on-connotation:var(--vvd-color-on-announcement)}.mdc-snackbar[position^=TOP]{top:0;bottom:initial}.mdc-snackbar[position$=START]{justify-content:flex-start}.mdc-snackbar[position$=END]{justify-content:flex-end}.mdc-snackbar__surface{padding-right:initial;background-color:var(--vvd-color-canvas);border-radius:6px;box-shadow:0 6px 8px rgba(0,0,0,.05),0 12px 16px rgba(0,0,0,.05),0 4px 24px rgba(0,0,0,.1)}.mdc-snackbar__label{font:400 ultra-condensed 16px / 24px SpeziaWebVariable;letter-spacing:0px;text-decoration:none;text-transform:none;padding:22px 16px;color:var(--vvd-color-on-canvas);-webkit-font-smoothing:initial;-moz-osx-font-smoothing:initial}.icon{flex-shrink:0;margin-block-end:auto;margin-block-start:16px;margin-inline-start:16px}.vwc-snackbar-legacy .icon{--connotation:initial;color:var(--vvd-color-on-canvas);margin-block-start:20px}.dismiss-container{display:flex;align-items:center;align-self:stretch;margin-inline-end:16px}.dismiss-container::before{align-self:stretch;border-left:1px solid var(--vvd-color-neutral-30);content:"";margin-inline-end:16px}.vwc-snackbar-legacy ::slotted([slot=action]){margin-block-start:16px}:not(.vwc-snackbar-legacy) ::slotted([slot=action]:last-child){margin-inline-end:16px}.vwc-snackbar-legacy .mdc-snackbar__surface{padding-inline-start:8px}.vwc-snackbar-legacy .mdc-snackbar__surface::before{border:1px solid var(--vvd-color-neutral-40);border-inline-start:8px solid var(--connotation)}.vwc-snackbar-legacy .header-and-label{padding:22px 16px}.vwc-snackbar-legacy .header-and-label>.heading{font:600 ultra-condensed 14px / 20px SpeziaWebVariable;letter-spacing:0px;text-decoration:none;text-transform:none}.vwc-snackbar-legacy .mdc-snackbar__label{font:400 ultra-condensed 14px / 20px SpeziaWebVariable;letter-spacing:0px;text-decoration:none;text-transform:none}.header-and-label{padding:16px 16px}.header-and-label>.heading{font:600 ultra-condensed 16px / 24px SpeziaWebVariable;letter-spacing:0px;text-decoration:none;text-transform:none;color:var(--vvd-color-on-canvas);margin-block-end:4px;margin-block-start:0}.header-and-label>.mdc-snackbar__label{padding:0}.vwc-snackbar-legacy .mdc-snackbar__actions{align-items:baseline;margin-block-end:auto;margin-block-start:20px}.vwc-snackbar-legacy .mdc-snackbar__actions .dismiss-container::before{content:initial}`;
|
|
3
3
|
//# sourceMappingURL=vwc-snackbar.css.js.map
|
package/vwc-snackbar.css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vwc-snackbar.css.js","sourceRoot":"","sources":["src/vwc-snackbar.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAChC,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"vwc-snackbar.css.js","sourceRoot":"","sources":["src/vwc-snackbar.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAChC,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA,o6FAAo6F,CAAC","sourcesContent":["// autogenerated module\nimport {css} from 'lit-element';\nexport const style = css`.mdc-snackbar.connotation-success{--connotation:var(--vvd-color-success);--on-connotation:var(--vvd-color-on-success)}.mdc-snackbar.connotation-alert{--connotation:var(--vvd-color-alert);--on-connotation:var(--vvd-color-on-alert)}.mdc-snackbar.connotation-warning{--connotation:var(--vvd-color-warning);--on-connotation:var(--vvd-color-on-warning)}.mdc-snackbar.connotation-info{--connotation:var(--vvd-color-info);--on-connotation:var(--vvd-color-on-info)}.mdc-snackbar.connotation-announcement,.mdc-snackbar:not(.connotation-success):not(.connotation-alert):not(.connotation-warning):not(.connotation-info){--connotation:var(--vvd-color-announcement);--on-connotation:var(--vvd-color-on-announcement)}.mdc-snackbar[position^=TOP]{top:0;bottom:initial}.mdc-snackbar[position$=START]{justify-content:flex-start}.mdc-snackbar[position$=END]{justify-content:flex-end}.mdc-snackbar__surface{padding-right:initial;background-color:var(--vvd-color-canvas);border-radius:6px;box-shadow:0 6px 8px rgba(0,0,0,.05),0 12px 16px rgba(0,0,0,.05),0 4px 24px rgba(0,0,0,.1)}.mdc-snackbar__label{font:400 ultra-condensed 16px / 24px SpeziaWebVariable;letter-spacing:0px;text-decoration:none;text-transform:none;padding:22px 16px;color:var(--vvd-color-on-canvas);-webkit-font-smoothing:initial;-moz-osx-font-smoothing:initial}.icon{flex-shrink:0;margin-block-end:auto;margin-block-start:16px;margin-inline-start:16px}.vwc-snackbar-legacy .icon{--connotation:initial;color:var(--vvd-color-on-canvas);margin-block-start:20px}.dismiss-container{display:flex;align-items:center;align-self:stretch;margin-inline-end:16px}.dismiss-container::before{align-self:stretch;border-left:1px solid var(--vvd-color-neutral-30);content:\"\";margin-inline-end:16px}.vwc-snackbar-legacy ::slotted([slot=action]){margin-block-start:16px}:not(.vwc-snackbar-legacy) ::slotted([slot=action]:last-child){margin-inline-end:16px}.vwc-snackbar-legacy .mdc-snackbar__surface{padding-inline-start:8px}.vwc-snackbar-legacy .mdc-snackbar__surface::before{border:1px solid var(--vvd-color-neutral-40);border-inline-start:8px solid var(--connotation)}.vwc-snackbar-legacy .header-and-label{padding:22px 16px}.vwc-snackbar-legacy .header-and-label>.heading{font:600 ultra-condensed 14px / 20px SpeziaWebVariable;letter-spacing:0px;text-decoration:none;text-transform:none}.vwc-snackbar-legacy .mdc-snackbar__label{font:400 ultra-condensed 14px / 20px SpeziaWebVariable;letter-spacing:0px;text-decoration:none;text-transform:none}.header-and-label{padding:16px 16px}.header-and-label>.heading{font:600 ultra-condensed 16px / 24px SpeziaWebVariable;letter-spacing:0px;text-decoration:none;text-transform:none;color:var(--vvd-color-on-canvas);margin-block-end:4px;margin-block-start:0}.header-and-label>.mdc-snackbar__label{padding:0}.vwc-snackbar-legacy .mdc-snackbar__actions{align-items:baseline;margin-block-end:auto;margin-block-start:20px}.vwc-snackbar-legacy .mdc-snackbar__actions .dismiss-container::before{content:initial}`;"]}
|
package/vwc-snackbar.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export declare class VWCSnackbar extends MWCSnackbarBase {
|
|
|
32
32
|
render(): TemplateResult;
|
|
33
33
|
private renderHeading;
|
|
34
34
|
private renderLegacyUi;
|
|
35
|
+
private renderContent;
|
|
35
36
|
protected renderIcon(): TemplateResult;
|
|
36
37
|
private renderDismissAction;
|
|
37
38
|
private static preprocessPositionConfig;
|
package/vwc-snackbar.js
CHANGED
|
@@ -62,7 +62,7 @@ let VWCSnackbar = VWCSnackbar_1 = class VWCSnackbar extends MWCSnackbarBase {
|
|
|
62
62
|
@keydown="${this._handleKeydown}">
|
|
63
63
|
<div class="mdc-snackbar__surface">
|
|
64
64
|
${this.icon ? this.renderIcon() : ''}
|
|
65
|
-
${this.legacy ? this.renderLegacyUi() :
|
|
65
|
+
${this.legacy ? this.renderLegacyUi() : this.renderContent()}
|
|
66
66
|
<div class="mdc-snackbar__actions">
|
|
67
67
|
${!this.legacy ? html `<slot name="action" @click="${this._handleActionClick}"></slot>` : ''}
|
|
68
68
|
${this.renderDismissAction()}
|
|
@@ -84,6 +84,13 @@ let VWCSnackbar = VWCSnackbar_1 = class VWCSnackbar extends MWCSnackbarBase {
|
|
|
84
84
|
<slot name="action" @click="${this._handleActionClick}"></slot>
|
|
85
85
|
</div>`;
|
|
86
86
|
}
|
|
87
|
+
renderContent() {
|
|
88
|
+
return html `
|
|
89
|
+
<div class="header-and-label">
|
|
90
|
+
${this.header ? this.renderHeading() : ''}
|
|
91
|
+
${accessibleSnackbarLabel(this.message, this.open)}
|
|
92
|
+
</div>`;
|
|
93
|
+
}
|
|
87
94
|
renderIcon() {
|
|
88
95
|
return html `
|
|
89
96
|
<vwc-icon class="icon" type="${this.icon}"></vwc-icon>`;
|
package/vwc-snackbar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vwc-snackbar.js","sourceRoot":"","sources":["src/vwc-snackbar.ts"],"names":[],"mappings":";;AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,kBAAkB,C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,CAAC,wBAAwB,CAAC,KAA+B;QACtE,IAAI,MAAM,GAAG,gBAAgB,CAAC;QAE9B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAChE,MAAM,GAAG,KAAK,CAAC;SACf;QAED,OAAO,MAAM,CAAC;IACf,CAAC;CACD,CAAA;AA7HC;IADA,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAC3B;AAGf;IADA,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CACe;AAG1C;IADA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDACP;AAGlC;IADA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAC3B;AAGd;IADA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CACzB;AAGhB;IADA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAC5B;AAGb;IADA,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDACpB;AApBX,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CA+HvB;SA/HY,WAAW","sourcesContent":["import '@vonage/vvd-core';\nimport '@vonage/vwc-icon';\nimport '@vonage/vwc-icon-button';\n\nimport { Connotation, Position } from '@vonage/vvd-foundation/constants.js';\nimport {\n\tcustomElement,\n\thtml,\n\tproperty,\n\tTemplateResult,\n} from 'lit-element';\nimport { classMap } from 'lit-html/directives/class-map.js';\nimport type { ClassInfo } from 'lit-html/directives/class-map.js';\nimport { ifDefined } from 'lit-html/directives/if-defined.js';\nimport { SnackbarBase as MWCSnackbarBase } from '@material/mwc-snackbar/mwc-snackbar-base.js';\nimport { style as vwcSnackbarStyle } from './vwc-snackbar.css.js';\nimport { styles as mwcSnackbarStyles } from '@material/mwc-snackbar/mwc-snackbar.css.js';\nimport { accessibleSnackbarLabel } from '@material/mwc-snackbar/accessible-snackbar-label-directive.js';\n\nexport const COMPONENT_NAME = 'vwc-snackbar';\nexport const OPENING_EVENT = 'opening';\nexport const OPENED_EVENT = 'opened';\nexport const CLOSING_EVENT = 'closing';\nexport const CLOSED_EVENT = 'closed';\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t[COMPONENT_NAME]: VWCSnackbar;\n\t}\n}\n\n/* eslint-disable @typescript-eslint/ban-ts-comment */\n// @ts-ignore\nMWCSnackbarBase.styles = [mwcSnackbarStyles, vwcSnackbarStyle];\n\ntype SnackbarConnotation = Extract<\n\tConnotation,\n\t| Connotation.Alert\n\t| Connotation.Announcement\n\t| Connotation.Info\n\t| Connotation.Success\n\t| Connotation.Warning\n>;\n\ntype PositionPair = `${Position.Top | Position.Bottom}-${Position.Start | Position.Center | Position.End}`;\n\nconst DEFAULT_POSITION: PositionPair = `${Position.Bottom}-${Position.Center}` as PositionPair;\n\nconst POSITION_VALIDATOR = new RegExp(`^(${Position.Top}|${Position.Bottom})-(${Position.Start}|${Position.Center}|${Position.End})$`);\n\n/**\n * `vwc-snackbar` component is designated to show a short-time-living, non-intrusive user notification\n *\n * `vwc-snackbar` is an extension of [<mwc-snackbar>](https://github.com/material-components/material-components-web-components/tree/master/packages/snackbar)\n */\n@customElement('vwc-snackbar')\nexport class VWCSnackbar extends MWCSnackbarBase {\n\t@property({ type: Boolean, reflect: true })\n\t\tlegacy = false;\n\n\t@property({ reflect: true })\n\t\tposition: PositionPair = DEFAULT_POSITION;\n\n\t@property({ type: String, reflect: true })\n\t\tconnotation?: SnackbarConnotation;\n\n\t@property({ type: String, reflect: true })\n\t\ticon?: string;\n\n\t@property({ type: String, reflect: true })\n\t\theader?: string;\n\n\t@property({ type: String, reflect: true })\n\t\tmessage = '';\n\n\t@property({ type: Boolean, reflect: true })\n\t\tdismissible?: boolean;\n\n\toverride connectedCallback() {\n\t\tsuper.connectedCallback();\n\t\tthis.setupEventListeners();\n\t}\n\n\tprivate setupEventListeners(): void {\n\t\tconst MDCEventPrefix = 'MDCSnackbar';\n\t\tfor (const eventName of [OPENING_EVENT, OPENED_EVENT, CLOSING_EVENT, CLOSED_EVENT]) {\n\t\t\tthis.addEventListener(`${MDCEventPrefix}:${eventName}`, this.getEventHandler(eventName));\n\t\t}\n\t}\n\n\tprivate getEventHandler(eventName: string): (event: Event) => void {\n\t\treturn (e) => {\n\t\t\tconst event = eventName;\n\t\t\tconst originalDetail = (e as CustomEvent).detail;\n\t\t\tconst detail = originalDetail ? Object.assign({}, originalDetail) : null;\n\t\t\tconst forwardedEvent = new CustomEvent(event, { bubbles: true, composed: true, detail: detail });\n\t\t\tthis.dispatchEvent(forwardedEvent);\n\t\t};\n\t}\n\n\tprotected getRenderClasses(): ClassInfo {\n\t\treturn {\n\t\t\t[`connotation-${this.connotation}`]: !!this.connotation,\n\t\t\t'vwc-snackbar-legacy': this.legacy\n\t\t};\n\t}\n\n\t/* eslint-disable lit-a11y/click-events-have-key-events */\n\toverride render(): TemplateResult {\n\t\tconst position = VWCSnackbar.preprocessPositionConfig(this.position);\n\t\tconst alternate = !this.legacy ? 'vvd-scheme-alternate' : undefined;\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=\"mdc-snackbar ${classMap(this.getRenderClasses())}\"\n\t\t\t\tposition=\"${position}\"\n\t\t\t\tpart=\"${ifDefined(alternate)}\"\n\t\t\t\t@keydown=\"${this._handleKeydown}\">\n\t\t\t\t<div class=\"mdc-snackbar__surface\">\n\t\t\t\t\t${this.icon ? this.renderIcon() : ''}\n\t\t\t\t\t${this.legacy ? this.renderLegacyUi() : accessibleSnackbarLabel(this.message, this.open)}\n\t\t\t\t\t<div class=\"mdc-snackbar__actions\">\n ${!this.legacy ? html`<slot name=\"action\" @click=\"${this._handleActionClick}\"></slot>` : ''}\n\t\t\t\t\t\t${this.renderDismissAction()}\n </div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`;\n\t}\n\t/* eslint-enable lit-a11y/click-events-have-key-events */\n\n\tprivate renderHeading(): TemplateResult | string {\n\t\treturn html`<h3 class=\"heading\" aria-hidden=\"true\">\n\t\t\t\t\t${this.header}\n\t\t\t\t</h3>`;\n\t}\n\n\t/* eslint-disable lit-a11y/click-events-have-key-events */\n\t// this is a legacy ui obligation which doesn't fit in the snackbar practice\n\t// TODO depreacte on the 1st chance\n\tprivate renderLegacyUi(): TemplateResult | string {\n\t\treturn html`\n\t\t\t<div class=\"header-and-label\">\n\t\t\t\t${this.header ? this.renderHeading() : ''}\n\t\t\t\t${accessibleSnackbarLabel(this.message, this.open)}\n\t\t\t\t<slot name=\"action\" @click=\"${this._handleActionClick}\"></slot>\n\t\t\t</div>`;\n\t}\n\t/* eslint-enable lit-a11y/click-events-have-key-events */\n\n\tprotected renderIcon(): TemplateResult {\n\t\treturn html`\n <vwc-icon class=\"icon\" type=\"${this.icon}\"></vwc-icon>`;\n\t}\n\n\tprivate renderDismissAction(): TemplateResult | string {\n\t\tif (!this.dismissible) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=\"dismiss-container\">\n\t\t\t\t<vwc-icon-button\n\t\t\t\t\tclass=\"dismiss-button\"\n\t\t\t\t\ticon=\"close-line\"\n\t\t\t\t\tlayout=\"ghost\"\n\t\t\t\t\tdense\n\t\t\t\t\t@click=\"${this._handleDismissClick}\"\n\t\t\t\t>\n\t\t\t\t</vwc-icon-button>\n\t\t\t</div>\n\t\t`;\n\t}\n\n\tprivate static preprocessPositionConfig(input: PositionPair | undefined): PositionPair {\n\t\tlet result = DEFAULT_POSITION;\n\n\t\tif (typeof input === 'string' && POSITION_VALIDATOR.test(input)) {\n\t\t\tresult = input;\n\t\t}\n\n\t\treturn result;\n\t}\n}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CAuIvB;SAvIY,WAAW","sourcesContent":["import '@vonage/vvd-core';\nimport '@vonage/vwc-icon';\nimport '@vonage/vwc-icon-button';\n\nimport { Connotation, Position } from '@vonage/vvd-foundation/constants.js';\nimport {\n\tcustomElement,\n\thtml,\n\tproperty,\n\tTemplateResult,\n} from 'lit-element';\nimport { classMap } from 'lit-html/directives/class-map.js';\nimport type { ClassInfo } from 'lit-html/directives/class-map.js';\nimport { ifDefined } from 'lit-html/directives/if-defined.js';\nimport { SnackbarBase as MWCSnackbarBase } from '@material/mwc-snackbar/mwc-snackbar-base.js';\nimport { style as vwcSnackbarStyle } from './vwc-snackbar.css.js';\nimport { styles as mwcSnackbarStyles } from '@material/mwc-snackbar/mwc-snackbar.css.js';\nimport { accessibleSnackbarLabel } from '@material/mwc-snackbar/accessible-snackbar-label-directive.js';\n\nexport const COMPONENT_NAME = 'vwc-snackbar';\nexport const OPENING_EVENT = 'opening';\nexport const OPENED_EVENT = 'opened';\nexport const CLOSING_EVENT = 'closing';\nexport const CLOSED_EVENT = 'closed';\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t[COMPONENT_NAME]: VWCSnackbar;\n\t}\n}\n\n/* eslint-disable @typescript-eslint/ban-ts-comment */\n// @ts-ignore\nMWCSnackbarBase.styles = [mwcSnackbarStyles, vwcSnackbarStyle];\n\ntype SnackbarConnotation = Extract<\n\tConnotation,\n\t| Connotation.Alert\n\t| Connotation.Announcement\n\t| Connotation.Info\n\t| Connotation.Success\n\t| Connotation.Warning\n>;\n\ntype PositionPair = `${Position.Top | Position.Bottom}-${Position.Start | Position.Center | Position.End}`;\n\nconst DEFAULT_POSITION: PositionPair = `${Position.Bottom}-${Position.Center}` as PositionPair;\n\nconst POSITION_VALIDATOR = new RegExp(`^(${Position.Top}|${Position.Bottom})-(${Position.Start}|${Position.Center}|${Position.End})$`);\n\n/**\n * `vwc-snackbar` component is designated to show a short-time-living, non-intrusive user notification\n *\n * `vwc-snackbar` is an extension of [<mwc-snackbar>](https://github.com/material-components/material-components-web-components/tree/master/packages/snackbar)\n */\n@customElement('vwc-snackbar')\nexport class VWCSnackbar extends MWCSnackbarBase {\n\t@property({ type: Boolean, reflect: true })\n\t\tlegacy = false;\n\n\t@property({ reflect: true })\n\t\tposition: PositionPair = DEFAULT_POSITION;\n\n\t@property({ type: String, reflect: true })\n\t\tconnotation?: SnackbarConnotation;\n\n\t@property({ type: String, reflect: true })\n\t\ticon?: string;\n\n\t@property({ type: String, reflect: true })\n\t\theader?: string;\n\n\t@property({ type: String, reflect: true })\n\t\tmessage = '';\n\n\t@property({ type: Boolean, reflect: true })\n\t\tdismissible?: boolean;\n\n\toverride connectedCallback() {\n\t\tsuper.connectedCallback();\n\t\tthis.setupEventListeners();\n\t}\n\n\tprivate setupEventListeners(): void {\n\t\tconst MDCEventPrefix = 'MDCSnackbar';\n\t\tfor (const eventName of [OPENING_EVENT, OPENED_EVENT, CLOSING_EVENT, CLOSED_EVENT]) {\n\t\t\tthis.addEventListener(`${MDCEventPrefix}:${eventName}`, this.getEventHandler(eventName));\n\t\t}\n\t}\n\n\tprivate getEventHandler(eventName: string): (event: Event) => void {\n\t\treturn (e) => {\n\t\t\tconst event = eventName;\n\t\t\tconst originalDetail = (e as CustomEvent).detail;\n\t\t\tconst detail = originalDetail ? Object.assign({}, originalDetail) : null;\n\t\t\tconst forwardedEvent = new CustomEvent(event, { bubbles: true, composed: true, detail: detail });\n\t\t\tthis.dispatchEvent(forwardedEvent);\n\t\t};\n\t}\n\n\tprotected getRenderClasses(): ClassInfo {\n\t\treturn {\n\t\t\t[`connotation-${this.connotation}`]: !!this.connotation,\n\t\t\t'vwc-snackbar-legacy': this.legacy\n\t\t};\n\t}\n\n\t/* eslint-disable lit-a11y/click-events-have-key-events */\n\toverride render(): TemplateResult {\n\t\tconst position = VWCSnackbar.preprocessPositionConfig(this.position);\n\t\tconst alternate = !this.legacy ? 'vvd-scheme-alternate' : undefined;\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=\"mdc-snackbar ${classMap(this.getRenderClasses())}\"\n\t\t\t\tposition=\"${position}\"\n\t\t\t\tpart=\"${ifDefined(alternate)}\"\n\t\t\t\t@keydown=\"${this._handleKeydown}\">\n\t\t\t\t<div class=\"mdc-snackbar__surface\">\n\t\t\t\t\t${this.icon ? this.renderIcon() : ''}\n\t\t\t\t\t${this.legacy ? this.renderLegacyUi() : this.renderContent()}\n\t\t\t\t\t<div class=\"mdc-snackbar__actions\">\n ${!this.legacy ? html`<slot name=\"action\" @click=\"${this._handleActionClick}\"></slot>` : ''}\n\t\t\t\t\t\t${this.renderDismissAction()}\n </div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`;\n\t}\n\t/* eslint-enable lit-a11y/click-events-have-key-events */\n\n\tprivate renderHeading(): TemplateResult | string {\n\t\treturn html`<h3 class=\"heading\" aria-hidden=\"true\">\n\t\t\t\t\t${this.header}\n\t\t\t\t</h3>`;\n\t}\n\n\t/* eslint-disable lit-a11y/click-events-have-key-events */\n\t// this is a legacy ui obligation which doesn't fit in the snackbar practice\n\t// TODO depreacte on the 1st chance\n\tprivate renderLegacyUi(): TemplateResult | string {\n\t\treturn html`\n\t\t\t<div class=\"header-and-label\">\n\t\t\t\t${this.header ? this.renderHeading() : ''}\n\t\t\t\t${accessibleSnackbarLabel(this.message, this.open)}\n\t\t\t\t<slot name=\"action\" @click=\"${this._handleActionClick}\"></slot>\n\t\t\t</div>`;\n\t}\n\t/* eslint-enable lit-a11y/click-events-have-key-events */\n\n\tprivate renderContent(): TemplateResult | string {\n\t\treturn html`\n\t\t\t<div class=\"header-and-label\">\n\t\t\t\t${this.header ? this.renderHeading() : ''}\n\t\t\t\t${accessibleSnackbarLabel(this.message, this.open)}\n\t\t\t</div>`;\n\t}\n\n\tprotected renderIcon(): TemplateResult {\n\t\treturn html`\n <vwc-icon class=\"icon\" type=\"${this.icon}\"></vwc-icon>`;\n\t}\n\n\tprivate renderDismissAction(): TemplateResult | string {\n\t\tif (!this.dismissible) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=\"dismiss-container\">\n\t\t\t\t<vwc-icon-button\n\t\t\t\t\tclass=\"dismiss-button\"\n\t\t\t\t\ticon=\"close-line\"\n\t\t\t\t\tlayout=\"ghost\"\n\t\t\t\t\tdense\n\t\t\t\t\t@click=\"${this._handleDismissClick}\"\n\t\t\t\t>\n\t\t\t\t</vwc-icon-button>\n\t\t\t</div>\n\t\t`;\n\t}\n\n\tprivate static preprocessPositionConfig(input: PositionPair | undefined): PositionPair {\n\t\tlet result = DEFAULT_POSITION;\n\n\t\tif (typeof input === 'string' && POSITION_VALIDATOR.test(input)) {\n\t\t\tresult = input;\n\t\t}\n\n\t\treturn result;\n\t}\n}\n"]}
|