scb-wc-test 0.1.104 → 0.1.106
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/mvc/components/scb-accordion/scb-accordion.js +8 -2
- package/mvc/components/scb-avatar/scb-avatar.js +19 -10
- package/mvc/components/scb-breadcrumb/scb-breadcrumb-item.js +2 -3
- package/mvc/components/scb-breadcrumb/scb-breadcrumb.js +13 -7
- package/mvc/components/scb-button/scb-button.js +34 -32
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +13 -11
- package/mvc/components/scb-card/scb-card.js +44 -41
- package/mvc/components/scb-checkbox/scb-checkbox-group.js +15 -13
- package/mvc/components/scb-checkbox/scb-checkbox.js +6 -6
- package/mvc/components/scb-chip/scb-chip.js +27 -7
- package/mvc/components/scb-divider/scb-divider.js +41 -15
- package/mvc/components/scb-fact-card/scb-fact-card.js +37 -18
- package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +71 -43
- package/mvc/components/scb-icon-button/scb-icon-button.js +15 -10
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +6 -4
- package/mvc/components/scb-list/scb-list.js +3 -3
- package/mvc/components/scb-notification-card/scb-notification-card.js +5 -5
- package/mvc/components/scb-pagination/scb-pagination.js +165 -107
- package/mvc/components/scb-radio-button/scb-radio-group.js +22 -11
- package/mvc/components/scb-search/scb-search.js +84 -32
- package/mvc/components/scb-segmented-button/scb-segmented-button.js +3 -2
- package/mvc/components/scb-select/scb-select-option.js +3 -3
- package/mvc/components/scb-select/scb-select.js +3 -3
- package/mvc/components/scb-status-pill/scb-status-pill.js +17 -13
- package/mvc/components/scb-stepper/scb-stepper.js +32 -29
- package/mvc/components/scb-switch/scb-switch.js +11 -8
- package/mvc/components/scb-tabs/scb-tabs.js +22 -19
- package/mvc/components/scb-textfield/scb-textfield.js +14 -10
- package/mvc/components/scb-toc/scb-toc.js +6 -3
- package/mvc/components/scb-viz/scb-viz.js +188 -178
- package/package.json +2 -2
- package/scb-accordion/scb-accordion.d.ts +13 -0
- package/scb-accordion/scb-accordion.js +53 -21
- package/scb-avatar/scb-avatar.d.ts +6 -0
- package/scb-avatar/scb-avatar.js +96 -61
- package/scb-breadcrumb/scb-breadcrumb-item.js +8 -9
- package/scb-breadcrumb/scb-breadcrumb.d.ts +6 -0
- package/scb-breadcrumb/scb-breadcrumb.js +61 -30
- package/scb-button/scb-button.d.ts +10 -0
- package/scb-button/scb-button.js +89 -65
- package/scb-calendar-card/scb-calendar-card.d.ts +5 -0
- package/scb-calendar-card/scb-calendar-card.js +79 -55
- package/scb-card/scb-card.d.ts +5 -0
- package/scb-card/scb-card.js +165 -140
- package/scb-checkbox/scb-checkbox-group.d.ts +3 -1
- package/scb-checkbox/scb-checkbox-group.js +59 -40
- package/scb-checkbox/scb-checkbox.d.ts +11 -0
- package/scb-checkbox/scb-checkbox.js +78 -56
- package/scb-chip/scb-chip.d.ts +24 -0
- package/scb-chip/scb-chip.js +137 -65
- package/scb-divider/scb-divider.d.ts +14 -0
- package/scb-divider/scb-divider.js +91 -43
- package/scb-fact-card/scb-fact-card.d.ts +10 -0
- package/scb-fact-card/scb-fact-card.js +135 -94
- package/scb-horizontal-scroller/scb-horizontal-scroller.d.ts +10 -0
- package/scb-horizontal-scroller/scb-horizontal-scroller.js +179 -120
- package/scb-icon-button/scb-icon-button.d.ts +6 -1
- package/scb-icon-button/scb-icon-button.js +81 -59
- package/scb-keyfigure-card/scb-keyfigure-card.d.ts +10 -0
- package/scb-keyfigure-card/scb-keyfigure-card.js +76 -52
- package/scb-list/scb-list.d.ts +7 -1
- package/scb-list/scb-list.js +62 -40
- package/scb-notification-card/scb-notification-card.d.ts +5 -0
- package/scb-notification-card/scb-notification-card.js +56 -39
- package/scb-pagination/scb-pagination.d.ts +12 -1
- package/scb-pagination/scb-pagination.js +235 -147
- package/scb-radio-button/scb-radio-group.d.ts +14 -3
- package/scb-radio-button/scb-radio-group.js +120 -67
- package/scb-search/scb-search.d.ts +15 -2
- package/scb-search/scb-search.js +152 -69
- package/scb-segmented-button/scb-segmented-button.d.ts +41 -4
- package/scb-segmented-button/scb-segmented-button.js +145 -61
- package/scb-select/scb-select-option.js +3 -3
- package/scb-select/scb-select.js +26 -26
- package/scb-status-pill/scb-status-pill.d.ts +12 -1
- package/scb-status-pill/scb-status-pill.js +51 -27
- package/scb-stepper/scb-stepper.d.ts +11 -3
- package/scb-stepper/scb-stepper.js +134 -101
- package/scb-switch/scb-switch.d.ts +21 -2
- package/scb-switch/scb-switch.js +97 -45
- package/scb-tabs/scb-tabs.d.ts +8 -0
- package/scb-tabs/scb-tabs.js +74 -44
- package/scb-textfield/scb-textfield.d.ts +7 -0
- package/scb-textfield/scb-textfield.js +43 -16
- package/scb-toc/scb-toc.d.ts +10 -1
- package/scb-toc/scb-toc.js +49 -18
- package/scb-viz/scb-viz.d.ts +10 -3
- package/scb-viz/scb-viz.js +278 -236
- package/scb-wc-test.bundle.js +1177 -896
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
1
|
+
import { css as h, LitElement as d, html as r } from "lit";
|
|
2
|
+
import { property as o, customElement as f } from "lit/decorators.js";
|
|
3
3
|
import "@material/web/icon/icon.js";
|
|
4
4
|
import "@material/web/focus/md-focus-ring.js";
|
|
5
5
|
import "../scb-icon-button/scb-icon-button.js";
|
|
6
|
-
var m = Object.defineProperty, g = Object.getOwnPropertyDescriptor, i = (
|
|
7
|
-
for (var
|
|
8
|
-
(
|
|
9
|
-
return a &&
|
|
6
|
+
var m = Object.defineProperty, g = Object.getOwnPropertyDescriptor, i = (e, n, l, a) => {
|
|
7
|
+
for (var s = a > 1 ? void 0 : a ? g(n, l) : n, c = e.length - 1, p; c >= 0; c--)
|
|
8
|
+
(p = e[c]) && (s = (a ? p(n, l, s) : p(s)) || s);
|
|
9
|
+
return a && s && m(n, l, s), s;
|
|
10
10
|
};
|
|
11
11
|
let t = class extends d {
|
|
12
12
|
constructor() {
|
|
13
|
-
super(...arguments), this.variant = "success", this.direction = "horizontal", this.title = "", this.subtitle = "", this.supportingText = "", this.open = !1, this.linkText = "", this.linkHref = "#", this.showIcon = !1, this.showCloseButton = !1, this.sizing = "stretch", this.width = "", this.maxWidth = "", this.height = "", this.maxHeight = "", this.fullHeight = !1, this.fullWidth = !1, this._closeNotification = () => {
|
|
13
|
+
super(...arguments), this.variant = "success", this.direction = "horizontal", this.title = "", this.subtitle = "", this.supportingText = "", this.open = !1, this.linkText = "", this.linkHref = "#", this.showIcon = !1, this.showCloseButton = !1, this.sizing = "stretch", this.width = "", this.maxWidth = "", this.height = "", this.maxHeight = "", this.fullHeight = !1, this.fullWidth = !1, this.spacing = "", this.spacingTop = "", this.spacingBottom = "", this._closeNotification = () => {
|
|
14
14
|
this.open = !1;
|
|
15
|
-
const
|
|
15
|
+
const e = new CustomEvent("close", {
|
|
16
16
|
detail: { open: this.open },
|
|
17
17
|
bubbles: !0,
|
|
18
18
|
composed: !0
|
|
19
19
|
});
|
|
20
|
-
this.dispatchEvent(
|
|
20
|
+
this.dispatchEvent(e);
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
_iconForVariant() {
|
|
@@ -33,12 +33,20 @@ let t = class extends d {
|
|
|
33
33
|
return "info";
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
__resolveSpacingToken(e) {
|
|
37
|
+
const n = (e ?? "").trim();
|
|
38
|
+
return n ? /^(?:[0-9]|1[0-4])$/.test(n) ? `var(--spacing-${n})` : n : "";
|
|
39
|
+
}
|
|
40
|
+
__applySpacing() {
|
|
41
|
+
const e = this.__resolveSpacingToken(this.spacingTop || this.spacing), n = this.__resolveSpacingToken(this.spacingBottom || this.spacing);
|
|
42
|
+
e ? this.style.marginBlockStart = e : this.style.removeProperty("margin-block-start"), n ? this.style.marginBlockEnd = n : this.style.removeProperty("margin-block-end");
|
|
43
|
+
}
|
|
44
|
+
updated(e) {
|
|
45
|
+
super.updated(e), e.has("width") && (this.width && this.width.trim() !== "" ? this.style.inlineSize = this.width : this.style.removeProperty("inline-size")), e.has("maxWidth") && (this.maxWidth && this.maxWidth.trim() !== "" ? this.style.maxInlineSize = this.maxWidth : this.style.removeProperty("max-inline-size")), e.has("height") && (this.height && this.height.trim() !== "" ? this.style.blockSize = this.height : this.style.removeProperty("block-size")), e.has("maxHeight") && (this.maxHeight && this.maxHeight.trim() !== "" ? this.style.maxBlockSize = this.maxHeight : this.style.removeProperty("max-block-size")), (e.has("spacing") || e.has("spacingTop") || e.has("spacingBottom")) && this.__applySpacing();
|
|
38
46
|
}
|
|
39
47
|
render() {
|
|
40
|
-
const
|
|
41
|
-
return
|
|
48
|
+
const e = this.direction === "vertical" ? "vertical" : "horizontal", n = this.variant === "success" ? "--_icon-color: var(--md-sys-color-on-success-container);" : this.variant === "error" ? "--_icon-color: var(--md-sys-color-on-error-container);" : this.variant === "warning" ? "--_icon-color: var(--md-sys-color-on-warning-container);" : "--_icon-color: var(--md-sys-color-on-info-container);";
|
|
49
|
+
return r`
|
|
42
50
|
<div
|
|
43
51
|
class="notification"
|
|
44
52
|
type=${this.variant}
|
|
@@ -46,8 +54,8 @@ let t = class extends d {
|
|
|
46
54
|
aria-live="assertive"
|
|
47
55
|
aria-atomic="true"
|
|
48
56
|
>
|
|
49
|
-
<div class="notification-main ${
|
|
50
|
-
${this.showIcon ?
|
|
57
|
+
<div class="notification-main ${e}">
|
|
58
|
+
${this.showIcon ? r`
|
|
51
59
|
<div class="notification-leading-icon">
|
|
52
60
|
<md-icon aria-hidden="true">
|
|
53
61
|
${this._iconForVariant()}
|
|
@@ -55,14 +63,14 @@ let t = class extends d {
|
|
|
55
63
|
</div>
|
|
56
64
|
` : null}
|
|
57
65
|
<div class="notification-text-container">
|
|
58
|
-
${this.title ?
|
|
59
|
-
${this.subtitle ?
|
|
66
|
+
${this.title ? r`<div class="notification-title">${this.title}</div>` : null}
|
|
67
|
+
${this.subtitle ? r`<div class="notification-subtitle">
|
|
60
68
|
${this.subtitle}
|
|
61
69
|
</div>` : null}
|
|
62
|
-
${this.supportingText ?
|
|
70
|
+
${this.supportingText ? r`<div class="notification-text">
|
|
63
71
|
${this.supportingText}
|
|
64
72
|
</div>` : null}
|
|
65
|
-
${this.linkText ?
|
|
73
|
+
${this.linkText ? r`
|
|
66
74
|
<div class="notification-footer">
|
|
67
75
|
<a class="footer-link" href="${this.linkHref}">
|
|
68
76
|
${this.linkText}
|
|
@@ -71,12 +79,12 @@ let t = class extends d {
|
|
|
71
79
|
` : null}
|
|
72
80
|
</div>
|
|
73
81
|
</div>
|
|
74
|
-
${this.showCloseButton ?
|
|
82
|
+
${this.showCloseButton ? r`
|
|
75
83
|
<div class="notification-close-button">
|
|
76
84
|
<scb-icon-button
|
|
77
85
|
aria-label="Stäng meddelande"
|
|
78
86
|
icon="close"
|
|
79
|
-
style=${
|
|
87
|
+
style=${n}
|
|
80
88
|
@click=${this._closeNotification}
|
|
81
89
|
>
|
|
82
90
|
</scb-icon-button>
|
|
@@ -88,7 +96,7 @@ let t = class extends d {
|
|
|
88
96
|
}
|
|
89
97
|
};
|
|
90
98
|
t.styles = [
|
|
91
|
-
|
|
99
|
+
h`
|
|
92
100
|
:host {
|
|
93
101
|
display: block;
|
|
94
102
|
position: relative;
|
|
@@ -341,56 +349,65 @@ t.styles = [
|
|
|
341
349
|
`
|
|
342
350
|
];
|
|
343
351
|
i([
|
|
344
|
-
|
|
352
|
+
o({ type: String })
|
|
345
353
|
], t.prototype, "variant", 2);
|
|
346
354
|
i([
|
|
347
|
-
|
|
355
|
+
o({ type: String, reflect: !0 })
|
|
348
356
|
], t.prototype, "direction", 2);
|
|
349
357
|
i([
|
|
350
|
-
|
|
358
|
+
o({ type: String })
|
|
351
359
|
], t.prototype, "title", 2);
|
|
352
360
|
i([
|
|
353
|
-
|
|
361
|
+
o({ type: String })
|
|
354
362
|
], t.prototype, "subtitle", 2);
|
|
355
363
|
i([
|
|
356
|
-
|
|
364
|
+
o({ type: String, attribute: "supporting-text" })
|
|
357
365
|
], t.prototype, "supportingText", 2);
|
|
358
366
|
i([
|
|
359
|
-
|
|
367
|
+
o({ type: Boolean, reflect: !0 })
|
|
360
368
|
], t.prototype, "open", 2);
|
|
361
369
|
i([
|
|
362
|
-
|
|
370
|
+
o({ type: String, attribute: "link-text" })
|
|
363
371
|
], t.prototype, "linkText", 2);
|
|
364
372
|
i([
|
|
365
|
-
|
|
373
|
+
o({ type: String, attribute: "link-href" })
|
|
366
374
|
], t.prototype, "linkHref", 2);
|
|
367
375
|
i([
|
|
368
|
-
|
|
376
|
+
o({ type: Boolean, attribute: "show-icon" })
|
|
369
377
|
], t.prototype, "showIcon", 2);
|
|
370
378
|
i([
|
|
371
|
-
|
|
379
|
+
o({ type: Boolean, attribute: "show-close-button" })
|
|
372
380
|
], t.prototype, "showCloseButton", 2);
|
|
373
381
|
i([
|
|
374
|
-
|
|
382
|
+
o({ type: String, reflect: !0 })
|
|
375
383
|
], t.prototype, "sizing", 2);
|
|
376
384
|
i([
|
|
377
|
-
|
|
385
|
+
o({ type: String, reflect: !0 })
|
|
378
386
|
], t.prototype, "width", 2);
|
|
379
387
|
i([
|
|
380
|
-
|
|
388
|
+
o({ type: String, reflect: !0, attribute: "max-width" })
|
|
381
389
|
], t.prototype, "maxWidth", 2);
|
|
382
390
|
i([
|
|
383
|
-
|
|
391
|
+
o({ type: String, reflect: !0 })
|
|
384
392
|
], t.prototype, "height", 2);
|
|
385
393
|
i([
|
|
386
|
-
|
|
394
|
+
o({ type: String, reflect: !0, attribute: "max-height" })
|
|
387
395
|
], t.prototype, "maxHeight", 2);
|
|
388
396
|
i([
|
|
389
|
-
|
|
397
|
+
o({ type: Boolean, reflect: !0, attribute: "full-height" })
|
|
390
398
|
], t.prototype, "fullHeight", 2);
|
|
391
399
|
i([
|
|
392
|
-
|
|
400
|
+
o({ type: Boolean, reflect: !0, attribute: "full-width" })
|
|
393
401
|
], t.prototype, "fullWidth", 2);
|
|
402
|
+
i([
|
|
403
|
+
o({ type: String })
|
|
404
|
+
], t.prototype, "spacing", 2);
|
|
405
|
+
i([
|
|
406
|
+
o({ type: String, attribute: "spacing-top" })
|
|
407
|
+
], t.prototype, "spacingTop", 2);
|
|
408
|
+
i([
|
|
409
|
+
o({ type: String, attribute: "spacing-bottom" })
|
|
410
|
+
], t.prototype, "spacingBottom", 2);
|
|
394
411
|
t = i([
|
|
395
412
|
f("scb-notification-card")
|
|
396
413
|
], t);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
2
|
export declare class ScbPagination extends LitElement {
|
|
3
3
|
variant: 'icon-text' | 'icon';
|
|
4
4
|
page: number;
|
|
@@ -8,11 +8,22 @@ export declare class ScbPagination extends LitElement {
|
|
|
8
8
|
currentAriaLabel: string;
|
|
9
9
|
pagingNumberAriaLabel: string;
|
|
10
10
|
isNarrow: boolean;
|
|
11
|
+
spacing: string;
|
|
12
|
+
spacingTop: string;
|
|
13
|
+
spacingBottom: string;
|
|
11
14
|
static styles: import('lit').CSSResult[];
|
|
12
15
|
private _prevPage;
|
|
13
16
|
private _nextPage;
|
|
14
17
|
connectedCallback(): void;
|
|
15
18
|
disconnectedCallback(): void;
|
|
16
19
|
private _onResize;
|
|
20
|
+
private __resolveSpacingToken;
|
|
21
|
+
private __applySpacing;
|
|
22
|
+
protected updated(changed: PropertyValues): void;
|
|
17
23
|
render(): import('lit-html').TemplateResult<1> | null;
|
|
18
24
|
}
|
|
25
|
+
declare global {
|
|
26
|
+
interface HTMLElementTagNameMap {
|
|
27
|
+
'scb-pagination': ScbPagination;
|
|
28
|
+
}
|
|
29
|
+
}
|