@proximus/lavender-action-button 1.4.14-beta.3 → 1.4.14
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/ActionButton.d.ts +4 -4
- package/dist/index.es.js +58 -59
- package/package.json +1 -1
package/dist/ActionButton.d.ts
CHANGED
|
@@ -11,10 +11,10 @@ export declare class ActionButton extends PxElement<HTMLButtonElement> {
|
|
|
11
11
|
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
12
12
|
get $icon(): HTMLElement;
|
|
13
13
|
get $dropdown(): HTMLElement;
|
|
14
|
-
get iconName(): string
|
|
15
|
-
set iconName(value: string
|
|
16
|
-
get iconFrom(): string
|
|
17
|
-
set iconFrom(value: string
|
|
14
|
+
get iconName(): string;
|
|
15
|
+
set iconName(value: string);
|
|
16
|
+
get iconFrom(): string;
|
|
17
|
+
set iconFrom(value: string);
|
|
18
18
|
get promoted(): boolean;
|
|
19
19
|
set promoted(value: boolean);
|
|
20
20
|
}
|
package/dist/index.es.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import "@proximus/lavender-layout";
|
|
2
2
|
import "@proximus/lavender-icon";
|
|
3
3
|
import "@proximus/lavender-span";
|
|
4
|
-
import { PxElement as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
constructor() {
|
|
13
|
-
super(a, i), this.template = () => `
|
|
4
|
+
import { PxElement as a, transferAccessibilityAttributes as l } from "@proximus/lavender-common";
|
|
5
|
+
const p = "button{border-radius:var(--px-radius-pill);background-color:var(--px-color-background-container-secondary-default);width:var(--px-size-l);height:var(--px-size-l)}button:hover{background-color:transparent;border-color:var(--px-color-border-state-hover-default)}@media only screen and (min-width: 64.0625rem){button{border-radius:var(--px-radius-main);width:inherit;height:inherit}}", c = ":host{display:block}:host *{box-sizing:border-box}:host(:not([promoted])){display:none}a,button{display:block;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;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);line-height:var(--px-line-height-ratio-l)}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)}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)}}@media only screen and (min-width: 64.0625rem){a,button{min-width:65px;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)}:host(:not([promoted])){display:block}}@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)}}", r = new CSSStyleSheet(), s = new CSSStyleSheet();
|
|
6
|
+
r.replaceSync(p);
|
|
7
|
+
s.replaceSync(c);
|
|
8
|
+
const i = class i extends a {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(s, r), this.template = () => `
|
|
14
11
|
<button class="action-button">
|
|
15
12
|
<px-vstack gap="none" align-items="center" justify-content="center">
|
|
16
13
|
<px-icon
|
|
@@ -25,54 +22,56 @@ var o = class extends e {
|
|
|
25
22
|
</px-vstack>
|
|
26
23
|
</button>
|
|
27
24
|
`, this.shadowRoot.innerHTML = this.template();
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
25
|
+
}
|
|
26
|
+
static get observedAttributes() {
|
|
27
|
+
return [...super.observedAttributes, "icon-name", "icon-from", "promoted"];
|
|
28
|
+
}
|
|
29
|
+
connectedCallback() {
|
|
30
|
+
var t;
|
|
31
|
+
((t = this.parentElement) == null ? void 0 : t.localName) === "px-header" && this.setAttribute("slot", "header-actions"), l(this, this.$el, !1);
|
|
32
|
+
}
|
|
33
|
+
attributeChangedCallback(t, n, e) {
|
|
34
|
+
if (n !== e)
|
|
35
|
+
switch (t) {
|
|
36
|
+
case "icon-name":
|
|
37
|
+
this.$icon.setAttribute("name", e);
|
|
38
|
+
break;
|
|
39
|
+
case "icon-from":
|
|
40
|
+
this.$icon.setAttribute("from", e);
|
|
41
|
+
break;
|
|
42
|
+
default:
|
|
43
|
+
super.attributeChangedCallback(t, n, e);
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
get $icon() {
|
|
48
|
+
return this.shadowRoot.querySelector("px-icon");
|
|
49
|
+
}
|
|
50
|
+
get $dropdown() {
|
|
51
|
+
return this.shadowRoot.querySelector("px-dropdown");
|
|
52
|
+
}
|
|
53
|
+
get iconName() {
|
|
54
|
+
return this.getAttribute("icon-name");
|
|
55
|
+
}
|
|
56
|
+
set iconName(t) {
|
|
57
|
+
this.setAttribute("icon-name", t);
|
|
58
|
+
}
|
|
59
|
+
get iconFrom() {
|
|
60
|
+
return this.getAttribute("icon-from");
|
|
61
|
+
}
|
|
62
|
+
set iconFrom(t) {
|
|
63
|
+
this.setAttribute("icon-from", t);
|
|
64
|
+
}
|
|
65
|
+
get promoted() {
|
|
66
|
+
return this.hasAttribute("promoted");
|
|
67
|
+
}
|
|
68
|
+
set promoted(t) {
|
|
69
|
+
t ? this.setAttribute("promoted", "") : this.removeAttribute("promoted");
|
|
70
|
+
}
|
|
75
71
|
};
|
|
72
|
+
i.nativeName = "button";
|
|
73
|
+
let o = i;
|
|
76
74
|
customElements.get("px-action-button") || customElements.define("px-action-button", o);
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
export {
|
|
76
|
+
o as ActionButton
|
|
77
|
+
};
|