@proximus/lavender 1.4.5-beta.1 → 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 +414 -247
- 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
|
}
|
|
@@ -3695,6 +3731,14 @@ const _Banner = class _Banner extends VerticallyExtendedElement {
|
|
|
3695
3731
|
(_a = super.connectedCallback) == null ? void 0 : _a.call(this);
|
|
3696
3732
|
this.createGridTemplateAreas();
|
|
3697
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
|
+
});
|
|
3698
3742
|
}
|
|
3699
3743
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
3700
3744
|
if (oldValue !== newValue) {
|
|
@@ -3747,6 +3791,9 @@ const _Banner = class _Banner extends VerticallyExtendedElement {
|
|
|
3747
3791
|
}
|
|
3748
3792
|
}
|
|
3749
3793
|
}
|
|
3794
|
+
disconnectedCallback() {
|
|
3795
|
+
this.observer.disconnect();
|
|
3796
|
+
}
|
|
3750
3797
|
createGridTemplateAreas() {
|
|
3751
3798
|
const grid = this.shadowRoot.querySelector(
|
|
3752
3799
|
".banner-content"
|
|
@@ -4419,6 +4466,7 @@ const _ButtonIcon = class _ButtonIcon extends PxElement {
|
|
|
4419
4466
|
static get observedAttributes() {
|
|
4420
4467
|
return [
|
|
4421
4468
|
...super.observedAttributes,
|
|
4469
|
+
...accessibilityAttributes,
|
|
4422
4470
|
"inverted",
|
|
4423
4471
|
"loading",
|
|
4424
4472
|
"size",
|
|
@@ -4444,7 +4492,6 @@ const _ButtonIcon = class _ButtonIcon extends PxElement {
|
|
|
4444
4492
|
icon.setAttribute("color", "inherit");
|
|
4445
4493
|
}
|
|
4446
4494
|
}
|
|
4447
|
-
transferAccessibilityAttributes(this, this.$el, false);
|
|
4448
4495
|
}
|
|
4449
4496
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
4450
4497
|
if (oldValue !== newValue) {
|
|
@@ -8642,7 +8689,7 @@ class Section extends HTMLElement {
|
|
|
8642
8689
|
if (!customElements.get("px-section")) {
|
|
8643
8690
|
customElements.define("px-section", Section);
|
|
8644
8691
|
}
|
|
8645
|
-
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)}}";
|
|
8646
8693
|
const headingStyles$2 = new CSSStyleSheet();
|
|
8647
8694
|
headingStyles$2.replaceSync(headingCss);
|
|
8648
8695
|
const typographyStyles$4 = new CSSStyleSheet();
|
|
@@ -8885,16 +8932,16 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
8885
8932
|
this.template = () => `<div class="content-header">
|
|
8886
8933
|
<div class="contrast-helper"></div>
|
|
8887
8934
|
<px-section padding-block="l">
|
|
8888
|
-
|
|
8889
|
-
|
|
8890
|
-
|
|
8891
|
-
|
|
8892
|
-
|
|
8893
|
-
|
|
8894
|
-
|
|
8895
|
-
|
|
8896
|
-
|
|
8897
|
-
|
|
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>
|
|
8898
8945
|
</px-section>
|
|
8899
8946
|
</div>`;
|
|
8900
8947
|
this.shadowRoot.innerHTML = this.template();
|
|
@@ -11712,24 +11759,53 @@ const _Input = class _Input extends AbstractInputElement {
|
|
|
11712
11759
|
}
|
|
11713
11760
|
connectedCallback() {
|
|
11714
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() {
|
|
11715
11778
|
if (this.$el.type === "search") {
|
|
11716
|
-
this
|
|
11717
|
-
|
|
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) {
|
|
11718
11788
|
this.observer = new MutationObserver(() => {
|
|
11719
11789
|
this.syncDataList();
|
|
11720
11790
|
});
|
|
11721
|
-
this.observer.observe(this, {
|
|
11722
|
-
childList: true,
|
|
11723
|
-
subtree: true
|
|
11724
|
-
});
|
|
11725
11791
|
}
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
|
|
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");
|
|
11731
11799
|
}
|
|
11732
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
|
+
}
|
|
11733
11809
|
syncDataList() {
|
|
11734
11810
|
var _a, _b;
|
|
11735
11811
|
const newSuggestions = (_a = this.$lightSuggestions) == null ? void 0 : _a.cloneNode(
|
|
@@ -11757,13 +11833,26 @@ const _Input = class _Input extends AbstractInputElement {
|
|
|
11757
11833
|
return this.querySelector("datalist");
|
|
11758
11834
|
}
|
|
11759
11835
|
get $shadowSuggestions() {
|
|
11760
|
-
|
|
11836
|
+
var _a;
|
|
11837
|
+
return ((_a = this.shadowRoot) == null ? void 0 : _a.querySelector("datalist")) ?? null;
|
|
11761
11838
|
}
|
|
11762
11839
|
get $container() {
|
|
11763
|
-
|
|
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
|
+
}
|
|
11764
11852
|
}
|
|
11765
11853
|
};
|
|
11766
11854
|
_Input.nativeName = "input";
|
|
11855
|
+
_Input.accessorExclusions = ["type"];
|
|
11767
11856
|
let Input = _Input;
|
|
11768
11857
|
if (!customElements.get("px-input")) {
|
|
11769
11858
|
customElements.define("px-input", Input);
|
|
@@ -13133,7 +13222,7 @@ const priceSizeValues = ["", "s", "m", "l"];
|
|
|
13133
13222
|
const _Price = class _Price extends PxElement {
|
|
13134
13223
|
constructor() {
|
|
13135
13224
|
super(styles$i);
|
|
13136
|
-
this.template = () => `<span class="price"
|
|
13225
|
+
this.template = () => `<span class="price"></span>`;
|
|
13137
13226
|
this.shadowRoot.innerHTML = this.template();
|
|
13138
13227
|
}
|
|
13139
13228
|
static get observedAttributes() {
|
|
@@ -13329,6 +13418,20 @@ class SelectableBox extends WithExtraAttributes {
|
|
|
13329
13418
|
if (!customElements.get("px-selectable-box")) {
|
|
13330
13419
|
customElements.define("px-selectable-box", SelectableBox);
|
|
13331
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
|
+
}
|
|
13332
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)}';
|
|
13333
13436
|
const styleSheet$g = new CSSStyleSheet();
|
|
13334
13437
|
styleSheet$g.replaceSync(styles$f);
|
|
@@ -13447,6 +13550,9 @@ class SelectableBoxCheckbox extends WithExtraAttributes {
|
|
|
13447
13550
|
}
|
|
13448
13551
|
}
|
|
13449
13552
|
setClickEvent(event) {
|
|
13553
|
+
if (shouldIgnoreSelectableBoxClick(event, this)) {
|
|
13554
|
+
return;
|
|
13555
|
+
}
|
|
13450
13556
|
this.checked = !this.checked;
|
|
13451
13557
|
event.stopPropagation();
|
|
13452
13558
|
event.preventDefault();
|
|
@@ -13720,6 +13826,9 @@ class SelectableBoxRadio extends WithExtraAttributes {
|
|
|
13720
13826
|
}
|
|
13721
13827
|
}
|
|
13722
13828
|
setClickEvent(event) {
|
|
13829
|
+
if (shouldIgnoreSelectableBoxClick(event, this)) {
|
|
13830
|
+
return;
|
|
13831
|
+
}
|
|
13723
13832
|
if (!this.checked) {
|
|
13724
13833
|
this.checked = true;
|
|
13725
13834
|
}
|
|
@@ -14793,13 +14902,122 @@ class Td extends HTMLElement {
|
|
|
14793
14902
|
if (!customElements.get("px-td")) {
|
|
14794
14903
|
customElements.define("px-td", Td);
|
|
14795
14904
|
}
|
|
14796
|
-
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)}}";
|
|
14797
14906
|
const styleSheet$7 = new CSSStyleSheet();
|
|
14798
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);
|
|
14799
15016
|
class Tabs extends HTMLElement {
|
|
14800
15017
|
constructor() {
|
|
14801
15018
|
var _a;
|
|
14802
15019
|
super();
|
|
15020
|
+
__privateAdd(this, _Tabs_instances);
|
|
14803
15021
|
this._label = `tabs-${Math.random().toString(36).substring(2, 15)}`;
|
|
14804
15022
|
this.tabsConnected = 0;
|
|
14805
15023
|
this.template = () => `
|
|
@@ -14820,23 +15038,25 @@ class Tabs extends HTMLElement {
|
|
|
14820
15038
|
</div>
|
|
14821
15039
|
</div>
|
|
14822
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
|
+
};
|
|
14823
15047
|
this.attachShadow({ mode: "open" });
|
|
14824
15048
|
this.shadowRoot.innerHTML = this.template();
|
|
14825
|
-
this.shadowRoot.adoptedStyleSheets = [styleSheet$
|
|
15049
|
+
this.shadowRoot.adoptedStyleSheets = [styleSheet$6];
|
|
14826
15050
|
this.internals = (_a = this.attachInternals) == null ? void 0 : _a.call(this);
|
|
14827
|
-
this.addEventListener("px-tab-connected", () => {
|
|
14828
|
-
this.tabsConnected++;
|
|
14829
|
-
this.handleNextPreviousDisplay();
|
|
14830
|
-
});
|
|
14831
|
-
window.addEventListener("resize", () => {
|
|
14832
|
-
this.handleNextPreviousDisplay();
|
|
14833
|
-
});
|
|
14834
|
-
this.$tabList.addEventListener("scroll", () => {
|
|
14835
|
-
this.handleNextPreviousDisplay();
|
|
14836
|
-
});
|
|
14837
15051
|
}
|
|
14838
15052
|
static get observedAttributes() {
|
|
14839
|
-
return [
|
|
15053
|
+
return [
|
|
15054
|
+
"label",
|
|
15055
|
+
"inverted",
|
|
15056
|
+
"aria-label-next",
|
|
15057
|
+
"aria-label-previous",
|
|
15058
|
+
"hide-controls"
|
|
15059
|
+
];
|
|
14840
15060
|
}
|
|
14841
15061
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
14842
15062
|
switch (name) {
|
|
@@ -14856,10 +15076,16 @@ class Tabs extends HTMLElement {
|
|
|
14856
15076
|
);
|
|
14857
15077
|
}
|
|
14858
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;
|
|
14859
15085
|
}
|
|
14860
15086
|
}
|
|
14861
15087
|
connectedCallback() {
|
|
14862
|
-
var _a, _b
|
|
15088
|
+
var _a, _b;
|
|
14863
15089
|
this.shadowRoot.querySelector("#tablist").setAttribute("aria-labelledby", this._label);
|
|
14864
15090
|
if (this.getAttribute("label")) {
|
|
14865
15091
|
this.label = this.getAttribute("label");
|
|
@@ -14868,21 +15094,36 @@ class Tabs extends HTMLElement {
|
|
|
14868
15094
|
if (this.internals) {
|
|
14869
15095
|
this.internals.role = "tablist";
|
|
14870
15096
|
}
|
|
14871
|
-
this.
|
|
14872
|
-
|
|
14873
|
-
|
|
14874
|
-
|
|
14875
|
-
|
|
14876
|
-
|
|
14877
|
-
|
|
14878
|
-
|
|
14879
|
-
|
|
14880
|
-
|
|
14881
|
-
|
|
14882
|
-
|
|
14883
|
-
}
|
|
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"));
|
|
14884
15122
|
}
|
|
14885
15123
|
});
|
|
15124
|
+
if (this.allTabsConnected()) {
|
|
15125
|
+
__privateMethod(this, _Tabs_instances, handleInverted_fn).call(this, this.getAttribute("inverted"));
|
|
15126
|
+
}
|
|
14886
15127
|
this.addEventListener("keydown", (event) => {
|
|
14887
15128
|
var _a2, _b2;
|
|
14888
15129
|
if ((event.key === "ArrowRight" || event.key === "ArrowLeft") && ((_b2 = (_a2 = document.activeElement) == null ? void 0 : _a2.localName) == null ? void 0 : _b2.endsWith("-tab"))) {
|
|
@@ -14903,26 +15144,11 @@ class Tabs extends HTMLElement {
|
|
|
14903
15144
|
behavior: "smooth"
|
|
14904
15145
|
});
|
|
14905
15146
|
});
|
|
14906
|
-
|
|
14907
|
-
|
|
14908
|
-
(_d = this.$suffixButton) == null ? void 0 : _d.setAttribute("inverted", "");
|
|
14909
|
-
}
|
|
14910
|
-
if (!this.hasAttribute("hide-controls")) {
|
|
14911
|
-
this.$suffixButton.setAttribute(
|
|
14912
|
-
"aria-label",
|
|
14913
|
-
this.ariaLabelNext || "Next tab"
|
|
14914
|
-
);
|
|
14915
|
-
this.$prefixButton.setAttribute(
|
|
14916
|
-
"aria-label",
|
|
14917
|
-
this.ariaLabelPrevious || "Previous tab"
|
|
14918
|
-
);
|
|
14919
|
-
}
|
|
15147
|
+
window.addEventListener("resize", this.handleNextPreviousDisplay);
|
|
15148
|
+
this.$tabList.addEventListener("scroll", this.handleNextPreviousDisplay);
|
|
14920
15149
|
}
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
this.$prefixButton.remove();
|
|
14924
|
-
this.$suffixButton.remove();
|
|
14925
|
-
}
|
|
15150
|
+
disconnectedCallback() {
|
|
15151
|
+
window.addEventListener("resize", this.handleNextPreviousDisplay);
|
|
14926
15152
|
}
|
|
14927
15153
|
navigateToTab(direction) {
|
|
14928
15154
|
const nextTab = this.$nextTab;
|
|
@@ -14938,14 +15164,8 @@ class Tabs extends HTMLElement {
|
|
|
14938
15164
|
}
|
|
14939
15165
|
this.$activePanel.selected = true;
|
|
14940
15166
|
}
|
|
14941
|
-
handleNextPreviousDisplay() {
|
|
14942
|
-
if (this.allTabsConnected() && this.$prefixButton && this.$suffixButton) {
|
|
14943
|
-
this.$prefixButton.style.display = this.shouldDisplayScrollLeftButton() ? "" : "none";
|
|
14944
|
-
this.$suffixButton.style.display = this.shouldDisplayScrollRightButton() ? "" : "none";
|
|
14945
|
-
}
|
|
14946
|
-
}
|
|
14947
15167
|
allTabsConnected() {
|
|
14948
|
-
return this.tabsConnected === this.querySelectorAll('[slot="tabs"]').length;
|
|
15168
|
+
return this.tabsConnected === this.querySelectorAll('[slot="tabs"]').length || [...this.$tabs].every((tab) => tab.isConnected);
|
|
14949
15169
|
}
|
|
14950
15170
|
shouldDisplayScrollRightButton() {
|
|
14951
15171
|
return this.allTabsConnected() && this.$tabList.scrollWidth > this.$tabList.clientWidth && this.$tabList.scrollWidth - this.$tabList.scrollLeft !== this.$tabList.clientWidth;
|
|
@@ -14973,11 +15193,18 @@ class Tabs extends HTMLElement {
|
|
|
14973
15193
|
}
|
|
14974
15194
|
}
|
|
14975
15195
|
get $activePanel() {
|
|
14976
|
-
|
|
15196
|
+
var _a;
|
|
15197
|
+
return this.querySelector(`[name="${(_a = this.$activeTab) == null ? void 0 : _a.for}"]`);
|
|
14977
15198
|
}
|
|
14978
15199
|
get $tabList() {
|
|
14979
15200
|
return this.shadowRoot.querySelector("#tablist");
|
|
14980
15201
|
}
|
|
15202
|
+
get $tabs() {
|
|
15203
|
+
return this.querySelectorAll('[slot="tabs"]');
|
|
15204
|
+
}
|
|
15205
|
+
get $tabPanels() {
|
|
15206
|
+
return this.querySelectorAll('[slot="tabpanels"]');
|
|
15207
|
+
}
|
|
14981
15208
|
get $prefixButton() {
|
|
14982
15209
|
return this.shadowRoot.querySelector("#previous");
|
|
14983
15210
|
}
|
|
@@ -15000,95 +15227,42 @@ class Tabs extends HTMLElement {
|
|
|
15000
15227
|
return this.getAttribute("aria-label-previous");
|
|
15001
15228
|
}
|
|
15002
15229
|
}
|
|
15003
|
-
|
|
15004
|
-
|
|
15005
|
-
|
|
15006
|
-
|
|
15007
|
-
|
|
15008
|
-
|
|
15009
|
-
|
|
15010
|
-
|
|
15011
|
-
|
|
15012
|
-
|
|
15013
|
-
|
|
15014
|
-
|
|
15015
|
-
|
|
15016
|
-
|
|
15017
|
-
|
|
15018
|
-
|
|
15019
|
-
|
|
15020
|
-
|
|
15021
|
-
|
|
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
|
+
});
|
|
15022
15249
|
}
|
|
15023
|
-
|
|
15024
|
-
|
|
15025
|
-
|
|
15026
|
-
|
|
15027
|
-
|
|
15028
|
-
|
|
15029
|
-
this.
|
|
15030
|
-
|
|
15031
|
-
this.
|
|
15032
|
-
|
|
15033
|
-
|
|
15034
|
-
|
|
15035
|
-
|
|
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"
|
|
15036
15263
|
);
|
|
15037
15264
|
}
|
|
15038
|
-
|
|
15039
|
-
if (name === "selected") {
|
|
15040
|
-
this.handleSelected(newValue);
|
|
15041
|
-
} else if (name === "name") {
|
|
15042
|
-
this.$button.setAttribute("id", newValue);
|
|
15043
|
-
} else if (name === "for") {
|
|
15044
|
-
this.setAttribute("aria-controls", newValue);
|
|
15045
|
-
}
|
|
15046
|
-
}
|
|
15047
|
-
get $button() {
|
|
15048
|
-
return this.shadowRoot.querySelector("button");
|
|
15049
|
-
}
|
|
15050
|
-
get selected() {
|
|
15051
|
-
return this.hasAttribute("selected") ? true : false;
|
|
15052
|
-
}
|
|
15053
|
-
set selected(value) {
|
|
15054
|
-
if (value) {
|
|
15055
|
-
this.setAttribute("selected", "");
|
|
15056
|
-
} else {
|
|
15057
|
-
this.removeAttribute("selected");
|
|
15058
|
-
}
|
|
15059
|
-
}
|
|
15060
|
-
get inverted() {
|
|
15061
|
-
return this.hasAttribute("inverted");
|
|
15062
|
-
}
|
|
15063
|
-
set name(value) {
|
|
15064
|
-
this.setAttribute("name", value);
|
|
15065
|
-
}
|
|
15066
|
-
get name() {
|
|
15067
|
-
return this.getAttribute("name");
|
|
15068
|
-
}
|
|
15069
|
-
set for(value) {
|
|
15070
|
-
this.setAttribute("for", value);
|
|
15071
|
-
}
|
|
15072
|
-
get for() {
|
|
15073
|
-
return this.getAttribute("for");
|
|
15074
|
-
}
|
|
15075
|
-
handleSelected(value) {
|
|
15076
|
-
if (value === null) {
|
|
15077
|
-
this.tabIndex = -1;
|
|
15078
|
-
if (this.internals) {
|
|
15079
|
-
this.internals.ariaSelected = `false`;
|
|
15080
|
-
}
|
|
15081
|
-
this.ariaSelected = `false`;
|
|
15082
|
-
} else {
|
|
15083
|
-
this.focus();
|
|
15084
|
-
this.tabIndex = 0;
|
|
15085
|
-
if (this.internals) {
|
|
15086
|
-
this.internals.ariaSelected = `true`;
|
|
15087
|
-
}
|
|
15088
|
-
this.ariaSelected = `true`;
|
|
15089
|
-
}
|
|
15090
|
-
}
|
|
15091
|
-
}
|
|
15265
|
+
};
|
|
15092
15266
|
class TabPanel extends HTMLElement {
|
|
15093
15267
|
constructor() {
|
|
15094
15268
|
super();
|
|
@@ -15099,36 +15273,25 @@ class TabPanel extends HTMLElement {
|
|
|
15099
15273
|
`;
|
|
15100
15274
|
this.attachShadow({ mode: "open" });
|
|
15101
15275
|
this.shadowRoot.innerHTML = this.template();
|
|
15102
|
-
this.shadowRoot.adoptedStyleSheets = [styleSheet$
|
|
15276
|
+
this.shadowRoot.adoptedStyleSheets = [styleSheet$6];
|
|
15103
15277
|
}
|
|
15104
15278
|
static get observedAttributes() {
|
|
15105
|
-
return ["name"];
|
|
15279
|
+
return ["name", "selected"];
|
|
15106
15280
|
}
|
|
15107
15281
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
15108
15282
|
if (name === "name") {
|
|
15109
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
|
+
}
|
|
15110
15290
|
}
|
|
15111
15291
|
}
|
|
15112
15292
|
connectedCallback() {
|
|
15113
|
-
if (this.name) this.$panel.setAttribute("aria-labelledby", this.name);
|
|
15114
15293
|
this.slot = "tabpanels";
|
|
15115
|
-
|
|
15116
|
-
`[for="${this.getAttribute("name")}"]`
|
|
15117
|
-
);
|
|
15118
|
-
if (labelledBy) {
|
|
15119
|
-
this.$panel.setAttribute(
|
|
15120
|
-
"aria-labelledby",
|
|
15121
|
-
labelledBy.getAttribute("name")
|
|
15122
|
-
);
|
|
15123
|
-
}
|
|
15124
|
-
const selectedTab = this.parentElement.querySelector(
|
|
15125
|
-
`[for="${this.name}"]`
|
|
15126
|
-
);
|
|
15127
|
-
if (!isFalsy(selectedTab.selected)) {
|
|
15128
|
-
this.selected = true;
|
|
15129
|
-
} else {
|
|
15130
|
-
this.selected = false;
|
|
15131
|
-
}
|
|
15294
|
+
this.$panel.style.display = "none";
|
|
15132
15295
|
}
|
|
15133
15296
|
get name() {
|
|
15134
15297
|
return this.getAttribute("name");
|
|
@@ -15138,11 +15301,14 @@ class TabPanel extends HTMLElement {
|
|
|
15138
15301
|
}
|
|
15139
15302
|
set selected(value) {
|
|
15140
15303
|
if (value) {
|
|
15141
|
-
this
|
|
15304
|
+
this.setAttribute("selected", "");
|
|
15142
15305
|
} else {
|
|
15143
|
-
this
|
|
15306
|
+
this.removeAttribute("selected");
|
|
15144
15307
|
}
|
|
15145
15308
|
}
|
|
15309
|
+
get selected() {
|
|
15310
|
+
return this.hasAttribute("selected");
|
|
15311
|
+
}
|
|
15146
15312
|
get $panel() {
|
|
15147
15313
|
return this.shadowRoot.querySelector('[role="tabpanel"]');
|
|
15148
15314
|
}
|
|
@@ -16885,10 +17051,12 @@ export {
|
|
|
16885
17051
|
VStack,
|
|
16886
17052
|
VerticallyExtendedElement,
|
|
16887
17053
|
WithExtraAttributes,
|
|
17054
|
+
accessibilityAttributes,
|
|
16888
17055
|
accordionBackgroundColorValues,
|
|
16889
17056
|
accordionVariantValues,
|
|
16890
17057
|
addGlobalStylesheet,
|
|
16891
17058
|
alignItemsValues,
|
|
17059
|
+
anchorSpacingValues,
|
|
16892
17060
|
assetContainerImgWidthValues,
|
|
16893
17061
|
backgroundColorValues,
|
|
16894
17062
|
backgroundSizeValues,
|
|
@@ -16943,7 +17111,6 @@ export {
|
|
|
16943
17111
|
listVariantValues,
|
|
16944
17112
|
log,
|
|
16945
17113
|
noBorderRadiusValues,
|
|
16946
|
-
observedAttributes,
|
|
16947
17114
|
overflowValues,
|
|
16948
17115
|
paddingValues,
|
|
16949
17116
|
patchShapeValues,
|