@proximus/lavender-action-link 2.0.0-alpha.203 → 2.0.0-alpha.204
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/custom-elements.json +0 -4
- package/dist/index.es.js +9 -9
- package/dist/web-types.json +2 -3
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2,16 +2,16 @@ 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 e, log as t, propertyToAttributeSetter as n,
|
|
5
|
+
import { PxElement as e, log as t, propertyToAttributeSetter as n, renderTemplate as r, transferAccessibilityAttributes as i } from "@proximus/lavender-common";
|
|
6
6
|
//#region src/action-link.css?inline
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var
|
|
7
|
+
var a = ":host{display:block}:host *{box-sizing:border-box}:host(:not([promoted])){display:none}a,button{font-family:var(--px-font-family);padding:var(--px-padding-xs-mobile);cursor:pointer;border-radius:var(--px-radius-main);border:var(--px-size-border-m) solid transparent;color:var(--px-color-text-brand-default);--btn-transition:all .2s ease-in-out 0s;transition:var(--btn-transition);text-decoration:none;display:block}:is(a,button) px-span{font-size:var(--px-text-size-label-s-mobile);line-height:var(--px-line-height-ratio-l)}:is(a,button):hover{background-color:var(--px-color-background-container-secondary-default)}:is(a,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 (width>=48rem){a,button{padding:var(--px-padding-xs-tablet)}:is(a,button) px-span{font-size:var(--px-text-size-label-s-tablet)}:is(a,button):focus-visible{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}}@media only screen and (width>=64.0625rem){a,button{min-width:65px;padding:var(--px-padding-xs-laptop)}:is(a,button) px-span{font-size:var(--px-text-size-label-s-laptop)}:is(a,button):focus-visible{outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}:host(:not([promoted])){display:block}}@media only screen and (width>=90.0625rem){a,button{padding:var(--px-padding-xs-desktop)}:is(a,button) px-span{font-size:var(--px-text-size-label-s-desktop)}:is(a,button):focus-visible{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}}", o = new CSSStyleSheet();
|
|
8
|
+
o.replaceSync(a);
|
|
9
|
+
var s = class extends e {
|
|
10
10
|
static {
|
|
11
11
|
this.nativeName = "a";
|
|
12
12
|
}
|
|
13
13
|
constructor() {
|
|
14
|
-
super(
|
|
14
|
+
super(o), this.template = () => `<a href="${this.getAttribute("href")}">
|
|
15
15
|
<px-vstack gap="none" align-items="center">
|
|
16
16
|
<px-icon
|
|
17
17
|
name="${this.getAttribute("icon-name")}"
|
|
@@ -21,7 +21,7 @@ var o = class extends e {
|
|
|
21
21
|
</px-icon>
|
|
22
22
|
<px-span color="brand" font-size="inherit" hidden--mobile hidden--tablet><slot></slot></px-span>
|
|
23
23
|
</px-vstack>
|
|
24
|
-
</a>`, this.shadowRoot
|
|
24
|
+
</a>`, r(this.shadowRoot, this.template());
|
|
25
25
|
}
|
|
26
26
|
static get observedAttributes() {
|
|
27
27
|
return [
|
|
@@ -36,7 +36,7 @@ var o = class extends e {
|
|
|
36
36
|
e === "icon-name" ? this.$icon?.setAttribute("name", r) : e === "icon-from" ? this.$icon?.setAttribute("from", r) : super.attributeChangedCallback(e, n, r);
|
|
37
37
|
}
|
|
38
38
|
connectedCallback() {
|
|
39
|
-
this.parentElement?.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"),
|
|
39
|
+
this.parentElement?.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"), i(this, this.$el, !1), this.getAttribute("aria-label") || n(this.$el, "aria-label", this.textContent);
|
|
40
40
|
}
|
|
41
41
|
get $icon() {
|
|
42
42
|
return this.shadowRoot.querySelector("px-icon");
|
|
@@ -63,6 +63,6 @@ var o = class extends e {
|
|
|
63
63
|
this._updateBooleanAttribute("promoted", e);
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
|
-
customElements.get("px-action-link") || customElements.define("px-action-link",
|
|
66
|
+
customElements.get("px-action-link") || customElements.define("px-action-link", s);
|
|
67
67
|
//#endregion
|
|
68
|
-
export {
|
|
68
|
+
export { s as ActionLink };
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@proximus/lavender-action-link",
|
|
4
|
-
"version": "2.0.0-alpha.
|
|
4
|
+
"version": "2.0.0-alpha.204",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -23,8 +23,7 @@
|
|
|
23
23
|
{ "name": "$anchor" },
|
|
24
24
|
{ "name": "iconName" },
|
|
25
25
|
{ "name": "iconFrom" },
|
|
26
|
-
{ "name": "promoted" }
|
|
27
|
-
{ "name": "innerHTML" }
|
|
26
|
+
{ "name": "promoted" }
|
|
28
27
|
],
|
|
29
28
|
"events": []
|
|
30
29
|
}
|