@xplortech/apollo-core 1.0.0-beta.5 → 1.0.0-beta.6

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 (154) hide show
  1. package/build/style.css +1 -1
  2. package/dist/apollo-core/apollo-core.css +9 -5841
  3. package/dist/apollo-core/apollo-core.esm.js +1 -125
  4. package/dist/apollo-core/index.esm.js +0 -1
  5. package/dist/apollo-core/p-ee16942f.entry.js +1 -0
  6. package/dist/cjs/apollo-core.cjs.js +4 -112
  7. package/dist/cjs/index.cjs.js +0 -1
  8. package/dist/cjs/loader.cjs.js +2 -18
  9. package/dist/cjs/xpl-application-shell.cjs.entry.js +1 -1
  10. package/dist/cjs/xpl-avatar_12.cjs.entry.js +17 -17
  11. package/dist/cjs/xpl-backdrop.cjs.entry.js +1 -1
  12. package/dist/cjs/xpl-button-row.cjs.entry.js +1 -1
  13. package/dist/cjs/xpl-choicelist.cjs.entry.js +1 -1
  14. package/dist/cjs/xpl-divider.cjs.entry.js +1 -1
  15. package/dist/cjs/xpl-dropdown-group_3.cjs.entry.js +4 -1
  16. package/dist/cjs/xpl-dropdown_2.cjs.entry.js +1 -2
  17. package/dist/cjs/xpl-grid-item.cjs.entry.js +1 -1
  18. package/dist/cjs/xpl-grid.cjs.entry.js +1 -1
  19. package/dist/cjs/xpl-input.cjs.entry.js +4 -21
  20. package/dist/cjs/xpl-list.cjs.entry.js +2 -2
  21. package/dist/cjs/xpl-main-nav.cjs.entry.js +1 -1
  22. package/dist/cjs/xpl-pagination.cjs.entry.js +1 -1
  23. package/dist/cjs/xpl-select.cjs.entry.js +3 -44
  24. package/dist/cjs/xpl-toggle.cjs.entry.js +3 -3
  25. package/dist/collection/collection-manifest.json +1 -1
  26. package/dist/collection/components/xpl-choicelist/choice.js +1 -0
  27. package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +3 -3
  28. package/dist/collection/components/xpl-dropdown/dropdownoption.js +1 -0
  29. package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +2 -1
  30. package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +4 -1
  31. package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +16 -8
  32. package/dist/collection/components/xpl-list/listitem.js +1 -0
  33. package/dist/collection/components/xpl-list/xpl-list.js +2 -2
  34. package/dist/collection/components/xpl-select/selectchoice.js +1 -0
  35. package/dist/collection/components/xpl-select/xpl-select.js +2 -1
  36. package/dist/collection/components/xpl-table/xpl-table.js +17 -17
  37. package/dist/custom-elements/index.js +23 -604
  38. package/dist/esm/apollo-core.js +4 -112
  39. package/dist/esm/index.js +1 -1
  40. package/dist/esm/loader.js +2 -18
  41. package/dist/esm/xpl-application-shell.entry.js +1 -1
  42. package/dist/esm/xpl-avatar_12.entry.js +17 -17
  43. package/dist/esm/xpl-backdrop.entry.js +1 -1
  44. package/dist/esm/xpl-button-row.entry.js +1 -1
  45. package/dist/esm/xpl-choicelist.entry.js +1 -1
  46. package/dist/esm/xpl-divider.entry.js +1 -1
  47. package/dist/esm/xpl-dropdown-group_3.entry.js +4 -1
  48. package/dist/esm/xpl-dropdown_2.entry.js +1 -2
  49. package/dist/esm/xpl-grid-item.entry.js +1 -1
  50. package/dist/esm/xpl-grid.entry.js +1 -1
  51. package/dist/esm/xpl-input.entry.js +3 -20
  52. package/dist/esm/xpl-list.entry.js +2 -2
  53. package/dist/esm/xpl-main-nav.entry.js +1 -1
  54. package/dist/esm/xpl-pagination.entry.js +1 -1
  55. package/dist/esm/xpl-select.entry.js +2 -43
  56. package/dist/esm/xpl-toggle.entry.js +2 -2
  57. package/dist/types/components/xpl-choicelist/choice.d.ts +5 -5
  58. package/dist/types/components/xpl-choicelist/xpl-choicelist.d.ts +2 -1
  59. package/dist/types/components/xpl-dropdown/dropdownoption.d.ts +8 -10
  60. package/dist/types/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.d.ts +1 -0
  61. package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +6 -4
  62. package/dist/types/components/xpl-list/listitem.d.ts +15 -19
  63. package/dist/types/components/xpl-list/xpl-list.d.ts +1 -0
  64. package/dist/types/components/xpl-select/selectchoice.d.ts +3 -2
  65. package/dist/types/components/xpl-select/xpl-select.d.ts +1 -0
  66. package/dist/types/components/xpl-table/xpl-table.d.ts +5 -6
  67. package/dist/types/components.d.ts +17 -6
  68. package/package.json +2 -2
  69. package/dist/apollo-core/app-globals-0f993ce5.js +0 -3
  70. package/dist/apollo-core/css-shim-bbdf0cc6.js +0 -4
  71. package/dist/apollo-core/dom-1f98a75f.js +0 -73
  72. package/dist/apollo-core/index-5b4a209e.js +0 -2938
  73. package/dist/apollo-core/index-912d1a21.js +0 -584
  74. package/dist/apollo-core/p-50eb8239.entry.js +0 -1
  75. package/dist/apollo-core/regular-133c23b5.js +0 -16052
  76. package/dist/apollo-core/shadow-css-67b66845.js +0 -389
  77. package/dist/apollo-core/xpl-application-shell.entry.js +0 -60
  78. package/dist/apollo-core/xpl-avatar.entry.js +0 -19
  79. package/dist/apollo-core/xpl-backdrop.entry.js +0 -21
  80. package/dist/apollo-core/xpl-badge.entry.js +0 -17
  81. package/dist/apollo-core/xpl-breadcrumb-item.entry.js +0 -17
  82. package/dist/apollo-core/xpl-breadcrumbs.entry.js +0 -12
  83. package/dist/apollo-core/xpl-button-row.entry.js +0 -18
  84. package/dist/apollo-core/xpl-button.entry.js +0 -60
  85. package/dist/apollo-core/xpl-checkbox.entry.js +0 -25
  86. package/dist/apollo-core/xpl-choicelist.entry.js +0 -39
  87. package/dist/apollo-core/xpl-content-area.entry.js +0 -16
  88. package/dist/apollo-core/xpl-divider.entry.js +0 -14
  89. package/dist/apollo-core/xpl-dropdown-group.entry.js +0 -31
  90. package/dist/apollo-core/xpl-dropdown-heading.entry.js +0 -12
  91. package/dist/apollo-core/xpl-dropdown-option.entry.js +0 -61
  92. package/dist/apollo-core/xpl-dropdown.entry.js +0 -104
  93. package/dist/apollo-core/xpl-grid-item.entry.js +0 -21
  94. package/dist/apollo-core/xpl-grid.entry.js +0 -31
  95. package/dist/apollo-core/xpl-input.entry.js +0 -2547
  96. package/dist/apollo-core/xpl-list.entry.js +0 -57
  97. package/dist/apollo-core/xpl-main-nav.entry.js +0 -26
  98. package/dist/apollo-core/xpl-nav-item.entry.js +0 -26
  99. package/dist/apollo-core/xpl-pagination.entry.js +0 -72
  100. package/dist/apollo-core/xpl-radio.entry.js +0 -25
  101. package/dist/apollo-core/xpl-secondary-nav.entry.js +0 -12
  102. package/dist/apollo-core/xpl-select.entry.js +0 -662
  103. package/dist/apollo-core/xpl-table.entry.js +0 -91
  104. package/dist/apollo-core/xpl-tag.entry.js +0 -17
  105. package/dist/apollo-core/xpl-toggle.entry.js +0 -30
  106. package/dist/apollo-core/xpl-utility-bar.entry.js +0 -27
  107. package/dist/cjs/app-globals-3a1e7e63.js +0 -5
  108. package/dist/cjs/css-shim-a7379e2b.js +0 -6
  109. package/dist/cjs/dom-3e7d9c3b.js +0 -75
  110. package/dist/cjs/index-318d5fc7.js +0 -586
  111. package/dist/cjs/index-88e58962.js +0 -2975
  112. package/dist/cjs/regular-503465f4.js +0 -16054
  113. package/dist/cjs/shadow-css-09555044.js +0 -391
  114. package/dist/cjs/xpl-avatar.cjs.entry.js +0 -23
  115. package/dist/cjs/xpl-badge.cjs.entry.js +0 -21
  116. package/dist/cjs/xpl-breadcrumb-item.cjs.entry.js +0 -21
  117. package/dist/cjs/xpl-breadcrumbs.cjs.entry.js +0 -16
  118. package/dist/cjs/xpl-button.cjs.entry.js +0 -64
  119. package/dist/cjs/xpl-checkbox.cjs.entry.js +0 -29
  120. package/dist/cjs/xpl-content-area.cjs.entry.js +0 -20
  121. package/dist/cjs/xpl-dropdown-group.cjs.entry.js +0 -35
  122. package/dist/cjs/xpl-dropdown-heading.cjs.entry.js +0 -16
  123. package/dist/cjs/xpl-dropdown-option.cjs.entry.js +0 -65
  124. package/dist/cjs/xpl-dropdown.cjs.entry.js +0 -108
  125. package/dist/cjs/xpl-nav-item.cjs.entry.js +0 -30
  126. package/dist/cjs/xpl-radio.cjs.entry.js +0 -29
  127. package/dist/cjs/xpl-secondary-nav.cjs.entry.js +0 -16
  128. package/dist/cjs/xpl-table.cjs.entry.js +0 -95
  129. package/dist/cjs/xpl-tag.cjs.entry.js +0 -21
  130. package/dist/cjs/xpl-utility-bar.cjs.entry.js +0 -31
  131. package/dist/esm/app-globals-0f993ce5.js +0 -3
  132. package/dist/esm/css-shim-bbdf0cc6.js +0 -4
  133. package/dist/esm/dom-1f98a75f.js +0 -73
  134. package/dist/esm/index-5b4a209e.js +0 -2938
  135. package/dist/esm/index-912d1a21.js +0 -584
  136. package/dist/esm/regular-133c23b5.js +0 -16052
  137. package/dist/esm/shadow-css-67b66845.js +0 -389
  138. package/dist/esm/xpl-avatar.entry.js +0 -19
  139. package/dist/esm/xpl-badge.entry.js +0 -17
  140. package/dist/esm/xpl-breadcrumb-item.entry.js +0 -17
  141. package/dist/esm/xpl-breadcrumbs.entry.js +0 -12
  142. package/dist/esm/xpl-button.entry.js +0 -60
  143. package/dist/esm/xpl-checkbox.entry.js +0 -25
  144. package/dist/esm/xpl-content-area.entry.js +0 -16
  145. package/dist/esm/xpl-dropdown-group.entry.js +0 -31
  146. package/dist/esm/xpl-dropdown-heading.entry.js +0 -12
  147. package/dist/esm/xpl-dropdown-option.entry.js +0 -61
  148. package/dist/esm/xpl-dropdown.entry.js +0 -104
  149. package/dist/esm/xpl-nav-item.entry.js +0 -26
  150. package/dist/esm/xpl-radio.entry.js +0 -25
  151. package/dist/esm/xpl-secondary-nav.entry.js +0 -12
  152. package/dist/esm/xpl-table.entry.js +0 -91
  153. package/dist/esm/xpl-tag.entry.js +0 -17
  154. package/dist/esm/xpl-utility-bar.entry.js +0 -27
@@ -1,57 +0,0 @@
1
- import { h, F as Fragment, r as registerInstance, e as Host } from './index-5b4a209e.js';
2
- import './regular-133c23b5.js';
3
-
4
- const ListItemCpt = ({ avatar, avatars, badges, href, title, subtext, metadata, }) => {
5
- const hasRight = avatars || badges || subtext;
6
- const inner = (h(Fragment, null, avatar &&
7
- (avatar.slice(0, 1) === '/' || avatar.slice(0, 4) === 'http' ? (h("xpl-avatar", { src: avatar, name: title })) : (h("xpl-avatar", { name: title }, avatar))), h("div", { class: "xpl-list-item-content" }, h("div", { class: "xpl-list-left" }, h("div", null, h("h4", null, title), metadata && (h("ul", { class: "xpl-list-item-metadata" }, metadata.map((d) => {
8
- if (typeof d === 'string') {
9
- return h("li", null, d);
10
- }
11
- else {
12
- return (h("li", null, h("span", { class: `far fa-${d.icon}` }), ' ', d.text));
13
- }
14
- }))))), hasRight && (h("div", { class: "xpl-list-right" }, subtext && (h("div", { class: "xpl-list-item-subtext" }, subtext)), avatars && (h("div", { class: "xpl-avatar-group xpl-avatar-group--s" }, avatars.map((a) => (h("img", { src: a, alt: "" }))))), badges &&
15
- badges.map((b) => {
16
- if (typeof b === 'string') {
17
- return h("xpl-badge", null, b);
18
- }
19
- else {
20
- return (h("xpl-badge", { dot: b.dot, variant: b.variant }, b.text));
21
- }
22
- }))))));
23
- return href ? (h("a", { class: "xpl-list-item", href: href }, inner)) : (h("div", { class: "xpl-list-item" }, inner));
24
- };
25
- const XplList = class {
26
- constructor(hostRef) {
27
- registerInstance(this, hostRef);
28
- /**
29
- * `items` should be an array of objects with the following signature:
30
- * {
31
- * avatar?: string; // The URL of the avatar, or the placeholder initials (ex. "SPD").
32
- * avatars?: string[]; // The URLs of multiple avatars to be displayed in a group on the right.
33
- * badges?: string[] | { // An array of strings or badge-like objects to be displayed as badges
34
- * dot?: boolean; // in a group on the right. See <xpl-badge> for more details.
35
- * text: string;
36
- * variant?: string;
37
- * }[];
38
- * href?: string; // A URL, if this list item is meant to link somewhere.
39
- * title: string; // The text to be displayed for the list item.
40
- * metadata?: string[] | { // An array of strings or strings with icons (reference the allowed
41
- * icon: string; // Font Awesome icons) to be displayed as metadata below the title.
42
- * text: string;
43
- * }[];
44
- * subtext?: string; // Subtext to be displayed on the right.
45
- * }
46
- *
47
- * - Note that you should *only use one of* `avatars`, `badges`, or `subtext`, to avoid cluttering
48
- * the right-hand side of the list item.
49
- */
50
- this.items = [];
51
- }
52
- render() {
53
- return (h(Host, null, this.items.map((item) => (h(ListItemCpt, Object.assign({}, item))))));
54
- }
55
- };
56
-
57
- export { XplList as xpl_list };
@@ -1,26 +0,0 @@
1
- import { r as registerInstance, f as createEvent, h, e as Host } from './index-5b4a209e.js';
2
-
3
- const XplMainNav = class {
4
- constructor(hostRef) {
5
- registerInstance(this, hostRef);
6
- this.navWidth = createEvent(this, "navWidth", 7);
7
- /**
8
- * @property {string} width - The width of the Main Nav.
9
- */
10
- this.width = 'default';
11
- }
12
- navWidthHandler() {
13
- this.navWidth.emit(this.width);
14
- }
15
- connectedCallback() {
16
- this.navWidthHandler();
17
- }
18
- componentDidUpdate() {
19
- this.navWidthHandler();
20
- }
21
- render() {
22
- return (h(Host, { class: `xpl-main-nav xpl-main-nav--${this.width}`, "aria-label": "Sidebar" }, h("nav", null, h("header", { "aria-label": "Sidebar Header" }, h("slot", { name: "logo" }), h("slot", { name: "brand-name" })), h("div", { class: "xpl-main-nav__main_section" }, h("slot", { name: "navigation" })), h("footer", { class: "xpl-main-nav__footer", "aria-label": "Sidebar Footer" }, h("slot", { name: "footer" })))));
23
- }
24
- };
25
-
26
- export { XplMainNav as xpl_main_nav };
@@ -1,26 +0,0 @@
1
- import { r as registerInstance, f as createEvent, h, e as Host } from './index-5b4a209e.js';
2
-
3
- const XplNavItem = class {
4
- constructor(hostRef) {
5
- registerInstance(this, hostRef);
6
- this.navOpen = createEvent(this, "navOpen", 7);
7
- /**
8
- * @property {boolean} - Whether or not the item should control the main nav state on click
9
- */
10
- this.navControl = false;
11
- }
12
- onNavToggle() {
13
- if (window.innerWidth <= 640) {
14
- this.navOpen.emit(false);
15
- }
16
- }
17
- render() {
18
- return (h(Host, { class: "xpl-nav-item", role: "listitem", onClick: () => {
19
- if (this.navControl) {
20
- this.onNavToggle();
21
- }
22
- } }, h("slot", { name: "link" }, h("slot", { name: "icon" }), h("slot", null))));
23
- }
24
- };
25
-
26
- export { XplNavItem as xpl_nav_item };
@@ -1,72 +0,0 @@
1
- import { r as registerInstance, f as createEvent, h, e as Host } from './index-5b4a209e.js';
2
-
3
- const XplPagination = class {
4
- constructor(hostRef) {
5
- registerInstance(this, hostRef);
6
- this.page = createEvent(this, "page", 7);
7
- this.current = 1;
8
- /**
9
- * Private `_goto` method respects the `waitForCallback` prop --
10
- * it will always emit the `page` event, but won't actually update
11
- * the state of what the current page is, leaving that to the caller
12
- * to update once (presumably) some other data has loaded.
13
- */
14
- this._goto = (n) => {
15
- this.page.emit(n);
16
- if (!this.waitForCallback) {
17
- this.current = n;
18
- }
19
- };
20
- this.goPrev = () => {
21
- if (this.current > 1)
22
- this._goto(this.current - 1);
23
- };
24
- this.goNext = () => {
25
- const numPages = Math.ceil(this.total / this.perPage);
26
- if (this.current < numPages)
27
- this._goto(this.current + 1);
28
- };
29
- }
30
- /**
31
- * Calling `goto` with a page number (which should probably be
32
- * taken from the `page` event) updates the pagination's state
33
- * and re-renders it, showing the appropriate buttons given the current page.
34
- * @param n
35
- */
36
- async goto(n) {
37
- this.current = n;
38
- }
39
- render() {
40
- const numPages = Math.ceil(this.total / this.perPage);
41
- let showing = [1];
42
- if (numPages < 7)
43
- showing = [1, 2, 3, 4, 5, 6];
44
- if (this.current <= 3 || this.current >= numPages - 2) {
45
- showing = [1, 2, 3, '...', numPages - 2, numPages - 1, numPages];
46
- }
47
- else {
48
- showing = [
49
- 1,
50
- '...',
51
- this.current - 1,
52
- this.current,
53
- this.current + 1,
54
- '...',
55
- numPages,
56
- ];
57
- }
58
- const showingFirst = (this.current - 1) * this.perPage + 1;
59
- const showingLast = Math.min(showingFirst + this.perPage - 1, this.total);
60
- return (h(Host, null, h("div", { class: "xpl-pagination" }, h("div", null, h("p", null, "Showing ", h("span", null, showingFirst), " to", ' ', h("span", null, showingLast), " of", ' ', h("span", null, this.total), " results")), h("div", null, h("nav", { "aria-label": "Pagination" }, h("button", { onClick: this.goPrev, class: "xpl-pagination-prev" }, h("span", null, "Previous"), h("svg", { viewBox: "0 0 20 20", "aria-hidden": "true" }, h("path", { "fill-rule": "evenodd", d: "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z", "clip-rule": "evenodd" }))), showing.map((n) => {
61
- if (n === '...') {
62
- return (h("span", { class: "xpl-pagination-ellipsis" }, "..."));
63
- }
64
- if (n === this.current) {
65
- return (h("button", { "aria-current": "page", class: "xpl-pagination-current" }, n));
66
- }
67
- return (h("button", { onClick: () => this._goto(n) }, n));
68
- }), h("button", { onClick: this.goNext, class: "xpl-pagination-next" }, h("span", null, "Next"), h("svg", { viewBox: "0 0 20 20", "aria-hidden": "true" }, h("path", { "fill-rule": "evenodd", d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z", "clip-rule": "evenodd" }))))))));
69
- }
70
- };
71
-
72
- export { XplPagination as xpl_pagination };
@@ -1,25 +0,0 @@
1
- import { r as registerInstance, f as createEvent, h, e as Host } from './index-5b4a209e.js';
2
- import { v as v4 } from './index-912d1a21.js';
3
-
4
- const XplRadio = class {
5
- constructor(hostRef) {
6
- registerInstance(this, hostRef);
7
- this.radioChange = createEvent(this, "radioChange", 7);
8
- this.id = v4();
9
- }
10
- render() {
11
- return (h(Host, { class: {
12
- 'xpl-checkbox-radio-container': true,
13
- styled: this.styled,
14
- disabled: this.disabled,
15
- } }, 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, onChange: () => this.radioChange.emit(true) }), h("label", { class: {
16
- 'xpl-label': true,
17
- 'xpl-label--disabled': this.disabled,
18
- }, htmlFor: this.id }, h("slot", null), this.description && (h("small", { class: {
19
- 'xpl-description': true,
20
- 'xpl-description--disabled': this.disabled,
21
- } }, this.description)))));
22
- }
23
- };
24
-
25
- export { XplRadio as xpl_radio };
@@ -1,12 +0,0 @@
1
- import { r as registerInstance, h, e as Host } from './index-5b4a209e.js';
2
-
3
- const XplSecondaryNav = class {
4
- constructor(hostRef) {
5
- registerInstance(this, hostRef);
6
- }
7
- render() {
8
- return (h(Host, { class: "xpl-secondary-nav" }, h("nav", { "aria-label": "Secondary Nav" }, h("slot", null))));
9
- }
10
- };
11
-
12
- export { XplSecondaryNav as xpl_secondary_nav };