@elenajs/components 0.8.0 → 0.8.1
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/avatar.d.ts +2 -0
- package/dist/button.d.ts +2 -0
- package/dist/custom-elements.d.ts +24 -16
- package/dist/custom-elements.json +141 -71
- package/dist/input.d.ts +2 -0
- package/dist/stack.d.ts +2 -0
- package/package.json +4 -4
package/dist/avatar.d.ts
CHANGED
package/dist/button.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ declare class Button extends HTMLElement {
|
|
|
13
13
|
value?: string;
|
|
14
14
|
/** The type of the button. */
|
|
15
15
|
type?: "submit" | "reset" | "button";
|
|
16
|
+
/** The text content of the element, captured from light DOM before the first render. */
|
|
17
|
+
text?: string;
|
|
16
18
|
/** Programmatically fire click on the component. */
|
|
17
19
|
onclick?: (e: CustomEvent<never>) => void;
|
|
18
20
|
/** Programmatically move focus to the component. */
|
|
@@ -61,6 +61,8 @@ type BaseProps = {
|
|
|
61
61
|
type BaseEvents = {};
|
|
62
62
|
|
|
63
63
|
export type AvatarProps = {
|
|
64
|
+
/** The text content of the element, captured from light DOM before the first render. */
|
|
65
|
+
text?: string;
|
|
64
66
|
/** */
|
|
65
67
|
state?: string;
|
|
66
68
|
};
|
|
@@ -78,6 +80,8 @@ export type ButtonProps = {
|
|
|
78
80
|
value?: string;
|
|
79
81
|
/** The type of the button. */
|
|
80
82
|
type?: "submit" | "reset" | "button";
|
|
83
|
+
/** The text content of the element, captured from light DOM before the first render. */
|
|
84
|
+
text?: string;
|
|
81
85
|
|
|
82
86
|
/** Programmatically fire click on the component. */
|
|
83
87
|
onclick?: (e: CustomEvent<never>) => void;
|
|
@@ -87,11 +91,6 @@ export type ButtonProps = {
|
|
|
87
91
|
onblur?: (e: CustomEvent<never>) => void;
|
|
88
92
|
};
|
|
89
93
|
|
|
90
|
-
export type StackProps = {
|
|
91
|
-
/** The direction of the stack. */
|
|
92
|
-
direction?: "column" | "row";
|
|
93
|
-
};
|
|
94
|
-
|
|
95
94
|
export type InputProps = {
|
|
96
95
|
/** The size of the input. */
|
|
97
96
|
size?: "sm" | "md" | "lg";
|
|
@@ -109,6 +108,8 @@ export type InputProps = {
|
|
|
109
108
|
type?: "text" | "email" | "password" | "tel" | "url" | "search" | "number" | "unit" | "button";
|
|
110
109
|
/** The error to display */
|
|
111
110
|
error?: string;
|
|
111
|
+
/** The text content of the element, captured from light DOM before the first render. */
|
|
112
|
+
text?: string;
|
|
112
113
|
|
|
113
114
|
/** Programmatically fire click on the component. */
|
|
114
115
|
onclick?: (e: CustomEvent<never>) => void;
|
|
@@ -118,6 +119,13 @@ export type InputProps = {
|
|
|
118
119
|
onblur?: (e: CustomEvent<never>) => void;
|
|
119
120
|
};
|
|
120
121
|
|
|
122
|
+
export type StackProps = {
|
|
123
|
+
/** The direction of the stack. */
|
|
124
|
+
direction?: "column" | "row";
|
|
125
|
+
/** The text content of the element, captured from light DOM before the first render. */
|
|
126
|
+
text?: string;
|
|
127
|
+
};
|
|
128
|
+
|
|
121
129
|
export type CustomElements = {
|
|
122
130
|
/**
|
|
123
131
|
*
|
|
@@ -144,17 +152,6 @@ export type CustomElements = {
|
|
|
144
152
|
*/
|
|
145
153
|
"elena-button": Partial<ButtonProps & BaseProps & BaseEvents>;
|
|
146
154
|
|
|
147
|
-
/**
|
|
148
|
-
* Stack component manages layout of immediate children
|
|
149
|
-
* with optional spacing between each child.
|
|
150
|
-
* ---
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
* ### **Slots:**
|
|
154
|
-
* - _default_ - The stacked content
|
|
155
|
-
*/
|
|
156
|
-
"elena-stack": Partial<StackProps & BaseProps & BaseEvents>;
|
|
157
|
-
|
|
158
155
|
/**
|
|
159
156
|
* The description of the component goes here.
|
|
160
157
|
* ---
|
|
@@ -172,4 +169,15 @@ export type CustomElements = {
|
|
|
172
169
|
* - **--elena-input-radius** - Controls the radius of the component. _(default: undefined)_
|
|
173
170
|
*/
|
|
174
171
|
"elena-input": Partial<InputProps & BaseProps & BaseEvents>;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Stack component manages layout of immediate children
|
|
175
|
+
* with optional spacing between each child.
|
|
176
|
+
* ---
|
|
177
|
+
*
|
|
178
|
+
*
|
|
179
|
+
* ### **Slots:**
|
|
180
|
+
* - _default_ - The stacked content
|
|
181
|
+
*/
|
|
182
|
+
"elena-stack": Partial<StackProps & BaseProps & BaseEvents>;
|
|
175
183
|
};
|
|
@@ -61,6 +61,15 @@
|
|
|
61
61
|
"text": "string"
|
|
62
62
|
},
|
|
63
63
|
"default": "\"initial\""
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"kind": "field",
|
|
67
|
+
"name": "text",
|
|
68
|
+
"type": {
|
|
69
|
+
"text": "string"
|
|
70
|
+
},
|
|
71
|
+
"description": "The text content of the element, captured from light DOM before the first render.",
|
|
72
|
+
"attribute": "text"
|
|
64
73
|
}
|
|
65
74
|
],
|
|
66
75
|
"mixins": [
|
|
@@ -73,6 +82,16 @@
|
|
|
73
82
|
"name": "HTMLElement"
|
|
74
83
|
},
|
|
75
84
|
"tagName": "elena-avatar",
|
|
85
|
+
"attributes": [
|
|
86
|
+
{
|
|
87
|
+
"name": "text",
|
|
88
|
+
"fieldName": "text",
|
|
89
|
+
"type": {
|
|
90
|
+
"text": "string"
|
|
91
|
+
},
|
|
92
|
+
"description": "The text content of the element, captured from light DOM before the first render."
|
|
93
|
+
}
|
|
94
|
+
],
|
|
76
95
|
"customElement": true
|
|
77
96
|
}
|
|
78
97
|
],
|
|
@@ -181,6 +200,15 @@
|
|
|
181
200
|
"description": "The type of the button.",
|
|
182
201
|
"default": "\"button\"",
|
|
183
202
|
"attribute": "type"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"kind": "field",
|
|
206
|
+
"name": "text",
|
|
207
|
+
"type": {
|
|
208
|
+
"text": "string"
|
|
209
|
+
},
|
|
210
|
+
"description": "The text content of the element, captured from light DOM before the first render.",
|
|
211
|
+
"attribute": "text"
|
|
184
212
|
}
|
|
185
213
|
],
|
|
186
214
|
"events": [
|
|
@@ -251,6 +279,14 @@
|
|
|
251
279
|
"description": "The type of the button.",
|
|
252
280
|
"default": "\"button\"",
|
|
253
281
|
"fieldName": "type"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"name": "text",
|
|
285
|
+
"fieldName": "text",
|
|
286
|
+
"type": {
|
|
287
|
+
"text": "string"
|
|
288
|
+
},
|
|
289
|
+
"description": "The text content of the element, captured from light DOM before the first render."
|
|
254
290
|
}
|
|
255
291
|
],
|
|
256
292
|
"mixins": [
|
|
@@ -287,77 +323,6 @@
|
|
|
287
323
|
}
|
|
288
324
|
]
|
|
289
325
|
},
|
|
290
|
-
{
|
|
291
|
-
"kind": "javascript-module",
|
|
292
|
-
"path": "src/stack/stack.js",
|
|
293
|
-
"declarations": [
|
|
294
|
-
{
|
|
295
|
-
"kind": "class",
|
|
296
|
-
"description": "Stack component manages layout of immediate children\nwith optional spacing between each child.",
|
|
297
|
-
"name": "Stack",
|
|
298
|
-
"slots": [
|
|
299
|
-
{
|
|
300
|
-
"description": "The stacked content",
|
|
301
|
-
"name": ""
|
|
302
|
-
}
|
|
303
|
-
],
|
|
304
|
-
"members": [
|
|
305
|
-
{
|
|
306
|
-
"kind": "field",
|
|
307
|
-
"name": "direction",
|
|
308
|
-
"type": {
|
|
309
|
-
"text": "\"column\" | \"row\""
|
|
310
|
-
},
|
|
311
|
-
"description": "The direction of the stack.",
|
|
312
|
-
"default": "\"column\"",
|
|
313
|
-
"attribute": "direction"
|
|
314
|
-
}
|
|
315
|
-
],
|
|
316
|
-
"attributes": [
|
|
317
|
-
{
|
|
318
|
-
"name": "direction",
|
|
319
|
-
"type": {
|
|
320
|
-
"text": "\"column\" | \"row\""
|
|
321
|
-
},
|
|
322
|
-
"description": "The direction of the stack.",
|
|
323
|
-
"default": "\"column\"",
|
|
324
|
-
"fieldName": "direction"
|
|
325
|
-
}
|
|
326
|
-
],
|
|
327
|
-
"mixins": [
|
|
328
|
-
{
|
|
329
|
-
"name": "Elena",
|
|
330
|
-
"package": "@elenajs/core"
|
|
331
|
-
}
|
|
332
|
-
],
|
|
333
|
-
"superclass": {
|
|
334
|
-
"name": "HTMLElement"
|
|
335
|
-
},
|
|
336
|
-
"tagName": "elena-stack",
|
|
337
|
-
"status": "alpha",
|
|
338
|
-
"displayName": "Stack",
|
|
339
|
-
"customElement": true
|
|
340
|
-
}
|
|
341
|
-
],
|
|
342
|
-
"exports": [
|
|
343
|
-
{
|
|
344
|
-
"kind": "js",
|
|
345
|
-
"name": "default",
|
|
346
|
-
"declaration": {
|
|
347
|
-
"name": "Stack",
|
|
348
|
-
"module": "src/stack/stack.js"
|
|
349
|
-
}
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
"kind": "custom-element-definition",
|
|
353
|
-
"name": "elena-stack",
|
|
354
|
-
"declaration": {
|
|
355
|
-
"name": "Stack",
|
|
356
|
-
"module": "src/stack/stack.js"
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
]
|
|
360
|
-
},
|
|
361
326
|
{
|
|
362
327
|
"kind": "javascript-module",
|
|
363
328
|
"path": "src/input/input.js",
|
|
@@ -464,6 +429,15 @@
|
|
|
464
429
|
"description": "The error to display",
|
|
465
430
|
"default": "\"\"",
|
|
466
431
|
"attribute": "error"
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"kind": "field",
|
|
435
|
+
"name": "text",
|
|
436
|
+
"type": {
|
|
437
|
+
"text": "string"
|
|
438
|
+
},
|
|
439
|
+
"description": "The text content of the element, captured from light DOM before the first render.",
|
|
440
|
+
"attribute": "text"
|
|
467
441
|
}
|
|
468
442
|
],
|
|
469
443
|
"events": [
|
|
@@ -552,6 +526,14 @@
|
|
|
552
526
|
"description": "The error to display",
|
|
553
527
|
"default": "\"\"",
|
|
554
528
|
"fieldName": "error"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"name": "text",
|
|
532
|
+
"fieldName": "text",
|
|
533
|
+
"type": {
|
|
534
|
+
"text": "string"
|
|
535
|
+
},
|
|
536
|
+
"description": "The text content of the element, captured from light DOM before the first render."
|
|
555
537
|
}
|
|
556
538
|
],
|
|
557
539
|
"mixins": [
|
|
@@ -587,6 +569,94 @@
|
|
|
587
569
|
}
|
|
588
570
|
}
|
|
589
571
|
]
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"kind": "javascript-module",
|
|
575
|
+
"path": "src/stack/stack.js",
|
|
576
|
+
"declarations": [
|
|
577
|
+
{
|
|
578
|
+
"kind": "class",
|
|
579
|
+
"description": "Stack component manages layout of immediate children\nwith optional spacing between each child.",
|
|
580
|
+
"name": "Stack",
|
|
581
|
+
"slots": [
|
|
582
|
+
{
|
|
583
|
+
"description": "The stacked content",
|
|
584
|
+
"name": ""
|
|
585
|
+
}
|
|
586
|
+
],
|
|
587
|
+
"members": [
|
|
588
|
+
{
|
|
589
|
+
"kind": "field",
|
|
590
|
+
"name": "direction",
|
|
591
|
+
"type": {
|
|
592
|
+
"text": "\"column\" | \"row\""
|
|
593
|
+
},
|
|
594
|
+
"description": "The direction of the stack.",
|
|
595
|
+
"default": "\"column\"",
|
|
596
|
+
"attribute": "direction"
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
"kind": "field",
|
|
600
|
+
"name": "text",
|
|
601
|
+
"type": {
|
|
602
|
+
"text": "string"
|
|
603
|
+
},
|
|
604
|
+
"description": "The text content of the element, captured from light DOM before the first render.",
|
|
605
|
+
"attribute": "text"
|
|
606
|
+
}
|
|
607
|
+
],
|
|
608
|
+
"attributes": [
|
|
609
|
+
{
|
|
610
|
+
"name": "direction",
|
|
611
|
+
"type": {
|
|
612
|
+
"text": "\"column\" | \"row\""
|
|
613
|
+
},
|
|
614
|
+
"description": "The direction of the stack.",
|
|
615
|
+
"default": "\"column\"",
|
|
616
|
+
"fieldName": "direction"
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"name": "text",
|
|
620
|
+
"fieldName": "text",
|
|
621
|
+
"type": {
|
|
622
|
+
"text": "string"
|
|
623
|
+
},
|
|
624
|
+
"description": "The text content of the element, captured from light DOM before the first render."
|
|
625
|
+
}
|
|
626
|
+
],
|
|
627
|
+
"mixins": [
|
|
628
|
+
{
|
|
629
|
+
"name": "Elena",
|
|
630
|
+
"package": "@elenajs/core"
|
|
631
|
+
}
|
|
632
|
+
],
|
|
633
|
+
"superclass": {
|
|
634
|
+
"name": "HTMLElement"
|
|
635
|
+
},
|
|
636
|
+
"tagName": "elena-stack",
|
|
637
|
+
"status": "alpha",
|
|
638
|
+
"displayName": "Stack",
|
|
639
|
+
"customElement": true
|
|
640
|
+
}
|
|
641
|
+
],
|
|
642
|
+
"exports": [
|
|
643
|
+
{
|
|
644
|
+
"kind": "js",
|
|
645
|
+
"name": "default",
|
|
646
|
+
"declaration": {
|
|
647
|
+
"name": "Stack",
|
|
648
|
+
"module": "src/stack/stack.js"
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"kind": "custom-element-definition",
|
|
653
|
+
"name": "elena-stack",
|
|
654
|
+
"declaration": {
|
|
655
|
+
"name": "Stack",
|
|
656
|
+
"module": "src/stack/stack.js"
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
]
|
|
590
660
|
}
|
|
591
661
|
]
|
|
592
662
|
}
|
package/dist/input.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ declare class Input extends HTMLElement {
|
|
|
17
17
|
type?: "text" | "email" | "password" | "tel" | "url" | "search" | "number" | "unit" | "button";
|
|
18
18
|
/** The error to display */
|
|
19
19
|
error?: string;
|
|
20
|
+
/** The text content of the element, captured from light DOM before the first render. */
|
|
21
|
+
text?: string;
|
|
20
22
|
/** Programmatically fire click on the component. */
|
|
21
23
|
onclick?: (e: CustomEvent<never>) => void;
|
|
22
24
|
/** Programmatically move focus to the component. */
|
package/dist/stack.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export type { StackProps } from './custom-elements.js';
|
|
|
3
3
|
declare class Stack extends HTMLElement {
|
|
4
4
|
/** The direction of the stack. */
|
|
5
5
|
direction?: "column" | "row";
|
|
6
|
+
/** The text content of the element, captured from light DOM before the first render. */
|
|
7
|
+
text?: string;
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
export default Stack;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elenajs/components",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Elena component library demonstrating how to build progressive web components.",
|
|
5
5
|
"author": "Elena <hi@elenajs.com>",
|
|
6
6
|
"homepage": "https://elenajs.com/",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"clean": "rm -rf dist/"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@elenajs/core": "^0.8.
|
|
36
|
+
"@elenajs/core": "^0.8.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@elenajs/bundler": "^0.0
|
|
39
|
+
"@elenajs/bundler": "^0.1.0",
|
|
40
40
|
"@web/dev-server": "0.4.6"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "056c6a4cf9c5c95b2fc99d99fb4c5d5fb49d9af2"
|
|
43
43
|
}
|