@proximus/lavender 1.4.3-beta.1 → 1.4.4-alpha.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 +87 -30
- package/dist/lavender.umd.js +1 -1
- package/package.json +1 -1
package/dist/lavender.es.js
CHANGED
|
@@ -7,7 +7,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
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
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;
|
|
10
|
-
const styles$K = ':host{display:block}: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([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([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([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))}}';
|
|
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__ = {};
|
|
13
13
|
function getSupportedPropertyNames(htmlElementName) {
|
|
@@ -1240,6 +1240,10 @@ class Stack extends WithExtraAttributes {
|
|
|
1240
1240
|
`--flex-${cssName}--${breakpoint}-value`,
|
|
1241
1241
|
`var(--px-spacing-${value}-${breakpoint === "laptop" ? "desktop" : breakpoint})`
|
|
1242
1242
|
);
|
|
1243
|
+
this.style.setProperty(
|
|
1244
|
+
`--host-gap--${breakpoint}`,
|
|
1245
|
+
`var(--px-spacing-${value}-${breakpoint === "laptop" ? "desktop" : breakpoint})`
|
|
1246
|
+
);
|
|
1243
1247
|
} else {
|
|
1244
1248
|
this.$el.style.setProperty(
|
|
1245
1249
|
`--flex-${cssName}--${breakpoint}-value`,
|
|
@@ -3634,7 +3638,7 @@ const _Banner = class _Banner extends VerticallyExtendedElement {
|
|
|
3634
3638
|
super(bannerStyles);
|
|
3635
3639
|
this.template = () => `<div class="banner">
|
|
3636
3640
|
<div class="contrast-helper"></div>
|
|
3637
|
-
<px-container class="banner-container" padding
|
|
3641
|
+
<px-container class="banner-container" padding--mobile="m" border-radius="main" >
|
|
3638
3642
|
<px-grid gap="none">
|
|
3639
3643
|
<px-container padding="none" background-color="none">
|
|
3640
3644
|
<div class="banner-content">
|
|
@@ -3674,6 +3678,11 @@ const _Banner = class _Banner extends VerticallyExtendedElement {
|
|
|
3674
3678
|
connectedCallback() {
|
|
3675
3679
|
var _a;
|
|
3676
3680
|
(_a = super.connectedCallback) == null ? void 0 : _a.call(this);
|
|
3681
|
+
if (this.reduced) {
|
|
3682
|
+
this.$container.setAttribute("padding", "m");
|
|
3683
|
+
} else {
|
|
3684
|
+
this.$container.setAttribute("padding", "l");
|
|
3685
|
+
}
|
|
3677
3686
|
this.createGridTemplateAreas();
|
|
3678
3687
|
this.createGridding();
|
|
3679
3688
|
}
|
|
@@ -3761,20 +3770,20 @@ const _Banner = class _Banner extends VerticallyExtendedElement {
|
|
|
3761
3770
|
}
|
|
3762
3771
|
createGridding(value) {
|
|
3763
3772
|
const breakpoints = [
|
|
3764
|
-
{ prop: "hasGridding",
|
|
3773
|
+
{ prop: "hasGridding", gridAttr: "grid-cols", attr: "col-span" },
|
|
3765
3774
|
{
|
|
3766
3775
|
prop: "hasGriddingMobile",
|
|
3767
|
-
|
|
3776
|
+
gridAttr: "grid-cols--mobile",
|
|
3768
3777
|
attr: "col-span--mobile"
|
|
3769
3778
|
},
|
|
3770
3779
|
{
|
|
3771
3780
|
prop: "hasGriddingTablet",
|
|
3772
|
-
|
|
3781
|
+
gridAttr: "grid-cols--tablet",
|
|
3773
3782
|
attr: "col-span--tablet"
|
|
3774
3783
|
},
|
|
3775
3784
|
{
|
|
3776
3785
|
prop: "hasGriddingLaptop",
|
|
3777
|
-
|
|
3786
|
+
gridAttr: "grid-cols--laptop",
|
|
3778
3787
|
attr: "col-span--laptop"
|
|
3779
3788
|
}
|
|
3780
3789
|
];
|
|
@@ -3782,16 +3791,16 @@ const _Banner = class _Banner extends VerticallyExtendedElement {
|
|
|
3782
3791
|
"px-grid > px-container"
|
|
3783
3792
|
);
|
|
3784
3793
|
if (value !== null) {
|
|
3785
|
-
breakpoints.forEach(({ prop,
|
|
3794
|
+
breakpoints.forEach(({ prop, gridAttr, attr }) => {
|
|
3786
3795
|
if (this[prop]) {
|
|
3787
|
-
this.$grid
|
|
3788
|
-
spanElement.setAttribute(attr, "2");
|
|
3796
|
+
this.$grid.setAttribute(gridAttr, "3");
|
|
3797
|
+
spanElement == null ? void 0 : spanElement.setAttribute(attr, "2");
|
|
3789
3798
|
}
|
|
3790
3799
|
});
|
|
3791
3800
|
} else {
|
|
3792
|
-
breakpoints.forEach(({
|
|
3793
|
-
this.$grid
|
|
3794
|
-
spanElement.
|
|
3801
|
+
breakpoints.forEach(({ gridAttr, attr }) => {
|
|
3802
|
+
this.$grid.setAttribute(gridAttr, "1");
|
|
3803
|
+
spanElement == null ? void 0 : spanElement.setAttribute(attr, "1");
|
|
3795
3804
|
});
|
|
3796
3805
|
}
|
|
3797
3806
|
}
|
|
@@ -6815,7 +6824,7 @@ class CellSwitch extends WithExtraAttributes {
|
|
|
6815
6824
|
return `
|
|
6816
6825
|
<div class="cell-switch">
|
|
6817
6826
|
<px-cell hoverable>
|
|
6818
|
-
<px-switch slot="action-indicator"
|
|
6827
|
+
<px-switch slot="action-indicator" inert></px-switch>
|
|
6819
6828
|
<slot name="visual" slot="visual"></slot>
|
|
6820
6829
|
<slot name="label" slot="label"></slot>
|
|
6821
6830
|
<slot name="description" slot="description"></slot>
|
|
@@ -7709,7 +7718,7 @@ class CellRadio extends WithExtraAttributes {
|
|
|
7709
7718
|
return `
|
|
7710
7719
|
<div class="cell-radio">
|
|
7711
7720
|
<px-cell hoverable>
|
|
7712
|
-
<px-radio slot="prefix"
|
|
7721
|
+
<px-radio slot="prefix" inert></px-radio>
|
|
7713
7722
|
<slot name="visual" slot="visual"></slot>
|
|
7714
7723
|
<slot name="label" slot="label"></slot>
|
|
7715
7724
|
<slot name="description" slot="description"></slot>
|
|
@@ -8648,7 +8657,8 @@ class AbstractHeading extends PxElement {
|
|
|
8648
8657
|
"text-align--tablet",
|
|
8649
8658
|
"text-align--laptop",
|
|
8650
8659
|
"text-align--desktop",
|
|
8651
|
-
"inverted"
|
|
8660
|
+
"inverted",
|
|
8661
|
+
"auto-spacing"
|
|
8652
8662
|
];
|
|
8653
8663
|
}
|
|
8654
8664
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
@@ -8786,6 +8796,16 @@ class AbstractHeading extends PxElement {
|
|
|
8786
8796
|
set inverted(value) {
|
|
8787
8797
|
this.setAttribute("inverted", value);
|
|
8788
8798
|
}
|
|
8799
|
+
get autoSpacing() {
|
|
8800
|
+
return this.hasAttribute("auto-spacing");
|
|
8801
|
+
}
|
|
8802
|
+
set autoSpacing(value) {
|
|
8803
|
+
if (value) {
|
|
8804
|
+
this.setAttribute("auto-spacing", "");
|
|
8805
|
+
} else {
|
|
8806
|
+
this.removeAttribute("auto-spacing");
|
|
8807
|
+
}
|
|
8808
|
+
}
|
|
8789
8809
|
}
|
|
8790
8810
|
const _H1 = class _H1 extends AbstractHeading {
|
|
8791
8811
|
constructor() {
|
|
@@ -8975,20 +8995,20 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
8975
8995
|
}
|
|
8976
8996
|
createGridding(value) {
|
|
8977
8997
|
const breakpoints = [
|
|
8978
|
-
{ prop: "hasGridding",
|
|
8998
|
+
{ prop: "hasGridding", gridAttr: "grid-cols", attr: "col-span" },
|
|
8979
8999
|
{
|
|
8980
9000
|
prop: "hasGriddingMobile",
|
|
8981
|
-
|
|
9001
|
+
gridAttr: "grid-cols--mobile",
|
|
8982
9002
|
attr: "col-span--mobile"
|
|
8983
9003
|
},
|
|
8984
9004
|
{
|
|
8985
9005
|
prop: "hasGriddingTablet",
|
|
8986
|
-
|
|
9006
|
+
gridAttr: "grid-cols--tablet",
|
|
8987
9007
|
attr: "col-span--tablet"
|
|
8988
9008
|
},
|
|
8989
9009
|
{
|
|
8990
9010
|
prop: "hasGriddingLaptop",
|
|
8991
|
-
|
|
9011
|
+
gridAttr: "grid-cols--laptop",
|
|
8992
9012
|
attr: "col-span--laptop"
|
|
8993
9013
|
}
|
|
8994
9014
|
];
|
|
@@ -8996,16 +9016,16 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
8996
9016
|
"px-grid > px-container"
|
|
8997
9017
|
);
|
|
8998
9018
|
if (value !== null) {
|
|
8999
|
-
breakpoints.forEach(({ prop,
|
|
9019
|
+
breakpoints.forEach(({ prop, gridAttr, attr }) => {
|
|
9000
9020
|
if (this[prop]) {
|
|
9001
|
-
this.$grid
|
|
9002
|
-
spanElement.setAttribute(attr, "2");
|
|
9021
|
+
this.$grid.setAttribute(gridAttr, "3");
|
|
9022
|
+
spanElement == null ? void 0 : spanElement.setAttribute(attr, "2");
|
|
9003
9023
|
}
|
|
9004
9024
|
});
|
|
9005
9025
|
} else {
|
|
9006
|
-
breakpoints.forEach(({
|
|
9007
|
-
this.$grid
|
|
9008
|
-
spanElement.
|
|
9026
|
+
breakpoints.forEach(({ gridAttr, attr }) => {
|
|
9027
|
+
this.$grid.setAttribute(gridAttr, "1");
|
|
9028
|
+
spanElement == null ? void 0 : spanElement.setAttribute(attr, "1");
|
|
9009
9029
|
});
|
|
9010
9030
|
}
|
|
9011
9031
|
}
|
|
@@ -11821,6 +11841,7 @@ if (!customElements.get("px-fileupload")) {
|
|
|
11821
11841
|
const styles$o = ".list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}";
|
|
11822
11842
|
const styleSheet$l = new CSSStyleSheet();
|
|
11823
11843
|
styleSheet$l.replaceSync(styles$o);
|
|
11844
|
+
const listVariantValues = ["", "ul", "ol"];
|
|
11824
11845
|
const AttributeBreakpointCSSSelector = (attributeName, attributeValue, device) => `:host([${attributeName}${device ? `--${device}` : ""}='${attributeValue}']) .list`;
|
|
11825
11846
|
const gapPrefix = "px-spacing";
|
|
11826
11847
|
const listCssTokenBreakpoints = cssTokenBreakpoints(
|
|
@@ -11843,7 +11864,7 @@ const _List = class _List extends PxElement {
|
|
|
11843
11864
|
this.shadowRoot.innerHTML = this.template();
|
|
11844
11865
|
}
|
|
11845
11866
|
static get observedAttributes() {
|
|
11846
|
-
return ["inverted"];
|
|
11867
|
+
return ["inverted", "variant"];
|
|
11847
11868
|
}
|
|
11848
11869
|
connectedCallback() {
|
|
11849
11870
|
if (!this.gap) {
|
|
@@ -11861,6 +11882,31 @@ const _List = class _List extends PxElement {
|
|
|
11861
11882
|
}
|
|
11862
11883
|
this.$el.toggleAttribute("inverted", newValue !== null);
|
|
11863
11884
|
break;
|
|
11885
|
+
case "variant":
|
|
11886
|
+
if (!this.checkName(listVariantValues, newValue)) {
|
|
11887
|
+
log(
|
|
11888
|
+
`${newValue} is not an allowed variant value for ${this.tagName.toLowerCase()}`
|
|
11889
|
+
);
|
|
11890
|
+
}
|
|
11891
|
+
for (let i = 0; i < this.$children.length; i++) {
|
|
11892
|
+
const child = this.$children[i];
|
|
11893
|
+
if (newValue !== null) {
|
|
11894
|
+
child.setAttribute("variant", newValue);
|
|
11895
|
+
if (newValue === "ol") {
|
|
11896
|
+
child.style.setProperty("--item-index", String(i + 1));
|
|
11897
|
+
} else {
|
|
11898
|
+
child.style.removeProperty("--item-index");
|
|
11899
|
+
}
|
|
11900
|
+
} else {
|
|
11901
|
+
child.removeAttribute("variant");
|
|
11902
|
+
child.style.removeProperty("--item-index");
|
|
11903
|
+
}
|
|
11904
|
+
}
|
|
11905
|
+
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
11906
|
+
break;
|
|
11907
|
+
default:
|
|
11908
|
+
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
11909
|
+
break;
|
|
11864
11910
|
}
|
|
11865
11911
|
}
|
|
11866
11912
|
}
|
|
@@ -11927,13 +11973,23 @@ const _List = class _List extends PxElement {
|
|
|
11927
11973
|
this.removeAttribute("gap--desktop");
|
|
11928
11974
|
}
|
|
11929
11975
|
}
|
|
11976
|
+
get variant() {
|
|
11977
|
+
return this.getAttribute("variant");
|
|
11978
|
+
}
|
|
11979
|
+
set variant(value) {
|
|
11980
|
+
if (value) {
|
|
11981
|
+
this.setAttribute("variant", value);
|
|
11982
|
+
} else {
|
|
11983
|
+
this.removeAttribute("variant");
|
|
11984
|
+
}
|
|
11985
|
+
}
|
|
11930
11986
|
};
|
|
11931
11987
|
_List.nativeName = "div";
|
|
11932
11988
|
let List = _List;
|
|
11933
11989
|
if (!customElements.get("px-list")) {
|
|
11934
11990
|
customElements.define("px-list", List);
|
|
11935
11991
|
}
|
|
11936
|
-
const styles$n = '.list-item{display:flex;gap:var(--px-spacing-xs-mobile);align-items:flex-start;font-family:var(--px-font-family);line-height:var(--px-line-height-ratio-l)}
|
|
11992
|
+
const styles$n = '.list-item{display:flex;gap:var(--px-spacing-xs-mobile);align-items:flex-start;font-family:var(--px-font-family);line-height:var(--px-line-height-ratio-l);color:var(--px-color-text-neutral-default)}.list-item[inverted]{color:var(--px-color-text-neutral-inverted)}:host([variant="ul"]) .list-item,:host([variant="ol"]) .list-item{display:list-item;margin-left:var(--px-spacing-default-mobile)}:host([variant="ul"]) .list-item{list-style-type:disc}:host([variant="ol"]) .list-item{counter-set:list-item var(--item-index, 0);list-style-type:decimal}@media only screen and (min-width: 48em){.list-item{gap:var(--px-spacing-xs-tablet)}}@media only screen and (min-width: 64.0625em){.list-item{gap:var(--px-spacing-xs-laptop)}}@media only screen and (min-width: 90.0625em){.list-item{gap:var(--px-spacing-xs-desktop)}}';
|
|
11937
11993
|
const styleSheet$k = new CSSStyleSheet();
|
|
11938
11994
|
styleSheet$k.replaceSync(styles$n);
|
|
11939
11995
|
const _ListItem = class _ListItem extends PxElement {
|
|
@@ -15388,7 +15444,7 @@ class TileCheckbox extends WithExtraAttributes {
|
|
|
15388
15444
|
<div class="tile-checkbox">
|
|
15389
15445
|
<px-tile hoverable>
|
|
15390
15446
|
<slot name="prefix" slot="prefix"></slot>
|
|
15391
|
-
<px-checkbox slot="suffix"
|
|
15447
|
+
<px-checkbox slot="suffix" inert></px-checkbox>
|
|
15392
15448
|
<slot name="label" slot="label"></slot>
|
|
15393
15449
|
<slot name="description" slot="description"></slot>
|
|
15394
15450
|
</px-tile>
|
|
@@ -15668,7 +15724,7 @@ class TileRadio extends WithExtraAttributes {
|
|
|
15668
15724
|
<div class="tile-radio">
|
|
15669
15725
|
<px-tile hoverable>
|
|
15670
15726
|
<slot name="prefix" slot="prefix"></slot>
|
|
15671
|
-
<px-radio slot="suffix"
|
|
15727
|
+
<px-radio slot="suffix" inert></px-radio>
|
|
15672
15728
|
<slot name="label" slot="label"></slot>
|
|
15673
15729
|
<slot name="description" slot="description"></slot>
|
|
15674
15730
|
</px-tile>
|
|
@@ -16110,7 +16166,7 @@ class TileSwitch extends WithExtraAttributes {
|
|
|
16110
16166
|
<div class="tile-switch">
|
|
16111
16167
|
<px-tile hoverable>
|
|
16112
16168
|
<slot name="prefix" slot="prefix"></slot>
|
|
16113
|
-
<px-switch slot="suffix"
|
|
16169
|
+
<px-switch slot="suffix" inert></px-switch>
|
|
16114
16170
|
<slot name="label" slot="label"></slot>
|
|
16115
16171
|
<slot name="description" slot="description"></slot>
|
|
16116
16172
|
</px-tile>
|
|
@@ -16701,6 +16757,7 @@ export {
|
|
|
16701
16757
|
linkShapeValues,
|
|
16702
16758
|
linkVariantValues,
|
|
16703
16759
|
linktextsizesValues,
|
|
16760
|
+
listVariantValues,
|
|
16704
16761
|
log,
|
|
16705
16762
|
noBorderRadiusValues,
|
|
16706
16763
|
observedAttributes,
|