@proximus/lavender 2.0.0-alpha.50 → 2.0.0-alpha.54
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/lavender.cjs.js +1 -1
- package/dist/lavender.es.js +21 -3
- package/dist/lavender.umd.js +1 -1
- package/package.json +1 -1
package/dist/lavender.es.js
CHANGED
|
@@ -1744,11 +1744,18 @@ const accordionBackgroundColorValues = [
|
|
|
1744
1744
|
const _Accordion = class _Accordion extends PxElement {
|
|
1745
1745
|
constructor() {
|
|
1746
1746
|
super(accordionStyles);
|
|
1747
|
+
this.isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
1747
1748
|
this.template = () => `<details>
|
|
1748
|
-
<summary role="button"><slot name="icon"></slot><slot name="title"></slot><slot name="info"></slot><span class="arrow-icon"></span></summary>
|
|
1749
|
+
<summary ${this.isSafari ? "" : 'role="button"'}><slot name="icon"></slot><slot name="title"></slot><slot name="info"></slot><span class="arrow-icon"></span></summary>
|
|
1749
1750
|
<slot name="content"></slot>
|
|
1750
1751
|
</details>`;
|
|
1751
1752
|
this.shadowRoot.innerHTML = this.template();
|
|
1753
|
+
if (this.$details && this.$summary) {
|
|
1754
|
+
this.updateAriaExpanded();
|
|
1755
|
+
this.$details.addEventListener("toggle", () => {
|
|
1756
|
+
this.updateAriaExpanded();
|
|
1757
|
+
});
|
|
1758
|
+
}
|
|
1752
1759
|
}
|
|
1753
1760
|
static get observedAttributes() {
|
|
1754
1761
|
return [
|
|
@@ -1808,6 +1815,18 @@ const _Accordion = class _Accordion extends PxElement {
|
|
|
1808
1815
|
console.error(`${newValue} is not an allowed ${attrName} value`);
|
|
1809
1816
|
}
|
|
1810
1817
|
}
|
|
1818
|
+
updateAriaExpanded() {
|
|
1819
|
+
this.$summary.setAttribute(
|
|
1820
|
+
"aria-expanded",
|
|
1821
|
+
this.$details.hasAttribute("open") ? "true" : "false"
|
|
1822
|
+
);
|
|
1823
|
+
}
|
|
1824
|
+
get $summary() {
|
|
1825
|
+
return this.shadowRoot.querySelector("summary");
|
|
1826
|
+
}
|
|
1827
|
+
get $details() {
|
|
1828
|
+
return this.shadowRoot.querySelector("details");
|
|
1829
|
+
}
|
|
1811
1830
|
get variant() {
|
|
1812
1831
|
return this.getAttribute("variant");
|
|
1813
1832
|
}
|
|
@@ -11648,7 +11667,7 @@ class MDDCloser extends HTMLElement {
|
|
|
11648
11667
|
if (!customElements.get("px-mdd-closer")) {
|
|
11649
11668
|
customElements.define("px-mdd-closer", MDDCloser);
|
|
11650
11669
|
}
|
|
11651
|
-
const styles$m = ":host{--mdd-dialog-offset-top: 0}dialog{border:none;width:100%;margin-inline:0;margin-top:var(--mdd-dialog-offset-top);max-width:100%;max-height:100%;background-color:var(--px-color-background-surface-default)}@keyframes slide-left-fade-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}dialog::backdrop{background-color:#0000}@media screen and (max-width: 767px){dialog{height:100dvh;margin:0;padding:0;animation:slide-left-fade-in .3s ease-in-out}px-container{height:100dvh}px-container>px-vstack>px-button-icon{position:initial;display:none;right:0}px-container>px-vstack>px-mdd-closer{display:none}dialog::backdrop{background-color:var(--px-color-background-surface-default)}}px-container{position:relative}px-container>px-vstack>px-button-icon{position:absolute;top:2em;right:1em}#sections-container{overflow:auto}@media only screen and (min-width: 48em){#sections-container{padding-bottom:0}}#mobile-header{display:none}@media screen and (max-width: 767px){#mobile-header{display:block;padding-bottom:2em}}px-p{display:none}@media screen and (max-width: 767px){px-p{display:block;padding-bottom:2em}}#footer{display:none}@media screen and (max-width: 767px){#footer{display:block;position:absolute;bottom:0;left:0;right:0;padding:var(--px-padding-s-mobile);background-color:var(--px-color-background-container-light-default)}}";
|
|
11670
|
+
const styles$m = ":host{--mdd-dialog-offset-top: 0}dialog{border:none;width:100%;margin-inline:0;margin-top:var(--mdd-dialog-offset-top);max-width:100%;max-height:100%;background-color:var(--px-color-background-surface-default)}@keyframes slide-left-fade-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}dialog::backdrop{background-color:#0000}@media screen and (max-height: 285px){dialog #footer{position:static}dialog::backdrop{background-color:#0006}}@media screen and (max-width: 767px){dialog{height:100dvh;margin:0;padding:0;animation:slide-left-fade-in .3s ease-in-out}px-container{height:100dvh}px-container>px-vstack>px-button-icon{position:initial;display:none;right:0}px-container>px-vstack>px-mdd-closer{display:none}dialog::backdrop{background-color:var(--px-color-background-surface-default)}}px-container{position:relative}px-container>px-vstack>px-button-icon{position:absolute;top:2em;right:1em}#sections-container{overflow:auto}@media only screen and (min-width: 48em){#sections-container{padding-bottom:0}}#mobile-header{display:none}@media screen and (max-width: 767px){#mobile-header{display:block;padding-bottom:2em}}px-p{display:none}@media screen and (max-width: 767px){px-p{display:block;padding-bottom:2em}}#footer{display:none}@media screen and (max-width: 767px){#footer{display:block;position:absolute;bottom:0;left:0;right:0;padding:var(--px-padding-s-mobile);background-color:var(--px-color-background-container-light-default)}}";
|
|
11652
11671
|
const stylesheet$3 = new CSSStyleSheet();
|
|
11653
11672
|
stylesheet$3.replaceSync(styles$m);
|
|
11654
11673
|
class MegaDropDown extends HTMLElement {
|
|
@@ -11776,7 +11795,6 @@ class MegaDropDown extends HTMLElement {
|
|
|
11776
11795
|
__privateGet(this, _MegaDropDown_instances, $footer_get).style.display = "none";
|
|
11777
11796
|
}
|
|
11778
11797
|
__privateSet(this, _mutationObserver, new MutationObserver(() => {
|
|
11779
|
-
console.log("mutation observed");
|
|
11780
11798
|
if (this.$slotMddFooter) {
|
|
11781
11799
|
__privateGet(this, _MegaDropDown_instances, $footer_get).style.display = "block";
|
|
11782
11800
|
}
|