@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.
Files changed (186) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/style.css +291 -104
  3. package/dist/apollo-core/apollo-core.css +5509 -7
  4. package/dist/apollo-core/apollo-core.esm.js +125 -1
  5. package/dist/apollo-core/app-globals-0f993ce5.js +3 -0
  6. package/dist/apollo-core/css-shim-bbdf0cc6.js +4 -0
  7. package/dist/apollo-core/dom-1f98a75f.js +73 -0
  8. package/dist/apollo-core/index-3c9f25ef.js +2938 -0
  9. package/dist/apollo-core/index-3eb5568f.js +2938 -0
  10. package/dist/apollo-core/index-912d1a21.js +584 -0
  11. package/dist/apollo-core/index.esm.js +1 -0
  12. package/dist/{cjs/regular-872f5226.js → apollo-core/regular-133c23b5.js} +12 -3
  13. package/dist/apollo-core/shadow-css-67b66845.js +389 -0
  14. package/dist/apollo-core/xpl-application-shell.entry.js +52 -0
  15. package/dist/apollo-core/xpl-avatar.entry.js +19 -0
  16. package/dist/apollo-core/xpl-backdrop.entry.js +21 -0
  17. package/dist/apollo-core/xpl-badge.entry.js +17 -0
  18. package/dist/{collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js → apollo-core/xpl-breadcrumb-item.entry.js} +9 -12
  19. package/dist/apollo-core/xpl-breadcrumbs.entry.js +14 -0
  20. package/dist/{esm → apollo-core}/xpl-button-row.entry.js +1 -1
  21. package/dist/apollo-core/xpl-button.entry.js +34 -0
  22. package/dist/apollo-core/xpl-checkbox.entry.js +25 -0
  23. package/dist/{esm → apollo-core}/xpl-choicelist.entry.js +1 -1
  24. package/dist/apollo-core/xpl-content-area.entry.js +16 -0
  25. package/dist/{esm → apollo-core}/xpl-divider.entry.js +1 -1
  26. package/dist/{esm → apollo-core}/xpl-grid-item.entry.js +1 -1
  27. package/dist/{esm → apollo-core}/xpl-grid.entry.js +1 -1
  28. package/dist/{esm → apollo-core}/xpl-input.entry.js +20 -3
  29. package/dist/{esm → apollo-core}/xpl-list.entry.js +2 -2
  30. package/dist/apollo-core/xpl-main-nav.entry.js +26 -0
  31. package/dist/apollo-core/xpl-nav-item.entry.js +12 -0
  32. package/dist/{esm → apollo-core}/xpl-pagination.entry.js +1 -1
  33. package/dist/apollo-core/xpl-radio.entry.js +25 -0
  34. package/dist/apollo-core/xpl-secondary-nav.entry.js +12 -0
  35. package/dist/{esm → apollo-core}/xpl-select.entry.js +43 -2
  36. package/dist/apollo-core/xpl-table.entry.js +85 -0
  37. package/dist/{esm → apollo-core}/xpl-tag.entry.js +1 -1
  38. package/dist/{esm → apollo-core}/xpl-toggle.entry.js +2 -2
  39. package/dist/apollo-core/xpl-utility-bar.entry.js +25 -0
  40. package/dist/custom-elements/index.d.ts +6 -0
  41. package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/application-shell.stories.d.ts +62 -0
  42. package/dist/types/components/xpl-application-shell/test/xpl-application-shell.e2e.d.ts +1 -0
  43. package/dist/types/components/xpl-application-shell/xpl-application-shell.d.ts +24 -0
  44. package/dist/types/components/xpl-avatar/test/xpl-avatar.e2e.d.ts +1 -0
  45. package/dist/types/components/xpl-avatar/test/xpl-avatar.spec.d.ts +1 -0
  46. package/dist/types/components/xpl-backdrop/test/xpl-backdrop.e2e.d.ts +1 -0
  47. package/dist/types/components/xpl-backdrop/xpl-backdrop.d.ts +5 -0
  48. package/dist/types/components/xpl-badge/test/xpl-badge.e2e.d.ts +1 -0
  49. package/dist/types/components/xpl-badge/test/xpl-badge.spec.d.ts +1 -0
  50. package/dist/types/components/xpl-breadcrumbs/xpl-breadcrumb-item/test/xpl-breadcrumb-item.e2e.d.ts +1 -0
  51. package/dist/types/components/xpl-breadcrumbs/xpl-breadcrumbs/test/xpl-breadcrumbs.e2e.d.ts +1 -0
  52. package/dist/types/components/xpl-button/test/xpl-button.e2e.d.ts +1 -0
  53. package/dist/types/components/xpl-button/test/xpl-button.spec.d.ts +1 -0
  54. package/dist/types/components/xpl-button-row/test/xpl-button-row.e2e.d.ts +1 -0
  55. package/dist/types/components/xpl-button-row/test/xpl-button-row.spec.d.ts +1 -0
  56. package/dist/types/components/xpl-checkbox/test/xpl-checkbox.e2e.d.ts +1 -0
  57. package/dist/types/components/xpl-checkbox/test/xpl-checkbox.spec.d.ts +1 -0
  58. package/dist/types/components/xpl-choicelist/test/xpl-choicelist.e2e.d.ts +1 -0
  59. package/dist/types/components/xpl-choicelist/test/xpl-choicelist.spec.d.ts +1 -0
  60. package/dist/types/components/xpl-content-area/test/xpl-content-area.e2e.d.ts +1 -0
  61. package/dist/types/components/xpl-divider/test/xpl-divider.e2e.d.ts +1 -0
  62. package/dist/types/components/xpl-divider/test/xpl-divider.spec.d.ts +1 -0
  63. package/dist/types/components/xpl-grid/test/xpl-grid.e2e.d.ts +1 -0
  64. package/dist/types/components/xpl-grid/test/xpl-grid.spec.d.ts +1 -0
  65. package/dist/types/components/xpl-grid-item/test/xpl-grid-item.e2e.d.ts +1 -0
  66. package/dist/types/components/xpl-grid-item/test/xpl-grid-item.spec.d.ts +1 -0
  67. package/dist/types/components/xpl-input/test/xpl-input.e2e.d.ts +1 -0
  68. package/dist/types/components/xpl-input/test/xpl-input.spec.d.ts +1 -0
  69. package/dist/types/components/xpl-list/test/xpl-list.e2e.d.ts +1 -0
  70. package/dist/types/components/xpl-list/test/xpl-list.spec.d.ts +1 -0
  71. package/dist/types/components/xpl-main-nav/test/xpl-main-nav.e2e.d.ts +1 -0
  72. package/dist/types/components/xpl-main-nav/xpl-main-nav.d.ts +9 -0
  73. package/dist/types/components/xpl-nav-item/test/xpl-nav-item.e2e.d.ts +1 -0
  74. package/dist/types/components/xpl-pagination/test/xpl-pagination.e2e.d.ts +1 -0
  75. package/dist/types/components/xpl-pagination/test/xpl-pagination.spec.d.ts +1 -0
  76. package/dist/types/components/xpl-radio/test/xpl-radio.e2e.d.ts +1 -0
  77. package/dist/types/components/xpl-radio/test/xpl-radio.spec.d.ts +1 -0
  78. package/dist/types/components/xpl-secondary-nav/test/secondary-nav.e2e.d.ts +1 -0
  79. package/dist/types/components/xpl-select/test/xpl-select.e2e.d.ts +1 -0
  80. package/dist/types/components/xpl-select/test/xpl-select.spec.d.ts +1 -0
  81. package/dist/types/components/xpl-table/test/xpl-table.e2e.d.ts +1 -0
  82. package/dist/types/components/xpl-table/test/xpl-table.spec.d.ts +1 -0
  83. package/dist/types/components/xpl-tag/test/xpl-tag.e2e.d.ts +1 -0
  84. package/dist/types/components/xpl-tag/test/xpl-tag.spec.d.ts +1 -0
  85. package/dist/types/components/xpl-toggle/test/xpl-toggle.e2e.d.ts +1 -0
  86. package/dist/types/components/xpl-toggle/test/xpl-toggle.spec.d.ts +1 -0
  87. package/dist/types/components/xpl-utility-bar/test/xpl-utility-bar.e2e.d.ts +1 -0
  88. package/dist/types/components/xpl-utility-bar/xpl-utility-bar.d.ts +12 -0
  89. package/dist/types/components.d.ts +61 -0
  90. package/package.json +1 -1
  91. package/dist/apollo-core/p-0027c582.entry.js +0 -1
  92. package/dist/apollo-core/p-2c551f4d.entry.js +0 -1
  93. package/dist/apollo-core/p-2f90296c.js +0 -10
  94. package/dist/apollo-core/p-6081e432.entry.js +0 -1
  95. package/dist/apollo-core/p-612984e5.entry.js +0 -1
  96. package/dist/apollo-core/p-63ea199d.entry.js +0 -1
  97. package/dist/apollo-core/p-650f6416.entry.js +0 -1
  98. package/dist/apollo-core/p-6ad97405.entry.js +0 -1
  99. package/dist/apollo-core/p-9b9511e4.entry.js +0 -1
  100. package/dist/apollo-core/p-ad90fe4d.js +0 -1
  101. package/dist/apollo-core/p-c6fec744.entry.js +0 -1
  102. package/dist/apollo-core/p-ea8e0991.js +0 -1
  103. package/dist/apollo-core/p-ed04cedd.entry.js +0 -1
  104. package/dist/apollo-core/p-eec5a0f1.entry.js +0 -1
  105. package/dist/apollo-core/p-f4f646d9.entry.js +0 -1
  106. package/dist/cjs/apollo-core.cjs.js +0 -19
  107. package/dist/cjs/index-9662f096.js +0 -1541
  108. package/dist/cjs/index.cjs.js +0 -2
  109. package/dist/cjs/loader.cjs.js +0 -21
  110. package/dist/cjs/v4-14140ff3.js +0 -77
  111. package/dist/cjs/xpl-avatar_14.cjs.entry.js +0 -293
  112. package/dist/cjs/xpl-button-row.cjs.entry.js +0 -24
  113. package/dist/cjs/xpl-choicelist.cjs.entry.js +0 -36
  114. package/dist/cjs/xpl-divider.cjs.entry.js +0 -18
  115. package/dist/cjs/xpl-grid-item.cjs.entry.js +0 -25
  116. package/dist/cjs/xpl-grid.cjs.entry.js +0 -35
  117. package/dist/cjs/xpl-input.cjs.entry.js +0 -2527
  118. package/dist/cjs/xpl-list.cjs.entry.js +0 -63
  119. package/dist/cjs/xpl-pagination.cjs.entry.js +0 -76
  120. package/dist/cjs/xpl-select.cjs.entry.js +0 -623
  121. package/dist/cjs/xpl-tag.cjs.entry.js +0 -21
  122. package/dist/cjs/xpl-toggle.cjs.entry.js +0 -34
  123. package/dist/collection/collection-manifest.json +0 -36
  124. package/dist/collection/components/xpl-avatar/xpl-avatar.js +0 -158
  125. package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +0 -7
  126. package/dist/collection/components/xpl-badge/xpl-badge.js +0 -50
  127. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +0 -15
  128. package/dist/collection/components/xpl-button/xpl-button.js +0 -214
  129. package/dist/collection/components/xpl-button-row/xpl-button-row.js +0 -119
  130. package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +0 -185
  131. package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +0 -143
  132. package/dist/collection/components/xpl-content-area/xpl-content-area.js +0 -39
  133. package/dist/collection/components/xpl-divider/xpl-divider.js +0 -30
  134. package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +0 -32
  135. package/dist/collection/components/xpl-grid/xpl-grid.js +0 -26
  136. package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +0 -93
  137. package/dist/collection/components/xpl-input/xpl-input.js +0 -471
  138. package/dist/collection/components/xpl-list/xpl-list.js +0 -93
  139. package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +0 -43
  140. package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +0 -10
  141. package/dist/collection/components/xpl-pagination/xpl-pagination.js +0 -189
  142. package/dist/collection/components/xpl-radio/xpl-radio.js +0 -168
  143. package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +0 -9
  144. package/dist/collection/components/xpl-select/xpl-select.js +0 -311
  145. package/dist/collection/components/xpl-table/xpl-table.js +0 -194
  146. package/dist/collection/components/xpl-tag/xpl-tag.js +0 -30
  147. package/dist/collection/components/xpl-toggle/xpl-toggle.js +0 -157
  148. package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +0 -10
  149. package/dist/custom-elements/index.js +0 -19877
  150. package/dist/esm/apollo-core.js +0 -17
  151. package/dist/esm/index-619763f9.js +0 -1512
  152. package/dist/esm/index.js +0 -1
  153. package/dist/esm/loader.js +0 -17
  154. package/dist/esm/polyfills/core-js.js +0 -11
  155. package/dist/esm/polyfills/css-shim.js +0 -1
  156. package/dist/esm/polyfills/dom.js +0 -79
  157. package/dist/esm/polyfills/es5-html-element.js +0 -1
  158. package/dist/esm/polyfills/index.js +0 -34
  159. package/dist/esm/polyfills/system.js +0 -6
  160. package/dist/esm/regular-86225e9d.js +0 -16041
  161. package/dist/esm/v4-929670b7.js +0 -75
  162. package/dist/esm/xpl-avatar_14.entry.js +0 -276
  163. package/dist/index.cjs.js +0 -1
  164. package/dist/index.js +0 -1
  165. package/dist/stories/avatar.stories.js +0 -173
  166. package/dist/stories/backdrop.stories.js +0 -18
  167. package/dist/stories/badge.stories.js +0 -48
  168. package/dist/stories/breadcrumbs.stories.js +0 -115
  169. package/dist/stories/button-row.stories.js +0 -64
  170. package/dist/stories/button.stories.js +0 -98
  171. package/dist/stories/checkbox.stories.js +0 -76
  172. package/dist/stories/choicelist.stories.js +0 -112
  173. package/dist/stories/content-area.stories.js +0 -53
  174. package/dist/stories/divider.stories.js +0 -34
  175. package/dist/stories/grid.stories.js +0 -100
  176. package/dist/stories/input.stories.js +0 -252
  177. package/dist/stories/list.stories.js +0 -134
  178. package/dist/stories/main-nav.stories.js +0 -308
  179. package/dist/stories/pagination.stories.js +0 -84
  180. package/dist/stories/radio.stories.js +0 -66
  181. package/dist/stories/secondary-nav.stories.js +0 -76
  182. package/dist/stories/select.stories.js +0 -111
  183. package/dist/stories/table.stories.js +0 -107
  184. package/dist/stories/tabs.stories.js +0 -24
  185. package/dist/stories/toggle.stories.js +0 -80
  186. package/dist/stories/utility-bar.stories.js +0 -94
@@ -1,6 +1,6 @@
1
- import { r as registerInstance, h, H as Host } from './index-619763f9.js';
2
- import './regular-86225e9d.js';
3
- import { v as v4 } from './v4-929670b7.js';
1
+ import { r as registerInstance, h, e as Host } from './index-3c9f25ef.js';
2
+ import { v as v4 } from './index-912d1a21.js';
3
+ import './regular-133c23b5.js';
4
4
 
5
5
  const HOOKS = [
6
6
  "onChange",
@@ -433,6 +433,12 @@ function compareDates(date1, date2, timeless = true) {
433
433
  }
434
434
  return date1.getTime() - date2.getTime();
435
435
  }
436
+ function compareTimes(date1, date2) {
437
+ return (3600 * (date1.getHours() - date2.getHours()) +
438
+ 60 * (date1.getMinutes() - date2.getMinutes()) +
439
+ date1.getSeconds() -
440
+ date2.getSeconds());
441
+ }
436
442
  const isBetween = (ts, ts1, ts2) => {
437
443
  return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);
438
444
  };
@@ -468,6 +474,7 @@ function getDefaultHours(config) {
468
474
  return { hours, minutes, seconds };
469
475
  }
470
476
 
477
+ "use strict";
471
478
  if (typeof Object.assign !== "function") {
472
479
  Object.assign = function (target, ...args) {
473
480
  if (!target) {
@@ -1570,6 +1577,8 @@ function FlatpickrInstance(element, instanceConfig) {
1570
1577
  self._input.focus();
1571
1578
  }
1572
1579
  break;
1580
+ default:
1581
+ break;
1573
1582
  }
1574
1583
  }
1575
1584
  if (self.amPM !== undefined && eventTarget === self.amPM) {
@@ -1916,6 +1925,12 @@ function FlatpickrInstance(element, instanceConfig) {
1916
1925
  let editableSheet = null;
1917
1926
  for (let i = 0; i < document.styleSheets.length; i++) {
1918
1927
  const sheet = document.styleSheets[i];
1928
+ try {
1929
+ sheet.cssRules;
1930
+ }
1931
+ catch (err) {
1932
+ continue;
1933
+ }
1919
1934
  editableSheet = sheet;
1920
1935
  break;
1921
1936
  }
@@ -2071,6 +2086,8 @@ function FlatpickrInstance(element, instanceConfig) {
2071
2086
  .split(self.l10n.rangeSeparator)
2072
2087
  .map((date) => self.parseDate(date, format));
2073
2088
  break;
2089
+ default:
2090
+ break;
2074
2091
  }
2075
2092
  }
2076
2093
  else
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, h, H as Host, F as Fragment } from './index-619763f9.js';
2
- import './regular-86225e9d.js';
1
+ import { h, F as Fragment, r as registerInstance, e as Host } from './index-3c9f25ef.js';
2
+ import './regular-133c23b5.js';
3
3
 
4
4
  const ListItemCpt = ({ avatar, avatars, badges, href, title, subtext, metadata }) => {
5
5
  const hasRight = avatars || badges || subtext;
@@ -0,0 +1,26 @@
1
+ import { r as registerInstance, f as createEvent, h, e as Host } from './index-3c9f25ef.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 };
@@ -0,0 +1,12 @@
1
+ import { r as registerInstance, h, e as Host } from './index-3c9f25ef.js';
2
+
3
+ const XplNavItem = class {
4
+ constructor(hostRef) {
5
+ registerInstance(this, hostRef);
6
+ }
7
+ render() {
8
+ return (h(Host, { class: "xpl-nav-item", role: "listitem" }, h("slot", { name: "link" }, h("slot", { name: "icon" }), h("slot", null))));
9
+ }
10
+ };
11
+
12
+ export { XplNavItem as xpl_nav_item };
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-619763f9.js';
1
+ import { r as registerInstance, f as createEvent, h, e as Host } from './index-3c9f25ef.js';
2
2
 
3
3
  const XplPagination = class {
4
4
  constructor(hostRef) {
@@ -0,0 +1,25 @@
1
+ import { r as registerInstance, f as createEvent, h, e as Host } from './index-3c9f25ef.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 };
@@ -0,0 +1,12 @@
1
+ import { r as registerInstance, h, e as Host } from './index-3c9f25ef.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 };
@@ -1,5 +1,5 @@
1
- import { h, r as registerInstance, H as Host } from './index-619763f9.js';
2
- import { v as v4 } from './v4-929670b7.js';
1
+ import { h, r as registerInstance, e as Host } from './index-3c9f25ef.js';
2
+ import { v as v4 } from './index-912d1a21.js';
3
3
 
4
4
  /// <reference path="./dropdownchoice.d.ts"></reference>
5
5
  const XplDropdown = ({ active, choices, mode, selected, update, }) => {
@@ -35,6 +35,47 @@ const XplDropdown = ({ active, choices, mode, selected, update, }) => {
35
35
 
36
36
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
37
37
 
38
+ function getDefaultExportFromCjs (x) {
39
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
40
+ }
41
+
42
+ function createCommonjsModule(fn, basedir, module) {
43
+ return module = {
44
+ path: basedir,
45
+ exports: {},
46
+ require: function (path, base) {
47
+ return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
48
+ }
49
+ }, fn(module, module.exports), module.exports;
50
+ }
51
+
52
+ function getDefaultExportFromNamespaceIfPresent (n) {
53
+ return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
54
+ }
55
+
56
+ function getDefaultExportFromNamespaceIfNotNamed (n) {
57
+ return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
58
+ }
59
+
60
+ function getAugmentedNamespace(n) {
61
+ if (n.__esModule) return n;
62
+ var a = Object.defineProperty({}, '__esModule', {value: true});
63
+ Object.keys(n).forEach(function (k) {
64
+ var d = Object.getOwnPropertyDescriptor(n, k);
65
+ Object.defineProperty(a, k, d.get ? d : {
66
+ enumerable: true,
67
+ get: function () {
68
+ return n[k];
69
+ }
70
+ });
71
+ });
72
+ return a;
73
+ }
74
+
75
+ function commonjsRequire () {
76
+ throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
77
+ }
78
+
38
79
  /**
39
80
  * lodash (Custom Build) <https://lodash.com/>
40
81
  * Build: `lodash modularize exports="npm" -o ./`
@@ -0,0 +1,85 @@
1
+ import { r as registerInstance, f as createEvent, h, e as Host } from './index-3c9f25ef.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 !== undefined ? 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,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-619763f9.js';
1
+ import { r as registerInstance, f as createEvent, h, e as Host } from './index-3c9f25ef.js';
2
2
 
3
3
  const XplTag = class {
4
4
  constructor(hostRef) {
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, h, H as Host } from './index-619763f9.js';
2
- import { v as v4 } from './v4-929670b7.js';
1
+ import { r as registerInstance, h, e as Host } from './index-3c9f25ef.js';
2
+ import { v as v4 } from './index-912d1a21.js';
3
3
 
4
4
  const XplToggle = class {
5
5
  constructor(hostRef) {
@@ -0,0 +1,25 @@
1
+ import { r as registerInstance, f as createEvent, h, e as Host } from './index-3c9f25ef.js';
2
+
3
+ const XplUtilityBar = class {
4
+ constructor(hostRef) {
5
+ registerInstance(this, hostRef);
6
+ this.navOpen = createEvent(this, "navOpen", 7);
7
+ this.open = true;
8
+ this.bars = `
9
+ <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="bars" class="svg-inline--fa fa-bars fa-w-14 xpl-utility-nav__bars" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"></path></svg>
10
+ `;
11
+ }
12
+ onNavToggle() {
13
+ this.open = !this.open;
14
+ this.navOpen.emit(this.open);
15
+ }
16
+ render() {
17
+ return (h(Host, null, h("nav", { "aria-label": "utility navigation bar", class: "xpl-utility-bar" }, this.navControl
18
+ ?
19
+ h("div", null, h("button", { onClick: () => this.onNavToggle(), innerHTML: `${this.bars}` }), h("slot", { name: "aside" }))
20
+ :
21
+ h("slot", { name: "aside" }), h("slot", { name: "main" }))));
22
+ }
23
+ };
24
+
25
+ export { XplUtilityBar as xpl_utility_bar };
@@ -2,6 +2,12 @@
2
2
 
3
3
  import type { Components, JSX } from "../types/components";
4
4
 
5
+ interface XplApplicationShell extends Components.XplApplicationShell, HTMLElement {}
6
+ export const XplApplicationShell: {
7
+ prototype: XplApplicationShell;
8
+ new (): XplApplicationShell;
9
+ };
10
+
5
11
  interface XplAvatar extends Components.XplAvatar, HTMLElement {}
6
12
  export const XplAvatar: {
7
13
  prototype: XplAvatar;
@@ -0,0 +1,62 @@
1
+ declare const _default: {
2
+ title: string;
3
+ argTypes: {
4
+ navWidth: {
5
+ options: string[];
6
+ control: {
7
+ type: string;
8
+ };
9
+ };
10
+ showSecondaryNav: {
11
+ control: {
12
+ type: string;
13
+ };
14
+ };
15
+ showUtilityBar: {
16
+ control: {
17
+ type: string;
18
+ };
19
+ };
20
+ contentSize: {
21
+ options: string[];
22
+ control: {
23
+ type: string;
24
+ };
25
+ };
26
+ };
27
+ };
28
+ export default _default;
29
+ interface ApplicationShellProps {
30
+ navWidth: string;
31
+ showSecondaryNav: boolean;
32
+ showUtilityBar: boolean;
33
+ contentSize: string;
34
+ }
35
+ export declare const ApplicationShell: {
36
+ ({ navWidth, showSecondaryNav, showUtilityBar, contentSize }: ApplicationShellProps): string;
37
+ parameters: {
38
+ layout: string;
39
+ "web-component": {
40
+ render: ({ navWidth, showSecondaryNav, showUtilityBar, contentSize }: {
41
+ navWidth: any;
42
+ showSecondaryNav: any;
43
+ showUtilityBar: any;
44
+ contentSize: any;
45
+ }) => string;
46
+ };
47
+ html: {
48
+ render: ({ navWidth, showSecondaryNav, showUtilityBar, contentSize }: {
49
+ navWidth: any;
50
+ showSecondaryNav: any;
51
+ showUtilityBar: any;
52
+ contentSize: any;
53
+ }) => string;
54
+ };
55
+ };
56
+ args: {
57
+ navWidth: string;
58
+ showUtilityBar: boolean;
59
+ showSecondaryNav: boolean;
60
+ contentSize: string;
61
+ };
62
+ };
@@ -0,0 +1,24 @@
1
+ export declare class XplApplicationShell {
2
+ private closeNavOnMobile;
3
+ /**
4
+ * @property {boolean} - Whether or not the Grid should have space for a secondary (sub) navigation bar
5
+ */
6
+ withSubnav: boolean;
7
+ /**
8
+ * @property {boolean} - Whether or not the Grid should have space for a utility bar
9
+ */
10
+ withUtility: boolean;
11
+ /**
12
+ * @property {string} - The width of the main navigation bar, can be passed or updated when nav-width event is emitted.
13
+ */
14
+ navWidth: string;
15
+ /**
16
+ * @state {boolean} - Whether or not the main nav is open, updates when the nav-open envent is emitted.
17
+ */
18
+ navOpen: boolean;
19
+ navToggleHandler(): void;
20
+ navWithHandler(event: any): void;
21
+ onWindowResize(): void;
22
+ connectedCallback(): void;
23
+ render(): any;
24
+ }
@@ -1,3 +1,8 @@
1
1
  export declare class XplBackdrop {
2
+ /**
3
+ * @property {boolean} - When true, backdrop will have relative position. This is useful when the backdrop doesn't cover the whole view area.
4
+ * If false, the position will be fixed and cover the whole view area.
5
+ */
6
+ relative: boolean;
2
7
  render(): any;
3
8
  }
@@ -1,7 +1,16 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
1
2
  export declare class XplMainNav {
2
3
  /**
3
4
  * @property {string} width - The width of the Main Nav.
4
5
  */
5
6
  width: "default" | "md" | "sm";
7
+ /**
8
+ * @event {string} navWidth - Emits the `nav-width` prop set by the user
9
+ * when the component is attached to the DOM and when the component is updated.
10
+ */
11
+ navWidth: EventEmitter<string>;
12
+ private navWidthHandler;
13
+ connectedCallback(): void;
14
+ componentDidUpdate(): void;
6
15
  render(): any;
7
16
  }
@@ -1,3 +1,15 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
1
2
  export declare class XplUtilityBar {
3
+ /**
4
+ * @event {boolean} - Emits the desired state of the navigation bar (open: true/false)
5
+ */
6
+ navOpen: EventEmitter<boolean>;
7
+ /**
8
+ * @property {boolean} - whether or not to show the bars to control the state of the navigation bar (open/close)
9
+ */
10
+ navControl?: boolean;
11
+ open: boolean;
12
+ private onNavToggle;
13
+ private bars;
2
14
  render(): any;
3
15
  }