@xplortech/apollo-core 0.5.3 → 1.0.0-beta.1

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 (205) hide show
  1. package/build/style.css +770 -412
  2. package/dist/apollo-core/apollo-core.css +9 -5468
  3. package/dist/apollo-core/apollo-core.esm.js +1 -125
  4. package/dist/apollo-core/index.esm.js +0 -1
  5. package/dist/apollo-core/p-09b2f746.entry.js +1 -0
  6. package/dist/apollo-core/p-1b1e7207.entry.js +1 -0
  7. package/dist/apollo-core/p-20389bb6.entry.js +1 -0
  8. package/dist/apollo-core/p-25983fde.entry.js +1 -0
  9. package/dist/apollo-core/p-2f90296c.js +10 -0
  10. package/dist/apollo-core/p-4a348764.entry.js +1 -0
  11. package/dist/apollo-core/p-4e2b69e8.entry.js +1 -0
  12. package/dist/apollo-core/p-84bf6b2d.entry.js +1 -0
  13. package/dist/apollo-core/p-880c0359.entry.js +1 -0
  14. package/dist/apollo-core/p-8e47a5be.entry.js +1 -0
  15. package/dist/apollo-core/p-93958292.entry.js +1 -0
  16. package/dist/apollo-core/p-93c27db5.entry.js +1 -0
  17. package/dist/apollo-core/p-ad90fe4d.js +1 -0
  18. package/dist/apollo-core/p-b2327e2c.entry.js +1 -0
  19. package/dist/apollo-core/p-c3a12469.entry.js +1 -0
  20. package/dist/apollo-core/p-c55b5d9c.entry.js +1 -0
  21. package/dist/apollo-core/p-e369d7af.entry.js +1 -0
  22. package/dist/apollo-core/p-e60ecaef.entry.js +1 -0
  23. package/dist/apollo-core/p-f929c958.js +1 -0
  24. package/dist/cjs/apollo-core.cjs.js +19 -0
  25. package/dist/cjs/index-54ba5804.js +1623 -0
  26. package/dist/cjs/index.cjs.js +2 -0
  27. package/dist/cjs/loader.cjs.js +21 -0
  28. package/dist/{apollo-core/regular-133c23b5.js → cjs/regular-872f5226.js} +3 -12
  29. package/dist/cjs/v4-14140ff3.js +77 -0
  30. package/dist/cjs/xpl-application-shell.cjs.entry.js +58 -0
  31. package/dist/cjs/xpl-avatar_12.cjs.entry.js +299 -0
  32. package/dist/cjs/xpl-backdrop.cjs.entry.js +25 -0
  33. package/dist/cjs/xpl-button-row.cjs.entry.js +22 -0
  34. package/dist/cjs/xpl-choicelist.cjs.entry.js +43 -0
  35. package/dist/cjs/xpl-divider.cjs.entry.js +18 -0
  36. package/dist/cjs/xpl-dropdown-group_3.cjs.entry.js +104 -0
  37. package/dist/cjs/xpl-dropdown_2.cjs.entry.js +123 -0
  38. package/dist/cjs/xpl-grid-item.cjs.entry.js +25 -0
  39. package/dist/cjs/xpl-grid.cjs.entry.js +35 -0
  40. package/dist/cjs/xpl-input.cjs.entry.js +2534 -0
  41. package/dist/cjs/xpl-list.cjs.entry.js +61 -0
  42. package/dist/cjs/xpl-main-nav.cjs.entry.js +30 -0
  43. package/dist/cjs/xpl-pagination.cjs.entry.js +76 -0
  44. package/dist/cjs/xpl-select.cjs.entry.js +625 -0
  45. package/dist/cjs/xpl-toggle.cjs.entry.js +34 -0
  46. package/dist/collection/collection-manifest.json +41 -0
  47. package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +147 -0
  48. package/dist/collection/components/xpl-avatar/xpl-avatar.js +158 -0
  49. package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +41 -0
  50. package/dist/collection/components/xpl-badge/xpl-badge.js +50 -0
  51. package/dist/{apollo-core/xpl-breadcrumb-item.entry.js → collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js} +12 -11
  52. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +13 -0
  53. package/dist/collection/components/xpl-button/xpl-button.js +211 -0
  54. package/dist/collection/components/xpl-button-row/xpl-button-row.js +117 -0
  55. package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +185 -0
  56. package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +150 -0
  57. package/dist/collection/components/xpl-content-area/xpl-content-area.js +39 -0
  58. package/dist/collection/components/xpl-divider/xpl-divider.js +30 -0
  59. package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +66 -0
  60. package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +27 -0
  61. package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +110 -0
  62. package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +260 -0
  63. package/dist/collection/components/xpl-grid/xpl-grid.js +26 -0
  64. package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +93 -0
  65. package/dist/collection/components/xpl-input/xpl-input.js +478 -0
  66. package/dist/collection/components/xpl-list/xpl-list.js +91 -0
  67. package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +72 -0
  68. package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +67 -0
  69. package/dist/collection/components/xpl-pagination/xpl-pagination.js +190 -0
  70. package/dist/collection/components/xpl-radio/xpl-radio.js +168 -0
  71. package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +9 -0
  72. package/dist/collection/components/xpl-select/xpl-select.js +344 -0
  73. package/dist/collection/components/xpl-table/xpl-table.js +200 -0
  74. package/dist/collection/components/xpl-tag/xpl-tag.js +30 -0
  75. package/dist/collection/components/xpl-toggle/xpl-toggle.js +157 -0
  76. package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +66 -0
  77. package/dist/custom-elements/index.d.ts +24 -0
  78. package/dist/custom-elements/index.js +20202 -0
  79. package/dist/esm/apollo-core.js +17 -0
  80. package/dist/esm/index-3df6db84.js +1594 -0
  81. package/dist/esm/index.js +1 -0
  82. package/dist/esm/loader.js +17 -0
  83. package/dist/esm/polyfills/core-js.js +11 -0
  84. package/dist/esm/polyfills/css-shim.js +1 -0
  85. package/dist/esm/polyfills/dom.js +79 -0
  86. package/dist/esm/polyfills/es5-html-element.js +1 -0
  87. package/dist/esm/polyfills/index.js +34 -0
  88. package/dist/esm/polyfills/system.js +6 -0
  89. package/dist/esm/regular-86225e9d.js +16041 -0
  90. package/dist/esm/v4-929670b7.js +75 -0
  91. package/dist/{apollo-core → esm}/xpl-application-shell.entry.js +12 -8
  92. package/dist/esm/xpl-avatar_12.entry.js +284 -0
  93. package/dist/{apollo-core → esm}/xpl-backdrop.entry.js +2 -2
  94. package/dist/{apollo-core → esm}/xpl-button-row.entry.js +2 -4
  95. package/dist/esm/xpl-choicelist.entry.js +39 -0
  96. package/dist/{apollo-core → esm}/xpl-divider.entry.js +2 -2
  97. package/dist/esm/xpl-dropdown-group_3.entry.js +98 -0
  98. package/dist/esm/xpl-dropdown_2.entry.js +118 -0
  99. package/dist/{apollo-core → esm}/xpl-grid-item.entry.js +2 -2
  100. package/dist/esm/xpl-grid.entry.js +31 -0
  101. package/dist/{apollo-core → esm}/xpl-input.entry.js +35 -45
  102. package/dist/{apollo-core → esm}/xpl-list.entry.js +18 -20
  103. package/dist/{apollo-core → esm}/xpl-main-nav.entry.js +2 -2
  104. package/dist/{apollo-core → esm}/xpl-pagination.entry.js +8 -8
  105. package/dist/{apollo-core → esm}/xpl-select.entry.js +88 -126
  106. package/dist/esm/xpl-toggle.entry.js +30 -0
  107. package/dist/index.cjs.js +1 -0
  108. package/dist/index.js +1 -0
  109. package/dist/stories/application-shell.stories.js +767 -0
  110. package/dist/stories/avatar.stories.js +173 -0
  111. package/dist/stories/backdrop.stories.js +18 -0
  112. package/dist/stories/badge.stories.js +48 -0
  113. package/dist/stories/breadcrumbs.stories.js +117 -0
  114. package/dist/stories/button-row.stories.js +68 -0
  115. package/dist/stories/button.stories.js +110 -0
  116. package/dist/stories/checkbox.stories.js +78 -0
  117. package/dist/stories/choicelist.stories.js +112 -0
  118. package/dist/stories/content-area.stories.js +53 -0
  119. package/dist/stories/divider.stories.js +34 -0
  120. package/dist/stories/dropdown.stories.js +377 -0
  121. package/dist/stories/grid.stories.js +100 -0
  122. package/dist/stories/input.stories.js +268 -0
  123. package/dist/stories/list.stories.js +154 -0
  124. package/dist/stories/main-nav.stories.js +308 -0
  125. package/dist/stories/pagination.stories.js +84 -0
  126. package/dist/stories/radio.stories.js +68 -0
  127. package/dist/stories/secondary-nav.stories.js +76 -0
  128. package/dist/stories/select.stories.js +119 -0
  129. package/dist/stories/table.stories.js +107 -0
  130. package/dist/stories/tabs.stories.js +24 -0
  131. package/dist/stories/toggle.stories.js +84 -0
  132. package/dist/stories/utility-bar.stories.js +94 -0
  133. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/application-shell.stories.d.ts +4 -4
  134. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/avatar.stories.d.ts +1 -1
  135. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/backdrop.stories.d.ts +1 -1
  136. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/badge.stories.d.ts +1 -1
  137. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/breadcrumbs.stories.d.ts +1 -1
  138. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/button-row.stories.d.ts +1 -1
  139. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/button.stories.d.ts +19 -10
  140. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/checkbox.stories.d.ts +2 -2
  141. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/choicelist.stories.d.ts +1 -1
  142. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/content-area.stories.d.ts +1 -1
  143. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/divider.stories.d.ts +1 -1
  144. package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/dropdown.stories.d.ts +135 -0
  145. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/grid.stories.d.ts +1 -1
  146. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/input.stories.d.ts +5 -5
  147. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/list.stories.d.ts +1 -1
  148. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/main-nav.stories.d.ts +1 -1
  149. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/radio.stories.d.ts +1 -1
  150. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/secondary-nav.stories.d.ts +1 -1
  151. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/select.stories.d.ts +2 -2
  152. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/table.stories.d.ts +1 -1
  153. package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/toggle.stories.d.ts +2 -2
  154. package/dist/types/components/xpl-application-shell/xpl-application-shell.d.ts +2 -2
  155. package/dist/types/components/xpl-avatar/xpl-avatar.d.ts +3 -3
  156. package/dist/types/components/xpl-badge/xpl-badge.d.ts +1 -1
  157. package/dist/types/components/xpl-button/xpl-button.d.ts +32 -8
  158. package/dist/types/components/xpl-button-row/xpl-button-row.d.ts +3 -3
  159. package/dist/types/components/xpl-checkbox/xpl-checkbox.d.ts +1 -1
  160. package/dist/types/components/xpl-choicelist/choice.d.ts +5 -5
  161. package/dist/types/components/xpl-choicelist/xpl-choicelist.d.ts +0 -1
  162. package/dist/types/components/xpl-content-area/xpl-content-area.d.ts +3 -3
  163. package/dist/types/components/xpl-dropdown/dropdownoption.d.ts +12 -0
  164. package/dist/types/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.d.ts +7 -0
  165. package/dist/types/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.d.ts +5 -0
  166. package/dist/types/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.d.ts +16 -0
  167. package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +34 -10
  168. package/dist/types/components/xpl-input/xpl-input.d.ts +4 -4
  169. package/dist/types/components/xpl-list/listitem.d.ts +19 -15
  170. package/dist/types/components/xpl-list/xpl-list.d.ts +2 -3
  171. package/dist/types/components/xpl-main-nav/xpl-main-nav.d.ts +1 -1
  172. package/dist/types/components/xpl-nav-item/xpl-nav-item.d.ts +10 -0
  173. package/dist/types/components/xpl-pagination/xpl-pagination.d.ts +1 -1
  174. package/dist/types/components/xpl-radio/xpl-radio.d.ts +1 -1
  175. package/dist/types/components/xpl-select/selectchoice.d.ts +3 -0
  176. package/dist/types/components/xpl-select/xpl-select.d.ts +6 -3
  177. package/dist/types/components/xpl-table/xpl-table.d.ts +1 -1
  178. package/dist/types/components/xpl-toggle/xpl-toggle.d.ts +1 -1
  179. package/dist/types/components.d.ts +264 -43
  180. package/package.json +10 -4
  181. package/dist/apollo-core/app-globals-0f993ce5.js +0 -3
  182. package/dist/apollo-core/css-shim-bbdf0cc6.js +0 -4
  183. package/dist/apollo-core/dom-1f98a75f.js +0 -73
  184. package/dist/apollo-core/index-3c9f25ef.js +0 -2938
  185. package/dist/apollo-core/index-912d1a21.js +0 -584
  186. package/dist/apollo-core/shadow-css-67b66845.js +0 -389
  187. package/dist/apollo-core/xpl-avatar.entry.js +0 -19
  188. package/dist/apollo-core/xpl-badge.entry.js +0 -17
  189. package/dist/apollo-core/xpl-breadcrumbs.entry.js +0 -14
  190. package/dist/apollo-core/xpl-button.entry.js +0 -34
  191. package/dist/apollo-core/xpl-checkbox.entry.js +0 -25
  192. package/dist/apollo-core/xpl-choicelist.entry.js +0 -32
  193. package/dist/apollo-core/xpl-content-area.entry.js +0 -16
  194. package/dist/apollo-core/xpl-grid.entry.js +0 -31
  195. package/dist/apollo-core/xpl-nav-item.entry.js +0 -12
  196. package/dist/apollo-core/xpl-radio.entry.js +0 -25
  197. package/dist/apollo-core/xpl-secondary-nav.entry.js +0 -12
  198. package/dist/apollo-core/xpl-table.entry.js +0 -85
  199. package/dist/apollo-core/xpl-tag.entry.js +0 -17
  200. package/dist/apollo-core/xpl-toggle.entry.js +0 -30
  201. package/dist/apollo-core/xpl-utility-bar.entry.js +0 -25
  202. package/dist/types/components/xpl-dropdown/dropdownchoice.d.ts +0 -6
  203. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/pagination.stories.d.ts +0 -0
  204. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/tabs.stories.d.ts +0 -0
  205. /package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/utility-bar.stories.d.ts +0 -0
@@ -0,0 +1,478 @@
1
+ import { Component, Host, h, Prop, State } from '@stencil/core';
2
+ import { v4 as uuid } from 'uuid';
3
+ import flatpickr from 'flatpickr';
4
+ import '../../../font-awesome/fontawesome';
5
+ import '../../../font-awesome/regular';
6
+ const arrowSvg = (rotate = false) => `<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="${rotate
7
+ ? 'M0.557948 5.6813L6.06209 0.132167C6.23831 -0.0440556 6.52327 -0.0440556 6.69949 0.132167L7.44187 0.874551C7.61809 1.05077 7.61809 1.33573 7.44187 1.51195L2.99882 6L7.44187 10.488C7.61809 10.6643 7.61809 10.9492 7.44187 11.1254L6.69949 11.8678C6.52327 12.0441 6.23831 12.0441 6.06209 11.8678L0.557948 6.3187C0.381726 6.14248 0.381726 5.85752 0.557948 5.6813Z'
8
+ : 'M7.44187 6.3187L1.93773 11.8678C1.76151 12.0441 1.47655 12.0441 1.30033 11.8678L0.557948 11.1254C0.381726 10.9492 0.381726 10.6643 0.557948 10.488L5.001 6L0.557948 1.51195C0.381726 1.33573 0.381726 1.05077 0.557948 0.874551L1.30033 0.132167C1.47655 -0.0440556 1.76151 -0.0440556 1.93773 0.132167L7.44187 5.6813C7.6181 5.85752 7.6181 6.14248 7.44187 6.3187Z'}" /></svg>`;
9
+ export class XplInput {
10
+ constructor() {
11
+ /**
12
+ * See https://flatpickr.js.org/formatting/
13
+ */
14
+ this.dateFormat = 'Y-m-d';
15
+ /**
16
+ * For datepicker inputs, whether to allow only a single
17
+ * date or a range of dates. (Multiple non-consecutive
18
+ * dates planned to be supported in the future.)
19
+ */
20
+ this.mode = 'single';
21
+ /**
22
+ * Whether to render as a singleline text input or
23
+ * as a multiline textarea. (If `true`, `pre` and `post`
24
+ * values will be ignored, if present.)
25
+ */
26
+ this.multiline = false;
27
+ this.type = 'text';
28
+ this.characterCount = 0;
29
+ this.passwordVisible = false;
30
+ }
31
+ updateCharacterCount() {
32
+ this.characterCount = this.input.value.length;
33
+ }
34
+ componentWillLoad() {
35
+ if (this._id === undefined || this._id === null || this._id === '')
36
+ this._id = uuid();
37
+ if (this.multiline && this.maxCharacterCount !== undefined) {
38
+ this.characterCount =
39
+ this.value !== undefined ? this.value.length : 0;
40
+ }
41
+ }
42
+ componentDidLoad() {
43
+ if (this.type === 'date') {
44
+ flatpickr(this.input, {
45
+ allowInput: true,
46
+ dateFormat: this.dateFormat,
47
+ defaultDate: this.value,
48
+ maxDate: this.max,
49
+ minDate: this.min,
50
+ mode: this.mode,
51
+ nextArrow: arrowSvg(),
52
+ prevArrow: arrowSvg(true),
53
+ });
54
+ }
55
+ }
56
+ render() {
57
+ let className = 'xpl-input';
58
+ if (this.disabled)
59
+ className += ' xpl-input--disabled';
60
+ let hasError = false;
61
+ if (this.error !== undefined)
62
+ hasError = true;
63
+ if (this.multiline &&
64
+ this.maxCharacterCount !== undefined &&
65
+ this.characterCount > this.maxCharacterCount)
66
+ hasError = true;
67
+ if (hasError)
68
+ className += ' xpl-input--error';
69
+ let type = this.type;
70
+ if (type === 'password' && this.passwordVisible) {
71
+ type = 'text';
72
+ }
73
+ return (h(Host, { class: className },
74
+ h("label", { class: "xpl-input-label", htmlFor: this._id },
75
+ this.label,
76
+ this.description && h("small", null, this.description)),
77
+ h("div", { class: "xpl-input-wrapper" },
78
+ this.pre && !this.multiline && (h("label", { class: "xpl-input-pre", htmlFor: this._id }, this.pre)),
79
+ !this.multiline ? (h("input", { autocomplete: this.type === 'date' ? 'off' : this.autocomplete, disabled: this.disabled, id: this._id, max: this.max, min: this.min, name: this.name, placeholder: this.placeholder, readonly: this.readonly, ref: (el) => {
80
+ this.input = el;
81
+ }, required: this.required, step: this.step, type: type, value: this.value })) : (h("textarea", { disabled: this.disabled, id: this._id, name: this.name, onInput: () => this.updateCharacterCount(), placeholder: this.placeholder, readonly: this.readonly, ref: (el) => {
82
+ this.input = el;
83
+ }, required: this.required }, this.value)),
84
+ this.type === 'date' && (h("span", { class: "xpl-input-calendar" },
85
+ h("i", { class: "far fa-calendar-alt" }))),
86
+ this.type === 'password' && (h("button", { class: "xpl-input-password", onClick: () => {
87
+ this.passwordVisible = !this.passwordVisible;
88
+ }, role: "presentation" },
89
+ h("span", { class: "sr-only" }, "Toggle password visibility"),
90
+ h("i", { class: "far fa-eye", style: {
91
+ display: this.passwordVisible
92
+ ? 'none'
93
+ : 'block',
94
+ } }),
95
+ h("i", { class: "far fa-eye-slash", style: {
96
+ display: this.passwordVisible
97
+ ? 'block'
98
+ : 'none',
99
+ } }))),
100
+ this.post && !this.multiline && (h("label", { class: "xpl-input-post", htmlFor: this._id }, this.post)),
101
+ this.multiline && this.maxCharacterCount !== undefined && (h("span", { class: "xpl-input-characters" },
102
+ this.characterCount,
103
+ "/",
104
+ this.maxCharacterCount))),
105
+ this.error !== undefined && this.error.length > 0 && (h("label", { class: "xpl-input-error", htmlFor: this._id },
106
+ h("svg", { width: "10", height: "11", viewBox: "0 0 10 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
107
+ h("path", { d: "M9.84375 5.25C9.84375 2.59375 7.65625 0.40625 5 0.40625C2.32422 0.40625 0.15625 2.59375 0.15625 5.25C0.15625 7.92578 2.32422 10.0938 5 10.0938C7.65625 10.0938 9.84375 7.92578 9.84375 5.25ZM5 6.22656C5.48828 6.22656 5.89844 6.63672 5.89844 7.125C5.89844 7.63281 5.48828 8.02344 5 8.02344C4.49219 8.02344 4.10156 7.63281 4.10156 7.125C4.10156 6.63672 4.49219 6.22656 5 6.22656ZM4.14062 3.00391C4.12109 2.86719 4.23828 2.75 4.375 2.75H5.60547C5.74219 2.75 5.85938 2.86719 5.83984 3.00391L5.70312 5.66016C5.68359 5.79688 5.58594 5.875 5.46875 5.875H4.51172C4.39453 5.875 4.29688 5.79688 4.27734 5.66016L4.14062 3.00391Z" })),
108
+ this.error))));
109
+ }
110
+ static get is() { return "xpl-input"; }
111
+ static get properties() { return {
112
+ "_id": {
113
+ "type": "string",
114
+ "mutable": false,
115
+ "complexType": {
116
+ "original": "string",
117
+ "resolved": "string",
118
+ "references": {}
119
+ },
120
+ "required": false,
121
+ "optional": true,
122
+ "docs": {
123
+ "tags": [],
124
+ "text": "Because `id` is a reserved HTMLElement attribute,\nwe prefix it with an underscore here so that it\ndoesn't get automatically applied to the outer container."
125
+ },
126
+ "attribute": "_id",
127
+ "reflect": false
128
+ },
129
+ "autocomplete": {
130
+ "type": "string",
131
+ "mutable": false,
132
+ "complexType": {
133
+ "original": "string",
134
+ "resolved": "string",
135
+ "references": {}
136
+ },
137
+ "required": false,
138
+ "optional": true,
139
+ "docs": {
140
+ "tags": [],
141
+ "text": ""
142
+ },
143
+ "attribute": "autocomplete",
144
+ "reflect": false
145
+ },
146
+ "dateFormat": {
147
+ "type": "string",
148
+ "mutable": false,
149
+ "complexType": {
150
+ "original": "string",
151
+ "resolved": "string",
152
+ "references": {}
153
+ },
154
+ "required": false,
155
+ "optional": true,
156
+ "docs": {
157
+ "tags": [],
158
+ "text": "See https://flatpickr.js.org/formatting/"
159
+ },
160
+ "attribute": "date-format",
161
+ "reflect": false,
162
+ "defaultValue": "'Y-m-d'"
163
+ },
164
+ "description": {
165
+ "type": "string",
166
+ "mutable": false,
167
+ "complexType": {
168
+ "original": "string",
169
+ "resolved": "string",
170
+ "references": {}
171
+ },
172
+ "required": false,
173
+ "optional": true,
174
+ "docs": {
175
+ "tags": [],
176
+ "text": "Optional text that appears below the input label."
177
+ },
178
+ "attribute": "description",
179
+ "reflect": false
180
+ },
181
+ "disabled": {
182
+ "type": "boolean",
183
+ "mutable": false,
184
+ "complexType": {
185
+ "original": "boolean",
186
+ "resolved": "boolean",
187
+ "references": {}
188
+ },
189
+ "required": false,
190
+ "optional": true,
191
+ "docs": {
192
+ "tags": [],
193
+ "text": ""
194
+ },
195
+ "attribute": "disabled",
196
+ "reflect": false
197
+ },
198
+ "error": {
199
+ "type": "string",
200
+ "mutable": false,
201
+ "complexType": {
202
+ "original": "string",
203
+ "resolved": "string",
204
+ "references": {}
205
+ },
206
+ "required": false,
207
+ "optional": true,
208
+ "docs": {
209
+ "tags": [],
210
+ "text": "If an empty string (attribute present with no value),\nwill display visually as an error. If a string is\nincluded, will display visually as an error and include\nthe value as an error message."
211
+ },
212
+ "attribute": "error",
213
+ "reflect": false
214
+ },
215
+ "label": {
216
+ "type": "string",
217
+ "mutable": false,
218
+ "complexType": {
219
+ "original": "string",
220
+ "resolved": "string",
221
+ "references": {}
222
+ },
223
+ "required": false,
224
+ "optional": false,
225
+ "docs": {
226
+ "tags": [],
227
+ "text": ""
228
+ },
229
+ "attribute": "label",
230
+ "reflect": false
231
+ },
232
+ "max": {
233
+ "type": "any",
234
+ "mutable": false,
235
+ "complexType": {
236
+ "original": "number | string",
237
+ "resolved": "number | string",
238
+ "references": {}
239
+ },
240
+ "required": false,
241
+ "optional": true,
242
+ "docs": {
243
+ "tags": [],
244
+ "text": "Only used when `type` = 'number' or 'date'"
245
+ },
246
+ "attribute": "max",
247
+ "reflect": false
248
+ },
249
+ "maxCharacterCount": {
250
+ "type": "number",
251
+ "mutable": false,
252
+ "complexType": {
253
+ "original": "number",
254
+ "resolved": "number",
255
+ "references": {}
256
+ },
257
+ "required": false,
258
+ "optional": true,
259
+ "docs": {
260
+ "tags": [],
261
+ "text": "For multiline inputs, a max. character count will\ndisplay along with the current character count,\nand will automatically render as an error if the\ncharacter count exceeds the max."
262
+ },
263
+ "attribute": "max-character-count",
264
+ "reflect": false
265
+ },
266
+ "min": {
267
+ "type": "any",
268
+ "mutable": false,
269
+ "complexType": {
270
+ "original": "number | string",
271
+ "resolved": "number | string",
272
+ "references": {}
273
+ },
274
+ "required": false,
275
+ "optional": true,
276
+ "docs": {
277
+ "tags": [],
278
+ "text": "Only used when `type` = 'number' or 'date'"
279
+ },
280
+ "attribute": "min",
281
+ "reflect": false
282
+ },
283
+ "mode": {
284
+ "type": "string",
285
+ "mutable": false,
286
+ "complexType": {
287
+ "original": "'single' | /* \"multiple\" | */ 'range'",
288
+ "resolved": "\"range\" | \"single\"",
289
+ "references": {}
290
+ },
291
+ "required": false,
292
+ "optional": true,
293
+ "docs": {
294
+ "tags": [],
295
+ "text": "For datepicker inputs, whether to allow only a single\ndate or a range of dates. (Multiple non-consecutive\ndates planned to be supported in the future.)"
296
+ },
297
+ "attribute": "mode",
298
+ "reflect": false,
299
+ "defaultValue": "'single'"
300
+ },
301
+ "multiline": {
302
+ "type": "boolean",
303
+ "mutable": false,
304
+ "complexType": {
305
+ "original": "boolean",
306
+ "resolved": "boolean",
307
+ "references": {}
308
+ },
309
+ "required": false,
310
+ "optional": true,
311
+ "docs": {
312
+ "tags": [],
313
+ "text": "Whether to render as a singleline text input or\nas a multiline textarea. (If `true`, `pre` and `post`\nvalues will be ignored, if present.)"
314
+ },
315
+ "attribute": "multiline",
316
+ "reflect": false,
317
+ "defaultValue": "false"
318
+ },
319
+ "name": {
320
+ "type": "string",
321
+ "mutable": false,
322
+ "complexType": {
323
+ "original": "string",
324
+ "resolved": "string",
325
+ "references": {}
326
+ },
327
+ "required": false,
328
+ "optional": true,
329
+ "docs": {
330
+ "tags": [],
331
+ "text": "Most inputs are used in forms, and should have a\n`name` associated with the input for handling form data."
332
+ },
333
+ "attribute": "name",
334
+ "reflect": false
335
+ },
336
+ "placeholder": {
337
+ "type": "string",
338
+ "mutable": false,
339
+ "complexType": {
340
+ "original": "string",
341
+ "resolved": "string",
342
+ "references": {}
343
+ },
344
+ "required": false,
345
+ "optional": true,
346
+ "docs": {
347
+ "tags": [],
348
+ "text": ""
349
+ },
350
+ "attribute": "placeholder",
351
+ "reflect": false
352
+ },
353
+ "post": {
354
+ "type": "string",
355
+ "mutable": false,
356
+ "complexType": {
357
+ "original": "string",
358
+ "resolved": "string",
359
+ "references": {}
360
+ },
361
+ "required": false,
362
+ "optional": true,
363
+ "docs": {
364
+ "tags": [],
365
+ "text": "A string (recommended max 3 characters) that gets shown\nvisually to the left of (before) the input."
366
+ },
367
+ "attribute": "post",
368
+ "reflect": false
369
+ },
370
+ "pre": {
371
+ "type": "string",
372
+ "mutable": false,
373
+ "complexType": {
374
+ "original": "string",
375
+ "resolved": "string",
376
+ "references": {}
377
+ },
378
+ "required": false,
379
+ "optional": true,
380
+ "docs": {
381
+ "tags": [],
382
+ "text": "A string (recommended max 8 characters) that gets shown\nvisually to the right of (after) the input."
383
+ },
384
+ "attribute": "pre",
385
+ "reflect": false
386
+ },
387
+ "readonly": {
388
+ "type": "boolean",
389
+ "mutable": false,
390
+ "complexType": {
391
+ "original": "boolean",
392
+ "resolved": "boolean",
393
+ "references": {}
394
+ },
395
+ "required": false,
396
+ "optional": true,
397
+ "docs": {
398
+ "tags": [],
399
+ "text": ""
400
+ },
401
+ "attribute": "readonly",
402
+ "reflect": false
403
+ },
404
+ "required": {
405
+ "type": "boolean",
406
+ "mutable": false,
407
+ "complexType": {
408
+ "original": "boolean",
409
+ "resolved": "boolean",
410
+ "references": {}
411
+ },
412
+ "required": false,
413
+ "optional": true,
414
+ "docs": {
415
+ "tags": [],
416
+ "text": ""
417
+ },
418
+ "attribute": "required",
419
+ "reflect": false
420
+ },
421
+ "step": {
422
+ "type": "number",
423
+ "mutable": false,
424
+ "complexType": {
425
+ "original": "number",
426
+ "resolved": "number",
427
+ "references": {}
428
+ },
429
+ "required": false,
430
+ "optional": true,
431
+ "docs": {
432
+ "tags": [],
433
+ "text": ""
434
+ },
435
+ "attribute": "step",
436
+ "reflect": false
437
+ },
438
+ "type": {
439
+ "type": "string",
440
+ "mutable": false,
441
+ "complexType": {
442
+ "original": "'date' | 'text' | 'number' | 'password'",
443
+ "resolved": "\"date\" | \"number\" | \"password\" | \"text\"",
444
+ "references": {}
445
+ },
446
+ "required": false,
447
+ "optional": true,
448
+ "docs": {
449
+ "tags": [],
450
+ "text": ""
451
+ },
452
+ "attribute": "type",
453
+ "reflect": false,
454
+ "defaultValue": "'text'"
455
+ },
456
+ "value": {
457
+ "type": "string",
458
+ "mutable": false,
459
+ "complexType": {
460
+ "original": "string",
461
+ "resolved": "string",
462
+ "references": {}
463
+ },
464
+ "required": false,
465
+ "optional": true,
466
+ "docs": {
467
+ "tags": [],
468
+ "text": "Including a `value` will prepopulate the input\nwith the given string."
469
+ },
470
+ "attribute": "value",
471
+ "reflect": false
472
+ }
473
+ }; }
474
+ static get states() { return {
475
+ "characterCount": {},
476
+ "passwordVisible": {}
477
+ }; }
478
+ }
@@ -0,0 +1,91 @@
1
+ /// <reference path="./listitem.d.ts"></reference>
2
+ import { Component, Host, h, Prop, Fragment, } from '@stencil/core';
3
+ import '../../../font-awesome/fontawesome';
4
+ import '../../../font-awesome/regular';
5
+ const ListItemCpt = ({ avatar, avatars, badges, href, title, subtext, metadata, }) => {
6
+ const hasRight = avatars || badges || subtext;
7
+ const inner = (h(Fragment, null,
8
+ avatar &&
9
+ (avatar.slice(0, 1) === '/' || avatar.slice(0, 4) === 'http' ? (h("xpl-avatar", { src: avatar, name: title })) : (h("xpl-avatar", { name: title }, avatar))),
10
+ h("div", { class: "xpl-list-item-content" },
11
+ h("div", { class: "xpl-list-left" },
12
+ h("div", null,
13
+ h("h4", null, title),
14
+ metadata && (h("ul", { class: "xpl-list-item-metadata" }, metadata.map((d) => {
15
+ if (typeof d === 'string') {
16
+ return h("li", null, d);
17
+ }
18
+ else {
19
+ return (h("li", null,
20
+ h("span", { class: `far fa-${d.icon}` }),
21
+ ' ',
22
+ d.text));
23
+ }
24
+ }))))),
25
+ hasRight && (h("div", { class: "xpl-list-right" },
26
+ subtext && (h("div", { class: "xpl-list-item-subtext" }, subtext)),
27
+ avatars && (h("div", { class: "xpl-avatar-group xpl-avatar-group--s" }, avatars.map((a) => (h("img", { src: a, alt: "" }))))),
28
+ badges &&
29
+ badges.map((b) => {
30
+ if (typeof b === 'string') {
31
+ return h("xpl-badge", null, b);
32
+ }
33
+ else {
34
+ return (h("xpl-badge", { dot: b.dot, variant: b.variant }, b.text));
35
+ }
36
+ }))))));
37
+ return href ? (h("a", { class: "xpl-list-item", href: href }, inner)) : (h("div", { class: "xpl-list-item" }, inner));
38
+ };
39
+ export class XplList {
40
+ constructor() {
41
+ /**
42
+ * `items` should be an array of objects with the following signature:
43
+ * {
44
+ * avatar?: string; // The URL of the avatar, or the placeholder initials (ex. "SPD").
45
+ * avatars?: string[]; // The URLs of multiple avatars to be displayed in a group on the right.
46
+ * badges?: string[] | { // An array of strings or badge-like objects to be displayed as badges
47
+ * dot?: boolean; // in a group on the right. See <xpl-badge> for more details.
48
+ * text: string;
49
+ * variant?: string;
50
+ * }[];
51
+ * href?: string; // A URL, if this list item is meant to link somewhere.
52
+ * title: string; // The text to be displayed for the list item.
53
+ * metadata?: string[] | { // An array of strings or strings with icons (reference the allowed
54
+ * icon: string; // Font Awesome icons) to be displayed as metadata below the title.
55
+ * text: string;
56
+ * }[];
57
+ * subtext?: string; // Subtext to be displayed on the right.
58
+ * }
59
+ *
60
+ * - Note that you should *only use one of* `avatars`, `badges`, or `subtext`, to avoid cluttering
61
+ * the right-hand side of the list item.
62
+ */
63
+ this.items = [];
64
+ }
65
+ render() {
66
+ return (h(Host, null, this.items.map((item) => (h(ListItemCpt, Object.assign({}, item))))));
67
+ }
68
+ static get is() { return "xpl-list"; }
69
+ static get properties() { return {
70
+ "items": {
71
+ "type": "unknown",
72
+ "mutable": false,
73
+ "complexType": {
74
+ "original": "ListItem[]",
75
+ "resolved": "ListItem[]",
76
+ "references": {
77
+ "ListItem": {
78
+ "location": "global"
79
+ }
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
+ }; }
91
+ }
@@ -0,0 +1,72 @@
1
+ import { Component, Host, h, Prop, Event } from '@stencil/core';
2
+ export class XplMainNav {
3
+ constructor() {
4
+ /**
5
+ * @property {string} width - The width of the Main Nav.
6
+ */
7
+ this.width = 'default';
8
+ }
9
+ navWidthHandler() {
10
+ this.navWidth.emit(this.width);
11
+ }
12
+ connectedCallback() {
13
+ this.navWidthHandler();
14
+ }
15
+ componentDidUpdate() {
16
+ this.navWidthHandler();
17
+ }
18
+ 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" })))));
28
+ }
29
+ 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": {}
70
+ }
71
+ }]; }
72
+ }