@politiet/sheriff-web-components 1.3.6 → 1.3.7
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/dist/sds-button/sds-button.component.d.ts +41 -0
- package/dist/sds-button/sds-button.component.d.ts.map +1 -0
- package/dist/sds-button/sds-button.component.js +155 -0
- package/dist/sds-button/sds-button.component.js.map +1 -0
- package/dist/sds-button/sds-button.d.ts +2 -39
- package/dist/sds-button/sds-button.d.ts.map +1 -1
- package/dist/sds-button/sds-button.js +2 -147
- package/dist/sds-button/sds-button.js.map +1 -1
- package/dist/sds-heading/sds-heading.component.d.ts +15 -0
- package/dist/sds-heading/sds-heading.component.d.ts.map +1 -0
- package/dist/sds-heading/sds-heading.component.js +53 -0
- package/dist/sds-heading/sds-heading.component.js.map +1 -0
- package/dist/sds-heading/sds-heading.d.ts +2 -13
- package/dist/sds-heading/sds-heading.d.ts.map +1 -1
- package/dist/sds-heading/sds-heading.js +2 -45
- package/dist/sds-heading/sds-heading.js.map +1 -1
- package/dist/sds-icon/sds-icon.component.d.ts +22 -0
- package/dist/sds-icon/sds-icon.component.d.ts.map +1 -0
- package/dist/sds-icon/sds-icon.component.js +81 -0
- package/dist/sds-icon/sds-icon.component.js.map +1 -0
- package/dist/sds-icon/sds-icon.d.ts +2 -20
- package/dist/sds-icon/sds-icon.d.ts.map +1 -1
- package/dist/sds-icon/sds-icon.js +3 -75
- package/dist/sds-icon/sds-icon.js.map +1 -1
- package/dist/sds-notification/sds-notification.component.d.ts +18 -0
- package/dist/sds-notification/sds-notification.component.d.ts.map +1 -0
- package/dist/sds-notification/sds-notification.component.js +71 -0
- package/dist/sds-notification/sds-notification.component.js.map +1 -0
- package/dist/sds-notification/sds-notification.d.ts +2 -14
- package/dist/sds-notification/sds-notification.d.ts.map +1 -1
- package/dist/sds-notification/sds-notification.js +2 -57
- package/dist/sds-notification/sds-notification.js.map +1 -1
- package/dist/sds-paragraph/sds-paragraph.component.d.ts +12 -0
- package/dist/sds-paragraph/sds-paragraph.component.d.ts.map +1 -0
- package/dist/sds-paragraph/sds-paragraph.component.js +33 -0
- package/dist/sds-paragraph/sds-paragraph.component.js.map +1 -0
- package/dist/sds-paragraph/sds-paragraph.d.ts +2 -5
- package/dist/sds-paragraph/sds-paragraph.d.ts.map +1 -1
- package/dist/sds-paragraph/sds-paragraph.js +2 -25
- package/dist/sds-paragraph/sds-paragraph.js.map +1 -1
- package/dist/sheriff-web-components.js +631 -551
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-heading.js","sourceRoot":"","sources":["../../src/sds-heading/sds-heading.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"sds-heading.js","sourceRoot":"","sources":["../../src/sds-heading/sds-heading.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAGvD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,mBAAmB;CAAG,CAAA;AAAzC,UAAU;IADtB,oBAAoB,CAAC,aAAa,CAAC;GACvB,UAAU,CAA+B","sourcesContent":["import { guardedCustomElement } from '../utils/guarded-custom-element';\nimport { SDSHeadingComponent } from './sds-heading.component';\n\n@guardedCustomElement('sds-heading')\nexport class SDSHeading extends SDSHeadingComponent {}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-heading': SDSHeading;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { type IconPromise } from './sds-icon-loader';
|
|
3
|
+
export declare class SDSIconComponent extends LitElement {
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
|
+
private static readonly iconLoader;
|
|
6
|
+
static setLoadLocal(loadLocal: boolean): void;
|
|
7
|
+
static registerResolver(resolver: IconPromise): void;
|
|
8
|
+
name: string;
|
|
9
|
+
size: 's' | 'm';
|
|
10
|
+
color: string;
|
|
11
|
+
label: string;
|
|
12
|
+
private svg;
|
|
13
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
14
|
+
/**
|
|
15
|
+
* Wraps the icon loader's callback in a promise. Even if the loader
|
|
16
|
+
* calls the callback synchronously, awaiting the promise defers the
|
|
17
|
+
* property update to the next microtask.
|
|
18
|
+
*/
|
|
19
|
+
private fetchIcon;
|
|
20
|
+
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=sds-icon.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sds-icon.component.d.ts","sourceRoot":"","sources":["../../src/sds-icon/sds-icon.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAIvC,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGpE,qBAAa,gBAAiB,SAAQ,UAAU;IAC/C,OAAgB,MAAM,4BAAY;IAElC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAuB;IAEzD,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;IAI7C,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI;IAIT,IAAI,EAAE,MAAM,CAAM;IAClB,IAAI,EAAE,GAAG,GAAG,GAAG,CAAO;IACtB,KAAK,EAAE,MAAM,CAAM;IACnB,KAAK,EAAE,MAAM,CAAM;IAErD,OAAO,CAAC,GAAG,CAAc;IAEzB,MAAM;IAef;;;;OAIG;YACW,SAAS;IAWd,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;CAMjF"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html } from 'lit';
|
|
8
|
+
import { property, state } from 'lit/decorators.js';
|
|
9
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
10
|
+
import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
|
|
11
|
+
import { SDSIconLoader } from './sds-icon-loader';
|
|
12
|
+
import { styles } from './sds-icon.styles';
|
|
13
|
+
export class SDSIconComponent extends LitElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.name = '';
|
|
17
|
+
this.size = 'm';
|
|
18
|
+
this.color = '';
|
|
19
|
+
this.label = '';
|
|
20
|
+
this.svg = '';
|
|
21
|
+
}
|
|
22
|
+
static setLoadLocal(loadLocal) {
|
|
23
|
+
this.iconLoader.loadLocal = loadLocal;
|
|
24
|
+
}
|
|
25
|
+
static registerResolver(resolver) {
|
|
26
|
+
this.iconLoader.resolver = resolver;
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
return html `
|
|
30
|
+
<div
|
|
31
|
+
class="sds-icon"
|
|
32
|
+
role="${ifDefined(this.label ? 'img' : undefined)}"
|
|
33
|
+
style="${ifDefined(this.color ? `color:${this.color}` : undefined)}"
|
|
34
|
+
aria-label="${ifDefined(this.label)}"
|
|
35
|
+
>
|
|
36
|
+
${this.name
|
|
37
|
+
? html `<slot aria-hidden="true">${unsafeSVG(this.svg)}</slot>`
|
|
38
|
+
: html `<slot aria-hidden="true"></slot>`}
|
|
39
|
+
</div>
|
|
40
|
+
`;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Wraps the icon loader's callback in a promise. Even if the loader
|
|
44
|
+
* calls the callback synchronously, awaiting the promise defers the
|
|
45
|
+
* property update to the next microtask.
|
|
46
|
+
*/
|
|
47
|
+
async fetchIcon() {
|
|
48
|
+
if (!this.name) {
|
|
49
|
+
this.svg = '';
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const svg = await new Promise((resolve) => {
|
|
53
|
+
SDSIconComponent.iconLoader.resolve(this.name, resolve);
|
|
54
|
+
});
|
|
55
|
+
this.svg = svg;
|
|
56
|
+
}
|
|
57
|
+
updated(changedProperties) {
|
|
58
|
+
super.updated(changedProperties);
|
|
59
|
+
if (changedProperties.has('name') && this.name) {
|
|
60
|
+
void this.fetchIcon();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
SDSIconComponent.styles = [styles];
|
|
65
|
+
SDSIconComponent.iconLoader = new SDSIconLoader();
|
|
66
|
+
__decorate([
|
|
67
|
+
property({ type: String, reflect: true })
|
|
68
|
+
], SDSIconComponent.prototype, "name", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
property({ type: String, reflect: true })
|
|
71
|
+
], SDSIconComponent.prototype, "size", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
property({ type: String, reflect: true })
|
|
74
|
+
], SDSIconComponent.prototype, "color", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
property({ type: String, reflect: true })
|
|
77
|
+
], SDSIconComponent.prototype, "label", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
state()
|
|
80
|
+
], SDSIconComponent.prototype, "svg", void 0);
|
|
81
|
+
//# sourceMappingURL=sds-icon.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sds-icon.component.js","sourceRoot":"","sources":["../../src/sds-icon/sds-icon.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAoB,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IAAhD;;QAa4C,SAAI,GAAW,EAAE,CAAC;QAClB,SAAI,GAAc,GAAG,CAAC;QACtB,UAAK,GAAW,EAAE,CAAC;QACnB,UAAK,GAAW,EAAE,CAAC;QAE7C,QAAG,GAAW,EAAE,CAAC;IAuCnC,CAAC;IApDA,MAAM,CAAC,YAAY,CAAC,SAAkB;QACrC,IAAI,CAAC,UAAU,CAAC,SAAS,GAAG,SAAS,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,gBAAgB,CAAC,QAAqB;QAC5C,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACrC,CAAC;IASQ,MAAM;QACd,OAAO,IAAI,CAAA;;;YAGD,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;aACxC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;kBACpD,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;;MAEjC,IAAI,CAAC,IAAI;YACV,CAAC,CAAC,IAAI,CAAA,4BAA4B,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS;YAC9D,CAAC,CAAC,IAAI,CAAA,kCAAkC;;GAE1C,CAAC;IACH,CAAC;IAED;;;;OAIG;IACK,KAAK,CAAC,SAAS;QACtB,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YAChB,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;YACd,OAAO;QACR,CAAC;QACD,MAAM,GAAG,GAAG,MAAM,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,EAAE;YACjD,gBAAgB,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IAChB,CAAC;IAEQ,OAAO,CAAC,iBAAyD;QACzE,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACjC,IAAI,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YAChD,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;QACvB,CAAC;IACF,CAAC;;AAvDe,uBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAEV,2BAAU,GAAG,IAAI,aAAa,EAAE,AAAtB,CAAuB;AAUd;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAmB;AAClB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAuB;AACtB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAAoB;AACnB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAAoB;AAE7C;IAAhB,KAAK,EAAE;6CAA0B","sourcesContent":["import { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { unsafeSVG } from 'lit/directives/unsafe-svg.js';\nimport { SDSIconLoader, type IconPromise } from './sds-icon-loader';\nimport { styles } from './sds-icon.styles';\n\nexport class SDSIconComponent extends LitElement {\n\tstatic override styles = [styles];\n\n\tprivate static readonly iconLoader = new SDSIconLoader();\n\n\tstatic setLoadLocal(loadLocal: boolean): void {\n\t\tthis.iconLoader.loadLocal = loadLocal;\n\t}\n\n\tstatic registerResolver(resolver: IconPromise): void {\n\t\tthis.iconLoader.resolver = resolver;\n\t}\n\n\t@property({ type: String, reflect: true }) name: string = '';\n\t@property({ type: String, reflect: true }) size: 's' | 'm' = 'm';\n\t@property({ type: String, reflect: true }) color: string = '';\n\t@property({ type: String, reflect: true }) label: string = '';\n\n\t@state() private svg: string = '';\n\n\toverride render() {\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=\"sds-icon\"\n\t\t\t\trole=\"${ifDefined(this.label ? 'img' : undefined)}\"\n\t\t\t\tstyle=\"${ifDefined(this.color ? `color:${this.color}` : undefined)}\"\n\t\t\t\taria-label=\"${ifDefined(this.label)}\"\n\t\t\t>\n\t\t\t\t${this.name\n\t\t\t\t\t? html`<slot aria-hidden=\"true\">${unsafeSVG(this.svg)}</slot>`\n\t\t\t\t\t: html`<slot aria-hidden=\"true\"></slot>`}\n\t\t\t</div>\n\t\t`;\n\t}\n\n\t/**\n\t * Wraps the icon loader's callback in a promise. Even if the loader\n\t * calls the callback synchronously, awaiting the promise defers the\n\t * property update to the next microtask.\n\t */\n\tprivate async fetchIcon() {\n\t\tif (!this.name) {\n\t\t\tthis.svg = '';\n\t\t\treturn;\n\t\t}\n\t\tconst svg = await new Promise<string>((resolve) => {\n\t\t\tSDSIconComponent.iconLoader.resolve(this.name, resolve);\n\t\t});\n\t\tthis.svg = svg;\n\t}\n\n\toverride updated(changedProperties: Map<string | number | symbol, unknown>): void {\n\t\tsuper.updated(changedProperties);\n\t\tif (changedProperties.has('name') && this.name) {\n\t\t\tvoid this.fetchIcon();\n\t\t}\n\t}\n}\n"]}
|
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare class SDSIcon extends LitElement {
|
|
4
|
-
static styles: import("lit").CSSResult[];
|
|
5
|
-
private static readonly iconLoader;
|
|
6
|
-
static setLoadLocal(loadLocal: boolean): void;
|
|
7
|
-
static registerResolver(resolver: IconPromise): void;
|
|
8
|
-
name: string;
|
|
9
|
-
size: 's' | 'm';
|
|
10
|
-
color: string;
|
|
11
|
-
label: string;
|
|
12
|
-
private svg;
|
|
13
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
14
|
-
/**
|
|
15
|
-
* Wraps the icon loader's callback in a promise. Even if the loader
|
|
16
|
-
* calls the callback synchronously, awaiting the promise defers the
|
|
17
|
-
* property update to the next microtask.
|
|
18
|
-
*/
|
|
19
|
-
private fetchIcon;
|
|
20
|
-
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
1
|
+
import { SDSIconComponent } from './sds-icon.component';
|
|
2
|
+
export declare class SDSIcon extends SDSIconComponent {
|
|
21
3
|
}
|
|
22
4
|
declare global {
|
|
23
5
|
interface HTMLElementTagNameMap {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-icon.d.ts","sourceRoot":"","sources":["../../src/sds-icon/sds-icon.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sds-icon.d.ts","sourceRoot":"","sources":["../../src/sds-icon/sds-icon.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,qBACa,OAAQ,SAAQ,gBAAgB;CAAG;AAEhD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,UAAU,EAAE,OAAO,CAAC;KACpB;CACD"}
|
|
@@ -4,83 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
var SDSIcon_1;
|
|
8
|
-
import { LitElement, html } from 'lit';
|
|
9
|
-
import { property, state } from 'lit/decorators.js';
|
|
10
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
11
|
-
import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
|
|
12
|
-
import { SDSIconLoader } from './sds-icon-loader';
|
|
13
7
|
import { guardedCustomElement } from '../utils/guarded-custom-element';
|
|
14
|
-
import {
|
|
15
|
-
let SDSIcon =
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.name = '';
|
|
19
|
-
this.size = 'm';
|
|
20
|
-
this.color = '';
|
|
21
|
-
this.label = '';
|
|
22
|
-
this.svg = '';
|
|
23
|
-
}
|
|
24
|
-
static setLoadLocal(loadLocal) {
|
|
25
|
-
this.iconLoader.loadLocal = loadLocal;
|
|
26
|
-
}
|
|
27
|
-
static registerResolver(resolver) {
|
|
28
|
-
this.iconLoader.resolver = resolver;
|
|
29
|
-
}
|
|
30
|
-
render() {
|
|
31
|
-
return html `
|
|
32
|
-
<div
|
|
33
|
-
class="sds-icon"
|
|
34
|
-
role="${ifDefined(this.label ? 'img' : undefined)}"
|
|
35
|
-
style="${ifDefined(this.color ? `color:${this.color}` : undefined)}"
|
|
36
|
-
aria-label="${ifDefined(this.label)}"
|
|
37
|
-
>
|
|
38
|
-
${this.name
|
|
39
|
-
? html `<slot aria-hidden="true">${unsafeSVG(this.svg)}</slot>`
|
|
40
|
-
: html `<slot aria-hidden="true"></slot>`}
|
|
41
|
-
</div>
|
|
42
|
-
`;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Wraps the icon loader's callback in a promise. Even if the loader
|
|
46
|
-
* calls the callback synchronously, awaiting the promise defers the
|
|
47
|
-
* property update to the next microtask.
|
|
48
|
-
*/
|
|
49
|
-
async fetchIcon() {
|
|
50
|
-
if (!this.name) {
|
|
51
|
-
this.svg = '';
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
const svg = await new Promise((resolve) => {
|
|
55
|
-
SDSIcon_1.iconLoader.resolve(this.name, resolve);
|
|
56
|
-
});
|
|
57
|
-
this.svg = svg;
|
|
58
|
-
}
|
|
59
|
-
updated(changedProperties) {
|
|
60
|
-
super.updated(changedProperties);
|
|
61
|
-
if (changedProperties.has('name') && this.name) {
|
|
62
|
-
void this.fetchIcon();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
8
|
+
import { SDSIconComponent } from './sds-icon.component';
|
|
9
|
+
let SDSIcon = class SDSIcon extends SDSIconComponent {
|
|
65
10
|
};
|
|
66
|
-
SDSIcon
|
|
67
|
-
SDSIcon.iconLoader = new SDSIconLoader();
|
|
68
|
-
__decorate([
|
|
69
|
-
property({ type: String, reflect: true })
|
|
70
|
-
], SDSIcon.prototype, "name", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
property({ type: String, reflect: true })
|
|
73
|
-
], SDSIcon.prototype, "size", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
property({ type: String, reflect: true })
|
|
76
|
-
], SDSIcon.prototype, "color", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
property({ type: String, reflect: true })
|
|
79
|
-
], SDSIcon.prototype, "label", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
state()
|
|
82
|
-
], SDSIcon.prototype, "svg", void 0);
|
|
83
|
-
SDSIcon = SDSIcon_1 = __decorate([
|
|
11
|
+
SDSIcon = __decorate([
|
|
84
12
|
guardedCustomElement('sds-icon')
|
|
85
13
|
], SDSIcon);
|
|
86
14
|
export { SDSIcon };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-icon.js","sourceRoot":"","sources":["../../src/sds-icon/sds-icon.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sds-icon.js","sourceRoot":"","sources":["../../src/sds-icon/sds-icon.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGjD,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,gBAAgB;CAAG,CAAA;AAAnC,OAAO;IADnB,oBAAoB,CAAC,UAAU,CAAC;GACpB,OAAO,CAA4B","sourcesContent":["import { guardedCustomElement } from '../utils/guarded-custom-element';\nimport { SDSIconComponent } from './sds-icon.component';\n\n@guardedCustomElement('sds-icon')\nexport class SDSIcon extends SDSIconComponent {}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-icon': SDSIcon;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
type NotificationVariant = 'info' | 'success' | 'attention' | 'warning' | 'critical';
|
|
3
|
+
export interface SDSNotificationProps {
|
|
4
|
+
variant?: NotificationVariant;
|
|
5
|
+
'removable-label'?: string;
|
|
6
|
+
onSdsRemove?: (event: CustomEvent) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare class SDSNotificationComponent extends LitElement {
|
|
9
|
+
static styles: import("lit").CSSResult[];
|
|
10
|
+
iconTag: import("lit-html/static").StaticValue;
|
|
11
|
+
variant: NotificationVariant;
|
|
12
|
+
removableLabel?: string;
|
|
13
|
+
private readonly _remove;
|
|
14
|
+
private readonly _renderIcon;
|
|
15
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=sds-notification.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sds-notification.component.d.ts","sourceRoot":"","sources":["../../src/sds-notification/sds-notification.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAC;AAMhD,KAAK,mBAAmB,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,CAAC;AAUrF,MAAM,WAAW,oBAAoB;IACpC,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CAC3C;AAED,qBAAa,wBAAyB,SAAQ,UAAU;IAEvD,OAAgB,MAAM,4BAAY;IAClC,OAAO,wCAAqB;IAGe,OAAO,EAAE,mBAAmB,CAAU;IACR,cAAc,CAAC,EAAE,MAAM,CAAC;IAEjG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAOtB;IAEF,OAAO,CAAC,QAAQ,CAAC,WAAW,CAE1B;IAEO,MAAM;CA4Bf"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, nothing } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
10
|
+
import { html as staticHtml, literal } from 'lit/static-html.js';
|
|
11
|
+
import { styles } from './sds-notification.styles';
|
|
12
|
+
const notificationIcons = {
|
|
13
|
+
info: 'info-material-filled',
|
|
14
|
+
success: 'check_circle-material-filled',
|
|
15
|
+
attention: 'error-material-filled',
|
|
16
|
+
warning: 'warning-material-filled',
|
|
17
|
+
critical: 'dangerous-material-filled',
|
|
18
|
+
};
|
|
19
|
+
export class SDSNotificationComponent extends LitElement {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.iconTag = literal `sds-icon`;
|
|
23
|
+
// Reactive Props
|
|
24
|
+
this.variant = 'info';
|
|
25
|
+
this._remove = () => {
|
|
26
|
+
this.dispatchEvent(new CustomEvent('sds-remove', {
|
|
27
|
+
bubbles: true,
|
|
28
|
+
composed: true,
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
31
|
+
this._renderIcon = (iconName, size, cls) => {
|
|
32
|
+
return staticHtml `<${this.iconTag} ${cls ? `class=${cls}` : ''} name="${iconName}" size=${size}></${this.iconTag}>`;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
const notificationClasses = {
|
|
37
|
+
'sds-notification': true,
|
|
38
|
+
[`sds-notification--${this.variant}`]: true,
|
|
39
|
+
};
|
|
40
|
+
return html `<div class="${classMap(notificationClasses)}">
|
|
41
|
+
<div class="sds-notification__type">
|
|
42
|
+
<!-- ${staticHtml `<${this.iconTag}>Wow</${this.iconTag}>`} -->
|
|
43
|
+
${this._renderIcon(notificationIcons[this.variant], 'm', 'sds-notification__icon')}
|
|
44
|
+
</div>
|
|
45
|
+
<div class="sds-notification__content">
|
|
46
|
+
<div class="sds-notification__content-text">
|
|
47
|
+
<slot name="title"></slot>
|
|
48
|
+
<slot name="message"></slot>
|
|
49
|
+
</div>
|
|
50
|
+
${this.removableLabel
|
|
51
|
+
? html `<button
|
|
52
|
+
class="sds-notification__remove-btn"
|
|
53
|
+
@click=${this._remove}
|
|
54
|
+
aria-label="${this.removableLabel}"
|
|
55
|
+
>
|
|
56
|
+
${this._renderIcon('close-material-outlined', 's')}
|
|
57
|
+
</button>`
|
|
58
|
+
: nothing}
|
|
59
|
+
</div>
|
|
60
|
+
</div>`;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// Styling
|
|
64
|
+
SDSNotificationComponent.styles = [styles];
|
|
65
|
+
__decorate([
|
|
66
|
+
property({ type: String, reflect: true })
|
|
67
|
+
], SDSNotificationComponent.prototype, "variant", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
property({ type: String, attribute: 'removable-label', reflect: true })
|
|
70
|
+
], SDSNotificationComponent.prototype, "removableLabel", void 0);
|
|
71
|
+
//# sourceMappingURL=sds-notification.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sds-notification.component.js","sourceRoot":"","sources":["../../src/sds-notification/sds-notification.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAInD,MAAM,iBAAiB,GAAwC;IAC9D,IAAI,EAAE,sBAAsB;IAC5B,OAAO,EAAE,8BAA8B;IACvC,SAAS,EAAE,uBAAuB;IAClC,OAAO,EAAE,yBAAyB;IAClC,QAAQ,EAAE,2BAA2B;CACrC,CAAC;AAQF,MAAM,OAAO,wBAAyB,SAAQ,UAAU;IAAxD;;QAGC,YAAO,GAAG,OAAO,CAAA,UAAU,CAAC;QAE5B,iBAAiB;QAC0B,YAAO,GAAwB,MAAM,CAAC;QAGhE,YAAO,GAAG,GAAG,EAAE;YAC/B,IAAI,CAAC,aAAa,CACjB,IAAI,WAAW,CAAC,YAAY,EAAE;gBAC7B,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;aACd,CAAC,CACF,CAAC;QACH,CAAC,CAAC;QAEe,gBAAW,GAAG,CAAC,QAAgB,EAAE,IAAY,EAAE,GAAY,EAAE,EAAE;YAC/E,OAAO,UAAU,CAAA,IAAI,IAAI,CAAC,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,QAAQ,UAAU,IAAI,MAAM,IAAI,CAAC,OAAO,GAAG,CAAC;QACrH,CAAC,CAAC;IA8BH,CAAC;IA5BS,MAAM;QACd,MAAM,mBAAmB,GAAG;YAC3B,kBAAkB,EAAE,IAAI;YACxB,CAAC,qBAAqB,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI;SAC3C,CAAC;QAEF,OAAO,IAAI,CAAA,eAAe,QAAQ,CAAC,mBAAmB,CAAC;;WAE9C,UAAU,CAAA,IAAI,IAAI,CAAC,OAAO,SAAS,IAAI,CAAC,OAAO,GAAG;MACvD,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,wBAAwB,CAAC;;;;;;;MAOhF,IAAI,CAAC,cAAc;YACpB,CAAC,CAAC,IAAI,CAAA;;gBAEK,IAAI,CAAC,OAAO;qBACP,IAAI,CAAC,cAAc;;SAE/B,IAAI,CAAC,WAAW,CAAC,yBAAyB,EAAE,GAAG,CAAC;gBACzC;YACX,CAAC,CAAC,OAAO;;SAEL,CAAC;IACT,CAAC;;AAhDD,UAAU;AACM,+BAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAIS;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yDAAuC;AACR;IAAxE,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gEAAyB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { html as staticHtml, literal } from 'lit/static-html.js';\nimport { styles } from './sds-notification.styles';\n\ntype NotificationVariant = 'info' | 'success' | 'attention' | 'warning' | 'critical';\n\nconst notificationIcons: Record<NotificationVariant, string> = {\n\tinfo: 'info-material-filled',\n\tsuccess: 'check_circle-material-filled',\n\tattention: 'error-material-filled',\n\twarning: 'warning-material-filled',\n\tcritical: 'dangerous-material-filled',\n};\n\nexport interface SDSNotificationProps {\n\tvariant?: NotificationVariant;\n\t'removable-label'?: string;\n\tonSdsRemove?: (event: CustomEvent) => void;\n}\n\nexport class SDSNotificationComponent extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\ticonTag = literal`sds-icon`;\n\n\t// Reactive Props\n\t@property({ type: String, reflect: true }) variant: NotificationVariant = 'info';\n\t@property({ type: String, attribute: 'removable-label', reflect: true }) removableLabel?: string;\n\n\tprivate readonly _remove = () => {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('sds-remove', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t})\n\t\t);\n\t};\n\n\tprivate readonly _renderIcon = (iconName: string, size: string, cls?: string) => {\n\t\treturn staticHtml`<${this.iconTag} ${cls ? `class=${cls}` : ''} name=\"${iconName}\" size=${size}></${this.iconTag}>`;\n\t};\n\n\toverride render() {\n\t\tconst notificationClasses = {\n\t\t\t'sds-notification': true,\n\t\t\t[`sds-notification--${this.variant}`]: true,\n\t\t};\n\n\t\treturn html`<div class=\"${classMap(notificationClasses)}\">\n\t\t\t<div class=\"sds-notification__type\">\n\t\t\t\t<!-- ${staticHtml`<${this.iconTag}>Wow</${this.iconTag}>`} -->\n\t\t\t\t${this._renderIcon(notificationIcons[this.variant], 'm', 'sds-notification__icon')}\n\t\t\t</div>\n\t\t\t<div class=\"sds-notification__content\">\n\t\t\t\t<div class=\"sds-notification__content-text\">\n\t\t\t\t\t<slot name=\"title\"></slot>\n\t\t\t\t\t<slot name=\"message\"></slot>\n\t\t\t\t</div>\n\t\t\t\t${this.removableLabel\n\t\t\t\t\t? html`<button\n\t\t\t\t\t\t\tclass=\"sds-notification__remove-btn\"\n\t\t\t\t\t\t\t@click=${this._remove}\n\t\t\t\t\t\t\taria-label=\"${this.removableLabel}\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t${this._renderIcon('close-material-outlined', 's')}\n\t\t\t\t\t\t</button>`\n\t\t\t\t\t: nothing}\n\t\t\t</div>\n\t\t</div>`;\n\t}\n}\n"]}
|
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
1
|
import '../sds-icon/sds-icon';
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
variant?: NotificationVariant;
|
|
6
|
-
'removable-label'?: string;
|
|
7
|
-
onSdsRemove?: (event: CustomEvent) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare class SDSNotification extends LitElement {
|
|
10
|
-
static styles: import("lit").CSSResult[];
|
|
11
|
-
variant: NotificationVariant;
|
|
12
|
-
removableLabel?: string;
|
|
13
|
-
private readonly _remove;
|
|
14
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
2
|
+
import { SDSNotificationComponent } from './sds-notification.component';
|
|
3
|
+
export declare class SDSNotification extends SDSNotificationComponent {
|
|
15
4
|
}
|
|
16
5
|
declare global {
|
|
17
6
|
interface HTMLElementTagNameMap {
|
|
18
7
|
'sds-notification': SDSNotification;
|
|
19
8
|
}
|
|
20
9
|
}
|
|
21
|
-
export {};
|
|
22
10
|
//# sourceMappingURL=sds-notification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-notification.d.ts","sourceRoot":"","sources":["../../src/sds-notification/sds-notification.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sds-notification.d.ts","sourceRoot":"","sources":["../../src/sds-notification/sds-notification.ts"],"names":[],"mappings":"AACA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAExE,qBACa,eAAgB,SAAQ,wBAAwB;CAAG;AAEhE,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,kBAAkB,EAAE,eAAe,CAAC;KACpC;CACD"}
|
|
@@ -4,66 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { LitElement, html, nothing } from 'lit';
|
|
8
|
-
import { property } from 'lit/decorators.js';
|
|
9
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
10
7
|
import { guardedCustomElement } from '../utils/guarded-custom-element';
|
|
11
|
-
import { styles } from './sds-notification.styles';
|
|
12
8
|
import '../sds-icon/sds-icon';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
success: 'check_circle-material-filled',
|
|
16
|
-
attention: 'error-material-filled',
|
|
17
|
-
warning: 'warning-material-filled',
|
|
18
|
-
critical: 'dangerous-material-filled',
|
|
9
|
+
import { SDSNotificationComponent } from './sds-notification.component';
|
|
10
|
+
let SDSNotification = class SDSNotification extends SDSNotificationComponent {
|
|
19
11
|
};
|
|
20
|
-
let SDSNotification = class SDSNotification extends LitElement {
|
|
21
|
-
constructor() {
|
|
22
|
-
super(...arguments);
|
|
23
|
-
// Reactive Props
|
|
24
|
-
this.variant = 'info';
|
|
25
|
-
this._remove = () => {
|
|
26
|
-
this.dispatchEvent(new CustomEvent('sds-remove', {
|
|
27
|
-
bubbles: true,
|
|
28
|
-
composed: true,
|
|
29
|
-
}));
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
render() {
|
|
33
|
-
const notificationClasses = {
|
|
34
|
-
'sds-notification': true,
|
|
35
|
-
[`sds-notification--${this.variant}`]: true,
|
|
36
|
-
};
|
|
37
|
-
return html `<div class="${classMap(notificationClasses)}">
|
|
38
|
-
<div class="sds-notification__type">
|
|
39
|
-
<sds-icon class="sds-notification__icon" name="${notificationIcons[this.variant]}" size="m"></sds-icon>
|
|
40
|
-
</div>
|
|
41
|
-
<div class="sds-notification__content">
|
|
42
|
-
<div class="sds-notification__content-text">
|
|
43
|
-
<slot name="title"></slot>
|
|
44
|
-
<slot name="message"></slot>
|
|
45
|
-
</div>
|
|
46
|
-
${this.removableLabel
|
|
47
|
-
? html `<button
|
|
48
|
-
class="sds-notification__remove-btn"
|
|
49
|
-
@click=${this._remove}
|
|
50
|
-
aria-label="${this.removableLabel}"
|
|
51
|
-
>
|
|
52
|
-
<sds-icon name="close-material-outlined" size="s"></sds-icon>
|
|
53
|
-
</button>`
|
|
54
|
-
: nothing}
|
|
55
|
-
</div>
|
|
56
|
-
</div>`;
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
// Styling
|
|
60
|
-
SDSNotification.styles = [styles];
|
|
61
|
-
__decorate([
|
|
62
|
-
property({ type: String, reflect: true })
|
|
63
|
-
], SDSNotification.prototype, "variant", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
property({ type: String, attribute: 'removable-label', reflect: true })
|
|
66
|
-
], SDSNotification.prototype, "removableLabel", void 0);
|
|
67
12
|
SDSNotification = __decorate([
|
|
68
13
|
guardedCustomElement('sds-notification')
|
|
69
14
|
], SDSNotification);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-notification.js","sourceRoot":"","sources":["../../src/sds-notification/sds-notification.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"sds-notification.js","sourceRoot":"","sources":["../../src/sds-notification/sds-notification.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAGjE,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,wBAAwB;CAAG,CAAA;AAAnD,eAAe;IAD3B,oBAAoB,CAAC,kBAAkB,CAAC;GAC5B,eAAe,CAAoC","sourcesContent":["import { guardedCustomElement } from '../utils/guarded-custom-element';\nimport '../sds-icon/sds-icon';\nimport { SDSNotificationComponent } from './sds-notification.component';\n\n@guardedCustomElement('sds-notification')\nexport class SDSNotification extends SDSNotificationComponent {}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-notification': SDSNotification;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
type Size = 'xl' | 'l' | 'm';
|
|
3
|
+
export interface SDSParagraphProps {
|
|
4
|
+
size?: Size;
|
|
5
|
+
}
|
|
6
|
+
export declare class SDSParagraphComponent extends LitElement {
|
|
7
|
+
static styles: import("lit").CSSResult[];
|
|
8
|
+
size: Size;
|
|
9
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=sds-paragraph.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sds-paragraph.component.d.ts","sourceRoot":"","sources":["../../src/sds-paragraph/sds-paragraph.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC,KAAK,IAAI,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC;AAE7B,MAAM,WAAW,iBAAiB;IACjC,IAAI,CAAC,EAAE,IAAI,CAAC;CACZ;AAED,qBAAa,qBAAsB,SAAQ,UAAU;IAEpD,OAAgB,MAAM,4BAAY;IAGN,IAAI,EAAE,IAAI,CAAQ;IAErC,MAAM;CAYf"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
10
|
+
import { styles } from './sds-paragraph.styles';
|
|
11
|
+
export class SDSParagraphComponent extends LitElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
// Reactive Props
|
|
15
|
+
this.size = 'xl';
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
const styleClasses = {
|
|
19
|
+
'sds-paragraph': true,
|
|
20
|
+
'sds-paragraph--xl': this.size === 'xl',
|
|
21
|
+
'sds-paragraph--l': this.size === 'l',
|
|
22
|
+
'sds-paragraph--m': this.size === 'm',
|
|
23
|
+
};
|
|
24
|
+
const classes = classMap(styleClasses);
|
|
25
|
+
return html `<p class=${classes}><slot></slot></p>`;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
// Styling
|
|
29
|
+
SDSParagraphComponent.styles = [styles];
|
|
30
|
+
__decorate([
|
|
31
|
+
property({ type: String })
|
|
32
|
+
], SDSParagraphComponent.prototype, "size", void 0);
|
|
33
|
+
//# sourceMappingURL=sds-paragraph.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sds-paragraph.component.js","sourceRoot":"","sources":["../../src/sds-paragraph/sds-paragraph.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAQhD,MAAM,OAAO,qBAAsB,SAAQ,UAAU;IAArD;;QAIC,iBAAiB;QACW,SAAI,GAAS,IAAI,CAAC;IAc/C,CAAC;IAZS,MAAM;QACd,MAAM,YAAY,GAAG;YACpB,eAAe,EAAE,IAAI;YACrB,mBAAmB,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;YACvC,kBAAkB,EAAE,IAAI,CAAC,IAAI,KAAK,GAAG;YACrC,kBAAkB,EAAE,IAAI,CAAC,IAAI,KAAK,GAAG;SACrC,CAAC;QAEF,MAAM,OAAO,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;QAEvC,OAAO,IAAI,CAAA,YAAY,OAAO,oBAAoB,CAAC;IACpD,CAAC;;AAjBD,UAAU;AACM,4BAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAGN;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAmB","sourcesContent":["import { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './sds-paragraph.styles';\n\ntype Size = 'xl' | 'l' | 'm';\n\nexport interface SDSParagraphProps {\n\tsize?: Size;\n}\n\nexport class SDSParagraphComponent extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t// Reactive Props\n\t@property({ type: String }) size: Size = 'xl';\n\n\toverride render() {\n\t\tconst styleClasses = {\n\t\t\t'sds-paragraph': true,\n\t\t\t'sds-paragraph--xl': this.size === 'xl',\n\t\t\t'sds-paragraph--l': this.size === 'l',\n\t\t\t'sds-paragraph--m': this.size === 'm',\n\t\t};\n\n\t\tconst classes = classMap(styleClasses);\n\n\t\treturn html`<p class=${classes}><slot></slot></p>`;\n\t}\n}\n"]}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SDSParagraphComponent } from './sds-paragraph.component';
|
|
2
2
|
type Size = 'xl' | 'l' | 'm';
|
|
3
3
|
export interface SDSParagraphProps {
|
|
4
4
|
size?: Size;
|
|
5
5
|
}
|
|
6
|
-
export declare class SDSParagraph extends
|
|
7
|
-
static styles: import("lit").CSSResult[];
|
|
8
|
-
size: Size;
|
|
9
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
6
|
+
export declare class SDSParagraph extends SDSParagraphComponent {
|
|
10
7
|
}
|
|
11
8
|
declare global {
|
|
12
9
|
interface HTMLElementTagNameMap {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-paragraph.d.ts","sourceRoot":"","sources":["../../src/sds-paragraph/sds-paragraph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sds-paragraph.d.ts","sourceRoot":"","sources":["../../src/sds-paragraph/sds-paragraph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,KAAK,IAAI,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC;AAE7B,MAAM,WAAW,iBAAiB;IACjC,IAAI,CAAC,EAAE,IAAI,CAAC;CACZ;AAED,qBACa,YAAa,SAAQ,qBAAqB;CAAG;AAE1D,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,eAAe,EAAE,YAAY,CAAC;KAC9B;CACD"}
|
|
@@ -4,33 +4,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { LitElement, html } from 'lit';
|
|
8
|
-
import { property } from 'lit/decorators.js';
|
|
9
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
10
7
|
import { guardedCustomElement } from '../utils/guarded-custom-element';
|
|
11
|
-
import {
|
|
12
|
-
let SDSParagraph = class SDSParagraph extends
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
// Reactive Props
|
|
16
|
-
this.size = 'xl';
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
const styleClasses = {
|
|
20
|
-
'sds-paragraph': true,
|
|
21
|
-
'sds-paragraph--xl': this.size === 'xl',
|
|
22
|
-
'sds-paragraph--l': this.size === 'l',
|
|
23
|
-
'sds-paragraph--m': this.size === 'm',
|
|
24
|
-
};
|
|
25
|
-
const classes = classMap(styleClasses);
|
|
26
|
-
return html `<p class=${classes}><slot></slot></p>`;
|
|
27
|
-
}
|
|
8
|
+
import { SDSParagraphComponent } from './sds-paragraph.component';
|
|
9
|
+
let SDSParagraph = class SDSParagraph extends SDSParagraphComponent {
|
|
28
10
|
};
|
|
29
|
-
// Styling
|
|
30
|
-
SDSParagraph.styles = [styles];
|
|
31
|
-
__decorate([
|
|
32
|
-
property({ type: String })
|
|
33
|
-
], SDSParagraph.prototype, "size", void 0);
|
|
34
11
|
SDSParagraph = __decorate([
|
|
35
12
|
guardedCustomElement('sds-paragraph')
|
|
36
13
|
], SDSParagraph);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-paragraph.js","sourceRoot":"","sources":["../../src/sds-paragraph/sds-paragraph.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"sds-paragraph.js","sourceRoot":"","sources":["../../src/sds-paragraph/sds-paragraph.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAS3D,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,qBAAqB;CAAG,CAAA;AAA7C,YAAY;IADxB,oBAAoB,CAAC,eAAe,CAAC;GACzB,YAAY,CAAiC","sourcesContent":["import { guardedCustomElement } from '../utils/guarded-custom-element';\nimport { SDSParagraphComponent } from './sds-paragraph.component';\n\ntype Size = 'xl' | 'l' | 'm';\n\nexport interface SDSParagraphProps {\n\tsize?: Size;\n}\n\n@guardedCustomElement('sds-paragraph')\nexport class SDSParagraph extends SDSParagraphComponent {}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-paragraph': SDSParagraph;\n\t}\n}\n"]}
|