@proximus/lavender 2.0.0-alpha.26 → 2.0.0-alpha.30

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.
@@ -6,7 +6,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
6
6
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
7
7
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
8
8
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
9
- var _src, _internals, _template, _onResize, _Header_instances, setMDDDialogOffset_fn, togglePanel_fn, showMobileMenu_fn, hideMobileMenu_fn, hidePanel_fn, $mobileMenu_get, $navigationItems_get, $headerWrapper_get, $megaDropdowns_get, _Dropdown_instances, resetManualPopoverDisplay_fn, _onTriggerClick, _beforeToggle, _onToggle, handleManualPopoverDisplay_fn, _template2, _HeaderMobileMenu_instances, createMobileMenuPanelDropDowns_fn, _mutationObserver, _MegaDropDown_instances, $backButton_get, $title_get, $footer_get, $closeButtons_get;
9
+ var _src, _internals, _template, _onResize, _Header_instances, setMDDDialogOffset_fn, togglePanel_fn, showMobileMenu_fn, hideMobileMenu_fn, hidePanel_fn, $mobileMenu_get, $navigationItems_get, $headerWrapper_get, $megaDropdowns_get, _Dropdown_instances, resetManualPopoverDisplay_fn, _onTriggerClick, _beforeToggle, _onToggle, handleManualPopoverDisplay_fn, _template2, _HeaderMobileMenu_instances, createMobileMenuPanelDropDowns_fn, _mutationObserver, _MegaDropDown_instances, $backButton_get, $title_get, $footer_get, $closeButtons_get, _Card_instances, updateMediaPosition_fn, updateMedia_fn, updateBackgroundColor_fn;
10
10
  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}}";
11
11
  function getSupportedPropertyNames(htmlElementName) {
12
12
  const $element = document.createElement(htmlElementName);
@@ -486,6 +486,20 @@ class PxElement extends WithExtraAttributes {
486
486
  get $el() {
487
487
  return this.shadowRoot.querySelector(this.nativeName);
488
488
  }
489
+ _updateAttribute(name, value) {
490
+ if (value) {
491
+ this.setAttribute(name, value);
492
+ } else {
493
+ this.removeAttribute(name);
494
+ }
495
+ }
496
+ _updateBooleanAttribute(name, value) {
497
+ if (value) {
498
+ this.setAttribute(name, "");
499
+ } else {
500
+ this.removeAttribute(name);
501
+ }
502
+ }
489
503
  }
490
504
  const gridGapValues = ["", "default", "none", "l"];
491
505
  const flexboxAlignSelfValues = [
@@ -3749,7 +3763,7 @@ class Section extends HTMLElement {
3749
3763
  if (!customElements.get("px-section")) {
3750
3764
  customElements.define("px-section", Section);
3751
3765
  }
3752
- const accordionCss = `details{font-family:var(--px-font-family);display:flex;flex-direction:column}details summary{font-size:var(--px-text-size-label-m-mobile);align-items:center;align-self:flex-start;transition:all .2s ease-out 0s,backdrop-filter 0s,-webkit-backdrop-filter 0s}details summary .arrow-icon{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--px-size-icon-m);height:var(--px-size-icon-m);background-color:var(--px-color-background-container-secondary-default);border-radius:var(--px-radius-pill);transition:all .2s ease-out 0s,backdrop-filter 0s,-webkit-backdrop-filter 0s}details summary .arrow-icon:after{content:"";width:var(--px-size-icon-xs);height:var(--px-size-icon-xs);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:cover;mask-size:cover;-webkit-mask-position:50% 50%;mask-position:50% 50%;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cg id='CHEVRON DOWN'%3E%3Cpath id='Vector' fill-rule='evenodd' clip-rule='evenodd' d='M12.4714 6.19524C12.2111 5.93489 11.7889 5.93489 11.5286 6.19524L8 9.72384L4.4714 6.19524C4.21105 5.93489 3.78894 5.93489 3.52859 6.19524C3.26824 6.45559 3.26824 6.8777 3.52859 7.13805L7.52859 11.1381C7.78894 11.3984 8.21105 11.3984 8.4714 11.1381L12.4714 7.13805C12.7318 6.8777 12.7318 6.45559 12.4714 6.19524Z' fill='%235C2D91'/%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cg id='CHEVRON DOWN'%3E%3Cpath id='Vector' fill-rule='evenodd' clip-rule='evenodd' d='M12.4714 6.19524C12.2111 5.93489 11.7889 5.93489 11.5286 6.19524L8 9.72384L4.4714 6.19524C4.21105 5.93489 3.78894 5.93489 3.52859 6.19524C3.26824 6.45559 3.26824 6.8777 3.52859 7.13805L7.52859 11.1381C7.78894 11.3984 8.21105 11.3984 8.4714 11.1381L12.4714 7.13805C12.7318 6.8777 12.7318 6.45559 12.4714 6.19524Z' fill='%235C2D91'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;color:var(--px-color-icon-brand-default);transition:all .2s ease-out 0s,backdrop-filter 0s,-webkit-backdrop-filter 0s}details summary:hover{cursor:pointer}details summary:hover .arrow-icon{background-color:var( --px-color-background-state-hover-bordered-default );border-color:var(--px-color-border-state-hover-default);-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px)}details:not(.single):not(.contained){border-bottom:var(--px-size-border-m) solid var(--px-color-border-main-default)}details:not(.single) ::slotted([slot="title"]){flex-grow:1}details:not(.single) slot[name=content]{display:block;padding:var(--px-padding-s-mobile)}details:not(.single) summary{display:flex;padding:var(--px-padding-s-mobile);gap:var(--px-spacing-s-mobile);align-self:stretch}details:not(.single) summary .arrow-icon{border:var(--px-size-border-m) solid transparent}details:not(.single) summary:hover{background-color:var(--px-color-background-state-hover-default)}details:not(.single) summary:hover .arrow-icon{border-color:var(--px-color-border-state-hover-default)}details:not(.single).contained{border-radius:var(--px-radius-main);border:var(--px-size-border-m) solid var(--px-color-border-none-default);background-color:var( --accordion-contained-background-color-default, var(--px-color-background-container-default-default) )}details:not(.single).contained summary{padding:var(--px-padding-m-mobile);font-size:var(--px-text-size-label-l-mobile);font-weight:var(--px-font-weight-title);color:var(--px-color-text-brand-default)}details:not(.single).contained summary:hover{background-color:var(--px-color-background-none)}details:not(.single).contained:has(summary:hover){background-color:var( --px-color-background-state-hover-bordered-default );border-color:var(--px-color-border-state-hover-default)}details.single summary{display:inline-flex;padding-block:var(--px-padding-2xs-mobile);gap:var(--px-spacing-xs-mobile);justify-content:center;color:var(--px-color-text-brand-default);font-weight:var(--px-font-weight-title);border:var(--px-size-border-m) solid transparent;border-radius:var(--px-radius-pill)}details.single summary:hover{gap:var(--px-spacing-2xs-mobile);padding:var(--px-padding-2xs-mobile) var(--px-padding-s-mobile);border-color:var(--px-color-border-state-hover-default)}details.single summary:hover .arrow-icon{border-color:transparent;background-color:transparent;margin-right:calc(var(--px-padding-xs-mobile) * -1)}details.single slot[name=content]{display:block;padding-top:var(--px-spacing-s-mobile)}details[open] summary slot[name=title]{color:var(--px-color-text-brand-default);font-weight:var(--px-font-weight-title)}details[open] summary .arrow-icon:after{transform:rotate(180deg)}summary::-webkit-details-marker{display:none}:host([inverted]) details{color:var(--px-color-text-neutral-inverted)}:host([inverted]) details summary .arrow-icon{background-color:var( --px-color-background-container-secondary-inverted )}:host([inverted]) details summary .arrow-icon:after{color:var(--px-color-icon-brand-inverted)}:host([inverted]) details summary:hover .arrow-icon{background-color:var(--px-color-background-state-hover-default);border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) details:not(.single){border-bottom-color:var(--px-color-border-main-inverted)}:host([inverted]) details:not(.single) summary:hover{background-color:var(--px-color-background-state-hover-inverted)}:host([inverted]) details:not(.single).contained{background-color:var( --accordion-contained-background-color-inverted, var(--px-color-background-container-default-inverted) );border-color:var(--px-color-border-none-inverted)}:host([inverted]) details:not(.single).contained summary{color:var(--px-color-text-neutral-inverted)}:host([inverted]) details:not(.single).contained summary:hover{background-color:var(--px-color-background-none)}:host([inverted]) details:not(.single).contained:has(summary:hover){background-color:var( --px-color-background-state-hover-bordered-inverted );border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) details.single summary{color:var(--px-color-text-brand-inverted)}:host([inverted]) details.single summary:hover{border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) details.single summary:hover .arrow-icon{border-color:transparent;background-color:transparent}:host([inverted]) details[open] summary slot[name=title]{color:var(--px-color-text-brand-inverted)}@media only screen and (min-width: 48em){details summary{font-size:var(--px-text-size-label-m-tablet)}details:not(.single) slot[name=content]{padding:var(--px-padding-s-tablet)}details:not(.single) summary{padding:var(--px-padding-s-tablet);gap:var(--px-spacing-s-tablet)}details:not(.single).contained summary{padding:var(--px-padding-m-tablet);font-size:var(--px-text-size-label-l-tablet)}details.single summary{padding-block:var(--px-padding-2xs-tablet);gap:var(--px-spacing-xs-tablet)}details.single summary:hover{gap:var(--px-spacing-2xs-tablet);padding:var(--px-padding-2xs-tablet) var(--px-padding-s-tablet)}details.single summary:hover .arrow-icon{margin-right:calc(var(--px-padding-xs-tablet) * -1)}details.single slot[name=content]{padding-top:var(--px-spacing-s-tablet)}}@media only screen and (min-width: 64.0625em){details summary{font-size:var(--px-text-size-label-m-laptop)}details:not(.single) slot[name=content]{padding:var(--px-padding-s-laptop)}details:not(.single) summary{padding:var(--px-padding-s-laptop);gap:var(--px-spacing-s-laptop)}details:not(.single).contained summary{font-size:var(--px-text-size-label-l-laptop);padding:var(--px-padding-m-laptop)}details.single summary{padding-block:var(--px-padding-2xs-laptop);gap:var(--px-spacing-xs-laptop)}details.single summary:hover{gap:var(--px-spacing-2xs-laptop);padding:var(--px-padding-2xs-laptop) var(--px-padding-s-laptop)}details.single summary:hover .arrow-icon{margin-right:calc(var(--px-padding-xs-laptop) * -1)}details.single slot[name=content]{padding-top:var(--px-spacing-s-laptop)}}`;
3766
+ const accordionCss = `details{font-family:var(--px-font-family);display:flex;flex-direction:column}details summary{font-size:var(--px-text-size-label-m-mobile);align-items:center;align-self:flex-start;transition:all .2s ease-out 0s,backdrop-filter 0s,-webkit-backdrop-filter 0s}details summary .arrow-icon{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--px-size-icon-m);height:var(--px-size-icon-m);background-color:var(--px-color-background-container-secondary-default);border-radius:var(--px-radius-pill);transition:all .2s ease-out 0s,backdrop-filter 0s,-webkit-backdrop-filter 0s}details summary .arrow-icon:after{content:"";width:var(--px-size-icon-xs);height:var(--px-size-icon-xs);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:cover;mask-size:cover;-webkit-mask-position:50% 50%;mask-position:50% 50%;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cg id='CHEVRON DOWN'%3E%3Cpath id='Vector' fill-rule='evenodd' clip-rule='evenodd' d='M12.4714 6.19524C12.2111 5.93489 11.7889 5.93489 11.5286 6.19524L8 9.72384L4.4714 6.19524C4.21105 5.93489 3.78894 5.93489 3.52859 6.19524C3.26824 6.45559 3.26824 6.8777 3.52859 7.13805L7.52859 11.1381C7.78894 11.3984 8.21105 11.3984 8.4714 11.1381L12.4714 7.13805C12.7318 6.8777 12.7318 6.45559 12.4714 6.19524Z' fill='%235C2D91'/%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cg id='CHEVRON DOWN'%3E%3Cpath id='Vector' fill-rule='evenodd' clip-rule='evenodd' d='M12.4714 6.19524C12.2111 5.93489 11.7889 5.93489 11.5286 6.19524L8 9.72384L4.4714 6.19524C4.21105 5.93489 3.78894 5.93489 3.52859 6.19524C3.26824 6.45559 3.26824 6.8777 3.52859 7.13805L7.52859 11.1381C7.78894 11.3984 8.21105 11.3984 8.4714 11.1381L12.4714 7.13805C12.7318 6.8777 12.7318 6.45559 12.4714 6.19524Z' fill='%235C2D91'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;color:var(--px-color-icon-brand-default);transition:all .2s ease-out 0s,backdrop-filter 0s,-webkit-backdrop-filter 0s}details summary:hover{cursor:pointer}details summary:hover .arrow-icon{background-color:var( --px-color-background-state-hover-bordered-default );border-color:var(--px-color-border-state-hover-default);-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px)}details:not(.single):not(.contained){border-bottom:var(--px-size-border-m) solid var(--px-color-border-main-default)}details:not(.single) ::slotted([slot="title"]){flex-grow:1}details:not(.single) slot[name=content]{display:block;padding:var(--px-padding-s-mobile)}details:not(.single) summary{display:flex;padding:var(--px-padding-s-mobile);gap:var(--px-spacing-s-mobile);align-self:stretch}details:not(.single) summary .arrow-icon{border:var(--px-size-border-m) solid transparent}details:not(.single) summary:hover{background-color:var(--px-color-background-state-hover-default)}details:not(.single) summary:hover .arrow-icon{border-color:var(--px-color-border-state-hover-default)}details:not(.single).contained{border-radius:var(--px-radius-main);border:var(--px-size-border-m) solid var(--px-color-border-none-default);background-color:var( --accordion-contained-background-color-default, var(--px-color-background-container-default-default) )}details:not(.single).contained summary{padding:var(--px-padding-m-mobile);font-size:var(--px-text-size-label-l-mobile);font-weight:var(--px-font-weight-title);color:var(--px-color-text-brand-default)}details:not(.single).contained summary:hover{background-color:var(--px-color-background-none)}details:not(.single).contained:has(summary:hover){background-color:var( --px-color-background-state-hover-bordered-default );border-color:var(--px-color-border-state-hover-default)}details:not(.single).contained[no-content-padding] slot[name=content]{padding:0}details.single summary{display:inline-flex;padding-block:var(--px-padding-2xs-mobile);gap:var(--px-spacing-xs-mobile);justify-content:center;color:var(--px-color-text-brand-default);font-weight:var(--px-font-weight-title);border:var(--px-size-border-m) solid transparent;border-radius:var(--px-radius-pill)}details.single summary:hover{gap:var(--px-spacing-2xs-mobile);padding:var(--px-padding-2xs-mobile) var(--px-padding-s-mobile);border-color:var(--px-color-border-state-hover-default)}details.single summary:hover .arrow-icon{border-color:transparent;background-color:transparent;margin-right:calc(var(--px-padding-xs-mobile) * -1)}details.single slot[name=content]{display:block;padding-top:var(--px-spacing-s-mobile)}details[open] summary slot[name=title]{color:var(--px-color-text-brand-default);font-weight:var(--px-font-weight-title)}details[open] summary .arrow-icon:after{transform:rotate(180deg)}summary::-webkit-details-marker{display:none}:host([inverted]) details{color:var(--px-color-text-neutral-inverted)}:host([inverted]) details summary .arrow-icon{background-color:var( --px-color-background-container-secondary-inverted )}:host([inverted]) details summary .arrow-icon:after{color:var(--px-color-icon-brand-inverted)}:host([inverted]) details summary:hover .arrow-icon{background-color:var(--px-color-background-state-hover-default);border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) details:not(.single){border-bottom-color:var(--px-color-border-main-inverted)}:host([inverted]) details:not(.single) summary:hover{background-color:var(--px-color-background-state-hover-inverted)}:host([inverted]) details:not(.single).contained{background-color:var( --accordion-contained-background-color-inverted, var(--px-color-background-container-default-inverted) );border-color:var(--px-color-border-none-inverted)}:host([inverted]) details:not(.single).contained summary{color:var(--px-color-text-neutral-inverted)}:host([inverted]) details:not(.single).contained summary:hover{background-color:var(--px-color-background-none)}:host([inverted]) details:not(.single).contained:has(summary:hover){background-color:var( --px-color-background-state-hover-bordered-inverted );border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) details.single summary{color:var(--px-color-text-brand-inverted)}:host([inverted]) details.single summary:hover{border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) details.single summary:hover .arrow-icon{border-color:transparent;background-color:transparent}:host([inverted]) details[open] summary slot[name=title]{color:var(--px-color-text-brand-inverted)}@media only screen and (min-width: 48em){details summary{font-size:var(--px-text-size-label-m-tablet)}details:not(.single) slot[name=content]{padding:var(--px-padding-s-tablet)}details:not(.single) summary{padding:var(--px-padding-s-tablet);gap:var(--px-spacing-s-tablet)}details:not(.single).contained summary{padding:var(--px-padding-m-tablet);font-size:var(--px-text-size-label-l-tablet)}details.single summary{padding-block:var(--px-padding-2xs-tablet);gap:var(--px-spacing-xs-tablet)}details.single summary:hover{gap:var(--px-spacing-2xs-tablet);padding:var(--px-padding-2xs-tablet) var(--px-padding-s-tablet)}details.single summary:hover .arrow-icon{margin-right:calc(var(--px-padding-xs-tablet) * -1)}details.single slot[name=content]{padding-top:var(--px-spacing-s-tablet)}}@media only screen and (min-width: 64.0625em){details summary{font-size:var(--px-text-size-label-m-laptop)}details:not(.single) slot[name=content]{padding:var(--px-padding-s-laptop)}details:not(.single) summary{padding:var(--px-padding-s-laptop);gap:var(--px-spacing-s-laptop)}details:not(.single).contained summary{font-size:var(--px-text-size-label-l-laptop);padding:var(--px-padding-m-laptop)}details.single summary{padding-block:var(--px-padding-2xs-laptop);gap:var(--px-spacing-xs-laptop)}details.single summary:hover{gap:var(--px-spacing-2xs-laptop);padding:var(--px-padding-2xs-laptop) var(--px-padding-s-laptop)}details.single summary:hover .arrow-icon{margin-right:calc(var(--px-padding-xs-laptop) * -1)}details.single slot[name=content]{padding-top:var(--px-spacing-s-laptop)}}`;
3753
3767
  const accordionStyles = new CSSStyleSheet();
3754
3768
  accordionStyles.replaceSync(accordionCss);
3755
3769
  const accordionVariantValues = [
@@ -3777,7 +3791,8 @@ const _Accordion = class _Accordion extends PxElement {
3777
3791
  ...super.observedAttributes,
3778
3792
  "variant",
3779
3793
  "background-color",
3780
- "inverted"
3794
+ "inverted",
3795
+ "no-content-padding"
3781
3796
  ];
3782
3797
  }
3783
3798
  attributeChangedCallback(attrName, oldValue, newValue) {
@@ -3851,6 +3866,16 @@ const _Accordion = class _Accordion extends PxElement {
3851
3866
  this.removeAttribute("inverted");
3852
3867
  }
3853
3868
  }
3869
+ get noContentPadding() {
3870
+ return this.hasAttribute("no-content-padding");
3871
+ }
3872
+ set noContentPadding(value) {
3873
+ if (value) {
3874
+ this.setAttribute("no-content-padding", "");
3875
+ } else {
3876
+ this.removeAttribute("no-content-padding");
3877
+ }
3878
+ }
3854
3879
  };
3855
3880
  _Accordion.nativeName = "details";
3856
3881
  let Accordion = _Accordion;
@@ -13531,7 +13556,7 @@ let Status = _Status;
13531
13556
  if (!customElements.get("px-status")) {
13532
13557
  customElements.define("px-status", Status);
13533
13558
  }
13534
- const styles$6 = ':host{display:block}:host *{box-sizing:border-box}.card{display:block;height:100%;position:relative;text-decoration:none;color:var(--px-color-text-neutral-default);--btn-transition: all .2s ease-in-out 0s;transition:var(--btn-transition);border-radius:var(--px-radius-main);outline-color:var(--px-color-border-focus-outline-default);outline-width:var(--px-focus-outline-mobile);overflow:hidden;border:var(--px-size-border-m) solid transparent}.card .contrast-helper{display:none;position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:none}:host([contrast-helper-gradient]) :is(.card .contrast-helper){display:block;background-image:linear-gradient(90deg,#fff 23.43%,#fff0 81.69%)}:host([contrast-helper-overlay]) :is(.card .contrast-helper){display:block;background-color:#ffffffb3}.card .card__container{height:100%}.card .card__content{position:relative;background-color:var(--card-background-color-default);flex-grow:1;z-index:2}.card:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline-style:solid}.card:hover{border-color:var(--px-color-border-state-hover-default)}.card:hover .card__content{background-color:var(--px-color-background-state-hover-bordered-default)}px-container{height:100%}::slotted([slot="title"]){font-family:var(--px-font-family);line-height:var(--px-line-height-ratio-l);font-size:var(--px-text-size-heading-xl-mobile);font-weight:var(--px-font-weight-title);color:var(--px-color-text-brand-default)}::slotted([slot="content"]){font-family:var(--px-font-family);line-height:var(--px-font-line-height-m);font-size:var(--px-text-size-body-m-mobile);font-weight:var(--px-font-weight-body);color:var(--px-color-text-neutral-default)}.media-position-top .card__container{display:flex;flex-direction:column}.media-position-left .card__container{display:flex;flex-direction:row}.media-position-left .card__container .card__media-left{background-size:cover;background-position:center center;width:var(--card-media-left-size);flex:0 0 auto}@media only screen and (max-width: 47.938em){.hidden--mobile,.shown--tablet,.shown--laptop{display:none}.hidden--tablet,.hidden--laptop,.shown--mobile{display:block}.media-position-top--mobile .card__container{display:flex;flex-direction:column}.media-position-left:not(.media-position-top--mobile) .card__container,.media-position-left--mobile .card__container{display:flex;flex-direction:row}.media-position-left .card__container .card__media-left{width:var(--card-media-left-size--mobile, var(--card-media-left-size))}.media-position-left .card__container .card__media-left--mobile,.media-position-left--mobile .card__container .card__media-left--mobile{background-size:cover;background-position:center center;width:var(--card-media-left-size--mobile, var(--card-media-left-size))}.media-position-background:not(.media-position-top--mobile,.media-position-left--mobile,.media-position-none--mobile) .card__content,.media-position-background--mobile .card__content{background-color:transparent}.media-position-background:not(.media-position-top--mobile,.media-position-left--mobile,.media-position-none--mobile):hover .card__content,.media-position-background--mobile:hover .card__content{background-color:transparent}}@media only screen and (min-width: 48em) and (max-width: 64em){.hidden--tablet,.shown--mobile,.shown--laptop{display:none}.hidden--mobile,.hidden--laptop,.shown--tablet{display:block}.media-position-top--tablet .card__container{display:flex;flex-direction:column}.media-position-left:not(.media-position-top--tablet) .card__container,.media-position-left--tablet .card__container{display:flex;flex-direction:row}.media-position-left .card__container .card__media-left{width:var(--card-media-left-size--tablet, var(--card-media-left-size))}.media-position-left .card__container .card__media-left--tablet,.media-position-left--tablet .card__container .card__media-left--tablet{background-size:cover;background-position:center center;width:var(--card-media-left-size--tablet, var(--card-media-left-size))}.media-position-background:not(.media-position-top--tablet,.media-position-left--tablet,.media-position-none--tablet) .card__content,.media-position-background--tablet .card__content{background-color:transparent}.media-position-background:not(.media-position-top--tablet,.media-position-left--tablet,.media-position-none--tablet):hover .card__content,.media-position-background--tablet:hover .card__content{background-color:transparent}}@media only screen and (min-width: 48em){.card{outline-width:var(--px-focus-outline-tablet)}.card:focus-visible{outline-offset:var(--px-focus-offset-tablet)}::slotted([slot="title"]){font-size:var(--px-text-size-heading-xl-tablet)}::slotted([slot="content"]){font-size:var(--px-text-size-body-m-tablet)}}@media only screen and (min-width: 64.0625em){.hidden--laptop,.shown--mobile,.shown--tablet{display:none}.hidden--mobile,.hidden--tablet,.shown--laptop{display:block}.card{outline-width:var(--px-focus-outline-laptop)}.card:focus-visible{outline-offset:var(--px-focus-offset-laptop)}::slotted([slot="title"]){font-size:var(--px-text-size-heading-xl-laptop)}::slotted([slot="content"]){font-size:var(--px-text-size-body-m-laptop)}.media-position-top--laptop .card__container{display:flex;flex-direction:column}.media-position-left:not(.media-position-top--laptop) .card__container,.media-position-left--laptop .card__container{display:flex;flex-direction:row}.media-position-left .card__container .card__media-left{width:var(--card-media-left-size--laptop, var(--card-media-left-size))}.media-position-left .card__container .card__media-left--laptop,.media-position-left--laptop .card__container .card__media-left--laptop{background-size:cover;background-position:center center;width:var(--card-media-left-size--laptop, var(--card-media-left-size))}.media-position-background:not(.media-position-top--laptop,.media-position-left--laptop,.media-position-none--laptop) .card__content,.media-position-background--laptop .card__content{background-color:transparent}.media-position-background:not(.media-position-top--laptop,.media-position-left--laptop,.media-position-none--laptop):hover .card__content,.media-position-background--laptop:hover .card__content{background-color:transparent}}:host([inverted]) .card{color:var(--px-color-text-neutral-inverted);outline-color:var(--px-color-border-focus-outline-inverted)}:host([contrast-helper-gradient]) :is(:host([inverted]) .card .contrast-helper){background-image:linear-gradient(90deg,#000 23.43%,#0000 81.69%)}:host([contrast-helper-overlay]) :is(:host([inverted]) .card .contrast-helper){background-color:#0006}:host([inverted]) .card .card__content{background-color:var(--card-background-color-inverted)}:host([inverted]) .card:hover{border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) .card:hover .card__content{background-color:var( --px-color-background-state-hover-bordered-inverted )}:host([inverted]) ::slotted([slot="title"]){color:var(--px-color-text-brand-inverted)}:host([inverted]) ::slotted([slot="content"]){color:var(--px-color-text-neutral-inverted)}@media only screen and (max-width: 47.938em){:host([inverted]) .media-position-background:not(.media-position-top--mobile,.media-position-left--mobile,.media-position-none--mobile) .card__content,:host([inverted]) .media-position-background--mobile .card__content{background-color:transparent}:host([inverted]) .media-position-background:not(.media-position-top--mobile,.media-position-left--mobile,.media-position-none--mobile):hover .card__content,:host([inverted]) .media-position-background--mobile:hover .card__content{background-color:transparent}}@media only screen and (min-width: 48em) and (max-width: 64em){:host([inverted]) .media-position-background:not(.media-position-top--tablet,.media-position-left--tablet,.media-position-none--tablet) .card__content,:host([inverted]) .media-position-background--tablet .card__content{background-color:transparent}:host([inverted]) .media-position-background:not(.media-position-top--tablet,.media-position-left--tablet,.media-position-none--tablet):hover .card__content,:host([inverted]) .media-position-background--tablet:hover .card__content{background-color:transparent}}@media only screen and (min-width: 64.0625em){:host([inverted]) .media-position-background:not(.media-position-top--laptop,.media-position-left--laptop,.media-position-none--laptop) .card__content,:host([inverted]) .media-position-background--laptop .card__content{background-color:transparent}:host([inverted]) .media-position-background:not(.media-position-top--laptop,.media-position-left--laptop,.media-position-none--laptop):hover .card__content,:host([inverted]) .media-position-background--laptop:hover .card__content{background-color:transparent}}';
13559
+ const styles$6 = ':host{--card-background-color-default: var(--px-color-background-container-light-default);--card-media-left-size-s: 120px;--card-media-left-size-m: 250px;--card-media-left-size: var(--card-media-left-size-s);display:block}:host *{box-sizing:border-box}:host picture{display:none}:host([media-position="background"]) picture{display:none!important}:host(:not([media-position="background"])) picture:has(img[src]){display:block}.card{display:block;height:100%;position:relative;text-decoration:none;color:var(--px-color-text-neutral-default);--btn-transition: all .2s ease-in-out 0s;transition:var(--btn-transition);border-radius:var(--px-radius-main);outline-color:var(--px-color-border-focus-outline-default);outline-width:var(--px-focus-outline-mobile);overflow:hidden;border:var(--px-size-border-m) solid transparent}.card .contrast-helper{display:none;position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:none}:host([contrast-helper-gradient]) :is(.card .contrast-helper){display:block;background-image:linear-gradient(90deg,#fff 23.43%,#fff0 81.69%)}:host([contrast-helper-overlay]) :is(.card .contrast-helper){display:block;background-color:#ffffffb3}.card .card__content{position:relative;flex-grow:1;z-index:2}.card px-container{background-color:var(--card-background-color-default)}.card:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline-style:solid}.card:hover{border-color:var(--px-color-border-state-hover-default)}.card:hover px-container{background-color:var(--px-color-background-state-hover-bordered-default)}px-container{height:100%}::slotted([slot="title"]){font-family:var(--px-font-family);line-height:var(--px-line-height-ratio-l);font-size:var(--px-text-size-heading-xl-mobile);font-weight:var(--px-font-weight-title);color:var(--px-color-text-brand-default)}::slotted([slot="content"]){font-family:var(--px-font-family);line-height:var(--px-font-line-height-m);font-size:var(--px-text-size-body-m-mobile);font-weight:var(--px-font-weight-body);color:var(--px-color-text-neutral-default)}:host([media-left-size="s"]) img{--card-media-left-size: var(--card-media-left-size-s)}:host([media-left-size="m"]) img{--card-media-left-size: var(--card-media-left-size-m)}@media only screen and (max-width: 48em){.hidden--mobile,.shown--tablet,.shown--laptop{display:none}.hidden--tablet,.hidden--laptop,.shown--mobile{display:block}:host([media-left-size--mobile="m"]) img{--card-media-left-size: var(--card-media-left-size-m)}:host([media-left-size--mobile="s"]) img{--card-media-left-size: var(--card-media-left-size-s)}:host([media-position--mobile="background"]) picture{display:none!important}:host(:not([media-position--mobile="background"],[media-position="background"])) picture:has(source:nth-child(1)[srcset]){display:block}:host([media-position="top"]) img,:host([media-position--mobile="top"]) img{display:block;height:100%;width:100%;aspect-ratio:initial;object-fit:initial}:host([media-position="left"]:not([media-position--mobile="top"])) img,:host([media-position--mobile="left"]) img{height:100%;aspect-ratio:1 / 1;width:var(--card-media-left-size);object-fit:cover}.media-position-background:not(.media-position-top--mobile,.media-position-left--mobile,.media-position-none--mobile) px-container,.media-position-background--mobile px-container{background-color:transparent}.media-position-background:not(.media-position-top--mobile,.media-position-left--mobile,.media-position-none--mobile):hover px-container,.media-position-background--mobile:hover px-container{background-color:transparent}}@media only screen and (min-width: 48em) and (max-width: 64em){.hidden--tablet,.shown--mobile,.shown--laptop{display:none}.hidden--mobile,.hidden--laptop,.shown--tablet{display:block}:host([media-left-size--tablet="m"]) img{--card-media-left-size: var(--card-media-left-size-m)}:host([media-left-size--tablet="s"]) img{--card-media-left-size: var(--card-media-left-size-s)}:host([media-position--tablet="background"]) picture{display:none!important}:host(:not([media-position--mobile="background"],[media-position="background"])) picture:has(source:nth-child(2)[srcset]){display:block}:host([media-position="left"]:not([media-position--tablet="top"])) img,:host([media-position--tablet="left"]) img{height:100%;aspect-ratio:1 / 1;width:var(--card-media-left-size);object-fit:cover}:host([media-position="top"]) img,:host([media-position--tablet="top"]) img{display:block;height:100%;width:100%;aspect-ratio:initial;object-fit:initial}.media-position-background:not(.media-position-top--tablet,.media-position-left--tablet,.media-position-none--tablet) px-container,.media-position-background--tablet px-container{background-color:transparent}.media-position-background:not(.media-position-top--tablet,.media-position-left--tablet,.media-position-none--tablet):hover px-container,.media-position-background--tablet:hover px-container{background-color:transparent}}@media only screen and (min-width: 48em){.card{outline-width:var(--px-focus-outline-tablet)}.card:focus-visible{outline-offset:var(--px-focus-offset-tablet)}::slotted([slot="title"]){font-size:var(--px-text-size-heading-xl-tablet)}::slotted([slot="content"]){font-size:var(--px-text-size-body-m-tablet)}}@media only screen and (min-width: 64.0625em){.hidden--laptop,.shown--mobile,.shown--tablet{display:none}.hidden--mobile,.hidden--tablet,.shown--laptop{display:block}:host([media-left-size--laptop="m"]) img{--card-media-left-size: var(--card-media-left-size-m)}:host([media-left-size--laptop="s"]) img{--card-media-left-size: var(--card-media-left-size-s)}:host([media-position--laptop="background"]) picture{display:none!important}:host(:not([media-position--mobile="background"],[media-position="background"])) picture:has(source:nth-child(3)[srcset]){display:block}:host([media-position="left"]:not([media-position--laptop="top"])) img,:host([media-position--laptop="left"]) img{height:100%;aspect-ratio:1 / 1;width:var(--card-media-left-size);object-fit:cover}:host([media-position="top"]) img,:host([media-position--laptop="top"]) img{display:block;height:100%;width:100%;aspect-ratio:initial;object-fit:initial}.card{outline-width:var(--px-focus-outline-laptop)}.card:focus-visible{outline-offset:var(--px-focus-offset-laptop)}::slotted([slot="title"]){font-size:var(--px-text-size-heading-xl-laptop)}::slotted([slot="content"]){font-size:var(--px-text-size-body-m-laptop)}img[src=null]{display:none}.media-position-background:not(.media-position-top--laptop,.media-position-left--laptop,.media-position-none--laptop) px-container,.media-position-background--laptop px-container{background-color:transparent}.media-position-background:not(.media-position-top--laptop,.media-position-left--laptop,.media-position-none--laptop):hover px-container,.media-position-background--laptop:hover px-container{background-color:transparent}}:host([inverted]){--card-background-color-inverted: var(--px-color-background-container-light-inverted)}:host([inverted]) .card{color:var(--px-color-text-neutral-inverted);outline-color:var(--px-color-border-focus-outline-inverted)}:host([contrast-helper-gradient]) :is(:host([inverted]) .card .contrast-helper){background-image:linear-gradient(90deg,#000 23.43%,#0000 81.69%)}:host([contrast-helper-overlay]) :is(:host([inverted]) .card .contrast-helper){background-color:#0006}:host([inverted]) .card px-container{background-color:var(--card-background-color-inverted)}:host([inverted]) .card:hover{border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) .card:hover px-container{background-color:var( --px-color-background-state-hover-bordered-inverted )}:host([inverted]) ::slotted([slot="title"]){color:var(--px-color-text-brand-inverted)}:host([inverted]) ::slotted([slot="content"]){color:var(--px-color-text-neutral-inverted)}@media only screen and (max-width: 47.938em){:host([inverted]) .media-position-background:not(.media-position-top--mobile,.media-position-left--mobile,.media-position-none--mobile) px-container,:host([inverted]) .media-position-background--mobile px-container{background-color:transparent}:host([inverted]) .media-position-background:not(.media-position-top--mobile,.media-position-left--mobile,.media-position-none--mobile):hover px-container,:host([inverted]) .media-position-background--mobile:hover px-container{background-color:transparent}}@media only screen and (min-width: 48em) and (max-width: 64em){:host([inverted]) .media-position-background:not(.media-position-top--tablet,.media-position-left--tablet,.media-position-none--tablet) px-container,:host([inverted]) .media-position-background--tablet px-container{background-color:transparent}:host([inverted]) .media-position-background:not(.media-position-top--tablet,.media-position-left--tablet,.media-position-none--tablet):hover px-container,:host([inverted]) .media-position-background--tablet:hover px-container{background-color:transparent}}@media only screen and (min-width: 64.0625em){:host([inverted]) .media-position-background:not(.media-position-top--laptop,.media-position-left--laptop,.media-position-none--laptop) px-container,:host([inverted]) .media-position-background--laptop px-container{background-color:transparent}:host([inverted]) .media-position-background:not(.media-position-top--laptop,.media-position-left--laptop,.media-position-none--laptop):hover px-container,:host([inverted]) .media-position-background--laptop:hover px-container{background-color:transparent}}';
13535
13560
  const styleSheet$6 = new CSSStyleSheet();
13536
13561
  styleSheet$6.replaceSync(styles$6);
13537
13562
  const cardBackgroundColorValues = [
@@ -13541,34 +13566,10 @@ const cardBackgroundColorValues = [
13541
13566
  ];
13542
13567
  const cardPaddingValues = ["", "s", "m", "l"];
13543
13568
  const cardMediaLeftSizeValues = ["", "s", "m"];
13544
- const cardMediaPositionValues = [
13545
- "",
13546
- "none",
13547
- "top",
13548
- "left",
13549
- "background"
13550
- ];
13569
+ const cardMediaPositionValues = ["", "top", "left", "background"];
13551
13570
  const attributeBreakpointCSSSelector = (attributeName, attributeValue, device) => `:host([${attributeName}${device ? `--${device}` : ""}='${attributeValue}']) .card__content`;
13552
13571
  const paddingPrefix = "px-padding";
13553
13572
  const _Card = class _Card extends PxElement {
13554
- template() {
13555
- return `
13556
- <div class="contrast-helper"></div>
13557
- <px-container padding="none" background-color="none" border-radius="none">
13558
- <div class="card__container">
13559
- <div class="card__content">
13560
- <px-vstack gap="default">
13561
- <px-vstack gap="s">
13562
- <slot name="title"></slot>
13563
- <slot name="content"></slot>
13564
- </px-vstack>
13565
- <slot></slot>
13566
- </px-vstack>
13567
- </div>
13568
- </card>
13569
- </px-container>
13570
- `;
13571
- }
13572
13573
  constructor() {
13573
13574
  super(
13574
13575
  styleSheet$6,
@@ -13580,10 +13581,34 @@ const _Card = class _Card extends PxElement {
13580
13581
  "--card__content-padding"
13581
13582
  )
13582
13583
  );
13583
- const $root = document.createElement(this.nativeName);
13584
- $root.classList.add("card");
13585
- $root.innerHTML = this.template();
13586
- this.shadowRoot.appendChild($root);
13584
+ __privateAdd(this, _Card_instances);
13585
+ this.shadowRoot.innerHTML = this.template();
13586
+ }
13587
+ template() {
13588
+ return `
13589
+ <a class="card">
13590
+ <div class="contrast-helper"></div>
13591
+ <px-container padding="none" background-color="none" border-radius="none">
13592
+ <px-stack direction="column" id="stack-container" gap="none">
13593
+ <picture>
13594
+ <source media="(max-width: 48em)" >
13595
+ <source media="(max-width: 64em)" >
13596
+ <source media="(min-width: 64em)" >
13597
+ <img loading="lazy">
13598
+ </picture>
13599
+ <div class="card__content">
13600
+ <px-vstack gap="default">
13601
+ <px-vstack gap="s">
13602
+ <slot name="title"></slot>
13603
+ <slot name="content"></slot>
13604
+ </px-vstack>
13605
+ <slot></slot>
13606
+ </px-vstack>
13607
+ </div>
13608
+ </px-stack>
13609
+ </px-container>
13610
+ </a>
13611
+ `;
13587
13612
  }
13588
13613
  connectedCallback() {
13589
13614
  super.connectedCallback();
@@ -13598,10 +13623,6 @@ const _Card = class _Card extends PxElement {
13598
13623
  "background-position",
13599
13624
  "contrast-helper-gradient",
13600
13625
  "contrast-helper-overlay",
13601
- "media-left-size",
13602
- "media-left-size--mobile",
13603
- "media-left-size--tablet",
13604
- "media-left-size--laptop",
13605
13626
  "media-position",
13606
13627
  "media-position--mobile",
13607
13628
  "media-position--tablet",
@@ -13629,56 +13650,38 @@ const _Card = class _Card extends PxElement {
13629
13650
  }
13630
13651
  break;
13631
13652
  case "background-color":
13632
- this.updateBackgroundColor(
13633
- attrName,
13634
- oldValue,
13635
- newValue,
13636
- cardBackgroundColorValues
13637
- );
13653
+ __privateMethod(this, _Card_instances, updateBackgroundColor_fn).call(this, attrName, oldValue, newValue, cardBackgroundColorValues);
13638
13654
  break;
13639
13655
  case "background-size":
13640
- this.$container.backgroundSize = newValue;
13656
+ this.$container.setAttribute("background-size", newValue);
13641
13657
  break;
13642
13658
  case "background-position":
13643
- this.$container.backgroundPosition = newValue;
13659
+ this.$container.setAttribute("background-position", newValue);
13644
13660
  break;
13645
13661
  case "media-position":
13662
+ __privateMethod(this, _Card_instances, updateMediaPosition_fn).call(this, newValue);
13663
+ break;
13646
13664
  case "media-position--mobile":
13665
+ __privateMethod(this, _Card_instances, updateMediaPosition_fn).call(this, newValue, "mobile");
13666
+ break;
13647
13667
  case "media-position--tablet":
13648
- case "media-position--laptop":
13649
- this.updateMediaPosition(attrName, newValue, cardMediaPositionValues);
13668
+ __privateMethod(this, _Card_instances, updateMediaPosition_fn).call(this, newValue, "tablet");
13650
13669
  break;
13651
- case "media-left-size":
13652
- case "media-left-size--mobile":
13653
- case "media-left-size--tablet":
13654
- case "media-left-size--laptop":
13655
- this.updateMediaLeftSize(
13656
- attrName,
13657
- oldValue,
13658
- newValue,
13659
- cardMediaLeftSizeValues
13660
- );
13670
+ case "media-position--laptop":
13671
+ __privateMethod(this, _Card_instances, updateMediaPosition_fn).call(this, newValue, "laptop");
13661
13672
  break;
13662
13673
  case "media-src":
13674
+ __privateMethod(this, _Card_instances, updateMedia_fn).call(this, newValue);
13675
+ break;
13663
13676
  case "media-src--mobile":
13677
+ __privateMethod(this, _Card_instances, updateMedia_fn).call(this, newValue, "mobile");
13678
+ break;
13664
13679
  case "media-src--tablet":
13665
- case "media-src--laptop": {
13666
- let breakpoint = "";
13667
- if (attrName.includes("--")) {
13668
- breakpoint = attrName.split("--")[1];
13669
- }
13670
- let positionAttr = "media-position";
13671
- if (breakpoint) {
13672
- positionAttr += `--${breakpoint}`;
13673
- }
13674
- const positionValue = this.getAttribute(positionAttr) || this.mediaPosition;
13675
- this.updateMediaPosition(
13676
- positionAttr,
13677
- positionValue,
13678
- cardMediaPositionValues
13679
- );
13680
+ __privateMethod(this, _Card_instances, updateMedia_fn).call(this, newValue, "tablet");
13681
+ break;
13682
+ case "media-src--laptop":
13683
+ __privateMethod(this, _Card_instances, updateMedia_fn).call(this, newValue, "laptop");
13680
13684
  break;
13681
- }
13682
13685
  default:
13683
13686
  super.attributeChangedCallback(attrName, oldValue, newValue);
13684
13687
  break;
@@ -13686,15 +13689,9 @@ const _Card = class _Card extends PxElement {
13686
13689
  }
13687
13690
  }
13688
13691
  configureCard() {
13689
- if (!this.backgroundColor) {
13690
- this.backgroundColor = "container-light";
13691
- }
13692
13692
  if (!this.padding) {
13693
13693
  this.padding = "m";
13694
13694
  }
13695
- if (!this.mediaLeftSize) {
13696
- this.mediaLeftSize = "s";
13697
- }
13698
13695
  if (!this.mediaPosition) {
13699
13696
  this.mediaPosition = "top";
13700
13697
  }
@@ -13707,417 +13704,234 @@ const _Card = class _Card extends PxElement {
13707
13704
  }
13708
13705
  }
13709
13706
  }
13710
- updateMediaPosition(attrName, newValue, attrValue) {
13711
- if (!checkName(attrValue, newValue)) {
13712
- console.error(
13713
- `${newValue} is not an allowed ${attrName} value`,
13714
- this.$el
13715
- );
13716
- return;
13717
- }
13718
- const hasBreakpoint = attrName.includes("--");
13719
- const cssPropertyName = hasBreakpoint ? attrName.split("--")[0] : attrName;
13720
- if (!hasBreakpoint) {
13721
- if (!this.$el.classList.contains(`media-position-${newValue}`)) {
13722
- this.$el.classList.add(`media-position-${newValue}`);
13723
- }
13724
- if (newValue === "top") {
13725
- this.updateMediaPositionTop(cssPropertyName);
13726
- } else if (newValue === "left") {
13727
- this.updateMediaPositionLeft(cssPropertyName);
13728
- } else if (newValue === "background") {
13729
- this.updateMediaPositionBackground(cssPropertyName);
13730
- }
13731
- } else {
13732
- const breakpointName = attrName.split("--")[1];
13733
- if (!this.$el.classList.contains(
13734
- `media-position-${newValue}--${breakpointName}`
13735
- )) {
13736
- this.$el.classList.add(`media-position-${newValue}--${breakpointName}`);
13737
- }
13738
- if (newValue === "top") {
13739
- this.createImgTop(
13740
- breakpointName,
13741
- this.getAttribute(`media-src--${breakpointName}`)
13742
- );
13743
- }
13744
- if (newValue === "left") {
13745
- this.createDivLeft(
13746
- breakpointName,
13747
- this.getAttribute(`media-src--${breakpointName}`)
13748
- );
13749
- }
13750
- if (newValue === "background") {
13751
- this.$container.setAttribute(
13752
- `background-image--${breakpointName}`,
13753
- this.getAttribute(`media-src--${breakpointName}`) || ""
13754
- );
13755
- }
13756
- }
13757
- }
13758
- updateMediaPositionTop(cssPropertyName) {
13759
- if (this.mediaSrc) {
13760
- const img = document.createElement("img");
13761
- img.className = "card__media-top";
13762
- img.src = this.mediaSrc || "";
13763
- img.alt = "";
13764
- ["mobile", "tablet", "laptop"].forEach((device) => {
13765
- if (this.getAttribute(`${cssPropertyName}--${device}`) || !this.getAttribute(`${cssPropertyName}--${device}`) && this.getAttribute(`media-src--${device}`)) {
13766
- img.classList.add(`hidden--${device}`);
13767
- }
13768
- });
13769
- if (this.$cardContainer.querySelector(".card__media-top")) {
13770
- this.$cardContainer.querySelector(".card__media-top").replaceWith(img);
13771
- } else {
13772
- this.$cardContainer.insertBefore(img, this.$cardContainer.firstChild);
13773
- }
13774
- }
13775
- ["laptop", "tablet", "mobile"].forEach((device) => {
13776
- if (!this.getAttribute(`${cssPropertyName}--${device}`) && this.getAttribute(`media-src--${device}`)) {
13777
- this.createImgTop(device, this.getAttribute(`media-src--${device}`));
13778
- }
13779
- });
13780
- }
13781
- updateMediaPositionLeft(cssPropertyName) {
13782
- if (this.mediaSrc) {
13783
- const div = document.createElement("div");
13784
- div.className = "card__media-left";
13785
- div.style.backgroundImage = `url(${this.mediaSrc || ""})`;
13786
- ["mobile", "tablet", "laptop"].forEach((device) => {
13787
- if (this.getAttribute(`${cssPropertyName}--${device}`) || !this.getAttribute(`${cssPropertyName}--${device}`) && this.getAttribute(`media-src--${device}`)) {
13788
- div.classList.add(`hidden--${device}`);
13789
- }
13790
- });
13791
- if (this.$cardContainer.querySelector(".card__media-left")) {
13792
- this.$cardContainer.querySelector(".card__media-left").replaceWith(div);
13793
- } else {
13794
- this.$cardContainer.insertBefore(div, this.$cardContainer.firstChild);
13795
- }
13796
- }
13797
- ["laptop", "tablet", "mobile"].forEach((device) => {
13798
- if (!this.getAttribute(`${cssPropertyName}--${device}`) && this.getAttribute(`media-src--${device}`)) {
13799
- this.createDivLeft(device, this.getAttribute(`media-src--${device}`));
13800
- }
13801
- });
13802
- }
13803
- updateMediaPositionBackground(cssPropertyName) {
13804
- if (this.mediaSrc) {
13805
- this.$container.setAttribute(
13806
- "background-image--mobile",
13807
- this.mediaSrc || ""
13808
- );
13809
- this.$container.setAttribute(
13810
- "background-image--tablet",
13811
- this.mediaSrc || ""
13812
- );
13813
- this.$container.setAttribute(
13814
- "background-image--laptop",
13815
- this.mediaSrc || ""
13816
- );
13817
- ["mobile", "tablet", "laptop"].forEach((device) => {
13818
- const mediaSrcDevice = this.getAttribute(`media-src--${device}`);
13819
- const hasBreakpoint = this.getAttribute(
13820
- `${cssPropertyName}--${device}`
13821
- );
13822
- if (mediaSrcDevice && !hasBreakpoint) {
13823
- this.$container.setAttribute(
13824
- `background-image--${device}`,
13825
- mediaSrcDevice
13826
- );
13827
- } else if (hasBreakpoint) {
13828
- this.$container.removeAttribute(`background-image--${device}`);
13829
- }
13830
- });
13831
- } else {
13832
- ["mobile", "tablet", "laptop"].forEach((device) => {
13833
- if (!this.getAttribute(`${cssPropertyName}--${device}`) && this.getAttribute(`media-src--${device}`)) {
13834
- this.$container.setAttribute(
13835
- `background-image--${device}`,
13836
- this.getAttribute(`media-src--${device}`)
13837
- );
13838
- }
13839
- });
13840
- }
13707
+ get $children() {
13708
+ return this.querySelectorAll("px-card > *");
13841
13709
  }
13842
- createImgTop(device, src) {
13843
- const img = document.createElement("img");
13844
- img.className = `card__media-top--${device}`;
13845
- img.src = src || "";
13846
- img.classList.add(`shown--${device}`);
13847
- img.alt = "";
13848
- if (this.$cardContainer.querySelector(`.card__media-top--${device}`)) {
13849
- this.$cardContainer.querySelector(`.card__media-top--${device}`).replaceWith(img);
13850
- } else {
13851
- this.$cardContainer.insertBefore(img, this.$cardContainer.firstChild);
13852
- }
13710
+ get $img() {
13711
+ return this.shadowRoot.querySelector("picture > img");
13853
13712
  }
13854
- createDivLeft(device, src) {
13855
- const div = document.createElement("div");
13856
- div.className = `card__media-left--${device}`;
13857
- div.style.backgroundImage = `url(${src || ""})`;
13858
- div.classList.add(`shown--${device}`);
13859
- if (this.$cardContainer.querySelector(`.card__media-left--${device}`)) {
13860
- this.$cardContainer.querySelector(`.card__media-left--${device}`).replaceWith(div);
13861
- } else {
13862
- this.$cardContainer.insertBefore(div, this.$cardContainer.firstChild);
13863
- }
13713
+ get $pictureSourceMobile() {
13714
+ return this.shadowRoot.querySelector(
13715
+ "picture > source:nth-child(1)"
13716
+ );
13864
13717
  }
13865
- updateBackgroundColor(attrName, oldValue, newValue, attrValue) {
13866
- if (!checkName(attrValue, newValue)) {
13867
- console.error(
13868
- `${newValue} is not an allowed ${attrName} value`,
13869
- this.$el
13870
- );
13871
- return;
13872
- }
13873
- const updateBackgroundColorStyle = (value) => {
13874
- if (value !== null && value !== "" && value !== "default") {
13875
- this.$el.style.setProperty(
13876
- `--card-background-color-default`,
13877
- `var(--px-color-background-${value}-default)`
13878
- );
13879
- this.$el.style.setProperty(
13880
- `--card-background-color-inverted`,
13881
- `var(--px-color-background-${value}-inverted)`
13882
- );
13883
- }
13884
- };
13885
- updateBackgroundColorStyle(oldValue);
13886
- updateBackgroundColorStyle(newValue);
13718
+ get $pictureSourceTablet() {
13719
+ return this.shadowRoot.querySelector(
13720
+ "picture > source:nth-child(2)"
13721
+ );
13887
13722
  }
13888
- updateMediaLeftSize(attrName, oldValue, newValue, attrValue) {
13889
- if (!checkName(attrValue, newValue)) {
13890
- console.error(
13891
- `${newValue} is not an allowed ${attrName} value`,
13892
- this.$el
13893
- );
13894
- return;
13895
- }
13896
- const updateMediaLeftSizeStyle = (breakpoint, value) => {
13897
- if (value !== null && value !== "") {
13898
- let sizeValue = "";
13899
- if (value === "s") {
13900
- sizeValue = "120px";
13901
- }
13902
- if (value === "m") {
13903
- sizeValue = "240px";
13904
- }
13905
- this.$el.style.setProperty(
13906
- `--card-media-left-size${breakpoint ? `--${breakpoint}` : ""}`,
13907
- sizeValue
13908
- );
13909
- }
13910
- };
13911
- const hasBreakpoint = attrName.includes("--");
13912
- if (hasBreakpoint) {
13913
- const breakpoint = attrName.split("--")[1];
13914
- updateMediaLeftSizeStyle(breakpoint, oldValue);
13915
- updateMediaLeftSizeStyle(breakpoint, newValue);
13916
- } else {
13917
- updateMediaLeftSizeStyle("", oldValue);
13918
- updateMediaLeftSizeStyle("", newValue);
13919
- }
13723
+ get $pictureSourceLaptop() {
13724
+ return this.shadowRoot.querySelector(
13725
+ "picture > source:nth-child(3)"
13726
+ );
13920
13727
  }
13921
- get $children() {
13922
- return this.querySelectorAll("px-card > *");
13728
+ get $stackContainer() {
13729
+ return this.shadowRoot.querySelector("#stack-container");
13923
13730
  }
13924
13731
  get $container() {
13925
13732
  return this.shadowRoot.querySelector("px-container");
13926
13733
  }
13927
- get $cardContainer() {
13928
- return this.shadowRoot.querySelector(".card__container");
13929
- }
13930
13734
  get inverted() {
13931
13735
  return this.hasAttribute("inverted");
13932
13736
  }
13933
13737
  set inverted(value) {
13934
- if (value) {
13935
- this.setAttribute("inverted", "");
13936
- } else {
13937
- this.removeAttribute("inverted");
13938
- }
13738
+ super._updateBooleanAttribute("inverted", value);
13939
13739
  }
13940
13740
  get backgroundColor() {
13941
13741
  return this.getAttribute("background-color");
13942
13742
  }
13943
13743
  set backgroundColor(value) {
13944
- if (value) {
13945
- this.setAttribute("background-color", value);
13946
- } else {
13947
- this.removeAttribute("background-color");
13948
- }
13744
+ super._updateAttribute("background-color", value);
13949
13745
  }
13950
13746
  get backgroundSize() {
13951
13747
  return this.getAttribute("background-size");
13952
13748
  }
13953
13749
  set backgroundSize(value) {
13954
- if (value) {
13955
- this.setAttribute("background-size", value);
13956
- } else {
13957
- this.removeAttribute("background-size");
13958
- }
13750
+ super._updateAttribute("background-size", value);
13959
13751
  }
13960
13752
  get backgroundPosition() {
13961
13753
  return this.getAttribute("background-position");
13962
13754
  }
13963
13755
  set backgroundPosition(value) {
13964
- if (value) {
13965
- this.setAttribute("background-position", value);
13966
- } else {
13967
- this.removeAttribute("background-position");
13968
- }
13756
+ super._updateAttribute("background-position", value);
13969
13757
  }
13970
13758
  get padding() {
13971
13759
  return this.getAttribute("padding");
13972
13760
  }
13973
13761
  set padding(value) {
13974
- if (value) {
13975
- this.setAttribute("padding", value);
13976
- } else {
13977
- this.removeAttribute("padding");
13978
- }
13762
+ super._updateAttribute("padding", value);
13979
13763
  }
13980
13764
  get gradientContrastHelper() {
13981
13765
  return this.hasAttribute("contrast-helper-gradient");
13982
13766
  }
13983
13767
  set gradientContrastHelper(value) {
13984
- if (value) {
13985
- this.setAttribute("contrast-helper-gradient", "");
13986
- } else {
13987
- this.removeAttribute("contrast-helper-gradient");
13988
- }
13768
+ super._updateBooleanAttribute("contrast-helper-gradient", value);
13989
13769
  }
13990
13770
  get overlayContrastHelper() {
13991
13771
  return this.hasAttribute("contrast-helper-overlay");
13992
13772
  }
13993
13773
  set overlayContrastHelper(value) {
13994
- if (value) {
13995
- this.setAttribute("contrast-helper-overlay", "");
13996
- } else {
13997
- this.removeAttribute("contrast-helper-overlay");
13998
- }
13774
+ super._updateBooleanAttribute("contrast-helper-overlay", value);
13999
13775
  }
14000
13776
  get mediaLeftSize() {
14001
13777
  return this.getAttribute("media-left-size");
14002
13778
  }
14003
13779
  set mediaLeftSize(value) {
14004
- if (value) {
14005
- this.setAttribute("media-left-size", value);
14006
- } else {
14007
- this.removeAttribute("media-left-size");
14008
- }
13780
+ super._updateAttribute("media-left-size", value);
14009
13781
  }
14010
13782
  get mediaLeftSizeMobile() {
14011
13783
  return this.getAttribute("media-left-size--mobile");
14012
13784
  }
14013
13785
  set mediaLeftSizeMobile(value) {
14014
- if (value) {
14015
- this.setAttribute("media-left-size--mobile", value);
14016
- } else {
14017
- this.removeAttribute("media-left-size--mobile");
14018
- }
13786
+ super._updateAttribute("media-left-size--mobile", value);
14019
13787
  }
14020
13788
  get mediaLeftSizeTablet() {
14021
13789
  return this.getAttribute("media-left-size--tablet");
14022
13790
  }
14023
13791
  set mediaLeftSizeTablet(value) {
14024
- if (value) {
14025
- this.setAttribute("media-left-size--tablet", value);
14026
- } else {
14027
- this.removeAttribute("media-left-size--tablet");
14028
- }
13792
+ super._updateAttribute("media-left-size--tablet", value);
14029
13793
  }
14030
13794
  get mediaLeftSizeLaptop() {
14031
13795
  return this.getAttribute("media-left-size--laptop");
14032
13796
  }
14033
13797
  set mediaLeftSizeLaptop(value) {
14034
- if (value) {
14035
- this.setAttribute("media-left-size--laptop", value);
14036
- } else {
14037
- this.removeAttribute("media-left-size--laptop");
14038
- }
13798
+ super._updateAttribute("media-left-size--laptop", value);
14039
13799
  }
14040
13800
  get mediaPosition() {
14041
13801
  return this.getAttribute("media-position");
14042
13802
  }
14043
13803
  set mediaPosition(value) {
14044
- if (value) {
14045
- this.setAttribute("media-position", value);
14046
- } else {
14047
- this.removeAttribute("media-position");
14048
- }
13804
+ super._updateAttribute("media-position", value);
14049
13805
  }
14050
13806
  get mediaPositionMobile() {
14051
13807
  return this.getAttribute("media-position--mobile");
14052
13808
  }
14053
13809
  set mediaPositionMobile(value) {
14054
- if (value) {
14055
- this.setAttribute("media-position--mobile", value);
14056
- } else {
14057
- this.removeAttribute("media-position--mobile");
14058
- }
13810
+ super._updateAttribute("media-position--mobile", value);
14059
13811
  }
14060
13812
  get mediaPositionTablet() {
14061
13813
  return this.getAttribute("media-position--tablet");
14062
13814
  }
14063
13815
  set mediaPositionTablet(value) {
14064
- if (value) {
14065
- this.setAttribute("media-position--tablet", value);
14066
- } else {
14067
- this.removeAttribute("media-position--tablet");
14068
- }
13816
+ super._updateAttribute("media-position--tablet", value);
14069
13817
  }
14070
13818
  get mediaPositionLaptop() {
14071
13819
  return this.getAttribute("media-position--laptop");
14072
13820
  }
14073
13821
  set mediaPositionLaptop(value) {
14074
- if (value) {
14075
- this.setAttribute("media-position--laptop", value);
14076
- } else {
14077
- this.removeAttribute("media-position--laptop");
14078
- }
13822
+ super._updateAttribute("media-position--laptop", value);
14079
13823
  }
14080
13824
  get mediaSrc() {
14081
13825
  return this.getAttribute("media-src");
14082
13826
  }
14083
13827
  set mediaSrc(value) {
14084
- if (value) {
14085
- this.setAttribute("media-src", value);
14086
- } else {
14087
- this.removeAttribute("media-src");
14088
- }
13828
+ super._updateAttribute("media-src", value);
14089
13829
  }
14090
13830
  get mediaSrcMobile() {
14091
13831
  return this.getAttribute("media-src--mobile");
14092
13832
  }
14093
13833
  set mediaSrcMobile(value) {
14094
- if (value) {
14095
- this.setAttribute("media-src--mobile", value);
14096
- } else {
14097
- this.removeAttribute("media-src--mobile");
14098
- }
13834
+ super._updateAttribute("media-src--mobile", value);
14099
13835
  }
14100
13836
  get mediaSrcTablet() {
14101
13837
  return this.getAttribute("media-src--tablet");
14102
13838
  }
14103
13839
  set mediaSrcTablet(value) {
14104
- if (value) {
14105
- this.setAttribute("media-src--tablet", value);
14106
- } else {
14107
- this.removeAttribute("media-src--tablet");
14108
- }
13840
+ super._updateAttribute("media-src--tablet", value);
14109
13841
  }
14110
13842
  get mediaSrcLaptop() {
14111
13843
  return this.getAttribute("media-src--laptop");
14112
13844
  }
14113
13845
  set mediaSrcLaptop(value) {
14114
- if (value) {
14115
- this.setAttribute("media-src--laptop", value);
13846
+ super._updateAttribute("media-src--laptop", value);
13847
+ }
13848
+ };
13849
+ _Card_instances = new WeakSet();
13850
+ updateMediaPosition_fn = function(newValue, screenSize) {
13851
+ const attributeName = screenSize ? `direction--${screenSize}` : "direction";
13852
+ if (newValue === "left") {
13853
+ this.$stackContainer.setAttribute(attributeName, "row");
13854
+ if (screenSize === "laptop") {
13855
+ this.$stackContainer.setAttribute("direction--desktop", "row");
13856
+ } else {
13857
+ this.$stackContainer.removeAttribute("direction--desktop");
13858
+ }
13859
+ } else if (newValue === "top" || newValue === "null") {
13860
+ this.$stackContainer.setAttribute(attributeName, "column");
13861
+ if (screenSize === "laptop") {
13862
+ this.$stackContainer.setAttribute("direction--desktop", "column");
14116
13863
  } else {
14117
- this.removeAttribute("media-src--laptop");
13864
+ this.$stackContainer.removeAttribute("direction--desktop");
14118
13865
  }
14119
13866
  }
14120
13867
  };
13868
+ updateMedia_fn = function(newValue, screenSize) {
13869
+ var _a, _b, _c, _d, _e, _f, _g, _h;
13870
+ switch (screenSize) {
13871
+ case "mobile":
13872
+ if (this.mediaPosition === "background" || this.mediaPositionMobile === "background") {
13873
+ this.$container.setAttribute("background-image--mobile", newValue);
13874
+ }
13875
+ if (newValue) {
13876
+ (_a = this.$pictureSourceMobile) == null ? void 0 : _a.setAttribute("srcset", newValue);
13877
+ } else {
13878
+ (_b = this.$pictureSourceMobile) == null ? void 0 : _b.removeAttribute("srcset");
13879
+ }
13880
+ break;
13881
+ case "tablet":
13882
+ if (this.mediaPosition === "background" || this.mediaPositionTablet === "background") {
13883
+ this.$container.setAttribute("background-image--tablet", newValue);
13884
+ }
13885
+ if (newValue) {
13886
+ (_c = this.$pictureSourceTablet) == null ? void 0 : _c.setAttribute("srcset", newValue);
13887
+ } else {
13888
+ (_d = this.$pictureSourceTablet) == null ? void 0 : _d.removeAttribute("srcset");
13889
+ }
13890
+ break;
13891
+ case "laptop":
13892
+ if (this.mediaPosition === "background" || this.mediaPositionLaptop === "background") {
13893
+ this.$container.setAttribute("background-image--laptop", newValue);
13894
+ }
13895
+ if (newValue) {
13896
+ (_e = this.$pictureSourceLaptop) == null ? void 0 : _e.setAttribute("srcset", newValue);
13897
+ } else {
13898
+ (_f = this.$pictureSourceLaptop) == null ? void 0 : _f.removeAttribute("srcset");
13899
+ }
13900
+ break;
13901
+ default:
13902
+ if (this.mediaPosition === "background") {
13903
+ this.$container.setAttribute("background-image", newValue);
13904
+ }
13905
+ if (newValue) {
13906
+ (_g = this.$img) == null ? void 0 : _g.setAttribute("src", newValue);
13907
+ } else {
13908
+ (_h = this.$img) == null ? void 0 : _h.removeAttribute("src");
13909
+ }
13910
+ }
13911
+ };
13912
+ updateBackgroundColor_fn = function(attrName, oldValue, newValue, attrValue) {
13913
+ if (!checkName(attrValue, newValue)) {
13914
+ console.error(
13915
+ `${newValue} is not an allowed ${attrName} value`,
13916
+ this.$el
13917
+ );
13918
+ return;
13919
+ }
13920
+ const updateBackgroundColorStyle = (value) => {
13921
+ if (value !== null && value !== "" && value !== "default") {
13922
+ this.$el.style.setProperty(
13923
+ `--card-background-color-default`,
13924
+ `var(--px-color-background-${value}-default)`
13925
+ );
13926
+ this.$el.style.setProperty(
13927
+ `--card-background-color-inverted`,
13928
+ `var(--px-color-background-${value}-inverted)`
13929
+ );
13930
+ }
13931
+ };
13932
+ updateBackgroundColorStyle(oldValue);
13933
+ updateBackgroundColorStyle(newValue);
13934
+ };
14121
13935
  _Card.nativeName = "a";
14122
13936
  let Card = _Card;
14123
13937
  if (!customElements.get("px-card")) {