q2-tecton-elements 1.17.1 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/dist/cjs/click-elsewhere.cjs.entry.js +1 -1
  2. package/dist/cjs/{icons-e2bc9ee9.js → icons-afbdf88a.js} +1 -1
  3. package/dist/cjs/{index-afc50fbb.js → index-3518c78c.js} +9 -1
  4. package/dist/cjs/{index-0128397d.js → index-734296a7.js} +476 -271
  5. package/dist/cjs/loader.cjs.js +3 -3
  6. package/dist/cjs/q2-avatar.cjs.entry.js +9 -6
  7. package/dist/cjs/q2-badge_2.cjs.entry.js +46 -7
  8. package/dist/cjs/q2-btn_2.cjs.entry.js +31 -5
  9. package/dist/cjs/q2-calendar.cjs.entry.js +89 -62
  10. package/dist/cjs/q2-card.cjs.entry.js +17 -6
  11. package/dist/cjs/q2-carousel-pane.cjs.entry.js +7 -3
  12. package/dist/cjs/q2-carousel.cjs.entry.js +196 -285
  13. package/dist/cjs/q2-chart-donut.cjs.entry.js +583 -504
  14. package/dist/cjs/q2-checkbox-group.cjs.entry.js +9 -7
  15. package/dist/cjs/q2-checkbox.cjs.entry.js +17 -4
  16. package/dist/cjs/q2-dropdown-item.cjs.entry.js +9 -3
  17. package/dist/cjs/q2-dropdown.cjs.entry.js +16 -5
  18. package/dist/cjs/q2-editable-field.cjs.entry.js +16 -6
  19. package/dist/cjs/q2-icon.cjs.entry.js +6 -4
  20. package/dist/cjs/q2-loading-element.cjs.entry.js +6 -2
  21. package/dist/cjs/q2-loc.cjs.entry.js +5 -3
  22. package/dist/cjs/q2-message.cjs.entry.js +4 -3
  23. package/dist/cjs/q2-month-picker.cjs.entry.js +149 -0
  24. package/dist/cjs/q2-optgroup.cjs.entry.js +6 -5
  25. package/dist/cjs/{q2-option-list.cjs.entry.js → q2-option-list_2.cjs.entry.js} +120 -23
  26. package/dist/cjs/q2-option.cjs.entry.js +12 -2
  27. package/dist/cjs/q2-pagination.cjs.entry.js +18 -4
  28. package/dist/cjs/q2-pill.cjs.entry.js +40 -20
  29. package/dist/cjs/q2-radio-group.cjs.entry.js +13 -6
  30. package/dist/cjs/q2-radio.cjs.entry.js +13 -8
  31. package/dist/cjs/q2-section.cjs.entry.js +9 -4
  32. package/dist/cjs/q2-select.cjs.entry.js +28 -21
  33. package/dist/cjs/q2-stepper-pane.cjs.entry.js +8 -3
  34. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +5 -4
  35. package/dist/cjs/q2-stepper.cjs.entry.js +9 -7
  36. package/dist/cjs/q2-tab-container.cjs.entry.js +14 -9
  37. package/dist/cjs/q2-tab-pane.cjs.entry.js +10 -2
  38. package/dist/cjs/q2-tag.cjs.entry.js +32 -17
  39. package/dist/cjs/q2-tecton-elements.cjs.js +3 -3
  40. package/dist/cjs/q2-textarea.cjs.entry.js +20 -4
  41. package/dist/cjs/q2-tooltip.cjs.entry.js +70 -14
  42. package/dist/cjs/{shapes-c1a60d46.js → shapes-aad2b98f.js} +1 -1
  43. package/dist/cjs/tecton-tab-pane.cjs.entry.js +17 -2
  44. package/dist/collection/collection-manifest.json +4 -2
  45. package/dist/collection/components/click-elsewhere/index.js +18 -17
  46. package/dist/collection/components/q2-avatar/index.js +100 -92
  47. package/dist/collection/components/q2-avatar/styles.css +1 -1
  48. package/dist/collection/components/q2-badge/index.js +119 -111
  49. package/dist/collection/components/q2-badge/styles.css +1 -1
  50. package/dist/collection/components/q2-btn/index.js +351 -306
  51. package/dist/collection/components/q2-btn/styles.css +8 -7
  52. package/dist/collection/components/q2-calendar/index.js +565 -551
  53. package/dist/collection/components/q2-calendar/q2-month-picker.css +130 -0
  54. package/dist/collection/components/q2-calendar/q2-month-picker.js +242 -0
  55. package/dist/collection/components/q2-calendar/styles.css +1 -1
  56. package/dist/collection/components/q2-card/index.js +262 -244
  57. package/dist/collection/components/q2-card/styles.css +9 -2
  58. package/dist/collection/components/q2-carousel/index.js +249 -253
  59. package/dist/collection/components/q2-carousel/styles.css +1 -1
  60. package/dist/collection/components/q2-carousel-pane/index.js +108 -96
  61. package/dist/collection/components/q2-carousel-pane/styles.css +5 -4
  62. package/dist/collection/components/q2-chart-donut/index.js +350 -334
  63. package/dist/collection/components/q2-chart-donut/styles.css +3 -3
  64. package/dist/collection/components/q2-checkbox/index.js +296 -287
  65. package/dist/collection/components/q2-checkbox/styles.css +2 -2
  66. package/dist/collection/components/q2-checkbox-group/index.js +156 -152
  67. package/dist/collection/components/q2-checkbox-group/styles.css +1 -1
  68. package/dist/collection/components/q2-dropdown/index.js +255 -240
  69. package/dist/collection/components/q2-dropdown/styles.css +1 -1
  70. package/dist/collection/components/q2-dropdown-item/index.js +134 -123
  71. package/dist/collection/components/q2-dropdown-item/styles.css +12 -10
  72. package/dist/collection/components/q2-editable-field/index.js +300 -293
  73. package/dist/collection/components/q2-editable-field/styles.css +1 -1
  74. package/dist/collection/components/q2-icon/icons.js +358 -2158
  75. package/dist/collection/components/q2-icon/index.js +59 -49
  76. package/dist/collection/components/q2-icon/styles.css +1 -1
  77. package/dist/collection/components/q2-input/index.js +729 -705
  78. package/dist/collection/components/q2-input/styles.css +2 -2
  79. package/dist/collection/components/q2-loading/index.js +143 -132
  80. package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js +85 -74
  81. package/dist/collection/components/q2-loading/skeleton/shapes.js +23 -36
  82. package/dist/collection/components/q2-loading/styles.css +1 -1
  83. package/dist/collection/components/q2-loc/index.js +49 -39
  84. package/dist/collection/components/q2-loc/styles.css +1 -1
  85. package/dist/collection/components/q2-message/index.js +101 -92
  86. package/dist/collection/components/q2-message/styles.css +1 -1
  87. package/dist/collection/components/q2-optgroup/index.js +64 -56
  88. package/dist/collection/components/q2-optgroup/styles.css +1 -1
  89. package/dist/collection/components/q2-option/index.js +244 -229
  90. package/dist/collection/components/q2-option/styles.css +5 -1
  91. package/dist/collection/components/q2-option-list/index.js +295 -319
  92. package/dist/collection/components/q2-option-list/styles.css +2 -50
  93. package/dist/collection/components/q2-pagination/index.js +183 -173
  94. package/dist/collection/components/q2-pagination/styles.css +1 -1
  95. package/dist/collection/components/q2-pill/index.js +276 -221
  96. package/dist/collection/components/q2-pill/styles.css +12 -7
  97. package/dist/collection/components/q2-popover/index.js +263 -0
  98. package/dist/collection/components/q2-popover/styles.css +205 -0
  99. package/dist/collection/components/q2-radio/index.js +233 -224
  100. package/dist/collection/components/q2-radio/styles.css +3 -3
  101. package/dist/collection/components/q2-radio-group/index.js +252 -244
  102. package/dist/collection/components/q2-radio-group/styles.css +1 -1
  103. package/dist/collection/components/q2-section/index.js +134 -125
  104. package/dist/collection/components/q2-section/styles.css +12 -1
  105. package/dist/collection/components/q2-select/index.js +395 -385
  106. package/dist/collection/components/q2-select/styles.css +1 -1
  107. package/dist/collection/components/q2-stepper/index.js +124 -126
  108. package/dist/collection/components/q2-stepper/styles.css +2 -1
  109. package/dist/collection/components/q2-stepper-pane/index.js +165 -149
  110. package/dist/collection/components/q2-stepper-pane/styles.css +1 -1
  111. package/dist/collection/components/q2-stepper-vertical/index.js +86 -85
  112. package/dist/collection/components/q2-stepper-vertical/styles.css +1 -1
  113. package/dist/collection/components/q2-tab-container/index.js +189 -184
  114. package/dist/collection/components/q2-tab-container/styles.css +1 -1
  115. package/dist/collection/components/q2-tab-pane/index.js +185 -166
  116. package/dist/collection/components/q2-tab-pane/styles.css +1 -1
  117. package/dist/collection/components/q2-tag/index.js +180 -125
  118. package/dist/collection/components/q2-tag/styles.css +2 -6
  119. package/dist/collection/components/q2-textarea/index.js +344 -327
  120. package/dist/collection/components/q2-textarea/styles.css +2 -2
  121. package/dist/collection/components/q2-tooltip/index.js +207 -104
  122. package/dist/collection/components/q2-tooltip/styles.css +63 -83
  123. package/dist/collection/components/tecton-tab-pane/index.js +287 -266
  124. package/dist/collection/components/tecton-tab-pane/styles.css +1 -1
  125. package/dist/collection/utils/index.js +9 -6
  126. package/dist/esm/click-elsewhere.entry.js +1 -1
  127. package/dist/esm/{icons-ed54e307.js → icons-78da5dd2.js} +1 -1
  128. package/dist/esm/{index-2ca8c93c.js → index-9c591682.js} +9 -2
  129. package/dist/esm/{index-6d5ed7cc.js → index-bb1c8c7f.js} +476 -271
  130. package/dist/esm/loader.js +3 -3
  131. package/dist/esm/polyfills/css-shim.js +1 -1
  132. package/dist/esm/q2-avatar.entry.js +9 -6
  133. package/dist/esm/q2-badge_2.entry.js +46 -7
  134. package/dist/esm/q2-btn_2.entry.js +31 -5
  135. package/dist/esm/q2-calendar.entry.js +89 -62
  136. package/dist/esm/q2-card.entry.js +17 -6
  137. package/dist/esm/q2-carousel-pane.entry.js +7 -3
  138. package/dist/esm/q2-carousel.entry.js +196 -285
  139. package/dist/esm/q2-chart-donut.entry.js +583 -504
  140. package/dist/esm/q2-checkbox-group.entry.js +9 -7
  141. package/dist/esm/q2-checkbox.entry.js +17 -4
  142. package/dist/esm/q2-dropdown-item.entry.js +9 -3
  143. package/dist/esm/q2-dropdown.entry.js +16 -5
  144. package/dist/esm/q2-editable-field.entry.js +16 -6
  145. package/dist/esm/q2-icon.entry.js +6 -4
  146. package/dist/esm/q2-loading-element.entry.js +6 -2
  147. package/dist/esm/q2-loc.entry.js +5 -3
  148. package/dist/esm/q2-message.entry.js +4 -3
  149. package/dist/esm/q2-month-picker.entry.js +145 -0
  150. package/dist/esm/q2-optgroup.entry.js +6 -5
  151. package/dist/esm/{q2-option-list.entry.js → q2-option-list_2.entry.js} +120 -24
  152. package/dist/esm/q2-option.entry.js +12 -2
  153. package/dist/esm/q2-pagination.entry.js +18 -4
  154. package/dist/esm/q2-pill.entry.js +40 -20
  155. package/dist/esm/q2-radio-group.entry.js +13 -6
  156. package/dist/esm/q2-radio.entry.js +13 -8
  157. package/dist/esm/q2-section.entry.js +9 -4
  158. package/dist/esm/q2-select.entry.js +28 -21
  159. package/dist/esm/q2-stepper-pane.entry.js +8 -3
  160. package/dist/esm/q2-stepper-vertical.entry.js +5 -4
  161. package/dist/esm/q2-stepper.entry.js +9 -7
  162. package/dist/esm/q2-tab-container.entry.js +14 -9
  163. package/dist/esm/q2-tab-pane.entry.js +10 -2
  164. package/dist/esm/q2-tag.entry.js +32 -17
  165. package/dist/esm/q2-tecton-elements.js +3 -3
  166. package/dist/esm/q2-textarea.entry.js +20 -4
  167. package/dist/esm/q2-tooltip.entry.js +70 -14
  168. package/dist/esm/{shapes-c32e3ba2.js → shapes-62b8a431.js} +1 -1
  169. package/dist/esm/tecton-tab-pane.entry.js +17 -2
  170. package/dist/loader/package.json +1 -0
  171. package/dist/q2-tecton-elements/p-0ba564b1.entry.js +1 -0
  172. package/dist/q2-tecton-elements/p-0fad9c5a.entry.js +1 -0
  173. package/dist/q2-tecton-elements/{p-73154834.js → p-13a639cf.js} +1 -1
  174. package/dist/q2-tecton-elements/p-16c11d74.entry.js +1 -0
  175. package/dist/q2-tecton-elements/p-17e0cbf1.entry.js +1 -0
  176. package/dist/q2-tecton-elements/p-18e095af.entry.js +1 -0
  177. package/dist/q2-tecton-elements/p-2c9b1308.entry.js +1 -0
  178. package/dist/q2-tecton-elements/p-2e832e42.entry.js +1 -0
  179. package/dist/q2-tecton-elements/p-315fdb74.entry.js +1 -0
  180. package/dist/q2-tecton-elements/{p-318758d4.entry.js → p-444415b5.entry.js} +1 -1
  181. package/dist/q2-tecton-elements/p-4d700630.entry.js +1 -0
  182. package/dist/q2-tecton-elements/p-4f0f45e7.entry.js +1 -0
  183. package/dist/q2-tecton-elements/p-54e792bd.entry.js +1 -0
  184. package/dist/q2-tecton-elements/{p-41fcf343.js → p-5e374fbd.js} +1 -1
  185. package/dist/q2-tecton-elements/p-5f064e1e.entry.js +39 -0
  186. package/dist/q2-tecton-elements/p-692f2d09.entry.js +1 -0
  187. package/dist/q2-tecton-elements/p-6e6b5b80.entry.js +1 -0
  188. package/dist/q2-tecton-elements/p-7e8f43d1.entry.js +1 -0
  189. package/dist/q2-tecton-elements/p-8e380edf.entry.js +1 -0
  190. package/dist/q2-tecton-elements/p-926a3e80.js +2 -0
  191. package/dist/q2-tecton-elements/{p-93c00587.js → p-92e1faf8.js} +1 -1
  192. package/dist/q2-tecton-elements/p-9772b15f.entry.js +1 -0
  193. package/dist/q2-tecton-elements/p-97aa8423.entry.js +1 -0
  194. package/dist/q2-tecton-elements/{p-17cffd7d.entry.js → p-a987402e.entry.js} +1 -1
  195. package/dist/q2-tecton-elements/p-aaf42539.entry.js +1 -0
  196. package/dist/q2-tecton-elements/p-ac674c20.entry.js +1 -0
  197. package/dist/q2-tecton-elements/p-b8b00394.entry.js +1 -0
  198. package/dist/q2-tecton-elements/p-c444a60b.entry.js +1 -0
  199. package/dist/q2-tecton-elements/p-c6c489fe.entry.js +1 -0
  200. package/dist/q2-tecton-elements/p-ce015552.entry.js +1 -0
  201. package/dist/q2-tecton-elements/p-d464fccc.entry.js +1 -0
  202. package/dist/q2-tecton-elements/p-de164483.entry.js +1 -0
  203. package/dist/q2-tecton-elements/p-df91e954.entry.js +1 -0
  204. package/dist/q2-tecton-elements/p-e6d26f39.entry.js +1 -0
  205. package/dist/q2-tecton-elements/p-e8e113c2.entry.js +1 -0
  206. package/dist/q2-tecton-elements/p-f1d06917.entry.js +1 -0
  207. package/dist/q2-tecton-elements/p-f800fd1e.entry.js +1 -0
  208. package/dist/q2-tecton-elements/p-fb37e67e.entry.js +1 -0
  209. package/dist/q2-tecton-elements/p-fc134a5d.entry.js +1 -0
  210. package/dist/q2-tecton-elements/p-fe88e979.entry.js +1 -0
  211. package/dist/q2-tecton-elements/p-ffb48ccc.entry.js +1 -0
  212. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  213. package/dist/test/helpers.js +6 -0
  214. package/dist/types/components/q2-btn/index.d.ts +1 -0
  215. package/dist/types/components/q2-calendar/q2-month-picker.d.ts +24 -0
  216. package/dist/types/components/q2-option-list/index.d.ts +1 -4
  217. package/dist/types/components/q2-pill/index.d.ts +10 -3
  218. package/dist/types/components/q2-popover/index.d.ts +26 -0
  219. package/dist/types/components/q2-tag/index.d.ts +8 -2
  220. package/dist/types/components/q2-tooltip/index.d.ts +12 -0
  221. package/dist/types/components.d.ts +203 -38
  222. package/dist/types/stencil-public-runtime.d.ts +20 -4
  223. package/dist/types/utils/index.d.ts +1 -0
  224. package/dist/types/workspace/workspace/{tecton-production_release_1.17.x → Tecton_tecton-production_master}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +2 -0
  225. package/package.json +6 -6
  226. package/dist/q2-tecton-elements/p-06865cf5.entry.js +0 -1
  227. package/dist/q2-tecton-elements/p-0d849ed4.entry.js +0 -1
  228. package/dist/q2-tecton-elements/p-2a217895.entry.js +0 -1
  229. package/dist/q2-tecton-elements/p-2b94ae62.entry.js +0 -1
  230. package/dist/q2-tecton-elements/p-2faed36b.entry.js +0 -1
  231. package/dist/q2-tecton-elements/p-30a4fdfb.entry.js +0 -1
  232. package/dist/q2-tecton-elements/p-30f81b22.entry.js +0 -1
  233. package/dist/q2-tecton-elements/p-31070ab8.entry.js +0 -1
  234. package/dist/q2-tecton-elements/p-41c22a16.entry.js +0 -1
  235. package/dist/q2-tecton-elements/p-445e7c45.entry.js +0 -1
  236. package/dist/q2-tecton-elements/p-44bdaf52.entry.js +0 -1
  237. package/dist/q2-tecton-elements/p-4c53713d.entry.js +0 -1
  238. package/dist/q2-tecton-elements/p-4da9b6b6.entry.js +0 -1
  239. package/dist/q2-tecton-elements/p-5acb7ec6.entry.js +0 -1
  240. package/dist/q2-tecton-elements/p-64605d17.entry.js +0 -1
  241. package/dist/q2-tecton-elements/p-64ca8c59.entry.js +0 -1
  242. package/dist/q2-tecton-elements/p-654fcd6b.entry.js +0 -1
  243. package/dist/q2-tecton-elements/p-661c2092.entry.js +0 -1
  244. package/dist/q2-tecton-elements/p-732dafd0.entry.js +0 -1
  245. package/dist/q2-tecton-elements/p-815c8a7d.entry.js +0 -1
  246. package/dist/q2-tecton-elements/p-824a1d7c.entry.js +0 -1
  247. package/dist/q2-tecton-elements/p-8543a0e1.entry.js +0 -1
  248. package/dist/q2-tecton-elements/p-916fd90b.entry.js +0 -1
  249. package/dist/q2-tecton-elements/p-94b3c534.entry.js +0 -1
  250. package/dist/q2-tecton-elements/p-9725d55f.entry.js +0 -1
  251. package/dist/q2-tecton-elements/p-a45c6b65.entry.js +0 -1
  252. package/dist/q2-tecton-elements/p-a659d112.entry.js +0 -1
  253. package/dist/q2-tecton-elements/p-b4b8f85c.entry.js +0 -39
  254. package/dist/q2-tecton-elements/p-b595b415.entry.js +0 -1
  255. package/dist/q2-tecton-elements/p-c5691700.js +0 -1
  256. package/dist/q2-tecton-elements/p-cde0cdff.entry.js +0 -1
  257. package/dist/q2-tecton-elements/p-d3e4cc5d.entry.js +0 -1
  258. package/dist/q2-tecton-elements/p-d781e2d9.entry.js +0 -1
  259. package/dist/q2-tecton-elements/p-d8d9e8eb.entry.js +0 -1
  260. package/dist/q2-tecton-elements/p-fbf23146.entry.js +0 -1
  261. package/dist/test/elements/q2-tag-test.js +0 -151
  262. package/dist/types/workspace/workspace/tecton-production_release_1.17.x/packages/q2-tecton-elements/.stencil/test/elements/q2-tag-test.d.ts +0 -1
@@ -1,10 +1,7 @@
1
- import { Component, Prop, h, Event, State, Element, Host, Method, Watch, Listen, } from '@stencil/core';
1
+ import { h, Host, } from '@stencil/core';
2
2
  import { isEventFromElement, overrideFocus } from 'src/utils';
3
3
  export class Q2OptionList {
4
4
  constructor() {
5
- this.role = 'listbox';
6
- this.direction = 'down';
7
- this.selectedOptions = [];
8
5
  this.scheduledAfterRender = [];
9
6
  /// Event Handlers ///
10
7
  /* tslint:disable:cyclomatic-complexity */
@@ -86,7 +83,7 @@ export class Q2OptionList {
86
83
  case 'Escape':
87
84
  if (this.noSelect)
88
85
  this.setActiveElement(null);
89
- this.open = false;
86
+ this.popoverState.emit({ open: false });
90
87
  break;
91
88
  default:
92
89
  if (customSearch)
@@ -114,6 +111,16 @@ export class Q2OptionList {
114
111
  }
115
112
  this.selectOption(target.value);
116
113
  };
114
+ this.role = 'listbox';
115
+ this.direction = 'down';
116
+ this.customSearch = undefined;
117
+ this.noSelect = undefined;
118
+ this.align = undefined;
119
+ this.selectedOptions = [];
120
+ this.multiple = undefined;
121
+ this.disabled = undefined;
122
+ this.type = undefined;
123
+ this.hasOptions = undefined;
117
124
  }
118
125
  /// LifeCycle Hooks ///
119
126
  componentWillLoad() {
@@ -122,6 +129,7 @@ export class Q2OptionList {
122
129
  componentDidLoad() {
123
130
  overrideFocus(this.hostElement);
124
131
  this.checkOptions();
132
+ this.selectedOptionsUpdated();
125
133
  }
126
134
  componentDidRender() {
127
135
  this.scheduledAfterRender.forEach(fn => fn());
@@ -168,7 +176,7 @@ export class Q2OptionList {
168
176
  if (this.disabled)
169
177
  return;
170
178
  this.activeIndex = activeIndex;
171
- this.open = true;
179
+ this.popoverState.emit({ open: true });
172
180
  this.setActiveOption();
173
181
  this.setFocusedOption();
174
182
  this.scheduledAfterRender.push(() => {
@@ -202,8 +210,6 @@ export class Q2OptionList {
202
210
  });
203
211
  }
204
212
  setActiveOption() {
205
- if (!this.open)
206
- return;
207
213
  const activeIndex = this.activeIndex;
208
214
  this.allOptions.forEach((element, elementIndex) => {
209
215
  element.active = activeIndex === elementIndex;
@@ -256,7 +262,7 @@ export class Q2OptionList {
256
262
  this.change.emit({ value: selectedValue, values });
257
263
  if (multiple)
258
264
  return;
259
- this.open = false;
265
+ this.popoverState.emit({ open: false });
260
266
  }
261
267
  adjustActiveOptionAndScroll(numToAdd) {
262
268
  this.activeIndex += numToAdd;
@@ -292,24 +298,17 @@ export class Q2OptionList {
292
298
  this.updateSingleOptionAttrs();
293
299
  }
294
300
  }
295
- openChanged(newValue) {
296
- this.optionListState.emit({ open: newValue });
297
- }
298
301
  /// Listeners ///
299
302
  delegateFocus(event) {
300
303
  if (!isEventFromElement(event, this.hostElement))
301
304
  return;
302
- this.open = true;
305
+ this.popoverState.emit({ open: true });
303
306
  this.setDefaultActiveElement();
304
307
  }
305
308
  handleClick(event) {
306
309
  event.stopPropagation();
307
310
  }
308
311
  /// Public Methods ///
309
- async toggle() {
310
- const isOpen = !this.open;
311
- this.open = isOpen;
312
- }
313
312
  async setDefaultActiveElement() {
314
313
  this.activeIndex = this.getDefaultActiveIndex();
315
314
  this.setActiveOption();
@@ -323,7 +322,7 @@ export class Q2OptionList {
323
322
  async handleExternalKeydown(event) {
324
323
  const keysThatTriggerOpen = ['ArrowDown', 'ArrowUp', 'PageDown', 'PageUp', 'Home', 'End'];
325
324
  if (keysThatTriggerOpen.includes(event.key)) {
326
- this.open = true;
325
+ this.popoverState.emit({ open: true });
327
326
  }
328
327
  const keysThatTriggerDefault = ['ArrowDown', 'ArrowUp'];
329
328
  if (keysThatTriggerDefault.includes(event.key)) {
@@ -336,328 +335,305 @@ export class Q2OptionList {
336
335
  }
337
336
  /// DOM ///
338
337
  render() {
339
- return (h(Host, null,
340
- h("div", { class: "content", ref: el => (this.contentElement = el), onFocusout: this.focusoutHandler },
341
- h("div", { class: "options", role: this.type || 'listbox', onKeyDown: this.keydownHandler, onClick: this.clickHandler },
342
- h("slot", null)))));
338
+ return (h(Host, null, h("div", { class: "content", ref: el => (this.contentElement = el), onFocusout: this.focusoutHandler }, h("div", { class: "options", role: this.type || 'listbox', onKeyDown: this.keydownHandler, onClick: this.clickHandler }, h("slot", null)))));
343
339
  }
344
340
  static get is() { return "q2-option-list"; }
345
341
  static get encapsulation() { return "shadow"; }
346
- static get originalStyleUrls() { return {
347
- "$": ["styles.scss"]
348
- }; }
349
- static get styleUrls() { return {
350
- "$": ["styles.css"]
351
- }; }
352
- static get properties() { return {
353
- "role": {
354
- "type": "string",
355
- "mutable": false,
356
- "complexType": {
357
- "original": "'listbox' | 'menu'",
358
- "resolved": "\"listbox\" | \"menu\"",
359
- "references": {}
360
- },
361
- "required": false,
362
- "optional": false,
363
- "docs": {
364
- "tags": [],
365
- "text": ""
366
- },
367
- "attribute": "role",
368
- "reflect": true,
369
- "defaultValue": "'listbox'"
370
- },
371
- "direction": {
372
- "type": "string",
373
- "mutable": false,
374
- "complexType": {
375
- "original": "'up' | 'down'",
376
- "resolved": "\"down\" | \"up\"",
377
- "references": {}
378
- },
379
- "required": false,
380
- "optional": false,
381
- "docs": {
382
- "tags": [],
383
- "text": ""
384
- },
385
- "attribute": "direction",
386
- "reflect": true,
387
- "defaultValue": "'down'"
388
- },
389
- "open": {
390
- "type": "boolean",
391
- "mutable": true,
392
- "complexType": {
393
- "original": "boolean",
394
- "resolved": "boolean",
395
- "references": {}
396
- },
397
- "required": false,
398
- "optional": false,
399
- "docs": {
400
- "tags": [],
401
- "text": ""
402
- },
403
- "attribute": "open",
404
- "reflect": true
405
- },
406
- "customSearch": {
407
- "type": "boolean",
408
- "mutable": false,
409
- "complexType": {
410
- "original": "boolean",
411
- "resolved": "boolean",
412
- "references": {}
413
- },
414
- "required": false,
415
- "optional": false,
416
- "docs": {
417
- "tags": [],
418
- "text": ""
419
- },
420
- "attribute": "custom-search",
421
- "reflect": true
422
- },
423
- "noSelect": {
424
- "type": "boolean",
425
- "mutable": false,
426
- "complexType": {
427
- "original": "boolean",
428
- "resolved": "boolean",
429
- "references": {}
430
- },
431
- "required": false,
432
- "optional": false,
433
- "docs": {
434
- "tags": [],
435
- "text": ""
436
- },
437
- "attribute": "no-select",
438
- "reflect": true
439
- },
440
- "align": {
441
- "type": "string",
442
- "mutable": false,
443
- "complexType": {
444
- "original": "'left' | 'right'",
445
- "resolved": "\"left\" | \"right\"",
446
- "references": {}
447
- },
448
- "required": false,
449
- "optional": false,
450
- "docs": {
451
- "tags": [],
452
- "text": ""
453
- },
454
- "attribute": "align",
455
- "reflect": true
456
- },
457
- "selectedOptions": {
458
- "type": "unknown",
459
- "mutable": true,
460
- "complexType": {
461
- "original": "IOptionValue[]",
462
- "resolved": "IOptionValue[]",
463
- "references": {
464
- "IOptionValue": {
465
- "location": "local"
466
- }
467
- }
468
- },
469
- "required": false,
470
- "optional": false,
471
- "docs": {
472
- "tags": [],
473
- "text": ""
474
- },
475
- "defaultValue": "[]"
476
- },
477
- "multiple": {
478
- "type": "boolean",
479
- "mutable": false,
480
- "complexType": {
481
- "original": "boolean",
482
- "resolved": "boolean",
483
- "references": {}
484
- },
485
- "required": false,
486
- "optional": false,
487
- "docs": {
488
- "tags": [],
489
- "text": ""
490
- },
491
- "attribute": "multiple",
492
- "reflect": true
493
- },
494
- "disabled": {
495
- "type": "boolean",
496
- "mutable": false,
497
- "complexType": {
498
- "original": "boolean",
499
- "resolved": "boolean",
500
- "references": {}
342
+ static get originalStyleUrls() {
343
+ return {
344
+ "$": ["styles.scss"]
345
+ };
346
+ }
347
+ static get styleUrls() {
348
+ return {
349
+ "$": ["styles.css"]
350
+ };
351
+ }
352
+ static get properties() {
353
+ return {
354
+ "role": {
355
+ "type": "string",
356
+ "mutable": false,
357
+ "complexType": {
358
+ "original": "'listbox' | 'menu'",
359
+ "resolved": "\"listbox\" | \"menu\"",
360
+ "references": {}
361
+ },
362
+ "required": false,
363
+ "optional": false,
364
+ "docs": {
365
+ "tags": [],
366
+ "text": ""
367
+ },
368
+ "attribute": "role",
369
+ "reflect": true,
370
+ "defaultValue": "'listbox'"
501
371
  },
502
- "required": false,
503
- "optional": false,
504
- "docs": {
505
- "tags": [],
506
- "text": ""
372
+ "direction": {
373
+ "type": "string",
374
+ "mutable": false,
375
+ "complexType": {
376
+ "original": "'up' | 'down'",
377
+ "resolved": "\"down\" | \"up\"",
378
+ "references": {}
379
+ },
380
+ "required": false,
381
+ "optional": false,
382
+ "docs": {
383
+ "tags": [],
384
+ "text": ""
385
+ },
386
+ "attribute": "direction",
387
+ "reflect": true,
388
+ "defaultValue": "'down'"
507
389
  },
508
- "attribute": "disabled",
509
- "reflect": true
510
- },
511
- "type": {
512
- "type": "string",
513
- "mutable": false,
514
- "complexType": {
515
- "original": "'menu' | 'listbox'",
516
- "resolved": "\"listbox\" | \"menu\"",
517
- "references": {}
390
+ "customSearch": {
391
+ "type": "boolean",
392
+ "mutable": false,
393
+ "complexType": {
394
+ "original": "boolean",
395
+ "resolved": "boolean",
396
+ "references": {}
397
+ },
398
+ "required": false,
399
+ "optional": false,
400
+ "docs": {
401
+ "tags": [],
402
+ "text": ""
403
+ },
404
+ "attribute": "custom-search",
405
+ "reflect": true
518
406
  },
519
- "required": false,
520
- "optional": false,
521
- "docs": {
522
- "tags": [],
523
- "text": ""
407
+ "noSelect": {
408
+ "type": "boolean",
409
+ "mutable": false,
410
+ "complexType": {
411
+ "original": "boolean",
412
+ "resolved": "boolean",
413
+ "references": {}
414
+ },
415
+ "required": false,
416
+ "optional": false,
417
+ "docs": {
418
+ "tags": [],
419
+ "text": ""
420
+ },
421
+ "attribute": "no-select",
422
+ "reflect": true
524
423
  },
525
- "attribute": "type",
526
- "reflect": false
527
- }
528
- }; }
529
- static get states() { return {
530
- "hasOptions": {}
531
- }; }
532
- static get events() { return [{
533
- "method": "change",
534
- "name": "change",
535
- "bubbles": true,
536
- "cancelable": true,
537
- "composed": true,
538
- "docs": {
539
- "tags": [],
540
- "text": ""
424
+ "align": {
425
+ "type": "string",
426
+ "mutable": false,
427
+ "complexType": {
428
+ "original": "'left' | 'right'",
429
+ "resolved": "\"left\" | \"right\"",
430
+ "references": {}
431
+ },
432
+ "required": false,
433
+ "optional": false,
434
+ "docs": {
435
+ "tags": [],
436
+ "text": ""
437
+ },
438
+ "attribute": "align",
439
+ "reflect": true
541
440
  },
542
- "complexType": {
543
- "original": "{ value: string; values: IOptionValue[] }",
544
- "resolved": "{ value: string; values: IOptionValue[]; }",
545
- "references": {
546
- "IOptionValue": {
547
- "location": "local"
441
+ "selectedOptions": {
442
+ "type": "unknown",
443
+ "mutable": true,
444
+ "complexType": {
445
+ "original": "IOptionValue[]",
446
+ "resolved": "IOptionValue[]",
447
+ "references": {
448
+ "IOptionValue": {
449
+ "location": "local"
450
+ }
548
451
  }
549
- }
550
- }
551
- }, {
552
- "method": "optionListState",
553
- "name": "optionListState",
554
- "bubbles": true,
555
- "cancelable": true,
556
- "composed": true,
557
- "docs": {
558
- "tags": [],
559
- "text": ""
452
+ },
453
+ "required": false,
454
+ "optional": false,
455
+ "docs": {
456
+ "tags": [],
457
+ "text": ""
458
+ },
459
+ "defaultValue": "[]"
560
460
  },
561
- "complexType": {
562
- "original": "{ open: boolean }",
563
- "resolved": "{ open: boolean; }",
564
- "references": {}
565
- }
566
- }]; }
567
- static get methods() { return {
568
- "toggle": {
569
- "complexType": {
570
- "signature": "() => Promise<void>",
571
- "parameters": [],
572
- "references": {
573
- "Promise": {
574
- "location": "global"
575
- }
461
+ "multiple": {
462
+ "type": "boolean",
463
+ "mutable": false,
464
+ "complexType": {
465
+ "original": "boolean",
466
+ "resolved": "boolean",
467
+ "references": {}
576
468
  },
577
- "return": "Promise<void>"
469
+ "required": false,
470
+ "optional": false,
471
+ "docs": {
472
+ "tags": [],
473
+ "text": ""
474
+ },
475
+ "attribute": "multiple",
476
+ "reflect": true
578
477
  },
579
- "docs": {
580
- "text": "",
581
- "tags": []
582
- }
583
- },
584
- "setDefaultActiveElement": {
585
- "complexType": {
586
- "signature": "() => Promise<void>",
587
- "parameters": [],
588
- "references": {
589
- "Promise": {
590
- "location": "global"
591
- }
478
+ "disabled": {
479
+ "type": "boolean",
480
+ "mutable": false,
481
+ "complexType": {
482
+ "original": "boolean",
483
+ "resolved": "boolean",
484
+ "references": {}
592
485
  },
593
- "return": "Promise<void>"
486
+ "required": false,
487
+ "optional": false,
488
+ "docs": {
489
+ "tags": [],
490
+ "text": ""
491
+ },
492
+ "attribute": "disabled",
493
+ "reflect": true
594
494
  },
595
- "docs": {
596
- "text": "",
597
- "tags": []
495
+ "type": {
496
+ "type": "string",
497
+ "mutable": false,
498
+ "complexType": {
499
+ "original": "'menu' | 'listbox'",
500
+ "resolved": "\"listbox\" | \"menu\"",
501
+ "references": {}
502
+ },
503
+ "required": false,
504
+ "optional": false,
505
+ "docs": {
506
+ "tags": [],
507
+ "text": ""
508
+ },
509
+ "attribute": "type",
510
+ "reflect": false
598
511
  }
599
- },
600
- "setActiveElement": {
601
- "complexType": {
602
- "signature": "(index: number) => Promise<void>",
603
- "parameters": [{
604
- "tags": [],
605
- "text": ""
606
- }],
607
- "references": {
608
- "Promise": {
609
- "location": "global"
512
+ };
513
+ }
514
+ static get states() {
515
+ return {
516
+ "hasOptions": {}
517
+ };
518
+ }
519
+ static get events() {
520
+ return [{
521
+ "method": "change",
522
+ "name": "change",
523
+ "bubbles": true,
524
+ "cancelable": true,
525
+ "composed": true,
526
+ "docs": {
527
+ "tags": [],
528
+ "text": ""
529
+ },
530
+ "complexType": {
531
+ "original": "{ value: string; values: IOptionValue[] }",
532
+ "resolved": "{ value: string; values: IOptionValue[]; }",
533
+ "references": {
534
+ "IOptionValue": {
535
+ "location": "local"
536
+ }
610
537
  }
538
+ }
539
+ }, {
540
+ "method": "popoverState",
541
+ "name": "popoverState",
542
+ "bubbles": true,
543
+ "cancelable": true,
544
+ "composed": true,
545
+ "docs": {
546
+ "tags": [],
547
+ "text": ""
548
+ },
549
+ "complexType": {
550
+ "original": "{ open: boolean }",
551
+ "resolved": "{ open: boolean; }",
552
+ "references": {}
553
+ }
554
+ }];
555
+ }
556
+ static get methods() {
557
+ return {
558
+ "setDefaultActiveElement": {
559
+ "complexType": {
560
+ "signature": "() => Promise<void>",
561
+ "parameters": [],
562
+ "references": {
563
+ "Promise": {
564
+ "location": "global"
565
+ }
566
+ },
567
+ "return": "Promise<void>"
611
568
  },
612
- "return": "Promise<void>"
569
+ "docs": {
570
+ "text": "",
571
+ "tags": []
572
+ }
613
573
  },
614
- "docs": {
615
- "text": "",
616
- "tags": []
617
- }
618
- },
619
- "handleExternalKeydown": {
620
- "complexType": {
621
- "signature": "(event: KeyboardEvent) => Promise<void>",
622
- "parameters": [{
623
- "tags": [],
624
- "text": ""
625
- }],
626
- "references": {
627
- "Promise": {
628
- "location": "global"
574
+ "setActiveElement": {
575
+ "complexType": {
576
+ "signature": "(index: number) => Promise<void>",
577
+ "parameters": [{
578
+ "tags": [],
579
+ "text": ""
580
+ }],
581
+ "references": {
582
+ "Promise": {
583
+ "location": "global"
584
+ }
629
585
  },
630
- "KeyboardEvent": {
631
- "location": "global"
632
- }
586
+ "return": "Promise<void>"
633
587
  },
634
- "return": "Promise<void>"
588
+ "docs": {
589
+ "text": "",
590
+ "tags": []
591
+ }
635
592
  },
636
- "docs": {
637
- "text": "",
638
- "tags": []
593
+ "handleExternalKeydown": {
594
+ "complexType": {
595
+ "signature": "(event: KeyboardEvent) => Promise<void>",
596
+ "parameters": [{
597
+ "tags": [],
598
+ "text": ""
599
+ }],
600
+ "references": {
601
+ "Promise": {
602
+ "location": "global"
603
+ },
604
+ "KeyboardEvent": {
605
+ "location": "global"
606
+ }
607
+ },
608
+ "return": "Promise<void>"
609
+ },
610
+ "docs": {
611
+ "text": "",
612
+ "tags": []
613
+ }
639
614
  }
640
- }
641
- }; }
615
+ };
616
+ }
642
617
  static get elementRef() { return "hostElement"; }
643
- static get watchers() { return [{
644
- "propName": "selectedOptions",
645
- "methodName": "selectedOptionsUpdated"
646
- }, {
647
- "propName": "open",
648
- "methodName": "openChanged"
649
- }]; }
650
- static get listeners() { return [{
651
- "name": "focus",
652
- "method": "delegateFocus",
653
- "target": undefined,
654
- "capture": false,
655
- "passive": false
656
- }, {
657
- "name": "click",
658
- "method": "handleClick",
659
- "target": undefined,
660
- "capture": false,
661
- "passive": false
662
- }]; }
618
+ static get watchers() {
619
+ return [{
620
+ "propName": "selectedOptions",
621
+ "methodName": "selectedOptionsUpdated"
622
+ }];
623
+ }
624
+ static get listeners() {
625
+ return [{
626
+ "name": "focus",
627
+ "method": "delegateFocus",
628
+ "target": undefined,
629
+ "capture": false,
630
+ "passive": false
631
+ }, {
632
+ "name": "click",
633
+ "method": "handleClick",
634
+ "target": undefined,
635
+ "capture": false,
636
+ "passive": false
637
+ }];
638
+ }
663
639
  }