@proximus/lavender 1.4.5-alpha.9 → 1.4.5-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lavender.cjs.js +1 -1
- package/dist/lavender.es.js +527 -289
- package/dist/lavender.umd.js +1 -1
- package/package.json +1 -1
package/dist/lavender.es.js
CHANGED
|
@@ -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, _Card_instances, updateMediaPosition_fn, updateMedia_fn, updateBackgroundColor_fn, _Dropdown_instances, resetManualPopoverDisplay_fn, _onTriggerClick, _beforeToggle, _onToggle, handleManualPopoverDisplay_fn, _onResize, _Header_instances, setMDDDialogOffset_fn, togglePanel_fn, showMobileMenu_fn, hideMobileMenu_fn, hidePanel_fn, $mobileMenu_get, $navigationItems_get, $headerWrapper_get, $megaDropdowns_get, _template2, _HeaderMobileMenu_instances, createMobileMenuPanelDropDowns_fn, _Select_instances, updateOptions_fn, _mutationObserver, _MegaDropDown_instances, $backButton_get, $title_get, $footer_get, $closeButtons_get;
|
|
9
|
+
var _src, _internals, _template, _Card_instances, updateMediaPosition_fn, updateMedia_fn, updateBackgroundColor_fn, _Dropdown_instances, resetManualPopoverDisplay_fn, _onTriggerClick, _beforeToggle, _onToggle, handleManualPopoverDisplay_fn, _onResize, _Header_instances, setMDDDialogOffset_fn, togglePanel_fn, showMobileMenu_fn, hideMobileMenu_fn, hidePanel_fn, $mobileMenu_get, $navigationItems_get, $headerWrapper_get, $megaDropdowns_get, _template2, _HeaderMobileMenu_instances, createMobileMenuPanelDropDowns_fn, _Select_instances, updateOptions_fn, _mutationObserver, _MegaDropDown_instances, $backButton_get, $title_get, $footer_get, $closeButtons_get, _Tabs_instances, handleInverted_fn, handleHideControls_fn;
|
|
10
10
|
const styles$K = ':host{display:block}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-mobile) - var(--host-gap--mobile))}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile))}.flex-container{display:flex;height:100%;width:100%;box-sizing:border-box;flex-direction:var(--flex-direction--mobile-value);gap:var(--flex-gap--mobile-value);flex-wrap:var(--flex-wrap--mobile-value);justify-content:var(--flex-justify-content--mobile-value);align-items:var(--flex-align-items--mobile-value);overflow-x:var(--overflow-x-all)}@media only screen and (max-width: 47.9375em){.flex-container{overflow-x:var(--overflow-x-all-mobile, var(--overflow-x-all));scrollbar-width:none}.flex-container::-webkit-scrollbar{display:none}}@media only screen and (min-width: 48em){.flex-container{flex-direction:var(--flex-direction--tablet-value);gap:var(--flex-gap--tablet-value);flex-wrap:var(--flex-wrap--tablet-value);justify-content:var(--flex-justify-content--tablet-value);align-items:var(--flex-align-items--tablet-value)}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-tablet) - var(--host-gap--tablet))}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet))}}@media only screen and (min-width: 48em) and (max-width: 64em){.flex-container{overflow-x:var(--overflow-x-all-tablet, var(--overflow-x-all));scrollbar-width:none}.flex-container::-webkit-scrollbar{display:none}}@media only screen and (min-width: 64.0625em){.flex-container{flex-direction:var(--flex-direction--laptop-value);gap:var(--flex-gap--laptop-value);flex-wrap:var(--flex-wrap--laptop-value);justify-content:var(--flex-justify-content--laptop-value);align-items:var(--flex-align-items--laptop-value)}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-laptop) - var(--host-gap--laptop))}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-laptop) + var(--px-focus-offset-laptop)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-laptop) + var(--px-focus-offset-laptop))}}@media only screen and (min-width: 64.0625em) and (max-width: 90em){.flex-container{overflow-x:var(--overflow-x-all-laptop, var(--overflow-x-all))}}@media only screen and (min-width: 90.0625em){.flex-container{flex-direction:var(--flex-direction--desktop-value);gap:var(--flex-gap--desktop-value);flex-wrap:var(--flex-wrap--desktop-value);justify-content:var(--flex-justify-content--desktop-value);align-items:var(--flex-align-items--desktop-value);overflow-x:var(--overflow-x-all-desktop, var(--overflow-x-all))}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-desktop) - var(--host-gap--desktop))}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop))}}';
|
|
11
11
|
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}}";
|
|
12
12
|
const __vite_import_meta_env__ = {};
|
|
@@ -168,7 +168,6 @@ class WithExtraAttributes extends HTMLElement {
|
|
|
168
168
|
log(
|
|
169
169
|
`${newValue} is not an allowed ${attrValue} value for ${this.tagName.toLowerCase()}`
|
|
170
170
|
);
|
|
171
|
-
return;
|
|
172
171
|
}
|
|
173
172
|
}
|
|
174
173
|
const hasBreakpoint = name.indexOf("--") > -1;
|
|
@@ -718,7 +717,7 @@ const backgroundColorValues = [
|
|
|
718
717
|
"purpose-info",
|
|
719
718
|
"purpose-eco",
|
|
720
719
|
"purpose-notification",
|
|
721
|
-
"footer"
|
|
720
|
+
"footer-sitemap"
|
|
722
721
|
];
|
|
723
722
|
const backgroundSizeValues = ["", "cover", "contain", "default"];
|
|
724
723
|
const boxShadowValues = ["", "none", "s", "m", "l", "xl"];
|
|
@@ -833,43 +832,44 @@ function getViewportFormat() {
|
|
|
833
832
|
function checkName(values, value) {
|
|
834
833
|
return values.includes(value);
|
|
835
834
|
}
|
|
835
|
+
const accessibilityAttributes = [
|
|
836
|
+
"aria-label",
|
|
837
|
+
"aria-labelledby",
|
|
838
|
+
"aria-describedby",
|
|
839
|
+
"aria-controls",
|
|
840
|
+
"aria-expanded",
|
|
841
|
+
"aria-haspopup",
|
|
842
|
+
"aria-pressed",
|
|
843
|
+
"aria-selected",
|
|
844
|
+
"aria-required",
|
|
845
|
+
"aria-disabled",
|
|
846
|
+
"aria-live",
|
|
847
|
+
"aria-atomic",
|
|
848
|
+
"aria-relevant",
|
|
849
|
+
"aria-orientation",
|
|
850
|
+
"aria-valuenow",
|
|
851
|
+
"aria-valuetext",
|
|
852
|
+
"aria-valuemin",
|
|
853
|
+
"aria-valuemax",
|
|
854
|
+
"aria-details",
|
|
855
|
+
"aria-modal",
|
|
856
|
+
"aria-autocomplete",
|
|
857
|
+
"aria-activedescendant",
|
|
858
|
+
"aria-colcount",
|
|
859
|
+
"aria-colindex",
|
|
860
|
+
"aria-colspan",
|
|
861
|
+
"aria-rowcount",
|
|
862
|
+
"aria-rowindex",
|
|
863
|
+
"aria-rowspan",
|
|
864
|
+
"aria-keyshortcuts",
|
|
865
|
+
"aria-placeholder",
|
|
866
|
+
"aria-invalid",
|
|
867
|
+
"aria-busy",
|
|
868
|
+
"aria-owns"
|
|
869
|
+
];
|
|
836
870
|
function transferAccessibilityAttributes(sourceElement, targetElement, applyLabelledBy = true) {
|
|
837
871
|
var _a;
|
|
838
|
-
|
|
839
|
-
"aria-label",
|
|
840
|
-
"aria-labelledby",
|
|
841
|
-
"aria-describedby",
|
|
842
|
-
"aria-controls",
|
|
843
|
-
"aria-expanded",
|
|
844
|
-
"aria-haspopup",
|
|
845
|
-
"aria-pressed",
|
|
846
|
-
"aria-selected",
|
|
847
|
-
"aria-required",
|
|
848
|
-
"aria-disabled",
|
|
849
|
-
"aria-live",
|
|
850
|
-
"aria-atomic",
|
|
851
|
-
"aria-relevant",
|
|
852
|
-
"aria-orientation",
|
|
853
|
-
"aria-valuenow",
|
|
854
|
-
"aria-valuetext",
|
|
855
|
-
"aria-valuemin",
|
|
856
|
-
"aria-valuemax",
|
|
857
|
-
"aria-details",
|
|
858
|
-
"aria-modal",
|
|
859
|
-
"aria-autocomplete",
|
|
860
|
-
"aria-activedescendant",
|
|
861
|
-
"aria-colcount",
|
|
862
|
-
"aria-colindex",
|
|
863
|
-
"aria-colspan",
|
|
864
|
-
"aria-rowcount",
|
|
865
|
-
"aria-rowindex",
|
|
866
|
-
"aria-rowspan",
|
|
867
|
-
"aria-keyshortcuts",
|
|
868
|
-
"aria-placeholder",
|
|
869
|
-
"aria-invalid",
|
|
870
|
-
"aria-busy",
|
|
871
|
-
"aria-owns"
|
|
872
|
-
].forEach((attr) => {
|
|
872
|
+
accessibilityAttributes.forEach((attr) => {
|
|
873
873
|
if (sourceElement.getAttribute(attr)) {
|
|
874
874
|
targetElement.setAttribute(attr, sourceElement.getAttribute(attr));
|
|
875
875
|
sourceElement.removeAttribute(attr);
|
|
@@ -1997,15 +1997,6 @@ const iconColorValuesKC = ["Inherit", ...iconColorValues].map(
|
|
|
1997
1997
|
const styles$I = ":host{display:inline-flex;flex-direction:column;justify-content:center}svg{font-size:var(--px-size-icon-s);line-height:var(--px-font-line-height-xs);width:1em;height:1em;color:var(--px-color-icon-accent-default)}.inherit{color:inherit}.brand{color:var(--px-color-icon-brand-default)}.accent{color:var(--px-color-icon-accent-default)}.neutral{color:var(--px-color-icon-neutral-default)}.dimmed{color:var(--px-color-icon-dimmed-default)}.purpose-success{color:var(--px-color-icon-purpose-success-default)}.purpose-warning{color:var(--px-color-icon-purpose-warning-default)}.purpose-error{color:var(--px-color-icon-purpose-error-default)}.purpose-unlimited{color:var(--px-color-icon-purpose-unlimited-default)}.purpose-promo{color:var(--px-color-icon-purpose-promo-default)}.state-hover:hover{color:var(--px-color-icon-state-hover-default)}.state-active:active{color:var(--px-color-icon-state-active-default)}.state-disabled{color:var(--px-color-icon-state-disabled-default)}:host([inverted]) svg{color:var(--px-color-icon-accent-inverted)}:host([inverted]) .inherit{color:inherit}:host([inverted]) .brand{color:var(--px-color-icon-brand-inverted)}:host([inverted]) .accent{color:var(--px-color-icon-accent-inverted)}:host([inverted]) .neutral{color:var(--px-color-icon-neutral-inverted)}:host([inverted]) .dimmed{color:var(--px-color-icon-dimmed-inverted)}:host([inverted]) .purpose-success{color:var(--px-color-icon-purpose-success-inverted)}:host([inverted]) .purpose-warning{color:var(--px-color-icon-purpose-warning-inverted)}:host([inverted]) .purpose-error{color:var(--px-color-icon-purpose-error-inverted)}:host([inverted]) .purpose-unlimited{color:var(--px-color-icon-purpose-unlimited-inverted)}:host([inverted]) .purpose-promo{color:var(--px-color-icon-purpose-promo-inverted)}:host([inverted]) .state-hover:hover{color:var(--px-color-icon-state-hover-inverted)}:host([inverted]) .state-active:active{color:var(--px-color-icon-state-active-inverted)}:host([inverted]) .state-disabled{color:var(--px-color-icon-state-disabled-inverted)}.size-xs{font-size:var(--px-size-icon-xs)}.size-s{font-size:var(--px-size-icon-s)}.size-m{font-size:var(--px-size-icon-m)}.size-l{font-size:var(--px-size-icon-l)}.size-xl{font-size:var(--px-size-icon-xl)}";
|
|
1998
1998
|
const styleSheet$A = new CSSStyleSheet();
|
|
1999
1999
|
styleSheet$A.replaceSync(styles$I);
|
|
2000
|
-
const observedAttributes = [
|
|
2001
|
-
"name",
|
|
2002
|
-
"size",
|
|
2003
|
-
"color",
|
|
2004
|
-
"aria-label",
|
|
2005
|
-
"inverted",
|
|
2006
|
-
"from",
|
|
2007
|
-
"disabled"
|
|
2008
|
-
];
|
|
2009
2000
|
class Icon extends WithExtraAttributes {
|
|
2010
2001
|
constructor(...styleSheets) {
|
|
2011
2002
|
var _a;
|
|
@@ -2013,7 +2004,7 @@ class Icon extends WithExtraAttributes {
|
|
|
2013
2004
|
__privateAdd(this, _src);
|
|
2014
2005
|
__privateAdd(this, _internals);
|
|
2015
2006
|
__privateAdd(this, _template, () => `<svg aria-hidden="true">
|
|
2016
|
-
<use
|
|
2007
|
+
<use></use>
|
|
2017
2008
|
</svg>`);
|
|
2018
2009
|
this.shadowRoot.innerHTML = __privateGet(this, _template).call(this);
|
|
2019
2010
|
__privateSet(this, _internals, (_a = this.attachInternals) == null ? void 0 : _a.call(this));
|
|
@@ -2022,7 +2013,16 @@ class Icon extends WithExtraAttributes {
|
|
|
2022
2013
|
}
|
|
2023
2014
|
}
|
|
2024
2015
|
static get observedAttributes() {
|
|
2025
|
-
return [
|
|
2016
|
+
return [
|
|
2017
|
+
...super.observedAttributes,
|
|
2018
|
+
"name",
|
|
2019
|
+
"size",
|
|
2020
|
+
"color",
|
|
2021
|
+
"aria-label",
|
|
2022
|
+
"inverted",
|
|
2023
|
+
"from",
|
|
2024
|
+
"disabled"
|
|
2025
|
+
];
|
|
2026
2026
|
}
|
|
2027
2027
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
2028
2028
|
if (oldValue !== newValue) {
|
|
@@ -2056,12 +2056,6 @@ class Icon extends WithExtraAttributes {
|
|
|
2056
2056
|
}
|
|
2057
2057
|
connectedCallback() {
|
|
2058
2058
|
this.role = "img";
|
|
2059
|
-
if (this.name) {
|
|
2060
|
-
this.$el.firstElementChild.setAttribute(
|
|
2061
|
-
"xlink:href",
|
|
2062
|
-
`#icon-${this.name}`
|
|
2063
|
-
);
|
|
2064
|
-
}
|
|
2065
2059
|
const iconSet = document.querySelectorAll("px-icon-set");
|
|
2066
2060
|
if (!iconSet) {
|
|
2067
2061
|
console.log("<px-icon-set> component not found");
|
|
@@ -2074,7 +2068,7 @@ class Icon extends WithExtraAttributes {
|
|
|
2074
2068
|
if (icon.getAttribute("name") === this.from && icon.getAttribute("type") !== "font") {
|
|
2075
2069
|
__privateSet(this, _src, icon.getAttribute("src"));
|
|
2076
2070
|
this.$el.firstElementChild.setAttribute(
|
|
2077
|
-
"
|
|
2071
|
+
"href",
|
|
2078
2072
|
`${__privateGet(this, _src)}#icon-${this.name}`
|
|
2079
2073
|
);
|
|
2080
2074
|
}
|
|
@@ -2108,7 +2102,7 @@ class Icon extends WithExtraAttributes {
|
|
|
2108
2102
|
updateName(oldValue, newValue) {
|
|
2109
2103
|
if (__privateGet(this, _src)) {
|
|
2110
2104
|
this.$el.firstElementChild.setAttribute(
|
|
2111
|
-
"
|
|
2105
|
+
"href",
|
|
2112
2106
|
`${__privateGet(this, _src)}#icon-${newValue}`
|
|
2113
2107
|
);
|
|
2114
2108
|
}
|
|
@@ -2276,9 +2270,15 @@ let Span = _Span;
|
|
|
2276
2270
|
if (!customElements.get("px-span")) {
|
|
2277
2271
|
customElements.define("px-span", Span);
|
|
2278
2272
|
}
|
|
2279
|
-
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%}.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)) ) )}}@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)) ) )}.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}}';
|
|
2273
|
+
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}}';
|
|
2280
2274
|
const containerStyles = new CSSStyleSheet();
|
|
2281
2275
|
containerStyles.replaceSync(containerCss);
|
|
2276
|
+
const anchorSpacingValues = [
|
|
2277
|
+
"has-patch",
|
|
2278
|
+
"neighbor-has-patch",
|
|
2279
|
+
"has-ribbon",
|
|
2280
|
+
"neighbor-has-ribbon"
|
|
2281
|
+
];
|
|
2282
2282
|
const attributeBreakpointCSSSelector$3 = (attributeName, attributeValue, device) => `:host([${attributeName}${device ? `--${device}` : ""}='${attributeValue}']) .container`;
|
|
2283
2283
|
const paddingPrefix$1 = "px-padding";
|
|
2284
2284
|
const containerBreakpoints = [
|
|
@@ -2371,6 +2371,7 @@ const _Container = class _Container extends VerticallyExtendedElement {
|
|
|
2371
2371
|
"background-position",
|
|
2372
2372
|
"box-shadow",
|
|
2373
2373
|
"anchor-offset",
|
|
2374
|
+
"anchor-spacing",
|
|
2374
2375
|
"inverted"
|
|
2375
2376
|
];
|
|
2376
2377
|
}
|
|
@@ -2488,6 +2489,9 @@ const _Container = class _Container extends VerticallyExtendedElement {
|
|
|
2488
2489
|
case "anchor-offset":
|
|
2489
2490
|
this.updateAnchorOffset(oldValue, newValue, paddingValues);
|
|
2490
2491
|
break;
|
|
2492
|
+
case "anchor-spacing":
|
|
2493
|
+
this.updateAnchorSpacing(oldValue, newValue, anchorSpacingValues);
|
|
2494
|
+
break;
|
|
2491
2495
|
default:
|
|
2492
2496
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
2493
2497
|
break;
|
|
@@ -2643,6 +2647,32 @@ const _Container = class _Container extends VerticallyExtendedElement {
|
|
|
2643
2647
|
this.$el.classList.add("anchored");
|
|
2644
2648
|
}
|
|
2645
2649
|
}
|
|
2650
|
+
updateAnchorSpacing(oldValue, newValue, attrValue) {
|
|
2651
|
+
if (!checkName(attrValue, newValue)) {
|
|
2652
|
+
log(
|
|
2653
|
+
`${newValue} is not a valid anchor-spacing value for ${this.tagName.toLowerCase()}`
|
|
2654
|
+
);
|
|
2655
|
+
return;
|
|
2656
|
+
}
|
|
2657
|
+
const updateAnchorSpacingStyle = (value) => {
|
|
2658
|
+
if (value !== null && value !== "" && value !== "default") {
|
|
2659
|
+
this.style.setProperty(
|
|
2660
|
+
`--container-anchor-spacing--mobile`,
|
|
2661
|
+
`var(--px-spacing-${value}-mobile)`
|
|
2662
|
+
);
|
|
2663
|
+
this.style.setProperty(
|
|
2664
|
+
`--container-anchor-spacing--tablet`,
|
|
2665
|
+
`var(--px-spacing-${value}-tablet)`
|
|
2666
|
+
);
|
|
2667
|
+
this.style.setProperty(
|
|
2668
|
+
`--container-anchor-spacing--laptop`,
|
|
2669
|
+
`var(--px-spacing-${value}-laptop)`
|
|
2670
|
+
);
|
|
2671
|
+
}
|
|
2672
|
+
};
|
|
2673
|
+
updateAnchorSpacingStyle(oldValue);
|
|
2674
|
+
updateAnchorSpacingStyle(newValue);
|
|
2675
|
+
}
|
|
2646
2676
|
get $slotAnchor() {
|
|
2647
2677
|
return this.querySelector('[slot^="anchor"]');
|
|
2648
2678
|
}
|
|
@@ -2976,6 +3006,12 @@ const _Container = class _Container extends VerticallyExtendedElement {
|
|
|
2976
3006
|
set anchorOffset(value) {
|
|
2977
3007
|
this.setAttribute("anchor-offset", value);
|
|
2978
3008
|
}
|
|
3009
|
+
get anchorSpacing() {
|
|
3010
|
+
return this.getAttribute("anchor-spacing");
|
|
3011
|
+
}
|
|
3012
|
+
set anchorSpacing(value) {
|
|
3013
|
+
this.setAttribute("anchor-spacing", value);
|
|
3014
|
+
}
|
|
2979
3015
|
get inverted() {
|
|
2980
3016
|
return this.getAttribute("inverted");
|
|
2981
3017
|
}
|
|
@@ -3659,6 +3695,7 @@ const _Banner = class _Banner extends VerticallyExtendedElement {
|
|
|
3659
3695
|
<slot name="title"></slot>
|
|
3660
3696
|
<slot name="description"></slot>
|
|
3661
3697
|
<slot name="content"></slot>
|
|
3698
|
+
|
|
3662
3699
|
</div>
|
|
3663
3700
|
</px-container>
|
|
3664
3701
|
</px-grid>
|
|
@@ -3692,13 +3729,16 @@ const _Banner = class _Banner extends VerticallyExtendedElement {
|
|
|
3692
3729
|
connectedCallback() {
|
|
3693
3730
|
var _a;
|
|
3694
3731
|
(_a = super.connectedCallback) == null ? void 0 : _a.call(this);
|
|
3695
|
-
if (this.reduced) {
|
|
3696
|
-
this.$container.setAttribute("padding", "m");
|
|
3697
|
-
} else {
|
|
3698
|
-
this.$container.setAttribute("padding", "l");
|
|
3699
|
-
}
|
|
3700
3732
|
this.createGridTemplateAreas();
|
|
3701
3733
|
this.createGridding();
|
|
3734
|
+
this.observer = new MutationObserver(() => {
|
|
3735
|
+
this.createGridTemplateAreas();
|
|
3736
|
+
this.createGridding();
|
|
3737
|
+
});
|
|
3738
|
+
this.observer.observe(this, {
|
|
3739
|
+
childList: true,
|
|
3740
|
+
subtree: true
|
|
3741
|
+
});
|
|
3702
3742
|
}
|
|
3703
3743
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
3704
3744
|
if (oldValue !== newValue) {
|
|
@@ -3751,6 +3791,9 @@ const _Banner = class _Banner extends VerticallyExtendedElement {
|
|
|
3751
3791
|
}
|
|
3752
3792
|
}
|
|
3753
3793
|
}
|
|
3794
|
+
disconnectedCallback() {
|
|
3795
|
+
this.observer.disconnect();
|
|
3796
|
+
}
|
|
3754
3797
|
createGridTemplateAreas() {
|
|
3755
3798
|
const grid = this.shadowRoot.querySelector(
|
|
3756
3799
|
".banner-content"
|
|
@@ -3784,20 +3827,20 @@ const _Banner = class _Banner extends VerticallyExtendedElement {
|
|
|
3784
3827
|
}
|
|
3785
3828
|
createGridding(value) {
|
|
3786
3829
|
const breakpoints = [
|
|
3787
|
-
{ prop: "hasGridding",
|
|
3830
|
+
{ prop: "hasGridding", gridProp: "gridCols", attr: "col-span" },
|
|
3788
3831
|
{
|
|
3789
3832
|
prop: "hasGriddingMobile",
|
|
3790
|
-
|
|
3833
|
+
gridProp: "gridColsMobile",
|
|
3791
3834
|
attr: "col-span--mobile"
|
|
3792
3835
|
},
|
|
3793
3836
|
{
|
|
3794
3837
|
prop: "hasGriddingTablet",
|
|
3795
|
-
|
|
3838
|
+
gridProp: "gridColsTablet",
|
|
3796
3839
|
attr: "col-span--tablet"
|
|
3797
3840
|
},
|
|
3798
3841
|
{
|
|
3799
3842
|
prop: "hasGriddingLaptop",
|
|
3800
|
-
|
|
3843
|
+
gridProp: "gridColsLaptop",
|
|
3801
3844
|
attr: "col-span--laptop"
|
|
3802
3845
|
}
|
|
3803
3846
|
];
|
|
@@ -3805,16 +3848,16 @@ const _Banner = class _Banner extends VerticallyExtendedElement {
|
|
|
3805
3848
|
"px-grid > px-container"
|
|
3806
3849
|
);
|
|
3807
3850
|
if (value !== null) {
|
|
3808
|
-
breakpoints.forEach(({ prop,
|
|
3851
|
+
breakpoints.forEach(({ prop, gridProp, attr }) => {
|
|
3809
3852
|
if (this[prop]) {
|
|
3810
|
-
this.$grid
|
|
3811
|
-
spanElement
|
|
3853
|
+
this.$grid[gridProp] = "3";
|
|
3854
|
+
spanElement.setAttribute(attr, "2");
|
|
3812
3855
|
}
|
|
3813
3856
|
});
|
|
3814
3857
|
} else {
|
|
3815
|
-
breakpoints.forEach(({
|
|
3816
|
-
this.$grid
|
|
3817
|
-
spanElement
|
|
3858
|
+
breakpoints.forEach(({ gridProp, attr }) => {
|
|
3859
|
+
this.$grid[gridProp] = "1";
|
|
3860
|
+
spanElement.removeAttribute(attr);
|
|
3818
3861
|
});
|
|
3819
3862
|
}
|
|
3820
3863
|
}
|
|
@@ -4423,6 +4466,7 @@ const _ButtonIcon = class _ButtonIcon extends PxElement {
|
|
|
4423
4466
|
static get observedAttributes() {
|
|
4424
4467
|
return [
|
|
4425
4468
|
...super.observedAttributes,
|
|
4469
|
+
...accessibilityAttributes,
|
|
4426
4470
|
"inverted",
|
|
4427
4471
|
"loading",
|
|
4428
4472
|
"size",
|
|
@@ -4448,7 +4492,6 @@ const _ButtonIcon = class _ButtonIcon extends PxElement {
|
|
|
4448
4492
|
icon.setAttribute("color", "inherit");
|
|
4449
4493
|
}
|
|
4450
4494
|
}
|
|
4451
|
-
transferAccessibilityAttributes(this, this.$el, false);
|
|
4452
4495
|
}
|
|
4453
4496
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
4454
4497
|
if (oldValue !== newValue) {
|
|
@@ -6838,7 +6881,7 @@ class CellSwitch extends WithExtraAttributes {
|
|
|
6838
6881
|
return `
|
|
6839
6882
|
<div class="cell-switch">
|
|
6840
6883
|
<px-cell hoverable>
|
|
6841
|
-
<px-switch slot="action-indicator"
|
|
6884
|
+
<px-switch slot="action-indicator" aria-hidden="true" tabindex="-1"></px-switch>
|
|
6842
6885
|
<slot name="visual" slot="visual"></slot>
|
|
6843
6886
|
<slot name="label" slot="label"></slot>
|
|
6844
6887
|
<slot name="description" slot="description"></slot>
|
|
@@ -7732,7 +7775,7 @@ class CellRadio extends WithExtraAttributes {
|
|
|
7732
7775
|
return `
|
|
7733
7776
|
<div class="cell-radio">
|
|
7734
7777
|
<px-cell hoverable>
|
|
7735
|
-
<px-radio slot="prefix"
|
|
7778
|
+
<px-radio slot="prefix" aria-hidden="true" tabindex="-1"></px-radio>
|
|
7736
7779
|
<slot name="visual" slot="visual"></slot>
|
|
7737
7780
|
<slot name="label" slot="label"></slot>
|
|
7738
7781
|
<slot name="description" slot="description"></slot>
|
|
@@ -8646,7 +8689,7 @@ class Section extends HTMLElement {
|
|
|
8646
8689
|
if (!customElements.get("px-section")) {
|
|
8647
8690
|
customElements.define("px-section", Section);
|
|
8648
8691
|
}
|
|
8649
|
-
const headingCss = "h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{margin:0;font-family:var(--px-font-family);color:var(--heading-color-default, var(--px-color-text-brand-default));text-align:var(--heading-text-align--mobile, left);font-size:var(--px-text-size-heading-s-mobile);line-height:var(--px-line-height-ratio-l);font-weight:var(--px-font-weight-title)}::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),::slotted(h6){margin-bottom:var(--px-spacing-heading-to-content-mobile)}:host([inverted]) h1,:host([inverted]) .style-title-4xl,:host([inverted]) ::slotted(h1),:host([inverted]) h2,:host([inverted]) .style-title-3xl,:host([inverted]) ::slotted(h2),:host([inverted]) h3,:host([inverted]) .style-title-2xl,:host([inverted]) ::slotted(h3),:host([inverted]) h4,:host([inverted]) .style-title-xl,:host([inverted]) ::slotted(h4),:host([inverted]) h5,:host([inverted]) .style-title-l,:host([inverted]) ::slotted(h5),:host([inverted]) h6,:host([inverted]) .style-title-m,:host([inverted]) ::slotted(h6),:host([inverted]) .style-title-s,:host([inverted]) .style-subtitle{color:var(--heading-color-inverted, var(--px-color-text-brand-inverted))}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-
|
|
8692
|
+
const headingCss = "h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{margin:0;font-family:var(--px-font-family);color:var(--heading-color-default, var(--px-color-text-brand-default));text-align:var(--heading-text-align--mobile, left);font-size:var(--px-text-size-heading-s-mobile);line-height:var(--px-line-height-ratio-l);font-weight:var(--px-font-weight-title)}::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),::slotted(h6){margin-bottom:var(--px-spacing-heading-to-content-mobile)}:host([inverted]) h1,:host([inverted]) .style-title-4xl,:host([inverted]) ::slotted(h1),:host([inverted]) h2,:host([inverted]) .style-title-3xl,:host([inverted]) ::slotted(h2),:host([inverted]) h3,:host([inverted]) .style-title-2xl,:host([inverted]) ::slotted(h3),:host([inverted]) h4,:host([inverted]) .style-title-xl,:host([inverted]) ::slotted(h4),:host([inverted]) h5,:host([inverted]) .style-title-l,:host([inverted]) ::slotted(h5),:host([inverted]) h6,:host([inverted]) .style-title-m,:host([inverted]) ::slotted(h6),:host([inverted]) .style-title-s,:host([inverted]) .style-subtitle{color:var(--heading-color-inverted, var(--px-color-text-brand-inverted))}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-4xl-mobile);line-height:var(--px-line-height-ratio-s);font-weight:var(--px-font-weight-title-large)}h2,.style-title-3xl,::slotted(h2){font-size:var(--px-text-size-heading-3xl-mobile);line-height:var(--px-line-height-ratio-s);font-weight:var(--px-font-weight-title-large)}h3,.style-title-2xl,::slotted(h3){font-size:var(--px-text-size-heading-2xl-mobile);line-height:var(--px-line-height-ratio-s)}h4,.style-title-xl,::slotted(h4){font-size:var(--px-text-size-heading-xl-mobile)}h5,.style-title-l,::slotted(h5){font-size:var(--px-text-size-heading-l-mobile)}h6,.style-title-m,::slotted(h6){font-size:var(--px-text-size-heading-m-mobile)}.style-subtitle{font-size:var(--px-text-size-heading-xl-mobile);font-weight:var(--px-font-weight-subtitle)}.style-title-s{font-size:var(--px-text-size-heading-s-mobile)}@media only screen and (min-width: 48em){::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),::slotted(h6){margin-bottom:var(--px-spacing-heading-to-content-tablet)}h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{text-align:var(--heading-text-align--tablet, left)}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-4xl-tablet)}h2,.style-title-3xl,::slotted(h2){font-size:var(--px-text-size-heading-3xl-tablet)}h3,.style-title-2xl,::slotted(h3){font-size:var(--px-text-size-heading-2xl-tablet)}h4,.style-title-xl,::slotted(h4){font-size:var(--px-text-size-heading-xl-tablet)}h5,.style-title-l,::slotted(h5){font-size:var(--px-text-size-heading-l-tablet)}h6,.style-title-m,::slotted(h6){font-size:var(--px-text-size-heading-m-tablet)}.style-title-s{font-size:var(--px-text-size-heading-s-tablet)}.style-subtitle{font-size:var(--px-text-size-heading-xl-tablet)}}@media only screen and (min-width: 64.0625em){::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),::slotted(h6){margin-bottom:var(--px-spacing-heading-to-content-laptop)}h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{text-align:var(--heading-text-align--laptop, left)}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-4xl-laptop)}h2,.style-title-3xl,::slotted(h2){font-size:var(--px-text-size-heading-3xl-laptop)}h3,.style-title-2xl,::slotted(h3){font-size:var(--px-text-size-heading-2xl-laptop)}h4,.style-title-xl,::slotted(h4){font-size:var(--px-text-size-heading-xl-laptop)}h5,.style-title-l,::slotted(h5){font-size:var(--px-text-size-heading-l-laptop)}h6,.style-title-m,::slotted(h6){font-size:var(--px-text-size-heading-m-laptop)}.style-title-s{font-size:var(--px-text-size-heading-s-laptop)}.style-subtitle{font-size:var(--px-text-size-heading-xl-laptop)}}@media only screen and (min-width: 90.0625em){::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),::slotted(h6){margin-bottom:var(--px-spacing-heading-to-content-desktop)}h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{text-align:var(--heading-text-align--desktop, left)}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-4xl-desktop)}h2,.style-title-3xl,::slotted(h2){font-size:var(--px-text-size-heading-3xl-desktop)}h3,.style-title-2xl,::slotted(h3){font-size:var(--px-text-size-heading-2xl-desktop)}h4,.style-title-xl,::slotted(h4){font-size:var(--px-text-size-heading-xl-desktop)}h5,.style-title-l,::slotted(h5){font-size:var(--px-text-size-heading-l-desktop)}h6,.style-title-m,::slotted(h6){font-size:var(--px-text-size-heading-m-desktop)}.style-title-s{font-size:var(--px-text-size-heading-s-desktop)}.style-subtitle{font-size:var(--px-text-size-heading-xl-desktop)}}";
|
|
8650
8693
|
const headingStyles$2 = new CSSStyleSheet();
|
|
8651
8694
|
headingStyles$2.replaceSync(headingCss);
|
|
8652
8695
|
const typographyStyles$4 = new CSSStyleSheet();
|
|
@@ -8889,16 +8932,16 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
8889
8932
|
this.template = () => `<div class="content-header">
|
|
8890
8933
|
<div class="contrast-helper"></div>
|
|
8891
8934
|
<px-section padding-block="l">
|
|
8892
|
-
|
|
8893
|
-
|
|
8894
|
-
|
|
8895
|
-
|
|
8896
|
-
|
|
8897
|
-
|
|
8898
|
-
|
|
8899
|
-
|
|
8900
|
-
|
|
8901
|
-
|
|
8935
|
+
<px-grid gap="none">
|
|
8936
|
+
<px-container padding="none" border-radius="none" background-color="none" >
|
|
8937
|
+
<div class="content-header-content">
|
|
8938
|
+
<px-vstack gap="heading-to-subtitle">
|
|
8939
|
+
<px-h1><slot></slot></px-h1>
|
|
8940
|
+
<slot name="subtitle"></slot>
|
|
8941
|
+
</px-vstack>
|
|
8942
|
+
</div>
|
|
8943
|
+
</px-container>
|
|
8944
|
+
</px-grid>
|
|
8902
8945
|
</px-section>
|
|
8903
8946
|
</div>`;
|
|
8904
8947
|
this.shadowRoot.innerHTML = this.template();
|
|
@@ -9009,20 +9052,20 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
9009
9052
|
}
|
|
9010
9053
|
createGridding(value) {
|
|
9011
9054
|
const breakpoints = [
|
|
9012
|
-
{ prop: "hasGridding",
|
|
9055
|
+
{ prop: "hasGridding", gridProp: "gridCols", attr: "col-span" },
|
|
9013
9056
|
{
|
|
9014
9057
|
prop: "hasGriddingMobile",
|
|
9015
|
-
|
|
9058
|
+
gridProp: "gridColsMobile",
|
|
9016
9059
|
attr: "col-span--mobile"
|
|
9017
9060
|
},
|
|
9018
9061
|
{
|
|
9019
9062
|
prop: "hasGriddingTablet",
|
|
9020
|
-
|
|
9063
|
+
gridProp: "gridColsTablet",
|
|
9021
9064
|
attr: "col-span--tablet"
|
|
9022
9065
|
},
|
|
9023
9066
|
{
|
|
9024
9067
|
prop: "hasGriddingLaptop",
|
|
9025
|
-
|
|
9068
|
+
gridProp: "gridColsLaptop",
|
|
9026
9069
|
attr: "col-span--laptop"
|
|
9027
9070
|
}
|
|
9028
9071
|
];
|
|
@@ -9030,16 +9073,16 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
9030
9073
|
"px-grid > px-container"
|
|
9031
9074
|
);
|
|
9032
9075
|
if (value !== null) {
|
|
9033
|
-
breakpoints.forEach(({ prop,
|
|
9076
|
+
breakpoints.forEach(({ prop, gridProp, attr }) => {
|
|
9034
9077
|
if (this[prop]) {
|
|
9035
|
-
this.$grid
|
|
9036
|
-
spanElement
|
|
9078
|
+
this.$grid[gridProp] = "3";
|
|
9079
|
+
spanElement.setAttribute(attr, "2");
|
|
9037
9080
|
}
|
|
9038
9081
|
});
|
|
9039
9082
|
} else {
|
|
9040
|
-
breakpoints.forEach(({
|
|
9041
|
-
this.$grid
|
|
9042
|
-
spanElement
|
|
9083
|
+
breakpoints.forEach(({ gridProp, attr }) => {
|
|
9084
|
+
this.$grid[gridProp] = "1";
|
|
9085
|
+
spanElement.removeAttribute(attr);
|
|
9043
9086
|
});
|
|
9044
9087
|
}
|
|
9045
9088
|
}
|
|
@@ -11716,24 +11759,53 @@ const _Input = class _Input extends AbstractInputElement {
|
|
|
11716
11759
|
}
|
|
11717
11760
|
connectedCallback() {
|
|
11718
11761
|
super.connectedCallback();
|
|
11762
|
+
}
|
|
11763
|
+
static get observedAttributes() {
|
|
11764
|
+
return [...super.observedAttributes, "type"];
|
|
11765
|
+
}
|
|
11766
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
11767
|
+
if (oldValue !== newValue) {
|
|
11768
|
+
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
11769
|
+
switch (attrName) {
|
|
11770
|
+
case "type":
|
|
11771
|
+
this.updateSearchBehavior();
|
|
11772
|
+
this.$el.setAttribute("type", this.type ?? "text");
|
|
11773
|
+
break;
|
|
11774
|
+
}
|
|
11775
|
+
}
|
|
11776
|
+
}
|
|
11777
|
+
updateSearchBehavior() {
|
|
11719
11778
|
if (this.$el.type === "search") {
|
|
11720
|
-
this
|
|
11721
|
-
|
|
11779
|
+
this.enableSearchMode();
|
|
11780
|
+
return;
|
|
11781
|
+
}
|
|
11782
|
+
this.disableSearchMode();
|
|
11783
|
+
}
|
|
11784
|
+
enableSearchMode() {
|
|
11785
|
+
this.$el.setAttribute("list", "suggestions");
|
|
11786
|
+
this.syncDataList();
|
|
11787
|
+
if (!this.observer) {
|
|
11722
11788
|
this.observer = new MutationObserver(() => {
|
|
11723
11789
|
this.syncDataList();
|
|
11724
11790
|
});
|
|
11725
|
-
this.observer.observe(this, {
|
|
11726
|
-
childList: true,
|
|
11727
|
-
subtree: true
|
|
11728
|
-
});
|
|
11729
11791
|
}
|
|
11730
|
-
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
|
|
11734
|
-
|
|
11792
|
+
this.observer.observe(this, {
|
|
11793
|
+
childList: true,
|
|
11794
|
+
subtree: true
|
|
11795
|
+
});
|
|
11796
|
+
if (navigator.userAgent.includes("Chrome")) {
|
|
11797
|
+
this.$el.style.setProperty("--search-icon-focus-width", "2.5rem");
|
|
11798
|
+
this.$el.style.setProperty("--search-icon-datalist-width", "1rem");
|
|
11735
11799
|
}
|
|
11736
11800
|
}
|
|
11801
|
+
disableSearchMode() {
|
|
11802
|
+
var _a, _b;
|
|
11803
|
+
(_a = this.observer) == null ? void 0 : _a.disconnect();
|
|
11804
|
+
this.$el.removeAttribute("list");
|
|
11805
|
+
(_b = this.$shadowSuggestions) == null ? void 0 : _b.remove();
|
|
11806
|
+
this.$el.style.removeProperty("--search-icon-focus-width");
|
|
11807
|
+
this.$el.style.removeProperty("--search-icon-datalist-width");
|
|
11808
|
+
}
|
|
11737
11809
|
syncDataList() {
|
|
11738
11810
|
var _a, _b;
|
|
11739
11811
|
const newSuggestions = (_a = this.$lightSuggestions) == null ? void 0 : _a.cloneNode(
|
|
@@ -11761,13 +11833,26 @@ const _Input = class _Input extends AbstractInputElement {
|
|
|
11761
11833
|
return this.querySelector("datalist");
|
|
11762
11834
|
}
|
|
11763
11835
|
get $shadowSuggestions() {
|
|
11764
|
-
|
|
11836
|
+
var _a;
|
|
11837
|
+
return ((_a = this.shadowRoot) == null ? void 0 : _a.querySelector("datalist")) ?? null;
|
|
11765
11838
|
}
|
|
11766
11839
|
get $container() {
|
|
11767
|
-
|
|
11840
|
+
var _a;
|
|
11841
|
+
return ((_a = this.shadowRoot) == null ? void 0 : _a.querySelector("div")) ?? null;
|
|
11842
|
+
}
|
|
11843
|
+
get type() {
|
|
11844
|
+
return this.getAttribute("type");
|
|
11845
|
+
}
|
|
11846
|
+
set type(value) {
|
|
11847
|
+
if (value) {
|
|
11848
|
+
this.setAttribute("type", value);
|
|
11849
|
+
} else {
|
|
11850
|
+
this.removeAttribute("type");
|
|
11851
|
+
}
|
|
11768
11852
|
}
|
|
11769
11853
|
};
|
|
11770
11854
|
_Input.nativeName = "input";
|
|
11855
|
+
_Input.accessorExclusions = ["type"];
|
|
11771
11856
|
let Input = _Input;
|
|
11772
11857
|
if (!customElements.get("px-input")) {
|
|
11773
11858
|
customElements.define("px-input", Input);
|
|
@@ -12519,9 +12604,15 @@ const styles$j = '*{box-sizing:border-box}#container{display:flex;flex-wrap:nowr
|
|
|
12519
12604
|
const styleSheet$j = new CSSStyleSheet();
|
|
12520
12605
|
styleSheet$j.replaceSync(styles$j);
|
|
12521
12606
|
const CLOSE_EVENT$1 = "px.lavender.modal.close";
|
|
12607
|
+
const statusValues = ["", "info", "success", "error", "warning"];
|
|
12522
12608
|
class Modal extends HTMLElement {
|
|
12523
12609
|
constructor() {
|
|
12524
12610
|
super();
|
|
12611
|
+
this.onOpenClick = () => this.show();
|
|
12612
|
+
this.onCloseClick = () => this.close();
|
|
12613
|
+
this.commandButtonCleanups = [];
|
|
12614
|
+
this.openerElement = null;
|
|
12615
|
+
this.closerElement = null;
|
|
12525
12616
|
this.template = `<dialog>
|
|
12526
12617
|
<div id="container">
|
|
12527
12618
|
<div id="content-container">
|
|
@@ -12537,6 +12628,7 @@ class Modal extends HTMLElement {
|
|
|
12537
12628
|
</px-vstack>
|
|
12538
12629
|
</px-hstack>
|
|
12539
12630
|
<div id="content">
|
|
12631
|
+
<slot name="content"></slot>
|
|
12540
12632
|
<slot></slot>
|
|
12541
12633
|
</div>
|
|
12542
12634
|
<px-separator size="m"></px-separator>
|
|
@@ -12563,18 +12655,14 @@ class Modal extends HTMLElement {
|
|
|
12563
12655
|
}
|
|
12564
12656
|
connectedCallback() {
|
|
12565
12657
|
var _a, _b;
|
|
12658
|
+
this.addEventListenersToCommandButtons();
|
|
12566
12659
|
this.toggleDescriptionVisibility = this.toggleDescriptionVisibility.bind(this);
|
|
12567
12660
|
this.toggleCloseButtonSafeArea = this.toggleCloseButtonSafeArea.bind(this);
|
|
12568
12661
|
if (this.hasAttribute("open")) {
|
|
12569
12662
|
this.show();
|
|
12570
12663
|
}
|
|
12571
12664
|
if (this.hasAttribute("closedby")) {
|
|
12572
|
-
|
|
12573
|
-
`#${this.getAttribute("closedby")}`
|
|
12574
|
-
);
|
|
12575
|
-
$closer == null ? void 0 : $closer.addEventListener("click", () => {
|
|
12576
|
-
this.close();
|
|
12577
|
-
});
|
|
12665
|
+
this.addCloseListener(this.getAttribute("closedby"));
|
|
12578
12666
|
}
|
|
12579
12667
|
if (this.hasAttribute("openedby")) {
|
|
12580
12668
|
this.addOpenListener();
|
|
@@ -12594,7 +12682,7 @@ class Modal extends HTMLElement {
|
|
|
12594
12682
|
);
|
|
12595
12683
|
}
|
|
12596
12684
|
static get observedAttributes() {
|
|
12597
|
-
return ["open", "status", "media-src", "openedby"];
|
|
12685
|
+
return ["open", "status", "media-src", "openedby", "closedby", "id"];
|
|
12598
12686
|
}
|
|
12599
12687
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
12600
12688
|
switch (attrName) {
|
|
@@ -12610,14 +12698,49 @@ class Modal extends HTMLElement {
|
|
|
12610
12698
|
case "openedby":
|
|
12611
12699
|
this.addOpenListener();
|
|
12612
12700
|
break;
|
|
12701
|
+
case "closedby":
|
|
12702
|
+
this.addCloseListener(newValue);
|
|
12703
|
+
break;
|
|
12704
|
+
case "id":
|
|
12705
|
+
this.addEventListenersToCommandButtons();
|
|
12706
|
+
break;
|
|
12613
12707
|
}
|
|
12614
12708
|
}
|
|
12615
12709
|
disconnectedCallback() {
|
|
12616
|
-
var _a;
|
|
12710
|
+
var _a, _b;
|
|
12617
12711
|
(_a = this.$slotDescription) == null ? void 0 : _a.removeEventListener(
|
|
12618
12712
|
"slotchange",
|
|
12619
12713
|
this.toggleDescriptionVisibility
|
|
12620
12714
|
);
|
|
12715
|
+
(_b = this.$slotCloseButton) == null ? void 0 : _b.removeEventListener(
|
|
12716
|
+
"slotchange",
|
|
12717
|
+
this.toggleCloseButtonSafeArea
|
|
12718
|
+
);
|
|
12719
|
+
this.removeCommandButtonListeners();
|
|
12720
|
+
this.removeOpenListener();
|
|
12721
|
+
this.removeCloseListener();
|
|
12722
|
+
}
|
|
12723
|
+
addEventListenersToCommandButtons() {
|
|
12724
|
+
this.removeCommandButtonListeners();
|
|
12725
|
+
if (this.id) {
|
|
12726
|
+
document.querySelectorAll(`[commandfor="${this.id}"]`).forEach(($clickable) => {
|
|
12727
|
+
if ($clickable.getAttribute("command") === "show-modal") {
|
|
12728
|
+
$clickable.addEventListener("click", this.onOpenClick);
|
|
12729
|
+
this.commandButtonCleanups.push(
|
|
12730
|
+
() => $clickable.removeEventListener("click", this.onOpenClick)
|
|
12731
|
+
);
|
|
12732
|
+
} else if ($clickable.getAttribute("command") === "close") {
|
|
12733
|
+
$clickable.addEventListener("click", this.onCloseClick);
|
|
12734
|
+
this.commandButtonCleanups.push(
|
|
12735
|
+
() => $clickable.removeEventListener("click", this.onCloseClick)
|
|
12736
|
+
);
|
|
12737
|
+
}
|
|
12738
|
+
});
|
|
12739
|
+
}
|
|
12740
|
+
}
|
|
12741
|
+
removeCommandButtonListeners() {
|
|
12742
|
+
this.commandButtonCleanups.forEach((cleanup) => cleanup());
|
|
12743
|
+
this.commandButtonCleanups = [];
|
|
12621
12744
|
}
|
|
12622
12745
|
handleOpenChange() {
|
|
12623
12746
|
if (this.hasAttribute("open")) {
|
|
@@ -12628,6 +12751,13 @@ class Modal extends HTMLElement {
|
|
|
12628
12751
|
}
|
|
12629
12752
|
handleStatusChange(oldStatus, newStatus) {
|
|
12630
12753
|
var _a, _b, _c;
|
|
12754
|
+
if (statusValues.includes(newStatus)) {
|
|
12755
|
+
this.$titleContainer.setAttribute("color", `neutral`);
|
|
12756
|
+
} else {
|
|
12757
|
+
if (this.$titleContainer.hasAttribute("color")) {
|
|
12758
|
+
this.$titleContainer.removeAttribute("color");
|
|
12759
|
+
}
|
|
12760
|
+
}
|
|
12631
12761
|
if (newStatus === "info") {
|
|
12632
12762
|
this.$container.classList.add("info");
|
|
12633
12763
|
} else {
|
|
@@ -12683,12 +12813,32 @@ class Modal extends HTMLElement {
|
|
|
12683
12813
|
this.$mediaContainer.style.backgroundImage = `url(${src})`;
|
|
12684
12814
|
}
|
|
12685
12815
|
addOpenListener() {
|
|
12686
|
-
var _a
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12816
|
+
var _a;
|
|
12817
|
+
this.removeOpenListener();
|
|
12818
|
+
this.openerElement = this.$opener;
|
|
12819
|
+
(_a = this.openerElement) == null ? void 0 : _a.addEventListener("click", this.onOpenClick);
|
|
12820
|
+
}
|
|
12821
|
+
removeOpenListener() {
|
|
12822
|
+
var _a;
|
|
12823
|
+
(_a = this.openerElement) == null ? void 0 : _a.removeEventListener("click", this.onOpenClick);
|
|
12824
|
+
this.openerElement = null;
|
|
12825
|
+
}
|
|
12826
|
+
addCloseListener(value) {
|
|
12827
|
+
var _a, _b;
|
|
12828
|
+
if (value === "none") {
|
|
12829
|
+
(_a = this.$dialog) == null ? void 0 : _a.setAttribute("closedby", "none");
|
|
12830
|
+
}
|
|
12831
|
+
this.removeCloseListener();
|
|
12832
|
+
if (value && value !== "none") {
|
|
12833
|
+
this.closerElement = document.querySelector(`#${value}`);
|
|
12834
|
+
(_b = this.closerElement) == null ? void 0 : _b.addEventListener("click", this.onCloseClick);
|
|
12690
12835
|
}
|
|
12691
12836
|
}
|
|
12837
|
+
removeCloseListener() {
|
|
12838
|
+
var _a;
|
|
12839
|
+
(_a = this.closerElement) == null ? void 0 : _a.removeEventListener("click", this.onCloseClick);
|
|
12840
|
+
this.closerElement = null;
|
|
12841
|
+
}
|
|
12692
12842
|
toggleDescriptionVisibility() {
|
|
12693
12843
|
if (!this.$slottedDescription) {
|
|
12694
12844
|
this.$descriptionContainer.style.display = "none";
|
|
@@ -12727,6 +12877,9 @@ class Modal extends HTMLElement {
|
|
|
12727
12877
|
'px-p[font-weight="title"]'
|
|
12728
12878
|
);
|
|
12729
12879
|
}
|
|
12880
|
+
get $titleContainer() {
|
|
12881
|
+
return this.shadowRoot.querySelector("px-h1");
|
|
12882
|
+
}
|
|
12730
12883
|
get $opener() {
|
|
12731
12884
|
return document.querySelector(
|
|
12732
12885
|
`px-button#${this.getAttribute("openedby")}`
|
|
@@ -12744,6 +12897,12 @@ class Modal extends HTMLElement {
|
|
|
12744
12897
|
set openedby(value) {
|
|
12745
12898
|
this.setAttribute("openedby", value);
|
|
12746
12899
|
}
|
|
12900
|
+
get closedby() {
|
|
12901
|
+
return this.getAttribute("closedby");
|
|
12902
|
+
}
|
|
12903
|
+
set closedby(value) {
|
|
12904
|
+
this.setAttribute("closedby", value);
|
|
12905
|
+
}
|
|
12747
12906
|
get $closeButton() {
|
|
12748
12907
|
return this.shadowRoot.querySelector("px-button-icon");
|
|
12749
12908
|
}
|
|
@@ -13063,7 +13222,7 @@ const priceSizeValues = ["", "s", "m", "l"];
|
|
|
13063
13222
|
const _Price = class _Price extends PxElement {
|
|
13064
13223
|
constructor() {
|
|
13065
13224
|
super(styles$i);
|
|
13066
|
-
this.template = () => `<span class="price"
|
|
13225
|
+
this.template = () => `<span class="price"></span>`;
|
|
13067
13226
|
this.shadowRoot.innerHTML = this.template();
|
|
13068
13227
|
}
|
|
13069
13228
|
static get observedAttributes() {
|
|
@@ -13259,6 +13418,20 @@ class SelectableBox extends WithExtraAttributes {
|
|
|
13259
13418
|
if (!customElements.get("px-selectable-box")) {
|
|
13260
13419
|
customElements.define("px-selectable-box", SelectableBox);
|
|
13261
13420
|
}
|
|
13421
|
+
const DEFAULT_IGNORED_TAGS = ["px-a", "px-button"];
|
|
13422
|
+
function shouldIgnoreSelectableBoxClick(event, host, ignoredTags = DEFAULT_IGNORED_TAGS) {
|
|
13423
|
+
const ignored = new Set(ignoredTags);
|
|
13424
|
+
const eventPath = event.composedPath();
|
|
13425
|
+
for (const pathPart of eventPath) {
|
|
13426
|
+
if (pathPart === host) {
|
|
13427
|
+
break;
|
|
13428
|
+
}
|
|
13429
|
+
if (pathPart instanceof Element && ignored.has(pathPart.tagName.toLowerCase())) {
|
|
13430
|
+
return true;
|
|
13431
|
+
}
|
|
13432
|
+
}
|
|
13433
|
+
return false;
|
|
13434
|
+
}
|
|
13262
13435
|
const styles$f = ':host{display:block;outline:none}:host *{box-sizing:border-box}.selectable-box-checkbox,.selectable-box-radio{box-sizing:border-box;height:100%;cursor:pointer;border-radius:var(--px-radius-main);overflow:hidden;--btn-transition: all .2s ease-in-out 0s;transition:var(--btn-transition);border:var(--px-size-border-m) solid var(--px-color-border-main-default);outline-color:var(--px-color-border-focus-outline-default);outline-width:var(--px-focus-outline-mobile)}.selectable-box-checkbox px-selectable-box,.selectable-box-radio px-selectable-box{height:100%;background-color:var(--px-color-background-container-light-default)}:host([parent-has-anchor-full]) .selectable-box-checkbox,:host([parent-has-anchor-full]) .selectable-box-radio{border-radius:0 0 var(--px-radius-main) var(--px-radius-main)}:host(:not([disabled])):host(:hover) .selectable-box-checkbox,:host(:not([disabled])):host(:hover) .selectable-box-radio{border-color:var(--px-color-border-state-hover-default)}:host(:not([disabled])):host(:hover) .selectable-box-checkbox px-selectable-box,:host(:not([disabled])):host(:hover) .selectable-box-radio px-selectable-box{background-color:var( --px-color-background-state-hover-bordered-default )}:host(:not([disabled])):host(:focus-visible) .selectable-box-checkbox,:host(:not([disabled])):host(:focus-visible) .selectable-box-radio{outline-offset:var(--px-focus-offset-mobile);outline-style:solid}:host([checked]) .selectable-box-checkbox,:host([checked]) .selectable-box-radio{border-color:var(--px-color-border-state-active-default)}:host([disabled]) .selectable-box-checkbox,:host([disabled]) .selectable-box-radio{cursor:default;pointer-events:none;border-color:transparent}:host([disabled]) .selectable-box-checkbox px-selectable-box,:host([disabled]) .selectable-box-radio px-selectable-box{background-color:var(--px-color-background-state-disabled-default)}:host([disabled]) ::slotted([slot="title"]),:host([disabled]) ::slotted([slot="description"]),:host([disabled]) ::slotted([slot="content"]){color:var(--px-color-text-state-disabled-default)}@media only screen and (min-width: 48em){.selectable-box-checkbox,.selectable-box-radio{outline-width:var(--px-focus-outline-tablet)}}@media only screen and (min-width: 64.0625em){.selectable-box-checkbox,.selectable-box-radio{outline-width:var(--px-focus-outline-laptop)}}@media only screen and (min-width: 90.0625em){.selectable-box-checkbox,.selectable-box-radio{outline-width:var(--px-focus-outline-desktop)}}:host([inverted]) .selectable-box-checkbox,:host([inverted]) .selectable-box-radio{border-color:var(--px-color-border-main-inverted);outline-color:var(--px-color-border-focus-outline-inverted)}:host([inverted]) .selectable-box-checkbox px-selectable-box,:host([inverted]) .selectable-box-radio px-selectable-box{background-color:var(--px-color-background-container-light-inverted)}:host([inverted]):host(:not([disabled])):host(:hover) .selectable-box-checkbox,:host([inverted]):host(:not([disabled])):host(:hover) .selectable-box-radio{border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]):host(:not([disabled])):host(:hover) .selectable-box-checkbox px-selectable-box,:host([inverted]):host(:not([disabled])):host(:hover) .selectable-box-radio px-selectable-box{background-color:var( --px-color-background-state-hover-bordered-inverted )}:host([inverted]):host([checked]) .selectable-box-checkbox,:host([inverted]):host([checked]) .selectable-box-radio{border-color:var(--px-color-border-state-active-inverted)}:host([inverted]):host([disabled]) .selectable-box-checkbox,:host([inverted]):host([disabled]) .selectable-box-radio{border-color:transparent}:host([inverted]):host([disabled]) .selectable-box-checkbox px-selectable-box,:host([inverted]):host([disabled]) .selectable-box-radio px-selectable-box{background-color:var(--px-color-background-state-disabled-inverted)}:host([inverted]):host([disabled]) ::slotted([slot="title"]),:host([inverted]):host([disabled]) ::slotted([slot="description"]),:host([inverted]):host([disabled]) ::slotted([slot="content"]){color:var(--px-color-text-state-disabled-inverted)}';
|
|
13263
13436
|
const styleSheet$g = new CSSStyleSheet();
|
|
13264
13437
|
styleSheet$g.replaceSync(styles$f);
|
|
@@ -13377,6 +13550,9 @@ class SelectableBoxCheckbox extends WithExtraAttributes {
|
|
|
13377
13550
|
}
|
|
13378
13551
|
}
|
|
13379
13552
|
setClickEvent(event) {
|
|
13553
|
+
if (shouldIgnoreSelectableBoxClick(event, this)) {
|
|
13554
|
+
return;
|
|
13555
|
+
}
|
|
13380
13556
|
this.checked = !this.checked;
|
|
13381
13557
|
event.stopPropagation();
|
|
13382
13558
|
event.preventDefault();
|
|
@@ -13650,6 +13826,9 @@ class SelectableBoxRadio extends WithExtraAttributes {
|
|
|
13650
13826
|
}
|
|
13651
13827
|
}
|
|
13652
13828
|
setClickEvent(event) {
|
|
13829
|
+
if (shouldIgnoreSelectableBoxClick(event, this)) {
|
|
13830
|
+
return;
|
|
13831
|
+
}
|
|
13653
13832
|
if (!this.checked) {
|
|
13654
13833
|
this.checked = true;
|
|
13655
13834
|
}
|
|
@@ -14723,13 +14902,122 @@ class Td extends HTMLElement {
|
|
|
14723
14902
|
if (!customElements.get("px-td")) {
|
|
14724
14903
|
customElements.define("px-td", Td);
|
|
14725
14904
|
}
|
|
14726
|
-
const styles$6 =
|
|
14905
|
+
const styles$6 = "*{font-family:var(--px-font-family)}:host{background-color:var(--px-color-background-container-default-default)}:host(:first-child),:host(:first-child) button{border-radius:var(--px-radius-main) var(--px-radius-none) var(--px-radius-none) var(--px-radius-main)}:host(:last-of-type),:host(:last-of-type) button{border-radius:var(--px-radius-none) var(--px-radius-main) var(--px-radius-main) var(--px-radius-none)}:host([selected]){background-color:var(--px-color-background-state-active-default);border-radius:var(--px-radius-main)!important}:host([selected])>button{cursor:auto;padding-block:var(--px-padding-m-mobile);color:var(--px-color-text-neutral-inverted)}button{background:none;border:none;margin:0;padding:var(--px-padding-s-mobile);cursor:pointer;height:inherit;width:inherit;font-size:var(--px-text-size-label-l-mobile);font-weight:var(--px-font-weight-title);text-wrap:nowrap;color:var(--px-color-text-neutral-default);outline:none}:host(:focus-visible){outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}:host(:not([selected])) button:hover{background-color:var(--px-color-background-state-hover-default)}:host([inverted]) button{color:var(--px-color-text-neutral-inverted)}:host([inverted]:not([selected])) button:hover{background-color:var(--px-color-background-state-hover-inverted)}:host([inverted][selected]) button{color:var(--px-color-text-brand-default)}:host([inverted]:focus-visible){outline-color:var(--px-color-border-focus-outline-inverted)}@media only screen and (min-width: 768px){button{padding:var(--px-padding-s-desktop);font-size:var(--px-text-size-label-l-desktop)}:host[selected]>button{padding-block:var(--px-padding-m-desktop)}}@media only screen and (min-width: 1025px){button{padding:var(--px-padding-s-desktop);font-size:var(--px-text-size-label-l-desktop)}:host[selected]>button{padding-block:var(--px-padding-m-desktop)}}";
|
|
14727
14906
|
const styleSheet$7 = new CSSStyleSheet();
|
|
14728
14907
|
styleSheet$7.replaceSync(styles$6);
|
|
14908
|
+
const TAB_SELECTED_EVENT = "px.lavender.tab.selected";
|
|
14909
|
+
const TAB_CONNECTED_EVENT = "px-tab-connected";
|
|
14910
|
+
class Tab extends HTMLElement {
|
|
14911
|
+
constructor() {
|
|
14912
|
+
var _a;
|
|
14913
|
+
super();
|
|
14914
|
+
this.template = () => `
|
|
14915
|
+
<button type="button" tabindex="-1" >
|
|
14916
|
+
<span><slot></slot></span>
|
|
14917
|
+
</button>
|
|
14918
|
+
`;
|
|
14919
|
+
this.attachShadow({ mode: "open" });
|
|
14920
|
+
this.shadowRoot.innerHTML = this.template();
|
|
14921
|
+
this.shadowRoot.adoptedStyleSheets = [styleSheet$7];
|
|
14922
|
+
this.internals = (_a = this.attachInternals) == null ? void 0 : _a.call(this);
|
|
14923
|
+
}
|
|
14924
|
+
static get observedAttributes() {
|
|
14925
|
+
return ["selected", "for", "name", "inverted"];
|
|
14926
|
+
}
|
|
14927
|
+
connectedCallback() {
|
|
14928
|
+
this.role = "tab";
|
|
14929
|
+
if (this.internals) {
|
|
14930
|
+
this.internals.role = "tab";
|
|
14931
|
+
}
|
|
14932
|
+
this.ariaSelected = `${this.selected}`;
|
|
14933
|
+
this.slot = "tabs";
|
|
14934
|
+
this.dispatchEvent(
|
|
14935
|
+
new CustomEvent(TAB_CONNECTED_EVENT, { bubbles: true, composed: true })
|
|
14936
|
+
);
|
|
14937
|
+
this.addEventListener("click", () => {
|
|
14938
|
+
this.selected = true;
|
|
14939
|
+
});
|
|
14940
|
+
}
|
|
14941
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
14942
|
+
if (name === "selected") {
|
|
14943
|
+
this.handleSelected(newValue);
|
|
14944
|
+
} else if (name === "name") {
|
|
14945
|
+
this.$button.setAttribute("id", newValue);
|
|
14946
|
+
} else if (name === "for") {
|
|
14947
|
+
this.setAttribute("aria-controls", newValue);
|
|
14948
|
+
} else if (name === "inverted") {
|
|
14949
|
+
if (newValue === "") {
|
|
14950
|
+
this.$button.setAttribute("inverted", "");
|
|
14951
|
+
} else {
|
|
14952
|
+
this.$button.removeAttribute("inverted");
|
|
14953
|
+
}
|
|
14954
|
+
}
|
|
14955
|
+
}
|
|
14956
|
+
get $button() {
|
|
14957
|
+
return this.shadowRoot.querySelector("button");
|
|
14958
|
+
}
|
|
14959
|
+
get selected() {
|
|
14960
|
+
return this.hasAttribute("selected");
|
|
14961
|
+
}
|
|
14962
|
+
set selected(value) {
|
|
14963
|
+
if (value) {
|
|
14964
|
+
this.setAttribute("selected", "");
|
|
14965
|
+
} else {
|
|
14966
|
+
this.removeAttribute("selected");
|
|
14967
|
+
}
|
|
14968
|
+
}
|
|
14969
|
+
get inverted() {
|
|
14970
|
+
return this.hasAttribute("inverted");
|
|
14971
|
+
}
|
|
14972
|
+
set name(value) {
|
|
14973
|
+
this.setAttribute("name", value);
|
|
14974
|
+
}
|
|
14975
|
+
get name() {
|
|
14976
|
+
return this.getAttribute("name");
|
|
14977
|
+
}
|
|
14978
|
+
set for(value) {
|
|
14979
|
+
this.setAttribute("for", value);
|
|
14980
|
+
}
|
|
14981
|
+
get for() {
|
|
14982
|
+
return this.getAttribute("for");
|
|
14983
|
+
}
|
|
14984
|
+
handleSelected(value) {
|
|
14985
|
+
if (value !== "") {
|
|
14986
|
+
this.tabIndex = -1;
|
|
14987
|
+
if (this.internals) {
|
|
14988
|
+
this.internals.ariaSelected = `false`;
|
|
14989
|
+
}
|
|
14990
|
+
this.ariaSelected = `false`;
|
|
14991
|
+
} else {
|
|
14992
|
+
setTimeout(() => {
|
|
14993
|
+
this.dispatchEvent(
|
|
14994
|
+
new CustomEvent(TAB_SELECTED_EVENT, {
|
|
14995
|
+
bubbles: true,
|
|
14996
|
+
composed: true,
|
|
14997
|
+
detail: {
|
|
14998
|
+
tabName: this.name,
|
|
14999
|
+
forName: this.for
|
|
15000
|
+
}
|
|
15001
|
+
})
|
|
15002
|
+
);
|
|
15003
|
+
});
|
|
15004
|
+
this.focus();
|
|
15005
|
+
this.tabIndex = 0;
|
|
15006
|
+
if (this.internals) {
|
|
15007
|
+
this.internals.ariaSelected = `true`;
|
|
15008
|
+
}
|
|
15009
|
+
this.ariaSelected = `true`;
|
|
15010
|
+
}
|
|
15011
|
+
}
|
|
15012
|
+
}
|
|
15013
|
+
const styles$5 = '*{font-family:var(--px-font-family)}#container{display:flex;flex-direction:column;align-items:flex-start;gap:var(--px-spacing-default-mobile)}#tab-container{position:relative;width:100%}#tab-container>#previous{position:absolute;top:.75em;left:-1.5em}#tab-container>#next{position:absolute;top:.75em;right:-1.5em}#panels{width:100%}#tablist{display:flex;align-items:center;scrollbar-width:none;overflow:scroll;width:100%;box-sizing:border-box;margin:calc(calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile)) * -1);padding:calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile))}#tablist::-webkit-scrollbar{display:none}:host([inverted]) #tablist ::slotted(px-tab){background-color:var(--px-color-background-container-default-inverted)}:host([inverted]) #tablist ::slotted(px-tab[selected=""]){background-color:var(--px-color-background-state-active-inverted)}:host([inverted]) #tablist ::slotted(px-tab[selected=""])>button{color:var(--px-color-text-brand-default)}:host([inverted]) button[role=tab]{color:var(--px-color-text-neutral-inverted)}:host([inverted]) button[aria-selected=""]{color:var(--px-color-text-brand-default)}@media only screen and (min-width: 768px){#container{gap:var(--px-spacing-default-desktop)}#tablist{margin:calc(calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet)) * -1);padding:calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet))}}@media only screen and (min-width: 1025px){#container{gap:var(--px-spacing-default-desktop)}#tablist{margin:calc(calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop)) * -1);padding:calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop))}}';
|
|
15014
|
+
const styleSheet$6 = new CSSStyleSheet();
|
|
15015
|
+
styleSheet$6.replaceSync(styles$5);
|
|
14729
15016
|
class Tabs extends HTMLElement {
|
|
14730
15017
|
constructor() {
|
|
14731
15018
|
var _a;
|
|
14732
15019
|
super();
|
|
15020
|
+
__privateAdd(this, _Tabs_instances);
|
|
14733
15021
|
this._label = `tabs-${Math.random().toString(36).substring(2, 15)}`;
|
|
14734
15022
|
this.tabsConnected = 0;
|
|
14735
15023
|
this.template = () => `
|
|
@@ -14750,23 +15038,25 @@ class Tabs extends HTMLElement {
|
|
|
14750
15038
|
</div>
|
|
14751
15039
|
</div>
|
|
14752
15040
|
`;
|
|
15041
|
+
this.handleNextPreviousDisplay = () => {
|
|
15042
|
+
if (this.allTabsConnected() && this.$prefixButton && this.$suffixButton) {
|
|
15043
|
+
this.$prefixButton.style.display = this.shouldDisplayScrollLeftButton() ? "" : "none";
|
|
15044
|
+
this.$suffixButton.style.display = this.shouldDisplayScrollRightButton() ? "" : "none";
|
|
15045
|
+
}
|
|
15046
|
+
};
|
|
14753
15047
|
this.attachShadow({ mode: "open" });
|
|
14754
15048
|
this.shadowRoot.innerHTML = this.template();
|
|
14755
|
-
this.shadowRoot.adoptedStyleSheets = [styleSheet$
|
|
15049
|
+
this.shadowRoot.adoptedStyleSheets = [styleSheet$6];
|
|
14756
15050
|
this.internals = (_a = this.attachInternals) == null ? void 0 : _a.call(this);
|
|
14757
|
-
this.addEventListener("px-tab-connected", () => {
|
|
14758
|
-
this.tabsConnected++;
|
|
14759
|
-
this.handleNextPreviousDisplay();
|
|
14760
|
-
});
|
|
14761
|
-
window.addEventListener("resize", () => {
|
|
14762
|
-
this.handleNextPreviousDisplay();
|
|
14763
|
-
});
|
|
14764
|
-
this.$tabList.addEventListener("scroll", () => {
|
|
14765
|
-
this.handleNextPreviousDisplay();
|
|
14766
|
-
});
|
|
14767
15051
|
}
|
|
14768
15052
|
static get observedAttributes() {
|
|
14769
|
-
return [
|
|
15053
|
+
return [
|
|
15054
|
+
"label",
|
|
15055
|
+
"inverted",
|
|
15056
|
+
"aria-label-next",
|
|
15057
|
+
"aria-label-previous",
|
|
15058
|
+
"hide-controls"
|
|
15059
|
+
];
|
|
14770
15060
|
}
|
|
14771
15061
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
14772
15062
|
switch (name) {
|
|
@@ -14786,10 +15076,16 @@ class Tabs extends HTMLElement {
|
|
|
14786
15076
|
);
|
|
14787
15077
|
}
|
|
14788
15078
|
break;
|
|
15079
|
+
case "hide-controls":
|
|
15080
|
+
__privateMethod(this, _Tabs_instances, handleHideControls_fn).call(this, newValue);
|
|
15081
|
+
break;
|
|
15082
|
+
case "inverted":
|
|
15083
|
+
__privateMethod(this, _Tabs_instances, handleInverted_fn).call(this, newValue);
|
|
15084
|
+
break;
|
|
14789
15085
|
}
|
|
14790
15086
|
}
|
|
14791
15087
|
connectedCallback() {
|
|
14792
|
-
var _a, _b
|
|
15088
|
+
var _a, _b;
|
|
14793
15089
|
this.shadowRoot.querySelector("#tablist").setAttribute("aria-labelledby", this._label);
|
|
14794
15090
|
if (this.getAttribute("label")) {
|
|
14795
15091
|
this.label = this.getAttribute("label");
|
|
@@ -14798,21 +15094,36 @@ class Tabs extends HTMLElement {
|
|
|
14798
15094
|
if (this.internals) {
|
|
14799
15095
|
this.internals.role = "tablist";
|
|
14800
15096
|
}
|
|
14801
|
-
this.
|
|
14802
|
-
|
|
14803
|
-
|
|
14804
|
-
|
|
14805
|
-
|
|
14806
|
-
|
|
14807
|
-
|
|
14808
|
-
|
|
14809
|
-
|
|
14810
|
-
|
|
14811
|
-
|
|
14812
|
-
|
|
14813
|
-
}
|
|
15097
|
+
this.addEventListener(
|
|
15098
|
+
TAB_SELECTED_EVENT,
|
|
15099
|
+
(event) => {
|
|
15100
|
+
[...this.$tabPanels].forEach((panel) => {
|
|
15101
|
+
if (panel.getAttribute("name") !== event.detail.forName && panel.hasAttribute("selected")) {
|
|
15102
|
+
panel.removeAttribute("selected");
|
|
15103
|
+
panel.removeAttribute("aria-labelledby");
|
|
15104
|
+
}
|
|
15105
|
+
if (panel.getAttribute("name") === event.detail.forName) {
|
|
15106
|
+
panel.setAttribute("selected", "");
|
|
15107
|
+
panel.setAttribute("aria-labelledby", event.detail.tabName);
|
|
15108
|
+
}
|
|
15109
|
+
});
|
|
15110
|
+
[...this.$tabs].forEach((tab) => {
|
|
15111
|
+
if (tab.getAttribute("name") !== event.detail.tabName && tab.hasAttribute("selected")) {
|
|
15112
|
+
tab.removeAttribute("selected");
|
|
15113
|
+
}
|
|
15114
|
+
});
|
|
15115
|
+
}
|
|
15116
|
+
);
|
|
15117
|
+
this.addEventListener(TAB_CONNECTED_EVENT, () => {
|
|
15118
|
+
this.tabsConnected++;
|
|
15119
|
+
this.handleNextPreviousDisplay();
|
|
15120
|
+
if (this.allTabsConnected() && this.inverted) {
|
|
15121
|
+
__privateMethod(this, _Tabs_instances, handleInverted_fn).call(this, this.getAttribute("inverted"));
|
|
14814
15122
|
}
|
|
14815
15123
|
});
|
|
15124
|
+
if (this.allTabsConnected()) {
|
|
15125
|
+
__privateMethod(this, _Tabs_instances, handleInverted_fn).call(this, this.getAttribute("inverted"));
|
|
15126
|
+
}
|
|
14816
15127
|
this.addEventListener("keydown", (event) => {
|
|
14817
15128
|
var _a2, _b2;
|
|
14818
15129
|
if ((event.key === "ArrowRight" || event.key === "ArrowLeft") && ((_b2 = (_a2 = document.activeElement) == null ? void 0 : _a2.localName) == null ? void 0 : _b2.endsWith("-tab"))) {
|
|
@@ -14833,26 +15144,11 @@ class Tabs extends HTMLElement {
|
|
|
14833
15144
|
behavior: "smooth"
|
|
14834
15145
|
});
|
|
14835
15146
|
});
|
|
14836
|
-
|
|
14837
|
-
|
|
14838
|
-
(_d = this.$suffixButton) == null ? void 0 : _d.setAttribute("inverted", "");
|
|
14839
|
-
}
|
|
14840
|
-
if (!this.hasAttribute("hide-controls")) {
|
|
14841
|
-
this.$suffixButton.setAttribute(
|
|
14842
|
-
"aria-label",
|
|
14843
|
-
this.ariaLabelNext || "Next tab"
|
|
14844
|
-
);
|
|
14845
|
-
this.$prefixButton.setAttribute(
|
|
14846
|
-
"aria-label",
|
|
14847
|
-
this.ariaLabelPrevious || "Previous tab"
|
|
14848
|
-
);
|
|
14849
|
-
}
|
|
15147
|
+
window.addEventListener("resize", this.handleNextPreviousDisplay);
|
|
15148
|
+
this.$tabList.addEventListener("scroll", this.handleNextPreviousDisplay);
|
|
14850
15149
|
}
|
|
14851
|
-
|
|
14852
|
-
|
|
14853
|
-
this.$prefixButton.remove();
|
|
14854
|
-
this.$suffixButton.remove();
|
|
14855
|
-
}
|
|
15150
|
+
disconnectedCallback() {
|
|
15151
|
+
window.addEventListener("resize", this.handleNextPreviousDisplay);
|
|
14856
15152
|
}
|
|
14857
15153
|
navigateToTab(direction) {
|
|
14858
15154
|
const nextTab = this.$nextTab;
|
|
@@ -14868,14 +15164,8 @@ class Tabs extends HTMLElement {
|
|
|
14868
15164
|
}
|
|
14869
15165
|
this.$activePanel.selected = true;
|
|
14870
15166
|
}
|
|
14871
|
-
handleNextPreviousDisplay() {
|
|
14872
|
-
if (this.allTabsConnected() && this.$prefixButton && this.$suffixButton) {
|
|
14873
|
-
this.$prefixButton.style.display = this.shouldDisplayScrollLeftButton() ? "" : "none";
|
|
14874
|
-
this.$suffixButton.style.display = this.shouldDisplayScrollRightButton() ? "" : "none";
|
|
14875
|
-
}
|
|
14876
|
-
}
|
|
14877
15167
|
allTabsConnected() {
|
|
14878
|
-
return this.tabsConnected === this.querySelectorAll('[slot="tabs"]').length;
|
|
15168
|
+
return this.tabsConnected === this.querySelectorAll('[slot="tabs"]').length || [...this.$tabs].every((tab) => tab.isConnected);
|
|
14879
15169
|
}
|
|
14880
15170
|
shouldDisplayScrollRightButton() {
|
|
14881
15171
|
return this.allTabsConnected() && this.$tabList.scrollWidth > this.$tabList.clientWidth && this.$tabList.scrollWidth - this.$tabList.scrollLeft !== this.$tabList.clientWidth;
|
|
@@ -14903,11 +15193,18 @@ class Tabs extends HTMLElement {
|
|
|
14903
15193
|
}
|
|
14904
15194
|
}
|
|
14905
15195
|
get $activePanel() {
|
|
14906
|
-
|
|
15196
|
+
var _a;
|
|
15197
|
+
return this.querySelector(`[name="${(_a = this.$activeTab) == null ? void 0 : _a.for}"]`);
|
|
14907
15198
|
}
|
|
14908
15199
|
get $tabList() {
|
|
14909
15200
|
return this.shadowRoot.querySelector("#tablist");
|
|
14910
15201
|
}
|
|
15202
|
+
get $tabs() {
|
|
15203
|
+
return this.querySelectorAll('[slot="tabs"]');
|
|
15204
|
+
}
|
|
15205
|
+
get $tabPanels() {
|
|
15206
|
+
return this.querySelectorAll('[slot="tabpanels"]');
|
|
15207
|
+
}
|
|
14911
15208
|
get $prefixButton() {
|
|
14912
15209
|
return this.shadowRoot.querySelector("#previous");
|
|
14913
15210
|
}
|
|
@@ -14930,95 +15227,42 @@ class Tabs extends HTMLElement {
|
|
|
14930
15227
|
return this.getAttribute("aria-label-previous");
|
|
14931
15228
|
}
|
|
14932
15229
|
}
|
|
14933
|
-
|
|
14934
|
-
|
|
14935
|
-
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
|
|
14943
|
-
|
|
14944
|
-
|
|
14945
|
-
|
|
14946
|
-
|
|
14947
|
-
|
|
14948
|
-
|
|
14949
|
-
|
|
14950
|
-
|
|
14951
|
-
|
|
15230
|
+
_Tabs_instances = new WeakSet();
|
|
15231
|
+
handleInverted_fn = function(inverted) {
|
|
15232
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
15233
|
+
if (inverted === "") {
|
|
15234
|
+
(_a = this.$prefixButton) == null ? void 0 : _a.setAttribute("inverted", "");
|
|
15235
|
+
(_b = this.$suffixButton) == null ? void 0 : _b.setAttribute("inverted", "");
|
|
15236
|
+
(_c = this.$activePanel) == null ? void 0 : _c.setAttribute("inverted", "");
|
|
15237
|
+
(_d = this.$activeTab) == null ? void 0 : _d.setAttribute("inverted", "");
|
|
15238
|
+
[...this.$tabs].forEach((tab) => {
|
|
15239
|
+
tab.setAttribute("inverted", "");
|
|
15240
|
+
});
|
|
15241
|
+
} else {
|
|
15242
|
+
(_e = this.$prefixButton) == null ? void 0 : _e.removeAttribute("inverted");
|
|
15243
|
+
(_f = this.$suffixButton) == null ? void 0 : _f.removeAttribute("inverted");
|
|
15244
|
+
(_g = this.$activePanel) == null ? void 0 : _g.removeAttribute("inverted");
|
|
15245
|
+
(_h = this.$activeTab) == null ? void 0 : _h.removeAttribute("inverted");
|
|
15246
|
+
[...this.$tabs].forEach((tab) => {
|
|
15247
|
+
tab.removeAttribute("inverted");
|
|
15248
|
+
});
|
|
14952
15249
|
}
|
|
14953
|
-
|
|
14954
|
-
|
|
14955
|
-
|
|
14956
|
-
|
|
14957
|
-
|
|
14958
|
-
|
|
14959
|
-
this.
|
|
14960
|
-
|
|
14961
|
-
this.
|
|
14962
|
-
|
|
14963
|
-
|
|
14964
|
-
|
|
14965
|
-
|
|
15250
|
+
};
|
|
15251
|
+
handleHideControls_fn = function(hideControls) {
|
|
15252
|
+
if (hideControls === "") {
|
|
15253
|
+
this.$prefixButton.remove();
|
|
15254
|
+
this.$suffixButton.remove();
|
|
15255
|
+
} else {
|
|
15256
|
+
this.$suffixButton.setAttribute(
|
|
15257
|
+
"aria-label",
|
|
15258
|
+
this.ariaLabelNext || "Next tab"
|
|
15259
|
+
);
|
|
15260
|
+
this.$prefixButton.setAttribute(
|
|
15261
|
+
"aria-label",
|
|
15262
|
+
this.ariaLabelPrevious || "Previous tab"
|
|
14966
15263
|
);
|
|
14967
15264
|
}
|
|
14968
|
-
|
|
14969
|
-
if (name === "selected") {
|
|
14970
|
-
this.handleSelected(newValue);
|
|
14971
|
-
} else if (name === "name") {
|
|
14972
|
-
this.$button.setAttribute("id", newValue);
|
|
14973
|
-
} else if (name === "for") {
|
|
14974
|
-
this.setAttribute("aria-controls", newValue);
|
|
14975
|
-
}
|
|
14976
|
-
}
|
|
14977
|
-
get $button() {
|
|
14978
|
-
return this.shadowRoot.querySelector("button");
|
|
14979
|
-
}
|
|
14980
|
-
get selected() {
|
|
14981
|
-
return this.hasAttribute("selected") ? true : false;
|
|
14982
|
-
}
|
|
14983
|
-
set selected(value) {
|
|
14984
|
-
if (value) {
|
|
14985
|
-
this.setAttribute("selected", "");
|
|
14986
|
-
} else {
|
|
14987
|
-
this.removeAttribute("selected");
|
|
14988
|
-
}
|
|
14989
|
-
}
|
|
14990
|
-
get inverted() {
|
|
14991
|
-
return this.hasAttribute("inverted");
|
|
14992
|
-
}
|
|
14993
|
-
set name(value) {
|
|
14994
|
-
this.setAttribute("name", value);
|
|
14995
|
-
}
|
|
14996
|
-
get name() {
|
|
14997
|
-
return this.getAttribute("name");
|
|
14998
|
-
}
|
|
14999
|
-
set for(value) {
|
|
15000
|
-
this.setAttribute("for", value);
|
|
15001
|
-
}
|
|
15002
|
-
get for() {
|
|
15003
|
-
return this.getAttribute("for");
|
|
15004
|
-
}
|
|
15005
|
-
handleSelected(value) {
|
|
15006
|
-
if (value === null) {
|
|
15007
|
-
this.tabIndex = -1;
|
|
15008
|
-
if (this.internals) {
|
|
15009
|
-
this.internals.ariaSelected = `false`;
|
|
15010
|
-
}
|
|
15011
|
-
this.ariaSelected = `false`;
|
|
15012
|
-
} else {
|
|
15013
|
-
this.focus();
|
|
15014
|
-
this.tabIndex = 0;
|
|
15015
|
-
if (this.internals) {
|
|
15016
|
-
this.internals.ariaSelected = `true`;
|
|
15017
|
-
}
|
|
15018
|
-
this.ariaSelected = `true`;
|
|
15019
|
-
}
|
|
15020
|
-
}
|
|
15021
|
-
}
|
|
15265
|
+
};
|
|
15022
15266
|
class TabPanel extends HTMLElement {
|
|
15023
15267
|
constructor() {
|
|
15024
15268
|
super();
|
|
@@ -15029,36 +15273,25 @@ class TabPanel extends HTMLElement {
|
|
|
15029
15273
|
`;
|
|
15030
15274
|
this.attachShadow({ mode: "open" });
|
|
15031
15275
|
this.shadowRoot.innerHTML = this.template();
|
|
15032
|
-
this.shadowRoot.adoptedStyleSheets = [styleSheet$
|
|
15276
|
+
this.shadowRoot.adoptedStyleSheets = [styleSheet$6];
|
|
15033
15277
|
}
|
|
15034
15278
|
static get observedAttributes() {
|
|
15035
|
-
return ["name"];
|
|
15279
|
+
return ["name", "selected"];
|
|
15036
15280
|
}
|
|
15037
15281
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
15038
15282
|
if (name === "name") {
|
|
15039
15283
|
this.$panel.setAttribute("aria-labelledby", newValue);
|
|
15284
|
+
} else if (name === "selected") {
|
|
15285
|
+
if (newValue === "") {
|
|
15286
|
+
this.$panel.style.display = "block";
|
|
15287
|
+
} else {
|
|
15288
|
+
this.$panel.style.display = "none";
|
|
15289
|
+
}
|
|
15040
15290
|
}
|
|
15041
15291
|
}
|
|
15042
15292
|
connectedCallback() {
|
|
15043
|
-
if (this.name) this.$panel.setAttribute("aria-labelledby", this.name);
|
|
15044
15293
|
this.slot = "tabpanels";
|
|
15045
|
-
|
|
15046
|
-
`[for="${this.getAttribute("name")}"]`
|
|
15047
|
-
);
|
|
15048
|
-
if (labelledBy) {
|
|
15049
|
-
this.$panel.setAttribute(
|
|
15050
|
-
"aria-labelledby",
|
|
15051
|
-
labelledBy.getAttribute("name")
|
|
15052
|
-
);
|
|
15053
|
-
}
|
|
15054
|
-
const selectedTab = this.parentElement.querySelector(
|
|
15055
|
-
`[for="${this.name}"]`
|
|
15056
|
-
);
|
|
15057
|
-
if (!isFalsy(selectedTab.selected)) {
|
|
15058
|
-
this.selected = true;
|
|
15059
|
-
} else {
|
|
15060
|
-
this.selected = false;
|
|
15061
|
-
}
|
|
15294
|
+
this.$panel.style.display = "none";
|
|
15062
15295
|
}
|
|
15063
15296
|
get name() {
|
|
15064
15297
|
return this.getAttribute("name");
|
|
@@ -15068,11 +15301,14 @@ class TabPanel extends HTMLElement {
|
|
|
15068
15301
|
}
|
|
15069
15302
|
set selected(value) {
|
|
15070
15303
|
if (value) {
|
|
15071
|
-
this
|
|
15304
|
+
this.setAttribute("selected", "");
|
|
15072
15305
|
} else {
|
|
15073
|
-
this
|
|
15306
|
+
this.removeAttribute("selected");
|
|
15074
15307
|
}
|
|
15075
15308
|
}
|
|
15309
|
+
get selected() {
|
|
15310
|
+
return this.hasAttribute("selected");
|
|
15311
|
+
}
|
|
15076
15312
|
get $panel() {
|
|
15077
15313
|
return this.shadowRoot.querySelector('[role="tabpanel"]');
|
|
15078
15314
|
}
|
|
@@ -15557,7 +15793,7 @@ class TileCheckbox extends WithExtraAttributes {
|
|
|
15557
15793
|
<div class="tile-checkbox">
|
|
15558
15794
|
<px-tile hoverable>
|
|
15559
15795
|
<slot name="prefix" slot="prefix"></slot>
|
|
15560
|
-
<px-checkbox slot="suffix"
|
|
15796
|
+
<px-checkbox slot="suffix" aria-hidden="true" tabindex="-1"></px-checkbox>
|
|
15561
15797
|
<slot name="label" slot="label"></slot>
|
|
15562
15798
|
<slot name="description" slot="description"></slot>
|
|
15563
15799
|
</px-tile>
|
|
@@ -15837,7 +16073,7 @@ class TileRadio extends WithExtraAttributes {
|
|
|
15837
16073
|
<div class="tile-radio">
|
|
15838
16074
|
<px-tile hoverable>
|
|
15839
16075
|
<slot name="prefix" slot="prefix"></slot>
|
|
15840
|
-
<px-radio slot="suffix"
|
|
16076
|
+
<px-radio slot="suffix" aria-hidden="true" tabindex="-1"></px-radio>
|
|
15841
16077
|
<slot name="label" slot="label"></slot>
|
|
15842
16078
|
<slot name="description" slot="description"></slot>
|
|
15843
16079
|
</px-tile>
|
|
@@ -16279,7 +16515,7 @@ class TileSwitch extends WithExtraAttributes {
|
|
|
16279
16515
|
<div class="tile-switch">
|
|
16280
16516
|
<px-tile hoverable>
|
|
16281
16517
|
<slot name="prefix" slot="prefix"></slot>
|
|
16282
|
-
<px-switch slot="suffix"
|
|
16518
|
+
<px-switch slot="suffix" aria-hidden="true" tabindex="-1"></px-switch>
|
|
16283
16519
|
<slot name="label" slot="label"></slot>
|
|
16284
16520
|
<slot name="description" slot="description"></slot>
|
|
16285
16521
|
</px-tile>
|
|
@@ -16815,10 +17051,12 @@ export {
|
|
|
16815
17051
|
VStack,
|
|
16816
17052
|
VerticallyExtendedElement,
|
|
16817
17053
|
WithExtraAttributes,
|
|
17054
|
+
accessibilityAttributes,
|
|
16818
17055
|
accordionBackgroundColorValues,
|
|
16819
17056
|
accordionVariantValues,
|
|
16820
17057
|
addGlobalStylesheet,
|
|
16821
17058
|
alignItemsValues,
|
|
17059
|
+
anchorSpacingValues,
|
|
16822
17060
|
assetContainerImgWidthValues,
|
|
16823
17061
|
backgroundColorValues,
|
|
16824
17062
|
backgroundSizeValues,
|
|
@@ -16873,7 +17111,6 @@ export {
|
|
|
16873
17111
|
listVariantValues,
|
|
16874
17112
|
log,
|
|
16875
17113
|
noBorderRadiusValues,
|
|
16876
|
-
observedAttributes,
|
|
16877
17114
|
overflowValues,
|
|
16878
17115
|
paddingValues,
|
|
16879
17116
|
patchShapeValues,
|
|
@@ -16894,6 +17131,7 @@ export {
|
|
|
16894
17131
|
stateValues,
|
|
16895
17132
|
statusCardStateValues,
|
|
16896
17133
|
statusStateValues,
|
|
17134
|
+
statusValues,
|
|
16897
17135
|
styleSheet$A as styleSheet,
|
|
16898
17136
|
suffixButtonIconVariantValues,
|
|
16899
17137
|
textalignValues,
|