@proximus/lavender 2.0.0-alpha.122 → 2.0.0-alpha.124
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 +144 -50
- package/dist/lavender.umd.js +1 -1
- package/package.json +1 -1
package/dist/lavender.es.js
CHANGED
|
@@ -9392,7 +9392,7 @@ let ColorOptionLink = _ColorOptionLink;
|
|
|
9392
9392
|
if (!customElements.get("px-color-option-link")) {
|
|
9393
9393
|
customElements.define("px-color-option-link", ColorOptionLink);
|
|
9394
9394
|
}
|
|
9395
|
-
const contentHeaderCss =
|
|
9395
|
+
const contentHeaderCss = ':host{--min-height--mobile: 15.625rem;--min-height--tablet: 17.5rem;--min-height--laptop: 17.5rem;--min-height--desktop: 17.5rem}:host,:host>*{display:block;box-sizing:border-box}.content-header{position:relative;z-index:0}[min-height] .content-header-content{min-height:calc(var(--min-height--mobile) - (var(--px-spacing-l-mobile) * 2))}.content-header-content{display:flex;flex-direction:column;z-index:2;position:relative;box-sizing:border-box}.content-header-content ::slotted([slot="patch"]){margin-top:var(--px-spacing-l-mobile)}.contrast-helper{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:none;display:none}[contrast-helper-gradient] .contrast-helper{display:block;background-image:linear-gradient(90deg,#fff 23.43%,#fff0 81.69%)}[inverted] :is([contrast-helper-gradient] .contrast-helper){background-image:linear-gradient(90deg,#000 23.43%,#0000 81.69%)}[contrast-helper-overlay] .contrast-helper{display:block;background-color:#ffffffb3}[inverted] :is([contrast-helper-overlay] .contrast-helper){background-color:#0006}@media screen and (min-width: 48rem){.content-header-content ::slotted([slot="patch"]){flex-shrink:0}.content-header-content ::slotted([slot="patch"]),.content-header-content ::slotted([slot="patch-description"]){margin-top:var(--px-spacing-l-tablet)}[min-height] .content-header-content{min-height:calc(var(--min-height--tablet) - (var(--px-spacing-l-tablet) * 2))}}@media screen and (min-width: 64.0625rem){.content-header-content ::slotted([slot="patch"]),.content-header-content ::slotted([slot="patch-description"]){margin-top:var(--px-spacing-l-laptop)}[min-height] .content-header-content{min-height:calc(var(--min-height--laptop) - (var(--px-spacing-l-laptop) * 2))}}@media screen and (min-width: 90.0625rem){.content-header-content ::slotted([slot="patch"]),.content-header-content ::slotted([slot="patch-description"]){margin-top:var(--px-spacing-l-desktop)}[min-height] .content-header-content{min-height:calc(var(--min-height--desktop) - (var(--px-spacing-l-desktop) * 2))}}';
|
|
9396
9396
|
const styles$A = ':host{display:block}:host,:host *{box-sizing:border-box}.content-wrapper{margin-inline:var(--px-padding-s-mobile);max-width:var(--px-content-wrapper-max-width-desktop)}@media screen and (min-width: 77rem){.content-wrapper{margin-inline:auto}}.overlapped{margin-bottom:calc(var(--px-overlapped-mobile) * -1)}::slotted([slot="overlap"]){margin-top:var(--px-overlapped-mobile)}@media screen and (min-width: 48rem){.overlapped{margin-bottom:calc(var(--px-overlapped-desktop) * -1)}::slotted([slot="overlap"]){margin-top:var(--px-overlapped-desktop)}}@media screen and (min-width: 64.0625rem){.overlapped{margin-bottom:calc(var(--px-overlapped-desktop) * -1)}::slotted([slot="overlap"]){margin-top:var(--px-overlapped-desktop)}}';
|
|
9397
9397
|
const styleSheet$t = new CSSStyleSheet();
|
|
9398
9398
|
styleSheet$t.replaceSync(styles$A);
|
|
@@ -10015,6 +10015,10 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
10015
10015
|
<px-h1><slot></slot></px-h1>
|
|
10016
10016
|
<slot name="subtitle"></slot>
|
|
10017
10017
|
</px-vstack>
|
|
10018
|
+
<px-stack gap="s" direction="row" direction--mobile="column">
|
|
10019
|
+
<slot name="patch" shrink></slot>
|
|
10020
|
+
<slot name="patch-description"></slot>
|
|
10021
|
+
</px-stack>
|
|
10018
10022
|
</div>
|
|
10019
10023
|
</px-container>
|
|
10020
10024
|
</px-grid>
|
|
@@ -10040,38 +10044,22 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
10040
10044
|
"has-gridding--mobile",
|
|
10041
10045
|
"has-gridding--tablet",
|
|
10042
10046
|
"has-gridding--laptop",
|
|
10047
|
+
"has-gridding--desktop",
|
|
10043
10048
|
"inverted"
|
|
10044
10049
|
];
|
|
10045
10050
|
}
|
|
10046
10051
|
connectedCallback() {
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
`<px-stack gap="s" direction="row" direction--mobile="column">
|
|
10053
|
-
<slot name="patch" shrink></slot>
|
|
10054
|
-
<slot name="patch-description"></slot>
|
|
10055
|
-
</px-stack>`
|
|
10056
|
-
);
|
|
10057
|
-
}
|
|
10058
|
-
if (this.$subtitleSlot) {
|
|
10059
|
-
this.$subtitleSlot.setAttribute("variant", "subtitle");
|
|
10060
|
-
}
|
|
10061
|
-
if (this.$patchDescriptionSlot) {
|
|
10062
|
-
if (this.$patchDescriptionSlot.localName === "px-p") {
|
|
10063
|
-
this.$patchDescriptionSlot.setAttribute("variant", "default");
|
|
10064
|
-
}
|
|
10065
|
-
if (this.$patchDescriptionSlot.localName === "px-p" || this.$patchDescriptionSlot.localName === "px-span") {
|
|
10066
|
-
this.$patchDescriptionSlot.setAttribute("font-size", "body-l");
|
|
10067
|
-
this.$patchDescriptionSlot.removeAttribute("font-weight");
|
|
10068
|
-
this.$patchDescriptionSlot.removeAttribute("color");
|
|
10069
|
-
}
|
|
10070
|
-
if (this.$patchDescriptionSlot.localName === "px-price") {
|
|
10071
|
-
this.$patchDescriptionSlot.setAttribute("size", "m");
|
|
10072
|
-
}
|
|
10073
|
-
}
|
|
10052
|
+
var _a, _b;
|
|
10053
|
+
this.styleSubtitleSlot = this.styleSubtitleSlot.bind(this);
|
|
10054
|
+
this.stylepatchDescriptionSlotted = this.stylepatchDescriptionSlotted.bind(this);
|
|
10055
|
+
this.styleSubtitleSlot();
|
|
10056
|
+
this.stylepatchDescriptionSlotted();
|
|
10074
10057
|
this.createGridding();
|
|
10058
|
+
(_a = this.$subtitleSlot) == null ? void 0 : _a.addEventListener("slotchange", this.styleSubtitleSlot);
|
|
10059
|
+
(_b = this.$patchDescriptionSlot) == null ? void 0 : _b.addEventListener(
|
|
10060
|
+
"slotchange",
|
|
10061
|
+
this.stylepatchDescriptionSlotted
|
|
10062
|
+
);
|
|
10075
10063
|
}
|
|
10076
10064
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
10077
10065
|
if (oldValue !== newValue) {
|
|
@@ -10104,6 +10092,7 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
10104
10092
|
case "has-gridding--mobile":
|
|
10105
10093
|
case "has-gridding--tablet":
|
|
10106
10094
|
case "has-gridding--laptop":
|
|
10095
|
+
case "has-gridding--desktop":
|
|
10107
10096
|
this.createGridding(newValue);
|
|
10108
10097
|
break;
|
|
10109
10098
|
case "inverted":
|
|
@@ -10121,6 +10110,37 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
10121
10110
|
}
|
|
10122
10111
|
}
|
|
10123
10112
|
}
|
|
10113
|
+
disconnectedCallback() {
|
|
10114
|
+
var _a, _b;
|
|
10115
|
+
(_a = this.$subtitleSlot) == null ? void 0 : _a.removeEventListener(
|
|
10116
|
+
"slotchange",
|
|
10117
|
+
this.styleSubtitleSlot
|
|
10118
|
+
);
|
|
10119
|
+
(_b = this.$patchDescriptionSlot) == null ? void 0 : _b.removeEventListener(
|
|
10120
|
+
"slotchange",
|
|
10121
|
+
this.stylepatchDescriptionSlotted
|
|
10122
|
+
);
|
|
10123
|
+
}
|
|
10124
|
+
stylepatchDescriptionSlotted() {
|
|
10125
|
+
if (this.$patchDescriptionSlotted) {
|
|
10126
|
+
if (this.$patchDescriptionSlotted.localName === "px-p") {
|
|
10127
|
+
this.$patchDescriptionSlotted.setAttribute("variant", "default");
|
|
10128
|
+
}
|
|
10129
|
+
if (this.$patchDescriptionSlotted.localName === "px-p" || this.$patchDescriptionSlotted.localName === "px-span") {
|
|
10130
|
+
this.$patchDescriptionSlotted.setAttribute("font-size", "body-l");
|
|
10131
|
+
this.$patchDescriptionSlotted.removeAttribute("font-weight");
|
|
10132
|
+
this.$patchDescriptionSlotted.removeAttribute("color");
|
|
10133
|
+
}
|
|
10134
|
+
if (this.$patchDescriptionSlotted.localName === "px-price") {
|
|
10135
|
+
this.$patchDescriptionSlotted.setAttribute("size", "m");
|
|
10136
|
+
}
|
|
10137
|
+
}
|
|
10138
|
+
}
|
|
10139
|
+
styleSubtitleSlot() {
|
|
10140
|
+
if (this.$subtitleSlotted) {
|
|
10141
|
+
this.$subtitleSlotted.setAttribute("variant", "subtitle");
|
|
10142
|
+
}
|
|
10143
|
+
}
|
|
10124
10144
|
createGridding(value) {
|
|
10125
10145
|
const breakpoints = [
|
|
10126
10146
|
{ prop: "hasGridding", gridAttr: "grid-cols", attr: "col-span" },
|
|
@@ -10138,6 +10158,11 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
10138
10158
|
prop: "hasGriddingLaptop",
|
|
10139
10159
|
gridAttr: "grid-cols--laptop",
|
|
10140
10160
|
attr: "col-span--laptop"
|
|
10161
|
+
},
|
|
10162
|
+
{
|
|
10163
|
+
prop: "hasGriddingDesktop",
|
|
10164
|
+
gridAttr: "grid-cols--desktop",
|
|
10165
|
+
attr: "col-span--desktop"
|
|
10141
10166
|
}
|
|
10142
10167
|
];
|
|
10143
10168
|
const spanElement = this.shadowRoot.querySelector(
|
|
@@ -10167,9 +10192,21 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
10167
10192
|
return this.shadowRoot.querySelector("px-h1");
|
|
10168
10193
|
}
|
|
10169
10194
|
get $subtitleSlot() {
|
|
10195
|
+
var _a;
|
|
10196
|
+
return (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(
|
|
10197
|
+
'slot[name="subtitle"]'
|
|
10198
|
+
);
|
|
10199
|
+
}
|
|
10200
|
+
get $subtitleSlotted() {
|
|
10170
10201
|
return this.querySelector('[slot="subtitle"]');
|
|
10171
10202
|
}
|
|
10172
10203
|
get $patchDescriptionSlot() {
|
|
10204
|
+
var _a;
|
|
10205
|
+
return (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(
|
|
10206
|
+
'slot[name="patch-description"]'
|
|
10207
|
+
);
|
|
10208
|
+
}
|
|
10209
|
+
get $patchDescriptionSlotted() {
|
|
10173
10210
|
return this.querySelector('[slot="patch-description"]');
|
|
10174
10211
|
}
|
|
10175
10212
|
get $overlapSlot() {
|
|
@@ -10286,6 +10323,16 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
10286
10323
|
this.removeAttribute("has-gridding--laptop");
|
|
10287
10324
|
}
|
|
10288
10325
|
}
|
|
10326
|
+
get hasGriddingDesktop() {
|
|
10327
|
+
return this.hasAttribute("has-gridding--desktop");
|
|
10328
|
+
}
|
|
10329
|
+
set hasGriddingDesktop(value) {
|
|
10330
|
+
if (value) {
|
|
10331
|
+
this.setAttribute("has-gridding--desktop", "");
|
|
10332
|
+
} else {
|
|
10333
|
+
this.removeAttribute("has-gridding--desktop");
|
|
10334
|
+
}
|
|
10335
|
+
}
|
|
10289
10336
|
get inverted() {
|
|
10290
10337
|
return this.hasAttribute("inverted");
|
|
10291
10338
|
}
|
|
@@ -10809,7 +10856,7 @@ class Drawer extends HTMLElement {
|
|
|
10809
10856
|
if (!customElements.get("px-drawer")) {
|
|
10810
10857
|
customElements.define("px-drawer", Drawer);
|
|
10811
10858
|
}
|
|
10812
|
-
const styles$x = ':host{position:relative}::slotted([slot="popover"]){position:fixed;border-radius:var(--px-radius-main, 8px);background:var(--px-color-background-container-light-default, #fff);box-shadow:0 20px 25px -5px #25252514;margin:0;padding:var(--px-padding-xs-mobile) 0;border:0;right:0;width:auto}:host([grow]) ::slotted([slot="trigger"]):after{right:0;padding-right:var(--px-padding-xs-mobile)}:host([anchoralignment="top-left"]) ::slotted([slot="popover"]){top:auto}:host([anchoralignment="top-right"]) ::slotted([slot="popover"]){top:auto}:host([anchoralignment="bottom-right"]) ::slotted([slot="popover"]){left:auto}@media screen and (max-width: 47.938rem){::slotted([slot="trigger"]){display:block;width:100%}:host([anchoralignment="top-left"]) ::slotted([slot="popover"]){left:var(--px-padding-s-mobile)}:host([anchoralignment="top-right"]) ::slotted([slot="popover"]){left:var(--px-padding-s-mobile)}}@media screen and (min-width: 48rem){::slotted([slot="popover"]){padding-block:var(--px-padding-s-desktop);right:auto;width:auto}}';
|
|
10859
|
+
const styles$x = ':host{position:relative}::slotted([slot="popover"]){position:fixed;border-radius:var(--px-radius-main, 8px);background:var(--px-color-background-container-light-default, #fff);box-shadow:0 20px 25px -5px #25252514;margin:0;padding:var(--px-padding-xs-mobile) 0;border:0;right:0;width:auto;max-height:var(--px-popover-max-height)}:host([grow]) ::slotted([slot="trigger"]):after{right:0;padding-right:var(--px-padding-xs-mobile)}:host([anchoralignment="top-left"]) ::slotted([slot="popover"]){top:auto}:host([anchoralignment="top-right"]) ::slotted([slot="popover"]){top:auto}:host([anchoralignment="bottom-right"]) ::slotted([slot="popover"]){left:auto}@media screen and (max-width: 47.938rem){::slotted([slot="trigger"]){display:block;width:100%}:host([anchoralignment="top-left"]) ::slotted([slot="popover"]){left:var(--px-padding-s-mobile)}:host([anchoralignment="top-right"]) ::slotted([slot="popover"]){left:var(--px-padding-s-mobile)}}@media screen and (min-width: 48rem){::slotted([slot="popover"]){padding-block:var(--px-padding-s-desktop);right:auto;width:auto}}';
|
|
10813
10860
|
const anchorAlignmentValues = [
|
|
10814
10861
|
"top-left",
|
|
10815
10862
|
"top-right",
|
|
@@ -10941,7 +10988,8 @@ class Dropdown extends WithExtraAttributes {
|
|
|
10941
10988
|
"id",
|
|
10942
10989
|
"anchoralignment",
|
|
10943
10990
|
"use-polyfill",
|
|
10944
|
-
"manual-toggle"
|
|
10991
|
+
"manual-toggle",
|
|
10992
|
+
"popover-height"
|
|
10945
10993
|
];
|
|
10946
10994
|
}
|
|
10947
10995
|
connectedCallback() {
|
|
@@ -10983,12 +11031,25 @@ class Dropdown extends WithExtraAttributes {
|
|
|
10983
11031
|
(_a = this.$trigger) == null ? void 0 : _a.removeAttribute("aria-expanded");
|
|
10984
11032
|
}
|
|
10985
11033
|
break;
|
|
11034
|
+
case "popover-height":
|
|
11035
|
+
this.updatePopoverHeight(newValue);
|
|
11036
|
+
break;
|
|
10986
11037
|
default:
|
|
10987
11038
|
super.attributeChangedCallback(name, oldValue, newValue);
|
|
10988
11039
|
break;
|
|
10989
11040
|
}
|
|
10990
11041
|
}
|
|
10991
11042
|
}
|
|
11043
|
+
updatePopoverHeight(newValue) {
|
|
11044
|
+
if (newValue) {
|
|
11045
|
+
this.$popoverElement.style.setProperty(
|
|
11046
|
+
"--px-popover-max-height",
|
|
11047
|
+
newValue
|
|
11048
|
+
);
|
|
11049
|
+
} else {
|
|
11050
|
+
this.$popoverElement.style.removeProperty("--px-popover-max-height");
|
|
11051
|
+
}
|
|
11052
|
+
}
|
|
10992
11053
|
initPopover() {
|
|
10993
11054
|
if (this.$trigger) {
|
|
10994
11055
|
this.$trigger.setAttribute("popovertarget", this.popoverId);
|
|
@@ -11051,6 +11112,16 @@ class Dropdown extends WithExtraAttributes {
|
|
|
11051
11112
|
this.removeAttribute("manual-toggle");
|
|
11052
11113
|
}
|
|
11053
11114
|
}
|
|
11115
|
+
get popoverHeight() {
|
|
11116
|
+
return this.getAttribute("popover-height");
|
|
11117
|
+
}
|
|
11118
|
+
set popoverHeight(value) {
|
|
11119
|
+
if (value) {
|
|
11120
|
+
this.setAttribute("popover-height", value);
|
|
11121
|
+
} else {
|
|
11122
|
+
this.removeAttribute("popover-height");
|
|
11123
|
+
}
|
|
11124
|
+
}
|
|
11054
11125
|
}
|
|
11055
11126
|
_Dropdown_instances = new WeakSet();
|
|
11056
11127
|
resetManualPopoverDisplay_fn = function() {
|
|
@@ -13866,7 +13937,7 @@ class MddSectionItem extends HTMLElement {
|
|
|
13866
13937
|
if (!customElements.get("px-mdd-section-item")) {
|
|
13867
13938
|
customElements.define("px-mdd-section-item", MddSectionItem);
|
|
13868
13939
|
}
|
|
13869
|
-
const styles$n = '*{box-sizing:border-box}#container{display:flex;flex-wrap:nowrap;font-family:var(--px-font-family);font-size:var(--px-font-size-base);color:var(--px-color-text-neutral-default);width:inherit;border-radius:var(--px-radius-main);background-color:var(--px-color-background-surface-default);overflow:hidden}#container.info{border-left:5px var(--px-color-icon-brand-default) solid}#container.success{border-left:5px var(--px-color-icon-purpose-success-default) solid}#container.warning{border-left:5px var(--px-color-icon-purpose-warning-default) solid}#container.error{border-left:5px var(--px-color-icon-purpose-error-default) solid}#container.has-close-button #icon-container{max-width:calc(100% - (var(--px-size-m) + var(--px-spacing-s-mobile)))}#content-container{display:flex;padding:var(--px-padding-m-mobile);flex-grow:1}#content-container px-vstack{max-height:100
|
|
13940
|
+
const styles$n = '*{box-sizing:border-box}#container{display:flex;flex-wrap:nowrap;font-family:var(--px-font-family);font-size:var(--px-font-size-base);color:var(--px-color-text-neutral-default);width:inherit;border-radius:var(--px-radius-main);background-color:var(--px-color-background-surface-default);overflow:hidden}#container.info{border-left:5px var(--px-color-icon-brand-default) solid}#container.success{border-left:5px var(--px-color-icon-purpose-success-default) solid}#container.warning{border-left:5px var(--px-color-icon-purpose-warning-default) solid}#container.error{border-left:5px var(--px-color-icon-purpose-error-default) solid}#container.has-close-button #icon-container{max-width:calc(100% - (var(--px-size-m) + var(--px-spacing-s-mobile)))}#content-container{display:flex;padding:var(--px-padding-m-mobile);flex-grow:1}#content-container px-vstack{max-height:100%;flex-grow:1}#media-container{display:none}::slotted(px-button-icon[slot="close-button"]){position:absolute;top:var(--px-padding-m-mobile);right:var(--px-padding-m-mobile)}dialog{background:transparent;border-radius:0;box-shadow:none;padding:0;border:0;box-sizing:border-box;transform:scale(.95);animation:modalIn .3s ease-out forwards;max-width:calc(100% - (var(--px-spacing-s-mobile) * 2));max-height:calc(100% - (var(--px-spacing-s-mobile) * 2))}dialog[open]{display:flex}::backdrop{background:#0000004d;-webkit-backdrop-filter:saturate(180%) blur(15px);backdrop-filter:saturate(180%) blur(15px)}#content{max-height:12.5rem;overflow:auto}@media screen and (min-width: 48rem){dialog{max-width:calc(100% - (var(--px-spacing-s-tablet) * 2));max-height:calc(100% - (var(--px-spacing-s-tablet) * 2))}#container.has-close-button #icon-container{max-width:calc(100% - (var(--px-size-m) + var(--px-spacing-s-tablet)))}::slotted(px-button-icon[slot="close-button"]){position:absolute;top:var(--px-padding-m-tablet);right:var(--px-padding-m-tablet)}#content{max-height:25rem}}@media screen and (min-width: 64.0625rem){dialog{max-width:calc(100% - (var(--px-spacing-s-laptop) * 2));max-height:calc(100% - (var(--px-spacing-s-laptop) * 2))}#container.has-close-button #icon-container{max-width:calc(100% - (var(--px-size-m) + var(--px-spacing-s-laptop)))}::slotted(px-button-icon[slot="close-button"]){top:var(--px-padding-m-laptop);right:var(--px-padding-m-laptop)}:host([media-src]) #container.has-close-button #icon-container{max-width:100%}:host([media-src]) #media-container{display:block;background-size:cover;background-position:center center;background-repeat:no-repeat;flex-basis:25rem;flex-shrink:0}}@media screen and (min-width: 69.875rem){#container{width:1080px}}@media screen and (min-width: 90.0625rem){dialog{max-width:calc(100% - (var(--px-spacing-s-desktop) * 2));max-height:calc(100% - (var(--px-spacing-s-desktop) * 2))}:host(:not([media-src])) #container.has-close-button #icon-container{max-width:calc(100% - (var(--px-size-m) + var(--px-spacing-s-desktop)))}::slotted(px-button-icon[slot="close-button"]){position:absolute;top:var(--px-padding-m-desktop);right:var(--px-padding-m-desktop)}}@keyframes modalIn{0%{transform:scale(.95);opacity:0}to{transform:scale(1);opacity:1}}';
|
|
13870
13941
|
const styleSheet$m = new CSSStyleSheet();
|
|
13871
13942
|
styleSheet$m.replaceSync(styles$n);
|
|
13872
13943
|
const CLOSE_EVENT$1 = "px.lavender.modal.close";
|
|
@@ -17962,7 +18033,7 @@ class Typography extends HTMLElement {
|
|
|
17962
18033
|
if (!customElements.get("px-typography")) {
|
|
17963
18034
|
customElements.define("px-typography", Typography);
|
|
17964
18035
|
}
|
|
17965
|
-
const styles$1 = ":host .dropdown-content{background-color:var(--px-color-background-surface-default);border-radius:var(--px-radius-main);box-shadow:0 4px 6px -1px #25252514;overflow:
|
|
18036
|
+
const styles$1 = ":host .dropdown-content{background-color:var(--px-color-background-surface-default);border-radius:var(--px-radius-main);box-shadow:0 4px 6px -1px #25252514;padding:0;margin-top:calc(var(--px-focus-offset-mobile) + var(--px-focus-outline-mobile));overflow:auto}@media screen and (min-width: 48rem){:host .dropdown-content{margin-top:calc(var(--px-focus-offset-tablet) + var(--px-focus-outline-tablet))}}@media screen and (min-width: 64.0625rem){:host .dropdown-content{margin-top:calc(var(--px-focus-offset-laptop) + var(--px-focus-outline-laptop))}}@media screen and (min-width: 90.0625rem){:host .dropdown-content{margin-top:calc(var(--px-focus-offset-desktop) + var(--px-focus-outline-desktop))}}:host([inverted]) .dropdown-content{background-color:var(--px-color-background-surface-dark)}";
|
|
17966
18037
|
const styleSheet$2 = new CSSStyleSheet();
|
|
17967
18038
|
styleSheet$2.replaceSync(styles$1);
|
|
17968
18039
|
const _Autocomplete = class _Autocomplete extends WithExtraAttributes {
|
|
@@ -18033,27 +18104,34 @@ const _Autocomplete = class _Autocomplete extends WithExtraAttributes {
|
|
|
18033
18104
|
"extended--mobile",
|
|
18034
18105
|
"extended--tablet",
|
|
18035
18106
|
"extended--laptop",
|
|
18036
|
-
"extended--desktop"
|
|
18107
|
+
"extended--desktop",
|
|
18108
|
+
"popover-height"
|
|
18037
18109
|
];
|
|
18038
18110
|
}
|
|
18039
18111
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
18040
|
-
|
|
18041
|
-
|
|
18042
|
-
|
|
18043
|
-
|
|
18044
|
-
|
|
18045
|
-
|
|
18046
|
-
|
|
18047
|
-
|
|
18048
|
-
|
|
18049
|
-
|
|
18050
|
-
|
|
18051
|
-
|
|
18052
|
-
|
|
18053
|
-
|
|
18054
|
-
|
|
18055
|
-
|
|
18056
|
-
|
|
18112
|
+
if (oldValue !== newValue) {
|
|
18113
|
+
switch (name) {
|
|
18114
|
+
case "size":
|
|
18115
|
+
case "state":
|
|
18116
|
+
case "extended":
|
|
18117
|
+
case "extended--mobile":
|
|
18118
|
+
case "extended--tablet":
|
|
18119
|
+
case "extended--laptop":
|
|
18120
|
+
case "extended--desktop":
|
|
18121
|
+
if (newValue !== null) {
|
|
18122
|
+
this.$input.setAttribute(name, newValue);
|
|
18123
|
+
} else {
|
|
18124
|
+
this.$input.removeAttribute(name);
|
|
18125
|
+
}
|
|
18126
|
+
break;
|
|
18127
|
+
case "popover-height":
|
|
18128
|
+
this.setDefaultPopoverHeight();
|
|
18129
|
+
this.$dropDown.popoverHeight = this.popoverHeight;
|
|
18130
|
+
break;
|
|
18131
|
+
default:
|
|
18132
|
+
super.attributeChangedCallback(name, oldValue, newValue);
|
|
18133
|
+
break;
|
|
18134
|
+
}
|
|
18057
18135
|
}
|
|
18058
18136
|
}
|
|
18059
18137
|
connectedCallback() {
|
|
@@ -18072,11 +18150,17 @@ const _Autocomplete = class _Autocomplete extends WithExtraAttributes {
|
|
|
18072
18150
|
if (labelId) {
|
|
18073
18151
|
this.$dropDownContent.setAttribute("aria-labelledby", labelId);
|
|
18074
18152
|
}
|
|
18153
|
+
this.setDefaultPopoverHeight();
|
|
18075
18154
|
}
|
|
18076
18155
|
disconnectedCallback() {
|
|
18077
18156
|
this.$input.removeEventListener("input", __privateGet(this, _onInput));
|
|
18078
18157
|
this.removeEventListener("keydown", __privateGet(this, _onKeyDown));
|
|
18079
18158
|
}
|
|
18159
|
+
setDefaultPopoverHeight() {
|
|
18160
|
+
if (!this.popoverHeight) {
|
|
18161
|
+
this.popoverHeight = "16.5rem";
|
|
18162
|
+
}
|
|
18163
|
+
}
|
|
18080
18164
|
get value() {
|
|
18081
18165
|
return this.$input.value;
|
|
18082
18166
|
}
|
|
@@ -18110,6 +18194,16 @@ const _Autocomplete = class _Autocomplete extends WithExtraAttributes {
|
|
|
18110
18194
|
get $label() {
|
|
18111
18195
|
return this.querySelector('[slot="label"]');
|
|
18112
18196
|
}
|
|
18197
|
+
get popoverHeight() {
|
|
18198
|
+
return this.getAttribute("popover-height");
|
|
18199
|
+
}
|
|
18200
|
+
set popoverHeight(value) {
|
|
18201
|
+
if (value) {
|
|
18202
|
+
this.setAttribute("popover-height", value);
|
|
18203
|
+
} else {
|
|
18204
|
+
this.removeAttribute("popover-height");
|
|
18205
|
+
}
|
|
18206
|
+
}
|
|
18113
18207
|
};
|
|
18114
18208
|
_controlId = new WeakMap();
|
|
18115
18209
|
_onKeyDown = new WeakMap();
|