igniteui-webcomponents 6.1.1 → 6.2.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 (327) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/LICENSE +1 -1
  3. package/README.md +13 -1
  4. package/animations/player.d.ts +1 -1
  5. package/animations/player.js.map +1 -1
  6. package/components/calendar/calendar.d.ts +1 -0
  7. package/components/calendar/calendar.js +5 -8
  8. package/components/calendar/calendar.js.map +1 -1
  9. package/components/calendar/themes/calendar.base.css.js +1 -1
  10. package/components/calendar/themes/calendar.base.css.js.map +1 -1
  11. package/components/calendar/themes/dark/calendar.bootstrap.css.js +1 -1
  12. package/components/calendar/themes/dark/calendar.bootstrap.css.js.map +1 -1
  13. package/components/calendar/themes/dark/calendar.fluent.css.js +1 -1
  14. package/components/calendar/themes/dark/calendar.fluent.css.js.map +1 -1
  15. package/components/calendar/themes/dark/calendar.indigo.css.js +1 -1
  16. package/components/calendar/themes/dark/calendar.indigo.css.js.map +1 -1
  17. package/components/calendar/themes/dark/calendar.material.css.js +1 -1
  18. package/components/calendar/themes/dark/calendar.material.css.js.map +1 -1
  19. package/components/calendar/themes/light/calendar.bootstrap.css.js +1 -1
  20. package/components/calendar/themes/light/calendar.bootstrap.css.js.map +1 -1
  21. package/components/calendar/themes/light/calendar.fluent.css.js +1 -1
  22. package/components/calendar/themes/light/calendar.fluent.css.js.map +1 -1
  23. package/components/calendar/themes/light/calendar.indigo.css.js +1 -1
  24. package/components/calendar/themes/light/calendar.indigo.css.js.map +1 -1
  25. package/components/calendar/themes/light/calendar.material.css.js +1 -1
  26. package/components/calendar/themes/light/calendar.material.css.js.map +1 -1
  27. package/components/calendar/themes/shared/bootstrap/calendar.bootstrap.css.js +1 -1
  28. package/components/calendar/themes/shared/bootstrap/calendar.bootstrap.css.js.map +1 -1
  29. package/components/calendar/themes/shared/fluent/calendar.fluent.css.js +1 -1
  30. package/components/calendar/themes/shared/fluent/calendar.fluent.css.js.map +1 -1
  31. package/components/calendar/themes/shared/indigo/calendar.indigo.css.js +1 -1
  32. package/components/calendar/themes/shared/indigo/calendar.indigo.css.js.map +1 -1
  33. package/components/calendar/themes/shared/material/calendar.material.css.js +1 -1
  34. package/components/calendar/themes/shared/material/calendar.material.css.js.map +1 -1
  35. package/components/card/themes/content.js +7 -0
  36. package/components/card/themes/content.js.map +1 -1
  37. package/components/card/themes/shared/content/card.content.indigo.css.d.ts +1 -0
  38. package/components/card/themes/shared/content/card.content.indigo.css.js +3 -0
  39. package/components/card/themes/shared/content/card.content.indigo.css.js.map +1 -0
  40. package/components/carousel/carousel-indicator.d.ts +1 -1
  41. package/components/carousel/carousel-indicator.js.map +1 -1
  42. package/components/carousel/carousel-slide.d.ts +3 -3
  43. package/components/carousel/carousel-slide.js +7 -13
  44. package/components/carousel/carousel-slide.js.map +1 -1
  45. package/components/carousel/carousel.d.ts +41 -42
  46. package/components/carousel/carousel.js +173 -187
  47. package/components/carousel/carousel.js.map +1 -1
  48. package/components/checkbox/checkbox-base.d.ts +3 -5
  49. package/components/checkbox/checkbox-base.js +15 -21
  50. package/components/checkbox/checkbox-base.js.map +1 -1
  51. package/components/checkbox/checkbox.d.ts +3 -4
  52. package/components/checkbox/checkbox.js +18 -17
  53. package/components/checkbox/checkbox.js.map +1 -1
  54. package/components/checkbox/switch.d.ts +0 -1
  55. package/components/checkbox/switch.js +7 -10
  56. package/components/checkbox/switch.js.map +1 -1
  57. package/components/checkbox/themes/dark/checkbox/checkbox.bootstrap.css.js +1 -1
  58. package/components/checkbox/themes/dark/checkbox/checkbox.bootstrap.css.js.map +1 -1
  59. package/components/checkbox/themes/dark/checkbox/checkbox.fluent.css.js +1 -1
  60. package/components/checkbox/themes/dark/checkbox/checkbox.fluent.css.js.map +1 -1
  61. package/components/checkbox/themes/shared/checkbox/checkbox.bootstrap.css.js +1 -1
  62. package/components/checkbox/themes/shared/checkbox/checkbox.bootstrap.css.js.map +1 -1
  63. package/components/checkbox/themes/shared/checkbox/checkbox.common.css.js +1 -1
  64. package/components/checkbox/themes/shared/checkbox/checkbox.common.css.js.map +1 -1
  65. package/components/checkbox/themes/shared/checkbox/checkbox.fluent.css.js +1 -1
  66. package/components/checkbox/themes/shared/checkbox/checkbox.fluent.css.js.map +1 -1
  67. package/components/checkbox/themes/shared/checkbox/checkbox.indigo.css.js +1 -1
  68. package/components/checkbox/themes/shared/checkbox/checkbox.indigo.css.js.map +1 -1
  69. package/components/checkbox/themes/shared/checkbox/checkbox.material.css.js +1 -1
  70. package/components/checkbox/themes/shared/checkbox/checkbox.material.css.js.map +1 -1
  71. package/components/chip/chip.d.ts +11 -11
  72. package/components/chip/chip.js +61 -65
  73. package/components/chip/chip.js.map +1 -1
  74. package/components/combo/combo.d.ts +3 -3
  75. package/components/combo/combo.js +12 -6
  76. package/components/combo/combo.js.map +1 -1
  77. package/components/combo/themes/dark/combo.bootstrap.css.js +1 -1
  78. package/components/combo/themes/dark/combo.bootstrap.css.js.map +1 -1
  79. package/components/combo/themes/light/combo.bootstrap.css.js +1 -1
  80. package/components/combo/themes/light/combo.bootstrap.css.js.map +1 -1
  81. package/components/combo/themes/light/combo.shared.css.js +1 -1
  82. package/components/combo/themes/light/combo.shared.css.js.map +1 -1
  83. package/components/combo/themes/shared/combo.common.css.js +1 -1
  84. package/components/combo/themes/shared/combo.common.css.js.map +1 -1
  85. package/components/combo/themes/shared/combo.indigo.css.js +1 -1
  86. package/components/combo/themes/shared/combo.indigo.css.js.map +1 -1
  87. package/components/combo/themes/shared/combo.material.css.js +1 -1
  88. package/components/combo/themes/shared/combo.material.css.js.map +1 -1
  89. package/components/common/controllers/internals.d.ts +66 -2
  90. package/components/common/controllers/internals.js +21 -0
  91. package/components/common/controllers/internals.js.map +1 -1
  92. package/components/common/controllers/slot.d.ts +87 -0
  93. package/components/common/controllers/slot.js +75 -0
  94. package/components/common/controllers/slot.js.map +1 -0
  95. package/components/common/mixins/alert.d.ts +7 -8
  96. package/components/common/mixins/alert.js +23 -34
  97. package/components/common/mixins/alert.js.map +1 -1
  98. package/components/common/mixins/forms/associated.d.ts +1 -1
  99. package/components/common/mixins/forms/associated.js +91 -36
  100. package/components/common/mixins/forms/associated.js.map +1 -1
  101. package/components/common/mixins/forms/form-transformers.d.ts +21 -0
  102. package/components/common/mixins/forms/form-transformers.js +64 -0
  103. package/components/common/mixins/forms/form-transformers.js.map +1 -0
  104. package/components/common/mixins/forms/form-value.d.ts +7 -36
  105. package/components/common/mixins/forms/form-value.js +2 -64
  106. package/components/common/mixins/forms/form-value.js.map +1 -1
  107. package/components/common/mixins/forms/types.d.ts +19 -10
  108. package/components/common/mixins/forms/types.js +2 -1
  109. package/components/common/mixins/forms/types.js.map +1 -1
  110. package/components/common/util.d.ts +1 -0
  111. package/components/common/util.js +3 -0
  112. package/components/common/util.js.map +1 -1
  113. package/components/date-picker/date-picker.d.ts +1 -3
  114. package/components/date-picker/date-picker.js +11 -13
  115. package/components/date-picker/date-picker.js.map +1 -1
  116. package/components/date-picker/themes/dark/date-picker.bootstrap.css.js +1 -1
  117. package/components/date-picker/themes/dark/date-picker.bootstrap.css.js.map +1 -1
  118. package/components/date-picker/themes/dark/date-picker.fluent.css.js +1 -1
  119. package/components/date-picker/themes/dark/date-picker.fluent.css.js.map +1 -1
  120. package/components/date-picker/themes/dark/date-picker.indigo.css.js +1 -1
  121. package/components/date-picker/themes/dark/date-picker.indigo.css.js.map +1 -1
  122. package/components/date-picker/themes/dark/date-picker.material.css.js +1 -1
  123. package/components/date-picker/themes/dark/date-picker.material.css.js.map +1 -1
  124. package/components/date-picker/themes/light/date-picker.bootstrap.css.js +1 -1
  125. package/components/date-picker/themes/light/date-picker.bootstrap.css.js.map +1 -1
  126. package/components/date-picker/themes/light/date-picker.fluent.css.js +1 -1
  127. package/components/date-picker/themes/light/date-picker.fluent.css.js.map +1 -1
  128. package/components/date-picker/themes/light/date-picker.indigo.css.js +1 -1
  129. package/components/date-picker/themes/light/date-picker.indigo.css.js.map +1 -1
  130. package/components/date-picker/themes/light/date-picker.material.css.js +1 -1
  131. package/components/date-picker/themes/light/date-picker.material.css.js.map +1 -1
  132. package/components/date-picker/themes/shared/date-picker.bootstrap.css.js +1 -1
  133. package/components/date-picker/themes/shared/date-picker.bootstrap.css.js.map +1 -1
  134. package/components/date-picker/themes/shared/date-picker.common.css.js +1 -1
  135. package/components/date-picker/themes/shared/date-picker.common.css.js.map +1 -1
  136. package/components/date-picker/themes/shared/date-picker.fluent.css.js +1 -1
  137. package/components/date-picker/themes/shared/date-picker.fluent.css.js.map +1 -1
  138. package/components/date-picker/themes/shared/date-picker.indigo.css.js +1 -1
  139. package/components/date-picker/themes/shared/date-picker.indigo.css.js.map +1 -1
  140. package/components/date-picker/themes/shared/date-picker.material.css.js +1 -1
  141. package/components/date-picker/themes/shared/date-picker.material.css.js.map +1 -1
  142. package/components/date-range-picker/date-range-picker.d.ts +1 -3
  143. package/components/date-range-picker/date-range-picker.js +19 -26
  144. package/components/date-range-picker/date-range-picker.js.map +1 -1
  145. package/components/date-range-picker/themes/dark/date-range-picker.bootstrap.css.js +1 -1
  146. package/components/date-range-picker/themes/dark/date-range-picker.bootstrap.css.js.map +1 -1
  147. package/components/date-range-picker/themes/dark/date-range-picker.fluent.css.js +1 -1
  148. package/components/date-range-picker/themes/dark/date-range-picker.fluent.css.js.map +1 -1
  149. package/components/date-range-picker/themes/dark/date-range-picker.indigo.css.js +1 -1
  150. package/components/date-range-picker/themes/dark/date-range-picker.indigo.css.js.map +1 -1
  151. package/components/date-range-picker/themes/dark/date-range-picker.material.css.js +1 -1
  152. package/components/date-range-picker/themes/dark/date-range-picker.material.css.js.map +1 -1
  153. package/components/date-range-picker/themes/shared/date-range-picker.bootstrap.css.js +1 -1
  154. package/components/date-range-picker/themes/shared/date-range-picker.bootstrap.css.js.map +1 -1
  155. package/components/date-range-picker/themes/shared/date-range-picker.common.css.js +1 -1
  156. package/components/date-range-picker/themes/shared/date-range-picker.common.css.js.map +1 -1
  157. package/components/date-range-picker/themes/shared/date-range-picker.fluent.css.js +1 -1
  158. package/components/date-range-picker/themes/shared/date-range-picker.fluent.css.js.map +1 -1
  159. package/components/date-range-picker/themes/shared/date-range-picker.indigo.css.js +1 -1
  160. package/components/date-range-picker/themes/shared/date-range-picker.indigo.css.js.map +1 -1
  161. package/components/date-range-picker/themes/shared/date-range-picker.material.css.js +1 -1
  162. package/components/date-range-picker/themes/shared/date-range-picker.material.css.js.map +1 -1
  163. package/components/date-time-input/date-time-input.d.ts +1 -2
  164. package/components/date-time-input/date-time-input.js +7 -7
  165. package/components/date-time-input/date-time-input.js.map +1 -1
  166. package/components/dialog/dialog.d.ts +23 -25
  167. package/components/dialog/dialog.js +108 -115
  168. package/components/dialog/dialog.js.map +1 -1
  169. package/components/dialog/themes/dark/dialog.bootstrap.css.js +1 -1
  170. package/components/dialog/themes/dark/dialog.bootstrap.css.js.map +1 -1
  171. package/components/expansion-panel/expansion-panel.d.ts +12 -14
  172. package/components/expansion-panel/expansion-panel.js +43 -56
  173. package/components/expansion-panel/expansion-panel.js.map +1 -1
  174. package/components/file-input/file-input.d.ts +1 -3
  175. package/components/file-input/file-input.js +6 -11
  176. package/components/file-input/file-input.js.map +1 -1
  177. package/components/file-input/themes/dark/file-input.bootstrap.css.d.ts +1 -0
  178. package/components/file-input/themes/dark/file-input.bootstrap.css.js +3 -0
  179. package/components/file-input/themes/dark/file-input.bootstrap.css.js.map +1 -0
  180. package/components/file-input/themes/dark/file-input.fluent.css.d.ts +1 -0
  181. package/components/file-input/themes/dark/file-input.fluent.css.js +3 -0
  182. package/components/file-input/themes/dark/file-input.fluent.css.js.map +1 -0
  183. package/components/file-input/themes/dark/file-input.indigo.css.d.ts +1 -0
  184. package/components/file-input/themes/dark/file-input.indigo.css.js +3 -0
  185. package/components/file-input/themes/dark/file-input.indigo.css.js.map +1 -0
  186. package/components/file-input/themes/dark/file-input.material.css.d.ts +1 -0
  187. package/components/file-input/themes/dark/file-input.material.css.js +3 -0
  188. package/components/file-input/themes/dark/file-input.material.css.js.map +1 -0
  189. package/components/file-input/themes/file-input.base.css.js +1 -1
  190. package/components/file-input/themes/file-input.base.css.js.map +1 -1
  191. package/components/file-input/themes/light/file-input.bootstrap.css.d.ts +1 -0
  192. package/components/file-input/themes/light/file-input.bootstrap.css.js +3 -0
  193. package/components/file-input/themes/light/file-input.bootstrap.css.js.map +1 -0
  194. package/components/file-input/themes/light/file-input.fluent.css.d.ts +1 -0
  195. package/components/file-input/themes/light/file-input.fluent.css.js +3 -0
  196. package/components/file-input/themes/light/file-input.fluent.css.js.map +1 -0
  197. package/components/file-input/themes/light/file-input.indigo.css.d.ts +1 -0
  198. package/components/file-input/themes/light/file-input.indigo.css.js +3 -0
  199. package/components/file-input/themes/light/file-input.indigo.css.js.map +1 -0
  200. package/components/file-input/themes/light/file-input.material.css.d.ts +1 -0
  201. package/components/file-input/themes/light/file-input.material.css.js +3 -0
  202. package/components/file-input/themes/light/file-input.material.css.js.map +1 -0
  203. package/components/file-input/themes/light/file-input.shared.css.d.ts +1 -0
  204. package/components/file-input/themes/light/file-input.shared.css.js +3 -0
  205. package/components/file-input/themes/light/file-input.shared.css.js.map +1 -0
  206. package/components/file-input/themes/shared/file-input.bootstrap.css.js +1 -1
  207. package/components/file-input/themes/shared/file-input.bootstrap.css.js.map +1 -1
  208. package/components/file-input/themes/shared/file-input.indigo.css.js +1 -1
  209. package/components/file-input/themes/shared/file-input.indigo.css.js.map +1 -1
  210. package/components/file-input/themes/shared/file-input.material.css.js +1 -1
  211. package/components/file-input/themes/shared/file-input.material.css.js.map +1 -1
  212. package/components/file-input/themes/themes.js +19 -0
  213. package/components/file-input/themes/themes.js.map +1 -1
  214. package/components/input/input.d.ts +1 -4
  215. package/components/input/input.js +7 -12
  216. package/components/input/input.js.map +1 -1
  217. package/components/input/themes/shared/input.bootstrap.css.js +1 -1
  218. package/components/input/themes/shared/input.bootstrap.css.js.map +1 -1
  219. package/components/input/themes/shared/input.common.css.js +1 -1
  220. package/components/input/themes/shared/input.common.css.js.map +1 -1
  221. package/components/input/themes/shared/input.fluent.css.js +1 -1
  222. package/components/input/themes/shared/input.fluent.css.js.map +1 -1
  223. package/components/input/themes/shared/input.indigo.css.js +1 -1
  224. package/components/input/themes/shared/input.indigo.css.js.map +1 -1
  225. package/components/input/themes/shared/input.material.css.js +1 -1
  226. package/components/input/themes/shared/input.material.css.js.map +1 -1
  227. package/components/mask-input/mask-input-base.js +1 -0
  228. package/components/mask-input/mask-input-base.js.map +1 -1
  229. package/components/mask-input/mask-input.d.ts +2 -3
  230. package/components/mask-input/mask-input.js +5 -8
  231. package/components/mask-input/mask-input.js.map +1 -1
  232. package/components/nav-drawer/nav-drawer-item.d.ts +3 -4
  233. package/components/nav-drawer/nav-drawer-item.js +15 -18
  234. package/components/nav-drawer/nav-drawer-item.js.map +1 -1
  235. package/components/nav-drawer/nav-drawer.d.ts +1 -2
  236. package/components/nav-drawer/nav-drawer.js +9 -11
  237. package/components/nav-drawer/nav-drawer.js.map +1 -1
  238. package/components/nav-drawer/themes/container.base.css.js +1 -1
  239. package/components/nav-drawer/themes/container.base.css.js.map +1 -1
  240. package/components/nav-drawer/themes/shared/container/nav-drawer.common.css.js +1 -1
  241. package/components/nav-drawer/themes/shared/container/nav-drawer.common.css.js.map +1 -1
  242. package/components/popover/popover.d.ts +17 -16
  243. package/components/popover/popover.js +81 -91
  244. package/components/popover/popover.js.map +1 -1
  245. package/components/progress/base.d.ts +8 -8
  246. package/components/progress/base.js +19 -23
  247. package/components/progress/base.js.map +1 -1
  248. package/components/progress/circular-gradient.js.map +1 -1
  249. package/components/progress/circular-progress.d.ts +3 -4
  250. package/components/progress/circular-progress.js +15 -18
  251. package/components/progress/circular-progress.js.map +1 -1
  252. package/components/progress/linear-progress.d.ts +1 -0
  253. package/components/progress/linear-progress.js +5 -1
  254. package/components/progress/linear-progress.js.map +1 -1
  255. package/components/radio/radio.d.ts +3 -5
  256. package/components/radio/radio.js +33 -31
  257. package/components/radio/radio.js.map +1 -1
  258. package/components/radio/themes/dark/radio.fluent.css.js +1 -1
  259. package/components/radio/themes/dark/radio.fluent.css.js.map +1 -1
  260. package/components/radio/themes/shared/radio.bootstrap.css.js +1 -1
  261. package/components/radio/themes/shared/radio.bootstrap.css.js.map +1 -1
  262. package/components/radio/themes/shared/radio.common.css.js +1 -1
  263. package/components/radio/themes/shared/radio.common.css.js.map +1 -1
  264. package/components/radio/themes/shared/radio.fluent.css.js +1 -1
  265. package/components/radio/themes/shared/radio.fluent.css.js.map +1 -1
  266. package/components/radio/themes/shared/radio.indigo.css.js +1 -1
  267. package/components/radio/themes/shared/radio.indigo.css.js.map +1 -1
  268. package/components/radio/themes/shared/radio.material.css.js +1 -1
  269. package/components/radio/themes/shared/radio.material.css.js.map +1 -1
  270. package/components/radio-group/radio-group.d.ts +4 -4
  271. package/components/radio-group/radio-group.js +24 -21
  272. package/components/radio-group/radio-group.js.map +1 -1
  273. package/components/rating/rating.d.ts +1 -2
  274. package/components/rating/rating.js +4 -3
  275. package/components/rating/rating.js.map +1 -1
  276. package/components/select/select.d.ts +35 -38
  277. package/components/select/select.js +138 -146
  278. package/components/select/select.js.map +1 -1
  279. package/components/select/themes/shared/select.bootstrap.css.js +1 -1
  280. package/components/select/themes/shared/select.bootstrap.css.js.map +1 -1
  281. package/components/select/themes/shared/select.common.css.js +1 -1
  282. package/components/select/themes/shared/select.common.css.js.map +1 -1
  283. package/components/select/themes/shared/select.fluent.css.js +1 -1
  284. package/components/select/themes/shared/select.fluent.css.js.map +1 -1
  285. package/components/select/themes/shared/select.indigo.css.js +1 -1
  286. package/components/select/themes/shared/select.indigo.css.js.map +1 -1
  287. package/components/select/themes/shared/select.material.css.js +1 -1
  288. package/components/select/themes/shared/select.material.css.js.map +1 -1
  289. package/components/slider/slider-label.js.map +1 -1
  290. package/components/slider/slider.d.ts +1 -2
  291. package/components/slider/slider.js +5 -2
  292. package/components/slider/slider.js.map +1 -1
  293. package/components/snackbar/snackbar.d.ts +3 -5
  294. package/components/snackbar/snackbar.js +5 -5
  295. package/components/snackbar/snackbar.js.map +1 -1
  296. package/components/stepper/stepper.d.ts +1 -0
  297. package/components/stepper/stepper.js +9 -0
  298. package/components/stepper/stepper.js.map +1 -1
  299. package/components/textarea/textarea.d.ts +13 -20
  300. package/components/textarea/textarea.js +66 -90
  301. package/components/textarea/textarea.js.map +1 -1
  302. package/components/textarea/themes/shared/textarea.bootstrap.css.js +1 -1
  303. package/components/textarea/themes/shared/textarea.bootstrap.css.js.map +1 -1
  304. package/components/textarea/themes/shared/textarea.common.css.js +1 -1
  305. package/components/textarea/themes/shared/textarea.common.css.js.map +1 -1
  306. package/components/textarea/themes/shared/textarea.fluent.css.js +1 -1
  307. package/components/textarea/themes/shared/textarea.fluent.css.js.map +1 -1
  308. package/components/textarea/themes/shared/textarea.indigo.css.js +1 -1
  309. package/components/textarea/themes/shared/textarea.indigo.css.js.map +1 -1
  310. package/components/textarea/themes/shared/textarea.material.css.js +1 -1
  311. package/components/textarea/themes/shared/textarea.material.css.js.map +1 -1
  312. package/components/tile-manager/position.js +2 -1
  313. package/components/tile-manager/position.js.map +1 -1
  314. package/components/tile-manager/tile.d.ts +8 -12
  315. package/components/tile-manager/tile.js +16 -37
  316. package/components/tile-manager/tile.js.map +1 -1
  317. package/components/toast/toast.d.ts +1 -2
  318. package/components/toast/toast.js +1 -1
  319. package/components/toast/toast.js.map +1 -1
  320. package/components/validation-container/validation-container.d.ts +9 -6
  321. package/components/validation-container/validation-container.js +56 -38
  322. package/components/validation-container/validation-container.js.map +1 -1
  323. package/custom-elements.json +9595 -6648
  324. package/igniteui-webcomponents.css-data.json +1 -1
  325. package/igniteui-webcomponents.html-data.json +1 -1
  326. package/package.json +1 -1
  327. package/web-types.json +2 -2
@@ -6,7 +6,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { ContextProvider } from '@lit/context';
8
8
  import { html, LitElement, nothing } from 'lit';
9
- import { property, queryAll, queryAssignedElements, state, } from 'lit/decorators.js';
9
+ import { property, queryAll, state } from 'lit/decorators.js';
10
+ import { cache } from 'lit/directives/cache.js';
10
11
  import { createRef, ref } from 'lit/directives/ref.js';
11
12
  import { styleMap } from 'lit/directives/style-map.js';
12
13
  import { addThemingController } from '../../theming/theming-controller.js';
@@ -16,11 +17,12 @@ import { addGesturesController, } from '../common/controllers/gestures.js';
16
17
  import { addInternalsController } from '../common/controllers/internals.js';
17
18
  import { addKeybindings, arrowLeft, arrowRight, endKey, homeKey, } from '../common/controllers/key-bindings.js';
18
19
  import { createMutationController, } from '../common/controllers/mutation-observer.js';
20
+ import { addSlotController, setSlots, } from '../common/controllers/slot.js';
19
21
  import { watch } from '../common/decorators/watch.js';
20
22
  import { registerComponent } from '../common/definitions/register.js';
21
23
  import { EventEmitterMixin } from '../common/mixins/event-emitter.js';
22
24
  import { partMap } from '../common/part-map.js';
23
- import { addSafeEventListener, asNumber, createCounter, findElementFromEventPath, first, formatString, isLTR, last, wrap, } from '../common/util.js';
25
+ import { addSafeEventListener, asNumber, findElementFromEventPath, first, formatString, isEmpty, isLTR, last, wrap, } from '../common/util.js';
24
26
  import IgcIconComponent from '../icon/icon.js';
25
27
  import IgcCarouselIndicatorComponent from './carousel-indicator.js';
26
28
  import IgcCarouselIndicatorContainerComponent from './carousel-indicator-container.js';
@@ -28,40 +30,32 @@ import IgcCarouselSlideComponent from './carousel-slide.js';
28
30
  import { styles } from './themes/carousel.base.css.js';
29
31
  import { all } from './themes/container.js';
30
32
  import { styles as shared } from './themes/shared/carousel.common.css.js';
33
+ let nextId = 1;
34
+ const Slots = setSlots('indicator', 'previous-button', 'next-button');
31
35
  class IgcCarouselComponent extends EventEmitterMixin(LitElement) {
32
36
  static register() {
33
37
  registerComponent(IgcCarouselComponent, IgcCarouselIndicatorComponent, IgcCarouselIndicatorContainerComponent, IgcCarouselSlideComponent, IgcIconComponent, IgcButtonComponent);
34
38
  }
35
- get hasProjectedIndicators() {
36
- return this._projectedIndicators.length > 0;
39
+ get _hasProjectedIndicators() {
40
+ return !isEmpty(this._projectedIndicators);
37
41
  }
38
- get showIndicatorsLabel() {
42
+ get _showIndicatorsLabel() {
39
43
  return this.total > this.maximumIndicatorsCount;
40
44
  }
41
- get nextIndex() {
45
+ get _nextIndex() {
42
46
  return wrap(0, this.total - 1, this.current + 1);
43
47
  }
44
- get prevIndex() {
48
+ get _previousIndex() {
45
49
  return wrap(0, this.total - 1, this.current - 1);
46
50
  }
47
- _observerCallback({ changes: { added, attributes }, }) {
48
- const activeSlides = this.slides.filter((slide) => slide.active);
49
- if (activeSlides.length <= 1) {
50
- return;
51
- }
52
- const idx = this.slides.indexOf(added.length ? last(added).node : last(attributes).node);
53
- for (const [i, slide] of this.slides.entries()) {
54
- if (slide.active && i !== idx) {
55
- slide.active = false;
56
- }
57
- }
58
- this.activateSlide(this.slides[idx]);
51
+ get slides() {
52
+ return Array.from(this._slides);
59
53
  }
60
54
  get total() {
61
- return this.slides.length;
55
+ return this._slides.length;
62
56
  }
63
57
  get current() {
64
- return Math.max(0, this.slides.indexOf(this._activeSlide));
58
+ return Math.max(0, this._slides.indexOf(this._activeSlide));
65
59
  }
66
60
  get isPlaying() {
67
61
  return this._playing;
@@ -69,21 +63,30 @@ class IgcCarouselComponent extends EventEmitterMixin(LitElement) {
69
63
  get isPaused() {
70
64
  return this._paused;
71
65
  }
72
- contextChanged() {
66
+ _contextChanged() {
73
67
  this._context.setValue(this, true);
74
68
  }
75
- intervalChange() {
69
+ _intervalChange() {
76
70
  if (!this.isPlaying) {
77
71
  this._playing = true;
78
72
  }
79
- this.restartInterval();
73
+ this._restartInterval();
80
74
  }
81
75
  constructor() {
82
76
  super();
83
- this._carouselId = `igc-carousel-${IgcCarouselComponent.increment()}`;
77
+ this._carouselId = `igc-carousel-${nextId++}`;
78
+ this._paused = false;
84
79
  this._hasKeyboardInteractionOnIndicators = false;
85
- this._hasMouseStop = false;
80
+ this._hasPointerInteraction = false;
86
81
  this._hasInnerFocus = false;
82
+ this._slides = [];
83
+ this._projectedIndicators = [];
84
+ this._playing = false;
85
+ this._slots = addSlotController(this, {
86
+ slots: Slots,
87
+ onChange: this._handleSlotChange,
88
+ initial: true,
89
+ });
87
90
  this._context = new ContextProvider(this, {
88
91
  context: carouselContext,
89
92
  initialValue: this,
@@ -92,8 +95,6 @@ class IgcCarouselComponent extends EventEmitterMixin(LitElement) {
92
95
  this._indicatorsContainerRef = createRef();
93
96
  this._prevButtonRef = createRef();
94
97
  this._nextButtonRef = createRef();
95
- this._playing = false;
96
- this._paused = false;
97
98
  this.disableLoop = false;
98
99
  this.disablePauseOnInteraction = false;
99
100
  this.hideNavigation = false;
@@ -111,38 +112,34 @@ class IgcCarouselComponent extends EventEmitterMixin(LitElement) {
111
112
  },
112
113
  });
113
114
  addThemingController(this, all);
114
- addSafeEventListener(this, 'pointerenter', this.handlePointerEnter);
115
- addSafeEventListener(this, 'pointerleave', this.handlePointerLeave);
116
- addSafeEventListener(this, 'pointerdown', () => {
117
- this._hasInnerFocus = false;
118
- });
119
- addSafeEventListener(this, 'keyup', () => {
120
- this._hasInnerFocus = true;
121
- });
115
+ addSafeEventListener(this, 'pointerenter', this._handlePointerInteraction);
116
+ addSafeEventListener(this, 'pointerleave', this._handlePointerInteraction);
117
+ addSafeEventListener(this, 'focusin', this._handleFocusInteraction);
118
+ addSafeEventListener(this, 'focusout', this._handleFocusInteraction);
122
119
  addGesturesController(this, {
123
120
  ref: this._carouselSlidesContainerRef,
124
121
  touchOnly: true,
125
122
  })
126
- .set('swipe-left', this.handleHorizontalSwipe)
127
- .set('swipe-right', this.handleHorizontalSwipe)
128
- .set('swipe-up', this.handleVerticalSwipe)
129
- .set('swipe-down', this.handleVerticalSwipe);
123
+ .set('swipe-left', this._handleHorizontalSwipe)
124
+ .set('swipe-right', this._handleHorizontalSwipe)
125
+ .set('swipe-up', this._handleVerticalSwipe)
126
+ .set('swipe-down', this._handleVerticalSwipe);
130
127
  addKeybindings(this, {
131
128
  ref: this._indicatorsContainerRef,
132
129
  bindingDefaults: { preventDefault: true },
133
130
  })
134
- .set(arrowLeft, this.handleArrowLeft)
135
- .set(arrowRight, this.handleArrowRight)
136
- .set(homeKey, this.handleHomeKey)
137
- .set(endKey, this.handleEndKey);
131
+ .set(arrowLeft, this._handleArrowLeft)
132
+ .set(arrowRight, this._handleArrowRight)
133
+ .set(homeKey, this._handleHomeKey)
134
+ .set(endKey, this._handleEndKey);
138
135
  addKeybindings(this, {
139
136
  ref: this._prevButtonRef,
140
137
  bindingDefaults: { preventDefault: true },
141
- }).setActivateHandler(this.handleNavigationInteractionPrevious);
138
+ }).setActivateHandler(this._handleNavigationInteractionPrevious);
142
139
  addKeybindings(this, {
143
140
  ref: this._nextButtonRef,
144
141
  bindingDefaults: { preventDefault: true },
145
- }).setActivateHandler(this.handleNavigationInteractionNext);
142
+ }).setActivateHandler(this._handleNavigationInteractionNext);
146
143
  createMutationController(this, {
147
144
  callback: this._observerCallback,
148
145
  filter: [IgcCarouselSlideComponent.tagName],
@@ -153,147 +150,158 @@ class IgcCarouselComponent extends EventEmitterMixin(LitElement) {
153
150
  },
154
151
  });
155
152
  }
156
- handleSlotChange() {
157
- if (this.total) {
158
- this.activateSlide(this.slides.findLast((slide) => slide.active) ?? first(this.slides));
153
+ async firstUpdated() {
154
+ await this.updateComplete;
155
+ if (!isEmpty(this._slides)) {
156
+ this._activateSlide(this._slides.findLast((slide) => slide.active) ?? first(this._slides));
159
157
  }
160
158
  }
161
- handleIndicatorSlotChange() {
162
- this.requestUpdate();
163
- }
164
- handlePointerEnter() {
165
- this._hasMouseStop = true;
166
- if (this._hasInnerFocus) {
159
+ _observerCallback({ changes: { added, attributes }, }) {
160
+ const activeSlides = this._slides.filter((slide) => slide.active);
161
+ if (activeSlides.length <= 1) {
167
162
  return;
168
163
  }
169
- this.handlePauseOnInteraction();
164
+ const idx = this._slides.indexOf(added.length ? last(added).node : last(attributes).node);
165
+ for (const [i, slide] of this._slides.entries()) {
166
+ if (slide.active && i !== idx) {
167
+ slide.active = false;
168
+ }
169
+ }
170
+ this._activateSlide(this._slides[idx]);
170
171
  }
171
- handlePointerLeave() {
172
- this._hasMouseStop = false;
173
- if (this._hasInnerFocus) {
174
- return;
172
+ _handleSlotChange(params) {
173
+ if (params.isDefault || params.isInitial) {
174
+ this._slides = this._slots.getAssignedElements('[default]', {
175
+ selector: IgcCarouselSlideComponent.tagName,
176
+ });
177
+ }
178
+ if (params.slot === 'indicator') {
179
+ this._projectedIndicators = this._slots.getAssignedElements('indicator', {
180
+ selector: IgcCarouselIndicatorComponent.tagName,
181
+ });
175
182
  }
176
- this.handlePauseOnInteraction();
177
183
  }
178
- handleFocusIn() {
179
- if (this._hasInnerFocus || this._hasMouseStop) {
180
- return;
184
+ _handlePointerInteraction(event) {
185
+ this._hasPointerInteraction = event.type === 'pointerenter';
186
+ if (!this._hasInnerFocus) {
187
+ this._handlePauseOnInteraction();
181
188
  }
182
- this.handlePauseOnInteraction();
183
189
  }
184
- handleFocusOut(event) {
190
+ _handleFocusInteraction(event) {
185
191
  const node = event.relatedTarget;
186
- if (this.contains(node) || this.renderRoot.contains(node)) {
192
+ if (this.contains(node)) {
187
193
  return;
188
194
  }
189
- if (this._hasInnerFocus) {
190
- this._hasInnerFocus = false;
191
- if (!this._hasMouseStop) {
192
- this.handlePauseOnInteraction();
193
- }
195
+ this._hasInnerFocus = event.type === 'focusin';
196
+ if (!this._hasPointerInteraction) {
197
+ this._handlePauseOnInteraction();
194
198
  }
195
199
  }
196
- handlePauseOnInteraction() {
197
- if (!this.interval || this.disablePauseOnInteraction)
198
- return;
199
- if (this.isPlaying) {
200
- this.pause();
201
- this.emitEvent('igcPaused');
202
- }
203
- else {
204
- this.play();
205
- this.emitEvent('igcPlaying');
206
- }
200
+ async _handleIndicatorClick(event) {
201
+ const indicator = findElementFromEventPath(IgcCarouselIndicatorComponent.tagName, event);
202
+ const index = this._hasProjectedIndicators
203
+ ? this._projectedIndicators.indexOf(indicator)
204
+ : Array.from(this._defaultIndicators).indexOf(indicator);
205
+ this._handleInteraction(() => this.select(this._slides[index], index > this.current ? 'next' : 'prev'));
207
206
  }
208
- async handleArrowLeft() {
207
+ async _handleArrowLeft() {
209
208
  this._hasKeyboardInteractionOnIndicators = true;
210
- this.handleInteraction(isLTR(this) ? this.prev : this.next);
209
+ this._handleInteraction(isLTR(this) ? this.prev : this.next);
211
210
  }
212
- async handleArrowRight() {
211
+ async _handleArrowRight() {
213
212
  this._hasKeyboardInteractionOnIndicators = true;
214
- this.handleInteraction(isLTR(this) ? this.next : this.prev);
213
+ this._handleInteraction(isLTR(this) ? this.next : this.prev);
215
214
  }
216
- async handleHomeKey() {
215
+ async _handleHomeKey() {
217
216
  this._hasKeyboardInteractionOnIndicators = true;
218
- this.handleInteraction(() => this.select(isLTR(this) ? first(this.slides) : last(this.slides)));
217
+ this._handleInteraction(() => this.select(isLTR(this) ? first(this._slides) : last(this._slides)));
219
218
  }
220
- async handleEndKey() {
219
+ async _handleEndKey() {
221
220
  this._hasKeyboardInteractionOnIndicators = true;
222
- this.handleInteraction(() => this.select(isLTR(this) ? last(this.slides) : first(this.slides)));
221
+ this._handleInteraction(() => this.select(isLTR(this) ? last(this._slides) : first(this._slides)));
223
222
  }
224
- handleVerticalSwipe({ data: { direction } }) {
223
+ _handleVerticalSwipe({ data: { direction } }) {
225
224
  if (this.vertical) {
226
- this.handleInteraction(direction === 'up' ? this.next : this.prev);
225
+ this._handleInteraction(direction === 'up' ? this.next : this.prev);
227
226
  }
228
227
  }
229
- handleHorizontalSwipe({ data: { direction } }) {
228
+ _handleHorizontalSwipe({ data: { direction } }) {
230
229
  if (!this.vertical) {
231
- this.handleInteraction(async () => {
230
+ const callback = () => {
232
231
  if (isLTR(this)) {
233
- direction === 'left' ? await this.next() : await this.prev();
232
+ return direction === 'left' ? this.next : this.prev;
234
233
  }
235
- else {
236
- direction === 'left' ? await this.prev() : await this.next();
237
- }
238
- });
234
+ return direction === 'left' ? this.prev : this.next;
235
+ };
236
+ this._handleInteraction(callback());
239
237
  }
240
238
  }
241
- async handleIndicatorClick(event) {
242
- const indicator = findElementFromEventPath(IgcCarouselIndicatorComponent.tagName, event);
243
- const index = this.hasProjectedIndicators
244
- ? this._projectedIndicators.indexOf(indicator)
245
- : Array.from(this._defaultIndicators).indexOf(indicator);
246
- this.handleInteraction(() => this.select(this.slides[index], index > this.current ? 'next' : 'prev'));
247
- }
248
- handleNavigationInteractionNext() {
249
- this.handleInteraction(this.next);
239
+ _handleNavigationInteractionNext() {
240
+ this._handleInteraction(this.next);
250
241
  }
251
- handleNavigationInteractionPrevious() {
252
- this.handleInteraction(this.prev);
242
+ _handleNavigationInteractionPrevious() {
243
+ this._handleInteraction(this.prev);
253
244
  }
254
- async handleInteraction(callback) {
245
+ async _handleInteraction(callback) {
255
246
  if (this.interval) {
256
- this.resetInterval();
247
+ this._resetInterval();
248
+ }
249
+ if (await callback.call(this)) {
250
+ this.emitEvent('igcSlideChanged', { detail: this.current });
257
251
  }
258
- await callback.call(this);
259
- this.emitEvent('igcSlideChanged', { detail: this.current });
260
252
  if (this.interval) {
261
- this.restartInterval();
253
+ this._restartInterval();
254
+ }
255
+ }
256
+ _handlePauseOnInteraction() {
257
+ if (!this.interval || this.disablePauseOnInteraction)
258
+ return;
259
+ if (this.isPlaying) {
260
+ this.pause();
261
+ this.emitEvent('igcPaused');
262
+ }
263
+ else {
264
+ this.play();
265
+ this.emitEvent('igcPlaying');
262
266
  }
263
267
  }
264
- activateSlide(slide) {
268
+ _activateSlide(slide) {
265
269
  if (this._activeSlide) {
266
270
  this._activeSlide.active = false;
267
271
  }
268
272
  this._activeSlide = slide;
269
273
  this._activeSlide.active = true;
270
274
  if (this._hasKeyboardInteractionOnIndicators) {
271
- this.hasProjectedIndicators
275
+ this._hasProjectedIndicators
272
276
  ? this._projectedIndicators[this.current].focus()
273
277
  : this._defaultIndicators[this.current].focus();
274
278
  this._hasKeyboardInteractionOnIndicators = false;
275
279
  }
276
280
  }
277
- updateProjectedIndicators() {
278
- for (const [idx, slide] of this.slides.entries()) {
281
+ _updateProjectedIndicators() {
282
+ for (const [idx, slide] of this._slides.entries()) {
279
283
  const indicator = this._projectedIndicators[idx];
280
284
  indicator.active = slide.active;
281
285
  indicator.index = idx;
282
- this.setAttribute('aria-controls', slide.id);
286
+ }
287
+ if (this._activeSlide) {
288
+ this.setAttribute('aria-controls', this._activeSlide.id);
283
289
  }
284
290
  }
285
- resetInterval() {
291
+ _resetInterval() {
286
292
  if (this._lastInterval) {
287
293
  clearInterval(this._lastInterval);
288
294
  this._lastInterval = null;
289
295
  }
290
296
  }
291
- restartInterval() {
292
- this.resetInterval();
297
+ _restartInterval() {
298
+ this._resetInterval();
293
299
  if (asNumber(this.interval) > 0) {
294
300
  this._lastInterval = setInterval(() => {
295
- if (this.isPlaying && this.total) {
296
- this.next();
301
+ if (this.isPlaying &&
302
+ this.total &&
303
+ !(this.disableLoop && this._nextIndex === 0)) {
304
+ this.select(this.slides[this._nextIndex], 'next');
297
305
  this.emitEvent('igcSlideChanged', { detail: this.current });
298
306
  }
299
307
  else {
@@ -302,18 +310,18 @@ class IgcCarouselComponent extends EventEmitterMixin(LitElement) {
302
310
  }, this.interval);
303
311
  }
304
312
  }
305
- async animateSlides(nextSlide, currentSlide, dir) {
313
+ async _animateSlides(nextSlide, currentSlide, dir) {
306
314
  if (dir === 'next') {
307
315
  currentSlide.previous = true;
308
316
  currentSlide.toggleAnimation('out');
309
- this.activateSlide(nextSlide);
317
+ this._activateSlide(nextSlide);
310
318
  await nextSlide.toggleAnimation('in');
311
319
  currentSlide.previous = false;
312
320
  }
313
321
  else {
314
322
  currentSlide.previous = true;
315
323
  currentSlide.toggleAnimation('in', 'reverse');
316
- this.activateSlide(nextSlide);
324
+ this._activateSlide(nextSlide);
317
325
  await nextSlide.toggleAnimation('out', 'reverse');
318
326
  currentSlide.previous = false;
319
327
  }
@@ -322,49 +330,49 @@ class IgcCarouselComponent extends EventEmitterMixin(LitElement) {
322
330
  if (!this.isPlaying) {
323
331
  this._paused = false;
324
332
  this._playing = true;
325
- this.restartInterval();
333
+ this._restartInterval();
326
334
  }
327
335
  }
328
336
  pause() {
329
337
  if (this.isPlaying) {
330
338
  this._playing = false;
331
339
  this._paused = true;
332
- this.resetInterval();
340
+ this._resetInterval();
333
341
  }
334
342
  }
335
343
  async next() {
336
- if (this.disableLoop && this.nextIndex === 0) {
344
+ if (this.disableLoop && this._nextIndex === 0) {
337
345
  this.pause();
338
346
  return false;
339
347
  }
340
- return await this.select(this.slides[this.nextIndex], 'next');
348
+ return await this.select(this._slides[this._nextIndex], 'next');
341
349
  }
342
350
  async prev() {
343
- if (this.disableLoop && this.prevIndex === this.total - 1) {
351
+ if (this.disableLoop && this._previousIndex === this.total - 1) {
344
352
  this.pause();
345
353
  return false;
346
354
  }
347
- return await this.select(this.slides[this.prevIndex], 'prev');
355
+ return await this.select(this._slides[this._previousIndex], 'prev');
348
356
  }
349
357
  async select(slideOrIndex, animationDirection) {
350
358
  let index;
351
359
  let slide;
352
360
  if (typeof slideOrIndex === 'number') {
353
361
  index = slideOrIndex;
354
- slide = this.slides.at(index);
362
+ slide = this._slides.at(index);
355
363
  }
356
364
  else {
357
365
  slide = slideOrIndex;
358
- index = this.slides.indexOf(slide);
366
+ index = this._slides.indexOf(slide);
359
367
  }
360
368
  if (index === this.current || index === -1 || !slide) {
361
369
  return false;
362
370
  }
363
371
  const dir = animationDirection ?? (index > this.current ? 'next' : 'prev');
364
- await this.animateSlides(slide, this._activeSlide, dir);
372
+ await this._animateSlides(slide, this._activeSlide, dir);
365
373
  return true;
366
374
  }
367
- navigationTemplate() {
375
+ _renderNavigation() {
368
376
  return html `
369
377
  <igc-button
370
378
  ${ref(this._prevButtonRef)}
@@ -373,7 +381,7 @@ class IgcCarouselComponent extends EventEmitterMixin(LitElement) {
373
381
  aria-label="Previous slide"
374
382
  aria-controls=${this._carouselId}
375
383
  ?disabled=${this.disableLoop && this.current === 0}
376
- @click=${this.handleNavigationInteractionPrevious}
384
+ @click=${this._handleNavigationInteractionPrevious}
377
385
  >
378
386
  <slot name="previous-button">
379
387
  <igc-icon
@@ -383,6 +391,7 @@ class IgcCarouselComponent extends EventEmitterMixin(LitElement) {
383
391
  ></igc-icon>
384
392
  </slot>
385
393
  </igc-button>
394
+
386
395
  <igc-button
387
396
  ${ref(this._nextButtonRef)}
388
397
  type="button"
@@ -390,7 +399,7 @@ class IgcCarouselComponent extends EventEmitterMixin(LitElement) {
390
399
  aria-label="Next slide"
391
400
  aria-controls=${this._carouselId}
392
401
  ?disabled=${this.disableLoop && this.current === this.total - 1}
393
- @click=${this.handleNavigationInteractionNext}
402
+ @click=${this._handleNavigationInteractionNext}
394
403
  >
395
404
  <slot name="next-button">
396
405
  <igc-icon
@@ -402,8 +411,8 @@ class IgcCarouselComponent extends EventEmitterMixin(LitElement) {
402
411
  </igc-button>
403
412
  `;
404
413
  }
405
- *renderIndicators() {
406
- for (const [i, slide] of this.slides.entries()) {
414
+ *_renderIndicators() {
415
+ for (const [i, slide] of this._slides.entries()) {
407
416
  const forward = slide.active ? 'visible' : 'hidden';
408
417
  const backward = slide.active ? 'hidden' : 'visible';
409
418
  yield html `
@@ -425,7 +434,7 @@ class IgcCarouselComponent extends EventEmitterMixin(LitElement) {
425
434
  `;
426
435
  }
427
436
  }
428
- indicatorTemplate() {
437
+ _renderIndicatorContainer() {
429
438
  const parts = {
430
439
  indicators: true,
431
440
  start: this.indicatorsOrientation === 'start',
@@ -437,20 +446,16 @@ class IgcCarouselComponent extends EventEmitterMixin(LitElement) {
437
446
  role="tablist"
438
447
  part=${partMap(parts)}
439
448
  >
440
- <slot
441
- name="indicator"
442
- @slotchange=${this.handleIndicatorSlotChange}
443
- @click=${this.handleIndicatorClick}
444
- >
445
- ${this.hasProjectedIndicators
446
- ? this.updateProjectedIndicators()
447
- : this.renderIndicators()}
449
+ <slot name="indicator" @click=${this._handleIndicatorClick}>
450
+ ${cache(this._hasProjectedIndicators
451
+ ? this._updateProjectedIndicators()
452
+ : this._renderIndicators())}
448
453
  </slot>
449
454
  </div>
450
455
  </igc-carousel-indicator-container>
451
456
  `;
452
457
  }
453
- labelTemplate() {
458
+ _renderLabel() {
454
459
  const parts = {
455
460
  label: true,
456
461
  indicators: true,
@@ -464,21 +469,19 @@ class IgcCarouselComponent extends EventEmitterMixin(LitElement) {
464
469
  `;
465
470
  }
466
471
  render() {
472
+ const hasNoIndicators = this.hideIndicators || this._showIndicatorsLabel;
473
+ const hasLabel = !this.hideIndicators && this._showIndicatorsLabel;
467
474
  return html `
468
- <section @focusin=${this.handleFocusIn} @focusout=${this.handleFocusOut}>
469
- ${this.hideNavigation ? nothing : this.navigationTemplate()}
470
- ${this.hideIndicators || this.showIndicatorsLabel
471
- ? nothing
472
- : this.indicatorTemplate()}
473
- ${!this.hideIndicators && this.showIndicatorsLabel
474
- ? this.labelTemplate()
475
- : nothing}
475
+ <section>
476
+ ${cache(this.hideNavigation ? nothing : this._renderNavigation())}
477
+ ${hasNoIndicators ? nothing : this._renderIndicatorContainer()}
478
+ ${hasLabel ? this._renderLabel() : nothing}
476
479
  <div
477
480
  ${ref(this._carouselSlidesContainerRef)}
478
481
  id=${this._carouselId}
479
- aria-live=${this.interval && this.isPlaying ? 'off' : 'polite'}
482
+ aria-live=${this.interval && this._playing ? 'off' : 'polite'}
480
483
  >
481
- <slot @slotchange=${this.handleSlotChange}></slot>
484
+ <slot></slot>
482
485
  </div>
483
486
  </section>
484
487
  `;
@@ -486,17 +489,7 @@ class IgcCarouselComponent extends EventEmitterMixin(LitElement) {
486
489
  }
487
490
  IgcCarouselComponent.styles = [styles, shared];
488
491
  IgcCarouselComponent.tagName = 'igc-carousel';
489
- IgcCarouselComponent.increment = createCounter();
490
492
  export default IgcCarouselComponent;
491
- __decorate([
492
- queryAll(IgcCarouselIndicatorComponent.tagName)
493
- ], IgcCarouselComponent.prototype, "_defaultIndicators", void 0);
494
- __decorate([
495
- queryAssignedElements({
496
- selector: IgcCarouselIndicatorComponent.tagName,
497
- slot: 'indicator',
498
- })
499
- ], IgcCarouselComponent.prototype, "_projectedIndicators", void 0);
500
493
  __decorate([
501
494
  state()
502
495
  ], IgcCarouselComponent.prototype, "_activeSlide", void 0);
@@ -504,8 +497,8 @@ __decorate([
504
497
  state()
505
498
  ], IgcCarouselComponent.prototype, "_playing", void 0);
506
499
  __decorate([
507
- state()
508
- ], IgcCarouselComponent.prototype, "_paused", void 0);
500
+ queryAll(IgcCarouselIndicatorComponent.tagName)
501
+ ], IgcCarouselComponent.prototype, "_defaultIndicators", void 0);
509
502
  __decorate([
510
503
  property({ type: Boolean, reflect: true, attribute: 'disable-loop' })
511
504
  ], IgcCarouselComponent.prototype, "disableLoop", void 0);
@@ -526,7 +519,7 @@ __decorate([
526
519
  property({ type: Boolean, reflect: true })
527
520
  ], IgcCarouselComponent.prototype, "vertical", void 0);
528
521
  __decorate([
529
- property({ reflect: false, attribute: 'indicators-orientation' })
522
+ property({ attribute: 'indicators-orientation' })
530
523
  ], IgcCarouselComponent.prototype, "indicatorsOrientation", void 0);
531
524
  __decorate([
532
525
  property({ attribute: 'indicators-label-format' })
@@ -535,27 +528,20 @@ __decorate([
535
528
  property({ attribute: 'slides-label-format' })
536
529
  ], IgcCarouselComponent.prototype, "slidesLabelFormat", void 0);
537
530
  __decorate([
538
- property({ type: Number, reflect: false })
531
+ property({ type: Number })
539
532
  ], IgcCarouselComponent.prototype, "interval", void 0);
540
533
  __decorate([
541
- property({
542
- type: Number,
543
- reflect: false,
544
- attribute: 'maximum-indicators-count',
545
- })
534
+ property({ type: Number, attribute: 'maximum-indicators-count' })
546
535
  ], IgcCarouselComponent.prototype, "maximumIndicatorsCount", void 0);
547
536
  __decorate([
548
537
  property({ attribute: 'animation-type' })
549
538
  ], IgcCarouselComponent.prototype, "animationType", void 0);
550
- __decorate([
551
- queryAssignedElements({ selector: IgcCarouselSlideComponent.tagName })
552
- ], IgcCarouselComponent.prototype, "slides", void 0);
553
539
  __decorate([
554
540
  watch('animationType'),
555
541
  watch('slidesLabelFormat'),
556
542
  watch('indicatorsLabelFormat')
557
- ], IgcCarouselComponent.prototype, "contextChanged", null);
543
+ ], IgcCarouselComponent.prototype, "_contextChanged", null);
558
544
  __decorate([
559
545
  watch('interval')
560
- ], IgcCarouselComponent.prototype, "intervalChange", null);
546
+ ], IgcCarouselComponent.prototype, "_intervalChange", null);
561
547
  //# sourceMappingURL=carousel.js.map