@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.
Files changed (99) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/build/style.css +703 -201
  3. package/dist/apollo-core/apollo-core.css +4 -2114
  4. package/dist/apollo-core/apollo-core.esm.js +1 -125
  5. package/dist/apollo-core/index.esm.js +0 -1
  6. package/dist/apollo-core/{p-6c4f9227.entry.js → p-fc589c84.entry.js} +3 -3
  7. package/dist/cjs/apollo-core.cjs.js +4 -112
  8. package/dist/cjs/index.cjs.js +0 -1
  9. package/dist/cjs/loader.cjs.js +2 -18
  10. package/dist/cjs/{xpl-avatar_9.cjs.entry.js → xpl-avatar_13.cjs.entry.js} +48 -0
  11. package/dist/cjs/xpl-choicelist.cjs.entry.js +1 -1
  12. package/dist/cjs/xpl-pagination.cjs.entry.js +1 -1
  13. package/dist/collection/collection-manifest.json +4 -0
  14. package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +7 -0
  15. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +3 -0
  16. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +3 -0
  17. package/dist/collection/components/xpl-content-area/xpl-content-area.js +39 -0
  18. package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +43 -0
  19. package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +10 -0
  20. package/dist/custom-elements/index.d.ts +36 -0
  21. package/dist/custom-elements/index.js +56 -527
  22. package/dist/esm/apollo-core.js +4 -112
  23. package/dist/esm/index.js +1 -1
  24. package/dist/esm/loader.js +2 -18
  25. package/dist/esm/{xpl-avatar_9.entry.js → xpl-avatar_13.entry.js} +45 -1
  26. package/dist/esm/xpl-choicelist.entry.js +1 -1
  27. package/dist/esm/xpl-pagination.entry.js +1 -1
  28. package/dist/stories/backdrop.stories.js +18 -0
  29. package/dist/stories/breadcrumbs.stories.js +6 -6
  30. package/dist/stories/content-area.stories.js +53 -0
  31. package/dist/stories/main-nav.stories.js +308 -0
  32. package/dist/types/Users/awentt/Sites/apollo/.stencil/stories/backdrop.stories.d.ts +16 -0
  33. package/dist/types/Users/awentt/Sites/apollo/.stencil/stories/content-area.stories.d.ts +29 -0
  34. package/dist/types/Users/awentt/Sites/apollo/.stencil/stories/main-nav.stories.d.ts +30 -0
  35. package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/table.stories.d.ts +1 -2
  36. package/dist/types/components/xpl-backdrop/xpl-backdrop.d.ts +3 -0
  37. package/dist/types/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.d.ts +3 -0
  38. package/dist/types/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.d.ts +3 -0
  39. package/dist/types/components/xpl-content-area/xpl-content-area.d.ts +7 -0
  40. package/dist/types/components/xpl-main-nav/xpl-main-nav.d.ts +7 -0
  41. package/dist/types/components/xpl-nav-item/xpl-nav-item.d.ts +3 -0
  42. package/dist/types/components.d.ts +94 -0
  43. package/package.json +3 -2
  44. package/dist/apollo-core/app-globals-0f993ce5.js +0 -3
  45. package/dist/apollo-core/css-shim-bbdf0cc6.js +0 -4
  46. package/dist/apollo-core/dom-1f98a75f.js +0 -73
  47. package/dist/apollo-core/index-912d1a21.js +0 -584
  48. package/dist/apollo-core/index-f313719f.js +0 -2938
  49. package/dist/apollo-core/shadow-css-67b66845.js +0 -389
  50. package/dist/apollo-core/xpl-avatar.entry.js +0 -19
  51. package/dist/apollo-core/xpl-badge.entry.js +0 -17
  52. package/dist/apollo-core/xpl-breadcrumb-item.entry.js +0 -19
  53. package/dist/apollo-core/xpl-breadcrumbs.entry.js +0 -14
  54. package/dist/apollo-core/xpl-button.entry.js +0 -16086
  55. package/dist/apollo-core/xpl-checkbox.entry.js +0 -14
  56. package/dist/apollo-core/xpl-choicelist.entry.js +0 -12
  57. package/dist/apollo-core/xpl-pagination.entry.js +0 -72
  58. package/dist/apollo-core/xpl-radio.entry.js +0 -14
  59. package/dist/apollo-core/xpl-table.entry.js +0 -85
  60. package/dist/apollo-core/xpl-utility-bar.entry.js +0 -12
  61. package/dist/cjs/app-globals-3a1e7e63.js +0 -5
  62. package/dist/cjs/css-shim-a7379e2b.js +0 -6
  63. package/dist/cjs/dom-3e7d9c3b.js +0 -75
  64. package/dist/cjs/index-318d5fc7.js +0 -586
  65. package/dist/cjs/index-fca88002.js +0 -2973
  66. package/dist/cjs/shadow-css-09555044.js +0 -391
  67. package/dist/cjs/xpl-avatar.cjs.entry.js +0 -23
  68. package/dist/cjs/xpl-badge.cjs.entry.js +0 -21
  69. package/dist/cjs/xpl-breadcrumb-item.cjs.entry.js +0 -23
  70. package/dist/cjs/xpl-breadcrumbs.cjs.entry.js +0 -18
  71. package/dist/cjs/xpl-button.cjs.entry.js +0 -16090
  72. package/dist/cjs/xpl-checkbox.cjs.entry.js +0 -18
  73. package/dist/cjs/xpl-radio.cjs.entry.js +0 -18
  74. package/dist/cjs/xpl-table.cjs.entry.js +0 -89
  75. package/dist/cjs/xpl-utility-bar.cjs.entry.js +0 -16
  76. package/dist/esm/app-globals-0f993ce5.js +0 -3
  77. package/dist/esm/css-shim-bbdf0cc6.js +0 -4
  78. package/dist/esm/dom-1f98a75f.js +0 -73
  79. package/dist/esm/index-912d1a21.js +0 -584
  80. package/dist/esm/index-f313719f.js +0 -2938
  81. package/dist/esm/shadow-css-67b66845.js +0 -389
  82. package/dist/esm/xpl-avatar.entry.js +0 -19
  83. package/dist/esm/xpl-badge.entry.js +0 -17
  84. package/dist/esm/xpl-breadcrumb-item.entry.js +0 -19
  85. package/dist/esm/xpl-breadcrumbs.entry.js +0 -14
  86. package/dist/esm/xpl-button.entry.js +0 -16086
  87. package/dist/esm/xpl-checkbox.entry.js +0 -14
  88. package/dist/esm/xpl-radio.entry.js +0 -14
  89. package/dist/esm/xpl-table.entry.js +0 -85
  90. package/dist/esm/xpl-utility-bar.entry.js +0 -12
  91. /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/avatar.stories.d.ts +0 -0
  92. /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/badge.stories.d.ts +0 -0
  93. /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/breadcrumbs.stories.d.ts +0 -0
  94. /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/button.stories.d.ts +0 -0
  95. /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/checkbox.stories.d.ts +0 -0
  96. /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/pagination.stories.d.ts +0 -0
  97. /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/radio.stories.d.ts +0 -0
  98. /package/dist/types/Users/{fernandogelin/Projects → awentt/Sites}/apollo/.stencil/stories/tabs.stories.d.ts +0 -0
  99. /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 };