@skf-design-system/ui-components 1.0.2-beta.1 → 1.0.2-beta.11
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 +25 -1
- package/dist/components/accordion/accordion-item.component.js +49 -38
- package/dist/components/accordion/accordion.component.d.ts +2 -2
- package/dist/components/accordion/accordion.component.js +12 -12
- package/dist/components/alert/alert.component.d.ts +8 -3
- package/dist/components/alert/alert.component.js +59 -50
- package/dist/components/alert/alert.styles.js +51 -47
- package/dist/components/breadcrumb/breadcrumb-item.component.js +30 -32
- package/dist/components/breadcrumb/breadcrumb-item.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb-item.styles.js +16 -15
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +5 -2
- package/dist/components/breadcrumb/breadcrumb.component.js +51 -46
- package/dist/components/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb.styles.js +13 -10
- package/dist/components/button/button.component.js +63 -67
- package/dist/components/button/button.styles.js +5 -4
- package/dist/components/card/card.component.d.ts +5 -0
- package/dist/components/card/card.component.js +46 -24
- package/dist/components/card/card.styles.js +31 -14
- package/dist/components/checkbox/checkbox.component.d.ts +6 -5
- package/dist/components/checkbox/checkbox.component.js +67 -69
- package/dist/components/checkbox/checkbox.styles.js +1 -1
- package/dist/components/{date-picker/datepicker.calendar.component.d.ts → datepicker/datepicker-calendar.component.d.ts} +8 -1
- package/dist/components/{date-picker/datepicker.calendar.component.js → datepicker/datepicker-calendar.component.js} +109 -115
- package/dist/components/datepicker/datepicker-calendar.d.ts +8 -0
- package/dist/components/datepicker/datepicker-calendar.js +6 -0
- package/dist/components/{date-picker/datepicker.component.d.ts → datepicker/datepicker-popup.component.d.ts} +9 -20
- package/dist/components/datepicker/datepicker-popup.component.js +272 -0
- package/dist/components/datepicker/datepicker-popup.d.ts +8 -0
- package/dist/components/{date-picker/datepicker.helpers.d.ts → datepicker/datepicker-popup.helpers.d.ts} +3 -3
- package/dist/components/datepicker/datepicker-popup.helpers.js +83 -0
- package/dist/components/datepicker/datepicker-popup.js +6 -0
- package/dist/components/{date-picker/datepicker.styles.js → datepicker/datepicker-popup.styles.js} +3 -3
- package/dist/components/{date-picker-input/datepicker-input.component.d.ts → datepicker/datepicker.component.d.ts} +21 -14
- package/dist/components/datepicker/datepicker.component.js +455 -0
- package/dist/components/datepicker/datepicker.d.ts +8 -0
- package/dist/components/datepicker/datepicker.js +6 -0
- package/dist/components/dialog/dialog.component.d.ts +3 -2
- package/dist/components/dialog/dialog.component.js +49 -49
- package/dist/components/dialog/dialog.d.ts +2 -2
- 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 +12 -4
- package/dist/components/drawer/drawer.component.js +84 -61
- package/dist/components/drawer/drawer.d.ts +2 -2
- 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 +64 -57
- package/dist/components/header/header.d.ts +2 -2
- package/dist/components/header/header.styles.js +2 -2
- package/dist/components/heading/heading.component.d.ts +5 -1
- package/dist/components/heading/heading.component.js +54 -27
- package/dist/components/heading/heading.styles.js +34 -36
- package/dist/components/icon/icon.component.d.ts +4 -0
- package/dist/components/icon/icon.component.js +62 -43
- package/dist/components/icon/icon.styles.js +60 -60
- package/dist/components/input/input.component.d.ts +4 -8
- package/dist/components/input/input.component.js +90 -97
- package/dist/components/input/input.controllers.d.ts +0 -1
- package/dist/components/input/input.controllers.js +14 -19
- package/dist/components/link/link.component.d.ts +16 -18
- package/dist/components/link/link.component.js +109 -106
- package/dist/components/link/link.styles.js +49 -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/logo/logo.component.d.ts +4 -1
- package/dist/components/logo/logo.component.js +55 -51
- package/dist/components/logo/logo.styles.js +26 -16
- 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.d.ts +2 -2
- 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/menu/menu.d.ts +2 -2
- package/dist/components/nav/nav-item.component.d.ts +6 -2
- 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.d.ts +2 -2
- 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/popover/popover.d.ts +2 -2
- package/dist/components/progress/progress.component.d.ts +2 -0
- package/dist/components/progress/progress.component.js +38 -29
- package/dist/components/progress/progress.d.ts +2 -2
- package/dist/components/progress/progress.styles.js +10 -8
- package/dist/components/radio/radio.component.d.ts +4 -2
- package/dist/components/radio/radio.component.js +96 -91
- 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.d.ts +2 -2
- package/dist/components/segmented-button/segmented-button-item.styles.js +1 -1
- package/dist/components/segmented-button/segmented-button.component.js +22 -24
- package/dist/components/segmented-button/segmented-button.d.ts +2 -2
- 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.d.ts +2 -2
- package/dist/components/select/select-option-group.style.js +12 -6
- package/dist/components/select/select-option.component.d.ts +9 -4
- package/dist/components/select/select-option.component.js +70 -58
- package/dist/components/select/select-option.styles.js +43 -31
- package/dist/components/select/select.component.d.ts +21 -12
- package/dist/components/select/select.component.js +125 -87
- package/dist/components/select/select.controllers.js +15 -20
- 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 +59 -56
- package/dist/components/stepper/stepper-item.d.ts +2 -2
- package/dist/components/stepper/stepper-item.styles.js +4 -4
- package/dist/components/stepper/stepper.component.js +2 -3
- package/dist/components/stepper/stepper.d.ts +2 -2
- package/dist/components/stepper/stepper.helpers.js +6 -7
- package/dist/components/switch/switch.component.d.ts +4 -2
- package/dist/components/switch/switch.component.js +64 -58
- package/dist/components/switch/switch.d.ts +2 -2
- package/dist/components/switch/switch.styles.js +1 -1
- package/dist/components/{tab-panel → tabs}/tab-panel.component.d.ts +1 -1
- package/dist/components/tabs/tab-panel.component.js +39 -0
- package/dist/components/{tab-panel → tabs}/tab-panel.d.ts +2 -2
- package/dist/components/{tab → tabs}/tab.component.d.ts +3 -3
- package/dist/components/{tab → tabs}/tab.component.js +17 -14
- package/dist/components/{tab → tabs}/tab.d.ts +2 -2
- package/dist/components/{tab → tabs}/tab.styles.js +2 -2
- package/dist/components/{tab-group/tab-group.component.d.ts → tabs/tabs.component.d.ts} +3 -4
- package/dist/components/{tab-group/tab-group.component.js → tabs/tabs.component.js} +35 -36
- package/dist/components/tabs/tabs.d.ts +8 -0
- package/dist/components/tabs/tabs.js +6 -0
- package/dist/components/{tab-group/tab-group.styles.js → tabs/tabs.styles.js} +16 -16
- package/dist/components/tag/tag.component.d.ts +10 -2
- package/dist/components/tag/tag.component.js +77 -65
- package/dist/components/tag/tag.d.ts +2 -2
- package/dist/components/tag/tag.styles.js +63 -50
- package/dist/components/textarea/textarea.component.d.ts +4 -2
- package/dist/components/textarea/textarea.component.js +102 -95
- 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 +19 -20
- package/dist/components/tooltip/tooltip.component.d.ts +9 -2
- package/dist/components/tooltip/tooltip.component.js +15 -11
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/custom-elements.json +1699 -1112
- package/dist/index.d.ts +8 -7
- package/dist/index.js +96 -93
- package/dist/internal/base-classes/popover/popover.base.d.ts +24 -5
- package/dist/internal/base-classes/popover/popover.base.js +41 -44
- package/dist/internal/base-classes/popover/popover.styles.js +4 -5
- package/dist/internal/components/formBase.d.ts +1 -0
- package/dist/internal/components/formBase.js +11 -19
- 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/components/skf-element.d.ts +1 -3
- package/dist/internal/components/skf-element.js +4 -9
- package/dist/internal/controllers/popover.controller.d.ts +2 -0
- package/dist/internal/controllers/popover.controller.js +11 -14
- package/dist/internal/helpers/stateMap.d.ts +14 -0
- package/dist/internal/helpers/stateMap.js +68 -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/helpers/watch.js +12 -12
- 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/component.styles.js +37 -36
- package/dist/styles/global-alt.css +1 -0
- 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 +1990 -866
- package/dist/types/vue/index.d.ts +220 -169
- package/dist/utilities/localize.d.ts +28 -0
- package/dist/utilities/localize.js +13 -0
- package/dist/vscode.html-custom-data.json +265 -188
- package/dist/web-types.json +731 -548
- package/package.json +39 -51
- package/dist/components/accordion/accordion-item.test.d.ts +0 -1
- package/dist/components/accordion/accordion.test.d.ts +0 -1
- package/dist/components/checkbox/checkbox.test.d.ts +0 -1
- package/dist/components/date-picker/datepicker.component.js +0 -261
- package/dist/components/date-picker/datepicker.d.ts +0 -10
- package/dist/components/date-picker/datepicker.helpers.js +0 -76
- package/dist/components/date-picker/datepicker.js +0 -8
- package/dist/components/date-picker-input/datepicker-input.component.js +0 -442
- package/dist/components/date-picker-input/datepicker-input.d.ts +0 -8
- package/dist/components/date-picker-input/datepicker-input.js +0 -6
- package/dist/components/input/input.test.d.ts +0 -1
- package/dist/components/radio/radio.test.d.ts +0 -1
- package/dist/components/switch/switch.test.d.ts +0 -1
- package/dist/components/tab-group/tab-group.d.ts +0 -8
- package/dist/components/tab-group/tab-group.js +0 -6
- package/dist/components/tab-panel/tab-panel.component.js +0 -36
- package/dist/internal/playwright/index.d.ts +0 -1
- /package/dist/components/{date-picker/datepicker.calendar.styles.d.ts → datepicker/datepicker-calendar.styles.d.ts} +0 -0
- /package/dist/components/{date-picker/datepicker.calendar.styles.js → datepicker/datepicker-calendar.styles.js} +0 -0
- /package/dist/components/{date-picker/datepicker.styles.d.ts → datepicker/datepicker-popup.styles.d.ts} +0 -0
- /package/dist/components/{date-picker-input/datepicker-input.helpers.d.ts → datepicker/datepicker.helpers.d.ts} +0 -0
- /package/dist/components/{date-picker-input/datepicker-input.helpers.js → datepicker/datepicker.helpers.js} +0 -0
- /package/dist/components/{date-picker-input/datepicker-input.styles.d.ts → datepicker/datepicker.styles.d.ts} +0 -0
- /package/dist/components/{date-picker-input/datepicker-input.styles.js → datepicker/datepicker.styles.js} +0 -0
- /package/dist/components/select/{select.stories.icons.d.ts → stories/select.stories.icons.d.ts} +0 -0
- /package/dist/components/{tab-panel → tabs}/tab-panel.js +0 -0
- /package/dist/components/{tab-panel → tabs}/tab-panel.styles.d.ts +0 -0
- /package/dist/components/{tab-panel → tabs}/tab-panel.styles.js +0 -0
- /package/dist/components/{tab → tabs}/tab.js +0 -0
- /package/dist/components/{tab → tabs}/tab.styles.d.ts +0 -0
- /package/dist/components/{tab-group/tab-group.styles.d.ts → tabs/tabs.styles.d.ts} +0 -0
@@ -2,39 +2,42 @@ 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
|
7
|
+
import { SkfElement as C } from "../../internal/components/skf-element.js";
|
8
8
|
import { watch as g } from "../../internal/helpers/watch.js";
|
9
|
-
import { componentStyles as
|
9
|
+
import { componentStyles as x } from "../../styles/component.styles.js";
|
10
10
|
import "lit";
|
11
|
-
import { property 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
|
-
import { ifDefined as
|
14
|
-
import { literal as
|
13
|
+
import { ifDefined as w } from "lit/directives/if-defined.js";
|
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
|
-
var I = Object.defineProperty, O = Object.getOwnPropertyDescriptor,
|
17
|
-
for (var p =
|
18
|
-
(
|
19
|
-
return
|
20
|
-
},
|
21
|
-
const f = class f extends
|
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, d = e.length - 1, h; d >= 0; d--)
|
18
|
+
(h = e[d]) && (p = (a ? h(i, t, p) : h(p)) || p);
|
19
|
+
return a && p && I(i, t, p), p;
|
20
|
+
}, l, c;
|
21
|
+
const f = class f extends C {
|
22
22
|
constructor() {
|
23
|
-
super();
|
24
|
-
_(this,
|
25
|
-
_(this,
|
26
|
-
r(this,
|
23
|
+
super(...arguments);
|
24
|
+
_(this, l);
|
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
|
-
r(this,
|
32
|
-
r(this,
|
31
|
+
r(this, l, !0), this._uiState = t, t === "active" || t === "activeCompleted" ? this.state = t === "active" ? "active" : "completed" : this.state = void 0, setTimeout(() => {
|
32
|
+
r(this, l, !1);
|
33
33
|
});
|
34
34
|
}
|
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,25 +47,25 @@ const f = class f extends b {
|
|
44
47
|
this._setInternalState = "activeCompleted";
|
45
48
|
return;
|
46
49
|
}
|
47
|
-
if (
|
48
|
-
r(this,
|
50
|
+
if (m(this, l)) {
|
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
|
-
const t = this._linear ?
|
64
|
-
return
|
65
|
-
<${
|
66
|
+
const t = this._linear ? S`div` : S`button`;
|
67
|
+
return y`
|
68
|
+
<${t}
|
66
69
|
@click=${this._handleClick}
|
67
70
|
?disabled=${this._disabled}
|
68
71
|
class=${$({
|
@@ -72,42 +75,42 @@ const f = class f extends b {
|
|
72
75
|
"stepper-item--completed": this._uiState === "completed",
|
73
76
|
"stepper-item--enabled": this._uiState === "enabled"
|
74
77
|
})}
|
75
|
-
type=${
|
78
|
+
type=${w(this._linear ? void 0 : "button")}
|
76
79
|
>
|
77
80
|
<div class="stepper-item__circle">
|
78
|
-
${this._uiState === "activeCompleted" ?
|
81
|
+
${this._uiState === "activeCompleted" ? y`<skf-icon color="inverse" name="check"></skf-icon>` : this._index}
|
79
82
|
</div>
|
80
83
|
<slot class="stepper-item__label"></slot>
|
81
|
-
</${
|
84
|
+
</${t}>
|
82
85
|
`;
|
83
86
|
}
|
84
87
|
};
|
85
|
-
|
86
|
-
let
|
87
|
-
|
88
|
-
|
89
|
-
],
|
90
|
-
|
91
|
-
|
92
|
-
],
|
93
|
-
|
94
|
-
|
95
|
-
],
|
96
|
-
|
97
|
-
|
98
|
-
],
|
99
|
-
|
100
|
-
|
101
|
-
],
|
102
|
-
|
103
|
-
|
104
|
-
],
|
105
|
-
|
106
|
-
|
107
|
-
],
|
108
|
-
|
88
|
+
l = new WeakMap(), c = new WeakMap(), f.styles = [x, U];
|
89
|
+
let s = f;
|
90
|
+
o([
|
91
|
+
b({ reflect: !0 })
|
92
|
+
], s.prototype, "state", 2);
|
93
|
+
o([
|
94
|
+
b({ type: Boolean })
|
95
|
+
], s.prototype, "completed", 2);
|
96
|
+
o([
|
97
|
+
n()
|
98
|
+
], s.prototype, "_disabled", 2);
|
99
|
+
o([
|
100
|
+
n()
|
101
|
+
], s.prototype, "_index", 2);
|
102
|
+
o([
|
103
|
+
n()
|
104
|
+
], s.prototype, "_linear", 2);
|
105
|
+
o([
|
106
|
+
n()
|
107
|
+
], s.prototype, "_uiState", 2);
|
108
|
+
o([
|
109
|
+
n()
|
110
|
+
], s.prototype, "_setInternalState", 1);
|
111
|
+
o([
|
109
112
|
g("state")
|
110
|
-
],
|
113
|
+
], s.prototype, "_handleState", 1);
|
111
114
|
export {
|
112
|
-
|
115
|
+
s as SkfStepperItem
|
113
116
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { SkfStepperItem } from './stepper-item.component';
|
2
|
-
export * from './stepper-item.component';
|
1
|
+
import { SkfStepperItem } from './stepper-item.component.js';
|
2
|
+
export * from './stepper-item.component.js';
|
3
3
|
export default SkfStepperItem;
|
4
4
|
declare global {
|
5
5
|
interface HTMLElementTagNameMap {
|
@@ -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
|
|
@@ -44,9 +44,8 @@ const c = class c extends I {
|
|
44
44
|
});
|
45
45
|
}
|
46
46
|
_handleLinearMode() {
|
47
|
-
|
48
|
-
|
49
|
-
this.linear && (s._linear = !0);
|
47
|
+
this._items?.forEach((e) => {
|
48
|
+
this.linear && (e._linear = !0);
|
50
49
|
});
|
51
50
|
}
|
52
51
|
/** @internal */
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { SkfStepper } from './stepper.component';
|
2
|
-
export * from './stepper.component';
|
1
|
+
import { SkfStepper } from './stepper.component.js';
|
2
|
+
export * from './stepper.component.js';
|
3
3
|
export default SkfStepper;
|
4
4
|
declare global {
|
5
5
|
interface HTMLElementTagNameMap {
|
@@ -1,18 +1,17 @@
|
|
1
|
-
const
|
1
|
+
const u = ({
|
2
2
|
activeIndex: c,
|
3
|
-
items:
|
3
|
+
items: l,
|
4
4
|
linear: i,
|
5
5
|
state: o,
|
6
6
|
index: e
|
7
7
|
}) => {
|
8
|
-
|
9
|
-
const n = (l = r[e - 1]) == null ? void 0 : l.state, p = e > c + 1, b = n === "active", a = ["active", "completed"].includes(o ?? ""), s = !i && a, d = i && !s ? !1 : (p || b || a) && !s, v = o === "active", f = e < c, m = o === "completed", u = !s && n === "completed" && e === c + 1, t = {
|
8
|
+
const n = l[e - 1]?.state, r = e > c + 1, p = n === "active", a = ["active", "completed"].includes(o ?? ""), s = !i && a, b = i && !s ? !1 : (r || p || a) && !s, d = o === "active", v = e < c, f = o === "completed", m = !s && n === "completed" && e === c + 1, t = {
|
10
9
|
isCurrentStep: a,
|
11
|
-
isDisabled:
|
10
|
+
isDisabled: b,
|
12
11
|
isSpan: s
|
13
12
|
};
|
14
|
-
return
|
13
|
+
return m ? { stateLabel: "enabled", ...t } : d ? { stateLabel: "active", ...t } : f ? { stateLabel: "activeCompleted", ...t } : v ? { stateLabel: "completed", ...t } : { stateLabel: void 0, ...t };
|
15
14
|
};
|
16
15
|
export {
|
17
|
-
|
16
|
+
u as stepperState
|
18
17
|
};
|
@@ -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,28 @@
|
|
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, n) => (c(t, i, "write to private field"), n ? n.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 l, 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, n) => {
|
16
|
+
for (var h = void 0, d = t.length - 1, u; d >= 0; d--)
|
17
|
+
(u = t[d]) && (h = u(i, e, h) || h);
|
18
|
+
return h && A(i, e, h), h;
|
19
|
+
}, r;
|
20
|
+
const o = class o extends _ {
|
15
21
|
constructor() {
|
16
|
-
super(...arguments)
|
17
|
-
|
18
|
-
|
22
|
+
super(...arguments);
|
23
|
+
f(this, r);
|
24
|
+
m(this, r, 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
|
+
e.stopPropagation(), this.pristine = !1, this.checked = this.$input?.checked ?? !1, this._validateInput(), this.checked ? this.setFormValue(this.value) : this.setFormValue(null), this.emitEvent("change");
|
19
26
|
}, this._handleInvalid = (e) => {
|
20
27
|
this.pristine = !1, this._invalid = !0, this.customErrorDisplay && e.preventDefault();
|
21
28
|
}, this._resetValue = (e) => {
|
@@ -39,21 +46,20 @@ const r = class r extends o {
|
|
39
46
|
}
|
40
47
|
/** @internal */
|
41
48
|
_validateInput() {
|
42
|
-
var e;
|
43
49
|
if (this._invalid = !1, this.required && !this.checked) {
|
44
50
|
this.pristine || (this._invalid = !0);
|
45
|
-
const
|
51
|
+
const e = this.hasAttribute("data-valuemissing") ? this.getAttribute("data-valuemissing") : (
|
46
52
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
47
|
-
|
53
|
+
this.$input?.validationMessage || "Please check this box if you want to proceed"
|
48
54
|
);
|
49
|
-
this.setValidity({ valueMissing: !0 }, String(
|
55
|
+
this.setValidity({ valueMissing: !0 }, String(e));
|
50
56
|
} else
|
51
57
|
this.setValidity({});
|
52
58
|
}
|
53
59
|
render() {
|
54
|
-
return
|
60
|
+
return $`
|
55
61
|
<label
|
56
|
-
class=${
|
62
|
+
class=${w({
|
57
63
|
switch: !0,
|
58
64
|
"switch--small": this.size === "sm"
|
59
65
|
})}
|
@@ -67,50 +73,50 @@ const r = class r extends o {
|
|
67
73
|
@reset=${this._resetValue}
|
68
74
|
aria-invalid=${!!this._invalid}
|
69
75
|
class="switch__input"
|
70
|
-
name=${
|
76
|
+
name=${q(this.name)}
|
71
77
|
type="checkbox"
|
72
78
|
value=${this.value}
|
73
79
|
/>
|
74
|
-
<div class="switch__label ${this.hideLabel ? "visually-hidden" :
|
80
|
+
<div class="switch__label ${this.hideLabel ? "visually-hidden" : k}">
|
75
81
|
<slot>${this.label}</slot>
|
76
|
-
${this.required ?
|
82
|
+
${this.required ? y(v(this, r).term("required"), "switch__asterisk") : null}
|
77
83
|
</div>
|
78
84
|
</label>
|
79
85
|
`;
|
80
86
|
}
|
81
87
|
};
|
82
|
-
r.styles = [
|
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
|
-
],
|
88
|
+
r = new WeakMap(), o.styles = [b, z];
|
89
|
+
let s = o;
|
90
|
+
a([
|
91
|
+
l({ type: Boolean })
|
92
|
+
], s.prototype, "debug");
|
93
|
+
a([
|
94
|
+
l({ type: Boolean, reflect: !0 })
|
95
|
+
], s.prototype, "checked");
|
96
|
+
a([
|
97
|
+
l({ type: Boolean, attribute: "hide-label", reflect: !0 })
|
98
|
+
], s.prototype, "hideLabel");
|
99
|
+
a([
|
100
|
+
l()
|
101
|
+
], s.prototype, "label");
|
102
|
+
a([
|
103
|
+
l({ type: String })
|
104
|
+
], s.prototype, "lang");
|
105
|
+
a([
|
106
|
+
l()
|
107
|
+
], s.prototype, "name");
|
108
|
+
a([
|
109
|
+
l({ reflect: !0 })
|
110
|
+
], s.prototype, "size");
|
111
|
+
a([
|
112
|
+
l()
|
113
|
+
], s.prototype, "value");
|
114
|
+
a([
|
115
|
+
C()
|
116
|
+
], s.prototype, "_invalid");
|
117
|
+
a([
|
118
|
+
V("input")
|
119
|
+
], s.prototype, "$input");
|
114
120
|
export {
|
115
|
-
|
121
|
+
s as SkfSwitch
|
116
122
|
};
|
@@ -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>;
|
@@ -0,0 +1,39 @@
|
|
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
|
+
import { html as v } from "lit";
|
5
|
+
import { property as f, state as d } from "lit/decorators.js";
|
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
|
+
};
|
12
|
+
const c = class c extends l {
|
13
|
+
constructor() {
|
14
|
+
super(...arguments), this.name = "", this.active = !1;
|
15
|
+
}
|
16
|
+
connectedCallback() {
|
17
|
+
super.connectedCallback(), this.role = "tabpanel";
|
18
|
+
}
|
19
|
+
handleActiveChanged() {
|
20
|
+
this.ariaHidden = this.active ? "false" : "true", this.tabIndex = this.active ? 0 : -1;
|
21
|
+
}
|
22
|
+
render() {
|
23
|
+
return v`<slot></slot>`;
|
24
|
+
}
|
25
|
+
};
|
26
|
+
c.styles = [h, u];
|
27
|
+
let e = c;
|
28
|
+
p([
|
29
|
+
f()
|
30
|
+
], e.prototype, "name", 2);
|
31
|
+
p([
|
32
|
+
d()
|
33
|
+
], e.prototype, "active", 2);
|
34
|
+
p([
|
35
|
+
m("active")
|
36
|
+
], e.prototype, "handleActiveChanged", 1);
|
37
|
+
export {
|
38
|
+
e as SkfTabPanel
|
39
|
+
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { SkfTabPanel } from './tab-panel.component';
|
2
|
-
export * from './tab-panel.component';
|
1
|
+
import { SkfTabPanel } from './tab-panel.component.js';
|
2
|
+
export * from './tab-panel.component.js';
|
3
3
|
export default SkfTabPanel;
|
4
4
|
declare global {
|
5
5
|
interface HTMLElementTagNameMap {
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import type { SkfTabGroup } from '../tab-group/tab-group.component.js';
|
2
1
|
import { SkfElement } from '../../internal/components/skf-element';
|
3
2
|
import { type CSSResultGroup } from 'lit';
|
3
|
+
import type { SkfTabs } from './tabs.component.js';
|
4
4
|
export interface SkfTabEvent {
|
5
5
|
tab: SkfTab;
|
6
6
|
}
|
@@ -19,8 +19,8 @@ export declare class SkfTab extends SkfElement {
|
|
19
19
|
/** The name of the tab-panel this tab is associated with. The panel must be located in the same tab group. */
|
20
20
|
panel: string;
|
21
21
|
selected: boolean;
|
22
|
-
variant:
|
23
|
-
|
22
|
+
variant: SkfTabs['variant'];
|
23
|
+
connectedCallback(): void;
|
24
24
|
/** @internal */
|
25
25
|
handleSelectedChange(): void;
|
26
26
|
/** @internal */
|
@@ -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,17 +1,16 @@
|
|
1
|
-
import '../card/card.js';
|
2
1
|
import { SkfElement } from '../../internal/components/skf-element';
|
3
2
|
import { type CSSResultGroup, type PropertyValues } from 'lit';
|
4
3
|
/**
|
5
|
-
* The `<skf-
|
4
|
+
* The `<skf-tabs>` is a component that displays a list of actions or options
|
6
5
|
*
|
7
6
|
* @documentation See [zeroheight](https://zeroheight.com/****) for design principles
|
8
7
|
*
|
9
8
|
* @slot - Used for grouping tab panels in the tab group. Must be <skf-tab-panel> elements
|
10
9
|
* @slot tabs - Used for grouping tabs in the tab group. Must be <skf-tab> elements
|
11
10
|
*
|
12
|
-
* @tagname skf-
|
11
|
+
* @tagname skf-tabs
|
13
12
|
*/
|
14
|
-
export declare class
|
13
|
+
export declare class SkfTabs extends SkfElement {
|
15
14
|
static styles: CSSResultGroup;
|
16
15
|
/** Sets the default selected tab */
|
17
16
|
defaultSelected: number;
|