@xplortech/apollo-core 0.1.1 → 0.2.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 +10 -0
- package/build/style.css +703 -201
- package/dist/apollo-core/apollo-core.css +4 -2114
- package/dist/apollo-core/apollo-core.esm.js +1 -125
- package/dist/apollo-core/index.esm.js +0 -1
- package/dist/apollo-core/{p-6c4f9227.entry.js → p-fc589c84.entry.js} +3 -3
- package/dist/cjs/apollo-core.cjs.js +4 -112
- package/dist/cjs/index.cjs.js +0 -1
- package/dist/cjs/loader.cjs.js +2 -18
- package/dist/cjs/{xpl-avatar_9.cjs.entry.js → xpl-avatar_13.cjs.entry.js} +48 -0
- package/dist/cjs/xpl-choicelist.cjs.entry.js +1 -1
- package/dist/cjs/xpl-pagination.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +7 -0
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +3 -0
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +3 -0
- package/dist/collection/components/xpl-content-area/xpl-content-area.js +39 -0
- package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +43 -0
- package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +10 -0
- package/dist/custom-elements/index.d.ts +36 -0
- package/dist/custom-elements/index.js +56 -527
- package/dist/esm/apollo-core.js +4 -112
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +2 -18
- package/dist/esm/{xpl-avatar_9.entry.js → xpl-avatar_13.entry.js} +45 -1
- package/dist/esm/xpl-choicelist.entry.js +1 -1
- package/dist/esm/xpl-pagination.entry.js +1 -1
- package/dist/stories/backdrop.stories.js +18 -0
- package/dist/stories/breadcrumbs.stories.js +6 -6
- package/dist/stories/content-area.stories.js +53 -0
- package/dist/stories/main-nav.stories.js +308 -0
- package/dist/types/Users/awentt/Sites/apollo/.stencil/stories/backdrop.stories.d.ts +16 -0
- package/dist/types/Users/awentt/Sites/apollo/.stencil/stories/content-area.stories.d.ts +29 -0
- package/dist/types/Users/awentt/Sites/apollo/.stencil/stories/main-nav.stories.d.ts +30 -0
- package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/table.stories.d.ts +1 -2
- package/dist/types/components/xpl-backdrop/xpl-backdrop.d.ts +3 -0
- package/dist/types/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.d.ts +3 -0
- package/dist/types/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.d.ts +3 -0
- package/dist/types/components/xpl-content-area/xpl-content-area.d.ts +7 -0
- package/dist/types/components/xpl-main-nav/xpl-main-nav.d.ts +7 -0
- package/dist/types/components/xpl-nav-item/xpl-nav-item.d.ts +3 -0
- package/dist/types/components.d.ts +94 -0
- package/package.json +3 -2
- package/dist/apollo-core/app-globals-0f993ce5.js +0 -3
- package/dist/apollo-core/css-shim-bbdf0cc6.js +0 -4
- package/dist/apollo-core/dom-1f98a75f.js +0 -73
- package/dist/apollo-core/index-912d1a21.js +0 -584
- package/dist/apollo-core/index-f313719f.js +0 -2938
- package/dist/apollo-core/shadow-css-67b66845.js +0 -389
- package/dist/apollo-core/xpl-avatar.entry.js +0 -19
- package/dist/apollo-core/xpl-badge.entry.js +0 -17
- package/dist/apollo-core/xpl-breadcrumb-item.entry.js +0 -19
- package/dist/apollo-core/xpl-breadcrumbs.entry.js +0 -14
- package/dist/apollo-core/xpl-button.entry.js +0 -16086
- package/dist/apollo-core/xpl-checkbox.entry.js +0 -14
- package/dist/apollo-core/xpl-choicelist.entry.js +0 -12
- package/dist/apollo-core/xpl-pagination.entry.js +0 -72
- package/dist/apollo-core/xpl-radio.entry.js +0 -14
- package/dist/apollo-core/xpl-table.entry.js +0 -85
- package/dist/apollo-core/xpl-utility-bar.entry.js +0 -12
- package/dist/cjs/app-globals-3a1e7e63.js +0 -5
- package/dist/cjs/css-shim-a7379e2b.js +0 -6
- package/dist/cjs/dom-3e7d9c3b.js +0 -75
- package/dist/cjs/index-318d5fc7.js +0 -586
- package/dist/cjs/index-fca88002.js +0 -2973
- package/dist/cjs/shadow-css-09555044.js +0 -391
- package/dist/cjs/xpl-avatar.cjs.entry.js +0 -23
- package/dist/cjs/xpl-badge.cjs.entry.js +0 -21
- package/dist/cjs/xpl-breadcrumb-item.cjs.entry.js +0 -23
- package/dist/cjs/xpl-breadcrumbs.cjs.entry.js +0 -18
- package/dist/cjs/xpl-button.cjs.entry.js +0 -16090
- package/dist/cjs/xpl-checkbox.cjs.entry.js +0 -18
- package/dist/cjs/xpl-radio.cjs.entry.js +0 -18
- package/dist/cjs/xpl-table.cjs.entry.js +0 -89
- package/dist/cjs/xpl-utility-bar.cjs.entry.js +0 -16
- package/dist/esm/app-globals-0f993ce5.js +0 -3
- package/dist/esm/css-shim-bbdf0cc6.js +0 -4
- package/dist/esm/dom-1f98a75f.js +0 -73
- package/dist/esm/index-912d1a21.js +0 -584
- package/dist/esm/index-f313719f.js +0 -2938
- package/dist/esm/shadow-css-67b66845.js +0 -389
- package/dist/esm/xpl-avatar.entry.js +0 -19
- package/dist/esm/xpl-badge.entry.js +0 -17
- package/dist/esm/xpl-breadcrumb-item.entry.js +0 -19
- package/dist/esm/xpl-breadcrumbs.entry.js +0 -14
- package/dist/esm/xpl-button.entry.js +0 -16086
- package/dist/esm/xpl-checkbox.entry.js +0 -14
- package/dist/esm/xpl-radio.entry.js +0 -14
- package/dist/esm/xpl-table.entry.js +0 -85
- package/dist/esm/xpl-utility-bar.entry.js +0 -12
- /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/avatar.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/badge.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/breadcrumbs.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/button.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/checkbox.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/pagination.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/radio.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/tabs.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/utility-bar.stories.d.ts +0 -0
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, e as Host } from './index-f313719f.js';
|
|
2
|
-
import { v as v4 } from './index-912d1a21.js';
|
|
3
|
-
|
|
4
|
-
const XplCheckbox = class {
|
|
5
|
-
constructor(hostRef) {
|
|
6
|
-
registerInstance(this, hostRef);
|
|
7
|
-
this.id = v4();
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
return (h(Host, { class: "xpl-checkbox-container" }, h("input", { class: "xpl-checkbox", type: "checkbox", checked: this.checked, disabled: this.disabled, id: this.id, indeterminate: this.indeterminate, name: this.name, required: this.required, value: this.value }), h("label", { htmlFor: this.id }, h("slot", null), this.description && h("small", null, this.description))));
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { XplCheckbox as xpl_checkbox };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, e as Host } from './index-f313719f.js';
|
|
2
|
-
import { v as v4 } from './index-912d1a21.js';
|
|
3
|
-
|
|
4
|
-
const XplRadio = class {
|
|
5
|
-
constructor(hostRef) {
|
|
6
|
-
registerInstance(this, hostRef);
|
|
7
|
-
this.id = v4();
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
return (h(Host, { class: "xpl-radio-container" }, h("input", { class: "xpl-radio", type: "radio", checked: this.checked, disabled: this.disabled, id: this.id, name: this.name, required: this.required, value: this.value }), h("label", { htmlFor: this.id }, h("slot", null), this.description && h("small", null, this.description))));
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { XplRadio as xpl_radio };
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, f as createEvent, h, e as Host } from './index-f313719f.js';
|
|
2
|
-
|
|
3
|
-
const XplTable = class {
|
|
4
|
-
constructor(hostRef) {
|
|
5
|
-
registerInstance(this, hostRef);
|
|
6
|
-
this.tableSelect = createEvent(this, "tableSelect", 7);
|
|
7
|
-
this.areAllSelected = false;
|
|
8
|
-
this.hasScrolled = false;
|
|
9
|
-
this.selectAll = (e) => {
|
|
10
|
-
const { target } = e;
|
|
11
|
-
if (!(target instanceof HTMLInputElement))
|
|
12
|
-
return;
|
|
13
|
-
const { checked } = target;
|
|
14
|
-
this.areAllSelected = checked;
|
|
15
|
-
this.selected = this.selected.map(() => checked);
|
|
16
|
-
this.onChange();
|
|
17
|
-
};
|
|
18
|
-
this.selectOne = (e, i) => {
|
|
19
|
-
const { target } = e;
|
|
20
|
-
if (!(target instanceof HTMLInputElement))
|
|
21
|
-
return;
|
|
22
|
-
const { checked } = target;
|
|
23
|
-
this.areAllSelected = false;
|
|
24
|
-
this.selected = this.selected.map((v, _i) => (_i === i ? checked : v));
|
|
25
|
-
this.onChange();
|
|
26
|
-
};
|
|
27
|
-
this.onChange = () => {
|
|
28
|
-
this.tableSelect.emit({
|
|
29
|
-
selected: this.selected,
|
|
30
|
-
areAllSelected: this.areAllSelected,
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
this.onScroll = () => {
|
|
34
|
-
this.hasScrolled = this.container.scrollLeft > 0;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* TODO: Need to figure out how this interplays with data
|
|
38
|
-
* received from an API/server
|
|
39
|
-
*/
|
|
40
|
-
this.sortBy = (col, ascending = true) => {
|
|
41
|
-
this.rowData.sort((a, b) => {
|
|
42
|
-
const A = a[col];
|
|
43
|
-
const B = b[col];
|
|
44
|
-
if (typeof A === "number" && typeof B === "number") {
|
|
45
|
-
const f = ascending ? 1 : -1;
|
|
46
|
-
return A > B ? f : -f;
|
|
47
|
-
}
|
|
48
|
-
return -1;
|
|
49
|
-
});
|
|
50
|
-
this.rowData = Array.from(this.rowData);
|
|
51
|
-
this.render();
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
componentWillLoad() {
|
|
55
|
-
this.areAllSelected = false;
|
|
56
|
-
this.rowData = this.data ? Array.from(this.data) : [];
|
|
57
|
-
this.selected = new Array(this.rowData.length).fill(false);
|
|
58
|
-
}
|
|
59
|
-
render() {
|
|
60
|
-
let className = "xpl-table";
|
|
61
|
-
if (this.striped)
|
|
62
|
-
className += " xpl-table--striped";
|
|
63
|
-
if (this.freeze)
|
|
64
|
-
className += " xpl-table--freeze";
|
|
65
|
-
if (this.hasScrolled)
|
|
66
|
-
className += " xpl-table--has-scrolled";
|
|
67
|
-
return (h(Host, null, h("div", { class: "xpl-table-container", onScroll: this.onScroll, ref: (el) => (this.container = el) }, h("table", { class: className }, 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" }, h("input", { checked: this.areAllSelected, id: "__xpl-table-th",
|
|
69
|
-
// appear indeterminate when at least one but not all
|
|
70
|
-
// are selected
|
|
71
|
-
indeterminate: !this.areAllSelected &&
|
|
72
|
-
this.selected.some((a) => a), onChange: (e) => {
|
|
73
|
-
this.selectAll(e);
|
|
74
|
-
}, type: "checkbox" }), column)) : (column)));
|
|
75
|
-
}))), h("tbody", null, this.rowData.map((row, rowNum) => {
|
|
76
|
-
return (h("tr", { class: this.selected && this.selected[rowNum]
|
|
77
|
-
? "xpl-table-row-selected"
|
|
78
|
-
: "" }, row.map((cell, i) => {
|
|
79
|
-
return (h("td", null, this.multiselect && i === 0 ? (h("label", { htmlFor: "__xpl-table-row-" + rowNum }, h("input", { id: "__xpl-table-row-" + rowNum, checked: this.selected[rowNum], type: "checkbox", onChange: (e) => this.selectOne(e, rowNum) }), h("div", { innerHTML: cell }))) : (h("div", { innerHTML: cell }))));
|
|
80
|
-
})));
|
|
81
|
-
}))))));
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export { XplTable as xpl_table };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, e as Host } from './index-f313719f.js';
|
|
2
|
-
|
|
3
|
-
const XplUtilityBar = class {
|
|
4
|
-
constructor(hostRef) {
|
|
5
|
-
registerInstance(this, hostRef);
|
|
6
|
-
}
|
|
7
|
-
render() {
|
|
8
|
-
return (h(Host, null, h("nav", { "aria-label": "utility navigation bar", class: "xpl-utility-bar" }, h("slot", { name: "main" }), h("slot", { name: "aside" }))));
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export { XplUtilityBar as xpl_utility_bar };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|