@skf-design-system/ui-components 1.0.2-beta.11 → 1.0.2-beta.13

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.
@@ -1,38 +1,38 @@
1
- var _ = (o) => {
2
- throw TypeError(o);
1
+ var _ = (l) => {
2
+ throw TypeError(l);
3
3
  };
4
- var v = (o, a, t) => a.has(o) || _("Cannot " + t);
5
- var c = (o, a, t) => (v(o, a, "read from private field"), t ? t.call(o) : a.get(o)), g = (o, a, t) => a.has(o) ? _("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(o) : a.set(o, t), b = (o, a, t, e) => (v(o, a, "write to private field"), e ? e.call(o, t) : a.set(o, t), t);
4
+ var v = (l, r, t) => r.has(l) || _("Cannot " + t);
5
+ var u = (l, r, t) => (v(l, r, "read from private field"), t ? t.call(l) : r.get(l)), g = (l, r, t) => r.has(l) ? _("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(l) : r.set(l, t), b = (l, r, t, e) => (v(l, r, "write to private field"), e ? e.call(l, t) : r.set(l, t), t);
6
6
  import { SkfSelectOptionGroup as w } from "./select-option-group.component.js";
7
7
  import "../tag/tag.js";
8
- import { computePosition as C, flip as x, shift as V, offset as $ } from "@floating-ui/dom";
8
+ import { computePosition as x, flip as C, shift as V, offset as $ } from "@floating-ui/dom";
9
9
  import { FormBase as L } from "../../internal/components/formBase.js";
10
10
  import "../../internal/components/hint/hint.js";
11
11
  import { PopoverController as E } from "../../internal/controllers/popover.controller.js";
12
12
  import { findMatchingTags as k } from "../../internal/helpers/findMatchingTags.js";
13
13
  import { hintSeverity as A } from "../../internal/helpers/hintSeverity.js";
14
- import { raiseError as D } from "../../internal/helpers/raiseError.js";
14
+ import { raiseError as I } from "../../internal/helpers/raiseError.js";
15
15
  import { watch as S } from "../../internal/helpers/watch.js";
16
- import { Asterisk as I } from "../../internal/templates/asterisk.js";
16
+ import { Asterisk as D } from "../../internal/templates/asterisk.js";
17
17
  import { componentStyles as P } from "../../styles/component.styles.js";
18
- import { LocalizeController as T } from "../../utilities/localize.js";
18
+ import { LocalizeController as F } from "../../utilities/localize.js";
19
19
  import { nothing as y, html as p } from "lit";
20
- import { property as r, state as u, query as m, queryAssignedElements as F } from "lit/decorators.js";
21
- import { classMap as U } from "lit/directives/class-map.js";
20
+ import { property as n, state as c, query as m, queryAssignedElements as T } from "lit/decorators.js";
21
+ import { classMap as z } from "lit/directives/class-map.js";
22
22
  import { ifDefined as O } from "lit/directives/if-defined.js";
23
- import { SkfSelectOption as z } from "./select-option.component.js";
24
- import { GlobalClickController as M, KeyboardNavigationController as B, DeveloperFeedbackController as q } from "./select.controllers.js";
25
- import { styles as j } from "./select.styles.js";
26
- var N = Object.defineProperty, R = Object.getOwnPropertyDescriptor, s = (o, a, t, e) => {
27
- for (var l = e > 1 ? void 0 : e ? R(a, t) : a, n = o.length - 1, h; n >= 0; n--)
28
- (h = o[n]) && (l = (e ? h(a, t, l) : h(l)) || l);
29
- return e && l && N(a, t, l), l;
23
+ import { SkfSelectOption as U } from "./select-option.component.js";
24
+ import { GlobalClickController as M, KeyboardNavigationController as B, DeveloperFeedbackController as N } from "./select.controllers.js";
25
+ import { styles as H } from "./select.styles.js";
26
+ var q = Object.defineProperty, R = Object.getOwnPropertyDescriptor, s = (l, r, t, e) => {
27
+ for (var o = e > 1 ? void 0 : e ? R(r, t) : r, a = l.length - 1, h; a >= 0; a--)
28
+ (h = l[a]) && (o = (e ? h(r, t, o) : h(o)) || o);
29
+ return e && o && q(r, t, o), o;
30
30
  }, d;
31
31
  const f = class f extends L {
32
32
  constructor() {
33
33
  super();
34
34
  g(this, d);
35
- b(this, d, new T(this)), this._componentIsConnected = !1, this._defaultButtonLabel = "Select an option", this.selectDelay = 200, this._optionsList = [], this.buttonLabel = this._defaultButtonLabel, this.hideLabel = !1, this.hideTags = !1, this.lang = "en", this.multiple = !1, this.showValid = !1, this.size = "md", this._expanded = !1, this._invalid = !1, this.globalClickController = new M(this), this.keyboardNavController = new B(this), this.developerFeedbackController = new q(this), this.popoverController = new E(this), this._handleOptionSelected = (t) => {
35
+ b(this, d, new F(this)), this._componentIsConnected = !1, this._defaultButtonLabel = "Select an option", this.selectDelay = 200, this._optionsList = [], this.buttonLabel = this._defaultButtonLabel, this.hideLabel = !1, this.hideTags = !1, this.lang = "en", this.multiple = !1, this.showValid = !1, this.size = "md", this._expanded = !1, this._invalid = !1, this.globalClickController = new M(this), this.keyboardNavController = new B(this), this.developerFeedbackController = new N(this), this.popoverController = new E(this), this._handleOptionSelected = (t) => {
36
36
  this._pristine = !1;
37
37
  const e = this._selectedOptions.length > 0;
38
38
  this.setFormValue(e ? this.selectedValues.join(",") : null), this._updateState(t);
@@ -43,9 +43,9 @@ const f = class f extends L {
43
43
  this.$popover.style.setProperty("--select-width", `${String(this.offsetWidth)}px`);
44
44
  }, 50);
45
45
  }, this.reposition = async () => {
46
- const { x: t, y: e } = await C(this.$anchor, this.$popover, {
46
+ const { x: t, y: e } = await x(this.$anchor, this.$popover, {
47
47
  placement: "bottom",
48
- middleware: [x(), V(), $(2)],
48
+ middleware: [C(), V(), $(2)],
49
49
  strategy: "fixed"
50
50
  });
51
51
  Object.assign(this.$popover.style, {
@@ -74,8 +74,8 @@ const f = class f extends L {
74
74
  });
75
75
  }), this._resetSelectedOptions = (t) => {
76
76
  const e = !t;
77
- this._optionsList.forEach((l) => {
78
- (e || l !== t) && l.removeAttribute("selected");
77
+ this._optionsList.forEach((o) => {
78
+ (e || o !== t) && o.removeAttribute("selected");
79
79
  }), this._optionsList = [];
80
80
  }, this._handleSlotChange = () => {
81
81
  this._handleSizeUpdate(), this._collectSlotOptionTags(), this._ifValueIsSetSelectOption(), this._validateInput(), this._componentIsConnected = !0, this.emitEvent("skf-select-connected");
@@ -85,18 +85,18 @@ const f = class f extends L {
85
85
  const t = String(this.value).split(",").map((e) => e.toLowerCase().trim());
86
86
  this._optionsList.forEach((e) => {
87
87
  t.includes(e.value.toLowerCase().trim()) ? (e.setSelectedDiscrete = !0, this.selectedOptions = [...this.selectedOptions, e]) : (e.setSelectedDiscrete = !1, this._selectedOptions = this._selectedOptions.filter(
88
- (l) => l.value.toLowerCase().trim() !== e.value.toLowerCase().trim()
88
+ (o) => o.value.toLowerCase().trim() !== e.value.toLowerCase().trim()
89
89
  ));
90
90
  }), this._setValue().catch((e) => {
91
91
  console.error(e);
92
92
  });
93
93
  } else {
94
- const t = this.value.toLowerCase().trim(), e = this._optionsList.find((l) => l.value.toLowerCase().trim() === t);
95
- e && (e.setSelectedDiscrete = !0, this.selectedOptions = [e], this._setValue().catch((l) => {
96
- console.error(l);
94
+ const t = this.value.toLowerCase().trim(), e = this._optionsList.find((o) => o.value.toLowerCase().trim() === t);
95
+ e && (e.setSelectedDiscrete = !0, this.selectedOptions = [e], this._setValue().catch((o) => {
96
+ console.error(o);
97
97
  }));
98
98
  }
99
- }, this._computeVisibleValue = () => this.buttonLabel !== this._defaultButtonLabel ? this.buttonLabel : (this.$selectedValue?.classList.add("contains-meta-info"), this._selectedOptions.length > 1 ? `(${c(this, d).term("itemsSelected", this._selectedOptions.length)})` : this.value ? (this.$selectedValue?.classList.remove("contains-meta-info"), this._selectedOptions[0].textContent) : (this.$selectedValue?.classList.add("contains-meta-info"), this.buttonLabel)), this._selectedOptions = [];
99
+ }, this._computeVisibleValue = () => this.buttonLabel !== this._defaultButtonLabel ? this.buttonLabel : (this.$selectedValue?.classList.add("contains-meta-info"), this._selectedOptions.length > 1 ? `(${u(this, d).term("itemsSelected", this._selectedOptions.length)})` : this.value ? (this.$selectedValue?.classList.remove("contains-meta-info"), this._selectedOptions[0].textContent) : (this.$selectedValue?.classList.add("contains-meta-info"), this.buttonLabel)), this._selectedOptions = [];
100
100
  }
101
101
  set selectedValues(t) {
102
102
  this._selectedOptions = this._optionsList.filter((e) => t.includes(e.value.trim()));
@@ -114,11 +114,11 @@ const f = class f extends L {
114
114
  }
115
115
  set value(t) {
116
116
  let e = [];
117
- this._componentIsConnected && (this.multiple ? e = String(t).split(",").map((n) => n.toLowerCase().trim()) : e = [String(t).toLowerCase().trim()], this._selectedOptions = this._optionsList.filter(
118
- (n) => e.includes(n.value.toLowerCase().trim())
119
- ), this._optionsList.forEach((n) => {
120
- n.selected && (n.setSelectedDiscrete = !1);
121
- }), this._selectedOptions.forEach((n) => n.setSelectedDiscrete = !0)), this._setValue();
117
+ this._componentIsConnected && (this.multiple ? e = String(t).split(",").map((a) => a.toLowerCase().trim()) : e = [String(t).toLowerCase().trim()], this._selectedOptions = this._optionsList.filter(
118
+ (a) => e.includes(a.value.toLowerCase().trim())
119
+ ), this._optionsList.forEach((a) => {
120
+ a.selected && (a.setSelectedDiscrete = !1);
121
+ }), this._selectedOptions.forEach((a) => a.setSelectedDiscrete = !0)), this._setValue();
122
122
  }
123
123
  get value() {
124
124
  return this._selectedOptions.length ? this._selectedOptions.length === 1 ? this._selectedOptions[0].value.trim() : this._selectedOptions.map((t) => t.value.trim()).join(",") : "";
@@ -152,18 +152,20 @@ const f = class f extends L {
152
152
  }
153
153
  _handleSizeUpdate() {
154
154
  this._slottedItems.forEach((t) => {
155
- (t instanceof z || t instanceof w) && (t.small = this.size === "sm");
155
+ (t instanceof U || t instanceof w) && (t.small = this.size === "sm");
156
156
  });
157
157
  }
158
- handleExpandedChange() {
158
+ _handleExpandedChange() {
159
159
  this._expanded ? (this.$popover.togglePopover(this._expanded), this.popoverController.start()) : (this.$popover.togglePopover(this._expanded), this.popoverController.stop().catch((t) => {
160
160
  console.error(t);
161
- })), this.emit("skf-select-dropdown", { detail: { expanded: this._expanded } });
161
+ })), this.desiredPopupHeight = this._getOptionalDropdownHeight(
162
+ this._slottedItems[0]
163
+ ), this.desiredPopupHeight ? this.$popover.style.height = `${this.desiredPopupHeight.toString()}px` : this.$popover.style.height = "", this.emit("skf-select-dropdown", { detail: { expanded: this._expanded } });
162
164
  }
163
- attributeChangedCallback(t, e, l) {
164
- if (super.attributeChangedCallback(t, e, l), t === "custom-invalid")
165
- if (typeof l == "string") {
166
- const h = this.withFallback(l);
165
+ attributeChangedCallback(t, e, o) {
166
+ if (super.attributeChangedCallback(t, e, o), t === "custom-invalid")
167
+ if (typeof o == "string") {
168
+ const h = this.withFallback(o);
167
169
  this._pristine = !1, this._invalid = !0, this.setValidity({ customError: !0 }, h), this.checkValidity();
168
170
  } else
169
171
  this.setValidity({}), this._validateInput();
@@ -172,14 +174,20 @@ const f = class f extends L {
172
174
  super.disconnectedCallback(), this._internals.form?.removeEventListener("reset", this._handleReset);
173
175
  }
174
176
  /** @internal */
177
+ _getOptionalDropdownHeight(t) {
178
+ if (!this.maxVisibleItems) return;
179
+ const e = this._slottedItems.length;
180
+ return this.maxVisibleItems >= e ? void 0 : t.getBoundingClientRect().height * this.maxVisibleItems;
181
+ }
182
+ /** @internal */
175
183
  _updateState(t) {
176
184
  if (this.multiple)
177
185
  this._selectedOptions = [], this._optionsList.forEach((e) => {
178
186
  e.selected && (this.selectedOptions = [...this.selectedOptions, e]);
179
187
  });
180
188
  else {
181
- const e = this._selectedOptions.length > 0, l = t.detail.value !== null;
182
- e && (this._selectedOptions[0].setSelectedDiscrete = !1, this._selectedOptions = []), l && (this.selectedOptions = [t.target]);
189
+ const e = this._selectedOptions.length > 0, o = t.detail.value !== null;
190
+ e && (this._selectedOptions[0].setSelectedDiscrete = !1, this._selectedOptions = []), o && (this.selectedOptions = [t.target]);
183
191
  }
184
192
  this._setValue();
185
193
  }
@@ -190,7 +198,7 @@ const f = class f extends L {
190
198
  /** @internal */
191
199
  /** Filter out elements other than skf-select-option and store in this._optionsList */
192
200
  _collectSlotOptionTags() {
193
- this._optionsList = k(this, "skf-select-option"), this._selectedOptions = this._optionsList.filter((t) => t.selected), D({
201
+ this._optionsList = k(this, "skf-select-option"), this._selectedOptions = this._optionsList.filter((t) => t.selected), I({
194
202
  assert: this._optionsList.length > 0,
195
203
  reason: "no-children",
196
204
  replaceStrings: [this.localName, "skf-select-option"]
@@ -199,7 +207,7 @@ const f = class f extends L {
199
207
  /** @internal */
200
208
  _validateInput() {
201
209
  this._invalid = !1;
202
- const t = this.required && !this.selectedValues.length || this.min === 1, e = !!(this.min && this.selectedValues.length < this.min), l = !!(this.max && this.selectedValues.length > this.max);
210
+ const t = this.required && !this.selectedValues.length || this.min === 1, e = !!(this.min && this.selectedValues.length < this.min), o = !!(this.max && this.selectedValues.length > this.max);
203
211
  if (this._internals.validity.customError) {
204
212
  this._invalid = !0;
205
213
  return;
@@ -209,7 +217,7 @@ const f = class f extends L {
209
217
  } else if (e) {
210
218
  const h = this.hasAttribute("data-rangeunderflow") ? this.getAttribute("data-rangeunderflow") : `Please select minimum ${String(this.min)} options`;
211
219
  this.setValidity({ rangeUnderflow: !0 }, String(h)), this._pristine || (this._invalid = !0);
212
- } else if (l) {
220
+ } else if (o) {
213
221
  const h = this.hasAttribute("data-rangeoverflow") ? this.getAttribute("data-rangeoverflow") : `Please select maximum ${String(this.max)} options`;
214
222
  this.setValidity({ rangeOverflow: !0 }, String(h)), this._pristine || (this._invalid = !0);
215
223
  } else
@@ -221,7 +229,7 @@ const f = class f extends L {
221
229
  <label>
222
230
  <div class=${this.hideLabel ? "visually-hidden" : ""} id="label">
223
231
  ${this.label}
224
- ${this.required ? I(c(this, d).term("required")) : y}
232
+ ${this.required ? D(u(this, d).term("required")) : y}
225
233
  </div>
226
234
  <button
227
235
  ?disabled=${this.disabled}
@@ -236,7 +244,7 @@ const f = class f extends L {
236
244
  >
237
245
  <span
238
246
  id="selected-value"
239
- class=${U({ "selected-value": !0, "contains-meta-info": !this.value })}>
247
+ class=${z({ "selected-value": !0, "contains-meta-info": !this.value })}>
240
248
  ${this._computeVisibleValue()}
241
249
  </span>
242
250
  <skf-icon class="arrow" data-color="custom" name="chevronDown"></skf-icon>
@@ -277,68 +285,74 @@ const f = class f extends L {
277
285
  `;
278
286
  }
279
287
  };
280
- d = new WeakMap(), f.styles = [P, j];
288
+ d = new WeakMap(), f.styles = [P, H];
281
289
  let i = f;
282
290
  s([
283
- r({ type: String, reflect: !0, attribute: "button-label" })
291
+ n({ type: String, reflect: !0, attribute: "button-label" })
284
292
  ], i.prototype, "buttonLabel", 2);
285
293
  s([
286
- r({ type: String, attribute: "custom-invalid" })
294
+ n({ type: String, attribute: "custom-invalid" })
287
295
  ], i.prototype, "customInvalid", 2);
288
296
  s([
289
- r({ type: Boolean, attribute: "hide-label" })
297
+ n({ type: Boolean, attribute: "hide-label" })
290
298
  ], i.prototype, "hideLabel", 2);
291
299
  s([
292
- r({ type: Boolean, reflect: !0, attribute: "hide-tags" })
300
+ n({ type: Boolean, reflect: !0, attribute: "hide-tags" })
293
301
  ], i.prototype, "hideTags", 2);
294
302
  s([
295
- r({ type: String })
303
+ n({ type: String })
296
304
  ], i.prototype, "hint", 2);
297
305
  s([
298
- r({ type: Array, attribute: !1 })
306
+ n({ type: Array, attribute: !1 })
299
307
  ], i.prototype, "selectedValues", 1);
300
308
  s([
301
- r({ type: Array, attribute: !1 })
309
+ n({ type: Array, attribute: !1 })
302
310
  ], i.prototype, "selectedOptionsText", 1);
303
311
  s([
304
- r({ type: String, reflect: !0 })
312
+ n({ type: String, reflect: !0 })
305
313
  ], i.prototype, "label", 2);
306
314
  s([
307
- r({ type: String })
315
+ n({ type: String })
308
316
  ], i.prototype, "lang", 2);
309
317
  s([
310
- r({ type: Number })
318
+ n({ type: Number })
311
319
  ], i.prototype, "max", 2);
312
320
  s([
313
- r({ type: Number })
321
+ n({ type: Number, attribute: "max-visible-items" })
322
+ ], i.prototype, "maxVisibleItems", 2);
323
+ s([
324
+ n({ type: Number })
314
325
  ], i.prototype, "min", 2);
315
326
  s([
316
- r({ type: Boolean, reflect: !0 })
327
+ n({ type: Boolean, reflect: !0 })
317
328
  ], i.prototype, "multiple", 2);
318
329
  s([
319
- r({ type: String })
330
+ n({ type: String })
320
331
  ], i.prototype, "name", 2);
321
332
  s([
322
- r()
333
+ n()
323
334
  ], i.prototype, "severity", 2);
324
335
  s([
325
- r({ type: Boolean, attribute: "show-valid" })
336
+ n({ type: Boolean, attribute: "show-valid" })
326
337
  ], i.prototype, "showValid", 2);
327
338
  s([
328
- r({ reflect: !0 })
339
+ n({ reflect: !0 })
329
340
  ], i.prototype, "size", 2);
330
341
  s([
331
- r({ type: String, attribute: !1 })
342
+ n({ type: String, attribute: !1 })
332
343
  ], i.prototype, "value", 1);
333
344
  s([
334
- u()
345
+ c()
335
346
  ], i.prototype, "selectedOptions", 1);
336
347
  s([
337
- u()
348
+ c()
338
349
  ], i.prototype, "_expanded", 2);
339
350
  s([
340
- u()
351
+ c()
341
352
  ], i.prototype, "_invalid", 2);
353
+ s([
354
+ c()
355
+ ], i.prototype, "desiredPopupHeight", 2);
342
356
  s([
343
357
  m("#select-button")
344
358
  ], i.prototype, "$anchor", 2);
@@ -349,14 +363,14 @@ s([
349
363
  m("#select-dropdown")
350
364
  ], i.prototype, "$popover", 2);
351
365
  s([
352
- F()
366
+ T()
353
367
  ], i.prototype, "_slottedItems", 2);
354
368
  s([
355
369
  S("size", { waitUntilFirstUpdate: !0 })
356
370
  ], i.prototype, "_handleSizeUpdate", 1);
357
371
  s([
358
372
  S("_expanded", { afterUpdate: !0 })
359
- ], i.prototype, "handleExpandedChange", 1);
373
+ ], i.prototype, "_handleExpandedChange", 1);
360
374
  export {
361
375
  i as SkfSelect
362
376
  };
@@ -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];
@@ -1650,19 +1650,6 @@
1650
1650
  "attribute": "invalid-dates",
1651
1651
  "reflects": true
1652
1652
  },
1653
- {
1654
- "kind": "field",
1655
- "name": "lang",
1656
- "type": {
1657
- "text": "Language"
1658
- },
1659
- "default": "'en'",
1660
- "description": "Sets the internal language of the component",
1661
- "attribute": "lang",
1662
- "expandedType": {
1663
- "text": "'en' | 'es' | 'pt' | 'sv'"
1664
- }
1665
- },
1666
1653
  {
1667
1654
  "kind": "field",
1668
1655
  "name": "locale",
@@ -1810,18 +1797,6 @@
1810
1797
  "description": "A comma-separated list of dates (yyyy-mm-dd format) that are not selectable.",
1811
1798
  "fieldName": "invalidDates"
1812
1799
  },
1813
- {
1814
- "name": "lang",
1815
- "type": {
1816
- "text": "Language"
1817
- },
1818
- "default": "'en'",
1819
- "description": "Sets the internal language of the component",
1820
- "fieldName": "lang",
1821
- "expandedType": {
1822
- "text": "'en' | 'es' | 'pt' | 'sv'"
1823
- }
1824
- },
1825
1800
  {
1826
1801
  "name": "locale",
1827
1802
  "type": {
@@ -3878,6 +3853,15 @@
3878
3853
  "description": "Indicates whether the value of the control can be automatically completed by the browser. See\n[MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/autocomplete) for details.",
3879
3854
  "attribute": "autocomplete"
3880
3855
  },
3856
+ {
3857
+ "kind": "field",
3858
+ "name": "autofocus",
3859
+ "type": {
3860
+ "text": "boolean"
3861
+ },
3862
+ "default": "false",
3863
+ "attribute": "autofocus"
3864
+ },
3881
3865
  {
3882
3866
  "kind": "field",
3883
3867
  "name": "customInvalid",
@@ -4094,6 +4078,27 @@
4094
4078
  "name": "value",
4095
4079
  "description": "The current value of the input field",
4096
4080
  "attribute": "value"
4081
+ },
4082
+ {
4083
+ "kind": "method",
4084
+ "name": "focus",
4085
+ "type": {
4086
+ "text": "focus() => void"
4087
+ }
4088
+ },
4089
+ {
4090
+ "kind": "method",
4091
+ "name": "blur",
4092
+ "type": {
4093
+ "text": "blur() => void"
4094
+ }
4095
+ },
4096
+ {
4097
+ "kind": "method",
4098
+ "name": "select",
4099
+ "type": {
4100
+ "text": "select() => void"
4101
+ }
4097
4102
  }
4098
4103
  ],
4099
4104
  "events": [
@@ -4137,6 +4142,14 @@
4137
4142
  "description": "Indicates whether the value of the control can be automatically completed by the browser. See\n[MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/autocomplete) for details.",
4138
4143
  "fieldName": "autocomplete"
4139
4144
  },
4145
+ {
4146
+ "name": "autofocus",
4147
+ "type": {
4148
+ "text": "boolean"
4149
+ },
4150
+ "default": "false",
4151
+ "fieldName": "autofocus"
4152
+ },
4140
4153
  {
4141
4154
  "name": "custom-invalid",
4142
4155
  "description": "If defined, forces component to invalid state until removed. Its value is used as hint text.",
@@ -5909,6 +5922,14 @@
5909
5922
  "description": "If defined, limits the number of selectable options",
5910
5923
  "attribute": "max"
5911
5924
  },
5925
+ {
5926
+ "kind": "field",
5927
+ "name": "maxVisibleItems",
5928
+ "type": {
5929
+ "text": "number | undefined"
5930
+ },
5931
+ "attribute": "max-visible-items"
5932
+ },
5912
5933
  {
5913
5934
  "kind": "field",
5914
5935
  "name": "min",
@@ -5974,17 +5995,18 @@
5974
5995
  "description": "Returns the selected value. (if multiple: in a comma separated string). If set will default set corresponding option."
5975
5996
  },
5976
5997
  {
5977
- "kind": "method",
5978
- "name": "_handleSizeUpdate",
5998
+ "kind": "field",
5999
+ "name": "desiredPopupHeight",
5979
6000
  "type": {
5980
- "text": "_handleSizeUpdate() => void"
5981
- }
6001
+ "text": "number | undefined"
6002
+ },
6003
+ "privacy": "private"
5982
6004
  },
5983
6005
  {
5984
6006
  "kind": "method",
5985
- "name": "handleExpandedChange",
6007
+ "name": "_handleSizeUpdate",
5986
6008
  "type": {
5987
- "text": "handleExpandedChange() => void"
6009
+ "text": "_handleSizeUpdate() => void"
5988
6010
  }
5989
6011
  },
5990
6012
  {
@@ -6124,6 +6146,13 @@
6124
6146
  "description": "If defined, limits the number of selectable options",
6125
6147
  "fieldName": "max"
6126
6148
  },
6149
+ {
6150
+ "name": "max-visible-items",
6151
+ "type": {
6152
+ "text": "number | undefined"
6153
+ },
6154
+ "fieldName": "maxVisibleItems"
6155
+ },
6127
6156
  {
6128
6157
  "name": "min",
6129
6158
  "type": {
@@ -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
- /** @internal add additional open tasks here in UI component */
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 */