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