@proximus/lavender 2.0.0-alpha.121 → 2.0.0-alpha.123

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.
@@ -10809,7 +10809,7 @@ class Drawer extends HTMLElement {
10809
10809
  if (!customElements.get("px-drawer")) {
10810
10810
  customElements.define("px-drawer", Drawer);
10811
10811
  }
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}}';
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;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
10813
  const anchorAlignmentValues = [
10814
10814
  "top-left",
10815
10815
  "top-right",
@@ -10941,7 +10941,8 @@ class Dropdown extends WithExtraAttributes {
10941
10941
  "id",
10942
10942
  "anchoralignment",
10943
10943
  "use-polyfill",
10944
- "manual-toggle"
10944
+ "manual-toggle",
10945
+ "popover-height"
10945
10946
  ];
10946
10947
  }
10947
10948
  connectedCallback() {
@@ -10983,12 +10984,25 @@ class Dropdown extends WithExtraAttributes {
10983
10984
  (_a = this.$trigger) == null ? void 0 : _a.removeAttribute("aria-expanded");
10984
10985
  }
10985
10986
  break;
10987
+ case "popover-height":
10988
+ this.updatePopoverHeight(newValue);
10989
+ break;
10986
10990
  default:
10987
10991
  super.attributeChangedCallback(name, oldValue, newValue);
10988
10992
  break;
10989
10993
  }
10990
10994
  }
10991
10995
  }
10996
+ updatePopoverHeight(newValue) {
10997
+ if (newValue) {
10998
+ this.$popoverElement.style.setProperty(
10999
+ "--px-popover-max-height",
11000
+ newValue
11001
+ );
11002
+ } else {
11003
+ this.$popoverElement.style.removeProperty("--px-popover-max-height");
11004
+ }
11005
+ }
10992
11006
  initPopover() {
10993
11007
  if (this.$trigger) {
10994
11008
  this.$trigger.setAttribute("popovertarget", this.popoverId);
@@ -11051,6 +11065,16 @@ class Dropdown extends WithExtraAttributes {
11051
11065
  this.removeAttribute("manual-toggle");
11052
11066
  }
11053
11067
  }
11068
+ get popoverHeight() {
11069
+ return this.getAttribute("popover-height");
11070
+ }
11071
+ set popoverHeight(value) {
11072
+ if (value) {
11073
+ this.setAttribute("popover-height", value);
11074
+ } else {
11075
+ this.removeAttribute("popover-height");
11076
+ }
11077
+ }
11054
11078
  }
11055
11079
  _Dropdown_instances = new WeakSet();
11056
11080
  resetManualPopoverDisplay_fn = function() {
@@ -13866,7 +13890,7 @@ class MddSectionItem extends HTMLElement {
13866
13890
  if (!customElements.get("px-mdd-section-item")) {
13867
13891
  customElements.define("px-mdd-section-item", MddSectionItem);
13868
13892
  }
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%}#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}}';
13893
+ 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
13894
  const styleSheet$m = new CSSStyleSheet();
13871
13895
  styleSheet$m.replaceSync(styles$n);
13872
13896
  const CLOSE_EVENT$1 = "px.lavender.modal.close";
@@ -17962,7 +17986,7 @@ class Typography extends HTMLElement {
17962
17986
  if (!customElements.get("px-typography")) {
17963
17987
  customElements.define("px-typography", Typography);
17964
17988
  }
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:hidden}:host([inverted]) .dropdown-content{background-color:var(--px-color-background-surface-dark)}";
17989
+ 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
17990
  const styleSheet$2 = new CSSStyleSheet();
17967
17991
  styleSheet$2.replaceSync(styles$1);
17968
17992
  const _Autocomplete = class _Autocomplete extends WithExtraAttributes {
@@ -18033,27 +18057,34 @@ const _Autocomplete = class _Autocomplete extends WithExtraAttributes {
18033
18057
  "extended--mobile",
18034
18058
  "extended--tablet",
18035
18059
  "extended--laptop",
18036
- "extended--desktop"
18060
+ "extended--desktop",
18061
+ "popover-height"
18037
18062
  ];
18038
18063
  }
18039
18064
  attributeChangedCallback(name, oldValue, newValue) {
18040
- switch (name) {
18041
- case "size":
18042
- case "state":
18043
- case "extended":
18044
- case "extended--mobile":
18045
- case "extended--tablet":
18046
- case "extended--laptop":
18047
- case "extended--desktop":
18048
- if (newValue !== null) {
18049
- this.$input.setAttribute(name, newValue);
18050
- } else {
18051
- this.$input.removeAttribute(name);
18052
- }
18053
- break;
18054
- default:
18055
- super.attributeChangedCallback(name, oldValue, newValue);
18056
- break;
18065
+ if (oldValue !== newValue) {
18066
+ switch (name) {
18067
+ case "size":
18068
+ case "state":
18069
+ case "extended":
18070
+ case "extended--mobile":
18071
+ case "extended--tablet":
18072
+ case "extended--laptop":
18073
+ case "extended--desktop":
18074
+ if (newValue !== null) {
18075
+ this.$input.setAttribute(name, newValue);
18076
+ } else {
18077
+ this.$input.removeAttribute(name);
18078
+ }
18079
+ break;
18080
+ case "popover-height":
18081
+ this.setDefaultPopoverHeight();
18082
+ this.$dropDown.popoverHeight = this.popoverHeight;
18083
+ break;
18084
+ default:
18085
+ super.attributeChangedCallback(name, oldValue, newValue);
18086
+ break;
18087
+ }
18057
18088
  }
18058
18089
  }
18059
18090
  connectedCallback() {
@@ -18072,11 +18103,17 @@ const _Autocomplete = class _Autocomplete extends WithExtraAttributes {
18072
18103
  if (labelId) {
18073
18104
  this.$dropDownContent.setAttribute("aria-labelledby", labelId);
18074
18105
  }
18106
+ this.setDefaultPopoverHeight();
18075
18107
  }
18076
18108
  disconnectedCallback() {
18077
18109
  this.$input.removeEventListener("input", __privateGet(this, _onInput));
18078
18110
  this.removeEventListener("keydown", __privateGet(this, _onKeyDown));
18079
18111
  }
18112
+ setDefaultPopoverHeight() {
18113
+ if (!this.popoverHeight) {
18114
+ this.popoverHeight = "16.5rem";
18115
+ }
18116
+ }
18080
18117
  get value() {
18081
18118
  return this.$input.value;
18082
18119
  }
@@ -18110,6 +18147,16 @@ const _Autocomplete = class _Autocomplete extends WithExtraAttributes {
18110
18147
  get $label() {
18111
18148
  return this.querySelector('[slot="label"]');
18112
18149
  }
18150
+ get popoverHeight() {
18151
+ return this.getAttribute("popover-height");
18152
+ }
18153
+ set popoverHeight(value) {
18154
+ if (value) {
18155
+ this.setAttribute("popover-height", value);
18156
+ } else {
18157
+ this.removeAttribute("popover-height");
18158
+ }
18159
+ }
18113
18160
  };
18114
18161
  _controlId = new WeakMap();
18115
18162
  _onKeyDown = new WeakMap();