@xplortech/apollo-core 0.4.1 → 0.5.0
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/CHANGELOG.md +7 -0
- package/build/style.css +291 -104
- package/dist/apollo-core/apollo-core.css +5509 -7
- package/dist/apollo-core/apollo-core.esm.js +125 -1
- package/dist/apollo-core/app-globals-0f993ce5.js +3 -0
- package/dist/apollo-core/css-shim-bbdf0cc6.js +4 -0
- package/dist/apollo-core/dom-1f98a75f.js +73 -0
- package/dist/apollo-core/index-3c9f25ef.js +2938 -0
- package/dist/apollo-core/index-3eb5568f.js +2938 -0
- package/dist/apollo-core/index-912d1a21.js +584 -0
- package/dist/apollo-core/index.esm.js +1 -0
- package/dist/{cjs/regular-872f5226.js → apollo-core/regular-133c23b5.js} +12 -3
- package/dist/apollo-core/shadow-css-67b66845.js +389 -0
- package/dist/apollo-core/xpl-application-shell.entry.js +52 -0
- package/dist/apollo-core/xpl-avatar.entry.js +19 -0
- package/dist/apollo-core/xpl-backdrop.entry.js +21 -0
- package/dist/apollo-core/xpl-badge.entry.js +17 -0
- package/dist/{collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js → apollo-core/xpl-breadcrumb-item.entry.js} +9 -12
- package/dist/apollo-core/xpl-breadcrumbs.entry.js +14 -0
- package/dist/{esm → apollo-core}/xpl-button-row.entry.js +1 -1
- package/dist/apollo-core/xpl-button.entry.js +34 -0
- package/dist/apollo-core/xpl-checkbox.entry.js +25 -0
- package/dist/{esm → apollo-core}/xpl-choicelist.entry.js +1 -1
- package/dist/apollo-core/xpl-content-area.entry.js +16 -0
- package/dist/{esm → apollo-core}/xpl-divider.entry.js +1 -1
- package/dist/{esm → apollo-core}/xpl-grid-item.entry.js +1 -1
- package/dist/{esm → apollo-core}/xpl-grid.entry.js +1 -1
- package/dist/{esm → apollo-core}/xpl-input.entry.js +20 -3
- package/dist/{esm → apollo-core}/xpl-list.entry.js +2 -2
- package/dist/apollo-core/xpl-main-nav.entry.js +26 -0
- package/dist/apollo-core/xpl-nav-item.entry.js +12 -0
- package/dist/{esm → apollo-core}/xpl-pagination.entry.js +1 -1
- package/dist/apollo-core/xpl-radio.entry.js +25 -0
- package/dist/apollo-core/xpl-secondary-nav.entry.js +12 -0
- package/dist/{esm → apollo-core}/xpl-select.entry.js +43 -2
- package/dist/apollo-core/xpl-table.entry.js +85 -0
- package/dist/{esm → apollo-core}/xpl-tag.entry.js +1 -1
- package/dist/{esm → apollo-core}/xpl-toggle.entry.js +2 -2
- package/dist/apollo-core/xpl-utility-bar.entry.js +25 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/application-shell.stories.d.ts +62 -0
- package/dist/types/components/xpl-application-shell/test/xpl-application-shell.e2e.d.ts +1 -0
- package/dist/types/components/xpl-application-shell/xpl-application-shell.d.ts +24 -0
- package/dist/types/components/xpl-avatar/test/xpl-avatar.e2e.d.ts +1 -0
- package/dist/types/components/xpl-avatar/test/xpl-avatar.spec.d.ts +1 -0
- package/dist/types/components/xpl-backdrop/test/xpl-backdrop.e2e.d.ts +1 -0
- package/dist/types/components/xpl-backdrop/xpl-backdrop.d.ts +5 -0
- package/dist/types/components/xpl-badge/test/xpl-badge.e2e.d.ts +1 -0
- package/dist/types/components/xpl-badge/test/xpl-badge.spec.d.ts +1 -0
- package/dist/types/components/xpl-breadcrumbs/xpl-breadcrumb-item/test/xpl-breadcrumb-item.e2e.d.ts +1 -0
- package/dist/types/components/xpl-breadcrumbs/xpl-breadcrumbs/test/xpl-breadcrumbs.e2e.d.ts +1 -0
- package/dist/types/components/xpl-button/test/xpl-button.e2e.d.ts +1 -0
- package/dist/types/components/xpl-button/test/xpl-button.spec.d.ts +1 -0
- package/dist/types/components/xpl-button-row/test/xpl-button-row.e2e.d.ts +1 -0
- package/dist/types/components/xpl-button-row/test/xpl-button-row.spec.d.ts +1 -0
- package/dist/types/components/xpl-checkbox/test/xpl-checkbox.e2e.d.ts +1 -0
- package/dist/types/components/xpl-checkbox/test/xpl-checkbox.spec.d.ts +1 -0
- package/dist/types/components/xpl-choicelist/test/xpl-choicelist.e2e.d.ts +1 -0
- package/dist/types/components/xpl-choicelist/test/xpl-choicelist.spec.d.ts +1 -0
- package/dist/types/components/xpl-content-area/test/xpl-content-area.e2e.d.ts +1 -0
- package/dist/types/components/xpl-divider/test/xpl-divider.e2e.d.ts +1 -0
- package/dist/types/components/xpl-divider/test/xpl-divider.spec.d.ts +1 -0
- package/dist/types/components/xpl-grid/test/xpl-grid.e2e.d.ts +1 -0
- package/dist/types/components/xpl-grid/test/xpl-grid.spec.d.ts +1 -0
- package/dist/types/components/xpl-grid-item/test/xpl-grid-item.e2e.d.ts +1 -0
- package/dist/types/components/xpl-grid-item/test/xpl-grid-item.spec.d.ts +1 -0
- package/dist/types/components/xpl-input/test/xpl-input.e2e.d.ts +1 -0
- package/dist/types/components/xpl-input/test/xpl-input.spec.d.ts +1 -0
- package/dist/types/components/xpl-list/test/xpl-list.e2e.d.ts +1 -0
- package/dist/types/components/xpl-list/test/xpl-list.spec.d.ts +1 -0
- package/dist/types/components/xpl-main-nav/test/xpl-main-nav.e2e.d.ts +1 -0
- package/dist/types/components/xpl-main-nav/xpl-main-nav.d.ts +9 -0
- package/dist/types/components/xpl-nav-item/test/xpl-nav-item.e2e.d.ts +1 -0
- package/dist/types/components/xpl-pagination/test/xpl-pagination.e2e.d.ts +1 -0
- package/dist/types/components/xpl-pagination/test/xpl-pagination.spec.d.ts +1 -0
- package/dist/types/components/xpl-radio/test/xpl-radio.e2e.d.ts +1 -0
- package/dist/types/components/xpl-radio/test/xpl-radio.spec.d.ts +1 -0
- package/dist/types/components/xpl-secondary-nav/test/secondary-nav.e2e.d.ts +1 -0
- package/dist/types/components/xpl-select/test/xpl-select.e2e.d.ts +1 -0
- package/dist/types/components/xpl-select/test/xpl-select.spec.d.ts +1 -0
- package/dist/types/components/xpl-table/test/xpl-table.e2e.d.ts +1 -0
- package/dist/types/components/xpl-table/test/xpl-table.spec.d.ts +1 -0
- package/dist/types/components/xpl-tag/test/xpl-tag.e2e.d.ts +1 -0
- package/dist/types/components/xpl-tag/test/xpl-tag.spec.d.ts +1 -0
- package/dist/types/components/xpl-toggle/test/xpl-toggle.e2e.d.ts +1 -0
- package/dist/types/components/xpl-toggle/test/xpl-toggle.spec.d.ts +1 -0
- package/dist/types/components/xpl-utility-bar/test/xpl-utility-bar.e2e.d.ts +1 -0
- package/dist/types/components/xpl-utility-bar/xpl-utility-bar.d.ts +12 -0
- package/dist/types/components.d.ts +61 -0
- package/package.json +1 -1
- package/dist/apollo-core/p-0027c582.entry.js +0 -1
- package/dist/apollo-core/p-2c551f4d.entry.js +0 -1
- package/dist/apollo-core/p-2f90296c.js +0 -10
- package/dist/apollo-core/p-6081e432.entry.js +0 -1
- package/dist/apollo-core/p-612984e5.entry.js +0 -1
- package/dist/apollo-core/p-63ea199d.entry.js +0 -1
- package/dist/apollo-core/p-650f6416.entry.js +0 -1
- package/dist/apollo-core/p-6ad97405.entry.js +0 -1
- package/dist/apollo-core/p-9b9511e4.entry.js +0 -1
- package/dist/apollo-core/p-ad90fe4d.js +0 -1
- package/dist/apollo-core/p-c6fec744.entry.js +0 -1
- package/dist/apollo-core/p-ea8e0991.js +0 -1
- package/dist/apollo-core/p-ed04cedd.entry.js +0 -1
- package/dist/apollo-core/p-eec5a0f1.entry.js +0 -1
- package/dist/apollo-core/p-f4f646d9.entry.js +0 -1
- package/dist/cjs/apollo-core.cjs.js +0 -19
- package/dist/cjs/index-9662f096.js +0 -1541
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/cjs/v4-14140ff3.js +0 -77
- package/dist/cjs/xpl-avatar_14.cjs.entry.js +0 -293
- package/dist/cjs/xpl-button-row.cjs.entry.js +0 -24
- package/dist/cjs/xpl-choicelist.cjs.entry.js +0 -36
- package/dist/cjs/xpl-divider.cjs.entry.js +0 -18
- package/dist/cjs/xpl-grid-item.cjs.entry.js +0 -25
- package/dist/cjs/xpl-grid.cjs.entry.js +0 -35
- package/dist/cjs/xpl-input.cjs.entry.js +0 -2527
- package/dist/cjs/xpl-list.cjs.entry.js +0 -63
- package/dist/cjs/xpl-pagination.cjs.entry.js +0 -76
- package/dist/cjs/xpl-select.cjs.entry.js +0 -623
- package/dist/cjs/xpl-tag.cjs.entry.js +0 -21
- package/dist/cjs/xpl-toggle.cjs.entry.js +0 -34
- package/dist/collection/collection-manifest.json +0 -36
- package/dist/collection/components/xpl-avatar/xpl-avatar.js +0 -158
- package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +0 -7
- package/dist/collection/components/xpl-badge/xpl-badge.js +0 -50
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +0 -15
- package/dist/collection/components/xpl-button/xpl-button.js +0 -214
- package/dist/collection/components/xpl-button-row/xpl-button-row.js +0 -119
- package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +0 -185
- package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +0 -143
- package/dist/collection/components/xpl-content-area/xpl-content-area.js +0 -39
- package/dist/collection/components/xpl-divider/xpl-divider.js +0 -30
- package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +0 -32
- package/dist/collection/components/xpl-grid/xpl-grid.js +0 -26
- package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +0 -93
- package/dist/collection/components/xpl-input/xpl-input.js +0 -471
- package/dist/collection/components/xpl-list/xpl-list.js +0 -93
- package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +0 -43
- package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +0 -10
- package/dist/collection/components/xpl-pagination/xpl-pagination.js +0 -189
- package/dist/collection/components/xpl-radio/xpl-radio.js +0 -168
- package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +0 -9
- package/dist/collection/components/xpl-select/xpl-select.js +0 -311
- package/dist/collection/components/xpl-table/xpl-table.js +0 -194
- package/dist/collection/components/xpl-tag/xpl-tag.js +0 -30
- package/dist/collection/components/xpl-toggle/xpl-toggle.js +0 -157
- package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +0 -10
- package/dist/custom-elements/index.js +0 -19877
- package/dist/esm/apollo-core.js +0 -17
- package/dist/esm/index-619763f9.js +0 -1512
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -17
- 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/esm/regular-86225e9d.js +0 -16041
- package/dist/esm/v4-929670b7.js +0 -75
- package/dist/esm/xpl-avatar_14.entry.js +0 -276
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/stories/avatar.stories.js +0 -173
- package/dist/stories/backdrop.stories.js +0 -18
- package/dist/stories/badge.stories.js +0 -48
- package/dist/stories/breadcrumbs.stories.js +0 -115
- package/dist/stories/button-row.stories.js +0 -64
- package/dist/stories/button.stories.js +0 -98
- package/dist/stories/checkbox.stories.js +0 -76
- package/dist/stories/choicelist.stories.js +0 -112
- package/dist/stories/content-area.stories.js +0 -53
- package/dist/stories/divider.stories.js +0 -34
- package/dist/stories/grid.stories.js +0 -100
- package/dist/stories/input.stories.js +0 -252
- package/dist/stories/list.stories.js +0 -134
- package/dist/stories/main-nav.stories.js +0 -308
- package/dist/stories/pagination.stories.js +0 -84
- package/dist/stories/radio.stories.js +0 -66
- package/dist/stories/secondary-nav.stories.js +0 -76
- package/dist/stories/select.stories.js +0 -111
- package/dist/stories/table.stories.js +0 -107
- package/dist/stories/tabs.stories.js +0 -24
- package/dist/stories/toggle.stories.js +0 -80
- package/dist/stories/utility-bar.stories.js +0 -94
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { Component, Host, Prop, State, Event, h, } from "@stencil/core";
|
|
2
|
-
export class XplTable {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.areAllSelected = false;
|
|
5
|
-
this.hasScrolled = false;
|
|
6
|
-
this.selectAll = (e) => {
|
|
7
|
-
const { target } = e;
|
|
8
|
-
if (!(target instanceof HTMLInputElement))
|
|
9
|
-
return;
|
|
10
|
-
const { checked } = target;
|
|
11
|
-
this.areAllSelected = checked;
|
|
12
|
-
this.selected = this.selected.map(() => checked);
|
|
13
|
-
this.onChange();
|
|
14
|
-
};
|
|
15
|
-
this.selectOne = (e, i) => {
|
|
16
|
-
const { target } = e;
|
|
17
|
-
if (!(target instanceof HTMLInputElement))
|
|
18
|
-
return;
|
|
19
|
-
const { checked } = target;
|
|
20
|
-
this.areAllSelected = false;
|
|
21
|
-
this.selected = this.selected.map((v, _i) => (_i === i ? checked : v));
|
|
22
|
-
this.onChange();
|
|
23
|
-
};
|
|
24
|
-
this.onChange = () => {
|
|
25
|
-
this.tableSelect.emit({
|
|
26
|
-
selected: this.selected,
|
|
27
|
-
areAllSelected: this.areAllSelected,
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
this.onScroll = () => {
|
|
31
|
-
this.hasScrolled = this.container.scrollLeft > 0;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* TODO: Need to figure out how this interplays with data
|
|
35
|
-
* received from an API/server
|
|
36
|
-
*/
|
|
37
|
-
this.sortBy = (col, ascending = true) => {
|
|
38
|
-
this.rowData.sort((a, b) => {
|
|
39
|
-
const A = a[col];
|
|
40
|
-
const B = b[col];
|
|
41
|
-
if (typeof A === "number" && typeof B === "number") {
|
|
42
|
-
const f = ascending ? 1 : -1;
|
|
43
|
-
return A > B ? f : -f;
|
|
44
|
-
}
|
|
45
|
-
return -1;
|
|
46
|
-
});
|
|
47
|
-
this.rowData = Array.from(this.rowData);
|
|
48
|
-
this.render();
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
componentWillLoad() {
|
|
52
|
-
this.areAllSelected = false;
|
|
53
|
-
this.rowData = this.data !== undefined ? Array.from(this.data) : [];
|
|
54
|
-
this.selected = new Array(this.rowData.length).fill(false);
|
|
55
|
-
}
|
|
56
|
-
render() {
|
|
57
|
-
let className = "xpl-table";
|
|
58
|
-
if (this.striped)
|
|
59
|
-
className += " xpl-table--striped";
|
|
60
|
-
if (this.freeze)
|
|
61
|
-
className += " xpl-table--freeze";
|
|
62
|
-
if (this.hasScrolled)
|
|
63
|
-
className += " xpl-table--has-scrolled";
|
|
64
|
-
return (h(Host, null,
|
|
65
|
-
h("div", { class: "xpl-table-container", onScroll: this.onScroll, ref: (el) => (this.container = el) },
|
|
66
|
-
h("table", { class: className },
|
|
67
|
-
this.columns && (h("thead", null, this.columns.map((column, i) => {
|
|
68
|
-
return (h("th", null, this.multiselect && i === 0 ? (h("label", { htmlFor: "__xpl-table-th" },
|
|
69
|
-
h("input", { checked: this.areAllSelected, id: "__xpl-table-th",
|
|
70
|
-
// appear indeterminate when at least one but not all
|
|
71
|
-
// are selected
|
|
72
|
-
indeterminate: !this.areAllSelected &&
|
|
73
|
-
this.selected.some((a) => a), onChange: (e) => {
|
|
74
|
-
this.selectAll(e);
|
|
75
|
-
}, type: "checkbox" }),
|
|
76
|
-
column)) : (column)));
|
|
77
|
-
}))),
|
|
78
|
-
h("tbody", null, this.rowData.map((row, rowNum) => {
|
|
79
|
-
return (h("tr", { class: this.selected && this.selected[rowNum]
|
|
80
|
-
? "xpl-table-row-selected"
|
|
81
|
-
: "" }, row.map((cell, i) => {
|
|
82
|
-
return (h("td", null, this.multiselect && i === 0 ? (h("label", { htmlFor: "__xpl-table-row-" + rowNum },
|
|
83
|
-
h("input", { id: "__xpl-table-row-" + rowNum, checked: this.selected[rowNum], type: "checkbox", onChange: (e) => this.selectOne(e, rowNum) }),
|
|
84
|
-
h("div", { innerHTML: cell }))) : (h("div", { innerHTML: cell }))));
|
|
85
|
-
})));
|
|
86
|
-
}))))));
|
|
87
|
-
}
|
|
88
|
-
static get is() { return "xpl-table"; }
|
|
89
|
-
static get properties() { return {
|
|
90
|
-
"columns": {
|
|
91
|
-
"type": "unknown",
|
|
92
|
-
"mutable": false,
|
|
93
|
-
"complexType": {
|
|
94
|
-
"original": "string[]",
|
|
95
|
-
"resolved": "string[]",
|
|
96
|
-
"references": {}
|
|
97
|
-
},
|
|
98
|
-
"required": false,
|
|
99
|
-
"optional": true,
|
|
100
|
-
"docs": {
|
|
101
|
-
"tags": [],
|
|
102
|
-
"text": ""
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
"data": {
|
|
106
|
-
"type": "unknown",
|
|
107
|
-
"mutable": false,
|
|
108
|
-
"complexType": {
|
|
109
|
-
"original": "string[][]",
|
|
110
|
-
"resolved": "string[][]",
|
|
111
|
-
"references": {}
|
|
112
|
-
},
|
|
113
|
-
"required": false,
|
|
114
|
-
"optional": true,
|
|
115
|
-
"docs": {
|
|
116
|
-
"tags": [],
|
|
117
|
-
"text": ""
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"freeze": {
|
|
121
|
-
"type": "boolean",
|
|
122
|
-
"mutable": false,
|
|
123
|
-
"complexType": {
|
|
124
|
-
"original": "boolean",
|
|
125
|
-
"resolved": "boolean",
|
|
126
|
-
"references": {}
|
|
127
|
-
},
|
|
128
|
-
"required": false,
|
|
129
|
-
"optional": true,
|
|
130
|
-
"docs": {
|
|
131
|
-
"tags": [],
|
|
132
|
-
"text": ""
|
|
133
|
-
},
|
|
134
|
-
"attribute": "freeze",
|
|
135
|
-
"reflect": false
|
|
136
|
-
},
|
|
137
|
-
"multiselect": {
|
|
138
|
-
"type": "boolean",
|
|
139
|
-
"mutable": false,
|
|
140
|
-
"complexType": {
|
|
141
|
-
"original": "boolean",
|
|
142
|
-
"resolved": "boolean",
|
|
143
|
-
"references": {}
|
|
144
|
-
},
|
|
145
|
-
"required": false,
|
|
146
|
-
"optional": true,
|
|
147
|
-
"docs": {
|
|
148
|
-
"tags": [],
|
|
149
|
-
"text": ""
|
|
150
|
-
},
|
|
151
|
-
"attribute": "multiselect",
|
|
152
|
-
"reflect": false
|
|
153
|
-
},
|
|
154
|
-
"striped": {
|
|
155
|
-
"type": "boolean",
|
|
156
|
-
"mutable": false,
|
|
157
|
-
"complexType": {
|
|
158
|
-
"original": "boolean",
|
|
159
|
-
"resolved": "boolean",
|
|
160
|
-
"references": {}
|
|
161
|
-
},
|
|
162
|
-
"required": false,
|
|
163
|
-
"optional": true,
|
|
164
|
-
"docs": {
|
|
165
|
-
"tags": [],
|
|
166
|
-
"text": ""
|
|
167
|
-
},
|
|
168
|
-
"attribute": "striped",
|
|
169
|
-
"reflect": false
|
|
170
|
-
}
|
|
171
|
-
}; }
|
|
172
|
-
static get states() { return {
|
|
173
|
-
"areAllSelected": {},
|
|
174
|
-
"rowData": {},
|
|
175
|
-
"hasScrolled": {},
|
|
176
|
-
"selected": {}
|
|
177
|
-
}; }
|
|
178
|
-
static get events() { return [{
|
|
179
|
-
"method": "tableSelect",
|
|
180
|
-
"name": "tableSelect",
|
|
181
|
-
"bubbles": true,
|
|
182
|
-
"cancelable": true,
|
|
183
|
-
"composed": true,
|
|
184
|
-
"docs": {
|
|
185
|
-
"tags": [],
|
|
186
|
-
"text": ""
|
|
187
|
-
},
|
|
188
|
-
"complexType": {
|
|
189
|
-
"original": "any",
|
|
190
|
-
"resolved": "any",
|
|
191
|
-
"references": {}
|
|
192
|
-
}
|
|
193
|
-
}]; }
|
|
194
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Component, Host, h, Event } from '@stencil/core';
|
|
2
|
-
export class XplTag {
|
|
3
|
-
render() {
|
|
4
|
-
return (h(Host, { class: "xpl-tag-container" },
|
|
5
|
-
h("button", { class: "xpl-tag", onClick: () => {
|
|
6
|
-
this.close.emit();
|
|
7
|
-
} },
|
|
8
|
-
h("slot", null)),
|
|
9
|
-
h("button", { class: "xpl-tag__close", onClick: () => {
|
|
10
|
-
this.close.emit();
|
|
11
|
-
} }, "\u00D7")));
|
|
12
|
-
}
|
|
13
|
-
static get is() { return "xpl-tag"; }
|
|
14
|
-
static get events() { return [{
|
|
15
|
-
"method": "close",
|
|
16
|
-
"name": "close",
|
|
17
|
-
"bubbles": true,
|
|
18
|
-
"cancelable": true,
|
|
19
|
-
"composed": true,
|
|
20
|
-
"docs": {
|
|
21
|
-
"tags": [],
|
|
22
|
-
"text": ""
|
|
23
|
-
},
|
|
24
|
-
"complexType": {
|
|
25
|
-
"original": "any",
|
|
26
|
-
"resolved": "any",
|
|
27
|
-
"references": {}
|
|
28
|
-
}
|
|
29
|
-
}]; }
|
|
30
|
-
}
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { Component, Host, h, Prop, State } from "@stencil/core";
|
|
2
|
-
import { v4 as uuid } from "uuid";
|
|
3
|
-
export class XplToggle {
|
|
4
|
-
constructor() {
|
|
5
|
-
/**
|
|
6
|
-
* The size of the toggle -- `default` or `small`
|
|
7
|
-
*/
|
|
8
|
-
this.variant = "default";
|
|
9
|
-
this.id = uuid();
|
|
10
|
-
}
|
|
11
|
-
render() {
|
|
12
|
-
let containerClassName = "xpl-toggle-container";
|
|
13
|
-
if (this.disabled)
|
|
14
|
-
containerClassName += " xpl-toggle-container--disabled";
|
|
15
|
-
let className = "xpl-toggle";
|
|
16
|
-
if (this.variant === "small")
|
|
17
|
-
className += " xpl-toggle--small";
|
|
18
|
-
return (h(Host, { class: containerClassName },
|
|
19
|
-
(this.heading || this.description) && (h("label", { class: {
|
|
20
|
-
"xpl-label": true,
|
|
21
|
-
"xpl-label--disabled": this.disabled
|
|
22
|
-
}, htmlFor: this.id },
|
|
23
|
-
this.heading,
|
|
24
|
-
this.description && h("small", { class: {
|
|
25
|
-
"xpl-description": true,
|
|
26
|
-
"xpl-description--disabled": this.disabled
|
|
27
|
-
} }, this.description))),
|
|
28
|
-
h("input", { class: className, type: "checkbox", checked: this.checked, disabled: this.disabled, id: this.id, name: this.name }),
|
|
29
|
-
this.label && h("label", { htmlFor: this.id }, this.label)));
|
|
30
|
-
}
|
|
31
|
-
static get is() { return "xpl-toggle"; }
|
|
32
|
-
static get properties() { return {
|
|
33
|
-
"checked": {
|
|
34
|
-
"type": "boolean",
|
|
35
|
-
"mutable": false,
|
|
36
|
-
"complexType": {
|
|
37
|
-
"original": "boolean",
|
|
38
|
-
"resolved": "boolean",
|
|
39
|
-
"references": {}
|
|
40
|
-
},
|
|
41
|
-
"required": false,
|
|
42
|
-
"optional": true,
|
|
43
|
-
"docs": {
|
|
44
|
-
"tags": [],
|
|
45
|
-
"text": ""
|
|
46
|
-
},
|
|
47
|
-
"attribute": "checked",
|
|
48
|
-
"reflect": false
|
|
49
|
-
},
|
|
50
|
-
"description": {
|
|
51
|
-
"type": "string",
|
|
52
|
-
"mutable": false,
|
|
53
|
-
"complexType": {
|
|
54
|
-
"original": "string",
|
|
55
|
-
"resolved": "string",
|
|
56
|
-
"references": {}
|
|
57
|
-
},
|
|
58
|
-
"required": false,
|
|
59
|
-
"optional": true,
|
|
60
|
-
"docs": {
|
|
61
|
-
"tags": [],
|
|
62
|
-
"text": "The toggle's description appears *above* the toggle."
|
|
63
|
-
},
|
|
64
|
-
"attribute": "description",
|
|
65
|
-
"reflect": false
|
|
66
|
-
},
|
|
67
|
-
"disabled": {
|
|
68
|
-
"type": "boolean",
|
|
69
|
-
"mutable": false,
|
|
70
|
-
"complexType": {
|
|
71
|
-
"original": "boolean",
|
|
72
|
-
"resolved": "boolean",
|
|
73
|
-
"references": {}
|
|
74
|
-
},
|
|
75
|
-
"required": false,
|
|
76
|
-
"optional": true,
|
|
77
|
-
"docs": {
|
|
78
|
-
"tags": [],
|
|
79
|
-
"text": ""
|
|
80
|
-
},
|
|
81
|
-
"attribute": "disabled",
|
|
82
|
-
"reflect": false
|
|
83
|
-
},
|
|
84
|
-
"heading": {
|
|
85
|
-
"type": "string",
|
|
86
|
-
"mutable": false,
|
|
87
|
-
"complexType": {
|
|
88
|
-
"original": "string",
|
|
89
|
-
"resolved": "string",
|
|
90
|
-
"references": {}
|
|
91
|
-
},
|
|
92
|
-
"required": false,
|
|
93
|
-
"optional": true,
|
|
94
|
-
"docs": {
|
|
95
|
-
"tags": [],
|
|
96
|
-
"text": "The toggle's heading appears *above* the toggle."
|
|
97
|
-
},
|
|
98
|
-
"attribute": "heading",
|
|
99
|
-
"reflect": false
|
|
100
|
-
},
|
|
101
|
-
"label": {
|
|
102
|
-
"type": "string",
|
|
103
|
-
"mutable": false,
|
|
104
|
-
"complexType": {
|
|
105
|
-
"original": "string",
|
|
106
|
-
"resolved": "string",
|
|
107
|
-
"references": {}
|
|
108
|
-
},
|
|
109
|
-
"required": false,
|
|
110
|
-
"optional": true,
|
|
111
|
-
"docs": {
|
|
112
|
-
"tags": [],
|
|
113
|
-
"text": "The toggle's label appears *to the right of* the toggle."
|
|
114
|
-
},
|
|
115
|
-
"attribute": "label",
|
|
116
|
-
"reflect": false
|
|
117
|
-
},
|
|
118
|
-
"name": {
|
|
119
|
-
"type": "string",
|
|
120
|
-
"mutable": false,
|
|
121
|
-
"complexType": {
|
|
122
|
-
"original": "string",
|
|
123
|
-
"resolved": "string",
|
|
124
|
-
"references": {}
|
|
125
|
-
},
|
|
126
|
-
"required": false,
|
|
127
|
-
"optional": true,
|
|
128
|
-
"docs": {
|
|
129
|
-
"tags": [],
|
|
130
|
-
"text": ""
|
|
131
|
-
},
|
|
132
|
-
"attribute": "name",
|
|
133
|
-
"reflect": false
|
|
134
|
-
},
|
|
135
|
-
"variant": {
|
|
136
|
-
"type": "string",
|
|
137
|
-
"mutable": false,
|
|
138
|
-
"complexType": {
|
|
139
|
-
"original": "\"default\" | \"small\"",
|
|
140
|
-
"resolved": "\"default\" | \"small\"",
|
|
141
|
-
"references": {}
|
|
142
|
-
},
|
|
143
|
-
"required": false,
|
|
144
|
-
"optional": true,
|
|
145
|
-
"docs": {
|
|
146
|
-
"tags": [],
|
|
147
|
-
"text": "The size of the toggle -- `default` or `small`"
|
|
148
|
-
},
|
|
149
|
-
"attribute": "variant",
|
|
150
|
-
"reflect": false,
|
|
151
|
-
"defaultValue": "\"default\""
|
|
152
|
-
}
|
|
153
|
-
}; }
|
|
154
|
-
static get states() { return {
|
|
155
|
-
"id": {}
|
|
156
|
-
}; }
|
|
157
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Component, Host, h } from '@stencil/core';
|
|
2
|
-
export class XplUtilityBar {
|
|
3
|
-
render() {
|
|
4
|
-
return (h(Host, null,
|
|
5
|
-
h("nav", { "aria-label": "utility navigation bar", class: "xpl-utility-bar" },
|
|
6
|
-
h("slot", { name: "main" }),
|
|
7
|
-
h("slot", { name: "aside" }))));
|
|
8
|
-
}
|
|
9
|
-
static get is() { return "xpl-utility-bar"; }
|
|
10
|
-
}
|