@skf-design-system/ui-components 1.0.2-beta.5 → 1.0.2-beta.7
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 +18 -0
- package/dist/components/accordion/accordion.component.d.ts +1 -1
- package/dist/components/accordion/accordion.component.js +2 -2
- package/dist/components/alert/alert.component.d.ts +3 -2
- package/dist/components/alert/alert.component.js +39 -33
- package/dist/components/button/button.styles.js +3 -3
- package/dist/components/checkbox/checkbox.component.d.ts +4 -2
- package/dist/components/checkbox/checkbox.component.js +73 -65
- package/dist/components/checkbox/checkbox.styles.js +1 -1
- package/dist/components/datepicker/datepicker-calendar.component.d.ts +4 -0
- package/dist/components/datepicker/datepicker-calendar.component.js +134 -127
- package/dist/components/datepicker/datepicker-popup.component.d.ts +4 -0
- package/dist/components/datepicker/datepicker-popup.component.js +100 -88
- package/dist/components/datepicker/datepicker.component.d.ts +4 -2
- package/dist/components/datepicker/datepicker.component.js +151 -140
- package/dist/components/dialog/dialog.component.d.ts +3 -2
- package/dist/components/dialog/dialog.component.js +39 -37
- package/dist/components/divider/divider.component.d.ts +3 -0
- package/dist/components/divider/divider.component.js +43 -22
- package/dist/components/divider/divider.styles.js +9 -9
- package/dist/components/drawer/drawer.component.d.ts +11 -4
- package/dist/components/drawer/drawer.component.js +77 -55
- package/dist/components/drawer/drawer.styles.js +47 -40
- package/dist/components/header/header.component.d.ts +4 -2
- package/dist/components/header/header.component.js +66 -57
- package/dist/components/header/header.styles.js +2 -2
- package/dist/components/icon/icon.component.js +7 -7
- package/dist/components/icon/icon.styles.js +2 -2
- package/dist/components/input/input.component.d.ts +4 -8
- package/dist/components/input/input.component.js +147 -147
- package/dist/components/input/input.controllers.d.ts +0 -1
- package/dist/components/input/input.controllers.js +12 -12
- package/dist/components/link/link.component.d.ts +15 -18
- package/dist/components/link/link.component.js +105 -107
- package/dist/components/link/link.styles.js +53 -45
- package/dist/components/loader/loader.component.d.ts +5 -3
- package/dist/components/loader/loader.component.js +39 -28
- package/dist/components/loader/loader.styles.js +6 -10
- 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 +13 -9
- package/dist/components/menu/menu.component.d.ts +5 -2
- package/dist/components/menu/menu.component.js +8 -8
- 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 +9 -0
- package/dist/components/nav/nav.component.js +47 -21
- package/dist/components/nav/nav.styles.js +15 -9
- package/dist/components/popover/popover.component.d.ts +10 -3
- package/dist/components/popover/popover.component.js +30 -22
- 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 +4 -4
- package/dist/components/radio/radio.component.d.ts +4 -2
- package/dist/components/radio/radio.component.js +91 -83
- package/dist/components/radio/radio.styles.js +1 -1
- package/dist/components/segmented-button/segmented-button-item.component.js +1 -1
- package/dist/components/segmented-button/segmented-button-item.styles.js +1 -1
- 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 +7 -2
- package/dist/components/select/select-option.component.js +70 -53
- package/dist/components/select/select-option.styles.js +43 -31
- package/dist/components/select/select.component.d.ts +18 -10
- package/dist/components/select/select.component.js +175 -132
- package/dist/components/select/select.controllers.js +2 -1
- package/dist/components/select/select.styles.js +8 -2
- package/dist/components/stepper/stepper-item.component.d.ts +1 -1
- package/dist/components/stepper/stepper-item.component.js +26 -23
- package/dist/components/stepper/stepper-item.styles.js +4 -4
- package/dist/components/switch/switch.component.d.ts +4 -2
- package/dist/components/switch/switch.component.js +64 -56
- package/dist/components/switch/switch.styles.js +1 -1
- package/dist/components/tabs/tab-panel.component.d.ts +1 -1
- package/dist/components/tabs/tab-panel.component.js +19 -16
- package/dist/components/tabs/tab.component.d.ts +1 -1
- package/dist/components/tabs/tab.component.js +17 -14
- package/dist/components/tabs/tab.styles.js +2 -2
- package/dist/components/tag/tag.component.d.ts +3 -0
- package/dist/components/tag/tag.component.js +50 -41
- package/dist/components/textarea/textarea.component.d.ts +4 -2
- package/dist/components/textarea/textarea.component.js +127 -118
- package/dist/components/toast/toast-item.styles.js +13 -10
- 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/components/tooltip/tooltip.component.d.ts +9 -2
- package/dist/components/tooltip/tooltip.component.js +13 -7
- package/dist/custom-elements.json +1305 -946
- package/dist/index.d.ts +2 -2
- package/dist/index.js +20 -20
- package/dist/internal/base-classes/popover/popover.base.d.ts +24 -5
- package/dist/internal/base-classes/popover/popover.base.js +28 -29
- 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/internal/controllers/popover.controller.d.ts +2 -0
- package/dist/internal/helpers/uuid.d.ts +8 -10
- package/dist/internal/helpers/uuid.js +4 -11
- package/dist/internal/helpers/watch.d.ts +1 -1
- package/dist/internal/templates/asterisk.d.ts +1 -1
- package/dist/internal/templates/asterisk.js +4 -4
- package/dist/internal/types.d.ts +4 -0
- package/dist/styles/global-alt.css +1 -1
- package/dist/styles/global.css +1 -1
- package/dist/translations/en.d.ts +3 -0
- package/dist/translations/en.js +27 -0
- package/dist/translations/es.d.ts +3 -0
- package/dist/translations/es.js +27 -0
- package/dist/translations/index.d.ts +4 -0
- package/dist/translations/pt.d.ts +3 -0
- package/dist/translations/pt.js +27 -0
- package/dist/translations/sv.d.ts +3 -0
- package/dist/translations/sv.js +27 -0
- package/dist/types/jsx/custom-element-jsx.d.ts +243 -128
- package/dist/types/vue/index.d.ts +136 -127
- package/dist/utilities/localize.d.ts +28 -0
- package/dist/utilities/localize.js +13 -0
- package/dist/vscode.html-custom-data.json +168 -177
- package/dist/web-types.json +411 -381
- package/package.json +34 -41
@@ -1,123 +1,121 @@
|
|
1
|
+
var b = (e) => {
|
2
|
+
throw TypeError(e);
|
3
|
+
};
|
4
|
+
var g = (e, i, t) => i.has(e) || b("Cannot " + t);
|
5
|
+
var d = (e, i, t) => (g(e, i, "read from private field"), t ? t.call(e) : i.get(e)), f = (e, i, t) => i.has(e) ? b("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(e) : i.set(e, t), m = (e, i, t, o) => (g(e, i, "write to private field"), o ? o.call(e, t) : i.set(e, t), t);
|
1
6
|
import "../icon/icon.js";
|
2
|
-
import { SkfElement as
|
3
|
-
import {
|
4
|
-
import "
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
7
|
+
import { SkfElement as C } from "../../internal/components/skf-element.js";
|
8
|
+
import { stateMap as k } from "../../internal/helpers/stateMap.js";
|
9
|
+
import { watch as v } from "../../internal/helpers/watch.js";
|
10
|
+
import { componentStyles as S } from "../../styles/component.styles.js";
|
11
|
+
import { nothing as y } from "lit";
|
12
|
+
import { property as n } from "lit/decorators.js";
|
13
|
+
import { ifDefined as x } from "lit/directives/if-defined.js";
|
14
|
+
import { html as _ } from "lit/static-html.js";
|
15
|
+
import { styles as A } from "./link.styles.js";
|
16
|
+
var D = Object.defineProperty, E = Object.getOwnPropertyDescriptor, s = (e, i, t, o) => {
|
17
|
+
for (var h = o > 1 ? void 0 : o ? E(i, t) : i, p = e.length - 1, c; p >= 0; p--)
|
18
|
+
(c = e[p]) && (h = (o ? c(i, t, h) : c(h)) || h);
|
19
|
+
return o && h && D(i, t, h), h;
|
20
|
+
};
|
21
|
+
const w = {
|
22
|
+
color: ["inverse", "primary"],
|
23
|
+
stretch: "stretch"
|
24
|
+
};
|
25
|
+
var a, l;
|
26
|
+
const u = class u extends C {
|
16
27
|
constructor() {
|
17
|
-
super(...arguments)
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
28
|
+
super(...arguments);
|
29
|
+
f(this, a);
|
30
|
+
f(this, l);
|
31
|
+
m(this, a, this.attachInternals()), m(this, l, d(this, a).states), this.as = "link", this.color = "primary", this.disabled = !1, this.download = !1, this.iconRight = !1, this.stretch = !1, this._handleClick = () => {
|
32
|
+
var t;
|
33
|
+
if (!(this.as === "button" && this.disabled) && (this.emit("skf-link-click", { detail: { href: this.href, route: this.route } }), this.as === "link" && !this.route && ((t = this.href) != null && t.trim())))
|
34
|
+
if (this.target)
|
35
|
+
window.open(this.href, this.target);
|
36
|
+
else if (this.download) {
|
37
|
+
const o = document.createElement("a");
|
38
|
+
o.href = this.href, o.download = this.href, document.body.appendChild(o), o.click(), document.body.removeChild(o);
|
39
|
+
} else
|
40
|
+
window.location.href = this.href;
|
26
41
|
};
|
27
|
-
this._assertValidOnClick(t), this.removeEventListener("click", i), this.addEventListener("click", i);
|
28
|
-
}
|
29
|
-
get onClick() {
|
30
|
-
return this._onClick;
|
31
42
|
}
|
32
43
|
connectedCallback() {
|
33
|
-
super.connectedCallback(), this.
|
34
|
-
|
35
|
-
|
44
|
+
super.connectedCallback(), this.ariaDisabled = this.as === "button" && this.disabled ? "true" : null, this.role = this.as;
|
45
|
+
const t = this.hasAttribute("tabindex") ? Number(this.getAttribute("tabindex")) : 0;
|
46
|
+
this.ariaDisabled !== "true" && (this.tabIndex = t), this.addEventListener("keydown", (o) => {
|
47
|
+
(o.key === "Enter" || o.key === " ") && this._handleClick();
|
48
|
+
}), this.addEventListener("click", this._handleClick);
|
36
49
|
}
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
);
|
50
|
+
_handleAsChange() {
|
51
|
+
this.as === "button" ? this.setAttribute("type", "button") : this.removeAttribute("type");
|
52
|
+
}
|
53
|
+
_handleStateChange(t, o, h) {
|
54
|
+
k(d(this, l), w[t]).set(h);
|
43
55
|
}
|
44
56
|
/** @internal */
|
45
57
|
_renderIcon() {
|
46
|
-
const t =
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
58
|
+
const t = this.color === "inverse" ? "inverse" : "emphasized";
|
59
|
+
return _`
|
60
|
+
<skf-icon
|
61
|
+
color=${t}
|
62
|
+
data-color=${this.disabled ? "custom" : y}
|
63
|
+
name=${x(this.icon)}
|
64
|
+
size="sm"
|
65
|
+
></skf-icon>
|
52
66
|
`;
|
53
67
|
}
|
54
68
|
render() {
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
link: !0,
|
62
|
-
"link--color-inverse": this.color === "inverse",
|
63
|
-
"link--color-primary": this.color === "primary",
|
64
|
-
"link--icon-right": this.iconPlacement === "right",
|
65
|
-
"link--stretch": this.stretch,
|
66
|
-
...s.classMap
|
67
|
-
})}
|
68
|
-
download=${l(t ? this.download : void 0)}
|
69
|
-
href=${l(t ? this.href : void 0)}
|
70
|
-
part="root"
|
71
|
-
rel=${l(t ? this.rel : void 0)}
|
72
|
-
target=${l(t ? this.target : void 0)}
|
73
|
-
type=${l(t ? void 0 : this.type)}
|
74
|
-
>
|
75
|
-
${this.icon && this._renderIcon()}
|
76
|
-
<slot>Default link text</slot>
|
77
|
-
</${i}>
|
69
|
+
return _`
|
70
|
+
<div id="root" part="root">
|
71
|
+
${this.icon && !this.iconRight ? this._renderIcon() : y}
|
72
|
+
<slot></slot>
|
73
|
+
${this.icon && this.iconRight ? this._renderIcon() : y}
|
74
|
+
</div>
|
78
75
|
`;
|
79
76
|
}
|
80
|
-
}
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
77
|
+
};
|
78
|
+
a = new WeakMap(), l = new WeakMap(), u.styles = [S, A];
|
79
|
+
let r = u;
|
80
|
+
s([
|
81
|
+
n({ type: String })
|
82
|
+
], r.prototype, "as", 2);
|
83
|
+
s([
|
84
|
+
n({ type: String })
|
85
|
+
], r.prototype, "color", 2);
|
86
|
+
s([
|
87
|
+
n({ type: Boolean })
|
88
|
+
], r.prototype, "disabled", 2);
|
89
|
+
s([
|
90
|
+
n({ type: Boolean })
|
91
|
+
], r.prototype, "download", 2);
|
92
|
+
s([
|
93
|
+
n({ type: String })
|
94
|
+
], r.prototype, "href", 2);
|
95
|
+
s([
|
96
|
+
n({ type: String })
|
97
|
+
], r.prototype, "icon", 2);
|
98
|
+
s([
|
99
|
+
n({ type: Boolean, attribute: "icon-right" })
|
100
|
+
], r.prototype, "iconRight", 2);
|
101
|
+
s([
|
102
|
+
n({ type: String })
|
103
|
+
], r.prototype, "rel", 2);
|
104
|
+
s([
|
105
|
+
n({ type: String })
|
106
|
+
], r.prototype, "route", 2);
|
107
|
+
s([
|
108
|
+
n({ type: Boolean })
|
109
|
+
], r.prototype, "stretch", 2);
|
110
|
+
s([
|
111
|
+
n({ type: String })
|
112
|
+
], r.prototype, "target", 2);
|
113
|
+
s([
|
114
|
+
v("as")
|
115
|
+
], r.prototype, "_handleAsChange", 1);
|
116
|
+
s([
|
117
|
+
v(Object.keys(w))
|
118
|
+
], r.prototype, "_handleStateChange", 1);
|
121
119
|
export {
|
122
|
-
|
120
|
+
r as SkfLink
|
123
121
|
};
|
@@ -1,61 +1,69 @@
|
|
1
|
-
import { css as
|
2
|
-
const e =
|
3
|
-
/* stylelint-disable selector-class-pattern */
|
1
|
+
import { css as o } from "lit";
|
2
|
+
const e = o`
|
4
3
|
@layer components {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
@layer base {
|
5
|
+
:host {
|
6
|
+
contain: layout;
|
7
|
+
cursor: pointer;
|
8
|
+
display: inline;
|
9
|
+
}
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
vertical-align: top;
|
11
|
+
#root {
|
12
|
+
--_skf-link-color: var(--skf-interactive-text-color-primary);
|
13
|
+
--_skf-link-color-active: var(--skf-interactive-text-color-primary-active);
|
14
|
+
--_skf-link-color-disabled: var(--skf-interactive-text-color-disabled);
|
15
|
+
--_skf-link-color-hover: var(--skf-interactive-text-color-primary-hover);
|
16
|
+
--_skf-link-outline-color: var(--skf-interactive-text-color-primary);
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
align-items: center;
|
19
|
+
color: var(--_skf-link-color);
|
20
|
+
display: inline-flex;
|
21
|
+
font-weight: var(--skf-font-weight-bold);
|
22
|
+
gap: 0 var(--skf-spacing-25);
|
23
|
+
vertical-align: top;
|
20
24
|
}
|
25
|
+
}
|
21
26
|
|
22
|
-
|
23
|
-
|
24
|
-
|
27
|
+
@layer states {
|
28
|
+
:host(:focus-visible) {
|
29
|
+
outline: unset;
|
25
30
|
|
26
|
-
|
27
|
-
|
31
|
+
#root {
|
32
|
+
border-radius: var(--skf-border-radius-sm);
|
33
|
+
outline: var(--skf-border-width-md) solid var(--_skf-link-outline-color);
|
34
|
+
outline-offset: var(--skf-size-2);
|
35
|
+
}
|
28
36
|
}
|
29
37
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
outline-offset: var(--skf-size-2);
|
34
|
-
}
|
35
|
-
}
|
38
|
+
:host([aria-disabled]) {
|
39
|
+
#root {
|
40
|
+
--_skf-link-color: var(--_skf-link-color-disabled);
|
36
41
|
|
37
|
-
|
38
|
-
|
39
|
-
--_skf-link-color-active: var(--skf-interactive-text-color-primary-active);
|
40
|
-
--_skf-link-color-disabled: var(--skf-interactive-text-color-disabled);
|
41
|
-
--_skf-link-color-hover: var(--skf-interactive-text-color-primary-hover);
|
42
|
-
--_skf-link-outline-color: var(--skf-interactive-text-color-primary);
|
43
|
-
}
|
42
|
+
cursor: not-allowed;
|
43
|
+
}
|
44
44
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
--_skf-link-color-hover: var(--skf-interactive-text-color-inverse-hover);
|
50
|
-
--_skf-link-outline-color: var(--skf-interactive-text-color-inverse);
|
51
|
-
}
|
45
|
+
skf-icon {
|
46
|
+
color: inherit;
|
47
|
+
}
|
48
|
+
}
|
52
49
|
|
53
|
-
|
54
|
-
|
50
|
+
:host(:not([aria-disabled]):hover) #root {
|
51
|
+
--_skf-link-color: var(--_skf-link-color-hover);
|
52
|
+
}
|
55
53
|
}
|
56
54
|
|
57
|
-
|
58
|
-
|
55
|
+
@layer mods {
|
56
|
+
:host(:state(inverse)) #root {
|
57
|
+
--_skf-link-color: var(--skf-interactive-text-color-inverse);
|
58
|
+
--_skf-link-color-active: var(--skf-interactive-text-color-inverse-active);
|
59
|
+
--_skf-link-color-disabled: var(--skf-interactive-text-color-disabled);
|
60
|
+
--_skf-link-color-hover: var(--skf-interactive-text-color-inverse-hover);
|
61
|
+
--_skf-link-outline-color: var(--skf-interactive-text-color-inverse);
|
62
|
+
}
|
63
|
+
|
64
|
+
:host(:state(stretch)) #root {
|
65
|
+
inline-size: 100%;
|
66
|
+
}
|
59
67
|
}
|
60
68
|
}
|
61
69
|
`;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { SkfElement } from '../../internal/components/skf-element.js';
|
2
2
|
import { type CSSResultGroup } from 'lit';
|
3
|
+
type Size = 'md' | 'sm';
|
3
4
|
/**
|
4
5
|
* The `<skf-loader>` component is a progress indicator that uses circular indicators for short, indeterminate activities
|
5
6
|
*
|
@@ -10,12 +11,13 @@ import { type CSSResultGroup } from 'lit';
|
|
10
11
|
export declare class SkfLoader extends SkfElement {
|
11
12
|
#private;
|
12
13
|
static styles: CSSResultGroup;
|
13
|
-
/** Defines the aria-label */
|
14
|
-
ariaLabel: string;
|
15
14
|
/** If true, inverts the color (to be used on colored backgrounds) */
|
16
15
|
invert: boolean;
|
17
16
|
/** Defines the size of the loader */
|
18
|
-
size
|
17
|
+
size: Size;
|
19
18
|
connectedCallback(): void;
|
19
|
+
/** @internal */
|
20
|
+
_handleStateChange(property: string, _prev: unknown, next: unknown): void;
|
20
21
|
render(): import("lit").TemplateResult<1>;
|
21
22
|
}
|
23
|
+
export {};
|
@@ -1,29 +1,40 @@
|
|
1
|
-
var
|
1
|
+
var f = (t) => {
|
2
2
|
throw TypeError(t);
|
3
3
|
};
|
4
|
-
var
|
5
|
-
var
|
4
|
+
var y = (t, e, r) => e.has(t) || f("Cannot " + r);
|
5
|
+
var c = (t, e, r) => (y(t, e, "read from private field"), r ? r.call(t) : e.get(t)), m = (t, e, r) => e.has(t) ? f("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), v = (t, e, r, i) => (y(t, e, "write to private field"), i ? i.call(t, r) : e.set(t, r), r);
|
6
6
|
import { SkfElement as b } from "../../internal/components/skf-element.js";
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import {
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
7
|
+
import { stateMap as g } from "../../internal/helpers/stateMap.js";
|
8
|
+
import { watch as C } from "../../internal/helpers/watch.js";
|
9
|
+
import { componentStyles as O } from "../../styles/component.styles.js";
|
10
|
+
import { html as P } from "lit";
|
11
|
+
import { property as _ } from "lit/decorators.js";
|
12
|
+
import { styles as j } from "./loader.styles.js";
|
13
|
+
var w = Object.defineProperty, z = Object.getOwnPropertyDescriptor, h = (t, e, r, i) => {
|
14
|
+
for (var s = i > 1 ? void 0 : i ? z(e, r) : e, n = t.length - 1, l; n >= 0; n--)
|
15
|
+
(l = t[n]) && (s = (i ? l(e, r, s) : l(s)) || s);
|
16
|
+
return i && s && w(e, r, s), s;
|
17
|
+
};
|
18
|
+
const u = {
|
19
|
+
invert: "invert",
|
20
|
+
size: ["md", "sm"]
|
21
|
+
};
|
22
|
+
var a, p;
|
16
23
|
const d = class d extends b {
|
17
24
|
constructor() {
|
18
25
|
super(...arguments);
|
19
|
-
|
20
|
-
|
26
|
+
m(this, a);
|
27
|
+
m(this, p);
|
28
|
+
v(this, a, this.attachInternals()), v(this, p, c(this, a).states), this.invert = !1, this.size = "md";
|
21
29
|
}
|
22
30
|
connectedCallback() {
|
23
|
-
super.connectedCallback(),
|
31
|
+
super.connectedCallback(), this.role = "progressbar", this.ariaLive = "polite";
|
32
|
+
}
|
33
|
+
_handleStateChange(r, i, s) {
|
34
|
+
g(c(this, p), u[r]).set(s);
|
24
35
|
}
|
25
36
|
render() {
|
26
|
-
return
|
37
|
+
return P`
|
27
38
|
<div id="root">
|
28
39
|
<div class="circle"></div>
|
29
40
|
<div class="circle"></div>
|
@@ -32,17 +43,17 @@ const d = class d extends b {
|
|
32
43
|
`;
|
33
44
|
}
|
34
45
|
};
|
35
|
-
|
36
|
-
let
|
37
|
-
|
38
|
-
|
39
|
-
],
|
40
|
-
|
41
|
-
|
42
|
-
],
|
43
|
-
|
44
|
-
|
45
|
-
],
|
46
|
+
a = new WeakMap(), p = new WeakMap(), d.styles = [O, j];
|
47
|
+
let o = d;
|
48
|
+
h([
|
49
|
+
_({ type: Boolean })
|
50
|
+
], o.prototype, "invert", 2);
|
51
|
+
h([
|
52
|
+
_({ type: String })
|
53
|
+
], o.prototype, "size", 2);
|
54
|
+
h([
|
55
|
+
C(Object.keys(u))
|
56
|
+
], o.prototype, "_handleStateChange", 1);
|
46
57
|
export {
|
47
|
-
|
58
|
+
o as SkfLoader
|
48
59
|
};
|
@@ -7,7 +7,7 @@ const o = a`
|
|
7
7
|
}
|
8
8
|
|
9
9
|
#root {
|
10
|
-
--_skf-loader-color: var(--skf-bg-color-
|
10
|
+
--_skf-loader-color: var(--skf-bg-color-emphasized);
|
11
11
|
--_skf-loader-gap: var(--skf-spacing-50);
|
12
12
|
--_skf-loader-size: var(--skf-size-12);
|
13
13
|
|
@@ -33,17 +33,13 @@ const o = a`
|
|
33
33
|
}
|
34
34
|
|
35
35
|
@layer mods {
|
36
|
-
:host(
|
37
|
-
|
38
|
-
--_skf-loader-color: var(--skf-bg-color-neutral-1);
|
39
|
-
}
|
36
|
+
:host(:state(invert)) #root {
|
37
|
+
--_skf-loader-color: var(--skf-bg-color-neutral-1);
|
40
38
|
}
|
41
39
|
|
42
|
-
:host(
|
43
|
-
|
44
|
-
|
45
|
-
--_skf-loader-size: var(--skf-size-4);
|
46
|
-
}
|
40
|
+
:host(:state(sm)) #root {
|
41
|
+
--_skf-loader-gap: var(--skf-spacing-25);
|
42
|
+
--_skf-loader-size: var(--skf-size-4);
|
47
43
|
}
|
48
44
|
}
|
49
45
|
}
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import { SkfLink as
|
1
|
+
import { SkfLink as t } from "../link/link.component.js";
|
2
2
|
import "lit";
|
3
|
-
import { styles as
|
4
|
-
const
|
5
|
-
|
6
|
-
super(), this.role = "menuitem"
|
3
|
+
import { styles as l } from "./menu-item.styles.js";
|
4
|
+
const s = class s extends t {
|
5
|
+
connectedCallback() {
|
6
|
+
super.connectedCallback(), this.role = "menuitem";
|
7
7
|
}
|
8
8
|
};
|
9
|
-
|
10
|
-
let
|
9
|
+
s.styles = [t.styles, l];
|
10
|
+
let e = s;
|
11
11
|
export {
|
12
|
-
|
12
|
+
e as SkfMenuItem
|
13
13
|
};
|
@@ -1,19 +1,23 @@
|
|
1
|
-
import { css as
|
2
|
-
const
|
1
|
+
import { css as o } from "lit";
|
2
|
+
const r = o`
|
3
3
|
@layer components {
|
4
|
-
|
4
|
+
:host {
|
5
|
+
display: block;
|
6
|
+
}
|
7
|
+
|
8
|
+
#root {
|
5
9
|
block-size: var(--skf-size-44);
|
6
10
|
display: flex;
|
7
11
|
padding-inline: var(--skf-spacing-75);
|
12
|
+
}
|
13
|
+
}
|
8
14
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
}
|
13
|
-
}
|
15
|
+
@layer states {
|
16
|
+
:host(:not([aria-disabled]):hover) #root {
|
17
|
+
background-color: var(--skf-color-blue-lightest);
|
14
18
|
}
|
15
19
|
}
|
16
20
|
`;
|
17
21
|
export {
|
18
|
-
|
22
|
+
r as styles
|
19
23
|
};
|
@@ -11,16 +11,19 @@ import type { CSSResultGroup } from 'lit';
|
|
11
11
|
* @attribute {"top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end"} [placement='bottom-start'] - The placement of the menu
|
12
12
|
* @attribute {string} anchor - The id of the element the menu will be anchored to
|
13
13
|
*
|
14
|
+
* @property {(void) => void} open() - Method that opens the menu
|
15
|
+
* @property {(void) => void} close() - Method that closes the menu
|
16
|
+
*
|
14
17
|
* @event {CustomEvent} skf-opened - Fired when the menu is opened
|
15
18
|
* @event {CustomEvent} skf-closed - Fired when the menu is closed
|
16
19
|
*
|
17
|
-
* @slot - The menu
|
20
|
+
* @slot - The menu content
|
18
21
|
*
|
19
22
|
* @tagname skf-menu
|
20
23
|
*/
|
21
24
|
export declare class SkfMenu extends SkfPopoverBase {
|
22
25
|
static styles: CSSResultGroup;
|
23
|
-
|
26
|
+
connectedCallback(): void;
|
24
27
|
/** @internal */
|
25
28
|
addEventListeners($element: HTMLElement | Element): void;
|
26
29
|
}
|
@@ -1,16 +1,16 @@
|
|
1
1
|
import { SkfPopoverBase as t } from "../../internal/base-classes/popover/popover.base.js";
|
2
|
-
import { styles as
|
3
|
-
const
|
4
|
-
|
5
|
-
super(), this.placement = "bottom-start", this.role = "menu", this.triggerEvent = "click", this.variant = "menu", t.classMap = { menu: !0 };
|
2
|
+
import { styles as a } from "./menu.styles.js";
|
3
|
+
const e = class e extends t {
|
4
|
+
connectedCallback() {
|
5
|
+
super.connectedCallback(), this.placement = "bottom-start", this.role = "menu", this.triggerEvent = "click", this.variant = "menu", t.classMap = { menu: !0 };
|
6
6
|
}
|
7
7
|
/** @internal */
|
8
8
|
addEventListeners(i) {
|
9
|
-
i.addEventListener(this.triggerEvent, this.open
|
9
|
+
i.addEventListener(this.triggerEvent, this.open, { signal: this.signal });
|
10
10
|
}
|
11
11
|
};
|
12
|
-
|
13
|
-
let
|
12
|
+
e.styles = [t.styles, a];
|
13
|
+
let s = e;
|
14
14
|
export {
|
15
|
-
|
15
|
+
s as SkfMenu
|
16
16
|
};
|
@@ -10,9 +10,13 @@ import { type CSSResultGroup } from 'lit';
|
|
10
10
|
* @tagname skf-nav-item
|
11
11
|
*/
|
12
12
|
export declare class SkfNavItem extends SkfElement {
|
13
|
+
#private;
|
13
14
|
static styles: CSSResultGroup;
|
14
15
|
href: string;
|
15
16
|
icon?: Icon;
|
17
|
+
vertical: boolean;
|
16
18
|
connectedCallback(): void;
|
19
|
+
/** @internal */
|
20
|
+
_handleStateChange(): void;
|
17
21
|
render(): import("lit").TemplateResult<1>;
|
18
22
|
}
|