@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.
@@ -15,6 +15,7 @@ import { type CSSResultGroup } from 'lit';
15
15
  *
16
16
  * @event {CustomEvent} change - Fires when the value of the input changes
17
17
  * @event {CustomEvent} invalid - Fires when the input is invalid
18
+ * @event {CustomEvent} cleared - Fires when the input is cleared
18
19
  *
19
20
  * @slot - The Inputs label. Alternatively, you can use the `label` attribute.
20
21
  *
@@ -1,35 +1,35 @@
1
- var y = (a) => {
1
+ var f = (a) => {
2
2
  throw TypeError(a);
3
3
  };
4
- var b = (a, o, t) => o.has(a) || y("Cannot " + t);
5
- var c = (a, o, t) => (b(a, o, "read from private field"), t ? t.call(a) : o.get(a)), _ = (a, o, t) => o.has(a) ? y("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(a) : o.set(a, t), $ = (a, o, t, r) => (b(a, o, "write to private field"), r ? r.call(a, t) : o.set(a, t), t);
4
+ var b = (a, n, t) => n.has(a) || f("Cannot " + t);
5
+ var c = (a, n, t) => (b(a, n, "read from private field"), t ? t.call(a) : n.get(a)), _ = (a, n, t) => n.has(a) ? f("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(a) : n.set(a, t), g = (a, n, t, r) => (b(a, n, "write to private field"), r ? r.call(a, t) : n.set(a, t), t);
6
6
  import "../icon/icon.js";
7
- import { FormBase as g } from "../../internal/components/formBase.js";
7
+ import { FormBase as $ } from "../../internal/components/formBase.js";
8
8
  import "../../internal/components/hint/hint.js";
9
9
  import { hintSeverity as w } from "../../internal/helpers/hintSeverity.js";
10
10
  import { watch as E } from "../../internal/helpers/watch.js";
11
- import { Asterisk as P } from "../../internal/templates/asterisk.js";
12
- import { componentStyles as C } from "../../styles/component.styles.js";
13
- import { LocalizeController as k } from "../../utilities/localize.js";
11
+ import { Asterisk as S } from "../../internal/templates/asterisk.js";
12
+ import { componentStyles as P } from "../../styles/component.styles.js";
13
+ import { LocalizeController as C } from "../../utilities/localize.js";
14
14
  import { html as p, nothing as m } from "lit";
15
- import { state as v, property as s, query as B, queryAssignedNodes as S } from "lit/decorators.js";
15
+ import { state as v, property as s, query as k, queryAssignedNodes as B } from "lit/decorators.js";
16
16
  import { ifDefined as l } from "lit/directives/if-defined.js";
17
17
  import { live as x } from "lit/directives/live.js";
18
18
  import { InputNumberController as A, InputPasswordController as V } from "./input.controllers.js";
19
19
  import I from "./input.styles.js";
20
- var L = Object.defineProperty, D = Object.getOwnPropertyDescriptor, e = (a, o, t, r) => {
21
- for (var n = r > 1 ? void 0 : r ? D(o, t) : o, h = a.length - 1, u; h >= 0; h--)
22
- (u = a[h]) && (n = (r ? u(o, t, n) : u(n)) || n);
23
- return r && n && L(o, t, n), n;
20
+ var L = Object.defineProperty, D = Object.getOwnPropertyDescriptor, e = (a, n, t, r) => {
21
+ for (var o = r > 1 ? void 0 : r ? D(n, t) : n, h = a.length - 1, u; h >= 0; h--)
22
+ (u = a[h]) && (o = (r ? u(n, t, o) : u(o)) || o);
23
+ return r && o && L(n, t, o), o;
24
24
  }, d;
25
- const f = class f extends g {
25
+ const y = class y extends $ {
26
26
  constructor() {
27
27
  super(...arguments);
28
28
  _(this, d);
29
- $(this, d, new k(this)), this._value = "", this.autofocus = !1, this.debug = !1, this.hideLabel = !1, this.inputmode = "text", this.lang = "en", this.readonly = !1, this.showValid = !1, this.size = "md", this.type = "text", this.validateOn = "change", this.invalid = !1, this._buttonDown = !1, this._numberController = new A(this), this._passwordController = new V(this), this._handleInput = () => {
29
+ g(this, d, new C(this)), this._value = "", this.autofocus = !1, this.debug = !1, this.hideLabel = !1, this.inputmode = "text", this.lang = "en", this.readonly = !1, this.showValid = !1, this.size = "md", this.type = "text", this.validateOn = "change", this.invalid = !1, this._buttonDown = !1, this._numberController = new A(this), this._passwordController = new V(this), this._handleInput = () => {
30
30
  this._value = this.$input?.value ?? "", this.validateOn === "input" && (this._pristine = !1, this.validateInput());
31
31
  }, this._resetValue = (t) => {
32
- t.stopPropagation(), this.value = this.getAttribute("value")?.trim() ?? "", this._value = this.value, this._internals.setFormValue(this.value), this.$input?.focus();
32
+ t.stopPropagation(), this.value = this.getAttribute("value")?.trim() ?? "", this._value = this.value, this._internals.setFormValue(this.value), this.$input?.focus(), this.emitEvent("cleared");
33
33
  }, this._handlePressStart = (t) => {
34
34
  this._buttonDown = !0, this.type === "number" && this._numberController.handleActionBtnLongPressStart(t);
35
35
  }, this._handlePressEnd = () => {
@@ -108,10 +108,10 @@ const f = class f extends g {
108
108
  valueChanged() {
109
109
  this._internals.setFormValue(this.value), this.validateInput();
110
110
  }
111
- attributeChangedCallback(t, r, n) {
112
- if (super.attributeChangedCallback(t, r, n), t === "value" && this._internals.setFormValue(n), t === "custom-invalid")
113
- if (typeof n == "string") {
114
- const u = this.withFallback(n);
111
+ attributeChangedCallback(t, r, o) {
112
+ if (super.attributeChangedCallback(t, r, o), t === "value" && this._internals.setFormValue(o), t === "custom-invalid")
113
+ if (typeof o == "string") {
114
+ const u = this.withFallback(o);
115
115
  this._pristine = !1, this._internals.setValidity({ customError: !0 }, u), this.invalid = !0, this.hint = u, this.checkValidity();
116
116
  } else
117
117
  this._internals.setValidity({}), this.validateInput();
@@ -133,13 +133,13 @@ const f = class f extends g {
133
133
  this._internals.setValidity({ customError: this._internals.validity.customError });
134
134
  else {
135
135
  this.invalid = !this._pristine && !r.valid;
136
- let n;
137
- for (n in r) {
138
- const h = `data-${n.toString()}`;
139
- if (r[n] && !this.hasAttribute(h) && this.debug && console.log(
136
+ let o;
137
+ for (o in r) {
138
+ const h = `data-${o.toString()}`;
139
+ if (r[o] && !this.hasAttribute(h) && this.debug && console.log(
140
140
  `Add custom message on ${this.localName} using attribute: ${h.toUpperCase()}="Your custom message"`
141
- ), r[n]) {
142
- this.validationError = n.toString();
141
+ ), r[o]) {
142
+ this.validationError = o.toString();
143
143
  const u = this.hasAttribute(h) ? this.getAttribute(h) : this.$input.validationMessage;
144
144
  this._internals.setValidity(
145
145
  { [this.validationError]: !0, customError: this._internals.validity.customError },
@@ -156,7 +156,7 @@ const f = class f extends g {
156
156
  <label>
157
157
  <div class=${this.hideLabel ? "visually-hidden" : ""} ?hidden=${t} id="label">
158
158
  <slot>${this.label}</slot>
159
- ${this.required ? P(c(this, d).term("required")) : m}
159
+ ${this.required ? S(c(this, d).term("required")) : m}
160
160
  </div>
161
161
  <div id="input">
162
162
  ${this.type === "search" ? p`<skf-icon class="skf-icon-host" name="search" size="sm"></skf-icon>` : m}
@@ -212,8 +212,8 @@ const f = class f extends g {
212
212
  `;
213
213
  }
214
214
  };
215
- d = new WeakMap(), f.styles = [C, I];
216
- let i = f;
215
+ d = new WeakMap(), y.styles = [P, I];
216
+ let i = y;
217
217
  e([
218
218
  v()
219
219
  ], i.prototype, "_value", 2);
@@ -233,64 +233,64 @@ e([
233
233
  s({ type: Boolean, attribute: "hide-label" })
234
234
  ], i.prototype, "hideLabel", 2);
235
235
  e([
236
- s()
236
+ s({ type: String })
237
237
  ], i.prototype, "hint", 2);
238
238
  e([
239
- s()
239
+ s({ type: String })
240
240
  ], i.prototype, "inputmode", 2);
241
241
  e([
242
- s()
242
+ s({ type: String })
243
243
  ], i.prototype, "label", 2);
244
244
  e([
245
245
  s({ type: String })
246
246
  ], i.prototype, "lang", 2);
247
247
  e([
248
- s()
248
+ s({ type: String })
249
249
  ], i.prototype, "leading", 2);
250
250
  e([
251
- s()
251
+ s({ type: String })
252
252
  ], i.prototype, "max", 2);
253
253
  e([
254
254
  s({ type: Number, attribute: "maxlength" })
255
255
  ], i.prototype, "maxLength", 2);
256
256
  e([
257
- s()
257
+ s({ type: String })
258
258
  ], i.prototype, "min", 2);
259
259
  e([
260
260
  s({ type: Number, attribute: "minlength" })
261
261
  ], i.prototype, "minLength", 2);
262
262
  e([
263
- s({ reflect: !0 })
263
+ s({ type: String, reflect: !0 })
264
264
  ], i.prototype, "name", 2);
265
265
  e([
266
- s()
266
+ s({ type: String })
267
267
  ], i.prototype, "pattern", 2);
268
268
  e([
269
- s()
269
+ s({ type: String })
270
270
  ], i.prototype, "placeholder", 2);
271
271
  e([
272
272
  s({ type: Boolean })
273
273
  ], i.prototype, "readonly", 2);
274
274
  e([
275
- s({ reflect: !0 })
275
+ s({ type: String, reflect: !0 })
276
276
  ], i.prototype, "severity", 2);
277
277
  e([
278
278
  s({ type: Boolean, attribute: "show-valid" })
279
279
  ], i.prototype, "showValid", 2);
280
280
  e([
281
- s({ reflect: !0 })
281
+ s({ type: String, reflect: !0 })
282
282
  ], i.prototype, "size", 2);
283
283
  e([
284
- s()
284
+ s({ type: String })
285
285
  ], i.prototype, "trailing", 2);
286
286
  e([
287
- s()
287
+ s({ type: String })
288
288
  ], i.prototype, "type", 2);
289
289
  e([
290
- s({ attribute: "validate-on" })
290
+ s({ type: String, attribute: "validate-on" })
291
291
  ], i.prototype, "validateOn", 2);
292
292
  e([
293
- s({})
293
+ s({ type: String })
294
294
  ], i.prototype, "value", 1);
295
295
  e([
296
296
  v()
@@ -299,10 +299,10 @@ e([
299
299
  v()
300
300
  ], i.prototype, "_buttonDown", 2);
301
301
  e([
302
- B("input")
302
+ k("input")
303
303
  ], i.prototype, "$input", 2);
304
304
  e([
305
- S({ flatten: !0 })
305
+ B({ flatten: !0 })
306
306
  ], i.prototype, "_defaultSlot", 2);
307
307
  e([
308
308
  E("value", { waitUntilFirstUpdate: !0, afterUpdate: !0 })
@@ -31,9 +31,5 @@ export declare class SkfPopover extends SkfPopoverBase {
31
31
  /** @internal */
32
32
  hideArrowChanged(): void;
33
33
  /** @internal */
34
- openExtended(): void;
35
- /** @internal */
36
34
  addEventListeners($element: HTMLElement | Element): void;
37
- /** @internal */
38
- _checkClickOutside: (e: Event) => void;
39
35
  }
@@ -1,43 +1,35 @@
1
1
  import { SkfPopoverBase as h } from "../../internal/base-classes/popover/popover.base.js";
2
- import { watch as l } from "../../internal/helpers/watch.js";
3
- import { property as c } from "lit/decorators.js";
2
+ import { watch as d } from "../../internal/helpers/watch.js";
3
+ import { property as f } from "lit/decorators.js";
4
4
  import { styles as w } from "./popover.styles.js";
5
- var f = Object.defineProperty, v = Object.getOwnPropertyDescriptor, n = (d, t, i, s) => {
6
- for (var e = s > 1 ? void 0 : s ? v(t, i) : t, o = d.length - 1, p; o >= 0; o--)
7
- (p = d[o]) && (e = (s ? p(t, i, e) : p(e)) || e);
8
- return s && e && f(t, i, e), e;
5
+ var c = Object.defineProperty, m = Object.getOwnPropertyDescriptor, a = (l, r, o, s) => {
6
+ for (var t = s > 1 ? void 0 : s ? m(r, o) : r, i = l.length - 1, p; i >= 0; i--)
7
+ (p = l[i]) && (t = (s ? p(r, o, t) : p(t)) || t);
8
+ return s && t && c(r, o, t), t;
9
9
  };
10
- const a = class a extends h {
10
+ const n = class n extends h {
11
11
  constructor() {
12
- super(), this.offset = 8, this.hideArrow = !1, this._checkClickOutside = (t) => {
13
- this.isOpen && !this.contains(t.target) && this.close();
14
- }, this.arrow = !this.hideArrow, this.placement = "bottom-start", this.triggerEvent = "click", this.variant = "popup", h.classMap = { popover: !0 };
12
+ super(), this.offset = 8, this.hideArrow = !1, this.arrow = !this.hideArrow, this.placement = "bottom-start", this.triggerEvent = "click", this.variant = "popup", h.classMap = { popover: !0 };
15
13
  }
16
14
  hideArrowChanged() {
17
15
  this.arrow = !this.hideArrow;
18
16
  }
19
17
  /** @internal */
20
- openExtended() {
21
- window.top && window.self !== window.top && window.top.addEventListener("click", this._checkClickOutside, {
22
- signal: this.signal
23
- });
24
- }
25
- /** @internal */
26
- addEventListeners(t) {
27
- t.addEventListener(this.triggerEvent, this.open, { signal: this.signal });
18
+ addEventListeners(r) {
19
+ r.addEventListener(this.triggerEvent, this.open, { signal: this.signal });
28
20
  }
29
21
  };
30
- a.styles = [h.styles, w];
31
- let r = a;
32
- n([
33
- c({ type: Number })
34
- ], r.prototype, "offset", 2);
35
- n([
36
- c({ type: Boolean })
37
- ], r.prototype, "hideArrow", 2);
38
- n([
39
- l("hideArrow")
40
- ], r.prototype, "hideArrowChanged", 1);
22
+ n.styles = [h.styles, w];
23
+ let e = n;
24
+ a([
25
+ f({ type: Number })
26
+ ], e.prototype, "offset", 2);
27
+ a([
28
+ f({ type: Boolean })
29
+ ], e.prototype, "hideArrow", 2);
30
+ a([
31
+ d("hideArrow")
32
+ ], e.prototype, "hideArrowChanged", 1);
41
33
  export {
42
- r as SkfPopover
34
+ e as SkfPopover
43
35
  };
@@ -17,9 +17,9 @@ export declare class SkfTag extends SkfElement {
17
17
  #private;
18
18
  static styles: CSSResultGroup;
19
19
  /** @internal */
20
- private _onClick?;
20
+ private _clickCallback?;
21
21
  /** @internal */
22
- private _onRemove?;
22
+ private _preRemoveCallback?;
23
23
  /** Specifies Tag size */
24
24
  size: Size;
25
25
  /** If defined, displays leading/provided icon */
@@ -29,11 +29,11 @@ export declare class SkfTag extends SkfElement {
29
29
  /** Sets the internal language of the component */
30
30
  lang: Language;
31
31
  /** If defined, accepts a function that runs on click */
32
- set onClick(onClickFn: ((event: Event) => void) | undefined);
33
- get onClick(): ((event: Event) => void) | undefined;
32
+ set clickCallback(clickCallbackFn: ((event: Event) => void) | undefined);
33
+ get clickCallback(): ((event: Event) => void) | undefined;
34
34
  /** If defined, accepts a function that runs on click. Self removal can be overridden by using `event.stopPropagation()`. */
35
- set onRemove(onRemoveFn: ((event: Event) => void) | undefined);
36
- get onRemove(): ((event: Event) => void) | undefined;
35
+ set preRemoveCallback(preRemoveCallbackFn: ((event: Event) => void) | undefined);
36
+ get preRemoveCallback(): ((event: Event) => void) | undefined;
37
37
  /** If true, adds trailing button to remove tag */
38
38
  removable: boolean;
39
39
  /** @internal */
@@ -1,53 +1,53 @@
1
- var k = (e) => {
2
- throw TypeError(e);
1
+ var v = (t) => {
2
+ throw TypeError(t);
3
3
  };
4
- var C = (e, o, t) => o.has(e) || k("Cannot " + t);
5
- var p = (e, o, t) => (C(e, o, "read from private field"), t ? t.call(e) : o.get(e)), m = (e, o, t) => o.has(e) ? k("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(e) : o.set(e, t), d = (e, o, t, s) => (C(e, o, "write to private field"), s ? s.call(e, t) : o.set(e, t), t);
4
+ var u = (t, o, e) => o.has(t) || v("Cannot " + e);
5
+ var h = (t, o, e) => (u(t, o, "read from private field"), e ? e.call(t) : o.get(t)), m = (t, o, e) => o.has(t) ? v("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(t) : o.set(t, e), k = (t, o, e, s) => (u(t, o, "write to private field"), s ? s.call(t, e) : o.set(t, e), e);
6
6
  import "../icon/icon.js";
7
7
  import { SkfElement as g } from "../../internal/components/skf-element.js";
8
8
  import { stateMap as w } from "../../internal/helpers/stateMap.js";
9
9
  import { watch as $ } from "../../internal/helpers/watch.js";
10
10
  import { componentStyles as R } from "../../styles/component.styles.js";
11
11
  import { LocalizeController as z } from "../../utilities/localize.js";
12
- import { nothing as b, html as u } from "lit";
13
- import { property as l, query as D } from "lit/decorators.js";
12
+ import { nothing as y, html as C } from "lit";
13
+ import { property as a, query as D } from "lit/decorators.js";
14
14
  import { ifDefined as E } from "lit/directives/if-defined.js";
15
15
  import { styles as P } from "./tag.styles.js";
16
- var S = Object.defineProperty, B = Object.getOwnPropertyDescriptor, r = (e, o, t, s) => {
17
- for (var i = s > 1 ? void 0 : s ? B(o, t) : o, f = e.length - 1, v; f >= 0; f--)
18
- (v = e[f]) && (i = (s ? v(o, t, i) : v(i)) || i);
19
- return s && i && S(o, t, i), i;
16
+ var S = Object.defineProperty, B = Object.getOwnPropertyDescriptor, l = (t, o, e, s) => {
17
+ for (var i = s > 1 ? void 0 : s ? B(o, e) : o, b = t.length - 1, d; b >= 0; b--)
18
+ (d = t[b]) && (i = (s ? d(o, e, i) : d(i)) || i);
19
+ return s && i && S(o, e, i), i;
20
20
  };
21
21
  const _ = {
22
22
  size: ["sm", "md"],
23
23
  color: ["error", "info", "success", "warning"]
24
24
  };
25
- var a, c, h;
26
- const y = class y extends g {
25
+ var n, c, p;
26
+ const f = class f extends g {
27
27
  constructor() {
28
28
  super(...arguments);
29
- m(this, a);
29
+ m(this, n);
30
30
  m(this, c);
31
- m(this, h);
32
- d(this, a, new z(this)), d(this, c, this.attachInternals()), d(this, h, p(this, c).states), this.size = "md", this.lang = "en", this.removable = !1, this._handleKeyDown = (t) => {
33
- (t.key === "Enter" || t.key === " ") && this.$removeButton.click();
34
- }, this._handleRemove = (t) => {
35
- this._onRemove && this._onRemove(t);
36
- }, this._handleClick = (t) => {
37
- t.stopPropagation(), t.composedPath()[0].localName === "button" ? this.remove() : this.onClick?.(t);
31
+ m(this, p);
32
+ k(this, n, new z(this)), k(this, c, this.attachInternals()), k(this, p, h(this, c).states), this.size = "md", this.lang = "en", this.removable = !1, this._handleKeyDown = (e) => {
33
+ (e.key === "Enter" || e.key === " ") && this.$removeButton.click();
34
+ }, this._handleRemove = (e) => {
35
+ this._preRemoveCallback && this._preRemoveCallback(e);
36
+ }, this._handleClick = (e) => {
37
+ e.stopPropagation(), e.composedPath()[0].localName === "button" ? this.remove() : this.clickCallback?.(e);
38
38
  };
39
39
  }
40
- set onClick(t) {
41
- t && (this._onClick = t);
40
+ set clickCallback(e) {
41
+ e && (this._clickCallback = e);
42
42
  }
43
- get onClick() {
44
- return this._onClick;
43
+ get clickCallback() {
44
+ return this._clickCallback;
45
45
  }
46
- set onRemove(t) {
47
- t && (this._onRemove = t);
46
+ set preRemoveCallback(e) {
47
+ e && (this._preRemoveCallback = e);
48
48
  }
49
- get onRemove() {
50
- return this._onRemove;
49
+ get preRemoveCallback() {
50
+ return this._preRemoveCallback;
51
51
  }
52
52
  connectedCallback() {
53
53
  super.connectedCallback(), this.addEventListener("click", this._handleClick);
@@ -55,59 +55,59 @@ const y = class y extends g {
55
55
  disconnectedCallback() {
56
56
  super.disconnectedCallback(), this.removeEventListener("click", this._handleClick);
57
57
  }
58
- attributeChangedCallback(t, s, i) {
59
- super.attributeChangedCallback(t, s, i), t === "removable" && i !== null ? this.addEventListener("keydown", this._handleKeyDown) : this.removeEventListener("keydown", this._handleKeyDown);
58
+ attributeChangedCallback(e, s, i) {
59
+ super.attributeChangedCallback(e, s, i), e === "removable" && i !== null ? this.addEventListener("keydown", this._handleKeyDown) : this.removeEventListener("keydown", this._handleKeyDown);
60
60
  }
61
- _handleStateChange(t, s, i) {
62
- w(p(this, h), _[t]).set(i);
61
+ _handleStateChange(e, s, i) {
62
+ w(h(this, p), _[e]).set(i);
63
63
  }
64
64
  render() {
65
- return u`
65
+ return C`
66
66
  <div id="root">
67
- ${this.icon ? u`<skf-icon color=${E(this.color)} name=${this.icon} size="sm"></skf-icon>` : b}
67
+ ${this.icon ? C`<skf-icon color=${E(this.color)} name=${this.icon} size="sm"></skf-icon>` : y}
68
68
  <slot></slot>
69
- ${this.removable ? u`
69
+ ${this.removable ? C`
70
70
  <button
71
71
  @click=${this._handleRemove}
72
- aria-label=${p(this, a).term("close")}
72
+ aria-label=${h(this, n).term("close")}
73
73
  type="button"
74
74
  >
75
75
  <skf-icon name="close" size="xs"></skf-icon>
76
76
  </button>
77
- ` : b}
77
+ ` : y}
78
78
  </div>
79
79
  `;
80
80
  }
81
81
  };
82
- a = new WeakMap(), c = new WeakMap(), h = new WeakMap(), y.styles = [R, P];
83
- let n = y;
84
- r([
85
- l({ type: String })
86
- ], n.prototype, "size", 2);
87
- r([
88
- l({ type: String })
89
- ], n.prototype, "icon", 2);
90
- r([
91
- l({ type: String })
92
- ], n.prototype, "color", 2);
93
- r([
94
- l({ type: String })
95
- ], n.prototype, "lang", 2);
96
- r([
97
- l({ attribute: !1 })
98
- ], n.prototype, "onClick", 1);
99
- r([
100
- l({ attribute: !1 })
101
- ], n.prototype, "onRemove", 1);
102
- r([
103
- l({ type: Boolean })
104
- ], n.prototype, "removable", 2);
105
- r([
82
+ n = new WeakMap(), c = new WeakMap(), p = new WeakMap(), f.styles = [R, P];
83
+ let r = f;
84
+ l([
85
+ a({ type: String })
86
+ ], r.prototype, "size", 2);
87
+ l([
88
+ a({ type: String })
89
+ ], r.prototype, "icon", 2);
90
+ l([
91
+ a({ type: String })
92
+ ], r.prototype, "color", 2);
93
+ l([
94
+ a({ type: String })
95
+ ], r.prototype, "lang", 2);
96
+ l([
97
+ a({ attribute: !1 })
98
+ ], r.prototype, "clickCallback", 1);
99
+ l([
100
+ a({ attribute: !1 })
101
+ ], r.prototype, "preRemoveCallback", 1);
102
+ l([
103
+ a({ type: Boolean })
104
+ ], r.prototype, "removable", 2);
105
+ l([
106
106
  D("button")
107
- ], n.prototype, "$removeButton", 2);
108
- r([
107
+ ], r.prototype, "$removeButton", 2);
108
+ l([
109
109
  $(Object.keys(_))
110
- ], n.prototype, "_handleStateChange", 1);
110
+ ], r.prototype, "_handleStateChange", 1);
111
111
  export {
112
- n as SkfTag
112
+ r as SkfTag
113
113
  };
@@ -41,6 +41,11 @@ const s = r`
41
41
  border-radius: var(--skf-border-radius-sm);
42
42
  outline: var(--skf-border-width-md) solid var(--skf-interactive-border-color-focus);
43
43
  }
44
+
45
+ /* let button be first item in composedPath array */
46
+ & > * {
47
+ pointer-events: none;
48
+ }
44
49
  }
45
50
  }
46
51
 
@@ -23,9 +23,5 @@ export declare class SkfTooltip extends SkfPopoverBase {
23
23
  constructor();
24
24
  connectedCallback(): void;
25
25
  /** @internal */
26
- openExtended(): void;
27
- /** @internal */
28
- closeExtended(): void;
29
- /** @internal */
30
26
  addEventListeners($element: HTMLElement | Element): void;
31
27
  }
@@ -8,16 +8,20 @@ const e = class e extends t {
8
8
  super.connectedCallback(), this.role = "tooltip";
9
9
  }
10
10
  /** @internal */
11
- openExtended() {
12
- this.$anchor?.setAttribute("aria-describedby", this.id);
13
- }
14
- /** @internal */
15
- closeExtended() {
16
- this.$anchor?.removeAttribute("aria-describedby");
17
- }
18
- /** @internal */
19
11
  addEventListeners(s) {
20
- s.addEventListener("blur", this.close, { signal: this.signal }), s.addEventListener("focus", this.open, { signal: this.signal }), s.addEventListener("mouseenter", this.open, { signal: this.signal }), s.addEventListener("mouseleave", this.close, { signal: this.signal });
12
+ s.addEventListener(
13
+ "blur",
14
+ () => {
15
+ this.close("blur");
16
+ },
17
+ { signal: this.signal }
18
+ ), s.addEventListener("focus", this.open, { signal: this.signal }), s.addEventListener("mouseenter", this.open, { signal: this.signal }), s.addEventListener(
19
+ "mouseleave",
20
+ () => {
21
+ this.close("mouseleave");
22
+ },
23
+ { signal: this.signal }
24
+ );
21
25
  }
22
26
  };
23
27
  e.styles = [t.styles, a];