@skf-design-system/ui-components 1.0.0-alpha.35 → 1.0.0-alpha.36
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/custom-elements.json +25490 -0
- package/dist/components/accordion/accordion.component.d.ts +1 -1
- package/dist/components/accordion/accordion.component.js +2 -2
- package/dist/components/card/card.component.d.ts +2 -0
- package/dist/components/card/card.styles.js +2 -1
- package/dist/components/datepicker/datepicker.component.js +1 -0
- package/dist/components/icon/icon.component.d.ts +1 -4
- package/dist/components/icon/icon.component.js +41 -53
- package/dist/components/icon/icon.styles.js +0 -1
- package/dist/components/input/input.component.js +1 -0
- package/dist/components/link/link.component.d.ts +15 -18
- package/dist/components/link/link.component.js +99 -108
- package/dist/components/link/link.styles.js +45 -45
- package/dist/components/menu/menu-item.component.d.ts +1 -1
- package/dist/components/menu/menu-item.component.js +8 -8
- package/dist/components/menu/menu-item.styles.js +8 -5
- package/dist/components/nav/nav-item.component.d.ts +4 -0
- package/dist/components/nav/nav-item.component.js +44 -25
- package/dist/components/nav/nav-item.styles.js +29 -25
- package/dist/components/nav/nav.component.d.ts +6 -0
- package/dist/components/nav/nav.component.js +42 -21
- package/dist/components/nav/nav.styles.js +15 -9
- package/dist/components/popover/popover.component.d.ts +4 -0
- package/dist/components/popover/popover.component.js +31 -23
- package/dist/components/progress/progress.component.d.ts +2 -0
- package/dist/components/progress/progress.component.js +38 -29
- package/dist/components/progress/progress.styles.js +3 -3
- package/dist/components/select/select-option-group.component.d.ts +4 -0
- package/dist/components/select/select-option-group.component.js +37 -18
- package/dist/components/select/select-option-group.style.js +12 -6
- package/dist/components/select/select-option.component.d.ts +5 -1
- package/dist/components/select/select-option.component.js +69 -52
- package/dist/components/select/select-option.styles.js +43 -31
- package/dist/components/select/select.component.d.ts +5 -1
- package/dist/components/select/select.component.js +47 -29
- package/dist/components/select/select.controllers.js +2 -1
- package/dist/components/textarea/textarea.component.js +5 -4
- package/dist/components/toast/toast.component.js +9 -9
- package/dist/components/toast/toast.singleton.d.ts +1 -1
- package/dist/components/toast/toast.singleton.js +18 -18
- package/dist/custom-elements.json +758 -678
- package/dist/internal/base-classes/popover/popover.base.d.ts +2 -2
- package/dist/internal/base-classes/popover/popover.base.js +17 -17
- package/dist/internal/base-classes/popover/popover.styles.js +4 -5
- package/dist/internal/components/hint/hint.component.d.ts +4 -0
- package/dist/internal/components/hint/hint.component.js +47 -20
- package/dist/internal/components/hint/hint.styles.js +29 -25
- package/dist/types/jsx/custom-element-jsx.d.ts +188 -70
- package/dist/types/vue/index.d.ts +81 -69
- package/dist/vscode.html-custom-data.json +91 -95
- package/dist/web-types.json +204 -203
- package/package.json +13 -13
@@ -16,8 +16,8 @@ export declare class SkfPopoverBase extends SkfElement {
|
|
16
16
|
/** @internal */
|
17
17
|
triggerEvent: 'mouseenter' | 'click';
|
18
18
|
$arrow: HTMLElement;
|
19
|
-
|
20
|
-
|
19
|
+
abortEventsController: AbortController;
|
20
|
+
signal: AbortSignal;
|
21
21
|
protected popoverController: PopoverController;
|
22
22
|
constructor();
|
23
23
|
disconnectedCallback(): void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { flip as O, offset as
|
1
|
+
import { flip as O, offset as C, arrow as x, computePosition as A } from "@floating-ui/dom";
|
2
2
|
import { SkfElement as S } from "../../components/skf-element.js";
|
3
3
|
import { PopoverController as P } from "../../controllers/popover.controller.js";
|
4
4
|
import { uuid as _ } from "../../helpers/uuid.js";
|
@@ -7,11 +7,11 @@ import { componentStyles as L } from "../../../styles/component.styles.js";
|
|
7
7
|
import { nothing as F, html as y } from "lit";
|
8
8
|
import { property as u, state as c, query as T } from "lit/decorators.js";
|
9
9
|
import { classMap as j } from "lit/directives/class-map.js";
|
10
|
-
import { styles as
|
11
|
-
var
|
10
|
+
import { styles as M } from "./popover.styles.js";
|
11
|
+
var k = Object.defineProperty, R = Object.getOwnPropertyDescriptor, r = (m, t, o, i) => {
|
12
12
|
for (var e = i > 1 ? void 0 : i ? R(t, o) : t, n = m.length - 1, a; n >= 0; n--)
|
13
13
|
(a = m[n]) && (e = (i ? a(t, o, e) : a(e)) || e);
|
14
|
-
return i && e &&
|
14
|
+
return i && e && k(t, o, e), e;
|
15
15
|
}, p;
|
16
16
|
const s = (p = class extends S {
|
17
17
|
constructor() {
|
@@ -30,9 +30,9 @@ const s = (p = class extends S {
|
|
30
30
|
}, this.reposition = async () => {
|
31
31
|
var n, a, h;
|
32
32
|
if (!this.$anchor) return;
|
33
|
-
const t = [O(),
|
34
|
-
this.arrow && t.push(
|
35
|
-
const { x: o, y: i, middlewareData: e } = await
|
33
|
+
const t = [O(), C(this.offset)];
|
34
|
+
this.arrow && t.push(x({ element: this.$arrow }));
|
35
|
+
const { x: o, y: i, middlewareData: e } = await A(this.$anchor, this.$popover, {
|
36
36
|
placement: this.placement,
|
37
37
|
middleware: t,
|
38
38
|
strategy: "fixed"
|
@@ -41,17 +41,17 @@ const s = (p = class extends S {
|
|
41
41
|
left: `${String(o)}px`,
|
42
42
|
top: `${String(i)}px`
|
43
43
|
}), this.arrow) {
|
44
|
-
const d = this.placement.split("-")[0], l = { top: "bottom", right: "left", bottom: "top", left: "right" }[d] ?? "",
|
44
|
+
const d = this.placement.split("-")[0], l = { top: "bottom", right: "left", bottom: "top", left: "right" }[d] ?? "", g = (n = e.flip) == null ? void 0 : n.index, v = (a = e.arrow) == null ? void 0 : a.x, b = (h = e.arrow) == null ? void 0 : h.y, $ = typeof v == "number" ? `${String(v)}px` : "", w = typeof b == "number" ? `${String(b)}px` : "", E = {
|
45
45
|
bottom: 45,
|
46
46
|
right: 135,
|
47
47
|
top: 225,
|
48
48
|
left: 315
|
49
49
|
};
|
50
50
|
Object.assign(this.$arrow.style, {
|
51
|
-
top:
|
52
|
-
[this.placement.includes("left") ? "right" : "left"]:
|
53
|
-
[
|
54
|
-
rotate: `${(E[l] + (
|
51
|
+
top: w,
|
52
|
+
[this.placement.includes("left") ? "right" : "left"]: $,
|
53
|
+
[g ? d : l]: "calc(var(--_skf-popover-arrow-size) * -1)",
|
54
|
+
rotate: `${(E[l] + (g ? 180 : 0)).toString()}deg`
|
55
55
|
});
|
56
56
|
}
|
57
57
|
}, this.handleEscapeKey = (t) => {
|
@@ -81,13 +81,13 @@ const s = (p = class extends S {
|
|
81
81
|
), this.$popover.id = _(this.$anchor.id), ["popup", "menu"].includes(this.variant) && (this.$anchor.setAttribute("aria-haspopup", "true"), this.setAttribute("aria-labelledby", this.$anchor.id)), ["menu"].includes(this.variant) && this.$anchor.setAttribute("aria-controls", this.$popover.id), ["popup"].includes(this.variant) && t && (this.role = "dialog"), ["tooltip"].includes(this.variant) && this.$anchor.addEventListener("focusin", this.open.bind(this), { signal: this.signal });
|
82
82
|
}
|
83
83
|
open(t) {
|
84
|
-
t.stopPropagation(), this._toggleOpen(!0), document.addEventListener("keydown", this.handleEscapeKey.bind(this), { signal: this.signal }), this.openExtended();
|
84
|
+
t.stopPropagation(), this._toggleOpen(!0), this.abortEventsController = new AbortController(), this.signal = this.abortEventsController.signal, document.addEventListener("keydown", this.handleEscapeKey.bind(this), { signal: this.signal }), this.openExtended();
|
85
85
|
}
|
86
86
|
/** @internal add additional open tasks here in UI component */
|
87
87
|
openExtended() {
|
88
88
|
}
|
89
89
|
close() {
|
90
|
-
this.closeExtended(), this._toggleOpen(!1),
|
90
|
+
this.closeExtended(), this._toggleOpen(!1), this.abortEventsController.abort();
|
91
91
|
}
|
92
92
|
/** @internal add additional close tasks here in UI component */
|
93
93
|
closeExtended() {
|
@@ -106,10 +106,10 @@ const s = (p = class extends S {
|
|
106
106
|
<div
|
107
107
|
@toggle=${this._handleToggle}
|
108
108
|
class=${j({ popover: !0, ...p.classMap })}
|
109
|
-
id="
|
109
|
+
id="root"
|
110
110
|
>
|
111
111
|
<slot></slot>
|
112
|
-
${this.arrow ? y`<div
|
112
|
+
${this.arrow ? y`<div id="arrow"></div>` : F}
|
113
113
|
</div>
|
114
114
|
`;
|
115
115
|
}
|
@@ -134,7 +134,7 @@ const s = (p = class extends S {
|
|
134
134
|
return h;
|
135
135
|
}
|
136
136
|
}
|
137
|
-
}, p.styles = [L,
|
137
|
+
}, p.styles = [L, M], p.classMap = {}, p);
|
138
138
|
r([
|
139
139
|
u()
|
140
140
|
], s.prototype, "placement", 2);
|
@@ -1,9 +1,7 @@
|
|
1
1
|
import { css as o } from "lit";
|
2
2
|
const e = o`
|
3
|
-
/* stylelint-disable selector-class-pattern */
|
4
3
|
@layer components {
|
5
4
|
:host {
|
6
|
-
background-color: var(--skf-bg-color-neutral-1);
|
7
5
|
border: none;
|
8
6
|
border-radius: var(--skf-border-radius-sm);
|
9
7
|
box-shadow: var(--skf-shadow-md);
|
@@ -19,15 +17,16 @@ const e = o`
|
|
19
17
|
display: none;
|
20
18
|
}
|
21
19
|
|
22
|
-
#
|
20
|
+
#root {
|
21
|
+
background-color: var(--skf-bg-color-neutral-1);
|
23
22
|
height: 100%;
|
24
23
|
width: 100%;
|
25
24
|
}
|
26
25
|
|
27
|
-
|
26
|
+
#arrow {
|
28
27
|
--_skf-popover-arrow-size: calc(6px * 0.7071);
|
29
28
|
|
30
|
-
background-color:
|
29
|
+
background-color: inherit;
|
31
30
|
block-size: calc(var(--_skf-popover-arrow-size) * 2);
|
32
31
|
box-shadow: 1px 1px 2px 0 rgb(0 0 0 / 5%);
|
33
32
|
inline-size: calc(var(--_skf-popover-arrow-size) * 2);
|
@@ -3,7 +3,11 @@ import { SkfElement } from '../../components/skf-element.js';
|
|
3
3
|
import type { Severity } from '../../types.js';
|
4
4
|
import { type CSSResultGroup } from 'lit';
|
5
5
|
export declare class SkfHint extends SkfElement {
|
6
|
+
#private;
|
6
7
|
static styles: CSSResultGroup;
|
8
|
+
disabled: boolean;
|
7
9
|
severity?: Severity;
|
10
|
+
/** @internal */
|
11
|
+
_handleStateChange(property: string, _prev: unknown, next: unknown): void;
|
8
12
|
render(): import("lit").TemplateResult<1>;
|
9
13
|
}
|
@@ -1,21 +1,42 @@
|
|
1
|
+
var v = (t) => {
|
2
|
+
throw TypeError(t);
|
3
|
+
};
|
4
|
+
var d = (t, e, s) => e.has(t) || v("Cannot " + s);
|
5
|
+
var m = (t, e, s) => (d(t, e, "read from private field"), s ? s.call(t) : e.get(t)), h = (t, e, s) => e.has(t) ? v("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), c = (t, e, s, o) => (d(t, e, "write to private field"), o ? o.call(t, s) : e.set(t, s), s);
|
1
6
|
import "../../../components/icon/icon.js";
|
2
|
-
import { SkfElement as
|
3
|
-
import { ICON_SEVERITY as
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
import { SkfElement as O } from "../skf-element.js";
|
8
|
+
import { ICON_SEVERITY as g } from "../../constants/iconSeverity.js";
|
9
|
+
import { stateMap as w } from "../../helpers/stateMap.js";
|
10
|
+
import { watch as C } from "../../helpers/watch.js";
|
11
|
+
import { componentStyles as P } from "../../../styles/component.styles.js";
|
12
|
+
import { html as _ } from "lit";
|
13
|
+
import { property as b } from "lit/decorators.js";
|
14
|
+
import { styles as S } from "./hint.styles.js";
|
15
|
+
var j = Object.defineProperty, x = Object.getOwnPropertyDescriptor, f = (t, e, s, o) => {
|
16
|
+
for (var r = o > 1 ? void 0 : o ? x(e, s) : e, n = t.length - 1, l; n >= 0; n--)
|
17
|
+
(l = t[n]) && (r = (o ? l(e, s, r) : l(r)) || r);
|
18
|
+
return o && r && j(e, s, r), r;
|
19
|
+
};
|
20
|
+
const u = {
|
21
|
+
disabled: "disabled",
|
22
|
+
severity: ["error", "info", "success", "warning"]
|
12
23
|
};
|
13
|
-
|
24
|
+
var p, a;
|
25
|
+
const y = class y extends O {
|
26
|
+
constructor() {
|
27
|
+
super(...arguments);
|
28
|
+
h(this, p);
|
29
|
+
h(this, a);
|
30
|
+
c(this, p, this.attachInternals()), c(this, a, m(this, p).states), this.disabled = !1;
|
31
|
+
}
|
32
|
+
_handleStateChange(s, o, r) {
|
33
|
+
w(m(this, a), u[s]).set(r);
|
34
|
+
}
|
14
35
|
render() {
|
15
|
-
return
|
36
|
+
return _`
|
16
37
|
<div id="root">
|
17
|
-
${this.severity &&
|
18
|
-
<skf-icon color=${this.severity} name="${
|
38
|
+
${this.severity && _`
|
39
|
+
<skf-icon color=${this.severity} name="${g[this.severity]}" size="xs">
|
19
40
|
</skf-icon>
|
20
41
|
`}
|
21
42
|
<slot></slot>
|
@@ -23,11 +44,17 @@ const o = class o extends l {
|
|
23
44
|
`;
|
24
45
|
}
|
25
46
|
};
|
26
|
-
|
27
|
-
let
|
28
|
-
|
29
|
-
|
30
|
-
],
|
47
|
+
p = new WeakMap(), a = new WeakMap(), y.styles = [P, S];
|
48
|
+
let i = y;
|
49
|
+
f([
|
50
|
+
b({ type: Boolean })
|
51
|
+
], i.prototype, "disabled", 2);
|
52
|
+
f([
|
53
|
+
b({ type: String })
|
54
|
+
], i.prototype, "severity", 2);
|
55
|
+
f([
|
56
|
+
C(Object.keys(u))
|
57
|
+
], i.prototype, "_handleStateChange", 1);
|
31
58
|
export {
|
32
|
-
|
59
|
+
i as SkfHint
|
33
60
|
};
|
@@ -1,35 +1,39 @@
|
|
1
|
-
import { css as
|
2
|
-
const s =
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
font-size: var(--skf-font-size-75);
|
8
|
-
font-weight: var(--skf-font-weight-medium);
|
9
|
-
gap: var(--skf-spacing-25);
|
1
|
+
import { css as o } from "lit";
|
2
|
+
const s = o`
|
3
|
+
@layer components {
|
4
|
+
@layer base {
|
5
|
+
#root {
|
6
|
+
--_skf-hint-color: var(--skf-text-color-secondary);
|
10
7
|
|
11
|
-
|
12
|
-
|
8
|
+
align-items: center;
|
9
|
+
color: var(--_skf-hint-color);
|
10
|
+
display: flex;
|
11
|
+
font-size: var(--skf-font-size-75);
|
12
|
+
font-weight: var(--skf-font-weight-medium);
|
13
|
+
gap: var(--skf-spacing-25);
|
14
|
+
}
|
13
15
|
}
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
-
|
17
|
+
@layer mods {
|
18
|
+
:host(:state(disabled)) #root {
|
19
|
+
--_skf-hint-color: var(--skf-interactive-text-color-disabled);
|
20
|
+
}
|
18
21
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
+
:host(:not(:state(disabled)):state(error)) #root {
|
23
|
+
--_skf-hint-color: var(--skf-severity-fg-color-error);
|
24
|
+
}
|
22
25
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
+
:host(:not(:state(disabled)):state(info)) #root {
|
27
|
+
--_skf-hint-color: var(--skf-severity-fg-color-info);
|
28
|
+
}
|
26
29
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
+
:host(:not(:state(disabled)):state(success)) #root {
|
31
|
+
--_skf-hint-color: var(--skf-severity-fg-color-success);
|
32
|
+
}
|
30
33
|
|
31
|
-
|
32
|
-
|
34
|
+
:host(:not(:state(disabled)):state(warning)) #root {
|
35
|
+
--_skf-hint-color: var(--skf-severity-fg-color-warning);
|
36
|
+
}
|
33
37
|
}
|
34
38
|
}
|
35
39
|
`;
|
@@ -15,13 +15,13 @@ import type { SkfDialog, CustomEvent } from "../../components/dialog/dialog.comp
|
|
15
15
|
import type { SkfDivider } from "../../components/divider/divider.component.js";
|
16
16
|
import type { SkfDrawer, CustomEvent } from "../../components/drawer/drawer.component.js";
|
17
17
|
import type { SkfLogo } from "../../components/logo/logo.component.js";
|
18
|
+
import type { SkfLink, CustomEvent } from "../../components/link/link.component.js";
|
19
|
+
import type { SkfNavItem } from "../../components/nav-item/nav-item.component.js";
|
18
20
|
import type { SkfNav } from "../../components/nav/nav.component.js";
|
19
21
|
import type { SkfHeader } from "../../components/header/header.component.js";
|
20
22
|
import type { SkfInput, CustomEvent } from "../../components/input/input.component.js";
|
21
|
-
import type {
|
22
|
-
import type { SkfMenuItem } from "../../components/menu-item/menu-item.component.js";
|
23
|
+
import type { SkfMenuItem, CustomEvent } from "../../components/menu-item/menu-item.component.js";
|
23
24
|
import type { SkfMenu, CustomEvent } from "../../components/menu/menu.component.js";
|
24
|
-
import type { SkfNavItem } from "../../components/nav-item/nav-item.component.js";
|
25
25
|
import type { SkfPopover, CustomEvent } from "../../components/popover/popover.component.js";
|
26
26
|
import type { SkfProgress } from "../../components/progress/progress.component.js";
|
27
27
|
import type { SkfRadio, Event } from "../../components/radio/radio.component.js";
|
@@ -105,7 +105,113 @@ type BaseProps = {
|
|
105
105
|
translate?: "yes" | "no";
|
106
106
|
};
|
107
107
|
|
108
|
-
type BaseEvents = {
|
108
|
+
type BaseEvents = {
|
109
|
+
// Mouse Events
|
110
|
+
|
111
|
+
/** Triggered when the element is clicked by the user by mouse or keyboard. */
|
112
|
+
onClick?: (event: MouseEvent) => void;
|
113
|
+
/** Fired when the context menu is triggered, often by right-clicking. */
|
114
|
+
onContextMenu?: (event: MouseEvent) => void;
|
115
|
+
/** Fired when the element is double-clicked. */
|
116
|
+
onDoubleClick?: (event: MouseEvent) => void;
|
117
|
+
/** Fired repeatedly as the draggable element is being dragged. */
|
118
|
+
onDrag?: (event: DragEvent) => void;
|
119
|
+
/** Fired when the dragging of a draggable element is finished. */
|
120
|
+
onDragEnd?: (event: DragEvent) => void;
|
121
|
+
/** Fired when a dragged element or text selection enters a valid drop target. */
|
122
|
+
onDragEnter?: (event: DragEvent) => void;
|
123
|
+
/** Fired when a dragged element or text selection leaves a valid drop target. */
|
124
|
+
onDragExit?: (event: DragEvent) => void;
|
125
|
+
/** Fired when a dragged element or text selection leaves a valid drop target. */
|
126
|
+
onDragLeave?: (event: DragEvent) => void;
|
127
|
+
/** Fired when an element or text selection is being dragged over a valid drop target (every few hundred milliseconds). */
|
128
|
+
onDragOver?: (event: DragEvent) => void;
|
129
|
+
/** Fired when a draggable element starts being dragged. */
|
130
|
+
onDragStart?: (event: DragEvent) => void;
|
131
|
+
/** Fired when a dragged element is dropped onto a drop target. */
|
132
|
+
onDrop?: (event: DragEvent) => void;
|
133
|
+
/** Fired when a mouse button is pressed down on the element. */
|
134
|
+
onMouseDown?: (event: MouseEvent) => void;
|
135
|
+
/** Fired when the mouse cursor enters the element. */
|
136
|
+
onMouseEnter?: (event: MouseEvent) => void;
|
137
|
+
/** Triggered when the mouse cursor leaves the element. */
|
138
|
+
onMouseLeave?: (event: MouseEvent) => void;
|
139
|
+
/** Fired at an element when a pointing device (usually a mouse) is moved while the cursor's hotspot is inside it. */
|
140
|
+
onMouseMove?: (event: MouseEvent) => void;
|
141
|
+
/** Fired at an Element when a pointing device (usually a mouse) is used to move the cursor so that it is no longer contained within the element or one of its children. */
|
142
|
+
onMouseOut?: (event: MouseEvent) => void;
|
143
|
+
/** Fired at an Element when a pointing device (such as a mouse or trackpad) is used to move the cursor onto the element or one of its child elements. */
|
144
|
+
onMouseOver?: (event: MouseEvent) => void;
|
145
|
+
/** Fired when a mouse button is released on the element. */
|
146
|
+
onMouseUp?: (event: MouseEvent) => void;
|
147
|
+
|
148
|
+
// Keyboard Events
|
149
|
+
|
150
|
+
/** Fired when a key is pressed down. */
|
151
|
+
onKeyDown?: (event: KeyboardEvent) => void;
|
152
|
+
/** Fired when a key is released.. */
|
153
|
+
onKeyUp?: (event: KeyboardEvent) => void;
|
154
|
+
/** Fired when a key is pressed down. */
|
155
|
+
onKeyPressed?: (event: KeyboardEvent) => void;
|
156
|
+
|
157
|
+
// Focus Events
|
158
|
+
|
159
|
+
/** Fired when the element receives focus, often triggered by tab navigation. */
|
160
|
+
onFocus?: (event: FocusEvent) => void;
|
161
|
+
/** Fired when the element loses focus. */
|
162
|
+
onBlur?: (event: FocusEvent) => void;
|
163
|
+
|
164
|
+
// Form Events
|
165
|
+
|
166
|
+
/** Fired when the value of an input element changes, such as with text inputs or select elements. */
|
167
|
+
onChange?: (event: Event) => void;
|
168
|
+
/** Fires when the value of an <input>, <select>, or <textarea> element has been changed. */
|
169
|
+
onInput?: (event: Event) => void;
|
170
|
+
/** Fired when a form is submitted, usually on pressing Enter in a text input. */
|
171
|
+
onSubmit?: (event: Event) => void;
|
172
|
+
/** Fired when a form is reset. */
|
173
|
+
onReset?: (event: Event) => void;
|
174
|
+
|
175
|
+
// UI Events
|
176
|
+
|
177
|
+
/** Fired when the content of an element is scrolled. */
|
178
|
+
onScroll?: (event: UIEvent) => void;
|
179
|
+
|
180
|
+
// Wheel Events
|
181
|
+
|
182
|
+
/** Fired when the mouse wheel is scrolled while the element is focused. */
|
183
|
+
onWheel?: (event: WheelEvent) => void;
|
184
|
+
|
185
|
+
// Animation Events
|
186
|
+
|
187
|
+
/** Fired when a CSS animation starts. */
|
188
|
+
onAnimationStart?: (event: AnimationEvent) => void;
|
189
|
+
/** Fired when a CSS animation completes. */
|
190
|
+
onAnimationEnd?: (event: AnimationEvent) => void;
|
191
|
+
/** Fired when a CSS animation completes one iteration. */
|
192
|
+
onAnimationIteration?: (event: AnimationEvent) => void;
|
193
|
+
|
194
|
+
// Transition Events
|
195
|
+
|
196
|
+
/** Fired when a CSS transition has completed. */
|
197
|
+
onTransitionEnd?: (event: TransitionEvent) => void;
|
198
|
+
|
199
|
+
// Media Events
|
200
|
+
|
201
|
+
/** Fired when an element (usually an image) finishes loading */
|
202
|
+
onLoad?: (event: Event) => void;
|
203
|
+
/** Fired when an error occurs during the loading of an element, like an image not being found. */
|
204
|
+
onError?: (event: Event) => void;
|
205
|
+
|
206
|
+
// Clipboard Events
|
207
|
+
|
208
|
+
/** Fires when the user initiates a copy action through the browser's user interface. */
|
209
|
+
onCopy?: (event: ClipboardEvent) => void;
|
210
|
+
/** Fired when the user has initiated a "cut" action through the browser's user interface. */
|
211
|
+
onCut?: (event: ClipboardEvent) => void;
|
212
|
+
/** Fired when the user has initiated a "paste" action through the browser's user interface. */
|
213
|
+
onPaste?: (event: ClipboardEvent) => void;
|
214
|
+
};
|
109
215
|
|
110
216
|
export type SkfIconProps = {
|
111
217
|
/** Sets the color of the icon */
|
@@ -389,8 +495,45 @@ export type SkfLogoProps = {
|
|
389
495
|
color?: SkfLogo["color"];
|
390
496
|
};
|
391
497
|
|
392
|
-
export type
|
498
|
+
export type SkfLinkProps = {
|
499
|
+
/** Defines the semantic element to render */
|
500
|
+
as?: SkfLink["as"];
|
501
|
+
/** Defines the text-color */
|
502
|
+
color?: SkfLink["color"];
|
503
|
+
/** If true, disables the link */
|
504
|
+
disabled?: SkfLink["disabled"];
|
505
|
+
/** If defined, downloads the url */
|
506
|
+
download?: SkfLink["download"];
|
507
|
+
/** If defined, loads url on click */
|
508
|
+
href?: SkfLink["href"];
|
509
|
+
/** If defined, renders an icon before or after the text */
|
510
|
+
icon?: SkfLink["icon"];
|
511
|
+
/** If true, the icon is placed to the right in relation to the text */
|
512
|
+
"icon-right"?: SkfLink["iconRight"];
|
513
|
+
/** If defined, describes the relationship between a linked resource and the current document */
|
514
|
+
rel?: SkfLink["rel"];
|
515
|
+
/** If defined, used on conjunction with onClick property. **Notice!** Only applicable to as=button. */
|
516
|
+
route?: SkfLink["route"];
|
517
|
+
/** If true, fills the parents horizontal axis */
|
518
|
+
stretch?: SkfLink["stretch"];
|
519
|
+
/** If defined, specifies where to open the linked document */
|
520
|
+
target?: SkfLink["target"];
|
521
|
+
|
522
|
+
/** Fired when the link is clicked */
|
523
|
+
"onskf-link-click"?: (e: CustomEvent<CustomEvent>) => void;
|
524
|
+
};
|
525
|
+
|
526
|
+
export type SkfNavItemProps = {
|
393
527
|
/** */
|
528
|
+
href?: SkfNavItem["href"];
|
529
|
+
/** */
|
530
|
+
icon?: SkfNavItem["icon"];
|
531
|
+
/** */
|
532
|
+
vertical?: SkfNavItem["vertical"];
|
533
|
+
};
|
534
|
+
|
535
|
+
export type SkfNavProps = {
|
536
|
+
/** If true, the navigation will be displayed vertically */
|
394
537
|
vertical?: SkfNav["vertical"];
|
395
538
|
};
|
396
539
|
|
@@ -473,35 +616,6 @@ export type SkfInputProps = {
|
|
473
616
|
oninvalid?: (e: CustomEvent<CustomEvent>) => void;
|
474
617
|
};
|
475
618
|
|
476
|
-
export type SkfLinkProps = {
|
477
|
-
/** Defines the semantic element to render */
|
478
|
-
as?: SkfLink["as"];
|
479
|
-
/** Defines the text-color */
|
480
|
-
color?: SkfLink["color"];
|
481
|
-
/** If true, disables the link */
|
482
|
-
disabled?: SkfLink["disabled"];
|
483
|
-
/** If defined, downloads the url */
|
484
|
-
download?: SkfLink["download"];
|
485
|
-
/** If defined, loads url on click */
|
486
|
-
href?: SkfLink["href"];
|
487
|
-
/** If defined, renders an icon before or after the text */
|
488
|
-
icon?: SkfLink["icon"];
|
489
|
-
/** Defines the position of the icon in relation to the text */
|
490
|
-
"icon-placement"?: SkfLink["iconPlacement"];
|
491
|
-
/** If defined, describes the relationship between a linked resource and the current document */
|
492
|
-
rel?: SkfLink["rel"];
|
493
|
-
/** If defined, used on conjunction with onClick property, second argument */
|
494
|
-
route?: SkfLink["route"];
|
495
|
-
/** If true, fills the parents horizontal axis */
|
496
|
-
stretch?: SkfLink["stretch"];
|
497
|
-
/** If defined, specifies where to open the linked document */
|
498
|
-
target?: SkfLink["target"];
|
499
|
-
/** Defines the type of button */
|
500
|
-
type?: SkfLink["type"];
|
501
|
-
/** If defined, accepts a function that runs on click. Forwards optional route as second argument. */
|
502
|
-
onClick?: SkfLink["onClick"];
|
503
|
-
};
|
504
|
-
|
505
619
|
export type SkfMenuItemProps = {
|
506
620
|
/** Defines the semantic element to render */
|
507
621
|
as?: SkfMenuItem["as"];
|
@@ -515,22 +629,19 @@ export type SkfMenuItemProps = {
|
|
515
629
|
href?: SkfMenuItem["href"];
|
516
630
|
/** If defined, renders an icon before or after the text */
|
517
631
|
icon?: SkfMenuItem["icon"];
|
518
|
-
/**
|
519
|
-
"icon-
|
632
|
+
/** If true, the icon is placed to the right in relation to the text */
|
633
|
+
"icon-right"?: SkfMenuItem["iconRight"];
|
520
634
|
/** If defined, describes the relationship between a linked resource and the current document */
|
521
635
|
rel?: SkfMenuItem["rel"];
|
522
|
-
/** If defined, used on conjunction with onClick property
|
636
|
+
/** If defined, used on conjunction with onClick property. **Notice!** Only applicable to as=button. */
|
523
637
|
route?: SkfMenuItem["route"];
|
524
638
|
/** If true, fills the parents horizontal axis */
|
525
639
|
stretch?: SkfMenuItem["stretch"];
|
526
640
|
/** If defined, specifies where to open the linked document */
|
527
641
|
target?: SkfMenuItem["target"];
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
role?: SkfMenuItem["role"];
|
532
|
-
/** If defined, accepts a function that runs on click. Forwards optional route as second argument. */
|
533
|
-
onClick?: SkfMenuItem["onClick"];
|
642
|
+
|
643
|
+
/** Fired when the link is clicked */
|
644
|
+
"onskf-link-click"?: (e: CustomEvent<CustomEvent>) => void;
|
534
645
|
};
|
535
646
|
|
536
647
|
export type SkfMenuProps = {
|
@@ -545,13 +656,6 @@ export type SkfMenuProps = {
|
|
545
656
|
"onskf-closed"?: (e: CustomEvent<CustomEvent>) => void;
|
546
657
|
};
|
547
658
|
|
548
|
-
export type SkfNavItemProps = {
|
549
|
-
/** */
|
550
|
-
href?: SkfNavItem["href"];
|
551
|
-
/** */
|
552
|
-
icon?: SkfNavItem["icon"];
|
553
|
-
};
|
554
|
-
|
555
659
|
export type SkfPopoverProps = {
|
556
660
|
/** The placement of the popover */
|
557
661
|
placement?: SkfPopover["undefined"];
|
@@ -627,6 +731,8 @@ export type SkfSegmentedButtonProps = {
|
|
627
731
|
export type SkfSelectOptionGroupProps = {
|
628
732
|
/** */
|
629
733
|
label?: SkfSelectOptionGroup["label"];
|
734
|
+
/** */
|
735
|
+
small?: SkfSelectOptionGroup["small"];
|
630
736
|
};
|
631
737
|
|
632
738
|
export type SkfTagProps = {
|
@@ -713,6 +819,8 @@ export type SkfSelectOptionProps = {
|
|
713
819
|
/** The option's label text (equivalent to the tags textContent) */
|
714
820
|
text?: SkfSelectOption["text"];
|
715
821
|
/** */
|
822
|
+
small?: SkfSelectOption["small"];
|
823
|
+
/** */
|
716
824
|
role?: SkfSelectOption["role"];
|
717
825
|
/** */
|
718
826
|
_parent?: SkfSelectOption["_parent"];
|
@@ -1004,6 +1112,9 @@ export type CustomElements = {
|
|
1004
1112
|
*
|
1005
1113
|
* ### **Slots:**
|
1006
1114
|
* - _default_ - The card's main content
|
1115
|
+
*
|
1116
|
+
* ### **CSS Properties:**
|
1117
|
+
* - **--mod-card-bg-color** - Ability to set a custom background color _(default: undefined)_
|
1007
1118
|
*/
|
1008
1119
|
"skf-card": Partial<SkfCardProps & BaseProps & BaseEvents>;
|
1009
1120
|
|
@@ -1108,6 +1219,30 @@ export type CustomElements = {
|
|
1108
1219
|
*/
|
1109
1220
|
"skf-logo": Partial<SkfLogoProps & BaseProps & BaseEvents>;
|
1110
1221
|
|
1222
|
+
/**
|
1223
|
+
* The `<skf-link>` can be used as either a regular link or a semantic button. The button variant is
|
1224
|
+
* intended to be used for triggering javascript functions, not handling forms.
|
1225
|
+
* ---
|
1226
|
+
*
|
1227
|
+
*
|
1228
|
+
* ### **Events:**
|
1229
|
+
* - **skf-link-click** - Fired when the link is clicked
|
1230
|
+
*
|
1231
|
+
* ### **Slots:**
|
1232
|
+
* - _default_ - The links' main content
|
1233
|
+
*/
|
1234
|
+
"skf-link": Partial<SkfLinkProps & BaseProps & BaseEvents>;
|
1235
|
+
|
1236
|
+
/**
|
1237
|
+
* The `<skf-nav>` is a component that displays a list of <nav-items>.
|
1238
|
+
* ---
|
1239
|
+
*
|
1240
|
+
*
|
1241
|
+
* ### **Slots:**
|
1242
|
+
* - _default_ - The component's main content
|
1243
|
+
*/
|
1244
|
+
"skf-nav-item": Partial<SkfNavItemProps & BaseProps & BaseEvents>;
|
1245
|
+
|
1111
1246
|
/**
|
1112
1247
|
* The `<skf-nav>` is a component that displays a list of <nav-items>.
|
1113
1248
|
* ---
|
@@ -1144,21 +1279,14 @@ export type CustomElements = {
|
|
1144
1279
|
*/
|
1145
1280
|
"skf-input": Partial<SkfInputProps & BaseProps & BaseEvents>;
|
1146
1281
|
|
1147
|
-
/**
|
1148
|
-
* The `<skf-link>` can be used as either a regular link or a link styled semantic button
|
1149
|
-
* ---
|
1150
|
-
*
|
1151
|
-
*
|
1152
|
-
* ### **Slots:**
|
1153
|
-
* - _default_ - The links' main content
|
1154
|
-
*/
|
1155
|
-
"skf-link": Partial<SkfLinkProps & BaseProps & BaseEvents>;
|
1156
|
-
|
1157
1282
|
/**
|
1158
1283
|
* The `<skf-menu-item>` is used in conjunction with the `<skf-menu>` component
|
1159
1284
|
* ---
|
1160
1285
|
*
|
1161
1286
|
*
|
1287
|
+
* ### **Events:**
|
1288
|
+
* - **skf-link-click** - Fired when the link is clicked
|
1289
|
+
*
|
1162
1290
|
* ### **Slots:**
|
1163
1291
|
* - _default_ - The component's main content
|
1164
1292
|
*/
|
@@ -1180,16 +1308,6 @@ export type CustomElements = {
|
|
1180
1308
|
*/
|
1181
1309
|
"skf-menu": Partial<SkfMenuProps & BaseProps & BaseEvents>;
|
1182
1310
|
|
1183
|
-
/**
|
1184
|
-
* The `<skf-nav>` is a component that displays a list of <nav-items>.
|
1185
|
-
* ---
|
1186
|
-
*
|
1187
|
-
*
|
1188
|
-
* ### **Slots:**
|
1189
|
-
* - _default_ - The component's main content
|
1190
|
-
*/
|
1191
|
-
"skf-nav-item": Partial<SkfNavItemProps & BaseProps & BaseEvents>;
|
1192
|
-
|
1193
1311
|
/**
|
1194
1312
|
* The `<skf-popover>` is a general purpose component that displays the slot content in a popover.
|
1195
1313
|
*
|