@xplortech/apollo-core 1.0.0-beta.7 → 1.0.0-beta.8

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 (137) hide show
  1. package/build/style.css +4 -55
  2. package/dist/apollo-core/apollo-core.css +5 -5
  3. package/dist/apollo-core/apollo-core.esm.js +1 -1
  4. package/dist/apollo-core/p-10f00380.entry.js +1 -0
  5. package/dist/apollo-core/p-26ec64fe.entry.js +1 -0
  6. package/dist/apollo-core/p-2f90296c.js +2 -2
  7. package/dist/apollo-core/p-31acfdb4.entry.js +1 -0
  8. package/dist/apollo-core/p-4184ac44.entry.js +1 -0
  9. package/dist/apollo-core/{p-dad11011.entry.js → p-4fa14839.entry.js} +1 -1
  10. package/dist/apollo-core/p-55b87345.js +2 -0
  11. package/dist/apollo-core/p-63a6c98a.entry.js +1 -0
  12. package/dist/apollo-core/p-68c33b77.entry.js +1 -0
  13. package/dist/apollo-core/{p-a7cc4114.entry.js → p-78d07caf.entry.js} +1 -1
  14. package/dist/apollo-core/p-796957d3.entry.js +1 -0
  15. package/dist/apollo-core/p-88160d68.entry.js +1 -0
  16. package/dist/apollo-core/p-9ec318bb.entry.js +1 -0
  17. package/dist/apollo-core/p-a2a34e44.entry.js +1 -0
  18. package/dist/apollo-core/p-beea2502.entry.js +1 -0
  19. package/dist/apollo-core/p-d499e43f.entry.js +1 -0
  20. package/dist/apollo-core/{p-c8af4ed6.entry.js → p-d8a3d94c.entry.js} +1 -1
  21. package/dist/apollo-core/p-e047b446.entry.js +1 -0
  22. package/dist/cjs/apollo-core.cjs.js +6 -2
  23. package/dist/cjs/{index-acf3dd7a.js → index-2ab4832e.js} +592 -215
  24. package/dist/cjs/loader.cjs.js +3 -2
  25. package/dist/cjs/xpl-application-shell.cjs.entry.js +2 -13
  26. package/dist/cjs/xpl-avatar_12.cjs.entry.js +72 -38
  27. package/dist/cjs/xpl-backdrop.cjs.entry.js +1 -5
  28. package/dist/cjs/xpl-button-row.cjs.entry.js +4 -1
  29. package/dist/cjs/xpl-choicelist.cjs.entry.js +8 -1
  30. package/dist/cjs/xpl-divider.cjs.entry.js +2 -1
  31. package/dist/cjs/xpl-dropdown-group_3.cjs.entry.js +7 -1
  32. package/dist/cjs/xpl-dropdown_2.cjs.entry.js +8 -9
  33. package/dist/cjs/xpl-grid-item.cjs.entry.js +1 -1
  34. package/dist/cjs/xpl-grid.cjs.entry.js +1 -1
  35. package/dist/cjs/xpl-input.cjs.entry.js +615 -501
  36. package/dist/cjs/xpl-list.cjs.entry.js +1 -23
  37. package/dist/cjs/xpl-main-nav.cjs.entry.js +1 -4
  38. package/dist/cjs/xpl-pagination.cjs.entry.js +5 -2
  39. package/dist/cjs/xpl-select.cjs.entry.js +7 -22
  40. package/dist/cjs/xpl-toggle.cjs.entry.js +7 -4
  41. package/dist/collection/collection-manifest.json +2 -2
  42. package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +118 -132
  43. package/dist/collection/components/xpl-avatar/xpl-avatar.js +150 -144
  44. package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +26 -28
  45. package/dist/collection/components/xpl-badge/xpl-badge.js +43 -39
  46. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +2 -5
  47. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +2 -5
  48. package/dist/collection/components/xpl-button/xpl-button.js +204 -205
  49. package/dist/collection/components/xpl-button-row/xpl-button-row.js +105 -104
  50. package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +181 -171
  51. package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +133 -126
  52. package/dist/collection/components/xpl-content-area/xpl-content-area.js +27 -31
  53. package/dist/collection/components/xpl-divider/xpl-divider.js +26 -23
  54. package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +46 -42
  55. package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +26 -22
  56. package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +60 -54
  57. package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +170 -167
  58. package/dist/collection/components/xpl-grid/xpl-grid.js +1 -1
  59. package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +75 -74
  60. package/dist/collection/components/xpl-input/xpl-input.js +404 -417
  61. package/dist/collection/components/xpl-list/xpl-list.js +42 -75
  62. package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +47 -54
  63. package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +47 -49
  64. package/dist/collection/components/xpl-pagination/xpl-pagination.js +116 -128
  65. package/dist/collection/components/xpl-radio/xpl-radio.js +157 -148
  66. package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +2 -4
  67. package/dist/collection/components/xpl-select/xpl-select.js +212 -238
  68. package/dist/collection/components/xpl-table/xpl-table.js +168 -151
  69. package/dist/collection/components/xpl-tag/xpl-tag.js +24 -25
  70. package/dist/collection/components/xpl-toggle/xpl-toggle.js +137 -135
  71. package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +73 -70
  72. package/dist/custom-elements/index.js +756 -641
  73. package/dist/esm/apollo-core.js +3 -2
  74. package/dist/esm/{index-e3c4bb97.js → index-392b5b96.js} +592 -216
  75. package/dist/esm/loader.js +3 -2
  76. package/dist/esm/polyfills/css-shim.js +1 -1
  77. package/dist/esm/xpl-application-shell.entry.js +2 -13
  78. package/dist/esm/xpl-avatar_12.entry.js +72 -38
  79. package/dist/esm/xpl-backdrop.entry.js +1 -5
  80. package/dist/esm/xpl-button-row.entry.js +4 -1
  81. package/dist/esm/xpl-choicelist.entry.js +8 -1
  82. package/dist/esm/xpl-divider.entry.js +2 -1
  83. package/dist/esm/xpl-dropdown-group_3.entry.js +7 -1
  84. package/dist/esm/xpl-dropdown_2.entry.js +8 -9
  85. package/dist/esm/xpl-grid-item.entry.js +1 -1
  86. package/dist/esm/xpl-grid.entry.js +1 -1
  87. package/dist/esm/xpl-input.entry.js +615 -501
  88. package/dist/esm/xpl-list.entry.js +1 -23
  89. package/dist/esm/xpl-main-nav.entry.js +1 -4
  90. package/dist/esm/xpl-pagination.entry.js +5 -2
  91. package/dist/esm/xpl-select.entry.js +7 -22
  92. package/dist/esm/xpl-toggle.entry.js +7 -4
  93. package/dist/types/components/xpl-dropdown/dropdownoption.d.ts +1 -1
  94. package/dist/types/components/xpl-table/xpl-table.d.ts +2 -0
  95. package/dist/types/components.d.ts +47 -11
  96. package/dist/types/stencil-public-runtime.d.ts +85 -11
  97. package/loader/index.d.ts +9 -1
  98. package/loader/package.json +1 -0
  99. package/package.json +1 -1
  100. package/dist/apollo-core/p-25f84d39.entry.js +0 -1
  101. package/dist/apollo-core/p-2ce2fe5c.entry.js +0 -1
  102. package/dist/apollo-core/p-3ff1ff38.entry.js +0 -1
  103. package/dist/apollo-core/p-63dd9a65.entry.js +0 -1
  104. package/dist/apollo-core/p-6c3c1e3d.entry.js +0 -1
  105. package/dist/apollo-core/p-81a6ce4c.entry.js +0 -1
  106. package/dist/apollo-core/p-918b0731.entry.js +0 -1
  107. package/dist/apollo-core/p-a43e2d1f.entry.js +0 -1
  108. package/dist/apollo-core/p-b6d1b135.entry.js +0 -1
  109. package/dist/apollo-core/p-bc0ebed2.entry.js +0 -1
  110. package/dist/apollo-core/p-d4aa2fa9.js +0 -1
  111. package/dist/apollo-core/p-d4e5d3aa.entry.js +0 -1
  112. package/dist/apollo-core/p-db74c99c.entry.js +0 -1
  113. package/dist/apollo-core/p-ee16942f.entry.js +0 -1
  114. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/application-shell.stories.d.ts +0 -0
  115. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/avatar.stories.d.ts +0 -0
  116. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/backdrop.stories.d.ts +0 -0
  117. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/badge.stories.d.ts +0 -0
  118. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/breadcrumbs.stories.d.ts +0 -0
  119. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/button-row.stories.d.ts +0 -0
  120. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/button.stories.d.ts +0 -0
  121. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/checkbox.stories.d.ts +0 -0
  122. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/choicelist.stories.d.ts +0 -0
  123. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/content-area.stories.d.ts +0 -0
  124. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/divider.stories.d.ts +0 -0
  125. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/dropdown.stories.d.ts +0 -0
  126. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/grid.stories.d.ts +0 -0
  127. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/input.stories.d.ts +0 -0
  128. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/list.stories.d.ts +0 -0
  129. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/main-nav.stories.d.ts +0 -0
  130. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/pagination.stories.d.ts +0 -0
  131. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/radio.stories.d.ts +0 -0
  132. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/secondary-nav.stories.d.ts +0 -0
  133. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/select.stories.d.ts +0 -0
  134. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/table.stories.d.ts +0 -0
  135. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/tabs.stories.d.ts +0 -0
  136. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/toggle.stories.d.ts +0 -0
  137. /package/dist/types/Users/{roc/Sites → fernandogelin/Xplor}/apollo/.stencil/stories/utility-bar.stories.d.ts +0 -0
@@ -1,91 +1,58 @@
1
- import { Component, Host, h, Prop, Fragment, } from '@stencil/core';
1
+ import { Host, h, Fragment, } from '@stencil/core';
2
2
  import '../../../font-awesome/fontawesome';
3
3
  import '../../../font-awesome/regular';
4
4
  const ListItemCpt = ({ avatar, avatars, badges, href, title, subtext, metadata, }) => {
5
5
  const hasRight = avatars || badges || subtext;
6
- const inner = (h(Fragment, null,
7
- avatar &&
8
- (avatar.slice(0, 1) === '/' || avatar.slice(0, 4) === 'http' ? (h("xpl-avatar", { src: avatar, name: title })) : (h("xpl-avatar", { name: title }, avatar))),
9
- h("div", { class: "xpl-list-item-content" },
10
- h("div", { class: "xpl-list-left" },
11
- h("div", null,
12
- h("h4", null, title),
13
- metadata && (h("ul", { class: "xpl-list-item-metadata" }, metadata.map((d) => {
14
- if (typeof d === 'string') {
15
- return h("li", null, d);
16
- }
17
- else {
18
- return (h("li", null,
19
- h("span", { class: `far fa-${d.icon}` }),
20
- ' ',
21
- d.text));
22
- }
23
- }))))),
24
- hasRight && (h("div", { class: "xpl-list-right" },
25
- subtext && (h("div", { class: "xpl-list-item-subtext" }, subtext)),
26
- avatars && (h("div", { class: "xpl-avatar-group xpl-avatar-group--s" }, avatars.map((a) => (h("img", { src: a, alt: "" }))))),
27
- badges &&
28
- badges.map((b) => {
29
- if (typeof b === 'string') {
30
- return h("xpl-badge", null, b);
31
- }
32
- else {
33
- return (h("xpl-badge", { dot: b.dot, variant: b.variant }, b.text));
34
- }
35
- }))))));
6
+ const inner = (h(Fragment, null, avatar &&
7
+ (avatar.slice(0, 1) === '/' || avatar.slice(0, 4) === 'http' ? (h("xpl-avatar", { src: avatar, name: title })) : (h("xpl-avatar", { name: title }, avatar))), h("div", { class: "xpl-list-item-content" }, h("div", { class: "xpl-list-left" }, h("div", null, h("h4", null, title), metadata && (h("ul", { class: "xpl-list-item-metadata" }, metadata.map((d) => {
8
+ if (typeof d === 'string') {
9
+ return h("li", null, d);
10
+ }
11
+ else {
12
+ return (h("li", null, h("span", { class: `far fa-${d.icon}` }), ' ', d.text));
13
+ }
14
+ }))))), hasRight && (h("div", { class: "xpl-list-right" }, subtext && (h("div", { class: "xpl-list-item-subtext" }, subtext)), avatars && (h("div", { class: "xpl-avatar-group xpl-avatar-group--s" }, avatars.map((a) => (h("img", { src: a, alt: "" }))))), badges &&
15
+ badges.map((b) => {
16
+ if (typeof b === 'string') {
17
+ return h("xpl-badge", null, b);
18
+ }
19
+ else {
20
+ return (h("xpl-badge", { dot: b.dot, variant: b.variant }, b.text));
21
+ }
22
+ }))))));
36
23
  return href ? (h("a", { class: "xpl-list-item", href: href }, inner)) : (h("div", { class: "xpl-list-item" }, inner));
37
24
  };
38
25
  export class XplList {
39
26
  constructor() {
40
- /**
41
- * `items` should be an array of objects with the following signature:
42
- * {
43
- * avatar?: string; // The URL of the avatar, or the placeholder initials (ex. "SPD").
44
- * avatars?: string[]; // The URLs of multiple avatars to be displayed in a group on the right.
45
- * badges?: string[] | { // An array of strings or badge-like objects to be displayed as badges
46
- * dot?: boolean; // in a group on the right. See <xpl-badge> for more details.
47
- * text: string;
48
- * variant?: string;
49
- * }[];
50
- * href?: string; // A URL, if this list item is meant to link somewhere.
51
- * title: string; // The text to be displayed for the list item.
52
- * metadata?: string[] | { // An array of strings or strings with icons (reference the allowed
53
- * icon: string; // Font Awesome icons) to be displayed as metadata below the title.
54
- * text: string;
55
- * }[];
56
- * subtext?: string; // Subtext to be displayed on the right.
57
- * }
58
- *
59
- * - Note that you should *only use one of* `avatars`, `badges`, or `subtext`, to avoid cluttering
60
- * the right-hand side of the list item.
61
- */
62
27
  this.items = [];
63
28
  }
64
29
  render() {
65
30
  return (h(Host, null, this.items.map((item) => (h(ListItemCpt, Object.assign({}, item))))));
66
31
  }
67
32
  static get is() { return "xpl-list"; }
68
- static get properties() { return {
69
- "items": {
70
- "type": "unknown",
71
- "mutable": false,
72
- "complexType": {
73
- "original": "ListItem[]",
74
- "resolved": "ListItem[]",
75
- "references": {
76
- "ListItem": {
77
- "location": "import",
78
- "path": "./listitem"
33
+ static get properties() {
34
+ return {
35
+ "items": {
36
+ "type": "unknown",
37
+ "mutable": false,
38
+ "complexType": {
39
+ "original": "ListItem[]",
40
+ "resolved": "ListItem[]",
41
+ "references": {
42
+ "ListItem": {
43
+ "location": "import",
44
+ "path": "./listitem"
45
+ }
79
46
  }
80
- }
81
- },
82
- "required": false,
83
- "optional": true,
84
- "docs": {
85
- "tags": [],
86
- "text": "`items` should be an array of objects with the following signature:\n{\n avatar?: string; // The URL of the avatar, or the placeholder initials (ex. \"SPD\").\n avatars?: string[]; // The URLs of multiple avatars to be displayed in a group on the right.\n badges?: string[] | { // An array of strings or badge-like objects to be displayed as badges\n dot?: boolean; // in a group on the right. See <xpl-badge> for more details.\n text: string;\n variant?: string;\n }[];\n href?: string; // A URL, if this list item is meant to link somewhere.\n title: string; // The text to be displayed for the list item.\n metadata?: string[] | { // An array of strings or strings with icons (reference the allowed\n icon: string; // Font Awesome icons) to be displayed as metadata below the title.\n text: string;\n }[];\n subtext?: string; // Subtext to be displayed on the right.\n}\n\n- Note that you should *only use one of* `avatars`, `badges`, or `subtext`, to avoid cluttering\n the right-hand side of the list item."
87
- },
88
- "defaultValue": "[]"
89
- }
90
- }; }
47
+ },
48
+ "required": false,
49
+ "optional": true,
50
+ "docs": {
51
+ "tags": [],
52
+ "text": "`items` should be an array of objects with the following signature:\n{\n avatar?: string; // The URL of the avatar, or the placeholder initials (ex. \"SPD\").\n avatars?: string[]; // The URLs of multiple avatars to be displayed in a group on the right.\n badges?: string[] | { // An array of strings or badge-like objects to be displayed as badges\n dot?: boolean; // in a group on the right. See <xpl-badge> for more details.\n text: string;\n variant?: string;\n }[];\n href?: string; // A URL, if this list item is meant to link somewhere.\n title: string; // The text to be displayed for the list item.\n metadata?: string[] | { // An array of strings or strings with icons (reference the allowed\n icon: string; // Font Awesome icons) to be displayed as metadata below the title.\n text: string;\n }[];\n subtext?: string; // Subtext to be displayed on the right.\n}\n\n- Note that you should *only use one of* `avatars`, `badges`, or `subtext`, to avoid cluttering\n the right-hand side of the list item."
53
+ },
54
+ "defaultValue": "[]"
55
+ }
56
+ };
57
+ }
91
58
  }
@@ -1,9 +1,6 @@
1
- import { Component, Host, h, Prop, Event } from '@stencil/core';
1
+ import { Host, h } from '@stencil/core';
2
2
  export class XplMainNav {
3
3
  constructor() {
4
- /**
5
- * @property {string} width - The width of the Main Nav.
6
- */
7
4
  this.width = 'default';
8
5
  }
9
6
  navWidthHandler() {
@@ -16,57 +13,53 @@ export class XplMainNav {
16
13
  this.navWidthHandler();
17
14
  }
18
15
  render() {
19
- return (h(Host, { class: `xpl-main-nav xpl-main-nav--${this.width}`, "aria-label": "Sidebar" },
20
- h("nav", null,
21
- h("header", { "aria-label": "Sidebar Header" },
22
- h("slot", { name: "logo" }),
23
- h("slot", { name: "brand-name" })),
24
- h("div", { class: "xpl-main-nav__main_section" },
25
- h("slot", { name: "navigation" })),
26
- h("footer", { class: "xpl-main-nav__footer", "aria-label": "Sidebar Footer" },
27
- h("slot", { name: "footer" })))));
16
+ 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" })))));
28
17
  }
29
18
  static get is() { return "xpl-main-nav"; }
30
- static get properties() { return {
31
- "width": {
32
- "type": "string",
33
- "mutable": false,
34
- "complexType": {
35
- "original": "'default' | 'md' | 'sm'",
36
- "resolved": "\"default\" | \"md\" | \"sm\"",
37
- "references": {}
38
- },
39
- "required": false,
40
- "optional": false,
41
- "docs": {
42
- "tags": [{
43
- "text": "{string} width - The width of the Main Nav.",
44
- "name": "property"
45
- }],
46
- "text": ""
47
- },
48
- "attribute": "width",
49
- "reflect": false,
50
- "defaultValue": "'default'"
51
- }
52
- }; }
53
- static get events() { return [{
54
- "method": "navWidth",
55
- "name": "navWidth",
56
- "bubbles": true,
57
- "cancelable": true,
58
- "composed": true,
59
- "docs": {
60
- "tags": [{
61
- "text": "{string} navWidth - Emits the `nav-width` prop set by the user\nwhen the component is attached to the DOM and when the component is updated.",
62
- "name": "event"
63
- }],
64
- "text": ""
65
- },
66
- "complexType": {
67
- "original": "string",
68
- "resolved": "string",
69
- "references": {}
19
+ static get properties() {
20
+ return {
21
+ "width": {
22
+ "type": "string",
23
+ "mutable": false,
24
+ "complexType": {
25
+ "original": "'default' | 'md' | 'sm'",
26
+ "resolved": "\"default\" | \"md\" | \"sm\"",
27
+ "references": {}
28
+ },
29
+ "required": false,
30
+ "optional": false,
31
+ "docs": {
32
+ "tags": [{
33
+ "name": "property",
34
+ "text": "{string} width - The width of the Main Nav."
35
+ }],
36
+ "text": ""
37
+ },
38
+ "attribute": "width",
39
+ "reflect": false,
40
+ "defaultValue": "'default'"
70
41
  }
71
- }]; }
42
+ };
43
+ }
44
+ static get events() {
45
+ return [{
46
+ "method": "navWidth",
47
+ "name": "navWidth",
48
+ "bubbles": true,
49
+ "cancelable": true,
50
+ "composed": true,
51
+ "docs": {
52
+ "tags": [{
53
+ "name": "event",
54
+ "text": "{string} navWidth - Emits the `nav-width` prop set by the user\nwhen the component is attached to the DOM and when the component is updated."
55
+ }],
56
+ "text": ""
57
+ },
58
+ "complexType": {
59
+ "original": "string",
60
+ "resolved": "string",
61
+ "references": {}
62
+ }
63
+ }];
64
+ }
72
65
  }
@@ -1,9 +1,6 @@
1
- import { Component, Event, Host, h, Prop } from '@stencil/core';
1
+ import { Host, h } from '@stencil/core';
2
2
  export class XplNavItem {
3
3
  constructor() {
4
- /**
5
- * @property {boolean} - Whether or not the item should control the main nav state on click
6
- */
7
4
  this.navControl = false;
8
5
  }
9
6
  onNavToggle() {
@@ -16,52 +13,53 @@ export class XplNavItem {
16
13
  if (this.navControl) {
17
14
  this.onNavToggle();
18
15
  }
19
- } },
20
- h("slot", { name: "link" },
21
- h("slot", { name: "icon" }),
22
- h("slot", null))));
16
+ } }, h("slot", { name: "link" }, h("slot", { name: "icon" }), h("slot", null))));
23
17
  }
24
18
  static get is() { return "xpl-nav-item"; }
25
- static get properties() { return {
26
- "navControl": {
27
- "type": "boolean",
28
- "mutable": false,
29
- "complexType": {
30
- "original": "boolean",
31
- "resolved": "boolean",
32
- "references": {}
33
- },
34
- "required": false,
35
- "optional": true,
36
- "docs": {
37
- "tags": [{
38
- "text": "{boolean} - Whether or not the item should control the main nav state on click",
39
- "name": "property"
40
- }],
41
- "text": ""
42
- },
43
- "attribute": "nav-control",
44
- "reflect": false,
45
- "defaultValue": "false"
46
- }
47
- }; }
48
- static get events() { return [{
49
- "method": "navOpen",
50
- "name": "navOpen",
51
- "bubbles": true,
52
- "cancelable": true,
53
- "composed": true,
54
- "docs": {
55
- "tags": [{
56
- "text": "{boolean} - Emits the desired state of the navigation bar (open: true/false)",
57
- "name": "event"
58
- }],
59
- "text": ""
60
- },
61
- "complexType": {
62
- "original": "boolean",
63
- "resolved": "boolean",
64
- "references": {}
19
+ static get properties() {
20
+ return {
21
+ "navControl": {
22
+ "type": "boolean",
23
+ "mutable": false,
24
+ "complexType": {
25
+ "original": "boolean",
26
+ "resolved": "boolean",
27
+ "references": {}
28
+ },
29
+ "required": false,
30
+ "optional": true,
31
+ "docs": {
32
+ "tags": [{
33
+ "name": "property",
34
+ "text": "{boolean} - Whether or not the item should control the main nav state on click"
35
+ }],
36
+ "text": ""
37
+ },
38
+ "attribute": "nav-control",
39
+ "reflect": false,
40
+ "defaultValue": "false"
65
41
  }
66
- }]; }
42
+ };
43
+ }
44
+ static get events() {
45
+ return [{
46
+ "method": "navOpen",
47
+ "name": "navOpen",
48
+ "bubbles": true,
49
+ "cancelable": true,
50
+ "composed": true,
51
+ "docs": {
52
+ "tags": [{
53
+ "name": "event",
54
+ "text": "{boolean} - Emits the desired state of the navigation bar (open: true/false)"
55
+ }],
56
+ "text": ""
57
+ },
58
+ "complexType": {
59
+ "original": "boolean",
60
+ "resolved": "boolean",
61
+ "references": {}
62
+ }
63
+ }];
64
+ }
67
65
  }
@@ -1,7 +1,6 @@
1
- import { Component, Host, h, Event, Prop, State, Method, } from '@stencil/core';
1
+ import { Host, h, } from '@stencil/core';
2
2
  export class XplPagination {
3
3
  constructor() {
4
- this.current = 1;
5
4
  /**
6
5
  * Private `_goto` method respects the `waitForCallback` prop --
7
6
  * it will always emit the `page` event, but won't actually update
@@ -23,6 +22,10 @@ export class XplPagination {
23
22
  if (this.current < numPages)
24
23
  this._goto(this.current + 1);
25
24
  };
25
+ this.total = undefined;
26
+ this.perPage = undefined;
27
+ this.waitForCallback = undefined;
28
+ this.current = 1;
26
29
  }
27
30
  /**
28
31
  * Calling `goto` with a page number (which should probably be
@@ -54,137 +57,122 @@ export class XplPagination {
54
57
  }
55
58
  const showingFirst = (this.current - 1) * this.perPage + 1;
56
59
  const showingLast = Math.min(showingFirst + this.perPage - 1, this.total);
57
- return (h(Host, null,
58
- h("div", { class: "xpl-pagination" },
59
- h("div", null,
60
- h("p", null,
61
- "Showing ",
62
- h("span", null, showingFirst),
63
- " to",
64
- ' ',
65
- h("span", null, showingLast),
66
- " of",
67
- ' ',
68
- h("span", null, this.total),
69
- " results")),
70
- h("div", null,
71
- h("nav", { "aria-label": "Pagination" },
72
- h("button", { onClick: this.goPrev, class: "xpl-pagination-prev" },
73
- h("span", null, "Previous"),
74
- h("svg", { viewBox: "0 0 20 20", "aria-hidden": "true" },
75
- h("path", { "fill-rule": "evenodd", d: "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z", "clip-rule": "evenodd" }))),
76
- showing.map((n) => {
77
- if (n === '...') {
78
- return (h("span", { class: "xpl-pagination-ellipsis" }, "..."));
79
- }
80
- if (n === this.current) {
81
- return (h("button", { "aria-current": "page", class: "xpl-pagination-current" }, n));
82
- }
83
- return (h("button", { onClick: () => this._goto(n) }, n));
84
- }),
85
- h("button", { onClick: this.goNext, class: "xpl-pagination-next" },
86
- h("span", null, "Next"),
87
- h("svg", { viewBox: "0 0 20 20", "aria-hidden": "true" },
88
- h("path", { "fill-rule": "evenodd", d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z", "clip-rule": "evenodd" }))))))));
60
+ return (h(Host, null, h("div", { class: "xpl-pagination" }, h("div", null, h("p", null, "Showing ", h("span", null, showingFirst), " to", ' ', h("span", null, showingLast), " of", ' ', h("span", null, this.total), " results")), h("div", null, h("nav", { "aria-label": "Pagination" }, h("button", { onClick: this.goPrev, class: "xpl-pagination-prev" }, h("span", null, "Previous"), h("svg", { viewBox: "0 0 20 20", "aria-hidden": "true" }, h("path", { "fill-rule": "evenodd", d: "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z", "clip-rule": "evenodd" }))), showing.map((n) => {
61
+ if (n === '...') {
62
+ return (h("span", { class: "xpl-pagination-ellipsis" }, "..."));
63
+ }
64
+ if (n === this.current) {
65
+ return (h("button", { "aria-current": "page", class: "xpl-pagination-current" }, n));
66
+ }
67
+ return (h("button", { onClick: () => this._goto(n) }, n));
68
+ }), h("button", { onClick: this.goNext, class: "xpl-pagination-next" }, h("span", null, "Next"), h("svg", { viewBox: "0 0 20 20", "aria-hidden": "true" }, h("path", { "fill-rule": "evenodd", d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z", "clip-rule": "evenodd" }))))))));
89
69
  }
90
70
  static get is() { return "xpl-pagination"; }
91
- static get properties() { return {
92
- "total": {
93
- "type": "number",
94
- "mutable": false,
95
- "complexType": {
96
- "original": "number",
97
- "resolved": "number",
98
- "references": {}
99
- },
100
- "required": false,
101
- "optional": false,
102
- "docs": {
103
- "tags": [],
104
- "text": ""
105
- },
106
- "attribute": "total",
107
- "reflect": false
108
- },
109
- "perPage": {
110
- "type": "number",
111
- "mutable": false,
112
- "complexType": {
113
- "original": "number",
114
- "resolved": "number",
115
- "references": {}
116
- },
117
- "required": false,
118
- "optional": false,
119
- "docs": {
120
- "tags": [],
121
- "text": ""
122
- },
123
- "attribute": "per-page",
124
- "reflect": false
125
- },
126
- "waitForCallback": {
127
- "type": "boolean",
128
- "mutable": false,
129
- "complexType": {
130
- "original": "boolean",
131
- "resolved": "boolean",
132
- "references": {}
133
- },
134
- "required": false,
135
- "optional": false,
136
- "docs": {
137
- "tags": [],
138
- "text": ""
71
+ static get properties() {
72
+ return {
73
+ "total": {
74
+ "type": "number",
75
+ "mutable": false,
76
+ "complexType": {
77
+ "original": "number",
78
+ "resolved": "number",
79
+ "references": {}
80
+ },
81
+ "required": false,
82
+ "optional": false,
83
+ "docs": {
84
+ "tags": [],
85
+ "text": ""
86
+ },
87
+ "attribute": "total",
88
+ "reflect": false
139
89
  },
140
- "attribute": "wait-for-callback",
141
- "reflect": false
142
- }
143
- }; }
144
- static get states() { return {
145
- "current": {}
146
- }; }
147
- static get events() { return [{
148
- "method": "page",
149
- "name": "page",
150
- "bubbles": true,
151
- "cancelable": true,
152
- "composed": true,
153
- "docs": {
154
- "tags": [],
155
- "text": ""
90
+ "perPage": {
91
+ "type": "number",
92
+ "mutable": false,
93
+ "complexType": {
94
+ "original": "number",
95
+ "resolved": "number",
96
+ "references": {}
97
+ },
98
+ "required": false,
99
+ "optional": false,
100
+ "docs": {
101
+ "tags": [],
102
+ "text": ""
103
+ },
104
+ "attribute": "per-page",
105
+ "reflect": false
156
106
  },
157
- "complexType": {
158
- "original": "any",
159
- "resolved": "any",
160
- "references": {}
107
+ "waitForCallback": {
108
+ "type": "boolean",
109
+ "mutable": false,
110
+ "complexType": {
111
+ "original": "boolean",
112
+ "resolved": "boolean",
113
+ "references": {}
114
+ },
115
+ "required": false,
116
+ "optional": false,
117
+ "docs": {
118
+ "tags": [],
119
+ "text": ""
120
+ },
121
+ "attribute": "wait-for-callback",
122
+ "reflect": false
161
123
  }
162
- }]; }
163
- static get methods() { return {
164
- "goto": {
165
- "complexType": {
166
- "signature": "(n: number) => Promise<void>",
167
- "parameters": [{
168
- "tags": [{
169
- "text": "n",
170
- "name": "param"
171
- }],
172
- "text": ""
173
- }],
174
- "references": {
175
- "Promise": {
176
- "location": "global"
177
- }
124
+ };
125
+ }
126
+ static get states() {
127
+ return {
128
+ "current": {}
129
+ };
130
+ }
131
+ static get events() {
132
+ return [{
133
+ "method": "page",
134
+ "name": "page",
135
+ "bubbles": true,
136
+ "cancelable": true,
137
+ "composed": true,
138
+ "docs": {
139
+ "tags": [],
140
+ "text": ""
178
141
  },
179
- "return": "Promise<void>"
180
- },
181
- "docs": {
182
- "text": "Calling `goto` with a page number (which should probably be\ntaken from the `page` event) updates the pagination's state\nand re-renders it, showing the appropriate buttons given the current page.",
183
- "tags": [{
184
- "name": "param",
185
- "text": "n"
186
- }]
142
+ "complexType": {
143
+ "original": "any",
144
+ "resolved": "any",
145
+ "references": {}
146
+ }
147
+ }];
148
+ }
149
+ static get methods() {
150
+ return {
151
+ "goto": {
152
+ "complexType": {
153
+ "signature": "(n: number) => Promise<void>",
154
+ "parameters": [{
155
+ "tags": [{
156
+ "name": "param",
157
+ "text": "n"
158
+ }],
159
+ "text": ""
160
+ }],
161
+ "references": {
162
+ "Promise": {
163
+ "location": "global"
164
+ }
165
+ },
166
+ "return": "Promise<void>"
167
+ },
168
+ "docs": {
169
+ "text": "Calling `goto` with a page number (which should probably be\ntaken from the `page` event) updates the pagination's state\nand re-renders it, showing the appropriate buttons given the current page.",
170
+ "tags": [{
171
+ "name": "param",
172
+ "text": "n"
173
+ }]
174
+ }
187
175
  }
188
- }
189
- }; }
176
+ };
177
+ }
190
178
  }