@tet/tet-components 1.4.27-testing → 1.4.28-staging

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 (475) hide show
  1. package/dist/cjs/{address-656e77f6.js → address-f852270f.js} +1 -1
  2. package/dist/cjs/{assets-f64f0e16.js → assets-b9d36649.js} +1 -1
  3. package/dist/cjs/{async-request-fcf33aba.js → async-request-4517f566.js} +1 -1
  4. package/dist/cjs/{http-codes-40da1e61.js → http-codes-062f76cf.js} +1 -1
  5. package/dist/cjs/{index-4b423f33.js → index-19a7608f.js} +1 -1
  6. package/dist/cjs/{index-3242ff3f.js → index-faec4c52.js} +1 -1
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/{phone-055efd07.js → phone-d6be0dd2.js} +2 -2
  9. package/dist/cjs/{product-comparison-88a89820.js → product-comparison-aa80a77c.js} +1 -1
  10. package/dist/cjs/tet-accordion.cjs.entry.js +1 -1
  11. package/dist/cjs/tet-address-offers-filters-products_2.cjs.entry.js +3 -3
  12. package/dist/cjs/tet-address-offers-view.cjs.entry.js +3 -3
  13. package/dist/cjs/tet-address-offers_4.cjs.entry.js +7 -7
  14. package/dist/cjs/tet-address-search.cjs.entry.js +4 -4
  15. package/dist/cjs/tet-asset-addresses.cjs.entry.js +3 -3
  16. package/dist/cjs/tet-autocomplete-dropdown.cjs.entry.js +1 -1
  17. package/dist/cjs/tet-autocomplete.cjs.entry.js +1 -1
  18. package/dist/cjs/tet-b2b-check-out-form_5.cjs.entry.js +3 -3
  19. package/dist/cjs/tet-b2b-configurator.cjs.entry.js +4 -4
  20. package/dist/cjs/tet-b2b-service-calculator.cjs.entry.js +3 -3
  21. package/dist/cjs/tet-banner-nav.cjs.entry.js +3 -3
  22. package/dist/cjs/tet-bar-graph.cjs.entry.js +1 -1
  23. package/dist/cjs/tet-border-radius.cjs.entry.js +1 -1
  24. package/dist/cjs/tet-business-card.cjs.entry.js +1 -1
  25. package/dist/cjs/tet-business-compare-card.cjs.entry.js +1 -1
  26. package/dist/cjs/tet-business-lines.cjs.entry.js +4 -4
  27. package/dist/cjs/tet-business-round-stepper.cjs.entry.js +1 -1
  28. package/dist/cjs/tet-button.cjs.entry.js +1 -1
  29. package/dist/cjs/tet-card-list.cjs.entry.js +1 -1
  30. package/dist/cjs/tet-carousel.cjs.entry.js +492 -165
  31. package/dist/cjs/tet-checkbox.cjs.entry.js +1 -1
  32. package/dist/cjs/tet-cloud-application-form-dialog.cjs.entry.js +3 -3
  33. package/dist/cjs/tet-cloud-configurator.cjs.entry.js +3 -3
  34. package/dist/cjs/tet-colors.cjs.entry.js +1 -1
  35. package/dist/cjs/tet-compare-card-v2.cjs.entry.js +3 -3
  36. package/dist/cjs/tet-compare-cards-tab.cjs.entry.js +3 -3
  37. package/dist/cjs/tet-compare-cards_2.cjs.entry.js +3 -3
  38. package/dist/cjs/tet-components.cjs.js +2 -2
  39. package/dist/cjs/tet-contact-form.cjs.entry.js +5 -5
  40. package/dist/cjs/tet-contact-info.cjs.entry.js +1 -1
  41. package/dist/cjs/tet-container_2.cjs.entry.js +1 -1
  42. package/dist/cjs/tet-counter.cjs.entry.js +1 -1
  43. package/dist/cjs/tet-customer-assets.cjs.entry.js +3 -3
  44. package/dist/cjs/tet-datepicker-header_4.cjs.entry.js +1 -1
  45. package/dist/cjs/tet-datepicker.cjs.entry.js +1 -1
  46. package/dist/cjs/tet-dialog.cjs.entry.js +3 -3
  47. package/dist/cjs/tet-display.cjs.entry.js +1 -1
  48. package/dist/cjs/tet-divider.cjs.entry.js +1 -1
  49. package/dist/cjs/tet-dropdown_2.cjs.entry.js +1 -1
  50. package/dist/cjs/tet-dynamic-card.cjs.entry.js +1 -1
  51. package/dist/cjs/tet-expandable-input.cjs.entry.js +1 -1
  52. package/dist/cjs/tet-expansion-panel.cjs.entry.js +1 -1
  53. package/dist/cjs/tet-feedback-form.cjs.entry.js +3 -3
  54. package/dist/cjs/tet-filter.cjs.entry.js +1 -1
  55. package/dist/cjs/tet-floating-block.cjs.entry.js +1 -1
  56. package/dist/cjs/tet-font-weight.cjs.entry.js +1 -1
  57. package/dist/cjs/tet-fonts.cjs.entry.js +1 -1
  58. package/dist/cjs/tet-grid.cjs.entry.js +1 -1
  59. package/dist/cjs/tet-icon.cjs.entry.js +2 -2
  60. package/dist/cjs/tet-inline-message.cjs.entry.js +1 -1
  61. package/dist/cjs/tet-input.cjs.entry.js +3 -3
  62. package/dist/cjs/tet-label.cjs.entry.js +3 -3
  63. package/dist/cjs/tet-layout.cjs.entry.js +1 -1
  64. package/dist/cjs/tet-link-card-list.cjs.entry.js +1 -1
  65. package/dist/cjs/tet-link.cjs.entry.js +1 -1
  66. package/dist/cjs/tet-loader.cjs.entry.js +1 -1
  67. package/dist/cjs/tet-macd-view.cjs.entry.js +6 -6
  68. package/dist/cjs/tet-menu-mobile.cjs.entry.js +1 -1
  69. package/dist/cjs/tet-menu.cjs.entry.js +1 -1
  70. package/dist/cjs/tet-multi-step-dialog.cjs.entry.js +3 -3
  71. package/dist/cjs/tet-navigation-mobile.cjs.entry.js +1 -1
  72. package/dist/cjs/tet-news-card-list.cjs.entry.js +1 -1
  73. package/dist/cjs/tet-notification.cjs.entry.js +1 -1
  74. package/dist/cjs/tet-number-input.cjs.entry.js +1 -1
  75. package/dist/cjs/tet-placeholder.cjs.entry.js +1 -1
  76. package/dist/cjs/tet-position.cjs.entry.js +1 -1
  77. package/dist/cjs/tet-price-view.cjs.entry.js +1 -1
  78. package/dist/cjs/tet-radio.cjs.entry.js +1 -1
  79. package/dist/cjs/tet-range-slider.cjs.entry.js +1 -1
  80. package/dist/cjs/tet-referral.cjs.entry.js +5 -5
  81. package/dist/cjs/tet-round-stepper.cjs.entry.js +1 -1
  82. package/dist/cjs/tet-snicker-card-badge.cjs.entry.js +1 -1
  83. package/dist/cjs/tet-spacing.cjs.entry.js +1 -1
  84. package/dist/cjs/tet-spinner.cjs.entry.js +1 -1
  85. package/dist/cjs/tet-stepper-input.cjs.entry.js +3 -3
  86. package/dist/cjs/tet-stepper-v2.cjs.entry.js +1 -1
  87. package/dist/cjs/tet-stepper-v3.cjs.entry.js +1 -1
  88. package/dist/cjs/tet-stepper.cjs.entry.js +1 -1
  89. package/dist/cjs/tet-switch.cjs.entry.js +1 -1
  90. package/dist/cjs/tet-tab-header.cjs.entry.js +1 -1
  91. package/dist/cjs/tet-table.cjs.entry.js +1 -1
  92. package/dist/cjs/tet-tag_2.cjs.entry.js +3 -3
  93. package/dist/cjs/tet-text-list.cjs.entry.js +1 -1
  94. package/dist/cjs/tet-text.cjs.entry.js +1 -1
  95. package/dist/cjs/tet-textarea.cjs.entry.js +1 -1
  96. package/dist/cjs/tet-thank-you-view-v2.cjs.entry.js +3 -3
  97. package/dist/cjs/tet-thank-you-view-v3.cjs.entry.js +3 -3
  98. package/dist/cjs/tet-thank-you-view.cjs.entry.js +1 -1
  99. package/dist/cjs/tet-tv-gift-block.cjs.entry.js +1 -1
  100. package/dist/cjs/tet-tv-gift-list.cjs.entry.js +1 -1
  101. package/dist/cjs/{theme-wrapper-66880718.js → theme-wrapper-46514846.js} +2 -2
  102. package/dist/cjs/{translations-03c9de64.js → translations-89a0ec3d.js} +1 -1
  103. package/dist/collection/components/basic/carousel/tet-carousel/tet-carousel.css +0 -1
  104. package/dist/collection/components/basic/carousel/tet-carousel/tet-carousel.js +489 -160
  105. package/dist/components/index.js +1 -1
  106. package/dist/components/{p-67c5a58c.js → p-09e12e32.js} +1 -1
  107. package/dist/components/{p-bf18b5b7.js → p-0af4c96a.js} +2 -2
  108. package/dist/components/{p-68143dc1.js → p-0d4040e8.js} +5 -5
  109. package/dist/components/{p-a57bdbb3.js → p-11700d82.js} +4 -4
  110. package/dist/components/{p-8f56bf1c.js → p-13296f85.js} +2 -2
  111. package/dist/components/{p-df5d84f1.js → p-1469ed4f.js} +3 -3
  112. package/dist/components/{p-795a1c43.js → p-164c4f08.js} +4 -4
  113. package/dist/components/{p-aae07dc6.js → p-19f32f2a.js} +2 -2
  114. package/dist/components/{p-6fa17892.js → p-1fe9d8a5.js} +10 -10
  115. package/dist/components/{p-f76fad86.js → p-26ffcb52.js} +1 -1
  116. package/dist/components/{p-a6be19f9.js → p-29aa33c8.js} +1 -1
  117. package/dist/components/{p-af0662ff.js → p-2a189a6b.js} +1 -1
  118. package/dist/components/{p-ddcc69cd.js → p-308ed708.js} +2 -2
  119. package/dist/components/{p-193320bd.js → p-3447cfe2.js} +1 -1
  120. package/dist/components/{p-4468c9e9.js → p-3493f65f.js} +1 -1
  121. package/dist/components/{p-defc1e19.js → p-3cf8ea69.js} +14 -14
  122. package/dist/components/{p-4903892e.js → p-3d4fecca.js} +9 -9
  123. package/dist/components/{p-64690a6c.js → p-40893ddd.js} +3 -3
  124. package/dist/components/{p-74e1a749.js → p-41b79a2e.js} +6 -6
  125. package/dist/components/{p-50c4fd79.js → p-464c7198.js} +1 -1
  126. package/dist/components/{p-e4f06634.js → p-4db83698.js} +7 -7
  127. package/dist/components/{p-8a5c883e.js → p-5a3da1ac.js} +1 -1
  128. package/dist/components/{p-2c1233bc.js → p-5b460f62.js} +1 -1
  129. package/dist/components/{p-c1c77130.js → p-65a05865.js} +2 -2
  130. package/dist/components/{p-4b4a0334.js → p-6e9df8dd.js} +2 -2
  131. package/dist/components/{p-41260991.js → p-75612e20.js} +3 -3
  132. package/dist/components/{p-c964254d.js → p-8921cb9c.js} +1 -1
  133. package/dist/components/{p-49b5dcf4.js → p-8bbea05f.js} +2 -2
  134. package/dist/components/{p-5c6b063f.js → p-92423544.js} +2 -2
  135. package/dist/components/{p-48611429.js → p-95722fb3.js} +2 -2
  136. package/dist/components/{p-2b5669f6.js → p-99746f8e.js} +1 -1
  137. package/dist/components/{p-9783cca1.js → p-9b4b062e.js} +7 -7
  138. package/dist/components/{p-d57cec8c.js → p-a0f69423.js} +1 -1
  139. package/dist/components/{p-375a5cfa.js → p-a1135d10.js} +1 -1
  140. package/dist/components/{p-027f730e.js → p-a25b08b6.js} +7 -7
  141. package/dist/components/{p-461e1a38.js → p-a2c27d73.js} +1 -1
  142. package/dist/components/{p-e3cb1d2d.js → p-a31e7e42.js} +3 -3
  143. package/dist/components/{p-1b7b79a5.js → p-a3b7c408.js} +3 -3
  144. package/dist/components/{p-34265c9d.js → p-a830ca83.js} +2 -2
  145. package/dist/components/{p-25b93e8f.js → p-aa122c92.js} +1 -1
  146. package/dist/components/{p-59997b7c.js → p-aedb4093.js} +1 -1
  147. package/dist/components/{p-44201f97.js → p-b6841a9b.js} +1 -1
  148. package/dist/components/{p-7f859d29.js → p-bac1705f.js} +1 -1
  149. package/dist/components/{p-089612ee.js → p-c29a45f3.js} +10 -10
  150. package/dist/components/{p-def0e33f.js → p-c2ea4c67.js} +3 -3
  151. package/dist/components/{p-1035feaa.js → p-c4f77126.js} +3 -3
  152. package/dist/components/{p-af9beaa1.js → p-c6284dbe.js} +7 -7
  153. package/dist/components/{p-d22aed2d.js → p-c9cc0a5b.js} +6 -6
  154. package/dist/components/{p-04a2d6a8.js → p-d21c7be3.js} +1 -1
  155. package/dist/components/{p-be5d67d1.js → p-d298006c.js} +1 -1
  156. package/dist/components/{p-95cc2537.js → p-d2a4570d.js} +3 -3
  157. package/dist/components/{p-331ebe65.js → p-d2c3076d.js} +1 -1
  158. package/dist/components/{p-bef5a700.js → p-e9cec2be.js} +1 -1
  159. package/dist/components/{p-5472702d.js → p-ec4cea27.js} +5 -5
  160. package/dist/components/{p-1e624d81.js → p-f2402ed7.js} +2 -2
  161. package/dist/components/{p-0a575a94.js → p-f259ef5f.js} +6 -6
  162. package/dist/components/{p-e87a77a6.js → p-f4c5337a.js} +1 -1
  163. package/dist/components/{p-49251432.js → p-f5f56fe1.js} +2 -2
  164. package/dist/components/tet-accordion.js +1 -1
  165. package/dist/components/tet-address-offers-filters-products.js +1 -1
  166. package/dist/components/tet-address-offers-filters.js +1 -1
  167. package/dist/components/tet-address-offers-view.js +24 -24
  168. package/dist/components/tet-address-offers.js +1 -1
  169. package/dist/components/tet-address-search.js +1 -1
  170. package/dist/components/tet-asset-addresses.js +13 -13
  171. package/dist/components/tet-asset-availability-addresses.js +1 -1
  172. package/dist/components/tet-autocomplete-dropdown.js +5 -5
  173. package/dist/components/tet-autocomplete.js +1 -1
  174. package/dist/components/tet-availability-contact-form.js +1 -1
  175. package/dist/components/tet-b2b-check-out-form.js +1 -1
  176. package/dist/components/tet-b2b-compare-card.js +1 -1
  177. package/dist/components/tet-b2b-configurator-cart.js +1 -1
  178. package/dist/components/tet-b2b-configurator.js +20 -20
  179. package/dist/components/tet-b2b-service-calculator.js +8 -8
  180. package/dist/components/tet-banner-nav.js +3 -3
  181. package/dist/components/tet-bar-graph.js +1 -1
  182. package/dist/components/tet-border-radius.js +1 -1
  183. package/dist/components/tet-business-card.js +1 -1
  184. package/dist/components/tet-business-compare-card.js +3 -3
  185. package/dist/components/tet-business-lines.js +5 -5
  186. package/dist/components/tet-business-navigation.js +1 -1
  187. package/dist/components/tet-business-round-stepper.js +2 -2
  188. package/dist/components/tet-business-summary-card.js +1 -1
  189. package/dist/components/tet-button.js +1 -1
  190. package/dist/components/tet-card-list.js +1 -1
  191. package/dist/components/tet-carousel.js +494 -166
  192. package/dist/components/tet-checkbox.js +1 -1
  193. package/dist/components/tet-cloud-application-form-dialog.js +8 -8
  194. package/dist/components/tet-cloud-configurator.js +12 -12
  195. package/dist/components/tet-colors.js +1 -1
  196. package/dist/components/tet-compare-card-v2.js +9 -9
  197. package/dist/components/tet-compare-card.js +1 -1
  198. package/dist/components/tet-compare-cards-tab.js +16 -16
  199. package/dist/components/tet-compare-cards.js +1 -1
  200. package/dist/components/tet-contact-form.js +9 -9
  201. package/dist/components/tet-contact-info.js +1 -1
  202. package/dist/components/tet-container.js +1 -1
  203. package/dist/components/tet-counter.js +1 -1
  204. package/dist/components/tet-customer-assets.js +9 -9
  205. package/dist/components/tet-datepicker-header.js +1 -1
  206. package/dist/components/tet-datepicker-month-view.js +1 -1
  207. package/dist/components/tet-datepicker-multi-year-view.js +1 -1
  208. package/dist/components/tet-datepicker-year-view.js +1 -1
  209. package/dist/components/tet-datepicker.js +6 -6
  210. package/dist/components/tet-dialog.js +1 -1
  211. package/dist/components/tet-display.js +8 -8
  212. package/dist/components/tet-divider.js +7 -7
  213. package/dist/components/tet-dropdown.js +1 -1
  214. package/dist/components/tet-dynamic-card.js +4 -4
  215. package/dist/components/tet-expandable-input.js +3 -3
  216. package/dist/components/tet-expansion-panel.js +1 -1
  217. package/dist/components/tet-feedback-form.js +7 -7
  218. package/dist/components/tet-filter.js +4 -4
  219. package/dist/components/tet-floating-block.js +3 -3
  220. package/dist/components/tet-font-weight.js +1 -1
  221. package/dist/components/tet-fonts.js +1 -1
  222. package/dist/components/tet-grid.js +1 -1
  223. package/dist/components/tet-icon.js +1 -1
  224. package/dist/components/tet-inline-message.js +2 -2
  225. package/dist/components/tet-input.js +1 -1
  226. package/dist/components/tet-label.js +3 -3
  227. package/dist/components/tet-layout.js +1 -1
  228. package/dist/components/tet-link-card-list.js +3 -3
  229. package/dist/components/tet-link.js +1 -1
  230. package/dist/components/tet-loader.js +1 -1
  231. package/dist/components/tet-macd-view.js +10 -10
  232. package/dist/components/tet-menu-mobile.js +2 -2
  233. package/dist/components/tet-menu.js +2 -2
  234. package/dist/components/tet-multi-step-dialog.js +5 -5
  235. package/dist/components/tet-navigation-mobile.js +2 -2
  236. package/dist/components/tet-news-card-list.js +4 -4
  237. package/dist/components/tet-notification.js +1 -1
  238. package/dist/components/tet-number-input.js +1 -1
  239. package/dist/components/tet-placeholder.js +1 -1
  240. package/dist/components/tet-position.js +7 -7
  241. package/dist/components/tet-price-view.js +1 -1
  242. package/dist/components/tet-radio.js +1 -1
  243. package/dist/components/tet-range-slider.js +1 -1
  244. package/dist/components/tet-referral.js +6 -6
  245. package/dist/components/tet-round-stepper.js +2 -2
  246. package/dist/components/tet-selection-list.js +1 -1
  247. package/dist/components/tet-snicker-card-badge.js +1 -1
  248. package/dist/components/tet-spacing.js +1 -1
  249. package/dist/components/tet-spinner.js +1 -1
  250. package/dist/components/tet-stepper-input.js +1 -1
  251. package/dist/components/tet-stepper-v2.js +1 -1
  252. package/dist/components/tet-stepper-v3.js +1 -1
  253. package/dist/components/tet-stepper.js +1 -1
  254. package/dist/components/tet-switch.js +1 -1
  255. package/dist/components/tet-tab-content.js +1 -1
  256. package/dist/components/tet-tab-header.js +1 -1
  257. package/dist/components/tet-table.js +3 -3
  258. package/dist/components/tet-tag-group.js +1 -1
  259. package/dist/components/tet-tag.js +1 -1
  260. package/dist/components/tet-text-list.js +1 -1
  261. package/dist/components/tet-text.js +7 -7
  262. package/dist/components/tet-textarea.js +1 -1
  263. package/dist/components/tet-thank-you-view-v2.js +5 -5
  264. package/dist/components/tet-thank-you-view-v3.js +5 -5
  265. package/dist/components/tet-thank-you-view.js +4 -4
  266. package/dist/components/tet-tooltip.js +1 -1
  267. package/dist/components/tet-tv-gift-block.js +1 -1
  268. package/dist/components/tet-tv-gift-list.js +2 -2
  269. package/dist/esm/{address-1e0810e7.js → address-20e2d850.js} +1 -1
  270. package/dist/esm/{assets-e1349520.js → assets-894007df.js} +1 -1
  271. package/dist/esm/{async-request-4c945e13.js → async-request-ae1056de.js} +1 -1
  272. package/dist/esm/{http-codes-1927ea00.js → http-codes-cf0086d4.js} +1 -1
  273. package/dist/esm/{index-412df137.js → index-e3209c56.js} +1 -1
  274. package/dist/esm/{index-aac31bd2.js → index-e933a7d2.js} +1 -1
  275. package/dist/esm/loader.js +3 -3
  276. package/dist/esm/{phone-1a920c5c.js → phone-62660137.js} +2 -2
  277. package/dist/esm/{product-comparison-dd90c721.js → product-comparison-cb8955f6.js} +1 -1
  278. package/dist/esm/tet-accordion.entry.js +1 -1
  279. package/dist/esm/tet-address-offers-filters-products_2.entry.js +3 -3
  280. package/dist/esm/tet-address-offers-view.entry.js +3 -3
  281. package/dist/esm/tet-address-offers_4.entry.js +7 -7
  282. package/dist/esm/tet-address-search.entry.js +4 -4
  283. package/dist/esm/tet-asset-addresses.entry.js +3 -3
  284. package/dist/esm/tet-autocomplete-dropdown.entry.js +1 -1
  285. package/dist/esm/tet-autocomplete.entry.js +1 -1
  286. package/dist/esm/tet-b2b-check-out-form_5.entry.js +3 -3
  287. package/dist/esm/tet-b2b-configurator.entry.js +4 -4
  288. package/dist/esm/tet-b2b-service-calculator.entry.js +3 -3
  289. package/dist/esm/tet-banner-nav.entry.js +3 -3
  290. package/dist/esm/tet-bar-graph.entry.js +1 -1
  291. package/dist/esm/tet-border-radius.entry.js +1 -1
  292. package/dist/esm/tet-business-card.entry.js +1 -1
  293. package/dist/esm/tet-business-compare-card.entry.js +1 -1
  294. package/dist/esm/tet-business-lines.entry.js +4 -4
  295. package/dist/esm/tet-business-round-stepper.entry.js +1 -1
  296. package/dist/esm/tet-button.entry.js +1 -1
  297. package/dist/esm/tet-card-list.entry.js +1 -1
  298. package/dist/esm/tet-carousel.entry.js +492 -165
  299. package/dist/esm/tet-checkbox.entry.js +1 -1
  300. package/dist/esm/tet-cloud-application-form-dialog.entry.js +3 -3
  301. package/dist/esm/tet-cloud-configurator.entry.js +3 -3
  302. package/dist/esm/tet-colors.entry.js +1 -1
  303. package/dist/esm/tet-compare-card-v2.entry.js +3 -3
  304. package/dist/esm/tet-compare-cards-tab.entry.js +3 -3
  305. package/dist/esm/tet-compare-cards_2.entry.js +3 -3
  306. package/dist/esm/tet-components.js +3 -3
  307. package/dist/esm/tet-contact-form.entry.js +5 -5
  308. package/dist/esm/tet-contact-info.entry.js +1 -1
  309. package/dist/esm/tet-container_2.entry.js +1 -1
  310. package/dist/esm/tet-counter.entry.js +1 -1
  311. package/dist/esm/tet-customer-assets.entry.js +3 -3
  312. package/dist/esm/tet-datepicker-header_4.entry.js +1 -1
  313. package/dist/esm/tet-datepicker.entry.js +1 -1
  314. package/dist/esm/tet-dialog.entry.js +3 -3
  315. package/dist/esm/tet-display.entry.js +1 -1
  316. package/dist/esm/tet-divider.entry.js +1 -1
  317. package/dist/esm/tet-dropdown_2.entry.js +1 -1
  318. package/dist/esm/tet-dynamic-card.entry.js +1 -1
  319. package/dist/esm/tet-expandable-input.entry.js +1 -1
  320. package/dist/esm/tet-expansion-panel.entry.js +1 -1
  321. package/dist/esm/tet-feedback-form.entry.js +3 -3
  322. package/dist/esm/tet-filter.entry.js +1 -1
  323. package/dist/esm/tet-floating-block.entry.js +1 -1
  324. package/dist/esm/tet-font-weight.entry.js +1 -1
  325. package/dist/esm/tet-fonts.entry.js +1 -1
  326. package/dist/esm/tet-grid.entry.js +1 -1
  327. package/dist/esm/tet-icon.entry.js +2 -2
  328. package/dist/esm/tet-inline-message.entry.js +1 -1
  329. package/dist/esm/tet-input.entry.js +3 -3
  330. package/dist/esm/tet-label.entry.js +3 -3
  331. package/dist/esm/tet-layout.entry.js +1 -1
  332. package/dist/esm/tet-link-card-list.entry.js +1 -1
  333. package/dist/esm/tet-link.entry.js +1 -1
  334. package/dist/esm/tet-loader.entry.js +1 -1
  335. package/dist/esm/tet-macd-view.entry.js +6 -6
  336. package/dist/esm/tet-menu-mobile.entry.js +1 -1
  337. package/dist/esm/tet-menu.entry.js +1 -1
  338. package/dist/esm/tet-multi-step-dialog.entry.js +3 -3
  339. package/dist/esm/tet-navigation-mobile.entry.js +1 -1
  340. package/dist/esm/tet-news-card-list.entry.js +1 -1
  341. package/dist/esm/tet-notification.entry.js +1 -1
  342. package/dist/esm/tet-number-input.entry.js +1 -1
  343. package/dist/esm/tet-placeholder.entry.js +1 -1
  344. package/dist/esm/tet-position.entry.js +1 -1
  345. package/dist/esm/tet-price-view.entry.js +1 -1
  346. package/dist/esm/tet-radio.entry.js +1 -1
  347. package/dist/esm/tet-range-slider.entry.js +1 -1
  348. package/dist/esm/tet-referral.entry.js +5 -5
  349. package/dist/esm/tet-round-stepper.entry.js +1 -1
  350. package/dist/esm/tet-snicker-card-badge.entry.js +1 -1
  351. package/dist/esm/tet-spacing.entry.js +1 -1
  352. package/dist/esm/tet-spinner.entry.js +1 -1
  353. package/dist/esm/tet-stepper-input.entry.js +3 -3
  354. package/dist/esm/tet-stepper-v2.entry.js +1 -1
  355. package/dist/esm/tet-stepper-v3.entry.js +1 -1
  356. package/dist/esm/tet-stepper.entry.js +1 -1
  357. package/dist/esm/tet-switch.entry.js +1 -1
  358. package/dist/esm/tet-tab-header.entry.js +1 -1
  359. package/dist/esm/tet-table.entry.js +1 -1
  360. package/dist/esm/tet-tag_2.entry.js +3 -3
  361. package/dist/esm/tet-text-list.entry.js +1 -1
  362. package/dist/esm/tet-text.entry.js +1 -1
  363. package/dist/esm/tet-textarea.entry.js +1 -1
  364. package/dist/esm/tet-thank-you-view-v2.entry.js +3 -3
  365. package/dist/esm/tet-thank-you-view-v3.entry.js +3 -3
  366. package/dist/esm/tet-thank-you-view.entry.js +1 -1
  367. package/dist/esm/tet-tv-gift-block.entry.js +1 -1
  368. package/dist/esm/tet-tv-gift-list.entry.js +1 -1
  369. package/dist/esm/{theme-wrapper-72d0b9da.js → theme-wrapper-cf4d7d54.js} +2 -2
  370. package/dist/esm/{translations-4712c45f.js → translations-e60db8fd.js} +1 -1
  371. package/dist/tet-components/{p-55be4b32.entry.js → p-01cbb74c.entry.js} +1 -1
  372. package/dist/tet-components/{p-c31236d5.entry.js → p-0614c980.entry.js} +1 -1
  373. package/dist/tet-components/{p-4967b041.entry.js → p-08569f07.entry.js} +1 -1
  374. package/dist/tet-components/{p-79700f85.entry.js → p-0bda3eeb.entry.js} +1 -1
  375. package/dist/tet-components/{p-5391d594.entry.js → p-0bf60061.entry.js} +1 -1
  376. package/dist/tet-components/{p-028e8ace.entry.js → p-0d2c26f6.entry.js} +1 -1
  377. package/dist/tet-components/{p-7a3c1254.entry.js → p-127b2895.entry.js} +1 -1
  378. package/dist/tet-components/{p-26b112a2.entry.js → p-12f975ff.entry.js} +1 -1
  379. package/dist/tet-components/{p-2a43ccef.entry.js → p-14c15a69.entry.js} +1 -1
  380. package/dist/tet-components/{p-c13b2ba7.entry.js → p-1765c8c5.entry.js} +1 -1
  381. package/dist/tet-components/{p-040c0f07.entry.js → p-1a05c222.entry.js} +1 -1
  382. package/dist/tet-components/{p-4e58c5e2.entry.js → p-1b976fcb.entry.js} +1 -1
  383. package/dist/tet-components/{p-5533f71b.entry.js → p-1ea5d4bf.entry.js} +1 -1
  384. package/dist/tet-components/{p-bcca51cc.entry.js → p-1f5ed76c.entry.js} +1 -1
  385. package/dist/tet-components/{p-cf479331.entry.js → p-22c2b9f8.entry.js} +1 -1
  386. package/dist/tet-components/{p-6297692b.entry.js → p-239fa72a.entry.js} +1 -1
  387. package/dist/tet-components/{p-0690732e.entry.js → p-23f3b153.entry.js} +1 -1
  388. package/dist/tet-components/{p-be3a10d0.entry.js → p-24df18b9.entry.js} +1 -1
  389. package/dist/tet-components/{p-d9560c74.entry.js → p-24e724eb.entry.js} +1 -1
  390. package/dist/tet-components/{p-f6916bfc.entry.js → p-265701de.entry.js} +1 -1
  391. package/dist/tet-components/{p-00e4bbed.entry.js → p-27a27a6f.entry.js} +1 -1
  392. package/dist/tet-components/{p-b0fc3440.entry.js → p-2a558830.entry.js} +1 -1
  393. package/dist/tet-components/{p-33f2ed2e.entry.js → p-2a973b3c.entry.js} +1 -1
  394. package/dist/tet-components/{p-d8518d4b.js → p-2dbe670c.js} +1 -1
  395. package/dist/tet-components/{p-7056a120.entry.js → p-31d0b400.entry.js} +1 -1
  396. package/dist/tet-components/{p-629a9a5d.entry.js → p-32488c4e.entry.js} +1 -1
  397. package/dist/tet-components/{p-778c46a6.js → p-3ac57578.js} +1 -1
  398. package/dist/tet-components/{p-f06fb66c.entry.js → p-3b3fdcb0.entry.js} +1 -1
  399. package/dist/tet-components/{p-3fc6a020.entry.js → p-3b5e9fed.entry.js} +1 -1
  400. package/dist/tet-components/{p-f81b3bb0.js → p-4213c1d1.js} +1 -1
  401. package/dist/tet-components/{p-ee3604eb.entry.js → p-43eff59d.entry.js} +1 -1
  402. package/dist/tet-components/{p-d5b72171.entry.js → p-49779ee5.entry.js} +1 -1
  403. package/dist/tet-components/{p-e98108ba.entry.js → p-49da8f23.entry.js} +1 -1
  404. package/dist/tet-components/{p-81db4c30.entry.js → p-4d7f1c6e.entry.js} +1 -1
  405. package/dist/tet-components/{p-7c7fb42f.entry.js → p-4d935fc8.entry.js} +1 -1
  406. package/dist/tet-components/{p-73411459.entry.js → p-4fc641da.entry.js} +1 -1
  407. package/dist/tet-components/{p-122f3d3c.entry.js → p-548d7cc1.entry.js} +1 -1
  408. package/dist/tet-components/{p-f9a0b36a.entry.js → p-54cc6dd2.entry.js} +1 -1
  409. package/dist/tet-components/{p-6dde4d69.entry.js → p-55ded3a8.entry.js} +1 -1
  410. package/dist/tet-components/{p-71018cb8.entry.js → p-581b1f01.entry.js} +1 -1
  411. package/dist/tet-components/{p-ce850061.entry.js → p-589e8e4b.entry.js} +1 -1
  412. package/dist/tet-components/{p-5845a3dc.entry.js → p-59007fe7.entry.js} +1 -1
  413. package/dist/tet-components/{p-83f43fdd.js → p-5abb3bea.js} +1 -1
  414. package/dist/tet-components/{p-5a6fc34c.entry.js → p-5d56e074.entry.js} +1 -1
  415. package/dist/tet-components/{p-cde8057a.entry.js → p-60abca86.entry.js} +1 -1
  416. package/dist/tet-components/{p-8bfd498e.entry.js → p-63f6def9.entry.js} +1 -1
  417. package/dist/tet-components/p-660bdc27.js +1 -0
  418. package/dist/tet-components/{p-c10d5369.entry.js → p-6c6cd148.entry.js} +1 -1
  419. package/dist/tet-components/{p-cf11c4cd.entry.js → p-6c6fe82b.entry.js} +1 -1
  420. package/dist/tet-components/{p-ae8ff573.entry.js → p-6cf6894d.entry.js} +1 -1
  421. package/dist/tet-components/{p-a903f58f.entry.js → p-6e06eb15.entry.js} +1 -1
  422. package/dist/tet-components/{p-76526271.entry.js → p-6fb8c506.entry.js} +1 -1
  423. package/dist/tet-components/{p-32ece6e1.entry.js → p-6ffacde3.entry.js} +1 -1
  424. package/dist/tet-components/{p-d4dc17f5.entry.js → p-70bdb222.entry.js} +1 -1
  425. package/dist/tet-components/{p-fa446e53.entry.js → p-70cec2eb.entry.js} +1 -1
  426. package/dist/tet-components/{p-0ebbf5ef.js → p-726651bc.js} +1 -1
  427. package/dist/tet-components/{p-46975ec4.entry.js → p-73c190a2.entry.js} +1 -1
  428. package/dist/tet-components/{p-ed044f47.entry.js → p-79ee95e0.entry.js} +1 -1
  429. package/dist/tet-components/{p-09e92f79.entry.js → p-7a9db071.entry.js} +1 -1
  430. package/dist/tet-components/{p-b822a377.entry.js → p-7bd6f009.entry.js} +1 -1
  431. package/dist/tet-components/{p-5e8466e6.entry.js → p-835c7ee4.entry.js} +1 -1
  432. package/dist/tet-components/{p-3a3fd77f.entry.js → p-839ae15f.entry.js} +1 -1
  433. package/dist/tet-components/{p-bb7d4ae2.entry.js → p-8574b729.entry.js} +1 -1
  434. package/dist/tet-components/{p-5d70599c.entry.js → p-86b8ce79.entry.js} +1 -1
  435. package/dist/tet-components/{p-10e72480.entry.js → p-8b93b91f.entry.js} +1 -1
  436. package/dist/tet-components/{p-f5d4d8c8.entry.js → p-8fae4e03.entry.js} +1 -1
  437. package/dist/tet-components/{p-f16514db.entry.js → p-9bd457d2.entry.js} +1 -1
  438. package/dist/tet-components/{p-da0fc55d.entry.js → p-9c263933.entry.js} +1 -1
  439. package/dist/tet-components/{p-a8051a99.js → p-a476fd02.js} +1 -1
  440. package/dist/tet-components/{p-33768388.entry.js → p-a64706a6.entry.js} +1 -1
  441. package/dist/tet-components/{p-0d5562a1.entry.js → p-af86e2dc.entry.js} +1 -1
  442. package/dist/tet-components/{p-f68450a4.entry.js → p-b22de340.entry.js} +1 -1
  443. package/dist/tet-components/{p-0e2dbd84.entry.js → p-b29111f0.entry.js} +1 -1
  444. package/dist/tet-components/{p-ce4b6943.entry.js → p-b2c138f0.entry.js} +1 -1
  445. package/dist/tet-components/{p-7544dfd7.js → p-b39df477.js} +1 -1
  446. package/dist/tet-components/{p-872bbccf.entry.js → p-b468a922.entry.js} +1 -1
  447. package/dist/tet-components/{p-9c837569.entry.js → p-b4b90473.entry.js} +1 -1
  448. package/dist/tet-components/{p-7de684c1.entry.js → p-b61304cf.entry.js} +1 -1
  449. package/dist/tet-components/{p-1fd2adaf.js → p-b92dff8a.js} +1 -1
  450. package/dist/tet-components/{p-7a3e4581.entry.js → p-c094dfd6.entry.js} +1 -1
  451. package/dist/tet-components/{p-798aa31d.entry.js → p-c1b9f3f1.entry.js} +1 -1
  452. package/dist/tet-components/{p-9c36ecbd.entry.js → p-c76a4457.entry.js} +1 -1
  453. package/dist/tet-components/{p-43c3b078.entry.js → p-c87aa965.entry.js} +1 -1
  454. package/dist/tet-components/{p-b34e86ef.entry.js → p-c9583427.entry.js} +1 -1
  455. package/dist/tet-components/{p-0c6b6730.js → p-c9ddf890.js} +1 -1
  456. package/dist/tet-components/{p-75927057.entry.js → p-cc99e827.entry.js} +1 -1
  457. package/dist/tet-components/{p-b4ecbc40.entry.js → p-d028d7c4.entry.js} +1 -1
  458. package/dist/tet-components/{p-39796998.entry.js → p-d3db997e.entry.js} +1 -1
  459. package/dist/tet-components/{p-584f54a7.entry.js → p-d76479dc.entry.js} +1 -1
  460. package/dist/tet-components/p-d8542fed.entry.js +1 -0
  461. package/dist/tet-components/{p-62bcf382.entry.js → p-df99dc91.entry.js} +1 -1
  462. package/dist/tet-components/{p-a64e3e96.entry.js → p-e74416dc.entry.js} +1 -1
  463. package/dist/tet-components/{p-efdef0e5.entry.js → p-ec1e970f.entry.js} +1 -1
  464. package/dist/tet-components/{p-c9f21fde.entry.js → p-ec5b1040.entry.js} +1 -1
  465. package/dist/tet-components/{p-1d0c3563.entry.js → p-ef84df23.entry.js} +1 -1
  466. package/dist/tet-components/{p-2738fbb7.entry.js → p-efc8d952.entry.js} +1 -1
  467. package/dist/tet-components/{p-2328b1d4.entry.js → p-f9c98275.entry.js} +1 -1
  468. package/dist/tet-components/{p-43fd6ff8.entry.js → p-fa67ec09.entry.js} +1 -1
  469. package/dist/tet-components/{p-0f2d1a9c.entry.js → p-fdd44094.entry.js} +1 -1
  470. package/dist/tet-components/{p-4f5a19cb.entry.js → p-fe7dab47.entry.js} +1 -1
  471. package/dist/tet-components/tet-components.esm.js +1 -1
  472. package/dist/types/components/basic/carousel/tet-carousel/tet-carousel.d.ts +53 -11
  473. package/package.json +1 -1
  474. package/dist/tet-components/p-a0f6721c.entry.js +0 -1
  475. package/dist/tet-components/p-f81d95ae.js +0 -1
@@ -26,42 +26,73 @@ export class TetCarousel {
26
26
  static NUDGE_DISTANCE_PX = 16;
27
27
  static NUDGE_IDLE_THRESHOLD_MS = 1500;
28
28
  static GRADIENT_VISIBILITY_THRESHOLD_PX = 1;
29
+ static EDGE_DRAG_MAX_PX = 32;
30
+ static EDGE_DRAG_RESISTANCE = 0.95;
31
+ static MOUSE_DRAG_SMOOTHING_MS = 60;
32
+ focusableSelector = 'a[href], [tabindex]:not([tabindex="-1"])';
33
+ handleResize = () => {
34
+ this.getDotCount();
35
+ const assigned = this.getSlotElements();
36
+ if (!assigned?.length)
37
+ return;
38
+ const idx = Math.max(0, Math.min(this.activeItem, assigned.length - 1));
39
+ this.moveToItem(assigned[idx], idx);
40
+ this.checkGradient();
41
+ };
42
+ handleSlotChangeListener = () => this.handleSlotChange();
43
+ managedFocusableElements = [];
44
+ managedSlideFocusWithinListeners = [];
29
45
  draggedAnchor = null;
30
46
  dragMoved = false;
31
47
  dragPointerStartX = 0;
32
48
  dragStartX = 0;
49
+ dragStartActiveItem = 0;
50
+ dragPointerType = '';
33
51
  nudgeTimeoutId;
34
52
  nudgeGradientRafId;
35
53
  lastInteractionAt = 0;
36
54
  trackElement = null;
37
55
  trackContentElement = null;
56
+ mobileBackButtonWrapper = null;
38
57
  container;
39
58
  leftGradientRef;
40
59
  rightGradientRef;
41
60
  slotObserver;
42
- async onLanguageChange(language) {
43
- processTranslations('tet-components', language).then(() => forceUpdate(this));
61
+ safeForceUpdate() {
62
+ try {
63
+ forceUpdate(this);
64
+ }
65
+ catch { }
66
+ }
67
+ syncTranslations(language) {
68
+ processTranslations('tet-components', language).then(() => this.safeForceUpdate());
69
+ }
70
+ onLanguageChange(language) {
71
+ this.syncTranslations(language);
72
+ }
73
+ onActiveItemChange() {
74
+ this.updateSlideFocusableTabIndexes();
44
75
  }
45
76
  checkGradient() {
46
77
  if (this.showGradient) {
47
- const absOffset = Math.abs(this.getRealDragOffset());
48
78
  const wrapperWidth = this.getViewportWidth();
49
79
  const totalWidth = this.getSlotClientWidth();
50
- const rightEdgeDistance = totalWidth - absOffset - wrapperWidth;
51
- if (rightEdgeDistance >= 0) {
52
- const rightEdge = rightEdgeDistance < TetCarousel.GRADIENT_VISIBILITY_THRESHOLD_PX;
53
- if (absOffset < TetCarousel.GRADIENT_VISIBILITY_THRESHOLD_PX) {
54
- this.leftGradientRef.style.opacity = '0';
55
- this.rightGradientRef.style.opacity = '1';
56
- }
57
- else if (rightEdge) {
58
- this.leftGradientRef.style.opacity = '1';
59
- this.rightGradientRef.style.opacity = '0';
60
- }
61
- else {
62
- this.leftGradientRef.style.opacity = '1';
63
- this.rightGradientRef.style.opacity = '1';
64
- }
80
+ const maxScrollableOffset = Math.max(0, totalWidth - wrapperWidth);
81
+ const rawScrollableOffset = -this.getRealDragOffset();
82
+ const clampedScrollableOffset = Math.max(0, Math.min(maxScrollableOffset, rawScrollableOffset));
83
+ const rightEdgeDistance = maxScrollableOffset - clampedScrollableOffset;
84
+ const rightEdge = rightEdgeDistance < TetCarousel.GRADIENT_VISIBILITY_THRESHOLD_PX;
85
+ if (clampedScrollableOffset < TetCarousel.GRADIENT_VISIBILITY_THRESHOLD_PX) {
86
+ this.leftGradientRef.style.opacity = '0';
87
+ this.rightGradientRef.style.opacity = '1';
88
+ }
89
+ else if (rightEdge) {
90
+ this.leftGradientRef.style.opacity = '1';
91
+ this.rightGradientRef.style.opacity = '0';
92
+ }
93
+ else {
94
+ this.leftGradientRef.style.opacity = '1';
95
+ this.rightGradientRef.style.opacity = '1';
65
96
  }
66
97
  }
67
98
  else {
@@ -77,7 +108,7 @@ export class TetCarousel {
77
108
  this.checkGradient();
78
109
  }
79
110
  componentWillLoad() {
80
- processTranslations('tet-components', this.language).then(() => forceUpdate(this));
111
+ this.syncTranslations(this.language);
81
112
  }
82
113
  getSlotElements() {
83
114
  const slot = this.container?.querySelector('slot');
@@ -97,6 +128,9 @@ export class TetCarousel {
97
128
  getSlotClientWidth() {
98
129
  return this.trackElement?.querySelector('slot')?.offsetWidth || window.innerWidth;
99
130
  }
131
+ getMaxScrollableOffset() {
132
+ return Math.max(0, this.getSlotClientWidth() - this.getViewportWidth());
133
+ }
100
134
  // Run a callback after layout/paint to ensure DOM measurements are up to date
101
135
  afterLayout(cb) {
102
136
  requestAnimationFrame(() => requestAnimationFrame(cb));
@@ -119,30 +153,140 @@ export class TetCarousel {
119
153
  const lastScreenBorder = Math.max(dotScreenLength, viewportWidth);
120
154
  return this.isLast(lastScreenBorder, position);
121
155
  }
122
- getFullyVisibleItemCount() {
156
+ getItemLayoutMetrics() {
123
157
  const assigned = this.getSlotElements();
124
158
  if (!assigned || assigned.length === 0)
159
+ return [];
160
+ return assigned.map((item, index) => {
161
+ const left = item.offsetLeft;
162
+ return {
163
+ item,
164
+ index,
165
+ left,
166
+ right: left + item.offsetWidth
167
+ };
168
+ });
169
+ }
170
+ getFullyVisibleItemCount() {
171
+ const metrics = this.getItemLayoutMetrics();
172
+ if (!metrics.length)
125
173
  return 0;
126
174
  const viewportWidth = this.getViewportWidth();
127
- const absOffset = Math.abs(this.dragOffset);
128
- const visibleLeft = absOffset;
129
- const visibleRight = absOffset + viewportWidth;
175
+ const visibleLeft = Math.abs(this.dragOffset);
176
+ const visibleRight = visibleLeft + viewportWidth;
130
177
  let count = 0;
131
- for (const item of assigned) {
132
- const rect = item.getBoundingClientRect();
133
- const trackRect = this.trackElement.getBoundingClientRect();
134
- const relativeLeft = rect.left - trackRect.left;
135
- const relativeRight = relativeLeft + item.offsetWidth;
136
- // Fully visible when the entire item falls inside the viewport window
137
- if (relativeLeft >= visibleLeft && relativeRight <= visibleRight) {
178
+ for (const { left, right } of metrics) {
179
+ if (left >= visibleLeft && right <= visibleRight) {
138
180
  count++;
139
181
  }
140
182
  }
141
183
  return count;
142
184
  }
185
+ getVisibleItemCountFromIndex(startIndex) {
186
+ const metrics = this.getItemLayoutMetrics();
187
+ if (!metrics.length)
188
+ return 1;
189
+ const safeStart = Math.max(0, Math.min(startIndex, metrics.length - 1));
190
+ const viewportWidth = this.getViewportWidth();
191
+ const startLeft = metrics[safeStart].left;
192
+ const visibleRight = startLeft + viewportWidth + 0.5;
193
+ let count = 0;
194
+ for (let index = safeStart; index < metrics.length; index++) {
195
+ if (metrics[index].right <= visibleRight) {
196
+ count++;
197
+ }
198
+ else {
199
+ break;
200
+ }
201
+ }
202
+ return Math.max(1, count);
203
+ }
204
+ getFirstVisibleItemInViewport() {
205
+ const metrics = this.getItemLayoutMetrics();
206
+ if (!metrics.length)
207
+ return null;
208
+ const viewportLeft = Math.abs(this.dragOffset);
209
+ const edgeEpsilon = 0.5;
210
+ const current = metrics.find((metric) => metric.left <= viewportLeft + edgeEpsilon && metric.right > viewportLeft + edgeEpsilon);
211
+ if (current) {
212
+ const itemWidth = current.right - current.left;
213
+ const visibleWidth = current.right - viewportLeft;
214
+ const isAtLeastHalfVisible = visibleWidth >= itemWidth / 2;
215
+ if (isAtLeastHalfVisible || current.index === metrics.length - 1) {
216
+ return { item: current.item, index: current.index };
217
+ }
218
+ const next = metrics[current.index + 1];
219
+ if (next) {
220
+ return { item: next.item, index: next.index };
221
+ }
222
+ }
223
+ if (viewportLeft <= metrics[0].left + edgeEpsilon) {
224
+ return { item: metrics[0].item, index: metrics[0].index };
225
+ }
226
+ const firstAfterViewport = metrics.find((metric) => metric.left > viewportLeft + edgeEpsilon);
227
+ if (firstAfterViewport) {
228
+ return { item: firstAfterViewport.item, index: firstAfterViewport.index };
229
+ }
230
+ const last = metrics.at(-1);
231
+ return { item: last.item, index: last.index };
232
+ }
233
+ getEdgeSnapTarget(direction) {
234
+ const metrics = this.getItemLayoutMetrics();
235
+ if (!metrics.length)
236
+ return null;
237
+ const viewportLeft = Math.abs(this.dragOffset);
238
+ const viewportRight = viewportLeft + this.getViewportWidth();
239
+ const first = metrics[0];
240
+ const last = metrics.at(-1);
241
+ if (direction < 0) {
242
+ const firstVisibleWidth = Math.min(first.right, viewportRight) - Math.max(first.left, viewportLeft);
243
+ if (firstVisibleWidth > 0 && firstVisibleWidth >= (first.right - first.left) / 2) {
244
+ return { item: first.item, index: first.index };
245
+ }
246
+ }
247
+ if (direction > 0) {
248
+ const lastVisibleWidth = Math.min(last.right, viewportRight) - Math.max(last.left, viewportLeft);
249
+ if (lastVisibleWidth > 0 && lastVisibleWidth >= (last.right - last.left) / 2) {
250
+ return { item: last.item, index: last.index };
251
+ }
252
+ }
253
+ return null;
254
+ }
255
+ getSwipeTarget(direction) {
256
+ const assigned = this.getSlotElements();
257
+ if (!assigned || assigned.length === 0)
258
+ return null;
259
+ const edgeSnapTarget = this.getEdgeSnapTarget(direction);
260
+ if (edgeSnapTarget) {
261
+ return edgeSnapTarget;
262
+ }
263
+ const firstVisible = this.getFirstVisibleItemInViewport();
264
+ let targetIndex = firstVisible?.index ?? this.dragStartActiveItem;
265
+ if (direction > 0 && targetIndex <= this.dragStartActiveItem) {
266
+ targetIndex = this.dragStartActiveItem + 1;
267
+ }
268
+ if (direction < 0 && targetIndex >= this.dragStartActiveItem) {
269
+ targetIndex = this.dragStartActiveItem - 1;
270
+ }
271
+ targetIndex = Math.max(0, Math.min(assigned.length - 1, targetIndex));
272
+ const targetItem = assigned[targetIndex];
273
+ if (!targetItem)
274
+ return null;
275
+ return { item: targetItem, index: targetIndex };
276
+ }
143
277
  getRealDragOffset() {
144
278
  return this.dragOffset + this.getCurrentNudgeTranslateX();
145
279
  }
280
+ applyEdgeDragResistance(offset, minDragOffset) {
281
+ if (offset > 0) {
282
+ return Math.min(TetCarousel.EDGE_DRAG_MAX_PX, offset * TetCarousel.EDGE_DRAG_RESISTANCE);
283
+ }
284
+ if (offset < minDragOffset) {
285
+ const overscrollPastEnd = offset - minDragOffset;
286
+ return minDragOffset + Math.max(-TetCarousel.EDGE_DRAG_MAX_PX, overscrollPastEnd * TetCarousel.EDGE_DRAG_RESISTANCE);
287
+ }
288
+ return offset;
289
+ }
146
290
  getCurrentNudgeTranslateX() {
147
291
  if (!this.isNudgeAnimating || !this.trackContentElement)
148
292
  return 0;
@@ -161,53 +305,53 @@ export class TetCarousel {
161
305
  if (!assigned) {
162
306
  this.dotCount = 1;
163
307
  this.totalItems = 0;
164
- return 1;
308
+ this.activeDotIndex = 0;
309
+ return;
165
310
  }
166
311
  this.totalItems = assigned.length;
167
312
  const viewportWidth = this.getViewportWidth();
168
313
  const totalWidth = this.getSlotClientWidth();
169
314
  // Precise: add a dot whenever there's any overflow beyond a full viewport
170
315
  const exactScreens = Math.ceil(totalWidth / Math.max(1, viewportWidth));
171
- this.dotCount = Math.max(1, Math.min(this?.maxDots, exactScreens));
316
+ const maxDots = Number.isFinite(this.maxDots) ? this.maxDots : exactScreens;
317
+ this.dotCount = Math.max(1, Math.min(maxDots, exactScreens));
318
+ this.activeDotIndex = this.clampDotIndex(this.activeDotIndex);
172
319
  }
173
320
  handleMove = () => {
174
321
  const assigned = this.getSlotElements();
175
322
  if (!assigned)
176
- return 1;
323
+ return;
177
324
  const item = assigned[this.activeItem];
178
325
  if (item) {
179
326
  this.moveToItem(item);
180
327
  }
181
328
  };
182
- handlePrev = () => {
329
+ navigateByStep(direction) {
183
330
  this.registerUserInteraction();
184
- if (this.activeItem <= 0)
331
+ const assigned = this.getSlotElements();
332
+ if (!assigned || assigned.length === 0)
185
333
  return;
186
- this.afterLayout(() => {
187
- const visibleItems = Math.max(1, this.getFullyVisibleItemCount());
188
- if (this.activeItem && this.activeItem < visibleItems) {
189
- this.activeItem -= this.activeItem;
190
- }
191
- else {
192
- this.activeItem -= visibleItems;
193
- }
194
- this.handleMove();
195
- });
334
+ const previousDotIndex = this.activeDotIndex;
335
+ const viewportFirstVisible = this.getFirstVisibleItemInViewport();
336
+ const baseIndex = viewportFirstVisible?.index ?? this.activeItem;
337
+ const visibleItems = this.getVisibleItemCountFromIndex(baseIndex);
338
+ const targetIndex = Math.max(0, Math.min(assigned.length - 1, baseIndex + direction * visibleItems));
339
+ if (targetIndex === baseIndex)
340
+ return;
341
+ const targetItem = assigned[targetIndex];
342
+ if (!targetItem)
343
+ return;
344
+ this.moveToItem(targetItem, targetIndex);
345
+ // Keep arrow-driven dot navigation stable: one arrow press must not skip more than one dot.
346
+ if (Math.abs(this.activeDotIndex - previousDotIndex) > 1) {
347
+ this.moveToDotIndex(previousDotIndex + direction);
348
+ }
349
+ }
350
+ handlePrev = () => {
351
+ this.navigateByStep(-1);
196
352
  };
197
353
  handleNext = () => {
198
- this.registerUserInteraction();
199
- if (this.activeItem >= this.totalItems - 1)
200
- return;
201
- this.afterLayout(() => {
202
- const visibleItems = Math.max(1, this.getFullyVisibleItemCount());
203
- if (this.totalItems - this.activeItem < visibleItems) {
204
- this.activeItem = this.totalItems - 1;
205
- }
206
- else {
207
- this.activeItem += visibleItems;
208
- }
209
- this.handleMove();
210
- });
354
+ this.navigateByStep(1);
211
355
  };
212
356
  moveToLastScreen = () => {
213
357
  const wrapperWidth = this.getViewportWidth();
@@ -228,9 +372,9 @@ export class TetCarousel {
228
372
  const assigned = this.getSlotElements();
229
373
  if (!assigned)
230
374
  return null;
375
+ const trackRect = this.trackElement.getBoundingClientRect();
231
376
  for (const [index, item] of assigned.entries()) {
232
377
  const rect = item.getBoundingClientRect();
233
- const trackRect = this.trackElement.getBoundingClientRect();
234
378
  let relativeLeft = rect.left - trackRect.left;
235
379
  const gradientOffset = this.calculateGradient(item, relativeLeft);
236
380
  if (relativeLeft >= target - this.swipeThreshold + gradientOffset) {
@@ -239,33 +383,94 @@ export class TetCarousel {
239
383
  }
240
384
  return { item: assigned[0], index: 0 };
241
385
  };
386
+ moveToDotIndex(idx) {
387
+ this.activeDotIndex = this.clampDotIndex(idx);
388
+ const maxScrollableOffset = this.getMaxScrollableOffset();
389
+ const isLastDot = this.dotCount - 1 === this.activeDotIndex && !this.isDragging;
390
+ const unclampedTargetOffset = isLastDot ? maxScrollableOffset : this.activeDotIndex * this.getDotScreenLength();
391
+ const targetOffset = Math.max(0, Math.min(unclampedTargetOffset, maxScrollableOffset));
392
+ const lastScreenElement = this.calcLastScreenElement(targetOffset);
393
+ if (!lastScreenElement) {
394
+ this.activeItem = 0;
395
+ this.dragOffset = 0;
396
+ return;
397
+ }
398
+ const { index } = lastScreenElement;
399
+ this.activeItem = index;
400
+ this.dragOffset = -targetOffset;
401
+ }
242
402
  handleDotClick = (idx) => {
243
403
  this.registerUserInteraction();
244
- this.activeDotIndex = idx;
245
- const totalWidth = this.getSlotClientWidth();
246
- let targetDragOffset = 0;
247
- if (this.dotCount - 1 === this.activeDotIndex && !this.isDragging) {
248
- const viewPortWidth = this.getViewportWidth();
249
- targetDragOffset = totalWidth - viewPortWidth;
250
- }
251
- else {
252
- targetDragOffset = idx * this.getDotScreenLength();
404
+ this.moveToDotIndex(idx);
405
+ };
406
+ focusDot = (idx) => {
407
+ if (!this.container)
408
+ return;
409
+ const dots = Array.from(this.container.querySelectorAll('.tet-carousel__dot'));
410
+ dots[idx]?.focus();
411
+ };
412
+ getKeyboardTargetIndex(key, currentIndex, maxIndex) {
413
+ if (maxIndex < 1)
414
+ return null;
415
+ switch (key) {
416
+ case 'ArrowRight':
417
+ case 'ArrowDown':
418
+ return Math.min(maxIndex, currentIndex + 1);
419
+ case 'ArrowLeft':
420
+ case 'ArrowUp':
421
+ return Math.max(0, currentIndex - 1);
422
+ case 'Home':
423
+ return 0;
424
+ case 'End':
425
+ return maxIndex;
426
+ default:
427
+ return null;
253
428
  }
254
- const { item, index } = this.calcLastScreenElement(targetDragOffset);
255
- if (!this.isLastViewport(targetDragOffset)) {
256
- if (!item)
429
+ }
430
+ handleNavigationKeyDown(event, currentIndex, maxIndex, onNavigate, onFocus) {
431
+ const targetIndex = this.getKeyboardTargetIndex(event.key, currentIndex, maxIndex);
432
+ if (targetIndex === null)
433
+ return;
434
+ event.preventDefault();
435
+ event.stopPropagation();
436
+ if (!onNavigate(targetIndex))
437
+ return;
438
+ this.afterLayout(() => onFocus(targetIndex));
439
+ }
440
+ handleDotKeyDown = (event, idx) => {
441
+ if (event.key === 'Tab' && event.shiftKey) {
442
+ if (this.hasVisibleMobileBackButtonTarget())
257
443
  return;
258
- this.moveToItem(item, index);
259
- }
260
- else {
261
- if (index || index === 0) {
262
- this.activeItem = index;
263
- }
264
- this.moveToLastScreen();
444
+ this.registerUserInteraction();
445
+ event.preventDefault();
446
+ event.stopPropagation();
447
+ this.afterLayout(() => this.focusSlideByIndex(this.activeItem));
448
+ return;
265
449
  }
450
+ this.handleNavigationKeyDown(event, idx, this.dotCount - 1, (targetIdx) => {
451
+ this.handleDotClick(targetIdx);
452
+ return true;
453
+ }, (targetIdx) => this.focusDot(targetIdx));
266
454
  };
455
+ isElementVisible(element) {
456
+ if (!element.isConnected)
457
+ return false;
458
+ if (element.hidden || element.hasAttribute('hidden'))
459
+ return false;
460
+ if (element.getClientRects().length === 0)
461
+ return false;
462
+ const style = getComputedStyle(element);
463
+ return style.display !== 'none' && style.visibility !== 'hidden';
464
+ }
465
+ hasVisibleMobileBackButtonTarget() {
466
+ if (this.isLeftNavigationDisabled())
467
+ return false;
468
+ const wrapper = this.mobileBackButtonWrapper;
469
+ return !!wrapper && this.isElementVisible(wrapper);
470
+ }
267
471
  onPointerDown = (e) => {
268
472
  this.registerUserInteraction();
473
+ this.dragPointerType = e.pointerType || 'mouse';
269
474
  e.preventDefault();
270
475
  e.stopPropagation();
271
476
  e.stopImmediatePropagation();
@@ -273,9 +478,11 @@ export class TetCarousel {
273
478
  this.dragStartX = e.screenX;
274
479
  this.dragMoved = false;
275
480
  this.dragPointerStartX = e.screenX;
481
+ this.dragStartActiveItem = this.activeItem;
276
482
  document.body.style.userSelect = 'none';
277
483
  document.addEventListener('pointermove', this.onPointerMove);
278
484
  document.addEventListener('pointerup', this.onPointerUp);
485
+ document.addEventListener('pointercancel', this.onPointerUp);
279
486
  let el = e.target;
280
487
  this.draggedAnchor = null;
281
488
  while (el) {
@@ -289,7 +496,6 @@ export class TetCarousel {
289
496
  onPointerMove = (e) => {
290
497
  if (!this.isDragging)
291
498
  return;
292
- this.registerUserInteraction();
293
499
  // Only consider this a move (and prevent clicks) when movement exceeds a small threshold.
294
500
  const moveDistanceFromStart = Math.abs(e.screenX - this.dragPointerStartX);
295
501
  if (!this.dragMoved && moveDistanceFromStart > 5) {
@@ -307,84 +513,117 @@ export class TetCarousel {
307
513
  this.dragStartX = e.screenX;
308
514
  const wrapperWidth = this.getViewportWidth();
309
515
  const totalWidth = this.getSlotClientWidth();
310
- const totalScrollableWidth = -(totalWidth - wrapperWidth);
311
- if (totalScrollableWidth < _dragOffset && _dragOffset < 0) {
312
- this.dragOffset = _dragOffset;
516
+ const minDragOffset = -(totalWidth - wrapperWidth);
517
+ this.dragOffset = this.applyEdgeDragResistance(_dragOffset, minDragOffset);
518
+ const firstVisible = this.getFirstVisibleItemInViewport();
519
+ if (firstVisible && this.activeItem !== firstVisible.index) {
520
+ this.activeItem = firstVisible.index;
313
521
  }
314
522
  };
315
- onPointerUp = (e) => {
316
- if (!this.isDragging)
523
+ releaseTrackPointerCapture(pointerId) {
524
+ try {
525
+ this.trackElement?.releasePointerCapture?.(pointerId);
526
+ }
527
+ catch { }
528
+ }
529
+ getMinDragOffset() {
530
+ const wrapperWidth = this.getViewportWidth();
531
+ const totalWidth = this.getSlotClientWidth();
532
+ return -(totalWidth - wrapperWidth);
533
+ }
534
+ snapToEdge(minDragOffset) {
535
+ const hitStartEdge = this.dragOffset > 0;
536
+ this.activeItem = hitStartEdge ? 0 : Math.max(0, this.totalItems - 1);
537
+ this.activeDotIndex = hitStartEdge ? 0 : Math.max(0, this.dotCount - 1);
538
+ this.dragOffset = hitStartEdge ? 0 : minDragOffset;
539
+ }
540
+ moveBySwipeDelta(delta) {
541
+ if (Math.abs(delta) <= this.swipeThreshold) {
542
+ this.activeItem = this.dragStartActiveItem;
543
+ this.afterLayout(() => this.handleMove());
317
544
  return;
318
- this.registerUserInteraction();
319
- if (this.trackElement) {
320
- try {
321
- this.trackElement.releasePointerCapture?.(e.pointerId);
322
- }
323
- catch { }
324
545
  }
546
+ const direction = delta < 0 ? 1 : -1;
547
+ const swipeTarget = this.getSwipeTarget(direction);
548
+ if (swipeTarget) {
549
+ this.moveToItem(swipeTarget.item, swipeTarget.index);
550
+ }
551
+ }
552
+ finalizePointerDrag() {
553
+ document.body.style.userSelect = '';
554
+ document.removeEventListener('pointermove', this.onPointerMove);
555
+ document.removeEventListener('pointerup', this.onPointerUp);
556
+ document.removeEventListener('pointercancel', this.onPointerUp);
557
+ this.dragPointerType = '';
558
+ }
559
+ preventClickAfterDrag() {
560
+ if (!this.draggedAnchor || !this.dragMoved)
561
+ return;
562
+ const preventClick = (ev) => {
563
+ ev.preventDefault();
564
+ ev.stopPropagation();
565
+ this.draggedAnchor?.removeEventListener('click', preventClick, true);
566
+ };
567
+ this.draggedAnchor.addEventListener('click', preventClick, true);
568
+ }
569
+ onPointerUp = (e) => {
325
570
  if (!this.isDragging)
326
571
  return;
327
- // Snap activeDotIndex when dragOffset passes threshold from last index position
572
+ this.registerUserInteraction();
573
+ this.releaseTrackPointerCapture(e.pointerId);
328
574
  this.isDragging = false;
329
- // Let the once:true capture handler auto-remove itself. Clear flag after a tick.
575
+ const minDragOffset = this.getMinDragOffset();
576
+ const isOutOfBounds = this.dragOffset > 0 || this.dragOffset < minDragOffset;
330
577
  const delta = e.screenX - this.dragPointerStartX;
331
- if (Math.abs(delta) > this.swipeThreshold) {
332
- if (delta < 0) {
333
- this.handleNext();
334
- }
335
- if (delta > 0) {
336
- this.handlePrev();
337
- }
578
+ if (isOutOfBounds) {
579
+ this.snapToEdge(minDragOffset);
338
580
  }
339
- document.body.style.userSelect = '';
340
- document.removeEventListener('pointermove', this.onPointerMove);
341
- document.removeEventListener('pointerup', this.onPointerUp);
342
- if (this.draggedAnchor && this.dragMoved) {
343
- const preventClick = (ev) => {
344
- ev.preventDefault();
345
- ev.stopPropagation();
346
- this.draggedAnchor?.removeEventListener('click', preventClick, true);
347
- };
348
- this.draggedAnchor.addEventListener('click', preventClick, true);
581
+ else {
582
+ this.moveBySwipeDelta(delta);
349
583
  }
584
+ this.finalizePointerDrag();
585
+ this.preventClickAfterDrag();
350
586
  };
351
- _showButtons() {
587
+ _showButtons(fullyVisibleItemCount = this.getFullyVisibleItemCount()) {
352
588
  if (!this.showButtons) {
353
589
  return false;
354
590
  }
355
- if (this.getFullyVisibleItemCount() >= this.totalItems) {
591
+ if (fullyVisibleItemCount >= this.totalItems) {
356
592
  return false;
357
593
  }
358
594
  return true;
359
595
  }
360
- _showDots() {
596
+ _showDots(fullyVisibleItemCount = this.getFullyVisibleItemCount()) {
361
597
  if (!this.showDots) {
362
598
  return false;
363
599
  }
364
- if (this.getFullyVisibleItemCount() && this.getFullyVisibleItemCount() >= this.totalItems) {
600
+ if (this.totalItems <= 0 || fullyVisibleItemCount >= this.totalItems) {
365
601
  return false;
366
602
  }
367
603
  return true;
368
604
  }
369
605
  componentDidLoad() {
370
606
  this.getDotCount();
371
- window.addEventListener('resize', this.getDotCount.bind(this));
372
- this.addAnchorFocusListeners();
607
+ window.addEventListener('resize', this.handleResize);
373
608
  this.checkGradient();
374
609
  this.initSlotListeners();
375
610
  this.syncNudgeSchedule();
611
+ this.refreshSlideFocusableElements();
376
612
  }
377
613
  handleSlotChange() {
378
614
  this.getDotCount();
615
+ const maxItemIndex = Math.max(0, this.totalItems - 1);
616
+ this.activeItem = Math.max(0, Math.min(this.activeItem, maxItemIndex));
617
+ this.refreshSlideFocusableElements();
379
618
  this.checkGradient();
380
- forceUpdate(this);
619
+ this.safeForceUpdate();
381
620
  }
382
621
  initSlotListeners() {
383
622
  const slot = this.container?.querySelector('slot');
384
623
  if (!slot)
385
624
  return;
386
625
  // add listeners for slot elements
387
- slot.addEventListener('slotchange', () => this.handleSlotChange());
626
+ slot.addEventListener('slotchange', this.handleSlotChangeListener);
388
627
  // add listeners for slot element children
389
628
  if (typeof slot.assignedElements !== 'function')
390
629
  return;
@@ -398,32 +637,105 @@ export class TetCarousel {
398
637
  subtree: false
399
638
  });
400
639
  }
401
- addAnchorFocusListeners() {
402
- const assigned = this.getSlotElements();
403
- if (!assigned)
404
- return 1;
405
- let anchors = [];
406
- assigned.forEach((el) => {
407
- if (el.tagName === 'A') {
408
- anchors.push(el);
640
+ isTabbableElement(element) {
641
+ if (element.tagName === 'A') {
642
+ return element.hasAttribute('href');
643
+ }
644
+ const tabIndexValue = element.getAttribute('tabindex');
645
+ return tabIndexValue !== null && tabIndexValue.trim() !== '-1';
646
+ }
647
+ getSlideFocusableElements(slide) {
648
+ const focusableElements = new Set();
649
+ if (this.isTabbableElement(slide)) {
650
+ focusableElements.add(slide);
651
+ }
652
+ const descendants = Array.from(slide.querySelectorAll(this.focusableSelector));
653
+ descendants.forEach((element) => {
654
+ if (this.isTabbableElement(element)) {
655
+ focusableElements.add(element);
409
656
  }
410
- anchors = anchors.concat(Array.from(el.querySelectorAll('a')));
411
- if (el.getAttribute('tabindex') === '0') {
412
- anchors.push(el);
657
+ });
658
+ if (slide.shadowRoot) {
659
+ const shadowDescendants = Array.from(slide.shadowRoot.querySelectorAll(this.focusableSelector));
660
+ shadowDescendants.forEach((element) => {
661
+ if (this.isTabbableElement(element)) {
662
+ focusableElements.add(element);
663
+ }
664
+ });
665
+ }
666
+ return Array.from(focusableElements);
667
+ }
668
+ clearManagedSlideFocusableElements() {
669
+ this.managedSlideFocusWithinListeners.forEach(({ slide, onFocusWithin }) => {
670
+ slide.removeEventListener('focusin', onFocusWithin);
671
+ });
672
+ this.managedSlideFocusWithinListeners = [];
673
+ this.managedFocusableElements.forEach(({ element, originalTabIndex, onKeyDown }) => {
674
+ element.removeEventListener('keydown', onKeyDown);
675
+ if (originalTabIndex === null) {
676
+ element.removeAttribute('tabindex');
413
677
  }
414
- const tabIndexElements = Array.from(el.querySelectorAll('[tabindex="0"]'));
415
- anchors = anchors.concat(tabIndexElements);
416
- if (el.shadowRoot) {
417
- const deepTabIndexElements = Array.from(el.shadowRoot.querySelectorAll('[tabindex="0"]'));
418
- anchors = anchors.concat(deepTabIndexElements);
678
+ else {
679
+ element.setAttribute('tabindex', originalTabIndex);
419
680
  }
420
681
  });
421
- anchors.forEach((a, index) => {
422
- a.addEventListener('focus', () => {
682
+ this.managedFocusableElements = [];
683
+ }
684
+ updateSlideFocusableTabIndexes() {
685
+ if (!this.managedFocusableElements.length)
686
+ return;
687
+ this.managedFocusableElements.forEach(({ element, slideIndex }) => {
688
+ element.setAttribute('tabindex', slideIndex === this.activeItem ? '0' : '-1');
689
+ });
690
+ }
691
+ focusSlideByIndex(index) {
692
+ const focusable = this.managedFocusableElements.find((element) => element.slideIndex === index);
693
+ const element = focusable?.element;
694
+ if (!element)
695
+ return;
696
+ try {
697
+ element.focus({ preventScroll: true });
698
+ }
699
+ catch { }
700
+ }
701
+ handleSlideKeyDown(event, idx) {
702
+ this.handleNavigationKeyDown(event, idx, this.totalItems - 1, (targetIdx) => {
703
+ const assigned = this.getSlotElements();
704
+ if (!assigned?.[targetIdx])
705
+ return false;
706
+ this.registerUserInteraction();
707
+ this.moveToItem(assigned[targetIdx], targetIdx);
708
+ return true;
709
+ }, (targetIdx) => this.focusSlideByIndex(targetIdx));
710
+ }
711
+ refreshSlideFocusableElements() {
712
+ this.clearManagedSlideFocusableElements();
713
+ const assigned = this.getSlotElements();
714
+ if (!assigned?.length)
715
+ return;
716
+ assigned.forEach((slide, slideIndex) => {
717
+ const onFocusWithin = () => {
423
718
  this.registerUserInteraction();
424
- this.moveToItem(a, index);
719
+ this.moveToItem(slide, slideIndex);
720
+ };
721
+ this.managedSlideFocusWithinListeners.push({
722
+ slide,
723
+ onFocusWithin
724
+ });
725
+ slide.addEventListener('focusin', onFocusWithin);
726
+ const focusableElements = this.getSlideFocusableElements(slide);
727
+ focusableElements.forEach((element) => {
728
+ const onKeyDown = (event) => this.handleSlideKeyDown(event, slideIndex);
729
+ this.managedFocusableElements.push({
730
+ element,
731
+ slideIndex,
732
+ originalTabIndex: element.getAttribute('tabindex'),
733
+ onKeyDown
734
+ });
735
+ element.addEventListener('keydown', onKeyDown);
425
736
  });
426
737
  });
738
+ this.updateSlideFocusableTabIndexes();
427
739
  }
428
740
  startNudgeGradientLoop() {
429
741
  if (this.nudgeGradientRafId)
@@ -466,8 +778,16 @@ export class TetCarousel {
466
778
  isRightNavigationDisabled() {
467
779
  return this.dotCount <= 1 || this.activeItem === this.totalItems - 1 || this.isLastViewport(-this.dragOffset);
468
780
  }
781
+ isLeftNavigationDisabled() {
782
+ return this.dotCount <= 1 || this.activeItem === 0;
783
+ }
469
784
  isNudgeEligible() {
470
- return !!this.trackElement && !this.isDragging && !this.isNudgeAnimating && !this.hasRecentInteraction() && !this.isRightNavigationDisabled();
785
+ return (!!this.trackElement &&
786
+ !this.isDragging &&
787
+ !this.isNudgeAnimating &&
788
+ !this.hasRecentInteraction() &&
789
+ !this.isRightNavigationDisabled() &&
790
+ this.dragOffset === 0);
471
791
  }
472
792
  scheduleNextNudge() {
473
793
  if (this.nudgeAnimationInterval <= 0)
@@ -519,7 +839,7 @@ export class TetCarousel {
519
839
  dotIndex = this.dotCount - 1;
520
840
  }
521
841
  else {
522
- dotIndex = Math.floor((position + gradientOffset) / dotScreenLength);
842
+ dotIndex = Math.round((position + gradientOffset) / dotScreenLength);
523
843
  }
524
844
  this.activeDotIndex = this.clampDotIndex(dotIndex);
525
845
  }
@@ -542,44 +862,50 @@ export class TetCarousel {
542
862
  disconnectedCallback() {
543
863
  this.stopNudgeSchedule();
544
864
  this.stopNudgeGradientLoop();
545
- window.removeEventListener('resize', this.getDotCount.bind(this));
865
+ window.removeEventListener('resize', this.handleResize);
866
+ this.clearManagedSlideFocusableElements();
546
867
  const slot = this.container?.querySelector('slot');
547
868
  if (slot) {
548
- slot.removeEventListener('slotchange', () => this.handleSlotChange());
869
+ slot.removeEventListener('slotchange', this.handleSlotChangeListener);
549
870
  }
550
871
  if (this.slotObserver) {
551
- this.slotObserver?.disconnect();
872
+ this.slotObserver.disconnect();
552
873
  this.slotObserver = null;
553
874
  }
554
875
  document.removeEventListener('pointermove', this.onPointerMove);
555
876
  document.removeEventListener('pointerup', this.onPointerUp);
877
+ document.removeEventListener('pointercancel', this.onPointerUp);
556
878
  }
557
879
  render() {
558
- return (h(Host, { key: '3a7b181e4c8a1d19777a39ca77197199452e12b5' }, h("div", { key: 'f5830e6a8158c0ae5ffddd3cde678223b8e1b51a', class: { 'tet-carousel': true, [`${this.theme}`]: true }, ref: (el) => (this.container = el), part: "carousel" }, h("div", { key: '77031caf2348f1a06e757096192cdaa7cadaf3cc', class: "tet-carousel__container" }, h("div", { key: 'd514790264ef2b4a7faf66ef9932871525db053a', class: "tet-carousel__gradient-left", ref: (el) => {
880
+ const fullyVisibleItemCount = this.getFullyVisibleItemCount();
881
+ const showButtons = this._showButtons(fullyVisibleItemCount);
882
+ const showDots = this._showDots(fullyVisibleItemCount);
883
+ const showControls = showButtons || showDots;
884
+ let trackTransition = `transform ${this.transitionDuration}ms ${this.transitionTiming}`;
885
+ if (this.isDragging) {
886
+ if (this.dragPointerType === 'mouse') {
887
+ trackTransition = `transform ${TetCarousel.MOUSE_DRAG_SMOOTHING_MS}ms linear`;
888
+ }
889
+ else {
890
+ trackTransition = 'none';
891
+ }
892
+ }
893
+ return (h(Host, { key: '9767de8c2faf3b0e4830a392c9ba0d86c613646e' }, h("div", { key: 'fa87bbfcf929287a5440accd922698d4ad1f6d4b', class: { 'tet-carousel': true, [`${this.theme}`]: true }, ref: (el) => (this.container = el), part: "carousel" }, h("div", { key: 'f5650393d39f906e8c47fd299680b09f82b00a07', class: "tet-carousel__container" }, h("div", { key: 'f6bd47326c58ef355d35e33c037025e1d5a7b5a8', class: "tet-carousel__gradient-left", ref: (el) => {
559
894
  this.leftGradientRef = el;
560
- } }), h("div", { key: 'ced61d4ccfcc5de268ba1da71bccff32ad8ec9f6', class: "tet-carousel__gradient-right", ref: (el) => {
895
+ } }), h("div", { key: '685cad2d917518a83c6db28ef451563fe349c218', class: "tet-carousel__gradient-right", ref: (el) => {
561
896
  this.rightGradientRef = el;
562
- } }), h("div", { key: 'd76b0c1211165a3ee32adfec02cc109b7d296307', class: `tet-carousel__track ${!this._showButtons() && !this._showDots() ? 'tet-carousel__track--center' : ''}`, ref: (el) => (this.trackElement = el), style: {
563
- transform: `translateX(${this.dragOffset}px)`,
564
- transition: this.isDragging ? 'none' : `transform ${this.transitionDuration}ms ${this.transitionTiming}`
565
- }, onPointerDown: this.onPointerDown, onMouseMove: this.onPointerMove, onPointerUp: this.onPointerUp, onMouseLeave: this.onPointerUp }, h("div", { key: '874945906359997e34b179988f05b33d4300b4ae', class: {
897
+ } }), h("div", { key: '2f5acf14605c82e42c845766bd50e61a644a6fe6', class: `tet-carousel__track ${showControls ? '' : 'tet-carousel__track--center'}`, ref: (el) => (this.trackElement = el), style: {
898
+ transform: `translate3d(${this.dragOffset}px, 0, 0)`,
899
+ transition: trackTransition,
900
+ willChange: 'transform'
901
+ }, onPointerDown: this.onPointerDown, onPointerUp: this.onPointerUp }, h("div", { key: '84bcc48d810f6cd0d15022cdc6d48841187613ad', class: {
566
902
  'tet-carousel__track-content': true,
567
903
  'tet-carousel__track-content--nudge': this.isNudgeAnimating
568
904
  }, ref: (el) => (this.trackContentElement = el), style: {
569
905
  '--tet-carousel-nudge-distance': `${TetCarousel.NUDGE_DISTANCE_PX}px`
570
- }, onAnimationEnd: this.onNudgeAnimationEnd }, h("slot", { key: 'c714dd8072438aae03661de4d3dc689fb471e412' })))), !!this.label && h("div", { key: '28a233d7c5c7799b0dc505e83616da798deb970c', class: "tet-carousel__label" }, this.label), (this._showButtons() || this._showDots()) && (h("div", { key: 'e84c35e48571aa85420686a5e608135610103571', class: "tet-carousel__controls" }, this._showButtons() && (h("div", { key: '3222b45cfd3a37deb7a4a572d0523044be1eb1f5', class: "tet-carousel__buttons tet-carousel__buttons--mobile" }, h("tet-button", { key: 'a296a74cbbecb955d378de5e9ba04c6ef1a4a74f', theme: this.theme, type: "secondary", size: "medium", "icon-name": this.buttonIconLeft, "icon-mode": true, tabIndex: -1, onPointerDown: (e) => e.stopPropagation(), onPointerUp: () => {
571
- if (!this.isDragging)
572
- this.handlePrev();
573
- }, "aria-label": t('components-carousel-previous'), disabled: this.dotCount <= 1 || this.activeItem === 0 }))), this._showDots() && (h("div", { key: 'e205c6a0354ab7a66985759dd95f6f0aa086bba0', class: "tet-carousel__dots" }, Array.from({ length: this.dotCount }).map((_, idx) => (h("button", { type: "button", tabIndex: -1, class: `tet-carousel__dot${idx === this.activeDotIndex ? ' active' : ''}`, key: idx, onPointerDown: (e) => e.stopPropagation(), onPointerUp: () => {
574
- if (!this.isDragging)
575
- this.handleDotClick(idx);
576
- }, onClick: () => this.handleDotClick(idx) }))))), this._showButtons() && (h("div", { key: 'ff9081c15d417e870db6e5e82f030bc031310027', class: "tet-carousel__buttons" }, h("tet-button", { key: '279bac2814813a2ce35308d556bca341f1b4a3bb', class: "tet-carousel__buttons--desktop", theme: this.theme, type: "secondary", size: "medium", "icon-name": this.buttonIconLeft, "icon-mode": true, tabIndex: -1, onPointerDown: (e) => e.stopPropagation(), onPointerUp: () => {
577
- if (!this.isDragging)
578
- this.handlePrev();
579
- }, accessibilityLabel: t('components-carousel-previous'), disabled: this.dotCount <= 1 || this.activeItem === 0 }), h("tet-button", { key: '320adc13d425ca84c26ef2d1cc7001220ce7d9c4', theme: this.theme, type: "secondary", size: "medium", "icon-name": this.buttonIconRight, "icon-mode": true, tabIndex: -1, onPointerDown: (e) => e.stopPropagation(), onPointerUp: () => {
580
- if (!this.isDragging)
581
- this.handleNext();
582
- }, accessibilityLabel: t('components-carousel-next'), disabled: this.isRightNavigationDisabled() }))))))));
906
+ }, onAnimationEnd: this.onNudgeAnimationEnd }, h("slot", { key: '008187ecc9d482ffd1565aaa2c6da818a7bf34ed' })))), !!this.label && h("div", { key: 'd040796e5dc156331fdb2356cd7bb20e7900f460', class: "tet-carousel__label" }, this.label), showControls && (h("div", { key: '4446a2194185bae6fef623d21790f89346378194', class: "tet-carousel__controls" }, showButtons && (h("div", { key: '6c3c10f149b11f9b6503392f16d2d74b526d74c8', class: "tet-carousel__buttons tet-carousel__buttons--mobile", ref: (el) => (this.mobileBackButtonWrapper = el) }, h("tet-button", { key: 'e8f3dad8e0978add649e844149b94072e366f4d8', theme: this.theme, type: "secondary", size: "medium", "icon-name": this.buttonIconLeft, "icon-mode": true, onPointerDown: (e) => e.stopPropagation(), onClick: () => this.handlePrev(), accessibilityLabel: t('components-carousel-previous'), disabled: this.isLeftNavigationDisabled() }))), showDots && (h("div", { key: 'a747eb625e0bf36603a279f29f17ccac16c2e84c', class: "tet-carousel__dots" }, Array.from({ length: this.dotCount }).map((_, idx) => (h("button", { type: "button", tabIndex: idx === this.activeDotIndex ? 0 : -1, class: `tet-carousel__dot${idx === this.activeDotIndex ? ' active' : ''}`, key: idx, "aria-label": `${idx === this.activeDotIndex
907
+ ? t('components-carousel-indicator-button-active')
908
+ : t('components-carousel-indicator-button')} ${idx + 1}/${this.dotCount}`, "aria-current": idx === this.activeDotIndex ? 'true' : undefined, onPointerDown: (e) => e.stopPropagation(), onKeyDown: (event) => this.handleDotKeyDown(event, idx), onClick: () => this.handleDotClick(idx) }))))), showButtons && (h("div", { key: '4ffa948621436b96fb9b8d6b10308ec9aa98dff3', class: "tet-carousel__buttons" }, h("tet-button", { key: '43de7d0b8e92e6b1e0e2b7f1ff5f851c4fc75ead', class: "tet-carousel__buttons--desktop", theme: this.theme, type: "secondary", size: "medium", "icon-name": this.buttonIconLeft, "icon-mode": true, onPointerDown: (e) => e.stopPropagation(), onClick: () => this.handlePrev(), accessibilityLabel: t('components-carousel-previous'), disabled: this.isLeftNavigationDisabled() }), h("tet-button", { key: 'eb7b1f82803e0bc39ffb41721a1a906dd5fc6d55', theme: this.theme, type: "secondary", size: "medium", "icon-name": this.buttonIconRight, "icon-mode": true, onPointerDown: (e) => e.stopPropagation(), onClick: () => this.handleNext(), accessibilityLabel: t('components-carousel-next'), disabled: this.isRightNavigationDisabled() }))))))));
583
909
  }
584
910
  static get is() { return "tet-carousel"; }
585
911
  static get encapsulation() { return "shadow"; }
@@ -851,6 +1177,9 @@ export class TetCarousel {
851
1177
  return [{
852
1178
  "propName": "language",
853
1179
  "methodName": "onLanguageChange"
1180
+ }, {
1181
+ "propName": "activeItem",
1182
+ "methodName": "onActiveItemChange"
854
1183
  }, {
855
1184
  "propName": "showGradient",
856
1185
  "methodName": "checkGradient"