@xplortech/apollo-core 0.0.2 → 0.0.4
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/build/style.css +229 -35
- package/dist/apollo-core/apollo-core.css +2 -2
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/p-1c170a38.system.js +1 -1
- package/dist/apollo-core/p-65c82873.system.entry.js +5 -0
- package/dist/apollo-core/p-9c2250b6.entry.js +5 -0
- package/dist/cjs/apollo-core.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/xpl-button_3.cjs.entry.js +2501 -4
- package/dist/collection/components/xpl-button/xpl-button.js +118 -12
- package/dist/collection/components/xpl-pagination/xpl-pagination.js +5 -10
- package/dist/custom-elements/index.js +2502 -5
- package/dist/esm/apollo-core.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/xpl-button_3.entry.js +2501 -4
- package/dist/esm-es5/apollo-core.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/xpl-button_3.entry.js +5 -1
- package/dist/types/.stencil/xpl-button/xpl-button.d.ts +7 -1
- package/dist/types/components.d.ts +13 -3
- package/loader/index.js +1 -1
- package/loader/package.json +1 -1
- package/package.json +7 -5
- package/dist/apollo-core/p-933b8694.entry.js +0 -1
- package/dist/apollo-core/p-c0ff6f68.system.entry.js +0 -1
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/loader/cdn.js +0 -3
- package/dist/loader/index.cjs.js +0 -3
- package/dist/loader/index.d.ts +0 -13
- package/dist/loader/index.es2017.js +0 -3
- package/dist/loader/index.js +0 -4
- package/dist/loader/package.json +0 -10
|
@@ -1,20 +1,38 @@
|
|
|
1
1
|
import { Component, Host, h, Prop } from "@stencil/core";
|
|
2
|
+
import "@fortawesome/fontawesome-free";
|
|
2
3
|
export class XplButton {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.disabled = undefined;
|
|
6
|
+
this.size = "default";
|
|
7
|
+
this.variant = "primary";
|
|
8
|
+
}
|
|
3
9
|
render() {
|
|
4
10
|
let className = "xpl-button";
|
|
5
|
-
if (this.
|
|
11
|
+
if (this.variant === "secondary")
|
|
6
12
|
className += " xpl-button--secondary";
|
|
7
|
-
if (this.
|
|
13
|
+
if (this.variant === "subtle")
|
|
8
14
|
className += " xpl-button--subtle";
|
|
15
|
+
if (this.variant === "error")
|
|
16
|
+
className += " xpl-button--error";
|
|
17
|
+
if (this.size === "sm")
|
|
18
|
+
className += " xpl-button--sm";
|
|
19
|
+
if (this.size === "xs")
|
|
20
|
+
className += " xpl-button--xs";
|
|
21
|
+
if (this.iconOnly)
|
|
22
|
+
className += " xpl-button--icon-only";
|
|
23
|
+
const icon = this.icon ? (h("i", { class: `fas fa-${this.icon} ${this.iconTrailing ? "trailing" : this.iconOnly ? "" : "leading"}` })) : null;
|
|
9
24
|
return (h(Host, null,
|
|
10
25
|
/**
|
|
11
26
|
* Conditionally render either an <a> or <button> element
|
|
12
27
|
* depending on if there's an `href` or not
|
|
13
28
|
*/
|
|
14
29
|
this.href ? (h("a", { class: className, href: this.href, role: "button" },
|
|
15
|
-
|
|
16
|
-
h("slot", null)
|
|
17
|
-
h("
|
|
30
|
+
!this.iconTrailing && icon,
|
|
31
|
+
h("slot", null),
|
|
32
|
+
this.iconTrailing && icon)) : (h("button", { class: className, disabled: this.disabled, type: this.type },
|
|
33
|
+
!this.iconTrailing && icon,
|
|
34
|
+
h("slot", null),
|
|
35
|
+
this.iconTrailing && icon))));
|
|
18
36
|
}
|
|
19
37
|
static get is() { return "xpl-button"; }
|
|
20
38
|
static get properties() { return {
|
|
@@ -33,26 +51,96 @@ export class XplButton {
|
|
|
33
51
|
"text": ""
|
|
34
52
|
},
|
|
35
53
|
"attribute": "disabled",
|
|
54
|
+
"reflect": false,
|
|
55
|
+
"defaultValue": "undefined"
|
|
56
|
+
},
|
|
57
|
+
"href": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"mutable": false,
|
|
60
|
+
"complexType": {
|
|
61
|
+
"original": "string",
|
|
62
|
+
"resolved": "string",
|
|
63
|
+
"references": {}
|
|
64
|
+
},
|
|
65
|
+
"required": false,
|
|
66
|
+
"optional": true,
|
|
67
|
+
"docs": {
|
|
68
|
+
"tags": [],
|
|
69
|
+
"text": ""
|
|
70
|
+
},
|
|
71
|
+
"attribute": "href",
|
|
36
72
|
"reflect": false
|
|
37
73
|
},
|
|
38
|
-
"
|
|
74
|
+
"icon": {
|
|
39
75
|
"type": "string",
|
|
40
76
|
"mutable": false,
|
|
41
77
|
"complexType": {
|
|
42
|
-
"original": "
|
|
43
|
-
"resolved": "
|
|
78
|
+
"original": "string",
|
|
79
|
+
"resolved": "string",
|
|
44
80
|
"references": {}
|
|
45
81
|
},
|
|
46
82
|
"required": false,
|
|
47
|
-
"optional":
|
|
83
|
+
"optional": true,
|
|
48
84
|
"docs": {
|
|
49
85
|
"tags": [],
|
|
50
86
|
"text": ""
|
|
51
87
|
},
|
|
52
|
-
"attribute": "
|
|
88
|
+
"attribute": "icon",
|
|
53
89
|
"reflect": false
|
|
54
90
|
},
|
|
55
|
-
"
|
|
91
|
+
"iconOnly": {
|
|
92
|
+
"type": "boolean",
|
|
93
|
+
"mutable": false,
|
|
94
|
+
"complexType": {
|
|
95
|
+
"original": "boolean",
|
|
96
|
+
"resolved": "boolean",
|
|
97
|
+
"references": {}
|
|
98
|
+
},
|
|
99
|
+
"required": false,
|
|
100
|
+
"optional": true,
|
|
101
|
+
"docs": {
|
|
102
|
+
"tags": [],
|
|
103
|
+
"text": ""
|
|
104
|
+
},
|
|
105
|
+
"attribute": "icon-only",
|
|
106
|
+
"reflect": false
|
|
107
|
+
},
|
|
108
|
+
"iconTrailing": {
|
|
109
|
+
"type": "boolean",
|
|
110
|
+
"mutable": false,
|
|
111
|
+
"complexType": {
|
|
112
|
+
"original": "boolean",
|
|
113
|
+
"resolved": "boolean",
|
|
114
|
+
"references": {}
|
|
115
|
+
},
|
|
116
|
+
"required": false,
|
|
117
|
+
"optional": true,
|
|
118
|
+
"docs": {
|
|
119
|
+
"tags": [],
|
|
120
|
+
"text": ""
|
|
121
|
+
},
|
|
122
|
+
"attribute": "icon-trailing",
|
|
123
|
+
"reflect": false
|
|
124
|
+
},
|
|
125
|
+
"size": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"mutable": false,
|
|
128
|
+
"complexType": {
|
|
129
|
+
"original": "\"default\" | \"sm\" | \"xs\"",
|
|
130
|
+
"resolved": "\"default\" | \"sm\" | \"xs\"",
|
|
131
|
+
"references": {}
|
|
132
|
+
},
|
|
133
|
+
"required": false,
|
|
134
|
+
"optional": false,
|
|
135
|
+
"docs": {
|
|
136
|
+
"tags": [],
|
|
137
|
+
"text": ""
|
|
138
|
+
},
|
|
139
|
+
"attribute": "size",
|
|
140
|
+
"reflect": false,
|
|
141
|
+
"defaultValue": "\"default\""
|
|
142
|
+
},
|
|
143
|
+
"type": {
|
|
56
144
|
"type": "string",
|
|
57
145
|
"mutable": false,
|
|
58
146
|
"complexType": {
|
|
@@ -66,8 +154,26 @@ export class XplButton {
|
|
|
66
154
|
"tags": [],
|
|
67
155
|
"text": ""
|
|
68
156
|
},
|
|
69
|
-
"attribute": "
|
|
157
|
+
"attribute": "type",
|
|
70
158
|
"reflect": false
|
|
159
|
+
},
|
|
160
|
+
"variant": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"mutable": false,
|
|
163
|
+
"complexType": {
|
|
164
|
+
"original": "\"primary\" | \"secondary\" | \"subtle\" | \"error\"",
|
|
165
|
+
"resolved": "\"error\" | \"primary\" | \"secondary\" | \"subtle\"",
|
|
166
|
+
"references": {}
|
|
167
|
+
},
|
|
168
|
+
"required": false,
|
|
169
|
+
"optional": false,
|
|
170
|
+
"docs": {
|
|
171
|
+
"tags": [],
|
|
172
|
+
"text": ""
|
|
173
|
+
},
|
|
174
|
+
"attribute": "variant",
|
|
175
|
+
"reflect": false,
|
|
176
|
+
"defaultValue": "\"primary\""
|
|
71
177
|
}
|
|
72
178
|
}; }
|
|
73
179
|
}
|
|
@@ -58,19 +58,14 @@ export class XplPagination {
|
|
|
58
58
|
h("div", { class: "xpl-pagination" },
|
|
59
59
|
h("div", null,
|
|
60
60
|
h("p", null,
|
|
61
|
-
"Showing",
|
|
62
|
-
" ",
|
|
61
|
+
"Showing ",
|
|
63
62
|
h("span", null, showingFirst),
|
|
64
|
-
" ",
|
|
65
|
-
"to",
|
|
66
|
-
" ",
|
|
63
|
+
" to ",
|
|
67
64
|
h("span", null, showingLast),
|
|
68
65
|
" ",
|
|
69
|
-
"of",
|
|
70
|
-
" ",
|
|
66
|
+
"of ",
|
|
71
67
|
h("span", null, this.total),
|
|
72
|
-
" ",
|
|
73
|
-
"results")),
|
|
68
|
+
" results")),
|
|
74
69
|
h("div", null,
|
|
75
70
|
h("nav", { "aria-label": "Pagination" },
|
|
76
71
|
h("button", { onClick: this.goPrev, class: "xpl-pagination-prev" },
|
|
@@ -183,7 +178,7 @@ export class XplPagination {
|
|
|
183
178
|
"return": "Promise<void>"
|
|
184
179
|
},
|
|
185
180
|
"docs": {
|
|
186
|
-
"text": "Calling `goto` with a page number (which should probably be
|
|
181
|
+
"text": "Calling `goto` with a page number (which should probably be\ntaken from the `page` event) updates the pagination's state\nand re-renders it, showing the appropriate buttons given the current page.",
|
|
187
182
|
"tags": [{
|
|
188
183
|
"name": "param",
|
|
189
184
|
"text": "n"
|