@govbr-ds/webcomponents 2.0.0-next.4 → 2.0.0-next.6
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/LICENSE +1 -1
- package/README.md +87 -79
- package/dist/cjs/app-globals-3a1e7e63.js +7 -0
- package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
- package/dist/cjs/br-button.cjs.entry.js +116 -0
- package/dist/cjs/br-button.cjs.entry.js.map +1 -0
- package/dist/cjs/br-checkbox.cjs.entry.js +98 -0
- package/dist/cjs/br-checkbox.cjs.entry.js.map +1 -0
- package/dist/cjs/br-icon.cjs.entry.js +2465 -0
- package/dist/cjs/br-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/br-input.cjs.entry.js +116 -0
- package/dist/cjs/br-input.cjs.entry.js.map +1 -0
- package/dist/cjs/br-item.cjs.entry.js +87 -0
- package/dist/cjs/br-item.cjs.entry.js.map +1 -0
- package/dist/cjs/index-d682c89d.js +1480 -0
- package/dist/cjs/index-d682c89d.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/inherited-attributes-61a2aff9.js +103 -0
- package/dist/cjs/inherited-attributes-61a2aff9.js.map +1 -0
- package/dist/cjs/loader.cjs.js +17 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/webcomponents.cjs.js +27 -0
- package/dist/cjs/webcomponents.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +16 -0
- package/dist/collection/components/button/button.css +24213 -0
- package/dist/collection/components/button/button.js +454 -0
- package/dist/collection/components/button/button.js.map +1 -0
- package/dist/collection/components/checkbox/checkbox.css +23375 -0
- package/dist/collection/components/checkbox/checkbox.js +392 -0
- package/dist/collection/components/checkbox/checkbox.js.map +1 -0
- package/dist/collection/components/icon/icon.css +23222 -0
- package/dist/collection/components/icon/icon.js +324 -0
- package/dist/collection/components/icon/icon.js.map +1 -0
- package/dist/collection/components/icon/tests/icon.e2e.js +107 -0
- package/dist/collection/components/icon/tests/icon.e2e.js.map +1 -0
- package/dist/collection/components/icon/tests/icon.spec.js +80 -0
- package/dist/collection/components/icon/tests/icon.spec.js.map +1 -0
- package/dist/collection/components/input/input.css +23428 -0
- package/dist/collection/components/input/input.js +631 -0
- package/dist/collection/components/input/input.js.map +1 -0
- package/dist/collection/components/input/tests/input.e2e.js +25 -0
- package/dist/collection/components/input/tests/input.e2e.js.map +1 -0
- package/dist/collection/components/input/tests/input.spec.js +36 -0
- package/dist/collection/components/input/tests/input.spec.js.map +1 -0
- package/dist/collection/components/item/item.css +23596 -0
- package/dist/collection/components/item/item.js +297 -0
- package/dist/collection/components/item/item.js.map +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/pages/button/button.js +32 -0
- package/dist/collection/pages/checkbox/checkbox.js +34 -0
- package/dist/collection/pages/icon/icon.js +19 -0
- package/dist/collection/pages/input/input.js +35 -0
- package/dist/collection/pages/item/item.js +0 -0
- package/dist/collection/utils/inherited-attributes.js +98 -0
- package/dist/collection/utils/inherited-attributes.js.map +1 -0
- package/dist/collection/utils/interfaces.js +2 -0
- package/dist/collection/utils/interfaces.js.map +1 -0
- package/dist/components/br-button.d.ts +11 -0
- package/dist/components/br-button.js +8 -0
- package/dist/components/br-button.js.map +1 -0
- package/dist/components/br-checkbox.d.ts +11 -0
- package/dist/components/br-checkbox.js +114 -0
- package/dist/components/br-checkbox.js.map +1 -0
- package/dist/components/br-icon.d.ts +11 -0
- package/dist/components/br-icon.js +2481 -0
- package/dist/components/br-icon.js.map +1 -0
- package/dist/components/br-input.d.ts +11 -0
- package/dist/components/br-input.js +150 -0
- package/dist/components/br-input.js.map +1 -0
- package/dist/components/br-item.d.ts +11 -0
- package/dist/components/br-item.js +99 -0
- package/dist/components/br-item.js.map +1 -0
- package/dist/components/button.js +132 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/index.d.ts +46 -0
- package/dist/components/index.js +8 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/inherited-attributes.js +101 -0
- package/dist/components/inherited-attributes.js.map +1 -0
- package/dist/esm/app-globals-0f993ce5.js +5 -0
- package/dist/esm/app-globals-0f993ce5.js.map +1 -0
- package/dist/esm/br-button.entry.js +112 -0
- package/dist/esm/br-button.entry.js.map +1 -0
- package/dist/esm/br-checkbox.entry.js +94 -0
- package/dist/esm/br-checkbox.entry.js.map +1 -0
- package/dist/esm/br-icon.entry.js +2461 -0
- package/dist/esm/br-icon.entry.js.map +1 -0
- package/dist/esm/br-input.entry.js +112 -0
- package/dist/esm/br-input.entry.js.map +1 -0
- package/dist/esm/br-item.entry.js +83 -0
- package/dist/esm/br-item.entry.js.map +1 -0
- package/dist/esm/index-55a13a51.js +1451 -0
- package/dist/esm/index-55a13a51.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/inherited-attributes-c856c729.js +101 -0
- package/dist/esm/inherited-attributes-c856c729.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/webcomponents.js +22 -0
- package/dist/esm/webcomponents.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/button/button.d.ts +68 -0
- package/dist/types/components/checkbox/checkbox.d.ts +54 -0
- package/dist/types/components/icon/icon.d.ts +50 -0
- package/dist/types/components/input/input.d.ts +85 -0
- package/dist/types/components/item/item.d.ts +50 -0
- package/dist/types/components.d.ts +777 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1681 -0
- package/dist/types/utils/inherited-attributes.d.ts +20 -0
- package/dist/types/utils/interfaces.d.ts +3 -0
- package/dist/webcomponents/index.esm.js +2 -0
- package/dist/webcomponents/index.esm.js.map +1 -0
- package/dist/webcomponents/p-1b6e8650.entry.js +13 -0
- package/dist/webcomponents/p-1b6e8650.entry.js.map +1 -0
- package/dist/webcomponents/p-61231fb7.entry.js +2 -0
- package/dist/webcomponents/p-61231fb7.entry.js.map +1 -0
- package/dist/webcomponents/p-8ed9a673.entry.js +2 -0
- package/dist/webcomponents/p-8ed9a673.entry.js.map +1 -0
- package/dist/webcomponents/p-a7e423b4.entry.js +2 -0
- package/dist/webcomponents/p-a7e423b4.entry.js.map +1 -0
- package/dist/webcomponents/p-b0e416bd.entry.js +2 -0
- package/dist/webcomponents/p-b0e416bd.entry.js.map +1 -0
- package/dist/webcomponents/p-e1255160.js +2 -0
- package/dist/webcomponents/p-e1255160.js.map +1 -0
- package/dist/webcomponents/p-ee6f4f3f.js +2 -0
- package/dist/webcomponents/p-ee6f4f3f.js.map +1 -0
- package/dist/webcomponents/p-f379e66c.js +3 -0
- package/dist/webcomponents/p-f379e66c.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +2 -0
- package/dist/webcomponents/webcomponents.esm.js.map +1 -0
- package/hydrate/index.d.ts +218 -0
- package/hydrate/index.js +20687 -0
- package/hydrate/package.json +6 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +52 -85
- package/vscode-data.json +309 -0
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import "iconify-icon";
|
|
3
|
+
import { inheritAriaAttributes } from "../../utils/inherited-attributes";
|
|
4
|
+
export class Icon {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.inheritedAttributes = {};
|
|
7
|
+
this.IconName = undefined;
|
|
8
|
+
this.height = undefined;
|
|
9
|
+
this.width = undefined;
|
|
10
|
+
this.class = undefined;
|
|
11
|
+
this.inline = false;
|
|
12
|
+
this.rotate = undefined;
|
|
13
|
+
this.flip = undefined;
|
|
14
|
+
}
|
|
15
|
+
connectedCallback() {
|
|
16
|
+
this.brConnectedCallback.emit(this);
|
|
17
|
+
}
|
|
18
|
+
componentWillLoad() {
|
|
19
|
+
this.brComponentWillLoad.emit(this);
|
|
20
|
+
this.inheritedAttributes = inheritAriaAttributes(this.el);
|
|
21
|
+
}
|
|
22
|
+
componentDidLoad() {
|
|
23
|
+
this.brComponentDidLoad.emit(this);
|
|
24
|
+
}
|
|
25
|
+
componentWillRender() {
|
|
26
|
+
this.brComponentWillRender.emit(this);
|
|
27
|
+
}
|
|
28
|
+
componentDidRender() {
|
|
29
|
+
this.brComponentDidRender.emit(this);
|
|
30
|
+
}
|
|
31
|
+
componentShouldUpdate() {
|
|
32
|
+
this.brComponentShouldUpdate.emit(this);
|
|
33
|
+
}
|
|
34
|
+
componentWillUpdate() {
|
|
35
|
+
this.brComponentWillUpdate.emit(this);
|
|
36
|
+
}
|
|
37
|
+
componentDidUpdate() {
|
|
38
|
+
this.brComponentDidUpdate.emit(this);
|
|
39
|
+
}
|
|
40
|
+
disconnectedCallback() {
|
|
41
|
+
this.brDisconnectedCallback.emit(this);
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
return (h(Host, { key: 'b26b2da21c7f395e42c9f73d0f7c3663b1bd6d5c' }, h("iconify-icon", Object.assign({ key: 'eb22872b7e12ef49253ca6f2ed829929d5376fe8', flip: this.flip, width: this.width, class: this.class, icon: this.IconName, inline: this.inline, height: this.height, rotate: this.rotate }, this.inheritedAttributes))));
|
|
45
|
+
}
|
|
46
|
+
static get is() { return "br-icon"; }
|
|
47
|
+
static get encapsulation() { return "shadow"; }
|
|
48
|
+
static get formAssociated() { return true; }
|
|
49
|
+
static get originalStyleUrls() {
|
|
50
|
+
return {
|
|
51
|
+
"$": ["icon.scss"]
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
static get styleUrls() {
|
|
55
|
+
return {
|
|
56
|
+
"$": ["icon.css"]
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
static get properties() {
|
|
60
|
+
return {
|
|
61
|
+
"IconName": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"mutable": false,
|
|
64
|
+
"complexType": {
|
|
65
|
+
"original": "string",
|
|
66
|
+
"resolved": "string",
|
|
67
|
+
"references": {}
|
|
68
|
+
},
|
|
69
|
+
"required": false,
|
|
70
|
+
"optional": false,
|
|
71
|
+
"docs": {
|
|
72
|
+
"tags": [],
|
|
73
|
+
"text": "Nome do \u00EDcone Iconify a ser exibido"
|
|
74
|
+
},
|
|
75
|
+
"attribute": "icon-name",
|
|
76
|
+
"reflect": true
|
|
77
|
+
},
|
|
78
|
+
"height": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"mutable": false,
|
|
81
|
+
"complexType": {
|
|
82
|
+
"original": "string",
|
|
83
|
+
"resolved": "string",
|
|
84
|
+
"references": {}
|
|
85
|
+
},
|
|
86
|
+
"required": false,
|
|
87
|
+
"optional": false,
|
|
88
|
+
"docs": {
|
|
89
|
+
"tags": [],
|
|
90
|
+
"text": "Altura do \u00EDcone, pode ser especificada em qualquer unidade CSS v\u00E1lida (px, em, rem, etc.)"
|
|
91
|
+
},
|
|
92
|
+
"attribute": "height",
|
|
93
|
+
"reflect": true
|
|
94
|
+
},
|
|
95
|
+
"width": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"mutable": false,
|
|
98
|
+
"complexType": {
|
|
99
|
+
"original": "string",
|
|
100
|
+
"resolved": "string",
|
|
101
|
+
"references": {}
|
|
102
|
+
},
|
|
103
|
+
"required": false,
|
|
104
|
+
"optional": false,
|
|
105
|
+
"docs": {
|
|
106
|
+
"tags": [],
|
|
107
|
+
"text": "Largura do \u00EDcone, pode ser especificada em qualquer unidade CSS v\u00E1lida (px, em, rem, etc.)"
|
|
108
|
+
},
|
|
109
|
+
"attribute": "width",
|
|
110
|
+
"reflect": true
|
|
111
|
+
},
|
|
112
|
+
"class": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"mutable": false,
|
|
115
|
+
"complexType": {
|
|
116
|
+
"original": "string",
|
|
117
|
+
"resolved": "string",
|
|
118
|
+
"references": {}
|
|
119
|
+
},
|
|
120
|
+
"required": false,
|
|
121
|
+
"optional": true,
|
|
122
|
+
"docs": {
|
|
123
|
+
"tags": [],
|
|
124
|
+
"text": "Classes CSS adicionais a serem aplicadas ao \u00EDcone"
|
|
125
|
+
},
|
|
126
|
+
"attribute": "class",
|
|
127
|
+
"reflect": true
|
|
128
|
+
},
|
|
129
|
+
"inline": {
|
|
130
|
+
"type": "boolean",
|
|
131
|
+
"mutable": false,
|
|
132
|
+
"complexType": {
|
|
133
|
+
"original": "boolean",
|
|
134
|
+
"resolved": "boolean",
|
|
135
|
+
"references": {}
|
|
136
|
+
},
|
|
137
|
+
"required": false,
|
|
138
|
+
"optional": true,
|
|
139
|
+
"docs": {
|
|
140
|
+
"tags": [],
|
|
141
|
+
"text": "Adiciona alinhamento vertical ao \u00EDcone quando embutido no texto"
|
|
142
|
+
},
|
|
143
|
+
"attribute": "inline",
|
|
144
|
+
"reflect": true,
|
|
145
|
+
"defaultValue": "false"
|
|
146
|
+
},
|
|
147
|
+
"rotate": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"mutable": false,
|
|
150
|
+
"complexType": {
|
|
151
|
+
"original": "string",
|
|
152
|
+
"resolved": "string",
|
|
153
|
+
"references": {}
|
|
154
|
+
},
|
|
155
|
+
"required": false,
|
|
156
|
+
"optional": true,
|
|
157
|
+
"docs": {
|
|
158
|
+
"tags": [],
|
|
159
|
+
"text": "Rotaciona o \u00EDcone em diferentes \u00E2ngulos. Aceita valores como \"90deg\", \"180deg\", \"270deg\"."
|
|
160
|
+
},
|
|
161
|
+
"attribute": "rotate",
|
|
162
|
+
"reflect": true
|
|
163
|
+
},
|
|
164
|
+
"flip": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"mutable": false,
|
|
167
|
+
"complexType": {
|
|
168
|
+
"original": "string",
|
|
169
|
+
"resolved": "string",
|
|
170
|
+
"references": {}
|
|
171
|
+
},
|
|
172
|
+
"required": false,
|
|
173
|
+
"optional": true,
|
|
174
|
+
"docs": {
|
|
175
|
+
"tags": [],
|
|
176
|
+
"text": "Espelha o \u00EDcone horizontalmente, verticalmente ou ambos. Aceita valores \"horizontal\", \"vertical\"."
|
|
177
|
+
},
|
|
178
|
+
"attribute": "flip",
|
|
179
|
+
"reflect": true
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
static get events() {
|
|
184
|
+
return [{
|
|
185
|
+
"method": "brConnectedCallback",
|
|
186
|
+
"name": "brConnectedCallback",
|
|
187
|
+
"bubbles": true,
|
|
188
|
+
"cancelable": true,
|
|
189
|
+
"composed": true,
|
|
190
|
+
"docs": {
|
|
191
|
+
"tags": [],
|
|
192
|
+
"text": "Disparado quando o componente \u00E9 conectado ao DOM. Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
|
|
193
|
+
},
|
|
194
|
+
"complexType": {
|
|
195
|
+
"original": "this",
|
|
196
|
+
"resolved": "this",
|
|
197
|
+
"references": {}
|
|
198
|
+
}
|
|
199
|
+
}, {
|
|
200
|
+
"method": "brComponentWillLoad",
|
|
201
|
+
"name": "brComponentWillLoad",
|
|
202
|
+
"bubbles": true,
|
|
203
|
+
"cancelable": true,
|
|
204
|
+
"composed": true,
|
|
205
|
+
"docs": {
|
|
206
|
+
"tags": [],
|
|
207
|
+
"text": "Disparado antes do componente ser carregado. Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
|
|
208
|
+
},
|
|
209
|
+
"complexType": {
|
|
210
|
+
"original": "this",
|
|
211
|
+
"resolved": "this",
|
|
212
|
+
"references": {}
|
|
213
|
+
}
|
|
214
|
+
}, {
|
|
215
|
+
"method": "brComponentDidLoad",
|
|
216
|
+
"name": "brComponentDidLoad",
|
|
217
|
+
"bubbles": true,
|
|
218
|
+
"cancelable": true,
|
|
219
|
+
"composed": true,
|
|
220
|
+
"docs": {
|
|
221
|
+
"tags": [],
|
|
222
|
+
"text": "Disparado ap\u00F3s o componente ser carregado. Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
|
|
223
|
+
},
|
|
224
|
+
"complexType": {
|
|
225
|
+
"original": "this",
|
|
226
|
+
"resolved": "this",
|
|
227
|
+
"references": {}
|
|
228
|
+
}
|
|
229
|
+
}, {
|
|
230
|
+
"method": "brComponentWillRender",
|
|
231
|
+
"name": "brComponentWillRender",
|
|
232
|
+
"bubbles": true,
|
|
233
|
+
"cancelable": true,
|
|
234
|
+
"composed": true,
|
|
235
|
+
"docs": {
|
|
236
|
+
"tags": [],
|
|
237
|
+
"text": "Disparado antes do componente ser renderizado. Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
|
|
238
|
+
},
|
|
239
|
+
"complexType": {
|
|
240
|
+
"original": "this",
|
|
241
|
+
"resolved": "this",
|
|
242
|
+
"references": {}
|
|
243
|
+
}
|
|
244
|
+
}, {
|
|
245
|
+
"method": "brComponentDidRender",
|
|
246
|
+
"name": "brComponentDidRender",
|
|
247
|
+
"bubbles": true,
|
|
248
|
+
"cancelable": true,
|
|
249
|
+
"composed": true,
|
|
250
|
+
"docs": {
|
|
251
|
+
"tags": [],
|
|
252
|
+
"text": "Disparado ap\u00F3s o componente ser renderizado. Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
|
|
253
|
+
},
|
|
254
|
+
"complexType": {
|
|
255
|
+
"original": "this",
|
|
256
|
+
"resolved": "this",
|
|
257
|
+
"references": {}
|
|
258
|
+
}
|
|
259
|
+
}, {
|
|
260
|
+
"method": "brComponentShouldUpdate",
|
|
261
|
+
"name": "brComponentShouldUpdate",
|
|
262
|
+
"bubbles": true,
|
|
263
|
+
"cancelable": true,
|
|
264
|
+
"composed": true,
|
|
265
|
+
"docs": {
|
|
266
|
+
"tags": [],
|
|
267
|
+
"text": "Disparado antes do componente ser atualizado. Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
|
|
268
|
+
},
|
|
269
|
+
"complexType": {
|
|
270
|
+
"original": "this",
|
|
271
|
+
"resolved": "this",
|
|
272
|
+
"references": {}
|
|
273
|
+
}
|
|
274
|
+
}, {
|
|
275
|
+
"method": "brComponentWillUpdate",
|
|
276
|
+
"name": "brComponentWillUpdate",
|
|
277
|
+
"bubbles": true,
|
|
278
|
+
"cancelable": true,
|
|
279
|
+
"composed": true,
|
|
280
|
+
"docs": {
|
|
281
|
+
"tags": [],
|
|
282
|
+
"text": "Disparado antes do componente ser atualizado. Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
|
|
283
|
+
},
|
|
284
|
+
"complexType": {
|
|
285
|
+
"original": "this",
|
|
286
|
+
"resolved": "this",
|
|
287
|
+
"references": {}
|
|
288
|
+
}
|
|
289
|
+
}, {
|
|
290
|
+
"method": "brComponentDidUpdate",
|
|
291
|
+
"name": "brComponentDidUpdate",
|
|
292
|
+
"bubbles": true,
|
|
293
|
+
"cancelable": true,
|
|
294
|
+
"composed": true,
|
|
295
|
+
"docs": {
|
|
296
|
+
"tags": [],
|
|
297
|
+
"text": "Disparado ap\u00F3s o componente ser atualizado. Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
|
|
298
|
+
},
|
|
299
|
+
"complexType": {
|
|
300
|
+
"original": "this",
|
|
301
|
+
"resolved": "this",
|
|
302
|
+
"references": {}
|
|
303
|
+
}
|
|
304
|
+
}, {
|
|
305
|
+
"method": "brDisconnectedCallback",
|
|
306
|
+
"name": "brDisconnectedCallback",
|
|
307
|
+
"bubbles": true,
|
|
308
|
+
"cancelable": true,
|
|
309
|
+
"composed": true,
|
|
310
|
+
"docs": {
|
|
311
|
+
"tags": [],
|
|
312
|
+
"text": "Disparado quando o componente \u00E9 desconectado do DOM. Consulte a documenta\u00E7\u00E3o do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback)."
|
|
313
|
+
},
|
|
314
|
+
"complexType": {
|
|
315
|
+
"original": "this",
|
|
316
|
+
"resolved": "this",
|
|
317
|
+
"references": {}
|
|
318
|
+
}
|
|
319
|
+
}];
|
|
320
|
+
}
|
|
321
|
+
static get elementRef() { return "el"; }
|
|
322
|
+
static get attachInternalsMemberName() { return "elementInternals"; }
|
|
323
|
+
}
|
|
324
|
+
//# sourceMappingURL=icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../src/components/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACvG,OAAO,cAAc,CAAA;AACrB,OAAO,EAAc,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AAQpF,MAAM,OAAO,IAAI;;QA2BP,wBAAmB,GAAe,EAAE,CAAA;;;;;sBARA,KAAK;;;;IAYjD,iBAAiB;QACf,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACrC,CAAC;IAID,iBAAiB;QACf,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACnC,IAAI,CAAC,mBAAmB,GAAG,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC3D,CAAC;IAID,gBAAgB;QACd,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACpC,CAAC;IAID,mBAAmB;QACjB,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACvC,CAAC;IAID,kBAAkB;QAChB,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACtC,CAAC;IAID,qBAAqB;QACnB,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACzC,CAAC;IAID,mBAAmB;QACjB,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACvC,CAAC;IAID,kBAAkB;QAChB,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACtC,CAAC;IAID,oBAAoB;QAClB,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACxC,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,mFACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,IAAI,EAAE,IAAI,CAAC,QAAQ,EACnB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,MAAM,EAAE,IAAI,CAAC,MAAM,IACf,IAAI,CAAC,mBAAmB,EACd,CACX,CACR,CAAA;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { AttachInternals, Component, Element, Event, EventEmitter, h, Host, Prop } from '@stencil/core'\nimport 'iconify-icon'\nimport { Attributes, inheritAriaAttributes } from '../../utils/inherited-attributes'\n\n@Component({\n tag: 'br-icon',\n styleUrl: 'icon.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class Icon {\n /** Elemento host */\n @Element() el: HTMLElement\n\n @AttachInternals() elementInternals: ElementInternals\n\n /** Nome do ícone Iconify a ser exibido */\n @Prop({ reflect: true }) IconName: string\n\n /** Altura do ícone, pode ser especificada em qualquer unidade CSS válida (px, em, rem, etc.) */\n @Prop({ reflect: true }) height: string\n\n /** Largura do ícone, pode ser especificada em qualquer unidade CSS válida (px, em, rem, etc.) */\n @Prop({ reflect: true }) width: string\n\n /** Classes CSS adicionais a serem aplicadas ao ícone */\n @Prop({ reflect: true }) class?: string\n\n /** Adiciona alinhamento vertical ao ícone quando embutido no texto */\n @Prop({ reflect: true }) inline?: boolean = false\n\n /** Rotaciona o ícone em diferentes ângulos. Aceita valores como \"90deg\", \"180deg\", \"270deg\". */\n @Prop({ reflect: true }) rotate?: string\n\n /** Espelha o ícone horizontalmente, verticalmente ou ambos. Aceita valores \"horizontal\", \"vertical\". */\n @Prop({ reflect: true }) flip?: string\n\n private inheritedAttributes: Attributes = {}\n\n /** Disparado quando o componente é conectado ao DOM. Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brConnectedCallback: EventEmitter<this>\n connectedCallback() {\n this.brConnectedCallback.emit(this)\n }\n\n /** Disparado antes do componente ser carregado. Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentWillLoad: EventEmitter<this>\n componentWillLoad() {\n this.brComponentWillLoad.emit(this)\n this.inheritedAttributes = inheritAriaAttributes(this.el)\n }\n\n /** Disparado após o componente ser carregado. Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentDidLoad: EventEmitter<this>\n componentDidLoad() {\n this.brComponentDidLoad.emit(this)\n }\n\n /** Disparado antes do componente ser renderizado. Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentWillRender: EventEmitter<this>\n componentWillRender() {\n this.brComponentWillRender.emit(this)\n }\n\n /** Disparado após o componente ser renderizado. Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentDidRender: EventEmitter<this>\n componentDidRender() {\n this.brComponentDidRender.emit(this)\n }\n\n /** Disparado antes do componente ser atualizado. Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentShouldUpdate: EventEmitter<this>\n componentShouldUpdate() {\n this.brComponentShouldUpdate.emit(this)\n }\n\n /** Disparado antes do componente ser atualizado. Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentWillUpdate: EventEmitter<this>\n componentWillUpdate() {\n this.brComponentWillUpdate.emit(this)\n }\n\n /** Disparado após o componente ser atualizado. Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentDidUpdate: EventEmitter<this>\n componentDidUpdate() {\n this.brComponentDidUpdate.emit(this)\n }\n\n /** Disparado quando o componente é desconectado do DOM. Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brDisconnectedCallback: EventEmitter<this>\n disconnectedCallback() {\n this.brDisconnectedCallback.emit(this)\n }\n\n render() {\n return (\n <Host>\n <iconify-icon\n flip={this.flip}\n width={this.width}\n class={this.class}\n icon={this.IconName}\n inline={this.inline}\n height={this.height}\n rotate={this.rotate}\n {...this.inheritedAttributes}\n ></iconify-icon>\n </Host>\n )\n }\n}\n"]}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// import AxeBuilder from '@axe-core/playwright'
|
|
2
|
+
// import { expect, test } from '@playwright/test'
|
|
3
|
+
// test.describe('br-icon', () => {
|
|
4
|
+
// test('should render with the "hydrated" class', async ({ page }) => {
|
|
5
|
+
// await page.goto('icon')
|
|
6
|
+
// await page.setContent('<br-icon></br-icon>')
|
|
7
|
+
// const element = await page.locator('br-icon')
|
|
8
|
+
// await expect(element).toHaveClass(/hydrated/)
|
|
9
|
+
// })
|
|
10
|
+
// test('should render with "brand" icon-style', async ({ page }) => {
|
|
11
|
+
// const props = [
|
|
12
|
+
// {
|
|
13
|
+
// name: 'name',
|
|
14
|
+
// value: 'node-js',
|
|
15
|
+
// },
|
|
16
|
+
// {
|
|
17
|
+
// name: 'icon-style',
|
|
18
|
+
// value: 'brand',
|
|
19
|
+
// },
|
|
20
|
+
// ]
|
|
21
|
+
// const expectedDataPrefix = 'fab'
|
|
22
|
+
// await page.goto('icon')
|
|
23
|
+
// await page.setContent(
|
|
24
|
+
// `<br-icon ${props[0].name}="${props[0].value}" ${props[1].name}="${props[1].value}"></br-icon>`
|
|
25
|
+
// )
|
|
26
|
+
// const svgIcon = await page.locator('br-icon svg')
|
|
27
|
+
// await expect(svgIcon).toHaveAttribute('data-prefix', expectedDataPrefix)
|
|
28
|
+
// })
|
|
29
|
+
// test('should render with "regular" icon-style', async ({ page }) => {
|
|
30
|
+
// const props = [
|
|
31
|
+
// {
|
|
32
|
+
// name: 'name',
|
|
33
|
+
// value: 'envelope',
|
|
34
|
+
// },
|
|
35
|
+
// {
|
|
36
|
+
// name: 'icon-style',
|
|
37
|
+
// value: 'regular',
|
|
38
|
+
// },
|
|
39
|
+
// ]
|
|
40
|
+
// const expectedDataPrefix = 'far'
|
|
41
|
+
// await page.goto('icon')
|
|
42
|
+
// await page.setContent(
|
|
43
|
+
// `<br-icon ${props[0].name}="${props[0].value}" ${props[1].name}="${props[1].value}"></br-icon>`
|
|
44
|
+
// )
|
|
45
|
+
// const svgIcon = await page.locator('br-icon svg')
|
|
46
|
+
// await expect(svgIcon).toHaveAttribute('data-prefix', expectedDataPrefix)
|
|
47
|
+
// })
|
|
48
|
+
// test('should render with "solid" icon-style', async ({ page }) => {
|
|
49
|
+
// const props = [
|
|
50
|
+
// {
|
|
51
|
+
// name: 'name',
|
|
52
|
+
// value: 'camera',
|
|
53
|
+
// },
|
|
54
|
+
// {
|
|
55
|
+
// name: 'icon-style',
|
|
56
|
+
// value: 'solid',
|
|
57
|
+
// },
|
|
58
|
+
// ]
|
|
59
|
+
// const expectedDataPrefix = 'fas'
|
|
60
|
+
// await page.goto('icon')
|
|
61
|
+
// await page.setContent(
|
|
62
|
+
// `<br-icon ${props[0].name}="${props[0].value}" ${props[1].name}="${props[1].value}"></br-icon>`
|
|
63
|
+
// )
|
|
64
|
+
// const svgIcon = await page.locator('br-icon svg')
|
|
65
|
+
// await expect(svgIcon).toHaveAttribute('data-prefix', expectedDataPrefix)
|
|
66
|
+
// })
|
|
67
|
+
// test('should render with a specified icon name', async ({ page }) => {
|
|
68
|
+
// const props = [
|
|
69
|
+
// {
|
|
70
|
+
// name: 'name',
|
|
71
|
+
// value: 'node-js',
|
|
72
|
+
// },
|
|
73
|
+
// {
|
|
74
|
+
// name: 'icon-style',
|
|
75
|
+
// value: 'brand',
|
|
76
|
+
// },
|
|
77
|
+
// ]
|
|
78
|
+
// await page.goto('icon')
|
|
79
|
+
// await page.setContent(
|
|
80
|
+
// `<br-icon ${props[0].name}="${props[0].value}" ${props[1].name}="${props[1].value}"></br-icon>`
|
|
81
|
+
// )
|
|
82
|
+
// const svgIcon = await page.locator('br-icon svg')
|
|
83
|
+
// await expect(svgIcon).toHaveAttribute('data-icon', props[0].value)
|
|
84
|
+
// })
|
|
85
|
+
// test('should not have any automatically detectable WCAG A or AA violations', async ({ page }) => {
|
|
86
|
+
// const props = [
|
|
87
|
+
// {
|
|
88
|
+
// name: 'name',
|
|
89
|
+
// value: 'camera',
|
|
90
|
+
// },
|
|
91
|
+
// {
|
|
92
|
+
// name: 'icon-style',
|
|
93
|
+
// value: 'solid',
|
|
94
|
+
// },
|
|
95
|
+
// ]
|
|
96
|
+
// await page.goto('icon')
|
|
97
|
+
// await page.setContent(
|
|
98
|
+
// `<br-icon ${props[0].name}="${props[0].value}" ${props[1].name}="${props[1].value}"></br-icon>`
|
|
99
|
+
// )
|
|
100
|
+
// const accessibilityScanResults = await new AxeBuilder({ page })
|
|
101
|
+
// .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'])
|
|
102
|
+
// .disableRules(['color-contrast', 'html-has-lang', 'document-title'])
|
|
103
|
+
// .analyze()
|
|
104
|
+
// expect(accessibilityScanResults.violations).toEqual([])
|
|
105
|
+
// })
|
|
106
|
+
// })
|
|
107
|
+
//# sourceMappingURL=icon.e2e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.e2e.js","sourceRoot":"","sources":["../../../../src/components/icon/tests/icon.e2e.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,kDAAkD;AAElD,mCAAmC;AACnC,0EAA0E;AAC1E,8BAA8B;AAC9B,mDAAmD;AAEnD,oDAAoD;AACpD,oDAAoD;AACpD,OAAO;AAEP,wEAAwE;AACxE,sBAAsB;AACtB,UAAU;AACV,wBAAwB;AACxB,4BAA4B;AAC5B,WAAW;AACX,UAAU;AACV,8BAA8B;AAC9B,0BAA0B;AAC1B,WAAW;AACX,QAAQ;AACR,uCAAuC;AACvC,8BAA8B;AAC9B,6BAA6B;AAC7B,wGAAwG;AACxG,QAAQ;AAER,wDAAwD;AACxD,+EAA+E;AAC/E,OAAO;AAEP,0EAA0E;AAC1E,sBAAsB;AACtB,UAAU;AACV,wBAAwB;AACxB,6BAA6B;AAC7B,WAAW;AACX,UAAU;AACV,8BAA8B;AAC9B,4BAA4B;AAC5B,WAAW;AACX,QAAQ;AACR,uCAAuC;AACvC,8BAA8B;AAC9B,6BAA6B;AAC7B,wGAAwG;AACxG,QAAQ;AAER,wDAAwD;AACxD,+EAA+E;AAC/E,OAAO;AAEP,wEAAwE;AACxE,sBAAsB;AACtB,UAAU;AACV,wBAAwB;AACxB,2BAA2B;AAC3B,WAAW;AACX,UAAU;AACV,8BAA8B;AAC9B,0BAA0B;AAC1B,WAAW;AACX,QAAQ;AACR,uCAAuC;AACvC,8BAA8B;AAC9B,6BAA6B;AAC7B,wGAAwG;AACxG,QAAQ;AAER,wDAAwD;AACxD,+EAA+E;AAC/E,OAAO;AAEP,2EAA2E;AAC3E,sBAAsB;AACtB,UAAU;AACV,wBAAwB;AACxB,4BAA4B;AAC5B,WAAW;AACX,UAAU;AACV,8BAA8B;AAC9B,0BAA0B;AAC1B,WAAW;AACX,QAAQ;AACR,8BAA8B;AAC9B,6BAA6B;AAC7B,wGAAwG;AACxG,QAAQ;AAER,wDAAwD;AACxD,yEAAyE;AACzE,OAAO;AAEP,uGAAuG;AACvG,sBAAsB;AACtB,UAAU;AACV,wBAAwB;AACxB,2BAA2B;AAC3B,WAAW;AACX,UAAU;AACV,8BAA8B;AAC9B,0BAA0B;AAC1B,WAAW;AACX,QAAQ;AACR,8BAA8B;AAC9B,6BAA6B;AAC7B,wGAAwG;AACxG,QAAQ;AAER,sEAAsE;AACtE,gEAAgE;AAChE,6EAA6E;AAC7E,mBAAmB;AAEnB,8DAA8D;AAC9D,OAAO;AACP,KAAK","sourcesContent":["// import AxeBuilder from '@axe-core/playwright'\n// import { expect, test } from '@playwright/test'\n\n// test.describe('br-icon', () => {\n// test('should render with the \"hydrated\" class', async ({ page }) => {\n// await page.goto('icon')\n// await page.setContent('<br-icon></br-icon>')\n\n// const element = await page.locator('br-icon')\n// await expect(element).toHaveClass(/hydrated/)\n// })\n\n// test('should render with \"brand\" icon-style', async ({ page }) => {\n// const props = [\n// {\n// name: 'name',\n// value: 'node-js',\n// },\n// {\n// name: 'icon-style',\n// value: 'brand',\n// },\n// ]\n// const expectedDataPrefix = 'fab'\n// await page.goto('icon')\n// await page.setContent(\n// `<br-icon ${props[0].name}=\"${props[0].value}\" ${props[1].name}=\"${props[1].value}\"></br-icon>`\n// )\n\n// const svgIcon = await page.locator('br-icon svg')\n// await expect(svgIcon).toHaveAttribute('data-prefix', expectedDataPrefix)\n// })\n\n// test('should render with \"regular\" icon-style', async ({ page }) => {\n// const props = [\n// {\n// name: 'name',\n// value: 'envelope',\n// },\n// {\n// name: 'icon-style',\n// value: 'regular',\n// },\n// ]\n// const expectedDataPrefix = 'far'\n// await page.goto('icon')\n// await page.setContent(\n// `<br-icon ${props[0].name}=\"${props[0].value}\" ${props[1].name}=\"${props[1].value}\"></br-icon>`\n// )\n\n// const svgIcon = await page.locator('br-icon svg')\n// await expect(svgIcon).toHaveAttribute('data-prefix', expectedDataPrefix)\n// })\n\n// test('should render with \"solid\" icon-style', async ({ page }) => {\n// const props = [\n// {\n// name: 'name',\n// value: 'camera',\n// },\n// {\n// name: 'icon-style',\n// value: 'solid',\n// },\n// ]\n// const expectedDataPrefix = 'fas'\n// await page.goto('icon')\n// await page.setContent(\n// `<br-icon ${props[0].name}=\"${props[0].value}\" ${props[1].name}=\"${props[1].value}\"></br-icon>`\n// )\n\n// const svgIcon = await page.locator('br-icon svg')\n// await expect(svgIcon).toHaveAttribute('data-prefix', expectedDataPrefix)\n// })\n\n// test('should render with a specified icon name', async ({ page }) => {\n// const props = [\n// {\n// name: 'name',\n// value: 'node-js',\n// },\n// {\n// name: 'icon-style',\n// value: 'brand',\n// },\n// ]\n// await page.goto('icon')\n// await page.setContent(\n// `<br-icon ${props[0].name}=\"${props[0].value}\" ${props[1].name}=\"${props[1].value}\"></br-icon>`\n// )\n\n// const svgIcon = await page.locator('br-icon svg')\n// await expect(svgIcon).toHaveAttribute('data-icon', props[0].value)\n// })\n\n// test('should not have any automatically detectable WCAG A or AA violations', async ({ page }) => {\n// const props = [\n// {\n// name: 'name',\n// value: 'camera',\n// },\n// {\n// name: 'icon-style',\n// value: 'solid',\n// },\n// ]\n// await page.goto('icon')\n// await page.setContent(\n// `<br-icon ${props[0].name}=\"${props[0].value}\" ${props[1].name}=\"${props[1].value}\"></br-icon>`\n// )\n\n// const accessibilityScanResults = await new AxeBuilder({ page })\n// .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'])\n// .disableRules(['color-contrast', 'html-has-lang', 'document-title'])\n// .analyze()\n\n// expect(accessibilityScanResults.violations).toEqual([])\n// })\n// })\n"]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// import { newSpecPage } from '@stencil/core/testing'
|
|
2
|
+
// import { Icon } from '../icon'
|
|
3
|
+
// describe('br-icon', () => {
|
|
4
|
+
// it('should render the icon with default style and icon name "camera"', async () => {
|
|
5
|
+
// const prop = {
|
|
6
|
+
// name: 'name',
|
|
7
|
+
// value: 'camera',
|
|
8
|
+
// }
|
|
9
|
+
// const page = await newSpecPage({
|
|
10
|
+
// components: [Icon],
|
|
11
|
+
// html: `<br-icon ${prop.name}="${prop.value}"></br-icon>`,
|
|
12
|
+
// })
|
|
13
|
+
// expect(page.root).toEqualHtml(`
|
|
14
|
+
// <br-icon icon-style="solid" name="camera">
|
|
15
|
+
// <mock:shadow-root>
|
|
16
|
+
// <div class="br-icon">
|
|
17
|
+
// <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="camera" class="svg-inline--fa fa-camera" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
18
|
+
// <path fill="currentColor" d="M149.1 64.8L138.7 96H64C28.7 96 0 124.7 0 160V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H373.3L362.9 64.8C356.4 45.2 338.1 32 317.4 32H194.6c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"></path>
|
|
19
|
+
// </svg>
|
|
20
|
+
// </div>
|
|
21
|
+
// </mock:shadow-root>
|
|
22
|
+
// </br-icon>
|
|
23
|
+
// `)
|
|
24
|
+
// })
|
|
25
|
+
// it('should render the icon with brand style and icon name "node-js"', async () => {
|
|
26
|
+
// const prop = [
|
|
27
|
+
// {
|
|
28
|
+
// name: 'name',
|
|
29
|
+
// value: 'node-js',
|
|
30
|
+
// },
|
|
31
|
+
// {
|
|
32
|
+
// name: 'icon-style',
|
|
33
|
+
// value: 'brand',
|
|
34
|
+
// },
|
|
35
|
+
// ]
|
|
36
|
+
// const page = await newSpecPage({
|
|
37
|
+
// components: [Icon],
|
|
38
|
+
// html: `<br-icon ${prop[0].name}="${prop[0].value}" ${prop[1].name}="${prop[1].value}"></br-icon>`,
|
|
39
|
+
// })
|
|
40
|
+
// expect(page.root).toEqualHtml(`
|
|
41
|
+
// <br-icon icon-style="brand" name="node-js">
|
|
42
|
+
// <mock:shadow-root>
|
|
43
|
+
// <div class="br-icon">
|
|
44
|
+
// <svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="node-js" class="svg-inline--fa fa-node-js" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
|
|
45
|
+
// <path fill="currentColor" d="M224 508c-6.7 0-13.5-1.8-19.4-5.2l-61.7-36.5c-9.2-5.2-4.7-7-1.7-8 12.3-4.3 14.8-5.2 27.9-12.7 1.4-.8 3.2-.5 4.6.4l47.4 28.1c1.7 1 4.1 1 5.7 0l184.7-106.6c1.7-1 2.8-3 2.8-5V149.3c0-2.1-1.1-4-2.9-5.1L226.8 37.7c-1.7-1-4-1-5.7 0L36.6 144.3c-1.8 1-2.9 3-2.9 5.1v213.1c0 2 1.1 4 2.9 4.9l50.6 29.2c27.5 13.7 44.3-2.4 44.3-18.7V167.5c0-3 2.4-5.3 5.4-5.3h23.4c2.9 0 5.4 2.3 5.4 5.3V378c0 36.6-20 57.6-54.7 57.6-10.7 0-19.1 0-42.5-11.6l-48.4-27.9C8.1 389.2.7 376.3.7 362.4V149.3c0-13.8 7.4-26.8 19.4-33.7L204.6 9c11.7-6.6 27.2-6.6 38.8 0l184.7 106.7c12 6.9 19.4 19.8 19.4 33.7v213.1c0 13.8-7.4 26.7-19.4 33.7L243.4 502.8c-5.9 3.4-12.6 5.2-19.4 5.2zm149.1-210.1c0-39.9-27-50.5-83.7-58-57.4-7.6-63.2-11.5-63.2-24.9 0-11.1 4.9-25.9 47.4-25.9 37.9 0 51.9 8.2 57.7 33.8.5 2.4 2.7 4.2 5.2 4.2h24c1.5 0 2.9-.6 3.9-1.7s1.5-2.6 1.4-4.1c-3.7-44.1-33-64.6-92.2-64.6-52.7 0-84.1 22.2-84.1 59.5 0 40.4 31.3 51.6 81.8 56.6 60.5 5.9 65.2 14.8 65.2 26.7 0 20.6-16.6 29.4-55.5 29.4-48.9 0-59.6-12.3-63.2-36.6-.4-2.6-2.6-4.5-5.3-4.5h-23.9c-3 0-5.3 2.4-5.3 5.3 0 31.1 16.9 68.2 97.8 68.2 58.4-.1 92-23.2 92-63.4z"></path>
|
|
46
|
+
// </svg>
|
|
47
|
+
// </div>
|
|
48
|
+
// </mock:shadow-root>
|
|
49
|
+
// </br-icon>
|
|
50
|
+
// `)
|
|
51
|
+
// })
|
|
52
|
+
// it('should render the icon with regular style and icon name "envelope"', async () => {
|
|
53
|
+
// const prop = [
|
|
54
|
+
// {
|
|
55
|
+
// name: 'name',
|
|
56
|
+
// value: 'envelope',
|
|
57
|
+
// },
|
|
58
|
+
// {
|
|
59
|
+
// name: 'icon-style',
|
|
60
|
+
// value: 'regular',
|
|
61
|
+
// },
|
|
62
|
+
// ]
|
|
63
|
+
// const page = await newSpecPage({
|
|
64
|
+
// components: [Icon],
|
|
65
|
+
// html: `<br-icon ${prop[0].name}="${prop[0].value}" ${prop[1].name}="${prop[1].value}"></br-icon>`,
|
|
66
|
+
// })
|
|
67
|
+
// expect(page.root).toEqualHtml(`
|
|
68
|
+
// <br-icon icon-style="regular" name="envelope">
|
|
69
|
+
// <mock:shadow-root>
|
|
70
|
+
// <div class="br-icon">
|
|
71
|
+
// <svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="envelope" class="svg-inline--fa fa-envelope" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
72
|
+
// <path fill="currentColor" d="M64 112c-8.8 0-16 7.2-16 16v22.1L220.5 291.7c20.7 17 50.4 17 71.1 0L464 150.1V128c0-8.8-7.2-16-16-16H64zM48 212.2V384c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V212.2L322 328.8c-38.4 31.5-93.7 31.5-132 0L48 212.2zM0 128C0 92.7 28.7 64 64 64H448c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"></path>
|
|
73
|
+
// </svg>
|
|
74
|
+
// </div>
|
|
75
|
+
// </mock:shadow-root>
|
|
76
|
+
// </br-icon>
|
|
77
|
+
// `)
|
|
78
|
+
// })
|
|
79
|
+
// })
|
|
80
|
+
//# sourceMappingURL=icon.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.spec.js","sourceRoot":"","sources":["../../../../src/components/icon/tests/icon.spec.tsx"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,iCAAiC;AAEjC,8BAA8B;AAC9B,yFAAyF;AACzF,qBAAqB;AACrB,sBAAsB;AACtB,yBAAyB;AACzB,QAAQ;AACR,uCAAuC;AACvC,4BAA4B;AAC5B,kEAAkE;AAClE,SAAS;AAET,sCAAsC;AACtC,mDAAmD;AACnD,6BAA6B;AAC7B,kCAAkC;AAClC,mMAAmM;AACnM,2SAA2S;AAC3S,qBAAqB;AACrB,mBAAmB;AACnB,8BAA8B;AAC9B,mBAAmB;AACnB,SAAS;AACT,OAAO;AAEP,wFAAwF;AACxF,qBAAqB;AACrB,UAAU;AACV,wBAAwB;AACxB,4BAA4B;AAC5B,WAAW;AACX,UAAU;AACV,8BAA8B;AAC9B,0BAA0B;AAC1B,WAAW;AACX,QAAQ;AACR,uCAAuC;AACvC,4BAA4B;AAC5B,2GAA2G;AAC3G,SAAS;AAET,sCAAsC;AACtC,oDAAoD;AACpD,6BAA6B;AAC7B,kCAAkC;AAClC,qMAAqM;AACrM,mnCAAmnC;AACnnC,qBAAqB;AACrB,mBAAmB;AACnB,8BAA8B;AAC9B,mBAAmB;AACnB,SAAS;AACT,OAAO;AAEP,2FAA2F;AAC3F,qBAAqB;AACrB,UAAU;AACV,wBAAwB;AACxB,6BAA6B;AAC7B,WAAW;AACX,UAAU;AACV,8BAA8B;AAC9B,4BAA4B;AAC5B,WAAW;AACX,QAAQ;AACR,uCAAuC;AACvC,4BAA4B;AAC5B,2GAA2G;AAC3G,SAAS;AAET,sCAAsC;AACtC,uDAAuD;AACvD,6BAA6B;AAC7B,kCAAkC;AAClC,uMAAuM;AACvM,sXAAsX;AACtX,qBAAqB;AACrB,mBAAmB;AACnB,8BAA8B;AAC9B,mBAAmB;AACnB,SAAS;AACT,OAAO;AACP,KAAK","sourcesContent":["// import { newSpecPage } from '@stencil/core/testing'\n// import { Icon } from '../icon'\n\n// describe('br-icon', () => {\n// it('should render the icon with default style and icon name \"camera\"', async () => {\n// const prop = {\n// name: 'name',\n// value: 'camera',\n// }\n// const page = await newSpecPage({\n// components: [Icon],\n// html: `<br-icon ${prop.name}=\"${prop.value}\"></br-icon>`,\n// })\n\n// expect(page.root).toEqualHtml(`\n// <br-icon icon-style=\"solid\" name=\"camera\">\n// <mock:shadow-root>\n// <div class=\"br-icon\">\n// <svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fas\" data-icon=\"camera\" class=\"svg-inline--fa fa-camera\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n// <path fill=\"currentColor\" d=\"M149.1 64.8L138.7 96H64C28.7 96 0 124.7 0 160V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H373.3L362.9 64.8C356.4 45.2 338.1 32 317.4 32H194.6c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z\"></path>\n// </svg>\n// </div>\n// </mock:shadow-root>\n// </br-icon>\n// `)\n// })\n\n// it('should render the icon with brand style and icon name \"node-js\"', async () => {\n// const prop = [\n// {\n// name: 'name',\n// value: 'node-js',\n// },\n// {\n// name: 'icon-style',\n// value: 'brand',\n// },\n// ]\n// const page = await newSpecPage({\n// components: [Icon],\n// html: `<br-icon ${prop[0].name}=\"${prop[0].value}\" ${prop[1].name}=\"${prop[1].value}\"></br-icon>`,\n// })\n\n// expect(page.root).toEqualHtml(`\n// <br-icon icon-style=\"brand\" name=\"node-js\">\n// <mock:shadow-root>\n// <div class=\"br-icon\">\n// <svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fab\" data-icon=\"node-js\" class=\"svg-inline--fa fa-node-js\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\">\n// <path fill=\"currentColor\" d=\"M224 508c-6.7 0-13.5-1.8-19.4-5.2l-61.7-36.5c-9.2-5.2-4.7-7-1.7-8 12.3-4.3 14.8-5.2 27.9-12.7 1.4-.8 3.2-.5 4.6.4l47.4 28.1c1.7 1 4.1 1 5.7 0l184.7-106.6c1.7-1 2.8-3 2.8-5V149.3c0-2.1-1.1-4-2.9-5.1L226.8 37.7c-1.7-1-4-1-5.7 0L36.6 144.3c-1.8 1-2.9 3-2.9 5.1v213.1c0 2 1.1 4 2.9 4.9l50.6 29.2c27.5 13.7 44.3-2.4 44.3-18.7V167.5c0-3 2.4-5.3 5.4-5.3h23.4c2.9 0 5.4 2.3 5.4 5.3V378c0 36.6-20 57.6-54.7 57.6-10.7 0-19.1 0-42.5-11.6l-48.4-27.9C8.1 389.2.7 376.3.7 362.4V149.3c0-13.8 7.4-26.8 19.4-33.7L204.6 9c11.7-6.6 27.2-6.6 38.8 0l184.7 106.7c12 6.9 19.4 19.8 19.4 33.7v213.1c0 13.8-7.4 26.7-19.4 33.7L243.4 502.8c-5.9 3.4-12.6 5.2-19.4 5.2zm149.1-210.1c0-39.9-27-50.5-83.7-58-57.4-7.6-63.2-11.5-63.2-24.9 0-11.1 4.9-25.9 47.4-25.9 37.9 0 51.9 8.2 57.7 33.8.5 2.4 2.7 4.2 5.2 4.2h24c1.5 0 2.9-.6 3.9-1.7s1.5-2.6 1.4-4.1c-3.7-44.1-33-64.6-92.2-64.6-52.7 0-84.1 22.2-84.1 59.5 0 40.4 31.3 51.6 81.8 56.6 60.5 5.9 65.2 14.8 65.2 26.7 0 20.6-16.6 29.4-55.5 29.4-48.9 0-59.6-12.3-63.2-36.6-.4-2.6-2.6-4.5-5.3-4.5h-23.9c-3 0-5.3 2.4-5.3 5.3 0 31.1 16.9 68.2 97.8 68.2 58.4-.1 92-23.2 92-63.4z\"></path>\n// </svg>\n// </div>\n// </mock:shadow-root>\n// </br-icon>\n// `)\n// })\n\n// it('should render the icon with regular style and icon name \"envelope\"', async () => {\n// const prop = [\n// {\n// name: 'name',\n// value: 'envelope',\n// },\n// {\n// name: 'icon-style',\n// value: 'regular',\n// },\n// ]\n// const page = await newSpecPage({\n// components: [Icon],\n// html: `<br-icon ${prop[0].name}=\"${prop[0].value}\" ${prop[1].name}=\"${prop[1].value}\"></br-icon>`,\n// })\n\n// expect(page.root).toEqualHtml(`\n// <br-icon icon-style=\"regular\" name=\"envelope\">\n// <mock:shadow-root>\n// <div class=\"br-icon\">\n// <svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"envelope\" class=\"svg-inline--fa fa-envelope\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n// <path fill=\"currentColor\" d=\"M64 112c-8.8 0-16 7.2-16 16v22.1L220.5 291.7c20.7 17 50.4 17 71.1 0L464 150.1V128c0-8.8-7.2-16-16-16H64zM48 212.2V384c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V212.2L322 328.8c-38.4 31.5-93.7 31.5-132 0L48 212.2zM0 128C0 92.7 28.7 64 64 64H448c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z\"></path>\n// </svg>\n// </div>\n// </mock:shadow-root>\n// </br-icon>\n// `)\n// })\n// })\n"]}
|