@proximus/lavender 2.0.0-alpha.2 → 2.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lavender.cjs.js +1 -1
- package/dist/lavender.es.js +82 -60
- package/dist/lavender.umd.js +1 -1
- package/package.json +1 -1
package/dist/lavender.es.js
CHANGED
|
@@ -434,6 +434,12 @@ class WithExtraAttributes extends HTMLElement {
|
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
class PxElement extends WithExtraAttributes {
|
|
437
|
+
constructor(...adoptedStylesheets) {
|
|
438
|
+
super(...adoptedStylesheets);
|
|
439
|
+
this.accessorExclusions = [];
|
|
440
|
+
this.nativeName = Object.getPrototypeOf(this).constructor.nativeName;
|
|
441
|
+
this.accessorExclusions = Object.getPrototypeOf(this).constructor.accessorExclusions || [];
|
|
442
|
+
}
|
|
437
443
|
static get observedAttributes() {
|
|
438
444
|
return [
|
|
439
445
|
...super.observedAttributes,
|
|
@@ -448,14 +454,10 @@ class PxElement extends WithExtraAttributes {
|
|
|
448
454
|
this.$el.setAttribute(name, newValue);
|
|
449
455
|
}
|
|
450
456
|
}
|
|
451
|
-
constructor(...adoptedStylesheets) {
|
|
452
|
-
super(...adoptedStylesheets);
|
|
453
|
-
this.nativeName = Object.getPrototypeOf(this).constructor.nativeName;
|
|
454
|
-
}
|
|
455
457
|
connectedCallback() {
|
|
456
458
|
var _a;
|
|
457
459
|
for (const name of getSupportedPropertyNames(this.nativeName)) {
|
|
458
|
-
if (name === "constructor") {
|
|
460
|
+
if (name === "constructor" || this.accessorExclusions.includes(name)) {
|
|
459
461
|
continue;
|
|
460
462
|
}
|
|
461
463
|
try {
|
|
@@ -2353,6 +2355,7 @@ if (!customElements.get("px-icon-set")) {
|
|
|
2353
2355
|
}
|
|
2354
2356
|
const iconColorValues = [
|
|
2355
2357
|
"Brand",
|
|
2358
|
+
"Accent",
|
|
2356
2359
|
"Neutral",
|
|
2357
2360
|
"Dimmed",
|
|
2358
2361
|
"PurposeSuccess",
|
|
@@ -2367,7 +2370,7 @@ const iconColorValues = [
|
|
|
2367
2370
|
const iconColorValuesKC = ["Inherit", ...iconColorValues].map(
|
|
2368
2371
|
(value) => value.replace(/([A-Z])/g, "-$1").toLowerCase().slice(1)
|
|
2369
2372
|
);
|
|
2370
|
-
const styles$E = ":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-brand-default)}.inherit{color:inherit}.brand{color:var(--px-color-icon-brand-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-brand-inverted)}:host([inverted]) .inherit{color:inherit}:host([inverted]) .brand{color:var(--px-color-icon-brand-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)}";
|
|
2373
|
+
const styles$E = ":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-brand-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-brand-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)}";
|
|
2371
2374
|
const styleSheet$x = new CSSStyleSheet();
|
|
2372
2375
|
styleSheet$x.replaceSync(styles$E);
|
|
2373
2376
|
const observedAttributes = [
|
|
@@ -2583,10 +2586,10 @@ const _Container = class _Container extends PxElement {
|
|
|
2583
2586
|
)
|
|
2584
2587
|
);
|
|
2585
2588
|
this.template = () => `<div class="container">
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2589
|
+
<slot></slot>
|
|
2590
|
+
<slot name="anchor-left"></slot>
|
|
2591
|
+
<slot name="anchor-right"></slot>
|
|
2592
|
+
<slot name="anchor-full"></slot>
|
|
2590
2593
|
</div>`;
|
|
2591
2594
|
this._bgObserver = null;
|
|
2592
2595
|
this._isInViewport = false;
|
|
@@ -3849,7 +3852,7 @@ const imageWidthValues = ["", "xs", "s", "m", "l", "xl"];
|
|
|
3849
3852
|
const imageHeightValues = ["", "xs", "s", "m", "l", "xl"];
|
|
3850
3853
|
const heightAttributeBreakpointCSSSelector = (attributeName, attributeValue, device) => `:host([${attributeName}${device ? `--${device}` : ""}='${attributeValue}']) img`;
|
|
3851
3854
|
const heightPrefix = "px-image";
|
|
3852
|
-
class
|
|
3855
|
+
const _AbstractImage = class _AbstractImage extends PxElement {
|
|
3853
3856
|
constructor() {
|
|
3854
3857
|
super(
|
|
3855
3858
|
styleSheet$v,
|
|
@@ -4122,7 +4125,9 @@ class AbstractImage extends PxElement {
|
|
|
4122
4125
|
this.removeAttribute("cover");
|
|
4123
4126
|
}
|
|
4124
4127
|
}
|
|
4125
|
-
}
|
|
4128
|
+
};
|
|
4129
|
+
_AbstractImage.accessorExclusions = ["height", "width"];
|
|
4130
|
+
let AbstractImage = _AbstractImage;
|
|
4126
4131
|
const _Image = class _Image extends AbstractImage {
|
|
4127
4132
|
constructor() {
|
|
4128
4133
|
super();
|
|
@@ -8190,11 +8195,12 @@ const _RadioBase = class _RadioBase extends PxElement {
|
|
|
8190
8195
|
}
|
|
8191
8196
|
};
|
|
8192
8197
|
_RadioBase.nativeName = "input";
|
|
8198
|
+
_RadioBase.accessorExclusions = ["checked"];
|
|
8193
8199
|
let RadioBase = _RadioBase;
|
|
8194
8200
|
if (!customElements.get("px-radio-base")) {
|
|
8195
8201
|
customElements.define("px-radio-base", RadioBase);
|
|
8196
8202
|
}
|
|
8197
|
-
|
|
8203
|
+
class Radio extends RadioBase {
|
|
8198
8204
|
constructor() {
|
|
8199
8205
|
var _a, _b;
|
|
8200
8206
|
super();
|
|
@@ -8209,6 +8215,7 @@ const _Radio = class _Radio extends RadioBase {
|
|
|
8209
8215
|
return [...super.observedAttributes, "state", "variant", "inverted"];
|
|
8210
8216
|
}
|
|
8211
8217
|
connectedCallback() {
|
|
8218
|
+
super.connectedCallback();
|
|
8212
8219
|
this.addEventListener("keypress", (e) => {
|
|
8213
8220
|
e.stopPropagation();
|
|
8214
8221
|
e.preventDefault();
|
|
@@ -8226,9 +8233,6 @@ const _Radio = class _Radio extends RadioBase {
|
|
|
8226
8233
|
e.preventDefault();
|
|
8227
8234
|
});
|
|
8228
8235
|
this.setupForId();
|
|
8229
|
-
if (this.hasAttribute("checked")) {
|
|
8230
|
-
this.checked = true;
|
|
8231
|
-
}
|
|
8232
8236
|
if (this.$iconSlot) {
|
|
8233
8237
|
this.$iconSlot.setAttribute("size", "xs");
|
|
8234
8238
|
this.$iconSlot.setAttribute("color", "inherit");
|
|
@@ -8303,10 +8307,8 @@ const _Radio = class _Radio extends RadioBase {
|
|
|
8303
8307
|
if (this.internals) {
|
|
8304
8308
|
this.internals.ariaChecked = "true";
|
|
8305
8309
|
}
|
|
8306
|
-
this.setAttribute("checked", "");
|
|
8307
8310
|
} else {
|
|
8308
8311
|
this.tabIndex = -1;
|
|
8309
|
-
this.removeAttribute("checked");
|
|
8310
8312
|
if (this.internals) {
|
|
8311
8313
|
this.internals.ariaChecked = "false";
|
|
8312
8314
|
}
|
|
@@ -8386,9 +8388,7 @@ const _Radio = class _Radio extends RadioBase {
|
|
|
8386
8388
|
get $iconSlot() {
|
|
8387
8389
|
return this.querySelector('px-icon[slot="before"]');
|
|
8388
8390
|
}
|
|
8389
|
-
}
|
|
8390
|
-
_Radio.nativeName = "input";
|
|
8391
|
-
let Radio = _Radio;
|
|
8391
|
+
}
|
|
8392
8392
|
if (!customElements.get("px-radio")) {
|
|
8393
8393
|
customElements.define("px-radio", Radio);
|
|
8394
8394
|
}
|
|
@@ -8428,7 +8428,7 @@ class Radiogroup extends WithExtraAttributes {
|
|
|
8428
8428
|
};
|
|
8429
8429
|
this.handleRadioChange = (event) => {
|
|
8430
8430
|
const target = event.target;
|
|
8431
|
-
if (target.localName === "px-tile-radio" || target.localName === "px-radio" || target.localName === "px-cell-radio") {
|
|
8431
|
+
if (target.localName === "px-tile-radio" || target.localName === "px-radio" || target.localName === "px-cell-radio" || target.localName === "px-selectable-box-radio") {
|
|
8432
8432
|
this.currentCheckedRadio = target;
|
|
8433
8433
|
const name = target.getAttribute("name");
|
|
8434
8434
|
if (name && this.currentCheckedRadio.checked) {
|
|
@@ -8531,10 +8531,10 @@ class Radiogroup extends WithExtraAttributes {
|
|
|
8531
8531
|
}
|
|
8532
8532
|
uncheckOtherRadios(name) {
|
|
8533
8533
|
const radios = this.querySelectorAll(
|
|
8534
|
-
`px-radio[name="${name}"], px-tile-radio[name="${name}"], px-cell-radio[name="${name}"]`
|
|
8534
|
+
`px-radio[name="${name}"], px-tile-radio[name="${name}"], px-cell-radio[name="${name}"], px-selectable-box-radio[name="${name}"]`
|
|
8535
8535
|
);
|
|
8536
8536
|
radios.forEach((radio) => {
|
|
8537
|
-
if (radio !== this.currentCheckedRadio) {
|
|
8537
|
+
if (radio !== this.currentCheckedRadio && radio.shadowRoot) {
|
|
8538
8538
|
radio.checked = false;
|
|
8539
8539
|
}
|
|
8540
8540
|
});
|
|
@@ -8617,7 +8617,7 @@ class Radiogroup extends WithExtraAttributes {
|
|
|
8617
8617
|
}
|
|
8618
8618
|
get $radioList() {
|
|
8619
8619
|
return this.querySelectorAll(
|
|
8620
|
-
"px-radio, px-tile-radio, px-cell-radio"
|
|
8620
|
+
"px-radio, px-tile-radio, px-cell-radio, px-selectable-box-radio"
|
|
8621
8621
|
);
|
|
8622
8622
|
}
|
|
8623
8623
|
get gap() {
|
|
@@ -10499,7 +10499,7 @@ class StickyContainer extends HTMLElement {
|
|
|
10499
10499
|
if (!customElements.get("px-sticky-container")) {
|
|
10500
10500
|
customElements.define("px-sticky-container", StickyContainer);
|
|
10501
10501
|
}
|
|
10502
|
-
const styles$m = '#container{border:0;border-radius:var(--px-radius-main);background-color:var(--px-color-background-surface-default);box-sizing:border-box}:host([showfrom="bottom"]) #container{height:auto;margin-bottom:0;width:100%}px-button-icon{position:absolute;top:var(--px-padding-l-desktop);right:var(--px-padding-l-desktop)}dialog{background:transparent;border-radius:0;box-shadow:none;padding:0;border:0;box-sizing:border-box;width:75%}::backdrop{background:#0000004d;-webkit-backdrop-filter:saturate(180%) blur(15px);backdrop-filter:saturate(180%) blur(15px)}#content{
|
|
10502
|
+
const styles$m = '#container{border:0;border-radius:var(--px-radius-main);background-color:var(--px-color-background-surface-default);box-sizing:border-box}:host([showfrom="bottom"]) #container{height:auto;margin-bottom:0;width:100%}px-button-icon{position:absolute;top:var(--px-padding-l-desktop);right:var(--px-padding-l-desktop)}dialog{background:transparent;border-radius:0;box-shadow:none;padding:0;border:0;box-sizing:border-box;width:75%}::backdrop{background:#0000004d;-webkit-backdrop-filter:saturate(180%) blur(15px);backdrop-filter:saturate(180%) blur(15px)}#content{overflow:auto}@media screen and (min-width: 1080px){#container{height:100%;padding:var(--px-padding-l-desktop)}:host([showfrom="right"]) px-button-icon{right:10.625em}:host([showfrom="right"]) #container{padding-right:10.625em;border-radius:var(--px-radius-main) 0 0 var(--px-radius-main)}:host([showfrom="left"]) px-button-icon{right:var(--px-padding-l-desktop)}:host([showfrom="left"]) #container{padding-left:10.625em;border-radius:0 var(--px-radius-main) var(--px-radius-main) 0}:host([showfrom="bottom"]) #container{box-sizing:border-box}:host([showfrom="left"])>dialog{margin-left:0;animation:dialog-fade-in-left .3s;height:100%}:host([showfrom="bottom"])>dialog{margin-bottom:0;margin-inline:0;width:100%;animation:dialog-fade-in-bottom .3s}:host([showfrom="right"])>dialog{margin-right:0;animation:dialog-fade-in-right .3s;height:100%}#content{max-height:calc(100dvh - 22.625em)}}@media only screen and (max-width: 67.563em){dialog{width:100%}:host([showfrom="left"])>dialog,:host([showfrom="right"])>dialog,:host([showfrom="bottom"])>dialog{margin-bottom:0;margin-inline:0;height:revert;animation:dialog-fade-in-bottom .3s}#container{width:100%;box-sizing:border-box;padding:var(--px-padding-m-mobile);border-radius:var(--px-radius-main) var(--px-radius-main) 0 0}px-button-icon{top:var(--px-padding-m-mobile);right:var(--px-padding-m-mobile)}#content{min-height:2.813em;max-height:50dvh}}@keyframes dialog-fade-in-right{0%{margin-right:-67.5em}to{margin-right:0}}@keyframes dialog-fade-in-left{0%{margin-left:-67.5em}to{margin-left:0}}@keyframes dialog-fade-in-bottom{0%{margin-bottom:-12.5em}to{margin-bottom:0}}';
|
|
10503
10503
|
const styleSheet$f = new CSSStyleSheet();
|
|
10504
10504
|
styleSheet$f.replaceSync(styles$m);
|
|
10505
10505
|
const HIDE_EVENT = "px.lavender.drawer.hide";
|
|
@@ -10564,6 +10564,9 @@ class Drawer extends HTMLElement {
|
|
|
10564
10564
|
this.$closeButton.addEventListener("click", () => {
|
|
10565
10565
|
this.hide();
|
|
10566
10566
|
});
|
|
10567
|
+
if (this.$buttons.length === 0) {
|
|
10568
|
+
this.$separator.remove();
|
|
10569
|
+
}
|
|
10567
10570
|
}
|
|
10568
10571
|
static get observedAttributes() {
|
|
10569
10572
|
return ["open", "aria-label-close-button"];
|
|
@@ -10611,6 +10614,12 @@ class Drawer extends HTMLElement {
|
|
|
10611
10614
|
get open() {
|
|
10612
10615
|
return this.hasAttribute("open");
|
|
10613
10616
|
}
|
|
10617
|
+
get $buttons() {
|
|
10618
|
+
return this.querySelectorAll('[slot="footer"]');
|
|
10619
|
+
}
|
|
10620
|
+
get $separator() {
|
|
10621
|
+
return this.shadowRoot.querySelector("px-separator");
|
|
10622
|
+
}
|
|
10614
10623
|
set open(value) {
|
|
10615
10624
|
if (value) {
|
|
10616
10625
|
this.setAttribute("open", "");
|
|
@@ -11505,10 +11514,13 @@ class AbstractInputElement extends PxElement {
|
|
|
11505
11514
|
}
|
|
11506
11515
|
connectedCallback() {
|
|
11507
11516
|
super.connectedCallback();
|
|
11508
|
-
["change"
|
|
11517
|
+
["change"].forEach((event) => {
|
|
11509
11518
|
this.$el.addEventListener(event, () => {
|
|
11510
11519
|
var _a;
|
|
11511
11520
|
(_a = this.internals) == null ? void 0 : _a.setFormValue(this.formData());
|
|
11521
|
+
this.dispatchEvent(
|
|
11522
|
+
new CustomEvent(event, { bubbles: true, composed: true })
|
|
11523
|
+
);
|
|
11512
11524
|
});
|
|
11513
11525
|
});
|
|
11514
11526
|
this.setupForId();
|
|
@@ -11705,11 +11717,11 @@ const _Select = class _Select extends AbstractInputElement {
|
|
|
11705
11717
|
$options.forEach(($option) => {
|
|
11706
11718
|
this.$el.appendChild($option);
|
|
11707
11719
|
});
|
|
11708
|
-
this.observer = new MutationObserver(() => {
|
|
11709
|
-
this.$el.innerHTML = this.innerHTML;
|
|
11710
|
-
});
|
|
11711
|
-
this.observer.observe(this, { childList: true });
|
|
11712
11720
|
}
|
|
11721
|
+
this.observer = new MutationObserver(() => {
|
|
11722
|
+
this.$el.innerHTML = this.innerHTML;
|
|
11723
|
+
});
|
|
11724
|
+
this.observer.observe(this, { childList: true });
|
|
11713
11725
|
}
|
|
11714
11726
|
disconnectedCallback() {
|
|
11715
11727
|
this.observer.disconnect();
|
|
@@ -12456,8 +12468,8 @@ const anchorAlignmentValues = [
|
|
|
12456
12468
|
"bottom-left",
|
|
12457
12469
|
"bottom-right"
|
|
12458
12470
|
];
|
|
12459
|
-
function anchorPolyfill($trigger, $popoverElement, anchorAlignment = "bottom-left", computedStyle) {
|
|
12460
|
-
if ("anchorName" in document.documentElement.style) {
|
|
12471
|
+
function anchorPolyfill($trigger, $popoverElement, anchorAlignment = "bottom-left", computedStyle, usePolyfill = false) {
|
|
12472
|
+
if ("anchorName" in document.documentElement.style && usePolyfill === false) {
|
|
12461
12473
|
return;
|
|
12462
12474
|
}
|
|
12463
12475
|
$popoverElement.addEventListener("toggle", () => {
|
|
@@ -12565,7 +12577,12 @@ class Dropdown extends WithExtraAttributes {
|
|
|
12565
12577
|
}`;
|
|
12566
12578
|
}
|
|
12567
12579
|
static get observedAttributes() {
|
|
12568
|
-
return [
|
|
12580
|
+
return [
|
|
12581
|
+
...super.observedAttributes,
|
|
12582
|
+
"id",
|
|
12583
|
+
"anchoralignment",
|
|
12584
|
+
"use-polyfill"
|
|
12585
|
+
];
|
|
12569
12586
|
}
|
|
12570
12587
|
connectedCallback() {
|
|
12571
12588
|
if (!this.getAttribute("id")) {
|
|
@@ -12581,19 +12598,29 @@ class Dropdown extends WithExtraAttributes {
|
|
|
12581
12598
|
this.$trigger,
|
|
12582
12599
|
this.$popoverElement,
|
|
12583
12600
|
this.anchorAlignment,
|
|
12584
|
-
getComputedStyle(this)
|
|
12601
|
+
getComputedStyle(this),
|
|
12602
|
+
this.usePolyfill
|
|
12585
12603
|
);
|
|
12586
12604
|
}
|
|
12587
12605
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12606
|
+
if (oldValue !== newValue) {
|
|
12607
|
+
switch (name) {
|
|
12608
|
+
case "id":
|
|
12591
12609
|
this.initPopover();
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
|
|
12610
|
+
break;
|
|
12611
|
+
case "use-polyfill":
|
|
12612
|
+
anchorPolyfill(
|
|
12613
|
+
this.$trigger,
|
|
12614
|
+
this.$popoverElement,
|
|
12615
|
+
this.anchorAlignment,
|
|
12616
|
+
getComputedStyle(this),
|
|
12617
|
+
this.usePolyfill
|
|
12618
|
+
);
|
|
12619
|
+
break;
|
|
12620
|
+
default:
|
|
12621
|
+
super.attributeChangedCallback(name, oldValue, newValue);
|
|
12622
|
+
break;
|
|
12623
|
+
}
|
|
12597
12624
|
}
|
|
12598
12625
|
}
|
|
12599
12626
|
initPopover() {
|
|
@@ -12636,6 +12663,16 @@ class Dropdown extends WithExtraAttributes {
|
|
|
12636
12663
|
this.setAttribute("anchoralignment", defaultAnchorAlignment);
|
|
12637
12664
|
}
|
|
12638
12665
|
}
|
|
12666
|
+
get usePolyfill() {
|
|
12667
|
+
return this.hasAttribute("use-polyfill");
|
|
12668
|
+
}
|
|
12669
|
+
set usePolyfill(value) {
|
|
12670
|
+
if (value) {
|
|
12671
|
+
this.setAttribute("use-polyfill", "");
|
|
12672
|
+
} else {
|
|
12673
|
+
this.removeAttribute("use-polyfill");
|
|
12674
|
+
}
|
|
12675
|
+
}
|
|
12639
12676
|
}
|
|
12640
12677
|
_Dropdown_instances = new WeakSet();
|
|
12641
12678
|
resetManualPopoverDisplay_fn = function() {
|
|
@@ -12803,9 +12840,8 @@ class MegaDropDown extends HTMLElement {
|
|
|
12803
12840
|
<px-button-icon
|
|
12804
12841
|
size="small"
|
|
12805
12842
|
variant="secondary"
|
|
12806
|
-
aria-label="${this.closeButtonAriaLabel || "Close"}"
|
|
12807
12843
|
>
|
|
12808
|
-
<px-icon name="cross" from="lavender"></px-icon>
|
|
12844
|
+
<px-icon name="cross" from="lavender" aria-label="${this.closeButtonAriaLabel || "Close"}" title="${this.closeButtonAriaLabel || "Close"}"></px-icon>
|
|
12809
12845
|
</px-button-icon>
|
|
12810
12846
|
</px-hstack>
|
|
12811
12847
|
<px-p
|
|
@@ -12818,9 +12854,8 @@ class MegaDropDown extends HTMLElement {
|
|
|
12818
12854
|
<px-button-icon
|
|
12819
12855
|
size="small"
|
|
12820
12856
|
variant="secondary"
|
|
12821
|
-
aria-label="${this.closeButtonAriaLabel || "Close"}"
|
|
12822
12857
|
>
|
|
12823
|
-
<px-icon name="cross" from="lavender"></px-icon>
|
|
12858
|
+
<px-icon name="cross" from="lavender" aria-label="${this.closeButtonAriaLabel || "Close"}" title="${this.closeButtonAriaLabel || "Close"}"></px-icon>
|
|
12824
12859
|
</px-button-icon>
|
|
12825
12860
|
<px-stack
|
|
12826
12861
|
direction--mobile="column"
|
|
@@ -13238,19 +13273,12 @@ const _Status = class _Status extends PxElement {
|
|
|
13238
13273
|
"icon-aria-label"
|
|
13239
13274
|
];
|
|
13240
13275
|
}
|
|
13241
|
-
connectedCallback() {
|
|
13242
|
-
super.connectedCallback();
|
|
13243
|
-
if (!this.state) {
|
|
13244
|
-
this.setRole("info");
|
|
13245
|
-
}
|
|
13246
|
-
}
|
|
13247
13276
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
13248
13277
|
if (oldValue !== newValue) {
|
|
13249
13278
|
switch (attrName) {
|
|
13250
13279
|
case "state":
|
|
13251
13280
|
this.updateState(newValue);
|
|
13252
13281
|
this.$el.classList.toggle(`${newValue}`);
|
|
13253
|
-
this.setRole(newValue);
|
|
13254
13282
|
break;
|
|
13255
13283
|
case "icon-aria-label":
|
|
13256
13284
|
this.$statusIcon.setAttribute("aria-label", newValue);
|
|
@@ -13303,12 +13331,6 @@ const _Status = class _Status extends PxElement {
|
|
|
13303
13331
|
this.$statusIcon.name = name;
|
|
13304
13332
|
this.$statusIcon.color = color;
|
|
13305
13333
|
}
|
|
13306
|
-
setRole(statusValue) {
|
|
13307
|
-
this.$el.setAttribute(
|
|
13308
|
-
"role",
|
|
13309
|
-
!statusValue || statusValue === "info" ? "status" : statusValue
|
|
13310
|
-
);
|
|
13311
|
-
}
|
|
13312
13334
|
updateIconOnly(breakpoint) {
|
|
13313
13335
|
var _a;
|
|
13314
13336
|
const iconOnlyBreakpoint = breakpoint ? `--${breakpoint}` : "";
|