@proximus/lavender-dropdown 1.0.0-alpha.2 → 1.0.0-alpha.4

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -7
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { WithExtraAttributes as g } from "@proximus/lavender-common";
2
- const m = ':host{position:relative}@media screen and (max-width: 767px){{display:block;width:100%}}:host([grow]) ::slotted([slot="trigger"]):after{right:0;padding-right:var(--px-padding-xs-mobile)}::slotted([slot="popover"]){position:absolute;border-radius:var(--px-radius-main, 8px);background:var(--px-background-color-action-neutral-bare-default, #FFF);box-shadow:0 20px 25px -5px #25252514;margin:0;padding:0;border:0;padding-block:var(--px-padding-s-mobile);right:var(--px-padding-s-mobile);width:auto}@media screen and (min-width: 768px){{padding-block:var(--px-padding-s-desktop);right:auto;width:auto}}:host([anchoralignment="top-left"]) ::slotted([slot="popover"]){top:auto}:host([anchoralignment="top-right"]) ::slotted([slot="popover"]){top:auto}@media screen and (max-width: 768px){{left:var(--px-padding-s-mobile)}}:host([anchoralignment="bottom-right"]) ::slotted([slot="popover"]){left:auto}', u = [
1
+ import { WithExtraAttributes as c } from "@proximus/lavender-common";
2
+ const m = ':host{position:relative}::slotted([slot="popover"]){position:absolute;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:0;border:0;padding-block:var(--px-padding-s-mobile);right:var(--px-padding-s-mobile);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: 767px){::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: 768px){::slotted([slot="popover"]){padding-block:var(--px-padding-s-desktop);right:auto;width:auto}}', u = [
3
3
  "top-left",
4
4
  "top-right",
5
5
  "bottom-left",
@@ -7,19 +7,19 @@ const m = ':host{position:relative}@media screen and (max-width: 767px){{display
7
7
  ];
8
8
  function b(a, t, e = "bottom-left", r) {
9
9
  "anchorName" in document.documentElement.style || t.addEventListener("toggle", () => {
10
- var h, l;
10
+ var l, h;
11
11
  if (!a || !t)
12
12
  return;
13
- const o = a.getBoundingClientRect(), c = ((h = window.visualViewport) == null ? void 0 : h.height) ?? window.innerHeight, i = ((l = window.visualViewport) == null ? void 0 : l.width) ?? window.innerWidth, s = r.getPropertyValue("--px-padding-s-mobile") || "16px", d = parseInt(
13
+ const o = a.getBoundingClientRect(), g = ((l = window.visualViewport) == null ? void 0 : l.height) ?? window.innerHeight, i = ((h = window.visualViewport) == null ? void 0 : h.width) ?? window.innerWidth, s = r.getPropertyValue("--px-padding-s-mobile") || "16px", d = parseInt(
14
14
  (r.getPropertyValue("--px-icon-size-xs-desktop") || "24").replace("px", "")
15
15
  );
16
- ["top-left", "top-right"].includes(e) ? (t.style.bottom = `calc( ${s} + ${c - o.top - window.scrollY}px)`, t.style.top = "auto", e === "top-left" ? t.style.left = i < 768 ? `${s}px` : `${o.left}px` : t.style.right = i < 768 ? `${s}px` : `${i - o.right}px`) : (t.style.top = `${o.bottom + window.scrollY}px`, e === "bottom-left" ? t.style.left = i < 768 ? `${s}px` : `${o.left}px` : t.style.right = i < 768 ? `${s}px` : `${i - o.right - d}px`);
16
+ ["top-left", "top-right"].includes(e) ? (t.style.bottom = `calc( ${s} + ${g - o.top - window.scrollY}px)`, t.style.top = "auto", e === "top-left" ? t.style.left = i < 768 ? `${s}px` : `${o.left}px` : t.style.right = i < 768 ? `${s}px` : `${i - o.right}px`) : (t.style.top = `${o.bottom + window.scrollY}px`, e === "bottom-left" ? t.style.left = i < 768 ? `${s}px` : `${o.left}px` : t.style.right = i < 768 ? `${s}px` : `${i - o.right - d}px`);
17
17
  });
18
18
  }
19
19
  const p = new CSSStyleSheet();
20
20
  p.replaceSync(m);
21
21
  const n = "bottom-left";
22
- class f extends g {
22
+ class f extends c {
23
23
  constructor() {
24
24
  super(p), this.template = () => `
25
25
  <style>${this.css}</style>
@@ -46,7 +46,7 @@ class f extends g {
46
46
  ::slotted([slot="popover"]) {
47
47
  position-anchor: ${this.anchorName};
48
48
  top: anchor(${this.anchorName} bottom);
49
- right: calc(anchor(${this.anchorName} right) - var(--px-icon-size-xs-desktop));
49
+ right: calc(anchor(${this.anchorName} right) - var(--px-size-icon-xs));
50
50
  }
51
51
  }
52
52
  :host([anchoralignment="top-left"]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-dropdown",
3
- "version": "1.0.0-alpha.2",
3
+ "version": "1.0.0-alpha.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -42,5 +42,5 @@
42
42
  }
43
43
  }
44
44
  },
45
- "gitHead": "127dc25543d5b6545c1611a6d91a6ebeb7e98fb1"
45
+ "gitHead": "7683b6952d1da07fe58b0f4ddef292e3954ab85d"
46
46
  }