@proximus/lavender-action-link 2.0.0-alpha.11 → 2.0.0-alpha.110
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 +6 -6
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -2,10 +2,10 @@ 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, transferAccessibilityAttributes as
|
|
6
|
-
const
|
|
7
|
-
s.replaceSync(
|
|
8
|
-
const i = class i extends
|
|
5
|
+
import { PxElement as n, log as r, 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) var(--px-padding-2xs-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) var(--px-padding-2xs-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) var(--px-padding-2xs-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
|
+
s.replaceSync(p);
|
|
8
|
+
const i = class i extends n {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(s), this.template = () => `<a href="${this.getAttribute("href")}">
|
|
11
11
|
<px-vstack gap="none" align-items="center">
|
|
@@ -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 r(`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");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-action-link",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.110",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"clean": "rm -rf dist",
|
|
14
14
|
"build": "npm run clean && NODE_ENV=development vite build && tsc && npm run transform-package-json && npm run wc-manifest",
|
|
15
15
|
"test": "vitest run --coverage",
|
|
16
|
-
"wc-manifest": "cem analyze --globs \"src/*\" --config
|
|
16
|
+
"wc-manifest": "cem analyze --globs \"src/*\" --config ../../custom-elements-manifest.config.js --outdir dist"
|
|
17
17
|
},
|
|
18
18
|
"publishConfig": {
|
|
19
19
|
"access": "public"
|