q2-tecton-elements 1.18.0 → 1.19.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 (256) 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-eccd5617.js → index-3518c78c.js} +1 -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 +30 -5
  9. package/dist/cjs/q2-calendar.cjs.entry.js +102 -63
  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 +9 -7
  24. package/dist/cjs/q2-optgroup.cjs.entry.js +6 -5
  25. package/dist/cjs/q2-option-list_2.cjs.entry.js +21 -7
  26. package/dist/cjs/q2-option.cjs.entry.js +12 -2
  27. package/dist/cjs/q2-pagination.cjs.entry.js +11 -3
  28. package/dist/cjs/q2-pill.cjs.entry.js +25 -7
  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 +44 -11
  32. package/dist/cjs/q2-select.cjs.entry.js +26 -17
  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 +20 -7
  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 +9 -3
  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 +2 -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 +349 -322
  51. package/dist/collection/components/q2-btn/styles.css +7 -7
  52. package/dist/collection/components/q2-calendar/index.js +578 -552
  53. package/dist/collection/components/q2-calendar/q2-month-picker.css +1 -1
  54. package/dist/collection/components/q2-calendar/q2-month-picker.js +112 -116
  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 +291 -270
  92. package/dist/collection/components/q2-option-list/styles.css +1 -1
  93. package/dist/collection/components/q2-pagination/index.js +183 -179
  94. package/dist/collection/components/q2-pagination/styles.css +1 -1
  95. package/dist/collection/components/q2-pill/index.js +260 -208
  96. package/dist/collection/components/q2-pill/styles.css +1 -1
  97. package/dist/collection/components/q2-popover/index.js +169 -151
  98. package/dist/collection/components/q2-popover/styles.css +2 -2
  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 +169 -131
  104. package/dist/collection/components/q2-section/styles.css +8 -6
  105. package/dist/collection/components/q2-select/index.js +393 -381
  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 +168 -116
  118. package/dist/collection/components/q2-tag/styles.css +1 -1
  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 +147 -133
  122. package/dist/collection/components/q2-tooltip/styles.css +1 -1
  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 +2 -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-eac6b89e.js → index-9c591682.js} +1 -1
  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 +30 -5
  135. package/dist/esm/q2-calendar.entry.js +102 -63
  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 +9 -7
  150. package/dist/esm/q2-optgroup.entry.js +6 -5
  151. package/dist/esm/q2-option-list_2.entry.js +21 -7
  152. package/dist/esm/q2-option.entry.js +12 -2
  153. package/dist/esm/q2-pagination.entry.js +11 -3
  154. package/dist/esm/q2-pill.entry.js +25 -7
  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 +44 -11
  158. package/dist/esm/q2-select.entry.js +26 -17
  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 +20 -7
  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 +9 -3
  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-2c9b1308.entry.js +1 -0
  177. package/dist/q2-tecton-elements/p-2e832e42.entry.js +1 -0
  178. package/dist/q2-tecton-elements/p-315fdb74.entry.js +1 -0
  179. package/dist/q2-tecton-elements/{p-c608e3c9.entry.js → p-444415b5.entry.js} +1 -1
  180. package/dist/q2-tecton-elements/p-4d700630.entry.js +1 -0
  181. package/dist/q2-tecton-elements/p-54e792bd.entry.js +1 -0
  182. package/dist/q2-tecton-elements/{p-80014da0.js → p-5e374fbd.js} +1 -1
  183. package/dist/q2-tecton-elements/p-5f064e1e.entry.js +39 -0
  184. package/dist/q2-tecton-elements/p-692f2d09.entry.js +1 -0
  185. package/dist/q2-tecton-elements/p-6e6b5b80.entry.js +1 -0
  186. package/dist/q2-tecton-elements/p-74136b15.entry.js +1 -0
  187. package/dist/q2-tecton-elements/p-7e8f43d1.entry.js +1 -0
  188. package/dist/q2-tecton-elements/p-8e380edf.entry.js +1 -0
  189. package/dist/q2-tecton-elements/p-926a3e80.js +2 -0
  190. package/dist/q2-tecton-elements/{p-93c00587.js → p-92e1faf8.js} +1 -1
  191. package/dist/q2-tecton-elements/p-9772b15f.entry.js +1 -0
  192. package/dist/q2-tecton-elements/p-97aa8423.entry.js +1 -0
  193. package/dist/q2-tecton-elements/{p-17cffd7d.entry.js → p-a987402e.entry.js} +1 -1
  194. package/dist/q2-tecton-elements/p-aaf42539.entry.js +1 -0
  195. package/dist/q2-tecton-elements/p-ac674c20.entry.js +1 -0
  196. package/dist/q2-tecton-elements/p-b8b00394.entry.js +1 -0
  197. package/dist/q2-tecton-elements/p-c444a60b.entry.js +1 -0
  198. package/dist/q2-tecton-elements/p-c6c489fe.entry.js +1 -0
  199. package/dist/q2-tecton-elements/p-ce015552.entry.js +1 -0
  200. package/dist/q2-tecton-elements/p-d464fccc.entry.js +1 -0
  201. package/dist/q2-tecton-elements/p-de164483.entry.js +1 -0
  202. package/dist/q2-tecton-elements/p-df91e954.entry.js +1 -0
  203. package/dist/q2-tecton-elements/p-e6d26f39.entry.js +1 -0
  204. package/dist/q2-tecton-elements/p-e8e113c2.entry.js +1 -0
  205. package/dist/q2-tecton-elements/p-f1d06917.entry.js +1 -0
  206. package/dist/q2-tecton-elements/p-f219fe9d.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-pill/index.d.ts +3 -0
  215. package/dist/types/components/q2-section/index.d.ts +3 -0
  216. package/dist/types/components/q2-tag/index.d.ts +3 -0
  217. package/dist/types/components.d.ts +154 -38
  218. package/dist/types/stencil-public-runtime.d.ts +20 -4
  219. package/dist/types/workspace/workspace/{Tecton_tecton-production_master → tecton-production_release_1.19.x}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +2 -0
  220. package/package.json +6 -6
  221. package/dist/q2-tecton-elements/p-02c1b7fd.entry.js +0 -1
  222. package/dist/q2-tecton-elements/p-04c743f2.entry.js +0 -1
  223. package/dist/q2-tecton-elements/p-07dc509c.entry.js +0 -1
  224. package/dist/q2-tecton-elements/p-12caa479.entry.js +0 -1
  225. package/dist/q2-tecton-elements/p-160dd1c2.entry.js +0 -1
  226. package/dist/q2-tecton-elements/p-1a3de749.entry.js +0 -1
  227. package/dist/q2-tecton-elements/p-2061c3fd.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-2e54f9a0.entry.js +0 -1
  231. package/dist/q2-tecton-elements/p-375569ff.entry.js +0 -1
  232. package/dist/q2-tecton-elements/p-3766cc6c.entry.js +0 -1
  233. package/dist/q2-tecton-elements/p-3eda2714.entry.js +0 -1
  234. package/dist/q2-tecton-elements/p-421af42d.entry.js +0 -1
  235. package/dist/q2-tecton-elements/p-4c53713d.entry.js +0 -1
  236. package/dist/q2-tecton-elements/p-4fd405f5.entry.js +0 -1
  237. package/dist/q2-tecton-elements/p-509c8924.entry.js +0 -1
  238. package/dist/q2-tecton-elements/p-55dc3dc1.entry.js +0 -1
  239. package/dist/q2-tecton-elements/p-5fffb28a.entry.js +0 -1
  240. package/dist/q2-tecton-elements/p-612e9974.entry.js +0 -1
  241. package/dist/q2-tecton-elements/p-64ca8c59.entry.js +0 -1
  242. package/dist/q2-tecton-elements/p-796c2bb5.entry.js +0 -1
  243. package/dist/q2-tecton-elements/p-86887866.entry.js +0 -1
  244. package/dist/q2-tecton-elements/p-9204c34d.entry.js +0 -1
  245. package/dist/q2-tecton-elements/p-9725d55f.entry.js +0 -1
  246. package/dist/q2-tecton-elements/p-a0fa416d.entry.js +0 -39
  247. package/dist/q2-tecton-elements/p-bd83e8e2.entry.js +0 -1
  248. package/dist/q2-tecton-elements/p-be0f2539.entry.js +0 -1
  249. package/dist/q2-tecton-elements/p-c05b0b55.entry.js +0 -1
  250. package/dist/q2-tecton-elements/p-c5691700.js +0 -1
  251. package/dist/q2-tecton-elements/p-d826d7ad.entry.js +0 -1
  252. package/dist/q2-tecton-elements/p-d9e9340c.entry.js +0 -1
  253. package/dist/q2-tecton-elements/p-e5757895.entry.js +0 -1
  254. package/dist/q2-tecton-elements/p-e68c9ef0.entry.js +0 -1
  255. package/dist/q2-tecton-elements/p-eb33bda4.entry.js +0 -1
  256. package/dist/q2-tecton-elements/p-f319549d.entry.js +0 -1
@@ -1,48 +1,10 @@
1
- import { Component, Prop, Watch, State, Fragment, Element, Host, h, Event, Listen, } from '@stencil/core';
1
+ import { Fragment, Host, h, } from '@stencil/core';
2
2
  import Swiper, { Autoplay } from 'swiper';
3
3
  import { createGuid, loc, handleAriaLabel, overrideFocus, isEventFromElement } from 'src/utils';
4
4
  const carouselBreakpoint = 500; /* width in px of this host element where the layout starts to get unruly */
5
5
  export class Q2Carousel {
6
6
  constructor() {
7
7
  this.swiper = null;
8
- this.autoPlay = false;
9
- this.fullWidthPanes = false;
10
- this.hidePagination = false;
11
- this.showNavigationArrows = false;
12
- this.label = 'tecton.element.carousel.ariaLabel';
13
- this.index = 1;
14
- this.universalCarouselOptions = {
15
- centeredSlides: true,
16
- focusableElements: 'q2-btn, a, input, select, textarea, button, video, label, option',
17
- autoplay: this.autoPlay,
18
- modules: [Autoplay],
19
- on: {
20
- slideChange: () => {
21
- var _a, _b;
22
- this.handleSlideChange((_b = (_a = this.swiper) === null || _a === void 0 ? void 0 : _a.activeIndex) !== null && _b !== void 0 ? _b : 0); // lazy-load causing this.swiper is null only on ios safari
23
- },
24
- activeIndexChange: swiper => {
25
- this.activePaneIndex = swiper.activeIndex;
26
- this.organizePanes();
27
- const isPaginationFocused = document.activeElement.closest(`#q2-carousel-${this.guid} .q2-carousel-page-indicator`);
28
- const isCarouselFocused = document.activeElement.closest(`#q2-carousel-${this.guid} q2-carousel-pane`);
29
- if (isPaginationFocused) {
30
- this.paginationBtns[swiper.activeIndex].focus({ preventScroll: true });
31
- }
32
- else if (isCarouselFocused)
33
- swiper.slides[swiper.activeIndex].focus({
34
- preventScroll: true,
35
- });
36
- },
37
- },
38
- };
39
- this.fullWidthDisplayOptions = Object.assign({ slidesPerView: 1, spaceBetween: 100 }, this.universalCarouselOptions);
40
- this.activePaneIndex = this.realIndex;
41
- this.applyFocus = false;
42
- this.applyPaginationFocus = false;
43
- this.autoPlayInProgress = false;
44
- this.compactMode = false;
45
- this.carouselWrapperWidth = 0;
46
8
  // COMPUTED //
47
9
  this.guid = createGuid();
48
10
  // METHODS //
@@ -169,20 +131,15 @@ export class Q2Carousel {
169
131
  this.autoPlayBtn = () => {
170
132
  return (h("q2-btn", { type: "button", "hide-label": true, label: loc(this.autoPlayInProgress
171
133
  ? 'tecton.element.carousel.pausePlayLabel'
172
- : 'tecton.element.carousel.resumePlayLabel'), class: "q2-carousel-autoplay-control", onClick: this.handleAutoPlayPause },
173
- h("q2-icon", { type: this.autoPlayInProgress ? 'pause' : 'play' })));
134
+ : 'tecton.element.carousel.resumePlayLabel'), class: "q2-carousel-autoplay-control", onClick: this.handleAutoPlayPause }, h("q2-icon", { type: this.autoPlayInProgress ? 'pause' : 'play' })));
174
135
  };
175
136
  this.prevNavBtn = () => {
176
137
  const prevPaneAvailable = this.activePaneIndex > 0;
177
- return (h("div", null,
178
- h("q2-btn", { type: "button", disabled: prevPaneAvailable ? undefined : true, class: "q2-carousel-navigation-button q2-carousel-navigation-button-prev", "hide-label": true, label: loc('tecton.element.carousel.previousItemLabel'), onClick: () => this.handleCarouselNavigationSelection(this.activePaneIndex - 1, true) },
179
- h("q2-icon", { type: "chevron-left" }))));
138
+ return (h("div", null, h("q2-btn", { type: "button", disabled: prevPaneAvailable ? undefined : true, class: "q2-carousel-navigation-button q2-carousel-navigation-button-prev", "hide-label": true, label: loc('tecton.element.carousel.previousItemLabel'), onClick: () => this.handleCarouselNavigationSelection(this.activePaneIndex - 1, true) }, h("q2-icon", { type: "chevron-left" }))));
180
139
  };
181
140
  this.nextNavBtn = () => {
182
141
  const nextPaneAvailable = this.activePaneIndex < this.paneCount - 1;
183
- return (h("div", null,
184
- h("q2-btn", { type: "button", disabled: nextPaneAvailable ? undefined : true, class: "q2-carousel-navigation-button q2-carousel-navigation-button-next", "hide-label": true, label: loc('tecton.element.carousel.nextItemLabel'), onClick: () => this.handleCarouselNavigationSelection(this.activePaneIndex + 1, true) },
185
- h("q2-icon", { type: "chevron-right" }))));
142
+ return (h("div", null, h("q2-btn", { type: "button", disabled: nextPaneAvailable ? undefined : true, class: "q2-carousel-navigation-button q2-carousel-navigation-button-next", "hide-label": true, label: loc('tecton.element.carousel.nextItemLabel'), onClick: () => this.handleCarouselNavigationSelection(this.activePaneIndex + 1, true) }, h("q2-icon", { type: "chevron-right" }))));
186
143
  };
187
144
  this.insufficientPanesDisplay = () => {
188
145
  let insufficientPanesContainerClasses = [
@@ -191,13 +148,47 @@ export class Q2Carousel {
191
148
  ];
192
149
  if (this.compactMode)
193
150
  insufficientPanesContainerClasses = [...insufficientPanesContainerClasses, 'compact'];
194
- return (h("div", { class: insufficientPanesContainerClasses.join(' ') },
195
- h("div", { class: "insufficient-panes-icon-wrapper" },
196
- h("q2-icon", { type: "warning" })),
197
- h("p", { class: "insufficient-panes-header" },
198
- h("strong", null, loc('tecton.element.carousel.insufficientPanesMessageHeader'))),
199
- h("p", { class: "insufficient-panes-body" }, loc('tecton.element.carousel.insufficientPanesMessageBody'))));
151
+ return (h("div", { class: insufficientPanesContainerClasses.join(' ') }, h("div", { class: "insufficient-panes-icon-wrapper" }, h("q2-icon", { type: "warning" })), h("p", { class: "insufficient-panes-header" }, h("strong", null, loc('tecton.element.carousel.insufficientPanesMessageHeader'))), h("p", { class: "insufficient-panes-body" }, loc('tecton.element.carousel.insufficientPanesMessageBody'))));
152
+ };
153
+ this.autoPlay = false;
154
+ this.fullWidthPanes = false;
155
+ this.hidePagination = false;
156
+ this.showNavigationArrows = false;
157
+ this.ariaLabel = undefined;
158
+ this.label = 'tecton.element.carousel.ariaLabel';
159
+ this.index = 1;
160
+ this.universalCarouselOptions = {
161
+ centeredSlides: true,
162
+ focusableElements: 'q2-btn, a, input, select, textarea, button, video, label, option',
163
+ autoplay: this.autoPlay,
164
+ modules: [Autoplay],
165
+ on: {
166
+ slideChange: () => {
167
+ var _a, _b;
168
+ this.handleSlideChange((_b = (_a = this.swiper) === null || _a === void 0 ? void 0 : _a.activeIndex) !== null && _b !== void 0 ? _b : 0); // lazy-load causing this.swiper is null only on ios safari
169
+ },
170
+ activeIndexChange: swiper => {
171
+ this.activePaneIndex = swiper.activeIndex;
172
+ this.organizePanes();
173
+ const isPaginationFocused = document.activeElement.closest(`#q2-carousel-${this.guid} .q2-carousel-page-indicator`);
174
+ const isCarouselFocused = document.activeElement.closest(`#q2-carousel-${this.guid} q2-carousel-pane`);
175
+ if (isPaginationFocused) {
176
+ this.paginationBtns[swiper.activeIndex].focus({ preventScroll: true });
177
+ }
178
+ else if (isCarouselFocused)
179
+ swiper.slides[swiper.activeIndex].focus({
180
+ preventScroll: true,
181
+ });
182
+ },
183
+ },
200
184
  };
185
+ this.fullWidthDisplayOptions = Object.assign({ slidesPerView: 1, spaceBetween: 100 }, this.universalCarouselOptions);
186
+ this.activePaneIndex = this.realIndex;
187
+ this.applyFocus = false;
188
+ this.applyPaginationFocus = false;
189
+ this.autoPlayInProgress = false;
190
+ this.compactMode = false;
191
+ this.carouselWrapperWidth = 0;
201
192
  }
202
193
  ariaLabelObserver() {
203
194
  handleAriaLabel(this);
@@ -287,214 +278,219 @@ export class Q2Carousel {
287
278
  let paginationWrapperClasses = ['q2-carousel-pagination-navigation-wrapper'];
288
279
  if (this.showNavigationArrows)
289
280
  paginationWrapperClasses = [...paginationWrapperClasses, 'evenly-space'];
290
- return (h(Host, { id: `q2-carousel-${this.guid}`, class: "q2-carousel-instance" }, this.insufficientPanes ? (this.insufficientPanesDisplay()) : (h(Fragment, null,
291
- this.paneCount > 1 && (h("div", { class: paginationWrapperClasses.join(' ') },
292
- this.showNavigationArrows && this.prevNavBtn(),
293
- h("div", { class: "q2-carousel-control-center-tray" },
294
- !this.hidePagination && this.paginationArea(),
295
- this.autoPlay && this.autoPlayBtn()),
296
- this.showNavigationArrows && this.nextNavBtn())),
297
- h("section", { class: carouselContainerClasses.join(' '), ref: el => (this.carouselWrapper = el), "aria-roledescription": "carousel", "aria-label": loc(this.label) },
298
- h("div", { class: "q2-carousel-swiper-wrapper swiper-wrapper", ref: el => (this.carouselPaneWrapperElement = el), "aria-live": this.autoPlayInProgress ? 'off' : 'polite', onKeyDown: this.onWrapperKeyDown },
299
- h("slot", null)))))));
281
+ return (h(Host, { id: `q2-carousel-${this.guid}`, class: "q2-carousel-instance" }, this.insufficientPanes ? (this.insufficientPanesDisplay()) : (h(Fragment, null, this.paneCount > 1 && (h("div", { class: paginationWrapperClasses.join(' ') }, this.showNavigationArrows && this.prevNavBtn(), h("div", { class: "q2-carousel-control-center-tray" }, !this.hidePagination && this.paginationArea(), this.autoPlay && this.autoPlayBtn()), this.showNavigationArrows && this.nextNavBtn())), h("section", { class: carouselContainerClasses.join(' '), ref: el => (this.carouselWrapper = el), "aria-roledescription": "carousel", "aria-label": loc(this.label) }, h("div", { class: "q2-carousel-swiper-wrapper swiper-wrapper", ref: el => (this.carouselPaneWrapperElement = el), "aria-live": this.autoPlayInProgress ? 'off' : 'polite', onKeyDown: this.onWrapperKeyDown }, h("slot", null)))))));
300
282
  }
301
283
  static get is() { return "q2-carousel"; }
302
- static get originalStyleUrls() { return {
303
- "$": ["styles.scss"]
304
- }; }
305
- static get styleUrls() { return {
306
- "$": ["styles.css"]
307
- }; }
308
- static get properties() { return {
309
- "autoPlay": {
310
- "type": "boolean",
311
- "mutable": false,
312
- "complexType": {
313
- "original": "boolean",
314
- "resolved": "boolean",
315
- "references": {}
316
- },
317
- "required": false,
318
- "optional": false,
319
- "docs": {
320
- "tags": [],
321
- "text": ""
322
- },
323
- "attribute": "auto-play",
324
- "reflect": true,
325
- "defaultValue": "false"
326
- },
327
- "fullWidthPanes": {
328
- "type": "boolean",
329
- "mutable": false,
330
- "complexType": {
331
- "original": "boolean",
332
- "resolved": "boolean",
333
- "references": {}
334
- },
335
- "required": false,
336
- "optional": false,
337
- "docs": {
338
- "tags": [],
339
- "text": ""
340
- },
341
- "attribute": "full-width-panes",
342
- "reflect": true,
343
- "defaultValue": "false"
344
- },
345
- "hidePagination": {
346
- "type": "boolean",
347
- "mutable": false,
348
- "complexType": {
349
- "original": "boolean",
350
- "resolved": "boolean",
351
- "references": {}
352
- },
353
- "required": false,
354
- "optional": false,
355
- "docs": {
356
- "tags": [],
357
- "text": ""
358
- },
359
- "attribute": "hide-pagination",
360
- "reflect": true,
361
- "defaultValue": "false"
362
- },
363
- "showNavigationArrows": {
364
- "type": "boolean",
365
- "mutable": false,
366
- "complexType": {
367
- "original": "boolean",
368
- "resolved": "boolean",
369
- "references": {}
370
- },
371
- "required": false,
372
- "optional": false,
373
- "docs": {
374
- "tags": [],
375
- "text": ""
376
- },
377
- "attribute": "show-navigation-arrows",
378
- "reflect": true,
379
- "defaultValue": "false"
380
- },
381
- "ariaLabel": {
382
- "type": "string",
383
- "mutable": false,
384
- "complexType": {
385
- "original": "string",
386
- "resolved": "string",
387
- "references": {}
388
- },
389
- "required": false,
390
- "optional": false,
391
- "docs": {
392
- "tags": [],
393
- "text": ""
284
+ static get originalStyleUrls() {
285
+ return {
286
+ "$": ["styles.scss"]
287
+ };
288
+ }
289
+ static get styleUrls() {
290
+ return {
291
+ "$": ["styles.css"]
292
+ };
293
+ }
294
+ static get properties() {
295
+ return {
296
+ "autoPlay": {
297
+ "type": "boolean",
298
+ "mutable": false,
299
+ "complexType": {
300
+ "original": "boolean",
301
+ "resolved": "boolean",
302
+ "references": {}
303
+ },
304
+ "required": false,
305
+ "optional": false,
306
+ "docs": {
307
+ "tags": [],
308
+ "text": ""
309
+ },
310
+ "attribute": "auto-play",
311
+ "reflect": true,
312
+ "defaultValue": "false"
394
313
  },
395
- "attribute": "aria-label",
396
- "reflect": true
397
- },
398
- "label": {
399
- "type": "string",
400
- "mutable": false,
401
- "complexType": {
402
- "original": "string",
403
- "resolved": "string",
404
- "references": {}
314
+ "fullWidthPanes": {
315
+ "type": "boolean",
316
+ "mutable": false,
317
+ "complexType": {
318
+ "original": "boolean",
319
+ "resolved": "boolean",
320
+ "references": {}
321
+ },
322
+ "required": false,
323
+ "optional": false,
324
+ "docs": {
325
+ "tags": [],
326
+ "text": ""
327
+ },
328
+ "attribute": "full-width-panes",
329
+ "reflect": true,
330
+ "defaultValue": "false"
405
331
  },
406
- "required": false,
407
- "optional": false,
408
- "docs": {
409
- "tags": [],
410
- "text": ""
332
+ "hidePagination": {
333
+ "type": "boolean",
334
+ "mutable": false,
335
+ "complexType": {
336
+ "original": "boolean",
337
+ "resolved": "boolean",
338
+ "references": {}
339
+ },
340
+ "required": false,
341
+ "optional": false,
342
+ "docs": {
343
+ "tags": [],
344
+ "text": ""
345
+ },
346
+ "attribute": "hide-pagination",
347
+ "reflect": true,
348
+ "defaultValue": "false"
411
349
  },
412
- "attribute": "label",
413
- "reflect": true,
414
- "defaultValue": "'tecton.element.carousel.ariaLabel'"
415
- },
416
- "index": {
417
- "type": "number",
418
- "mutable": true,
419
- "complexType": {
420
- "original": "number",
421
- "resolved": "number",
422
- "references": {}
350
+ "showNavigationArrows": {
351
+ "type": "boolean",
352
+ "mutable": false,
353
+ "complexType": {
354
+ "original": "boolean",
355
+ "resolved": "boolean",
356
+ "references": {}
357
+ },
358
+ "required": false,
359
+ "optional": false,
360
+ "docs": {
361
+ "tags": [],
362
+ "text": ""
363
+ },
364
+ "attribute": "show-navigation-arrows",
365
+ "reflect": true,
366
+ "defaultValue": "false"
423
367
  },
424
- "required": false,
425
- "optional": false,
426
- "docs": {
427
- "tags": [],
428
- "text": ""
368
+ "ariaLabel": {
369
+ "type": "string",
370
+ "mutable": false,
371
+ "complexType": {
372
+ "original": "string",
373
+ "resolved": "string",
374
+ "references": {}
375
+ },
376
+ "required": false,
377
+ "optional": false,
378
+ "docs": {
379
+ "tags": [],
380
+ "text": ""
381
+ },
382
+ "attribute": "aria-label",
383
+ "reflect": true
429
384
  },
430
- "attribute": "index",
431
- "reflect": true,
432
- "defaultValue": "1"
433
- }
434
- }; }
435
- static get states() { return {
436
- "universalCarouselOptions": {},
437
- "fullWidthDisplayOptions": {},
438
- "activePaneIndex": {},
439
- "applyFocus": {},
440
- "applyPaginationFocus": {},
441
- "autoPlayInProgress": {},
442
- "compactMode": {},
443
- "carouselWrapperWidth": {}
444
- }; }
445
- static get events() { return [{
446
- "method": "change",
447
- "name": "change",
448
- "bubbles": true,
449
- "cancelable": true,
450
- "composed": true,
451
- "docs": {
452
- "tags": [],
453
- "text": ""
385
+ "label": {
386
+ "type": "string",
387
+ "mutable": false,
388
+ "complexType": {
389
+ "original": "string",
390
+ "resolved": "string",
391
+ "references": {}
392
+ },
393
+ "required": false,
394
+ "optional": false,
395
+ "docs": {
396
+ "tags": [],
397
+ "text": ""
398
+ },
399
+ "attribute": "label",
400
+ "reflect": true,
401
+ "defaultValue": "'tecton.element.carousel.ariaLabel'"
454
402
  },
455
- "complexType": {
456
- "original": "{ index: number }",
457
- "resolved": "{ index: number; }",
458
- "references": {}
403
+ "index": {
404
+ "type": "number",
405
+ "mutable": true,
406
+ "complexType": {
407
+ "original": "number",
408
+ "resolved": "number",
409
+ "references": {}
410
+ },
411
+ "required": false,
412
+ "optional": false,
413
+ "docs": {
414
+ "tags": [],
415
+ "text": ""
416
+ },
417
+ "attribute": "index",
418
+ "reflect": true,
419
+ "defaultValue": "1"
459
420
  }
460
- }]; }
421
+ };
422
+ }
423
+ static get states() {
424
+ return {
425
+ "universalCarouselOptions": {},
426
+ "fullWidthDisplayOptions": {},
427
+ "activePaneIndex": {},
428
+ "applyFocus": {},
429
+ "applyPaginationFocus": {},
430
+ "autoPlayInProgress": {},
431
+ "compactMode": {},
432
+ "carouselWrapperWidth": {}
433
+ };
434
+ }
435
+ static get events() {
436
+ return [{
437
+ "method": "change",
438
+ "name": "change",
439
+ "bubbles": true,
440
+ "cancelable": true,
441
+ "composed": true,
442
+ "docs": {
443
+ "tags": [],
444
+ "text": ""
445
+ },
446
+ "complexType": {
447
+ "original": "{ index: number }",
448
+ "resolved": "{ index: number; }",
449
+ "references": {}
450
+ }
451
+ }];
452
+ }
461
453
  static get elementRef() { return "hostElement"; }
462
- static get watchers() { return [{
463
- "propName": "ariaLabel",
464
- "methodName": "ariaLabelObserver"
465
- }, {
466
- "propName": "carouselWrapperWidth",
467
- "methodName": "carouselWrapperWidthChanged"
468
- }, {
469
- "propName": "index",
470
- "methodName": "indexChanged"
471
- }, {
472
- "propName": "fullWidthPanes",
473
- "methodName": "revampCarousel"
474
- }, {
475
- "propName": "compactMode",
476
- "methodName": "revampCarousel"
477
- }, {
478
- "propName": "autoPlay",
479
- "methodName": "revampCarousel"
480
- }]; }
481
- static get listeners() { return [{
482
- "name": "change",
483
- "method": "onHostElementChange",
484
- "target": undefined,
485
- "capture": false,
486
- "passive": false
487
- }, {
488
- "name": "clickCarouselPane",
489
- "method": "carouselPaneClicked",
490
- "target": undefined,
491
- "capture": false,
492
- "passive": false
493
- }, {
494
- "name": "focus",
495
- "method": "delegateFocus",
496
- "target": undefined,
497
- "capture": false,
498
- "passive": false
499
- }]; }
454
+ static get watchers() {
455
+ return [{
456
+ "propName": "ariaLabel",
457
+ "methodName": "ariaLabelObserver"
458
+ }, {
459
+ "propName": "carouselWrapperWidth",
460
+ "methodName": "carouselWrapperWidthChanged"
461
+ }, {
462
+ "propName": "index",
463
+ "methodName": "indexChanged"
464
+ }, {
465
+ "propName": "fullWidthPanes",
466
+ "methodName": "revampCarousel"
467
+ }, {
468
+ "propName": "compactMode",
469
+ "methodName": "revampCarousel"
470
+ }, {
471
+ "propName": "autoPlay",
472
+ "methodName": "revampCarousel"
473
+ }];
474
+ }
475
+ static get listeners() {
476
+ return [{
477
+ "name": "change",
478
+ "method": "onHostElementChange",
479
+ "target": undefined,
480
+ "capture": false,
481
+ "passive": false
482
+ }, {
483
+ "name": "clickCarouselPane",
484
+ "method": "carouselPaneClicked",
485
+ "target": undefined,
486
+ "capture": false,
487
+ "passive": false
488
+ }, {
489
+ "name": "focus",
490
+ "method": "delegateFocus",
491
+ "target": undefined,
492
+ "capture": false,
493
+ "passive": false
494
+ }];
495
+ }
500
496
  }
@@ -8,7 +8,7 @@
8
8
 
9
9
  *:focus {
10
10
  outline: none;
11
- box-shadow: var(--const-global-focus, 0 0 0 2px #33b4ff);
11
+ box-shadow: var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C);
12
12
  }
13
13
 
14
14
  :host {