@proximus/lavender-action-link 2.0.0-alpha.2 → 2.0.0-alpha.21
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/index.es.js +5 -5
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2,9 +2,9 @@ import "@proximus/lavender-layout";
|
|
|
2
2
|
import "@proximus/lavender-icon";
|
|
3
3
|
import "@proximus/lavender-span";
|
|
4
4
|
import "@proximus/lavender-container";
|
|
5
|
-
import { PxElement as r,
|
|
6
|
-
const
|
|
7
|
-
s.replaceSync(
|
|
5
|
+
import { PxElement as r, log as n, transferAccessibilityAttributes as l } from "@proximus/lavender-common";
|
|
6
|
+
const p = ":host{display:block}:host *{box-sizing:border-box}:host(:not([promoted])){display:none}a{display:block;padding:var(--px-padding-xs-mobile);cursor:pointer;border-radius:var(--px-radius-main);text-decoration:none;color:var(--px-color-text-brand-default);--btn-transition: all .2s ease-in-out 0s;transition:var(--btn-transition)}a px-span{font-size:var(--px-text-size-label-s-mobile)}a:hover{background-color:var(--px-color-background-container-secondary-default)}a:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}@media only screen and (min-width: 48em){a{padding:var(--px-padding-xs-tablet) var(--px-padding-2xs-tablet);min-width:65px}a px-span{font-size:var(--px-text-size-label-s-tablet)}a:focus-visible{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}:host(:not([promoted])){display:block}}@media only screen and (min-width: 64.0625em){a{padding:var(--px-padding-xs-laptop) var(--px-padding-2xs-laptop)}a px-span{font-size:var(--px-text-size-label-s-laptop)}a:focus-visible{outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}}@media only screen and (min-width: 90.0625em){a{padding:var(--px-padding-xs-desktop) var(--px-padding-2xs-desktop)}a px-span{font-size:var(--px-text-size-label-s-desktop)}a:focus-visible{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}}", s = new CSSStyleSheet();
|
|
7
|
+
s.replaceSync(p);
|
|
8
8
|
const i = class i extends r {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(s), this.template = () => `<a href="${this.getAttribute("href")}">
|
|
@@ -24,12 +24,12 @@ const i = class i extends r {
|
|
|
24
24
|
}
|
|
25
25
|
attributeChangedCallback(t, a, e) {
|
|
26
26
|
if ((t === "icon-name" || t === "icon-from" || t === "label") && !e)
|
|
27
|
-
throw
|
|
27
|
+
throw n(`Action link needs a value from the attribute ${t}`), new Error(`Action link needs a value from the attribute ${t}`);
|
|
28
28
|
t === "icon-name" ? this.$icon.setAttribute("name", e) : t === "icon-from" ? this.$icon.setAttribute("from", e) : super.attributeChangedCallback(t, a, e);
|
|
29
29
|
}
|
|
30
30
|
connectedCallback() {
|
|
31
31
|
var t;
|
|
32
|
-
|
|
32
|
+
((t = this.parentElement) == null ? void 0 : t.localName) === "px-header" && this.setAttribute("slot", "header-actions"), this.hasAttribute("icon-from") || this.setAttribute("icon-from", "lavender"), this.hasAttribute("icon-name") || this.setAttribute("icon-name", "bug"), l(this, this.$el, !1), this.getAttribute("aria-label") || this.$el.setAttribute("aria-label", this.textContent);
|
|
33
33
|
}
|
|
34
34
|
get $icon() {
|
|
35
35
|
return this.shadowRoot.querySelector("px-icon");
|