@skf-design-system/ui-components 1.0.2-beta.12 → 1.0.2-beta.14
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/input/input.component.d.ts +1 -0
- package/dist/components/input/input.component.js +45 -45
- package/dist/components/popover/popover.component.d.ts +0 -4
- package/dist/components/popover/popover.component.js +22 -30
- package/dist/components/tag/tag.component.d.ts +6 -6
- package/dist/components/tag/tag.component.js +65 -65
- package/dist/components/tag/tag.styles.js +5 -0
- package/dist/components/tooltip/tooltip.component.d.ts +0 -4
- package/dist/components/tooltip/tooltip.component.js +13 -9
- package/dist/custom-elements.json +131 -124
- package/dist/internal/base-classes/popover/popover.base.d.ts +6 -5
- package/dist/internal/base-classes/popover/popover.base.js +66 -60
- package/dist/types/jsx/custom-element-jsx.d.ts +41 -38
- package/dist/types/vue/index.d.ts +26 -23
- package/dist/vscode.html-custom-data.json +23 -23
- package/dist/web-types.json +56 -46
- package/package.json +1 -1
@@ -2461,6 +2461,128 @@
|
|
2461
2461
|
],
|
2462
2462
|
"typeDefinitionPath": "components/datepicker/datepicker.d.ts"
|
2463
2463
|
},
|
2464
|
+
{
|
2465
|
+
"kind": "javascript-module",
|
2466
|
+
"path": "components/divider/divider.js",
|
2467
|
+
"declarations": [
|
2468
|
+
{
|
2469
|
+
"kind": "class",
|
2470
|
+
"description": "The `<Divider>` component can separate items from each other, to visually emphasize their lack of a relationship between groups of information",
|
2471
|
+
"name": "SkfDivider",
|
2472
|
+
"cssProperties": [
|
2473
|
+
{
|
2474
|
+
"description": "The amount of space the divider occupies. Pass valid CSS **margin-block** values when horizontal and **margin-inline** when vertical",
|
2475
|
+
"name": "--skf-divider-spacing"
|
2476
|
+
},
|
2477
|
+
{
|
2478
|
+
"description": "The amount of space the divider should be indented. Pass valid CSS **margin-inline** values when horizontal and **margin-block** when vertical",
|
2479
|
+
"name": "--skf-divider-inset"
|
2480
|
+
}
|
2481
|
+
],
|
2482
|
+
"members": [
|
2483
|
+
{
|
2484
|
+
"kind": "field",
|
2485
|
+
"name": "#internals",
|
2486
|
+
"privacy": "private",
|
2487
|
+
"type": {
|
2488
|
+
"text": "ElementInternals"
|
2489
|
+
}
|
2490
|
+
},
|
2491
|
+
{
|
2492
|
+
"kind": "field",
|
2493
|
+
"name": "#states",
|
2494
|
+
"privacy": "private",
|
2495
|
+
"type": {
|
2496
|
+
"text": "CustomStateSet"
|
2497
|
+
}
|
2498
|
+
},
|
2499
|
+
{
|
2500
|
+
"kind": "field",
|
2501
|
+
"name": "color",
|
2502
|
+
"type": {
|
2503
|
+
"text": "SkfDividerColor"
|
2504
|
+
},
|
2505
|
+
"default": "'primary'",
|
2506
|
+
"description": "Defines the Divider color",
|
2507
|
+
"attribute": "color",
|
2508
|
+
"expandedType": {
|
2509
|
+
"text": "'primary' | 'inverse' | 'emphasized' | 'secondary' | 'tertiary'"
|
2510
|
+
}
|
2511
|
+
},
|
2512
|
+
{
|
2513
|
+
"kind": "field",
|
2514
|
+
"name": "decorative",
|
2515
|
+
"type": {
|
2516
|
+
"text": "boolean"
|
2517
|
+
},
|
2518
|
+
"default": "false",
|
2519
|
+
"description": "If true, renders a div for presentational purpose instead of the semantic hr-element",
|
2520
|
+
"attribute": "decorative"
|
2521
|
+
},
|
2522
|
+
{
|
2523
|
+
"kind": "field",
|
2524
|
+
"name": "vertical",
|
2525
|
+
"type": {
|
2526
|
+
"text": "boolean"
|
2527
|
+
},
|
2528
|
+
"default": "false",
|
2529
|
+
"description": "If true, renders the divider vertically",
|
2530
|
+
"attribute": "vertical"
|
2531
|
+
}
|
2532
|
+
],
|
2533
|
+
"attributes": [
|
2534
|
+
{
|
2535
|
+
"name": "color",
|
2536
|
+
"type": {
|
2537
|
+
"text": "SkfDividerColor"
|
2538
|
+
},
|
2539
|
+
"default": "'primary'",
|
2540
|
+
"description": "Defines the Divider color",
|
2541
|
+
"fieldName": "color",
|
2542
|
+
"expandedType": {
|
2543
|
+
"text": "'primary' | 'inverse' | 'emphasized' | 'secondary' | 'tertiary'"
|
2544
|
+
}
|
2545
|
+
},
|
2546
|
+
{
|
2547
|
+
"name": "decorative",
|
2548
|
+
"type": {
|
2549
|
+
"text": "boolean"
|
2550
|
+
},
|
2551
|
+
"default": "false",
|
2552
|
+
"description": "If true, renders a div for presentational purpose instead of the semantic hr-element",
|
2553
|
+
"fieldName": "decorative"
|
2554
|
+
},
|
2555
|
+
{
|
2556
|
+
"name": "vertical",
|
2557
|
+
"type": {
|
2558
|
+
"text": "boolean"
|
2559
|
+
},
|
2560
|
+
"default": "false",
|
2561
|
+
"description": "If true, renders the divider vertically",
|
2562
|
+
"fieldName": "vertical"
|
2563
|
+
}
|
2564
|
+
],
|
2565
|
+
"superclass": {
|
2566
|
+
"name": "SkfElement",
|
2567
|
+
"package": "@internal/components/skf-element.js"
|
2568
|
+
},
|
2569
|
+
"tagName": "skf-divider",
|
2570
|
+
"customElement": true,
|
2571
|
+
"modulePath": "src/components/divider/divider.component.ts"
|
2572
|
+
}
|
2573
|
+
],
|
2574
|
+
"exports": [
|
2575
|
+
{
|
2576
|
+
"kind": "js",
|
2577
|
+
"name": "SkfDivider",
|
2578
|
+
"declaration": {
|
2579
|
+
"name": "SkfDivider",
|
2580
|
+
"module": "src/components/divider/divider.component.ts"
|
2581
|
+
}
|
2582
|
+
}
|
2583
|
+
],
|
2584
|
+
"typeDefinitionPath": "components/divider/divider.d.ts"
|
2585
|
+
},
|
2464
2586
|
{
|
2465
2587
|
"kind": "javascript-module",
|
2466
2588
|
"path": "components/heading/heading.js",
|
@@ -2783,128 +2905,6 @@
|
|
2783
2905
|
],
|
2784
2906
|
"typeDefinitionPath": "components/dialog/dialog.d.ts"
|
2785
2907
|
},
|
2786
|
-
{
|
2787
|
-
"kind": "javascript-module",
|
2788
|
-
"path": "components/divider/divider.js",
|
2789
|
-
"declarations": [
|
2790
|
-
{
|
2791
|
-
"kind": "class",
|
2792
|
-
"description": "The `<Divider>` component can separate items from each other, to visually emphasize their lack of a relationship between groups of information",
|
2793
|
-
"name": "SkfDivider",
|
2794
|
-
"cssProperties": [
|
2795
|
-
{
|
2796
|
-
"description": "The amount of space the divider occupies. Pass valid CSS **margin-block** values when horizontal and **margin-inline** when vertical",
|
2797
|
-
"name": "--skf-divider-spacing"
|
2798
|
-
},
|
2799
|
-
{
|
2800
|
-
"description": "The amount of space the divider should be indented. Pass valid CSS **margin-inline** values when horizontal and **margin-block** when vertical",
|
2801
|
-
"name": "--skf-divider-inset"
|
2802
|
-
}
|
2803
|
-
],
|
2804
|
-
"members": [
|
2805
|
-
{
|
2806
|
-
"kind": "field",
|
2807
|
-
"name": "#internals",
|
2808
|
-
"privacy": "private",
|
2809
|
-
"type": {
|
2810
|
-
"text": "ElementInternals"
|
2811
|
-
}
|
2812
|
-
},
|
2813
|
-
{
|
2814
|
-
"kind": "field",
|
2815
|
-
"name": "#states",
|
2816
|
-
"privacy": "private",
|
2817
|
-
"type": {
|
2818
|
-
"text": "CustomStateSet"
|
2819
|
-
}
|
2820
|
-
},
|
2821
|
-
{
|
2822
|
-
"kind": "field",
|
2823
|
-
"name": "color",
|
2824
|
-
"type": {
|
2825
|
-
"text": "SkfDividerColor"
|
2826
|
-
},
|
2827
|
-
"default": "'primary'",
|
2828
|
-
"description": "Defines the Divider color",
|
2829
|
-
"attribute": "color",
|
2830
|
-
"expandedType": {
|
2831
|
-
"text": "'primary' | 'inverse' | 'emphasized' | 'secondary' | 'tertiary'"
|
2832
|
-
}
|
2833
|
-
},
|
2834
|
-
{
|
2835
|
-
"kind": "field",
|
2836
|
-
"name": "decorative",
|
2837
|
-
"type": {
|
2838
|
-
"text": "boolean"
|
2839
|
-
},
|
2840
|
-
"default": "false",
|
2841
|
-
"description": "If true, renders a div for presentational purpose instead of the semantic hr-element",
|
2842
|
-
"attribute": "decorative"
|
2843
|
-
},
|
2844
|
-
{
|
2845
|
-
"kind": "field",
|
2846
|
-
"name": "vertical",
|
2847
|
-
"type": {
|
2848
|
-
"text": "boolean"
|
2849
|
-
},
|
2850
|
-
"default": "false",
|
2851
|
-
"description": "If true, renders the divider vertically",
|
2852
|
-
"attribute": "vertical"
|
2853
|
-
}
|
2854
|
-
],
|
2855
|
-
"attributes": [
|
2856
|
-
{
|
2857
|
-
"name": "color",
|
2858
|
-
"type": {
|
2859
|
-
"text": "SkfDividerColor"
|
2860
|
-
},
|
2861
|
-
"default": "'primary'",
|
2862
|
-
"description": "Defines the Divider color",
|
2863
|
-
"fieldName": "color",
|
2864
|
-
"expandedType": {
|
2865
|
-
"text": "'primary' | 'inverse' | 'emphasized' | 'secondary' | 'tertiary'"
|
2866
|
-
}
|
2867
|
-
},
|
2868
|
-
{
|
2869
|
-
"name": "decorative",
|
2870
|
-
"type": {
|
2871
|
-
"text": "boolean"
|
2872
|
-
},
|
2873
|
-
"default": "false",
|
2874
|
-
"description": "If true, renders a div for presentational purpose instead of the semantic hr-element",
|
2875
|
-
"fieldName": "decorative"
|
2876
|
-
},
|
2877
|
-
{
|
2878
|
-
"name": "vertical",
|
2879
|
-
"type": {
|
2880
|
-
"text": "boolean"
|
2881
|
-
},
|
2882
|
-
"default": "false",
|
2883
|
-
"description": "If true, renders the divider vertically",
|
2884
|
-
"fieldName": "vertical"
|
2885
|
-
}
|
2886
|
-
],
|
2887
|
-
"superclass": {
|
2888
|
-
"name": "SkfElement",
|
2889
|
-
"package": "@internal/components/skf-element.js"
|
2890
|
-
},
|
2891
|
-
"tagName": "skf-divider",
|
2892
|
-
"customElement": true,
|
2893
|
-
"modulePath": "src/components/divider/divider.component.ts"
|
2894
|
-
}
|
2895
|
-
],
|
2896
|
-
"exports": [
|
2897
|
-
{
|
2898
|
-
"kind": "js",
|
2899
|
-
"name": "SkfDivider",
|
2900
|
-
"declaration": {
|
2901
|
-
"name": "SkfDivider",
|
2902
|
-
"module": "src/components/divider/divider.component.ts"
|
2903
|
-
}
|
2904
|
-
}
|
2905
|
-
],
|
2906
|
-
"typeDefinitionPath": "components/divider/divider.d.ts"
|
2907
|
-
},
|
2908
2908
|
{
|
2909
2909
|
"kind": "javascript-module",
|
2910
2910
|
"path": "components/drawer/drawer.js",
|
@@ -4115,6 +4115,13 @@
|
|
4115
4115
|
},
|
4116
4116
|
"description": "Fires when the input is invalid",
|
4117
4117
|
"name": "invalid"
|
4118
|
+
},
|
4119
|
+
{
|
4120
|
+
"type": {
|
4121
|
+
"text": "CustomEvent"
|
4122
|
+
},
|
4123
|
+
"description": "Fires when the input is cleared",
|
4124
|
+
"name": "cleared"
|
4118
4125
|
}
|
4119
4126
|
],
|
4120
4127
|
"attributes": [
|
@@ -5697,12 +5704,12 @@
|
|
5697
5704
|
},
|
5698
5705
|
{
|
5699
5706
|
"kind": "field",
|
5700
|
-
"name": "
|
5707
|
+
"name": "clickCallback",
|
5701
5708
|
"description": "If defined, accepts a function that runs on click"
|
5702
5709
|
},
|
5703
5710
|
{
|
5704
5711
|
"kind": "field",
|
5705
|
-
"name": "
|
5712
|
+
"name": "preRemoveCallback",
|
5706
5713
|
"description": "If defined, accepts a function that runs on click. Self removal can be overridden by using `event.stopPropagation()`."
|
5707
5714
|
},
|
5708
5715
|
{
|
@@ -15,6 +15,7 @@ import { type CSSResultGroup } from 'lit';
|
|
15
15
|
export declare class SkfPopoverBase extends SkfElement {
|
16
16
|
static styles: CSSResultGroup;
|
17
17
|
static classMap: {};
|
18
|
+
_skipClosingThisTick: boolean;
|
18
19
|
/** @internal - The popover element, aka `this` */
|
19
20
|
$popover: this;
|
20
21
|
/** Where the popover is positioned relative to the anchor element if it fits */
|
@@ -35,6 +36,10 @@ export declare class SkfPopoverBase extends SkfElement {
|
|
35
36
|
triggerEvent: 'mouseenter' | 'click';
|
36
37
|
/** @internal - Reference to the arrow element */
|
37
38
|
$arrow: HTMLElement;
|
39
|
+
/**
|
40
|
+
* Used to store the outside click listener reference for cleanup and to avoid duplicates
|
41
|
+
*/
|
42
|
+
_skfPopoverOutsideClickListener?: (e: MouseEvent) => void;
|
38
43
|
protected abortEventsController: AbortController;
|
39
44
|
protected signal: AbortSignal;
|
40
45
|
protected popoverController: PopoverController;
|
@@ -48,11 +53,7 @@ export declare class SkfPopoverBase extends SkfElement {
|
|
48
53
|
reposition: () => Promise<void>;
|
49
54
|
handleEscapeKey: (e: KeyboardEvent) => void;
|
50
55
|
open: (e: Event) => void;
|
51
|
-
|
52
|
-
openExtended(): void;
|
53
|
-
close: () => void;
|
54
|
-
/** @internal add additional close tasks here in UI component */
|
55
|
-
closeExtended(): void;
|
56
|
+
close: (reason?: string) => void;
|
56
57
|
/** @internal eventlisteners here should implement abort signal */
|
57
58
|
addEventListeners($element: HTMLElement | Element): void;
|
58
59
|
/** @internal */
|
@@ -1,25 +1,25 @@
|
|
1
|
-
import { flip as
|
1
|
+
import { flip as y, offset as $, arrow as E, computePosition as O } from "@floating-ui/dom";
|
2
2
|
import { SkfElement as C } from "../../components/skf-element.js";
|
3
|
-
import { PopoverController as
|
4
|
-
import { uuid as
|
3
|
+
import { PopoverController as T } from "../../controllers/popover.controller.js";
|
4
|
+
import { uuid as k } from "../../helpers/uuid.js";
|
5
5
|
import { watch as f } from "../../helpers/watch.js";
|
6
|
-
import { componentStyles as
|
7
|
-
import { nothing as
|
8
|
-
import { property as u, state as c, query as
|
9
|
-
import { classMap as
|
10
|
-
import { styles as
|
11
|
-
var
|
12
|
-
for (var e =
|
13
|
-
(a =
|
14
|
-
return
|
15
|
-
},
|
16
|
-
const
|
6
|
+
import { componentStyles as P } from "../../../styles/component.styles.js";
|
7
|
+
import { nothing as _, html as m } from "lit";
|
8
|
+
import { property as u, state as c, query as A } from "lit/decorators.js";
|
9
|
+
import { classMap as S } from "lit/directives/class-map.js";
|
10
|
+
import { styles as L } from "./popover.styles.js";
|
11
|
+
var x = Object.defineProperty, F = Object.getOwnPropertyDescriptor, r = (g, t, s, o) => {
|
12
|
+
for (var e = o > 1 ? void 0 : o ? F(t, s) : t, n = g.length - 1, a; n >= 0; n--)
|
13
|
+
(a = g[n]) && (e = (o ? a(t, s, e) : a(e)) || e);
|
14
|
+
return o && e && x(t, s, e), e;
|
15
|
+
}, h;
|
16
|
+
const i = (h = class extends C {
|
17
17
|
constructor() {
|
18
|
-
super(...arguments), this.$popover = this, this.placement = "top", this.variant = "popup", this.isOpen = !1, this.offset = 0, this.arrow = !1, this.triggerEvent = "mouseenter", this.abortEventsController = new AbortController(), this.signal = this.abortEventsController.signal, this.popoverController = new
|
18
|
+
super(...arguments), this._skipClosingThisTick = !1, this.$popover = this, this.placement = "top", this.variant = "popup", this.isOpen = !1, this.offset = 0, this.arrow = !1, this.triggerEvent = "mouseenter", this.abortEventsController = new AbortController(), this.signal = this.abortEventsController.signal, this.popoverController = new T(this), this._toggleOpen = (t) => {
|
19
19
|
this.isOpen = t ?? !this.isOpen;
|
20
20
|
}, this._handleToggle = (t) => {
|
21
|
-
const
|
22
|
-
this.isOpen =
|
21
|
+
const s = t.newState === "open";
|
22
|
+
this.isOpen = s, this.emit(s ? "skf-opened" : "skf-closed");
|
23
23
|
}, this.handleToggleOpen = async () => {
|
24
24
|
this.$anchor && (this.isOpen ? (this.$popover.togglePopover(!0), this.$popover.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 250, fill: "forwards" })) : (await this.$popover.animate([{ opacity: 0 }], { duration: 150, fill: "forwards" }).finished, this.$popover && this.$popover.togglePopover(this.isOpen)));
|
25
25
|
}, this.handleAnchorChange = async () => {
|
@@ -29,18 +29,18 @@ const s = (p = class extends C {
|
|
29
29
|
this.$anchor = t.getElementById(this.anchor), this.$anchor && (this.addEventListeners(this.$anchor), this.popoverController.start());
|
30
30
|
}, this.reposition = async () => {
|
31
31
|
if (!this.$anchor) return;
|
32
|
-
const t = [
|
32
|
+
const t = [y(), $(this.offset)];
|
33
33
|
this.arrow && t.push(E({ element: this.$arrow }));
|
34
|
-
const { x:
|
34
|
+
const { x: s, y: o, middlewareData: e } = await O(this.$anchor, this.$popover, {
|
35
35
|
placement: this.placement,
|
36
36
|
middleware: t,
|
37
37
|
strategy: "fixed"
|
38
38
|
});
|
39
39
|
if (Object.assign(this.$popover.style, {
|
40
|
-
left: `${String(
|
41
|
-
top: `${String(
|
40
|
+
left: `${String(s)}px`,
|
41
|
+
top: `${String(o)}px`
|
42
42
|
}), this.arrow) {
|
43
|
-
const n = this.placement.split("-")[0], a = { top: "bottom", right: "left", bottom: "top", left: "right" }[n] ?? "",
|
43
|
+
const n = this.placement.split("-")[0], a = { top: "bottom", right: "left", bottom: "top", left: "right" }[n] ?? "", p = e.flip?.index, d = e.arrow?.x, l = e.arrow?.y, v = typeof d == "number" ? `${String(d)}px` : "", b = typeof l == "number" ? `${String(l)}px` : "", w = {
|
44
44
|
bottom: 45,
|
45
45
|
right: 135,
|
46
46
|
top: 225,
|
@@ -49,16 +49,18 @@ const s = (p = class extends C {
|
|
49
49
|
Object.assign(this.$arrow.style, {
|
50
50
|
top: b,
|
51
51
|
[this.placement.includes("left") ? "right" : "left"]: v,
|
52
|
-
[
|
53
|
-
rotate: `${(
|
52
|
+
[p ? n : a]: "calc(var(--_skf-popover-arrow-size) * -1)",
|
53
|
+
rotate: `${(w[a] + (p ? 180 : 0)).toString()}deg`
|
54
54
|
});
|
55
55
|
}
|
56
56
|
}, this.handleEscapeKey = (t) => {
|
57
57
|
t.key === "Escape" && this.close();
|
58
58
|
}, this.open = (t) => {
|
59
|
-
t.stopPropagation()
|
60
|
-
|
61
|
-
this.
|
59
|
+
t.stopPropagation();
|
60
|
+
const o = this.tagName === "SKF-MENU" ? void 0 : !0;
|
61
|
+
this._toggleOpen(o), this.abortEventsController = new AbortController(), this.signal = this.abortEventsController.signal, document.addEventListener("keydown", this.handleEscapeKey, { signal: this.signal }), this.tagName === "SKF-TOOLTIP" && this.$anchor?.setAttribute("aria-describedby", this.id);
|
62
|
+
}, this.close = (t = "") => {
|
63
|
+
console.log("Popover closing", t), this._toggleOpen(!1), this.abortEventsController.abort(), this.tagName === "SKF-TOOLTIP" && this.$anchor?.removeAttribute("aria-describedby");
|
62
64
|
};
|
63
65
|
}
|
64
66
|
connectedCallback() {
|
@@ -75,24 +77,28 @@ const s = (p = class extends C {
|
|
75
77
|
this.$anchor.addEventListener(
|
76
78
|
"focusout",
|
77
79
|
(o) => {
|
78
|
-
const
|
79
|
-
t &&
|
80
|
+
const e = this.contains(o.relatedTarget);
|
81
|
+
t && e || this._skipClosingThisTick || this.close("anchor focus out");
|
80
82
|
},
|
81
83
|
{ signal: this.signal }
|
82
84
|
), this.addEventListener(
|
83
85
|
"focusout",
|
84
86
|
(o) => {
|
85
|
-
const
|
86
|
-
t &&
|
87
|
+
const e = this.contains(o.relatedTarget);
|
88
|
+
t && e || this.close("popover focusout");
|
87
89
|
},
|
88
90
|
{ signal: this.signal }
|
89
|
-
), this
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
91
|
+
), this._skfPopoverOutsideClickListener ??= (o) => {
|
92
|
+
this.isOpen && this.$anchor && !this.contains(o.target) && !this.$anchor.contains(o.target) ? this.close("outside click") : (this._skipClosingThisTick = !0, setTimeout(() => {
|
93
|
+
this._skipClosingThisTick = !1;
|
94
|
+
}, 0));
|
95
|
+
}, document.addEventListener("mousedown", this._skfPopoverOutsideClickListener, {
|
96
|
+
signal: this.signal
|
97
|
+
});
|
98
|
+
const s = window.top && window.self !== window.top;
|
99
|
+
console.log("contains frames", s), s && window.top && !this._skipClosingThisTick && window.top.addEventListener("mousedown", this._skfPopoverOutsideClickListener, {
|
100
|
+
signal: this.signal
|
101
|
+
}), this.$popover.id = await k(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, { signal: this.signal });
|
96
102
|
}
|
97
103
|
/** @internal eventlisteners here should implement abort signal */
|
98
104
|
addEventListeners(t) {
|
@@ -103,10 +109,10 @@ const s = (p = class extends C {
|
|
103
109
|
this.abortEventsController.abort();
|
104
110
|
}
|
105
111
|
render() {
|
106
|
-
return ["popup", "menu"].includes(this.variant) && this.$anchor?.setAttribute("aria-expanded", this.isOpen ? "true" : "false"),
|
107
|
-
<div class=${
|
112
|
+
return ["popup", "menu"].includes(this.variant) && this.$anchor?.setAttribute("aria-expanded", this.isOpen ? "true" : "false"), m`
|
113
|
+
<div class=${S({ popover: !0, ...h.classMap })} id="root">
|
108
114
|
<slot></slot>
|
109
|
-
${this.arrow ?
|
115
|
+
${this.arrow ? m`<div id="arrow"></div>` : _}
|
110
116
|
</div>
|
111
117
|
`;
|
112
118
|
}
|
@@ -121,54 +127,54 @@ const s = (p = class extends C {
|
|
121
127
|
'[tabindex]:not([tabindex="-1"])'
|
122
128
|
]).length > 0;
|
123
129
|
function e(n, a) {
|
124
|
-
const
|
130
|
+
const p = Array.from(
|
125
131
|
n.querySelectorAll(a.join(", "))
|
126
132
|
), d = Array.from(n.querySelectorAll("*")).map((l) => l.shadowRoot).filter((l) => l !== null);
|
127
133
|
for (const l of d)
|
128
|
-
|
134
|
+
p.push(
|
129
135
|
...e(l, a)
|
130
136
|
);
|
131
|
-
return
|
137
|
+
return p;
|
132
138
|
}
|
133
139
|
}
|
134
|
-
},
|
140
|
+
}, h.styles = [P, L], h.classMap = {}, h);
|
135
141
|
r([
|
136
142
|
u()
|
137
|
-
],
|
143
|
+
], i.prototype, "placement", 2);
|
138
144
|
r([
|
139
145
|
u()
|
140
|
-
],
|
146
|
+
], i.prototype, "variant", 2);
|
141
147
|
r([
|
142
148
|
u()
|
143
|
-
],
|
149
|
+
], i.prototype, "anchor", 2);
|
144
150
|
r([
|
145
151
|
c()
|
146
|
-
],
|
152
|
+
], i.prototype, "isOpen", 2);
|
147
153
|
r([
|
148
154
|
c()
|
149
|
-
],
|
155
|
+
], i.prototype, "offset", 2);
|
150
156
|
r([
|
151
157
|
c()
|
152
|
-
],
|
158
|
+
], i.prototype, "$anchor", 2);
|
153
159
|
r([
|
154
160
|
c()
|
155
|
-
],
|
161
|
+
], i.prototype, "arrow", 2);
|
156
162
|
r([
|
157
163
|
c()
|
158
|
-
],
|
164
|
+
], i.prototype, "triggerEvent", 2);
|
159
165
|
r([
|
160
|
-
|
161
|
-
],
|
166
|
+
A("#arrow")
|
167
|
+
], i.prototype, "$arrow", 2);
|
162
168
|
r([
|
163
169
|
f("isOpen", { afterUpdate: !0 })
|
164
|
-
],
|
170
|
+
], i.prototype, "handleToggleOpen", 2);
|
165
171
|
r([
|
166
172
|
f("$anchor")
|
167
|
-
],
|
173
|
+
], i.prototype, "handleAnchorEl", 1);
|
168
174
|
r([
|
169
175
|
f("anchor")
|
170
|
-
],
|
171
|
-
let
|
176
|
+
], i.prototype, "handleAnchorChange", 2);
|
177
|
+
let z = i;
|
172
178
|
export {
|
173
|
-
|
179
|
+
z as SkfPopoverBase
|
174
180
|
};
|