scb-wc-test 0.1.1
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/README.md +130 -0
- package/all.js +54 -0
- package/dummy.png +0 -0
- package/index.d.ts +54 -0
- package/index.js +108 -0
- package/mvc/components/all.js +53 -0
- package/mvc/components/scb-accordion/scb-accordion-item.js +194 -0
- package/mvc/components/scb-accordion/scb-accordion.js +5 -0
- package/mvc/components/scb-app-bar/scb-app-bar.js +144 -0
- package/mvc/components/scb-avatar/scb-avatar.js +99 -0
- package/mvc/components/scb-breadcrumb/scb-breadcrumb-item.js +17 -0
- package/mvc/components/scb-breadcrumb/scb-breadcrumb.js +52 -0
- package/mvc/components/scb-button/scb-button.js +121 -0
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +140 -0
- package/mvc/components/scb-card/scb-card.js +256 -0
- package/mvc/components/scb-checkbox/scb-checkbox-group.js +33 -0
- package/mvc/components/scb-checkbox/scb-checkbox.js +99 -0
- package/mvc/components/scb-chips/scb-chip.js +46 -0
- package/mvc/components/scb-dialog/scb-dialog.js +158 -0
- package/mvc/components/scb-divider/scb-divider.js +53 -0
- package/mvc/components/scb-drawer/scb-drawer-item.js +114 -0
- package/mvc/components/scb-drawer/scb-drawer-section.js +19 -0
- package/mvc/components/scb-drawer/scb-drawer.js +79 -0
- package/mvc/components/scb-drawer/scb-sub-drawer.js +10 -0
- package/mvc/components/scb-fact-card/scb-fact-card-content.js +44 -0
- package/mvc/components/scb-fact-card/scb-fact-card.js +66 -0
- package/mvc/components/scb-footer/scb-footer-section.js +3 -0
- package/mvc/components/scb-footer/scb-footer.js +205 -0
- package/mvc/components/scb-grid/scb-grid-item.js +9 -0
- package/mvc/components/scb-grid/scb-grid.js +81 -0
- package/mvc/components/scb-grid/scb-stack.js +16 -0
- package/mvc/components/scb-header/scb-header-drawer-group.js +1 -0
- package/mvc/components/scb-header/scb-header-drawer-item.js +1 -0
- package/mvc/components/scb-header/scb-header-tab.js +1 -0
- package/mvc/components/scb-header/scb-header-utility.js +1 -0
- package/mvc/components/scb-header/scb-header.js +240 -0
- package/mvc/components/scb-icon-button/scb-icon-button.js +95 -0
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +69 -0
- package/mvc/components/scb-link/scb-link.js +31 -0
- package/mvc/components/scb-list/scb-list-item.js +38 -0
- package/mvc/components/scb-list/scb-list.js +10 -0
- package/mvc/components/scb-menu/scb-menu-item.js +44 -0
- package/mvc/components/scb-menu/scb-menu.js +17 -0
- package/mvc/components/scb-menu/scb-sub-menu.js +29 -0
- package/mvc/components/scb-notification/scb-notification.js +120 -0
- package/mvc/components/scb-progress-indicator/scb-progress-indicator.js +84 -0
- package/mvc/components/scb-radio-button/scb-radio-button.js +95 -0
- package/mvc/components/scb-radio-button/scb-radio-group.js +28 -0
- package/mvc/components/scb-search/scb-search.js +211 -0
- package/mvc/components/scb-snackbar/scb-snackbar.js +83 -0
- package/mvc/components/scb-status-pill/scb-status-pill.js +31 -0
- package/mvc/components/scb-switch/scb-switch.js +54 -0
- package/mvc/components/scb-tabs/scb-primary-tab.js +7 -0
- package/mvc/components/scb-tabs/scb-secondary-tab.js +7 -0
- package/mvc/components/scb-tabs/scb-tabs.js +23 -0
- package/mvc/components/scb-textfield/scb-textfield.js +135 -0
- package/mvc/components/scb-toc/scb-toc-item.js +84 -0
- package/mvc/components/scb-toc/scb-toc.js +6 -0
- package/mvc/components/scb-tooltip/scb-tooltip.js +216 -0
- package/mvc/scb-logo.svg +21 -0
- package/mvc/scb-wc-test.css +1 -0
- package/mvc/scb.svg +14 -0
- package/mvc/vendor/preload-helper.js +1 -0
- package/mvc/vendor/vendor-lit.js +1 -0
- package/mvc/vendor/vendor-material.js +764 -0
- package/mvc/vendor/vendor.js +68 -0
- package/package.json +248 -0
- package/scb-accordion/scb-accordion-item.d.ts +37 -0
- package/scb-accordion/scb-accordion-item.js +343 -0
- package/scb-accordion/scb-accordion.d.ts +6 -0
- package/scb-accordion/scb-accordion.js +33 -0
- package/scb-app-bar/scb-app-bar.d.ts +10 -0
- package/scb-app-bar/scb-app-bar.js +192 -0
- package/scb-avatar/scb-avatar.d.ts +30 -0
- package/scb-avatar/scb-avatar.js +169 -0
- package/scb-breadcrumb/scb-breadcrumb-item.d.ts +9 -0
- package/scb-breadcrumb/scb-breadcrumb-item.js +54 -0
- package/scb-breadcrumb/scb-breadcrumb.d.ts +16 -0
- package/scb-breadcrumb/scb-breadcrumb.js +105 -0
- package/scb-button/scb-button.d.ts +26 -0
- package/scb-button/scb-button.js +247 -0
- package/scb-calendar-card/scb-calendar-card.d.ts +20 -0
- package/scb-calendar-card/scb-calendar-card.js +191 -0
- package/scb-card/scb-card.d.ts +24 -0
- package/scb-card/scb-card.js +345 -0
- package/scb-checkbox/scb-checkbox-group.d.ts +17 -0
- package/scb-checkbox/scb-checkbox-group.js +80 -0
- package/scb-checkbox/scb-checkbox.d.ts +20 -0
- package/scb-checkbox/scb-checkbox.js +157 -0
- package/scb-chips/scb-chip.d.ts +24 -0
- package/scb-chips/scb-chip.js +150 -0
- package/scb-dialog/scb-dialog.d.ts +58 -0
- package/scb-dialog/scb-dialog.js +390 -0
- package/scb-divider/scb-divider.d.ts +9 -0
- package/scb-divider/scb-divider.js +85 -0
- package/scb-drawer/scb-drawer-item.d.ts +61 -0
- package/scb-drawer/scb-drawer-item.js +220 -0
- package/scb-drawer/scb-drawer-section.d.ts +7 -0
- package/scb-drawer/scb-drawer-section.js +44 -0
- package/scb-drawer/scb-drawer.d.ts +97 -0
- package/scb-drawer/scb-drawer.js +258 -0
- package/scb-drawer/scb-sub-drawer.d.ts +10 -0
- package/scb-drawer/scb-sub-drawer.js +43 -0
- package/scb-fact-card/scb-fact-card-content.d.ts +10 -0
- package/scb-fact-card/scb-fact-card-content.js +83 -0
- package/scb-fact-card/scb-fact-card.d.ts +15 -0
- package/scb-fact-card/scb-fact-card.js +110 -0
- package/scb-footer/scb-footer-section.d.ts +21 -0
- package/scb-footer/scb-footer-section.js +28 -0
- package/scb-footer/scb-footer.d.ts +27 -0
- package/scb-footer/scb-footer.js +326 -0
- package/scb-grid/scb-grid-item.d.ts +28 -0
- package/scb-grid/scb-grid-item.js +66 -0
- package/scb-grid/scb-grid.d.ts +33 -0
- package/scb-grid/scb-grid.js +152 -0
- package/scb-grid/scb-stack.d.ts +29 -0
- package/scb-grid/scb-stack.js +82 -0
- package/scb-header/scb-header-drawer-group.d.ts +13 -0
- package/scb-header/scb-header-drawer-group.js +28 -0
- package/scb-header/scb-header-drawer-item.d.ts +14 -0
- package/scb-header/scb-header-drawer-item.js +31 -0
- package/scb-header/scb-header-tab.d.ts +13 -0
- package/scb-header/scb-header-tab.js +28 -0
- package/scb-header/scb-header-utility.d.ts +14 -0
- package/scb-header/scb-header-utility.js +31 -0
- package/scb-header/scb-header.d.ts +105 -0
- package/scb-header/scb-header.js +618 -0
- package/scb-icon-button/scb-icon-button.d.ts +31 -0
- package/scb-icon-button/scb-icon-button.js +208 -0
- package/scb-keyfigure-card/scb-keyfigure-card.d.ts +13 -0
- package/scb-keyfigure-card/scb-keyfigure-card.js +119 -0
- package/scb-link/scb-link.d.ts +17 -0
- package/scb-link/scb-link.js +74 -0
- package/scb-list/scb-list-item.d.ts +32 -0
- package/scb-list/scb-list-item.js +144 -0
- package/scb-list/scb-list.d.ts +8 -0
- package/scb-list/scb-list.js +39 -0
- package/scb-logo.svg +21 -0
- package/scb-menu/scb-menu-item.d.ts +22 -0
- package/scb-menu/scb-menu-item.js +107 -0
- package/scb-menu/scb-menu.d.ts +21 -0
- package/scb-menu/scb-menu.js +98 -0
- package/scb-menu/scb-sub-menu.d.ts +12 -0
- package/scb-menu/scb-sub-menu.js +69 -0
- package/scb-notification/scb-notification.d.ts +16 -0
- package/scb-notification/scb-notification.js +187 -0
- package/scb-progress-indicator/scb-progress-indicator.d.ts +11 -0
- package/scb-progress-indicator/scb-progress-indicator.js +122 -0
- package/scb-radio-button/scb-radio-button.d.ts +19 -0
- package/scb-radio-button/scb-radio-button.js +176 -0
- package/scb-radio-button/scb-radio-group.d.ts +20 -0
- package/scb-radio-button/scb-radio-group.js +81 -0
- package/scb-search/scb-search.d.ts +45 -0
- package/scb-search/scb-search.js +410 -0
- package/scb-snackbar/scb-snackbar.d.ts +17 -0
- package/scb-snackbar/scb-snackbar.js +140 -0
- package/scb-status-pill/scb-status-pill.d.ts +9 -0
- package/scb-status-pill/scb-status-pill.js +62 -0
- package/scb-switch/scb-switch.d.ts +21 -0
- package/scb-switch/scb-switch.js +111 -0
- package/scb-tabs/scb-primary-tab.d.ts +17 -0
- package/scb-tabs/scb-primary-tab.js +93 -0
- package/scb-tabs/scb-secondary-tab.d.ts +17 -0
- package/scb-tabs/scb-secondary-tab.js +97 -0
- package/scb-tabs/scb-tabs.d.ts +10 -0
- package/scb-tabs/scb-tabs.js +66 -0
- package/scb-textfield/scb-textfield.d.ts +41 -0
- package/scb-textfield/scb-textfield.js +258 -0
- package/scb-toc/scb-toc-item.d.ts +21 -0
- package/scb-toc/scb-toc-item.js +196 -0
- package/scb-toc/scb-toc.d.ts +6 -0
- package/scb-toc/scb-toc.js +27 -0
- package/scb-tooltip/scb-tooltip.d.ts +32 -0
- package/scb-tooltip/scb-tooltip.js +329 -0
- package/scb-wc-test.bundle.js +5429 -0
- package/scb-wc-test.css +1 -0
- package/scb-wc-test.d.ts +106 -0
- package/scb.svg +14 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
export declare class ScbFactCardContent extends LitElement {
|
|
4
|
+
label: string;
|
|
5
|
+
subLabel: string;
|
|
6
|
+
supportingText: string;
|
|
7
|
+
static styles: import('lit').CSSResult;
|
|
8
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
9
|
+
private _hasSlotContent;
|
|
10
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { css as d, LitElement as h, html as r } from "lit";
|
|
2
|
+
import { property as c, customElement as g } from "lit/decorators.js";
|
|
3
|
+
var u = Object.defineProperty, y = Object.getOwnPropertyDescriptor, n = (a, e, l, t) => {
|
|
4
|
+
for (var s = t > 1 ? void 0 : t ? y(e, l) : e, o = a.length - 1, p; o >= 0; o--)
|
|
5
|
+
(p = a[o]) && (s = (t ? p(e, l, s) : p(s)) || s);
|
|
6
|
+
return t && s && u(e, l, s), s;
|
|
7
|
+
};
|
|
8
|
+
let i = class extends h {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments), this.label = "", this.subLabel = "", this.supportingText = "";
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return r`
|
|
14
|
+
${this.label ? r`
|
|
15
|
+
<div class="label">
|
|
16
|
+
${this.label}
|
|
17
|
+
</div>` : ""}
|
|
18
|
+
${this.subLabel ? r`<div class="sub-label">${this.subLabel}</div>` : ""}
|
|
19
|
+
${this.supportingText ? r`<div class="supporting-text">${this.supportingText}</div>` : ""}
|
|
20
|
+
<slot @slotchange=${this.requestUpdate}></slot>
|
|
21
|
+
${this._hasSlotContent() ? r`<div class="content links"><slot></slot></div>` : ""}
|
|
22
|
+
`;
|
|
23
|
+
}
|
|
24
|
+
_hasSlotContent() {
|
|
25
|
+
const a = this.shadowRoot && this.shadowRoot.querySelector("slot");
|
|
26
|
+
if (!a) return !1;
|
|
27
|
+
const e = a.assignedNodes({ flatten: !0 });
|
|
28
|
+
return e.length > 0 && e.some((l) => {
|
|
29
|
+
var t;
|
|
30
|
+
return l.nodeType === Node.TEXT_NODE ? (t = l.textContent) == null ? void 0 : t.trim() : !0;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
i.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 })
|
|
71
|
+
], i.prototype, "label", 2);
|
|
72
|
+
n([
|
|
73
|
+
c({ type: String, attribute: "sub-label" })
|
|
74
|
+
], i.prototype, "subLabel", 2);
|
|
75
|
+
n([
|
|
76
|
+
c({ type: String, attribute: "supporting-text" })
|
|
77
|
+
], i.prototype, "supportingText", 2);
|
|
78
|
+
i = n([
|
|
79
|
+
g("scb-fact-card-content")
|
|
80
|
+
], i);
|
|
81
|
+
export {
|
|
82
|
+
i as ScbFactCardContent
|
|
83
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Enkel faktakort-komponent för SCB-designsystemet
|
|
5
|
+
*/
|
|
6
|
+
export declare class ScbFactCard extends LitElement {
|
|
7
|
+
variant: 'filled' | 'outlined';
|
|
8
|
+
label: string;
|
|
9
|
+
subLabel: string;
|
|
10
|
+
supportingText: string;
|
|
11
|
+
icon: string;
|
|
12
|
+
showCloseButton: boolean;
|
|
13
|
+
static styles: import('lit').CSSResult;
|
|
14
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { css as d, LitElement as u, html as l } from "lit";
|
|
2
|
+
import { property as s, customElement as b } from "lit/decorators.js";
|
|
3
|
+
import "@material/web/icon/icon.js";
|
|
4
|
+
import "@material/web/ripple/ripple.js";
|
|
5
|
+
import "../scb-icon-button/scb-icon-button.js";
|
|
6
|
+
import "./scb-fact-card-content.js";
|
|
7
|
+
var m = Object.defineProperty, h = Object.getOwnPropertyDescriptor, r = (i, e, c, a) => {
|
|
8
|
+
for (var o = a > 1 ? void 0 : a ? h(e, c) : e, n = i.length - 1, p; n >= 0; n--)
|
|
9
|
+
(p = i[n]) && (o = (a ? p(e, c, o) : p(o)) || o);
|
|
10
|
+
return a && o && m(e, c, o), o;
|
|
11
|
+
};
|
|
12
|
+
let t = class extends u {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments), this.variant = "filled", this.label = "", this.subLabel = "", this.supportingText = "", this.icon = "", this.showCloseButton = !0;
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
const i = this.variant === "outlined" ? "outlined" : "filled";
|
|
18
|
+
return l`
|
|
19
|
+
${this.icon ? l`<div class="icon-wrapper ${i}"><md-icon>${this.icon}</md-icon></div>` : ""}
|
|
20
|
+
<div class="scb-fact-card ${i} ${this.icon ? "no-topleft-radius" : ""} ${this.showCloseButton ? "has-close" : ""}">
|
|
21
|
+
${this.showCloseButton ? l`<scb-icon-button variant="standard" icon="close"></scb-icon-button>` : ""}
|
|
22
|
+
<div class="content">
|
|
23
|
+
<slot></slot>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
`;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
t.styles = d`
|
|
30
|
+
:host{ --scb-card-min-w: 580px; }
|
|
31
|
+
:host {
|
|
32
|
+
max-width: var(--scb-card-min-w);
|
|
33
|
+
width: 100%;
|
|
34
|
+
display: block;
|
|
35
|
+
position: relative;
|
|
36
|
+
}
|
|
37
|
+
.scb-fact-card {
|
|
38
|
+
color: var(--md-sys-color-on-surface);
|
|
39
|
+
max-width: var(--scb-card-min-w);
|
|
40
|
+
position: relative;
|
|
41
|
+
border-radius: var(--md-sys-shape-corner-large);
|
|
42
|
+
background: var(--md-sys-color-surface-dim);
|
|
43
|
+
padding: var(--spacing-7);
|
|
44
|
+
}
|
|
45
|
+
.scb-fact-card.has-close {
|
|
46
|
+
padding-right: 80px;
|
|
47
|
+
}
|
|
48
|
+
.scb-fact-card.no-topleft-radius {
|
|
49
|
+
border-top-left-radius: 0 ;
|
|
50
|
+
margin-top: 40px;
|
|
51
|
+
}
|
|
52
|
+
.scb-fact-card.outlined {
|
|
53
|
+
border: 1px solid var(--md-sys-color-outline);
|
|
54
|
+
background: var(--md-sys-color-surface);
|
|
55
|
+
}
|
|
56
|
+
.icon-wrapper {
|
|
57
|
+
top: -40px;
|
|
58
|
+
position: absolute;
|
|
59
|
+
z-index: 1;
|
|
60
|
+
padding: 16px 24px;
|
|
61
|
+
padding-bottom: 0;
|
|
62
|
+
width: fit-content;
|
|
63
|
+
border-radius: 1000px 1000px 0 0 / 1000px 1000px 0 0; /* halvmåne upptill */
|
|
64
|
+
background: var(--md-sys-color-surface-dim);
|
|
65
|
+
line-height: 0;
|
|
66
|
+
}
|
|
67
|
+
.icon-wrapper.outlined {
|
|
68
|
+
border: 1px solid var(--md-sys-color-outline);
|
|
69
|
+
border-bottom: none;
|
|
70
|
+
background: var(--md-sys-color-surface);
|
|
71
|
+
}
|
|
72
|
+
scb-icon-button {
|
|
73
|
+
position: absolute;
|
|
74
|
+
right: 12px;
|
|
75
|
+
top: 12px;
|
|
76
|
+
}
|
|
77
|
+
.scb-fact-card.clickable {
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
}
|
|
80
|
+
.content {
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
gap: var(--spacing-8);
|
|
84
|
+
width: 100%;
|
|
85
|
+
}
|
|
86
|
+
`;
|
|
87
|
+
r([
|
|
88
|
+
s({ type: String })
|
|
89
|
+
], t.prototype, "variant", 2);
|
|
90
|
+
r([
|
|
91
|
+
s({ type: String })
|
|
92
|
+
], t.prototype, "label", 2);
|
|
93
|
+
r([
|
|
94
|
+
s({ type: String, attribute: "sub-label" })
|
|
95
|
+
], t.prototype, "subLabel", 2);
|
|
96
|
+
r([
|
|
97
|
+
s({ type: String, attribute: "supporting-text" })
|
|
98
|
+
], t.prototype, "supportingText", 2);
|
|
99
|
+
r([
|
|
100
|
+
s({ type: String })
|
|
101
|
+
], t.prototype, "icon", 2);
|
|
102
|
+
r([
|
|
103
|
+
s({ type: Boolean, attribute: "show-close-button" })
|
|
104
|
+
], t.prototype, "showCloseButton", 2);
|
|
105
|
+
t = r([
|
|
106
|
+
b("scb-fact-card")
|
|
107
|
+
], t);
|
|
108
|
+
export {
|
|
109
|
+
t as ScbFactCard
|
|
110
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Lätt wrapper för en länkkolumn i <scb-footer>.
|
|
5
|
+
* Används endast som datakälla - renderas inte visuellt.
|
|
6
|
+
*
|
|
7
|
+
* <scb-footer-section title="Rubrik">
|
|
8
|
+
* <scb-link href="#">Länk 1</scb-link>
|
|
9
|
+
* <scb-link href="#">Länk 2</scb-link>
|
|
10
|
+
* </scb-footer-section>
|
|
11
|
+
*/
|
|
12
|
+
export declare class ScbFooterSection extends LitElement {
|
|
13
|
+
title: string;
|
|
14
|
+
static styles: import('lit').CSSResult;
|
|
15
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
16
|
+
}
|
|
17
|
+
declare global {
|
|
18
|
+
interface HTMLElementTagNameMap {
|
|
19
|
+
'scb-footer-section': ScbFooterSection;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { css as i, LitElement as f, html as m } from "lit";
|
|
2
|
+
import { property as u, customElement as v } from "lit/decorators.js";
|
|
3
|
+
var _ = Object.defineProperty, y = Object.getOwnPropertyDescriptor, c = (n, e, s, r) => {
|
|
4
|
+
for (var t = r > 1 ? void 0 : r ? y(e, s) : e, l = n.length - 1, p; l >= 0; l--)
|
|
5
|
+
(p = n[l]) && (t = (r ? p(e, s, t) : p(t)) || t);
|
|
6
|
+
return r && t && _(e, s, t), t;
|
|
7
|
+
};
|
|
8
|
+
let o = class extends f {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments), this.title = "";
|
|
11
|
+
}
|
|
12
|
+
// Renderar inget (children behövs bara för att läsas av <scb-footer>)
|
|
13
|
+
render() {
|
|
14
|
+
return m`<slot></slot>`;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
o.styles = i`
|
|
18
|
+
:host { display: none; }
|
|
19
|
+
`;
|
|
20
|
+
c([
|
|
21
|
+
u({ type: String, reflect: !0 })
|
|
22
|
+
], o.prototype, "title", 2);
|
|
23
|
+
o = c([
|
|
24
|
+
v("scb-footer-section")
|
|
25
|
+
], o);
|
|
26
|
+
export {
|
|
27
|
+
o as ScbFooterSection
|
|
28
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
|
|
3
|
+
type FooterLink = {
|
|
4
|
+
label: string;
|
|
5
|
+
href: string;
|
|
6
|
+
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
7
|
+
};
|
|
8
|
+
type FooterSection = {
|
|
9
|
+
title: string;
|
|
10
|
+
links: FooterLink[];
|
|
11
|
+
};
|
|
12
|
+
export declare class ScbFooter extends LitElement {
|
|
13
|
+
#private;
|
|
14
|
+
maxWidth: string;
|
|
15
|
+
sections: FooterSection[];
|
|
16
|
+
description: string;
|
|
17
|
+
static styles: import('lit').CSSResult;
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
disconnectedCallback(): void;
|
|
20
|
+
render(): TemplateResult;
|
|
21
|
+
}
|
|
22
|
+
declare global {
|
|
23
|
+
interface HTMLElementTagNameMap {
|
|
24
|
+
'scb-footer': ScbFooter;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { css as A, LitElement as H, html as v } from "lit";
|
|
2
|
+
import { property as y, customElement as L } from "lit/decorators.js";
|
|
3
|
+
import "../scb-link/scb-link.js";
|
|
4
|
+
import "../scb-grid/scb-grid.js";
|
|
5
|
+
import "../scb-grid/scb-grid-item.js";
|
|
6
|
+
import "./scb-footer-section.js";
|
|
7
|
+
var T = Object.defineProperty, P = Object.getOwnPropertyDescriptor, O = (t) => {
|
|
8
|
+
throw TypeError(t);
|
|
9
|
+
}, x = (t, e, i, a) => {
|
|
10
|
+
for (var r = a > 1 ? void 0 : a ? P(e, i) : e, s = t.length - 1, g; s >= 0; s--)
|
|
11
|
+
(g = t[s]) && (r = (a ? g(e, i, r) : g(r)) || r);
|
|
12
|
+
return a && r && T(e, i, r), r;
|
|
13
|
+
}, w = (t, e, i) => e.has(t) || O("Cannot " + i), c = (t, e, i) => (w(t, e, "read from private field"), i ? i.call(t) : e.get(t)), d = (t, e, i) => e.has(t) ? O("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), o = (t, e, i, a) => (w(t, e, "write to private field"), e.set(t, i), i), l = (t, e, i) => (w(t, e, "access private method"), i), p, f, h, u, n, M, C, N, k, _, E, W, S;
|
|
14
|
+
let m = class extends H {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments), d(this, n), this.maxWidth = "1440px", this.sections = [], this.description = "Statistikmyndigheten SCB förser samhället med statistik för beslutsfattande, debatt och forskning.", d(this, p, null), d(this, f, ""), d(this, h), d(this, u, !1), d(this, _, 8);
|
|
17
|
+
}
|
|
18
|
+
/* === Livscykel: initiera harvest före första render (ingen varning) === */
|
|
19
|
+
connectedCallback() {
|
|
20
|
+
super.connectedCallback(), l(this, n, k).call(this, !0), l(this, n, M).call(this);
|
|
21
|
+
}
|
|
22
|
+
disconnectedCallback() {
|
|
23
|
+
var t;
|
|
24
|
+
super.disconnectedCallback(), (t = c(this, h)) == null || t.disconnect();
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
const t = c(this, n, N);
|
|
28
|
+
return v`
|
|
29
|
+
<footer class="outer" role="contentinfo" style=${`--scb-footer-max-width:${this.maxWidth}`}>
|
|
30
|
+
<nav aria-label="Sidfot med länkar">
|
|
31
|
+
<scb-grid
|
|
32
|
+
.colsCompact=${4}
|
|
33
|
+
.colsMedium=${8}
|
|
34
|
+
.colsExpanded=${8}
|
|
35
|
+
padding-block="0"
|
|
36
|
+
.maxWidth=${this.maxWidth}
|
|
37
|
+
>
|
|
38
|
+
${l(this, n, E).call(this, t)}
|
|
39
|
+
</scb-grid>
|
|
40
|
+
</nav>
|
|
41
|
+
|
|
42
|
+
<div class="brand">
|
|
43
|
+
<div class="brand-inner">
|
|
44
|
+
<svg class="logo" viewBox="0 0 48 54" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
|
|
45
|
+
<g clip-path="url(#clip0_4974_83818)">
|
|
46
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M25.6527 6.07812C25.6527 5.15909 24.9076 4.41482 23.9877 4.41482C23.0677 4.41482 22.3226 5.15909 22.3226 6.07812V48.0391C22.3226 48.9601 23.0677 49.7061 23.9877 49.7061C24.9076 49.7061 25.6527 48.9601 25.6527 48.0391V32.9153C25.6527 32.8056 25.744 32.7163 25.8527 32.7163H31.3245C31.4342 32.7163 31.5245 32.8056 31.5245 32.9153V48.1711C31.5245 51.3899 28.1496 54 23.9877 54C19.8241 54 16.4501 51.3899 16.4501 48.1711V5.82708C16.4501 2.6103 19.8241 0 23.9877 0C28.1496 0 31.5245 2.6103 31.5245 5.82708V20.8893C31.5245 21.0009 31.4342 21.0883 31.3245 21.0883H25.8527C25.744 21.0883 25.6527 21.0009 25.6527 20.8893V6.07812Z" fill="white"/>
|
|
47
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.198901 10.8446C-0.152687 13.293 -0.0290117 17.3078 0.49751 19.5627C1.07611 22.0203 4.41288 26.9878 5.91609 29.2948C7.42127 31.5999 9.42869 34.0073 9.39892 37.2185V44.9097C9.39892 45.8287 8.65375 46.5748 7.73382 46.5748C6.81659 46.5748 6.0715 45.8287 6.0715 44.9097V33.1217C6.0715 33.012 5.9803 32.9208 5.86868 32.9208H0.39893C0.287311 32.9208 0.198901 33.012 0.198901 33.1217V45.2613C0.198901 48.4798 3.57282 51.0901 7.73382 51.0901C11.8975 51.0901 15.2714 48.4798 15.2714 45.2613V37.2185C15.2463 31.7023 13.7412 30.8985 11.7877 27.5906C10.3886 25.2148 6.94682 20.3143 6.37003 17.8566C5.8417 15.6018 5.86491 12.9916 6.0715 10.6194C6.0715 9.70039 6.81659 8.95432 7.73382 8.95432C8.65375 8.95432 9.39892 9.70039 9.39892 10.6194V21.1032C9.39892 21.2129 9.48913 21.3022 9.60166 21.3022H15.0706C15.183 21.3022 15.2714 21.2129 15.2714 21.1032V10.8446C15.2714 7.62408 11.8975 5.01575 7.73382 5.01575C3.57282 5.01575 0.198901 7.62408 0.198901 10.8446Z" fill="white"/>
|
|
48
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M32.8911 5.46411H41.2883C44.7561 5.46411 47.5674 8.27534 47.5674 11.7414V20.547C47.5674 23.0158 45.9488 25.0995 43.7161 25.8139V25.933C45.9488 26.6456 47.5674 28.7312 47.5674 31.2018V44.6438C47.5674 47.6988 45.0873 50.1768 42.0344 50.1768L32.8911 50.1823C32.7786 50.1823 32.6892 50.0911 32.6892 49.9832V5.66324C32.6892 5.55539 32.7786 5.46411 32.8911 5.46411ZM38.7636 9.83067C38.6502 9.83067 38.5608 9.92179 38.5608 10.0316V23.9255C38.5608 24.039 38.6502 24.1284 38.7636 24.1284H39.5898C40.6948 24.1284 41.5916 23.2297 41.5916 22.1246V11.8343C41.5916 10.7293 40.6948 9.83067 39.5898 9.83067H38.7636ZM38.7636 28.5432C38.6502 28.5432 38.5608 28.6325 38.5608 28.7423V45.7971C38.5608 45.9088 38.6502 46 38.7636 46H39.7514C40.8584 46 41.7534 45.1014 41.7534 43.9962V30.5469C41.7534 29.4381 40.8584 28.5432 39.7514 28.5432H38.7636Z" fill="white"/>
|
|
49
|
+
</g>
|
|
50
|
+
<defs><clipPath id="clip0_4974_83818"><rect width="48" height="54" fill="white"/></clipPath></defs>
|
|
51
|
+
</svg>
|
|
52
|
+
|
|
53
|
+
<p class="desc">${this.description}</p>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</footer>
|
|
57
|
+
`;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
p = /* @__PURE__ */ new WeakMap();
|
|
61
|
+
f = /* @__PURE__ */ new WeakMap();
|
|
62
|
+
h = /* @__PURE__ */ new WeakMap();
|
|
63
|
+
u = /* @__PURE__ */ new WeakMap();
|
|
64
|
+
n = /* @__PURE__ */ new WeakSet();
|
|
65
|
+
M = function() {
|
|
66
|
+
var t;
|
|
67
|
+
(t = c(this, h)) == null || t.disconnect(), o(this, h, new MutationObserver((e) => {
|
|
68
|
+
for (const i of e) {
|
|
69
|
+
if (i.type === "childList") {
|
|
70
|
+
const a = [...i.addedNodes].some((s) => s.tagName === "SCB-FOOTER-SECTION" || s.tagName === "SCB-LINK"), r = [...i.removedNodes].some((s) => s.tagName === "SCB-FOOTER-SECTION" || s.tagName === "SCB-LINK");
|
|
71
|
+
if (a || r) {
|
|
72
|
+
l(this, n, C).call(this);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (i.type === "attributes" && (i.target.tagName === "SCB-FOOTER-SECTION" || i.target.tagName === "SCB-LINK")) {
|
|
77
|
+
l(this, n, C).call(this);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
})), c(this, h).observe(this, {
|
|
82
|
+
subtree: !0,
|
|
83
|
+
childList: !0,
|
|
84
|
+
attributes: !0,
|
|
85
|
+
attributeFilter: ["title", "href", "target"]
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
C = function() {
|
|
89
|
+
c(this, u) || (o(this, u, !0), queueMicrotask(() => {
|
|
90
|
+
o(this, u, !1), l(this, n, k).call(this, !1);
|
|
91
|
+
}));
|
|
92
|
+
};
|
|
93
|
+
N = function() {
|
|
94
|
+
return c(this, p) ?? this.sections ?? [];
|
|
95
|
+
};
|
|
96
|
+
k = function(t = !1) {
|
|
97
|
+
const e = Array.from(this.querySelectorAll("scb-footer-section"));
|
|
98
|
+
if (!e.length) {
|
|
99
|
+
c(this, p) !== null && (o(this, p, null), o(this, f, ""), t || this.requestUpdate());
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const i = e.map((r) => {
|
|
103
|
+
const s = (r.getAttribute("title") || "").trim(), g = Array.from(r.querySelectorAll("scb-link")).map((b) => {
|
|
104
|
+
const B = (b.getAttribute("href") || "").trim(), $ = b.getAttribute("target"), V = { label: (b.textContent || "").trim(), href: B };
|
|
105
|
+
return $ && (V.target = $), V;
|
|
106
|
+
});
|
|
107
|
+
return { title: s, links: g };
|
|
108
|
+
}), a = JSON.stringify(i);
|
|
109
|
+
a !== c(this, f) && (o(this, f, a), o(this, p, i), t || this.requestUpdate());
|
|
110
|
+
};
|
|
111
|
+
_ = /* @__PURE__ */ new WeakMap();
|
|
112
|
+
E = function(t) {
|
|
113
|
+
const e = [], a = t.length;
|
|
114
|
+
if (a > 0 && a < 4)
|
|
115
|
+
return e.push(v`
|
|
116
|
+
<scb-grid-item
|
|
117
|
+
col-span-compact="4"
|
|
118
|
+
col-span-medium="8"
|
|
119
|
+
col-span-expanded="${c(this, _)}"
|
|
120
|
+
>
|
|
121
|
+
<div class="center-row">
|
|
122
|
+
${t.map((r, s) => l(this, n, S).call(this, r, s, !0))}
|
|
123
|
+
</div>
|
|
124
|
+
</scb-grid-item>
|
|
125
|
+
`), e;
|
|
126
|
+
for (let r = 0; r < a; r++) e.push(l(this, n, W).call(this, t[r], r));
|
|
127
|
+
return e;
|
|
128
|
+
};
|
|
129
|
+
W = function(t, e) {
|
|
130
|
+
return v`
|
|
131
|
+
<scb-grid-item
|
|
132
|
+
col-span-compact="4"
|
|
133
|
+
col-span-medium="4"
|
|
134
|
+
col-span-expanded="2"
|
|
135
|
+
>
|
|
136
|
+
${l(this, n, S).call(this, t, e, !1)}
|
|
137
|
+
</scb-grid-item>
|
|
138
|
+
`;
|
|
139
|
+
};
|
|
140
|
+
S = function(t, e, i) {
|
|
141
|
+
return v`
|
|
142
|
+
<section class="group ${i ? "group--centered" : ""}" aria-labelledby=${`scb-footer-sec-${e}`}>
|
|
143
|
+
<h3 id=${`scb-footer-sec-${e}`} class="title">${t.title}</h3>
|
|
144
|
+
<ul>
|
|
145
|
+
${t.links.map((a) => v`
|
|
146
|
+
<li>
|
|
147
|
+
<scb-link .href=${a.href} .target=${a.target ?? void 0}>${a.label}</scb-link>
|
|
148
|
+
</li>
|
|
149
|
+
`)}
|
|
150
|
+
</ul>
|
|
151
|
+
</section>
|
|
152
|
+
`;
|
|
153
|
+
};
|
|
154
|
+
m.styles = A`
|
|
155
|
+
:host {
|
|
156
|
+
display: block;
|
|
157
|
+
color: var(--p-100);
|
|
158
|
+
background: var(--scb-footer-bg, var(--p-20));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Yttre behållare */
|
|
162
|
+
.outer {
|
|
163
|
+
display: flex;
|
|
164
|
+
flex-direction: column;
|
|
165
|
+
align-items: center;
|
|
166
|
+
padding: var(--spacing-10, 48px) 0 var(--spacing-5, 16px);
|
|
167
|
+
gap: var(--spacing-4, 12px);
|
|
168
|
+
align-self: stretch;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
nav { width: 100%; }
|
|
172
|
+
|
|
173
|
+
/* Grid */
|
|
174
|
+
scb-grid {
|
|
175
|
+
--scb-grid-padding-inline: var(--spacing-8, 32px);
|
|
176
|
+
--scb-grid-row-gap: var(--spacing-9, 40px);
|
|
177
|
+
--scb-grid-column-gap: var(--spacing-9, 40px);
|
|
178
|
+
--scb-grid-gap: var(--spacing-9, 40px) var(--spacing-9, 40px);
|
|
179
|
+
--scb-grid-max-width: var(--scb-footer-max-width, 1440px);
|
|
180
|
+
}
|
|
181
|
+
/* ↑ lite mer luft mellan rader när sektioner staplas */
|
|
182
|
+
@media (max-width: 839.98px) {
|
|
183
|
+
scb-grid { --scb-grid-row-gap: var(--spacing-11, 64px); }
|
|
184
|
+
}
|
|
185
|
+
@media (min-width: 840px) {
|
|
186
|
+
scb-grid { --scb-grid-row-gap: var(--spacing-11, 64px); }
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* Kolumn (grupp) */
|
|
190
|
+
.group {
|
|
191
|
+
display: flex;
|
|
192
|
+
flex-direction: column;
|
|
193
|
+
gap: var(--spacing-7, 24px);
|
|
194
|
+
min-width: 248px;
|
|
195
|
+
flex: 1 0 0;
|
|
196
|
+
align-self: stretch;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* Grupp i centrerad rad: innehållsbredd i desktop för visuell centrering */
|
|
200
|
+
@media (min-width: 840px) {
|
|
201
|
+
.group--centered {
|
|
202
|
+
flex: 0 1 auto;
|
|
203
|
+
min-width: 248px;
|
|
204
|
+
max-width: 420px;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* Radbehållare för centrerat läge (desktop) */
|
|
209
|
+
@media (min-width: 840px) {
|
|
210
|
+
.center-row {
|
|
211
|
+
display: flex;
|
|
212
|
+
align-items: start;
|
|
213
|
+
justify-content: center;
|
|
214
|
+
gap: var(--spacing-9, 40px);
|
|
215
|
+
width: 100%;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Extra topmarginal för grupper som hamnar på senare/undre rader i compact/medium */
|
|
220
|
+
@media (max-width: 599px) {
|
|
221
|
+
scb-grid-item:nth-child(n+2) .group { margin-top: var(--spacing-7, 24px); }
|
|
222
|
+
}
|
|
223
|
+
@media (min-width: 600px) and (max-width: 839px) {
|
|
224
|
+
scb-grid-item:nth-child(n+3) .group { margin-top: var(--spacing-7, 24px); }
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Rubrik (Title/Medium) */
|
|
228
|
+
.title {
|
|
229
|
+
margin: 0;
|
|
230
|
+
color: var(--p-100);
|
|
231
|
+
font-family: var(--brand-font);
|
|
232
|
+
font-size: var(--md-sys-typescale-title-medium-size);
|
|
233
|
+
line-height: var(--md-sys-typescale-title-medium-line-height);
|
|
234
|
+
letter-spacing: var(--md-sys-typescale-title-medium-tracking);
|
|
235
|
+
font-weight: var(--weight-semibold);
|
|
236
|
+
align-self: stretch;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* Länklista */
|
|
240
|
+
ul {
|
|
241
|
+
list-style: none;
|
|
242
|
+
margin: 0;
|
|
243
|
+
padding: 0;
|
|
244
|
+
display: flex;
|
|
245
|
+
flex-direction: column;
|
|
246
|
+
gap: var(--spacing-5, 16px);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/* Länkar i fot */
|
|
250
|
+
scb-link {
|
|
251
|
+
--scb-link-color: var(--p-100);
|
|
252
|
+
--scb-link-visited-color: var(--p-100);
|
|
253
|
+
}
|
|
254
|
+
scb-link::part(anchor) {
|
|
255
|
+
font-family: var(--brand-font);
|
|
256
|
+
font-size: var(--md-sys-typescale-body-medium-size);
|
|
257
|
+
line-height: var(--md-sys-typescale-body-medium-line-height);
|
|
258
|
+
font-weight: var(--weight-regular);
|
|
259
|
+
letter-spacing: var(--md-sys-typescale-body-medium-tracking, -0.15px);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* Brand-block */
|
|
263
|
+
.brand {
|
|
264
|
+
display: flex;
|
|
265
|
+
flex-direction: column;
|
|
266
|
+
align-items: center;
|
|
267
|
+
align-self: stretch;
|
|
268
|
+
padding: var(--spacing-9, 40px) var(--spacing-8, 32px);
|
|
269
|
+
gap: var(--spacing-5, 16px);
|
|
270
|
+
}
|
|
271
|
+
.brand-inner {
|
|
272
|
+
width: 100%;
|
|
273
|
+
max-width: var(--scb-footer-max-width, 1440px);
|
|
274
|
+
display: flex;
|
|
275
|
+
flex-direction: column;
|
|
276
|
+
align-items: center;
|
|
277
|
+
gap: var(--spacing-5, 16px);
|
|
278
|
+
margin-inline: auto;
|
|
279
|
+
}
|
|
280
|
+
.logo { width: 48px; height: 54px; display: block; }
|
|
281
|
+
|
|
282
|
+
/* Slogan/beskrivning: max 312 (mobil), 376 (≥600px). Bryter alltid tjusigt. */
|
|
283
|
+
.desc {
|
|
284
|
+
margin: 0;
|
|
285
|
+
text-align: center;
|
|
286
|
+
opacity: .9;
|
|
287
|
+
font-family: var(--brand-font);
|
|
288
|
+
font-size: var(--md-sys-typescale-body-small-size);
|
|
289
|
+
line-height: var(--md-sys-typescale-body-small-line-height);
|
|
290
|
+
font-weight: var(--weight-regular);
|
|
291
|
+
letter-spacing: var(--md-sys-typescale-body-small-tracking, -0.1px);
|
|
292
|
+
color: var(--p-100);
|
|
293
|
+
width: min(100%, 312px);
|
|
294
|
+
overflow-wrap: anywhere;
|
|
295
|
+
}
|
|
296
|
+
@media (min-width: 600px) { .desc { width: min(100%, 376px); } }
|
|
297
|
+
|
|
298
|
+
.spacer { display: none; }
|
|
299
|
+
@media (min-width: 840px) { .spacer { display: block; } }
|
|
300
|
+
`;
|
|
301
|
+
x([
|
|
302
|
+
y({
|
|
303
|
+
type: String,
|
|
304
|
+
attribute: "max-width",
|
|
305
|
+
reflect: !0,
|
|
306
|
+
converter: {
|
|
307
|
+
fromAttribute: (t) => {
|
|
308
|
+
if (t == null) return "1440px";
|
|
309
|
+
const e = t.trim();
|
|
310
|
+
return e === "" ? "1440px" : /^\d+$/.test(e) ? `${e}px` : e;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
})
|
|
314
|
+
], m.prototype, "maxWidth", 2);
|
|
315
|
+
x([
|
|
316
|
+
y({ type: Array })
|
|
317
|
+
], m.prototype, "sections", 2);
|
|
318
|
+
x([
|
|
319
|
+
y({ type: String })
|
|
320
|
+
], m.prototype, "description", 2);
|
|
321
|
+
m = x([
|
|
322
|
+
L("scb-footer")
|
|
323
|
+
], m);
|
|
324
|
+
export {
|
|
325
|
+
m as ScbFooter
|
|
326
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
<scb-grid-item>
|
|
5
|
+
Styr enskilda celler i <scb-grid>.
|
|
6
|
+
- Span-attribut (reflectas som CSS-variabler) → läses av <scb-grid>
|
|
7
|
+
- Per-item justering: align/justify (align-self/justify-self)
|
|
8
|
+
- fit (width: fit-content)
|
|
9
|
+
*/
|
|
10
|
+
export declare class ScbGridItem extends LitElement {
|
|
11
|
+
#private;
|
|
12
|
+
colSpan?: number;
|
|
13
|
+
colSpanCompact?: number;
|
|
14
|
+
colSpanMedium?: number;
|
|
15
|
+
colSpanExpanded?: number;
|
|
16
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
17
|
+
justify?: 'start' | 'center' | 'end' | 'stretch';
|
|
18
|
+
fit: boolean;
|
|
19
|
+
static styles: import('lit').CSSResult;
|
|
20
|
+
protected firstUpdated(): void;
|
|
21
|
+
protected updated(): void;
|
|
22
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
23
|
+
}
|
|
24
|
+
declare global {
|
|
25
|
+
interface HTMLElementTagNameMap {
|
|
26
|
+
'scb-grid-item': ScbGridItem;
|
|
27
|
+
}
|
|
28
|
+
}
|