@proximus/lavender-light 1.4.6-beta.2 → 1.4.6
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.
|
@@ -11,7 +11,7 @@ const headingCss = "h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slot
|
|
|
11
11
|
const linkCss = ':host([variant="icon-link"]){display:inline-flex}a,.link,::slotted(a){display:inline;align-items:center;font-family:var(--px-font-family);font-size:var(--px-text-size-link-m-mobile);line-height:var(--px-line-height-ratio-l);font-weight:var(--px-font-weight-body);color:var(--px-color-text-neutral-default)}a:hover,.link:hover{color:var(--px-color-text-state-hover-default)}a:focus-visible,.link:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}a[aria-disabled=true],.link[aria-disabled=true]{cursor:default;pointer-events:none;color:var(--px-color-text-state-disabled-default)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-mobile)}a ::slotted(span[slot="after"]),a ::slotted(span[slot="before"]),.link ::slotted(span[slot="after"]),.link ::slotted(span[slot="before"]){display:inline-block}::slotted(a:hover){color:var(--px-color-text-state-hover-default)}a.no-style{text-decoration:none}a.no-style:hover,a.no-style:focus-visible{color:inherit}a.skip-link{position:absolute;left:-10000px;top:auto;overflow:hidden;background-color:var(--px-color-background-container-default-default);padding:var(--px-padding-xs-mobile)}a.skip-link:focus-visible{left:auto;z-index:999}:host([target="_blank"]) ::slotted(px-icon){vertical-align:middle}.icon-link{color:var(--px-color-icon-brand-default);line-height:1;display:inline-flex}:host([inverted]) a,:host([inverted]) .link,:host([inverted]) ::slotted(a){color:var(--px-color-text-neutral-inverted)}:host([inverted]) a:hover,:host([inverted]) .link:hover{color:var(--px-color-text-state-hover-inverted)}:host([inverted]) a:focus-visible,:host([inverted]) .link:focus-visible{outline-color:var(--px-color-border-focus-outline-inverted)}:host([inverted]) a[aria-disabled=true],:host([inverted]) .link[aria-disabled=true]{color:var(--px-color-text-state-disabled-inverted)}:host([inverted]) ::slotted(a:hover){color:var(--px-color-text-state-hover-inverted)}:host([inverted]) a.skip-link{background-color:var(--px-color-background-container-default-inverted)}:host([inverted]) .icon-link{color:var(--px-color-icon-brand-inverted)}@media only screen and (min-width: 768px){a,.link,::slotted(a){font-size:var(--px-text-size-link-m-tablet)}a:focus-visible,.link:focus-visible{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-tablet)}a.skip-link{padding:var(--px-padding-xs-tablet)}}@media only screen and (min-width: 1025px){a,.link,::slotted(a){font-size:var(--px-text-size-link-m-laptop)}a:focus-visible,.link:focus-visible{outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-laptop)}a.skip-link{padding:var(--px-padding-xs-laptop)}}@media only screen and (min-width: 90.0625em){a,.link,::slotted(a){font-size:var(--px-text-size-link-m-desktop)}a:focus-visible,.link:focus-visible{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-desktop)}a.skip-link{padding:var(--px-padding-xs-desktop)}}';
|
|
12
12
|
const paragraphCss = "p,::slotted(p){font-family:var(--px-font-family);color:var(--px-color-text-neutral-default);font-size:var(--px-text-size-body-m-mobile);font-weight:var(--px-font-weight-body);line-height:var(--px-line-height-ratio-l);margin:0}::slotted(p){margin-bottom:var(--px-spacing-xs-mobile)}.text-align-left{text-align:left}.text-align-center{text-align:center}.text-align-right{text-align:right}:host([inverted]) p,:host([inverted]) ::slotted(p){color:var(--px-color-text-neutral-inverted)}@media only screen and (max-width: 768px){.text-align-left--mobile{text-align:left}.text-align-center--mobile{text-align:center}.text-align-right--mobile{text-align:right}}@media only screen and (min-width: 768px){p,::slotted(p){font-size:var(--px-text-size-body-m-desktop)}::slotted(p){margin-bottom:var(--px-spacing-xs-tablet)}.text-align-left--tablet{text-align:left}.text-align-center--tablet{text-align:center}.text-align-right--tablet{text-align:right}}@media only screen and (min-width: 1025px){p,::slotted(p){font-size:var(--px-text-size-body-m-desktop)}::slotted(p){margin-bottom:var(--px-spacing-xs-laptop)}.text-align-left--laptop{text-align:left}.text-align-center--laptop{text-align:center}.text-align-right--laptop{text-align:right}}@media only screen and (min-width: 90.0625em){::slotted(p){margin-bottom:var(--px-spacing-xs-desktop)}}";
|
|
13
13
|
const spanCss = "span,::slotted(span){font-family:var(--px-font-family);color:var(--px-color-text-neutral-default);font-size:var(--px-text-size-body-m-mobile);line-height:var(--px-line-height-ratio-l)}:host([inverted]) span,:host([inverted]) ::slotted(span){color:var(--px-color-text-neutral-inverted)}:host([strikethrough]) span{text-decoration:line-through}span.link{text-decoration:underline}@media only screen and (min-width: 768px){span,::slotted(span){font-size:var(--px-text-size-body-m-desktop)}}@media only screen and (min-width: 1025px){span,::slotted(span){font-size:var(--px-text-size-body-m-desktop)}}";
|
|
14
|
-
const commonStyles = ":host([grow]){flex-grow:var(--grow-value)}:host([shrink]){flex-shrink:var(--shrink-value)}:host([basis]){flex-basis:var(--basis-value)}:host([align-self]){align-self:var(--align-self-value)}:host([col-span]){grid-column:span var(--col-span-value) / span var(--col-span-value)}:host([justify-self]){justify-self:var(--justify-
|
|
14
|
+
const commonStyles = ":host([grow]){flex-grow:var(--grow-value)}:host([shrink]){flex-shrink:var(--shrink-value)}:host([basis]){flex-basis:var(--basis-value)}:host([align-self]){align-self:var(--align-self-value)}:host([col-span]){grid-column:span var(--col-span-value) / span var(--col-span-value)}:host([justify-self]){justify-self:var(--justify-value)}:host([order]),::slotted([order]){order:var(--order-value)}:host([hidden]),::slotted([hidden]){display:none}:host([shown--sr]),::slotted(*[shown--sr]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media screen and (max-width: 767px){:host([hidden--mobile]),::slotted([hidden--mobile]){display:none}:host([grow--mobile]){flex-grow:var(--grow--mobile-value)!important}:host([shrink--mobile]){flex-shrink:var(--shrink--mobile-value)!important}:host([basis--mobile]){flex-basis:var(--basis--mobile-value)!important}:host([align-self--mobile]){align-self:var(--align-self--mobile-value)!important}:host([col-span--mobile]){grid-column:span var(--col-span--mobile-value) / span var(--col-span--mobile-value)!important}:host([justify-self--mobile]){justify-self:var(--justify-self--mobile-value)!important}:host([order--mobile]),::slotted([order--mobile]){order:var(--order--mobile-value)!important}:host([shown--sr--mobile]),::slotted(*[shown--sr--mobile]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 768px) and (max-width: 1024px){:host([hidden--tablet]),::slotted([hidden--tablet]){display:none}:host([grow--tablet]){flex-grow:var(--grow--tablet-value)!important}:host([shrink--tablet]){flex-shrink:var(--shrink--tablet-value)!important}:host([basis--tablet]){flex-basis:var(--basis--tablet-value)!important}:host([align-self--tablet]){align-self:var(--align-self--tablet-value)!important}:host([col-span--tablet]){grid-column:span var(--col-span--tablet-value) / span var(--col-span--tablet-value)!important}:host([justify-self--tablet]){justify-self:var(--justify-self--tablet-value)!important}:host([order--tablet]),::slotted([order--tablet]){order:var(--order--tablet-value)!important}:host([shown--sr--tablet]),::slotted(*[shown--sr--tablet]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 1025px){:host([shown--sr--laptop]),::slotted(*[shown--sr--laptop]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 1025px){:host([hidden--laptop]),::slotted([hidden--laptop]){display:none!important}:host([grow--laptop]){flex-grow:var(--grow--laptop-value)!important}:host([shrink--laptop]){flex-shrink:var(--shrink--laptop-value)!important}:host([basis--laptop]){flex-basis:var(--basis--laptop-value)!important}:host([align-self--laptop]){align-self:var(--align-self--laptop-value)!important}:host([col-span--laptop]){grid-column:span var(--col-span--laptop-value) / span var(--col-span--laptop-value)!important}:host([justify-self--laptop]){justify-self:var(--justify-self--laptop-value)!important}:host([order--laptop]),::slotted([order--laptop]){order:var(--order--laptop-value)!important}}@media screen and (min-width: 1441px){:host([col-span--desktop]){grid-column:span var(--col-span--desktop-value) / span var(--col-span--desktop-value)!important}:host([justify-self--desktop]){justify-self:var(--justify-self--desktop-value)!important}:host([order--desktop]),::slotted([order--desktop]){order:var(--order--desktop-value)!important}:host([hidden--desktop]),::slotted([hidden--desktop]){display:none!important}:host([grow--desktop]){flex-grow:var(--grow--desktop-value)!important}:host([shrink--desktop]){flex-shrink:var(--shrink--desktop-value)!important}:host([basis--desktop]){flex-basis:var(--basis--desktop-value)!important}:host([align-self--desktop]){align-self:var(--align-self--desktop-value)!important}}";
|
|
15
15
|
const __vite_import_meta_env__ = {};
|
|
16
16
|
function getSupportedPropertyNames(htmlElementName) {
|
|
17
17
|
const $element = document.createElement(htmlElementName);
|
|
@@ -27,7 +27,7 @@ function getSupportedAttributeNames(htmlElementName) {
|
|
|
27
27
|
}
|
|
28
28
|
const commonStyleSheet = new CSSStyleSheet();
|
|
29
29
|
commonStyleSheet.replaceSync(commonStyles);
|
|
30
|
-
const PX_COMPONENT_DEBUG = typeof import.meta !== "undefined" && typeof __vite_import_meta_env__ !== "undefined" &&
|
|
30
|
+
const PX_COMPONENT_DEBUG = typeof import.meta !== "undefined" && typeof __vite_import_meta_env__ !== "undefined" && false;
|
|
31
31
|
if (typeof window !== "undefined") {
|
|
32
32
|
window.isComponentDebug = isComponentDebug;
|
|
33
33
|
}
|
|
@@ -35,9 +35,6 @@ function isComponentDebug() {
|
|
|
35
35
|
return PX_COMPONENT_DEBUG;
|
|
36
36
|
}
|
|
37
37
|
function log(message) {
|
|
38
|
-
if (isComponentDebug()) {
|
|
39
|
-
console.error(message);
|
|
40
|
-
}
|
|
41
38
|
}
|
|
42
39
|
if (typeof window !== "undefined") {
|
|
43
40
|
window.isComponentDebug = isComponentDebug;
|
|
@@ -533,6 +530,14 @@ const _PxElement = class _PxElement extends WithExtraAttributes {
|
|
|
533
530
|
};
|
|
534
531
|
_PxElement.accessorExclusions = [];
|
|
535
532
|
let PxElement = _PxElement;
|
|
533
|
+
class VerticallyExtendedElement extends PxElement {
|
|
534
|
+
connectedCallback() {
|
|
535
|
+
if (this.isInsideGridOrStack) {
|
|
536
|
+
this.$el.style.display = "block";
|
|
537
|
+
this.$el.style.height = "100%";
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
536
541
|
const flexboxAlignSelfValues = [
|
|
537
542
|
"",
|
|
538
543
|
"default",
|
|
@@ -845,43 +850,43 @@ function transferAccessibilityAttributes(sourceElement, targetElement, applyLabe
|
|
|
845
850
|
sourceElement.setAttribute("aria-labelledby", id);
|
|
846
851
|
}
|
|
847
852
|
}
|
|
848
|
-
function cssTokenBreakpoints(attributeName, selector, attributeValues, cssPropertyPrefix = "", generatedCssPropertyName
|
|
853
|
+
function cssTokenBreakpoints(attributeName, selector, attributeValues, cssPropertyPrefix = "", generatedCssPropertyName) {
|
|
849
854
|
const stylesheet2 = new CSSStyleSheet();
|
|
850
855
|
const styles2 = attributeValues.reduce(
|
|
851
856
|
(prev, attributeValue) => prev + `
|
|
852
|
-
${selector(
|
|
857
|
+
${selector(attributeName, attributeValue)} {
|
|
853
858
|
${attributeName}: var(--${cssPropertyPrefix}-${attributeValue}-desktop);
|
|
854
859
|
${generatedCssPropertyName ? `${generatedCssPropertyName}:var(--${cssPropertyPrefix}-${attributeValue}-desktop)` : ""}
|
|
855
860
|
}
|
|
856
861
|
/* Mobile only - max 767px */
|
|
857
862
|
@media only screen and (max-width: 47.938em) {
|
|
858
|
-
${selector(
|
|
863
|
+
${selector(attributeName, attributeValue)} {
|
|
859
864
|
${attributeName}: var(--${cssPropertyPrefix}-${attributeValue}-mobile);
|
|
860
865
|
${generatedCssPropertyName ? `${generatedCssPropertyName}: var(--${cssPropertyPrefix}-${attributeValue}-mobile)` : ""}
|
|
861
866
|
}
|
|
862
867
|
}
|
|
863
|
-
${selector(
|
|
868
|
+
${selector(attributeName, attributeValue, "mobile")} {
|
|
864
869
|
/* Mobile only - max 767px */
|
|
865
870
|
@media only screen and (max-width: 47.938em) {
|
|
866
871
|
${attributeName}: var(--${cssPropertyPrefix}-${attributeValue}-mobile) !important;
|
|
867
872
|
${generatedCssPropertyName ? `${generatedCssPropertyName}: var(--${cssPropertyPrefix}-${attributeValue}-mobile)` : ""}
|
|
868
873
|
}
|
|
869
874
|
}
|
|
870
|
-
${selector(
|
|
875
|
+
${selector(attributeName, attributeValue, "tablet")} {
|
|
871
876
|
/* Tablet - min 768px max 1024px */
|
|
872
877
|
@media only screen and (min-width: 48em) and (max-width: 64em) {
|
|
873
878
|
${attributeName}: var(--${cssPropertyPrefix}-${attributeValue}-desktop) !important;
|
|
874
879
|
${generatedCssPropertyName ? `${generatedCssPropertyName}: var(--${cssPropertyPrefix}-${attributeValue}-desktop)` : ""}
|
|
875
880
|
}
|
|
876
881
|
}
|
|
877
|
-
${selector(
|
|
882
|
+
${selector(attributeName, attributeValue, "laptop")} {
|
|
878
883
|
/* Laptop - 1025px*/
|
|
879
884
|
@media only screen and (min-width: 64.0625em) {
|
|
880
885
|
${attributeName}: var(--${cssPropertyPrefix}-${attributeValue}-desktop) !important;
|
|
881
886
|
${generatedCssPropertyName ? `${generatedCssPropertyName}: var(--${cssPropertyPrefix}-${attributeValue}-desktop)` : ""}
|
|
882
887
|
}
|
|
883
888
|
}
|
|
884
|
-
${selector(
|
|
889
|
+
${selector(attributeName, attributeValue, "desktop")} {
|
|
885
890
|
/* Desktop - 1025px*/
|
|
886
891
|
@media only screen and (min-width: 64.0625em) {
|
|
887
892
|
${attributeName}: var(--${cssPropertyPrefix}-${attributeValue}-desktop) !important;
|
|
@@ -1043,7 +1048,7 @@ class Typography extends HTMLElement {
|
|
|
1043
1048
|
if (!customElements.get("px-typography")) {
|
|
1044
1049
|
customElements.define("px-typography", Typography);
|
|
1045
1050
|
}
|
|
1046
|
-
const containerCss = ':host{display:block}.container{font-family:var(--px-font-family);background-color:var(--background-color);border-radius:var(--px-radius-main);box-sizing:border-box;height:100%}:host([background-image]) .container{background-image:var(--background-image)}:host([background-gradient]) .container{background-image:var(--background-gradient)}:host([inverted]) .container{background-color:var(--background-color-inverted);color:var(--px-color-text-neutral-inverted)}.border-none{border:none}.border-s{border:var(--px-size-border-s) solid var(--border-color)}.border-m{border:var(--px-size-border-m) solid var(--border-color)}.border-l{border:var(--px-size-border-l) solid var(--border-color)}.border-side-top{border-bottom-style:none;border-right-style:none;border-left-style:none}.border-side-right{border-top-style:none;border-bottom-style:none;border-left-style:none}.border-side-bottom{border-top-style:none;border-right-style:none;border-left-style:none}.border-side-left{border-top-style:none;border-right-style:none;border-bottom-style:none}.border-side-block{border-inline-style:none}.border-side-inline{border-block-style:none}:host([inverted]) .border-s,:host([inverted]) .border-m,:host([inverted]) .border-l{border-color:var(--border-color-inverted)}.border-radius-main{border-radius:var(--px-radius-main)}.border-radius-pill{border-radius:var(--px-radius-pill)}.no-border-radius-top{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all,.border-radius-none{border-radius:var(--px-radius-none)}.bgimg{background-repeat:no-repeat}.background-size-cover{background-size:cover;background-position:center center}.background-size-contain{background-size:contain}.box-shadow-none{box-shadow:none}.box-shadow-s{box-shadow:0 1px 2px #2525251f}.box-shadow-m{box-shadow:0 4px 6px -1px #25252514}.box-shadow-l{box-shadow:0 10px 15px -3px #25252514}.box-shadow-xl{box-shadow:0 20px 25px -5px #25252514}.anchored{position:relative}::slotted([slot="anchor-right"]),::slotted([slot="anchor-left"]),::slotted([slot="anchor-full"]){position:absolute;top:0}::slotted([slot="anchor-right"]),::slotted([slot="anchor-left"]){transform:translateY(-50%);z-index:3}::slotted([slot="anchor-right"]){right:var( --container-anchor-offset--mobile, var( --container-padding-right, var(--container-padding-inline, var(--container-padding)) ) )}::slotted([slot="anchor-left"]){left:var( --container-anchor-offset--mobile, var( --container-padding-left, var(--container-padding-inline, var(--container-padding)) ) )}::slotted([slot="anchor-full"]){transform:translateY(-100%);right:0;left:0;text-align:center;z-index:2}::slotted(px-vstack:only-of-type),::slotted(px-hstack:only-of-type),::slotted(px-stack:only-of-type),::slotted(px-grid:only-of-type){height:100%}:host([anchor-spacing]){margin-top:var(--container-anchor-spacing--mobile)}.border-s ::slotted([slot="anchor-full"]){right:calc(var(--px-size-border-s) * -1);left:calc(var(--px-size-border-s) * -1)}.border-m ::slotted([slot="anchor-full"]){right:calc(var(--px-size-border-m) * -1);left:calc(var(--px-size-border-m) * -1)}.border-l ::slotted([slot="anchor-full"]){right:calc(var(--px-size-border-l) * -1);left:calc(var(--px-size-border-l) * -1)}:host([subgrid-rows]){display:contents}:host([subgrid-rows]) .container{display:grid;grid-template-rows:subgrid;grid-row:span var(--subgrid-rows)}:host([subgrid-rows]):host([grow]) .container{flex-grow:var(--grow-value)}:host([subgrid-rows]):host([shrink]) .container{flex-shrink:var(--shrink-value)}:host([subgrid-rows]):host([basis]) .container{flex-basis:var(--basis-value)}:host([subgrid-rows]):host([align-self]) .container{align-self:var(--align-self-value)}:host([subgrid-rows]):host([col-span]) .container{grid-column:span var(--col-span-value) / span var(--col-span-value)}:host([subgrid-rows]):host([justify-self]) .container{justify-self:var(--justify-self-value)}:host([subgrid-rows]):host([order]) .container{order:var(--order-value)}@media only screen and (max-width: 47.938em){.container{background-color:var(--background-color--mobile, var(--background-color))}:host([background-image--mobile]) .container{background-image:var(--background-image--mobile, var(--background-image))}:host([background-gradient--mobile]) .container{background-image:var( --background-gradient--mobile, var(--background-gradient) )}:host([inverted]) .container{background-color:var( --background-color-inverted--mobile, var(--background-color-inverted) )}.border-side-top--mobile{border-top-style:solid;border-right-style:none;border-bottom-style:none;border-left-style:none}.border-side-right--mobile{border-top-style:none;border-right-style:solid;border-bottom-style:none;border-left-style:none}.border-side-bottom--mobile{border-top-style:none;border-right-style:none;border-bottom-style:solid;border-left-style:none}.border-side-left--mobile{border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:solid}.border-side-block--mobile{border-inline-style:none;border-block-style:solid}.border-side-inline--mobile{border-block-style:none;border-inline-style:solid}.no-border-radius-top--mobile{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--mobile{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--mobile{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--mobile{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--mobile{border-radius:var(--px-radius-none)}:host([subgrid-rows]):host([grow--mobile]) .container{flex-grow:var(--grow--mobile-value)}:host([subgrid-rows]):host([shrink--mobile]) .container{flex-shrink:var(--shrink--mobile-value)}:host([subgrid-rows]):host([basis--mobile]) .container{flex-basis:var(--basis--mobile-value)}:host([subgrid-rows]):host([align-self--mobile]) .container{align-self:var(--align-self--mobile-value)}:host([subgrid-rows]):host([col-span--mobile]) .container{grid-column:span var(--col-span--mobile-value) / span var(--col-span--mobile-value)}:host([subgrid-rows]):host([justify-self--mobile]) .container{justify-self:var(--justify-self--mobile-value)}:host([subgrid-rows]):host([order--mobile]) .container{order:var(--order--mobile-value)}}@media only screen and (min-width: 48em) and (max-width: 64em){.container{background-color:var(--background-color--tablet, var(--background-color))}:host([background-image--tablet]) .container{background-image:var(--background-image--tablet, var(--background-image))}:host([background-gradient--tablet]) .container{background-image:var( --background-gradient--tablet, var(--background-gradient) )}:host([inverted]) .container{background-color:var( --background-color-inverted--tablet, var(--background-color-inverted) )}.no-border-radius-top--tablet{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--tablet{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--tablet{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--tablet{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--tablet{border-radius:var(--px-radius-none)}.border-side-top--tablet{border-top-style:solid;border-right-style:none;border-bottom-style:none;border-left-style:none}.border-side-right--tablet{border-top-style:none;border-right-style:solid;border-bottom-style:none;border-left-style:none}.border-side-bottom--tablet{border-top-style:none;border-right-style:none;border-bottom-style:solid;border-left-style:none}.border-side-left--tablet{border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:solid}.border-side-block--tablet{border-inline-style:none;border-block-style:solid}.border-side-inline--tablet{border-block-style:none;border-inline-style:solid}::slotted([slot="anchor-right"]){right:var( --container-anchor-offset--tablet, var( --container-padding-right, var(--container-padding-inline, var(--container-padding)) ) )}::slotted([slot="anchor-left"]){left:var( --container-anchor-offset--tablet, var( --container-padding-left, var(--container-padding-inline, var(--container-padding)) ) )}:host([anchor-spacing]){margin-top:var(--container-anchor-spacing--tablet)}:host([subgrid-rows]):host([col-span--tablet]) .container{grid-column:span var(--col-span--tablet-value) / span var(--col-span--tablet-value)}:host([subgrid-rows]):host([grow--tablet]) .container{flex-grow:var(--grow--tablet-value)}:host([subgrid-rows]):host([shrink--tablet]) .container{flex-shrink:var(--shrink--tablet-value)}:host([subgrid-rows]):host([basis--tablet]) .container{flex-basis:var(--basis--tablet-value)}:host([subgrid-rows]):host([align-self--tablet]) .container{align-self:var(--align-self--tablet-value)}:host([subgrid-rows]):host([justify-self--tablet]) .container{justify-self:var(--justify-self--tablet-value)}:host([subgrid-rows]):host([order--tablet]) .container{order:var(--order--tablet-value)}}@media only screen and (min-width: 1025px) and (max-width: 1440px){:host([subgrid-rows]):host([col-span--laptop]) .container{grid-column:span var(--col-span--laptop-value) / span var(--col-span--laptop-value)}:host([subgrid-rows]):host([grow--laptop]) .container{flex-grow:var(--grow--laptop-value)}:host([subgrid-rows]):host([shrink--laptop]) .container{flex-shrink:var(--shrink--laptop-value)}:host([subgrid-rows]):host([basis--laptop]) .container{flex-basis:var(--basis--laptop-value)}:host([subgrid-rows]):host([align-self--laptop]) .container{align-self:var(--align-self--laptop-value)}:host([subgrid-rows]):host([justify-self--laptop]) .container{justify-self:var(--justify-self--laptop-value)}:host([subgrid-rows]):host([order--laptop]) .container{order:var(--order--laptop-value)}}@media only screen and (min-width: 64.0625em){.container{background-color:var(--background-color--laptop, var(--background-color))}:host([background-image--laptop]) .container{background-image:var(--background-image--laptop, var(--background-image))}:host([background-gradient--laptop]) .container{background-image:var( --background-gradient--laptop, var(--background-gradient) )}:host([inverted]) .container{background-color:var( --background-color-inverted--laptop, var(--background-color-inverted) )}.no-border-radius-top--laptop{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--laptop{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--laptop{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--laptop{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--laptop{border-radius:var(--px-radius-none)}::slotted([slot="anchor-right"]){right:var( --container-anchor-offset--laptop, var( --container-padding-right, var(--container-padding-inline, var(--container-padding)) ) )}::slotted([slot="anchor-left"]){left:var( --container-anchor-offset--laptop, var( --container-padding-left, var(--container-padding-inline, var(--container-padding)) ) )}:host([anchor-spacing]){margin-top:var(--container-anchor-spacing--laptop)}.border-side-top--laptop{border-top-style:solid;border-right-style:none;border-bottom-style:none;border-left-style:none}.border-side-right--laptop{border-top-style:none;border-right-style:solid;border-bottom-style:none;border-left-style:none}.border-side-bottom--laptop{border-top-style:none;border-right-style:none;border-bottom-style:solid;border-left-style:none}.border-side-left--laptop{border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:solid}.border-side-block--laptop{border-inline-style:none;border-block-style:solid}.border-side-inline--laptop{border-block-style:none;border-inline-style:solid}}@media screen and (min-width: 1441px){:host([subgrid-rows]):host([col-span--desktop]) .container{grid-column:span var(--col-span--desktop-value) / span var(--col-span--desktop-value)}:host([subgrid-rows]):host([grow--desktop]) .container{flex-grow:var(--grow--desktop-value)}:host([subgrid-rows]):host([shrink--desktop]) .container{flex-shrink:var(--shrink--desktop-value)}:host([subgrid-rows]):host([basis--desktop]) .container{flex-basis:var(--basis--desktop-value)}:host([subgrid-rows]):host([align-self--desktop]) .container{align-self:var(--align-self--desktop-value)}:host([subgrid-rows]):host([justify-self--desktop]) .container{justify-self:var(--justify-self--desktop-value)}:host([subgrid-rows]):host([order--desktop]) .container{order:var(--order--desktop-value)}}';
|
|
1051
|
+
const containerCss = ':host{display:block}.container{font-family:var(--px-font-family);background-color:var(--background-color);border-radius:var(--px-radius-main);box-sizing:border-box;height:100%}:host([background-image]) .container{background-image:var(--background-image)}:host([background-gradient]) .container{background-image:var(--background-gradient)}:host([inverted]) .container{background-color:var(--background-color-inverted);color:var(--px-color-text-neutral-inverted)}.border-none{border:none}.border-s{border:var(--px-size-border-s) solid var(--border-color)}.border-m{border:var(--px-size-border-m) solid var(--border-color)}.border-l{border:var(--px-size-border-l) solid var(--border-color)}.border-side-top{border-bottom-style:none;border-right-style:none;border-left-style:none}.border-side-right{border-top-style:none;border-bottom-style:none;border-left-style:none}.border-side-bottom{border-top-style:none;border-right-style:none;border-left-style:none}.border-side-left{border-top-style:none;border-right-style:none;border-bottom-style:none}.border-side-block{border-inline-style:none}.border-side-inline{border-block-style:none}:host([inverted]) .border-s,:host([inverted]) .border-m,:host([inverted]) .border-l{border-color:var(--border-color-inverted)}.border-radius-main{border-radius:var(--px-radius-main)}.border-radius-pill{border-radius:var(--px-radius-pill)}.no-border-radius-top{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all,.border-radius-none{border-radius:var(--px-radius-none)}.bgimg{background-repeat:no-repeat}.background-size-cover{background-size:cover;background-position:center center}.background-size-contain{background-size:contain}.box-shadow-none{box-shadow:none}.box-shadow-s{box-shadow:0 1px 2px #2525251f}.box-shadow-m{box-shadow:0 4px 6px -1px #25252514}.box-shadow-l{box-shadow:0 10px 15px -3px #25252514}.box-shadow-xl{box-shadow:0 20px 25px -5px #25252514}.anchored{position:relative}::slotted([slot="anchor-right"]),::slotted([slot="anchor-left"]),::slotted([slot="anchor-full"]){position:absolute;top:0}::slotted([slot="anchor-right"]),::slotted([slot="anchor-left"]){transform:translateY(-50%);z-index:3}::slotted([slot="anchor-right"]){right:var( --container-anchor-offset--mobile, var( --container-padding-right, var(--container-padding-inline, var(--container-padding)) ) )}::slotted([slot="anchor-left"]){left:var( --container-anchor-offset--mobile, var( --container-padding-left, var(--container-padding-inline, var(--container-padding)) ) )}::slotted([slot="anchor-full"]){transform:translateY(-100%);right:0;left:0;text-align:center;z-index:2}::slotted(px-vstack:only-of-type),::slotted(px-hstack:only-of-type),::slotted(px-stack:only-of-type),::slotted(px-grid:only-of-type){height:100%}:host([anchor-spacing]){margin-top:var(--container-anchor-spacing--mobile)}.border-s ::slotted([slot="anchor-full"]){right:calc(var(--px-size-border-s) * -1);left:calc(var(--px-size-border-s) * -1)}.border-m ::slotted([slot="anchor-full"]){right:calc(var(--px-size-border-m) * -1);left:calc(var(--px-size-border-m) * -1)}.border-l ::slotted([slot="anchor-full"]){right:calc(var(--px-size-border-l) * -1);left:calc(var(--px-size-border-l) * -1)}@media only screen and (max-width: 47.938em){.container{background-color:var(--background-color--mobile, var(--background-color))}:host([background-image--mobile]) .container{background-image:var(--background-image--mobile, var(--background-image))}:host([background-gradient--mobile]) .container{background-image:var( --background-gradient--mobile, var(--background-gradient) )}:host([inverted]) .container{background-color:var( --background-color-inverted--mobile, var(--background-color-inverted) )}.border-side-top--mobile{border-top-style:solid;border-right-style:none;border-bottom-style:none;border-left-style:none}.border-side-right--mobile{border-top-style:none;border-right-style:solid;border-bottom-style:none;border-left-style:none}.border-side-bottom--mobile{border-top-style:none;border-right-style:none;border-bottom-style:solid;border-left-style:none}.border-side-left--mobile{border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:solid}.border-side-block--mobile{border-inline-style:none;border-block-style:solid}.border-side-inline--mobile{border-block-style:none;border-inline-style:solid}.no-border-radius-top--mobile{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--mobile{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--mobile{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--mobile{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--mobile{border-radius:var(--px-radius-none)}}@media only screen and (min-width: 48em) and (max-width: 64em){.container{background-color:var(--background-color--tablet, var(--background-color))}:host([background-image--tablet]) .container{background-image:var(--background-image--tablet, var(--background-image))}:host([background-gradient--tablet]) .container{background-image:var( --background-gradient--tablet, var(--background-gradient) )}:host([inverted]) .container{background-color:var( --background-color-inverted--tablet, var(--background-color-inverted) )}.no-border-radius-top--tablet{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--tablet{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--tablet{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--tablet{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--tablet{border-radius:var(--px-radius-none)}.border-side-top--tablet{border-top-style:solid;border-right-style:none;border-bottom-style:none;border-left-style:none}.border-side-right--tablet{border-top-style:none;border-right-style:solid;border-bottom-style:none;border-left-style:none}.border-side-bottom--tablet{border-top-style:none;border-right-style:none;border-bottom-style:solid;border-left-style:none}.border-side-left--tablet{border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:solid}.border-side-block--tablet{border-inline-style:none;border-block-style:solid}.border-side-inline--tablet{border-block-style:none;border-inline-style:solid}::slotted([slot="anchor-right"]){right:var( --container-anchor-offset--tablet, var( --container-padding-right, var(--container-padding-inline, var(--container-padding)) ) )}::slotted([slot="anchor-left"]){left:var( --container-anchor-offset--tablet, var( --container-padding-left, var(--container-padding-inline, var(--container-padding)) ) )}:host([anchor-spacing]){margin-top:var(--container-anchor-spacing--tablet)}}@media only screen and (min-width: 64.0625em){.container{background-color:var(--background-color--laptop, var(--background-color))}:host([background-image--laptop]) .container{background-image:var(--background-image--laptop, var(--background-image))}:host([background-gradient--laptop]) .container{background-image:var( --background-gradient--laptop, var(--background-gradient) )}:host([inverted]) .container{background-color:var( --background-color-inverted--laptop, var(--background-color-inverted) )}.no-border-radius-top--laptop{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--laptop{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--laptop{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--laptop{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--laptop{border-radius:var(--px-radius-none)}::slotted([slot="anchor-right"]){right:var( --container-anchor-offset--laptop, var( --container-padding-right, var(--container-padding-inline, var(--container-padding)) ) )}::slotted([slot="anchor-left"]){left:var( --container-anchor-offset--laptop, var( --container-padding-left, var(--container-padding-inline, var(--container-padding)) ) )}:host([anchor-spacing]){margin-top:var(--container-anchor-spacing--laptop)}.border-side-top--laptop{border-top-style:solid;border-right-style:none;border-bottom-style:none;border-left-style:none}.border-side-right--laptop{border-top-style:none;border-right-style:solid;border-bottom-style:none;border-left-style:none}.border-side-bottom--laptop{border-top-style:none;border-right-style:none;border-bottom-style:solid;border-left-style:none}.border-side-left--laptop{border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:solid}.border-side-block--laptop{border-inline-style:none;border-block-style:solid}.border-side-inline--laptop{border-block-style:none;border-inline-style:solid}}';
|
|
1047
1052
|
const containerStyles = new CSSStyleSheet();
|
|
1048
1053
|
containerStyles.replaceSync(containerCss);
|
|
1049
1054
|
const anchorSpacingValues = [
|
|
@@ -1052,20 +1057,6 @@ const anchorSpacingValues = [
|
|
|
1052
1057
|
"has-ribbon",
|
|
1053
1058
|
"neighbor-has-ribbon"
|
|
1054
1059
|
];
|
|
1055
|
-
const subgridRowsValues = [
|
|
1056
|
-
"1",
|
|
1057
|
-
"2",
|
|
1058
|
-
"3",
|
|
1059
|
-
"4",
|
|
1060
|
-
"5",
|
|
1061
|
-
"6",
|
|
1062
|
-
"7",
|
|
1063
|
-
"8",
|
|
1064
|
-
"9",
|
|
1065
|
-
"10",
|
|
1066
|
-
"11",
|
|
1067
|
-
"12"
|
|
1068
|
-
];
|
|
1069
1060
|
const attributeBreakpointCSSSelector$1 = (attributeName, attributeValue, device) => `:host([${attributeName}${device ? `--${device}` : ""}='${attributeValue}']) .container`;
|
|
1070
1061
|
const paddingPrefix = "px-padding";
|
|
1071
1062
|
const containerBreakpoints = [
|
|
@@ -1113,17 +1104,9 @@ const containerBreakpoints = [
|
|
|
1113
1104
|
paddingValues,
|
|
1114
1105
|
paddingPrefix,
|
|
1115
1106
|
"--container-padding-left"
|
|
1116
|
-
),
|
|
1117
|
-
cssTokenBreakpoints(
|
|
1118
|
-
"gap",
|
|
1119
|
-
attributeBreakpointCSSSelector$1,
|
|
1120
|
-
gapValues,
|
|
1121
|
-
"px-spacing",
|
|
1122
|
-
void 0,
|
|
1123
|
-
"subgrid-gap"
|
|
1124
1107
|
)
|
|
1125
1108
|
];
|
|
1126
|
-
const _Container = class _Container extends
|
|
1109
|
+
const _Container = class _Container extends VerticallyExtendedElement {
|
|
1127
1110
|
constructor() {
|
|
1128
1111
|
super(containerStyles, ...containerBreakpoints);
|
|
1129
1112
|
this.template = () => `<div class="container">
|
|
@@ -1134,7 +1117,6 @@ const _Container = class _Container extends WithExtraAttributes {
|
|
|
1134
1117
|
</div>`;
|
|
1135
1118
|
this._bgObserver = null;
|
|
1136
1119
|
this._isInViewport = false;
|
|
1137
|
-
this.contentObserver = null;
|
|
1138
1120
|
this.shadowRoot.innerHTML = this.template();
|
|
1139
1121
|
}
|
|
1140
1122
|
static get observedAttributes() {
|
|
@@ -1168,11 +1150,11 @@ const _Container = class _Container extends WithExtraAttributes {
|
|
|
1168
1150
|
"box-shadow",
|
|
1169
1151
|
"anchor-offset",
|
|
1170
1152
|
"anchor-spacing",
|
|
1171
|
-
"inverted"
|
|
1172
|
-
"subgrid-rows"
|
|
1153
|
+
"inverted"
|
|
1173
1154
|
];
|
|
1174
1155
|
}
|
|
1175
1156
|
connectedCallback() {
|
|
1157
|
+
super.connectedCallback();
|
|
1176
1158
|
if (!this.padding) {
|
|
1177
1159
|
this.padding = "m";
|
|
1178
1160
|
}
|
|
@@ -1208,9 +1190,9 @@ const _Container = class _Container extends WithExtraAttributes {
|
|
|
1208
1190
|
this._bgObserver.observe(this.$el);
|
|
1209
1191
|
}
|
|
1210
1192
|
disconnectedCallback() {
|
|
1211
|
-
var _a
|
|
1193
|
+
var _a;
|
|
1212
1194
|
(_a = this._bgObserver) == null ? void 0 : _a.disconnect();
|
|
1213
|
-
|
|
1195
|
+
this.contentObserver.disconnect();
|
|
1214
1196
|
}
|
|
1215
1197
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
1216
1198
|
if (oldValue !== newValue) {
|
|
@@ -1288,14 +1270,6 @@ const _Container = class _Container extends WithExtraAttributes {
|
|
|
1288
1270
|
case "anchor-spacing":
|
|
1289
1271
|
this.updateAnchorSpacing(oldValue, newValue, anchorSpacingValues);
|
|
1290
1272
|
break;
|
|
1291
|
-
case "subgrid-rows":
|
|
1292
|
-
this.updateSubgridRows(
|
|
1293
|
-
attrName,
|
|
1294
|
-
oldValue,
|
|
1295
|
-
newValue,
|
|
1296
|
-
subgridRowsValues
|
|
1297
|
-
);
|
|
1298
|
-
break;
|
|
1299
1273
|
default:
|
|
1300
1274
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
1301
1275
|
break;
|
|
@@ -1477,19 +1451,6 @@ const _Container = class _Container extends WithExtraAttributes {
|
|
|
1477
1451
|
updateAnchorSpacingStyle(oldValue);
|
|
1478
1452
|
updateAnchorSpacingStyle(newValue);
|
|
1479
1453
|
}
|
|
1480
|
-
updateSubgridRows(attrName, oldValue, newValue, attrValues) {
|
|
1481
|
-
if (!checkName(attrValues, newValue)) {
|
|
1482
|
-
log(
|
|
1483
|
-
`${newValue} is not an allowed ${attrName} value for ${this.tagName.toLowerCase()}`
|
|
1484
|
-
);
|
|
1485
|
-
} else {
|
|
1486
|
-
this.style.setProperty(`--${attrName}`, newValue);
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
get $el() {
|
|
1490
|
-
var _a;
|
|
1491
|
-
return (_a = this == null ? void 0 : this.shadowRoot) == null ? void 0 : _a.querySelector(".container");
|
|
1492
|
-
}
|
|
1493
1454
|
get $slotAnchor() {
|
|
1494
1455
|
return this.querySelector('[slot^="anchor"]');
|
|
1495
1456
|
}
|
|
@@ -1830,44 +1791,10 @@ const _Container = class _Container extends WithExtraAttributes {
|
|
|
1830
1791
|
this.setAttribute("anchor-spacing", value);
|
|
1831
1792
|
}
|
|
1832
1793
|
get inverted() {
|
|
1833
|
-
return this.
|
|
1794
|
+
return this.getAttribute("inverted");
|
|
1834
1795
|
}
|
|
1835
1796
|
set inverted(value) {
|
|
1836
|
-
|
|
1837
|
-
this.setAttribute("inverted", "");
|
|
1838
|
-
} else {
|
|
1839
|
-
this.removeAttribute("inverted");
|
|
1840
|
-
}
|
|
1841
|
-
}
|
|
1842
|
-
get subgridRows() {
|
|
1843
|
-
return this.getAttribute("subgrid-rows");
|
|
1844
|
-
}
|
|
1845
|
-
set subgridRows(value) {
|
|
1846
|
-
this.setAttribute("subgrid-rows", value);
|
|
1847
|
-
}
|
|
1848
|
-
get subgridGap() {
|
|
1849
|
-
return this.getAttribute("subgrid-gap");
|
|
1850
|
-
}
|
|
1851
|
-
set subgridGap(value) {
|
|
1852
|
-
this.setAttribute("subgrid-gap", value);
|
|
1853
|
-
}
|
|
1854
|
-
get subgridGapMobile() {
|
|
1855
|
-
return this.getAttribute("subgrid-gap--mobile");
|
|
1856
|
-
}
|
|
1857
|
-
set subgridGapMobile(value) {
|
|
1858
|
-
this.setAttribute("subgrid-gap--mobile", value);
|
|
1859
|
-
}
|
|
1860
|
-
get subgridGapTablet() {
|
|
1861
|
-
return this.getAttribute("subgrid-gap--tablet");
|
|
1862
|
-
}
|
|
1863
|
-
set subgridGapTablet(value) {
|
|
1864
|
-
this.setAttribute("subgrid-gap--tablet", value);
|
|
1865
|
-
}
|
|
1866
|
-
get subgridGapLaptop() {
|
|
1867
|
-
return this.getAttribute("subgrid-gap--laptop");
|
|
1868
|
-
}
|
|
1869
|
-
set subgridGapLaptop(value) {
|
|
1870
|
-
this.setAttribute("subgrid-gap--laptop", value);
|
|
1797
|
+
this.setAttribute("inverted", value);
|
|
1871
1798
|
}
|
|
1872
1799
|
};
|
|
1873
1800
|
_Container.nativeName = "div";
|
|
@@ -3473,7 +3400,6 @@ class Modal extends HTMLElement {
|
|
|
3473
3400
|
this.onOpenClick = () => this.show();
|
|
3474
3401
|
this.onCloseClick = () => this.close();
|
|
3475
3402
|
this.commandButtonCleanups = [];
|
|
3476
|
-
this.opener = null;
|
|
3477
3403
|
this.openerElement = null;
|
|
3478
3404
|
this.closerElement = null;
|
|
3479
3405
|
this.template = `<dialog>
|
|
@@ -3524,11 +3450,14 @@ class Modal extends HTMLElement {
|
|
|
3524
3450
|
if (this.hasAttribute("open")) {
|
|
3525
3451
|
this.show();
|
|
3526
3452
|
}
|
|
3453
|
+
if (this.hasAttribute("closedby")) {
|
|
3454
|
+
this.addCloseListener(this.getAttribute("closedby"));
|
|
3455
|
+
}
|
|
3527
3456
|
if (this.hasAttribute("openedby")) {
|
|
3528
3457
|
this.addOpenListener();
|
|
3529
3458
|
}
|
|
3530
|
-
if (this.hasAttribute("
|
|
3531
|
-
this.
|
|
3459
|
+
if (this.hasAttribute("media-src")) {
|
|
3460
|
+
this.updateMediaSrc(this.getAttribute("media-src"));
|
|
3532
3461
|
}
|
|
3533
3462
|
this.toggleDescriptionVisibility();
|
|
3534
3463
|
(_a = this.$slotDescription) == null ? void 0 : _a.addEventListener(
|
|
@@ -3547,9 +3476,7 @@ class Modal extends HTMLElement {
|
|
|
3547
3476
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
3548
3477
|
switch (attrName) {
|
|
3549
3478
|
case "open":
|
|
3550
|
-
|
|
3551
|
-
this.handleOpenChange();
|
|
3552
|
-
}
|
|
3479
|
+
this.handleOpenChange();
|
|
3553
3480
|
break;
|
|
3554
3481
|
case "status":
|
|
3555
3482
|
this.handleStatusChange(oldValue, newValue);
|
|
@@ -3558,14 +3485,10 @@ class Modal extends HTMLElement {
|
|
|
3558
3485
|
this.updateMediaSrc(newValue);
|
|
3559
3486
|
break;
|
|
3560
3487
|
case "openedby":
|
|
3561
|
-
|
|
3562
|
-
this.addOpenListener();
|
|
3563
|
-
}
|
|
3488
|
+
this.addOpenListener();
|
|
3564
3489
|
break;
|
|
3565
3490
|
case "closedby":
|
|
3566
|
-
|
|
3567
|
-
this.addCloseListener(newValue);
|
|
3568
|
-
}
|
|
3491
|
+
this.addCloseListener(newValue);
|
|
3569
3492
|
break;
|
|
3570
3493
|
case "id":
|
|
3571
3494
|
this.addEventListenersToCommandButtons();
|
|
@@ -3681,29 +3604,12 @@ class Modal extends HTMLElement {
|
|
|
3681
3604
|
addOpenListener() {
|
|
3682
3605
|
var _a;
|
|
3683
3606
|
this.removeOpenListener();
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
this.openerElement.addEventListener("click", this.onOpenClick);
|
|
3687
|
-
} else {
|
|
3688
|
-
(_a = this.opener) == null ? void 0 : _a.disconnect();
|
|
3689
|
-
this.opener = new MutationObserver(() => {
|
|
3690
|
-
if (this.$opener) {
|
|
3691
|
-
this.opener.disconnect();
|
|
3692
|
-
this.opener = null;
|
|
3693
|
-
this.addOpenListener();
|
|
3694
|
-
}
|
|
3695
|
-
});
|
|
3696
|
-
this.opener.observe(document.body, {
|
|
3697
|
-
childList: true,
|
|
3698
|
-
subtree: true
|
|
3699
|
-
});
|
|
3700
|
-
}
|
|
3607
|
+
this.openerElement = this.$opener;
|
|
3608
|
+
(_a = this.openerElement) == null ? void 0 : _a.addEventListener("click", this.onOpenClick);
|
|
3701
3609
|
}
|
|
3702
3610
|
removeOpenListener() {
|
|
3703
|
-
var _a
|
|
3704
|
-
(_a = this.
|
|
3705
|
-
this.opener = null;
|
|
3706
|
-
(_b = this.openerElement) == null ? void 0 : _b.removeEventListener("click", this.onOpenClick);
|
|
3611
|
+
var _a;
|
|
3612
|
+
(_a = this.openerElement) == null ? void 0 : _a.removeEventListener("click", this.onOpenClick);
|
|
3707
3613
|
this.openerElement = null;
|
|
3708
3614
|
}
|
|
3709
3615
|
addCloseListener(value) {
|