@proximus/lavender-autocomplete 2.0.0-alpha.205 → 2.0.0-alpha.207
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/index.es.js +10 -36
- package/dist/web-types.json +4 -4
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -457,14 +457,10 @@ var he = class e extends E {
|
|
|
457
457
|
if (e.key === "Backspace") {
|
|
458
458
|
let r = this.$cells[n - 1];
|
|
459
459
|
t.value === "" && r && (e.preventDefault(), r.value = "", r.focus(), this.syncFormValue());
|
|
460
|
-
|
|
461
|
-
}
|
|
462
|
-
if (e.key === "ArrowLeft" && t.selectionStart === 0 && t.selectionEnd === 0) {
|
|
460
|
+
} else if (e.key === "ArrowLeft" && t.selectionStart === 0 && t.selectionEnd === 0) {
|
|
463
461
|
let t = this.$cells[n - 1];
|
|
464
462
|
t && (e.preventDefault(), t.focus(), t.setSelectionRange(t.value.length, t.value.length));
|
|
465
|
-
|
|
466
|
-
}
|
|
467
|
-
if (e.key === "ArrowRight" && t.selectionStart === t.value.length && t.selectionEnd === t.value.length) {
|
|
463
|
+
} else if (e.key === "ArrowRight" && t.selectionStart === t.value.length && t.selectionEnd === t.value.length) {
|
|
468
464
|
let t = this.$cells[n + 1];
|
|
469
465
|
t && (e.preventDefault(), t.focus(), t.setSelectionRange(0, 0));
|
|
470
466
|
}
|
|
@@ -496,11 +492,8 @@ var he = class e extends E {
|
|
|
496
492
|
}
|
|
497
493
|
attributeChangedCallback(t, n, r) {
|
|
498
494
|
if (n !== r) {
|
|
499
|
-
if (e.forwardedAttributes.includes(t))
|
|
500
|
-
|
|
501
|
-
return;
|
|
502
|
-
}
|
|
503
|
-
switch (t) {
|
|
495
|
+
if (e.forwardedAttributes.includes(t)) this.syncCellAttributes();
|
|
496
|
+
else switch (t) {
|
|
504
497
|
case "size":
|
|
505
498
|
case "readonly":
|
|
506
499
|
case "disabled":
|
|
@@ -552,7 +545,7 @@ var he = class e extends E {
|
|
|
552
545
|
return t.className = "code-input-single", t.size = e, t.maxLength = e, t.readOnly = this.hasAttribute("readonly"), t.disabled = this.hasAttribute("disabled"), t;
|
|
553
546
|
}
|
|
554
547
|
restoreLabelAssociation() {
|
|
555
|
-
|
|
548
|
+
this.isConnected && this.$el && (this.setupForId(), this.setupAriaDescribedBy(this.$slotHelper, this.$helperSlot, "helper"), this.setupAriaDescribedBy(this.$slotStatusText, this.$statusTextSlot, "status-text"), this.syncGroupAria());
|
|
556
549
|
}
|
|
557
550
|
syncGroupAria() {
|
|
558
551
|
let e = this.$container;
|
|
@@ -847,13 +840,7 @@ var P = class e extends n {
|
|
|
847
840
|
this.role = "img";
|
|
848
841
|
let e = document.querySelectorAll("px-icon-set");
|
|
849
842
|
e || console.log("<px-icon-set> component not found");
|
|
850
|
-
for (let t of e) {
|
|
851
|
-
if (!t.getAttribute("name") || !t.getAttribute("src")) {
|
|
852
|
-
console.error("Icon name or src not found");
|
|
853
|
-
continue;
|
|
854
|
-
}
|
|
855
|
-
t.getAttribute("name") === this.from && t.getAttribute("type") !== "font" && (this.#e = t.getAttribute("src"), this.$el.firstElementChild?.setAttribute("href", `${this.#e}#icon-${this.name}`));
|
|
856
|
-
}
|
|
843
|
+
for (let t of e) !t.getAttribute("name") || !t.getAttribute("src") ? console.error("Icon name or src not found") : t.getAttribute("name") === this.from && t.getAttribute("type") !== "font" && (this.#e = t.getAttribute("src"), this.$el.firstElementChild?.setAttribute("href", `${this.#e}#icon-${this.name}`));
|
|
857
844
|
!this.ariaLabel && this.#t && (this.#t.ariaHidden = "true", this.ariaHidden = "true"), this.parentElement?.localName === "px-a" && this.slot !== "before" && this.slot !== "after" && (this.color || this.setAttribute("color", "inherit"));
|
|
858
845
|
}
|
|
859
846
|
updateAttribute(e, t, n, r) {
|
|
@@ -1665,11 +1652,7 @@ var ye = [
|
|
|
1665
1652
|
}
|
|
1666
1653
|
}
|
|
1667
1654
|
updateOverflowX(e, t, n, r) {
|
|
1668
|
-
|
|
1669
|
-
m(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`);
|
|
1670
|
-
return;
|
|
1671
|
-
}
|
|
1672
|
-
this.overflowXAttributeDelegate.attributeChangedCallback(e, t, n);
|
|
1655
|
+
l(r, n) ? this.overflowXAttributeDelegate.attributeChangedCallback(e, t, n) : m(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`);
|
|
1673
1656
|
}
|
|
1674
1657
|
updateFlexProperties(e, n, r, i) {
|
|
1675
1658
|
r !== null && !this.checkName(i, r) && m(`"${r}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${i.join("\", \"")}".`);
|
|
@@ -1682,11 +1665,8 @@ var ye = [
|
|
|
1682
1665
|
}
|
|
1683
1666
|
updateStyle(e, t, n, r) {
|
|
1684
1667
|
let i = `--flex-${e}--${t}-value`, a = e === "gap";
|
|
1685
|
-
if (!n) {
|
|
1686
|
-
|
|
1687
|
-
return;
|
|
1688
|
-
}
|
|
1689
|
-
if (a && r && r.includes(n)) {
|
|
1668
|
+
if (!n) this.$el.style.removeProperty(i), a && this.style.removeProperty(`--host-gap--${t}`);
|
|
1669
|
+
else if (a && r && r.includes(n)) {
|
|
1690
1670
|
let e = `var(--px-spacing-${n}-${t === "laptop" ? "desktop" : t})`;
|
|
1691
1671
|
this.$el.style.setProperty(i, e), this.style.setProperty(`--host-gap--${t}`, e);
|
|
1692
1672
|
} else this.$el.style.setProperty(i, n);
|
|
@@ -2267,13 +2247,7 @@ var $ = class e extends HTMLElement {
|
|
|
2267
2247
|
return ["selected", "type"];
|
|
2268
2248
|
}
|
|
2269
2249
|
attributeChangedCallback(e, t, n) {
|
|
2270
|
-
|
|
2271
|
-
if (e === "selected") {
|
|
2272
|
-
this.$button.setAttribute("aria-selected", String(n !== null));
|
|
2273
|
-
return;
|
|
2274
|
-
}
|
|
2275
|
-
n === null ? this.$button.removeAttribute(e) : this.$button.setAttribute(e, n);
|
|
2276
|
-
}
|
|
2250
|
+
t !== n && (e === "selected" ? this.$button.setAttribute("aria-selected", String(n !== null)) : n === null ? this.$button.removeAttribute(e) : this.$button.setAttribute(e, n));
|
|
2277
2251
|
}
|
|
2278
2252
|
connectedCallback() {
|
|
2279
2253
|
this.#e(), this.$button.setAttribute("aria-selected", String(this.hasAttribute("selected"))), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "-1");
|
package/dist/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@proximus/lavender-autocomplete",
|
|
4
|
-
"version": "2.0.0-alpha.
|
|
4
|
+
"version": "2.0.0-alpha.207",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "px-autocomplete",
|
|
11
|
-
"description": "\n---\n",
|
|
11
|
+
"description": "\n\n---\n",
|
|
12
12
|
"doc-url": "",
|
|
13
13
|
"attributes": [
|
|
14
14
|
{
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"name": "px-autocomplete-header",
|
|
43
|
-
"description": "\n---\n",
|
|
43
|
+
"description": "\n\n---\n",
|
|
44
44
|
"doc-url": "",
|
|
45
45
|
"attributes": [],
|
|
46
46
|
"events": [],
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
"name": "px-autocomplete-option",
|
|
58
|
-
"description": "\n---\n",
|
|
58
|
+
"description": "\n\n---\n",
|
|
59
59
|
"doc-url": "",
|
|
60
60
|
"attributes": [
|
|
61
61
|
{
|