@xplortech/apollo-core 0.5.2 → 0.5.3

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 (173) hide show
  1. package/dist/apollo-core/apollo-core.css +5468 -9
  2. package/dist/apollo-core/apollo-core.esm.js +125 -1
  3. package/dist/apollo-core/app-globals-0f993ce5.js +3 -0
  4. package/dist/apollo-core/css-shim-bbdf0cc6.js +4 -0
  5. package/dist/apollo-core/dom-1f98a75f.js +73 -0
  6. package/dist/apollo-core/index-3c9f25ef.js +2938 -0
  7. package/dist/apollo-core/index-912d1a21.js +584 -0
  8. package/dist/apollo-core/index.esm.js +1 -0
  9. package/dist/{cjs/regular-872f5226.js → apollo-core/regular-133c23b5.js} +12 -3
  10. package/dist/apollo-core/shadow-css-67b66845.js +389 -0
  11. package/dist/apollo-core/xpl-application-shell.entry.js +50 -0
  12. package/dist/apollo-core/xpl-avatar.entry.js +19 -0
  13. package/dist/apollo-core/xpl-backdrop.entry.js +21 -0
  14. package/dist/{esm → apollo-core}/xpl-badge.entry.js +1 -1
  15. package/dist/{collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js → apollo-core/xpl-breadcrumb-item.entry.js} +9 -12
  16. package/dist/apollo-core/xpl-breadcrumbs.entry.js +14 -0
  17. package/dist/{esm → apollo-core}/xpl-button-row.entry.js +1 -1
  18. package/dist/apollo-core/xpl-button.entry.js +34 -0
  19. package/dist/apollo-core/xpl-checkbox.entry.js +25 -0
  20. package/dist/{esm → apollo-core}/xpl-choicelist.entry.js +1 -1
  21. package/dist/apollo-core/xpl-content-area.entry.js +16 -0
  22. package/dist/{esm → apollo-core}/xpl-divider.entry.js +1 -1
  23. package/dist/{esm → apollo-core}/xpl-grid-item.entry.js +1 -1
  24. package/dist/{esm → apollo-core}/xpl-grid.entry.js +1 -1
  25. package/dist/{esm → apollo-core}/xpl-input.entry.js +20 -3
  26. package/dist/{esm → apollo-core}/xpl-list.entry.js +2 -2
  27. package/dist/apollo-core/xpl-main-nav.entry.js +26 -0
  28. package/dist/apollo-core/xpl-nav-item.entry.js +12 -0
  29. package/dist/{esm → apollo-core}/xpl-pagination.entry.js +1 -1
  30. package/dist/apollo-core/xpl-radio.entry.js +25 -0
  31. package/dist/apollo-core/xpl-secondary-nav.entry.js +12 -0
  32. package/dist/{esm → apollo-core}/xpl-select.entry.js +43 -3
  33. package/dist/{esm → apollo-core}/xpl-table.entry.js +1 -1
  34. package/dist/{esm → apollo-core}/xpl-tag.entry.js +1 -1
  35. package/dist/{esm → apollo-core}/xpl-toggle.entry.js +2 -2
  36. package/dist/apollo-core/xpl-utility-bar.entry.js +25 -0
  37. package/dist/types/components/xpl-choicelist/choice.d.ts +1 -1
  38. package/dist/types/components/xpl-choicelist/xpl-choicelist.d.ts +1 -0
  39. package/dist/types/components/xpl-dropdown/dropdownchoice.d.ts +5 -5
  40. package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +1 -0
  41. package/dist/types/components/xpl-list/listitem.d.ts +15 -15
  42. package/dist/types/components/xpl-list/xpl-list.d.ts +1 -0
  43. package/dist/types/components/xpl-select/xpl-select.d.ts +1 -0
  44. package/dist/types/components.d.ts +3 -0
  45. package/package.json +1 -1
  46. package/dist/apollo-core/p-0203d4e8.entry.js +0 -1
  47. package/dist/apollo-core/p-0b2c612e.entry.js +0 -1
  48. package/dist/apollo-core/p-128a0240.entry.js +0 -1
  49. package/dist/apollo-core/p-2f90296c.js +0 -10
  50. package/dist/apollo-core/p-30003b15.entry.js +0 -1
  51. package/dist/apollo-core/p-4e56a2ca.entry.js +0 -1
  52. package/dist/apollo-core/p-5854d1e4.entry.js +0 -1
  53. package/dist/apollo-core/p-611536d8.entry.js +0 -1
  54. package/dist/apollo-core/p-7c9fee7e.entry.js +0 -1
  55. package/dist/apollo-core/p-8b6633c7.js +0 -1
  56. package/dist/apollo-core/p-97cd1f73.entry.js +0 -1
  57. package/dist/apollo-core/p-9c5ca308.entry.js +0 -1
  58. package/dist/apollo-core/p-ad90fe4d.js +0 -1
  59. package/dist/apollo-core/p-bd4a7e3c.entry.js +0 -1
  60. package/dist/apollo-core/p-dab8e7a1.entry.js +0 -1
  61. package/dist/apollo-core/p-eb63b401.entry.js +0 -1
  62. package/dist/apollo-core/p-ee2f4422.entry.js +0 -1
  63. package/dist/apollo-core/p-f167aa05.entry.js +0 -1
  64. package/dist/cjs/apollo-core.cjs.js +0 -19
  65. package/dist/cjs/index-944adb2e.js +0 -1609
  66. package/dist/cjs/index.cjs.js +0 -2
  67. package/dist/cjs/loader.cjs.js +0 -21
  68. package/dist/cjs/v4-14140ff3.js +0 -77
  69. package/dist/cjs/xpl-application-shell_11.cjs.entry.js +0 -230
  70. package/dist/cjs/xpl-badge.cjs.entry.js +0 -21
  71. package/dist/cjs/xpl-button-row.cjs.entry.js +0 -24
  72. package/dist/cjs/xpl-checkbox_2.cjs.entry.js +0 -51
  73. package/dist/cjs/xpl-choicelist.cjs.entry.js +0 -36
  74. package/dist/cjs/xpl-divider.cjs.entry.js +0 -18
  75. package/dist/cjs/xpl-grid-item.cjs.entry.js +0 -25
  76. package/dist/cjs/xpl-grid.cjs.entry.js +0 -35
  77. package/dist/cjs/xpl-input.cjs.entry.js +0 -2527
  78. package/dist/cjs/xpl-list.cjs.entry.js +0 -63
  79. package/dist/cjs/xpl-pagination.cjs.entry.js +0 -76
  80. package/dist/cjs/xpl-select.cjs.entry.js +0 -623
  81. package/dist/cjs/xpl-table.cjs.entry.js +0 -89
  82. package/dist/cjs/xpl-tag.cjs.entry.js +0 -21
  83. package/dist/cjs/xpl-toggle.cjs.entry.js +0 -34
  84. package/dist/collection/collection-manifest.json +0 -37
  85. package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +0 -143
  86. package/dist/collection/components/xpl-avatar/xpl-avatar.js +0 -158
  87. package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +0 -41
  88. package/dist/collection/components/xpl-badge/xpl-badge.js +0 -50
  89. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +0 -15
  90. package/dist/collection/components/xpl-button/xpl-button.js +0 -214
  91. package/dist/collection/components/xpl-button-row/xpl-button-row.js +0 -119
  92. package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +0 -185
  93. package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +0 -143
  94. package/dist/collection/components/xpl-content-area/xpl-content-area.js +0 -39
  95. package/dist/collection/components/xpl-divider/xpl-divider.js +0 -30
  96. package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +0 -32
  97. package/dist/collection/components/xpl-grid/xpl-grid.js +0 -26
  98. package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +0 -93
  99. package/dist/collection/components/xpl-input/xpl-input.js +0 -471
  100. package/dist/collection/components/xpl-list/xpl-list.js +0 -93
  101. package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +0 -72
  102. package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +0 -10
  103. package/dist/collection/components/xpl-pagination/xpl-pagination.js +0 -189
  104. package/dist/collection/components/xpl-radio/xpl-radio.js +0 -168
  105. package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +0 -9
  106. package/dist/collection/components/xpl-select/xpl-select.js +0 -311
  107. package/dist/collection/components/xpl-table/xpl-table.js +0 -194
  108. package/dist/collection/components/xpl-tag/xpl-tag.js +0 -30
  109. package/dist/collection/components/xpl-toggle/xpl-toggle.js +0 -157
  110. package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +0 -70
  111. package/dist/custom-elements/index.js +0 -19959
  112. package/dist/esm/apollo-core.js +0 -17
  113. package/dist/esm/index-899dba3b.js +0 -1580
  114. package/dist/esm/index.js +0 -1
  115. package/dist/esm/loader.js +0 -17
  116. package/dist/esm/polyfills/core-js.js +0 -11
  117. package/dist/esm/polyfills/css-shim.js +0 -1
  118. package/dist/esm/polyfills/dom.js +0 -79
  119. package/dist/esm/polyfills/es5-html-element.js +0 -1
  120. package/dist/esm/polyfills/index.js +0 -34
  121. package/dist/esm/polyfills/system.js +0 -6
  122. package/dist/esm/regular-86225e9d.js +0 -16041
  123. package/dist/esm/v4-929670b7.js +0 -75
  124. package/dist/esm/xpl-application-shell_11.entry.js +0 -216
  125. package/dist/esm/xpl-checkbox_2.entry.js +0 -46
  126. package/dist/index.cjs.js +0 -1
  127. package/dist/index.js +0 -1
  128. package/dist/stories/application-shell.stories.js +0 -766
  129. package/dist/stories/avatar.stories.js +0 -173
  130. package/dist/stories/backdrop.stories.js +0 -18
  131. package/dist/stories/badge.stories.js +0 -48
  132. package/dist/stories/breadcrumbs.stories.js +0 -115
  133. package/dist/stories/button-row.stories.js +0 -64
  134. package/dist/stories/button.stories.js +0 -98
  135. package/dist/stories/checkbox.stories.js +0 -76
  136. package/dist/stories/choicelist.stories.js +0 -112
  137. package/dist/stories/content-area.stories.js +0 -53
  138. package/dist/stories/divider.stories.js +0 -34
  139. package/dist/stories/grid.stories.js +0 -100
  140. package/dist/stories/input.stories.js +0 -252
  141. package/dist/stories/list.stories.js +0 -134
  142. package/dist/stories/main-nav.stories.js +0 -308
  143. package/dist/stories/pagination.stories.js +0 -84
  144. package/dist/stories/radio.stories.js +0 -66
  145. package/dist/stories/secondary-nav.stories.js +0 -76
  146. package/dist/stories/select.stories.js +0 -111
  147. package/dist/stories/table.stories.js +0 -107
  148. package/dist/stories/tabs.stories.js +0 -24
  149. package/dist/stories/toggle.stories.js +0 -80
  150. package/dist/stories/utility-bar.stories.js +0 -94
  151. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/application-shell.stories.d.ts +0 -0
  152. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/avatar.stories.d.ts +0 -0
  153. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/backdrop.stories.d.ts +0 -0
  154. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/badge.stories.d.ts +0 -0
  155. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/breadcrumbs.stories.d.ts +0 -0
  156. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/button-row.stories.d.ts +0 -0
  157. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/button.stories.d.ts +0 -0
  158. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/checkbox.stories.d.ts +0 -0
  159. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/choicelist.stories.d.ts +0 -0
  160. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/content-area.stories.d.ts +0 -0
  161. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/divider.stories.d.ts +0 -0
  162. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/grid.stories.d.ts +0 -0
  163. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/input.stories.d.ts +0 -0
  164. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/list.stories.d.ts +0 -0
  165. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/main-nav.stories.d.ts +0 -0
  166. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/pagination.stories.d.ts +0 -0
  167. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/radio.stories.d.ts +0 -0
  168. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/secondary-nav.stories.d.ts +0 -0
  169. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/select.stories.d.ts +0 -0
  170. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/table.stories.d.ts +0 -0
  171. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/tabs.stories.d.ts +0 -0
  172. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/toggle.stories.d.ts +0 -0
  173. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/utility-bar.stories.d.ts +0 -0
@@ -1,75 +0,0 @@
1
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
2
- // require the crypto API and do not support built-in fallback to lower quality random number
3
- // generators (like Math.random()).
4
- var getRandomValues;
5
- var rnds8 = new Uint8Array(16);
6
- function rng() {
7
- // lazy load so that environments that need to polyfill have a chance to do so
8
- if (!getRandomValues) {
9
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
10
- // find the complete implementation of crypto (msCrypto) on IE11.
11
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
12
-
13
- if (!getRandomValues) {
14
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
15
- }
16
- }
17
-
18
- return getRandomValues(rnds8);
19
- }
20
-
21
- const REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
22
-
23
- function validate(uuid) {
24
- return typeof uuid === 'string' && REGEX.test(uuid);
25
- }
26
-
27
- /**
28
- * Convert array of 16 byte values to UUID string format of the form:
29
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
30
- */
31
-
32
- var byteToHex = [];
33
-
34
- for (var i = 0; i < 256; ++i) {
35
- byteToHex.push((i + 0x100).toString(16).substr(1));
36
- }
37
-
38
- function stringify(arr) {
39
- var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
40
- // Note: Be careful editing this code! It's been tuned for performance
41
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
42
- var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
43
- // of the following:
44
- // - One or more input array values don't map to a hex octet (leading to
45
- // "undefined" in the uuid)
46
- // - Invalid input values for the RFC `version` or `variant` fields
47
-
48
- if (!validate(uuid)) {
49
- throw TypeError('Stringified UUID is invalid');
50
- }
51
-
52
- return uuid;
53
- }
54
-
55
- function v4(options, buf, offset) {
56
- options = options || {};
57
- var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
58
-
59
- rnds[6] = rnds[6] & 0x0f | 0x40;
60
- rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
61
-
62
- if (buf) {
63
- offset = offset || 0;
64
-
65
- for (var i = 0; i < 16; ++i) {
66
- buf[offset + i] = rnds[i];
67
- }
68
-
69
- return buf;
70
- }
71
-
72
- return stringify(rnds);
73
- }
74
-
75
- export { v4 as v };
@@ -1,216 +0,0 @@
1
- import { r as registerInstance, h, H as Host, c as createEvent } from './index-899dba3b.js';
2
- import './regular-86225e9d.js';
3
-
4
- const XplApplicationShell = class {
5
- constructor(hostRef) {
6
- registerInstance(this, hostRef);
7
- /**
8
- * @property {boolean} - Whether or not the Grid should have space for a secondary (sub) navigation bar
9
- */
10
- this.withSubnav = false;
11
- /**
12
- * @property {boolean} - Whether or not the Grid should have space for a utility bar
13
- */
14
- this.withUtility = true;
15
- /**
16
- * @property {string} - The width of the main navigation bar, can be passed or updated when nav-width event is emitted.
17
- */
18
- this.navWidth = 'default';
19
- /**
20
- * @state {boolean} - Whether or not the main nav is open, updates when the nav-open envent is emitted.
21
- */
22
- this.navOpen = true;
23
- }
24
- closeNavOnMobile() {
25
- if (window.innerWidth <= 640) {
26
- this.navOpen = false;
27
- }
28
- }
29
- navToggleHandler() {
30
- this.navOpen = !this.navOpen;
31
- }
32
- navWithHandler(event) {
33
- this.navWidth = event.detail;
34
- }
35
- onWindowResize() {
36
- this.closeNavOnMobile();
37
- }
38
- connectedCallback() {
39
- this.closeNavOnMobile();
40
- }
41
- render() {
42
- let applicationShellClasses = "xpl-application-shell";
43
- if (this.withUtility)
44
- applicationShellClasses += " xpl-application-shell--with_utility";
45
- let navClasses = "xpl-application-shell__nav";
46
- navClasses += (this.navOpen) ? ` xpl-application-shell__nav--${this.navWidth}--open` : ` xpl-application-shell__nav--${this.navWidth}`;
47
- return (h(Host, { class: applicationShellClasses }, h("div", { class: navClasses }, h("slot", { name: "nav" })), h("div", { class: "xpl-application-shell__subnav" }, h("slot", { name: "subnav" })), h("div", { class: "xpl-application-shell__utility" }, h("slot", { name: "utility" })), h("div", { class: "xpl-application-shell__content" }, h("slot", { name: "content" })), h("xpl-backdrop", { onClick: () => this.navToggleHandler(), class: { "xpl-application-shell__backdrop--open": this.navOpen }, relative: true })));
48
- }
49
- };
50
-
51
- const XplAvatar = class {
52
- constructor(hostRef) {
53
- registerInstance(this, hostRef);
54
- this.disabled = false;
55
- }
56
- render() {
57
- let className = "xpl-avatar";
58
- if (this.size)
59
- className += ` xpl-avatar--${this.size}`;
60
- if (this.color)
61
- className += ` xpl-avatar--${this.color}`;
62
- const inner = (h("div", null, this.src ? (h("img", { alt: this.name, src: this.src })) : (h("div", { class: "xpl-avatar__placeholder" }, h("slot", null))), this.status && h("div", { class: `xpl-avatar__dot--${this.status}` })));
63
- return (h(Host, null, this.href && !this.disabled ? (h("a", { href: this.href, class: className, target: this.target }, inner)) : this.href && this.disabled ? (h("div", { class: className + " xpl-avatar--disabled" }, inner)) : (h("div", { class: className }, inner))));
64
- }
65
- };
66
-
67
- const XplBackdrop = class {
68
- constructor(hostRef) {
69
- registerInstance(this, hostRef);
70
- /**
71
- * @property {boolean} - When true, backdrop will have relative position. This is useful when the backdrop doesn't cover the whole view area.
72
- * If false, the position will be fixed and cover the whole view area.
73
- */
74
- this.relative = false;
75
- }
76
- render() {
77
- return (h(Host, { class: {
78
- 'xpl-backdrop': true,
79
- 'xpl-backdrop--fixed': !this.relative,
80
- 'xpl-backdrop--relative': this.relative
81
- }, "aria-hidden": "true" }));
82
- }
83
- };
84
-
85
- const XplBreadcrumbItem = class {
86
- constructor(hostRef) {
87
- registerInstance(this, hostRef);
88
- // This is temporary as we still don't have a xpl-icon component. When that's created we should update this code.
89
- this.chevron = `<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chevron-right" class="svg-inline--fa fa-chevron-right fa-w-10" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
90
- <path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path>
91
- </svg>
92
- `;
93
- }
94
- render() {
95
- return (h(Host, { class: "xpl-breadcrumb-item", role: "listitem" }, h("li", { role: "none" }, h("slot", null)), h("span", { innerHTML: `${this.chevron}` })));
96
- }
97
- ;
98
- };
99
-
100
- const XplBreadcrumbs = class {
101
- constructor(hostRef) {
102
- registerInstance(this, hostRef);
103
- }
104
- render() {
105
- return (h(Host, null, h("nav", { class: "xpl-breadcrumbs", "aria-label": "Breadcrumb" }, h("ol", { role: "list" }, h("slot", null)))));
106
- }
107
- ;
108
- };
109
-
110
- const XplButton = class {
111
- constructor(hostRef) {
112
- registerInstance(this, hostRef);
113
- this.size = "default";
114
- this.variant = "primary";
115
- }
116
- render() {
117
- let className = "xpl-button";
118
- if (this.variant === "secondary")
119
- className += " xpl-button--secondary";
120
- if (this.variant === "subtle")
121
- className += " xpl-button--subtle";
122
- if (this.variant === "warning")
123
- className += " xpl-button--warning";
124
- if (this.size === "sm")
125
- className += " xpl-button--sm";
126
- if (this.size === "xs")
127
- className += " xpl-button--xs";
128
- if (this.iconOnly)
129
- className += " xpl-button--icon-only";
130
- const icon = this.icon ? (h("i", { class: `far fa-${this.icon} ${this.iconTrailing ? "trailing" : this.iconOnly ? "" : "leading"}` })) : null;
131
- return (h(Host, { role: "button" },
132
- /**
133
- * Conditionally render either an <a> or <button> element
134
- * depending on if there's an `href` or not
135
- */
136
- this.href ? (h("a", { class: className, href: this.href, role: "button" }, !this.iconTrailing && icon, this.iconOnly ? (h("span", { class: "sr-only" }, h("slot", null))) : (h("slot", null)), this.iconTrailing && icon)) : (h("button", { class: className, disabled: this.disabled, name: this.name, type: this.type, value: this.value }, !this.iconTrailing && icon, this.iconOnly ? (h("span", { class: "sr-only" }, h("slot", null))) : (h("slot", null)), this.iconTrailing && icon))));
137
- }
138
- };
139
-
140
- const XplContentArea = class {
141
- constructor(hostRef) {
142
- registerInstance(this, hostRef);
143
- /**
144
- * @property {string} size - The content-area size.
145
- */
146
- this.size = "wide";
147
- }
148
- render() {
149
- return (h(Host, null, h("main", { class: `xpl-content-area-wrapper xpl-content-area-wrapper__${this.size}` }, h("div", { class: "xpl-content-area" }, h("slot", null)))));
150
- }
151
- };
152
-
153
- const XplMainNav = class {
154
- constructor(hostRef) {
155
- registerInstance(this, hostRef);
156
- this.navWidth = createEvent(this, "navWidth", 7);
157
- /**
158
- * @property {string} width - The width of the Main Nav.
159
- */
160
- this.width = "default";
161
- }
162
- navWidthHandler() {
163
- this.navWidth.emit(this.width);
164
- }
165
- connectedCallback() {
166
- this.navWidthHandler();
167
- }
168
- componentDidUpdate() {
169
- this.navWidthHandler();
170
- }
171
- render() {
172
- 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" })))));
173
- }
174
- };
175
-
176
- const XplNavItem = class {
177
- constructor(hostRef) {
178
- registerInstance(this, hostRef);
179
- }
180
- render() {
181
- return (h(Host, { class: "xpl-nav-item", role: "listitem" }, h("slot", { name: "link" }, h("slot", { name: "icon" }), h("slot", null))));
182
- }
183
- };
184
-
185
- const XplSecondaryNav = class {
186
- constructor(hostRef) {
187
- registerInstance(this, hostRef);
188
- }
189
- render() {
190
- return (h(Host, { class: "xpl-secondary-nav" }, h("nav", { "aria-label": "Secondary Nav" }, h("slot", null))));
191
- }
192
- };
193
-
194
- const XplUtilityBar = class {
195
- constructor(hostRef) {
196
- registerInstance(this, hostRef);
197
- this.navOpen = createEvent(this, "navOpen", 7);
198
- this.open = true;
199
- this.bars = `
200
- <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>
201
- `;
202
- }
203
- onNavToggle() {
204
- this.open = !this.open;
205
- this.navOpen.emit(this.open);
206
- }
207
- render() {
208
- return (h(Host, null, h("nav", { "aria-label": "utility navigation bar", class: "xpl-utility-bar" }, this.navControl
209
- ?
210
- h("div", null, h("button", { onClick: () => this.onNavToggle(), innerHTML: `${this.bars}` }), h("slot", { name: "aside" }))
211
- :
212
- h("slot", { name: "aside" }), h("slot", { name: "main" }))));
213
- }
214
- };
215
-
216
- export { XplApplicationShell as xpl_application_shell, XplAvatar as xpl_avatar, XplBackdrop as xpl_backdrop, XplBreadcrumbItem as xpl_breadcrumb_item, XplBreadcrumbs as xpl_breadcrumbs, XplButton as xpl_button, XplContentArea as xpl_content_area, XplMainNav as xpl_main_nav, XplNavItem as xpl_nav_item, XplSecondaryNav as xpl_secondary_nav, XplUtilityBar as xpl_utility_bar };
@@ -1,46 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-899dba3b.js';
2
- import { v as v4 } from './v4-929670b7.js';
3
-
4
- const XplCheckbox = class {
5
- constructor(hostRef) {
6
- registerInstance(this, hostRef);
7
- this.checkboxChange = createEvent(this, "checkboxChange", 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-checkbox", type: "checkbox", checked: this.checked, disabled: this.disabled, id: this.id, indeterminate: this.indeterminate, onChange: () => this.checkboxChange.emit(this.input.checked), name: this.name, ref: (el) => (this.input = el), required: this.required, value: this.value }), 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
- const XplRadio = class {
26
- constructor(hostRef) {
27
- registerInstance(this, hostRef);
28
- this.radioChange = createEvent(this, "radioChange", 7);
29
- this.id = v4();
30
- }
31
- render() {
32
- return (h(Host, { class: {
33
- "xpl-checkbox-radio-container": true,
34
- "styled": this.styled,
35
- "disabled": this.disabled,
36
- } }, 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: {
37
- "xpl-label": true,
38
- "xpl-label--disabled": this.disabled
39
- }, htmlFor: this.id }, h("slot", null), this.description && h("small", { class: {
40
- "xpl-description": true,
41
- "xpl-description--disabled": this.disabled
42
- } }, this.description))));
43
- }
44
- };
45
-
46
- export { XplCheckbox as xpl_checkbox, XplRadio as xpl_radio };
package/dist/index.cjs.js DELETED
@@ -1 +0,0 @@
1
- module.exports = require('./cjs/index.cjs.js');
package/dist/index.js DELETED
@@ -1 +0,0 @@
1
- export * from './esm/index.js';