@skf-design-system/ui-components 1.0.2-beta.0 → 1.0.2-beta.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 +12 -8
- package/dist/components/accordion/accordion-item.component.d.ts +36 -0
- package/dist/components/accordion/accordion-item.component.js +87 -0
- package/dist/components/accordion/accordion-item.d.ts +3 -3
- package/dist/components/accordion/accordion-item.js +4 -5
- package/dist/components/accordion/accordion-item.styles.js +77 -0
- package/dist/components/accordion/accordion.component.d.ts +5 -9
- package/dist/components/accordion/accordion.component.js +4 -5
- package/dist/components/accordion/accordion.d.ts +0 -1
- package/dist/components/accordion/accordion.js +0 -2
- package/dist/components/alert/alert.component.d.ts +4 -7
- package/dist/components/alert/alert.component.js +8 -9
- package/dist/components/alert/alert.styles.js +0 -5
- package/dist/components/breadcrumb/breadcrumb-item.component.js +61 -0
- package/dist/components/breadcrumb/breadcrumb-item.js +6 -0
- package/dist/components/breadcrumb/breadcrumb-item.styles.js +62 -0
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +1 -1
- package/dist/components/breadcrumb/breadcrumb.component.js +60 -0
- package/dist/components/breadcrumb/breadcrumb.js +6 -0
- package/dist/components/breadcrumb/breadcrumb.styles.js +22 -0
- package/dist/components/button/button.component.d.ts +13 -10
- package/dist/components/button/button.component.js +83 -76
- package/dist/components/button/button.styles.d.ts +1 -2
- package/dist/components/button/button.styles.js +1 -1
- package/dist/components/card/card.component.d.ts +1 -1
- package/dist/components/card/card.component.js +1 -1
- package/dist/components/checkbox/checkbox.component.d.ts +8 -6
- package/dist/components/checkbox/checkbox.component.js +2 -2
- package/dist/components/checkbox/checkbox.styles.d.ts +1 -2
- package/dist/components/checkbox/checkbox.styles.js +1 -5
- package/dist/components/date-picker/datepicker.calendar.component.js +1 -1
- package/dist/components/date-picker/datepicker.component.js +1 -1
- package/dist/components/date-picker-input/datepicker-input.component.d.ts +1 -0
- package/dist/components/date-picker-input/datepicker-input.component.js +3 -2
- package/dist/components/dialog/dialog.component.d.ts +5 -4
- package/dist/components/dialog/dialog.component.js +44 -44
- package/dist/components/dialog/dialog.styles.js +4 -4
- package/dist/components/divider/divider.component.js +1 -1
- package/dist/components/drawer/drawer.component.d.ts +12 -8
- package/dist/components/drawer/drawer.component.js +5 -4
- package/dist/components/header/header.component.d.ts +3 -2
- package/dist/components/header/header.component.js +34 -28
- package/dist/components/heading/heading.component.d.ts +3 -5
- package/dist/components/heading/heading.component.js +22 -21
- package/dist/components/icon/icon.component.d.ts +11 -17
- package/dist/components/icon/icon.component.js +2 -2
- package/dist/components/icon/icon.styles.d.ts +1 -2
- package/dist/components/icon/icon.styles.js +1 -1
- package/dist/components/input/input.component.d.ts +30 -31
- package/dist/components/input/input.component.js +136 -123
- package/dist/components/link/link.component.d.ts +12 -14
- package/dist/components/link/link.component.js +34 -34
- package/dist/components/link/link.styles.d.ts +1 -2
- package/dist/components/link/link.styles.js +2 -2
- package/dist/components/loader/loader.component.d.ts +1 -1
- package/dist/components/loader/loader.component.js +36 -40
- package/dist/components/loader/loader.styles.d.ts +1 -2
- package/dist/components/loader/loader.styles.js +40 -32
- package/dist/components/logo/logo.component.d.ts +4 -5
- package/dist/components/logo/logo.component.js +1 -1
- package/dist/components/menu/menu-item.component.d.ts +13 -0
- package/dist/components/{menu-item → menu}/menu-item.component.js +3 -3
- package/dist/components/menu/menu.component.d.ts +9 -6
- package/dist/components/menu/menu.component.js +8 -10
- package/dist/components/{nav-item → nav}/nav-item.component.d.ts +0 -2
- package/dist/components/{nav-item → nav}/nav-item.component.js +1 -1
- package/dist/components/nav/nav.component.js +1 -1
- package/dist/components/popover/popover.component.d.ts +10 -6
- package/dist/components/popover/popover.component.js +22 -24
- package/dist/components/progress/progress.component.d.ts +2 -2
- package/dist/components/progress/progress.component.js +31 -37
- package/dist/components/progress/progress.styles.js +40 -35
- package/dist/components/radio/radio.component.d.ts +9 -7
- package/dist/components/radio/radio.component.js +2 -2
- package/dist/components/{segmented-button-item → segmented-button}/segmented-button-item.component.d.ts +4 -4
- package/dist/components/segmented-button/segmented-button-item.component.js +56 -0
- package/dist/components/segmented-button/segmented-button-item.js +6 -0
- package/dist/components/segmented-button/segmented-button-item.styles.js +62 -0
- package/dist/components/segmented-button/segmented-button.component.d.ts +0 -2
- package/dist/components/segmented-button/segmented-button.component.js +73 -0
- package/dist/components/segmented-button/segmented-button.js +6 -0
- package/dist/components/segmented-button/segmented-button.styles.js +16 -0
- package/dist/components/{select-option-group → select}/select-option-group.component.js +1 -1
- package/dist/components/{select-option → select}/select-option.component.d.ts +7 -8
- package/dist/components/{select-option → select}/select-option.component.js +15 -15
- package/dist/components/select/select.component.d.ts +16 -15
- package/dist/components/select/select.component.js +17 -17
- package/dist/components/select/select.controllers.d.ts +1 -1
- package/dist/components/select/select.controllers.js +14 -11
- package/dist/components/select/select.stories.icons.d.ts +7 -0
- package/dist/components/{stepper-item → stepper}/stepper-item.component.js +8 -8
- package/dist/components/stepper/stepper.component.d.ts +2 -2
- package/dist/components/stepper/stepper.component.js +15 -15
- package/dist/components/stepper/stepper.helpers.d.ts +1 -1
- package/dist/components/switch/switch.component.js +15 -15
- package/dist/components/tab/tab.component.js +1 -1
- package/dist/components/tab-group/tab-group.component.js +1 -1
- package/dist/components/tab-panel/tab-panel.component.js +1 -1
- package/dist/components/tag/tag.component.d.ts +10 -14
- package/dist/components/tag/tag.component.js +32 -35
- package/dist/components/textarea/textarea.component.d.ts +10 -11
- package/dist/components/textarea/textarea.component.js +62 -64
- package/dist/components/{toast-item → toast}/toast-item.d.ts +2 -0
- package/dist/components/{toast-item → toast}/toast-item.js +4 -0
- package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.js +1 -1
- package/dist/components/toast/toast-wrapper.styles.d.ts +1 -0
- package/dist/components/toast/toast.component.d.ts +5 -4
- package/dist/components/toast/toast.component.js +15 -15
- package/dist/components/toast/toast.singleton.d.ts +4 -4
- package/dist/components/toast/toast.singleton.js +12 -12
- package/dist/components/tooltip/tooltip.component.d.ts +2 -1
- package/dist/components/tooltip/tooltip.component.js +15 -10
- package/dist/custom-elements.json +733 -820
- package/dist/index.d.ts +13 -7
- package/dist/index.js +100 -84
- package/dist/internal/base-classes/popover/popover.base.d.ts +10 -5
- package/dist/internal/base-classes/popover/popover.base.js +77 -60
- package/dist/internal/components/hint/hint.component.d.ts +2 -2
- package/dist/internal/components/hint/hint.component.js +2 -2
- package/dist/internal/components/hint/hint.styles.d.ts +1 -2
- package/dist/internal/components/hint/hint.styles.js +1 -1
- package/dist/internal/constants/iconSeverity.d.ts +3 -2
- package/dist/internal/constants/iconSeverity.js +2 -3
- package/dist/internal/helpers/hintSeverity.d.ts +2 -2
- package/dist/internal/helpers/hintSeverity.js +1 -1
- package/dist/internal/types/formField.d.ts +1 -1
- package/dist/internal/types.d.ts +18 -0
- package/dist/styles/component.styles.d.ts +1 -2
- package/dist/styles/component.styles.js +1 -1
- package/dist/styles/global.css +1 -1
- package/dist/types/jsx/custom-element-jsx.d.ts +162 -180
- package/dist/types/vue/index.d.ts +162 -180
- package/dist/vscode.html-custom-data.json +133 -1091
- package/dist/web-types.json +368 -424
- package/package.json +24 -25
- package/dist/components/collapse/collapse.component.d.ts +0 -40
- package/dist/components/collapse/collapse.component.js +0 -86
- package/dist/components/collapse/collapse.d.ts +0 -8
- package/dist/components/collapse/collapse.js +0 -6
- package/dist/components/collapse/collapse.styles.d.ts +0 -2
- package/dist/components/collapse/collapse.styles.js +0 -77
- package/dist/components/menu-item/menu-item.component.d.ts +0 -25
- package/dist/internal/constants/heading.d.ts +0 -2
- /package/dist/components/{breadcrumb-item/breadcrumb-item.styles.d.ts → accordion/accordion-item.styles.d.ts} +0 -0
- /package/dist/components/{collapse/collapse.test.d.ts → accordion/accordion-item.test.d.ts} +0 -0
- /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.component.d.ts +0 -0
- /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.d.ts +0 -0
- /package/dist/components/{menu-item/menu-item.styles.d.ts → breadcrumb/breadcrumb-item.styles.d.ts} +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.d.ts +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.js +0 -0
- /package/dist/components/{nav-item/nav-item.styles.d.ts → menu/menu-item.styles.d.ts} +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.styles.js +0 -0
- /package/dist/components/{nav-item → nav}/nav-item.d.ts +0 -0
- /package/dist/components/{nav-item → nav}/nav-item.js +0 -0
- /package/dist/components/{segmented-button-item/segmented-button-item.styles.d.ts → nav/nav-item.styles.d.ts} +0 -0
- /package/dist/components/{nav-item → nav}/nav-item.styles.js +0 -0
- /package/dist/components/{segmented-button-item → segmented-button}/segmented-button-item.d.ts +0 -0
- /package/dist/components/{select-option-group/select-option-group.style.d.ts → segmented-button/segmented-button-item.styles.d.ts} +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.component.d.ts +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.d.ts +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.js +0 -0
- /package/dist/components/{select-option/select-option.styles.d.ts → select/select-option-group.style.d.ts} +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.style.js +0 -0
- /package/dist/components/{select-option → select}/select-option.controllers.d.ts +0 -0
- /package/dist/components/{select-option → select}/select-option.d.ts +0 -0
- /package/dist/components/{select-option → select}/select-option.js +0 -0
- /package/dist/components/{stepper-item/stepper-item.styles.d.ts → select/select-option.styles.d.ts} +0 -0
- /package/dist/components/{select-option → select}/select-option.styles.js +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.component.d.ts +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.d.ts +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.js +0 -0
- /package/dist/components/{toast-wrapper/toast-wrapper.styles.d.ts → stepper/stepper-item.styles.d.ts} +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.styles.js +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.component.d.ts +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.component.js +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.styles.d.ts +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.styles.js +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.d.ts +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.d.ts +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.js +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.styles.js +0 -0
@@ -1,61 +1,61 @@
|
|
1
1
|
var m = (e) => {
|
2
2
|
throw TypeError(e);
|
3
3
|
};
|
4
|
-
var _ = (e, i,
|
5
|
-
var
|
4
|
+
var _ = (e, i, t) => i.has(e) || m("Cannot " + t);
|
5
|
+
var u = (e, i, t) => (_(e, i, "read from private field"), t ? t.call(e) : i.get(e)), g = (e, i, t) => i.has(e) ? m("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(e) : i.set(e, t), p = (e, i, t, o) => (_(e, i, "write to private field"), o ? o.call(e, t) : i.set(e, t), t);
|
6
6
|
import "../button/button.js";
|
7
7
|
import "../heading/heading.js";
|
8
8
|
import "../icon/icon.js";
|
9
9
|
import { SkfElement as C } from "../../internal/components/skf-element.js";
|
10
10
|
import { watch as v } from "../../internal/helpers/watch.js";
|
11
|
-
import B from "../../styles/component.styles.js";
|
11
|
+
import { componentStyles as B } from "../../styles/component.styles.js";
|
12
12
|
import { nothing as k, html as $ } from "lit";
|
13
|
-
import { property as
|
13
|
+
import { property as c, state as b, query as P, queryAssignedElements as E } from "lit/decorators.js";
|
14
14
|
import { classMap as w } from "lit/directives/class-map.js";
|
15
15
|
import { styles as O } from "./dialog.styles.js";
|
16
|
-
var x = Object.defineProperty, A = Object.getOwnPropertyDescriptor, n = (e, i,
|
17
|
-
for (var l =
|
18
|
-
(
|
19
|
-
return
|
20
|
-
},
|
16
|
+
var x = Object.defineProperty, A = Object.getOwnPropertyDescriptor, n = (e, i, t, o) => {
|
17
|
+
for (var l = o > 1 ? void 0 : o ? A(i, t) : i, a = e.length - 1, r; a >= 0; a--)
|
18
|
+
(r = e[a]) && (l = (o ? r(i, t, l) : r(l)) || l);
|
19
|
+
return o && l && x(i, t, l), l;
|
20
|
+
}, h, f, d;
|
21
21
|
const y = class y extends C {
|
22
22
|
constructor() {
|
23
23
|
super(...arguments);
|
24
|
+
g(this, h);
|
24
25
|
g(this, f);
|
25
|
-
g(this,
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
o.preventDefault(), o.key === "Escape" && this.close();
|
26
|
+
g(this, d);
|
27
|
+
p(this, h, 0), p(this, f, 20), p(this, d, !1), this.fullscreen = !1, this.noCloseButton = !1, this.noPadding = !1, this.open = !1, this.onClose = null, this.renderFoot = !1, this._handleBackdropClick = (t) => {
|
28
|
+
t.target === this.$dialog && this.close();
|
29
|
+
}, this._handleClose = (t) => {
|
30
|
+
this.onClose && this.onClose(t), this.close();
|
31
|
+
}, this._handleKeyDown = (t) => {
|
32
|
+
t.preventDefault(), t.key === "Escape" && this.close();
|
33
33
|
};
|
34
34
|
}
|
35
35
|
handleOpenChange() {
|
36
|
-
var
|
37
|
-
this.open ? this.showModal() : this.close(), this.open && (this.renderFoot = !!((
|
36
|
+
var t;
|
37
|
+
this.open ? this.showModal() : this.close(), this.open && (this.renderFoot = !!((t = this.footerEls) != null && t.length));
|
38
38
|
}
|
39
39
|
firstUpdated() {
|
40
|
-
this.$dialog && this.$dialog.addEventListener("close", (
|
41
|
-
|
40
|
+
this.$dialog && this.$dialog.addEventListener("close", (t) => {
|
41
|
+
t.stopPropagation(), this.emit("skf-dialog-closed");
|
42
42
|
});
|
43
43
|
}
|
44
44
|
/** @internal */
|
45
45
|
_transition() {
|
46
|
-
const
|
47
|
-
translate: `${String(
|
46
|
+
const t = this.fullscreen ? {} : {
|
47
|
+
translate: `${String(u(this, h))} ${String(u(this, f))}px`
|
48
48
|
};
|
49
49
|
return { entry: () => new Promise((a) => {
|
50
50
|
if (!this.$dialog) {
|
51
51
|
a("no dialog found");
|
52
52
|
return;
|
53
53
|
}
|
54
|
-
const
|
54
|
+
const r = this.$dialog.animate(
|
55
55
|
[
|
56
56
|
{
|
57
57
|
opacity: 0,
|
58
|
-
...
|
58
|
+
...t
|
59
59
|
},
|
60
60
|
{ opacity: 1, translate: "0 0" }
|
61
61
|
],
|
@@ -69,7 +69,7 @@ const y = class y extends C {
|
|
69
69
|
duration: 200,
|
70
70
|
fill: "forwards",
|
71
71
|
pseudoElement: "::backdrop"
|
72
|
-
}),
|
72
|
+
}), r.onfinish = () => {
|
73
73
|
a("opened");
|
74
74
|
};
|
75
75
|
}), exit: () => new Promise((a) => {
|
@@ -77,12 +77,12 @@ const y = class y extends C {
|
|
77
77
|
a("no dialog found");
|
78
78
|
return;
|
79
79
|
}
|
80
|
-
const
|
80
|
+
const r = this.$dialog.animate(
|
81
81
|
[
|
82
82
|
{ opacity: 1, translate: "0 0" },
|
83
83
|
{
|
84
84
|
opacity: 0,
|
85
|
-
...
|
85
|
+
...t
|
86
86
|
}
|
87
87
|
],
|
88
88
|
{
|
@@ -95,26 +95,26 @@ const y = class y extends C {
|
|
95
95
|
duration: 200,
|
96
96
|
fill: "forwards",
|
97
97
|
pseudoElement: "::backdrop"
|
98
|
-
}),
|
98
|
+
}), r.onfinish = () => {
|
99
99
|
a("closed");
|
100
100
|
};
|
101
101
|
}) };
|
102
102
|
}
|
103
103
|
/** Method that opens the dialog in modal state */
|
104
104
|
async showModal() {
|
105
|
-
async function o
|
106
|
-
return
|
105
|
+
async function t(o) {
|
106
|
+
return o.$dialog ? (o.$dialog.showModal(), await o._transition().entry(), o.emit("skf-dialog-opened"), !0) : !1;
|
107
107
|
}
|
108
|
-
return await
|
108
|
+
return await t(this);
|
109
109
|
}
|
110
110
|
/** Method that closes the dialog */
|
111
111
|
async close() {
|
112
|
-
if (
|
113
|
-
|
114
|
-
async function o
|
115
|
-
return
|
112
|
+
if (u(this, d) || !this.open) return;
|
113
|
+
p(this, d, !0);
|
114
|
+
async function t(o) {
|
115
|
+
return o.$dialog ? (o.emit("skf-dialog-closing"), await o._transition().exit(), o.$dialog.close(), o.open = !1, p(o, d, !1), !0) : !1;
|
116
116
|
}
|
117
|
-
return await
|
117
|
+
return await t(this);
|
118
118
|
}
|
119
119
|
render() {
|
120
120
|
return $`
|
@@ -157,25 +157,25 @@ const y = class y extends C {
|
|
157
157
|
`;
|
158
158
|
}
|
159
159
|
};
|
160
|
-
|
160
|
+
h = new WeakMap(), f = new WeakMap(), d = new WeakMap(), y.styles = [B, O];
|
161
161
|
let s = y;
|
162
162
|
n([
|
163
|
-
|
163
|
+
c({ attribute: "close-button-aria-label" })
|
164
164
|
], s.prototype, "closeButtonAriaLabel", 2);
|
165
165
|
n([
|
166
|
-
|
166
|
+
c()
|
167
167
|
], s.prototype, "heading", 2);
|
168
168
|
n([
|
169
|
-
|
169
|
+
c({ type: Boolean })
|
170
170
|
], s.prototype, "fullscreen", 2);
|
171
171
|
n([
|
172
|
-
|
172
|
+
c({ type: Boolean, attribute: "no-close-button" })
|
173
173
|
], s.prototype, "noCloseButton", 2);
|
174
174
|
n([
|
175
|
-
|
175
|
+
c({ type: Boolean, attribute: "no-padding" })
|
176
176
|
], s.prototype, "noPadding", 2);
|
177
177
|
n([
|
178
|
-
|
178
|
+
c({ type: Boolean, reflect: !0 })
|
179
179
|
], s.prototype, "open", 2);
|
180
180
|
n([
|
181
181
|
b()
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { css as a } from "lit";
|
2
|
-
const
|
2
|
+
const i = a`
|
3
3
|
/* stylelint-disable selector-class-pattern */
|
4
4
|
@layer components {
|
5
5
|
.dialog {
|
@@ -28,7 +28,7 @@ const o = a`
|
|
28
28
|
}
|
29
29
|
|
30
30
|
&::backdrop {
|
31
|
-
background-color:
|
31
|
+
background-color: oklch(from var(--skf-bg-color-neutral-7) l c h / 50%);
|
32
32
|
}
|
33
33
|
}
|
34
34
|
|
@@ -58,9 +58,9 @@ const o = a`
|
|
58
58
|
}
|
59
59
|
|
60
60
|
.dialog__body {
|
61
|
-
/* block-size: calc(100% - (var(--_skf-dialog-head-height) + (var(--skf-box-spacing) * 2))); */
|
62
61
|
display: flex;
|
63
62
|
flex-direction: column;
|
63
|
+
grid-area: body;
|
64
64
|
row-gap: var(--skf-spacing-100);
|
65
65
|
|
66
66
|
.dialog:not(.dialog--no-padding) & {
|
@@ -87,5 +87,5 @@ const o = a`
|
|
87
87
|
}
|
88
88
|
`;
|
89
89
|
export {
|
90
|
-
|
90
|
+
i as styles
|
91
91
|
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { SkfElement as n } from "../../internal/components/skf-element.js";
|
2
|
-
import m from "../../styles/component.styles.js";
|
2
|
+
import { componentStyles as m } from "../../styles/component.styles.js";
|
3
3
|
import "lit";
|
4
4
|
import { property as o } from "lit/decorators.js";
|
5
5
|
import { styles as f } from "./divider.styles.js";
|
@@ -9,13 +9,13 @@ import { type CSSResultGroup } from 'lit';
|
|
9
9
|
* - add documentation
|
10
10
|
*/
|
11
11
|
/**
|
12
|
-
* The `<skf-drawer>` is a modal component that displays content and toggle by sliding from left/right viewport edge
|
12
|
+
* The `<skf-drawer>` is a modal component that displays content and toggle by sliding from left/right viewport edge
|
13
13
|
*
|
14
14
|
* @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/0789c4-drawer) for design principles
|
15
15
|
*
|
16
|
-
* @event skf-drawer-opened - Fires when the drawer is opened (after transitioned in)
|
17
|
-
* @event skf-drawer-closing - Fires when the drawer is
|
18
|
-
* @event skf-drawer-closed - Fires when the drawer is closed (after transitioned out)
|
16
|
+
* @event {CustomEvent} skf-drawer-opened - Fires when the drawer is opened (after transitioned in)
|
17
|
+
* @event {CustomEvent} skf-drawer-closing - Fires when the drawer is closing (before transitioned out)
|
18
|
+
* @event {CustomEvent} skf-drawer-closed - Fires when the drawer is closed (after transitioned out)
|
19
19
|
*
|
20
20
|
* @slot - The Drawer's main content
|
21
21
|
*
|
@@ -46,12 +46,16 @@ export declare class SkfDrawer extends SkfElement {
|
|
46
46
|
_openChanged(): Promise<void>;
|
47
47
|
/** @internal */
|
48
48
|
private _startListeners;
|
49
|
-
|
49
|
+
/** @internal */
|
50
|
+
private _clickIsInsideElement;
|
50
51
|
/** @internal */
|
51
52
|
private _animateDrawer;
|
52
|
-
|
53
|
-
|
54
|
-
|
53
|
+
/** @internal */
|
54
|
+
private _clickstartInDialog;
|
55
|
+
/** @internal */
|
56
|
+
private _handleMouseDown;
|
57
|
+
/** @internal */
|
58
|
+
private _handleMouseUp;
|
55
59
|
close(): void;
|
56
60
|
render(): import("lit").TemplateResult<1>;
|
57
61
|
}
|
@@ -2,7 +2,7 @@ import "../icon/icon.js";
|
|
2
2
|
import { SkfElement as m } from "../../internal/components/skf-element.js";
|
3
3
|
import { watch as d } from "../../internal/helpers/watch.js";
|
4
4
|
import { MOTION_DURATIONS as p } from "@skf-design-system/ui-assets";
|
5
|
-
import f from "../../styles/component.styles.js";
|
5
|
+
import { componentStyles as f } from "../../styles/component.styles.js";
|
6
6
|
import { html as g } from "lit";
|
7
7
|
import { property as r, query as u } from "lit/decorators.js";
|
8
8
|
import { styles as _ } from "./drawer.styles.js";
|
@@ -18,7 +18,7 @@ const c = class c extends m {
|
|
18
18
|
i.cancel();
|
19
19
|
});
|
20
20
|
}, this._clickstartInDialog = !1, this._handleMouseDown = (t) => {
|
21
|
-
this.
|
21
|
+
this._clickIsInsideElement(t, this.$dialog) && (this._clickstartInDialog = !0);
|
22
22
|
}, this._handleMouseUp = () => {
|
23
23
|
if (this._clickstartInDialog) {
|
24
24
|
this._clickstartInDialog = !1;
|
@@ -43,10 +43,11 @@ const c = class c extends m {
|
|
43
43
|
},
|
44
44
|
{ signal: this._signal }
|
45
45
|
), this.addEventListener("click", (t) => {
|
46
|
-
!this.
|
46
|
+
!this._clickIsInsideElement(t, this.$dialog) && !this._clickstartInDialog && this.close();
|
47
47
|
});
|
48
48
|
}
|
49
|
-
|
49
|
+
/** @internal */
|
50
|
+
_clickIsInsideElement(t, i) {
|
50
51
|
const e = i.getBoundingClientRect();
|
51
52
|
return e.top <= t.clientY && t.clientY <= e.top + e.height && e.left <= t.clientX && t.clientX <= e.left + e.width;
|
52
53
|
}
|
@@ -4,7 +4,7 @@ import '../logo/logo.js';
|
|
4
4
|
import { SkfElement } from '../../internal/components/skf-element';
|
5
5
|
import { type CSSResultGroup } from 'lit';
|
6
6
|
/**
|
7
|
-
* The `<skf-header>` component is to be used as the site-header in the app
|
7
|
+
* The `<skf-header>` component is to be used as the site-header in the app. The navigation will be collapsed to mobile-view if the menu items exceed the available width.
|
8
8
|
*
|
9
9
|
* @documentation See [zeroheight](https://zeroheight.com/****) for design principles
|
10
10
|
*
|
@@ -19,7 +19,8 @@ export declare class SkfHeader extends SkfElement {
|
|
19
19
|
/** @internal */
|
20
20
|
private _widthObserver?;
|
21
21
|
/** If true, sets header to display in compact mode only (hanburger menu and drawer) */
|
22
|
-
compact: boolean;
|
22
|
+
set compact(value: boolean);
|
23
|
+
get compact(): boolean;
|
23
24
|
/** If defined, sets the aria-label for the hamburger button */
|
24
25
|
hamburgerAriaLabel: string;
|
25
26
|
/** If defined, sets the app or site's name */
|
@@ -2,20 +2,26 @@ import "../button/button.js";
|
|
2
2
|
import "../drawer/drawer.js";
|
3
3
|
import "../logo/logo.js";
|
4
4
|
import { SkfElement as d } from "../../internal/components/skf-element.js";
|
5
|
-
import
|
6
|
-
import { nothing as
|
7
|
-
import { property as s, state as f, queryAssignedElements as
|
5
|
+
import { componentStyles as b } from "../../styles/component.styles.js";
|
6
|
+
import { nothing as u, html as o } from "lit";
|
7
|
+
import { property as s, state as f, queryAssignedElements as w, query as _ } from "lit/decorators.js";
|
8
8
|
import { ifDefined as m } from "lit/directives/if-defined.js";
|
9
|
-
import { literal as
|
10
|
-
import { styles as
|
11
|
-
var
|
12
|
-
for (var i = void 0,
|
13
|
-
(
|
14
|
-
return i &&
|
9
|
+
import { literal as v, html as y } from "lit/static-html.js";
|
10
|
+
import { styles as $ } from "./header.styles.js";
|
11
|
+
var g = Object.defineProperty, C = Object.getOwnPropertyDescriptor, r = (c, e, n, a) => {
|
12
|
+
for (var i = a > 1 ? void 0 : a ? C(e, n) : e, p = c.length - 1, h; p >= 0; p--)
|
13
|
+
(h = c[p]) && (i = (a ? h(e, n, i) : h(i)) || i);
|
14
|
+
return a && i && g(e, n, i), i;
|
15
15
|
};
|
16
|
-
const
|
16
|
+
const l = class l extends d {
|
17
17
|
constructor() {
|
18
|
-
super(...arguments), this.
|
18
|
+
super(...arguments), this.hamburgerAriaLabel = "Show navigation", this.isCompact = !1, this.openDrawer = !1;
|
19
|
+
}
|
20
|
+
set compact(e) {
|
21
|
+
this.isCompact = e;
|
22
|
+
}
|
23
|
+
get compact() {
|
24
|
+
return this.isCompact;
|
19
25
|
}
|
20
26
|
firstUpdated() {
|
21
27
|
this.updateComplete.then(() => {
|
@@ -42,20 +48,20 @@ const n = class n extends d {
|
|
42
48
|
}
|
43
49
|
/** @internal */
|
44
50
|
_renderMeta() {
|
45
|
-
const e = this.siteUrl ?
|
51
|
+
const e = this.siteUrl ? v`a` : v`div`;
|
46
52
|
return y`
|
47
53
|
<${e} href=${m(this.siteUrl)} id="meta">
|
48
54
|
<skf-logo color="inverse"></skf-logo>
|
49
|
-
${this.siteName ?
|
55
|
+
${this.siteName ? o`<h2>${this.siteName}</h2>` : u}
|
50
56
|
</${e}>
|
51
57
|
`;
|
52
58
|
}
|
53
59
|
render() {
|
54
|
-
return
|
60
|
+
return o`
|
55
61
|
<header role="banner">
|
56
62
|
${this._renderMeta()}
|
57
63
|
<div id="nav-wrapper">
|
58
|
-
${this.isCompact ?
|
64
|
+
${this.isCompact ? o`
|
59
65
|
<button
|
60
66
|
@click=${() => this.openDrawer = !this.openDrawer}
|
61
67
|
aria-controls="drawer"
|
@@ -73,38 +79,38 @@ const n = class n extends d {
|
|
73
79
|
>
|
74
80
|
<slot></slot>
|
75
81
|
</skf-drawer>
|
76
|
-
` :
|
82
|
+
` : o`<slot></slot>`}
|
77
83
|
</div>
|
78
84
|
</header>
|
79
85
|
`;
|
80
86
|
}
|
81
87
|
};
|
82
|
-
|
83
|
-
let t =
|
88
|
+
l.styles = [b, $];
|
89
|
+
let t = l;
|
84
90
|
r([
|
85
91
|
s({ type: Boolean, reflect: !0 })
|
86
|
-
], t.prototype, "compact");
|
92
|
+
], t.prototype, "compact", 1);
|
87
93
|
r([
|
88
94
|
s({ attribute: "hamburger-aria-label" })
|
89
|
-
], t.prototype, "hamburgerAriaLabel");
|
95
|
+
], t.prototype, "hamburgerAriaLabel", 2);
|
90
96
|
r([
|
91
97
|
s({ attribute: "site-name" })
|
92
|
-
], t.prototype, "siteName");
|
98
|
+
], t.prototype, "siteName", 2);
|
93
99
|
r([
|
94
100
|
s({ attribute: "site-url" })
|
95
|
-
], t.prototype, "siteUrl");
|
101
|
+
], t.prototype, "siteUrl", 2);
|
96
102
|
r([
|
97
103
|
s({ type: Boolean, reflect: !0, state: !0, attribute: "is-compact" })
|
98
|
-
], t.prototype, "isCompact");
|
104
|
+
], t.prototype, "isCompact", 2);
|
99
105
|
r([
|
100
106
|
f()
|
101
|
-
], t.prototype, "openDrawer");
|
107
|
+
], t.prototype, "openDrawer", 2);
|
102
108
|
r([
|
103
|
-
|
104
|
-
], t.prototype, "nav");
|
109
|
+
w({ selector: "skf-nav" })
|
110
|
+
], t.prototype, "nav", 2);
|
105
111
|
r([
|
106
|
-
|
107
|
-
], t.prototype, "$navWrapper");
|
112
|
+
_("#nav-wrapper")
|
113
|
+
], t.prototype, "$navWrapper", 2);
|
108
114
|
export {
|
109
115
|
t as SkfHeader
|
110
116
|
};
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { SkfElement } from '../../internal/components/skf-element.js';
|
2
|
-
import type { HeadingType } from '../../internal/
|
2
|
+
import type { HeadingType } from '../../internal/types.js';
|
3
3
|
import { type CSSResultGroup } from 'lit';
|
4
|
-
type SkfHeadingType = HeadingType;
|
5
4
|
/**
|
6
5
|
* The `<Heading>` component is to deliniate content on a page. When using, take note not to skip heading levels.<br>
|
7
6
|
* It extends the interface of native html `<h1>` to `<h4>` elements.
|
@@ -13,9 +12,8 @@ type SkfHeadingType = HeadingType;
|
|
13
12
|
export declare class SkfHeading extends SkfElement {
|
14
13
|
static styles: CSSResultGroup;
|
15
14
|
/** Controls which heading element will be rendered. Should not be used to affect appearance */
|
16
|
-
as:
|
15
|
+
as: HeadingType;
|
17
16
|
/** If defined, changes the appearance of the heading */
|
18
|
-
styledAs?:
|
17
|
+
styledAs?: HeadingType;
|
19
18
|
render(): import("lit").TemplateResult;
|
20
19
|
}
|
21
|
-
export {};
|
@@ -1,34 +1,35 @@
|
|
1
|
-
import { SkfElement as
|
2
|
-
import
|
1
|
+
import { SkfElement as f } from "../../internal/components/skf-element.js";
|
2
|
+
import { componentStyles as n } from "../../styles/component.styles.js";
|
3
3
|
import "lit";
|
4
|
-
import { property as
|
5
|
-
import {
|
4
|
+
import { property as i } from "lit/decorators.js";
|
5
|
+
import { literal as u, html as c } from "lit/static-html.js";
|
6
6
|
import { styles as y } from "./heading.styles.js";
|
7
|
-
var
|
8
|
-
for (var t = void 0,
|
9
|
-
(
|
10
|
-
return t &&
|
7
|
+
var d = Object.defineProperty, a = (l, r, p, h) => {
|
8
|
+
for (var t = void 0, o = l.length - 1, m; o >= 0; o--)
|
9
|
+
(m = l[o]) && (t = m(r, p, t) || t);
|
10
|
+
return t && d(r, p, t), t;
|
11
11
|
};
|
12
|
-
const s = class s extends
|
12
|
+
const s = class s extends f {
|
13
13
|
constructor() {
|
14
|
-
super(...arguments), this.as = "
|
14
|
+
super(...arguments), this.as = "h2";
|
15
15
|
}
|
16
16
|
render() {
|
17
|
+
const r = u`${this.as}`;
|
17
18
|
return c`
|
18
|
-
<${
|
19
|
+
<${r} id="root">
|
19
20
|
<slot></slot>
|
20
|
-
</${
|
21
|
+
</${r}>
|
21
22
|
`;
|
22
23
|
}
|
23
24
|
};
|
24
|
-
s.styles = [
|
25
|
-
let
|
26
|
-
|
27
|
-
|
28
|
-
],
|
29
|
-
|
30
|
-
|
31
|
-
],
|
25
|
+
s.styles = [n, y];
|
26
|
+
let e = s;
|
27
|
+
a([
|
28
|
+
i({ reflect: !0 })
|
29
|
+
], e.prototype, "as");
|
30
|
+
a([
|
31
|
+
i({ attribute: "styled-as", reflect: !0 })
|
32
|
+
], e.prototype, "styledAs");
|
32
33
|
export {
|
33
|
-
|
34
|
+
e as SkfHeading
|
34
35
|
};
|
@@ -1,31 +1,25 @@
|
|
1
1
|
import { SkfElement } from '../../internal/components/skf-element.js';
|
2
|
-
import {
|
2
|
+
import type { Icon, IconColor } from '../../internal/types.js';
|
3
|
+
import { type IconSize } from '@skf-design-system/ui-assets';
|
3
4
|
import { type CSSResultGroup } from 'lit';
|
5
|
+
type SkfIconSize = IconSize;
|
4
6
|
/**
|
5
|
-
* The `<skf-icon>` component is used to clarify interface elements. When used, should always be paired with (possibly invisible) text
|
7
|
+
* The `<skf-icon>` component is used to clarify interface elements. When used, should always be paired with (possibly invisible) text.
|
6
8
|
*
|
7
|
-
* @documentation See [
|
9
|
+
* @documentation See [zeroheight](https://zeroheight.com/*) for design principles
|
8
10
|
*
|
9
11
|
* @tagname skf-icon
|
10
12
|
*/
|
11
13
|
export declare class SkfIcon extends SkfElement {
|
12
14
|
static styles: CSSResultGroup;
|
13
|
-
/**
|
14
|
-
|
15
|
-
* @type { "primary" | "inverse" | "emphasised" | "secondary" | "success" | "info" | "warning" | "error" | "alert" }
|
16
|
-
*/
|
17
|
-
color: IconColor | SeverityFgColor;
|
15
|
+
/** Sets the color of the icon */
|
16
|
+
color: IconColor;
|
18
17
|
/** If defined, adds an alternate description to use for assistive devices */
|
19
18
|
label?: string;
|
20
|
-
/**
|
21
|
-
* Name of the icon to display
|
22
|
-
* @type { "addCircleOutline" | "addCircle" | "addPlus" | "arrowBackIos" | "arrowBack" | "arrowDown" | "arrowForwardIos" | "arrowForward" | "arrowLeft" | "arrowRight" | "arrowUpDown" | "arrowUp" | "article" | "asset" | "attachment" | "bandCursor" | "bands" | "batteryEmpty" | "batteryFull" | "batteryLow" | "bearingFault" | "bluetoothDisabled" | "bluetooth" | "book" | "bookmarkOutline" | "bookmark" | "calculator" | "calendarBusy" | "calendarCheck" | "calendarEmpty" | "calendarMonth" | "calendarReccuring" | "call" | "caretDown" | "caretUpDown" | "caretUp" | "chat" | "checkCircleOutline" | "checkCircle" | "checkSmall" | "check" | "chevronDownUp" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUpDown" | "chevronUp" | "chip" | "circleStatus" | "closeAll" | "closeAlt" | "close" | "columnGraph" | "comment" | "connection0" | "connection1" | "connection2" | "connection3" | "connection4" | "contentPaste" | "copy" | "cpmCyclesPerMinute" | "dangerOutline" | "danger" | "defectFrequenciesAlt" | "defectFrequencies" | "deleteOutline" | "delete" | "devices" | "directions" | "doubleChevronLeft" | "doubleChevronRight" | "downloadDone" | "download" | "draftOutline" | "draft" | "dragDrop" | "drop" | "duplicate" | "editOutline" | "edit" | "emailOutline" | "emailPdf" | "email" | "errorOutline" | "error" | "exclamation" | "facebook" | "filterOutline" | "filter" | "findReplace" | "forbidden" | "frequencyHz" | "fullScreen" | "fullscreenExit" | "functionalGroup" | "hamburgerMenu" | "harmonicCursor" | "heatmap" | "hierarchy" | "history" | "homeOutline" | "home" | "hourglassOutline" | "hourglass" | "image" | "imx" | "infoOutline" | "info" | "instagram" | "integration" | "iosShare" | "kebabMore" | "language" | "lightbulbOutline" | "lightbulb" | "link" | "linkedin" | "listGroup" | "list" | "locationPin" | "lockOutline" | "lock" | "logOut" | "login" | "meatballsMoreCircle" | "meatballsMore" | "microphone" | "nearMe" | "noData" | "notificationsBellOutline" | "notificationsBell" | "o" | "offer" | "openInNew" | "overlaysBaseline" | "pan360" | "paper" | "pause" | "pdfOutline" | "pdf" | "person" | "photoCameraOutline" | "photoCamera" | "pieChart" | "pinOutline" | "pin" | "play" | "powerOff" | "printOutline" | "print" | "privacyPolicyOutline" | "privacyPolicy" | "proCollect" | "recAction" | "refresh" | "removeMinus" | "reorder" | "reply" | "report" | "rewakableRoute" | "route" | "search" | "sendOutline" | "send" | "sensorAlt" | "sensor" | "settingsOutline" | "settings" | "share" | "shoppingCart" | "sidebandCursor" | "singleCursor" | "skfBearing" | "spectrum" | "starOutline" | "star" | "stop" | "sync" | "time" | "timewave" | "translate" | "trend" | "trendingUp" | "twitter" | "undo" | "unknownDiamondOutline" | "unknownDiamond" | "unknownOutline" | "unknown" | "unlink" | "unlockOutline" | "unlock" | "unscheduledAction" | "upload" | "vibrationAlt" | "vibration" | "view3D" | "viewFull" | "viewHorizontal" | "viewVertical" | "visibilityOffOutline" | "visibilityOff" | "visibilityOutline" | "visibility" | "warningDiamondOutline" | "warningDiamond" | "warningOutline" | "warning" | "youtube" | "zoomIn" | "zoomOut" }
|
23
|
-
*/
|
19
|
+
/** Name of the icon to display */
|
24
20
|
name: Icon;
|
25
|
-
/**
|
26
|
-
|
27
|
-
* @type { "xs" | "sm" | "md" | "lg" }
|
28
|
-
*/
|
29
|
-
size: IconSize;
|
21
|
+
/** Size of the icon */
|
22
|
+
size: SkfIconSize;
|
30
23
|
render(): import("lit").TemplateResult<1>;
|
31
24
|
}
|
25
|
+
export {};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { SkfElement as f } from "../../internal/components/skf-element.js";
|
2
2
|
import { ICONS as c } from "@skf-design-system/ui-assets";
|
3
|
-
import d from "../../styles/component.styles.js";
|
3
|
+
import { componentStyles as d } from "../../styles/component.styles.js";
|
4
4
|
import { html as h } from "lit";
|
5
5
|
import { property as t } from "lit/decorators.js";
|
6
6
|
import { classMap as u } from "lit/directives/class-map.js";
|
7
7
|
import { ifDefined as s } from "lit/directives/if-defined.js";
|
8
|
-
import v from "./icon.styles.js";
|
8
|
+
import { styles as v } from "./icon.styles.js";
|
9
9
|
var y = Object.defineProperty, o = (m, p, a, $) => {
|
10
10
|
for (var r = void 0, i = m.length - 1, n; i >= 0; i--)
|
11
11
|
(n = m[i]) && (r = n(p, a, r) || r);
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult;
|