@proximus/lavender-action-button 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
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import "@proximus/lavender-layout";
|
|
2
2
|
import "@proximus/lavender-icon";
|
|
3
3
|
import "@proximus/lavender-span";
|
|
4
|
-
import { PxElement as e,
|
|
4
|
+
import { PxElement as e, renderTemplate as t, transferAccessibilityAttributes as n } from "@proximus/lavender-common";
|
|
5
5
|
//#region src/action-button.css?inline
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
var
|
|
6
|
+
var r = "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{border-color:var(--px-color-border-state-hover-default);background-color:#0000}@media only screen and (width>=64.0625rem){button{border-radius:var(--px-radius-main);width:inherit;height:inherit}}", i = ":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)}}", a = new CSSStyleSheet(), o = new CSSStyleSheet();
|
|
7
|
+
a.replaceSync(r), o.replaceSync(i);
|
|
8
|
+
var s = class extends e {
|
|
9
9
|
static {
|
|
10
10
|
this.nativeName = "button";
|
|
11
11
|
}
|
|
12
12
|
constructor() {
|
|
13
|
-
super(
|
|
13
|
+
super(o, a), this.template = () => `
|
|
14
14
|
<button class="action-button">
|
|
15
15
|
<px-vstack gap="none" align-items="center" justify-content="center">
|
|
16
16
|
<px-icon
|
|
@@ -24,7 +24,7 @@ var o = class extends e {
|
|
|
24
24
|
<px-span color="brand" font-size="inherit"><slot></slot></px-span>
|
|
25
25
|
</px-vstack>
|
|
26
26
|
</button>
|
|
27
|
-
`, this.shadowRoot
|
|
27
|
+
`, t(this.shadowRoot, this.template());
|
|
28
28
|
}
|
|
29
29
|
static get observedAttributes() {
|
|
30
30
|
return [
|
|
@@ -35,7 +35,7 @@ var o = class extends e {
|
|
|
35
35
|
];
|
|
36
36
|
}
|
|
37
37
|
connectedCallback() {
|
|
38
|
-
this.parentElement?.localName === "px-header" && this.setAttribute("slot", "header-actions"),
|
|
38
|
+
this.parentElement?.localName === "px-header" && this.setAttribute("slot", "header-actions"), n(this, this.$el, !1);
|
|
39
39
|
}
|
|
40
40
|
attributeChangedCallback(e, t, n) {
|
|
41
41
|
if (t !== n) switch (e) {
|
|
@@ -73,6 +73,6 @@ var o = class extends e {
|
|
|
73
73
|
this._updateBooleanAttribute("promoted", e);
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
-
customElements.get("px-action-button") || customElements.define("px-action-button",
|
|
76
|
+
customElements.get("px-action-button") || customElements.define("px-action-button", s);
|
|
77
77
|
//#endregion
|
|
78
|
-
export {
|
|
78
|
+
export { s as ActionButton };
|
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-button",
|
|
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": "$dropdown" },
|
|
24
24
|
{ "name": "iconName" },
|
|
25
25
|
{ "name": "iconFrom" },
|
|
26
|
-
{ "name": "promoted" }
|
|
27
|
-
{ "name": "innerHTML" }
|
|
26
|
+
{ "name": "promoted" }
|
|
28
27
|
],
|
|
29
28
|
"events": []
|
|
30
29
|
}
|