@proximus/lavender-action-link 2.0.0-alpha.124 → 2.0.0-alpha.126
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 +7 -7
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2,17 +2,17 @@ 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
|
|
6
|
-
const p = ":host{display:block}:host *{box-sizing:border-box}:host(:not([promoted])){display:none}a,button{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,button px-span{font-size:var(--px-text-size-label-s-mobile)}a:hover,button:hover{background-color:var(--px-color-background-container-secondary-default)}a:focus-visible,button: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: 48rem){a,button{padding:var(--px-padding-xs-tablet)
|
|
5
|
+
import { PxElement as r, log as a, transferAccessibilityAttributes as l } from "@proximus/lavender-common";
|
|
6
|
+
const p = ":host{display:block}:host *{box-sizing:border-box}:host(:not([promoted])){display:none}a,button{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,button px-span{font-size:var(--px-text-size-label-s-mobile)}a:hover,button:hover{background-color:var(--px-color-background-container-secondary-default)}a:focus-visible,button: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: 48rem){a,button{padding:var(--px-padding-xs-tablet);min-width:65px}a px-span,button px-span{font-size:var(--px-text-size-label-s-tablet)}a:focus-visible,button: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.0625rem){a,button{padding:var(--px-padding-xs-laptop)}a px-span,button px-span{font-size:var(--px-text-size-label-s-laptop)}a:focus-visible,button:focus-visible{outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}}@media only screen and (min-width: 90.0625rem){a,button{padding:var(--px-padding-xs-desktop)}a px-span,button px-span{font-size:var(--px-text-size-label-s-desktop)}a:focus-visible,button:focus-visible{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}}", s = new CSSStyleSheet();
|
|
7
7
|
s.replaceSync(p);
|
|
8
|
-
const i = class i extends
|
|
8
|
+
const i = class i extends r {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(s), this.template = () => `<a href="${this.getAttribute("href")}">
|
|
11
11
|
<px-vstack gap="none" align-items="center">
|
|
12
12
|
<px-icon
|
|
13
13
|
name="${this.getAttribute("icon-name")}"
|
|
14
14
|
from="${this.getAttribute("icon-from")}"
|
|
15
|
-
size="
|
|
15
|
+
size="m"
|
|
16
16
|
>
|
|
17
17
|
</px-icon>
|
|
18
18
|
<px-span color="brand" hidden--mobile><slot></slot></px-span>
|
|
@@ -22,10 +22,10 @@ const i = class i extends n {
|
|
|
22
22
|
static get observedAttributes() {
|
|
23
23
|
return [...super.observedAttributes, "icon-name", "icon-from", "promoted"];
|
|
24
24
|
}
|
|
25
|
-
attributeChangedCallback(t,
|
|
25
|
+
attributeChangedCallback(t, n, e) {
|
|
26
26
|
if ((t === "icon-name" || t === "icon-from" || t === "label") && !e)
|
|
27
|
-
throw
|
|
28
|
-
t === "icon-name" ? this.$icon.setAttribute("name", e) : t === "icon-from" ? this.$icon.setAttribute("from", e) : super.attributeChangedCallback(t,
|
|
27
|
+
throw a(`Action link needs a value from the attribute ${t}`), new Error(`Action link needs a value from the attribute ${t}`);
|
|
28
|
+
t === "icon-name" ? this.$icon.setAttribute("name", e) : t === "icon-from" ? this.$icon.setAttribute("from", e) : super.attributeChangedCallback(t, n, e);
|
|
29
29
|
}
|
|
30
30
|
connectedCallback() {
|
|
31
31
|
var t;
|