scb-wc-test 0.1.105 → 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-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-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 +1171 -890
|
@@ -1,64 +1,141 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
1
|
+
import { css as p, LitElement as f, html as v } from "lit";
|
|
2
|
+
import { property as o, customElement as b } from "lit/decorators.js";
|
|
3
3
|
import "./scb-segmented-item.js";
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
var g = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, m = (t) => {
|
|
5
|
+
throw TypeError(t);
|
|
6
|
+
}, l = (t, e, s, i) => {
|
|
7
|
+
for (var r = i > 1 ? void 0 : i ? _(e, s) : e, a = t.length - 1, d; a >= 0; a--)
|
|
8
|
+
(d = t[a]) && (r = (i ? d(e, s, r) : d(r)) || r);
|
|
9
|
+
return i && r && g(e, s, r), r;
|
|
10
|
+
}, y = (t, e, s) => e.has(t) || m("Cannot " + s), S = (t, e, s) => e.has(t) ? m("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), c = (t, e, s) => (y(t, e, "access private method"), s), u, h;
|
|
11
|
+
let n = class extends f {
|
|
10
12
|
constructor() {
|
|
11
|
-
super(
|
|
13
|
+
super(), S(this, u), this._internals = null, this.variant = "single-select", this.value = "", this.values = [], this.disabled = !1, this.name = "", this.spacing = "", this._form = null, this._formResetHandler = null, this._initialValue = "", this._initialValues = [], "attachInternals" in this && (this._internals = this.attachInternals());
|
|
12
14
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (!e || this.disabled || e.hasAttribute("disabled")) return;
|
|
18
|
-
const t = e.getAttribute("value") || "";
|
|
19
|
-
t && (this.variant === "multi-select" ? (this.values.indexOf(t) === -1 ? this.values = [...this.values, t] : this.values = this.values.filter((o) => o !== t), this.dispatchEvent(new CustomEvent("change", { detail: { values: this.values }, bubbles: !0, composed: !0 })), this.updateSegments()) : t !== this.value && (this.value = t, this.dispatchEvent(new CustomEvent("change", { detail: { value: t }, bubbles: !0, composed: !0 })), this.updateSegments()));
|
|
15
|
+
connectedCallback() {
|
|
16
|
+
super.connectedCallback(), this._form = this.closest("form"), this._form && (this._formResetHandler = () => {
|
|
17
|
+
this.value = this._initialValue, this.values = Array.isArray(this._initialValues) ? [...this._initialValues] : [], this.updateSegments(), this._syncFormValue();
|
|
18
|
+
}, this._form.addEventListener("reset", this._formResetHandler, !0));
|
|
20
19
|
}
|
|
21
|
-
|
|
20
|
+
disconnectedCallback() {
|
|
21
|
+
this._form && this._formResetHandler && this._form.removeEventListener("reset", this._formResetHandler, !0), super.disconnectedCallback();
|
|
22
|
+
}
|
|
23
|
+
firstUpdated() {
|
|
22
24
|
var e;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
this._initialValue = this.value, this._initialValues = Array.isArray(this.values) ? [...this.values] : [], this.updateSegments();
|
|
26
|
+
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot");
|
|
27
|
+
t && (t.addEventListener("click", (s) => this.onSlotClick(s)), t.addEventListener(
|
|
28
|
+
"focus",
|
|
29
|
+
() => {
|
|
30
|
+
this.dispatchEvent(
|
|
31
|
+
new CustomEvent("focus", { detail: {}, bubbles: !0, composed: !0 })
|
|
32
|
+
);
|
|
33
|
+
},
|
|
34
|
+
!0
|
|
35
|
+
), t.addEventListener(
|
|
36
|
+
"blur",
|
|
37
|
+
() => {
|
|
38
|
+
this.dispatchEvent(
|
|
39
|
+
new CustomEvent("blur", { detail: {}, bubbles: !0, composed: !0 })
|
|
40
|
+
);
|
|
41
|
+
},
|
|
42
|
+
!0
|
|
43
|
+
), t.addEventListener("keydown", (s) => {
|
|
44
|
+
if (s.code === "Space" || s.code === "Enter" || s.code === "NumpadEnter") {
|
|
45
|
+
const i = s.target;
|
|
46
|
+
if (i && i.closest) {
|
|
47
|
+
const r = i.closest("scb-segmented-item");
|
|
48
|
+
r && !r.hasAttribute("disabled") && !this.disabled && (this.onSlotClick(s), s.preventDefault());
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
})), this._syncFormValue(), c(this, u, h).call(this);
|
|
52
|
+
}
|
|
53
|
+
updated(t) {
|
|
54
|
+
super.updated(t), this.updateSegments(), (t.has("value") || t.has("values") || t.has("disabled") || t.has("variant") || t.has("name")) && this._syncFormValue(), t.has("spacing") && c(this, u, h).call(this);
|
|
55
|
+
}
|
|
56
|
+
onSlotClick(t) {
|
|
57
|
+
let e = t.target;
|
|
58
|
+
if (!e || !e.closest) return;
|
|
59
|
+
const s = e.closest("scb-segmented-item");
|
|
60
|
+
if (!s || this.disabled || s.hasAttribute("disabled")) return;
|
|
61
|
+
const i = s.getAttribute("value") || "";
|
|
62
|
+
i && (this.variant === "multi-select" ? (this.values.indexOf(i) === -1 ? this.values = [...this.values, i] : this.values = this.values.filter((a) => a !== i), this.dispatchEvent(
|
|
63
|
+
new CustomEvent("change", {
|
|
64
|
+
detail: { values: this.values },
|
|
65
|
+
bubbles: !0,
|
|
66
|
+
composed: !0
|
|
67
|
+
})
|
|
68
|
+
), this.updateSegments()) : i !== this.value && (this.value = i, this.dispatchEvent(
|
|
69
|
+
new CustomEvent("change", { detail: { value: i }, bubbles: !0, composed: !0 })
|
|
70
|
+
), this.updateSegments()));
|
|
71
|
+
}
|
|
72
|
+
updateSegments() {
|
|
73
|
+
var s;
|
|
74
|
+
const t = (s = this.shadowRoot) == null ? void 0 : s.querySelector("slot");
|
|
75
|
+
if (!t) return;
|
|
76
|
+
t.assignedElements().forEach((i) => {
|
|
77
|
+
if (i.tagName === "SCB-SEGMENTED-ITEM") {
|
|
78
|
+
const r = i.getAttribute("value") || "";
|
|
79
|
+
if (r) {
|
|
80
|
+
let a = !1;
|
|
81
|
+
this.variant === "multi-select" ? a = !!this.values && this.values.includes(r) : a = r === this.value, i.setAttribute("aria-pressed", a ? "true" : "false"), a ? i.setAttribute("selected", "true") : i.removeAttribute("selected");
|
|
31
82
|
}
|
|
32
|
-
this.disabled &&
|
|
83
|
+
this.disabled && i.setAttribute("disabled", "true");
|
|
33
84
|
}
|
|
34
85
|
});
|
|
35
86
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Gör så att native formulär kan sätta disabled på kontrollen.
|
|
89
|
+
*/
|
|
90
|
+
formDisabledCallback(t) {
|
|
91
|
+
this.disabled = t;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Synkar value/values → FormData via ElementInternals.
|
|
95
|
+
* single-select: FormData.get(name) → string
|
|
96
|
+
* multi-select: FormData.getAll(name) → string[]
|
|
97
|
+
*/
|
|
98
|
+
_syncFormValue() {
|
|
99
|
+
if (this._internals) {
|
|
100
|
+
if (this.disabled || !this.name) {
|
|
101
|
+
this._internals.setFormValue(null);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (this.variant === "multi-select") {
|
|
105
|
+
if (!this.values || this.values.length === 0) {
|
|
106
|
+
this._internals.setFormValue(null);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const t = new FormData();
|
|
110
|
+
for (const e of this.values)
|
|
111
|
+
t.append(this.name, e);
|
|
112
|
+
this._internals.setFormValue(t);
|
|
113
|
+
} else {
|
|
114
|
+
if (!this.value) {
|
|
115
|
+
this._internals.setFormValue(null);
|
|
116
|
+
return;
|
|
50
117
|
}
|
|
118
|
+
this._internals.setFormValue(this.value);
|
|
51
119
|
}
|
|
52
|
-
}
|
|
120
|
+
}
|
|
53
121
|
}
|
|
54
|
-
|
|
55
|
-
|
|
122
|
+
mapSpacingToken(t) {
|
|
123
|
+
if (!t) return;
|
|
124
|
+
const e = String(t).trim();
|
|
125
|
+
if (e)
|
|
126
|
+
return /^\d+$/.test(e) ? `var(--spacing-${Math.max(0, Math.min(14, parseInt(e, 10)))})` : e;
|
|
56
127
|
}
|
|
57
128
|
render() {
|
|
58
|
-
return
|
|
129
|
+
return v`<slot></slot>`;
|
|
59
130
|
}
|
|
60
131
|
};
|
|
61
|
-
|
|
132
|
+
u = /* @__PURE__ */ new WeakSet();
|
|
133
|
+
h = function() {
|
|
134
|
+
const t = this.mapSpacingToken(this.spacing);
|
|
135
|
+
t ? this.style.setProperty("--scb-segmented-button-spacing-block", t) : this.style.removeProperty("--scb-segmented-button-spacing-block");
|
|
136
|
+
};
|
|
137
|
+
n.formAssociated = !0;
|
|
138
|
+
n.styles = p`
|
|
62
139
|
:host {
|
|
63
140
|
--scb-segmented-button-width: 100%;
|
|
64
141
|
--scb-segmented-button-height: 48px;
|
|
@@ -68,6 +145,7 @@ l.styles = u`
|
|
|
68
145
|
grid-auto-flow: column;
|
|
69
146
|
grid-auto-columns: 1fr;
|
|
70
147
|
font-family: var(--brand, Inter);
|
|
148
|
+
margin-block: var(--scb-segmented-button-spacing-block, 0);
|
|
71
149
|
}
|
|
72
150
|
/* Border radius only on first and last button */
|
|
73
151
|
::slotted(scb-segmented-item:first-child .segmented-item),
|
|
@@ -86,21 +164,27 @@ l.styles = u`
|
|
|
86
164
|
border-left: 1px solid var(--md-sys-color-outline);
|
|
87
165
|
}
|
|
88
166
|
`;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
],
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
],
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
],
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
],
|
|
101
|
-
l
|
|
102
|
-
|
|
103
|
-
],
|
|
167
|
+
l([
|
|
168
|
+
o({ type: String, reflect: !0 })
|
|
169
|
+
], n.prototype, "variant", 2);
|
|
170
|
+
l([
|
|
171
|
+
o({ type: String, reflect: !0 })
|
|
172
|
+
], n.prototype, "value", 2);
|
|
173
|
+
l([
|
|
174
|
+
o({ type: Array })
|
|
175
|
+
], n.prototype, "values", 2);
|
|
176
|
+
l([
|
|
177
|
+
o({ type: Boolean, reflect: !0 })
|
|
178
|
+
], n.prototype, "disabled", 2);
|
|
179
|
+
l([
|
|
180
|
+
o({ type: String, reflect: !0 })
|
|
181
|
+
], n.prototype, "name", 2);
|
|
182
|
+
l([
|
|
183
|
+
o({ type: String, reflect: !0 })
|
|
184
|
+
], n.prototype, "spacing", 2);
|
|
185
|
+
n = l([
|
|
186
|
+
b("scb-segmented-button")
|
|
187
|
+
], n);
|
|
104
188
|
export {
|
|
105
|
-
|
|
189
|
+
n as ScbSegmentedButton
|
|
106
190
|
};
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
2
|
export declare class ScbStatusPill extends LitElement {
|
|
3
3
|
status: string;
|
|
4
4
|
label: string;
|
|
5
5
|
showIcon: boolean;
|
|
6
|
+
spacing: string;
|
|
7
|
+
spacingTop: string;
|
|
8
|
+
spacingBottom: string;
|
|
6
9
|
static styles: import('lit').CSSResult;
|
|
10
|
+
private __resolveSpacingToken;
|
|
11
|
+
private __applySpacing;
|
|
12
|
+
protected updated(changed: PropertyValues): void;
|
|
7
13
|
render(): import('lit-html').TemplateResult<1>;
|
|
8
14
|
}
|
|
15
|
+
declare global {
|
|
16
|
+
interface HTMLElementTagNameMap {
|
|
17
|
+
'scb-status-pill': ScbStatusPill;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,19 +1,30 @@
|
|
|
1
|
-
import { css as m, LitElement as
|
|
2
|
-
import { property as
|
|
1
|
+
import { css as m, LitElement as g, html as a } from "lit";
|
|
2
|
+
import { property as i, customElement as h } from "lit/decorators.js";
|
|
3
3
|
import "@material/web/icon/icon.js";
|
|
4
|
-
var
|
|
5
|
-
for (var
|
|
6
|
-
(
|
|
7
|
-
return
|
|
4
|
+
var u = Object.defineProperty, y = Object.getOwnPropertyDescriptor, o = (t, s, c, n) => {
|
|
5
|
+
for (var r = n > 1 ? void 0 : n ? y(s, c) : s, p = t.length - 1, l; p >= 0; p--)
|
|
6
|
+
(l = t[p]) && (r = (n ? l(s, c, r) : l(r)) || r);
|
|
7
|
+
return n && r && u(s, c, r), r;
|
|
8
8
|
};
|
|
9
|
-
let e = class extends
|
|
9
|
+
let e = class extends g {
|
|
10
10
|
constructor() {
|
|
11
|
-
super(...arguments), this.status = "", this.label = "", this.showIcon = !1;
|
|
11
|
+
super(...arguments), this.status = "", this.label = "", this.showIcon = !1, this.spacing = "", this.spacingTop = "", this.spacingBottom = "";
|
|
12
|
+
}
|
|
13
|
+
__resolveSpacingToken(t) {
|
|
14
|
+
const s = (t ?? "").trim();
|
|
15
|
+
return s ? /^(?:[0-9]|1[0-4])$/.test(s) ? `var(--spacing-${s})` : s : "";
|
|
16
|
+
}
|
|
17
|
+
__applySpacing() {
|
|
18
|
+
const t = this.__resolveSpacingToken(this.spacingTop || this.spacing), s = this.__resolveSpacingToken(this.spacingBottom || this.spacing);
|
|
19
|
+
t ? this.style.marginBlockStart = t : this.style.removeProperty("margin-block-start"), s ? this.style.marginBlockEnd = s : this.style.removeProperty("margin-block-end");
|
|
20
|
+
}
|
|
21
|
+
updated(t) {
|
|
22
|
+
super.updated(t), (t.has("spacing") || t.has("spacingTop") || t.has("spacingBottom")) && this.__applySpacing();
|
|
12
23
|
}
|
|
13
24
|
render() {
|
|
14
|
-
return
|
|
15
|
-
|
|
16
|
-
|
|
25
|
+
return a`
|
|
26
|
+
${this.showIcon ? this.status === "success" ? a`<md-icon>check_circle</md-icon>` : this.status === "warning" ? a`<md-icon>warning</md-icon>` : this.status === "error" ? a`<md-icon>error</md-icon>` : "" : ""}
|
|
27
|
+
<span class="label">${this.label}</span>
|
|
17
28
|
`;
|
|
18
29
|
}
|
|
19
30
|
};
|
|
@@ -30,36 +41,49 @@ e.styles = m`
|
|
|
30
41
|
gap: var(--spacing-3);
|
|
31
42
|
width: fit-content;
|
|
32
43
|
}
|
|
33
|
-
|
|
44
|
+
|
|
45
|
+
.label {
|
|
34
46
|
font-size: var(--md-sys-typescale-label-medium-size);
|
|
35
47
|
line-height: var(--md-sys-typescale-label-medium-line-height);
|
|
36
48
|
font-weight: var(--md-sys-typescale-label-medium-weight);
|
|
37
49
|
letter-spacing: var(--md-sys-typescale-label-medium-tracking);
|
|
38
50
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
51
|
+
|
|
52
|
+
:host([status='success']) {
|
|
53
|
+
background: var(--md-sys-color-success-container);
|
|
54
|
+
color: var(--md-sys-color-on-success-container);
|
|
42
55
|
}
|
|
43
|
-
|
|
56
|
+
|
|
57
|
+
:host([status='warning']) {
|
|
44
58
|
background: var(--md-sys-color-warning-container);
|
|
45
59
|
color: var(--md-sys-color-on-warning-container);
|
|
46
60
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
61
|
+
|
|
62
|
+
:host([status='error']) {
|
|
63
|
+
background: var(--md-sys-color-error-container);
|
|
64
|
+
color: var(--md-sys-color-on-error-container);
|
|
50
65
|
}
|
|
51
66
|
`;
|
|
52
|
-
|
|
53
|
-
|
|
67
|
+
o([
|
|
68
|
+
i({ type: String })
|
|
54
69
|
], e.prototype, "status", 2);
|
|
55
|
-
|
|
56
|
-
|
|
70
|
+
o([
|
|
71
|
+
i({ type: String })
|
|
57
72
|
], e.prototype, "label", 2);
|
|
58
|
-
|
|
59
|
-
|
|
73
|
+
o([
|
|
74
|
+
i({ type: Boolean, attribute: "show-icon" })
|
|
60
75
|
], e.prototype, "showIcon", 2);
|
|
61
|
-
|
|
62
|
-
|
|
76
|
+
o([
|
|
77
|
+
i({ type: String })
|
|
78
|
+
], e.prototype, "spacing", 2);
|
|
79
|
+
o([
|
|
80
|
+
i({ type: String, attribute: "spacing-top" })
|
|
81
|
+
], e.prototype, "spacingTop", 2);
|
|
82
|
+
o([
|
|
83
|
+
i({ type: String, attribute: "spacing-bottom" })
|
|
84
|
+
], e.prototype, "spacingBottom", 2);
|
|
85
|
+
e = o([
|
|
86
|
+
h("scb-status-pill")
|
|
63
87
|
], e);
|
|
64
88
|
export {
|
|
65
89
|
e as ScbStatusPill
|
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
2
|
/**
|
|
3
3
|
* En stepper-komponent enligt SCB-standard.
|
|
4
4
|
* @slot - Innehåll för stegen
|
|
5
5
|
*/
|
|
6
6
|
export declare class ScbStepper extends LitElement {
|
|
7
|
+
#private;
|
|
7
8
|
type: string;
|
|
8
9
|
label: string;
|
|
9
10
|
changeOnCompleted: boolean;
|
|
10
11
|
variant: 'horizontal' | 'vertical';
|
|
11
12
|
symbolVariant: 'number' | 'icon' | 'marker';
|
|
13
|
+
/**
|
|
14
|
+
* Vertikalt avstånd mot omgivande innehåll.
|
|
15
|
+
* spacing sätter både top och bottom om spacing-top / spacing-bottom inte är satta.
|
|
16
|
+
*/
|
|
17
|
+
spacing: string;
|
|
18
|
+
spacingTop: string;
|
|
19
|
+
spacingBottom: string;
|
|
12
20
|
private activeIndex;
|
|
13
21
|
static styles: import('lit').CSSResult;
|
|
14
22
|
private _onStepClick;
|
|
@@ -26,8 +34,8 @@ export declare class ScbStepper extends LitElement {
|
|
|
26
34
|
getActiveIndex(): number;
|
|
27
35
|
private _updateSteps;
|
|
28
36
|
private _getSteps;
|
|
29
|
-
firstUpdated(): void;
|
|
30
|
-
updated(): void;
|
|
37
|
+
protected firstUpdated(_changed: PropertyValues): void;
|
|
38
|
+
protected updated(changed: PropertyValues): void;
|
|
31
39
|
render(): import('lit-html').TemplateResult<1>;
|
|
32
40
|
private _onKeyNav;
|
|
33
41
|
private _onStepContainerClick;
|