scb-wc-test 0.1.85 → 0.1.87

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.
@@ -1,16 +1,16 @@
1
- import { css as m, LitElement as v, html as i } from "lit";
2
- import { property as s, customElement as u } from "lit/decorators.js";
1
+ import { css as m, LitElement as u, html as i } from "lit";
2
+ import { property as s, customElement as b } from "lit/decorators.js";
3
3
  import "@material/web/focus/md-focus-ring.js";
4
4
  import "../scb-list/scb-list.js";
5
5
  import "../scb-button/scb-button.js";
6
6
  import "../scb-link/scb-link.js";
7
7
  import "../scb-avatar/scb-avatar.js";
8
- var b = Object.defineProperty, g = Object.getOwnPropertyDescriptor, e = (o, r, n, a) => {
8
+ var v = Object.defineProperty, g = Object.getOwnPropertyDescriptor, e = (o, r, n, a) => {
9
9
  for (var l = a > 1 ? void 0 : a ? g(r, n) : r, d = o.length - 1, c; d >= 0; d--)
10
10
  (c = o[d]) && (l = (a ? c(r, n, l) : c(l)) || l);
11
- return a && l && b(r, n, l), l;
11
+ return a && l && v(r, n, l), l;
12
12
  };
13
- let t = class extends v {
13
+ let t = class extends u {
14
14
  constructor() {
15
15
  super(...arguments), this.type = "", this.variant = "", this.direction = "", this.mediaType = "", this.mediaHref = "", this.mediaAlt = "", this.mediaSrcset = "", this.mediaSizes = "", this.mediaLoading = "auto", this.mediaDecoding = "async", this.mediaFetchPriority = "auto", this.mediaFit = "cover", this.mediaPosition = "center", this.mediaWidth = "", this.mediaHeight = "", this.mediaAspect = "", this.mediaPlaceholder = !1, this.cardHref = "", this.title = "", this.subtitle = "", this.supportingText = "", this.commentsText = "", this.comments = 0, this.likesText = "", this.likes = 0, this.sizing = "stretch", this.width = "", this.maxWidth = "", this.height = "", this.maxHeight = "", this.__onImgLoad = (o) => {
16
16
  const r = o.currentTarget.closest(".media");
@@ -52,7 +52,6 @@ let t = class extends v {
52
52
  const l = `aspect-ratio:${a || `${r}/${n}`};`, d = this.mediaPlaceholder ? "has-ph" : "", c = this.mediaFit || "cover", p = this.mediaPosition || "center";
53
53
  return i`
54
54
  <div class="media ${d}" style="${l}">
55
- <!-- Tillåt egna <source>-element via slot om man vill använda <picture> -->
56
55
  <slot name="media-sources"></slot>
57
56
  <img
58
57
  src="${this.mediaHref || ""}"
@@ -73,7 +72,9 @@ let t = class extends v {
73
72
  return null;
74
73
  }
75
74
  render() {
76
- const o = this.variant ? `${this.variant.toLowerCase()}` : "", r = this.type === "list" ? "vertical" : this.direction ? this.direction.toLowerCase() : "", n = this.cardHref ? "clickable" : "", a = this.date instanceof Date ? this.date.toISOString().slice(0, 10) : this.date || "", l = (p = !1) => p ? i`<a class="title" href="${this.cardHref}" tabindex="0">${this.title}</a><md-icon>arrow_forward</md-icon>` : i`<span class="title">${this.title}</span>`, d = () => this.__mediaTemplate(), c = (p) => i`
75
+ const o = this.variant ? `${this.variant.toLowerCase()}` : "", r = this.type === "list" ? "vertical" : this.direction ? this.direction.toLowerCase() : "", n = this.cardHref ? "clickable" : "", a = this.date instanceof Date ? this.date.toISOString().slice(0, 10) : this.date || "", l = (p = !1) => p ? i`<a class="title" href="${this.cardHref}" tabindex="0"
76
+ >${this.title}</a
77
+ ><md-icon>arrow_forward</md-icon>` : i`<span class="title">${this.title}</span>`, d = () => this.__mediaTemplate(), c = (p) => i`
77
78
  <div
78
79
  class="scb-card ${o} ${r} ${n}"
79
80
  @click=${this.cardHref ? this.__handleHrefNavigation : null}
@@ -126,8 +127,14 @@ let t = class extends v {
126
127
  </div>
127
128
  <div class="content">
128
129
  <div class="social-metrics">
129
- <span class="comments"><md-icon>mode_comment</md-icon> <span>${this.commentsText}: ${this.comments}</span></span>
130
- <span class="likes"><md-icon>thumb_up</md-icon> <span>${this.likesText}: ${this.likes}</span></span>
130
+ <span class="comments"
131
+ ><md-icon>mode_comment</md-icon>
132
+ <span>${this.commentsText}: ${this.comments}</span></span
133
+ >
134
+ <span class="likes"
135
+ ><md-icon>thumb_up</md-icon>
136
+ <span>${this.likesText}: ${this.likes}</span></span
137
+ >
131
138
  </div>
132
139
  </div>
133
140
  </div>
@@ -176,7 +183,7 @@ let t = class extends v {
176
183
  updated(o) {
177
184
  super.updated(o), o.has("width") && (this.width ? this.style.inlineSize = this.width : this.style.removeProperty("inline-size")), o.has("maxWidth") && (this.maxWidth ? this.style.maxInlineSize = this.maxWidth : this.style.removeProperty("max-inline-size")), o.has("height") && (this.height ? this.style.blockSize = this.height : this.style.removeProperty("block-size")), o.has("maxHeight") && (this.maxHeight ? this.style.maxBlockSize = this.maxHeight : this.style.removeProperty("max-block-size")), o.has("type") && (this.type === "list" ? this.setAttribute("data-density", "-2") : this.removeAttribute("data-density")), this.style.setProperty("--scb-card-media-fit", this.mediaFit || "cover"), this.style.setProperty("--scb-card-media-position", this.mediaPosition || "center");
178
185
  }
179
- async firstUpdated() {
186
+ async firstUpdated(o) {
180
187
  t.__iconLoaded || (await import("@material/web/icon/icon.js"), t.__iconLoaded = !0), t.__rippleLoaded || (await import("@material/web/ripple/ripple.js"), t.__rippleLoaded = !0);
181
188
  }
182
189
  };
@@ -196,34 +203,44 @@ t.styles = m`
196
203
  --scb-card-horizontal-media-min: 96px;
197
204
  --scb-card-horizontal-media-aspect: 16 / 9;
198
205
  }
199
- :host([type="standard"]) { --scb-card-max-w: var(--scb-card-standard-max-w); }
200
- :host([type="list"]) { --scb-card-max-w: var(--scb-card-list-max-w); }
201
- :host([type="social"]) { --scb-card-max-w: var(--scb-card-social-max-w); }
202
- :host([type="link"]) { --scb-card-max-w: var(--scb-card-link-max-w); }
203
- :host([type="action"]) { --scb-card-max-w: var(--scb-card-action-max-w); }
206
+ :host([type='standard']) {
207
+ --scb-card-max-w: var(--scb-card-standard-max-w);
208
+ }
209
+ :host([type='list']) {
210
+ --scb-card-max-w: var(--scb-card-list-max-w);
211
+ }
212
+ :host([type='social']) {
213
+ --scb-card-max-w: var(--scb-card-social-max-w);
214
+ }
215
+ :host([type='link']) {
216
+ --scb-card-max-w: var(--scb-card-link-max-w);
217
+ }
218
+ :host([type='action']) {
219
+ --scb-card-max-w: var(--scb-card-action-max-w);
220
+ }
204
221
 
205
222
  :host([height]) .scb-card,
206
223
  :host([max-height]) .scb-card,
207
- :host([sizing="stretch"]) .scb-card {
224
+ :host([sizing='stretch']) .scb-card {
208
225
  block-size: 100%;
209
226
  }
210
227
 
211
- :host([sizing="stretch"]) {
228
+ :host([sizing='stretch']) {
212
229
  inline-size: 100%;
213
230
  block-size: 100%;
214
231
  max-inline-size: none;
215
232
  }
216
233
 
217
- :host([sizing="content-width"]) {
234
+ :host([sizing='content-width']) {
218
235
  display: inline-block;
219
236
  inline-size: auto;
220
237
  block-size: auto;
221
238
  }
222
- :host([sizing="content-width"]) .scb-card {
239
+ :host([sizing='content-width']) .scb-card {
223
240
  inline-size: max-content;
224
241
  }
225
242
 
226
- :host([sizing="content-height"]) {
243
+ :host([sizing='content-height']) {
227
244
  inline-size: 100%;
228
245
  block-size: auto;
229
246
  max-inline-size: none;
@@ -236,7 +253,9 @@ t.styles = m`
236
253
  display: none;
237
254
  border-radius: var(--scb-card-focus-ring-radius, var(--md-sys-shape-corner-large));
238
255
  }
239
- :host(:focus-within) md-focus-ring { display: block; }
256
+ :host(:focus-within) md-focus-ring {
257
+ display: block;
258
+ }
240
259
 
241
260
  .scb-card {
242
261
  color: var(--md-sys-color-on-surface);
@@ -253,14 +272,26 @@ t.styles = m`
253
272
  }
254
273
 
255
274
  .scb-card:focus,
256
- .scb-card:focus-visible { outline: none; }
275
+ .scb-card:focus-visible {
276
+ outline: none;
277
+ }
257
278
  .scb-card a:focus,
258
- .scb-card a:focus-visible { outline: none; }
279
+ .scb-card a:focus-visible {
280
+ outline: none;
281
+ }
259
282
 
260
- .scb-card.outlined { border: 1px solid var(--md-sys-color-outline-variant); }
261
- .scb-card.filled { background: var(--md-sys-color-surface-dim); }
262
- .scb-card.vertical { flex-direction: column; }
263
- .scb-card.clickable{ cursor: pointer; }
283
+ .scb-card.outlined {
284
+ border: 1px solid var(--md-sys-color-outline-variant);
285
+ }
286
+ .scb-card.filled {
287
+ background: var(--md-sys-color-surface-dim);
288
+ }
289
+ .scb-card.vertical {
290
+ flex-direction: column;
291
+ }
292
+ .scb-card.clickable {
293
+ cursor: pointer;
294
+ }
264
295
 
265
296
  md-ripple {
266
297
  position: absolute;
@@ -291,16 +322,29 @@ t.styles = m`
291
322
  position: absolute;
292
323
  inset: 0;
293
324
  background:
294
- linear-gradient(90deg,
295
- rgba(0,0,0,.06) 25%,
296
- rgba(0,0,0,.12) 37%,
297
- rgba(0,0,0,.06) 63%);
325
+ linear-gradient(
326
+ 90deg,
327
+ rgba(0, 0, 0, 0.06) 25%,
328
+ rgba(0, 0, 0, 0.12) 37%,
329
+ rgba(0, 0, 0, 0.06) 63%
330
+ );
298
331
  animation: scb-card-shimmer 1.2s infinite linear;
299
332
  }
300
- .media.is-loaded::before { content: none; }
301
- @keyframes scb-card-shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
333
+ .media.is-loaded::before {
334
+ content: none;
335
+ }
336
+ @keyframes scb-card-shimmer {
337
+ 0% {
338
+ transform: translateX(-100%);
339
+ }
340
+ 100% {
341
+ transform: translateX(100%);
342
+ }
343
+ }
302
344
 
303
- .full-content { padding: var(--spacing-7) var(--spacing-6); }
345
+ .full-content {
346
+ padding: var(--spacing-7) var(--spacing-6);
347
+ }
304
348
  .top-content {
305
349
  display: flex;
306
350
  flex-direction: column;
@@ -331,8 +375,13 @@ t.styles = m`
331
375
  overflow-wrap: normal;
332
376
  hyphens: auto;
333
377
  }
334
- .header a.title { color: inherit; text-decoration: none; }
335
- .header md-icon { flex: 0 0 auto; }
378
+ .header a.title {
379
+ color: inherit;
380
+ text-decoration: none;
381
+ }
382
+ .header md-icon {
383
+ flex: 0 0 auto;
384
+ }
336
385
 
337
386
  .sub-label {
338
387
  font-size: var(--md-sys-typescale-title-medium-size);
@@ -361,8 +410,12 @@ t.styles = m`
361
410
  column-gap: var(--spacing-6);
362
411
  padding: var(--spacing-6);
363
412
  }
364
- .scb-card.horizontal .media { align-self: flex-start; }
365
- .scb-card.horizontal .media ::slotted(scb-avatar) { margin: 0; }
413
+ .scb-card.horizontal .media {
414
+ align-self: flex-start;
415
+ }
416
+ .scb-card.horizontal .media ::slotted(scb-avatar) {
417
+ margin: 0;
418
+ }
366
419
  .scb-card.horizontal .full-content {
367
420
  align-self: flex-start;
368
421
  padding: 0;
@@ -370,8 +423,12 @@ t.styles = m`
370
423
  min-inline-size: 0;
371
424
  flex: 1 1 auto;
372
425
  }
373
- .scb-card.horizontal .header { align-items: flex-start; }
374
- .scb-card.horizontal .header md-icon { align-self: flex-start; }
426
+ .scb-card.horizontal .header {
427
+ align-items: flex-start;
428
+ }
429
+ .scb-card.horizontal .header md-icon {
430
+ align-self: flex-start;
431
+ }
375
432
 
376
433
  .scb-card.horizontal .media img {
377
434
  margin: 0;
@@ -384,7 +441,7 @@ t.styles = m`
384
441
  block-size: auto;
385
442
  }
386
443
 
387
- :host([sizing="content-width"]) .scb-card.horizontal:has(.media img) .full-content {
444
+ :host([sizing='content-width']) .scb-card.horizontal:has(.media img) .full-content {
388
445
  inline-size: max-content;
389
446
  flex: 0 1 auto;
390
447
  }
@@ -401,13 +458,16 @@ t.styles = m`
401
458
  font-size: var(--md-sys-typescale-title-large-size);
402
459
  vertical-align: middle;
403
460
  }
404
- .comments, .likes {
461
+ .comments,
462
+ .likes {
405
463
  display: flex;
406
464
  align-items: center;
407
465
  gap: var(--spacing-2);
408
466
  }
409
467
 
410
- .scb-card .content.list { margin-top: var(--spacing-7); }
468
+ .scb-card .content.list {
469
+ margin-top: var(--spacing-7);
470
+ }
411
471
 
412
472
  .scb-card .content.actions ::slotted(*) {
413
473
  margin-top: var(--spacing-7);
@@ -416,7 +476,9 @@ t.styles = m`
416
476
  gap: var(--spacing-3);
417
477
  }
418
478
 
419
- .scb-card .content.links { margin-top: var(--spacing-3); }
479
+ .scb-card .content.links {
480
+ margin-top: var(--spacing-3);
481
+ }
420
482
  .scb-card .content.links ::slotted(a),
421
483
  .scb-card .content.links ::slotted(scb-link) {
422
484
  display: block;
@@ -431,13 +493,13 @@ t.styles = m`
431
493
  }
432
494
  `;
433
495
  e([
434
- s({ type: String })
496
+ s({ type: String, reflect: !0 })
435
497
  ], t.prototype, "type", 2);
436
498
  e([
437
- s({ type: String })
499
+ s({ type: String, reflect: !0 })
438
500
  ], t.prototype, "variant", 2);
439
501
  e([
440
- s({ type: String })
502
+ s({ type: String, reflect: !0 })
441
503
  ], t.prototype, "direction", 2);
442
504
  e([
443
505
  s({ type: String, attribute: "media-type" })
@@ -482,28 +544,28 @@ e([
482
544
  s({ type: Boolean, attribute: "media-placeholder" })
483
545
  ], t.prototype, "mediaPlaceholder", 2);
484
546
  e([
485
- s({ type: String, attribute: "card-href" })
547
+ s({ type: String, attribute: "card-href", reflect: !0 })
486
548
  ], t.prototype, "cardHref", 2);
487
549
  e([
488
- s({ type: String })
550
+ s({ type: String, reflect: !0 })
489
551
  ], t.prototype, "title", 2);
490
552
  e([
491
- s({ type: String })
553
+ s({ type: String, reflect: !0 })
492
554
  ], t.prototype, "subtitle", 2);
493
555
  e([
494
- s({ type: String, attribute: "supporting-text" })
556
+ s({ type: String, attribute: "supporting-text", reflect: !0 })
495
557
  ], t.prototype, "supportingText", 2);
496
558
  e([
497
559
  s({ type: Date, reflect: !0 })
498
560
  ], t.prototype, "date", 2);
499
561
  e([
500
- s({ type: String, attribute: "social-comments-text" })
562
+ s({ type: String, attribute: "social-comments-text", reflect: !0 })
501
563
  ], t.prototype, "commentsText", 2);
502
564
  e([
503
565
  s({ type: Number, attribute: "social-comments", reflect: !0 })
504
566
  ], t.prototype, "comments", 2);
505
567
  e([
506
- s({ type: String, attribute: "social-likes-text" })
568
+ s({ type: String, attribute: "social-likes-text", reflect: !0 })
507
569
  ], t.prototype, "likesText", 2);
508
570
  e([
509
571
  s({ type: Number, attribute: "social-likes", reflect: !0 })
@@ -524,7 +586,7 @@ e([
524
586
  s({ type: String, reflect: !0, attribute: "max-height" })
525
587
  ], t.prototype, "maxHeight", 2);
526
588
  t = e([
527
- u("scb-card")
589
+ b("scb-card")
528
590
  ], t);
529
591
  export {
530
592
  t as ScbCard
@@ -5,5 +5,9 @@ export declare class ScbFactCardContent extends LitElement {
5
5
  supportingText: string;
6
6
  static styles: import('lit').CSSResult;
7
7
  render(): import('lit-html').TemplateResult<1>;
8
- private _hasSlotContent;
8
+ }
9
+ declare global {
10
+ interface HTMLElementTagNameMap {
11
+ 'scb-fact-card-content': ScbFactCardContent;
12
+ }
9
13
  }
@@ -1,83 +1,76 @@
1
- import { css as d, LitElement as h, html as a } from "lit";
2
- import { property as c, customElement as g } from "lit/decorators.js";
3
- var u = Object.defineProperty, y = Object.getOwnPropertyDescriptor, n = (r, t, i, e) => {
4
- for (var s = e > 1 ? void 0 : e ? y(t, i) : t, o = r.length - 1, p; o >= 0; o--)
5
- (p = r[o]) && (s = (e ? p(t, i, s) : p(s)) || s);
6
- return e && s && u(t, i, s), s;
1
+ import { css as d, LitElement as g, html as l } from "lit";
2
+ import { property as o, customElement as u } from "lit/decorators.js";
3
+ var y = Object.defineProperty, h = Object.getOwnPropertyDescriptor, r = (c, s, a, i) => {
4
+ for (var t = i > 1 ? void 0 : i ? h(s, a) : s, n = c.length - 1, p; n >= 0; n--)
5
+ (p = c[n]) && (t = (i ? p(s, a, t) : p(t)) || t);
6
+ return i && t && y(s, a, t), t;
7
7
  };
8
- let l = class extends h {
8
+ let e = class extends g {
9
9
  constructor() {
10
10
  super(...arguments), this.title = "", this.subtitle = "", this.supportingText = "";
11
11
  }
12
12
  render() {
13
- return a`
14
- ${this.title ? a`
15
- <div class="label">
16
- ${this.title}
17
- </div>` : ""}
18
- ${this.subtitle ? a`<div class="sub-label">${this.subtitle}</div>` : ""}
19
- ${this.supportingText ? a`<div class="supporting-text">${this.supportingText}</div>` : ""}
20
- <slot @slotchange=${this.requestUpdate}></slot>
21
- ${this._hasSlotContent() ? a`<div class="content links"><slot></slot></div>` : ""}
22
- `;
23
- }
24
- _hasSlotContent() {
25
- const r = this.shadowRoot && this.shadowRoot.querySelector("slot");
26
- if (!r) return !1;
27
- const t = r.assignedNodes({ flatten: !0 });
28
- return t.length > 0 && t.some((i) => {
29
- var e;
30
- return i.nodeType === Node.TEXT_NODE ? (e = i.textContent) == null ? void 0 : e.trim() : !0;
31
- });
13
+ return l`
14
+ ${this.title ? l`<div class="label">${this.title}</div>` : ""}
15
+ ${this.subtitle ? l`<div class="sub-label">${this.subtitle}</div>` : ""}
16
+ ${this.supportingText ? l`<div class="supporting-text">${this.supportingText}</div>` : ""}
17
+
18
+ <div class="content links">
19
+ <slot></slot>
20
+ </div>
21
+ `;
32
22
  }
33
23
  };
34
- l.styles = d`
35
- :host {
36
- display: flex;
37
- flex-direction: column;
38
- gap: var(--spacing-3);
39
- width: 100%;
40
- }
41
- .label{
42
- letter-spacing: var(--md-sys-typescale-headline-small-Tracking);
43
- display: flex;
44
- justify-content: space-between;
45
- align-items: center;
46
- font-size: var(--md-sys-typescale-headline-small-size);
47
- font-weight: var(--weight-bold);
48
- line-height: var(--md-sys-typescale-headline-small-line-height);
49
- letter-spacing: var(--md-sys-typescale-headline-small-Tracking);
50
- }
51
- .sub-label {
52
- font-size: var(--md-sys-typescale-title-medium-size);
53
- font-weight: var(--weight-semibold);
54
- line-height: var(--md-sys-typescale-title-medium-line-height);
55
- letter-spacing: var(--md-sys-typescale-title-medium-tracking);
56
- }
57
- .supporting-text {
58
- font-size: var(--md-sys-typescale-body-large-size);
59
- line-height: var(--md-sys-typescale-body-large-line-height);
60
- letter-spacing: var(--md-sys-typescale-body-large-tracking);
61
- }
62
- .content.links ::slotted(*) {
63
- margin-top: var(--spacing-3);
64
- display: flex;
65
- flex-direction: column;
66
- gap: var(--spacing-3);
67
- }
68
- `;
69
- n([
70
- c({ type: String, attribute: "title" })
71
- ], l.prototype, "title", 2);
72
- n([
73
- c({ type: String, attribute: "subtitle" })
74
- ], l.prototype, "subtitle", 2);
75
- n([
76
- c({ type: String, attribute: "supporting-text" })
77
- ], l.prototype, "supportingText", 2);
78
- l = n([
79
- g("scb-fact-card-content")
80
- ], l);
24
+ e.styles = d`
25
+ :host {
26
+ display: flex;
27
+ flex-direction: column;
28
+ gap: var(--spacing-3);
29
+ width: 100%;
30
+ }
31
+
32
+ .label {
33
+ display: flex;
34
+ justify-content: space-between;
35
+ align-items: center;
36
+ font-size: var(--md-sys-typescale-headline-small-size);
37
+ font-weight: var(--weight-bold);
38
+ line-height: var(--md-sys-typescale-headline-small-line-height);
39
+ letter-spacing: var(--md-sys-typescale-headline-small-tracking);
40
+ }
41
+
42
+ .sub-label {
43
+ font-size: var(--md-sys-typescale-title-medium-size);
44
+ font-weight: var(--weight-semibold);
45
+ line-height: var(--md-sys-typescale-title-medium-line-height);
46
+ letter-spacing: var(--md-sys-typescale-title-medium-tracking);
47
+ }
48
+
49
+ .supporting-text {
50
+ font-size: var(--md-sys-typescale-body-large-size);
51
+ line-height: var(--md-sys-typescale-body-large-line-height);
52
+ letter-spacing: var(--md-sys-typescale-body-large-tracking);
53
+ }
54
+
55
+ .content.links ::slotted(*) {
56
+ margin-top: var(--spacing-3);
57
+ display: flex;
58
+ flex-direction: column;
59
+ gap: var(--spacing-3);
60
+ }
61
+ `;
62
+ r([
63
+ o({ type: String, reflect: !0, attribute: "title" })
64
+ ], e.prototype, "title", 2);
65
+ r([
66
+ o({ type: String, reflect: !0, attribute: "subtitle" })
67
+ ], e.prototype, "subtitle", 2);
68
+ r([
69
+ o({ type: String, reflect: !0, attribute: "supporting-text" })
70
+ ], e.prototype, "supportingText", 2);
71
+ e = r([
72
+ u("scb-fact-card-content")
73
+ ], e);
81
74
  export {
82
- l as ScbFactCardContent
75
+ e as ScbFactCardContent
83
76
  };
@@ -1,5 +1,7 @@
1
1
  import { LitElement, PropertyValues } from 'lit';
2
2
  export declare class ScbKeyFigureCard extends LitElement {
3
+ private static __iconLoaded;
4
+ private static __rippleLoaded;
3
5
  keyfigure: number | string;
4
6
  subtitle: string;
5
7
  supportingText: string;
@@ -14,10 +16,10 @@ export declare class ScbKeyFigureCard extends LitElement {
14
16
  sizing: 'stretch' | 'content-width' | 'content-height';
15
17
  static styles: import('lit').CSSResult;
16
18
  private formatNumber;
19
+ protected firstUpdated(): Promise<void>;
17
20
  render(): import('lit-html').TemplateResult<1>;
18
21
  private __applyInnerSizing;
19
22
  protected updated(changed: PropertyValues): void;
20
- firstUpdated(): void;
21
23
  private __onKeyDown;
22
24
  private __handleHrefNavigation;
23
25
  }
@@ -1,14 +1,12 @@
1
- import { css as p, LitElement as u, html as a } from "lit";
2
- import { property as s, customElement as d } from "lit/decorators.js";
3
- import "@material/web/icon/icon.js";
4
- import "@material/web/ripple/ripple.js";
1
+ import { css as p, LitElement as d, html as a } from "lit";
2
+ import { property as s, customElement as u } from "lit/decorators.js";
5
3
  import "@material/web/focus/md-focus-ring.js";
6
4
  var y = Object.defineProperty, g = Object.getOwnPropertyDescriptor, t = (e, r, n, o) => {
7
5
  for (var l = o > 1 ? void 0 : o ? g(r, n) : r, h = e.length - 1, c; h >= 0; h--)
8
6
  (c = e[h]) && (l = (o ? c(r, n, l) : c(l)) || l);
9
7
  return o && l && y(r, n, l), l;
10
8
  };
11
- let i = class extends u {
9
+ let i = class extends d {
12
10
  constructor() {
13
11
  super(...arguments), this.keyfigure = 0, this.subtitle = "", this.supportingText = "", this.cardHref = "", this.icon = "", this.size = "standard", this.unit = "", this.width = "", this.maxWidth = "", this.height = "", this.maxHeight = "", this.sizing = "stretch", this.__onKeyDown = (e) => {
14
12
  (e.key === "Enter" || e.key === " ") && this.cardHref && (e.preventDefault(), window.location.href = this.cardHref);
@@ -22,6 +20,9 @@ let i = class extends u {
22
20
  const r = Number(e);
23
21
  return Number.isNaN(r) ? String(e) : r.toLocaleString("sv-SE").replace(/\u00A0/g, " ");
24
22
  }
23
+ async firstUpdated() {
24
+ i.__iconLoaded || (await import("@material/web/icon/icon.js"), i.__iconLoaded = !0), i.__rippleLoaded || (await import("@material/web/ripple/ripple.js"), i.__rippleLoaded = !0), this.__applyInnerSizing();
25
+ }
25
26
  render() {
26
27
  const e = !!this.cardHref, r = this.formatNumber(this.keyfigure), n = (this.unit || "").trim(), o = n ? `${r} ${n}` : r;
27
28
  return a`
@@ -66,12 +67,10 @@ let i = class extends u {
66
67
  updated(e) {
67
68
  super.updated(e), e.has("width") && (this.width ? this.style.inlineSize = this.width : this.style.removeProperty("inline-size")), e.has("maxWidth") && (this.maxWidth ? this.style.maxInlineSize = this.maxWidth : this.style.removeProperty("max-inline-size")), e.has("height") && (this.height ? this.style.blockSize = this.height : this.style.removeProperty("block-size")), e.has("maxHeight") && (this.maxHeight ? this.style.maxBlockSize = this.maxHeight : this.style.removeProperty("max-block-size")), (e.has("width") || e.has("height") || e.has("maxHeight") || e.has("sizing")) && this.__applyInnerSizing();
68
69
  }
69
- firstUpdated() {
70
- this.__applyInnerSizing();
71
- }
72
70
  };
71
+ i.__iconLoaded = !1;
72
+ i.__rippleLoaded = !1;
73
73
  i.styles = p`
74
-
75
74
  :host {
76
75
  display: block;
77
76
  box-sizing: border-box;
@@ -89,7 +88,6 @@ i.styles = p`
89
88
  font-feature-settings: "tnum" 0, "pnum" 1;
90
89
  }
91
90
 
92
-
93
91
  :host([sizing="stretch"]) {
94
92
  inline-size: 100%;
95
93
  block-size: 100%;
@@ -158,6 +156,13 @@ i.styles = p`
158
156
  font-weight: var(--weight-semibold);
159
157
  line-height: var(--md-sys-typescale-title-medium-line-height);
160
158
  letter-spacing: var(--md-sys-typescale-title-medium-tracking);
159
+
160
+ white-space: normal;
161
+ word-break: normal;
162
+ overflow-wrap: normal;
163
+ hyphens: auto;
164
+ overflow: visible;
165
+ text-overflow: clip;
161
166
  }
162
167
  .sub-label a { color: inherit; text-decoration: none; }
163
168
 
@@ -165,6 +170,13 @@ i.styles = p`
165
170
  font-size: var(--md-sys-typescale-body-large-size);
166
171
  line-height: var(--md-sys-typescale-body-large-line-height);
167
172
  letter-spacing: var(--md-sys-typescale-body-large-tracking);
173
+
174
+ white-space: normal;
175
+ word-break: normal;
176
+ overflow-wrap: normal;
177
+ hyphens: auto;
178
+ overflow: visible;
179
+ text-overflow: clip;
168
180
  }
169
181
 
170
182
  .scb-keyfigure-card.clickable { cursor: pointer; }
@@ -212,7 +224,7 @@ t([
212
224
  s({ type: String, reflect: !0 })
213
225
  ], i.prototype, "sizing", 2);
214
226
  i = t([
215
- d("scb-keyfigure-card")
227
+ u("scb-keyfigure-card")
216
228
  ], i);
217
229
  export {
218
230
  i as ScbKeyFigureCard
@@ -1,20 +1,34 @@
1
- import { LitElement } from 'lit';
1
+ import { LitElement, PropertyValues } from 'lit';
2
+ type NotificationVariant = 'success' | 'error' | 'warning' | 'info';
3
+ type NotificationDirection = 'horizontal' | 'vertical';
4
+ type NotificationSizing = 'stretch' | 'content-width' | 'content-height';
2
5
  export declare class ScbNotificationCard extends LitElement {
3
- variant: string;
4
- direction: 'horizontal' | 'vertical';
6
+ variant: NotificationVariant;
7
+ direction: NotificationDirection;
5
8
  title: string;
6
9
  subtitle: string;
7
10
  supportingText: string;
8
11
  open: boolean;
9
12
  linkText: string;
10
- linkhref: string;
13
+ linkHref: string;
11
14
  showIcon: boolean;
12
15
  showCloseButton: boolean;
16
+ sizing: NotificationSizing;
17
+ width: string;
18
+ maxWidth: string;
19
+ height: string;
20
+ maxHeight: string;
13
21
  fullHeight: boolean;
14
22
  fullWidth: boolean;
15
23
  static styles: import('lit').CSSResult[];
16
- /** Return icon name for notification variant */
17
24
  private _iconForVariant;
18
25
  private _closeNotification;
26
+ protected updated(changed: PropertyValues): void;
19
27
  render(): import('lit-html').TemplateResult<1>;
20
28
  }
29
+ declare global {
30
+ interface HTMLElementTagNameMap {
31
+ 'scb-notification-card': ScbNotificationCard;
32
+ }
33
+ }
34
+ export {};