@skf-design-system/ui-components 1.0.0-alpha.37 → 1.0.0-alpha.38
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/dist/components/menu/menu.component.js +1 -1
- package/dist/components/select/select.controllers.js +9 -4
- package/dist/components/select/select.styles.js +1 -0
- package/dist/internal/base-classes/popover/popover.base.d.ts +1 -1
- package/dist/internal/base-classes/popover/popover.base.js +2 -3
- package/package.json +1 -1
@@ -6,7 +6,7 @@ const s = class s extends t {
|
|
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
12
|
s.styles = [t.styles, r];
|
@@ -23,7 +23,7 @@ class d {
|
|
23
23
|
document.removeEventListener("click", this._globalClickHandler);
|
24
24
|
}
|
25
25
|
}
|
26
|
-
class
|
26
|
+
class p {
|
27
27
|
constructor(t) {
|
28
28
|
this._handleKeyDown = (e) => {
|
29
29
|
switch (e.key) {
|
@@ -82,7 +82,7 @@ class b {
|
|
82
82
|
return !this.host || !this.host._optionsList ? [] : this.host._optionsList.filter((t) => !t.disabled);
|
83
83
|
}
|
84
84
|
}
|
85
|
-
class
|
85
|
+
class b {
|
86
86
|
constructor(t) {
|
87
87
|
(this.host = t).addController(this);
|
88
88
|
}
|
@@ -103,11 +103,16 @@ class p {
|
|
103
103
|
),
|
104
104
|
reason: "attribute-mismatch",
|
105
105
|
replaceStrings: [t, "min or max", "together with multiple"]
|
106
|
+
}), a({
|
107
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
108
|
+
assert: this.host.hideTags && this.host.multiple || !this.host.hideTags,
|
109
|
+
reason: "attribute-mismatch",
|
110
|
+
replaceStrings: [t, "hide-tags", "together with multiple"]
|
106
111
|
});
|
107
112
|
}
|
108
113
|
}
|
109
114
|
export {
|
110
|
-
|
115
|
+
b as DeveloperFeedbackController,
|
111
116
|
d as GlobalClickController,
|
112
|
-
|
117
|
+
p as KeyboardNavigationController
|
113
118
|
};
|
@@ -28,7 +28,7 @@ export declare class SkfPopoverBase extends SkfElement {
|
|
28
28
|
handleAnchorChange: () => Promise<void>;
|
29
29
|
reposition: () => Promise<void>;
|
30
30
|
handleEscapeKey: (e: KeyboardEvent) => void;
|
31
|
-
open(e: Event)
|
31
|
+
open: (e: Event) => void;
|
32
32
|
/** @internal add additional open tasks here in UI component */
|
33
33
|
openExtended(): void;
|
34
34
|
close(): void;
|
@@ -56,6 +56,8 @@ const s = (p = class extends S {
|
|
56
56
|
}
|
57
57
|
}, this.handleEscapeKey = (t) => {
|
58
58
|
t.key === "Escape" && this.close();
|
59
|
+
}, this.open = (t) => {
|
60
|
+
t.stopPropagation(), this._toggleOpen(!0), this.abortEventsController = new AbortController(), this.signal = this.abortEventsController.signal, document.addEventListener("keydown", this.handleEscapeKey, { signal: this.signal }), this.openExtended();
|
59
61
|
}, this.setAttribute("popover", "");
|
60
62
|
}
|
61
63
|
disconnectedCallback() {
|
@@ -80,9 +82,6 @@ const s = (p = class extends S {
|
|
80
82
|
{ signal: this.signal }
|
81
83
|
), 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
84
|
}
|
83
|
-
open(t) {
|
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
|
-
}
|
86
85
|
/** @internal add additional open tasks here in UI component */
|
87
86
|
openExtended() {
|
88
87
|
}
|
package/package.json
CHANGED