@skf-design-system/ui-components 1.0.0-beta.3 → 1.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/accordion.component.d.ts +5 -9
- package/dist/components/accordion/accordion.component.js +19 -22
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion/accordion.styles.js +3 -3
- package/dist/components/alert/alert.component.d.ts +4 -7
- package/dist/components/alert/alert.component.js +1 -1
- package/dist/components/alert/alert.styles.js +1 -1
- package/dist/components/button/button.component.js +1 -1
- package/dist/components/button/button.styles.js +1 -1
- package/dist/components/card/card.component.d.ts +3 -3
- package/dist/components/card/card.component.js +19 -16
- package/dist/components/card/card.styles.js +3 -11
- package/dist/components/checkbox/checkbox.component.d.ts +6 -9
- package/dist/components/checkbox/checkbox.component.js +7 -7
- package/dist/components/checkbox/checkbox.styles.js +1 -1
- package/dist/components/collapse/collapse.component.d.ts +6 -9
- package/dist/components/collapse/collapse.component.js +36 -39
- package/dist/components/collapse/collapse.styles.js +3 -3
- package/dist/components/divider/divider.component.d.ts +10 -13
- package/dist/components/divider/divider.component.js +29 -34
- package/dist/components/divider/divider.styles.js +5 -1
- package/dist/components/heading/heading.component.d.ts +2 -12
- package/dist/components/heading/heading.component.js +14 -14
- package/dist/components/heading/heading.styles.js +1 -1
- package/dist/components/icon/icon.component.d.ts +8 -14
- package/dist/components/icon/icon.component.js +6 -6
- package/dist/components/icon/icon.styles.js +1 -1
- package/dist/components/input/input.component.d.ts +29 -34
- package/dist/components/input/input.component.js +16 -18
- package/dist/components/link/link.component.d.ts +12 -15
- package/dist/components/link/link.component.js +7 -7
- package/dist/components/link/link.styles.js +1 -1
- package/dist/components/loader/loader.component.d.ts +7 -7
- package/dist/components/loader/loader.component.js +61 -35
- package/dist/components/loader/loader.styles.js +10 -42
- package/dist/components/logo/logo.component.d.ts +3 -5
- package/dist/components/logo/logo.component.js +8 -8
- package/dist/components/logo/logo.styles.js +2 -2
- package/dist/components/radio/radio.component.d.ts +13 -15
- package/dist/components/radio/radio.component.js +3 -3
- package/dist/components/radio/radio.styles.js +3 -3
- package/dist/components/select/select.component.d.ts +8 -7
- package/dist/components/select/select.component.js +20 -20
- package/dist/components/select/select.styles.js +3 -3
- package/dist/components/switch/switch.component.d.ts +3 -2
- package/dist/components/switch/switch.component.js +1 -1
- package/dist/components/switch/switch.styles.js +1 -1
- package/dist/components/tag/tag.component.d.ts +7 -12
- package/dist/components/tag/tag.component.js +24 -24
- package/dist/components/tag/tag.styles.js +1 -6
- package/dist/components/textarea/textarea.component.d.ts +23 -26
- package/dist/components/textarea/textarea.component.js +12 -15
- package/dist/custom-elements.json +221 -221
- package/dist/internal/storybook/shadowRootTraverser.d.ts +8 -16
- package/dist/react/index.d.ts +3 -3
- package/dist/react/index.js +3 -3
- package/dist/styles/form-field.styles.js +1 -1
- package/dist/types/jsx/custom-element-jsx.d.ts +47 -47
- package/dist/types/vue/index.d.ts +49 -49
- package/dist/vscode.html-custom-data.json +61 -61
- package/dist/web-types.json +118 -118
- package/package.json +1 -1
- package/dist/components/checkbox/checkbox.test.d.ts +0 -1
- package/dist/components/collapse/collapse.test.d.ts +0 -1
- package/dist/components/switch/switch.test.d.ts +0 -1
@@ -1,26 +1,23 @@
|
|
1
1
|
import '@components/collapse/collapse.js';
|
2
2
|
import { SkfElement } from '@internal/components/skf-element.js';
|
3
3
|
import type { HeadingType } from '@internal/constants/heading.js';
|
4
|
-
import { type CSSResultGroup
|
4
|
+
import { type CSSResultGroup } from 'lit';
|
5
5
|
/**
|
6
6
|
* The `<skf-accordion>` component consists of multiple `<skf-collapse>`, working together.
|
7
7
|
*
|
8
|
-
* See [
|
8
|
+
* See [InVision DSM](https://skf.invisionapp.com/dsm/ab-skf/4-web-applications/nav/5fa7caf78c01200018354495/asset/6256cb1b44eba592d319d92e) for design principles.
|
9
9
|
*
|
10
10
|
* @slot - Expects one or more <skf-accordion-item> element(s)
|
11
11
|
*
|
12
|
-
* @
|
12
|
+
* @tag skf-accordion
|
13
13
|
*/
|
14
14
|
export declare class SkfAccordion extends SkfElement {
|
15
15
|
static styles: CSSResultGroup;
|
16
16
|
/** If true, will animate the expand/collapse state */
|
17
17
|
animated?: boolean;
|
18
|
-
/**
|
19
|
-
* Defines which heading element will be rendered
|
20
|
-
* @type { "h1" | "h2" | "h3" | "h4" }
|
21
|
-
*/
|
18
|
+
/** Controls which heading element will be rendered */
|
22
19
|
headingAs: Exclude<HeadingType, 'h1'>;
|
23
|
-
/** If
|
20
|
+
/** If provided, adds a gap between each item */
|
24
21
|
gap?: boolean;
|
25
22
|
/** If true, allowes multiple accordion items to open */
|
26
23
|
multiple?: boolean;
|
@@ -30,7 +27,6 @@ export declare class SkfAccordion extends SkfElement {
|
|
30
27
|
truncate?: boolean;
|
31
28
|
/** @internal */
|
32
29
|
private $accordionItems;
|
33
|
-
protected updated(_changedProperties: PropertyValues): void;
|
34
30
|
/** @internal */
|
35
31
|
private get items();
|
36
32
|
/** @internal */
|
@@ -1,25 +1,22 @@
|
|
1
1
|
import "../collapse/collapse.js";
|
2
|
-
import { SkfElement as
|
2
|
+
import { SkfElement as u } from "../../internal/components/skf-element.js";
|
3
3
|
import m from "../../styles/component.styles.js";
|
4
|
-
import { html as
|
5
|
-
import { property as
|
4
|
+
import { html as d } from "lit";
|
5
|
+
import { property as o, queryAssignedNodes as f } from "lit/decorators.js";
|
6
6
|
import c from "./accordion.styles.js";
|
7
|
-
var g = Object.defineProperty, r = (
|
8
|
-
for (var s = void 0, l =
|
9
|
-
(h =
|
7
|
+
var g = Object.defineProperty, r = (p, t, i, a) => {
|
8
|
+
for (var s = void 0, l = p.length - 1, h; l >= 0; l--)
|
9
|
+
(h = p[l]) && (s = h(t, i, s) || s);
|
10
10
|
return s && g(t, i, s), s;
|
11
11
|
};
|
12
|
-
const n = class n extends
|
12
|
+
const n = class n extends u {
|
13
13
|
constructor() {
|
14
14
|
super(...arguments), this.headingAs = "h2", this._setItemAttributes = () => {
|
15
15
|
this.items.forEach((t) => {
|
16
|
-
t.setAttribute("heading-as", this.headingAs), this.animated
|
16
|
+
t.setAttribute("heading-as", this.headingAs), this.animated && t.setAttribute("animated", ""), this.small && t.setAttribute("small", ""), this.truncate && t.setAttribute("truncate", "");
|
17
17
|
});
|
18
18
|
};
|
19
19
|
}
|
20
|
-
updated(t) {
|
21
|
-
(t.has("animated") || t.has("headingAs") || t.has("small") || t.has("truncate")) && this._setItemAttributes();
|
22
|
-
}
|
23
20
|
/** @internal */
|
24
21
|
get items() {
|
25
22
|
return [...this.$accordionItems].filter((t) => t.localName === "skf-accordion-item");
|
@@ -27,13 +24,13 @@ const n = class n extends p {
|
|
27
24
|
_onChildToggle(t) {
|
28
25
|
if (this.multiple || t.defaultPrevented) return;
|
29
26
|
const i = t.target;
|
30
|
-
this.items.length && this.items.forEach((
|
31
|
-
|
27
|
+
this.items.length && this.items.forEach((a) => {
|
28
|
+
a !== i && a.hasAttribute("expanded") && a.setClose();
|
32
29
|
});
|
33
30
|
}
|
34
31
|
render() {
|
35
|
-
return
|
36
|
-
<div id="
|
32
|
+
return d`
|
33
|
+
<div id="accordion">
|
37
34
|
<slot
|
38
35
|
@skf-collapse-toggle=${(t) => {
|
39
36
|
this._onChildToggle(t);
|
@@ -47,25 +44,25 @@ const n = class n extends p {
|
|
47
44
|
n.styles = [c, m];
|
48
45
|
let e = n;
|
49
46
|
r([
|
50
|
-
|
47
|
+
o({ type: Boolean, reflect: !0 })
|
51
48
|
], e.prototype, "animated");
|
52
49
|
r([
|
53
|
-
|
50
|
+
o({ attribute: "heading-as" })
|
54
51
|
], e.prototype, "headingAs");
|
55
52
|
r([
|
56
|
-
|
53
|
+
o({ type: Boolean, reflect: !0 })
|
57
54
|
], e.prototype, "gap");
|
58
55
|
r([
|
59
|
-
|
56
|
+
o({ type: Boolean })
|
60
57
|
], e.prototype, "multiple");
|
61
58
|
r([
|
62
|
-
|
59
|
+
o({ type: Boolean, reflect: !0 })
|
63
60
|
], e.prototype, "small");
|
64
61
|
r([
|
65
|
-
|
62
|
+
o({ type: Boolean, reflect: !0 })
|
66
63
|
], e.prototype, "truncate");
|
67
64
|
r([
|
68
|
-
|
65
|
+
f()
|
69
66
|
], e.prototype, "$accordionItems");
|
70
67
|
export {
|
71
68
|
e as SkfAccordion
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { css as o } from "lit";
|
2
|
-
const
|
2
|
+
const a = o`
|
3
3
|
@layer components {
|
4
|
-
:host([gap]) #
|
4
|
+
:host([gap]) #accordion {
|
5
5
|
display: flex;
|
6
6
|
flex-direction: column;
|
7
7
|
gap: var(--skf-spacing-300);
|
@@ -9,5 +9,5 @@ const t = o`
|
|
9
9
|
}
|
10
10
|
`;
|
11
11
|
export {
|
12
|
-
|
12
|
+
a as default
|
13
13
|
};
|
@@ -6,27 +6,24 @@ import { type CSSResultGroup } from 'lit';
|
|
6
6
|
/**
|
7
7
|
* The `<skf-alert>` is a type of notification that appears in-line
|
8
8
|
*
|
9
|
-
* @documentation See [
|
9
|
+
* @documentation See [InVision DSM](https://skf.invisionapp.com/dsm/ab-skf/4-web-applications/nav/5fa7caf78c01200018354495/asset/6229d63d9fe16020a60657e5) for design principles
|
10
10
|
*
|
11
11
|
* @event skf-alert-close - Fires when the close button is clicked
|
12
12
|
*
|
13
13
|
* @slot - Alert message. **Notice!** See design principles for approved content
|
14
|
-
* @slot link -
|
14
|
+
* @slot link - lodjvodjvodjo
|
15
15
|
*
|
16
16
|
* @tagname skf-alert
|
17
17
|
*/
|
18
18
|
export declare class SkfAlert extends SkfElement {
|
19
19
|
static styles: CSSResultGroup;
|
20
|
-
/** If true, alert is being used as a toast
|
20
|
+
/** If true, alert is being used as a toast with an close button */
|
21
21
|
closeable?: boolean;
|
22
22
|
/** Close button aria-label */
|
23
23
|
buttonLabel: string;
|
24
24
|
/** If defined, displays leading icon */
|
25
25
|
icon?: SkfIcon['name'];
|
26
|
-
/**
|
27
|
-
* If defined, gives the supplied appearance
|
28
|
-
* @type { "error" | "info" | "warning" | "success" | "alert" }
|
29
|
-
*/
|
26
|
+
/** If defined, gives the supplied appearance */
|
30
27
|
severity?: SeverityFgColor;
|
31
28
|
/** @internal */
|
32
29
|
private _handleClose;
|
@@ -39,7 +39,7 @@ const l = class l extends c {
|
|
39
39
|
<button
|
40
40
|
?disabled=${this.disabled || this.loading}
|
41
41
|
aria-busy=${this.loading}
|
42
|
-
id="
|
42
|
+
id="button"
|
43
43
|
type=${y(this.type)}
|
44
44
|
>
|
45
45
|
${this.variant === "primary" && this._loaderVisible ? d`<skf-loader invert size="sm"></skf-loader>` : ""}
|
@@ -12,10 +12,10 @@ import { type CSSResultGroup } from 'lit';
|
|
12
12
|
export declare class SkfCard extends SkfElement {
|
13
13
|
static styles: CSSResultGroup;
|
14
14
|
/** If true, removes border */
|
15
|
-
noBorder
|
15
|
+
noBorder: boolean;
|
16
16
|
/** If true, removes padding */
|
17
|
-
noPadding
|
17
|
+
noPadding: boolean;
|
18
18
|
/** If true, the Card fills the parent element height */
|
19
|
-
stretch
|
19
|
+
stretch: boolean;
|
20
20
|
render(): import("lit").TemplateResult<1>;
|
21
21
|
}
|
@@ -1,33 +1,36 @@
|
|
1
1
|
import { SkfElement as d } from "../../internal/components/skf-element.js";
|
2
|
-
import
|
2
|
+
import m from "../../styles/component.styles.js";
|
3
3
|
import { html as f } from "lit";
|
4
4
|
import { property as r } from "lit/decorators.js";
|
5
5
|
import y from "./card.styles.js";
|
6
|
-
var
|
7
|
-
for (var t = void 0,
|
8
|
-
(
|
9
|
-
return t &&
|
6
|
+
var c = Object.defineProperty, s = (p, i, l, h) => {
|
7
|
+
for (var t = void 0, o = p.length - 1, a; o >= 0; o--)
|
8
|
+
(a = p[o]) && (t = a(i, l, t) || t);
|
9
|
+
return t && c(i, l, t), t;
|
10
10
|
};
|
11
11
|
const n = class n extends d {
|
12
|
+
constructor() {
|
13
|
+
super(...arguments), this.noBorder = !1, this.noPadding = !1, this.stretch = !1;
|
14
|
+
}
|
12
15
|
render() {
|
13
16
|
return f`
|
14
|
-
<div id="
|
17
|
+
<div id="card">
|
15
18
|
<slot></slot>
|
16
19
|
</div>
|
17
20
|
`;
|
18
21
|
}
|
19
22
|
};
|
20
|
-
n.styles = [
|
21
|
-
let
|
22
|
-
|
23
|
+
n.styles = [m, y];
|
24
|
+
let e = n;
|
25
|
+
s([
|
23
26
|
r({ type: Boolean, attribute: "no-border" })
|
24
|
-
],
|
25
|
-
|
27
|
+
], e.prototype, "noBorder");
|
28
|
+
s([
|
26
29
|
r({ type: Boolean, attribute: "no-padding" })
|
27
|
-
],
|
28
|
-
|
29
|
-
r({ type: Boolean
|
30
|
-
],
|
30
|
+
], e.prototype, "noPadding");
|
31
|
+
s([
|
32
|
+
r({ type: Boolean })
|
33
|
+
], e.prototype, "stretch");
|
31
34
|
export {
|
32
|
-
|
35
|
+
e as SkfCard
|
33
36
|
};
|
@@ -1,14 +1,6 @@
|
|
1
1
|
import { css as r } from "lit";
|
2
|
-
const
|
3
|
-
|
4
|
-
contain: layout;
|
5
|
-
}
|
6
|
-
|
7
|
-
:host([stretch]) {
|
8
|
-
block-size: 100%;
|
9
|
-
}
|
10
|
-
|
11
|
-
#root {
|
2
|
+
const d = r`
|
3
|
+
#card {
|
12
4
|
background-color: var(--skf-bg-color-neutral-1);
|
13
5
|
border: var(--skf-border-width-sm) solid
|
14
6
|
var(--_skf-card-border-color, var(--skf-border-color-tertiary));
|
@@ -30,5 +22,5 @@ const s = r`
|
|
30
22
|
}
|
31
23
|
`;
|
32
24
|
export {
|
33
|
-
|
25
|
+
d as default
|
34
26
|
};
|
@@ -5,14 +5,14 @@ import { type CSSResultGroup } from 'lit';
|
|
5
5
|
/**
|
6
6
|
* The `<skf-checkbox>` component is used to create a checkbox input
|
7
7
|
*
|
8
|
-
* @documentation See [
|
8
|
+
* @documentation See [InVision DSM](https://skf.invisionapp.com/dsm/ab-skf/4-web-applications/nav/5fa7caf78c01200018354495/asset/6229d63d9fe16020a60657e5) for design principles
|
9
9
|
*
|
10
10
|
* @attribute {boolean} disabled - If true, sets disabled state
|
11
11
|
* @attribute {boolean} required - If true, value is required or must be checked for the form to be submittable
|
12
12
|
*
|
13
13
|
* @event change {object} - When the value of the input changes
|
14
14
|
*
|
15
|
-
* @slot -
|
15
|
+
* @slot Default - Alternatively, you can use the `label` attribute
|
16
16
|
*
|
17
17
|
* @tagname skf-checkbox
|
18
18
|
*/
|
@@ -36,15 +36,12 @@ export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps
|
|
36
36
|
name?: string;
|
37
37
|
/** If defined, renders an alternative A11y text for the asterisk */
|
38
38
|
requiredLabel?: string;
|
39
|
-
/**
|
40
|
-
* If defined, styles checkbox using provided severity
|
41
|
-
* @type { "alert" | "success" | "info" | "warning" }
|
42
|
-
*/
|
43
|
-
severity?: FormFieldBaseProps['severity'];
|
44
|
-
/** If true, displays valid state after interaction */
|
45
|
-
showValid?: boolean;
|
46
39
|
/** Size of the checkbox */
|
47
40
|
size: 'sm' | 'md';
|
41
|
+
/** If defined, styles checkbox using provided severity */
|
42
|
+
severity?: FormFieldBaseProps['severity'];
|
43
|
+
/** If defined, displays valid state after interaction */
|
44
|
+
showValid?: boolean;
|
48
45
|
/** The current value of the input field */
|
49
46
|
value: string;
|
50
47
|
/** @internal */
|
@@ -6,10 +6,10 @@ import { html as u, nothing as m } from "lit";
|
|
6
6
|
import { property as s, state as f, query as y } from "lit/decorators.js";
|
7
7
|
import { ifDefined as b } from "lit/directives/if-defined.js";
|
8
8
|
import _ from "./checkbox.styles.js";
|
9
|
-
var
|
9
|
+
var k = Object.defineProperty, i = (n, t, r, a) => {
|
10
10
|
for (var l = void 0, o = n.length - 1, d; o >= 0; o--)
|
11
11
|
(d = n[o]) && (l = d(t, r, l) || l);
|
12
|
-
return l &&
|
12
|
+
return l && k(t, r, l), l;
|
13
13
|
};
|
14
14
|
const h = class h extends p {
|
15
15
|
constructor() {
|
@@ -62,7 +62,7 @@ const h = class h extends p {
|
|
62
62
|
}
|
63
63
|
render() {
|
64
64
|
return u`
|
65
|
-
<label id="
|
65
|
+
<label id="checkbox">
|
66
66
|
<input
|
67
67
|
?checked=${this.checked}
|
68
68
|
?disabled=${this.disabled}
|
@@ -74,7 +74,7 @@ const h = class h extends p {
|
|
74
74
|
value=${this.value}
|
75
75
|
/>
|
76
76
|
${this._renderIcon("check")} ${this._renderIcon("removeMinus")}
|
77
|
-
<div
|
77
|
+
<div id="label">
|
78
78
|
<slot>${this.label}</slot>
|
79
79
|
${this.required ? c(this.requiredLabel) : m}
|
80
80
|
</div>
|
@@ -108,15 +108,15 @@ i([
|
|
108
108
|
i([
|
109
109
|
s({ attribute: "required-label" })
|
110
110
|
], e.prototype, "requiredLabel");
|
111
|
+
i([
|
112
|
+
s({ reflect: !0 })
|
113
|
+
], e.prototype, "size");
|
111
114
|
i([
|
112
115
|
s({ reflect: !0 })
|
113
116
|
], e.prototype, "severity");
|
114
117
|
i([
|
115
118
|
s({ type: Boolean, attribute: "show-valid" })
|
116
119
|
], e.prototype, "showValid");
|
117
|
-
i([
|
118
|
-
s({ reflect: !0 })
|
119
|
-
], e.prototype, "size");
|
120
120
|
i([
|
121
121
|
s()
|
122
122
|
], e.prototype, "value");
|
@@ -5,7 +5,7 @@ import type { CSSResultGroup } from 'lit';
|
|
5
5
|
/**
|
6
6
|
* The `<skf-collapse>` component is a general purpose container for content that can be collapsed / expanded.
|
7
7
|
*
|
8
|
-
* See [
|
8
|
+
* See [InVision DSM](https://skf.invisionapp.com/dsm/ab-skf/4-web-applications/nav/5fa7caf78c01200018354495/asset/6229e2eb8a8dacf366dc3243) for design principles.
|
9
9
|
*
|
10
10
|
* @event {CustomEvent} skf-collapse-toggle - Event emitted when toggled
|
11
11
|
*
|
@@ -16,20 +16,17 @@ import type { CSSResultGroup } from 'lit';
|
|
16
16
|
export declare class SkfCollapse extends SkfElement {
|
17
17
|
static styles: CSSResultGroup;
|
18
18
|
/** If true, will animate the expand/collapse state */
|
19
|
-
animated
|
19
|
+
animated: boolean;
|
20
20
|
/** If true, will set the collapse to be expanded by default */
|
21
|
-
expanded
|
21
|
+
expanded: boolean;
|
22
22
|
/** Heading for the collapse */
|
23
23
|
heading?: string;
|
24
|
-
/**
|
25
|
-
* Defines which heading element will be rendered
|
26
|
-
* @type { "h1" | "h2" | "h3" | "h4" }
|
27
|
-
*/
|
24
|
+
/** Controls which heading element will be rendered */
|
28
25
|
headingAs: Exclude<HeadingType, 'h1'>;
|
29
26
|
/** If true, renders the small version */
|
30
|
-
small
|
27
|
+
small: boolean;
|
31
28
|
/** If true, will truncate the heading in collapsed state */
|
32
|
-
truncate
|
29
|
+
truncate: boolean;
|
33
30
|
/** Class method as alternative to manipulate attribute */
|
34
31
|
setClose(): void;
|
35
32
|
/** Class method as alternative to manipulate attribute */
|
@@ -1,18 +1,17 @@
|
|
1
1
|
import "../icon/icon.js";
|
2
2
|
import { SkfElement as h } from "../../internal/components/skf-element.js";
|
3
3
|
import m from "../../styles/component.styles.js";
|
4
|
-
import { property as
|
5
|
-
import {
|
6
|
-
import
|
7
|
-
|
8
|
-
var
|
9
|
-
|
10
|
-
|
11
|
-
return t && y(s, d, t), t;
|
4
|
+
import { property as a } from "lit/decorators.js";
|
5
|
+
import { html as c, unsafeStatic as l } from "lit/static-html.js";
|
6
|
+
import u from "./collapse.styles.js";
|
7
|
+
var f = Object.defineProperty, s = (o, r, d, y) => {
|
8
|
+
for (var t = void 0, i = o.length - 1, p; i >= 0; i--)
|
9
|
+
(p = o[i]) && (t = p(r, d, t) || t);
|
10
|
+
return t && f(r, d, t), t;
|
12
11
|
};
|
13
12
|
const n = class n extends h {
|
14
13
|
constructor() {
|
15
|
-
super(...arguments), this.headingAs = "h2", this._toggle = () => {
|
14
|
+
super(...arguments), this.animated = !1, this.expanded = !1, this.headingAs = "h2", this.small = !1, this.truncate = !1, this._toggle = () => {
|
16
15
|
this.dispatchEvent(
|
17
16
|
new CustomEvent("skf-collapse-toggle", {
|
18
17
|
bubbles: !0,
|
@@ -31,47 +30,45 @@ const n = class n extends h {
|
|
31
30
|
this.expanded = !0;
|
32
31
|
}
|
33
32
|
render() {
|
34
|
-
return
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
>
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
<div id="
|
48
|
-
<
|
49
|
-
<slot></slot>
|
50
|
-
</div>
|
33
|
+
return c`
|
34
|
+
<${l(this.headingAs)} id="heading">
|
35
|
+
<button
|
36
|
+
@click=${this._toggle}
|
37
|
+
aria-controls="main"
|
38
|
+
aria-expanded=${this.expanded}
|
39
|
+
type="button"
|
40
|
+
>
|
41
|
+
<span id="label">${this.heading}</span>
|
42
|
+
<skf-icon name=${this.expanded ? "caretUp" : "caretDown"}></skf-icon>
|
43
|
+
</button>
|
44
|
+
</${l(this.headingAs)}>
|
45
|
+
<div id="body">
|
46
|
+
<div id="main" data-testid="main">
|
47
|
+
<slot></slot>
|
51
48
|
</div>
|
52
49
|
</div>
|
53
50
|
`;
|
54
51
|
}
|
55
52
|
};
|
56
|
-
n.styles = [m,
|
53
|
+
n.styles = [m, u];
|
57
54
|
let e = n;
|
58
|
-
|
59
|
-
|
55
|
+
s([
|
56
|
+
a({ type: Boolean, reflect: !0 })
|
60
57
|
], e.prototype, "animated");
|
61
|
-
|
62
|
-
|
58
|
+
s([
|
59
|
+
a({ type: Boolean, reflect: !0 })
|
63
60
|
], e.prototype, "expanded");
|
64
|
-
|
65
|
-
|
61
|
+
s([
|
62
|
+
a()
|
66
63
|
], e.prototype, "heading");
|
67
|
-
|
68
|
-
|
64
|
+
s([
|
65
|
+
a({ attribute: "heading-as" })
|
69
66
|
], e.prototype, "headingAs");
|
70
|
-
|
71
|
-
|
67
|
+
s([
|
68
|
+
a({ type: Boolean, reflect: !0 })
|
72
69
|
], e.prototype, "small");
|
73
|
-
|
74
|
-
|
70
|
+
s([
|
71
|
+
a({ type: Boolean, reflect: !0 })
|
75
72
|
], e.prototype, "truncate");
|
76
73
|
export {
|
77
74
|
e as SkfCollapse
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { css as
|
2
|
-
const s =
|
1
|
+
import { css as a } from "lit";
|
2
|
+
const s = a`
|
3
3
|
@layer components {
|
4
|
-
|
4
|
+
:host {
|
5
5
|
background: var(--skf-bg-color-neutral-1);
|
6
6
|
border-bottom: var(--skf-border-width-sm) solid var(--skf-border-color-tertiary);
|
7
7
|
}
|
@@ -2,9 +2,7 @@ import { SkfElement } from '@internal/components/skf-element.js';
|
|
2
2
|
import type { BorderColor } from '@skf-design-system/ui-assets';
|
3
3
|
import { type CSSResultGroup } from 'lit';
|
4
4
|
/**
|
5
|
-
* The `<Divider>` component can separate items from each other, to visually emphasize their lack of a relationship between groups of information
|
6
|
-
*
|
7
|
-
* @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/3831f1-divider) for design principles
|
5
|
+
* The `<Divider>` component can separate items from each other, to visually emphasize their lack of a relationship between groups of information.
|
8
6
|
*
|
9
7
|
* @cssproperty --skf-divider-spacing - The amount of space the divider occupies. Pass valid CSS **margin-block** values when horizontal and **margin-inline** when vertical
|
10
8
|
* @cssproperty --skf-divider-inset - The amount of space the divider should be indented. Pass valid CSS **margin-inline** values when horizontal and **margin-block** when vertical
|
@@ -12,18 +10,17 @@ import { type CSSResultGroup } from 'lit';
|
|
12
10
|
* @tagname skf-divider
|
13
11
|
*/
|
14
12
|
export declare class SkfDivider extends SkfElement {
|
15
|
-
#private;
|
16
13
|
static styles: CSSResultGroup;
|
17
|
-
/**
|
18
|
-
|
19
|
-
|
20
|
-
*/
|
21
|
-
color: BorderColor;
|
14
|
+
/** If provided, alters the Divider color */
|
15
|
+
/** @type { "emphasised" | "primary" | "secondary" | "tertiary" | "inverse" } */
|
16
|
+
color?: BorderColor;
|
22
17
|
/** If true, renders a div for presentational purpose instead of the semantic hr-element */
|
23
|
-
decorative?: boolean;
|
18
|
+
decorative?: boolean | undefined;
|
24
19
|
/** If true, renders the divider vertically */
|
25
|
-
vertical?: boolean;
|
26
|
-
|
27
|
-
|
20
|
+
vertical?: boolean | undefined;
|
21
|
+
/** @internal */
|
22
|
+
private renderDecorative;
|
23
|
+
/** @internal */
|
24
|
+
private renderDefault;
|
28
25
|
render(): import("lit").TemplateResult<1>;
|
29
26
|
}
|