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

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 (158) hide show
  1. package/build/style.css +10 -10
  2. package/dist/apollo-core/apollo-core.css +5841 -9
  3. package/dist/apollo-core/apollo-core.esm.js +125 -1
  4. package/dist/apollo-core/app-globals-0f993ce5.js +3 -0
  5. package/dist/apollo-core/css-shim-bbdf0cc6.js +4 -0
  6. package/dist/apollo-core/dom-1f98a75f.js +73 -0
  7. package/dist/apollo-core/index-5b4a209e.js +2938 -0
  8. package/dist/apollo-core/index-912d1a21.js +584 -0
  9. package/dist/apollo-core/index.esm.js +1 -0
  10. package/dist/apollo-core/p-25f84d39.entry.js +1 -0
  11. package/dist/apollo-core/{p-13e7d3ea.entry.js → p-50eb8239.entry.js} +1 -1
  12. package/dist/apollo-core/regular-133c23b5.js +16052 -0
  13. package/dist/apollo-core/shadow-css-67b66845.js +389 -0
  14. package/dist/apollo-core/xpl-application-shell.entry.js +60 -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/apollo-core/xpl-breadcrumb-item.entry.js +17 -0
  19. package/dist/apollo-core/xpl-breadcrumbs.entry.js +12 -0
  20. package/dist/apollo-core/xpl-button-row.entry.js +18 -0
  21. package/dist/apollo-core/xpl-button.entry.js +60 -0
  22. package/dist/apollo-core/xpl-checkbox.entry.js +25 -0
  23. package/dist/apollo-core/xpl-choicelist.entry.js +39 -0
  24. package/dist/apollo-core/xpl-content-area.entry.js +16 -0
  25. package/dist/apollo-core/xpl-divider.entry.js +14 -0
  26. package/dist/apollo-core/xpl-dropdown-group.entry.js +31 -0
  27. package/dist/apollo-core/xpl-dropdown-heading.entry.js +12 -0
  28. package/dist/apollo-core/xpl-dropdown-option.entry.js +61 -0
  29. package/dist/apollo-core/xpl-dropdown.entry.js +104 -0
  30. package/dist/apollo-core/xpl-grid-item.entry.js +21 -0
  31. package/dist/apollo-core/xpl-grid.entry.js +31 -0
  32. package/dist/apollo-core/xpl-input.entry.js +2547 -0
  33. package/dist/apollo-core/xpl-list.entry.js +57 -0
  34. package/dist/apollo-core/xpl-main-nav.entry.js +26 -0
  35. package/dist/apollo-core/xpl-nav-item.entry.js +26 -0
  36. package/dist/apollo-core/xpl-pagination.entry.js +72 -0
  37. package/dist/apollo-core/xpl-radio.entry.js +25 -0
  38. package/dist/apollo-core/xpl-secondary-nav.entry.js +12 -0
  39. package/dist/apollo-core/xpl-select.entry.js +662 -0
  40. package/dist/apollo-core/xpl-table.entry.js +91 -0
  41. package/dist/apollo-core/xpl-tag.entry.js +17 -0
  42. package/dist/apollo-core/xpl-toggle.entry.js +30 -0
  43. package/dist/apollo-core/xpl-utility-bar.entry.js +27 -0
  44. package/dist/cjs/apollo-core.cjs.js +112 -4
  45. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  46. package/dist/cjs/css-shim-a7379e2b.js +6 -0
  47. package/dist/cjs/dom-3e7d9c3b.js +75 -0
  48. package/dist/cjs/index-318d5fc7.js +586 -0
  49. package/dist/cjs/index-88e58962.js +2975 -0
  50. package/dist/cjs/index.cjs.js +1 -0
  51. package/dist/cjs/loader.cjs.js +18 -2
  52. package/dist/cjs/regular-503465f4.js +16054 -0
  53. package/dist/cjs/shadow-css-09555044.js +391 -0
  54. package/dist/cjs/xpl-application-shell.cjs.entry.js +8 -2
  55. package/dist/cjs/xpl-avatar.cjs.entry.js +23 -0
  56. package/dist/cjs/xpl-avatar_12.cjs.entry.js +6 -0
  57. package/dist/cjs/xpl-backdrop.cjs.entry.js +1 -1
  58. package/dist/cjs/xpl-badge.cjs.entry.js +21 -0
  59. package/dist/cjs/xpl-breadcrumb-item.cjs.entry.js +21 -0
  60. package/dist/cjs/xpl-breadcrumbs.cjs.entry.js +16 -0
  61. package/dist/cjs/xpl-button-row.cjs.entry.js +1 -1
  62. package/dist/cjs/xpl-button.cjs.entry.js +64 -0
  63. package/dist/cjs/xpl-checkbox.cjs.entry.js +29 -0
  64. package/dist/cjs/xpl-choicelist.cjs.entry.js +1 -1
  65. package/dist/cjs/xpl-content-area.cjs.entry.js +20 -0
  66. package/dist/cjs/xpl-divider.cjs.entry.js +1 -1
  67. package/dist/cjs/xpl-dropdown-group.cjs.entry.js +35 -0
  68. package/dist/cjs/xpl-dropdown-heading.cjs.entry.js +16 -0
  69. package/dist/cjs/xpl-dropdown-option.cjs.entry.js +65 -0
  70. package/dist/cjs/xpl-dropdown.cjs.entry.js +108 -0
  71. package/dist/cjs/xpl-grid-item.cjs.entry.js +1 -1
  72. package/dist/cjs/xpl-grid.cjs.entry.js +1 -1
  73. package/dist/cjs/xpl-input.cjs.entry.js +21 -4
  74. package/dist/cjs/xpl-list.cjs.entry.js +2 -2
  75. package/dist/cjs/xpl-main-nav.cjs.entry.js +1 -1
  76. package/dist/cjs/xpl-nav-item.cjs.entry.js +30 -0
  77. package/dist/cjs/xpl-pagination.cjs.entry.js +1 -1
  78. package/dist/cjs/xpl-radio.cjs.entry.js +29 -0
  79. package/dist/cjs/xpl-secondary-nav.cjs.entry.js +16 -0
  80. package/dist/cjs/xpl-select.cjs.entry.js +44 -3
  81. package/dist/cjs/xpl-table.cjs.entry.js +95 -0
  82. package/dist/cjs/xpl-tag.cjs.entry.js +21 -0
  83. package/dist/cjs/xpl-toggle.cjs.entry.js +3 -3
  84. package/dist/cjs/xpl-utility-bar.cjs.entry.js +31 -0
  85. package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +31 -2
  86. package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +27 -1
  87. package/dist/custom-elements/index.js +599 -4
  88. package/dist/esm/apollo-core.js +112 -4
  89. package/dist/esm/app-globals-0f993ce5.js +3 -0
  90. package/dist/esm/css-shim-bbdf0cc6.js +4 -0
  91. package/dist/esm/dom-1f98a75f.js +73 -0
  92. package/dist/esm/index-5b4a209e.js +2938 -0
  93. package/dist/esm/index-912d1a21.js +584 -0
  94. package/dist/esm/index.js +1 -1
  95. package/dist/esm/loader.js +18 -2
  96. package/dist/esm/regular-133c23b5.js +16052 -0
  97. package/dist/esm/shadow-css-67b66845.js +389 -0
  98. package/dist/esm/xpl-application-shell.entry.js +8 -2
  99. package/dist/esm/xpl-avatar.entry.js +19 -0
  100. package/dist/esm/xpl-avatar_12.entry.js +6 -0
  101. package/dist/esm/xpl-backdrop.entry.js +1 -1
  102. package/dist/esm/xpl-badge.entry.js +17 -0
  103. package/dist/esm/xpl-breadcrumb-item.entry.js +17 -0
  104. package/dist/esm/xpl-breadcrumbs.entry.js +12 -0
  105. package/dist/esm/xpl-button-row.entry.js +1 -1
  106. package/dist/esm/xpl-button.entry.js +60 -0
  107. package/dist/esm/xpl-checkbox.entry.js +25 -0
  108. package/dist/esm/xpl-choicelist.entry.js +1 -1
  109. package/dist/esm/xpl-content-area.entry.js +16 -0
  110. package/dist/esm/xpl-divider.entry.js +1 -1
  111. package/dist/esm/xpl-dropdown-group.entry.js +31 -0
  112. package/dist/esm/xpl-dropdown-heading.entry.js +12 -0
  113. package/dist/esm/xpl-dropdown-option.entry.js +61 -0
  114. package/dist/esm/xpl-dropdown.entry.js +104 -0
  115. package/dist/esm/xpl-grid-item.entry.js +1 -1
  116. package/dist/esm/xpl-grid.entry.js +1 -1
  117. package/dist/esm/xpl-input.entry.js +20 -3
  118. package/dist/esm/xpl-list.entry.js +2 -2
  119. package/dist/esm/xpl-main-nav.entry.js +1 -1
  120. package/dist/esm/xpl-nav-item.entry.js +26 -0
  121. package/dist/esm/xpl-pagination.entry.js +1 -1
  122. package/dist/esm/xpl-radio.entry.js +25 -0
  123. package/dist/esm/xpl-secondary-nav.entry.js +12 -0
  124. package/dist/esm/xpl-select.entry.js +43 -2
  125. package/dist/esm/xpl-table.entry.js +91 -0
  126. package/dist/esm/xpl-tag.entry.js +17 -0
  127. package/dist/esm/xpl-toggle.entry.js +2 -2
  128. package/dist/esm/xpl-utility-bar.entry.js +27 -0
  129. package/dist/stories/application-shell.stories.js +17 -8
  130. package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/application-shell.stories.d.ts +14 -5
  131. package/dist/types/components/xpl-application-shell/xpl-application-shell.d.ts +6 -1
  132. package/dist/types/components/xpl-utility-bar/xpl-utility-bar.d.ts +5 -0
  133. package/dist/types/components.d.ts +18 -0
  134. package/package.json +1 -1
  135. package/dist/apollo-core/p-97bdb450.entry.js +0 -1
  136. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/avatar.stories.d.ts +0 -0
  137. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/backdrop.stories.d.ts +0 -0
  138. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/badge.stories.d.ts +0 -0
  139. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/breadcrumbs.stories.d.ts +0 -0
  140. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/button-row.stories.d.ts +0 -0
  141. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/button.stories.d.ts +0 -0
  142. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/checkbox.stories.d.ts +0 -0
  143. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/choicelist.stories.d.ts +0 -0
  144. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/content-area.stories.d.ts +0 -0
  145. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/divider.stories.d.ts +0 -0
  146. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/dropdown.stories.d.ts +0 -0
  147. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/grid.stories.d.ts +0 -0
  148. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/input.stories.d.ts +0 -0
  149. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/list.stories.d.ts +0 -0
  150. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/main-nav.stories.d.ts +0 -0
  151. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/pagination.stories.d.ts +0 -0
  152. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/radio.stories.d.ts +0 -0
  153. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/secondary-nav.stories.d.ts +0 -0
  154. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/select.stories.d.ts +0 -0
  155. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/table.stories.d.ts +0 -0
  156. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/tabs.stories.d.ts +0 -0
  157. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/toggle.stories.d.ts +0 -0
  158. /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/utility-bar.stories.d.ts +0 -0
@@ -0,0 +1,12 @@
1
+ import { r as registerInstance, h, e as Host } from './index-5b4a209e.js';
2
+
3
+ const XplDropdownHeading = class {
4
+ constructor(hostRef) {
5
+ registerInstance(this, hostRef);
6
+ }
7
+ render() {
8
+ return (h(Host, { class: { 'xpl-dropdown-heading': true }, role: "presentation" }, h("span", null, this.label || h("slot", { name: "heading" }))));
9
+ }
10
+ };
11
+
12
+ export { XplDropdownHeading as xpl_dropdown_heading };
@@ -0,0 +1,61 @@
1
+ import { r as registerInstance, h, e as Host, g as getElement } from './index-5b4a209e.js';
2
+
3
+ const XplDropdownOption = class {
4
+ constructor(hostRef) {
5
+ registerInstance(this, hostRef);
6
+ }
7
+ componentWillLoad() {
8
+ this.dropdown = this.hostElement.closest('xpl-dropdown');
9
+ }
10
+ handleClick(ev) {
11
+ const { closeOnSelect, mode } = this.dropdown;
12
+ if (Boolean(ev.x && ev.y)) {
13
+ this.dropdown.handleSelect(ev, { component: this });
14
+ if (mode === 'single' && closeOnSelect)
15
+ this.dropdown.isOpen = false;
16
+ }
17
+ }
18
+ handleKeyup(ev) {
19
+ const { dropdown } = this;
20
+ const navigationKeys = [
21
+ 'ArrowDown',
22
+ 'ArrowLeft',
23
+ 'ArrowRight',
24
+ 'ArrowUp',
25
+ 'Tab',
26
+ ];
27
+ const { closeOnSelect, mode, selectOnFocus } = this.dropdown;
28
+ if (selectOnFocus && navigationKeys.includes(ev.key)) {
29
+ const hostElement = document.activeElement.closest('xpl-dropdown-option');
30
+ dropdown.handleSelect(ev, { component: { hostElement } });
31
+ if (mode === 'single' && closeOnSelect)
32
+ this.dropdown.isOpen = false;
33
+ return;
34
+ }
35
+ const selectionKeys = ['Escape', 'Enter'];
36
+ if (selectionKeys.includes(ev.key)) {
37
+ dropdown.handleSelect(ev, { component: this });
38
+ if (this.dropdown.closeOnSelect)
39
+ this.dropdown.isOpen = false;
40
+ }
41
+ }
42
+ connectedCallback() {
43
+ this.hostElement.addEventListener('click', this.handleClick.bind(this));
44
+ this.hostElement.addEventListener('keyup', this.handleKeyup.bind(this));
45
+ }
46
+ disconnectedCallback() {
47
+ this.hostElement.removeEventListener('click', this.handleClick);
48
+ this.hostElement.removeEventListener('keyup', this.handleKeyup);
49
+ }
50
+ render() {
51
+ const { label, isSelected, isDisabled } = this;
52
+ return (h(Host, { class: {
53
+ 'xpl-dropdown-option': true,
54
+ 'xpl-dropdown-option--disabled': isDisabled,
55
+ 'xpl-dropdown-option--selected': isSelected,
56
+ }, role: "option", "aria-checked": isSelected, "aria-disabled": isDisabled, "aria-selected": isSelected }, h("li", { class: "xpl-dropdown-list-item" }, label || h("slot", { name: "option" }))));
57
+ }
58
+ get hostElement() { return getElement(this); }
59
+ };
60
+
61
+ export { XplDropdownOption as xpl_dropdown_option };
@@ -0,0 +1,104 @@
1
+ import { r as registerInstance, h, e as Host, g as getElement } from './index-5b4a209e.js';
2
+
3
+ var __rest = (undefined && undefined.__rest) || function (s, e) {
4
+ var t = {};
5
+ for (var p in s)
6
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
7
+ t[p] = s[p];
8
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
9
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
10
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
11
+ t[p[i]] = s[p[i]];
12
+ }
13
+ return t;
14
+ };
15
+ const XplDropdown = class {
16
+ constructor(hostRef) {
17
+ registerInstance(this, hostRef);
18
+ /** text to display as heading */
19
+ // eslint-disable-next-line @stencil/strict-mutable
20
+ this.isOpen = false;
21
+ /** options that are listed */
22
+ this.closeOnSelect = true;
23
+ /** constant representing number of options that can be selected */
24
+ this.mode = 'single';
25
+ /** whether selection should be made when focusing on interactable element */
26
+ this.selectOnFocus = false;
27
+ this.handleClickOutside = ({ target }) => {
28
+ const { triggerId } = this;
29
+ const isTrigger = triggerId && target.id === triggerId;
30
+ const isInside = this.hostElement.contains(target);
31
+ if (!isInside && !isTrigger)
32
+ this.isOpen = false;
33
+ };
34
+ }
35
+ /**
36
+ * called on dropdown option click and keydown events to update isSelected states
37
+ */
38
+ async handleSelect(e, { component }) {
39
+ const { hostElement, mode, options, update } = this;
40
+ const isSingle = mode === 'single';
41
+ const isMulti = mode === 'multi';
42
+ if (Boolean(options)) {
43
+ options
44
+ .reduce((acc, curr) => [
45
+ ...acc,
46
+ ...(curr.groupName ? curr.options : [curr]),
47
+ ], [])
48
+ .forEach((option) => {
49
+ const isMatch = option.label === component.hostElement.label;
50
+ if (isSingle) {
51
+ option.isSelected = isMatch;
52
+ component.hostElement.isSelected = option.isSelected;
53
+ }
54
+ else if (isMulti && isMatch) {
55
+ option.isSelected = !option.isSelected;
56
+ component.hostElement.isSelected = option.isSelected;
57
+ }
58
+ });
59
+ const mapOptions = (option) => {
60
+ option.options = option.groupName
61
+ ? option.options.map(mapOptions)
62
+ : undefined;
63
+ return option;
64
+ };
65
+ this.options = options.map(mapOptions);
66
+ }
67
+ else if (isSingle) {
68
+ const optionNodes = Array.from(hostElement.querySelectorAll('xpl-dropdown-option'));
69
+ optionNodes.forEach((node) => (node.isSelected = node === component.hostElement));
70
+ }
71
+ else if (isMulti) {
72
+ component.isSelected = !component.isSelected;
73
+ }
74
+ if (Boolean(update))
75
+ update(e, { component: this });
76
+ }
77
+ componentWillLoad() {
78
+ this.handleSelect = this.handleSelect.bind(this);
79
+ }
80
+ connectedCallback() {
81
+ document.addEventListener('mousedown', this.handleClickOutside.bind(this));
82
+ }
83
+ disconnectedCallback() {
84
+ document.removeEventListener('mousedown', this.handleClickOutside);
85
+ }
86
+ render() {
87
+ let { isOpen } = this;
88
+ const { mode, options } = this;
89
+ const hasOptions = options && options.length;
90
+ const mappedOptions = hasOptions &&
91
+ options.map((_a) => {
92
+ var { groupName, options } = _a, properties = __rest(_a, ["groupName", "options"]);
93
+ return groupName ? (h("xpl-dropdown-group", Object.assign({ groupName: groupName, options: options }, properties))) : (h("xpl-dropdown-option", Object.assign({}, properties)));
94
+ });
95
+ return (h(Host, { "aria-expanded": isOpen, class: {
96
+ 'xpl-dropdown': true,
97
+ 'xpl-dropdown--multi': mode === 'multi',
98
+ 'xpl-dropdown--open': isOpen,
99
+ }, role: "listbox" }, h("ul", { class: "xpl-dropdown-list" }, mappedOptions || h("slot", { name: "options" }))));
100
+ }
101
+ get hostElement() { return getElement(this); }
102
+ };
103
+
104
+ export { XplDropdown as xpl_dropdown };
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, H as Host } from './index-e3c4bb97.js';
1
+ import { r as registerInstance, h, e as Host } from './index-5b4a209e.js';
2
2
 
3
3
  const XplGridItem = class {
4
4
  constructor(hostRef) {
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, g as getElement, H as Host } from './index-e3c4bb97.js';
1
+ import { r as registerInstance, h, e as Host, g as getElement } from './index-5b4a209e.js';
2
2
 
3
3
  const XplGrid = class {
4
4
  constructor(hostRef) {
@@ -1,6 +1,6 @@
1
- import { r as registerInstance, h, H as Host } from './index-e3c4bb97.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-5b4a209e.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-e3c4bb97.js';
2
- import './regular-86225e9d.js';
1
+ import { h, F as Fragment, r as registerInstance, e as Host } from './index-5b4a209e.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;
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-e3c4bb97.js';
1
+ import { r as registerInstance, f as createEvent, h, e as Host } from './index-5b4a209e.js';
2
2
 
3
3
  const XplMainNav = class {
4
4
  constructor(hostRef) {
@@ -0,0 +1,26 @@
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,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-e3c4bb97.js';
1
+ import { r as registerInstance, f as createEvent, h, e as Host } from './index-5b4a209e.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-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 };
@@ -0,0 +1,12 @@
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 };
@@ -1,8 +1,49 @@
1
- import { r as registerInstance, h, H as Host } from './index-e3c4bb97.js';
2
- import { v as v4 } from './v4-929670b7.js';
1
+ import { r as registerInstance, h, e as Host } from './index-5b4a209e.js';
2
+ import { v as v4 } from './index-912d1a21.js';
3
3
 
4
4
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
5
5
 
6
+ function getDefaultExportFromCjs (x) {
7
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
8
+ }
9
+
10
+ function createCommonjsModule(fn, basedir, module) {
11
+ return module = {
12
+ path: basedir,
13
+ exports: {},
14
+ require: function (path, base) {
15
+ return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
16
+ }
17
+ }, fn(module, module.exports), module.exports;
18
+ }
19
+
20
+ function getDefaultExportFromNamespaceIfPresent (n) {
21
+ return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
22
+ }
23
+
24
+ function getDefaultExportFromNamespaceIfNotNamed (n) {
25
+ return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
26
+ }
27
+
28
+ function getAugmentedNamespace(n) {
29
+ if (n.__esModule) return n;
30
+ var a = Object.defineProperty({}, '__esModule', {value: true});
31
+ Object.keys(n).forEach(function (k) {
32
+ var d = Object.getOwnPropertyDescriptor(n, k);
33
+ Object.defineProperty(a, k, d.get ? d : {
34
+ enumerable: true,
35
+ get: function () {
36
+ return n[k];
37
+ }
38
+ });
39
+ });
40
+ return a;
41
+ }
42
+
43
+ function commonjsRequire () {
44
+ throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
45
+ }
46
+
6
47
  /**
7
48
  * lodash (Custom Build) <https://lodash.com/>
8
49
  * Build: `lodash modularize exports="npm" -o ./`
@@ -0,0 +1,91 @@
1
+ import { r as registerInstance, f as createEvent, h, e as Host } from './index-5b4a209e.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
72
+ .areAllSelected &&
73
+ this.selected.some((a) => a), onChange: (e) => {
74
+ this.selectAll(e);
75
+ }, type: "checkbox" }), column)) : (column)));
76
+ }))), h("tbody", null, this.rowData.map((row, rowNum) => {
77
+ return (h("tr", { class: this.selected &&
78
+ this.selected[rowNum]
79
+ ? 'xpl-table-row-selected'
80
+ : '' }, row.map((cell, i) => {
81
+ return (h("td", null, this.multiselect &&
82
+ i === 0 ? (h("label", { htmlFor: '__xpl-table-row-' +
83
+ rowNum }, h("input", { id: '__xpl-table-row-' +
84
+ rowNum, checked: this
85
+ .selected[rowNum], type: "checkbox", onChange: (e) => this.selectOne(e, rowNum) }), h("div", { innerHTML: cell }))) : (h("div", { innerHTML: cell }))));
86
+ })));
87
+ }))))));
88
+ }
89
+ };
90
+
91
+ export { XplTable as xpl_table };
@@ -0,0 +1,17 @@
1
+ import { r as registerInstance, f as createEvent, h, e as Host } from './index-5b4a209e.js';
2
+
3
+ const XplTag = class {
4
+ constructor(hostRef) {
5
+ registerInstance(this, hostRef);
6
+ this.close = createEvent(this, "close", 7);
7
+ }
8
+ render() {
9
+ return (h(Host, { class: "xpl-tag-container" }, h("button", { class: "xpl-tag", onClick: () => {
10
+ this.close.emit();
11
+ } }, h("slot", null)), h("button", { class: "xpl-tag__close", onClick: () => {
12
+ this.close.emit();
13
+ } }, "\u00D7")));
14
+ }
15
+ };
16
+
17
+ export { XplTag as xpl_tag };
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, h, H as Host } from './index-e3c4bb97.js';
2
- import { v as v4 } from './v4-929670b7.js';
1
+ import { r as registerInstance, h, e as Host } from './index-5b4a209e.js';
2
+ import { v as v4 } from './index-912d1a21.js';
3
3
 
4
4
  const XplToggle = class {
5
5
  constructor(hostRef) {
@@ -0,0 +1,27 @@
1
+ import { r as registerInstance, f as createEvent, h, e as Host } from './index-5b4a209e.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
+ componentWillLoad() {
17
+ this.open =
18
+ this.isNavOpenAtStartup !== undefined
19
+ ? this.isNavOpenAtStartup
20
+ : this.open;
21
+ }
22
+ render() {
23
+ return (h(Host, null, h("nav", { "aria-label": "utility navigation bar", class: "xpl-utility-bar" }, this.navControl ? (h("div", null, h("button", { class: "xpl-utility-bar__nav-control", onClick: () => this.onNavToggle(), innerHTML: `${this.bars}` }), h("slot", { name: "aside" }))) : (h("slot", { name: "aside" })), h("slot", { name: "main" }))));
24
+ }
25
+ };
26
+
27
+ export { XplUtilityBar as xpl_utility_bar };
@@ -23,11 +23,17 @@ export default {
23
23
  type: 'select',
24
24
  },
25
25
  },
26
+ isNavOpenAtStartup: {
27
+ options: [true, false],
28
+ control: {
29
+ type: 'boolean',
30
+ },
31
+ },
26
32
  },
27
33
  };
28
34
  const renderBlock = (showBlock, block) => showBlock ? block : '';
29
- const utilityBar = `
30
- <xpl-utility-bar slot="utility" nav-control>
35
+ const utilityBar = (isNavOpenAtStartup) => `
36
+ <xpl-utility-bar slot="utility" nav-control is-nav-open-at-startup=${isNavOpenAtStartup}>
31
37
  <xpl-breadcrumbs slot="aside">
32
38
  <xpl-breadcrumb-item>
33
39
  <a href="javascript:;">Locations</a>
@@ -82,10 +88,11 @@ const secondaryNav = `
82
88
  </ul>
83
89
  </xpl-secondary-nav>
84
90
  `;
85
- export const ApplicationShell = ({ navWidth, showSecondaryNav, showUtilityBar, contentSize, }) => {
91
+ export const ApplicationShell = ({ contentSize, isNavOpenAtStartup, navWidth, showSecondaryNav, showUtilityBar, }) => {
86
92
  return `
87
93
  <xpl-application-shell
88
94
  ${showSecondaryNav ? 'with-subnav' : ''}
95
+ is-nav-open-at-startup=${isNavOpenAtStartup}
89
96
  >
90
97
  <xpl-main-nav slot="nav" width="${navWidth}">
91
98
  <svg
@@ -223,7 +230,7 @@ export const ApplicationShell = ({ navWidth, showSecondaryNav, showUtilityBar, c
223
230
  </xpl-nav-item>
224
231
  </ul>
225
232
  </xpl-main-nav>
226
- ${renderBlock(showUtilityBar, utilityBar)}
233
+ ${renderBlock(showUtilityBar, utilityBar(isNavOpenAtStartup))}
227
234
  ${renderBlock(showSecondaryNav, secondaryNav)}
228
235
  <xpl-content-area slot="content" size="${contentSize}">
229
236
  <div>
@@ -338,10 +345,10 @@ export const ApplicationShell = ({ navWidth, showSecondaryNav, showUtilityBar, c
338
345
  ApplicationShell.parameters = {
339
346
  layout: 'fullscreen',
340
347
  'web-component': {
341
- render: ({ navWidth, showSecondaryNav, showUtilityBar, contentSize, }) => {
348
+ render: ({ navWidth, showSecondaryNav, showUtilityBar, contentSize, isNavOpenAtStartup, }) => {
342
349
  const renderBlock = (showBlock, block) => showBlock ? block : '';
343
350
  const utilityBar = `
344
- <xpl-utility-bar slot="utility" nav-control>
351
+ <xpl-utility-bar slot="utility" nav-control is-nav-open-at-startup=${isNavOpenAtStartup}>
345
352
  <xpl-breadcrumbs slot="aside">
346
353
  <xpl-breadcrumb-item>
347
354
  <a href="javascript:;">Locations</a>
@@ -398,6 +405,7 @@ ApplicationShell.parameters = {
398
405
  return `
399
406
  <xpl-application-shell
400
407
  ${showSecondaryNav ? 'with-subnav' : ''}
408
+ is-nav-open-at-startup=${isNavOpenAtStartup}
401
409
  >
402
410
  <xpl-main-nav slot="nav" width="${navWidth}">
403
411
  <svg
@@ -760,8 +768,9 @@ ApplicationShell.parameters = {
760
768
  },
761
769
  };
762
770
  ApplicationShell.args = {
771
+ contentSize: 'wide',
772
+ isNavOpenAtStartup: true,
763
773
  navWidth: 'default',
764
- showUtilityBar: true,
765
774
  showSecondaryNav: true,
766
- contentSize: 'wide',
775
+ showUtilityBar: true,
767
776
  };
@@ -23,25 +23,33 @@ declare const _default: {
23
23
  type: string;
24
24
  };
25
25
  };
26
+ isNavOpenAtStartup: {
27
+ options: boolean[];
28
+ control: {
29
+ type: string;
30
+ };
31
+ };
26
32
  };
27
33
  };
28
34
  export default _default;
29
35
  interface ApplicationShellProps {
36
+ contentSize: string;
37
+ isNavOpenAtStartup: boolean;
30
38
  navWidth: string;
31
39
  showSecondaryNav: boolean;
32
40
  showUtilityBar: boolean;
33
- contentSize: string;
34
41
  }
35
42
  export declare const ApplicationShell: {
36
- ({ navWidth, showSecondaryNav, showUtilityBar, contentSize, }: ApplicationShellProps): string;
43
+ ({ contentSize, isNavOpenAtStartup, navWidth, showSecondaryNav, showUtilityBar, }: ApplicationShellProps): string;
37
44
  parameters: {
38
45
  layout: string;
39
46
  'web-component': {
40
- render: ({ navWidth, showSecondaryNav, showUtilityBar, contentSize, }: {
47
+ render: ({ navWidth, showSecondaryNav, showUtilityBar, contentSize, isNavOpenAtStartup, }: {
41
48
  navWidth: any;
42
49
  showSecondaryNav: any;
43
50
  showUtilityBar: any;
44
51
  contentSize: any;
52
+ isNavOpenAtStartup: any;
45
53
  }) => string;
46
54
  };
47
55
  html: {
@@ -54,9 +62,10 @@ export declare const ApplicationShell: {
54
62
  };
55
63
  };
56
64
  args: {
65
+ contentSize: string;
66
+ isNavOpenAtStartup: boolean;
57
67
  navWidth: string;
58
- showUtilityBar: boolean;
59
68
  showSecondaryNav: boolean;
60
- contentSize: string;
69
+ showUtilityBar: boolean;
61
70
  };
62
71
  };