@carbon/ibmdotcom-web-components 1.26.0-rc.1 → 1.26.0-rc.3

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 (788) hide show
  1. package/es/component-mixins/cta/cta.d.ts.map +1 -1
  2. package/es/component-mixins/cta/cta.js +12 -12
  3. package/es/component-mixins/cta/cta.js.map +1 -1
  4. package/es/component-mixins/cta/video.d.ts.map +1 -1
  5. package/es/component-mixins/cta/video.js +5 -5
  6. package/es/component-mixins/cta/video.js.map +1 -1
  7. package/es/components/back-to-top/__stories__/data/content.d.ts.map +1 -1
  8. package/es/components/back-to-top/__stories__/data/content.js +1 -1
  9. package/es/components/back-to-top/__stories__/data/content.js.map +1 -1
  10. package/es/components/back-to-top/back-to-top.d.ts +1 -1
  11. package/es/components/back-to-top/back-to-top.d.ts.map +1 -1
  12. package/es/components/back-to-top/back-to-top.js +3 -3
  13. package/es/components/back-to-top/back-to-top.js.map +1 -1
  14. package/es/components/background-media/background-media.d.ts.map +1 -1
  15. package/es/components/background-media/background-media.js +2 -2
  16. package/es/components/background-media/background-media.js.map +1 -1
  17. package/es/components/button/button.d.ts +1 -4
  18. package/es/components/button/button.d.ts.map +1 -1
  19. package/es/components/button/button.js +3 -3
  20. package/es/components/button/button.js.map +1 -1
  21. package/es/components/button-group/button-group.d.ts.map +1 -1
  22. package/es/components/button-group/button-group.js +1 -1
  23. package/es/components/button-group/button-group.js.map +1 -1
  24. package/es/components/card/card.d.ts +1 -1
  25. package/es/components/card/card.d.ts.map +1 -1
  26. package/es/components/card/card.js +1 -1
  27. package/es/components/card/card.js.map +1 -1
  28. package/es/components/card-in-card/card-in-card.d.ts.map +1 -1
  29. package/es/components/card-in-card/card-in-card.js +1 -1
  30. package/es/components/card-in-card/card-in-card.js.map +1 -1
  31. package/es/components/carousel/carousel.d.ts +10 -1
  32. package/es/components/carousel/carousel.d.ts.map +1 -1
  33. package/es/components/carousel/carousel.js +6 -6
  34. package/es/components/carousel/carousel.js.map +1 -1
  35. package/es/components/content-item-horizontal/content-item-horizontal-media.d.ts +3 -9
  36. package/es/components/content-item-horizontal/content-item-horizontal-media.d.ts.map +1 -1
  37. package/es/components/content-item-horizontal/content-item-horizontal-media.js +2 -2
  38. package/es/components/content-item-horizontal/content-item-horizontal-media.js.map +1 -1
  39. package/es/components/cta/card-cta.d.ts.map +1 -1
  40. package/es/components/cta/card-cta.js +1 -1
  41. package/es/components/cta/card-cta.js.map +1 -1
  42. package/es/components/cta/feature-cta.d.ts +4 -1
  43. package/es/components/cta/feature-cta.d.ts.map +1 -1
  44. package/es/components/cta/feature-cta.js +1 -1
  45. package/es/components/cta/feature-cta.js.map +1 -1
  46. package/es/components/cta/video-cta-composite.d.ts +9 -6
  47. package/es/components/cta/video-cta-composite.d.ts.map +1 -1
  48. package/es/components/cta/video-cta-composite.js +3 -3
  49. package/es/components/cta/video-cta-composite.js.map +1 -1
  50. package/es/components/dotcom-shell/__stories__/data/content.d.ts.map +1 -1
  51. package/es/components/dotcom-shell/__stories__/data/content.js +1 -1
  52. package/es/components/dotcom-shell/__stories__/data/content.js.map +1 -1
  53. package/es/components/expressive-modal/expressive-modal-body.d.ts +1 -1
  54. package/es/components/expressive-modal/expressive-modal-body.d.ts.map +1 -1
  55. package/es/components/expressive-modal/expressive-modal-body.js +1 -1
  56. package/es/components/expressive-modal/expressive-modal-body.js.map +1 -1
  57. package/es/components/expressive-modal/expressive-modal-close-button.d.ts +1 -1
  58. package/es/components/expressive-modal/expressive-modal-close-button.d.ts.map +1 -1
  59. package/es/components/expressive-modal/expressive-modal-close-button.js +1 -1
  60. package/es/components/expressive-modal/expressive-modal-close-button.js.map +1 -1
  61. package/es/components/expressive-modal/expressive-modal-footer.d.ts +1 -1
  62. package/es/components/expressive-modal/expressive-modal-footer.d.ts.map +1 -1
  63. package/es/components/expressive-modal/expressive-modal-footer.js +1 -1
  64. package/es/components/expressive-modal/expressive-modal-footer.js.map +1 -1
  65. package/es/components/expressive-modal/expressive-modal-header.d.ts +1 -1
  66. package/es/components/expressive-modal/expressive-modal-header.d.ts.map +1 -1
  67. package/es/components/expressive-modal/expressive-modal-header.js +1 -1
  68. package/es/components/expressive-modal/expressive-modal-header.js.map +1 -1
  69. package/es/components/expressive-modal/expressive-modal-heading.d.ts +1 -1
  70. package/es/components/expressive-modal/expressive-modal-heading.d.ts.map +1 -1
  71. package/es/components/expressive-modal/expressive-modal-heading.js +1 -1
  72. package/es/components/expressive-modal/expressive-modal-heading.js.map +1 -1
  73. package/es/components/expressive-modal/expressive-modal.d.ts +5 -10
  74. package/es/components/expressive-modal/expressive-modal.d.ts.map +1 -1
  75. package/es/components/expressive-modal/expressive-modal.js +3 -3
  76. package/es/components/expressive-modal/expressive-modal.js.map +1 -1
  77. package/es/components/filter-panel/filter-group-item.d.ts +2 -4
  78. package/es/components/filter-panel/filter-group-item.d.ts.map +1 -1
  79. package/es/components/filter-panel/filter-group-item.js +1 -1
  80. package/es/components/filter-panel/filter-group-item.js.map +1 -1
  81. package/es/components/filter-panel/filter-group.d.ts +1 -1
  82. package/es/components/filter-panel/filter-group.d.ts.map +1 -1
  83. package/es/components/filter-panel/filter-group.js +1 -1
  84. package/es/components/filter-panel/filter-group.js.map +1 -1
  85. package/es/components/filter-panel/filter-modal-button.d.ts +1 -1
  86. package/es/components/filter-panel/filter-modal-button.d.ts.map +1 -1
  87. package/es/components/filter-panel/filter-modal-button.js +1 -1
  88. package/es/components/filter-panel/filter-modal-button.js.map +1 -1
  89. package/es/components/filter-panel/filter-modal-footer.d.ts +1 -1
  90. package/es/components/filter-panel/filter-modal-footer.d.ts.map +1 -1
  91. package/es/components/filter-panel/filter-modal-footer.js +1 -1
  92. package/es/components/filter-panel/filter-modal-footer.js.map +1 -1
  93. package/es/components/filter-panel/filter-modal-heading.d.ts +1 -1
  94. package/es/components/filter-panel/filter-modal-heading.d.ts.map +1 -1
  95. package/es/components/filter-panel/filter-modal-heading.js +1 -1
  96. package/es/components/filter-panel/filter-modal-heading.js.map +1 -1
  97. package/es/components/filter-panel/filter-panel-checkbox.d.ts +2 -2
  98. package/es/components/filter-panel/filter-panel-checkbox.d.ts.map +1 -1
  99. package/es/components/filter-panel/filter-panel-checkbox.js +3 -3
  100. package/es/components/filter-panel/filter-panel-checkbox.js.map +1 -1
  101. package/es/components/filter-panel/filter-panel-composite.d.ts +20 -12
  102. package/es/components/filter-panel/filter-panel-composite.d.ts.map +1 -1
  103. package/es/components/filter-panel/filter-panel-composite.js +4 -4
  104. package/es/components/filter-panel/filter-panel-composite.js.map +1 -1
  105. package/es/components/filter-panel/filter-panel-input-select-item.d.ts +0 -3
  106. package/es/components/filter-panel/filter-panel-input-select-item.d.ts.map +1 -1
  107. package/es/components/filter-panel/filter-panel-input-select-item.js +2 -2
  108. package/es/components/filter-panel/filter-panel-input-select-item.js.map +1 -1
  109. package/es/components/filter-panel/filter-panel-input-select.d.ts +5 -1
  110. package/es/components/filter-panel/filter-panel-input-select.d.ts.map +1 -1
  111. package/es/components/filter-panel/filter-panel-input-select.js +2 -2
  112. package/es/components/filter-panel/filter-panel-input-select.js.map +1 -1
  113. package/es/components/filter-panel/filter-panel-modal.d.ts +4 -6
  114. package/es/components/filter-panel/filter-panel-modal.d.ts.map +1 -1
  115. package/es/components/filter-panel/filter-panel-modal.js +3 -3
  116. package/es/components/filter-panel/filter-panel-modal.js.map +1 -1
  117. package/es/components/filter-panel/filter-panel.d.ts +4 -2
  118. package/es/components/filter-panel/filter-panel.d.ts.map +1 -1
  119. package/es/components/filter-panel/filter-panel.js +2 -2
  120. package/es/components/filter-panel/filter-panel.js.map +1 -1
  121. package/es/components/footer/combo-box.d.ts +1 -1
  122. package/es/components/footer/combo-box.d.ts.map +1 -1
  123. package/es/components/footer/combo-box.js +1 -1
  124. package/es/components/footer/combo-box.js.map +1 -1
  125. package/es/components/footer/defs.d.ts +1 -1
  126. package/es/components/footer/defs.d.ts.map +1 -1
  127. package/es/components/footer/defs.js +1 -1
  128. package/es/components/footer/defs.js.map +1 -1
  129. package/es/components/footer/dropdown.d.ts +1 -1
  130. package/es/components/footer/dropdown.d.ts.map +1 -1
  131. package/es/components/footer/dropdown.js +3 -3
  132. package/es/components/footer/dropdown.js.map +1 -1
  133. package/es/components/footer/footer-composite.d.ts +3 -8
  134. package/es/components/footer/footer-composite.d.ts.map +1 -1
  135. package/es/components/footer/footer-composite.js +5 -5
  136. package/es/components/footer/footer-composite.js.map +1 -1
  137. package/es/components/footer/footer-logo.d.ts.map +1 -1
  138. package/es/components/footer/footer-logo.js +2 -2
  139. package/es/components/footer/footer-logo.js.map +1 -1
  140. package/es/components/footer/footer-nav-group.d.ts.map +1 -1
  141. package/es/components/footer/footer-nav-group.js +1 -1
  142. package/es/components/footer/footer-nav-group.js.map +1 -1
  143. package/es/components/footer/footer-nav-item.d.ts +1 -1
  144. package/es/components/footer/footer-nav-item.d.ts.map +1 -1
  145. package/es/components/footer/footer-nav-item.js +1 -1
  146. package/es/components/footer/footer-nav-item.js.map +1 -1
  147. package/es/components/footer/language-selector-desktop.d.ts.map +1 -1
  148. package/es/components/footer/language-selector-desktop.js +2 -2
  149. package/es/components/footer/language-selector-desktop.js.map +1 -1
  150. package/es/components/footer/language-selector-mobile.d.ts.map +1 -1
  151. package/es/components/footer/language-selector-mobile.js +2 -2
  152. package/es/components/footer/language-selector-mobile.js.map +1 -1
  153. package/es/components/footer/locale-button.d.ts +3 -1
  154. package/es/components/footer/locale-button.d.ts.map +1 -1
  155. package/es/components/footer/locale-button.js +3 -3
  156. package/es/components/footer/locale-button.js.map +1 -1
  157. package/es/components/image/image.d.ts +5 -1
  158. package/es/components/image/image.d.ts.map +1 -1
  159. package/es/components/image/image.js +3 -3
  160. package/es/components/image/image.js.map +1 -1
  161. package/es/components/image-with-caption/image-with-caption.d.ts.map +1 -1
  162. package/es/components/image-with-caption/image-with-caption.js +3 -3
  163. package/es/components/image-with-caption/image-with-caption.js.map +1 -1
  164. package/es/components/leadspace/breadcrumb-item.d.ts +1 -1
  165. package/es/components/leadspace/breadcrumb-item.d.ts.map +1 -1
  166. package/es/components/leadspace/breadcrumb-item.js +1 -1
  167. package/es/components/leadspace/breadcrumb-item.js.map +1 -1
  168. package/es/components/leadspace/breadcrumb-link.d.ts +1 -1
  169. package/es/components/leadspace/breadcrumb-link.d.ts.map +1 -1
  170. package/es/components/leadspace/breadcrumb-link.js +1 -1
  171. package/es/components/leadspace/breadcrumb-link.js.map +1 -1
  172. package/es/components/leadspace/breadcrumb.d.ts +1 -1
  173. package/es/components/leadspace/breadcrumb.d.ts.map +1 -1
  174. package/es/components/leadspace/breadcrumb.js +1 -1
  175. package/es/components/leadspace/breadcrumb.js.map +1 -1
  176. package/es/components/leaving-ibm/leaving-ibm-composite.d.ts +8 -6
  177. package/es/components/leaving-ibm/leaving-ibm-composite.d.ts.map +1 -1
  178. package/es/components/leaving-ibm/leaving-ibm-composite.js +7 -7
  179. package/es/components/leaving-ibm/leaving-ibm-composite.js.map +1 -1
  180. package/es/components/leaving-ibm/leaving-ibm-modal-body.d.ts +2 -2
  181. package/es/components/leaving-ibm/leaving-ibm-modal-body.d.ts.map +1 -1
  182. package/es/components/leaving-ibm/leaving-ibm-modal-body.js +3 -3
  183. package/es/components/leaving-ibm/leaving-ibm-modal-body.js.map +1 -1
  184. package/es/components/leaving-ibm/leaving-ibm-modal-heading.d.ts +1 -1
  185. package/es/components/leaving-ibm/leaving-ibm-modal-heading.d.ts.map +1 -1
  186. package/es/components/leaving-ibm/leaving-ibm-modal-heading.js +1 -1
  187. package/es/components/leaving-ibm/leaving-ibm-modal-heading.js.map +1 -1
  188. package/es/components/leaving-ibm/leaving-ibm-modal.d.ts +1 -1
  189. package/es/components/leaving-ibm/leaving-ibm-modal.d.ts.map +1 -1
  190. package/es/components/leaving-ibm/leaving-ibm-modal.js +2 -2
  191. package/es/components/leaving-ibm/leaving-ibm-modal.js.map +1 -1
  192. package/es/components/lightbox-media-viewer/lightbox-image-viewer.d.ts.map +1 -1
  193. package/es/components/lightbox-media-viewer/lightbox-image-viewer.js +1 -1
  194. package/es/components/lightbox-media-viewer/lightbox-image-viewer.js.map +1 -1
  195. package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.d.ts +3 -1
  196. package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.d.ts.map +1 -1
  197. package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.js +1 -1
  198. package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.js.map +1 -1
  199. package/es/components/lightbox-media-viewer/lightbox-video-player-composite.d.ts +1 -3
  200. package/es/components/lightbox-media-viewer/lightbox-video-player-composite.d.ts.map +1 -1
  201. package/es/components/lightbox-media-viewer/lightbox-video-player-composite.js +2 -2
  202. package/es/components/lightbox-media-viewer/lightbox-video-player-composite.js.map +1 -1
  203. package/es/components/link-with-icon/link-with-icon.d.ts +1 -1
  204. package/es/components/link-with-icon/link-with-icon.d.ts.map +1 -1
  205. package/es/components/link-with-icon/link-with-icon.js +1 -1
  206. package/es/components/link-with-icon/link-with-icon.js.map +1 -1
  207. package/es/components/locale-modal/locale-item.d.ts +1 -1
  208. package/es/components/locale-modal/locale-item.d.ts.map +1 -1
  209. package/es/components/locale-modal/locale-item.js +1 -1
  210. package/es/components/locale-modal/locale-item.js.map +1 -1
  211. package/es/components/locale-modal/locale-modal-composite.d.ts.map +1 -1
  212. package/es/components/locale-modal/locale-modal-composite.js +1 -1
  213. package/es/components/locale-modal/locale-modal-composite.js.map +1 -1
  214. package/es/components/locale-modal/locale-modal.d.ts.map +1 -1
  215. package/es/components/locale-modal/locale-modal.js +5 -5
  216. package/es/components/locale-modal/locale-modal.js.map +1 -1
  217. package/es/components/locale-modal/locale-search.d.ts.map +1 -1
  218. package/es/components/locale-modal/locale-search.js +1 -1
  219. package/es/components/locale-modal/locale-search.js.map +1 -1
  220. package/es/components/locale-modal/region-item.d.ts +1 -1
  221. package/es/components/locale-modal/region-item.d.ts.map +1 -1
  222. package/es/components/locale-modal/region-item.js +3 -3
  223. package/es/components/locale-modal/region-item.js.map +1 -1
  224. package/es/components/locale-modal/regions.d.ts +1 -1
  225. package/es/components/locale-modal/regions.d.ts.map +1 -1
  226. package/es/components/locale-modal/regions.js +1 -1
  227. package/es/components/locale-modal/regions.js.map +1 -1
  228. package/es/components/markdown/markdown.d.ts +4 -4
  229. package/es/components/markdown/markdown.d.ts.map +1 -1
  230. package/es/components/markdown/markdown.js +4 -4
  231. package/es/components/markdown/markdown.js.map +1 -1
  232. package/es/components/masthead/cloud/cloud-left-nav-item.d.ts +1 -1
  233. package/es/components/masthead/cloud/cloud-left-nav-item.d.ts.map +1 -1
  234. package/es/components/masthead/cloud/cloud-left-nav-item.js +1 -1
  235. package/es/components/masthead/cloud/cloud-left-nav-item.js.map +1 -1
  236. package/es/components/masthead/cloud/cloud-masthead-composite.d.ts.map +1 -1
  237. package/es/components/masthead/cloud/cloud-masthead-composite.js +1 -1
  238. package/es/components/masthead/cloud/cloud-masthead-composite.js.map +1 -1
  239. package/es/components/masthead/cloud/cloud-masthead-profile.d.ts.map +1 -1
  240. package/es/components/masthead/cloud/cloud-masthead-profile.js +1 -1
  241. package/es/components/masthead/cloud/cloud-masthead-profile.js.map +1 -1
  242. package/es/components/masthead/cloud/cloud-megamenu-category-heading.d.ts.map +1 -1
  243. package/es/components/masthead/cloud/cloud-megamenu-category-heading.js +1 -1
  244. package/es/components/masthead/cloud/cloud-megamenu-category-heading.js.map +1 -1
  245. package/es/components/masthead/cloud/cloud-megamenu-category-link.d.ts +1 -1
  246. package/es/components/masthead/cloud/cloud-megamenu-category-link.d.ts.map +1 -1
  247. package/es/components/masthead/cloud/cloud-megamenu-category-link.js +1 -1
  248. package/es/components/masthead/cloud/cloud-megamenu-category-link.js.map +1 -1
  249. package/es/components/masthead/cloud/cloud-megamenu-tab.d.ts +1 -1
  250. package/es/components/masthead/cloud/cloud-megamenu-tab.d.ts.map +1 -1
  251. package/es/components/masthead/cloud/cloud-megamenu-tab.js +1 -1
  252. package/es/components/masthead/cloud/cloud-megamenu-tab.js.map +1 -1
  253. package/es/components/masthead/cloud/cloud-megamenu-tabs.d.ts +1 -1
  254. package/es/components/masthead/cloud/cloud-megamenu-tabs.d.ts.map +1 -1
  255. package/es/components/masthead/cloud/cloud-megamenu-tabs.js +1 -1
  256. package/es/components/masthead/cloud/cloud-megamenu-tabs.js.map +1 -1
  257. package/es/components/masthead/left-nav-item.d.ts +1 -1
  258. package/es/components/masthead/left-nav-item.d.ts.map +1 -1
  259. package/es/components/masthead/left-nav-item.js +1 -1
  260. package/es/components/masthead/left-nav-item.js.map +1 -1
  261. package/es/components/masthead/left-nav-menu-item.d.ts +1 -1
  262. package/es/components/masthead/left-nav-menu-item.d.ts.map +1 -1
  263. package/es/components/masthead/left-nav-menu-item.js +1 -1
  264. package/es/components/masthead/left-nav-menu-item.js.map +1 -1
  265. package/es/components/masthead/left-nav-menu-section.d.ts +11 -12
  266. package/es/components/masthead/left-nav-menu-section.d.ts.map +1 -1
  267. package/es/components/masthead/left-nav-menu-section.js +6 -6
  268. package/es/components/masthead/left-nav-menu-section.js.map +1 -1
  269. package/es/components/masthead/left-nav-menu.d.ts +3 -0
  270. package/es/components/masthead/left-nav-menu.d.ts.map +1 -1
  271. package/es/components/masthead/left-nav-menu.js +2 -2
  272. package/es/components/masthead/left-nav-menu.js.map +1 -1
  273. package/es/components/masthead/left-nav-name.d.ts +1 -1
  274. package/es/components/masthead/left-nav-name.d.ts.map +1 -1
  275. package/es/components/masthead/left-nav-name.js +2 -2
  276. package/es/components/masthead/left-nav-name.js.map +1 -1
  277. package/es/components/masthead/left-nav.d.ts +1 -1
  278. package/es/components/masthead/left-nav.d.ts.map +1 -1
  279. package/es/components/masthead/left-nav.js +3 -3
  280. package/es/components/masthead/left-nav.js.map +1 -1
  281. package/es/components/masthead/masthead-composite.d.ts.map +1 -1
  282. package/es/components/masthead/masthead-composite.js +2 -2
  283. package/es/components/masthead/masthead-composite.js.map +1 -1
  284. package/es/components/masthead/masthead-global-bar.d.ts +7 -4
  285. package/es/components/masthead/masthead-global-bar.d.ts.map +1 -1
  286. package/es/components/masthead/masthead-global-bar.js +3 -3
  287. package/es/components/masthead/masthead-global-bar.js.map +1 -1
  288. package/es/components/masthead/masthead-logo.d.ts +7 -12
  289. package/es/components/masthead/masthead-logo.d.ts.map +1 -1
  290. package/es/components/masthead/masthead-logo.js +4 -4
  291. package/es/components/masthead/masthead-logo.js.map +1 -1
  292. package/es/components/masthead/masthead-menu-button.d.ts +2 -2
  293. package/es/components/masthead/masthead-menu-button.d.ts.map +1 -1
  294. package/es/components/masthead/masthead-menu-button.js +3 -3
  295. package/es/components/masthead/masthead-menu-button.js.map +1 -1
  296. package/es/components/masthead/masthead-profile-item.d.ts +1 -1
  297. package/es/components/masthead/masthead-profile-item.d.ts.map +1 -1
  298. package/es/components/masthead/masthead-profile-item.js +1 -1
  299. package/es/components/masthead/masthead-profile-item.js.map +1 -1
  300. package/es/components/masthead/masthead-profile.d.ts +1 -1
  301. package/es/components/masthead/masthead-profile.d.ts.map +1 -1
  302. package/es/components/masthead/masthead-profile.js +5 -5
  303. package/es/components/masthead/masthead-profile.js.map +1 -1
  304. package/es/components/masthead/megamenu-category-group.d.ts.map +1 -1
  305. package/es/components/masthead/megamenu-category-group.js +2 -2
  306. package/es/components/masthead/megamenu-category-group.js.map +1 -1
  307. package/es/components/masthead/megamenu-category-link.d.ts +1 -1
  308. package/es/components/masthead/megamenu-category-link.d.ts.map +1 -1
  309. package/es/components/masthead/megamenu-category-link.js +1 -1
  310. package/es/components/masthead/megamenu-category-link.js.map +1 -1
  311. package/es/components/masthead/megamenu-link-with-icon.d.ts +1 -1
  312. package/es/components/masthead/megamenu-link-with-icon.d.ts.map +1 -1
  313. package/es/components/masthead/megamenu-link-with-icon.js +1 -1
  314. package/es/components/masthead/megamenu-link-with-icon.js.map +1 -1
  315. package/es/components/masthead/megamenu-right-navigation.d.ts.map +1 -1
  316. package/es/components/masthead/megamenu-right-navigation.js +1 -1
  317. package/es/components/masthead/megamenu-right-navigation.js.map +1 -1
  318. package/es/components/masthead/skip-to-content.d.ts +1 -1
  319. package/es/components/masthead/skip-to-content.d.ts.map +1 -1
  320. package/es/components/masthead/skip-to-content.js +1 -1
  321. package/es/components/masthead/skip-to-content.js.map +1 -1
  322. package/es/components/masthead/top-nav-item.d.ts +1 -1
  323. package/es/components/masthead/top-nav-item.d.ts.map +1 -1
  324. package/es/components/masthead/top-nav-item.js +1 -1
  325. package/es/components/masthead/top-nav-item.js.map +1 -1
  326. package/es/components/masthead/top-nav-menu-item.d.ts +1 -1
  327. package/es/components/masthead/top-nav-menu-item.d.ts.map +1 -1
  328. package/es/components/masthead/top-nav-menu-item.js +1 -1
  329. package/es/components/masthead/top-nav-menu-item.js.map +1 -1
  330. package/es/components/masthead/top-nav-menu.d.ts +1 -1
  331. package/es/components/masthead/top-nav-menu.d.ts.map +1 -1
  332. package/es/components/masthead/top-nav-menu.js +1 -1
  333. package/es/components/masthead/top-nav-menu.js.map +1 -1
  334. package/es/components/masthead/top-nav-name.d.ts.map +1 -1
  335. package/es/components/masthead/top-nav-name.js +1 -1
  336. package/es/components/masthead/top-nav-name.js.map +1 -1
  337. package/es/components/masthead/top-nav.d.ts +2 -11
  338. package/es/components/masthead/top-nav.d.ts.map +1 -1
  339. package/es/components/masthead/top-nav.js +6 -6
  340. package/es/components/masthead/top-nav.js.map +1 -1
  341. package/es/components/pricing-table/pricing-table-annotation-toggle.d.ts.map +1 -1
  342. package/es/components/pricing-table/pricing-table-annotation-toggle.js +2 -2
  343. package/es/components/pricing-table/pricing-table-annotation-toggle.js.map +1 -1
  344. package/es/components/pricing-table/pricing-table-cell.d.ts +1 -1
  345. package/es/components/pricing-table/pricing-table-cell.d.ts.map +1 -1
  346. package/es/components/pricing-table/pricing-table-cell.js +2 -2
  347. package/es/components/pricing-table/pricing-table-cell.js.map +1 -1
  348. package/es/components/pricing-table/pricing-table.d.ts +5 -8
  349. package/es/components/pricing-table/pricing-table.d.ts.map +1 -1
  350. package/es/components/pricing-table/pricing-table.js +2 -2
  351. package/es/components/pricing-table/pricing-table.js.map +1 -1
  352. package/es/components/search/search.d.ts +2 -2
  353. package/es/components/search/search.d.ts.map +1 -1
  354. package/es/components/search/search.js +2 -2
  355. package/es/components/search/search.js.map +1 -1
  356. package/es/components/search-with-typeahead/scoped-search-dropdown-mobile.d.ts.map +1 -1
  357. package/es/components/search-with-typeahead/scoped-search-dropdown-mobile.js +4 -4
  358. package/es/components/search-with-typeahead/scoped-search-dropdown-mobile.js.map +1 -1
  359. package/es/components/search-with-typeahead/search-with-typeahead.d.ts +10 -16
  360. package/es/components/search-with-typeahead/search-with-typeahead.d.ts.map +1 -1
  361. package/es/components/search-with-typeahead/search-with-typeahead.js +6 -6
  362. package/es/components/search-with-typeahead/search-with-typeahead.js.map +1 -1
  363. package/es/components/structured-list/index.d.ts +2 -2
  364. package/es/components/structured-list/index.d.ts.map +1 -1
  365. package/es/components/structured-list/index.js +2 -2
  366. package/es/components/structured-list/index.js.map +1 -1
  367. package/es/components/structured-list/structured-list-body.d.ts +1 -1
  368. package/es/components/structured-list/structured-list-body.d.ts.map +1 -1
  369. package/es/components/structured-list/structured-list-body.js +1 -1
  370. package/es/components/structured-list/structured-list-body.js.map +1 -1
  371. package/es/components/structured-list/structured-list-cell.d.ts +1 -1
  372. package/es/components/structured-list/structured-list-cell.d.ts.map +1 -1
  373. package/es/components/structured-list/structured-list-cell.js +4 -4
  374. package/es/components/structured-list/structured-list-cell.js.map +1 -1
  375. package/es/components/structured-list/structured-list-head.d.ts +1 -1
  376. package/es/components/structured-list/structured-list-head.d.ts.map +1 -1
  377. package/es/components/structured-list/structured-list-head.js +1 -1
  378. package/es/components/structured-list/structured-list-head.js.map +1 -1
  379. package/es/components/structured-list/structured-list-header-cell.d.ts +1 -1
  380. package/es/components/structured-list/structured-list-header-cell.d.ts.map +1 -1
  381. package/es/components/structured-list/structured-list-header-cell.js +1 -1
  382. package/es/components/structured-list/structured-list-header-cell.js.map +1 -1
  383. package/es/components/structured-list/structured-list-header-row.d.ts +1 -1
  384. package/es/components/structured-list/structured-list-header-row.d.ts.map +1 -1
  385. package/es/components/structured-list/structured-list-header-row.js +1 -1
  386. package/es/components/structured-list/structured-list-header-row.js.map +1 -1
  387. package/es/components/structured-list/structured-list-row.d.ts +1 -1
  388. package/es/components/structured-list/structured-list-row.d.ts.map +1 -1
  389. package/es/components/structured-list/structured-list-row.js +1 -1
  390. package/es/components/structured-list/structured-list-row.js.map +1 -1
  391. package/es/components/table-of-contents/table-of-contents.d.ts +24 -6
  392. package/es/components/table-of-contents/table-of-contents.d.ts.map +1 -1
  393. package/es/components/table-of-contents/table-of-contents.js +5 -5
  394. package/es/components/table-of-contents/table-of-contents.js.map +1 -1
  395. package/es/components/tabs-extended/tabs-extended.d.ts.map +1 -1
  396. package/es/components/tabs-extended/tabs-extended.js +1 -1
  397. package/es/components/tabs-extended/tabs-extended.js.map +1 -1
  398. package/es/components/tag-link/tag-link.d.ts.map +1 -1
  399. package/es/components/tag-link/tag-link.js +1 -1
  400. package/es/components/tag-link/tag-link.js.map +1 -1
  401. package/es/components/video-player/video-player-composite.d.ts +7 -2
  402. package/es/components/video-player/video-player-composite.d.ts.map +1 -1
  403. package/es/components/video-player/video-player-composite.js +3 -3
  404. package/es/components/video-player/video-player-composite.js.map +1 -1
  405. package/es/components/video-player/video-player.d.ts +6 -0
  406. package/es/components/video-player/video-player.d.ts.map +1 -1
  407. package/es/components/video-player/video-player.js +2 -2
  408. package/es/components/video-player/video-player.js.map +1 -1
  409. package/es/components-react/back-to-top/back-to-top.js +1 -1
  410. package/es/components-react/background-media/background-media.js +1 -1
  411. package/es/components-react/button/button.js +2 -2
  412. package/es/components-react/button-group/button-group-item.js +1 -1
  413. package/es/components-react/button-group/button-group.js +1 -1
  414. package/es/components-react/callout-quote/callout-link-with-icon.js +1 -1
  415. package/es/components-react/callout-quote/callout-quote.js +1 -1
  416. package/es/components-react/callout-with-media/callout-with-media-copy.js +1 -1
  417. package/es/components-react/callout-with-media/callout-with-media-image.js +1 -1
  418. package/es/components-react/callout-with-media/callout-with-media-video.js +1 -1
  419. package/es/components-react/callout-with-media/callout-with-media.js +1 -1
  420. package/es/components-react/card/card-eyebrow.js +1 -1
  421. package/es/components-react/card/card-footer.js +1 -1
  422. package/es/components-react/card/card-heading.js +1 -1
  423. package/es/components-react/card/card.js +3 -3
  424. package/es/components-react/card/image-logo.js +1 -1
  425. package/es/components-react/card-group/card-group-card-link-item.js +1 -1
  426. package/es/components-react/card-group/card-group-item.js +1 -1
  427. package/es/components-react/card-group/card-group.js +1 -1
  428. package/es/components-react/card-in-card/card-in-card-image.js +1 -1
  429. package/es/components-react/card-in-card/card-in-card.js +1 -1
  430. package/es/components-react/card-link/card-link-heading.js +1 -1
  431. package/es/components-react/card-link/card-link.js +1 -1
  432. package/es/components-react/card-section-carousel/card-section-carousel.js +1 -1
  433. package/es/components-react/card-section-offset/card-section-offset.js +1 -1
  434. package/es/components-react/card-section-simple/card-section-simple.js +1 -1
  435. package/es/components-react/carousel/carousel.js +1 -1
  436. package/es/components-react/content-block/content-block-complementary.js +1 -1
  437. package/es/components-react/content-block/content-block-copy.js +1 -1
  438. package/es/components-react/content-block/content-block-heading.js +1 -1
  439. package/es/components-react/content-block/content-block-paragraph.js +1 -1
  440. package/es/components-react/content-block/content-block.js +1 -1
  441. package/es/components-react/content-block-cards/content-block-cards.js +1 -1
  442. package/es/components-react/content-block-horizontal/content-block-horizontal.js +1 -1
  443. package/es/components-react/content-block-media/content-block-media-content.js +1 -1
  444. package/es/components-react/content-block-media/content-block-media.js +1 -1
  445. package/es/components-react/content-block-mixed/content-block-mixed.js +1 -1
  446. package/es/components-react/content-block-segmented/content-block-segmented-item.js +1 -1
  447. package/es/components-react/content-block-segmented/content-block-segmented.js +1 -1
  448. package/es/components-react/content-block-simple/content-block-simple.js +1 -1
  449. package/es/components-react/content-group/content-group-copy.js +1 -1
  450. package/es/components-react/content-group/content-group-heading.js +1 -1
  451. package/es/components-react/content-group/content-group-paragraph.js +1 -1
  452. package/es/components-react/content-group/content-group.js +1 -1
  453. package/es/components-react/content-group-banner/content-group-banner.js +1 -1
  454. package/es/components-react/content-group-cards/content-group-cards-item.js +1 -1
  455. package/es/components-react/content-group-cards/content-group-cards.js +1 -1
  456. package/es/components-react/content-group-pictograms/content-group-pictograms.js +1 -1
  457. package/es/components-react/content-group-simple/content-group-simple.js +1 -1
  458. package/es/components-react/content-item/content-item-copy.js +1 -1
  459. package/es/components-react/content-item/content-item-heading.js +1 -1
  460. package/es/components-react/content-item/content-item-paragraph.js +1 -1
  461. package/es/components-react/content-item/content-item.js +1 -1
  462. package/es/components-react/content-item-horizontal/content-item-horizontal-copy.js +1 -1
  463. package/es/components-react/content-item-horizontal/content-item-horizontal-eyebrow.js +1 -1
  464. package/es/components-react/content-item-horizontal/content-item-horizontal-media-copy.js +1 -1
  465. package/es/components-react/content-item-horizontal/content-item-horizontal-media-featured.js +1 -1
  466. package/es/components-react/content-item-horizontal/content-item-horizontal-media-video.js +1 -1
  467. package/es/components-react/content-item-horizontal/content-item-horizontal-media.js +1 -1
  468. package/es/components-react/content-item-horizontal/content-item-horizontal-thumbnail-copy.js +1 -1
  469. package/es/components-react/content-item-horizontal/content-item-horizontal.js +1 -1
  470. package/es/components-react/content-section/content-section-copy.js +1 -1
  471. package/es/components-react/content-section/content-section-heading.js +1 -1
  472. package/es/components-react/content-section/content-section.js +1 -1
  473. package/es/components-react/cta/button-cta.js +1 -1
  474. package/es/components-react/cta/card-cta-footer.js +1 -1
  475. package/es/components-react/cta/card-cta-image.js +1 -1
  476. package/es/components-react/cta/card-cta.js +1 -1
  477. package/es/components-react/cta/card-link-cta.js +1 -1
  478. package/es/components-react/cta/feature-cta-footer.js +1 -1
  479. package/es/components-react/cta/feature-cta.js +1 -1
  480. package/es/components-react/cta/link-list-item-card-cta.js +1 -1
  481. package/es/components-react/cta/link-list-item-cta.js +1 -1
  482. package/es/components-react/cta/text-cta.js +1 -1
  483. package/es/components-react/cta/video-cta-composite.js +1 -1
  484. package/es/components-react/cta/video-cta-container.js +1 -1
  485. package/es/components-react/cta-block/cta-block-item-row.js +1 -1
  486. package/es/components-react/cta-block/cta-block-item.js +1 -1
  487. package/es/components-react/cta-block/cta-block.js +1 -1
  488. package/es/components-react/cta-section/cta-section.js +1 -1
  489. package/es/components-react/dotcom-shell/dotcom-shell-composite.js +1 -1
  490. package/es/components-react/dotcom-shell/dotcom-shell-container.js +1 -1
  491. package/es/components-react/dotcom-shell/dotcom-shell.js +1 -1
  492. package/es/components-react/expressive-modal/expressive-modal-body.js +3 -3
  493. package/es/components-react/expressive-modal/expressive-modal-close-button.js +3 -3
  494. package/es/components-react/expressive-modal/expressive-modal-footer.js +3 -3
  495. package/es/components-react/expressive-modal/expressive-modal-header.js +3 -3
  496. package/es/components-react/expressive-modal/expressive-modal-heading.js +3 -3
  497. package/es/components-react/expressive-modal/expressive-modal.js +1 -1
  498. package/es/components-react/feature-card/feature-card-footer.js +1 -1
  499. package/es/components-react/feature-card/feature-card.js +1 -1
  500. package/es/components-react/feature-section/feature-section-card-link.js +1 -1
  501. package/es/components-react/feature-section/feature-section.js +1 -1
  502. package/es/components-react/filter-panel/filter-group-item.js +3 -3
  503. package/es/components-react/filter-panel/filter-group.js +3 -3
  504. package/es/components-react/filter-panel/filter-modal-button.js +3 -3
  505. package/es/components-react/filter-panel/filter-modal-footer.js +3 -3
  506. package/es/components-react/filter-panel/filter-modal-heading.js +3 -3
  507. package/es/components-react/filter-panel/filter-panel-checkbox.js +3 -3
  508. package/es/components-react/filter-panel/filter-panel-composite.js +1 -1
  509. package/es/components-react/filter-panel/filter-panel-heading.js +1 -1
  510. package/es/components-react/filter-panel/filter-panel-input-select-item.js +1 -1
  511. package/es/components-react/filter-panel/filter-panel-input-select.js +1 -1
  512. package/es/components-react/filter-panel/filter-panel-modal.js +3 -3
  513. package/es/components-react/filter-panel/filter-panel.js +1 -1
  514. package/es/components-react/footer/dropdown.js +3 -3
  515. package/es/components-react/footer/footer-composite.js +1 -1
  516. package/es/components-react/footer/footer-container.js +1 -1
  517. package/es/components-react/horizontal-rule/horizontal-rule.js +1 -1
  518. package/es/components-react/image/image-item.js +1 -1
  519. package/es/components-react/image/image.js +1 -1
  520. package/es/components-react/leadspace/breadcrumb-item.js +3 -3
  521. package/es/components-react/leadspace/breadcrumb-link.js +3 -3
  522. package/es/components-react/leadspace/breadcrumb.js +3 -3
  523. package/es/components-react/leadspace/leadspace-heading.js +1 -1
  524. package/es/components-react/leadspace/leadspace-image.js +1 -1
  525. package/es/components-react/leadspace/leadspace.js +1 -1
  526. package/es/components-react/leadspace-block/leadspace-block-content.js +1 -1
  527. package/es/components-react/leadspace-block/leadspace-block-cta.js +1 -1
  528. package/es/components-react/leadspace-block/leadspace-block-heading.js +1 -1
  529. package/es/components-react/leadspace-block/leadspace-block-media.js +1 -1
  530. package/es/components-react/leadspace-block/leadspace-block.js +1 -1
  531. package/es/components-react/leadspace-with-search/leadspace-with-search-content-copy.js +1 -1
  532. package/es/components-react/leadspace-with-search/leadspace-with-search-content-heading.js +1 -1
  533. package/es/components-react/leadspace-with-search/leadspace-with-search-content.js +1 -1
  534. package/es/components-react/leadspace-with-search/leadspace-with-search-heading.js +1 -1
  535. package/es/components-react/leadspace-with-search/leadspace-with-search.js +1 -1
  536. package/es/components-react/leaving-ibm/leaving-ibm-composite.js +1 -1
  537. package/es/components-react/leaving-ibm/leaving-ibm-container.js +1 -1
  538. package/es/components-react/leaving-ibm/leaving-ibm-modal-body.js +3 -3
  539. package/es/components-react/leaving-ibm/leaving-ibm-modal-heading.js +3 -3
  540. package/es/components-react/leaving-ibm/leaving-ibm-modal-supplemental.js +1 -1
  541. package/es/components-react/leaving-ibm/leaving-ibm-modal.js +3 -3
  542. package/es/components-react/lightbox-media-viewer/lightbox-image-viewer.js +1 -1
  543. package/es/components-react/lightbox-media-viewer/lightbox-media-viewer.js +1 -1
  544. package/es/components-react/lightbox-media-viewer/lightbox-video-player-composite.js +1 -1
  545. package/es/components-react/lightbox-media-viewer/lightbox-video-player-container.js +1 -1
  546. package/es/components-react/lightbox-media-viewer/lightbox-video-player.js +1 -1
  547. package/es/components-react/link-list/link-list-heading.js +1 -1
  548. package/es/components-react/link-list/link-list-item-card.js +1 -1
  549. package/es/components-react/link-list/link-list-item.js +1 -1
  550. package/es/components-react/link-list/link-list.js +1 -1
  551. package/es/components-react/link-list-section/link-list-section.js +1 -1
  552. package/es/components-react/link-with-icon/link-with-icon.js +3 -3
  553. package/es/components-react/locale-modal/locale-modal-composite.js +1 -1
  554. package/es/components-react/locale-modal/locale-modal-container.js +1 -1
  555. package/es/components-react/logo-grid/logo-grid-item.js +1 -1
  556. package/es/components-react/logo-grid/logo-grid-link.js +1 -1
  557. package/es/components-react/logo-grid/logo-grid.js +1 -1
  558. package/es/components-react/markdown/markdown.js +1 -1
  559. package/es/components-react/masthead/masthead-composite.js +1 -1
  560. package/es/components-react/masthead/masthead-container.js +1 -1
  561. package/es/components-react/masthead/masthead.js +1 -1
  562. package/es/components-react/pictogram-item/pictogram-item.js +1 -1
  563. package/es/components-react/quote/quote-link-with-icon.js +1 -1
  564. package/es/components-react/quote/quote-source-bottom-copy.js +1 -1
  565. package/es/components-react/quote/quote-source-copy.js +1 -1
  566. package/es/components-react/quote/quote-source-heading.js +1 -1
  567. package/es/components-react/quote/quote.js +1 -1
  568. package/es/components-react/search-with-typeahead/scoped-search-dropdown-mobile.js +3 -3
  569. package/es/components-react/search-with-typeahead/scoped-search-dropdown.js +1 -1
  570. package/es/components-react/search-with-typeahead/search-with-typeahead-item.js +1 -1
  571. package/es/components-react/search-with-typeahead/search-with-typeahead.js +3 -3
  572. package/es/components-react/structured-list/structured-list-body.js +3 -3
  573. package/es/components-react/structured-list/structured-list-cell.js +3 -3
  574. package/es/components-react/structured-list/structured-list-group.js +1 -1
  575. package/es/components-react/structured-list/structured-list-head.js +3 -3
  576. package/es/components-react/structured-list/structured-list-header-cell.js +3 -3
  577. package/es/components-react/structured-list/structured-list-header-row.js +3 -3
  578. package/es/components-react/structured-list/structured-list-row.js +3 -3
  579. package/es/components-react/structured-list/structured-list.js +1 -1
  580. package/es/components-react/table-of-contents/table-of-contents.js +1 -1
  581. package/es/components-react/tabs-extended/tab.js +1 -1
  582. package/es/components-react/tabs-extended/tabs-extended.js +1 -1
  583. package/es/components-react/tabs-extended-media/tabs-extended-media.js +1 -1
  584. package/es/components-react/tag-group/tag-group.js +1 -1
  585. package/es/components-react/tag-link/tag-link.js +1 -1
  586. package/es/components-react/universal-banner/universal-banner-copy.js +1 -1
  587. package/es/components-react/universal-banner/universal-banner-heading.js +1 -1
  588. package/es/components-react/universal-banner/universal-banner-image.js +1 -1
  589. package/es/components-react/universal-banner/universal-banner.js +1 -1
  590. package/es/components-react/video-player/video-player-composite.js +1 -1
  591. package/es/components-react/video-player/video-player-container.js +1 -1
  592. package/es/components-react/video-player/video-player.js +1 -1
  593. package/es/icons/IBM-8bar-logo--h23.js +1 -1
  594. package/es/icons/IBM-8bar-logo--h65-white.js +1 -1
  595. package/es/icons/play-video.js +1 -1
  596. package/lib/components-react-node/back-to-top/back-to-top.js +1 -1
  597. package/lib/components-react-node/background-media/background-media.js +1 -1
  598. package/lib/components-react-node/button/button.js +2 -2
  599. package/lib/components-react-node/button-group/button-group-item.js +1 -1
  600. package/lib/components-react-node/button-group/button-group.js +1 -1
  601. package/lib/components-react-node/callout-quote/callout-link-with-icon.js +1 -1
  602. package/lib/components-react-node/callout-quote/callout-quote.js +1 -1
  603. package/lib/components-react-node/callout-with-media/callout-with-media-copy.js +1 -1
  604. package/lib/components-react-node/callout-with-media/callout-with-media-image.js +1 -1
  605. package/lib/components-react-node/callout-with-media/callout-with-media-video.js +1 -1
  606. package/lib/components-react-node/callout-with-media/callout-with-media.js +1 -1
  607. package/lib/components-react-node/card/card-eyebrow.js +1 -1
  608. package/lib/components-react-node/card/card-footer.js +1 -1
  609. package/lib/components-react-node/card/card-heading.js +1 -1
  610. package/lib/components-react-node/card/card.js +2 -2
  611. package/lib/components-react-node/card/image-logo.js +1 -1
  612. package/lib/components-react-node/card-group/card-group-card-link-item.js +1 -1
  613. package/lib/components-react-node/card-group/card-group-item.js +1 -1
  614. package/lib/components-react-node/card-group/card-group.js +1 -1
  615. package/lib/components-react-node/card-in-card/card-in-card-image.js +1 -1
  616. package/lib/components-react-node/card-in-card/card-in-card.js +1 -1
  617. package/lib/components-react-node/card-link/card-link-heading.js +1 -1
  618. package/lib/components-react-node/card-link/card-link.js +1 -1
  619. package/lib/components-react-node/card-section-carousel/card-section-carousel.js +1 -1
  620. package/lib/components-react-node/card-section-offset/card-section-offset.js +1 -1
  621. package/lib/components-react-node/card-section-simple/card-section-simple.js +1 -1
  622. package/lib/components-react-node/carousel/carousel.js +1 -1
  623. package/lib/components-react-node/content-block/content-block-complementary.js +1 -1
  624. package/lib/components-react-node/content-block/content-block-copy.js +1 -1
  625. package/lib/components-react-node/content-block/content-block-heading.js +1 -1
  626. package/lib/components-react-node/content-block/content-block-paragraph.js +1 -1
  627. package/lib/components-react-node/content-block/content-block.js +1 -1
  628. package/lib/components-react-node/content-block-cards/content-block-cards.js +1 -1
  629. package/lib/components-react-node/content-block-horizontal/content-block-horizontal.js +1 -1
  630. package/lib/components-react-node/content-block-media/content-block-media-content.js +1 -1
  631. package/lib/components-react-node/content-block-media/content-block-media.js +1 -1
  632. package/lib/components-react-node/content-block-mixed/content-block-mixed.js +1 -1
  633. package/lib/components-react-node/content-block-segmented/content-block-segmented-item.js +1 -1
  634. package/lib/components-react-node/content-block-segmented/content-block-segmented.js +1 -1
  635. package/lib/components-react-node/content-block-simple/content-block-simple.js +1 -1
  636. package/lib/components-react-node/content-group/content-group-copy.js +1 -1
  637. package/lib/components-react-node/content-group/content-group-heading.js +1 -1
  638. package/lib/components-react-node/content-group/content-group-paragraph.js +1 -1
  639. package/lib/components-react-node/content-group/content-group.js +1 -1
  640. package/lib/components-react-node/content-group-banner/content-group-banner.js +1 -1
  641. package/lib/components-react-node/content-group-cards/content-group-cards-item.js +1 -1
  642. package/lib/components-react-node/content-group-cards/content-group-cards.js +1 -1
  643. package/lib/components-react-node/content-group-pictograms/content-group-pictograms.js +1 -1
  644. package/lib/components-react-node/content-group-simple/content-group-simple.js +1 -1
  645. package/lib/components-react-node/content-item/content-item-copy.js +1 -1
  646. package/lib/components-react-node/content-item/content-item-heading.js +1 -1
  647. package/lib/components-react-node/content-item/content-item-paragraph.js +1 -1
  648. package/lib/components-react-node/content-item/content-item.js +1 -1
  649. package/lib/components-react-node/content-item-horizontal/content-item-horizontal-copy.js +1 -1
  650. package/lib/components-react-node/content-item-horizontal/content-item-horizontal-eyebrow.js +1 -1
  651. package/lib/components-react-node/content-item-horizontal/content-item-horizontal-media-copy.js +1 -1
  652. package/lib/components-react-node/content-item-horizontal/content-item-horizontal-media-featured.js +1 -1
  653. package/lib/components-react-node/content-item-horizontal/content-item-horizontal-media-video.js +1 -1
  654. package/lib/components-react-node/content-item-horizontal/content-item-horizontal-media.js +1 -1
  655. package/lib/components-react-node/content-item-horizontal/content-item-horizontal-thumbnail-copy.js +1 -1
  656. package/lib/components-react-node/content-item-horizontal/content-item-horizontal.js +1 -1
  657. package/lib/components-react-node/content-section/content-section-copy.js +1 -1
  658. package/lib/components-react-node/content-section/content-section-heading.js +1 -1
  659. package/lib/components-react-node/content-section/content-section.js +1 -1
  660. package/lib/components-react-node/cta/button-cta.js +1 -1
  661. package/lib/components-react-node/cta/card-cta-footer.js +1 -1
  662. package/lib/components-react-node/cta/card-cta-image.js +1 -1
  663. package/lib/components-react-node/cta/card-cta.js +1 -1
  664. package/lib/components-react-node/cta/card-link-cta.js +1 -1
  665. package/lib/components-react-node/cta/feature-cta-footer.js +1 -1
  666. package/lib/components-react-node/cta/feature-cta.js +1 -1
  667. package/lib/components-react-node/cta/link-list-item-card-cta.js +1 -1
  668. package/lib/components-react-node/cta/link-list-item-cta.js +1 -1
  669. package/lib/components-react-node/cta/text-cta.js +1 -1
  670. package/lib/components-react-node/cta/video-cta-composite.js +1 -1
  671. package/lib/components-react-node/cta/video-cta-container.js +1 -1
  672. package/lib/components-react-node/cta-block/cta-block-item-row.js +1 -1
  673. package/lib/components-react-node/cta-block/cta-block-item.js +1 -1
  674. package/lib/components-react-node/cta-block/cta-block.js +1 -1
  675. package/lib/components-react-node/cta-section/cta-section.js +1 -1
  676. package/lib/components-react-node/dotcom-shell/dotcom-shell-composite.js +1 -1
  677. package/lib/components-react-node/dotcom-shell/dotcom-shell-container.js +1 -1
  678. package/lib/components-react-node/dotcom-shell/dotcom-shell.js +1 -1
  679. package/lib/components-react-node/expressive-modal/expressive-modal-body.js +2 -2
  680. package/lib/components-react-node/expressive-modal/expressive-modal-close-button.js +2 -2
  681. package/lib/components-react-node/expressive-modal/expressive-modal-footer.js +2 -2
  682. package/lib/components-react-node/expressive-modal/expressive-modal-header.js +2 -2
  683. package/lib/components-react-node/expressive-modal/expressive-modal-heading.js +2 -2
  684. package/lib/components-react-node/expressive-modal/expressive-modal.js +1 -1
  685. package/lib/components-react-node/feature-card/feature-card-footer.js +1 -1
  686. package/lib/components-react-node/feature-card/feature-card.js +1 -1
  687. package/lib/components-react-node/feature-section/feature-section-card-link.js +1 -1
  688. package/lib/components-react-node/feature-section/feature-section.js +1 -1
  689. package/lib/components-react-node/filter-panel/filter-group-item.js +2 -2
  690. package/lib/components-react-node/filter-panel/filter-group.js +2 -2
  691. package/lib/components-react-node/filter-panel/filter-modal-button.js +2 -2
  692. package/lib/components-react-node/filter-panel/filter-modal-footer.js +2 -2
  693. package/lib/components-react-node/filter-panel/filter-modal-heading.js +2 -2
  694. package/lib/components-react-node/filter-panel/filter-panel-checkbox.js +2 -2
  695. package/lib/components-react-node/filter-panel/filter-panel-composite.js +1 -1
  696. package/lib/components-react-node/filter-panel/filter-panel-heading.js +1 -1
  697. package/lib/components-react-node/filter-panel/filter-panel-input-select-item.js +1 -1
  698. package/lib/components-react-node/filter-panel/filter-panel-input-select.js +1 -1
  699. package/lib/components-react-node/filter-panel/filter-panel-modal.js +2 -2
  700. package/lib/components-react-node/filter-panel/filter-panel.js +1 -1
  701. package/lib/components-react-node/footer/dropdown.js +2 -2
  702. package/lib/components-react-node/footer/footer-composite.js +1 -1
  703. package/lib/components-react-node/footer/footer-container.js +1 -1
  704. package/lib/components-react-node/horizontal-rule/horizontal-rule.js +1 -1
  705. package/lib/components-react-node/image/image-item.js +1 -1
  706. package/lib/components-react-node/image/image.js +1 -1
  707. package/lib/components-react-node/leadspace/breadcrumb-item.js +2 -2
  708. package/lib/components-react-node/leadspace/breadcrumb-link.js +2 -2
  709. package/lib/components-react-node/leadspace/breadcrumb.js +2 -2
  710. package/lib/components-react-node/leadspace/leadspace-heading.js +1 -1
  711. package/lib/components-react-node/leadspace/leadspace-image.js +1 -1
  712. package/lib/components-react-node/leadspace/leadspace.js +1 -1
  713. package/lib/components-react-node/leadspace-block/leadspace-block-content.js +1 -1
  714. package/lib/components-react-node/leadspace-block/leadspace-block-cta.js +1 -1
  715. package/lib/components-react-node/leadspace-block/leadspace-block-heading.js +1 -1
  716. package/lib/components-react-node/leadspace-block/leadspace-block-media.js +1 -1
  717. package/lib/components-react-node/leadspace-block/leadspace-block.js +1 -1
  718. package/lib/components-react-node/leadspace-with-search/leadspace-with-search-content-copy.js +1 -1
  719. package/lib/components-react-node/leadspace-with-search/leadspace-with-search-content-heading.js +1 -1
  720. package/lib/components-react-node/leadspace-with-search/leadspace-with-search-content.js +1 -1
  721. package/lib/components-react-node/leadspace-with-search/leadspace-with-search-heading.js +1 -1
  722. package/lib/components-react-node/leadspace-with-search/leadspace-with-search.js +1 -1
  723. package/lib/components-react-node/leaving-ibm/leaving-ibm-composite.js +1 -1
  724. package/lib/components-react-node/leaving-ibm/leaving-ibm-container.js +1 -1
  725. package/lib/components-react-node/leaving-ibm/leaving-ibm-modal-body.js +2 -2
  726. package/lib/components-react-node/leaving-ibm/leaving-ibm-modal-heading.js +2 -2
  727. package/lib/components-react-node/leaving-ibm/leaving-ibm-modal-supplemental.js +1 -1
  728. package/lib/components-react-node/leaving-ibm/leaving-ibm-modal.js +2 -2
  729. package/lib/components-react-node/lightbox-media-viewer/lightbox-image-viewer.js +1 -1
  730. package/lib/components-react-node/lightbox-media-viewer/lightbox-media-viewer.js +1 -1
  731. package/lib/components-react-node/lightbox-media-viewer/lightbox-video-player-composite.js +1 -1
  732. package/lib/components-react-node/lightbox-media-viewer/lightbox-video-player-container.js +1 -1
  733. package/lib/components-react-node/lightbox-media-viewer/lightbox-video-player.js +1 -1
  734. package/lib/components-react-node/link-list/link-list-heading.js +1 -1
  735. package/lib/components-react-node/link-list/link-list-item-card.js +1 -1
  736. package/lib/components-react-node/link-list/link-list-item.js +1 -1
  737. package/lib/components-react-node/link-list/link-list.js +1 -1
  738. package/lib/components-react-node/link-list-section/link-list-section.js +1 -1
  739. package/lib/components-react-node/link-with-icon/link-with-icon.js +2 -2
  740. package/lib/components-react-node/locale-modal/locale-modal-composite.js +1 -1
  741. package/lib/components-react-node/locale-modal/locale-modal-container.js +1 -1
  742. package/lib/components-react-node/logo-grid/logo-grid-item.js +1 -1
  743. package/lib/components-react-node/logo-grid/logo-grid-link.js +1 -1
  744. package/lib/components-react-node/logo-grid/logo-grid.js +1 -1
  745. package/lib/components-react-node/markdown/markdown.js +1 -1
  746. package/lib/components-react-node/masthead/masthead-composite.js +1 -1
  747. package/lib/components-react-node/masthead/masthead-container.js +1 -1
  748. package/lib/components-react-node/masthead/masthead.js +1 -1
  749. package/lib/components-react-node/pictogram-item/pictogram-item.js +1 -1
  750. package/lib/components-react-node/quote/quote-link-with-icon.js +1 -1
  751. package/lib/components-react-node/quote/quote-source-bottom-copy.js +1 -1
  752. package/lib/components-react-node/quote/quote-source-copy.js +1 -1
  753. package/lib/components-react-node/quote/quote-source-heading.js +1 -1
  754. package/lib/components-react-node/quote/quote.js +1 -1
  755. package/lib/components-react-node/search-with-typeahead/scoped-search-dropdown-mobile.js +2 -2
  756. package/lib/components-react-node/search-with-typeahead/scoped-search-dropdown.js +1 -1
  757. package/lib/components-react-node/search-with-typeahead/search-with-typeahead-item.js +1 -1
  758. package/lib/components-react-node/search-with-typeahead/search-with-typeahead.js +2 -2
  759. package/lib/components-react-node/structured-list/structured-list-body.js +2 -2
  760. package/lib/components-react-node/structured-list/structured-list-cell.js +2 -2
  761. package/lib/components-react-node/structured-list/structured-list-group.js +1 -1
  762. package/lib/components-react-node/structured-list/structured-list-head.js +2 -2
  763. package/lib/components-react-node/structured-list/structured-list-header-cell.js +2 -2
  764. package/lib/components-react-node/structured-list/structured-list-header-row.js +2 -2
  765. package/lib/components-react-node/structured-list/structured-list-row.js +2 -2
  766. package/lib/components-react-node/structured-list/structured-list.js +1 -1
  767. package/lib/components-react-node/table-of-contents/table-of-contents.js +1 -1
  768. package/lib/components-react-node/tabs-extended/tab.js +1 -1
  769. package/lib/components-react-node/tabs-extended/tabs-extended.js +1 -1
  770. package/lib/components-react-node/tabs-extended-media/tabs-extended-media.js +1 -1
  771. package/lib/components-react-node/tag-group/tag-group.js +1 -1
  772. package/lib/components-react-node/tag-link/tag-link.js +1 -1
  773. package/lib/components-react-node/universal-banner/universal-banner-copy.js +1 -1
  774. package/lib/components-react-node/universal-banner/universal-banner-heading.js +1 -1
  775. package/lib/components-react-node/universal-banner/universal-banner-image.js +1 -1
  776. package/lib/components-react-node/universal-banner/universal-banner.js +1 -1
  777. package/lib/components-react-node/video-player/video-player-composite.js +1 -1
  778. package/lib/components-react-node/video-player/video-player-container.js +1 -1
  779. package/lib/components-react-node/video-player/video-player.js +1 -1
  780. package/package.json +4 -4
  781. package/scss/components/background-media/background-media.scss +1 -1
  782. package/scss/components/button/button.scss +1 -1
  783. package/scss/components/expressive-modal/expressive-modal.scss +1 -1
  784. package/scss/components/filter-panel/filter-panel.scss +1 -1
  785. package/scss/components/leadspace/leadspace.scss +1 -1
  786. package/scss/components/leaving-ibm/leaving-ibm.scss +1 -1
  787. package/scss/components/masthead/masthead.scss +3 -3
  788. package/scss/components/search/search.scss +1 -1
@@ -10,7 +10,7 @@ import { LitElement } from 'lit-element';
10
10
  import 'wicg-inert';
11
11
  declare const DDSCarousel_base: {
12
12
  new (...args: any[]): {
13
- _handles: Set<import("@carbon/carbon-web-components/es/globals/internal/handle").default>;
13
+ _handles: Set<import("@carbon/web-components/es/globals/internal/handle").default>;
14
14
  connectedCallback(): void;
15
15
  disconnectedCallback(): void;
16
16
  accessKey: string;
@@ -65,6 +65,9 @@ declare const DDSCarousel_base: {
65
65
  closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3] | null;
66
66
  closest<E extends Element = Element>(selectors: string): E | null;
67
67
  getAttribute(qualifiedName: string): string | null;
68
+ /**
69
+ * The page size that is explicitly set.
70
+ */
68
71
  getAttributeNS(namespace: string | null, localName: string): string | null;
69
72
  getAttributeNames(): string[];
70
73
  getAttributeNode(qualifiedName: string): Attr | null;
@@ -316,6 +319,9 @@ declare const DDSCarousel_base: {
316
319
  blur(): void;
317
320
  focus(options?: FocusOptions | undefined): void;
318
321
  };
322
+ /**
323
+ * The name of the custom event fired when the video title is updated
324
+ */
319
325
  _hostListeners: {
320
326
  [listenerName: string]: {
321
327
  [type: string]: {
@@ -332,6 +338,9 @@ declare const DDSCarousel_base: {
332
338
  disconnectedCallback(): void;
333
339
  transposeAttributes(linkNodeArg?: any, altAttributesArg?: any): void;
334
340
  _cleanAndCreateMutationObserver({ create }?: {
341
+ /**
342
+ * Array to hold the card-cta-footer elements within child items.
343
+ */
335
344
  create?: boolean | undefined;
336
345
  }): void;
337
346
  accessKey: string;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/carousel/carousel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAML,UAAU,EACX,MAAM,aAAa,CAAC;AACrB,OAAO,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,KAAK,sBAAsB,WAEhC;IAED;;OAEG;IACH,MAAM,KAAK,sBAAsB,WAEhC;IAED;;OAEG;IACH,MAAM,KAAK,YAAY,WAEtB;IAED;;OAEG;IACH,MAAM,KAAK,mBAAmB,WAE7B;IAED;;OAEG;IACH,MAAM,KAAK,6BAA6B,WAEvC;IAED;;OAEG;IACH,MAAM,KAAK,mBAAmB,WAE7B;IAED;;OAEG;IACH,MAAM,KAAK,oBAAoB,WAE9B;IAED;;OAEG;IACH,MAAM,KAAK,qBAAqB,WAE/B;IAED;;OAEG;IACH,MAAM,KAAK,mBAAmB,WAE7B;IAED;;OAEG;IACH,MAAM,KAAK,kBAAkB,WAE5B;IAED,MAAM,KAAK,cAAc,WAExB;IAED;;OAEG;IACH,MAAM,KAAK,gBAAgB,WAI1B;IAED,MAAM,CAAC,MAAM,MAAU;CACxB;AAGD,eAAe,WAAW,CAAC","file":"carousel.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { ifDefined } from 'lit-html/directives/if-defined.js';\nimport {\n html,\n property,\n state,\n query,\n customElement,\n LitElement,\n} from 'lit-element';\nimport 'wicg-inert';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport ifNonNull from '@carbon/carbon-web-components/es/globals/directives/if-non-null.js';\nimport CaretLeft20 from '@carbon/carbon-web-components/es/icons/caret--left/20.js';\nimport CaretRight20 from '@carbon/carbon-web-components/es/icons/caret--right/20.js';\nimport HostListener from '@carbon/carbon-web-components/es/globals/decorators/host-listener.js';\nimport HostListenerMixin from '@carbon/carbon-web-components/es/globals/mixins/host-listener.js';\nimport { selectorTabbable } from '@carbon/carbon-web-components/es/globals/settings.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport sameHeight from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/sameHeight/sameHeight';\nimport styles from './carousel.scss';\nimport StableSelectorMixin from '../../globals/mixins/stable-selector';\nimport DDSExpressiveModal from '../expressive-modal/expressive-modal';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\nconst MAX_GESTURE_DURATION = 300; // max time allowed to do swipe\nconst MIN_DISTANCE_TRAVELLED = 75; // min distance traveled to be considered swipe\nconst headingBottomMargin = 64; // tag constants used for same height calculations\n\n/**\n * Carousel.\n *\n * @element dds-carousel\n * @csspart prev-button The button to go to the previous page.\n * @csspart next-button The button to go to the next page.\n */\n@customElement(`${ddsPrefix}-carousel`)\nclass DDSCarousel extends HostListenerMixin(StableSelectorMixin(LitElement)) {\n /**\n * The scrolling contents node.\n */\n @query(`.${prefix}--carousel__scroll-contents`)\n private _contentsNode?: HTMLElement;\n\n /**\n * The width of the scroll contents area node, excluding one of overflowed contents.\n */\n @state()\n private _contentsBaseWidth = 0;\n\n /**\n * The gap width between each card.\n */\n @state()\n private _gap = 0;\n\n /**\n * Array to hold the card-heading elements within child items.\n */\n private _childItems: any[] = [];\n\n /**\n * Array to hold the card-heading elements within child items.\n */\n private _childItemHeadings: any[] = [];\n\n /**\n * Array to hold the card-eyebrow elements within child items.\n */\n private _childItemEyebrows: any[] = [];\n\n /**\n * Array to hold the tag-group elements within child items.\n */\n private _childItemTagGroup: any[] = [];\n\n /**\n * Array to hold the paragraph elements within child items.\n */\n private _childItemParagraphs: any[] = [];\n\n /**\n * Array to hold the card-cta-footer elements within child items.\n */\n private _childItemFooters: any[] = [];\n\n /**\n * The observer for the resize of the scroll container.\n */\n private _observerResizeContainer: any | null = null; // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n\n /**\n * The observer for the resize of the viewport.\n */\n private _observerResizeRoot: any | null = null; // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n\n /**\n * The page size that is explicitly set.\n */\n @state()\n private _pageSize?: number;\n\n /**\n * The page size that is automatically calculated upon viewport size\n * via `--dds--carousel--page-size` CSS custom property.\n * If `page-size` attribute is set, this value is ignored.\n */\n @state()\n private _pageSizeAuto = 1;\n\n /**\n * The default slot.\n */\n @query('slot:not([name])')\n private _slotNode?: HTMLSlotElement;\n\n /**\n * The number of total items.\n */\n @state()\n private _total = 0;\n\n /**\n * Initial touch position (used to detect swipe gesture)\n */\n @state()\n private _startPos = 0;\n\n /**\n * Initial touch time (used to detect swipe gesture)\n */\n @state()\n private _startTime = 0;\n\n /**\n * Cleans-up and creats the resize observer for the scrolling container.\n *\n * @param [options] The options.\n * @param [options.create] `true` to create the new resize observer.\n */\n private _cleanAndCreateObserverResize({ create }: { create?: boolean } = {}) {\n const { _contentsNode: contentsNode } = this;\n if (contentsNode) {\n if (this._observerResizeContainer) {\n this._observerResizeContainer.disconnect();\n this._observerResizeContainer = null;\n }\n if (this._observerResizeRoot) {\n this._observerResizeRoot.disconnect();\n this._observerResizeRoot = null;\n }\n if (create) {\n // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n // @ts-ignore\n this._observerResizeRoot = new ResizeObserver(this._observeResizeRoot);\n this._observerResizeRoot.observe(this.ownerDocument!.documentElement);\n // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n // @ts-ignore\n this._observerResizeContainer = new ResizeObserver(\n this._observeResizeContainer\n );\n this._observerResizeContainer.observe(contentsNode);\n }\n }\n }\n\n /**\n * Stops the container from scrolling when focusing on a card outside of the viewport.\n *\n * @param event The event.\n */\n // eslint-disable-next-line class-methods-use-this\n private _handleScrollFocus({ target }: Event) {\n (target as HTMLElement).scrollTo(0, 0);\n }\n\n /**\n * Handles card focus throughout pages.\n *\n * @param event The event.\n */\n @HostListener('shadowRoot:focusin')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleFocus = async ({ target }: FocusEvent) => {\n const containsCurrent =\n target !== this && this.contains(target as HTMLElement);\n let currentItemIndex = 0;\n Array.from(this.children).forEach((carouselItem, index) => {\n if (carouselItem.contains(target as HTMLElement)) {\n currentItemIndex = index;\n }\n });\n\n // Calculates proper page to display if focus is outside the current page\n if (\n containsCurrent &&\n (currentItemIndex < this.start ||\n currentItemIndex >= this.start + this.pageSize)\n ) {\n // The `currentIndex` floored by `pageSize`\n const nextStart =\n Math.floor(currentItemIndex / this.pageSize) * this.pageSize;\n const pageOffset = this.start % this.pageSize;\n\n // Ensures the page moves by `this.pageSize` in either direction\n this.start = nextStart + pageOffset;\n }\n };\n\n /**\n * Handles card with video heading and applies the set same height function.\n *\n * @param event The event.\n */\n @HostListener(`document:eventVideoTitleUpdated`)\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleVideoTitleUpdate = async (event: FocusEvent) => {\n if (event) {\n this._setSameHeight();\n }\n };\n\n /**\n * Handles `click` event on the next button.\n */\n private _handleClickNextButton() {\n const { pageSize, start, _total: total } = this;\n this.start = Math.min(start + pageSize, total - 1);\n }\n\n /**\n * Handles `click` event on the prev button.\n */\n private _handleClickPrevButton() {\n const { pageSize, start } = this;\n this.start = Math.max(start - pageSize, 0);\n }\n\n /**\n * Handles `touchstart` event.\n */\n private _handleTouchStartEvent(event: TouchEvent) {\n this._startPos = event.touches[0].clientX;\n this._startTime = new Date().getTime();\n }\n\n /**\n * Handles `touchend` event.\n */\n private _handleTouchEndEvent(event: TouchEvent) {\n const { _startPos, _startTime } = this;\n const { pageSize, start, _total: total } = this;\n\n const distTravelled = event.changedTouches[0].clientX - _startPos; // distance travelled\n const elapsedTime = new Date().getTime() - _startTime; // elapsed time\n\n if (\n elapsedTime <= MAX_GESTURE_DURATION &&\n Math.abs(distTravelled) >= MIN_DISTANCE_TRAVELLED\n ) {\n if (distTravelled < 0) {\n this.start = Math.min(start + pageSize, total - 1);\n } else {\n this.start = Math.max(start - pageSize, 0);\n }\n }\n }\n\n /**\n * Handles `slotchange` event.\n */\n private _handleSlotChange(event: Event) {\n const slot = event.target as HTMLSlotElement;\n const { name } = slot;\n if (!name) {\n this._total = slot\n .assignedNodes()\n .filter((node) => node.nodeType === Node.ELEMENT_NODE).length;\n }\n this._updateGap();\n\n this._childItems = (event.target as HTMLSlotElement)\n .assignedNodes()\n .filter((node) => node instanceof HTMLElement);\n\n // retrieve item heading, eyebrows, and footers to set same height\n if (this._childItems) {\n this._childItems\n .filter((elem) =>\n (elem as HTMLElement).matches !== undefined\n ? (elem as HTMLElement).matches(\n (this.constructor as typeof DDSCarousel).selectorItem\n ) ||\n (elem as HTMLElement).matches(\n (this.constructor as typeof DDSCarousel)\n .selectorItemVideoCTAContainer\n )\n : false\n )\n .forEach((e) => {\n this._childItemEyebrows.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemEyebrow\n )\n );\n this._childItemParagraphs.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemParagraph\n )\n );\n this._childItemTagGroup.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemTagGroup\n )\n );\n this._childItemHeadings.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemHeading\n )\n );\n\n this._childItemHeadings.push(\n (e as HTMLElement)\n .querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemCardCTA\n )\n ?.shadowRoot?.querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemHeading\n )\n );\n\n this._childItemHeadings = this._childItemHeadings.filter(\n (heading) => heading\n );\n\n this._childItemFooters.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemFooter\n )\n );\n });\n }\n }\n\n /**\n * The observer for the resize of the scroll container.\n */\n private _observeResizeContainer = (records) => {\n const { contentRect } = records[records.length - 1];\n const { width: contentsBaseWidth } = contentRect;\n this._contentsBaseWidth = contentsBaseWidth;\n this._updateGap();\n };\n\n /**\n * The observer for the resize of the viewport.\n */\n private _observeResizeRoot = () => {\n const { customPropertyPageSize } = this.constructor as typeof DDSCarousel;\n const { _contentsNode: contentsNode } = this;\n const { defaultView: w } = this.ownerDocument!;\n this._pageSizeAuto = Number(\n w!\n .getComputedStyle(contentsNode!)\n .getPropertyValue(customPropertyPageSize)\n );\n this._setSameHeight();\n };\n\n /**\n * @returns Page status text.\n */\n private _renderStatus() {\n const { start, pageSize, formatStatus, _total: total } = this;\n // Copes with the condition where `start % pageSize` is non-zero\n const pagesBefore = Math.ceil(start / pageSize);\n const pagesSince = Math.ceil((total - start) / pageSize);\n return formatStatus({\n currentPage: Math.ceil(start / pageSize) + 1,\n pages: pagesBefore + pagesSince,\n });\n }\n\n private _setSameHeight = () => {\n // check if items are not null before using sameHeight\n\n sameHeight(\n this._childItemEyebrows.filter((item) => item !== null),\n 'sm'\n );\n sameHeight(\n this._childItemHeadings.filter((item) => item !== null),\n 'sm'\n );\n sameHeight(\n this._childItemParagraphs.filter((item) => item !== null),\n 'sm'\n );\n sameHeight(\n this._childItemFooters.filter((item) => item !== null),\n 'sm'\n );\n\n let tagGroupHeight: number = 0;\n\n // get tallest height of tag groups\n this._childItemTagGroup.forEach((item) => {\n if (item) {\n const groupHeight = (item as HTMLElement).offsetHeight;\n if (groupHeight > tagGroupHeight) {\n tagGroupHeight = groupHeight;\n }\n }\n });\n\n this._childItemHeadings.forEach((e) => {\n // add tag group height to heading to the cards lacking tag group\n if (\n e &&\n !e.nextElementSibling?.matches(\n (this.constructor as typeof DDSCarousel).selectorItemTagGroup\n )\n ) {\n e.style.marginBottom = `${tagGroupHeight + headingBottomMargin}px`;\n }\n });\n };\n\n /**\n * Calculates the width between cards.\n */\n private _updateGap() {\n const { _contentsNode: contentsNode, _slotNode: slotNode } = this;\n const elems = slotNode!\n .assignedNodes()\n .filter((node) => node.nodeType === Node.ELEMENT_NODE);\n this._gap =\n elems.length <= 1\n ? 0\n : (contentsNode!.scrollWidth -\n elems.reduce(\n (acc, elem) => acc + ((elem as HTMLElement).offsetWidth ?? 0),\n 0\n )) /\n (elems.length - 1);\n }\n\n get focusableElements() {\n const { selectorTabbable: selectorTabbableForCarousel } = this\n .constructor as typeof DDSExpressiveModal;\n return [\n ...Array.from(\n (this.shadowRoot?.querySelectorAll(\n selectorTabbableForCarousel\n ) as NodeListOf<HTMLElement>) || []\n ),\n ...Array.from(\n this.querySelectorAll(\n selectorTabbableForCarousel\n ) as NodeListOf<HTMLElement>\n ),\n ];\n }\n\n /**\n * The formatter for the pagination status. Should be changed upon the locale the UI is rendered with.\n */\n @property({ attribute: false })\n formatStatus = ({ currentPage, pages }) => `${currentPage} / ${pages}`;\n\n /**\n * Number of items per page.\n * If `--dds--carousel--page-size` CSS custom property is set to `<div class=\"bx--carousel__scroll-container\">`\n * or its ancestor (e.g. the host `<dds-carousel>`), this is set automatically from `--dds--carousel--page-size`.\n */\n @property({ type: Number, attribute: 'page-size' })\n get pageSize() {\n const { _pageSize: pageSize, _pageSizeAuto: pageSizeAuto } = this;\n return pageSize ?? pageSizeAuto;\n }\n\n set pageSize(value: number) {\n this._pageSize = value;\n // Don't call `.requestUpdate()` here given we track updates via `_pageSize` and `_pageSizeAuto`\n }\n\n /**\n * The assistive text for the button to go to next page.\n */\n @property({ attribute: 'next-button-text' })\n nextButtonText = 'Next page';\n\n /**\n * The assistive text for the button to go to previous page.\n */\n @property({ attribute: 'prev-button-text' })\n prevButtonText = 'Previous page';\n\n /**\n * The current zero-based index of the left-most card.\n */\n @property({ type: Number })\n start = 0;\n\n connectedCallback() {\n super.connectedCallback();\n this._cleanAndCreateObserverResize({ create: true });\n\n const containingModal = this.closest(\n `${ddsPrefix}-expressive-modal`\n ) as DDSExpressiveModal;\n if (containingModal) {\n containingModal.hasFocusableElements.push(this);\n this.setAttribute('in-modal', '');\n\n setTimeout(() => {\n containingModal.modalBody!.style.overflow = 'hidden';\n containingModal.modalBody!.style.width = 'var(--modal-vw)';\n }, 0);\n }\n }\n\n disconnectedCallback() {\n this._cleanAndCreateObserverResize();\n super.disconnectedCallback();\n }\n\n firstUpdated() {\n this._cleanAndCreateObserverResize({ create: true });\n }\n\n protected updated(changedProperties) {\n if (changedProperties.has('start')) {\n const { _childItems: childItems, start, pageSize } = this;\n\n childItems.forEach((item) => {\n const index = childItems.indexOf(item);\n if (index < start || index > start + pageSize - 1) {\n item.inert = true;\n } else {\n item.inert = false;\n }\n });\n }\n }\n\n render() {\n const { customPropertyPageSize } = this.constructor as typeof DDSCarousel;\n const {\n nextButtonText,\n pageSize,\n prevButtonText,\n start,\n _contentsBaseWidth: contentsBaseWidth,\n _gap: gap,\n _pageSize: pageSizeExplicit,\n _total: total,\n _handleClickNextButton: handleClickNextButton,\n _handleClickPrevButton: handleClickPrevButton,\n _handleScrollFocus: handleScrollFocus,\n _handleSlotChange: handleSlotChange,\n _handleTouchStartEvent: handleTouchStartEvent,\n _handleTouchEndEvent: handleTouchEndEvent,\n } = this;\n // Copes with the condition where `start % pageSize` is non-zero\n const pagesBefore = Math.ceil(start / pageSize);\n const pagesSince = Math.ceil((total - start) / pageSize);\n // Use another div from the host `<dds-carousel>` to reflect private state\n return html`\n <div\n class=\"${prefix}--carousel__scroll-container\"\n @scroll=\"${handleScrollFocus}\"\n @touchstart=\"${handleTouchStartEvent}\"\n @touchend=\"${handleTouchEndEvent}\"\n style=\"${ifNonNull(\n pageSizeExplicit == null\n ? null\n : `${customPropertyPageSize}: ${pageSizeExplicit}`\n )}\"\n >\n <div\n class=\"${prefix}--carousel__scroll-contents\"\n style=\"left:${(-start * (contentsBaseWidth + gap)) / pageSize}px\"\n >\n <slot @slotchange=\"${handleSlotChange}\"></slot>\n </div>\n </div>\n <div class=\"${prefix}--carousel__navigation\">\n <button\n part=\"prev-button\"\n class=\"${prefix}--btn ${prefix}--btn--secondary ${prefix}--btn--icon-only ${prefix}--carousel__navigation__btn\"\n ?disabled=\"${pagesBefore === 0}\"\n @click=\"${handleClickPrevButton}\"\n aria-label=\"${ifDefined(prevButtonText)}\"\n title=\"${ifDefined(prevButtonText)}\"\n >\n ${CaretLeft20()}\n </button>\n ${this._renderStatus()}\n <button\n part=\"next-button\"\n class=\"${prefix}--btn ${prefix}--btn--secondary ${prefix}--btn--icon-only ${prefix}--carousel__navigation__btn\"\n ?disabled=\"${pagesSince <= 1}\"\n @click=\"${handleClickNextButton}\"\n aria-label=\"${ifDefined(nextButtonText)}\"\n title=\"${ifDefined(nextButtonText)}\"\n >\n ${CaretRight20()}\n </button>\n </div>\n `;\n }\n\n /**\n * The CSS custom property name for the live page size.\n * If the CSS custom property is set to `<div class=\"bx--carousel__scroll-container\">`\n * or its ancestor (e.g. the host `<dds-carousel>`), this is set automatically from the CSS custom property.\n */\n static get customPropertyPageSize() {\n return `--${ddsPrefix}--carousel--page-size`;\n }\n\n /**\n * The name of the custom event fired when the video title is updated\n */\n static get eventVideoTitleUpdated() {\n return `${ddsPrefix}-card-cta-video-title-updated`;\n }\n\n /**\n * The selector for the card component\n */\n static get selectorItem() {\n return `${ddsPrefix}-card`;\n }\n\n /**\n * The selector for the card cta\n */\n static get selectorItemCardCTA() {\n return `${ddsPrefix}-card-cta`;\n }\n\n /**\n * The selector for the video cta container\n */\n static get selectorItemVideoCTAContainer() {\n return `${ddsPrefix}-video-cta-container`;\n }\n\n /**\n * A selector that will return the card item's eyebrow\n */\n static get selectorItemEyebrow() {\n return `${ddsPrefix}-card-eyebrow`;\n }\n\n /**\n * A selector that will return the card item's tag group\n */\n static get selectorItemTagGroup() {\n return `${ddsPrefix}-tag-group`;\n }\n\n /**\n * A selector that will return the card item's tag group\n */\n static get selectorItemParagraph() {\n return `p`;\n }\n\n /**\n * A selector that will return the card item's heading\n */\n static get selectorItemHeading() {\n return `${ddsPrefix}-card-heading`;\n }\n\n /**\n * A selector that will return the card item's footer\n */\n static get selectorItemFooter() {\n return `${ddsPrefix}-card-cta-footer`;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}--carousel`;\n }\n\n /**\n * A selector selecting tabbable nodes.\n */\n static get selectorTabbable() {\n return `\n ${selectorTabbable}\n `;\n }\n\n static styles = styles;\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSCarousel;\n"]}
1
+ {"version":3,"sources":["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AFzB;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAGzB;IAED;;OAEG;IAEH,cAAc,SAAe;IAE7B;;OAEG;IAEH,cAAc,SAAmB;IAEjC;;OAEG;IAEH,KAAK,SAAK;IAEV,iBAAiB;IAkBjB,oBAAoB;IAKpB,YAAY;IAIZ,SAAS,CAAC,OAAO,CAAC,iBAAiB,KAAA;IAenC,MAAM;IAmEN;;;;OAIG;IACH,MAAM,KAAK,sBAAsB,WAEhC;IAED;;OAEG;IACH,MAAM,KAAK,sBAAsB,WAEhC;IAED;;OAEG;IACH,MAAM,KAAK,YAAY,WAEtB;IAED;;OAEG;IACH,MAAM,KAAK,mBAAmB,WAE7B;IAED;;OAEG;IACH,MAAM,KAAK,6BAA6B,WAEvC;IAED;;OAEG;IACH,MAAM,KAAK,mBAAmB,WAE7B;IAED;;OAEG;IACH,MAAM,KAAK,oBAAoB,WAE9B;IAED;;OAEG;IACH,MAAM,KAAK,qBAAqB,WAE/B;IAED;;OAEG;IACH,MAAM,KAAK,mBAAmB,WAE7B;IAED;;OAEG;IACH,MAAM,KAAK,kBAAkB,WAE5B;IAED,MAAM,KAAK,cAAc,WAExB;IAED;;OAEG;IACH,MAAM,KAAK,gBAAgB,WAI1B;IAED,MAAM,CAAC,MAAM,MAAU;CACxB;AAGD,eAAe,WAAW,CAAC","file":"carousel.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { ifDefined } from 'lit-html/directives/if-defined.js';\nimport {\n html,\n property,\n state,\n query,\n customElement,\n LitElement,\n} from 'lit-element';\nimport 'wicg-inert';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport ifNonNull from '@carbon/web-components/es/globals/directives/if-non-null.js';\nimport CaretLeft20 from '@carbon/web-components/es/icons/caret--left/20.js';\nimport CaretRight20 from '@carbon/web-components/es/icons/caret--right/20.js';\nimport HostListener from '@carbon/web-components/es/globals/decorators/host-listener.js';\nimport HostListenerMixin from '@carbon/web-components/es/globals/mixins/host-listener.js';\nimport { selectorTabbable } from '@carbon/web-components/es/globals/settings.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport sameHeight from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/sameHeight/sameHeight';\nimport styles from './carousel.scss';\nimport StableSelectorMixin from '../../globals/mixins/stable-selector';\nimport DDSExpressiveModal from '../expressive-modal/expressive-modal';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\nconst MAX_GESTURE_DURATION = 300; // max time allowed to do swipe\nconst MIN_DISTANCE_TRAVELLED = 75; // min distance traveled to be considered swipe\nconst headingBottomMargin = 64; // tag constants used for same height calculations\n\n/**\n * Carousel.\n *\n * @element dds-carousel\n * @csspart prev-button The button to go to the previous page.\n * @csspart next-button The button to go to the next page.\n */\n@customElement(`${ddsPrefix}-carousel`)\nclass DDSCarousel extends HostListenerMixin(StableSelectorMixin(LitElement)) {\n /**\n * The scrolling contents node.\n */\n @query(`.${prefix}--carousel__scroll-contents`)\n private _contentsNode?: HTMLElement;\n\n /**\n * The width of the scroll contents area node, excluding one of overflowed contents.\n */\n @state()\n private _contentsBaseWidth = 0;\n\n /**\n * The gap width between each card.\n */\n @state()\n private _gap = 0;\n\n /**\n * Array to hold the card-heading elements within child items.\n */\n private _childItems: any[] = [];\n\n /**\n * Array to hold the card-heading elements within child items.\n */\n private _childItemHeadings: any[] = [];\n\n /**\n * Array to hold the card-eyebrow elements within child items.\n */\n private _childItemEyebrows: any[] = [];\n\n /**\n * Array to hold the tag-group elements within child items.\n */\n private _childItemTagGroup: any[] = [];\n\n /**\n * Array to hold the paragraph elements within child items.\n */\n private _childItemParagraphs: any[] = [];\n\n /**\n * Array to hold the card-cta-footer elements within child items.\n */\n private _childItemFooters: any[] = [];\n\n /**\n * The observer for the resize of the scroll container.\n */\n private _observerResizeContainer: any | null = null; // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n\n /**\n * The observer for the resize of the viewport.\n */\n private _observerResizeRoot: any | null = null; // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n\n /**\n * The page size that is explicitly set.\n */\n @state()\n private _pageSize?: number;\n\n /**\n * The page size that is automatically calculated upon viewport size\n * via `--dds--carousel--page-size` CSS custom property.\n * If `page-size` attribute is set, this value is ignored.\n */\n @state()\n private _pageSizeAuto = 1;\n\n /**\n * The default slot.\n */\n @query('slot:not([name])')\n private _slotNode?: HTMLSlotElement;\n\n /**\n * The number of total items.\n */\n @state()\n private _total = 0;\n\n /**\n * Initial touch position (used to detect swipe gesture)\n */\n @state()\n private _startPos = 0;\n\n /**\n * Initial touch time (used to detect swipe gesture)\n */\n @state()\n private _startTime = 0;\n\n /**\n * Cleans-up and creats the resize observer for the scrolling container.\n *\n * @param [options] The options.\n * @param [options.create] `true` to create the new resize observer.\n */\n private _cleanAndCreateObserverResize({ create }: { create?: boolean } = {}) {\n const { _contentsNode: contentsNode } = this;\n if (contentsNode) {\n if (this._observerResizeContainer) {\n this._observerResizeContainer.disconnect();\n this._observerResizeContainer = null;\n }\n if (this._observerResizeRoot) {\n this._observerResizeRoot.disconnect();\n this._observerResizeRoot = null;\n }\n if (create) {\n // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n // @ts-ignore\n this._observerResizeRoot = new ResizeObserver(this._observeResizeRoot);\n this._observerResizeRoot.observe(this.ownerDocument!.documentElement);\n // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n // @ts-ignore\n this._observerResizeContainer = new ResizeObserver(\n this._observeResizeContainer\n );\n this._observerResizeContainer.observe(contentsNode);\n }\n }\n }\n\n /**\n * Stops the container from scrolling when focusing on a card outside of the viewport.\n *\n * @param event The event.\n */\n // eslint-disable-next-line class-methods-use-this\n private _handleScrollFocus({ target }: Event) {\n (target as HTMLElement).scrollTo(0, 0);\n }\n\n /**\n * Handles card focus throughout pages.\n *\n * @param event The event.\n */\n @HostListener('shadowRoot:focusin')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleFocus = async ({ target }: FocusEvent) => {\n const containsCurrent =\n target !== this && this.contains(target as HTMLElement);\n let currentItemIndex = 0;\n Array.from(this.children).forEach((carouselItem, index) => {\n if (carouselItem.contains(target as HTMLElement)) {\n currentItemIndex = index;\n }\n });\n\n // Calculates proper page to display if focus is outside the current page\n if (\n containsCurrent &&\n (currentItemIndex < this.start ||\n currentItemIndex >= this.start + this.pageSize)\n ) {\n // The `currentIndex` floored by `pageSize`\n const nextStart =\n Math.floor(currentItemIndex / this.pageSize) * this.pageSize;\n const pageOffset = this.start % this.pageSize;\n\n // Ensures the page moves by `this.pageSize` in either direction\n this.start = nextStart + pageOffset;\n }\n };\n\n /**\n * Handles card with video heading and applies the set same height function.\n *\n * @param event The event.\n */\n @HostListener(`document:eventVideoTitleUpdated`)\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleVideoTitleUpdate = async (event: FocusEvent) => {\n if (event) {\n this._setSameHeight();\n }\n };\n\n /**\n * Handles `click` event on the next button.\n */\n private _handleClickNextButton() {\n const { pageSize, start, _total: total } = this;\n this.start = Math.min(start + pageSize, total - 1);\n }\n\n /**\n * Handles `click` event on the prev button.\n */\n private _handleClickPrevButton() {\n const { pageSize, start } = this;\n this.start = Math.max(start - pageSize, 0);\n }\n\n /**\n * Handles `touchstart` event.\n */\n private _handleTouchStartEvent(event: TouchEvent) {\n this._startPos = event.touches[0].clientX;\n this._startTime = new Date().getTime();\n }\n\n /**\n * Handles `touchend` event.\n */\n private _handleTouchEndEvent(event: TouchEvent) {\n const { _startPos, _startTime } = this;\n const { pageSize, start, _total: total } = this;\n\n const distTravelled = event.changedTouches[0].clientX - _startPos; // distance travelled\n const elapsedTime = new Date().getTime() - _startTime; // elapsed time\n\n if (\n elapsedTime <= MAX_GESTURE_DURATION &&\n Math.abs(distTravelled) >= MIN_DISTANCE_TRAVELLED\n ) {\n if (distTravelled < 0) {\n this.start = Math.min(start + pageSize, total - 1);\n } else {\n this.start = Math.max(start - pageSize, 0);\n }\n }\n }\n\n /**\n * Handles `slotchange` event.\n */\n private _handleSlotChange(event: Event) {\n const slot = event.target as HTMLSlotElement;\n const { name } = slot;\n if (!name) {\n this._total = slot\n .assignedNodes()\n .filter((node) => node.nodeType === Node.ELEMENT_NODE).length;\n }\n this._updateGap();\n\n this._childItems = (event.target as HTMLSlotElement)\n .assignedNodes()\n .filter((node) => node instanceof HTMLElement);\n\n // retrieve item heading, eyebrows, and footers to set same height\n if (this._childItems) {\n this._childItems\n .filter((elem) =>\n (elem as HTMLElement).matches !== undefined\n ? (elem as HTMLElement).matches(\n (this.constructor as typeof DDSCarousel).selectorItem\n ) ||\n (elem as HTMLElement).matches(\n (this.constructor as typeof DDSCarousel)\n .selectorItemVideoCTAContainer\n )\n : false\n )\n .forEach((e) => {\n this._childItemEyebrows.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemEyebrow\n )\n );\n this._childItemParagraphs.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemParagraph\n )\n );\n this._childItemTagGroup.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemTagGroup\n )\n );\n this._childItemHeadings.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemHeading\n )\n );\n\n this._childItemHeadings.push(\n (e as HTMLElement)\n .querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemCardCTA\n )\n ?.shadowRoot?.querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemHeading\n )\n );\n\n this._childItemHeadings = this._childItemHeadings.filter(\n (heading) => heading\n );\n\n this._childItemFooters.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemFooter\n )\n );\n });\n }\n }\n\n /**\n * The observer for the resize of the scroll container.\n */\n private _observeResizeContainer = (records) => {\n const { contentRect } = records[records.length - 1];\n const { width: contentsBaseWidth } = contentRect;\n this._contentsBaseWidth = contentsBaseWidth;\n this._updateGap();\n };\n\n /**\n * The observer for the resize of the viewport.\n */\n private _observeResizeRoot = () => {\n const { customPropertyPageSize } = this.constructor as typeof DDSCarousel;\n const { _contentsNode: contentsNode } = this;\n const { defaultView: w } = this.ownerDocument!;\n this._pageSizeAuto = Number(\n w!\n .getComputedStyle(contentsNode!)\n .getPropertyValue(customPropertyPageSize)\n );\n this._setSameHeight();\n };\n\n /**\n * @returns Page status text.\n */\n private _renderStatus() {\n const { start, pageSize, formatStatus, _total: total } = this;\n // Copes with the condition where `start % pageSize` is non-zero\n const pagesBefore = Math.ceil(start / pageSize);\n const pagesSince = Math.ceil((total - start) / pageSize);\n return formatStatus({\n currentPage: Math.ceil(start / pageSize) + 1,\n pages: pagesBefore + pagesSince,\n });\n }\n\n private _setSameHeight = () => {\n // check if items are not null before using sameHeight\n\n sameHeight(\n this._childItemEyebrows.filter((item) => item !== null),\n 'sm'\n );\n sameHeight(\n this._childItemHeadings.filter((item) => item !== null),\n 'sm'\n );\n sameHeight(\n this._childItemParagraphs.filter((item) => item !== null),\n 'sm'\n );\n sameHeight(\n this._childItemFooters.filter((item) => item !== null),\n 'sm'\n );\n\n let tagGroupHeight: number = 0;\n\n // get tallest height of tag groups\n this._childItemTagGroup.forEach((item) => {\n if (item) {\n const groupHeight = (item as HTMLElement).offsetHeight;\n if (groupHeight > tagGroupHeight) {\n tagGroupHeight = groupHeight;\n }\n }\n });\n\n this._childItemHeadings.forEach((e) => {\n // add tag group height to heading to the cards lacking tag group\n if (\n e &&\n !e.nextElementSibling?.matches(\n (this.constructor as typeof DDSCarousel).selectorItemTagGroup\n )\n ) {\n e.style.marginBottom = `${tagGroupHeight + headingBottomMargin}px`;\n }\n });\n };\n\n /**\n * Calculates the width between cards.\n */\n private _updateGap() {\n const { _contentsNode: contentsNode, _slotNode: slotNode } = this;\n const elems = slotNode!\n .assignedNodes()\n .filter((node) => node.nodeType === Node.ELEMENT_NODE);\n this._gap =\n elems.length <= 1\n ? 0\n : (contentsNode!.scrollWidth -\n elems.reduce(\n (acc, elem) => acc + ((elem as HTMLElement).offsetWidth ?? 0),\n 0\n )) /\n (elems.length - 1);\n }\n\n get focusableElements() {\n const { selectorTabbable: selectorTabbableForCarousel } = this\n .constructor as typeof DDSExpressiveModal;\n return [\n ...Array.from(\n (this.shadowRoot?.querySelectorAll(\n selectorTabbableForCarousel\n ) as NodeListOf<HTMLElement>) || []\n ),\n ...Array.from(\n this.querySelectorAll(\n selectorTabbableForCarousel\n ) as NodeListOf<HTMLElement>\n ),\n ];\n }\n\n /**\n * The formatter for the pagination status. Should be changed upon the locale the UI is rendered with.\n */\n @property({ attribute: false })\n formatStatus = ({ currentPage, pages }) => `${currentPage} / ${pages}`;\n\n /**\n * Number of items per page.\n * If `--dds--carousel--page-size` CSS custom property is set to `<div class=\"bx--carousel__scroll-container\">`\n * or its ancestor (e.g. the host `<dds-carousel>`), this is set automatically from `--dds--carousel--page-size`.\n */\n @property({ type: Number, attribute: 'page-size' })\n get pageSize() {\n const { _pageSize: pageSize, _pageSizeAuto: pageSizeAuto } = this;\n return pageSize ?? pageSizeAuto;\n }\n\n set pageSize(value: number) {\n this._pageSize = value;\n // Don't call `.requestUpdate()` here given we track updates via `_pageSize` and `_pageSizeAuto`\n }\n\n /**\n * The assistive text for the button to go to next page.\n */\n @property({ attribute: 'next-button-text' })\n nextButtonText = 'Next page';\n\n /**\n * The assistive text for the button to go to previous page.\n */\n @property({ attribute: 'prev-button-text' })\n prevButtonText = 'Previous page';\n\n /**\n * The current zero-based index of the left-most card.\n */\n @property({ type: Number })\n start = 0;\n\n connectedCallback() {\n super.connectedCallback();\n this._cleanAndCreateObserverResize({ create: true });\n\n const containingModal = this.closest(\n `${ddsPrefix}-expressive-modal`\n ) as DDSExpressiveModal;\n if (containingModal) {\n containingModal.hasFocusableElements.push(this);\n this.setAttribute('in-modal', '');\n\n setTimeout(() => {\n containingModal.modalBody!.style.overflow = 'hidden';\n containingModal.modalBody!.style.width = 'var(--modal-vw)';\n }, 0);\n }\n }\n\n disconnectedCallback() {\n this._cleanAndCreateObserverResize();\n super.disconnectedCallback();\n }\n\n firstUpdated() {\n this._cleanAndCreateObserverResize({ create: true });\n }\n\n protected updated(changedProperties) {\n if (changedProperties.has('start')) {\n const { _childItems: childItems, start, pageSize } = this;\n\n childItems.forEach((item) => {\n const index = childItems.indexOf(item);\n if (index < start || index > start + pageSize - 1) {\n item.inert = true;\n } else {\n item.inert = false;\n }\n });\n }\n }\n\n render() {\n const { customPropertyPageSize } = this.constructor as typeof DDSCarousel;\n const {\n nextButtonText,\n pageSize,\n prevButtonText,\n start,\n _contentsBaseWidth: contentsBaseWidth,\n _gap: gap,\n _pageSize: pageSizeExplicit,\n _total: total,\n _handleClickNextButton: handleClickNextButton,\n _handleClickPrevButton: handleClickPrevButton,\n _handleScrollFocus: handleScrollFocus,\n _handleSlotChange: handleSlotChange,\n _handleTouchStartEvent: handleTouchStartEvent,\n _handleTouchEndEvent: handleTouchEndEvent,\n } = this;\n // Copes with the condition where `start % pageSize` is non-zero\n const pagesBefore = Math.ceil(start / pageSize);\n const pagesSince = Math.ceil((total - start) / pageSize);\n // Use another div from the host `<dds-carousel>` to reflect private state\n return html`\n <div\n class=\"${prefix}--carousel__scroll-container\"\n @scroll=\"${handleScrollFocus}\"\n @touchstart=\"${handleTouchStartEvent}\"\n @touchend=\"${handleTouchEndEvent}\"\n style=\"${ifNonNull(\n pageSizeExplicit == null\n ? null\n : `${customPropertyPageSize}: ${pageSizeExplicit}`\n )}\"\n >\n <div\n class=\"${prefix}--carousel__scroll-contents\"\n style=\"left:${(-start * (contentsBaseWidth + gap)) / pageSize}px\"\n >\n <slot @slotchange=\"${handleSlotChange}\"></slot>\n </div>\n </div>\n <div class=\"${prefix}--carousel__navigation\">\n <button\n part=\"prev-button\"\n class=\"${prefix}--btn ${prefix}--btn--secondary ${prefix}--btn--icon-only ${prefix}--carousel__navigation__btn\"\n ?disabled=\"${pagesBefore === 0}\"\n @click=\"${handleClickPrevButton}\"\n aria-label=\"${ifDefined(prevButtonText)}\"\n title=\"${ifDefined(prevButtonText)}\"\n >\n ${CaretLeft20()}\n </button>\n ${this._renderStatus()}\n <button\n part=\"next-button\"\n class=\"${prefix}--btn ${prefix}--btn--secondary ${prefix}--btn--icon-only ${prefix}--carousel__navigation__btn\"\n ?disabled=\"${pagesSince <= 1}\"\n @click=\"${handleClickNextButton}\"\n aria-label=\"${ifDefined(nextButtonText)}\"\n title=\"${ifDefined(nextButtonText)}\"\n >\n ${CaretRight20()}\n </button>\n </div>\n `;\n }\n\n /**\n * The CSS custom property name for the live page size.\n * If the CSS custom property is set to `<div class=\"bx--carousel__scroll-container\">`\n * or its ancestor (e.g. the host `<dds-carousel>`), this is set automatically from the CSS custom property.\n */\n static get customPropertyPageSize() {\n return `--${ddsPrefix}--carousel--page-size`;\n }\n\n /**\n * The name of the custom event fired when the video title is updated\n */\n static get eventVideoTitleUpdated() {\n return `${ddsPrefix}-card-cta-video-title-updated`;\n }\n\n /**\n * The selector for the card component\n */\n static get selectorItem() {\n return `${ddsPrefix}-card`;\n }\n\n /**\n * The selector for the card cta\n */\n static get selectorItemCardCTA() {\n return `${ddsPrefix}-card-cta`;\n }\n\n /**\n * The selector for the video cta container\n */\n static get selectorItemVideoCTAContainer() {\n return `${ddsPrefix}-video-cta-container`;\n }\n\n /**\n * A selector that will return the card item's eyebrow\n */\n static get selectorItemEyebrow() {\n return `${ddsPrefix}-card-eyebrow`;\n }\n\n /**\n * A selector that will return the card item's tag group\n */\n static get selectorItemTagGroup() {\n return `${ddsPrefix}-tag-group`;\n }\n\n /**\n * A selector that will return the card item's tag group\n */\n static get selectorItemParagraph() {\n return `p`;\n }\n\n /**\n * A selector that will return the card item's heading\n */\n static get selectorItemHeading() {\n return `${ddsPrefix}-card-heading`;\n }\n\n /**\n * A selector that will return the card item's footer\n */\n static get selectorItemFooter() {\n return `${ddsPrefix}-card-cta-footer`;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}--carousel`;\n }\n\n /**\n * A selector selecting tabbable nodes.\n */\n static get selectorTabbable() {\n return `\n ${selectorTabbable}\n `;\n }\n\n static styles = styles;\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSCarousel;\n"]}
@@ -16,12 +16,12 @@ import { ifDefined } from 'lit-html/directives/if-defined.js';
16
16
  import { html, property, state, query, customElement, LitElement } from 'lit-element';
17
17
  import 'wicg-inert';
18
18
  import settings from 'carbon-components/es/globals/js/settings.js';
19
- import ifNonNull from '@carbon/carbon-web-components/es/globals/directives/if-non-null.js';
20
- import CaretLeft20 from '@carbon/carbon-web-components/es/icons/caret--left/20.js';
21
- import CaretRight20 from '@carbon/carbon-web-components/es/icons/caret--right/20.js';
22
- import HostListener from '@carbon/carbon-web-components/es/globals/decorators/host-listener.js';
23
- import HostListenerMixin from '@carbon/carbon-web-components/es/globals/mixins/host-listener.js';
24
- import { selectorTabbable as _selectorTabbable } from '@carbon/carbon-web-components/es/globals/settings.js';
19
+ import ifNonNull from '@carbon/web-components/es/globals/directives/if-non-null.js';
20
+ import CaretLeft20 from '@carbon/web-components/es/icons/caret--left/20.js';
21
+ import CaretRight20 from '@carbon/web-components/es/icons/caret--right/20.js';
22
+ import HostListener from '@carbon/web-components/es/globals/decorators/host-listener.js';
23
+ import HostListenerMixin from '@carbon/web-components/es/globals/mixins/host-listener.js';
24
+ import { selectorTabbable as _selectorTabbable } from '@carbon/web-components/es/globals/settings.js';
25
25
  import ddsSettings from "../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings.js";
26
26
  import sameHeight from "../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/sameHeight/sameHeight.js";
27
27
  import styles from "././carousel.css.js";
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.js","names":["ifDefined","html","property","state","query","customElement","LitElement","settings","ifNonNull","CaretLeft20","CaretRight20","HostListener","HostListenerMixin","selectorTabbable","ddsSettings","sameHeight","styles","StableSelectorMixin","prefix","stablePrefix","ddsPrefix","MAX_GESTURE_DURATION","MIN_DISTANCE_TRAVELLED","headingBottomMargin","DDSCarousel","create","_contentsNode","contentsNode","_observerResizeContainer","disconnect","_observerResizeRoot","ResizeObserver","_observeResizeRoot","observe","ownerDocument","documentElement","_observeResizeContainer","target","scrollTo","containsCurrent","contains","currentItemIndex","Array","from","children","forEach","carouselItem","index","start","pageSize","nextStart","Math","floor","pageOffset","event","_setSameHeight","_total","total","min","max","_startPos","touches","clientX","_startTime","Date","getTime","distTravelled","changedTouches","elapsedTime","abs","slot","name","assignedNodes","filter","node","nodeType","Node","ELEMENT_NODE","length","_updateGap","_childItems","HTMLElement","elem","matches","undefined","constructor","selectorItem","selectorItemVideoCTAContainer","e","_childItemEyebrows","push","querySelector","selectorItemEyebrow","_childItemParagraphs","selectorItemParagraph","_childItemTagGroup","selectorItemTagGroup","_childItemHeadings","selectorItemHeading","selectorItemCardCTA","shadowRoot","heading","_childItemFooters","selectorItemFooter","records","contentRect","width","contentsBaseWidth","_contentsBaseWidth","customPropertyPageSize","defaultView","w","_pageSizeAuto","Number","getComputedStyle","getPropertyValue","formatStatus","pagesBefore","ceil","pagesSince","currentPage","pages","item","tagGroupHeight","groupHeight","offsetHeight","nextElementSibling","style","marginBottom","_slotNode","slotNode","elems","_gap","scrollWidth","reduce","acc","offsetWidth","selectorTabbableForCarousel","querySelectorAll","attribute","type","_pageSize","pageSizeAuto","value","_cleanAndCreateObserverResize","containingModal","closest","hasFocusableElements","setAttribute","setTimeout","modalBody","overflow","changedProperties","has","childItems","indexOf","inert","nextButtonText","prevButtonText","gap","pageSizeExplicit","_handleClickNextButton","handleClickNextButton","_handleClickPrevButton","handleClickPrevButton","_handleScrollFocus","handleScrollFocus","_handleSlotChange","handleSlotChange","_handleTouchStartEvent","handleTouchStartEvent","_handleTouchEndEvent","handleTouchEndEvent","_renderStatus"],"sources":["components/carousel/carousel.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { ifDefined } from 'lit-html/directives/if-defined.js';\nimport {\n html,\n property,\n state,\n query,\n customElement,\n LitElement,\n} from 'lit-element';\nimport 'wicg-inert';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport ifNonNull from '@carbon/carbon-web-components/es/globals/directives/if-non-null.js';\nimport CaretLeft20 from '@carbon/carbon-web-components/es/icons/caret--left/20.js';\nimport CaretRight20 from '@carbon/carbon-web-components/es/icons/caret--right/20.js';\nimport HostListener from '@carbon/carbon-web-components/es/globals/decorators/host-listener.js';\nimport HostListenerMixin from '@carbon/carbon-web-components/es/globals/mixins/host-listener.js';\nimport { selectorTabbable } from '@carbon/carbon-web-components/es/globals/settings.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport sameHeight from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/sameHeight/sameHeight';\nimport styles from './carousel.scss';\nimport StableSelectorMixin from '../../globals/mixins/stable-selector';\nimport DDSExpressiveModal from '../expressive-modal/expressive-modal';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\nconst MAX_GESTURE_DURATION = 300; // max time allowed to do swipe\nconst MIN_DISTANCE_TRAVELLED = 75; // min distance traveled to be considered swipe\nconst headingBottomMargin = 64; // tag constants used for same height calculations\n\n/**\n * Carousel.\n *\n * @element dds-carousel\n * @csspart prev-button The button to go to the previous page.\n * @csspart next-button The button to go to the next page.\n */\n@customElement(`${ddsPrefix}-carousel`)\nclass DDSCarousel extends HostListenerMixin(StableSelectorMixin(LitElement)) {\n /**\n * The scrolling contents node.\n */\n @query(`.${prefix}--carousel__scroll-contents`)\n private _contentsNode?: HTMLElement;\n\n /**\n * The width of the scroll contents area node, excluding one of overflowed contents.\n */\n @state()\n private _contentsBaseWidth = 0;\n\n /**\n * The gap width between each card.\n */\n @state()\n private _gap = 0;\n\n /**\n * Array to hold the card-heading elements within child items.\n */\n private _childItems: any[] = [];\n\n /**\n * Array to hold the card-heading elements within child items.\n */\n private _childItemHeadings: any[] = [];\n\n /**\n * Array to hold the card-eyebrow elements within child items.\n */\n private _childItemEyebrows: any[] = [];\n\n /**\n * Array to hold the tag-group elements within child items.\n */\n private _childItemTagGroup: any[] = [];\n\n /**\n * Array to hold the paragraph elements within child items.\n */\n private _childItemParagraphs: any[] = [];\n\n /**\n * Array to hold the card-cta-footer elements within child items.\n */\n private _childItemFooters: any[] = [];\n\n /**\n * The observer for the resize of the scroll container.\n */\n private _observerResizeContainer: any | null = null; // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n\n /**\n * The observer for the resize of the viewport.\n */\n private _observerResizeRoot: any | null = null; // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n\n /**\n * The page size that is explicitly set.\n */\n @state()\n private _pageSize?: number;\n\n /**\n * The page size that is automatically calculated upon viewport size\n * via `--dds--carousel--page-size` CSS custom property.\n * If `page-size` attribute is set, this value is ignored.\n */\n @state()\n private _pageSizeAuto = 1;\n\n /**\n * The default slot.\n */\n @query('slot:not([name])')\n private _slotNode?: HTMLSlotElement;\n\n /**\n * The number of total items.\n */\n @state()\n private _total = 0;\n\n /**\n * Initial touch position (used to detect swipe gesture)\n */\n @state()\n private _startPos = 0;\n\n /**\n * Initial touch time (used to detect swipe gesture)\n */\n @state()\n private _startTime = 0;\n\n /**\n * Cleans-up and creats the resize observer for the scrolling container.\n *\n * @param [options] The options.\n * @param [options.create] `true` to create the new resize observer.\n */\n private _cleanAndCreateObserverResize({ create }: { create?: boolean } = {}) {\n const { _contentsNode: contentsNode } = this;\n if (contentsNode) {\n if (this._observerResizeContainer) {\n this._observerResizeContainer.disconnect();\n this._observerResizeContainer = null;\n }\n if (this._observerResizeRoot) {\n this._observerResizeRoot.disconnect();\n this._observerResizeRoot = null;\n }\n if (create) {\n // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n // @ts-ignore\n this._observerResizeRoot = new ResizeObserver(this._observeResizeRoot);\n this._observerResizeRoot.observe(this.ownerDocument!.documentElement);\n // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n // @ts-ignore\n this._observerResizeContainer = new ResizeObserver(\n this._observeResizeContainer\n );\n this._observerResizeContainer.observe(contentsNode);\n }\n }\n }\n\n /**\n * Stops the container from scrolling when focusing on a card outside of the viewport.\n *\n * @param event The event.\n */\n // eslint-disable-next-line class-methods-use-this\n private _handleScrollFocus({ target }: Event) {\n (target as HTMLElement).scrollTo(0, 0);\n }\n\n /**\n * Handles card focus throughout pages.\n *\n * @param event The event.\n */\n @HostListener('shadowRoot:focusin')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleFocus = async ({ target }: FocusEvent) => {\n const containsCurrent =\n target !== this && this.contains(target as HTMLElement);\n let currentItemIndex = 0;\n Array.from(this.children).forEach((carouselItem, index) => {\n if (carouselItem.contains(target as HTMLElement)) {\n currentItemIndex = index;\n }\n });\n\n // Calculates proper page to display if focus is outside the current page\n if (\n containsCurrent &&\n (currentItemIndex < this.start ||\n currentItemIndex >= this.start + this.pageSize)\n ) {\n // The `currentIndex` floored by `pageSize`\n const nextStart =\n Math.floor(currentItemIndex / this.pageSize) * this.pageSize;\n const pageOffset = this.start % this.pageSize;\n\n // Ensures the page moves by `this.pageSize` in either direction\n this.start = nextStart + pageOffset;\n }\n };\n\n /**\n * Handles card with video heading and applies the set same height function.\n *\n * @param event The event.\n */\n @HostListener(`document:eventVideoTitleUpdated`)\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleVideoTitleUpdate = async (event: FocusEvent) => {\n if (event) {\n this._setSameHeight();\n }\n };\n\n /**\n * Handles `click` event on the next button.\n */\n private _handleClickNextButton() {\n const { pageSize, start, _total: total } = this;\n this.start = Math.min(start + pageSize, total - 1);\n }\n\n /**\n * Handles `click` event on the prev button.\n */\n private _handleClickPrevButton() {\n const { pageSize, start } = this;\n this.start = Math.max(start - pageSize, 0);\n }\n\n /**\n * Handles `touchstart` event.\n */\n private _handleTouchStartEvent(event: TouchEvent) {\n this._startPos = event.touches[0].clientX;\n this._startTime = new Date().getTime();\n }\n\n /**\n * Handles `touchend` event.\n */\n private _handleTouchEndEvent(event: TouchEvent) {\n const { _startPos, _startTime } = this;\n const { pageSize, start, _total: total } = this;\n\n const distTravelled = event.changedTouches[0].clientX - _startPos; // distance travelled\n const elapsedTime = new Date().getTime() - _startTime; // elapsed time\n\n if (\n elapsedTime <= MAX_GESTURE_DURATION &&\n Math.abs(distTravelled) >= MIN_DISTANCE_TRAVELLED\n ) {\n if (distTravelled < 0) {\n this.start = Math.min(start + pageSize, total - 1);\n } else {\n this.start = Math.max(start - pageSize, 0);\n }\n }\n }\n\n /**\n * Handles `slotchange` event.\n */\n private _handleSlotChange(event: Event) {\n const slot = event.target as HTMLSlotElement;\n const { name } = slot;\n if (!name) {\n this._total = slot\n .assignedNodes()\n .filter((node) => node.nodeType === Node.ELEMENT_NODE).length;\n }\n this._updateGap();\n\n this._childItems = (event.target as HTMLSlotElement)\n .assignedNodes()\n .filter((node) => node instanceof HTMLElement);\n\n // retrieve item heading, eyebrows, and footers to set same height\n if (this._childItems) {\n this._childItems\n .filter((elem) =>\n (elem as HTMLElement).matches !== undefined\n ? (elem as HTMLElement).matches(\n (this.constructor as typeof DDSCarousel).selectorItem\n ) ||\n (elem as HTMLElement).matches(\n (this.constructor as typeof DDSCarousel)\n .selectorItemVideoCTAContainer\n )\n : false\n )\n .forEach((e) => {\n this._childItemEyebrows.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemEyebrow\n )\n );\n this._childItemParagraphs.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemParagraph\n )\n );\n this._childItemTagGroup.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemTagGroup\n )\n );\n this._childItemHeadings.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemHeading\n )\n );\n\n this._childItemHeadings.push(\n (e as HTMLElement)\n .querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemCardCTA\n )\n ?.shadowRoot?.querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemHeading\n )\n );\n\n this._childItemHeadings = this._childItemHeadings.filter(\n (heading) => heading\n );\n\n this._childItemFooters.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemFooter\n )\n );\n });\n }\n }\n\n /**\n * The observer for the resize of the scroll container.\n */\n private _observeResizeContainer = (records) => {\n const { contentRect } = records[records.length - 1];\n const { width: contentsBaseWidth } = contentRect;\n this._contentsBaseWidth = contentsBaseWidth;\n this._updateGap();\n };\n\n /**\n * The observer for the resize of the viewport.\n */\n private _observeResizeRoot = () => {\n const { customPropertyPageSize } = this.constructor as typeof DDSCarousel;\n const { _contentsNode: contentsNode } = this;\n const { defaultView: w } = this.ownerDocument!;\n this._pageSizeAuto = Number(\n w!\n .getComputedStyle(contentsNode!)\n .getPropertyValue(customPropertyPageSize)\n );\n this._setSameHeight();\n };\n\n /**\n * @returns Page status text.\n */\n private _renderStatus() {\n const { start, pageSize, formatStatus, _total: total } = this;\n // Copes with the condition where `start % pageSize` is non-zero\n const pagesBefore = Math.ceil(start / pageSize);\n const pagesSince = Math.ceil((total - start) / pageSize);\n return formatStatus({\n currentPage: Math.ceil(start / pageSize) + 1,\n pages: pagesBefore + pagesSince,\n });\n }\n\n private _setSameHeight = () => {\n // check if items are not null before using sameHeight\n\n sameHeight(\n this._childItemEyebrows.filter((item) => item !== null),\n 'sm'\n );\n sameHeight(\n this._childItemHeadings.filter((item) => item !== null),\n 'sm'\n );\n sameHeight(\n this._childItemParagraphs.filter((item) => item !== null),\n 'sm'\n );\n sameHeight(\n this._childItemFooters.filter((item) => item !== null),\n 'sm'\n );\n\n let tagGroupHeight: number = 0;\n\n // get tallest height of tag groups\n this._childItemTagGroup.forEach((item) => {\n if (item) {\n const groupHeight = (item as HTMLElement).offsetHeight;\n if (groupHeight > tagGroupHeight) {\n tagGroupHeight = groupHeight;\n }\n }\n });\n\n this._childItemHeadings.forEach((e) => {\n // add tag group height to heading to the cards lacking tag group\n if (\n e &&\n !e.nextElementSibling?.matches(\n (this.constructor as typeof DDSCarousel).selectorItemTagGroup\n )\n ) {\n e.style.marginBottom = `${tagGroupHeight + headingBottomMargin}px`;\n }\n });\n };\n\n /**\n * Calculates the width between cards.\n */\n private _updateGap() {\n const { _contentsNode: contentsNode, _slotNode: slotNode } = this;\n const elems = slotNode!\n .assignedNodes()\n .filter((node) => node.nodeType === Node.ELEMENT_NODE);\n this._gap =\n elems.length <= 1\n ? 0\n : (contentsNode!.scrollWidth -\n elems.reduce(\n (acc, elem) => acc + ((elem as HTMLElement).offsetWidth ?? 0),\n 0\n )) /\n (elems.length - 1);\n }\n\n get focusableElements() {\n const { selectorTabbable: selectorTabbableForCarousel } = this\n .constructor as typeof DDSExpressiveModal;\n return [\n ...Array.from(\n (this.shadowRoot?.querySelectorAll(\n selectorTabbableForCarousel\n ) as NodeListOf<HTMLElement>) || []\n ),\n ...Array.from(\n this.querySelectorAll(\n selectorTabbableForCarousel\n ) as NodeListOf<HTMLElement>\n ),\n ];\n }\n\n /**\n * The formatter for the pagination status. Should be changed upon the locale the UI is rendered with.\n */\n @property({ attribute: false })\n formatStatus = ({ currentPage, pages }) => `${currentPage} / ${pages}`;\n\n /**\n * Number of items per page.\n * If `--dds--carousel--page-size` CSS custom property is set to `<div class=\"bx--carousel__scroll-container\">`\n * or its ancestor (e.g. the host `<dds-carousel>`), this is set automatically from `--dds--carousel--page-size`.\n */\n @property({ type: Number, attribute: 'page-size' })\n get pageSize() {\n const { _pageSize: pageSize, _pageSizeAuto: pageSizeAuto } = this;\n return pageSize ?? pageSizeAuto;\n }\n\n set pageSize(value: number) {\n this._pageSize = value;\n // Don't call `.requestUpdate()` here given we track updates via `_pageSize` and `_pageSizeAuto`\n }\n\n /**\n * The assistive text for the button to go to next page.\n */\n @property({ attribute: 'next-button-text' })\n nextButtonText = 'Next page';\n\n /**\n * The assistive text for the button to go to previous page.\n */\n @property({ attribute: 'prev-button-text' })\n prevButtonText = 'Previous page';\n\n /**\n * The current zero-based index of the left-most card.\n */\n @property({ type: Number })\n start = 0;\n\n connectedCallback() {\n super.connectedCallback();\n this._cleanAndCreateObserverResize({ create: true });\n\n const containingModal = this.closest(\n `${ddsPrefix}-expressive-modal`\n ) as DDSExpressiveModal;\n if (containingModal) {\n containingModal.hasFocusableElements.push(this);\n this.setAttribute('in-modal', '');\n\n setTimeout(() => {\n containingModal.modalBody!.style.overflow = 'hidden';\n containingModal.modalBody!.style.width = 'var(--modal-vw)';\n }, 0);\n }\n }\n\n disconnectedCallback() {\n this._cleanAndCreateObserverResize();\n super.disconnectedCallback();\n }\n\n firstUpdated() {\n this._cleanAndCreateObserverResize({ create: true });\n }\n\n protected updated(changedProperties) {\n if (changedProperties.has('start')) {\n const { _childItems: childItems, start, pageSize } = this;\n\n childItems.forEach((item) => {\n const index = childItems.indexOf(item);\n if (index < start || index > start + pageSize - 1) {\n item.inert = true;\n } else {\n item.inert = false;\n }\n });\n }\n }\n\n render() {\n const { customPropertyPageSize } = this.constructor as typeof DDSCarousel;\n const {\n nextButtonText,\n pageSize,\n prevButtonText,\n start,\n _contentsBaseWidth: contentsBaseWidth,\n _gap: gap,\n _pageSize: pageSizeExplicit,\n _total: total,\n _handleClickNextButton: handleClickNextButton,\n _handleClickPrevButton: handleClickPrevButton,\n _handleScrollFocus: handleScrollFocus,\n _handleSlotChange: handleSlotChange,\n _handleTouchStartEvent: handleTouchStartEvent,\n _handleTouchEndEvent: handleTouchEndEvent,\n } = this;\n // Copes with the condition where `start % pageSize` is non-zero\n const pagesBefore = Math.ceil(start / pageSize);\n const pagesSince = Math.ceil((total - start) / pageSize);\n // Use another div from the host `<dds-carousel>` to reflect private state\n return html`\n <div\n class=\"${prefix}--carousel__scroll-container\"\n @scroll=\"${handleScrollFocus}\"\n @touchstart=\"${handleTouchStartEvent}\"\n @touchend=\"${handleTouchEndEvent}\"\n style=\"${ifNonNull(\n pageSizeExplicit == null\n ? null\n : `${customPropertyPageSize}: ${pageSizeExplicit}`\n )}\"\n >\n <div\n class=\"${prefix}--carousel__scroll-contents\"\n style=\"left:${(-start * (contentsBaseWidth + gap)) / pageSize}px\"\n >\n <slot @slotchange=\"${handleSlotChange}\"></slot>\n </div>\n </div>\n <div class=\"${prefix}--carousel__navigation\">\n <button\n part=\"prev-button\"\n class=\"${prefix}--btn ${prefix}--btn--secondary ${prefix}--btn--icon-only ${prefix}--carousel__navigation__btn\"\n ?disabled=\"${pagesBefore === 0}\"\n @click=\"${handleClickPrevButton}\"\n aria-label=\"${ifDefined(prevButtonText)}\"\n title=\"${ifDefined(prevButtonText)}\"\n >\n ${CaretLeft20()}\n </button>\n ${this._renderStatus()}\n <button\n part=\"next-button\"\n class=\"${prefix}--btn ${prefix}--btn--secondary ${prefix}--btn--icon-only ${prefix}--carousel__navigation__btn\"\n ?disabled=\"${pagesSince <= 1}\"\n @click=\"${handleClickNextButton}\"\n aria-label=\"${ifDefined(nextButtonText)}\"\n title=\"${ifDefined(nextButtonText)}\"\n >\n ${CaretRight20()}\n </button>\n </div>\n `;\n }\n\n /**\n * The CSS custom property name for the live page size.\n * If the CSS custom property is set to `<div class=\"bx--carousel__scroll-container\">`\n * or its ancestor (e.g. the host `<dds-carousel>`), this is set automatically from the CSS custom property.\n */\n static get customPropertyPageSize() {\n return `--${ddsPrefix}--carousel--page-size`;\n }\n\n /**\n * The name of the custom event fired when the video title is updated\n */\n static get eventVideoTitleUpdated() {\n return `${ddsPrefix}-card-cta-video-title-updated`;\n }\n\n /**\n * The selector for the card component\n */\n static get selectorItem() {\n return `${ddsPrefix}-card`;\n }\n\n /**\n * The selector for the card cta\n */\n static get selectorItemCardCTA() {\n return `${ddsPrefix}-card-cta`;\n }\n\n /**\n * The selector for the video cta container\n */\n static get selectorItemVideoCTAContainer() {\n return `${ddsPrefix}-video-cta-container`;\n }\n\n /**\n * A selector that will return the card item's eyebrow\n */\n static get selectorItemEyebrow() {\n return `${ddsPrefix}-card-eyebrow`;\n }\n\n /**\n * A selector that will return the card item's tag group\n */\n static get selectorItemTagGroup() {\n return `${ddsPrefix}-tag-group`;\n }\n\n /**\n * A selector that will return the card item's tag group\n */\n static get selectorItemParagraph() {\n return `p`;\n }\n\n /**\n * A selector that will return the card item's heading\n */\n static get selectorItemHeading() {\n return `${ddsPrefix}-card-heading`;\n }\n\n /**\n * A selector that will return the card item's footer\n */\n static get selectorItemFooter() {\n return `${ddsPrefix}-card-cta-footer`;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}--carousel`;\n }\n\n /**\n * A selector selecting tabbable nodes.\n */\n static get selectorTabbable() {\n return `\n ${selectorTabbable}\n `;\n }\n\n static styles = styles;\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSCarousel;\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,QAAQ,mCAAmC;AAC7D,SACEC,IAAI,EACJC,QAAQ,EACRC,KAAK,EACLC,KAAK,EACLC,aAAa,EACbC,UAAU,QACL,aAAa;AACpB,OAAO,YAAY;AACnB,OAAOC,QAAQ,MAAM,6CAA6C;AAClE,OAAOC,SAAS,MAAM,oEAAoE;AAC1F,OAAOC,WAAW,MAAM,0DAA0D;AAClF,OAAOC,YAAY,MAAM,2DAA2D;AACpF,OAAOC,YAAY,MAAM,sEAAsE;AAC/F,OAAOC,iBAAiB,MAAM,kEAAkE;AAChG,SAASC,gBAAgB,IAAhBA,iBAAgB,QAAQ,sDAAsD;AACvF,OAAOC,WAAW,MAAM,kFAA+E;AACvG,OAAOC,UAAU,MAAM,sFAAmF;AAC1G,OAAOC,MAAM,MAAM,qBAAiB;AACpC,OAAOC,mBA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;MAAA;QAAA,OAEeG,MAAM;MAAA;IAAA;EAAA;AAAA,GArpBEJ,iBAAiB,CAACK,mBAAmB,CAACX,UAAU,CAAC,CAAC,GAwpB5E;AACA,eAAekB,WAAW"}
1
+ {"version":3,"file":"carousel.js","names":["ifDefined","html","property","state","query","customElement","LitElement","settings","ifNonNull","CaretLeft20","CaretRight20","HostListener","HostListenerMixin","selectorTabbable","ddsSettings","sameHeight","styles","StableSelectorMixin","prefix","stablePrefix","ddsPrefix","MAX_GESTURE_DURATION","MIN_DISTANCE_TRAVELLED","headingBottomMargin","DDSCarousel","create","_contentsNode","contentsNode","_observerResizeContainer","disconnect","_observerResizeRoot","ResizeObserver","_observeResizeRoot","observe","ownerDocument","documentElement","_observeResizeContainer","target","scrollTo","containsCurrent","contains","currentItemIndex","Array","from","children","forEach","carouselItem","index","start","pageSize","nextStart","Math","floor","pageOffset","event","_setSameHeight","_total","total","min","max","_startPos","touches","clientX","_startTime","Date","getTime","distTravelled","changedTouches","elapsedTime","abs","slot","name","assignedNodes","filter","node","nodeType","Node","ELEMENT_NODE","length","_updateGap","_childItems","HTMLElement","elem","matches","undefined","constructor","selectorItem","selectorItemVideoCTAContainer","e","_childItemEyebrows","push","querySelector","selectorItemEyebrow","_childItemParagraphs","selectorItemParagraph","_childItemTagGroup","selectorItemTagGroup","_childItemHeadings","selectorItemHeading","selectorItemCardCTA","shadowRoot","heading","_childItemFooters","selectorItemFooter","records","contentRect","width","contentsBaseWidth","_contentsBaseWidth","customPropertyPageSize","defaultView","w","_pageSizeAuto","Number","getComputedStyle","getPropertyValue","formatStatus","pagesBefore","ceil","pagesSince","currentPage","pages","item","tagGroupHeight","groupHeight","offsetHeight","nextElementSibling","style","marginBottom","_slotNode","slotNode","elems","_gap","scrollWidth","reduce","acc","offsetWidth","selectorTabbableForCarousel","querySelectorAll","attribute","type","_pageSize","pageSizeAuto","value","_cleanAndCreateObserverResize","containingModal","closest","hasFocusableElements","setAttribute","setTimeout","modalBody","overflow","changedProperties","has","childItems","indexOf","inert","nextButtonText","prevButtonText","gap","pageSizeExplicit","_handleClickNextButton","handleClickNextButton","_handleClickPrevButton","handleClickPrevButton","_handleScrollFocus","handleScrollFocus","_handleSlotChange","handleSlotChange","_handleTouchStartEvent","handleTouchStartEvent","_handleTouchEndEvent","handleTouchEndEvent","_renderStatus"],"sources":["components/carousel/carousel.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { ifDefined } from 'lit-html/directives/if-defined.js';\nimport {\n html,\n property,\n state,\n query,\n customElement,\n LitElement,\n} from 'lit-element';\nimport 'wicg-inert';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport ifNonNull from '@carbon/web-components/es/globals/directives/if-non-null.js';\nimport CaretLeft20 from '@carbon/web-components/es/icons/caret--left/20.js';\nimport CaretRight20 from '@carbon/web-components/es/icons/caret--right/20.js';\nimport HostListener from '@carbon/web-components/es/globals/decorators/host-listener.js';\nimport HostListenerMixin from '@carbon/web-components/es/globals/mixins/host-listener.js';\nimport { selectorTabbable } from '@carbon/web-components/es/globals/settings.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport sameHeight from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/sameHeight/sameHeight';\nimport styles from './carousel.scss';\nimport StableSelectorMixin from '../../globals/mixins/stable-selector';\nimport DDSExpressiveModal from '../expressive-modal/expressive-modal';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\nconst MAX_GESTURE_DURATION = 300; // max time allowed to do swipe\nconst MIN_DISTANCE_TRAVELLED = 75; // min distance traveled to be considered swipe\nconst headingBottomMargin = 64; // tag constants used for same height calculations\n\n/**\n * Carousel.\n *\n * @element dds-carousel\n * @csspart prev-button The button to go to the previous page.\n * @csspart next-button The button to go to the next page.\n */\n@customElement(`${ddsPrefix}-carousel`)\nclass DDSCarousel extends HostListenerMixin(StableSelectorMixin(LitElement)) {\n /**\n * The scrolling contents node.\n */\n @query(`.${prefix}--carousel__scroll-contents`)\n private _contentsNode?: HTMLElement;\n\n /**\n * The width of the scroll contents area node, excluding one of overflowed contents.\n */\n @state()\n private _contentsBaseWidth = 0;\n\n /**\n * The gap width between each card.\n */\n @state()\n private _gap = 0;\n\n /**\n * Array to hold the card-heading elements within child items.\n */\n private _childItems: any[] = [];\n\n /**\n * Array to hold the card-heading elements within child items.\n */\n private _childItemHeadings: any[] = [];\n\n /**\n * Array to hold the card-eyebrow elements within child items.\n */\n private _childItemEyebrows: any[] = [];\n\n /**\n * Array to hold the tag-group elements within child items.\n */\n private _childItemTagGroup: any[] = [];\n\n /**\n * Array to hold the paragraph elements within child items.\n */\n private _childItemParagraphs: any[] = [];\n\n /**\n * Array to hold the card-cta-footer elements within child items.\n */\n private _childItemFooters: any[] = [];\n\n /**\n * The observer for the resize of the scroll container.\n */\n private _observerResizeContainer: any | null = null; // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n\n /**\n * The observer for the resize of the viewport.\n */\n private _observerResizeRoot: any | null = null; // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n\n /**\n * The page size that is explicitly set.\n */\n @state()\n private _pageSize?: number;\n\n /**\n * The page size that is automatically calculated upon viewport size\n * via `--dds--carousel--page-size` CSS custom property.\n * If `page-size` attribute is set, this value is ignored.\n */\n @state()\n private _pageSizeAuto = 1;\n\n /**\n * The default slot.\n */\n @query('slot:not([name])')\n private _slotNode?: HTMLSlotElement;\n\n /**\n * The number of total items.\n */\n @state()\n private _total = 0;\n\n /**\n * Initial touch position (used to detect swipe gesture)\n */\n @state()\n private _startPos = 0;\n\n /**\n * Initial touch time (used to detect swipe gesture)\n */\n @state()\n private _startTime = 0;\n\n /**\n * Cleans-up and creats the resize observer for the scrolling container.\n *\n * @param [options] The options.\n * @param [options.create] `true` to create the new resize observer.\n */\n private _cleanAndCreateObserverResize({ create }: { create?: boolean } = {}) {\n const { _contentsNode: contentsNode } = this;\n if (contentsNode) {\n if (this._observerResizeContainer) {\n this._observerResizeContainer.disconnect();\n this._observerResizeContainer = null;\n }\n if (this._observerResizeRoot) {\n this._observerResizeRoot.disconnect();\n this._observerResizeRoot = null;\n }\n if (create) {\n // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n // @ts-ignore\n this._observerResizeRoot = new ResizeObserver(this._observeResizeRoot);\n this._observerResizeRoot.observe(this.ownerDocument!.documentElement);\n // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n // @ts-ignore\n this._observerResizeContainer = new ResizeObserver(\n this._observeResizeContainer\n );\n this._observerResizeContainer.observe(contentsNode);\n }\n }\n }\n\n /**\n * Stops the container from scrolling when focusing on a card outside of the viewport.\n *\n * @param event The event.\n */\n // eslint-disable-next-line class-methods-use-this\n private _handleScrollFocus({ target }: Event) {\n (target as HTMLElement).scrollTo(0, 0);\n }\n\n /**\n * Handles card focus throughout pages.\n *\n * @param event The event.\n */\n @HostListener('shadowRoot:focusin')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleFocus = async ({ target }: FocusEvent) => {\n const containsCurrent =\n target !== this && this.contains(target as HTMLElement);\n let currentItemIndex = 0;\n Array.from(this.children).forEach((carouselItem, index) => {\n if (carouselItem.contains(target as HTMLElement)) {\n currentItemIndex = index;\n }\n });\n\n // Calculates proper page to display if focus is outside the current page\n if (\n containsCurrent &&\n (currentItemIndex < this.start ||\n currentItemIndex >= this.start + this.pageSize)\n ) {\n // The `currentIndex` floored by `pageSize`\n const nextStart =\n Math.floor(currentItemIndex / this.pageSize) * this.pageSize;\n const pageOffset = this.start % this.pageSize;\n\n // Ensures the page moves by `this.pageSize` in either direction\n this.start = nextStart + pageOffset;\n }\n };\n\n /**\n * Handles card with video heading and applies the set same height function.\n *\n * @param event The event.\n */\n @HostListener(`document:eventVideoTitleUpdated`)\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleVideoTitleUpdate = async (event: FocusEvent) => {\n if (event) {\n this._setSameHeight();\n }\n };\n\n /**\n * Handles `click` event on the next button.\n */\n private _handleClickNextButton() {\n const { pageSize, start, _total: total } = this;\n this.start = Math.min(start + pageSize, total - 1);\n }\n\n /**\n * Handles `click` event on the prev button.\n */\n private _handleClickPrevButton() {\n const { pageSize, start } = this;\n this.start = Math.max(start - pageSize, 0);\n }\n\n /**\n * Handles `touchstart` event.\n */\n private _handleTouchStartEvent(event: TouchEvent) {\n this._startPos = event.touches[0].clientX;\n this._startTime = new Date().getTime();\n }\n\n /**\n * Handles `touchend` event.\n */\n private _handleTouchEndEvent(event: TouchEvent) {\n const { _startPos, _startTime } = this;\n const { pageSize, start, _total: total } = this;\n\n const distTravelled = event.changedTouches[0].clientX - _startPos; // distance travelled\n const elapsedTime = new Date().getTime() - _startTime; // elapsed time\n\n if (\n elapsedTime <= MAX_GESTURE_DURATION &&\n Math.abs(distTravelled) >= MIN_DISTANCE_TRAVELLED\n ) {\n if (distTravelled < 0) {\n this.start = Math.min(start + pageSize, total - 1);\n } else {\n this.start = Math.max(start - pageSize, 0);\n }\n }\n }\n\n /**\n * Handles `slotchange` event.\n */\n private _handleSlotChange(event: Event) {\n const slot = event.target as HTMLSlotElement;\n const { name } = slot;\n if (!name) {\n this._total = slot\n .assignedNodes()\n .filter((node) => node.nodeType === Node.ELEMENT_NODE).length;\n }\n this._updateGap();\n\n this._childItems = (event.target as HTMLSlotElement)\n .assignedNodes()\n .filter((node) => node instanceof HTMLElement);\n\n // retrieve item heading, eyebrows, and footers to set same height\n if (this._childItems) {\n this._childItems\n .filter((elem) =>\n (elem as HTMLElement).matches !== undefined\n ? (elem as HTMLElement).matches(\n (this.constructor as typeof DDSCarousel).selectorItem\n ) ||\n (elem as HTMLElement).matches(\n (this.constructor as typeof DDSCarousel)\n .selectorItemVideoCTAContainer\n )\n : false\n )\n .forEach((e) => {\n this._childItemEyebrows.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemEyebrow\n )\n );\n this._childItemParagraphs.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemParagraph\n )\n );\n this._childItemTagGroup.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemTagGroup\n )\n );\n this._childItemHeadings.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemHeading\n )\n );\n\n this._childItemHeadings.push(\n (e as HTMLElement)\n .querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemCardCTA\n )\n ?.shadowRoot?.querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemHeading\n )\n );\n\n this._childItemHeadings = this._childItemHeadings.filter(\n (heading) => heading\n );\n\n this._childItemFooters.push(\n (e as HTMLElement).querySelector(\n (this.constructor as typeof DDSCarousel).selectorItemFooter\n )\n );\n });\n }\n }\n\n /**\n * The observer for the resize of the scroll container.\n */\n private _observeResizeContainer = (records) => {\n const { contentRect } = records[records.length - 1];\n const { width: contentsBaseWidth } = contentRect;\n this._contentsBaseWidth = contentsBaseWidth;\n this._updateGap();\n };\n\n /**\n * The observer for the resize of the viewport.\n */\n private _observeResizeRoot = () => {\n const { customPropertyPageSize } = this.constructor as typeof DDSCarousel;\n const { _contentsNode: contentsNode } = this;\n const { defaultView: w } = this.ownerDocument!;\n this._pageSizeAuto = Number(\n w!\n .getComputedStyle(contentsNode!)\n .getPropertyValue(customPropertyPageSize)\n );\n this._setSameHeight();\n };\n\n /**\n * @returns Page status text.\n */\n private _renderStatus() {\n const { start, pageSize, formatStatus, _total: total } = this;\n // Copes with the condition where `start % pageSize` is non-zero\n const pagesBefore = Math.ceil(start / pageSize);\n const pagesSince = Math.ceil((total - start) / pageSize);\n return formatStatus({\n currentPage: Math.ceil(start / pageSize) + 1,\n pages: pagesBefore + pagesSince,\n });\n }\n\n private _setSameHeight = () => {\n // check if items are not null before using sameHeight\n\n sameHeight(\n this._childItemEyebrows.filter((item) => item !== null),\n 'sm'\n );\n sameHeight(\n this._childItemHeadings.filter((item) => item !== null),\n 'sm'\n );\n sameHeight(\n this._childItemParagraphs.filter((item) => item !== null),\n 'sm'\n );\n sameHeight(\n this._childItemFooters.filter((item) => item !== null),\n 'sm'\n );\n\n let tagGroupHeight: number = 0;\n\n // get tallest height of tag groups\n this._childItemTagGroup.forEach((item) => {\n if (item) {\n const groupHeight = (item as HTMLElement).offsetHeight;\n if (groupHeight > tagGroupHeight) {\n tagGroupHeight = groupHeight;\n }\n }\n });\n\n this._childItemHeadings.forEach((e) => {\n // add tag group height to heading to the cards lacking tag group\n if (\n e &&\n !e.nextElementSibling?.matches(\n (this.constructor as typeof DDSCarousel).selectorItemTagGroup\n )\n ) {\n e.style.marginBottom = `${tagGroupHeight + headingBottomMargin}px`;\n }\n });\n };\n\n /**\n * Calculates the width between cards.\n */\n private _updateGap() {\n const { _contentsNode: contentsNode, _slotNode: slotNode } = this;\n const elems = slotNode!\n .assignedNodes()\n .filter((node) => node.nodeType === Node.ELEMENT_NODE);\n this._gap =\n elems.length <= 1\n ? 0\n : (contentsNode!.scrollWidth -\n elems.reduce(\n (acc, elem) => acc + ((elem as HTMLElement).offsetWidth ?? 0),\n 0\n )) /\n (elems.length - 1);\n }\n\n get focusableElements() {\n const { selectorTabbable: selectorTabbableForCarousel } = this\n .constructor as typeof DDSExpressiveModal;\n return [\n ...Array.from(\n (this.shadowRoot?.querySelectorAll(\n selectorTabbableForCarousel\n ) as NodeListOf<HTMLElement>) || []\n ),\n ...Array.from(\n this.querySelectorAll(\n selectorTabbableForCarousel\n ) as NodeListOf<HTMLElement>\n ),\n ];\n }\n\n /**\n * The formatter for the pagination status. Should be changed upon the locale the UI is rendered with.\n */\n @property({ attribute: false })\n formatStatus = ({ currentPage, pages }) => `${currentPage} / ${pages}`;\n\n /**\n * Number of items per page.\n * If `--dds--carousel--page-size` CSS custom property is set to `<div class=\"bx--carousel__scroll-container\">`\n * or its ancestor (e.g. the host `<dds-carousel>`), this is set automatically from `--dds--carousel--page-size`.\n */\n @property({ type: Number, attribute: 'page-size' })\n get pageSize() {\n const { _pageSize: pageSize, _pageSizeAuto: pageSizeAuto } = this;\n return pageSize ?? pageSizeAuto;\n }\n\n set pageSize(value: number) {\n this._pageSize = value;\n // Don't call `.requestUpdate()` here given we track updates via `_pageSize` and `_pageSizeAuto`\n }\n\n /**\n * The assistive text for the button to go to next page.\n */\n @property({ attribute: 'next-button-text' })\n nextButtonText = 'Next page';\n\n /**\n * The assistive text for the button to go to previous page.\n */\n @property({ attribute: 'prev-button-text' })\n prevButtonText = 'Previous page';\n\n /**\n * The current zero-based index of the left-most card.\n */\n @property({ type: Number })\n start = 0;\n\n connectedCallback() {\n super.connectedCallback();\n this._cleanAndCreateObserverResize({ create: true });\n\n const containingModal = this.closest(\n `${ddsPrefix}-expressive-modal`\n ) as DDSExpressiveModal;\n if (containingModal) {\n containingModal.hasFocusableElements.push(this);\n this.setAttribute('in-modal', '');\n\n setTimeout(() => {\n containingModal.modalBody!.style.overflow = 'hidden';\n containingModal.modalBody!.style.width = 'var(--modal-vw)';\n }, 0);\n }\n }\n\n disconnectedCallback() {\n this._cleanAndCreateObserverResize();\n super.disconnectedCallback();\n }\n\n firstUpdated() {\n this._cleanAndCreateObserverResize({ create: true });\n }\n\n protected updated(changedProperties) {\n if (changedProperties.has('start')) {\n const { _childItems: childItems, start, pageSize } = this;\n\n childItems.forEach((item) => {\n const index = childItems.indexOf(item);\n if (index < start || index > start + pageSize - 1) {\n item.inert = true;\n } else {\n item.inert = false;\n }\n });\n }\n }\n\n render() {\n const { customPropertyPageSize } = this.constructor as typeof DDSCarousel;\n const {\n nextButtonText,\n pageSize,\n prevButtonText,\n start,\n _contentsBaseWidth: contentsBaseWidth,\n _gap: gap,\n _pageSize: pageSizeExplicit,\n _total: total,\n _handleClickNextButton: handleClickNextButton,\n _handleClickPrevButton: handleClickPrevButton,\n _handleScrollFocus: handleScrollFocus,\n _handleSlotChange: handleSlotChange,\n _handleTouchStartEvent: handleTouchStartEvent,\n _handleTouchEndEvent: handleTouchEndEvent,\n } = this;\n // Copes with the condition where `start % pageSize` is non-zero\n const pagesBefore = Math.ceil(start / pageSize);\n const pagesSince = Math.ceil((total - start) / pageSize);\n // Use another div from the host `<dds-carousel>` to reflect private state\n return html`\n <div\n class=\"${prefix}--carousel__scroll-container\"\n @scroll=\"${handleScrollFocus}\"\n @touchstart=\"${handleTouchStartEvent}\"\n @touchend=\"${handleTouchEndEvent}\"\n style=\"${ifNonNull(\n pageSizeExplicit == null\n ? null\n : `${customPropertyPageSize}: ${pageSizeExplicit}`\n )}\"\n >\n <div\n class=\"${prefix}--carousel__scroll-contents\"\n style=\"left:${(-start * (contentsBaseWidth + gap)) / pageSize}px\"\n >\n <slot @slotchange=\"${handleSlotChange}\"></slot>\n </div>\n </div>\n <div class=\"${prefix}--carousel__navigation\">\n <button\n part=\"prev-button\"\n class=\"${prefix}--btn ${prefix}--btn--secondary ${prefix}--btn--icon-only ${prefix}--carousel__navigation__btn\"\n ?disabled=\"${pagesBefore === 0}\"\n @click=\"${handleClickPrevButton}\"\n aria-label=\"${ifDefined(prevButtonText)}\"\n title=\"${ifDefined(prevButtonText)}\"\n >\n ${CaretLeft20()}\n </button>\n ${this._renderStatus()}\n <button\n part=\"next-button\"\n class=\"${prefix}--btn ${prefix}--btn--secondary ${prefix}--btn--icon-only ${prefix}--carousel__navigation__btn\"\n ?disabled=\"${pagesSince <= 1}\"\n @click=\"${handleClickNextButton}\"\n aria-label=\"${ifDefined(nextButtonText)}\"\n title=\"${ifDefined(nextButtonText)}\"\n >\n ${CaretRight20()}\n </button>\n </div>\n `;\n }\n\n /**\n * The CSS custom property name for the live page size.\n * If the CSS custom property is set to `<div class=\"bx--carousel__scroll-container\">`\n * or its ancestor (e.g. the host `<dds-carousel>`), this is set automatically from the CSS custom property.\n */\n static get customPropertyPageSize() {\n return `--${ddsPrefix}--carousel--page-size`;\n }\n\n /**\n * The name of the custom event fired when the video title is updated\n */\n static get eventVideoTitleUpdated() {\n return `${ddsPrefix}-card-cta-video-title-updated`;\n }\n\n /**\n * The selector for the card component\n */\n static get selectorItem() {\n return `${ddsPrefix}-card`;\n }\n\n /**\n * The selector for the card cta\n */\n static get selectorItemCardCTA() {\n return `${ddsPrefix}-card-cta`;\n }\n\n /**\n * The selector for the video cta container\n */\n static get selectorItemVideoCTAContainer() {\n return `${ddsPrefix}-video-cta-container`;\n }\n\n /**\n * A selector that will return the card item's eyebrow\n */\n static get selectorItemEyebrow() {\n return `${ddsPrefix}-card-eyebrow`;\n }\n\n /**\n * A selector that will return the card item's tag group\n */\n static get selectorItemTagGroup() {\n return `${ddsPrefix}-tag-group`;\n }\n\n /**\n * A selector that will return the card item's tag group\n */\n static get selectorItemParagraph() {\n return `p`;\n }\n\n /**\n * A selector that will return the card item's heading\n */\n static get selectorItemHeading() {\n return `${ddsPrefix}-card-heading`;\n }\n\n /**\n * A selector that will return the card item's footer\n */\n static get selectorItemFooter() {\n return `${ddsPrefix}-card-cta-footer`;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}--carousel`;\n }\n\n /**\n * A selector selecting tabbable nodes.\n */\n static get selectorTabbable() {\n return `\n ${selectorTabbable}\n `;\n }\n\n static styles = styles;\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSCarousel;\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,QAAQ,mCAAmC;AAC7D,SACEC,IAAI,EACJC,QAAQ,EACRC,KAAK,EACLC,KAAK,EACLC,aAAa,EACbC,UAAU,QACL,aAAa;AACpB,OAAO,YAAY;AACnB,OAAOC,QAAQ,MAAM,6CAA6C;AAClE,OAAOC,SAAS,MAAM,6DAA6D;AACnF,OAAOC,WAAW,MAAM,mDAAmD;AAC3E,OAAOC,YAAY,MAAM,oDAAoD;AAC7E,OAAOC,YAAY,MAAM,+DAA+D;AACxF,OAAOC,iB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A,OAED,0BAA4B;QAC1B,OAAQ,GAAEA,SAAU,YAAW;MACjC;;MAEA;AACF;AACA;IAFE;MAAA;MAAA;MAAA;MAAA,OAGA,4BAA8B;QAC5B,OAAQ;AACZ,QAAQP,iBAAiB;AACzB,KAAK;MACH;IAAC;MAAA;MAAA;MAAA;MAAA;QAAA,OAEeG,MAAM;MAAA;IAAA;EAAA;AAAA,GArpBEJ,iBAAiB,CAACK,mBAAmB,CAACX,UAAU,CAAC,CAAC,GAwpB5E;AACA,eAAekB,WAAW"}
@@ -11,7 +11,7 @@ import DDSContentItem from '../content-item/content-item';
11
11
  import { MEDIA_ALIGN } from './defs';
12
12
  declare const DDSContentItemHorizontalMedia_base: {
13
13
  new (...args: any[]): {
14
- _handles: Set<import("@carbon/carbon-web-components/es/globals/internal/handle").default>;
14
+ _handles: Set<import("@carbon/web-components/es/globals/internal/handle").default>;
15
15
  connectedCallback(): void;
16
16
  disconnectedCallback(): void;
17
17
  accessKey: string;
@@ -24,11 +24,7 @@ declare const DDSContentItemHorizontalMedia_base: {
24
24
  innerText: string;
25
25
  lang: string;
26
26
  readonly offsetHeight: number;
27
- readonly offsetLeft: number; /**
28
- * A component to present content in a horizontal orientation with media.
29
- *
30
- * @element dds-content-item-horizontal-media
31
- */
27
+ readonly offsetLeft: number;
32
28
  readonly offsetParent: Element | null;
33
29
  readonly offsetTop: number;
34
30
  readonly offsetWidth: number;
@@ -36,9 +32,7 @@ declare const DDSContentItemHorizontalMedia_base: {
36
32
  spellcheck: boolean;
37
33
  title: string;
38
34
  translate: boolean;
39
- attachInternals(): ElementInternals; /**
40
- * Defines the alignment of the media: `left` or `right`
41
- */
35
+ attachInternals(): ElementInternals;
42
36
  click(): void;
43
37
  addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
44
38
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/content-item-horizontal/content-item-horizontal-media.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAKL,cAAc,EACf,MAAM,aAAa,CAAC;AAMrB,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAG1D,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;;;;;;;;;;;;;;;;qCAOrC;;;;WAIG;;;;;;;;6CAGD;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AATL;;;;GAIG;AACH,cACM,6BAA8B,SAAQ,kCAAiC;IAC3E;;OAEG;IAEH,KAAK,cAAqB;IAE1B;;OAEG;IAEH,YAAY,EAAE,OAAO,CAAkC;IAIvD,OAAO,CAAC,mBAAmB,CAEzB;IAEF;;OAEG;IACH,SAAS,CAAC,cAAc,IAAI,cAAc,GAAG,MAAM,GAAG,IAAI;IAU1D;;OAEG;IACH,SAAS,CAAC,cAAc,IAAI,cAAc,GAAG,MAAM,GAAG,IAAI;IAkB1D,MAAM;IAWN,MAAM,KAAK,cAAc,WAExB;IAED,MAAM,CAAC,MAAM,MAAU;CACxB;AAGD,eAAe,6BAA6B,CAAC","file":"content-item-horizontal-media.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n customElement,\n html,\n state,\n property,\n TemplateResult,\n} from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport { baseFontSize, breakpoints } from '@carbon/layout';\nimport HostListener from '@carbon/carbon-web-components/es/globals/decorators/host-listener.js';\nimport HostListenerMixin from '@carbon/carbon-web-components/es/globals/mixins/host-listener.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport DDSContentItem from '../content-item/content-item';\nimport styles from './content-item-horizontal-media.scss';\n\nimport { MEDIA_ALIGN } from './defs';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\nconst breakpoint = parseFloat(breakpoints.lg.width) * baseFontSize;\n\n/**\n * A component to present content in a horizontal orientation with media.\n *\n * @element dds-content-item-horizontal-media\n */\n@customElement(`${ddsPrefix}-content-item-horizontal-media`)\nclass DDSContentItemHorizontalMedia extends HostListenerMixin(DDSContentItem) {\n /**\n * Defines the alignment of the media: `left` or `right`\n */\n @property({ reflect: true })\n align = MEDIA_ALIGN.RIGHT;\n\n /**\n * Identifies whether the window width is below the breakpoint or not.\n */\n @state()\n _isOneColumn: boolean = window.innerWidth < breakpoint;\n\n @HostListener('window:resize')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleWindowResize = (): void => {\n this._isOneColumn = window.innerWidth < breakpoint;\n };\n\n /**\n * @returns The text column content.\n */\n protected _renderTextCol(): TemplateResult | string | void {\n return html`\n <div class=\"${prefix}--content-item-horizontal__col\">\n <slot name=\"eyebrow\" @slotchange=\"${this._handleSlotChange}\"></slot>\n <slot name=\"heading\"></slot>\n ${this._renderBody()} ${this._renderFooter()}\n </div>\n `;\n }\n\n /**\n * @returns The component content in the appropriate tabbing order.\n */\n protected _renderContent(): TemplateResult | string | void {\n const alignedRight = this._isOneColumn || this.align === MEDIA_ALIGN.RIGHT;\n\n return alignedRight\n ? html`\n ${this._renderTextCol()}\n <div class=\"${prefix}--content-item-horizontal__col\">\n <slot name=\"media\" @slotchange=\"${this._handleSlotChange}\"></slot>\n </div>\n `\n : html`\n <div class=\"${prefix}--content-item-horizontal__col\">\n <slot name=\"media\" @slotchange=\"${this._handleSlotChange}\"></slot>\n </div>\n ${this._renderTextCol()}\n `;\n }\n\n render() {\n return html`\n <div\n class=\"${prefix}--content-item-horizontal__row ${prefix}--content-item-horizontal-media__align-${this\n .align}\"\n >\n ${this._renderContent()}\n </div>\n `;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}--content-item-horizontal-media`;\n }\n\n static styles = styles;\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSContentItemHorizontalMedia;\n"]}
1
+ {"version":3,"sources":["components/content-item-horizontal/content-item-horizontal-media.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAKL,cAAc,EACf,MAAM,aAAa,CAAC;AAMrB,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAG1D,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOrC;;;;GAIG;AACH,cACM,6BAA8B,SAAQ,kCAAiC;IAC3E;;OAEG;IAEH,KAAK,cAAqB;IAE1B;;OAEG;IAEH,YAAY,EAAE,OAAO,CAAkC;IAIvD,OAAO,CAAC,mBAAmB,CAEzB;IAEF;;OAEG;IACH,SAAS,CAAC,cAAc,IAAI,cAAc,GAAG,MAAM,GAAG,IAAI;IAU1D;;OAEG;IACH,SAAS,CAAC,cAAc,IAAI,cAAc,GAAG,MAAM,GAAG,IAAI;IAkB1D,MAAM;IAWN,MAAM,KAAK,cAAc,WAExB;IAED,MAAM,CAAC,MAAM,MAAU;CACxB;AAGD,eAAe,6BAA6B,CAAC","file":"content-item-horizontal-media.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n customElement,\n html,\n state,\n property,\n TemplateResult,\n} from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport { baseFontSize, breakpoints } from '@carbon/layout';\nimport HostListener from '@carbon/web-components/es/globals/decorators/host-listener.js';\nimport HostListenerMixin from '@carbon/web-components/es/globals/mixins/host-listener.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport DDSContentItem from '../content-item/content-item';\nimport styles from './content-item-horizontal-media.scss';\n\nimport { MEDIA_ALIGN } from './defs';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\nconst breakpoint = parseFloat(breakpoints.lg.width) * baseFontSize;\n\n/**\n * A component to present content in a horizontal orientation with media.\n *\n * @element dds-content-item-horizontal-media\n */\n@customElement(`${ddsPrefix}-content-item-horizontal-media`)\nclass DDSContentItemHorizontalMedia extends HostListenerMixin(DDSContentItem) {\n /**\n * Defines the alignment of the media: `left` or `right`\n */\n @property({ reflect: true })\n align = MEDIA_ALIGN.RIGHT;\n\n /**\n * Identifies whether the window width is below the breakpoint or not.\n */\n @state()\n _isOneColumn: boolean = window.innerWidth < breakpoint;\n\n @HostListener('window:resize')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleWindowResize = (): void => {\n this._isOneColumn = window.innerWidth < breakpoint;\n };\n\n /**\n * @returns The text column content.\n */\n protected _renderTextCol(): TemplateResult | string | void {\n return html`\n <div class=\"${prefix}--content-item-horizontal__col\">\n <slot name=\"eyebrow\" @slotchange=\"${this._handleSlotChange}\"></slot>\n <slot name=\"heading\"></slot>\n ${this._renderBody()} ${this._renderFooter()}\n </div>\n `;\n }\n\n /**\n * @returns The component content in the appropriate tabbing order.\n */\n protected _renderContent(): TemplateResult | string | void {\n const alignedRight = this._isOneColumn || this.align === MEDIA_ALIGN.RIGHT;\n\n return alignedRight\n ? html`\n ${this._renderTextCol()}\n <div class=\"${prefix}--content-item-horizontal__col\">\n <slot name=\"media\" @slotchange=\"${this._handleSlotChange}\"></slot>\n </div>\n `\n : html`\n <div class=\"${prefix}--content-item-horizontal__col\">\n <slot name=\"media\" @slotchange=\"${this._handleSlotChange}\"></slot>\n </div>\n ${this._renderTextCol()}\n `;\n }\n\n render() {\n return html`\n <div\n class=\"${prefix}--content-item-horizontal__row ${prefix}--content-item-horizontal-media__align-${this\n .align}\"\n >\n ${this._renderContent()}\n </div>\n `;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}--content-item-horizontal-media`;\n }\n\n static styles = styles;\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSContentItemHorizontalMedia;\n"]}
@@ -16,8 +16,8 @@ let _ = t => t,
16
16
  import { customElement, html, state, property } from 'lit-element';
17
17
  import settings from 'carbon-components/es/globals/js/settings.js';
18
18
  import { baseFontSize, breakpoints } from '@carbon/layout';
19
- import HostListener from '@carbon/carbon-web-components/es/globals/decorators/host-listener.js';
20
- import HostListenerMixin from '@carbon/carbon-web-components/es/globals/mixins/host-listener.js';
19
+ import HostListener from '@carbon/web-components/es/globals/decorators/host-listener.js';
20
+ import HostListenerMixin from '@carbon/web-components/es/globals/mixins/host-listener.js';
21
21
  import ddsSettings from "../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings.js";
22
22
  import DDSContentItem from "../content-item/content-item.js";
23
23
  import styles from "././content-item-horizontal-media.css.js";
@@ -1 +1 @@
1
- {"version":3,"file":"content-item-horizontal-media.js","names":["customElement","html","state","property","settings","baseFontSize","breakpoints","HostListener","HostListenerMixin","ddsSettings","DDSContentItem","styles","MEDIA_ALIGN","prefix","stablePrefix","ddsPrefix","breakpoint","parseFloat","lg","width","DDSContentItemHorizontalMedia","reflect","RIGHT","window","innerWidth","_isOneColumn","_handleSlotChange","_renderBody","_renderFooter","alignedRight","align","_renderTextCol","_renderContent"],"sources":["components/content-item-horizontal/content-item-horizontal-media.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n customElement,\n html,\n state,\n property,\n TemplateResult,\n} from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport { baseFontSize, breakpoints } from '@carbon/layout';\nimport HostListener from '@carbon/carbon-web-components/es/globals/decorators/host-listener.js';\nimport HostListenerMixin from '@carbon/carbon-web-components/es/globals/mixins/host-listener.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport DDSContentItem from '../content-item/content-item';\nimport styles from './content-item-horizontal-media.scss';\n\nimport { MEDIA_ALIGN } from './defs';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\nconst breakpoint = parseFloat(breakpoints.lg.width) * baseFontSize;\n\n/**\n * A component to present content in a horizontal orientation with media.\n *\n * @element dds-content-item-horizontal-media\n */\n@customElement(`${ddsPrefix}-content-item-horizontal-media`)\nclass DDSContentItemHorizontalMedia extends HostListenerMixin(DDSContentItem) {\n /**\n * Defines the alignment of the media: `left` or `right`\n */\n @property({ reflect: true })\n align = MEDIA_ALIGN.RIGHT;\n\n /**\n * Identifies whether the window width is below the breakpoint or not.\n */\n @state()\n _isOneColumn: boolean = window.innerWidth < breakpoint;\n\n @HostListener('window:resize')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleWindowResize = (): void => {\n this._isOneColumn = window.innerWidth < breakpoint;\n };\n\n /**\n * @returns The text column content.\n */\n protected _renderTextCol(): TemplateResult | string | void {\n return html`\n <div class=\"${prefix}--content-item-horizontal__col\">\n <slot name=\"eyebrow\" @slotchange=\"${this._handleSlotChange}\"></slot>\n <slot name=\"heading\"></slot>\n ${this._renderBody()} ${this._renderFooter()}\n </div>\n `;\n }\n\n /**\n * @returns The component content in the appropriate tabbing order.\n */\n protected _renderContent(): TemplateResult | string | void {\n const alignedRight = this._isOneColumn || this.align === MEDIA_ALIGN.RIGHT;\n\n return alignedRight\n ? html`\n ${this._renderTextCol()}\n <div class=\"${prefix}--content-item-horizontal__col\">\n <slot name=\"media\" @slotchange=\"${this._handleSlotChange}\"></slot>\n </div>\n `\n : html`\n <div class=\"${prefix}--content-item-horizontal__col\">\n <slot name=\"media\" @slotchange=\"${this._handleSlotChange}\"></slot>\n </div>\n ${this._renderTextCol()}\n `;\n }\n\n render() {\n return html`\n <div\n class=\"${prefix}--content-item-horizontal__row ${prefix}--content-item-horizontal-media__align-${this\n .align}\"\n >\n ${this._renderContent()}\n </div>\n `;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}--content-item-horizontal-media`;\n }\n\n static styles = styles;\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSContentItemHorizontalMedia;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,aAAa,EACbC,IAAI,EACJC,KAAK,EACLC,QAAQ,QAEH,aAAa;AACpB,OAAOC,QAAQ,MAAM,6CAA6C;AAClE,SAASC,YAAY,EAAEC,WAAW,QAAQ,gBAAgB;AAC1D,OAAOC,YAAY,MAAM,sEAAsE;AAC/F,OAAOC,iBAAiB,MAAM,kEAAkE;AAChG,OAAOC,WAAW,MAAM,kFAA+E;AACvG,OAAOC,cAAc,MAAM,iCAA8B;AACzD,OAAOC,MAAM,MAAM,0CAAsC;AAEzD,SAASC,WAAW,QAAQ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B,WAAW,CAACU,KAAK;QAE1E,OAAOO,YAAY,GACf5B,IAAI,gBAAC;AACb,YAAU,CAAwB;AAClC,wBAAsB,CAAS;AAC/B,8CAA4C,CAAyB;AACrE;AACA,SAAQ,GAJI,IAAI,CAAC8B,cAAc,EAAE,EACTlB,MAAM,EACgB,IAAI,CAACa,iBAAiB,IAG5DzB,IAAI,gBAAC;AACb,wBAAsB,CAAS;AAC/B,8CAA4C,CAAyB;AACrE;AACA,YAAU,CAAwB;AAClC,SAAQ,GAJgBY,MAAM,EACgB,IAAI,CAACa,iBAAiB,EAExD,IAAI,CAACK,cAAc,EAAE,CACxB;MACP;IAAC;MAAA;MAAA;MAAA,OAED,kBAAS;QACP,OAAO9B,IAAI,gBAAC;AAChB;AACA,iBAAe,CAAS,kCAA+B,CAAS,0CAAuC,CACtF;AACjB;AACA,UAAQ,CAAwB;AAChC;AACA,KAAI,GALaY,MAAM,EAAkCA,MAAM,EAA0C,IAAI,CAClGiB,KAAK,EAEN,IAAI,CAACE,cAAc,EAAE;MAG7B;IAAC;MAAA;MAAA;MAAA;MAAA,OAED,0BAA4B;QAC1B,OAAQ,GAAEjB,SAAU,iCAAgC;MACtD;IAAC;MAAA;MAAA;MAAA;MAAA;QAAA,OAEeJ,MAAM;MAAA;IAAA;EAAA;AAAA,GApEoBH,iBAAiB,CAACE,cAAc,CAAC,GAuE7E;AACA,eAAeU,6BAA6B"}
1
+ {"version":3,"file":"content-item-horizontal-media.js","names":["customElement","html","state","property","settings","baseFontSize","breakpoints","HostListener","HostListenerMixin","ddsSettings","DDSContentItem","styles","MEDIA_ALIGN","prefix","stablePrefix","ddsPrefix","breakpoint","parseFloat","lg","width","DDSContentItemHorizontalMedia","reflect","RIGHT","window","innerWidth","_isOneColumn","_handleSlotChange","_renderBody","_renderFooter","alignedRight","align","_renderTextCol","_renderContent"],"sources":["components/content-item-horizontal/content-item-horizontal-media.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n customElement,\n html,\n state,\n property,\n TemplateResult,\n} from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport { baseFontSize, breakpoints } from '@carbon/layout';\nimport HostListener from '@carbon/web-components/es/globals/decorators/host-listener.js';\nimport HostListenerMixin from '@carbon/web-components/es/globals/mixins/host-listener.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport DDSContentItem from '../content-item/content-item';\nimport styles from './content-item-horizontal-media.scss';\n\nimport { MEDIA_ALIGN } from './defs';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\nconst breakpoint = parseFloat(breakpoints.lg.width) * baseFontSize;\n\n/**\n * A component to present content in a horizontal orientation with media.\n *\n * @element dds-content-item-horizontal-media\n */\n@customElement(`${ddsPrefix}-content-item-horizontal-media`)\nclass DDSContentItemHorizontalMedia extends HostListenerMixin(DDSContentItem) {\n /**\n * Defines the alignment of the media: `left` or `right`\n */\n @property({ reflect: true })\n align = MEDIA_ALIGN.RIGHT;\n\n /**\n * Identifies whether the window width is below the breakpoint or not.\n */\n @state()\n _isOneColumn: boolean = window.innerWidth < breakpoint;\n\n @HostListener('window:resize')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleWindowResize = (): void => {\n this._isOneColumn = window.innerWidth < breakpoint;\n };\n\n /**\n * @returns The text column content.\n */\n protected _renderTextCol(): TemplateResult | string | void {\n return html`\n <div class=\"${prefix}--content-item-horizontal__col\">\n <slot name=\"eyebrow\" @slotchange=\"${this._handleSlotChange}\"></slot>\n <slot name=\"heading\"></slot>\n ${this._renderBody()} ${this._renderFooter()}\n </div>\n `;\n }\n\n /**\n * @returns The component content in the appropriate tabbing order.\n */\n protected _renderContent(): TemplateResult | string | void {\n const alignedRight = this._isOneColumn || this.align === MEDIA_ALIGN.RIGHT;\n\n return alignedRight\n ? html`\n ${this._renderTextCol()}\n <div class=\"${prefix}--content-item-horizontal__col\">\n <slot name=\"media\" @slotchange=\"${this._handleSlotChange}\"></slot>\n </div>\n `\n : html`\n <div class=\"${prefix}--content-item-horizontal__col\">\n <slot name=\"media\" @slotchange=\"${this._handleSlotChange}\"></slot>\n </div>\n ${this._renderTextCol()}\n `;\n }\n\n render() {\n return html`\n <div\n class=\"${prefix}--content-item-horizontal__row ${prefix}--content-item-horizontal-media__align-${this\n .align}\"\n >\n ${this._renderContent()}\n </div>\n `;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}--content-item-horizontal-media`;\n }\n\n static styles = styles;\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSContentItemHorizontalMedia;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,aAAa,EACbC,IAAI,EACJC,KAAK,EACLC,QAAQ,QAEH,aAAa;AACpB,OAAOC,QAAQ,MAAM,6CAA6C;AAClE,SAASC,YAAY,EAAEC,WAAW,QAAQ,gBAAgB;AAC1D,OAAOC,YAAY,MAAM,+DAA+D;AACxF,OAAOC,iBAAiB,MAAM,2DAA2D;AACzF,OAAOC,WAAW,MAAM,kFAA+E;AACvG,OAAOC,cAAc,MAAM,iCAA8B;AACzD,OAAOC,MAAM,MAAM,0CAAsC;AAEzD,SAASC,WAAW,QAAQ,WAAQ;AAEpC,MAAM;EAAEC;AAAO,CAAC,GAAGT,QAAQ;AAC3B,MAAM;EAAEU,YAAY,EAAEC;AAAU,CAAC,GAAGN,WAAW;AAE/C,MAAMO,UAAU,GAAGC,UAAU,CAACX,WAAW,CAACY,EAAE,CAACC,KAAK,CAAC,GAAGd,YAAY;;AAElE;AACA;AACA;AACA;AACA;AAJA,IAMMe,6BAA6B,cADlCpB,aAAa,CAAE,GAAEe,SAAU,gCAA+B,CAAC;EAA5D,MACMK,6BAA6B,4BAA2C;IAAA;MAAA;MAAA;IA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKpB;;;;GAIG;AACH,cACM,UAAW,SAAQ,eAAgC;IACvD,SAAS,CAAC,cAAc;IA0BxB,SAAS,CAAC,YAAY;IA0BtB;;OAEG;IAEH,OAAO,WAAoB;IAE3B;;;OAGG;IAEH,kBAAkB,MAAsB;IAExC;;;OAGG;IAEH,mBAAmB,CAAC,EAAE,OAAO,mBAAmB,CAAC;IAEjD;;OAEG;IAEH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IAEH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IAEH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IAEH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IAEH,SAAS,CAAC,EAAE,EAAE,CAAC;IAEf;;OAEG;IAEH,QAAQ,UAAS;IAEjB,OAAO,CAAC,iBAAiB,KAAA;IAoDzB,MAAM,KAAK,cAAc,WAExB;IAED;;OAEG;IACH,MAAM,KAAK,sBAAsB,WAEhC;IAED;;OAEG;IACH,MAAM,KAAK,cAAc,WAExB;IAED,MAAM,CAAC,MAAM,MAAU;CACxB;AAGD,eAAe,UAAU,CAAC","file":"card-cta.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, property, customElement } from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport ddsSettings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';\nimport ifNonNull from '@carbon/carbon-web-components/es/globals/directives/if-non-null.js';\nimport PlayVideo from '@carbon/ibmdotcom-styles/icons/svg/play-video.svg';\nimport {\n formatVideoCaption,\n formatVideoDuration,\n} from '@carbon/ibmdotcom-utilities/es/utilities/formatVideoCaption/formatVideoCaption.js';\nimport KalturaPlayerAPI from '@carbon/ibmdotcom-services/es/services/KalturaPlayer/KalturaPlayer';\nimport DDSCard from '../card/card';\nimport '../card/card-heading';\nimport './card-cta-image';\nimport CTAMixin from '../../component-mixins/cta/cta';\nimport VideoCTAMixin from '../../component-mixins/cta/video';\nimport DDSCardCTAFooter from './card-cta-footer';\nimport './card-cta-footer';\nimport { CTA_TYPE } from './defs';\nimport styles from './cta.scss';\n\nexport { CTA_TYPE };\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\n/**\n * Card CTA.\n *\n * @element dds-card-cta\n */\n@customElement(`${ddsPrefix}-card-cta`)\nclass DDSCardCTA extends VideoCTAMixin(CTAMixin(DDSCard)) {\n protected _renderHeading() {\n const {\n ctaType,\n videoName,\n formatVideoCaption: formatVideoCaptionInEffect,\n } = this;\n if (ctaType !== CTA_TYPE.VIDEO) {\n return super._renderHeading();\n }\n const caption = formatVideoCaptionInEffect({ name: videoName });\n\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof DDSCardCTA).eventVideoTitleUpdated,\n {\n bubbles: true,\n composed: true,\n }\n )\n );\n return html`\n <slot name=\"heading\"></slot\n ><dds-card-heading>${caption}</dds-card-heading>\n `;\n }\n\n protected _renderImage() {\n const {\n ctaType,\n videoName,\n videoThumbnailUrl,\n thumbnail,\n _hasImage: hasImage,\n noPoster,\n } = this;\n const image =\n hasImage || ctaType !== CTA_TYPE.VIDEO || noPoster\n ? undefined\n : html`\n <dds-card-cta-image\n class=\"${prefix}--card__video-thumbnail\"\n alt=\"${ifNonNull(videoName)}\"\n default-src=\"${ifNonNull(thumbnail || videoThumbnailUrl)}\"\n >\n ${PlayVideo({ slot: 'icon' })}\n </dds-card-cta-image>\n `;\n return html`\n <slot name=\"image\" @slotchange=\"${this._handleSlotChange}\"></slot>${image}\n `;\n }\n\n /**\n * The CTA type.\n */\n @property({ reflect: true, attribute: 'cta-type' })\n ctaType = CTA_TYPE.REGULAR;\n\n /**\n * The formatter for the video caption, composed with the video name and the video duration.\n * Should be changed upon the locale the UI is rendered with.\n */\n @property({ attribute: false })\n formatVideoCaption = formatVideoCaption;\n\n /**\n * The formatter for the video duration.\n * Should be changed upon the locale the UI is rendered with.\n */\n @property({ attribute: false })\n formatVideoDuration?: typeof formatVideoDuration;\n\n /**\n * The video duration.\n */\n @property({ type: Number, attribute: 'video-duration' })\n videoDuration?: number;\n\n /**\n * The video name.\n */\n @property({ attribute: 'video-name' })\n videoName?: string;\n\n /**\n * The custom video description.\n */\n @property({ attribute: 'video-description' })\n videoDescription?: string;\n\n /**\n * The video thumbnail URL.\n */\n @property({ attribute: 'video-thumbnail-url' })\n videoThumbnailUrl?: string;\n\n /**\n * Optional custom video thumbnail\n */\n @property({ reflect: true, attribute: 'thumbnail' })\n thumbnail?: '';\n\n /**\n * Set `true` if Poster Video Image should not be shown.\n */\n @property({ type: Boolean, reflect: true, attribute: 'no-poster' })\n noPoster = false;\n\n updated(changedProperties) {\n super.updated(changedProperties);\n const footer = this.querySelector(\n (this.constructor as typeof DDSCardCTA).selectorFooter\n );\n if (\n changedProperties.has('ctaType') ||\n changedProperties.has('formatCaption') ||\n changedProperties.has('formatDuration') ||\n changedProperties.has('videoDuration') ||\n changedProperties.has('videoName')\n ) {\n const {\n ctaType,\n videoDuration,\n videoName,\n videoDescription,\n formatVideoCaption: formatVideoCaptionInEffect,\n formatVideoDuration: formatVideoDurationInEffect,\n } = this;\n const headingText = this.querySelector(\n `${ddsPrefix}-card-heading`\n )?.textContent;\n const copyText = this.textContent;\n if (footer) {\n const ariaTitle = videoName || headingText || copyText;\n let ariaDuration = '';\n if (videoDuration !== undefined) {\n ariaDuration = `, DURATION ${KalturaPlayerAPI.getMediaDurationFormatted(\n videoDuration,\n false\n )}`;\n }\n (\n footer as DDSCardCTAFooter\n ).altAriaLabel = `${ariaTitle}${ariaDuration}`;\n (footer as DDSCardCTAFooter).ctaType = ctaType;\n (footer as DDSCardCTAFooter).videoDuration = videoDuration;\n (footer as DDSCardCTAFooter).videoName = videoName;\n (footer as DDSCardCTAFooter).videoDescription = videoDescription;\n if (formatVideoCaptionInEffect) {\n (footer as DDSCardCTAFooter).formatVideoCaption =\n formatVideoCaptionInEffect;\n }\n if (formatVideoDurationInEffect) {\n (footer as DDSCardCTAFooter).formatVideoDuration =\n formatVideoDurationInEffect;\n }\n }\n }\n }\n\n static get stableSelector() {\n return `${ddsPrefix}--card-cta`;\n }\n\n /**\n * The name of the custom event fired when the video title is updated\n */\n static get eventVideoTitleUpdated() {\n return `${ddsPrefix}-card-cta-video-title-updated`;\n }\n\n /**\n * A selector that will return the child footer.\n */\n static get selectorFooter() {\n return `${ddsPrefix}-card-cta-footer`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSCardCTA;\n"]}
1
+ {"version":3,"sources":["components/cta/card-cta.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,EAEL,mBAAmB,EACpB,MAAM,mFAAmF,CAAC;AAE3F,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,kBAAkB,CAAC;AAI1B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGlC,OAAO,EAAE,QAAQ,EAAE,CAAC;;;;;;;;;;;;;;;;;;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IAEf;;OAEG;IAEH,QAAQ,UAAS;IAEjB,OAAO,CAAC,iBAAiB,KAAA;IAoDzB,MAAM,KAAK,cAAc,WAExB;IAED;;OAEG;IACH,MAAM,KAAK,sBAAsB,WAEhC;IAED;;OAEG;IACH,MAAM,KAAK,cAAc,WAExB;IAED,MAAM,CAAC,MAAM,MAAU;CACxB;AAGD,eAAe,UAAU,CAAC","file":"card-cta.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, property, customElement } from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport ddsSettings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';\nimport ifNonNull from '@carbon/web-components/es/globals/directives/if-non-null.js';\nimport PlayVideo from '@carbon/ibmdotcom-styles/icons/svg/play-video.svg';\nimport {\n formatVideoCaption,\n formatVideoDuration,\n} from '@carbon/ibmdotcom-utilities/es/utilities/formatVideoCaption/formatVideoCaption.js';\nimport KalturaPlayerAPI from '@carbon/ibmdotcom-services/es/services/KalturaPlayer/KalturaPlayer';\nimport DDSCard from '../card/card';\nimport '../card/card-heading';\nimport './card-cta-image';\nimport CTAMixin from '../../component-mixins/cta/cta';\nimport VideoCTAMixin from '../../component-mixins/cta/video';\nimport DDSCardCTAFooter from './card-cta-footer';\nimport './card-cta-footer';\nimport { CTA_TYPE } from './defs';\nimport styles from './cta.scss';\n\nexport { CTA_TYPE };\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\n/**\n * Card CTA.\n *\n * @element dds-card-cta\n */\n@customElement(`${ddsPrefix}-card-cta`)\nclass DDSCardCTA extends VideoCTAMixin(CTAMixin(DDSCard)) {\n protected _renderHeading() {\n const {\n ctaType,\n videoName,\n formatVideoCaption: formatVideoCaptionInEffect,\n } = this;\n if (ctaType !== CTA_TYPE.VIDEO) {\n return super._renderHeading();\n }\n const caption = formatVideoCaptionInEffect({ name: videoName });\n\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof DDSCardCTA).eventVideoTitleUpdated,\n {\n bubbles: true,\n composed: true,\n }\n )\n );\n return html`\n <slot name=\"heading\"></slot\n ><dds-card-heading>${caption}</dds-card-heading>\n `;\n }\n\n protected _renderImage() {\n const {\n ctaType,\n videoName,\n videoThumbnailUrl,\n thumbnail,\n _hasImage: hasImage,\n noPoster,\n } = this;\n const image =\n hasImage || ctaType !== CTA_TYPE.VIDEO || noPoster\n ? undefined\n : html`\n <dds-card-cta-image\n class=\"${prefix}--card__video-thumbnail\"\n alt=\"${ifNonNull(videoName)}\"\n default-src=\"${ifNonNull(thumbnail || videoThumbnailUrl)}\"\n >\n ${PlayVideo({ slot: 'icon' })}\n </dds-card-cta-image>\n `;\n return html`\n <slot name=\"image\" @slotchange=\"${this._handleSlotChange}\"></slot>${image}\n `;\n }\n\n /**\n * The CTA type.\n */\n @property({ reflect: true, attribute: 'cta-type' })\n ctaType = CTA_TYPE.REGULAR;\n\n /**\n * The formatter for the video caption, composed with the video name and the video duration.\n * Should be changed upon the locale the UI is rendered with.\n */\n @property({ attribute: false })\n formatVideoCaption = formatVideoCaption;\n\n /**\n * The formatter for the video duration.\n * Should be changed upon the locale the UI is rendered with.\n */\n @property({ attribute: false })\n formatVideoDuration?: typeof formatVideoDuration;\n\n /**\n * The video duration.\n */\n @property({ type: Number, attribute: 'video-duration' })\n videoDuration?: number;\n\n /**\n * The video name.\n */\n @property({ attribute: 'video-name' })\n videoName?: string;\n\n /**\n * The custom video description.\n */\n @property({ attribute: 'video-description' })\n videoDescription?: string;\n\n /**\n * The video thumbnail URL.\n */\n @property({ attribute: 'video-thumbnail-url' })\n videoThumbnailUrl?: string;\n\n /**\n * Optional custom video thumbnail\n */\n @property({ reflect: true, attribute: 'thumbnail' })\n thumbnail?: '';\n\n /**\n * Set `true` if Poster Video Image should not be shown.\n */\n @property({ type: Boolean, reflect: true, attribute: 'no-poster' })\n noPoster = false;\n\n updated(changedProperties) {\n super.updated(changedProperties);\n const footer = this.querySelector(\n (this.constructor as typeof DDSCardCTA).selectorFooter\n );\n if (\n changedProperties.has('ctaType') ||\n changedProperties.has('formatCaption') ||\n changedProperties.has('formatDuration') ||\n changedProperties.has('videoDuration') ||\n changedProperties.has('videoName')\n ) {\n const {\n ctaType,\n videoDuration,\n videoName,\n videoDescription,\n formatVideoCaption: formatVideoCaptionInEffect,\n formatVideoDuration: formatVideoDurationInEffect,\n } = this;\n const headingText = this.querySelector(\n `${ddsPrefix}-card-heading`\n )?.textContent;\n const copyText = this.textContent;\n if (footer) {\n const ariaTitle = videoName || headingText || copyText;\n let ariaDuration = '';\n if (videoDuration !== undefined) {\n ariaDuration = `, DURATION ${KalturaPlayerAPI.getMediaDurationFormatted(\n videoDuration,\n false\n )}`;\n }\n (\n footer as DDSCardCTAFooter\n ).altAriaLabel = `${ariaTitle}${ariaDuration}`;\n (footer as DDSCardCTAFooter).ctaType = ctaType;\n (footer as DDSCardCTAFooter).videoDuration = videoDuration;\n (footer as DDSCardCTAFooter).videoName = videoName;\n (footer as DDSCardCTAFooter).videoDescription = videoDescription;\n if (formatVideoCaptionInEffect) {\n (footer as DDSCardCTAFooter).formatVideoCaption =\n formatVideoCaptionInEffect;\n }\n if (formatVideoDurationInEffect) {\n (footer as DDSCardCTAFooter).formatVideoDuration =\n formatVideoDurationInEffect;\n }\n }\n }\n }\n\n static get stableSelector() {\n return `${ddsPrefix}--card-cta`;\n }\n\n /**\n * The name of the custom event fired when the video title is updated\n */\n static get eventVideoTitleUpdated() {\n return `${ddsPrefix}-card-cta-video-title-updated`;\n }\n\n /**\n * A selector that will return the child footer.\n */\n static get selectorFooter() {\n return `${ddsPrefix}-card-cta-footer`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSCardCTA;\n"]}
@@ -17,7 +17,7 @@ let _ = t => t,
17
17
  import { html, property, customElement } from 'lit-element';
18
18
  import settings from 'carbon-components/es/globals/js/settings.js';
19
19
  import ddsSettings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';
20
- import ifNonNull from '@carbon/carbon-web-components/es/globals/directives/if-non-null.js';
20
+ import ifNonNull from '@carbon/web-components/es/globals/directives/if-non-null.js';
21
21
  import PlayVideo from "../../icons/play-video.js";
22
22
  import { formatVideoCaption } from '@carbon/ibmdotcom-utilities/es/utilities/formatVideoCaption/formatVideoCaption.js';
23
23
  import KalturaPlayerAPI from '@carbon/ibmdotcom-services/es/services/KalturaPlayer/KalturaPlayer';