@proximus/lavender-button-icon 2.0.0-alpha.21 → 2.0.0-alpha.210
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/ButtonIcon.d.ts +18 -11
- package/dist/custom-elements.json +236 -0
- package/dist/index.es.js +105 -108
- package/dist/vscode.css-custom-data.json +6 -0
- package/dist/vscode.html-custom-data.json +38 -0
- package/dist/web-types.json +59 -0
- package/package.json +2 -2
package/dist/ButtonIcon.d.ts
CHANGED
|
@@ -3,9 +3,16 @@ export declare const buttonIconSizeValues: readonly ["", "default", "small"];
|
|
|
3
3
|
export declare const buttonIconVariantValues: readonly ["", "default", "secondary", "naked"];
|
|
4
4
|
export type ButtonIconSize = (typeof buttonIconSizeValues)[number];
|
|
5
5
|
export type ButtonIconVariant = (typeof buttonIconVariantValues)[number];
|
|
6
|
+
/**
|
|
7
|
+
* @summary Button icon for actions.
|
|
8
|
+
* @attr {string} name - The name of the button, submitted as a pair with the button's value as part of the form data.
|
|
9
|
+
* @attr {string} value - The value associated with the button's name when it's submitted with a form.
|
|
10
|
+
* @attr {string} type - The default behavior of the button. Possible values are 'submit', 'reset', and 'button'.
|
|
11
|
+
* @attr {boolean} disabled - Whether the button is disabled.
|
|
12
|
+
*/
|
|
6
13
|
export declare class ButtonIcon extends PxElement<HTMLButtonElement> {
|
|
14
|
+
protected static readonly template: HTMLTemplateElement;
|
|
7
15
|
static nativeName: string;
|
|
8
|
-
private template;
|
|
9
16
|
constructor();
|
|
10
17
|
static get observedAttributes(): string[];
|
|
11
18
|
connectedCallback(): void;
|
|
@@ -14,14 +21,14 @@ export declare class ButtonIcon extends PxElement<HTMLButtonElement> {
|
|
|
14
21
|
updateLoading(): void;
|
|
15
22
|
updateSize(oldValue: string, newValue: string): void;
|
|
16
23
|
updateVariant(oldValue: string, newValue: string): void;
|
|
17
|
-
get inverted():
|
|
18
|
-
set inverted(value:
|
|
19
|
-
get loading():
|
|
20
|
-
set loading(value:
|
|
21
|
-
get size(): string;
|
|
22
|
-
set size(value: string);
|
|
23
|
-
get variant(): string;
|
|
24
|
-
set variant(value: string);
|
|
25
|
-
get ariaExpanded(): string;
|
|
26
|
-
set ariaExpanded(value: string);
|
|
24
|
+
get inverted(): boolean;
|
|
25
|
+
set inverted(value: boolean);
|
|
26
|
+
get loading(): boolean;
|
|
27
|
+
set loading(value: boolean);
|
|
28
|
+
get size(): string | null;
|
|
29
|
+
set size(value: string | null);
|
|
30
|
+
get variant(): string | null;
|
|
31
|
+
set variant(value: string | null);
|
|
32
|
+
get ariaExpanded(): string | null;
|
|
33
|
+
set ariaExpanded(value: string | null);
|
|
27
34
|
}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/ButtonIcon.ts",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "variable",
|
|
11
|
+
"name": "buttonIconSizeValues",
|
|
12
|
+
"type": {
|
|
13
|
+
"text": "['', 'default', 'small']"
|
|
14
|
+
},
|
|
15
|
+
"default": "['', 'default', 'small']"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"kind": "variable",
|
|
19
|
+
"name": "buttonIconVariantValues",
|
|
20
|
+
"type": {
|
|
21
|
+
"text": "[\n '',\n 'default',\n 'secondary',\n 'naked',\n]"
|
|
22
|
+
},
|
|
23
|
+
"default": "[ '', 'default', 'secondary', 'naked', ]"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"kind": "class",
|
|
27
|
+
"description": "",
|
|
28
|
+
"name": "ButtonIcon",
|
|
29
|
+
"members": [
|
|
30
|
+
{
|
|
31
|
+
"kind": "field",
|
|
32
|
+
"name": "template",
|
|
33
|
+
"privacy": "protected",
|
|
34
|
+
"static": true,
|
|
35
|
+
"readonly": true
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"kind": "field",
|
|
39
|
+
"name": "nativeName",
|
|
40
|
+
"type": {
|
|
41
|
+
"text": "string"
|
|
42
|
+
},
|
|
43
|
+
"static": true,
|
|
44
|
+
"default": "'button'"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"kind": "method",
|
|
48
|
+
"name": "_toggleClass",
|
|
49
|
+
"parameters": [
|
|
50
|
+
{
|
|
51
|
+
"name": "oldValue",
|
|
52
|
+
"type": {
|
|
53
|
+
"text": "string"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "newValue",
|
|
58
|
+
"type": {
|
|
59
|
+
"text": "string"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"kind": "method",
|
|
66
|
+
"name": "updateLoading"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"kind": "method",
|
|
70
|
+
"name": "updateSize",
|
|
71
|
+
"parameters": [
|
|
72
|
+
{
|
|
73
|
+
"name": "oldValue",
|
|
74
|
+
"type": {
|
|
75
|
+
"text": "string"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "newValue",
|
|
80
|
+
"type": {
|
|
81
|
+
"text": "string"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"kind": "method",
|
|
88
|
+
"name": "updateVariant",
|
|
89
|
+
"parameters": [
|
|
90
|
+
{
|
|
91
|
+
"name": "oldValue",
|
|
92
|
+
"type": {
|
|
93
|
+
"text": "string"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "newValue",
|
|
98
|
+
"type": {
|
|
99
|
+
"text": "string"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"kind": "field",
|
|
106
|
+
"name": "inverted"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"kind": "field",
|
|
110
|
+
"name": "loading"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"kind": "field",
|
|
114
|
+
"name": "size"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"kind": "field",
|
|
118
|
+
"name": "variant"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"kind": "field",
|
|
122
|
+
"name": "ariaExpanded"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"attributes": [
|
|
126
|
+
{
|
|
127
|
+
"name": "inverted"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "loading"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "size"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "variant"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "aria-expanded"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"type": {
|
|
143
|
+
"text": "string"
|
|
144
|
+
},
|
|
145
|
+
"description": "The name of the button, submitted as a pair with the button's value as part of the form data.",
|
|
146
|
+
"name": "name"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"type": {
|
|
150
|
+
"text": "string"
|
|
151
|
+
},
|
|
152
|
+
"description": "The value associated with the button's name when it's submitted with a form.",
|
|
153
|
+
"name": "value"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": {
|
|
157
|
+
"text": "string"
|
|
158
|
+
},
|
|
159
|
+
"description": "The default behavior of the button. Possible values are 'submit', 'reset', and 'button'.",
|
|
160
|
+
"name": "type"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"type": {
|
|
164
|
+
"text": "boolean"
|
|
165
|
+
},
|
|
166
|
+
"description": "Whether the button is disabled.",
|
|
167
|
+
"name": "disabled"
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"superclass": {
|
|
171
|
+
"name": "PxElement",
|
|
172
|
+
"package": "@proximus/lavender-common"
|
|
173
|
+
},
|
|
174
|
+
"summary": "Button icon for actions.",
|
|
175
|
+
"tagName": "px-button-icon",
|
|
176
|
+
"customElement": true
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"exports": [
|
|
180
|
+
{
|
|
181
|
+
"kind": "js",
|
|
182
|
+
"name": "buttonIconSizeValues",
|
|
183
|
+
"declaration": {
|
|
184
|
+
"name": "buttonIconSizeValues",
|
|
185
|
+
"module": "src/ButtonIcon.ts"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"kind": "js",
|
|
190
|
+
"name": "buttonIconVariantValues",
|
|
191
|
+
"declaration": {
|
|
192
|
+
"name": "buttonIconVariantValues",
|
|
193
|
+
"module": "src/ButtonIcon.ts"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"kind": "js",
|
|
198
|
+
"name": "ButtonIcon",
|
|
199
|
+
"declaration": {
|
|
200
|
+
"name": "ButtonIcon",
|
|
201
|
+
"module": "src/ButtonIcon.ts"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"kind": "custom-element-definition",
|
|
206
|
+
"name": "px-button-icon",
|
|
207
|
+
"declaration": {
|
|
208
|
+
"name": "ButtonIcon",
|
|
209
|
+
"module": "src/ButtonIcon.ts"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"kind": "javascript-module",
|
|
216
|
+
"path": "src/buttonicon.css",
|
|
217
|
+
"declarations": [],
|
|
218
|
+
"exports": []
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"kind": "javascript-module",
|
|
222
|
+
"path": "src/index.ts",
|
|
223
|
+
"declarations": [],
|
|
224
|
+
"exports": [
|
|
225
|
+
{
|
|
226
|
+
"kind": "js",
|
|
227
|
+
"name": "*",
|
|
228
|
+
"declaration": {
|
|
229
|
+
"name": "*",
|
|
230
|
+
"module": "src/ButtonIcon"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
}
|
package/dist/index.es.js
CHANGED
|
@@ -1,109 +1,106 @@
|
|
|
1
|
-
import { PxElement as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
],
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
let r = o;
|
|
104
|
-
customElements.get("px-button-icon") || customElements.define("px-button-icon", r);
|
|
105
|
-
export {
|
|
106
|
-
r as ButtonIcon,
|
|
107
|
-
l as buttonIconSizeValues,
|
|
108
|
-
b as buttonIconVariantValues
|
|
1
|
+
import { PxElement as e, accessibilityAttributes as t, createTemplate as n, log as r, renderTemplate as i } from "@proximus/lavender-common";
|
|
2
|
+
//#region src/buttonicon.css?inline
|
|
3
|
+
var a = ":host{display:inline-block}.btn-icon,.btn-icon *{box-sizing:border-box}.btn-icon{font-size:var(--px-font-size-base);width:var(--px-size-l);height:var(--px-size-l);vertical-align:middle;cursor:pointer;--btn-transition:all .2s ease-in-out 0s;transition:var(--btn-transition);background:var(--px-color-background-container-primary-default);color:var(--px-color-icon-brand-inverted);border-radius:var(--px-radius-pill);padding:var(--px-padding-xs-mobile);border:var(--px-size-border-m) solid transparent;justify-content:center;align-items:center;display:inline-flex}.btn-icon ::slotted(px-icon){line-height:0}.btn-icon:hover:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-bordered-default);color:var(--px-color-icon-brand-default);border-color:var(--px-color-border-state-hover-default)}.btn-icon:active:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-active-inverted);color:var(--px-color-icon-state-active-default);border-color:var(--px-color-border-state-active-default)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}.btn-icon[disabled],.btn-icon[aria-disabled=true]{background:var(--px-color-background-state-disabled-default);color:var(--px-color-icon-state-disabled-default);cursor:default;pointer-events:none}.btn-icon.btn-icon--state-loading{background:var(--px-color-background-state-disabled-default);color:var(--px-color-icon-brand-default);cursor:inherit}.btn-icon--size-small{padding:var(--px-padding-2xs-mobile);width:var(--px-size-m);height:var(--px-size-m)}.btn-icon--variant-secondary{background-color:var(--px-color-background-container-secondary-default);color:var(--px-color-icon-brand-default)}.btn-icon--variant-naked{color:var(--px-color-icon-brand-default);background-color:#0000;width:auto;height:auto}:host([inverted]) .btn-icon{background:var(--px-color-background-container-primary-inverted);color:var(--px-color-icon-brand-default)}:host([inverted]) .btn-icon:hover:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-bordered-inverted);color:var(--px-color-icon-brand-inverted);border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) .btn-icon:active:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-default);color:var(--px-color-icon-state-active-inverted);border-color:var(--px-color-border-state-active-inverted)}:host([inverted]) .btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-color:var(--px-color-border-focus-outline-inverted)}:host([inverted]) .btn-icon[disabled],:host([inverted]) .btn-icon[aria-disabled=true]{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-icon-state-disabled-inverted)}:host([inverted]) .btn-icon.btn-icon--state-loading{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-icon-brand-inverted);border-color:#0000}:host([inverted]) .btn-icon.btn-icon--variant-naked{color:var(--px-color-icon-brand-inverted);background-color:#0000}:host([inverted]) .btn-icon--variant-secondary{background-color:var(--px-color-background-container-secondary-inverted);color:var(--px-color-icon-brand-inverted)}@media screen and (width>=48rem){.btn-icon{padding:var(--px-padding-xs-desktop)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn-icon--size-small{padding:var(--px-padding-2xs-desktop)}}@media screen and (width>=64.0625rem){.btn-icon{padding:var(--px-padding-xs-desktop)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn-icon--size-small{padding:var(--px-padding-2xs-desktop)}}", o = new CSSStyleSheet();
|
|
4
|
+
o.replaceSync(a);
|
|
5
|
+
var s = [
|
|
6
|
+
"",
|
|
7
|
+
"default",
|
|
8
|
+
"small"
|
|
9
|
+
], c = [
|
|
10
|
+
"",
|
|
11
|
+
"default",
|
|
12
|
+
"secondary",
|
|
13
|
+
"naked"
|
|
14
|
+
], l = class a extends e {
|
|
15
|
+
static {
|
|
16
|
+
this.template = n("<button class=\"btn-icon\"><slot></slot></button>");
|
|
17
|
+
}
|
|
18
|
+
static {
|
|
19
|
+
this.nativeName = "button";
|
|
20
|
+
}
|
|
21
|
+
constructor() {
|
|
22
|
+
super(o), i(this.shadowRoot, a.template);
|
|
23
|
+
}
|
|
24
|
+
static get observedAttributes() {
|
|
25
|
+
return [
|
|
26
|
+
...super.observedAttributes,
|
|
27
|
+
...t,
|
|
28
|
+
"inverted",
|
|
29
|
+
"loading",
|
|
30
|
+
"size",
|
|
31
|
+
"variant",
|
|
32
|
+
"aria-expanded"
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
connectedCallback() {
|
|
36
|
+
let e = this.querySelector("px-icon");
|
|
37
|
+
if (e) {
|
|
38
|
+
let t = e.getAttribute("size"), n = e.getAttribute("color");
|
|
39
|
+
e.addEventListener("click", () => {
|
|
40
|
+
this.$el.focus();
|
|
41
|
+
}), t || e.setAttribute("size", "s"), this.size === "small" && e.setAttribute("size", "xs"), n || e.setAttribute("color", "inherit");
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
attributeChangedCallback(e, t, n) {
|
|
45
|
+
if (t !== n) switch (e) {
|
|
46
|
+
case "loading":
|
|
47
|
+
this.updateLoading();
|
|
48
|
+
break;
|
|
49
|
+
case "size":
|
|
50
|
+
this.updateSize(t, n);
|
|
51
|
+
break;
|
|
52
|
+
case "variant":
|
|
53
|
+
this.updateVariant(t, n);
|
|
54
|
+
break;
|
|
55
|
+
case "aria-expanded":
|
|
56
|
+
n && (this.$el.setAttribute("aria-expanded", n), this.removeAttribute("aria-expanded"));
|
|
57
|
+
break;
|
|
58
|
+
default: super.attributeChangedCallback(e, t, n);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
_toggleClass(e, t) {
|
|
62
|
+
e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(e), t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(t);
|
|
63
|
+
}
|
|
64
|
+
updateLoading() {
|
|
65
|
+
this.$el.classList.toggle("btn-icon--state-loading");
|
|
66
|
+
}
|
|
67
|
+
updateSize(e, t) {
|
|
68
|
+
this.checkName(s, t) ? (e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`btn-icon--size-${e}`), t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`btn-icon--size-${t}`)) : r(`"${t}" is not a valid size value for ${this.tagName.toLowerCase()}. Allowed values are: "${s.join("\", \"")}".`);
|
|
69
|
+
}
|
|
70
|
+
updateVariant(e, t) {
|
|
71
|
+
this.checkName(c, t) ? (e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`btn-icon--variant-${e}`), t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`btn-icon--variant-${t}`)) : r(`"${t}" is not a valid variant value for ${this.tagName.toLowerCase()}. Allowed values are: "${c.join("\", \"")}".`);
|
|
72
|
+
}
|
|
73
|
+
get inverted() {
|
|
74
|
+
return this.hasAttribute("inverted");
|
|
75
|
+
}
|
|
76
|
+
set inverted(e) {
|
|
77
|
+
this._updateBooleanAttribute("inverted", e);
|
|
78
|
+
}
|
|
79
|
+
get loading() {
|
|
80
|
+
return this.hasAttribute("loading");
|
|
81
|
+
}
|
|
82
|
+
set loading(e) {
|
|
83
|
+
this._updateBooleanAttribute("loading", e);
|
|
84
|
+
}
|
|
85
|
+
get size() {
|
|
86
|
+
return this.getAttribute("size");
|
|
87
|
+
}
|
|
88
|
+
set size(e) {
|
|
89
|
+
this._updateAttribute("size", e);
|
|
90
|
+
}
|
|
91
|
+
get variant() {
|
|
92
|
+
return this.getAttribute("variant");
|
|
93
|
+
}
|
|
94
|
+
set variant(e) {
|
|
95
|
+
this._updateAttribute("variant", e);
|
|
96
|
+
}
|
|
97
|
+
get ariaExpanded() {
|
|
98
|
+
return this.getAttribute("aria-expanded");
|
|
99
|
+
}
|
|
100
|
+
set ariaExpanded(e) {
|
|
101
|
+
this._updateAttribute("aria-expanded", e);
|
|
102
|
+
}
|
|
109
103
|
};
|
|
104
|
+
customElements.get("px-button-icon") || customElements.define("px-button-icon", l);
|
|
105
|
+
//#endregion
|
|
106
|
+
export { l as ButtonIcon, s as buttonIconSizeValues, c as buttonIconVariantValues };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
|
|
3
|
+
"version": 1.1,
|
|
4
|
+
"tags": [
|
|
5
|
+
{
|
|
6
|
+
"name": "px-button-icon",
|
|
7
|
+
"description": "Button icon for actions.\n---\n",
|
|
8
|
+
"attributes": [
|
|
9
|
+
{ "name": "inverted", "values": [] },
|
|
10
|
+
{ "name": "loading", "values": [] },
|
|
11
|
+
{ "name": "size", "values": [] },
|
|
12
|
+
{ "name": "variant", "values": [] },
|
|
13
|
+
{ "name": "aria-expanded", "values": [] },
|
|
14
|
+
{
|
|
15
|
+
"name": "name",
|
|
16
|
+
"description": "The name of the button, submitted as a pair with the button's value as part of the form data.",
|
|
17
|
+
"values": []
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "value",
|
|
21
|
+
"description": "The value associated with the button's name when it's submitted with a form.",
|
|
22
|
+
"values": []
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "type",
|
|
26
|
+
"description": "The default behavior of the button. Possible values are 'submit', 'reset', and 'button'.",
|
|
27
|
+
"values": []
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "disabled",
|
|
31
|
+
"description": "Whether the button is disabled.",
|
|
32
|
+
"values": []
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"references": []
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
|
+
"name": "@proximus/lavender-button-icon",
|
|
4
|
+
"version": "2.0.0-alpha.210",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"contributions": {
|
|
7
|
+
"html": {
|
|
8
|
+
"elements": [
|
|
9
|
+
{
|
|
10
|
+
"name": "px-button-icon",
|
|
11
|
+
"description": "Button icon for actions.\n\n---\n",
|
|
12
|
+
"doc-url": "",
|
|
13
|
+
"attributes": [
|
|
14
|
+
{ "name": "inverted", "value": { "type": "string" } },
|
|
15
|
+
{ "name": "loading", "value": { "type": "string" } },
|
|
16
|
+
{ "name": "size", "value": { "type": "string" } },
|
|
17
|
+
{ "name": "variant", "value": { "type": "string" } },
|
|
18
|
+
{ "name": "aria-expanded", "value": { "type": "string" } },
|
|
19
|
+
{
|
|
20
|
+
"name": "name",
|
|
21
|
+
"description": "The name of the button, submitted as a pair with the button's value as part of the form data.",
|
|
22
|
+
"value": { "type": "string" }
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "value",
|
|
26
|
+
"description": "The value associated with the button's name when it's submitted with a form.",
|
|
27
|
+
"value": { "type": "string" }
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "type",
|
|
31
|
+
"description": "The default behavior of the button. Possible values are 'submit', 'reset', and 'button'.",
|
|
32
|
+
"value": { "type": "string" }
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "disabled",
|
|
36
|
+
"description": "Whether the button is disabled.",
|
|
37
|
+
"value": { "type": "boolean" }
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"events": [],
|
|
41
|
+
"js": {
|
|
42
|
+
"properties": [
|
|
43
|
+
{ "name": "inverted" },
|
|
44
|
+
{ "name": "loading" },
|
|
45
|
+
{ "name": "size" },
|
|
46
|
+
{ "name": "variant" },
|
|
47
|
+
{ "name": "ariaExpanded" }
|
|
48
|
+
],
|
|
49
|
+
"events": []
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"css": {
|
|
55
|
+
"properties": [],
|
|
56
|
+
"pseudo-elements": []
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-button-icon",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.210",
|
|
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"
|