@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
@@ -35,7 +35,7 @@ export declare class SkfStepperItem extends SkfElement {
|
|
35
35
|
/** @internal */
|
36
36
|
set _setInternalState(state: typeof this._uiState);
|
37
37
|
get _setInternalState(): typeof this._uiState;
|
38
|
-
|
38
|
+
connectedCallback(): void;
|
39
39
|
protected firstUpdated(): void;
|
40
40
|
/** @internal */
|
41
41
|
_handleState(): void;
|
@@ -2,30 +2,30 @@ var v = (e) => {
|
|
2
2
|
throw TypeError(e);
|
3
3
|
};
|
4
4
|
var u = (e, i, t) => i.has(e) || v("Cannot " + t);
|
5
|
-
var
|
5
|
+
var m = (e, i, t) => (u(e, i, "read from private field"), t ? t.call(e) : i.get(e)), _ = (e, i, t) => i.has(e) ? v("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(e) : i.set(e, t), r = (e, i, t, a) => (u(e, i, "write to private field"), a ? a.call(e, t) : i.set(e, t), t);
|
6
6
|
import "../icon/icon.js";
|
7
|
-
import { SkfElement as
|
8
|
-
import { watch as
|
7
|
+
import { SkfElement as C } from "../../internal/components/skf-element.js";
|
8
|
+
import { watch as g } from "../../internal/helpers/watch.js";
|
9
9
|
import { componentStyles as x } from "../../styles/component.styles.js";
|
10
10
|
import "lit";
|
11
|
-
import { property as b, state as
|
11
|
+
import { property as b, state as n } from "lit/decorators.js";
|
12
12
|
import { classMap as $ } from "lit/directives/class-map.js";
|
13
13
|
import { ifDefined as w } from "lit/directives/if-defined.js";
|
14
14
|
import { literal as S, html as y } from "lit/static-html.js";
|
15
15
|
import { styles as U } from "./stepper-item.styles.js";
|
16
16
|
var I = Object.defineProperty, O = Object.getOwnPropertyDescriptor, o = (e, i, t, a) => {
|
17
|
-
for (var p = a > 1 ? void 0 : a ? O(i, t) : i,
|
18
|
-
(
|
17
|
+
for (var p = a > 1 ? void 0 : a ? O(i, t) : i, d = e.length - 1, h; d >= 0; d--)
|
18
|
+
(h = e[d]) && (p = (a ? h(i, t, p) : h(p)) || p);
|
19
19
|
return a && p && I(i, t, p), p;
|
20
|
-
}, l,
|
21
|
-
const f = class f extends
|
20
|
+
}, l, c;
|
21
|
+
const f = class f extends C {
|
22
22
|
constructor() {
|
23
|
-
super();
|
23
|
+
super(...arguments);
|
24
24
|
_(this, l);
|
25
|
-
_(this,
|
26
|
-
r(this, l, !1), r(this,
|
25
|
+
_(this, c);
|
26
|
+
r(this, l, !1), r(this, c, !1), this.completed = !1, this._index = 0, this._linear = !1, this._handleClick = () => {
|
27
27
|
this._linear || (this.state = "active");
|
28
|
-
}
|
28
|
+
};
|
29
29
|
}
|
30
30
|
set _setInternalState(t) {
|
31
31
|
r(this, l, !0), this._uiState = t, t === "active" || t === "activeCompleted" ? this.state = t === "active" ? "active" : "completed" : this.state = void 0, setTimeout(() => {
|
@@ -35,6 +35,9 @@ const f = class f extends g {
|
|
35
35
|
get _setInternalState() {
|
36
36
|
return this.state;
|
37
37
|
}
|
38
|
+
connectedCallback() {
|
39
|
+
super.connectedCallback(), this.role = "listitem";
|
40
|
+
}
|
38
41
|
firstUpdated() {
|
39
42
|
this._handleState();
|
40
43
|
}
|
@@ -44,20 +47,20 @@ const f = class f extends g {
|
|
44
47
|
this._setInternalState = "activeCompleted";
|
45
48
|
return;
|
46
49
|
}
|
47
|
-
if (
|
50
|
+
if (m(this, l)) {
|
48
51
|
r(this, l, !1);
|
49
52
|
return;
|
50
53
|
}
|
51
|
-
r(this,
|
54
|
+
r(this, c, ["active", "completed"].includes(String(this.state)) && !["active", "activeCompleted"].includes(String(this._uiState))), this._emitUpdate();
|
52
55
|
}
|
53
56
|
/** @internal */
|
54
57
|
_emitUpdate() {
|
55
58
|
this.emit("skf-stepper-item-select", {
|
56
59
|
detail: {
|
57
60
|
item: this,
|
58
|
-
triggerActiveIndexUpdate:
|
61
|
+
triggerActiveIndexUpdate: m(this, c)
|
59
62
|
}
|
60
|
-
}), r(this,
|
63
|
+
}), r(this, c, !1);
|
61
64
|
}
|
62
65
|
render() {
|
63
66
|
const t = this._linear ? S`div` : S`button`;
|
@@ -82,7 +85,7 @@ const f = class f extends g {
|
|
82
85
|
`;
|
83
86
|
}
|
84
87
|
};
|
85
|
-
l = new WeakMap(),
|
88
|
+
l = new WeakMap(), c = new WeakMap(), f.styles = [x, U];
|
86
89
|
let s = f;
|
87
90
|
o([
|
88
91
|
b({ reflect: !0 })
|
@@ -91,22 +94,22 @@ o([
|
|
91
94
|
b({ type: Boolean })
|
92
95
|
], s.prototype, "completed", 2);
|
93
96
|
o([
|
94
|
-
|
97
|
+
n()
|
95
98
|
], s.prototype, "_disabled", 2);
|
96
99
|
o([
|
97
|
-
|
100
|
+
n()
|
98
101
|
], s.prototype, "_index", 2);
|
99
102
|
o([
|
100
|
-
|
103
|
+
n()
|
101
104
|
], s.prototype, "_linear", 2);
|
102
105
|
o([
|
103
|
-
|
106
|
+
n()
|
104
107
|
], s.prototype, "_uiState", 2);
|
105
108
|
o([
|
106
|
-
|
109
|
+
n()
|
107
110
|
], s.prototype, "_setInternalState", 1);
|
108
111
|
o([
|
109
|
-
|
112
|
+
g("state")
|
110
113
|
], s.prototype, "_handleState", 1);
|
111
114
|
export {
|
112
115
|
s as SkfStepperItem
|
@@ -50,7 +50,7 @@ const s = e`
|
|
50
50
|
}
|
51
51
|
|
52
52
|
:is(.stepper-item--active, .stepper-item--completed) {
|
53
|
-
--_skf-stepper-color: var(--skf-text-color-
|
53
|
+
--_skf-stepper-color: var(--skf-text-color-emphasized);
|
54
54
|
}
|
55
55
|
|
56
56
|
.stepper-item--enabled {
|
@@ -70,17 +70,17 @@ const s = e`
|
|
70
70
|
user-select: none;
|
71
71
|
|
72
72
|
:is(.stepper-item--active, .stepper-item--active-completed, .stepper-item--completed) & {
|
73
|
-
--_skf-stepper-circle-border-color: var(--skf-border-color-
|
73
|
+
--_skf-stepper-circle-border-color: var(--skf-border-color-emphasized);
|
74
74
|
}
|
75
75
|
|
76
76
|
:is(.stepper-item--active, .stepper-item--active-completed) & {
|
77
77
|
--_skf-stepper-circle-color: var(--skf-text-color-inverse);
|
78
|
-
--_skf-stepper-circle-bg-color: var(--skf-bg-color-
|
78
|
+
--_skf-stepper-circle-bg-color: var(--skf-bg-color-emphasized);
|
79
79
|
}
|
80
80
|
|
81
81
|
.stepper-item--enabled & {
|
82
82
|
--_skf-stepper-circle-border-color: #6292e4; /* Missing token */
|
83
|
-
--_skf-stepper-circle-color: var(--skf-text-color-
|
83
|
+
--_skf-stepper-circle-color: var(--skf-text-color-emphasized);
|
84
84
|
}
|
85
85
|
}
|
86
86
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { FormBase } from '../../internal/components/formBase.js';
|
2
2
|
import type { FormFieldBaseProps } from '../../internal/types/formField.js';
|
3
|
+
import { type Language } from '../../utilities/localize.js';
|
3
4
|
import { type CSSResultGroup } from 'lit';
|
4
5
|
/**
|
5
6
|
* The `<skf-switch>` is a component that displays a list of actions or options
|
@@ -14,6 +15,7 @@ import { type CSSResultGroup } from 'lit';
|
|
14
15
|
* @tagname skf-switch
|
15
16
|
*/
|
16
17
|
export declare class SkfSwitch extends FormBase implements FormFieldBaseProps {
|
18
|
+
#private;
|
17
19
|
static styles: CSSResultGroup;
|
18
20
|
/** @internal */
|
19
21
|
private _initialChecked;
|
@@ -25,10 +27,10 @@ export declare class SkfSwitch extends FormBase implements FormFieldBaseProps {
|
|
25
27
|
hideLabel: boolean;
|
26
28
|
/** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
|
27
29
|
label?: string;
|
30
|
+
/** Sets the internal language of the component */
|
31
|
+
lang: Language;
|
28
32
|
/** If defined, adds name to the input-element */
|
29
33
|
name?: string;
|
30
|
-
/** If defined, renders an alternative A11y text for the asterisk */
|
31
|
-
requiredLabel?: string;
|
32
34
|
/** Size of the Switch */
|
33
35
|
size: 'sm' | 'md';
|
34
36
|
/** The current value of the input field */
|
@@ -1,21 +1,29 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
import { componentStyles as p } from "../../styles/component.styles.js";
|
4
|
-
import { nothing as c, html as v } from "lit";
|
5
|
-
import { property as s, state as f, query as m } from "lit/decorators.js";
|
6
|
-
import { classMap as _ } from "lit/directives/class-map.js";
|
7
|
-
import { ifDefined as b } from "lit/directives/if-defined.js";
|
8
|
-
import { styles as y } from "./switch.styles.js";
|
9
|
-
var g = Object.defineProperty, i = (d, e, a, k) => {
|
10
|
-
for (var l = void 0, h = d.length - 1, n; h >= 0; h--)
|
11
|
-
(n = d[h]) && (l = n(e, a, l) || l);
|
12
|
-
return l && g(e, a, l), l;
|
1
|
+
var p = (t) => {
|
2
|
+
throw TypeError(t);
|
13
3
|
};
|
14
|
-
|
4
|
+
var c = (t, i, e) => i.has(t) || p("Cannot " + e);
|
5
|
+
var v = (t, i, e) => (c(t, i, "read from private field"), e ? e.call(t) : i.get(t)), f = (t, i, e) => i.has(t) ? p("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, e), m = (t, i, e, l) => (c(t, i, "write to private field"), l ? l.call(t, e) : i.set(t, e), e);
|
6
|
+
import { FormBase as _ } from "../../internal/components/formBase.js";
|
7
|
+
import { Asterisk as y } from "../../internal/templates/asterisk.js";
|
8
|
+
import { componentStyles as b } from "../../styles/component.styles.js";
|
9
|
+
import { LocalizeController as g } from "../../utilities/localize.js";
|
10
|
+
import { nothing as k, html as $ } from "lit";
|
11
|
+
import { property as h, state as C, query as V } from "lit/decorators.js";
|
12
|
+
import { classMap as w } from "lit/directives/class-map.js";
|
13
|
+
import { ifDefined as q } from "lit/directives/if-defined.js";
|
14
|
+
import { styles as z } from "./switch.styles.js";
|
15
|
+
var A = Object.defineProperty, a = (t, i, e, l) => {
|
16
|
+
for (var r = void 0, d = t.length - 1, u; d >= 0; d--)
|
17
|
+
(u = t[d]) && (r = u(i, e, r) || r);
|
18
|
+
return r && A(i, e, r), r;
|
19
|
+
}, n;
|
20
|
+
const o = class o extends _ {
|
15
21
|
constructor() {
|
16
|
-
super(...arguments)
|
17
|
-
|
18
|
-
|
22
|
+
super(...arguments);
|
23
|
+
f(this, n);
|
24
|
+
m(this, n, new g(this)), this._initialChecked = !1, this.debug = !1, this.checked = !1, this.hideLabel = !1, this.lang = "en", this.size = "md", this.value = "", this._invalid = !1, this._handleChange = (e) => {
|
25
|
+
var l;
|
26
|
+
e.stopPropagation(), this.pristine = !1, this.checked = ((l = this.$input) == null ? void 0 : l.checked) ?? !1, this._validateInput(), this.checked ? this.setFormValue(this.value) : this.setFormValue(null), this.emitEvent("change");
|
19
27
|
}, this._handleInvalid = (e) => {
|
20
28
|
this.pristine = !1, this._invalid = !0, this.customErrorDisplay && e.preventDefault();
|
21
29
|
}, this._resetValue = (e) => {
|
@@ -42,18 +50,18 @@ const r = class r extends o {
|
|
42
50
|
var e;
|
43
51
|
if (this._invalid = !1, this.required && !this.checked) {
|
44
52
|
this.pristine || (this._invalid = !0);
|
45
|
-
const
|
53
|
+
const l = this.hasAttribute("data-valuemissing") ? this.getAttribute("data-valuemissing") : (
|
46
54
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
47
55
|
((e = this.$input) == null ? void 0 : e.validationMessage) || "Please check this box if you want to proceed"
|
48
56
|
);
|
49
|
-
this.setValidity({ valueMissing: !0 }, String(
|
57
|
+
this.setValidity({ valueMissing: !0 }, String(l));
|
50
58
|
} else
|
51
59
|
this.setValidity({});
|
52
60
|
}
|
53
61
|
render() {
|
54
|
-
return
|
62
|
+
return $`
|
55
63
|
<label
|
56
|
-
class=${
|
64
|
+
class=${w({
|
57
65
|
switch: !0,
|
58
66
|
"switch--small": this.size === "sm"
|
59
67
|
})}
|
@@ -67,50 +75,50 @@ const r = class r extends o {
|
|
67
75
|
@reset=${this._resetValue}
|
68
76
|
aria-invalid=${!!this._invalid}
|
69
77
|
class="switch__input"
|
70
|
-
name=${
|
78
|
+
name=${q(this.name)}
|
71
79
|
type="checkbox"
|
72
80
|
value=${this.value}
|
73
81
|
/>
|
74
|
-
<div class="switch__label ${this.hideLabel ? "visually-hidden" :
|
82
|
+
<div class="switch__label ${this.hideLabel ? "visually-hidden" : k}">
|
75
83
|
<slot>${this.label}</slot>
|
76
|
-
${this.required ?
|
84
|
+
${this.required ? y(v(this, n).term("required"), "switch__asterisk") : null}
|
77
85
|
</div>
|
78
86
|
</label>
|
79
87
|
`;
|
80
88
|
}
|
81
89
|
};
|
82
|
-
|
83
|
-
let
|
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
|
-
],
|
90
|
+
n = new WeakMap(), o.styles = [b, z];
|
91
|
+
let s = o;
|
92
|
+
a([
|
93
|
+
h({ type: Boolean })
|
94
|
+
], s.prototype, "debug");
|
95
|
+
a([
|
96
|
+
h({ type: Boolean, reflect: !0 })
|
97
|
+
], s.prototype, "checked");
|
98
|
+
a([
|
99
|
+
h({ type: Boolean, attribute: "hide-label", reflect: !0 })
|
100
|
+
], s.prototype, "hideLabel");
|
101
|
+
a([
|
102
|
+
h()
|
103
|
+
], s.prototype, "label");
|
104
|
+
a([
|
105
|
+
h({ type: String })
|
106
|
+
], s.prototype, "lang");
|
107
|
+
a([
|
108
|
+
h()
|
109
|
+
], s.prototype, "name");
|
110
|
+
a([
|
111
|
+
h({ reflect: !0 })
|
112
|
+
], s.prototype, "size");
|
113
|
+
a([
|
114
|
+
h()
|
115
|
+
], s.prototype, "value");
|
116
|
+
a([
|
117
|
+
C()
|
118
|
+
], s.prototype, "_invalid");
|
119
|
+
a([
|
120
|
+
V("input")
|
121
|
+
], s.prototype, "$input");
|
114
122
|
export {
|
115
|
-
|
123
|
+
s as SkfSwitch
|
116
124
|
};
|
@@ -12,7 +12,7 @@ export declare class SkfTabPanel extends SkfElement {
|
|
12
12
|
/** The tab panel's name. */
|
13
13
|
name: string;
|
14
14
|
active: boolean;
|
15
|
-
|
15
|
+
connectedCallback(): void;
|
16
16
|
/** @internal */
|
17
17
|
handleActiveChanged(): void;
|
18
18
|
render(): import("lit").TemplateResult<1>;
|
@@ -1,17 +1,20 @@
|
|
1
|
-
import { SkfElement as
|
2
|
-
import { watch as
|
3
|
-
import { componentStyles as
|
1
|
+
import { SkfElement as l } from "../../internal/components/skf-element.js";
|
2
|
+
import { watch as m } from "../../internal/helpers/watch.js";
|
3
|
+
import { componentStyles as h } from "../../styles/component.styles.js";
|
4
4
|
import { html as v } from "lit";
|
5
5
|
import { property as f, state as d } from "lit/decorators.js";
|
6
|
-
import { styles as
|
7
|
-
var
|
8
|
-
for (var t = o > 1 ? void 0 : o ?
|
9
|
-
(
|
10
|
-
return o && t &&
|
6
|
+
import { styles as u } from "./tab-panel.styles.js";
|
7
|
+
var y = Object.defineProperty, C = Object.getOwnPropertyDescriptor, p = (n, r, s, o) => {
|
8
|
+
for (var t = o > 1 ? void 0 : o ? C(r, s) : r, a = n.length - 1, i; a >= 0; a--)
|
9
|
+
(i = n[a]) && (t = (o ? i(r, s, t) : i(t)) || t);
|
10
|
+
return o && t && y(r, s, t), t;
|
11
11
|
};
|
12
|
-
const
|
12
|
+
const c = class c extends l {
|
13
13
|
constructor() {
|
14
|
-
super(), this.name = "", this.active = !1
|
14
|
+
super(...arguments), this.name = "", this.active = !1;
|
15
|
+
}
|
16
|
+
connectedCallback() {
|
17
|
+
super.connectedCallback(), this.role = "tabpanel";
|
15
18
|
}
|
16
19
|
handleActiveChanged() {
|
17
20
|
this.ariaHidden = this.active ? "false" : "true", this.tabIndex = this.active ? 0 : -1;
|
@@ -20,16 +23,16 @@ const m = class m extends c {
|
|
20
23
|
return v`<slot></slot>`;
|
21
24
|
}
|
22
25
|
};
|
23
|
-
|
24
|
-
let e =
|
25
|
-
|
26
|
+
c.styles = [h, u];
|
27
|
+
let e = c;
|
28
|
+
p([
|
26
29
|
f()
|
27
30
|
], e.prototype, "name", 2);
|
28
|
-
|
31
|
+
p([
|
29
32
|
d()
|
30
33
|
], e.prototype, "active", 2);
|
31
|
-
|
32
|
-
|
34
|
+
p([
|
35
|
+
m("active")
|
33
36
|
], e.prototype, "handleActiveChanged", 1);
|
34
37
|
export {
|
35
38
|
e as SkfTabPanel
|
@@ -1,24 +1,27 @@
|
|
1
|
-
import { SkfElement as
|
1
|
+
import { SkfElement as d } from "../../internal/components/skf-element.js";
|
2
2
|
import { watch as h } from "../../internal/helpers/watch.js";
|
3
3
|
import { componentStyles as m } from "../../styles/component.styles.js";
|
4
4
|
import { html as f } from "lit";
|
5
|
-
import { property as v, state as
|
5
|
+
import { property as v, state as n } from "lit/decorators.js";
|
6
6
|
import { classMap as b } from "lit/directives/class-map.js";
|
7
|
-
import { styles as
|
8
|
-
var
|
9
|
-
for (var e = r > 1 ? void 0 : r ? y(s, l) : s, i =
|
10
|
-
(o =
|
11
|
-
return r && e &&
|
7
|
+
import { styles as u } from "./tab.styles.js";
|
8
|
+
var _ = Object.defineProperty, y = Object.getOwnPropertyDescriptor, a = (p, s, l, r) => {
|
9
|
+
for (var e = r > 1 ? void 0 : r ? y(s, l) : s, i = p.length - 1, o; i >= 0; i--)
|
10
|
+
(o = p[i]) && (e = (r ? o(s, l, e) : o(e)) || e);
|
11
|
+
return r && e && _(s, l, e), e;
|
12
12
|
};
|
13
|
-
const
|
13
|
+
const c = class c extends d {
|
14
14
|
constructor() {
|
15
|
-
super(), this.panel = "", this.selected = !1, this.variant = "expanded", this._handleClick = () => {
|
15
|
+
super(...arguments), this.panel = "", this.selected = !1, this.variant = "expanded", this._handleClick = () => {
|
16
16
|
this.emit("skf-tab-select", {
|
17
17
|
detail: {
|
18
18
|
tab: this
|
19
19
|
}
|
20
20
|
});
|
21
|
-
}
|
21
|
+
};
|
22
|
+
}
|
23
|
+
connectedCallback() {
|
24
|
+
super.connectedCallback(), this.role = "tab", this.addEventListener("click", this._handleClick);
|
22
25
|
}
|
23
26
|
handleSelectedChange() {
|
24
27
|
this.ariaSelected = this.selected ? "true" : "false", this.tabIndex = this.selected ? 0 : -1;
|
@@ -38,16 +41,16 @@ const p = class p extends n {
|
|
38
41
|
`;
|
39
42
|
}
|
40
43
|
};
|
41
|
-
|
42
|
-
let t =
|
44
|
+
c.styles = [m, u];
|
45
|
+
let t = c;
|
43
46
|
a([
|
44
47
|
v({ reflect: !0 })
|
45
48
|
], t.prototype, "panel", 2);
|
46
49
|
a([
|
47
|
-
|
50
|
+
n()
|
48
51
|
], t.prototype, "selected", 2);
|
49
52
|
a([
|
50
|
-
|
53
|
+
n()
|
51
54
|
], t.prototype, "variant", 2);
|
52
55
|
a([
|
53
56
|
h("selected")
|
@@ -86,7 +86,7 @@ const e = o`
|
|
86
86
|
}
|
87
87
|
|
88
88
|
&:hover {
|
89
|
-
--_skf-tab-bg-color: var(--skf-color-blue-
|
89
|
+
--_skf-tab-bg-color: var(--skf-color-blue-lightest);
|
90
90
|
}
|
91
91
|
|
92
92
|
:host(:focus-visible) & {
|
@@ -97,7 +97,7 @@ const e = o`
|
|
97
97
|
.tab--expanded.tab--selected {
|
98
98
|
--_skf-tab-bg-color: var(--skf-bg-color-neutral-1);
|
99
99
|
--_skf-tab-border-bottom-color: transparent;
|
100
|
-
--_skf-tab-color: var(--skf-text-color-
|
100
|
+
--_skf-tab-color: var(--skf-text-color-emphasized);
|
101
101
|
|
102
102
|
font-weight: var(--skf-font-weight-bold);
|
103
103
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import '../icon/icon.js';
|
2
2
|
import { SkfElement } from '../../internal/components/skf-element';
|
3
3
|
import type { Icon, Severity } from '../../internal/types.js';
|
4
|
+
import { type Language } from '../../utilities/localize.js';
|
4
5
|
import { type CSSResultGroup } from 'lit';
|
5
6
|
type Size = 'sm' | 'md';
|
6
7
|
/**
|
@@ -25,6 +26,8 @@ export declare class SkfTag extends SkfElement {
|
|
25
26
|
icon?: Icon;
|
26
27
|
/** If defined, gives the supplied appearance */
|
27
28
|
color?: Severity;
|
29
|
+
/** Sets the internal language of the component */
|
30
|
+
lang: Language;
|
28
31
|
/** If defined, accepts a function that runs on click */
|
29
32
|
set onClick(onClickFn: ((event: Event) => void) | undefined);
|
30
33
|
get onClick(): ((event: Event) => void) | undefined;
|